dccxx-s3-explorer 1.0.60 → 1.0.62
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.
- package/dist/s3-explorer.js +11716 -8013
- package/dist/s3-explorer.js.map +1 -1
- package/dist/s3-explorer.umd.cjs +80 -54
- package/dist/s3-explorer.umd.cjs.map +1 -1
- package/package.json +137 -135
package/dist/s3-explorer.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(Rn,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],d):(Rn=typeof globalThis<"u"?globalThis:Rn||self,d(Rn.S3Explorer={},Rn.jsxRuntime,Rn.React,Rn.ReactDOM))})(this,function(Rn,d,L,jl){"use strict";function $f(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 v=$f(L),_a=$f(jl);function Bw({title:e,titleId:t,...n},r){return v.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?v.createElement("title",{id:t},e):null,v.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 Rf=v.forwardRef(Bw);function Uw({title:e,titleId:t,...n},r){return v.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?v.createElement("title",{id:t},e):null,v.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 Wl=v.forwardRef(Uw);function jw({title:e,titleId:t,...n},r){return v.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?v.createElement("title",{id:t},e):null,v.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 Ww=v.forwardRef(jw);function Hw({title:e,titleId:t,...n},r){return v.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?v.createElement("title",{id:t},e):null,v.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 Gw=v.forwardRef(Hw);function qw({title:e,titleId:t,...n},r){return v.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?v.createElement("title",{id:t},e):null,v.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 Hl=v.forwardRef(qw);function Kw({title:e,titleId:t,...n},r){return v.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?v.createElement("title",{id:t},e):null,v.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 Yw=v.forwardRef(Kw);function Xw({title:e,titleId:t,...n},r){return v.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?v.createElement("title",{id:t},e):null,v.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 Jw=v.forwardRef(Xw);function Zw({title:e,titleId:t,...n},r){return v.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?v.createElement("title",{id:t},e):null,v.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 Qw=v.forwardRef(Zw);function eb({title:e,titleId:t,...n},r){return v.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?v.createElement("title",{id:t},e):null,v.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 Vf=v.forwardRef(eb);function tb(e={}){const{nonce:t,onScriptLoadSuccess:n,onScriptLoadError:r}=e,[i,s]=L.useState(!1),l=L.useRef(n);l.current=n;const u=L.useRef(r);return u.current=r,L.useEffect(()=>{const g=document.createElement("script");return g.src="https://accounts.google.com/gsi/client",g.async=!0,g.defer=!0,g.nonce=t,g.onload=()=>{var f;s(!0),(f=l.current)===null||f===void 0||f.call(l)},g.onerror=()=>{var f;s(!1),(f=u.current)===null||f===void 0||f.call(u)},document.body.appendChild(g),()=>{document.body.removeChild(g)}},[t]),i}const zf=L.createContext(null);function nb({clientId:e,nonce:t,onScriptLoadSuccess:n,onScriptLoadError:r,children:i}){const s=tb({nonce:t,onScriptLoadSuccess:n,onScriptLoadError:r}),l=L.useMemo(()=>({clientId:e,scriptLoadedSuccessfully:s}),[e,s]);return L.createElement(zf.Provider,{value:l},i)}function rb(){const e=L.useContext(zf);if(!e)throw new Error("Google OAuth components must be used within GoogleOAuthProvider");return e}function ob({flow:e="implicit",scope:t="",onSuccess:n,onError:r,onNonOAuthError:i,overrideScope:s,state:l,...u}){const{clientId:g,scriptLoadedSuccessfully:f}=rb(),h=L.useRef(),y=L.useRef(n);y.current=n;const x=L.useRef(r);x.current=r;const m=L.useRef(i);m.current=i,L.useEffect(()=>{var S,A;if(!f)return;const P=e==="implicit"?"initTokenClient":"initCodeClient",N=(A=(S=window==null?void 0:window.google)===null||S===void 0?void 0:S.accounts)===null||A===void 0?void 0:A.oauth2[P]({client_id:g,scope:s?t:`openid profile email ${t}`,callback:D=>{var E,V;if(D.error)return(E=x.current)===null||E===void 0?void 0:E.call(x,D);(V=y.current)===null||V===void 0||V.call(y,D)},error_callback:D=>{var E;(E=m.current)===null||E===void 0||E.call(m,D)},state:l,...u});h.current=N},[g,f,e,t,l]);const w=L.useCallback(S=>{var A;return(A=h.current)===null||A===void 0?void 0:A.requestAccessToken(S)},[]),_=L.useCallback(()=>{var S;return(S=h.current)===null||S===void 0?void 0:S.requestCode()},[]);return e==="implicit"?w:_}/**
|
|
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
|
|
10
|
+
*/function Rr(e,t){return typeof e=="function"?e(t):e}function un(e,t){return n=>{t.setState(r=>({...r,[e]:Rr(n,r[e])}))}}function Sa(e){return e instanceof Function}function ib(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function ab(e,t){const n=[],r=i=>{i.forEach(s=>{n.push(s);const l=t(s);l!=null&&l.length&&r(l)})};return r(e),n}function Le(e,t,n){let r=[],i;return s=>{let l;n.key&&n.debug&&(l=Date.now());const u=e(s);if(!(u.length!==r.length||u.some((h,y)=>r[y]!==h)))return i;r=u;let f;if(n.key&&n.debug&&(f=Date.now()),i=t(...u),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){const h=Math.round((Date.now()-l)*100)/100,y=Math.round((Date.now()-f)*100)/100,x=y/16,m=(w,_)=>{for(w=String(w);w.length<_;)w=" "+w;return w};console.info(`%c⏱ ${m(y,5)} /${m(h,5)} ms`,`
|
|
11
11
|
font-size: .6rem;
|
|
12
12
|
font-weight: bold;
|
|
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 dg(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 fg(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 p=m;for(const v of u.split(".")){var h;p=(h=p)==null?void 0:h[v],process.env.NODE_ENV!=="production"&&p===void 0&&console.warn(`"${v}" in deeply nested key "${u}" returned undefined.`)}return p}: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(p=>p.getFlatColumns())]},pe(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:fe(()=>[e._getOrderColumnsFn()],m=>{var p;if((p=g.columns)!=null&&p.length){let h=g.columns.flatMap(v=>v.getLeafColumns());return m(h)}return[g]},pe(e.options,"debugColumns","column.getLeafColumns"))};for(const m of e._features)m.createColumn==null||m.createColumn(g,e);return g}const Ue="debugHeaders";function Us(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 pg={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 jr(t,[...s,...c,...u],e)},pe(e.options,Ue,"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))),jr(t,n,e,"center")),pe(e.options,Ue,"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 jr(t,i,e,"left")},pe(e.options,Ue,"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 jr(t,i,e,"right")},pe(e.options,Ue,"getRightHeaderGroups")),e.getFooterGroups=fe(()=>[e.getHeaderGroups()],t=>[...t].reverse(),pe(e.options,Ue,"getFooterGroups")),e.getLeftFooterGroups=fe(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),pe(e.options,Ue,"getLeftFooterGroups")),e.getCenterFooterGroups=fe(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),pe(e.options,Ue,"getCenterFooterGroups")),e.getRightFooterGroups=fe(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),pe(e.options,Ue,"getRightFooterGroups")),e.getFlatHeaders=fe(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),pe(e.options,Ue,"getFlatHeaders")),e.getLeftFlatHeaders=fe(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),pe(e.options,Ue,"getLeftFlatHeaders")),e.getCenterFlatHeaders=fe(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),pe(e.options,Ue,"getCenterFlatHeaders")),e.getRightFlatHeaders=fe(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),pe(e.options,Ue,"getRightFlatHeaders")),e.getCenterLeafHeaders=fe(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),pe(e.options,Ue,"getCenterLeafHeaders")),e.getLeftLeafHeaders=fe(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),pe(e.options,Ue,"getLeftLeafHeaders")),e.getRightLeafHeaders=fe(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),pe(e.options,Ue,"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,Ue,"getLeafHeaders"))}};function jr(e,t,n,r){var o,i;let a=0;const s=function(m,p){p===void 0&&(p=1),a=Math.max(a,p),m.filter(h=>h.getIsVisible()).forEach(h=>{var v;(v=h.columns)!=null&&v.length&&s(h.columns,p+1)},0)};s(e);let u=[];const c=(m,p)=>{const h={depth:p,id:[r,`${p}`].filter(Boolean).join("_"),headers:[]},v=[];m.forEach(y=>{const b=[...v].reverse()[0],w=y.column.depth===h.depth;let S,E=!1;if(w&&y.column.parent?S=y.column.parent:(S=y.column,E=!0),b&&(b==null?void 0:b.column)===S)b.subHeaders.push(y);else{const x=Us(n,S,{id:[r,p,S.id,y==null?void 0:y.id].filter(Boolean).join("_"),isPlaceholder:E,placeholderId:E?`${v.filter(N=>N.column===S).length}`:void 0,depth:p,index:v.length});x.subHeaders.push(y),v.push(x)}h.headers.push(y),y.headerGroup=h}),u.push(h),p>0&&c(v,p-1)},d=t.map((m,p)=>Us(n,m,{depth:a,index:p}));c(d,a-1),u.reverse();const g=m=>m.filter(h=>h.column.getIsVisible()).map(h=>{let v=0,y=0,b=[0];h.subHeaders&&h.subHeaders.length?(b=[],g(h.subHeaders).forEach(S=>{let{colSpan:E,rowSpan:x}=S;v+=E,b.push(x)})):v=1;const w=Math.min(...b);return y=y+w,h.colSpan=v,h.rowSpan=y,{colSpan:v,rowSpan:y}});return g((o=(i=u[0])==null?void 0:i.headers)!=null?o:[]),u}const fi=(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:()=>ug(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=>dg(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},gg={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()}}},Ws=(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))};Ws.autoRemove=e=>gt(e);const qs=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};qs.autoRemove=e=>gt(e);const Gs=(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())};Gs.autoRemove=e=>gt(e);const Ks=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};Ks.autoRemove=e=>gt(e)||!(e!=null&&e.length);const Ys=(e,t,n)=>!n.some(r=>{var o;return!((o=e.getValue(t))!=null&&o.includes(r))});Ys.autoRemove=e=>gt(e)||!(e!=null&&e.length);const Xs=(e,t,n)=>n.some(r=>{var o;return(o=e.getValue(t))==null?void 0:o.includes(r)});Xs.autoRemove=e=>gt(e)||!(e!=null&&e.length);const Js=(e,t,n)=>e.getValue(t)===n;Js.autoRemove=e=>gt(e);const Zs=(e,t,n)=>e.getValue(t)==n;Zs.autoRemove=e=>gt(e);const pi=(e,t,n)=>{let[r,o]=n;const i=e.getValue(t);return i>=r&&i<=o};pi.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]},pi.autoRemove=e=>gt(e)||gt(e[0])&>(e[1]);const jt={includesString:Ws,includesStringSensitive:qs,equalsString:Gs,arrIncludes:Ks,arrIncludesAll:Ys,arrIncludesSome:Xs,equals:Js,weakEquals:Zs,inNumberRange:pi};function gt(e){return e==null||e===""}const mg={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:rt("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"?jt.includesString:typeof r=="number"?jt.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?jt.equals:Array.isArray(r)?jt.arrIncludes:jt.weakEquals},e.getFilterFn=()=>{var n,r;return Vr(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:jt[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=Yt(n,i?i.value:void 0);if(Qs(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=Yt(t,o))==null?void 0:i.filter(a=>{const s=n.find(u=>u.id===a.id);if(s){const u=s.getFilterFn();if(Qs(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 Qs(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const gi={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(!cg(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},hg={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:rt("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 gi.sum;if(Object.prototype.toString.call(r)==="[object Date]")return gi.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return Vr(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:gi[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 vg(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 yg={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:rt("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=fe(n=>[or(t,n)],n=>n.findIndex(r=>r.id===e.id),pe(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var r;return((r=or(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const o=or(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 vg(i,n,r)},pe(e.options,"debugTable","_getOrderColumnsFn"))}},mi=()=>({left:[],right:[]}),xg={getInitialState:e=>({columnPinning:mi(),...e}),getDefaultOptions:e=>({onColumnPinningChange:rt("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?mi():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:mi())},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"))}},zr={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},hi=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),bg={getDefaultColumnDef:()=>zr,getInitialState:e=>({columnSizing:{},columnSizingInfo:hi(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:rt("columnSizing",e),onColumnSizingInfoChange:rt("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:zr.minSize,(r=i??e.columnDef.size)!=null?r:zr.size),(o=e.columnDef.maxSize)!=null?o:zr.maxSize)},e.getStart=fe(n=>[n,or(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,or(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(),vi(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=vi(i)?Math.round(i.touches[0].clientX):i.clientX,c={},d=(b,w)=>{typeof w=="number"&&(t.setColumnSizingInfo(S=>{var E,x;const N=t.options.columnResizeDirection==="rtl"?-1:1,I=(w-((E=S==null?void 0:S.startOffset)!=null?E:0))*N,M=Math.max(I/((x=S==null?void 0:S.startSize)!=null?x:0),-.999999);return S.columnSizingStart.forEach(H=>{let[O,G]=H;c[O]=Math.round(Math.max(G+G*M,0)*100)/100}),{...S,deltaOffset:I,deltaPercentage:M}}),(t.options.columnResizeMode==="onChange"||b==="end")&&t.setColumnSizing(S=>({...S,...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:[]}))},p=n||typeof document<"u"?document:null,h={moveHandler:b=>g(b.clientX),upHandler:b=>{p==null||p.removeEventListener("mousemove",h.moveHandler),p==null||p.removeEventListener("mouseup",h.upHandler),m(b.clientX)}},v={moveHandler:b=>(b.cancelable&&(b.preventDefault(),b.stopPropagation()),g(b.touches[0].clientX),!1),upHandler:b=>{var w;p==null||p.removeEventListener("touchmove",v.moveHandler),p==null||p.removeEventListener("touchend",v.upHandler),b.cancelable&&(b.preventDefault(),b.stopPropagation()),m((w=b.touches[0])==null?void 0:w.clientX)}},y=wg()?{passive:!1}:!1;vi(i)?(p==null||p.addEventListener("touchmove",v.moveHandler,y),p==null||p.addEventListener("touchend",v.upHandler,y)):(p==null||p.addEventListener("mousemove",h.moveHandler,y),p==null||p.addEventListener("mouseup",h.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?hi():(n=e.initialState.columnSizingInfo)!=null?n:hi())},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 Br=null;function wg(){if(typeof Br=="boolean")return Br;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 Br=e,Br}function vi(e){return e.type==="touchstart"}const Sg={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:rt("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 or(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const Cg={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()}}},Eg={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:rt("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=()=>jt.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return Vr(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:jt[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},_g={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:rt("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()}}}},yi=0,xi=10,bi=()=>({pageIndex:yi,pageSize:xi}),Tg={getInitialState:e=>({...e,pagination:{...bi(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:rt("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=>Yt(r,i);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(o)},e.resetPagination=r=>{var o;e.setPagination(r?bi():(o=e.initialState.pagination)!=null?o:bi())},e.setPageIndex=r=>{e.setPagination(o=>{let i=Yt(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?yi:(o=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageIndex)!=null?o:yi)},e.resetPageSize=r=>{var o,i;e.setPageSize(r?xi:(o=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageSize)!=null?o:xi)},e.setPageSize=r=>{e.setPagination(o=>{const i=Math.max(1,Yt(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=Yt(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}}},wi=()=>({top:[],bottom:[]}),Ag={getInitialState:e=>({rowPinning:wi(),...e}),getDefaultOptions:e=>({onRowPinningChange:rt("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(v=>!(s!=null&&s.has(v))),bottom:[...((m=u==null?void 0:u.bottom)!=null?m:[]).filter(v=>!(s!=null&&s.has(v))),...Array.from(s)]}}if(n==="top"){var p,h;return{top:[...((p=u==null?void 0:u.top)!=null?p:[]).filter(v=>!(s!=null&&s.has(v))),...Array.from(s)],bottom:((h=u==null?void 0:u.bottom)!=null?h:[]).filter(v=>!(s!=null&&s.has(v)))}}return{top:((c=u==null?void 0:u.top)!=null?c:[]).filter(v=>!(s!=null&&s.has(v))),bottom:((d=u==null?void 0:u.bottom)!=null?d:[]).filter(v=>!(s!=null&&s.has(v)))}})},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?wi():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:wi())},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"))}},Pg={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:rt("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=>{Si(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?Ci(e,n):{rows:[],flatRows:[],rowsById:{}},pe(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=fe(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?Ci(e,n):{rows:[],flatRows:[],rowsById:{}},pe(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=fe(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?Ci(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 Si(s,e.id,n,(a=r==null?void 0:r.selectChildren)!=null?a:!0,t),s})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return Ei(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return _i(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return _i(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)}}}},Si=(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=>Si(e,s.id,n,r,o))};function Ci(e,t){const n=e.getState().rowSelection,r=[],o={},i=function(a,s){return a.map(u=>{var c;const d=Ei(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 Ei(e,t){var n;return(n=t[e.id])!=null?n:!1}function _i(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()&&(Ei(a,t)?i=!0:o=!1),a.subRows&&a.subRows.length)){const s=_i(a,t);s==="all"?i=!0:(s==="some"&&(i=!0),o=!1)}}),o?"all":i?"some":!1}const Ti=/([0-9]+)/gm,Ng=(e,t,n)=>el(Xt(e.getValue(n)).toLowerCase(),Xt(t.getValue(n)).toLowerCase()),kg=(e,t,n)=>el(Xt(e.getValue(n)),Xt(t.getValue(n))),Og=(e,t,n)=>Ai(Xt(e.getValue(n)).toLowerCase(),Xt(t.getValue(n)).toLowerCase()),Fg=(e,t,n)=>Ai(Xt(e.getValue(n)),Xt(t.getValue(n))),Dg=(e,t,n)=>{const r=e.getValue(n),o=t.getValue(n);return r>o?1:r<o?-1:0},Ig=(e,t,n)=>Ai(e.getValue(n),t.getValue(n));function Ai(e,t){return e===t?0:e>t?1:-1}function Xt(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function el(e,t){const n=e.split(Ti).filter(Boolean),r=t.split(Ti).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 ir={alphanumeric:Ng,alphanumericCaseSensitive:kg,text:Og,textCaseSensitive:Fg,datetime:Dg,basic:Ig},Mg=[pg,Sg,yg,xg,gg,mg,Cg,Eg,{getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:rt("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 ir.datetime;if(typeof i=="string"&&(r=!0,i.split(Ti).length>1))return ir.alphanumeric}return r?ir.text:ir.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 Vr(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:ir[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 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(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())}},hg,_g,Tg,Ag,Pg,bg];function $g(e){var t,n;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const r=[...Mg,...(t=e._features)!=null?t:[]];let o={_features:r};const i=o._features.reduce((m,p)=>Object.assign(m,p.getDefaultOptions==null?void 0:p.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 p;u=(p=m.getInitialState==null?void 0:m.getInitialState(u))!=null?p: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(p=>setTimeout(()=>{throw p})))},reset:()=>{o.setState(o.initialState)},setOptions:m=>{const p=Yt(m,o.options);o.options=a(p)},getState:()=>o.options.state,setState:m=>{o.options.onStateChange==null||o.options.onStateChange(m)},_getRowId:(m,p,h)=>{var v;return(v=o.options.getRowId==null?void 0:o.options.getRowId(m,p,h))!=null?v:`${h?[h.id,p].join("."):p}`},getCoreRowModel:()=>(o._getCoreRowModel||(o._getCoreRowModel=o.options.getCoreRowModel(o)),o._getCoreRowModel()),getRowModel:()=>o.getPaginationRowModel(),getRow:(m,p)=>{let h=(p?o.getPrePaginationRowModel():o.getRowModel()).rowsById[m];if(!h&&(h=o.getCoreRowModel().rowsById[m],!h))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${m}`):new Error;return h},_getDefaultColumnDef:fe(()=>[o.options.defaultColumn],m=>{var p;return m=(p=m)!=null?p:{},{header:h=>{const v=h.header.column.columnDef;return v.accessorKey?v.accessorKey:v.accessorFn?v.id:null},cell:h=>{var v,y;return(v=(y=h.renderValue())==null||y.toString==null?void 0:y.toString())!=null?v:null},...o._features.reduce((h,v)=>Object.assign(h,v.getDefaultColumnDef==null?void 0:v.getDefaultColumnDef()),{}),...m}},pe(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>o.options.columns,getAllColumns:fe(()=>[o._getColumnDefs()],m=>{const p=function(h,v,y){return y===void 0&&(y=0),h.map(b=>{const w=fg(o,b,y,v),S=b;return w.columns=S.columns?p(S.columns,w,y+1):[],w})};return p(m)},pe(e,"debugColumns","getAllColumns")),getAllFlatColumns:fe(()=>[o.getAllColumns()],m=>m.flatMap(p=>p.getFlatColumns()),pe(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:fe(()=>[o.getAllFlatColumns()],m=>m.reduce((p,h)=>(p[h.id]=h,p),{}),pe(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:fe(()=>[o.getAllColumns(),o._getOrderColumnsFn()],(m,p)=>{let h=m.flatMap(v=>v.getLeafColumns());return p(h)},pe(e,"debugColumns","getAllLeafColumns")),getColumn:m=>{const p=o._getAllFlatColumnsById()[m];return process.env.NODE_ENV!=="production"&&!p&&console.error(`[Table] Column with id '${m}' does not exist.`),p}};Object.assign(o,g);for(let m=0;m<o._features.length;m++){const p=o._features[m];p==null||p.createTable==null||p.createTable(o)}return o}function tl(){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=fi(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 Lg(e,t,n){return n.options.filterFromLeafRows?Rg(e,t,n):Vg(e,t,n)}function Rg(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 p=u[m];const h=fi(n,p.id,p.original,p.index,p.depth,void 0,p.parentId);if(h.columnFilters=p.columnFilters,(g=p.subRows)!=null&&g.length&&c<a){if(h.subRows=s(p.subRows,c+1),p=h,t(p)&&!h.subRows.length){d.push(p),i[p.id]=p,o.push(p);continue}if(t(p)||h.subRows.length){d.push(p),i[p.id]=p,o.push(p);continue}}else p=h,t(p)&&(d.push(p),i[p.id]=p,o.push(p))}return d};return{rows:s(e),flatRows:o,rowsById:i}}function Vg(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 p=u[m];if(t(p)){var g;if((g=p.subRows)!=null&&g.length&&c<a){const v=fi(n,p.id,p.original,p.index,p.depth,void 0,p.parentId);v.subRows=s(p.subRows,c+1),p=v}d.push(p),o.push(p),i[p.id]=p}}return d};return{rows:s(e),flatRows:o,rowsById:i}}function jg(){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 p;const h=e.getColumn(m.id);if(!h)return;const v=h.getFilterFn();if(!v){process.env.NODE_ENV!=="production"&&console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${h.id}.`);return}o.push({id:m.id,filterFn:v,resolvedValue:(p=v.resolveFilterValue==null?void 0:v.resolveFilterValue(m.value))!=null?p: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 p;i.push({id:m.id,filterFn:s,resolvedValue:(p=s.resolveFilterValue==null?void 0:s.resolveFilterValue(r))!=null?p:r})}));let c,d;for(let m=0;m<t.flatRows.length;m++){const p=t.flatRows[m];if(p.columnFilters={},o.length)for(let h=0;h<o.length;h++){c=o[h];const v=c.id;p.columnFilters[v]=c.filterFn(p,v,c.resolvedValue,y=>{p.columnFiltersMeta[v]=y})}if(i.length){for(let h=0;h<i.length;h++){d=i[h];const v=d.id;if(d.filterFn(p,v,d.resolvedValue,y=>{p.columnFiltersMeta[v]=y})){p.columnFilters.__global__=!0;break}}p.columnFilters.__global__!==!0&&(p.columnFilters.__global__=!1)}}const g=m=>{for(let p=0;p<a.length;p++)if(m.columnFilters[a[p]]===!1)return!1;return!0};return Lg(t.rows,g,e)},pe(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function zg(){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 m;const h=i[p],v=a[h.id],y=v.sortUndefined,b=(m=h==null?void 0:h.desc)!=null?m:!1;let w=0;if(y){const S=d.getValue(h.id),E=g.getValue(h.id),x=S===void 0,N=E===void 0;if(x||N){if(y==="first")return x?-1:1;if(y==="last")return x?1:-1;w=x&&N?0:x?y:-y}}if(w===0&&(w=v.sortingFn(d,g,h.id)),w!==0)return b&&(w*=-1),v.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()))}/**
|
|
13
|
+
color: hsl(${Math.max(0,Math.min(120-120*x,120))}deg 100% 31%);`,n==null?void 0:n.key)}return i}}function Me(e,t,n,r){return{debug:()=>{var i;return(i=e==null?void 0:e.debugAll)!=null?i:e[t]},key:process.env.NODE_ENV==="development"&&n,onChange:r}}function sb(e,t,n,r){const i=()=>{var l;return(l=s.getValue())!=null?l:e.options.renderFallbackValue},s={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:i,getContext:Le(()=>[e,n,t,s],(l,u,g,f)=>({table:l,column:u,row:g,cell:f,getValue:f.getValue,renderValue:f.renderValue}),Me(e.options,"debugCells","cell.getContext"))};return e._features.forEach(l=>{l.createCell==null||l.createCell(s,n,t,e)},{}),s}function lb(e,t,n,r){var i,s;const u={...e._getDefaultColumnDef(),...t},g=u.accessorKey;let f=(i=(s=u.id)!=null?s:g?typeof String.prototype.replaceAll=="function"?g.replaceAll(".","_"):g.replace(/\./g,"_"):void 0)!=null?i:typeof u.header=="string"?u.header:void 0,h;if(u.accessorFn?h=u.accessorFn:g&&(g.includes(".")?h=x=>{let m=x;for(const _ of g.split(".")){var w;m=(w=m)==null?void 0:w[_],process.env.NODE_ENV!=="production"&&m===void 0&&console.warn(`"${_}" in deeply nested key "${g}" returned undefined.`)}return m}:h=x=>x[u.accessorKey]),!f)throw process.env.NODE_ENV!=="production"?new Error(u.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let y={id:`${String(f)}`,accessorFn:h,parent:r,depth:n,columnDef:u,columns:[],getFlatColumns:Le(()=>[!0],()=>{var x;return[y,...(x=y.columns)==null?void 0:x.flatMap(m=>m.getFlatColumns())]},Me(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:Le(()=>[e._getOrderColumnsFn()],x=>{var m;if((m=y.columns)!=null&&m.length){let w=y.columns.flatMap(_=>_.getLeafColumns());return x(w)}return[y]},Me(e.options,"debugColumns","column.getLeafColumns"))};for(const x of e._features)x.createColumn==null||x.createColumn(y,e);return y}const Bt="debugHeaders";function Bf(e,t,n){var r;let s={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 l=[],u=g=>{g.subHeaders&&g.subHeaders.length&&g.subHeaders.map(u),l.push(g)};return u(s),l},getContext:()=>({table:e,header:s,column:t})};return e._features.forEach(l=>{l.createHeader==null||l.createHeader(s,e)}),s}const cb={createTable:e=>{e.getHeaderGroups=Le(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>{var s,l;const u=(s=r==null?void 0:r.map(y=>n.find(x=>x.id===y)).filter(Boolean))!=null?s:[],g=(l=i==null?void 0:i.map(y=>n.find(x=>x.id===y)).filter(Boolean))!=null?l:[],f=n.filter(y=>!(r!=null&&r.includes(y.id))&&!(i!=null&&i.includes(y.id)));return Ca(t,[...u,...f,...g],e)},Me(e.options,Bt,"getHeaderGroups")),e.getCenterHeaderGroups=Le(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>(n=n.filter(s=>!(r!=null&&r.includes(s.id))&&!(i!=null&&i.includes(s.id))),Ca(t,n,e,"center")),Me(e.options,Bt,"getCenterHeaderGroups")),e.getLeftHeaderGroups=Le(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var i;const s=(i=r==null?void 0:r.map(l=>n.find(u=>u.id===l)).filter(Boolean))!=null?i:[];return Ca(t,s,e,"left")},Me(e.options,Bt,"getLeftHeaderGroups")),e.getRightHeaderGroups=Le(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var i;const s=(i=r==null?void 0:r.map(l=>n.find(u=>u.id===l)).filter(Boolean))!=null?i:[];return Ca(t,s,e,"right")},Me(e.options,Bt,"getRightHeaderGroups")),e.getFooterGroups=Le(()=>[e.getHeaderGroups()],t=>[...t].reverse(),Me(e.options,Bt,"getFooterGroups")),e.getLeftFooterGroups=Le(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),Me(e.options,Bt,"getLeftFooterGroups")),e.getCenterFooterGroups=Le(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),Me(e.options,Bt,"getCenterFooterGroups")),e.getRightFooterGroups=Le(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),Me(e.options,Bt,"getRightFooterGroups")),e.getFlatHeaders=Le(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),Me(e.options,Bt,"getFlatHeaders")),e.getLeftFlatHeaders=Le(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),Me(e.options,Bt,"getLeftFlatHeaders")),e.getCenterFlatHeaders=Le(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),Me(e.options,Bt,"getCenterFlatHeaders")),e.getRightFlatHeaders=Le(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),Me(e.options,Bt,"getRightFlatHeaders")),e.getCenterLeafHeaders=Le(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Me(e.options,Bt,"getCenterLeafHeaders")),e.getLeftLeafHeaders=Le(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Me(e.options,Bt,"getLeftLeafHeaders")),e.getRightLeafHeaders=Le(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Me(e.options,Bt,"getRightLeafHeaders")),e.getLeafHeaders=Le(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var i,s,l,u,g,f;return[...(i=(s=t[0])==null?void 0:s.headers)!=null?i:[],...(l=(u=n[0])==null?void 0:u.headers)!=null?l:[],...(g=(f=r[0])==null?void 0:f.headers)!=null?g:[]].map(h=>h.getLeafHeaders()).flat()},Me(e.options,Bt,"getLeafHeaders"))}};function Ca(e,t,n,r){var i,s;let l=0;const u=function(x,m){m===void 0&&(m=1),l=Math.max(l,m),x.filter(w=>w.getIsVisible()).forEach(w=>{var _;(_=w.columns)!=null&&_.length&&u(w.columns,m+1)},0)};u(e);let g=[];const f=(x,m)=>{const w={depth:m,id:[r,`${m}`].filter(Boolean).join("_"),headers:[]},_=[];x.forEach(S=>{const A=[..._].reverse()[0],P=S.column.depth===w.depth;let N,D=!1;if(P&&S.column.parent?N=S.column.parent:(N=S.column,D=!0),A&&(A==null?void 0:A.column)===N)A.subHeaders.push(S);else{const E=Bf(n,N,{id:[r,m,N.id,S==null?void 0:S.id].filter(Boolean).join("_"),isPlaceholder:D,placeholderId:D?`${_.filter(V=>V.column===N).length}`:void 0,depth:m,index:_.length});E.subHeaders.push(S),_.push(E)}w.headers.push(S),S.headerGroup=w}),g.push(w),m>0&&f(_,m-1)},h=t.map((x,m)=>Bf(n,x,{depth:l,index:m}));f(h,l-1),g.reverse();const y=x=>x.filter(w=>w.column.getIsVisible()).map(w=>{let _=0,S=0,A=[0];w.subHeaders&&w.subHeaders.length?(A=[],y(w.subHeaders).forEach(N=>{let{colSpan:D,rowSpan:E}=N;_+=D,A.push(E)})):_=1;const P=Math.min(...A);return S=S+P,w.colSpan=_,w.rowSpan=S,{colSpan:_,rowSpan:S}});return y((i=(s=g[0])==null?void 0:s.headers)!=null?i:[]),g}const Gl=(e,t,n,r,i,s,l)=>{let u={id:t,index:r,original:n,depth:i,parentId:l,_valuesCache:{},_uniqueValuesCache:{},getValue:g=>{if(u._valuesCache.hasOwnProperty(g))return u._valuesCache[g];const f=e.getColumn(g);if(f!=null&&f.accessorFn)return u._valuesCache[g]=f.accessorFn(u.original,r),u._valuesCache[g]},getUniqueValues:g=>{if(u._uniqueValuesCache.hasOwnProperty(g))return u._uniqueValuesCache[g];const f=e.getColumn(g);if(f!=null&&f.accessorFn)return f.columnDef.getUniqueValues?(u._uniqueValuesCache[g]=f.columnDef.getUniqueValues(u.original,r),u._uniqueValuesCache[g]):(u._uniqueValuesCache[g]=[u.getValue(g)],u._uniqueValuesCache[g])},renderValue:g=>{var f;return(f=u.getValue(g))!=null?f:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>ab(u.subRows,g=>g.subRows),getParentRow:()=>u.parentId?e.getRow(u.parentId,!0):void 0,getParentRows:()=>{let g=[],f=u;for(;;){const h=f.getParentRow();if(!h)break;g.push(h),f=h}return g.reverse()},getAllCells:Le(()=>[e.getAllLeafColumns()],g=>g.map(f=>sb(e,u,f,f.id)),Me(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:Le(()=>[u.getAllCells()],g=>g.reduce((f,h)=>(f[h.column.id]=h,f),{}),Me(e.options,"debugRows","getAllCellsByColumnId"))};for(let g=0;g<e._features.length;g++){const f=e._features[g];f==null||f.createRow==null||f.createRow(u,e)}return u},ub={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()}}},Uf=(e,t,n)=>{var r,i;const s=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((i=e.getValue(t))==null||(i=i.toString())==null||(i=i.toLowerCase())==null)&&i.includes(s))};Uf.autoRemove=e=>Vn(e);const jf=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};jf.autoRemove=e=>Vn(e);const Wf=(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())};Wf.autoRemove=e=>Vn(e);const Hf=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};Hf.autoRemove=e=>Vn(e)||!(e!=null&&e.length);const Gf=(e,t,n)=>!n.some(r=>{var i;return!((i=e.getValue(t))!=null&&i.includes(r))});Gf.autoRemove=e=>Vn(e)||!(e!=null&&e.length);const qf=(e,t,n)=>n.some(r=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(r)});qf.autoRemove=e=>Vn(e)||!(e!=null&&e.length);const Kf=(e,t,n)=>e.getValue(t)===n;Kf.autoRemove=e=>Vn(e);const Yf=(e,t,n)=>e.getValue(t)==n;Yf.autoRemove=e=>Vn(e);const ql=(e,t,n)=>{let[r,i]=n;const s=e.getValue(t);return s>=r&&s<=i};ql.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,i=typeof n!="number"?parseFloat(n):n,s=t===null||Number.isNaN(r)?-1/0:r,l=n===null||Number.isNaN(i)?1/0:i;if(s>l){const u=s;s=l,l=u}return[s,l]},ql.autoRemove=e=>Vn(e)||Vn(e[0])&&Vn(e[1]);const xr={includesString:Uf,includesStringSensitive:jf,equalsString:Wf,arrIncludes:Hf,arrIncludesAll:Gf,arrIncludesSome:qf,equals:Kf,weakEquals:Yf,inNumberRange:ql};function Vn(e){return e==null||e===""}const db={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:un("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"?xr.includesString:typeof r=="number"?xr.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?xr.equals:Array.isArray(r)?xr.arrIncludes:xr.weakEquals},e.getFilterFn=()=>{var n,r;return Sa(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:xr[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,i;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!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(i=>i.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const i=e.getFilterFn(),s=r==null?void 0:r.find(h=>h.id===e.id),l=Rr(n,s?s.value:void 0);if(Xf(i,l,e)){var u;return(u=r==null?void 0:r.filter(h=>h.id!==e.id))!=null?u:[]}const g={id:e.id,value:l};if(s){var f;return(f=r==null?void 0:r.map(h=>h.id===e.id?g:h))!=null?f:[]}return r!=null&&r.length?[...r,g]:[g]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=i=>{var s;return(s=Rr(t,i))==null?void 0:s.filter(l=>{const u=n.find(g=>g.id===l.id);if(u){const g=u.getFilterFn();if(Xf(g,l.value,u))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 Xf(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const Kl={sum:(e,t,n)=>n.reduce((r,i)=>{const s=i.getValue(e);return r+(typeof s=="number"?s:0)},0),min:(e,t,n)=>{let r;return n.forEach(i=>{const s=i.getValue(e);s!=null&&(r>s||r===void 0&&s>=s)&&(r=s)}),r},max:(e,t,n)=>{let r;return n.forEach(i=>{const s=i.getValue(e);s!=null&&(r<s||r===void 0&&s>=s)&&(r=s)}),r},extent:(e,t,n)=>{let r,i;return n.forEach(s=>{const l=s.getValue(e);l!=null&&(r===void 0?l>=l&&(r=i=l):(r>l&&(r=l),i<l&&(i=l)))}),[r,i]},mean:(e,t)=>{let n=0,r=0;if(t.forEach(i=>{let s=i.getValue(e);s!=null&&(s=+s)>=s&&(++n,r+=s)}),n)return r/n},median:(e,t)=>{if(!t.length)return;const n=t.map(s=>s.getValue(e));if(!ib(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),i=n.sort((s,l)=>s-l);return n.length%2!==0?i[r]:(i[r-1]+i[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},fb={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:un("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 Kl.sum;if(Object.prototype.toString.call(r)==="[object Date]")return Kl.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return Sa(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:Kl[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 i;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((i=n.subRows)!=null&&i.length)}}};function pb(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(s=>!t.includes(s.id));return n==="remove"?r:[...t.map(s=>e.find(l=>l.id===s)).filter(Boolean),...r]}const gb={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:un("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=Le(n=>[Di(t,n)],n=>n.findIndex(r=>r.id===e.id),Me(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var r;return((r=Di(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const i=Di(t,n);return((r=i[i.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=Le(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>i=>{let s=[];if(!(t!=null&&t.length))s=i;else{const l=[...t],u=[...i];for(;u.length&&l.length;){const g=l.shift(),f=u.findIndex(h=>h.id===g);f>-1&&s.push(u.splice(f,1)[0])}s=[...s,...u]}return pb(s,n,r)},Me(e.options,"debugTable","_getOrderColumnsFn"))}},Yl=()=>({left:[],right:[]}),hb={getInitialState:e=>({columnPinning:Yl(),...e}),getDefaultOptions:e=>({onColumnPinningChange:un("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(i=>i.id).filter(Boolean);t.setColumnPinning(i=>{var s,l;if(n==="right"){var u,g;return{left:((u=i==null?void 0:i.left)!=null?u:[]).filter(y=>!(r!=null&&r.includes(y))),right:[...((g=i==null?void 0:i.right)!=null?g:[]).filter(y=>!(r!=null&&r.includes(y))),...r]}}if(n==="left"){var f,h;return{left:[...((f=i==null?void 0:i.left)!=null?f:[]).filter(y=>!(r!=null&&r.includes(y))),...r],right:((h=i==null?void 0:i.right)!=null?h:[]).filter(y=>!(r!=null&&r.includes(y)))}}return{left:((s=i==null?void 0:i.left)!=null?s:[]).filter(y=>!(r!=null&&r.includes(y))),right:((l=i==null?void 0:i.right)!=null?l:[]).filter(y=>!(r!=null&&r.includes(y)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var i,s,l;return((i=r.columnDef.enablePinning)!=null?i:!0)&&((s=(l=t.options.enableColumnPinning)!=null?l:t.options.enablePinning)!=null?s:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(u=>u.id),{left:r,right:i}=t.getState().columnPinning,s=n.some(u=>r==null?void 0:r.includes(u)),l=n.some(u=>i==null?void 0:i.includes(u));return s?"left":l?"right":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();return i?(n=(r=t.getState().columnPinning)==null||(r=r[i])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=Le(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,i)=>{const s=[...r??[],...i??[]];return n.filter(l=>!s.includes(l.column.id))},Me(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=Le(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(s=>n.find(l=>l.column.id===s)).filter(Boolean).map(s=>({...s,position:"left"})),Me(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=Le(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(s=>n.find(l=>l.column.id===s)).filter(Boolean).map(s=>({...s,position:"right"})),Me(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?Yl():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:Yl())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var i,s;return!!((i=r.left)!=null&&i.length||(s=r.right)!=null&&s.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=Le(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),Me(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=Le(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),Me(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=Le(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const i=[...n??[],...r??[]];return t.filter(s=>!i.includes(s.id))},Me(e.options,"debugColumns","getCenterLeafColumns"))}},Ea={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Xl=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),mb={getDefaultColumnDef:()=>Ea,getInitialState:e=>({columnSizing:{},columnSizingInfo:Xl(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:un("columnSizing",e),onColumnSizingInfoChange:un("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,i;const s=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:Ea.minSize,(r=s??e.columnDef.size)!=null?r:Ea.size),(i=e.columnDef.maxSize)!=null?i:Ea.maxSize)},e.getStart=Le(n=>[n,Di(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((i,s)=>i+s.getSize(),0),Me(t.options,"debugColumns","getStart")),e.getAfter=Le(n=>[n,Di(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((i,s)=>i+s.getSize(),0),Me(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...i}=n;return i})},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=i=>{if(i.subHeaders.length)i.subHeaders.forEach(r);else{var s;n+=(s=i.column.getSize())!=null?s: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),i=r==null?void 0:r.getCanResize();return s=>{if(!r||!i||(s.persist==null||s.persist(),Jl(s)&&s.touches&&s.touches.length>1))return;const l=e.getSize(),u=e?e.getLeafHeaders().map(A=>[A.column.id,A.column.getSize()]):[[r.id,r.getSize()]],g=Jl(s)?Math.round(s.touches[0].clientX):s.clientX,f={},h=(A,P)=>{typeof P=="number"&&(t.setColumnSizingInfo(N=>{var D,E;const V=t.options.columnResizeDirection==="rtl"?-1:1,W=(P-((D=N==null?void 0:N.startOffset)!=null?D:0))*V,B=Math.max(W/((E=N==null?void 0:N.startSize)!=null?E:0),-.999999);return N.columnSizingStart.forEach(ee=>{let[H,ce]=ee;f[H]=Math.round(Math.max(ce+ce*B,0)*100)/100}),{...N,deltaOffset:W,deltaPercentage:B}}),(t.options.columnResizeMode==="onChange"||A==="end")&&t.setColumnSizing(N=>({...N,...f})))},y=A=>h("move",A),x=A=>{h("end",A),t.setColumnSizingInfo(P=>({...P,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},m=n||typeof document<"u"?document:null,w={moveHandler:A=>y(A.clientX),upHandler:A=>{m==null||m.removeEventListener("mousemove",w.moveHandler),m==null||m.removeEventListener("mouseup",w.upHandler),x(A.clientX)}},_={moveHandler:A=>(A.cancelable&&(A.preventDefault(),A.stopPropagation()),y(A.touches[0].clientX),!1),upHandler:A=>{var P;m==null||m.removeEventListener("touchmove",_.moveHandler),m==null||m.removeEventListener("touchend",_.upHandler),A.cancelable&&(A.preventDefault(),A.stopPropagation()),x((P=A.touches[0])==null?void 0:P.clientX)}},S=vb()?{passive:!1}:!1;Jl(s)?(m==null||m.addEventListener("touchmove",_.moveHandler,S),m==null||m.addEventListener("touchend",_.upHandler,S)):(m==null||m.addEventListener("mousemove",w.moveHandler,S),m==null||m.addEventListener("mouseup",w.upHandler,S)),t.setColumnSizingInfo(A=>({...A,startOffset:g,startSize:l,deltaOffset:0,deltaPercentage:0,columnSizingStart:u,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?Xl():(n=e.initialState.columnSizingInfo)!=null?n:Xl())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0}}};let Ta=null;function vb(){if(typeof Ta=="boolean")return Ta;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 Ta=e,Ta}function Jl(e){return e.type==="touchstart"}const yb={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:un("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 i=e.columns;return(n=i.length?i.some(s=>s.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=Le(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),Me(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=Le(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,i)=>[...n,...r,...i],Me(t.options,"debugRows","getVisibleCells"))},createTable:e=>{const t=(n,r)=>Le(()=>[r(),r().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(s=>s.getIsVisible==null?void 0:s.getIsVisible()),Me(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((i,s)=>({...i,[s.id]:n||!(s.getCanHide!=null&&s.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 Di(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const xb={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()}}},wb={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:un("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,i,s;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&((s=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?s:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>xr.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return Sa(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:xr[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},bb={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:un("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i: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 i,s;e.setExpanded(r?{}:(i=(s=e.initialState)==null?void 0:s.expanded)!=null?i:{})},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(i=>!i.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(s=>{const l=s.split(".");r=Math.max(r,l.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 i;const s=r===!0?!0:!!(r!=null&&r[e.id]);let l={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(u=>{l[u]=!0}):l=r,n=(i=n)!=null?i:!s,!s&&n)return{...l,[e.id]:!0};if(s&&!n){const{[e.id]:u,...g}=l;return g}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,i;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((i=e.subRows)!=null&&i.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()}}}},Zl=0,Ql=10,ec=()=>({pageIndex:Zl,pageSize:Ql}),_b={getInitialState:e=>({...e,pagination:{...ec(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:un("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const i=s=>Rr(r,s);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(i)},e.resetPagination=r=>{var i;e.setPagination(r?ec():(i=e.initialState.pagination)!=null?i:ec())},e.setPageIndex=r=>{e.setPagination(i=>{let s=Rr(r,i.pageIndex);const l=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return s=Math.max(0,Math.min(s,l)),{...i,pageIndex:s}})},e.resetPageIndex=r=>{var i,s;e.setPageIndex(r?Zl:(i=(s=e.initialState)==null||(s=s.pagination)==null?void 0:s.pageIndex)!=null?i:Zl)},e.resetPageSize=r=>{var i,s;e.setPageSize(r?Ql:(i=(s=e.initialState)==null||(s=s.pagination)==null?void 0:s.pageSize)!=null?i:Ql)},e.setPageSize=r=>{e.setPagination(i=>{const s=Math.max(1,Rr(r,i.pageSize)),l=i.pageSize*i.pageIndex,u=Math.floor(l/s);return{...i,pageIndex:u,pageSize:s}})},e.setPageCount=r=>e.setPagination(i=>{var s;let l=Rr(r,(s=e.options.pageCount)!=null?s:-1);return typeof l=="number"&&(l=Math.max(-1,l)),{...i,pageCount:l}}),e.getPageOptions=Le(()=>[e.getPageCount()],r=>{let i=[];return r&&r>0&&(i=[...new Array(r)].fill(null).map((s,l)=>l)),i},Me(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,i=e.getPageCount();return i===-1?!0:i===0?!1:r<i-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}}},tc=()=>({top:[],bottom:[]}),Sb={getInitialState:e=>({rowPinning:tc(),...e}),getDefaultOptions:e=>({onRowPinningChange:un("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,i)=>{const s=r?e.getLeafRows().map(g=>{let{id:f}=g;return f}):[],l=i?e.getParentRows().map(g=>{let{id:f}=g;return f}):[],u=new Set([...l,e.id,...s]);t.setRowPinning(g=>{var f,h;if(n==="bottom"){var y,x;return{top:((y=g==null?void 0:g.top)!=null?y:[]).filter(_=>!(u!=null&&u.has(_))),bottom:[...((x=g==null?void 0:g.bottom)!=null?x:[]).filter(_=>!(u!=null&&u.has(_))),...Array.from(u)]}}if(n==="top"){var m,w;return{top:[...((m=g==null?void 0:g.top)!=null?m:[]).filter(_=>!(u!=null&&u.has(_))),...Array.from(u)],bottom:((w=g==null?void 0:g.bottom)!=null?w:[]).filter(_=>!(u!=null&&u.has(_)))}}return{top:((f=g==null?void 0:g.top)!=null?f:[]).filter(_=>!(u!=null&&u.has(_))),bottom:((h=g==null?void 0:g.bottom)!=null?h:[]).filter(_=>!(u!=null&&u.has(_)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:i}=t.options;return typeof r=="function"?r(e):(n=r??i)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:i}=t.getState().rowPinning,s=n.some(u=>r==null?void 0:r.includes(u)),l=n.some(u=>i==null?void 0:i.includes(u));return s?"top":l?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();if(!i)return-1;const s=(n=i==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(l=>{let{id:u}=l;return u});return(r=s==null?void 0:s.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?tc():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:tc())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var i,s;return!!((i=r.top)!=null&&i.length||(s=r.bottom)!=null&&s.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var i;return((i=e.options.keepPinnedRows)==null||i?(n??[]).map(l=>{const u=e.getRow(l,!0);return u.getIsAllParentsExpanded()?u:null}):(n??[]).map(l=>t.find(u=>u.id===l))).filter(Boolean).map(l=>({...l,position:r}))},e.getTopRows=Le(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),Me(e.options,"debugRows","getTopRows")),e.getBottomRows=Le(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),Me(e.options,"debugRows","getBottomRows")),e.getCenterRows=Le(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const i=new Set([...n??[],...r??[]]);return t.filter(s=>!i.has(s.id))},Me(e.options,"debugRows","getCenterRows"))}},Cb={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:un("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},i=e.getPreGroupedRowModel().flatRows;return t?i.forEach(s=>{s.getCanSelect()&&(r[s.id]=!0)}):i.forEach(s=>{delete r[s.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),i={...n};return e.getRowModel().rows.forEach(s=>{nc(i,s.id,r,!0,e)}),i}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=Le(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?rc(e,n):{rows:[],flatRows:[],rowsById:{}},Me(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=Le(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?rc(e,n):{rows:[],flatRows:[],rowsById:{}},Me(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=Le(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?rc(e,n):{rows:[],flatRows:[],rowsById:{}},Me(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(i=>i.getCanSelect()&&!n[i.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(i=>i.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(i=>!n[i.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 i=e.getIsSelected();t.setRowSelection(s=>{var l;if(n=typeof n<"u"?n:!i,e.getCanSelect()&&i===n)return s;const u={...s};return nc(u,e.id,n,(l=r==null?void 0:r.selectChildren)!=null?l:!0,t),u})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return oc(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return ic(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return ic(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 i;n&&e.toggleSelected((i=r.target)==null?void 0:i.checked)}}}},nc=(e,t,n,r,i)=>{var s;const l=i.getRow(t,!0);n?(l.getCanMultiSelect()||Object.keys(e).forEach(u=>delete e[u]),l.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(s=l.subRows)!=null&&s.length&&l.getCanSelectSubRows()&&l.subRows.forEach(u=>nc(e,u.id,n,r,i))};function rc(e,t){const n=e.getState().rowSelection,r=[],i={},s=function(l,u){return l.map(g=>{var f;const h=oc(g,n);if(h&&(r.push(g),i[g.id]=g),(f=g.subRows)!=null&&f.length&&(g={...g,subRows:s(g.subRows)}),h)return g}).filter(Boolean)};return{rows:s(t.rows),flatRows:r,rowsById:i}}function oc(e,t){var n;return(n=t[e.id])!=null?n:!1}function ic(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let i=!0,s=!1;return e.subRows.forEach(l=>{if(!(s&&!i)&&(l.getCanSelect()&&(oc(l,t)?s=!0:i=!1),l.subRows&&l.subRows.length)){const u=ic(l,t);u==="all"?s=!0:(u==="some"&&(s=!0),i=!1)}}),i?"all":s?"some":!1}const ac=/([0-9]+)/gm,Eb=(e,t,n)=>Jf(Vr(e.getValue(n)).toLowerCase(),Vr(t.getValue(n)).toLowerCase()),Tb=(e,t,n)=>Jf(Vr(e.getValue(n)),Vr(t.getValue(n))),Ab=(e,t,n)=>sc(Vr(e.getValue(n)).toLowerCase(),Vr(t.getValue(n)).toLowerCase()),Pb=(e,t,n)=>sc(Vr(e.getValue(n)),Vr(t.getValue(n))),Ob=(e,t,n)=>{const r=e.getValue(n),i=t.getValue(n);return r>i?1:r<i?-1:0},Nb=(e,t,n)=>sc(e.getValue(n),t.getValue(n));function sc(e,t){return e===t?0:e>t?1:-1}function Vr(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function Jf(e,t){const n=e.split(ac).filter(Boolean),r=t.split(ac).filter(Boolean);for(;n.length&&r.length;){const i=n.shift(),s=r.shift(),l=parseInt(i,10),u=parseInt(s,10),g=[l,u].sort();if(isNaN(g[0])){if(i>s)return 1;if(s>i)return-1;continue}if(isNaN(g[1]))return isNaN(l)?-1:1;if(l>u)return 1;if(u>l)return-1}return n.length-r.length}const ki={alphanumeric:Eb,alphanumericCaseSensitive:Tb,text:Ab,textCaseSensitive:Pb,datetime:Ob,basic:Nb},Fb=[cb,yb,gb,hb,ub,db,xb,wb,{getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:un("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const i of n){const s=i==null?void 0:i.getValue(e.id);if(Object.prototype.toString.call(s)==="[object Date]")return ki.datetime;if(typeof s=="string"&&(r=!0,s.split(ac).length>1))return ki.alphanumeric}return r?ki.text:ki.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 Sa(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:ki[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const i=e.getNextSortingOrder(),s=typeof n<"u"&&n!==null;t.setSorting(l=>{const u=l==null?void 0:l.find(m=>m.id===e.id),g=l==null?void 0:l.findIndex(m=>m.id===e.id);let f=[],h,y=s?n:i==="desc";if(l!=null&&l.length&&e.getCanMultiSort()&&r?u?h="toggle":h="add":l!=null&&l.length&&g!==l.length-1?h="replace":u?h="toggle":h="replace",h==="toggle"&&(s||i||(h="remove")),h==="add"){var x;f=[...l,{id:e.id,desc:y}],f.splice(0,f.length-((x=t.options.maxMultiSortColCount)!=null?x:Number.MAX_SAFE_INTEGER))}else h==="toggle"?f=l.map(m=>m.id===e.id?{...m,desc:y}:m):h==="remove"?f=l.filter(m=>m.id!==e.id):f=[{id:e.id,desc:y}];return f})},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,i;const s=e.getFirstSortDir(),l=e.getIsSorted();return l?l!==s&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(i=t.options.enableMultiRemove)!=null)||i)?!1:l==="desc"?"asc":"desc":s},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(i=>i.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(i=>i.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())}},fb,bb,_b,Sb,Cb,mb];function Db(e){var t,n;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const r=[...Fb,...(t=e._features)!=null?t:[]];let i={_features:r};const s=i._features.reduce((x,m)=>Object.assign(x,m.getDefaultOptions==null?void 0:m.getDefaultOptions(i)),{}),l=x=>i.options.mergeOptions?i.options.mergeOptions(s,x):{...s,...x};let g={...{},...(n=e.initialState)!=null?n:{}};i._features.forEach(x=>{var m;g=(m=x.getInitialState==null?void 0:x.getInitialState(g))!=null?m:g});const f=[];let h=!1;const y={_features:r,options:{...s,...e},initialState:g,_queue:x=>{f.push(x),h||(h=!0,Promise.resolve().then(()=>{for(;f.length;)f.shift()();h=!1}).catch(m=>setTimeout(()=>{throw m})))},reset:()=>{i.setState(i.initialState)},setOptions:x=>{const m=Rr(x,i.options);i.options=l(m)},getState:()=>i.options.state,setState:x=>{i.options.onStateChange==null||i.options.onStateChange(x)},_getRowId:(x,m,w)=>{var _;return(_=i.options.getRowId==null?void 0:i.options.getRowId(x,m,w))!=null?_:`${w?[w.id,m].join("."):m}`},getCoreRowModel:()=>(i._getCoreRowModel||(i._getCoreRowModel=i.options.getCoreRowModel(i)),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:(x,m)=>{let w=(m?i.getPrePaginationRowModel():i.getRowModel()).rowsById[x];if(!w&&(w=i.getCoreRowModel().rowsById[x],!w))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${x}`):new Error;return w},_getDefaultColumnDef:Le(()=>[i.options.defaultColumn],x=>{var m;return x=(m=x)!=null?m:{},{header:w=>{const _=w.header.column.columnDef;return _.accessorKey?_.accessorKey:_.accessorFn?_.id:null},cell:w=>{var _,S;return(_=(S=w.renderValue())==null||S.toString==null?void 0:S.toString())!=null?_:null},...i._features.reduce((w,_)=>Object.assign(w,_.getDefaultColumnDef==null?void 0:_.getDefaultColumnDef()),{}),...x}},Me(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>i.options.columns,getAllColumns:Le(()=>[i._getColumnDefs()],x=>{const m=function(w,_,S){return S===void 0&&(S=0),w.map(A=>{const P=lb(i,A,S,_),N=A;return P.columns=N.columns?m(N.columns,P,S+1):[],P})};return m(x)},Me(e,"debugColumns","getAllColumns")),getAllFlatColumns:Le(()=>[i.getAllColumns()],x=>x.flatMap(m=>m.getFlatColumns()),Me(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:Le(()=>[i.getAllFlatColumns()],x=>x.reduce((m,w)=>(m[w.id]=w,m),{}),Me(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:Le(()=>[i.getAllColumns(),i._getOrderColumnsFn()],(x,m)=>{let w=x.flatMap(_=>_.getLeafColumns());return m(w)},Me(e,"debugColumns","getAllLeafColumns")),getColumn:x=>{const m=i._getAllFlatColumnsById()[x];return process.env.NODE_ENV!=="production"&&!m&&console.error(`[Table] Column with id '${x}' does not exist.`),m}};Object.assign(i,y);for(let x=0;x<i._features.length;x++){const m=i._features[x];m==null||m.createTable==null||m.createTable(i)}return i}function Zf(){return e=>Le(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(i,s,l){s===void 0&&(s=0);const u=[];for(let f=0;f<i.length;f++){const h=Gl(e,e._getRowId(i[f],f,l),i[f],f,s,void 0,l==null?void 0:l.id);if(n.flatRows.push(h),n.rowsById[h.id]=h,u.push(h),e.options.getSubRows){var g;h.originalSubRows=e.options.getSubRows(i[f],f),(g=h.originalSubRows)!=null&&g.length&&(h.subRows=r(h.originalSubRows,s+1,h))}}return u};return n.rows=r(t),n},Me(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function kb(e,t,n){return n.options.filterFromLeafRows?Ib(e,t,n):Lb(e,t,n)}function Ib(e,t,n){var r;const i=[],s={},l=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,u=function(g,f){f===void 0&&(f=0);const h=[];for(let x=0;x<g.length;x++){var y;let m=g[x];const w=Gl(n,m.id,m.original,m.index,m.depth,void 0,m.parentId);if(w.columnFilters=m.columnFilters,(y=m.subRows)!=null&&y.length&&f<l){if(w.subRows=u(m.subRows,f+1),m=w,t(m)&&!w.subRows.length){h.push(m),s[m.id]=m,i.push(m);continue}if(t(m)||w.subRows.length){h.push(m),s[m.id]=m,i.push(m);continue}}else m=w,t(m)&&(h.push(m),s[m.id]=m,i.push(m))}return h};return{rows:u(e),flatRows:i,rowsById:s}}function Lb(e,t,n){var r;const i=[],s={},l=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,u=function(g,f){f===void 0&&(f=0);const h=[];for(let x=0;x<g.length;x++){let m=g[x];if(t(m)){var y;if((y=m.subRows)!=null&&y.length&&f<l){const _=Gl(n,m.id,m.original,m.index,m.depth,void 0,m.parentId);_.subRows=u(m.subRows,f+1),m=_}h.push(m),i.push(m),s[m.id]=m}}return h};return{rows:u(e),flatRows:i,rowsById:s}}function Mb(){return e=>Le(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,n,r)=>{if(!t.rows.length||!(n!=null&&n.length)&&!r){for(let x=0;x<t.flatRows.length;x++)t.flatRows[x].columnFilters={},t.flatRows[x].columnFiltersMeta={};return t}const i=[],s=[];(n??[]).forEach(x=>{var m;const w=e.getColumn(x.id);if(!w)return;const _=w.getFilterFn();if(!_){process.env.NODE_ENV!=="production"&&console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${w.id}.`);return}i.push({id:x.id,filterFn:_,resolvedValue:(m=_.resolveFilterValue==null?void 0:_.resolveFilterValue(x.value))!=null?m:x.value})});const l=(n??[]).map(x=>x.id),u=e.getGlobalFilterFn(),g=e.getAllLeafColumns().filter(x=>x.getCanGlobalFilter());r&&u&&g.length&&(l.push("__global__"),g.forEach(x=>{var m;s.push({id:x.id,filterFn:u,resolvedValue:(m=u.resolveFilterValue==null?void 0:u.resolveFilterValue(r))!=null?m:r})}));let f,h;for(let x=0;x<t.flatRows.length;x++){const m=t.flatRows[x];if(m.columnFilters={},i.length)for(let w=0;w<i.length;w++){f=i[w];const _=f.id;m.columnFilters[_]=f.filterFn(m,_,f.resolvedValue,S=>{m.columnFiltersMeta[_]=S})}if(s.length){for(let w=0;w<s.length;w++){h=s[w];const _=h.id;if(h.filterFn(m,_,h.resolvedValue,S=>{m.columnFiltersMeta[_]=S})){m.columnFilters.__global__=!0;break}}m.columnFilters.__global__!==!0&&(m.columnFilters.__global__=!1)}}const y=x=>{for(let m=0;m<l.length;m++)if(x.columnFilters[l[m]]===!1)return!1;return!0};return kb(t.rows,y,e)},Me(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function $b(){return e=>Le(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const r=e.getState().sorting,i=[],s=r.filter(g=>{var f;return(f=e.getColumn(g.id))==null?void 0:f.getCanSort()}),l={};s.forEach(g=>{const f=e.getColumn(g.id);f&&(l[g.id]={sortUndefined:f.columnDef.sortUndefined,invertSorting:f.columnDef.invertSorting,sortingFn:f.getSortingFn()})});const u=g=>{const f=g.map(h=>({...h}));return f.sort((h,y)=>{for(let m=0;m<s.length;m+=1){var x;const w=s[m],_=l[w.id],S=_.sortUndefined,A=(x=w==null?void 0:w.desc)!=null?x:!1;let P=0;if(S){const N=h.getValue(w.id),D=y.getValue(w.id),E=N===void 0,V=D===void 0;if(E||V){if(S==="first")return E?-1:1;if(S==="last")return E?1:-1;P=E&&V?0:E?S:-S}}if(P===0&&(P=_.sortingFn(h,y,w.id)),P!==0)return A&&(P*=-1),_.invertSorting&&(P*=-1),P}return h.index-y.index}),f.forEach(h=>{var y;i.push(h),(y=h.subRows)!=null&&y.length&&(h.subRows=u(h.subRows))}),f};return{rows:u(n.rows),flatRows:i,rowsById:n.rowsById}},Me(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}/**
|
|
14
14
|
* react-table
|
|
15
15
|
*
|
|
16
16
|
* Copyright (c) TanStack
|
|
@@ -19,159 +19,185 @@
|
|
|
19
19
|
* LICENSE.md file in the root directory of this source tree.
|
|
20
20
|
*
|
|
21
21
|
* @license MIT
|
|
22
|
-
*/function Hr(e,t){return e?Bg(e)?f.createElement(e,t):e:null}function Bg(e){return Hg(e)||typeof e=="function"||Ug(e)}function Hg(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function Ug(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function nl(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=f.useState(()=>({current:$g(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 rl(e,t){return function(){return e.apply(t,arguments)}}const{toString:Wg}=Object.prototype,{getPrototypeOf:Pi}=Object,Ur=(e=>t=>{const n=Wg.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),mt=e=>(e=e.toLowerCase(),t=>Ur(t)===e),Wr=e=>t=>typeof t===e,{isArray:Nn}=Array,ar=Wr("undefined");function qg(e){return e!==null&&!ar(e)&&e.constructor!==null&&!ar(e.constructor)&&ot(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const ol=mt("ArrayBuffer");function Gg(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&ol(e.buffer),t}const Kg=Wr("string"),ot=Wr("function"),il=Wr("number"),qr=e=>e!==null&&typeof e=="object",Yg=e=>e===!0||e===!1,Gr=e=>{if(Ur(e)!=="object")return!1;const t=Pi(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Xg=mt("Date"),Jg=mt("File"),Zg=mt("Blob"),Qg=mt("FileList"),em=e=>qr(e)&&ot(e.pipe),tm=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ot(e.append)&&((t=Ur(e))==="formdata"||t==="object"&&ot(e.toString)&&e.toString()==="[object FormData]"))},nm=mt("URLSearchParams"),[rm,om,im,am]=["ReadableStream","Request","Response","Headers"].map(mt),sm=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function sr(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),Nn(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 al(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 vn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,sl=e=>!ar(e)&&e!==vn;function Ni(){const{caseless:e}=sl(this)&&this||{},t={},n=(r,o)=>{const i=e&&al(t,o)||o;Gr(t[i])&&Gr(r)?t[i]=Ni(t[i],r):Gr(r)?t[i]=Ni({},r):Nn(r)?t[i]=r.slice():t[i]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&sr(arguments[r],n);return t}const lm=(e,t,n,{allOwnKeys:r}={})=>(sr(t,(o,i)=>{n&&ot(o)?e[i]=rl(o,n):e[i]=o},{allOwnKeys:r}),e),cm=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),um=(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)},dm=(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&&Pi(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},fm=(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},pm=e=>{if(!e)return null;if(Nn(e))return e;let t=e.length;if(!il(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},gm=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Pi(Uint8Array)),mm=(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])}},hm=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},vm=mt("HTMLFormElement"),ym=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),ll=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),xm=mt("RegExp"),cl=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};sr(n,(o,i)=>{let a;(a=t(o,i,e))!==!1&&(r[i]=a||o)}),Object.defineProperties(e,r)},bm=e=>{cl(e,(t,n)=>{if(ot(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(ot(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+"'")})}})},wm=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return Nn(e)?r(e):r(String(e).split(t)),n},Sm=()=>{},Cm=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,ki="abcdefghijklmnopqrstuvwxyz",ul="0123456789",dl={DIGIT:ul,ALPHA:ki,ALPHA_DIGIT:ki+ki.toUpperCase()+ul},Em=(e=16,t=dl.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function _m(e){return!!(e&&ot(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Tm=e=>{const t=new Array(10),n=(r,o)=>{if(qr(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=Nn(r)?[]:{};return sr(r,(a,s)=>{const u=n(a,o+1);!ar(u)&&(i[s]=u)}),t[o]=void 0,i}}return r};return n(e,0)},Am=mt("AsyncFunction"),Pm=e=>e&&(qr(e)||ot(e))&&ot(e.then)&&ot(e.catch),fl=((e,t)=>e?setImmediate:t?((n,r)=>(vn.addEventListener("message",({source:o,data:i})=>{o===vn&&i===n&&r.length&&r.shift()()},!1),o=>{r.push(o),vn.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",ot(vn.postMessage)),Nm=typeof queueMicrotask<"u"?queueMicrotask.bind(vn):typeof process<"u"&&process.nextTick||fl,L={isArray:Nn,isArrayBuffer:ol,isBuffer:qg,isFormData:tm,isArrayBufferView:Gg,isString:Kg,isNumber:il,isBoolean:Yg,isObject:qr,isPlainObject:Gr,isReadableStream:rm,isRequest:om,isResponse:im,isHeaders:am,isUndefined:ar,isDate:Xg,isFile:Jg,isBlob:Zg,isRegExp:xm,isFunction:ot,isStream:em,isURLSearchParams:nm,isTypedArray:gm,isFileList:Qg,forEach:sr,merge:Ni,extend:lm,trim:sm,stripBOM:cm,inherits:um,toFlatObject:dm,kindOf:Ur,kindOfTest:mt,endsWith:fm,toArray:pm,forEachEntry:mm,matchAll:hm,isHTMLForm:vm,hasOwnProperty:ll,hasOwnProp:ll,reduceDescriptors:cl,freezeMethods:bm,toObjectSet:wm,toCamelCase:ym,noop:Sm,toFiniteNumber:Cm,findKey:al,global:vn,isContextDefined:sl,ALPHABET:dl,generateString:Em,isSpecCompliantForm:_m,toJSONObject:Tm,isAsyncFn:Am,isThenable:Pm,setImmediate:fl,asap:Nm};function xe(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(xe,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 pl=xe.prototype,gl={};["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=>{gl[e]={value:e}}),Object.defineProperties(xe,gl),Object.defineProperty(pl,"isAxiosError",{value:!0}),xe.from=(e,t,n,r,o,i)=>{const a=Object.create(pl);return L.toFlatObject(e,a,function(u){return u!==Error.prototype},s=>s!=="isAxiosError"),xe.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};const km=null;function Oi(e){return L.isPlainObject(e)||L.isArray(e)}function ml(e){return L.endsWith(e,"[]")?e.slice(0,-2):e}function hl(e,t,n){return e?e.concat(t).map(function(o,i){return o=ml(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function Om(e){return L.isArray(e)&&!e.some(Oi)}const Fm=L.toFlatObject(L,{},null,function(t){return/^is[A-Z]/.test(t)});function Kr(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(v,y){return!L.isUndefined(y[v])});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(h){if(h===null)return"";if(L.isDate(h))return h.toISOString();if(!u&&L.isBlob(h))throw new xe("Blob is not supported. Use a Buffer instead.");return L.isArrayBuffer(h)||L.isTypedArray(h)?u&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function d(h,v,y){let b=h;if(h&&!y&&typeof h=="object"){if(L.endsWith(v,"{}"))v=r?v:v.slice(0,-2),h=JSON.stringify(h);else if(L.isArray(h)&&Om(h)||(L.isFileList(h)||L.endsWith(v,"[]"))&&(b=L.toArray(h)))return v=ml(v),b.forEach(function(S,E){!(L.isUndefined(S)||S===null)&&t.append(a===!0?hl([v],E,i):a===null?v:v+"[]",c(S))}),!1}return Oi(h)?!0:(t.append(hl(y,v,i),c(h)),!1)}const g=[],m=Object.assign(Fm,{defaultVisitor:d,convertValue:c,isVisitable:Oi});function p(h,v){if(!L.isUndefined(h)){if(g.indexOf(h)!==-1)throw Error("Circular reference detected in "+v.join("."));g.push(h),L.forEach(h,function(b,w){(!(L.isUndefined(b)||b===null)&&o.call(t,b,L.isString(w)?w.trim():w,v,m))===!0&&p(b,v?v.concat(w):[w])}),g.pop()}}if(!L.isObject(e))throw new TypeError("data must be an object");return p(e),t}function vl(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Fi(e,t){this._pairs=[],e&&Kr(e,this,t)}const yl=Fi.prototype;yl.append=function(t,n){this._pairs.push([t,n])},yl.toString=function(t){const n=t?function(r){return t.call(this,r,vl)}:vl;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Dm(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function xl(e,t,n){if(!t)return e;const r=n&&n.encode||Dm;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 Fi(t,n).toString(r),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class bl{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 wl={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Im={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Fi,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Di=typeof window<"u"&&typeof document<"u",Ii=typeof navigator=="object"&&navigator||void 0,Mm=Di&&(!Ii||["ReactNative","NativeScript","NS"].indexOf(Ii.product)<0),$m=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Lm=Di&&window.location.href||"http://localhost",We={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Di,hasStandardBrowserEnv:Mm,hasStandardBrowserWebWorkerEnv:$m,navigator:Ii,origin:Lm},Symbol.toStringTag,{value:"Module"})),...Im};function Rm(e,t){return Kr(e,new We.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return We.isNode&&L.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function Vm(e){return L.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function jm(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 Sl(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]=jm(o[a])),!s)}if(L.isFormData(e)&&L.isFunction(e.entries)){const n={};return L.forEachEntry(e,(r,o)=>{t(Vm(r),o,n,0)}),n}return null}function zm(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 lr={transitional:wl,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(Sl(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 Rm(t,this.formSerializer).toString();if((s=L.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return Kr(s?{"files[]":t}:t,u&&new u,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),zm(t)):t}],transformResponse:[function(t){const n=this.transitional||lr.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"?xe.from(s,xe.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:We.classes.FormData,Blob:We.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=>{lr.headers[e]={}});const Bm=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"]),Hm=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
23
|
-
`).forEach(function(
|
|
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[Cl]=this[Cl]={accessors:{}}).accessors,o=this.prototype;function i(a){const s=cr(a);r[s]||(Gm(o,a),r[s]=!0)}return L.isArray(t)?t.forEach(i):i(t),this}}Je.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),L.reduceDescriptors(Je.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),L.freezeMethods(Je);function $i(e,t){const n=this||lr,r=t||n,o=Je.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 El(e){return!!(e&&e.__CANCEL__)}function kn(e,t,n){xe.call(this,e??"canceled",xe.ERR_CANCELED,t,n),this.name="CanceledError"}L.inherits(kn,xe,{__CANCEL__:!0});function _l(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new xe("Request failed with status code "+n.status,[xe.ERR_BAD_REQUEST,xe.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Km(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Ym(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 p=d&&c-d;return p?Math.round(m*1e3/p):void 0}}function Xm(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 Xr=(e,t,n=3)=>{let r=0;const o=Ym(50,250);return Xm(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)},Tl=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Al=e=>(...t)=>L.asap(()=>e(...t)),Jm=We.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,We.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(We.origin),We.navigator&&/(msie|trident)/i.test(We.navigator.userAgent)):()=>!0,Zm=We.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 Qm(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function eh(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Pl(e,t){return e&&!Qm(t)?eh(e,t):t}const Nl=e=>e instanceof Je?{...e}:e;function yn(e,t){t=t||{};const n={};function r(c,d,g,m){return L.isPlainObject(c)&&L.isPlainObject(d)?L.merge.call({caseless:m},c,d):L.isPlainObject(d)?L.merge({},d):L.isArray(d)?d.slice():d}function o(c,d,g,m){if(L.isUndefined(d)){if(!L.isUndefined(c))return r(void 0,c,g,m)}else return r(c,d,g,m)}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(Nl(c),Nl(d),g,!0)};return L.forEach(Object.keys(Object.assign({},e,t)),function(d){const g=u[d]||o,m=g(e[d],t[d],d);L.isUndefined(m)&&g!==s||(n[d]=m)}),n}const kl=e=>{const t=yn({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:a,auth:s}=t;t.headers=a=Je.from(a),t.url=xl(Pl(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(We.hasStandardBrowserEnv||We.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(We.hasStandardBrowserEnv&&(r&&L.isFunction(r)&&(r=r(t)),r||r!==!1&&Jm(t.url))){const c=o&&i&&Zm.read(i);c&&a.set(o,c)}return t},th=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const o=kl(e);let i=o.data;const a=Je.from(o.headers).normalize();let{responseType:s,onUploadProgress:u,onDownloadProgress:c}=o,d,g,m,p,h;function v(){p&&p(),h&&h(),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 S=Je.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};_l(function(I){n(I),v()},function(I){r(I),v()},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 xe("Request aborted",xe.ECONNABORTED,e,y)),y=null)},y.onerror=function(){r(new xe("Network Error",xe.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||wl;o.timeoutErrorMessage&&(E=o.timeoutErrorMessage),r(new xe(E,x.clarifyTimeoutError?xe.ETIMEDOUT:xe.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&&([m,h]=Xr(c,!0),y.addEventListener("progress",m)),u&&y.upload&&([g,p]=Xr(u),y.upload.addEventListener("progress",g),y.upload.addEventListener("loadend",p)),(o.cancelToken||o.signal)&&(d=S=>{y&&(r(!S||S.type?new kn(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 w=Km(o.url);if(w&&We.protocols.indexOf(w)===-1){r(new xe("Unsupported protocol "+w+":",xe.ERR_BAD_REQUEST,e));return}y.send(i||null)})},nh=(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 xe?d:new kn(d instanceof Error?d.message:d))}};let a=t&&setTimeout(()=>{a=null,i(new xe(`timeout ${t} of ms exceeded`,xe.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}},rh=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},oh=async function*(e,t){for await(const n of ih(e))yield*rh(n,t)},ih=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()}},Ol=(e,t,n,r)=>{const o=oh(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})},Jr=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Fl=Jr&&typeof ReadableStream=="function",ah=Jr&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Dl=(e,...t)=>{try{return!!e(...t)}catch{return!1}},sh=Fl&&Dl(()=>{let e=!1;const t=new Request(We.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Il=64*1024,Li=Fl&&Dl(()=>L.isReadableStream(new Response("").body)),Zr={stream:Li&&(e=>e.body)};Jr&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Zr[t]&&(Zr[t]=L.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new xe(`Response type '${t}' is not supported`,xe.ERR_NOT_SUPPORT,r)})})})(new Response);const lh=async e=>{if(e==null)return 0;if(L.isBlob(e))return e.size;if(L.isSpecCompliantForm(e))return(await new Request(We.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 ah(e)).byteLength},ch=async(e,t)=>{const n=L.toFiniteNumber(e.getContentLength());return n??lh(t)},Ri={http:km,xhr:th,fetch:Jr&&(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}=kl(e);c=c?(c+"").toLowerCase():"text";let p=nh([o,i&&i.toAbortSignal()],a),h;const v=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let y;try{if(u&&sh&&n!=="get"&&n!=="head"&&(y=await ch(d,r))!==0){let x=new Request(t,{method:"POST",body:r,duplex:"half"}),N;if(L.isFormData(r)&&(N=x.headers.get("content-type"))&&d.setContentType(N),x.body){const[I,M]=Tl(y,Xr(Al(u)));r=Ol(x.body,Il,I,M)}}L.isString(g)||(g=g?"include":"omit");const b="credentials"in Request.prototype;h=new Request(t,{...m,signal:p,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:r,duplex:"half",credentials:b?g:void 0});let w=await fetch(h);const S=Li&&(c==="stream"||c==="response");if(Li&&(s||S&&v)){const x={};["status","statusText","headers"].forEach(H=>{x[H]=w[H]});const N=L.toFiniteNumber(w.headers.get("content-length")),[I,M]=s&&Tl(N,Xr(Al(s),!0))||[];w=new Response(Ol(w.body,Il,I,()=>{M&&M(),v&&v()}),x)}c=c||"text";let E=await Zr[L.findKey(Zr,c)||"text"](w,e);return!S&&v&&v(),await new Promise((x,N)=>{_l(x,N,{data:E,headers:Je.from(w.headers),status:w.status,statusText:w.statusText,config:e,request:h})})}catch(b){throw v&&v(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new xe("Network Error",xe.ERR_NETWORK,e,h),{cause:b.cause||b}):xe.from(b,b&&b.code,e,h)}})};L.forEach(Ri,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Ml=e=>`- ${e}`,uh=e=>L.isFunction(e)||e===null||e===!1,$l={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,!uh(n)&&(r=Ri[(a=String(n)).toLowerCase()],r===void 0))throw new xe(`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
|
-
`+
|
|
26
|
-
`):" "+
|
|
27
|
-
`+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=yn(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&eo.assertOptions(r,{silentJSONParsing:Et.transitional(Et.boolean),forcedJSONParsing:Et.transitional(Et.boolean),clarifyTimeoutError:Et.transitional(Et.boolean)},!1),o!=null&&(L.isFunction(o)?n.paramsSerializer={serialize:o}:eo.assertOptions(o,{encode:Et.function,serialize:Et.function},!0)),eo.assertOptions(n,{baseUrl:Et.spelling("baseURL"),withXsrfToken:Et.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"],h=>{delete i[h]}),n.headers=Je.concat(a,i);const s=[];let u=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(u=u&&v.synchronous,s.unshift(v.fulfilled,v.rejected))});const c=[];this.interceptors.response.forEach(function(v){c.push(v.fulfilled,v.rejected)});let d,g=0,m;if(!u){const h=[Ll.bind(this),void 0];for(h.unshift.apply(h,s),h.push.apply(h,c),m=h.length,d=Promise.resolve(n);g<m;)d=d.then(h[g++],h[g++]);return d}m=s.length;let p=n;for(g=0;g<m;){const h=s[g++],v=s[g++];try{p=h(p)}catch(y){v.call(this,y);break}}try{d=Ll.call(this,p)}catch(h){return Promise.reject(h)}for(g=0,m=c.length;g<m;)d=d.then(c[g++],c[g++]);return d}getUri(t){t=yn(this.defaults,t);const n=Pl(t.baseURL,t.url);return xl(n,t.params,t.paramsSerializer)}}L.forEach(["delete","get","head","options"],function(t){xn.prototype[t]=function(n,r){return this.request(yn(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(yn(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}xn.prototype[t]=n(),xn.prototype[t+"Form"]=n(!0)});class ji{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 kn(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 ji(function(o){t=o}),cancel:t}}}function fh(e){return function(n){return e.apply(null,n)}}function ph(e){return L.isObject(e)&&e.isAxiosError===!0}const zi={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(zi).forEach(([e,t])=>{zi[t]=e});function jl(e){const t=new xn(e),n=rl(xn.prototype.request,t);return L.extend(n,xn.prototype,t,{allOwnKeys:!0}),L.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return jl(yn(e,o))},n}const me=jl(lr);me.Axios=xn,me.CanceledError=kn,me.CancelToken=ji,me.isCancel=El,me.VERSION=Rl,me.toFormData=Kr,me.AxiosError=xe,me.Cancel=me.CanceledError,me.all=function(t){return Promise.all(t)},me.spread=fh,me.isAxiosError=ph,me.mergeConfig=yn,me.AxiosHeaders=Je,me.formToJSON=e=>Sl(L.isHTMLForm(e)?new FormData(e):e),me.getAdapter=$l.getAdapter,me.HttpStatusCode=zi,me.default=me;var ur=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function to(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const gh=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 mh=e=>!gh.has(e&&e.code);const hh=to(mh),Bi="axios-retry";function zl(e){const t=["ERR_CANCELED","ECONNABORTED"];return e.response||!e.code||t.includes(e.code)?!1:hh(e)}const Bl=["get","head","options"],vh=Bl.concat(["put","delete"]);function Hi(e){return e.code!=="ECONNABORTED"&&(!e.response||e.response.status===429||e.response.status>=500&&e.response.status<=599)}function yh(e){var t;return(t=e.config)!=null&&t.method?Hi(e)&&Bl.indexOf(e.config.method)!==-1:!1}function Hl(e){var t;return(t=e.config)!=null&&t.method?Hi(e)&&vh.indexOf(e.config.method)!==-1:!1}function Ul(e){return zl(e)||Hl(e)}function Ui(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 xh(e=0,t=void 0){return Math.max(0,Ui(t))}function bh(e=0,t=void 0,n=100){const r=2**e*n,o=Math.max(r,Ui(t)),i=o*.2*Math.random();return o+i}function wh(e=100){return(t=0,n=void 0)=>{const r=t*e;return Math.max(r,Ui(n))}}const Sh={retries:3,retryCondition:Ul,retryDelay:xh,shouldResetTimeout:!1,onRetry:()=>{},onMaxRetryTimesExceeded:()=>{},validateResponse:null};function Ch(e,t){return{...Sh,...t,...e[Bi]}}function Wl(e,t,n=!1){const r=Ch(e,t||{});return r.retryCount=r.retryCount||0,(!r.lastRequestTime||n)&&(r.lastRequestTime=Date.now()),e[Bi]=r,r}function Eh(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 _h(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 Th(e,t,n,r){var u;t.retryCount+=1;const{retryDelay:o,shouldResetTimeout:i,onRetry:a}=t,s=o(t.retryCount,n);if(Eh(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 p;c(e(r)),(p=r.signal)!=null&&p.removeEventListener&&r.signal.removeEventListener("abort",d)},s);(m=r.signal)!=null&&m.addEventListener&&r.signal.addEventListener("abort",d,{once:!0})})}async function Ah(e,t){e.retryCount>=e.retries&&await e.onMaxRetryTimesExceeded(t,e.retryCount)}const zt=(e,t)=>{const n=e.interceptors.request.use(o=>{var i;return Wl(o,t,!0),(i=o[Bi])!=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=Wl(i,t);return o.response&&((s=a.validateResponse)!=null&&s.call(a,o.response))?o.response:await _h(a,o)?Th(e,a,o,i):(await Ah(a,o),Promise.reject(o))});return{requestInterceptorId:n,responseInterceptorId:r}};zt.isNetworkError=zl,zt.isSafeRequestError=yh,zt.isIdempotentRequestError=Hl,zt.isNetworkOrIdempotentRequestError=Ul,zt.exponentialDelay=bh,zt.linearDelay=wh,zt.isRetryableError=Hi;var ql={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(ur,function(){var n=1e3,r=6e4,o=36e5,i="millisecond",a="second",s="minute",u="hour",c="day",d="week",g="month",m="quarter",p="year",h="date",v="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(k){var $=["th","st","nd","rd"],F=k%100;return"["+k+($[(F-20)%10]||$[F]||$[0])+"]"}},S=function(k,$,F){var U=String(k);return!U||U.length>=$?k:""+Array($+1-U.length).join(F)+k},E={s:S,z:function(k){var $=-k.utcOffset(),F=Math.abs($),U=Math.floor(F/60),j=F%60;return($<=0?"+":"-")+S(U,2,"0")+":"+S(j,2,"0")},m:function k($,F){if($.date()<F.date())return-k(F,$);var U=12*(F.year()-$.year())+(F.month()-$.month()),j=$.clone().add(U,g),R=F-j<0,A=$.clone().add(U+(R?-1:1),g);return+(-(U+(F-j)/(R?j-A:A-j))||0)},a:function(k){return k<0?Math.ceil(k)||0:Math.floor(k)},p:function(k){return{M:g,y:p,w:d,d:c,D:h,h:u,m:s,s:a,ms:i,Q:m}[k]||String(k||"").toLowerCase().replace(/s$/,"")},u:function(k){return k===void 0}},x="en",N={};N[x]=w;var I="$isDayjsObject",M=function(k){return k instanceof W||!(!k||!k[I])},H=function k($,F,U){var j;if(!$)return x;if(typeof $=="string"){var R=$.toLowerCase();N[R]&&(j=R),F&&(N[R]=F,j=R);var A=$.split("-");if(!j&&A.length>1)return k(A[0])}else{var B=$.name;N[B]=$,j=B}return!U&&j&&(x=j),j||!U&&x},O=function(k,$){if(M(k))return k.clone();var F=typeof $=="object"?$:{};return F.date=k,F.args=arguments,new W(F)},G=E;G.l=H,G.i=M,G.w=function(k,$){return O(k,{locale:$.$L,utc:$.$u,x:$.$x,$offset:$.$offset})};var W=function(){function k(F){this.$L=H(F.locale,null,!0),this.parse(F),this.$x=this.$x||F.x||{},this[I]=!0}var $=k.prototype;return $.parse=function(F){this.$d=function(U){var j=U.date,R=U.utc;if(j===null)return new Date(NaN);if(G.u(j))return new Date;if(j instanceof Date)return new Date(j);if(typeof j=="string"&&!/Z$/i.test(j)){var A=j.match(y);if(A){var B=A[2]-1||0,Q=(A[7]||"0").substring(0,3);return R?new Date(Date.UTC(A[1],B,A[3]||1,A[4]||0,A[5]||0,A[6]||0,Q)):new Date(A[1],B,A[3]||1,A[4]||0,A[5]||0,A[6]||0,Q)}}return new Date(j)}(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()!==v},$.isSame=function(F,U){var j=O(F);return this.startOf(U)<=j&&j<=this.endOf(U)},$.isAfter=function(F,U){return O(F)<this.startOf(U)},$.isBefore=function(F,U){return this.endOf(U)<O(F)},$.$g=function(F,U,j){return G.u(F)?this[U]:this.set(j,F)},$.unix=function(){return Math.floor(this.valueOf()/1e3)},$.valueOf=function(){return this.$d.getTime()},$.startOf=function(F,U){var j=this,R=!!G.u(U)||U,A=G.p(F),B=function(de,le){var Se=G.w(j.$u?Date.UTC(j.$y,le,de):new Date(j.$y,le,de),j);return R?Se:Se.endOf(c)},Q=function(de,le){return G.w(j.toDate()[de].apply(j.toDate("s"),(R?[0,0,0,0]:[23,59,59,999]).slice(le)),j)},ne=this.$W,te=this.$M,ce=this.$D,oe="set"+(this.$u?"UTC":"");switch(A){case p:return R?B(1,0):B(31,11);case g:return R?B(1,te):B(0,te+1);case d:var se=this.$locale().weekStart||0,ue=(ne<se?ne+7:ne)-se;return B(R?ce-ue:ce+(6-ue),te);case c:case h: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,U){var j,R=G.p(F),A="set"+(this.$u?"UTC":""),B=(j={},j[c]=A+"Date",j[h]=A+"Date",j[g]=A+"Month",j[p]=A+"FullYear",j[u]=A+"Hours",j[s]=A+"Minutes",j[a]=A+"Seconds",j[i]=A+"Milliseconds",j)[R],Q=R===c?this.$D+(U-this.$W):U;if(R===g||R===p){var ne=this.clone().set(h,1);ne.$d[B](Q),ne.init(),this.$d=ne.set(h,Math.min(this.$D,ne.daysInMonth())).$d}else B&&this.$d[B](Q);return this.init(),this},$.set=function(F,U){return this.clone().$set(F,U)},$.get=function(F){return this[G.p(F)]()},$.add=function(F,U){var j,R=this;F=Number(F);var A=G.p(U),B=function(te){var ce=O(R);return G.w(ce.date(ce.date()+Math.round(te*F)),R)};if(A===g)return this.set(g,this.$M+F);if(A===p)return this.set(p,this.$y+F);if(A===c)return B(1);if(A===d)return B(7);var Q=(j={},j[s]=r,j[u]=o,j[a]=n,j)[A]||1,ne=this.$d.getTime()+F*Q;return G.w(ne,this)},$.subtract=function(F,U){return this.add(-1*F,U)},$.format=function(F){var U=this,j=this.$locale();if(!this.isValid())return j.invalidDate||v;var R=F||"YYYY-MM-DDTHH:mm:ssZ",A=G.z(this),B=this.$H,Q=this.$m,ne=this.$M,te=j.weekdays,ce=j.months,oe=j.meridiem,se=function(le,Se,X,Ce){return le&&(le[Se]||le(U,R))||X[Se].slice(0,Ce)},ue=function(le){return G.s(B%12||12,le,"0")},de=oe||function(le,Se,X){var Ce=le<12?"AM":"PM";return X?Ce.toLowerCase():Ce};return R.replace(b,function(le,Se){return Se||function(X){switch(X){case"YY":return String(U.$y).slice(-2);case"YYYY":return G.s(U.$y,4,"0");case"M":return ne+1;case"MM":return G.s(ne+1,2,"0");case"MMM":return se(j.monthsShort,ne,ce,3);case"MMMM":return se(ce,ne);case"D":return U.$D;case"DD":return G.s(U.$D,2,"0");case"d":return String(U.$W);case"dd":return se(j.weekdaysMin,U.$W,te,2);case"ddd":return se(j.weekdaysShort,U.$W,te,3);case"dddd":return te[U.$W];case"H":return String(B);case"HH":return G.s(B,2,"0");case"h":return ue(1);case"hh":return ue(2);case"a":return de(B,Q,!0);case"A":return de(B,Q,!1);case"m":return String(Q);case"mm":return G.s(Q,2,"0");case"s":return String(U.$s);case"ss":return G.s(U.$s,2,"0");case"SSS":return G.s(U.$ms,3,"0");case"Z":return A}return null}(le)||A.replace(":","")})},$.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},$.diff=function(F,U,j){var R,A=this,B=G.p(U),Q=O(F),ne=(Q.utcOffset()-this.utcOffset())*r,te=this-Q,ce=function(){return G.m(A,Q)};switch(B){case p:R=ce()/12;break;case g:R=ce();break;case m:R=ce()/3;break;case d:R=(te-ne)/6048e5;break;case c:R=(te-ne)/864e5;break;case u:R=te/o;break;case s:R=te/r;break;case a:R=te/n;break;default:R=te}return j?R:G.a(R)},$.daysInMonth=function(){return this.endOf(g).$D},$.$locale=function(){return N[this.$L]},$.locale=function(F,U){if(!F)return this.$L;var j=this.clone(),R=H(F,U,!0);return R&&(j.$L=R),j},$.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()},k}(),Z=W.prototype;return O.prototype=Z,[["$ms",i],["$s",a],["$m",s],["$H",u],["$W",c],["$M",g],["$y",p],["$D",h]].forEach(function(k){Z[k[1]]=function($){return this.$g($,k[0],k[1])}}),O.extend=function(k,$){return k.$i||(k($,W,O),k.$i=!0),O},O.locale=H,O.isDayjs=M,O.unix=function(k){return O(1e3*k)},O.en=N[x],O.Ls=N,O.p={},O})})(ql);var Ph=ql.exports;const Gl=to(Ph);/**
|
|
22
|
+
*/function Aa(e,t){return e?Rb(e)?v.createElement(e,t):e:null}function Rb(e){return Vb(e)||typeof e=="function"||zb(e)}function Vb(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function zb(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function Qf(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=v.useState(()=>({current:Db(t)})),[r,i]=v.useState(()=>n.current.initialState);return n.current.setOptions(s=>({...s,...e,state:{...r,...e.state},onStateChange:l=>{i(l),e.onStateChange==null||e.onStateChange(l)}})),n.current}function ep(e,t){return function(){return e.apply(t,arguments)}}const{toString:Bb}=Object.prototype,{getPrototypeOf:lc}=Object,Pa=(e=>t=>{const n=Bb.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),zn=e=>(e=e.toLowerCase(),t=>Pa(t)===e),Oa=e=>t=>typeof t===e,{isArray:Ho}=Array,Ii=Oa("undefined");function Ub(e){return e!==null&&!Ii(e)&&e.constructor!==null&&!Ii(e.constructor)&&dn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const tp=zn("ArrayBuffer");function jb(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&tp(e.buffer),t}const Wb=Oa("string"),dn=Oa("function"),np=Oa("number"),Na=e=>e!==null&&typeof e=="object",Hb=e=>e===!0||e===!1,Fa=e=>{if(Pa(e)!=="object")return!1;const t=lc(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Gb=zn("Date"),qb=zn("File"),Kb=zn("Blob"),Yb=zn("FileList"),Xb=e=>Na(e)&&dn(e.pipe),Jb=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||dn(e.append)&&((t=Pa(e))==="formdata"||t==="object"&&dn(e.toString)&&e.toString()==="[object FormData]"))},Zb=zn("URLSearchParams"),[Qb,e0,t0,n0]=["ReadableStream","Request","Response","Headers"].map(zn),r0=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Li(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Ho(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{const s=n?Object.getOwnPropertyNames(e):Object.keys(e),l=s.length;let u;for(r=0;r<l;r++)u=s[r],t.call(null,e[u],u,e)}}function rp(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const vo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,op=e=>!Ii(e)&&e!==vo;function cc(){const{caseless:e}=op(this)&&this||{},t={},n=(r,i)=>{const s=e&&rp(t,i)||i;Fa(t[s])&&Fa(r)?t[s]=cc(t[s],r):Fa(r)?t[s]=cc({},r):Ho(r)?t[s]=r.slice():t[s]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&Li(arguments[r],n);return t}const o0=(e,t,n,{allOwnKeys:r}={})=>(Li(t,(i,s)=>{n&&dn(i)?e[s]=ep(i,n):e[s]=i},{allOwnKeys:r}),e),i0=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),a0=(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)},s0=(e,t,n,r)=>{let i,s,l;const u={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)l=i[s],(!r||r(l,e,t))&&!u[l]&&(t[l]=e[l],u[l]=!0);e=n!==!1&&lc(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},l0=(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},c0=e=>{if(!e)return null;if(Ho(e))return e;let t=e.length;if(!np(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},u0=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&lc(Uint8Array)),d0=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const s=i.value;t.call(e,s[0],s[1])}},f0=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},p0=zn("HTMLFormElement"),g0=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),ip=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),h0=zn("RegExp"),ap=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Li(n,(i,s)=>{let l;(l=t(i,s,e))!==!1&&(r[s]=l||i)}),Object.defineProperties(e,r)},m0=e=>{ap(e,(t,n)=>{if(dn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(dn(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+"'")})}})},v0=(e,t)=>{const n={},r=i=>{i.forEach(s=>{n[s]=!0})};return Ho(e)?r(e):r(String(e).split(t)),n},y0=()=>{},x0=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,uc="abcdefghijklmnopqrstuvwxyz",sp="0123456789",lp={DIGIT:sp,ALPHA:uc,ALPHA_DIGIT:uc+uc.toUpperCase()+sp},w0=(e=16,t=lp.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function b0(e){return!!(e&&dn(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const _0=e=>{const t=new Array(10),n=(r,i)=>{if(Na(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const s=Ho(r)?[]:{};return Li(r,(l,u)=>{const g=n(l,i+1);!Ii(g)&&(s[u]=g)}),t[i]=void 0,s}}return r};return n(e,0)},S0=zn("AsyncFunction"),C0=e=>e&&(Na(e)||dn(e))&&dn(e.then)&&dn(e.catch),cp=((e,t)=>e?setImmediate:t?((n,r)=>(vo.addEventListener("message",({source:i,data:s})=>{i===vo&&s===n&&r.length&&r.shift()()},!1),i=>{r.push(i),vo.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",dn(vo.postMessage)),E0=typeof queueMicrotask<"u"?queueMicrotask.bind(vo):typeof process<"u"&&process.nextTick||cp,Z={isArray:Ho,isArrayBuffer:tp,isBuffer:Ub,isFormData:Jb,isArrayBufferView:jb,isString:Wb,isNumber:np,isBoolean:Hb,isObject:Na,isPlainObject:Fa,isReadableStream:Qb,isRequest:e0,isResponse:t0,isHeaders:n0,isUndefined:Ii,isDate:Gb,isFile:qb,isBlob:Kb,isRegExp:h0,isFunction:dn,isStream:Xb,isURLSearchParams:Zb,isTypedArray:u0,isFileList:Yb,forEach:Li,merge:cc,extend:o0,trim:r0,stripBOM:i0,inherits:a0,toFlatObject:s0,kindOf:Pa,kindOfTest:zn,endsWith:l0,toArray:c0,forEachEntry:d0,matchAll:f0,isHTMLForm:p0,hasOwnProperty:ip,hasOwnProp:ip,reduceDescriptors:ap,freezeMethods:m0,toObjectSet:v0,toCamelCase:g0,noop:y0,toFiniteNumber:x0,findKey:rp,global:vo,isContextDefined:op,ALPHABET:lp,generateString:w0,isSpecCompliantForm:b0,toJSONObject:_0,isAsyncFn:S0,isThenable:C0,setImmediate:cp,asap:E0};function We(e,t,n,r,i){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),i&&(this.response=i,this.status=i.status?i.status:null)}Z.inherits(We,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:Z.toJSONObject(this.config),code:this.code,status:this.status}}});const up=We.prototype,dp={};["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=>{dp[e]={value:e}}),Object.defineProperties(We,dp),Object.defineProperty(up,"isAxiosError",{value:!0}),We.from=(e,t,n,r,i,s)=>{const l=Object.create(up);return Z.toFlatObject(e,l,function(g){return g!==Error.prototype},u=>u!=="isAxiosError"),We.call(l,e.message,t,n,r,i),l.cause=e,l.name=e.name,s&&Object.assign(l,s),l};const T0=null;function dc(e){return Z.isPlainObject(e)||Z.isArray(e)}function fp(e){return Z.endsWith(e,"[]")?e.slice(0,-2):e}function pp(e,t,n){return e?e.concat(t).map(function(i,s){return i=fp(i),!n&&s?"["+i+"]":i}).join(n?".":""):t}function A0(e){return Z.isArray(e)&&!e.some(dc)}const P0=Z.toFlatObject(Z,{},null,function(t){return/^is[A-Z]/.test(t)});function Da(e,t,n){if(!Z.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=Z.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(_,S){return!Z.isUndefined(S[_])});const r=n.metaTokens,i=n.visitor||h,s=n.dots,l=n.indexes,g=(n.Blob||typeof Blob<"u"&&Blob)&&Z.isSpecCompliantForm(t);if(!Z.isFunction(i))throw new TypeError("visitor must be a function");function f(w){if(w===null)return"";if(Z.isDate(w))return w.toISOString();if(!g&&Z.isBlob(w))throw new We("Blob is not supported. Use a Buffer instead.");return Z.isArrayBuffer(w)||Z.isTypedArray(w)?g&&typeof Blob=="function"?new Blob([w]):Buffer.from(w):w}function h(w,_,S){let A=w;if(w&&!S&&typeof w=="object"){if(Z.endsWith(_,"{}"))_=r?_:_.slice(0,-2),w=JSON.stringify(w);else if(Z.isArray(w)&&A0(w)||(Z.isFileList(w)||Z.endsWith(_,"[]"))&&(A=Z.toArray(w)))return _=fp(_),A.forEach(function(N,D){!(Z.isUndefined(N)||N===null)&&t.append(l===!0?pp([_],D,s):l===null?_:_+"[]",f(N))}),!1}return dc(w)?!0:(t.append(pp(S,_,s),f(w)),!1)}const y=[],x=Object.assign(P0,{defaultVisitor:h,convertValue:f,isVisitable:dc});function m(w,_){if(!Z.isUndefined(w)){if(y.indexOf(w)!==-1)throw Error("Circular reference detected in "+_.join("."));y.push(w),Z.forEach(w,function(A,P){(!(Z.isUndefined(A)||A===null)&&i.call(t,A,Z.isString(P)?P.trim():P,_,x))===!0&&m(A,_?_.concat(P):[P])}),y.pop()}}if(!Z.isObject(e))throw new TypeError("data must be an object");return m(e),t}function gp(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function fc(e,t){this._pairs=[],e&&Da(e,this,t)}const hp=fc.prototype;hp.append=function(t,n){this._pairs.push([t,n])},hp.toString=function(t){const n=t?function(r){return t.call(this,r,gp)}:gp;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function O0(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function mp(e,t,n){if(!t)return e;const r=n&&n.encode||O0;Z.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let s;if(i?s=i(t,n):s=Z.isURLSearchParams(t)?t.toString():new fc(t,n).toString(r),s){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class vp{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){Z.forEach(this.handlers,function(r){r!==null&&t(r)})}}const yp={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},N0={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:fc,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},pc=typeof window<"u"&&typeof document<"u",gc=typeof navigator=="object"&&navigator||void 0,F0=pc&&(!gc||["ReactNative","NativeScript","NS"].indexOf(gc.product)<0),D0=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",k0=pc&&window.location.href||"http://localhost",Ut={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:pc,hasStandardBrowserEnv:F0,hasStandardBrowserWebWorkerEnv:D0,navigator:gc,origin:k0},Symbol.toStringTag,{value:"Module"})),...N0};function I0(e,t){return Da(e,new Ut.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,s){return Ut.isNode&&Z.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function L0(e){return Z.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function M0(e){const t={},n=Object.keys(e);let r;const i=n.length;let s;for(r=0;r<i;r++)s=n[r],t[s]=e[s];return t}function xp(e){function t(n,r,i,s){let l=n[s++];if(l==="__proto__")return!0;const u=Number.isFinite(+l),g=s>=n.length;return l=!l&&Z.isArray(i)?i.length:l,g?(Z.hasOwnProp(i,l)?i[l]=[i[l],r]:i[l]=r,!u):((!i[l]||!Z.isObject(i[l]))&&(i[l]=[]),t(n,r,i[l],s)&&Z.isArray(i[l])&&(i[l]=M0(i[l])),!u)}if(Z.isFormData(e)&&Z.isFunction(e.entries)){const n={};return Z.forEachEntry(e,(r,i)=>{t(L0(r),i,n,0)}),n}return null}function $0(e,t,n){if(Z.isString(e))try{return(t||JSON.parse)(e),Z.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Mi={transitional:yp,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,s=Z.isObject(t);if(s&&Z.isHTMLForm(t)&&(t=new FormData(t)),Z.isFormData(t))return i?JSON.stringify(xp(t)):t;if(Z.isArrayBuffer(t)||Z.isBuffer(t)||Z.isStream(t)||Z.isFile(t)||Z.isBlob(t)||Z.isReadableStream(t))return t;if(Z.isArrayBufferView(t))return t.buffer;if(Z.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let u;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return I0(t,this.formSerializer).toString();if((u=Z.isFileList(t))||r.indexOf("multipart/form-data")>-1){const g=this.env&&this.env.FormData;return Da(u?{"files[]":t}:t,g&&new g,this.formSerializer)}}return s||i?(n.setContentType("application/json",!1),$0(t)):t}],transformResponse:[function(t){const n=this.transitional||Mi.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(Z.isResponse(t)||Z.isReadableStream(t))return t;if(t&&Z.isString(t)&&(r&&!this.responseType||i)){const l=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(u){if(l)throw u.name==="SyntaxError"?We.from(u,We.ERR_BAD_RESPONSE,this,null,this.response):u}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ut.classes.FormData,Blob:Ut.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Z.forEach(["delete","get","head","post","put","patch"],e=>{Mi.headers[e]={}});const R0=Z.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"]),V0=e=>{const t={};let n,r,i;return e&&e.split(`
|
|
23
|
+
`).forEach(function(l){i=l.indexOf(":"),n=l.substring(0,i).trim().toLowerCase(),r=l.substring(i+1).trim(),!(!n||t[n]&&R0[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},wp=Symbol("internals");function $i(e){return e&&String(e).trim().toLowerCase()}function ka(e){return e===!1||e==null?e:Z.isArray(e)?e.map(ka):String(e)}function z0(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 B0=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function hc(e,t,n,r,i){if(Z.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!Z.isString(t)){if(Z.isString(r))return t.indexOf(r)!==-1;if(Z.isRegExp(r))return r.test(t)}}function U0(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function j0(e,t){const n=Z.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,s,l){return this[r].call(this,t,i,s,l)},configurable:!0})})}class en{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function s(u,g,f){const h=$i(g);if(!h)throw new Error("header name must be a non-empty string");const y=Z.findKey(i,h);(!y||i[y]===void 0||f===!0||f===void 0&&i[y]!==!1)&&(i[y||g]=ka(u))}const l=(u,g)=>Z.forEach(u,(f,h)=>s(f,h,g));if(Z.isPlainObject(t)||t instanceof this.constructor)l(t,n);else if(Z.isString(t)&&(t=t.trim())&&!B0(t))l(V0(t),n);else if(Z.isHeaders(t))for(const[u,g]of t.entries())s(g,u,r);else t!=null&&s(n,t,r);return this}get(t,n){if(t=$i(t),t){const r=Z.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return z0(i);if(Z.isFunction(n))return n.call(this,i,r);if(Z.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=$i(t),t){const r=Z.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||hc(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function s(l){if(l=$i(l),l){const u=Z.findKey(r,l);u&&(!n||hc(r,r[u],u,n))&&(delete r[u],i=!0)}}return Z.isArray(t)?t.forEach(s):s(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const s=n[r];(!t||hc(this,this[s],s,t,!0))&&(delete this[s],i=!0)}return i}normalize(t){const n=this,r={};return Z.forEach(this,(i,s)=>{const l=Z.findKey(r,s);if(l){n[l]=ka(i),delete n[s];return}const u=t?U0(s):String(s).trim();u!==s&&delete n[s],n[u]=ka(i),r[u]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return Z.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&Z.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(i=>r.set(i)),r}static accessor(t){const r=(this[wp]=this[wp]={accessors:{}}).accessors,i=this.prototype;function s(l){const u=$i(l);r[u]||(j0(i,l),r[u]=!0)}return Z.isArray(t)?t.forEach(s):s(t),this}}en.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Z.reduceDescriptors(en.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),Z.freezeMethods(en);function mc(e,t){const n=this||Mi,r=t||n,i=en.from(r.headers);let s=r.data;return Z.forEach(e,function(u){s=u.call(n,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function bp(e){return!!(e&&e.__CANCEL__)}function Go(e,t,n){We.call(this,e??"canceled",We.ERR_CANCELED,t,n),this.name="CanceledError"}Z.inherits(Go,We,{__CANCEL__:!0});function _p(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new We("Request failed with status code "+n.status,[We.ERR_BAD_REQUEST,We.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function W0(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function H0(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,s=0,l;return t=t!==void 0?t:1e3,function(g){const f=Date.now(),h=r[s];l||(l=f),n[i]=g,r[i]=f;let y=s,x=0;for(;y!==i;)x+=n[y++],y=y%e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),f-l<t)return;const m=h&&f-h;return m?Math.round(x*1e3/m):void 0}}function G0(e,t){let n=0,r=1e3/t,i,s;const l=(f,h=Date.now())=>{n=h,i=null,s&&(clearTimeout(s),s=null),e.apply(null,f)};return[(...f)=>{const h=Date.now(),y=h-n;y>=r?l(f,h):(i=f,s||(s=setTimeout(()=>{s=null,l(i)},r-y)))},()=>i&&l(i)]}const Ia=(e,t,n=3)=>{let r=0;const i=H0(50,250);return G0(s=>{const l=s.loaded,u=s.lengthComputable?s.total:void 0,g=l-r,f=i(g),h=l<=u;r=l;const y={loaded:l,total:u,progress:u?l/u:void 0,bytes:g,rate:f||void 0,estimated:f&&u&&h?(u-l)/f:void 0,event:s,lengthComputable:u!=null,[t?"download":"upload"]:!0};e(y)},n)},Sp=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Cp=e=>(...t)=>Z.asap(()=>e(...t)),q0=Ut.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Ut.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Ut.origin),Ut.navigator&&/(msie|trident)/i.test(Ut.navigator.userAgent)):()=>!0,K0=Ut.hasStandardBrowserEnv?{write(e,t,n,r,i,s){const l=[e+"="+encodeURIComponent(t)];Z.isNumber(n)&&l.push("expires="+new Date(n).toGMTString()),Z.isString(r)&&l.push("path="+r),Z.isString(i)&&l.push("domain="+i),s===!0&&l.push("secure"),document.cookie=l.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 Y0(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function X0(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Ep(e,t){return e&&!Y0(t)?X0(e,t):t}const Tp=e=>e instanceof en?{...e}:e;function yo(e,t){t=t||{};const n={};function r(f,h,y,x){return Z.isPlainObject(f)&&Z.isPlainObject(h)?Z.merge.call({caseless:x},f,h):Z.isPlainObject(h)?Z.merge({},h):Z.isArray(h)?h.slice():h}function i(f,h,y,x){if(Z.isUndefined(h)){if(!Z.isUndefined(f))return r(void 0,f,y,x)}else return r(f,h,y,x)}function s(f,h){if(!Z.isUndefined(h))return r(void 0,h)}function l(f,h){if(Z.isUndefined(h)){if(!Z.isUndefined(f))return r(void 0,f)}else return r(void 0,h)}function u(f,h,y){if(y in t)return r(f,h);if(y in e)return r(void 0,f)}const g={url:s,method:s,data:s,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:u,headers:(f,h,y)=>i(Tp(f),Tp(h),y,!0)};return Z.forEach(Object.keys(Object.assign({},e,t)),function(h){const y=g[h]||i,x=y(e[h],t[h],h);Z.isUndefined(x)&&y!==u||(n[h]=x)}),n}const Ap=e=>{const t=yo({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:s,headers:l,auth:u}=t;t.headers=l=en.from(l),t.url=mp(Ep(t.baseURL,t.url),e.params,e.paramsSerializer),u&&l.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):"")));let g;if(Z.isFormData(n)){if(Ut.hasStandardBrowserEnv||Ut.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if((g=l.getContentType())!==!1){const[f,...h]=g?g.split(";").map(y=>y.trim()).filter(Boolean):[];l.setContentType([f||"multipart/form-data",...h].join("; "))}}if(Ut.hasStandardBrowserEnv&&(r&&Z.isFunction(r)&&(r=r(t)),r||r!==!1&&q0(t.url))){const f=i&&s&&K0.read(s);f&&l.set(i,f)}return t},J0=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const i=Ap(e);let s=i.data;const l=en.from(i.headers).normalize();let{responseType:u,onUploadProgress:g,onDownloadProgress:f}=i,h,y,x,m,w;function _(){m&&m(),w&&w(),i.cancelToken&&i.cancelToken.unsubscribe(h),i.signal&&i.signal.removeEventListener("abort",h)}let S=new XMLHttpRequest;S.open(i.method.toUpperCase(),i.url,!0),S.timeout=i.timeout;function A(){if(!S)return;const N=en.from("getAllResponseHeaders"in S&&S.getAllResponseHeaders()),E={data:!u||u==="text"||u==="json"?S.responseText:S.response,status:S.status,statusText:S.statusText,headers:N,config:e,request:S};_p(function(W){n(W),_()},function(W){r(W),_()},E),S=null}"onloadend"in S?S.onloadend=A:S.onreadystatechange=function(){!S||S.readyState!==4||S.status===0&&!(S.responseURL&&S.responseURL.indexOf("file:")===0)||setTimeout(A)},S.onabort=function(){S&&(r(new We("Request aborted",We.ECONNABORTED,e,S)),S=null)},S.onerror=function(){r(new We("Network Error",We.ERR_NETWORK,e,S)),S=null},S.ontimeout=function(){let D=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const E=i.transitional||yp;i.timeoutErrorMessage&&(D=i.timeoutErrorMessage),r(new We(D,E.clarifyTimeoutError?We.ETIMEDOUT:We.ECONNABORTED,e,S)),S=null},s===void 0&&l.setContentType(null),"setRequestHeader"in S&&Z.forEach(l.toJSON(),function(D,E){S.setRequestHeader(E,D)}),Z.isUndefined(i.withCredentials)||(S.withCredentials=!!i.withCredentials),u&&u!=="json"&&(S.responseType=i.responseType),f&&([x,w]=Ia(f,!0),S.addEventListener("progress",x)),g&&S.upload&&([y,m]=Ia(g),S.upload.addEventListener("progress",y),S.upload.addEventListener("loadend",m)),(i.cancelToken||i.signal)&&(h=N=>{S&&(r(!N||N.type?new Go(null,e,S):N),S.abort(),S=null)},i.cancelToken&&i.cancelToken.subscribe(h),i.signal&&(i.signal.aborted?h():i.signal.addEventListener("abort",h)));const P=W0(i.url);if(P&&Ut.protocols.indexOf(P)===-1){r(new We("Unsupported protocol "+P+":",We.ERR_BAD_REQUEST,e));return}S.send(s||null)})},Z0=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const s=function(f){if(!i){i=!0,u();const h=f instanceof Error?f:this.reason;r.abort(h instanceof We?h:new Go(h instanceof Error?h.message:h))}};let l=t&&setTimeout(()=>{l=null,s(new We(`timeout ${t} of ms exceeded`,We.ETIMEDOUT))},t);const u=()=>{e&&(l&&clearTimeout(l),l=null,e.forEach(f=>{f.unsubscribe?f.unsubscribe(s):f.removeEventListener("abort",s)}),e=null)};e.forEach(f=>f.addEventListener("abort",s));const{signal:g}=r;return g.unsubscribe=()=>Z.asap(u),g}},Q0=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},e_=async function*(e,t){for await(const n of t_(e))yield*Q0(n,t)},t_=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()}},Pp=(e,t,n,r)=>{const i=e_(e,t);let s=0,l,u=g=>{l||(l=!0,r&&r(g))};return new ReadableStream({async pull(g){try{const{done:f,value:h}=await i.next();if(f){u(),g.close();return}let y=h.byteLength;if(n){let x=s+=y;n(x)}g.enqueue(new Uint8Array(h))}catch(f){throw u(f),f}},cancel(g){return u(g),i.return()}},{highWaterMark:2})},La=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Op=La&&typeof ReadableStream=="function",n_=La&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Np=(e,...t)=>{try{return!!e(...t)}catch{return!1}},r_=Op&&Np(()=>{let e=!1;const t=new Request(Ut.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Fp=64*1024,vc=Op&&Np(()=>Z.isReadableStream(new Response("").body)),Ma={stream:vc&&(e=>e.body)};La&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Ma[t]&&(Ma[t]=Z.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new We(`Response type '${t}' is not supported`,We.ERR_NOT_SUPPORT,r)})})})(new Response);const o_=async e=>{if(e==null)return 0;if(Z.isBlob(e))return e.size;if(Z.isSpecCompliantForm(e))return(await new Request(Ut.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(Z.isArrayBufferView(e)||Z.isArrayBuffer(e))return e.byteLength;if(Z.isURLSearchParams(e)&&(e=e+""),Z.isString(e))return(await n_(e)).byteLength},i_=async(e,t)=>{const n=Z.toFiniteNumber(e.getContentLength());return n??o_(t)},yc={http:T0,xhr:J0,fetch:La&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:s,timeout:l,onDownloadProgress:u,onUploadProgress:g,responseType:f,headers:h,withCredentials:y="same-origin",fetchOptions:x}=Ap(e);f=f?(f+"").toLowerCase():"text";let m=Z0([i,s&&s.toAbortSignal()],l),w;const _=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let S;try{if(g&&r_&&n!=="get"&&n!=="head"&&(S=await i_(h,r))!==0){let E=new Request(t,{method:"POST",body:r,duplex:"half"}),V;if(Z.isFormData(r)&&(V=E.headers.get("content-type"))&&h.setContentType(V),E.body){const[W,B]=Sp(S,Ia(Cp(g)));r=Pp(E.body,Fp,W,B)}}Z.isString(y)||(y=y?"include":"omit");const A="credentials"in Request.prototype;w=new Request(t,{...x,signal:m,method:n.toUpperCase(),headers:h.normalize().toJSON(),body:r,duplex:"half",credentials:A?y:void 0});let P=await fetch(w);const N=vc&&(f==="stream"||f==="response");if(vc&&(u||N&&_)){const E={};["status","statusText","headers"].forEach(ee=>{E[ee]=P[ee]});const V=Z.toFiniteNumber(P.headers.get("content-length")),[W,B]=u&&Sp(V,Ia(Cp(u),!0))||[];P=new Response(Pp(P.body,Fp,W,()=>{B&&B(),_&&_()}),E)}f=f||"text";let D=await Ma[Z.findKey(Ma,f)||"text"](P,e);return!N&&_&&_(),await new Promise((E,V)=>{_p(E,V,{data:D,headers:en.from(P.headers),status:P.status,statusText:P.statusText,config:e,request:w})})}catch(A){throw _&&_(),A&&A.name==="TypeError"&&/fetch/i.test(A.message)?Object.assign(new We("Network Error",We.ERR_NETWORK,e,w),{cause:A.cause||A}):We.from(A,A&&A.code,e,w)}})};Z.forEach(yc,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Dp=e=>`- ${e}`,a_=e=>Z.isFunction(e)||e===null||e===!1,kp={getAdapter:e=>{e=Z.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let s=0;s<t;s++){n=e[s];let l;if(r=n,!a_(n)&&(r=yc[(l=String(n)).toLowerCase()],r===void 0))throw new We(`Unknown adapter '${l}'`);if(r)break;i[l||"#"+s]=r}if(!r){const s=Object.entries(i).map(([u,g])=>`adapter ${u} `+(g===!1?"is not supported by the environment":"is not available in the build"));let l=t?s.length>1?`since :
|
|
25
|
+
`+s.map(Dp).join(`
|
|
26
|
+
`):" "+Dp(s[0]):"as no adapter specified";throw new We("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return r},adapters:yc};function xc(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Go(null,e)}function Ip(e){return xc(e),e.headers=en.from(e.headers),e.data=mc.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),kp.getAdapter(e.adapter||Mi.adapter)(e).then(function(r){return xc(e),r.data=mc.call(e,e.transformResponse,r),r.headers=en.from(r.headers),r},function(r){return bp(r)||(xc(e),r&&r.response&&(r.response.data=mc.call(e,e.transformResponse,r.response),r.response.headers=en.from(r.response.headers))),Promise.reject(r)})}const Lp="1.7.9",$a={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{$a[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Mp={};$a.transitional=function(t,n,r){function i(s,l){return"[Axios v"+Lp+"] Transitional option '"+s+"'"+l+(r?". "+r:"")}return(s,l,u)=>{if(t===!1)throw new We(i(l," has been removed"+(n?" in "+n:"")),We.ERR_DEPRECATED);return n&&!Mp[l]&&(Mp[l]=!0,console.warn(i(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,l,u):!0}},$a.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function s_(e,t,n){if(typeof e!="object")throw new We("options must be an object",We.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const s=r[i],l=t[s];if(l){const u=e[s],g=u===void 0||l(u,s,e);if(g!==!0)throw new We("option "+s+" must be "+g,We.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new We("Unknown option "+s,We.ERR_BAD_OPTION)}}const Ra={assertOptions:s_,validators:$a},er=Ra.validators;class xo{constructor(t){this.defaults=t,this.interceptors={request:new vp,response:new vp}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
27
|
+
`+s):r.stack=s}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=yo(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&Ra.assertOptions(r,{silentJSONParsing:er.transitional(er.boolean),forcedJSONParsing:er.transitional(er.boolean),clarifyTimeoutError:er.transitional(er.boolean)},!1),i!=null&&(Z.isFunction(i)?n.paramsSerializer={serialize:i}:Ra.assertOptions(i,{encode:er.function,serialize:er.function},!0)),Ra.assertOptions(n,{baseUrl:er.spelling("baseURL"),withXsrfToken:er.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=s&&Z.merge(s.common,s[n.method]);s&&Z.forEach(["delete","get","head","post","put","patch","common"],w=>{delete s[w]}),n.headers=en.concat(l,s);const u=[];let g=!0;this.interceptors.request.forEach(function(_){typeof _.runWhen=="function"&&_.runWhen(n)===!1||(g=g&&_.synchronous,u.unshift(_.fulfilled,_.rejected))});const f=[];this.interceptors.response.forEach(function(_){f.push(_.fulfilled,_.rejected)});let h,y=0,x;if(!g){const w=[Ip.bind(this),void 0];for(w.unshift.apply(w,u),w.push.apply(w,f),x=w.length,h=Promise.resolve(n);y<x;)h=h.then(w[y++],w[y++]);return h}x=u.length;let m=n;for(y=0;y<x;){const w=u[y++],_=u[y++];try{m=w(m)}catch(S){_.call(this,S);break}}try{h=Ip.call(this,m)}catch(w){return Promise.reject(w)}for(y=0,x=f.length;y<x;)h=h.then(f[y++],f[y++]);return h}getUri(t){t=yo(this.defaults,t);const n=Ep(t.baseURL,t.url);return mp(n,t.params,t.paramsSerializer)}}Z.forEach(["delete","get","head","options"],function(t){xo.prototype[t]=function(n,r){return this.request(yo(r||{},{method:t,url:n,data:(r||{}).data}))}}),Z.forEach(["post","put","patch"],function(t){function n(r){return function(s,l,u){return this.request(yo(u||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:l}))}}xo.prototype[t]=n(),xo.prototype[t+"Form"]=n(!0)});class wc{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(i=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const l=new Promise(u=>{r.subscribe(u),s=u}).then(i);return l.cancel=function(){r.unsubscribe(s)},l},t(function(s,l,u){r.reason||(r.reason=new Go(s,l,u),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 wc(function(i){t=i}),cancel:t}}}function l_(e){return function(n){return e.apply(null,n)}}function c_(e){return Z.isObject(e)&&e.isAxiosError===!0}const bc={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(bc).forEach(([e,t])=>{bc[t]=e});function $p(e){const t=new xo(e),n=ep(xo.prototype.request,t);return Z.extend(n,xo.prototype,t,{allOwnKeys:!0}),Z.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return $p(yo(e,i))},n}const $e=$p(Mi);$e.Axios=xo,$e.CanceledError=Go,$e.CancelToken=wc,$e.isCancel=bp,$e.VERSION=Lp,$e.toFormData=Da,$e.AxiosError=We,$e.Cancel=$e.CanceledError,$e.all=function(t){return Promise.all(t)},$e.spread=l_,$e.isAxiosError=c_,$e.mergeConfig=yo,$e.AxiosHeaders=en,$e.formToJSON=e=>xp(Z.isHTMLForm(e)?new FormData(e):e),$e.getAdapter=kp.getAdapter,$e.HttpStatusCode=bc,$e.default=$e;var tr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Va(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const u_=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 d_=e=>!u_.has(e&&e.code);const f_=Va(d_),_c="axios-retry";function Rp(e){const t=["ERR_CANCELED","ECONNABORTED"];return e.response||!e.code||t.includes(e.code)?!1:f_(e)}const Vp=["get","head","options"],p_=Vp.concat(["put","delete"]);function Sc(e){return e.code!=="ECONNABORTED"&&(!e.response||e.response.status===429||e.response.status>=500&&e.response.status<=599)}function g_(e){var t;return(t=e.config)!=null&&t.method?Sc(e)&&Vp.indexOf(e.config.method)!==-1:!1}function zp(e){var t;return(t=e.config)!=null&&t.method?Sc(e)&&p_.indexOf(e.config.method)!==-1:!1}function Bp(e){return Rp(e)||zp(e)}function Cc(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 h_(e=0,t=void 0){return Math.max(0,Cc(t))}function m_(e=0,t=void 0,n=100){const r=2**e*n,i=Math.max(r,Cc(t)),s=i*.2*Math.random();return i+s}function v_(e=100){return(t=0,n=void 0)=>{const r=t*e;return Math.max(r,Cc(n))}}const y_={retries:3,retryCondition:Bp,retryDelay:h_,shouldResetTimeout:!1,onRetry:()=>{},onMaxRetryTimesExceeded:()=>{},validateResponse:null};function x_(e,t){return{...y_,...t,...e[_c]}}function Up(e,t,n=!1){const r=x_(e,t||{});return r.retryCount=r.retryCount||0,(!r.lastRequestTime||n)&&(r.lastRequestTime=Date.now()),e[_c]=r,r}function w_(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 b_(e,t){const{retries:n,retryCondition:r}=e,i=(e.retryCount||0)<n&&r(t);if(typeof i=="object")try{return await i!==!1}catch{return!1}return i}async function __(e,t,n,r){var g;t.retryCount+=1;const{retryDelay:i,shouldResetTimeout:s,onRetry:l}=t,u=i(t.retryCount,n);if(w_(e,r),!s&&r.timeout&&t.lastRequestTime){const f=Date.now()-t.lastRequestTime,h=r.timeout-f-u;if(h<=0)return Promise.reject(n);r.timeout=h}return r.transformRequest=[f=>f],await l(t.retryCount,n,r),(g=r.signal)!=null&&g.aborted?Promise.resolve(e(r)):new Promise(f=>{var x;const h=()=>{clearTimeout(y),f(e(r))},y=setTimeout(()=>{var m;f(e(r)),(m=r.signal)!=null&&m.removeEventListener&&r.signal.removeEventListener("abort",h)},u);(x=r.signal)!=null&&x.addEventListener&&r.signal.addEventListener("abort",h,{once:!0})})}async function S_(e,t){e.retryCount>=e.retries&&await e.onMaxRetryTimesExceeded(t,e.retryCount)}const wr=(e,t)=>{const n=e.interceptors.request.use(i=>{var s;return Up(i,t,!0),(s=i[_c])!=null&&s.validateResponse&&(i.validateStatus=()=>!1),i}),r=e.interceptors.response.use(null,async i=>{var u;const{config:s}=i;if(!s)return Promise.reject(i);const l=Up(s,t);return i.response&&((u=l.validateResponse)!=null&&u.call(l,i.response))?i.response:await b_(l,i)?__(e,l,i,s):(await S_(l,i),Promise.reject(i))});return{requestInterceptorId:n,responseInterceptorId:r}};wr.isNetworkError=Rp,wr.isSafeRequestError=g_,wr.isIdempotentRequestError=zp,wr.isNetworkOrIdempotentRequestError=Bp,wr.exponentialDelay=m_,wr.linearDelay=v_,wr.isRetryableError=Sc;var jp={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(tr,function(){var n=1e3,r=6e4,i=36e5,s="millisecond",l="second",u="minute",g="hour",f="day",h="week",y="month",x="quarter",m="year",w="date",_="Invalid Date",S=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,A=/\[([^\]]+)]|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,P={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(U){var K=["th","st","nd","rd"],G=U%100;return"["+U+(K[(G-20)%10]||K[G]||K[0])+"]"}},N=function(U,K,G){var te=String(U);return!te||te.length>=K?U:""+Array(K+1-te.length).join(G)+U},D={s:N,z:function(U){var K=-U.utcOffset(),G=Math.abs(K),te=Math.floor(G/60),Y=G%60;return(K<=0?"+":"-")+N(te,2,"0")+":"+N(Y,2,"0")},m:function U(K,G){if(K.date()<G.date())return-U(G,K);var te=12*(G.year()-K.year())+(G.month()-K.month()),Y=K.clone().add(te,y),J=G-Y<0,M=K.clone().add(te+(J?-1:1),y);return+(-(te+(G-Y)/(J?Y-M:M-Y))||0)},a:function(U){return U<0?Math.ceil(U)||0:Math.floor(U)},p:function(U){return{M:y,y:m,w:h,d:f,D:w,h:g,m:u,s:l,ms:s,Q:x}[U]||String(U||"").toLowerCase().replace(/s$/,"")},u:function(U){return U===void 0}},E="en",V={};V[E]=P;var W="$isDayjsObject",B=function(U){return U instanceof ie||!(!U||!U[W])},ee=function U(K,G,te){var Y;if(!K)return E;if(typeof K=="string"){var J=K.toLowerCase();V[J]&&(Y=J),G&&(V[J]=G,Y=J);var M=K.split("-");if(!Y&&M.length>1)return U(M[0])}else{var Q=K.name;V[Q]=K,Y=Q}return!te&&Y&&(E=Y),Y||!te&&E},H=function(U,K){if(B(U))return U.clone();var G=typeof K=="object"?K:{};return G.date=U,G.args=arguments,new ie(G)},ce=D;ce.l=ee,ce.i=B,ce.w=function(U,K){return H(U,{locale:K.$L,utc:K.$u,x:K.$x,$offset:K.$offset})};var ie=function(){function U(G){this.$L=ee(G.locale,null,!0),this.parse(G),this.$x=this.$x||G.x||{},this[W]=!0}var K=U.prototype;return K.parse=function(G){this.$d=function(te){var Y=te.date,J=te.utc;if(Y===null)return new Date(NaN);if(ce.u(Y))return new Date;if(Y instanceof Date)return new Date(Y);if(typeof Y=="string"&&!/Z$/i.test(Y)){var M=Y.match(S);if(M){var Q=M[2]-1||0,ve=(M[7]||"0").substring(0,3);return J?new Date(Date.UTC(M[1],Q,M[3]||1,M[4]||0,M[5]||0,M[6]||0,ve)):new Date(M[1],Q,M[3]||1,M[4]||0,M[5]||0,M[6]||0,ve)}}return new Date(Y)}(G),this.init()},K.init=function(){var G=this.$d;this.$y=G.getFullYear(),this.$M=G.getMonth(),this.$D=G.getDate(),this.$W=G.getDay(),this.$H=G.getHours(),this.$m=G.getMinutes(),this.$s=G.getSeconds(),this.$ms=G.getMilliseconds()},K.$utils=function(){return ce},K.isValid=function(){return this.$d.toString()!==_},K.isSame=function(G,te){var Y=H(G);return this.startOf(te)<=Y&&Y<=this.endOf(te)},K.isAfter=function(G,te){return H(G)<this.startOf(te)},K.isBefore=function(G,te){return this.endOf(te)<H(G)},K.$g=function(G,te,Y){return ce.u(G)?this[te]:this.set(Y,G)},K.unix=function(){return Math.floor(this.valueOf()/1e3)},K.valueOf=function(){return this.$d.getTime()},K.startOf=function(G,te){var Y=this,J=!!ce.u(te)||te,M=ce.p(G),Q=function(Ne,Te){var He=ce.w(Y.$u?Date.UTC(Y.$y,Te,Ne):new Date(Y.$y,Te,Ne),Y);return J?He:He.endOf(f)},ve=function(Ne,Te){return ce.w(Y.toDate()[Ne].apply(Y.toDate("s"),(J?[0,0,0,0]:[23,59,59,999]).slice(Te)),Y)},xe=this.$W,ye=this.$M,Se=this.$D,we="set"+(this.$u?"UTC":"");switch(M){case m:return J?Q(1,0):Q(31,11);case y:return J?Q(1,ye):Q(0,ye+1);case h:var Ee=this.$locale().weekStart||0,Pe=(xe<Ee?xe+7:xe)-Ee;return Q(J?Se-Pe:Se+(6-Pe),ye);case f:case w:return ve(we+"Hours",0);case g:return ve(we+"Minutes",1);case u:return ve(we+"Seconds",2);case l:return ve(we+"Milliseconds",3);default:return this.clone()}},K.endOf=function(G){return this.startOf(G,!1)},K.$set=function(G,te){var Y,J=ce.p(G),M="set"+(this.$u?"UTC":""),Q=(Y={},Y[f]=M+"Date",Y[w]=M+"Date",Y[y]=M+"Month",Y[m]=M+"FullYear",Y[g]=M+"Hours",Y[u]=M+"Minutes",Y[l]=M+"Seconds",Y[s]=M+"Milliseconds",Y)[J],ve=J===f?this.$D+(te-this.$W):te;if(J===y||J===m){var xe=this.clone().set(w,1);xe.$d[Q](ve),xe.init(),this.$d=xe.set(w,Math.min(this.$D,xe.daysInMonth())).$d}else Q&&this.$d[Q](ve);return this.init(),this},K.set=function(G,te){return this.clone().$set(G,te)},K.get=function(G){return this[ce.p(G)]()},K.add=function(G,te){var Y,J=this;G=Number(G);var M=ce.p(te),Q=function(ye){var Se=H(J);return ce.w(Se.date(Se.date()+Math.round(ye*G)),J)};if(M===y)return this.set(y,this.$M+G);if(M===m)return this.set(m,this.$y+G);if(M===f)return Q(1);if(M===h)return Q(7);var ve=(Y={},Y[u]=r,Y[g]=i,Y[l]=n,Y)[M]||1,xe=this.$d.getTime()+G*ve;return ce.w(xe,this)},K.subtract=function(G,te){return this.add(-1*G,te)},K.format=function(G){var te=this,Y=this.$locale();if(!this.isValid())return Y.invalidDate||_;var J=G||"YYYY-MM-DDTHH:mm:ssZ",M=ce.z(this),Q=this.$H,ve=this.$m,xe=this.$M,ye=Y.weekdays,Se=Y.months,we=Y.meridiem,Ee=function(Te,He,fe,Xe){return Te&&(Te[He]||Te(te,J))||fe[He].slice(0,Xe)},Pe=function(Te){return ce.s(Q%12||12,Te,"0")},Ne=we||function(Te,He,fe){var Xe=Te<12?"AM":"PM";return fe?Xe.toLowerCase():Xe};return J.replace(A,function(Te,He){return He||function(fe){switch(fe){case"YY":return String(te.$y).slice(-2);case"YYYY":return ce.s(te.$y,4,"0");case"M":return xe+1;case"MM":return ce.s(xe+1,2,"0");case"MMM":return Ee(Y.monthsShort,xe,Se,3);case"MMMM":return Ee(Se,xe);case"D":return te.$D;case"DD":return ce.s(te.$D,2,"0");case"d":return String(te.$W);case"dd":return Ee(Y.weekdaysMin,te.$W,ye,2);case"ddd":return Ee(Y.weekdaysShort,te.$W,ye,3);case"dddd":return ye[te.$W];case"H":return String(Q);case"HH":return ce.s(Q,2,"0");case"h":return Pe(1);case"hh":return Pe(2);case"a":return Ne(Q,ve,!0);case"A":return Ne(Q,ve,!1);case"m":return String(ve);case"mm":return ce.s(ve,2,"0");case"s":return String(te.$s);case"ss":return ce.s(te.$s,2,"0");case"SSS":return ce.s(te.$ms,3,"0");case"Z":return M}return null}(Te)||M.replace(":","")})},K.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},K.diff=function(G,te,Y){var J,M=this,Q=ce.p(te),ve=H(G),xe=(ve.utcOffset()-this.utcOffset())*r,ye=this-ve,Se=function(){return ce.m(M,ve)};switch(Q){case m:J=Se()/12;break;case y:J=Se();break;case x:J=Se()/3;break;case h:J=(ye-xe)/6048e5;break;case f:J=(ye-xe)/864e5;break;case g:J=ye/i;break;case u:J=ye/r;break;case l:J=ye/n;break;default:J=ye}return Y?J:ce.a(J)},K.daysInMonth=function(){return this.endOf(y).$D},K.$locale=function(){return V[this.$L]},K.locale=function(G,te){if(!G)return this.$L;var Y=this.clone(),J=ee(G,te,!0);return J&&(Y.$L=J),Y},K.clone=function(){return ce.w(this.$d,this)},K.toDate=function(){return new Date(this.valueOf())},K.toJSON=function(){return this.isValid()?this.toISOString():null},K.toISOString=function(){return this.$d.toISOString()},K.toString=function(){return this.$d.toUTCString()},U}(),he=ie.prototype;return H.prototype=he,[["$ms",s],["$s",l],["$m",u],["$H",g],["$W",f],["$M",y],["$y",m],["$D",w]].forEach(function(U){he[U[1]]=function(K){return this.$g(K,U[0],U[1])}}),H.extend=function(U,K){return U.$i||(U(K,ie,H),U.$i=!0),H},H.locale=ee,H.isDayjs=B,H.unix=function(U){return H(1e3*U)},H.en=V[E],H.Ls=V,H.p={},H})})(jp);var C_=jp.exports;const Wp=Va(C_);var za={exports:{}};/**
|
|
28
|
+
* @license
|
|
29
|
+
* Lodash <https://lodash.com/>
|
|
30
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
31
|
+
* Released under MIT license <https://lodash.com/license>
|
|
32
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
33
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
34
|
+
*/za.exports,function(e,t){(function(){var n,r="4.17.21",i=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",l="Expected a function",u="Invalid `variable` option passed into `_.template`",g="__lodash_hash_undefined__",f=500,h="__lodash_placeholder__",y=1,x=2,m=4,w=1,_=2,S=1,A=2,P=4,N=8,D=16,E=32,V=64,W=128,B=256,ee=512,H=30,ce="...",ie=800,he=16,U=1,K=2,G=3,te=1/0,Y=9007199254740991,J=17976931348623157e292,M=NaN,Q=4294967295,ve=Q-1,xe=Q>>>1,ye=[["ary",W],["bind",S],["bindKey",A],["curry",N],["curryRight",D],["flip",ee],["partial",E],["partialRight",V],["rearg",B]],Se="[object Arguments]",we="[object Array]",Ee="[object AsyncFunction]",Pe="[object Boolean]",Ne="[object Date]",Te="[object DOMException]",He="[object Error]",fe="[object Function]",Xe="[object GeneratorFunction]",at="[object Map]",$t="[object Number]",Yt="[object Null]",mt="[object Object]",F="[object Promise]",z="[object Proxy]",X="[object RegExp]",ge="[object Set]",pe="[object String]",ue="[object Symbol]",ne="[object Undefined]",de="[object WeakMap]",Re="[object WeakSet]",ze="[object ArrayBuffer]",nt="[object DataView]",Rt="[object Float32Array]",Xt="[object Float64Array]",Ct="[object Int8Array]",En="[object Int16Array]",Tn="[object Int32Array]",bt="[object Uint8Array]",on="[object Uint8ClampedArray]",hr="[object Uint16Array]",qn="[object Uint32Array]",tt=/\b__p \+= '';/g,Qr=/\b(__p \+=) '' \+/g,Ws=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Kn=/&(?:amp|lt|gt|quot|#39);/g,eo=/[&<>"']/g,Ao=RegExp(Kn.source),gi=RegExp(eo.source),md=/<%-([\s\S]+?)%>/g,Po=/<%([\s\S]+?)%>/g,hi=/<%=([\s\S]+?)%>/g,Hs=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Gs=/^\w*$/,vd=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,to=/[\\^$.*+?()[\]{}|]/g,jt=RegExp(to.source),Oo=/^\s+/,Fy=/\s/,Dy=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,yd=/\{\n\/\* \[wrapped with (.+)\] \*/,ky=/,? & /,xd=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,An=/[()=,{}\[\]\/\s]/,no=/\\(\\)?/g,wd=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ro=/\w*$/,Wt=/^[-+]0x[0-9a-f]+$/i,bd=/^0b[01]+$/i,_d=/^\[object .+?Constructor\]$/,Sd=/^0o[0-7]+$/i,Cd=/^(?:0|[1-9]\d*)$/,qs=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,hn=/($^)/,No=/['\n\r\u2028\u2029\\]/g,mi="\\ud800-\\udfff",oo="\\u0300-\\u036f",Ed="\\ufe20-\\ufe2f",ra="\\u20d0-\\u20ff",Ks=oo+Ed+ra,Ys="\\u2700-\\u27bf",Fo="a-z\\xdf-\\xf6\\xf8-\\xff",Td="\\xac\\xb1\\xd7\\xf7",Ad="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Xs="\\u2000-\\u206f",Js=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Zs="A-Z\\xc0-\\xd6\\xd8-\\xde",oa="\\ufe0e\\ufe0f",vi=Td+Ad+Xs+Js,ia="['’]",Pd="["+mi+"]",Qs="["+vi+"]",yi="["+Ks+"]",el="\\d+",Od="["+Ys+"]",tl="["+Fo+"]",Yn="[^"+mi+vi+el+Ys+Fo+Zs+"]",Pn="\\ud83c[\\udffb-\\udfff]",Nd="(?:"+yi+"|"+Pn+")",aa="[^"+mi+"]",I="(?:\\ud83c[\\udde6-\\uddff]){2}",j="[\\ud800-\\udbff][\\udc00-\\udfff]",re="["+Zs+"]",me="\\u200d",be="(?:"+tl+"|"+Yn+")",Fe="(?:"+re+"|"+Yn+")",Ze="(?:"+ia+"(?:d|ll|m|re|s|t|ve))?",Et="(?:"+ia+"(?:D|LL|M|RE|S|T|VE))?",On=Nd+"?",io="["+oa+"]?",nl="(?:"+me+"(?:"+[aa,I,j].join("|")+")"+io+On+")*",rl="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Do="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ko=io+On+nl,Io="(?:"+[Od,I,j].join("|")+")"+ko,ao="(?:"+[aa+yi+"?",yi,I,j,Pd].join("|")+")",Pr=RegExp(ia,"g"),Tt=RegExp(yi,"g"),kt=RegExp(Pn+"(?="+Pn+")|"+ao+ko,"g"),Lo=RegExp([re+"?"+tl+"+"+Ze+"(?="+[Qs,re,"$"].join("|")+")",Fe+"+"+Et+"(?="+[Qs,re+be,"$"].join("|")+")",re+"?"+be+"+"+Ze,re+"+"+Et,Do,rl,el,Io].join("|"),"g"),AN=RegExp("["+me+mi+Ks+oa+"]"),PN=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ON=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],NN=-1,ht={};ht[Rt]=ht[Xt]=ht[Ct]=ht[En]=ht[Tn]=ht[bt]=ht[on]=ht[hr]=ht[qn]=!0,ht[Se]=ht[we]=ht[ze]=ht[Pe]=ht[nt]=ht[Ne]=ht[He]=ht[fe]=ht[at]=ht[$t]=ht[mt]=ht[X]=ht[ge]=ht[pe]=ht[de]=!1;var ft={};ft[Se]=ft[we]=ft[ze]=ft[nt]=ft[Pe]=ft[Ne]=ft[Rt]=ft[Xt]=ft[Ct]=ft[En]=ft[Tn]=ft[at]=ft[$t]=ft[mt]=ft[X]=ft[ge]=ft[pe]=ft[ue]=ft[bt]=ft[on]=ft[hr]=ft[qn]=!0,ft[He]=ft[fe]=ft[de]=!1;var FN={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},DN={"&":"&","<":"<",">":">",'"':""","'":"'"},kN={"&":"&","<":"<",">":">",""":'"',"'":"'"},IN={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},LN=parseFloat,MN=parseInt,Iy=typeof tr=="object"&&tr&&tr.Object===Object&&tr,$N=typeof self=="object"&&self&&self.Object===Object&&self,Vt=Iy||$N||Function("return this")(),Fd=t&&!t.nodeType&&t,Mo=Fd&&!0&&e&&!e.nodeType&&e,Ly=Mo&&Mo.exports===Fd,Dd=Ly&&Iy.process,Nn=function(){try{var $=Mo&&Mo.require&&Mo.require("util").types;return $||Dd&&Dd.binding&&Dd.binding("util")}catch{}}(),My=Nn&&Nn.isArrayBuffer,$y=Nn&&Nn.isDate,Ry=Nn&&Nn.isMap,Vy=Nn&&Nn.isRegExp,zy=Nn&&Nn.isSet,By=Nn&&Nn.isTypedArray;function mn($,oe,q){switch(q.length){case 0:return $.call(oe);case 1:return $.call(oe,q[0]);case 2:return $.call(oe,q[0],q[1]);case 3:return $.call(oe,q[0],q[1],q[2])}return $.apply(oe,q)}function RN($,oe,q,Ce){for(var Be=-1,rt=$==null?0:$.length;++Be<rt;){var It=$[Be];oe(Ce,It,q(It),$)}return Ce}function Fn($,oe){for(var q=-1,Ce=$==null?0:$.length;++q<Ce&&oe($[q],q,$)!==!1;);return $}function VN($,oe){for(var q=$==null?0:$.length;q--&&oe($[q],q,$)!==!1;);return $}function Uy($,oe){for(var q=-1,Ce=$==null?0:$.length;++q<Ce;)if(!oe($[q],q,$))return!1;return!0}function so($,oe){for(var q=-1,Ce=$==null?0:$.length,Be=0,rt=[];++q<Ce;){var It=$[q];oe(It,q,$)&&(rt[Be++]=It)}return rt}function ol($,oe){var q=$==null?0:$.length;return!!q&&xi($,oe,0)>-1}function kd($,oe,q){for(var Ce=-1,Be=$==null?0:$.length;++Ce<Be;)if(q(oe,$[Ce]))return!0;return!1}function vt($,oe){for(var q=-1,Ce=$==null?0:$.length,Be=Array(Ce);++q<Ce;)Be[q]=oe($[q],q,$);return Be}function lo($,oe){for(var q=-1,Ce=oe.length,Be=$.length;++q<Ce;)$[Be+q]=oe[q];return $}function Id($,oe,q,Ce){var Be=-1,rt=$==null?0:$.length;for(Ce&&rt&&(q=$[++Be]);++Be<rt;)q=oe(q,$[Be],Be,$);return q}function zN($,oe,q,Ce){var Be=$==null?0:$.length;for(Ce&&Be&&(q=$[--Be]);Be--;)q=oe(q,$[Be],Be,$);return q}function Ld($,oe){for(var q=-1,Ce=$==null?0:$.length;++q<Ce;)if(oe($[q],q,$))return!0;return!1}var BN=Md("length");function UN($){return $.split("")}function jN($){return $.match(xd)||[]}function jy($,oe,q){var Ce;return q($,function(Be,rt,It){if(oe(Be,rt,It))return Ce=rt,!1}),Ce}function il($,oe,q,Ce){for(var Be=$.length,rt=q+(Ce?1:-1);Ce?rt--:++rt<Be;)if(oe($[rt],rt,$))return rt;return-1}function xi($,oe,q){return oe===oe?tF($,oe,q):il($,Wy,q)}function WN($,oe,q,Ce){for(var Be=q-1,rt=$.length;++Be<rt;)if(Ce($[Be],oe))return Be;return-1}function Wy($){return $!==$}function Hy($,oe){var q=$==null?0:$.length;return q?Rd($,oe)/q:M}function Md($){return function(oe){return oe==null?n:oe[$]}}function $d($){return function(oe){return $==null?n:$[oe]}}function Gy($,oe,q,Ce,Be){return Be($,function(rt,It,dt){q=Ce?(Ce=!1,rt):oe(q,rt,It,dt)}),q}function HN($,oe){var q=$.length;for($.sort(oe);q--;)$[q]=$[q].value;return $}function Rd($,oe){for(var q,Ce=-1,Be=$.length;++Ce<Be;){var rt=oe($[Ce]);rt!==n&&(q=q===n?rt:q+rt)}return q}function Vd($,oe){for(var q=-1,Ce=Array($);++q<$;)Ce[q]=oe(q);return Ce}function GN($,oe){return vt(oe,function(q){return[q,$[q]]})}function qy($){return $&&$.slice(0,Jy($)+1).replace(Oo,"")}function vn($){return function(oe){return $(oe)}}function zd($,oe){return vt(oe,function(q){return $[q]})}function sa($,oe){return $.has(oe)}function Ky($,oe){for(var q=-1,Ce=$.length;++q<Ce&&xi(oe,$[q],0)>-1;);return q}function Yy($,oe){for(var q=$.length;q--&&xi(oe,$[q],0)>-1;);return q}function qN($,oe){for(var q=$.length,Ce=0;q--;)$[q]===oe&&++Ce;return Ce}var KN=$d(FN),YN=$d(DN);function XN($){return"\\"+IN[$]}function JN($,oe){return $==null?n:$[oe]}function wi($){return AN.test($)}function ZN($){return PN.test($)}function QN($){for(var oe,q=[];!(oe=$.next()).done;)q.push(oe.value);return q}function Bd($){var oe=-1,q=Array($.size);return $.forEach(function(Ce,Be){q[++oe]=[Be,Ce]}),q}function Xy($,oe){return function(q){return $(oe(q))}}function co($,oe){for(var q=-1,Ce=$.length,Be=0,rt=[];++q<Ce;){var It=$[q];(It===oe||It===h)&&($[q]=h,rt[Be++]=q)}return rt}function al($){var oe=-1,q=Array($.size);return $.forEach(function(Ce){q[++oe]=Ce}),q}function eF($){var oe=-1,q=Array($.size);return $.forEach(function(Ce){q[++oe]=[Ce,Ce]}),q}function tF($,oe,q){for(var Ce=q-1,Be=$.length;++Ce<Be;)if($[Ce]===oe)return Ce;return-1}function nF($,oe,q){for(var Ce=q+1;Ce--;)if($[Ce]===oe)return Ce;return Ce}function bi($){return wi($)?oF($):BN($)}function Xn($){return wi($)?iF($):UN($)}function Jy($){for(var oe=$.length;oe--&&Fy.test($.charAt(oe)););return oe}var rF=$d(kN);function oF($){for(var oe=kt.lastIndex=0;kt.test($);)++oe;return oe}function iF($){return $.match(kt)||[]}function aF($){return $.match(Lo)||[]}var sF=function $(oe){oe=oe==null?Vt:_i.defaults(Vt.Object(),oe,_i.pick(Vt,ON));var q=oe.Array,Ce=oe.Date,Be=oe.Error,rt=oe.Function,It=oe.Math,dt=oe.Object,Ud=oe.RegExp,lF=oe.String,Dn=oe.TypeError,sl=q.prototype,cF=rt.prototype,Si=dt.prototype,ll=oe["__core-js_shared__"],cl=cF.toString,lt=Si.hasOwnProperty,uF=0,Zy=function(){var o=/[^.]+$/.exec(ll&&ll.keys&&ll.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}(),ul=Si.toString,dF=cl.call(dt),fF=Vt._,pF=Ud("^"+cl.call(lt).replace(to,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),dl=Ly?oe.Buffer:n,uo=oe.Symbol,fl=oe.Uint8Array,Qy=dl?dl.allocUnsafe:n,pl=Xy(dt.getPrototypeOf,dt),ex=dt.create,tx=Si.propertyIsEnumerable,gl=sl.splice,nx=uo?uo.isConcatSpreadable:n,la=uo?uo.iterator:n,$o=uo?uo.toStringTag:n,hl=function(){try{var o=Uo(dt,"defineProperty");return o({},"",{}),o}catch{}}(),gF=oe.clearTimeout!==Vt.clearTimeout&&oe.clearTimeout,hF=Ce&&Ce.now!==Vt.Date.now&&Ce.now,mF=oe.setTimeout!==Vt.setTimeout&&oe.setTimeout,ml=It.ceil,vl=It.floor,jd=dt.getOwnPropertySymbols,vF=dl?dl.isBuffer:n,rx=oe.isFinite,yF=sl.join,xF=Xy(dt.keys,dt),Lt=It.max,Ht=It.min,wF=Ce.now,bF=oe.parseInt,ox=It.random,_F=sl.reverse,Wd=Uo(oe,"DataView"),ca=Uo(oe,"Map"),Hd=Uo(oe,"Promise"),Ci=Uo(oe,"Set"),ua=Uo(oe,"WeakMap"),da=Uo(dt,"create"),yl=ua&&new ua,Ei={},SF=jo(Wd),CF=jo(ca),EF=jo(Hd),TF=jo(Ci),AF=jo(ua),xl=uo?uo.prototype:n,fa=xl?xl.valueOf:n,ix=xl?xl.toString:n;function C(o){if(_t(o)&&!je(o)&&!(o instanceof Qe)){if(o instanceof kn)return o;if(lt.call(o,"__wrapped__"))return aw(o)}return new kn(o)}var Ti=function(){function o(){}return function(a){if(!xt(a))return{};if(ex)return ex(a);o.prototype=a;var c=new o;return o.prototype=n,c}}();function wl(){}function kn(o,a){this.__wrapped__=o,this.__actions__=[],this.__chain__=!!a,this.__index__=0,this.__values__=n}C.templateSettings={escape:md,evaluate:Po,interpolate:hi,variable:"",imports:{_:C}},C.prototype=wl.prototype,C.prototype.constructor=C,kn.prototype=Ti(wl.prototype),kn.prototype.constructor=kn;function Qe(o){this.__wrapped__=o,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Q,this.__views__=[]}function PF(){var o=new Qe(this.__wrapped__);return o.__actions__=an(this.__actions__),o.__dir__=this.__dir__,o.__filtered__=this.__filtered__,o.__iteratees__=an(this.__iteratees__),o.__takeCount__=this.__takeCount__,o.__views__=an(this.__views__),o}function OF(){if(this.__filtered__){var o=new Qe(this);o.__dir__=-1,o.__filtered__=!0}else o=this.clone(),o.__dir__*=-1;return o}function NF(){var o=this.__wrapped__.value(),a=this.__dir__,c=je(o),p=a<0,b=c?o.length:0,T=UD(0,b,this.__views__),O=T.start,k=T.end,R=k-O,ae=p?k:O-1,se=this.__iteratees__,le=se.length,_e=0,Oe=Ht(R,this.__takeCount__);if(!c||!p&&b==R&&Oe==R)return Ox(o,this.__actions__);var ke=[];e:for(;R--&&_e<Oe;){ae+=a;for(var Ke=-1,Ie=o[ae];++Ke<le;){var Je=se[Ke],et=Je.iteratee,wn=Je.type,Qt=et(Ie);if(wn==K)Ie=Qt;else if(!Qt){if(wn==U)continue e;break e}}ke[_e++]=Ie}return ke}Qe.prototype=Ti(wl.prototype),Qe.prototype.constructor=Qe;function Ro(o){var a=-1,c=o==null?0:o.length;for(this.clear();++a<c;){var p=o[a];this.set(p[0],p[1])}}function FF(){this.__data__=da?da(null):{},this.size=0}function DF(o){var a=this.has(o)&&delete this.__data__[o];return this.size-=a?1:0,a}function kF(o){var a=this.__data__;if(da){var c=a[o];return c===g?n:c}return lt.call(a,o)?a[o]:n}function IF(o){var a=this.__data__;return da?a[o]!==n:lt.call(a,o)}function LF(o,a){var c=this.__data__;return this.size+=this.has(o)?0:1,c[o]=da&&a===n?g:a,this}Ro.prototype.clear=FF,Ro.prototype.delete=DF,Ro.prototype.get=kF,Ro.prototype.has=IF,Ro.prototype.set=LF;function Or(o){var a=-1,c=o==null?0:o.length;for(this.clear();++a<c;){var p=o[a];this.set(p[0],p[1])}}function MF(){this.__data__=[],this.size=0}function $F(o){var a=this.__data__,c=bl(a,o);if(c<0)return!1;var p=a.length-1;return c==p?a.pop():gl.call(a,c,1),--this.size,!0}function RF(o){var a=this.__data__,c=bl(a,o);return c<0?n:a[c][1]}function VF(o){return bl(this.__data__,o)>-1}function zF(o,a){var c=this.__data__,p=bl(c,o);return p<0?(++this.size,c.push([o,a])):c[p][1]=a,this}Or.prototype.clear=MF,Or.prototype.delete=$F,Or.prototype.get=RF,Or.prototype.has=VF,Or.prototype.set=zF;function Nr(o){var a=-1,c=o==null?0:o.length;for(this.clear();++a<c;){var p=o[a];this.set(p[0],p[1])}}function BF(){this.size=0,this.__data__={hash:new Ro,map:new(ca||Or),string:new Ro}}function UF(o){var a=kl(this,o).delete(o);return this.size-=a?1:0,a}function jF(o){return kl(this,o).get(o)}function WF(o){return kl(this,o).has(o)}function HF(o,a){var c=kl(this,o),p=c.size;return c.set(o,a),this.size+=c.size==p?0:1,this}Nr.prototype.clear=BF,Nr.prototype.delete=UF,Nr.prototype.get=jF,Nr.prototype.has=WF,Nr.prototype.set=HF;function Vo(o){var a=-1,c=o==null?0:o.length;for(this.__data__=new Nr;++a<c;)this.add(o[a])}function GF(o){return this.__data__.set(o,g),this}function qF(o){return this.__data__.has(o)}Vo.prototype.add=Vo.prototype.push=GF,Vo.prototype.has=qF;function Jn(o){var a=this.__data__=new Or(o);this.size=a.size}function KF(){this.__data__=new Or,this.size=0}function YF(o){var a=this.__data__,c=a.delete(o);return this.size=a.size,c}function XF(o){return this.__data__.get(o)}function JF(o){return this.__data__.has(o)}function ZF(o,a){var c=this.__data__;if(c instanceof Or){var p=c.__data__;if(!ca||p.length<i-1)return p.push([o,a]),this.size=++c.size,this;c=this.__data__=new Nr(p)}return c.set(o,a),this.size=c.size,this}Jn.prototype.clear=KF,Jn.prototype.delete=YF,Jn.prototype.get=XF,Jn.prototype.has=JF,Jn.prototype.set=ZF;function ax(o,a){var c=je(o),p=!c&&Wo(o),b=!c&&!p&&mo(o),T=!c&&!p&&!b&&Ni(o),O=c||p||b||T,k=O?Vd(o.length,lF):[],R=k.length;for(var ae in o)(a||lt.call(o,ae))&&!(O&&(ae=="length"||b&&(ae=="offset"||ae=="parent")||T&&(ae=="buffer"||ae=="byteLength"||ae=="byteOffset")||Ir(ae,R)))&&k.push(ae);return k}function sx(o){var a=o.length;return a?o[nf(0,a-1)]:n}function QF(o,a){return Il(an(o),zo(a,0,o.length))}function eD(o){return Il(an(o))}function Gd(o,a,c){(c!==n&&!Zn(o[a],c)||c===n&&!(a in o))&&Fr(o,a,c)}function pa(o,a,c){var p=o[a];(!(lt.call(o,a)&&Zn(p,c))||c===n&&!(a in o))&&Fr(o,a,c)}function bl(o,a){for(var c=o.length;c--;)if(Zn(o[c][0],a))return c;return-1}function tD(o,a,c,p){return fo(o,function(b,T,O){a(p,b,c(b),O)}),p}function lx(o,a){return o&&vr(a,Mt(a),o)}function nD(o,a){return o&&vr(a,ln(a),o)}function Fr(o,a,c){a=="__proto__"&&hl?hl(o,a,{configurable:!0,enumerable:!0,value:c,writable:!0}):o[a]=c}function qd(o,a){for(var c=-1,p=a.length,b=q(p),T=o==null;++c<p;)b[c]=T?n:Pf(o,a[c]);return b}function zo(o,a,c){return o===o&&(c!==n&&(o=o<=c?o:c),a!==n&&(o=o>=a?o:a)),o}function In(o,a,c,p,b,T){var O,k=a&y,R=a&x,ae=a&m;if(c&&(O=b?c(o,p,b,T):c(o)),O!==n)return O;if(!xt(o))return o;var se=je(o);if(se){if(O=WD(o),!k)return an(o,O)}else{var le=Gt(o),_e=le==fe||le==Xe;if(mo(o))return Dx(o,k);if(le==mt||le==Se||_e&&!b){if(O=R||_e?{}:Jx(o),!k)return R?kD(o,nD(O,o)):DD(o,lx(O,o))}else{if(!ft[le])return b?o:{};O=HD(o,le,k)}}T||(T=new Jn);var Oe=T.get(o);if(Oe)return Oe;T.set(o,O),Tw(o)?o.forEach(function(Ie){O.add(In(Ie,a,c,Ie,o,T))}):Cw(o)&&o.forEach(function(Ie,Je){O.set(Je,In(Ie,a,c,Je,o,T))});var ke=ae?R?gf:pf:R?ln:Mt,Ke=se?n:ke(o);return Fn(Ke||o,function(Ie,Je){Ke&&(Je=Ie,Ie=o[Je]),pa(O,Je,In(Ie,a,c,Je,o,T))}),O}function rD(o){var a=Mt(o);return function(c){return cx(c,o,a)}}function cx(o,a,c){var p=c.length;if(o==null)return!p;for(o=dt(o);p--;){var b=c[p],T=a[b],O=o[b];if(O===n&&!(b in o)||!T(O))return!1}return!0}function ux(o,a,c){if(typeof o!="function")throw new Dn(l);return wa(function(){o.apply(n,c)},a)}function ga(o,a,c,p){var b=-1,T=ol,O=!0,k=o.length,R=[],ae=a.length;if(!k)return R;c&&(a=vt(a,vn(c))),p?(T=kd,O=!1):a.length>=i&&(T=sa,O=!1,a=new Vo(a));e:for(;++b<k;){var se=o[b],le=c==null?se:c(se);if(se=p||se!==0?se:0,O&&le===le){for(var _e=ae;_e--;)if(a[_e]===le)continue e;R.push(se)}else T(a,le,p)||R.push(se)}return R}var fo=$x(mr),dx=$x(Yd,!0);function oD(o,a){var c=!0;return fo(o,function(p,b,T){return c=!!a(p,b,T),c}),c}function _l(o,a,c){for(var p=-1,b=o.length;++p<b;){var T=o[p],O=a(T);if(O!=null&&(k===n?O===O&&!xn(O):c(O,k)))var k=O,R=T}return R}function iD(o,a,c,p){var b=o.length;for(c=qe(c),c<0&&(c=-c>b?0:b+c),p=p===n||p>b?b:qe(p),p<0&&(p+=b),p=c>p?0:Pw(p);c<p;)o[c++]=a;return o}function fx(o,a){var c=[];return fo(o,function(p,b,T){a(p,b,T)&&c.push(p)}),c}function zt(o,a,c,p,b){var T=-1,O=o.length;for(c||(c=qD),b||(b=[]);++T<O;){var k=o[T];a>0&&c(k)?a>1?zt(k,a-1,c,p,b):lo(b,k):p||(b[b.length]=k)}return b}var Kd=Rx(),px=Rx(!0);function mr(o,a){return o&&Kd(o,a,Mt)}function Yd(o,a){return o&&px(o,a,Mt)}function Sl(o,a){return so(a,function(c){return Lr(o[c])})}function Bo(o,a){a=go(a,o);for(var c=0,p=a.length;o!=null&&c<p;)o=o[yr(a[c++])];return c&&c==p?o:n}function gx(o,a,c){var p=a(o);return je(o)?p:lo(p,c(o))}function Jt(o){return o==null?o===n?ne:Yt:$o&&$o in dt(o)?BD(o):ek(o)}function Xd(o,a){return o>a}function aD(o,a){return o!=null&<.call(o,a)}function sD(o,a){return o!=null&&a in dt(o)}function lD(o,a,c){return o>=Ht(a,c)&&o<Lt(a,c)}function Jd(o,a,c){for(var p=c?kd:ol,b=o[0].length,T=o.length,O=T,k=q(T),R=1/0,ae=[];O--;){var se=o[O];O&&a&&(se=vt(se,vn(a))),R=Ht(se.length,R),k[O]=!c&&(a||b>=120&&se.length>=120)?new Vo(O&&se):n}se=o[0];var le=-1,_e=k[0];e:for(;++le<b&&ae.length<R;){var Oe=se[le],ke=a?a(Oe):Oe;if(Oe=c||Oe!==0?Oe:0,!(_e?sa(_e,ke):p(ae,ke,c))){for(O=T;--O;){var Ke=k[O];if(!(Ke?sa(Ke,ke):p(o[O],ke,c)))continue e}_e&&_e.push(ke),ae.push(Oe)}}return ae}function cD(o,a,c,p){return mr(o,function(b,T,O){a(p,c(b),T,O)}),p}function ha(o,a,c){a=go(a,o),o=tw(o,a);var p=o==null?o:o[yr(Mn(a))];return p==null?n:mn(p,o,c)}function hx(o){return _t(o)&&Jt(o)==Se}function uD(o){return _t(o)&&Jt(o)==ze}function dD(o){return _t(o)&&Jt(o)==Ne}function ma(o,a,c,p,b){return o===a?!0:o==null||a==null||!_t(o)&&!_t(a)?o!==o&&a!==a:fD(o,a,c,p,ma,b)}function fD(o,a,c,p,b,T){var O=je(o),k=je(a),R=O?we:Gt(o),ae=k?we:Gt(a);R=R==Se?mt:R,ae=ae==Se?mt:ae;var se=R==mt,le=ae==mt,_e=R==ae;if(_e&&mo(o)){if(!mo(a))return!1;O=!0,se=!1}if(_e&&!se)return T||(T=new Jn),O||Ni(o)?Kx(o,a,c,p,b,T):VD(o,a,R,c,p,b,T);if(!(c&w)){var Oe=se&<.call(o,"__wrapped__"),ke=le&<.call(a,"__wrapped__");if(Oe||ke){var Ke=Oe?o.value():o,Ie=ke?a.value():a;return T||(T=new Jn),b(Ke,Ie,c,p,T)}}return _e?(T||(T=new Jn),zD(o,a,c,p,b,T)):!1}function pD(o){return _t(o)&&Gt(o)==at}function Zd(o,a,c,p){var b=c.length,T=b,O=!p;if(o==null)return!T;for(o=dt(o);b--;){var k=c[b];if(O&&k[2]?k[1]!==o[k[0]]:!(k[0]in o))return!1}for(;++b<T;){k=c[b];var R=k[0],ae=o[R],se=k[1];if(O&&k[2]){if(ae===n&&!(R in o))return!1}else{var le=new Jn;if(p)var _e=p(ae,se,R,o,a,le);if(!(_e===n?ma(se,ae,w|_,p,le):_e))return!1}}return!0}function mx(o){if(!xt(o)||YD(o))return!1;var a=Lr(o)?pF:_d;return a.test(jo(o))}function gD(o){return _t(o)&&Jt(o)==X}function hD(o){return _t(o)&&Gt(o)==ge}function mD(o){return _t(o)&&zl(o.length)&&!!ht[Jt(o)]}function vx(o){return typeof o=="function"?o:o==null?cn:typeof o=="object"?je(o)?wx(o[0],o[1]):xx(o):Vw(o)}function Qd(o){if(!xa(o))return xF(o);var a=[];for(var c in dt(o))lt.call(o,c)&&c!="constructor"&&a.push(c);return a}function vD(o){if(!xt(o))return QD(o);var a=xa(o),c=[];for(var p in o)p=="constructor"&&(a||!lt.call(o,p))||c.push(p);return c}function ef(o,a){return o<a}function yx(o,a){var c=-1,p=sn(o)?q(o.length):[];return fo(o,function(b,T,O){p[++c]=a(b,T,O)}),p}function xx(o){var a=mf(o);return a.length==1&&a[0][2]?Qx(a[0][0],a[0][1]):function(c){return c===o||Zd(c,o,a)}}function wx(o,a){return yf(o)&&Zx(a)?Qx(yr(o),a):function(c){var p=Pf(c,o);return p===n&&p===a?Of(c,o):ma(a,p,w|_)}}function Cl(o,a,c,p,b){o!==a&&Kd(a,function(T,O){if(b||(b=new Jn),xt(T))yD(o,a,O,c,Cl,p,b);else{var k=p?p(wf(o,O),T,O+"",o,a,b):n;k===n&&(k=T),Gd(o,O,k)}},ln)}function yD(o,a,c,p,b,T,O){var k=wf(o,c),R=wf(a,c),ae=O.get(R);if(ae){Gd(o,c,ae);return}var se=T?T(k,R,c+"",o,a,O):n,le=se===n;if(le){var _e=je(R),Oe=!_e&&mo(R),ke=!_e&&!Oe&&Ni(R);se=R,_e||Oe||ke?je(k)?se=k:At(k)?se=an(k):Oe?(le=!1,se=Dx(R,!0)):ke?(le=!1,se=kx(R,!0)):se=[]:ba(R)||Wo(R)?(se=k,Wo(k)?se=Ow(k):(!xt(k)||Lr(k))&&(se=Jx(R))):le=!1}le&&(O.set(R,se),b(se,R,p,T,O),O.delete(R)),Gd(o,c,se)}function bx(o,a){var c=o.length;if(c)return a+=a<0?c:0,Ir(a,c)?o[a]:n}function _x(o,a,c){a.length?a=vt(a,function(T){return je(T)?function(O){return Bo(O,T.length===1?T[0]:T)}:T}):a=[cn];var p=-1;a=vt(a,vn(De()));var b=yx(o,function(T,O,k){var R=vt(a,function(ae){return ae(T)});return{criteria:R,index:++p,value:T}});return HN(b,function(T,O){return FD(T,O,c)})}function xD(o,a){return Sx(o,a,function(c,p){return Of(o,p)})}function Sx(o,a,c){for(var p=-1,b=a.length,T={};++p<b;){var O=a[p],k=Bo(o,O);c(k,O)&&va(T,go(O,o),k)}return T}function wD(o){return function(a){return Bo(a,o)}}function tf(o,a,c,p){var b=p?WN:xi,T=-1,O=a.length,k=o;for(o===a&&(a=an(a)),c&&(k=vt(o,vn(c)));++T<O;)for(var R=0,ae=a[T],se=c?c(ae):ae;(R=b(k,se,R,p))>-1;)k!==o&&gl.call(k,R,1),gl.call(o,R,1);return o}function Cx(o,a){for(var c=o?a.length:0,p=c-1;c--;){var b=a[c];if(c==p||b!==T){var T=b;Ir(b)?gl.call(o,b,1):af(o,b)}}return o}function nf(o,a){return o+vl(ox()*(a-o+1))}function bD(o,a,c,p){for(var b=-1,T=Lt(ml((a-o)/(c||1)),0),O=q(T);T--;)O[p?T:++b]=o,o+=c;return O}function rf(o,a){var c="";if(!o||a<1||a>Y)return c;do a%2&&(c+=o),a=vl(a/2),a&&(o+=o);while(a);return c}function Ye(o,a){return bf(ew(o,a,cn),o+"")}function _D(o){return sx(Fi(o))}function SD(o,a){var c=Fi(o);return Il(c,zo(a,0,c.length))}function va(o,a,c,p){if(!xt(o))return o;a=go(a,o);for(var b=-1,T=a.length,O=T-1,k=o;k!=null&&++b<T;){var R=yr(a[b]),ae=c;if(R==="__proto__"||R==="constructor"||R==="prototype")return o;if(b!=O){var se=k[R];ae=p?p(se,R,k):n,ae===n&&(ae=xt(se)?se:Ir(a[b+1])?[]:{})}pa(k,R,ae),k=k[R]}return o}var Ex=yl?function(o,a){return yl.set(o,a),o}:cn,CD=hl?function(o,a){return hl(o,"toString",{configurable:!0,enumerable:!1,value:Ff(a),writable:!0})}:cn;function ED(o){return Il(Fi(o))}function Ln(o,a,c){var p=-1,b=o.length;a<0&&(a=-a>b?0:b+a),c=c>b?b:c,c<0&&(c+=b),b=a>c?0:c-a>>>0,a>>>=0;for(var T=q(b);++p<b;)T[p]=o[p+a];return T}function TD(o,a){var c;return fo(o,function(p,b,T){return c=a(p,b,T),!c}),!!c}function El(o,a,c){var p=0,b=o==null?p:o.length;if(typeof a=="number"&&a===a&&b<=xe){for(;p<b;){var T=p+b>>>1,O=o[T];O!==null&&!xn(O)&&(c?O<=a:O<a)?p=T+1:b=T}return b}return of(o,a,cn,c)}function of(o,a,c,p){var b=0,T=o==null?0:o.length;if(T===0)return 0;a=c(a);for(var O=a!==a,k=a===null,R=xn(a),ae=a===n;b<T;){var se=vl((b+T)/2),le=c(o[se]),_e=le!==n,Oe=le===null,ke=le===le,Ke=xn(le);if(O)var Ie=p||ke;else ae?Ie=ke&&(p||_e):k?Ie=ke&&_e&&(p||!Oe):R?Ie=ke&&_e&&!Oe&&(p||!Ke):Oe||Ke?Ie=!1:Ie=p?le<=a:le<a;Ie?b=se+1:T=se}return Ht(T,ve)}function Tx(o,a){for(var c=-1,p=o.length,b=0,T=[];++c<p;){var O=o[c],k=a?a(O):O;if(!c||!Zn(k,R)){var R=k;T[b++]=O===0?0:O}}return T}function Ax(o){return typeof o=="number"?o:xn(o)?M:+o}function yn(o){if(typeof o=="string")return o;if(je(o))return vt(o,yn)+"";if(xn(o))return ix?ix.call(o):"";var a=o+"";return a=="0"&&1/o==-te?"-0":a}function po(o,a,c){var p=-1,b=ol,T=o.length,O=!0,k=[],R=k;if(c)O=!1,b=kd;else if(T>=i){var ae=a?null:$D(o);if(ae)return al(ae);O=!1,b=sa,R=new Vo}else R=a?[]:k;e:for(;++p<T;){var se=o[p],le=a?a(se):se;if(se=c||se!==0?se:0,O&&le===le){for(var _e=R.length;_e--;)if(R[_e]===le)continue e;a&&R.push(le),k.push(se)}else b(R,le,c)||(R!==k&&R.push(le),k.push(se))}return k}function af(o,a){return a=go(a,o),o=tw(o,a),o==null||delete o[yr(Mn(a))]}function Px(o,a,c,p){return va(o,a,c(Bo(o,a)),p)}function Tl(o,a,c,p){for(var b=o.length,T=p?b:-1;(p?T--:++T<b)&&a(o[T],T,o););return c?Ln(o,p?0:T,p?T+1:b):Ln(o,p?T+1:0,p?b:T)}function Ox(o,a){var c=o;return c instanceof Qe&&(c=c.value()),Id(a,function(p,b){return b.func.apply(b.thisArg,lo([p],b.args))},c)}function sf(o,a,c){var p=o.length;if(p<2)return p?po(o[0]):[];for(var b=-1,T=q(p);++b<p;)for(var O=o[b],k=-1;++k<p;)k!=b&&(T[b]=ga(T[b]||O,o[k],a,c));return po(zt(T,1),a,c)}function Nx(o,a,c){for(var p=-1,b=o.length,T=a.length,O={};++p<b;){var k=p<T?a[p]:n;c(O,o[p],k)}return O}function lf(o){return At(o)?o:[]}function cf(o){return typeof o=="function"?o:cn}function go(o,a){return je(o)?o:yf(o,a)?[o]:iw(st(o))}var AD=Ye;function ho(o,a,c){var p=o.length;return c=c===n?p:c,!a&&c>=p?o:Ln(o,a,c)}var Fx=gF||function(o){return Vt.clearTimeout(o)};function Dx(o,a){if(a)return o.slice();var c=o.length,p=Qy?Qy(c):new o.constructor(c);return o.copy(p),p}function uf(o){var a=new o.constructor(o.byteLength);return new fl(a).set(new fl(o)),a}function PD(o,a){var c=a?uf(o.buffer):o.buffer;return new o.constructor(c,o.byteOffset,o.byteLength)}function OD(o){var a=new o.constructor(o.source,ro.exec(o));return a.lastIndex=o.lastIndex,a}function ND(o){return fa?dt(fa.call(o)):{}}function kx(o,a){var c=a?uf(o.buffer):o.buffer;return new o.constructor(c,o.byteOffset,o.length)}function Ix(o,a){if(o!==a){var c=o!==n,p=o===null,b=o===o,T=xn(o),O=a!==n,k=a===null,R=a===a,ae=xn(a);if(!k&&!ae&&!T&&o>a||T&&O&&R&&!k&&!ae||p&&O&&R||!c&&R||!b)return 1;if(!p&&!T&&!ae&&o<a||ae&&c&&b&&!p&&!T||k&&c&&b||!O&&b||!R)return-1}return 0}function FD(o,a,c){for(var p=-1,b=o.criteria,T=a.criteria,O=b.length,k=c.length;++p<O;){var R=Ix(b[p],T[p]);if(R){if(p>=k)return R;var ae=c[p];return R*(ae=="desc"?-1:1)}}return o.index-a.index}function Lx(o,a,c,p){for(var b=-1,T=o.length,O=c.length,k=-1,R=a.length,ae=Lt(T-O,0),se=q(R+ae),le=!p;++k<R;)se[k]=a[k];for(;++b<O;)(le||b<T)&&(se[c[b]]=o[b]);for(;ae--;)se[k++]=o[b++];return se}function Mx(o,a,c,p){for(var b=-1,T=o.length,O=-1,k=c.length,R=-1,ae=a.length,se=Lt(T-k,0),le=q(se+ae),_e=!p;++b<se;)le[b]=o[b];for(var Oe=b;++R<ae;)le[Oe+R]=a[R];for(;++O<k;)(_e||b<T)&&(le[Oe+c[O]]=o[b++]);return le}function an(o,a){var c=-1,p=o.length;for(a||(a=q(p));++c<p;)a[c]=o[c];return a}function vr(o,a,c,p){var b=!c;c||(c={});for(var T=-1,O=a.length;++T<O;){var k=a[T],R=p?p(c[k],o[k],k,c,o):n;R===n&&(R=o[k]),b?Fr(c,k,R):pa(c,k,R)}return c}function DD(o,a){return vr(o,vf(o),a)}function kD(o,a){return vr(o,Yx(o),a)}function Al(o,a){return function(c,p){var b=je(c)?RN:tD,T=a?a():{};return b(c,o,De(p,2),T)}}function Ai(o){return Ye(function(a,c){var p=-1,b=c.length,T=b>1?c[b-1]:n,O=b>2?c[2]:n;for(T=o.length>3&&typeof T=="function"?(b--,T):n,O&&Zt(c[0],c[1],O)&&(T=b<3?n:T,b=1),a=dt(a);++p<b;){var k=c[p];k&&o(a,k,p,T)}return a})}function $x(o,a){return function(c,p){if(c==null)return c;if(!sn(c))return o(c,p);for(var b=c.length,T=a?b:-1,O=dt(c);(a?T--:++T<b)&&p(O[T],T,O)!==!1;);return c}}function Rx(o){return function(a,c,p){for(var b=-1,T=dt(a),O=p(a),k=O.length;k--;){var R=O[o?k:++b];if(c(T[R],R,T)===!1)break}return a}}function ID(o,a,c){var p=a&S,b=ya(o);function T(){var O=this&&this!==Vt&&this instanceof T?b:o;return O.apply(p?c:this,arguments)}return T}function Vx(o){return function(a){a=st(a);var c=wi(a)?Xn(a):n,p=c?c[0]:a.charAt(0),b=c?ho(c,1).join(""):a.slice(1);return p[o]()+b}}function Pi(o){return function(a){return Id($w(Mw(a).replace(Pr,"")),o,"")}}function ya(o){return function(){var a=arguments;switch(a.length){case 0:return new o;case 1:return new o(a[0]);case 2:return new o(a[0],a[1]);case 3:return new o(a[0],a[1],a[2]);case 4:return new o(a[0],a[1],a[2],a[3]);case 5:return new o(a[0],a[1],a[2],a[3],a[4]);case 6:return new o(a[0],a[1],a[2],a[3],a[4],a[5]);case 7:return new o(a[0],a[1],a[2],a[3],a[4],a[5],a[6])}var c=Ti(o.prototype),p=o.apply(c,a);return xt(p)?p:c}}function LD(o,a,c){var p=ya(o);function b(){for(var T=arguments.length,O=q(T),k=T,R=Oi(b);k--;)O[k]=arguments[k];var ae=T<3&&O[0]!==R&&O[T-1]!==R?[]:co(O,R);if(T-=ae.length,T<c)return Wx(o,a,Pl,b.placeholder,n,O,ae,n,n,c-T);var se=this&&this!==Vt&&this instanceof b?p:o;return mn(se,this,O)}return b}function zx(o){return function(a,c,p){var b=dt(a);if(!sn(a)){var T=De(c,3);a=Mt(a),c=function(k){return T(b[k],k,b)}}var O=o(a,c,p);return O>-1?b[T?a[O]:O]:n}}function Bx(o){return kr(function(a){var c=a.length,p=c,b=kn.prototype.thru;for(o&&a.reverse();p--;){var T=a[p];if(typeof T!="function")throw new Dn(l);if(b&&!O&&Dl(T)=="wrapper")var O=new kn([],!0)}for(p=O?p:c;++p<c;){T=a[p];var k=Dl(T),R=k=="wrapper"?hf(T):n;R&&xf(R[0])&&R[1]==(W|N|E|B)&&!R[4].length&&R[9]==1?O=O[Dl(R[0])].apply(O,R[3]):O=T.length==1&&xf(T)?O[k]():O.thru(T)}return function(){var ae=arguments,se=ae[0];if(O&&ae.length==1&&je(se))return O.plant(se).value();for(var le=0,_e=c?a[le].apply(this,ae):se;++le<c;)_e=a[le].call(this,_e);return _e}})}function Pl(o,a,c,p,b,T,O,k,R,ae){var se=a&W,le=a&S,_e=a&A,Oe=a&(N|D),ke=a&ee,Ke=_e?n:ya(o);function Ie(){for(var Je=arguments.length,et=q(Je),wn=Je;wn--;)et[wn]=arguments[wn];if(Oe)var Qt=Oi(Ie),bn=qN(et,Qt);if(p&&(et=Lx(et,p,b,Oe)),T&&(et=Mx(et,T,O,Oe)),Je-=bn,Oe&&Je<ae){var Pt=co(et,Qt);return Wx(o,a,Pl,Ie.placeholder,c,et,Pt,k,R,ae-Je)}var Qn=le?c:this,$r=_e?Qn[o]:o;return Je=et.length,k?et=tk(et,k):ke&&Je>1&&et.reverse(),se&&R<Je&&(et.length=R),this&&this!==Vt&&this instanceof Ie&&($r=Ke||ya($r)),$r.apply(Qn,et)}return Ie}function Ux(o,a){return function(c,p){return cD(c,o,a(p),{})}}function Ol(o,a){return function(c,p){var b;if(c===n&&p===n)return a;if(c!==n&&(b=c),p!==n){if(b===n)return p;typeof c=="string"||typeof p=="string"?(c=yn(c),p=yn(p)):(c=Ax(c),p=Ax(p)),b=o(c,p)}return b}}function df(o){return kr(function(a){return a=vt(a,vn(De())),Ye(function(c){var p=this;return o(a,function(b){return mn(b,p,c)})})})}function Nl(o,a){a=a===n?" ":yn(a);var c=a.length;if(c<2)return c?rf(a,o):a;var p=rf(a,ml(o/bi(a)));return wi(a)?ho(Xn(p),0,o).join(""):p.slice(0,o)}function MD(o,a,c,p){var b=a&S,T=ya(o);function O(){for(var k=-1,R=arguments.length,ae=-1,se=p.length,le=q(se+R),_e=this&&this!==Vt&&this instanceof O?T:o;++ae<se;)le[ae]=p[ae];for(;R--;)le[ae++]=arguments[++k];return mn(_e,b?c:this,le)}return O}function jx(o){return function(a,c,p){return p&&typeof p!="number"&&Zt(a,c,p)&&(c=p=n),a=Mr(a),c===n?(c=a,a=0):c=Mr(c),p=p===n?a<c?1:-1:Mr(p),bD(a,c,p,o)}}function Fl(o){return function(a,c){return typeof a=="string"&&typeof c=="string"||(a=$n(a),c=$n(c)),o(a,c)}}function Wx(o,a,c,p,b,T,O,k,R,ae){var se=a&N,le=se?O:n,_e=se?n:O,Oe=se?T:n,ke=se?n:T;a|=se?E:V,a&=~(se?V:E),a&P||(a&=~(S|A));var Ke=[o,a,b,Oe,le,ke,_e,k,R,ae],Ie=c.apply(n,Ke);return xf(o)&&nw(Ie,Ke),Ie.placeholder=p,rw(Ie,o,a)}function ff(o){var a=It[o];return function(c,p){if(c=$n(c),p=p==null?0:Ht(qe(p),292),p&&rx(c)){var b=(st(c)+"e").split("e"),T=a(b[0]+"e"+(+b[1]+p));return b=(st(T)+"e").split("e"),+(b[0]+"e"+(+b[1]-p))}return a(c)}}var $D=Ci&&1/al(new Ci([,-0]))[1]==te?function(o){return new Ci(o)}:If;function Hx(o){return function(a){var c=Gt(a);return c==at?Bd(a):c==ge?eF(a):GN(a,o(a))}}function Dr(o,a,c,p,b,T,O,k){var R=a&A;if(!R&&typeof o!="function")throw new Dn(l);var ae=p?p.length:0;if(ae||(a&=~(E|V),p=b=n),O=O===n?O:Lt(qe(O),0),k=k===n?k:qe(k),ae-=b?b.length:0,a&V){var se=p,le=b;p=b=n}var _e=R?n:hf(o),Oe=[o,a,c,p,b,se,le,T,O,k];if(_e&&ZD(Oe,_e),o=Oe[0],a=Oe[1],c=Oe[2],p=Oe[3],b=Oe[4],k=Oe[9]=Oe[9]===n?R?0:o.length:Lt(Oe[9]-ae,0),!k&&a&(N|D)&&(a&=~(N|D)),!a||a==S)var ke=ID(o,a,c);else a==N||a==D?ke=LD(o,a,k):(a==E||a==(S|E))&&!b.length?ke=MD(o,a,c,p):ke=Pl.apply(n,Oe);var Ke=_e?Ex:nw;return rw(Ke(ke,Oe),o,a)}function Gx(o,a,c,p){return o===n||Zn(o,Si[c])&&!lt.call(p,c)?a:o}function qx(o,a,c,p,b,T){return xt(o)&&xt(a)&&(T.set(a,o),Cl(o,a,n,qx,T),T.delete(a)),o}function RD(o){return ba(o)?n:o}function Kx(o,a,c,p,b,T){var O=c&w,k=o.length,R=a.length;if(k!=R&&!(O&&R>k))return!1;var ae=T.get(o),se=T.get(a);if(ae&&se)return ae==a&&se==o;var le=-1,_e=!0,Oe=c&_?new Vo:n;for(T.set(o,a),T.set(a,o);++le<k;){var ke=o[le],Ke=a[le];if(p)var Ie=O?p(Ke,ke,le,a,o,T):p(ke,Ke,le,o,a,T);if(Ie!==n){if(Ie)continue;_e=!1;break}if(Oe){if(!Ld(a,function(Je,et){if(!sa(Oe,et)&&(ke===Je||b(ke,Je,c,p,T)))return Oe.push(et)})){_e=!1;break}}else if(!(ke===Ke||b(ke,Ke,c,p,T))){_e=!1;break}}return T.delete(o),T.delete(a),_e}function VD(o,a,c,p,b,T,O){switch(c){case nt:if(o.byteLength!=a.byteLength||o.byteOffset!=a.byteOffset)return!1;o=o.buffer,a=a.buffer;case ze:return!(o.byteLength!=a.byteLength||!T(new fl(o),new fl(a)));case Pe:case Ne:case $t:return Zn(+o,+a);case He:return o.name==a.name&&o.message==a.message;case X:case pe:return o==a+"";case at:var k=Bd;case ge:var R=p&w;if(k||(k=al),o.size!=a.size&&!R)return!1;var ae=O.get(o);if(ae)return ae==a;p|=_,O.set(o,a);var se=Kx(k(o),k(a),p,b,T,O);return O.delete(o),se;case ue:if(fa)return fa.call(o)==fa.call(a)}return!1}function zD(o,a,c,p,b,T){var O=c&w,k=pf(o),R=k.length,ae=pf(a),se=ae.length;if(R!=se&&!O)return!1;for(var le=R;le--;){var _e=k[le];if(!(O?_e in a:lt.call(a,_e)))return!1}var Oe=T.get(o),ke=T.get(a);if(Oe&&ke)return Oe==a&&ke==o;var Ke=!0;T.set(o,a),T.set(a,o);for(var Ie=O;++le<R;){_e=k[le];var Je=o[_e],et=a[_e];if(p)var wn=O?p(et,Je,_e,a,o,T):p(Je,et,_e,o,a,T);if(!(wn===n?Je===et||b(Je,et,c,p,T):wn)){Ke=!1;break}Ie||(Ie=_e=="constructor")}if(Ke&&!Ie){var Qt=o.constructor,bn=a.constructor;Qt!=bn&&"constructor"in o&&"constructor"in a&&!(typeof Qt=="function"&&Qt instanceof Qt&&typeof bn=="function"&&bn instanceof bn)&&(Ke=!1)}return T.delete(o),T.delete(a),Ke}function kr(o){return bf(ew(o,n,cw),o+"")}function pf(o){return gx(o,Mt,vf)}function gf(o){return gx(o,ln,Yx)}var hf=yl?function(o){return yl.get(o)}:If;function Dl(o){for(var a=o.name+"",c=Ei[a],p=lt.call(Ei,a)?c.length:0;p--;){var b=c[p],T=b.func;if(T==null||T==o)return b.name}return a}function Oi(o){var a=lt.call(C,"placeholder")?C:o;return a.placeholder}function De(){var o=C.iteratee||Df;return o=o===Df?vx:o,arguments.length?o(arguments[0],arguments[1]):o}function kl(o,a){var c=o.__data__;return KD(a)?c[typeof a=="string"?"string":"hash"]:c.map}function mf(o){for(var a=Mt(o),c=a.length;c--;){var p=a[c],b=o[p];a[c]=[p,b,Zx(b)]}return a}function Uo(o,a){var c=JN(o,a);return mx(c)?c:n}function BD(o){var a=lt.call(o,$o),c=o[$o];try{o[$o]=n;var p=!0}catch{}var b=ul.call(o);return p&&(a?o[$o]=c:delete o[$o]),b}var vf=jd?function(o){return o==null?[]:(o=dt(o),so(jd(o),function(a){return tx.call(o,a)}))}:Lf,Yx=jd?function(o){for(var a=[];o;)lo(a,vf(o)),o=pl(o);return a}:Lf,Gt=Jt;(Wd&&Gt(new Wd(new ArrayBuffer(1)))!=nt||ca&&Gt(new ca)!=at||Hd&&Gt(Hd.resolve())!=F||Ci&&Gt(new Ci)!=ge||ua&&Gt(new ua)!=de)&&(Gt=function(o){var a=Jt(o),c=a==mt?o.constructor:n,p=c?jo(c):"";if(p)switch(p){case SF:return nt;case CF:return at;case EF:return F;case TF:return ge;case AF:return de}return a});function UD(o,a,c){for(var p=-1,b=c.length;++p<b;){var T=c[p],O=T.size;switch(T.type){case"drop":o+=O;break;case"dropRight":a-=O;break;case"take":a=Ht(a,o+O);break;case"takeRight":o=Lt(o,a-O);break}}return{start:o,end:a}}function jD(o){var a=o.match(yd);return a?a[1].split(ky):[]}function Xx(o,a,c){a=go(a,o);for(var p=-1,b=a.length,T=!1;++p<b;){var O=yr(a[p]);if(!(T=o!=null&&c(o,O)))break;o=o[O]}return T||++p!=b?T:(b=o==null?0:o.length,!!b&&zl(b)&&Ir(O,b)&&(je(o)||Wo(o)))}function WD(o){var a=o.length,c=new o.constructor(a);return a&&typeof o[0]=="string"&<.call(o,"index")&&(c.index=o.index,c.input=o.input),c}function Jx(o){return typeof o.constructor=="function"&&!xa(o)?Ti(pl(o)):{}}function HD(o,a,c){var p=o.constructor;switch(a){case ze:return uf(o);case Pe:case Ne:return new p(+o);case nt:return PD(o,c);case Rt:case Xt:case Ct:case En:case Tn:case bt:case on:case hr:case qn:return kx(o,c);case at:return new p;case $t:case pe:return new p(o);case X:return OD(o);case ge:return new p;case ue:return ND(o)}}function GD(o,a){var c=a.length;if(!c)return o;var p=c-1;return a[p]=(c>1?"& ":"")+a[p],a=a.join(c>2?", ":" "),o.replace(Dy,`{
|
|
35
|
+
/* [wrapped with `+a+`] */
|
|
36
|
+
`)}function qD(o){return je(o)||Wo(o)||!!(nx&&o&&o[nx])}function Ir(o,a){var c=typeof o;return a=a??Y,!!a&&(c=="number"||c!="symbol"&&Cd.test(o))&&o>-1&&o%1==0&&o<a}function Zt(o,a,c){if(!xt(c))return!1;var p=typeof a;return(p=="number"?sn(c)&&Ir(a,c.length):p=="string"&&a in c)?Zn(c[a],o):!1}function yf(o,a){if(je(o))return!1;var c=typeof o;return c=="number"||c=="symbol"||c=="boolean"||o==null||xn(o)?!0:Gs.test(o)||!Hs.test(o)||a!=null&&o in dt(a)}function KD(o){var a=typeof o;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?o!=="__proto__":o===null}function xf(o){var a=Dl(o),c=C[a];if(typeof c!="function"||!(a in Qe.prototype))return!1;if(o===c)return!0;var p=hf(c);return!!p&&o===p[0]}function YD(o){return!!Zy&&Zy in o}var XD=ll?Lr:Mf;function xa(o){var a=o&&o.constructor,c=typeof a=="function"&&a.prototype||Si;return o===c}function Zx(o){return o===o&&!xt(o)}function Qx(o,a){return function(c){return c==null?!1:c[o]===a&&(a!==n||o in dt(c))}}function JD(o){var a=Rl(o,function(p){return c.size===f&&c.clear(),p}),c=a.cache;return a}function ZD(o,a){var c=o[1],p=a[1],b=c|p,T=b<(S|A|W),O=p==W&&c==N||p==W&&c==B&&o[7].length<=a[8]||p==(W|B)&&a[7].length<=a[8]&&c==N;if(!(T||O))return o;p&S&&(o[2]=a[2],b|=c&S?0:P);var k=a[3];if(k){var R=o[3];o[3]=R?Lx(R,k,a[4]):k,o[4]=R?co(o[3],h):a[4]}return k=a[5],k&&(R=o[5],o[5]=R?Mx(R,k,a[6]):k,o[6]=R?co(o[5],h):a[6]),k=a[7],k&&(o[7]=k),p&W&&(o[8]=o[8]==null?a[8]:Ht(o[8],a[8])),o[9]==null&&(o[9]=a[9]),o[0]=a[0],o[1]=b,o}function QD(o){var a=[];if(o!=null)for(var c in dt(o))a.push(c);return a}function ek(o){return ul.call(o)}function ew(o,a,c){return a=Lt(a===n?o.length-1:a,0),function(){for(var p=arguments,b=-1,T=Lt(p.length-a,0),O=q(T);++b<T;)O[b]=p[a+b];b=-1;for(var k=q(a+1);++b<a;)k[b]=p[b];return k[a]=c(O),mn(o,this,k)}}function tw(o,a){return a.length<2?o:Bo(o,Ln(a,0,-1))}function tk(o,a){for(var c=o.length,p=Ht(a.length,c),b=an(o);p--;){var T=a[p];o[p]=Ir(T,c)?b[T]:n}return o}function wf(o,a){if(!(a==="constructor"&&typeof o[a]=="function")&&a!="__proto__")return o[a]}var nw=ow(Ex),wa=mF||function(o,a){return Vt.setTimeout(o,a)},bf=ow(CD);function rw(o,a,c){var p=a+"";return bf(o,GD(p,nk(jD(p),c)))}function ow(o){var a=0,c=0;return function(){var p=wF(),b=he-(p-c);if(c=p,b>0){if(++a>=ie)return arguments[0]}else a=0;return o.apply(n,arguments)}}function Il(o,a){var c=-1,p=o.length,b=p-1;for(a=a===n?p:a;++c<a;){var T=nf(c,b),O=o[T];o[T]=o[c],o[c]=O}return o.length=a,o}var iw=JD(function(o){var a=[];return o.charCodeAt(0)===46&&a.push(""),o.replace(vd,function(c,p,b,T){a.push(b?T.replace(no,"$1"):p||c)}),a});function yr(o){if(typeof o=="string"||xn(o))return o;var a=o+"";return a=="0"&&1/o==-te?"-0":a}function jo(o){if(o!=null){try{return cl.call(o)}catch{}try{return o+""}catch{}}return""}function nk(o,a){return Fn(ye,function(c){var p="_."+c[0];a&c[1]&&!ol(o,p)&&o.push(p)}),o.sort()}function aw(o){if(o instanceof Qe)return o.clone();var a=new kn(o.__wrapped__,o.__chain__);return a.__actions__=an(o.__actions__),a.__index__=o.__index__,a.__values__=o.__values__,a}function rk(o,a,c){(c?Zt(o,a,c):a===n)?a=1:a=Lt(qe(a),0);var p=o==null?0:o.length;if(!p||a<1)return[];for(var b=0,T=0,O=q(ml(p/a));b<p;)O[T++]=Ln(o,b,b+=a);return O}function ok(o){for(var a=-1,c=o==null?0:o.length,p=0,b=[];++a<c;){var T=o[a];T&&(b[p++]=T)}return b}function ik(){var o=arguments.length;if(!o)return[];for(var a=q(o-1),c=arguments[0],p=o;p--;)a[p-1]=arguments[p];return lo(je(c)?an(c):[c],zt(a,1))}var ak=Ye(function(o,a){return At(o)?ga(o,zt(a,1,At,!0)):[]}),sk=Ye(function(o,a){var c=Mn(a);return At(c)&&(c=n),At(o)?ga(o,zt(a,1,At,!0),De(c,2)):[]}),lk=Ye(function(o,a){var c=Mn(a);return At(c)&&(c=n),At(o)?ga(o,zt(a,1,At,!0),n,c):[]});function ck(o,a,c){var p=o==null?0:o.length;return p?(a=c||a===n?1:qe(a),Ln(o,a<0?0:a,p)):[]}function uk(o,a,c){var p=o==null?0:o.length;return p?(a=c||a===n?1:qe(a),a=p-a,Ln(o,0,a<0?0:a)):[]}function dk(o,a){return o&&o.length?Tl(o,De(a,3),!0,!0):[]}function fk(o,a){return o&&o.length?Tl(o,De(a,3),!0):[]}function pk(o,a,c,p){var b=o==null?0:o.length;return b?(c&&typeof c!="number"&&Zt(o,a,c)&&(c=0,p=b),iD(o,a,c,p)):[]}function sw(o,a,c){var p=o==null?0:o.length;if(!p)return-1;var b=c==null?0:qe(c);return b<0&&(b=Lt(p+b,0)),il(o,De(a,3),b)}function lw(o,a,c){var p=o==null?0:o.length;if(!p)return-1;var b=p-1;return c!==n&&(b=qe(c),b=c<0?Lt(p+b,0):Ht(b,p-1)),il(o,De(a,3),b,!0)}function cw(o){var a=o==null?0:o.length;return a?zt(o,1):[]}function gk(o){var a=o==null?0:o.length;return a?zt(o,te):[]}function hk(o,a){var c=o==null?0:o.length;return c?(a=a===n?1:qe(a),zt(o,a)):[]}function mk(o){for(var a=-1,c=o==null?0:o.length,p={};++a<c;){var b=o[a];p[b[0]]=b[1]}return p}function uw(o){return o&&o.length?o[0]:n}function vk(o,a,c){var p=o==null?0:o.length;if(!p)return-1;var b=c==null?0:qe(c);return b<0&&(b=Lt(p+b,0)),xi(o,a,b)}function yk(o){var a=o==null?0:o.length;return a?Ln(o,0,-1):[]}var xk=Ye(function(o){var a=vt(o,lf);return a.length&&a[0]===o[0]?Jd(a):[]}),wk=Ye(function(o){var a=Mn(o),c=vt(o,lf);return a===Mn(c)?a=n:c.pop(),c.length&&c[0]===o[0]?Jd(c,De(a,2)):[]}),bk=Ye(function(o){var a=Mn(o),c=vt(o,lf);return a=typeof a=="function"?a:n,a&&c.pop(),c.length&&c[0]===o[0]?Jd(c,n,a):[]});function _k(o,a){return o==null?"":yF.call(o,a)}function Mn(o){var a=o==null?0:o.length;return a?o[a-1]:n}function Sk(o,a,c){var p=o==null?0:o.length;if(!p)return-1;var b=p;return c!==n&&(b=qe(c),b=b<0?Lt(p+b,0):Ht(b,p-1)),a===a?nF(o,a,b):il(o,Wy,b,!0)}function Ck(o,a){return o&&o.length?bx(o,qe(a)):n}var Ek=Ye(dw);function dw(o,a){return o&&o.length&&a&&a.length?tf(o,a):o}function Tk(o,a,c){return o&&o.length&&a&&a.length?tf(o,a,De(c,2)):o}function Ak(o,a,c){return o&&o.length&&a&&a.length?tf(o,a,n,c):o}var Pk=kr(function(o,a){var c=o==null?0:o.length,p=qd(o,a);return Cx(o,vt(a,function(b){return Ir(b,c)?+b:b}).sort(Ix)),p});function Ok(o,a){var c=[];if(!(o&&o.length))return c;var p=-1,b=[],T=o.length;for(a=De(a,3);++p<T;){var O=o[p];a(O,p,o)&&(c.push(O),b.push(p))}return Cx(o,b),c}function _f(o){return o==null?o:_F.call(o)}function Nk(o,a,c){var p=o==null?0:o.length;return p?(c&&typeof c!="number"&&Zt(o,a,c)?(a=0,c=p):(a=a==null?0:qe(a),c=c===n?p:qe(c)),Ln(o,a,c)):[]}function Fk(o,a){return El(o,a)}function Dk(o,a,c){return of(o,a,De(c,2))}function kk(o,a){var c=o==null?0:o.length;if(c){var p=El(o,a);if(p<c&&Zn(o[p],a))return p}return-1}function Ik(o,a){return El(o,a,!0)}function Lk(o,a,c){return of(o,a,De(c,2),!0)}function Mk(o,a){var c=o==null?0:o.length;if(c){var p=El(o,a,!0)-1;if(Zn(o[p],a))return p}return-1}function $k(o){return o&&o.length?Tx(o):[]}function Rk(o,a){return o&&o.length?Tx(o,De(a,2)):[]}function Vk(o){var a=o==null?0:o.length;return a?Ln(o,1,a):[]}function zk(o,a,c){return o&&o.length?(a=c||a===n?1:qe(a),Ln(o,0,a<0?0:a)):[]}function Bk(o,a,c){var p=o==null?0:o.length;return p?(a=c||a===n?1:qe(a),a=p-a,Ln(o,a<0?0:a,p)):[]}function Uk(o,a){return o&&o.length?Tl(o,De(a,3),!1,!0):[]}function jk(o,a){return o&&o.length?Tl(o,De(a,3)):[]}var Wk=Ye(function(o){return po(zt(o,1,At,!0))}),Hk=Ye(function(o){var a=Mn(o);return At(a)&&(a=n),po(zt(o,1,At,!0),De(a,2))}),Gk=Ye(function(o){var a=Mn(o);return a=typeof a=="function"?a:n,po(zt(o,1,At,!0),n,a)});function qk(o){return o&&o.length?po(o):[]}function Kk(o,a){return o&&o.length?po(o,De(a,2)):[]}function Yk(o,a){return a=typeof a=="function"?a:n,o&&o.length?po(o,n,a):[]}function Sf(o){if(!(o&&o.length))return[];var a=0;return o=so(o,function(c){if(At(c))return a=Lt(c.length,a),!0}),Vd(a,function(c){return vt(o,Md(c))})}function fw(o,a){if(!(o&&o.length))return[];var c=Sf(o);return a==null?c:vt(c,function(p){return mn(a,n,p)})}var Xk=Ye(function(o,a){return At(o)?ga(o,a):[]}),Jk=Ye(function(o){return sf(so(o,At))}),Zk=Ye(function(o){var a=Mn(o);return At(a)&&(a=n),sf(so(o,At),De(a,2))}),Qk=Ye(function(o){var a=Mn(o);return a=typeof a=="function"?a:n,sf(so(o,At),n,a)}),eI=Ye(Sf);function tI(o,a){return Nx(o||[],a||[],pa)}function nI(o,a){return Nx(o||[],a||[],va)}var rI=Ye(function(o){var a=o.length,c=a>1?o[a-1]:n;return c=typeof c=="function"?(o.pop(),c):n,fw(o,c)});function pw(o){var a=C(o);return a.__chain__=!0,a}function oI(o,a){return a(o),o}function Ll(o,a){return a(o)}var iI=kr(function(o){var a=o.length,c=a?o[0]:0,p=this.__wrapped__,b=function(T){return qd(T,o)};return a>1||this.__actions__.length||!(p instanceof Qe)||!Ir(c)?this.thru(b):(p=p.slice(c,+c+(a?1:0)),p.__actions__.push({func:Ll,args:[b],thisArg:n}),new kn(p,this.__chain__).thru(function(T){return a&&!T.length&&T.push(n),T}))});function aI(){return pw(this)}function sI(){return new kn(this.value(),this.__chain__)}function lI(){this.__values__===n&&(this.__values__=Aw(this.value()));var o=this.__index__>=this.__values__.length,a=o?n:this.__values__[this.__index__++];return{done:o,value:a}}function cI(){return this}function uI(o){for(var a,c=this;c instanceof wl;){var p=aw(c);p.__index__=0,p.__values__=n,a?b.__wrapped__=p:a=p;var b=p;c=c.__wrapped__}return b.__wrapped__=o,a}function dI(){var o=this.__wrapped__;if(o instanceof Qe){var a=o;return this.__actions__.length&&(a=new Qe(this)),a=a.reverse(),a.__actions__.push({func:Ll,args:[_f],thisArg:n}),new kn(a,this.__chain__)}return this.thru(_f)}function fI(){return Ox(this.__wrapped__,this.__actions__)}var pI=Al(function(o,a,c){lt.call(o,c)?++o[c]:Fr(o,c,1)});function gI(o,a,c){var p=je(o)?Uy:oD;return c&&Zt(o,a,c)&&(a=n),p(o,De(a,3))}function hI(o,a){var c=je(o)?so:fx;return c(o,De(a,3))}var mI=zx(sw),vI=zx(lw);function yI(o,a){return zt(Ml(o,a),1)}function xI(o,a){return zt(Ml(o,a),te)}function wI(o,a,c){return c=c===n?1:qe(c),zt(Ml(o,a),c)}function gw(o,a){var c=je(o)?Fn:fo;return c(o,De(a,3))}function hw(o,a){var c=je(o)?VN:dx;return c(o,De(a,3))}var bI=Al(function(o,a,c){lt.call(o,c)?o[c].push(a):Fr(o,c,[a])});function _I(o,a,c,p){o=sn(o)?o:Fi(o),c=c&&!p?qe(c):0;var b=o.length;return c<0&&(c=Lt(b+c,0)),Bl(o)?c<=b&&o.indexOf(a,c)>-1:!!b&&xi(o,a,c)>-1}var SI=Ye(function(o,a,c){var p=-1,b=typeof a=="function",T=sn(o)?q(o.length):[];return fo(o,function(O){T[++p]=b?mn(a,O,c):ha(O,a,c)}),T}),CI=Al(function(o,a,c){Fr(o,c,a)});function Ml(o,a){var c=je(o)?vt:yx;return c(o,De(a,3))}function EI(o,a,c,p){return o==null?[]:(je(a)||(a=a==null?[]:[a]),c=p?n:c,je(c)||(c=c==null?[]:[c]),_x(o,a,c))}var TI=Al(function(o,a,c){o[c?0:1].push(a)},function(){return[[],[]]});function AI(o,a,c){var p=je(o)?Id:Gy,b=arguments.length<3;return p(o,De(a,4),c,b,fo)}function PI(o,a,c){var p=je(o)?zN:Gy,b=arguments.length<3;return p(o,De(a,4),c,b,dx)}function OI(o,a){var c=je(o)?so:fx;return c(o,Vl(De(a,3)))}function NI(o){var a=je(o)?sx:_D;return a(o)}function FI(o,a,c){(c?Zt(o,a,c):a===n)?a=1:a=qe(a);var p=je(o)?QF:SD;return p(o,a)}function DI(o){var a=je(o)?eD:ED;return a(o)}function kI(o){if(o==null)return 0;if(sn(o))return Bl(o)?bi(o):o.length;var a=Gt(o);return a==at||a==ge?o.size:Qd(o).length}function II(o,a,c){var p=je(o)?Ld:TD;return c&&Zt(o,a,c)&&(a=n),p(o,De(a,3))}var LI=Ye(function(o,a){if(o==null)return[];var c=a.length;return c>1&&Zt(o,a[0],a[1])?a=[]:c>2&&Zt(a[0],a[1],a[2])&&(a=[a[0]]),_x(o,zt(a,1),[])}),$l=hF||function(){return Vt.Date.now()};function MI(o,a){if(typeof a!="function")throw new Dn(l);return o=qe(o),function(){if(--o<1)return a.apply(this,arguments)}}function mw(o,a,c){return a=c?n:a,a=o&&a==null?o.length:a,Dr(o,W,n,n,n,n,a)}function vw(o,a){var c;if(typeof a!="function")throw new Dn(l);return o=qe(o),function(){return--o>0&&(c=a.apply(this,arguments)),o<=1&&(a=n),c}}var Cf=Ye(function(o,a,c){var p=S;if(c.length){var b=co(c,Oi(Cf));p|=E}return Dr(o,p,a,c,b)}),yw=Ye(function(o,a,c){var p=S|A;if(c.length){var b=co(c,Oi(yw));p|=E}return Dr(a,p,o,c,b)});function xw(o,a,c){a=c?n:a;var p=Dr(o,N,n,n,n,n,n,a);return p.placeholder=xw.placeholder,p}function ww(o,a,c){a=c?n:a;var p=Dr(o,D,n,n,n,n,n,a);return p.placeholder=ww.placeholder,p}function bw(o,a,c){var p,b,T,O,k,R,ae=0,se=!1,le=!1,_e=!0;if(typeof o!="function")throw new Dn(l);a=$n(a)||0,xt(c)&&(se=!!c.leading,le="maxWait"in c,T=le?Lt($n(c.maxWait)||0,a):T,_e="trailing"in c?!!c.trailing:_e);function Oe(Pt){var Qn=p,$r=b;return p=b=n,ae=Pt,O=o.apply($r,Qn),O}function ke(Pt){return ae=Pt,k=wa(Je,a),se?Oe(Pt):O}function Ke(Pt){var Qn=Pt-R,$r=Pt-ae,zw=a-Qn;return le?Ht(zw,T-$r):zw}function Ie(Pt){var Qn=Pt-R,$r=Pt-ae;return R===n||Qn>=a||Qn<0||le&&$r>=T}function Je(){var Pt=$l();if(Ie(Pt))return et(Pt);k=wa(Je,Ke(Pt))}function et(Pt){return k=n,_e&&p?Oe(Pt):(p=b=n,O)}function wn(){k!==n&&Fx(k),ae=0,p=R=b=k=n}function Qt(){return k===n?O:et($l())}function bn(){var Pt=$l(),Qn=Ie(Pt);if(p=arguments,b=this,R=Pt,Qn){if(k===n)return ke(R);if(le)return Fx(k),k=wa(Je,a),Oe(R)}return k===n&&(k=wa(Je,a)),O}return bn.cancel=wn,bn.flush=Qt,bn}var $I=Ye(function(o,a){return ux(o,1,a)}),RI=Ye(function(o,a,c){return ux(o,$n(a)||0,c)});function VI(o){return Dr(o,ee)}function Rl(o,a){if(typeof o!="function"||a!=null&&typeof a!="function")throw new Dn(l);var c=function(){var p=arguments,b=a?a.apply(this,p):p[0],T=c.cache;if(T.has(b))return T.get(b);var O=o.apply(this,p);return c.cache=T.set(b,O)||T,O};return c.cache=new(Rl.Cache||Nr),c}Rl.Cache=Nr;function Vl(o){if(typeof o!="function")throw new Dn(l);return function(){var a=arguments;switch(a.length){case 0:return!o.call(this);case 1:return!o.call(this,a[0]);case 2:return!o.call(this,a[0],a[1]);case 3:return!o.call(this,a[0],a[1],a[2])}return!o.apply(this,a)}}function zI(o){return vw(2,o)}var BI=AD(function(o,a){a=a.length==1&&je(a[0])?vt(a[0],vn(De())):vt(zt(a,1),vn(De()));var c=a.length;return Ye(function(p){for(var b=-1,T=Ht(p.length,c);++b<T;)p[b]=a[b].call(this,p[b]);return mn(o,this,p)})}),Ef=Ye(function(o,a){var c=co(a,Oi(Ef));return Dr(o,E,n,a,c)}),_w=Ye(function(o,a){var c=co(a,Oi(_w));return Dr(o,V,n,a,c)}),UI=kr(function(o,a){return Dr(o,B,n,n,n,a)});function jI(o,a){if(typeof o!="function")throw new Dn(l);return a=a===n?a:qe(a),Ye(o,a)}function WI(o,a){if(typeof o!="function")throw new Dn(l);return a=a==null?0:Lt(qe(a),0),Ye(function(c){var p=c[a],b=ho(c,0,a);return p&&lo(b,p),mn(o,this,b)})}function HI(o,a,c){var p=!0,b=!0;if(typeof o!="function")throw new Dn(l);return xt(c)&&(p="leading"in c?!!c.leading:p,b="trailing"in c?!!c.trailing:b),bw(o,a,{leading:p,maxWait:a,trailing:b})}function GI(o){return mw(o,1)}function qI(o,a){return Ef(cf(a),o)}function KI(){if(!arguments.length)return[];var o=arguments[0];return je(o)?o:[o]}function YI(o){return In(o,m)}function XI(o,a){return a=typeof a=="function"?a:n,In(o,m,a)}function JI(o){return In(o,y|m)}function ZI(o,a){return a=typeof a=="function"?a:n,In(o,y|m,a)}function QI(o,a){return a==null||cx(o,a,Mt(a))}function Zn(o,a){return o===a||o!==o&&a!==a}var e2=Fl(Xd),t2=Fl(function(o,a){return o>=a}),Wo=hx(function(){return arguments}())?hx:function(o){return _t(o)&<.call(o,"callee")&&!tx.call(o,"callee")},je=q.isArray,n2=My?vn(My):uD;function sn(o){return o!=null&&zl(o.length)&&!Lr(o)}function At(o){return _t(o)&&sn(o)}function r2(o){return o===!0||o===!1||_t(o)&&Jt(o)==Pe}var mo=vF||Mf,o2=$y?vn($y):dD;function i2(o){return _t(o)&&o.nodeType===1&&!ba(o)}function a2(o){if(o==null)return!0;if(sn(o)&&(je(o)||typeof o=="string"||typeof o.splice=="function"||mo(o)||Ni(o)||Wo(o)))return!o.length;var a=Gt(o);if(a==at||a==ge)return!o.size;if(xa(o))return!Qd(o).length;for(var c in o)if(lt.call(o,c))return!1;return!0}function s2(o,a){return ma(o,a)}function l2(o,a,c){c=typeof c=="function"?c:n;var p=c?c(o,a):n;return p===n?ma(o,a,n,c):!!p}function Tf(o){if(!_t(o))return!1;var a=Jt(o);return a==He||a==Te||typeof o.message=="string"&&typeof o.name=="string"&&!ba(o)}function c2(o){return typeof o=="number"&&rx(o)}function Lr(o){if(!xt(o))return!1;var a=Jt(o);return a==fe||a==Xe||a==Ee||a==z}function Sw(o){return typeof o=="number"&&o==qe(o)}function zl(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=Y}function xt(o){var a=typeof o;return o!=null&&(a=="object"||a=="function")}function _t(o){return o!=null&&typeof o=="object"}var Cw=Ry?vn(Ry):pD;function u2(o,a){return o===a||Zd(o,a,mf(a))}function d2(o,a,c){return c=typeof c=="function"?c:n,Zd(o,a,mf(a),c)}function f2(o){return Ew(o)&&o!=+o}function p2(o){if(XD(o))throw new Be(s);return mx(o)}function g2(o){return o===null}function h2(o){return o==null}function Ew(o){return typeof o=="number"||_t(o)&&Jt(o)==$t}function ba(o){if(!_t(o)||Jt(o)!=mt)return!1;var a=pl(o);if(a===null)return!0;var c=lt.call(a,"constructor")&&a.constructor;return typeof c=="function"&&c instanceof c&&cl.call(c)==dF}var Af=Vy?vn(Vy):gD;function m2(o){return Sw(o)&&o>=-Y&&o<=Y}var Tw=zy?vn(zy):hD;function Bl(o){return typeof o=="string"||!je(o)&&_t(o)&&Jt(o)==pe}function xn(o){return typeof o=="symbol"||_t(o)&&Jt(o)==ue}var Ni=By?vn(By):mD;function v2(o){return o===n}function y2(o){return _t(o)&&Gt(o)==de}function x2(o){return _t(o)&&Jt(o)==Re}var w2=Fl(ef),b2=Fl(function(o,a){return o<=a});function Aw(o){if(!o)return[];if(sn(o))return Bl(o)?Xn(o):an(o);if(la&&o[la])return QN(o[la]());var a=Gt(o),c=a==at?Bd:a==ge?al:Fi;return c(o)}function Mr(o){if(!o)return o===0?o:0;if(o=$n(o),o===te||o===-te){var a=o<0?-1:1;return a*J}return o===o?o:0}function qe(o){var a=Mr(o),c=a%1;return a===a?c?a-c:a:0}function Pw(o){return o?zo(qe(o),0,Q):0}function $n(o){if(typeof o=="number")return o;if(xn(o))return M;if(xt(o)){var a=typeof o.valueOf=="function"?o.valueOf():o;o=xt(a)?a+"":a}if(typeof o!="string")return o===0?o:+o;o=qy(o);var c=bd.test(o);return c||Sd.test(o)?MN(o.slice(2),c?2:8):Wt.test(o)?M:+o}function Ow(o){return vr(o,ln(o))}function _2(o){return o?zo(qe(o),-Y,Y):o===0?o:0}function st(o){return o==null?"":yn(o)}var S2=Ai(function(o,a){if(xa(a)||sn(a)){vr(a,Mt(a),o);return}for(var c in a)lt.call(a,c)&&pa(o,c,a[c])}),Nw=Ai(function(o,a){vr(a,ln(a),o)}),Ul=Ai(function(o,a,c,p){vr(a,ln(a),o,p)}),C2=Ai(function(o,a,c,p){vr(a,Mt(a),o,p)}),E2=kr(qd);function T2(o,a){var c=Ti(o);return a==null?c:lx(c,a)}var A2=Ye(function(o,a){o=dt(o);var c=-1,p=a.length,b=p>2?a[2]:n;for(b&&Zt(a[0],a[1],b)&&(p=1);++c<p;)for(var T=a[c],O=ln(T),k=-1,R=O.length;++k<R;){var ae=O[k],se=o[ae];(se===n||Zn(se,Si[ae])&&!lt.call(o,ae))&&(o[ae]=T[ae])}return o}),P2=Ye(function(o){return o.push(n,qx),mn(Fw,n,o)});function O2(o,a){return jy(o,De(a,3),mr)}function N2(o,a){return jy(o,De(a,3),Yd)}function F2(o,a){return o==null?o:Kd(o,De(a,3),ln)}function D2(o,a){return o==null?o:px(o,De(a,3),ln)}function k2(o,a){return o&&mr(o,De(a,3))}function I2(o,a){return o&&Yd(o,De(a,3))}function L2(o){return o==null?[]:Sl(o,Mt(o))}function M2(o){return o==null?[]:Sl(o,ln(o))}function Pf(o,a,c){var p=o==null?n:Bo(o,a);return p===n?c:p}function $2(o,a){return o!=null&&Xx(o,a,aD)}function Of(o,a){return o!=null&&Xx(o,a,sD)}var R2=Ux(function(o,a,c){a!=null&&typeof a.toString!="function"&&(a=ul.call(a)),o[a]=c},Ff(cn)),V2=Ux(function(o,a,c){a!=null&&typeof a.toString!="function"&&(a=ul.call(a)),lt.call(o,a)?o[a].push(c):o[a]=[c]},De),z2=Ye(ha);function Mt(o){return sn(o)?ax(o):Qd(o)}function ln(o){return sn(o)?ax(o,!0):vD(o)}function B2(o,a){var c={};return a=De(a,3),mr(o,function(p,b,T){Fr(c,a(p,b,T),p)}),c}function U2(o,a){var c={};return a=De(a,3),mr(o,function(p,b,T){Fr(c,b,a(p,b,T))}),c}var j2=Ai(function(o,a,c){Cl(o,a,c)}),Fw=Ai(function(o,a,c,p){Cl(o,a,c,p)}),W2=kr(function(o,a){var c={};if(o==null)return c;var p=!1;a=vt(a,function(T){return T=go(T,o),p||(p=T.length>1),T}),vr(o,gf(o),c),p&&(c=In(c,y|x|m,RD));for(var b=a.length;b--;)af(c,a[b]);return c});function H2(o,a){return Dw(o,Vl(De(a)))}var G2=kr(function(o,a){return o==null?{}:xD(o,a)});function Dw(o,a){if(o==null)return{};var c=vt(gf(o),function(p){return[p]});return a=De(a),Sx(o,c,function(p,b){return a(p,b[0])})}function q2(o,a,c){a=go(a,o);var p=-1,b=a.length;for(b||(b=1,o=n);++p<b;){var T=o==null?n:o[yr(a[p])];T===n&&(p=b,T=c),o=Lr(T)?T.call(o):T}return o}function K2(o,a,c){return o==null?o:va(o,a,c)}function Y2(o,a,c,p){return p=typeof p=="function"?p:n,o==null?o:va(o,a,c,p)}var kw=Hx(Mt),Iw=Hx(ln);function X2(o,a,c){var p=je(o),b=p||mo(o)||Ni(o);if(a=De(a,4),c==null){var T=o&&o.constructor;b?c=p?new T:[]:xt(o)?c=Lr(T)?Ti(pl(o)):{}:c={}}return(b?Fn:mr)(o,function(O,k,R){return a(c,O,k,R)}),c}function J2(o,a){return o==null?!0:af(o,a)}function Z2(o,a,c){return o==null?o:Px(o,a,cf(c))}function Q2(o,a,c,p){return p=typeof p=="function"?p:n,o==null?o:Px(o,a,cf(c),p)}function Fi(o){return o==null?[]:zd(o,Mt(o))}function eL(o){return o==null?[]:zd(o,ln(o))}function tL(o,a,c){return c===n&&(c=a,a=n),c!==n&&(c=$n(c),c=c===c?c:0),a!==n&&(a=$n(a),a=a===a?a:0),zo($n(o),a,c)}function nL(o,a,c){return a=Mr(a),c===n?(c=a,a=0):c=Mr(c),o=$n(o),lD(o,a,c)}function rL(o,a,c){if(c&&typeof c!="boolean"&&Zt(o,a,c)&&(a=c=n),c===n&&(typeof a=="boolean"?(c=a,a=n):typeof o=="boolean"&&(c=o,o=n)),o===n&&a===n?(o=0,a=1):(o=Mr(o),a===n?(a=o,o=0):a=Mr(a)),o>a){var p=o;o=a,a=p}if(c||o%1||a%1){var b=ox();return Ht(o+b*(a-o+LN("1e-"+((b+"").length-1))),a)}return nf(o,a)}var oL=Pi(function(o,a,c){return a=a.toLowerCase(),o+(c?Lw(a):a)});function Lw(o){return Nf(st(o).toLowerCase())}function Mw(o){return o=st(o),o&&o.replace(qs,KN).replace(Tt,"")}function iL(o,a,c){o=st(o),a=yn(a);var p=o.length;c=c===n?p:zo(qe(c),0,p);var b=c;return c-=a.length,c>=0&&o.slice(c,b)==a}function aL(o){return o=st(o),o&&gi.test(o)?o.replace(eo,YN):o}function sL(o){return o=st(o),o&&jt.test(o)?o.replace(to,"\\$&"):o}var lL=Pi(function(o,a,c){return o+(c?"-":"")+a.toLowerCase()}),cL=Pi(function(o,a,c){return o+(c?" ":"")+a.toLowerCase()}),uL=Vx("toLowerCase");function dL(o,a,c){o=st(o),a=qe(a);var p=a?bi(o):0;if(!a||p>=a)return o;var b=(a-p)/2;return Nl(vl(b),c)+o+Nl(ml(b),c)}function fL(o,a,c){o=st(o),a=qe(a);var p=a?bi(o):0;return a&&p<a?o+Nl(a-p,c):o}function pL(o,a,c){o=st(o),a=qe(a);var p=a?bi(o):0;return a&&p<a?Nl(a-p,c)+o:o}function gL(o,a,c){return c||a==null?a=0:a&&(a=+a),bF(st(o).replace(Oo,""),a||0)}function hL(o,a,c){return(c?Zt(o,a,c):a===n)?a=1:a=qe(a),rf(st(o),a)}function mL(){var o=arguments,a=st(o[0]);return o.length<3?a:a.replace(o[1],o[2])}var vL=Pi(function(o,a,c){return o+(c?"_":"")+a.toLowerCase()});function yL(o,a,c){return c&&typeof c!="number"&&Zt(o,a,c)&&(a=c=n),c=c===n?Q:c>>>0,c?(o=st(o),o&&(typeof a=="string"||a!=null&&!Af(a))&&(a=yn(a),!a&&wi(o))?ho(Xn(o),0,c):o.split(a,c)):[]}var xL=Pi(function(o,a,c){return o+(c?" ":"")+Nf(a)});function wL(o,a,c){return o=st(o),c=c==null?0:zo(qe(c),0,o.length),a=yn(a),o.slice(c,c+a.length)==a}function bL(o,a,c){var p=C.templateSettings;c&&Zt(o,a,c)&&(a=n),o=st(o),a=Ul({},a,p,Gx);var b=Ul({},a.imports,p.imports,Gx),T=Mt(b),O=zd(b,T),k,R,ae=0,se=a.interpolate||hn,le="__p += '",_e=Ud((a.escape||hn).source+"|"+se.source+"|"+(se===hi?wd:hn).source+"|"+(a.evaluate||hn).source+"|$","g"),Oe="//# sourceURL="+(lt.call(a,"sourceURL")?(a.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++NN+"]")+`
|
|
37
|
+
`;o.replace(_e,function(Ie,Je,et,wn,Qt,bn){return et||(et=wn),le+=o.slice(ae,bn).replace(No,XN),Je&&(k=!0,le+=`' +
|
|
38
|
+
__e(`+Je+`) +
|
|
39
|
+
'`),Qt&&(R=!0,le+=`';
|
|
40
|
+
`+Qt+`;
|
|
41
|
+
__p += '`),et&&(le+=`' +
|
|
42
|
+
((__t = (`+et+`)) == null ? '' : __t) +
|
|
43
|
+
'`),ae=bn+Ie.length,Ie}),le+=`';
|
|
44
|
+
`;var ke=lt.call(a,"variable")&&a.variable;if(!ke)le=`with (obj) {
|
|
45
|
+
`+le+`
|
|
46
|
+
}
|
|
47
|
+
`;else if(An.test(ke))throw new Be(u);le=(R?le.replace(tt,""):le).replace(Qr,"$1").replace(Ws,"$1;"),le="function("+(ke||"obj")+`) {
|
|
48
|
+
`+(ke?"":`obj || (obj = {});
|
|
49
|
+
`)+"var __t, __p = ''"+(k?", __e = _.escape":"")+(R?`, __j = Array.prototype.join;
|
|
50
|
+
function print() { __p += __j.call(arguments, '') }
|
|
51
|
+
`:`;
|
|
52
|
+
`)+le+`return __p
|
|
53
|
+
}`;var Ke=Rw(function(){return rt(T,Oe+"return "+le).apply(n,O)});if(Ke.source=le,Tf(Ke))throw Ke;return Ke}function _L(o){return st(o).toLowerCase()}function SL(o){return st(o).toUpperCase()}function CL(o,a,c){if(o=st(o),o&&(c||a===n))return qy(o);if(!o||!(a=yn(a)))return o;var p=Xn(o),b=Xn(a),T=Ky(p,b),O=Yy(p,b)+1;return ho(p,T,O).join("")}function EL(o,a,c){if(o=st(o),o&&(c||a===n))return o.slice(0,Jy(o)+1);if(!o||!(a=yn(a)))return o;var p=Xn(o),b=Yy(p,Xn(a))+1;return ho(p,0,b).join("")}function TL(o,a,c){if(o=st(o),o&&(c||a===n))return o.replace(Oo,"");if(!o||!(a=yn(a)))return o;var p=Xn(o),b=Ky(p,Xn(a));return ho(p,b).join("")}function AL(o,a){var c=H,p=ce;if(xt(a)){var b="separator"in a?a.separator:b;c="length"in a?qe(a.length):c,p="omission"in a?yn(a.omission):p}o=st(o);var T=o.length;if(wi(o)){var O=Xn(o);T=O.length}if(c>=T)return o;var k=c-bi(p);if(k<1)return p;var R=O?ho(O,0,k).join(""):o.slice(0,k);if(b===n)return R+p;if(O&&(k+=R.length-k),Af(b)){if(o.slice(k).search(b)){var ae,se=R;for(b.global||(b=Ud(b.source,st(ro.exec(b))+"g")),b.lastIndex=0;ae=b.exec(se);)var le=ae.index;R=R.slice(0,le===n?k:le)}}else if(o.indexOf(yn(b),k)!=k){var _e=R.lastIndexOf(b);_e>-1&&(R=R.slice(0,_e))}return R+p}function PL(o){return o=st(o),o&&Ao.test(o)?o.replace(Kn,rF):o}var OL=Pi(function(o,a,c){return o+(c?" ":"")+a.toUpperCase()}),Nf=Vx("toUpperCase");function $w(o,a,c){return o=st(o),a=c?n:a,a===n?ZN(o)?aF(o):jN(o):o.match(a)||[]}var Rw=Ye(function(o,a){try{return mn(o,n,a)}catch(c){return Tf(c)?c:new Be(c)}}),NL=kr(function(o,a){return Fn(a,function(c){c=yr(c),Fr(o,c,Cf(o[c],o))}),o});function FL(o){var a=o==null?0:o.length,c=De();return o=a?vt(o,function(p){if(typeof p[1]!="function")throw new Dn(l);return[c(p[0]),p[1]]}):[],Ye(function(p){for(var b=-1;++b<a;){var T=o[b];if(mn(T[0],this,p))return mn(T[1],this,p)}})}function DL(o){return rD(In(o,y))}function Ff(o){return function(){return o}}function kL(o,a){return o==null||o!==o?a:o}var IL=Bx(),LL=Bx(!0);function cn(o){return o}function Df(o){return vx(typeof o=="function"?o:In(o,y))}function ML(o){return xx(In(o,y))}function $L(o,a){return wx(o,In(a,y))}var RL=Ye(function(o,a){return function(c){return ha(c,o,a)}}),VL=Ye(function(o,a){return function(c){return ha(o,c,a)}});function kf(o,a,c){var p=Mt(a),b=Sl(a,p);c==null&&!(xt(a)&&(b.length||!p.length))&&(c=a,a=o,o=this,b=Sl(a,Mt(a)));var T=!(xt(c)&&"chain"in c)||!!c.chain,O=Lr(o);return Fn(b,function(k){var R=a[k];o[k]=R,O&&(o.prototype[k]=function(){var ae=this.__chain__;if(T||ae){var se=o(this.__wrapped__),le=se.__actions__=an(this.__actions__);return le.push({func:R,args:arguments,thisArg:o}),se.__chain__=ae,se}return R.apply(o,lo([this.value()],arguments))})}),o}function zL(){return Vt._===this&&(Vt._=fF),this}function If(){}function BL(o){return o=qe(o),Ye(function(a){return bx(a,o)})}var UL=df(vt),jL=df(Uy),WL=df(Ld);function Vw(o){return yf(o)?Md(yr(o)):wD(o)}function HL(o){return function(a){return o==null?n:Bo(o,a)}}var GL=jx(),qL=jx(!0);function Lf(){return[]}function Mf(){return!1}function KL(){return{}}function YL(){return""}function XL(){return!0}function JL(o,a){if(o=qe(o),o<1||o>Y)return[];var c=Q,p=Ht(o,Q);a=De(a),o-=Q;for(var b=Vd(p,a);++c<o;)a(c);return b}function ZL(o){return je(o)?vt(o,yr):xn(o)?[o]:an(iw(st(o)))}function QL(o){var a=++uF;return st(o)+a}var eM=Ol(function(o,a){return o+a},0),tM=ff("ceil"),nM=Ol(function(o,a){return o/a},1),rM=ff("floor");function oM(o){return o&&o.length?_l(o,cn,Xd):n}function iM(o,a){return o&&o.length?_l(o,De(a,2),Xd):n}function aM(o){return Hy(o,cn)}function sM(o,a){return Hy(o,De(a,2))}function lM(o){return o&&o.length?_l(o,cn,ef):n}function cM(o,a){return o&&o.length?_l(o,De(a,2),ef):n}var uM=Ol(function(o,a){return o*a},1),dM=ff("round"),fM=Ol(function(o,a){return o-a},0);function pM(o){return o&&o.length?Rd(o,cn):0}function gM(o,a){return o&&o.length?Rd(o,De(a,2)):0}return C.after=MI,C.ary=mw,C.assign=S2,C.assignIn=Nw,C.assignInWith=Ul,C.assignWith=C2,C.at=E2,C.before=vw,C.bind=Cf,C.bindAll=NL,C.bindKey=yw,C.castArray=KI,C.chain=pw,C.chunk=rk,C.compact=ok,C.concat=ik,C.cond=FL,C.conforms=DL,C.constant=Ff,C.countBy=pI,C.create=T2,C.curry=xw,C.curryRight=ww,C.debounce=bw,C.defaults=A2,C.defaultsDeep=P2,C.defer=$I,C.delay=RI,C.difference=ak,C.differenceBy=sk,C.differenceWith=lk,C.drop=ck,C.dropRight=uk,C.dropRightWhile=dk,C.dropWhile=fk,C.fill=pk,C.filter=hI,C.flatMap=yI,C.flatMapDeep=xI,C.flatMapDepth=wI,C.flatten=cw,C.flattenDeep=gk,C.flattenDepth=hk,C.flip=VI,C.flow=IL,C.flowRight=LL,C.fromPairs=mk,C.functions=L2,C.functionsIn=M2,C.groupBy=bI,C.initial=yk,C.intersection=xk,C.intersectionBy=wk,C.intersectionWith=bk,C.invert=R2,C.invertBy=V2,C.invokeMap=SI,C.iteratee=Df,C.keyBy=CI,C.keys=Mt,C.keysIn=ln,C.map=Ml,C.mapKeys=B2,C.mapValues=U2,C.matches=ML,C.matchesProperty=$L,C.memoize=Rl,C.merge=j2,C.mergeWith=Fw,C.method=RL,C.methodOf=VL,C.mixin=kf,C.negate=Vl,C.nthArg=BL,C.omit=W2,C.omitBy=H2,C.once=zI,C.orderBy=EI,C.over=UL,C.overArgs=BI,C.overEvery=jL,C.overSome=WL,C.partial=Ef,C.partialRight=_w,C.partition=TI,C.pick=G2,C.pickBy=Dw,C.property=Vw,C.propertyOf=HL,C.pull=Ek,C.pullAll=dw,C.pullAllBy=Tk,C.pullAllWith=Ak,C.pullAt=Pk,C.range=GL,C.rangeRight=qL,C.rearg=UI,C.reject=OI,C.remove=Ok,C.rest=jI,C.reverse=_f,C.sampleSize=FI,C.set=K2,C.setWith=Y2,C.shuffle=DI,C.slice=Nk,C.sortBy=LI,C.sortedUniq=$k,C.sortedUniqBy=Rk,C.split=yL,C.spread=WI,C.tail=Vk,C.take=zk,C.takeRight=Bk,C.takeRightWhile=Uk,C.takeWhile=jk,C.tap=oI,C.throttle=HI,C.thru=Ll,C.toArray=Aw,C.toPairs=kw,C.toPairsIn=Iw,C.toPath=ZL,C.toPlainObject=Ow,C.transform=X2,C.unary=GI,C.union=Wk,C.unionBy=Hk,C.unionWith=Gk,C.uniq=qk,C.uniqBy=Kk,C.uniqWith=Yk,C.unset=J2,C.unzip=Sf,C.unzipWith=fw,C.update=Z2,C.updateWith=Q2,C.values=Fi,C.valuesIn=eL,C.without=Xk,C.words=$w,C.wrap=qI,C.xor=Jk,C.xorBy=Zk,C.xorWith=Qk,C.zip=eI,C.zipObject=tI,C.zipObjectDeep=nI,C.zipWith=rI,C.entries=kw,C.entriesIn=Iw,C.extend=Nw,C.extendWith=Ul,kf(C,C),C.add=eM,C.attempt=Rw,C.camelCase=oL,C.capitalize=Lw,C.ceil=tM,C.clamp=tL,C.clone=YI,C.cloneDeep=JI,C.cloneDeepWith=ZI,C.cloneWith=XI,C.conformsTo=QI,C.deburr=Mw,C.defaultTo=kL,C.divide=nM,C.endsWith=iL,C.eq=Zn,C.escape=aL,C.escapeRegExp=sL,C.every=gI,C.find=mI,C.findIndex=sw,C.findKey=O2,C.findLast=vI,C.findLastIndex=lw,C.findLastKey=N2,C.floor=rM,C.forEach=gw,C.forEachRight=hw,C.forIn=F2,C.forInRight=D2,C.forOwn=k2,C.forOwnRight=I2,C.get=Pf,C.gt=e2,C.gte=t2,C.has=$2,C.hasIn=Of,C.head=uw,C.identity=cn,C.includes=_I,C.indexOf=vk,C.inRange=nL,C.invoke=z2,C.isArguments=Wo,C.isArray=je,C.isArrayBuffer=n2,C.isArrayLike=sn,C.isArrayLikeObject=At,C.isBoolean=r2,C.isBuffer=mo,C.isDate=o2,C.isElement=i2,C.isEmpty=a2,C.isEqual=s2,C.isEqualWith=l2,C.isError=Tf,C.isFinite=c2,C.isFunction=Lr,C.isInteger=Sw,C.isLength=zl,C.isMap=Cw,C.isMatch=u2,C.isMatchWith=d2,C.isNaN=f2,C.isNative=p2,C.isNil=h2,C.isNull=g2,C.isNumber=Ew,C.isObject=xt,C.isObjectLike=_t,C.isPlainObject=ba,C.isRegExp=Af,C.isSafeInteger=m2,C.isSet=Tw,C.isString=Bl,C.isSymbol=xn,C.isTypedArray=Ni,C.isUndefined=v2,C.isWeakMap=y2,C.isWeakSet=x2,C.join=_k,C.kebabCase=lL,C.last=Mn,C.lastIndexOf=Sk,C.lowerCase=cL,C.lowerFirst=uL,C.lt=w2,C.lte=b2,C.max=oM,C.maxBy=iM,C.mean=aM,C.meanBy=sM,C.min=lM,C.minBy=cM,C.stubArray=Lf,C.stubFalse=Mf,C.stubObject=KL,C.stubString=YL,C.stubTrue=XL,C.multiply=uM,C.nth=Ck,C.noConflict=zL,C.noop=If,C.now=$l,C.pad=dL,C.padEnd=fL,C.padStart=pL,C.parseInt=gL,C.random=rL,C.reduce=AI,C.reduceRight=PI,C.repeat=hL,C.replace=mL,C.result=q2,C.round=dM,C.runInContext=$,C.sample=NI,C.size=kI,C.snakeCase=vL,C.some=II,C.sortedIndex=Fk,C.sortedIndexBy=Dk,C.sortedIndexOf=kk,C.sortedLastIndex=Ik,C.sortedLastIndexBy=Lk,C.sortedLastIndexOf=Mk,C.startCase=xL,C.startsWith=wL,C.subtract=fM,C.sum=pM,C.sumBy=gM,C.template=bL,C.times=JL,C.toFinite=Mr,C.toInteger=qe,C.toLength=Pw,C.toLower=_L,C.toNumber=$n,C.toSafeInteger=_2,C.toString=st,C.toUpper=SL,C.trim=CL,C.trimEnd=EL,C.trimStart=TL,C.truncate=AL,C.unescape=PL,C.uniqueId=QL,C.upperCase=OL,C.upperFirst=Nf,C.each=gw,C.eachRight=hw,C.first=uw,kf(C,function(){var o={};return mr(C,function(a,c){lt.call(C.prototype,c)||(o[c]=a)}),o}(),{chain:!1}),C.VERSION=r,Fn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(o){C[o].placeholder=C}),Fn(["drop","take"],function(o,a){Qe.prototype[o]=function(c){c=c===n?1:Lt(qe(c),0);var p=this.__filtered__&&!a?new Qe(this):this.clone();return p.__filtered__?p.__takeCount__=Ht(c,p.__takeCount__):p.__views__.push({size:Ht(c,Q),type:o+(p.__dir__<0?"Right":"")}),p},Qe.prototype[o+"Right"]=function(c){return this.reverse()[o](c).reverse()}}),Fn(["filter","map","takeWhile"],function(o,a){var c=a+1,p=c==U||c==G;Qe.prototype[o]=function(b){var T=this.clone();return T.__iteratees__.push({iteratee:De(b,3),type:c}),T.__filtered__=T.__filtered__||p,T}}),Fn(["head","last"],function(o,a){var c="take"+(a?"Right":"");Qe.prototype[o]=function(){return this[c](1).value()[0]}}),Fn(["initial","tail"],function(o,a){var c="drop"+(a?"":"Right");Qe.prototype[o]=function(){return this.__filtered__?new Qe(this):this[c](1)}}),Qe.prototype.compact=function(){return this.filter(cn)},Qe.prototype.find=function(o){return this.filter(o).head()},Qe.prototype.findLast=function(o){return this.reverse().find(o)},Qe.prototype.invokeMap=Ye(function(o,a){return typeof o=="function"?new Qe(this):this.map(function(c){return ha(c,o,a)})}),Qe.prototype.reject=function(o){return this.filter(Vl(De(o)))},Qe.prototype.slice=function(o,a){o=qe(o);var c=this;return c.__filtered__&&(o>0||a<0)?new Qe(c):(o<0?c=c.takeRight(-o):o&&(c=c.drop(o)),a!==n&&(a=qe(a),c=a<0?c.dropRight(-a):c.take(a-o)),c)},Qe.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},Qe.prototype.toArray=function(){return this.take(Q)},mr(Qe.prototype,function(o,a){var c=/^(?:filter|find|map|reject)|While$/.test(a),p=/^(?:head|last)$/.test(a),b=C[p?"take"+(a=="last"?"Right":""):a],T=p||/^find/.test(a);b&&(C.prototype[a]=function(){var O=this.__wrapped__,k=p?[1]:arguments,R=O instanceof Qe,ae=k[0],se=R||je(O),le=function(Je){var et=b.apply(C,lo([Je],k));return p&&_e?et[0]:et};se&&c&&typeof ae=="function"&&ae.length!=1&&(R=se=!1);var _e=this.__chain__,Oe=!!this.__actions__.length,ke=T&&!_e,Ke=R&&!Oe;if(!T&&se){O=Ke?O:new Qe(this);var Ie=o.apply(O,k);return Ie.__actions__.push({func:Ll,args:[le],thisArg:n}),new kn(Ie,_e)}return ke&&Ke?o.apply(this,k):(Ie=this.thru(le),ke?p?Ie.value()[0]:Ie.value():Ie)})}),Fn(["pop","push","shift","sort","splice","unshift"],function(o){var a=sl[o],c=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",p=/^(?:pop|shift)$/.test(o);C.prototype[o]=function(){var b=arguments;if(p&&!this.__chain__){var T=this.value();return a.apply(je(T)?T:[],b)}return this[c](function(O){return a.apply(je(O)?O:[],b)})}}),mr(Qe.prototype,function(o,a){var c=C[a];if(c){var p=c.name+"";lt.call(Ei,p)||(Ei[p]=[]),Ei[p].push({name:a,func:c})}}),Ei[Pl(n,A).name]=[{name:"wrapper",func:n}],Qe.prototype.clone=PF,Qe.prototype.reverse=OF,Qe.prototype.value=NF,C.prototype.at=iI,C.prototype.chain=aI,C.prototype.commit=sI,C.prototype.next=lI,C.prototype.plant=uI,C.prototype.reverse=dI,C.prototype.toJSON=C.prototype.valueOf=C.prototype.value=fI,C.prototype.first=C.prototype.head,la&&(C.prototype[la]=cI),C},_i=sF();Mo?((Mo.exports=_i)._=_i,Fd._=_i):Vt._=_i}).call(tr)}(za,za.exports);var Hp=za.exports;/**
|
|
28
54
|
* @license lucide-react v0.468.0 - ISC
|
|
29
55
|
*
|
|
30
56
|
* This source code is licensed under the ISC license.
|
|
31
57
|
* See the LICENSE file in the root directory of this source tree.
|
|
32
|
-
*/const
|
|
58
|
+
*/const E_=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Gp=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
|
|
33
59
|
* @license lucide-react v0.468.0 - ISC
|
|
34
60
|
*
|
|
35
61
|
* This source code is licensed under the ISC license.
|
|
36
62
|
* See the LICENSE file in the root directory of this source tree.
|
|
37
|
-
*/var
|
|
63
|
+
*/var T_={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
64
|
* @license lucide-react v0.468.0 - ISC
|
|
39
65
|
*
|
|
40
66
|
* This source code is licensed under the ISC license.
|
|
41
67
|
* See the LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/const
|
|
68
|
+
*/const A_=L.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:l,...u},g)=>L.createElement("svg",{ref:g,...T_,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Gp("lucide",i),...u},[...l.map(([f,h])=>L.createElement(f,h)),...Array.isArray(s)?s:[s]]));/**
|
|
43
69
|
* @license lucide-react v0.468.0 - ISC
|
|
44
70
|
*
|
|
45
71
|
* This source code is licensed under the ISC license.
|
|
46
72
|
* See the LICENSE file in the root directory of this source tree.
|
|
47
|
-
*/const
|
|
73
|
+
*/const _n=(e,t)=>{const n=L.forwardRef(({className:r,...i},s)=>L.createElement(A_,{ref:s,iconNode:t,className:Gp(`lucide-${E_(e)}`,r),...i}));return n.displayName=`${e}`,n};/**
|
|
48
74
|
* @license lucide-react v0.468.0 - ISC
|
|
49
75
|
*
|
|
50
76
|
* This source code is licensed under the ISC license.
|
|
51
77
|
* See the LICENSE file in the root directory of this source tree.
|
|
52
|
-
*/const
|
|
78
|
+
*/const Ec=_n("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
79
|
* @license lucide-react v0.468.0 - ISC
|
|
54
80
|
*
|
|
55
81
|
* This source code is licensed under the ISC license.
|
|
56
82
|
* See the LICENSE file in the root directory of this source tree.
|
|
57
|
-
*/const
|
|
83
|
+
*/const P_=_n("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
84
|
* @license lucide-react v0.468.0 - ISC
|
|
59
85
|
*
|
|
60
86
|
* This source code is licensed under the ISC license.
|
|
61
87
|
* See the LICENSE file in the root directory of this source tree.
|
|
62
|
-
*/const
|
|
88
|
+
*/const O_=_n("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
63
89
|
* @license lucide-react v0.468.0 - ISC
|
|
64
90
|
*
|
|
65
91
|
* This source code is licensed under the ISC license.
|
|
66
92
|
* See the LICENSE file in the root directory of this source tree.
|
|
67
|
-
*/const
|
|
93
|
+
*/const N_=_n("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
68
94
|
* @license lucide-react v0.468.0 - ISC
|
|
69
95
|
*
|
|
70
96
|
* This source code is licensed under the ISC license.
|
|
71
97
|
* See the LICENSE file in the root directory of this source tree.
|
|
72
|
-
*/const
|
|
98
|
+
*/const qp=_n("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
73
99
|
* @license lucide-react v0.468.0 - ISC
|
|
74
100
|
*
|
|
75
101
|
* This source code is licensed under the ISC license.
|
|
76
102
|
* See the LICENSE file in the root directory of this source tree.
|
|
77
|
-
*/const
|
|
103
|
+
*/const F_=_n("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
104
|
* @license lucide-react v0.468.0 - ISC
|
|
79
105
|
*
|
|
80
106
|
* This source code is licensed under the ISC license.
|
|
81
107
|
* See the LICENSE file in the root directory of this source tree.
|
|
82
|
-
*/const
|
|
108
|
+
*/const D_=_n("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
109
|
* @license lucide-react v0.468.0 - ISC
|
|
84
110
|
*
|
|
85
111
|
* This source code is licensed under the ISC license.
|
|
86
112
|
* See the LICENSE file in the root directory of this source tree.
|
|
87
|
-
*/const
|
|
113
|
+
*/const Ot=_n("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
88
114
|
* @license lucide-react v0.468.0 - ISC
|
|
89
115
|
*
|
|
90
116
|
* This source code is licensed under the ISC license.
|
|
91
117
|
* See the LICENSE file in the root directory of this source tree.
|
|
92
|
-
*/const
|
|
118
|
+
*/const k_=_n("MoveUpRight",[["path",{d:"M13 5H19V11",key:"1n1gyv"}],["path",{d:"M19 5L5 19",key:"72u4yj"}]]);/**
|
|
93
119
|
* @license lucide-react v0.468.0 - ISC
|
|
94
120
|
*
|
|
95
121
|
* This source code is licensed under the ISC license.
|
|
96
122
|
* See the LICENSE file in the root directory of this source tree.
|
|
97
|
-
*/const
|
|
123
|
+
*/const I_=_n("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
124
|
* @license lucide-react v0.468.0 - ISC
|
|
99
125
|
*
|
|
100
126
|
* This source code is licensed under the ISC license.
|
|
101
127
|
* See the LICENSE file in the root directory of this source tree.
|
|
102
|
-
*/const
|
|
128
|
+
*/const L_=_n("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
129
|
* @license lucide-react v0.468.0 - ISC
|
|
104
130
|
*
|
|
105
131
|
* This source code is licensed under the ISC license.
|
|
106
132
|
* See the LICENSE file in the root directory of this source tree.
|
|
107
|
-
*/const qi=ut("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Xl(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=Xl(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Jl(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Xl(e))&&(r&&(r+=" "),r+=t);return r}function jh(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))}jh(`: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 Gi=e=>typeof e=="number"&&!isNaN(e),dr=e=>typeof e=="string",Zl=e=>typeof e=="function",zh=e=>dr(e)||Gi(e),Bh=e=>_.isValidElement(e)||dr(e)||Zl(e)||Gi(e),Hh=1,Ql=()=>`${Hh++}`,_t=new Map,Ki=[],ec=new Set,tc=()=>_t.size>0,Uh=(e,{containerId:t})=>{var n;return(n=_t.get(t||1))==null?void 0:n.toasts.get(e)};function Wh(e,t){var n;if(t)return!!((n=_t.get(t))!=null&&n.isToastActive(e));let r=!1;return _t.forEach(o=>{o.isToastActive(e)&&(r=!0)}),r}function qh(e){if(!tc()){Ki=Ki.filter(t=>e!=null&&t.options.toastId!==e);return}if(e==null||zh(e))_t.forEach(t=>{t.removeToast(e)});else if(e&&("containerId"in e||"id"in e)){let t=_t.get(e.containerId);t?t.removeToast(e.id):_t.forEach(n=>{n.removeToast(e.id)})}}var Gh=(e={})=>{_t.forEach(t=>{t.props.limit&&(!e.containerId||t.id===e.containerId)&&t.clearQueue()})};function Kh(e,t){Bh(e)&&(tc()||Ki.push({content:e,options:t}),_t.forEach(n=>{n.buildToast(e,t)}))}function nc(e,t){_t.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 Yh(e){return ec.add(e),()=>{ec.delete(e)}}function Xh(e){return e&&(dr(e.toastId)||Gi(e.toastId))?e.toastId:Ql()}function fr(e,t){return Kh(e,t),t.toastId}function no(e,t){return{...t,type:t&&t.type||e,toastId:Xh(t)}}function ro(e){return(t,n)=>fr(t,no(e,n))}function Pe(e,t){return fr(e,no("default",t))}Pe.loading=(e,t)=>fr(e,no("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t}));function Jh(e,{pending:t,error:n,success:r},o){let i;t&&(i=dr(t)?Pe.loading(t,o):Pe.loading(t.render,{...o,...t}));let a={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},s=(c,d,g)=>{if(d==null){Pe.dismiss(i);return}let m={type:c,...a,...o,data:g},p=dr(d)?{render:d}:d;return i?Pe.update(i,{...m,...p}):Pe(p.render,{...m,...p}),g},u=Zl(e)?e():e;return u.then(c=>s("success",r,c)).catch(c=>s("error",n,c)),u}Pe.promise=Jh,Pe.success=ro("success"),Pe.info=ro("info"),Pe.error=ro("error"),Pe.warning=ro("warning"),Pe.warn=Pe.warning,Pe.dark=(e,t)=>fr(e,no("default",{theme:"dark",...t}));function Zh(e){qh(e)}Pe.dismiss=Zh,Pe.clearWaitingQueue=Gh,Pe.isActive=Wh,Pe.update=(e,t={})=>{let n=Uh(e,t);if(n){let{props:r,content:o}=n,i={delay:100,...r,...t,toastId:t.toastId||e,updateId:Ql()};i.toastId!==e&&(i.staleId=e);let a=i.render||o;delete i.render,fr(a,i)}},Pe.done=e=>{Pe.update(e,{progress:1})},Pe.onChange=Yh,Pe.play=e=>nc(!0,e),Pe.pause=e=>nc(!1,e);const Qh={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"},ev=e=>e==="SummaryOfSuggestedAI"||e==="KeywordAISuggestion"||e==="SuggestedAICategories",Yi=e=>e==="fullPath"||e==="createAt"||e==="creator"||e==="creatorId"||e==="DataSource"||e==="AccessLevel"||e==="category"||e==="fileName";function rc(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function tv(...e){return t=>{let n=!1;const r=e.map(o=>{const i=rc(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():rc(e[o],null)}}}}var On=f.forwardRef((e,t)=>{const{children:n,...r}=e,o=f.Children.toArray(n),i=o.find(nv);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(Xi,{...r,ref:t,children:f.isValidElement(a)?f.cloneElement(a,void 0,s):null})}return l.jsx(Xi,{...r,ref:t,children:n})});On.displayName="Slot";var Xi=f.forwardRef((e,t)=>{const{children:n,...r}=e;if(f.isValidElement(n)){const o=ov(n);return f.cloneElement(n,{...rv(r,n.props),ref:t?tv(t,o):o})}return f.Children.count(n)>1?f.Children.only(null):null});Xi.displayName="SlotClone";var oc=({children:e})=>l.jsx(l.Fragment,{children:e});function nv(e){return f.isValidElement(e)&&e.type===oc}function rv(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 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)}const Ji="-",iv=e=>{const t=sv(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(Ji);return s[0]===""&&s.length!==1&&s.shift(),ic(s,t)||av(a)},getConflictingClassGroupIds:(a,s)=>{const u=n[a]||[];return s&&r[a]?[...u,...r[a]]:u}}},ic=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?ic(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(Ji);return(a=t.validators.find(({validator:s})=>s(i)))==null?void 0:a.classGroupId},ac=/^\[(.+)\]$/,av=e=>{if(ac.test(e)){const t=ac.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},sv=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return cv(Object.entries(e.classGroups),n).forEach(([i,a])=>{Zi(a,r,i,t)}),r},Zi=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:sc(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(lv(o)){Zi(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,a])=>{Zi(a,sc(t,i),n,r)})})},sc=(e,t)=>{let n=e;return t.split(Ji).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},lv=e=>e.isThemeGetter,cv=(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,uv=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)}}},lc="!",dv=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),p=m.startsWith(lc),h=p?m.substring(1):m,v=g&&g>d?g-d:void 0;return{modifiers:u,hasImportantModifier:p,baseClassName:h,maybePostfixModifierPosition:v}};return n?s=>n({className:s,parseClassName:a}):a},fv=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},pv=e=>({cache:uv(e.cacheSize),parseClassName:dv(e),...iv(e)}),gv=/\s+/,mv=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=[],a=e.trim().split(gv);let s="";for(let u=a.length-1;u>=0;u-=1){const c=a[u],{modifiers:d,hasImportantModifier:g,baseClassName:m,maybePostfixModifierPosition:p}=n(c);let h=!!p,v=r(h?m.substring(0,p):m);if(!v){if(!h){s=c+(s.length>0?" "+s:s);continue}if(v=r(m),!v){s=c+(s.length>0?" "+s:s);continue}h=!1}const y=fv(d).join(":"),b=g?y+lc:y,w=b+v;if(i.includes(w))continue;i.push(w);const S=o(v,h);for(let E=0;E<S.length;++E){const x=S[E];i.push(b+x)}s=c+(s.length>0?" "+s:s)}return s};function hv(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=cc(t))&&(r&&(r+=" "),r+=n);return r}const cc=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=cc(e[r]))&&(n&&(n+=" "),n+=t);return n};function vv(e,...t){let n,r,o,i=a;function a(u){const c=t.reduce((d,g)=>g(d),e());return n=pv(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=mv(u,n);return o(u,d),d}return function(){return i(hv.apply(null,arguments))}}const ke=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},uc=/^\[(?:([a-z-]+):)?(.+)\]$/i,yv=/^\d+\/\d+$/,xv=new Set(["px","full","screen"]),bv=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,wv=/\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$/,Sv=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Cv=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ev=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Bt=e=>Fn(e)||xv.has(e)||yv.test(e),Jt=e=>Dn(e,"length",Fv),Fn=e=>!!e&&!Number.isNaN(Number(e)),Qi=e=>Dn(e,"number",Fn),pr=e=>!!e&&Number.isInteger(Number(e)),_v=e=>e.endsWith("%")&&Fn(e.slice(0,-1)),be=e=>uc.test(e),Zt=e=>bv.test(e),Tv=new Set(["length","size","percentage"]),Av=e=>Dn(e,Tv,dc),Pv=e=>Dn(e,"position",dc),Nv=new Set(["image","url"]),kv=e=>Dn(e,Nv,Iv),Ov=e=>Dn(e,"",Dv),gr=()=>!0,Dn=(e,t,n)=>{const r=uc.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},Fv=e=>wv.test(e)&&!Sv.test(e),dc=()=>!1,Dv=e=>Cv.test(e),Iv=e=>Ev.test(e),Mv=vv(()=>{const e=ke("colors"),t=ke("spacing"),n=ke("blur"),r=ke("brightness"),o=ke("borderColor"),i=ke("borderRadius"),a=ke("borderSpacing"),s=ke("borderWidth"),u=ke("contrast"),c=ke("grayscale"),d=ke("hueRotate"),g=ke("invert"),m=ke("gap"),p=ke("gradientColorStops"),h=ke("gradientColorStopPositions"),v=ke("inset"),y=ke("margin"),b=ke("opacity"),w=ke("padding"),S=ke("saturate"),E=ke("scale"),x=ke("sepia"),N=ke("skew"),I=ke("space"),M=ke("translate"),H=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],G=()=>["auto",be,t],W=()=>[be,t],Z=()=>["",Bt,Jt],k=()=>["auto",Fn,be],$=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],F=()=>["solid","dashed","dotted","double","none"],U=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],j=()=>["start","end","center","between","around","evenly","stretch"],R=()=>["","0",be],A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>[Fn,be];return{cacheSize:500,separator:":",theme:{colors:[gr],spacing:[Bt,Jt],blur:["none","",Zt,be],brightness:B(),borderColor:[e],borderRadius:["none","","full",Zt,be],borderSpacing:W(),borderWidth:Z(),contrast:B(),grayscale:R(),hueRotate:B(),invert:R(),gap:W(),gradientColorStops:[e],gradientColorStopPositions:[_v,Jt],inset:G(),margin:G(),opacity:B(),padding:W(),saturate:B(),scale:B(),sepia:R(),skew:B(),space:W(),translate:W()},classGroups:{aspect:[{aspect:["auto","square","video",be]}],container:["container"],columns:[{columns:[Zt]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"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:[...$(),be]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",pr,be]}],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",be]}],grow:[{grow:R()}],shrink:[{shrink:R()}],order:[{order:["first","last","none",pr,be]}],"grid-cols":[{"grid-cols":[gr]}],"col-start-end":[{col:["auto",{span:["full",pr,be]},be]}],"col-start":[{"col-start":k()}],"col-end":[{"col-end":k()}],"grid-rows":[{"grid-rows":[gr]}],"row-start-end":[{row:["auto",{span:[pr,be]},be]}],"row-start":[{"row-start":k()}],"row-end":[{"row-end":k()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",be]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",be]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...j()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...j(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...j(),"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",be,t]}],"min-w":[{"min-w":[be,t,"min","max","fit"]}],"max-w":[{"max-w":[be,t,"none","full","min","max","fit","prose",{screen:[Zt]},Zt]}],h:[{h:[be,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[be,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[be,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[be,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:[gr]}],"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",be]}],"line-clamp":[{"line-clamp":["none",Fn,Qi]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Bt,be]}],"list-image":[{"list-image":["none",be]}],"list-style-type":[{list:["none","disc","decimal",be]}],"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",Bt,Jt]}],"underline-offset":[{"underline-offset":["auto",Bt,be]}],"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:W()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",be]}],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",be]}],"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:[...$(),Pv]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Av]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},kv]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"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":[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":[Bt,be]}],"outline-w":[{outline:[Bt,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":[Bt,Jt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Zt,Ov]}],"shadow-color":[{shadow:[gr]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...U(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":U()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",Zt,be]}],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":[b]}],"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",be]}],duration:[{duration:B()}],ease:[{ease:["linear","in","out","in-out",be]}],delay:[{delay:B()}],animate:[{animate:["none","spin","ping","pulse","bounce",be]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[E]}],"scale-x":[{"scale-x":[E]}],"scale-y":[{"scale-y":[E]}],rotate:[{rotate:[pr,be]}],"translate-x":[{"translate-x":[M]}],"translate-y":[{"translate-y":[M]}],"skew-x":[{"skew-x":[N]}],"skew-y":[{"skew-y":[N]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",be]}],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",be]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":W()}],"scroll-mx":[{"scroll-mx":W()}],"scroll-my":[{"scroll-my":W()}],"scroll-ms":[{"scroll-ms":W()}],"scroll-me":[{"scroll-me":W()}],"scroll-mt":[{"scroll-mt":W()}],"scroll-mr":[{"scroll-mr":W()}],"scroll-mb":[{"scroll-mb":W()}],"scroll-ml":[{"scroll-ml":W()}],"scroll-p":[{"scroll-p":W()}],"scroll-px":[{"scroll-px":W()}],"scroll-py":[{"scroll-py":W()}],"scroll-ps":[{"scroll-ps":W()}],"scroll-pe":[{"scroll-pe":W()}],"scroll-pt":[{"scroll-pt":W()}],"scroll-pr":[{"scroll-pr":W()}],"scroll-pb":[{"scroll-pb":W()}],"scroll-pl":[{"scroll-pl":W()}],"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",be]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Bt,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 he(...e){return Mv(Jl(e))}const $v=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]}`};function Lv(){let e=localStorage.getItem("dataLogin"),t;try{e&&(e=JSON.parse(e),t=e.user)}catch(n){console.error("Error parsing dataLogin from localStorage:",n),e=null}return t}const fc=f.forwardRef(({className:e,...t},n)=>l.jsx("nav",{ref:n,"aria-label":"breadcrumb",className:he("s3-explr-ui-breadcrumb",e),...t}));fc.displayName="Breadcrumb";const pc=f.forwardRef(({className:e,...t},n)=>l.jsx("ol",{ref:n,className:he("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}));pc.displayName="BreadcrumbList";const ea=f.forwardRef(({className:e,...t},n)=>l.jsx("li",{ref:n,className:he("inline-flex items-center gap-1.5","s3-explr-ui-breadcrumb-item",e),...t}));ea.displayName="BreadcrumbItem";const ta=f.forwardRef(({asChild:e,className:t,...n},r)=>{const o=e?On:"a";return l.jsx(o,{ref:r,className:he("transition-colors hover:text-foreground","s3-explr-ui-breadcrumb-link",t),...n})});ta.displayName="BreadcrumbLink";const Rv=f.forwardRef(({className:e,...t},n)=>l.jsx("span",{ref:n,role:"link","aria-disabled":"true","aria-current":"page",className:he("font-normal text-foreground","s3-explr-ui-breadcrumb-page",e),...t}));Rv.displayName="BreadcrumbPage";const gc=({children:e,className:t,...n})=>l.jsx("li",{role:"presentation","aria-hidden":"true",className:he("[&>svg]:w-3.5 [&>svg]:h-3.5","s3-explr-ui-breadcrumb-separator",t),...n,children:e??l.jsx(Yl,{})});gc.displayName="BreadcrumbSeparator";const mc=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,hc=Jl,na=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return hc(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=mc(d)||mc(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,...p}=d;return Object.entries(p).every(h=>{let[v,y]=h;return Array.isArray(y)?y.includes({...i,...s}[v]):{...i,...s}[v]===y})?[...c,g,m]:c},[]);return hc(e,a,u,n==null?void 0:n.class,n==null?void 0:n.className)},vc=na("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"}}),ye=f.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},i)=>{const a=r?On:"button";return l.jsx(a,{className:he(vc({variant:t,size:n,className:e})),ref:i,...o})});ye.displayName="Button";function Vv(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function oo(...e){return t=>e.forEach(n=>Vv(n,t))}function dt(...e){return f.useCallback(oo(...e),e)}function jv(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 Qt(e,t=[]){let n=[];function r(i,a){const s=f.createContext(a),u=n.length;n=[...n,a];const c=g=>{var b;const{scope:m,children:p,...h}=g,v=((b=m==null?void 0:m[e])==null?void 0:b[u])||s,y=f.useMemo(()=>h,Object.values(h));return l.jsx(v.Provider,{value:y,children:p})};c.displayName=i+"Provider";function d(g,m){var v;const p=((v=m==null?void 0:m[e])==null?void 0:v[u])||s,h=f.useContext(p);if(h)return h;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,zv(o,...t)]}function zv(...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 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=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 In({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Bv({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=qe(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 Bv({defaultProp:e,onChange:t}){const n=f.useState(e),[r]=n,o=f.useRef(r),i=qe(t);return f.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}function Hv(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 it=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{};function yc(e){const[t,n]=f.useState(void 0);return it(()=>{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 Uv(e,t){return f.useReducer((n,r)=>t[n][r]??n,e)}var Mn=e=>{const{present:t,children:n}=e,r=Wv(t),o=typeof n=="function"?n({present:r.isPresent}):f.Children.only(n),i=dt(r.ref,qv(o));return typeof n=="function"||r.isPresent?f.cloneElement(o,{ref:i}):null};Mn.displayName="Presence";function Wv(e){const[t,n]=f.useState(),r=f.useRef({}),o=f.useRef(e),i=f.useRef("none"),a=e?"mounted":"unmounted",[s,u]=Uv(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const c=io(r.current);i.current=s==="mounted"?c:"none"},[s]),it(()=>{const c=r.current,d=o.current;if(d!==e){const m=i.current,p=io(c);e?u("MOUNT"):p==="none"||(c==null?void 0:c.display)==="none"?u("UNMOUNT"):u(d&&m!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),it(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,g=p=>{const v=io(r.current).includes(p.animationName);if(p.target===t&&v&&(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=p=>{p.target===t&&(i.current=io(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:f.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function io(e){return(e==null?void 0:e.animationName)||"none"}function qv(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 xc=f.forwardRef((e,t)=>{const{children:n,...r}=e,o=f.Children.toArray(n),i=o.find(Kv);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(ra,{...r,ref:t,children:f.isValidElement(a)?f.cloneElement(a,void 0,s):null})}return l.jsx(ra,{...r,ref:t,children:n})});xc.displayName="Slot";var ra=f.forwardRef((e,t)=>{const{children:n,...r}=e;if(f.isValidElement(n)){const o=Xv(n);return f.cloneElement(n,{...Yv(r,n.props),ref:t?oo(t,o):o})}return f.Children.count(n)>1?f.Children.only(null):null});ra.displayName="SlotClone";var Gv=({children:e})=>l.jsx(l.Fragment,{children:e});function Kv(e){return f.isValidElement(e)&&e.type===Gv}function Yv(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 Xv(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 Jv=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Re=Jv.reduce((e,t)=>{const n=f.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?xc: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 bc(e,t){e&&Rr.flushSync(()=>e.dispatchEvent(t))}var oa="Checkbox",[Zv,v_]=Qt(oa),[Qv,ey]=Zv(oa),wc=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,[m,p]=f.useState(null),h=dt(t,E=>p(E)),v=f.useRef(!1),y=m?d||!!m.closest("form"):!0,[b=!1,w]=In({prop:o,defaultProp:i,onChange:c}),S=f.useRef(b);return f.useEffect(()=>{const E=m==null?void 0:m.form;if(E){const x=()=>w(S.current);return E.addEventListener("reset",x),()=>E.removeEventListener("reset",x)}},[m,w]),l.jsxs(Qv,{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":Ec(b),"data-disabled":s?"":void 0,disabled:s,value:u,...g,ref:h,onKeyDown:Le(e.onKeyDown,E=>{E.key==="Enter"&&E.preventDefault()}),onClick:Le(e.onClick,E=>{w(x=>en(x)?!0:!x),y&&(v.current=E.isPropagationStopped(),v.current||E.stopPropagation())})}),y&&l.jsx(ty,{control:m,bubbles:!v.current,name:r,value:u,checked:b,required:a,disabled:s,form:d,style:{transform:"translateX(-100%)"},defaultChecked:en(i)?!1:i})]})});wc.displayName=oa;var Sc="CheckboxIndicator",Cc=f.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=ey(Sc,n);return l.jsx(Mn,{present:r||en(i.state)||i.state===!0,children:l.jsx(Re.span,{"data-state":Ec(i.state),"data-disabled":i.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});Cc.displayName=Sc;var ty=e=>{const{control:t,checked:n,bubbles:r=!0,defaultChecked:o,...i}=e,a=f.useRef(null),s=Hv(n),u=yc(t);f.useEffect(()=>{const d=a.current,g=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(g,"checked").set;if(s!==n&&p){const h=new Event("click",{bubbles:r});d.indeterminate=en(n),p.call(d,en(n)?!1:n),d.dispatchEvent(h)}},[s,n,r]);const c=f.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 Ec(e){return en(e)?"indeterminate":e?"checked":"unchecked"}var _c=wc,ny=Cc;const ia=f.forwardRef(({className:e,...t},n)=>l.jsx(_c,{ref:n,className:he("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(ny,{className:he("s3-explr-ui-checkbox-indicator flex items-center justify-center text-current"),children:l.jsx(Dh,{className:"s3-explr-ui-checkbox-check h-4 w-4"})})}));ia.displayName=_c.displayName;var ry=f.useId||(()=>{}),oy=0;function $n(e){const[t,n]=f.useState(ry());return it(()=>{e||n(r=>r??String(oy++))},[e]),e||(t?`radix-${t}`:"")}function Tc(e,t=globalThis==null?void 0:globalThis.document){const n=qe(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 iy="DismissableLayer",aa="dismissableLayer.update",ay="dismissableLayer.pointerDownOutside",sy="dismissableLayer.focusOutside",Ac,Pc=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),sa=f.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...u}=e,c=f.useContext(Pc),[d,g]=f.useState(null),m=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=f.useState({}),h=dt(t,I=>g(I)),v=Array.from(c.layers),[y]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),b=v.indexOf(y),w=d?v.indexOf(d):-1,S=c.layersWithOutsidePointerEventsDisabled.size>0,E=w>=b,x=cy(I=>{const M=I.target,H=[...c.branches].some(O=>O.contains(M));!E||H||(o==null||o(I),a==null||a(I),I.defaultPrevented||s==null||s())},m),N=uy(I=>{const M=I.target;[...c.branches].some(O=>O.contains(M))||(i==null||i(I),a==null||a(I),I.defaultPrevented||s==null||s())},m);return Tc(I=>{w===c.layers.size-1&&(r==null||r(I),!I.defaultPrevented&&s&&(I.preventDefault(),s()))},m),f.useEffect(()=>{if(d)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Ac=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),kc(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Ac)}},[d,m,n,c]),f.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),kc())},[d,c]),f.useEffect(()=>{const I=()=>p({});return document.addEventListener(aa,I),()=>document.removeEventListener(aa,I)},[]),l.jsx(Re.div,{...u,ref:h,style:{pointerEvents:S?E?"auto":"none":void 0,...e.style},onFocusCapture:Le(e.onFocusCapture,N.onFocusCapture),onBlurCapture:Le(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:Le(e.onPointerDownCapture,x.onPointerDownCapture)})});sa.displayName=iy;var ly="DismissableLayerBranch",Nc=f.forwardRef((e,t)=>{const n=f.useContext(Pc),r=f.useRef(null),o=dt(t,r);return f.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})});Nc.displayName=ly;function cy(e,t=globalThis==null?void 0:globalThis.document){const n=qe(e),r=f.useRef(!1),o=f.useRef(()=>{});return f.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let u=function(){Oc(ay,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 uy(e,t=globalThis==null?void 0:globalThis.document){const n=qe(e),r=f.useRef(!1);return f.useEffect(()=>{const o=i=>{i.target&&!r.current&&Oc(sy,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 kc(){const e=new CustomEvent(aa);document.dispatchEvent(e)}function Oc(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?bc(o,i):o.dispatchEvent(i)}var dy=sa,fy=Nc,la="focusScope.autoFocusOnMount",ca="focusScope.autoFocusOnUnmount",Fc={bubbles:!1,cancelable:!0},py="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=qe(o),d=qe(i),g=f.useRef(null),m=dt(t,v=>u(v)),p=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(r){let v=function(S){if(p.paused||!s)return;const E=S.target;s.contains(E)?g.current=E:tn(g.current,{select:!0})},y=function(S){if(p.paused||!s)return;const E=S.relatedTarget;E!==null&&(s.contains(E)||tn(g.current,{select:!0}))},b=function(S){if(document.activeElement===document.body)for(const x of S)x.removedNodes.length>0&&tn(s)};document.addEventListener("focusin",v),document.addEventListener("focusout",y);const w=new MutationObserver(b);return s&&w.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",y),w.disconnect()}}},[r,s,p.paused]),f.useEffect(()=>{if(s){$c.add(p);const v=document.activeElement;if(!s.contains(v)){const b=new CustomEvent(la,Fc);s.addEventListener(la,c),s.dispatchEvent(b),b.defaultPrevented||(gy(xy(Ic(s)),{select:!0}),document.activeElement===v&&tn(s))}return()=>{s.removeEventListener(la,c),setTimeout(()=>{const b=new CustomEvent(ca,Fc);s.addEventListener(ca,d),s.dispatchEvent(b),b.defaultPrevented||tn(v??document.body,{select:!0}),s.removeEventListener(ca,d),$c.remove(p)},0)}}},[s,c,d,p]);const h=f.useCallback(v=>{if(!n&&!r||p.paused)return;const y=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,b=document.activeElement;if(y&&b){const w=v.currentTarget,[S,E]=my(w);S&&E?!v.shiftKey&&b===E?(v.preventDefault(),n&&tn(S,{select:!0})):v.shiftKey&&b===S&&(v.preventDefault(),n&&tn(E,{select:!0})):b===w&&v.preventDefault()}},[n,r,p.paused]);return l.jsx(Re.div,{tabIndex:-1,...a,ref:m,onKeyDown:h})});Dc.displayName=py;function gy(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(tn(r,{select:t}),document.activeElement!==n)return}function my(e){const t=Ic(e),n=Mc(t,e),r=Mc(t.reverse(),e);return[n,r]}function Ic(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 Mc(e,t){for(const n of e)if(!hy(n,{upTo:t}))return n}function hy(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 vy(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&&vy(e)&&t&&e.select()}}var $c=yy();function yy(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Lc(e,t),e.unshift(t)},remove(t){var n;e=Lc(e,t),(n=e[0])==null||n.resume()}}}function Lc(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function xy(e){return e.filter(t=>t.tagName!=="A")}var by="Portal",ua=f.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,i]=f.useState(!1);it(()=>i(!0),[]);const a=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?ci.createPortal(l.jsx(Re.div,{...r,ref:t}),a):null});ua.displayName=by;var da=0;function wy(){f.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Rc()),document.body.insertAdjacentElement("beforeend",e[1]??Rc()),da++,()=>{da===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),da--}},[])}function Rc(){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 Tt=function(){return Tt=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},Tt.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 bn(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 jc(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 zc(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 ao="right-scroll-bar-position",so="width-before-scroll-bar",Sy="with-scroll-bars-hidden",Cy="--removed-body-scroll-bar-size";function fa(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Ey(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 _y=typeof window<"u"?f.useLayoutEffect:f.useEffect,Bc=new WeakMap;function Ty(e,t){var n=Ey(null,function(r){return e.forEach(function(o){return fa(o,r)})});return _y(function(){var r=Bc.get(n);if(r){var o=new Set(r),i=new Set(e),a=n.current;o.forEach(function(s){i.has(s)||fa(s,null)}),i.forEach(function(s){o.has(s)||fa(s,a)})}Bc.set(n,e)},[e]),n}function Ay(e){return e}function Py(e,t){t===void 0&&(t=Ay);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 Ny(e){e===void 0&&(e={});var t=Py(null);return t.options=Tt({async:!0,ssr:!1},e),t}var Hc=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,Tt({},n))};Hc.isSideCarExport=!0;function ky(e,t){return e.useMedium(t),Hc}var Uc=Ny(),pa=function(){},lo=f.forwardRef(function(e,t){var n=f.useRef(null),r=f.useState({onScrollCapture:pa,onWheelCapture:pa,onTouchMoveCapture:pa}),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,p=e.noIsolation,h=e.inert,v=e.allowPinchZoom,y=e.as,b=y===void 0?"div":y,w=e.gapMode,S=Vc(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=m,x=Ty([n,t]),N=Tt(Tt({},S),o);return f.createElement(f.Fragment,null,d&&f.createElement(E,{sideCar:Uc,removeScrollBar:c,shards:g,noIsolation:p,inert:h,setCallbacks:i,allowPinchZoom:!!v,lockRef:n,gapMode:w}),a?f.cloneElement(f.Children.only(s),Tt(Tt({},N),{ref:x})):f.createElement(b,Tt({},N,{className:u,ref:x}),s))});lo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},lo.classNames={fullWidth:so,zeroRight:ao};var Oy=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Fy(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Oy();return t&&e.setAttribute("nonce",t),e}function Dy(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Iy(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var My=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Fy())&&(Dy(t,n),Iy(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},$y=function(){var e=My();return function(t,n){f.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Wc=function(){var e=$y(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Ly={left:0,top:0,right:0,gap:0},ga=function(e){return parseInt(e||"",10)||0},Ry=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[ga(n),ga(r),ga(o)]},Vy=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Ly;var t=Ry(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])}},jy=Wc(),Ln="data-scroll-locked",zy=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(
|
|
133
|
+
*/const Tc=_n("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Kp(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Kp(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Yp(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Kp(e))&&(r&&(r+=" "),r+=t);return r}function M_(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))}M_(`: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)}}
|
|
134
|
+
`);var Ac=e=>typeof e=="number"&&!isNaN(e),Ri=e=>typeof e=="string",Xp=e=>typeof e=="function",$_=e=>Ri(e)||Ac(e),R_=e=>L.isValidElement(e)||Ri(e)||Xp(e)||Ac(e),V_=1,Jp=()=>`${V_++}`,nr=new Map,Pc=[],Zp=new Set,Qp=()=>nr.size>0,z_=(e,{containerId:t})=>{var n;return(n=nr.get(t||1))==null?void 0:n.toasts.get(e)};function B_(e,t){var n;if(t)return!!((n=nr.get(t))!=null&&n.isToastActive(e));let r=!1;return nr.forEach(i=>{i.isToastActive(e)&&(r=!0)}),r}function U_(e){if(!Qp()){Pc=Pc.filter(t=>e!=null&&t.options.toastId!==e);return}if(e==null||$_(e))nr.forEach(t=>{t.removeToast(e)});else if(e&&("containerId"in e||"id"in e)){let t=nr.get(e.containerId);t?t.removeToast(e.id):nr.forEach(n=>{n.removeToast(e.id)})}}var j_=(e={})=>{nr.forEach(t=>{t.props.limit&&(!e.containerId||t.id===e.containerId)&&t.clearQueue()})};function W_(e,t){R_(e)&&(Qp()||Pc.push({content:e,options:t}),nr.forEach(n=>{n.buildToast(e,t)}))}function eg(e,t){nr.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 H_(e){return Zp.add(e),()=>{Zp.delete(e)}}function G_(e){return e&&(Ri(e.toastId)||Ac(e.toastId))?e.toastId:Jp()}function Vi(e,t){return W_(e,t),t.toastId}function Ba(e,t){return{...t,type:t&&t.type||e,toastId:G_(t)}}function Ua(e){return(t,n)=>Vi(t,Ba(e,n))}function ct(e,t){return Vi(e,Ba("default",t))}ct.loading=(e,t)=>Vi(e,Ba("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t}));function q_(e,{pending:t,error:n,success:r},i){let s;t&&(s=Ri(t)?ct.loading(t,i):ct.loading(t.render,{...i,...t}));let l={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},u=(f,h,y)=>{if(h==null){ct.dismiss(s);return}let x={type:f,...l,...i,data:y},m=Ri(h)?{render:h}:h;return s?ct.update(s,{...x,...m}):ct(m.render,{...x,...m}),y},g=Xp(e)?e():e;return g.then(f=>u("success",r,f)).catch(f=>u("error",n,f)),g}ct.promise=q_,ct.success=Ua("success"),ct.info=Ua("info"),ct.error=Ua("error"),ct.warning=Ua("warning"),ct.warn=ct.warning,ct.dark=(e,t)=>Vi(e,Ba("default",{theme:"dark",...t}));function K_(e){U_(e)}ct.dismiss=K_,ct.clearWaitingQueue=j_,ct.isActive=B_,ct.update=(e,t={})=>{let n=z_(e,t);if(n){let{props:r,content:i}=n,s={delay:100,...r,...t,toastId:t.toastId||e,updateId:Jp()};s.toastId!==e&&(s.staleId=e);let l=s.render||i;delete s.render,Vi(l,s)}},ct.done=e=>{ct.update(e,{progress:1})},ct.onChange=H_,ct.play=e=>eg(!0,e),ct.pause=e=>eg(!1,e);const Y_={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"},X_=e=>e==="SummaryOfSuggestedAI"||e==="KeywordAISuggestion"||e==="SuggestedAICategories",Oc=e=>e==="fullPath"||e==="createAt"||e==="creator"||e==="creatorId"||e==="DataSource"||e==="AccessLevel"||e==="category"||e==="fileName";function tg(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function J_(...e){return t=>{let n=!1;const r=e.map(i=>{const s=tg(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():tg(e[i],null)}}}}var qo=v.forwardRef((e,t)=>{const{children:n,...r}=e,i=v.Children.toArray(n),s=i.find(Z_);if(s){const l=s.props.children,u=i.map(g=>g===s?v.Children.count(l)>1?v.Children.only(null):v.isValidElement(l)?l.props.children:null:g);return d.jsx(Nc,{...r,ref:t,children:v.isValidElement(l)?v.cloneElement(l,void 0,u):null})}return d.jsx(Nc,{...r,ref:t,children:n})});qo.displayName="Slot";var Nc=v.forwardRef((e,t)=>{const{children:n,...r}=e;if(v.isValidElement(n)){const i=eS(n);return v.cloneElement(n,{...Q_(r,n.props),ref:t?J_(t,i):i})}return v.Children.count(n)>1?v.Children.only(null):null});Nc.displayName="SlotClone";var ng=({children:e})=>d.jsx(d.Fragment,{children:e});function Z_(e){return v.isValidElement(e)&&e.type===ng}function Q_(e,t){const n={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...u)=>{s(...u),i(...u)}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...e,...n}}function eS(e){var r,i;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=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const Fc="-",tS=e=>{const t=rS(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{const u=l.split(Fc);return u[0]===""&&u.length!==1&&u.shift(),rg(u,t)||nS(l)},getConflictingClassGroupIds:(l,u)=>{const g=n[l]||[];return u&&r[l]?[...g,...r[l]]:g}}},rg=(e,t)=>{var l;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?rg(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(Fc);return(l=t.validators.find(({validator:u})=>u(s)))==null?void 0:l.classGroupId},og=/^\[(.+)\]$/,nS=e=>{if(og.test(e)){const t=og.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},rS=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return iS(Object.entries(e.classGroups),n).forEach(([s,l])=>{Dc(l,r,s,t)}),r},Dc=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const s=i===""?t:ig(t,i);s.classGroupId=n;return}if(typeof i=="function"){if(oS(i)){Dc(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,l])=>{Dc(l,ig(t,s),n,r)})})},ig=(e,t)=>{let n=e;return t.split(Fc).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},oS=e=>e.isThemeGetter,iS=(e,t)=>t?e.map(([n,r])=>{const i=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([l,u])=>[t+l,u])):s);return[n,i]}):e,aS=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(s,l)=>{n.set(s,l),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let l=n.get(s);if(l!==void 0)return l;if((l=r.get(s))!==void 0)return i(s,l),l},set(s,l){n.has(s)?n.set(s,l):i(s,l)}}},ag="!",sS=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],s=t.length,l=u=>{const g=[];let f=0,h=0,y;for(let S=0;S<u.length;S++){let A=u[S];if(f===0){if(A===i&&(r||u.slice(S,S+s)===t)){g.push(u.slice(h,S)),h=S+s;continue}if(A==="/"){y=S;continue}}A==="["?f++:A==="]"&&f--}const x=g.length===0?u:u.substring(h),m=x.startsWith(ag),w=m?x.substring(1):x,_=y&&y>h?y-h:void 0;return{modifiers:g,hasImportantModifier:m,baseClassName:w,maybePostfixModifierPosition:_}};return n?u=>n({className:u,parseClassName:l}):l},lS=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},cS=e=>({cache:aS(e.cacheSize),parseClassName:sS(e),...tS(e)}),uS=/\s+/,dS=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,s=[],l=e.trim().split(uS);let u="";for(let g=l.length-1;g>=0;g-=1){const f=l[g],{modifiers:h,hasImportantModifier:y,baseClassName:x,maybePostfixModifierPosition:m}=n(f);let w=!!m,_=r(w?x.substring(0,m):x);if(!_){if(!w){u=f+(u.length>0?" "+u:u);continue}if(_=r(x),!_){u=f+(u.length>0?" "+u:u);continue}w=!1}const S=lS(h).join(":"),A=y?S+ag:S,P=A+_;if(s.includes(P))continue;s.push(P);const N=i(_,w);for(let D=0;D<N.length;++D){const E=N[D];s.push(A+E)}u=f+(u.length>0?" "+u:u)}return u};function fS(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=sg(t))&&(r&&(r+=" "),r+=n);return r}const sg=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=sg(e[r]))&&(n&&(n+=" "),n+=t);return n};function pS(e,...t){let n,r,i,s=l;function l(g){const f=t.reduce((h,y)=>y(h),e());return n=cS(f),r=n.cache.get,i=n.cache.set,s=u,u(g)}function u(g){const f=r(g);if(f)return f;const h=dS(g,n);return i(g,h),h}return function(){return s(fS.apply(null,arguments))}}const pt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},lg=/^\[(?:([a-z-]+):)?(.+)\]$/i,gS=/^\d+\/\d+$/,hS=new Set(["px","full","screen"]),mS=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,vS=/\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$/,yS=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,xS=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,wS=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,br=e=>Ko(e)||hS.has(e)||gS.test(e),zr=e=>Yo(e,"length",PS),Ko=e=>!!e&&!Number.isNaN(Number(e)),kc=e=>Yo(e,"number",Ko),zi=e=>!!e&&Number.isInteger(Number(e)),bS=e=>e.endsWith("%")&&Ko(e.slice(0,-1)),Ge=e=>lg.test(e),Br=e=>mS.test(e),_S=new Set(["length","size","percentage"]),SS=e=>Yo(e,_S,cg),CS=e=>Yo(e,"position",cg),ES=new Set(["image","url"]),TS=e=>Yo(e,ES,NS),AS=e=>Yo(e,"",OS),Bi=()=>!0,Yo=(e,t,n)=>{const r=lg.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},PS=e=>vS.test(e)&&!yS.test(e),cg=()=>!1,OS=e=>xS.test(e),NS=e=>wS.test(e),FS=pS(()=>{const e=pt("colors"),t=pt("spacing"),n=pt("blur"),r=pt("brightness"),i=pt("borderColor"),s=pt("borderRadius"),l=pt("borderSpacing"),u=pt("borderWidth"),g=pt("contrast"),f=pt("grayscale"),h=pt("hueRotate"),y=pt("invert"),x=pt("gap"),m=pt("gradientColorStops"),w=pt("gradientColorStopPositions"),_=pt("inset"),S=pt("margin"),A=pt("opacity"),P=pt("padding"),N=pt("saturate"),D=pt("scale"),E=pt("sepia"),V=pt("skew"),W=pt("space"),B=pt("translate"),ee=()=>["auto","contain","none"],H=()=>["auto","hidden","clip","visible","scroll"],ce=()=>["auto",Ge,t],ie=()=>[Ge,t],he=()=>["",br,zr],U=()=>["auto",Ko,Ge],K=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],G=()=>["solid","dashed","dotted","double","none"],te=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Y=()=>["start","end","center","between","around","evenly","stretch"],J=()=>["","0",Ge],M=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Q=()=>[Ko,Ge];return{cacheSize:500,separator:":",theme:{colors:[Bi],spacing:[br,zr],blur:["none","",Br,Ge],brightness:Q(),borderColor:[e],borderRadius:["none","","full",Br,Ge],borderSpacing:ie(),borderWidth:he(),contrast:Q(),grayscale:J(),hueRotate:Q(),invert:J(),gap:ie(),gradientColorStops:[e],gradientColorStopPositions:[bS,zr],inset:ce(),margin:ce(),opacity:Q(),padding:ie(),saturate:Q(),scale:Q(),sepia:J(),skew:Q(),space:ie(),translate:ie()},classGroups:{aspect:[{aspect:["auto","square","video",Ge]}],container:["container"],columns:[{columns:[Br]}],"break-after":[{"break-after":M()}],"break-before":[{"break-before":M()}],"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:[...K(),Ge]}],overflow:[{overflow:H()}],"overflow-x":[{"overflow-x":H()}],"overflow-y":[{"overflow-y":H()}],overscroll:[{overscroll:ee()}],"overscroll-x":[{"overscroll-x":ee()}],"overscroll-y":[{"overscroll-y":ee()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[_]}],"inset-x":[{"inset-x":[_]}],"inset-y":[{"inset-y":[_]}],start:[{start:[_]}],end:[{end:[_]}],top:[{top:[_]}],right:[{right:[_]}],bottom:[{bottom:[_]}],left:[{left:[_]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",zi,Ge]}],basis:[{basis:ce()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ge]}],grow:[{grow:J()}],shrink:[{shrink:J()}],order:[{order:["first","last","none",zi,Ge]}],"grid-cols":[{"grid-cols":[Bi]}],"col-start-end":[{col:["auto",{span:["full",zi,Ge]},Ge]}],"col-start":[{"col-start":U()}],"col-end":[{"col-end":U()}],"grid-rows":[{"grid-rows":[Bi]}],"row-start-end":[{row:["auto",{span:[zi,Ge]},Ge]}],"row-start":[{"row-start":U()}],"row-end":[{"row-end":U()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ge]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ge]}],gap:[{gap:[x]}],"gap-x":[{"gap-x":[x]}],"gap-y":[{"gap-y":[x]}],"justify-content":[{justify:["normal",...Y()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Y(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Y(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[P]}],px:[{px:[P]}],py:[{py:[P]}],ps:[{ps:[P]}],pe:[{pe:[P]}],pt:[{pt:[P]}],pr:[{pr:[P]}],pb:[{pb:[P]}],pl:[{pl:[P]}],m:[{m:[S]}],mx:[{mx:[S]}],my:[{my:[S]}],ms:[{ms:[S]}],me:[{me:[S]}],mt:[{mt:[S]}],mr:[{mr:[S]}],mb:[{mb:[S]}],ml:[{ml:[S]}],"space-x":[{"space-x":[W]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[W]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ge,t]}],"min-w":[{"min-w":[Ge,t,"min","max","fit"]}],"max-w":[{"max-w":[Ge,t,"none","full","min","max","fit","prose",{screen:[Br]},Br]}],h:[{h:[Ge,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ge,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ge,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ge,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Br,zr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",kc]}],"font-family":[{font:[Bi]}],"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",Ge]}],"line-clamp":[{"line-clamp":["none",Ko,kc]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",br,Ge]}],"list-image":[{"list-image":["none",Ge]}],"list-style-type":[{list:["none","disc","decimal",Ge]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[A]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[A]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...G(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",br,zr]}],"underline-offset":[{"underline-offset":["auto",br,Ge]}],"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:ie()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ge]}],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",Ge]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[A]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...K(),CS]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",SS]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},TS]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[u]}],"border-w-x":[{"border-x":[u]}],"border-w-y":[{"border-y":[u]}],"border-w-s":[{"border-s":[u]}],"border-w-e":[{"border-e":[u]}],"border-w-t":[{"border-t":[u]}],"border-w-r":[{"border-r":[u]}],"border-w-b":[{"border-b":[u]}],"border-w-l":[{"border-l":[u]}],"border-opacity":[{"border-opacity":[A]}],"border-style":[{border:[...G(),"hidden"]}],"divide-x":[{"divide-x":[u]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[u]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[A]}],"divide-style":[{divide:G()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...G()]}],"outline-offset":[{"outline-offset":[br,Ge]}],"outline-w":[{outline:[br,zr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:he()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[A]}],"ring-offset-w":[{"ring-offset":[br,zr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Br,AS]}],"shadow-color":[{shadow:[Bi]}],opacity:[{opacity:[A]}],"mix-blend":[{"mix-blend":[...te(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":te()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[g]}],"drop-shadow":[{"drop-shadow":["","none",Br,Ge]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[y]}],saturate:[{saturate:[N]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[g]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[y]}],"backdrop-opacity":[{"backdrop-opacity":[A]}],"backdrop-saturate":[{"backdrop-saturate":[N]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ge]}],duration:[{duration:Q()}],ease:[{ease:["linear","in","out","in-out",Ge]}],delay:[{delay:Q()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ge]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[D]}],"scale-x":[{"scale-x":[D]}],"scale-y":[{"scale-y":[D]}],rotate:[{rotate:[zi,Ge]}],"translate-x":[{"translate-x":[B]}],"translate-y":[{"translate-y":[B]}],"skew-x":[{"skew-x":[V]}],"skew-y":[{"skew-y":[V]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ge]}],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",Ge]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":ie()}],"scroll-mx":[{"scroll-mx":ie()}],"scroll-my":[{"scroll-my":ie()}],"scroll-ms":[{"scroll-ms":ie()}],"scroll-me":[{"scroll-me":ie()}],"scroll-mt":[{"scroll-mt":ie()}],"scroll-mr":[{"scroll-mr":ie()}],"scroll-mb":[{"scroll-mb":ie()}],"scroll-ml":[{"scroll-ml":ie()}],"scroll-p":[{"scroll-p":ie()}],"scroll-px":[{"scroll-px":ie()}],"scroll-py":[{"scroll-py":ie()}],"scroll-ps":[{"scroll-ps":ie()}],"scroll-pe":[{"scroll-pe":ie()}],"scroll-pt":[{"scroll-pt":ie()}],"scroll-pr":[{"scroll-pr":ie()}],"scroll-pb":[{"scroll-pb":ie()}],"scroll-pl":[{"scroll-pl":ie()}],"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",Ge]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[br,zr,kc]}],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 Ve(...e){return FS(Yp(e))}const DS=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]}`};function kS(){let e=localStorage.getItem("dataLogin"),t;try{e&&(e=JSON.parse(e),t=e.user)}catch(n){console.error("Error parsing dataLogin from localStorage:",n),e=null}return t}const ug=v.forwardRef(({className:e,...t},n)=>d.jsx("nav",{ref:n,"aria-label":"breadcrumb",className:Ve("s3-explr-ui-breadcrumb",e),...t}));ug.displayName="Breadcrumb";const dg=v.forwardRef(({className:e,...t},n)=>d.jsx("ol",{ref:n,className:Ve("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}));dg.displayName="BreadcrumbList";const Ic=v.forwardRef(({className:e,...t},n)=>d.jsx("li",{ref:n,className:Ve("inline-flex items-center gap-1.5","s3-explr-ui-breadcrumb-item",e),...t}));Ic.displayName="BreadcrumbItem";const Lc=v.forwardRef(({asChild:e,className:t,...n},r)=>{const i=e?qo:"a";return d.jsx(i,{ref:r,className:Ve("transition-colors hover:text-foreground","s3-explr-ui-breadcrumb-link",t),...n})});Lc.displayName="BreadcrumbLink";const IS=v.forwardRef(({className:e,...t},n)=>d.jsx("span",{ref:n,role:"link","aria-disabled":"true","aria-current":"page",className:Ve("font-normal text-foreground","s3-explr-ui-breadcrumb-page",e),...t}));IS.displayName="BreadcrumbPage";const fg=({children:e,className:t,...n})=>d.jsx("li",{role:"presentation","aria-hidden":"true",className:Ve("[&>svg]:w-3.5 [&>svg]:h-3.5","s3-explr-ui-breadcrumb-separator",t),...n,children:e??d.jsx(qp,{})});fg.displayName="BreadcrumbSeparator";const pg=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,gg=Yp,Mc=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return gg(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:s}=t,l=Object.keys(i).map(f=>{const h=n==null?void 0:n[f],y=s==null?void 0:s[f];if(h===null)return null;const x=pg(h)||pg(y);return i[f][x]}),u=n&&Object.entries(n).reduce((f,h)=>{let[y,x]=h;return x===void 0||(f[y]=x),f},{}),g=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((f,h)=>{let{class:y,className:x,...m}=h;return Object.entries(m).every(w=>{let[_,S]=w;return Array.isArray(S)?S.includes({...s,...u}[_]):{...s,...u}[_]===S})?[...f,y,x]:f},[]);return gg(e,l,g,n==null?void 0:n.class,n==null?void 0:n.className)},hg=Mc("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"}}),Ue=v.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},s)=>{const l=r?qo:"button";return d.jsx(l,{className:Ve(hg({variant:t,size:n,className:e})),ref:s,...i})});Ue.displayName="Button";function LS(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function ja(...e){return t=>e.forEach(n=>LS(n,t))}function Sn(...e){return v.useCallback(ja(...e),e)}function MS(e,t){const n=v.createContext(t),r=s=>{const{children:l,...u}=s,g=v.useMemo(()=>u,Object.values(u));return d.jsx(n.Provider,{value:g,children:l})};r.displayName=e+"Provider";function i(s){const l=v.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,i]}function Ur(e,t=[]){let n=[];function r(s,l){const u=v.createContext(l),g=n.length;n=[...n,l];const f=y=>{var A;const{scope:x,children:m,...w}=y,_=((A=x==null?void 0:x[e])==null?void 0:A[g])||u,S=v.useMemo(()=>w,Object.values(w));return d.jsx(_.Provider,{value:S,children:m})};f.displayName=s+"Provider";function h(y,x){var _;const m=((_=x==null?void 0:x[e])==null?void 0:_[g])||u,w=v.useContext(m);if(w)return w;if(l!==void 0)return l;throw new Error(`\`${y}\` must be used within \`${s}\``)}return[f,h]}const i=()=>{const s=n.map(l=>v.createContext(l));return function(u){const g=(u==null?void 0:u[e])||s;return v.useMemo(()=>({[`__scope${e}`]:{...u,[e]:g}}),[u,g])}};return i.scopeName=e,[r,$S(i,...t)]}function $S(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const l=r.reduce((u,{useScope:g,scopeName:f})=>{const y=g(s)[`__scope${f}`];return{...u,...y}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}function Nt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function qt(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Xo({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=RS({defaultProp:t,onChange:n}),s=e!==void 0,l=s?e:r,u=qt(n),g=v.useCallback(f=>{if(s){const y=typeof f=="function"?f(e):f;y!==e&&u(y)}else i(f)},[s,e,i,u]);return[l,g]}function RS({defaultProp:e,onChange:t}){const n=v.useState(e),[r]=n,i=v.useRef(r),s=qt(t);return v.useEffect(()=>{i.current!==r&&(s(r),i.current=r)},[r,i,s]),n}function VS(e){const t=v.useRef({value:e,previous:e});return v.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var fn=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{};function mg(e){const[t,n]=v.useState(void 0);return fn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let l,u;if("borderBoxSize"in s){const g=s.borderBoxSize,f=Array.isArray(g)?g[0]:g;l=f.inlineSize,u=f.blockSize}else l=e.offsetWidth,u=e.offsetHeight;n({width:l,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function zS(e,t){return v.useReducer((n,r)=>t[n][r]??n,e)}var Jo=e=>{const{present:t,children:n}=e,r=BS(t),i=typeof n=="function"?n({present:r.isPresent}):v.Children.only(n),s=Sn(r.ref,US(i));return typeof n=="function"||r.isPresent?v.cloneElement(i,{ref:s}):null};Jo.displayName="Presence";function BS(e){const[t,n]=v.useState(),r=v.useRef({}),i=v.useRef(e),s=v.useRef("none"),l=e?"mounted":"unmounted",[u,g]=zS(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const f=Wa(r.current);s.current=u==="mounted"?f:"none"},[u]),fn(()=>{const f=r.current,h=i.current;if(h!==e){const x=s.current,m=Wa(f);e?g("MOUNT"):m==="none"||(f==null?void 0:f.display)==="none"?g("UNMOUNT"):g(h&&x!==m?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,g]),fn(()=>{if(t){let f;const h=t.ownerDocument.defaultView??window,y=m=>{const _=Wa(r.current).includes(m.animationName);if(m.target===t&&_&&(g("ANIMATION_END"),!i.current)){const S=t.style.animationFillMode;t.style.animationFillMode="forwards",f=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=S)})}},x=m=>{m.target===t&&(s.current=Wa(r.current))};return t.addEventListener("animationstart",x),t.addEventListener("animationcancel",y),t.addEventListener("animationend",y),()=>{h.clearTimeout(f),t.removeEventListener("animationstart",x),t.removeEventListener("animationcancel",y),t.removeEventListener("animationend",y)}}else g("ANIMATION_END")},[t,g]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:v.useCallback(f=>{f&&(r.current=getComputedStyle(f)),n(f)},[])}}function Wa(e){return(e==null?void 0:e.animationName)||"none"}function US(e){var r,i;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=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var vg=v.forwardRef((e,t)=>{const{children:n,...r}=e,i=v.Children.toArray(n),s=i.find(WS);if(s){const l=s.props.children,u=i.map(g=>g===s?v.Children.count(l)>1?v.Children.only(null):v.isValidElement(l)?l.props.children:null:g);return d.jsx($c,{...r,ref:t,children:v.isValidElement(l)?v.cloneElement(l,void 0,u):null})}return d.jsx($c,{...r,ref:t,children:n})});vg.displayName="Slot";var $c=v.forwardRef((e,t)=>{const{children:n,...r}=e;if(v.isValidElement(n)){const i=GS(n);return v.cloneElement(n,{...HS(r,n.props),ref:t?ja(t,i):i})}return v.Children.count(n)>1?v.Children.only(null):null});$c.displayName="SlotClone";var jS=({children:e})=>d.jsx(d.Fragment,{children:e});function WS(e){return v.isValidElement(e)&&e.type===jS}function HS(e,t){const n={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...u)=>{s(...u),i(...u)}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...e,...n}}function GS(e){var r,i;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=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var qS=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ft=qS.reduce((e,t)=>{const n=v.forwardRef((r,i)=>{const{asChild:s,...l}=r,u=s?vg:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(u,{...l,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function yg(e,t){e&&_a.flushSync(()=>e.dispatchEvent(t))}var Rc="Checkbox",[KS,DM]=Ur(Rc),[YS,XS]=KS(Rc),xg=v.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:i,defaultChecked:s,required:l,disabled:u,value:g="on",onCheckedChange:f,form:h,...y}=e,[x,m]=v.useState(null),w=Sn(t,D=>m(D)),_=v.useRef(!1),S=x?h||!!x.closest("form"):!0,[A=!1,P]=Xo({prop:i,defaultProp:s,onChange:f}),N=v.useRef(A);return v.useEffect(()=>{const D=x==null?void 0:x.form;if(D){const E=()=>P(N.current);return D.addEventListener("reset",E),()=>D.removeEventListener("reset",E)}},[x,P]),d.jsxs(YS,{scope:n,state:A,disabled:u,children:[d.jsx(Ft.button,{type:"button",role:"checkbox","aria-checked":jr(A)?"mixed":A,"aria-required":l,"data-state":_g(A),"data-disabled":u?"":void 0,disabled:u,value:g,...y,ref:w,onKeyDown:Nt(e.onKeyDown,D=>{D.key==="Enter"&&D.preventDefault()}),onClick:Nt(e.onClick,D=>{P(E=>jr(E)?!0:!E),S&&(_.current=D.isPropagationStopped(),_.current||D.stopPropagation())})}),S&&d.jsx(JS,{control:x,bubbles:!_.current,name:r,value:g,checked:A,required:l,disabled:u,form:h,style:{transform:"translateX(-100%)"},defaultChecked:jr(s)?!1:s})]})});xg.displayName=Rc;var wg="CheckboxIndicator",bg=v.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...i}=e,s=XS(wg,n);return d.jsx(Jo,{present:r||jr(s.state)||s.state===!0,children:d.jsx(Ft.span,{"data-state":_g(s.state),"data-disabled":s.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});bg.displayName=wg;var JS=e=>{const{control:t,checked:n,bubbles:r=!0,defaultChecked:i,...s}=e,l=v.useRef(null),u=VS(n),g=mg(t);v.useEffect(()=>{const h=l.current,y=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(y,"checked").set;if(u!==n&&m){const w=new Event("click",{bubbles:r});h.indeterminate=jr(n),m.call(h,jr(n)?!1:n),h.dispatchEvent(w)}},[u,n,r]);const f=v.useRef(jr(n)?!1:n);return d.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:i??f.current,...s,tabIndex:-1,ref:l,style:{...e.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function jr(e){return e==="indeterminate"}function _g(e){return jr(e)?"indeterminate":e?"checked":"unchecked"}var Sg=xg,ZS=bg;const Vc=v.forwardRef(({className:e,...t},n)=>d.jsx(Sg,{ref:n,className:Ve("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:d.jsx(ZS,{className:Ve("s3-explr-ui-checkbox-indicator flex items-center justify-center text-current"),children:d.jsx(O_,{className:"s3-explr-ui-checkbox-check h-4 w-4"})})}));Vc.displayName=Sg.displayName;var QS=v.useId||(()=>{}),eC=0;function Zo(e){const[t,n]=v.useState(QS());return fn(()=>{e||n(r=>r??String(eC++))},[e]),e||(t?`radix-${t}`:"")}function Cg(e,t=globalThis==null?void 0:globalThis.document){const n=qt(e);v.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var tC="DismissableLayer",zc="dismissableLayer.update",nC="dismissableLayer.pointerDownOutside",rC="dismissableLayer.focusOutside",Eg,Tg=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Bc=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:l,onDismiss:u,...g}=e,f=v.useContext(Tg),[h,y]=v.useState(null),x=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=v.useState({}),w=Sn(t,W=>y(W)),_=Array.from(f.layers),[S]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),A=_.indexOf(S),P=h?_.indexOf(h):-1,N=f.layersWithOutsidePointerEventsDisabled.size>0,D=P>=A,E=iC(W=>{const B=W.target,ee=[...f.branches].some(H=>H.contains(B));!D||ee||(i==null||i(W),l==null||l(W),W.defaultPrevented||u==null||u())},x),V=aC(W=>{const B=W.target;[...f.branches].some(H=>H.contains(B))||(s==null||s(W),l==null||l(W),W.defaultPrevented||u==null||u())},x);return Cg(W=>{P===f.layers.size-1&&(r==null||r(W),!W.defaultPrevented&&u&&(W.preventDefault(),u()))},x),v.useEffect(()=>{if(h)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(Eg=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(h)),f.layers.add(h),Pg(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(x.body.style.pointerEvents=Eg)}},[h,x,n,f]),v.useEffect(()=>()=>{h&&(f.layers.delete(h),f.layersWithOutsidePointerEventsDisabled.delete(h),Pg())},[h,f]),v.useEffect(()=>{const W=()=>m({});return document.addEventListener(zc,W),()=>document.removeEventListener(zc,W)},[]),d.jsx(Ft.div,{...g,ref:w,style:{pointerEvents:N?D?"auto":"none":void 0,...e.style},onFocusCapture:Nt(e.onFocusCapture,V.onFocusCapture),onBlurCapture:Nt(e.onBlurCapture,V.onBlurCapture),onPointerDownCapture:Nt(e.onPointerDownCapture,E.onPointerDownCapture)})});Bc.displayName=tC;var oC="DismissableLayerBranch",Ag=v.forwardRef((e,t)=>{const n=v.useContext(Tg),r=v.useRef(null),i=Sn(t,r);return v.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),d.jsx(Ft.div,{...e,ref:i})});Ag.displayName=oC;function iC(e,t=globalThis==null?void 0:globalThis.document){const n=qt(e),r=v.useRef(!1),i=v.useRef(()=>{});return v.useEffect(()=>{const s=u=>{if(u.target&&!r.current){let g=function(){Og(nC,n,f,{discrete:!0})};const f={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=g,t.addEventListener("click",i.current,{once:!0})):g()}else t.removeEventListener("click",i.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",s),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function aC(e,t=globalThis==null?void 0:globalThis.document){const n=qt(e),r=v.useRef(!1);return v.useEffect(()=>{const i=s=>{s.target&&!r.current&&Og(rC,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Pg(){const e=new CustomEvent(zc);document.dispatchEvent(e)}function Og(e,t,n,{discrete:r}){const i=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?yg(i,s):i.dispatchEvent(s)}var sC=Bc,lC=Ag,Uc="focusScope.autoFocusOnMount",jc="focusScope.autoFocusOnUnmount",Ng={bubbles:!1,cancelable:!0},cC="FocusScope",Fg=v.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...l}=e,[u,g]=v.useState(null),f=qt(i),h=qt(s),y=v.useRef(null),x=Sn(t,_=>g(_)),m=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let _=function(N){if(m.paused||!u)return;const D=N.target;u.contains(D)?y.current=D:Wr(y.current,{select:!0})},S=function(N){if(m.paused||!u)return;const D=N.relatedTarget;D!==null&&(u.contains(D)||Wr(y.current,{select:!0}))},A=function(N){if(document.activeElement===document.body)for(const E of N)E.removedNodes.length>0&&Wr(u)};document.addEventListener("focusin",_),document.addEventListener("focusout",S);const P=new MutationObserver(A);return u&&P.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",_),document.removeEventListener("focusout",S),P.disconnect()}}},[r,u,m.paused]),v.useEffect(()=>{if(u){Ig.add(m);const _=document.activeElement;if(!u.contains(_)){const A=new CustomEvent(Uc,Ng);u.addEventListener(Uc,f),u.dispatchEvent(A),A.defaultPrevented||(uC(hC(Dg(u)),{select:!0}),document.activeElement===_&&Wr(u))}return()=>{u.removeEventListener(Uc,f),setTimeout(()=>{const A=new CustomEvent(jc,Ng);u.addEventListener(jc,h),u.dispatchEvent(A),A.defaultPrevented||Wr(_??document.body,{select:!0}),u.removeEventListener(jc,h),Ig.remove(m)},0)}}},[u,f,h,m]);const w=v.useCallback(_=>{if(!n&&!r||m.paused)return;const S=_.key==="Tab"&&!_.altKey&&!_.ctrlKey&&!_.metaKey,A=document.activeElement;if(S&&A){const P=_.currentTarget,[N,D]=dC(P);N&&D?!_.shiftKey&&A===D?(_.preventDefault(),n&&Wr(N,{select:!0})):_.shiftKey&&A===N&&(_.preventDefault(),n&&Wr(D,{select:!0})):A===P&&_.preventDefault()}},[n,r,m.paused]);return d.jsx(Ft.div,{tabIndex:-1,...l,ref:x,onKeyDown:w})});Fg.displayName=cC;function uC(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Wr(r,{select:t}),document.activeElement!==n)return}function dC(e){const t=Dg(e),n=kg(t,e),r=kg(t.reverse(),e);return[n,r]}function Dg(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function kg(e,t){for(const n of e)if(!fC(n,{upTo:t}))return n}function fC(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 pC(e){return e instanceof HTMLInputElement&&"select"in e}function Wr(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&pC(e)&&t&&e.select()}}var Ig=gC();function gC(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Lg(e,t),e.unshift(t)},remove(t){var n;e=Lg(e,t),(n=e[0])==null||n.resume()}}}function Lg(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function hC(e){return e.filter(t=>t.tagName!=="A")}var mC="Portal",Wc=v.forwardRef((e,t)=>{var u;const{container:n,...r}=e,[i,s]=v.useState(!1);fn(()=>s(!0),[]);const l=n||i&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return l?jl.createPortal(d.jsx(Ft.div,{...r,ref:t}),l):null});Wc.displayName=mC;var Hc=0;function vC(){v.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Mg()),document.body.insertAdjacentElement("beforeend",e[1]??Mg()),Hc++,()=>{Hc===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Hc--}},[])}function Mg(){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 rr=function(){return rr=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},rr.apply(this,arguments)};function $g(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function wo(e,t,n,r){function i(s){return s instanceof n?s:new n(function(l){l(s)})}return new(n||(n=Promise))(function(s,l){function u(h){try{f(r.next(h))}catch(y){l(y)}}function g(h){try{f(r.throw(h))}catch(y){l(y)}}function f(h){h.done?s(h.value):i(h.value).then(u,g)}f((r=r.apply(e,t||[])).next())})}function Rg(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],l;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(u){l={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(l)throw l.error}}return s}function Vg(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Ha="right-scroll-bar-position",Ga="width-before-scroll-bar",yC="with-scroll-bars-hidden",xC="--removed-body-scroll-bar-size";function Gc(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function wC(e,t){var n=L.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var bC=typeof window<"u"?v.useLayoutEffect:v.useEffect,zg=new WeakMap;function _C(e,t){var n=wC(null,function(r){return e.forEach(function(i){return Gc(i,r)})});return bC(function(){var r=zg.get(n);if(r){var i=new Set(r),s=new Set(e),l=n.current;i.forEach(function(u){s.has(u)||Gc(u,null)}),s.forEach(function(u){i.has(u)||Gc(u,l)})}zg.set(n,e)},[e]),n}function SC(e){return e}function CC(e,t){t===void 0&&(t=SC);var n=[],r=!1,i={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(s){var l=t(s,r);return n.push(l),function(){n=n.filter(function(u){return u!==l})}},assignSyncMedium:function(s){for(r=!0;n.length;){var l=n;n=[],l.forEach(s)}n={push:function(u){return s(u)},filter:function(){return n}}},assignMedium:function(s){r=!0;var l=[];if(n.length){var u=n;n=[],u.forEach(s),l=n}var g=function(){var h=l;l=[],h.forEach(s)},f=function(){return Promise.resolve().then(g)};f(),n={push:function(h){l.push(h),f()},filter:function(h){return l=l.filter(h),n}}}};return i}function EC(e){e===void 0&&(e={});var t=CC(null);return t.options=rr({async:!0,ssr:!1},e),t}var Bg=function(e){var t=e.sideCar,n=$g(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 v.createElement(r,rr({},n))};Bg.isSideCarExport=!0;function TC(e,t){return e.useMedium(t),Bg}var Ug=EC(),qc=function(){},qa=v.forwardRef(function(e,t){var n=v.useRef(null),r=v.useState({onScrollCapture:qc,onWheelCapture:qc,onTouchMoveCapture:qc}),i=r[0],s=r[1],l=e.forwardProps,u=e.children,g=e.className,f=e.removeScrollBar,h=e.enabled,y=e.shards,x=e.sideCar,m=e.noIsolation,w=e.inert,_=e.allowPinchZoom,S=e.as,A=S===void 0?"div":S,P=e.gapMode,N=$g(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),D=x,E=_C([n,t]),V=rr(rr({},N),i);return v.createElement(v.Fragment,null,h&&v.createElement(D,{sideCar:Ug,removeScrollBar:f,shards:y,noIsolation:m,inert:w,setCallbacks:s,allowPinchZoom:!!_,lockRef:n,gapMode:P}),l?v.cloneElement(v.Children.only(u),rr(rr({},V),{ref:E})):v.createElement(A,rr({},V,{className:g,ref:E}),u))});qa.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},qa.classNames={fullWidth:Ga,zeroRight:Ha};var AC=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function PC(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=AC();return t&&e.setAttribute("nonce",t),e}function OC(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function NC(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var FC=function(){var e=0,t=null;return{add:function(n){e==0&&(t=PC())&&(OC(t,n),NC(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},DC=function(){var e=FC();return function(t,n){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},jg=function(){var e=DC(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},kC={left:0,top:0,right:0,gap:0},Kc=function(e){return parseInt(e||"",10)||0},IC=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[Kc(n),Kc(r),Kc(i)]},LC=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return kC;var t=IC(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])}},MC=jg(),Qo="data-scroll-locked",$C=function(e,t,n,r){var i=e.left,s=e.top,l=e.right,u=e.gap;return n===void 0&&(n="margin"),`
|
|
135
|
+
.`.concat(yC,` {
|
|
110
136
|
overflow: hidden `).concat(r,`;
|
|
111
|
-
padding-right: `).concat(
|
|
137
|
+
padding-right: `).concat(u,"px ").concat(r,`;
|
|
112
138
|
}
|
|
113
|
-
body[`).concat(
|
|
139
|
+
body[`).concat(Qo,`] {
|
|
114
140
|
overflow: hidden `).concat(r,`;
|
|
115
141
|
overscroll-behavior: contain;
|
|
116
142
|
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
117
|
-
padding-left: `.concat(
|
|
118
|
-
padding-top: `).concat(
|
|
119
|
-
padding-right: `).concat(
|
|
143
|
+
padding-left: `.concat(i,`px;
|
|
144
|
+
padding-top: `).concat(s,`px;
|
|
145
|
+
padding-right: `).concat(l,`px;
|
|
120
146
|
margin-left:0;
|
|
121
147
|
margin-top:0;
|
|
122
|
-
margin-right: `).concat(
|
|
123
|
-
`),n==="padding"&&"padding-right: ".concat(
|
|
148
|
+
margin-right: `).concat(u,"px ").concat(r,`;
|
|
149
|
+
`),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
124
150
|
}
|
|
125
151
|
|
|
126
|
-
.`).concat(
|
|
127
|
-
right: `).concat(
|
|
152
|
+
.`).concat(Ha,` {
|
|
153
|
+
right: `).concat(u,"px ").concat(r,`;
|
|
128
154
|
}
|
|
129
155
|
|
|
130
|
-
.`).concat(
|
|
131
|
-
margin-right: `).concat(
|
|
156
|
+
.`).concat(Ga,` {
|
|
157
|
+
margin-right: `).concat(u,"px ").concat(r,`;
|
|
132
158
|
}
|
|
133
159
|
|
|
134
|
-
.`).concat(
|
|
160
|
+
.`).concat(Ha," .").concat(Ha,` {
|
|
135
161
|
right: 0 `).concat(r,`;
|
|
136
162
|
}
|
|
137
163
|
|
|
138
|
-
.`).concat(
|
|
164
|
+
.`).concat(Ga," .").concat(Ga,` {
|
|
139
165
|
margin-right: 0 `).concat(r,`;
|
|
140
166
|
}
|
|
141
167
|
|
|
142
|
-
body[`).concat(
|
|
143
|
-
`).concat(
|
|
168
|
+
body[`).concat(Qo,`] {
|
|
169
|
+
`).concat(xC,": ").concat(u,`px;
|
|
144
170
|
}
|
|
145
|
-
`)},
|
|
171
|
+
`)},Wg=function(){var e=parseInt(document.body.getAttribute(Qo)||"0",10);return isFinite(e)?e:0},RC=function(){v.useEffect(function(){return document.body.setAttribute(Qo,(Wg()+1).toString()),function(){var e=Wg()-1;e<=0?document.body.removeAttribute(Qo):document.body.setAttribute(Qo,e.toString())}},[])},VC=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;RC();var s=v.useMemo(function(){return LC(i)},[i]);return v.createElement(MC,{styles:$C(s,!t,i,n?"":"!important")})},Yc=!1;if(typeof window<"u")try{var Ka=Object.defineProperty({},"passive",{get:function(){return Yc=!0,!0}});window.addEventListener("test",Ka,Ka),window.removeEventListener("test",Ka,Ka)}catch{Yc=!1}var ei=Yc?{passive:!1}:!1,zC=function(e){return e.tagName==="TEXTAREA"},Hg=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!zC(e)&&n[t]==="visible")},BC=function(e){return Hg(e,"overflowY")},UC=function(e){return Hg(e,"overflowX")},Gg=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=qg(e,r);if(i){var s=Kg(e,r),l=s[1],u=s[2];if(l>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},jC=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},WC=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},qg=function(e,t){return e==="v"?BC(t):UC(t)},Kg=function(e,t){return e==="v"?jC(t):WC(t)},HC=function(e,t){return e==="h"&&t==="rtl"?-1:1},GC=function(e,t,n,r,i){var s=HC(e,window.getComputedStyle(t).direction),l=s*r,u=n.target,g=t.contains(u),f=!1,h=l>0,y=0,x=0;do{var m=Kg(e,u),w=m[0],_=m[1],S=m[2],A=_-S-s*w;(w||A)&&qg(e,u)&&(y+=A,x+=w),u instanceof ShadowRoot?u=u.host:u=u.parentNode}while(!g&&u!==document.body||g&&(t.contains(u)||t===u));return(h&&(Math.abs(y)<1||!i)||!h&&(Math.abs(x)<1||!i))&&(f=!0),f},Ya=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Yg=function(e){return[e.deltaX,e.deltaY]},Xg=function(e){return e&&"current"in e?e.current:e},qC=function(e,t){return e[0]===t[0]&&e[1]===t[1]},KC=function(e){return`
|
|
146
172
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
147
173
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
148
|
-
`)},Qy=0,Vn=[];function ex(e){var t=f.useRef([]),n=f.useRef([0,0]),r=f.useRef(),o=f.useState(Qy++)[0],i=f.useState(Wc)[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 v=zc([e.lockRef.current],(e.shards||[]).map(Zc),!0).filter(Boolean);return v.forEach(function(y){return y.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),v.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=f.useCallback(function(v,y){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!a.current.allowPinchZoom;var b=uo(v),w=n.current,S="deltaX"in v?v.deltaX:w[0]-b[0],E="deltaY"in v?v.deltaY:w[1]-b[1],x,N=v.target,I=Math.abs(S)>Math.abs(E)?"h":"v";if("touches"in v&&I==="h"&&N.type==="range")return!1;var M=Kc(I,N);if(!M)return!0;if(M?x=I:(x=I==="v"?"h":"v",M=Kc(I,N)),!M)return!1;if(!r.current&&"changedTouches"in v&&(S||E)&&(r.current=x),!x)return!0;var H=r.current||x;return Xy(H,y,v,H==="h"?S:E,!0)},[]),u=f.useCallback(function(v){var y=v;if(!(!Vn.length||Vn[Vn.length-1]!==i)){var b="deltaY"in y?Jc(y):uo(y),w=t.current.filter(function(x){return x.name===y.type&&(x.target===y.target||y.target===x.shadowParent)&&Jy(x.delta,b)})[0];if(w&&w.should){y.cancelable&&y.preventDefault();return}if(!w){var S=(a.current.shards||[]).map(Zc).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(v,y,b,w){var S={name:v,delta:y,target:b,should:w,shadowParent:tx(b)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(E){return E!==S})},1)},[]),d=f.useCallback(function(v){n.current=uo(v),r.current=void 0},[]),g=f.useCallback(function(v){c(v.type,Jc(v),v.target,s(v,e.lockRef.current))},[]),m=f.useCallback(function(v){c(v.type,uo(v),v.target,s(v,e.lockRef.current))},[]);f.useEffect(function(){return Vn.push(i),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:m}),document.addEventListener("wheel",u,Rn),document.addEventListener("touchmove",u,Rn),document.addEventListener("touchstart",d,Rn),function(){Vn=Vn.filter(function(v){return v!==i}),document.removeEventListener("wheel",u,Rn),document.removeEventListener("touchmove",u,Rn),document.removeEventListener("touchstart",d,Rn)}},[]);var p=e.removeScrollBar,h=e.inert;return f.createElement(f.Fragment,null,h?f.createElement(i,{styles:Zy(o)}):null,p?f.createElement(Hy,{gapMode:e.gapMode}):null)}function tx(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const nx=ky(Uc,ex);var Qc=f.forwardRef(function(e,t){return f.createElement(lo,Tt({},e,{ref:t,sideCar:nx}))});Qc.classNames=lo.classNames;var rx=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},jn=new WeakMap,fo=new WeakMap,po={},ha=0,eu=function(e){return e&&(e.host||eu(e.parentNode))},ox=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=eu(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})},ix=function(e,t,n,r){var o=ox(t,Array.isArray(e)?e:[e]);po[n]||(po[n]=new WeakMap);var i=po[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 p=m.getAttribute(r),h=p!==null&&p!=="false",v=(jn.get(m)||0)+1,y=(i.get(m)||0)+1;jn.set(m,v),i.set(m,y),a.push(m),v===1&&h&&fo.set(m,!0),y===1&&m.setAttribute(n,"true"),h||m.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",m,b)}})};return d(t),s.clear(),ha++,function(){a.forEach(function(g){var m=jn.get(g)-1,p=i.get(g)-1;jn.set(g,m),i.set(g,p),m||(fo.has(g)||g.removeAttribute(r),fo.delete(g)),p||g.removeAttribute(n)}),ha--,ha||(jn=new WeakMap,jn=new WeakMap,fo=new WeakMap,po={})}},ax=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=rx(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),ix(r,o,n,"aria-hidden")):function(){return null}},tu=f.forwardRef((e,t)=>{const{children:n,...r}=e,o=f.Children.toArray(n),i=o.find(lx);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(va,{...r,ref:t,children:f.isValidElement(a)?f.cloneElement(a,void 0,s):null})}return l.jsx(va,{...r,ref:t,children:n})});tu.displayName="Slot";var va=f.forwardRef((e,t)=>{const{children:n,...r}=e;if(f.isValidElement(n)){const o=ux(n);return f.cloneElement(n,{...cx(r,n.props),ref:t?oo(t,o):o})}return f.Children.count(n)>1?f.Children.only(null):null});va.displayName="SlotClone";var sx=({children:e})=>l.jsx(l.Fragment,{children:e});function lx(e){return f.isValidElement(e)&&e.type===sx}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 ux(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 ya="Dialog",[nu,y_]=Qt(ya),[dx,ht]=nu(ya),ru=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]=In({prop:r,defaultProp:o,onChange:i});return l.jsx(dx,{scope:t,triggerRef:s,contentRef:u,contentId:$n(),titleId:$n(),descriptionId:$n(),open:c,onOpenChange:d,onOpenToggle:f.useCallback(()=>d(g=>!g),[d]),modal:a,children:n})};ru.displayName=ya;var ou="DialogTrigger",iu=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ht(ou,n),i=dt(t,o.triggerRef);return l.jsx(Re.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":wa(o.open),...r,ref:i,onClick:Le(e.onClick,o.onOpenToggle)})});iu.displayName=ou;var xa="DialogPortal",[fx,au]=nu(xa,{forceMount:void 0}),su=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=ht(xa,t);return l.jsx(fx,{scope:t,forceMount:n,children:f.Children.map(r,a=>l.jsx(Mn,{present:n||i.open,children:l.jsx(ua,{asChild:!0,container:o,children:a})}))})};su.displayName=xa;var go="DialogOverlay",lu=f.forwardRef((e,t)=>{const n=au(go,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=ht(go,e.__scopeDialog);return i.modal?l.jsx(Mn,{present:r||i.open,children:l.jsx(px,{...o,ref:t})}):null});lu.displayName=go;var px=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ht(go,n);return l.jsx(Qc,{as:tu,allowPinchZoom:!0,shards:[o.contentRef],children:l.jsx(Re.div,{"data-state":wa(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),wn="DialogContent",cu=f.forwardRef((e,t)=>{const n=au(wn,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=ht(wn,e.__scopeDialog);return l.jsx(Mn,{present:r||i.open,children:i.modal?l.jsx(gx,{...o,ref:t}):l.jsx(mx,{...o,ref:t})})});cu.displayName=wn;var gx=f.forwardRef((e,t)=>{const n=ht(wn,e.__scopeDialog),r=f.useRef(null),o=dt(t,n.contentRef,r);return f.useEffect(()=>{const i=r.current;if(i)return ax(i)},[]),l.jsx(uu,{...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())})}),mx=f.forwardRef((e,t)=>{const n=ht(wn,e.__scopeDialog),r=f.useRef(!1),o=f.useRef(!1);return l.jsx(uu,{...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()}})}),uu=f.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=ht(wn,n),u=f.useRef(null),c=dt(t,u);return wy(),l.jsxs(l.Fragment,{children:[l.jsx(Dc,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:l.jsx(sa,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":wa(s.open),...a,ref:c,onDismiss:()=>s.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(hx,{titleId:s.titleId}),l.jsx(yx,{contentRef:u,descriptionId:s.descriptionId})]})]})}),ba="DialogTitle",du=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ht(ba,n);return l.jsx(Re.h2,{id:o.titleId,...r,ref:t})});du.displayName=ba;var fu="DialogDescription",pu=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ht(fu,n);return l.jsx(Re.p,{id:o.descriptionId,...r,ref:t})});pu.displayName=fu;var gu="DialogClose",mu=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ht(gu,n);return l.jsx(Re.button,{type:"button",...r,ref:t,onClick:Le(e.onClick,()=>o.onOpenChange(!1))})});mu.displayName=gu;function wa(e){return e?"open":"closed"}var hu="DialogTitleWarning",[x_,vu]=jv(hu,{contentName:wn,titleName:ba,docsSlug:"dialog"}),hx=({titleId:e})=>{const t=vu(hu),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
174
|
+
`)},YC=0,ti=[];function XC(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),i=v.useState(YC++)[0],s=v.useState(jg)[0],l=v.useRef(e);v.useEffect(function(){l.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var _=Vg([e.lockRef.current],(e.shards||[]).map(Xg),!0).filter(Boolean);return _.forEach(function(S){return S.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),_.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var u=v.useCallback(function(_,S){if("touches"in _&&_.touches.length===2||_.type==="wheel"&&_.ctrlKey)return!l.current.allowPinchZoom;var A=Ya(_),P=n.current,N="deltaX"in _?_.deltaX:P[0]-A[0],D="deltaY"in _?_.deltaY:P[1]-A[1],E,V=_.target,W=Math.abs(N)>Math.abs(D)?"h":"v";if("touches"in _&&W==="h"&&V.type==="range")return!1;var B=Gg(W,V);if(!B)return!0;if(B?E=W:(E=W==="v"?"h":"v",B=Gg(W,V)),!B)return!1;if(!r.current&&"changedTouches"in _&&(N||D)&&(r.current=E),!E)return!0;var ee=r.current||E;return GC(ee,S,_,ee==="h"?N:D,!0)},[]),g=v.useCallback(function(_){var S=_;if(!(!ti.length||ti[ti.length-1]!==s)){var A="deltaY"in S?Yg(S):Ya(S),P=t.current.filter(function(E){return E.name===S.type&&(E.target===S.target||S.target===E.shadowParent)&&qC(E.delta,A)})[0];if(P&&P.should){S.cancelable&&S.preventDefault();return}if(!P){var N=(l.current.shards||[]).map(Xg).filter(Boolean).filter(function(E){return E.contains(S.target)}),D=N.length>0?u(S,N[0]):!l.current.noIsolation;D&&S.cancelable&&S.preventDefault()}}},[]),f=v.useCallback(function(_,S,A,P){var N={name:_,delta:S,target:A,should:P,shadowParent:JC(A)};t.current.push(N),setTimeout(function(){t.current=t.current.filter(function(D){return D!==N})},1)},[]),h=v.useCallback(function(_){n.current=Ya(_),r.current=void 0},[]),y=v.useCallback(function(_){f(_.type,Yg(_),_.target,u(_,e.lockRef.current))},[]),x=v.useCallback(function(_){f(_.type,Ya(_),_.target,u(_,e.lockRef.current))},[]);v.useEffect(function(){return ti.push(s),e.setCallbacks({onScrollCapture:y,onWheelCapture:y,onTouchMoveCapture:x}),document.addEventListener("wheel",g,ei),document.addEventListener("touchmove",g,ei),document.addEventListener("touchstart",h,ei),function(){ti=ti.filter(function(_){return _!==s}),document.removeEventListener("wheel",g,ei),document.removeEventListener("touchmove",g,ei),document.removeEventListener("touchstart",h,ei)}},[]);var m=e.removeScrollBar,w=e.inert;return v.createElement(v.Fragment,null,w?v.createElement(s,{styles:KC(i)}):null,m?v.createElement(VC,{gapMode:e.gapMode}):null)}function JC(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const ZC=TC(Ug,XC);var Jg=v.forwardRef(function(e,t){return v.createElement(qa,rr({},e,{ref:t,sideCar:ZC}))});Jg.classNames=qa.classNames;var QC=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ni=new WeakMap,Xa=new WeakMap,Ja={},Xc=0,Zg=function(e){return e&&(e.host||Zg(e.parentNode))},eE=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Zg(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})},tE=function(e,t,n,r){var i=eE(t,Array.isArray(e)?e:[e]);Ja[n]||(Ja[n]=new WeakMap);var s=Ja[n],l=[],u=new Set,g=new Set(i),f=function(y){!y||u.has(y)||(u.add(y),f(y.parentNode))};i.forEach(f);var h=function(y){!y||g.has(y)||Array.prototype.forEach.call(y.children,function(x){if(u.has(x))h(x);else try{var m=x.getAttribute(r),w=m!==null&&m!=="false",_=(ni.get(x)||0)+1,S=(s.get(x)||0)+1;ni.set(x,_),s.set(x,S),l.push(x),_===1&&w&&Xa.set(x,!0),S===1&&x.setAttribute(n,"true"),w||x.setAttribute(r,"true")}catch(A){console.error("aria-hidden: cannot operate on ",x,A)}})};return h(t),u.clear(),Xc++,function(){l.forEach(function(y){var x=ni.get(y)-1,m=s.get(y)-1;ni.set(y,x),s.set(y,m),x||(Xa.has(y)||y.removeAttribute(r),Xa.delete(y)),m||y.removeAttribute(n)}),Xc--,Xc||(ni=new WeakMap,ni=new WeakMap,Xa=new WeakMap,Ja={})}},nE=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=QC(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),tE(r,i,n,"aria-hidden")):function(){return null}},Qg=v.forwardRef((e,t)=>{const{children:n,...r}=e,i=v.Children.toArray(n),s=i.find(oE);if(s){const l=s.props.children,u=i.map(g=>g===s?v.Children.count(l)>1?v.Children.only(null):v.isValidElement(l)?l.props.children:null:g);return d.jsx(Jc,{...r,ref:t,children:v.isValidElement(l)?v.cloneElement(l,void 0,u):null})}return d.jsx(Jc,{...r,ref:t,children:n})});Qg.displayName="Slot";var Jc=v.forwardRef((e,t)=>{const{children:n,...r}=e;if(v.isValidElement(n)){const i=aE(n);return v.cloneElement(n,{...iE(r,n.props),ref:t?ja(t,i):i})}return v.Children.count(n)>1?v.Children.only(null):null});Jc.displayName="SlotClone";var rE=({children:e})=>d.jsx(d.Fragment,{children:e});function oE(e){return v.isValidElement(e)&&e.type===rE}function iE(e,t){const n={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...u)=>{s(...u),i(...u)}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...e,...n}}function aE(e){var r,i;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=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Zc="Dialog",[eh,kM]=Ur(Zc),[sE,Bn]=eh(Zc),th=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:s,modal:l=!0}=e,u=v.useRef(null),g=v.useRef(null),[f=!1,h]=Xo({prop:r,defaultProp:i,onChange:s});return d.jsx(sE,{scope:t,triggerRef:u,contentRef:g,contentId:Zo(),titleId:Zo(),descriptionId:Zo(),open:f,onOpenChange:h,onOpenToggle:v.useCallback(()=>h(y=>!y),[h]),modal:l,children:n})};th.displayName=Zc;var nh="DialogTrigger",rh=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Bn(nh,n),s=Sn(t,i.triggerRef);return d.jsx(Ft.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":tu(i.open),...r,ref:s,onClick:Nt(e.onClick,i.onOpenToggle)})});rh.displayName=nh;var Qc="DialogPortal",[lE,oh]=eh(Qc,{forceMount:void 0}),ih=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,s=Bn(Qc,t);return d.jsx(lE,{scope:t,forceMount:n,children:v.Children.map(r,l=>d.jsx(Jo,{present:n||s.open,children:d.jsx(Wc,{asChild:!0,container:i,children:l})}))})};ih.displayName=Qc;var Za="DialogOverlay",ah=v.forwardRef((e,t)=>{const n=oh(Za,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,s=Bn(Za,e.__scopeDialog);return s.modal?d.jsx(Jo,{present:r||s.open,children:d.jsx(cE,{...i,ref:t})}):null});ah.displayName=Za;var cE=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Bn(Za,n);return d.jsx(Jg,{as:Qg,allowPinchZoom:!0,shards:[i.contentRef],children:d.jsx(Ft.div,{"data-state":tu(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),bo="DialogContent",sh=v.forwardRef((e,t)=>{const n=oh(bo,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,s=Bn(bo,e.__scopeDialog);return d.jsx(Jo,{present:r||s.open,children:s.modal?d.jsx(uE,{...i,ref:t}):d.jsx(dE,{...i,ref:t})})});sh.displayName=bo;var uE=v.forwardRef((e,t)=>{const n=Bn(bo,e.__scopeDialog),r=v.useRef(null),i=Sn(t,n.contentRef,r);return v.useEffect(()=>{const s=r.current;if(s)return nE(s)},[]),d.jsx(lh,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Nt(e.onCloseAutoFocus,s=>{var l;s.preventDefault(),(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:Nt(e.onPointerDownOutside,s=>{const l=s.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0;(l.button===2||u)&&s.preventDefault()}),onFocusOutside:Nt(e.onFocusOutside,s=>s.preventDefault())})}),dE=v.forwardRef((e,t)=>{const n=Bn(bo,e.__scopeDialog),r=v.useRef(!1),i=v.useRef(!1);return d.jsx(lh,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var l,u;(l=e.onCloseAutoFocus)==null||l.call(e,s),s.defaultPrevented||(r.current||(u=n.triggerRef.current)==null||u.focus(),s.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:s=>{var g,f;(g=e.onInteractOutside)==null||g.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=s.target;((f=n.triggerRef.current)==null?void 0:f.contains(l))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})}),lh=v.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:s,...l}=e,u=Bn(bo,n),g=v.useRef(null),f=Sn(t,g);return vC(),d.jsxs(d.Fragment,{children:[d.jsx(Fg,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:s,children:d.jsx(Bc,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":tu(u.open),...l,ref:f,onDismiss:()=>u.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(fE,{titleId:u.titleId}),d.jsx(gE,{contentRef:g,descriptionId:u.descriptionId})]})]})}),eu="DialogTitle",ch=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Bn(eu,n);return d.jsx(Ft.h2,{id:i.titleId,...r,ref:t})});ch.displayName=eu;var uh="DialogDescription",dh=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Bn(uh,n);return d.jsx(Ft.p,{id:i.descriptionId,...r,ref:t})});dh.displayName=uh;var fh="DialogClose",ph=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Bn(fh,n);return d.jsx(Ft.button,{type:"button",...r,ref:t,onClick:Nt(e.onClick,()=>i.onOpenChange(!1))})});ph.displayName=fh;function tu(e){return e?"open":"closed"}var gh="DialogTitleWarning",[IM,hh]=MS(gh,{contentName:bo,titleName:eu,docsSlug:"dialog"}),fE=({titleId:e})=>{const t=hh(gh),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
149
175
|
|
|
150
176
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
151
177
|
|
|
152
|
-
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},vx="DialogDescriptionWarning",yx=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${vu(vx).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},xx=ru,bx=iu,wx=su,yu=lu,xu=cu,bu=du,wu=pu,Sx=mu;const Ht=xx,mo=bx,Cx=wx,Su=f.forwardRef(({className:e,...t},n)=>l.jsx(yu,{ref:n,className:he("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}));Su.displayName=yu.displayName;const At=f.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(Cx,{children:[l.jsx(Su,{}),l.jsxs(xu,{ref:r,className:he("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(Sx,{className:he("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(qi,{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"})]})]})]}));At.displayName=xu.displayName;const Pt=({className:e,...t})=>l.jsx("div",{className:he("s3-explr-ui-dialog-header flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Pt.displayName="DialogHeader";const Sn=({className:e,...t})=>l.jsx("div",{className:he("s3-explr-ui-dialog-footer flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Sn.displayName="DialogFooter";const Nt=f.forwardRef(({className:e,...t},n)=>l.jsx(bu,{ref:n,className:he("s3-explr-ui-dialog-title text-lg font-semibold leading-none tracking-tight",e),...t}));Nt.displayName=bu.displayName;const zn=f.forwardRef(({className:e,...t},n)=>l.jsx(wu,{ref:n,className:he("s3-explr-ui-dialog-description text-sm text-muted-foreground",e),...t}));zn.displayName=wu.displayName;const nn=f.forwardRef(({className:e,type:t,...n},r)=>l.jsx("input",{type:t,className:he("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 Ex="Label",Cu=f.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())}}));Cu.displayName=Ex;var Eu=Cu;const _x=na("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"}}),Cn=f.forwardRef(({className:e,variant:t,size:n,...r},o)=>l.jsx(Eu,{ref:o,className:he(_x({variant:t,size:n}),e),...r}));Cn.displayName=Eu.displayName;const ho=({className:e,...t})=>l.jsx("nav",{role:"navigation","aria-label":"pagination",className:he("mx-auto flex w-full justify-center",e),...t});ho.displayName="Pagination";const vo=f.forwardRef(({className:e,...t},n)=>l.jsx("ul",{ref:n,className:he("flex flex-row items-center gap-1",e),...t}));vo.displayName="PaginationContent";const vt=f.forwardRef(({className:e,...t},n)=>l.jsx("li",{ref:n,className:he("",e),...t}));vt.displayName="PaginationItem";const Bn=({className:e,isActive:t,size:n="icon",...r})=>l.jsx("a",{"aria-current":t?"page":void 0,className:he(vc({variant:t?"outline":"ghost",size:n}),e),...r});Bn.displayName="PaginationLink";const yo=({className:e,...t})=>l.jsxs(Bn,{"aria-label":"Go to previous page",size:"default",className:he("gap-1 pl-2.5",e),...t,children:[l.jsx(Ih,{className:"h-4 w-4"}),l.jsx("span",{children:"Previous"})]});yo.displayName="PaginationPrevious";const xo=({className:e,...t})=>l.jsxs(Bn,{"aria-label":"Go to next page",size:"default",className:he("gap-1 pr-2.5",e),...t,children:[l.jsx("span",{children:"Next"}),l.jsx(Yl,{className:"h-4 w-4"})]});xo.displayName="PaginationNext";const bo=({className:e,...t})=>l.jsxs("span",{"aria-hidden":!0,className:he("flex h-9 w-9 items-center justify-center",e),...t,children:[l.jsx(Mh,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"More pages"})]});bo.displayName="PaginationEllipsis";const wo=f.forwardRef(({className:e,...t},n)=>l.jsx("div",{className:he("relative w-full overflow-auto","s3-explr-ui-table-container"),children:l.jsx("table",{ref:n,className:he("w-full caption-bottom text-sm","s3-explr-ui-table",e),...t})}));wo.displayName="Table";const So=f.forwardRef(({className:e,...t},n)=>l.jsx("thead",{ref:n,className:he("[&_tr]:border-b","s3-explr-ui-table-header",e),...t}));So.displayName="TableHeader";const Co=f.forwardRef(({className:e,...t},n)=>l.jsx("tbody",{ref:n,className:he("[&_tr:last-child]:border-0","s3-explr-ui-table-body",e),...t}));Co.displayName="TableBody";const Tx=f.forwardRef(({className:e,...t},n)=>l.jsx("tfoot",{ref:n,className:he("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0","s3-explr-ui-table-footer",e),...t}));Tx.displayName="TableFooter";const yt=f.forwardRef(({className:e,...t},n)=>l.jsx("tr",{ref:n,className:he("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted","s3-explr-ui-table-row",e),...t}));yt.displayName="TableRow";const kt=f.forwardRef(({className:e,...t},n)=>l.jsx("th",{ref:n,className:he("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}));kt.displayName="TableHead";const Ze=f.forwardRef(({className:e,...t},n)=>l.jsx("td",{ref:n,className:he("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]","s3-explr-ui-table-cell",e),...t}));Ze.displayName="TableCell";const Ax=f.forwardRef(({className:e,...t},n)=>l.jsx("caption",{ref:n,className:he("mt-4 text-sm text-muted-foreground","s3-explr-ui-table-caption",e),...t}));Ax.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 Hn(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 _u(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ca(...e){return t=>{let n=!1;const r=e.map(o=>{const i=_u(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():_u(e[o],null)}}}}function Ea(...e){return f.useCallback(Ca(...e),e)}var _a=f.forwardRef((e,t)=>{const{children:n,...r}=e,o=f.Children.toArray(n),i=o.find(Nx);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(Ta,{...r,ref:t,children:f.isValidElement(a)?f.cloneElement(a,void 0,s):null})}return l.jsx(Ta,{...r,ref:t,children:n})});_a.displayName="Slot";var Ta=f.forwardRef((e,t)=>{const{children:n,...r}=e;if(f.isValidElement(n)){const o=Ox(n);return f.cloneElement(n,{...kx(r,n.props),ref:t?Ca(t,o):o})}return f.Children.count(n)>1?f.Children.only(null):null});Ta.displayName="SlotClone";var Px=({children:e})=>l.jsx(l.Fragment,{children:e});function Nx(e){return f.isValidElement(e)&&e.type===Px}function kx(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 Ox(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 Fx(e){const t=e+"CollectionProvider",[n,r]=Qt(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=p=>{const{scope:h,children:v}=p,y=_.useRef(null),b=_.useRef(new Map).current;return l.jsx(o,{scope:h,itemMap:b,collectionRef:y,children:v})};a.displayName=t;const s=e+"CollectionSlot",u=_.forwardRef((p,h)=>{const{scope:v,children:y}=p,b=i(s,v),w=Ea(h,b.collectionRef);return l.jsx(_a,{ref:w,children:y})});u.displayName=s;const c=e+"CollectionItemSlot",d="data-radix-collection-item",g=_.forwardRef((p,h)=>{const{scope:v,children:y,...b}=p,w=_.useRef(null),S=Ea(h,w),E=i(c,v);return _.useEffect(()=>(E.itemMap.set(w,{ref:w,...b}),()=>void E.itemMap.delete(w))),l.jsx(_a,{[d]:"",ref:S,children:y})});g.displayName=c;function m(p){const h=i(e+"CollectionConsumer",p);return _.useCallback(()=>{const y=h.collectionRef.current;if(!y)return[];const b=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(h.itemMap.values()).sort((E,x)=>b.indexOf(E.ref.current)-b.indexOf(x.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:a,Slot:u,ItemSlot:g},m,r]}var Tu=f.forwardRef((e,t)=>{const{children:n,...r}=e,o=f.Children.toArray(n),i=o.find(Ix);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(Aa,{...r,ref:t,children:f.isValidElement(a)?f.cloneElement(a,void 0,s):null})}return l.jsx(Aa,{...r,ref:t,children:n})});Tu.displayName="Slot";var Aa=f.forwardRef((e,t)=>{const{children:n,...r}=e;if(f.isValidElement(n)){const o=$x(n);return f.cloneElement(n,{...Mx(r,n.props),ref:t?Ca(t,o):o})}return f.Children.count(n)>1?f.Children.only(null):null});Aa.displayName="SlotClone";var Dx=({children:e})=>l.jsx(l.Fragment,{children:e});function Ix(e){return f.isValidElement(e)&&e.type===Dx}function Mx(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 $x(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 Lx=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Au=Lx.reduce((e,t)=>{const n=f.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?Tu: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}},{}),Rx=f.createContext(void 0);function Pu(e){const t=f.useContext(Rx);return e||t||"ltr"}var Pa="rovingFocusGroup.onEntryFocus",Vx={bubbles:!1,cancelable:!0},Eo="RovingFocusGroup",[Na,Nu,jx]=Fx(Eo),[zx,ku]=Qt(Eo,[jx]),[Bx,Hx]=zx(Eo),Ou=f.forwardRef((e,t)=>l.jsx(Na.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(Na.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(Ux,{...e,ref:t})})}));Ou.displayName=Eo;var Ux=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,m=f.useRef(null),p=Ea(t,m),h=Pu(i),[v=null,y]=In({prop:a,defaultProp:s,onChange:u}),[b,w]=f.useState(!1),S=qe(c),E=Nu(n),x=f.useRef(!1),[N,I]=f.useState(0);return f.useEffect(()=>{const M=m.current;if(M)return M.addEventListener(Pa,S),()=>M.removeEventListener(Pa,S)},[S]),l.jsx(Bx,{scope:n,orientation:r,dir:h,loop:o,currentTabStopId:v,onItemFocus:f.useCallback(M=>y(M),[y]),onItemShiftTab:f.useCallback(()=>w(!0),[]),onFocusableItemAdd:f.useCallback(()=>I(M=>M+1),[]),onFocusableItemRemove:f.useCallback(()=>I(M=>M-1),[]),children:l.jsx(Au.div,{tabIndex:b||N===0?-1:0,"data-orientation":r,...g,ref:p,style:{outline:"none",...e.style},onMouseDown:Hn(e.onMouseDown,()=>{x.current=!0}),onFocus:Hn(e.onFocus,M=>{const H=!x.current;if(M.target===M.currentTarget&&H&&!b){const O=new CustomEvent(Pa,Vx);if(M.currentTarget.dispatchEvent(O),!O.defaultPrevented){const G=E().filter(F=>F.focusable),W=G.find(F=>F.active),Z=G.find(F=>F.id===v),$=[W,Z,...G].filter(Boolean).map(F=>F.ref.current);Iu($,d)}}x.current=!1}),onBlur:Hn(e.onBlur,()=>w(!1))})})}),Fu="RovingFocusGroupItem",Du=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...a}=e,s=$n(),u=i||s,c=Hx(Fu,n),d=c.currentTabStopId===u,g=Nu(n),{onFocusableItemAdd:m,onFocusableItemRemove:p}=c;return f.useEffect(()=>{if(r)return m(),()=>p()},[r,m,p]),l.jsx(Na.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:l.jsx(Au.span,{tabIndex:d?0:-1,"data-orientation":c.orientation,...a,ref:t,onMouseDown:Hn(e.onMouseDown,h=>{r?c.onItemFocus(u):h.preventDefault()}),onFocus:Hn(e.onFocus,()=>c.onItemFocus(u)),onKeyDown:Hn(e.onKeyDown,h=>{if(h.key==="Tab"&&h.shiftKey){c.onItemShiftTab();return}if(h.target!==h.currentTarget)return;const v=Gx(h,c.orientation,c.dir);if(v!==void 0){if(h.metaKey||h.ctrlKey||h.altKey||h.shiftKey)return;h.preventDefault();let b=g().filter(w=>w.focusable).map(w=>w.ref.current);if(v==="last")b.reverse();else if(v==="prev"||v==="next"){v==="prev"&&b.reverse();const w=b.indexOf(h.currentTarget);b=c.loop?Kx(b,w+1):b.slice(w+1)}setTimeout(()=>Iu(b))}})})})});Du.displayName=Fu;var Wx={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function qx(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Gx(e,t,n){const r=qx(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Wx[r]}function Iu(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Kx(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Yx=Ou,Xx=Du;function Mu(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Jx(...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)}}}}function Zx(...e){return f.useCallback(Jx(...e),e)}function Qx(e,t){return f.useReducer((n,r)=>t[n][r]??n,e)}var $u=e=>{const{present:t,children:n}=e,r=eb(t),o=typeof n=="function"?n({present:r.isPresent}):f.Children.only(n),i=Zx(r.ref,tb(o));return typeof n=="function"||r.isPresent?f.cloneElement(o,{ref:i}):null};$u.displayName="Presence";function eb(e){const[t,n]=f.useState(),r=f.useRef({}),o=f.useRef(e),i=f.useRef("none"),a=e?"mounted":"unmounted",[s,u]=Qx(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const c=_o(r.current);i.current=s==="mounted"?c:"none"},[s]),it(()=>{const c=r.current,d=o.current;if(d!==e){const m=i.current,p=_o(c);e?u("MOUNT"):p==="none"||(c==null?void 0:c.display)==="none"?u("UNMOUNT"):u(d&&m!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),it(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,g=p=>{const v=_o(r.current).includes(p.animationName);if(p.target===t&&v&&(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=p=>{p.target===t&&(i.current=_o(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:f.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function _o(e){return(e==null?void 0:e.animationName)||"none"}function tb(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 Lu(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function nb(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Lu(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():Lu(e[o],null)}}}}var Ru=f.forwardRef((e,t)=>{const{children:n,...r}=e,o=f.Children.toArray(n),i=o.find(ob);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(ka,{...r,ref:t,children:f.isValidElement(a)?f.cloneElement(a,void 0,s):null})}return l.jsx(ka,{...r,ref:t,children:n})});Ru.displayName="Slot";var ka=f.forwardRef((e,t)=>{const{children:n,...r}=e;if(f.isValidElement(n)){const o=ab(n);return f.cloneElement(n,{...ib(r,n.props),ref:t?nb(t,o):o})}return f.Children.count(n)>1?f.Children.only(null):null});ka.displayName="SlotClone";var rb=({children:e})=>l.jsx(l.Fragment,{children:e});function ob(e){return f.isValidElement(e)&&e.type===rb}function ib(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 ab(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 sb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],To=sb.reduce((e,t)=>{const n=f.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?Ru: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}},{}),Oa="Tabs",[lb,b_]=Qt(Oa,[ku]),Vu=ku(),[cb,Fa]=lb(Oa),ju=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:i,orientation:a="horizontal",dir:s,activationMode:u="automatic",...c}=e,d=Pu(s),[g,m]=In({prop:r,onChange:o,defaultProp:i});return l.jsx(cb,{scope:n,baseId:$n(),value:g,onValueChange:m,orientation:a,dir:d,activationMode:u,children:l.jsx(To.div,{dir:d,"data-orientation":a,...c,ref:t})})});ju.displayName=Oa;var zu="TabsList",Bu=f.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,i=Fa(zu,n),a=Vu(n);return l.jsx(Yx,{asChild:!0,...a,orientation:i.orientation,dir:i.dir,loop:r,children:l.jsx(To.div,{role:"tablist","aria-orientation":i.orientation,...o,ref:t})})});Bu.displayName=zu;var Hu="TabsTrigger",Uu=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...i}=e,a=Fa(Hu,n),s=Vu(n),u=Gu(a.baseId,r),c=Ku(a.baseId,r),d=r===a.value;return l.jsx(Xx,{asChild:!0,...s,focusable:!o,active:d,children:l.jsx(To.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)})})})});Uu.displayName=Hu;var Wu="TabsContent",qu=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:i,...a}=e,s=Fa(Wu,n),u=Gu(s.baseId,r),c=Ku(s.baseId,r),d=r===s.value,g=f.useRef(d);return f.useEffect(()=>{const m=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(m)},[]),l.jsx($u,{present:o||d,children:({present:m})=>l.jsx(To.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})})});qu.displayName=Wu;function Gu(e,t){return`${e}-trigger-${t}`}function Ku(e,t){return`${e}-content-${t}`}var ub=ju,Yu=Bu,Xu=Uu,Ju=qu;const db=ub,Zu=f.forwardRef(({className:e,...t},n)=>l.jsx(Yu,{ref:n,className:he("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));Zu.displayName=Yu.displayName;const Ao=f.forwardRef(({className:e,...t},n)=>l.jsx(Xu,{ref:n,className:he("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}));Ao.displayName=Xu.displayName;const Po=f.forwardRef(({className:e,...t},n)=>l.jsx(Ju,{ref:n,className:he("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Po.displayName=Ju.displayName;const mr=f.forwardRef(({className:e,...t},n)=>l.jsx("textarea",{className:he("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}));mr.displayName="Textarea";function fb(e,t=[]){let n=[];function r(i,a){const s=f.createContext(a),u=n.length;n=[...n,a];function c(g){const{scope:m,children:p,...h}=g,v=(m==null?void 0:m[e][u])||s,y=f.useMemo(()=>h,Object.values(h));return l.jsx(v.Provider,{value:y,children:p})}function d(g,m){const p=(m==null?void 0:m[e][u])||s,h=f.useContext(p);if(h)return h;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,pb(o,...t)]}function pb(...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 Da=f.forwardRef((e,t)=>{const{children:n,...r}=e,o=f.Children.toArray(n),i=o.find(mb);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(Ia,{...r,ref:t,children:f.isValidElement(a)?f.cloneElement(a,void 0,s):null})}return l.jsx(Ia,{...r,ref:t,children:n})});Da.displayName="Slot";var Ia=f.forwardRef((e,t)=>{const{children:n,...r}=e;if(f.isValidElement(n)){const o=vb(n);return f.cloneElement(n,{...hb(r,n.props),ref:t?oo(t,o):o})}return f.Children.count(n)>1?f.Children.only(null):null});Ia.displayName="SlotClone";var gb=({children:e})=>l.jsx(l.Fragment,{children:e});function mb(e){return f.isValidElement(e)&&e.type===gb}function hb(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 vb(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 yb(e){const t=e+"CollectionProvider",[n,r]=fb(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=p=>{const{scope:h,children:v}=p,y=_.useRef(null),b=_.useRef(new Map).current;return l.jsx(o,{scope:h,itemMap:b,collectionRef:y,children:v})};a.displayName=t;const s=e+"CollectionSlot",u=_.forwardRef((p,h)=>{const{scope:v,children:y}=p,b=i(s,v),w=dt(h,b.collectionRef);return l.jsx(Da,{ref:w,children:y})});u.displayName=s;const c=e+"CollectionItemSlot",d="data-radix-collection-item",g=_.forwardRef((p,h)=>{const{scope:v,children:y,...b}=p,w=_.useRef(null),S=dt(h,w),E=i(c,v);return _.useEffect(()=>(E.itemMap.set(w,{ref:w,...b}),()=>void E.itemMap.delete(w))),l.jsx(Da,{[d]:"",ref:S,children:y})});g.displayName=c;function m(p){const h=i(e+"CollectionConsumer",p);return _.useCallback(()=>{const y=h.collectionRef.current;if(!y)return[];const b=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(h.itemMap.values()).sort((E,x)=>b.indexOf(E.ref.current)-b.indexOf(x.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:a,Slot:u,ItemSlot:g},m,r]}var xb="VisuallyHidden",Ma=f.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}}));Ma.displayName=xb;var $a="ToastProvider",[La,bb,wb]=yb("Toast"),[Qu,w_]=Qt("Toast",[wb]),[Sb,No]=Qu($a),ed=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),m=f.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${$a}\`. Expected non-empty \`string\`.`),l.jsx(La.Provider,{scope:t,children:l.jsx(Sb,{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:m,children:a})})};ed.displayName=$a;var td="ToastViewport",Cb=["F8"],Ra="toast.viewportPause",Va="toast.viewportResume",nd=f.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=Cb,label:o="Notifications ({hotkey})",...i}=e,a=No(td,n),s=bb(n),u=f.useRef(null),c=f.useRef(null),d=f.useRef(null),g=f.useRef(null),m=dt(t,g,a.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),h=a.toastCount>0;f.useEffect(()=>{const y=b=>{var S;r.length!==0&&r.every(E=>b[E]||b.code===E)&&((S=g.current)==null||S.focus())};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[r]),f.useEffect(()=>{const y=u.current,b=g.current;if(h&&y&&b){const w=()=>{if(!a.isClosePausedRef.current){const N=new CustomEvent(Ra);b.dispatchEvent(N),a.isClosePausedRef.current=!0}},S=()=>{if(a.isClosePausedRef.current){const N=new CustomEvent(Va);b.dispatchEvent(N),a.isClosePausedRef.current=!1}},E=N=>{!y.contains(N.relatedTarget)&&S()},x=()=>{y.contains(document.activeElement)||S()};return y.addEventListener("focusin",w),y.addEventListener("focusout",E),y.addEventListener("pointermove",w),y.addEventListener("pointerleave",x),window.addEventListener("blur",w),window.addEventListener("focus",S),()=>{y.removeEventListener("focusin",w),y.removeEventListener("focusout",E),y.removeEventListener("pointermove",w),y.removeEventListener("pointerleave",x),window.removeEventListener("blur",w),window.removeEventListener("focus",S)}}},[h,a.isClosePausedRef]);const v=f.useCallback(({tabbingDirection:y})=>{const w=s().map(S=>{const E=S.ref.current,x=[E,...$b(E)];return y==="forwards"?x:x.reverse()});return(y==="forwards"?w.reverse():w).flat()},[s]);return f.useEffect(()=>{const y=g.current;if(y){const b=w=>{var x,N,I;const S=w.altKey||w.ctrlKey||w.metaKey;if(w.key==="Tab"&&!S){const M=document.activeElement,H=w.shiftKey;if(w.target===y&&H){(x=c.current)==null||x.focus();return}const W=v({tabbingDirection:H?"backwards":"forwards"}),Z=W.findIndex(k=>k===M);Ba(W.slice(Z+1))?w.preventDefault():H?(N=c.current)==null||N.focus():(I=d.current)==null||I.focus()}};return y.addEventListener("keydown",b),()=>y.removeEventListener("keydown",b)}},[s,v]),l.jsxs(fy,{ref:u,role:"region","aria-label":o.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:h?void 0:"none"},children:[h&&l.jsx(ja,{ref:c,onFocusFromOutsideViewport:()=>{const y=v({tabbingDirection:"forwards"});Ba(y)}}),l.jsx(La.Slot,{scope:n,children:l.jsx(Re.ol,{tabIndex:-1,...i,ref:m})}),h&&l.jsx(ja,{ref:d,onFocusFromOutsideViewport:()=>{const y=v({tabbingDirection:"backwards"});Ba(y)}})]})});nd.displayName=td;var rd="ToastFocusProxy",ja=f.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=No(rd,n);return l.jsx(Ma,{"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()}})});ja.displayName=rd;var ko="Toast",Eb="toast.swipeStart",_b="toast.swipeMove",Tb="toast.swipeCancel",Ab="toast.swipeEnd",od=f.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s=!0,u]=In({prop:r,defaultProp:o,onChange:i});return l.jsx(Mn,{present:n||s,children:l.jsx(kb,{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)})})})});od.displayName=ko;var[Pb,Nb]=Qu(ko,{onClose(){}}),kb=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:m,onSwipeEnd:p,...h}=e,v=No(ko,n),[y,b]=f.useState(null),w=dt(t,k=>b(k)),S=f.useRef(null),E=f.useRef(null),x=o||v.duration,N=f.useRef(0),I=f.useRef(x),M=f.useRef(0),{onToastAdd:H,onToastRemove:O}=v,G=qe(()=>{var $;(y==null?void 0:y.contains(document.activeElement))&&(($=v.viewport)==null||$.focus()),a()}),W=f.useCallback(k=>{!k||k===1/0||(window.clearTimeout(M.current),N.current=new Date().getTime(),M.current=window.setTimeout(G,k))},[G]);f.useEffect(()=>{const k=v.viewport;if(k){const $=()=>{W(I.current),c==null||c()},F=()=>{const U=new Date().getTime()-N.current;I.current=I.current-U,window.clearTimeout(M.current),u==null||u()};return k.addEventListener(Ra,F),k.addEventListener(Va,$),()=>{k.removeEventListener(Ra,F),k.removeEventListener(Va,$)}}},[v.viewport,x,u,c,W]),f.useEffect(()=>{i&&!v.isClosePausedRef.current&&W(x)},[i,x,v.isClosePausedRef,W]),f.useEffect(()=>(H(),()=>O()),[H,O]);const Z=f.useMemo(()=>y?dd(y):null,[y]);return v.viewport?l.jsxs(l.Fragment,{children:[Z&&l.jsx(Ob,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:Z}),l.jsx(Pb,{scope:n,onClose:G,children:Rr.createPortal(l.jsx(La.ItemSlot,{scope:n,children:l.jsx(dy,{asChild:!0,onEscapeKeyDown:Le(s,()=>{v.isFocusedToastEscapeKeyDownRef.current||G(),v.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":v.swipeDirection,...h,ref:w,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Le(e.onKeyDown,k=>{k.key==="Escape"&&(s==null||s(k.nativeEvent),k.nativeEvent.defaultPrevented||(v.isFocusedToastEscapeKeyDownRef.current=!0,G()))}),onPointerDown:Le(e.onPointerDown,k=>{k.button===0&&(S.current={x:k.clientX,y:k.clientY})}),onPointerMove:Le(e.onPointerMove,k=>{if(!S.current)return;const $=k.clientX-S.current.x,F=k.clientY-S.current.y,U=!!E.current,j=["left","right"].includes(v.swipeDirection),R=["left","up"].includes(v.swipeDirection)?Math.min:Math.max,A=j?R(0,$):0,B=j?0:R(0,F),Q=k.pointerType==="touch"?10:2,ne={x:A,y:B},te={originalEvent:k,delta:ne};U?(E.current=ne,Oo(_b,g,te,{discrete:!1})):fd(ne,v.swipeDirection,Q)?(E.current=ne,Oo(Eb,d,te,{discrete:!1}),k.target.setPointerCapture(k.pointerId)):(Math.abs($)>Q||Math.abs(F)>Q)&&(S.current=null)}),onPointerUp:Le(e.onPointerUp,k=>{const $=E.current,F=k.target;if(F.hasPointerCapture(k.pointerId)&&F.releasePointerCapture(k.pointerId),E.current=null,S.current=null,$){const U=k.currentTarget,j={originalEvent:k,delta:$};fd($,v.swipeDirection,v.swipeThreshold)?Oo(Ab,p,j,{discrete:!0}):Oo(Tb,m,j,{discrete:!0}),U.addEventListener("click",R=>R.preventDefault(),{once:!0})}})})})}),v.viewport)})]}):null}),Ob=e=>{const{__scopeToast:t,children:n,...r}=e,o=No(ko,t),[i,a]=f.useState(!1),[s,u]=f.useState(!1);return Ib(()=>a(!0)),f.useEffect(()=>{const c=window.setTimeout(()=>u(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:l.jsx(ua,{asChild:!0,children:l.jsx(Ma,{...r,children:i&&l.jsxs(l.Fragment,{children:[o.label," ",n]})})})},Fb="ToastTitle",id=f.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return l.jsx(Re.div,{...r,ref:t})});id.displayName=Fb;var Db="ToastDescription",ad=f.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return l.jsx(Re.div,{...r,ref:t})});ad.displayName=Db;var sd="ToastAction",ld=f.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?l.jsx(ud,{altText:n,asChild:!0,children:l.jsx(za,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${sd}\`. Expected non-empty \`string\`.`),null)});ld.displayName=sd;var cd="ToastClose",za=f.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=Nb(cd,n);return l.jsx(ud,{asChild:!0,children:l.jsx(Re.button,{type:"button",...r,ref:t,onClick:Le(e.onClick,o.onClose)})})});za.displayName=cd;var ud=f.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 dd(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),Mb(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(...dd(r))}}),t}function Oo(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?bc(o,i):o.dispatchEvent(i)}var fd=(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 Ib(e=()=>{}){const t=qe(e);it(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function Mb(e){return e.nodeType===e.ELEMENT_NODE}function $b(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 Ba(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var Lb=ed,pd=nd,gd=od,md=id,hd=ad,vd=ld,yd=za;const Rb=Lb,xd=f.forwardRef(({className:e,...t},n)=>l.jsx(pd,{ref:n,className:he("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}));xd.displayName=pd.displayName;const Vb=na("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"}}),bd=f.forwardRef(({className:e,variant:t,...n},r)=>l.jsx(gd,{ref:r,className:he(Vb({variant:t}),e),...n}));bd.displayName=gd.displayName;const jb=f.forwardRef(({className:e,...t},n)=>l.jsx(vd,{ref:n,className:he("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}));jb.displayName=vd.displayName;const wd=f.forwardRef(({className:e,...t},n)=>l.jsx(yd,{ref:n,className:he("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(qi,{className:"s3-explr-ui-toast-close-icon h-4 w-4"})}));wd.displayName=yd.displayName;const Sd=f.forwardRef(({className:e,...t},n)=>l.jsx(md,{ref:n,className:he("s3-explr-ui-toast-title text-sm font-semibold [&+div]:text-xs",e),...t}));Sd.displayName=md.displayName;const Cd=f.forwardRef(({className:e,...t},n)=>l.jsx(hd,{ref:n,className:he("text-sm opacity-90 font-bold",e),...t}));Cd.displayName=hd.displayName;const zb=1,Bb=1e6;let Ha=0;function Hb(){return Ha=(Ha+1)%Number.MAX_SAFE_INTEGER,Ha.toString()}const Ua=new Map,Ed=e=>{if(Ua.has(e))return;const t=setTimeout(()=>{Ua.delete(e),hr({type:"REMOVE_TOAST",toastId:e})},Bb);Ua.set(e,t)},Ub=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,zb)};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?Ed(n):e.toasts.forEach(r=>{Ed(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)}}},Fo=[];let Do={toasts:[]};function hr(e){Do=Ub(Do,e),Fo.forEach(t=>{t(Do)})}function Wb({...e}){const t=Hb(),n=o=>hr({type:"UPDATE_TOAST",toast:{...o,id:t}}),r=()=>hr({type:"DISMISS_TOAST",toastId:t});return hr({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||r()}}}),{id:t,dismiss:r,update:n}}function Io(){const[e,t]=f.useState(Do);return f.useEffect(()=>(Fo.push(t),()=>{const n=Fo.indexOf(t);n>-1&&Fo.splice(n,1)}),[e]),{...e,toast:Wb,dismiss:n=>hr({type:"DISMISS_TOAST",toastId:n})}}function _d(){const{toasts:e}=Io();return l.jsxs(Rb,{children:[e.map(function({id:t,title:n,description:r,action:o,...i}){return l.jsxs(bd,{...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(Sd,{className:"s3-explr-ui-toast-title",children:n}),r&&l.jsx(Cd,{className:"s3-explr-ui-toast-description",children:r})]}),o&&l.jsx("div",{className:"s3-explr-ui-toast-action",children:o}),l.jsx(wd,{className:"s3-explr-ui-toast-close"})]},t)}),l.jsx(xd,{className:"s3-explr-ui-toast-viewport"})]})}function Ut(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 Td(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function qb(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Td(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():Td(e[o],null)}}}}function vr(...e){return f.useCallback(qb(...e),e)}var Gb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],yr=Gb.reduce((e,t)=>{const n=f.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?On: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 Kb(e,t){e&&Rr.flushSync(()=>e.dispatchEvent(t))}var Yb="DismissableLayer",Wa="dismissableLayer.update",Xb="dismissableLayer.pointerDownOutside",Jb="dismissableLayer.focusOutside",Ad,Pd=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Nd=f.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...u}=e,c=f.useContext(Pd),[d,g]=f.useState(null),m=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=f.useState({}),h=vr(t,I=>g(I)),v=Array.from(c.layers),[y]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),b=v.indexOf(y),w=d?v.indexOf(d):-1,S=c.layersWithOutsidePointerEventsDisabled.size>0,E=w>=b,x=ew(I=>{const M=I.target,H=[...c.branches].some(O=>O.contains(M));!E||H||(o==null||o(I),a==null||a(I),I.defaultPrevented||s==null||s())},m),N=tw(I=>{const M=I.target;[...c.branches].some(O=>O.contains(M))||(i==null||i(I),a==null||a(I),I.defaultPrevented||s==null||s())},m);return Tc(I=>{w===c.layers.size-1&&(r==null||r(I),!I.defaultPrevented&&s&&(I.preventDefault(),s()))},m),f.useEffect(()=>{if(d)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Ad=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),kd(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Ad)}},[d,m,n,c]),f.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),kd())},[d,c]),f.useEffect(()=>{const I=()=>p({});return document.addEventListener(Wa,I),()=>document.removeEventListener(Wa,I)},[]),l.jsx(yr.div,{...u,ref:h,style:{pointerEvents:S?E?"auto":"none":void 0,...e.style},onFocusCapture:Ut(e.onFocusCapture,N.onFocusCapture),onBlurCapture:Ut(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:Ut(e.onPointerDownCapture,x.onPointerDownCapture)})});Nd.displayName=Yb;var Zb="DismissableLayerBranch",Qb=f.forwardRef((e,t)=>{const n=f.useContext(Pd),r=f.useRef(null),o=vr(t,r);return f.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),l.jsx(yr.div,{...e,ref:o})});Qb.displayName=Zb;function ew(e,t=globalThis==null?void 0:globalThis.document){const n=qe(e),r=f.useRef(!1),o=f.useRef(()=>{});return f.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let u=function(){Od(Xb,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 tw(e,t=globalThis==null?void 0:globalThis.document){const n=qe(e),r=f.useRef(!1);return f.useEffect(()=>{const o=i=>{i.target&&!r.current&&Od(Jb,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 kd(){const e=new CustomEvent(Wa);document.dispatchEvent(e)}function Od(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?Kb(o,i):o.dispatchEvent(i)}const nw=["top","right","bottom","left"],rn=Math.min,at=Math.max,Mo=Math.round,$o=Math.floor,Ot=e=>({x:e,y:e}),rw={left:"right",right:"left",bottom:"top",top:"bottom"},ow={start:"end",end:"start"};function qa(e,t,n){return at(e,rn(t,n))}function Wt(e,t){return typeof e=="function"?e(t):e}function qt(e){return e.split("-")[0]}function Un(e){return e.split("-")[1]}function Ga(e){return e==="x"?"y":"x"}function Ka(e){return e==="y"?"height":"width"}function on(e){return["top","bottom"].includes(qt(e))?"y":"x"}function Ya(e){return Ga(on(e))}function iw(e,t,n){n===void 0&&(n=!1);const r=Un(e),o=Ya(e),i=Ka(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Lo(a)),[a,Lo(a)]}function aw(e){const t=Lo(e);return[Xa(e),t,Xa(t)]}function Xa(e){return e.replace(/start|end/g,t=>ow[t])}function sw(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 lw(e,t,n,r){const o=Un(e);let i=sw(qt(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Xa)))),i}function Lo(e){return e.replace(/left|right|bottom|top/g,t=>rw[t])}function cw(e){return{top:0,right:0,bottom:0,left:0,...e}}function Fd(e){return typeof e!="number"?cw(e):{top:e,right:e,bottom:e,left:e}}function Ro(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=on(t),a=Ya(t),s=Ka(a),u=qt(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 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(Un(t)){case"start":p[a]-=m*(n&&c?-1:1);break;case"end":p[a]+=m*(n&&c?-1:1);break}return p}const uw=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),m=r,p={},h=0;for(let v=0;v<s.length;v++){const{name:y,fn:b}=s[v],{x:w,y:S,data:E,reset:x}=await b({x:d,y:g,initialPlacement:r,placement:m,strategy:o,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});d=w??d,g=S??g,p={...p,[y]:{...p[y],...E}},x&&h<=50&&(h++,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}=Dd(c,m,u)),v=-1)}return{x:d,y:g,placement:m,strategy:o,middlewareData:p}};async function xr(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:p=0}=Wt(t,e),h=Fd(p),y=s[m?g==="floating"?"reference":"floating":g],b=Ro(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,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=Ro(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:S,strategy:u}):w);return{top:(b.top-x.top+h.top)/E.y,bottom:(x.bottom-b.bottom+h.bottom)/E.y,left:(b.left-x.left+h.left)/E.x,right:(x.right-b.right+h.right)/E.x}}const dw=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}=Wt(e,t)||{};if(c==null)return{};const g=Fd(d),m={x:n,y:r},p=Ya(o),h=Ka(p),v=await a.getDimensions(c),y=p==="y",b=y?"top":"left",w=y?"bottom":"right",S=y?"clientHeight":"clientWidth",E=i.reference[h]+i.reference[p]-m[p]-i.floating[h],x=m[p]-i.reference[p],N=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let I=N?N[S]:0;(!I||!await(a.isElement==null?void 0:a.isElement(N)))&&(I=s.floating[S]||i.floating[h]);const M=E/2-x/2,H=I/2-v[h]/2-1,O=rn(g[b],H),G=rn(g[w],H),W=O,Z=I-v[h]-G,k=I/2-v[h]/2+M,$=qa(W,k,Z),F=!u.arrow&&Un(o)!=null&&k!==$&&i.reference[h]/2-(k<W?O:G)-v[h]/2<0,U=F?k<W?k-W:k-Z:0;return{[p]:m[p]+U,data:{[p]:$,centerOffset:k-$-U,...F&&{alignmentOffset:U}},reset:F}}}),fw=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:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:v=!0,...y}=Wt(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const b=qt(o),w=on(s),S=qt(s)===s,E=await(u.isRTL==null?void 0:u.isRTL(c.floating)),x=m||(S||!v?[Lo(s)]:aw(s)),N=h!=="none";!m&&N&&x.push(...lw(s,v,h,E));const I=[s,...x],M=await xr(t,y),H=[];let O=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&H.push(M[b]),g){const k=iw(o,a,E);H.push(M[k[0]],M[k[1]])}if(O=[...O,{placement:o,overflows:H}],!H.every(k=>k<=0)){var G,W;const k=(((G=i.flip)==null?void 0:G.index)||0)+1,$=I[k];if($)return{data:{index:k,overflows:O},reset:{placement:$}};let F=(W=O.filter(U=>U.overflows[0]<=0).sort((U,j)=>U.overflows[1]-j.overflows[1])[0])==null?void 0:W.placement;if(!F)switch(p){case"bestFit":{var Z;const U=(Z=O.filter(j=>{if(N){const R=on(j.placement);return R===w||R==="y"}return!0}).map(j=>[j.placement,j.overflows.filter(R=>R>0).reduce((R,A)=>R+A,0)]).sort((j,R)=>j[1]-R[1])[0])==null?void 0:Z[0];U&&(F=U);break}case"initialPlacement":F=s;break}if(o!==F)return{reset:{placement:F}}}return{}}}};function Id(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Md(e){return nw.some(t=>e[t]>=0)}const pw=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Wt(e,t);switch(r){case"referenceHidden":{const i=await xr(t,{...o,elementContext:"reference"}),a=Id(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Md(a)}}}case"escaped":{const i=await xr(t,{...o,altBoundary:!0}),a=Id(i,n.floating);return{data:{escapedOffsets:a,escaped:Md(a)}}}default:return{}}}}};async function gw(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=qt(n),s=Un(n),u=on(n)==="y",c=["left","top"].includes(a)?-1:1,d=i&&u?-1:1,g=Wt(t,e);let{mainAxis:m,crossAxis:p,alignmentAxis:h}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return s&&typeof h=="number"&&(p=s==="end"?h*-1:h),u?{x:p*d,y:m*c}:{x:m*c,y:p*d}}const mw=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 gw(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}}}}},hw=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}=Wt(e,t),c={x:n,y:r},d=await xr(t,u),g=on(qt(o)),m=Ga(g);let p=c[m],h=c[g];if(i){const y=m==="y"?"top":"left",b=m==="y"?"bottom":"right",w=p+d[y],S=p-d[b];p=qa(w,p,S)}if(a){const y=g==="y"?"top":"left",b=g==="y"?"bottom":"right",w=h+d[y],S=h-d[b];h=qa(w,h,S)}const v=s.fn({...t,[m]:p,[g]:h});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[m]:i,[g]:a}}}}}},vw=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}=Wt(e,t),d={x:n,y:r},g=on(o),m=Ga(g);let p=d[m],h=d[g];const v=Wt(s,t),y=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(u){const S=m==="y"?"height":"width",E=i.reference[m]-i.floating[S]+y.mainAxis,x=i.reference[m]+i.reference[S]-y.mainAxis;p<E?p=E:p>x&&(p=x)}if(c){var b,w;const S=m==="y"?"width":"height",E=["top","left"].includes(qt(o)),x=i.reference[g]-i.floating[S]+(E&&((b=a.offset)==null?void 0:b[g])||0)+(E?0:y.crossAxis),N=i.reference[g]+i.reference[S]+(E?0:((w=a.offset)==null?void 0:w[g])||0)-(E?y.crossAxis:0);h<x?h=x:h>N&&(h=N)}return{[m]:p,[g]:h}}}},yw=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}=Wt(e,t),d=await xr(t,c),g=qt(o),m=Un(o),p=on(o)==="y",{width:h,height:v}=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=v-d.top-d.bottom,S=h-d.left-d.right,E=rn(v-d[y],w),x=rn(h-d[b],S),N=!t.middlewareData.shift;let I=E,M=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(M=S),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(I=w),N&&!m){const O=at(d.left,0),G=at(d.right,0),W=at(d.top,0),Z=at(d.bottom,0);p?M=h-2*(O!==0||G!==0?O+G:at(d.left,d.right)):I=v-2*(W!==0||Z!==0?W+Z:at(d.top,d.bottom))}await u({...t,availableWidth:M,availableHeight:I});const H=await a.getDimensions(s.floating);return h!==H.width||v!==H.height?{reset:{rects:!0}}:{}}}};function Vo(){return typeof window<"u"}function Wn(e){return $d(e)?(e.nodeName||"").toLowerCase():"#document"}function st(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ft(e){var t;return(t=($d(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function $d(e){return Vo()?e instanceof Node||e instanceof st(e).Node:!1}function xt(e){return Vo()?e instanceof Element||e instanceof st(e).Element:!1}function Dt(e){return Vo()?e instanceof HTMLElement||e instanceof st(e).HTMLElement:!1}function Ld(e){return!Vo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof st(e).ShadowRoot}function br(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=bt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function xw(e){return["table","td","th"].includes(Wn(e))}function jo(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Ja(e){const t=Za(),n=xt(e)?bt(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 bw(e){let t=an(e);for(;Dt(t)&&!qn(t);){if(Ja(t))return t;if(jo(t))return null;t=an(t)}return null}function Za(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function qn(e){return["html","body","#document"].includes(Wn(e))}function bt(e){return st(e).getComputedStyle(e)}function zo(e){return xt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function an(e){if(Wn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ld(e)&&e.host||Ft(e);return Ld(t)?t.host:t}function Rd(e){const t=an(e);return qn(t)?e.ownerDocument?e.ownerDocument.body:e.body:Dt(t)&&br(t)?t:Rd(t)}function wr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Rd(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=st(o);if(i){const s=Qa(a);return t.concat(a,a.visualViewport||[],br(o)?o:[],s&&n?wr(s):[])}return t.concat(o,wr(o,[],n))}function Qa(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Vd(e){const t=bt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Dt(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=Mo(n)!==i||Mo(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function es(e){return xt(e)?e:e.contextElement}function Gn(e){const t=es(e);if(!Dt(t))return Ot(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Vd(t);let a=(i?Mo(n.width):n.width)/r,s=(i?Mo(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const ww=Ot(0);function jd(e){const t=st(e);return!Za()||!t.visualViewport?ww:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Sw(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==st(e)?!1:t}function En(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=es(e);let a=Ot(1);t&&(r?xt(r)&&(a=Gn(r)):a=Gn(e));const s=Sw(i,n,r)?jd(i):Ot(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=st(i),p=r&&xt(r)?st(r):r;let h=m,v=Qa(h);for(;v&&r&&p!==h;){const y=Gn(v),b=v.getBoundingClientRect(),w=bt(v),S=b.left+(v.clientLeft+parseFloat(w.paddingLeft))*y.x,E=b.top+(v.clientTop+parseFloat(w.paddingTop))*y.y;u*=y.x,c*=y.y,d*=y.x,g*=y.y,u+=S,c+=E,h=st(v),v=Qa(h)}}return Ro({width:d,height:g,x:u,y:c})}function ts(e,t){const n=zo(e).scrollLeft;return t?t.left+n:En(Ft(e)).left+n}function zd(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:ts(e,r)),i=r.top+t.scrollTop;return{x:o,y:i}}function Cw(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Ft(r),s=t?jo(t.floating):!1;if(r===a||s&&i)return n;let u={scrollLeft:0,scrollTop:0},c=Ot(1);const d=Ot(0),g=Dt(r);if((g||!g&&!i)&&((Wn(r)!=="body"||br(a))&&(u=zo(r)),Dt(r))){const p=En(r);c=Gn(r),d.x=p.x+r.clientLeft,d.y=p.y+r.clientTop}const m=a&&!g&&!i?zd(a,u,!0):Ot(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 Ew(e){return Array.from(e.getClientRects())}function _w(e){const t=Ft(e),n=zo(e),r=e.ownerDocument.body,o=at(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=at(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+ts(e);const s=-n.scrollTop;return bt(r).direction==="rtl"&&(a+=at(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function Tw(e,t){const n=st(e),r=Ft(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=Za();(!c||c&&t==="fixed")&&(s=o.offsetLeft,u=o.offsetTop)}return{width:i,height:a,x:s,y:u}}function Aw(e,t){const n=En(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Dt(e)?Gn(e):Ot(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 Bd(e,t,n){let r;if(t==="viewport")r=Tw(e,n);else if(t==="document")r=_w(Ft(e));else if(xt(t))r=Aw(t,n);else{const o=jd(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ro(r)}function Hd(e,t){const n=an(e);return n===t||!xt(n)||qn(n)?!1:bt(n).position==="fixed"||Hd(n,t)}function Pw(e,t){const n=t.get(e);if(n)return n;let r=wr(e,[],!1).filter(s=>xt(s)&&Wn(s)!=="body"),o=null;const i=bt(e).position==="fixed";let a=i?an(e):e;for(;xt(a)&&!qn(a);){const s=bt(a),u=Ja(a);!u&&s.position==="fixed"&&(o=null),(i?!u&&!o:!u&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||br(a)&&!u&&Hd(e,a))?r=r.filter(d=>d!==a):o=s,a=an(a)}return t.set(e,r),r}function Nw(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?jo(t)?[]:Pw(t,this._c):[].concat(n),r],s=a[0],u=a.reduce((c,d)=>{const g=Bd(t,d,o);return c.top=at(g.top,c.top),c.right=rn(g.right,c.right),c.bottom=rn(g.bottom,c.bottom),c.left=at(g.left,c.left),c},Bd(t,s,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function kw(e){const{width:t,height:n}=Vd(e);return{width:t,height:n}}function Ow(e,t,n){const r=Dt(t),o=Ft(t),i=n==="fixed",a=En(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const u=Ot(0);if(r||!r&&!i)if((Wn(t)!=="body"||br(o))&&(s=zo(t)),r){const m=En(t,!0,i,t);u.x=m.x+t.clientLeft,u.y=m.y+t.clientTop}else o&&(u.x=ts(o));const c=o&&!r&&!i?zd(o,s):Ot(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 ns(e){return bt(e).position==="static"}function Ud(e,t){if(!Dt(e)||bt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ft(e)===n&&(n=n.ownerDocument.body),n}function Wd(e,t){const n=st(e);if(jo(e))return n;if(!Dt(e)){let o=an(e);for(;o&&!qn(o);){if(xt(o)&&!ns(o))return o;o=an(o)}return n}let r=Ud(e,t);for(;r&&xw(r)&&ns(r);)r=Ud(r,t);return r&&qn(r)&&ns(r)&&!Ja(r)?n:r||bw(e)||n}const Fw=async function(e){const t=this.getOffsetParent||Wd,n=this.getDimensions,r=await n(e.floating);return{reference:Ow(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Dw(e){return bt(e).direction==="rtl"}const Iw={convertOffsetParentRelativeRectToViewportRelativeRect:Cw,getDocumentElement:Ft,getClippingRect:Nw,getOffsetParent:Wd,getElementRects:Fw,getClientRects:Ew,getDimensions:kw,getScale:Gn,isElement:xt,isRTL:Dw};function Mw(e,t){let n=null,r;const o=Ft(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 p=$o(d),h=$o(o.clientWidth-(c+g)),v=$o(o.clientHeight-(d+m)),y=$o(c),w={rootMargin:-p+"px "+-h+"px "+-v+"px "+-y+"px",threshold:at(0,rn(1,u))||1};let S=!0;function E(x){const N=x[0].intersectionRatio;if(N!==u){if(!S)return a();N?a(!1,N):r=setTimeout(()=>{a(!1,1e-7)},1e3)}S=!1}try{n=new IntersectionObserver(E,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,w)}n.observe(e)}return a(!0),i}function $w(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=es(e),d=o||i?[...c?wr(c):[],...wr(t)]:[];d.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),i&&b.addEventListener("resize",n)});const g=c&&s?Mw(c,n):null;let m=-1,p=null;a&&(p=new ResizeObserver(b=>{let[w]=b;w&&w.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var S;(S=p)==null||S.observe(t)})),n()}),c&&!u&&p.observe(c),p.observe(t));let h,v=u?En(e):null;u&&y();function y(){const b=En(e);v&&(b.x!==v.x||b.y!==v.y||b.width!==v.width||b.height!==v.height)&&n(),v=b,h=requestAnimationFrame(y)}return n(),()=>{var b;d.forEach(w=>{o&&w.removeEventListener("scroll",n),i&&w.removeEventListener("resize",n)}),g==null||g(),(b=p)==null||b.disconnect(),p=null,u&&cancelAnimationFrame(h)}}const Lw=mw,Rw=hw,Vw=fw,jw=yw,zw=pw,qd=dw,Bw=vw,Hw=(e,t,n)=>{const r=new Map,o={platform:Iw,...n},i={...o.platform,_c:r};return uw(e,t,{...o,platform:i})};var Bo=typeof document<"u"?_.useLayoutEffect:_.useEffect;function Ho(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(!Ho(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)&&!Ho(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Gd(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Kd(e,t){const n=Gd(e);return Math.round(t*n)/n}function rs(e){const t=f.useRef(e);return Bo(()=>{t.current=e}),t}function Uw(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}),[m,p]=f.useState(r);Ho(m,r)||p(r);const[h,v]=f.useState(null),[y,b]=f.useState(null),w=f.useCallback(j=>{j!==N.current&&(N.current=j,v(j))},[]),S=f.useCallback(j=>{j!==I.current&&(I.current=j,b(j))},[]),E=i||h,x=a||y,N=f.useRef(null),I=f.useRef(null),M=f.useRef(d),H=u!=null,O=rs(u),G=rs(o),W=rs(c),Z=f.useCallback(()=>{if(!N.current||!I.current)return;const j={placement:t,strategy:n,middleware:m};G.current&&(j.platform=G.current),Hw(N.current,I.current,j).then(R=>{const A={...R,isPositioned:W.current!==!1};k.current&&!Ho(M.current,A)&&(M.current=A,Rr.flushSync(()=>{g(A)}))})},[m,t,n,G,W]);Bo(()=>{c===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,g(j=>({...j,isPositioned:!1})))},[c]);const k=f.useRef(!1);Bo(()=>(k.current=!0,()=>{k.current=!1}),[]),Bo(()=>{if(E&&(N.current=E),x&&(I.current=x),E&&x){if(O.current)return O.current(E,x,Z);Z()}},[E,x,Z,O,H]);const $=f.useMemo(()=>({reference:N,floating:I,setReference:w,setFloating:S}),[w,S]),F=f.useMemo(()=>({reference:E,floating:x}),[E,x]),U=f.useMemo(()=>{const j={position:n,left:0,top:0};if(!F.floating)return j;const R=Kd(F.floating,d.x),A=Kd(F.floating,d.y);return s?{...j,transform:"translate("+R+"px, "+A+"px)",...Gd(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:R,top:A}},[n,s,F.floating,d.x,d.y]);return f.useMemo(()=>({...d,update:Z,refs:$,elements:F,floatingStyles:U}),[d,Z,$,F,U])}const Ww=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?qd({element:r.current,padding:o}).fn(n):{}:r?qd({element:r,padding:o}).fn(n):{}}}},qw=(e,t)=>({...Lw(e),options:[e,t]}),Gw=(e,t)=>({...Rw(e),options:[e,t]}),Kw=(e,t)=>({...Bw(e),options:[e,t]}),Yw=(e,t)=>({...Vw(e),options:[e,t]}),Xw=(e,t)=>({...jw(e),options:[e,t]}),Jw=(e,t)=>({...zw(e),options:[e,t]}),Zw=(e,t)=>({...Ww(e),options:[e,t]});var Qw=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],e0=Qw.reduce((e,t)=>{const n=f.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?On: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}},{}),t0="Arrow",Yd=f.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return l.jsx(e0.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"})})});Yd.displayName=t0;var n0=Yd;function Xd(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function r0(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Xd(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():Xd(e[o],null)}}}}function Jd(...e){return f.useCallback(r0(...e),e)}var o0=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Zd=o0.reduce((e,t)=>{const n=f.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?On: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}},{}),os="Popper",[Qd,ef]=Qt(os),[i0,tf]=Qd(os),nf=e=>{const{__scopePopper:t,children:n}=e,[r,o]=f.useState(null);return l.jsx(i0,{scope:t,anchor:r,onAnchorChange:o,children:n})};nf.displayName=os;var rf="PopperAnchor",of=f.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=tf(rf,n),a=f.useRef(null),s=Jd(t,a);return f.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:l.jsx(Zd.div,{...o,ref:s})});of.displayName=rf;var is="PopperContent",[a0,s0]=Qd(is),af=f.forwardRef((e,t)=>{var se,ue,de,le,Se,X;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:p="optimized",onPlaced:h,...v}=e,y=tf(is,n),[b,w]=f.useState(null),S=Jd(t,Ce=>w(Ce)),[E,x]=f.useState(null),N=yc(E),I=(N==null?void 0:N.width)??0,M=(N==null?void 0:N.height)??0,H=r+(i!=="center"?"-"+i:""),O=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},G=Array.isArray(c)?c:[c],W=G.length>0,Z={padding:O,boundary:G.filter(c0),altBoundary:W},{refs:k,floatingStyles:$,placement:F,isPositioned:U,middlewareData:j}=Uw({strategy:"fixed",placement:H,whileElementsMounted:(...Ce)=>$w(...Ce,{animationFrame:p==="always"}),elements:{reference:y.anchor},middleware:[qw({mainAxis:o+M,alignmentAxis:a}),u&&Gw({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?Kw():void 0,...Z}),u&&Yw({...Z}),Xw({...Z,apply:({elements:Ce,rects:ze,availableWidth:St,availableHeight:lt})=>{const{width:tt,height:C}=ze.reference,P=Ce.floating.style;P.setProperty("--radix-popper-available-width",`${St}px`),P.setProperty("--radix-popper-available-height",`${lt}px`),P.setProperty("--radix-popper-anchor-width",`${tt}px`),P.setProperty("--radix-popper-anchor-height",`${C}px`)}}),E&&Zw({element:E,padding:s}),u0({arrowWidth:I,arrowHeight:M}),m&&Jw({strategy:"referenceHidden",...Z})]}),[R,A]=cf(F),B=qe(h);it(()=>{U&&(B==null||B())},[U,B]);const Q=(se=j.arrow)==null?void 0:se.x,ne=(ue=j.arrow)==null?void 0:ue.y,te=((de=j.arrow)==null?void 0:de.centerOffset)!==0,[ce,oe]=f.useState();return it(()=>{b&&oe(window.getComputedStyle(b).zIndex)},[b]),l.jsx("div",{ref:k.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:U?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ce,"--radix-popper-transform-origin":[(le=j.transformOrigin)==null?void 0:le.x,(Se=j.transformOrigin)==null?void 0:Se.y].join(" "),...((X=j.hide)==null?void 0:X.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(a0,{scope:n,placedSide:R,onArrowChange:x,arrowX:Q,arrowY:ne,shouldHideArrow:te,children:l.jsx(Zd.div,{"data-side":R,"data-align":A,...v,ref:S,style:{...v.style,animation:U?void 0:"none"}})})})});af.displayName=is;var sf="PopperArrow",l0={top:"bottom",right:"left",bottom:"top",left:"right"},lf=f.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=s0(sf,r),a=l0[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(n0,{...o,ref:n,style:{...o.style,display:"block"}})})});lf.displayName=sf;function c0(e){return e!==null}var u0=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]=cf(n),g={start:"0%",center:"50%",end:"100%"}[d],m=(((b=o.arrow)==null?void 0:b.x)??0)+s/2,p=(((w=o.arrow)==null?void 0:w.y)??0)+u/2;let h="",v="";return c==="bottom"?(h=a?g:`${m}px`,v=`${-u}px`):c==="top"?(h=a?g:`${m}px`,v=`${r.floating.height+u}px`):c==="right"?(h=`${-u}px`,v=a?g:`${p}px`):c==="left"&&(h=`${r.floating.width+u}px`,v=a?g:`${p}px`),{data:{x:h,y:v}}}});function cf(e){const[t,n="center"]=e.split("-");return[t,n]}var d0=nf,f0=of,p0=af,g0=lf,m0="Portal",uf=f.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,i]=f.useState(!1);it(()=>i(!0),[]);const a=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?ci.createPortal(l.jsx(yr.div,{...r,ref:t}),a):null});uf.displayName=m0;function h0(e,t){return f.useReducer((n,r)=>t[n][r]??n,e)}var as=e=>{const{present:t,children:n}=e,r=v0(t),o=typeof n=="function"?n({present:r.isPresent}):f.Children.only(n),i=vr(r.ref,y0(o));return typeof n=="function"||r.isPresent?f.cloneElement(o,{ref:i}):null};as.displayName="Presence";function v0(e){const[t,n]=f.useState(),r=f.useRef({}),o=f.useRef(e),i=f.useRef("none"),a=e?"mounted":"unmounted",[s,u]=h0(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const c=Uo(r.current);i.current=s==="mounted"?c:"none"},[s]),it(()=>{const c=r.current,d=o.current;if(d!==e){const m=i.current,p=Uo(c);e?u("MOUNT"):p==="none"||(c==null?void 0:c.display)==="none"?u("UNMOUNT"):u(d&&m!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),it(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,g=p=>{const v=Uo(r.current).includes(p.animationName);if(p.target===t&&v&&(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=p=>{p.target===t&&(i.current=Uo(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:f.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function Uo(e){return(e==null?void 0:e.animationName)||"none"}function y0(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 x0="VisuallyHidden",df=f.forwardRef((e,t)=>l.jsx(yr.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}}));df.displayName=x0;var b0=df,[Wo,S_]=Qt("Tooltip",[ef]),qo=ef(),ff="TooltipProvider",w0=700,ss="tooltip.open",[S0,ls]=Wo(ff),pf=e=>{const{__scopeTooltip:t,delayDuration:n=w0,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(S0,{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})};pf.displayName=ff;var Go="Tooltip",[C0,Sr]=Wo(Go),gf=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:a,delayDuration:s}=e,u=ls(Go,e.__scopeTooltip),c=qo(t),[d,g]=f.useState(null),m=$n(),p=f.useRef(0),h=a??u.disableHoverableContent,v=s??u.delayDuration,y=f.useRef(!1),[b=!1,w]=In({prop:r,defaultProp:o,onChange:I=>{I?(u.onOpen(),document.dispatchEvent(new CustomEvent(ss))):u.onClose(),i==null||i(I)}}),S=f.useMemo(()=>b?y.current?"delayed-open":"instant-open":"closed",[b]),E=f.useCallback(()=>{window.clearTimeout(p.current),p.current=0,y.current=!1,w(!0)},[w]),x=f.useCallback(()=>{window.clearTimeout(p.current),p.current=0,w(!1)},[w]),N=f.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{y.current=!0,w(!0),p.current=0},v)},[v,w]);return f.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),l.jsx(d0,{...c,children:l.jsx(C0,{scope:t,contentId:m,open:b,stateAttribute:S,trigger:d,onTriggerChange:g,onTriggerEnter:f.useCallback(()=>{u.isOpenDelayed?N():E()},[u.isOpenDelayed,N,E]),onTriggerLeave:f.useCallback(()=>{h?x():(window.clearTimeout(p.current),p.current=0)},[x,h]),onOpen:E,onClose:x,disableHoverableContent:h,children:n})})};gf.displayName=Go;var cs="TooltipTrigger",mf=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Sr(cs,n),i=ls(cs,n),a=qo(n),s=f.useRef(null),u=vr(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(f0,{asChild:!0,...a,children:l.jsx(yr.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:u,onPointerMove:Ut(e.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:Ut(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:Ut(e.onPointerDown,()=>{c.current=!0,document.addEventListener("pointerup",g,{once:!0})}),onFocus:Ut(e.onFocus,()=>{c.current||o.onOpen()}),onBlur:Ut(e.onBlur,o.onClose),onClick:Ut(e.onClick,o.onClose)})})});mf.displayName=cs;var us="TooltipPortal",[E0,_0]=Wo(us,{forceMount:void 0}),hf=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,i=Sr(us,t);return l.jsx(E0,{scope:t,forceMount:n,children:l.jsx(as,{present:n||i.open,children:l.jsx(uf,{asChild:!0,container:o,children:r})})})};hf.displayName=us;var Kn="TooltipContent",vf=f.forwardRef((e,t)=>{const n=_0(Kn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,a=Sr(Kn,e.__scopeTooltip);return l.jsx(as,{present:r||a.open,children:a.disableHoverableContent?l.jsx(yf,{side:o,...i,ref:t}):l.jsx(T0,{side:o,...i,ref:t})})}),T0=f.forwardRef((e,t)=>{const n=Sr(Kn,e.__scopeTooltip),r=ls(Kn,e.__scopeTooltip),o=f.useRef(null),i=vr(t,o),[a,s]=f.useState(null),{trigger:u,onClose:c}=n,d=o.current,{onPointerInTransitChange:g}=r,m=f.useCallback(()=>{s(null),g(!1)},[g]),p=f.useCallback((h,v)=>{const y=h.currentTarget,b={x:h.clientX,y:h.clientY},w=k0(b,y.getBoundingClientRect()),S=O0(b,w),E=F0(v.getBoundingClientRect()),x=I0([...S,...E]);s(x),g(!0)},[g]);return f.useEffect(()=>()=>m(),[m]),f.useEffect(()=>{if(u&&d){const h=y=>p(y,d),v=y=>p(y,u);return u.addEventListener("pointerleave",h),d.addEventListener("pointerleave",v),()=>{u.removeEventListener("pointerleave",h),d.removeEventListener("pointerleave",v)}}},[u,d,p,m]),f.useEffect(()=>{if(a){const h=v=>{const y=v.target,b={x:v.clientX,y:v.clientY},w=(u==null?void 0:u.contains(y))||(d==null?void 0:d.contains(y)),S=!D0(b,a);w?m():S&&(m(),c())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[u,d,a,c,m]),l.jsx(yf,{...e,ref:i})}),[A0,P0]=Wo(Go,{isInside:!1}),yf=f.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...s}=e,u=Sr(Kn,n),c=qo(n),{onClose:d}=u;return f.useEffect(()=>(document.addEventListener(ss,d),()=>document.removeEventListener(ss,d)),[d]),f.useEffect(()=>{if(u.trigger){const g=m=>{const p=m.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(Nd,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:g=>g.preventDefault(),onDismiss:d,children:l.jsxs(p0,{"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(oc,{children:r}),l.jsx(A0,{scope:n,isInside:!0,children:l.jsx(b0,{id:u.contentId,role:"tooltip",children:o||r})})]})})});vf.displayName=Kn;var xf="TooltipArrow",N0=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=qo(n);return P0(xf,n).isInside?null:l.jsx(g0,{...o,...r,ref:t})});N0.displayName=xf;function k0(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 O0(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 F0(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 D0(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 I0(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),M0(t)}function M0(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 $0=pf,L0=gf,R0=mf,V0=hf,bf=vf;const sn=$0,ln=L0,cn=R0,Gt=f.forwardRef(({className:e,sideOffset:t=4,...n},r)=>l.jsx(V0,{children:l.jsx(bf,{ref:r,sideOffset:t,className:he("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})}));Gt.displayName=bf.displayName;function j0({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 z0=f.forwardRef(j0);var B0=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)}},wf=function(e){return typeof e=="function"},Sf=process.env.NODE_ENV==="development"||process.env.NODE_ENV==="test";const H0=B0(_.useEffect);function Cf(e){var t=_.useRef(e);return t.current=e,t}var U0=function(e){Sf&&(wf(e)||console.error("useUnmount expected parameter is a function, got ".concat(typeof e)));var t=Cf(e);_.useEffect(function(){return function(){t.current()}},[])};function W0(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ef=W0,q0=typeof ur=="object"&&ur&&ur.Object===Object&&ur,G0=q0,K0=G0,Y0=typeof self=="object"&&self&&self.Object===Object&&self,X0=K0||Y0||Function("return this")(),_f=X0,J0=_f,Z0=function(){return J0.Date.now()},Q0=Z0,eS=/\s/;function tS(e){for(var t=e.length;t--&&eS.test(e.charAt(t)););return t}var nS=tS,rS=nS,oS=/^\s+/;function iS(e){return e&&e.slice(0,rS(e)+1).replace(oS,"")}var aS=iS,sS=_f,lS=sS.Symbol,Tf=lS,Af=Tf,Pf=Object.prototype,cS=Pf.hasOwnProperty,uS=Pf.toString,Cr=Af?Af.toStringTag:void 0;function dS(e){var t=cS.call(e,Cr),n=e[Cr];try{e[Cr]=void 0;var r=!0}catch{}var o=uS.call(e);return r&&(t?e[Cr]=n:delete e[Cr]),o}var fS=dS,pS=Object.prototype,gS=pS.toString;function mS(e){return gS.call(e)}var hS=mS,Nf=Tf,vS=fS,yS=hS,xS="[object Null]",bS="[object Undefined]",kf=Nf?Nf.toStringTag:void 0;function wS(e){return e==null?e===void 0?bS:xS:kf&&kf in Object(e)?vS(e):yS(e)}var SS=wS;function CS(e){return e!=null&&typeof e=="object"}var ES=CS,_S=SS,TS=ES,AS="[object Symbol]";function PS(e){return typeof e=="symbol"||TS(e)&&_S(e)==AS}var NS=PS,kS=aS,Of=Ef,OS=NS,Ff=NaN,FS=/^[-+]0x[0-9a-f]+$/i,DS=/^0b[01]+$/i,IS=/^0o[0-7]+$/i,MS=parseInt;function $S(e){if(typeof e=="number")return e;if(OS(e))return Ff;if(Of(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Of(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=kS(e);var n=DS.test(e);return n||IS.test(e)?MS(e.slice(2),n?2:8):FS.test(e)?Ff:+e}var LS=$S,RS=Ef,ds=Q0,Df=LS,VS="Expected a function",jS=Math.max,zS=Math.min;function BS(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(VS);t=Df(t)||0,RS(n)&&(d=!!n.leading,g="maxWait"in n,i=g?jS(Df(n.maxWait)||0,t):i,m="trailing"in n?!!n.trailing:m);function p(N){var I=r,M=o;return r=o=void 0,c=N,a=e.apply(M,I),a}function h(N){return c=N,s=setTimeout(b,t),d?p(N):a}function v(N){var I=N-u,M=N-c,H=t-I;return g?zS(H,i-M):H}function y(N){var I=N-u,M=N-c;return u===void 0||I>=t||I<0||g&&M>=i}function b(){var N=ds();if(y(N))return w(N);s=setTimeout(b,v(N))}function w(N){return s=void 0,m&&r?p(N):(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:w(ds())}function x(){var N=ds(),I=y(N);if(r=arguments,o=this,u=N,I){if(s===void 0)return h(u);if(g)return clearTimeout(s),s=setTimeout(b,t),p(u)}return s===void 0&&(s=setTimeout(b,t)),a}return x.cancel=S,x.flush=E,x}var HS=BS;const US=to(HS);function WS(){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}WS()||(global.Date=Date);function qS(e,t){var n;Sf&&(wf(e)||console.error("useDebounceFn expected parameter is a function, got ".concat(typeof e)));var r=Cf(e),o=(n=t==null?void 0:t.wait)!==null&&n!==void 0?n:1e3,i=_.useMemo(function(){return US(function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return r.current.apply(r,zc([],jc(a),!1))},o,t)},[]);return U0(function(){i.cancel()}),{run:i,cancel:i.cancel,flush:i.flush}}function GS(e,t,n){var r=jc(_.useState({}),2),o=r[0],i=r[1],a=qS(function(){i({})},n).run;_.useEffect(function(){return a()},t),H0(e,[o])}const KS=_.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()}})),GS(()=>{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(z0,{className:"h-5 w-5"})})]})});var fs={exports:{}},Ko={exports:{}},Te={};/** @license React v16.13.1
|
|
178
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return v.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},pE="DialogDescriptionWarning",gE=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${hh(pE).contentName}}.`;return v.useEffect(()=>{var s;const i=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},hE=th,mE=rh,vE=ih,mh=ah,vh=sh,yh=ch,xh=dh,yE=ph;const _r=hE,Qa=mE,xE=vE,wh=v.forwardRef(({className:e,...t},n)=>d.jsx(mh,{ref:n,className:Ve("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}));wh.displayName=mh.displayName;const or=v.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(xE,{children:[d.jsx(wh,{}),d.jsxs(vh,{ref:r,className:Ve("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,d.jsxs(yE,{className:Ve("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:[d.jsx(Tc,{className:"s3-explr-ui-dialog-close-icon h-4 w-4"}),d.jsx("span",{className:"s3-explr-ui-dialog-close-text sr-only",children:"Close"})]})]})]}));or.displayName=vh.displayName;const ir=({className:e,...t})=>d.jsx("div",{className:Ve("s3-explr-ui-dialog-header flex flex-col space-y-1.5 text-center sm:text-left",e),...t});ir.displayName="DialogHeader";const _o=({className:e,...t})=>d.jsx("div",{className:Ve("s3-explr-ui-dialog-footer flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});_o.displayName="DialogFooter";const ar=v.forwardRef(({className:e,...t},n)=>d.jsx(yh,{ref:n,className:Ve("s3-explr-ui-dialog-title text-lg font-semibold leading-none tracking-tight",e),...t}));ar.displayName=yh.displayName;const ri=v.forwardRef(({className:e,...t},n)=>d.jsx(xh,{ref:n,className:Ve("s3-explr-ui-dialog-description text-sm text-muted-foreground",e),...t}));ri.displayName=xh.displayName;const Hr=v.forwardRef(({className:e,type:t,...n},r)=>d.jsx("input",{type:t,className:Ve("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}));Hr.displayName="Input";var wE="Label",bh=v.forwardRef((e,t)=>d.jsx(Ft.label,{...e,ref:t,onMouseDown:n=>{var i;n.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));bh.displayName=wE;var _h=bh;const bE=Mc("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"}}),So=v.forwardRef(({className:e,variant:t,size:n,...r},i)=>d.jsx(_h,{ref:i,className:Ve(bE({variant:t,size:n}),e),...r}));So.displayName=_h.displayName;const es=({className:e,...t})=>d.jsx("nav",{role:"navigation","aria-label":"pagination",className:Ve("mx-auto flex w-full justify-center",e),...t});es.displayName="Pagination";const ts=v.forwardRef(({className:e,...t},n)=>d.jsx("ul",{ref:n,className:Ve("flex flex-row items-center gap-1",e),...t}));ts.displayName="PaginationContent";const Un=v.forwardRef(({className:e,...t},n)=>d.jsx("li",{ref:n,className:Ve("",e),...t}));Un.displayName="PaginationItem";const oi=({className:e,isActive:t,size:n="icon",...r})=>d.jsx("a",{"aria-current":t?"page":void 0,className:Ve(hg({variant:t?"outline":"ghost",size:n}),e),...r});oi.displayName="PaginationLink";const ns=({className:e,...t})=>d.jsxs(oi,{"aria-label":"Go to previous page",size:"default",className:Ve("gap-1 pl-2.5",e),...t,children:[d.jsx(N_,{className:"h-4 w-4"}),d.jsx("span",{children:"Previous"})]});ns.displayName="PaginationPrevious";const rs=({className:e,...t})=>d.jsxs(oi,{"aria-label":"Go to next page",size:"default",className:Ve("gap-1 pr-2.5",e),...t,children:[d.jsx("span",{children:"Next"}),d.jsx(qp,{className:"h-4 w-4"})]});rs.displayName="PaginationNext";const os=({className:e,...t})=>d.jsxs("span",{"aria-hidden":!0,className:Ve("flex h-9 w-9 items-center justify-center",e),...t,children:[d.jsx(F_,{className:"h-4 w-4"}),d.jsx("span",{className:"sr-only",children:"More pages"})]});os.displayName="PaginationEllipsis";const is=v.forwardRef(({className:e,...t},n)=>d.jsx("div",{className:Ve("relative w-full overflow-auto","s3-explr-ui-table-container"),children:d.jsx("table",{ref:n,className:Ve("w-full caption-bottom text-sm","s3-explr-ui-table",e),...t})}));is.displayName="Table";const as=v.forwardRef(({className:e,...t},n)=>d.jsx("thead",{ref:n,className:Ve("[&_tr]:border-b","s3-explr-ui-table-header",e),...t}));as.displayName="TableHeader";const ss=v.forwardRef(({className:e,...t},n)=>d.jsx("tbody",{ref:n,className:Ve("[&_tr:last-child]:border-0","s3-explr-ui-table-body",e),...t}));ss.displayName="TableBody";const _E=v.forwardRef(({className:e,...t},n)=>d.jsx("tfoot",{ref:n,className:Ve("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0","s3-explr-ui-table-footer",e),...t}));_E.displayName="TableFooter";const jn=v.forwardRef(({className:e,...t},n)=>d.jsx("tr",{ref:n,className:Ve("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted","s3-explr-ui-table-row",e),...t}));jn.displayName="TableRow";const sr=v.forwardRef(({className:e,...t},n)=>d.jsx("th",{ref:n,className:Ve("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}));sr.displayName="TableHead";const tn=v.forwardRef(({className:e,...t},n)=>d.jsx("td",{ref:n,className:Ve("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]","s3-explr-ui-table-cell",e),...t}));tn.displayName="TableCell";const SE=v.forwardRef(({className:e,...t},n)=>d.jsx("caption",{ref:n,className:Ve("mt-4 text-sm text-muted-foreground","s3-explr-ui-table-caption",e),...t}));SE.displayName="TableCaption";function nu(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function ii(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function Sh(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ru(...e){return t=>{let n=!1;const r=e.map(i=>{const s=Sh(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():Sh(e[i],null)}}}}function ou(...e){return v.useCallback(ru(...e),e)}var iu=v.forwardRef((e,t)=>{const{children:n,...r}=e,i=v.Children.toArray(n),s=i.find(EE);if(s){const l=s.props.children,u=i.map(g=>g===s?v.Children.count(l)>1?v.Children.only(null):v.isValidElement(l)?l.props.children:null:g);return d.jsx(au,{...r,ref:t,children:v.isValidElement(l)?v.cloneElement(l,void 0,u):null})}return d.jsx(au,{...r,ref:t,children:n})});iu.displayName="Slot";var au=v.forwardRef((e,t)=>{const{children:n,...r}=e;if(v.isValidElement(n)){const i=AE(n);return v.cloneElement(n,{...TE(r,n.props),ref:t?ru(t,i):i})}return v.Children.count(n)>1?v.Children.only(null):null});au.displayName="SlotClone";var CE=({children:e})=>d.jsx(d.Fragment,{children:e});function EE(e){return v.isValidElement(e)&&e.type===CE}function TE(e,t){const n={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...u)=>{s(...u),i(...u)}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...e,...n}}function AE(e){var r,i;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=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function PE(e){const t=e+"CollectionProvider",[n,r]=Ur(t),[i,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=m=>{const{scope:w,children:_}=m,S=L.useRef(null),A=L.useRef(new Map).current;return d.jsx(i,{scope:w,itemMap:A,collectionRef:S,children:_})};l.displayName=t;const u=e+"CollectionSlot",g=L.forwardRef((m,w)=>{const{scope:_,children:S}=m,A=s(u,_),P=ou(w,A.collectionRef);return d.jsx(iu,{ref:P,children:S})});g.displayName=u;const f=e+"CollectionItemSlot",h="data-radix-collection-item",y=L.forwardRef((m,w)=>{const{scope:_,children:S,...A}=m,P=L.useRef(null),N=ou(w,P),D=s(f,_);return L.useEffect(()=>(D.itemMap.set(P,{ref:P,...A}),()=>void D.itemMap.delete(P))),d.jsx(iu,{[h]:"",ref:N,children:S})});y.displayName=f;function x(m){const w=s(e+"CollectionConsumer",m);return L.useCallback(()=>{const S=w.collectionRef.current;if(!S)return[];const A=Array.from(S.querySelectorAll(`[${h}]`));return Array.from(w.itemMap.values()).sort((D,E)=>A.indexOf(D.ref.current)-A.indexOf(E.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:l,Slot:g,ItemSlot:y},x,r]}var Ch=v.forwardRef((e,t)=>{const{children:n,...r}=e,i=v.Children.toArray(n),s=i.find(NE);if(s){const l=s.props.children,u=i.map(g=>g===s?v.Children.count(l)>1?v.Children.only(null):v.isValidElement(l)?l.props.children:null:g);return d.jsx(su,{...r,ref:t,children:v.isValidElement(l)?v.cloneElement(l,void 0,u):null})}return d.jsx(su,{...r,ref:t,children:n})});Ch.displayName="Slot";var su=v.forwardRef((e,t)=>{const{children:n,...r}=e;if(v.isValidElement(n)){const i=DE(n);return v.cloneElement(n,{...FE(r,n.props),ref:t?ru(t,i):i})}return v.Children.count(n)>1?v.Children.only(null):null});su.displayName="SlotClone";var OE=({children:e})=>d.jsx(d.Fragment,{children:e});function NE(e){return v.isValidElement(e)&&e.type===OE}function FE(e,t){const n={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...u)=>{s(...u),i(...u)}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...e,...n}}function DE(e){var r,i;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=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var kE=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Eh=kE.reduce((e,t)=>{const n=v.forwardRef((r,i)=>{const{asChild:s,...l}=r,u=s?Ch:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(u,{...l,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),IE=v.createContext(void 0);function Th(e){const t=v.useContext(IE);return e||t||"ltr"}var lu="rovingFocusGroup.onEntryFocus",LE={bubbles:!1,cancelable:!0},ls="RovingFocusGroup",[cu,Ah,ME]=PE(ls),[$E,Ph]=Ur(ls,[ME]),[RE,VE]=$E(ls),Oh=v.forwardRef((e,t)=>d.jsx(cu.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(cu.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(zE,{...e,ref:t})})}));Oh.displayName=ls;var zE=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:s,currentTabStopId:l,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:g,onEntryFocus:f,preventScrollOnEntryFocus:h=!1,...y}=e,x=v.useRef(null),m=ou(t,x),w=Th(s),[_=null,S]=Xo({prop:l,defaultProp:u,onChange:g}),[A,P]=v.useState(!1),N=qt(f),D=Ah(n),E=v.useRef(!1),[V,W]=v.useState(0);return v.useEffect(()=>{const B=x.current;if(B)return B.addEventListener(lu,N),()=>B.removeEventListener(lu,N)},[N]),d.jsx(RE,{scope:n,orientation:r,dir:w,loop:i,currentTabStopId:_,onItemFocus:v.useCallback(B=>S(B),[S]),onItemShiftTab:v.useCallback(()=>P(!0),[]),onFocusableItemAdd:v.useCallback(()=>W(B=>B+1),[]),onFocusableItemRemove:v.useCallback(()=>W(B=>B-1),[]),children:d.jsx(Eh.div,{tabIndex:A||V===0?-1:0,"data-orientation":r,...y,ref:m,style:{outline:"none",...e.style},onMouseDown:ii(e.onMouseDown,()=>{E.current=!0}),onFocus:ii(e.onFocus,B=>{const ee=!E.current;if(B.target===B.currentTarget&&ee&&!A){const H=new CustomEvent(lu,LE);if(B.currentTarget.dispatchEvent(H),!H.defaultPrevented){const ce=D().filter(G=>G.focusable),ie=ce.find(G=>G.active),he=ce.find(G=>G.id===_),K=[ie,he,...ce].filter(Boolean).map(G=>G.ref.current);Dh(K,h)}}E.current=!1}),onBlur:ii(e.onBlur,()=>P(!1))})})}),Nh="RovingFocusGroupItem",Fh=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:s,...l}=e,u=Zo(),g=s||u,f=VE(Nh,n),h=f.currentTabStopId===g,y=Ah(n),{onFocusableItemAdd:x,onFocusableItemRemove:m}=f;return v.useEffect(()=>{if(r)return x(),()=>m()},[r,x,m]),d.jsx(cu.ItemSlot,{scope:n,id:g,focusable:r,active:i,children:d.jsx(Eh.span,{tabIndex:h?0:-1,"data-orientation":f.orientation,...l,ref:t,onMouseDown:ii(e.onMouseDown,w=>{r?f.onItemFocus(g):w.preventDefault()}),onFocus:ii(e.onFocus,()=>f.onItemFocus(g)),onKeyDown:ii(e.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){f.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const _=jE(w,f.orientation,f.dir);if(_!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let A=y().filter(P=>P.focusable).map(P=>P.ref.current);if(_==="last")A.reverse();else if(_==="prev"||_==="next"){_==="prev"&&A.reverse();const P=A.indexOf(w.currentTarget);A=f.loop?WE(A,P+1):A.slice(P+1)}setTimeout(()=>Dh(A))}})})})});Fh.displayName=Nh;var BE={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function UE(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function jE(e,t,n){const r=UE(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return BE[r]}function Dh(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function WE(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var HE=Oh,GE=Fh;function kh(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function qE(...e){return t=>{let n=!1;const r=e.map(i=>{const s=kh(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():kh(e[i],null)}}}}function KE(...e){return v.useCallback(qE(...e),e)}function YE(e,t){return v.useReducer((n,r)=>t[n][r]??n,e)}var Ih=e=>{const{present:t,children:n}=e,r=XE(t),i=typeof n=="function"?n({present:r.isPresent}):v.Children.only(n),s=KE(r.ref,JE(i));return typeof n=="function"||r.isPresent?v.cloneElement(i,{ref:s}):null};Ih.displayName="Presence";function XE(e){const[t,n]=v.useState(),r=v.useRef({}),i=v.useRef(e),s=v.useRef("none"),l=e?"mounted":"unmounted",[u,g]=YE(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const f=cs(r.current);s.current=u==="mounted"?f:"none"},[u]),fn(()=>{const f=r.current,h=i.current;if(h!==e){const x=s.current,m=cs(f);e?g("MOUNT"):m==="none"||(f==null?void 0:f.display)==="none"?g("UNMOUNT"):g(h&&x!==m?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,g]),fn(()=>{if(t){let f;const h=t.ownerDocument.defaultView??window,y=m=>{const _=cs(r.current).includes(m.animationName);if(m.target===t&&_&&(g("ANIMATION_END"),!i.current)){const S=t.style.animationFillMode;t.style.animationFillMode="forwards",f=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=S)})}},x=m=>{m.target===t&&(s.current=cs(r.current))};return t.addEventListener("animationstart",x),t.addEventListener("animationcancel",y),t.addEventListener("animationend",y),()=>{h.clearTimeout(f),t.removeEventListener("animationstart",x),t.removeEventListener("animationcancel",y),t.removeEventListener("animationend",y)}}else g("ANIMATION_END")},[t,g]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:v.useCallback(f=>{f&&(r.current=getComputedStyle(f)),n(f)},[])}}function cs(e){return(e==null?void 0:e.animationName)||"none"}function JE(e){var r,i;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=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Lh(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ZE(...e){return t=>{let n=!1;const r=e.map(i=>{const s=Lh(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():Lh(e[i],null)}}}}var Mh=v.forwardRef((e,t)=>{const{children:n,...r}=e,i=v.Children.toArray(n),s=i.find(e1);if(s){const l=s.props.children,u=i.map(g=>g===s?v.Children.count(l)>1?v.Children.only(null):v.isValidElement(l)?l.props.children:null:g);return d.jsx(uu,{...r,ref:t,children:v.isValidElement(l)?v.cloneElement(l,void 0,u):null})}return d.jsx(uu,{...r,ref:t,children:n})});Mh.displayName="Slot";var uu=v.forwardRef((e,t)=>{const{children:n,...r}=e;if(v.isValidElement(n)){const i=n1(n);return v.cloneElement(n,{...t1(r,n.props),ref:t?ZE(t,i):i})}return v.Children.count(n)>1?v.Children.only(null):null});uu.displayName="SlotClone";var QE=({children:e})=>d.jsx(d.Fragment,{children:e});function e1(e){return v.isValidElement(e)&&e.type===QE}function t1(e,t){const n={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...u)=>{s(...u),i(...u)}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...e,...n}}function n1(e){var r,i;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=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var r1=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],us=r1.reduce((e,t)=>{const n=v.forwardRef((r,i)=>{const{asChild:s,...l}=r,u=s?Mh:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(u,{...l,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),du="Tabs",[o1,LM]=Ur(du,[Ph]),$h=Ph(),[i1,fu]=o1(du),Rh=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:s,orientation:l="horizontal",dir:u,activationMode:g="automatic",...f}=e,h=Th(u),[y,x]=Xo({prop:r,onChange:i,defaultProp:s});return d.jsx(i1,{scope:n,baseId:Zo(),value:y,onValueChange:x,orientation:l,dir:h,activationMode:g,children:d.jsx(us.div,{dir:h,"data-orientation":l,...f,ref:t})})});Rh.displayName=du;var Vh="TabsList",zh=v.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,s=fu(Vh,n),l=$h(n);return d.jsx(HE,{asChild:!0,...l,orientation:s.orientation,dir:s.dir,loop:r,children:d.jsx(us.div,{role:"tablist","aria-orientation":s.orientation,...i,ref:t})})});zh.displayName=Vh;var Bh="TabsTrigger",Uh=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...s}=e,l=fu(Bh,n),u=$h(n),g=Hh(l.baseId,r),f=Gh(l.baseId,r),h=r===l.value;return d.jsx(GE,{asChild:!0,...u,focusable:!i,active:h,children:d.jsx(us.button,{type:"button",role:"tab","aria-selected":h,"aria-controls":f,"data-state":h?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:g,...s,ref:t,onMouseDown:nu(e.onMouseDown,y=>{!i&&y.button===0&&y.ctrlKey===!1?l.onValueChange(r):y.preventDefault()}),onKeyDown:nu(e.onKeyDown,y=>{[" ","Enter"].includes(y.key)&&l.onValueChange(r)}),onFocus:nu(e.onFocus,()=>{const y=l.activationMode!=="manual";!h&&!i&&y&&l.onValueChange(r)})})})});Uh.displayName=Bh;var jh="TabsContent",Wh=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:s,...l}=e,u=fu(jh,n),g=Hh(u.baseId,r),f=Gh(u.baseId,r),h=r===u.value,y=v.useRef(h);return v.useEffect(()=>{const x=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(x)},[]),d.jsx(Ih,{present:i||h,children:({present:x})=>d.jsx(us.div,{"data-state":h?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":g,hidden:!x,id:f,tabIndex:0,...l,ref:t,style:{...e.style,animationDuration:y.current?"0s":void 0},children:x&&s})})});Wh.displayName=jh;function Hh(e,t){return`${e}-trigger-${t}`}function Gh(e,t){return`${e}-content-${t}`}var a1=Rh,qh=zh,Kh=Uh,Yh=Wh;const s1=a1,Xh=v.forwardRef(({className:e,...t},n)=>d.jsx(qh,{ref:n,className:Ve("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));Xh.displayName=qh.displayName;const ds=v.forwardRef(({className:e,...t},n)=>d.jsx(Kh,{ref:n,className:Ve("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}));ds.displayName=Kh.displayName;const fs=v.forwardRef(({className:e,...t},n)=>d.jsx(Yh,{ref:n,className:Ve("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));fs.displayName=Yh.displayName;const Ui=v.forwardRef(({className:e,...t},n)=>d.jsx("textarea",{className:Ve("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}));Ui.displayName="Textarea";function l1(e,t=[]){let n=[];function r(s,l){const u=v.createContext(l),g=n.length;n=[...n,l];function f(y){const{scope:x,children:m,...w}=y,_=(x==null?void 0:x[e][g])||u,S=v.useMemo(()=>w,Object.values(w));return d.jsx(_.Provider,{value:S,children:m})}function h(y,x){const m=(x==null?void 0:x[e][g])||u,w=v.useContext(m);if(w)return w;if(l!==void 0)return l;throw new Error(`\`${y}\` must be used within \`${s}\``)}return f.displayName=s+"Provider",[f,h]}const i=()=>{const s=n.map(l=>v.createContext(l));return function(u){const g=(u==null?void 0:u[e])||s;return v.useMemo(()=>({[`__scope${e}`]:{...u,[e]:g}}),[u,g])}};return i.scopeName=e,[r,c1(i,...t)]}function c1(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const l=r.reduce((u,{useScope:g,scopeName:f})=>{const y=g(s)[`__scope${f}`];return{...u,...y}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}var pu=v.forwardRef((e,t)=>{const{children:n,...r}=e,i=v.Children.toArray(n),s=i.find(d1);if(s){const l=s.props.children,u=i.map(g=>g===s?v.Children.count(l)>1?v.Children.only(null):v.isValidElement(l)?l.props.children:null:g);return d.jsx(gu,{...r,ref:t,children:v.isValidElement(l)?v.cloneElement(l,void 0,u):null})}return d.jsx(gu,{...r,ref:t,children:n})});pu.displayName="Slot";var gu=v.forwardRef((e,t)=>{const{children:n,...r}=e;if(v.isValidElement(n)){const i=p1(n);return v.cloneElement(n,{...f1(r,n.props),ref:t?ja(t,i):i})}return v.Children.count(n)>1?v.Children.only(null):null});gu.displayName="SlotClone";var u1=({children:e})=>d.jsx(d.Fragment,{children:e});function d1(e){return v.isValidElement(e)&&e.type===u1}function f1(e,t){const n={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...u)=>{s(...u),i(...u)}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...e,...n}}function p1(e){var r,i;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=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function g1(e){const t=e+"CollectionProvider",[n,r]=l1(t),[i,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=m=>{const{scope:w,children:_}=m,S=L.useRef(null),A=L.useRef(new Map).current;return d.jsx(i,{scope:w,itemMap:A,collectionRef:S,children:_})};l.displayName=t;const u=e+"CollectionSlot",g=L.forwardRef((m,w)=>{const{scope:_,children:S}=m,A=s(u,_),P=Sn(w,A.collectionRef);return d.jsx(pu,{ref:P,children:S})});g.displayName=u;const f=e+"CollectionItemSlot",h="data-radix-collection-item",y=L.forwardRef((m,w)=>{const{scope:_,children:S,...A}=m,P=L.useRef(null),N=Sn(w,P),D=s(f,_);return L.useEffect(()=>(D.itemMap.set(P,{ref:P,...A}),()=>void D.itemMap.delete(P))),d.jsx(pu,{[h]:"",ref:N,children:S})});y.displayName=f;function x(m){const w=s(e+"CollectionConsumer",m);return L.useCallback(()=>{const S=w.collectionRef.current;if(!S)return[];const A=Array.from(S.querySelectorAll(`[${h}]`));return Array.from(w.itemMap.values()).sort((D,E)=>A.indexOf(D.ref.current)-A.indexOf(E.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:l,Slot:g,ItemSlot:y},x,r]}var h1="VisuallyHidden",hu=v.forwardRef((e,t)=>d.jsx(Ft.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}}));hu.displayName=h1;var mu="ToastProvider",[vu,m1,v1]=g1("Toast"),[Jh,MM]=Ur("Toast",[v1]),[y1,ps]=Jh(mu),Zh=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:i="right",swipeThreshold:s=50,children:l}=e,[u,g]=v.useState(null),[f,h]=v.useState(0),y=v.useRef(!1),x=v.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${mu}\`. Expected non-empty \`string\`.`),d.jsx(vu.Provider,{scope:t,children:d.jsx(y1,{scope:t,label:n,duration:r,swipeDirection:i,swipeThreshold:s,toastCount:f,viewport:u,onViewportChange:g,onToastAdd:v.useCallback(()=>h(m=>m+1),[]),onToastRemove:v.useCallback(()=>h(m=>m-1),[]),isFocusedToastEscapeKeyDownRef:y,isClosePausedRef:x,children:l})})};Zh.displayName=mu;var Qh="ToastViewport",x1=["F8"],yu="toast.viewportPause",xu="toast.viewportResume",em=v.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=x1,label:i="Notifications ({hotkey})",...s}=e,l=ps(Qh,n),u=m1(n),g=v.useRef(null),f=v.useRef(null),h=v.useRef(null),y=v.useRef(null),x=Sn(t,y,l.onViewportChange),m=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=l.toastCount>0;v.useEffect(()=>{const S=A=>{var N;r.length!==0&&r.every(D=>A[D]||A.code===D)&&((N=y.current)==null||N.focus())};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[r]),v.useEffect(()=>{const S=g.current,A=y.current;if(w&&S&&A){const P=()=>{if(!l.isClosePausedRef.current){const V=new CustomEvent(yu);A.dispatchEvent(V),l.isClosePausedRef.current=!0}},N=()=>{if(l.isClosePausedRef.current){const V=new CustomEvent(xu);A.dispatchEvent(V),l.isClosePausedRef.current=!1}},D=V=>{!S.contains(V.relatedTarget)&&N()},E=()=>{S.contains(document.activeElement)||N()};return S.addEventListener("focusin",P),S.addEventListener("focusout",D),S.addEventListener("pointermove",P),S.addEventListener("pointerleave",E),window.addEventListener("blur",P),window.addEventListener("focus",N),()=>{S.removeEventListener("focusin",P),S.removeEventListener("focusout",D),S.removeEventListener("pointermove",P),S.removeEventListener("pointerleave",E),window.removeEventListener("blur",P),window.removeEventListener("focus",N)}}},[w,l.isClosePausedRef]);const _=v.useCallback(({tabbingDirection:S})=>{const P=u().map(N=>{const D=N.ref.current,E=[D,...D1(D)];return S==="forwards"?E:E.reverse()});return(S==="forwards"?P.reverse():P).flat()},[u]);return v.useEffect(()=>{const S=y.current;if(S){const A=P=>{var E,V,W;const N=P.altKey||P.ctrlKey||P.metaKey;if(P.key==="Tab"&&!N){const B=document.activeElement,ee=P.shiftKey;if(P.target===S&&ee){(E=f.current)==null||E.focus();return}const ie=_({tabbingDirection:ee?"backwards":"forwards"}),he=ie.findIndex(U=>U===B);_u(ie.slice(he+1))?P.preventDefault():ee?(V=f.current)==null||V.focus():(W=h.current)==null||W.focus()}};return S.addEventListener("keydown",A),()=>S.removeEventListener("keydown",A)}},[u,_]),d.jsxs(lC,{ref:g,role:"region","aria-label":i.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:w?void 0:"none"},children:[w&&d.jsx(wu,{ref:f,onFocusFromOutsideViewport:()=>{const S=_({tabbingDirection:"forwards"});_u(S)}}),d.jsx(vu.Slot,{scope:n,children:d.jsx(Ft.ol,{tabIndex:-1,...s,ref:x})}),w&&d.jsx(wu,{ref:h,onFocusFromOutsideViewport:()=>{const S=_({tabbingDirection:"backwards"});_u(S)}})]})});em.displayName=Qh;var tm="ToastFocusProxy",wu=v.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=e,s=ps(tm,n);return d.jsx(hu,{"aria-hidden":!0,tabIndex:0,...i,ref:t,style:{position:"fixed"},onFocus:l=>{var f;const u=l.relatedTarget;!((f=s.viewport)!=null&&f.contains(u))&&r()}})});wu.displayName=tm;var gs="Toast",w1="toast.swipeStart",b1="toast.swipeMove",_1="toast.swipeCancel",S1="toast.swipeEnd",nm=v.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:i,onOpenChange:s,...l}=e,[u=!0,g]=Xo({prop:r,defaultProp:i,onChange:s});return d.jsx(Jo,{present:n||u,children:d.jsx(T1,{open:u,...l,ref:t,onClose:()=>g(!1),onPause:qt(e.onPause),onResume:qt(e.onResume),onSwipeStart:Nt(e.onSwipeStart,f=>{f.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Nt(e.onSwipeMove,f=>{const{x:h,y}=f.detail.delta;f.currentTarget.setAttribute("data-swipe","move"),f.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${h}px`),f.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${y}px`)}),onSwipeCancel:Nt(e.onSwipeCancel,f=>{f.currentTarget.setAttribute("data-swipe","cancel"),f.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),f.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),f.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),f.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Nt(e.onSwipeEnd,f=>{const{x:h,y}=f.detail.delta;f.currentTarget.setAttribute("data-swipe","end"),f.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),f.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),f.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${h}px`),f.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${y}px`),g(!1)})})})});nm.displayName=gs;var[C1,E1]=Jh(gs,{onClose(){}}),T1=v.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:i,open:s,onClose:l,onEscapeKeyDown:u,onPause:g,onResume:f,onSwipeStart:h,onSwipeMove:y,onSwipeCancel:x,onSwipeEnd:m,...w}=e,_=ps(gs,n),[S,A]=v.useState(null),P=Sn(t,U=>A(U)),N=v.useRef(null),D=v.useRef(null),E=i||_.duration,V=v.useRef(0),W=v.useRef(E),B=v.useRef(0),{onToastAdd:ee,onToastRemove:H}=_,ce=qt(()=>{var K;(S==null?void 0:S.contains(document.activeElement))&&((K=_.viewport)==null||K.focus()),l()}),ie=v.useCallback(U=>{!U||U===1/0||(window.clearTimeout(B.current),V.current=new Date().getTime(),B.current=window.setTimeout(ce,U))},[ce]);v.useEffect(()=>{const U=_.viewport;if(U){const K=()=>{ie(W.current),f==null||f()},G=()=>{const te=new Date().getTime()-V.current;W.current=W.current-te,window.clearTimeout(B.current),g==null||g()};return U.addEventListener(yu,G),U.addEventListener(xu,K),()=>{U.removeEventListener(yu,G),U.removeEventListener(xu,K)}}},[_.viewport,E,g,f,ie]),v.useEffect(()=>{s&&!_.isClosePausedRef.current&&ie(E)},[s,E,_.isClosePausedRef,ie]),v.useEffect(()=>(ee(),()=>H()),[ee,H]);const he=v.useMemo(()=>S?cm(S):null,[S]);return _.viewport?d.jsxs(d.Fragment,{children:[he&&d.jsx(A1,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:he}),d.jsx(C1,{scope:n,onClose:ce,children:_a.createPortal(d.jsx(vu.ItemSlot,{scope:n,children:d.jsx(sC,{asChild:!0,onEscapeKeyDown:Nt(u,()=>{_.isFocusedToastEscapeKeyDownRef.current||ce(),_.isFocusedToastEscapeKeyDownRef.current=!1}),children:d.jsx(Ft.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":_.swipeDirection,...w,ref:P,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Nt(e.onKeyDown,U=>{U.key==="Escape"&&(u==null||u(U.nativeEvent),U.nativeEvent.defaultPrevented||(_.isFocusedToastEscapeKeyDownRef.current=!0,ce()))}),onPointerDown:Nt(e.onPointerDown,U=>{U.button===0&&(N.current={x:U.clientX,y:U.clientY})}),onPointerMove:Nt(e.onPointerMove,U=>{if(!N.current)return;const K=U.clientX-N.current.x,G=U.clientY-N.current.y,te=!!D.current,Y=["left","right"].includes(_.swipeDirection),J=["left","up"].includes(_.swipeDirection)?Math.min:Math.max,M=Y?J(0,K):0,Q=Y?0:J(0,G),ve=U.pointerType==="touch"?10:2,xe={x:M,y:Q},ye={originalEvent:U,delta:xe};te?(D.current=xe,hs(b1,y,ye,{discrete:!1})):um(xe,_.swipeDirection,ve)?(D.current=xe,hs(w1,h,ye,{discrete:!1}),U.target.setPointerCapture(U.pointerId)):(Math.abs(K)>ve||Math.abs(G)>ve)&&(N.current=null)}),onPointerUp:Nt(e.onPointerUp,U=>{const K=D.current,G=U.target;if(G.hasPointerCapture(U.pointerId)&&G.releasePointerCapture(U.pointerId),D.current=null,N.current=null,K){const te=U.currentTarget,Y={originalEvent:U,delta:K};um(K,_.swipeDirection,_.swipeThreshold)?hs(S1,m,Y,{discrete:!0}):hs(_1,x,Y,{discrete:!0}),te.addEventListener("click",J=>J.preventDefault(),{once:!0})}})})})}),_.viewport)})]}):null}),A1=e=>{const{__scopeToast:t,children:n,...r}=e,i=ps(gs,t),[s,l]=v.useState(!1),[u,g]=v.useState(!1);return N1(()=>l(!0)),v.useEffect(()=>{const f=window.setTimeout(()=>g(!0),1e3);return()=>window.clearTimeout(f)},[]),u?null:d.jsx(Wc,{asChild:!0,children:d.jsx(hu,{...r,children:s&&d.jsxs(d.Fragment,{children:[i.label," ",n]})})})},P1="ToastTitle",rm=v.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return d.jsx(Ft.div,{...r,ref:t})});rm.displayName=P1;var O1="ToastDescription",om=v.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return d.jsx(Ft.div,{...r,ref:t})});om.displayName=O1;var im="ToastAction",am=v.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?d.jsx(lm,{altText:n,asChild:!0,children:d.jsx(bu,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${im}\`. Expected non-empty \`string\`.`),null)});am.displayName=im;var sm="ToastClose",bu=v.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,i=E1(sm,n);return d.jsx(lm,{asChild:!0,children:d.jsx(Ft.button,{type:"button",...r,ref:t,onClick:Nt(e.onClick,i.onClose)})})});bu.displayName=sm;var lm=v.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...i}=e;return d.jsx(Ft.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...i,ref:t})});function cm(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),F1(r)){const i=r.ariaHidden||r.hidden||r.style.display==="none",s=r.dataset.radixToastAnnounceExclude==="";if(!i)if(s){const l=r.dataset.radixToastAnnounceAlt;l&&t.push(l)}else t.push(...cm(r))}}),t}function hs(e,t,n,{discrete:r}){const i=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?yg(i,s):i.dispatchEvent(s)}var um=(e,t,n=0)=>{const r=Math.abs(e.x),i=Math.abs(e.y),s=r>i;return t==="left"||t==="right"?s&&r>n:!s&&i>n};function N1(e=()=>{}){const t=qt(e);fn(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function F1(e){return e.nodeType===e.ELEMENT_NODE}function D1(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function _u(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var k1=Zh,dm=em,fm=nm,pm=rm,gm=om,hm=am,mm=bu;const I1=k1,vm=v.forwardRef(({className:e,...t},n)=>d.jsx(dm,{ref:n,className:Ve("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}));vm.displayName=dm.displayName;const L1=Mc("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"}}),ym=v.forwardRef(({className:e,variant:t,...n},r)=>d.jsx(fm,{ref:r,className:Ve(L1({variant:t}),e),...n}));ym.displayName=fm.displayName;const M1=v.forwardRef(({className:e,...t},n)=>d.jsx(hm,{ref:n,className:Ve("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}));M1.displayName=hm.displayName;const xm=v.forwardRef(({className:e,...t},n)=>d.jsx(mm,{ref:n,className:Ve("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:d.jsx(Tc,{className:"s3-explr-ui-toast-close-icon h-4 w-4"})}));xm.displayName=mm.displayName;const wm=v.forwardRef(({className:e,...t},n)=>d.jsx(pm,{ref:n,className:Ve("s3-explr-ui-toast-title text-sm font-semibold [&+div]:text-xs",e),...t}));wm.displayName=pm.displayName;const bm=v.forwardRef(({className:e,...t},n)=>d.jsx(gm,{ref:n,className:Ve("text-sm opacity-90 font-bold",e),...t}));bm.displayName=gm.displayName;const $1=1,R1=1e6;let Su=0;function V1(){return Su=(Su+1)%Number.MAX_SAFE_INTEGER,Su.toString()}const Cu=new Map,_m=e=>{if(Cu.has(e))return;const t=setTimeout(()=>{Cu.delete(e),ji({type:"REMOVE_TOAST",toastId:e})},R1);Cu.set(e,t)},z1=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,$1)};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?_m(n):e.toasts.forEach(r=>{_m(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)}}},ms=[];let vs={toasts:[]};function ji(e){vs=z1(vs,e),ms.forEach(t=>{t(vs)})}function B1({...e}){const t=V1(),n=i=>ji({type:"UPDATE_TOAST",toast:{...i,id:t}}),r=()=>ji({type:"DISMISS_TOAST",toastId:t});return ji({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:i=>{i||r()}}}),{id:t,dismiss:r,update:n}}function ys(){const[e,t]=v.useState(vs);return v.useEffect(()=>(ms.push(t),()=>{const n=ms.indexOf(t);n>-1&&ms.splice(n,1)}),[e]),{...e,toast:B1,dismiss:n=>ji({type:"DISMISS_TOAST",toastId:n})}}function Sm(){const{toasts:e}=ys();return d.jsxs(I1,{children:[e.map(function({id:t,title:n,description:r,action:i,...s}){return d.jsxs(ym,{...s,className:`s3-explr-ui-toast ${s.className||""}`,children:[d.jsxs("div",{className:"s3-explr-ui-toast-content grid gap-1",children:[n&&d.jsx(wm,{className:"s3-explr-ui-toast-title",children:n}),r&&d.jsx(bm,{className:"s3-explr-ui-toast-description",children:r})]}),i&&d.jsx("div",{className:"s3-explr-ui-toast-action",children:i}),d.jsx(xm,{className:"s3-explr-ui-toast-close"})]},t)}),d.jsx(vm,{className:"s3-explr-ui-toast-viewport"})]})}function Sr(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function Cm(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function U1(...e){return t=>{let n=!1;const r=e.map(i=>{const s=Cm(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():Cm(e[i],null)}}}}function Wi(...e){return v.useCallback(U1(...e),e)}var j1=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Hi=j1.reduce((e,t)=>{const n=v.forwardRef((r,i)=>{const{asChild:s,...l}=r,u=s?qo:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(u,{...l,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function W1(e,t){e&&_a.flushSync(()=>e.dispatchEvent(t))}var H1="DismissableLayer",Eu="dismissableLayer.update",G1="dismissableLayer.pointerDownOutside",q1="dismissableLayer.focusOutside",Em,Tm=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Am=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:l,onDismiss:u,...g}=e,f=v.useContext(Tm),[h,y]=v.useState(null),x=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=v.useState({}),w=Wi(t,W=>y(W)),_=Array.from(f.layers),[S]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),A=_.indexOf(S),P=h?_.indexOf(h):-1,N=f.layersWithOutsidePointerEventsDisabled.size>0,D=P>=A,E=X1(W=>{const B=W.target,ee=[...f.branches].some(H=>H.contains(B));!D||ee||(i==null||i(W),l==null||l(W),W.defaultPrevented||u==null||u())},x),V=J1(W=>{const B=W.target;[...f.branches].some(H=>H.contains(B))||(s==null||s(W),l==null||l(W),W.defaultPrevented||u==null||u())},x);return Cg(W=>{P===f.layers.size-1&&(r==null||r(W),!W.defaultPrevented&&u&&(W.preventDefault(),u()))},x),v.useEffect(()=>{if(h)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(Em=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(h)),f.layers.add(h),Pm(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(x.body.style.pointerEvents=Em)}},[h,x,n,f]),v.useEffect(()=>()=>{h&&(f.layers.delete(h),f.layersWithOutsidePointerEventsDisabled.delete(h),Pm())},[h,f]),v.useEffect(()=>{const W=()=>m({});return document.addEventListener(Eu,W),()=>document.removeEventListener(Eu,W)},[]),d.jsx(Hi.div,{...g,ref:w,style:{pointerEvents:N?D?"auto":"none":void 0,...e.style},onFocusCapture:Sr(e.onFocusCapture,V.onFocusCapture),onBlurCapture:Sr(e.onBlurCapture,V.onBlurCapture),onPointerDownCapture:Sr(e.onPointerDownCapture,E.onPointerDownCapture)})});Am.displayName=H1;var K1="DismissableLayerBranch",Y1=v.forwardRef((e,t)=>{const n=v.useContext(Tm),r=v.useRef(null),i=Wi(t,r);return v.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),d.jsx(Hi.div,{...e,ref:i})});Y1.displayName=K1;function X1(e,t=globalThis==null?void 0:globalThis.document){const n=qt(e),r=v.useRef(!1),i=v.useRef(()=>{});return v.useEffect(()=>{const s=u=>{if(u.target&&!r.current){let g=function(){Om(G1,n,f,{discrete:!0})};const f={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=g,t.addEventListener("click",i.current,{once:!0})):g()}else t.removeEventListener("click",i.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",s),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function J1(e,t=globalThis==null?void 0:globalThis.document){const n=qt(e),r=v.useRef(!1);return v.useEffect(()=>{const i=s=>{s.target&&!r.current&&Om(q1,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Pm(){const e=new CustomEvent(Eu);document.dispatchEvent(e)}function Om(e,t,n,{discrete:r}){const i=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?W1(i,s):i.dispatchEvent(s)}const Z1=["top","right","bottom","left"],Gr=Math.min,pn=Math.max,xs=Math.round,ws=Math.floor,lr=e=>({x:e,y:e}),Q1={left:"right",right:"left",bottom:"top",top:"bottom"},eT={start:"end",end:"start"};function Tu(e,t,n){return pn(e,Gr(t,n))}function Cr(e,t){return typeof e=="function"?e(t):e}function Er(e){return e.split("-")[0]}function ai(e){return e.split("-")[1]}function Au(e){return e==="x"?"y":"x"}function Pu(e){return e==="y"?"height":"width"}function qr(e){return["top","bottom"].includes(Er(e))?"y":"x"}function Ou(e){return Au(qr(e))}function tT(e,t,n){n===void 0&&(n=!1);const r=ai(e),i=Ou(e),s=Pu(i);let l=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(l=bs(l)),[l,bs(l)]}function nT(e){const t=bs(e);return[Nu(e),t,Nu(t)]}function Nu(e){return e.replace(/start|end/g,t=>eT[t])}function rT(e,t,n){const r=["left","right"],i=["right","left"],s=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?s:l;default:return[]}}function oT(e,t,n,r){const i=ai(e);let s=rT(Er(e),n==="start",r);return i&&(s=s.map(l=>l+"-"+i),t&&(s=s.concat(s.map(Nu)))),s}function bs(e){return e.replace(/left|right|bottom|top/g,t=>Q1[t])}function iT(e){return{top:0,right:0,bottom:0,left:0,...e}}function Nm(e){return typeof e!="number"?iT(e):{top:e,right:e,bottom:e,left:e}}function _s(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Fm(e,t,n){let{reference:r,floating:i}=e;const s=qr(t),l=Ou(t),u=Pu(l),g=Er(t),f=s==="y",h=r.x+r.width/2-i.width/2,y=r.y+r.height/2-i.height/2,x=r[u]/2-i[u]/2;let m;switch(g){case"top":m={x:h,y:r.y-i.height};break;case"bottom":m={x:h,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y};break;case"left":m={x:r.x-i.width,y};break;default:m={x:r.x,y:r.y}}switch(ai(t)){case"start":m[l]-=x*(n&&f?-1:1);break;case"end":m[l]+=x*(n&&f?-1:1);break}return m}const aT=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:l}=n,u=s.filter(Boolean),g=await(l.isRTL==null?void 0:l.isRTL(t));let f=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:h,y}=Fm(f,r,g),x=r,m={},w=0;for(let _=0;_<u.length;_++){const{name:S,fn:A}=u[_],{x:P,y:N,data:D,reset:E}=await A({x:h,y,initialPlacement:r,placement:x,strategy:i,middlewareData:m,rects:f,platform:l,elements:{reference:e,floating:t}});h=P??h,y=N??y,m={...m,[S]:{...m[S],...D}},E&&w<=50&&(w++,typeof E=="object"&&(E.placement&&(x=E.placement),E.rects&&(f=E.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:i}):E.rects),{x:h,y}=Fm(f,x,g)),_=-1)}return{x:h,y,placement:x,strategy:i,middlewareData:m}};async function Gi(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:s,rects:l,elements:u,strategy:g}=e,{boundary:f="clippingAncestors",rootBoundary:h="viewport",elementContext:y="floating",altBoundary:x=!1,padding:m=0}=Cr(t,e),w=Nm(m),S=u[x?y==="floating"?"reference":"floating":y],A=_s(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(S)))==null||n?S:S.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(u.floating)),boundary:f,rootBoundary:h,strategy:g})),P=y==="floating"?{x:r,y:i,width:l.floating.width,height:l.floating.height}:l.reference,N=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u.floating)),D=await(s.isElement==null?void 0:s.isElement(N))?await(s.getScale==null?void 0:s.getScale(N))||{x:1,y:1}:{x:1,y:1},E=_s(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:P,offsetParent:N,strategy:g}):P);return{top:(A.top-E.top+w.top)/D.y,bottom:(E.bottom-A.bottom+w.bottom)/D.y,left:(A.left-E.left+w.left)/D.x,right:(E.right-A.right+w.right)/D.x}}const sT=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:s,platform:l,elements:u,middlewareData:g}=t,{element:f,padding:h=0}=Cr(e,t)||{};if(f==null)return{};const y=Nm(h),x={x:n,y:r},m=Ou(i),w=Pu(m),_=await l.getDimensions(f),S=m==="y",A=S?"top":"left",P=S?"bottom":"right",N=S?"clientHeight":"clientWidth",D=s.reference[w]+s.reference[m]-x[m]-s.floating[w],E=x[m]-s.reference[m],V=await(l.getOffsetParent==null?void 0:l.getOffsetParent(f));let W=V?V[N]:0;(!W||!await(l.isElement==null?void 0:l.isElement(V)))&&(W=u.floating[N]||s.floating[w]);const B=D/2-E/2,ee=W/2-_[w]/2-1,H=Gr(y[A],ee),ce=Gr(y[P],ee),ie=H,he=W-_[w]-ce,U=W/2-_[w]/2+B,K=Tu(ie,U,he),G=!g.arrow&&ai(i)!=null&&U!==K&&s.reference[w]/2-(U<ie?H:ce)-_[w]/2<0,te=G?U<ie?U-ie:U-he:0;return{[m]:x[m]+te,data:{[m]:K,centerOffset:U-K-te,...G&&{alignmentOffset:te}},reset:G}}}),lT=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:s,rects:l,initialPlacement:u,platform:g,elements:f}=t,{mainAxis:h=!0,crossAxis:y=!0,fallbackPlacements:x,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:_=!0,...S}=Cr(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const A=Er(i),P=qr(u),N=Er(u)===u,D=await(g.isRTL==null?void 0:g.isRTL(f.floating)),E=x||(N||!_?[bs(u)]:nT(u)),V=w!=="none";!x&&V&&E.push(...oT(u,_,w,D));const W=[u,...E],B=await Gi(t,S),ee=[];let H=((r=s.flip)==null?void 0:r.overflows)||[];if(h&&ee.push(B[A]),y){const U=tT(i,l,D);ee.push(B[U[0]],B[U[1]])}if(H=[...H,{placement:i,overflows:ee}],!ee.every(U=>U<=0)){var ce,ie;const U=(((ce=s.flip)==null?void 0:ce.index)||0)+1,K=W[U];if(K)return{data:{index:U,overflows:H},reset:{placement:K}};let G=(ie=H.filter(te=>te.overflows[0]<=0).sort((te,Y)=>te.overflows[1]-Y.overflows[1])[0])==null?void 0:ie.placement;if(!G)switch(m){case"bestFit":{var he;const te=(he=H.filter(Y=>{if(V){const J=qr(Y.placement);return J===P||J==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter(J=>J>0).reduce((J,M)=>J+M,0)]).sort((Y,J)=>Y[1]-J[1])[0])==null?void 0:he[0];te&&(G=te);break}case"initialPlacement":G=u;break}if(i!==G)return{reset:{placement:G}}}return{}}}};function Dm(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function km(e){return Z1.some(t=>e[t]>=0)}const cT=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=Cr(e,t);switch(r){case"referenceHidden":{const s=await Gi(t,{...i,elementContext:"reference"}),l=Dm(s,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:km(l)}}}case"escaped":{const s=await Gi(t,{...i,altBoundary:!0}),l=Dm(s,n.floating);return{data:{escapedOffsets:l,escaped:km(l)}}}default:return{}}}}};async function uT(e,t){const{placement:n,platform:r,elements:i}=e,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),l=Er(n),u=ai(n),g=qr(n)==="y",f=["left","top"].includes(l)?-1:1,h=s&&g?-1:1,y=Cr(t,e);let{mainAxis:x,crossAxis:m,alignmentAxis:w}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:y.mainAxis||0,crossAxis:y.crossAxis||0,alignmentAxis:y.alignmentAxis};return u&&typeof w=="number"&&(m=u==="end"?w*-1:w),g?{x:m*h,y:x*f}:{x:x*f,y:m*h}}const dT=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:s,placement:l,middlewareData:u}=t,g=await uT(t,e);return l===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:i+g.x,y:s+g.y,data:{...g,placement:l}}}}},fT=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:u={fn:S=>{let{x:A,y:P}=S;return{x:A,y:P}}},...g}=Cr(e,t),f={x:n,y:r},h=await Gi(t,g),y=qr(Er(i)),x=Au(y);let m=f[x],w=f[y];if(s){const S=x==="y"?"top":"left",A=x==="y"?"bottom":"right",P=m+h[S],N=m-h[A];m=Tu(P,m,N)}if(l){const S=y==="y"?"top":"left",A=y==="y"?"bottom":"right",P=w+h[S],N=w-h[A];w=Tu(P,w,N)}const _=u.fn({...t,[x]:m,[y]:w});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[x]:s,[y]:l}}}}}},pT=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:s,middlewareData:l}=t,{offset:u=0,mainAxis:g=!0,crossAxis:f=!0}=Cr(e,t),h={x:n,y:r},y=qr(i),x=Au(y);let m=h[x],w=h[y];const _=Cr(u,t),S=typeof _=="number"?{mainAxis:_,crossAxis:0}:{mainAxis:0,crossAxis:0,..._};if(g){const N=x==="y"?"height":"width",D=s.reference[x]-s.floating[N]+S.mainAxis,E=s.reference[x]+s.reference[N]-S.mainAxis;m<D?m=D:m>E&&(m=E)}if(f){var A,P;const N=x==="y"?"width":"height",D=["top","left"].includes(Er(i)),E=s.reference[y]-s.floating[N]+(D&&((A=l.offset)==null?void 0:A[y])||0)+(D?0:S.crossAxis),V=s.reference[y]+s.reference[N]+(D?0:((P=l.offset)==null?void 0:P[y])||0)-(D?S.crossAxis:0);w<E?w=E:w>V&&(w=V)}return{[x]:m,[y]:w}}}},gT=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:s,platform:l,elements:u}=t,{apply:g=()=>{},...f}=Cr(e,t),h=await Gi(t,f),y=Er(i),x=ai(i),m=qr(i)==="y",{width:w,height:_}=s.floating;let S,A;y==="top"||y==="bottom"?(S=y,A=x===(await(l.isRTL==null?void 0:l.isRTL(u.floating))?"start":"end")?"left":"right"):(A=y,S=x==="end"?"top":"bottom");const P=_-h.top-h.bottom,N=w-h.left-h.right,D=Gr(_-h[S],P),E=Gr(w-h[A],N),V=!t.middlewareData.shift;let W=D,B=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(B=N),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(W=P),V&&!x){const H=pn(h.left,0),ce=pn(h.right,0),ie=pn(h.top,0),he=pn(h.bottom,0);m?B=w-2*(H!==0||ce!==0?H+ce:pn(h.left,h.right)):W=_-2*(ie!==0||he!==0?ie+he:pn(h.top,h.bottom))}await g({...t,availableWidth:B,availableHeight:W});const ee=await l.getDimensions(u.floating);return w!==ee.width||_!==ee.height?{reset:{rects:!0}}:{}}}};function Ss(){return typeof window<"u"}function si(e){return Im(e)?(e.nodeName||"").toLowerCase():"#document"}function gn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function cr(e){var t;return(t=(Im(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Im(e){return Ss()?e instanceof Node||e instanceof gn(e).Node:!1}function Wn(e){return Ss()?e instanceof Element||e instanceof gn(e).Element:!1}function ur(e){return Ss()?e instanceof HTMLElement||e instanceof gn(e).HTMLElement:!1}function Lm(e){return!Ss()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof gn(e).ShadowRoot}function qi(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Hn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function hT(e){return["table","td","th"].includes(si(e))}function Cs(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Fu(e){const t=Du(),n=Wn(e)?Hn(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 mT(e){let t=Kr(e);for(;ur(t)&&!li(t);){if(Fu(t))return t;if(Cs(t))return null;t=Kr(t)}return null}function Du(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function li(e){return["html","body","#document"].includes(si(e))}function Hn(e){return gn(e).getComputedStyle(e)}function Es(e){return Wn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Kr(e){if(si(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Lm(e)&&e.host||cr(e);return Lm(t)?t.host:t}function Mm(e){const t=Kr(e);return li(t)?e.ownerDocument?e.ownerDocument.body:e.body:ur(t)&&qi(t)?t:Mm(t)}function Ki(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Mm(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),l=gn(i);if(s){const u=ku(l);return t.concat(l,l.visualViewport||[],qi(i)?i:[],u&&n?Ki(u):[])}return t.concat(i,Ki(i,[],n))}function ku(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function $m(e){const t=Hn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=ur(e),s=i?e.offsetWidth:n,l=i?e.offsetHeight:r,u=xs(n)!==s||xs(r)!==l;return u&&(n=s,r=l),{width:n,height:r,$:u}}function Iu(e){return Wn(e)?e:e.contextElement}function ci(e){const t=Iu(e);if(!ur(t))return lr(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=$m(t);let l=(s?xs(n.width):n.width)/r,u=(s?xs(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!u||!Number.isFinite(u))&&(u=1),{x:l,y:u}}const vT=lr(0);function Rm(e){const t=gn(e);return!Du()||!t.visualViewport?vT:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function yT(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==gn(e)?!1:t}function Co(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=Iu(e);let l=lr(1);t&&(r?Wn(r)&&(l=ci(r)):l=ci(e));const u=yT(s,n,r)?Rm(s):lr(0);let g=(i.left+u.x)/l.x,f=(i.top+u.y)/l.y,h=i.width/l.x,y=i.height/l.y;if(s){const x=gn(s),m=r&&Wn(r)?gn(r):r;let w=x,_=ku(w);for(;_&&r&&m!==w;){const S=ci(_),A=_.getBoundingClientRect(),P=Hn(_),N=A.left+(_.clientLeft+parseFloat(P.paddingLeft))*S.x,D=A.top+(_.clientTop+parseFloat(P.paddingTop))*S.y;g*=S.x,f*=S.y,h*=S.x,y*=S.y,g+=N,f+=D,w=gn(_),_=ku(w)}}return _s({width:h,height:y,x:g,y:f})}function Lu(e,t){const n=Es(e).scrollLeft;return t?t.left+n:Co(cr(e)).left+n}function Vm(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-(n?0:Lu(e,r)),s=r.top+t.scrollTop;return{x:i,y:s}}function xT(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const s=i==="fixed",l=cr(r),u=t?Cs(t.floating):!1;if(r===l||u&&s)return n;let g={scrollLeft:0,scrollTop:0},f=lr(1);const h=lr(0),y=ur(r);if((y||!y&&!s)&&((si(r)!=="body"||qi(l))&&(g=Es(r)),ur(r))){const m=Co(r);f=ci(r),h.x=m.x+r.clientLeft,h.y=m.y+r.clientTop}const x=l&&!y&&!s?Vm(l,g,!0):lr(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-g.scrollLeft*f.x+h.x+x.x,y:n.y*f.y-g.scrollTop*f.y+h.y+x.y}}function wT(e){return Array.from(e.getClientRects())}function bT(e){const t=cr(e),n=Es(e),r=e.ownerDocument.body,i=pn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=pn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+Lu(e);const u=-n.scrollTop;return Hn(r).direction==="rtl"&&(l+=pn(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:l,y:u}}function _T(e,t){const n=gn(e),r=cr(e),i=n.visualViewport;let s=r.clientWidth,l=r.clientHeight,u=0,g=0;if(i){s=i.width,l=i.height;const f=Du();(!f||f&&t==="fixed")&&(u=i.offsetLeft,g=i.offsetTop)}return{width:s,height:l,x:u,y:g}}function ST(e,t){const n=Co(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=ur(e)?ci(e):lr(1),l=e.clientWidth*s.x,u=e.clientHeight*s.y,g=i*s.x,f=r*s.y;return{width:l,height:u,x:g,y:f}}function zm(e,t,n){let r;if(t==="viewport")r=_T(e,n);else if(t==="document")r=bT(cr(e));else if(Wn(t))r=ST(t,n);else{const i=Rm(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return _s(r)}function Bm(e,t){const n=Kr(e);return n===t||!Wn(n)||li(n)?!1:Hn(n).position==="fixed"||Bm(n,t)}function CT(e,t){const n=t.get(e);if(n)return n;let r=Ki(e,[],!1).filter(u=>Wn(u)&&si(u)!=="body"),i=null;const s=Hn(e).position==="fixed";let l=s?Kr(e):e;for(;Wn(l)&&!li(l);){const u=Hn(l),g=Fu(l);!g&&u.position==="fixed"&&(i=null),(s?!g&&!i:!g&&u.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||qi(l)&&!g&&Bm(e,l))?r=r.filter(h=>h!==l):i=u,l=Kr(l)}return t.set(e,r),r}function ET(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const l=[...n==="clippingAncestors"?Cs(t)?[]:CT(t,this._c):[].concat(n),r],u=l[0],g=l.reduce((f,h)=>{const y=zm(t,h,i);return f.top=pn(y.top,f.top),f.right=Gr(y.right,f.right),f.bottom=Gr(y.bottom,f.bottom),f.left=pn(y.left,f.left),f},zm(t,u,i));return{width:g.right-g.left,height:g.bottom-g.top,x:g.left,y:g.top}}function TT(e){const{width:t,height:n}=$m(e);return{width:t,height:n}}function AT(e,t,n){const r=ur(t),i=cr(t),s=n==="fixed",l=Co(e,!0,s,t);let u={scrollLeft:0,scrollTop:0};const g=lr(0);if(r||!r&&!s)if((si(t)!=="body"||qi(i))&&(u=Es(t)),r){const x=Co(t,!0,s,t);g.x=x.x+t.clientLeft,g.y=x.y+t.clientTop}else i&&(g.x=Lu(i));const f=i&&!r&&!s?Vm(i,u):lr(0),h=l.left+u.scrollLeft-g.x-f.x,y=l.top+u.scrollTop-g.y-f.y;return{x:h,y,width:l.width,height:l.height}}function Mu(e){return Hn(e).position==="static"}function Um(e,t){if(!ur(e)||Hn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return cr(e)===n&&(n=n.ownerDocument.body),n}function jm(e,t){const n=gn(e);if(Cs(e))return n;if(!ur(e)){let i=Kr(e);for(;i&&!li(i);){if(Wn(i)&&!Mu(i))return i;i=Kr(i)}return n}let r=Um(e,t);for(;r&&hT(r)&&Mu(r);)r=Um(r,t);return r&&li(r)&&Mu(r)&&!Fu(r)?n:r||mT(e)||n}const PT=async function(e){const t=this.getOffsetParent||jm,n=this.getDimensions,r=await n(e.floating);return{reference:AT(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function OT(e){return Hn(e).direction==="rtl"}const NT={convertOffsetParentRelativeRectToViewportRelativeRect:xT,getDocumentElement:cr,getClippingRect:ET,getOffsetParent:jm,getElementRects:PT,getClientRects:wT,getDimensions:TT,getScale:ci,isElement:Wn,isRTL:OT};function FT(e,t){let n=null,r;const i=cr(e);function s(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function l(u,g){u===void 0&&(u=!1),g===void 0&&(g=1),s();const{left:f,top:h,width:y,height:x}=e.getBoundingClientRect();if(u||t(),!y||!x)return;const m=ws(h),w=ws(i.clientWidth-(f+y)),_=ws(i.clientHeight-(h+x)),S=ws(f),P={rootMargin:-m+"px "+-w+"px "+-_+"px "+-S+"px",threshold:pn(0,Gr(1,g))||1};let N=!0;function D(E){const V=E[0].intersectionRatio;if(V!==g){if(!N)return l();V?l(!1,V):r=setTimeout(()=>{l(!1,1e-7)},1e3)}N=!1}try{n=new IntersectionObserver(D,{...P,root:i.ownerDocument})}catch{n=new IntersectionObserver(D,P)}n.observe(e)}return l(!0),s}function DT(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:g=!1}=r,f=Iu(e),h=i||s?[...f?Ki(f):[],...Ki(t)]:[];h.forEach(A=>{i&&A.addEventListener("scroll",n,{passive:!0}),s&&A.addEventListener("resize",n)});const y=f&&u?FT(f,n):null;let x=-1,m=null;l&&(m=new ResizeObserver(A=>{let[P]=A;P&&P.target===f&&m&&(m.unobserve(t),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var N;(N=m)==null||N.observe(t)})),n()}),f&&!g&&m.observe(f),m.observe(t));let w,_=g?Co(e):null;g&&S();function S(){const A=Co(e);_&&(A.x!==_.x||A.y!==_.y||A.width!==_.width||A.height!==_.height)&&n(),_=A,w=requestAnimationFrame(S)}return n(),()=>{var A;h.forEach(P=>{i&&P.removeEventListener("scroll",n),s&&P.removeEventListener("resize",n)}),y==null||y(),(A=m)==null||A.disconnect(),m=null,g&&cancelAnimationFrame(w)}}const kT=dT,IT=fT,LT=lT,MT=gT,$T=cT,Wm=sT,RT=pT,VT=(e,t,n)=>{const r=new Map,i={platform:NT,...n},s={...i.platform,_c:r};return aT(e,t,{...i,platform:s})};var Ts=typeof document<"u"?L.useLayoutEffect:L.useEffect;function As(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,i;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(!As(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const s=i[r];if(!(s==="_owner"&&e.$$typeof)&&!As(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Hm(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Gm(e,t){const n=Hm(e);return Math.round(t*n)/n}function $u(e){const t=v.useRef(e);return Ts(()=>{t.current=e}),t}function zT(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:s,floating:l}={},transform:u=!0,whileElementsMounted:g,open:f}=e,[h,y]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[x,m]=v.useState(r);As(x,r)||m(r);const[w,_]=v.useState(null),[S,A]=v.useState(null),P=v.useCallback(Y=>{Y!==V.current&&(V.current=Y,_(Y))},[]),N=v.useCallback(Y=>{Y!==W.current&&(W.current=Y,A(Y))},[]),D=s||w,E=l||S,V=v.useRef(null),W=v.useRef(null),B=v.useRef(h),ee=g!=null,H=$u(g),ce=$u(i),ie=$u(f),he=v.useCallback(()=>{if(!V.current||!W.current)return;const Y={placement:t,strategy:n,middleware:x};ce.current&&(Y.platform=ce.current),VT(V.current,W.current,Y).then(J=>{const M={...J,isPositioned:ie.current!==!1};U.current&&!As(B.current,M)&&(B.current=M,_a.flushSync(()=>{y(M)}))})},[x,t,n,ce,ie]);Ts(()=>{f===!1&&B.current.isPositioned&&(B.current.isPositioned=!1,y(Y=>({...Y,isPositioned:!1})))},[f]);const U=v.useRef(!1);Ts(()=>(U.current=!0,()=>{U.current=!1}),[]),Ts(()=>{if(D&&(V.current=D),E&&(W.current=E),D&&E){if(H.current)return H.current(D,E,he);he()}},[D,E,he,H,ee]);const K=v.useMemo(()=>({reference:V,floating:W,setReference:P,setFloating:N}),[P,N]),G=v.useMemo(()=>({reference:D,floating:E}),[D,E]),te=v.useMemo(()=>{const Y={position:n,left:0,top:0};if(!G.floating)return Y;const J=Gm(G.floating,h.x),M=Gm(G.floating,h.y);return u?{...Y,transform:"translate("+J+"px, "+M+"px)",...Hm(G.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:J,top:M}},[n,u,G.floating,h.x,h.y]);return v.useMemo(()=>({...h,update:he,refs:K,elements:G,floatingStyles:te}),[h,he,K,G,te])}const BT=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Wm({element:r.current,padding:i}).fn(n):{}:r?Wm({element:r,padding:i}).fn(n):{}}}},UT=(e,t)=>({...kT(e),options:[e,t]}),jT=(e,t)=>({...IT(e),options:[e,t]}),WT=(e,t)=>({...RT(e),options:[e,t]}),HT=(e,t)=>({...LT(e),options:[e,t]}),GT=(e,t)=>({...MT(e),options:[e,t]}),qT=(e,t)=>({...$T(e),options:[e,t]}),KT=(e,t)=>({...BT(e),options:[e,t]});var YT=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],XT=YT.reduce((e,t)=>{const n=v.forwardRef((r,i)=>{const{asChild:s,...l}=r,u=s?qo:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(u,{...l,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),JT="Arrow",qm=v.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...s}=e;return d.jsx(XT.svg,{...s,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});qm.displayName=JT;var ZT=qm;function Km(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function QT(...e){return t=>{let n=!1;const r=e.map(i=>{const s=Km(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():Km(e[i],null)}}}}function Ym(...e){return v.useCallback(QT(...e),e)}var eA=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Xm=eA.reduce((e,t)=>{const n=v.forwardRef((r,i)=>{const{asChild:s,...l}=r,u=s?qo:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(u,{...l,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Ru="Popper",[Jm,Zm]=Ur(Ru),[tA,Qm]=Jm(Ru),ev=e=>{const{__scopePopper:t,children:n}=e,[r,i]=v.useState(null);return d.jsx(tA,{scope:t,anchor:r,onAnchorChange:i,children:n})};ev.displayName=Ru;var tv="PopperAnchor",nv=v.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,s=Qm(tv,n),l=v.useRef(null),u=Ym(t,l);return v.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||l.current)}),r?null:d.jsx(Xm.div,{...i,ref:u})});nv.displayName=tv;var Vu="PopperContent",[nA,rA]=Jm(Vu),rv=v.forwardRef((e,t)=>{var Ee,Pe,Ne,Te,He,fe;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:s="center",alignOffset:l=0,arrowPadding:u=0,avoidCollisions:g=!0,collisionBoundary:f=[],collisionPadding:h=0,sticky:y="partial",hideWhenDetached:x=!1,updatePositionStrategy:m="optimized",onPlaced:w,..._}=e,S=Qm(Vu,n),[A,P]=v.useState(null),N=Ym(t,Xe=>P(Xe)),[D,E]=v.useState(null),V=mg(D),W=(V==null?void 0:V.width)??0,B=(V==null?void 0:V.height)??0,ee=r+(s!=="center"?"-"+s:""),H=typeof h=="number"?h:{top:0,right:0,bottom:0,left:0,...h},ce=Array.isArray(f)?f:[f],ie=ce.length>0,he={padding:H,boundary:ce.filter(iA),altBoundary:ie},{refs:U,floatingStyles:K,placement:G,isPositioned:te,middlewareData:Y}=zT({strategy:"fixed",placement:ee,whileElementsMounted:(...Xe)=>DT(...Xe,{animationFrame:m==="always"}),elements:{reference:S.anchor},middleware:[UT({mainAxis:i+B,alignmentAxis:l}),g&&jT({mainAxis:!0,crossAxis:!1,limiter:y==="partial"?WT():void 0,...he}),g&&HT({...he}),GT({...he,apply:({elements:Xe,rects:at,availableWidth:$t,availableHeight:Yt})=>{const{width:mt,height:F}=at.reference,z=Xe.floating.style;z.setProperty("--radix-popper-available-width",`${$t}px`),z.setProperty("--radix-popper-available-height",`${Yt}px`),z.setProperty("--radix-popper-anchor-width",`${mt}px`),z.setProperty("--radix-popper-anchor-height",`${F}px`)}}),D&&KT({element:D,padding:u}),aA({arrowWidth:W,arrowHeight:B}),x&&qT({strategy:"referenceHidden",...he})]}),[J,M]=av(G),Q=qt(w);fn(()=>{te&&(Q==null||Q())},[te,Q]);const ve=(Ee=Y.arrow)==null?void 0:Ee.x,xe=(Pe=Y.arrow)==null?void 0:Pe.y,ye=((Ne=Y.arrow)==null?void 0:Ne.centerOffset)!==0,[Se,we]=v.useState();return fn(()=>{A&&we(window.getComputedStyle(A).zIndex)},[A]),d.jsx("div",{ref:U.setFloating,"data-radix-popper-content-wrapper":"",style:{...K,transform:te?K.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Se,"--radix-popper-transform-origin":[(Te=Y.transformOrigin)==null?void 0:Te.x,(He=Y.transformOrigin)==null?void 0:He.y].join(" "),...((fe=Y.hide)==null?void 0:fe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(nA,{scope:n,placedSide:J,onArrowChange:E,arrowX:ve,arrowY:xe,shouldHideArrow:ye,children:d.jsx(Xm.div,{"data-side":J,"data-align":M,..._,ref:N,style:{..._.style,animation:te?void 0:"none"}})})})});rv.displayName=Vu;var ov="PopperArrow",oA={top:"bottom",right:"left",bottom:"top",left:"right"},iv=v.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,s=rA(ov,r),l=oA[s.placedSide];return d.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:d.jsx(ZT,{...i,ref:n,style:{...i.style,display:"block"}})})});iv.displayName=ov;function iA(e){return e!==null}var aA=e=>({name:"transformOrigin",options:e,fn(t){var S,A,P;const{placement:n,rects:r,middlewareData:i}=t,l=((S=i.arrow)==null?void 0:S.centerOffset)!==0,u=l?0:e.arrowWidth,g=l?0:e.arrowHeight,[f,h]=av(n),y={start:"0%",center:"50%",end:"100%"}[h],x=(((A=i.arrow)==null?void 0:A.x)??0)+u/2,m=(((P=i.arrow)==null?void 0:P.y)??0)+g/2;let w="",_="";return f==="bottom"?(w=l?y:`${x}px`,_=`${-g}px`):f==="top"?(w=l?y:`${x}px`,_=`${r.floating.height+g}px`):f==="right"?(w=`${-g}px`,_=l?y:`${m}px`):f==="left"&&(w=`${r.floating.width+g}px`,_=l?y:`${m}px`),{data:{x:w,y:_}}}});function av(e){const[t,n="center"]=e.split("-");return[t,n]}var sA=ev,lA=nv,cA=rv,uA=iv,dA="Portal",sv=v.forwardRef((e,t)=>{var u;const{container:n,...r}=e,[i,s]=v.useState(!1);fn(()=>s(!0),[]);const l=n||i&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return l?jl.createPortal(d.jsx(Hi.div,{...r,ref:t}),l):null});sv.displayName=dA;function fA(e,t){return v.useReducer((n,r)=>t[n][r]??n,e)}var zu=e=>{const{present:t,children:n}=e,r=pA(t),i=typeof n=="function"?n({present:r.isPresent}):v.Children.only(n),s=Wi(r.ref,gA(i));return typeof n=="function"||r.isPresent?v.cloneElement(i,{ref:s}):null};zu.displayName="Presence";function pA(e){const[t,n]=v.useState(),r=v.useRef({}),i=v.useRef(e),s=v.useRef("none"),l=e?"mounted":"unmounted",[u,g]=fA(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const f=Ps(r.current);s.current=u==="mounted"?f:"none"},[u]),fn(()=>{const f=r.current,h=i.current;if(h!==e){const x=s.current,m=Ps(f);e?g("MOUNT"):m==="none"||(f==null?void 0:f.display)==="none"?g("UNMOUNT"):g(h&&x!==m?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,g]),fn(()=>{if(t){let f;const h=t.ownerDocument.defaultView??window,y=m=>{const _=Ps(r.current).includes(m.animationName);if(m.target===t&&_&&(g("ANIMATION_END"),!i.current)){const S=t.style.animationFillMode;t.style.animationFillMode="forwards",f=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=S)})}},x=m=>{m.target===t&&(s.current=Ps(r.current))};return t.addEventListener("animationstart",x),t.addEventListener("animationcancel",y),t.addEventListener("animationend",y),()=>{h.clearTimeout(f),t.removeEventListener("animationstart",x),t.removeEventListener("animationcancel",y),t.removeEventListener("animationend",y)}}else g("ANIMATION_END")},[t,g]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:v.useCallback(f=>{f&&(r.current=getComputedStyle(f)),n(f)},[])}}function Ps(e){return(e==null?void 0:e.animationName)||"none"}function gA(e){var r,i;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=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var hA="VisuallyHidden",lv=v.forwardRef((e,t)=>d.jsx(Hi.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}}));lv.displayName=hA;var mA=lv,[Os,$M]=Ur("Tooltip",[Zm]),Ns=Zm(),cv="TooltipProvider",vA=700,Bu="tooltip.open",[yA,Uu]=Os(cv),uv=e=>{const{__scopeTooltip:t,delayDuration:n=vA,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:s}=e,[l,u]=v.useState(!0),g=v.useRef(!1),f=v.useRef(0);return v.useEffect(()=>{const h=f.current;return()=>window.clearTimeout(h)},[]),d.jsx(yA,{scope:t,isOpenDelayed:l,delayDuration:n,onOpen:v.useCallback(()=>{window.clearTimeout(f.current),u(!1)},[]),onClose:v.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>u(!0),r)},[r]),isPointerInTransitRef:g,onPointerInTransitChange:v.useCallback(h=>{g.current=h},[]),disableHoverableContent:i,children:s})};uv.displayName=cv;var Fs="Tooltip",[xA,Yi]=Os(Fs),dv=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i=!1,onOpenChange:s,disableHoverableContent:l,delayDuration:u}=e,g=Uu(Fs,e.__scopeTooltip),f=Ns(t),[h,y]=v.useState(null),x=Zo(),m=v.useRef(0),w=l??g.disableHoverableContent,_=u??g.delayDuration,S=v.useRef(!1),[A=!1,P]=Xo({prop:r,defaultProp:i,onChange:W=>{W?(g.onOpen(),document.dispatchEvent(new CustomEvent(Bu))):g.onClose(),s==null||s(W)}}),N=v.useMemo(()=>A?S.current?"delayed-open":"instant-open":"closed",[A]),D=v.useCallback(()=>{window.clearTimeout(m.current),m.current=0,S.current=!1,P(!0)},[P]),E=v.useCallback(()=>{window.clearTimeout(m.current),m.current=0,P(!1)},[P]),V=v.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{S.current=!0,P(!0),m.current=0},_)},[_,P]);return v.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),d.jsx(sA,{...f,children:d.jsx(xA,{scope:t,contentId:x,open:A,stateAttribute:N,trigger:h,onTriggerChange:y,onTriggerEnter:v.useCallback(()=>{g.isOpenDelayed?V():D()},[g.isOpenDelayed,V,D]),onTriggerLeave:v.useCallback(()=>{w?E():(window.clearTimeout(m.current),m.current=0)},[E,w]),onOpen:D,onClose:E,disableHoverableContent:w,children:n})})};dv.displayName=Fs;var ju="TooltipTrigger",fv=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Yi(ju,n),s=Uu(ju,n),l=Ns(n),u=v.useRef(null),g=Wi(t,u,i.onTriggerChange),f=v.useRef(!1),h=v.useRef(!1),y=v.useCallback(()=>f.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",y),[y]),d.jsx(lA,{asChild:!0,...l,children:d.jsx(Hi.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:g,onPointerMove:Sr(e.onPointerMove,x=>{x.pointerType!=="touch"&&!h.current&&!s.isPointerInTransitRef.current&&(i.onTriggerEnter(),h.current=!0)}),onPointerLeave:Sr(e.onPointerLeave,()=>{i.onTriggerLeave(),h.current=!1}),onPointerDown:Sr(e.onPointerDown,()=>{f.current=!0,document.addEventListener("pointerup",y,{once:!0})}),onFocus:Sr(e.onFocus,()=>{f.current||i.onOpen()}),onBlur:Sr(e.onBlur,i.onClose),onClick:Sr(e.onClick,i.onClose)})})});fv.displayName=ju;var Wu="TooltipPortal",[wA,bA]=Os(Wu,{forceMount:void 0}),pv=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,s=Yi(Wu,t);return d.jsx(wA,{scope:t,forceMount:n,children:d.jsx(zu,{present:n||s.open,children:d.jsx(sv,{asChild:!0,container:i,children:r})})})};pv.displayName=Wu;var ui="TooltipContent",gv=v.forwardRef((e,t)=>{const n=bA(ui,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...s}=e,l=Yi(ui,e.__scopeTooltip);return d.jsx(zu,{present:r||l.open,children:l.disableHoverableContent?d.jsx(hv,{side:i,...s,ref:t}):d.jsx(_A,{side:i,...s,ref:t})})}),_A=v.forwardRef((e,t)=>{const n=Yi(ui,e.__scopeTooltip),r=Uu(ui,e.__scopeTooltip),i=v.useRef(null),s=Wi(t,i),[l,u]=v.useState(null),{trigger:g,onClose:f}=n,h=i.current,{onPointerInTransitChange:y}=r,x=v.useCallback(()=>{u(null),y(!1)},[y]),m=v.useCallback((w,_)=>{const S=w.currentTarget,A={x:w.clientX,y:w.clientY},P=TA(A,S.getBoundingClientRect()),N=AA(A,P),D=PA(_.getBoundingClientRect()),E=NA([...N,...D]);u(E),y(!0)},[y]);return v.useEffect(()=>()=>x(),[x]),v.useEffect(()=>{if(g&&h){const w=S=>m(S,h),_=S=>m(S,g);return g.addEventListener("pointerleave",w),h.addEventListener("pointerleave",_),()=>{g.removeEventListener("pointerleave",w),h.removeEventListener("pointerleave",_)}}},[g,h,m,x]),v.useEffect(()=>{if(l){const w=_=>{const S=_.target,A={x:_.clientX,y:_.clientY},P=(g==null?void 0:g.contains(S))||(h==null?void 0:h.contains(S)),N=!OA(A,l);P?x():N&&(x(),f())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[g,h,l,f,x]),d.jsx(hv,{...e,ref:s})}),[SA,CA]=Os(Fs,{isInside:!1}),hv=v.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:s,onPointerDownOutside:l,...u}=e,g=Yi(ui,n),f=Ns(n),{onClose:h}=g;return v.useEffect(()=>(document.addEventListener(Bu,h),()=>document.removeEventListener(Bu,h)),[h]),v.useEffect(()=>{if(g.trigger){const y=x=>{const m=x.target;m!=null&&m.contains(g.trigger)&&h()};return window.addEventListener("scroll",y,{capture:!0}),()=>window.removeEventListener("scroll",y,{capture:!0})}},[g.trigger,h]),d.jsx(Am,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:y=>y.preventDefault(),onDismiss:h,children:d.jsxs(cA,{"data-state":g.stateAttribute,...f,...u,ref:t,style:{...u.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:[d.jsx(ng,{children:r}),d.jsx(SA,{scope:n,isInside:!0,children:d.jsx(mA,{id:g.contentId,role:"tooltip",children:i||r})})]})})});gv.displayName=ui;var mv="TooltipArrow",EA=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Ns(n);return CA(mv,n).isInside?null:d.jsx(uA,{...i,...r,ref:t})});EA.displayName=mv;function TA(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,i,s)){case s:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function AA(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 PA(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function OA(e,t){const{x:n,y:r}=e;let i=!1;for(let s=0,l=t.length-1;s<t.length;l=s++){const u=t[s].x,g=t[s].y,f=t[l].x,h=t[l].y;g>r!=h>r&&n<(f-u)*(r-g)/(h-g)+u&&(i=!i)}return i}function NA(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),FA(t)}function FA(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const s=t[t.length-1],l=t[t.length-2];if((s.x-l.x)*(i.y-l.y)>=(s.y-l.y)*(i.x-l.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const s=n[n.length-1],l=n[n.length-2];if((s.x-l.x)*(i.y-l.y)>=(s.y-l.y)*(i.x-l.x))n.pop();else break}n.push(i)}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 DA=uv,kA=dv,IA=fv,LA=pv,vv=gv;const Yr=DA,Xr=kA,Jr=IA,Tr=v.forwardRef(({className:e,sideOffset:t=4,...n},r)=>d.jsx(LA,{children:d.jsx(vv,{ref:r,sideOffset:t,className:Ve("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})}));Tr.displayName=vv.displayName;function MA({title:e,titleId:t,...n},r){return v.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?v.createElement("title",{id:t},e):null,v.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 $A=v.forwardRef(MA);var RA=function(e){return function(t,n){var r=L.useRef(!1);e(function(){return function(){r.current=!1}},[]),e(function(){if(!r.current)r.current=!0;else return t()},n)}},yv=function(e){return typeof e=="function"},xv=process.env.NODE_ENV==="development"||process.env.NODE_ENV==="test";const VA=RA(L.useEffect);function wv(e){var t=L.useRef(e);return t.current=e,t}var zA=function(e){xv&&(yv(e)||console.error("useUnmount expected parameter is a function, got ".concat(typeof e)));var t=wv(e);L.useEffect(function(){return function(){t.current()}},[])};function BA(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var bv=BA,UA=typeof tr=="object"&&tr&&tr.Object===Object&&tr,jA=UA,WA=jA,HA=typeof self=="object"&&self&&self.Object===Object&&self,GA=WA||HA||Function("return this")(),_v=GA,qA=_v,KA=function(){return qA.Date.now()},YA=KA,XA=/\s/;function JA(e){for(var t=e.length;t--&&XA.test(e.charAt(t)););return t}var ZA=JA,QA=ZA,eP=/^\s+/;function tP(e){return e&&e.slice(0,QA(e)+1).replace(eP,"")}var nP=tP,rP=_v,oP=rP.Symbol,Sv=oP,Cv=Sv,Ev=Object.prototype,iP=Ev.hasOwnProperty,aP=Ev.toString,Xi=Cv?Cv.toStringTag:void 0;function sP(e){var t=iP.call(e,Xi),n=e[Xi];try{e[Xi]=void 0;var r=!0}catch{}var i=aP.call(e);return r&&(t?e[Xi]=n:delete e[Xi]),i}var lP=sP,cP=Object.prototype,uP=cP.toString;function dP(e){return uP.call(e)}var fP=dP,Tv=Sv,pP=lP,gP=fP,hP="[object Null]",mP="[object Undefined]",Av=Tv?Tv.toStringTag:void 0;function vP(e){return e==null?e===void 0?mP:hP:Av&&Av in Object(e)?pP(e):gP(e)}var yP=vP;function xP(e){return e!=null&&typeof e=="object"}var wP=xP,bP=yP,_P=wP,SP="[object Symbol]";function CP(e){return typeof e=="symbol"||_P(e)&&bP(e)==SP}var EP=CP,TP=nP,Pv=bv,AP=EP,Ov=NaN,PP=/^[-+]0x[0-9a-f]+$/i,OP=/^0b[01]+$/i,NP=/^0o[0-7]+$/i,FP=parseInt;function DP(e){if(typeof e=="number")return e;if(AP(e))return Ov;if(Pv(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Pv(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=TP(e);var n=OP.test(e);return n||NP.test(e)?FP(e.slice(2),n?2:8):PP.test(e)?Ov:+e}var kP=DP,IP=bv,Hu=YA,Nv=kP,LP="Expected a function",MP=Math.max,$P=Math.min;function RP(e,t,n){var r,i,s,l,u,g,f=0,h=!1,y=!1,x=!0;if(typeof e!="function")throw new TypeError(LP);t=Nv(t)||0,IP(n)&&(h=!!n.leading,y="maxWait"in n,s=y?MP(Nv(n.maxWait)||0,t):s,x="trailing"in n?!!n.trailing:x);function m(V){var W=r,B=i;return r=i=void 0,f=V,l=e.apply(B,W),l}function w(V){return f=V,u=setTimeout(A,t),h?m(V):l}function _(V){var W=V-g,B=V-f,ee=t-W;return y?$P(ee,s-B):ee}function S(V){var W=V-g,B=V-f;return g===void 0||W>=t||W<0||y&&B>=s}function A(){var V=Hu();if(S(V))return P(V);u=setTimeout(A,_(V))}function P(V){return u=void 0,x&&r?m(V):(r=i=void 0,l)}function N(){u!==void 0&&clearTimeout(u),f=0,r=g=i=u=void 0}function D(){return u===void 0?l:P(Hu())}function E(){var V=Hu(),W=S(V);if(r=arguments,i=this,g=V,W){if(u===void 0)return w(g);if(y)return clearTimeout(u),u=setTimeout(A,t),m(g)}return u===void 0&&(u=setTimeout(A,t)),l}return E.cancel=N,E.flush=D,E}var VP=RP;const zP=Va(VP);function BP(){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}BP()||(global.Date=Date);function UP(e,t){var n;xv&&(yv(e)||console.error("useDebounceFn expected parameter is a function, got ".concat(typeof e)));var r=wv(e),i=(n=t==null?void 0:t.wait)!==null&&n!==void 0?n:1e3,s=L.useMemo(function(){return zP(function(){for(var l=[],u=0;u<arguments.length;u++)l[u]=arguments[u];return r.current.apply(r,Vg([],Rg(l),!1))},i,t)},[]);return zA(function(){s.cancel()}),{run:s,cancel:s.cancel,flush:s.flush}}function jP(e,t,n){var r=Rg(L.useState({}),2),i=r[0],s=r[1],l=UP(function(){s({})},n).run;L.useEffect(function(){return l()},t),VA(e,[i])}const WP=L.forwardRef(({onChange:e},t)=>{const n=L.useRef(null),[r,i]=L.useState("");return L.useImperativeHandle(t,()=>({setValue:s=>{var l;i(s),(l=n.current)==null||l.focus()}})),jP(()=>{e==null||e(r)},[r],{wait:300}),d.jsxs(d.Fragment,{children:[d.jsx(Hr,{ref:n,type:"text",placeholder:"Search files...",value:r,onChange:s=>i(s.target.value),className:"pr-8"}),r&&d.jsx("button",{onClick:()=>{var s;i(""),(s=n.current)==null||s.focus()},className:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-500 hover:text-gray-700",children:d.jsx($A,{className:"h-5 w-5"})})]})});var Gu={exports:{}},Ds={exports:{}},ot={};/** @license React v16.13.1
|
|
153
179
|
* react-is.production.min.js
|
|
154
180
|
*
|
|
155
181
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
156
182
|
*
|
|
157
183
|
* This source code is licensed under the MIT license found in the
|
|
158
184
|
* LICENSE file in the root directory of this source tree.
|
|
159
|
-
*/var
|
|
185
|
+
*/var Fv;function HP(){if(Fv)return ot;Fv=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,i=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,l=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,g=e?Symbol.for("react.async_mode"):60111,f=e?Symbol.for("react.concurrent_mode"):60111,h=e?Symbol.for("react.forward_ref"):60112,y=e?Symbol.for("react.suspense"):60113,x=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,w=e?Symbol.for("react.lazy"):60116,_=e?Symbol.for("react.block"):60121,S=e?Symbol.for("react.fundamental"):60117,A=e?Symbol.for("react.responder"):60118,P=e?Symbol.for("react.scope"):60119;function N(E){if(typeof E=="object"&&E!==null){var V=E.$$typeof;switch(V){case t:switch(E=E.type,E){case g:case f:case r:case s:case i:case y:return E;default:switch(E=E&&E.$$typeof,E){case u:case h:case w:case m:case l:return E;default:return V}}case n:return V}}}function D(E){return N(E)===f}return ot.AsyncMode=g,ot.ConcurrentMode=f,ot.ContextConsumer=u,ot.ContextProvider=l,ot.Element=t,ot.ForwardRef=h,ot.Fragment=r,ot.Lazy=w,ot.Memo=m,ot.Portal=n,ot.Profiler=s,ot.StrictMode=i,ot.Suspense=y,ot.isAsyncMode=function(E){return D(E)||N(E)===g},ot.isConcurrentMode=D,ot.isContextConsumer=function(E){return N(E)===u},ot.isContextProvider=function(E){return N(E)===l},ot.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===t},ot.isForwardRef=function(E){return N(E)===h},ot.isFragment=function(E){return N(E)===r},ot.isLazy=function(E){return N(E)===w},ot.isMemo=function(E){return N(E)===m},ot.isPortal=function(E){return N(E)===n},ot.isProfiler=function(E){return N(E)===s},ot.isStrictMode=function(E){return N(E)===i},ot.isSuspense=function(E){return N(E)===y},ot.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===r||E===f||E===s||E===i||E===y||E===x||typeof E=="object"&&E!==null&&(E.$$typeof===w||E.$$typeof===m||E.$$typeof===l||E.$$typeof===u||E.$$typeof===h||E.$$typeof===S||E.$$typeof===A||E.$$typeof===P||E.$$typeof===_)},ot.typeOf=N,ot}var it={};/** @license React v16.13.1
|
|
160
186
|
* react-is.development.js
|
|
161
187
|
*
|
|
162
188
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
163
189
|
*
|
|
164
190
|
* This source code is licensed under the MIT license found in the
|
|
165
191
|
* LICENSE file in the root directory of this source tree.
|
|
166
|
-
*/var
|
|
192
|
+
*/var Dv;function GP(){return Dv||(Dv=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,i=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,l=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,g=e?Symbol.for("react.async_mode"):60111,f=e?Symbol.for("react.concurrent_mode"):60111,h=e?Symbol.for("react.forward_ref"):60112,y=e?Symbol.for("react.suspense"):60113,x=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,w=e?Symbol.for("react.lazy"):60116,_=e?Symbol.for("react.block"):60121,S=e?Symbol.for("react.fundamental"):60117,A=e?Symbol.for("react.responder"):60118,P=e?Symbol.for("react.scope"):60119;function N(fe){return typeof fe=="string"||typeof fe=="function"||fe===r||fe===f||fe===s||fe===i||fe===y||fe===x||typeof fe=="object"&&fe!==null&&(fe.$$typeof===w||fe.$$typeof===m||fe.$$typeof===l||fe.$$typeof===u||fe.$$typeof===h||fe.$$typeof===S||fe.$$typeof===A||fe.$$typeof===P||fe.$$typeof===_)}function D(fe){if(typeof fe=="object"&&fe!==null){var Xe=fe.$$typeof;switch(Xe){case t:var at=fe.type;switch(at){case g:case f:case r:case s:case i:case y:return at;default:var $t=at&&at.$$typeof;switch($t){case u:case h:case w:case m:case l:return $t;default:return Xe}}case n:return Xe}}}var E=g,V=f,W=u,B=l,ee=t,H=h,ce=r,ie=w,he=m,U=n,K=s,G=i,te=y,Y=!1;function J(fe){return Y||(Y=!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.")),M(fe)||D(fe)===g}function M(fe){return D(fe)===f}function Q(fe){return D(fe)===u}function ve(fe){return D(fe)===l}function xe(fe){return typeof fe=="object"&&fe!==null&&fe.$$typeof===t}function ye(fe){return D(fe)===h}function Se(fe){return D(fe)===r}function we(fe){return D(fe)===w}function Ee(fe){return D(fe)===m}function Pe(fe){return D(fe)===n}function Ne(fe){return D(fe)===s}function Te(fe){return D(fe)===i}function He(fe){return D(fe)===y}it.AsyncMode=E,it.ConcurrentMode=V,it.ContextConsumer=W,it.ContextProvider=B,it.Element=ee,it.ForwardRef=H,it.Fragment=ce,it.Lazy=ie,it.Memo=he,it.Portal=U,it.Profiler=K,it.StrictMode=G,it.Suspense=te,it.isAsyncMode=J,it.isConcurrentMode=M,it.isContextConsumer=Q,it.isContextProvider=ve,it.isElement=xe,it.isForwardRef=ye,it.isFragment=Se,it.isLazy=we,it.isMemo=Ee,it.isPortal=Pe,it.isProfiler=Ne,it.isStrictMode=Te,it.isSuspense=He,it.isValidElementType=N,it.typeOf=D}()),it}var kv;function Iv(){return kv||(kv=1,process.env.NODE_ENV==="production"?Ds.exports=HP():Ds.exports=GP()),Ds.exports}/*
|
|
167
193
|
object-assign
|
|
168
194
|
(c) Sindre Sorhus
|
|
169
195
|
@license MIT
|
|
170
|
-
*/var
|
|
171
|
-
Valid keys: `+JSON.stringify(Object.keys(A),null," "));var X=Se(se,le,te,ce,oe+"."+le,n);if(X)return X}return null}return y(B)}function k(A){switch(typeof A){case"number":case"string":case"undefined":return!0;case"boolean":return!A;case"object":if(Array.isArray(A))return A.every(k);if(A===null||s(A))return!0;var B=g(A);if(B){var Q=B.call(A),ne;if(B!==A.entries){for(;!(ne=Q.next()).done;)if(!k(ne.value))return!1}else for(;!(ne=Q.next()).done;){var te=ne.value;if(te&&!k(te[1]))return!1}}else return!1;return!0;default:return!1}}function $(A,B){return A==="symbol"?!0:B?B["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&B instanceof Symbol:!1}function F(A){var B=typeof A;return Array.isArray(A)?"array":A instanceof RegExp?"object":$(B,A)?"symbol":B}function U(A){if(typeof A>"u"||A===null)return""+A;var B=F(A);if(B==="object"){if(A instanceof Date)return"date";if(A instanceof RegExp)return"regexp"}return B}function j(A){var B=U(A);switch(B){case"array":case"object":return"an "+B;case"boolean":case"date":case"regexp":return"a "+B;default:return B}}function R(A){return!A.constructor||!A.constructor.name?m:A.constructor.name}return p.checkPropTypes=o,p.resetWarningCache=o.resetWarningCache,p.PropTypes=p,p},ys}var xs,Uf;function eC(){if(Uf)return xs;Uf=1;var e=ms();function t(){}function n(){}return n.resetWarningCache=t,xs=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},xs}if(process.env.NODE_ENV!=="production"){var tC=Lf(),nC=!0;fs.exports=QS()(tC.isElement,nC)}else fs.exports=eC()();var rC=fs.exports;const Ne=to(rC),oC=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 Yn(e,t,n){const r=iC(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&Wf(r,"path",i),Wf(r,"relativePath",i),r}function iC(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=oC.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function Wf(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const aC=[".DS_Store","Thumbs.db"];function sC(e){return bn(this,void 0,void 0,function*(){return Yo(e)&&lC(e.dataTransfer)?fC(e.dataTransfer,e.type):cC(e)?uC(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?dC(e):[]})}function lC(e){return Yo(e)}function cC(e){return Yo(e)&&Yo(e.target)}function Yo(e){return typeof e=="object"&&e!==null}function uC(e){return bs(e.target.files).map(t=>Yn(t))}function dC(e){return bn(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>Yn(n))})}function fC(e,t){return bn(this,void 0,void 0,function*(){if(e.items){const n=bs(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(pC));return qf(Gf(r))}return qf(bs(e.files).map(n=>Yn(n)))})}function qf(e){return e.filter(t=>aC.indexOf(t.name)===-1)}function bs(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 pC(e){if(typeof e.webkitGetAsEntry!="function")return Kf(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?Yf(t):Kf(e,t)}function Gf(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?Gf(n):[n]],[])}function Kf(e,t){return bn(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,Yn(a)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return Yn(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function gC(e){return bn(this,void 0,void 0,function*(){return e.isDirectory?Yf(e):mC(e)})}function Yf(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(a=>bn(this,void 0,void 0,function*(){if(a.length){const s=Promise.all(a.map(gC));o.push(s),i()}else try{const s=yield Promise.all(o);n(s)}catch(s){r(s)}}),a=>{r(a)})}i()})}function mC(e){return bn(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=Yn(r,e.fullPath);t(o)},r=>{n(r)})})})}var ws=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 Xf(e){return yC(e)||vC(e)||ep(e)||hC()}function hC(){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
|
|
173
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
174
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
175
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lp(e,t){if(e){if(typeof e=="string")return Es(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 Es(e,t)}}function Es(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 GC(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 KC(e){if(Array.isArray(e))return e}function cp(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?cp(Object(n),!0).forEach(function(r){_s(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zo(e,t){if(e==null)return{};var n=YC(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 YC(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 Ts=_.forwardRef(function(e,t){var n=e.children,r=Zo(e,RC),o=dp(r),i=o.open,a=Zo(o,VC);return _.useImperativeHandle(t,function(){return{open:i}},[i]),_.createElement(_.Fragment,null,n(De(De({},a),{},{open:i})))});Ts.displayName="Dropzone";var up={disabled:!1,getFilesFromEvent:sC,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};Ts.defaultProps=up,Ts.propTypes={children:Ne.func,accept:Ne.objectOf(Ne.arrayOf(Ne.string)),multiple:Ne.bool,preventDropOnDocument:Ne.bool,noClick:Ne.bool,noKeyboard:Ne.bool,noDrag:Ne.bool,noDragEventsBubbling:Ne.bool,minSize:Ne.number,maxSize:Ne.number,maxFiles:Ne.number,disabled:Ne.bool,getFilesFromEvent:Ne.func,onFileDialogCancel:Ne.func,onFileDialogOpen:Ne.func,useFsAccessApi:Ne.bool,autoFocus:Ne.bool,onDragEnter:Ne.func,onDragLeave:Ne.func,onDragOver:Ne.func,onDrop:Ne.func,onDropAccepted:Ne.func,onDropRejected:Ne.func,onError:Ne.func,validator:Ne.func};var As={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function dp(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=De(De({},up),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,p=t.onDropAccepted,h=t.onDropRejected,v=t.onFileDialogCancel,y=t.onFileDialogOpen,b=t.useFsAccessApi,w=t.autoFocus,S=t.preventDropOnDocument,E=t.noClick,x=t.noKeyboard,N=t.noDrag,I=t.noDragEventsBubbling,M=t.onError,H=t.validator,O=_.useMemo(function(){return MC(n)},[n]),G=_.useMemo(function(){return IC(n)},[n]),W=_.useMemo(function(){return typeof y=="function"?y:fp},[y]),Z=_.useMemo(function(){return typeof v=="function"?v:fp},[v]),k=_.useRef(null),$=_.useRef(null),F=_.useReducer(XC,As),U=Cs(F,2),j=U[0],R=U[1],A=j.isFocused,B=j.isFileDialogActive,Q=_.useRef(typeof window<"u"&&window.isSecureContext&&b&&DC()),ne=function(){!Q.current&&B&&setTimeout(function(){if($.current){var Y=$.current.files;Y.length||(R({type:"closeDialog"}),Z())}},300)};_.useEffect(function(){return window.addEventListener("focus",ne,!1),function(){window.removeEventListener("focus",ne,!1)}},[$,B,Z,Q]);var te=_.useRef([]),ce=function(Y){k.current&&k.current.contains(Y.target)||(Y.preventDefault(),te.current=[])};_.useEffect(function(){return S&&(document.addEventListener("dragover",ip,!1),document.addEventListener("drop",ce,!1)),function(){S&&(document.removeEventListener("dragover",ip),document.removeEventListener("drop",ce))}},[k,S]),_.useEffect(function(){return!r&&w&&k.current&&k.current.focus(),function(){}},[k,w,r]);var oe=_.useCallback(function(z){M?M(z):console.error(z)},[M]),se=_.useCallback(function(z){z.preventDefault(),z.persist(),V(z),te.current=[].concat(BC(te.current),[z.target]),Jo(z)&&Promise.resolve(o(z)).then(function(Y){if(!(Xo(z)&&!I)){var ve=Y.length,we=ve>0&&NC({files:Y,accept:O,minSize:a,maxSize:i,multiple:s,maxFiles:u,validator:H}),Fe=ve>0&&!we;R({isDragAccept:we,isDragReject:Fe,isDragActive:!0,type:"setDraggedFiles"}),c&&c(z)}}).catch(function(Y){return oe(Y)})},[o,c,oe,I,O,a,i,s,u,H]),ue=_.useCallback(function(z){z.preventDefault(),z.persist(),V(z);var Y=Jo(z);if(Y&&z.dataTransfer)try{z.dataTransfer.dropEffect="copy"}catch{}return Y&&g&&g(z),!1},[g,I]),de=_.useCallback(function(z){z.preventDefault(),z.persist(),V(z);var Y=te.current.filter(function(we){return k.current&&k.current.contains(we)}),ve=Y.indexOf(z.target);ve!==-1&&Y.splice(ve,1),te.current=Y,!(Y.length>0)&&(R({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Jo(z)&&d&&d(z))},[k,d,I]),le=_.useCallback(function(z,Y){var ve=[],we=[];z.forEach(function(Fe){var ct=rp(Fe,O),Ct=Cs(ct,2),He=Ct[0],dn=Ct[1],fn=op(Fe,a,i),Be=Cs(fn,2),Rt=Be[0],Zn=Be[1],An=H?H(Fe):null;if(He&&Rt&&!An)ve.push(Fe);else{var _e=[dn,Zn];An&&(_e=_e.concat(An)),we.push({file:Fe,errors:_e.filter(function(Qn){return Qn})})}}),(!s&&ve.length>1||s&&u>=1&&ve.length>u)&&(ve.forEach(function(Fe){we.push({file:Fe,errors:[PC]})}),ve.splice(0)),R({acceptedFiles:ve,fileRejections:we,isDragReject:we.length>0,type:"setFiles"}),m&&m(ve,we,Y),we.length>0&&h&&h(we,Y),ve.length>0&&p&&p(ve,Y)},[R,s,O,a,i,u,m,p,h,H]),Se=_.useCallback(function(z){z.preventDefault(),z.persist(),V(z),te.current=[],Jo(z)&&Promise.resolve(o(z)).then(function(Y){Xo(z)&&!I||le(Y,z)}).catch(function(Y){return oe(Y)}),R({type:"reset"})},[o,le,oe,I]),X=_.useCallback(function(){if(Q.current){R({type:"openDialog"}),W();var z={multiple:s,types:G};window.showOpenFilePicker(z).then(function(Y){return o(Y)}).then(function(Y){le(Y,null),R({type:"closeDialog"})}).catch(function(Y){$C(Y)?(Z(Y),R({type:"closeDialog"})):LC(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&&(R({type:"openDialog"}),W(),$.current.value=null,$.current.click())},[R,W,Z,b,le,oe,G,s]),Ce=_.useCallback(function(z){!k.current||!k.current.isEqualNode(z.target)||(z.key===" "||z.key==="Enter"||z.keyCode===32||z.keyCode===13)&&(z.preventDefault(),X())},[k,X]),ze=_.useCallback(function(){R({type:"focus"})},[]),St=_.useCallback(function(){R({type:"blur"})},[]),lt=_.useCallback(function(){E||(FC()?setTimeout(X,0):X())},[E,X]),tt=function(Y){return r?null:Y},C=function(Y){return x?null:tt(Y)},P=function(Y){return N?null:tt(Y)},V=function(Y){I&&Y.stopPropagation()},re=_.useMemo(function(){return function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Y=z.refKey,ve=Y===void 0?"ref":Y,we=z.role,Fe=z.onKeyDown,ct=z.onFocus,Ct=z.onBlur,He=z.onClick,dn=z.onDragEnter,fn=z.onDragOver,Be=z.onDragLeave,Rt=z.onDrop,Zn=Zo(z,jC);return De(De(_s({onKeyDown:C(It(Fe,Ce)),onFocus:C(It(ct,ze)),onBlur:C(It(Ct,St)),onClick:tt(It(He,lt)),onDragEnter:P(It(dn,se)),onDragOver:P(It(fn,ue)),onDragLeave:P(It(Be,de)),onDrop:P(It(Rt,Se)),role:typeof we=="string"&&we!==""?we:"presentation"},ve,k),!r&&!x?{tabIndex:0}:{}),Zn)}},[k,Ce,ze,St,lt,se,ue,de,Se,x,N,r]),J=_.useCallback(function(z){z.stopPropagation()},[]),K=_.useMemo(function(){return function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Y=z.refKey,ve=Y===void 0?"ref":Y,we=z.onChange,Fe=z.onClick,ct=Zo(z,zC),Ct=_s({accept:O,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:tt(It(we,Se)),onClick:tt(It(Fe,J)),tabIndex:-1},ve,$);return De(De({},Ct),ct)}},[$,n,s,Se,r]);return De(De({},j),{},{isFocused:A&&!r,getRootProps:re,getInputProps:K,rootRef:k,inputRef:$,open:tt(X)})}function XC(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({},As),{},{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({},As);default:return e}}function fp(){}const JC=({onFilesSelected:e,children:t})=>{const[n,r]=_.useState(!1),{getRootProps:o,getInputProps:i}=dp({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()})]})},ZC=({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),[p,h]=_.useState(""),{toast:v}=Io();_.useEffect(()=>{e&&y(p)},[p,e]);const y=async S=>{try{m(!0);const E=await me.get(`${n}/api/list-s3-folders?prefix=${S}`);u(E==null?void 0:E.data)}catch{v({title:"Error",description:"Unable to load S3 folder list",variant:"destructive"})}finally{m(!1)}},b=async()=>{d(!0);try{const S=o.key,E=S.endsWith("/")?S:`${S}/`,x=p.endsWith("/")?p:`${p}/`;if(E===x||S===p){v({title:"Lỗi",description:"Không thể di chuyển file đến cùng vị trí",variant:"destructive"}),d(!1);return}await me.post(`${n}/api/move`,{oldPath:S,newPath:p}),a.current=!0,await i(),v({title:"Đã di chuyển",description:`Đã di chuyển thành công "${o.name}" đến "${p}"`}),t(!1),r(null),h("")}catch(S){console.error("Error renaming item:",S),v({title:"Lỗi",description:"Không thể đổi tên",variant:"destructive"})}finally{d(!1)}};return l.jsx(Ht,{open:e,onOpenChange:S=>{S||(t(!1),r(null),h(""))},children:l.jsxs(At,{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(Pt,{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:()=>h(""),children:"Root"}),p.split("/").map((S,E,x)=>l.jsx("li",{className:"cursor-pointer hover:text-blue-600 transition-colors",onClick:()=>h(S==="Root"?"":x.slice(0,E+1).join("/")+"/"),children:S},E))]})}),l.jsxs(Nt,{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(zn,{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(S=>l.jsx("li",{className:"cursor-pointer hover:bg-gray-100 p-2 rounded transition-colors",onClick:()=>h(S),children:S},S))})})]}),l.jsxs(Sn,{className:"flex justify-end space-x-2",children:[l.jsx(ye,{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(ye,{onClick:b,disabled:c,className:"s3-explr-crawl-btn",children:"Move"})]})]})})},QC="AIzaSyBI8KiTWudkw8iR5cjH7ZsA4JBN1NqJw8A",eE="726815747852-5deq413t8kd8j3mgj48d46eatjauapq5.apps.googleusercontent.com",tE="https://www.googleapis.com/auth/drive";zt(me,{retries:3,shouldResetTimeout:!0,retryCondition:e=>zt.isRetryableError(e)&&e.config.method==="get"});const Qe={current:!1},pp="crawl:jobs",Xn="crawl:current_job",nE=e=>{const[t,n]=_.useState(null),[r,o]=_.useState(0);return _.useEffect(()=>{const i=localStorage.getItem(Xn);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 me.get(`${e}/api/crawl/${t.id}?taskId=${t.taskId}`)).data;n(c=>{if(!c)return null;const d={...c,status:u};return localStorage.setItem(Xn,JSON.stringify(d)),(u.status==="completed"||u.status==="failed")&&setTimeout(()=>{n(null),localStorage.removeItem(Xn)},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(Xn,JSON.stringify(i)):localStorage.removeItem(Xn)}}},Qo=(e,t)=>{const n=[],r=o=>{(e[o]||[]).forEach(a=>{n.push(a.key),a.isFolder&&r(a.key)})};return r(t),n},rE=(e,t)=>{const n=[];return(e[t]||[]).forEach(o=>{n.push(o.key),o.isFolder&&n.push(...Qo(e,o.key))}),n},oE=(e,t,n=[],r,o,i)=>{const[a,s]=_.useState({}),[u,c]=_.useState(!1),[d,g]=_.useState(null),[m,p]=_.useState(0),h=_.useRef(t);_.useEffect(()=>{h.current=t},[t]);const v=async()=>{c(!0);try{const b=await me.get(`${e}/api/files`,{params:{cache:!1,displayPrefixes:JSON.stringify(n),prefix:h.current},timeout:3e5});s(b.data),g(null)}catch(b){g(b instanceof Error?b:new Error("Failed to fetch files"))}finally{c(!1),p(0),i("")}},y=async b=>{var w,S;try{if(!b)return;c(!0);const E=await me.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)||[]}),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 _.useEffect(()=>{!r&&!u&&v(),r&&!u&&y(r)},[r,o]),{data:a,isLoading:u,error:d,estimatedTotalHits:m,refetch:v}},_r=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||"")},iE=_.memo(({homeLabel:e="Kho tài liệu",apiBaseUrl:t="https://s3-explorer.cmcts1.studio.ai.vn",rootPrefix:n="",asSelector:r=!1,onSelected:o=u=>console.log("Đã chọn:",u),displayPrefixes:i,preSelectedFiles:a,idCreator:s})=>{var zp;const[u,c]=_.useState([]),[d,g]=_.useState(""),[m,p]=_.useState(new Set(a)),[h,v]=_.useState(n),[y,b]=_.useState(""),[w,S]=_.useState(!1),[E,x]=_.useState(""),[N,I]=_.useState(!1),[M,H]=_.useState(null),[O,G]=_.useState(null),[W,Z]=_.useState(!1),[k,$]=_.useState(!1),[F,U]=_.useState(null),j=_.useRef(null),{toast:R}=Io(),[A,B]=_.useState(null),[Q,ne]=_.useState(null),[te,ce]=_.useState(""),[oe,se]=_.useState(!1),[ue,de]=_.useState(!1),[le,Se]=_.useState(new Set),[X,Ce]=_.useState(""),[ze,St]=_.useState(!1),[lt,tt]=_.useState(!1),[C,P]=_.useState("rename"),[V,re]=_.useState(!1),[J,K]=_.useState(""),[z,Y]=_.useState("1"),[ve,we]=_.useState(!1),[Fe,ct]=_.useState(!1),[Ct,He]=_.useState(!1),[dn,fn]=_.useState(!1),[Be,Rt]=_.useState(1),[Zn,An]=_.useState(!1),{currentJob:_e,elapsedTime:Qn,setCurrentJob:Ip}=nE(t),[pn,kr]=_.useState(null),[Or,ai]=_.useState(""),[OE,Fr]=_.useState(!1),[$s,Mp]=_.useState(!1),[$p,FE]=_.useState(""),[Ke,Ls]=_.useState(null),DE=new URL(window.location.href).searchParams.get("prefix")||""||y||n,[__,IE]=_.useState(null),{data:Vt,isLoading:er,error:ME,estimatedTotalHits:Dr,refetch:nt}=oE(t,DE,i,d,Be,g),$E=lg({onSuccess:T=>{IE(T.access_token),localStorage.setItem("google_access_token",T.access_token),LE(T.access_token)},onError:()=>{console.log("Đăng nhập thất bại!")},scope:tE}),LE=T=>{const D=document.createElement("script");D.src="https://apis.google.com/js/api.js",D.onload=()=>{window.gapi.load("picker",()=>RE(T))},document.body.appendChild(D)},RE=T=>{const D=new window.google.picker.DocsView(window.google.picker.ViewId.DOCS).setIncludeFolders(!0).setSelectFolderEnabled(!0).setOwnedByMe(!1),q=new window.google.picker.DocsView(window.google.picker.ViewId.DRIVE).setIncludeFolders(!0).setSelectFolderEnabled(!0);new window.google.picker.PickerBuilder().setDeveloperKey(QC).setOAuthToken(T).enableFeature(window.google.picker.Feature.MULTISELECT_ENABLED).setLocale("vi").addView(D).addView(q).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 VE(ge,h)}}).build().setVisible(!0)},VE=async(T,D="")=>{const q=localStorage.getItem("google_access_token");if(!q){console.error("❌ Không tìm thấy access token. Vui lòng đăng nhập lại."),Pe.error("Không tìm thấy access token. Vui lòng đăng nhập lại.",{position:"bottom-right"});return}const ee=Pe.loading("Đang đồng bộ...",{position:"bottom-right",autoClose:!1});try{const ie={prefix:D,folders:[],files:[]};T.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 me.post(`${t}/api/sync-drive-to-s3`,ie,{headers:{Authorization:`Bearer ${q}`}});Qe.current=!0,nt(),Pe.update(ee,{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),Pe.update(ee,{render:"Không thể đồng bộ file từ Google Drive.",type:"error",isLoading:!1,autoClose:3e3,position:"bottom-right"})}};_.useEffect(()=>{const T=D=>{if(D.data.action==="logout"){const q=document.createElement("iframe");q.style.display="none",q.src="https://accounts.google.com/Logout",document.body.appendChild(q),setTimeout(()=>document.body.removeChild(q),2e3)}};return window.addEventListener("message",T),()=>window.removeEventListener("message",T)},[]),_.useEffect(()=>{const T=new Set(a);p(T)},[]),_.useEffect(()=>{_e!=null&&_e.status&&(_e.status.status==="completed"?(R({title:"Thu thập website hoàn tất",description:`Đã thu thập thành công ${_e.url} với ${_e.status.completed} trang`}),Qe.current=!0,nt()):_e.status.status==="failed"&&R({title:"Thu thập website thất bại",description:`Không thể thu thập ${_e.url}. Vui lòng thử lại.`,variant:"destructive"}))},[(zp=_e==null?void 0:_e.status)==null?void 0:zp.status]);const Lp=_.useMemo(()=>Vt[h]||[],[Vt,h]),gn=_.useMemo(()=>Lp,[Lp,h,Vt]),Ir=_.useMemo(()=>{const T={};return gn.forEach((D,q)=>{m.has(D.key)&&(T[q]=!0)}),T},[m,gn]),jE=T=>{const D=Qo(Vt,T);if(D.length===0)return m.has(T)?"all":"none";const q=D.filter(ee=>m.has(ee)).length;return q===0?"none":q===D.length?"all":"partial"},tr=(T,D=!0)=>{if(h!==T){if(s&&!h)An(!0),b(T+s),v(T+s),a||p(new Set);else if(An(!0),b(T),v(T),a||p(new Set),D){const q=window.location.pathname==="/"?"":window.location.pathname,ee=T?`${window.location.origin}${q}?prefix=${encodeURIComponent(T)}`:`${window.location.origin}${q}`;window.history.pushState({path:ee},"",ee)}}};_.useEffect(()=>{Zn&&(Qe.current=!0,nt().finally(()=>An(!1)))},[Zn]);const zE=async(T,D)=>{var q,ee;I(!0);try{if(gn.some(Ye=>Ye.isFolder&&Ye.name.toLowerCase()===T.toLowerCase())){R({title:"Lỗi",description:`Thư mục "${T}" đã tồn tại trong thư mục hiện tại.`,variant:"destructive"}),I(!1);return}const ge=`${D}${T}/`;if((await me.post(`${t}/api/create-folder`,{prefix:ge})).status!==200){R({title:"Lỗi",description:"Không thể tạo thư mục",variant:"destructive"});return}Qe.current=!0,await nt(),R({title:"Đã tạo thư mục",description:`Đã tạo thành công thư mục "${T}"`}),x(""),S(!1)}catch(ie){console.error("Error creating folder:",ie);const ge=((ee=(q=ie==null?void 0:ie.response)==null?void 0:q.data)==null?void 0:ee.error)||"Không thể tạo thư mục";R({title:"Lỗi",description:ge,variant:"destructive"})}finally{I(!1)}},Rs=async(T,D,q)=>{var ee,ie,ge,Ee,Ye,nr,Bp,Hp,Up;U(q),He(!0);try{if(Array.from(T).reduce((Xe,Lr)=>Xe+Lr.size,0)>=100*1024*1024){R({title:"Lỗi",description:"Tổng kích thước các tập tin vượt quá 100 MB",variant:"destructive"}),U(null),He(!1);return}const li=Array.from(T).filter(Xe=>Xe.size===0);if(li.length>0){const Xe=li.map(Lr=>Lr.name).join(", ");R({title:"Lỗi tải lên",description:`Không thể tải lên tập tin rỗng: ${Xe}`,variant:"destructive"}),He(!1),U(null);return}let $r=localStorage.getItem("dataLogin"),rr;try{$r&&($r=JSON.parse($r),rr=$r.user)}catch{$r=null}const Pn=new FormData;if(rr!=null&&rr.id&&Pn.append("metadata",JSON.stringify({creator:rr.username,creatorId:rr.id,DataSource:"Tệp tải lên"})),q==="folder"&&T[0]){const Xe=T[0].webkitRelativePath.split("/")[0];Xe&&Pn.append("folderName",Xe)}Pn.append("prefix",D),Array.from(T).forEach(Xe=>q==="folder"?Pn.append("files",Xe,Xe.webkitRelativePath):Pn.append("files",Xe)),Qe.current=!0;const je=await me.post(`${t}/api/check-files-existed`,Pn,{headers:{"Content-Type":"multipart/form-data"}});if(((ee=je==null?void 0:je.data)==null?void 0:ee.status)===200)await me.post(`${t}/api/upload`,Pn,{headers:{"Content-Type":"multipart/form-data"},timeout:0}),g(""),b(D),setTimeout(async()=>{U(null),await nt(),He(!1),await hn()},500);else{if(((ge=(ie=je==null?void 0:je.data)==null?void 0:ie.names)==null?void 0:ge.length)>0&&!((Ee=je==null?void 0:je.data)!=null&&Ee.isFolder)){const Xe=Array.from(T).filter(Lr=>je.data.names.includes(Lr.name));kr(Xe),Fr(!0)}(Ye=je==null?void 0:je.data)!=null&&Ye.isFolder&&((nr=je==null?void 0:je.data)!=null&&nr.name)&&(ai((Bp=je==null?void 0:je.data)==null?void 0:Bp.name),kr(T),Fr(!0))}}catch(Mr){console.error("Lỗi tải lên:",Mr);const li=((Up=(Hp=Mr==null?void 0:Mr.response)==null?void 0:Hp.data)==null?void 0:Up.error)||"Không thể tải lên tập tin";R({title:"Lỗi",description:li,variant:"destructive"}),U(null),He(!1)}},BE=async()=>{var T,D;try{He(!0);const q=new FormData;if(pn){U(Or?"folder":"files"),Fr(!1);let ee=localStorage.getItem("dataLogin"),ie;try{ee&&(ee=JSON.parse(ee),ie=ee.user)}catch{ee=null}if(ie!=null&&ie.id&&(console.log("🚀 ~ uploadFiles ~ user:",ie),q.append("metadata",JSON.stringify({creator:ie.username,creatorId:ie.id,DataSource:"Tệp tải lên"}))),Or&&pn[0]){const ge=pn[0].webkitRelativePath.split("/")[0];ge&&q.append("folderName",ge)}q.append("prefix",h),Array.from(pn).forEach(ge=>Or&&pn[0]?q.append("files",ge,ge.webkitRelativePath):q.append("files",ge)),ie!=null&&ie.id&&q.append("metadata",JSON.stringify({creator:ie.username,creatorId:ie.id,DataSource:"Tệp tải lên"})),await me.post(`${t}/api/upload`,q,{headers:{"Content-Type":"multipart/form-data"},timeout:0}),g(""),b(h),Qe.current=!0}}catch(q){console.error("Lỗi tải lên:",q);const ee=((D=(T=q==null?void 0:q.response)==null?void 0:T.data)==null?void 0:D.error)||"Không thể tải lên tập tin";R({title:"Lỗi",description:ee,variant:"destructive"})}finally{setTimeout(async()=>{U(null),await nt(),He(!1),ai(""),kr(null),await hn()},500)}},HE=async T=>{var D;try{if(await me.delete(`${t}/api/files`,{data:{paths:[T.key]}}),m.has(T.key)){const ee=new Set(m);ee.delete(T.key),p(ee)}const q=((D=T.key)==null?void 0:D.replace(/^(.*?)(\/.*)?$/,(ee,ie,ge)=>!ge||ge==="/"?"":ie+"/"))||"";b(q),Qe.current=!0,R({title:"Đã xóa tập tin",description:`Đã xóa thành công "${T.name}"`}),H(null),await hn()}catch(q){console.error("Error deleting file:",q),R({title:"Lỗi",description:"Không thể xóa tập tin",variant:"destructive"})}finally{fn(!1),await nt()}},si=T=>{const D=new Set(m),q=typeof T=="function"?T(Ir):T;new Set(Object.keys(Ir).map(Number)).forEach(ie=>{const ge=gn[ie];ge&&(q[ie]||(D.delete(ge.key),ge.isFolder&&Qo(Vt,ge.key).forEach(Ee=>D.delete(Ee))))}),Object.entries(q).forEach(([ie,ge])=>{const Ee=parseInt(ie),Ye=gn[Ee];Ye&&ge&&(D.add(Ye.key),Ye.isFolder&&Qo(Vt,Ye.key).forEach(nr=>D.add(nr)))}),p(D)},UE=async()=>{var T;Z(!0);try{const D=Array.from(m),q=D.map(ie=>Object.values(Vt).flat().find(ge=>ge.key===ie)).filter(ie=>ie!==void 0);if(q.length===0){R({title:"Lỗi",description:"Không có tập tin nào được chọn để xóa",variant:"destructive"});return}await me.delete(`${t}/api/files`,{data:{paths:D}});const ee=((T=q[0])==null?void 0:T.key.replace(/^(.*?)(\/.*)?$/,(ie,ge,Ee)=>!Ee||Ee==="/"?"":ge+"/"))||"";b(ee),Qe.current=!0,nt(),R({title:"Đã xóa tập tin",description:`Đã xóa thành công ${q.length} mục`}),$(!1),p(new Set),await hn()}catch(D){console.error("Error deleting files:",D),R({title:"Lỗi",description:"Không thể xóa các tập tin đã chọn",variant:"destructive"})}finally{Z(!1)}},WE=async(T,D)=>{if(!h.trim()){R({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=T.key;let ee;T.isFolder?ee=q.split("/").slice(0,-2).join("/")+"/":ee=q.substring(0,q.lastIndexOf("/")+1);const ie=ee+D+(T.isFolder?"/":"");await me.post(`${t}/api/rename`,{oldPath:q,newPath:ie}),Qe.current=!0,await nt(),R({title:"Đã đổi tên",description:`Đã đổi tên thành công "${T.name}" thành "${D}"`}),B(null),ce(""),ne(null)}catch(q){console.error("Error renaming item:",q),R({title:"Lỗi",description:"Không thể đổi tên",variant:"destructive"})}finally{de(!1)}},Rp=async T=>{Se(D=>new Set([...D,...T]));try{const D=await me.post(`${t}/api/download`,{paths:T},{responseType:"blob"}),q=window.URL.createObjectURL(D.data),ee=document.createElement("a");ee.href=q;const ie=D.headers["Content-Disposition"]||D.headers["content-disposition"],ge=ie==null?void 0:ie.match(/filename="(.+)"/),Ee=ge?decodeURIComponent(ge[1]):"download.zip";ee.setAttribute("download",Ee),document.body.appendChild(ee),ee.click(),document.body.removeChild(ee),window.URL.revokeObjectURL(q),R({title:"Bắt đầu tải xuống",description:`Đã bắt đầu tải xuống ${T.length} mục${T.length>1,""}`})}catch(D){console.error("Error downloading files:",D),R({title:"Lỗi",description:"Không thể tải xuống tập tin",variant:"destructive"})}finally{Se(D=>{const q=new Set(D);return T.forEach(ee=>q.delete(ee)),q})}},Vp=h?h.replace(n,"").split("/").filter(Boolean):[],qE=()=>Array.from(m).map(T=>{var D;for(const q in Vt){const ee=(D=Vt[q])==null?void 0:D.find(ie=>ie.key===T);if(ee)return ee}return null}).filter(T=>T!==null),jp=_.useMemo(()=>{const T=[{id:"select",header:()=>{const D=rE(Vt,h),q=D.length>0&&D.every(ie=>m.has(ie)),ee=D.some(ie=>m.has(ie));return l.jsx(ia,{checked:q?!0:ee?"indeterminate":!1,onCheckedChange:ie=>{if(ie){const ge=gn.reduce((Ee,Ye,nr)=>(Ee[nr]=!0,Ee),{});si(ge)}else si({})},"aria-label":"Chọn tất cả"})},cell:({row:D})=>{const q=D.original,ie=q.isFolder?jE(q.key):m.has(q.key)?"all":"none";return l.jsx("div",{className:"flex items-center",children:l.jsx(ia,{checked:ie==="partial"?"indeterminate":ie==="all",onCheckedChange:ge=>{const Ee={...Ir};ge?Ee[D.index]=!0:delete Ee[D.index],si(Ee)},"aria-label":"Chọn dòng"})})},enableSorting:!1},{id:"fileName",header:({column:D})=>l.jsxs(ye,{variant:"ghost",onClick:()=>D.toggleSorting(D.getIsSorted()==="asc"),children:["Tên tập tin",l.jsx(Wi,{})]}),accessorKey:"name",cell:({row:D})=>{const q=D.original,ee=q.key.substring(0,q.key.lastIndexOf("/"))||"/",ie=d.trim()!==""&&ee!==h,ge=ee.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&&(a||p(new Set),tr(q.key))},children:[q.isFolder?l.jsx(di,{className:"h-5 w-5 text-blue-500"}):null,q.name]}),ie&&l.jsxs("div",{className:"text-sm text-gray-500 flex items-center",children:[l.jsx(di,{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:()=>{tr("")},children:"/"}),ge.map((Ee,Ye)=>l.jsxs("span",{className:"flex items-center",children:[l.jsx("span",{className:"cursor-pointer hover:text-blue-600",onClick:()=>{tr(ge.slice(0,Ye+1).join("/")+"/")},children:Ee}),Ye<ge.length-1&&l.jsx("span",{children:"/"})]},Ye))]})]})]})}}];return r||T.push({id:"size",header:({column:D})=>l.jsxs(ye,{variant:"ghost",onClick:()=>D.toggleSorting(D.getIsSorted()==="asc"),children:["Kích thước",l.jsx(Wi,{})]}),accessorKey:"size",cell:({getValue:D,row:q})=>{const ee=D();return l.jsx("span",{children:q.original.isFolder?"-":$v(ee)})}},{id:"lastModified",header:({column:D})=>l.jsxs(ye,{variant:"ghost",onClick:()=>D.toggleSorting(D.getIsSorted()==="asc"),className:"px-0 w-full flex-row justify-end",children:["Sửa đổi lần cuối",l.jsx(Wi,{})]}),accessorKey:"lastModified",cell:({row:D})=>{const q=D.original.lastModified;return l.jsx("div",{className:"w-full flex-row justify-end items-center text-right",children:l.jsx("span",{children:q&&Gl(q).isValid()?Gl(q).format("DD/MM/YYYY HH:mm"):"-"})})},size:200},{id:"actions",header:()=>l.jsx("span",{children:"Hành động"}),accessorKey:"key",cell:({row:D})=>l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(sn,{children:l.jsxs(ln,{children:[l.jsx(cn,{asChild:!0,children:l.jsx(ye,{variant:"ghost",size:"icon",onClick:()=>Rp([D.original.key]),className:"h-8 w-8 p-0",disabled:le.has(D.original.key),children:le.has(D.original.key)?l.jsx($e,{className:"h-4 w-4 animate-spin"}):l.jsx(zs,{className:"h-4 w-4"})})}),l.jsx(Gt,{children:"Tải xuống"})]})}),h.trim()!==""&&l.jsx(sn,{children:l.jsxs(ln,{children:[l.jsx(cn,{asChild:!0,children:l.jsx(ye,{variant:"ghost",size:"icon",onClick:()=>{B(D.original),ce(D.original.name)},className:"h-8 w-8 p-0",children:l.jsx(tg,{className:"h-4 w-4"})})}),l.jsx(Gt,{children:"Đổi tên"})]})}),l.jsx(sn,{children:l.jsxs(ln,{children:[l.jsx(cn,{asChild:!0,children:l.jsx(ye,{variant:"ghost",size:"icon",onClick:()=>{se(!0),G(D.original)},className:"h-8 w-8 p-0",children:l.jsx(Lh,{className:"h-4 w-4"})})}),l.jsx(Gt,{children:"Di chuyển"})]})}),l.jsx(sn,{children:l.jsxs(ln,{children:[l.jsx(cn,{asChild:!0,children:l.jsx(ye,{variant:"ghost",size:"icon",onClick:()=>H(D.original),className:"h-8 w-8 p-0",children:l.jsx(Bs,{className:"h-4 w-4"})})}),l.jsx(Gt,{children:"Xóa"})]})})]})}),T},[m,gn,Ir,le,r]),Vs=nl({data:gn,columns:jp,state:{rowSelection:Ir,sorting:u},onSortingChange:c,enableRowSelection:!0,onRowSelectionChange:si,getCoreRowModel:tl(),getSortedRowModel:zg()}),GE=async T=>{var D,q;St(!0);try{if(_r(T)){const ee=await me.get(`${t}/api/read-text`,{params:{path:T.key}});Ce(ee.data.content)}try{const ee=await me.get(`${t}/api/read-json`,{params:{path:T.key+".metadata.json"}}),ie=((q=(D=ee==null?void 0:ee.data)==null?void 0:D.content)==null?void 0:q.metadataAttributes)||null;return ne({fullPath:A==null?void 0:A.key,...ie})}catch{return ne("Lỗi phân tích siêu dữ liệu")}}catch(ee){console.error("Error loading file content:",ee),R({title:"Lỗi",description:"Không thể tải nội dung tập tin",variant:"destructive"})}finally{St(!1)}},KE=async(T,D)=>{tt(!0);try{await me.post(`${t}/api/modify-text`,{path:T.key,content:D}),R({title:"Đã lưu tập tin",description:"Nội dung tập tin đã được cập nhật thành công"}),Qe.current=!0,await nt(),B(null),Ce(""),P("rename"),await hn()}catch(q){console.error("Error saving file content:",q),R({title:"Lỗi",description:"Không thể lưu nội dung tập tin",variant:"destructive"})}finally{tt(!1)}},YE=async T=>{tt(!0);try{console.log("🚀 ~ saveJsonFile ~ metadataForEdit:",Q),await me.post(`${t}/api/modify-json`,{path:T.key+".metadata.json",content:{metadataAttributes:Q}}),R({title:"Đã lưu tập tin",description:"Nội dung tập tin đã được cập nhật thành công"}),Qe.current=!0,await nt(),B(null),Ce(""),P("rename")}catch(D){console.error("Error saving file content:",D),R({title:"Lỗi",description:"Không thể lưu nội dung tập tin",variant:"destructive"})}finally{tt(!1)}};_.useEffect(()=>{A&&(A.isFolder||GE(A),P("rename"))},[A]);const XE=async(T,D)=>{var q;if(_e){R({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}we(!0);try{const{data:ee}=await me.post(`${t}/api/crawl`,{url:T,limit:D,prefix:h});if(ee.id){Ip({id:ee.id,url:T,limit:D,prefix:h,taskId:((q=ee.task)==null?void 0:q.id)||""});const ie=localStorage.getItem(pp),ge=ie?JSON.parse(ie):[];ge.some(Ee=>Ee.id===ee.id)||(ge.unshift({url:T,id:ee.id,limit:D,prefix:h,timestamp:Date.now()}),ge.length>20&&(ge.length=20),localStorage.setItem(pp,JSON.stringify(ge))),R({title:"Bắt đầu thu thập website",description:`Đã thêm nhiệm vụ thu thập ${T} với giới hạn ${D}. Dữ liệu sẽ có sẵn sau khi thu thập hoàn tất.`}),re(!1),K(""),Y("1")}}catch(ee){console.error("Error crawling website:",ee),R({title:"Lỗi",description:"Không thể bắt đầu thu thập website",variant:"destructive"})}finally{we(!1)}},JE=async()=>{try{if(!(_e!=null&&_e.id))return;Ip(null),localStorage.removeItem(Xn),R({title:"Đã dừng thu thập",description:`Đã dừng thu thập website ${_e.url}`})}catch(T){console.error("Error stopping job:",T),R({title:"Lỗi",description:"Không thể dừng thu thập website",variant:"destructive"})}};_.useEffect(()=>{const T=(D=!0)=>{const ee=new URL(window.location.href).searchParams.get("prefix")||"";ee?tr(ee,!1):(D&&!a&&p(new Set),b(n),v(n),Qe.current=!0,setTimeout(()=>{nt()},0))};return T(!1),window.addEventListener("popstate",()=>T(!0)),()=>{window.removeEventListener("popstate",()=>T(!0))}},[]);const ZE=async()=>{Mp(!0);try{const T=await me.post(`${t}/api/prediction-report`);console.log("🚀 ~ Home.tsx:1585 ~ handleExportReport ~ response:",T),R({title:"Xuất báo cáo thành công",description:"Báo cáo dự đoán đã được xuất"})}catch(T){console.error("Error exporting report:",T),R({title:"Lỗi",description:"Không thể xuất báo cáo dự đoán",variant:"destructive"})}finally{Mp(!1)}},QE=async()=>{try{const T=Lv();T&&(await me.post(`${t}/api/start-ingestion-job`,{prefix:h,user_id:T.id,userName:T.username})).status===200&&await hn()}catch(T){ct(!1),console.log(T)}},mn=_.useRef(),hn=async()=>{try{ct(!0);const T=await me.post(`${t}/api/get-ingestion-job-status`,{prefix:h}),{status:D}=T==null?void 0:T.data;D==="FAILED"||D==="COMPLETE"||D==="STOPPED"||D==="STOPPING"||!D?(ct(!1),mn.current&&(clearInterval(mn.current),mn.current=null),Ls(T==null?void 0:T.data)):(mn.current||(mn.current=setInterval(()=>hn(),5e3)),Ls(T==null?void 0:T.data))}catch(T){console.log(T)}};return console.log(Ke),_.useEffect(()=>{const T=h==null?void 0:h.split("/")[0];return T!==$p&&(ct(!1),mn.current&&(clearInterval(mn.current),mn.current=null),FE(T||""),Ls(null),T&&hn()),()=>{}},[$p,h]),l.jsxs("div",{className:"space-y-4 s3-explr-container",children:[l.jsx(_d,{}),l.jsx(Ht,{open:OE,onOpenChange:T=>{Fr(T),T||(ai(""),kr(null),He(!1),U(null))},children:l.jsxs(At,{children:[l.jsxs(Pt,{children:[l.jsx(Nt,{children:"Cảnh báo trùng lặp"}),l.jsxs(zn,{children:[Or&&l.jsxs(l.Fragment,{children:["Folder $",Or," đã có."]}),pn&&pn.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(pn).map((T,D)=>l.jsx("li",{children:T.name},D))})]})]})]}),l.jsxs(Sn,{children:[l.jsx(ye,{variant:"outline",onClick:()=>{Fr(!1),ai(""),kr(null),He(!1),U(null)},children:"Bỏ qua"}),l.jsx(ye,{variant:"destructive",onClick:()=>BE(),children:"Ghi đè"})]})]})}),l.jsx(fc,{className:"s3-explr-breadcrumb",children:l.jsxs(pc,{className:"s3-explr-breadcrumb-list",children:[l.jsx(ea,{className:"s3-explr-breadcrumb-item",children:l.jsx(ta,{onClick:()=>tr(n),className:"flex items-center gap-1 cursor-pointer s3-explr-breadcrumb-home",children:e})}),!s&&Vp.map((T,D)=>l.jsxs("div",{className:"flex items-center",children:[l.jsx(gc,{className:"s3-explr-breadcrumb-separator"},`sep-${D}`),l.jsx(ea,{className:"s3-explr-breadcrumb-item",children:l.jsx(ta,{onClick:()=>tr(n+Vp.slice(0,D+1).join("/")+"/"),className:"cursor-pointer s3-explr-breadcrumb-link",children:T})},`item-${T}`)]},D))]})}),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(KS,{ref:j,onChange:T=>g(T)})}),l.jsxs(ye,{variant:"outline",size:"sm",onClick:()=>{b(h),Qe.current=!0,nt()},disabled:er,className:"flex items-center gap-2 s3-explr-refresh-btn",children:[l.jsx(ui,{className:`h-4 w-4 s3-explr-refresh-icon ${er?"animate-spin":""}`}),"Làm mới"]}),h&&h!=="/"&&l.jsx(sn,{delayDuration:0,children:l.jsxs(ln,{children:[l.jsx(cn,{asChild:!0,children:l.jsxs(ye,{variant:"outline",size:"sm",onClick:()=>{er||Fe||(ct(!0),QE())},"aria-disabled":er||Fe,className:"flex items-center gap-2 s3-explr-refresh-btn aria-disabled:opacity-50",children:[l.jsx(ui,{className:`h-4 w-4 s3-explr-refresh-icon ${er||Fe?"animate-spin":""}`}),"Đồng bộ KB"]})}),Ke&&l.jsx(Gt,{side:"right",sideOffset:5,children:l.jsxs("div",{className:"space-y-1 p-2",children:[l.jsx("p",{className:"font-semibold",children:"Thông tin đồng bộ:"}),l.jsxs("p",{className:"flex items-center gap-2",children:["Trạng thái:"," ",l.jsxs("span",{className:`flex items-center gap-1 ${Ke.status==="COMPLETE"?"text-green-600":Ke.status==="FAILED"?"text-red-600":"text-yellow-600"}`,children:[Ke.status==="COMPLETE"&&l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})}),Ke.status==="FAILED"&&l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})}),Ke.status!=="COMPLETE"&&Ke.status!=="FAILED"&&l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 8v4m0 4h.01"})}),Ke.status]})]}),l.jsxs("p",{children:["Ngày tạo:"," ",(()=>{const T=new Date(Ke.created_date),D=new Date(T.getTime()+7*60*60*1e3),ee=Math.floor((new Date().getTime()-T.getTime())/6e4);return ee<1440?`${ee} phút trước`:D.toLocaleString("vi-VN",{timeZone:"UTC"})})()]}),l.jsxs("p",{children:["DataSource ID: ",Ke.dataSourceId]}),l.jsxs("p",{children:["Ingestion Job ID: ",Ke.ingestionJobId]}),l.jsxs("p",{children:["Knowledge Base ID: ",Ke.knowledgeBaseId]}),l.jsxs("p",{children:["Người dùng: ",Ke.user_name]}),l.jsxs("p",{children:["Job trong queue: ",Ke.is_still_in_stock?"Còn":"Không"]})]})})]})}),!r&&l.jsxs(l.Fragment,{children:[m.size>0&&l.jsxs(l.Fragment,{children:[l.jsxs(ye,{variant:"outline",size:"sm",onClick:()=>Rp(Array.from(m)),disabled:Array.from(m).some(T=>le.has(T)),className:"flex items-center gap-2 s3-explr-download-selected-btn",children:[Array.from(m).some(T=>le.has(T))?l.jsx($e,{className:"h-4 w-4 animate-spin mr-2 s3-explr-loader"}):l.jsx(zs,{className:"h-4 w-4 s3-explr-download-icon"}),"Tải xuống đã chọn (",m.size,")"]}),l.jsxs(Ht,{open:k,onOpenChange:$,children:[l.jsx(mo,{asChild:!0,children:l.jsxs(ye,{variant:"destructive",size:"sm",className:"flex items-center gap-2 s3-explr-bulk-delete-btn",children:[l.jsx(Bs,{className:"h-4 w-4 s3-explr-trash-icon"}),"Xóa đã chọn (",m.size,")"]})}),l.jsxs(At,{className:"s3-explr-dialog-content",children:[l.jsxs(Pt,{className:"s3-explr-dialog-header",children:[l.jsx(Nt,{className:"s3-explr-dialog-title",children:"Xác nhận xóa hàng loạt"}),l.jsxs(zn,{className:"s3-explr-dialog-description",children:["Bạn có chắc chắn muốn xóa ",m.size," mục đã chọn? Hành động này không thể hoàn tác."]})]}),l.jsxs(Sn,{className:"s3-explr-dialog-footer",children:[l.jsx(ye,{variant:"outline",onClick:()=>$(!1),className:"s3-explr-cancel-btn",children:"Hủy"}),l.jsx(ye,{variant:"destructive",onClick:UE,disabled:W,className:"s3-explr-confirm-delete-btn",children:W?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"})]})]})]})]}),!s&&l.jsxs(Ht,{open:w,onOpenChange:S,children:[l.jsx(mo,{asChild:!0,children:l.jsxs(ye,{variant:"outline",size:"sm",className:"flex items-center gap-2 s3-explr-new-folder-btn",disabled:!!i&&!h,children:[l.jsx(Xp,{className:"h-4 w-4 s3-explr-folder-plus-icon"}),"Thư mục mới"]})}),l.jsxs(At,{className:"s3-explr-dialog-content",children:[l.jsx(Pt,{className:"s3-explr-dialog-header",children:l.jsx(Nt,{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(Cn,{htmlFor:"name",className:"s3-explr-label",children:"Tên thư mục"}),l.jsx(nn,{disabled:N,id:"name",value:E,onChange:T=>x(T.target.value),placeholder:"Nhập tên thư mục",className:"s3-explr-input"})]}),l.jsxs(ye,{onClick:()=>{E.trim()&&zE(E,h)},disabled:N,className:"s3-explr-create-btn",children:[N&&l.jsx($e,{className:"mr-2 h-4 w-4 animate-spin s3-explr-loader"}),N?"Đang tạo...":"Tạo"]})]})]})]}),s&&!h?l.jsx(l.Fragment,{}):l.jsxs("div",{className:"flex items-center gap-2 s3-explr-upload-group",children:[l.jsx(ye,{variant:"outline",size:"sm",className:"flex items-center gap-2 s3-explr-upload-files-btn",onClick:()=>{const T=document.createElement("input");T.type="file",T.multiple=!0,T.onchange=D=>{const q=D.target.files;q&&Rs(q,h,"files")},T.click()},disabled:F!==null||!!i&&!h,children:F==="files"?l.jsxs(l.Fragment,{children:[l.jsx($e,{className:"h-4 w-4 animate-spin mr-2 s3-explr-loader"}),"Đang xử lý..."]}):l.jsxs(l.Fragment,{children:[l.jsx(Kp,{className:"h-4 w-4 s3-explr-upload-icon"}),"Tải lên tập tin"]})}),l.jsx(ye,{variant:"outline",size:"sm",className:"flex items-center gap-2 s3-explr-upload-folder-btn",onClick:()=>{const T=document.createElement("input");T.type="file",T.multiple=!0,T.webkitdirectory=!0,T.onchange=D=>{const q=D.target.files;q&&Rs(q,h,"folder")},T.click()},disabled:F!==null||!!i&&!h,children:F==="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(di,{className:"h-4 w-4 s3-explr-folder-icon"}),"Tải lên thư mục"]})}),_e?l.jsx(sn,{delayDuration:0,children:l.jsxs(ln,{children:[l.jsx(cn,{asChild:!0,children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs(ye,{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"}),_e.status?l.jsxs(l.Fragment,{children:[_e.status.isProcessing?"Đang thu thập ":"Đang quét sitemap ","(",_e.status.completed,"/",_e.status.total,") -"," ",Math.floor(Qn/60),":",String(Qn%60).padStart(2,"0")]}):"Đang thu thập..."]}),l.jsxs(ye,{variant:"destructive",size:"sm",onClick:()=>void JE(),className:"flex items-center gap-2",children:[l.jsx("span",{className:"sr-only",children:"Dừng thu thập"}),l.jsx(rg,{className:"h-4 w-4"})]})]})}),_e.status&&l.jsx(Gt,{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 ",_e.url]}),l.jsxs("p",{children:["Tiến độ: ",_e.status.completed,"/",_e.status.total," ","trang"]}),l.jsxs("p",{children:["Thời gian: ",Math.floor(Qn/60),":",String(Qn%60).padStart(2,"0")]}),l.jsxs("p",{children:["Trạng thái:"," ",_e.status.status==="scraping"?"Đang thu thập":_e.status.status==="completed"?"Hoàn thành":"Thất bại"]})]})})]})}):!s&&l.jsxs(Ht,{open:V,onOpenChange:re,children:[l.jsx(mo,{asChild:!0,children:l.jsxs(ye,{variant:"outline",size:"sm",className:"flex items-center gap-2 s3-explr-add-website-btn",disabled:!!i&&!h,children:[l.jsx(Qp,{className:"h-4 w-4 s3-explr-globe-icon"}),"Thêm website"]})}),l.jsxs(At,{className:"s3-explr-dialog-content",children:[l.jsxs(Pt,{className:"s3-explr-dialog-header",children:[l.jsx(Nt,{className:"s3-explr-dialog-title",children:"Thêm website"}),l.jsx(zn,{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(Cn,{htmlFor:"websiteUrl",className:"s3-explr-label",children:"URL Website"}),l.jsx(nn,{id:"websiteUrl",value:J,onChange:T=>K(T.target.value),placeholder:"https://example.com",type:"url",disabled:ve,className:"s3-explr-input"})]}),l.jsxs("div",{className:"space-y-2 s3-explr-input-group",children:[l.jsx(Cn,{htmlFor:"crawlLimit",className:"s3-explr-label",children:"Giới hạn thu thập"}),l.jsx(nn,{id:"crawlLimit",value:z,onChange:T=>{const D=T.target.value;/^\d*$/.test(D)&&Y(D)},placeholder:"1",type:"text",disabled:ve,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(Sn,{className:"s3-explr-dialog-footer",children:[l.jsx(ye,{variant:"outline",onClick:()=>{re(!1),K(""),Y("1")},disabled:ve,className:"s3-explr-cancel-btn",children:"Hủy"}),l.jsx(ye,{onClick:()=>{J.trim()&&XE(J.trim(),parseInt(z)||1)},disabled:ve||!J.trim(),className:"s3-explr-crawl-btn",children:ve?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"})]})]})]}),h.startsWith("BKTTW/")&&l.jsx(sn,{delayDuration:0,children:l.jsxs(ln,{children:[l.jsx(cn,{asChild:!0,children:l.jsxs(ye,{variant:"outline",size:"sm",className:"flex items-center gap-2 s3-explr-add-website-btn",disabled:!!i&&!h,onClick:ZE,children:[$s&&l.jsx(ui,{className:`h-4 w-4 s3-explr-refresh-icon ${$s?"animate-spin":""}`}),"Xuất báo cáo"]})}),$s&&l.jsx(Gt,{sideOffset:5,children:"Đang xuất báo cáo"})]})})]}),!s&&l.jsx("div",{className:"flex items-center gap-4",children:l.jsxs(ye,{variant:"outline",size:"sm",onClick:()=>$E(),className:"flex items-center gap-2",children:[l.jsxs("svg",{viewBox:"0 0 87.3 78",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("path",{d:"m6.6 66.85 3.85 6.65c.8 1.4 1.95 2.5 3.3 3.3l13.75-23.8h-27.5c0 1.55.4 3.1 1.2 4.5z",fill:"#0066da"}),l.jsx("path",{d:"m43.65 25-13.75-23.8c-1.35.8-2.5 1.9-3.3 3.3l-25.4 44a9.06 9.06 0 0 0 -1.2 4.5h27.5z",fill:"#00ac47"}),l.jsx("path",{d:"m73.55 76.8c1.35-.8 2.5-1.9 3.3-3.3l1.6-2.75 7.65-13.25c.8-1.4 1.2-2.95 1.2-4.5h-27.502l5.852 11.5z",fill:"#ea4335"}),l.jsx("path",{d:"m43.65 25 13.75-23.8c-1.35-.8-2.9-1.2-4.5-1.2h-18.5c-1.6 0-3.15.45-4.5 1.2z",fill:"#00832d"}),l.jsx("path",{d:"m59.8 53h-32.3l-13.75 23.8c1.35.8 2.9 1.2 4.5 1.2h50.8c1.6 0 3.15-.45 4.5-1.2z",fill:"#2684fc"}),l.jsx("path",{d:"m73.4 26.5-12.7-22c-.8-1.4-1.95-2.5-3.3-3.3l-13.75 23.8 16.15 28h27.45c0-1.55-.4-3.1-1.2-4.5z",fill:"#ffba00"})]}),"Đồng bộ Google Drive"]})}),l.jsx(Ht,{open:!!M,onOpenChange:T=>!T&&H(null),children:l.jsxs(At,{className:"s3-explr-dialog-content",children:[l.jsxs(Pt,{className:"s3-explr-dialog-header",children:[l.jsx(Nt,{className:"s3-explr-dialog-title",children:"Xác nhận xóa"}),l.jsxs(zn,{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(Sn,{className:"s3-explr-dialog-footer",children:[l.jsx(ye,{variant:"outline",onClick:()=>H(null),className:"s3-explr-cancel-btn",children:"Hủy"}),l.jsx(ye,{variant:"destructive",onClick:()=>HE(M),disabled:dn,className:"s3-explr-confirm-delete-btn",children:dn?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(Ht,{open:!!A,onOpenChange:T=>{T||(B(null),ne(null),ce(""),Ce(""),P("rename"))},children:l.jsxs(At,{className:"s3-explr-dialog-content max-w-5xl w-[90%]",children:[l.jsx(Pt,{className:"s3-explr-dialog-header",children:l.jsx(Nt,{className:"s3-explr-dialog-title",children:A!=null&&A.isFolder?"Đổi tên thư mục":_r(A)?"Quản lý tập tin":"Đổi tên tập tin"})}),A&&l.jsxs(db,{value:C,onValueChange:T=>P(T),children:[l.jsxs(Zu,{"aria-checked":!_r(A),"aria-disabled":A.isFolder,className:"grid w-full grid-cols-3 aria-checked:grid-cols-2 aria-disabled:grid-cols-1",children:[l.jsx(Ao,{value:"rename",children:"Đổi tên"}),!A.isFolder&&l.jsxs(l.Fragment,{children:[_r(A)&&l.jsx(Ao,{value:"edit",children:"Sửa nội dung"}),l.jsx(Ao,{value:"edit-metadata",children:"Sửa metadata file"})]})]}),l.jsx(Po,{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(Cn,{htmlFor:"newName",className:"s3-explr-label",children:"Tên mới"}),l.jsx(nn,{id:"newName",value:te,onChange:T=>ce(T.target.value),placeholder:"Nhập tên mới",disabled:ue,className:"s3-explr-input"})]})})}),!A.isFolder&&l.jsxs(l.Fragment,{children:[_r(A)&&l.jsx(Po,{value:"edit",children:l.jsx("div",{className:"space-y-4 py-4",children:ze?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(Cn,{htmlFor:"content",className:"s3-explr-label",children:"Nội dung tập tin"}),l.jsx(mr,{id:"content",value:X,onChange:T=>Ce(T.target.value),placeholder:"Nhập nội dung tập tin",className:"min-h-[200px] font-mono",disabled:lt})]})})}),l.jsx(Po,{value:"edit-metadata",children:l.jsx("div",{className:"space-y-4 py-4",children:ze?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:Q&&typeof Q=="object"&&Object.entries(Q).map(([T,D],q)=>l.jsxs("div",{className:"pb-3 flex flex-col gap-2",children:[l.jsxs(Cn,{htmlFor:T,className:"s3-explr-label flex items-center gap-1",children:[Qh[T]||T,Yi(T)&&l.jsx(Rh,{className:"h-[12px] w-[12px] text-red-500"})]}),ev(T)?l.jsx(mr,{id:T,value:typeof D=="string"?D:JSON.stringify(D),onChange:ee=>{const ie={...Q,[T]:ee.target.value};ne(ie)},placeholder:"Nhập nội dung tập tin",className:"min-h-[200px] font-mono",disabled:lt||Yi(T)}):l.jsx(nn,{id:T,value:typeof D=="string"?D:JSON.stringify(D),onChange:ee=>{const ie={...Q,[T]:ee.target.value};ne(ie)},placeholder:"Nhập nội dung",className:"s3-explr-input",disabled:lt||Yi(T)})]},q))})})})]})]}),l.jsxs(Sn,{className:"s3-explr-dialog-footer",children:[l.jsx(ye,{variant:"outline",onClick:()=>{B(null),ne(null),ce(""),Ce("")},className:"s3-explr-cancel-btn",children:"Hủy"}),C==="edit"?l.jsx(ye,{onClick:()=>A&&KE(A,X),disabled:lt||ze,className:"s3-explr-save-btn",children:lt?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"}):C==="edit-metadata"?l.jsx(ye,{onClick:()=>Q&&typeof Q=="object"&&A&&YE(A),disabled:lt||ze,className:"s3-explr-save-btn",children:lt?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(ye,{onClick:()=>{te.trim()&&A&&WE(A,te.trim())},disabled:ue||!te.trim()||te.trim()===(A==null?void 0:A.name),className:"s3-explr-rename-btn",children:ue?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"})]})]})}),O&&oe&&l.jsx(ZC,{openDialogRename:oe,setOpenDialogRename:se,apiBaseUrl:t,setFileToMove:G,fileToMove:O,refreshFiles:nt,ignoreCache:Qe})]})]}),ME&&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(JC,{onFilesSelected:(T,D)=>Rs(T,h,D),children:l.jsx("div",{className:"rounded-md border s3-explr-table-container",children:l.jsxs(wo,{className:"s3-explr-table",children:[l.jsx(So,{className:"s3-explr-table-header",children:Vs.getHeaderGroups().map(T=>l.jsx(yt,{className:"hover:bg-transparent s3-explr-header-row",children:T.headers.map(D=>l.jsx(kt,{className:"s3-explr-header-cell",children:D.isPlaceholder?null:Hr(D.column.columnDef.header,D.getContext())},D.id))},T.id))}),l.jsx(Co,{className:"s3-explr-table-body",children:Vs.getRowModel().rows.length===0?l.jsx(yt,{className:"s3-explr-empty-row",children:l.jsx(Ze,{colSpan:jp.length,className:"h-24 text-center s3-explr-empty-cell",children:d?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 "',d,'"']}):l.jsx("div",{className:"text-gray-500 s3-explr-empty-message",children:er?"Đ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"})})}):Vs.getRowModel().rows.map(T=>l.jsx(yt,{className:"h-12 s3-explr-row",children:T.getVisibleCells().map(D=>l.jsx(Ze,{className:"align-middle s3-explr-cell",children:Hr(D.column.columnDef.cell,D.getContext())},D.id))},T.id))})]})})}),d&&Dr!==0&&l.jsx(l.Fragment,{children:l.jsx(ho,{children:l.jsxs(vo,{children:[l.jsx(yo,{onClick:()=>Rt(T=>Math.max(T-1,1)),"aria-disabled":Be===1,className:"cursor-pointer aria-disabled:pointer-events-none"}),Array.from({length:Math.ceil(Dr/20)},(T,D)=>{const q=D+1,ee=Math.ceil(Dr/20);return ee>7&&!(q===1||q===ee||q>=Be-1&&q<=Be+1)?q===Be-2&&Be>4||q===Be+2&&Be<ee-3?l.jsx(bo,{className:"pointer-events-none",children:"..."},D):null:l.jsx(vt,{className:"cursor-pointer",children:l.jsx(Bn,{isActive:Be===q,onClick:()=>Rt(q),className:`${Be===q?"bg-blue-500 text-white":"bg-white text-black"} hover:bg-blue-100`,children:q})},D)}),l.jsx(vt,{children:l.jsx(xo,{onClick:()=>Rt(T=>Math.min(T+1,Math.ceil(Dr/20))),"aria-disabled":Be===Math.ceil(Dr/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:[m.size," ",(m.size===1,"tập tin")," đã chọn"]}),l.jsx(ye,{variant:"default",onClick:()=>o(qE()),disabled:m.size===0,className:"s3-explr-ok-btn",children:"OK"})]})]})}),aE=e=>l.jsx(ag,{clientId:eE,children:l.jsx(iE,{...e})});var Tr=e=>e.type==="checkbox",Tn=e=>e instanceof Date,Ge=e=>e==null;const gp=e=>typeof e=="object";var Me=e=>!Ge(e)&&!Array.isArray(e)&&gp(e)&&!Tn(e),sE=e=>Me(e)&&e.target?Tr(e.target)?e.target.checked:e.target.value:e,lE=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,cE=(e,t)=>e.has(lE(t)),uE=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 ft(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&&!uE(e))t=e;else for(const o in e)e.hasOwnProperty(o)&&(t[o]=ft(e[o]));else return e;return t}var ei=e=>Array.isArray(e)?e.filter(Boolean):[],Ie=e=>e===void 0,ae=(e,t,n)=>{if(!t||!Me(e))return n;const r=ei(t.split(/[,[\].]+?/)).reduce((o,i)=>Ge(o)?o:o[i],e);return Ie(r)||r===e?Ie(e[t])?n:e[t]:r},Mt=e=>typeof e=="boolean",Ns=e=>/^\w*$/.test(e),mp=e=>ei(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Oe=(e,t,n)=>{let r=-1;const o=Ns(t)?[t]:mp(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 hp={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},wt={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Kt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};_.createContext(null);var dE=(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]!==wt.all&&(t._proxyFormState[a]=!r||wt.all),e[a]}});return o},et=e=>Me(e)&&!Object.keys(e).length,fE=(e,t,n,r)=>{n(e);const{name:o,...i}=e;return et(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(a=>t[a]===wt.all)},ti=e=>Array.isArray(e)?e:[e];function pE(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 $t=e=>typeof e=="string",gE=(e,t,n,r,o)=>$t(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),mE=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{},vp=e=>({isOnSubmit:!e||e===wt.onSubmit,isOnBlur:e===wt.onBlur,isOnChange:e===wt.onChange,isOnAll:e===wt.all,isOnTouch:e===wt.onTouched}),yp=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Ar=(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(Ar(s,t))break}else if(Me(s)&&Ar(s,t))break}}};var hE=(e,t,n)=>{const r=ti(ae(e,n));return Oe(r,"root",t[n]),Oe(e,n,r),e},ks=e=>e.type==="file",Lt=e=>typeof e=="function",ni=e=>{if(!Ps)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},ri=e=>$t(e),Os=e=>e.type==="radio",oi=e=>e instanceof RegExp;const xp={value:!1,isValid:!1},bp={value:!0,isValid:!0};var wp=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===""?bp:{value:e[0].value,isValid:!0}:bp:xp}return xp};const Sp={isValid:!1,value:null};var Cp=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,Sp):Sp;function Ep(e,t,n="validate"){if(ri(e)||Array.isArray(e)&&e.every(ri)||Mt(e)&&!e)return{type:n,message:ri(e)?e:"",ref:t}}var Jn=e=>Me(e)&&!oi(e)?e:{value:e,message:""},_p=async(e,t,n,r,o)=>{const{ref:i,refs:a,required:s,maxLength:u,minLength:c,min:d,max:g,pattern:m,validate:p,name:h,valueAsNumber:v,mount:y,disabled:b}=e._f,w=ae(t,h);if(!y||b)return{};const S=a?a[0]:i,E=W=>{r&&S.reportValidity&&(S.setCustomValidity(Mt(W)?"":W||""),S.reportValidity())},x={},N=Os(i),I=Tr(i),M=N||I,H=(v||ks(i))&&Ie(i.value)&&Ie(w)||ni(i)&&i.value===""||w===""||Array.isArray(w)&&!w.length,O=mE.bind(null,h,n,x),G=(W,Z,k,$=Kt.maxLength,F=Kt.minLength)=>{const U=W?Z:k;x[h]={type:W?$:F,message:U,ref:i,...O(W?$:F,U)}};if(o?!Array.isArray(w)||!w.length:s&&(!M&&(H||Ge(w))||Mt(w)&&!w||I&&!wp(a).isValid||N&&!Cp(a).isValid)){const{value:W,message:Z}=ri(s)?{value:!!s,message:s}:Jn(s);if(W&&(x[h]={type:Kt.required,message:Z,ref:S,...O(Kt.required,Z)},!n))return E(Z),x}if(!H&&(!Ge(d)||!Ge(g))){let W,Z;const k=Jn(g),$=Jn(d);if(!Ge(w)&&!isNaN(w)){const F=i.valueAsNumber||w&&+w;Ge(k.value)||(W=F>k.value),Ge($.value)||(Z=F<$.value)}else{const F=i.valueAsDate||new Date(w),U=A=>new Date(new Date().toDateString()+" "+A),j=i.type=="time",R=i.type=="week";$t(k.value)&&w&&(W=j?U(w)>U(k.value):R?w>k.value:F>new Date(k.value)),$t($.value)&&w&&(Z=j?U(w)<U($.value):R?w<$.value:F<new Date($.value))}if((W||Z)&&(G(!!W,k.message,$.message,Kt.max,Kt.min),!n))return E(x[h].message),x}if((u||c)&&!H&&($t(w)||o&&Array.isArray(w))){const W=Jn(u),Z=Jn(c),k=!Ge(W.value)&&w.length>+W.value,$=!Ge(Z.value)&&w.length<+Z.value;if((k||$)&&(G(k,W.message,Z.message),!n))return E(x[h].message),x}if(m&&!H&&$t(w)){const{value:W,message:Z}=Jn(m);if(oi(W)&&!w.match(W)&&(x[h]={type:Kt.pattern,message:Z,ref:i,...O(Kt.pattern,Z)},!n))return E(Z),x}if(p){if(Lt(p)){const W=await p(w,t),Z=Ep(W,S);if(Z&&(x[h]={...Z,...O(Kt.validate,Z.message)},!n))return E(Z.message),x}else if(Me(p)){let W={};for(const Z in p){if(!et(W)&&!n)break;const k=Ep(await p[Z](w,t),S,Z);k&&(W={...k,...O(Z,k.message)},E(k.message),n&&(x[h]=W))}if(!et(W)&&(x[h]={ref:S,...W},!n))return x}}return E(!0),x};function vE(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 yE(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:Ns(t)?[t]:mp(t),r=n.length===1?e:vE(e,n),o=n.length-1,i=n[o];return r&&delete r[i],o!==0&&(Me(r)&&et(r)||Array.isArray(r)&&yE(r))&&Ve(e,n.slice(0,-1)),e}var Fs=()=>{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=[]}}},Ds=e=>Ge(e)||!gp(e);function un(e,t){if(Ds(e)||Ds(t))return e===t;if(Tn(e)&&Tn(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(Tn(i)&&Tn(a)||Me(i)&&Me(a)||Array.isArray(i)&&Array.isArray(a)?!un(i,a):i!==a)return!1}}return!0}var Tp=e=>e.type==="select-multiple",xE=e=>Os(e)||Tr(e),Is=e=>ni(e)&&e.isConnected,Ap=e=>{for(const t in e)if(Lt(e[t]))return!0;return!1};function ii(e,t={}){const n=Array.isArray(e);if(Me(e)||n)for(const r in e)Array.isArray(e[r])||Me(e[r])&&!Ap(e[r])?(t[r]=Array.isArray(e[r])?[]:{},ii(e[r],t[r])):Ge(e[r])||(t[r]=!0);return t}function Pp(e,t,n){const r=Array.isArray(e);if(Me(e)||r)for(const o in e)Array.isArray(e[o])||Me(e[o])&&!Ap(e[o])?Ie(t)||Ds(n[o])?n[o]=Array.isArray(e[o])?ii(e[o],[]):{...ii(e[o])}:Pp(e[o],Ge(t)?{}:t[o],n[o]):n[o]=!un(e[o],t[o]);return n}var Pr=(e,t)=>Pp(e,t,ii(t)),Np=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Ie(e)?e:t?e===""?NaN:e&&+e:n&&$t(e)?new Date(e):r?r(e):e;function Ms(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return ks(t)?t.files:Os(t)?Cp(e.refs).value:Tp(t)?[...t.selectedOptions].map(({value:n})=>n):Tr(t)?wp(e.refs).value:Np(Ie(t.value)?e.ref.value:t.value,e)}var bE=(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}},Nr=e=>Ie(e)?e:oi(e)?e.source:Me(e)?oi(e.value)?e.value.source:e.value:e;const kp="AsyncFunction";var wE=e=>!!e&&!!e.validate&&!!(Lt(e.validate)&&e.validate.constructor.name===kp||Me(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===kp)),SE=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Op(e,t,n){const r=ae(e,n);if(r||Ns(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 CE=(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,EE=(e,t)=>!ei(ae(e,t)).length&&Ve(e,t);const _E={mode:wt.onSubmit,reValidateMode:wt.onChange,shouldFocusError:!0};function TE(e={}){let t={..._E,...e},n={submitCount:0,isDirty:!1,isLoading:Lt(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)?ft(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:ft(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:Fs(),array:Fs(),state:Fs()},m=vp(t.mode),p=vp(t.reValidateMode),h=t.criteriaMode===wt.all,v=C=>P=>{clearTimeout(c),c=setTimeout(C,P)},y=async C=>{if(!t.disabled&&(d.isValid||C)){const P=t.resolver?et((await M()).errors):await O(r,!0);P!==n.isValid&&g.state.next({isValid:P})}},b=(C,P)=>{!t.disabled&&(d.isValidating||d.validatingFields)&&((C||Array.from(s.mount)).forEach(V=>{V&&(P?Oe(n.validatingFields,V,P):Ve(n.validatingFields,V))}),g.state.next({validatingFields:n.validatingFields,isValidating:!et(n.validatingFields)}))},w=(C,P=[],V,re,J=!0,K=!0)=>{if(re&&V&&!t.disabled){if(a.action=!0,K&&Array.isArray(ae(r,C))){const z=V(ae(r,C),re.argA,re.argB);J&&Oe(r,C,z)}if(K&&Array.isArray(ae(n.errors,C))){const z=V(ae(n.errors,C),re.argA,re.argB);J&&Oe(n.errors,C,z),EE(n.errors,C)}if(d.touchedFields&&K&&Array.isArray(ae(n.touchedFields,C))){const z=V(ae(n.touchedFields,C),re.argA,re.argB);J&&Oe(n.touchedFields,C,z)}d.dirtyFields&&(n.dirtyFields=Pr(o,i)),g.state.next({name:C,isDirty:W(C,P),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Oe(i,C,P)},S=(C,P)=>{Oe(n.errors,C,P),g.state.next({errors:n.errors})},E=C=>{n.errors=C,g.state.next({errors:n.errors,isValid:!1})},x=(C,P,V,re)=>{const J=ae(r,C);if(J){const K=ae(i,C,Ie(V)?ae(o,C):V);Ie(K)||re&&re.defaultChecked||P?Oe(i,C,P?K:Ms(J._f)):$(C,K),a.mount&&y()}},N=(C,P,V,re,J)=>{let K=!1,z=!1;const Y={name:C};if(!t.disabled){const ve=!!(ae(r,C)&&ae(r,C)._f&&ae(r,C)._f.disabled);if(!V||re){d.isDirty&&(z=n.isDirty,n.isDirty=Y.isDirty=W(),K=z!==Y.isDirty);const we=ve||un(ae(o,C),P);z=!!(!ve&&ae(n.dirtyFields,C)),we||ve?Ve(n.dirtyFields,C):Oe(n.dirtyFields,C,!0),Y.dirtyFields=n.dirtyFields,K=K||d.dirtyFields&&z!==!we}if(V){const we=ae(n.touchedFields,C);we||(Oe(n.touchedFields,C,V),Y.touchedFields=n.touchedFields,K=K||d.touchedFields&&we!==V)}K&&J&&g.state.next(Y)}return K?Y:{}},I=(C,P,V,re)=>{const J=ae(n.errors,C),K=d.isValid&&Mt(P)&&n.isValid!==P;if(t.delayError&&V?(u=v(()=>S(C,V)),u(t.delayError)):(clearTimeout(c),u=null,V?Oe(n.errors,C,V):Ve(n.errors,C)),(V?!un(J,V):J)||!et(re)||K){const z={...re,...K&&Mt(P)?{isValid:P}:{},errors:n.errors,name:C};n={...n,...z},g.state.next(z)}},M=async C=>{b(C,!0);const P=await t.resolver(i,t.context,bE(C||s.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return b(C),P},H=async C=>{const{errors:P}=await M(C);if(C)for(const V of C){const re=ae(P,V);re?Oe(n.errors,V,re):Ve(n.errors,V)}else n.errors=P;return P},O=async(C,P,V={valid:!0})=>{for(const re in C){const J=C[re];if(J){const{_f:K,...z}=J;if(K){const Y=s.array.has(K.name),ve=J._f&&wE(J._f);ve&&d.validatingFields&&b([re],!0);const we=await _p(J,i,h,t.shouldUseNativeValidation&&!P,Y);if(ve&&d.validatingFields&&b([re]),we[K.name]&&(V.valid=!1,P))break;!P&&(ae(we,K.name)?Y?hE(n.errors,we,K.name):Oe(n.errors,K.name,we[K.name]):Ve(n.errors,K.name))}!et(z)&&await O(z,P,V)}}return V.valid},G=()=>{for(const C of s.unMount){const P=ae(r,C);P&&(P._f.refs?P._f.refs.every(V=>!Is(V)):!Is(P._f.ref))&&oe(C)}s.unMount=new Set},W=(C,P)=>!t.disabled&&(C&&P&&Oe(i,C,P),!un(B(),o)),Z=(C,P,V)=>gE(C,s,{...a.mount?i:Ie(P)?o:$t(C)?{[C]:P}:P},V,P),k=C=>ei(ae(a.mount?i:o,C,t.shouldUnregister?ae(o,C,[]):[])),$=(C,P,V={})=>{const re=ae(r,C);let J=P;if(re){const K=re._f;K&&(!K.disabled&&Oe(i,C,Np(P,K)),J=ni(K.ref)&&Ge(P)?"":P,Tp(K.ref)?[...K.ref.options].forEach(z=>z.selected=J.includes(z.value)):K.refs?Tr(K.ref)?K.refs.length>1?K.refs.forEach(z=>(!z.defaultChecked||!z.disabled)&&(z.checked=Array.isArray(J)?!!J.find(Y=>Y===z.value):J===z.value)):K.refs[0]&&(K.refs[0].checked=!!J):K.refs.forEach(z=>z.checked=z.value===J):ks(K.ref)?K.ref.value="":(K.ref.value=J,K.ref.type||g.values.next({name:C,values:{...i}})))}(V.shouldDirty||V.shouldTouch)&&N(C,J,V.shouldTouch,V.shouldDirty,!0),V.shouldValidate&&A(C)},F=(C,P,V)=>{for(const re in P){const J=P[re],K=`${C}.${re}`,z=ae(r,K);(s.array.has(C)||Me(J)||z&&!z._f)&&!Tn(J)?F(K,J,V):$(K,J,V)}},U=(C,P,V={})=>{const re=ae(r,C),J=s.array.has(C),K=ft(P);Oe(i,C,K),J?(g.array.next({name:C,values:{...i}}),(d.isDirty||d.dirtyFields)&&V.shouldDirty&&g.state.next({name:C,dirtyFields:Pr(o,i),isDirty:W(C,K)})):re&&!re._f&&!Ge(K)?F(C,K,V):$(C,K,V),yp(C,s)&&g.state.next({...n}),g.values.next({name:a.mount?C:void 0,values:{...i}})},j=async C=>{a.mount=!0;const P=C.target;let V=P.name,re=!0;const J=ae(r,V),K=()=>P.type?Ms(J._f):sE(C),z=Y=>{re=Number.isNaN(Y)||Tn(Y)&&isNaN(Y.getTime())||un(Y,ae(i,V,Y))};if(J){let Y,ve;const we=K(),Fe=C.type===hp.BLUR||C.type===hp.FOCUS_OUT,ct=!SE(J._f)&&!t.resolver&&!ae(n.errors,V)&&!J._f.deps||CE(Fe,ae(n.touchedFields,V),n.isSubmitted,p,m),Ct=yp(V,s,Fe);Oe(i,V,we),Fe?(J._f.onBlur&&J._f.onBlur(C),u&&u(0)):J._f.onChange&&J._f.onChange(C);const He=N(V,we,Fe,!1),dn=!et(He)||Ct;if(!Fe&&g.values.next({name:V,type:C.type,values:{...i}}),ct)return d.isValid&&(t.mode==="onBlur"?Fe&&y():y()),dn&&g.state.next({name:V,...Ct?{}:He});if(!Fe&&Ct&&g.state.next({...n}),t.resolver){const{errors:fn}=await M([V]);if(z(we),re){const Be=Op(n.errors,r,V),Rt=Op(fn,r,Be.name||V);Y=Rt.error,V=Rt.name,ve=et(fn)}}else b([V],!0),Y=(await _p(J,i,h,t.shouldUseNativeValidation))[V],b([V]),z(we),re&&(Y?ve=!1:d.isValid&&(ve=await O(r,!0)));re&&(J._f.deps&&A(J._f.deps),I(V,ve,Y,He))}},R=(C,P)=>{if(ae(n.errors,P)&&C.focus)return C.focus(),1},A=async(C,P={})=>{let V,re;const J=ti(C);if(t.resolver){const K=await H(Ie(C)?C:J);V=et(K),re=C?!J.some(z=>ae(K,z)):V}else C?(re=(await Promise.all(J.map(async K=>{const z=ae(r,K);return await O(z&&z._f?{[K]:z}:z)}))).every(Boolean),!(!re&&!n.isValid)&&y()):re=V=await O(r);return g.state.next({...!$t(C)||d.isValid&&V!==n.isValid?{}:{name:C},...t.resolver||!C?{isValid:V}:{},errors:n.errors}),P.shouldFocus&&!re&&Ar(r,R,C?J:s.mount),re},B=C=>{const P={...a.mount?i:o};return Ie(C)?P:$t(C)?ae(P,C):C.map(V=>ae(P,V))},Q=(C,P)=>({invalid:!!ae((P||n).errors,C),isDirty:!!ae((P||n).dirtyFields,C),error:ae((P||n).errors,C),isValidating:!!ae(n.validatingFields,C),isTouched:!!ae((P||n).touchedFields,C)}),ne=C=>{C&&ti(C).forEach(P=>Ve(n.errors,P)),g.state.next({errors:C?n.errors:{}})},te=(C,P,V)=>{const re=(ae(r,C,{_f:{}})._f||{}).ref,J=ae(n.errors,C)||{},{ref:K,message:z,type:Y,...ve}=J;Oe(n.errors,C,{...ve,...P,ref:re}),g.state.next({name:C,errors:n.errors,isValid:!1}),V&&V.shouldFocus&&re&&re.focus&&re.focus()},ce=(C,P)=>Lt(C)?g.values.subscribe({next:V=>C(Z(void 0,P),V)}):Z(C,P,!0),oe=(C,P={})=>{for(const V of C?ti(C):s.mount)s.mount.delete(V),s.array.delete(V),P.keepValue||(Ve(r,V),Ve(i,V)),!P.keepError&&Ve(n.errors,V),!P.keepDirty&&Ve(n.dirtyFields,V),!P.keepTouched&&Ve(n.touchedFields,V),!P.keepIsValidating&&Ve(n.validatingFields,V),!t.shouldUnregister&&!P.keepDefaultValue&&Ve(o,V);g.values.next({values:{...i}}),g.state.next({...n,...P.keepDirty?{isDirty:W()}:{}}),!P.keepIsValid&&y()},se=({disabled:C,name:P,field:V,fields:re,value:J})=>{if(Mt(C)&&a.mount||C){const K=C?void 0:Ie(J)?Ms(V?V._f:ae(re,P)._f):J;(C||!C&&!Ie(K))&&Oe(i,P,K),N(P,K,!1,!1,!0)}},ue=(C,P={})=>{let V=ae(r,C);const re=Mt(P.disabled)||Mt(t.disabled);return Oe(r,C,{...V||{},_f:{...V&&V._f?V._f:{ref:{name:C}},name:C,mount:!0,...P}}),s.mount.add(C),V?se({field:V,disabled:Mt(P.disabled)?P.disabled:t.disabled,name:C,value:P.value}):x(C,!0,P.value),{...re?{disabled:P.disabled||t.disabled}:{},...t.progressive?{required:!!P.required,min:Nr(P.min),max:Nr(P.max),minLength:Nr(P.minLength),maxLength:Nr(P.maxLength),pattern:Nr(P.pattern)}:{},name:C,onChange:j,onBlur:j,ref:J=>{if(J){ue(C,P),V=ae(r,C);const K=Ie(J.value)&&J.querySelectorAll&&J.querySelectorAll("input,select,textarea")[0]||J,z=xE(K),Y=V._f.refs||[];if(z?Y.find(ve=>ve===K):K===V._f.ref)return;Oe(r,C,{_f:{...V._f,...z?{refs:[...Y.filter(Is),K,...Array.isArray(ae(o,C))?[{}]:[]],ref:{type:K.type,name:C}}:{ref:K}}}),x(C,!1,void 0,K)}else V=ae(r,C,{}),V._f&&(V._f.mount=!1),(t.shouldUnregister||P.shouldUnregister)&&!(cE(s.array,C)&&a.action)&&s.unMount.add(C)}}},de=()=>t.shouldFocusError&&Ar(r,R,s.mount),le=C=>{Mt(C)&&(g.state.next({disabled:C}),Ar(r,(P,V)=>{const re=ae(r,V);re&&(P.disabled=re._f.disabled||C,Array.isArray(re._f.refs)&&re._f.refs.forEach(J=>{J.disabled=re._f.disabled||C}))},0,!1))},Se=(C,P)=>async V=>{let re;if(V&&(V.preventDefault&&V.preventDefault(),V.persist&&V.persist()),t.disabled){P&&await P({...n.errors},V);return}let J=ft(i);if(g.state.next({isSubmitting:!0}),t.resolver){const{errors:K,values:z}=await M();n.errors=K,J=z}else await O(r);if(Ve(n.errors,"root"),et(n.errors)){g.state.next({errors:{}});try{await C(J,V)}catch(K){re=K}}else P&&await P({...n.errors},V),de(),setTimeout(de);if(g.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:et(n.errors)&&!re,submitCount:n.submitCount+1,errors:n.errors}),re)throw re},X=(C,P={})=>{ae(r,C)&&(Ie(P.defaultValue)?U(C,ft(ae(o,C))):(U(C,P.defaultValue),Oe(o,C,ft(P.defaultValue))),P.keepTouched||Ve(n.touchedFields,C),P.keepDirty||(Ve(n.dirtyFields,C),n.isDirty=P.defaultValue?W(C,ft(ae(o,C))):W()),P.keepError||(Ve(n.errors,C),d.isValid&&y()),g.state.next({...n}))},Ce=(C,P={})=>{const V=C?ft(C):o,re=ft(V),J=et(C),K=J?o:re;if(P.keepDefaultValues||(o=V),!P.keepValues){if(P.keepDirtyValues){const z=new Set([...s.mount,...Object.keys(Pr(o,i))]);for(const Y of Array.from(z))ae(n.dirtyFields,Y)?Oe(K,Y,ae(i,Y)):U(Y,ae(K,Y))}else{if(Ps&&Ie(C))for(const z of s.mount){const Y=ae(r,z);if(Y&&Y._f){const ve=Array.isArray(Y._f.refs)?Y._f.refs[0]:Y._f.ref;if(ni(ve)){const we=ve.closest("form");if(we){we.reset();break}}}}r={}}i=t.shouldUnregister?P.keepDefaultValues?ft(o):{}:ft(K),g.array.next({values:{...K}}),g.values.next({values:{...K}})}s={mount:P.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!d.isValid||!!P.keepIsValid||!!P.keepDirtyValues,a.watch=!!t.shouldUnregister,g.state.next({submitCount:P.keepSubmitCount?n.submitCount:0,isDirty:J?!1:P.keepDirty?n.isDirty:!!(P.keepDefaultValues&&!un(C,o)),isSubmitted:P.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:J?{}:P.keepDirtyValues?P.keepDefaultValues&&i?Pr(o,i):n.dirtyFields:P.keepDefaultValues&&C?Pr(o,C):P.keepDirty?n.dirtyFields:{},touchedFields:P.keepTouched?n.touchedFields:{},errors:P.keepErrors?n.errors:{},isSubmitSuccessful:P.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},ze=(C,P)=>Ce(Lt(C)?C(i):C,P);return{control:{register:ue,unregister:oe,getFieldState:Q,handleSubmit:Se,setError:te,_executeSchema:M,_getWatch:Z,_getDirty:W,_updateValid:y,_removeUnmounted:G,_updateFieldArray:w,_updateDisabledField:se,_getFieldArray:k,_reset:Ce,_resetDefaultValues:()=>Lt(t.defaultValues)&&t.defaultValues().then(C=>{ze(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:A,register:ue,handleSubmit:Se,watch:ce,setValue:U,getValues:B,reset:ze,resetField:X,clearErrors:ne,unregister:oe,setError:te,setFocus:(C,P={})=>{const V=ae(r,C),re=V&&V._f;if(re){const J=re.refs?re.refs[0]:re.ref;J.focus&&(J.focus(),P.shouldSelect&&Lt(J.select)&&J.select())}},getFieldState:Q}}function AE(e={}){const t=_.useRef(),n=_.useRef(),[r,o]=_.useState({isDirty:!1,isValidating:!1,isLoading:Lt(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Lt(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...TE(e),formState:r});const i=t.current.control;return i._options=e,pE({subject:i._subjects.state,next:a=>{fE(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&&!un(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:dE(r,i)}),[r,i])}const Fp=({className:e,children:t,content:n,side:r})=>{const[o,i]=_.useState(!1);return l.jsx(sn,{delayDuration:0,children:l.jsxs(ln,{open:o,children:[l.jsx(cn,{asChild:!0,children:l.jsx("button",{type:"button",className:he("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(Gt,{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},NE=({apiBaseUrl:e="https://s3-explorer.cmcts1.studio.ai.vn"})=>{var N,I;const[t,n]=_.useState([]),[r,o]=_.useState(!1),[i,a]=_.useState([]),[s,u]=_.useState(1),[c,d]=_.useState(1),[g,m]=_.useState(null),[p,h]=_.useState(""),v=PE(p,500),y=M=>{const H=M.match(/\d{6}/);if(!H)return{month:"",year:""};const O=H[0],G=O.substring(0,2),W=O.substring(2);return{month:G,year:W}},b=M=>M.map(O=>{let G=(O==null?void 0:O.month)||"",W=(O==null?void 0:O.year)||"";if((!G||!W)&&(O!=null&&O.file_name)){const Z=y(O.file_name);G=G||Z.month,W=W||Z.year}return{id:O==null?void 0:O.id,prefix:(O==null?void 0:O.prefix)||"",model:(O==null?void 0:O.model)||"",fileName:(O==null?void 0:O.file_name)||"",code:(O==null?void 0:O.stock_id)||"",month:G,year:W,content:(O==null?void 0:O.text_summary)||"",status:(O==null?void 0:O.status)||"",note:(O==null?void 0:O.note)||"",lastUpdate:O==null?void 0:O.updated_at,stock_id:O==null?void 0:O.stock_id}}),w=M=>{if(!(M!=null&&M.data))return[];const H=b(M==null?void 0:M.data);n(H),d(M.pagination.totalPages)},S=async(M=1,H=15)=>{m(M),o(!0);try{const O=await me.get(`${e}/api/latest-summaries`,{params:{page:M,limit:H,search:p}});(O==null?void 0:O.status)===200?w(O.data):console.error(O)}catch(O){console.error("Error fetching data:",O)}finally{m(null),o(!1)}};_.useEffect(()=>{v&&u(1),S(s)},[s,v]);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 O=H.original.month,G=H.original.year;return l.jsx("span",{className:"flex flex-col",children:`${O.toString().padStart(2,"0")}/${G}`})}},{id:"content",header:"Nội dung",accessorKey:"content",cell:({row:H})=>{const O=H.getValue("content");return l.jsx("div",{className:"text-start truncate text-ellipsis overflow-hidden whitespace-nowrap max-w-[30dvw]",children:O})}},{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(Fp,{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 O=new Date(H.original.lastUpdate),G=O.getDate(),W=O.getMonth()+1,Z=`ngày ${G} tháng ${W}`;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[O,G]=_.useState(!1),[W,Z]=_.useState(!1),[k,$]=_.useState(!1),{handleSubmit:F,register:U,reset:j}=AE(),R=H.original.id,A=H.getValue("status"),B=H.getValue("content"),[Q,ne]=_.useState(!1),te=async()=>{try{ne(!0);const oe=A==="unpublish"?"published":"unpublish",se=await me.patch(`${e}/api/toggle-publish/${R}`,{id:R,typeAction:"update",status:A,idInput:R,stock_id:H.original.stock_id,prefix:H.original.prefix,model:H.original.model,summary_result:H.original.content,note:H.original.note});se.status===200?n(ue=>ue.map(de=>de.id===R?{...de,status:oe}:de)):console.error("Failed to toggle publish status:",se)}catch(oe){console.error("Error toggling publish status:",oe)}finally{ne(!1)}},ce=async oe=>{G(!0);try{const se=await me.patch(`${e}/api/update-summary`,{note:oe.note,text_summary:oe.content,id:R});se.status===200?(await S(s),Z(!1)):console.error("Failed to update summary:",se)}catch(se){console.error("Error updating summary:",se)}return G(!1)};return l.jsxs("div",{className:"flex items-center justify-end gap-2",children:[l.jsx(ye,{variant:"outline",size:"sm",onClick:()=>$(!0),className:"px-2 py-0.5 h-7",children:l.jsx($h,{className:"h-4 w-4"})}),l.jsx(Ht,{open:k,onOpenChange:$,children:l.jsxs(At,{className:"max-w-3xl max-h-[80vh]",children:[l.jsx(Pt,{children:l.jsx(Nt,{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(Ht,{open:W,onOpenChange:oe=>{Z(oe),oe?j({content:H.original.content,note:H.original.note}):j()},children:[l.jsx(mo,{asChild:!0,children:l.jsx(ye,{variant:"outline",size:"sm",onClick:()=>Z(!0),className:"px-2 py-0.5 h-7",children:"Sửa"})}),l.jsx(At,{className:"rounded-lg sm:px-3 h-[calc(100dvh-200px)] min-w-[calc(100dvw-112px)]",children:l.jsxs(Pt,{className:"flex flex-col gap-3",children:[l.jsx(Nt,{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(mr,{placeholder:"Nội dung",className:"w-full input-scroll-bar",defaultValue:H.original.answer||"",rows:10,...U("content")})]}),l.jsxs("div",{className:"flex flex-col items-start",children:[l.jsx("span",{children:"Ghi chú:"}),l.jsx(mr,{placeholder:"Nội dung",className:"w-full input-scroll-bar",defaultValue:H.original.note||"",rows:1,...U("note")})]})]}),l.jsx("div",{className:"flex justify-end",children:l.jsx(ye,{disabled:O,type:"submit",variant:"default",children:O?l.jsx($e,{className:"h-4 w-4 animate-spin"}):"Ok"})})]})]})})]}),l.jsx(ye,{variant:"outline",size:"sm",onClick:te,disabled:Q,className:"w-[70px] px-2 py-0.5 h-7",children:Q?l.jsx($e,{className:"h-4 w-4 animate-spin"}):A==="unpublish"?"Publish":"Unpublish"})]})}}],[]),x=nl({data:t,columns:E,state:{columnFilters:i},enableRowSelection:!0,onColumnFiltersChange:a,getFilteredRowModel:jg(),getCoreRowModel:tl()});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:p,onChange:M=>h(M.target.value),className:"pr-8"}),p&&l.jsx(ye,{variant:"ghost",size:"sm",className:"absolute right-1 top-1/2 -translate-y-1/2 h-6 w-6 p-0",onClick:()=>h(""),children:l.jsx(qi,{className:"h-4 w-4"})})]})}),l.jsx("div",{className:"rounded-md border s3-explr-table-container",children:l.jsxs(wo,{className:"s3-explr-table",children:[l.jsx(So,{className:"s3-explr-table-header",children:x.getHeaderGroups().map(M=>l.jsx(yt,{className:"hover:bg-transparent s3-explr-header-row",children:M.headers.map(H=>l.jsx(kt,{className:"s3-explr-header-cell",children:H.isPlaceholder?null:Hr(H.column.columnDef.header,H.getContext())},H.id))},M.id))}),l.jsx(Co,{className:"s3-explr-table-body",children:r?l.jsx(yt,{children:l.jsx(Ze,{colSpan:E.length,className:"h-24 text-center",children:"Đang tải dữ liệu..."})}):(N=x.getRowModel().rows)!=null&&N.length?(I=x.getRowModel().rows)==null?void 0:I.map(M=>l.jsx(yt,{className:"h-12 s3-explr-row",children:M.getVisibleCells().map(H=>l.jsx(Ze,{className:"align-middle s3-explr-cell",children:Hr(H.column.columnDef.cell,H.getContext())},H.id))},M.id)):l.jsx(yt,{children:l.jsx(Ze,{colSpan:E.length,className:"h-24 text-center",children:"Không có kết quả."})})})]})}),l.jsx("div",{className:"mt-4",children:l.jsx(ho,{children:l.jsxs(vo,{children:[l.jsx(vt,{children:l.jsx(yo,{onClick:()=>u(M=>Math.max(1,M-1)),className:s===1?"pointer-events-none opacity-50":"cursor-pointer"})}),Array.from({length:c},(M,H)=>H+1).filter(M=>M===1||M===c||Math.abs(M-s)<=1).map((M,H,O)=>l.jsxs(l.Fragment,{children:[H>0&&O[H-1]!==M-1&&l.jsx(vt,{children:l.jsx(bo,{})},M+"..."),l.jsx(vt,{children:l.jsx(Bn,{onClick:()=>u(M),isActive:s===M,className:`cursor-pointer ${r?"pointer-events-none":""}`,children:g===M?l.jsx($e,{className:"h-4 w-4 animate-spin"}):M})},M)]})),l.jsx(vt,{children:l.jsx(xo,{onClick:()=>u(M=>Math.min(c,M+1)),className:s===c||g!==null?"pointer-events-none opacity-50":"cursor-pointer"})})]})})})]})},Dp=10,kE=_.memo(({apiBaseUrl:e="https://s3-explorer.cmcts1.studio.ai.vn"})=>{const[t,n]=_.useState(1),[r,o]=_.useState([]),[i,a]=_.useState({total:0,page:1,limit:Dp,totalPages:1}),[s,u]=_.useState(!0),[c,d]=_.useState(null),[g,m]=_.useState(new Set),{toast:p}=Io(),[h,v]=_.useState(!1),y=async x=>{try{d(x);const N=await me.get(`${e}/api/jobs`,{params:{page:x.toString(),limit:Dp.toString()}});o(N.data.data),a(N.data.pagination)}catch{p({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(N=>new Set(N).add(x.toString()));try{await me.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{m(N=>{const I=new Set(N);return I.delete(x.toString()),I})}},w=async()=>{v(!0),n(1),await y(1),v(!1)},S=x=>new Date(x).toLocaleString(),E=x=>{if(x=parseFloat(x),x<60)return`${x.toFixed(2)}s`;const N=Math.floor(x/60),I=(x%60).toFixed(0);return`${N}m ${I}s`};return l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[l.jsx(Fh,{className:"w-8 h-8 text-primary"}),l.jsx("h2",{className:"text-3xl font-bold tracking-tight",children:"Job Management"}),l.jsx(ye,{variant:"outline",size:"icon",onClick:w,disabled:h||s,className:"ml-2",children:l.jsx(Vh,{className:`h-4 w-4 ${h?"animate-spin":""}`})})]}),l.jsx("div",{className:"rounded-md border",children:l.jsxs(wo,{children:[l.jsx(So,{children:l.jsxs(yt,{children:[l.jsx(kt,{children:"ID"}),l.jsx(kt,{children:"Tên Công Việc"}),l.jsx(kt,{children:"Thời Gian Bắt Đầu"}),l.jsx(kt,{children:"Thời Gian Cập Nhật"}),l.jsx(kt,{children:"Thời Gian Thực Thi"}),l.jsx(kt,{children:"Trạng Thái"}),l.jsx(kt,{children:"Thao Tác"})]})}),l.jsx(Co,{children:s&&r.length===0?l.jsx(yt,{children:l.jsx(Ze,{colSpan:7,className:"text-center py-4",children:l.jsx($e,{className:"w-6 h-6 animate-spin mx-auto"})})}):r.map(x=>{var N,I;return l.jsxs(yt,{children:[l.jsx(Ze,{className:"!w-[100px]",children:x.id}),l.jsx(Ze,{className:"font-medium",children:(N=x.job_name)==null?void 0:N.replace("Upload file","Summary")}),l.jsx(Ze,{className:"!w-[200px]",children:S(x.created_at)}),l.jsx(Ze,{className:"!w-[200px]",children:S(x.updated_at)}),l.jsx(Ze,{className:"!w-[150px]",children:E(x.execution_time_seconds)}),l.jsx(Ze,{className:"!w-[200px]",children:l.jsx(Fp,{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
|
-
${
|
|
196
|
+
*/var qu,Lv;function qP(){if(Lv)return qu;Lv=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function i(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var l={},u=0;u<10;u++)l["_"+String.fromCharCode(u)]=u;var g=Object.getOwnPropertyNames(l).map(function(h){return l[h]});if(g.join("")!=="0123456789")return!1;var f={};return"abcdefghijklmnopqrst".split("").forEach(function(h){f[h]=h}),Object.keys(Object.assign({},f)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return qu=i()?Object.assign:function(s,l){for(var u,g=r(s),f,h=1;h<arguments.length;h++){u=Object(arguments[h]);for(var y in u)t.call(u,y)&&(g[y]=u[y]);if(e){f=e(u);for(var x=0;x<f.length;x++)n.call(u,f[x])&&(g[f[x]]=u[f[x]])}}return g},qu}var Ku,Mv;function Yu(){if(Mv)return Ku;Mv=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ku=e,Ku}var Xu,$v;function Rv(){return $v||($v=1,Xu=Function.call.bind(Object.prototype.hasOwnProperty)),Xu}var Ju,Vv;function KP(){if(Vv)return Ju;Vv=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Yu(),n={},r=Rv();e=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}}}function i(s,l,u,g,f){if(process.env.NODE_ENV!=="production"){for(var h in s)if(r(s,h)){var y;try{if(typeof s[h]!="function"){var x=Error((g||"React class")+": "+u+" type `"+h+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[h]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw x.name="Invariant Violation",x}y=s[h](l,h,g,u,null,t)}catch(w){y=w}if(y&&!(y instanceof Error)&&e((g||"React class")+": type specification of "+u+" `"+h+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof y+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),y instanceof Error&&!(y.message in n)){n[y.message]=!0;var m=f?f():"";e("Failed "+u+" type: "+y.message+(m??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Ju=i,Ju}var Zu,zv;function YP(){if(zv)return Zu;zv=1;var e=Iv(),t=qP(),n=Yu(),r=Rv(),i=KP(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(u){var g="Warning: "+u;typeof console<"u"&&console.error(g);try{throw new Error(g)}catch{}});function l(){return null}return Zu=function(u,g){var f=typeof Symbol=="function"&&Symbol.iterator,h="@@iterator";function y(M){var Q=M&&(f&&M[f]||M[h]);if(typeof Q=="function")return Q}var x="<<anonymous>>",m={array:A("array"),bigint:A("bigint"),bool:A("boolean"),func:A("function"),number:A("number"),object:A("object"),string:A("string"),symbol:A("symbol"),any:P(),arrayOf:N,element:D(),elementType:E(),instanceOf:V,node:H(),objectOf:B,oneOf:W,oneOfType:ee,shape:ie,exact:he};function w(M,Q){return M===Q?M!==0||1/M===1/Q:M!==M&&Q!==Q}function _(M,Q){this.message=M,this.data=Q&&typeof Q=="object"?Q:{},this.stack=""}_.prototype=Error.prototype;function S(M){if(process.env.NODE_ENV!=="production")var Q={},ve=0;function xe(Se,we,Ee,Pe,Ne,Te,He){if(Pe=Pe||x,Te=Te||Ee,He!==n){if(g){var fe=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 fe.name="Invariant Violation",fe}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Xe=Pe+":"+Ee;!Q[Xe]&&ve<3&&(s("You are manually calling a React.PropTypes validation function for the `"+Te+"` prop on `"+Pe+"`. 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."),Q[Xe]=!0,ve++)}}return we[Ee]==null?Se?we[Ee]===null?new _("The "+Ne+" `"+Te+"` is marked as required "+("in `"+Pe+"`, but its value is `null`.")):new _("The "+Ne+" `"+Te+"` is marked as required in "+("`"+Pe+"`, but its value is `undefined`.")):null:M(we,Ee,Pe,Ne,Te)}var ye=xe.bind(null,!1);return ye.isRequired=xe.bind(null,!0),ye}function A(M){function Q(ve,xe,ye,Se,we,Ee){var Pe=ve[xe],Ne=G(Pe);if(Ne!==M){var Te=te(Pe);return new _("Invalid "+Se+" `"+we+"` of type "+("`"+Te+"` supplied to `"+ye+"`, expected ")+("`"+M+"`."),{expectedType:M})}return null}return S(Q)}function P(){return S(l)}function N(M){function Q(ve,xe,ye,Se,we){if(typeof M!="function")return new _("Property `"+we+"` of component `"+ye+"` has invalid PropType notation inside arrayOf.");var Ee=ve[xe];if(!Array.isArray(Ee)){var Pe=G(Ee);return new _("Invalid "+Se+" `"+we+"` of type "+("`"+Pe+"` supplied to `"+ye+"`, expected an array."))}for(var Ne=0;Ne<Ee.length;Ne++){var Te=M(Ee,Ne,ye,Se,we+"["+Ne+"]",n);if(Te instanceof Error)return Te}return null}return S(Q)}function D(){function M(Q,ve,xe,ye,Se){var we=Q[ve];if(!u(we)){var Ee=G(we);return new _("Invalid "+ye+" `"+Se+"` of type "+("`"+Ee+"` supplied to `"+xe+"`, expected a single ReactElement."))}return null}return S(M)}function E(){function M(Q,ve,xe,ye,Se){var we=Q[ve];if(!e.isValidElementType(we)){var Ee=G(we);return new _("Invalid "+ye+" `"+Se+"` of type "+("`"+Ee+"` supplied to `"+xe+"`, expected a single ReactElement type."))}return null}return S(M)}function V(M){function Q(ve,xe,ye,Se,we){if(!(ve[xe]instanceof M)){var Ee=M.name||x,Pe=J(ve[xe]);return new _("Invalid "+Se+" `"+we+"` of type "+("`"+Pe+"` supplied to `"+ye+"`, expected ")+("instance of `"+Ee+"`."))}return null}return S(Q)}function W(M){if(!Array.isArray(M))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("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])."):s("Invalid argument supplied to oneOf, expected an array.")),l;function Q(ve,xe,ye,Se,we){for(var Ee=ve[xe],Pe=0;Pe<M.length;Pe++)if(w(Ee,M[Pe]))return null;var Ne=JSON.stringify(M,function(He,fe){var Xe=te(fe);return Xe==="symbol"?String(fe):fe});return new _("Invalid "+Se+" `"+we+"` of value `"+String(Ee)+"` "+("supplied to `"+ye+"`, expected one of "+Ne+"."))}return S(Q)}function B(M){function Q(ve,xe,ye,Se,we){if(typeof M!="function")return new _("Property `"+we+"` of component `"+ye+"` has invalid PropType notation inside objectOf.");var Ee=ve[xe],Pe=G(Ee);if(Pe!=="object")return new _("Invalid "+Se+" `"+we+"` of type "+("`"+Pe+"` supplied to `"+ye+"`, expected an object."));for(var Ne in Ee)if(r(Ee,Ne)){var Te=M(Ee,Ne,ye,Se,we+"."+Ne,n);if(Te instanceof Error)return Te}return null}return S(Q)}function ee(M){if(!Array.isArray(M))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),l;for(var Q=0;Q<M.length;Q++){var ve=M[Q];if(typeof ve!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Y(ve)+" at index "+Q+"."),l}function xe(ye,Se,we,Ee,Pe){for(var Ne=[],Te=0;Te<M.length;Te++){var He=M[Te],fe=He(ye,Se,we,Ee,Pe,n);if(fe==null)return null;fe.data&&r(fe.data,"expectedType")&&Ne.push(fe.data.expectedType)}var Xe=Ne.length>0?", expected one of type ["+Ne.join(", ")+"]":"";return new _("Invalid "+Ee+" `"+Pe+"` supplied to "+("`"+we+"`"+Xe+"."))}return S(xe)}function H(){function M(Q,ve,xe,ye,Se){return U(Q[ve])?null:new _("Invalid "+ye+" `"+Se+"` supplied to "+("`"+xe+"`, expected a ReactNode."))}return S(M)}function ce(M,Q,ve,xe,ye){return new _((M||"React class")+": "+Q+" type `"+ve+"."+xe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ye+"`.")}function ie(M){function Q(ve,xe,ye,Se,we){var Ee=ve[xe],Pe=G(Ee);if(Pe!=="object")return new _("Invalid "+Se+" `"+we+"` of type `"+Pe+"` "+("supplied to `"+ye+"`, expected `object`."));for(var Ne in M){var Te=M[Ne];if(typeof Te!="function")return ce(ye,Se,we,Ne,te(Te));var He=Te(Ee,Ne,ye,Se,we+"."+Ne,n);if(He)return He}return null}return S(Q)}function he(M){function Q(ve,xe,ye,Se,we){var Ee=ve[xe],Pe=G(Ee);if(Pe!=="object")return new _("Invalid "+Se+" `"+we+"` of type `"+Pe+"` "+("supplied to `"+ye+"`, expected `object`."));var Ne=t({},ve[xe],M);for(var Te in Ne){var He=M[Te];if(r(M,Te)&&typeof He!="function")return ce(ye,Se,we,Te,te(He));if(!He)return new _("Invalid "+Se+" `"+we+"` key `"+Te+"` supplied to `"+ye+"`.\nBad object: "+JSON.stringify(ve[xe],null," ")+`
|
|
197
|
+
Valid keys: `+JSON.stringify(Object.keys(M),null," "));var fe=He(Ee,Te,ye,Se,we+"."+Te,n);if(fe)return fe}return null}return S(Q)}function U(M){switch(typeof M){case"number":case"string":case"undefined":return!0;case"boolean":return!M;case"object":if(Array.isArray(M))return M.every(U);if(M===null||u(M))return!0;var Q=y(M);if(Q){var ve=Q.call(M),xe;if(Q!==M.entries){for(;!(xe=ve.next()).done;)if(!U(xe.value))return!1}else for(;!(xe=ve.next()).done;){var ye=xe.value;if(ye&&!U(ye[1]))return!1}}else return!1;return!0;default:return!1}}function K(M,Q){return M==="symbol"?!0:Q?Q["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&Q instanceof Symbol:!1}function G(M){var Q=typeof M;return Array.isArray(M)?"array":M instanceof RegExp?"object":K(Q,M)?"symbol":Q}function te(M){if(typeof M>"u"||M===null)return""+M;var Q=G(M);if(Q==="object"){if(M instanceof Date)return"date";if(M instanceof RegExp)return"regexp"}return Q}function Y(M){var Q=te(M);switch(Q){case"array":case"object":return"an "+Q;case"boolean":case"date":case"regexp":return"a "+Q;default:return Q}}function J(M){return!M.constructor||!M.constructor.name?x:M.constructor.name}return m.checkPropTypes=i,m.resetWarningCache=i.resetWarningCache,m.PropTypes=m,m},Zu}var Qu,Bv;function XP(){if(Bv)return Qu;Bv=1;var e=Yu();function t(){}function n(){}return n.resetWarningCache=t,Qu=function(){function r(l,u,g,f,h,y){if(y!==e){var x=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 x.name="Invariant Violation",x}}r.isRequired=r;function i(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},Qu}if(process.env.NODE_ENV!=="production"){var JP=Iv(),ZP=!0;Gu.exports=YP()(JP.isElement,ZP)}else Gu.exports=XP()();var QP=Gu.exports;const ut=Va(QP),eO=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 di(e,t,n){const r=tO(e),{webkitRelativePath:i}=e,s=typeof t=="string"?t:typeof i=="string"&&i.length>0?i:`./${e.name}`;return typeof r.path!="string"&&Uv(r,"path",s),Uv(r,"relativePath",s),r}function tO(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),i=eO.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}function Uv(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const nO=[".DS_Store","Thumbs.db"];function rO(e){return wo(this,void 0,void 0,function*(){return ks(e)&&oO(e.dataTransfer)?lO(e.dataTransfer,e.type):iO(e)?aO(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?sO(e):[]})}function oO(e){return ks(e)}function iO(e){return ks(e)&&ks(e.target)}function ks(e){return typeof e=="object"&&e!==null}function aO(e){return ed(e.target.files).map(t=>di(t))}function sO(e){return wo(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>di(n))})}function lO(e,t){return wo(this,void 0,void 0,function*(){if(e.items){const n=ed(e.items).filter(i=>i.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(cO));return jv(Wv(r))}return jv(ed(e.files).map(n=>di(n)))})}function jv(e){return e.filter(t=>nO.indexOf(t.name)===-1)}function ed(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 cO(e){if(typeof e.webkitGetAsEntry!="function")return Hv(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?Gv(t):Hv(e,t)}function Wv(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?Wv(n):[n]],[])}function Hv(e,t){return wo(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const s=yield e.getAsFileSystemHandle();if(s===null)throw new Error(`${e} is not a File`);if(s!==void 0){const l=yield s.getFile();return l.handle=s,di(l)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return di(r,(n=t==null?void 0:t.fullPath)!==null&&n!==void 0?n:void 0)})}function uO(e){return wo(this,void 0,void 0,function*(){return e.isDirectory?Gv(e):dO(e)})}function Gv(e){const t=e.createReader();return new Promise((n,r)=>{const i=[];function s(){t.readEntries(l=>wo(this,void 0,void 0,function*(){if(l.length){const u=Promise.all(l.map(uO));i.push(u),s()}else try{const u=yield Promise.all(i);n(u)}catch(u){r(u)}}),l=>{r(l)})}s()})}function dO(e){return wo(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const i=di(r,e.fullPath);t(i)},r=>{n(r)})})})}var td=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var r=e.name||"",i=(e.type||"").toLowerCase(),s=i.replace(/\/.*$/,"");return n.some(function(l){var u=l.trim().toLowerCase();return u.charAt(0)==="."?r.toLowerCase().endsWith(u):u.endsWith("/*")?s===u.replace(/\/.*$/,""):i===u})}return!0};function qv(e){return gO(e)||pO(e)||Jv(e)||fO()}function fO(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
198
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pO(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function gO(e){if(Array.isArray(e))return nd(e)}function Kv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Yv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Kv(Object(n),!0).forEach(function(r){Xv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kv(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xv(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ji(e,t){return vO(e)||mO(e,t)||Jv(e,t)||hO()}function hO(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
199
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jv(e,t){if(e){if(typeof e=="string")return nd(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 nd(e,t)}}function nd(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 mO(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,s=!1,l,u;try{for(n=n.call(e);!(i=(l=n.next()).done)&&(r.push(l.value),!(t&&r.length===t));i=!0);}catch(g){s=!0,u=g}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw u}}return r}}function vO(e){if(Array.isArray(e))return e}var yO=typeof td=="function"?td:td.default,xO="file-invalid-type",wO="file-too-large",bO="file-too-small",_O="too-many-files",SO=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:xO,message:"File type must be ".concat(r)}},Zv=function(t){return{code:wO,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},Qv=function(t){return{code:bO,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},CO={code:_O,message:"Too many files"};function ey(e,t){var n=e.type==="application/x-moz-file"||yO(e,t);return[n,n?null:SO(t)]}function ty(e,t,n){if(Eo(e.size))if(Eo(t)&&Eo(n)){if(e.size>n)return[!1,Zv(n)];if(e.size<t)return[!1,Qv(t)]}else{if(Eo(t)&&e.size<t)return[!1,Qv(t)];if(Eo(n)&&e.size>n)return[!1,Zv(n)]}return[!0,null]}function Eo(e){return e!=null}function EO(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,s=e.multiple,l=e.maxFiles,u=e.validator;return!s&&t.length>1||s&&l>=1&&t.length>l?!1:t.every(function(g){var f=ey(g,n),h=Ji(f,1),y=h[0],x=ty(g,r,i),m=Ji(x,1),w=m[0],_=u?u(g):null;return y&&w&&!_})}function Is(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Ls(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 ny(e){e.preventDefault()}function TO(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function AO(e){return e.indexOf("Edge/")!==-1}function PO(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return TO(e)||AO(e)}function dr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var i=arguments.length,s=new Array(i>1?i-1:0),l=1;l<i;l++)s[l-1]=arguments[l];return t.some(function(u){return!Is(r)&&u&&u.apply(void 0,[r].concat(s)),Is(r)})}}function OO(){return"showOpenFilePicker"in window}function NO(e){if(Eo(e)){var t=Object.entries(e).filter(function(n){var r=Ji(n,2),i=r[0],s=r[1],l=!0;return ry(i)||(console.warn('Skipped "'.concat(i,'" 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.')),l=!1),(!Array.isArray(s)||!s.every(oy))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),l=!1),l}).reduce(function(n,r){var i=Ji(r,2),s=i[0],l=i[1];return Yv(Yv({},n),{},Xv({},s,l))},{});return[{description:"Files",accept:t}]}return e}function FO(e){if(Eo(e))return Object.entries(e).reduce(function(t,n){var r=Ji(n,2),i=r[0],s=r[1];return[].concat(qv(t),[i],qv(s))},[]).filter(function(t){return ry(t)||oy(t)}).join(",")}function DO(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function kO(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function ry(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function oy(e){return/^.*\.[\w]+$/.test(e)}var IO=["children"],LO=["open"],MO=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],$O=["refKey","onChange","onClick"];function RO(e){return BO(e)||zO(e)||iy(e)||VO()}function VO(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
200
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zO(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function BO(e){if(Array.isArray(e))return od(e)}function rd(e,t){return WO(e)||jO(e,t)||iy(e,t)||UO()}function UO(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
201
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iy(e,t){if(e){if(typeof e=="string")return od(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 od(e,t)}}function od(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 jO(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,s=!1,l,u;try{for(n=n.call(e);!(i=(l=n.next()).done)&&(r.push(l.value),!(t&&r.length===t));i=!0);}catch(g){s=!0,u=g}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw u}}return r}}function WO(e){if(Array.isArray(e))return e}function ay(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function yt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ay(Object(n),!0).forEach(function(r){id(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ay(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function id(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ms(e,t){if(e==null)return{};var n=HO(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function HO(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var ad=L.forwardRef(function(e,t){var n=e.children,r=Ms(e,IO),i=ly(r),s=i.open,l=Ms(i,LO);return L.useImperativeHandle(t,function(){return{open:s}},[s]),L.createElement(L.Fragment,null,n(yt(yt({},l),{},{open:s})))});ad.displayName="Dropzone";var sy={disabled:!1,getFilesFromEvent:rO,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};ad.defaultProps=sy,ad.propTypes={children:ut.func,accept:ut.objectOf(ut.arrayOf(ut.string)),multiple:ut.bool,preventDropOnDocument:ut.bool,noClick:ut.bool,noKeyboard:ut.bool,noDrag:ut.bool,noDragEventsBubbling:ut.bool,minSize:ut.number,maxSize:ut.number,maxFiles:ut.number,disabled:ut.bool,getFilesFromEvent:ut.func,onFileDialogCancel:ut.func,onFileDialogOpen:ut.func,useFsAccessApi:ut.bool,autoFocus:ut.bool,onDragEnter:ut.func,onDragLeave:ut.func,onDragOver:ut.func,onDrop:ut.func,onDropAccepted:ut.func,onDropRejected:ut.func,onError:ut.func,validator:ut.func};var sd={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function ly(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=yt(yt({},sy),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,s=t.maxSize,l=t.minSize,u=t.multiple,g=t.maxFiles,f=t.onDragEnter,h=t.onDragLeave,y=t.onDragOver,x=t.onDrop,m=t.onDropAccepted,w=t.onDropRejected,_=t.onFileDialogCancel,S=t.onFileDialogOpen,A=t.useFsAccessApi,P=t.autoFocus,N=t.preventDropOnDocument,D=t.noClick,E=t.noKeyboard,V=t.noDrag,W=t.noDragEventsBubbling,B=t.onError,ee=t.validator,H=L.useMemo(function(){return FO(n)},[n]),ce=L.useMemo(function(){return NO(n)},[n]),ie=L.useMemo(function(){return typeof S=="function"?S:cy},[S]),he=L.useMemo(function(){return typeof _=="function"?_:cy},[_]),U=L.useRef(null),K=L.useRef(null),G=L.useReducer(GO,sd),te=rd(G,2),Y=te[0],J=te[1],M=Y.isFocused,Q=Y.isFileDialogActive,ve=L.useRef(typeof window<"u"&&window.isSecureContext&&A&&OO()),xe=function(){!ve.current&&Q&&setTimeout(function(){if(K.current){var de=K.current.files;de.length||(J({type:"closeDialog"}),he())}},300)};L.useEffect(function(){return window.addEventListener("focus",xe,!1),function(){window.removeEventListener("focus",xe,!1)}},[K,Q,he,ve]);var ye=L.useRef([]),Se=function(de){U.current&&U.current.contains(de.target)||(de.preventDefault(),ye.current=[])};L.useEffect(function(){return N&&(document.addEventListener("dragover",ny,!1),document.addEventListener("drop",Se,!1)),function(){N&&(document.removeEventListener("dragover",ny),document.removeEventListener("drop",Se))}},[U,N]),L.useEffect(function(){return!r&&P&&U.current&&U.current.focus(),function(){}},[U,P,r]);var we=L.useCallback(function(ne){B?B(ne):console.error(ne)},[B]),Ee=L.useCallback(function(ne){ne.preventDefault(),ne.persist(),X(ne),ye.current=[].concat(RO(ye.current),[ne.target]),Ls(ne)&&Promise.resolve(i(ne)).then(function(de){if(!(Is(ne)&&!W)){var Re=de.length,ze=Re>0&&EO({files:de,accept:H,minSize:l,maxSize:s,multiple:u,maxFiles:g,validator:ee}),nt=Re>0&&!ze;J({isDragAccept:ze,isDragReject:nt,isDragActive:!0,type:"setDraggedFiles"}),f&&f(ne)}}).catch(function(de){return we(de)})},[i,f,we,W,H,l,s,u,g,ee]),Pe=L.useCallback(function(ne){ne.preventDefault(),ne.persist(),X(ne);var de=Ls(ne);if(de&&ne.dataTransfer)try{ne.dataTransfer.dropEffect="copy"}catch{}return de&&y&&y(ne),!1},[y,W]),Ne=L.useCallback(function(ne){ne.preventDefault(),ne.persist(),X(ne);var de=ye.current.filter(function(ze){return U.current&&U.current.contains(ze)}),Re=de.indexOf(ne.target);Re!==-1&&de.splice(Re,1),ye.current=de,!(de.length>0)&&(J({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Ls(ne)&&h&&h(ne))},[U,h,W]),Te=L.useCallback(function(ne,de){var Re=[],ze=[];ne.forEach(function(nt){var Rt=ey(nt,H),Xt=rd(Rt,2),Ct=Xt[0],En=Xt[1],Tn=ty(nt,l,s),bt=rd(Tn,2),on=bt[0],hr=bt[1],qn=ee?ee(nt):null;if(Ct&&on&&!qn)Re.push(nt);else{var tt=[En,hr];qn&&(tt=tt.concat(qn)),ze.push({file:nt,errors:tt.filter(function(Qr){return Qr})})}}),(!u&&Re.length>1||u&&g>=1&&Re.length>g)&&(Re.forEach(function(nt){ze.push({file:nt,errors:[CO]})}),Re.splice(0)),J({acceptedFiles:Re,fileRejections:ze,isDragReject:ze.length>0,type:"setFiles"}),x&&x(Re,ze,de),ze.length>0&&w&&w(ze,de),Re.length>0&&m&&m(Re,de)},[J,u,H,l,s,g,x,m,w,ee]),He=L.useCallback(function(ne){ne.preventDefault(),ne.persist(),X(ne),ye.current=[],Ls(ne)&&Promise.resolve(i(ne)).then(function(de){Is(ne)&&!W||Te(de,ne)}).catch(function(de){return we(de)}),J({type:"reset"})},[i,Te,we,W]),fe=L.useCallback(function(){if(ve.current){J({type:"openDialog"}),ie();var ne={multiple:u,types:ce};window.showOpenFilePicker(ne).then(function(de){return i(de)}).then(function(de){Te(de,null),J({type:"closeDialog"})}).catch(function(de){DO(de)?(he(de),J({type:"closeDialog"})):kO(de)?(ve.current=!1,K.current?(K.current.value=null,K.current.click()):we(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."))):we(de)});return}K.current&&(J({type:"openDialog"}),ie(),K.current.value=null,K.current.click())},[J,ie,he,A,Te,we,ce,u]),Xe=L.useCallback(function(ne){!U.current||!U.current.isEqualNode(ne.target)||(ne.key===" "||ne.key==="Enter"||ne.keyCode===32||ne.keyCode===13)&&(ne.preventDefault(),fe())},[U,fe]),at=L.useCallback(function(){J({type:"focus"})},[]),$t=L.useCallback(function(){J({type:"blur"})},[]),Yt=L.useCallback(function(){D||(PO()?setTimeout(fe,0):fe())},[D,fe]),mt=function(de){return r?null:de},F=function(de){return E?null:mt(de)},z=function(de){return V?null:mt(de)},X=function(de){W&&de.stopPropagation()},ge=L.useMemo(function(){return function(){var ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},de=ne.refKey,Re=de===void 0?"ref":de,ze=ne.role,nt=ne.onKeyDown,Rt=ne.onFocus,Xt=ne.onBlur,Ct=ne.onClick,En=ne.onDragEnter,Tn=ne.onDragOver,bt=ne.onDragLeave,on=ne.onDrop,hr=Ms(ne,MO);return yt(yt(id({onKeyDown:F(dr(nt,Xe)),onFocus:F(dr(Rt,at)),onBlur:F(dr(Xt,$t)),onClick:mt(dr(Ct,Yt)),onDragEnter:z(dr(En,Ee)),onDragOver:z(dr(Tn,Pe)),onDragLeave:z(dr(bt,Ne)),onDrop:z(dr(on,He)),role:typeof ze=="string"&&ze!==""?ze:"presentation"},Re,U),!r&&!E?{tabIndex:0}:{}),hr)}},[U,Xe,at,$t,Yt,Ee,Pe,Ne,He,E,V,r]),pe=L.useCallback(function(ne){ne.stopPropagation()},[]),ue=L.useMemo(function(){return function(){var ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},de=ne.refKey,Re=de===void 0?"ref":de,ze=ne.onChange,nt=ne.onClick,Rt=Ms(ne,$O),Xt=id({accept:H,multiple:u,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:mt(dr(ze,He)),onClick:mt(dr(nt,pe)),tabIndex:-1},Re,K);return yt(yt({},Xt),Rt)}},[K,n,u,He,r]);return yt(yt({},Y),{},{isFocused:M&&!r,getRootProps:ge,getInputProps:ue,rootRef:U,inputRef:K,open:mt(fe)})}function GO(e,t){switch(t.type){case"focus":return yt(yt({},e),{},{isFocused:!0});case"blur":return yt(yt({},e),{},{isFocused:!1});case"openDialog":return yt(yt({},sd),{},{isFileDialogActive:!0});case"closeDialog":return yt(yt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return yt(yt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return yt(yt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return yt({},sd);default:return e}}function cy(){}const qO=({onFilesSelected:e,children:t})=>{const[n,r]=L.useState(!1),{getRootProps:i,getInputProps:s}=ly({noClick:!0,onDrop:l=>{if(l&&l.length>0)if(l[0].path.split("/").length>2){const g=l.map(f=>{const y=(f.path||f.relativePath||"").split("/").slice(1).join("/");return(!f.webkitRelativePath||f.webkitRelativePath==="")&&Object.defineProperty(f,"webkitRelativePath",{writable:!0,value:y,enumerable:!0,configurable:!0}),f});e(g,"folder")}else e(l,"files");r(!1)},onDragOver:l=>{l.preventDefault(),n||r(!0)},multiple:!0});return L.useEffect(()=>{const l=u=>{u.clientX===0&&u.clientY===0&&r(!1)};return document.addEventListener("dragleave",l),()=>{document.removeEventListener("dragleave",l)}},[]),d.jsxs("div",{...i(),className:"transition-opacity min-h-[600px]",children:[n?d.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,d.jsx("input",{...s()})]})},KO=({openDialogRename:e,setOpenDialogRename:t,apiBaseUrl:n,setFileToMove:r,fileToMove:i,refreshFiles:s,ignoreCache:l})=>{var P;const[u,g]=L.useState({}),[f,h]=L.useState(!1),[y,x]=L.useState(!1),[m,w]=L.useState(""),{toast:_}=ys();L.useEffect(()=>{e&&S(m)},[m,e]);const S=async N=>{try{x(!0);const D=await $e.get(`${n}/api/list-s3-folders?prefix=${N}`);g(D==null?void 0:D.data)}catch{_({title:"Error",description:"Unable to load S3 folder list",variant:"destructive"})}finally{x(!1)}},A=async()=>{h(!0);try{const N=i.key,D=N.endsWith("/")?N:`${N}/`,E=m.endsWith("/")?m:`${m}/`;if(D===E||N===m){_({title:"Lỗi",description:"Không thể di chuyển file đến cùng vị trí",variant:"destructive"}),h(!1);return}await $e.post(`${n}/api/move`,{oldPath:N,newPath:m}),l.current=!0,await s(),_({title:"Đã di chuyển",description:`Đã di chuyển thành công "${i.name}" đến "${m}"`}),t(!1),r(null),w("")}catch(N){console.error("Error renaming item:",N),_({title:"Lỗi",description:"Không thể đổi tên",variant:"destructive"})}finally{h(!1)}};return d.jsx(_r,{open:e,onOpenChange:N=>{N||(t(!1),r(null),w(""))},children:d.jsxs(or,{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:[d.jsxs(ir,{className:"mb-4 w-full h-full",children:[d.jsx("nav",{className:"mb-4",children:d.jsxs("ul",{className:"flex items-center space-x-2 text-sm text-gray-600",children:[d.jsx("li",{className:"cursor-pointer hover:text-blue-600 transition-colors",onClick:()=>w(""),children:"Root"}),m.split("/").map((N,D,E)=>d.jsx("li",{className:"cursor-pointer hover:text-blue-600 transition-colors",onClick:()=>w(N==="Root"?"":E.slice(0,D+1).join("/")+"/"),children:N},D))]})}),d.jsxs(ar,{className:"text-xl font-semibold text-gray-800",children:["Di chuyển"," ",d.jsxs("span",{className:"text-sm text-gray-500",children:["( file Hoặc folder sẽ được di chuyển đến thư mục"," ",m===""?"Root":m," )"]})]}),d.jsx(ri,{className:"text-gray-600 w-full h-[50dvh] max-h-[500px] overflow-hidden overflow-y-auto",children:y?d.jsx("div",{className:"flex justify-center items-center py-4",children:d.jsx("div",{className:"loader ease-linear rounded-full border-4 border-t-4 border-gray-200 h-12 w-12"})}):d.jsx("ul",{className:"space-y-2",children:(P=Object.keys(u))==null?void 0:P.map(N=>d.jsx("li",{className:"cursor-pointer hover:bg-gray-100 p-2 rounded transition-colors",onClick:()=>w(N),children:N},N))})})]}),d.jsxs(_o,{className:"flex justify-end space-x-2",children:[d.jsx(Ue,{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"}),d.jsx(Ue,{onClick:A,disabled:f,className:"s3-explr-crawl-btn",children:"Move"})]})]})})},YO="AIzaSyBI8KiTWudkw8iR5cjH7ZsA4JBN1NqJw8A",XO="726815747852-5deq413t8kd8j3mgj48d46eatjauapq5.apps.googleusercontent.com",JO="https://www.googleapis.com/auth/drive";wr($e,{retries:3,shouldResetTimeout:!0,retryCondition:e=>wr.isRetryableError(e)&&e.config.method==="get"});const nn={current:!1},uy="crawl:jobs",fi="crawl:current_job",ZO=e=>{const[t,n]=L.useState(null),[r,i]=L.useState(0);return L.useEffect(()=>{const s=localStorage.getItem(fi);if(s){const l=JSON.parse(s);n(l),l!=null&&l.startTime&&i(Math.floor((Date.now()-l.startTime)/1e3))}},[]),L.useEffect(()=>{if(!(t!=null&&t.startTime))return;const s=setInterval(()=>{i(Math.floor((Date.now()-t.startTime)/1e3))},1e3);return()=>clearInterval(s)},[t==null?void 0:t.startTime]),L.useEffect(()=>{if(!(t!=null&&t.id))return;const s=async()=>{try{const g=(await $e.get(`${e}/api/crawl/${t.id}?taskId=${t.taskId}`)).data;n(f=>{if(!f)return null;const h={...f,status:g};return localStorage.setItem(fi,JSON.stringify(h)),(g.status==="completed"||g.status==="failed")&&setTimeout(()=>{n(null),localStorage.removeItem(fi)},100),h})}catch(u){console.error("Error polling job status:",u)}},l=setInterval(s,3e3);return s(),()=>clearInterval(l)},[t==null?void 0:t.id,e]),{currentJob:t,elapsedTime:r,setCurrentJob:s=>{s&&!s.startTime&&(s.startTime=Date.now()),n(s),s?localStorage.setItem(fi,JSON.stringify(s)):localStorage.removeItem(fi)}}},$s=(e,t)=>{const n=[],r=i=>{(e[i]||[]).forEach(l=>{n.push(l.key),l.isFolder&&r(l.key)})};return r(t),n},QO=(e,t)=>{const n=[];return(e[t]||[]).forEach(i=>{n.push(i.key),i.isFolder&&n.push(...$s(e,i.key))}),n},eN=(e,t,n=[],r,i,s,l,u,g,f)=>{const[h,y]=L.useState({}),[x,m]=L.useState(!1),[w,_]=L.useState(null),[S,A]=L.useState(0),P=L.useRef(t);L.useEffect(()=>{P.current=t},[t]);const N=async()=>{m(!0);try{const E=await $e.get(`${e}/api/files`,{params:{cache:!1,displayPrefixes:JSON.stringify(n),prefix:P.current,excludePrivateFiles:l?"false":"true"},timeout:3e5}),V=[];Hp.forEach(E.data,(W,B)=>{u!=null&&u.has(B)&&Hp.forEach(W,ee=>{(g==null?void 0:g.current[ee.key])!==!1&&V.push(ee.key)})}),V.length&&(f==null||f(W=>{const B=new Set(W);return V.forEach(ee=>B.add(ee)),B})),y(E.data),_(null)}catch(E){_(E instanceof Error?E:new Error("Failed to fetch files"))}finally{m(!1),A(0),s("")}},D=async E=>{var V,W;try{if(!E)return;m(!0);const B=await $e.get(`${e}/api/search-db?query=${E}&rootPrefix=${t}&offset=${(i-1)*20}&limit=20`,{timeout:3e5});return y({[t]:((V=B==null?void 0:B.data)==null?void 0:V.result)||[]}),A(((W=B==null?void 0:B.data)==null?void 0:W.estimatedTotalHits)||0),B}catch(B){_(B instanceof Error?B:new Error("Failed to fetch files"))}finally{m(!1)}};return L.useEffect(()=>{!r&&!x&&N(),r&&!x&&D(r)},[r,i]),{data:h,isLoading:x,error:w,estimatedTotalHits:S,refetch:N}},Zi=e=>{var r,i,s;const t=((s=(i=(r=e==null?void 0:e.name)==null?void 0:r.split("."))==null?void 0:i.pop())==null?void 0:s.toLowerCase())??"";return["txt","md","json","js","ts","jsx","tsx","css","html","xml","yaml","yml"].includes(t||"")},tN=L.memo(({homeLabel:e="Kho tài liệu",apiBaseUrl:t="https://s3-explorer.cmcts1.studio.ai.vn",rootPrefix:n="",asSelector:r=!1,onSelected:i=g=>console.log("Đã chọn:",g),displayPrefixes:s,preSelectedFiles:l,idCreator:u})=>{var aa;const[g,f]=L.useState([]),[h,y]=L.useState(""),[x,m]=L.useState(new Set(l)),[w,_]=L.useState(n),[S,A]=L.useState(""),[P,N]=L.useState(!1),[D,E]=L.useState(""),[V,W]=L.useState(!1),[B,ee]=L.useState(null),[H,ce]=L.useState(null),[ie,he]=L.useState(!1),[U,K]=L.useState(!1),[G,te]=L.useState(null),Y=L.useRef(null),{toast:J}=ys(),[M,Q]=L.useState(null),[ve,xe]=L.useState(null),[ye,Se]=L.useState(""),[we,Ee]=L.useState(!1),[Pe,Ne]=L.useState(!1),[Te,He]=L.useState(new Set),[fe,Xe]=L.useState(""),[at,$t]=L.useState(!1),[Yt,mt]=L.useState(!1),[F,z]=L.useState("rename"),[X,ge]=L.useState(!1),[pe,ue]=L.useState(""),[ne,de]=L.useState("1"),[Re,ze]=L.useState(!1),[nt,Rt]=L.useState(!1),[Xt,Ct]=L.useState(!1),[En,Tn]=L.useState(!1),[bt,on]=L.useState(1),[hr,qn]=L.useState(!1),{currentJob:tt,elapsedTime:Qr,setCurrentJob:Ws}=ZO(t),[Kn,eo]=L.useState(null),[Ao,gi]=L.useState(""),[md,Po]=L.useState(!1),[hi,Hs]=L.useState(!1),[Gs,vd]=L.useState(""),to=L.useRef({}),[jt,Oo]=L.useState(null),yd=new URL(window.location.href).searchParams.get("prefix")||""||S||n,[ky,xd]=L.useState(null),{data:An,isLoading:no,error:wd,estimatedTotalHits:ro,refetch:Wt}=eN(t,yd,s,h,bt,y,u,x,to,m),bd=ob({onSuccess:I=>{xd(I.access_token),localStorage.setItem("google_access_token",I.access_token),_d(I.access_token)},onError:()=>{console.log("Đăng nhập thất bại!")},scope:JO}),_d=I=>{const j=document.createElement("script");j.src="https://apis.google.com/js/api.js",j.onload=()=>{window.gapi.load("picker",()=>Sd(I))},document.body.appendChild(j)},Sd=I=>{const j=new window.google.picker.DocsView(window.google.picker.ViewId.DOCS).setIncludeFolders(!0).setSelectFolderEnabled(!0).setOwnedByMe(!1),re=new window.google.picker.DocsView(window.google.picker.ViewId.DRIVE).setIncludeFolders(!0).setSelectFolderEnabled(!0);new window.google.picker.PickerBuilder().setDeveloperKey(YO).setOAuthToken(I).enableFeature(window.google.picker.Feature.MULTISELECT_ENABLED).setLocale("vi").addView(j).addView(re).setCallback(async be=>{if(be.action===window.google.picker.Action.PICKED){const Fe=be.docs.map(Ze=>({id:Ze.id,name:Ze.name,mimeType:Ze.mimeType}));await Cd(Fe,w)}}).build().setVisible(!0)},Cd=async(I,j="")=>{const re=localStorage.getItem("google_access_token");if(!re){console.error("❌ Không tìm thấy access token. Vui lòng đăng nhập lại."),ct.error("Không tìm thấy access token. Vui lòng đăng nhập lại.",{position:"bottom-right"});return}const me=ct.loading("Đang đồng bộ...",{position:"bottom-right",autoClose:!1});try{const be={prefix:j,folders:[],files:[]};I.forEach(Ze=>{Ze.mimeType==="application/vnd.google-apps.folder"?be.folders.push({id:Ze.id,name:Ze.name}):be.files.push({id:Ze.id,name:Ze.name})});const Fe=await $e.post(`${t}/api/sync-drive-to-s3`,be,{headers:{Authorization:`Bearer ${re}`}});nn.current=!0,Wt(),ct.update(me,{render:`Đồng bộ thành công! Đã tải lên ${Fe.data.uploadedKeys.length} file.`,type:"success",isLoading:!1,autoClose:3e3,position:"bottom-right"})}catch(be){console.error("❌ Lỗi khi đồng bộ file từ Google Drive:",be),ct.update(me,{render:"Không thể đồng bộ file từ Google Drive.",type:"error",isLoading:!1,autoClose:3e3,position:"bottom-right"})}};L.useEffect(()=>{const I=j=>{if(j.data.action==="logout"){const re=document.createElement("iframe");re.style.display="none",re.src="https://accounts.google.com/Logout",document.body.appendChild(re),setTimeout(()=>document.body.removeChild(re),2e3)}};return window.addEventListener("message",I),()=>window.removeEventListener("message",I)},[]),L.useEffect(()=>{const I=new Set(l);m(I)},[]),L.useEffect(()=>{tt!=null&&tt.status&&(tt.status.status==="completed"?(J({title:"Thu thập website hoàn tất",description:`Đã thu thập thành công ${tt.url} với ${tt.status.completed} trang`}),nn.current=!0,Wt()):tt.status.status==="failed"&&J({title:"Thu thập website thất bại",description:`Không thể thu thập ${tt.url}. Vui lòng thử lại.`,variant:"destructive"}))},[(aa=tt==null?void 0:tt.status)==null?void 0:aa.status]);const qs=L.useMemo(()=>An[w]||[],[An,w]),hn=L.useMemo(()=>qs,[qs,w,An]),No=L.useMemo(()=>{const I={};return hn.forEach((j,re)=>{x.has(j.key)&&(I[re]=!0)}),I},[x,hn]),mi=I=>{const j=$s(An,I);if(j.length===0)return x.has(I)?"all":"none";const re=j.filter(me=>x.has(me)).length;return re===0?"none":re===j.length?"all":"partial"},oo=(I,j=!0)=>{if(w!==I){if(u&&!w)qn(!0),A(I+u),_(I+u),l||m(new Set);else if(qn(!0),A(I),_(I),l||m(new Set),j){const re=window.location.pathname==="/"?"":window.location.pathname,me=I?`${window.location.origin}${re}?prefix=${encodeURIComponent(I)}`:`${window.location.origin}${re}`;window.history.pushState({path:me},"",me)}}};L.useEffect(()=>{hr&&(nn.current=!0,Wt().finally(()=>qn(!1)))},[hr]);const Ed=async(I,j)=>{var re,me;W(!0);try{if(hn.some(Et=>Et.isFolder&&Et.name.toLowerCase()===I.toLowerCase())){J({title:"Lỗi",description:`Thư mục "${I}" đã tồn tại trong thư mục hiện tại.`,variant:"destructive"}),W(!1);return}const Fe=`${j}${I}/`;if((await $e.post(`${t}/api/create-folder`,{prefix:Fe})).status!==200){J({title:"Lỗi",description:"Không thể tạo thư mục",variant:"destructive"});return}nn.current=!0,await Wt(),J({title:"Đã tạo thư mục",description:`Đã tạo thành công thư mục "${I}"`}),E(""),N(!1)}catch(be){console.error("Error creating folder:",be);const Fe=((me=(re=be==null?void 0:be.response)==null?void 0:re.data)==null?void 0:me.error)||"Không thể tạo thư mục";J({title:"Lỗi",description:Fe,variant:"destructive"})}finally{W(!1)}},ra=async(I,j,re)=>{var me,be,Fe,Ze,Et,On,io,nl,rl;te(re),Ct(!0);try{if(Array.from(I).reduce((kt,Lo)=>kt+Lo.size,0)>=100*1024*1024){J({title:"Lỗi",description:"Tổng kích thước các tập tin vượt quá 100 MB",variant:"destructive"}),te(null),Ct(!1);return}const ko=Array.from(I).filter(kt=>kt.size===0);if(ko.length>0){const kt=ko.map(Lo=>Lo.name).join(", ");J({title:"Lỗi tải lên",description:`Không thể tải lên tập tin rỗng: ${kt}`,variant:"destructive"}),Ct(!1),te(null);return}let Io=localStorage.getItem("dataLogin"),ao;try{Io&&(Io=JSON.parse(Io),ao=Io.user)}catch{Io=null}const Pr=new FormData;if(ao!=null&&ao.id&&Pr.append("metadata",JSON.stringify({creator:ao.username,creatorId:ao.id,DataSource:"Tệp tải lên"})),re==="folder"&&I[0]){const kt=I[0].webkitRelativePath.split("/")[0];kt&&Pr.append("folderName",kt)}Pr.append("prefix",j),Array.from(I).forEach(kt=>re==="folder"?Pr.append("files",kt,kt.webkitRelativePath):Pr.append("files",kt)),nn.current=!0;const Tt=await $e.post(`${t}/api/check-files-existed`,Pr,{headers:{"Content-Type":"multipart/form-data"}});if(((me=Tt==null?void 0:Tt.data)==null?void 0:me.status)===200)await $e.post(`${t}/api/upload`,Pr,{headers:{"Content-Type":"multipart/form-data"},timeout:0}),y(""),A(j),setTimeout(async()=>{te(null),await Wt(),Ct(!1),await Pn()},500);else{if(((Fe=(be=Tt==null?void 0:Tt.data)==null?void 0:be.names)==null?void 0:Fe.length)>0&&!((Ze=Tt==null?void 0:Tt.data)!=null&&Ze.isFolder)){const kt=Array.from(I).filter(Lo=>Tt.data.names.includes(Lo.name));eo(kt),Po(!0)}(Et=Tt==null?void 0:Tt.data)!=null&&Et.isFolder&&((On=Tt==null?void 0:Tt.data)!=null&&On.name)&&(gi((io=Tt==null?void 0:Tt.data)==null?void 0:io.name),eo(I),Po(!0))}}catch(Do){console.error("Lỗi tải lên:",Do);const ko=((rl=(nl=Do==null?void 0:Do.response)==null?void 0:nl.data)==null?void 0:rl.error)||"Không thể tải lên tập tin";J({title:"Lỗi",description:ko,variant:"destructive"}),te(null),Ct(!1)}},Ks=async()=>{var I,j;try{Ct(!0);const re=new FormData;if(Kn){te(Ao?"folder":"files"),Po(!1);let me=localStorage.getItem("dataLogin"),be;try{me&&(me=JSON.parse(me),be=me.user)}catch{me=null}if(be!=null&&be.id&&(console.log("🚀 ~ uploadFiles ~ user:",be),re.append("metadata",JSON.stringify({creator:be.username,creatorId:be.id,DataSource:"Tệp tải lên"}))),Ao&&Kn[0]){const Fe=Kn[0].webkitRelativePath.split("/")[0];Fe&&re.append("folderName",Fe)}re.append("prefix",w),Array.from(Kn).forEach(Fe=>Ao&&Kn[0]?re.append("files",Fe,Fe.webkitRelativePath):re.append("files",Fe)),be!=null&&be.id&&re.append("metadata",JSON.stringify({creator:be.username,creatorId:be.id,DataSource:"Tệp tải lên"})),await $e.post(`${t}/api/upload`,re,{headers:{"Content-Type":"multipart/form-data"},timeout:0}),y(""),A(w),nn.current=!0}}catch(re){console.error("Lỗi tải lên:",re);const me=((j=(I=re==null?void 0:re.response)==null?void 0:I.data)==null?void 0:j.error)||"Không thể tải lên tập tin";J({title:"Lỗi",description:me,variant:"destructive"})}finally{setTimeout(async()=>{te(null),await Wt(),Ct(!1),gi(""),eo(null),await Pn()},500)}},Ys=async I=>{var j;try{if(await $e.delete(`${t}/api/files`,{data:{paths:[I.key]}}),x.has(I.key)){const me=new Set(x);me.delete(I.key),m(me)}const re=((j=I.key)==null?void 0:j.replace(/^(.*?)(\/.*)?$/,(me,be,Fe)=>!Fe||Fe==="/"?"":be+"/"))||"";A(re),nn.current=!0,J({title:"Đã xóa tập tin",description:`Đã xóa thành công "${I.name}"`}),ee(null),await Pn()}catch(re){console.error("Error deleting file:",re),J({title:"Lỗi",description:"Không thể xóa tập tin",variant:"destructive"})}finally{Tn(!1),await Wt()}},Fo=I=>{const j=new Set(x),re=typeof I=="function"?I(No):I;new Set(Object.keys(No).map(Number)).forEach(be=>{const Fe=hn[be];Fe&&(re[be]||(j.delete(Fe.key),Fe.isFolder&&$s(An,Fe.key).forEach(Ze=>j.delete(Ze))))}),Object.entries(re).forEach(([be,Fe])=>{const Ze=parseInt(be),Et=hn[Ze];Et&&Fe&&(j.add(Et.key),Et.isFolder&&$s(An,Et.key).forEach(On=>j.add(On)))}),m(j)},Td=async()=>{var I;he(!0);try{const j=Array.from(x),re=j.map(be=>Object.values(An).flat().find(Fe=>Fe.key===be)).filter(be=>be!==void 0);if(re.length===0){J({title:"Lỗi",description:"Không có tập tin nào được chọn để xóa",variant:"destructive"});return}await $e.delete(`${t}/api/files`,{data:{paths:j}});const me=((I=re[0])==null?void 0:I.key.replace(/^(.*?)(\/.*)?$/,(be,Fe,Ze)=>!Ze||Ze==="/"?"":Fe+"/"))||"";A(me),nn.current=!0,Wt(),J({title:"Đã xóa tập tin",description:`Đã xóa thành công ${re.length} mục`}),K(!1),m(new Set),await Pn()}catch(j){console.error("Error deleting files:",j),J({title:"Lỗi",description:"Không thể xóa các tập tin đã chọn",variant:"destructive"})}finally{he(!1)}},Ad=async(I,j)=>{if(!w.trim()){J({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}Ne(!0);try{const re=I.key;let me;I.isFolder?me=re.split("/").slice(0,-2).join("/")+"/":me=re.substring(0,re.lastIndexOf("/")+1);const be=me+j+(I.isFolder?"/":"");await $e.post(`${t}/api/rename`,{oldPath:re,newPath:be}),nn.current=!0,await Wt(),J({title:"Đã đổi tên",description:`Đã đổi tên thành công "${I.name}" thành "${j}"`}),Q(null),Se(""),xe(null)}catch(re){console.error("Error renaming item:",re),J({title:"Lỗi",description:"Không thể đổi tên",variant:"destructive"})}finally{Ne(!1)}},Xs=async I=>{He(j=>new Set([...j,...I]));try{const j=await $e.post(`${t}/api/download`,{paths:I},{responseType:"blob"}),re=window.URL.createObjectURL(j.data),me=document.createElement("a");me.href=re;const be=j.headers["Content-Disposition"]||j.headers["content-disposition"],Fe=be==null?void 0:be.match(/filename="(.+)"/),Ze=Fe?decodeURIComponent(Fe[1]):"download.zip";me.setAttribute("download",Ze),document.body.appendChild(me),me.click(),document.body.removeChild(me),window.URL.revokeObjectURL(re),J({title:"Bắt đầu tải xuống",description:`Đã bắt đầu tải xuống ${I.length} mục${I.length>1,""}`})}catch(j){console.error("Error downloading files:",j),J({title:"Lỗi",description:"Không thể tải xuống tập tin",variant:"destructive"})}finally{He(j=>{const re=new Set(j);return I.forEach(me=>re.delete(me)),re})}},Js=w?w.replace(n,"").split("/").filter(Boolean):[],Zs=()=>Array.from(x).map(I=>{var j;for(const re in An){const me=(j=An[re])==null?void 0:j.find(be=>be.key===I);if(me)return me}return null}).filter(I=>I!==null),oa=L.useMemo(()=>{const I=[{id:"select",header:()=>{const j=QO(An,w),re=j.length>0&&j.every(be=>x.has(be)),me=j.some(be=>x.has(be));return d.jsx(Vc,{checked:re?!0:me?"indeterminate":!1,onCheckedChange:be=>{if(be){const Fe=hn.reduce((Ze,Et,On)=>(Ze[On]=!0,Ze),{});Fo(Fe)}else Fo({})},"aria-label":"Chọn tất cả"})},cell:({row:j})=>{const re=j.original;let be=re.isFolder?mi(re.key):x.has(re.key)?"all":"none";if(be==="none"&&re.key.endsWith("/")){for(const Fe of Array.from(x))if(Fe.startsWith(re.key)){be="all";break}}return d.jsx("div",{className:"flex items-center",children:d.jsx(Vc,{checked:be==="partial"?"indeterminate":be==="all",onCheckedChange:Fe=>{var Et,On;const Ze={...No};if(Fe?Ze[j.index]=!0:delete Ze[j.index],to.current[((Et=j.original)==null?void 0:Et.key)||"_"]=!!Fe,(On=j.original)!=null&&On.key.endsWith("/"))for(const io of Array.from(x))io.startsWith(j.original.key)&&(to.current[j.original.key]=!1,x.delete(io));Fo(Ze)},"aria-label":"Chọn dòng"})})},enableSorting:!1},{id:"fileName",header:({column:j})=>d.jsxs(Ue,{variant:"ghost",onClick:()=>j.toggleSorting(j.getIsSorted()==="asc"),children:["Tên tập tin",d.jsx(Ec,{})]}),accessorKey:"name",cell:({row:j})=>{const re=j.original,me=re.key.substring(0,re.key.lastIndexOf("/"))||"/",be=h.trim()!==""&&me!==w,Fe=me.split("/").filter(Boolean);return d.jsxs("div",{className:"flex flex-col",children:[d.jsxs("div",{className:`flex items-center gap-2 ${re.isFolder?"cursor-pointer hover:text-blue-600":""}`,onClick:()=>{re.isFolder&&(l||m(new Set),oo(re.key))},children:[re.isFolder?d.jsx(Hl,{className:"h-5 w-5 text-blue-500"}):null,re.name]}),be&&d.jsxs("div",{className:"text-sm text-gray-500 flex items-center",children:[d.jsx(Hl,{className:"h-4 w-4 text-gray-500 my-auto"}),d.jsxs("span",{className:"flex items-center ml-1",children:[d.jsx("span",{className:"cursor-pointer hover:text-blue-600",onClick:()=>{oo("")},children:"/"}),Fe.map((Ze,Et)=>d.jsxs("span",{className:"flex items-center",children:[d.jsx("span",{className:"cursor-pointer hover:text-blue-600",onClick:()=>{oo(Fe.slice(0,Et+1).join("/")+"/")},children:Ze}),Et<Fe.length-1&&d.jsx("span",{children:"/"})]},Et))]})]})]})}}];return r||I.push({id:"size",header:({column:j})=>d.jsxs(Ue,{variant:"ghost",onClick:()=>j.toggleSorting(j.getIsSorted()==="asc"),children:["Kích thước",d.jsx(Ec,{})]}),accessorKey:"size",cell:({getValue:j,row:re})=>{const me=j();return d.jsx("span",{children:re.original.isFolder?"-":DS(me)})}},{id:"lastModified",header:({column:j})=>d.jsxs(Ue,{variant:"ghost",onClick:()=>j.toggleSorting(j.getIsSorted()==="asc"),className:"px-0 w-full flex-row justify-end",children:["Sửa đổi lần cuối",d.jsx(Ec,{})]}),accessorKey:"lastModified",cell:({row:j})=>{const re=j.original.lastModified;return d.jsx("div",{className:"w-full flex-row justify-end items-center text-right",children:d.jsx("span",{children:re&&Wp(re).isValid()?Wp(re).format("DD/MM/YYYY HH:mm"):"-"})})},size:200},{id:"actions",header:()=>d.jsx("span",{children:"Hành động"}),accessorKey:"key",cell:({row:j})=>d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Yr,{children:d.jsxs(Xr,{children:[d.jsx(Jr,{asChild:!0,children:d.jsx(Ue,{variant:"ghost",size:"icon",onClick:()=>Xs([j.original.key]),className:"h-8 w-8 p-0",disabled:Te.has(j.original.key),children:Te.has(j.original.key)?d.jsx(Ot,{className:"h-4 w-4 animate-spin"}):d.jsx(Rf,{className:"h-4 w-4"})})}),d.jsx(Tr,{children:"Tải xuống"})]})}),w.trim()!==""&&d.jsx(Yr,{children:d.jsxs(Xr,{children:[d.jsx(Jr,{asChild:!0,children:d.jsx(Ue,{variant:"ghost",size:"icon",onClick:()=>{Q(j.original),Se(j.original.name)},className:"h-8 w-8 p-0",children:d.jsx(Jw,{className:"h-4 w-4"})})}),d.jsx(Tr,{children:"Đổi tên"})]})}),d.jsx(Yr,{children:d.jsxs(Xr,{children:[d.jsx(Jr,{asChild:!0,children:d.jsx(Ue,{variant:"ghost",size:"icon",onClick:()=>{Ee(!0),ce(j.original)},className:"h-8 w-8 p-0",children:d.jsx(k_,{className:"h-4 w-4"})})}),d.jsx(Tr,{children:"Di chuyển"})]})}),d.jsx(Yr,{children:d.jsxs(Xr,{children:[d.jsx(Jr,{asChild:!0,children:d.jsx(Ue,{variant:"ghost",size:"icon",onClick:()=>ee(j.original),className:"h-8 w-8 p-0",children:d.jsx(Vf,{className:"h-4 w-4"})})}),d.jsx(Tr,{children:"Xóa"})]})})]})}),I},[x,hn,No,Te,r]),vi=Qf({data:hn,columns:oa,state:{rowSelection:No,sorting:g},onSortingChange:f,enableRowSelection:!0,onRowSelectionChange:Fo,getCoreRowModel:Zf(),getSortedRowModel:$b()}),ia=async I=>{var j,re;$t(!0);try{if(Zi(I)){const me=await $e.get(`${t}/api/read-text`,{params:{path:I.key}});Xe(me.data.content)}try{const me=await $e.get(`${t}/api/read-json`,{params:{path:I.key+".metadata.json"}}),be=((re=(j=me==null?void 0:me.data)==null?void 0:j.content)==null?void 0:re.metadataAttributes)||null;return xe({fullPath:M==null?void 0:M.key,...be})}catch{return xe("Lỗi phân tích siêu dữ liệu")}}catch(me){console.error("Error loading file content:",me),J({title:"Lỗi",description:"Không thể tải nội dung tập tin",variant:"destructive"})}finally{$t(!1)}},Pd=async(I,j)=>{mt(!0);try{await $e.post(`${t}/api/modify-text`,{path:I.key,content:j}),J({title:"Đã lưu tập tin",description:"Nội dung tập tin đã được cập nhật thành công"}),nn.current=!0,await Wt(),Q(null),Xe(""),z("rename"),await Pn()}catch(re){console.error("Error saving file content:",re),J({title:"Lỗi",description:"Không thể lưu nội dung tập tin",variant:"destructive"})}finally{mt(!1)}},Qs=async I=>{mt(!0);try{await $e.post(`${t}/api/modify-json`,{path:I.key+".metadata.json",content:{metadataAttributes:ve}}),J({title:"Đã lưu tập tin",description:"Nội dung tập tin đã được cập nhật thành công"}),nn.current=!0,await Wt(),Q(null),Xe(""),z("rename")}catch(j){console.error("Error saving file content:",j),J({title:"Lỗi",description:"Không thể lưu nội dung tập tin",variant:"destructive"})}finally{mt(!1)}};L.useEffect(()=>{M&&(M.isFolder||ia(M),z("rename"))},[M]);const yi=async(I,j)=>{var re;if(tt){J({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}ze(!0);try{const{data:me}=await $e.post(`${t}/api/crawl`,{url:I,limit:j,prefix:w});if(me.id){Ws({id:me.id,url:I,limit:j,prefix:w,taskId:((re=me.task)==null?void 0:re.id)||""});const be=localStorage.getItem(uy),Fe=be?JSON.parse(be):[];Fe.some(Ze=>Ze.id===me.id)||(Fe.unshift({url:I,id:me.id,limit:j,prefix:w,timestamp:Date.now()}),Fe.length>20&&(Fe.length=20),localStorage.setItem(uy,JSON.stringify(Fe))),J({title:"Bắt đầu thu thập website",description:`Đã thêm nhiệm vụ thu thập ${I} với giới hạn ${j}. Dữ liệu sẽ có sẵn sau khi thu thập hoàn tất.`}),ge(!1),ue(""),de("1")}}catch(me){console.error("Error crawling website:",me),J({title:"Lỗi",description:"Không thể bắt đầu thu thập website",variant:"destructive"})}finally{ze(!1)}},el=async()=>{try{if(!(tt!=null&&tt.id))return;Ws(null),localStorage.removeItem(fi),J({title:"Đã dừng thu thập",description:`Đã dừng thu thập website ${tt.url}`})}catch(I){console.error("Error stopping job:",I),J({title:"Lỗi",description:"Không thể dừng thu thập website",variant:"destructive"})}};L.useEffect(()=>{const I=(j=!0)=>{const me=new URL(window.location.href).searchParams.get("prefix")||"";me?oo(me,!1):(j&&!l&&m(new Set),A(n),_(n),nn.current=!0,setTimeout(()=>{Wt()},0))};return I(!1),window.addEventListener("popstate",()=>I(!0)),()=>{window.removeEventListener("popstate",()=>I(!0))}},[]);const Od=async()=>{Hs(!0);try{await $e.post(`${t}/api/prediction-report`),J({title:"Xuất báo cáo thành công",description:"Báo cáo dự đoán đã được xuất"})}catch(I){console.error("Error exporting report:",I),J({title:"Lỗi",description:"Không thể xuất báo cáo dự đoán",variant:"destructive"})}finally{Hs(!1)}},tl=async()=>{try{const I=kS();I&&(await $e.post(`${t}/api/start-ingestion-job`,{prefix:w,user_id:I.id,userName:I.username})).status===200&&await Pn()}catch(I){Rt(!1),console.log(I)}},Yn=L.useRef(),Pn=async()=>{try{Rt(!0);const I=await $e.post(`${t}/api/get-ingestion-job-status`,{prefix:w}),{status:j}=I==null?void 0:I.data;j==="FAILED"||j==="COMPLETE"||j==="STOPPED"||j==="STOPPING"||!j?(Rt(!1),Yn.current&&(clearInterval(Yn.current),Yn.current=null),Oo(I==null?void 0:I.data)):(Yn.current||(Yn.current=setInterval(()=>Pn(),5e3)),Oo(I==null?void 0:I.data))}catch(I){console.log(I)}},Nd=()=>{const I=Array.from(x);let j;return w?j=I.filter(re=>re.startsWith(w)&&re!==w).length:j=new Set(I.filter(re=>re.split("/").shift())).size,`Đang chọn: ${j}`};return L.useEffect(()=>{const I=w==null?void 0:w.split("/")[0];return I!==Gs&&(Rt(!1),Yn.current&&(clearInterval(Yn.current),Yn.current=null),vd(I||""),Oo(null),I&&Pn()),()=>{}},[Gs,w]),L.useEffect(()=>{if(l)for(const I of Array.from(l))to.current[I]=!0},[]),d.jsxs("div",{className:"space-y-4 s3-explr-container",children:[d.jsx(Sm,{}),d.jsx(_r,{open:md,onOpenChange:I=>{Po(I),I||(gi(""),eo(null),Ct(!1),te(null))},children:d.jsxs(or,{children:[d.jsxs(ir,{children:[d.jsx(ar,{children:"Cảnh báo trùng lặp"}),d.jsxs(ri,{children:[Ao&&d.jsxs(d.Fragment,{children:["Folder $",Ao," đã có."]}),Kn&&Kn.length>0&&d.jsxs(d.Fragment,{children:["Những tệp sau bị lặp:",d.jsx("ul",{className:"mt-2 list-disc pl-5 text-sm text-red-600",children:Array.from(Kn).map((I,j)=>d.jsx("li",{children:I.name},j))})]})]})]}),d.jsxs(_o,{children:[d.jsx(Ue,{variant:"outline",onClick:()=>{Po(!1),gi(""),eo(null),Ct(!1),te(null)},children:"Bỏ qua"}),d.jsx(Ue,{variant:"destructive",onClick:()=>Ks(),children:"Ghi đè"})]})]})}),d.jsx(ug,{className:"s3-explr-breadcrumb",children:d.jsxs(dg,{className:"s3-explr-breadcrumb-list",children:[d.jsx(Ic,{className:"s3-explr-breadcrumb-item",children:d.jsx(Lc,{onClick:()=>oo(n),className:"flex items-center gap-1 cursor-pointer s3-explr-breadcrumb-home",children:e})}),!u&&Js.map((I,j)=>d.jsxs("div",{className:"flex items-center",children:[d.jsx(fg,{className:"s3-explr-breadcrumb-separator"},`sep-${j}`),d.jsx(Ic,{className:"s3-explr-breadcrumb-item",children:d.jsx(Lc,{onClick:()=>oo(n+Js.slice(0,j+1).join("/")+"/"),className:"cursor-pointer s3-explr-breadcrumb-link",children:I})},`item-${I}`)]},j))]})}),d.jsxs("div",{className:"flex items-center space-x-4 s3-explr-toolbar",children:[d.jsx("div",{className:"relative max-w-sm w-full s3-explr-search-container",children:d.jsx(WP,{ref:Y,onChange:I=>y(I)})}),d.jsxs(Ue,{variant:"outline",size:"sm",onClick:()=>{A(w),nn.current=!0,Wt()},disabled:no,className:"flex items-center gap-2 s3-explr-refresh-btn",children:[d.jsx(Wl,{className:`h-4 w-4 s3-explr-refresh-icon ${no?"animate-spin":""}`}),"Làm mới"]}),w&&w!=="/"&&d.jsx(Yr,{delayDuration:0,children:d.jsxs(Xr,{children:[d.jsx(Jr,{asChild:!0,children:d.jsxs(Ue,{variant:"outline",size:"sm",onClick:()=>{no||nt||(Rt(!0),tl())},"aria-disabled":no||nt,className:"flex items-center gap-2 s3-explr-refresh-btn aria-disabled:opacity-50",children:[d.jsx(Wl,{className:`h-4 w-4 s3-explr-refresh-icon ${no||nt?"animate-spin":""}`}),"Đồng bộ KB"]})}),jt&&d.jsx(Tr,{side:"right",sideOffset:5,children:d.jsxs("div",{className:"space-y-1 p-2",children:[d.jsx("p",{className:"font-semibold",children:"Thông tin đồng bộ:"}),d.jsxs("p",{className:"flex items-center gap-2",children:["Trạng thái:"," ",d.jsxs("span",{className:`flex items-center gap-1 ${jt.status==="COMPLETE"?"text-green-600":jt.status==="FAILED"?"text-red-600":"text-yellow-600"}`,children:[jt.status==="COMPLETE"&&d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})}),jt.status==="FAILED"&&d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})}),jt.status!=="COMPLETE"&&jt.status!=="FAILED"&&d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 8v4m0 4h.01"})}),jt.status]})]}),d.jsxs("p",{children:["Ngày tạo:"," ",(()=>{const I=new Date(jt.created_date),j=new Date(I.getTime()+7*60*60*1e3),me=Math.floor((new Date().getTime()-I.getTime())/6e4);return me<1440?`${me} phút trước`:j.toLocaleString("vi-VN",{timeZone:"UTC"})})()]}),d.jsxs("p",{children:["DataSource ID: ",jt.dataSourceId]}),d.jsxs("p",{children:["Ingestion Job ID: ",jt.ingestionJobId]}),d.jsxs("p",{children:["Knowledge Base ID: ",jt.knowledgeBaseId]}),d.jsxs("p",{children:["Người dùng: ",jt.user_name]}),d.jsxs("p",{children:["Job trong queue: ",jt.is_still_in_stock?"Còn":"Không"]})]})})]})}),!r&&d.jsxs(d.Fragment,{children:[x.size>0&&d.jsxs(d.Fragment,{children:[d.jsxs(Ue,{variant:"outline",size:"sm",onClick:()=>Xs(Array.from(x)),disabled:Array.from(x).some(I=>Te.has(I)),className:"flex items-center gap-2 s3-explr-download-selected-btn",children:[Array.from(x).some(I=>Te.has(I))?d.jsx(Ot,{className:"h-4 w-4 animate-spin mr-2 s3-explr-loader"}):d.jsx(Rf,{className:"h-4 w-4 s3-explr-download-icon"}),"Tải xuống đã chọn (",x.size,")"]}),d.jsxs(_r,{open:U,onOpenChange:K,children:[d.jsx(Qa,{asChild:!0,children:d.jsxs(Ue,{variant:"destructive",size:"sm",className:"flex items-center gap-2 s3-explr-bulk-delete-btn",children:[d.jsx(Vf,{className:"h-4 w-4 s3-explr-trash-icon"}),"Xóa đã chọn (",x.size,")"]})}),d.jsxs(or,{className:"s3-explr-dialog-content",children:[d.jsxs(ir,{className:"s3-explr-dialog-header",children:[d.jsx(ar,{className:"s3-explr-dialog-title",children:"Xác nhận xóa hàng loạt"}),d.jsxs(ri,{className:"s3-explr-dialog-description",children:["Bạn có chắc chắn muốn xóa ",x.size," mục đã chọn? Hành động này không thể hoàn tác."]})]}),d.jsxs(_o,{className:"s3-explr-dialog-footer",children:[d.jsx(Ue,{variant:"outline",onClick:()=>K(!1),className:"s3-explr-cancel-btn",children:"Hủy"}),d.jsx(Ue,{variant:"destructive",onClick:Td,disabled:ie,className:"s3-explr-confirm-delete-btn",children:ie?d.jsxs(d.Fragment,{children:[d.jsx(Ot,{className:"mr-2 h-4 w-4 animate-spin s3-explr-loader"}),"Đang xóa..."]}):"Xóa đã chọn"})]})]})]})]}),!u&&d.jsxs(_r,{open:P,onOpenChange:N,children:[d.jsx(Qa,{asChild:!0,children:d.jsxs(Ue,{variant:"outline",size:"sm",className:"flex items-center gap-2 s3-explr-new-folder-btn",disabled:!!s&&!w,children:[d.jsx(Gw,{className:"h-4 w-4 s3-explr-folder-plus-icon"}),"Thư mục mới"]})}),d.jsxs(or,{className:"s3-explr-dialog-content",children:[d.jsx(ir,{className:"s3-explr-dialog-header",children:d.jsx(ar,{className:"s3-explr-dialog-title",children:"Tạo thư mục mới"})}),d.jsxs("div",{className:"space-y-4 py-4 s3-explr-dialog-body",children:[d.jsxs("div",{className:"space-y-2 s3-explr-input-group",children:[d.jsx(So,{htmlFor:"name",className:"s3-explr-label",children:"Tên thư mục"}),d.jsx(Hr,{disabled:V,id:"name",value:D,onChange:I=>E(I.target.value),placeholder:"Nhập tên thư mục",className:"s3-explr-input"})]}),d.jsxs(Ue,{onClick:()=>{D.trim()&&Ed(D,w)},disabled:V,className:"s3-explr-create-btn",children:[V&&d.jsx(Ot,{className:"mr-2 h-4 w-4 animate-spin s3-explr-loader"}),V?"Đang tạo...":"Tạo"]})]})]})]}),u&&!w?d.jsx(d.Fragment,{}):d.jsxs("div",{className:"flex items-center gap-2 s3-explr-upload-group",children:[d.jsx(Ue,{variant:"outline",size:"sm",className:"flex items-center gap-2 s3-explr-upload-files-btn",onClick:()=>{const I=document.createElement("input");I.type="file",I.multiple=!0,I.onchange=j=>{const re=j.target.files;re&&ra(re,w,"files")},I.click()},disabled:G!==null||!!s&&!w,children:G==="files"?d.jsxs(d.Fragment,{children:[d.jsx(Ot,{className:"h-4 w-4 animate-spin mr-2 s3-explr-loader"}),"Đang xử lý..."]}):d.jsxs(d.Fragment,{children:[d.jsx(Ww,{className:"h-4 w-4 s3-explr-upload-icon"}),"Tải lên tập tin"]})}),d.jsx(Ue,{variant:"outline",size:"sm",className:"flex items-center gap-2 s3-explr-upload-folder-btn",onClick:()=>{const I=document.createElement("input");I.type="file",I.multiple=!0,I.webkitdirectory=!0,I.onchange=j=>{const re=j.target.files;re&&ra(re,w,"folder")},I.click()},disabled:G!==null||!!s&&!w,children:G==="folder"?d.jsxs(d.Fragment,{children:[d.jsx(Ot,{className:"h-4 w-4 animate-spin mr-2 s3-explr-loader"}),"Đang tải lên..."]}):d.jsxs(d.Fragment,{children:[d.jsx(Hl,{className:"h-4 w-4 s3-explr-folder-icon"}),"Tải lên thư mục"]})}),tt?d.jsx(Yr,{delayDuration:0,children:d.jsxs(Xr,{children:[d.jsx(Jr,{asChild:!0,children:d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsxs(Ue,{variant:"outline",size:"sm",className:"flex items-center gap-2 s3-explr-add-website-btn",disabled:!0,children:[d.jsx(Ot,{className:"h-4 w-4 animate-spin s3-explr-loader"}),tt.status?d.jsxs(d.Fragment,{children:[tt.status.isProcessing?"Đang thu thập ":"Đang quét sitemap ","(",tt.status.completed,"/",tt.status.total,") -"," ",Math.floor(Qr/60),":",String(Qr%60).padStart(2,"0")]}):"Đang thu thập..."]}),d.jsxs(Ue,{variant:"destructive",size:"sm",onClick:()=>void el(),className:"flex items-center gap-2",children:[d.jsx("span",{className:"sr-only",children:"Dừng thu thập"}),d.jsx(Qw,{className:"h-4 w-4"})]})]})}),tt.status&&d.jsx(Tr,{side:"right",sideOffset:5,children:d.jsxs("div",{className:"space-y-1 p-2",children:[d.jsxs("p",{className:"font-semibold",children:["Đang thu thập ",tt.url]}),d.jsxs("p",{children:["Tiến độ: ",tt.status.completed,"/",tt.status.total," ","trang"]}),d.jsxs("p",{children:["Thời gian: ",Math.floor(Qr/60),":",String(Qr%60).padStart(2,"0")]}),d.jsxs("p",{children:["Trạng thái:"," ",tt.status.status==="scraping"?"Đang thu thập":tt.status.status==="completed"?"Hoàn thành":"Thất bại"]})]})})]})}):!u&&d.jsxs(_r,{open:X,onOpenChange:ge,children:[d.jsx(Qa,{asChild:!0,children:d.jsxs(Ue,{variant:"outline",size:"sm",className:"flex items-center gap-2 s3-explr-add-website-btn",disabled:!!s&&!w,children:[d.jsx(Yw,{className:"h-4 w-4 s3-explr-globe-icon"}),"Thêm website"]})}),d.jsxs(or,{className:"s3-explr-dialog-content",children:[d.jsxs(ir,{className:"s3-explr-dialog-header",children:[d.jsx(ar,{className:"s3-explr-dialog-title",children:"Thêm website"}),d.jsx(ri,{className:"s3-explr-dialog-description",children:"Nhập URL website để thu thập và thêm vào S3."})]}),d.jsxs("div",{className:"space-y-4 py-4 s3-explr-dialog-body",children:[d.jsxs("div",{className:"space-y-2 s3-explr-input-group",children:[d.jsx(So,{htmlFor:"websiteUrl",className:"s3-explr-label",children:"URL Website"}),d.jsx(Hr,{id:"websiteUrl",value:pe,onChange:I=>ue(I.target.value),placeholder:"https://example.com",type:"url",disabled:Re,className:"s3-explr-input"})]}),d.jsxs("div",{className:"space-y-2 s3-explr-input-group",children:[d.jsx(So,{htmlFor:"crawlLimit",className:"s3-explr-label",children:"Giới hạn thu thập"}),d.jsx(Hr,{id:"crawlLimit",value:ne,onChange:I=>{const j=I.target.value;/^\d*$/.test(j)&&de(j)},placeholder:"1",type:"text",disabled:Re,className:"s3-explr-input"}),d.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)"})]})]}),d.jsxs(_o,{className:"s3-explr-dialog-footer",children:[d.jsx(Ue,{variant:"outline",onClick:()=>{ge(!1),ue(""),de("1")},disabled:Re,className:"s3-explr-cancel-btn",children:"Hủy"}),d.jsx(Ue,{onClick:()=>{pe.trim()&&yi(pe.trim(),parseInt(ne)||1)},disabled:Re||!pe.trim(),className:"s3-explr-crawl-btn",children:Re?d.jsxs(d.Fragment,{children:[d.jsx(Ot,{className:"mr-2 h-4 w-4 animate-spin s3-explr-loader"}),"Đang thu thập..."]}):"Bắt đầu thu thập"})]})]})]}),w.startsWith("BKTTW/")&&d.jsx(Yr,{delayDuration:0,children:d.jsxs(Xr,{children:[d.jsx(Jr,{asChild:!0,children:d.jsxs(Ue,{variant:"outline",size:"sm",className:"flex items-center gap-2 s3-explr-add-website-btn",disabled:!!s&&!w,onClick:Od,children:[hi&&d.jsx(Wl,{className:`h-4 w-4 s3-explr-refresh-icon ${hi?"animate-spin":""}`}),"Xuất báo cáo"]})}),hi&&d.jsx(Tr,{sideOffset:5,children:"Đang xuất báo cáo"})]})})]}),!u&&d.jsx("div",{className:"flex items-center gap-4",children:d.jsxs(Ue,{variant:"outline",size:"sm",onClick:()=>bd(),className:"flex items-center gap-2",children:[d.jsxs("svg",{viewBox:"0 0 87.3 78",xmlns:"http://www.w3.org/2000/svg",children:[d.jsx("path",{d:"m6.6 66.85 3.85 6.65c.8 1.4 1.95 2.5 3.3 3.3l13.75-23.8h-27.5c0 1.55.4 3.1 1.2 4.5z",fill:"#0066da"}),d.jsx("path",{d:"m43.65 25-13.75-23.8c-1.35.8-2.5 1.9-3.3 3.3l-25.4 44a9.06 9.06 0 0 0 -1.2 4.5h27.5z",fill:"#00ac47"}),d.jsx("path",{d:"m73.55 76.8c1.35-.8 2.5-1.9 3.3-3.3l1.6-2.75 7.65-13.25c.8-1.4 1.2-2.95 1.2-4.5h-27.502l5.852 11.5z",fill:"#ea4335"}),d.jsx("path",{d:"m43.65 25 13.75-23.8c-1.35-.8-2.9-1.2-4.5-1.2h-18.5c-1.6 0-3.15.45-4.5 1.2z",fill:"#00832d"}),d.jsx("path",{d:"m59.8 53h-32.3l-13.75 23.8c1.35.8 2.9 1.2 4.5 1.2h50.8c1.6 0 3.15-.45 4.5-1.2z",fill:"#2684fc"}),d.jsx("path",{d:"m73.4 26.5-12.7-22c-.8-1.4-1.95-2.5-3.3-3.3l-13.75 23.8 16.15 28h27.45c0-1.55-.4-3.1-1.2-4.5z",fill:"#ffba00"})]}),"Đồng bộ Google Drive"]})}),d.jsx(_r,{open:!!B,onOpenChange:I=>!I&&ee(null),children:d.jsxs(or,{className:"s3-explr-dialog-content",children:[d.jsxs(ir,{className:"s3-explr-dialog-header",children:[d.jsx(ar,{className:"s3-explr-dialog-title",children:"Xác nhận xóa"}),d.jsxs(ri,{className:"s3-explr-dialog-description",children:["Bạn có chắc chắn muốn xóa ",B==null?void 0:B.name,"? Hành động này không thể hoàn tác."]})]}),d.jsxs(_o,{className:"s3-explr-dialog-footer",children:[d.jsx(Ue,{variant:"outline",onClick:()=>ee(null),className:"s3-explr-cancel-btn",children:"Hủy"}),d.jsx(Ue,{variant:"destructive",onClick:()=>Ys(B),disabled:En,className:"s3-explr-confirm-delete-btn",children:En?d.jsxs(d.Fragment,{children:[d.jsx(Ot,{className:"mr-2 h-4 w-4 animate-spin s3-explr-loader"}),"Đang xóa..."]}):"Xóa"})]})]})}),d.jsx(_r,{open:!!M,onOpenChange:I=>{I||(Q(null),xe(null),Se(""),Xe(""),z("rename"))},children:d.jsxs(or,{className:"s3-explr-dialog-content max-w-5xl w-[90%]",children:[d.jsx(ir,{className:"s3-explr-dialog-header",children:d.jsx(ar,{className:"s3-explr-dialog-title",children:M!=null&&M.isFolder?"Đổi tên thư mục":Zi(M)?"Quản lý tập tin":"Đổi tên tập tin"})}),M&&d.jsxs(s1,{value:F,onValueChange:I=>z(I),children:[d.jsxs(Xh,{"aria-checked":!Zi(M),"aria-disabled":M.isFolder,className:"grid w-full grid-cols-3 aria-checked:grid-cols-2 aria-disabled:grid-cols-1",children:[d.jsx(ds,{value:"rename",children:"Đổi tên"}),!M.isFolder&&d.jsxs(d.Fragment,{children:[Zi(M)&&d.jsx(ds,{value:"edit",children:"Sửa nội dung"}),d.jsx(ds,{value:"edit-metadata",children:"Sửa metadata file"})]})]}),d.jsx(fs,{value:"rename",children:d.jsx("div",{className:"space-y-4 py-4 s3-explr-dialog-body",children:d.jsxs("div",{className:"h-[70dvh] min-h-[500px] overflow-hidden overflow-y-auto pb-3 px-1 s3-explr-input-group",children:[d.jsx(So,{htmlFor:"newName",className:"s3-explr-label",children:"Tên mới"}),d.jsx(Hr,{id:"newName",value:ye,onChange:I=>Se(I.target.value),placeholder:"Nhập tên mới",disabled:Pe,className:"s3-explr-input"})]})})}),!M.isFolder&&d.jsxs(d.Fragment,{children:[Zi(M)&&d.jsx(fs,{value:"edit",children:d.jsx("div",{className:"space-y-4 py-4",children:at?d.jsx("div",{className:"flex items-center justify-center py-4",children:d.jsx(Ot,{className:"h-6 w-6 animate-spin"})}):d.jsxs("div",{className:"h-[70dvh] min-h-[500px] overflow-hidden overflow-y-auto pb-3 px-1",children:[d.jsx(So,{htmlFor:"content",className:"s3-explr-label",children:"Nội dung tập tin"}),d.jsx(Ui,{id:"content",value:fe,onChange:I=>Xe(I.target.value),placeholder:"Nhập nội dung tập tin",className:"min-h-[200px] font-mono",disabled:Yt})]})})}),d.jsx(fs,{value:"edit-metadata",children:d.jsx("div",{className:"space-y-4 py-4",children:at?d.jsx("div",{className:"flex items-center justify-center py-4",children:d.jsx(Ot,{className:"h-6 w-6 animate-spin"})}):d.jsx("div",{className:"h-[70dvh] min-h-[500px] overflow-hidden overflow-y-auto pb-3 px-1",children:ve&&typeof ve=="object"&&Object.entries(ve).map(([I,j],re)=>d.jsxs("div",{className:"pb-3 flex flex-col gap-2",children:[d.jsxs(So,{htmlFor:I,className:"s3-explr-label flex items-center gap-1",children:[Y_[I]||I,Oc(I)&&d.jsx(I_,{className:"h-[12px] w-[12px] text-red-500"})]}),X_(I)?d.jsx(Ui,{id:I,value:typeof j=="string"?j:JSON.stringify(j),onChange:me=>{const be={...ve,[I]:me.target.value};xe(be)},placeholder:"Nhập nội dung tập tin",className:"min-h-[200px] font-mono",disabled:Yt||Oc(I)}):d.jsx(Hr,{id:I,value:typeof j=="string"?j:JSON.stringify(j),onChange:me=>{const be={...ve,[I]:me.target.value};xe(be)},placeholder:"Nhập nội dung",className:"s3-explr-input",disabled:Yt||Oc(I)})]},re))})})})]})]}),d.jsxs(_o,{className:"s3-explr-dialog-footer",children:[d.jsx(Ue,{variant:"outline",onClick:()=>{Q(null),xe(null),Se(""),Xe("")},className:"s3-explr-cancel-btn",children:"Hủy"}),F==="edit"?d.jsx(Ue,{onClick:()=>M&&Pd(M,fe),disabled:Yt||at,className:"s3-explr-save-btn",children:Yt?d.jsxs(d.Fragment,{children:[d.jsx(Ot,{className:"mr-2 h-4 w-4 animate-spin s3-explr-loader"}),"Đang lưu..."]}):"Lưu thay đổi"}):F==="edit-metadata"?d.jsx(Ue,{onClick:()=>ve&&typeof ve=="object"&&M&&Qs(M),disabled:Yt||at,className:"s3-explr-save-btn",children:Yt?d.jsxs(d.Fragment,{children:[d.jsx(Ot,{className:"mr-2 h-4 w-4 animate-spin s3-explr-loader"}),"Đang lưu..."]}):"Lưu thay đổi"}):d.jsx(Ue,{onClick:()=>{ye.trim()&&M&&Ad(M,ye.trim())},disabled:Pe||!ye.trim()||ye.trim()===(M==null?void 0:M.name),className:"s3-explr-rename-btn",children:Pe?d.jsxs(d.Fragment,{children:[d.jsx(Ot,{className:"mr-2 h-4 w-4 animate-spin s3-explr-loader"}),"Đang đổi tên..."]}):"Đổi tên"})]})]})}),H&&we&&d.jsx(KO,{openDialogRename:we,setOpenDialogRename:Ee,apiBaseUrl:t,setFileToMove:ce,fileToMove:H,refreshFiles:Wt,ignoreCache:nn})]})]}),wd&&d.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"}),d.jsx(qO,{onFilesSelected:(I,j)=>ra(I,w,j),children:d.jsx("div",{className:"rounded-md border s3-explr-table-container",children:d.jsxs(is,{className:"s3-explr-table",children:[d.jsx(as,{className:"s3-explr-table-header",children:vi.getHeaderGroups().map(I=>d.jsx(jn,{className:"hover:bg-transparent s3-explr-header-row",children:I.headers.map(j=>d.jsx(sr,{className:"s3-explr-header-cell",children:j.isPlaceholder?null:Aa(j.column.columnDef.header,j.getContext())},j.id))},I.id))}),d.jsx(ss,{className:"s3-explr-table-body",children:vi.getRowModel().rows.length===0?d.jsx(jn,{className:"s3-explr-empty-row",children:d.jsx(tn,{colSpan:oa.length,className:"h-24 text-center s3-explr-empty-cell",children:h?d.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 "',h,'"']}):d.jsx("div",{className:"text-gray-500 s3-explr-empty-message",children:no?"Đ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"})})}):vi.getRowModel().rows.map(I=>d.jsx(jn,{className:"h-12 s3-explr-row",children:I.getVisibleCells().map(j=>d.jsx(tn,{className:"align-middle s3-explr-cell",children:Aa(j.column.columnDef.cell,j.getContext())},j.id))},I.id))})]})})}),h&&ro!==0&&d.jsx(d.Fragment,{children:d.jsx(es,{children:d.jsxs(ts,{children:[d.jsx(ns,{onClick:()=>on(I=>Math.max(I-1,1)),"aria-disabled":bt===1,className:"cursor-pointer aria-disabled:pointer-events-none"}),Array.from({length:Math.ceil(ro/20)},(I,j)=>{const re=j+1,me=Math.ceil(ro/20);return me>7&&!(re===1||re===me||re>=bt-1&&re<=bt+1)?re===bt-2&&bt>4||re===bt+2&&bt<me-3?d.jsx(os,{className:"pointer-events-none",children:"..."},j):null:d.jsx(Un,{className:"cursor-pointer",children:d.jsx(oi,{isActive:bt===re,onClick:()=>on(re),className:`${bt===re?"bg-blue-500 text-white":"bg-white text-black"} hover:bg-blue-100`,children:re})},j)}),d.jsx(Un,{children:d.jsx(rs,{onClick:()=>on(I=>Math.min(I+1,Math.ceil(ro/20))),"aria-disabled":bt===Math.ceil(ro/20),className:"cursor-pointer aria-disabled:pointer-events-none"})})]})})}),r&&i&&d.jsxs("div",{className:"flex justify-between items-center mt-4 s3-explr-selector-footer",children:[d.jsx("div",{className:"text-sm text-gray-500 s3-explr-selection-count",children:Nd()}),d.jsx(Ue,{variant:"default",onClick:()=>i(Zs()),disabled:x.size===0,className:"s3-explr-ok-btn",children:"OK"})]})]})}),nN=e=>d.jsx(nb,{clientId:XO,children:d.jsx(tN,{...e})});var Qi=e=>e.type==="checkbox",To=e=>e instanceof Date,Kt=e=>e==null;const dy=e=>typeof e=="object";var St=e=>!Kt(e)&&!Array.isArray(e)&&dy(e)&&!To(e),rN=e=>St(e)&&e.target?Qi(e.target)?e.target.checked:e.target.value:e,oN=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,iN=(e,t)=>e.has(oN(t)),aN=e=>{const t=e.constructor&&e.constructor.prototype;return St(t)&&t.hasOwnProperty("isPrototypeOf")},ld=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Cn(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(!(ld&&(e instanceof Blob||r))&&(n||St(e)))if(t=n?[]:{},!n&&!aN(e))t=e;else for(const i in e)e.hasOwnProperty(i)&&(t[i]=Cn(e[i]));else return e;return t}var Rs=e=>Array.isArray(e)?e.filter(Boolean):[],wt=e=>e===void 0,Ae=(e,t,n)=>{if(!t||!St(e))return n;const r=Rs(t.split(/[,[\].]+?/)).reduce((i,s)=>Kt(i)?i:i[s],e);return wt(r)||r===e?wt(e[t])?n:e[t]:r},fr=e=>typeof e=="boolean",cd=e=>/^\w*$/.test(e),fy=e=>Rs(e.replace(/["|']|\]/g,"").split(/\.|\[/)),gt=(e,t,n)=>{let r=-1;const i=cd(t)?[t]:fy(t),s=i.length,l=s-1;for(;++r<s;){const u=i[r];let g=n;if(r!==l){const f=e[u];g=St(f)||Array.isArray(f)?f:isNaN(+i[r+1])?{}:[]}if(u==="__proto__"||u==="constructor"||u==="prototype")return;e[u]=g,e=e[u]}return e};const py={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Gn={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Ar={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};L.createContext(null);var sN=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(i,s,{get:()=>{const l=s;return t._proxyFormState[l]!==Gn.all&&(t._proxyFormState[l]=!r||Gn.all),e[l]}});return i},rn=e=>St(e)&&!Object.keys(e).length,lN=(e,t,n,r)=>{n(e);const{name:i,...s}=e;return rn(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(l=>t[l]===Gn.all)},Vs=e=>Array.isArray(e)?e:[e];function cN(e){const t=L.useRef(e);t.current=e,L.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}var pr=e=>typeof e=="string",uN=(e,t,n,r,i)=>pr(e)?(r&&t.watch.add(e),Ae(n,e,i)):Array.isArray(e)?e.map(s=>(r&&t.watch.add(s),Ae(n,s))):(r&&(t.watchAll=!0),n),dN=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},gy=e=>({isOnSubmit:!e||e===Gn.onSubmit,isOnBlur:e===Gn.onBlur,isOnChange:e===Gn.onChange,isOnAll:e===Gn.all,isOnTouch:e===Gn.onTouched}),hy=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const ea=(e,t,n,r)=>{for(const i of n||Object.keys(e)){const s=Ae(e,i);if(s){const{_f:l,...u}=s;if(l){if(l.refs&&l.refs[0]&&t(l.refs[0],i)&&!r)return!0;if(l.ref&&t(l.ref,l.name)&&!r)return!0;if(ea(u,t))break}else if(St(u)&&ea(u,t))break}}};var fN=(e,t,n)=>{const r=Vs(Ae(e,n));return gt(r,"root",t[n]),gt(e,n,r),e},ud=e=>e.type==="file",gr=e=>typeof e=="function",zs=e=>{if(!ld)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Bs=e=>pr(e),dd=e=>e.type==="radio",Us=e=>e instanceof RegExp;const my={value:!1,isValid:!1},vy={value:!0,isValid:!0};var yy=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&&!wt(e[0].attributes.value)?wt(e[0].value)||e[0].value===""?vy:{value:e[0].value,isValid:!0}:vy:my}return my};const xy={isValid:!1,value:null};var wy=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,xy):xy;function by(e,t,n="validate"){if(Bs(e)||Array.isArray(e)&&e.every(Bs)||fr(e)&&!e)return{type:n,message:Bs(e)?e:"",ref:t}}var pi=e=>St(e)&&!Us(e)?e:{value:e,message:""},_y=async(e,t,n,r,i)=>{const{ref:s,refs:l,required:u,maxLength:g,minLength:f,min:h,max:y,pattern:x,validate:m,name:w,valueAsNumber:_,mount:S,disabled:A}=e._f,P=Ae(t,w);if(!S||A)return{};const N=l?l[0]:s,D=ie=>{r&&N.reportValidity&&(N.setCustomValidity(fr(ie)?"":ie||""),N.reportValidity())},E={},V=dd(s),W=Qi(s),B=V||W,ee=(_||ud(s))&&wt(s.value)&&wt(P)||zs(s)&&s.value===""||P===""||Array.isArray(P)&&!P.length,H=dN.bind(null,w,n,E),ce=(ie,he,U,K=Ar.maxLength,G=Ar.minLength)=>{const te=ie?he:U;E[w]={type:ie?K:G,message:te,ref:s,...H(ie?K:G,te)}};if(i?!Array.isArray(P)||!P.length:u&&(!B&&(ee||Kt(P))||fr(P)&&!P||W&&!yy(l).isValid||V&&!wy(l).isValid)){const{value:ie,message:he}=Bs(u)?{value:!!u,message:u}:pi(u);if(ie&&(E[w]={type:Ar.required,message:he,ref:N,...H(Ar.required,he)},!n))return D(he),E}if(!ee&&(!Kt(h)||!Kt(y))){let ie,he;const U=pi(y),K=pi(h);if(!Kt(P)&&!isNaN(P)){const G=s.valueAsNumber||P&&+P;Kt(U.value)||(ie=G>U.value),Kt(K.value)||(he=G<K.value)}else{const G=s.valueAsDate||new Date(P),te=M=>new Date(new Date().toDateString()+" "+M),Y=s.type=="time",J=s.type=="week";pr(U.value)&&P&&(ie=Y?te(P)>te(U.value):J?P>U.value:G>new Date(U.value)),pr(K.value)&&P&&(he=Y?te(P)<te(K.value):J?P<K.value:G<new Date(K.value))}if((ie||he)&&(ce(!!ie,U.message,K.message,Ar.max,Ar.min),!n))return D(E[w].message),E}if((g||f)&&!ee&&(pr(P)||i&&Array.isArray(P))){const ie=pi(g),he=pi(f),U=!Kt(ie.value)&&P.length>+ie.value,K=!Kt(he.value)&&P.length<+he.value;if((U||K)&&(ce(U,ie.message,he.message),!n))return D(E[w].message),E}if(x&&!ee&&pr(P)){const{value:ie,message:he}=pi(x);if(Us(ie)&&!P.match(ie)&&(E[w]={type:Ar.pattern,message:he,ref:s,...H(Ar.pattern,he)},!n))return D(he),E}if(m){if(gr(m)){const ie=await m(P,t),he=by(ie,N);if(he&&(E[w]={...he,...H(Ar.validate,he.message)},!n))return D(he.message),E}else if(St(m)){let ie={};for(const he in m){if(!rn(ie)&&!n)break;const U=by(await m[he](P,t),N,he);U&&(ie={...U,...H(he,U.message)},D(U.message),n&&(E[w]=ie))}if(!rn(ie)&&(E[w]={ref:N,...ie},!n))return E}}return D(!0),E};function pN(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=wt(e)?r++:e[t[r++]];return e}function gN(e){for(const t in e)if(e.hasOwnProperty(t)&&!wt(e[t]))return!1;return!0}function Dt(e,t){const n=Array.isArray(t)?t:cd(t)?[t]:fy(t),r=n.length===1?e:pN(e,n),i=n.length-1,s=n[i];return r&&delete r[s],i!==0&&(St(r)&&rn(r)||Array.isArray(r)&&gN(r))&&Dt(e,n.slice(0,-1)),e}var fd=()=>{let e=[];return{get observers(){return e},next:i=>{for(const s of e)s.next&&s.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(s=>s!==i)}}),unsubscribe:()=>{e=[]}}},pd=e=>Kt(e)||!dy(e);function Zr(e,t){if(pd(e)||pd(t))return e===t;if(To(e)&&To(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n){const s=e[i];if(!r.includes(i))return!1;if(i!=="ref"){const l=t[i];if(To(s)&&To(l)||St(s)&&St(l)||Array.isArray(s)&&Array.isArray(l)?!Zr(s,l):s!==l)return!1}}return!0}var Sy=e=>e.type==="select-multiple",hN=e=>dd(e)||Qi(e),gd=e=>zs(e)&&e.isConnected,Cy=e=>{for(const t in e)if(gr(e[t]))return!0;return!1};function js(e,t={}){const n=Array.isArray(e);if(St(e)||n)for(const r in e)Array.isArray(e[r])||St(e[r])&&!Cy(e[r])?(t[r]=Array.isArray(e[r])?[]:{},js(e[r],t[r])):Kt(e[r])||(t[r]=!0);return t}function Ey(e,t,n){const r=Array.isArray(e);if(St(e)||r)for(const i in e)Array.isArray(e[i])||St(e[i])&&!Cy(e[i])?wt(t)||pd(n[i])?n[i]=Array.isArray(e[i])?js(e[i],[]):{...js(e[i])}:Ey(e[i],Kt(t)?{}:t[i],n[i]):n[i]=!Zr(e[i],t[i]);return n}var ta=(e,t)=>Ey(e,t,js(t)),Ty=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>wt(e)?e:t?e===""?NaN:e&&+e:n&&pr(e)?new Date(e):r?r(e):e;function hd(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return ud(t)?t.files:dd(t)?wy(e.refs).value:Sy(t)?[...t.selectedOptions].map(({value:n})=>n):Qi(t)?yy(e.refs).value:Ty(wt(t.value)?e.ref.value:t.value,e)}var mN=(e,t,n,r)=>{const i={};for(const s of e){const l=Ae(t,s);l&>(i,s,l._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},na=e=>wt(e)?e:Us(e)?e.source:St(e)?Us(e.value)?e.value.source:e.value:e;const Ay="AsyncFunction";var vN=e=>!!e&&!!e.validate&&!!(gr(e.validate)&&e.validate.constructor.name===Ay||St(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Ay)),yN=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Py(e,t,n){const r=Ae(e,n);if(r||cd(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const s=i.join("."),l=Ae(t,s),u=Ae(e,s);if(l&&!Array.isArray(l)&&n!==s)return{name:n};if(u&&u.type)return{name:s,error:u};i.pop()}return{name:n}}var xN=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?r.isOnChange:i.isOnChange)?e:!0,wN=(e,t)=>!Rs(Ae(e,t)).length&&Dt(e,t);const bN={mode:Gn.onSubmit,reValidateMode:Gn.onChange,shouldFocusError:!0};function _N(e={}){let t={...bN,...e},n={submitCount:0,isDirty:!1,isLoading:gr(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},i=St(t.defaultValues)||St(t.values)?Cn(t.defaultValues||t.values)||{}:{},s=t.shouldUnregister?{}:Cn(i),l={action:!1,mount:!1,watch:!1},u={mount:new Set,unMount:new Set,array:new Set,watch:new Set},g,f=0;const h={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},y={values:fd(),array:fd(),state:fd()},x=gy(t.mode),m=gy(t.reValidateMode),w=t.criteriaMode===Gn.all,_=F=>z=>{clearTimeout(f),f=setTimeout(F,z)},S=async F=>{if(!t.disabled&&(h.isValid||F)){const z=t.resolver?rn((await B()).errors):await H(r,!0);z!==n.isValid&&y.state.next({isValid:z})}},A=(F,z)=>{!t.disabled&&(h.isValidating||h.validatingFields)&&((F||Array.from(u.mount)).forEach(X=>{X&&(z?gt(n.validatingFields,X,z):Dt(n.validatingFields,X))}),y.state.next({validatingFields:n.validatingFields,isValidating:!rn(n.validatingFields)}))},P=(F,z=[],X,ge,pe=!0,ue=!0)=>{if(ge&&X&&!t.disabled){if(l.action=!0,ue&&Array.isArray(Ae(r,F))){const ne=X(Ae(r,F),ge.argA,ge.argB);pe&>(r,F,ne)}if(ue&&Array.isArray(Ae(n.errors,F))){const ne=X(Ae(n.errors,F),ge.argA,ge.argB);pe&>(n.errors,F,ne),wN(n.errors,F)}if(h.touchedFields&&ue&&Array.isArray(Ae(n.touchedFields,F))){const ne=X(Ae(n.touchedFields,F),ge.argA,ge.argB);pe&>(n.touchedFields,F,ne)}h.dirtyFields&&(n.dirtyFields=ta(i,s)),y.state.next({name:F,isDirty:ie(F,z),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else gt(s,F,z)},N=(F,z)=>{gt(n.errors,F,z),y.state.next({errors:n.errors})},D=F=>{n.errors=F,y.state.next({errors:n.errors,isValid:!1})},E=(F,z,X,ge)=>{const pe=Ae(r,F);if(pe){const ue=Ae(s,F,wt(X)?Ae(i,F):X);wt(ue)||ge&&ge.defaultChecked||z?gt(s,F,z?ue:hd(pe._f)):K(F,ue),l.mount&&S()}},V=(F,z,X,ge,pe)=>{let ue=!1,ne=!1;const de={name:F};if(!t.disabled){const Re=!!(Ae(r,F)&&Ae(r,F)._f&&Ae(r,F)._f.disabled);if(!X||ge){h.isDirty&&(ne=n.isDirty,n.isDirty=de.isDirty=ie(),ue=ne!==de.isDirty);const ze=Re||Zr(Ae(i,F),z);ne=!!(!Re&&Ae(n.dirtyFields,F)),ze||Re?Dt(n.dirtyFields,F):gt(n.dirtyFields,F,!0),de.dirtyFields=n.dirtyFields,ue=ue||h.dirtyFields&&ne!==!ze}if(X){const ze=Ae(n.touchedFields,F);ze||(gt(n.touchedFields,F,X),de.touchedFields=n.touchedFields,ue=ue||h.touchedFields&&ze!==X)}ue&&pe&&y.state.next(de)}return ue?de:{}},W=(F,z,X,ge)=>{const pe=Ae(n.errors,F),ue=h.isValid&&fr(z)&&n.isValid!==z;if(t.delayError&&X?(g=_(()=>N(F,X)),g(t.delayError)):(clearTimeout(f),g=null,X?gt(n.errors,F,X):Dt(n.errors,F)),(X?!Zr(pe,X):pe)||!rn(ge)||ue){const ne={...ge,...ue&&fr(z)?{isValid:z}:{},errors:n.errors,name:F};n={...n,...ne},y.state.next(ne)}},B=async F=>{A(F,!0);const z=await t.resolver(s,t.context,mN(F||u.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return A(F),z},ee=async F=>{const{errors:z}=await B(F);if(F)for(const X of F){const ge=Ae(z,X);ge?gt(n.errors,X,ge):Dt(n.errors,X)}else n.errors=z;return z},H=async(F,z,X={valid:!0})=>{for(const ge in F){const pe=F[ge];if(pe){const{_f:ue,...ne}=pe;if(ue){const de=u.array.has(ue.name),Re=pe._f&&vN(pe._f);Re&&h.validatingFields&&A([ge],!0);const ze=await _y(pe,s,w,t.shouldUseNativeValidation&&!z,de);if(Re&&h.validatingFields&&A([ge]),ze[ue.name]&&(X.valid=!1,z))break;!z&&(Ae(ze,ue.name)?de?fN(n.errors,ze,ue.name):gt(n.errors,ue.name,ze[ue.name]):Dt(n.errors,ue.name))}!rn(ne)&&await H(ne,z,X)}}return X.valid},ce=()=>{for(const F of u.unMount){const z=Ae(r,F);z&&(z._f.refs?z._f.refs.every(X=>!gd(X)):!gd(z._f.ref))&&we(F)}u.unMount=new Set},ie=(F,z)=>!t.disabled&&(F&&z&>(s,F,z),!Zr(Q(),i)),he=(F,z,X)=>uN(F,u,{...l.mount?s:wt(z)?i:pr(F)?{[F]:z}:z},X,z),U=F=>Rs(Ae(l.mount?s:i,F,t.shouldUnregister?Ae(i,F,[]):[])),K=(F,z,X={})=>{const ge=Ae(r,F);let pe=z;if(ge){const ue=ge._f;ue&&(!ue.disabled&>(s,F,Ty(z,ue)),pe=zs(ue.ref)&&Kt(z)?"":z,Sy(ue.ref)?[...ue.ref.options].forEach(ne=>ne.selected=pe.includes(ne.value)):ue.refs?Qi(ue.ref)?ue.refs.length>1?ue.refs.forEach(ne=>(!ne.defaultChecked||!ne.disabled)&&(ne.checked=Array.isArray(pe)?!!pe.find(de=>de===ne.value):pe===ne.value)):ue.refs[0]&&(ue.refs[0].checked=!!pe):ue.refs.forEach(ne=>ne.checked=ne.value===pe):ud(ue.ref)?ue.ref.value="":(ue.ref.value=pe,ue.ref.type||y.values.next({name:F,values:{...s}})))}(X.shouldDirty||X.shouldTouch)&&V(F,pe,X.shouldTouch,X.shouldDirty,!0),X.shouldValidate&&M(F)},G=(F,z,X)=>{for(const ge in z){const pe=z[ge],ue=`${F}.${ge}`,ne=Ae(r,ue);(u.array.has(F)||St(pe)||ne&&!ne._f)&&!To(pe)?G(ue,pe,X):K(ue,pe,X)}},te=(F,z,X={})=>{const ge=Ae(r,F),pe=u.array.has(F),ue=Cn(z);gt(s,F,ue),pe?(y.array.next({name:F,values:{...s}}),(h.isDirty||h.dirtyFields)&&X.shouldDirty&&y.state.next({name:F,dirtyFields:ta(i,s),isDirty:ie(F,ue)})):ge&&!ge._f&&!Kt(ue)?G(F,ue,X):K(F,ue,X),hy(F,u)&&y.state.next({...n}),y.values.next({name:l.mount?F:void 0,values:{...s}})},Y=async F=>{l.mount=!0;const z=F.target;let X=z.name,ge=!0;const pe=Ae(r,X),ue=()=>z.type?hd(pe._f):rN(F),ne=de=>{ge=Number.isNaN(de)||To(de)&&isNaN(de.getTime())||Zr(de,Ae(s,X,de))};if(pe){let de,Re;const ze=ue(),nt=F.type===py.BLUR||F.type===py.FOCUS_OUT,Rt=!yN(pe._f)&&!t.resolver&&!Ae(n.errors,X)&&!pe._f.deps||xN(nt,Ae(n.touchedFields,X),n.isSubmitted,m,x),Xt=hy(X,u,nt);gt(s,X,ze),nt?(pe._f.onBlur&&pe._f.onBlur(F),g&&g(0)):pe._f.onChange&&pe._f.onChange(F);const Ct=V(X,ze,nt,!1),En=!rn(Ct)||Xt;if(!nt&&y.values.next({name:X,type:F.type,values:{...s}}),Rt)return h.isValid&&(t.mode==="onBlur"?nt&&S():S()),En&&y.state.next({name:X,...Xt?{}:Ct});if(!nt&&Xt&&y.state.next({...n}),t.resolver){const{errors:Tn}=await B([X]);if(ne(ze),ge){const bt=Py(n.errors,r,X),on=Py(Tn,r,bt.name||X);de=on.error,X=on.name,Re=rn(Tn)}}else A([X],!0),de=(await _y(pe,s,w,t.shouldUseNativeValidation))[X],A([X]),ne(ze),ge&&(de?Re=!1:h.isValid&&(Re=await H(r,!0)));ge&&(pe._f.deps&&M(pe._f.deps),W(X,Re,de,Ct))}},J=(F,z)=>{if(Ae(n.errors,z)&&F.focus)return F.focus(),1},M=async(F,z={})=>{let X,ge;const pe=Vs(F);if(t.resolver){const ue=await ee(wt(F)?F:pe);X=rn(ue),ge=F?!pe.some(ne=>Ae(ue,ne)):X}else F?(ge=(await Promise.all(pe.map(async ue=>{const ne=Ae(r,ue);return await H(ne&&ne._f?{[ue]:ne}:ne)}))).every(Boolean),!(!ge&&!n.isValid)&&S()):ge=X=await H(r);return y.state.next({...!pr(F)||h.isValid&&X!==n.isValid?{}:{name:F},...t.resolver||!F?{isValid:X}:{},errors:n.errors}),z.shouldFocus&&!ge&&ea(r,J,F?pe:u.mount),ge},Q=F=>{const z={...l.mount?s:i};return wt(F)?z:pr(F)?Ae(z,F):F.map(X=>Ae(z,X))},ve=(F,z)=>({invalid:!!Ae((z||n).errors,F),isDirty:!!Ae((z||n).dirtyFields,F),error:Ae((z||n).errors,F),isValidating:!!Ae(n.validatingFields,F),isTouched:!!Ae((z||n).touchedFields,F)}),xe=F=>{F&&Vs(F).forEach(z=>Dt(n.errors,z)),y.state.next({errors:F?n.errors:{}})},ye=(F,z,X)=>{const ge=(Ae(r,F,{_f:{}})._f||{}).ref,pe=Ae(n.errors,F)||{},{ref:ue,message:ne,type:de,...Re}=pe;gt(n.errors,F,{...Re,...z,ref:ge}),y.state.next({name:F,errors:n.errors,isValid:!1}),X&&X.shouldFocus&&ge&&ge.focus&&ge.focus()},Se=(F,z)=>gr(F)?y.values.subscribe({next:X=>F(he(void 0,z),X)}):he(F,z,!0),we=(F,z={})=>{for(const X of F?Vs(F):u.mount)u.mount.delete(X),u.array.delete(X),z.keepValue||(Dt(r,X),Dt(s,X)),!z.keepError&&Dt(n.errors,X),!z.keepDirty&&Dt(n.dirtyFields,X),!z.keepTouched&&Dt(n.touchedFields,X),!z.keepIsValidating&&Dt(n.validatingFields,X),!t.shouldUnregister&&!z.keepDefaultValue&&Dt(i,X);y.values.next({values:{...s}}),y.state.next({...n,...z.keepDirty?{isDirty:ie()}:{}}),!z.keepIsValid&&S()},Ee=({disabled:F,name:z,field:X,fields:ge,value:pe})=>{if(fr(F)&&l.mount||F){const ue=F?void 0:wt(pe)?hd(X?X._f:Ae(ge,z)._f):pe;(F||!F&&!wt(ue))&>(s,z,ue),V(z,ue,!1,!1,!0)}},Pe=(F,z={})=>{let X=Ae(r,F);const ge=fr(z.disabled)||fr(t.disabled);return gt(r,F,{...X||{},_f:{...X&&X._f?X._f:{ref:{name:F}},name:F,mount:!0,...z}}),u.mount.add(F),X?Ee({field:X,disabled:fr(z.disabled)?z.disabled:t.disabled,name:F,value:z.value}):E(F,!0,z.value),{...ge?{disabled:z.disabled||t.disabled}:{},...t.progressive?{required:!!z.required,min:na(z.min),max:na(z.max),minLength:na(z.minLength),maxLength:na(z.maxLength),pattern:na(z.pattern)}:{},name:F,onChange:Y,onBlur:Y,ref:pe=>{if(pe){Pe(F,z),X=Ae(r,F);const ue=wt(pe.value)&&pe.querySelectorAll&&pe.querySelectorAll("input,select,textarea")[0]||pe,ne=hN(ue),de=X._f.refs||[];if(ne?de.find(Re=>Re===ue):ue===X._f.ref)return;gt(r,F,{_f:{...X._f,...ne?{refs:[...de.filter(gd),ue,...Array.isArray(Ae(i,F))?[{}]:[]],ref:{type:ue.type,name:F}}:{ref:ue}}}),E(F,!1,void 0,ue)}else X=Ae(r,F,{}),X._f&&(X._f.mount=!1),(t.shouldUnregister||z.shouldUnregister)&&!(iN(u.array,F)&&l.action)&&u.unMount.add(F)}}},Ne=()=>t.shouldFocusError&&ea(r,J,u.mount),Te=F=>{fr(F)&&(y.state.next({disabled:F}),ea(r,(z,X)=>{const ge=Ae(r,X);ge&&(z.disabled=ge._f.disabled||F,Array.isArray(ge._f.refs)&&ge._f.refs.forEach(pe=>{pe.disabled=ge._f.disabled||F}))},0,!1))},He=(F,z)=>async X=>{let ge;if(X&&(X.preventDefault&&X.preventDefault(),X.persist&&X.persist()),t.disabled){z&&await z({...n.errors},X);return}let pe=Cn(s);if(y.state.next({isSubmitting:!0}),t.resolver){const{errors:ue,values:ne}=await B();n.errors=ue,pe=ne}else await H(r);if(Dt(n.errors,"root"),rn(n.errors)){y.state.next({errors:{}});try{await F(pe,X)}catch(ue){ge=ue}}else z&&await z({...n.errors},X),Ne(),setTimeout(Ne);if(y.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:rn(n.errors)&&!ge,submitCount:n.submitCount+1,errors:n.errors}),ge)throw ge},fe=(F,z={})=>{Ae(r,F)&&(wt(z.defaultValue)?te(F,Cn(Ae(i,F))):(te(F,z.defaultValue),gt(i,F,Cn(z.defaultValue))),z.keepTouched||Dt(n.touchedFields,F),z.keepDirty||(Dt(n.dirtyFields,F),n.isDirty=z.defaultValue?ie(F,Cn(Ae(i,F))):ie()),z.keepError||(Dt(n.errors,F),h.isValid&&S()),y.state.next({...n}))},Xe=(F,z={})=>{const X=F?Cn(F):i,ge=Cn(X),pe=rn(F),ue=pe?i:ge;if(z.keepDefaultValues||(i=X),!z.keepValues){if(z.keepDirtyValues){const ne=new Set([...u.mount,...Object.keys(ta(i,s))]);for(const de of Array.from(ne))Ae(n.dirtyFields,de)?gt(ue,de,Ae(s,de)):te(de,Ae(ue,de))}else{if(ld&&wt(F))for(const ne of u.mount){const de=Ae(r,ne);if(de&&de._f){const Re=Array.isArray(de._f.refs)?de._f.refs[0]:de._f.ref;if(zs(Re)){const ze=Re.closest("form");if(ze){ze.reset();break}}}}r={}}s=t.shouldUnregister?z.keepDefaultValues?Cn(i):{}:Cn(ue),y.array.next({values:{...ue}}),y.values.next({values:{...ue}})}u={mount:z.keepDirtyValues?u.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},l.mount=!h.isValid||!!z.keepIsValid||!!z.keepDirtyValues,l.watch=!!t.shouldUnregister,y.state.next({submitCount:z.keepSubmitCount?n.submitCount:0,isDirty:pe?!1:z.keepDirty?n.isDirty:!!(z.keepDefaultValues&&!Zr(F,i)),isSubmitted:z.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:pe?{}:z.keepDirtyValues?z.keepDefaultValues&&s?ta(i,s):n.dirtyFields:z.keepDefaultValues&&F?ta(i,F):z.keepDirty?n.dirtyFields:{},touchedFields:z.keepTouched?n.touchedFields:{},errors:z.keepErrors?n.errors:{},isSubmitSuccessful:z.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},at=(F,z)=>Xe(gr(F)?F(s):F,z);return{control:{register:Pe,unregister:we,getFieldState:ve,handleSubmit:He,setError:ye,_executeSchema:B,_getWatch:he,_getDirty:ie,_updateValid:S,_removeUnmounted:ce,_updateFieldArray:P,_updateDisabledField:Ee,_getFieldArray:U,_reset:Xe,_resetDefaultValues:()=>gr(t.defaultValues)&&t.defaultValues().then(F=>{at(F,t.resetOptions),y.state.next({isLoading:!1})}),_updateFormState:F=>{n={...n,...F}},_disableForm:Te,_subjects:y,_proxyFormState:h,_setErrors:D,get _fields(){return r},get _formValues(){return s},get _state(){return l},set _state(F){l=F},get _defaultValues(){return i},get _names(){return u},set _names(F){u=F},get _formState(){return n},set _formState(F){n=F},get _options(){return t},set _options(F){t={...t,...F}}},trigger:M,register:Pe,handleSubmit:He,watch:Se,setValue:te,getValues:Q,reset:at,resetField:fe,clearErrors:xe,unregister:we,setError:ye,setFocus:(F,z={})=>{const X=Ae(r,F),ge=X&&X._f;if(ge){const pe=ge.refs?ge.refs[0]:ge.ref;pe.focus&&(pe.focus(),z.shouldSelect&&gr(pe.select)&&pe.select())}},getFieldState:ve}}function SN(e={}){const t=L.useRef(),n=L.useRef(),[r,i]=L.useState({isDirty:!1,isValidating:!1,isLoading:gr(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:gr(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={..._N(e),formState:r});const s=t.current.control;return s._options=e,cN({subject:s._subjects.state,next:l=>{lN(l,s._proxyFormState,s._updateFormState)&&i({...s._formState})}}),L.useEffect(()=>s._disableForm(e.disabled),[s,e.disabled]),L.useEffect(()=>{if(s._proxyFormState.isDirty){const l=s._getDirty();l!==r.isDirty&&s._subjects.state.next({isDirty:l})}},[s,r.isDirty]),L.useEffect(()=>{e.values&&!Zr(e.values,n.current)?(s._reset(e.values,s._options.resetOptions),n.current=e.values,i(l=>({...l}))):s._resetDefaultValues()},[e.values,s]),L.useEffect(()=>{e.errors&&s._setErrors(e.errors)},[e.errors,s]),L.useEffect(()=>{s._state.mount||(s._updateValid(),s._state.mount=!0),s._state.watch&&(s._state.watch=!1,s._subjects.state.next({...s._formState})),s._removeUnmounted()}),L.useEffect(()=>{e.shouldUnregister&&s._subjects.values.next({values:s._getWatch()})},[e.shouldUnregister,s]),L.useMemo(()=>({...t.current,formState:sN(r,s)}),[r,s])}const Oy=({className:e,children:t,content:n,side:r})=>{const[i,s]=L.useState(!1);return d.jsx(Yr,{delayDuration:0,children:d.jsxs(Xr,{open:i,children:[d.jsx(Jr,{asChild:!0,children:d.jsx("button",{type:"button",className:Ve("cursor-pointer",e),onClick:()=>s(!i),onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),onTouchStart:()=>s(!i),onKeyDown:l=>{l.preventDefault(),l.key==="Enter"&&s(!i)},children:t})}),d.jsx(Tr,{side:r,className:n?"":"hidden",children:d.jsx("span",{className:"inline-block",children:n})})]})})},CN=(e,t)=>{const[n,r]=L.useState(e);return L.useEffect(()=>{const i=setTimeout(()=>{r(e)},t);return()=>{clearTimeout(i)}},[e,t]),n},EN=({apiBaseUrl:e="https://s3-explorer.cmcts1.studio.ai.vn"})=>{var V,W;const[t,n]=L.useState([]),[r,i]=L.useState(!1),[s,l]=L.useState([]),[u,g]=L.useState(1),[f,h]=L.useState(1),[y,x]=L.useState(null),[m,w]=L.useState(""),_=CN(m,500),S=B=>{const ee=B.match(/\d{6}/);if(!ee)return{month:"",year:""};const H=ee[0],ce=H.substring(0,2),ie=H.substring(2);return{month:ce,year:ie}},A=B=>B.map(H=>{let ce=(H==null?void 0:H.month)||"",ie=(H==null?void 0:H.year)||"";if((!ce||!ie)&&(H!=null&&H.file_name)){const he=S(H.file_name);ce=ce||he.month,ie=ie||he.year}return{id:H==null?void 0:H.id,prefix:(H==null?void 0:H.prefix)||"",model:(H==null?void 0:H.model)||"",fileName:(H==null?void 0:H.file_name)||"",code:(H==null?void 0:H.stock_id)||"",month:ce,year:ie,content:(H==null?void 0:H.text_summary)||"",status:(H==null?void 0:H.status)||"",note:(H==null?void 0:H.note)||"",lastUpdate:H==null?void 0:H.updated_at,stock_id:H==null?void 0:H.stock_id}}),P=B=>{if(!(B!=null&&B.data))return[];const ee=A(B==null?void 0:B.data);n(ee),h(B.pagination.totalPages)},N=async(B=1,ee=15)=>{x(B),i(!0);try{const H=await $e.get(`${e}/api/latest-summaries`,{params:{page:B,limit:ee,search:m}});(H==null?void 0:H.status)===200?P(H.data):console.error(H)}catch(H){console.error("Error fetching data:",H)}finally{x(null),i(!1)}};L.useEffect(()=>{_&&g(1),N(u)},[u,_]);const D=L.useMemo(()=>[{id:"code",header:"Mã",accessorKey:"code",cell:({row:ee})=>d.jsx("span",{className:"flex flex-col",children:ee.original.code})},{id:"month",header:"Tháng",accessorKey:"month",cell:({row:ee})=>{const H=ee.original.month,ce=ee.original.year;return d.jsx("span",{className:"flex flex-col",children:`${H.toString().padStart(2,"0")}/${ce}`})}},{id:"content",header:"Nội dung",accessorKey:"content",cell:({row:ee})=>{const H=ee.getValue("content");return d.jsx("div",{className:"text-start truncate text-ellipsis overflow-hidden whitespace-nowrap max-w-[30dvw]",children:H})}},{id:"status",header:"Trạng thái",accessorKey:"status",cell:({row:ee})=>{const ce=ee.original.status!=="unpublish";return d.jsx("span",{className:`inline-flex items-center rounded-full px-2 py-0 text-[10px] font-bold ${ce?"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:ce?"PUBLISHED":"UNPUBLISHED"})}},{id:"note",header:"Ghi chú",accessorKey:"note",cell:({row:ee})=>d.jsx(Oy,{content:d.jsx("div",{className:"font-medium text-[16px] max-w-[90dvw]",children:ee.original.note}),children:d.jsx("div",{className:"text-start truncate text-ellipsis overflow-hidden whitespace-nowrap max-w-[20dvw]",children:ee.original.note})})},{id:"last-update",header:"Cập nhật",accessorKey:"last-update",cell:({row:ee})=>{const H=new Date(ee.original.lastUpdate),ce=H.getDate(),ie=H.getMonth()+1,he=`ngày ${ce} tháng ${ie}`;return d.jsx("span",{className:"flex flex-col",children:he})}},{accessorKey:"actions",header:()=>d.jsx("div",{className:"font-medium text-right",children:"Hành động"}),cell:({row:ee})=>{const[H,ce]=L.useState(!1),[ie,he]=L.useState(!1),[U,K]=L.useState(!1),{handleSubmit:G,register:te,reset:Y}=SN(),J=ee.original.id,M=ee.getValue("status"),Q=ee.getValue("content"),[ve,xe]=L.useState(!1),ye=async()=>{try{xe(!0);const we=M==="unpublish"?"published":"unpublish",Ee=await $e.patch(`${e}/api/toggle-publish/${J}`,{id:J,typeAction:"update",status:M,idInput:J,stock_id:ee.original.stock_id,prefix:ee.original.prefix,model:ee.original.model,summary_result:ee.original.content,note:ee.original.note});Ee.status===200?n(Pe=>Pe.map(Ne=>Ne.id===J?{...Ne,status:we}:Ne)):console.error("Failed to toggle publish status:",Ee)}catch(we){console.error("Error toggling publish status:",we)}finally{xe(!1)}},Se=async we=>{ce(!0);try{const Ee=await $e.patch(`${e}/api/update-summary`,{note:we.note,text_summary:we.content,id:J});Ee.status===200?(await N(u),he(!1)):console.error("Failed to update summary:",Ee)}catch(Ee){console.error("Error updating summary:",Ee)}return ce(!1)};return d.jsxs("div",{className:"flex items-center justify-end gap-2",children:[d.jsx(Ue,{variant:"outline",size:"sm",onClick:()=>K(!0),className:"px-2 py-0.5 h-7",children:d.jsx(D_,{className:"h-4 w-4"})}),d.jsx(_r,{open:U,onOpenChange:K,children:d.jsxs(or,{className:"max-w-3xl max-h-[80vh]",children:[d.jsx(ir,{children:d.jsx(ar,{children:"Nội dung chi tiết"})}),d.jsx("div",{className:"mt-4 overflow-y-auto max-h-[60vh]",children:d.jsx("div",{className:"whitespace-pre-wrap text-[16px] leading-relaxed",children:Q})})]})}),d.jsxs(_r,{open:ie,onOpenChange:we=>{he(we),we?Y({content:ee.original.content,note:ee.original.note}):Y()},children:[d.jsx(Qa,{asChild:!0,children:d.jsx(Ue,{variant:"outline",size:"sm",onClick:()=>he(!0),className:"px-2 py-0.5 h-7",children:"Sửa"})}),d.jsx(or,{className:"rounded-lg sm:px-3 h-[calc(100dvh-200px)] min-w-[calc(100dvw-112px)]",children:d.jsxs(ir,{className:"flex flex-col gap-3",children:[d.jsx(ar,{className:"max-sm:hidden text-center",children:"Sửa summary"}),d.jsxs("form",{className:"flex flex-col gap-3 h-full justify-between",onSubmit:G(Se),children:[d.jsxs("div",{className:"flex flex-col gap-2",children:[d.jsxs("div",{className:"flex flex-col items-start",children:[d.jsx("span",{children:"Nội dung:"}),d.jsx(Ui,{placeholder:"Nội dung",className:"w-full input-scroll-bar",defaultValue:ee.original.answer||"",rows:10,...te("content")})]}),d.jsxs("div",{className:"flex flex-col items-start",children:[d.jsx("span",{children:"Ghi chú:"}),d.jsx(Ui,{placeholder:"Nội dung",className:"w-full input-scroll-bar",defaultValue:ee.original.note||"",rows:1,...te("note")})]})]}),d.jsx("div",{className:"flex justify-end",children:d.jsx(Ue,{disabled:H,type:"submit",variant:"default",children:H?d.jsx(Ot,{className:"h-4 w-4 animate-spin"}):"Ok"})})]})]})})]}),d.jsx(Ue,{variant:"outline",size:"sm",onClick:ye,disabled:ve,className:"w-[70px] px-2 py-0.5 h-7",children:ve?d.jsx(Ot,{className:"h-4 w-4 animate-spin"}):M==="unpublish"?"Publish":"Unpublish"})]})}}],[]),E=Qf({data:t,columns:D,state:{columnFilters:s},enableRowSelection:!0,onColumnFiltersChange:l,getFilteredRowModel:Mb(),getCoreRowModel:Zf()});return d.jsxs("div",{className:"space-y-4 s3-explr-container",children:[d.jsx("div",{className:"flex items-center space-x-4 s3-explr-toolbar",children:d.jsxs("div",{className:"relative max-w-sm",children:[d.jsx(Hr,{placeholder:"Tìm kiếm theo mã...",value:m,onChange:B=>w(B.target.value),className:"pr-8"}),m&&d.jsx(Ue,{variant:"ghost",size:"sm",className:"absolute right-1 top-1/2 -translate-y-1/2 h-6 w-6 p-0",onClick:()=>w(""),children:d.jsx(Tc,{className:"h-4 w-4"})})]})}),d.jsx("div",{className:"rounded-md border s3-explr-table-container",children:d.jsxs(is,{className:"s3-explr-table",children:[d.jsx(as,{className:"s3-explr-table-header",children:E.getHeaderGroups().map(B=>d.jsx(jn,{className:"hover:bg-transparent s3-explr-header-row",children:B.headers.map(ee=>d.jsx(sr,{className:"s3-explr-header-cell",children:ee.isPlaceholder?null:Aa(ee.column.columnDef.header,ee.getContext())},ee.id))},B.id))}),d.jsx(ss,{className:"s3-explr-table-body",children:r?d.jsx(jn,{children:d.jsx(tn,{colSpan:D.length,className:"h-24 text-center",children:"Đang tải dữ liệu..."})}):(V=E.getRowModel().rows)!=null&&V.length?(W=E.getRowModel().rows)==null?void 0:W.map(B=>d.jsx(jn,{className:"h-12 s3-explr-row",children:B.getVisibleCells().map(ee=>d.jsx(tn,{className:"align-middle s3-explr-cell",children:Aa(ee.column.columnDef.cell,ee.getContext())},ee.id))},B.id)):d.jsx(jn,{children:d.jsx(tn,{colSpan:D.length,className:"h-24 text-center",children:"Không có kết quả."})})})]})}),d.jsx("div",{className:"mt-4",children:d.jsx(es,{children:d.jsxs(ts,{children:[d.jsx(Un,{children:d.jsx(ns,{onClick:()=>g(B=>Math.max(1,B-1)),className:u===1?"pointer-events-none opacity-50":"cursor-pointer"})}),Array.from({length:f},(B,ee)=>ee+1).filter(B=>B===1||B===f||Math.abs(B-u)<=1).map((B,ee,H)=>d.jsxs(d.Fragment,{children:[ee>0&&H[ee-1]!==B-1&&d.jsx(Un,{children:d.jsx(os,{})},B+"..."),d.jsx(Un,{children:d.jsx(oi,{onClick:()=>g(B),isActive:u===B,className:`cursor-pointer ${r?"pointer-events-none":""}`,children:y===B?d.jsx(Ot,{className:"h-4 w-4 animate-spin"}):B})},B)]})),d.jsx(Un,{children:d.jsx(rs,{onClick:()=>g(B=>Math.min(f,B+1)),className:u===f||y!==null?"pointer-events-none opacity-50":"cursor-pointer"})})]})})})]})},Ny=10,TN=L.memo(({apiBaseUrl:e="https://s3-explorer.cmcts1.studio.ai.vn"})=>{const[t,n]=L.useState(1),[r,i]=L.useState([]),[s,l]=L.useState({total:0,page:1,limit:Ny,totalPages:1}),[u,g]=L.useState(!0),[f,h]=L.useState(null),[y,x]=L.useState(new Set),{toast:m}=ys(),[w,_]=L.useState(!1),S=async E=>{try{h(E);const V=await $e.get(`${e}/api/jobs`,{params:{page:E.toString(),limit:Ny.toString()}});i(V.data.data),l(V.data.pagination)}catch{m({variant:"destructive",title:"Error",description:"Failed to fetch jobs. Please try again."})}finally{h(null),g(!1)}};L.useEffect(()=>{S(t)},[t,e]);const A=async E=>{x(V=>new Set(V).add(E.toString()));try{await $e.post(`${e}/api/retry-job`,{jobId:E}),m({title:"Job Restarted",description:`Job ${E} has been successfully restarted.`}),S(t)}catch{m({variant:"destructive",title:"Retry Failed",description:`Failed to restart job ${E}. Please try again.`})}finally{x(V=>{const W=new Set(V);return W.delete(E.toString()),W})}},P=async()=>{_(!0),n(1),await S(1),_(!1)},N=E=>new Date(E).toLocaleString(),D=E=>{if(E=parseFloat(E),E<60)return`${E.toFixed(2)}s`;const V=Math.floor(E/60),W=(E%60).toFixed(0);return`${V}m ${W}s`};return d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[d.jsx(P_,{className:"w-8 h-8 text-primary"}),d.jsx("h2",{className:"text-3xl font-bold tracking-tight",children:"Job Management"}),d.jsx(Ue,{variant:"outline",size:"icon",onClick:P,disabled:w||u,className:"ml-2",children:d.jsx(L_,{className:`h-4 w-4 ${w?"animate-spin":""}`})})]}),d.jsx("div",{className:"rounded-md border",children:d.jsxs(is,{children:[d.jsx(as,{children:d.jsxs(jn,{children:[d.jsx(sr,{children:"ID"}),d.jsx(sr,{children:"Tên Công Việc"}),d.jsx(sr,{children:"Thời Gian Bắt Đầu"}),d.jsx(sr,{children:"Thời Gian Cập Nhật"}),d.jsx(sr,{children:"Thời Gian Thực Thi"}),d.jsx(sr,{children:"Trạng Thái"}),d.jsx(sr,{children:"Thao Tác"})]})}),d.jsx(ss,{children:u&&r.length===0?d.jsx(jn,{children:d.jsx(tn,{colSpan:7,className:"text-center py-4",children:d.jsx(Ot,{className:"w-6 h-6 animate-spin mx-auto"})})}):r.map(E=>{var V,W;return d.jsxs(jn,{children:[d.jsx(tn,{className:"!w-[100px]",children:E.id}),d.jsx(tn,{className:"font-medium",children:(V=E.job_name)==null?void 0:V.replace("Upload file","Summary")}),d.jsx(tn,{className:"!w-[200px]",children:N(E.created_at)}),d.jsx(tn,{className:"!w-[200px]",children:N(E.updated_at)}),d.jsx(tn,{className:"!w-[150px]",children:D(E.execution_time_seconds)}),d.jsx(tn,{className:"!w-[200px]",children:d.jsx(Oy,{content:E.status==="fail"&&E.error?d.jsx("div",{className:"font-medium text-[16px] max-w-[90dvw]",children:E.error}):null,children:d.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]
|
|
202
|
+
${E.status==="done"?"bg-green-100 text-green-800":E.status==="fail"?"bg-red-100 text-red-800":"bg-yellow-100 text-yellow-800"}`,children:E.status==="fail"?"FAILED":(W=E.status)==null?void 0:W.toUpperCase()})})}),d.jsx(tn,{className:"!w-[200px]",children:E.status==="fail"?d.jsx(Ue,{variant:"outline",size:"sm",onClick:()=>A(E.id),disabled:y.has(E.id.toString()),className:"h-[32px]",children:y.has(E.id.toString())?d.jsxs(d.Fragment,{children:[d.jsx(Ot,{className:"mr-2 h-4 w-4 animate-spin"}),"Đang thử lại..."]}):"Thử Lại"}):d.jsx("div",{className:"h-[32px]"})})]},E.id)})})]})}),d.jsx("div",{className:"mt-4",children:d.jsx(es,{children:d.jsxs(ts,{children:[d.jsx(Un,{children:d.jsx(ns,{onClick:()=>n(E=>Math.max(1,E-1)),className:t===1?"pointer-events-none opacity-50":"cursor-pointer"})}),Array.from({length:s.totalPages},(E,V)=>V+1).filter(E=>E===1||E===s.totalPages||Math.abs(E-t)<=1).map((E,V,W)=>d.jsxs(d.Fragment,{children:[V>0&&W[V-1]!==E-1&&d.jsx(Un,{children:d.jsx(os,{})},E+"..."),d.jsx(Un,{children:d.jsx(oi,{onClick:()=>n(E),isActive:t===E,className:`cursor-pointer ${f!==null?"pointer-events-none":""}`,children:f===E?d.jsx(Ot,{className:"h-4 w-4 animate-spin"}):E})},E)]})),d.jsx(Un,{children:d.jsx(rs,{onClick:()=>n(E=>Math.min(s.totalPages,E+1)),className:t===s.totalPages||f!==null?"pointer-events-none opacity-50":"cursor-pointer"})})]})})}),d.jsx(Sm,{})]})});Rn.Job=TN,Rn.S3Explorer=nN,Rn.Summary=EN,Object.defineProperty(Rn,Symbol.toStringTag,{value:"Module"})});
|
|
177
203
|
//# sourceMappingURL=s3-explorer.umd.cjs.map
|