dccxx-s3-explorer 1.0.41 → 1.0.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- (function(dt,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],l):(dt=typeof globalThis<"u"?globalThis:dt||self,l(dt.S3Explorer={},dt.jsxRuntime,dt.React,dt.ReactDOM))})(this,function(dt,l,T,Jo){"use strict";function Es(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const f=Es(T),Pr=Es(Jo);function wp({title:e,titleId:t,...n},r){return f.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?f.createElement("title",{id:t},e):null,f.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 16.5m0 0L7.5 12m4.5 4.5V3"}))}const Ts=f.forwardRef(wp);function bp({title:e,titleId:t,...n},r){return f.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?f.createElement("title",{id:t},e):null,f.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"}))}const Sp=f.forwardRef(bp);function Cp({title:e,titleId:t,...n},r){return f.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?f.createElement("title",{id:t},e):null,f.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5m-13.5-9L12 3m0 0 4.5 4.5M12 3v13.5"}))}const Ep=f.forwardRef(Cp);function Tp({title:e,titleId:t,...n},r){return f.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?f.createElement("title",{id:t},e):null,f.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 10.5v6m3-3H9m4.06-7.19-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44Z"}))}const _p=f.forwardRef(Tp);function Ap({title:e,titleId:t,...n},r){return f.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?f.createElement("title",{id:t},e):null,f.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12.75V12A2.25 2.25 0 0 1 4.5 9.75h15A2.25 2.25 0 0 1 21.75 12v.75m-8.69-6.44-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44Z"}))}const Zo=f.forwardRef(Ap);function Pp({title:e,titleId:t,...n},r){return f.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?f.createElement("title",{id:t},e):null,f.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 21a9.004 9.004 0 0 0 8.716-6.747M12 21a9.004 9.004 0 0 1-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 0 1 7.843 4.582M12 3a8.997 8.997 0 0 0-7.843 4.582m15.686 0A11.953 11.953 0 0 1 12 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0 1 21 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0 1 12 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 0 1 3 12c0-1.605.42-3.113 1.157-4.418"}))}const Np=f.forwardRef(Pp);function Op({title:e,titleId:t,...n},r){return f.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?f.createElement("title",{id:t},e):null,f.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125"}))}const Fp=f.forwardRef(Op);function kp({title:e,titleId:t,...n},r){return f.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?f.createElement("title",{id:t},e):null,f.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 7.5A2.25 2.25 0 0 1 7.5 5.25h9a2.25 2.25 0 0 1 2.25 2.25v9a2.25 2.25 0 0 1-2.25 2.25h-9a2.25 2.25 0 0 1-2.25-2.25v-9Z"}))}const Dp=f.forwardRef(kp);function Mp({title:e,titleId:t,...n},r){return f.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?f.createElement("title",{id:t},e):null,f.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"}))}const _s=f.forwardRef(Mp);/**
1
+ (function(ft,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],l):(ft=typeof globalThis<"u"?globalThis:ft||self,l(ft.S3Explorer={},ft.jsxRuntime,ft.React,ft.ReactDOM))})(this,function(ft,l,_,ri){"use strict";function Fs(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const p=Fs(_),Fr=Fs(ri);function Dp({title:e,titleId:t,...n},r){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?p.createElement("title",{id:t},e):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 16.5m0 0L7.5 12m4.5 4.5V3"}))}const Ds=p.forwardRef(Dp);function Ip({title:e,titleId:t,...n},r){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?p.createElement("title",{id:t},e):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"}))}const Mp=p.forwardRef(Ip);function $p({title:e,titleId:t,...n},r){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?p.createElement("title",{id:t},e):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5m-13.5-9L12 3m0 0 4.5 4.5M12 3v13.5"}))}const Lp=p.forwardRef($p);function Rp({title:e,titleId:t,...n},r){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?p.createElement("title",{id:t},e):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 10.5v6m3-3H9m4.06-7.19-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44Z"}))}const Vp=p.forwardRef(Rp);function jp({title:e,titleId:t,...n},r){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?p.createElement("title",{id:t},e):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12.75V12A2.25 2.25 0 0 1 4.5 9.75h15A2.25 2.25 0 0 1 21.75 12v.75m-8.69-6.44-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44Z"}))}const oi=p.forwardRef(jp);function zp({title:e,titleId:t,...n},r){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?p.createElement("title",{id:t},e):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 21a9.004 9.004 0 0 0 8.716-6.747M12 21a9.004 9.004 0 0 1-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 0 1 7.843 4.582M12 3a8.997 8.997 0 0 0-7.843 4.582m15.686 0A11.953 11.953 0 0 1 12 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0 1 21 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0 1 12 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 0 1 3 12c0-1.605.42-3.113 1.157-4.418"}))}const Bp=p.forwardRef(zp);function Hp({title:e,titleId:t,...n},r){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?p.createElement("title",{id:t},e):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125"}))}const Up=p.forwardRef(Hp);function Wp({title:e,titleId:t,...n},r){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?p.createElement("title",{id:t},e):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 7.5A2.25 2.25 0 0 1 7.5 5.25h9a2.25 2.25 0 0 1 2.25 2.25v9a2.25 2.25 0 0 1-2.25 2.25h-9a2.25 2.25 0 0 1-2.25-2.25v-9Z"}))}const qp=p.forwardRef(Wp);function Gp({title:e,titleId:t,...n},r){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?p.createElement("title",{id:t},e):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"}))}const Is=p.forwardRef(Gp),Kp=_.createContext(null);function Yp(){const e=_.useContext(Kp);if(!e)throw new Error("Google OAuth components must be used within GoogleOAuthProvider");return e}function Xp({flow:e="implicit",scope:t="",onSuccess:n,onError:r,onNonOAuthError:o,overrideScope:i,state:a,...s}){const{clientId:u,scriptLoadedSuccessfully:c}=Yp(),d=_.useRef(),g=_.useRef(n);g.current=n;const m=_.useRef(r);m.current=r;const f=_.useRef(o);f.current=o,_.useEffect(()=>{var y,b;if(!c)return;const w=e==="implicit"?"initTokenClient":"initCodeClient",C=(b=(y=window==null?void 0:window.google)===null||y===void 0?void 0:y.accounts)===null||b===void 0?void 0:b.oauth2[w]({client_id:u,scope:i?t:`openid profile email ${t}`,callback:E=>{var x,O;if(E.error)return(x=m.current)===null||x===void 0?void 0:x.call(m,E);(O=g.current)===null||O===void 0||O.call(g,E)},error_callback:E=>{var x;(x=f.current)===null||x===void 0||x.call(f,E)},state:a,...s});d.current=C},[u,c,e,t,a]);const v=_.useCallback(y=>{var b;return(b=d.current)===null||b===void 0?void 0:b.requestAccessToken(y)},[]),h=_.useCallback(()=>{var y;return(y=d.current)===null||y===void 0?void 0:y.requestCode()},[]);return e==="implicit"?v:h}/**
2
2
  * table-core
3
3
  *
4
4
  * Copyright (c) TanStack
@@ -7,10 +7,10 @@
7
7
  * LICENSE.md file in the root directory of this source tree.
8
8
  *
9
9
  * @license MIT
10
- */function qt(e,t){return typeof e=="function"?e(t):e}function Ze(e,t){return n=>{t.setState(r=>({...r,[e]:qt(n,r[e])}))}}function Nr(e){return e instanceof Function}function $p(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function Ip(e,t){const n=[],r=o=>{o.forEach(i=>{n.push(i);const a=t(i);a!=null&&a.length&&r(a)})};return r(e),n}function fe(e,t,n){let r=[],o;return i=>{let a;n.key&&n.debug&&(a=Date.now());const s=e(i);if(!(s.length!==r.length||s.some((d,g)=>r[g]!==d)))return o;r=s;let c;if(n.key&&n.debug&&(c=Date.now()),o=t(...s),n==null||n.onChange==null||n.onChange(o),n.key&&n.debug&&n!=null&&n.debug()){const d=Math.round((Date.now()-a)*100)/100,g=Math.round((Date.now()-c)*100)/100,h=g/16,p=(v,m)=>{for(v=String(v);v.length<m;)v=" "+v;return v};console.info(`%c⏱ ${p(g,5)} /${p(d,5)} ms`,`
10
+ */function Kt(e,t){return typeof e=="function"?e(t):e}function tt(e,t){return n=>{t.setState(r=>({...r,[e]:Kt(n,r[e])}))}}function Dr(e){return e instanceof Function}function Jp(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function Zp(e,t){const n=[],r=o=>{o.forEach(i=>{n.push(i);const a=t(i);a!=null&&a.length&&r(a)})};return r(e),n}function fe(e,t,n){let r=[],o;return i=>{let a;n.key&&n.debug&&(a=Date.now());const s=e(i);if(!(s.length!==r.length||s.some((d,g)=>r[g]!==d)))return o;r=s;let c;if(n.key&&n.debug&&(c=Date.now()),o=t(...s),n==null||n.onChange==null||n.onChange(o),n.key&&n.debug&&n!=null&&n.debug()){const d=Math.round((Date.now()-a)*100)/100,g=Math.round((Date.now()-c)*100)/100,m=g/16,f=(v,h)=>{for(v=String(v);v.length<h;)v=" "+v;return v};console.info(`%c⏱ ${f(g,5)} /${f(d,5)} ms`,`
11
11
  font-size: .6rem;
12
12
  font-weight: bold;
13
- color: hsl(${Math.max(0,Math.min(120-120*h,120))}deg 100% 31%);`,n==null?void 0:n.key)}return o}}function pe(e,t,n,r){return{debug:()=>{var o;return(o=e==null?void 0:e.debugAll)!=null?o:e[t]},key:process.env.NODE_ENV==="development"&&n,onChange:r}}function Lp(e,t,n,r){const o=()=>{var a;return(a=i.getValue())!=null?a:e.options.renderFallbackValue},i={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:o,getContext:fe(()=>[e,n,t,i],(a,s,u,c)=>({table:a,column:s,row:u,cell:c,getValue:c.getValue,renderValue:c.renderValue}),pe(e.options,"debugCells","cell.getContext"))};return e._features.forEach(a=>{a.createCell==null||a.createCell(i,n,t,e)},{}),i}function Rp(e,t,n,r){var o,i;const s={...e._getDefaultColumnDef(),...t},u=s.accessorKey;let c=(o=(i=s.id)!=null?i:u?typeof String.prototype.replaceAll=="function"?u.replaceAll(".","_"):u.replace(/\./g,"_"):void 0)!=null?o:typeof s.header=="string"?s.header:void 0,d;if(s.accessorFn?d=s.accessorFn:u&&(u.includes(".")?d=h=>{let p=h;for(const m of u.split(".")){var v;p=(v=p)==null?void 0:v[m],process.env.NODE_ENV!=="production"&&p===void 0&&console.warn(`"${m}" in deeply nested key "${u}" returned undefined.`)}return p}:d=h=>h[s.accessorKey]),!c)throw process.env.NODE_ENV!=="production"?new Error(s.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let g={id:`${String(c)}`,accessorFn:d,parent:r,depth:n,columnDef:s,columns:[],getFlatColumns:fe(()=>[!0],()=>{var h;return[g,...(h=g.columns)==null?void 0:h.flatMap(p=>p.getFlatColumns())]},pe(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:fe(()=>[e._getOrderColumnsFn()],h=>{var p;if((p=g.columns)!=null&&p.length){let v=g.columns.flatMap(m=>m.getLeafColumns());return h(v)}return[g]},pe(e.options,"debugColumns","column.getLeafColumns"))};for(const h of e._features)h.createColumn==null||h.createColumn(g,e);return g}const ze="debugHeaders";function As(e,t,n){var r;let i={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const a=[],s=u=>{u.subHeaders&&u.subHeaders.length&&u.subHeaders.map(s),a.push(u)};return s(i),a},getContext:()=>({table:e,header:i,column:t})};return e._features.forEach(a=>{a.createHeader==null||a.createHeader(i,e)}),i}const Vp={createTable:e=>{e.getHeaderGroups=fe(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>{var i,a;const s=(i=r==null?void 0:r.map(g=>n.find(h=>h.id===g)).filter(Boolean))!=null?i:[],u=(a=o==null?void 0:o.map(g=>n.find(h=>h.id===g)).filter(Boolean))!=null?a:[],c=n.filter(g=>!(r!=null&&r.includes(g.id))&&!(o!=null&&o.includes(g.id)));return Or(t,[...s,...c,...u],e)},pe(e.options,ze,"getHeaderGroups")),e.getCenterHeaderGroups=fe(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>(n=n.filter(i=>!(r!=null&&r.includes(i.id))&&!(o!=null&&o.includes(i.id))),Or(t,n,e,"center")),pe(e.options,ze,"getCenterHeaderGroups")),e.getLeftHeaderGroups=fe(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var o;const i=(o=r==null?void 0:r.map(a=>n.find(s=>s.id===a)).filter(Boolean))!=null?o:[];return Or(t,i,e,"left")},pe(e.options,ze,"getLeftHeaderGroups")),e.getRightHeaderGroups=fe(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var o;const i=(o=r==null?void 0:r.map(a=>n.find(s=>s.id===a)).filter(Boolean))!=null?o:[];return Or(t,i,e,"right")},pe(e.options,ze,"getRightHeaderGroups")),e.getFooterGroups=fe(()=>[e.getHeaderGroups()],t=>[...t].reverse(),pe(e.options,ze,"getFooterGroups")),e.getLeftFooterGroups=fe(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),pe(e.options,ze,"getLeftFooterGroups")),e.getCenterFooterGroups=fe(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),pe(e.options,ze,"getCenterFooterGroups")),e.getRightFooterGroups=fe(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),pe(e.options,ze,"getRightFooterGroups")),e.getFlatHeaders=fe(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),pe(e.options,ze,"getFlatHeaders")),e.getLeftFlatHeaders=fe(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),pe(e.options,ze,"getLeftFlatHeaders")),e.getCenterFlatHeaders=fe(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),pe(e.options,ze,"getCenterFlatHeaders")),e.getRightFlatHeaders=fe(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),pe(e.options,ze,"getRightFlatHeaders")),e.getCenterLeafHeaders=fe(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),pe(e.options,ze,"getCenterLeafHeaders")),e.getLeftLeafHeaders=fe(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),pe(e.options,ze,"getLeftLeafHeaders")),e.getRightLeafHeaders=fe(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),pe(e.options,ze,"getRightLeafHeaders")),e.getLeafHeaders=fe(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var o,i,a,s,u,c;return[...(o=(i=t[0])==null?void 0:i.headers)!=null?o:[],...(a=(s=n[0])==null?void 0:s.headers)!=null?a:[],...(u=(c=r[0])==null?void 0:c.headers)!=null?u:[]].map(d=>d.getLeafHeaders()).flat()},pe(e.options,ze,"getLeafHeaders"))}};function Or(e,t,n,r){var o,i;let a=0;const s=function(h,p){p===void 0&&(p=1),a=Math.max(a,p),h.filter(v=>v.getIsVisible()).forEach(v=>{var m;(m=v.columns)!=null&&m.length&&s(v.columns,p+1)},0)};s(e);let u=[];const c=(h,p)=>{const v={depth:p,id:[r,`${p}`].filter(Boolean).join("_"),headers:[]},m=[];h.forEach(y=>{const w=[...m].reverse()[0],b=y.column.depth===v.depth;let S,E=!1;if(b&&y.column.parent?S=y.column.parent:(S=y.column,E=!0),w&&(w==null?void 0:w.column)===S)w.subHeaders.push(y);else{const x=As(n,S,{id:[r,p,S.id,y==null?void 0:y.id].filter(Boolean).join("_"),isPlaceholder:E,placeholderId:E?`${m.filter(O=>O.column===S).length}`:void 0,depth:p,index:m.length});x.subHeaders.push(y),m.push(x)}v.headers.push(y),y.headerGroup=v}),u.push(v),p>0&&c(m,p-1)},d=t.map((h,p)=>As(n,h,{depth:a,index:p}));c(d,a-1),u.reverse();const g=h=>h.filter(v=>v.column.getIsVisible()).map(v=>{let m=0,y=0,w=[0];v.subHeaders&&v.subHeaders.length?(w=[],g(v.subHeaders).forEach(S=>{let{colSpan:E,rowSpan:x}=S;m+=E,w.push(x)})):m=1;const b=Math.min(...w);return y=y+b,v.colSpan=m,v.rowSpan=y,{colSpan:m,rowSpan:y}});return g((o=(i=u[0])==null?void 0:i.headers)!=null?o:[]),u}const Qo=(e,t,n,r,o,i,a)=>{let s={id:t,index:r,original:n,depth:o,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:u=>{if(s._valuesCache.hasOwnProperty(u))return s._valuesCache[u];const c=e.getColumn(u);if(c!=null&&c.accessorFn)return s._valuesCache[u]=c.accessorFn(s.original,r),s._valuesCache[u]},getUniqueValues:u=>{if(s._uniqueValuesCache.hasOwnProperty(u))return s._uniqueValuesCache[u];const c=e.getColumn(u);if(c!=null&&c.accessorFn)return c.columnDef.getUniqueValues?(s._uniqueValuesCache[u]=c.columnDef.getUniqueValues(s.original,r),s._uniqueValuesCache[u]):(s._uniqueValuesCache[u]=[s.getValue(u)],s._uniqueValuesCache[u])},renderValue:u=>{var c;return(c=s.getValue(u))!=null?c:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>Ip(s.subRows,u=>u.subRows),getParentRow:()=>s.parentId?e.getRow(s.parentId,!0):void 0,getParentRows:()=>{let u=[],c=s;for(;;){const d=c.getParentRow();if(!d)break;u.push(d),c=d}return u.reverse()},getAllCells:fe(()=>[e.getAllLeafColumns()],u=>u.map(c=>Lp(e,s,c,c.id)),pe(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:fe(()=>[s.getAllCells()],u=>u.reduce((c,d)=>(c[d.column.id]=d,c),{}),pe(e.options,"debugRows","getAllCellsByColumnId"))};for(let u=0;u<e._features.length;u++){const c=e._features[u];c==null||c.createRow==null||c.createRow(s,e)}return s},jp={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},Ps=(e,t,n)=>{var r,o;const i=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((o=e.getValue(t))==null||(o=o.toString())==null||(o=o.toLowerCase())==null)&&o.includes(i))};Ps.autoRemove=e=>ft(e);const Ns=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};Ns.autoRemove=e=>ft(e);const Os=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===(n==null?void 0:n.toLowerCase())};Os.autoRemove=e=>ft(e);const Fs=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};Fs.autoRemove=e=>ft(e)||!(e!=null&&e.length);const ks=(e,t,n)=>!n.some(r=>{var o;return!((o=e.getValue(t))!=null&&o.includes(r))});ks.autoRemove=e=>ft(e)||!(e!=null&&e.length);const Ds=(e,t,n)=>n.some(r=>{var o;return(o=e.getValue(t))==null?void 0:o.includes(r)});Ds.autoRemove=e=>ft(e)||!(e!=null&&e.length);const Ms=(e,t,n)=>e.getValue(t)===n;Ms.autoRemove=e=>ft(e);const $s=(e,t,n)=>e.getValue(t)==n;$s.autoRemove=e=>ft(e);const ei=(e,t,n)=>{let[r,o]=n;const i=e.getValue(t);return i>=r&&i<=o};ei.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,o=typeof n!="number"?parseFloat(n):n,i=t===null||Number.isNaN(r)?-1/0:r,a=n===null||Number.isNaN(o)?1/0:o;if(i>a){const s=i;i=a,a=s}return[i,a]},ei.autoRemove=e=>ft(e)||ft(e[0])&&ft(e[1]);const It={includesString:Ps,includesStringSensitive:Ns,equalsString:Os,arrIncludes:Fs,arrIncludesAll:ks,arrIncludesSome:Ds,equals:Ms,weakEquals:$s,inNumberRange:ei};function ft(e){return e==null||e===""}const zp={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Ze("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);return typeof r=="string"?It.includesString:typeof r=="number"?It.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?It.equals:Array.isArray(r)?It.arrIncludes:It.weakEquals},e.getFilterFn=()=>{var n,r;return Nr(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:It[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,o;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((o=t.options.enableFilters)!=null?o:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const o=e.getFilterFn(),i=r==null?void 0:r.find(d=>d.id===e.id),a=qt(n,i?i.value:void 0);if(Is(o,a,e)){var s;return(s=r==null?void 0:r.filter(d=>d.id!==e.id))!=null?s:[]}const u={id:e.id,value:a};if(i){var c;return(c=r==null?void 0:r.map(d=>d.id===e.id?u:d))!=null?c:[]}return r!=null&&r.length?[...r,u]:[u]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=o=>{var i;return(i=qt(t,o))==null?void 0:i.filter(a=>{const s=n.find(u=>u.id===a.id);if(s){const u=s.getFilterFn();if(Is(u,a.value,s))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function Is(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const ti={sum:(e,t,n)=>n.reduce((r,o)=>{const i=o.getValue(e);return r+(typeof i=="number"?i:0)},0),min:(e,t,n)=>{let r;return n.forEach(o=>{const i=o.getValue(e);i!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}),r},max:(e,t,n)=>{let r;return n.forEach(o=>{const i=o.getValue(e);i!=null&&(r<i||r===void 0&&i>=i)&&(r=i)}),r},extent:(e,t,n)=>{let r,o;return n.forEach(i=>{const a=i.getValue(e);a!=null&&(r===void 0?a>=a&&(r=o=a):(r>a&&(r=a),o<a&&(o=a)))}),[r,o]},mean:(e,t)=>{let n=0,r=0;if(t.forEach(o=>{let i=o.getValue(e);i!=null&&(i=+i)>=i&&(++n,r+=i)}),n)return r/n},median:(e,t)=>{if(!t.length)return;const n=t.map(i=>i.getValue(e));if(!$p(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),o=n.sort((i,a)=>i-a);return n.length%2!==0?o[r]:(o[r-1]+o[r])/2},unique:(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),uniqueCount:(e,t)=>new Set(t.map(n=>n.getValue(e))).size,count:(e,t)=>t.length},Bp={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:Ze("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);if(typeof r=="number")return ti.sum;if(Object.prototype.toString.call(r)==="[object Date]")return ti.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return Nr(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:ti[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var o;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((o=n.subRows)!=null&&o.length)}}};function Hp(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(i=>!t.includes(i.id));return n==="remove"?r:[...t.map(i=>e.find(a=>a.id===i)).filter(Boolean),...r]}const Up={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Ze("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=fe(n=>[Jn(t,n)],n=>n.findIndex(r=>r.id===e.id),pe(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var r;return((r=Jn(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const o=Jn(t,n);return((r=o[o.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=fe(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>o=>{let i=[];if(!(t!=null&&t.length))i=o;else{const a=[...t],s=[...o];for(;s.length&&a.length;){const u=a.shift(),c=s.findIndex(d=>d.id===u);c>-1&&i.push(s.splice(c,1)[0])}i=[...i,...s]}return Hp(i,n,r)},pe(e.options,"debugTable","_getOrderColumnsFn"))}},ni=()=>({left:[],right:[]}),Wp={getInitialState:e=>({columnPinning:ni(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Ze("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(o=>o.id).filter(Boolean);t.setColumnPinning(o=>{var i,a;if(n==="right"){var s,u;return{left:((s=o==null?void 0:o.left)!=null?s:[]).filter(g=>!(r!=null&&r.includes(g))),right:[...((u=o==null?void 0:o.right)!=null?u:[]).filter(g=>!(r!=null&&r.includes(g))),...r]}}if(n==="left"){var c,d;return{left:[...((c=o==null?void 0:o.left)!=null?c:[]).filter(g=>!(r!=null&&r.includes(g))),...r],right:((d=o==null?void 0:o.right)!=null?d:[]).filter(g=>!(r!=null&&r.includes(g)))}}return{left:((i=o==null?void 0:o.left)!=null?i:[]).filter(g=>!(r!=null&&r.includes(g))),right:((a=o==null?void 0:o.right)!=null?a:[]).filter(g=>!(r!=null&&r.includes(g)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var o,i,a;return((o=r.columnDef.enablePinning)!=null?o:!0)&&((i=(a=t.options.enableColumnPinning)!=null?a:t.options.enablePinning)!=null?i:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(s=>s.id),{left:r,right:o}=t.getState().columnPinning,i=n.some(s=>r==null?void 0:r.includes(s)),a=n.some(s=>o==null?void 0:o.includes(s));return i?"left":a?"right":!1},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();return o?(n=(r=t.getState().columnPinning)==null||(r=r[o])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=fe(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,o)=>{const i=[...r??[],...o??[]];return n.filter(a=>!i.includes(a.column.id))},pe(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=fe(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(i=>n.find(a=>a.column.id===i)).filter(Boolean).map(i=>({...i,position:"left"})),pe(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=fe(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(i=>n.find(a=>a.column.id===i)).filter(Boolean).map(i=>({...i,position:"right"})),pe(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?ni():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:ni())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var o,i;return!!((o=r.left)!=null&&o.length||(i=r.right)!=null&&i.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=fe(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),pe(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=fe(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),pe(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=fe(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const o=[...n??[],...r??[]];return t.filter(i=>!o.includes(i.id))},pe(e.options,"debugColumns","getCenterLeafColumns"))}},Fr={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},ri=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),qp={getDefaultColumnDef:()=>Fr,getInitialState:e=>({columnSizing:{},columnSizingInfo:ri(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Ze("columnSizing",e),onColumnSizingInfoChange:Ze("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,o;const i=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:Fr.minSize,(r=i??e.columnDef.size)!=null?r:Fr.size),(o=e.columnDef.maxSize)!=null?o:Fr.maxSize)},e.getStart=fe(n=>[n,Jn(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((o,i)=>o+i.getSize(),0),pe(t.options,"debugColumns","getStart")),e.getAfter=fe(n=>[n,Jn(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((o,i)=>o+i.getSize(),0),pe(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...o}=n;return o})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=o=>{if(o.subHeaders.length)o.subHeaders.forEach(r);else{var i;n+=(i=o.column.getSize())!=null?i:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),o=r==null?void 0:r.getCanResize();return i=>{if(!r||!o||(i.persist==null||i.persist(),oi(i)&&i.touches&&i.touches.length>1))return;const a=e.getSize(),s=e?e.getLeafHeaders().map(w=>[w.column.id,w.column.getSize()]):[[r.id,r.getSize()]],u=oi(i)?Math.round(i.touches[0].clientX):i.clientX,c={},d=(w,b)=>{typeof b=="number"&&(t.setColumnSizingInfo(S=>{var E,x;const O=t.options.columnResizeDirection==="rtl"?-1:1,M=(b-((E=S==null?void 0:S.startOffset)!=null?E:0))*O,I=Math.max(M/((x=S==null?void 0:S.startSize)!=null?x:0),-.999999);return S.columnSizingStart.forEach(H=>{let[k,G]=H;c[k]=Math.round(Math.max(G+G*I,0)*100)/100}),{...S,deltaOffset:M,deltaPercentage:I}}),(t.options.columnResizeMode==="onChange"||w==="end")&&t.setColumnSizing(S=>({...S,...c})))},g=w=>d("move",w),h=w=>{d("end",w),t.setColumnSizingInfo(b=>({...b,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},p=n||typeof document<"u"?document:null,v={moveHandler:w=>g(w.clientX),upHandler:w=>{p==null||p.removeEventListener("mousemove",v.moveHandler),p==null||p.removeEventListener("mouseup",v.upHandler),h(w.clientX)}},m={moveHandler:w=>(w.cancelable&&(w.preventDefault(),w.stopPropagation()),g(w.touches[0].clientX),!1),upHandler:w=>{var b;p==null||p.removeEventListener("touchmove",m.moveHandler),p==null||p.removeEventListener("touchend",m.upHandler),w.cancelable&&(w.preventDefault(),w.stopPropagation()),h((b=w.touches[0])==null?void 0:b.clientX)}},y=Gp()?{passive:!1}:!1;oi(i)?(p==null||p.addEventListener("touchmove",m.moveHandler,y),p==null||p.addEventListener("touchend",m.upHandler,y)):(p==null||p.addEventListener("mousemove",v.moveHandler,y),p==null||p.addEventListener("mouseup",v.upHandler,y)),t.setColumnSizingInfo(w=>({...w,startOffset:u,startSize:a,deltaOffset:0,deltaPercentage:0,columnSizingStart:s,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?ri():(n=e.initialState.columnSizingInfo)!=null?n:ri())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0}}};let kr=null;function Gp(){if(typeof kr=="boolean")return kr;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return kr=e,kr}function oi(e){return e.type==="touchstart"}const Kp={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Ze("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const o=e.columns;return(n=o.length?o.some(i=>i.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=fe(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),pe(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=fe(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,o)=>[...n,...r,...o],pe(t.options,"debugRows","getVisibleCells"))},createTable:e=>{const t=(n,r)=>fe(()=>[r(),r().filter(o=>o.getIsVisible()).map(o=>o.id).join("_")],o=>o.filter(i=>i.getIsVisible==null?void 0:i.getIsVisible()),pe(e.options,"debugColumns",n));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((o,i)=>({...o,[i.id]:n||!(i.getCanHide!=null&&i.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function Jn(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const Yp={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},Xp={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Ze("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,o,i;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((o=t.options.enableFilters)!=null?o:!0)&&((i=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?i:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>It.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return Nr(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:It[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},Jp={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Ze("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var o,i;e.setExpanded(r?{}:(o=(i=e.initialState)==null?void 0:i.expanded)!=null?o:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(o=>!o.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(i=>{const a=i.split(".");r=Math.max(r,a.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var o;const i=r===!0?!0:!!(r!=null&&r[e.id]);let a={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(s=>{a[s]=!0}):a=r,n=(o=n)!=null?o:!i,!i&&n)return{...a,[e.id]:!0};if(i&&!n){const{[e.id]:s,...u}=a;return u}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r!=null&&r[e.id])},e.getCanExpand=()=>{var n,r,o;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((o=e.subRows)!=null&&o.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},ii=0,ai=10,si=()=>({pageIndex:ii,pageSize:ai}),Zp={getInitialState:e=>({...e,pagination:{...si(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:Ze("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const o=i=>qt(r,i);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(o)},e.resetPagination=r=>{var o;e.setPagination(r?si():(o=e.initialState.pagination)!=null?o:si())},e.setPageIndex=r=>{e.setPagination(o=>{let i=qt(r,o.pageIndex);const a=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return i=Math.max(0,Math.min(i,a)),{...o,pageIndex:i}})},e.resetPageIndex=r=>{var o,i;e.setPageIndex(r?ii:(o=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageIndex)!=null?o:ii)},e.resetPageSize=r=>{var o,i;e.setPageSize(r?ai:(o=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageSize)!=null?o:ai)},e.setPageSize=r=>{e.setPagination(o=>{const i=Math.max(1,qt(r,o.pageSize)),a=o.pageSize*o.pageIndex,s=Math.floor(a/i);return{...o,pageIndex:s,pageSize:i}})},e.setPageCount=r=>e.setPagination(o=>{var i;let a=qt(r,(i=e.options.pageCount)!=null?i:-1);return typeof a=="number"&&(a=Math.max(-1,a)),{...o,pageCount:a}}),e.getPageOptions=fe(()=>[e.getPageCount()],r=>{let o=[];return r&&r>0&&(o=[...new Array(r)].fill(null).map((i,a)=>a)),o},pe(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,o=e.getPageCount();return o===-1?!0:o===0?!1:r<o-1},e.previousPage=()=>e.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},li=()=>({top:[],bottom:[]}),Qp={getInitialState:e=>({rowPinning:li(),...e}),getDefaultOptions:e=>({onRowPinningChange:Ze("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,o)=>{const i=r?e.getLeafRows().map(u=>{let{id:c}=u;return c}):[],a=o?e.getParentRows().map(u=>{let{id:c}=u;return c}):[],s=new Set([...a,e.id,...i]);t.setRowPinning(u=>{var c,d;if(n==="bottom"){var g,h;return{top:((g=u==null?void 0:u.top)!=null?g:[]).filter(m=>!(s!=null&&s.has(m))),bottom:[...((h=u==null?void 0:u.bottom)!=null?h:[]).filter(m=>!(s!=null&&s.has(m))),...Array.from(s)]}}if(n==="top"){var p,v;return{top:[...((p=u==null?void 0:u.top)!=null?p:[]).filter(m=>!(s!=null&&s.has(m))),...Array.from(s)],bottom:((v=u==null?void 0:u.bottom)!=null?v:[]).filter(m=>!(s!=null&&s.has(m)))}}return{top:((c=u==null?void 0:u.top)!=null?c:[]).filter(m=>!(s!=null&&s.has(m))),bottom:((d=u==null?void 0:u.bottom)!=null?d:[]).filter(m=>!(s!=null&&s.has(m)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:o}=t.options;return typeof r=="function"?r(e):(n=r??o)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:o}=t.getState().rowPinning,i=n.some(s=>r==null?void 0:r.includes(s)),a=n.some(s=>o==null?void 0:o.includes(s));return i?"top":a?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();if(!o)return-1;const i=(n=o==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(a=>{let{id:s}=a;return s});return(r=i==null?void 0:i.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?li():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:li())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var o,i;return!!((o=r.top)!=null&&o.length||(i=r.bottom)!=null&&i.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var o;return((o=e.options.keepPinnedRows)==null||o?(n??[]).map(a=>{const s=e.getRow(a,!0);return s.getIsAllParentsExpanded()?s:null}):(n??[]).map(a=>t.find(s=>s.id===a))).filter(Boolean).map(a=>({...a,position:r}))},e.getTopRows=fe(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),pe(e.options,"debugRows","getTopRows")),e.getBottomRows=fe(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),pe(e.options,"debugRows","getBottomRows")),e.getCenterRows=fe(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const o=new Set([...n??[],...r??[]]);return t.filter(i=>!o.has(i.id))},pe(e.options,"debugRows","getCenterRows"))}},eg={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Ze("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},o=e.getPreGroupedRowModel().flatRows;return t?o.forEach(i=>{i.getCanSelect()&&(r[i.id]=!0)}):o.forEach(i=>{delete r[i.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),o={...n};return e.getRowModel().rows.forEach(i=>{ci(o,i.id,r,!0,e)}),o}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=fe(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?ui(e,n):{rows:[],flatRows:[],rowsById:{}},pe(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=fe(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?ui(e,n):{rows:[],flatRows:[],rowsById:{}},pe(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=fe(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?ui(e,n):{rows:[],flatRows:[],rowsById:{}},pe(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(o=>o.getCanSelect()&&!n[o.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(o=>o.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(o=>!n[o.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const o=e.getIsSelected();t.setRowSelection(i=>{var a;if(n=typeof n<"u"?n:!o,e.getCanSelect()&&o===n)return i;const s={...i};return ci(s,e.id,n,(a=r==null?void 0:r.selectChildren)!=null?a:!0,t),s})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return di(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return fi(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return fi(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var o;n&&e.toggleSelected((o=r.target)==null?void 0:o.checked)}}}},ci=(e,t,n,r,o)=>{var i;const a=o.getRow(t,!0);n?(a.getCanMultiSelect()||Object.keys(e).forEach(s=>delete e[s]),a.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(i=a.subRows)!=null&&i.length&&a.getCanSelectSubRows()&&a.subRows.forEach(s=>ci(e,s.id,n,r,o))};function ui(e,t){const n=e.getState().rowSelection,r=[],o={},i=function(a,s){return a.map(u=>{var c;const d=di(u,n);if(d&&(r.push(u),o[u.id]=u),(c=u.subRows)!=null&&c.length&&(u={...u,subRows:i(u.subRows)}),d)return u}).filter(Boolean)};return{rows:i(t.rows),flatRows:r,rowsById:o}}function di(e,t){var n;return(n=t[e.id])!=null?n:!1}function fi(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let o=!0,i=!1;return e.subRows.forEach(a=>{if(!(i&&!o)&&(a.getCanSelect()&&(di(a,t)?i=!0:o=!1),a.subRows&&a.subRows.length)){const s=fi(a,t);s==="all"?i=!0:(s==="some"&&(i=!0),o=!1)}}),o?"all":i?"some":!1}const pi=/([0-9]+)/gm,tg=(e,t,n)=>Ls(Gt(e.getValue(n)).toLowerCase(),Gt(t.getValue(n)).toLowerCase()),ng=(e,t,n)=>Ls(Gt(e.getValue(n)),Gt(t.getValue(n))),rg=(e,t,n)=>gi(Gt(e.getValue(n)).toLowerCase(),Gt(t.getValue(n)).toLowerCase()),og=(e,t,n)=>gi(Gt(e.getValue(n)),Gt(t.getValue(n))),ig=(e,t,n)=>{const r=e.getValue(n),o=t.getValue(n);return r>o?1:r<o?-1:0},ag=(e,t,n)=>gi(e.getValue(n),t.getValue(n));function gi(e,t){return e===t?0:e>t?1:-1}function Gt(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function Ls(e,t){const n=e.split(pi).filter(Boolean),r=t.split(pi).filter(Boolean);for(;n.length&&r.length;){const o=n.shift(),i=r.shift(),a=parseInt(o,10),s=parseInt(i,10),u=[a,s].sort();if(isNaN(u[0])){if(o>i)return 1;if(i>o)return-1;continue}if(isNaN(u[1]))return isNaN(a)?-1:1;if(a>s)return 1;if(s>a)return-1}return n.length-r.length}const Zn={alphanumeric:tg,alphanumericCaseSensitive:ng,text:rg,textCaseSensitive:og,datetime:ig,basic:ag},sg=[Vp,Kp,Up,Wp,jp,zp,Yp,Xp,{getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Ze("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const o of n){const i=o==null?void 0:o.getValue(e.id);if(Object.prototype.toString.call(i)==="[object Date]")return Zn.datetime;if(typeof i=="string"&&(r=!0,i.split(pi).length>1))return Zn.alphanumeric}return r?Zn.text:Zn.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof(n==null?void 0:n.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return Nr(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:Zn[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const o=e.getNextSortingOrder(),i=typeof n<"u"&&n!==null;t.setSorting(a=>{const s=a==null?void 0:a.find(p=>p.id===e.id),u=a==null?void 0:a.findIndex(p=>p.id===e.id);let c=[],d,g=i?n:o==="desc";if(a!=null&&a.length&&e.getCanMultiSort()&&r?s?d="toggle":d="add":a!=null&&a.length&&u!==a.length-1?d="replace":s?d="toggle":d="replace",d==="toggle"&&(i||o||(d="remove")),d==="add"){var h;c=[...a,{id:e.id,desc:g}],c.splice(0,c.length-((h=t.options.maxMultiSortColCount)!=null?h:Number.MAX_SAFE_INTEGER))}else d==="toggle"?c=a.map(p=>p.id===e.id?{...p,desc:g}:p):d==="remove"?c=a.filter(p=>p.id!==e.id):c=[{id:e.id,desc:g}];return c})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,o;const i=e.getFirstSortDir(),a=e.getIsSorted();return a?a!==i&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(o=t.options.enableMultiRemove)!=null)||o)?!1:a==="desc"?"asc":"desc":i},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(o=>o.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},Bp,Jp,Zp,Qp,eg,qp];function lg(e){var t,n;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const r=[...sg,...(t=e._features)!=null?t:[]];let o={_features:r};const i=o._features.reduce((h,p)=>Object.assign(h,p.getDefaultOptions==null?void 0:p.getDefaultOptions(o)),{}),a=h=>o.options.mergeOptions?o.options.mergeOptions(i,h):{...i,...h};let u={...{},...(n=e.initialState)!=null?n:{}};o._features.forEach(h=>{var p;u=(p=h.getInitialState==null?void 0:h.getInitialState(u))!=null?p:u});const c=[];let d=!1;const g={_features:r,options:{...i,...e},initialState:u,_queue:h=>{c.push(h),d||(d=!0,Promise.resolve().then(()=>{for(;c.length;)c.shift()();d=!1}).catch(p=>setTimeout(()=>{throw p})))},reset:()=>{o.setState(o.initialState)},setOptions:h=>{const p=qt(h,o.options);o.options=a(p)},getState:()=>o.options.state,setState:h=>{o.options.onStateChange==null||o.options.onStateChange(h)},_getRowId:(h,p,v)=>{var m;return(m=o.options.getRowId==null?void 0:o.options.getRowId(h,p,v))!=null?m:`${v?[v.id,p].join("."):p}`},getCoreRowModel:()=>(o._getCoreRowModel||(o._getCoreRowModel=o.options.getCoreRowModel(o)),o._getCoreRowModel()),getRowModel:()=>o.getPaginationRowModel(),getRow:(h,p)=>{let v=(p?o.getPrePaginationRowModel():o.getRowModel()).rowsById[h];if(!v&&(v=o.getCoreRowModel().rowsById[h],!v))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${h}`):new Error;return v},_getDefaultColumnDef:fe(()=>[o.options.defaultColumn],h=>{var p;return h=(p=h)!=null?p:{},{header:v=>{const m=v.header.column.columnDef;return m.accessorKey?m.accessorKey:m.accessorFn?m.id:null},cell:v=>{var m,y;return(m=(y=v.renderValue())==null||y.toString==null?void 0:y.toString())!=null?m:null},...o._features.reduce((v,m)=>Object.assign(v,m.getDefaultColumnDef==null?void 0:m.getDefaultColumnDef()),{}),...h}},pe(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>o.options.columns,getAllColumns:fe(()=>[o._getColumnDefs()],h=>{const p=function(v,m,y){return y===void 0&&(y=0),v.map(w=>{const b=Rp(o,w,y,m),S=w;return b.columns=S.columns?p(S.columns,b,y+1):[],b})};return p(h)},pe(e,"debugColumns","getAllColumns")),getAllFlatColumns:fe(()=>[o.getAllColumns()],h=>h.flatMap(p=>p.getFlatColumns()),pe(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:fe(()=>[o.getAllFlatColumns()],h=>h.reduce((p,v)=>(p[v.id]=v,p),{}),pe(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:fe(()=>[o.getAllColumns(),o._getOrderColumnsFn()],(h,p)=>{let v=h.flatMap(m=>m.getLeafColumns());return p(v)},pe(e,"debugColumns","getAllLeafColumns")),getColumn:h=>{const p=o._getAllFlatColumnsById()[h];return process.env.NODE_ENV!=="production"&&!p&&console.error(`[Table] Column with id '${h}' does not exist.`),p}};Object.assign(o,g);for(let h=0;h<o._features.length;h++){const p=o._features[h];p==null||p.createTable==null||p.createTable(o)}return o}function Rs(){return e=>fe(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(o,i,a){i===void 0&&(i=0);const s=[];for(let c=0;c<o.length;c++){const d=Qo(e,e._getRowId(o[c],c,a),o[c],c,i,void 0,a==null?void 0:a.id);if(n.flatRows.push(d),n.rowsById[d.id]=d,s.push(d),e.options.getSubRows){var u;d.originalSubRows=e.options.getSubRows(o[c],c),(u=d.originalSubRows)!=null&&u.length&&(d.subRows=r(d.originalSubRows,i+1,d))}}return s};return n.rows=r(t),n},pe(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function cg(e,t,n){return n.options.filterFromLeafRows?ug(e,t,n):dg(e,t,n)}function ug(e,t,n){var r;const o=[],i={},a=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,s=function(u,c){c===void 0&&(c=0);const d=[];for(let h=0;h<u.length;h++){var g;let p=u[h];const v=Qo(n,p.id,p.original,p.index,p.depth,void 0,p.parentId);if(v.columnFilters=p.columnFilters,(g=p.subRows)!=null&&g.length&&c<a){if(v.subRows=s(p.subRows,c+1),p=v,t(p)&&!v.subRows.length){d.push(p),i[p.id]=p,o.push(p);continue}if(t(p)||v.subRows.length){d.push(p),i[p.id]=p,o.push(p);continue}}else p=v,t(p)&&(d.push(p),i[p.id]=p,o.push(p))}return d};return{rows:s(e),flatRows:o,rowsById:i}}function dg(e,t,n){var r;const o=[],i={},a=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,s=function(u,c){c===void 0&&(c=0);const d=[];for(let h=0;h<u.length;h++){let p=u[h];if(t(p)){var g;if((g=p.subRows)!=null&&g.length&&c<a){const m=Qo(n,p.id,p.original,p.index,p.depth,void 0,p.parentId);m.subRows=s(p.subRows,c+1),p=m}d.push(p),o.push(p),i[p.id]=p}}return d};return{rows:s(e),flatRows:o,rowsById:i}}function fg(){return e=>fe(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,n,r)=>{if(!t.rows.length||!(n!=null&&n.length)&&!r){for(let h=0;h<t.flatRows.length;h++)t.flatRows[h].columnFilters={},t.flatRows[h].columnFiltersMeta={};return t}const o=[],i=[];(n??[]).forEach(h=>{var p;const v=e.getColumn(h.id);if(!v)return;const m=v.getFilterFn();if(!m){process.env.NODE_ENV!=="production"&&console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${v.id}.`);return}o.push({id:h.id,filterFn:m,resolvedValue:(p=m.resolveFilterValue==null?void 0:m.resolveFilterValue(h.value))!=null?p:h.value})});const a=(n??[]).map(h=>h.id),s=e.getGlobalFilterFn(),u=e.getAllLeafColumns().filter(h=>h.getCanGlobalFilter());r&&s&&u.length&&(a.push("__global__"),u.forEach(h=>{var p;i.push({id:h.id,filterFn:s,resolvedValue:(p=s.resolveFilterValue==null?void 0:s.resolveFilterValue(r))!=null?p:r})}));let c,d;for(let h=0;h<t.flatRows.length;h++){const p=t.flatRows[h];if(p.columnFilters={},o.length)for(let v=0;v<o.length;v++){c=o[v];const m=c.id;p.columnFilters[m]=c.filterFn(p,m,c.resolvedValue,y=>{p.columnFiltersMeta[m]=y})}if(i.length){for(let v=0;v<i.length;v++){d=i[v];const m=d.id;if(d.filterFn(p,m,d.resolvedValue,y=>{p.columnFiltersMeta[m]=y})){p.columnFilters.__global__=!0;break}}p.columnFilters.__global__!==!0&&(p.columnFilters.__global__=!1)}}const g=h=>{for(let p=0;p<a.length;p++)if(h.columnFilters[a[p]]===!1)return!1;return!0};return cg(t.rows,g,e)},pe(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function pg(){return e=>fe(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const r=e.getState().sorting,o=[],i=r.filter(u=>{var c;return(c=e.getColumn(u.id))==null?void 0:c.getCanSort()}),a={};i.forEach(u=>{const c=e.getColumn(u.id);c&&(a[u.id]={sortUndefined:c.columnDef.sortUndefined,invertSorting:c.columnDef.invertSorting,sortingFn:c.getSortingFn()})});const s=u=>{const c=u.map(d=>({...d}));return c.sort((d,g)=>{for(let p=0;p<i.length;p+=1){var h;const v=i[p],m=a[v.id],y=m.sortUndefined,w=(h=v==null?void 0:v.desc)!=null?h:!1;let b=0;if(y){const S=d.getValue(v.id),E=g.getValue(v.id),x=S===void 0,O=E===void 0;if(x||O){if(y==="first")return x?-1:1;if(y==="last")return x?1:-1;b=x&&O?0:x?y:-y}}if(b===0&&(b=m.sortingFn(d,g,v.id)),b!==0)return w&&(b*=-1),m.invertSorting&&(b*=-1),b}return d.index-g.index}),c.forEach(d=>{var g;o.push(d),(g=d.subRows)!=null&&g.length&&(d.subRows=s(d.subRows))}),c};return{rows:s(n.rows),flatRows:o,rowsById:n.rowsById}},pe(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}/**
13
+ color: hsl(${Math.max(0,Math.min(120-120*m,120))}deg 100% 31%);`,n==null?void 0:n.key)}return o}}function pe(e,t,n,r){return{debug:()=>{var o;return(o=e==null?void 0:e.debugAll)!=null?o:e[t]},key:process.env.NODE_ENV==="development"&&n,onChange:r}}function Qp(e,t,n,r){const o=()=>{var a;return(a=i.getValue())!=null?a:e.options.renderFallbackValue},i={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:o,getContext:fe(()=>[e,n,t,i],(a,s,u,c)=>({table:a,column:s,row:u,cell:c,getValue:c.getValue,renderValue:c.renderValue}),pe(e.options,"debugCells","cell.getContext"))};return e._features.forEach(a=>{a.createCell==null||a.createCell(i,n,t,e)},{}),i}function eg(e,t,n,r){var o,i;const s={...e._getDefaultColumnDef(),...t},u=s.accessorKey;let c=(o=(i=s.id)!=null?i:u?typeof String.prototype.replaceAll=="function"?u.replaceAll(".","_"):u.replace(/\./g,"_"):void 0)!=null?o:typeof s.header=="string"?s.header:void 0,d;if(s.accessorFn?d=s.accessorFn:u&&(u.includes(".")?d=m=>{let f=m;for(const h of u.split(".")){var v;f=(v=f)==null?void 0:v[h],process.env.NODE_ENV!=="production"&&f===void 0&&console.warn(`"${h}" in deeply nested key "${u}" returned undefined.`)}return f}:d=m=>m[s.accessorKey]),!c)throw process.env.NODE_ENV!=="production"?new Error(s.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let g={id:`${String(c)}`,accessorFn:d,parent:r,depth:n,columnDef:s,columns:[],getFlatColumns:fe(()=>[!0],()=>{var m;return[g,...(m=g.columns)==null?void 0:m.flatMap(f=>f.getFlatColumns())]},pe(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:fe(()=>[e._getOrderColumnsFn()],m=>{var f;if((f=g.columns)!=null&&f.length){let v=g.columns.flatMap(h=>h.getLeafColumns());return m(v)}return[g]},pe(e.options,"debugColumns","column.getLeafColumns"))};for(const m of e._features)m.createColumn==null||m.createColumn(g,e);return g}const Be="debugHeaders";function Ms(e,t,n){var r;let i={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const a=[],s=u=>{u.subHeaders&&u.subHeaders.length&&u.subHeaders.map(s),a.push(u)};return s(i),a},getContext:()=>({table:e,header:i,column:t})};return e._features.forEach(a=>{a.createHeader==null||a.createHeader(i,e)}),i}const tg={createTable:e=>{e.getHeaderGroups=fe(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>{var i,a;const s=(i=r==null?void 0:r.map(g=>n.find(m=>m.id===g)).filter(Boolean))!=null?i:[],u=(a=o==null?void 0:o.map(g=>n.find(m=>m.id===g)).filter(Boolean))!=null?a:[],c=n.filter(g=>!(r!=null&&r.includes(g.id))&&!(o!=null&&o.includes(g.id)));return Ir(t,[...s,...c,...u],e)},pe(e.options,Be,"getHeaderGroups")),e.getCenterHeaderGroups=fe(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>(n=n.filter(i=>!(r!=null&&r.includes(i.id))&&!(o!=null&&o.includes(i.id))),Ir(t,n,e,"center")),pe(e.options,Be,"getCenterHeaderGroups")),e.getLeftHeaderGroups=fe(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var o;const i=(o=r==null?void 0:r.map(a=>n.find(s=>s.id===a)).filter(Boolean))!=null?o:[];return Ir(t,i,e,"left")},pe(e.options,Be,"getLeftHeaderGroups")),e.getRightHeaderGroups=fe(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var o;const i=(o=r==null?void 0:r.map(a=>n.find(s=>s.id===a)).filter(Boolean))!=null?o:[];return Ir(t,i,e,"right")},pe(e.options,Be,"getRightHeaderGroups")),e.getFooterGroups=fe(()=>[e.getHeaderGroups()],t=>[...t].reverse(),pe(e.options,Be,"getFooterGroups")),e.getLeftFooterGroups=fe(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),pe(e.options,Be,"getLeftFooterGroups")),e.getCenterFooterGroups=fe(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),pe(e.options,Be,"getCenterFooterGroups")),e.getRightFooterGroups=fe(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),pe(e.options,Be,"getRightFooterGroups")),e.getFlatHeaders=fe(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),pe(e.options,Be,"getFlatHeaders")),e.getLeftFlatHeaders=fe(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),pe(e.options,Be,"getLeftFlatHeaders")),e.getCenterFlatHeaders=fe(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),pe(e.options,Be,"getCenterFlatHeaders")),e.getRightFlatHeaders=fe(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),pe(e.options,Be,"getRightFlatHeaders")),e.getCenterLeafHeaders=fe(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),pe(e.options,Be,"getCenterLeafHeaders")),e.getLeftLeafHeaders=fe(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),pe(e.options,Be,"getLeftLeafHeaders")),e.getRightLeafHeaders=fe(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),pe(e.options,Be,"getRightLeafHeaders")),e.getLeafHeaders=fe(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var o,i,a,s,u,c;return[...(o=(i=t[0])==null?void 0:i.headers)!=null?o:[],...(a=(s=n[0])==null?void 0:s.headers)!=null?a:[],...(u=(c=r[0])==null?void 0:c.headers)!=null?u:[]].map(d=>d.getLeafHeaders()).flat()},pe(e.options,Be,"getLeafHeaders"))}};function Ir(e,t,n,r){var o,i;let a=0;const s=function(m,f){f===void 0&&(f=1),a=Math.max(a,f),m.filter(v=>v.getIsVisible()).forEach(v=>{var h;(h=v.columns)!=null&&h.length&&s(v.columns,f+1)},0)};s(e);let u=[];const c=(m,f)=>{const v={depth:f,id:[r,`${f}`].filter(Boolean).join("_"),headers:[]},h=[];m.forEach(y=>{const b=[...h].reverse()[0],w=y.column.depth===v.depth;let C,E=!1;if(w&&y.column.parent?C=y.column.parent:(C=y.column,E=!0),b&&(b==null?void 0:b.column)===C)b.subHeaders.push(y);else{const x=Ms(n,C,{id:[r,f,C.id,y==null?void 0:y.id].filter(Boolean).join("_"),isPlaceholder:E,placeholderId:E?`${h.filter(O=>O.column===C).length}`:void 0,depth:f,index:h.length});x.subHeaders.push(y),h.push(x)}v.headers.push(y),y.headerGroup=v}),u.push(v),f>0&&c(h,f-1)},d=t.map((m,f)=>Ms(n,m,{depth:a,index:f}));c(d,a-1),u.reverse();const g=m=>m.filter(v=>v.column.getIsVisible()).map(v=>{let h=0,y=0,b=[0];v.subHeaders&&v.subHeaders.length?(b=[],g(v.subHeaders).forEach(C=>{let{colSpan:E,rowSpan:x}=C;h+=E,b.push(x)})):h=1;const w=Math.min(...b);return y=y+w,v.colSpan=h,v.rowSpan=y,{colSpan:h,rowSpan:y}});return g((o=(i=u[0])==null?void 0:i.headers)!=null?o:[]),u}const ii=(e,t,n,r,o,i,a)=>{let s={id:t,index:r,original:n,depth:o,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:u=>{if(s._valuesCache.hasOwnProperty(u))return s._valuesCache[u];const c=e.getColumn(u);if(c!=null&&c.accessorFn)return s._valuesCache[u]=c.accessorFn(s.original,r),s._valuesCache[u]},getUniqueValues:u=>{if(s._uniqueValuesCache.hasOwnProperty(u))return s._uniqueValuesCache[u];const c=e.getColumn(u);if(c!=null&&c.accessorFn)return c.columnDef.getUniqueValues?(s._uniqueValuesCache[u]=c.columnDef.getUniqueValues(s.original,r),s._uniqueValuesCache[u]):(s._uniqueValuesCache[u]=[s.getValue(u)],s._uniqueValuesCache[u])},renderValue:u=>{var c;return(c=s.getValue(u))!=null?c:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>Zp(s.subRows,u=>u.subRows),getParentRow:()=>s.parentId?e.getRow(s.parentId,!0):void 0,getParentRows:()=>{let u=[],c=s;for(;;){const d=c.getParentRow();if(!d)break;u.push(d),c=d}return u.reverse()},getAllCells:fe(()=>[e.getAllLeafColumns()],u=>u.map(c=>Qp(e,s,c,c.id)),pe(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:fe(()=>[s.getAllCells()],u=>u.reduce((c,d)=>(c[d.column.id]=d,c),{}),pe(e.options,"debugRows","getAllCellsByColumnId"))};for(let u=0;u<e._features.length;u++){const c=e._features[u];c==null||c.createRow==null||c.createRow(s,e)}return s},ng={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},$s=(e,t,n)=>{var r,o;const i=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((o=e.getValue(t))==null||(o=o.toString())==null||(o=o.toLowerCase())==null)&&o.includes(i))};$s.autoRemove=e=>pt(e);const Ls=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};Ls.autoRemove=e=>pt(e);const Rs=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===(n==null?void 0:n.toLowerCase())};Rs.autoRemove=e=>pt(e);const Vs=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};Vs.autoRemove=e=>pt(e)||!(e!=null&&e.length);const js=(e,t,n)=>!n.some(r=>{var o;return!((o=e.getValue(t))!=null&&o.includes(r))});js.autoRemove=e=>pt(e)||!(e!=null&&e.length);const zs=(e,t,n)=>n.some(r=>{var o;return(o=e.getValue(t))==null?void 0:o.includes(r)});zs.autoRemove=e=>pt(e)||!(e!=null&&e.length);const Bs=(e,t,n)=>e.getValue(t)===n;Bs.autoRemove=e=>pt(e);const Hs=(e,t,n)=>e.getValue(t)==n;Hs.autoRemove=e=>pt(e);const ai=(e,t,n)=>{let[r,o]=n;const i=e.getValue(t);return i>=r&&i<=o};ai.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,o=typeof n!="number"?parseFloat(n):n,i=t===null||Number.isNaN(r)?-1/0:r,a=n===null||Number.isNaN(o)?1/0:o;if(i>a){const s=i;i=a,a=s}return[i,a]},ai.autoRemove=e=>pt(e)||pt(e[0])&&pt(e[1]);const Rt={includesString:$s,includesStringSensitive:Ls,equalsString:Rs,arrIncludes:Vs,arrIncludesAll:js,arrIncludesSome:zs,equals:Bs,weakEquals:Hs,inNumberRange:ai};function pt(e){return e==null||e===""}const rg={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:tt("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);return typeof r=="string"?Rt.includesString:typeof r=="number"?Rt.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Rt.equals:Array.isArray(r)?Rt.arrIncludes:Rt.weakEquals},e.getFilterFn=()=>{var n,r;return Dr(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:Rt[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,o;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((o=t.options.enableFilters)!=null?o:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const o=e.getFilterFn(),i=r==null?void 0:r.find(d=>d.id===e.id),a=Kt(n,i?i.value:void 0);if(Us(o,a,e)){var s;return(s=r==null?void 0:r.filter(d=>d.id!==e.id))!=null?s:[]}const u={id:e.id,value:a};if(i){var c;return(c=r==null?void 0:r.map(d=>d.id===e.id?u:d))!=null?c:[]}return r!=null&&r.length?[...r,u]:[u]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=o=>{var i;return(i=Kt(t,o))==null?void 0:i.filter(a=>{const s=n.find(u=>u.id===a.id);if(s){const u=s.getFilterFn();if(Us(u,a.value,s))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function Us(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const si={sum:(e,t,n)=>n.reduce((r,o)=>{const i=o.getValue(e);return r+(typeof i=="number"?i:0)},0),min:(e,t,n)=>{let r;return n.forEach(o=>{const i=o.getValue(e);i!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}),r},max:(e,t,n)=>{let r;return n.forEach(o=>{const i=o.getValue(e);i!=null&&(r<i||r===void 0&&i>=i)&&(r=i)}),r},extent:(e,t,n)=>{let r,o;return n.forEach(i=>{const a=i.getValue(e);a!=null&&(r===void 0?a>=a&&(r=o=a):(r>a&&(r=a),o<a&&(o=a)))}),[r,o]},mean:(e,t)=>{let n=0,r=0;if(t.forEach(o=>{let i=o.getValue(e);i!=null&&(i=+i)>=i&&(++n,r+=i)}),n)return r/n},median:(e,t)=>{if(!t.length)return;const n=t.map(i=>i.getValue(e));if(!Jp(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),o=n.sort((i,a)=>i-a);return n.length%2!==0?o[r]:(o[r-1]+o[r])/2},unique:(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),uniqueCount:(e,t)=>new Set(t.map(n=>n.getValue(e))).size,count:(e,t)=>t.length},og={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:tt("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);if(typeof r=="number")return si.sum;if(Object.prototype.toString.call(r)==="[object Date]")return si.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return Dr(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:si[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var o;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((o=n.subRows)!=null&&o.length)}}};function ig(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(i=>!t.includes(i.id));return n==="remove"?r:[...t.map(i=>e.find(a=>a.id===i)).filter(Boolean),...r]}const ag={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:tt("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=fe(n=>[Qn(t,n)],n=>n.findIndex(r=>r.id===e.id),pe(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var r;return((r=Qn(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const o=Qn(t,n);return((r=o[o.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=fe(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>o=>{let i=[];if(!(t!=null&&t.length))i=o;else{const a=[...t],s=[...o];for(;s.length&&a.length;){const u=a.shift(),c=s.findIndex(d=>d.id===u);c>-1&&i.push(s.splice(c,1)[0])}i=[...i,...s]}return ig(i,n,r)},pe(e.options,"debugTable","_getOrderColumnsFn"))}},li=()=>({left:[],right:[]}),sg={getInitialState:e=>({columnPinning:li(),...e}),getDefaultOptions:e=>({onColumnPinningChange:tt("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(o=>o.id).filter(Boolean);t.setColumnPinning(o=>{var i,a;if(n==="right"){var s,u;return{left:((s=o==null?void 0:o.left)!=null?s:[]).filter(g=>!(r!=null&&r.includes(g))),right:[...((u=o==null?void 0:o.right)!=null?u:[]).filter(g=>!(r!=null&&r.includes(g))),...r]}}if(n==="left"){var c,d;return{left:[...((c=o==null?void 0:o.left)!=null?c:[]).filter(g=>!(r!=null&&r.includes(g))),...r],right:((d=o==null?void 0:o.right)!=null?d:[]).filter(g=>!(r!=null&&r.includes(g)))}}return{left:((i=o==null?void 0:o.left)!=null?i:[]).filter(g=>!(r!=null&&r.includes(g))),right:((a=o==null?void 0:o.right)!=null?a:[]).filter(g=>!(r!=null&&r.includes(g)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var o,i,a;return((o=r.columnDef.enablePinning)!=null?o:!0)&&((i=(a=t.options.enableColumnPinning)!=null?a:t.options.enablePinning)!=null?i:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(s=>s.id),{left:r,right:o}=t.getState().columnPinning,i=n.some(s=>r==null?void 0:r.includes(s)),a=n.some(s=>o==null?void 0:o.includes(s));return i?"left":a?"right":!1},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();return o?(n=(r=t.getState().columnPinning)==null||(r=r[o])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=fe(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,o)=>{const i=[...r??[],...o??[]];return n.filter(a=>!i.includes(a.column.id))},pe(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=fe(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(i=>n.find(a=>a.column.id===i)).filter(Boolean).map(i=>({...i,position:"left"})),pe(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=fe(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(i=>n.find(a=>a.column.id===i)).filter(Boolean).map(i=>({...i,position:"right"})),pe(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?li():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:li())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var o,i;return!!((o=r.left)!=null&&o.length||(i=r.right)!=null&&i.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=fe(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),pe(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=fe(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),pe(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=fe(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const o=[...n??[],...r??[]];return t.filter(i=>!o.includes(i.id))},pe(e.options,"debugColumns","getCenterLeafColumns"))}},Mr={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},ci=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),lg={getDefaultColumnDef:()=>Mr,getInitialState:e=>({columnSizing:{},columnSizingInfo:ci(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:tt("columnSizing",e),onColumnSizingInfoChange:tt("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,o;const i=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:Mr.minSize,(r=i??e.columnDef.size)!=null?r:Mr.size),(o=e.columnDef.maxSize)!=null?o:Mr.maxSize)},e.getStart=fe(n=>[n,Qn(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((o,i)=>o+i.getSize(),0),pe(t.options,"debugColumns","getStart")),e.getAfter=fe(n=>[n,Qn(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((o,i)=>o+i.getSize(),0),pe(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...o}=n;return o})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=o=>{if(o.subHeaders.length)o.subHeaders.forEach(r);else{var i;n+=(i=o.column.getSize())!=null?i:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),o=r==null?void 0:r.getCanResize();return i=>{if(!r||!o||(i.persist==null||i.persist(),ui(i)&&i.touches&&i.touches.length>1))return;const a=e.getSize(),s=e?e.getLeafHeaders().map(b=>[b.column.id,b.column.getSize()]):[[r.id,r.getSize()]],u=ui(i)?Math.round(i.touches[0].clientX):i.clientX,c={},d=(b,w)=>{typeof w=="number"&&(t.setColumnSizingInfo(C=>{var E,x;const O=t.options.columnResizeDirection==="rtl"?-1:1,I=(w-((E=C==null?void 0:C.startOffset)!=null?E:0))*O,$=Math.max(I/((x=C==null?void 0:C.startSize)!=null?x:0),-.999999);return C.columnSizingStart.forEach(H=>{let[D,G]=H;c[D]=Math.round(Math.max(G+G*$,0)*100)/100}),{...C,deltaOffset:I,deltaPercentage:$}}),(t.options.columnResizeMode==="onChange"||b==="end")&&t.setColumnSizing(C=>({...C,...c})))},g=b=>d("move",b),m=b=>{d("end",b),t.setColumnSizingInfo(w=>({...w,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},f=n||typeof document<"u"?document:null,v={moveHandler:b=>g(b.clientX),upHandler:b=>{f==null||f.removeEventListener("mousemove",v.moveHandler),f==null||f.removeEventListener("mouseup",v.upHandler),m(b.clientX)}},h={moveHandler:b=>(b.cancelable&&(b.preventDefault(),b.stopPropagation()),g(b.touches[0].clientX),!1),upHandler:b=>{var w;f==null||f.removeEventListener("touchmove",h.moveHandler),f==null||f.removeEventListener("touchend",h.upHandler),b.cancelable&&(b.preventDefault(),b.stopPropagation()),m((w=b.touches[0])==null?void 0:w.clientX)}},y=cg()?{passive:!1}:!1;ui(i)?(f==null||f.addEventListener("touchmove",h.moveHandler,y),f==null||f.addEventListener("touchend",h.upHandler,y)):(f==null||f.addEventListener("mousemove",v.moveHandler,y),f==null||f.addEventListener("mouseup",v.upHandler,y)),t.setColumnSizingInfo(b=>({...b,startOffset:u,startSize:a,deltaOffset:0,deltaPercentage:0,columnSizingStart:s,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?ci():(n=e.initialState.columnSizingInfo)!=null?n:ci())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0}}};let $r=null;function cg(){if(typeof $r=="boolean")return $r;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return $r=e,$r}function ui(e){return e.type==="touchstart"}const ug={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:tt("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const o=e.columns;return(n=o.length?o.some(i=>i.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=fe(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),pe(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=fe(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,o)=>[...n,...r,...o],pe(t.options,"debugRows","getVisibleCells"))},createTable:e=>{const t=(n,r)=>fe(()=>[r(),r().filter(o=>o.getIsVisible()).map(o=>o.id).join("_")],o=>o.filter(i=>i.getIsVisible==null?void 0:i.getIsVisible()),pe(e.options,"debugColumns",n));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((o,i)=>({...o,[i.id]:n||!(i.getCanHide!=null&&i.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function Qn(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const dg={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},fg={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:tt("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,o,i;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((o=t.options.enableFilters)!=null?o:!0)&&((i=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?i:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Rt.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return Dr(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:Rt[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},pg={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:tt("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var o,i;e.setExpanded(r?{}:(o=(i=e.initialState)==null?void 0:i.expanded)!=null?o:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(o=>!o.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(i=>{const a=i.split(".");r=Math.max(r,a.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var o;const i=r===!0?!0:!!(r!=null&&r[e.id]);let a={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(s=>{a[s]=!0}):a=r,n=(o=n)!=null?o:!i,!i&&n)return{...a,[e.id]:!0};if(i&&!n){const{[e.id]:s,...u}=a;return u}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r!=null&&r[e.id])},e.getCanExpand=()=>{var n,r,o;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((o=e.subRows)!=null&&o.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},di=0,fi=10,pi=()=>({pageIndex:di,pageSize:fi}),gg={getInitialState:e=>({...e,pagination:{...pi(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:tt("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const o=i=>Kt(r,i);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(o)},e.resetPagination=r=>{var o;e.setPagination(r?pi():(o=e.initialState.pagination)!=null?o:pi())},e.setPageIndex=r=>{e.setPagination(o=>{let i=Kt(r,o.pageIndex);const a=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return i=Math.max(0,Math.min(i,a)),{...o,pageIndex:i}})},e.resetPageIndex=r=>{var o,i;e.setPageIndex(r?di:(o=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageIndex)!=null?o:di)},e.resetPageSize=r=>{var o,i;e.setPageSize(r?fi:(o=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageSize)!=null?o:fi)},e.setPageSize=r=>{e.setPagination(o=>{const i=Math.max(1,Kt(r,o.pageSize)),a=o.pageSize*o.pageIndex,s=Math.floor(a/i);return{...o,pageIndex:s,pageSize:i}})},e.setPageCount=r=>e.setPagination(o=>{var i;let a=Kt(r,(i=e.options.pageCount)!=null?i:-1);return typeof a=="number"&&(a=Math.max(-1,a)),{...o,pageCount:a}}),e.getPageOptions=fe(()=>[e.getPageCount()],r=>{let o=[];return r&&r>0&&(o=[...new Array(r)].fill(null).map((i,a)=>a)),o},pe(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,o=e.getPageCount();return o===-1?!0:o===0?!1:r<o-1},e.previousPage=()=>e.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},gi=()=>({top:[],bottom:[]}),mg={getInitialState:e=>({rowPinning:gi(),...e}),getDefaultOptions:e=>({onRowPinningChange:tt("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,o)=>{const i=r?e.getLeafRows().map(u=>{let{id:c}=u;return c}):[],a=o?e.getParentRows().map(u=>{let{id:c}=u;return c}):[],s=new Set([...a,e.id,...i]);t.setRowPinning(u=>{var c,d;if(n==="bottom"){var g,m;return{top:((g=u==null?void 0:u.top)!=null?g:[]).filter(h=>!(s!=null&&s.has(h))),bottom:[...((m=u==null?void 0:u.bottom)!=null?m:[]).filter(h=>!(s!=null&&s.has(h))),...Array.from(s)]}}if(n==="top"){var f,v;return{top:[...((f=u==null?void 0:u.top)!=null?f:[]).filter(h=>!(s!=null&&s.has(h))),...Array.from(s)],bottom:((v=u==null?void 0:u.bottom)!=null?v:[]).filter(h=>!(s!=null&&s.has(h)))}}return{top:((c=u==null?void 0:u.top)!=null?c:[]).filter(h=>!(s!=null&&s.has(h))),bottom:((d=u==null?void 0:u.bottom)!=null?d:[]).filter(h=>!(s!=null&&s.has(h)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:o}=t.options;return typeof r=="function"?r(e):(n=r??o)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:o}=t.getState().rowPinning,i=n.some(s=>r==null?void 0:r.includes(s)),a=n.some(s=>o==null?void 0:o.includes(s));return i?"top":a?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();if(!o)return-1;const i=(n=o==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(a=>{let{id:s}=a;return s});return(r=i==null?void 0:i.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?gi():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:gi())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var o,i;return!!((o=r.top)!=null&&o.length||(i=r.bottom)!=null&&i.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var o;return((o=e.options.keepPinnedRows)==null||o?(n??[]).map(a=>{const s=e.getRow(a,!0);return s.getIsAllParentsExpanded()?s:null}):(n??[]).map(a=>t.find(s=>s.id===a))).filter(Boolean).map(a=>({...a,position:r}))},e.getTopRows=fe(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),pe(e.options,"debugRows","getTopRows")),e.getBottomRows=fe(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),pe(e.options,"debugRows","getBottomRows")),e.getCenterRows=fe(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const o=new Set([...n??[],...r??[]]);return t.filter(i=>!o.has(i.id))},pe(e.options,"debugRows","getCenterRows"))}},hg={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:tt("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},o=e.getPreGroupedRowModel().flatRows;return t?o.forEach(i=>{i.getCanSelect()&&(r[i.id]=!0)}):o.forEach(i=>{delete r[i.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),o={...n};return e.getRowModel().rows.forEach(i=>{mi(o,i.id,r,!0,e)}),o}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=fe(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?hi(e,n):{rows:[],flatRows:[],rowsById:{}},pe(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=fe(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?hi(e,n):{rows:[],flatRows:[],rowsById:{}},pe(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=fe(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?hi(e,n):{rows:[],flatRows:[],rowsById:{}},pe(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(o=>o.getCanSelect()&&!n[o.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(o=>o.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(o=>!n[o.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const o=e.getIsSelected();t.setRowSelection(i=>{var a;if(n=typeof n<"u"?n:!o,e.getCanSelect()&&o===n)return i;const s={...i};return mi(s,e.id,n,(a=r==null?void 0:r.selectChildren)!=null?a:!0,t),s})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return vi(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return yi(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return yi(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var o;n&&e.toggleSelected((o=r.target)==null?void 0:o.checked)}}}},mi=(e,t,n,r,o)=>{var i;const a=o.getRow(t,!0);n?(a.getCanMultiSelect()||Object.keys(e).forEach(s=>delete e[s]),a.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(i=a.subRows)!=null&&i.length&&a.getCanSelectSubRows()&&a.subRows.forEach(s=>mi(e,s.id,n,r,o))};function hi(e,t){const n=e.getState().rowSelection,r=[],o={},i=function(a,s){return a.map(u=>{var c;const d=vi(u,n);if(d&&(r.push(u),o[u.id]=u),(c=u.subRows)!=null&&c.length&&(u={...u,subRows:i(u.subRows)}),d)return u}).filter(Boolean)};return{rows:i(t.rows),flatRows:r,rowsById:o}}function vi(e,t){var n;return(n=t[e.id])!=null?n:!1}function yi(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let o=!0,i=!1;return e.subRows.forEach(a=>{if(!(i&&!o)&&(a.getCanSelect()&&(vi(a,t)?i=!0:o=!1),a.subRows&&a.subRows.length)){const s=yi(a,t);s==="all"?i=!0:(s==="some"&&(i=!0),o=!1)}}),o?"all":i?"some":!1}const xi=/([0-9]+)/gm,vg=(e,t,n)=>Ws(Yt(e.getValue(n)).toLowerCase(),Yt(t.getValue(n)).toLowerCase()),yg=(e,t,n)=>Ws(Yt(e.getValue(n)),Yt(t.getValue(n))),xg=(e,t,n)=>bi(Yt(e.getValue(n)).toLowerCase(),Yt(t.getValue(n)).toLowerCase()),bg=(e,t,n)=>bi(Yt(e.getValue(n)),Yt(t.getValue(n))),wg=(e,t,n)=>{const r=e.getValue(n),o=t.getValue(n);return r>o?1:r<o?-1:0},Cg=(e,t,n)=>bi(e.getValue(n),t.getValue(n));function bi(e,t){return e===t?0:e>t?1:-1}function Yt(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function Ws(e,t){const n=e.split(xi).filter(Boolean),r=t.split(xi).filter(Boolean);for(;n.length&&r.length;){const o=n.shift(),i=r.shift(),a=parseInt(o,10),s=parseInt(i,10),u=[a,s].sort();if(isNaN(u[0])){if(o>i)return 1;if(i>o)return-1;continue}if(isNaN(u[1]))return isNaN(a)?-1:1;if(a>s)return 1;if(s>a)return-1}return n.length-r.length}const er={alphanumeric:vg,alphanumericCaseSensitive:yg,text:xg,textCaseSensitive:bg,datetime:wg,basic:Cg},Sg=[tg,ug,ag,sg,ng,rg,dg,fg,{getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:tt("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const o of n){const i=o==null?void 0:o.getValue(e.id);if(Object.prototype.toString.call(i)==="[object Date]")return er.datetime;if(typeof i=="string"&&(r=!0,i.split(xi).length>1))return er.alphanumeric}return r?er.text:er.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof(n==null?void 0:n.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return Dr(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:er[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const o=e.getNextSortingOrder(),i=typeof n<"u"&&n!==null;t.setSorting(a=>{const s=a==null?void 0:a.find(f=>f.id===e.id),u=a==null?void 0:a.findIndex(f=>f.id===e.id);let c=[],d,g=i?n:o==="desc";if(a!=null&&a.length&&e.getCanMultiSort()&&r?s?d="toggle":d="add":a!=null&&a.length&&u!==a.length-1?d="replace":s?d="toggle":d="replace",d==="toggle"&&(i||o||(d="remove")),d==="add"){var m;c=[...a,{id:e.id,desc:g}],c.splice(0,c.length-((m=t.options.maxMultiSortColCount)!=null?m:Number.MAX_SAFE_INTEGER))}else d==="toggle"?c=a.map(f=>f.id===e.id?{...f,desc:g}:f):d==="remove"?c=a.filter(f=>f.id!==e.id):c=[{id:e.id,desc:g}];return c})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,o;const i=e.getFirstSortDir(),a=e.getIsSorted();return a?a!==i&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(o=t.options.enableMultiRemove)!=null)||o)?!1:a==="desc"?"asc":"desc":i},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(o=>o.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},og,pg,gg,mg,hg,lg];function Eg(e){var t,n;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const r=[...Sg,...(t=e._features)!=null?t:[]];let o={_features:r};const i=o._features.reduce((m,f)=>Object.assign(m,f.getDefaultOptions==null?void 0:f.getDefaultOptions(o)),{}),a=m=>o.options.mergeOptions?o.options.mergeOptions(i,m):{...i,...m};let u={...{},...(n=e.initialState)!=null?n:{}};o._features.forEach(m=>{var f;u=(f=m.getInitialState==null?void 0:m.getInitialState(u))!=null?f:u});const c=[];let d=!1;const g={_features:r,options:{...i,...e},initialState:u,_queue:m=>{c.push(m),d||(d=!0,Promise.resolve().then(()=>{for(;c.length;)c.shift()();d=!1}).catch(f=>setTimeout(()=>{throw f})))},reset:()=>{o.setState(o.initialState)},setOptions:m=>{const f=Kt(m,o.options);o.options=a(f)},getState:()=>o.options.state,setState:m=>{o.options.onStateChange==null||o.options.onStateChange(m)},_getRowId:(m,f,v)=>{var h;return(h=o.options.getRowId==null?void 0:o.options.getRowId(m,f,v))!=null?h:`${v?[v.id,f].join("."):f}`},getCoreRowModel:()=>(o._getCoreRowModel||(o._getCoreRowModel=o.options.getCoreRowModel(o)),o._getCoreRowModel()),getRowModel:()=>o.getPaginationRowModel(),getRow:(m,f)=>{let v=(f?o.getPrePaginationRowModel():o.getRowModel()).rowsById[m];if(!v&&(v=o.getCoreRowModel().rowsById[m],!v))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${m}`):new Error;return v},_getDefaultColumnDef:fe(()=>[o.options.defaultColumn],m=>{var f;return m=(f=m)!=null?f:{},{header:v=>{const h=v.header.column.columnDef;return h.accessorKey?h.accessorKey:h.accessorFn?h.id:null},cell:v=>{var h,y;return(h=(y=v.renderValue())==null||y.toString==null?void 0:y.toString())!=null?h:null},...o._features.reduce((v,h)=>Object.assign(v,h.getDefaultColumnDef==null?void 0:h.getDefaultColumnDef()),{}),...m}},pe(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>o.options.columns,getAllColumns:fe(()=>[o._getColumnDefs()],m=>{const f=function(v,h,y){return y===void 0&&(y=0),v.map(b=>{const w=eg(o,b,y,h),C=b;return w.columns=C.columns?f(C.columns,w,y+1):[],w})};return f(m)},pe(e,"debugColumns","getAllColumns")),getAllFlatColumns:fe(()=>[o.getAllColumns()],m=>m.flatMap(f=>f.getFlatColumns()),pe(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:fe(()=>[o.getAllFlatColumns()],m=>m.reduce((f,v)=>(f[v.id]=v,f),{}),pe(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:fe(()=>[o.getAllColumns(),o._getOrderColumnsFn()],(m,f)=>{let v=m.flatMap(h=>h.getLeafColumns());return f(v)},pe(e,"debugColumns","getAllLeafColumns")),getColumn:m=>{const f=o._getAllFlatColumnsById()[m];return process.env.NODE_ENV!=="production"&&!f&&console.error(`[Table] Column with id '${m}' does not exist.`),f}};Object.assign(o,g);for(let m=0;m<o._features.length;m++){const f=o._features[m];f==null||f.createTable==null||f.createTable(o)}return o}function qs(){return e=>fe(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(o,i,a){i===void 0&&(i=0);const s=[];for(let c=0;c<o.length;c++){const d=ii(e,e._getRowId(o[c],c,a),o[c],c,i,void 0,a==null?void 0:a.id);if(n.flatRows.push(d),n.rowsById[d.id]=d,s.push(d),e.options.getSubRows){var u;d.originalSubRows=e.options.getSubRows(o[c],c),(u=d.originalSubRows)!=null&&u.length&&(d.subRows=r(d.originalSubRows,i+1,d))}}return s};return n.rows=r(t),n},pe(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function _g(e,t,n){return n.options.filterFromLeafRows?Tg(e,t,n):Ag(e,t,n)}function Tg(e,t,n){var r;const o=[],i={},a=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,s=function(u,c){c===void 0&&(c=0);const d=[];for(let m=0;m<u.length;m++){var g;let f=u[m];const v=ii(n,f.id,f.original,f.index,f.depth,void 0,f.parentId);if(v.columnFilters=f.columnFilters,(g=f.subRows)!=null&&g.length&&c<a){if(v.subRows=s(f.subRows,c+1),f=v,t(f)&&!v.subRows.length){d.push(f),i[f.id]=f,o.push(f);continue}if(t(f)||v.subRows.length){d.push(f),i[f.id]=f,o.push(f);continue}}else f=v,t(f)&&(d.push(f),i[f.id]=f,o.push(f))}return d};return{rows:s(e),flatRows:o,rowsById:i}}function Ag(e,t,n){var r;const o=[],i={},a=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,s=function(u,c){c===void 0&&(c=0);const d=[];for(let m=0;m<u.length;m++){let f=u[m];if(t(f)){var g;if((g=f.subRows)!=null&&g.length&&c<a){const h=ii(n,f.id,f.original,f.index,f.depth,void 0,f.parentId);h.subRows=s(f.subRows,c+1),f=h}d.push(f),o.push(f),i[f.id]=f}}return d};return{rows:s(e),flatRows:o,rowsById:i}}function Pg(){return e=>fe(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,n,r)=>{if(!t.rows.length||!(n!=null&&n.length)&&!r){for(let m=0;m<t.flatRows.length;m++)t.flatRows[m].columnFilters={},t.flatRows[m].columnFiltersMeta={};return t}const o=[],i=[];(n??[]).forEach(m=>{var f;const v=e.getColumn(m.id);if(!v)return;const h=v.getFilterFn();if(!h){process.env.NODE_ENV!=="production"&&console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${v.id}.`);return}o.push({id:m.id,filterFn:h,resolvedValue:(f=h.resolveFilterValue==null?void 0:h.resolveFilterValue(m.value))!=null?f:m.value})});const a=(n??[]).map(m=>m.id),s=e.getGlobalFilterFn(),u=e.getAllLeafColumns().filter(m=>m.getCanGlobalFilter());r&&s&&u.length&&(a.push("__global__"),u.forEach(m=>{var f;i.push({id:m.id,filterFn:s,resolvedValue:(f=s.resolveFilterValue==null?void 0:s.resolveFilterValue(r))!=null?f:r})}));let c,d;for(let m=0;m<t.flatRows.length;m++){const f=t.flatRows[m];if(f.columnFilters={},o.length)for(let v=0;v<o.length;v++){c=o[v];const h=c.id;f.columnFilters[h]=c.filterFn(f,h,c.resolvedValue,y=>{f.columnFiltersMeta[h]=y})}if(i.length){for(let v=0;v<i.length;v++){d=i[v];const h=d.id;if(d.filterFn(f,h,d.resolvedValue,y=>{f.columnFiltersMeta[h]=y})){f.columnFilters.__global__=!0;break}}f.columnFilters.__global__!==!0&&(f.columnFilters.__global__=!1)}}const g=m=>{for(let f=0;f<a.length;f++)if(m.columnFilters[a[f]]===!1)return!1;return!0};return _g(t.rows,g,e)},pe(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function Ng(){return e=>fe(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const r=e.getState().sorting,o=[],i=r.filter(u=>{var c;return(c=e.getColumn(u.id))==null?void 0:c.getCanSort()}),a={};i.forEach(u=>{const c=e.getColumn(u.id);c&&(a[u.id]={sortUndefined:c.columnDef.sortUndefined,invertSorting:c.columnDef.invertSorting,sortingFn:c.getSortingFn()})});const s=u=>{const c=u.map(d=>({...d}));return c.sort((d,g)=>{for(let f=0;f<i.length;f+=1){var m;const v=i[f],h=a[v.id],y=h.sortUndefined,b=(m=v==null?void 0:v.desc)!=null?m:!1;let w=0;if(y){const C=d.getValue(v.id),E=g.getValue(v.id),x=C===void 0,O=E===void 0;if(x||O){if(y==="first")return x?-1:1;if(y==="last")return x?1:-1;w=x&&O?0:x?y:-y}}if(w===0&&(w=h.sortingFn(d,g,v.id)),w!==0)return b&&(w*=-1),h.invertSorting&&(w*=-1),w}return d.index-g.index}),c.forEach(d=>{var g;o.push(d),(g=d.subRows)!=null&&g.length&&(d.subRows=s(d.subRows))}),c};return{rows:s(n.rows),flatRows:o,rowsById:n.rowsById}},pe(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}/**
14
14
  * react-table
15
15
  *
16
16
  * Copyright (c) TanStack
@@ -19,97 +19,98 @@
19
19
  * LICENSE.md file in the root directory of this source tree.
20
20
  *
21
21
  * @license MIT
22
- */function Dr(e,t){return e?gg(e)?f.createElement(e,t):e:null}function gg(e){return mg(e)||typeof e=="function"||hg(e)}function mg(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function hg(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function Vs(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=f.useState(()=>({current:lg(t)})),[r,o]=f.useState(()=>n.current.initialState);return n.current.setOptions(i=>({...i,...e,state:{...r,...e.state},onStateChange:a=>{o(a),e.onStateChange==null||e.onStateChange(a)}})),n.current}function js(e,t){return function(){return e.apply(t,arguments)}}const{toString:vg}=Object.prototype,{getPrototypeOf:mi}=Object,Mr=(e=>t=>{const n=vg.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),pt=e=>(e=e.toLowerCase(),t=>Mr(t)===e),$r=e=>t=>typeof t===e,{isArray:bn}=Array,Qn=$r("undefined");function yg(e){return e!==null&&!Qn(e)&&e.constructor!==null&&!Qn(e.constructor)&&Qe(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const zs=pt("ArrayBuffer");function xg(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&zs(e.buffer),t}const wg=$r("string"),Qe=$r("function"),Bs=$r("number"),Ir=e=>e!==null&&typeof e=="object",bg=e=>e===!0||e===!1,Lr=e=>{if(Mr(e)!=="object")return!1;const t=mi(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Sg=pt("Date"),Cg=pt("File"),Eg=pt("Blob"),Tg=pt("FileList"),_g=e=>Ir(e)&&Qe(e.pipe),Ag=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Qe(e.append)&&((t=Mr(e))==="formdata"||t==="object"&&Qe(e.toString)&&e.toString()==="[object FormData]"))},Pg=pt("URLSearchParams"),[Ng,Og,Fg,kg]=["ReadableStream","Request","Response","Headers"].map(pt),Dg=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function er(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),bn(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const i=n?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length;let s;for(r=0;r<a;r++)s=i[r],t.call(null,e[s],s,e)}}function Hs(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const ln=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Us=e=>!Qn(e)&&e!==ln;function hi(){const{caseless:e}=Us(this)&&this||{},t={},n=(r,o)=>{const i=e&&Hs(t,o)||o;Lr(t[i])&&Lr(r)?t[i]=hi(t[i],r):Lr(r)?t[i]=hi({},r):bn(r)?t[i]=r.slice():t[i]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&er(arguments[r],n);return t}const Mg=(e,t,n,{allOwnKeys:r}={})=>(er(t,(o,i)=>{n&&Qe(o)?e[i]=js(o,n):e[i]=o},{allOwnKeys:r}),e),$g=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Ig=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Lg=(e,t,n,r)=>{let o,i,a;const s={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],(!r||r(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=n!==!1&&mi(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Rg=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Vg=e=>{if(!e)return null;if(bn(e))return e;let t=e.length;if(!Bs(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},jg=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&mi(Uint8Array)),zg=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},Bg=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Hg=pt("HTMLFormElement"),Ug=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Ws=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Wg=pt("RegExp"),qs=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};er(n,(o,i)=>{let a;(a=t(o,i,e))!==!1&&(r[i]=a||o)}),Object.defineProperties(e,r)},qg=e=>{qs(e,(t,n)=>{if(Qe(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Qe(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Gg=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return bn(e)?r(e):r(String(e).split(t)),n},Kg=()=>{},Yg=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,vi="abcdefghijklmnopqrstuvwxyz",Gs="0123456789",Ks={DIGIT:Gs,ALPHA:vi,ALPHA_DIGIT:vi+vi.toUpperCase()+Gs},Xg=(e=16,t=Ks.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function Jg(e){return!!(e&&Qe(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Zg=e=>{const t=new Array(10),n=(r,o)=>{if(Ir(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=bn(r)?[]:{};return er(r,(a,s)=>{const u=n(a,o+1);!Qn(u)&&(i[s]=u)}),t[o]=void 0,i}}return r};return n(e,0)},Qg=pt("AsyncFunction"),em=e=>e&&(Ir(e)||Qe(e))&&Qe(e.then)&&Qe(e.catch),Ys=((e,t)=>e?setImmediate:t?((n,r)=>(ln.addEventListener("message",({source:o,data:i})=>{o===ln&&i===n&&r.length&&r.shift()()},!1),o=>{r.push(o),ln.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Qe(ln.postMessage)),tm=typeof queueMicrotask<"u"?queueMicrotask.bind(ln):typeof process<"u"&&process.nextTick||Ys,L={isArray:bn,isArrayBuffer:zs,isBuffer:yg,isFormData:Ag,isArrayBufferView:xg,isString:wg,isNumber:Bs,isBoolean:bg,isObject:Ir,isPlainObject:Lr,isReadableStream:Ng,isRequest:Og,isResponse:Fg,isHeaders:kg,isUndefined:Qn,isDate:Sg,isFile:Cg,isBlob:Eg,isRegExp:Wg,isFunction:Qe,isStream:_g,isURLSearchParams:Pg,isTypedArray:jg,isFileList:Tg,forEach:er,merge:hi,extend:Mg,trim:Dg,stripBOM:$g,inherits:Ig,toFlatObject:Lg,kindOf:Mr,kindOfTest:pt,endsWith:Rg,toArray:Vg,forEachEntry:zg,matchAll:Bg,isHTMLForm:Hg,hasOwnProperty:Ws,hasOwnProp:Ws,reduceDescriptors:qs,freezeMethods:qg,toObjectSet:Gg,toCamelCase:Ug,noop:Kg,toFiniteNumber:Yg,findKey:Hs,global:ln,isContextDefined:Us,ALPHABET:Ks,generateString:Xg,isSpecCompliantForm:Jg,toJSONObject:Zg,isAsyncFn:Qg,isThenable:em,setImmediate:Ys,asap:tm};function ve(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}L.inherits(ve,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:L.toJSONObject(this.config),code:this.code,status:this.status}}});const Xs=ve.prototype,Js={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Js[e]={value:e}}),Object.defineProperties(ve,Js),Object.defineProperty(Xs,"isAxiosError",{value:!0}),ve.from=(e,t,n,r,o,i)=>{const a=Object.create(Xs);return L.toFlatObject(e,a,function(u){return u!==Error.prototype},s=>s!=="isAxiosError"),ve.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};const nm=null;function yi(e){return L.isPlainObject(e)||L.isArray(e)}function Zs(e){return L.endsWith(e,"[]")?e.slice(0,-2):e}function Qs(e,t,n){return e?e.concat(t).map(function(o,i){return o=Zs(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function rm(e){return L.isArray(e)&&!e.some(yi)}const om=L.toFlatObject(L,{},null,function(t){return/^is[A-Z]/.test(t)});function Rr(e,t,n){if(!L.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=L.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,y){return!L.isUndefined(y[m])});const r=n.metaTokens,o=n.visitor||d,i=n.dots,a=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&L.isSpecCompliantForm(t);if(!L.isFunction(o))throw new TypeError("visitor must be a function");function c(v){if(v===null)return"";if(L.isDate(v))return v.toISOString();if(!u&&L.isBlob(v))throw new ve("Blob is not supported. Use a Buffer instead.");return L.isArrayBuffer(v)||L.isTypedArray(v)?u&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function d(v,m,y){let w=v;if(v&&!y&&typeof v=="object"){if(L.endsWith(m,"{}"))m=r?m:m.slice(0,-2),v=JSON.stringify(v);else if(L.isArray(v)&&rm(v)||(L.isFileList(v)||L.endsWith(m,"[]"))&&(w=L.toArray(v)))return m=Zs(m),w.forEach(function(S,E){!(L.isUndefined(S)||S===null)&&t.append(a===!0?Qs([m],E,i):a===null?m:m+"[]",c(S))}),!1}return yi(v)?!0:(t.append(Qs(y,m,i),c(v)),!1)}const g=[],h=Object.assign(om,{defaultVisitor:d,convertValue:c,isVisitable:yi});function p(v,m){if(!L.isUndefined(v)){if(g.indexOf(v)!==-1)throw Error("Circular reference detected in "+m.join("."));g.push(v),L.forEach(v,function(w,b){(!(L.isUndefined(w)||w===null)&&o.call(t,w,L.isString(b)?b.trim():b,m,h))===!0&&p(w,m?m.concat(b):[b])}),g.pop()}}if(!L.isObject(e))throw new TypeError("data must be an object");return p(e),t}function el(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function xi(e,t){this._pairs=[],e&&Rr(e,this,t)}const tl=xi.prototype;tl.append=function(t,n){this._pairs.push([t,n])},tl.toString=function(t){const n=t?function(r){return t.call(this,r,el)}:el;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function im(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function nl(e,t,n){if(!t)return e;const r=n&&n.encode||im;L.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(o?i=o(t,n):i=L.isURLSearchParams(t)?t.toString():new xi(t,n).toString(r),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class rl{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){L.forEach(this.handlers,function(r){r!==null&&t(r)})}}const ol={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},am={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:xi,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},wi=typeof window<"u"&&typeof document<"u",bi=typeof navigator=="object"&&navigator||void 0,sm=wi&&(!bi||["ReactNative","NativeScript","NS"].indexOf(bi.product)<0),lm=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",cm=wi&&window.location.href||"http://localhost",Be={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:wi,hasStandardBrowserEnv:sm,hasStandardBrowserWebWorkerEnv:lm,navigator:bi,origin:cm},Symbol.toStringTag,{value:"Module"})),...am};function um(e,t){return Rr(e,new Be.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return Be.isNode&&L.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function dm(e){return L.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function fm(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}function il(e){function t(n,r,o,i){let a=n[i++];if(a==="__proto__")return!0;const s=Number.isFinite(+a),u=i>=n.length;return a=!a&&L.isArray(o)?o.length:a,u?(L.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!s):((!o[a]||!L.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],i)&&L.isArray(o[a])&&(o[a]=fm(o[a])),!s)}if(L.isFormData(e)&&L.isFunction(e.entries)){const n={};return L.forEachEntry(e,(r,o)=>{t(dm(r),o,n,0)}),n}return null}function pm(e,t,n){if(L.isString(e))try{return(t||JSON.parse)(e),L.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const tr={transitional:ol,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=L.isObject(t);if(i&&L.isHTMLForm(t)&&(t=new FormData(t)),L.isFormData(t))return o?JSON.stringify(il(t)):t;if(L.isArrayBuffer(t)||L.isBuffer(t)||L.isStream(t)||L.isFile(t)||L.isBlob(t)||L.isReadableStream(t))return t;if(L.isArrayBufferView(t))return t.buffer;if(L.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return um(t,this.formSerializer).toString();if((s=L.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return Rr(s?{"files[]":t}:t,u&&new u,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),pm(t)):t}],transformResponse:[function(t){const n=this.transitional||tr.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(L.isResponse(t)||L.isReadableStream(t))return t;if(t&&L.isString(t)&&(r&&!this.responseType||o)){const a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(s){if(a)throw s.name==="SyntaxError"?ve.from(s,ve.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Be.classes.FormData,Blob:Be.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};L.forEach(["delete","get","head","post","put","patch"],e=>{tr.headers[e]={}});const gm=L.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),mm=e=>{const t={};let n,r,o;return e&&e.split(`
23
- `).forEach(function(a){o=a.indexOf(":"),n=a.substring(0,o).trim().toLowerCase(),r=a.substring(o+1).trim(),!(!n||t[n]&&gm[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},al=Symbol("internals");function nr(e){return e&&String(e).trim().toLowerCase()}function Vr(e){return e===!1||e==null?e:L.isArray(e)?e.map(Vr):String(e)}function hm(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const vm=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Si(e,t,n,r,o){if(L.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!L.isString(t)){if(L.isString(r))return t.indexOf(r)!==-1;if(L.isRegExp(r))return r.test(t)}}function ym(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function xm(e,t){const n=L.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,i,a){return this[r].call(this,t,o,i,a)},configurable:!0})})}class Ye{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function i(s,u,c){const d=nr(u);if(!d)throw new Error("header name must be a non-empty string");const g=L.findKey(o,d);(!g||o[g]===void 0||c===!0||c===void 0&&o[g]!==!1)&&(o[g||u]=Vr(s))}const a=(s,u)=>L.forEach(s,(c,d)=>i(c,d,u));if(L.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(L.isString(t)&&(t=t.trim())&&!vm(t))a(mm(t),n);else if(L.isHeaders(t))for(const[s,u]of t.entries())i(u,s,r);else t!=null&&i(n,t,r);return this}get(t,n){if(t=nr(t),t){const r=L.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return hm(o);if(L.isFunction(n))return n.call(this,o,r);if(L.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=nr(t),t){const r=L.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Si(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(a){if(a=nr(a),a){const s=L.findKey(r,a);s&&(!n||Si(r,r[s],s,n))&&(delete r[s],o=!0)}}return L.isArray(t)?t.forEach(i):i(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!t||Si(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const n=this,r={};return L.forEach(this,(o,i)=>{const a=L.findKey(r,i);if(a){n[a]=Vr(o),delete n[i];return}const s=t?ym(i):String(i).trim();s!==i&&delete n[i],n[s]=Vr(o),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return L.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&L.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
24
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[al]=this[al]={accessors:{}}).accessors,o=this.prototype;function i(a){const s=nr(a);r[s]||(xm(o,a),r[s]=!0)}return L.isArray(t)?t.forEach(i):i(t),this}}Ye.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),L.reduceDescriptors(Ye.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),L.freezeMethods(Ye);function Ci(e,t){const n=this||tr,r=t||n,o=Ye.from(r.headers);let i=r.data;return L.forEach(e,function(s){i=s.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function sl(e){return!!(e&&e.__CANCEL__)}function Sn(e,t,n){ve.call(this,e??"canceled",ve.ERR_CANCELED,t,n),this.name="CanceledError"}L.inherits(Sn,ve,{__CANCEL__:!0});function ll(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new ve("Request failed with status code "+n.status,[ve.ERR_BAD_REQUEST,ve.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function wm(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function bm(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,a;return t=t!==void 0?t:1e3,function(u){const c=Date.now(),d=r[i];a||(a=c),n[o]=u,r[o]=c;let g=i,h=0;for(;g!==o;)h+=n[g++],g=g%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),c-a<t)return;const p=d&&c-d;return p?Math.round(h*1e3/p):void 0}}function Sm(e,t){let n=0,r=1e3/t,o,i;const a=(c,d=Date.now())=>{n=d,o=null,i&&(clearTimeout(i),i=null),e.apply(null,c)};return[(...c)=>{const d=Date.now(),g=d-n;g>=r?a(c,d):(o=c,i||(i=setTimeout(()=>{i=null,a(o)},r-g)))},()=>o&&a(o)]}const jr=(e,t,n=3)=>{let r=0;const o=bm(50,250);return Sm(i=>{const a=i.loaded,s=i.lengthComputable?i.total:void 0,u=a-r,c=o(u),d=a<=s;r=a;const g={loaded:a,total:s,progress:s?a/s:void 0,bytes:u,rate:c||void 0,estimated:c&&s&&d?(s-a)/c:void 0,event:i,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(g)},n)},cl=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},ul=e=>(...t)=>L.asap(()=>e(...t)),Cm=Be.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Be.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Be.origin),Be.navigator&&/(msie|trident)/i.test(Be.navigator.userAgent)):()=>!0,Em=Be.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const a=[e+"="+encodeURIComponent(t)];L.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),L.isString(r)&&a.push("path="+r),L.isString(o)&&a.push("domain="+o),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Tm(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function _m(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function dl(e,t){return e&&!Tm(t)?_m(e,t):t}const fl=e=>e instanceof Ye?{...e}:e;function cn(e,t){t=t||{};const n={};function r(c,d,g,h){return L.isPlainObject(c)&&L.isPlainObject(d)?L.merge.call({caseless:h},c,d):L.isPlainObject(d)?L.merge({},d):L.isArray(d)?d.slice():d}function o(c,d,g,h){if(L.isUndefined(d)){if(!L.isUndefined(c))return r(void 0,c,g,h)}else return r(c,d,g,h)}function i(c,d){if(!L.isUndefined(d))return r(void 0,d)}function a(c,d){if(L.isUndefined(d)){if(!L.isUndefined(c))return r(void 0,c)}else return r(void 0,d)}function s(c,d,g){if(g in t)return r(c,d);if(g in e)return r(void 0,c)}const u={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(c,d,g)=>o(fl(c),fl(d),g,!0)};return L.forEach(Object.keys(Object.assign({},e,t)),function(d){const g=u[d]||o,h=g(e[d],t[d],d);L.isUndefined(h)&&g!==s||(n[d]=h)}),n}const pl=e=>{const t=cn({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:a,auth:s}=t;t.headers=a=Ye.from(a),t.url=nl(dl(t.baseURL,t.url),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let u;if(L.isFormData(n)){if(Be.hasStandardBrowserEnv||Be.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((u=a.getContentType())!==!1){const[c,...d]=u?u.split(";").map(g=>g.trim()).filter(Boolean):[];a.setContentType([c||"multipart/form-data",...d].join("; "))}}if(Be.hasStandardBrowserEnv&&(r&&L.isFunction(r)&&(r=r(t)),r||r!==!1&&Cm(t.url))){const c=o&&i&&Em.read(i);c&&a.set(o,c)}return t},Am=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const o=pl(e);let i=o.data;const a=Ye.from(o.headers).normalize();let{responseType:s,onUploadProgress:u,onDownloadProgress:c}=o,d,g,h,p,v;function m(){p&&p(),v&&v(),o.cancelToken&&o.cancelToken.unsubscribe(d),o.signal&&o.signal.removeEventListener("abort",d)}let y=new XMLHttpRequest;y.open(o.method.toUpperCase(),o.url,!0),y.timeout=o.timeout;function w(){if(!y)return;const S=Ye.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),x={data:!s||s==="text"||s==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:S,config:e,request:y};ll(function(M){n(M),m()},function(M){r(M),m()},x),y=null}"onloadend"in y?y.onloadend=w:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(w)},y.onabort=function(){y&&(r(new ve("Request aborted",ve.ECONNABORTED,e,y)),y=null)},y.onerror=function(){r(new ve("Network Error",ve.ERR_NETWORK,e,y)),y=null},y.ontimeout=function(){let E=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const x=o.transitional||ol;o.timeoutErrorMessage&&(E=o.timeoutErrorMessage),r(new ve(E,x.clarifyTimeoutError?ve.ETIMEDOUT:ve.ECONNABORTED,e,y)),y=null},i===void 0&&a.setContentType(null),"setRequestHeader"in y&&L.forEach(a.toJSON(),function(E,x){y.setRequestHeader(x,E)}),L.isUndefined(o.withCredentials)||(y.withCredentials=!!o.withCredentials),s&&s!=="json"&&(y.responseType=o.responseType),c&&([h,v]=jr(c,!0),y.addEventListener("progress",h)),u&&y.upload&&([g,p]=jr(u),y.upload.addEventListener("progress",g),y.upload.addEventListener("loadend",p)),(o.cancelToken||o.signal)&&(d=S=>{y&&(r(!S||S.type?new Sn(null,e,y):S),y.abort(),y=null)},o.cancelToken&&o.cancelToken.subscribe(d),o.signal&&(o.signal.aborted?d():o.signal.addEventListener("abort",d)));const b=wm(o.url);if(b&&Be.protocols.indexOf(b)===-1){r(new ve("Unsupported protocol "+b+":",ve.ERR_BAD_REQUEST,e));return}y.send(i||null)})},Pm=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const i=function(c){if(!o){o=!0,s();const d=c instanceof Error?c:this.reason;r.abort(d instanceof ve?d:new Sn(d instanceof Error?d.message:d))}};let a=t&&setTimeout(()=>{a=null,i(new ve(`timeout ${t} of ms exceeded`,ve.ETIMEDOUT))},t);const s=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(i):c.removeEventListener("abort",i)}),e=null)};e.forEach(c=>c.addEventListener("abort",i));const{signal:u}=r;return u.unsubscribe=()=>L.asap(s),u}},Nm=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},Om=async function*(e,t){for await(const n of Fm(e))yield*Nm(n,t)},Fm=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},gl=(e,t,n,r)=>{const o=Om(e,t);let i=0,a,s=u=>{a||(a=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:c,value:d}=await o.next();if(c){s(),u.close();return}let g=d.byteLength;if(n){let h=i+=g;n(h)}u.enqueue(new Uint8Array(d))}catch(c){throw s(c),c}},cancel(u){return s(u),o.return()}},{highWaterMark:2})},zr=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",ml=zr&&typeof ReadableStream=="function",km=zr&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),hl=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Dm=ml&&hl(()=>{let e=!1;const t=new Request(Be.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),vl=64*1024,Ei=ml&&hl(()=>L.isReadableStream(new Response("").body)),Br={stream:Ei&&(e=>e.body)};zr&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Br[t]&&(Br[t]=L.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new ve(`Response type '${t}' is not supported`,ve.ERR_NOT_SUPPORT,r)})})})(new Response);const Mm=async e=>{if(e==null)return 0;if(L.isBlob(e))return e.size;if(L.isSpecCompliantForm(e))return(await new Request(Be.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(L.isArrayBufferView(e)||L.isArrayBuffer(e))return e.byteLength;if(L.isURLSearchParams(e)&&(e=e+""),L.isString(e))return(await km(e)).byteLength},$m=async(e,t)=>{const n=L.toFiniteNumber(e.getContentLength());return n??Mm(t)},Ti={http:nm,xhr:Am,fetch:zr&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:a,onDownloadProgress:s,onUploadProgress:u,responseType:c,headers:d,withCredentials:g="same-origin",fetchOptions:h}=pl(e);c=c?(c+"").toLowerCase():"text";let p=Pm([o,i&&i.toAbortSignal()],a),v;const m=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let y;try{if(u&&Dm&&n!=="get"&&n!=="head"&&(y=await $m(d,r))!==0){let x=new Request(t,{method:"POST",body:r,duplex:"half"}),O;if(L.isFormData(r)&&(O=x.headers.get("content-type"))&&d.setContentType(O),x.body){const[M,I]=cl(y,jr(ul(u)));r=gl(x.body,vl,M,I)}}L.isString(g)||(g=g?"include":"omit");const w="credentials"in Request.prototype;v=new Request(t,{...h,signal:p,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:r,duplex:"half",credentials:w?g:void 0});let b=await fetch(v);const S=Ei&&(c==="stream"||c==="response");if(Ei&&(s||S&&m)){const x={};["status","statusText","headers"].forEach(H=>{x[H]=b[H]});const O=L.toFiniteNumber(b.headers.get("content-length")),[M,I]=s&&cl(O,jr(ul(s),!0))||[];b=new Response(gl(b.body,vl,M,()=>{I&&I(),m&&m()}),x)}c=c||"text";let E=await Br[L.findKey(Br,c)||"text"](b,e);return!S&&m&&m(),await new Promise((x,O)=>{ll(x,O,{data:E,headers:Ye.from(b.headers),status:b.status,statusText:b.statusText,config:e,request:v})})}catch(w){throw m&&m(),w&&w.name==="TypeError"&&/fetch/i.test(w.message)?Object.assign(new ve("Network Error",ve.ERR_NETWORK,e,v),{cause:w.cause||w}):ve.from(w,w&&w.code,e,v)}})};L.forEach(Ti,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const yl=e=>`- ${e}`,Im=e=>L.isFunction(e)||e===null||e===!1,xl={getAdapter:e=>{e=L.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i<t;i++){n=e[i];let a;if(r=n,!Im(n)&&(r=Ti[(a=String(n)).toLowerCase()],r===void 0))throw new ve(`Unknown adapter '${a}'`);if(r)break;o[a||"#"+i]=r}if(!r){const i=Object.entries(o).map(([s,u])=>`adapter ${s} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=t?i.length>1?`since :
25
- `+i.map(yl).join(`
26
- `):" "+yl(i[0]):"as no adapter specified";throw new ve("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:Ti};function _i(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Sn(null,e)}function wl(e){return _i(e),e.headers=Ye.from(e.headers),e.data=Ci.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),xl.getAdapter(e.adapter||tr.adapter)(e).then(function(r){return _i(e),r.data=Ci.call(e,e.transformResponse,r),r.headers=Ye.from(r.headers),r},function(r){return sl(r)||(_i(e),r&&r.response&&(r.response.data=Ci.call(e,e.transformResponse,r.response),r.response.headers=Ye.from(r.response.headers))),Promise.reject(r)})}const bl="1.7.9",Hr={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Hr[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Sl={};Hr.transitional=function(t,n,r){function o(i,a){return"[Axios v"+bl+"] Transitional option '"+i+"'"+a+(r?". "+r:"")}return(i,a,s)=>{if(t===!1)throw new ve(o(a," has been removed"+(n?" in "+n:"")),ve.ERR_DEPRECATED);return n&&!Sl[a]&&(Sl[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,a,s):!0}},Hr.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Lm(e,t,n){if(typeof e!="object")throw new ve("options must be an object",ve.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const s=e[i],u=s===void 0||a(s,i,e);if(u!==!0)throw new ve("option "+i+" must be "+u,ve.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ve("Unknown option "+i,ve.ERR_BAD_OPTION)}}const Ur={assertOptions:Lm,validators:Hr},wt=Ur.validators;class un{constructor(t){this.defaults=t,this.interceptors={request:new rl,response:new rl}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
27
- `+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=cn(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&Ur.assertOptions(r,{silentJSONParsing:wt.transitional(wt.boolean),forcedJSONParsing:wt.transitional(wt.boolean),clarifyTimeoutError:wt.transitional(wt.boolean)},!1),o!=null&&(L.isFunction(o)?n.paramsSerializer={serialize:o}:Ur.assertOptions(o,{encode:wt.function,serialize:wt.function},!0)),Ur.assertOptions(n,{baseUrl:wt.spelling("baseURL"),withXsrfToken:wt.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=i&&L.merge(i.common,i[n.method]);i&&L.forEach(["delete","get","head","post","put","patch","common"],v=>{delete i[v]}),n.headers=Ye.concat(a,i);const s=[];let u=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(u=u&&m.synchronous,s.unshift(m.fulfilled,m.rejected))});const c=[];this.interceptors.response.forEach(function(m){c.push(m.fulfilled,m.rejected)});let d,g=0,h;if(!u){const v=[wl.bind(this),void 0];for(v.unshift.apply(v,s),v.push.apply(v,c),h=v.length,d=Promise.resolve(n);g<h;)d=d.then(v[g++],v[g++]);return d}h=s.length;let p=n;for(g=0;g<h;){const v=s[g++],m=s[g++];try{p=v(p)}catch(y){m.call(this,y);break}}try{d=wl.call(this,p)}catch(v){return Promise.reject(v)}for(g=0,h=c.length;g<h;)d=d.then(c[g++],c[g++]);return d}getUri(t){t=cn(this.defaults,t);const n=dl(t.baseURL,t.url);return nl(n,t.params,t.paramsSerializer)}}L.forEach(["delete","get","head","options"],function(t){un.prototype[t]=function(n,r){return this.request(cn(r||{},{method:t,url:n,data:(r||{}).data}))}}),L.forEach(["post","put","patch"],function(t){function n(r){return function(i,a,s){return this.request(cn(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}un.prototype[t]=n(),un.prototype[t+"Form"]=n(!0)});class Ai{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(s=>{r.subscribe(s),i=s}).then(o);return a.cancel=function(){r.unsubscribe(i)},a},t(function(i,a,s){r.reason||(r.reason=new Sn(i,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Ai(function(o){t=o}),cancel:t}}}function Rm(e){return function(n){return e.apply(null,n)}}function Vm(e){return L.isObject(e)&&e.isAxiosError===!0}const Pi={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Pi).forEach(([e,t])=>{Pi[t]=e});function Cl(e){const t=new un(e),n=js(un.prototype.request,t);return L.extend(n,un.prototype,t,{allOwnKeys:!0}),L.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Cl(cn(e,o))},n}const he=Cl(tr);he.Axios=un,he.CanceledError=Sn,he.CancelToken=Ai,he.isCancel=sl,he.VERSION=bl,he.toFormData=Rr,he.AxiosError=ve,he.Cancel=he.CanceledError,he.all=function(t){return Promise.all(t)},he.spread=Rm,he.isAxiosError=Vm,he.mergeConfig=cn,he.AxiosHeaders=Ye,he.formToJSON=e=>il(L.isHTMLForm(e)?new FormData(e):e),he.getAdapter=xl.getAdapter,he.HttpStatusCode=Pi,he.default=he;var rr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Wr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const jm=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);var zm=e=>!jm.has(e&&e.code);const Bm=Wr(zm),Ni="axios-retry";function El(e){const t=["ERR_CANCELED","ECONNABORTED"];return e.response||!e.code||t.includes(e.code)?!1:Bm(e)}const Tl=["get","head","options"],Hm=Tl.concat(["put","delete"]);function Oi(e){return e.code!=="ECONNABORTED"&&(!e.response||e.response.status===429||e.response.status>=500&&e.response.status<=599)}function Um(e){var t;return(t=e.config)!=null&&t.method?Oi(e)&&Tl.indexOf(e.config.method)!==-1:!1}function _l(e){var t;return(t=e.config)!=null&&t.method?Oi(e)&&Hm.indexOf(e.config.method)!==-1:!1}function Al(e){return El(e)||_l(e)}function Fi(e=void 0){var r;const t=(r=e==null?void 0:e.response)==null?void 0:r.headers["retry-after"];if(!t)return 0;let n=(Number(t)||0)*1e3;return n===0&&(n=(new Date(t).valueOf()||0)-Date.now()),Math.max(0,n)}function Wm(e=0,t=void 0){return Math.max(0,Fi(t))}function qm(e=0,t=void 0,n=100){const r=2**e*n,o=Math.max(r,Fi(t)),i=o*.2*Math.random();return o+i}function Gm(e=100){return(t=0,n=void 0)=>{const r=t*e;return Math.max(r,Fi(n))}}const Km={retries:3,retryCondition:Al,retryDelay:Wm,shouldResetTimeout:!1,onRetry:()=>{},onMaxRetryTimesExceeded:()=>{},validateResponse:null};function Ym(e,t){return{...Km,...t,...e[Ni]}}function Pl(e,t,n=!1){const r=Ym(e,t||{});return r.retryCount=r.retryCount||0,(!r.lastRequestTime||n)&&(r.lastRequestTime=Date.now()),e[Ni]=r,r}function Xm(e,t){e.defaults.agent===t.agent&&delete t.agent,e.defaults.httpAgent===t.httpAgent&&delete t.httpAgent,e.defaults.httpsAgent===t.httpsAgent&&delete t.httpsAgent}async function Jm(e,t){const{retries:n,retryCondition:r}=e,o=(e.retryCount||0)<n&&r(t);if(typeof o=="object")try{return await o!==!1}catch{return!1}return o}async function Zm(e,t,n,r){var u;t.retryCount+=1;const{retryDelay:o,shouldResetTimeout:i,onRetry:a}=t,s=o(t.retryCount,n);if(Xm(e,r),!i&&r.timeout&&t.lastRequestTime){const c=Date.now()-t.lastRequestTime,d=r.timeout-c-s;if(d<=0)return Promise.reject(n);r.timeout=d}return r.transformRequest=[c=>c],await a(t.retryCount,n,r),(u=r.signal)!=null&&u.aborted?Promise.resolve(e(r)):new Promise(c=>{var h;const d=()=>{clearTimeout(g),c(e(r))},g=setTimeout(()=>{var p;c(e(r)),(p=r.signal)!=null&&p.removeEventListener&&r.signal.removeEventListener("abort",d)},s);(h=r.signal)!=null&&h.addEventListener&&r.signal.addEventListener("abort",d,{once:!0})})}async function Qm(e,t){e.retryCount>=e.retries&&await e.onMaxRetryTimesExceeded(t,e.retryCount)}const Kt=(e,t)=>{const n=e.interceptors.request.use(o=>{var i;return Pl(o,t,!0),(i=o[Ni])!=null&&i.validateResponse&&(o.validateStatus=()=>!1),o}),r=e.interceptors.response.use(null,async o=>{var s;const{config:i}=o;if(!i)return Promise.reject(o);const a=Pl(i,t);return o.response&&((s=a.validateResponse)!=null&&s.call(a,o.response))?o.response:await Jm(a,o)?Zm(e,a,o,i):(await Qm(a,o),Promise.reject(o))});return{requestInterceptorId:n,responseInterceptorId:r}};Kt.isNetworkError=El,Kt.isSafeRequestError=Um,Kt.isIdempotentRequestError=_l,Kt.isNetworkOrIdempotentRequestError=Al,Kt.exponentialDelay=qm,Kt.linearDelay=Gm,Kt.isRetryableError=Oi;var Nl={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(rr,function(){var n=1e3,r=6e4,o=36e5,i="millisecond",a="second",s="minute",u="hour",c="day",d="week",g="month",h="quarter",p="year",v="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(P){var $=["th","st","nd","rd"],F=P%100;return"["+P+($[(F-20)%10]||$[F]||$[0])+"]"}},S=function(P,$,F){var W=String(P);return!W||W.length>=$?P:""+Array($+1-W.length).join(F)+P},E={s:S,z:function(P){var $=-P.utcOffset(),F=Math.abs($),W=Math.floor(F/60),N=F%60;return($<=0?"+":"-")+S(W,2,"0")+":"+S(N,2,"0")},m:function P($,F){if($.date()<F.date())return-P(F,$);var W=12*(F.year()-$.year())+(F.month()-$.month()),N=$.clone().add(W,g),V=F-N<0,_=$.clone().add(W+(V?-1:1),g);return+(-(W+(F-N)/(V?N-_:_-N))||0)},a:function(P){return P<0?Math.ceil(P)||0:Math.floor(P)},p:function(P){return{M:g,y:p,w:d,d:c,D:v,h:u,m:s,s:a,ms:i,Q:h}[P]||String(P||"").toLowerCase().replace(/s$/,"")},u:function(P){return P===void 0}},x="en",O={};O[x]=b;var M="$isDayjsObject",I=function(P){return P instanceof U||!(!P||!P[M])},H=function P($,F,W){var N;if(!$)return x;if(typeof $=="string"){var V=$.toLowerCase();O[V]&&(N=V),F&&(O[V]=F,N=V);var _=$.split("-");if(!N&&_.length>1)return P(_[0])}else{var B=$.name;O[B]=$,N=B}return!W&&N&&(x=N),N||!W&&x},k=function(P,$){if(I(P))return P.clone();var F=typeof $=="object"?$:{};return F.date=P,F.args=arguments,new U(F)},G=E;G.l=H,G.i=I,G.w=function(P,$){return k(P,{locale:$.$L,utc:$.$u,x:$.$x,$offset:$.$offset})};var U=function(){function P(F){this.$L=H(F.locale,null,!0),this.parse(F),this.$x=this.$x||F.x||{},this[M]=!0}var $=P.prototype;return $.parse=function(F){this.$d=function(W){var N=W.date,V=W.utc;if(N===null)return new Date(NaN);if(G.u(N))return new Date;if(N instanceof Date)return new Date(N);if(typeof N=="string"&&!/Z$/i.test(N)){var _=N.match(y);if(_){var B=_[2]-1||0,Q=(_[7]||"0").substring(0,3);return V?new Date(Date.UTC(_[1],B,_[3]||1,_[4]||0,_[5]||0,_[6]||0,Q)):new Date(_[1],B,_[3]||1,_[4]||0,_[5]||0,_[6]||0,Q)}}return new Date(N)}(F),this.init()},$.init=function(){var F=this.$d;this.$y=F.getFullYear(),this.$M=F.getMonth(),this.$D=F.getDate(),this.$W=F.getDay(),this.$H=F.getHours(),this.$m=F.getMinutes(),this.$s=F.getSeconds(),this.$ms=F.getMilliseconds()},$.$utils=function(){return G},$.isValid=function(){return this.$d.toString()!==m},$.isSame=function(F,W){var N=k(F);return this.startOf(W)<=N&&N<=this.endOf(W)},$.isAfter=function(F,W){return k(F)<this.startOf(W)},$.isBefore=function(F,W){return this.endOf(W)<k(F)},$.$g=function(F,W,N){return G.u(F)?this[W]:this.set(N,F)},$.unix=function(){return Math.floor(this.valueOf()/1e3)},$.valueOf=function(){return this.$d.getTime()},$.startOf=function(F,W){var N=this,V=!!G.u(W)||W,_=G.p(F),B=function(ue,le){var Se=G.w(N.$u?Date.UTC(N.$y,le,ue):new Date(N.$y,le,ue),N);return V?Se:Se.endOf(c)},Q=function(ue,le){return G.w(N.toDate()[ue].apply(N.toDate("s"),(V?[0,0,0,0]:[23,59,59,999]).slice(le)),N)},ne=this.$W,ee=this.$M,ce=this.$D,oe="set"+(this.$u?"UTC":"");switch(_){case p:return V?B(1,0):B(31,11);case g:return V?B(1,ee):B(0,ee+1);case d:var ie=this.$locale().weekStart||0,de=(ne<ie?ne+7:ne)-ie;return B(V?ce-de:ce+(6-de),ee);case c:case v:return Q(oe+"Hours",0);case u:return Q(oe+"Minutes",1);case s:return Q(oe+"Seconds",2);case a:return Q(oe+"Milliseconds",3);default:return this.clone()}},$.endOf=function(F){return this.startOf(F,!1)},$.$set=function(F,W){var N,V=G.p(F),_="set"+(this.$u?"UTC":""),B=(N={},N[c]=_+"Date",N[v]=_+"Date",N[g]=_+"Month",N[p]=_+"FullYear",N[u]=_+"Hours",N[s]=_+"Minutes",N[a]=_+"Seconds",N[i]=_+"Milliseconds",N)[V],Q=V===c?this.$D+(W-this.$W):W;if(V===g||V===p){var ne=this.clone().set(v,1);ne.$d[B](Q),ne.init(),this.$d=ne.set(v,Math.min(this.$D,ne.daysInMonth())).$d}else B&&this.$d[B](Q);return this.init(),this},$.set=function(F,W){return this.clone().$set(F,W)},$.get=function(F){return this[G.p(F)]()},$.add=function(F,W){var N,V=this;F=Number(F);var _=G.p(W),B=function(ee){var ce=k(V);return G.w(ce.date(ce.date()+Math.round(ee*F)),V)};if(_===g)return this.set(g,this.$M+F);if(_===p)return this.set(p,this.$y+F);if(_===c)return B(1);if(_===d)return B(7);var Q=(N={},N[s]=r,N[u]=o,N[a]=n,N)[_]||1,ne=this.$d.getTime()+F*Q;return G.w(ne,this)},$.subtract=function(F,W){return this.add(-1*F,W)},$.format=function(F){var W=this,N=this.$locale();if(!this.isValid())return N.invalidDate||m;var V=F||"YYYY-MM-DDTHH:mm:ssZ",_=G.z(this),B=this.$H,Q=this.$m,ne=this.$M,ee=N.weekdays,ce=N.months,oe=N.meridiem,ie=function(le,Se,K,Ee){return le&&(le[Se]||le(W,V))||K[Se].slice(0,Ee)},de=function(le){return G.s(B%12||12,le,"0")},ue=oe||function(le,Se,K){var Ee=le<12?"AM":"PM";return K?Ee.toLowerCase():Ee};return V.replace(w,function(le,Se){return Se||function(K){switch(K){case"YY":return String(W.$y).slice(-2);case"YYYY":return G.s(W.$y,4,"0");case"M":return ne+1;case"MM":return G.s(ne+1,2,"0");case"MMM":return ie(N.monthsShort,ne,ce,3);case"MMMM":return ie(ce,ne);case"D":return W.$D;case"DD":return G.s(W.$D,2,"0");case"d":return String(W.$W);case"dd":return ie(N.weekdaysMin,W.$W,ee,2);case"ddd":return ie(N.weekdaysShort,W.$W,ee,3);case"dddd":return ee[W.$W];case"H":return String(B);case"HH":return G.s(B,2,"0");case"h":return de(1);case"hh":return de(2);case"a":return ue(B,Q,!0);case"A":return ue(B,Q,!1);case"m":return String(Q);case"mm":return G.s(Q,2,"0");case"s":return String(W.$s);case"ss":return G.s(W.$s,2,"0");case"SSS":return G.s(W.$ms,3,"0");case"Z":return _}return null}(le)||_.replace(":","")})},$.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},$.diff=function(F,W,N){var V,_=this,B=G.p(W),Q=k(F),ne=(Q.utcOffset()-this.utcOffset())*r,ee=this-Q,ce=function(){return G.m(_,Q)};switch(B){case p:V=ce()/12;break;case g:V=ce();break;case h:V=ce()/3;break;case d:V=(ee-ne)/6048e5;break;case c:V=(ee-ne)/864e5;break;case u:V=ee/o;break;case s:V=ee/r;break;case a:V=ee/n;break;default:V=ee}return N?V:G.a(V)},$.daysInMonth=function(){return this.endOf(g).$D},$.$locale=function(){return O[this.$L]},$.locale=function(F,W){if(!F)return this.$L;var N=this.clone(),V=H(F,W,!0);return V&&(N.$L=V),N},$.clone=function(){return G.w(this.$d,this)},$.toDate=function(){return new Date(this.valueOf())},$.toJSON=function(){return this.isValid()?this.toISOString():null},$.toISOString=function(){return this.$d.toISOString()},$.toString=function(){return this.$d.toUTCString()},P}(),Z=U.prototype;return k.prototype=Z,[["$ms",i],["$s",a],["$m",s],["$H",u],["$W",c],["$M",g],["$y",p],["$D",v]].forEach(function(P){Z[P[1]]=function($){return this.$g($,P[0],P[1])}}),k.extend=function(P,$){return P.$i||(P($,U,k),P.$i=!0),k},k.locale=H,k.isDayjs=I,k.unix=function(P){return k(1e3*P)},k.en=O[x],k.Ls=O,k.p={},k})})(Nl);var eh=Nl.exports;const Ol=Wr(eh);/**
22
+ */function Lr(e,t){return e?kg(e)?p.createElement(e,t):e:null}function kg(e){return Og(e)||typeof e=="function"||Fg(e)}function Og(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function Fg(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function Gs(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=p.useState(()=>({current:Eg(t)})),[r,o]=p.useState(()=>n.current.initialState);return n.current.setOptions(i=>({...i,...e,state:{...r,...e.state},onStateChange:a=>{o(a),e.onStateChange==null||e.onStateChange(a)}})),n.current}function Ks(e,t){return function(){return e.apply(t,arguments)}}const{toString:Dg}=Object.prototype,{getPrototypeOf:wi}=Object,Rr=(e=>t=>{const n=Dg.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),gt=e=>(e=e.toLowerCase(),t=>Rr(t)===e),Vr=e=>t=>typeof t===e,{isArray:Sn}=Array,tr=Vr("undefined");function Ig(e){return e!==null&&!tr(e)&&e.constructor!==null&&!tr(e.constructor)&&nt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ys=gt("ArrayBuffer");function Mg(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ys(e.buffer),t}const $g=Vr("string"),nt=Vr("function"),Xs=Vr("number"),jr=e=>e!==null&&typeof e=="object",Lg=e=>e===!0||e===!1,zr=e=>{if(Rr(e)!=="object")return!1;const t=wi(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Rg=gt("Date"),Vg=gt("File"),jg=gt("Blob"),zg=gt("FileList"),Bg=e=>jr(e)&&nt(e.pipe),Hg=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||nt(e.append)&&((t=Rr(e))==="formdata"||t==="object"&&nt(e.toString)&&e.toString()==="[object FormData]"))},Ug=gt("URLSearchParams"),[Wg,qg,Gg,Kg]=["ReadableStream","Request","Response","Headers"].map(gt),Yg=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function nr(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),Sn(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const i=n?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length;let s;for(r=0;r<a;r++)s=i[r],t.call(null,e[s],s,e)}}function Js(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const un=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Zs=e=>!tr(e)&&e!==un;function Ci(){const{caseless:e}=Zs(this)&&this||{},t={},n=(r,o)=>{const i=e&&Js(t,o)||o;zr(t[i])&&zr(r)?t[i]=Ci(t[i],r):zr(r)?t[i]=Ci({},r):Sn(r)?t[i]=r.slice():t[i]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&nr(arguments[r],n);return t}const Xg=(e,t,n,{allOwnKeys:r}={})=>(nr(t,(o,i)=>{n&&nt(o)?e[i]=Ks(o,n):e[i]=o},{allOwnKeys:r}),e),Jg=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Zg=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Qg=(e,t,n,r)=>{let o,i,a;const s={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],(!r||r(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=n!==!1&&wi(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},em=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},tm=e=>{if(!e)return null;if(Sn(e))return e;let t=e.length;if(!Xs(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},nm=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&wi(Uint8Array)),rm=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},om=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},im=gt("HTMLFormElement"),am=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Qs=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),sm=gt("RegExp"),el=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};nr(n,(o,i)=>{let a;(a=t(o,i,e))!==!1&&(r[i]=a||o)}),Object.defineProperties(e,r)},lm=e=>{el(e,(t,n)=>{if(nt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(nt(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},cm=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return Sn(e)?r(e):r(String(e).split(t)),n},um=()=>{},dm=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,Si="abcdefghijklmnopqrstuvwxyz",tl="0123456789",nl={DIGIT:tl,ALPHA:Si,ALPHA_DIGIT:Si+Si.toUpperCase()+tl},fm=(e=16,t=nl.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function pm(e){return!!(e&&nt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const gm=e=>{const t=new Array(10),n=(r,o)=>{if(jr(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=Sn(r)?[]:{};return nr(r,(a,s)=>{const u=n(a,o+1);!tr(u)&&(i[s]=u)}),t[o]=void 0,i}}return r};return n(e,0)},mm=gt("AsyncFunction"),hm=e=>e&&(jr(e)||nt(e))&&nt(e.then)&&nt(e.catch),rl=((e,t)=>e?setImmediate:t?((n,r)=>(un.addEventListener("message",({source:o,data:i})=>{o===un&&i===n&&r.length&&r.shift()()},!1),o=>{r.push(o),un.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",nt(un.postMessage)),vm=typeof queueMicrotask<"u"?queueMicrotask.bind(un):typeof process<"u"&&process.nextTick||rl,R={isArray:Sn,isArrayBuffer:Ys,isBuffer:Ig,isFormData:Hg,isArrayBufferView:Mg,isString:$g,isNumber:Xs,isBoolean:Lg,isObject:jr,isPlainObject:zr,isReadableStream:Wg,isRequest:qg,isResponse:Gg,isHeaders:Kg,isUndefined:tr,isDate:Rg,isFile:Vg,isBlob:jg,isRegExp:sm,isFunction:nt,isStream:Bg,isURLSearchParams:Ug,isTypedArray:nm,isFileList:zg,forEach:nr,merge:Ci,extend:Xg,trim:Yg,stripBOM:Jg,inherits:Zg,toFlatObject:Qg,kindOf:Rr,kindOfTest:gt,endsWith:em,toArray:tm,forEachEntry:rm,matchAll:om,isHTMLForm:im,hasOwnProperty:Qs,hasOwnProp:Qs,reduceDescriptors:el,freezeMethods:lm,toObjectSet:cm,toCamelCase:am,noop:um,toFiniteNumber:dm,findKey:Js,global:un,isContextDefined:Zs,ALPHABET:nl,generateString:fm,isSpecCompliantForm:pm,toJSONObject:gm,isAsyncFn:mm,isThenable:hm,setImmediate:rl,asap:vm};function ve(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}R.inherits(ve,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:R.toJSONObject(this.config),code:this.code,status:this.status}}});const ol=ve.prototype,il={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{il[e]={value:e}}),Object.defineProperties(ve,il),Object.defineProperty(ol,"isAxiosError",{value:!0}),ve.from=(e,t,n,r,o,i)=>{const a=Object.create(ol);return R.toFlatObject(e,a,function(u){return u!==Error.prototype},s=>s!=="isAxiosError"),ve.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};const ym=null;function Ei(e){return R.isPlainObject(e)||R.isArray(e)}function al(e){return R.endsWith(e,"[]")?e.slice(0,-2):e}function sl(e,t,n){return e?e.concat(t).map(function(o,i){return o=al(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function xm(e){return R.isArray(e)&&!e.some(Ei)}const bm=R.toFlatObject(R,{},null,function(t){return/^is[A-Z]/.test(t)});function Br(e,t,n){if(!R.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=R.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,y){return!R.isUndefined(y[h])});const r=n.metaTokens,o=n.visitor||d,i=n.dots,a=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&R.isSpecCompliantForm(t);if(!R.isFunction(o))throw new TypeError("visitor must be a function");function c(v){if(v===null)return"";if(R.isDate(v))return v.toISOString();if(!u&&R.isBlob(v))throw new ve("Blob is not supported. Use a Buffer instead.");return R.isArrayBuffer(v)||R.isTypedArray(v)?u&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function d(v,h,y){let b=v;if(v&&!y&&typeof v=="object"){if(R.endsWith(h,"{}"))h=r?h:h.slice(0,-2),v=JSON.stringify(v);else if(R.isArray(v)&&xm(v)||(R.isFileList(v)||R.endsWith(h,"[]"))&&(b=R.toArray(v)))return h=al(h),b.forEach(function(C,E){!(R.isUndefined(C)||C===null)&&t.append(a===!0?sl([h],E,i):a===null?h:h+"[]",c(C))}),!1}return Ei(v)?!0:(t.append(sl(y,h,i),c(v)),!1)}const g=[],m=Object.assign(bm,{defaultVisitor:d,convertValue:c,isVisitable:Ei});function f(v,h){if(!R.isUndefined(v)){if(g.indexOf(v)!==-1)throw Error("Circular reference detected in "+h.join("."));g.push(v),R.forEach(v,function(b,w){(!(R.isUndefined(b)||b===null)&&o.call(t,b,R.isString(w)?w.trim():w,h,m))===!0&&f(b,h?h.concat(w):[w])}),g.pop()}}if(!R.isObject(e))throw new TypeError("data must be an object");return f(e),t}function ll(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function _i(e,t){this._pairs=[],e&&Br(e,this,t)}const cl=_i.prototype;cl.append=function(t,n){this._pairs.push([t,n])},cl.toString=function(t){const n=t?function(r){return t.call(this,r,ll)}:ll;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function wm(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ul(e,t,n){if(!t)return e;const r=n&&n.encode||wm;R.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(o?i=o(t,n):i=R.isURLSearchParams(t)?t.toString():new _i(t,n).toString(r),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class dl{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){R.forEach(this.handlers,function(r){r!==null&&t(r)})}}const fl={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Cm={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:_i,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Ti=typeof window<"u"&&typeof document<"u",Ai=typeof navigator=="object"&&navigator||void 0,Sm=Ti&&(!Ai||["ReactNative","NativeScript","NS"].indexOf(Ai.product)<0),Em=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",_m=Ti&&window.location.href||"http://localhost",He={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ti,hasStandardBrowserEnv:Sm,hasStandardBrowserWebWorkerEnv:Em,navigator:Ai,origin:_m},Symbol.toStringTag,{value:"Module"})),...Cm};function Tm(e,t){return Br(e,new He.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return He.isNode&&R.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function Am(e){return R.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Pm(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}function pl(e){function t(n,r,o,i){let a=n[i++];if(a==="__proto__")return!0;const s=Number.isFinite(+a),u=i>=n.length;return a=!a&&R.isArray(o)?o.length:a,u?(R.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!s):((!o[a]||!R.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],i)&&R.isArray(o[a])&&(o[a]=Pm(o[a])),!s)}if(R.isFormData(e)&&R.isFunction(e.entries)){const n={};return R.forEachEntry(e,(r,o)=>{t(Am(r),o,n,0)}),n}return null}function Nm(e,t,n){if(R.isString(e))try{return(t||JSON.parse)(e),R.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const rr={transitional:fl,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=R.isObject(t);if(i&&R.isHTMLForm(t)&&(t=new FormData(t)),R.isFormData(t))return o?JSON.stringify(pl(t)):t;if(R.isArrayBuffer(t)||R.isBuffer(t)||R.isStream(t)||R.isFile(t)||R.isBlob(t)||R.isReadableStream(t))return t;if(R.isArrayBufferView(t))return t.buffer;if(R.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Tm(t,this.formSerializer).toString();if((s=R.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return Br(s?{"files[]":t}:t,u&&new u,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),Nm(t)):t}],transformResponse:[function(t){const n=this.transitional||rr.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(R.isResponse(t)||R.isReadableStream(t))return t;if(t&&R.isString(t)&&(r&&!this.responseType||o)){const a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(s){if(a)throw s.name==="SyntaxError"?ve.from(s,ve.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:He.classes.FormData,Blob:He.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};R.forEach(["delete","get","head","post","put","patch"],e=>{rr.headers[e]={}});const km=R.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Om=e=>{const t={};let n,r,o;return e&&e.split(`
23
+ `).forEach(function(a){o=a.indexOf(":"),n=a.substring(0,o).trim().toLowerCase(),r=a.substring(o+1).trim(),!(!n||t[n]&&km[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},gl=Symbol("internals");function or(e){return e&&String(e).trim().toLowerCase()}function Hr(e){return e===!1||e==null?e:R.isArray(e)?e.map(Hr):String(e)}function Fm(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Dm=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Pi(e,t,n,r,o){if(R.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!R.isString(t)){if(R.isString(r))return t.indexOf(r)!==-1;if(R.isRegExp(r))return r.test(t)}}function Im(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Mm(e,t){const n=R.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,i,a){return this[r].call(this,t,o,i,a)},configurable:!0})})}class Xe{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function i(s,u,c){const d=or(u);if(!d)throw new Error("header name must be a non-empty string");const g=R.findKey(o,d);(!g||o[g]===void 0||c===!0||c===void 0&&o[g]!==!1)&&(o[g||u]=Hr(s))}const a=(s,u)=>R.forEach(s,(c,d)=>i(c,d,u));if(R.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(R.isString(t)&&(t=t.trim())&&!Dm(t))a(Om(t),n);else if(R.isHeaders(t))for(const[s,u]of t.entries())i(u,s,r);else t!=null&&i(n,t,r);return this}get(t,n){if(t=or(t),t){const r=R.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return Fm(o);if(R.isFunction(n))return n.call(this,o,r);if(R.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=or(t),t){const r=R.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Pi(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(a){if(a=or(a),a){const s=R.findKey(r,a);s&&(!n||Pi(r,r[s],s,n))&&(delete r[s],o=!0)}}return R.isArray(t)?t.forEach(i):i(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!t||Pi(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const n=this,r={};return R.forEach(this,(o,i)=>{const a=R.findKey(r,i);if(a){n[a]=Hr(o),delete n[i];return}const s=t?Im(i):String(i).trim();s!==i&&delete n[i],n[s]=Hr(o),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return R.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&R.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
24
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[gl]=this[gl]={accessors:{}}).accessors,o=this.prototype;function i(a){const s=or(a);r[s]||(Mm(o,a),r[s]=!0)}return R.isArray(t)?t.forEach(i):i(t),this}}Xe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),R.reduceDescriptors(Xe.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),R.freezeMethods(Xe);function Ni(e,t){const n=this||rr,r=t||n,o=Xe.from(r.headers);let i=r.data;return R.forEach(e,function(s){i=s.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function ml(e){return!!(e&&e.__CANCEL__)}function En(e,t,n){ve.call(this,e??"canceled",ve.ERR_CANCELED,t,n),this.name="CanceledError"}R.inherits(En,ve,{__CANCEL__:!0});function hl(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new ve("Request failed with status code "+n.status,[ve.ERR_BAD_REQUEST,ve.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function $m(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Lm(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,a;return t=t!==void 0?t:1e3,function(u){const c=Date.now(),d=r[i];a||(a=c),n[o]=u,r[o]=c;let g=i,m=0;for(;g!==o;)m+=n[g++],g=g%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),c-a<t)return;const f=d&&c-d;return f?Math.round(m*1e3/f):void 0}}function Rm(e,t){let n=0,r=1e3/t,o,i;const a=(c,d=Date.now())=>{n=d,o=null,i&&(clearTimeout(i),i=null),e.apply(null,c)};return[(...c)=>{const d=Date.now(),g=d-n;g>=r?a(c,d):(o=c,i||(i=setTimeout(()=>{i=null,a(o)},r-g)))},()=>o&&a(o)]}const Ur=(e,t,n=3)=>{let r=0;const o=Lm(50,250);return Rm(i=>{const a=i.loaded,s=i.lengthComputable?i.total:void 0,u=a-r,c=o(u),d=a<=s;r=a;const g={loaded:a,total:s,progress:s?a/s:void 0,bytes:u,rate:c||void 0,estimated:c&&s&&d?(s-a)/c:void 0,event:i,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(g)},n)},vl=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},yl=e=>(...t)=>R.asap(()=>e(...t)),Vm=He.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,He.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(He.origin),He.navigator&&/(msie|trident)/i.test(He.navigator.userAgent)):()=>!0,jm=He.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const a=[e+"="+encodeURIComponent(t)];R.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),R.isString(r)&&a.push("path="+r),R.isString(o)&&a.push("domain="+o),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function zm(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Bm(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function xl(e,t){return e&&!zm(t)?Bm(e,t):t}const bl=e=>e instanceof Xe?{...e}:e;function dn(e,t){t=t||{};const n={};function r(c,d,g,m){return R.isPlainObject(c)&&R.isPlainObject(d)?R.merge.call({caseless:m},c,d):R.isPlainObject(d)?R.merge({},d):R.isArray(d)?d.slice():d}function o(c,d,g,m){if(R.isUndefined(d)){if(!R.isUndefined(c))return r(void 0,c,g,m)}else return r(c,d,g,m)}function i(c,d){if(!R.isUndefined(d))return r(void 0,d)}function a(c,d){if(R.isUndefined(d)){if(!R.isUndefined(c))return r(void 0,c)}else return r(void 0,d)}function s(c,d,g){if(g in t)return r(c,d);if(g in e)return r(void 0,c)}const u={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(c,d,g)=>o(bl(c),bl(d),g,!0)};return R.forEach(Object.keys(Object.assign({},e,t)),function(d){const g=u[d]||o,m=g(e[d],t[d],d);R.isUndefined(m)&&g!==s||(n[d]=m)}),n}const wl=e=>{const t=dn({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:a,auth:s}=t;t.headers=a=Xe.from(a),t.url=ul(xl(t.baseURL,t.url),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let u;if(R.isFormData(n)){if(He.hasStandardBrowserEnv||He.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((u=a.getContentType())!==!1){const[c,...d]=u?u.split(";").map(g=>g.trim()).filter(Boolean):[];a.setContentType([c||"multipart/form-data",...d].join("; "))}}if(He.hasStandardBrowserEnv&&(r&&R.isFunction(r)&&(r=r(t)),r||r!==!1&&Vm(t.url))){const c=o&&i&&jm.read(i);c&&a.set(o,c)}return t},Hm=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const o=wl(e);let i=o.data;const a=Xe.from(o.headers).normalize();let{responseType:s,onUploadProgress:u,onDownloadProgress:c}=o,d,g,m,f,v;function h(){f&&f(),v&&v(),o.cancelToken&&o.cancelToken.unsubscribe(d),o.signal&&o.signal.removeEventListener("abort",d)}let y=new XMLHttpRequest;y.open(o.method.toUpperCase(),o.url,!0),y.timeout=o.timeout;function b(){if(!y)return;const C=Xe.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),x={data:!s||s==="text"||s==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:C,config:e,request:y};hl(function(I){n(I),h()},function(I){r(I),h()},x),y=null}"onloadend"in y?y.onloadend=b:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(b)},y.onabort=function(){y&&(r(new ve("Request aborted",ve.ECONNABORTED,e,y)),y=null)},y.onerror=function(){r(new ve("Network Error",ve.ERR_NETWORK,e,y)),y=null},y.ontimeout=function(){let E=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const x=o.transitional||fl;o.timeoutErrorMessage&&(E=o.timeoutErrorMessage),r(new ve(E,x.clarifyTimeoutError?ve.ETIMEDOUT:ve.ECONNABORTED,e,y)),y=null},i===void 0&&a.setContentType(null),"setRequestHeader"in y&&R.forEach(a.toJSON(),function(E,x){y.setRequestHeader(x,E)}),R.isUndefined(o.withCredentials)||(y.withCredentials=!!o.withCredentials),s&&s!=="json"&&(y.responseType=o.responseType),c&&([m,v]=Ur(c,!0),y.addEventListener("progress",m)),u&&y.upload&&([g,f]=Ur(u),y.upload.addEventListener("progress",g),y.upload.addEventListener("loadend",f)),(o.cancelToken||o.signal)&&(d=C=>{y&&(r(!C||C.type?new En(null,e,y):C),y.abort(),y=null)},o.cancelToken&&o.cancelToken.subscribe(d),o.signal&&(o.signal.aborted?d():o.signal.addEventListener("abort",d)));const w=$m(o.url);if(w&&He.protocols.indexOf(w)===-1){r(new ve("Unsupported protocol "+w+":",ve.ERR_BAD_REQUEST,e));return}y.send(i||null)})},Um=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const i=function(c){if(!o){o=!0,s();const d=c instanceof Error?c:this.reason;r.abort(d instanceof ve?d:new En(d instanceof Error?d.message:d))}};let a=t&&setTimeout(()=>{a=null,i(new ve(`timeout ${t} of ms exceeded`,ve.ETIMEDOUT))},t);const s=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(i):c.removeEventListener("abort",i)}),e=null)};e.forEach(c=>c.addEventListener("abort",i));const{signal:u}=r;return u.unsubscribe=()=>R.asap(s),u}},Wm=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},qm=async function*(e,t){for await(const n of Gm(e))yield*Wm(n,t)},Gm=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},Cl=(e,t,n,r)=>{const o=qm(e,t);let i=0,a,s=u=>{a||(a=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:c,value:d}=await o.next();if(c){s(),u.close();return}let g=d.byteLength;if(n){let m=i+=g;n(m)}u.enqueue(new Uint8Array(d))}catch(c){throw s(c),c}},cancel(u){return s(u),o.return()}},{highWaterMark:2})},Wr=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Sl=Wr&&typeof ReadableStream=="function",Km=Wr&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),El=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Ym=Sl&&El(()=>{let e=!1;const t=new Request(He.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),_l=64*1024,ki=Sl&&El(()=>R.isReadableStream(new Response("").body)),qr={stream:ki&&(e=>e.body)};Wr&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!qr[t]&&(qr[t]=R.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new ve(`Response type '${t}' is not supported`,ve.ERR_NOT_SUPPORT,r)})})})(new Response);const Xm=async e=>{if(e==null)return 0;if(R.isBlob(e))return e.size;if(R.isSpecCompliantForm(e))return(await new Request(He.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(R.isArrayBufferView(e)||R.isArrayBuffer(e))return e.byteLength;if(R.isURLSearchParams(e)&&(e=e+""),R.isString(e))return(await Km(e)).byteLength},Jm=async(e,t)=>{const n=R.toFiniteNumber(e.getContentLength());return n??Xm(t)},Oi={http:ym,xhr:Hm,fetch:Wr&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:a,onDownloadProgress:s,onUploadProgress:u,responseType:c,headers:d,withCredentials:g="same-origin",fetchOptions:m}=wl(e);c=c?(c+"").toLowerCase():"text";let f=Um([o,i&&i.toAbortSignal()],a),v;const h=f&&f.unsubscribe&&(()=>{f.unsubscribe()});let y;try{if(u&&Ym&&n!=="get"&&n!=="head"&&(y=await Jm(d,r))!==0){let x=new Request(t,{method:"POST",body:r,duplex:"half"}),O;if(R.isFormData(r)&&(O=x.headers.get("content-type"))&&d.setContentType(O),x.body){const[I,$]=vl(y,Ur(yl(u)));r=Cl(x.body,_l,I,$)}}R.isString(g)||(g=g?"include":"omit");const b="credentials"in Request.prototype;v=new Request(t,{...m,signal:f,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:r,duplex:"half",credentials:b?g:void 0});let w=await fetch(v);const C=ki&&(c==="stream"||c==="response");if(ki&&(s||C&&h)){const x={};["status","statusText","headers"].forEach(H=>{x[H]=w[H]});const O=R.toFiniteNumber(w.headers.get("content-length")),[I,$]=s&&vl(O,Ur(yl(s),!0))||[];w=new Response(Cl(w.body,_l,I,()=>{$&&$(),h&&h()}),x)}c=c||"text";let E=await qr[R.findKey(qr,c)||"text"](w,e);return!C&&h&&h(),await new Promise((x,O)=>{hl(x,O,{data:E,headers:Xe.from(w.headers),status:w.status,statusText:w.statusText,config:e,request:v})})}catch(b){throw h&&h(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new ve("Network Error",ve.ERR_NETWORK,e,v),{cause:b.cause||b}):ve.from(b,b&&b.code,e,v)}})};R.forEach(Oi,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Tl=e=>`- ${e}`,Zm=e=>R.isFunction(e)||e===null||e===!1,Al={getAdapter:e=>{e=R.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i<t;i++){n=e[i];let a;if(r=n,!Zm(n)&&(r=Oi[(a=String(n)).toLowerCase()],r===void 0))throw new ve(`Unknown adapter '${a}'`);if(r)break;o[a||"#"+i]=r}if(!r){const i=Object.entries(o).map(([s,u])=>`adapter ${s} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=t?i.length>1?`since :
25
+ `+i.map(Tl).join(`
26
+ `):" "+Tl(i[0]):"as no adapter specified";throw new ve("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:Oi};function Fi(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new En(null,e)}function Pl(e){return Fi(e),e.headers=Xe.from(e.headers),e.data=Ni.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Al.getAdapter(e.adapter||rr.adapter)(e).then(function(r){return Fi(e),r.data=Ni.call(e,e.transformResponse,r),r.headers=Xe.from(r.headers),r},function(r){return ml(r)||(Fi(e),r&&r.response&&(r.response.data=Ni.call(e,e.transformResponse,r.response),r.response.headers=Xe.from(r.response.headers))),Promise.reject(r)})}const Nl="1.7.9",Gr={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Gr[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const kl={};Gr.transitional=function(t,n,r){function o(i,a){return"[Axios v"+Nl+"] Transitional option '"+i+"'"+a+(r?". "+r:"")}return(i,a,s)=>{if(t===!1)throw new ve(o(a," has been removed"+(n?" in "+n:"")),ve.ERR_DEPRECATED);return n&&!kl[a]&&(kl[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,a,s):!0}},Gr.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Qm(e,t,n){if(typeof e!="object")throw new ve("options must be an object",ve.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const s=e[i],u=s===void 0||a(s,i,e);if(u!==!0)throw new ve("option "+i+" must be "+u,ve.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ve("Unknown option "+i,ve.ERR_BAD_OPTION)}}const Kr={assertOptions:Qm,validators:Gr},wt=Kr.validators;class fn{constructor(t){this.defaults=t,this.interceptors={request:new dl,response:new dl}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
27
+ `+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=dn(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&Kr.assertOptions(r,{silentJSONParsing:wt.transitional(wt.boolean),forcedJSONParsing:wt.transitional(wt.boolean),clarifyTimeoutError:wt.transitional(wt.boolean)},!1),o!=null&&(R.isFunction(o)?n.paramsSerializer={serialize:o}:Kr.assertOptions(o,{encode:wt.function,serialize:wt.function},!0)),Kr.assertOptions(n,{baseUrl:wt.spelling("baseURL"),withXsrfToken:wt.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=i&&R.merge(i.common,i[n.method]);i&&R.forEach(["delete","get","head","post","put","patch","common"],v=>{delete i[v]}),n.headers=Xe.concat(a,i);const s=[];let u=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(u=u&&h.synchronous,s.unshift(h.fulfilled,h.rejected))});const c=[];this.interceptors.response.forEach(function(h){c.push(h.fulfilled,h.rejected)});let d,g=0,m;if(!u){const v=[Pl.bind(this),void 0];for(v.unshift.apply(v,s),v.push.apply(v,c),m=v.length,d=Promise.resolve(n);g<m;)d=d.then(v[g++],v[g++]);return d}m=s.length;let f=n;for(g=0;g<m;){const v=s[g++],h=s[g++];try{f=v(f)}catch(y){h.call(this,y);break}}try{d=Pl.call(this,f)}catch(v){return Promise.reject(v)}for(g=0,m=c.length;g<m;)d=d.then(c[g++],c[g++]);return d}getUri(t){t=dn(this.defaults,t);const n=xl(t.baseURL,t.url);return ul(n,t.params,t.paramsSerializer)}}R.forEach(["delete","get","head","options"],function(t){fn.prototype[t]=function(n,r){return this.request(dn(r||{},{method:t,url:n,data:(r||{}).data}))}}),R.forEach(["post","put","patch"],function(t){function n(r){return function(i,a,s){return this.request(dn(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}fn.prototype[t]=n(),fn.prototype[t+"Form"]=n(!0)});class Di{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(s=>{r.subscribe(s),i=s}).then(o);return a.cancel=function(){r.unsubscribe(i)},a},t(function(i,a,s){r.reason||(r.reason=new En(i,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Di(function(o){t=o}),cancel:t}}}function eh(e){return function(n){return e.apply(null,n)}}function th(e){return R.isObject(e)&&e.isAxiosError===!0}const Ii={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ii).forEach(([e,t])=>{Ii[t]=e});function Ol(e){const t=new fn(e),n=Ks(fn.prototype.request,t);return R.extend(n,fn.prototype,t,{allOwnKeys:!0}),R.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Ol(dn(e,o))},n}const he=Ol(rr);he.Axios=fn,he.CanceledError=En,he.CancelToken=Di,he.isCancel=ml,he.VERSION=Nl,he.toFormData=Br,he.AxiosError=ve,he.Cancel=he.CanceledError,he.all=function(t){return Promise.all(t)},he.spread=eh,he.isAxiosError=th,he.mergeConfig=dn,he.AxiosHeaders=Xe,he.formToJSON=e=>pl(R.isHTMLForm(e)?new FormData(e):e),he.getAdapter=Al.getAdapter,he.HttpStatusCode=Ii,he.default=he;var ir=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Yr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const nh=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);var rh=e=>!nh.has(e&&e.code);const oh=Yr(rh),Mi="axios-retry";function Fl(e){const t=["ERR_CANCELED","ECONNABORTED"];return e.response||!e.code||t.includes(e.code)?!1:oh(e)}const Dl=["get","head","options"],ih=Dl.concat(["put","delete"]);function $i(e){return e.code!=="ECONNABORTED"&&(!e.response||e.response.status===429||e.response.status>=500&&e.response.status<=599)}function ah(e){var t;return(t=e.config)!=null&&t.method?$i(e)&&Dl.indexOf(e.config.method)!==-1:!1}function Il(e){var t;return(t=e.config)!=null&&t.method?$i(e)&&ih.indexOf(e.config.method)!==-1:!1}function Ml(e){return Fl(e)||Il(e)}function Li(e=void 0){var r;const t=(r=e==null?void 0:e.response)==null?void 0:r.headers["retry-after"];if(!t)return 0;let n=(Number(t)||0)*1e3;return n===0&&(n=(new Date(t).valueOf()||0)-Date.now()),Math.max(0,n)}function sh(e=0,t=void 0){return Math.max(0,Li(t))}function lh(e=0,t=void 0,n=100){const r=2**e*n,o=Math.max(r,Li(t)),i=o*.2*Math.random();return o+i}function ch(e=100){return(t=0,n=void 0)=>{const r=t*e;return Math.max(r,Li(n))}}const uh={retries:3,retryCondition:Ml,retryDelay:sh,shouldResetTimeout:!1,onRetry:()=>{},onMaxRetryTimesExceeded:()=>{},validateResponse:null};function dh(e,t){return{...uh,...t,...e[Mi]}}function $l(e,t,n=!1){const r=dh(e,t||{});return r.retryCount=r.retryCount||0,(!r.lastRequestTime||n)&&(r.lastRequestTime=Date.now()),e[Mi]=r,r}function fh(e,t){e.defaults.agent===t.agent&&delete t.agent,e.defaults.httpAgent===t.httpAgent&&delete t.httpAgent,e.defaults.httpsAgent===t.httpsAgent&&delete t.httpsAgent}async function ph(e,t){const{retries:n,retryCondition:r}=e,o=(e.retryCount||0)<n&&r(t);if(typeof o=="object")try{return await o!==!1}catch{return!1}return o}async function gh(e,t,n,r){var u;t.retryCount+=1;const{retryDelay:o,shouldResetTimeout:i,onRetry:a}=t,s=o(t.retryCount,n);if(fh(e,r),!i&&r.timeout&&t.lastRequestTime){const c=Date.now()-t.lastRequestTime,d=r.timeout-c-s;if(d<=0)return Promise.reject(n);r.timeout=d}return r.transformRequest=[c=>c],await a(t.retryCount,n,r),(u=r.signal)!=null&&u.aborted?Promise.resolve(e(r)):new Promise(c=>{var m;const d=()=>{clearTimeout(g),c(e(r))},g=setTimeout(()=>{var f;c(e(r)),(f=r.signal)!=null&&f.removeEventListener&&r.signal.removeEventListener("abort",d)},s);(m=r.signal)!=null&&m.addEventListener&&r.signal.addEventListener("abort",d,{once:!0})})}async function mh(e,t){e.retryCount>=e.retries&&await e.onMaxRetryTimesExceeded(t,e.retryCount)}const Xt=(e,t)=>{const n=e.interceptors.request.use(o=>{var i;return $l(o,t,!0),(i=o[Mi])!=null&&i.validateResponse&&(o.validateStatus=()=>!1),o}),r=e.interceptors.response.use(null,async o=>{var s;const{config:i}=o;if(!i)return Promise.reject(o);const a=$l(i,t);return o.response&&((s=a.validateResponse)!=null&&s.call(a,o.response))?o.response:await ph(a,o)?gh(e,a,o,i):(await mh(a,o),Promise.reject(o))});return{requestInterceptorId:n,responseInterceptorId:r}};Xt.isNetworkError=Fl,Xt.isSafeRequestError=ah,Xt.isIdempotentRequestError=Il,Xt.isNetworkOrIdempotentRequestError=Ml,Xt.exponentialDelay=lh,Xt.linearDelay=ch,Xt.isRetryableError=$i;var Ll={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(ir,function(){var n=1e3,r=6e4,o=36e5,i="millisecond",a="second",s="minute",u="hour",c="day",d="week",g="month",m="quarter",f="year",v="date",h="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,w={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(N){var M=["th","st","nd","rd"],F=N%100;return"["+N+(M[(F-20)%10]||M[F]||M[0])+"]"}},C=function(N,M,F){var q=String(N);return!q||q.length>=M?N:""+Array(M+1-q.length).join(F)+N},E={s:C,z:function(N){var M=-N.utcOffset(),F=Math.abs(M),q=Math.floor(F/60),k=F%60;return(M<=0?"+":"-")+C(q,2,"0")+":"+C(k,2,"0")},m:function N(M,F){if(M.date()<F.date())return-N(F,M);var q=12*(F.year()-M.year())+(F.month()-M.month()),k=M.clone().add(q,g),j=F-k<0,T=M.clone().add(q+(j?-1:1),g);return+(-(q+(F-k)/(j?k-T:T-k))||0)},a:function(N){return N<0?Math.ceil(N)||0:Math.floor(N)},p:function(N){return{M:g,y:f,w:d,d:c,D:v,h:u,m:s,s:a,ms:i,Q:m}[N]||String(N||"").toLowerCase().replace(/s$/,"")},u:function(N){return N===void 0}},x="en",O={};O[x]=w;var I="$isDayjsObject",$=function(N){return N instanceof U||!(!N||!N[I])},H=function N(M,F,q){var k;if(!M)return x;if(typeof M=="string"){var j=M.toLowerCase();O[j]&&(k=j),F&&(O[j]=F,k=j);var T=M.split("-");if(!k&&T.length>1)return N(T[0])}else{var B=M.name;O[B]=M,k=B}return!q&&k&&(x=k),k||!q&&x},D=function(N,M){if($(N))return N.clone();var F=typeof M=="object"?M:{};return F.date=N,F.args=arguments,new U(F)},G=E;G.l=H,G.i=$,G.w=function(N,M){return D(N,{locale:M.$L,utc:M.$u,x:M.$x,$offset:M.$offset})};var U=function(){function N(F){this.$L=H(F.locale,null,!0),this.parse(F),this.$x=this.$x||F.x||{},this[I]=!0}var M=N.prototype;return M.parse=function(F){this.$d=function(q){var k=q.date,j=q.utc;if(k===null)return new Date(NaN);if(G.u(k))return new Date;if(k instanceof Date)return new Date(k);if(typeof k=="string"&&!/Z$/i.test(k)){var T=k.match(y);if(T){var B=T[2]-1||0,Q=(T[7]||"0").substring(0,3);return j?new Date(Date.UTC(T[1],B,T[3]||1,T[4]||0,T[5]||0,T[6]||0,Q)):new Date(T[1],B,T[3]||1,T[4]||0,T[5]||0,T[6]||0,Q)}}return new Date(k)}(F),this.init()},M.init=function(){var F=this.$d;this.$y=F.getFullYear(),this.$M=F.getMonth(),this.$D=F.getDate(),this.$W=F.getDay(),this.$H=F.getHours(),this.$m=F.getMinutes(),this.$s=F.getSeconds(),this.$ms=F.getMilliseconds()},M.$utils=function(){return G},M.isValid=function(){return this.$d.toString()!==h},M.isSame=function(F,q){var k=D(F);return this.startOf(q)<=k&&k<=this.endOf(q)},M.isAfter=function(F,q){return D(F)<this.startOf(q)},M.isBefore=function(F,q){return this.endOf(q)<D(F)},M.$g=function(F,q,k){return G.u(F)?this[q]:this.set(k,F)},M.unix=function(){return Math.floor(this.valueOf()/1e3)},M.valueOf=function(){return this.$d.getTime()},M.startOf=function(F,q){var k=this,j=!!G.u(q)||q,T=G.p(F),B=function(ue,le){var Ce=G.w(k.$u?Date.UTC(k.$y,le,ue):new Date(k.$y,le,ue),k);return j?Ce:Ce.endOf(c)},Q=function(ue,le){return G.w(k.toDate()[ue].apply(k.toDate("s"),(j?[0,0,0,0]:[23,59,59,999]).slice(le)),k)},re=this.$W,ee=this.$M,ce=this.$D,oe="set"+(this.$u?"UTC":"");switch(T){case f:return j?B(1,0):B(31,11);case g:return j?B(1,ee):B(0,ee+1);case d:var ae=this.$locale().weekStart||0,de=(re<ae?re+7:re)-ae;return B(j?ce-de:ce+(6-de),ee);case c:case v:return Q(oe+"Hours",0);case u:return Q(oe+"Minutes",1);case s:return Q(oe+"Seconds",2);case a:return Q(oe+"Milliseconds",3);default:return this.clone()}},M.endOf=function(F){return this.startOf(F,!1)},M.$set=function(F,q){var k,j=G.p(F),T="set"+(this.$u?"UTC":""),B=(k={},k[c]=T+"Date",k[v]=T+"Date",k[g]=T+"Month",k[f]=T+"FullYear",k[u]=T+"Hours",k[s]=T+"Minutes",k[a]=T+"Seconds",k[i]=T+"Milliseconds",k)[j],Q=j===c?this.$D+(q-this.$W):q;if(j===g||j===f){var re=this.clone().set(v,1);re.$d[B](Q),re.init(),this.$d=re.set(v,Math.min(this.$D,re.daysInMonth())).$d}else B&&this.$d[B](Q);return this.init(),this},M.set=function(F,q){return this.clone().$set(F,q)},M.get=function(F){return this[G.p(F)]()},M.add=function(F,q){var k,j=this;F=Number(F);var T=G.p(q),B=function(ee){var ce=D(j);return G.w(ce.date(ce.date()+Math.round(ee*F)),j)};if(T===g)return this.set(g,this.$M+F);if(T===f)return this.set(f,this.$y+F);if(T===c)return B(1);if(T===d)return B(7);var Q=(k={},k[s]=r,k[u]=o,k[a]=n,k)[T]||1,re=this.$d.getTime()+F*Q;return G.w(re,this)},M.subtract=function(F,q){return this.add(-1*F,q)},M.format=function(F){var q=this,k=this.$locale();if(!this.isValid())return k.invalidDate||h;var j=F||"YYYY-MM-DDTHH:mm:ssZ",T=G.z(this),B=this.$H,Q=this.$m,re=this.$M,ee=k.weekdays,ce=k.months,oe=k.meridiem,ae=function(le,Ce,K,_e){return le&&(le[Ce]||le(q,j))||K[Ce].slice(0,_e)},de=function(le){return G.s(B%12||12,le,"0")},ue=oe||function(le,Ce,K){var _e=le<12?"AM":"PM";return K?_e.toLowerCase():_e};return j.replace(b,function(le,Ce){return Ce||function(K){switch(K){case"YY":return String(q.$y).slice(-2);case"YYYY":return G.s(q.$y,4,"0");case"M":return re+1;case"MM":return G.s(re+1,2,"0");case"MMM":return ae(k.monthsShort,re,ce,3);case"MMMM":return ae(ce,re);case"D":return q.$D;case"DD":return G.s(q.$D,2,"0");case"d":return String(q.$W);case"dd":return ae(k.weekdaysMin,q.$W,ee,2);case"ddd":return ae(k.weekdaysShort,q.$W,ee,3);case"dddd":return ee[q.$W];case"H":return String(B);case"HH":return G.s(B,2,"0");case"h":return de(1);case"hh":return de(2);case"a":return ue(B,Q,!0);case"A":return ue(B,Q,!1);case"m":return String(Q);case"mm":return G.s(Q,2,"0");case"s":return String(q.$s);case"ss":return G.s(q.$s,2,"0");case"SSS":return G.s(q.$ms,3,"0");case"Z":return T}return null}(le)||T.replace(":","")})},M.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},M.diff=function(F,q,k){var j,T=this,B=G.p(q),Q=D(F),re=(Q.utcOffset()-this.utcOffset())*r,ee=this-Q,ce=function(){return G.m(T,Q)};switch(B){case f:j=ce()/12;break;case g:j=ce();break;case m:j=ce()/3;break;case d:j=(ee-re)/6048e5;break;case c:j=(ee-re)/864e5;break;case u:j=ee/o;break;case s:j=ee/r;break;case a:j=ee/n;break;default:j=ee}return k?j:G.a(j)},M.daysInMonth=function(){return this.endOf(g).$D},M.$locale=function(){return O[this.$L]},M.locale=function(F,q){if(!F)return this.$L;var k=this.clone(),j=H(F,q,!0);return j&&(k.$L=j),k},M.clone=function(){return G.w(this.$d,this)},M.toDate=function(){return new Date(this.valueOf())},M.toJSON=function(){return this.isValid()?this.toISOString():null},M.toISOString=function(){return this.$d.toISOString()},M.toString=function(){return this.$d.toUTCString()},N}(),Z=U.prototype;return D.prototype=Z,[["$ms",i],["$s",a],["$m",s],["$H",u],["$W",c],["$M",g],["$y",f],["$D",v]].forEach(function(N){Z[N[1]]=function(M){return this.$g(M,N[0],N[1])}}),D.extend=function(N,M){return N.$i||(N(M,U,D),N.$i=!0),D},D.locale=H,D.isDayjs=$,D.unix=function(N){return D(1e3*N)},D.en=O[x],D.Ls=O,D.p={},D})})(Ll);var hh=Ll.exports;const Rl=Yr(hh);/**
28
28
  * @license lucide-react v0.468.0 - ISC
29
29
  *
30
30
  * This source code is licensed under the ISC license.
31
31
  * See the LICENSE file in the root directory of this source tree.
32
- */const th=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Fl=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
32
+ */const vh=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Vl=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
33
33
  * @license lucide-react v0.468.0 - ISC
34
34
  *
35
35
  * This source code is licensed under the ISC license.
36
36
  * See the LICENSE file in the root directory of this source tree.
37
- */var nh={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
37
+ */var yh={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
38
38
  * @license lucide-react v0.468.0 - ISC
39
39
  *
40
40
  * This source code is licensed under the ISC license.
41
41
  * See the LICENSE file in the root directory of this source tree.
42
- */const rh=T.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...s},u)=>T.createElement("svg",{ref:u,...nh,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Fl("lucide",o),...s},[...a.map(([c,d])=>T.createElement(c,d)),...Array.isArray(i)?i:[i]]));/**
42
+ */const xh=_.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...s},u)=>_.createElement("svg",{ref:u,...yh,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Vl("lucide",o),...s},[...a.map(([c,d])=>_.createElement(c,d)),...Array.isArray(i)?i:[i]]));/**
43
43
  * @license lucide-react v0.468.0 - ISC
44
44
  *
45
45
  * This source code is licensed under the ISC license.
46
46
  * See the LICENSE file in the root directory of this source tree.
47
- */const at=(e,t)=>{const n=T.forwardRef(({className:r,...o},i)=>T.createElement(rh,{ref:i,iconNode:t,className:Fl(`lucide-${th(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
47
+ */const st=(e,t)=>{const n=_.forwardRef(({className:r,...o},i)=>_.createElement(xh,{ref:i,iconNode:t,className:Vl(`lucide-${vh(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
48
48
  * @license lucide-react v0.468.0 - ISC
49
49
  *
50
50
  * This source code is licensed under the ISC license.
51
51
  * See the LICENSE file in the root directory of this source tree.
52
- */const ki=at("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/**
52
+ */const Ri=st("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/**
53
53
  * @license lucide-react v0.468.0 - ISC
54
54
  *
55
55
  * This source code is licensed under the ISC license.
56
56
  * See the LICENSE file in the root directory of this source tree.
57
- */const oh=at("Briefcase",[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]]);/**
57
+ */const bh=st("Briefcase",[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]]);/**
58
58
  * @license lucide-react v0.468.0 - ISC
59
59
  *
60
60
  * This source code is licensed under the ISC license.
61
61
  * See the LICENSE file in the root directory of this source tree.
62
- */const ih=at("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
62
+ */const wh=st("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
63
63
  * @license lucide-react v0.468.0 - ISC
64
64
  *
65
65
  * This source code is licensed under the ISC license.
66
66
  * See the LICENSE file in the root directory of this source tree.
67
- */const ah=at("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
67
+ */const Ch=st("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
68
68
  * @license lucide-react v0.468.0 - ISC
69
69
  *
70
70
  * This source code is licensed under the ISC license.
71
71
  * See the LICENSE file in the root directory of this source tree.
72
- */const kl=at("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
72
+ */const jl=st("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
73
73
  * @license lucide-react v0.468.0 - ISC
74
74
  *
75
75
  * This source code is licensed under the ISC license.
76
76
  * See the LICENSE file in the root directory of this source tree.
77
- */const sh=at("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
77
+ */const Sh=st("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
78
78
  * @license lucide-react v0.468.0 - ISC
79
79
  *
80
80
  * This source code is licensed under the ISC license.
81
81
  * See the LICENSE file in the root directory of this source tree.
82
- */const lh=at("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
82
+ */const Eh=st("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
83
83
  * @license lucide-react v0.468.0 - ISC
84
84
  *
85
85
  * This source code is licensed under the ISC license.
86
86
  * See the LICENSE file in the root directory of this source tree.
87
- */const $e=at("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
87
+ */const $e=st("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
88
88
  * @license lucide-react v0.468.0 - ISC
89
89
  *
90
90
  * This source code is licensed under the ISC license.
91
91
  * See the LICENSE file in the root directory of this source tree.
92
- */const ch=at("MoveUpRight",[["path",{d:"M13 5H19V11",key:"1n1gyv"}],["path",{d:"M19 5L5 19",key:"72u4yj"}]]);/**
92
+ */const _h=st("MoveUpRight",[["path",{d:"M13 5H19V11",key:"1n1gyv"}],["path",{d:"M19 5L5 19",key:"72u4yj"}]]);/**
93
93
  * @license lucide-react v0.468.0 - ISC
94
94
  *
95
95
  * This source code is licensed under the ISC license.
96
96
  * See the LICENSE file in the root directory of this source tree.
97
- */const uh=at("PenOff",[["path",{d:"m10 10-6.157 6.162a2 2 0 0 0-.5.833l-1.322 4.36a.5.5 0 0 0 .622.624l4.358-1.323a2 2 0 0 0 .83-.5L14 13.982",key:"bjo8r8"}],["path",{d:"m12.829 7.172 4.359-4.346a1 1 0 1 1 3.986 3.986l-4.353 4.353",key:"16h5ne"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
97
+ */const Th=st("PenOff",[["path",{d:"m10 10-6.157 6.162a2 2 0 0 0-.5.833l-1.322 4.36a.5.5 0 0 0 .622.624l4.358-1.323a2 2 0 0 0 .83-.5L14 13.982",key:"bjo8r8"}],["path",{d:"m12.829 7.172 4.359-4.346a1 1 0 1 1 3.986 3.986l-4.353 4.353",key:"16h5ne"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
98
98
  * @license lucide-react v0.468.0 - ISC
99
99
  *
100
100
  * This source code is licensed under the ISC license.
101
101
  * See the LICENSE file in the root directory of this source tree.
102
- */const dh=at("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);/**
102
+ */const Ah=st("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);/**
103
103
  * @license lucide-react v0.468.0 - ISC
104
104
  *
105
105
  * This source code is licensed under the ISC license.
106
106
  * See the LICENSE file in the root directory of this source tree.
107
- */const Di=at("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),fh={category:"Thư mục gốc",fileName:"Tên tệp",fullPath:"Đường dẫn đầy đủ",createAt:"Ngày tạo",creator:"Người tạo",creatorId:"ID người tạo",DataSource:"Nguồn dữ liệu",SuggestedAICategories:"Danh mục AI gợi ý",KeywordAISuggestion:"Từ khóa AI gợi ý",SummaryOfSuggestedAI:"Tóm tắt AI gợi ý",AccessLevel:"Cấp độ truy cập"},ph=e=>e==="SummaryOfSuggestedAI"||e==="KeywordAISuggestion"||e==="SuggestedAICategories",Mi=e=>e==="fullPath"||e==="createAt"||e==="creator"||e==="creatorId"||e==="DataSource"||e==="AccessLevel"||e==="category"||e==="fileName";function Dl(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function gh(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Dl(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():Dl(e[o],null)}}}}var Cn=f.forwardRef((e,t)=>{const{children:n,...r}=e,o=f.Children.toArray(n),i=o.find(mh);if(i){const a=i.props.children,s=o.map(u=>u===i?f.Children.count(a)>1?f.Children.only(null):f.isValidElement(a)?a.props.children:null:u);return l.jsx($i,{...r,ref:t,children:f.isValidElement(a)?f.cloneElement(a,void 0,s):null})}return l.jsx($i,{...r,ref:t,children:n})});Cn.displayName="Slot";var $i=f.forwardRef((e,t)=>{const{children:n,...r}=e;if(f.isValidElement(n)){const o=vh(n);return f.cloneElement(n,{...hh(r,n.props),ref:t?gh(t,o):o})}return f.Children.count(n)>1?f.Children.only(null):null});$i.displayName="SlotClone";var Ml=({children:e})=>l.jsx(l.Fragment,{children:e});function mh(e){return f.isValidElement(e)&&e.type===Ml}function hh(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function vh(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function $l(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=$l(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Il(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=$l(e))&&(r&&(r+=" "),r+=t);return r}const Ii="-",yh=e=>{const t=wh(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(Ii);return s[0]===""&&s.length!==1&&s.shift(),Ll(s,t)||xh(a)},getConflictingClassGroupIds:(a,s)=>{const u=n[a]||[];return s&&r[a]?[...u,...r[a]]:u}}},Ll=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Ll(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(Ii);return(a=t.validators.find(({validator:s})=>s(i)))==null?void 0:a.classGroupId},Rl=/^\[(.+)\]$/,xh=e=>{if(Rl.test(e)){const t=Rl.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},wh=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Sh(Object.entries(e.classGroups),n).forEach(([i,a])=>{Li(a,r,i,t)}),r},Li=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Vl(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(bh(o)){Li(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,a])=>{Li(a,Vl(t,i),n,r)})})},Vl=(e,t)=>{let n=e;return t.split(Ii).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},bh=e=>e.isThemeGetter,Sh=(e,t)=>t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([a,s])=>[t+a,s])):i);return[n,o]}):e,Ch=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(i,a)=>{n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let a=n.get(i);if(a!==void 0)return a;if((a=r.get(i))!==void 0)return o(i,a),a},set(i,a){n.has(i)?n.set(i,a):o(i,a)}}},jl="!",Eh=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],i=t.length,a=s=>{const u=[];let c=0,d=0,g;for(let y=0;y<s.length;y++){let w=s[y];if(c===0){if(w===o&&(r||s.slice(y,y+i)===t)){u.push(s.slice(d,y)),d=y+i;continue}if(w==="/"){g=y;continue}}w==="["?c++:w==="]"&&c--}const h=u.length===0?s:s.substring(d),p=h.startsWith(jl),v=p?h.substring(1):h,m=g&&g>d?g-d:void 0;return{modifiers:u,hasImportantModifier:p,baseClassName:v,maybePostfixModifierPosition:m}};return n?s=>n({className:s,parseClassName:a}):a},Th=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},_h=e=>({cache:Ch(e.cacheSize),parseClassName:Eh(e),...yh(e)}),Ah=/\s+/,Ph=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=[],a=e.trim().split(Ah);let s="";for(let u=a.length-1;u>=0;u-=1){const c=a[u],{modifiers:d,hasImportantModifier:g,baseClassName:h,maybePostfixModifierPosition:p}=n(c);let v=!!p,m=r(v?h.substring(0,p):h);if(!m){if(!v){s=c+(s.length>0?" "+s:s);continue}if(m=r(h),!m){s=c+(s.length>0?" "+s:s);continue}v=!1}const y=Th(d).join(":"),w=g?y+jl:y,b=w+m;if(i.includes(b))continue;i.push(b);const S=o(m,v);for(let E=0;E<S.length;++E){const x=S[E];i.push(w+x)}s=c+(s.length>0?" "+s:s)}return s};function Nh(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=zl(t))&&(r&&(r+=" "),r+=n);return r}const zl=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=zl(e[r]))&&(n&&(n+=" "),n+=t);return n};function Oh(e,...t){let n,r,o,i=a;function a(u){const c=t.reduce((d,g)=>g(d),e());return n=_h(c),r=n.cache.get,o=n.cache.set,i=s,s(u)}function s(u){const c=r(u);if(c)return c;const d=Ph(u,n);return o(u,d),d}return function(){return i(Nh.apply(null,arguments))}}const Ne=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Bl=/^\[(?:([a-z-]+):)?(.+)\]$/i,Fh=/^\d+\/\d+$/,kh=new Set(["px","full","screen"]),Dh=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Mh=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,$h=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Ih=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Lh=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Lt=e=>En(e)||kh.has(e)||Fh.test(e),Yt=e=>Tn(e,"length",Wh),En=e=>!!e&&!Number.isNaN(Number(e)),Ri=e=>Tn(e,"number",En),or=e=>!!e&&Number.isInteger(Number(e)),Rh=e=>e.endsWith("%")&&En(e.slice(0,-1)),xe=e=>Bl.test(e),Xt=e=>Dh.test(e),Vh=new Set(["length","size","percentage"]),jh=e=>Tn(e,Vh,Hl),zh=e=>Tn(e,"position",Hl),Bh=new Set(["image","url"]),Hh=e=>Tn(e,Bh,Gh),Uh=e=>Tn(e,"",qh),ir=()=>!0,Tn=(e,t,n)=>{const r=Bl.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},Wh=e=>Mh.test(e)&&!$h.test(e),Hl=()=>!1,qh=e=>Ih.test(e),Gh=e=>Lh.test(e),Kh=Oh(()=>{const e=Ne("colors"),t=Ne("spacing"),n=Ne("blur"),r=Ne("brightness"),o=Ne("borderColor"),i=Ne("borderRadius"),a=Ne("borderSpacing"),s=Ne("borderWidth"),u=Ne("contrast"),c=Ne("grayscale"),d=Ne("hueRotate"),g=Ne("invert"),h=Ne("gap"),p=Ne("gradientColorStops"),v=Ne("gradientColorStopPositions"),m=Ne("inset"),y=Ne("margin"),w=Ne("opacity"),b=Ne("padding"),S=Ne("saturate"),E=Ne("scale"),x=Ne("sepia"),O=Ne("skew"),M=Ne("space"),I=Ne("translate"),H=()=>["auto","contain","none"],k=()=>["auto","hidden","clip","visible","scroll"],G=()=>["auto",xe,t],U=()=>[xe,t],Z=()=>["",Lt,Yt],P=()=>["auto",En,xe],$=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],F=()=>["solid","dashed","dotted","double","none"],W=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],N=()=>["start","end","center","between","around","evenly","stretch"],V=()=>["","0",xe],_=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>[En,xe];return{cacheSize:500,separator:":",theme:{colors:[ir],spacing:[Lt,Yt],blur:["none","",Xt,xe],brightness:B(),borderColor:[e],borderRadius:["none","","full",Xt,xe],borderSpacing:U(),borderWidth:Z(),contrast:B(),grayscale:V(),hueRotate:B(),invert:V(),gap:U(),gradientColorStops:[e],gradientColorStopPositions:[Rh,Yt],inset:G(),margin:G(),opacity:B(),padding:U(),saturate:B(),scale:B(),sepia:V(),skew:B(),space:U(),translate:U()},classGroups:{aspect:[{aspect:["auto","square","video",xe]}],container:["container"],columns:[{columns:[Xt]}],"break-after":[{"break-after":_()}],"break-before":[{"break-before":_()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...$(),xe]}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",or,xe]}],basis:[{basis:G()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",xe]}],grow:[{grow:V()}],shrink:[{shrink:V()}],order:[{order:["first","last","none",or,xe]}],"grid-cols":[{"grid-cols":[ir]}],"col-start-end":[{col:["auto",{span:["full",or,xe]},xe]}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":[ir]}],"row-start-end":[{row:["auto",{span:[or,xe]},xe]}],"row-start":[{"row-start":P()}],"row-end":[{"row-end":P()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",xe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",xe]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...N()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...N(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...N(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[M]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[M]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",xe,t]}],"min-w":[{"min-w":[xe,t,"min","max","fit"]}],"max-w":[{"max-w":[xe,t,"none","full","min","max","fit","prose",{screen:[Xt]},Xt]}],h:[{h:[xe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[xe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[xe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[xe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Xt,Yt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ri]}],"font-family":[{font:[ir]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",xe]}],"line-clamp":[{"line-clamp":["none",En,Ri]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Lt,xe]}],"list-image":[{"list-image":["none",xe]}],"list-style-type":[{list:["none","disc","decimal",xe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Lt,Yt]}],"underline-offset":[{"underline-offset":["auto",Lt,xe]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:U()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",xe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",xe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...$(),zh]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",jh]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Hh]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[w]}],"border-style":[{border:[...F(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[w]}],"divide-style":[{divide:F()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...F()]}],"outline-offset":[{"outline-offset":[Lt,xe]}],"outline-w":[{outline:[Lt,Yt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[Lt,Yt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Xt,Uh]}],"shadow-color":[{shadow:[ir]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...W(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":W()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",Xt,xe]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[g]}],saturate:[{saturate:[S]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[S]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",xe]}],duration:[{duration:B()}],ease:[{ease:["linear","in","out","in-out",xe]}],delay:[{delay:B()}],animate:[{animate:["none","spin","ping","pulse","bounce",xe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[E]}],"scale-x":[{"scale-x":[E]}],"scale-y":[{"scale-y":[E]}],rotate:[{rotate:[or,xe]}],"translate-x":[{"translate-x":[I]}],"translate-y":[{"translate-y":[I]}],"skew-x":[{"skew-x":[O]}],"skew-y":[{"skew-y":[O]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",xe]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",xe]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":U()}],"scroll-mx":[{"scroll-mx":U()}],"scroll-my":[{"scroll-my":U()}],"scroll-ms":[{"scroll-ms":U()}],"scroll-me":[{"scroll-me":U()}],"scroll-mt":[{"scroll-mt":U()}],"scroll-mr":[{"scroll-mr":U()}],"scroll-mb":[{"scroll-mb":U()}],"scroll-ml":[{"scroll-ml":U()}],"scroll-p":[{"scroll-p":U()}],"scroll-px":[{"scroll-px":U()}],"scroll-py":[{"scroll-py":U()}],"scroll-ps":[{"scroll-ps":U()}],"scroll-pe":[{"scroll-pe":U()}],"scroll-pt":[{"scroll-pt":U()}],"scroll-pr":[{"scroll-pr":U()}],"scroll-pb":[{"scroll-pb":U()}],"scroll-pl":[{"scroll-pl":U()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",xe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Lt,Yt,Ri]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function ge(...e){return Kh(Il(e))}const Yh=e=>{if(e===0)return"0 Bytes";const t=1024,n=["Bytes","KB","MB","GB","TB"],r=Math.floor(Math.log(e)/Math.log(t));return`${parseFloat((e/Math.pow(t,r)).toFixed(2))} ${n[r]}`},Ul=f.forwardRef(({className:e,...t},n)=>l.jsx("nav",{ref:n,"aria-label":"breadcrumb",className:ge("s3-explr-ui-breadcrumb",e),...t}));Ul.displayName="Breadcrumb";const Wl=f.forwardRef(({className:e,...t},n)=>l.jsx("ol",{ref:n,className:ge("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5","s3-explr-ui-breadcrumb-list",e),...t}));Wl.displayName="BreadcrumbList";const Vi=f.forwardRef(({className:e,...t},n)=>l.jsx("li",{ref:n,className:ge("inline-flex items-center gap-1.5","s3-explr-ui-breadcrumb-item",e),...t}));Vi.displayName="BreadcrumbItem";const ji=f.forwardRef(({asChild:e,className:t,...n},r)=>{const o=e?Cn:"a";return l.jsx(o,{ref:r,className:ge("transition-colors hover:text-foreground","s3-explr-ui-breadcrumb-link",t),...n})});ji.displayName="BreadcrumbLink";const Xh=f.forwardRef(({className:e,...t},n)=>l.jsx("span",{ref:n,role:"link","aria-disabled":"true","aria-current":"page",className:ge("font-normal text-foreground","s3-explr-ui-breadcrumb-page",e),...t}));Xh.displayName="BreadcrumbPage";const ql=({children:e,className:t,...n})=>l.jsx("li",{role:"presentation","aria-hidden":"true",className:ge("[&>svg]:w-3.5 [&>svg]:h-3.5","s3-explr-ui-breadcrumb-separator",t),...n,children:e??l.jsx(kl,{})});ql.displayName="BreadcrumbSeparator";const Gl=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Kl=Il,zi=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Kl(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(c=>{const d=n==null?void 0:n[c],g=i==null?void 0:i[c];if(d===null)return null;const h=Gl(d)||Gl(g);return o[c][h]}),s=n&&Object.entries(n).reduce((c,d)=>{let[g,h]=d;return h===void 0||(c[g]=h),c},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,d)=>{let{class:g,className:h,...p}=d;return Object.entries(p).every(v=>{let[m,y]=v;return Array.isArray(y)?y.includes({...i,...s}[m]):{...i,...s}[m]===y})?[...c,g,h]:c},[]);return Kl(e,a,u,n==null?void 0:n.class,n==null?void 0:n.className)},Yl=zi("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 s3-explr-ui-button",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90 s3-explr-ui-button-default",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90 s3-explr-ui-button-destructive",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground s3-explr-ui-button-outline",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80 s3-explr-ui-button-secondary",ghost:"hover:bg-accent hover:text-accent-foreground s3-explr-ui-button-ghost",link:"text-primary underline-offset-4 hover:underline s3-explr-ui-button-link"},size:{default:"h-9 px-4 py-2 s3-explr-ui-button-size-default",sm:"h-8 rounded-md px-3 text-xs s3-explr-ui-button-size-sm",lg:"h-10 rounded-md px-8 s3-explr-ui-button-size-lg",icon:"h-9 w-9 s3-explr-ui-button-size-icon"}},defaultVariants:{variant:"default",size:"default"}}),we=f.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},i)=>{const a=r?Cn:"button";return l.jsx(a,{className:ge(Yl({variant:t,size:n,className:e})),ref:i,...o})});we.displayName="Button";function Jh(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function qr(...e){return t=>e.forEach(n=>Jh(n,t))}function st(...e){return f.useCallback(qr(...e),e)}function Zh(e,t){const n=f.createContext(t),r=i=>{const{children:a,...s}=i,u=f.useMemo(()=>s,Object.values(s));return l.jsx(n.Provider,{value:u,children:a})};r.displayName=e+"Provider";function o(i){const a=f.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function Jt(e,t=[]){let n=[];function r(i,a){const s=f.createContext(a),u=n.length;n=[...n,a];const c=g=>{var w;const{scope:h,children:p,...v}=g,m=((w=h==null?void 0:h[e])==null?void 0:w[u])||s,y=f.useMemo(()=>v,Object.values(v));return l.jsx(m.Provider,{value:y,children:p})};c.displayName=i+"Provider";function d(g,h){var m;const p=((m=h==null?void 0:h[e])==null?void 0:m[u])||s,v=f.useContext(p);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${g}\` must be used within \`${i}\``)}return[c,d]}const o=()=>{const i=n.map(a=>f.createContext(a));return function(s){const u=(s==null?void 0:s[e])||i;return f.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return o.scopeName=e,[r,Qh(o,...t)]}function Qh(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:u,scopeName:c})=>{const g=u(i)[`__scope${c}`];return{...s,...g}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Ie(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function We(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function _n({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=ev({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=We(n),u=f.useCallback(c=>{if(i){const g=typeof c=="function"?c(e):c;g!==e&&s(g)}else o(c)},[i,e,o,s]);return[a,u]}function ev({defaultProp:e,onChange:t}){const n=f.useState(e),[r]=n,o=f.useRef(r),i=We(t);return f.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}function tv(e){const t=f.useRef({value:e,previous:e});return f.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var et=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{};function Xl(e){const[t,n]=f.useState(void 0);return et(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const u=i.borderBoxSize,c=Array.isArray(u)?u[0]:u;a=c.inlineSize,s=c.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function nv(e,t){return f.useReducer((n,r)=>t[n][r]??n,e)}var An=e=>{const{present:t,children:n}=e,r=rv(t),o=typeof n=="function"?n({present:r.isPresent}):f.Children.only(n),i=st(r.ref,ov(o));return typeof n=="function"||r.isPresent?f.cloneElement(o,{ref:i}):null};An.displayName="Presence";function rv(e){const[t,n]=f.useState(),r=f.useRef({}),o=f.useRef(e),i=f.useRef("none"),a=e?"mounted":"unmounted",[s,u]=nv(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const c=Gr(r.current);i.current=s==="mounted"?c:"none"},[s]),et(()=>{const c=r.current,d=o.current;if(d!==e){const h=i.current,p=Gr(c);e?u("MOUNT"):p==="none"||(c==null?void 0:c.display)==="none"?u("UNMOUNT"):u(d&&h!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),et(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,g=p=>{const m=Gr(r.current).includes(p.animationName);if(p.target===t&&m&&(u("ANIMATION_END"),!o.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},h=p=>{p.target===t&&(i.current=Gr(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",g),t.addEventListener("animationend",g),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",g),t.removeEventListener("animationend",g)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:f.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function Gr(e){return(e==null?void 0:e.animationName)||"none"}function ov(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Jl=f.forwardRef((e,t)=>{const{children:n,...r}=e,o=f.Children.toArray(n),i=o.find(av);if(i){const a=i.props.children,s=o.map(u=>u===i?f.Children.count(a)>1?f.Children.only(null):f.isValidElement(a)?a.props.children:null:u);return l.jsx(Bi,{...r,ref:t,children:f.isValidElement(a)?f.cloneElement(a,void 0,s):null})}return l.jsx(Bi,{...r,ref:t,children:n})});Jl.displayName="Slot";var Bi=f.forwardRef((e,t)=>{const{children:n,...r}=e;if(f.isValidElement(n)){const o=lv(n);return f.cloneElement(n,{...sv(r,n.props),ref:t?qr(t,o):o})}return f.Children.count(n)>1?f.Children.only(null):null});Bi.displayName="SlotClone";var iv=({children:e})=>l.jsx(l.Fragment,{children:e});function av(e){return f.isValidElement(e)&&e.type===iv}function sv(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function lv(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var cv=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Le=cv.reduce((e,t)=>{const n=f.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?Jl:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Zl(e,t){e&&Pr.flushSync(()=>e.dispatchEvent(t))}var Hi="Checkbox",[uv,yE]=Jt(Hi),[dv,fv]=uv(Hi),Ql=f.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:i,required:a,disabled:s,value:u="on",onCheckedChange:c,form:d,...g}=e,[h,p]=f.useState(null),v=st(t,E=>p(E)),m=f.useRef(!1),y=h?d||!!h.closest("form"):!0,[w=!1,b]=_n({prop:o,defaultProp:i,onChange:c}),S=f.useRef(w);return f.useEffect(()=>{const E=h==null?void 0:h.form;if(E){const x=()=>b(S.current);return E.addEventListener("reset",x),()=>E.removeEventListener("reset",x)}},[h,b]),l.jsxs(dv,{scope:n,state:w,disabled:s,children:[l.jsx(Le.button,{type:"button",role:"checkbox","aria-checked":Zt(w)?"mixed":w,"aria-required":a,"data-state":nc(w),"data-disabled":s?"":void 0,disabled:s,value:u,...g,ref:v,onKeyDown:Ie(e.onKeyDown,E=>{E.key==="Enter"&&E.preventDefault()}),onClick:Ie(e.onClick,E=>{b(x=>Zt(x)?!0:!x),y&&(m.current=E.isPropagationStopped(),m.current||E.stopPropagation())})}),y&&l.jsx(pv,{control:h,bubbles:!m.current,name:r,value:u,checked:w,required:a,disabled:s,form:d,style:{transform:"translateX(-100%)"},defaultChecked:Zt(i)?!1:i})]})});Ql.displayName=Hi;var ec="CheckboxIndicator",tc=f.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=fv(ec,n);return l.jsx(An,{present:r||Zt(i.state)||i.state===!0,children:l.jsx(Le.span,{"data-state":nc(i.state),"data-disabled":i.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});tc.displayName=ec;var pv=e=>{const{control:t,checked:n,bubbles:r=!0,defaultChecked:o,...i}=e,a=f.useRef(null),s=tv(n),u=Xl(t);f.useEffect(()=>{const d=a.current,g=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(g,"checked").set;if(s!==n&&p){const v=new Event("click",{bubbles:r});d.indeterminate=Zt(n),p.call(d,Zt(n)?!1:n),d.dispatchEvent(v)}},[s,n,r]);const c=f.useRef(Zt(n)?!1:n);return l.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:o??c.current,...i,tabIndex:-1,ref:a,style:{...e.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Zt(e){return e==="indeterminate"}function nc(e){return Zt(e)?"indeterminate":e?"checked":"unchecked"}var rc=Ql,gv=tc;const Ui=f.forwardRef(({className:e,...t},n)=>l.jsx(rc,{ref:n,className:ge("s3-explr-ui-checkbox peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:l.jsx(gv,{className:ge("s3-explr-ui-checkbox-indicator flex items-center justify-center text-current"),children:l.jsx(ih,{className:"s3-explr-ui-checkbox-check h-4 w-4"})})}));Ui.displayName=rc.displayName;var mv=f.useId||(()=>{}),hv=0;function Pn(e){const[t,n]=f.useState(mv());return et(()=>{e||n(r=>r??String(hv++))},[e]),e||(t?`radix-${t}`:"")}function oc(e,t=globalThis==null?void 0:globalThis.document){const n=We(e);f.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var vv="DismissableLayer",Wi="dismissableLayer.update",yv="dismissableLayer.pointerDownOutside",xv="dismissableLayer.focusOutside",ic,ac=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),qi=f.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...u}=e,c=f.useContext(ac),[d,g]=f.useState(null),h=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=f.useState({}),v=st(t,M=>g(M)),m=Array.from(c.layers),[y]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),w=m.indexOf(y),b=d?m.indexOf(d):-1,S=c.layersWithOutsidePointerEventsDisabled.size>0,E=b>=w,x=bv(M=>{const I=M.target,H=[...c.branches].some(k=>k.contains(I));!E||H||(o==null||o(M),a==null||a(M),M.defaultPrevented||s==null||s())},h),O=Sv(M=>{const I=M.target;[...c.branches].some(k=>k.contains(I))||(i==null||i(M),a==null||a(M),M.defaultPrevented||s==null||s())},h);return oc(M=>{b===c.layers.size-1&&(r==null||r(M),!M.defaultPrevented&&s&&(M.preventDefault(),s()))},h),f.useEffect(()=>{if(d)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(ic=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),lc(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=ic)}},[d,h,n,c]),f.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),lc())},[d,c]),f.useEffect(()=>{const M=()=>p({});return document.addEventListener(Wi,M),()=>document.removeEventListener(Wi,M)},[]),l.jsx(Le.div,{...u,ref:v,style:{pointerEvents:S?E?"auto":"none":void 0,...e.style},onFocusCapture:Ie(e.onFocusCapture,O.onFocusCapture),onBlurCapture:Ie(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:Ie(e.onPointerDownCapture,x.onPointerDownCapture)})});qi.displayName=vv;var wv="DismissableLayerBranch",sc=f.forwardRef((e,t)=>{const n=f.useContext(ac),r=f.useRef(null),o=st(t,r);return f.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),l.jsx(Le.div,{...e,ref:o})});sc.displayName=wv;function bv(e,t=globalThis==null?void 0:globalThis.document){const n=We(e),r=f.useRef(!1),o=f.useRef(()=>{});return f.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let u=function(){cc(yv,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Sv(e,t=globalThis==null?void 0:globalThis.document){const n=We(e),r=f.useRef(!1);return f.useEffect(()=>{const o=i=>{i.target&&!r.current&&cc(xv,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function lc(){const e=new CustomEvent(Wi);document.dispatchEvent(e)}function cc(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Zl(o,i):o.dispatchEvent(i)}var Cv=qi,Ev=sc,Gi="focusScope.autoFocusOnMount",Ki="focusScope.autoFocusOnUnmount",uc={bubbles:!1,cancelable:!0},Tv="FocusScope",dc=f.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,u]=f.useState(null),c=We(o),d=We(i),g=f.useRef(null),h=st(t,m=>u(m)),p=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(r){let m=function(S){if(p.paused||!s)return;const E=S.target;s.contains(E)?g.current=E:Qt(g.current,{select:!0})},y=function(S){if(p.paused||!s)return;const E=S.relatedTarget;E!==null&&(s.contains(E)||Qt(g.current,{select:!0}))},w=function(S){if(document.activeElement===document.body)for(const x of S)x.removedNodes.length>0&&Qt(s)};document.addEventListener("focusin",m),document.addEventListener("focusout",y);const b=new MutationObserver(w);return s&&b.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",y),b.disconnect()}}},[r,s,p.paused]),f.useEffect(()=>{if(s){gc.add(p);const m=document.activeElement;if(!s.contains(m)){const w=new CustomEvent(Gi,uc);s.addEventListener(Gi,c),s.dispatchEvent(w),w.defaultPrevented||(_v(Fv(fc(s)),{select:!0}),document.activeElement===m&&Qt(s))}return()=>{s.removeEventListener(Gi,c),setTimeout(()=>{const w=new CustomEvent(Ki,uc);s.addEventListener(Ki,d),s.dispatchEvent(w),w.defaultPrevented||Qt(m??document.body,{select:!0}),s.removeEventListener(Ki,d),gc.remove(p)},0)}}},[s,c,d,p]);const v=f.useCallback(m=>{if(!n&&!r||p.paused)return;const y=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,w=document.activeElement;if(y&&w){const b=m.currentTarget,[S,E]=Av(b);S&&E?!m.shiftKey&&w===E?(m.preventDefault(),n&&Qt(S,{select:!0})):m.shiftKey&&w===S&&(m.preventDefault(),n&&Qt(E,{select:!0})):w===b&&m.preventDefault()}},[n,r,p.paused]);return l.jsx(Le.div,{tabIndex:-1,...a,ref:h,onKeyDown:v})});dc.displayName=Tv;function _v(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Qt(r,{select:t}),document.activeElement!==n)return}function Av(e){const t=fc(e),n=pc(t,e),r=pc(t.reverse(),e);return[n,r]}function fc(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function pc(e,t){for(const n of e)if(!Pv(n,{upTo:t}))return n}function Pv(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Nv(e){return e instanceof HTMLInputElement&&"select"in e}function Qt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Nv(e)&&t&&e.select()}}var gc=Ov();function Ov(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=mc(e,t),e.unshift(t)},remove(t){var n;e=mc(e,t),(n=e[0])==null||n.resume()}}}function mc(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Fv(e){return e.filter(t=>t.tagName!=="A")}var kv="Portal",Yi=f.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,i]=f.useState(!1);et(()=>i(!0),[]);const a=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?Jo.createPortal(l.jsx(Le.div,{...r,ref:t}),a):null});Yi.displayName=kv;var Xi=0;function Dv(){f.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??hc()),document.body.insertAdjacentElement("beforeend",e[1]??hc()),Xi++,()=>{Xi===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Xi--}},[])}function hc(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var bt=function(){return bt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},bt.apply(this,arguments)};function vc(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 o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function dn(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(d){try{c(r.next(d))}catch(g){a(g)}}function u(d){try{c(r.throw(d))}catch(g){a(g)}}function c(d){d.done?i(d.value):o(d.value).then(s,u)}c((r=r.apply(e,t||[])).next())})}function yc(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i}function xc(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Kr="right-scroll-bar-position",Yr="width-before-scroll-bar",Mv="with-scroll-bars-hidden",$v="--removed-body-scroll-bar-size";function Ji(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Iv(e,t){var n=T.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Lv=typeof window<"u"?f.useLayoutEffect:f.useEffect,wc=new WeakMap;function Rv(e,t){var n=Iv(null,function(r){return e.forEach(function(o){return Ji(o,r)})});return Lv(function(){var r=wc.get(n);if(r){var o=new Set(r),i=new Set(e),a=n.current;o.forEach(function(s){i.has(s)||Ji(s,null)}),i.forEach(function(s){o.has(s)||Ji(s,a)})}wc.set(n,e)},[e]),n}function Vv(e){return e}function jv(e,t){t===void 0&&(t=Vv);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var a=t(i,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(i),a=n}var u=function(){var d=a;a=[],d.forEach(i)},c=function(){return Promise.resolve().then(u)};c(),n={push:function(d){a.push(d),c()},filter:function(d){return a=a.filter(d),n}}}};return o}function zv(e){e===void 0&&(e={});var t=jv(null);return t.options=bt({async:!0,ssr:!1},e),t}var bc=function(e){var t=e.sideCar,n=vc(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return f.createElement(r,bt({},n))};bc.isSideCarExport=!0;function Bv(e,t){return e.useMedium(t),bc}var Sc=zv(),Zi=function(){},Xr=f.forwardRef(function(e,t){var n=f.useRef(null),r=f.useState({onScrollCapture:Zi,onWheelCapture:Zi,onTouchMoveCapture:Zi}),o=r[0],i=r[1],a=e.forwardProps,s=e.children,u=e.className,c=e.removeScrollBar,d=e.enabled,g=e.shards,h=e.sideCar,p=e.noIsolation,v=e.inert,m=e.allowPinchZoom,y=e.as,w=y===void 0?"div":y,b=e.gapMode,S=vc(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=h,x=Rv([n,t]),O=bt(bt({},S),o);return f.createElement(f.Fragment,null,d&&f.createElement(E,{sideCar:Sc,removeScrollBar:c,shards:g,noIsolation:p,inert:v,setCallbacks:i,allowPinchZoom:!!m,lockRef:n,gapMode:b}),a?f.cloneElement(f.Children.only(s),bt(bt({},O),{ref:x})):f.createElement(w,bt({},O,{className:u,ref:x}),s))});Xr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Xr.classNames={fullWidth:Yr,zeroRight:Kr};var Hv=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Uv(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Hv();return t&&e.setAttribute("nonce",t),e}function Wv(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function qv(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Gv=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Uv())&&(Wv(t,n),qv(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Kv=function(){var e=Gv();return function(t,n){f.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Cc=function(){var e=Kv(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Yv={left:0,top:0,right:0,gap:0},Qi=function(e){return parseInt(e||"",10)||0},Xv=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Qi(n),Qi(r),Qi(o)]},Jv=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Yv;var t=Xv(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Zv=Cc(),Nn="data-scroll-locked",Qv=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
108
- .`.concat(Mv,` {
107
+ */const Vi=st("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function zl(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=zl(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Bl(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=zl(e))&&(r&&(r+=" "),r+=t);return r}function Ph(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.firstChild?t.insertBefore(n,t.firstChild):t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}Ph(`:root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: hsl(6, 78%, 57%);--toastify-color-transparent: rgba(255, 255, 255, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-container-width: fit-content;--toastify-toast-width: 320px;--toastify-toast-offset: 16px;--toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));--toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));--toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));--toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));--toastify-toast-background: #fff;--toastify-toast-padding: 14px;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-toast-bd-radius: 6px;--toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, .1);--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error);--toastify-color-progress-bgo: .2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index));position:fixed;width:var(--toastify-container-width);box-sizing:border-box;color:#fff;display:flex;flex-direction:column}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right);align-items:end}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right);align-items:end}.Toastify__toast{--y: 0;position:relative;touch-action:none;width:var(--toastify-toast-width);min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:var(--toastify-toast-padding);border-radius:var(--toastify-toast-bd-radius);box-shadow:var(--toastify-toast-shadow);max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);z-index:0;display:flex;flex:1 auto;align-items:center;word-break:break-word}@media only screen and (max-width: 480px){.Toastify__toast-container{width:100vw;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translate(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:initial}.Toastify__toast{--toastify-toast-width: 100%;margin-bottom:0;border-radius:0}}.Toastify__toast-container[data-stacked=true]{width:var(--toastify-toast-width)}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,.Toastify__toast--stacked[data-collapsed] .Toastify__close-button{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-icon{margin-inline-end:10px;width:22px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;position:absolute;top:6px;right:6px;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;z-index:1}.Toastify__toast--rtl .Toastify__close-button{left:6px;right:unset}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:1;opacity:.7;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right;border-bottom-left-radius:initial}.Toastify__progress-bar--wrp{position:absolute;overflow:hidden;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius);border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
108
+ `);var ji=e=>typeof e=="number"&&!isNaN(e),ar=e=>typeof e=="string",Hl=e=>typeof e=="function",Nh=e=>ar(e)||ji(e),kh=e=>_.isValidElement(e)||ar(e)||Hl(e)||ji(e),Oh=1,Ul=()=>`${Oh++}`,Ct=new Map,zi=[],Wl=new Set,ql=()=>Ct.size>0,Fh=(e,{containerId:t})=>{var n;return(n=Ct.get(t||1))==null?void 0:n.toasts.get(e)};function Dh(e,t){var n;if(t)return!!((n=Ct.get(t))!=null&&n.isToastActive(e));let r=!1;return Ct.forEach(o=>{o.isToastActive(e)&&(r=!0)}),r}function Ih(e){if(!ql()){zi=zi.filter(t=>e!=null&&t.options.toastId!==e);return}if(e==null||Nh(e))Ct.forEach(t=>{t.removeToast(e)});else if(e&&("containerId"in e||"id"in e)){let t=Ct.get(e.containerId);t?t.removeToast(e.id):Ct.forEach(n=>{n.removeToast(e.id)})}}var Mh=(e={})=>{Ct.forEach(t=>{t.props.limit&&(!e.containerId||t.id===e.containerId)&&t.clearQueue()})};function $h(e,t){kh(e)&&(ql()||zi.push({content:e,options:t}),Ct.forEach(n=>{n.buildToast(e,t)}))}function Gl(e,t){Ct.forEach(n=>{(t==null||!(t!=null&&t.containerId)||(t==null?void 0:t.containerId)===n.id)&&n.toggle(e,t==null?void 0:t.id)})}function Lh(e){return Wl.add(e),()=>{Wl.delete(e)}}function Rh(e){return e&&(ar(e.toastId)||ji(e.toastId))?e.toastId:Ul()}function sr(e,t){return $h(e,t),t.toastId}function Xr(e,t){return{...t,type:t&&t.type||e,toastId:Rh(t)}}function Jr(e){return(t,n)=>sr(t,Xr(e,n))}function Ne(e,t){return sr(e,Xr("default",t))}Ne.loading=(e,t)=>sr(e,Xr("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t}));function Vh(e,{pending:t,error:n,success:r},o){let i;t&&(i=ar(t)?Ne.loading(t,o):Ne.loading(t.render,{...o,...t}));let a={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},s=(c,d,g)=>{if(d==null){Ne.dismiss(i);return}let m={type:c,...a,...o,data:g},f=ar(d)?{render:d}:d;return i?Ne.update(i,{...m,...f}):Ne(f.render,{...m,...f}),g},u=Hl(e)?e():e;return u.then(c=>s("success",r,c)).catch(c=>s("error",n,c)),u}Ne.promise=Vh,Ne.success=Jr("success"),Ne.info=Jr("info"),Ne.error=Jr("error"),Ne.warning=Jr("warning"),Ne.warn=Ne.warning,Ne.dark=(e,t)=>sr(e,Xr("default",{theme:"dark",...t}));function jh(e){Ih(e)}Ne.dismiss=jh,Ne.clearWaitingQueue=Mh,Ne.isActive=Dh,Ne.update=(e,t={})=>{let n=Fh(e,t);if(n){let{props:r,content:o}=n,i={delay:100,...r,...t,toastId:t.toastId||e,updateId:Ul()};i.toastId!==e&&(i.staleId=e);let a=i.render||o;delete i.render,sr(a,i)}},Ne.done=e=>{Ne.update(e,{progress:1})},Ne.onChange=Lh,Ne.play=e=>Gl(!0,e),Ne.pause=e=>Gl(!1,e);const zh={category:"Thư mục gốc",fileName:"Tên tệp",fullPath:"Đường dẫn đầy đủ",createAt:"Ngày tạo",creator:"Người tạo",creatorId:"ID người tạo",DataSource:"Nguồn dữ liệu",SuggestedAICategories:"Danh mục AI gợi ý",KeywordAISuggestion:"Từ khóa AI gợi ý",SummaryOfSuggestedAI:"Tóm tắt AI gợi ý",AccessLevel:"Cấp độ truy cập"},Bh=e=>e==="SummaryOfSuggestedAI"||e==="KeywordAISuggestion"||e==="SuggestedAICategories",Bi=e=>e==="fullPath"||e==="createAt"||e==="creator"||e==="creatorId"||e==="DataSource"||e==="AccessLevel"||e==="category"||e==="fileName";function Kl(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Hh(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Kl(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():Kl(e[o],null)}}}}var _n=p.forwardRef((e,t)=>{const{children:n,...r}=e,o=p.Children.toArray(n),i=o.find(Uh);if(i){const a=i.props.children,s=o.map(u=>u===i?p.Children.count(a)>1?p.Children.only(null):p.isValidElement(a)?a.props.children:null:u);return l.jsx(Hi,{...r,ref:t,children:p.isValidElement(a)?p.cloneElement(a,void 0,s):null})}return l.jsx(Hi,{...r,ref:t,children:n})});_n.displayName="Slot";var Hi=p.forwardRef((e,t)=>{const{children:n,...r}=e;if(p.isValidElement(n)){const o=qh(n);return p.cloneElement(n,{...Wh(r,n.props),ref:t?Hh(t,o):o})}return p.Children.count(n)>1?p.Children.only(null):null});Hi.displayName="SlotClone";var Yl=({children:e})=>l.jsx(l.Fragment,{children:e});function Uh(e){return p.isValidElement(e)&&e.type===Yl}function Wh(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function qh(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const Ui="-",Gh=e=>{const t=Yh(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(Ui);return s[0]===""&&s.length!==1&&s.shift(),Xl(s,t)||Kh(a)},getConflictingClassGroupIds:(a,s)=>{const u=n[a]||[];return s&&r[a]?[...u,...r[a]]:u}}},Xl=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Xl(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(Ui);return(a=t.validators.find(({validator:s})=>s(i)))==null?void 0:a.classGroupId},Jl=/^\[(.+)\]$/,Kh=e=>{if(Jl.test(e)){const t=Jl.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Yh=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Jh(Object.entries(e.classGroups),n).forEach(([i,a])=>{Wi(a,r,i,t)}),r},Wi=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Zl(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(Xh(o)){Wi(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,a])=>{Wi(a,Zl(t,i),n,r)})})},Zl=(e,t)=>{let n=e;return t.split(Ui).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Xh=e=>e.isThemeGetter,Jh=(e,t)=>t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([a,s])=>[t+a,s])):i);return[n,o]}):e,Zh=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(i,a)=>{n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let a=n.get(i);if(a!==void 0)return a;if((a=r.get(i))!==void 0)return o(i,a),a},set(i,a){n.has(i)?n.set(i,a):o(i,a)}}},Ql="!",Qh=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],i=t.length,a=s=>{const u=[];let c=0,d=0,g;for(let y=0;y<s.length;y++){let b=s[y];if(c===0){if(b===o&&(r||s.slice(y,y+i)===t)){u.push(s.slice(d,y)),d=y+i;continue}if(b==="/"){g=y;continue}}b==="["?c++:b==="]"&&c--}const m=u.length===0?s:s.substring(d),f=m.startsWith(Ql),v=f?m.substring(1):m,h=g&&g>d?g-d:void 0;return{modifiers:u,hasImportantModifier:f,baseClassName:v,maybePostfixModifierPosition:h}};return n?s=>n({className:s,parseClassName:a}):a},ev=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},tv=e=>({cache:Zh(e.cacheSize),parseClassName:Qh(e),...Gh(e)}),nv=/\s+/,rv=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=[],a=e.trim().split(nv);let s="";for(let u=a.length-1;u>=0;u-=1){const c=a[u],{modifiers:d,hasImportantModifier:g,baseClassName:m,maybePostfixModifierPosition:f}=n(c);let v=!!f,h=r(v?m.substring(0,f):m);if(!h){if(!v){s=c+(s.length>0?" "+s:s);continue}if(h=r(m),!h){s=c+(s.length>0?" "+s:s);continue}v=!1}const y=ev(d).join(":"),b=g?y+Ql:y,w=b+h;if(i.includes(w))continue;i.push(w);const C=o(h,v);for(let E=0;E<C.length;++E){const x=C[E];i.push(b+x)}s=c+(s.length>0?" "+s:s)}return s};function ov(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=ec(t))&&(r&&(r+=" "),r+=n);return r}const ec=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=ec(e[r]))&&(n&&(n+=" "),n+=t);return n};function iv(e,...t){let n,r,o,i=a;function a(u){const c=t.reduce((d,g)=>g(d),e());return n=tv(c),r=n.cache.get,o=n.cache.set,i=s,s(u)}function s(u){const c=r(u);if(c)return c;const d=rv(u,n);return o(u,d),d}return function(){return i(ov.apply(null,arguments))}}const Oe=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},tc=/^\[(?:([a-z-]+):)?(.+)\]$/i,av=/^\d+\/\d+$/,sv=new Set(["px","full","screen"]),lv=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,cv=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,uv=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,dv=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,fv=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Vt=e=>Tn(e)||sv.has(e)||av.test(e),Jt=e=>An(e,"length",bv),Tn=e=>!!e&&!Number.isNaN(Number(e)),qi=e=>An(e,"number",Tn),lr=e=>!!e&&Number.isInteger(Number(e)),pv=e=>e.endsWith("%")&&Tn(e.slice(0,-1)),xe=e=>tc.test(e),Zt=e=>lv.test(e),gv=new Set(["length","size","percentage"]),mv=e=>An(e,gv,nc),hv=e=>An(e,"position",nc),vv=new Set(["image","url"]),yv=e=>An(e,vv,Cv),xv=e=>An(e,"",wv),cr=()=>!0,An=(e,t,n)=>{const r=tc.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},bv=e=>cv.test(e)&&!uv.test(e),nc=()=>!1,wv=e=>dv.test(e),Cv=e=>fv.test(e),Sv=iv(()=>{const e=Oe("colors"),t=Oe("spacing"),n=Oe("blur"),r=Oe("brightness"),o=Oe("borderColor"),i=Oe("borderRadius"),a=Oe("borderSpacing"),s=Oe("borderWidth"),u=Oe("contrast"),c=Oe("grayscale"),d=Oe("hueRotate"),g=Oe("invert"),m=Oe("gap"),f=Oe("gradientColorStops"),v=Oe("gradientColorStopPositions"),h=Oe("inset"),y=Oe("margin"),b=Oe("opacity"),w=Oe("padding"),C=Oe("saturate"),E=Oe("scale"),x=Oe("sepia"),O=Oe("skew"),I=Oe("space"),$=Oe("translate"),H=()=>["auto","contain","none"],D=()=>["auto","hidden","clip","visible","scroll"],G=()=>["auto",xe,t],U=()=>[xe,t],Z=()=>["",Vt,Jt],N=()=>["auto",Tn,xe],M=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],F=()=>["solid","dashed","dotted","double","none"],q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],k=()=>["start","end","center","between","around","evenly","stretch"],j=()=>["","0",xe],T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>[Tn,xe];return{cacheSize:500,separator:":",theme:{colors:[cr],spacing:[Vt,Jt],blur:["none","",Zt,xe],brightness:B(),borderColor:[e],borderRadius:["none","","full",Zt,xe],borderSpacing:U(),borderWidth:Z(),contrast:B(),grayscale:j(),hueRotate:B(),invert:j(),gap:U(),gradientColorStops:[e],gradientColorStopPositions:[pv,Jt],inset:G(),margin:G(),opacity:B(),padding:U(),saturate:B(),scale:B(),sepia:j(),skew:B(),space:U(),translate:U()},classGroups:{aspect:[{aspect:["auto","square","video",xe]}],container:["container"],columns:[{columns:[Zt]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...M(),xe]}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",lr,xe]}],basis:[{basis:G()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",xe]}],grow:[{grow:j()}],shrink:[{shrink:j()}],order:[{order:["first","last","none",lr,xe]}],"grid-cols":[{"grid-cols":[cr]}],"col-start-end":[{col:["auto",{span:["full",lr,xe]},xe]}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":[cr]}],"row-start-end":[{row:["auto",{span:[lr,xe]},xe]}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",xe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",xe]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...k()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...k(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...k(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[I]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[I]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",xe,t]}],"min-w":[{"min-w":[xe,t,"min","max","fit"]}],"max-w":[{"max-w":[xe,t,"none","full","min","max","fit","prose",{screen:[Zt]},Zt]}],h:[{h:[xe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[xe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[xe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[xe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Zt,Jt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",qi]}],"font-family":[{font:[cr]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",xe]}],"line-clamp":[{"line-clamp":["none",Tn,qi]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Vt,xe]}],"list-image":[{"list-image":["none",xe]}],"list-style-type":[{list:["none","disc","decimal",xe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Vt,Jt]}],"underline-offset":[{"underline-offset":["auto",Vt,xe]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:U()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",xe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",xe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...M(),hv]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",mv]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},yv]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[...F(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:F()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...F()]}],"outline-offset":[{"outline-offset":[Vt,xe]}],"outline-w":[{outline:[Vt,Jt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[Vt,Jt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Zt,xv]}],"shadow-color":[{shadow:[cr]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...q(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":q()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",Zt,xe]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[g]}],saturate:[{saturate:[C]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[C]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",xe]}],duration:[{duration:B()}],ease:[{ease:["linear","in","out","in-out",xe]}],delay:[{delay:B()}],animate:[{animate:["none","spin","ping","pulse","bounce",xe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[E]}],"scale-x":[{"scale-x":[E]}],"scale-y":[{"scale-y":[E]}],rotate:[{rotate:[lr,xe]}],"translate-x":[{"translate-x":[$]}],"translate-y":[{"translate-y":[$]}],"skew-x":[{"skew-x":[O]}],"skew-y":[{"skew-y":[O]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",xe]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",xe]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":U()}],"scroll-mx":[{"scroll-mx":U()}],"scroll-my":[{"scroll-my":U()}],"scroll-ms":[{"scroll-ms":U()}],"scroll-me":[{"scroll-me":U()}],"scroll-mt":[{"scroll-mt":U()}],"scroll-mr":[{"scroll-mr":U()}],"scroll-mb":[{"scroll-mb":U()}],"scroll-ml":[{"scroll-ml":U()}],"scroll-p":[{"scroll-p":U()}],"scroll-px":[{"scroll-px":U()}],"scroll-py":[{"scroll-py":U()}],"scroll-ps":[{"scroll-ps":U()}],"scroll-pe":[{"scroll-pe":U()}],"scroll-pt":[{"scroll-pt":U()}],"scroll-pr":[{"scroll-pr":U()}],"scroll-pb":[{"scroll-pb":U()}],"scroll-pl":[{"scroll-pl":U()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",xe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Vt,Jt,qi]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function me(...e){return Sv(Bl(e))}const Ev=e=>{if(e===0)return"0 Bytes";const t=1024,n=["Bytes","KB","MB","GB","TB"],r=Math.floor(Math.log(e)/Math.log(t));return`${parseFloat((e/Math.pow(t,r)).toFixed(2))} ${n[r]}`},rc=p.forwardRef(({className:e,...t},n)=>l.jsx("nav",{ref:n,"aria-label":"breadcrumb",className:me("s3-explr-ui-breadcrumb",e),...t}));rc.displayName="Breadcrumb";const oc=p.forwardRef(({className:e,...t},n)=>l.jsx("ol",{ref:n,className:me("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5","s3-explr-ui-breadcrumb-list",e),...t}));oc.displayName="BreadcrumbList";const Gi=p.forwardRef(({className:e,...t},n)=>l.jsx("li",{ref:n,className:me("inline-flex items-center gap-1.5","s3-explr-ui-breadcrumb-item",e),...t}));Gi.displayName="BreadcrumbItem";const Ki=p.forwardRef(({asChild:e,className:t,...n},r)=>{const o=e?_n:"a";return l.jsx(o,{ref:r,className:me("transition-colors hover:text-foreground","s3-explr-ui-breadcrumb-link",t),...n})});Ki.displayName="BreadcrumbLink";const _v=p.forwardRef(({className:e,...t},n)=>l.jsx("span",{ref:n,role:"link","aria-disabled":"true","aria-current":"page",className:me("font-normal text-foreground","s3-explr-ui-breadcrumb-page",e),...t}));_v.displayName="BreadcrumbPage";const ic=({children:e,className:t,...n})=>l.jsx("li",{role:"presentation","aria-hidden":"true",className:me("[&>svg]:w-3.5 [&>svg]:h-3.5","s3-explr-ui-breadcrumb-separator",t),...n,children:e??l.jsx(jl,{})});ic.displayName="BreadcrumbSeparator";const ac=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,sc=Bl,Yi=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return sc(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(c=>{const d=n==null?void 0:n[c],g=i==null?void 0:i[c];if(d===null)return null;const m=ac(d)||ac(g);return o[c][m]}),s=n&&Object.entries(n).reduce((c,d)=>{let[g,m]=d;return m===void 0||(c[g]=m),c},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,d)=>{let{class:g,className:m,...f}=d;return Object.entries(f).every(v=>{let[h,y]=v;return Array.isArray(y)?y.includes({...i,...s}[h]):{...i,...s}[h]===y})?[...c,g,m]:c},[]);return sc(e,a,u,n==null?void 0:n.class,n==null?void 0:n.className)},lc=Yi("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 s3-explr-ui-button",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90 s3-explr-ui-button-default",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90 s3-explr-ui-button-destructive",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground s3-explr-ui-button-outline",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80 s3-explr-ui-button-secondary",ghost:"hover:bg-accent hover:text-accent-foreground s3-explr-ui-button-ghost",link:"text-primary underline-offset-4 hover:underline s3-explr-ui-button-link"},size:{default:"h-9 px-4 py-2 s3-explr-ui-button-size-default",sm:"h-8 rounded-md px-3 text-xs s3-explr-ui-button-size-sm",lg:"h-10 rounded-md px-8 s3-explr-ui-button-size-lg",icon:"h-9 w-9 s3-explr-ui-button-size-icon"}},defaultVariants:{variant:"default",size:"default"}}),be=p.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},i)=>{const a=r?_n:"button";return l.jsx(a,{className:me(lc({variant:t,size:n,className:e})),ref:i,...o})});be.displayName="Button";function Tv(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Zr(...e){return t=>e.forEach(n=>Tv(n,t))}function lt(...e){return p.useCallback(Zr(...e),e)}function Av(e,t){const n=p.createContext(t),r=i=>{const{children:a,...s}=i,u=p.useMemo(()=>s,Object.values(s));return l.jsx(n.Provider,{value:u,children:a})};r.displayName=e+"Provider";function o(i){const a=p.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function Qt(e,t=[]){let n=[];function r(i,a){const s=p.createContext(a),u=n.length;n=[...n,a];const c=g=>{var b;const{scope:m,children:f,...v}=g,h=((b=m==null?void 0:m[e])==null?void 0:b[u])||s,y=p.useMemo(()=>v,Object.values(v));return l.jsx(h.Provider,{value:y,children:f})};c.displayName=i+"Provider";function d(g,m){var h;const f=((h=m==null?void 0:m[e])==null?void 0:h[u])||s,v=p.useContext(f);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${g}\` must be used within \`${i}\``)}return[c,d]}const o=()=>{const i=n.map(a=>p.createContext(a));return function(s){const u=(s==null?void 0:s[e])||i;return p.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return o.scopeName=e,[r,Pv(o,...t)]}function Pv(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:u,scopeName:c})=>{const g=u(i)[`__scope${c}`];return{...s,...g}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Le(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function qe(e){const t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Pn({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Nv({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=qe(n),u=p.useCallback(c=>{if(i){const g=typeof c=="function"?c(e):c;g!==e&&s(g)}else o(c)},[i,e,o,s]);return[a,u]}function Nv({defaultProp:e,onChange:t}){const n=p.useState(e),[r]=n,o=p.useRef(r),i=qe(t);return p.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}function kv(e){const t=p.useRef({value:e,previous:e});return p.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var rt=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{};function cc(e){const[t,n]=p.useState(void 0);return rt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const u=i.borderBoxSize,c=Array.isArray(u)?u[0]:u;a=c.inlineSize,s=c.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function Ov(e,t){return p.useReducer((n,r)=>t[n][r]??n,e)}var Nn=e=>{const{present:t,children:n}=e,r=Fv(t),o=typeof n=="function"?n({present:r.isPresent}):p.Children.only(n),i=lt(r.ref,Dv(o));return typeof n=="function"||r.isPresent?p.cloneElement(o,{ref:i}):null};Nn.displayName="Presence";function Fv(e){const[t,n]=p.useState(),r=p.useRef({}),o=p.useRef(e),i=p.useRef("none"),a=e?"mounted":"unmounted",[s,u]=Ov(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const c=Qr(r.current);i.current=s==="mounted"?c:"none"},[s]),rt(()=>{const c=r.current,d=o.current;if(d!==e){const m=i.current,f=Qr(c);e?u("MOUNT"):f==="none"||(c==null?void 0:c.display)==="none"?u("UNMOUNT"):u(d&&m!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),rt(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,g=f=>{const h=Qr(r.current).includes(f.animationName);if(f.target===t&&h&&(u("ANIMATION_END"),!o.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},m=f=>{f.target===t&&(i.current=Qr(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",g),t.addEventListener("animationend",g),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",g),t.removeEventListener("animationend",g)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:p.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function Qr(e){return(e==null?void 0:e.animationName)||"none"}function Dv(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var uc=p.forwardRef((e,t)=>{const{children:n,...r}=e,o=p.Children.toArray(n),i=o.find(Mv);if(i){const a=i.props.children,s=o.map(u=>u===i?p.Children.count(a)>1?p.Children.only(null):p.isValidElement(a)?a.props.children:null:u);return l.jsx(Xi,{...r,ref:t,children:p.isValidElement(a)?p.cloneElement(a,void 0,s):null})}return l.jsx(Xi,{...r,ref:t,children:n})});uc.displayName="Slot";var Xi=p.forwardRef((e,t)=>{const{children:n,...r}=e;if(p.isValidElement(n)){const o=Lv(n);return p.cloneElement(n,{...$v(r,n.props),ref:t?Zr(t,o):o})}return p.Children.count(n)>1?p.Children.only(null):null});Xi.displayName="SlotClone";var Iv=({children:e})=>l.jsx(l.Fragment,{children:e});function Mv(e){return p.isValidElement(e)&&e.type===Iv}function $v(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Lv(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Rv=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Re=Rv.reduce((e,t)=>{const n=p.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?uc:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function dc(e,t){e&&Fr.flushSync(()=>e.dispatchEvent(t))}var Ji="Checkbox",[Vv,e_]=Qt(Ji),[jv,zv]=Vv(Ji),fc=p.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:i,required:a,disabled:s,value:u="on",onCheckedChange:c,form:d,...g}=e,[m,f]=p.useState(null),v=lt(t,E=>f(E)),h=p.useRef(!1),y=m?d||!!m.closest("form"):!0,[b=!1,w]=Pn({prop:o,defaultProp:i,onChange:c}),C=p.useRef(b);return p.useEffect(()=>{const E=m==null?void 0:m.form;if(E){const x=()=>w(C.current);return E.addEventListener("reset",x),()=>E.removeEventListener("reset",x)}},[m,w]),l.jsxs(jv,{scope:n,state:b,disabled:s,children:[l.jsx(Re.button,{type:"button",role:"checkbox","aria-checked":en(b)?"mixed":b,"aria-required":a,"data-state":mc(b),"data-disabled":s?"":void 0,disabled:s,value:u,...g,ref:v,onKeyDown:Le(e.onKeyDown,E=>{E.key==="Enter"&&E.preventDefault()}),onClick:Le(e.onClick,E=>{w(x=>en(x)?!0:!x),y&&(h.current=E.isPropagationStopped(),h.current||E.stopPropagation())})}),y&&l.jsx(Bv,{control:m,bubbles:!h.current,name:r,value:u,checked:b,required:a,disabled:s,form:d,style:{transform:"translateX(-100%)"},defaultChecked:en(i)?!1:i})]})});fc.displayName=Ji;var pc="CheckboxIndicator",gc=p.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=zv(pc,n);return l.jsx(Nn,{present:r||en(i.state)||i.state===!0,children:l.jsx(Re.span,{"data-state":mc(i.state),"data-disabled":i.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});gc.displayName=pc;var Bv=e=>{const{control:t,checked:n,bubbles:r=!0,defaultChecked:o,...i}=e,a=p.useRef(null),s=kv(n),u=cc(t);p.useEffect(()=>{const d=a.current,g=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(g,"checked").set;if(s!==n&&f){const v=new Event("click",{bubbles:r});d.indeterminate=en(n),f.call(d,en(n)?!1:n),d.dispatchEvent(v)}},[s,n,r]);const c=p.useRef(en(n)?!1:n);return l.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:o??c.current,...i,tabIndex:-1,ref:a,style:{...e.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function en(e){return e==="indeterminate"}function mc(e){return en(e)?"indeterminate":e?"checked":"unchecked"}var hc=fc,Hv=gc;const Zi=p.forwardRef(({className:e,...t},n)=>l.jsx(hc,{ref:n,className:me("s3-explr-ui-checkbox peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:l.jsx(Hv,{className:me("s3-explr-ui-checkbox-indicator flex items-center justify-center text-current"),children:l.jsx(wh,{className:"s3-explr-ui-checkbox-check h-4 w-4"})})}));Zi.displayName=hc.displayName;var Uv=p.useId||(()=>{}),Wv=0;function kn(e){const[t,n]=p.useState(Uv());return rt(()=>{e||n(r=>r??String(Wv++))},[e]),e||(t?`radix-${t}`:"")}function vc(e,t=globalThis==null?void 0:globalThis.document){const n=qe(e);p.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var qv="DismissableLayer",Qi="dismissableLayer.update",Gv="dismissableLayer.pointerDownOutside",Kv="dismissableLayer.focusOutside",yc,xc=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ea=p.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...u}=e,c=p.useContext(xc),[d,g]=p.useState(null),m=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=p.useState({}),v=lt(t,I=>g(I)),h=Array.from(c.layers),[y]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),b=h.indexOf(y),w=d?h.indexOf(d):-1,C=c.layersWithOutsidePointerEventsDisabled.size>0,E=w>=b,x=Xv(I=>{const $=I.target,H=[...c.branches].some(D=>D.contains($));!E||H||(o==null||o(I),a==null||a(I),I.defaultPrevented||s==null||s())},m),O=Jv(I=>{const $=I.target;[...c.branches].some(D=>D.contains($))||(i==null||i(I),a==null||a(I),I.defaultPrevented||s==null||s())},m);return vc(I=>{w===c.layers.size-1&&(r==null||r(I),!I.defaultPrevented&&s&&(I.preventDefault(),s()))},m),p.useEffect(()=>{if(d)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(yc=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),wc(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=yc)}},[d,m,n,c]),p.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),wc())},[d,c]),p.useEffect(()=>{const I=()=>f({});return document.addEventListener(Qi,I),()=>document.removeEventListener(Qi,I)},[]),l.jsx(Re.div,{...u,ref:v,style:{pointerEvents:C?E?"auto":"none":void 0,...e.style},onFocusCapture:Le(e.onFocusCapture,O.onFocusCapture),onBlurCapture:Le(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:Le(e.onPointerDownCapture,x.onPointerDownCapture)})});ea.displayName=qv;var Yv="DismissableLayerBranch",bc=p.forwardRef((e,t)=>{const n=p.useContext(xc),r=p.useRef(null),o=lt(t,r);return p.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),l.jsx(Re.div,{...e,ref:o})});bc.displayName=Yv;function Xv(e,t=globalThis==null?void 0:globalThis.document){const n=qe(e),r=p.useRef(!1),o=p.useRef(()=>{});return p.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let u=function(){Cc(Gv,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Jv(e,t=globalThis==null?void 0:globalThis.document){const n=qe(e),r=p.useRef(!1);return p.useEffect(()=>{const o=i=>{i.target&&!r.current&&Cc(Kv,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function wc(){const e=new CustomEvent(Qi);document.dispatchEvent(e)}function Cc(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?dc(o,i):o.dispatchEvent(i)}var Zv=ea,Qv=bc,ta="focusScope.autoFocusOnMount",na="focusScope.autoFocusOnUnmount",Sc={bubbles:!1,cancelable:!0},ey="FocusScope",Ec=p.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,u]=p.useState(null),c=qe(o),d=qe(i),g=p.useRef(null),m=lt(t,h=>u(h)),f=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(r){let h=function(C){if(f.paused||!s)return;const E=C.target;s.contains(E)?g.current=E:tn(g.current,{select:!0})},y=function(C){if(f.paused||!s)return;const E=C.relatedTarget;E!==null&&(s.contains(E)||tn(g.current,{select:!0}))},b=function(C){if(document.activeElement===document.body)for(const x of C)x.removedNodes.length>0&&tn(s)};document.addEventListener("focusin",h),document.addEventListener("focusout",y);const w=new MutationObserver(b);return s&&w.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",y),w.disconnect()}}},[r,s,f.paused]),p.useEffect(()=>{if(s){Ac.add(f);const h=document.activeElement;if(!s.contains(h)){const b=new CustomEvent(ta,Sc);s.addEventListener(ta,c),s.dispatchEvent(b),b.defaultPrevented||(ty(ay(_c(s)),{select:!0}),document.activeElement===h&&tn(s))}return()=>{s.removeEventListener(ta,c),setTimeout(()=>{const b=new CustomEvent(na,Sc);s.addEventListener(na,d),s.dispatchEvent(b),b.defaultPrevented||tn(h??document.body,{select:!0}),s.removeEventListener(na,d),Ac.remove(f)},0)}}},[s,c,d,f]);const v=p.useCallback(h=>{if(!n&&!r||f.paused)return;const y=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,b=document.activeElement;if(y&&b){const w=h.currentTarget,[C,E]=ny(w);C&&E?!h.shiftKey&&b===E?(h.preventDefault(),n&&tn(C,{select:!0})):h.shiftKey&&b===C&&(h.preventDefault(),n&&tn(E,{select:!0})):b===w&&h.preventDefault()}},[n,r,f.paused]);return l.jsx(Re.div,{tabIndex:-1,...a,ref:m,onKeyDown:v})});Ec.displayName=ey;function ty(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(tn(r,{select:t}),document.activeElement!==n)return}function ny(e){const t=_c(e),n=Tc(t,e),r=Tc(t.reverse(),e);return[n,r]}function _c(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Tc(e,t){for(const n of e)if(!ry(n,{upTo:t}))return n}function ry(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function oy(e){return e instanceof HTMLInputElement&&"select"in e}function tn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&oy(e)&&t&&e.select()}}var Ac=iy();function iy(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Pc(e,t),e.unshift(t)},remove(t){var n;e=Pc(e,t),(n=e[0])==null||n.resume()}}}function Pc(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function ay(e){return e.filter(t=>t.tagName!=="A")}var sy="Portal",ra=p.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,i]=p.useState(!1);rt(()=>i(!0),[]);const a=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?ri.createPortal(l.jsx(Re.div,{...r,ref:t}),a):null});ra.displayName=sy;var oa=0;function ly(){p.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Nc()),document.body.insertAdjacentElement("beforeend",e[1]??Nc()),oa++,()=>{oa===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),oa--}},[])}function Nc(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var St=function(){return St=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},St.apply(this,arguments)};function kc(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 o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function pn(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(d){try{c(r.next(d))}catch(g){a(g)}}function u(d){try{c(r.throw(d))}catch(g){a(g)}}function c(d){d.done?i(d.value):o(d.value).then(s,u)}c((r=r.apply(e,t||[])).next())})}function Oc(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i}function Fc(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var eo="right-scroll-bar-position",to="width-before-scroll-bar",cy="with-scroll-bars-hidden",uy="--removed-body-scroll-bar-size";function ia(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function dy(e,t){var n=_.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var fy=typeof window<"u"?p.useLayoutEffect:p.useEffect,Dc=new WeakMap;function py(e,t){var n=dy(null,function(r){return e.forEach(function(o){return ia(o,r)})});return fy(function(){var r=Dc.get(n);if(r){var o=new Set(r),i=new Set(e),a=n.current;o.forEach(function(s){i.has(s)||ia(s,null)}),i.forEach(function(s){o.has(s)||ia(s,a)})}Dc.set(n,e)},[e]),n}function gy(e){return e}function my(e,t){t===void 0&&(t=gy);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var a=t(i,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(i),a=n}var u=function(){var d=a;a=[],d.forEach(i)},c=function(){return Promise.resolve().then(u)};c(),n={push:function(d){a.push(d),c()},filter:function(d){return a=a.filter(d),n}}}};return o}function hy(e){e===void 0&&(e={});var t=my(null);return t.options=St({async:!0,ssr:!1},e),t}var Ic=function(e){var t=e.sideCar,n=kc(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return p.createElement(r,St({},n))};Ic.isSideCarExport=!0;function vy(e,t){return e.useMedium(t),Ic}var Mc=hy(),aa=function(){},no=p.forwardRef(function(e,t){var n=p.useRef(null),r=p.useState({onScrollCapture:aa,onWheelCapture:aa,onTouchMoveCapture:aa}),o=r[0],i=r[1],a=e.forwardProps,s=e.children,u=e.className,c=e.removeScrollBar,d=e.enabled,g=e.shards,m=e.sideCar,f=e.noIsolation,v=e.inert,h=e.allowPinchZoom,y=e.as,b=y===void 0?"div":y,w=e.gapMode,C=kc(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=m,x=py([n,t]),O=St(St({},C),o);return p.createElement(p.Fragment,null,d&&p.createElement(E,{sideCar:Mc,removeScrollBar:c,shards:g,noIsolation:f,inert:v,setCallbacks:i,allowPinchZoom:!!h,lockRef:n,gapMode:w}),a?p.cloneElement(p.Children.only(s),St(St({},O),{ref:x})):p.createElement(b,St({},O,{className:u,ref:x}),s))});no.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},no.classNames={fullWidth:to,zeroRight:eo};var yy=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function xy(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=yy();return t&&e.setAttribute("nonce",t),e}function by(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function wy(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Cy=function(){var e=0,t=null;return{add:function(n){e==0&&(t=xy())&&(by(t,n),wy(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Sy=function(){var e=Cy();return function(t,n){p.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},$c=function(){var e=Sy(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Ey={left:0,top:0,right:0,gap:0},sa=function(e){return parseInt(e||"",10)||0},_y=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[sa(n),sa(r),sa(o)]},Ty=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Ey;var t=_y(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Ay=$c(),On="data-scroll-locked",Py=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
109
+ .`.concat(cy,` {
109
110
  overflow: hidden `).concat(r,`;
110
111
  padding-right: `).concat(s,"px ").concat(r,`;
111
112
  }
112
- body[`).concat(Nn,`] {
113
+ body[`).concat(On,`] {
113
114
  overflow: hidden `).concat(r,`;
114
115
  overscroll-behavior: contain;
115
116
  `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
@@ -122,55 +123,55 @@
122
123
  `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),`
123
124
  }
124
125
 
125
- .`).concat(Kr,` {
126
+ .`).concat(eo,` {
126
127
  right: `).concat(s,"px ").concat(r,`;
127
128
  }
128
129
 
129
- .`).concat(Yr,` {
130
+ .`).concat(to,` {
130
131
  margin-right: `).concat(s,"px ").concat(r,`;
131
132
  }
132
133
 
133
- .`).concat(Kr," .").concat(Kr,` {
134
+ .`).concat(eo," .").concat(eo,` {
134
135
  right: 0 `).concat(r,`;
135
136
  }
136
137
 
137
- .`).concat(Yr," .").concat(Yr,` {
138
+ .`).concat(to," .").concat(to,` {
138
139
  margin-right: 0 `).concat(r,`;
139
140
  }
140
141
 
141
- body[`).concat(Nn,`] {
142
- `).concat($v,": ").concat(s,`px;
142
+ body[`).concat(On,`] {
143
+ `).concat(uy,": ").concat(s,`px;
143
144
  }
144
- `)},Ec=function(){var e=parseInt(document.body.getAttribute(Nn)||"0",10);return isFinite(e)?e:0},ey=function(){f.useEffect(function(){return document.body.setAttribute(Nn,(Ec()+1).toString()),function(){var e=Ec()-1;e<=0?document.body.removeAttribute(Nn):document.body.setAttribute(Nn,e.toString())}},[])},ty=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;ey();var i=f.useMemo(function(){return Jv(o)},[o]);return f.createElement(Zv,{styles:Qv(i,!t,o,n?"":"!important")})},ea=!1;if(typeof window<"u")try{var Jr=Object.defineProperty({},"passive",{get:function(){return ea=!0,!0}});window.addEventListener("test",Jr,Jr),window.removeEventListener("test",Jr,Jr)}catch{ea=!1}var On=ea?{passive:!1}:!1,ny=function(e){return e.tagName==="TEXTAREA"},Tc=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!ny(e)&&n[t]==="visible")},ry=function(e){return Tc(e,"overflowY")},oy=function(e){return Tc(e,"overflowX")},_c=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Ac(e,r);if(o){var i=Pc(e,r),a=i[1],s=i[2];if(a>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},iy=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},ay=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Ac=function(e,t){return e==="v"?ry(t):oy(t)},Pc=function(e,t){return e==="v"?iy(t):ay(t)},sy=function(e,t){return e==="h"&&t==="rtl"?-1:1},ly=function(e,t,n,r,o){var i=sy(e,window.getComputedStyle(t).direction),a=i*r,s=n.target,u=t.contains(s),c=!1,d=a>0,g=0,h=0;do{var p=Pc(e,s),v=p[0],m=p[1],y=p[2],w=m-y-i*v;(v||w)&&Ac(e,s)&&(g+=w,h+=v),s instanceof ShadowRoot?s=s.host:s=s.parentNode}while(!u&&s!==document.body||u&&(t.contains(s)||t===s));return(d&&(Math.abs(g)<1||!o)||!d&&(Math.abs(h)<1||!o))&&(c=!0),c},Zr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Nc=function(e){return[e.deltaX,e.deltaY]},Oc=function(e){return e&&"current"in e?e.current:e},cy=function(e,t){return e[0]===t[0]&&e[1]===t[1]},uy=function(e){return`
145
+ `)},Lc=function(){var e=parseInt(document.body.getAttribute(On)||"0",10);return isFinite(e)?e:0},Ny=function(){p.useEffect(function(){return document.body.setAttribute(On,(Lc()+1).toString()),function(){var e=Lc()-1;e<=0?document.body.removeAttribute(On):document.body.setAttribute(On,e.toString())}},[])},ky=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Ny();var i=p.useMemo(function(){return Ty(o)},[o]);return p.createElement(Ay,{styles:Py(i,!t,o,n?"":"!important")})},la=!1;if(typeof window<"u")try{var ro=Object.defineProperty({},"passive",{get:function(){return la=!0,!0}});window.addEventListener("test",ro,ro),window.removeEventListener("test",ro,ro)}catch{la=!1}var Fn=la?{passive:!1}:!1,Oy=function(e){return e.tagName==="TEXTAREA"},Rc=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Oy(e)&&n[t]==="visible")},Fy=function(e){return Rc(e,"overflowY")},Dy=function(e){return Rc(e,"overflowX")},Vc=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=jc(e,r);if(o){var i=zc(e,r),a=i[1],s=i[2];if(a>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Iy=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},My=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},jc=function(e,t){return e==="v"?Fy(t):Dy(t)},zc=function(e,t){return e==="v"?Iy(t):My(t)},$y=function(e,t){return e==="h"&&t==="rtl"?-1:1},Ly=function(e,t,n,r,o){var i=$y(e,window.getComputedStyle(t).direction),a=i*r,s=n.target,u=t.contains(s),c=!1,d=a>0,g=0,m=0;do{var f=zc(e,s),v=f[0],h=f[1],y=f[2],b=h-y-i*v;(v||b)&&jc(e,s)&&(g+=b,m+=v),s instanceof ShadowRoot?s=s.host:s=s.parentNode}while(!u&&s!==document.body||u&&(t.contains(s)||t===s));return(d&&(Math.abs(g)<1||!o)||!d&&(Math.abs(m)<1||!o))&&(c=!0),c},oo=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Bc=function(e){return[e.deltaX,e.deltaY]},Hc=function(e){return e&&"current"in e?e.current:e},Ry=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Vy=function(e){return`
145
146
  .block-interactivity-`.concat(e,` {pointer-events: none;}
146
147
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
147
- `)},dy=0,Fn=[];function fy(e){var t=f.useRef([]),n=f.useRef([0,0]),r=f.useRef(),o=f.useState(dy++)[0],i=f.useState(Cc)[0],a=f.useRef(e);f.useEffect(function(){a.current=e},[e]),f.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=xc([e.lockRef.current],(e.shards||[]).map(Oc),!0).filter(Boolean);return m.forEach(function(y){return y.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=f.useCallback(function(m,y){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!a.current.allowPinchZoom;var w=Zr(m),b=n.current,S="deltaX"in m?m.deltaX:b[0]-w[0],E="deltaY"in m?m.deltaY:b[1]-w[1],x,O=m.target,M=Math.abs(S)>Math.abs(E)?"h":"v";if("touches"in m&&M==="h"&&O.type==="range")return!1;var I=_c(M,O);if(!I)return!0;if(I?x=M:(x=M==="v"?"h":"v",I=_c(M,O)),!I)return!1;if(!r.current&&"changedTouches"in m&&(S||E)&&(r.current=x),!x)return!0;var H=r.current||x;return ly(H,y,m,H==="h"?S:E,!0)},[]),u=f.useCallback(function(m){var y=m;if(!(!Fn.length||Fn[Fn.length-1]!==i)){var w="deltaY"in y?Nc(y):Zr(y),b=t.current.filter(function(x){return x.name===y.type&&(x.target===y.target||y.target===x.shadowParent)&&cy(x.delta,w)})[0];if(b&&b.should){y.cancelable&&y.preventDefault();return}if(!b){var S=(a.current.shards||[]).map(Oc).filter(Boolean).filter(function(x){return x.contains(y.target)}),E=S.length>0?s(y,S[0]):!a.current.noIsolation;E&&y.cancelable&&y.preventDefault()}}},[]),c=f.useCallback(function(m,y,w,b){var S={name:m,delta:y,target:w,should:b,shadowParent:py(w)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(E){return E!==S})},1)},[]),d=f.useCallback(function(m){n.current=Zr(m),r.current=void 0},[]),g=f.useCallback(function(m){c(m.type,Nc(m),m.target,s(m,e.lockRef.current))},[]),h=f.useCallback(function(m){c(m.type,Zr(m),m.target,s(m,e.lockRef.current))},[]);f.useEffect(function(){return Fn.push(i),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:h}),document.addEventListener("wheel",u,On),document.addEventListener("touchmove",u,On),document.addEventListener("touchstart",d,On),function(){Fn=Fn.filter(function(m){return m!==i}),document.removeEventListener("wheel",u,On),document.removeEventListener("touchmove",u,On),document.removeEventListener("touchstart",d,On)}},[]);var p=e.removeScrollBar,v=e.inert;return f.createElement(f.Fragment,null,v?f.createElement(i,{styles:uy(o)}):null,p?f.createElement(ty,{gapMode:e.gapMode}):null)}function py(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const gy=Bv(Sc,fy);var Fc=f.forwardRef(function(e,t){return f.createElement(Xr,bt({},e,{ref:t,sideCar:gy}))});Fc.classNames=Xr.classNames;var my=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},kn=new WeakMap,Qr=new WeakMap,eo={},ta=0,kc=function(e){return e&&(e.host||kc(e.parentNode))},hy=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=kc(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},vy=function(e,t,n,r){var o=hy(t,Array.isArray(e)?e:[e]);eo[n]||(eo[n]=new WeakMap);var i=eo[n],a=[],s=new Set,u=new Set(o),c=function(g){!g||s.has(g)||(s.add(g),c(g.parentNode))};o.forEach(c);var d=function(g){!g||u.has(g)||Array.prototype.forEach.call(g.children,function(h){if(s.has(h))d(h);else try{var p=h.getAttribute(r),v=p!==null&&p!=="false",m=(kn.get(h)||0)+1,y=(i.get(h)||0)+1;kn.set(h,m),i.set(h,y),a.push(h),m===1&&v&&Qr.set(h,!0),y===1&&h.setAttribute(n,"true"),v||h.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",h,w)}})};return d(t),s.clear(),ta++,function(){a.forEach(function(g){var h=kn.get(g)-1,p=i.get(g)-1;kn.set(g,h),i.set(g,p),h||(Qr.has(g)||g.removeAttribute(r),Qr.delete(g)),p||g.removeAttribute(n)}),ta--,ta||(kn=new WeakMap,kn=new WeakMap,Qr=new WeakMap,eo={})}},yy=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=my(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),vy(r,o,n,"aria-hidden")):function(){return null}},Dc=f.forwardRef((e,t)=>{const{children:n,...r}=e,o=f.Children.toArray(n),i=o.find(wy);if(i){const a=i.props.children,s=o.map(u=>u===i?f.Children.count(a)>1?f.Children.only(null):f.isValidElement(a)?a.props.children:null:u);return l.jsx(na,{...r,ref:t,children:f.isValidElement(a)?f.cloneElement(a,void 0,s):null})}return l.jsx(na,{...r,ref:t,children:n})});Dc.displayName="Slot";var na=f.forwardRef((e,t)=>{const{children:n,...r}=e;if(f.isValidElement(n)){const o=Sy(n);return f.cloneElement(n,{...by(r,n.props),ref:t?qr(t,o):o})}return f.Children.count(n)>1?f.Children.only(null):null});na.displayName="SlotClone";var xy=({children:e})=>l.jsx(l.Fragment,{children:e});function wy(e){return f.isValidElement(e)&&e.type===xy}function by(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Sy(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ra="Dialog",[Mc,xE]=Jt(ra),[Cy,gt]=Mc(ra),$c=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=f.useRef(null),u=f.useRef(null),[c=!1,d]=_n({prop:r,defaultProp:o,onChange:i});return l.jsx(Cy,{scope:t,triggerRef:s,contentRef:u,contentId:Pn(),titleId:Pn(),descriptionId:Pn(),open:c,onOpenChange:d,onOpenToggle:f.useCallback(()=>d(g=>!g),[d]),modal:a,children:n})};$c.displayName=ra;var Ic="DialogTrigger",Lc=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=gt(Ic,n),i=st(t,o.triggerRef);return l.jsx(Le.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":aa(o.open),...r,ref:i,onClick:Ie(e.onClick,o.onOpenToggle)})});Lc.displayName=Ic;var oa="DialogPortal",[Ey,Rc]=Mc(oa,{forceMount:void 0}),Vc=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=gt(oa,t);return l.jsx(Ey,{scope:t,forceMount:n,children:f.Children.map(r,a=>l.jsx(An,{present:n||i.open,children:l.jsx(Yi,{asChild:!0,container:o,children:a})}))})};Vc.displayName=oa;var to="DialogOverlay",jc=f.forwardRef((e,t)=>{const n=Rc(to,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=gt(to,e.__scopeDialog);return i.modal?l.jsx(An,{present:r||i.open,children:l.jsx(Ty,{...o,ref:t})}):null});jc.displayName=to;var Ty=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=gt(to,n);return l.jsx(Fc,{as:Dc,allowPinchZoom:!0,shards:[o.contentRef],children:l.jsx(Le.div,{"data-state":aa(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),fn="DialogContent",zc=f.forwardRef((e,t)=>{const n=Rc(fn,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=gt(fn,e.__scopeDialog);return l.jsx(An,{present:r||i.open,children:i.modal?l.jsx(_y,{...o,ref:t}):l.jsx(Ay,{...o,ref:t})})});zc.displayName=fn;var _y=f.forwardRef((e,t)=>{const n=gt(fn,e.__scopeDialog),r=f.useRef(null),o=st(t,n.contentRef,r);return f.useEffect(()=>{const i=r.current;if(i)return yy(i)},[]),l.jsx(Bc,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ie(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:Ie(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:Ie(e.onFocusOutside,i=>i.preventDefault())})}),Ay=f.forwardRef((e,t)=>{const n=gt(fn,e.__scopeDialog),r=f.useRef(!1),o=f.useRef(!1);return l.jsx(Bc,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a,s;(a=e.onCloseAutoFocus)==null||a.call(e,i),i.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{var u,c;(u=e.onInteractOutside)==null||u.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=i.target;((c=n.triggerRef.current)==null?void 0:c.contains(a))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),Bc=f.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=gt(fn,n),u=f.useRef(null),c=st(t,u);return Dv(),l.jsxs(l.Fragment,{children:[l.jsx(dc,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:l.jsx(qi,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":aa(s.open),...a,ref:c,onDismiss:()=>s.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(Py,{titleId:s.titleId}),l.jsx(Oy,{contentRef:u,descriptionId:s.descriptionId})]})]})}),ia="DialogTitle",Hc=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=gt(ia,n);return l.jsx(Le.h2,{id:o.titleId,...r,ref:t})});Hc.displayName=ia;var Uc="DialogDescription",Wc=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=gt(Uc,n);return l.jsx(Le.p,{id:o.descriptionId,...r,ref:t})});Wc.displayName=Uc;var qc="DialogClose",Gc=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=gt(qc,n);return l.jsx(Le.button,{type:"button",...r,ref:t,onClick:Ie(e.onClick,()=>o.onOpenChange(!1))})});Gc.displayName=qc;function aa(e){return e?"open":"closed"}var Kc="DialogTitleWarning",[wE,Yc]=Zh(Kc,{contentName:fn,titleName:ia,docsSlug:"dialog"}),Py=({titleId:e})=>{const t=Yc(Kc),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
148
+ `)},jy=0,Dn=[];function zy(e){var t=p.useRef([]),n=p.useRef([0,0]),r=p.useRef(),o=p.useState(jy++)[0],i=p.useState($c)[0],a=p.useRef(e);p.useEffect(function(){a.current=e},[e]),p.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=Fc([e.lockRef.current],(e.shards||[]).map(Hc),!0).filter(Boolean);return h.forEach(function(y){return y.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=p.useCallback(function(h,y){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!a.current.allowPinchZoom;var b=oo(h),w=n.current,C="deltaX"in h?h.deltaX:w[0]-b[0],E="deltaY"in h?h.deltaY:w[1]-b[1],x,O=h.target,I=Math.abs(C)>Math.abs(E)?"h":"v";if("touches"in h&&I==="h"&&O.type==="range")return!1;var $=Vc(I,O);if(!$)return!0;if($?x=I:(x=I==="v"?"h":"v",$=Vc(I,O)),!$)return!1;if(!r.current&&"changedTouches"in h&&(C||E)&&(r.current=x),!x)return!0;var H=r.current||x;return Ly(H,y,h,H==="h"?C:E,!0)},[]),u=p.useCallback(function(h){var y=h;if(!(!Dn.length||Dn[Dn.length-1]!==i)){var b="deltaY"in y?Bc(y):oo(y),w=t.current.filter(function(x){return x.name===y.type&&(x.target===y.target||y.target===x.shadowParent)&&Ry(x.delta,b)})[0];if(w&&w.should){y.cancelable&&y.preventDefault();return}if(!w){var C=(a.current.shards||[]).map(Hc).filter(Boolean).filter(function(x){return x.contains(y.target)}),E=C.length>0?s(y,C[0]):!a.current.noIsolation;E&&y.cancelable&&y.preventDefault()}}},[]),c=p.useCallback(function(h,y,b,w){var C={name:h,delta:y,target:b,should:w,shadowParent:By(b)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(E){return E!==C})},1)},[]),d=p.useCallback(function(h){n.current=oo(h),r.current=void 0},[]),g=p.useCallback(function(h){c(h.type,Bc(h),h.target,s(h,e.lockRef.current))},[]),m=p.useCallback(function(h){c(h.type,oo(h),h.target,s(h,e.lockRef.current))},[]);p.useEffect(function(){return Dn.push(i),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:m}),document.addEventListener("wheel",u,Fn),document.addEventListener("touchmove",u,Fn),document.addEventListener("touchstart",d,Fn),function(){Dn=Dn.filter(function(h){return h!==i}),document.removeEventListener("wheel",u,Fn),document.removeEventListener("touchmove",u,Fn),document.removeEventListener("touchstart",d,Fn)}},[]);var f=e.removeScrollBar,v=e.inert;return p.createElement(p.Fragment,null,v?p.createElement(i,{styles:Vy(o)}):null,f?p.createElement(ky,{gapMode:e.gapMode}):null)}function By(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Hy=vy(Mc,zy);var Uc=p.forwardRef(function(e,t){return p.createElement(no,St({},e,{ref:t,sideCar:Hy}))});Uc.classNames=no.classNames;var Uy=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},In=new WeakMap,io=new WeakMap,ao={},ca=0,Wc=function(e){return e&&(e.host||Wc(e.parentNode))},Wy=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Wc(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},qy=function(e,t,n,r){var o=Wy(t,Array.isArray(e)?e:[e]);ao[n]||(ao[n]=new WeakMap);var i=ao[n],a=[],s=new Set,u=new Set(o),c=function(g){!g||s.has(g)||(s.add(g),c(g.parentNode))};o.forEach(c);var d=function(g){!g||u.has(g)||Array.prototype.forEach.call(g.children,function(m){if(s.has(m))d(m);else try{var f=m.getAttribute(r),v=f!==null&&f!=="false",h=(In.get(m)||0)+1,y=(i.get(m)||0)+1;In.set(m,h),i.set(m,y),a.push(m),h===1&&v&&io.set(m,!0),y===1&&m.setAttribute(n,"true"),v||m.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",m,b)}})};return d(t),s.clear(),ca++,function(){a.forEach(function(g){var m=In.get(g)-1,f=i.get(g)-1;In.set(g,m),i.set(g,f),m||(io.has(g)||g.removeAttribute(r),io.delete(g)),f||g.removeAttribute(n)}),ca--,ca||(In=new WeakMap,In=new WeakMap,io=new WeakMap,ao={})}},Gy=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Uy(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),qy(r,o,n,"aria-hidden")):function(){return null}},qc=p.forwardRef((e,t)=>{const{children:n,...r}=e,o=p.Children.toArray(n),i=o.find(Yy);if(i){const a=i.props.children,s=o.map(u=>u===i?p.Children.count(a)>1?p.Children.only(null):p.isValidElement(a)?a.props.children:null:u);return l.jsx(ua,{...r,ref:t,children:p.isValidElement(a)?p.cloneElement(a,void 0,s):null})}return l.jsx(ua,{...r,ref:t,children:n})});qc.displayName="Slot";var ua=p.forwardRef((e,t)=>{const{children:n,...r}=e;if(p.isValidElement(n)){const o=Jy(n);return p.cloneElement(n,{...Xy(r,n.props),ref:t?Zr(t,o):o})}return p.Children.count(n)>1?p.Children.only(null):null});ua.displayName="SlotClone";var Ky=({children:e})=>l.jsx(l.Fragment,{children:e});function Yy(e){return p.isValidElement(e)&&e.type===Ky}function Xy(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Jy(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var da="Dialog",[Gc,t_]=Qt(da),[Zy,mt]=Gc(da),Kc=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=p.useRef(null),u=p.useRef(null),[c=!1,d]=Pn({prop:r,defaultProp:o,onChange:i});return l.jsx(Zy,{scope:t,triggerRef:s,contentRef:u,contentId:kn(),titleId:kn(),descriptionId:kn(),open:c,onOpenChange:d,onOpenToggle:p.useCallback(()=>d(g=>!g),[d]),modal:a,children:n})};Kc.displayName=da;var Yc="DialogTrigger",Xc=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=mt(Yc,n),i=lt(t,o.triggerRef);return l.jsx(Re.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ga(o.open),...r,ref:i,onClick:Le(e.onClick,o.onOpenToggle)})});Xc.displayName=Yc;var fa="DialogPortal",[Qy,Jc]=Gc(fa,{forceMount:void 0}),Zc=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=mt(fa,t);return l.jsx(Qy,{scope:t,forceMount:n,children:p.Children.map(r,a=>l.jsx(Nn,{present:n||i.open,children:l.jsx(ra,{asChild:!0,container:o,children:a})}))})};Zc.displayName=fa;var so="DialogOverlay",Qc=p.forwardRef((e,t)=>{const n=Jc(so,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=mt(so,e.__scopeDialog);return i.modal?l.jsx(Nn,{present:r||i.open,children:l.jsx(ex,{...o,ref:t})}):null});Qc.displayName=so;var ex=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=mt(so,n);return l.jsx(Uc,{as:qc,allowPinchZoom:!0,shards:[o.contentRef],children:l.jsx(Re.div,{"data-state":ga(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),gn="DialogContent",eu=p.forwardRef((e,t)=>{const n=Jc(gn,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=mt(gn,e.__scopeDialog);return l.jsx(Nn,{present:r||i.open,children:i.modal?l.jsx(tx,{...o,ref:t}):l.jsx(nx,{...o,ref:t})})});eu.displayName=gn;var tx=p.forwardRef((e,t)=>{const n=mt(gn,e.__scopeDialog),r=p.useRef(null),o=lt(t,n.contentRef,r);return p.useEffect(()=>{const i=r.current;if(i)return Gy(i)},[]),l.jsx(tu,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Le(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:Le(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:Le(e.onFocusOutside,i=>i.preventDefault())})}),nx=p.forwardRef((e,t)=>{const n=mt(gn,e.__scopeDialog),r=p.useRef(!1),o=p.useRef(!1);return l.jsx(tu,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a,s;(a=e.onCloseAutoFocus)==null||a.call(e,i),i.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{var u,c;(u=e.onInteractOutside)==null||u.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=i.target;((c=n.triggerRef.current)==null?void 0:c.contains(a))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),tu=p.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=mt(gn,n),u=p.useRef(null),c=lt(t,u);return ly(),l.jsxs(l.Fragment,{children:[l.jsx(Ec,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:l.jsx(ea,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":ga(s.open),...a,ref:c,onDismiss:()=>s.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(rx,{titleId:s.titleId}),l.jsx(ix,{contentRef:u,descriptionId:s.descriptionId})]})]})}),pa="DialogTitle",nu=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=mt(pa,n);return l.jsx(Re.h2,{id:o.titleId,...r,ref:t})});nu.displayName=pa;var ru="DialogDescription",ou=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=mt(ru,n);return l.jsx(Re.p,{id:o.descriptionId,...r,ref:t})});ou.displayName=ru;var iu="DialogClose",au=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=mt(iu,n);return l.jsx(Re.button,{type:"button",...r,ref:t,onClick:Le(e.onClick,()=>o.onOpenChange(!1))})});au.displayName=iu;function ga(e){return e?"open":"closed"}var su="DialogTitleWarning",[n_,lu]=Av(su,{contentName:gn,titleName:pa,docsSlug:"dialog"}),rx=({titleId:e})=>{const t=lu(su),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
148
149
 
149
150
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
150
151
 
151
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return f.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Ny="DialogDescriptionWarning",Oy=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Yc(Ny).contentName}}.`;return f.useEffect(()=>{var i;const o=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Fy=$c,ky=Lc,Dy=Vc,Xc=jc,Jc=zc,Zc=Hc,Qc=Wc,My=Gc;const Rt=Fy,no=ky,$y=Dy,eu=f.forwardRef(({className:e,...t},n)=>l.jsx(Xc,{ref:n,className:ge("s3-explr-ui-dialog-overlay fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));eu.displayName=Xc.displayName;const St=f.forwardRef(({className:e,children:t,...n},r)=>l.jsxs($y,{children:[l.jsx(eu,{}),l.jsxs(Jc,{ref:r,className:ge("s3-explr-ui-dialog-content fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,l.jsxs(My,{className:ge("s3-explr-ui-dialog-close absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"),children:[l.jsx(Di,{className:"s3-explr-ui-dialog-close-icon h-4 w-4"}),l.jsx("span",{className:"s3-explr-ui-dialog-close-text sr-only",children:"Close"})]})]})]}));St.displayName=Jc.displayName;const Ct=({className:e,...t})=>l.jsx("div",{className:ge("s3-explr-ui-dialog-header flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Ct.displayName="DialogHeader";const pn=({className:e,...t})=>l.jsx("div",{className:ge("s3-explr-ui-dialog-footer flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});pn.displayName="DialogFooter";const Et=f.forwardRef(({className:e,...t},n)=>l.jsx(Zc,{ref:n,className:ge("s3-explr-ui-dialog-title text-lg font-semibold leading-none tracking-tight",e),...t}));Et.displayName=Zc.displayName;const Dn=f.forwardRef(({className:e,...t},n)=>l.jsx(Qc,{ref:n,className:ge("s3-explr-ui-dialog-description text-sm text-muted-foreground",e),...t}));Dn.displayName=Qc.displayName;const en=f.forwardRef(({className:e,type:t,...n},r)=>l.jsx("input",{type:t,className:ge("s3-explr-ui-input","flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));en.displayName="Input";var Iy="Label",tu=f.forwardRef((e,t)=>l.jsx(Le.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));tu.displayName=Iy;var nu=tu;const Ly=zi("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 s3-explr-ui-label",{variants:{variant:{default:"s3-explr-ui-label-default",required:"s3-explr-ui-label-required",disabled:"s3-explr-ui-label-disabled"},size:{default:"s3-explr-ui-label-size-default",sm:"s3-explr-ui-label-size-sm",lg:"s3-explr-ui-label-size-lg"}},defaultVariants:{variant:"default",size:"default"}}),gn=f.forwardRef(({className:e,variant:t,size:n,...r},o)=>l.jsx(nu,{ref:o,className:ge(Ly({variant:t,size:n}),e),...r}));gn.displayName=nu.displayName;const ro=({className:e,...t})=>l.jsx("nav",{role:"navigation","aria-label":"pagination",className:ge("mx-auto flex w-full justify-center",e),...t});ro.displayName="Pagination";const oo=f.forwardRef(({className:e,...t},n)=>l.jsx("ul",{ref:n,className:ge("flex flex-row items-center gap-1",e),...t}));oo.displayName="PaginationContent";const mt=f.forwardRef(({className:e,...t},n)=>l.jsx("li",{ref:n,className:ge("",e),...t}));mt.displayName="PaginationItem";const Mn=({className:e,isActive:t,size:n="icon",...r})=>l.jsx("a",{"aria-current":t?"page":void 0,className:ge(Yl({variant:t?"outline":"ghost",size:n}),e),...r});Mn.displayName="PaginationLink";const io=({className:e,...t})=>l.jsxs(Mn,{"aria-label":"Go to previous page",size:"default",className:ge("gap-1 pl-2.5",e),...t,children:[l.jsx(ah,{className:"h-4 w-4"}),l.jsx("span",{children:"Previous"})]});io.displayName="PaginationPrevious";const ao=({className:e,...t})=>l.jsxs(Mn,{"aria-label":"Go to next page",size:"default",className:ge("gap-1 pr-2.5",e),...t,children:[l.jsx("span",{children:"Next"}),l.jsx(kl,{className:"h-4 w-4"})]});ao.displayName="PaginationNext";const so=({className:e,...t})=>l.jsxs("span",{"aria-hidden":!0,className:ge("flex h-9 w-9 items-center justify-center",e),...t,children:[l.jsx(sh,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"More pages"})]});so.displayName="PaginationEllipsis";const lo=f.forwardRef(({className:e,...t},n)=>l.jsx("div",{className:ge("relative w-full overflow-auto","s3-explr-ui-table-container"),children:l.jsx("table",{ref:n,className:ge("w-full caption-bottom text-sm","s3-explr-ui-table",e),...t})}));lo.displayName="Table";const co=f.forwardRef(({className:e,...t},n)=>l.jsx("thead",{ref:n,className:ge("[&_tr]:border-b","s3-explr-ui-table-header",e),...t}));co.displayName="TableHeader";const uo=f.forwardRef(({className:e,...t},n)=>l.jsx("tbody",{ref:n,className:ge("[&_tr:last-child]:border-0","s3-explr-ui-table-body",e),...t}));uo.displayName="TableBody";const Ry=f.forwardRef(({className:e,...t},n)=>l.jsx("tfoot",{ref:n,className:ge("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0","s3-explr-ui-table-footer",e),...t}));Ry.displayName="TableFooter";const ht=f.forwardRef(({className:e,...t},n)=>l.jsx("tr",{ref:n,className:ge("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted","s3-explr-ui-table-row",e),...t}));ht.displayName="TableRow";const Tt=f.forwardRef(({className:e,...t},n)=>l.jsx("th",{ref:n,className:ge("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]","s3-explr-ui-table-head",e),...t}));Tt.displayName="TableHead";const Xe=f.forwardRef(({className:e,...t},n)=>l.jsx("td",{ref:n,className:ge("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]","s3-explr-ui-table-cell",e),...t}));Xe.displayName="TableCell";const Vy=f.forwardRef(({className:e,...t},n)=>l.jsx("caption",{ref:n,className:ge("mt-4 text-sm text-muted-foreground","s3-explr-ui-table-caption",e),...t}));Vy.displayName="TableCaption";function sa(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function $n(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function ru(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function la(...e){return t=>{let n=!1;const r=e.map(o=>{const i=ru(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():ru(e[o],null)}}}}function ca(...e){return f.useCallback(la(...e),e)}var ua=f.forwardRef((e,t)=>{const{children:n,...r}=e,o=f.Children.toArray(n),i=o.find(zy);if(i){const a=i.props.children,s=o.map(u=>u===i?f.Children.count(a)>1?f.Children.only(null):f.isValidElement(a)?a.props.children:null:u);return l.jsx(da,{...r,ref:t,children:f.isValidElement(a)?f.cloneElement(a,void 0,s):null})}return l.jsx(da,{...r,ref:t,children:n})});ua.displayName="Slot";var da=f.forwardRef((e,t)=>{const{children:n,...r}=e;if(f.isValidElement(n)){const o=Hy(n);return f.cloneElement(n,{...By(r,n.props),ref:t?la(t,o):o})}return f.Children.count(n)>1?f.Children.only(null):null});da.displayName="SlotClone";var jy=({children:e})=>l.jsx(l.Fragment,{children:e});function zy(e){return f.isValidElement(e)&&e.type===jy}function By(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Hy(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Uy(e){const t=e+"CollectionProvider",[n,r]=Jt(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=p=>{const{scope:v,children:m}=p,y=T.useRef(null),w=T.useRef(new Map).current;return l.jsx(o,{scope:v,itemMap:w,collectionRef:y,children:m})};a.displayName=t;const s=e+"CollectionSlot",u=T.forwardRef((p,v)=>{const{scope:m,children:y}=p,w=i(s,m),b=ca(v,w.collectionRef);return l.jsx(ua,{ref:b,children:y})});u.displayName=s;const c=e+"CollectionItemSlot",d="data-radix-collection-item",g=T.forwardRef((p,v)=>{const{scope:m,children:y,...w}=p,b=T.useRef(null),S=ca(v,b),E=i(c,m);return T.useEffect(()=>(E.itemMap.set(b,{ref:b,...w}),()=>void E.itemMap.delete(b))),l.jsx(ua,{[d]:"",ref:S,children:y})});g.displayName=c;function h(p){const v=i(e+"CollectionConsumer",p);return T.useCallback(()=>{const y=v.collectionRef.current;if(!y)return[];const w=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(v.itemMap.values()).sort((E,x)=>w.indexOf(E.ref.current)-w.indexOf(x.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:a,Slot:u,ItemSlot:g},h,r]}var ou=f.forwardRef((e,t)=>{const{children:n,...r}=e,o=f.Children.toArray(n),i=o.find(qy);if(i){const a=i.props.children,s=o.map(u=>u===i?f.Children.count(a)>1?f.Children.only(null):f.isValidElement(a)?a.props.children:null:u);return l.jsx(fa,{...r,ref:t,children:f.isValidElement(a)?f.cloneElement(a,void 0,s):null})}return l.jsx(fa,{...r,ref:t,children:n})});ou.displayName="Slot";var fa=f.forwardRef((e,t)=>{const{children:n,...r}=e;if(f.isValidElement(n)){const o=Ky(n);return f.cloneElement(n,{...Gy(r,n.props),ref:t?la(t,o):o})}return f.Children.count(n)>1?f.Children.only(null):null});fa.displayName="SlotClone";var Wy=({children:e})=>l.jsx(l.Fragment,{children:e});function qy(e){return f.isValidElement(e)&&e.type===Wy}function Gy(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Ky(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Yy=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],iu=Yy.reduce((e,t)=>{const n=f.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?ou:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Xy=f.createContext(void 0);function au(e){const t=f.useContext(Xy);return e||t||"ltr"}var pa="rovingFocusGroup.onEntryFocus",Jy={bubbles:!1,cancelable:!0},fo="RovingFocusGroup",[ga,su,Zy]=Uy(fo),[Qy,lu]=Jt(fo,[Zy]),[ex,tx]=Qy(fo),cu=f.forwardRef((e,t)=>l.jsx(ga.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(ga.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(nx,{...e,ref:t})})}));cu.displayName=fo;var nx=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:u,onEntryFocus:c,preventScrollOnEntryFocus:d=!1,...g}=e,h=f.useRef(null),p=ca(t,h),v=au(i),[m=null,y]=_n({prop:a,defaultProp:s,onChange:u}),[w,b]=f.useState(!1),S=We(c),E=su(n),x=f.useRef(!1),[O,M]=f.useState(0);return f.useEffect(()=>{const I=h.current;if(I)return I.addEventListener(pa,S),()=>I.removeEventListener(pa,S)},[S]),l.jsx(ex,{scope:n,orientation:r,dir:v,loop:o,currentTabStopId:m,onItemFocus:f.useCallback(I=>y(I),[y]),onItemShiftTab:f.useCallback(()=>b(!0),[]),onFocusableItemAdd:f.useCallback(()=>M(I=>I+1),[]),onFocusableItemRemove:f.useCallback(()=>M(I=>I-1),[]),children:l.jsx(iu.div,{tabIndex:w||O===0?-1:0,"data-orientation":r,...g,ref:p,style:{outline:"none",...e.style},onMouseDown:$n(e.onMouseDown,()=>{x.current=!0}),onFocus:$n(e.onFocus,I=>{const H=!x.current;if(I.target===I.currentTarget&&H&&!w){const k=new CustomEvent(pa,Jy);if(I.currentTarget.dispatchEvent(k),!k.defaultPrevented){const G=E().filter(F=>F.focusable),U=G.find(F=>F.active),Z=G.find(F=>F.id===m),$=[U,Z,...G].filter(Boolean).map(F=>F.ref.current);fu($,d)}}x.current=!1}),onBlur:$n(e.onBlur,()=>b(!1))})})}),uu="RovingFocusGroupItem",du=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...a}=e,s=Pn(),u=i||s,c=tx(uu,n),d=c.currentTabStopId===u,g=su(n),{onFocusableItemAdd:h,onFocusableItemRemove:p}=c;return f.useEffect(()=>{if(r)return h(),()=>p()},[r,h,p]),l.jsx(ga.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:l.jsx(iu.span,{tabIndex:d?0:-1,"data-orientation":c.orientation,...a,ref:t,onMouseDown:$n(e.onMouseDown,v=>{r?c.onItemFocus(u):v.preventDefault()}),onFocus:$n(e.onFocus,()=>c.onItemFocus(u)),onKeyDown:$n(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){c.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const m=ix(v,c.orientation,c.dir);if(m!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let w=g().filter(b=>b.focusable).map(b=>b.ref.current);if(m==="last")w.reverse();else if(m==="prev"||m==="next"){m==="prev"&&w.reverse();const b=w.indexOf(v.currentTarget);w=c.loop?ax(w,b+1):w.slice(b+1)}setTimeout(()=>fu(w))}})})})});du.displayName=uu;var rx={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ox(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function ix(e,t,n){const r=ox(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return rx[r]}function fu(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function ax(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var sx=cu,lx=du;function pu(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function cx(...e){return t=>{let n=!1;const r=e.map(o=>{const i=pu(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():pu(e[o],null)}}}}function ux(...e){return f.useCallback(cx(...e),e)}function dx(e,t){return f.useReducer((n,r)=>t[n][r]??n,e)}var gu=e=>{const{present:t,children:n}=e,r=fx(t),o=typeof n=="function"?n({present:r.isPresent}):f.Children.only(n),i=ux(r.ref,px(o));return typeof n=="function"||r.isPresent?f.cloneElement(o,{ref:i}):null};gu.displayName="Presence";function fx(e){const[t,n]=f.useState(),r=f.useRef({}),o=f.useRef(e),i=f.useRef("none"),a=e?"mounted":"unmounted",[s,u]=dx(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const c=po(r.current);i.current=s==="mounted"?c:"none"},[s]),et(()=>{const c=r.current,d=o.current;if(d!==e){const h=i.current,p=po(c);e?u("MOUNT"):p==="none"||(c==null?void 0:c.display)==="none"?u("UNMOUNT"):u(d&&h!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),et(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,g=p=>{const m=po(r.current).includes(p.animationName);if(p.target===t&&m&&(u("ANIMATION_END"),!o.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},h=p=>{p.target===t&&(i.current=po(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",g),t.addEventListener("animationend",g),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",g),t.removeEventListener("animationend",g)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:f.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function po(e){return(e==null?void 0:e.animationName)||"none"}function px(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function mu(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function gx(...e){return t=>{let n=!1;const r=e.map(o=>{const i=mu(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():mu(e[o],null)}}}}var hu=f.forwardRef((e,t)=>{const{children:n,...r}=e,o=f.Children.toArray(n),i=o.find(hx);if(i){const a=i.props.children,s=o.map(u=>u===i?f.Children.count(a)>1?f.Children.only(null):f.isValidElement(a)?a.props.children:null:u);return l.jsx(ma,{...r,ref:t,children:f.isValidElement(a)?f.cloneElement(a,void 0,s):null})}return l.jsx(ma,{...r,ref:t,children:n})});hu.displayName="Slot";var ma=f.forwardRef((e,t)=>{const{children:n,...r}=e;if(f.isValidElement(n)){const o=yx(n);return f.cloneElement(n,{...vx(r,n.props),ref:t?gx(t,o):o})}return f.Children.count(n)>1?f.Children.only(null):null});ma.displayName="SlotClone";var mx=({children:e})=>l.jsx(l.Fragment,{children:e});function hx(e){return f.isValidElement(e)&&e.type===mx}function vx(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function yx(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var xx=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],go=xx.reduce((e,t)=>{const n=f.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?hu:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),ha="Tabs",[wx,bE]=Jt(ha,[lu]),vu=lu(),[bx,va]=wx(ha),yu=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:i,orientation:a="horizontal",dir:s,activationMode:u="automatic",...c}=e,d=au(s),[g,h]=_n({prop:r,onChange:o,defaultProp:i});return l.jsx(bx,{scope:n,baseId:Pn(),value:g,onValueChange:h,orientation:a,dir:d,activationMode:u,children:l.jsx(go.div,{dir:d,"data-orientation":a,...c,ref:t})})});yu.displayName=ha;var xu="TabsList",wu=f.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,i=va(xu,n),a=vu(n);return l.jsx(sx,{asChild:!0,...a,orientation:i.orientation,dir:i.dir,loop:r,children:l.jsx(go.div,{role:"tablist","aria-orientation":i.orientation,...o,ref:t})})});wu.displayName=xu;var bu="TabsTrigger",Su=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...i}=e,a=va(bu,n),s=vu(n),u=Tu(a.baseId,r),c=_u(a.baseId,r),d=r===a.value;return l.jsx(lx,{asChild:!0,...s,focusable:!o,active:d,children:l.jsx(go.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":c,"data-state":d?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:u,...i,ref:t,onMouseDown:sa(e.onMouseDown,g=>{!o&&g.button===0&&g.ctrlKey===!1?a.onValueChange(r):g.preventDefault()}),onKeyDown:sa(e.onKeyDown,g=>{[" ","Enter"].includes(g.key)&&a.onValueChange(r)}),onFocus:sa(e.onFocus,()=>{const g=a.activationMode!=="manual";!d&&!o&&g&&a.onValueChange(r)})})})});Su.displayName=bu;var Cu="TabsContent",Eu=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:i,...a}=e,s=va(Cu,n),u=Tu(s.baseId,r),c=_u(s.baseId,r),d=r===s.value,g=f.useRef(d);return f.useEffect(()=>{const h=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(h)},[]),l.jsx(gu,{present:o||d,children:({present:h})=>l.jsx(go.div,{"data-state":d?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":u,hidden:!h,id:c,tabIndex:0,...a,ref:t,style:{...e.style,animationDuration:g.current?"0s":void 0},children:h&&i})})});Eu.displayName=Cu;function Tu(e,t){return`${e}-trigger-${t}`}function _u(e,t){return`${e}-content-${t}`}var Sx=yu,Au=wu,Pu=Su,Nu=Eu;const Cx=Sx,Ou=f.forwardRef(({className:e,...t},n)=>l.jsx(Au,{ref:n,className:ge("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));Ou.displayName=Au.displayName;const mo=f.forwardRef(({className:e,...t},n)=>l.jsx(Pu,{ref:n,className:ge("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));mo.displayName=Pu.displayName;const ho=f.forwardRef(({className:e,...t},n)=>l.jsx(Nu,{ref:n,className:ge("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));ho.displayName=Nu.displayName;const ar=f.forwardRef(({className:e,...t},n)=>l.jsx("textarea",{className:ge("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));ar.displayName="Textarea";function Ex(e,t=[]){let n=[];function r(i,a){const s=f.createContext(a),u=n.length;n=[...n,a];function c(g){const{scope:h,children:p,...v}=g,m=(h==null?void 0:h[e][u])||s,y=f.useMemo(()=>v,Object.values(v));return l.jsx(m.Provider,{value:y,children:p})}function d(g,h){const p=(h==null?void 0:h[e][u])||s,v=f.useContext(p);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${g}\` must be used within \`${i}\``)}return c.displayName=i+"Provider",[c,d]}const o=()=>{const i=n.map(a=>f.createContext(a));return function(s){const u=(s==null?void 0:s[e])||i;return f.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return o.scopeName=e,[r,Tx(o,...t)]}function Tx(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:u,scopeName:c})=>{const g=u(i)[`__scope${c}`];return{...s,...g}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var ya=f.forwardRef((e,t)=>{const{children:n,...r}=e,o=f.Children.toArray(n),i=o.find(Ax);if(i){const a=i.props.children,s=o.map(u=>u===i?f.Children.count(a)>1?f.Children.only(null):f.isValidElement(a)?a.props.children:null:u);return l.jsx(xa,{...r,ref:t,children:f.isValidElement(a)?f.cloneElement(a,void 0,s):null})}return l.jsx(xa,{...r,ref:t,children:n})});ya.displayName="Slot";var xa=f.forwardRef((e,t)=>{const{children:n,...r}=e;if(f.isValidElement(n)){const o=Nx(n);return f.cloneElement(n,{...Px(r,n.props),ref:t?qr(t,o):o})}return f.Children.count(n)>1?f.Children.only(null):null});xa.displayName="SlotClone";var _x=({children:e})=>l.jsx(l.Fragment,{children:e});function Ax(e){return f.isValidElement(e)&&e.type===_x}function Px(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Nx(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Ox(e){const t=e+"CollectionProvider",[n,r]=Ex(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=p=>{const{scope:v,children:m}=p,y=T.useRef(null),w=T.useRef(new Map).current;return l.jsx(o,{scope:v,itemMap:w,collectionRef:y,children:m})};a.displayName=t;const s=e+"CollectionSlot",u=T.forwardRef((p,v)=>{const{scope:m,children:y}=p,w=i(s,m),b=st(v,w.collectionRef);return l.jsx(ya,{ref:b,children:y})});u.displayName=s;const c=e+"CollectionItemSlot",d="data-radix-collection-item",g=T.forwardRef((p,v)=>{const{scope:m,children:y,...w}=p,b=T.useRef(null),S=st(v,b),E=i(c,m);return T.useEffect(()=>(E.itemMap.set(b,{ref:b,...w}),()=>void E.itemMap.delete(b))),l.jsx(ya,{[d]:"",ref:S,children:y})});g.displayName=c;function h(p){const v=i(e+"CollectionConsumer",p);return T.useCallback(()=>{const y=v.collectionRef.current;if(!y)return[];const w=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(v.itemMap.values()).sort((E,x)=>w.indexOf(E.ref.current)-w.indexOf(x.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:a,Slot:u,ItemSlot:g},h,r]}var Fx="VisuallyHidden",wa=f.forwardRef((e,t)=>l.jsx(Le.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));wa.displayName=Fx;var ba="ToastProvider",[Sa,kx,Dx]=Ox("Toast"),[Fu,SE]=Jt("Toast",[Dx]),[Mx,vo]=Fu(ba),ku=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,u]=f.useState(null),[c,d]=f.useState(0),g=f.useRef(!1),h=f.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${ba}\`. Expected non-empty \`string\`.`),l.jsx(Sa.Provider,{scope:t,children:l.jsx(Mx,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:c,viewport:s,onViewportChange:u,onToastAdd:f.useCallback(()=>d(p=>p+1),[]),onToastRemove:f.useCallback(()=>d(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:g,isClosePausedRef:h,children:a})})};ku.displayName=ba;var Du="ToastViewport",$x=["F8"],Ca="toast.viewportPause",Ea="toast.viewportResume",Mu=f.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=$x,label:o="Notifications ({hotkey})",...i}=e,a=vo(Du,n),s=kx(n),u=f.useRef(null),c=f.useRef(null),d=f.useRef(null),g=f.useRef(null),h=st(t,g,a.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),v=a.toastCount>0;f.useEffect(()=>{const y=w=>{var S;r.length!==0&&r.every(E=>w[E]||w.code===E)&&((S=g.current)==null||S.focus())};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[r]),f.useEffect(()=>{const y=u.current,w=g.current;if(v&&y&&w){const b=()=>{if(!a.isClosePausedRef.current){const O=new CustomEvent(Ca);w.dispatchEvent(O),a.isClosePausedRef.current=!0}},S=()=>{if(a.isClosePausedRef.current){const O=new CustomEvent(Ea);w.dispatchEvent(O),a.isClosePausedRef.current=!1}},E=O=>{!y.contains(O.relatedTarget)&&S()},x=()=>{y.contains(document.activeElement)||S()};return y.addEventListener("focusin",b),y.addEventListener("focusout",E),y.addEventListener("pointermove",b),y.addEventListener("pointerleave",x),window.addEventListener("blur",b),window.addEventListener("focus",S),()=>{y.removeEventListener("focusin",b),y.removeEventListener("focusout",E),y.removeEventListener("pointermove",b),y.removeEventListener("pointerleave",x),window.removeEventListener("blur",b),window.removeEventListener("focus",S)}}},[v,a.isClosePausedRef]);const m=f.useCallback(({tabbingDirection:y})=>{const b=s().map(S=>{const E=S.ref.current,x=[E,...Kx(E)];return y==="forwards"?x:x.reverse()});return(y==="forwards"?b.reverse():b).flat()},[s]);return f.useEffect(()=>{const y=g.current;if(y){const w=b=>{var x,O,M;const S=b.altKey||b.ctrlKey||b.metaKey;if(b.key==="Tab"&&!S){const I=document.activeElement,H=b.shiftKey;if(b.target===y&&H){(x=c.current)==null||x.focus();return}const U=m({tabbingDirection:H?"backwards":"forwards"}),Z=U.findIndex(P=>P===I);Aa(U.slice(Z+1))?b.preventDefault():H?(O=c.current)==null||O.focus():(M=d.current)==null||M.focus()}};return y.addEventListener("keydown",w),()=>y.removeEventListener("keydown",w)}},[s,m]),l.jsxs(Ev,{ref:u,role:"region","aria-label":o.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:v?void 0:"none"},children:[v&&l.jsx(Ta,{ref:c,onFocusFromOutsideViewport:()=>{const y=m({tabbingDirection:"forwards"});Aa(y)}}),l.jsx(Sa.Slot,{scope:n,children:l.jsx(Le.ol,{tabIndex:-1,...i,ref:h})}),v&&l.jsx(Ta,{ref:d,onFocusFromOutsideViewport:()=>{const y=m({tabbingDirection:"backwards"});Aa(y)}})]})});Mu.displayName=Du;var $u="ToastFocusProxy",Ta=f.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=vo($u,n);return l.jsx(wa,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:a=>{var c;const s=a.relatedTarget;!((c=i.viewport)!=null&&c.contains(s))&&r()}})});Ta.displayName=$u;var yo="Toast",Ix="toast.swipeStart",Lx="toast.swipeMove",Rx="toast.swipeCancel",Vx="toast.swipeEnd",Iu=f.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s=!0,u]=_n({prop:r,defaultProp:o,onChange:i});return l.jsx(An,{present:n||s,children:l.jsx(Bx,{open:s,...a,ref:t,onClose:()=>u(!1),onPause:We(e.onPause),onResume:We(e.onResume),onSwipeStart:Ie(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Ie(e.onSwipeMove,c=>{const{x:d,y:g}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${g}px`)}),onSwipeCancel:Ie(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Ie(e.onSwipeEnd,c=>{const{x:d,y:g}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${g}px`),u(!1)})})})});Iu.displayName=yo;var[jx,zx]=Fu(yo,{onClose(){}}),Bx=f.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:a,onEscapeKeyDown:s,onPause:u,onResume:c,onSwipeStart:d,onSwipeMove:g,onSwipeCancel:h,onSwipeEnd:p,...v}=e,m=vo(yo,n),[y,w]=f.useState(null),b=st(t,P=>w(P)),S=f.useRef(null),E=f.useRef(null),x=o||m.duration,O=f.useRef(0),M=f.useRef(x),I=f.useRef(0),{onToastAdd:H,onToastRemove:k}=m,G=We(()=>{var $;(y==null?void 0:y.contains(document.activeElement))&&(($=m.viewport)==null||$.focus()),a()}),U=f.useCallback(P=>{!P||P===1/0||(window.clearTimeout(I.current),O.current=new Date().getTime(),I.current=window.setTimeout(G,P))},[G]);f.useEffect(()=>{const P=m.viewport;if(P){const $=()=>{U(M.current),c==null||c()},F=()=>{const W=new Date().getTime()-O.current;M.current=M.current-W,window.clearTimeout(I.current),u==null||u()};return P.addEventListener(Ca,F),P.addEventListener(Ea,$),()=>{P.removeEventListener(Ca,F),P.removeEventListener(Ea,$)}}},[m.viewport,x,u,c,U]),f.useEffect(()=>{i&&!m.isClosePausedRef.current&&U(x)},[i,x,m.isClosePausedRef,U]),f.useEffect(()=>(H(),()=>k()),[H,k]);const Z=f.useMemo(()=>y?Hu(y):null,[y]);return m.viewport?l.jsxs(l.Fragment,{children:[Z&&l.jsx(Hx,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:Z}),l.jsx(jx,{scope:n,onClose:G,children:Pr.createPortal(l.jsx(Sa.ItemSlot,{scope:n,children:l.jsx(Cv,{asChild:!0,onEscapeKeyDown:Ie(s,()=>{m.isFocusedToastEscapeKeyDownRef.current||G(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:l.jsx(Le.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":m.swipeDirection,...v,ref:b,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Ie(e.onKeyDown,P=>{P.key==="Escape"&&(s==null||s(P.nativeEvent),P.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,G()))}),onPointerDown:Ie(e.onPointerDown,P=>{P.button===0&&(S.current={x:P.clientX,y:P.clientY})}),onPointerMove:Ie(e.onPointerMove,P=>{if(!S.current)return;const $=P.clientX-S.current.x,F=P.clientY-S.current.y,W=!!E.current,N=["left","right"].includes(m.swipeDirection),V=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,_=N?V(0,$):0,B=N?0:V(0,F),Q=P.pointerType==="touch"?10:2,ne={x:_,y:B},ee={originalEvent:P,delta:ne};W?(E.current=ne,xo(Lx,g,ee,{discrete:!1})):Uu(ne,m.swipeDirection,Q)?(E.current=ne,xo(Ix,d,ee,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs($)>Q||Math.abs(F)>Q)&&(S.current=null)}),onPointerUp:Ie(e.onPointerUp,P=>{const $=E.current,F=P.target;if(F.hasPointerCapture(P.pointerId)&&F.releasePointerCapture(P.pointerId),E.current=null,S.current=null,$){const W=P.currentTarget,N={originalEvent:P,delta:$};Uu($,m.swipeDirection,m.swipeThreshold)?xo(Vx,p,N,{discrete:!0}):xo(Rx,h,N,{discrete:!0}),W.addEventListener("click",V=>V.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),Hx=e=>{const{__scopeToast:t,children:n,...r}=e,o=vo(yo,t),[i,a]=f.useState(!1),[s,u]=f.useState(!1);return qx(()=>a(!0)),f.useEffect(()=>{const c=window.setTimeout(()=>u(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:l.jsx(Yi,{asChild:!0,children:l.jsx(wa,{...r,children:i&&l.jsxs(l.Fragment,{children:[o.label," ",n]})})})},Ux="ToastTitle",Lu=f.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return l.jsx(Le.div,{...r,ref:t})});Lu.displayName=Ux;var Wx="ToastDescription",Ru=f.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return l.jsx(Le.div,{...r,ref:t})});Ru.displayName=Wx;var Vu="ToastAction",ju=f.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?l.jsx(Bu,{altText:n,asChild:!0,children:l.jsx(_a,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Vu}\`. Expected non-empty \`string\`.`),null)});ju.displayName=Vu;var zu="ToastClose",_a=f.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=zx(zu,n);return l.jsx(Bu,{asChild:!0,children:l.jsx(Le.button,{type:"button",...r,ref:t,onClick:Ie(e.onClick,o.onClose)})})});_a.displayName=zu;var Bu=f.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return l.jsx(Le.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function Hu(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),Gx(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const a=r.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...Hu(r))}}),t}function xo(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Zl(o,i):o.dispatchEvent(i)}var Uu=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n};function qx(e=()=>{}){const t=We(e);et(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function Gx(e){return e.nodeType===e.ELEMENT_NODE}function Kx(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Aa(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var Yx=ku,Wu=Mu,qu=Iu,Gu=Lu,Ku=Ru,Yu=ju,Xu=_a;const Xx=Yx,Ju=f.forwardRef(({className:e,...t},n)=>l.jsx(Wu,{ref:n,className:ge("s3-explr-ui-toast-viewport fixed top-0 flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px] z-[10000]",e),...t}));Ju.displayName=Wu.displayName;const Jx=zi("s3-explr-ui-toast group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"s3-explr-ui-toast-default border bg-background text-foreground",destructive:"s3-explr-ui-toast-destructive destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Zu=f.forwardRef(({className:e,variant:t,...n},r)=>l.jsx(qu,{ref:r,className:ge(Jx({variant:t}),e),...n}));Zu.displayName=qu.displayName;const Zx=f.forwardRef(({className:e,...t},n)=>l.jsx(Yu,{ref:n,className:ge("s3-explr-ui-toast-action inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));Zx.displayName=Yu.displayName;const Qu=f.forwardRef(({className:e,...t},n)=>l.jsx(Xu,{ref:n,className:ge("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity duration-200 ease-in-out hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600 font-bold",e),"toast-close":"",...t,children:l.jsx(Di,{className:"s3-explr-ui-toast-close-icon h-4 w-4"})}));Qu.displayName=Xu.displayName;const ed=f.forwardRef(({className:e,...t},n)=>l.jsx(Gu,{ref:n,className:ge("s3-explr-ui-toast-title text-sm font-semibold [&+div]:text-xs",e),...t}));ed.displayName=Gu.displayName;const td=f.forwardRef(({className:e,...t},n)=>l.jsx(Ku,{ref:n,className:ge("text-sm opacity-90 font-bold",e),...t}));td.displayName=Ku.displayName;const Qx=1,ew=1e6;let Pa=0;function tw(){return Pa=(Pa+1)%Number.MAX_SAFE_INTEGER,Pa.toString()}const Na=new Map,nd=e=>{if(Na.has(e))return;const t=setTimeout(()=>{Na.delete(e),sr({type:"REMOVE_TOAST",toastId:e})},ew);Na.set(e,t)},nw=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Qx)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?nd(n):e.toasts.forEach(r=>{nd(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},wo=[];let bo={toasts:[]};function sr(e){bo=nw(bo,e),wo.forEach(t=>{t(bo)})}function rw({...e}){const t=tw(),n=o=>sr({type:"UPDATE_TOAST",toast:{...o,id:t}}),r=()=>sr({type:"DISMISS_TOAST",toastId:t});return sr({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||r()}}}),{id:t,dismiss:r,update:n}}function So(){const[e,t]=f.useState(bo);return f.useEffect(()=>(wo.push(t),()=>{const n=wo.indexOf(t);n>-1&&wo.splice(n,1)}),[e]),{...e,toast:rw,dismiss:n=>sr({type:"DISMISS_TOAST",toastId:n})}}function rd(){const{toasts:e}=So();return l.jsxs(Xx,{children:[e.map(function({id:t,title:n,description:r,action:o,...i}){return l.jsxs(Zu,{...i,className:`s3-explr-ui-toast ${i.className||""}`,children:[l.jsxs("div",{className:"s3-explr-ui-toast-content grid gap-1",children:[n&&l.jsx(ed,{className:"s3-explr-ui-toast-title",children:n}),r&&l.jsx(td,{className:"s3-explr-ui-toast-description",children:r})]}),o&&l.jsx("div",{className:"s3-explr-ui-toast-action",children:o}),l.jsx(Qu,{className:"s3-explr-ui-toast-close"})]},t)}),l.jsx(Ju,{className:"s3-explr-ui-toast-viewport"})]})}function Vt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function od(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ow(...e){return t=>{let n=!1;const r=e.map(o=>{const i=od(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():od(e[o],null)}}}}function lr(...e){return f.useCallback(ow(...e),e)}var iw=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],cr=iw.reduce((e,t)=>{const n=f.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?Cn:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function aw(e,t){e&&Pr.flushSync(()=>e.dispatchEvent(t))}var sw="DismissableLayer",Oa="dismissableLayer.update",lw="dismissableLayer.pointerDownOutside",cw="dismissableLayer.focusOutside",id,ad=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),sd=f.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...u}=e,c=f.useContext(ad),[d,g]=f.useState(null),h=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=f.useState({}),v=lr(t,M=>g(M)),m=Array.from(c.layers),[y]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),w=m.indexOf(y),b=d?m.indexOf(d):-1,S=c.layersWithOutsidePointerEventsDisabled.size>0,E=b>=w,x=fw(M=>{const I=M.target,H=[...c.branches].some(k=>k.contains(I));!E||H||(o==null||o(M),a==null||a(M),M.defaultPrevented||s==null||s())},h),O=pw(M=>{const I=M.target;[...c.branches].some(k=>k.contains(I))||(i==null||i(M),a==null||a(M),M.defaultPrevented||s==null||s())},h);return oc(M=>{b===c.layers.size-1&&(r==null||r(M),!M.defaultPrevented&&s&&(M.preventDefault(),s()))},h),f.useEffect(()=>{if(d)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(id=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),ld(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=id)}},[d,h,n,c]),f.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),ld())},[d,c]),f.useEffect(()=>{const M=()=>p({});return document.addEventListener(Oa,M),()=>document.removeEventListener(Oa,M)},[]),l.jsx(cr.div,{...u,ref:v,style:{pointerEvents:S?E?"auto":"none":void 0,...e.style},onFocusCapture:Vt(e.onFocusCapture,O.onFocusCapture),onBlurCapture:Vt(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:Vt(e.onPointerDownCapture,x.onPointerDownCapture)})});sd.displayName=sw;var uw="DismissableLayerBranch",dw=f.forwardRef((e,t)=>{const n=f.useContext(ad),r=f.useRef(null),o=lr(t,r);return f.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),l.jsx(cr.div,{...e,ref:o})});dw.displayName=uw;function fw(e,t=globalThis==null?void 0:globalThis.document){const n=We(e),r=f.useRef(!1),o=f.useRef(()=>{});return f.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let u=function(){cd(lw,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function pw(e,t=globalThis==null?void 0:globalThis.document){const n=We(e),r=f.useRef(!1);return f.useEffect(()=>{const o=i=>{i.target&&!r.current&&cd(cw,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ld(){const e=new CustomEvent(Oa);document.dispatchEvent(e)}function cd(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?aw(o,i):o.dispatchEvent(i)}const gw=["top","right","bottom","left"],tn=Math.min,tt=Math.max,Co=Math.round,Eo=Math.floor,_t=e=>({x:e,y:e}),mw={left:"right",right:"left",bottom:"top",top:"bottom"},hw={start:"end",end:"start"};function Fa(e,t,n){return tt(e,tn(t,n))}function jt(e,t){return typeof e=="function"?e(t):e}function zt(e){return e.split("-")[0]}function In(e){return e.split("-")[1]}function ka(e){return e==="x"?"y":"x"}function Da(e){return e==="y"?"height":"width"}function nn(e){return["top","bottom"].includes(zt(e))?"y":"x"}function Ma(e){return ka(nn(e))}function vw(e,t,n){n===void 0&&(n=!1);const r=In(e),o=Ma(e),i=Da(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=To(a)),[a,To(a)]}function yw(e){const t=To(e);return[$a(e),t,$a(t)]}function $a(e){return e.replace(/start|end/g,t=>hw[t])}function xw(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}function ww(e,t,n,r){const o=In(e);let i=xw(zt(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map($a)))),i}function To(e){return e.replace(/left|right|bottom|top/g,t=>mw[t])}function bw(e){return{top:0,right:0,bottom:0,left:0,...e}}function ud(e){return typeof e!="number"?bw(e):{top:e,right:e,bottom:e,left:e}}function _o(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function dd(e,t,n){let{reference:r,floating:o}=e;const i=nn(t),a=Ma(t),s=Da(a),u=zt(t),c=i==="y",d=r.x+r.width/2-o.width/2,g=r.y+r.height/2-o.height/2,h=r[s]/2-o[s]/2;let p;switch(u){case"top":p={x:d,y:r.y-o.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:g};break;case"left":p={x:r.x-o.width,y:g};break;default:p={x:r.x,y:r.y}}switch(In(t)){case"start":p[a]-=h*(n&&c?-1:1);break;case"end":p[a]+=h*(n&&c?-1:1);break}return p}const Sw=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:g}=dd(c,r,u),h=r,p={},v=0;for(let m=0;m<s.length;m++){const{name:y,fn:w}=s[m],{x:b,y:S,data:E,reset:x}=await w({x:d,y:g,initialPlacement:r,placement:h,strategy:o,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});d=b??d,g=S??g,p={...p,[y]:{...p[y],...E}},x&&v<=50&&(v++,typeof x=="object"&&(x.placement&&(h=x.placement),x.rects&&(c=x.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):x.rects),{x:d,y:g}=dd(c,h,u)),m=-1)}return{x:d,y:g,placement:h,strategy:o,middlewareData:p}};async function ur(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:g="floating",altBoundary:h=!1,padding:p=0}=jt(t,e),v=ud(p),y=s[h?g==="floating"?"reference":"floating":g],w=_o(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(y)))==null||n?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:u})),b=g==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,S=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),E=await(i.isElement==null?void 0:i.isElement(S))?await(i.getScale==null?void 0:i.getScale(S))||{x:1,y:1}:{x:1,y:1},x=_o(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:S,strategy:u}):b);return{top:(w.top-x.top+v.top)/E.y,bottom:(x.bottom-w.bottom+v.bottom)/E.y,left:(w.left-x.left+v.left)/E.x,right:(x.right-w.right+v.right)/E.x}}const Cw=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:u}=t,{element:c,padding:d=0}=jt(e,t)||{};if(c==null)return{};const g=ud(d),h={x:n,y:r},p=Ma(o),v=Da(p),m=await a.getDimensions(c),y=p==="y",w=y?"top":"left",b=y?"bottom":"right",S=y?"clientHeight":"clientWidth",E=i.reference[v]+i.reference[p]-h[p]-i.floating[v],x=h[p]-i.reference[p],O=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let M=O?O[S]:0;(!M||!await(a.isElement==null?void 0:a.isElement(O)))&&(M=s.floating[S]||i.floating[v]);const I=E/2-x/2,H=M/2-m[v]/2-1,k=tn(g[w],H),G=tn(g[b],H),U=k,Z=M-m[v]-G,P=M/2-m[v]/2+I,$=Fa(U,P,Z),F=!u.arrow&&In(o)!=null&&P!==$&&i.reference[v]/2-(P<U?k:G)-m[v]/2<0,W=F?P<U?P-U:P-Z:0;return{[p]:h[p]+W,data:{[p]:$,centerOffset:P-$-W,...F&&{alignmentOffset:W}},reset:F}}}),Ew=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:u,elements:c}=t,{mainAxis:d=!0,crossAxis:g=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:m=!0,...y}=jt(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const w=zt(o),b=nn(s),S=zt(s)===s,E=await(u.isRTL==null?void 0:u.isRTL(c.floating)),x=h||(S||!m?[To(s)]:yw(s)),O=v!=="none";!h&&O&&x.push(...ww(s,m,v,E));const M=[s,...x],I=await ur(t,y),H=[];let k=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&H.push(I[w]),g){const P=vw(o,a,E);H.push(I[P[0]],I[P[1]])}if(k=[...k,{placement:o,overflows:H}],!H.every(P=>P<=0)){var G,U;const P=(((G=i.flip)==null?void 0:G.index)||0)+1,$=M[P];if($)return{data:{index:P,overflows:k},reset:{placement:$}};let F=(U=k.filter(W=>W.overflows[0]<=0).sort((W,N)=>W.overflows[1]-N.overflows[1])[0])==null?void 0:U.placement;if(!F)switch(p){case"bestFit":{var Z;const W=(Z=k.filter(N=>{if(O){const V=nn(N.placement);return V===b||V==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(V=>V>0).reduce((V,_)=>V+_,0)]).sort((N,V)=>N[1]-V[1])[0])==null?void 0:Z[0];W&&(F=W);break}case"initialPlacement":F=s;break}if(o!==F)return{reset:{placement:F}}}return{}}}};function fd(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function pd(e){return gw.some(t=>e[t]>=0)}const Tw=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=jt(e,t);switch(r){case"referenceHidden":{const i=await ur(t,{...o,elementContext:"reference"}),a=fd(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:pd(a)}}}case"escaped":{const i=await ur(t,{...o,altBoundary:!0}),a=fd(i,n.floating);return{data:{escapedOffsets:a,escaped:pd(a)}}}default:return{}}}}};async function _w(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=zt(n),s=In(n),u=nn(n)==="y",c=["left","top"].includes(a)?-1:1,d=i&&u?-1:1,g=jt(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:v}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return s&&typeof v=="number"&&(p=s==="end"?v*-1:v),u?{x:p*d,y:h*c}:{x:h*c,y:p*d}}const Aw=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,u=await _w(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:a}}}}},Pw=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:y=>{let{x:w,y:b}=y;return{x:w,y:b}}},...u}=jt(e,t),c={x:n,y:r},d=await ur(t,u),g=nn(zt(o)),h=ka(g);let p=c[h],v=c[g];if(i){const y=h==="y"?"top":"left",w=h==="y"?"bottom":"right",b=p+d[y],S=p-d[w];p=Fa(b,p,S)}if(a){const y=g==="y"?"top":"left",w=g==="y"?"bottom":"right",b=v+d[y],S=v-d[w];v=Fa(b,v,S)}const m=s.fn({...t,[h]:p,[g]:v});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[h]:i,[g]:a}}}}}},Nw=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:u=!0,crossAxis:c=!0}=jt(e,t),d={x:n,y:r},g=nn(o),h=ka(g);let p=d[h],v=d[g];const m=jt(s,t),y=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(u){const S=h==="y"?"height":"width",E=i.reference[h]-i.floating[S]+y.mainAxis,x=i.reference[h]+i.reference[S]-y.mainAxis;p<E?p=E:p>x&&(p=x)}if(c){var w,b;const S=h==="y"?"width":"height",E=["top","left"].includes(zt(o)),x=i.reference[g]-i.floating[S]+(E&&((w=a.offset)==null?void 0:w[g])||0)+(E?0:y.crossAxis),O=i.reference[g]+i.reference[S]+(E?0:((b=a.offset)==null?void 0:b[g])||0)-(E?y.crossAxis:0);v<x?v=x:v>O&&(v=O)}return{[h]:p,[g]:v}}}},Ow=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:u=()=>{},...c}=jt(e,t),d=await ur(t,c),g=zt(o),h=In(o),p=nn(o)==="y",{width:v,height:m}=i.floating;let y,w;g==="top"||g==="bottom"?(y=g,w=h===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(w=g,y=h==="end"?"top":"bottom");const b=m-d.top-d.bottom,S=v-d.left-d.right,E=tn(m-d[y],b),x=tn(v-d[w],S),O=!t.middlewareData.shift;let M=E,I=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(I=S),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(M=b),O&&!h){const k=tt(d.left,0),G=tt(d.right,0),U=tt(d.top,0),Z=tt(d.bottom,0);p?I=v-2*(k!==0||G!==0?k+G:tt(d.left,d.right)):M=m-2*(U!==0||Z!==0?U+Z:tt(d.top,d.bottom))}await u({...t,availableWidth:I,availableHeight:M});const H=await a.getDimensions(s.floating);return v!==H.width||m!==H.height?{reset:{rects:!0}}:{}}}};function Ao(){return typeof window<"u"}function Ln(e){return gd(e)?(e.nodeName||"").toLowerCase():"#document"}function nt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function At(e){var t;return(t=(gd(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function gd(e){return Ao()?e instanceof Node||e instanceof nt(e).Node:!1}function vt(e){return Ao()?e instanceof Element||e instanceof nt(e).Element:!1}function Pt(e){return Ao()?e instanceof HTMLElement||e instanceof nt(e).HTMLElement:!1}function md(e){return!Ao()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof nt(e).ShadowRoot}function dr(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=yt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Fw(e){return["table","td","th"].includes(Ln(e))}function Po(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Ia(e){const t=La(),n=vt(e)?yt(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function kw(e){let t=rn(e);for(;Pt(t)&&!Rn(t);){if(Ia(t))return t;if(Po(t))return null;t=rn(t)}return null}function La(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Rn(e){return["html","body","#document"].includes(Ln(e))}function yt(e){return nt(e).getComputedStyle(e)}function No(e){return vt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function rn(e){if(Ln(e)==="html")return e;const t=e.assignedSlot||e.parentNode||md(e)&&e.host||At(e);return md(t)?t.host:t}function hd(e){const t=rn(e);return Rn(t)?e.ownerDocument?e.ownerDocument.body:e.body:Pt(t)&&dr(t)?t:hd(t)}function fr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=hd(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=nt(o);if(i){const s=Ra(a);return t.concat(a,a.visualViewport||[],dr(o)?o:[],s&&n?fr(s):[])}return t.concat(o,fr(o,[],n))}function Ra(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function vd(e){const t=yt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Pt(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=Co(n)!==i||Co(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Va(e){return vt(e)?e:e.contextElement}function Vn(e){const t=Va(e);if(!Pt(t))return _t(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=vd(t);let a=(i?Co(n.width):n.width)/r,s=(i?Co(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const Dw=_t(0);function yd(e){const t=nt(e);return!La()||!t.visualViewport?Dw:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Mw(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==nt(e)?!1:t}function mn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Va(e);let a=_t(1);t&&(r?vt(r)&&(a=Vn(r)):a=Vn(e));const s=Mw(i,n,r)?yd(i):_t(0);let u=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,d=o.width/a.x,g=o.height/a.y;if(i){const h=nt(i),p=r&&vt(r)?nt(r):r;let v=h,m=Ra(v);for(;m&&r&&p!==v;){const y=Vn(m),w=m.getBoundingClientRect(),b=yt(m),S=w.left+(m.clientLeft+parseFloat(b.paddingLeft))*y.x,E=w.top+(m.clientTop+parseFloat(b.paddingTop))*y.y;u*=y.x,c*=y.y,d*=y.x,g*=y.y,u+=S,c+=E,v=nt(m),m=Ra(v)}}return _o({width:d,height:g,x:u,y:c})}function ja(e,t){const n=No(e).scrollLeft;return t?t.left+n:mn(At(e)).left+n}function xd(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:ja(e,r)),i=r.top+t.scrollTop;return{x:o,y:i}}function $w(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=At(r),s=t?Po(t.floating):!1;if(r===a||s&&i)return n;let u={scrollLeft:0,scrollTop:0},c=_t(1);const d=_t(0),g=Pt(r);if((g||!g&&!i)&&((Ln(r)!=="body"||dr(a))&&(u=No(r)),Pt(r))){const p=mn(r);c=Vn(r),d.x=p.x+r.clientLeft,d.y=p.y+r.clientTop}const h=a&&!g&&!i?xd(a,u,!0):_t(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+d.x+h.x,y:n.y*c.y-u.scrollTop*c.y+d.y+h.y}}function Iw(e){return Array.from(e.getClientRects())}function Lw(e){const t=At(e),n=No(e),r=e.ownerDocument.body,o=tt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=tt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+ja(e);const s=-n.scrollTop;return yt(r).direction==="rtl"&&(a+=tt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function Rw(e,t){const n=nt(e),r=At(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,u=0;if(o){i=o.width,a=o.height;const c=La();(!c||c&&t==="fixed")&&(s=o.offsetLeft,u=o.offsetTop)}return{width:i,height:a,x:s,y:u}}function Vw(e,t){const n=mn(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Pt(e)?Vn(e):_t(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,u=o*i.x,c=r*i.y;return{width:a,height:s,x:u,y:c}}function wd(e,t,n){let r;if(t==="viewport")r=Rw(e,n);else if(t==="document")r=Lw(At(e));else if(vt(t))r=Vw(t,n);else{const o=yd(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return _o(r)}function bd(e,t){const n=rn(e);return n===t||!vt(n)||Rn(n)?!1:yt(n).position==="fixed"||bd(n,t)}function jw(e,t){const n=t.get(e);if(n)return n;let r=fr(e,[],!1).filter(s=>vt(s)&&Ln(s)!=="body"),o=null;const i=yt(e).position==="fixed";let a=i?rn(e):e;for(;vt(a)&&!Rn(a);){const s=yt(a),u=Ia(a);!u&&s.position==="fixed"&&(o=null),(i?!u&&!o:!u&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||dr(a)&&!u&&bd(e,a))?r=r.filter(d=>d!==a):o=s,a=rn(a)}return t.set(e,r),r}function zw(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Po(t)?[]:jw(t,this._c):[].concat(n),r],s=a[0],u=a.reduce((c,d)=>{const g=wd(t,d,o);return c.top=tt(g.top,c.top),c.right=tn(g.right,c.right),c.bottom=tn(g.bottom,c.bottom),c.left=tt(g.left,c.left),c},wd(t,s,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function Bw(e){const{width:t,height:n}=vd(e);return{width:t,height:n}}function Hw(e,t,n){const r=Pt(t),o=At(t),i=n==="fixed",a=mn(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const u=_t(0);if(r||!r&&!i)if((Ln(t)!=="body"||dr(o))&&(s=No(t)),r){const h=mn(t,!0,i,t);u.x=h.x+t.clientLeft,u.y=h.y+t.clientTop}else o&&(u.x=ja(o));const c=o&&!r&&!i?xd(o,s):_t(0),d=a.left+s.scrollLeft-u.x-c.x,g=a.top+s.scrollTop-u.y-c.y;return{x:d,y:g,width:a.width,height:a.height}}function za(e){return yt(e).position==="static"}function Sd(e,t){if(!Pt(e)||yt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return At(e)===n&&(n=n.ownerDocument.body),n}function Cd(e,t){const n=nt(e);if(Po(e))return n;if(!Pt(e)){let o=rn(e);for(;o&&!Rn(o);){if(vt(o)&&!za(o))return o;o=rn(o)}return n}let r=Sd(e,t);for(;r&&Fw(r)&&za(r);)r=Sd(r,t);return r&&Rn(r)&&za(r)&&!Ia(r)?n:r||kw(e)||n}const Uw=async function(e){const t=this.getOffsetParent||Cd,n=this.getDimensions,r=await n(e.floating);return{reference:Hw(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ww(e){return yt(e).direction==="rtl"}const qw={convertOffsetParentRelativeRectToViewportRelativeRect:$w,getDocumentElement:At,getClippingRect:zw,getOffsetParent:Cd,getElementRects:Uw,getClientRects:Iw,getDimensions:Bw,getScale:Vn,isElement:vt,isRTL:Ww};function Gw(e,t){let n=null,r;const o=At(e);function i(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,u){s===void 0&&(s=!1),u===void 0&&(u=1),i();const{left:c,top:d,width:g,height:h}=e.getBoundingClientRect();if(s||t(),!g||!h)return;const p=Eo(d),v=Eo(o.clientWidth-(c+g)),m=Eo(o.clientHeight-(d+h)),y=Eo(c),b={rootMargin:-p+"px "+-v+"px "+-m+"px "+-y+"px",threshold:tt(0,tn(1,u))||1};let S=!0;function E(x){const O=x[0].intersectionRatio;if(O!==u){if(!S)return a();O?a(!1,O):r=setTimeout(()=>{a(!1,1e-7)},1e3)}S=!1}try{n=new IntersectionObserver(E,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,b)}n.observe(e)}return a(!0),i}function Kw(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,c=Va(e),d=o||i?[...c?fr(c):[],...fr(t)]:[];d.forEach(w=>{o&&w.addEventListener("scroll",n,{passive:!0}),i&&w.addEventListener("resize",n)});const g=c&&s?Gw(c,n):null;let h=-1,p=null;a&&(p=new ResizeObserver(w=>{let[b]=w;b&&b.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var S;(S=p)==null||S.observe(t)})),n()}),c&&!u&&p.observe(c),p.observe(t));let v,m=u?mn(e):null;u&&y();function y(){const w=mn(e);m&&(w.x!==m.x||w.y!==m.y||w.width!==m.width||w.height!==m.height)&&n(),m=w,v=requestAnimationFrame(y)}return n(),()=>{var w;d.forEach(b=>{o&&b.removeEventListener("scroll",n),i&&b.removeEventListener("resize",n)}),g==null||g(),(w=p)==null||w.disconnect(),p=null,u&&cancelAnimationFrame(v)}}const Yw=Aw,Xw=Pw,Jw=Ew,Zw=Ow,Qw=Tw,Ed=Cw,eb=Nw,tb=(e,t,n)=>{const r=new Map,o={platform:qw,...n},i={...o.platform,_c:r};return Sw(e,t,{...o,platform:i})};var Oo=typeof document<"u"?T.useLayoutEffect:T.useEffect;function Fo(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Fo(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Fo(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Td(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function _d(e,t){const n=Td(e);return Math.round(t*n)/n}function Ba(e){const t=f.useRef(e);return Oo(()=>{t.current=e}),t}function nb(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:u,open:c}=e,[d,g]=f.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=f.useState(r);Fo(h,r)||p(r);const[v,m]=f.useState(null),[y,w]=f.useState(null),b=f.useCallback(N=>{N!==O.current&&(O.current=N,m(N))},[]),S=f.useCallback(N=>{N!==M.current&&(M.current=N,w(N))},[]),E=i||v,x=a||y,O=f.useRef(null),M=f.useRef(null),I=f.useRef(d),H=u!=null,k=Ba(u),G=Ba(o),U=Ba(c),Z=f.useCallback(()=>{if(!O.current||!M.current)return;const N={placement:t,strategy:n,middleware:h};G.current&&(N.platform=G.current),tb(O.current,M.current,N).then(V=>{const _={...V,isPositioned:U.current!==!1};P.current&&!Fo(I.current,_)&&(I.current=_,Pr.flushSync(()=>{g(_)}))})},[h,t,n,G,U]);Oo(()=>{c===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,g(N=>({...N,isPositioned:!1})))},[c]);const P=f.useRef(!1);Oo(()=>(P.current=!0,()=>{P.current=!1}),[]),Oo(()=>{if(E&&(O.current=E),x&&(M.current=x),E&&x){if(k.current)return k.current(E,x,Z);Z()}},[E,x,Z,k,H]);const $=f.useMemo(()=>({reference:O,floating:M,setReference:b,setFloating:S}),[b,S]),F=f.useMemo(()=>({reference:E,floating:x}),[E,x]),W=f.useMemo(()=>{const N={position:n,left:0,top:0};if(!F.floating)return N;const V=_d(F.floating,d.x),_=_d(F.floating,d.y);return s?{...N,transform:"translate("+V+"px, "+_+"px)",...Td(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:V,top:_}},[n,s,F.floating,d.x,d.y]);return f.useMemo(()=>({...d,update:Z,refs:$,elements:F,floatingStyles:W}),[d,Z,$,F,W])}const rb=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Ed({element:r.current,padding:o}).fn(n):{}:r?Ed({element:r,padding:o}).fn(n):{}}}},ob=(e,t)=>({...Yw(e),options:[e,t]}),ib=(e,t)=>({...Xw(e),options:[e,t]}),ab=(e,t)=>({...eb(e),options:[e,t]}),sb=(e,t)=>({...Jw(e),options:[e,t]}),lb=(e,t)=>({...Zw(e),options:[e,t]}),cb=(e,t)=>({...Qw(e),options:[e,t]}),ub=(e,t)=>({...rb(e),options:[e,t]});var db=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],fb=db.reduce((e,t)=>{const n=f.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?Cn:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),pb="Arrow",Ad=f.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return l.jsx(fb.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ad.displayName=pb;var gb=Ad;function Pd(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function mb(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Pd(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():Pd(e[o],null)}}}}function Nd(...e){return f.useCallback(mb(...e),e)}var hb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Od=hb.reduce((e,t)=>{const n=f.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?Cn:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Ha="Popper",[Fd,kd]=Jt(Ha),[vb,Dd]=Fd(Ha),Md=e=>{const{__scopePopper:t,children:n}=e,[r,o]=f.useState(null);return l.jsx(vb,{scope:t,anchor:r,onAnchorChange:o,children:n})};Md.displayName=Ha;var $d="PopperAnchor",Id=f.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=Dd($d,n),a=f.useRef(null),s=Nd(t,a);return f.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:l.jsx(Od.div,{...o,ref:s})});Id.displayName=$d;var Ua="PopperContent",[yb,xb]=Fd(Ua),Ld=f.forwardRef((e,t)=>{var ie,de,ue,le,Se,K;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:a=0,arrowPadding:s=0,avoidCollisions:u=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:g="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:v,...m}=e,y=Dd(Ua,n),[w,b]=f.useState(null),S=Nd(t,Ee=>b(Ee)),[E,x]=f.useState(null),O=Xl(E),M=(O==null?void 0:O.width)??0,I=(O==null?void 0:O.height)??0,H=r+(i!=="center"?"-"+i:""),k=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},G=Array.isArray(c)?c:[c],U=G.length>0,Z={padding:k,boundary:G.filter(bb),altBoundary:U},{refs:P,floatingStyles:$,placement:F,isPositioned:W,middlewareData:N}=nb({strategy:"fixed",placement:H,whileElementsMounted:(...Ee)=>Kw(...Ee,{animationFrame:p==="always"}),elements:{reference:y.anchor},middleware:[ob({mainAxis:o+I,alignmentAxis:a}),u&&ib({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?ab():void 0,...Z}),u&&sb({...Z}),lb({...Z,apply:({elements:Ee,rects:He,availableWidth:Ue,availableHeight:Dt})=>{const{width:ot,height:C}=He.reference,A=Ee.floating.style;A.setProperty("--radix-popper-available-width",`${Ue}px`),A.setProperty("--radix-popper-available-height",`${Dt}px`),A.setProperty("--radix-popper-anchor-width",`${ot}px`),A.setProperty("--radix-popper-anchor-height",`${C}px`)}}),E&&ub({element:E,padding:s}),Sb({arrowWidth:M,arrowHeight:I}),h&&cb({strategy:"referenceHidden",...Z})]}),[V,_]=jd(F),B=We(v);et(()=>{W&&(B==null||B())},[W,B]);const Q=(ie=N.arrow)==null?void 0:ie.x,ne=(de=N.arrow)==null?void 0:de.y,ee=((ue=N.arrow)==null?void 0:ue.centerOffset)!==0,[ce,oe]=f.useState();return et(()=>{w&&oe(window.getComputedStyle(w).zIndex)},[w]),l.jsx("div",{ref:P.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:W?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ce,"--radix-popper-transform-origin":[(le=N.transformOrigin)==null?void 0:le.x,(Se=N.transformOrigin)==null?void 0:Se.y].join(" "),...((K=N.hide)==null?void 0:K.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(yb,{scope:n,placedSide:V,onArrowChange:x,arrowX:Q,arrowY:ne,shouldHideArrow:ee,children:l.jsx(Od.div,{"data-side":V,"data-align":_,...m,ref:S,style:{...m.style,animation:W?void 0:"none"}})})})});Ld.displayName=Ua;var Rd="PopperArrow",wb={top:"bottom",right:"left",bottom:"top",left:"right"},Vd=f.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=xb(Rd,r),a=wb[i.placedSide];return l.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:l.jsx(gb,{...o,ref:n,style:{...o.style,display:"block"}})})});Vd.displayName=Rd;function bb(e){return e!==null}var Sb=e=>({name:"transformOrigin",options:e,fn(t){var y,w,b;const{placement:n,rects:r,middlewareData:o}=t,a=((y=o.arrow)==null?void 0:y.centerOffset)!==0,s=a?0:e.arrowWidth,u=a?0:e.arrowHeight,[c,d]=jd(n),g={start:"0%",center:"50%",end:"100%"}[d],h=(((w=o.arrow)==null?void 0:w.x)??0)+s/2,p=(((b=o.arrow)==null?void 0:b.y)??0)+u/2;let v="",m="";return c==="bottom"?(v=a?g:`${h}px`,m=`${-u}px`):c==="top"?(v=a?g:`${h}px`,m=`${r.floating.height+u}px`):c==="right"?(v=`${-u}px`,m=a?g:`${p}px`):c==="left"&&(v=`${r.floating.width+u}px`,m=a?g:`${p}px`),{data:{x:v,y:m}}}});function jd(e){const[t,n="center"]=e.split("-");return[t,n]}var Cb=Md,Eb=Id,Tb=Ld,_b=Vd,Ab="Portal",zd=f.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,i]=f.useState(!1);et(()=>i(!0),[]);const a=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?Jo.createPortal(l.jsx(cr.div,{...r,ref:t}),a):null});zd.displayName=Ab;function Pb(e,t){return f.useReducer((n,r)=>t[n][r]??n,e)}var Wa=e=>{const{present:t,children:n}=e,r=Nb(t),o=typeof n=="function"?n({present:r.isPresent}):f.Children.only(n),i=lr(r.ref,Ob(o));return typeof n=="function"||r.isPresent?f.cloneElement(o,{ref:i}):null};Wa.displayName="Presence";function Nb(e){const[t,n]=f.useState(),r=f.useRef({}),o=f.useRef(e),i=f.useRef("none"),a=e?"mounted":"unmounted",[s,u]=Pb(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const c=ko(r.current);i.current=s==="mounted"?c:"none"},[s]),et(()=>{const c=r.current,d=o.current;if(d!==e){const h=i.current,p=ko(c);e?u("MOUNT"):p==="none"||(c==null?void 0:c.display)==="none"?u("UNMOUNT"):u(d&&h!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),et(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,g=p=>{const m=ko(r.current).includes(p.animationName);if(p.target===t&&m&&(u("ANIMATION_END"),!o.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},h=p=>{p.target===t&&(i.current=ko(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",g),t.addEventListener("animationend",g),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",g),t.removeEventListener("animationend",g)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:f.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function ko(e){return(e==null?void 0:e.animationName)||"none"}function Ob(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Fb="VisuallyHidden",Bd=f.forwardRef((e,t)=>l.jsx(cr.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Bd.displayName=Fb;var kb=Bd,[Do,CE]=Jt("Tooltip",[kd]),Mo=kd(),Hd="TooltipProvider",Db=700,qa="tooltip.open",[Mb,Ga]=Do(Hd),Ud=e=>{const{__scopeTooltip:t,delayDuration:n=Db,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,[a,s]=f.useState(!0),u=f.useRef(!1),c=f.useRef(0);return f.useEffect(()=>{const d=c.current;return()=>window.clearTimeout(d)},[]),l.jsx(Mb,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:f.useCallback(()=>{window.clearTimeout(c.current),s(!1)},[]),onClose:f.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>s(!0),r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:f.useCallback(d=>{u.current=d},[]),disableHoverableContent:o,children:i})};Ud.displayName=Hd;var $o="Tooltip",[$b,pr]=Do($o),Wd=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:a,delayDuration:s}=e,u=Ga($o,e.__scopeTooltip),c=Mo(t),[d,g]=f.useState(null),h=Pn(),p=f.useRef(0),v=a??u.disableHoverableContent,m=s??u.delayDuration,y=f.useRef(!1),[w=!1,b]=_n({prop:r,defaultProp:o,onChange:M=>{M?(u.onOpen(),document.dispatchEvent(new CustomEvent(qa))):u.onClose(),i==null||i(M)}}),S=f.useMemo(()=>w?y.current?"delayed-open":"instant-open":"closed",[w]),E=f.useCallback(()=>{window.clearTimeout(p.current),p.current=0,y.current=!1,b(!0)},[b]),x=f.useCallback(()=>{window.clearTimeout(p.current),p.current=0,b(!1)},[b]),O=f.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{y.current=!0,b(!0),p.current=0},m)},[m,b]);return f.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),l.jsx(Cb,{...c,children:l.jsx($b,{scope:t,contentId:h,open:w,stateAttribute:S,trigger:d,onTriggerChange:g,onTriggerEnter:f.useCallback(()=>{u.isOpenDelayed?O():E()},[u.isOpenDelayed,O,E]),onTriggerLeave:f.useCallback(()=>{v?x():(window.clearTimeout(p.current),p.current=0)},[x,v]),onOpen:E,onClose:x,disableHoverableContent:v,children:n})})};Wd.displayName=$o;var Ka="TooltipTrigger",qd=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=pr(Ka,n),i=Ga(Ka,n),a=Mo(n),s=f.useRef(null),u=lr(t,s,o.onTriggerChange),c=f.useRef(!1),d=f.useRef(!1),g=f.useCallback(()=>c.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",g),[g]),l.jsx(Eb,{asChild:!0,...a,children:l.jsx(cr.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:u,onPointerMove:Vt(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:Vt(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:Vt(e.onPointerDown,()=>{c.current=!0,document.addEventListener("pointerup",g,{once:!0})}),onFocus:Vt(e.onFocus,()=>{c.current||o.onOpen()}),onBlur:Vt(e.onBlur,o.onClose),onClick:Vt(e.onClick,o.onClose)})})});qd.displayName=Ka;var Ya="TooltipPortal",[Ib,Lb]=Do(Ya,{forceMount:void 0}),Gd=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,i=pr(Ya,t);return l.jsx(Ib,{scope:t,forceMount:n,children:l.jsx(Wa,{present:n||i.open,children:l.jsx(zd,{asChild:!0,container:o,children:r})})})};Gd.displayName=Ya;var jn="TooltipContent",Kd=f.forwardRef((e,t)=>{const n=Lb(jn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,a=pr(jn,e.__scopeTooltip);return l.jsx(Wa,{present:r||a.open,children:a.disableHoverableContent?l.jsx(Yd,{side:o,...i,ref:t}):l.jsx(Rb,{side:o,...i,ref:t})})}),Rb=f.forwardRef((e,t)=>{const n=pr(jn,e.__scopeTooltip),r=Ga(jn,e.__scopeTooltip),o=f.useRef(null),i=lr(t,o),[a,s]=f.useState(null),{trigger:u,onClose:c}=n,d=o.current,{onPointerInTransitChange:g}=r,h=f.useCallback(()=>{s(null),g(!1)},[g]),p=f.useCallback((v,m)=>{const y=v.currentTarget,w={x:v.clientX,y:v.clientY},b=Bb(w,y.getBoundingClientRect()),S=Hb(w,b),E=Ub(m.getBoundingClientRect()),x=qb([...S,...E]);s(x),g(!0)},[g]);return f.useEffect(()=>()=>h(),[h]),f.useEffect(()=>{if(u&&d){const v=y=>p(y,d),m=y=>p(y,u);return u.addEventListener("pointerleave",v),d.addEventListener("pointerleave",m),()=>{u.removeEventListener("pointerleave",v),d.removeEventListener("pointerleave",m)}}},[u,d,p,h]),f.useEffect(()=>{if(a){const v=m=>{const y=m.target,w={x:m.clientX,y:m.clientY},b=(u==null?void 0:u.contains(y))||(d==null?void 0:d.contains(y)),S=!Wb(w,a);b?h():S&&(h(),c())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[u,d,a,c,h]),l.jsx(Yd,{...e,ref:i})}),[Vb,jb]=Do($o,{isInside:!1}),Yd=f.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...s}=e,u=pr(jn,n),c=Mo(n),{onClose:d}=u;return f.useEffect(()=>(document.addEventListener(qa,d),()=>document.removeEventListener(qa,d)),[d]),f.useEffect(()=>{if(u.trigger){const g=h=>{const p=h.target;p!=null&&p.contains(u.trigger)&&d()};return window.addEventListener("scroll",g,{capture:!0}),()=>window.removeEventListener("scroll",g,{capture:!0})}},[u.trigger,d]),l.jsx(sd,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:g=>g.preventDefault(),onDismiss:d,children:l.jsxs(Tb,{"data-state":u.stateAttribute,...c,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[l.jsx(Ml,{children:r}),l.jsx(Vb,{scope:n,isInside:!0,children:l.jsx(kb,{id:u.contentId,role:"tooltip",children:o||r})})]})})});Kd.displayName=jn;var Xd="TooltipArrow",zb=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Mo(n);return jb(Xd,n).isInside?null:l.jsx(_b,{...o,...r,ref:t})});zb.displayName=Xd;function Bb(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Hb(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function Ub(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function Wb(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const s=t[i].x,u=t[i].y,c=t[a].x,d=t[a].y;u>r!=d>r&&n<(c-s)*(r-u)/(d-u)+s&&(o=!o)}return o}function qb(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),Gb(t)}function Gb(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const i=t[t.length-1],a=t[t.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],a=n[n.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Kb=Ud,Yb=Wd,Xb=qd,Jb=Gd,Jd=Kd;const zn=Kb,Bn=Yb,Hn=Xb,hn=f.forwardRef(({className:e,sideOffset:t=4,...n},r)=>l.jsx(Jb,{children:l.jsx(Jd,{ref:r,sideOffset:t,className:ge("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));hn.displayName=Jd.displayName;function Zb({title:e,titleId:t,...n},r){return f.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?f.createElement("title",{id:t},e):null,f.createElement("path",{fillRule:"evenodd",d:"M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const Qb=f.forwardRef(Zb);var e0=function(e){return function(t,n){var r=T.useRef(!1);e(function(){return function(){r.current=!1}},[]),e(function(){if(!r.current)r.current=!0;else return t()},n)}},Zd=function(e){return typeof e=="function"},Qd=process.env.NODE_ENV==="development"||process.env.NODE_ENV==="test";const t0=e0(T.useEffect);function ef(e){var t=T.useRef(e);return t.current=e,t}var n0=function(e){Qd&&(Zd(e)||console.error("useUnmount expected parameter is a function, got ".concat(typeof e)));var t=ef(e);T.useEffect(function(){return function(){t.current()}},[])};function r0(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var tf=r0,o0=typeof rr=="object"&&rr&&rr.Object===Object&&rr,i0=o0,a0=i0,s0=typeof self=="object"&&self&&self.Object===Object&&self,l0=a0||s0||Function("return this")(),nf=l0,c0=nf,u0=function(){return c0.Date.now()},d0=u0,f0=/\s/;function p0(e){for(var t=e.length;t--&&f0.test(e.charAt(t)););return t}var g0=p0,m0=g0,h0=/^\s+/;function v0(e){return e&&e.slice(0,m0(e)+1).replace(h0,"")}var y0=v0,x0=nf,w0=x0.Symbol,rf=w0,of=rf,af=Object.prototype,b0=af.hasOwnProperty,S0=af.toString,gr=of?of.toStringTag:void 0;function C0(e){var t=b0.call(e,gr),n=e[gr];try{e[gr]=void 0;var r=!0}catch{}var o=S0.call(e);return r&&(t?e[gr]=n:delete e[gr]),o}var E0=C0,T0=Object.prototype,_0=T0.toString;function A0(e){return _0.call(e)}var P0=A0,sf=rf,N0=E0,O0=P0,F0="[object Null]",k0="[object Undefined]",lf=sf?sf.toStringTag:void 0;function D0(e){return e==null?e===void 0?k0:F0:lf&&lf in Object(e)?N0(e):O0(e)}var M0=D0;function $0(e){return e!=null&&typeof e=="object"}var I0=$0,L0=M0,R0=I0,V0="[object Symbol]";function j0(e){return typeof e=="symbol"||R0(e)&&L0(e)==V0}var z0=j0,B0=y0,cf=tf,H0=z0,uf=NaN,U0=/^[-+]0x[0-9a-f]+$/i,W0=/^0b[01]+$/i,q0=/^0o[0-7]+$/i,G0=parseInt;function K0(e){if(typeof e=="number")return e;if(H0(e))return uf;if(cf(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=cf(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=B0(e);var n=W0.test(e);return n||q0.test(e)?G0(e.slice(2),n?2:8):U0.test(e)?uf:+e}var Y0=K0,X0=tf,Xa=d0,df=Y0,J0="Expected a function",Z0=Math.max,Q0=Math.min;function eS(e,t,n){var r,o,i,a,s,u,c=0,d=!1,g=!1,h=!0;if(typeof e!="function")throw new TypeError(J0);t=df(t)||0,X0(n)&&(d=!!n.leading,g="maxWait"in n,i=g?Z0(df(n.maxWait)||0,t):i,h="trailing"in n?!!n.trailing:h);function p(O){var M=r,I=o;return r=o=void 0,c=O,a=e.apply(I,M),a}function v(O){return c=O,s=setTimeout(w,t),d?p(O):a}function m(O){var M=O-u,I=O-c,H=t-M;return g?Q0(H,i-I):H}function y(O){var M=O-u,I=O-c;return u===void 0||M>=t||M<0||g&&I>=i}function w(){var O=Xa();if(y(O))return b(O);s=setTimeout(w,m(O))}function b(O){return s=void 0,h&&r?p(O):(r=o=void 0,a)}function S(){s!==void 0&&clearTimeout(s),c=0,r=u=o=s=void 0}function E(){return s===void 0?a:b(Xa())}function x(){var O=Xa(),M=y(O);if(r=arguments,o=this,u=O,M){if(s===void 0)return v(u);if(g)return clearTimeout(s),s=setTimeout(w,t),p(u)}return s===void 0&&(s=setTimeout(w,t)),a}return x.cancel=S,x.flush=E,x}var tS=eS;const nS=Wr(tS);function rS(){var e=(typeof global>"u"?"undefined":typeof global)=="object"&&global&&global.Object===Object&&global,t=typeof self=="object"&&self&&self.Object===Object&&self;return e||t}rS()||(global.Date=Date);function oS(e,t){var n;Qd&&(Zd(e)||console.error("useDebounceFn expected parameter is a function, got ".concat(typeof e)));var r=ef(e),o=(n=t==null?void 0:t.wait)!==null&&n!==void 0?n:1e3,i=T.useMemo(function(){return nS(function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return r.current.apply(r,xc([],yc(a),!1))},o,t)},[]);return n0(function(){i.cancel()}),{run:i,cancel:i.cancel,flush:i.flush}}function iS(e,t,n){var r=yc(T.useState({}),2),o=r[0],i=r[1],a=oS(function(){i({})},n).run;T.useEffect(function(){return a()},t),t0(e,[o])}const aS=T.forwardRef(({onChange:e},t)=>{const n=T.useRef(null),[r,o]=T.useState("");return T.useImperativeHandle(t,()=>({setValue:i=>{var a;o(i),(a=n.current)==null||a.focus()}})),iS(()=>{e==null||e(r)},[r],{wait:300}),l.jsxs(l.Fragment,{children:[l.jsx(en,{ref:n,type:"text",placeholder:"Search files...",value:r,onChange:i=>o(i.target.value),className:"pr-8"}),r&&l.jsx("button",{onClick:()=>{var i;o(""),(i=n.current)==null||i.focus()},className:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-500 hover:text-gray-700",children:l.jsx(Qb,{className:"h-5 w-5"})})]})});var Ja={exports:{}},Io={exports:{}},_e={};/** @license React v16.13.1
152
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return p.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},ox="DialogDescriptionWarning",ix=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${lu(ox).contentName}}.`;return p.useEffect(()=>{var i;const o=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},ax=Kc,sx=Xc,lx=Zc,cu=Qc,uu=eu,du=nu,fu=ou,cx=au;const jt=ax,lo=sx,ux=lx,pu=p.forwardRef(({className:e,...t},n)=>l.jsx(cu,{ref:n,className:me("s3-explr-ui-dialog-overlay fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));pu.displayName=cu.displayName;const Et=p.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(ux,{children:[l.jsx(pu,{}),l.jsxs(uu,{ref:r,className:me("s3-explr-ui-dialog-content fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,l.jsxs(cx,{className:me("s3-explr-ui-dialog-close absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"),children:[l.jsx(Vi,{className:"s3-explr-ui-dialog-close-icon h-4 w-4"}),l.jsx("span",{className:"s3-explr-ui-dialog-close-text sr-only",children:"Close"})]})]})]}));Et.displayName=uu.displayName;const _t=({className:e,...t})=>l.jsx("div",{className:me("s3-explr-ui-dialog-header flex flex-col space-y-1.5 text-center sm:text-left",e),...t});_t.displayName="DialogHeader";const mn=({className:e,...t})=>l.jsx("div",{className:me("s3-explr-ui-dialog-footer flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});mn.displayName="DialogFooter";const Tt=p.forwardRef(({className:e,...t},n)=>l.jsx(du,{ref:n,className:me("s3-explr-ui-dialog-title text-lg font-semibold leading-none tracking-tight",e),...t}));Tt.displayName=du.displayName;const Mn=p.forwardRef(({className:e,...t},n)=>l.jsx(fu,{ref:n,className:me("s3-explr-ui-dialog-description text-sm text-muted-foreground",e),...t}));Mn.displayName=fu.displayName;const nn=p.forwardRef(({className:e,type:t,...n},r)=>l.jsx("input",{type:t,className:me("s3-explr-ui-input","flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));nn.displayName="Input";var dx="Label",gu=p.forwardRef((e,t)=>l.jsx(Re.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));gu.displayName=dx;var mu=gu;const fx=Yi("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 s3-explr-ui-label",{variants:{variant:{default:"s3-explr-ui-label-default",required:"s3-explr-ui-label-required",disabled:"s3-explr-ui-label-disabled"},size:{default:"s3-explr-ui-label-size-default",sm:"s3-explr-ui-label-size-sm",lg:"s3-explr-ui-label-size-lg"}},defaultVariants:{variant:"default",size:"default"}}),hn=p.forwardRef(({className:e,variant:t,size:n,...r},o)=>l.jsx(mu,{ref:o,className:me(fx({variant:t,size:n}),e),...r}));hn.displayName=mu.displayName;const co=({className:e,...t})=>l.jsx("nav",{role:"navigation","aria-label":"pagination",className:me("mx-auto flex w-full justify-center",e),...t});co.displayName="Pagination";const uo=p.forwardRef(({className:e,...t},n)=>l.jsx("ul",{ref:n,className:me("flex flex-row items-center gap-1",e),...t}));uo.displayName="PaginationContent";const ht=p.forwardRef(({className:e,...t},n)=>l.jsx("li",{ref:n,className:me("",e),...t}));ht.displayName="PaginationItem";const $n=({className:e,isActive:t,size:n="icon",...r})=>l.jsx("a",{"aria-current":t?"page":void 0,className:me(lc({variant:t?"outline":"ghost",size:n}),e),...r});$n.displayName="PaginationLink";const fo=({className:e,...t})=>l.jsxs($n,{"aria-label":"Go to previous page",size:"default",className:me("gap-1 pl-2.5",e),...t,children:[l.jsx(Ch,{className:"h-4 w-4"}),l.jsx("span",{children:"Previous"})]});fo.displayName="PaginationPrevious";const po=({className:e,...t})=>l.jsxs($n,{"aria-label":"Go to next page",size:"default",className:me("gap-1 pr-2.5",e),...t,children:[l.jsx("span",{children:"Next"}),l.jsx(jl,{className:"h-4 w-4"})]});po.displayName="PaginationNext";const go=({className:e,...t})=>l.jsxs("span",{"aria-hidden":!0,className:me("flex h-9 w-9 items-center justify-center",e),...t,children:[l.jsx(Sh,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"More pages"})]});go.displayName="PaginationEllipsis";const mo=p.forwardRef(({className:e,...t},n)=>l.jsx("div",{className:me("relative w-full overflow-auto","s3-explr-ui-table-container"),children:l.jsx("table",{ref:n,className:me("w-full caption-bottom text-sm","s3-explr-ui-table",e),...t})}));mo.displayName="Table";const ho=p.forwardRef(({className:e,...t},n)=>l.jsx("thead",{ref:n,className:me("[&_tr]:border-b","s3-explr-ui-table-header",e),...t}));ho.displayName="TableHeader";const vo=p.forwardRef(({className:e,...t},n)=>l.jsx("tbody",{ref:n,className:me("[&_tr:last-child]:border-0","s3-explr-ui-table-body",e),...t}));vo.displayName="TableBody";const px=p.forwardRef(({className:e,...t},n)=>l.jsx("tfoot",{ref:n,className:me("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0","s3-explr-ui-table-footer",e),...t}));px.displayName="TableFooter";const vt=p.forwardRef(({className:e,...t},n)=>l.jsx("tr",{ref:n,className:me("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted","s3-explr-ui-table-row",e),...t}));vt.displayName="TableRow";const At=p.forwardRef(({className:e,...t},n)=>l.jsx("th",{ref:n,className:me("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]","s3-explr-ui-table-head",e),...t}));At.displayName="TableHead";const Je=p.forwardRef(({className:e,...t},n)=>l.jsx("td",{ref:n,className:me("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]","s3-explr-ui-table-cell",e),...t}));Je.displayName="TableCell";const gx=p.forwardRef(({className:e,...t},n)=>l.jsx("caption",{ref:n,className:me("mt-4 text-sm text-muted-foreground","s3-explr-ui-table-caption",e),...t}));gx.displayName="TableCaption";function ma(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Ln(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function hu(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ha(...e){return t=>{let n=!1;const r=e.map(o=>{const i=hu(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():hu(e[o],null)}}}}function va(...e){return p.useCallback(ha(...e),e)}var ya=p.forwardRef((e,t)=>{const{children:n,...r}=e,o=p.Children.toArray(n),i=o.find(hx);if(i){const a=i.props.children,s=o.map(u=>u===i?p.Children.count(a)>1?p.Children.only(null):p.isValidElement(a)?a.props.children:null:u);return l.jsx(xa,{...r,ref:t,children:p.isValidElement(a)?p.cloneElement(a,void 0,s):null})}return l.jsx(xa,{...r,ref:t,children:n})});ya.displayName="Slot";var xa=p.forwardRef((e,t)=>{const{children:n,...r}=e;if(p.isValidElement(n)){const o=yx(n);return p.cloneElement(n,{...vx(r,n.props),ref:t?ha(t,o):o})}return p.Children.count(n)>1?p.Children.only(null):null});xa.displayName="SlotClone";var mx=({children:e})=>l.jsx(l.Fragment,{children:e});function hx(e){return p.isValidElement(e)&&e.type===mx}function vx(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function yx(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function xx(e){const t=e+"CollectionProvider",[n,r]=Qt(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=f=>{const{scope:v,children:h}=f,y=_.useRef(null),b=_.useRef(new Map).current;return l.jsx(o,{scope:v,itemMap:b,collectionRef:y,children:h})};a.displayName=t;const s=e+"CollectionSlot",u=_.forwardRef((f,v)=>{const{scope:h,children:y}=f,b=i(s,h),w=va(v,b.collectionRef);return l.jsx(ya,{ref:w,children:y})});u.displayName=s;const c=e+"CollectionItemSlot",d="data-radix-collection-item",g=_.forwardRef((f,v)=>{const{scope:h,children:y,...b}=f,w=_.useRef(null),C=va(v,w),E=i(c,h);return _.useEffect(()=>(E.itemMap.set(w,{ref:w,...b}),()=>void E.itemMap.delete(w))),l.jsx(ya,{[d]:"",ref:C,children:y})});g.displayName=c;function m(f){const v=i(e+"CollectionConsumer",f);return _.useCallback(()=>{const y=v.collectionRef.current;if(!y)return[];const b=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(v.itemMap.values()).sort((E,x)=>b.indexOf(E.ref.current)-b.indexOf(x.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:a,Slot:u,ItemSlot:g},m,r]}var vu=p.forwardRef((e,t)=>{const{children:n,...r}=e,o=p.Children.toArray(n),i=o.find(wx);if(i){const a=i.props.children,s=o.map(u=>u===i?p.Children.count(a)>1?p.Children.only(null):p.isValidElement(a)?a.props.children:null:u);return l.jsx(ba,{...r,ref:t,children:p.isValidElement(a)?p.cloneElement(a,void 0,s):null})}return l.jsx(ba,{...r,ref:t,children:n})});vu.displayName="Slot";var ba=p.forwardRef((e,t)=>{const{children:n,...r}=e;if(p.isValidElement(n)){const o=Sx(n);return p.cloneElement(n,{...Cx(r,n.props),ref:t?ha(t,o):o})}return p.Children.count(n)>1?p.Children.only(null):null});ba.displayName="SlotClone";var bx=({children:e})=>l.jsx(l.Fragment,{children:e});function wx(e){return p.isValidElement(e)&&e.type===bx}function Cx(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Sx(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ex=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],yu=Ex.reduce((e,t)=>{const n=p.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?vu:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),_x=p.createContext(void 0);function xu(e){const t=p.useContext(_x);return e||t||"ltr"}var wa="rovingFocusGroup.onEntryFocus",Tx={bubbles:!1,cancelable:!0},yo="RovingFocusGroup",[Ca,bu,Ax]=xx(yo),[Px,wu]=Qt(yo,[Ax]),[Nx,kx]=Px(yo),Cu=p.forwardRef((e,t)=>l.jsx(Ca.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(Ca.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(Ox,{...e,ref:t})})}));Cu.displayName=yo;var Ox=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:u,onEntryFocus:c,preventScrollOnEntryFocus:d=!1,...g}=e,m=p.useRef(null),f=va(t,m),v=xu(i),[h=null,y]=Pn({prop:a,defaultProp:s,onChange:u}),[b,w]=p.useState(!1),C=qe(c),E=bu(n),x=p.useRef(!1),[O,I]=p.useState(0);return p.useEffect(()=>{const $=m.current;if($)return $.addEventListener(wa,C),()=>$.removeEventListener(wa,C)},[C]),l.jsx(Nx,{scope:n,orientation:r,dir:v,loop:o,currentTabStopId:h,onItemFocus:p.useCallback($=>y($),[y]),onItemShiftTab:p.useCallback(()=>w(!0),[]),onFocusableItemAdd:p.useCallback(()=>I($=>$+1),[]),onFocusableItemRemove:p.useCallback(()=>I($=>$-1),[]),children:l.jsx(yu.div,{tabIndex:b||O===0?-1:0,"data-orientation":r,...g,ref:f,style:{outline:"none",...e.style},onMouseDown:Ln(e.onMouseDown,()=>{x.current=!0}),onFocus:Ln(e.onFocus,$=>{const H=!x.current;if($.target===$.currentTarget&&H&&!b){const D=new CustomEvent(wa,Tx);if($.currentTarget.dispatchEvent(D),!D.defaultPrevented){const G=E().filter(F=>F.focusable),U=G.find(F=>F.active),Z=G.find(F=>F.id===h),M=[U,Z,...G].filter(Boolean).map(F=>F.ref.current);_u(M,d)}}x.current=!1}),onBlur:Ln(e.onBlur,()=>w(!1))})})}),Su="RovingFocusGroupItem",Eu=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...a}=e,s=kn(),u=i||s,c=kx(Su,n),d=c.currentTabStopId===u,g=bu(n),{onFocusableItemAdd:m,onFocusableItemRemove:f}=c;return p.useEffect(()=>{if(r)return m(),()=>f()},[r,m,f]),l.jsx(Ca.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:l.jsx(yu.span,{tabIndex:d?0:-1,"data-orientation":c.orientation,...a,ref:t,onMouseDown:Ln(e.onMouseDown,v=>{r?c.onItemFocus(u):v.preventDefault()}),onFocus:Ln(e.onFocus,()=>c.onItemFocus(u)),onKeyDown:Ln(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){c.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const h=Ix(v,c.orientation,c.dir);if(h!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let b=g().filter(w=>w.focusable).map(w=>w.ref.current);if(h==="last")b.reverse();else if(h==="prev"||h==="next"){h==="prev"&&b.reverse();const w=b.indexOf(v.currentTarget);b=c.loop?Mx(b,w+1):b.slice(w+1)}setTimeout(()=>_u(b))}})})})});Eu.displayName=Su;var Fx={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Dx(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Ix(e,t,n){const r=Dx(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Fx[r]}function _u(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Mx(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var $x=Cu,Lx=Eu;function Tu(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Rx(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Tu(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():Tu(e[o],null)}}}}function Vx(...e){return p.useCallback(Rx(...e),e)}function jx(e,t){return p.useReducer((n,r)=>t[n][r]??n,e)}var Au=e=>{const{present:t,children:n}=e,r=zx(t),o=typeof n=="function"?n({present:r.isPresent}):p.Children.only(n),i=Vx(r.ref,Bx(o));return typeof n=="function"||r.isPresent?p.cloneElement(o,{ref:i}):null};Au.displayName="Presence";function zx(e){const[t,n]=p.useState(),r=p.useRef({}),o=p.useRef(e),i=p.useRef("none"),a=e?"mounted":"unmounted",[s,u]=jx(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const c=xo(r.current);i.current=s==="mounted"?c:"none"},[s]),rt(()=>{const c=r.current,d=o.current;if(d!==e){const m=i.current,f=xo(c);e?u("MOUNT"):f==="none"||(c==null?void 0:c.display)==="none"?u("UNMOUNT"):u(d&&m!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),rt(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,g=f=>{const h=xo(r.current).includes(f.animationName);if(f.target===t&&h&&(u("ANIMATION_END"),!o.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},m=f=>{f.target===t&&(i.current=xo(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",g),t.addEventListener("animationend",g),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",g),t.removeEventListener("animationend",g)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:p.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function xo(e){return(e==null?void 0:e.animationName)||"none"}function Bx(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Pu(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Hx(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Pu(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():Pu(e[o],null)}}}}var Nu=p.forwardRef((e,t)=>{const{children:n,...r}=e,o=p.Children.toArray(n),i=o.find(Wx);if(i){const a=i.props.children,s=o.map(u=>u===i?p.Children.count(a)>1?p.Children.only(null):p.isValidElement(a)?a.props.children:null:u);return l.jsx(Sa,{...r,ref:t,children:p.isValidElement(a)?p.cloneElement(a,void 0,s):null})}return l.jsx(Sa,{...r,ref:t,children:n})});Nu.displayName="Slot";var Sa=p.forwardRef((e,t)=>{const{children:n,...r}=e;if(p.isValidElement(n)){const o=Gx(n);return p.cloneElement(n,{...qx(r,n.props),ref:t?Hx(t,o):o})}return p.Children.count(n)>1?p.Children.only(null):null});Sa.displayName="SlotClone";var Ux=({children:e})=>l.jsx(l.Fragment,{children:e});function Wx(e){return p.isValidElement(e)&&e.type===Ux}function qx(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Gx(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Kx=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],bo=Kx.reduce((e,t)=>{const n=p.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?Nu:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Ea="Tabs",[Yx,r_]=Qt(Ea,[wu]),ku=wu(),[Xx,_a]=Yx(Ea),Ou=p.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:i,orientation:a="horizontal",dir:s,activationMode:u="automatic",...c}=e,d=xu(s),[g,m]=Pn({prop:r,onChange:o,defaultProp:i});return l.jsx(Xx,{scope:n,baseId:kn(),value:g,onValueChange:m,orientation:a,dir:d,activationMode:u,children:l.jsx(bo.div,{dir:d,"data-orientation":a,...c,ref:t})})});Ou.displayName=Ea;var Fu="TabsList",Du=p.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,i=_a(Fu,n),a=ku(n);return l.jsx($x,{asChild:!0,...a,orientation:i.orientation,dir:i.dir,loop:r,children:l.jsx(bo.div,{role:"tablist","aria-orientation":i.orientation,...o,ref:t})})});Du.displayName=Fu;var Iu="TabsTrigger",Mu=p.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...i}=e,a=_a(Iu,n),s=ku(n),u=Ru(a.baseId,r),c=Vu(a.baseId,r),d=r===a.value;return l.jsx(Lx,{asChild:!0,...s,focusable:!o,active:d,children:l.jsx(bo.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":c,"data-state":d?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:u,...i,ref:t,onMouseDown:ma(e.onMouseDown,g=>{!o&&g.button===0&&g.ctrlKey===!1?a.onValueChange(r):g.preventDefault()}),onKeyDown:ma(e.onKeyDown,g=>{[" ","Enter"].includes(g.key)&&a.onValueChange(r)}),onFocus:ma(e.onFocus,()=>{const g=a.activationMode!=="manual";!d&&!o&&g&&a.onValueChange(r)})})})});Mu.displayName=Iu;var $u="TabsContent",Lu=p.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:i,...a}=e,s=_a($u,n),u=Ru(s.baseId,r),c=Vu(s.baseId,r),d=r===s.value,g=p.useRef(d);return p.useEffect(()=>{const m=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(m)},[]),l.jsx(Au,{present:o||d,children:({present:m})=>l.jsx(bo.div,{"data-state":d?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":u,hidden:!m,id:c,tabIndex:0,...a,ref:t,style:{...e.style,animationDuration:g.current?"0s":void 0},children:m&&i})})});Lu.displayName=$u;function Ru(e,t){return`${e}-trigger-${t}`}function Vu(e,t){return`${e}-content-${t}`}var Jx=Ou,ju=Du,zu=Mu,Bu=Lu;const Zx=Jx,Hu=p.forwardRef(({className:e,...t},n)=>l.jsx(ju,{ref:n,className:me("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));Hu.displayName=ju.displayName;const wo=p.forwardRef(({className:e,...t},n)=>l.jsx(zu,{ref:n,className:me("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));wo.displayName=zu.displayName;const Co=p.forwardRef(({className:e,...t},n)=>l.jsx(Bu,{ref:n,className:me("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Co.displayName=Bu.displayName;const ur=p.forwardRef(({className:e,...t},n)=>l.jsx("textarea",{className:me("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));ur.displayName="Textarea";function Qx(e,t=[]){let n=[];function r(i,a){const s=p.createContext(a),u=n.length;n=[...n,a];function c(g){const{scope:m,children:f,...v}=g,h=(m==null?void 0:m[e][u])||s,y=p.useMemo(()=>v,Object.values(v));return l.jsx(h.Provider,{value:y,children:f})}function d(g,m){const f=(m==null?void 0:m[e][u])||s,v=p.useContext(f);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${g}\` must be used within \`${i}\``)}return c.displayName=i+"Provider",[c,d]}const o=()=>{const i=n.map(a=>p.createContext(a));return function(s){const u=(s==null?void 0:s[e])||i;return p.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return o.scopeName=e,[r,eb(o,...t)]}function eb(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:u,scopeName:c})=>{const g=u(i)[`__scope${c}`];return{...s,...g}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var Ta=p.forwardRef((e,t)=>{const{children:n,...r}=e,o=p.Children.toArray(n),i=o.find(nb);if(i){const a=i.props.children,s=o.map(u=>u===i?p.Children.count(a)>1?p.Children.only(null):p.isValidElement(a)?a.props.children:null:u);return l.jsx(Aa,{...r,ref:t,children:p.isValidElement(a)?p.cloneElement(a,void 0,s):null})}return l.jsx(Aa,{...r,ref:t,children:n})});Ta.displayName="Slot";var Aa=p.forwardRef((e,t)=>{const{children:n,...r}=e;if(p.isValidElement(n)){const o=ob(n);return p.cloneElement(n,{...rb(r,n.props),ref:t?Zr(t,o):o})}return p.Children.count(n)>1?p.Children.only(null):null});Aa.displayName="SlotClone";var tb=({children:e})=>l.jsx(l.Fragment,{children:e});function nb(e){return p.isValidElement(e)&&e.type===tb}function rb(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function ob(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function ib(e){const t=e+"CollectionProvider",[n,r]=Qx(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=f=>{const{scope:v,children:h}=f,y=_.useRef(null),b=_.useRef(new Map).current;return l.jsx(o,{scope:v,itemMap:b,collectionRef:y,children:h})};a.displayName=t;const s=e+"CollectionSlot",u=_.forwardRef((f,v)=>{const{scope:h,children:y}=f,b=i(s,h),w=lt(v,b.collectionRef);return l.jsx(Ta,{ref:w,children:y})});u.displayName=s;const c=e+"CollectionItemSlot",d="data-radix-collection-item",g=_.forwardRef((f,v)=>{const{scope:h,children:y,...b}=f,w=_.useRef(null),C=lt(v,w),E=i(c,h);return _.useEffect(()=>(E.itemMap.set(w,{ref:w,...b}),()=>void E.itemMap.delete(w))),l.jsx(Ta,{[d]:"",ref:C,children:y})});g.displayName=c;function m(f){const v=i(e+"CollectionConsumer",f);return _.useCallback(()=>{const y=v.collectionRef.current;if(!y)return[];const b=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(v.itemMap.values()).sort((E,x)=>b.indexOf(E.ref.current)-b.indexOf(x.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:a,Slot:u,ItemSlot:g},m,r]}var ab="VisuallyHidden",Pa=p.forwardRef((e,t)=>l.jsx(Re.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Pa.displayName=ab;var Na="ToastProvider",[ka,sb,lb]=ib("Toast"),[Uu,o_]=Qt("Toast",[lb]),[cb,So]=Uu(Na),Wu=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,u]=p.useState(null),[c,d]=p.useState(0),g=p.useRef(!1),m=p.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Na}\`. Expected non-empty \`string\`.`),l.jsx(ka.Provider,{scope:t,children:l.jsx(cb,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:c,viewport:s,onViewportChange:u,onToastAdd:p.useCallback(()=>d(f=>f+1),[]),onToastRemove:p.useCallback(()=>d(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:g,isClosePausedRef:m,children:a})})};Wu.displayName=Na;var qu="ToastViewport",ub=["F8"],Oa="toast.viewportPause",Fa="toast.viewportResume",Gu=p.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=ub,label:o="Notifications ({hotkey})",...i}=e,a=So(qu,n),s=sb(n),u=p.useRef(null),c=p.useRef(null),d=p.useRef(null),g=p.useRef(null),m=lt(t,g,a.onViewportChange),f=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),v=a.toastCount>0;p.useEffect(()=>{const y=b=>{var C;r.length!==0&&r.every(E=>b[E]||b.code===E)&&((C=g.current)==null||C.focus())};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[r]),p.useEffect(()=>{const y=u.current,b=g.current;if(v&&y&&b){const w=()=>{if(!a.isClosePausedRef.current){const O=new CustomEvent(Oa);b.dispatchEvent(O),a.isClosePausedRef.current=!0}},C=()=>{if(a.isClosePausedRef.current){const O=new CustomEvent(Fa);b.dispatchEvent(O),a.isClosePausedRef.current=!1}},E=O=>{!y.contains(O.relatedTarget)&&C()},x=()=>{y.contains(document.activeElement)||C()};return y.addEventListener("focusin",w),y.addEventListener("focusout",E),y.addEventListener("pointermove",w),y.addEventListener("pointerleave",x),window.addEventListener("blur",w),window.addEventListener("focus",C),()=>{y.removeEventListener("focusin",w),y.removeEventListener("focusout",E),y.removeEventListener("pointermove",w),y.removeEventListener("pointerleave",x),window.removeEventListener("blur",w),window.removeEventListener("focus",C)}}},[v,a.isClosePausedRef]);const h=p.useCallback(({tabbingDirection:y})=>{const w=s().map(C=>{const E=C.ref.current,x=[E,...Sb(E)];return y==="forwards"?x:x.reverse()});return(y==="forwards"?w.reverse():w).flat()},[s]);return p.useEffect(()=>{const y=g.current;if(y){const b=w=>{var x,O,I;const C=w.altKey||w.ctrlKey||w.metaKey;if(w.key==="Tab"&&!C){const $=document.activeElement,H=w.shiftKey;if(w.target===y&&H){(x=c.current)==null||x.focus();return}const U=h({tabbingDirection:H?"backwards":"forwards"}),Z=U.findIndex(N=>N===$);Ma(U.slice(Z+1))?w.preventDefault():H?(O=c.current)==null||O.focus():(I=d.current)==null||I.focus()}};return y.addEventListener("keydown",b),()=>y.removeEventListener("keydown",b)}},[s,h]),l.jsxs(Qv,{ref:u,role:"region","aria-label":o.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:v?void 0:"none"},children:[v&&l.jsx(Da,{ref:c,onFocusFromOutsideViewport:()=>{const y=h({tabbingDirection:"forwards"});Ma(y)}}),l.jsx(ka.Slot,{scope:n,children:l.jsx(Re.ol,{tabIndex:-1,...i,ref:m})}),v&&l.jsx(Da,{ref:d,onFocusFromOutsideViewport:()=>{const y=h({tabbingDirection:"backwards"});Ma(y)}})]})});Gu.displayName=qu;var Ku="ToastFocusProxy",Da=p.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=So(Ku,n);return l.jsx(Pa,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:a=>{var c;const s=a.relatedTarget;!((c=i.viewport)!=null&&c.contains(s))&&r()}})});Da.displayName=Ku;var Eo="Toast",db="toast.swipeStart",fb="toast.swipeMove",pb="toast.swipeCancel",gb="toast.swipeEnd",Yu=p.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s=!0,u]=Pn({prop:r,defaultProp:o,onChange:i});return l.jsx(Nn,{present:n||s,children:l.jsx(vb,{open:s,...a,ref:t,onClose:()=>u(!1),onPause:qe(e.onPause),onResume:qe(e.onResume),onSwipeStart:Le(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Le(e.onSwipeMove,c=>{const{x:d,y:g}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${g}px`)}),onSwipeCancel:Le(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Le(e.onSwipeEnd,c=>{const{x:d,y:g}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${g}px`),u(!1)})})})});Yu.displayName=Eo;var[mb,hb]=Uu(Eo,{onClose(){}}),vb=p.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:a,onEscapeKeyDown:s,onPause:u,onResume:c,onSwipeStart:d,onSwipeMove:g,onSwipeCancel:m,onSwipeEnd:f,...v}=e,h=So(Eo,n),[y,b]=p.useState(null),w=lt(t,N=>b(N)),C=p.useRef(null),E=p.useRef(null),x=o||h.duration,O=p.useRef(0),I=p.useRef(x),$=p.useRef(0),{onToastAdd:H,onToastRemove:D}=h,G=qe(()=>{var M;(y==null?void 0:y.contains(document.activeElement))&&((M=h.viewport)==null||M.focus()),a()}),U=p.useCallback(N=>{!N||N===1/0||(window.clearTimeout($.current),O.current=new Date().getTime(),$.current=window.setTimeout(G,N))},[G]);p.useEffect(()=>{const N=h.viewport;if(N){const M=()=>{U(I.current),c==null||c()},F=()=>{const q=new Date().getTime()-O.current;I.current=I.current-q,window.clearTimeout($.current),u==null||u()};return N.addEventListener(Oa,F),N.addEventListener(Fa,M),()=>{N.removeEventListener(Oa,F),N.removeEventListener(Fa,M)}}},[h.viewport,x,u,c,U]),p.useEffect(()=>{i&&!h.isClosePausedRef.current&&U(x)},[i,x,h.isClosePausedRef,U]),p.useEffect(()=>(H(),()=>D()),[H,D]);const Z=p.useMemo(()=>y?nd(y):null,[y]);return h.viewport?l.jsxs(l.Fragment,{children:[Z&&l.jsx(yb,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:Z}),l.jsx(mb,{scope:n,onClose:G,children:Fr.createPortal(l.jsx(ka.ItemSlot,{scope:n,children:l.jsx(Zv,{asChild:!0,onEscapeKeyDown:Le(s,()=>{h.isFocusedToastEscapeKeyDownRef.current||G(),h.isFocusedToastEscapeKeyDownRef.current=!1}),children:l.jsx(Re.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":h.swipeDirection,...v,ref:w,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Le(e.onKeyDown,N=>{N.key==="Escape"&&(s==null||s(N.nativeEvent),N.nativeEvent.defaultPrevented||(h.isFocusedToastEscapeKeyDownRef.current=!0,G()))}),onPointerDown:Le(e.onPointerDown,N=>{N.button===0&&(C.current={x:N.clientX,y:N.clientY})}),onPointerMove:Le(e.onPointerMove,N=>{if(!C.current)return;const M=N.clientX-C.current.x,F=N.clientY-C.current.y,q=!!E.current,k=["left","right"].includes(h.swipeDirection),j=["left","up"].includes(h.swipeDirection)?Math.min:Math.max,T=k?j(0,M):0,B=k?0:j(0,F),Q=N.pointerType==="touch"?10:2,re={x:T,y:B},ee={originalEvent:N,delta:re};q?(E.current=re,_o(fb,g,ee,{discrete:!1})):rd(re,h.swipeDirection,Q)?(E.current=re,_o(db,d,ee,{discrete:!1}),N.target.setPointerCapture(N.pointerId)):(Math.abs(M)>Q||Math.abs(F)>Q)&&(C.current=null)}),onPointerUp:Le(e.onPointerUp,N=>{const M=E.current,F=N.target;if(F.hasPointerCapture(N.pointerId)&&F.releasePointerCapture(N.pointerId),E.current=null,C.current=null,M){const q=N.currentTarget,k={originalEvent:N,delta:M};rd(M,h.swipeDirection,h.swipeThreshold)?_o(gb,f,k,{discrete:!0}):_o(pb,m,k,{discrete:!0}),q.addEventListener("click",j=>j.preventDefault(),{once:!0})}})})})}),h.viewport)})]}):null}),yb=e=>{const{__scopeToast:t,children:n,...r}=e,o=So(Eo,t),[i,a]=p.useState(!1),[s,u]=p.useState(!1);return wb(()=>a(!0)),p.useEffect(()=>{const c=window.setTimeout(()=>u(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:l.jsx(ra,{asChild:!0,children:l.jsx(Pa,{...r,children:i&&l.jsxs(l.Fragment,{children:[o.label," ",n]})})})},xb="ToastTitle",Xu=p.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return l.jsx(Re.div,{...r,ref:t})});Xu.displayName=xb;var bb="ToastDescription",Ju=p.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return l.jsx(Re.div,{...r,ref:t})});Ju.displayName=bb;var Zu="ToastAction",Qu=p.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?l.jsx(td,{altText:n,asChild:!0,children:l.jsx(Ia,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Zu}\`. Expected non-empty \`string\`.`),null)});Qu.displayName=Zu;var ed="ToastClose",Ia=p.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=hb(ed,n);return l.jsx(td,{asChild:!0,children:l.jsx(Re.button,{type:"button",...r,ref:t,onClick:Le(e.onClick,o.onClose)})})});Ia.displayName=ed;var td=p.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return l.jsx(Re.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function nd(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),Cb(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const a=r.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...nd(r))}}),t}function _o(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?dc(o,i):o.dispatchEvent(i)}var rd=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n};function wb(e=()=>{}){const t=qe(e);rt(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function Cb(e){return e.nodeType===e.ELEMENT_NODE}function Sb(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Ma(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var Eb=Wu,od=Gu,id=Yu,ad=Xu,sd=Ju,ld=Qu,cd=Ia;const _b=Eb,ud=p.forwardRef(({className:e,...t},n)=>l.jsx(od,{ref:n,className:me("s3-explr-ui-toast-viewport fixed top-0 flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px] z-[10000]",e),...t}));ud.displayName=od.displayName;const Tb=Yi("s3-explr-ui-toast group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"s3-explr-ui-toast-default border bg-background text-foreground",destructive:"s3-explr-ui-toast-destructive destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),dd=p.forwardRef(({className:e,variant:t,...n},r)=>l.jsx(id,{ref:r,className:me(Tb({variant:t}),e),...n}));dd.displayName=id.displayName;const Ab=p.forwardRef(({className:e,...t},n)=>l.jsx(ld,{ref:n,className:me("s3-explr-ui-toast-action inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));Ab.displayName=ld.displayName;const fd=p.forwardRef(({className:e,...t},n)=>l.jsx(cd,{ref:n,className:me("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity duration-200 ease-in-out hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600 font-bold",e),"toast-close":"",...t,children:l.jsx(Vi,{className:"s3-explr-ui-toast-close-icon h-4 w-4"})}));fd.displayName=cd.displayName;const pd=p.forwardRef(({className:e,...t},n)=>l.jsx(ad,{ref:n,className:me("s3-explr-ui-toast-title text-sm font-semibold [&+div]:text-xs",e),...t}));pd.displayName=ad.displayName;const gd=p.forwardRef(({className:e,...t},n)=>l.jsx(sd,{ref:n,className:me("text-sm opacity-90 font-bold",e),...t}));gd.displayName=sd.displayName;const Pb=1,Nb=1e6;let $a=0;function kb(){return $a=($a+1)%Number.MAX_SAFE_INTEGER,$a.toString()}const La=new Map,md=e=>{if(La.has(e))return;const t=setTimeout(()=>{La.delete(e),dr({type:"REMOVE_TOAST",toastId:e})},Nb);La.set(e,t)},Ob=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Pb)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?md(n):e.toasts.forEach(r=>{md(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},To=[];let Ao={toasts:[]};function dr(e){Ao=Ob(Ao,e),To.forEach(t=>{t(Ao)})}function Fb({...e}){const t=kb(),n=o=>dr({type:"UPDATE_TOAST",toast:{...o,id:t}}),r=()=>dr({type:"DISMISS_TOAST",toastId:t});return dr({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||r()}}}),{id:t,dismiss:r,update:n}}function Po(){const[e,t]=p.useState(Ao);return p.useEffect(()=>(To.push(t),()=>{const n=To.indexOf(t);n>-1&&To.splice(n,1)}),[e]),{...e,toast:Fb,dismiss:n=>dr({type:"DISMISS_TOAST",toastId:n})}}function hd(){const{toasts:e}=Po();return l.jsxs(_b,{children:[e.map(function({id:t,title:n,description:r,action:o,...i}){return l.jsxs(dd,{...i,className:`s3-explr-ui-toast ${i.className||""}`,children:[l.jsxs("div",{className:"s3-explr-ui-toast-content grid gap-1",children:[n&&l.jsx(pd,{className:"s3-explr-ui-toast-title",children:n}),r&&l.jsx(gd,{className:"s3-explr-ui-toast-description",children:r})]}),o&&l.jsx("div",{className:"s3-explr-ui-toast-action",children:o}),l.jsx(fd,{className:"s3-explr-ui-toast-close"})]},t)}),l.jsx(ud,{className:"s3-explr-ui-toast-viewport"})]})}function zt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function vd(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Db(...e){return t=>{let n=!1;const r=e.map(o=>{const i=vd(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():vd(e[o],null)}}}}function fr(...e){return p.useCallback(Db(...e),e)}var Ib=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],pr=Ib.reduce((e,t)=>{const n=p.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?_n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Mb(e,t){e&&Fr.flushSync(()=>e.dispatchEvent(t))}var $b="DismissableLayer",Ra="dismissableLayer.update",Lb="dismissableLayer.pointerDownOutside",Rb="dismissableLayer.focusOutside",yd,xd=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),bd=p.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...u}=e,c=p.useContext(xd),[d,g]=p.useState(null),m=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=p.useState({}),v=fr(t,I=>g(I)),h=Array.from(c.layers),[y]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),b=h.indexOf(y),w=d?h.indexOf(d):-1,C=c.layersWithOutsidePointerEventsDisabled.size>0,E=w>=b,x=zb(I=>{const $=I.target,H=[...c.branches].some(D=>D.contains($));!E||H||(o==null||o(I),a==null||a(I),I.defaultPrevented||s==null||s())},m),O=Bb(I=>{const $=I.target;[...c.branches].some(D=>D.contains($))||(i==null||i(I),a==null||a(I),I.defaultPrevented||s==null||s())},m);return vc(I=>{w===c.layers.size-1&&(r==null||r(I),!I.defaultPrevented&&s&&(I.preventDefault(),s()))},m),p.useEffect(()=>{if(d)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(yd=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),wd(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=yd)}},[d,m,n,c]),p.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),wd())},[d,c]),p.useEffect(()=>{const I=()=>f({});return document.addEventListener(Ra,I),()=>document.removeEventListener(Ra,I)},[]),l.jsx(pr.div,{...u,ref:v,style:{pointerEvents:C?E?"auto":"none":void 0,...e.style},onFocusCapture:zt(e.onFocusCapture,O.onFocusCapture),onBlurCapture:zt(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:zt(e.onPointerDownCapture,x.onPointerDownCapture)})});bd.displayName=$b;var Vb="DismissableLayerBranch",jb=p.forwardRef((e,t)=>{const n=p.useContext(xd),r=p.useRef(null),o=fr(t,r);return p.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),l.jsx(pr.div,{...e,ref:o})});jb.displayName=Vb;function zb(e,t=globalThis==null?void 0:globalThis.document){const n=qe(e),r=p.useRef(!1),o=p.useRef(()=>{});return p.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let u=function(){Cd(Lb,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Bb(e,t=globalThis==null?void 0:globalThis.document){const n=qe(e),r=p.useRef(!1);return p.useEffect(()=>{const o=i=>{i.target&&!r.current&&Cd(Rb,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function wd(){const e=new CustomEvent(Ra);document.dispatchEvent(e)}function Cd(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Mb(o,i):o.dispatchEvent(i)}const Hb=["top","right","bottom","left"],rn=Math.min,ot=Math.max,No=Math.round,ko=Math.floor,Pt=e=>({x:e,y:e}),Ub={left:"right",right:"left",bottom:"top",top:"bottom"},Wb={start:"end",end:"start"};function Va(e,t,n){return ot(e,rn(t,n))}function Bt(e,t){return typeof e=="function"?e(t):e}function Ht(e){return e.split("-")[0]}function Rn(e){return e.split("-")[1]}function ja(e){return e==="x"?"y":"x"}function za(e){return e==="y"?"height":"width"}function on(e){return["top","bottom"].includes(Ht(e))?"y":"x"}function Ba(e){return ja(on(e))}function qb(e,t,n){n===void 0&&(n=!1);const r=Rn(e),o=Ba(e),i=za(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Oo(a)),[a,Oo(a)]}function Gb(e){const t=Oo(e);return[Ha(e),t,Ha(t)]}function Ha(e){return e.replace(/start|end/g,t=>Wb[t])}function Kb(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}function Yb(e,t,n,r){const o=Rn(e);let i=Kb(Ht(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Ha)))),i}function Oo(e){return e.replace(/left|right|bottom|top/g,t=>Ub[t])}function Xb(e){return{top:0,right:0,bottom:0,left:0,...e}}function Sd(e){return typeof e!="number"?Xb(e):{top:e,right:e,bottom:e,left:e}}function Fo(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Ed(e,t,n){let{reference:r,floating:o}=e;const i=on(t),a=Ba(t),s=za(a),u=Ht(t),c=i==="y",d=r.x+r.width/2-o.width/2,g=r.y+r.height/2-o.height/2,m=r[s]/2-o[s]/2;let f;switch(u){case"top":f={x:d,y:r.y-o.height};break;case"bottom":f={x:d,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:g};break;case"left":f={x:r.x-o.width,y:g};break;default:f={x:r.x,y:r.y}}switch(Rn(t)){case"start":f[a]-=m*(n&&c?-1:1);break;case"end":f[a]+=m*(n&&c?-1:1);break}return f}const Jb=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:g}=Ed(c,r,u),m=r,f={},v=0;for(let h=0;h<s.length;h++){const{name:y,fn:b}=s[h],{x:w,y:C,data:E,reset:x}=await b({x:d,y:g,initialPlacement:r,placement:m,strategy:o,middlewareData:f,rects:c,platform:a,elements:{reference:e,floating:t}});d=w??d,g=C??g,f={...f,[y]:{...f[y],...E}},x&&v<=50&&(v++,typeof x=="object"&&(x.placement&&(m=x.placement),x.rects&&(c=x.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):x.rects),{x:d,y:g}=Ed(c,m,u)),h=-1)}return{x:d,y:g,placement:m,strategy:o,middlewareData:f}};async function gr(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:g="floating",altBoundary:m=!1,padding:f=0}=Bt(t,e),v=Sd(f),y=s[m?g==="floating"?"reference":"floating":g],b=Fo(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(y)))==null||n?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:u})),w=g==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),E=await(i.isElement==null?void 0:i.isElement(C))?await(i.getScale==null?void 0:i.getScale(C))||{x:1,y:1}:{x:1,y:1},x=Fo(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:C,strategy:u}):w);return{top:(b.top-x.top+v.top)/E.y,bottom:(x.bottom-b.bottom+v.bottom)/E.y,left:(b.left-x.left+v.left)/E.x,right:(x.right-b.right+v.right)/E.x}}const Zb=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:u}=t,{element:c,padding:d=0}=Bt(e,t)||{};if(c==null)return{};const g=Sd(d),m={x:n,y:r},f=Ba(o),v=za(f),h=await a.getDimensions(c),y=f==="y",b=y?"top":"left",w=y?"bottom":"right",C=y?"clientHeight":"clientWidth",E=i.reference[v]+i.reference[f]-m[f]-i.floating[v],x=m[f]-i.reference[f],O=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let I=O?O[C]:0;(!I||!await(a.isElement==null?void 0:a.isElement(O)))&&(I=s.floating[C]||i.floating[v]);const $=E/2-x/2,H=I/2-h[v]/2-1,D=rn(g[b],H),G=rn(g[w],H),U=D,Z=I-h[v]-G,N=I/2-h[v]/2+$,M=Va(U,N,Z),F=!u.arrow&&Rn(o)!=null&&N!==M&&i.reference[v]/2-(N<U?D:G)-h[v]/2<0,q=F?N<U?N-U:N-Z:0;return{[f]:m[f]+q,data:{[f]:M,centerOffset:N-M-q,...F&&{alignmentOffset:q}},reset:F}}}),Qb=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:u,elements:c}=t,{mainAxis:d=!0,crossAxis:g=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:h=!0,...y}=Bt(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const b=Ht(o),w=on(s),C=Ht(s)===s,E=await(u.isRTL==null?void 0:u.isRTL(c.floating)),x=m||(C||!h?[Oo(s)]:Gb(s)),O=v!=="none";!m&&O&&x.push(...Yb(s,h,v,E));const I=[s,...x],$=await gr(t,y),H=[];let D=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&H.push($[b]),g){const N=qb(o,a,E);H.push($[N[0]],$[N[1]])}if(D=[...D,{placement:o,overflows:H}],!H.every(N=>N<=0)){var G,U;const N=(((G=i.flip)==null?void 0:G.index)||0)+1,M=I[N];if(M)return{data:{index:N,overflows:D},reset:{placement:M}};let F=(U=D.filter(q=>q.overflows[0]<=0).sort((q,k)=>q.overflows[1]-k.overflows[1])[0])==null?void 0:U.placement;if(!F)switch(f){case"bestFit":{var Z;const q=(Z=D.filter(k=>{if(O){const j=on(k.placement);return j===w||j==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(j=>j>0).reduce((j,T)=>j+T,0)]).sort((k,j)=>k[1]-j[1])[0])==null?void 0:Z[0];q&&(F=q);break}case"initialPlacement":F=s;break}if(o!==F)return{reset:{placement:F}}}return{}}}};function _d(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Td(e){return Hb.some(t=>e[t]>=0)}const ew=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Bt(e,t);switch(r){case"referenceHidden":{const i=await gr(t,{...o,elementContext:"reference"}),a=_d(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Td(a)}}}case"escaped":{const i=await gr(t,{...o,altBoundary:!0}),a=_d(i,n.floating);return{data:{escapedOffsets:a,escaped:Td(a)}}}default:return{}}}}};async function tw(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=Ht(n),s=Rn(n),u=on(n)==="y",c=["left","top"].includes(a)?-1:1,d=i&&u?-1:1,g=Bt(t,e);let{mainAxis:m,crossAxis:f,alignmentAxis:v}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return s&&typeof v=="number"&&(f=s==="end"?v*-1:v),u?{x:f*d,y:m*c}:{x:m*c,y:f*d}}const nw=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,u=await tw(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:a}}}}},rw=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:y=>{let{x:b,y:w}=y;return{x:b,y:w}}},...u}=Bt(e,t),c={x:n,y:r},d=await gr(t,u),g=on(Ht(o)),m=ja(g);let f=c[m],v=c[g];if(i){const y=m==="y"?"top":"left",b=m==="y"?"bottom":"right",w=f+d[y],C=f-d[b];f=Va(w,f,C)}if(a){const y=g==="y"?"top":"left",b=g==="y"?"bottom":"right",w=v+d[y],C=v-d[b];v=Va(w,v,C)}const h=s.fn({...t,[m]:f,[g]:v});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[m]:i,[g]:a}}}}}},ow=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:u=!0,crossAxis:c=!0}=Bt(e,t),d={x:n,y:r},g=on(o),m=ja(g);let f=d[m],v=d[g];const h=Bt(s,t),y=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(u){const C=m==="y"?"height":"width",E=i.reference[m]-i.floating[C]+y.mainAxis,x=i.reference[m]+i.reference[C]-y.mainAxis;f<E?f=E:f>x&&(f=x)}if(c){var b,w;const C=m==="y"?"width":"height",E=["top","left"].includes(Ht(o)),x=i.reference[g]-i.floating[C]+(E&&((b=a.offset)==null?void 0:b[g])||0)+(E?0:y.crossAxis),O=i.reference[g]+i.reference[C]+(E?0:((w=a.offset)==null?void 0:w[g])||0)-(E?y.crossAxis:0);v<x?v=x:v>O&&(v=O)}return{[m]:f,[g]:v}}}},iw=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:u=()=>{},...c}=Bt(e,t),d=await gr(t,c),g=Ht(o),m=Rn(o),f=on(o)==="y",{width:v,height:h}=i.floating;let y,b;g==="top"||g==="bottom"?(y=g,b=m===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(b=g,y=m==="end"?"top":"bottom");const w=h-d.top-d.bottom,C=v-d.left-d.right,E=rn(h-d[y],w),x=rn(v-d[b],C),O=!t.middlewareData.shift;let I=E,$=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&($=C),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(I=w),O&&!m){const D=ot(d.left,0),G=ot(d.right,0),U=ot(d.top,0),Z=ot(d.bottom,0);f?$=v-2*(D!==0||G!==0?D+G:ot(d.left,d.right)):I=h-2*(U!==0||Z!==0?U+Z:ot(d.top,d.bottom))}await u({...t,availableWidth:$,availableHeight:I});const H=await a.getDimensions(s.floating);return v!==H.width||h!==H.height?{reset:{rects:!0}}:{}}}};function Do(){return typeof window<"u"}function Vn(e){return Ad(e)?(e.nodeName||"").toLowerCase():"#document"}function it(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Nt(e){var t;return(t=(Ad(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ad(e){return Do()?e instanceof Node||e instanceof it(e).Node:!1}function yt(e){return Do()?e instanceof Element||e instanceof it(e).Element:!1}function kt(e){return Do()?e instanceof HTMLElement||e instanceof it(e).HTMLElement:!1}function Pd(e){return!Do()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof it(e).ShadowRoot}function mr(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=xt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function aw(e){return["table","td","th"].includes(Vn(e))}function Io(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Ua(e){const t=Wa(),n=yt(e)?xt(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function sw(e){let t=an(e);for(;kt(t)&&!jn(t);){if(Ua(t))return t;if(Io(t))return null;t=an(t)}return null}function Wa(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function jn(e){return["html","body","#document"].includes(Vn(e))}function xt(e){return it(e).getComputedStyle(e)}function Mo(e){return yt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function an(e){if(Vn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Pd(e)&&e.host||Nt(e);return Pd(t)?t.host:t}function Nd(e){const t=an(e);return jn(t)?e.ownerDocument?e.ownerDocument.body:e.body:kt(t)&&mr(t)?t:Nd(t)}function hr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Nd(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=it(o);if(i){const s=qa(a);return t.concat(a,a.visualViewport||[],mr(o)?o:[],s&&n?hr(s):[])}return t.concat(o,hr(o,[],n))}function qa(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function kd(e){const t=xt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=kt(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=No(n)!==i||No(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Ga(e){return yt(e)?e:e.contextElement}function zn(e){const t=Ga(e);if(!kt(t))return Pt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=kd(t);let a=(i?No(n.width):n.width)/r,s=(i?No(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const lw=Pt(0);function Od(e){const t=it(e);return!Wa()||!t.visualViewport?lw:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function cw(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==it(e)?!1:t}function vn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Ga(e);let a=Pt(1);t&&(r?yt(r)&&(a=zn(r)):a=zn(e));const s=cw(i,n,r)?Od(i):Pt(0);let u=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,d=o.width/a.x,g=o.height/a.y;if(i){const m=it(i),f=r&&yt(r)?it(r):r;let v=m,h=qa(v);for(;h&&r&&f!==v;){const y=zn(h),b=h.getBoundingClientRect(),w=xt(h),C=b.left+(h.clientLeft+parseFloat(w.paddingLeft))*y.x,E=b.top+(h.clientTop+parseFloat(w.paddingTop))*y.y;u*=y.x,c*=y.y,d*=y.x,g*=y.y,u+=C,c+=E,v=it(h),h=qa(v)}}return Fo({width:d,height:g,x:u,y:c})}function Ka(e,t){const n=Mo(e).scrollLeft;return t?t.left+n:vn(Nt(e)).left+n}function Fd(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:Ka(e,r)),i=r.top+t.scrollTop;return{x:o,y:i}}function uw(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Nt(r),s=t?Io(t.floating):!1;if(r===a||s&&i)return n;let u={scrollLeft:0,scrollTop:0},c=Pt(1);const d=Pt(0),g=kt(r);if((g||!g&&!i)&&((Vn(r)!=="body"||mr(a))&&(u=Mo(r)),kt(r))){const f=vn(r);c=zn(r),d.x=f.x+r.clientLeft,d.y=f.y+r.clientTop}const m=a&&!g&&!i?Fd(a,u,!0):Pt(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+d.x+m.x,y:n.y*c.y-u.scrollTop*c.y+d.y+m.y}}function dw(e){return Array.from(e.getClientRects())}function fw(e){const t=Nt(e),n=Mo(e),r=e.ownerDocument.body,o=ot(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=ot(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Ka(e);const s=-n.scrollTop;return xt(r).direction==="rtl"&&(a+=ot(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function pw(e,t){const n=it(e),r=Nt(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,u=0;if(o){i=o.width,a=o.height;const c=Wa();(!c||c&&t==="fixed")&&(s=o.offsetLeft,u=o.offsetTop)}return{width:i,height:a,x:s,y:u}}function gw(e,t){const n=vn(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=kt(e)?zn(e):Pt(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,u=o*i.x,c=r*i.y;return{width:a,height:s,x:u,y:c}}function Dd(e,t,n){let r;if(t==="viewport")r=pw(e,n);else if(t==="document")r=fw(Nt(e));else if(yt(t))r=gw(t,n);else{const o=Od(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Fo(r)}function Id(e,t){const n=an(e);return n===t||!yt(n)||jn(n)?!1:xt(n).position==="fixed"||Id(n,t)}function mw(e,t){const n=t.get(e);if(n)return n;let r=hr(e,[],!1).filter(s=>yt(s)&&Vn(s)!=="body"),o=null;const i=xt(e).position==="fixed";let a=i?an(e):e;for(;yt(a)&&!jn(a);){const s=xt(a),u=Ua(a);!u&&s.position==="fixed"&&(o=null),(i?!u&&!o:!u&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||mr(a)&&!u&&Id(e,a))?r=r.filter(d=>d!==a):o=s,a=an(a)}return t.set(e,r),r}function hw(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Io(t)?[]:mw(t,this._c):[].concat(n),r],s=a[0],u=a.reduce((c,d)=>{const g=Dd(t,d,o);return c.top=ot(g.top,c.top),c.right=rn(g.right,c.right),c.bottom=rn(g.bottom,c.bottom),c.left=ot(g.left,c.left),c},Dd(t,s,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function vw(e){const{width:t,height:n}=kd(e);return{width:t,height:n}}function yw(e,t,n){const r=kt(t),o=Nt(t),i=n==="fixed",a=vn(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const u=Pt(0);if(r||!r&&!i)if((Vn(t)!=="body"||mr(o))&&(s=Mo(t)),r){const m=vn(t,!0,i,t);u.x=m.x+t.clientLeft,u.y=m.y+t.clientTop}else o&&(u.x=Ka(o));const c=o&&!r&&!i?Fd(o,s):Pt(0),d=a.left+s.scrollLeft-u.x-c.x,g=a.top+s.scrollTop-u.y-c.y;return{x:d,y:g,width:a.width,height:a.height}}function Ya(e){return xt(e).position==="static"}function Md(e,t){if(!kt(e)||xt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Nt(e)===n&&(n=n.ownerDocument.body),n}function $d(e,t){const n=it(e);if(Io(e))return n;if(!kt(e)){let o=an(e);for(;o&&!jn(o);){if(yt(o)&&!Ya(o))return o;o=an(o)}return n}let r=Md(e,t);for(;r&&aw(r)&&Ya(r);)r=Md(r,t);return r&&jn(r)&&Ya(r)&&!Ua(r)?n:r||sw(e)||n}const xw=async function(e){const t=this.getOffsetParent||$d,n=this.getDimensions,r=await n(e.floating);return{reference:yw(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function bw(e){return xt(e).direction==="rtl"}const ww={convertOffsetParentRelativeRectToViewportRelativeRect:uw,getDocumentElement:Nt,getClippingRect:hw,getOffsetParent:$d,getElementRects:xw,getClientRects:dw,getDimensions:vw,getScale:zn,isElement:yt,isRTL:bw};function Cw(e,t){let n=null,r;const o=Nt(e);function i(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,u){s===void 0&&(s=!1),u===void 0&&(u=1),i();const{left:c,top:d,width:g,height:m}=e.getBoundingClientRect();if(s||t(),!g||!m)return;const f=ko(d),v=ko(o.clientWidth-(c+g)),h=ko(o.clientHeight-(d+m)),y=ko(c),w={rootMargin:-f+"px "+-v+"px "+-h+"px "+-y+"px",threshold:ot(0,rn(1,u))||1};let C=!0;function E(x){const O=x[0].intersectionRatio;if(O!==u){if(!C)return a();O?a(!1,O):r=setTimeout(()=>{a(!1,1e-7)},1e3)}C=!1}try{n=new IntersectionObserver(E,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,w)}n.observe(e)}return a(!0),i}function Sw(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,c=Ga(e),d=o||i?[...c?hr(c):[],...hr(t)]:[];d.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),i&&b.addEventListener("resize",n)});const g=c&&s?Cw(c,n):null;let m=-1,f=null;a&&(f=new ResizeObserver(b=>{let[w]=b;w&&w.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var C;(C=f)==null||C.observe(t)})),n()}),c&&!u&&f.observe(c),f.observe(t));let v,h=u?vn(e):null;u&&y();function y(){const b=vn(e);h&&(b.x!==h.x||b.y!==h.y||b.width!==h.width||b.height!==h.height)&&n(),h=b,v=requestAnimationFrame(y)}return n(),()=>{var b;d.forEach(w=>{o&&w.removeEventListener("scroll",n),i&&w.removeEventListener("resize",n)}),g==null||g(),(b=f)==null||b.disconnect(),f=null,u&&cancelAnimationFrame(v)}}const Ew=nw,_w=rw,Tw=Qb,Aw=iw,Pw=ew,Ld=Zb,Nw=ow,kw=(e,t,n)=>{const r=new Map,o={platform:ww,...n},i={...o.platform,_c:r};return Jb(e,t,{...o,platform:i})};var $o=typeof document<"u"?_.useLayoutEffect:_.useEffect;function Lo(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Lo(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Lo(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Rd(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Vd(e,t){const n=Rd(e);return Math.round(t*n)/n}function Xa(e){const t=p.useRef(e);return $o(()=>{t.current=e}),t}function Ow(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:u,open:c}=e,[d,g]=p.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,f]=p.useState(r);Lo(m,r)||f(r);const[v,h]=p.useState(null),[y,b]=p.useState(null),w=p.useCallback(k=>{k!==O.current&&(O.current=k,h(k))},[]),C=p.useCallback(k=>{k!==I.current&&(I.current=k,b(k))},[]),E=i||v,x=a||y,O=p.useRef(null),I=p.useRef(null),$=p.useRef(d),H=u!=null,D=Xa(u),G=Xa(o),U=Xa(c),Z=p.useCallback(()=>{if(!O.current||!I.current)return;const k={placement:t,strategy:n,middleware:m};G.current&&(k.platform=G.current),kw(O.current,I.current,k).then(j=>{const T={...j,isPositioned:U.current!==!1};N.current&&!Lo($.current,T)&&($.current=T,Fr.flushSync(()=>{g(T)}))})},[m,t,n,G,U]);$o(()=>{c===!1&&$.current.isPositioned&&($.current.isPositioned=!1,g(k=>({...k,isPositioned:!1})))},[c]);const N=p.useRef(!1);$o(()=>(N.current=!0,()=>{N.current=!1}),[]),$o(()=>{if(E&&(O.current=E),x&&(I.current=x),E&&x){if(D.current)return D.current(E,x,Z);Z()}},[E,x,Z,D,H]);const M=p.useMemo(()=>({reference:O,floating:I,setReference:w,setFloating:C}),[w,C]),F=p.useMemo(()=>({reference:E,floating:x}),[E,x]),q=p.useMemo(()=>{const k={position:n,left:0,top:0};if(!F.floating)return k;const j=Vd(F.floating,d.x),T=Vd(F.floating,d.y);return s?{...k,transform:"translate("+j+"px, "+T+"px)",...Rd(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:j,top:T}},[n,s,F.floating,d.x,d.y]);return p.useMemo(()=>({...d,update:Z,refs:M,elements:F,floatingStyles:q}),[d,Z,M,F,q])}const Fw=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Ld({element:r.current,padding:o}).fn(n):{}:r?Ld({element:r,padding:o}).fn(n):{}}}},Dw=(e,t)=>({...Ew(e),options:[e,t]}),Iw=(e,t)=>({..._w(e),options:[e,t]}),Mw=(e,t)=>({...Nw(e),options:[e,t]}),$w=(e,t)=>({...Tw(e),options:[e,t]}),Lw=(e,t)=>({...Aw(e),options:[e,t]}),Rw=(e,t)=>({...Pw(e),options:[e,t]}),Vw=(e,t)=>({...Fw(e),options:[e,t]});var jw=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],zw=jw.reduce((e,t)=>{const n=p.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?_n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Bw="Arrow",jd=p.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return l.jsx(zw.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});jd.displayName=Bw;var Hw=jd;function zd(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Uw(...e){return t=>{let n=!1;const r=e.map(o=>{const i=zd(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():zd(e[o],null)}}}}function Bd(...e){return p.useCallback(Uw(...e),e)}var Ww=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Hd=Ww.reduce((e,t)=>{const n=p.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?_n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Ja="Popper",[Ud,Wd]=Qt(Ja),[qw,qd]=Ud(Ja),Gd=e=>{const{__scopePopper:t,children:n}=e,[r,o]=p.useState(null);return l.jsx(qw,{scope:t,anchor:r,onAnchorChange:o,children:n})};Gd.displayName=Ja;var Kd="PopperAnchor",Yd=p.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=qd(Kd,n),a=p.useRef(null),s=Bd(t,a);return p.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:l.jsx(Hd.div,{...o,ref:s})});Yd.displayName=Kd;var Za="PopperContent",[Gw,Kw]=Ud(Za),Xd=p.forwardRef((e,t)=>{var ae,de,ue,le,Ce,K;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:a=0,arrowPadding:s=0,avoidCollisions:u=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:g="partial",hideWhenDetached:m=!1,updatePositionStrategy:f="optimized",onPlaced:v,...h}=e,y=qd(Za,n),[b,w]=p.useState(null),C=Bd(t,_e=>w(_e)),[E,x]=p.useState(null),O=cc(E),I=(O==null?void 0:O.width)??0,$=(O==null?void 0:O.height)??0,H=r+(i!=="center"?"-"+i:""),D=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},G=Array.isArray(c)?c:[c],U=G.length>0,Z={padding:D,boundary:G.filter(Xw),altBoundary:U},{refs:N,floatingStyles:M,placement:F,isPositioned:q,middlewareData:k}=Ow({strategy:"fixed",placement:H,whileElementsMounted:(..._e)=>Sw(..._e,{animationFrame:f==="always"}),elements:{reference:y.anchor},middleware:[Dw({mainAxis:o+$,alignmentAxis:a}),u&&Iw({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?Mw():void 0,...Z}),u&&$w({...Z}),Lw({...Z,apply:({elements:_e,rects:Ue,availableWidth:We,availableHeight:Mt})=>{const{width:at,height:S}=Ue.reference,A=_e.floating.style;A.setProperty("--radix-popper-available-width",`${We}px`),A.setProperty("--radix-popper-available-height",`${Mt}px`),A.setProperty("--radix-popper-anchor-width",`${at}px`),A.setProperty("--radix-popper-anchor-height",`${S}px`)}}),E&&Vw({element:E,padding:s}),Jw({arrowWidth:I,arrowHeight:$}),m&&Rw({strategy:"referenceHidden",...Z})]}),[j,T]=Qd(F),B=qe(v);rt(()=>{q&&(B==null||B())},[q,B]);const Q=(ae=k.arrow)==null?void 0:ae.x,re=(de=k.arrow)==null?void 0:de.y,ee=((ue=k.arrow)==null?void 0:ue.centerOffset)!==0,[ce,oe]=p.useState();return rt(()=>{b&&oe(window.getComputedStyle(b).zIndex)},[b]),l.jsx("div",{ref:N.setFloating,"data-radix-popper-content-wrapper":"",style:{...M,transform:q?M.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ce,"--radix-popper-transform-origin":[(le=k.transformOrigin)==null?void 0:le.x,(Ce=k.transformOrigin)==null?void 0:Ce.y].join(" "),...((K=k.hide)==null?void 0:K.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(Gw,{scope:n,placedSide:j,onArrowChange:x,arrowX:Q,arrowY:re,shouldHideArrow:ee,children:l.jsx(Hd.div,{"data-side":j,"data-align":T,...h,ref:C,style:{...h.style,animation:q?void 0:"none"}})})})});Xd.displayName=Za;var Jd="PopperArrow",Yw={top:"bottom",right:"left",bottom:"top",left:"right"},Zd=p.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=Kw(Jd,r),a=Yw[i.placedSide];return l.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:l.jsx(Hw,{...o,ref:n,style:{...o.style,display:"block"}})})});Zd.displayName=Jd;function Xw(e){return e!==null}var Jw=e=>({name:"transformOrigin",options:e,fn(t){var y,b,w;const{placement:n,rects:r,middlewareData:o}=t,a=((y=o.arrow)==null?void 0:y.centerOffset)!==0,s=a?0:e.arrowWidth,u=a?0:e.arrowHeight,[c,d]=Qd(n),g={start:"0%",center:"50%",end:"100%"}[d],m=(((b=o.arrow)==null?void 0:b.x)??0)+s/2,f=(((w=o.arrow)==null?void 0:w.y)??0)+u/2;let v="",h="";return c==="bottom"?(v=a?g:`${m}px`,h=`${-u}px`):c==="top"?(v=a?g:`${m}px`,h=`${r.floating.height+u}px`):c==="right"?(v=`${-u}px`,h=a?g:`${f}px`):c==="left"&&(v=`${r.floating.width+u}px`,h=a?g:`${f}px`),{data:{x:v,y:h}}}});function Qd(e){const[t,n="center"]=e.split("-");return[t,n]}var Zw=Gd,Qw=Yd,e0=Xd,t0=Zd,n0="Portal",ef=p.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,i]=p.useState(!1);rt(()=>i(!0),[]);const a=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?ri.createPortal(l.jsx(pr.div,{...r,ref:t}),a):null});ef.displayName=n0;function r0(e,t){return p.useReducer((n,r)=>t[n][r]??n,e)}var Qa=e=>{const{present:t,children:n}=e,r=o0(t),o=typeof n=="function"?n({present:r.isPresent}):p.Children.only(n),i=fr(r.ref,i0(o));return typeof n=="function"||r.isPresent?p.cloneElement(o,{ref:i}):null};Qa.displayName="Presence";function o0(e){const[t,n]=p.useState(),r=p.useRef({}),o=p.useRef(e),i=p.useRef("none"),a=e?"mounted":"unmounted",[s,u]=r0(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const c=Ro(r.current);i.current=s==="mounted"?c:"none"},[s]),rt(()=>{const c=r.current,d=o.current;if(d!==e){const m=i.current,f=Ro(c);e?u("MOUNT"):f==="none"||(c==null?void 0:c.display)==="none"?u("UNMOUNT"):u(d&&m!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),rt(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,g=f=>{const h=Ro(r.current).includes(f.animationName);if(f.target===t&&h&&(u("ANIMATION_END"),!o.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},m=f=>{f.target===t&&(i.current=Ro(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",g),t.addEventListener("animationend",g),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",g),t.removeEventListener("animationend",g)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:p.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function Ro(e){return(e==null?void 0:e.animationName)||"none"}function i0(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var a0="VisuallyHidden",tf=p.forwardRef((e,t)=>l.jsx(pr.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));tf.displayName=a0;var s0=tf,[Vo,i_]=Qt("Tooltip",[Wd]),jo=Wd(),nf="TooltipProvider",l0=700,es="tooltip.open",[c0,ts]=Vo(nf),rf=e=>{const{__scopeTooltip:t,delayDuration:n=l0,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,[a,s]=p.useState(!0),u=p.useRef(!1),c=p.useRef(0);return p.useEffect(()=>{const d=c.current;return()=>window.clearTimeout(d)},[]),l.jsx(c0,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:p.useCallback(()=>{window.clearTimeout(c.current),s(!1)},[]),onClose:p.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>s(!0),r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:p.useCallback(d=>{u.current=d},[]),disableHoverableContent:o,children:i})};rf.displayName=nf;var zo="Tooltip",[u0,vr]=Vo(zo),of=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:a,delayDuration:s}=e,u=ts(zo,e.__scopeTooltip),c=jo(t),[d,g]=p.useState(null),m=kn(),f=p.useRef(0),v=a??u.disableHoverableContent,h=s??u.delayDuration,y=p.useRef(!1),[b=!1,w]=Pn({prop:r,defaultProp:o,onChange:I=>{I?(u.onOpen(),document.dispatchEvent(new CustomEvent(es))):u.onClose(),i==null||i(I)}}),C=p.useMemo(()=>b?y.current?"delayed-open":"instant-open":"closed",[b]),E=p.useCallback(()=>{window.clearTimeout(f.current),f.current=0,y.current=!1,w(!0)},[w]),x=p.useCallback(()=>{window.clearTimeout(f.current),f.current=0,w(!1)},[w]),O=p.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>{y.current=!0,w(!0),f.current=0},h)},[h,w]);return p.useEffect(()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)},[]),l.jsx(Zw,{...c,children:l.jsx(u0,{scope:t,contentId:m,open:b,stateAttribute:C,trigger:d,onTriggerChange:g,onTriggerEnter:p.useCallback(()=>{u.isOpenDelayed?O():E()},[u.isOpenDelayed,O,E]),onTriggerLeave:p.useCallback(()=>{v?x():(window.clearTimeout(f.current),f.current=0)},[x,v]),onOpen:E,onClose:x,disableHoverableContent:v,children:n})})};of.displayName=zo;var ns="TooltipTrigger",af=p.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=vr(ns,n),i=ts(ns,n),a=jo(n),s=p.useRef(null),u=fr(t,s,o.onTriggerChange),c=p.useRef(!1),d=p.useRef(!1),g=p.useCallback(()=>c.current=!1,[]);return p.useEffect(()=>()=>document.removeEventListener("pointerup",g),[g]),l.jsx(Qw,{asChild:!0,...a,children:l.jsx(pr.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:u,onPointerMove:zt(e.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:zt(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:zt(e.onPointerDown,()=>{c.current=!0,document.addEventListener("pointerup",g,{once:!0})}),onFocus:zt(e.onFocus,()=>{c.current||o.onOpen()}),onBlur:zt(e.onBlur,o.onClose),onClick:zt(e.onClick,o.onClose)})})});af.displayName=ns;var rs="TooltipPortal",[d0,f0]=Vo(rs,{forceMount:void 0}),sf=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,i=vr(rs,t);return l.jsx(d0,{scope:t,forceMount:n,children:l.jsx(Qa,{present:n||i.open,children:l.jsx(ef,{asChild:!0,container:o,children:r})})})};sf.displayName=rs;var Bn="TooltipContent",lf=p.forwardRef((e,t)=>{const n=f0(Bn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,a=vr(Bn,e.__scopeTooltip);return l.jsx(Qa,{present:r||a.open,children:a.disableHoverableContent?l.jsx(cf,{side:o,...i,ref:t}):l.jsx(p0,{side:o,...i,ref:t})})}),p0=p.forwardRef((e,t)=>{const n=vr(Bn,e.__scopeTooltip),r=ts(Bn,e.__scopeTooltip),o=p.useRef(null),i=fr(t,o),[a,s]=p.useState(null),{trigger:u,onClose:c}=n,d=o.current,{onPointerInTransitChange:g}=r,m=p.useCallback(()=>{s(null),g(!1)},[g]),f=p.useCallback((v,h)=>{const y=v.currentTarget,b={x:v.clientX,y:v.clientY},w=v0(b,y.getBoundingClientRect()),C=y0(b,w),E=x0(h.getBoundingClientRect()),x=w0([...C,...E]);s(x),g(!0)},[g]);return p.useEffect(()=>()=>m(),[m]),p.useEffect(()=>{if(u&&d){const v=y=>f(y,d),h=y=>f(y,u);return u.addEventListener("pointerleave",v),d.addEventListener("pointerleave",h),()=>{u.removeEventListener("pointerleave",v),d.removeEventListener("pointerleave",h)}}},[u,d,f,m]),p.useEffect(()=>{if(a){const v=h=>{const y=h.target,b={x:h.clientX,y:h.clientY},w=(u==null?void 0:u.contains(y))||(d==null?void 0:d.contains(y)),C=!b0(b,a);w?m():C&&(m(),c())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[u,d,a,c,m]),l.jsx(cf,{...e,ref:i})}),[g0,m0]=Vo(zo,{isInside:!1}),cf=p.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...s}=e,u=vr(Bn,n),c=jo(n),{onClose:d}=u;return p.useEffect(()=>(document.addEventListener(es,d),()=>document.removeEventListener(es,d)),[d]),p.useEffect(()=>{if(u.trigger){const g=m=>{const f=m.target;f!=null&&f.contains(u.trigger)&&d()};return window.addEventListener("scroll",g,{capture:!0}),()=>window.removeEventListener("scroll",g,{capture:!0})}},[u.trigger,d]),l.jsx(bd,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:g=>g.preventDefault(),onDismiss:d,children:l.jsxs(e0,{"data-state":u.stateAttribute,...c,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[l.jsx(Yl,{children:r}),l.jsx(g0,{scope:n,isInside:!0,children:l.jsx(s0,{id:u.contentId,role:"tooltip",children:o||r})})]})})});lf.displayName=Bn;var uf="TooltipArrow",h0=p.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=jo(n);return m0(uf,n).isInside?null:l.jsx(t0,{...o,...r,ref:t})});h0.displayName=uf;function v0(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function y0(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function x0(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function b0(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const s=t[i].x,u=t[i].y,c=t[a].x,d=t[a].y;u>r!=d>r&&n<(c-s)*(r-u)/(d-u)+s&&(o=!o)}return o}function w0(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),C0(t)}function C0(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const i=t[t.length-1],a=t[t.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],a=n[n.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var S0=rf,E0=of,_0=af,T0=sf,df=lf;const Hn=S0,Un=E0,Wn=_0,yn=p.forwardRef(({className:e,sideOffset:t=4,...n},r)=>l.jsx(T0,{children:l.jsx(df,{ref:r,sideOffset:t,className:me("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));yn.displayName=df.displayName;function A0({title:e,titleId:t,...n},r){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?p.createElement("title",{id:t},e):null,p.createElement("path",{fillRule:"evenodd",d:"M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const P0=p.forwardRef(A0);var N0=function(e){return function(t,n){var r=_.useRef(!1);e(function(){return function(){r.current=!1}},[]),e(function(){if(!r.current)r.current=!0;else return t()},n)}},ff=function(e){return typeof e=="function"},pf=process.env.NODE_ENV==="development"||process.env.NODE_ENV==="test";const k0=N0(_.useEffect);function gf(e){var t=_.useRef(e);return t.current=e,t}var O0=function(e){pf&&(ff(e)||console.error("useUnmount expected parameter is a function, got ".concat(typeof e)));var t=gf(e);_.useEffect(function(){return function(){t.current()}},[])};function F0(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var mf=F0,D0=typeof ir=="object"&&ir&&ir.Object===Object&&ir,I0=D0,M0=I0,$0=typeof self=="object"&&self&&self.Object===Object&&self,L0=M0||$0||Function("return this")(),hf=L0,R0=hf,V0=function(){return R0.Date.now()},j0=V0,z0=/\s/;function B0(e){for(var t=e.length;t--&&z0.test(e.charAt(t)););return t}var H0=B0,U0=H0,W0=/^\s+/;function q0(e){return e&&e.slice(0,U0(e)+1).replace(W0,"")}var G0=q0,K0=hf,Y0=K0.Symbol,vf=Y0,yf=vf,xf=Object.prototype,X0=xf.hasOwnProperty,J0=xf.toString,yr=yf?yf.toStringTag:void 0;function Z0(e){var t=X0.call(e,yr),n=e[yr];try{e[yr]=void 0;var r=!0}catch{}var o=J0.call(e);return r&&(t?e[yr]=n:delete e[yr]),o}var Q0=Z0,eC=Object.prototype,tC=eC.toString;function nC(e){return tC.call(e)}var rC=nC,bf=vf,oC=Q0,iC=rC,aC="[object Null]",sC="[object Undefined]",wf=bf?bf.toStringTag:void 0;function lC(e){return e==null?e===void 0?sC:aC:wf&&wf in Object(e)?oC(e):iC(e)}var cC=lC;function uC(e){return e!=null&&typeof e=="object"}var dC=uC,fC=cC,pC=dC,gC="[object Symbol]";function mC(e){return typeof e=="symbol"||pC(e)&&fC(e)==gC}var hC=mC,vC=G0,Cf=mf,yC=hC,Sf=NaN,xC=/^[-+]0x[0-9a-f]+$/i,bC=/^0b[01]+$/i,wC=/^0o[0-7]+$/i,CC=parseInt;function SC(e){if(typeof e=="number")return e;if(yC(e))return Sf;if(Cf(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Cf(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=vC(e);var n=bC.test(e);return n||wC.test(e)?CC(e.slice(2),n?2:8):xC.test(e)?Sf:+e}var EC=SC,_C=mf,os=j0,Ef=EC,TC="Expected a function",AC=Math.max,PC=Math.min;function NC(e,t,n){var r,o,i,a,s,u,c=0,d=!1,g=!1,m=!0;if(typeof e!="function")throw new TypeError(TC);t=Ef(t)||0,_C(n)&&(d=!!n.leading,g="maxWait"in n,i=g?AC(Ef(n.maxWait)||0,t):i,m="trailing"in n?!!n.trailing:m);function f(O){var I=r,$=o;return r=o=void 0,c=O,a=e.apply($,I),a}function v(O){return c=O,s=setTimeout(b,t),d?f(O):a}function h(O){var I=O-u,$=O-c,H=t-I;return g?PC(H,i-$):H}function y(O){var I=O-u,$=O-c;return u===void 0||I>=t||I<0||g&&$>=i}function b(){var O=os();if(y(O))return w(O);s=setTimeout(b,h(O))}function w(O){return s=void 0,m&&r?f(O):(r=o=void 0,a)}function C(){s!==void 0&&clearTimeout(s),c=0,r=u=o=s=void 0}function E(){return s===void 0?a:w(os())}function x(){var O=os(),I=y(O);if(r=arguments,o=this,u=O,I){if(s===void 0)return v(u);if(g)return clearTimeout(s),s=setTimeout(b,t),f(u)}return s===void 0&&(s=setTimeout(b,t)),a}return x.cancel=C,x.flush=E,x}var kC=NC;const OC=Yr(kC);function FC(){var e=(typeof global>"u"?"undefined":typeof global)=="object"&&global&&global.Object===Object&&global,t=typeof self=="object"&&self&&self.Object===Object&&self;return e||t}FC()||(global.Date=Date);function DC(e,t){var n;pf&&(ff(e)||console.error("useDebounceFn expected parameter is a function, got ".concat(typeof e)));var r=gf(e),o=(n=t==null?void 0:t.wait)!==null&&n!==void 0?n:1e3,i=_.useMemo(function(){return OC(function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return r.current.apply(r,Fc([],Oc(a),!1))},o,t)},[]);return O0(function(){i.cancel()}),{run:i,cancel:i.cancel,flush:i.flush}}function IC(e,t,n){var r=Oc(_.useState({}),2),o=r[0],i=r[1],a=DC(function(){i({})},n).run;_.useEffect(function(){return a()},t),k0(e,[o])}const MC=_.forwardRef(({onChange:e},t)=>{const n=_.useRef(null),[r,o]=_.useState("");return _.useImperativeHandle(t,()=>({setValue:i=>{var a;o(i),(a=n.current)==null||a.focus()}})),IC(()=>{e==null||e(r)},[r],{wait:300}),l.jsxs(l.Fragment,{children:[l.jsx(nn,{ref:n,type:"text",placeholder:"Search files...",value:r,onChange:i=>o(i.target.value),className:"pr-8"}),r&&l.jsx("button",{onClick:()=>{var i;o(""),(i=n.current)==null||i.focus()},className:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-500 hover:text-gray-700",children:l.jsx(P0,{className:"h-5 w-5"})})]})});var is={exports:{}},Bo={exports:{}},Ae={};/** @license React v16.13.1
152
153
  * react-is.production.min.js
153
154
  *
154
155
  * Copyright (c) Facebook, Inc. and its affiliates.
155
156
  *
156
157
  * This source code is licensed under the MIT license found in the
157
158
  * LICENSE file in the root directory of this source tree.
158
- */var ff;function sS(){if(ff)return _e;ff=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,g=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function S(x){if(typeof x=="object"&&x!==null){var O=x.$$typeof;switch(O){case t:switch(x=x.type,x){case u:case c:case r:case i:case o:case g:return x;default:switch(x=x&&x.$$typeof,x){case s:case d:case v:case p:case a:return x;default:return O}}case n:return O}}}function E(x){return S(x)===c}return _e.AsyncMode=u,_e.ConcurrentMode=c,_e.ContextConsumer=s,_e.ContextProvider=a,_e.Element=t,_e.ForwardRef=d,_e.Fragment=r,_e.Lazy=v,_e.Memo=p,_e.Portal=n,_e.Profiler=i,_e.StrictMode=o,_e.Suspense=g,_e.isAsyncMode=function(x){return E(x)||S(x)===u},_e.isConcurrentMode=E,_e.isContextConsumer=function(x){return S(x)===s},_e.isContextProvider=function(x){return S(x)===a},_e.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===t},_e.isForwardRef=function(x){return S(x)===d},_e.isFragment=function(x){return S(x)===r},_e.isLazy=function(x){return S(x)===v},_e.isMemo=function(x){return S(x)===p},_e.isPortal=function(x){return S(x)===n},_e.isProfiler=function(x){return S(x)===i},_e.isStrictMode=function(x){return S(x)===o},_e.isSuspense=function(x){return S(x)===g},_e.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===r||x===c||x===i||x===o||x===g||x===h||typeof x=="object"&&x!==null&&(x.$$typeof===v||x.$$typeof===p||x.$$typeof===a||x.$$typeof===s||x.$$typeof===d||x.$$typeof===y||x.$$typeof===w||x.$$typeof===b||x.$$typeof===m)},_e.typeOf=S,_e}var Ae={};/** @license React v16.13.1
159
+ */var _f;function $C(){if(_f)return Ae;_f=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,g=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function C(x){if(typeof x=="object"&&x!==null){var O=x.$$typeof;switch(O){case t:switch(x=x.type,x){case u:case c:case r:case i:case o:case g:return x;default:switch(x=x&&x.$$typeof,x){case s:case d:case v:case f:case a:return x;default:return O}}case n:return O}}}function E(x){return C(x)===c}return Ae.AsyncMode=u,Ae.ConcurrentMode=c,Ae.ContextConsumer=s,Ae.ContextProvider=a,Ae.Element=t,Ae.ForwardRef=d,Ae.Fragment=r,Ae.Lazy=v,Ae.Memo=f,Ae.Portal=n,Ae.Profiler=i,Ae.StrictMode=o,Ae.Suspense=g,Ae.isAsyncMode=function(x){return E(x)||C(x)===u},Ae.isConcurrentMode=E,Ae.isContextConsumer=function(x){return C(x)===s},Ae.isContextProvider=function(x){return C(x)===a},Ae.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===t},Ae.isForwardRef=function(x){return C(x)===d},Ae.isFragment=function(x){return C(x)===r},Ae.isLazy=function(x){return C(x)===v},Ae.isMemo=function(x){return C(x)===f},Ae.isPortal=function(x){return C(x)===n},Ae.isProfiler=function(x){return C(x)===i},Ae.isStrictMode=function(x){return C(x)===o},Ae.isSuspense=function(x){return C(x)===g},Ae.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===r||x===c||x===i||x===o||x===g||x===m||typeof x=="object"&&x!==null&&(x.$$typeof===v||x.$$typeof===f||x.$$typeof===a||x.$$typeof===s||x.$$typeof===d||x.$$typeof===y||x.$$typeof===b||x.$$typeof===w||x.$$typeof===h)},Ae.typeOf=C,Ae}var Pe={};/** @license React v16.13.1
159
160
  * react-is.development.js
160
161
  *
161
162
  * Copyright (c) Facebook, Inc. and its affiliates.
162
163
  *
163
164
  * This source code is licensed under the MIT license found in the
164
165
  * LICENSE file in the root directory of this source tree.
165
- */var pf;function lS(){return pf||(pf=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,g=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function S(K){return typeof K=="string"||typeof K=="function"||K===r||K===c||K===i||K===o||K===g||K===h||typeof K=="object"&&K!==null&&(K.$$typeof===v||K.$$typeof===p||K.$$typeof===a||K.$$typeof===s||K.$$typeof===d||K.$$typeof===y||K.$$typeof===w||K.$$typeof===b||K.$$typeof===m)}function E(K){if(typeof K=="object"&&K!==null){var Ee=K.$$typeof;switch(Ee){case t:var He=K.type;switch(He){case u:case c:case r:case i:case o:case g:return He;default:var Ue=He&&He.$$typeof;switch(Ue){case s:case d:case v:case p:case a:return Ue;default:return Ee}}case n:return Ee}}}var x=u,O=c,M=s,I=a,H=t,k=d,G=r,U=v,Z=p,P=n,$=i,F=o,W=g,N=!1;function V(K){return N||(N=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),_(K)||E(K)===u}function _(K){return E(K)===c}function B(K){return E(K)===s}function Q(K){return E(K)===a}function ne(K){return typeof K=="object"&&K!==null&&K.$$typeof===t}function ee(K){return E(K)===d}function ce(K){return E(K)===r}function oe(K){return E(K)===v}function ie(K){return E(K)===p}function de(K){return E(K)===n}function ue(K){return E(K)===i}function le(K){return E(K)===o}function Se(K){return E(K)===g}Ae.AsyncMode=x,Ae.ConcurrentMode=O,Ae.ContextConsumer=M,Ae.ContextProvider=I,Ae.Element=H,Ae.ForwardRef=k,Ae.Fragment=G,Ae.Lazy=U,Ae.Memo=Z,Ae.Portal=P,Ae.Profiler=$,Ae.StrictMode=F,Ae.Suspense=W,Ae.isAsyncMode=V,Ae.isConcurrentMode=_,Ae.isContextConsumer=B,Ae.isContextProvider=Q,Ae.isElement=ne,Ae.isForwardRef=ee,Ae.isFragment=ce,Ae.isLazy=oe,Ae.isMemo=ie,Ae.isPortal=de,Ae.isProfiler=ue,Ae.isStrictMode=le,Ae.isSuspense=Se,Ae.isValidElementType=S,Ae.typeOf=E}()),Ae}var gf;function mf(){return gf||(gf=1,process.env.NODE_ENV==="production"?Io.exports=sS():Io.exports=lS()),Io.exports}/*
166
+ */var Tf;function LC(){return Tf||(Tf=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,g=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function C(K){return typeof K=="string"||typeof K=="function"||K===r||K===c||K===i||K===o||K===g||K===m||typeof K=="object"&&K!==null&&(K.$$typeof===v||K.$$typeof===f||K.$$typeof===a||K.$$typeof===s||K.$$typeof===d||K.$$typeof===y||K.$$typeof===b||K.$$typeof===w||K.$$typeof===h)}function E(K){if(typeof K=="object"&&K!==null){var _e=K.$$typeof;switch(_e){case t:var Ue=K.type;switch(Ue){case u:case c:case r:case i:case o:case g:return Ue;default:var We=Ue&&Ue.$$typeof;switch(We){case s:case d:case v:case f:case a:return We;default:return _e}}case n:return _e}}}var x=u,O=c,I=s,$=a,H=t,D=d,G=r,U=v,Z=f,N=n,M=i,F=o,q=g,k=!1;function j(K){return k||(k=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),T(K)||E(K)===u}function T(K){return E(K)===c}function B(K){return E(K)===s}function Q(K){return E(K)===a}function re(K){return typeof K=="object"&&K!==null&&K.$$typeof===t}function ee(K){return E(K)===d}function ce(K){return E(K)===r}function oe(K){return E(K)===v}function ae(K){return E(K)===f}function de(K){return E(K)===n}function ue(K){return E(K)===i}function le(K){return E(K)===o}function Ce(K){return E(K)===g}Pe.AsyncMode=x,Pe.ConcurrentMode=O,Pe.ContextConsumer=I,Pe.ContextProvider=$,Pe.Element=H,Pe.ForwardRef=D,Pe.Fragment=G,Pe.Lazy=U,Pe.Memo=Z,Pe.Portal=N,Pe.Profiler=M,Pe.StrictMode=F,Pe.Suspense=q,Pe.isAsyncMode=j,Pe.isConcurrentMode=T,Pe.isContextConsumer=B,Pe.isContextProvider=Q,Pe.isElement=re,Pe.isForwardRef=ee,Pe.isFragment=ce,Pe.isLazy=oe,Pe.isMemo=ae,Pe.isPortal=de,Pe.isProfiler=ue,Pe.isStrictMode=le,Pe.isSuspense=Ce,Pe.isValidElementType=C,Pe.typeOf=E}()),Pe}var Af;function Pf(){return Af||(Af=1,process.env.NODE_ENV==="production"?Bo.exports=$C():Bo.exports=LC()),Bo.exports}/*
166
167
  object-assign
167
168
  (c) Sindre Sorhus
168
169
  @license MIT
169
- */var Za,hf;function cS(){if(hf)return Za;hf=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var a={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var u=Object.getOwnPropertyNames(a).map(function(d){return a[d]});if(u.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(d){c[d]=d}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Za=o()?Object.assign:function(i,a){for(var s,u=r(i),c,d=1;d<arguments.length;d++){s=Object(arguments[d]);for(var g in s)t.call(s,g)&&(u[g]=s[g]);if(e){c=e(s);for(var h=0;h<c.length;h++)n.call(s,c[h])&&(u[c[h]]=s[c[h]])}}return u},Za}var Qa,vf;function es(){if(vf)return Qa;vf=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Qa=e,Qa}var ts,yf;function xf(){return yf||(yf=1,ts=Function.call.bind(Object.prototype.hasOwnProperty)),ts}var ns,wf;function uS(){if(wf)return ns;wf=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=es(),n={},r=xf();e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(i,a,s,u,c){if(process.env.NODE_ENV!=="production"){for(var d in i)if(r(i,d)){var g;try{if(typeof i[d]!="function"){var h=Error((u||"React class")+": "+s+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}g=i[d](a,d,u,s,null,t)}catch(v){g=v}if(g&&!(g instanceof Error)&&e((u||"React class")+": type specification of "+s+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof g+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),g instanceof Error&&!(g.message in n)){n[g.message]=!0;var p=c?c():"";e("Failed "+s+" type: "+g.message+(p??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},ns=o,ns}var rs,bf;function dS(){if(bf)return rs;bf=1;var e=mf(),t=cS(),n=es(),r=xf(),o=uS(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var u="Warning: "+s;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function a(){return null}return rs=function(s,u){var c=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function g(_){var B=_&&(c&&_[c]||_[d]);if(typeof B=="function")return B}var h="<<anonymous>>",p={array:w("array"),bigint:w("bigint"),bool:w("boolean"),func:w("function"),number:w("number"),object:w("object"),string:w("string"),symbol:w("symbol"),any:b(),arrayOf:S,element:E(),elementType:x(),instanceOf:O,node:k(),objectOf:I,oneOf:M,oneOfType:H,shape:U,exact:Z};function v(_,B){return _===B?_!==0||1/_===1/B:_!==_&&B!==B}function m(_,B){this.message=_,this.data=B&&typeof B=="object"?B:{},this.stack=""}m.prototype=Error.prototype;function y(_){if(process.env.NODE_ENV!=="production")var B={},Q=0;function ne(ce,oe,ie,de,ue,le,Se){if(de=de||h,le=le||ie,Se!==n){if(u){var K=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw K.name="Invariant Violation",K}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Ee=de+":"+ie;!B[Ee]&&Q<3&&(i("You are manually calling a React.PropTypes validation function for the `"+le+"` prop on `"+de+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),B[Ee]=!0,Q++)}}return oe[ie]==null?ce?oe[ie]===null?new m("The "+ue+" `"+le+"` is marked as required "+("in `"+de+"`, but its value is `null`.")):new m("The "+ue+" `"+le+"` is marked as required in "+("`"+de+"`, but its value is `undefined`.")):null:_(oe,ie,de,ue,le)}var ee=ne.bind(null,!1);return ee.isRequired=ne.bind(null,!0),ee}function w(_){function B(Q,ne,ee,ce,oe,ie){var de=Q[ne],ue=F(de);if(ue!==_){var le=W(de);return new m("Invalid "+ce+" `"+oe+"` of type "+("`"+le+"` supplied to `"+ee+"`, expected ")+("`"+_+"`."),{expectedType:_})}return null}return y(B)}function b(){return y(a)}function S(_){function B(Q,ne,ee,ce,oe){if(typeof _!="function")return new m("Property `"+oe+"` of component `"+ee+"` has invalid PropType notation inside arrayOf.");var ie=Q[ne];if(!Array.isArray(ie)){var de=F(ie);return new m("Invalid "+ce+" `"+oe+"` of type "+("`"+de+"` supplied to `"+ee+"`, expected an array."))}for(var ue=0;ue<ie.length;ue++){var le=_(ie,ue,ee,ce,oe+"["+ue+"]",n);if(le instanceof Error)return le}return null}return y(B)}function E(){function _(B,Q,ne,ee,ce){var oe=B[Q];if(!s(oe)){var ie=F(oe);return new m("Invalid "+ee+" `"+ce+"` of type "+("`"+ie+"` supplied to `"+ne+"`, expected a single ReactElement."))}return null}return y(_)}function x(){function _(B,Q,ne,ee,ce){var oe=B[Q];if(!e.isValidElementType(oe)){var ie=F(oe);return new m("Invalid "+ee+" `"+ce+"` of type "+("`"+ie+"` supplied to `"+ne+"`, expected a single ReactElement type."))}return null}return y(_)}function O(_){function B(Q,ne,ee,ce,oe){if(!(Q[ne]instanceof _)){var ie=_.name||h,de=V(Q[ne]);return new m("Invalid "+ce+" `"+oe+"` of type "+("`"+de+"` supplied to `"+ee+"`, expected ")+("instance of `"+ie+"`."))}return null}return y(B)}function M(_){if(!Array.isArray(_))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function B(Q,ne,ee,ce,oe){for(var ie=Q[ne],de=0;de<_.length;de++)if(v(ie,_[de]))return null;var ue=JSON.stringify(_,function(Se,K){var Ee=W(K);return Ee==="symbol"?String(K):K});return new m("Invalid "+ce+" `"+oe+"` of value `"+String(ie)+"` "+("supplied to `"+ee+"`, expected one of "+ue+"."))}return y(B)}function I(_){function B(Q,ne,ee,ce,oe){if(typeof _!="function")return new m("Property `"+oe+"` of component `"+ee+"` has invalid PropType notation inside objectOf.");var ie=Q[ne],de=F(ie);if(de!=="object")return new m("Invalid "+ce+" `"+oe+"` of type "+("`"+de+"` supplied to `"+ee+"`, expected an object."));for(var ue in ie)if(r(ie,ue)){var le=_(ie,ue,ee,ce,oe+"."+ue,n);if(le instanceof Error)return le}return null}return y(B)}function H(_){if(!Array.isArray(_))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var B=0;B<_.length;B++){var Q=_[B];if(typeof Q!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+N(Q)+" at index "+B+"."),a}function ne(ee,ce,oe,ie,de){for(var ue=[],le=0;le<_.length;le++){var Se=_[le],K=Se(ee,ce,oe,ie,de,n);if(K==null)return null;K.data&&r(K.data,"expectedType")&&ue.push(K.data.expectedType)}var Ee=ue.length>0?", expected one of type ["+ue.join(", ")+"]":"";return new m("Invalid "+ie+" `"+de+"` supplied to "+("`"+oe+"`"+Ee+"."))}return y(ne)}function k(){function _(B,Q,ne,ee,ce){return P(B[Q])?null:new m("Invalid "+ee+" `"+ce+"` supplied to "+("`"+ne+"`, expected a ReactNode."))}return y(_)}function G(_,B,Q,ne,ee){return new m((_||"React class")+": "+B+" type `"+Q+"."+ne+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ee+"`.")}function U(_){function B(Q,ne,ee,ce,oe){var ie=Q[ne],de=F(ie);if(de!=="object")return new m("Invalid "+ce+" `"+oe+"` of type `"+de+"` "+("supplied to `"+ee+"`, expected `object`."));for(var ue in _){var le=_[ue];if(typeof le!="function")return G(ee,ce,oe,ue,W(le));var Se=le(ie,ue,ee,ce,oe+"."+ue,n);if(Se)return Se}return null}return y(B)}function Z(_){function B(Q,ne,ee,ce,oe){var ie=Q[ne],de=F(ie);if(de!=="object")return new m("Invalid "+ce+" `"+oe+"` of type `"+de+"` "+("supplied to `"+ee+"`, expected `object`."));var ue=t({},Q[ne],_);for(var le in ue){var Se=_[le];if(r(_,le)&&typeof Se!="function")return G(ee,ce,oe,le,W(Se));if(!Se)return new m("Invalid "+ce+" `"+oe+"` key `"+le+"` supplied to `"+ee+"`.\nBad object: "+JSON.stringify(Q[ne],null," ")+`
170
- Valid keys: `+JSON.stringify(Object.keys(_),null," "));var K=Se(ie,le,ee,ce,oe+"."+le,n);if(K)return K}return null}return y(B)}function P(_){switch(typeof _){case"number":case"string":case"undefined":return!0;case"boolean":return!_;case"object":if(Array.isArray(_))return _.every(P);if(_===null||s(_))return!0;var B=g(_);if(B){var Q=B.call(_),ne;if(B!==_.entries){for(;!(ne=Q.next()).done;)if(!P(ne.value))return!1}else for(;!(ne=Q.next()).done;){var ee=ne.value;if(ee&&!P(ee[1]))return!1}}else return!1;return!0;default:return!1}}function $(_,B){return _==="symbol"?!0:B?B["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&B instanceof Symbol:!1}function F(_){var B=typeof _;return Array.isArray(_)?"array":_ instanceof RegExp?"object":$(B,_)?"symbol":B}function W(_){if(typeof _>"u"||_===null)return""+_;var B=F(_);if(B==="object"){if(_ instanceof Date)return"date";if(_ instanceof RegExp)return"regexp"}return B}function N(_){var B=W(_);switch(B){case"array":case"object":return"an "+B;case"boolean":case"date":case"regexp":return"a "+B;default:return B}}function V(_){return!_.constructor||!_.constructor.name?h:_.constructor.name}return p.checkPropTypes=o,p.resetWarningCache=o.resetWarningCache,p.PropTypes=p,p},rs}var os,Sf;function fS(){if(Sf)return os;Sf=1;var e=es();function t(){}function n(){}return n.resetWarningCache=t,os=function(){function r(a,s,u,c,d,g){if(g!==e){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},os}if(process.env.NODE_ENV!=="production"){var pS=mf(),gS=!0;Ja.exports=dS()(pS.isElement,gS)}else Ja.exports=fS()();var mS=Ja.exports;const Pe=Wr(mS),hS=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function Un(e,t,n){const r=vS(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&Cf(r,"path",i),Cf(r,"relativePath",i),r}function vS(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=hS.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function Cf(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const yS=[".DS_Store","Thumbs.db"];function xS(e){return dn(this,void 0,void 0,function*(){return Lo(e)&&wS(e.dataTransfer)?ES(e.dataTransfer,e.type):bS(e)?SS(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?CS(e):[]})}function wS(e){return Lo(e)}function bS(e){return Lo(e)&&Lo(e.target)}function Lo(e){return typeof e=="object"&&e!==null}function SS(e){return is(e.target.files).map(t=>Un(t))}function CS(e){return dn(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>Un(n))})}function ES(e,t){return dn(this,void 0,void 0,function*(){if(e.items){const n=is(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(TS));return Ef(Tf(r))}return Ef(is(e.files).map(n=>Un(n)))})}function Ef(e){return e.filter(t=>yS.indexOf(t.name)===-1)}function is(e){if(e===null)return[];const t=[];for(let n=0;n<e.length;n++){const r=e[n];t.push(r)}return t}function TS(e){if(typeof e.webkitGetAsEntry!="function")return _f(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?Af(t):_f(e,t)}function Tf(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?Tf(n):[n]],[])}function _f(e,t){return dn(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const i=yield e.getAsFileSystemHandle();if(i===null)throw new Error(`${e} is not a File`);if(i!==void 0){const a=yield i.getFile();return a.handle=i,Un(a)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return Un(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function _S(e){return dn(this,void 0,void 0,function*(){return e.isDirectory?Af(e):AS(e)})}function Af(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(a=>dn(this,void 0,void 0,function*(){if(a.length){const s=Promise.all(a.map(_S));o.push(s),i()}else try{const s=yield Promise.all(o);n(s)}catch(s){r(s)}}),a=>{r(a)})}i()})}function AS(e){return dn(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=Un(r,e.fullPath);t(o)},r=>{n(r)})})})}var as=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var r=e.name||"",o=(e.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some(function(a){var s=a.trim().toLowerCase();return s.charAt(0)==="."?r.toLowerCase().endsWith(s):s.endsWith("/*")?i===s.replace(/\/.*$/,""):o===s})}return!0};function Pf(e){return OS(e)||NS(e)||kf(e)||PS()}function PS(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
171
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NS(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function OS(e){if(Array.isArray(e))return ss(e)}function Nf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Of(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Nf(Object(n),!0).forEach(function(r){Ff(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nf(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ff(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mr(e,t){return DS(e)||kS(e,t)||kf(e,t)||FS()}function FS(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
172
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kf(e,t){if(e){if(typeof e=="string")return ss(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ss(e,t)}}function ss(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function kS(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,a,s;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(u){i=!0,s=u}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function DS(e){if(Array.isArray(e))return e}var MS=typeof as=="function"?as:as.default,$S="file-invalid-type",IS="file-too-large",LS="file-too-small",RS="too-many-files",VS=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=t.split(","),r=n.length>1?"one of ".concat(n.join(", ")):n[0];return{code:$S,message:"File type must be ".concat(r)}},Df=function(t){return{code:IS,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},Mf=function(t){return{code:LS,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},jS={code:RS,message:"Too many files"};function $f(e,t){var n=e.type==="application/x-moz-file"||MS(e,t);return[n,n?null:VS(t)]}function If(e,t,n){if(vn(e.size))if(vn(t)&&vn(n)){if(e.size>n)return[!1,Df(n)];if(e.size<t)return[!1,Mf(t)]}else{if(vn(t)&&e.size<t)return[!1,Mf(t)];if(vn(n)&&e.size>n)return[!1,Df(n)]}return[!0,null]}function vn(e){return e!=null}function zS(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,a=e.maxFiles,s=e.validator;return!i&&t.length>1||i&&a>=1&&t.length>a?!1:t.every(function(u){var c=$f(u,n),d=mr(c,1),g=d[0],h=If(u,r,o),p=mr(h,1),v=p[0],m=s?s(u):null;return g&&v&&!m})}function Ro(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Vo(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function Lf(e){e.preventDefault()}function BS(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function HS(e){return e.indexOf("Edge/")!==-1}function US(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return BS(e)||HS(e)}function Nt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return t.some(function(s){return!Ro(r)&&s&&s.apply(void 0,[r].concat(i)),Ro(r)})}}function WS(){return"showOpenFilePicker"in window}function qS(e){if(vn(e)){var t=Object.entries(e).filter(function(n){var r=mr(n,2),o=r[0],i=r[1],a=!0;return Rf(o)||(console.warn('Skipped "'.concat(o,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),a=!1),(!Array.isArray(i)||!i.every(Vf))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var o=mr(r,2),i=o[0],a=o[1];return Of(Of({},n),{},Ff({},i,a))},{});return[{description:"Files",accept:t}]}return e}function GS(e){if(vn(e))return Object.entries(e).reduce(function(t,n){var r=mr(n,2),o=r[0],i=r[1];return[].concat(Pf(t),[o],Pf(i))},[]).filter(function(t){return Rf(t)||Vf(t)}).join(",")}function KS(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function YS(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function Rf(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function Vf(e){return/^.*\.[\w]+$/.test(e)}var XS=["children"],JS=["open"],ZS=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],QS=["refKey","onChange","onClick"];function eC(e){return rC(e)||nC(e)||jf(e)||tC()}function tC(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
173
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nC(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function rC(e){if(Array.isArray(e))return cs(e)}function ls(e,t){return aC(e)||iC(e,t)||jf(e,t)||oC()}function oC(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
174
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jf(e,t){if(e){if(typeof e=="string")return cs(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cs(e,t)}}function cs(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function iC(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,a,s;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(u){i=!0,s=u}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function aC(e){if(Array.isArray(e))return e}function zf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Fe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zf(Object(n),!0).forEach(function(r){us(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zf(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function us(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jo(e,t){if(e==null)return{};var n=sC(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function sC(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var ds=T.forwardRef(function(e,t){var n=e.children,r=jo(e,XS),o=Hf(r),i=o.open,a=jo(o,JS);return T.useImperativeHandle(t,function(){return{open:i}},[i]),T.createElement(T.Fragment,null,n(Fe(Fe({},a),{},{open:i})))});ds.displayName="Dropzone";var Bf={disabled:!1,getFilesFromEvent:xS,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};ds.defaultProps=Bf,ds.propTypes={children:Pe.func,accept:Pe.objectOf(Pe.arrayOf(Pe.string)),multiple:Pe.bool,preventDropOnDocument:Pe.bool,noClick:Pe.bool,noKeyboard:Pe.bool,noDrag:Pe.bool,noDragEventsBubbling:Pe.bool,minSize:Pe.number,maxSize:Pe.number,maxFiles:Pe.number,disabled:Pe.bool,getFilesFromEvent:Pe.func,onFileDialogCancel:Pe.func,onFileDialogOpen:Pe.func,useFsAccessApi:Pe.bool,autoFocus:Pe.bool,onDragEnter:Pe.func,onDragLeave:Pe.func,onDragOver:Pe.func,onDrop:Pe.func,onDropAccepted:Pe.func,onDropRejected:Pe.func,onError:Pe.func,validator:Pe.func};var fs={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Hf(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Fe(Fe({},Bf),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,a=t.minSize,s=t.multiple,u=t.maxFiles,c=t.onDragEnter,d=t.onDragLeave,g=t.onDragOver,h=t.onDrop,p=t.onDropAccepted,v=t.onDropRejected,m=t.onFileDialogCancel,y=t.onFileDialogOpen,w=t.useFsAccessApi,b=t.autoFocus,S=t.preventDropOnDocument,E=t.noClick,x=t.noKeyboard,O=t.noDrag,M=t.noDragEventsBubbling,I=t.onError,H=t.validator,k=T.useMemo(function(){return GS(n)},[n]),G=T.useMemo(function(){return qS(n)},[n]),U=T.useMemo(function(){return typeof y=="function"?y:Uf},[y]),Z=T.useMemo(function(){return typeof m=="function"?m:Uf},[m]),P=T.useRef(null),$=T.useRef(null),F=T.useReducer(lC,fs),W=ls(F,2),N=W[0],V=W[1],_=N.isFocused,B=N.isFileDialogActive,Q=T.useRef(typeof window<"u"&&window.isSecureContext&&w&&WS()),ne=function(){!Q.current&&B&&setTimeout(function(){if($.current){var Y=$.current.files;Y.length||(V({type:"closeDialog"}),Z())}},300)};T.useEffect(function(){return window.addEventListener("focus",ne,!1),function(){window.removeEventListener("focus",ne,!1)}},[$,B,Z,Q]);var ee=T.useRef([]),ce=function(Y){P.current&&P.current.contains(Y.target)||(Y.preventDefault(),ee.current=[])};T.useEffect(function(){return S&&(document.addEventListener("dragover",Lf,!1),document.addEventListener("drop",ce,!1)),function(){S&&(document.removeEventListener("dragover",Lf),document.removeEventListener("drop",ce))}},[P,S]),T.useEffect(function(){return!r&&b&&P.current&&P.current.focus(),function(){}},[P,b,r]);var oe=T.useCallback(function(j){I?I(j):console.error(j)},[I]),ie=T.useCallback(function(j){j.preventDefault(),j.persist(),R(j),ee.current=[].concat(eC(ee.current),[j.target]),Vo(j)&&Promise.resolve(o(j)).then(function(Y){if(!(Ro(j)&&!M)){var ye=Y.length,be=ye>0&&zS({files:Y,accept:k,minSize:a,maxSize:i,multiple:s,maxFiles:u,validator:H}),Te=ye>0&&!be;V({isDragAccept:be,isDragReject:Te,isDragActive:!0,type:"setDraggedFiles"}),c&&c(j)}}).catch(function(Y){return oe(Y)})},[o,c,oe,M,k,a,i,s,u,H]),de=T.useCallback(function(j){j.preventDefault(),j.persist(),R(j);var Y=Vo(j);if(Y&&j.dataTransfer)try{j.dataTransfer.dropEffect="copy"}catch{}return Y&&g&&g(j),!1},[g,M]),ue=T.useCallback(function(j){j.preventDefault(),j.persist(),R(j);var Y=ee.current.filter(function(be){return P.current&&P.current.contains(be)}),ye=Y.indexOf(j.target);ye!==-1&&Y.splice(ye,1),ee.current=Y,!(Y.length>0)&&(V({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Vo(j)&&d&&d(j))},[P,d,M]),le=T.useCallback(function(j,Y){var ye=[],be=[];j.forEach(function(Te){var Mt=$f(Te,k),ct=ls(Mt,2),Ve=ct[0],Ht=ct[1],Ut=If(Te,a,i),Wt=ls(Ut,2),Ce=Wt[0],an=Wt[1],Gn=H?H(Te):null;if(Ve&&Ce&&!Gn)ye.push(Te);else{var ut=[Ht,an];Gn&&(ut=ut.concat(Gn)),be.push({file:Te,errors:ut.filter(function(xn){return xn})})}}),(!s&&ye.length>1||s&&u>=1&&ye.length>u)&&(ye.forEach(function(Te){be.push({file:Te,errors:[jS]})}),ye.splice(0)),V({acceptedFiles:ye,fileRejections:be,isDragReject:be.length>0,type:"setFiles"}),h&&h(ye,be,Y),be.length>0&&v&&v(be,Y),ye.length>0&&p&&p(ye,Y)},[V,s,k,a,i,u,h,p,v,H]),Se=T.useCallback(function(j){j.preventDefault(),j.persist(),R(j),ee.current=[],Vo(j)&&Promise.resolve(o(j)).then(function(Y){Ro(j)&&!M||le(Y,j)}).catch(function(Y){return oe(Y)}),V({type:"reset"})},[o,le,oe,M]),K=T.useCallback(function(){if(Q.current){V({type:"openDialog"}),U();var j={multiple:s,types:G};window.showOpenFilePicker(j).then(function(Y){return o(Y)}).then(function(Y){le(Y,null),V({type:"closeDialog"})}).catch(function(Y){KS(Y)?(Z(Y),V({type:"closeDialog"})):YS(Y)?(Q.current=!1,$.current?($.current.value=null,$.current.click()):oe(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):oe(Y)});return}$.current&&(V({type:"openDialog"}),U(),$.current.value=null,$.current.click())},[V,U,Z,w,le,oe,G,s]),Ee=T.useCallback(function(j){!P.current||!P.current.isEqualNode(j.target)||(j.key===" "||j.key==="Enter"||j.keyCode===32||j.keyCode===13)&&(j.preventDefault(),K())},[P,K]),He=T.useCallback(function(){V({type:"focus"})},[]),Ue=T.useCallback(function(){V({type:"blur"})},[]),Dt=T.useCallback(function(){E||(US()?setTimeout(K,0):K())},[E,K]),ot=function(Y){return r?null:Y},C=function(Y){return x?null:ot(Y)},A=function(Y){return O?null:ot(Y)},R=function(Y){M&&Y.stopPropagation()},te=T.useMemo(function(){return function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Y=j.refKey,ye=Y===void 0?"ref":Y,be=j.role,Te=j.onKeyDown,Mt=j.onFocus,ct=j.onBlur,Ve=j.onClick,Ht=j.onDragEnter,Ut=j.onDragOver,Wt=j.onDragLeave,Ce=j.onDrop,an=jo(j,ZS);return Fe(Fe(us({onKeyDown:C(Nt(Te,Ee)),onFocus:C(Nt(Mt,He)),onBlur:C(Nt(ct,Ue)),onClick:ot(Nt(Ve,Dt)),onDragEnter:A(Nt(Ht,ie)),onDragOver:A(Nt(Ut,de)),onDragLeave:A(Nt(Wt,ue)),onDrop:A(Nt(Ce,Se)),role:typeof be=="string"&&be!==""?be:"presentation"},ye,P),!r&&!x?{tabIndex:0}:{}),an)}},[P,Ee,He,Ue,Dt,ie,de,ue,Se,x,O,r]),J=T.useCallback(function(j){j.stopPropagation()},[]),X=T.useMemo(function(){return function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Y=j.refKey,ye=Y===void 0?"ref":Y,be=j.onChange,Te=j.onClick,Mt=jo(j,QS),ct=us({accept:k,multiple:s,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:ot(Nt(be,Se)),onClick:ot(Nt(Te,J)),tabIndex:-1},ye,$);return Fe(Fe({},ct),Mt)}},[$,n,s,Se,r]);return Fe(Fe({},N),{},{isFocused:_&&!r,getRootProps:te,getInputProps:X,rootRef:P,inputRef:$,open:ot(K)})}function lC(e,t){switch(t.type){case"focus":return Fe(Fe({},e),{},{isFocused:!0});case"blur":return Fe(Fe({},e),{},{isFocused:!1});case"openDialog":return Fe(Fe({},fs),{},{isFileDialogActive:!0});case"closeDialog":return Fe(Fe({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Fe(Fe({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Fe(Fe({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return Fe({},fs);default:return e}}function Uf(){}const cC=({onFilesSelected:e,children:t})=>{const[n,r]=T.useState(!1),{getRootProps:o,getInputProps:i}=Hf({noClick:!0,onDrop:a=>{if(a&&a.length>0)if(a[0].path.split("/").length>2){const u=a.map(c=>{const g=(c.path||c.relativePath||"").split("/").slice(1).join("/");return(!c.webkitRelativePath||c.webkitRelativePath==="")&&Object.defineProperty(c,"webkitRelativePath",{writable:!0,value:g,enumerable:!0,configurable:!0}),c});e(u,"folder")}else e(a,"files");r(!1)},onDragOver:a=>{a.preventDefault(),n||r(!0)},multiple:!0});return T.useEffect(()=>{const a=s=>{s.clientX===0&&s.clientY===0&&r(!1)};return document.addEventListener("dragleave",a),()=>{document.removeEventListener("dragleave",a)}},[]),l.jsxs("div",{...o(),className:"transition-opacity min-h-[600px]",children:[n?l.jsx("div",{className:"flex flex-col items-center justify-center p-4 border-2 border-dashed border-gray-300 rounded-lg bg-gray-50 h-screen"}):t,l.jsx("input",{...i()})]})},uC=({openDialogRename:e,setOpenDialogRename:t,apiBaseUrl:n,setFileToMove:r,fileToMove:o,refreshFiles:i,ignoreCache:a})=>{var b;const[s,u]=T.useState({}),[c,d]=T.useState(!1),[g,h]=T.useState(!1),[p,v]=T.useState(""),{toast:m}=So();T.useEffect(()=>{e&&y(p)},[p,e]);const y=async S=>{try{h(!0);const E=await he.get(`${n}/api/list-s3-folders?prefix=${S}`);u(E==null?void 0:E.data)}catch{m({title:"Error",description:"Unable to load S3 folder list",variant:"destructive"})}finally{h(!1)}},w=async()=>{d(!0);try{const S=o.key,E=S.endsWith("/")?S:`${S}/`,x=p.endsWith("/")?p:`${p}/`;if(E===x||S===p){m({title:"Lỗi",description:"Không thể di chuyển file đến cùng vị trí",variant:"destructive"}),d(!1);return}await he.post(`${n}/api/move`,{oldPath:S,newPath:p}),a.current=!0,await i(),m({title:"Đã di chuyển",description:`Đã di chuyển thành công "${o.name}" đến "${p}"`}),t(!1),r(null),v("")}catch(S){console.error("Error renaming item:",S),m({title:"Lỗi",description:"Không thể đổi tên",variant:"destructive"})}finally{d(!1)}};return l.jsx(Rt,{open:e,onOpenChange:S=>{S||(t(!1),r(null),v(""))},children:l.jsxs(St,{className:"max-h-[700px] pb-3 px-1 s3-explr-input-group max-w-5xl w-[90%] p-6 bg-white rounded-lg shadow-lg",children:[l.jsxs(Ct,{className:"mb-4 w-full h-full",children:[l.jsx("nav",{className:"mb-4",children:l.jsxs("ul",{className:"flex items-center space-x-2 text-sm text-gray-600",children:[l.jsx("li",{className:"cursor-pointer hover:text-blue-600 transition-colors",onClick:()=>v(""),children:"Root"}),p.split("/").map((S,E,x)=>l.jsx("li",{className:"cursor-pointer hover:text-blue-600 transition-colors",onClick:()=>v(S==="Root"?"":x.slice(0,E+1).join("/")+"/"),children:S},E))]})}),l.jsxs(Et,{className:"text-xl font-semibold text-gray-800",children:["Di chuyển"," ",l.jsxs("span",{className:"text-sm text-gray-500",children:["( file Hoặc folder sẽ được di chuyển đến thư mục"," ",p===""?"Root":p," )"]})]}),l.jsx(Dn,{className:"text-gray-600 w-full h-[50dvh] max-h-[500px] overflow-hidden overflow-y-auto",children:g?l.jsx("div",{className:"flex justify-center items-center py-4",children:l.jsx("div",{className:"loader ease-linear rounded-full border-4 border-t-4 border-gray-200 h-12 w-12"})}):l.jsx("ul",{className:"space-y-2",children:(b=Object.keys(s))==null?void 0:b.map(S=>l.jsx("li",{className:"cursor-pointer hover:bg-gray-100 p-2 rounded transition-colors",onClick:()=>v(S),children:S},S))})})]}),l.jsxs(pn,{className:"flex justify-end space-x-2",children:[l.jsx(we,{variant:"outline",onClick:()=>t(!1),className:"px-4 py-2 rounded border border-gray-300 text-gray-700 hover:bg-gray-100 transition-colors",children:"Cancel"}),l.jsx(we,{onClick:w,disabled:c,className:"s3-explr-crawl-btn",children:"Move"})]})]})})};Kt(he,{retries:3});const rt={current:!1},Wf="crawl:jobs",Wn="crawl:current_job",dC=e=>{const[t,n]=T.useState(null),[r,o]=T.useState(0);return T.useEffect(()=>{const i=localStorage.getItem(Wn);if(i){const a=JSON.parse(i);n(a),a!=null&&a.startTime&&o(Math.floor((Date.now()-a.startTime)/1e3))}},[]),T.useEffect(()=>{if(!(t!=null&&t.startTime))return;const i=setInterval(()=>{o(Math.floor((Date.now()-t.startTime)/1e3))},1e3);return()=>clearInterval(i)},[t==null?void 0:t.startTime]),T.useEffect(()=>{if(!(t!=null&&t.id))return;const i=async()=>{try{const u=(await he.get(`${e}/api/crawl/${t.id}?taskId=${t.taskId}`)).data;n(c=>{if(!c)return null;const d={...c,status:u};return localStorage.setItem(Wn,JSON.stringify(d)),(u.status==="completed"||u.status==="failed")&&setTimeout(()=>{n(null),localStorage.removeItem(Wn)},100),d})}catch(s){console.error("Error polling job status:",s)}},a=setInterval(i,3e3);return i(),()=>clearInterval(a)},[t==null?void 0:t.id,e]),{currentJob:t,elapsedTime:r,setCurrentJob:i=>{i&&!i.startTime&&(i.startTime=Date.now()),n(i),i?localStorage.setItem(Wn,JSON.stringify(i)):localStorage.removeItem(Wn)}}},zo=(e,t)=>{const n=[],r=o=>{(e[o]||[]).forEach(a=>{n.push(a.key),a.isFolder&&r(a.key)})};return r(t),n},fC=(e,t)=>{const n=[];return(e[t]||[]).forEach(o=>{n.push(o.key),o.isFolder&&n.push(...zo(e,o.key))}),n},pC=(e,t,n=[],r,o,i)=>{const[a,s]=T.useState({}),[u,c]=T.useState(!1),[d,g]=T.useState(null),[h,p]=T.useState(0),v=T.useRef(t);T.useEffect(()=>{v.current=t},[t]);const m=async()=>{c(!0);try{const w=await he.get(`${e}/api/files`,{params:{cache:!1,displayPrefixes:JSON.stringify(n),prefix:v.current},timeout:3e5});s(w.data),g(null)}catch(w){g(w instanceof Error?w:new Error("Failed to fetch files"))}finally{c(!1),p(0),i("")}},y=async w=>{var b,S;try{if(!w)return;c(!0);const E=await he.get(`${e}/api/search-db?query=${w}&rootPrefix=${t}&offset=${(o-1)*20}&limit=20`,{timeout:3e5});return s({[t]:((b=E==null?void 0:E.data)==null?void 0:b.result)||[]}),p(((S=E==null?void 0:E.data)==null?void 0:S.estimatedTotalHits)||0),E}catch(E){g(E instanceof Error?E:new Error("Failed to fetch files"))}finally{c(!1)}};return T.useEffect(()=>{!r&&!u&&m(),r&&!u&&y(r)},[r,o]),{data:a,isLoading:u,error:d,estimatedTotalHits:h,refetch:m}},hr=e=>{var r,o,i;const t=((i=(o=(r=e==null?void 0:e.name)==null?void 0:r.split("."))==null?void 0:o.pop())==null?void 0:i.toLowerCase())??"";return["txt","md","json","js","ts","jsx","tsx","css","html","xml","yaml","yml"].includes(t||"")},gC=T.memo(({homeLabel:e="Kho tài liệu",apiBaseUrl:t="http://localhost:3002",rootPrefix:n="",asSelector:r=!1,onSelected:o=s=>console.log("Đã chọn:",s),displayPrefixes:i,preSelectedFiles:a})=>{var hp;const[s,u]=T.useState([]),[c,d]=T.useState(""),[g,h]=T.useState(new Set),[p,v]=T.useState(n),[m,y]=T.useState(""),[w,b]=T.useState(!1),[S,E]=T.useState(""),[x,O]=T.useState(!1),[M,I]=T.useState(null),[H,k]=T.useState(null),[G,U]=T.useState(!1),[Z,P]=T.useState(!1),[$,F]=T.useState(null),W=T.useRef(null),{toast:N}=So(),[V,_]=T.useState(null),[B,Q]=T.useState(null),[ne,ee]=T.useState(""),[ce,oe]=T.useState(!1),[ie,de]=T.useState(!1),[ue,le]=T.useState(new Set),[Se,K]=T.useState(""),[Ee,He]=T.useState(!1),[Ue,Dt]=T.useState(!1),[ot,C]=T.useState("rename"),[A,R]=T.useState(!1),[te,J]=T.useState(""),[X,j]=T.useState("1"),[Y,ye]=T.useState(!1),[be,Te]=T.useState(!1),[Mt,ct]=T.useState(!1),[Ve,Ht]=T.useState(1),[Ut,Wt]=T.useState(!1),{currentJob:Ce,elapsedTime:an,setCurrentJob:Gn}=dC(t),[ut,xn]=T.useState(null),[br,Ko]=T.useState(""),[VC,Sr]=T.useState(!1),jC=new URL(window.location.href).searchParams.get("prefix")||"",zC=n+jC||m||n,{data:$t,isLoading:bs,error:BC,estimatedTotalHits:Cr,refetch:it}=pC(t,zC,i,c,Ve,d);T.useEffect(()=>{const D=new Set(a);h(D)},[]),T.useEffect(()=>{Ce!=null&&Ce.status&&(Ce.status.status==="completed"?(N({title:"Thu thập website hoàn tất",description:`Đã thu thập thành công ${Ce.url} với ${Ce.status.completed} trang`}),rt.current=!0,it()):Ce.status.status==="failed"&&N({title:"Thu thập website thất bại",description:`Không thể thu thập ${Ce.url}. Vui lòng thử lại.`,variant:"destructive"}))},[(hp=Ce==null?void 0:Ce.status)==null?void 0:hp.status]);const fp=T.useMemo(()=>$t[p]||[],[$t,p]),sn=T.useMemo(()=>fp,[fp,p,$t]),Er=T.useMemo(()=>{const D={};return sn.forEach((z,q)=>{g.has(z.key)&&(D[q]=!0)}),D},[g,sn]),HC=D=>{const z=zo($t,D);if(z.length===0)return g.has(D)?"all":"none";const q=z.filter(re=>g.has(re)).length;return q===0?"none":q===z.length?"all":"partial"},Kn=(D,z=!0)=>{if(p!==D&&(Wt(!0),y(D),v(D),h(new Set),z)){console.log("🚀 ~ handleFolderClick ~ prefix:",D);const q=window.location.pathname==="/"?"":window.location.pathname,re=D?`${window.location.origin}${q}?prefix=${encodeURIComponent(D)}`:`${window.location.origin}${q}`;console.log("🚀 ~ useEffect ~ basePath:",q),console.log("🚀 ~ useEffect ~ newUrl:",re),window.history.pushState({path:re},"",re)}};T.useEffect(()=>{Ut&&(rt.current=!0,it().finally(()=>Wt(!1)))},[Ut]);const UC=async(D,z)=>{var q,re;O(!0);try{if(sn.some(Ge=>Ge.isFolder&&Ge.name.toLowerCase()===D.toLowerCase())){N({title:"Lỗi",description:`Thư mục "${D}" đã tồn tại trong thư mục hiện tại.`,variant:"destructive"}),O(!1);return}const me=`${z}${D}/`;if((await he.post(`${t}/api/create-folder`,{prefix:me})).status!==200){N({title:"Lỗi",description:"Không thể tạo thư mục",variant:"destructive"});return}rt.current=!0,await it(),N({title:"Đã tạo thư mục",description:`Đã tạo thành công thư mục "${D}"`}),E(""),b(!1)}catch(se){console.error("Error creating folder:",se);const me=((re=(q=se==null?void 0:se.response)==null?void 0:q.data)==null?void 0:re.error)||"Không thể tạo thư mục";N({title:"Lỗi",description:me,variant:"destructive"})}finally{O(!1)}},Ss=async(D,z,q)=>{var re,se,me,ke,Ge,Yn,vp,yp,xp;F(q),Te(!0);try{if(Array.from(D).reduce((Ke,Ar)=>Ke+Ar.size,0)>=100*1024*1024){N({title:"Lỗi",description:"Tổng kích thước các tập tin vượt quá 100 MB",variant:"destructive"}),F(null),Te(!1);return}const Xo=Array.from(D).filter(Ke=>Ke.size===0);if(Xo.length>0){const Ke=Xo.map(Ar=>Ar.name).join(", ");N({title:"Lỗi tải lên",description:`Không thể tải lên tập tin rỗng: ${Ke}`,variant:"destructive"}),Te(!1),F(null);return}let _r=localStorage.getItem("dataLogin"),Xn;try{_r&&(_r=JSON.parse(_r),Xn=_r.user)}catch{_r=null}const wn=new FormData;if(Xn!=null&&Xn.id&&wn.append("metadata",JSON.stringify({creator:Xn.username,creatorId:Xn.id,DataSource:"Tệp tải lên"})),q==="folder"&&D[0]){const Ke=D[0].webkitRelativePath.split("/")[0];Ke&&wn.append("folderName",Ke)}wn.append("prefix",z),Array.from(D).forEach(Ke=>q==="folder"?wn.append("files",Ke,Ke.webkitRelativePath):wn.append("files",Ke)),rt.current=!0;const je=await he.post(`${t}/api/check-files-existed`,wn,{headers:{"Content-Type":"multipart/form-data"}});if(((re=je==null?void 0:je.data)==null?void 0:re.status)===200)await he.post(`${t}/api/upload`,wn,{headers:{"Content-Type":"multipart/form-data"}}),d(""),y(z),setTimeout(async()=>{F(null),await it(),Te(!1)},500);else{if(((me=(se=je==null?void 0:je.data)==null?void 0:se.names)==null?void 0:me.length)>0&&!((ke=je==null?void 0:je.data)!=null&&ke.isFolder)){const Ke=Array.from(D).filter(Ar=>je.data.names.includes(Ar.name));xn(Ke),Sr(!0)}(Ge=je==null?void 0:je.data)!=null&&Ge.isFolder&&((Yn=je==null?void 0:je.data)!=null&&Yn.name)&&(Ko((vp=je==null?void 0:je.data)==null?void 0:vp.name),xn(D),Sr(!0))}}catch(Tr){console.error("Lỗi tải lên:",Tr);const Xo=((xp=(yp=Tr==null?void 0:Tr.response)==null?void 0:yp.data)==null?void 0:xp.error)||"Không thể tải lên tập tin";N({title:"Lỗi",description:Xo,variant:"destructive"}),F(null),Te(!1)}},WC=async()=>{var D,z;try{Te(!0);const q=new FormData;if(ut){F(br?"folder":"files"),Sr(!1);let re=localStorage.getItem("dataLogin"),se;try{re&&(re=JSON.parse(re),se=re.user)}catch{re=null}if(se!=null&&se.id&&(console.log("🚀 ~ uploadFiles ~ user:",se),q.append("metadata",JSON.stringify({creator:se.username,creatorId:se.id,DataSource:"Tệp tải lên"}))),br&&ut[0]){const me=ut[0].webkitRelativePath.split("/")[0];me&&q.append("folderName",me)}q.append("prefix",p),Array.from(ut).forEach(me=>br&&ut[0]?q.append("files",me,me.webkitRelativePath):q.append("files",me)),se!=null&&se.id&&q.append("metadata",JSON.stringify({creator:se.username,creatorId:se.id,DataSource:"Tệp tải lên"})),await he.post(`${t}/api/upload`,q,{headers:{"Content-Type":"multipart/form-data"}}),d(""),y(p),rt.current=!0}}catch(q){console.error("Lỗi tải lên:",q);const re=((z=(D=q==null?void 0:q.response)==null?void 0:D.data)==null?void 0:z.error)||"Không thể tải lên tập tin";N({title:"Lỗi",description:re,variant:"destructive"})}finally{setTimeout(async()=>{F(null),await it(),Te(!1),Ko(""),xn(null)},500)}},qC=async D=>{var z;try{if(await he.delete(`${t}/api/files`,{data:{paths:[D.key]}}),g.has(D.key)){const re=new Set(g);re.delete(D.key),h(re)}const q=((z=D.key)==null?void 0:z.replace(/^(.*?)(\/.*)?$/,(re,se,me)=>!me||me==="/"?"":se+"/"))||"";y(q),rt.current=!0,N({title:"Đã xóa tập tin",description:`Đã xóa thành công "${D.name}"`}),I(null)}catch(q){console.error("Error deleting file:",q),N({title:"Lỗi",description:"Không thể xóa tập tin",variant:"destructive"})}finally{ct(!1),await it()}},Yo=D=>{const z=new Set(g),q=typeof D=="function"?D(Er):D;new Set(Object.keys(Er).map(Number)).forEach(se=>{const me=sn[se];me&&(q[se]||(z.delete(me.key),me.isFolder&&zo($t,me.key).forEach(ke=>z.delete(ke))))}),Object.entries(q).forEach(([se,me])=>{const ke=parseInt(se),Ge=sn[ke];Ge&&me&&(z.add(Ge.key),Ge.isFolder&&zo($t,Ge.key).forEach(Yn=>z.add(Yn)))}),h(z)},GC=async()=>{var D;U(!0);try{const z=Array.from(g),q=z.map(se=>Object.values($t).flat().find(me=>me.key===se)).filter(se=>se!==void 0);if(q.length===0){N({title:"Lỗi",description:"Không có tập tin nào được chọn để xóa",variant:"destructive"});return}await he.delete(`${t}/api/files`,{data:{paths:z}});const re=((D=q[0])==null?void 0:D.key.replace(/^(.*?)(\/.*)?$/,(se,me,ke)=>!ke||ke==="/"?"":me+"/"))||"";y(re),rt.current=!0,it(),N({title:"Đã xóa tập tin",description:`Đã xóa thành công ${q.length} mục`}),P(!1),h(new Set)}catch(z){console.error("Error deleting files:",z),N({title:"Lỗi",description:"Không thể xóa các tập tin đã chọn",variant:"destructive"})}finally{U(!1)}},KC=async(D,z)=>{if(!p.trim()){N({title:"Lỗi",description:"Không thể đổi tên tập tin hoặc thư mục ở thư mục gốc. Chỉ có thể xóa.",variant:"destructive"});return}de(!0);try{const q=D.key;let re;D.isFolder?re=q.split("/").slice(0,-2).join("/")+"/":re=q.substring(0,q.lastIndexOf("/")+1);const se=re+z+(D.isFolder?"/":"");await he.post(`${t}/api/rename`,{oldPath:q,newPath:se}),rt.current=!0,await it(),N({title:"Đã đổi tên",description:`Đã đổi tên thành công "${D.name}" thành "${z}"`}),_(null),ee(""),Q(null)}catch(q){console.error("Error renaming item:",q),N({title:"Lỗi",description:"Không thể đổi tên",variant:"destructive"})}finally{de(!1)}},pp=async D=>{le(z=>new Set([...z,...D]));try{const z=await he.post(`${t}/api/download`,{paths:D},{responseType:"blob"}),q=window.URL.createObjectURL(z.data),re=document.createElement("a");re.href=q;const se=z.headers["Content-Disposition"]||z.headers["content-disposition"],me=se==null?void 0:se.match(/filename="(.+)"/),ke=me?decodeURIComponent(me[1]):"download.zip";re.setAttribute("download",ke),document.body.appendChild(re),re.click(),document.body.removeChild(re),window.URL.revokeObjectURL(q),N({title:"Bắt đầu tải xuống",description:`Đã bắt đầu tải xuống ${D.length} mục${D.length>1,""}`})}catch(z){console.error("Error downloading files:",z),N({title:"Lỗi",description:"Không thể tải xuống tập tin",variant:"destructive"})}finally{le(z=>{const q=new Set(z);return D.forEach(re=>q.delete(re)),q})}},gp=p?p.replace(n,"").split("/").filter(Boolean):[],YC=()=>Array.from(g).map(D=>{var z;for(const q in $t){const re=(z=$t[q])==null?void 0:z.find(se=>se.key===D);if(re)return re}return null}).filter(D=>D!==null),mp=T.useMemo(()=>{const D=[{id:"select",header:()=>{const z=fC($t,p),q=z.length>0&&z.every(se=>g.has(se)),re=z.some(se=>g.has(se));return l.jsx(Ui,{checked:q?!0:re?"indeterminate":!1,onCheckedChange:se=>{if(se){const me=sn.reduce((ke,Ge,Yn)=>(ke[Yn]=!0,ke),{});Yo(me)}else Yo({})},"aria-label":"Chọn tất cả"})},cell:({row:z})=>{const q=z.original,se=q.isFolder?HC(q.key):g.has(q.key)?"all":"none";return l.jsx("div",{className:"flex items-center",children:l.jsx(Ui,{checked:se==="partial"?"indeterminate":se==="all",onCheckedChange:me=>{const ke={...Er};me?ke[z.index]=!0:delete ke[z.index],Yo(ke)},"aria-label":"Chọn dòng"})})},enableSorting:!1,size:50},{id:"fileName",size:"100%",header:({column:z})=>l.jsxs(we,{variant:"ghost",onClick:()=>z.toggleSorting(z.getIsSorted()==="asc"),className:"px-0",children:["Tên tập tin",l.jsx(ki,{})]}),accessorKey:"name",cell:({row:z})=>{const q=z.original,re=q.key.substring(0,q.key.lastIndexOf("/"))||"/",se=c.trim()!==""&&re!==p,me=re.split("/").filter(Boolean);return l.jsxs("div",{className:"flex flex-col",children:[l.jsxs("div",{className:`flex items-center gap-2 ${q.isFolder?"cursor-pointer hover:text-blue-600":""}`,onClick:()=>{q.isFolder&&(h(new Set),Kn(q.key))},children:[q.isFolder?l.jsx(Zo,{className:"h-5 w-5 text-blue-500"}):null,q.name]}),se&&l.jsxs("div",{className:"text-sm text-gray-500 flex items-center",children:[l.jsx(Zo,{className:"h-4 w-4 text-gray-500 my-auto"}),l.jsxs("span",{className:"flex items-center ml-1",children:[l.jsx("span",{className:"cursor-pointer hover:text-blue-600",onClick:()=>{Kn("")},children:"/"}),me.map((ke,Ge)=>l.jsxs("span",{className:"flex items-center",children:[l.jsx("span",{className:"cursor-pointer hover:text-blue-600",onClick:()=>{Kn(me.slice(0,Ge+1).join("/")+"/")},children:ke}),Ge<me.length-1&&l.jsx("span",{children:"/"})]},Ge))]})]})]})}}];return r||D.push({id:"size",header:({column:z})=>l.jsxs(we,{variant:"ghost",onClick:()=>z.toggleSorting(z.getIsSorted()==="asc"),className:"px-0 w-full flex-row justify-end",children:["Kích thước",l.jsx(ki,{})]}),accessorKey:"size",cell:({getValue:z,row:q})=>{const re=z();return l.jsx("div",{className:"w-full flex-row justify-end items-center text-right",children:l.jsx("span",{children:q.original.isFolder?"-":Yh(re)})})},size:100},{id:"lastModified",header:({column:z})=>l.jsxs(we,{variant:"ghost",onClick:()=>z.toggleSorting(z.getIsSorted()==="asc"),className:"px-0 w-full flex-row justify-end",children:["Sửa đổi lần cuối",l.jsx(ki,{})]}),accessorKey:"lastModified",cell:({row:z})=>{const q=z.original.lastModified;return l.jsx("div",{className:"w-full flex-row justify-end items-center text-right",children:l.jsx("span",{children:q&&Ol(q).isValid()?Ol(q).format("DD/MM/YYYY HH:mm"):"-"})})},size:200},{id:"actions",size:200,header:()=>l.jsx(we,{variant:"ghost",className:"w-full flex-row justify-end",children:"Hành động"}),accessorKey:"key",cell:({row:z})=>l.jsxs("div",{className:"flex items-center gap-2 justify-end",children:[l.jsx(zn,{children:l.jsxs(Bn,{children:[l.jsx(Hn,{asChild:!0,children:l.jsx(we,{variant:"ghost",size:"icon",onClick:()=>pp([z.original.key]),className:"h-8 w-8 p-0",disabled:ue.has(z.original.key),children:ue.has(z.original.key)?l.jsx($e,{className:"h-4 w-4 animate-spin"}):l.jsx(Ts,{className:"h-4 w-4"})})}),l.jsx(hn,{children:"Tải xuống"})]})}),p.trim()!==""&&l.jsx(zn,{children:l.jsxs(Bn,{children:[l.jsx(Hn,{asChild:!0,children:l.jsx(we,{variant:"ghost",size:"icon",onClick:()=>{_(z.original),ee(z.original.name)},className:"h-8 w-8 p-0",children:l.jsx(Fp,{className:"h-4 w-4"})})}),l.jsx(hn,{children:"Đổi tên"})]})}),l.jsx(zn,{children:l.jsxs(Bn,{children:[l.jsx(Hn,{asChild:!0,children:l.jsx(we,{variant:"ghost",size:"icon",onClick:()=>{oe(!0),k(z.original)},className:"h-8 w-8 p-0",children:l.jsx(ch,{className:"h-4 w-4"})})}),l.jsx(hn,{children:"Di chuyển"})]})}),l.jsx(zn,{children:l.jsxs(Bn,{children:[l.jsx(Hn,{asChild:!0,children:l.jsx(we,{variant:"ghost",size:"icon",onClick:()=>I(z.original),className:"h-8 w-8 p-0",children:l.jsx(_s,{className:"h-4 w-4"})})}),l.jsx(hn,{children:"Xóa"})]})})]})}),D},[g,sn,Er,ue,r]),Cs=Vs({data:sn,columns:mp,state:{rowSelection:Er,sorting:s},onSortingChange:u,enableRowSelection:!0,onRowSelectionChange:Yo,getCoreRowModel:Rs(),getSortedRowModel:pg()}),XC=async D=>{var z,q;He(!0);try{if(hr(D)){const re=await he.get(`${t}/api/read-text`,{params:{path:D.key}});K(re.data.content)}try{const re=await he.get(`${t}/api/read-json`,{params:{path:D.key+".metadata.json"}}),se=((q=(z=re==null?void 0:re.data)==null?void 0:z.content)==null?void 0:q.metadataAttributes)||null;return Q({fullPath:V==null?void 0:V.key,...se})}catch{return Q("Lỗi phân tích siêu dữ liệu")}}catch(re){console.error("Error loading file content:",re),N({title:"Lỗi",description:"Không thể tải nội dung tập tin",variant:"destructive"})}finally{He(!1)}},JC=async(D,z)=>{Dt(!0);try{await he.post(`${t}/api/modify-text`,{path:D.key,content:z}),N({title:"Đã lưu tập tin",description:"Nội dung tập tin đã được cập nhật thành công"}),rt.current=!0,await it(),_(null),K(""),C("rename")}catch(q){console.error("Error saving file content:",q),N({title:"Lỗi",description:"Không thể lưu nội dung tập tin",variant:"destructive"})}finally{Dt(!1)}},ZC=async D=>{Dt(!0);try{console.log("🚀 ~ saveJsonFile ~ metadataForEdit:",B),await he.post(`${t}/api/modify-json`,{path:D.key+".metadata.json",content:{metadataAttributes:B}}),N({title:"Đã lưu tập tin",description:"Nội dung tập tin đã được cập nhật thành công"}),rt.current=!0,await it(),_(null),K(""),C("rename")}catch(z){console.error("Error saving file content:",z),N({title:"Lỗi",description:"Không thể lưu nội dung tập tin",variant:"destructive"})}finally{Dt(!1)}};T.useEffect(()=>{V&&(V.isFolder||XC(V),C("rename"))},[V]);const QC=async(D,z)=>{var q;if(Ce){N({title:"Đang thu thập website",description:"Vui lòng đợi cho công việc thu thập hiện tại hoàn thành.",variant:"destructive"});return}ye(!0);try{const{data:re}=await he.post(`${t}/api/crawl`,{url:D,limit:z,prefix:p});if(re.id){Gn({id:re.id,url:D,limit:z,prefix:p,taskId:((q=re.task)==null?void 0:q.id)||""});const se=localStorage.getItem(Wf),me=se?JSON.parse(se):[];me.some(ke=>ke.id===re.id)||(me.unshift({url:D,id:re.id,limit:z,prefix:p,timestamp:Date.now()}),me.length>20&&(me.length=20),localStorage.setItem(Wf,JSON.stringify(me))),N({title:"Bắt đầu thu thập website",description:`Đã thêm nhiệm vụ thu thập ${D} với giới hạn ${z}. Dữ liệu sẽ có sẵn sau khi thu thập hoàn tất.`}),R(!1),J(""),j("1")}}catch(re){console.error("Error crawling website:",re),N({title:"Lỗi",description:"Không thể bắt đầu thu thập website",variant:"destructive"})}finally{ye(!1)}},eE=async()=>{try{if(!(Ce!=null&&Ce.id))return;Gn(null),localStorage.removeItem(Wn),N({title:"Đã dừng thu thập",description:`Đã dừng thu thập website ${Ce.url}`})}catch(D){console.error("Error stopping job:",D),N({title:"Lỗi",description:"Không thể dừng thu thập website",variant:"destructive"})}};return T.useEffect(()=>{const D=()=>{const q=new URL(window.location.href).searchParams.get("prefix")||"";q?Kn(n+q,!1):(h(new Set),y(""),v(""),rt.current=!0,setTimeout(()=>{it()},0))};return D(),window.addEventListener("popstate",D),()=>{window.removeEventListener("popstate",D)}},[]),l.jsxs("div",{className:"space-y-4 s3-explr-container",children:[l.jsx(rd,{}),l.jsx(Rt,{open:VC,onOpenChange:D=>{Sr(D),D||(Ko(""),xn(null),Te(!1),F(null))},children:l.jsxs(St,{children:[l.jsxs(Ct,{children:[l.jsx(Et,{children:"Cảnh báo trùng lặp"}),l.jsxs(Dn,{children:[br&&l.jsxs(l.Fragment,{children:["Folder $",br," đã có."]}),ut&&ut.length>0&&l.jsxs(l.Fragment,{children:["Những tệp sau bị lặp:",l.jsx("ul",{className:"mt-2 list-disc pl-5 text-sm text-red-600",children:Array.from(ut).map((D,z)=>l.jsx("li",{children:D.name},z))})]})]})]}),l.jsxs(pn,{children:[l.jsx(we,{variant:"outline",onClick:()=>{Sr(!1),Ko(""),xn(null),Te(!1),F(null)},children:"Bỏ qua"}),l.jsx(we,{variant:"destructive",onClick:()=>WC(),children:"Ghi đè"})]})]})}),l.jsx(Ul,{className:"s3-explr-breadcrumb",children:l.jsxs(Wl,{className:"s3-explr-breadcrumb-list",children:[l.jsx(Vi,{className:"s3-explr-breadcrumb-item",children:l.jsx(ji,{onClick:()=>Kn(n),className:"flex items-center gap-1 cursor-pointer s3-explr-breadcrumb-home",children:e})}),gp.map((D,z)=>l.jsxs("div",{className:"flex items-center",children:[l.jsx(ql,{className:"s3-explr-breadcrumb-separator"},`sep-${z}`),l.jsx(Vi,{className:"s3-explr-breadcrumb-item",children:l.jsx(ji,{onClick:()=>Kn(n+gp.slice(0,z+1).join("/")+"/"),className:"cursor-pointer s3-explr-breadcrumb-link",children:D})},`item-${D}`)]},z))]})}),l.jsxs("div",{className:"flex items-center space-x-4 s3-explr-toolbar",children:[l.jsx("div",{className:"relative max-w-sm w-full s3-explr-search-container",children:l.jsx(aS,{ref:W,onChange:D=>d(D)})}),l.jsxs(we,{variant:"outline",size:"sm",onClick:()=>{y(p),rt.current=!0,it()},disabled:bs,className:"flex items-center gap-2 s3-explr-refresh-btn",children:[l.jsx(Sp,{className:`h-4 w-4 s3-explr-refresh-icon ${bs?"animate-spin":""}`}),"Làm mới"]}),!r&&l.jsxs(l.Fragment,{children:[g.size>0&&l.jsxs(l.Fragment,{children:[l.jsxs(we,{variant:"outline",size:"sm",onClick:()=>pp(Array.from(g)),disabled:Array.from(g).some(D=>ue.has(D)),className:"flex items-center gap-2 s3-explr-download-selected-btn",children:[Array.from(g).some(D=>ue.has(D))?l.jsx($e,{className:"h-4 w-4 animate-spin mr-2 s3-explr-loader"}):l.jsx(Ts,{className:"h-4 w-4 s3-explr-download-icon"}),"Tải xuống đã chọn (",g.size,")"]}),l.jsxs(Rt,{open:Z,onOpenChange:P,children:[l.jsx(no,{asChild:!0,children:l.jsxs(we,{variant:"destructive",size:"sm",className:"flex items-center gap-2 s3-explr-bulk-delete-btn",children:[l.jsx(_s,{className:"h-4 w-4 s3-explr-trash-icon"}),"Xóa đã chọn (",g.size,")"]})}),l.jsxs(St,{className:"s3-explr-dialog-content",children:[l.jsxs(Ct,{className:"s3-explr-dialog-header",children:[l.jsx(Et,{className:"s3-explr-dialog-title",children:"Xác nhận xóa hàng loạt"}),l.jsxs(Dn,{className:"s3-explr-dialog-description",children:["Bạn có chắc chắn muốn xóa ",g.size," mục đã chọn? Hành động này không thể hoàn tác."]})]}),l.jsxs(pn,{className:"s3-explr-dialog-footer",children:[l.jsx(we,{variant:"outline",onClick:()=>P(!1),className:"s3-explr-cancel-btn",children:"Hủy"}),l.jsx(we,{variant:"destructive",onClick:GC,disabled:G,className:"s3-explr-confirm-delete-btn",children:G?l.jsxs(l.Fragment,{children:[l.jsx($e,{className:"mr-2 h-4 w-4 animate-spin s3-explr-loader"}),"Đang xóa..."]}):"Xóa đã chọn"})]})]})]})]}),l.jsxs(Rt,{open:w,onOpenChange:b,children:[l.jsx(no,{asChild:!0,children:l.jsxs(we,{variant:"outline",size:"sm",className:"flex items-center gap-2 s3-explr-new-folder-btn",disabled:!!i&&!p,children:[l.jsx(_p,{className:"h-4 w-4 s3-explr-folder-plus-icon"}),"Thư mục mới"]})}),l.jsxs(St,{className:"s3-explr-dialog-content",children:[l.jsx(Ct,{className:"s3-explr-dialog-header",children:l.jsx(Et,{className:"s3-explr-dialog-title",children:"Tạo thư mục mới"})}),l.jsxs("div",{className:"space-y-4 py-4 s3-explr-dialog-body",children:[l.jsxs("div",{className:"space-y-2 s3-explr-input-group",children:[l.jsx(gn,{htmlFor:"name",className:"s3-explr-label",children:"Tên thư mục"}),l.jsx(en,{disabled:x,id:"name",value:S,onChange:D=>E(D.target.value),placeholder:"Nhập tên thư mục",className:"s3-explr-input"})]}),l.jsxs(we,{onClick:()=>{S.trim()&&UC(S,p)},disabled:x,className:"s3-explr-create-btn",children:[x&&l.jsx($e,{className:"mr-2 h-4 w-4 animate-spin s3-explr-loader"}),x?"Đang tạo...":"Tạo"]})]})]})]}),l.jsxs("div",{className:"flex items-center gap-2 s3-explr-upload-group",children:[l.jsx(we,{variant:"outline",size:"sm",className:"flex items-center gap-2 s3-explr-upload-files-btn",onClick:()=>{const D=document.createElement("input");D.type="file",D.multiple=!0,D.onchange=z=>{const q=z.target.files;q&&Ss(q,p,"files")},D.click()},disabled:$!==null||!!i&&!p,children:$==="files"?l.jsxs(l.Fragment,{children:[l.jsx($e,{className:"h-4 w-4 animate-spin mr-2 s3-explr-loader"}),"Đang tải lên..."]}):l.jsxs(l.Fragment,{children:[l.jsx(Ep,{className:"h-4 w-4 s3-explr-upload-icon"}),"Tải lên tập tin"]})}),l.jsx(we,{variant:"outline",size:"sm",className:"flex items-center gap-2 s3-explr-upload-folder-btn",onClick:()=>{const D=document.createElement("input");D.type="file",D.multiple=!0,D.webkitdirectory=!0,D.onchange=z=>{const q=z.target.files;q&&Ss(q,p,"folder")},D.click()},disabled:$!==null||!!i&&!p,children:$==="folder"?l.jsxs(l.Fragment,{children:[l.jsx($e,{className:"h-4 w-4 animate-spin mr-2 s3-explr-loader"}),"Đang tải lên..."]}):l.jsxs(l.Fragment,{children:[l.jsx(Zo,{className:"h-4 w-4 s3-explr-folder-icon"}),"Tải lên thư mục"]})}),Ce?l.jsx(zn,{delayDuration:0,children:l.jsxs(Bn,{children:[l.jsx(Hn,{asChild:!0,children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs(we,{variant:"outline",size:"sm",className:"flex items-center gap-2 s3-explr-add-website-btn",disabled:!0,children:[l.jsx($e,{className:"h-4 w-4 animate-spin s3-explr-loader"}),Ce.status?l.jsxs(l.Fragment,{children:["Đang thu thập (",Ce.status.completed,"/",Ce.status.total,") - ",Math.floor(an/60),":",String(an%60).padStart(2,"0")]}):"Đang thu thập..."]}),l.jsxs(we,{variant:"destructive",size:"sm",onClick:()=>void eE(),className:"flex items-center gap-2",children:[l.jsx("span",{className:"sr-only",children:"Dừng thu thập"}),l.jsx(Dp,{className:"h-4 w-4"})]})]})}),Ce.status&&l.jsx(hn,{side:"right",sideOffset:5,children:l.jsxs("div",{className:"space-y-1 p-2",children:[l.jsxs("p",{className:"font-semibold",children:["Đang thu thập ",Ce.url]}),l.jsxs("p",{children:["Tiến độ: ",Ce.status.completed,"/",Ce.status.total," trang"]}),l.jsxs("p",{children:["Thời gian: ",Math.floor(an/60),":",String(an%60).padStart(2,"0")]}),l.jsxs("p",{children:["Trạng thái:"," ",Ce.status.status==="scraping"?"Đang thu thập":Ce.status.status==="completed"?"Hoàn thành":"Thất bại"]})]})})]})}):l.jsxs(Rt,{open:A,onOpenChange:R,children:[l.jsx(no,{asChild:!0,children:l.jsxs(we,{variant:"outline",size:"sm",className:"flex items-center gap-2 s3-explr-add-website-btn",disabled:!!i&&!p,children:[l.jsx(Np,{className:"h-4 w-4 s3-explr-globe-icon"}),"Thêm website"]})}),l.jsxs(St,{className:"s3-explr-dialog-content",children:[l.jsxs(Ct,{className:"s3-explr-dialog-header",children:[l.jsx(Et,{className:"s3-explr-dialog-title",children:"Thêm website"}),l.jsx(Dn,{className:"s3-explr-dialog-description",children:"Nhập URL website để thu thập và thêm vào S3."})]}),l.jsxs("div",{className:"space-y-4 py-4 s3-explr-dialog-body",children:[l.jsxs("div",{className:"space-y-2 s3-explr-input-group",children:[l.jsx(gn,{htmlFor:"websiteUrl",className:"s3-explr-label",children:"URL Website"}),l.jsx(en,{id:"websiteUrl",value:te,onChange:D=>J(D.target.value),placeholder:"https://example.com",type:"url",disabled:Y,className:"s3-explr-input"})]}),l.jsxs("div",{className:"space-y-2 s3-explr-input-group",children:[l.jsx(gn,{htmlFor:"crawlLimit",className:"s3-explr-label",children:"Giới hạn thu thập"}),l.jsx(en,{id:"crawlLimit",value:X,onChange:D=>{const z=D.target.value;/^\d*$/.test(z)&&j(z)},placeholder:"1",type:"text",disabled:Y,className:"s3-explr-input"}),l.jsx("p",{className:"text-sm text-gray-500",children:"Số lượng liên kết cần thu thập (mặc định: 1)"})]})]}),l.jsxs(pn,{className:"s3-explr-dialog-footer",children:[l.jsx(we,{variant:"outline",onClick:()=>{R(!1),J(""),j("1")},disabled:Y,className:"s3-explr-cancel-btn",children:"Hủy"}),l.jsx(we,{onClick:()=>{te.trim()&&QC(te.trim(),parseInt(X)||1)},disabled:Y||!te.trim(),className:"s3-explr-crawl-btn",children:Y?l.jsxs(l.Fragment,{children:[l.jsx($e,{className:"mr-2 h-4 w-4 animate-spin s3-explr-loader"}),"Đang thu thập..."]}):"Bắt đầu thu thập"})]})]})]})]}),l.jsx(Rt,{open:!!M,onOpenChange:D=>!D&&I(null),children:l.jsxs(St,{className:"s3-explr-dialog-content",children:[l.jsxs(Ct,{className:"s3-explr-dialog-header",children:[l.jsx(Et,{className:"s3-explr-dialog-title",children:"Xác nhận xóa"}),l.jsxs(Dn,{className:"s3-explr-dialog-description",children:["Bạn có chắc chắn muốn xóa ",M==null?void 0:M.name,"? Hành động này không thể hoàn tác."]})]}),l.jsxs(pn,{className:"s3-explr-dialog-footer",children:[l.jsx(we,{variant:"outline",onClick:()=>I(null),className:"s3-explr-cancel-btn",children:"Hủy"}),l.jsx(we,{variant:"destructive",onClick:()=>qC(M),disabled:Mt,className:"s3-explr-confirm-delete-btn",children:Mt?l.jsxs(l.Fragment,{children:[l.jsx($e,{className:"mr-2 h-4 w-4 animate-spin s3-explr-loader"}),"Đang xóa..."]}):"Xóa"})]})]})}),l.jsx(Rt,{open:!!V,onOpenChange:D=>{D||(_(null),Q(null),ee(""),K(""),C("rename"))},children:l.jsxs(St,{className:"s3-explr-dialog-content max-w-5xl w-[90%]",children:[l.jsx(Ct,{className:"s3-explr-dialog-header",children:l.jsx(Et,{className:"s3-explr-dialog-title",children:V!=null&&V.isFolder?"Đổi tên thư mục":hr(V)?"Quản lý tập tin":"Đổi tên tập tin"})}),V&&l.jsxs(Cx,{value:ot,onValueChange:D=>C(D),children:[l.jsxs(Ou,{"aria-checked":!hr(V),"aria-disabled":V.isFolder,className:"grid w-full grid-cols-3 aria-checked:grid-cols-2 aria-disabled:grid-cols-1",children:[l.jsx(mo,{value:"rename",children:"Đổi tên"}),!V.isFolder&&l.jsxs(l.Fragment,{children:[hr(V)&&l.jsx(mo,{value:"edit",children:"Sửa nội dung"}),l.jsx(mo,{value:"edit-metadata",children:"Sửa metadata file"})]})]}),l.jsx(ho,{value:"rename",children:l.jsx("div",{className:"space-y-4 py-4 s3-explr-dialog-body",children:l.jsxs("div",{className:"h-[70dvh] min-h-[500px] overflow-hidden overflow-y-auto pb-3 px-1 s3-explr-input-group",children:[l.jsx(gn,{htmlFor:"newName",className:"s3-explr-label",children:"Tên mới"}),l.jsx(en,{id:"newName",value:ne,onChange:D=>ee(D.target.value),placeholder:"Nhập tên mới",disabled:ie,className:"s3-explr-input"})]})})}),!V.isFolder&&l.jsxs(l.Fragment,{children:[hr(V)&&l.jsx(ho,{value:"edit",children:l.jsx("div",{className:"space-y-4 py-4",children:Ee?l.jsx("div",{className:"flex items-center justify-center py-4",children:l.jsx($e,{className:"h-6 w-6 animate-spin"})}):l.jsxs("div",{className:"h-[70dvh] min-h-[500px] overflow-hidden overflow-y-auto pb-3 px-1",children:[l.jsx(gn,{htmlFor:"content",className:"s3-explr-label",children:"Nội dung tập tin"}),l.jsx(ar,{id:"content",value:Se,onChange:D=>K(D.target.value),placeholder:"Nhập nội dung tập tin",className:"min-h-[200px] font-mono",disabled:Ue})]})})}),l.jsx(ho,{value:"edit-metadata",children:l.jsx("div",{className:"space-y-4 py-4",children:Ee?l.jsx("div",{className:"flex items-center justify-center py-4",children:l.jsx($e,{className:"h-6 w-6 animate-spin"})}):l.jsx("div",{className:"h-[70dvh] min-h-[500px] overflow-hidden overflow-y-auto pb-3 px-1",children:B&&typeof B=="object"&&Object.entries(B).map(([D,z],q)=>l.jsxs("div",{className:"pb-3 flex flex-col gap-2",children:[l.jsxs(gn,{htmlFor:D,className:"s3-explr-label flex items-center gap-1",children:[fh[D]||D,Mi(D)&&l.jsx(uh,{className:"h-[12px] w-[12px] text-red-500"})]}),ph(D)?l.jsx(ar,{id:D,value:typeof z=="string"?z:JSON.stringify(z),onChange:re=>{const se={...B,[D]:re.target.value};Q(se)},placeholder:"Nhập nội dung tập tin",className:"min-h-[200px] font-mono",disabled:Ue||Mi(D)}):l.jsx(en,{id:D,value:typeof z=="string"?z:JSON.stringify(z),onChange:re=>{const se={...B,[D]:re.target.value};Q(se)},placeholder:"Nhập nội dung",className:"s3-explr-input",disabled:Ue||Mi(D)})]},q))})})})]})]}),l.jsxs(pn,{className:"s3-explr-dialog-footer",children:[l.jsx(we,{variant:"outline",onClick:()=>{_(null),Q(null),ee(""),K("")},className:"s3-explr-cancel-btn",children:"Hủy"}),ot==="edit"?l.jsx(we,{onClick:()=>V&&JC(V,Se),disabled:Ue||Ee,className:"s3-explr-save-btn",children:Ue?l.jsxs(l.Fragment,{children:[l.jsx($e,{className:"mr-2 h-4 w-4 animate-spin s3-explr-loader"}),"Đang lưu..."]}):"Lưu thay đổi"}):ot==="edit-metadata"?l.jsx(we,{onClick:()=>B&&typeof B=="object"&&V&&ZC(V),disabled:Ue||Ee,className:"s3-explr-save-btn",children:Ue?l.jsxs(l.Fragment,{children:[l.jsx($e,{className:"mr-2 h-4 w-4 animate-spin s3-explr-loader"}),"Đang lưu..."]}):"Lưu thay đổi"}):l.jsx(we,{onClick:()=>{ne.trim()&&V&&KC(V,ne.trim())},disabled:ie||!ne.trim()||ne.trim()===(V==null?void 0:V.name),className:"s3-explr-rename-btn",children:ie?l.jsxs(l.Fragment,{children:[l.jsx($e,{className:"mr-2 h-4 w-4 animate-spin s3-explr-loader"}),"Đang đổi tên..."]}):"Đổi tên"})]})]})}),H&&ce&&l.jsx(uC,{openDialogRename:ce,setOpenDialogRename:oe,apiBaseUrl:t,setFileToMove:k,fileToMove:H,refreshFiles:it,ignoreCache:rt})]})]}),BC&&l.jsx("div",{className:"bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative s3-explr-error",children:"Đã xảy ra lỗi khi tải danh sách tập tin"}),l.jsx(cC,{onFilesSelected:(D,z)=>Ss(D,p,z),children:l.jsx("div",{className:"rounded-md border s3-explr-table-container",children:l.jsxs(lo,{className:"s3-explr-table",children:[l.jsx(co,{className:"s3-explr-table-header",children:Cs.getHeaderGroups().map(D=>l.jsx(ht,{className:"hover:bg-transparent s3-explr-header-row",children:D.headers.map(z=>l.jsx(Tt,{className:"s3-explr-header-cell",style:{width:z.getSize()},children:z.isPlaceholder?null:Dr(z.column.columnDef.header,z.getContext())},z.id))},D.id))}),l.jsx(uo,{className:"s3-explr-table-body",children:Cs.getRowModel().rows.length===0?l.jsx(ht,{className:"s3-explr-empty-row",children:l.jsx(Xe,{colSpan:mp.length,className:"h-24 text-center s3-explr-empty-cell",children:c?l.jsxs("div",{className:"text-gray-500 s3-explr-no-results",children:['Không tìm thấy tập tin hoặc thư mục nào khớp với "',c,'"']}):l.jsx("div",{className:"text-gray-500 s3-explr-empty-message",children:bs?"Đang tải nội dung thư mục... Vui lòng đợi":"Thư mục này không chứa tập tin hoặc thư mục con nào"})})}):Cs.getRowModel().rows.map(D=>l.jsx(ht,{className:"h-12 s3-explr-row",children:D.getVisibleCells().map(z=>l.jsx(Xe,{className:"align-middle s3-explr-cell",children:Dr(z.column.columnDef.cell,z.getContext())},z.id))},D.id))})]})})}),c&&Cr!==0&&l.jsx(l.Fragment,{children:l.jsx(ro,{children:l.jsxs(oo,{children:[l.jsx(io,{onClick:()=>Ht(D=>Math.max(D-1,1)),"aria-disabled":Ve===1,className:"cursor-pointer aria-disabled:pointer-events-none"}),Array.from({length:Math.ceil(Cr/20)},(D,z)=>{const q=z+1,re=Math.ceil(Cr/20);return re>7&&!(q===1||q===re||q>=Ve-1&&q<=Ve+1)?q===Ve-2&&Ve>4||q===Ve+2&&Ve<re-3?l.jsx(so,{className:"pointer-events-none",children:"..."},z):null:l.jsx(mt,{className:"cursor-pointer",children:l.jsx(Mn,{isActive:Ve===q,onClick:()=>Ht(q),className:`${Ve===q?"bg-blue-500 text-white":"bg-white text-black"} hover:bg-blue-100`,children:q})},z)}),l.jsx(mt,{children:l.jsx(ao,{onClick:()=>Ht(D=>Math.min(D+1,Math.ceil(Cr/20))),"aria-disabled":Ve===Math.ceil(Cr/20),className:"cursor-pointer aria-disabled:pointer-events-none"})})]})})}),r&&o&&l.jsxs("div",{className:"flex justify-between items-center mt-4 s3-explr-selector-footer",children:[l.jsxs("div",{className:"text-sm text-gray-500 s3-explr-selection-count",children:[g.size," ",(g.size===1,"tập tin")," đã chọn"]}),l.jsx(we,{variant:"default",onClick:()=>o(YC()),disabled:g.size===0,className:"s3-explr-ok-btn",children:"OK"})]})]})});var vr=e=>e.type==="checkbox",yn=e=>e instanceof Date,qe=e=>e==null;const qf=e=>typeof e=="object";var Me=e=>!qe(e)&&!Array.isArray(e)&&qf(e)&&!yn(e),mC=e=>Me(e)&&e.target?vr(e.target)?e.target.checked:e.target.value:e,hC=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,vC=(e,t)=>e.has(hC(t)),yC=e=>{const t=e.constructor&&e.constructor.prototype;return Me(t)&&t.hasOwnProperty("isPrototypeOf")},ps=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function lt(e){let t;const n=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(ps&&(e instanceof Blob||r))&&(n||Me(e)))if(t=n?[]:{},!n&&!yC(e))t=e;else for(const o in e)e.hasOwnProperty(o)&&(t[o]=lt(e[o]));else return e;return t}var Bo=e=>Array.isArray(e)?e.filter(Boolean):[],De=e=>e===void 0,ae=(e,t,n)=>{if(!t||!Me(e))return n;const r=Bo(t.split(/[,[\].]+?/)).reduce((o,i)=>qe(o)?o:o[i],e);return De(r)||r===e?De(e[t])?n:e[t]:r},Ot=e=>typeof e=="boolean",gs=e=>/^\w*$/.test(e),Gf=e=>Bo(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Oe=(e,t,n)=>{let r=-1;const o=gs(t)?[t]:Gf(t),i=o.length,a=i-1;for(;++r<i;){const s=o[r];let u=n;if(r!==a){const c=e[s];u=Me(c)||Array.isArray(c)?c:isNaN(+o[r+1])?{}:[]}if(s==="__proto__"||s==="constructor"||s==="prototype")return;e[s]=u,e=e[s]}return e};const Kf={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},xt={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Bt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};T.createContext(null);var xC=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const a=i;return t._proxyFormState[a]!==xt.all&&(t._proxyFormState[a]=!r||xt.all),e[a]}});return o},Je=e=>Me(e)&&!Object.keys(e).length,wC=(e,t,n,r)=>{n(e);const{name:o,...i}=e;return Je(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(a=>t[a]===xt.all)},Ho=e=>Array.isArray(e)?e:[e];function bC(e){const t=T.useRef(e);t.current=e,T.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}var Ft=e=>typeof e=="string",SC=(e,t,n,r,o)=>Ft(e)?(r&&t.watch.add(e),ae(n,e,o)):Array.isArray(e)?e.map(i=>(r&&t.watch.add(i),ae(n,i))):(r&&(t.watchAll=!0),n),CC=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{},Yf=e=>({isOnSubmit:!e||e===xt.onSubmit,isOnBlur:e===xt.onBlur,isOnChange:e===xt.onChange,isOnAll:e===xt.all,isOnTouch:e===xt.onTouched}),Xf=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const yr=(e,t,n,r)=>{for(const o of n||Object.keys(e)){const i=ae(e,o);if(i){const{_f:a,...s}=i;if(a){if(a.refs&&a.refs[0]&&t(a.refs[0],o)&&!r)return!0;if(a.ref&&t(a.ref,a.name)&&!r)return!0;if(yr(s,t))break}else if(Me(s)&&yr(s,t))break}}};var EC=(e,t,n)=>{const r=Ho(ae(e,n));return Oe(r,"root",t[n]),Oe(e,n,r),e},ms=e=>e.type==="file",kt=e=>typeof e=="function",Uo=e=>{if(!ps)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Wo=e=>Ft(e),hs=e=>e.type==="radio",qo=e=>e instanceof RegExp;const Jf={value:!1,isValid:!1},Zf={value:!0,isValid:!0};var Qf=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!De(e[0].attributes.value)?De(e[0].value)||e[0].value===""?Zf:{value:e[0].value,isValid:!0}:Zf:Jf}return Jf};const ep={isValid:!1,value:null};var tp=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,ep):ep;function np(e,t,n="validate"){if(Wo(e)||Array.isArray(e)&&e.every(Wo)||Ot(e)&&!e)return{type:n,message:Wo(e)?e:"",ref:t}}var qn=e=>Me(e)&&!qo(e)?e:{value:e,message:""},rp=async(e,t,n,r,o)=>{const{ref:i,refs:a,required:s,maxLength:u,minLength:c,min:d,max:g,pattern:h,validate:p,name:v,valueAsNumber:m,mount:y,disabled:w}=e._f,b=ae(t,v);if(!y||w)return{};const S=a?a[0]:i,E=U=>{r&&S.reportValidity&&(S.setCustomValidity(Ot(U)?"":U||""),S.reportValidity())},x={},O=hs(i),M=vr(i),I=O||M,H=(m||ms(i))&&De(i.value)&&De(b)||Uo(i)&&i.value===""||b===""||Array.isArray(b)&&!b.length,k=CC.bind(null,v,n,x),G=(U,Z,P,$=Bt.maxLength,F=Bt.minLength)=>{const W=U?Z:P;x[v]={type:U?$:F,message:W,ref:i,...k(U?$:F,W)}};if(o?!Array.isArray(b)||!b.length:s&&(!I&&(H||qe(b))||Ot(b)&&!b||M&&!Qf(a).isValid||O&&!tp(a).isValid)){const{value:U,message:Z}=Wo(s)?{value:!!s,message:s}:qn(s);if(U&&(x[v]={type:Bt.required,message:Z,ref:S,...k(Bt.required,Z)},!n))return E(Z),x}if(!H&&(!qe(d)||!qe(g))){let U,Z;const P=qn(g),$=qn(d);if(!qe(b)&&!isNaN(b)){const F=i.valueAsNumber||b&&+b;qe(P.value)||(U=F>P.value),qe($.value)||(Z=F<$.value)}else{const F=i.valueAsDate||new Date(b),W=_=>new Date(new Date().toDateString()+" "+_),N=i.type=="time",V=i.type=="week";Ft(P.value)&&b&&(U=N?W(b)>W(P.value):V?b>P.value:F>new Date(P.value)),Ft($.value)&&b&&(Z=N?W(b)<W($.value):V?b<$.value:F<new Date($.value))}if((U||Z)&&(G(!!U,P.message,$.message,Bt.max,Bt.min),!n))return E(x[v].message),x}if((u||c)&&!H&&(Ft(b)||o&&Array.isArray(b))){const U=qn(u),Z=qn(c),P=!qe(U.value)&&b.length>+U.value,$=!qe(Z.value)&&b.length<+Z.value;if((P||$)&&(G(P,U.message,Z.message),!n))return E(x[v].message),x}if(h&&!H&&Ft(b)){const{value:U,message:Z}=qn(h);if(qo(U)&&!b.match(U)&&(x[v]={type:Bt.pattern,message:Z,ref:i,...k(Bt.pattern,Z)},!n))return E(Z),x}if(p){if(kt(p)){const U=await p(b,t),Z=np(U,S);if(Z&&(x[v]={...Z,...k(Bt.validate,Z.message)},!n))return E(Z.message),x}else if(Me(p)){let U={};for(const Z in p){if(!Je(U)&&!n)break;const P=np(await p[Z](b,t),S,Z);P&&(U={...P,...k(Z,P.message)},E(P.message),n&&(x[v]=U))}if(!Je(U)&&(x[v]={ref:S,...U},!n))return x}}return E(!0),x};function TC(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=De(e)?r++:e[t[r++]];return e}function _C(e){for(const t in e)if(e.hasOwnProperty(t)&&!De(e[t]))return!1;return!0}function Re(e,t){const n=Array.isArray(t)?t:gs(t)?[t]:Gf(t),r=n.length===1?e:TC(e,n),o=n.length-1,i=n[o];return r&&delete r[i],o!==0&&(Me(r)&&Je(r)||Array.isArray(r)&&_C(r))&&Re(e,n.slice(0,-1)),e}var vs=()=>{let e=[];return{get observers(){return e},next:o=>{for(const i of e)i.next&&i.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(i=>i!==o)}}),unsubscribe:()=>{e=[]}}},ys=e=>qe(e)||!qf(e);function on(e,t){if(ys(e)||ys(t))return e===t;if(yn(e)&&yn(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n){const i=e[o];if(!r.includes(o))return!1;if(o!=="ref"){const a=t[o];if(yn(i)&&yn(a)||Me(i)&&Me(a)||Array.isArray(i)&&Array.isArray(a)?!on(i,a):i!==a)return!1}}return!0}var op=e=>e.type==="select-multiple",AC=e=>hs(e)||vr(e),xs=e=>Uo(e)&&e.isConnected,ip=e=>{for(const t in e)if(kt(e[t]))return!0;return!1};function Go(e,t={}){const n=Array.isArray(e);if(Me(e)||n)for(const r in e)Array.isArray(e[r])||Me(e[r])&&!ip(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Go(e[r],t[r])):qe(e[r])||(t[r]=!0);return t}function ap(e,t,n){const r=Array.isArray(e);if(Me(e)||r)for(const o in e)Array.isArray(e[o])||Me(e[o])&&!ip(e[o])?De(t)||ys(n[o])?n[o]=Array.isArray(e[o])?Go(e[o],[]):{...Go(e[o])}:ap(e[o],qe(t)?{}:t[o],n[o]):n[o]=!on(e[o],t[o]);return n}var xr=(e,t)=>ap(e,t,Go(t)),sp=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>De(e)?e:t?e===""?NaN:e&&+e:n&&Ft(e)?new Date(e):r?r(e):e;function ws(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return ms(t)?t.files:hs(t)?tp(e.refs).value:op(t)?[...t.selectedOptions].map(({value:n})=>n):vr(t)?Qf(e.refs).value:sp(De(t.value)?e.ref.value:t.value,e)}var PC=(e,t,n,r)=>{const o={};for(const i of e){const a=ae(t,i);a&&Oe(o,i,a._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}},wr=e=>De(e)?e:qo(e)?e.source:Me(e)?qo(e.value)?e.value.source:e.value:e;const lp="AsyncFunction";var NC=e=>!!e&&!!e.validate&&!!(kt(e.validate)&&e.validate.constructor.name===lp||Me(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===lp)),OC=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function cp(e,t,n){const r=ae(e,n);if(r||gs(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const i=o.join("."),a=ae(t,i),s=ae(e,i);if(a&&!Array.isArray(a)&&n!==i)return{name:n};if(s&&s.type)return{name:i,error:s};o.pop()}return{name:n}}var FC=(e,t,n,r,o)=>o.isOnAll?!1:!n&&o.isOnTouch?!(t||e):(n?r.isOnBlur:o.isOnBlur)?!e:(n?r.isOnChange:o.isOnChange)?e:!0,kC=(e,t)=>!Bo(ae(e,t)).length&&Re(e,t);const DC={mode:xt.onSubmit,reValidateMode:xt.onChange,shouldFocusError:!0};function MC(e={}){let t={...DC,...e},n={submitCount:0,isDirty:!1,isLoading:kt(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},o=Me(t.defaultValues)||Me(t.values)?lt(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:lt(o),a={action:!1,mount:!1,watch:!1},s={mount:new Set,unMount:new Set,array:new Set,watch:new Set},u,c=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},g={values:vs(),array:vs(),state:vs()},h=Yf(t.mode),p=Yf(t.reValidateMode),v=t.criteriaMode===xt.all,m=C=>A=>{clearTimeout(c),c=setTimeout(C,A)},y=async C=>{if(!t.disabled&&(d.isValid||C)){const A=t.resolver?Je((await I()).errors):await k(r,!0);A!==n.isValid&&g.state.next({isValid:A})}},w=(C,A)=>{!t.disabled&&(d.isValidating||d.validatingFields)&&((C||Array.from(s.mount)).forEach(R=>{R&&(A?Oe(n.validatingFields,R,A):Re(n.validatingFields,R))}),g.state.next({validatingFields:n.validatingFields,isValidating:!Je(n.validatingFields)}))},b=(C,A=[],R,te,J=!0,X=!0)=>{if(te&&R&&!t.disabled){if(a.action=!0,X&&Array.isArray(ae(r,C))){const j=R(ae(r,C),te.argA,te.argB);J&&Oe(r,C,j)}if(X&&Array.isArray(ae(n.errors,C))){const j=R(ae(n.errors,C),te.argA,te.argB);J&&Oe(n.errors,C,j),kC(n.errors,C)}if(d.touchedFields&&X&&Array.isArray(ae(n.touchedFields,C))){const j=R(ae(n.touchedFields,C),te.argA,te.argB);J&&Oe(n.touchedFields,C,j)}d.dirtyFields&&(n.dirtyFields=xr(o,i)),g.state.next({name:C,isDirty:U(C,A),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Oe(i,C,A)},S=(C,A)=>{Oe(n.errors,C,A),g.state.next({errors:n.errors})},E=C=>{n.errors=C,g.state.next({errors:n.errors,isValid:!1})},x=(C,A,R,te)=>{const J=ae(r,C);if(J){const X=ae(i,C,De(R)?ae(o,C):R);De(X)||te&&te.defaultChecked||A?Oe(i,C,A?X:ws(J._f)):$(C,X),a.mount&&y()}},O=(C,A,R,te,J)=>{let X=!1,j=!1;const Y={name:C};if(!t.disabled){const ye=!!(ae(r,C)&&ae(r,C)._f&&ae(r,C)._f.disabled);if(!R||te){d.isDirty&&(j=n.isDirty,n.isDirty=Y.isDirty=U(),X=j!==Y.isDirty);const be=ye||on(ae(o,C),A);j=!!(!ye&&ae(n.dirtyFields,C)),be||ye?Re(n.dirtyFields,C):Oe(n.dirtyFields,C,!0),Y.dirtyFields=n.dirtyFields,X=X||d.dirtyFields&&j!==!be}if(R){const be=ae(n.touchedFields,C);be||(Oe(n.touchedFields,C,R),Y.touchedFields=n.touchedFields,X=X||d.touchedFields&&be!==R)}X&&J&&g.state.next(Y)}return X?Y:{}},M=(C,A,R,te)=>{const J=ae(n.errors,C),X=d.isValid&&Ot(A)&&n.isValid!==A;if(t.delayError&&R?(u=m(()=>S(C,R)),u(t.delayError)):(clearTimeout(c),u=null,R?Oe(n.errors,C,R):Re(n.errors,C)),(R?!on(J,R):J)||!Je(te)||X){const j={...te,...X&&Ot(A)?{isValid:A}:{},errors:n.errors,name:C};n={...n,...j},g.state.next(j)}},I=async C=>{w(C,!0);const A=await t.resolver(i,t.context,PC(C||s.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return w(C),A},H=async C=>{const{errors:A}=await I(C);if(C)for(const R of C){const te=ae(A,R);te?Oe(n.errors,R,te):Re(n.errors,R)}else n.errors=A;return A},k=async(C,A,R={valid:!0})=>{for(const te in C){const J=C[te];if(J){const{_f:X,...j}=J;if(X){const Y=s.array.has(X.name),ye=J._f&&NC(J._f);ye&&d.validatingFields&&w([te],!0);const be=await rp(J,i,v,t.shouldUseNativeValidation&&!A,Y);if(ye&&d.validatingFields&&w([te]),be[X.name]&&(R.valid=!1,A))break;!A&&(ae(be,X.name)?Y?EC(n.errors,be,X.name):Oe(n.errors,X.name,be[X.name]):Re(n.errors,X.name))}!Je(j)&&await k(j,A,R)}}return R.valid},G=()=>{for(const C of s.unMount){const A=ae(r,C);A&&(A._f.refs?A._f.refs.every(R=>!xs(R)):!xs(A._f.ref))&&oe(C)}s.unMount=new Set},U=(C,A)=>!t.disabled&&(C&&A&&Oe(i,C,A),!on(B(),o)),Z=(C,A,R)=>SC(C,s,{...a.mount?i:De(A)?o:Ft(C)?{[C]:A}:A},R,A),P=C=>Bo(ae(a.mount?i:o,C,t.shouldUnregister?ae(o,C,[]):[])),$=(C,A,R={})=>{const te=ae(r,C);let J=A;if(te){const X=te._f;X&&(!X.disabled&&Oe(i,C,sp(A,X)),J=Uo(X.ref)&&qe(A)?"":A,op(X.ref)?[...X.ref.options].forEach(j=>j.selected=J.includes(j.value)):X.refs?vr(X.ref)?X.refs.length>1?X.refs.forEach(j=>(!j.defaultChecked||!j.disabled)&&(j.checked=Array.isArray(J)?!!J.find(Y=>Y===j.value):J===j.value)):X.refs[0]&&(X.refs[0].checked=!!J):X.refs.forEach(j=>j.checked=j.value===J):ms(X.ref)?X.ref.value="":(X.ref.value=J,X.ref.type||g.values.next({name:C,values:{...i}})))}(R.shouldDirty||R.shouldTouch)&&O(C,J,R.shouldTouch,R.shouldDirty,!0),R.shouldValidate&&_(C)},F=(C,A,R)=>{for(const te in A){const J=A[te],X=`${C}.${te}`,j=ae(r,X);(s.array.has(C)||Me(J)||j&&!j._f)&&!yn(J)?F(X,J,R):$(X,J,R)}},W=(C,A,R={})=>{const te=ae(r,C),J=s.array.has(C),X=lt(A);Oe(i,C,X),J?(g.array.next({name:C,values:{...i}}),(d.isDirty||d.dirtyFields)&&R.shouldDirty&&g.state.next({name:C,dirtyFields:xr(o,i),isDirty:U(C,X)})):te&&!te._f&&!qe(X)?F(C,X,R):$(C,X,R),Xf(C,s)&&g.state.next({...n}),g.values.next({name:a.mount?C:void 0,values:{...i}})},N=async C=>{a.mount=!0;const A=C.target;let R=A.name,te=!0;const J=ae(r,R),X=()=>A.type?ws(J._f):mC(C),j=Y=>{te=Number.isNaN(Y)||yn(Y)&&isNaN(Y.getTime())||on(Y,ae(i,R,Y))};if(J){let Y,ye;const be=X(),Te=C.type===Kf.BLUR||C.type===Kf.FOCUS_OUT,Mt=!OC(J._f)&&!t.resolver&&!ae(n.errors,R)&&!J._f.deps||FC(Te,ae(n.touchedFields,R),n.isSubmitted,p,h),ct=Xf(R,s,Te);Oe(i,R,be),Te?(J._f.onBlur&&J._f.onBlur(C),u&&u(0)):J._f.onChange&&J._f.onChange(C);const Ve=O(R,be,Te,!1),Ht=!Je(Ve)||ct;if(!Te&&g.values.next({name:R,type:C.type,values:{...i}}),Mt)return d.isValid&&(t.mode==="onBlur"?Te&&y():y()),Ht&&g.state.next({name:R,...ct?{}:Ve});if(!Te&&ct&&g.state.next({...n}),t.resolver){const{errors:Ut}=await I([R]);if(j(be),te){const Wt=cp(n.errors,r,R),Ce=cp(Ut,r,Wt.name||R);Y=Ce.error,R=Ce.name,ye=Je(Ut)}}else w([R],!0),Y=(await rp(J,i,v,t.shouldUseNativeValidation))[R],w([R]),j(be),te&&(Y?ye=!1:d.isValid&&(ye=await k(r,!0)));te&&(J._f.deps&&_(J._f.deps),M(R,ye,Y,Ve))}},V=(C,A)=>{if(ae(n.errors,A)&&C.focus)return C.focus(),1},_=async(C,A={})=>{let R,te;const J=Ho(C);if(t.resolver){const X=await H(De(C)?C:J);R=Je(X),te=C?!J.some(j=>ae(X,j)):R}else C?(te=(await Promise.all(J.map(async X=>{const j=ae(r,X);return await k(j&&j._f?{[X]:j}:j)}))).every(Boolean),!(!te&&!n.isValid)&&y()):te=R=await k(r);return g.state.next({...!Ft(C)||d.isValid&&R!==n.isValid?{}:{name:C},...t.resolver||!C?{isValid:R}:{},errors:n.errors}),A.shouldFocus&&!te&&yr(r,V,C?J:s.mount),te},B=C=>{const A={...a.mount?i:o};return De(C)?A:Ft(C)?ae(A,C):C.map(R=>ae(A,R))},Q=(C,A)=>({invalid:!!ae((A||n).errors,C),isDirty:!!ae((A||n).dirtyFields,C),error:ae((A||n).errors,C),isValidating:!!ae(n.validatingFields,C),isTouched:!!ae((A||n).touchedFields,C)}),ne=C=>{C&&Ho(C).forEach(A=>Re(n.errors,A)),g.state.next({errors:C?n.errors:{}})},ee=(C,A,R)=>{const te=(ae(r,C,{_f:{}})._f||{}).ref,J=ae(n.errors,C)||{},{ref:X,message:j,type:Y,...ye}=J;Oe(n.errors,C,{...ye,...A,ref:te}),g.state.next({name:C,errors:n.errors,isValid:!1}),R&&R.shouldFocus&&te&&te.focus&&te.focus()},ce=(C,A)=>kt(C)?g.values.subscribe({next:R=>C(Z(void 0,A),R)}):Z(C,A,!0),oe=(C,A={})=>{for(const R of C?Ho(C):s.mount)s.mount.delete(R),s.array.delete(R),A.keepValue||(Re(r,R),Re(i,R)),!A.keepError&&Re(n.errors,R),!A.keepDirty&&Re(n.dirtyFields,R),!A.keepTouched&&Re(n.touchedFields,R),!A.keepIsValidating&&Re(n.validatingFields,R),!t.shouldUnregister&&!A.keepDefaultValue&&Re(o,R);g.values.next({values:{...i}}),g.state.next({...n,...A.keepDirty?{isDirty:U()}:{}}),!A.keepIsValid&&y()},ie=({disabled:C,name:A,field:R,fields:te,value:J})=>{if(Ot(C)&&a.mount||C){const X=C?void 0:De(J)?ws(R?R._f:ae(te,A)._f):J;(C||!C&&!De(X))&&Oe(i,A,X),O(A,X,!1,!1,!0)}},de=(C,A={})=>{let R=ae(r,C);const te=Ot(A.disabled)||Ot(t.disabled);return Oe(r,C,{...R||{},_f:{...R&&R._f?R._f:{ref:{name:C}},name:C,mount:!0,...A}}),s.mount.add(C),R?ie({field:R,disabled:Ot(A.disabled)?A.disabled:t.disabled,name:C,value:A.value}):x(C,!0,A.value),{...te?{disabled:A.disabled||t.disabled}:{},...t.progressive?{required:!!A.required,min:wr(A.min),max:wr(A.max),minLength:wr(A.minLength),maxLength:wr(A.maxLength),pattern:wr(A.pattern)}:{},name:C,onChange:N,onBlur:N,ref:J=>{if(J){de(C,A),R=ae(r,C);const X=De(J.value)&&J.querySelectorAll&&J.querySelectorAll("input,select,textarea")[0]||J,j=AC(X),Y=R._f.refs||[];if(j?Y.find(ye=>ye===X):X===R._f.ref)return;Oe(r,C,{_f:{...R._f,...j?{refs:[...Y.filter(xs),X,...Array.isArray(ae(o,C))?[{}]:[]],ref:{type:X.type,name:C}}:{ref:X}}}),x(C,!1,void 0,X)}else R=ae(r,C,{}),R._f&&(R._f.mount=!1),(t.shouldUnregister||A.shouldUnregister)&&!(vC(s.array,C)&&a.action)&&s.unMount.add(C)}}},ue=()=>t.shouldFocusError&&yr(r,V,s.mount),le=C=>{Ot(C)&&(g.state.next({disabled:C}),yr(r,(A,R)=>{const te=ae(r,R);te&&(A.disabled=te._f.disabled||C,Array.isArray(te._f.refs)&&te._f.refs.forEach(J=>{J.disabled=te._f.disabled||C}))},0,!1))},Se=(C,A)=>async R=>{let te;if(R&&(R.preventDefault&&R.preventDefault(),R.persist&&R.persist()),t.disabled){A&&await A({...n.errors},R);return}let J=lt(i);if(g.state.next({isSubmitting:!0}),t.resolver){const{errors:X,values:j}=await I();n.errors=X,J=j}else await k(r);if(Re(n.errors,"root"),Je(n.errors)){g.state.next({errors:{}});try{await C(J,R)}catch(X){te=X}}else A&&await A({...n.errors},R),ue(),setTimeout(ue);if(g.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Je(n.errors)&&!te,submitCount:n.submitCount+1,errors:n.errors}),te)throw te},K=(C,A={})=>{ae(r,C)&&(De(A.defaultValue)?W(C,lt(ae(o,C))):(W(C,A.defaultValue),Oe(o,C,lt(A.defaultValue))),A.keepTouched||Re(n.touchedFields,C),A.keepDirty||(Re(n.dirtyFields,C),n.isDirty=A.defaultValue?U(C,lt(ae(o,C))):U()),A.keepError||(Re(n.errors,C),d.isValid&&y()),g.state.next({...n}))},Ee=(C,A={})=>{const R=C?lt(C):o,te=lt(R),J=Je(C),X=J?o:te;if(A.keepDefaultValues||(o=R),!A.keepValues){if(A.keepDirtyValues){const j=new Set([...s.mount,...Object.keys(xr(o,i))]);for(const Y of Array.from(j))ae(n.dirtyFields,Y)?Oe(X,Y,ae(i,Y)):W(Y,ae(X,Y))}else{if(ps&&De(C))for(const j of s.mount){const Y=ae(r,j);if(Y&&Y._f){const ye=Array.isArray(Y._f.refs)?Y._f.refs[0]:Y._f.ref;if(Uo(ye)){const be=ye.closest("form");if(be){be.reset();break}}}}r={}}i=t.shouldUnregister?A.keepDefaultValues?lt(o):{}:lt(X),g.array.next({values:{...X}}),g.values.next({values:{...X}})}s={mount:A.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!d.isValid||!!A.keepIsValid||!!A.keepDirtyValues,a.watch=!!t.shouldUnregister,g.state.next({submitCount:A.keepSubmitCount?n.submitCount:0,isDirty:J?!1:A.keepDirty?n.isDirty:!!(A.keepDefaultValues&&!on(C,o)),isSubmitted:A.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:J?{}:A.keepDirtyValues?A.keepDefaultValues&&i?xr(o,i):n.dirtyFields:A.keepDefaultValues&&C?xr(o,C):A.keepDirty?n.dirtyFields:{},touchedFields:A.keepTouched?n.touchedFields:{},errors:A.keepErrors?n.errors:{},isSubmitSuccessful:A.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},He=(C,A)=>Ee(kt(C)?C(i):C,A);return{control:{register:de,unregister:oe,getFieldState:Q,handleSubmit:Se,setError:ee,_executeSchema:I,_getWatch:Z,_getDirty:U,_updateValid:y,_removeUnmounted:G,_updateFieldArray:b,_updateDisabledField:ie,_getFieldArray:P,_reset:Ee,_resetDefaultValues:()=>kt(t.defaultValues)&&t.defaultValues().then(C=>{He(C,t.resetOptions),g.state.next({isLoading:!1})}),_updateFormState:C=>{n={...n,...C}},_disableForm:le,_subjects:g,_proxyFormState:d,_setErrors:E,get _fields(){return r},get _formValues(){return i},get _state(){return a},set _state(C){a=C},get _defaultValues(){return o},get _names(){return s},set _names(C){s=C},get _formState(){return n},set _formState(C){n=C},get _options(){return t},set _options(C){t={...t,...C}}},trigger:_,register:de,handleSubmit:Se,watch:ce,setValue:W,getValues:B,reset:He,resetField:K,clearErrors:ne,unregister:oe,setError:ee,setFocus:(C,A={})=>{const R=ae(r,C),te=R&&R._f;if(te){const J=te.refs?te.refs[0]:te.ref;J.focus&&(J.focus(),A.shouldSelect&&kt(J.select)&&J.select())}},getFieldState:Q}}function $C(e={}){const t=T.useRef(),n=T.useRef(),[r,o]=T.useState({isDirty:!1,isValidating:!1,isLoading:kt(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:kt(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...MC(e),formState:r});const i=t.current.control;return i._options=e,bC({subject:i._subjects.state,next:a=>{wC(a,i._proxyFormState,i._updateFormState)&&o({...i._formState})}}),T.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),T.useEffect(()=>{if(i._proxyFormState.isDirty){const a=i._getDirty();a!==r.isDirty&&i._subjects.state.next({isDirty:a})}},[i,r.isDirty]),T.useEffect(()=>{e.values&&!on(e.values,n.current)?(i._reset(e.values,i._options.resetOptions),n.current=e.values,o(a=>({...a}))):i._resetDefaultValues()},[e.values,i]),T.useEffect(()=>{e.errors&&i._setErrors(e.errors)},[e.errors,i]),T.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),T.useEffect(()=>{e.shouldUnregister&&i._subjects.values.next({values:i._getWatch()})},[e.shouldUnregister,i]),T.useMemo(()=>({...t.current,formState:xC(r,i)}),[r,i])}const up=({className:e,children:t,content:n,side:r})=>{const[o,i]=T.useState(!1);return l.jsx(zn,{delayDuration:0,children:l.jsxs(Bn,{open:o,children:[l.jsx(Hn,{asChild:!0,children:l.jsx("button",{type:"button",className:ge("cursor-pointer",e),onClick:()=>i(!o),onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),onTouchStart:()=>i(!o),onKeyDown:a=>{a.preventDefault(),a.key==="Enter"&&i(!o)},children:t})}),l.jsx(hn,{side:r,className:n?"":"hidden",children:l.jsx("span",{className:"inline-block",children:n})})]})})},IC=(e,t)=>{const[n,r]=T.useState(e);return T.useEffect(()=>{const o=setTimeout(()=>{r(e)},t);return()=>{clearTimeout(o)}},[e,t]),n},LC=({apiBaseUrl:e="http://localhost:3002"})=>{var O,M;const[t,n]=T.useState([]),[r,o]=T.useState(!1),[i,a]=T.useState([]),[s,u]=T.useState(1),[c,d]=T.useState(1),[g,h]=T.useState(null),[p,v]=T.useState(""),m=IC(p,500),y=I=>{const H=I.match(/\d{6}/);if(!H)return{month:"",year:""};const k=H[0],G=k.substring(0,2),U=k.substring(2);return{month:G,year:U}},w=I=>I.map(k=>{let G=(k==null?void 0:k.month)||"",U=(k==null?void 0:k.year)||"";if((!G||!U)&&(k!=null&&k.file_name)){const Z=y(k.file_name);G=G||Z.month,U=U||Z.year}return{id:k==null?void 0:k.id,prefix:(k==null?void 0:k.prefix)||"",model:(k==null?void 0:k.model)||"",fileName:(k==null?void 0:k.file_name)||"",code:(k==null?void 0:k.stock_id)||"",month:G,year:U,content:(k==null?void 0:k.text_summary)||"",status:(k==null?void 0:k.status)||"",note:(k==null?void 0:k.note)||"",lastUpdate:k==null?void 0:k.updated_at,stock_id:k==null?void 0:k.stock_id}}),b=I=>{if(!(I!=null&&I.data))return[];const H=w(I==null?void 0:I.data);n(H),d(I.pagination.totalPages)},S=async(I=1,H=15)=>{h(I),o(!0);try{const k=await he.get(`${e}/api/latest-summaries`,{params:{page:I,limit:H,search:p}});(k==null?void 0:k.status)===200?b(k.data):console.error(k)}catch(k){console.error("Error fetching data:",k)}finally{h(null),o(!1)}};T.useEffect(()=>{m&&u(1),S(s)},[s,m]);const E=T.useMemo(()=>[{id:"code",header:"Mã",accessorKey:"code",cell:({row:H})=>l.jsx("span",{className:"flex flex-col",children:H.original.code})},{id:"month",header:"Tháng",accessorKey:"month",cell:({row:H})=>{const k=H.original.month,G=H.original.year;return l.jsx("span",{className:"flex flex-col",children:`${k.toString().padStart(2,"0")}/${G}`})}},{id:"content",header:"Nội dung",accessorKey:"content",cell:({row:H})=>{const k=H.getValue("content");return l.jsx("div",{className:"text-start truncate text-ellipsis overflow-hidden whitespace-nowrap max-w-[30dvw]",children:k})}},{id:"status",header:"Trạng thái",accessorKey:"status",cell:({row:H})=>{const G=H.original.status!=="unpublish";return l.jsx("span",{className:`inline-flex items-center rounded-full px-2 py-0 text-[10px] font-bold ${G?"bg-green-50 text-green-700 ring-1 ring-inset ring-green-600/20":"bg-gray-50 text-gray-600 ring-1 ring-inset ring-gray-500/20"}`,children:G?"PUBLISHED":"UNPUBLISHED"})}},{id:"note",header:"Ghi chú",accessorKey:"note",cell:({row:H})=>l.jsx(up,{content:l.jsx("div",{className:"font-medium text-[16px] max-w-[90dvw]",children:H.original.note}),children:l.jsx("div",{className:"text-start truncate text-ellipsis overflow-hidden whitespace-nowrap max-w-[20dvw]",children:H.original.note})})},{id:"last-update",header:"Cập nhật",accessorKey:"last-update",cell:({row:H})=>{const k=new Date(H.original.lastUpdate),G=k.getDate(),U=k.getMonth()+1,Z=`ngày ${G} tháng ${U}`;return l.jsx("span",{className:"flex flex-col",children:Z})}},{accessorKey:"actions",header:()=>l.jsx("div",{className:"font-medium text-right",children:"Hành động"}),cell:({row:H})=>{const[k,G]=T.useState(!1),[U,Z]=T.useState(!1),[P,$]=T.useState(!1),{handleSubmit:F,register:W,reset:N}=$C(),V=H.original.id,_=H.getValue("status"),B=H.getValue("content"),[Q,ne]=T.useState(!1),ee=async()=>{try{ne(!0);const oe=_==="unpublish"?"published":"unpublish",ie=await he.patch(`${e}/api/toggle-publish/${V}`,{id:V,typeAction:"update",status:_,idInput:V,stock_id:H.original.stock_id,prefix:H.original.prefix,model:H.original.model,summary_result:H.original.content,note:H.original.note});ie.status===200?n(de=>de.map(ue=>ue.id===V?{...ue,status:oe}:ue)):console.error("Failed to toggle publish status:",ie)}catch(oe){console.error("Error toggling publish status:",oe)}finally{ne(!1)}},ce=async oe=>{G(!0);try{const ie=await he.patch(`${e}/api/update-summary`,{note:oe.note,text_summary:oe.content,id:V});ie.status===200?(await S(s),Z(!1)):console.error("Failed to update summary:",ie)}catch(ie){console.error("Error updating summary:",ie)}return G(!1)};return l.jsxs("div",{className:"flex items-center justify-end gap-2",children:[l.jsx(we,{variant:"outline",size:"sm",onClick:()=>$(!0),className:"px-2 py-0.5 h-7",children:l.jsx(lh,{className:"h-4 w-4"})}),l.jsx(Rt,{open:P,onOpenChange:$,children:l.jsxs(St,{className:"max-w-3xl max-h-[80vh]",children:[l.jsx(Ct,{children:l.jsx(Et,{children:"Nội dung chi tiết"})}),l.jsx("div",{className:"mt-4 overflow-y-auto max-h-[60vh]",children:l.jsx("div",{className:"whitespace-pre-wrap text-[16px] leading-relaxed",children:B})})]})}),l.jsxs(Rt,{open:U,onOpenChange:oe=>{Z(oe),oe?N({content:H.original.content,note:H.original.note}):N()},children:[l.jsx(no,{asChild:!0,children:l.jsx(we,{variant:"outline",size:"sm",onClick:()=>Z(!0),className:"px-2 py-0.5 h-7",children:"Sửa"})}),l.jsx(St,{className:"rounded-lg sm:px-3 h-[calc(100dvh-200px)] min-w-[calc(100dvw-112px)]",children:l.jsxs(Ct,{className:"flex flex-col gap-3",children:[l.jsx(Et,{className:"max-sm:hidden text-center",children:"Sửa summary"}),l.jsxs("form",{className:"flex flex-col gap-3 h-full justify-between",onSubmit:F(ce),children:[l.jsxs("div",{className:"flex flex-col gap-2",children:[l.jsxs("div",{className:"flex flex-col items-start",children:[l.jsx("span",{children:"Nội dung:"}),l.jsx(ar,{placeholder:"Nội dung",className:"w-full input-scroll-bar",defaultValue:H.original.answer||"",rows:10,...W("content")})]}),l.jsxs("div",{className:"flex flex-col items-start",children:[l.jsx("span",{children:"Ghi chú:"}),l.jsx(ar,{placeholder:"Nội dung",className:"w-full input-scroll-bar",defaultValue:H.original.note||"",rows:1,...W("note")})]})]}),l.jsx("div",{className:"flex justify-end",children:l.jsx(we,{disabled:k,type:"submit",variant:"default",children:k?l.jsx($e,{className:"h-4 w-4 animate-spin"}):"Ok"})})]})]})})]}),l.jsx(we,{variant:"outline",size:"sm",onClick:ee,disabled:Q,className:"w-[70px] px-2 py-0.5 h-7",children:Q?l.jsx($e,{className:"h-4 w-4 animate-spin"}):_==="unpublish"?"Publish":"Unpublish"})]})}}],[]),x=Vs({data:t,columns:E,state:{columnFilters:i},enableRowSelection:!0,onColumnFiltersChange:a,getFilteredRowModel:fg(),getCoreRowModel:Rs()});return l.jsxs("div",{className:"space-y-4 s3-explr-container",children:[l.jsx("div",{className:"flex items-center space-x-4 s3-explr-toolbar",children:l.jsxs("div",{className:"relative max-w-sm",children:[l.jsx(en,{placeholder:"Tìm kiếm theo mã...",value:p,onChange:I=>v(I.target.value),className:"pr-8"}),p&&l.jsx(we,{variant:"ghost",size:"sm",className:"absolute right-1 top-1/2 -translate-y-1/2 h-6 w-6 p-0",onClick:()=>v(""),children:l.jsx(Di,{className:"h-4 w-4"})})]})}),l.jsx("div",{className:"rounded-md border s3-explr-table-container",children:l.jsxs(lo,{className:"s3-explr-table",children:[l.jsx(co,{className:"s3-explr-table-header",children:x.getHeaderGroups().map(I=>l.jsx(ht,{className:"hover:bg-transparent s3-explr-header-row",children:I.headers.map(H=>l.jsx(Tt,{className:"s3-explr-header-cell",children:H.isPlaceholder?null:Dr(H.column.columnDef.header,H.getContext())},H.id))},I.id))}),l.jsx(uo,{className:"s3-explr-table-body",children:r?l.jsx(ht,{children:l.jsx(Xe,{colSpan:E.length,className:"h-24 text-center",children:"Đang tải dữ liệu..."})}):(O=x.getRowModel().rows)!=null&&O.length?(M=x.getRowModel().rows)==null?void 0:M.map(I=>l.jsx(ht,{className:"h-12 s3-explr-row",children:I.getVisibleCells().map(H=>l.jsx(Xe,{className:"align-middle s3-explr-cell",children:Dr(H.column.columnDef.cell,H.getContext())},H.id))},I.id)):l.jsx(ht,{children:l.jsx(Xe,{colSpan:E.length,className:"h-24 text-center",children:"Không có kết quả."})})})]})}),l.jsx("div",{className:"mt-4",children:l.jsx(ro,{children:l.jsxs(oo,{children:[l.jsx(mt,{children:l.jsx(io,{onClick:()=>u(I=>Math.max(1,I-1)),className:s===1?"pointer-events-none opacity-50":"cursor-pointer"})}),Array.from({length:c},(I,H)=>H+1).filter(I=>I===1||I===c||Math.abs(I-s)<=1).map((I,H,k)=>l.jsxs(l.Fragment,{children:[H>0&&k[H-1]!==I-1&&l.jsx(mt,{children:l.jsx(so,{})},I+"..."),l.jsx(mt,{children:l.jsx(Mn,{onClick:()=>u(I),isActive:s===I,className:`cursor-pointer ${r?"pointer-events-none":""}`,children:g===I?l.jsx($e,{className:"h-4 w-4 animate-spin"}):I})},I)]})),l.jsx(mt,{children:l.jsx(ao,{onClick:()=>u(I=>Math.min(c,I+1)),className:s===c||g!==null?"pointer-events-none opacity-50":"cursor-pointer"})})]})})})]})},dp=10,RC=T.memo(({apiBaseUrl:e="http://localhost:3002"})=>{const[t,n]=T.useState(1),[r,o]=T.useState([]),[i,a]=T.useState({total:0,page:1,limit:dp,totalPages:1}),[s,u]=T.useState(!0),[c,d]=T.useState(null),[g,h]=T.useState(new Set),{toast:p}=So(),[v,m]=T.useState(!1),y=async x=>{try{d(x);const O=await he.get(`${e}/api/jobs`,{params:{page:x.toString(),limit:dp.toString()}});o(O.data.data),a(O.data.pagination)}catch{p({variant:"destructive",title:"Error",description:"Failed to fetch jobs. Please try again."})}finally{d(null),u(!1)}};T.useEffect(()=>{y(t)},[t,e]);const w=async x=>{h(O=>new Set(O).add(x.toString()));try{await he.post(`${e}/api/retry-job`,{jobId:x}),p({title:"Job Restarted",description:`Job ${x} has been successfully restarted.`}),y(t)}catch{p({variant:"destructive",title:"Retry Failed",description:`Failed to restart job ${x}. Please try again.`})}finally{h(O=>{const M=new Set(O);return M.delete(x.toString()),M})}},b=async()=>{m(!0),n(1),await y(1),m(!1)},S=x=>new Date(x).toLocaleString(),E=x=>{if(x=parseFloat(x),x<60)return`${x.toFixed(2)}s`;const O=Math.floor(x/60),M=(x%60).toFixed(0);return`${O}m ${M}s`};return l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[l.jsx(oh,{className:"w-8 h-8 text-primary"}),l.jsx("h2",{className:"text-3xl font-bold tracking-tight",children:"Job Management"}),l.jsx(we,{variant:"outline",size:"icon",onClick:b,disabled:v||s,className:"ml-2",children:l.jsx(dh,{className:`h-4 w-4 ${v?"animate-spin":""}`})})]}),l.jsx("div",{className:"rounded-md border",children:l.jsxs(lo,{children:[l.jsx(co,{children:l.jsxs(ht,{children:[l.jsx(Tt,{children:"ID"}),l.jsx(Tt,{children:"Tên Công Việc"}),l.jsx(Tt,{children:"Thời Gian Bắt Đầu"}),l.jsx(Tt,{children:"Thời Gian Cập Nhật"}),l.jsx(Tt,{children:"Thời Gian Thực Thi"}),l.jsx(Tt,{children:"Trạng Thái"}),l.jsx(Tt,{children:"Thao Tác"})]})}),l.jsx(uo,{children:s&&r.length===0?l.jsx(ht,{children:l.jsx(Xe,{colSpan:7,className:"text-center py-4",children:l.jsx($e,{className:"w-6 h-6 animate-spin mx-auto"})})}):r.map(x=>{var O,M;return l.jsxs(ht,{children:[l.jsx(Xe,{className:"!w-[100px]",children:x.id}),l.jsx(Xe,{className:"font-medium",children:(O=x.job_name)==null?void 0:O.replace("Upload file","Summary")}),l.jsx(Xe,{className:"!w-[200px]",children:S(x.created_at)}),l.jsx(Xe,{className:"!w-[200px]",children:S(x.updated_at)}),l.jsx(Xe,{className:"!w-[150px]",children:E(x.execution_time_seconds)}),l.jsx(Xe,{className:"!w-[200px]",children:l.jsx(up,{content:x.status==="fail"&&x.error?l.jsx("div",{className:"font-medium text-[16px] max-w-[90dvw]",children:x.error}):null,children:l.jsx("div",{className:`inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium truncate text-ellipsis overflow-hidden whitespace-nowrap max-w-[30dvw]
175
- ${x.status==="done"?"bg-green-100 text-green-800":x.status==="fail"?"bg-red-100 text-red-800":"bg-yellow-100 text-yellow-800"}`,children:x.status==="fail"?"FAILED":(M=x.status)==null?void 0:M.toUpperCase()})})}),l.jsx(Xe,{className:"!w-[200px]",children:x.status==="fail"?l.jsx(we,{variant:"outline",size:"sm",onClick:()=>w(x.id),disabled:g.has(x.id.toString()),className:"h-[32px]",children:g.has(x.id.toString())?l.jsxs(l.Fragment,{children:[l.jsx($e,{className:"mr-2 h-4 w-4 animate-spin"}),"Đang thử lại..."]}):"Thử Lại"}):l.jsx("div",{className:"h-[32px]"})})]},x.id)})})]})}),l.jsx("div",{className:"mt-4",children:l.jsx(ro,{children:l.jsxs(oo,{children:[l.jsx(mt,{children:l.jsx(io,{onClick:()=>n(x=>Math.max(1,x-1)),className:t===1?"pointer-events-none opacity-50":"cursor-pointer"})}),Array.from({length:i.totalPages},(x,O)=>O+1).filter(x=>x===1||x===i.totalPages||Math.abs(x-t)<=1).map((x,O,M)=>l.jsxs(l.Fragment,{children:[O>0&&M[O-1]!==x-1&&l.jsx(mt,{children:l.jsx(so,{})},x+"..."),l.jsx(mt,{children:l.jsx(Mn,{onClick:()=>n(x),isActive:t===x,className:`cursor-pointer ${c!==null?"pointer-events-none":""}`,children:c===x?l.jsx($e,{className:"h-4 w-4 animate-spin"}):x})},x)]})),l.jsx(mt,{children:l.jsx(ao,{onClick:()=>n(x=>Math.min(i.totalPages,x+1)),className:t===i.totalPages||c!==null?"pointer-events-none opacity-50":"cursor-pointer"})})]})})}),l.jsx(rd,{})]})});dt.Job=RC,dt.S3Explorer=gC,dt.Summary=LC,Object.defineProperty(dt,Symbol.toStringTag,{value:"Module"})});
170
+ */var as,Nf;function RC(){if(Nf)return as;Nf=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var a={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var u=Object.getOwnPropertyNames(a).map(function(d){return a[d]});if(u.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(d){c[d]=d}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return as=o()?Object.assign:function(i,a){for(var s,u=r(i),c,d=1;d<arguments.length;d++){s=Object(arguments[d]);for(var g in s)t.call(s,g)&&(u[g]=s[g]);if(e){c=e(s);for(var m=0;m<c.length;m++)n.call(s,c[m])&&(u[c[m]]=s[c[m]])}}return u},as}var ss,kf;function ls(){if(kf)return ss;kf=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ss=e,ss}var cs,Of;function Ff(){return Of||(Of=1,cs=Function.call.bind(Object.prototype.hasOwnProperty)),cs}var us,Df;function VC(){if(Df)return us;Df=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=ls(),n={},r=Ff();e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(i,a,s,u,c){if(process.env.NODE_ENV!=="production"){for(var d in i)if(r(i,d)){var g;try{if(typeof i[d]!="function"){var m=Error((u||"React class")+": "+s+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw m.name="Invariant Violation",m}g=i[d](a,d,u,s,null,t)}catch(v){g=v}if(g&&!(g instanceof Error)&&e((u||"React class")+": type specification of "+s+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof g+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),g instanceof Error&&!(g.message in n)){n[g.message]=!0;var f=c?c():"";e("Failed "+s+" type: "+g.message+(f??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},us=o,us}var ds,If;function jC(){if(If)return ds;If=1;var e=Pf(),t=RC(),n=ls(),r=Ff(),o=VC(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var u="Warning: "+s;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function a(){return null}return ds=function(s,u){var c=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function g(T){var B=T&&(c&&T[c]||T[d]);if(typeof B=="function")return B}var m="<<anonymous>>",f={array:b("array"),bigint:b("bigint"),bool:b("boolean"),func:b("function"),number:b("number"),object:b("object"),string:b("string"),symbol:b("symbol"),any:w(),arrayOf:C,element:E(),elementType:x(),instanceOf:O,node:D(),objectOf:$,oneOf:I,oneOfType:H,shape:U,exact:Z};function v(T,B){return T===B?T!==0||1/T===1/B:T!==T&&B!==B}function h(T,B){this.message=T,this.data=B&&typeof B=="object"?B:{},this.stack=""}h.prototype=Error.prototype;function y(T){if(process.env.NODE_ENV!=="production")var B={},Q=0;function re(ce,oe,ae,de,ue,le,Ce){if(de=de||m,le=le||ae,Ce!==n){if(u){var K=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw K.name="Invariant Violation",K}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var _e=de+":"+ae;!B[_e]&&Q<3&&(i("You are manually calling a React.PropTypes validation function for the `"+le+"` prop on `"+de+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),B[_e]=!0,Q++)}}return oe[ae]==null?ce?oe[ae]===null?new h("The "+ue+" `"+le+"` is marked as required "+("in `"+de+"`, but its value is `null`.")):new h("The "+ue+" `"+le+"` is marked as required in "+("`"+de+"`, but its value is `undefined`.")):null:T(oe,ae,de,ue,le)}var ee=re.bind(null,!1);return ee.isRequired=re.bind(null,!0),ee}function b(T){function B(Q,re,ee,ce,oe,ae){var de=Q[re],ue=F(de);if(ue!==T){var le=q(de);return new h("Invalid "+ce+" `"+oe+"` of type "+("`"+le+"` supplied to `"+ee+"`, expected ")+("`"+T+"`."),{expectedType:T})}return null}return y(B)}function w(){return y(a)}function C(T){function B(Q,re,ee,ce,oe){if(typeof T!="function")return new h("Property `"+oe+"` of component `"+ee+"` has invalid PropType notation inside arrayOf.");var ae=Q[re];if(!Array.isArray(ae)){var de=F(ae);return new h("Invalid "+ce+" `"+oe+"` of type "+("`"+de+"` supplied to `"+ee+"`, expected an array."))}for(var ue=0;ue<ae.length;ue++){var le=T(ae,ue,ee,ce,oe+"["+ue+"]",n);if(le instanceof Error)return le}return null}return y(B)}function E(){function T(B,Q,re,ee,ce){var oe=B[Q];if(!s(oe)){var ae=F(oe);return new h("Invalid "+ee+" `"+ce+"` of type "+("`"+ae+"` supplied to `"+re+"`, expected a single ReactElement."))}return null}return y(T)}function x(){function T(B,Q,re,ee,ce){var oe=B[Q];if(!e.isValidElementType(oe)){var ae=F(oe);return new h("Invalid "+ee+" `"+ce+"` of type "+("`"+ae+"` supplied to `"+re+"`, expected a single ReactElement type."))}return null}return y(T)}function O(T){function B(Q,re,ee,ce,oe){if(!(Q[re]instanceof T)){var ae=T.name||m,de=j(Q[re]);return new h("Invalid "+ce+" `"+oe+"` of type "+("`"+de+"` supplied to `"+ee+"`, expected ")+("instance of `"+ae+"`."))}return null}return y(B)}function I(T){if(!Array.isArray(T))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function B(Q,re,ee,ce,oe){for(var ae=Q[re],de=0;de<T.length;de++)if(v(ae,T[de]))return null;var ue=JSON.stringify(T,function(Ce,K){var _e=q(K);return _e==="symbol"?String(K):K});return new h("Invalid "+ce+" `"+oe+"` of value `"+String(ae)+"` "+("supplied to `"+ee+"`, expected one of "+ue+"."))}return y(B)}function $(T){function B(Q,re,ee,ce,oe){if(typeof T!="function")return new h("Property `"+oe+"` of component `"+ee+"` has invalid PropType notation inside objectOf.");var ae=Q[re],de=F(ae);if(de!=="object")return new h("Invalid "+ce+" `"+oe+"` of type "+("`"+de+"` supplied to `"+ee+"`, expected an object."));for(var ue in ae)if(r(ae,ue)){var le=T(ae,ue,ee,ce,oe+"."+ue,n);if(le instanceof Error)return le}return null}return y(B)}function H(T){if(!Array.isArray(T))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var B=0;B<T.length;B++){var Q=T[B];if(typeof Q!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+k(Q)+" at index "+B+"."),a}function re(ee,ce,oe,ae,de){for(var ue=[],le=0;le<T.length;le++){var Ce=T[le],K=Ce(ee,ce,oe,ae,de,n);if(K==null)return null;K.data&&r(K.data,"expectedType")&&ue.push(K.data.expectedType)}var _e=ue.length>0?", expected one of type ["+ue.join(", ")+"]":"";return new h("Invalid "+ae+" `"+de+"` supplied to "+("`"+oe+"`"+_e+"."))}return y(re)}function D(){function T(B,Q,re,ee,ce){return N(B[Q])?null:new h("Invalid "+ee+" `"+ce+"` supplied to "+("`"+re+"`, expected a ReactNode."))}return y(T)}function G(T,B,Q,re,ee){return new h((T||"React class")+": "+B+" type `"+Q+"."+re+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ee+"`.")}function U(T){function B(Q,re,ee,ce,oe){var ae=Q[re],de=F(ae);if(de!=="object")return new h("Invalid "+ce+" `"+oe+"` of type `"+de+"` "+("supplied to `"+ee+"`, expected `object`."));for(var ue in T){var le=T[ue];if(typeof le!="function")return G(ee,ce,oe,ue,q(le));var Ce=le(ae,ue,ee,ce,oe+"."+ue,n);if(Ce)return Ce}return null}return y(B)}function Z(T){function B(Q,re,ee,ce,oe){var ae=Q[re],de=F(ae);if(de!=="object")return new h("Invalid "+ce+" `"+oe+"` of type `"+de+"` "+("supplied to `"+ee+"`, expected `object`."));var ue=t({},Q[re],T);for(var le in ue){var Ce=T[le];if(r(T,le)&&typeof Ce!="function")return G(ee,ce,oe,le,q(Ce));if(!Ce)return new h("Invalid "+ce+" `"+oe+"` key `"+le+"` supplied to `"+ee+"`.\nBad object: "+JSON.stringify(Q[re],null," ")+`
171
+ Valid keys: `+JSON.stringify(Object.keys(T),null," "));var K=Ce(ae,le,ee,ce,oe+"."+le,n);if(K)return K}return null}return y(B)}function N(T){switch(typeof T){case"number":case"string":case"undefined":return!0;case"boolean":return!T;case"object":if(Array.isArray(T))return T.every(N);if(T===null||s(T))return!0;var B=g(T);if(B){var Q=B.call(T),re;if(B!==T.entries){for(;!(re=Q.next()).done;)if(!N(re.value))return!1}else for(;!(re=Q.next()).done;){var ee=re.value;if(ee&&!N(ee[1]))return!1}}else return!1;return!0;default:return!1}}function M(T,B){return T==="symbol"?!0:B?B["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&B instanceof Symbol:!1}function F(T){var B=typeof T;return Array.isArray(T)?"array":T instanceof RegExp?"object":M(B,T)?"symbol":B}function q(T){if(typeof T>"u"||T===null)return""+T;var B=F(T);if(B==="object"){if(T instanceof Date)return"date";if(T instanceof RegExp)return"regexp"}return B}function k(T){var B=q(T);switch(B){case"array":case"object":return"an "+B;case"boolean":case"date":case"regexp":return"a "+B;default:return B}}function j(T){return!T.constructor||!T.constructor.name?m:T.constructor.name}return f.checkPropTypes=o,f.resetWarningCache=o.resetWarningCache,f.PropTypes=f,f},ds}var fs,Mf;function zC(){if(Mf)return fs;Mf=1;var e=ls();function t(){}function n(){}return n.resetWarningCache=t,fs=function(){function r(a,s,u,c,d,g){if(g!==e){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},fs}if(process.env.NODE_ENV!=="production"){var BC=Pf(),HC=!0;is.exports=jC()(BC.isElement,HC)}else is.exports=zC()();var UC=is.exports;const ke=Yr(UC),WC=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function qn(e,t,n){const r=qC(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&$f(r,"path",i),$f(r,"relativePath",i),r}function qC(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=WC.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function $f(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const GC=[".DS_Store","Thumbs.db"];function KC(e){return pn(this,void 0,void 0,function*(){return Ho(e)&&YC(e.dataTransfer)?QC(e.dataTransfer,e.type):XC(e)?JC(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?ZC(e):[]})}function YC(e){return Ho(e)}function XC(e){return Ho(e)&&Ho(e.target)}function Ho(e){return typeof e=="object"&&e!==null}function JC(e){return ps(e.target.files).map(t=>qn(t))}function ZC(e){return pn(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>qn(n))})}function QC(e,t){return pn(this,void 0,void 0,function*(){if(e.items){const n=ps(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(eS));return Lf(Rf(r))}return Lf(ps(e.files).map(n=>qn(n)))})}function Lf(e){return e.filter(t=>GC.indexOf(t.name)===-1)}function ps(e){if(e===null)return[];const t=[];for(let n=0;n<e.length;n++){const r=e[n];t.push(r)}return t}function eS(e){if(typeof e.webkitGetAsEntry!="function")return Vf(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?jf(t):Vf(e,t)}function Rf(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?Rf(n):[n]],[])}function Vf(e,t){return pn(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const i=yield e.getAsFileSystemHandle();if(i===null)throw new Error(`${e} is not a File`);if(i!==void 0){const a=yield i.getFile();return a.handle=i,qn(a)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return qn(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function tS(e){return pn(this,void 0,void 0,function*(){return e.isDirectory?jf(e):nS(e)})}function jf(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(a=>pn(this,void 0,void 0,function*(){if(a.length){const s=Promise.all(a.map(tS));o.push(s),i()}else try{const s=yield Promise.all(o);n(s)}catch(s){r(s)}}),a=>{r(a)})}i()})}function nS(e){return pn(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=qn(r,e.fullPath);t(o)},r=>{n(r)})})})}var gs=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var r=e.name||"",o=(e.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some(function(a){var s=a.trim().toLowerCase();return s.charAt(0)==="."?r.toLowerCase().endsWith(s):s.endsWith("/*")?i===s.replace(/\/.*$/,""):o===s})}return!0};function zf(e){return iS(e)||oS(e)||Wf(e)||rS()}function rS(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
172
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oS(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function iS(e){if(Array.isArray(e))return ms(e)}function Bf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Hf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Bf(Object(n),!0).forEach(function(r){Uf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bf(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Uf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xr(e,t){return lS(e)||sS(e,t)||Wf(e,t)||aS()}function aS(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
173
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Wf(e,t){if(e){if(typeof e=="string")return ms(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ms(e,t)}}function ms(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function sS(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,a,s;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(u){i=!0,s=u}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function lS(e){if(Array.isArray(e))return e}var cS=typeof gs=="function"?gs:gs.default,uS="file-invalid-type",dS="file-too-large",fS="file-too-small",pS="too-many-files",gS=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=t.split(","),r=n.length>1?"one of ".concat(n.join(", ")):n[0];return{code:uS,message:"File type must be ".concat(r)}},qf=function(t){return{code:dS,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},Gf=function(t){return{code:fS,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},mS={code:pS,message:"Too many files"};function Kf(e,t){var n=e.type==="application/x-moz-file"||cS(e,t);return[n,n?null:gS(t)]}function Yf(e,t,n){if(xn(e.size))if(xn(t)&&xn(n)){if(e.size>n)return[!1,qf(n)];if(e.size<t)return[!1,Gf(t)]}else{if(xn(t)&&e.size<t)return[!1,Gf(t)];if(xn(n)&&e.size>n)return[!1,qf(n)]}return[!0,null]}function xn(e){return e!=null}function hS(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,a=e.maxFiles,s=e.validator;return!i&&t.length>1||i&&a>=1&&t.length>a?!1:t.every(function(u){var c=Kf(u,n),d=xr(c,1),g=d[0],m=Yf(u,r,o),f=xr(m,1),v=f[0],h=s?s(u):null;return g&&v&&!h})}function Uo(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Wo(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function Xf(e){e.preventDefault()}function vS(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function yS(e){return e.indexOf("Edge/")!==-1}function xS(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return vS(e)||yS(e)}function Ot(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return t.some(function(s){return!Uo(r)&&s&&s.apply(void 0,[r].concat(i)),Uo(r)})}}function bS(){return"showOpenFilePicker"in window}function wS(e){if(xn(e)){var t=Object.entries(e).filter(function(n){var r=xr(n,2),o=r[0],i=r[1],a=!0;return Jf(o)||(console.warn('Skipped "'.concat(o,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),a=!1),(!Array.isArray(i)||!i.every(Zf))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var o=xr(r,2),i=o[0],a=o[1];return Hf(Hf({},n),{},Uf({},i,a))},{});return[{description:"Files",accept:t}]}return e}function CS(e){if(xn(e))return Object.entries(e).reduce(function(t,n){var r=xr(n,2),o=r[0],i=r[1];return[].concat(zf(t),[o],zf(i))},[]).filter(function(t){return Jf(t)||Zf(t)}).join(",")}function SS(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function ES(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function Jf(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function Zf(e){return/^.*\.[\w]+$/.test(e)}var _S=["children"],TS=["open"],AS=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],PS=["refKey","onChange","onClick"];function NS(e){return FS(e)||OS(e)||Qf(e)||kS()}function kS(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
174
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function OS(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function FS(e){if(Array.isArray(e))return vs(e)}function hs(e,t){return MS(e)||IS(e,t)||Qf(e,t)||DS()}function DS(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
175
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qf(e,t){if(e){if(typeof e=="string")return vs(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vs(e,t)}}function vs(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function IS(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,a,s;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(u){i=!0,s=u}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function MS(e){if(Array.isArray(e))return e}function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function De(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ep(Object(n),!0).forEach(function(r){ys(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ep(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ys(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qo(e,t){if(e==null)return{};var n=$S(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $S(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var xs=_.forwardRef(function(e,t){var n=e.children,r=qo(e,_S),o=np(r),i=o.open,a=qo(o,TS);return _.useImperativeHandle(t,function(){return{open:i}},[i]),_.createElement(_.Fragment,null,n(De(De({},a),{},{open:i})))});xs.displayName="Dropzone";var tp={disabled:!1,getFilesFromEvent:KC,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};xs.defaultProps=tp,xs.propTypes={children:ke.func,accept:ke.objectOf(ke.arrayOf(ke.string)),multiple:ke.bool,preventDropOnDocument:ke.bool,noClick:ke.bool,noKeyboard:ke.bool,noDrag:ke.bool,noDragEventsBubbling:ke.bool,minSize:ke.number,maxSize:ke.number,maxFiles:ke.number,disabled:ke.bool,getFilesFromEvent:ke.func,onFileDialogCancel:ke.func,onFileDialogOpen:ke.func,useFsAccessApi:ke.bool,autoFocus:ke.bool,onDragEnter:ke.func,onDragLeave:ke.func,onDragOver:ke.func,onDrop:ke.func,onDropAccepted:ke.func,onDropRejected:ke.func,onError:ke.func,validator:ke.func};var bs={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function np(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=De(De({},tp),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,a=t.minSize,s=t.multiple,u=t.maxFiles,c=t.onDragEnter,d=t.onDragLeave,g=t.onDragOver,m=t.onDrop,f=t.onDropAccepted,v=t.onDropRejected,h=t.onFileDialogCancel,y=t.onFileDialogOpen,b=t.useFsAccessApi,w=t.autoFocus,C=t.preventDropOnDocument,E=t.noClick,x=t.noKeyboard,O=t.noDrag,I=t.noDragEventsBubbling,$=t.onError,H=t.validator,D=_.useMemo(function(){return CS(n)},[n]),G=_.useMemo(function(){return wS(n)},[n]),U=_.useMemo(function(){return typeof y=="function"?y:rp},[y]),Z=_.useMemo(function(){return typeof h=="function"?h:rp},[h]),N=_.useRef(null),M=_.useRef(null),F=_.useReducer(LS,bs),q=hs(F,2),k=q[0],j=q[1],T=k.isFocused,B=k.isFileDialogActive,Q=_.useRef(typeof window<"u"&&window.isSecureContext&&b&&bS()),re=function(){!Q.current&&B&&setTimeout(function(){if(M.current){var Y=M.current.files;Y.length||(j({type:"closeDialog"}),Z())}},300)};_.useEffect(function(){return window.addEventListener("focus",re,!1),function(){window.removeEventListener("focus",re,!1)}},[M,B,Z,Q]);var ee=_.useRef([]),ce=function(Y){N.current&&N.current.contains(Y.target)||(Y.preventDefault(),ee.current=[])};_.useEffect(function(){return C&&(document.addEventListener("dragover",Xf,!1),document.addEventListener("drop",ce,!1)),function(){C&&(document.removeEventListener("dragover",Xf),document.removeEventListener("drop",ce))}},[N,C]),_.useEffect(function(){return!r&&w&&N.current&&N.current.focus(),function(){}},[N,w,r]);var oe=_.useCallback(function(z){$?$(z):console.error(z)},[$]),ae=_.useCallback(function(z){z.preventDefault(),z.persist(),V(z),ee.current=[].concat(NS(ee.current),[z.target]),Wo(z)&&Promise.resolve(o(z)).then(function(Y){if(!(Uo(z)&&!I)){var ye=Y.length,we=ye>0&&hS({files:Y,accept:D,minSize:a,maxSize:i,multiple:s,maxFiles:u,validator:H}),Te=ye>0&&!we;j({isDragAccept:we,isDragReject:Te,isDragActive:!0,type:"setDraggedFiles"}),c&&c(z)}}).catch(function(Y){return oe(Y)})},[o,c,oe,I,D,a,i,s,u,H]),de=_.useCallback(function(z){z.preventDefault(),z.persist(),V(z);var Y=Wo(z);if(Y&&z.dataTransfer)try{z.dataTransfer.dropEffect="copy"}catch{}return Y&&g&&g(z),!1},[g,I]),ue=_.useCallback(function(z){z.preventDefault(),z.persist(),V(z);var Y=ee.current.filter(function(we){return N.current&&N.current.contains(we)}),ye=Y.indexOf(z.target);ye!==-1&&Y.splice(ye,1),ee.current=Y,!(Y.length>0)&&(j({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Wo(z)&&d&&d(z))},[N,d,I]),le=_.useCallback(function(z,Y){var ye=[],we=[];z.forEach(function(Te){var $t=Kf(Te,D),ut=hs($t,2),je=ut[0],Wt=ut[1],qt=Yf(Te,a,i),Gt=hs(qt,2),Se=Gt[0],ln=Gt[1],Yn=H?H(Te):null;if(je&&Se&&!Yn)ye.push(Te);else{var dt=[Wt,ln];Yn&&(dt=dt.concat(Yn)),we.push({file:Te,errors:dt.filter(function(wn){return wn})})}}),(!s&&ye.length>1||s&&u>=1&&ye.length>u)&&(ye.forEach(function(Te){we.push({file:Te,errors:[mS]})}),ye.splice(0)),j({acceptedFiles:ye,fileRejections:we,isDragReject:we.length>0,type:"setFiles"}),m&&m(ye,we,Y),we.length>0&&v&&v(we,Y),ye.length>0&&f&&f(ye,Y)},[j,s,D,a,i,u,m,f,v,H]),Ce=_.useCallback(function(z){z.preventDefault(),z.persist(),V(z),ee.current=[],Wo(z)&&Promise.resolve(o(z)).then(function(Y){Uo(z)&&!I||le(Y,z)}).catch(function(Y){return oe(Y)}),j({type:"reset"})},[o,le,oe,I]),K=_.useCallback(function(){if(Q.current){j({type:"openDialog"}),U();var z={multiple:s,types:G};window.showOpenFilePicker(z).then(function(Y){return o(Y)}).then(function(Y){le(Y,null),j({type:"closeDialog"})}).catch(function(Y){SS(Y)?(Z(Y),j({type:"closeDialog"})):ES(Y)?(Q.current=!1,M.current?(M.current.value=null,M.current.click()):oe(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):oe(Y)});return}M.current&&(j({type:"openDialog"}),U(),M.current.value=null,M.current.click())},[j,U,Z,b,le,oe,G,s]),_e=_.useCallback(function(z){!N.current||!N.current.isEqualNode(z.target)||(z.key===" "||z.key==="Enter"||z.keyCode===32||z.keyCode===13)&&(z.preventDefault(),K())},[N,K]),Ue=_.useCallback(function(){j({type:"focus"})},[]),We=_.useCallback(function(){j({type:"blur"})},[]),Mt=_.useCallback(function(){E||(xS()?setTimeout(K,0):K())},[E,K]),at=function(Y){return r?null:Y},S=function(Y){return x?null:at(Y)},A=function(Y){return O?null:at(Y)},V=function(Y){I&&Y.stopPropagation()},ne=_.useMemo(function(){return function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Y=z.refKey,ye=Y===void 0?"ref":Y,we=z.role,Te=z.onKeyDown,$t=z.onFocus,ut=z.onBlur,je=z.onClick,Wt=z.onDragEnter,qt=z.onDragOver,Gt=z.onDragLeave,Se=z.onDrop,ln=qo(z,AS);return De(De(ys({onKeyDown:S(Ot(Te,_e)),onFocus:S(Ot($t,Ue)),onBlur:S(Ot(ut,We)),onClick:at(Ot(je,Mt)),onDragEnter:A(Ot(Wt,ae)),onDragOver:A(Ot(qt,de)),onDragLeave:A(Ot(Gt,ue)),onDrop:A(Ot(Se,Ce)),role:typeof we=="string"&&we!==""?we:"presentation"},ye,N),!r&&!x?{tabIndex:0}:{}),ln)}},[N,_e,Ue,We,Mt,ae,de,ue,Ce,x,O,r]),J=_.useCallback(function(z){z.stopPropagation()},[]),X=_.useMemo(function(){return function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Y=z.refKey,ye=Y===void 0?"ref":Y,we=z.onChange,Te=z.onClick,$t=qo(z,PS),ut=ys({accept:D,multiple:s,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:at(Ot(we,Ce)),onClick:at(Ot(Te,J)),tabIndex:-1},ye,M);return De(De({},ut),$t)}},[M,n,s,Ce,r]);return De(De({},k),{},{isFocused:T&&!r,getRootProps:ne,getInputProps:X,rootRef:N,inputRef:M,open:at(K)})}function LS(e,t){switch(t.type){case"focus":return De(De({},e),{},{isFocused:!0});case"blur":return De(De({},e),{},{isFocused:!1});case"openDialog":return De(De({},bs),{},{isFileDialogActive:!0});case"closeDialog":return De(De({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return De(De({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return De(De({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return De({},bs);default:return e}}function rp(){}const RS=({onFilesSelected:e,children:t})=>{const[n,r]=_.useState(!1),{getRootProps:o,getInputProps:i}=np({noClick:!0,onDrop:a=>{if(a&&a.length>0)if(a[0].path.split("/").length>2){const u=a.map(c=>{const g=(c.path||c.relativePath||"").split("/").slice(1).join("/");return(!c.webkitRelativePath||c.webkitRelativePath==="")&&Object.defineProperty(c,"webkitRelativePath",{writable:!0,value:g,enumerable:!0,configurable:!0}),c});e(u,"folder")}else e(a,"files");r(!1)},onDragOver:a=>{a.preventDefault(),n||r(!0)},multiple:!0});return _.useEffect(()=>{const a=s=>{s.clientX===0&&s.clientY===0&&r(!1)};return document.addEventListener("dragleave",a),()=>{document.removeEventListener("dragleave",a)}},[]),l.jsxs("div",{...o(),className:"transition-opacity min-h-[600px]",children:[n?l.jsx("div",{className:"flex flex-col items-center justify-center p-4 border-2 border-dashed border-gray-300 rounded-lg bg-gray-50 h-screen"}):t,l.jsx("input",{...i()})]})},VS=({openDialogRename:e,setOpenDialogRename:t,apiBaseUrl:n,setFileToMove:r,fileToMove:o,refreshFiles:i,ignoreCache:a})=>{var w;const[s,u]=_.useState({}),[c,d]=_.useState(!1),[g,m]=_.useState(!1),[f,v]=_.useState(""),{toast:h}=Po();_.useEffect(()=>{e&&y(f)},[f,e]);const y=async C=>{try{m(!0);const E=await he.get(`${n}/api/list-s3-folders?prefix=${C}`);u(E==null?void 0:E.data)}catch{h({title:"Error",description:"Unable to load S3 folder list",variant:"destructive"})}finally{m(!1)}},b=async()=>{d(!0);try{const C=o.key,E=C.endsWith("/")?C:`${C}/`,x=f.endsWith("/")?f:`${f}/`;if(E===x||C===f){h({title:"Lỗi",description:"Không thể di chuyển file đến cùng vị trí",variant:"destructive"}),d(!1);return}await he.post(`${n}/api/move`,{oldPath:C,newPath:f}),a.current=!0,await i(),h({title:"Đã di chuyển",description:`Đã di chuyển thành công "${o.name}" đến "${f}"`}),t(!1),r(null),v("")}catch(C){console.error("Error renaming item:",C),h({title:"Lỗi",description:"Không thể đổi tên",variant:"destructive"})}finally{d(!1)}};return l.jsx(jt,{open:e,onOpenChange:C=>{C||(t(!1),r(null),v(""))},children:l.jsxs(Et,{className:"max-h-[700px] pb-3 px-1 s3-explr-input-group max-w-5xl w-[90%] p-6 bg-white rounded-lg shadow-lg",children:[l.jsxs(_t,{className:"mb-4 w-full h-full",children:[l.jsx("nav",{className:"mb-4",children:l.jsxs("ul",{className:"flex items-center space-x-2 text-sm text-gray-600",children:[l.jsx("li",{className:"cursor-pointer hover:text-blue-600 transition-colors",onClick:()=>v(""),children:"Root"}),f.split("/").map((C,E,x)=>l.jsx("li",{className:"cursor-pointer hover:text-blue-600 transition-colors",onClick:()=>v(C==="Root"?"":x.slice(0,E+1).join("/")+"/"),children:C},E))]})}),l.jsxs(Tt,{className:"text-xl font-semibold text-gray-800",children:["Di chuyển"," ",l.jsxs("span",{className:"text-sm text-gray-500",children:["( file Hoặc folder sẽ được di chuyển đến thư mục"," ",f===""?"Root":f," )"]})]}),l.jsx(Mn,{className:"text-gray-600 w-full h-[50dvh] max-h-[500px] overflow-hidden overflow-y-auto",children:g?l.jsx("div",{className:"flex justify-center items-center py-4",children:l.jsx("div",{className:"loader ease-linear rounded-full border-4 border-t-4 border-gray-200 h-12 w-12"})}):l.jsx("ul",{className:"space-y-2",children:(w=Object.keys(s))==null?void 0:w.map(C=>l.jsx("li",{className:"cursor-pointer hover:bg-gray-100 p-2 rounded transition-colors",onClick:()=>v(C),children:C},C))})})]}),l.jsxs(mn,{className:"flex justify-end space-x-2",children:[l.jsx(be,{variant:"outline",onClick:()=>t(!1),className:"px-4 py-2 rounded border border-gray-300 text-gray-700 hover:bg-gray-100 transition-colors",children:"Cancel"}),l.jsx(be,{onClick:b,disabled:c,className:"s3-explr-crawl-btn",children:"Move"})]})]})})},jS="AIzaSyBI8KiTWudkw8iR5cjH7ZsA4JBN1NqJw8A",zS="https://www.googleapis.com/auth/drive";Xt(he,{retries:3});const Ze={current:!1},op="crawl:jobs",Gn="crawl:current_job",BS=e=>{const[t,n]=_.useState(null),[r,o]=_.useState(0);return _.useEffect(()=>{const i=localStorage.getItem(Gn);if(i){const a=JSON.parse(i);n(a),a!=null&&a.startTime&&o(Math.floor((Date.now()-a.startTime)/1e3))}},[]),_.useEffect(()=>{if(!(t!=null&&t.startTime))return;const i=setInterval(()=>{o(Math.floor((Date.now()-t.startTime)/1e3))},1e3);return()=>clearInterval(i)},[t==null?void 0:t.startTime]),_.useEffect(()=>{if(!(t!=null&&t.id))return;const i=async()=>{try{const u=(await he.get(`${e}/api/crawl/${t.id}?taskId=${t.taskId}`)).data;n(c=>{if(!c)return null;const d={...c,status:u};return localStorage.setItem(Gn,JSON.stringify(d)),(u.status==="completed"||u.status==="failed")&&setTimeout(()=>{n(null),localStorage.removeItem(Gn)},100),d})}catch(s){console.error("Error polling job status:",s)}},a=setInterval(i,3e3);return i(),()=>clearInterval(a)},[t==null?void 0:t.id,e]),{currentJob:t,elapsedTime:r,setCurrentJob:i=>{i&&!i.startTime&&(i.startTime=Date.now()),n(i),i?localStorage.setItem(Gn,JSON.stringify(i)):localStorage.removeItem(Gn)}}},Go=(e,t)=>{const n=[],r=o=>{(e[o]||[]).forEach(a=>{n.push(a.key),a.isFolder&&r(a.key)})};return r(t),n},HS=(e,t)=>{const n=[];return(e[t]||[]).forEach(o=>{n.push(o.key),o.isFolder&&n.push(...Go(e,o.key))}),n},US=(e,t,n=[],r,o,i)=>{const[a,s]=_.useState({}),[u,c]=_.useState(!1),[d,g]=_.useState(null),[m,f]=_.useState(0),v=_.useRef(t);_.useEffect(()=>{v.current=t},[t]);const h=async()=>{c(!0);try{const b=await he.get(`${e}/api/files`,{params:{cache:!1,displayPrefixes:JSON.stringify(n),prefix:v.current},timeout:3e5});s(b.data),g(null)}catch(b){g(b instanceof Error?b:new Error("Failed to fetch files"))}finally{c(!1),f(0),i("")}},y=async b=>{var w,C;try{if(!b)return;c(!0);const E=await he.get(`${e}/api/search-db?query=${b}&rootPrefix=${t}&offset=${(o-1)*20}&limit=20`,{timeout:3e5});return s({[t]:((w=E==null?void 0:E.data)==null?void 0:w.result)||[]}),f(((C=E==null?void 0:E.data)==null?void 0:C.estimatedTotalHits)||0),E}catch(E){g(E instanceof Error?E:new Error("Failed to fetch files"))}finally{c(!1)}};return _.useEffect(()=>{!r&&!u&&h(),r&&!u&&y(r)},[r,o]),{data:a,isLoading:u,error:d,estimatedTotalHits:m,refetch:h}},br=e=>{var r,o,i;const t=((i=(o=(r=e==null?void 0:e.name)==null?void 0:r.split("."))==null?void 0:o.pop())==null?void 0:i.toLowerCase())??"";return["txt","md","json","js","ts","jsx","tsx","css","html","xml","yaml","yml"].includes(t||"")},WS=_.memo(({homeLabel:e="Kho tài liệu",apiBaseUrl:t="http://localhost:3002",rootPrefix:n="",asSelector:r=!1,onSelected:o=s=>console.log("Đã chọn:",s),displayPrefixes:i,preSelectedFiles:a})=>{var Np;const[s,u]=_.useState([]),[c,d]=_.useState(""),[g,m]=_.useState(new Set(a)),[f,v]=_.useState(n),[h,y]=_.useState(""),[b,w]=_.useState(!1),[C,E]=_.useState(""),[x,O]=_.useState(!1),[I,$]=_.useState(null),[H,D]=_.useState(null),[G,U]=_.useState(!1),[Z,N]=_.useState(!1),[M,F]=_.useState(null),q=_.useRef(null),{toast:k}=Po(),[j,T]=_.useState(null),[B,Q]=_.useState(null),[re,ee]=_.useState(""),[ce,oe]=_.useState(!1),[ae,de]=_.useState(!1),[ue,le]=_.useState(new Set),[Ce,K]=_.useState(""),[_e,Ue]=_.useState(!1),[We,Mt]=_.useState(!1),[at,S]=_.useState("rename"),[A,V]=_.useState(!1),[ne,J]=_.useState(""),[X,z]=_.useState("1"),[Y,ye]=_.useState(!1),[we,Te]=_.useState(!1),[$t,ut]=_.useState(!1),[je,Wt]=_.useState(1),[qt,Gt]=_.useState(!1),{currentJob:Se,elapsedTime:ln,setCurrentJob:Yn}=BS(t),[dt,wn]=_.useState(null),[_r,ei]=_.useState(""),[hE,Tr]=_.useState(!1),vE=new URL(window.location.href).searchParams.get("prefix")||"",yE=n+vE||h||n,[s_,xE]=_.useState(null),{data:Lt,isLoading:Ns,error:bE,estimatedTotalHits:Ar,refetch:et}=US(t,yE,i,c,je,d),wE=Xp({onSuccess:P=>{xE(P.access_token),localStorage.setItem("google_access_token",P.access_token),CE(P.access_token)},onError:()=>{console.log("Đăng nhập thất bại!")},scope:zS}),CE=P=>{const L=document.createElement("script");L.src="https://apis.google.com/js/api.js",L.onload=()=>{window.gapi.load("picker",()=>SE(P))},document.body.appendChild(L)},SE=P=>{const L=new window.google.picker.DocsView(window.google.picker.ViewId.DOCS).setIncludeFolders(!0).setSelectFolderEnabled(!0).setOwnedByMe(!1),W=new window.google.picker.DocsView(window.google.picker.ViewId.DRIVE).setIncludeFolders(!0).setSelectFolderEnabled(!0);new window.google.picker.PickerBuilder().setDeveloperKey(jS).setOAuthToken(P).enableFeature(window.google.picker.Feature.MULTISELECT_ENABLED).setLocale("vi").addView(L).addView(W).setCallback(async ie=>{if(ie.action===window.google.picker.Action.PICKED){const ge=ie.docs.map(Ee=>({id:Ee.id,name:Ee.name,mimeType:Ee.mimeType}));await EE(ge,f)}}).build().setVisible(!0)},EE=async(P,L="")=>{const W=localStorage.getItem("google_access_token");if(!W){console.error("❌ Không tìm thấy access token. Vui lòng đăng nhập lại."),Ne.error("Không tìm thấy access token. Vui lòng đăng nhập lại.",{position:"bottom-right"});return}const te=Ne.loading("Đang đồng bộ...",{position:"bottom-right",autoClose:!1});try{const ie={prefix:L,folders:[],files:[]};P.forEach(Ee=>{Ee.mimeType==="application/vnd.google-apps.folder"?ie.folders.push({id:Ee.id,name:Ee.name}):ie.files.push({id:Ee.id,name:Ee.name})});const ge=await he.post(`${t}/api/sync-drive-to-s3`,ie,{headers:{Authorization:`Bearer ${W}`}});Ze.current=!0,et(),Ne.update(te,{render:`Đồng bộ thành công! Đã tải lên ${ge.data.uploadedKeys.length} file.`,type:"success",isLoading:!1,autoClose:3e3,position:"bottom-right"})}catch(ie){console.error("❌ Lỗi khi đồng bộ file từ Google Drive:",ie),Ne.update(te,{render:"Không thể đồng bộ file từ Google Drive.",type:"error",isLoading:!1,autoClose:3e3,position:"bottom-right"})}};_.useEffect(()=>{const P=L=>{if(L.data.action==="logout"){const W=document.createElement("iframe");W.style.display="none",W.src="https://accounts.google.com/Logout",document.body.appendChild(W),setTimeout(()=>document.body.removeChild(W),2e3)}};return window.addEventListener("message",P),()=>window.removeEventListener("message",P)},[]),_.useEffect(()=>{const P=new Set(a);m(P)},[]),_.useEffect(()=>{Se!=null&&Se.status&&(Se.status.status==="completed"?(k({title:"Thu thập website hoàn tất",description:`Đã thu thập thành công ${Se.url} với ${Se.status.completed} trang`}),Ze.current=!0,et()):Se.status.status==="failed"&&k({title:"Thu thập website thất bại",description:`Không thể thu thập ${Se.url}. Vui lòng thử lại.`,variant:"destructive"}))},[(Np=Se==null?void 0:Se.status)==null?void 0:Np.status]);const _p=_.useMemo(()=>Lt[f]||[],[Lt,f]),cn=_.useMemo(()=>_p,[_p,f,Lt]),Pr=_.useMemo(()=>{const P={};return cn.forEach((L,W)=>{g.has(L.key)&&(P[W]=!0)}),P},[g,cn]),_E=P=>{const L=Go(Lt,P);if(L.length===0)return g.has(P)?"all":"none";const W=L.filter(te=>g.has(te)).length;return W===0?"none":W===L.length?"all":"partial"},Xn=(P,L=!0)=>{if(f!==P&&(Gt(!0),y(P),v(P),a||m(new Set),L)){const W=window.location.pathname==="/"?"":window.location.pathname,te=P?`${window.location.origin}${W}?prefix=${encodeURIComponent(P)}`:`${window.location.origin}${W}`;window.history.pushState({path:te},"",te)}};_.useEffect(()=>{qt&&(Ze.current=!0,et().finally(()=>Gt(!1)))},[qt]);const TE=async(P,L)=>{var W,te;O(!0);try{if(cn.some(Ke=>Ke.isFolder&&Ke.name.toLowerCase()===P.toLowerCase())){k({title:"Lỗi",description:`Thư mục "${P}" đã tồn tại trong thư mục hiện tại.`,variant:"destructive"}),O(!1);return}const ge=`${L}${P}/`;if((await he.post(`${t}/api/create-folder`,{prefix:ge})).status!==200){k({title:"Lỗi",description:"Không thể tạo thư mục",variant:"destructive"});return}Ze.current=!0,await et(),k({title:"Đã tạo thư mục",description:`Đã tạo thành công thư mục "${P}"`}),E(""),w(!1)}catch(ie){console.error("Error creating folder:",ie);const ge=((te=(W=ie==null?void 0:ie.response)==null?void 0:W.data)==null?void 0:te.error)||"Không thể tạo thư mục";k({title:"Lỗi",description:ge,variant:"destructive"})}finally{O(!1)}},ks=async(P,L,W)=>{var te,ie,ge,Ee,Ke,Jn,kp,Op,Fp;F(W),Te(!0);try{if(Array.from(P).reduce((Ye,Or)=>Ye+Or.size,0)>=100*1024*1024){k({title:"Lỗi",description:"Tổng kích thước các tập tin vượt quá 100 MB",variant:"destructive"}),F(null),Te(!1);return}const ni=Array.from(P).filter(Ye=>Ye.size===0);if(ni.length>0){const Ye=ni.map(Or=>Or.name).join(", ");k({title:"Lỗi tải lên",description:`Không thể tải lên tập tin rỗng: ${Ye}`,variant:"destructive"}),Te(!1),F(null);return}let kr=localStorage.getItem("dataLogin"),Zn;try{kr&&(kr=JSON.parse(kr),Zn=kr.user)}catch{kr=null}const Cn=new FormData;if(Zn!=null&&Zn.id&&Cn.append("metadata",JSON.stringify({creator:Zn.username,creatorId:Zn.id,DataSource:"Tệp tải lên"})),W==="folder"&&P[0]){const Ye=P[0].webkitRelativePath.split("/")[0];Ye&&Cn.append("folderName",Ye)}Cn.append("prefix",L),Array.from(P).forEach(Ye=>W==="folder"?Cn.append("files",Ye,Ye.webkitRelativePath):Cn.append("files",Ye)),Ze.current=!0;const ze=await he.post(`${t}/api/check-files-existed`,Cn,{headers:{"Content-Type":"multipart/form-data"}});if(((te=ze==null?void 0:ze.data)==null?void 0:te.status)===200)await he.post(`${t}/api/upload`,Cn,{headers:{"Content-Type":"multipart/form-data"}}),d(""),y(L),setTimeout(async()=>{F(null),await et(),Te(!1)},500);else{if(((ge=(ie=ze==null?void 0:ze.data)==null?void 0:ie.names)==null?void 0:ge.length)>0&&!((Ee=ze==null?void 0:ze.data)!=null&&Ee.isFolder)){const Ye=Array.from(P).filter(Or=>ze.data.names.includes(Or.name));wn(Ye),Tr(!0)}(Ke=ze==null?void 0:ze.data)!=null&&Ke.isFolder&&((Jn=ze==null?void 0:ze.data)!=null&&Jn.name)&&(ei((kp=ze==null?void 0:ze.data)==null?void 0:kp.name),wn(P),Tr(!0))}}catch(Nr){console.error("Lỗi tải lên:",Nr);const ni=((Fp=(Op=Nr==null?void 0:Nr.response)==null?void 0:Op.data)==null?void 0:Fp.error)||"Không thể tải lên tập tin";k({title:"Lỗi",description:ni,variant:"destructive"}),F(null),Te(!1)}},AE=async()=>{var P,L;try{Te(!0);const W=new FormData;if(dt){F(_r?"folder":"files"),Tr(!1);let te=localStorage.getItem("dataLogin"),ie;try{te&&(te=JSON.parse(te),ie=te.user)}catch{te=null}if(ie!=null&&ie.id&&(console.log("🚀 ~ uploadFiles ~ user:",ie),W.append("metadata",JSON.stringify({creator:ie.username,creatorId:ie.id,DataSource:"Tệp tải lên"}))),_r&&dt[0]){const ge=dt[0].webkitRelativePath.split("/")[0];ge&&W.append("folderName",ge)}W.append("prefix",f),Array.from(dt).forEach(ge=>_r&&dt[0]?W.append("files",ge,ge.webkitRelativePath):W.append("files",ge)),ie!=null&&ie.id&&W.append("metadata",JSON.stringify({creator:ie.username,creatorId:ie.id,DataSource:"Tệp tải lên"})),await he.post(`${t}/api/upload`,W,{headers:{"Content-Type":"multipart/form-data"}}),d(""),y(f),Ze.current=!0}}catch(W){console.error("Lỗi tải lên:",W);const te=((L=(P=W==null?void 0:W.response)==null?void 0:P.data)==null?void 0:L.error)||"Không thể tải lên tập tin";k({title:"Lỗi",description:te,variant:"destructive"})}finally{setTimeout(async()=>{F(null),await et(),Te(!1),ei(""),wn(null)},500)}},PE=async P=>{var L;try{if(await he.delete(`${t}/api/files`,{data:{paths:[P.key]}}),g.has(P.key)){const te=new Set(g);te.delete(P.key),m(te)}const W=((L=P.key)==null?void 0:L.replace(/^(.*?)(\/.*)?$/,(te,ie,ge)=>!ge||ge==="/"?"":ie+"/"))||"";y(W),Ze.current=!0,k({title:"Đã xóa tập tin",description:`Đã xóa thành công "${P.name}"`}),$(null)}catch(W){console.error("Error deleting file:",W),k({title:"Lỗi",description:"Không thể xóa tập tin",variant:"destructive"})}finally{ut(!1),await et()}},ti=P=>{const L=new Set(g),W=typeof P=="function"?P(Pr):P;new Set(Object.keys(Pr).map(Number)).forEach(ie=>{const ge=cn[ie];ge&&(W[ie]||(L.delete(ge.key),ge.isFolder&&Go(Lt,ge.key).forEach(Ee=>L.delete(Ee))))}),Object.entries(W).forEach(([ie,ge])=>{const Ee=parseInt(ie),Ke=cn[Ee];Ke&&ge&&(L.add(Ke.key),Ke.isFolder&&Go(Lt,Ke.key).forEach(Jn=>L.add(Jn)))}),m(L)},NE=async()=>{var P;U(!0);try{const L=Array.from(g),W=L.map(ie=>Object.values(Lt).flat().find(ge=>ge.key===ie)).filter(ie=>ie!==void 0);if(W.length===0){k({title:"Lỗi",description:"Không có tập tin nào được chọn để xóa",variant:"destructive"});return}await he.delete(`${t}/api/files`,{data:{paths:L}});const te=((P=W[0])==null?void 0:P.key.replace(/^(.*?)(\/.*)?$/,(ie,ge,Ee)=>!Ee||Ee==="/"?"":ge+"/"))||"";y(te),Ze.current=!0,et(),k({title:"Đã xóa tập tin",description:`Đã xóa thành công ${W.length} mục`}),N(!1),m(new Set)}catch(L){console.error("Error deleting files:",L),k({title:"Lỗi",description:"Không thể xóa các tập tin đã chọn",variant:"destructive"})}finally{U(!1)}},kE=async(P,L)=>{if(!f.trim()){k({title:"Lỗi",description:"Không thể đổi tên tập tin hoặc thư mục ở thư mục gốc. Chỉ có thể xóa.",variant:"destructive"});return}de(!0);try{const W=P.key;let te;P.isFolder?te=W.split("/").slice(0,-2).join("/")+"/":te=W.substring(0,W.lastIndexOf("/")+1);const ie=te+L+(P.isFolder?"/":"");await he.post(`${t}/api/rename`,{oldPath:W,newPath:ie}),Ze.current=!0,await et(),k({title:"Đã đổi tên",description:`Đã đổi tên thành công "${P.name}" thành "${L}"`}),T(null),ee(""),Q(null)}catch(W){console.error("Error renaming item:",W),k({title:"Lỗi",description:"Không thể đổi tên",variant:"destructive"})}finally{de(!1)}},Tp=async P=>{le(L=>new Set([...L,...P]));try{const L=await he.post(`${t}/api/download`,{paths:P},{responseType:"blob"}),W=window.URL.createObjectURL(L.data),te=document.createElement("a");te.href=W;const ie=L.headers["Content-Disposition"]||L.headers["content-disposition"],ge=ie==null?void 0:ie.match(/filename="(.+)"/),Ee=ge?decodeURIComponent(ge[1]):"download.zip";te.setAttribute("download",Ee),document.body.appendChild(te),te.click(),document.body.removeChild(te),window.URL.revokeObjectURL(W),k({title:"Bắt đầu tải xuống",description:`Đã bắt đầu tải xuống ${P.length} mục${P.length>1,""}`})}catch(L){console.error("Error downloading files:",L),k({title:"Lỗi",description:"Không thể tải xuống tập tin",variant:"destructive"})}finally{le(L=>{const W=new Set(L);return P.forEach(te=>W.delete(te)),W})}},Ap=f?f.replace(n,"").split("/").filter(Boolean):[],OE=()=>Array.from(g).map(P=>{var L;for(const W in Lt){const te=(L=Lt[W])==null?void 0:L.find(ie=>ie.key===P);if(te)return te}return null}).filter(P=>P!==null),Pp=_.useMemo(()=>{const P=[{id:"select",header:()=>{const L=HS(Lt,f),W=L.length>0&&L.every(ie=>g.has(ie)),te=L.some(ie=>g.has(ie));return l.jsx(Zi,{checked:W?!0:te?"indeterminate":!1,onCheckedChange:ie=>{if(ie){const ge=cn.reduce((Ee,Ke,Jn)=>(Ee[Jn]=!0,Ee),{});ti(ge)}else ti({})},"aria-label":"Chọn tất cả"})},cell:({row:L})=>{const W=L.original,ie=W.isFolder?_E(W.key):g.has(W.key)?"all":"none";return l.jsx("div",{className:"flex items-center",children:l.jsx(Zi,{checked:ie==="partial"?"indeterminate":ie==="all",onCheckedChange:ge=>{const Ee={...Pr};ge?Ee[L.index]=!0:delete Ee[L.index],ti(Ee)},"aria-label":"Chọn dòng"})})},enableSorting:!1},{id:"fileName",header:({column:L})=>l.jsxs(be,{variant:"ghost",onClick:()=>L.toggleSorting(L.getIsSorted()==="asc"),children:["Tên tập tin",l.jsx(Ri,{})]}),accessorKey:"name",cell:({row:L})=>{const W=L.original,te=W.key.substring(0,W.key.lastIndexOf("/"))||"/",ie=c.trim()!==""&&te!==f,ge=te.split("/").filter(Boolean);return l.jsxs("div",{className:"flex flex-col",children:[l.jsxs("div",{className:`flex items-center gap-2 ${W.isFolder?"cursor-pointer hover:text-blue-600":""}`,onClick:()=>{W.isFolder&&(a||m(new Set),Xn(W.key))},children:[W.isFolder?l.jsx(oi,{className:"h-5 w-5 text-blue-500"}):null,W.name]}),ie&&l.jsxs("div",{className:"text-sm text-gray-500 flex items-center",children:[l.jsx(oi,{className:"h-4 w-4 text-gray-500 my-auto"}),l.jsxs("span",{className:"flex items-center ml-1",children:[l.jsx("span",{className:"cursor-pointer hover:text-blue-600",onClick:()=>{Xn("")},children:"/"}),ge.map((Ee,Ke)=>l.jsxs("span",{className:"flex items-center",children:[l.jsx("span",{className:"cursor-pointer hover:text-blue-600",onClick:()=>{Xn(ge.slice(0,Ke+1).join("/")+"/")},children:Ee}),Ke<ge.length-1&&l.jsx("span",{children:"/"})]},Ke))]})]})]})}}];return r||P.push({id:"size",header:({column:L})=>l.jsxs(be,{variant:"ghost",onClick:()=>L.toggleSorting(L.getIsSorted()==="asc"),children:["Kích thước",l.jsx(Ri,{})]}),accessorKey:"size",cell:({getValue:L,row:W})=>{const te=L();return l.jsx("span",{children:W.original.isFolder?"-":Ev(te)})}},{id:"lastModified",header:({column:L})=>l.jsxs(be,{variant:"ghost",onClick:()=>L.toggleSorting(L.getIsSorted()==="asc"),className:"px-0 w-full flex-row justify-end",children:["Sửa đổi lần cuối",l.jsx(Ri,{})]}),accessorKey:"lastModified",cell:({row:L})=>{const W=L.original.lastModified;return l.jsx("div",{className:"w-full flex-row justify-end items-center text-right",children:l.jsx("span",{children:W&&Rl(W).isValid()?Rl(W).format("DD/MM/YYYY HH:mm"):"-"})})},size:200},{id:"actions",header:()=>l.jsx("span",{children:"Hành động"}),accessorKey:"key",cell:({row:L})=>l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Hn,{children:l.jsxs(Un,{children:[l.jsx(Wn,{asChild:!0,children:l.jsx(be,{variant:"ghost",size:"icon",onClick:()=>Tp([L.original.key]),className:"h-8 w-8 p-0",disabled:ue.has(L.original.key),children:ue.has(L.original.key)?l.jsx($e,{className:"h-4 w-4 animate-spin"}):l.jsx(Ds,{className:"h-4 w-4"})})}),l.jsx(yn,{children:"Tải xuống"})]})}),f.trim()!==""&&l.jsx(Hn,{children:l.jsxs(Un,{children:[l.jsx(Wn,{asChild:!0,children:l.jsx(be,{variant:"ghost",size:"icon",onClick:()=>{T(L.original),ee(L.original.name)},className:"h-8 w-8 p-0",children:l.jsx(Up,{className:"h-4 w-4"})})}),l.jsx(yn,{children:"Đổi tên"})]})}),l.jsx(Hn,{children:l.jsxs(Un,{children:[l.jsx(Wn,{asChild:!0,children:l.jsx(be,{variant:"ghost",size:"icon",onClick:()=>{oe(!0),D(L.original)},className:"h-8 w-8 p-0",children:l.jsx(_h,{className:"h-4 w-4"})})}),l.jsx(yn,{children:"Di chuyển"})]})}),l.jsx(Hn,{children:l.jsxs(Un,{children:[l.jsx(Wn,{asChild:!0,children:l.jsx(be,{variant:"ghost",size:"icon",onClick:()=>$(L.original),className:"h-8 w-8 p-0",children:l.jsx(Is,{className:"h-4 w-4"})})}),l.jsx(yn,{children:"Xóa"})]})})]})}),P},[g,cn,Pr,ue,r]),Os=Gs({data:cn,columns:Pp,state:{rowSelection:Pr,sorting:s},onSortingChange:u,enableRowSelection:!0,onRowSelectionChange:ti,getCoreRowModel:qs(),getSortedRowModel:Ng()}),FE=async P=>{var L,W;Ue(!0);try{if(br(P)){const te=await he.get(`${t}/api/read-text`,{params:{path:P.key}});K(te.data.content)}try{const te=await he.get(`${t}/api/read-json`,{params:{path:P.key+".metadata.json"}}),ie=((W=(L=te==null?void 0:te.data)==null?void 0:L.content)==null?void 0:W.metadataAttributes)||null;return Q({fullPath:j==null?void 0:j.key,...ie})}catch{return Q("Lỗi phân tích siêu dữ liệu")}}catch(te){console.error("Error loading file content:",te),k({title:"Lỗi",description:"Không thể tải nội dung tập tin",variant:"destructive"})}finally{Ue(!1)}},DE=async(P,L)=>{Mt(!0);try{await he.post(`${t}/api/modify-text`,{path:P.key,content:L}),k({title:"Đã lưu tập tin",description:"Nội dung tập tin đã được cập nhật thành công"}),Ze.current=!0,await et(),T(null),K(""),S("rename")}catch(W){console.error("Error saving file content:",W),k({title:"Lỗi",description:"Không thể lưu nội dung tập tin",variant:"destructive"})}finally{Mt(!1)}},IE=async P=>{Mt(!0);try{console.log("🚀 ~ saveJsonFile ~ metadataForEdit:",B),await he.post(`${t}/api/modify-json`,{path:P.key+".metadata.json",content:{metadataAttributes:B}}),k({title:"Đã lưu tập tin",description:"Nội dung tập tin đã được cập nhật thành công"}),Ze.current=!0,await et(),T(null),K(""),S("rename")}catch(L){console.error("Error saving file content:",L),k({title:"Lỗi",description:"Không thể lưu nội dung tập tin",variant:"destructive"})}finally{Mt(!1)}};_.useEffect(()=>{j&&(j.isFolder||FE(j),S("rename"))},[j]);const ME=async(P,L)=>{var W;if(Se){k({title:"Đang thu thập website",description:"Vui lòng đợi cho công việc thu thập hiện tại hoàn thành.",variant:"destructive"});return}ye(!0);try{const{data:te}=await he.post(`${t}/api/crawl`,{url:P,limit:L,prefix:f});if(te.id){Yn({id:te.id,url:P,limit:L,prefix:f,taskId:((W=te.task)==null?void 0:W.id)||""});const ie=localStorage.getItem(op),ge=ie?JSON.parse(ie):[];ge.some(Ee=>Ee.id===te.id)||(ge.unshift({url:P,id:te.id,limit:L,prefix:f,timestamp:Date.now()}),ge.length>20&&(ge.length=20),localStorage.setItem(op,JSON.stringify(ge))),k({title:"Bắt đầu thu thập website",description:`Đã thêm nhiệm vụ thu thập ${P} với giới hạn ${L}. Dữ liệu sẽ có sẵn sau khi thu thập hoàn tất.`}),V(!1),J(""),z("1")}}catch(te){console.error("Error crawling website:",te),k({title:"Lỗi",description:"Không thể bắt đầu thu thập website",variant:"destructive"})}finally{ye(!1)}},$E=async()=>{try{if(!(Se!=null&&Se.id))return;Yn(null),localStorage.removeItem(Gn),k({title:"Đã dừng thu thập",description:`Đã dừng thu thập website ${Se.url}`})}catch(P){console.error("Error stopping job:",P),k({title:"Lỗi",description:"Không thể dừng thu thập website",variant:"destructive"})}};return _.useEffect(()=>{const P=(L=!0)=>{const te=new URL(window.location.href).searchParams.get("prefix")||"";te?Xn(n+te,!1):(L&&!a&&m(new Set),y(""),v(""),Ze.current=!0,setTimeout(()=>{et()},0))};return P(!1),window.addEventListener("popstate",()=>P(!0)),()=>{window.removeEventListener("popstate",()=>P(!0))}},[]),l.jsxs("div",{className:"space-y-4 s3-explr-container",children:[l.jsx(hd,{}),l.jsx(jt,{open:hE,onOpenChange:P=>{Tr(P),P||(ei(""),wn(null),Te(!1),F(null))},children:l.jsxs(Et,{children:[l.jsxs(_t,{children:[l.jsx(Tt,{children:"Cảnh báo trùng lặp"}),l.jsxs(Mn,{children:[_r&&l.jsxs(l.Fragment,{children:["Folder $",_r," đã có."]}),dt&&dt.length>0&&l.jsxs(l.Fragment,{children:["Những tệp sau bị lặp:",l.jsx("ul",{className:"mt-2 list-disc pl-5 text-sm text-red-600",children:Array.from(dt).map((P,L)=>l.jsx("li",{children:P.name},L))})]})]})]}),l.jsxs(mn,{children:[l.jsx(be,{variant:"outline",onClick:()=>{Tr(!1),ei(""),wn(null),Te(!1),F(null)},children:"Bỏ qua"}),l.jsx(be,{variant:"destructive",onClick:()=>AE(),children:"Ghi đè"})]})]})}),l.jsx(rc,{className:"s3-explr-breadcrumb",children:l.jsxs(oc,{className:"s3-explr-breadcrumb-list",children:[l.jsx(Gi,{className:"s3-explr-breadcrumb-item",children:l.jsx(Ki,{onClick:()=>Xn(n),className:"flex items-center gap-1 cursor-pointer s3-explr-breadcrumb-home",children:e})}),Ap.map((P,L)=>l.jsxs("div",{className:"flex items-center",children:[l.jsx(ic,{className:"s3-explr-breadcrumb-separator"},`sep-${L}`),l.jsx(Gi,{className:"s3-explr-breadcrumb-item",children:l.jsx(Ki,{onClick:()=>Xn(n+Ap.slice(0,L+1).join("/")+"/"),className:"cursor-pointer s3-explr-breadcrumb-link",children:P})},`item-${P}`)]},L))]})}),l.jsxs("div",{className:"flex items-center space-x-4 s3-explr-toolbar",children:[l.jsx("div",{className:"relative max-w-sm w-full s3-explr-search-container",children:l.jsx(MC,{ref:q,onChange:P=>d(P)})}),l.jsxs(be,{variant:"outline",size:"sm",onClick:()=>{y(f),Ze.current=!0,et()},disabled:Ns,className:"flex items-center gap-2 s3-explr-refresh-btn",children:[l.jsx(Mp,{className:`h-4 w-4 s3-explr-refresh-icon ${Ns?"animate-spin":""}`}),"Làm mới"]}),!r&&l.jsxs(l.Fragment,{children:[g.size>0&&l.jsxs(l.Fragment,{children:[l.jsxs(be,{variant:"outline",size:"sm",onClick:()=>Tp(Array.from(g)),disabled:Array.from(g).some(P=>ue.has(P)),className:"flex items-center gap-2 s3-explr-download-selected-btn",children:[Array.from(g).some(P=>ue.has(P))?l.jsx($e,{className:"h-4 w-4 animate-spin mr-2 s3-explr-loader"}):l.jsx(Ds,{className:"h-4 w-4 s3-explr-download-icon"}),"Tải xuống đã chọn (",g.size,")"]}),l.jsxs(jt,{open:Z,onOpenChange:N,children:[l.jsx(lo,{asChild:!0,children:l.jsxs(be,{variant:"destructive",size:"sm",className:"flex items-center gap-2 s3-explr-bulk-delete-btn",children:[l.jsx(Is,{className:"h-4 w-4 s3-explr-trash-icon"}),"Xóa đã chọn (",g.size,")"]})}),l.jsxs(Et,{className:"s3-explr-dialog-content",children:[l.jsxs(_t,{className:"s3-explr-dialog-header",children:[l.jsx(Tt,{className:"s3-explr-dialog-title",children:"Xác nhận xóa hàng loạt"}),l.jsxs(Mn,{className:"s3-explr-dialog-description",children:["Bạn có chắc chắn muốn xóa ",g.size," mục đã chọn? Hành động này không thể hoàn tác."]})]}),l.jsxs(mn,{className:"s3-explr-dialog-footer",children:[l.jsx(be,{variant:"outline",onClick:()=>N(!1),className:"s3-explr-cancel-btn",children:"Hủy"}),l.jsx(be,{variant:"destructive",onClick:NE,disabled:G,className:"s3-explr-confirm-delete-btn",children:G?l.jsxs(l.Fragment,{children:[l.jsx($e,{className:"mr-2 h-4 w-4 animate-spin s3-explr-loader"}),"Đang xóa..."]}):"Xóa đã chọn"})]})]})]})]}),l.jsxs(jt,{open:b,onOpenChange:w,children:[l.jsx(lo,{asChild:!0,children:l.jsxs(be,{variant:"outline",size:"sm",className:"flex items-center gap-2 s3-explr-new-folder-btn",disabled:!!i&&!f,children:[l.jsx(Vp,{className:"h-4 w-4 s3-explr-folder-plus-icon"}),"Thư mục mới"]})}),l.jsxs(Et,{className:"s3-explr-dialog-content",children:[l.jsx(_t,{className:"s3-explr-dialog-header",children:l.jsx(Tt,{className:"s3-explr-dialog-title",children:"Tạo thư mục mới"})}),l.jsxs("div",{className:"space-y-4 py-4 s3-explr-dialog-body",children:[l.jsxs("div",{className:"space-y-2 s3-explr-input-group",children:[l.jsx(hn,{htmlFor:"name",className:"s3-explr-label",children:"Tên thư mục"}),l.jsx(nn,{disabled:x,id:"name",value:C,onChange:P=>E(P.target.value),placeholder:"Nhập tên thư mục",className:"s3-explr-input"})]}),l.jsxs(be,{onClick:()=>{C.trim()&&TE(C,f)},disabled:x,className:"s3-explr-create-btn",children:[x&&l.jsx($e,{className:"mr-2 h-4 w-4 animate-spin s3-explr-loader"}),x?"Đang tạo...":"Tạo"]})]})]})]}),l.jsxs("div",{className:"flex items-center gap-2 s3-explr-upload-group",children:[l.jsx(be,{variant:"outline",size:"sm",className:"flex items-center gap-2 s3-explr-upload-files-btn",onClick:()=>{const P=document.createElement("input");P.type="file",P.multiple=!0,P.onchange=L=>{const W=L.target.files;W&&ks(W,f,"files")},P.click()},disabled:M!==null||!!i&&!f,children:M==="files"?l.jsxs(l.Fragment,{children:[l.jsx($e,{className:"h-4 w-4 animate-spin mr-2 s3-explr-loader"}),"Đang tải lên..."]}):l.jsxs(l.Fragment,{children:[l.jsx(Lp,{className:"h-4 w-4 s3-explr-upload-icon"}),"Tải lên tập tin"]})}),l.jsx(be,{variant:"outline",size:"sm",className:"flex items-center gap-2 s3-explr-upload-folder-btn",onClick:()=>{const P=document.createElement("input");P.type="file",P.multiple=!0,P.webkitdirectory=!0,P.onchange=L=>{const W=L.target.files;W&&ks(W,f,"folder")},P.click()},disabled:M!==null||!!i&&!f,children:M==="folder"?l.jsxs(l.Fragment,{children:[l.jsx($e,{className:"h-4 w-4 animate-spin mr-2 s3-explr-loader"}),"Đang tải lên..."]}):l.jsxs(l.Fragment,{children:[l.jsx(oi,{className:"h-4 w-4 s3-explr-folder-icon"}),"Tải lên thư mục"]})}),Se?l.jsx(Hn,{delayDuration:0,children:l.jsxs(Un,{children:[l.jsx(Wn,{asChild:!0,children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs(be,{variant:"outline",size:"sm",className:"flex items-center gap-2 s3-explr-add-website-btn",disabled:!0,children:[l.jsx($e,{className:"h-4 w-4 animate-spin s3-explr-loader"}),Se.status?l.jsxs(l.Fragment,{children:["Đang thu thập (",Se.status.completed,"/",Se.status.total,") - ",Math.floor(ln/60),":",String(ln%60).padStart(2,"0")]}):"Đang thu thập..."]}),l.jsxs(be,{variant:"destructive",size:"sm",onClick:()=>void $E(),className:"flex items-center gap-2",children:[l.jsx("span",{className:"sr-only",children:"Dừng thu thập"}),l.jsx(qp,{className:"h-4 w-4"})]})]})}),Se.status&&l.jsx(yn,{side:"right",sideOffset:5,children:l.jsxs("div",{className:"space-y-1 p-2",children:[l.jsxs("p",{className:"font-semibold",children:["Đang thu thập ",Se.url]}),l.jsxs("p",{children:["Tiến độ: ",Se.status.completed,"/",Se.status.total," trang"]}),l.jsxs("p",{children:["Thời gian: ",Math.floor(ln/60),":",String(ln%60).padStart(2,"0")]}),l.jsxs("p",{children:["Trạng thái:"," ",Se.status.status==="scraping"?"Đang thu thập":Se.status.status==="completed"?"Hoàn thành":"Thất bại"]})]})})]})}):l.jsxs(jt,{open:A,onOpenChange:V,children:[l.jsx(lo,{asChild:!0,children:l.jsxs(be,{variant:"outline",size:"sm",className:"flex items-center gap-2 s3-explr-add-website-btn",disabled:!!i&&!f,children:[l.jsx(Bp,{className:"h-4 w-4 s3-explr-globe-icon"}),"Thêm website"]})}),l.jsxs(Et,{className:"s3-explr-dialog-content",children:[l.jsxs(_t,{className:"s3-explr-dialog-header",children:[l.jsx(Tt,{className:"s3-explr-dialog-title",children:"Thêm website"}),l.jsx(Mn,{className:"s3-explr-dialog-description",children:"Nhập URL website để thu thập và thêm vào S3."})]}),l.jsxs("div",{className:"space-y-4 py-4 s3-explr-dialog-body",children:[l.jsxs("div",{className:"space-y-2 s3-explr-input-group",children:[l.jsx(hn,{htmlFor:"websiteUrl",className:"s3-explr-label",children:"URL Website"}),l.jsx(nn,{id:"websiteUrl",value:ne,onChange:P=>J(P.target.value),placeholder:"https://example.com",type:"url",disabled:Y,className:"s3-explr-input"})]}),l.jsxs("div",{className:"space-y-2 s3-explr-input-group",children:[l.jsx(hn,{htmlFor:"crawlLimit",className:"s3-explr-label",children:"Giới hạn thu thập"}),l.jsx(nn,{id:"crawlLimit",value:X,onChange:P=>{const L=P.target.value;/^\d*$/.test(L)&&z(L)},placeholder:"1",type:"text",disabled:Y,className:"s3-explr-input"}),l.jsx("p",{className:"text-sm text-gray-500",children:"Số lượng liên kết cần thu thập (mặc định: 1)"})]})]}),l.jsxs(mn,{className:"s3-explr-dialog-footer",children:[l.jsx(be,{variant:"outline",onClick:()=>{V(!1),J(""),z("1")},disabled:Y,className:"s3-explr-cancel-btn",children:"Hủy"}),l.jsx(be,{onClick:()=>{ne.trim()&&ME(ne.trim(),parseInt(X)||1)},disabled:Y||!ne.trim(),className:"s3-explr-crawl-btn",children:Y?l.jsxs(l.Fragment,{children:[l.jsx($e,{className:"mr-2 h-4 w-4 animate-spin s3-explr-loader"}),"Đang thu thập..."]}):"Bắt đầu thu thập"})]})]})]})]}),l.jsx("div",{className:"flex items-center gap-4",children:l.jsxs(be,{variant:"outline",size:"sm",onClick:()=>wE(),className:"flex items-center gap-2",children:[l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:"h-4 w-4",children:[l.jsx("path",{d:"M23.49 12.27c0-.82-.07-1.61-.19-2.37H12v4.49h6.54c-.3 1.54-1.19 2.85-2.53 3.72v3.09h4.07c2.39-2.2 3.77-5.43 3.77-9.03z",fill:"#4285F4"}),l.jsx("path",{d:"M12 24c3.24 0 5.95-1.08 7.94-2.91l-4.07-3.09c-1.11.74-2.53 1.18-3.87 1.18-2.97 0-5.47-2-6.37-4.7H1.49v2.95C3.5 20.76 7.45 24 12 24z",fill:"#34A853"}),l.jsx("path",{d:"M5.63 14.48c-.26-.74-.4-1.53-.4-2.34s.14-1.6.4-2.34V6.86H1.49C.55 8.68 0 10.68 0 12.48s.55 3.8 1.49 5.62l4.14-3.62z",fill:"#FBBC05"}),l.jsx("path",{d:"M12 4.82c1.64 0 3.12.56 4.27 1.65l3.16-3.16C17.95 1.08 15.24 0 12 0 7.45 0 3.5 3.24 1.49 7.14l4.14 3.62c.9-2.7 3.4-4.7 6.37-4.7z",fill:"#EA4335"})]}),"Đăng nhập Google"]})}),l.jsx(jt,{open:!!I,onOpenChange:P=>!P&&$(null),children:l.jsxs(Et,{className:"s3-explr-dialog-content",children:[l.jsxs(_t,{className:"s3-explr-dialog-header",children:[l.jsx(Tt,{className:"s3-explr-dialog-title",children:"Xác nhận xóa"}),l.jsxs(Mn,{className:"s3-explr-dialog-description",children:["Bạn có chắc chắn muốn xóa ",I==null?void 0:I.name,"? Hành động này không thể hoàn tác."]})]}),l.jsxs(mn,{className:"s3-explr-dialog-footer",children:[l.jsx(be,{variant:"outline",onClick:()=>$(null),className:"s3-explr-cancel-btn",children:"Hủy"}),l.jsx(be,{variant:"destructive",onClick:()=>PE(I),disabled:$t,className:"s3-explr-confirm-delete-btn",children:$t?l.jsxs(l.Fragment,{children:[l.jsx($e,{className:"mr-2 h-4 w-4 animate-spin s3-explr-loader"}),"Đang xóa..."]}):"Xóa"})]})]})}),l.jsx(jt,{open:!!j,onOpenChange:P=>{P||(T(null),Q(null),ee(""),K(""),S("rename"))},children:l.jsxs(Et,{className:"s3-explr-dialog-content max-w-5xl w-[90%]",children:[l.jsx(_t,{className:"s3-explr-dialog-header",children:l.jsx(Tt,{className:"s3-explr-dialog-title",children:j!=null&&j.isFolder?"Đổi tên thư mục":br(j)?"Quản lý tập tin":"Đổi tên tập tin"})}),j&&l.jsxs(Zx,{value:at,onValueChange:P=>S(P),children:[l.jsxs(Hu,{"aria-checked":!br(j),"aria-disabled":j.isFolder,className:"grid w-full grid-cols-3 aria-checked:grid-cols-2 aria-disabled:grid-cols-1",children:[l.jsx(wo,{value:"rename",children:"Đổi tên"}),!j.isFolder&&l.jsxs(l.Fragment,{children:[br(j)&&l.jsx(wo,{value:"edit",children:"Sửa nội dung"}),l.jsx(wo,{value:"edit-metadata",children:"Sửa metadata file"})]})]}),l.jsx(Co,{value:"rename",children:l.jsx("div",{className:"space-y-4 py-4 s3-explr-dialog-body",children:l.jsxs("div",{className:"h-[70dvh] min-h-[500px] overflow-hidden overflow-y-auto pb-3 px-1 s3-explr-input-group",children:[l.jsx(hn,{htmlFor:"newName",className:"s3-explr-label",children:"Tên mới"}),l.jsx(nn,{id:"newName",value:re,onChange:P=>ee(P.target.value),placeholder:"Nhập tên mới",disabled:ae,className:"s3-explr-input"})]})})}),!j.isFolder&&l.jsxs(l.Fragment,{children:[br(j)&&l.jsx(Co,{value:"edit",children:l.jsx("div",{className:"space-y-4 py-4",children:_e?l.jsx("div",{className:"flex items-center justify-center py-4",children:l.jsx($e,{className:"h-6 w-6 animate-spin"})}):l.jsxs("div",{className:"h-[70dvh] min-h-[500px] overflow-hidden overflow-y-auto pb-3 px-1",children:[l.jsx(hn,{htmlFor:"content",className:"s3-explr-label",children:"Nội dung tập tin"}),l.jsx(ur,{id:"content",value:Ce,onChange:P=>K(P.target.value),placeholder:"Nhập nội dung tập tin",className:"min-h-[200px] font-mono",disabled:We})]})})}),l.jsx(Co,{value:"edit-metadata",children:l.jsx("div",{className:"space-y-4 py-4",children:_e?l.jsx("div",{className:"flex items-center justify-center py-4",children:l.jsx($e,{className:"h-6 w-6 animate-spin"})}):l.jsx("div",{className:"h-[70dvh] min-h-[500px] overflow-hidden overflow-y-auto pb-3 px-1",children:B&&typeof B=="object"&&Object.entries(B).map(([P,L],W)=>l.jsxs("div",{className:"pb-3 flex flex-col gap-2",children:[l.jsxs(hn,{htmlFor:P,className:"s3-explr-label flex items-center gap-1",children:[zh[P]||P,Bi(P)&&l.jsx(Th,{className:"h-[12px] w-[12px] text-red-500"})]}),Bh(P)?l.jsx(ur,{id:P,value:typeof L=="string"?L:JSON.stringify(L),onChange:te=>{const ie={...B,[P]:te.target.value};Q(ie)},placeholder:"Nhập nội dung tập tin",className:"min-h-[200px] font-mono",disabled:We||Bi(P)}):l.jsx(nn,{id:P,value:typeof L=="string"?L:JSON.stringify(L),onChange:te=>{const ie={...B,[P]:te.target.value};Q(ie)},placeholder:"Nhập nội dung",className:"s3-explr-input",disabled:We||Bi(P)})]},W))})})})]})]}),l.jsxs(mn,{className:"s3-explr-dialog-footer",children:[l.jsx(be,{variant:"outline",onClick:()=>{T(null),Q(null),ee(""),K("")},className:"s3-explr-cancel-btn",children:"Hủy"}),at==="edit"?l.jsx(be,{onClick:()=>j&&DE(j,Ce),disabled:We||_e,className:"s3-explr-save-btn",children:We?l.jsxs(l.Fragment,{children:[l.jsx($e,{className:"mr-2 h-4 w-4 animate-spin s3-explr-loader"}),"Đang lưu..."]}):"Lưu thay đổi"}):at==="edit-metadata"?l.jsx(be,{onClick:()=>B&&typeof B=="object"&&j&&IE(j),disabled:We||_e,className:"s3-explr-save-btn",children:We?l.jsxs(l.Fragment,{children:[l.jsx($e,{className:"mr-2 h-4 w-4 animate-spin s3-explr-loader"}),"Đang lưu..."]}):"Lưu thay đổi"}):l.jsx(be,{onClick:()=>{re.trim()&&j&&kE(j,re.trim())},disabled:ae||!re.trim()||re.trim()===(j==null?void 0:j.name),className:"s3-explr-rename-btn",children:ae?l.jsxs(l.Fragment,{children:[l.jsx($e,{className:"mr-2 h-4 w-4 animate-spin s3-explr-loader"}),"Đang đổi tên..."]}):"Đổi tên"})]})]})}),H&&ce&&l.jsx(VS,{openDialogRename:ce,setOpenDialogRename:oe,apiBaseUrl:t,setFileToMove:D,fileToMove:H,refreshFiles:et,ignoreCache:Ze})]})]}),bE&&l.jsx("div",{className:"bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative s3-explr-error",children:"Đã xảy ra lỗi khi tải danh sách tập tin"}),l.jsx(RS,{onFilesSelected:(P,L)=>ks(P,f,L),children:l.jsx("div",{className:"rounded-md border s3-explr-table-container",children:l.jsxs(mo,{className:"s3-explr-table",children:[l.jsx(ho,{className:"s3-explr-table-header",children:Os.getHeaderGroups().map(P=>l.jsx(vt,{className:"hover:bg-transparent s3-explr-header-row",children:P.headers.map(L=>l.jsx(At,{className:"s3-explr-header-cell",children:L.isPlaceholder?null:Lr(L.column.columnDef.header,L.getContext())},L.id))},P.id))}),l.jsx(vo,{className:"s3-explr-table-body",children:Os.getRowModel().rows.length===0?l.jsx(vt,{className:"s3-explr-empty-row",children:l.jsx(Je,{colSpan:Pp.length,className:"h-24 text-center s3-explr-empty-cell",children:c?l.jsxs("div",{className:"text-gray-500 s3-explr-no-results",children:['Không tìm thấy tập tin hoặc thư mục nào khớp với "',c,'"']}):l.jsx("div",{className:"text-gray-500 s3-explr-empty-message",children:Ns?"Đang tải nội dung thư mục... Vui lòng đợi":"Thư mục này không chứa tập tin hoặc thư mục con nào"})})}):Os.getRowModel().rows.map(P=>l.jsx(vt,{className:"h-12 s3-explr-row",children:P.getVisibleCells().map(L=>l.jsx(Je,{className:"align-middle s3-explr-cell",children:Lr(L.column.columnDef.cell,L.getContext())},L.id))},P.id))})]})})}),c&&Ar!==0&&l.jsx(l.Fragment,{children:l.jsx(co,{children:l.jsxs(uo,{children:[l.jsx(fo,{onClick:()=>Wt(P=>Math.max(P-1,1)),"aria-disabled":je===1,className:"cursor-pointer aria-disabled:pointer-events-none"}),Array.from({length:Math.ceil(Ar/20)},(P,L)=>{const W=L+1,te=Math.ceil(Ar/20);return te>7&&!(W===1||W===te||W>=je-1&&W<=je+1)?W===je-2&&je>4||W===je+2&&je<te-3?l.jsx(go,{className:"pointer-events-none",children:"..."},L):null:l.jsx(ht,{className:"cursor-pointer",children:l.jsx($n,{isActive:je===W,onClick:()=>Wt(W),className:`${je===W?"bg-blue-500 text-white":"bg-white text-black"} hover:bg-blue-100`,children:W})},L)}),l.jsx(ht,{children:l.jsx(po,{onClick:()=>Wt(P=>Math.min(P+1,Math.ceil(Ar/20))),"aria-disabled":je===Math.ceil(Ar/20),className:"cursor-pointer aria-disabled:pointer-events-none"})})]})})}),r&&o&&l.jsxs("div",{className:"flex justify-between items-center mt-4 s3-explr-selector-footer",children:[l.jsxs("div",{className:"text-sm text-gray-500 s3-explr-selection-count",children:[g.size," ",(g.size===1,"tập tin")," đã chọn"]}),l.jsx(be,{variant:"default",onClick:()=>o(OE()),disabled:g.size===0,className:"s3-explr-ok-btn",children:"OK"})]})]})});var wr=e=>e.type==="checkbox",bn=e=>e instanceof Date,Ge=e=>e==null;const ip=e=>typeof e=="object";var Me=e=>!Ge(e)&&!Array.isArray(e)&&ip(e)&&!bn(e),qS=e=>Me(e)&&e.target?wr(e.target)?e.target.checked:e.target.value:e,GS=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,KS=(e,t)=>e.has(GS(t)),YS=e=>{const t=e.constructor&&e.constructor.prototype;return Me(t)&&t.hasOwnProperty("isPrototypeOf")},ws=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function ct(e){let t;const n=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(ws&&(e instanceof Blob||r))&&(n||Me(e)))if(t=n?[]:{},!n&&!YS(e))t=e;else for(const o in e)e.hasOwnProperty(o)&&(t[o]=ct(e[o]));else return e;return t}var Ko=e=>Array.isArray(e)?e.filter(Boolean):[],Ie=e=>e===void 0,se=(e,t,n)=>{if(!t||!Me(e))return n;const r=Ko(t.split(/[,[\].]+?/)).reduce((o,i)=>Ge(o)?o:o[i],e);return Ie(r)||r===e?Ie(e[t])?n:e[t]:r},Ft=e=>typeof e=="boolean",Cs=e=>/^\w*$/.test(e),ap=e=>Ko(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Fe=(e,t,n)=>{let r=-1;const o=Cs(t)?[t]:ap(t),i=o.length,a=i-1;for(;++r<i;){const s=o[r];let u=n;if(r!==a){const c=e[s];u=Me(c)||Array.isArray(c)?c:isNaN(+o[r+1])?{}:[]}if(s==="__proto__"||s==="constructor"||s==="prototype")return;e[s]=u,e=e[s]}return e};const sp={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},bt={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Ut={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};_.createContext(null);var XS=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const a=i;return t._proxyFormState[a]!==bt.all&&(t._proxyFormState[a]=!r||bt.all),e[a]}});return o},Qe=e=>Me(e)&&!Object.keys(e).length,JS=(e,t,n,r)=>{n(e);const{name:o,...i}=e;return Qe(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(a=>t[a]===bt.all)},Yo=e=>Array.isArray(e)?e:[e];function ZS(e){const t=_.useRef(e);t.current=e,_.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}var Dt=e=>typeof e=="string",QS=(e,t,n,r,o)=>Dt(e)?(r&&t.watch.add(e),se(n,e,o)):Array.isArray(e)?e.map(i=>(r&&t.watch.add(i),se(n,i))):(r&&(t.watchAll=!0),n),eE=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{},lp=e=>({isOnSubmit:!e||e===bt.onSubmit,isOnBlur:e===bt.onBlur,isOnChange:e===bt.onChange,isOnAll:e===bt.all,isOnTouch:e===bt.onTouched}),cp=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Cr=(e,t,n,r)=>{for(const o of n||Object.keys(e)){const i=se(e,o);if(i){const{_f:a,...s}=i;if(a){if(a.refs&&a.refs[0]&&t(a.refs[0],o)&&!r)return!0;if(a.ref&&t(a.ref,a.name)&&!r)return!0;if(Cr(s,t))break}else if(Me(s)&&Cr(s,t))break}}};var tE=(e,t,n)=>{const r=Yo(se(e,n));return Fe(r,"root",t[n]),Fe(e,n,r),e},Ss=e=>e.type==="file",It=e=>typeof e=="function",Xo=e=>{if(!ws)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Jo=e=>Dt(e),Es=e=>e.type==="radio",Zo=e=>e instanceof RegExp;const up={value:!1,isValid:!1},dp={value:!0,isValid:!0};var fp=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Ie(e[0].attributes.value)?Ie(e[0].value)||e[0].value===""?dp:{value:e[0].value,isValid:!0}:dp:up}return up};const pp={isValid:!1,value:null};var gp=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,pp):pp;function mp(e,t,n="validate"){if(Jo(e)||Array.isArray(e)&&e.every(Jo)||Ft(e)&&!e)return{type:n,message:Jo(e)?e:"",ref:t}}var Kn=e=>Me(e)&&!Zo(e)?e:{value:e,message:""},hp=async(e,t,n,r,o)=>{const{ref:i,refs:a,required:s,maxLength:u,minLength:c,min:d,max:g,pattern:m,validate:f,name:v,valueAsNumber:h,mount:y,disabled:b}=e._f,w=se(t,v);if(!y||b)return{};const C=a?a[0]:i,E=U=>{r&&C.reportValidity&&(C.setCustomValidity(Ft(U)?"":U||""),C.reportValidity())},x={},O=Es(i),I=wr(i),$=O||I,H=(h||Ss(i))&&Ie(i.value)&&Ie(w)||Xo(i)&&i.value===""||w===""||Array.isArray(w)&&!w.length,D=eE.bind(null,v,n,x),G=(U,Z,N,M=Ut.maxLength,F=Ut.minLength)=>{const q=U?Z:N;x[v]={type:U?M:F,message:q,ref:i,...D(U?M:F,q)}};if(o?!Array.isArray(w)||!w.length:s&&(!$&&(H||Ge(w))||Ft(w)&&!w||I&&!fp(a).isValid||O&&!gp(a).isValid)){const{value:U,message:Z}=Jo(s)?{value:!!s,message:s}:Kn(s);if(U&&(x[v]={type:Ut.required,message:Z,ref:C,...D(Ut.required,Z)},!n))return E(Z),x}if(!H&&(!Ge(d)||!Ge(g))){let U,Z;const N=Kn(g),M=Kn(d);if(!Ge(w)&&!isNaN(w)){const F=i.valueAsNumber||w&&+w;Ge(N.value)||(U=F>N.value),Ge(M.value)||(Z=F<M.value)}else{const F=i.valueAsDate||new Date(w),q=T=>new Date(new Date().toDateString()+" "+T),k=i.type=="time",j=i.type=="week";Dt(N.value)&&w&&(U=k?q(w)>q(N.value):j?w>N.value:F>new Date(N.value)),Dt(M.value)&&w&&(Z=k?q(w)<q(M.value):j?w<M.value:F<new Date(M.value))}if((U||Z)&&(G(!!U,N.message,M.message,Ut.max,Ut.min),!n))return E(x[v].message),x}if((u||c)&&!H&&(Dt(w)||o&&Array.isArray(w))){const U=Kn(u),Z=Kn(c),N=!Ge(U.value)&&w.length>+U.value,M=!Ge(Z.value)&&w.length<+Z.value;if((N||M)&&(G(N,U.message,Z.message),!n))return E(x[v].message),x}if(m&&!H&&Dt(w)){const{value:U,message:Z}=Kn(m);if(Zo(U)&&!w.match(U)&&(x[v]={type:Ut.pattern,message:Z,ref:i,...D(Ut.pattern,Z)},!n))return E(Z),x}if(f){if(It(f)){const U=await f(w,t),Z=mp(U,C);if(Z&&(x[v]={...Z,...D(Ut.validate,Z.message)},!n))return E(Z.message),x}else if(Me(f)){let U={};for(const Z in f){if(!Qe(U)&&!n)break;const N=mp(await f[Z](w,t),C,Z);N&&(U={...N,...D(Z,N.message)},E(N.message),n&&(x[v]=U))}if(!Qe(U)&&(x[v]={ref:C,...U},!n))return x}}return E(!0),x};function nE(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=Ie(e)?r++:e[t[r++]];return e}function rE(e){for(const t in e)if(e.hasOwnProperty(t)&&!Ie(e[t]))return!1;return!0}function Ve(e,t){const n=Array.isArray(t)?t:Cs(t)?[t]:ap(t),r=n.length===1?e:nE(e,n),o=n.length-1,i=n[o];return r&&delete r[i],o!==0&&(Me(r)&&Qe(r)||Array.isArray(r)&&rE(r))&&Ve(e,n.slice(0,-1)),e}var _s=()=>{let e=[];return{get observers(){return e},next:o=>{for(const i of e)i.next&&i.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(i=>i!==o)}}),unsubscribe:()=>{e=[]}}},Ts=e=>Ge(e)||!ip(e);function sn(e,t){if(Ts(e)||Ts(t))return e===t;if(bn(e)&&bn(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n){const i=e[o];if(!r.includes(o))return!1;if(o!=="ref"){const a=t[o];if(bn(i)&&bn(a)||Me(i)&&Me(a)||Array.isArray(i)&&Array.isArray(a)?!sn(i,a):i!==a)return!1}}return!0}var vp=e=>e.type==="select-multiple",oE=e=>Es(e)||wr(e),As=e=>Xo(e)&&e.isConnected,yp=e=>{for(const t in e)if(It(e[t]))return!0;return!1};function Qo(e,t={}){const n=Array.isArray(e);if(Me(e)||n)for(const r in e)Array.isArray(e[r])||Me(e[r])&&!yp(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Qo(e[r],t[r])):Ge(e[r])||(t[r]=!0);return t}function xp(e,t,n){const r=Array.isArray(e);if(Me(e)||r)for(const o in e)Array.isArray(e[o])||Me(e[o])&&!yp(e[o])?Ie(t)||Ts(n[o])?n[o]=Array.isArray(e[o])?Qo(e[o],[]):{...Qo(e[o])}:xp(e[o],Ge(t)?{}:t[o],n[o]):n[o]=!sn(e[o],t[o]);return n}var Sr=(e,t)=>xp(e,t,Qo(t)),bp=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Ie(e)?e:t?e===""?NaN:e&&+e:n&&Dt(e)?new Date(e):r?r(e):e;function Ps(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return Ss(t)?t.files:Es(t)?gp(e.refs).value:vp(t)?[...t.selectedOptions].map(({value:n})=>n):wr(t)?fp(e.refs).value:bp(Ie(t.value)?e.ref.value:t.value,e)}var iE=(e,t,n,r)=>{const o={};for(const i of e){const a=se(t,i);a&&Fe(o,i,a._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}},Er=e=>Ie(e)?e:Zo(e)?e.source:Me(e)?Zo(e.value)?e.value.source:e.value:e;const wp="AsyncFunction";var aE=e=>!!e&&!!e.validate&&!!(It(e.validate)&&e.validate.constructor.name===wp||Me(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===wp)),sE=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Cp(e,t,n){const r=se(e,n);if(r||Cs(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const i=o.join("."),a=se(t,i),s=se(e,i);if(a&&!Array.isArray(a)&&n!==i)return{name:n};if(s&&s.type)return{name:i,error:s};o.pop()}return{name:n}}var lE=(e,t,n,r,o)=>o.isOnAll?!1:!n&&o.isOnTouch?!(t||e):(n?r.isOnBlur:o.isOnBlur)?!e:(n?r.isOnChange:o.isOnChange)?e:!0,cE=(e,t)=>!Ko(se(e,t)).length&&Ve(e,t);const uE={mode:bt.onSubmit,reValidateMode:bt.onChange,shouldFocusError:!0};function dE(e={}){let t={...uE,...e},n={submitCount:0,isDirty:!1,isLoading:It(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},o=Me(t.defaultValues)||Me(t.values)?ct(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:ct(o),a={action:!1,mount:!1,watch:!1},s={mount:new Set,unMount:new Set,array:new Set,watch:new Set},u,c=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},g={values:_s(),array:_s(),state:_s()},m=lp(t.mode),f=lp(t.reValidateMode),v=t.criteriaMode===bt.all,h=S=>A=>{clearTimeout(c),c=setTimeout(S,A)},y=async S=>{if(!t.disabled&&(d.isValid||S)){const A=t.resolver?Qe((await $()).errors):await D(r,!0);A!==n.isValid&&g.state.next({isValid:A})}},b=(S,A)=>{!t.disabled&&(d.isValidating||d.validatingFields)&&((S||Array.from(s.mount)).forEach(V=>{V&&(A?Fe(n.validatingFields,V,A):Ve(n.validatingFields,V))}),g.state.next({validatingFields:n.validatingFields,isValidating:!Qe(n.validatingFields)}))},w=(S,A=[],V,ne,J=!0,X=!0)=>{if(ne&&V&&!t.disabled){if(a.action=!0,X&&Array.isArray(se(r,S))){const z=V(se(r,S),ne.argA,ne.argB);J&&Fe(r,S,z)}if(X&&Array.isArray(se(n.errors,S))){const z=V(se(n.errors,S),ne.argA,ne.argB);J&&Fe(n.errors,S,z),cE(n.errors,S)}if(d.touchedFields&&X&&Array.isArray(se(n.touchedFields,S))){const z=V(se(n.touchedFields,S),ne.argA,ne.argB);J&&Fe(n.touchedFields,S,z)}d.dirtyFields&&(n.dirtyFields=Sr(o,i)),g.state.next({name:S,isDirty:U(S,A),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Fe(i,S,A)},C=(S,A)=>{Fe(n.errors,S,A),g.state.next({errors:n.errors})},E=S=>{n.errors=S,g.state.next({errors:n.errors,isValid:!1})},x=(S,A,V,ne)=>{const J=se(r,S);if(J){const X=se(i,S,Ie(V)?se(o,S):V);Ie(X)||ne&&ne.defaultChecked||A?Fe(i,S,A?X:Ps(J._f)):M(S,X),a.mount&&y()}},O=(S,A,V,ne,J)=>{let X=!1,z=!1;const Y={name:S};if(!t.disabled){const ye=!!(se(r,S)&&se(r,S)._f&&se(r,S)._f.disabled);if(!V||ne){d.isDirty&&(z=n.isDirty,n.isDirty=Y.isDirty=U(),X=z!==Y.isDirty);const we=ye||sn(se(o,S),A);z=!!(!ye&&se(n.dirtyFields,S)),we||ye?Ve(n.dirtyFields,S):Fe(n.dirtyFields,S,!0),Y.dirtyFields=n.dirtyFields,X=X||d.dirtyFields&&z!==!we}if(V){const we=se(n.touchedFields,S);we||(Fe(n.touchedFields,S,V),Y.touchedFields=n.touchedFields,X=X||d.touchedFields&&we!==V)}X&&J&&g.state.next(Y)}return X?Y:{}},I=(S,A,V,ne)=>{const J=se(n.errors,S),X=d.isValid&&Ft(A)&&n.isValid!==A;if(t.delayError&&V?(u=h(()=>C(S,V)),u(t.delayError)):(clearTimeout(c),u=null,V?Fe(n.errors,S,V):Ve(n.errors,S)),(V?!sn(J,V):J)||!Qe(ne)||X){const z={...ne,...X&&Ft(A)?{isValid:A}:{},errors:n.errors,name:S};n={...n,...z},g.state.next(z)}},$=async S=>{b(S,!0);const A=await t.resolver(i,t.context,iE(S||s.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return b(S),A},H=async S=>{const{errors:A}=await $(S);if(S)for(const V of S){const ne=se(A,V);ne?Fe(n.errors,V,ne):Ve(n.errors,V)}else n.errors=A;return A},D=async(S,A,V={valid:!0})=>{for(const ne in S){const J=S[ne];if(J){const{_f:X,...z}=J;if(X){const Y=s.array.has(X.name),ye=J._f&&aE(J._f);ye&&d.validatingFields&&b([ne],!0);const we=await hp(J,i,v,t.shouldUseNativeValidation&&!A,Y);if(ye&&d.validatingFields&&b([ne]),we[X.name]&&(V.valid=!1,A))break;!A&&(se(we,X.name)?Y?tE(n.errors,we,X.name):Fe(n.errors,X.name,we[X.name]):Ve(n.errors,X.name))}!Qe(z)&&await D(z,A,V)}}return V.valid},G=()=>{for(const S of s.unMount){const A=se(r,S);A&&(A._f.refs?A._f.refs.every(V=>!As(V)):!As(A._f.ref))&&oe(S)}s.unMount=new Set},U=(S,A)=>!t.disabled&&(S&&A&&Fe(i,S,A),!sn(B(),o)),Z=(S,A,V)=>QS(S,s,{...a.mount?i:Ie(A)?o:Dt(S)?{[S]:A}:A},V,A),N=S=>Ko(se(a.mount?i:o,S,t.shouldUnregister?se(o,S,[]):[])),M=(S,A,V={})=>{const ne=se(r,S);let J=A;if(ne){const X=ne._f;X&&(!X.disabled&&Fe(i,S,bp(A,X)),J=Xo(X.ref)&&Ge(A)?"":A,vp(X.ref)?[...X.ref.options].forEach(z=>z.selected=J.includes(z.value)):X.refs?wr(X.ref)?X.refs.length>1?X.refs.forEach(z=>(!z.defaultChecked||!z.disabled)&&(z.checked=Array.isArray(J)?!!J.find(Y=>Y===z.value):J===z.value)):X.refs[0]&&(X.refs[0].checked=!!J):X.refs.forEach(z=>z.checked=z.value===J):Ss(X.ref)?X.ref.value="":(X.ref.value=J,X.ref.type||g.values.next({name:S,values:{...i}})))}(V.shouldDirty||V.shouldTouch)&&O(S,J,V.shouldTouch,V.shouldDirty,!0),V.shouldValidate&&T(S)},F=(S,A,V)=>{for(const ne in A){const J=A[ne],X=`${S}.${ne}`,z=se(r,X);(s.array.has(S)||Me(J)||z&&!z._f)&&!bn(J)?F(X,J,V):M(X,J,V)}},q=(S,A,V={})=>{const ne=se(r,S),J=s.array.has(S),X=ct(A);Fe(i,S,X),J?(g.array.next({name:S,values:{...i}}),(d.isDirty||d.dirtyFields)&&V.shouldDirty&&g.state.next({name:S,dirtyFields:Sr(o,i),isDirty:U(S,X)})):ne&&!ne._f&&!Ge(X)?F(S,X,V):M(S,X,V),cp(S,s)&&g.state.next({...n}),g.values.next({name:a.mount?S:void 0,values:{...i}})},k=async S=>{a.mount=!0;const A=S.target;let V=A.name,ne=!0;const J=se(r,V),X=()=>A.type?Ps(J._f):qS(S),z=Y=>{ne=Number.isNaN(Y)||bn(Y)&&isNaN(Y.getTime())||sn(Y,se(i,V,Y))};if(J){let Y,ye;const we=X(),Te=S.type===sp.BLUR||S.type===sp.FOCUS_OUT,$t=!sE(J._f)&&!t.resolver&&!se(n.errors,V)&&!J._f.deps||lE(Te,se(n.touchedFields,V),n.isSubmitted,f,m),ut=cp(V,s,Te);Fe(i,V,we),Te?(J._f.onBlur&&J._f.onBlur(S),u&&u(0)):J._f.onChange&&J._f.onChange(S);const je=O(V,we,Te,!1),Wt=!Qe(je)||ut;if(!Te&&g.values.next({name:V,type:S.type,values:{...i}}),$t)return d.isValid&&(t.mode==="onBlur"?Te&&y():y()),Wt&&g.state.next({name:V,...ut?{}:je});if(!Te&&ut&&g.state.next({...n}),t.resolver){const{errors:qt}=await $([V]);if(z(we),ne){const Gt=Cp(n.errors,r,V),Se=Cp(qt,r,Gt.name||V);Y=Se.error,V=Se.name,ye=Qe(qt)}}else b([V],!0),Y=(await hp(J,i,v,t.shouldUseNativeValidation))[V],b([V]),z(we),ne&&(Y?ye=!1:d.isValid&&(ye=await D(r,!0)));ne&&(J._f.deps&&T(J._f.deps),I(V,ye,Y,je))}},j=(S,A)=>{if(se(n.errors,A)&&S.focus)return S.focus(),1},T=async(S,A={})=>{let V,ne;const J=Yo(S);if(t.resolver){const X=await H(Ie(S)?S:J);V=Qe(X),ne=S?!J.some(z=>se(X,z)):V}else S?(ne=(await Promise.all(J.map(async X=>{const z=se(r,X);return await D(z&&z._f?{[X]:z}:z)}))).every(Boolean),!(!ne&&!n.isValid)&&y()):ne=V=await D(r);return g.state.next({...!Dt(S)||d.isValid&&V!==n.isValid?{}:{name:S},...t.resolver||!S?{isValid:V}:{},errors:n.errors}),A.shouldFocus&&!ne&&Cr(r,j,S?J:s.mount),ne},B=S=>{const A={...a.mount?i:o};return Ie(S)?A:Dt(S)?se(A,S):S.map(V=>se(A,V))},Q=(S,A)=>({invalid:!!se((A||n).errors,S),isDirty:!!se((A||n).dirtyFields,S),error:se((A||n).errors,S),isValidating:!!se(n.validatingFields,S),isTouched:!!se((A||n).touchedFields,S)}),re=S=>{S&&Yo(S).forEach(A=>Ve(n.errors,A)),g.state.next({errors:S?n.errors:{}})},ee=(S,A,V)=>{const ne=(se(r,S,{_f:{}})._f||{}).ref,J=se(n.errors,S)||{},{ref:X,message:z,type:Y,...ye}=J;Fe(n.errors,S,{...ye,...A,ref:ne}),g.state.next({name:S,errors:n.errors,isValid:!1}),V&&V.shouldFocus&&ne&&ne.focus&&ne.focus()},ce=(S,A)=>It(S)?g.values.subscribe({next:V=>S(Z(void 0,A),V)}):Z(S,A,!0),oe=(S,A={})=>{for(const V of S?Yo(S):s.mount)s.mount.delete(V),s.array.delete(V),A.keepValue||(Ve(r,V),Ve(i,V)),!A.keepError&&Ve(n.errors,V),!A.keepDirty&&Ve(n.dirtyFields,V),!A.keepTouched&&Ve(n.touchedFields,V),!A.keepIsValidating&&Ve(n.validatingFields,V),!t.shouldUnregister&&!A.keepDefaultValue&&Ve(o,V);g.values.next({values:{...i}}),g.state.next({...n,...A.keepDirty?{isDirty:U()}:{}}),!A.keepIsValid&&y()},ae=({disabled:S,name:A,field:V,fields:ne,value:J})=>{if(Ft(S)&&a.mount||S){const X=S?void 0:Ie(J)?Ps(V?V._f:se(ne,A)._f):J;(S||!S&&!Ie(X))&&Fe(i,A,X),O(A,X,!1,!1,!0)}},de=(S,A={})=>{let V=se(r,S);const ne=Ft(A.disabled)||Ft(t.disabled);return Fe(r,S,{...V||{},_f:{...V&&V._f?V._f:{ref:{name:S}},name:S,mount:!0,...A}}),s.mount.add(S),V?ae({field:V,disabled:Ft(A.disabled)?A.disabled:t.disabled,name:S,value:A.value}):x(S,!0,A.value),{...ne?{disabled:A.disabled||t.disabled}:{},...t.progressive?{required:!!A.required,min:Er(A.min),max:Er(A.max),minLength:Er(A.minLength),maxLength:Er(A.maxLength),pattern:Er(A.pattern)}:{},name:S,onChange:k,onBlur:k,ref:J=>{if(J){de(S,A),V=se(r,S);const X=Ie(J.value)&&J.querySelectorAll&&J.querySelectorAll("input,select,textarea")[0]||J,z=oE(X),Y=V._f.refs||[];if(z?Y.find(ye=>ye===X):X===V._f.ref)return;Fe(r,S,{_f:{...V._f,...z?{refs:[...Y.filter(As),X,...Array.isArray(se(o,S))?[{}]:[]],ref:{type:X.type,name:S}}:{ref:X}}}),x(S,!1,void 0,X)}else V=se(r,S,{}),V._f&&(V._f.mount=!1),(t.shouldUnregister||A.shouldUnregister)&&!(KS(s.array,S)&&a.action)&&s.unMount.add(S)}}},ue=()=>t.shouldFocusError&&Cr(r,j,s.mount),le=S=>{Ft(S)&&(g.state.next({disabled:S}),Cr(r,(A,V)=>{const ne=se(r,V);ne&&(A.disabled=ne._f.disabled||S,Array.isArray(ne._f.refs)&&ne._f.refs.forEach(J=>{J.disabled=ne._f.disabled||S}))},0,!1))},Ce=(S,A)=>async V=>{let ne;if(V&&(V.preventDefault&&V.preventDefault(),V.persist&&V.persist()),t.disabled){A&&await A({...n.errors},V);return}let J=ct(i);if(g.state.next({isSubmitting:!0}),t.resolver){const{errors:X,values:z}=await $();n.errors=X,J=z}else await D(r);if(Ve(n.errors,"root"),Qe(n.errors)){g.state.next({errors:{}});try{await S(J,V)}catch(X){ne=X}}else A&&await A({...n.errors},V),ue(),setTimeout(ue);if(g.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Qe(n.errors)&&!ne,submitCount:n.submitCount+1,errors:n.errors}),ne)throw ne},K=(S,A={})=>{se(r,S)&&(Ie(A.defaultValue)?q(S,ct(se(o,S))):(q(S,A.defaultValue),Fe(o,S,ct(A.defaultValue))),A.keepTouched||Ve(n.touchedFields,S),A.keepDirty||(Ve(n.dirtyFields,S),n.isDirty=A.defaultValue?U(S,ct(se(o,S))):U()),A.keepError||(Ve(n.errors,S),d.isValid&&y()),g.state.next({...n}))},_e=(S,A={})=>{const V=S?ct(S):o,ne=ct(V),J=Qe(S),X=J?o:ne;if(A.keepDefaultValues||(o=V),!A.keepValues){if(A.keepDirtyValues){const z=new Set([...s.mount,...Object.keys(Sr(o,i))]);for(const Y of Array.from(z))se(n.dirtyFields,Y)?Fe(X,Y,se(i,Y)):q(Y,se(X,Y))}else{if(ws&&Ie(S))for(const z of s.mount){const Y=se(r,z);if(Y&&Y._f){const ye=Array.isArray(Y._f.refs)?Y._f.refs[0]:Y._f.ref;if(Xo(ye)){const we=ye.closest("form");if(we){we.reset();break}}}}r={}}i=t.shouldUnregister?A.keepDefaultValues?ct(o):{}:ct(X),g.array.next({values:{...X}}),g.values.next({values:{...X}})}s={mount:A.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!d.isValid||!!A.keepIsValid||!!A.keepDirtyValues,a.watch=!!t.shouldUnregister,g.state.next({submitCount:A.keepSubmitCount?n.submitCount:0,isDirty:J?!1:A.keepDirty?n.isDirty:!!(A.keepDefaultValues&&!sn(S,o)),isSubmitted:A.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:J?{}:A.keepDirtyValues?A.keepDefaultValues&&i?Sr(o,i):n.dirtyFields:A.keepDefaultValues&&S?Sr(o,S):A.keepDirty?n.dirtyFields:{},touchedFields:A.keepTouched?n.touchedFields:{},errors:A.keepErrors?n.errors:{},isSubmitSuccessful:A.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Ue=(S,A)=>_e(It(S)?S(i):S,A);return{control:{register:de,unregister:oe,getFieldState:Q,handleSubmit:Ce,setError:ee,_executeSchema:$,_getWatch:Z,_getDirty:U,_updateValid:y,_removeUnmounted:G,_updateFieldArray:w,_updateDisabledField:ae,_getFieldArray:N,_reset:_e,_resetDefaultValues:()=>It(t.defaultValues)&&t.defaultValues().then(S=>{Ue(S,t.resetOptions),g.state.next({isLoading:!1})}),_updateFormState:S=>{n={...n,...S}},_disableForm:le,_subjects:g,_proxyFormState:d,_setErrors:E,get _fields(){return r},get _formValues(){return i},get _state(){return a},set _state(S){a=S},get _defaultValues(){return o},get _names(){return s},set _names(S){s=S},get _formState(){return n},set _formState(S){n=S},get _options(){return t},set _options(S){t={...t,...S}}},trigger:T,register:de,handleSubmit:Ce,watch:ce,setValue:q,getValues:B,reset:Ue,resetField:K,clearErrors:re,unregister:oe,setError:ee,setFocus:(S,A={})=>{const V=se(r,S),ne=V&&V._f;if(ne){const J=ne.refs?ne.refs[0]:ne.ref;J.focus&&(J.focus(),A.shouldSelect&&It(J.select)&&J.select())}},getFieldState:Q}}function fE(e={}){const t=_.useRef(),n=_.useRef(),[r,o]=_.useState({isDirty:!1,isValidating:!1,isLoading:It(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:It(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...dE(e),formState:r});const i=t.current.control;return i._options=e,ZS({subject:i._subjects.state,next:a=>{JS(a,i._proxyFormState,i._updateFormState)&&o({...i._formState})}}),_.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),_.useEffect(()=>{if(i._proxyFormState.isDirty){const a=i._getDirty();a!==r.isDirty&&i._subjects.state.next({isDirty:a})}},[i,r.isDirty]),_.useEffect(()=>{e.values&&!sn(e.values,n.current)?(i._reset(e.values,i._options.resetOptions),n.current=e.values,o(a=>({...a}))):i._resetDefaultValues()},[e.values,i]),_.useEffect(()=>{e.errors&&i._setErrors(e.errors)},[e.errors,i]),_.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),_.useEffect(()=>{e.shouldUnregister&&i._subjects.values.next({values:i._getWatch()})},[e.shouldUnregister,i]),_.useMemo(()=>({...t.current,formState:XS(r,i)}),[r,i])}const Sp=({className:e,children:t,content:n,side:r})=>{const[o,i]=_.useState(!1);return l.jsx(Hn,{delayDuration:0,children:l.jsxs(Un,{open:o,children:[l.jsx(Wn,{asChild:!0,children:l.jsx("button",{type:"button",className:me("cursor-pointer",e),onClick:()=>i(!o),onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),onTouchStart:()=>i(!o),onKeyDown:a=>{a.preventDefault(),a.key==="Enter"&&i(!o)},children:t})}),l.jsx(yn,{side:r,className:n?"":"hidden",children:l.jsx("span",{className:"inline-block",children:n})})]})})},pE=(e,t)=>{const[n,r]=_.useState(e);return _.useEffect(()=>{const o=setTimeout(()=>{r(e)},t);return()=>{clearTimeout(o)}},[e,t]),n},gE=({apiBaseUrl:e="http://localhost:3002"})=>{var O,I;const[t,n]=_.useState([]),[r,o]=_.useState(!1),[i,a]=_.useState([]),[s,u]=_.useState(1),[c,d]=_.useState(1),[g,m]=_.useState(null),[f,v]=_.useState(""),h=pE(f,500),y=$=>{const H=$.match(/\d{6}/);if(!H)return{month:"",year:""};const D=H[0],G=D.substring(0,2),U=D.substring(2);return{month:G,year:U}},b=$=>$.map(D=>{let G=(D==null?void 0:D.month)||"",U=(D==null?void 0:D.year)||"";if((!G||!U)&&(D!=null&&D.file_name)){const Z=y(D.file_name);G=G||Z.month,U=U||Z.year}return{id:D==null?void 0:D.id,prefix:(D==null?void 0:D.prefix)||"",model:(D==null?void 0:D.model)||"",fileName:(D==null?void 0:D.file_name)||"",code:(D==null?void 0:D.stock_id)||"",month:G,year:U,content:(D==null?void 0:D.text_summary)||"",status:(D==null?void 0:D.status)||"",note:(D==null?void 0:D.note)||"",lastUpdate:D==null?void 0:D.updated_at,stock_id:D==null?void 0:D.stock_id}}),w=$=>{if(!($!=null&&$.data))return[];const H=b($==null?void 0:$.data);n(H),d($.pagination.totalPages)},C=async($=1,H=15)=>{m($),o(!0);try{const D=await he.get(`${e}/api/latest-summaries`,{params:{page:$,limit:H,search:f}});(D==null?void 0:D.status)===200?w(D.data):console.error(D)}catch(D){console.error("Error fetching data:",D)}finally{m(null),o(!1)}};_.useEffect(()=>{h&&u(1),C(s)},[s,h]);const E=_.useMemo(()=>[{id:"code",header:"Mã",accessorKey:"code",cell:({row:H})=>l.jsx("span",{className:"flex flex-col",children:H.original.code})},{id:"month",header:"Tháng",accessorKey:"month",cell:({row:H})=>{const D=H.original.month,G=H.original.year;return l.jsx("span",{className:"flex flex-col",children:`${D.toString().padStart(2,"0")}/${G}`})}},{id:"content",header:"Nội dung",accessorKey:"content",cell:({row:H})=>{const D=H.getValue("content");return l.jsx("div",{className:"text-start truncate text-ellipsis overflow-hidden whitespace-nowrap max-w-[30dvw]",children:D})}},{id:"status",header:"Trạng thái",accessorKey:"status",cell:({row:H})=>{const G=H.original.status!=="unpublish";return l.jsx("span",{className:`inline-flex items-center rounded-full px-2 py-0 text-[10px] font-bold ${G?"bg-green-50 text-green-700 ring-1 ring-inset ring-green-600/20":"bg-gray-50 text-gray-600 ring-1 ring-inset ring-gray-500/20"}`,children:G?"PUBLISHED":"UNPUBLISHED"})}},{id:"note",header:"Ghi chú",accessorKey:"note",cell:({row:H})=>l.jsx(Sp,{content:l.jsx("div",{className:"font-medium text-[16px] max-w-[90dvw]",children:H.original.note}),children:l.jsx("div",{className:"text-start truncate text-ellipsis overflow-hidden whitespace-nowrap max-w-[20dvw]",children:H.original.note})})},{id:"last-update",header:"Cập nhật",accessorKey:"last-update",cell:({row:H})=>{const D=new Date(H.original.lastUpdate),G=D.getDate(),U=D.getMonth()+1,Z=`ngày ${G} tháng ${U}`;return l.jsx("span",{className:"flex flex-col",children:Z})}},{accessorKey:"actions",header:()=>l.jsx("div",{className:"font-medium text-right",children:"Hành động"}),cell:({row:H})=>{const[D,G]=_.useState(!1),[U,Z]=_.useState(!1),[N,M]=_.useState(!1),{handleSubmit:F,register:q,reset:k}=fE(),j=H.original.id,T=H.getValue("status"),B=H.getValue("content"),[Q,re]=_.useState(!1),ee=async()=>{try{re(!0);const oe=T==="unpublish"?"published":"unpublish",ae=await he.patch(`${e}/api/toggle-publish/${j}`,{id:j,typeAction:"update",status:T,idInput:j,stock_id:H.original.stock_id,prefix:H.original.prefix,model:H.original.model,summary_result:H.original.content,note:H.original.note});ae.status===200?n(de=>de.map(ue=>ue.id===j?{...ue,status:oe}:ue)):console.error("Failed to toggle publish status:",ae)}catch(oe){console.error("Error toggling publish status:",oe)}finally{re(!1)}},ce=async oe=>{G(!0);try{const ae=await he.patch(`${e}/api/update-summary`,{note:oe.note,text_summary:oe.content,id:j});ae.status===200?(await C(s),Z(!1)):console.error("Failed to update summary:",ae)}catch(ae){console.error("Error updating summary:",ae)}return G(!1)};return l.jsxs("div",{className:"flex items-center justify-end gap-2",children:[l.jsx(be,{variant:"outline",size:"sm",onClick:()=>M(!0),className:"px-2 py-0.5 h-7",children:l.jsx(Eh,{className:"h-4 w-4"})}),l.jsx(jt,{open:N,onOpenChange:M,children:l.jsxs(Et,{className:"max-w-3xl max-h-[80vh]",children:[l.jsx(_t,{children:l.jsx(Tt,{children:"Nội dung chi tiết"})}),l.jsx("div",{className:"mt-4 overflow-y-auto max-h-[60vh]",children:l.jsx("div",{className:"whitespace-pre-wrap text-[16px] leading-relaxed",children:B})})]})}),l.jsxs(jt,{open:U,onOpenChange:oe=>{Z(oe),oe?k({content:H.original.content,note:H.original.note}):k()},children:[l.jsx(lo,{asChild:!0,children:l.jsx(be,{variant:"outline",size:"sm",onClick:()=>Z(!0),className:"px-2 py-0.5 h-7",children:"Sửa"})}),l.jsx(Et,{className:"rounded-lg sm:px-3 h-[calc(100dvh-200px)] min-w-[calc(100dvw-112px)]",children:l.jsxs(_t,{className:"flex flex-col gap-3",children:[l.jsx(Tt,{className:"max-sm:hidden text-center",children:"Sửa summary"}),l.jsxs("form",{className:"flex flex-col gap-3 h-full justify-between",onSubmit:F(ce),children:[l.jsxs("div",{className:"flex flex-col gap-2",children:[l.jsxs("div",{className:"flex flex-col items-start",children:[l.jsx("span",{children:"Nội dung:"}),l.jsx(ur,{placeholder:"Nội dung",className:"w-full input-scroll-bar",defaultValue:H.original.answer||"",rows:10,...q("content")})]}),l.jsxs("div",{className:"flex flex-col items-start",children:[l.jsx("span",{children:"Ghi chú:"}),l.jsx(ur,{placeholder:"Nội dung",className:"w-full input-scroll-bar",defaultValue:H.original.note||"",rows:1,...q("note")})]})]}),l.jsx("div",{className:"flex justify-end",children:l.jsx(be,{disabled:D,type:"submit",variant:"default",children:D?l.jsx($e,{className:"h-4 w-4 animate-spin"}):"Ok"})})]})]})})]}),l.jsx(be,{variant:"outline",size:"sm",onClick:ee,disabled:Q,className:"w-[70px] px-2 py-0.5 h-7",children:Q?l.jsx($e,{className:"h-4 w-4 animate-spin"}):T==="unpublish"?"Publish":"Unpublish"})]})}}],[]),x=Gs({data:t,columns:E,state:{columnFilters:i},enableRowSelection:!0,onColumnFiltersChange:a,getFilteredRowModel:Pg(),getCoreRowModel:qs()});return l.jsxs("div",{className:"space-y-4 s3-explr-container",children:[l.jsx("div",{className:"flex items-center space-x-4 s3-explr-toolbar",children:l.jsxs("div",{className:"relative max-w-sm",children:[l.jsx(nn,{placeholder:"Tìm kiếm theo mã...",value:f,onChange:$=>v($.target.value),className:"pr-8"}),f&&l.jsx(be,{variant:"ghost",size:"sm",className:"absolute right-1 top-1/2 -translate-y-1/2 h-6 w-6 p-0",onClick:()=>v(""),children:l.jsx(Vi,{className:"h-4 w-4"})})]})}),l.jsx("div",{className:"rounded-md border s3-explr-table-container",children:l.jsxs(mo,{className:"s3-explr-table",children:[l.jsx(ho,{className:"s3-explr-table-header",children:x.getHeaderGroups().map($=>l.jsx(vt,{className:"hover:bg-transparent s3-explr-header-row",children:$.headers.map(H=>l.jsx(At,{className:"s3-explr-header-cell",children:H.isPlaceholder?null:Lr(H.column.columnDef.header,H.getContext())},H.id))},$.id))}),l.jsx(vo,{className:"s3-explr-table-body",children:r?l.jsx(vt,{children:l.jsx(Je,{colSpan:E.length,className:"h-24 text-center",children:"Đang tải dữ liệu..."})}):(O=x.getRowModel().rows)!=null&&O.length?(I=x.getRowModel().rows)==null?void 0:I.map($=>l.jsx(vt,{className:"h-12 s3-explr-row",children:$.getVisibleCells().map(H=>l.jsx(Je,{className:"align-middle s3-explr-cell",children:Lr(H.column.columnDef.cell,H.getContext())},H.id))},$.id)):l.jsx(vt,{children:l.jsx(Je,{colSpan:E.length,className:"h-24 text-center",children:"Không có kết quả."})})})]})}),l.jsx("div",{className:"mt-4",children:l.jsx(co,{children:l.jsxs(uo,{children:[l.jsx(ht,{children:l.jsx(fo,{onClick:()=>u($=>Math.max(1,$-1)),className:s===1?"pointer-events-none opacity-50":"cursor-pointer"})}),Array.from({length:c},($,H)=>H+1).filter($=>$===1||$===c||Math.abs($-s)<=1).map(($,H,D)=>l.jsxs(l.Fragment,{children:[H>0&&D[H-1]!==$-1&&l.jsx(ht,{children:l.jsx(go,{})},$+"..."),l.jsx(ht,{children:l.jsx($n,{onClick:()=>u($),isActive:s===$,className:`cursor-pointer ${r?"pointer-events-none":""}`,children:g===$?l.jsx($e,{className:"h-4 w-4 animate-spin"}):$})},$)]})),l.jsx(ht,{children:l.jsx(po,{onClick:()=>u($=>Math.min(c,$+1)),className:s===c||g!==null?"pointer-events-none opacity-50":"cursor-pointer"})})]})})})]})},Ep=10,mE=_.memo(({apiBaseUrl:e="http://localhost:3002"})=>{const[t,n]=_.useState(1),[r,o]=_.useState([]),[i,a]=_.useState({total:0,page:1,limit:Ep,totalPages:1}),[s,u]=_.useState(!0),[c,d]=_.useState(null),[g,m]=_.useState(new Set),{toast:f}=Po(),[v,h]=_.useState(!1),y=async x=>{try{d(x);const O=await he.get(`${e}/api/jobs`,{params:{page:x.toString(),limit:Ep.toString()}});o(O.data.data),a(O.data.pagination)}catch{f({variant:"destructive",title:"Error",description:"Failed to fetch jobs. Please try again."})}finally{d(null),u(!1)}};_.useEffect(()=>{y(t)},[t,e]);const b=async x=>{m(O=>new Set(O).add(x.toString()));try{await he.post(`${e}/api/retry-job`,{jobId:x}),f({title:"Job Restarted",description:`Job ${x} has been successfully restarted.`}),y(t)}catch{f({variant:"destructive",title:"Retry Failed",description:`Failed to restart job ${x}. Please try again.`})}finally{m(O=>{const I=new Set(O);return I.delete(x.toString()),I})}},w=async()=>{h(!0),n(1),await y(1),h(!1)},C=x=>new Date(x).toLocaleString(),E=x=>{if(x=parseFloat(x),x<60)return`${x.toFixed(2)}s`;const O=Math.floor(x/60),I=(x%60).toFixed(0);return`${O}m ${I}s`};return l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[l.jsx(bh,{className:"w-8 h-8 text-primary"}),l.jsx("h2",{className:"text-3xl font-bold tracking-tight",children:"Job Management"}),l.jsx(be,{variant:"outline",size:"icon",onClick:w,disabled:v||s,className:"ml-2",children:l.jsx(Ah,{className:`h-4 w-4 ${v?"animate-spin":""}`})})]}),l.jsx("div",{className:"rounded-md border",children:l.jsxs(mo,{children:[l.jsx(ho,{children:l.jsxs(vt,{children:[l.jsx(At,{children:"ID"}),l.jsx(At,{children:"Tên Công Việc"}),l.jsx(At,{children:"Thời Gian Bắt Đầu"}),l.jsx(At,{children:"Thời Gian Cập Nhật"}),l.jsx(At,{children:"Thời Gian Thực Thi"}),l.jsx(At,{children:"Trạng Thái"}),l.jsx(At,{children:"Thao Tác"})]})}),l.jsx(vo,{children:s&&r.length===0?l.jsx(vt,{children:l.jsx(Je,{colSpan:7,className:"text-center py-4",children:l.jsx($e,{className:"w-6 h-6 animate-spin mx-auto"})})}):r.map(x=>{var O,I;return l.jsxs(vt,{children:[l.jsx(Je,{className:"!w-[100px]",children:x.id}),l.jsx(Je,{className:"font-medium",children:(O=x.job_name)==null?void 0:O.replace("Upload file","Summary")}),l.jsx(Je,{className:"!w-[200px]",children:C(x.created_at)}),l.jsx(Je,{className:"!w-[200px]",children:C(x.updated_at)}),l.jsx(Je,{className:"!w-[150px]",children:E(x.execution_time_seconds)}),l.jsx(Je,{className:"!w-[200px]",children:l.jsx(Sp,{content:x.status==="fail"&&x.error?l.jsx("div",{className:"font-medium text-[16px] max-w-[90dvw]",children:x.error}):null,children:l.jsx("div",{className:`inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium truncate text-ellipsis overflow-hidden whitespace-nowrap max-w-[30dvw]
176
+ ${x.status==="done"?"bg-green-100 text-green-800":x.status==="fail"?"bg-red-100 text-red-800":"bg-yellow-100 text-yellow-800"}`,children:x.status==="fail"?"FAILED":(I=x.status)==null?void 0:I.toUpperCase()})})}),l.jsx(Je,{className:"!w-[200px]",children:x.status==="fail"?l.jsx(be,{variant:"outline",size:"sm",onClick:()=>b(x.id),disabled:g.has(x.id.toString()),className:"h-[32px]",children:g.has(x.id.toString())?l.jsxs(l.Fragment,{children:[l.jsx($e,{className:"mr-2 h-4 w-4 animate-spin"}),"Đang thử lại..."]}):"Thử Lại"}):l.jsx("div",{className:"h-[32px]"})})]},x.id)})})]})}),l.jsx("div",{className:"mt-4",children:l.jsx(co,{children:l.jsxs(uo,{children:[l.jsx(ht,{children:l.jsx(fo,{onClick:()=>n(x=>Math.max(1,x-1)),className:t===1?"pointer-events-none opacity-50":"cursor-pointer"})}),Array.from({length:i.totalPages},(x,O)=>O+1).filter(x=>x===1||x===i.totalPages||Math.abs(x-t)<=1).map((x,O,I)=>l.jsxs(l.Fragment,{children:[O>0&&I[O-1]!==x-1&&l.jsx(ht,{children:l.jsx(go,{})},x+"..."),l.jsx(ht,{children:l.jsx($n,{onClick:()=>n(x),isActive:t===x,className:`cursor-pointer ${c!==null?"pointer-events-none":""}`,children:c===x?l.jsx($e,{className:"h-4 w-4 animate-spin"}):x})},x)]})),l.jsx(ht,{children:l.jsx(po,{onClick:()=>n(x=>Math.min(i.totalPages,x+1)),className:t===i.totalPages||c!==null?"pointer-events-none opacity-50":"cursor-pointer"})})]})})}),l.jsx(hd,{})]})});ft.Job=mE,ft.S3Explorer=WS,ft.Summary=gE,Object.defineProperty(ft,Symbol.toStringTag,{value:"Module"})});
176
177
  //# sourceMappingURL=s3-explorer.umd.cjs.map