dccxx-s3-explorer 1.0.89 → 1.0.91
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.umd.cjs
CHANGED
|
@@ -201,7 +201,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
201
201
|
* This source code is licensed under the ISC license.
|
|
202
202
|
* See the LICENSE file in the root directory of this source tree.
|
|
203
203
|
*/const lg=Sn("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Bx(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(n=Bx(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function zx(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=Bx(t))&&(r&&(r+=" "),r+=e);return r}function WD(t){if(typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",e.firstChild?e.insertBefore(n,e.firstChild):e.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}WD(`: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)}}
|
|
204
|
-
`);var dg=t=>typeof t=="number"&&!isNaN(t),oc=t=>typeof t=="string",Vx=t=>typeof t=="function",qD=t=>oc(t)||dg(t),YD=t=>M.isValidElement(t)||oc(t)||Vx(t)||dg(t),JD=1,Kx=()=>`${JD++}`,ho=new Map,ug=[],Gx=new Set,jx=()=>ho.size>0,QD=(t,{containerId:e})=>{var n;return(n=ho.get(e||1))==null?void 0:n.toasts.get(t)};function XD(t,e){var n;if(e)return!!((n=ho.get(e))!=null&&n.isToastActive(t));let r=!1;return ho.forEach(o=>{o.isToastActive(t)&&(r=!0)}),r}function ZD(t){if(!jx()){ug=ug.filter(e=>t!=null&&e.options.toastId!==t);return}if(t==null||qD(t))ho.forEach(e=>{e.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){let e=ho.get(t.containerId);e?e.removeToast(t.id):ho.forEach(n=>{n.removeToast(t.id)})}}var eL=(t={})=>{ho.forEach(e=>{e.props.limit&&(!t.containerId||e.id===t.containerId)&&e.clearQueue()})};function tL(t,e){YD(t)&&(jx()||ug.push({content:t,options:e}),ho.forEach(n=>{n.buildToast(t,e)}))}function Wx(t,e){ho.forEach(n=>{(e==null||!(e!=null&&e.containerId)||(e==null?void 0:e.containerId)===n.id)&&n.toggle(t,e==null?void 0:e.id)})}function nL(t){return Gx.add(t),()=>{Gx.delete(t)}}function rL(t){return t&&(oc(t.toastId)||dg(t.toastId))?t.toastId:Kx()}function ic(t,e){return tL(t,e),e.toastId}function Vd(t,e){return{...e,type:e&&e.type||t,toastId:rL(e)}}function Kd(t){return(e,n)=>ic(e,Vd(t,n))}function st(t,e){return ic(t,Vd("default",e))}st.loading=(t,e)=>ic(t,Vd("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...e}));function oL(t,{pending:e,error:n,success:r},o){let a;e&&(a=oc(e)?st.loading(e,o):st.loading(e.render,{...o,...e}));let s={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},l=(h,p,g)=>{if(p==null){st.dismiss(a);return}let w={type:h,...s,...o,data:g},y=oc(p)?{render:p}:p;return a?st.update(a,{...w,...y}):st(y.render,{...w,...y}),g},u=Vx(t)?t():t;return u.then(h=>l("success",r,h)).catch(h=>l("error",n,h)),u}st.promise=oL,st.success=Kd("success"),st.info=Kd("info"),st.error=Kd("error"),st.warning=Kd("warning"),st.warn=st.warning,st.dark=(t,e)=>ic(t,Vd("default",{theme:"dark",...e}));function iL(t){ZD(t)}st.dismiss=iL,st.clearWaitingQueue=eL,st.isActive=XD,st.update=(t,e={})=>{let n=QD(t,e);if(n){let{props:r,content:o}=n,a={delay:100,...r,...e,toastId:e.toastId||t,updateId:Kx()};a.toastId!==t&&(a.staleId=t);let s=a.render||o;delete a.render,ic(s,a)}},st.done=t=>{st.update(t,{progress:1})},st.onChange=nL,st.play=t=>Wx(!0,t),st.pause=t=>Wx(!1,t);const aL={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"},sL=t=>t==="SummaryOfSuggestedAI"||t==="KeywordAISuggestion"||t==="SuggestedAICategories",fg=t=>t==="fullPath"||t==="createAt"||t==="creator"||t==="creatorId"||t==="DataSource"||t==="AccessLevel"||t==="category"||t==="fileName",cL={STARTING:"Đang bắt đầu",IN_PROGRESS:"Đang đồng bộ",COMPLETE:"Đồng bộ thành công",FAILED:"Đồng bộ thất bại",STOPPING:"Đang dừng",STOPPED:"Đã dừng"},lL=t=>cL[t]||t;function mi(t){const e=dL(t),n=C.forwardRef((r,o)=>{const{children:a,...s}=r,l=C.Children.toArray(a),u=l.find(fL);if(u){const h=u.props.children,p=l.map(g=>g===u?C.Children.count(h)>1?C.Children.only(null):C.isValidElement(h)?h.props.children:null:g);return d.jsx(e,{...s,ref:o,children:C.isValidElement(h)?C.cloneElement(h,void 0,p):null})}return d.jsx(e,{...s,ref:o,children:a})});return n.displayName=`${t}.Slot`,n}var qx=mi("Slot");function dL(t){const e=C.forwardRef((n,r)=>{const{children:o,...a}=n;if(C.isValidElement(o)){const s=pL(o),l=hL(a,o.props);return o.type!==C.Fragment&&(l.ref=r?FC(r,s):s),C.cloneElement(o,l)}return C.Children.count(o)>1?C.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var uL=Symbol("radix.slottable");function fL(t){return C.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===uL}function hL(t,e){const n={...e};for(const r in e){const o=t[r],a=e[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...l)=>{const u=a(...l);return o(...l),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...t,...n}}function pL(t){var r,o;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(o=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:o.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}const hg="-",gL=t=>{const e=vL(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:s=>{const l=s.split(hg);return l[0]===""&&l.length!==1&&l.shift(),Yx(l,e)||mL(s)},getConflictingClassGroupIds:(s,l)=>{const u=n[s]||[];return l&&r[s]?[...u,...r[s]]:u}}},Yx=(t,e)=>{var s;if(t.length===0)return e.classGroupId;const n=t[0],r=e.nextPart.get(n),o=r?Yx(t.slice(1),r):void 0;if(o)return o;if(e.validators.length===0)return;const a=t.join(hg);return(s=e.validators.find(({validator:l})=>l(a)))==null?void 0:s.classGroupId},Jx=/^\[(.+)\]$/,mL=t=>{if(Jx.test(t)){const e=Jx.exec(t)[1],n=e==null?void 0:e.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},vL=t=>{const{theme:e,prefix:n}=t,r={nextPart:new Map,validators:[]};return wL(Object.entries(t.classGroups),n).forEach(([a,s])=>{pg(s,r,a,e)}),r},pg=(t,e,n,r)=>{t.forEach(o=>{if(typeof o=="string"){const a=o===""?e:Qx(e,o);a.classGroupId=n;return}if(typeof o=="function"){if(yL(o)){pg(o(r),e,n,r);return}e.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([a,s])=>{pg(s,Qx(e,a),n,r)})})},Qx=(t,e)=>{let n=t;return e.split(hg).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},yL=t=>t.isThemeGetter,wL=(t,e)=>e?t.map(([n,r])=>{const o=r.map(a=>typeof a=="string"?e+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([s,l])=>[e+s,l])):a);return[n,o]}):t,CL=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,r=new Map;const o=(a,s)=>{n.set(a,s),e++,e>t&&(e=0,r=n,n=new Map)};return{get(a){let s=n.get(a);if(s!==void 0)return s;if((s=r.get(a))!==void 0)return o(a,s),s},set(a,s){n.has(a)?n.set(a,s):o(a,s)}}},Xx="!",bL=t=>{const{separator:e,experimentalParseClassName:n}=t,r=e.length===1,o=e[0],a=e.length,s=l=>{const u=[];let h=0,p=0,g;for(let b=0;b<l.length;b++){let E=l[b];if(h===0){if(E===o&&(r||l.slice(b,b+a)===e)){u.push(l.slice(p,b)),p=b+a;continue}if(E==="/"){g=b;continue}}E==="["?h++:E==="]"&&h--}const w=u.length===0?l:l.substring(p),y=w.startsWith(Xx),x=y?w.substring(1):w,v=g&&g>p?g-p:void 0;return{modifiers:u,hasImportantModifier:y,baseClassName:x,maybePostfixModifierPosition:v}};return n?l=>n({className:l,parseClassName:s}):s},xL=t=>{if(t.length<=1)return t;const e=[];let n=[];return t.forEach(r=>{r[0]==="["?(e.push(...n.sort(),r),n=[]):n.push(r)}),e.push(...n.sort()),e},SL=t=>({cache:CL(t.cacheSize),parseClassName:bL(t),...gL(t)}),_L=/\s+/,EL=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=e,a=[],s=t.trim().split(_L);let l="";for(let u=s.length-1;u>=0;u-=1){const h=s[u],{modifiers:p,hasImportantModifier:g,baseClassName:w,maybePostfixModifierPosition:y}=n(h);let x=!!y,v=r(x?w.substring(0,y):w);if(!v){if(!x){l=h+(l.length>0?" "+l:l);continue}if(v=r(w),!v){l=h+(l.length>0?" "+l:l);continue}x=!1}const b=xL(p).join(":"),E=g?b+Xx:b,T=E+v;if(a.includes(T))continue;a.push(T);const N=o(v,x);for(let P=0;P<N.length;++P){const _=N[P];a.push(E+_)}l=h+(l.length>0?" "+l:l)}return l};function TL(){let t=0,e,n,r="";for(;t<arguments.length;)(e=arguments[t++])&&(n=Zx(e))&&(r&&(r+=" "),r+=n);return r}const Zx=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=Zx(t[r]))&&(n&&(n+=" "),n+=e);return n};function AL(t,...e){let n,r,o,a=s;function s(u){const h=e.reduce((p,g)=>g(p),t());return n=SL(h),r=n.cache.get,o=n.cache.set,a=l,l(u)}function l(u){const h=r(u);if(h)return h;const p=EL(u,n);return o(u,p),p}return function(){return a(TL.apply(null,arguments))}}const Ft=t=>{const e=n=>n[t]||[];return e.isThemeGetter=!0,e},eS=/^\[(?:([a-z-]+):)?(.+)\]$/i,IL=/^\d+\/\d+$/,kL=new Set(["px","full","screen"]),NL=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,PL=/\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$/,OL=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,ML=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,RL=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Fo=t=>Ja(t)||kL.has(t)||IL.test(t),vi=t=>Qa(t,"length",zL),Ja=t=>!!t&&!Number.isNaN(Number(t)),gg=t=>Qa(t,"number",Ja),ac=t=>!!t&&Number.isInteger(Number(t)),DL=t=>t.endsWith("%")&&Ja(t.slice(0,-1)),ot=t=>eS.test(t),yi=t=>NL.test(t),LL=new Set(["length","size","percentage"]),FL=t=>Qa(t,LL,tS),$L=t=>Qa(t,"position",tS),HL=new Set(["image","url"]),UL=t=>Qa(t,HL,KL),BL=t=>Qa(t,"",VL),sc=()=>!0,Qa=(t,e,n)=>{const r=eS.exec(t);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):n(r[2]):!1},zL=t=>PL.test(t)&&!OL.test(t),tS=()=>!1,VL=t=>ML.test(t),KL=t=>RL.test(t),GL=AL(()=>{const t=Ft("colors"),e=Ft("spacing"),n=Ft("blur"),r=Ft("brightness"),o=Ft("borderColor"),a=Ft("borderRadius"),s=Ft("borderSpacing"),l=Ft("borderWidth"),u=Ft("contrast"),h=Ft("grayscale"),p=Ft("hueRotate"),g=Ft("invert"),w=Ft("gap"),y=Ft("gradientColorStops"),x=Ft("gradientColorStopPositions"),v=Ft("inset"),b=Ft("margin"),E=Ft("opacity"),T=Ft("padding"),N=Ft("saturate"),P=Ft("scale"),_=Ft("sepia"),D=Ft("skew"),H=Ft("space"),K=Ft("translate"),ee=()=>["auto","contain","none"],W=()=>["auto","hidden","clip","visible","scroll"],de=()=>["auto",ot,e],se=()=>[ot,e],fe=()=>["",Fo,vi],q=()=>["auto",Ja,ot],Z=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Y=()=>["solid","dashed","dotted","double","none"],oe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Q=()=>["start","end","center","between","around","evenly","stretch"],X=()=>["","0",ot],$=()=>["auto","avoid","all","avoid-page","page","left","right","column"],te=()=>[Ja,ot];return{cacheSize:500,separator:":",theme:{colors:[sc],spacing:[Fo,vi],blur:["none","",yi,ot],brightness:te(),borderColor:[t],borderRadius:["none","","full",yi,ot],borderSpacing:se(),borderWidth:fe(),contrast:te(),grayscale:X(),hueRotate:te(),invert:X(),gap:se(),gradientColorStops:[t],gradientColorStopPositions:[DL,vi],inset:de(),margin:de(),opacity:te(),padding:se(),saturate:te(),scale:te(),sepia:X(),skew:te(),space:se(),translate:se()},classGroups:{aspect:[{aspect:["auto","square","video",ot]}],container:["container"],columns:[{columns:[yi]}],"break-after":[{"break-after":$()}],"break-before":[{"break-before":$()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Z(),ot]}],overflow:[{overflow:W()}],"overflow-x":[{"overflow-x":W()}],"overflow-y":[{"overflow-y":W()}],overscroll:[{overscroll:ee()}],"overscroll-x":[{"overscroll-x":ee()}],"overscroll-y":[{"overscroll-y":ee()}],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",ac,ot]}],basis:[{basis:de()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ot]}],grow:[{grow:X()}],shrink:[{shrink:X()}],order:[{order:["first","last","none",ac,ot]}],"grid-cols":[{"grid-cols":[sc]}],"col-start-end":[{col:["auto",{span:["full",ac,ot]},ot]}],"col-start":[{"col-start":q()}],"col-end":[{"col-end":q()}],"grid-rows":[{"grid-rows":[sc]}],"row-start-end":[{row:["auto",{span:[ac,ot]},ot]}],"row-start":[{"row-start":q()}],"row-end":[{"row-end":q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ot]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ot]}],gap:[{gap:[w]}],"gap-x":[{"gap-x":[w]}],"gap-y":[{"gap-y":[w]}],"justify-content":[{justify:["normal",...Q()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Q(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Q(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[T]}],px:[{px:[T]}],py:[{py:[T]}],ps:[{ps:[T]}],pe:[{pe:[T]}],pt:[{pt:[T]}],pr:[{pr:[T]}],pb:[{pb:[T]}],pl:[{pl:[T]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[H]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[H]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ot,e]}],"min-w":[{"min-w":[ot,e,"min","max","fit"]}],"max-w":[{"max-w":[ot,e,"none","full","min","max","fit","prose",{screen:[yi]},yi]}],h:[{h:[ot,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ot,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ot,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ot,e,"auto","min","max","fit"]}],"font-size":[{text:["base",yi,vi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",gg]}],"font-family":[{font:[sc]}],"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",ot]}],"line-clamp":[{"line-clamp":["none",Ja,gg]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Fo,ot]}],"list-image":[{"list-image":["none",ot]}],"list-style-type":[{list:["none","disc","decimal",ot]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[E]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[E]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Y(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Fo,vi]}],"underline-offset":[{"underline-offset":["auto",Fo,ot]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:se()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ot]}],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",ot]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[E]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Z(),$L]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",FL]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},UL]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[y]}],"gradient-via":[{via:[y]}],"gradient-to":[{to:[y]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[E]}],"border-style":[{border:[...Y(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[E]}],"divide-style":[{divide:Y()}],"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:["",...Y()]}],"outline-offset":[{"outline-offset":[Fo,ot]}],"outline-w":[{outline:[Fo,vi]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:fe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[E]}],"ring-offset-w":[{"ring-offset":[Fo,vi]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",yi,BL]}],"shadow-color":[{shadow:[sc]}],opacity:[{opacity:[E]}],"mix-blend":[{"mix-blend":[...oe(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":oe()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",yi,ot]}],grayscale:[{grayscale:[h]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[g]}],saturate:[{saturate:[N]}],sepia:[{sepia:[_]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[h]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[E]}],"backdrop-saturate":[{"backdrop-saturate":[N]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ot]}],duration:[{duration:te()}],ease:[{ease:["linear","in","out","in-out",ot]}],delay:[{delay:te()}],animate:[{animate:["none","spin","ping","pulse","bounce",ot]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[P]}],"scale-x":[{"scale-x":[P]}],"scale-y":[{"scale-y":[P]}],rotate:[{rotate:[ac,ot]}],"translate-x":[{"translate-x":[K]}],"translate-y":[{"translate-y":[K]}],"skew-x":[{"skew-x":[D]}],"skew-y":[{"skew-y":[D]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ot]}],accent:[{accent:["auto",t]}],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",ot]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":se()}],"scroll-mx":[{"scroll-mx":se()}],"scroll-my":[{"scroll-my":se()}],"scroll-ms":[{"scroll-ms":se()}],"scroll-me":[{"scroll-me":se()}],"scroll-mt":[{"scroll-mt":se()}],"scroll-mr":[{"scroll-mr":se()}],"scroll-mb":[{"scroll-mb":se()}],"scroll-ml":[{"scroll-ml":se()}],"scroll-p":[{"scroll-p":se()}],"scroll-px":[{"scroll-px":se()}],"scroll-py":[{"scroll-py":se()}],"scroll-ps":[{"scroll-ps":se()}],"scroll-pe":[{"scroll-pe":se()}],"scroll-pt":[{"scroll-pt":se()}],"scroll-pr":[{"scroll-pr":se()}],"scroll-pb":[{"scroll-pb":se()}],"scroll-pl":[{"scroll-pl":se()}],"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",ot]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[Fo,vi,gg]}],stroke:[{stroke:[t,"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 ze(...t){return GL(zx(t))}function qi(){let t=localStorage.getItem("dataLogin"),e;try{t&&(t=JSON.parse(t),e=t.user)}catch(n){console.error("Error parsing dataLogin from localStorage:",n),t=null}return e}const Gd=C.forwardRef(({className:t,...e},n)=>d.jsx("nav",{ref:n,"aria-label":"breadcrumb",className:ze("s3-explr-ui-breadcrumb",t),...e}));Gd.displayName="Breadcrumb";const jd=C.forwardRef(({className:t,...e},n)=>d.jsx("ol",{ref:n,className:ze("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5","s3-explr-ui-breadcrumb-list",t),...e}));jd.displayName="BreadcrumbList";const cc=C.forwardRef(({className:t,...e},n)=>d.jsx("li",{ref:n,className:ze("inline-flex items-center gap-1.5","s3-explr-ui-breadcrumb-item",t),...e}));cc.displayName="BreadcrumbItem";const lc=C.forwardRef(({asChild:t,className:e,...n},r)=>{const o=t?qx:"a";return d.jsx(o,{ref:r,className:ze("transition-colors hover:text-foreground","s3-explr-ui-breadcrumb-link",e),...n})});lc.displayName="BreadcrumbLink";const jL=C.forwardRef(({className:t,...e},n)=>d.jsx("span",{ref:n,role:"link","aria-disabled":"true","aria-current":"page",className:ze("font-normal text-foreground","s3-explr-ui-breadcrumb-page",t),...e}));jL.displayName="BreadcrumbPage";const Wd=({children:t,className:e,...n})=>d.jsx("li",{role:"presentation","aria-hidden":"true",className:ze("[&>svg]:w-3.5 [&>svg]:h-3.5","s3-explr-ui-breadcrumb-separator",e),...n,children:t??d.jsx(Hx,{})});Wd.displayName="BreadcrumbSeparator";const nS=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,rS=zx,mg=(t,e)=>n=>{var r;if((e==null?void 0:e.variants)==null)return rS(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:a}=e,s=Object.keys(o).map(h=>{const p=n==null?void 0:n[h],g=a==null?void 0:a[h];if(p===null)return null;const w=nS(p)||nS(g);return o[h][w]}),l=n&&Object.entries(n).reduce((h,p)=>{let[g,w]=p;return w===void 0||(h[g]=w),h},{}),u=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((h,p)=>{let{class:g,className:w,...y}=p;return Object.entries(y).every(x=>{let[v,b]=x;return Array.isArray(b)?b.includes({...a,...l}[v]):{...a,...l}[v]===b})?[...h,g,w]:h},[]);return rS(t,s,u,n==null?void 0:n.class,n==null?void 0:n.className)},oS=mg("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"}}),He=C.forwardRef(({className:t,variant:e,size:n,asChild:r=!1,...o},a)=>{const s=r?qx:"button";return d.jsx(s,{className:ze(oS({variant:e,size:n,className:t})),ref:a,...o})});He.displayName="Button";function iS(t){const e=C.useRef({value:t,previous:t});return C.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}function vg(t){const[e,n]=C.useState(void 0);return tn(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let s,l;if("borderBoxSize"in a){const u=a.borderBoxSize,h=Array.isArray(u)?u[0]:u;s=h.inlineSize,l=h.blockSize}else s=t.offsetWidth,l=t.offsetHeight;n({width:s,height:l})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else n(void 0)},[t]),e}var qd="Checkbox",[WL,$j]=gr(qd),[qL,yg]=WL(qd);function YL(t){const{__scopeCheckbox:e,checked:n,children:r,defaultChecked:o,disabled:a,form:s,name:l,onCheckedChange:u,required:h,value:p="on",internal_do_not_use_render:g}=t,[w,y]=ui({prop:n,defaultProp:o??!1,onChange:u,caller:qd}),[x,v]=C.useState(null),[b,E]=C.useState(null),T=C.useRef(!1),N=x?!!s||!!x.closest("form"):!0,P={checked:w,disabled:a,setChecked:y,control:x,setControl:v,name:l,form:s,value:p,hasConsumerStoppedPropagationRef:T,required:h,defaultChecked:wi(o)?!1:o,isFormControl:N,bubbleInput:b,setBubbleInput:E};return d.jsx(qL,{scope:e,...P,children:JL(g)?g(P):r})}var aS="CheckboxTrigger",sS=C.forwardRef(({__scopeCheckbox:t,onKeyDown:e,onClick:n,...r},o)=>{const{control:a,value:s,disabled:l,checked:u,required:h,setControl:p,setChecked:g,hasConsumerStoppedPropagationRef:w,isFormControl:y,bubbleInput:x}=yg(aS,t),v=rt(o,p),b=C.useRef(u);return C.useEffect(()=>{const E=a==null?void 0:a.form;if(E){const T=()=>g(b.current);return E.addEventListener("reset",T),()=>E.removeEventListener("reset",T)}},[a,g]),d.jsx(mt.button,{type:"button",role:"checkbox","aria-checked":wi(u)?"mixed":u,"aria-required":h,"data-state":fS(u),"data-disabled":l?"":void 0,disabled:l,value:s,...r,ref:v,onKeyDown:Ue(e,E=>{E.key==="Enter"&&E.preventDefault()}),onClick:Ue(n,E=>{g(T=>wi(T)?!0:!T),x&&y&&(w.current=E.isPropagationStopped(),w.current||E.stopPropagation())})})});sS.displayName=aS;var wg=C.forwardRef((t,e)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:s,disabled:l,value:u,onCheckedChange:h,form:p,...g}=t;return d.jsx(YL,{__scopeCheckbox:n,checked:o,defaultChecked:a,disabled:l,required:s,onCheckedChange:h,name:r,form:p,value:u,internal_do_not_use_render:({isFormControl:w})=>d.jsxs(d.Fragment,{children:[d.jsx(sS,{...g,ref:e,__scopeCheckbox:n}),w&&d.jsx(uS,{__scopeCheckbox:n})]})})});wg.displayName=qd;var cS="CheckboxIndicator",lS=C.forwardRef((t,e)=>{const{__scopeCheckbox:n,forceMount:r,...o}=t,a=yg(cS,n);return d.jsx(Ro,{present:r||wi(a.checked)||a.checked===!0,children:d.jsx(mt.span,{"data-state":fS(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:e,style:{pointerEvents:"none",...t.style}})})});lS.displayName=cS;var dS="CheckboxBubbleInput",uS=C.forwardRef(({__scopeCheckbox:t,...e},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:a,defaultChecked:s,required:l,disabled:u,name:h,value:p,form:g,bubbleInput:w,setBubbleInput:y}=yg(dS,t),x=rt(n,y),v=iS(a),b=vg(r);C.useEffect(()=>{const T=w;if(!T)return;const N=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(N,"checked").set,D=!o.current;if(v!==a&&_){const H=new Event("click",{bubbles:D});T.indeterminate=wi(a),_.call(T,wi(a)?!1:a),T.dispatchEvent(H)}},[w,v,a,o]);const E=C.useRef(wi(a)?!1:a);return d.jsx(mt.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??E.current,required:l,disabled:u,name:h,value:p,form:g,...e,tabIndex:-1,ref:x,style:{...e.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});uS.displayName=dS;function JL(t){return typeof t=="function"}function wi(t){return t==="indeterminate"}function fS(t){return wi(t)?"indeterminate":t?"checked":"unchecked"}const dc=C.forwardRef(({className:t,...e},n)=>d.jsx(wg,{ref:n,className:ze("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",t),...e,children:d.jsx(lS,{className:ze("s3-explr-ui-checkbox-indicator flex items-center justify-center text-current"),children:d.jsx($x,{className:"s3-explr-ui-checkbox-check h-4 w-4"})})}));dc.displayName=wg.displayName;const ar=Qs,uc=lM,QL=dM,hS=C.forwardRef(({className:t,...e},n)=>d.jsx(ja,{ref:n,className:ze("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",t),...e}));hS.displayName=ja.displayName;const zn=C.forwardRef(({className:t,children:e,...n},r)=>d.jsxs(QL,{children:[d.jsx(hS,{}),d.jsxs(Wa,{ref:r,className:ze("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",t),...n,children:[e,d.jsxs(kp,{className:ze("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(lg,{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"})]})]})]}));zn.displayName=Wa.displayName;const Vn=({className:t,...e})=>d.jsx("div",{className:ze("s3-explr-ui-dialog-header flex flex-col space-y-1.5 text-center sm:text-left",t),...e});Vn.displayName="DialogHeader";const Fr=({className:t,...e})=>d.jsx("div",{className:ze("s3-explr-ui-dialog-footer flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...e});Fr.displayName="DialogFooter";const Kn=C.forwardRef(({className:t,...e},n)=>d.jsx(Pb,{ref:n,className:ze("s3-explr-ui-dialog-title text-lg font-semibold leading-none tracking-tight",t),...e}));Kn.displayName=Pb.displayName;const Ci=C.forwardRef(({className:t,...e},n)=>d.jsx(Ob,{ref:n,className:ze("s3-explr-ui-dialog-description text-sm text-muted-foreground",t),...e}));Ci.displayName=Ob.displayName;const Gn=C.forwardRef(({className:t,type:e,...n},r)=>d.jsx("input",{type:e,className:ze("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",t),ref:r,...n}));Gn.displayName="Input";var XL="Label",pS=C.forwardRef((t,e)=>d.jsx(mt.label,{...t,ref:e,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=t.onMouseDown)==null||o.call(t,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));pS.displayName=XL;var gS=pS;const ZL=mg("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"}}),mr=C.forwardRef(({className:t,variant:e,size:n,...r},o)=>d.jsx(gS,{ref:o,className:ze(ZL({variant:e,size:n}),t),...r}));mr.displayName=gS.displayName;const Yd=({className:t,...e})=>d.jsx("nav",{role:"navigation","aria-label":"pagination",className:ze("mx-auto flex w-full justify-center",t),...e});Yd.displayName="Pagination";const Jd=C.forwardRef(({className:t,...e},n)=>d.jsx("ul",{ref:n,className:ze("flex flex-row items-center gap-1",t),...e}));Jd.displayName="PaginationContent";const $r=C.forwardRef(({className:t,...e},n)=>d.jsx("li",{ref:n,className:ze("",t),...e}));$r.displayName="PaginationItem";const Xa=({className:t,isActive:e,size:n="icon",...r})=>d.jsx("a",{"aria-current":e?"page":void 0,className:ze(oS({variant:e?"outline":"ghost",size:n}),t),...r});Xa.displayName="PaginationLink";const Qd=({className:t,...e})=>d.jsxs(Xa,{"aria-label":"Go to previous page",size:"default",className:ze("gap-1 pl-2.5",t),...e,children:[d.jsx(BD,{className:"h-4 w-4"}),d.jsx("span",{children:"Previous"})]});Qd.displayName="PaginationPrevious";const Xd=({className:t,...e})=>d.jsxs(Xa,{"aria-label":"Go to next page",size:"default",className:ze("gap-1 pr-2.5",t),...e,children:[d.jsx("span",{children:"Next"}),d.jsx(Hx,{className:"h-4 w-4"})]});Xd.displayName="PaginationNext";const Zd=({className:t,...e})=>d.jsxs("span",{"aria-hidden":!0,className:ze("flex h-9 w-9 items-center justify-center",t),...e,children:[d.jsx(zD,{className:"h-4 w-4"}),d.jsx("span",{className:"sr-only",children:"More pages"})]});Zd.displayName="PaginationEllipsis";const eu=C.forwardRef(({className:t,...e},n)=>d.jsx("div",{className:ze("relative w-full overflow-auto","s3-explr-ui-table-container"),children:d.jsx("table",{ref:n,className:ze("w-full caption-bottom text-sm","s3-explr-ui-table",t),...e})}));eu.displayName="Table";const tu=C.forwardRef(({className:t,...e},n)=>d.jsx("thead",{ref:n,className:ze("[&_tr]:border-b","s3-explr-ui-table-header",t),...e}));tu.displayName="TableHeader";const nu=C.forwardRef(({className:t,...e},n)=>d.jsx("tbody",{ref:n,className:ze("[&_tr:last-child]:border-0","s3-explr-ui-table-body",t),...e}));nu.displayName="TableBody";const eF=C.forwardRef(({className:t,...e},n)=>d.jsx("tfoot",{ref:n,className:ze("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0","s3-explr-ui-table-footer",t),...e}));eF.displayName="TableFooter";const Hr=C.forwardRef(({className:t,...e},n)=>d.jsx("tr",{ref:n,className:ze("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted","s3-explr-ui-table-row",t),...e}));Hr.displayName="TableRow";const po=C.forwardRef(({className:t,...e},n)=>d.jsx("th",{ref:n,className:ze("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",t),...e}));po.displayName="TableHead";const jn=C.forwardRef(({className:t,...e},n)=>d.jsx("td",{ref:n,className:ze("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]","s3-explr-ui-table-cell",t),...e}));jn.displayName="TableCell";const tF=C.forwardRef(({className:t,...e},n)=>d.jsx("caption",{ref:n,className:ze("mt-4 text-sm text-muted-foreground","s3-explr-ui-table-caption",t),...e}));tF.displayName="TableCaption";function mS(t){const e=nF(t),n=C.forwardRef((r,o)=>{const{children:a,...s}=r,l=C.Children.toArray(a),u=l.find(oF);if(u){const h=u.props.children,p=l.map(g=>g===u?C.Children.count(h)>1?C.Children.only(null):C.isValidElement(h)?h.props.children:null:g);return d.jsx(e,{...s,ref:o,children:C.isValidElement(h)?C.cloneElement(h,void 0,p):null})}return d.jsx(e,{...s,ref:o,children:a})});return n.displayName=`${t}.Slot`,n}function nF(t){const e=C.forwardRef((n,r)=>{const{children:o,...a}=n,s=C.isValidElement(o)?aF(o):void 0,l=rt(s,r);if(C.isValidElement(o)){const u=iF(a,o.props);return o.type!==C.Fragment&&(u.ref=l),C.cloneElement(o,u)}return C.Children.count(o)>1?C.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var rF=Symbol("radix.slottable");function oF(t){return C.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===rF}function iF(t,e){const n={...e};for(const r in e){const o=t[r],a=e[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...l)=>{const u=a(...l);return o(...l),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...t,...n}}function aF(t){var r,o;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(o=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:o.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function sF(t){const e=t+"CollectionProvider",[n,r]=gr(e),[o,a]=n(e,{collectionRef:{current:null},itemMap:new Map}),s=v=>{const{scope:b,children:E}=v,T=M.useRef(null),N=M.useRef(new Map).current;return d.jsx(o,{scope:b,itemMap:N,collectionRef:T,children:E})};s.displayName=e;const l=t+"CollectionSlot",u=mS(l),h=M.forwardRef((v,b)=>{const{scope:E,children:T}=v,N=a(l,E),P=rt(b,N.collectionRef);return d.jsx(u,{ref:P,children:T})});h.displayName=l;const p=t+"CollectionItemSlot",g="data-radix-collection-item",w=mS(p),y=M.forwardRef((v,b)=>{const{scope:E,children:T,...N}=v,P=M.useRef(null),_=rt(b,P),D=a(p,E);return M.useEffect(()=>(D.itemMap.set(P,{ref:P,...N}),()=>void D.itemMap.delete(P))),d.jsx(w,{[g]:"",ref:_,children:T})});y.displayName=p;function x(v){const b=a(t+"CollectionConsumer",v);return M.useCallback(()=>{const T=b.collectionRef.current;if(!T)return[];const N=Array.from(T.querySelectorAll(`[${g}]`));return Array.from(b.itemMap.values()).sort((D,H)=>N.indexOf(D.ref.current)-N.indexOf(H.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:s,Slot:h,ItemSlot:y},x,r]}var cF=C.createContext(void 0);function Cg(t){const e=C.useContext(cF);return t||e||"ltr"}var bg="rovingFocusGroup.onEntryFocus",lF={bubbles:!1,cancelable:!0},fc="RovingFocusGroup",[xg,vS,dF]=sF(fc),[uF,yS]=gr(fc,[dF]),[fF,hF]=uF(fc),wS=C.forwardRef((t,e)=>d.jsx(xg.Provider,{scope:t.__scopeRovingFocusGroup,children:d.jsx(xg.Slot,{scope:t.__scopeRovingFocusGroup,children:d.jsx(pF,{...t,ref:e})})}));wS.displayName=fc;var pF=C.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:h,preventScrollOnEntryFocus:p=!1,...g}=t,w=C.useRef(null),y=rt(e,w),x=Cg(a),[v,b]=ui({prop:s,defaultProp:l??null,onChange:u,caller:fc}),[E,T]=C.useState(!1),N=gn(h),P=vS(n),_=C.useRef(!1),[D,H]=C.useState(0);return C.useEffect(()=>{const K=w.current;if(K)return K.addEventListener(bg,N),()=>K.removeEventListener(bg,N)},[N]),d.jsx(fF,{scope:n,orientation:r,dir:x,loop:o,currentTabStopId:v,onItemFocus:C.useCallback(K=>b(K),[b]),onItemShiftTab:C.useCallback(()=>T(!0),[]),onFocusableItemAdd:C.useCallback(()=>H(K=>K+1),[]),onFocusableItemRemove:C.useCallback(()=>H(K=>K-1),[]),children:d.jsx(mt.div,{tabIndex:E||D===0?-1:0,"data-orientation":r,...g,ref:y,style:{outline:"none",...t.style},onMouseDown:Ue(t.onMouseDown,()=>{_.current=!0}),onFocus:Ue(t.onFocus,K=>{const ee=!_.current;if(K.target===K.currentTarget&&ee&&!E){const W=new CustomEvent(bg,lF);if(K.currentTarget.dispatchEvent(W),!W.defaultPrevented){const de=P().filter(Y=>Y.focusable),se=de.find(Y=>Y.active),fe=de.find(Y=>Y.id===v),Z=[se,fe,...de].filter(Boolean).map(Y=>Y.ref.current);xS(Z,p)}}_.current=!1}),onBlur:Ue(t.onBlur,()=>T(!1))})})}),CS="RovingFocusGroupItem",bS=C.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:s,...l}=t,u=Mo(),h=a||u,p=hF(CS,n),g=p.currentTabStopId===h,w=vS(n),{onFocusableItemAdd:y,onFocusableItemRemove:x,currentTabStopId:v}=p;return C.useEffect(()=>{if(r)return y(),()=>x()},[r,y,x]),d.jsx(xg.ItemSlot,{scope:n,id:h,focusable:r,active:o,children:d.jsx(mt.span,{tabIndex:g?0:-1,"data-orientation":p.orientation,...l,ref:e,onMouseDown:Ue(t.onMouseDown,b=>{r?p.onItemFocus(h):b.preventDefault()}),onFocus:Ue(t.onFocus,()=>p.onItemFocus(h)),onKeyDown:Ue(t.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){p.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const E=vF(b,p.orientation,p.dir);if(E!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let N=w().filter(P=>P.focusable).map(P=>P.ref.current);if(E==="last")N.reverse();else if(E==="prev"||E==="next"){E==="prev"&&N.reverse();const P=N.indexOf(b.currentTarget);N=p.loop?yF(N,P+1):N.slice(P+1)}setTimeout(()=>xS(N))}}),children:typeof s=="function"?s({isCurrentTabStop:g,hasTabStop:v!=null}):s})})});bS.displayName=CS;var gF={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function mF(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function vF(t,e,n){const r=mF(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return gF[r]}function xS(t,e=!1){const n=document.activeElement;for(const r of t)if(r===n||(r.focus({preventScroll:e}),document.activeElement!==n))return}function yF(t,e){return t.map((n,r)=>t[(e+r)%t.length])}var wF=wS,CF=bS,ru="Tabs",[bF,Hj]=gr(ru,[yS]),SS=yS(),[xF,Sg]=bF(ru),_S=C.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:s="horizontal",dir:l,activationMode:u="automatic",...h}=t,p=Cg(l),[g,w]=ui({prop:r,onChange:o,defaultProp:a??"",caller:ru});return d.jsx(xF,{scope:n,baseId:Mo(),value:g,onValueChange:w,orientation:s,dir:p,activationMode:u,children:d.jsx(mt.div,{dir:p,"data-orientation":s,...h,ref:e})})});_S.displayName=ru;var ES="TabsList",TS=C.forwardRef((t,e)=>{const{__scopeTabs:n,loop:r=!0,...o}=t,a=Sg(ES,n),s=SS(n);return d.jsx(wF,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:r,children:d.jsx(mt.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:e})})});TS.displayName=ES;var AS="TabsTrigger",IS=C.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=t,s=Sg(AS,n),l=SS(n),u=PS(s.baseId,r),h=OS(s.baseId,r),p=r===s.value;return d.jsx(CF,{asChild:!0,...l,focusable:!o,active:p,children:d.jsx(mt.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":h,"data-state":p?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:u,...a,ref:e,onMouseDown:Ue(t.onMouseDown,g=>{!o&&g.button===0&&g.ctrlKey===!1?s.onValueChange(r):g.preventDefault()}),onKeyDown:Ue(t.onKeyDown,g=>{[" ","Enter"].includes(g.key)&&s.onValueChange(r)}),onFocus:Ue(t.onFocus,()=>{const g=s.activationMode!=="manual";!p&&!o&&g&&s.onValueChange(r)})})})});IS.displayName=AS;var kS="TabsContent",NS=C.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...s}=t,l=Sg(kS,n),u=PS(l.baseId,r),h=OS(l.baseId,r),p=r===l.value,g=C.useRef(p);return C.useEffect(()=>{const w=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(w)},[]),d.jsx(Ro,{present:o||p,children:({present:w})=>d.jsx(mt.div,{"data-state":p?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":u,hidden:!w,id:h,tabIndex:0,...s,ref:e,style:{...t.style,animationDuration:g.current?"0s":void 0},children:w&&a})})});NS.displayName=kS;function PS(t,e){return`${t}-trigger-${e}`}function OS(t,e){return`${t}-content-${e}`}var SF=_S,MS=TS,RS=IS,DS=NS;const _g=SF,ou=C.forwardRef(({className:t,...e},n)=>d.jsx(MS,{ref:n,className:ze("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",t),...e}));ou.displayName=MS.displayName;const Yi=C.forwardRef(({className:t,...e},n)=>d.jsx(RS,{ref:n,className:ze("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",t),...e}));Yi.displayName=RS.displayName;const Ji=C.forwardRef(({className:t,...e},n)=>d.jsx(DS,{ref:n,className:ze("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t),...e}));Ji.displayName=DS.displayName;const hc=C.forwardRef(({className:t,...e},n)=>d.jsx("textarea",{className:ze("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",t),ref:n,...e}));hc.displayName="Textarea";function LS(t){const e=_F(t),n=C.forwardRef((r,o)=>{const{children:a,...s}=r,l=C.Children.toArray(a),u=l.find(TF);if(u){const h=u.props.children,p=l.map(g=>g===u?C.Children.count(h)>1?C.Children.only(null):C.isValidElement(h)?h.props.children:null:g);return d.jsx(e,{...s,ref:o,children:C.isValidElement(h)?C.cloneElement(h,void 0,p):null})}return d.jsx(e,{...s,ref:o,children:a})});return n.displayName=`${t}.Slot`,n}function _F(t){const e=C.forwardRef((n,r)=>{const{children:o,...a}=n,s=C.isValidElement(o)?IF(o):void 0,l=rt(s,r);if(C.isValidElement(o)){const u=AF(a,o.props);return o.type!==C.Fragment&&(u.ref=l),C.cloneElement(o,u)}return C.Children.count(o)>1?C.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var EF=Symbol("radix.slottable");function TF(t){return C.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===EF}function AF(t,e){const n={...e};for(const r in e){const o=t[r],a=e[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...l)=>{const u=a(...l);return o(...l),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...t,...n}}function IF(t){var r,o;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(o=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:o.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function kF(t){const e=t+"CollectionProvider",[n,r]=gr(e),[o,a]=n(e,{collectionRef:{current:null},itemMap:new Map}),s=v=>{const{scope:b,children:E}=v,T=M.useRef(null),N=M.useRef(new Map).current;return d.jsx(o,{scope:b,itemMap:N,collectionRef:T,children:E})};s.displayName=e;const l=t+"CollectionSlot",u=LS(l),h=M.forwardRef((v,b)=>{const{scope:E,children:T}=v,N=a(l,E),P=rt(b,N.collectionRef);return d.jsx(u,{ref:P,children:T})});h.displayName=l;const p=t+"CollectionItemSlot",g="data-radix-collection-item",w=LS(p),y=M.forwardRef((v,b)=>{const{scope:E,children:T,...N}=v,P=M.useRef(null),_=rt(b,P),D=a(p,E);return M.useEffect(()=>(D.itemMap.set(P,{ref:P,...N}),()=>void D.itemMap.delete(P))),d.jsx(w,{[g]:"",ref:_,children:T})});y.displayName=p;function x(v){const b=a(t+"CollectionConsumer",v);return M.useCallback(()=>{const T=b.collectionRef.current;if(!T)return[];const N=Array.from(T.querySelectorAll(`[${g}]`));return Array.from(b.itemMap.values()).sort((D,H)=>N.indexOf(D.ref.current)-N.indexOf(H.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:s,Slot:h,ItemSlot:y},x,r]}var NF=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),PF="VisuallyHidden",Eg=C.forwardRef((t,e)=>d.jsx(mt.span,{...t,ref:e,style:{...NF,...t.style}}));Eg.displayName=PF;var Tg="ToastProvider",[Ag,OF,MF]=kF("Toast"),[FS,Uj]=gr("Toast",[MF]),[RF,iu]=FS(Tg),$S=t=>{const{__scopeToast:e,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:a=50,children:s}=t,[l,u]=C.useState(null),[h,p]=C.useState(0),g=C.useRef(!1),w=C.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Tg}\`. Expected non-empty \`string\`.`),d.jsx(Ag.Provider,{scope:e,children:d.jsx(RF,{scope:e,label:n,duration:r,swipeDirection:o,swipeThreshold:a,toastCount:h,viewport:l,onViewportChange:u,onToastAdd:C.useCallback(()=>p(y=>y+1),[]),onToastRemove:C.useCallback(()=>p(y=>y-1),[]),isFocusedToastEscapeKeyDownRef:g,isClosePausedRef:w,children:s})})};$S.displayName=Tg;var HS="ToastViewport",DF=["F8"],Ig="toast.viewportPause",kg="toast.viewportResume",US=C.forwardRef((t,e)=>{const{__scopeToast:n,hotkey:r=DF,label:o="Notifications ({hotkey})",...a}=t,s=iu(HS,n),l=OF(n),u=C.useRef(null),h=C.useRef(null),p=C.useRef(null),g=C.useRef(null),w=rt(e,g,s.onViewportChange),y=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),x=s.toastCount>0;C.useEffect(()=>{const b=E=>{var N;r.length!==0&&r.every(P=>E[P]||E.code===P)&&((N=g.current)==null||N.focus())};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[r]),C.useEffect(()=>{const b=u.current,E=g.current;if(x&&b&&E){const T=()=>{if(!s.isClosePausedRef.current){const D=new CustomEvent(Ig);E.dispatchEvent(D),s.isClosePausedRef.current=!0}},N=()=>{if(s.isClosePausedRef.current){const D=new CustomEvent(kg);E.dispatchEvent(D),s.isClosePausedRef.current=!1}},P=D=>{!b.contains(D.relatedTarget)&&N()},_=()=>{b.contains(document.activeElement)||N()};return b.addEventListener("focusin",T),b.addEventListener("focusout",P),b.addEventListener("pointermove",T),b.addEventListener("pointerleave",_),window.addEventListener("blur",T),window.addEventListener("focus",N),()=>{b.removeEventListener("focusin",T),b.removeEventListener("focusout",P),b.removeEventListener("pointermove",T),b.removeEventListener("pointerleave",_),window.removeEventListener("blur",T),window.removeEventListener("focus",N)}}},[x,s.isClosePausedRef]);const v=C.useCallback(({tabbingDirection:b})=>{const T=l().map(N=>{const P=N.ref.current,_=[P,...qF(P)];return b==="forwards"?_:_.reverse()});return(b==="forwards"?T.reverse():T).flat()},[l]);return C.useEffect(()=>{const b=g.current;if(b){const E=T=>{var _,D,H;const N=T.altKey||T.ctrlKey||T.metaKey;if(T.key==="Tab"&&!N){const K=document.activeElement,ee=T.shiftKey;if(T.target===b&&ee){(_=h.current)==null||_.focus();return}const se=v({tabbingDirection:ee?"backwards":"forwards"}),fe=se.findIndex(q=>q===K);Og(se.slice(fe+1))?T.preventDefault():ee?(D=h.current)==null||D.focus():(H=p.current)==null||H.focus()}};return b.addEventListener("keydown",E),()=>b.removeEventListener("keydown",E)}},[l,v]),d.jsxs(XO,{ref:u,role:"region","aria-label":o.replace("{hotkey}",y),tabIndex:-1,style:{pointerEvents:x?void 0:"none"},children:[x&&d.jsx(Ng,{ref:h,onFocusFromOutsideViewport:()=>{const b=v({tabbingDirection:"forwards"});Og(b)}}),d.jsx(Ag.Slot,{scope:n,children:d.jsx(mt.ol,{tabIndex:-1,...a,ref:w})}),x&&d.jsx(Ng,{ref:p,onFocusFromOutsideViewport:()=>{const b=v({tabbingDirection:"backwards"});Og(b)}})]})});US.displayName=HS;var BS="ToastFocusProxy",Ng=C.forwardRef((t,e)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=t,a=iu(BS,n);return d.jsx(Eg,{"aria-hidden":!0,tabIndex:0,...o,ref:e,style:{position:"fixed"},onFocus:s=>{var h;const l=s.relatedTarget;!((h=a.viewport)!=null&&h.contains(l))&&r()}})});Ng.displayName=BS;var pc="Toast",LF="toast.swipeStart",FF="toast.swipeMove",$F="toast.swipeCancel",HF="toast.swipeEnd",zS=C.forwardRef((t,e)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:a,...s}=t,[l,u]=ui({prop:r,defaultProp:o??!0,onChange:a,caller:pc});return d.jsx(Ro,{present:n||l,children:d.jsx(zF,{open:l,...s,ref:e,onClose:()=>u(!1),onPause:gn(t.onPause),onResume:gn(t.onResume),onSwipeStart:Ue(t.onSwipeStart,h=>{h.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Ue(t.onSwipeMove,h=>{const{x:p,y:g}=h.detail.delta;h.currentTarget.setAttribute("data-swipe","move"),h.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${p}px`),h.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${g}px`)}),onSwipeCancel:Ue(t.onSwipeCancel,h=>{h.currentTarget.setAttribute("data-swipe","cancel"),h.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),h.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),h.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),h.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Ue(t.onSwipeEnd,h=>{const{x:p,y:g}=h.detail.delta;h.currentTarget.setAttribute("data-swipe","end"),h.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),h.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),h.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${p}px`),h.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${g}px`),u(!1)})})})});zS.displayName=pc;var[UF,BF]=FS(pc,{onClose(){}}),zF=C.forwardRef((t,e)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:a,onClose:s,onEscapeKeyDown:l,onPause:u,onResume:h,onSwipeStart:p,onSwipeMove:g,onSwipeCancel:w,onSwipeEnd:y,...x}=t,v=iu(pc,n),[b,E]=C.useState(null),T=rt(e,q=>E(q)),N=C.useRef(null),P=C.useRef(null),_=o||v.duration,D=C.useRef(0),H=C.useRef(_),K=C.useRef(0),{onToastAdd:ee,onToastRemove:W}=v,de=gn(()=>{var Z;(b==null?void 0:b.contains(document.activeElement))&&((Z=v.viewport)==null||Z.focus()),s()}),se=C.useCallback(q=>{!q||q===1/0||(window.clearTimeout(K.current),D.current=new Date().getTime(),K.current=window.setTimeout(de,q))},[de]);C.useEffect(()=>{const q=v.viewport;if(q){const Z=()=>{se(H.current),h==null||h()},Y=()=>{const oe=new Date().getTime()-D.current;H.current=H.current-oe,window.clearTimeout(K.current),u==null||u()};return q.addEventListener(Ig,Y),q.addEventListener(kg,Z),()=>{q.removeEventListener(Ig,Y),q.removeEventListener(kg,Z)}}},[v.viewport,_,u,h,se]),C.useEffect(()=>{a&&!v.isClosePausedRef.current&&se(_)},[a,_,v.isClosePausedRef,se]),C.useEffect(()=>(ee(),()=>W()),[ee,W]);const fe=C.useMemo(()=>b?YS(b):null,[b]);return v.viewport?d.jsxs(d.Fragment,{children:[fe&&d.jsx(VF,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:fe}),d.jsx(UF,{scope:n,onClose:de,children:Ia.createPortal(d.jsx(Ag.ItemSlot,{scope:n,children:d.jsx(QO,{asChild:!0,onEscapeKeyDown:Ue(l,()=>{v.isFocusedToastEscapeKeyDownRef.current||de(),v.isFocusedToastEscapeKeyDownRef.current=!1}),children:d.jsx(mt.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":v.swipeDirection,...x,ref:T,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:Ue(t.onKeyDown,q=>{q.key==="Escape"&&(l==null||l(q.nativeEvent),q.nativeEvent.defaultPrevented||(v.isFocusedToastEscapeKeyDownRef.current=!0,de()))}),onPointerDown:Ue(t.onPointerDown,q=>{q.button===0&&(N.current={x:q.clientX,y:q.clientY})}),onPointerMove:Ue(t.onPointerMove,q=>{if(!N.current)return;const Z=q.clientX-N.current.x,Y=q.clientY-N.current.y,oe=!!P.current,Q=["left","right"].includes(v.swipeDirection),X=["left","up"].includes(v.swipeDirection)?Math.min:Math.max,$=Q?X(0,Z):0,te=Q?0:X(0,Y),_e=q.pointerType==="touch"?10:2,ke={x:$,y:te},xe={originalEvent:q,delta:ke};oe?(P.current=ke,au(FF,g,xe,{discrete:!1})):JS(ke,v.swipeDirection,_e)?(P.current=ke,au(LF,p,xe,{discrete:!1}),q.target.setPointerCapture(q.pointerId)):(Math.abs(Z)>_e||Math.abs(Y)>_e)&&(N.current=null)}),onPointerUp:Ue(t.onPointerUp,q=>{const Z=P.current,Y=q.target;if(Y.hasPointerCapture(q.pointerId)&&Y.releasePointerCapture(q.pointerId),P.current=null,N.current=null,Z){const oe=q.currentTarget,Q={originalEvent:q,delta:Z};JS(Z,v.swipeDirection,v.swipeThreshold)?au(HF,y,Q,{discrete:!0}):au($F,w,Q,{discrete:!0}),oe.addEventListener("click",X=>X.preventDefault(),{once:!0})}})})})}),v.viewport)})]}):null}),VF=t=>{const{__scopeToast:e,children:n,...r}=t,o=iu(pc,e),[a,s]=C.useState(!1),[l,u]=C.useState(!1);return jF(()=>s(!0)),C.useEffect(()=>{const h=window.setTimeout(()=>u(!0),1e3);return()=>window.clearTimeout(h)},[]),l?null:d.jsx(fd,{asChild:!0,children:d.jsx(Eg,{...r,children:a&&d.jsxs(d.Fragment,{children:[o.label," ",n]})})})},KF="ToastTitle",VS=C.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return d.jsx(mt.div,{...r,ref:e})});VS.displayName=KF;var GF="ToastDescription",KS=C.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return d.jsx(mt.div,{...r,ref:e})});KS.displayName=GF;var GS="ToastAction",jS=C.forwardRef((t,e)=>{const{altText:n,...r}=t;return n.trim()?d.jsx(qS,{altText:n,asChild:!0,children:d.jsx(Pg,{...r,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${GS}\`. Expected non-empty \`string\`.`),null)});jS.displayName=GS;var WS="ToastClose",Pg=C.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t,o=BF(WS,n);return d.jsx(qS,{asChild:!0,children:d.jsx(mt.button,{type:"button",...r,ref:e,onClick:Ue(t.onClick,o.onClose)})})});Pg.displayName=WS;var qS=C.forwardRef((t,e)=>{const{__scopeToast:n,altText:r,...o}=t;return d.jsx(mt.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:e})});function YS(t){const e=[];return Array.from(t.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&e.push(r.textContent),WF(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",a=r.dataset.radixToastAnnounceExclude==="";if(!o)if(a){const s=r.dataset.radixToastAnnounceAlt;s&&e.push(s)}else e.push(...YS(r))}}),e}function au(t,e,n,{discrete:r}){const o=n.originalEvent.currentTarget,a=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});e&&o.addEventListener(t,e,{once:!0}),r?$C(o,a):o.dispatchEvent(a)}var JS=(t,e,n=0)=>{const r=Math.abs(t.x),o=Math.abs(t.y),a=r>o;return e==="left"||e==="right"?a&&r>n:!a&&o>n};function jF(t=()=>{}){const e=gn(t);tn(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[e])}function WF(t){return t.nodeType===t.ELEMENT_NODE}function qF(t){const e=[],n=document.createTreeWalker(t,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();)e.push(n.currentNode);return e}function Og(t){const e=document.activeElement;return t.some(n=>n===e?!0:(n.focus(),document.activeElement!==e))}var YF=$S,QS=US,XS=zS,ZS=VS,e_=KS,t_=jS,n_=Pg;const JF=YF,r_=C.forwardRef(({className:t,...e},n)=>d.jsx(QS,{ref:n,className:ze("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]",t),...e}));r_.displayName=QS.displayName;const QF=mg("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"}}),o_=C.forwardRef(({className:t,variant:e,...n},r)=>d.jsx(XS,{ref:r,className:ze(QF({variant:e}),t),...n}));o_.displayName=XS.displayName;const XF=C.forwardRef(({className:t,...e},n)=>d.jsx(t_,{ref:n,className:ze("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",t),...e}));XF.displayName=t_.displayName;const i_=C.forwardRef(({className:t,...e},n)=>d.jsx(n_,{ref:n,className:ze("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",t),"toast-close":"",...e,children:d.jsx(lg,{className:"s3-explr-ui-toast-close-icon h-4 w-4"})}));i_.displayName=n_.displayName;const a_=C.forwardRef(({className:t,...e},n)=>d.jsx(ZS,{ref:n,className:ze("s3-explr-ui-toast-title text-sm font-semibold [&+div]:text-xs",t),...e}));a_.displayName=ZS.displayName;const s_=C.forwardRef(({className:t,...e},n)=>d.jsx(e_,{ref:n,className:ze("text-sm opacity-90 font-bold",t),...e}));s_.displayName=e_.displayName;const ZF=1,e2=1e6;let Mg=0;function t2(){return Mg=(Mg+1)%Number.MAX_SAFE_INTEGER,Mg.toString()}const Rg=new Map,c_=t=>{if(Rg.has(t))return;const e=setTimeout(()=>{Rg.delete(t),gc({type:"REMOVE_TOAST",toastId:t})},e2);Rg.set(t,e)},n2=(t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,ZF)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(n=>n.id===e.toast.id?{...n,...e.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=e;return n?c_(n):t.toasts.forEach(r=>{c_(r.id)}),{...t,toasts:t.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(n=>n.id!==e.toastId)}}},su=[];let cu={toasts:[]};function gc(t){cu=n2(cu,t),su.forEach(e=>{e(cu)})}function r2({...t}){const e=t2(),n=o=>gc({type:"UPDATE_TOAST",toast:{...o,id:e}}),r=()=>gc({type:"DISMISS_TOAST",toastId:e});return gc({type:"ADD_TOAST",toast:{...t,id:e,open:!0,onOpenChange:o=>{o||r()}}}),{id:e,dismiss:r,update:n}}function mc(){const[t,e]=C.useState(cu);return C.useEffect(()=>(su.push(e),()=>{const n=su.indexOf(e);n>-1&&su.splice(n,1)}),[t]),{...t,toast:r2,dismiss:n=>gc({type:"DISMISS_TOAST",toastId:n})}}function l_(){const{toasts:t}=mc();return d.jsxs(JF,{children:[t.map(function({id:e,title:n,description:r,action:o,...a}){return d.jsxs(o_,{...a,className:`s3-explr-ui-toast ${a.className||""}`,children:[d.jsxs("div",{className:"s3-explr-ui-toast-content grid gap-1",children:[n&&d.jsx(a_,{className:"s3-explr-ui-toast-title",children:n}),r&&d.jsx(s_,{className:"s3-explr-ui-toast-description",children:r})]}),o&&d.jsx("div",{className:"s3-explr-ui-toast-action",children:o}),d.jsx(i_,{className:"s3-explr-ui-toast-close"})]},e)}),d.jsx(r_,{className:"s3-explr-ui-toast-viewport"})]})}const o2=["top","right","bottom","left"],bi=Math.min,sr=Math.max,lu=Math.round,du=Math.floor,go=t=>({x:t,y:t}),i2={left:"right",right:"left",bottom:"top",top:"bottom"},a2={start:"end",end:"start"};function Dg(t,e,n){return sr(t,bi(e,n))}function $o(t,e){return typeof t=="function"?t(e):t}function Ho(t){return t.split("-")[0]}function Za(t){return t.split("-")[1]}function Lg(t){return t==="x"?"y":"x"}function Fg(t){return t==="y"?"height":"width"}function Uo(t){return["top","bottom"].includes(Ho(t))?"y":"x"}function $g(t){return Lg(Uo(t))}function s2(t,e,n){n===void 0&&(n=!1);const r=Za(t),o=$g(t),a=Fg(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[a]>e.floating[a]&&(s=uu(s)),[s,uu(s)]}function c2(t){const e=uu(t);return[Hg(t),e,Hg(e)]}function Hg(t){return t.replace(/start|end/g,e=>a2[e])}function l2(t,e,n){const r=["left","right"],o=["right","left"],a=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return n?e?o:r:e?r:o;case"left":case"right":return e?a:s;default:return[]}}function d2(t,e,n,r){const o=Za(t);let a=l2(Ho(t),n==="start",r);return o&&(a=a.map(s=>s+"-"+o),e&&(a=a.concat(a.map(Hg)))),a}function uu(t){return t.replace(/left|right|bottom|top/g,e=>i2[e])}function u2(t){return{top:0,right:0,bottom:0,left:0,...t}}function d_(t){return typeof t!="number"?u2(t):{top:t,right:t,bottom:t,left:t}}function fu(t){const{x:e,y:n,width:r,height:o}=t;return{width:r,height:o,top:n,left:e,right:e+r,bottom:n+o,x:e,y:n}}function u_(t,e,n){let{reference:r,floating:o}=t;const a=Uo(e),s=$g(e),l=Fg(s),u=Ho(e),h=a==="y",p=r.x+r.width/2-o.width/2,g=r.y+r.height/2-o.height/2,w=r[l]/2-o[l]/2;let y;switch(u){case"top":y={x:p,y:r.y-o.height};break;case"bottom":y={x:p,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:g};break;case"left":y={x:r.x-o.width,y:g};break;default:y={x:r.x,y:r.y}}switch(Za(e)){case"start":y[s]-=w*(n&&h?-1:1);break;case"end":y[s]+=w*(n&&h?-1:1);break}return y}const f2=async(t,e,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:s}=n,l=a.filter(Boolean),u=await(s.isRTL==null?void 0:s.isRTL(e));let h=await s.getElementRects({reference:t,floating:e,strategy:o}),{x:p,y:g}=u_(h,r,u),w=r,y={},x=0;for(let v=0;v<l.length;v++){const{name:b,fn:E}=l[v],{x:T,y:N,data:P,reset:_}=await E({x:p,y:g,initialPlacement:r,placement:w,strategy:o,middlewareData:y,rects:h,platform:s,elements:{reference:t,floating:e}});p=T??p,g=N??g,y={...y,[b]:{...y[b],...P}},_&&x<=50&&(x++,typeof _=="object"&&(_.placement&&(w=_.placement),_.rects&&(h=_.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:o}):_.rects),{x:p,y:g}=u_(h,w,u)),v=-1)}return{x:p,y:g,placement:w,strategy:o,middlewareData:y}};async function vc(t,e){var n;e===void 0&&(e={});const{x:r,y:o,platform:a,rects:s,elements:l,strategy:u}=t,{boundary:h="clippingAncestors",rootBoundary:p="viewport",elementContext:g="floating",altBoundary:w=!1,padding:y=0}=$o(e,t),x=d_(y),b=l[w?g==="floating"?"reference":"floating":g],E=fu(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(b)))==null||n?b:b.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:h,rootBoundary:p,strategy:u})),T=g==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,N=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),P=await(a.isElement==null?void 0:a.isElement(N))?await(a.getScale==null?void 0:a.getScale(N))||{x:1,y:1}:{x:1,y:1},_=fu(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:T,offsetParent:N,strategy:u}):T);return{top:(E.top-_.top+x.top)/P.y,bottom:(_.bottom-E.bottom+x.bottom)/P.y,left:(E.left-_.left+x.left)/P.x,right:(_.right-E.right+x.right)/P.x}}const h2=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:o,rects:a,platform:s,elements:l,middlewareData:u}=e,{element:h,padding:p=0}=$o(t,e)||{};if(h==null)return{};const g=d_(p),w={x:n,y:r},y=$g(o),x=Fg(y),v=await s.getDimensions(h),b=y==="y",E=b?"top":"left",T=b?"bottom":"right",N=b?"clientHeight":"clientWidth",P=a.reference[x]+a.reference[y]-w[y]-a.floating[x],_=w[y]-a.reference[y],D=await(s.getOffsetParent==null?void 0:s.getOffsetParent(h));let H=D?D[N]:0;(!H||!await(s.isElement==null?void 0:s.isElement(D)))&&(H=l.floating[N]||a.floating[x]);const K=P/2-_/2,ee=H/2-v[x]/2-1,W=bi(g[E],ee),de=bi(g[T],ee),se=W,fe=H-v[x]-de,q=H/2-v[x]/2+K,Z=Dg(se,q,fe),Y=!u.arrow&&Za(o)!=null&&q!==Z&&a.reference[x]/2-(q<se?W:de)-v[x]/2<0,oe=Y?q<se?q-se:q-fe:0;return{[y]:w[y]+oe,data:{[y]:Z,centerOffset:q-Z-oe,...Y&&{alignmentOffset:oe}},reset:Y}}}),p2=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:o,middlewareData:a,rects:s,initialPlacement:l,platform:u,elements:h}=e,{mainAxis:p=!0,crossAxis:g=!0,fallbackPlacements:w,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:v=!0,...b}=$o(t,e);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const E=Ho(o),T=Uo(l),N=Ho(l)===l,P=await(u.isRTL==null?void 0:u.isRTL(h.floating)),_=w||(N||!v?[uu(l)]:c2(l)),D=x!=="none";!w&&D&&_.push(...d2(l,v,x,P));const H=[l,..._],K=await vc(e,b),ee=[];let W=((r=a.flip)==null?void 0:r.overflows)||[];if(p&&ee.push(K[E]),g){const Z=s2(o,s,P);ee.push(K[Z[0]],K[Z[1]])}if(W=[...W,{placement:o,overflows:ee}],!ee.every(Z=>Z<=0)){var de,se;const Z=(((de=a.flip)==null?void 0:de.index)||0)+1,Y=H[Z];if(Y){var fe;const Q=g==="alignment"?T!==Uo(Y):!1,X=((fe=W[0])==null?void 0:fe.overflows[0])>0;if(!Q||X)return{data:{index:Z,overflows:W},reset:{placement:Y}}}let oe=(se=W.filter(Q=>Q.overflows[0]<=0).sort((Q,X)=>Q.overflows[1]-X.overflows[1])[0])==null?void 0:se.placement;if(!oe)switch(y){case"bestFit":{var q;const Q=(q=W.filter(X=>{if(D){const $=Uo(X.placement);return $===T||$==="y"}return!0}).map(X=>[X.placement,X.overflows.filter($=>$>0).reduce(($,te)=>$+te,0)]).sort((X,$)=>X[1]-$[1])[0])==null?void 0:q[0];Q&&(oe=Q);break}case"initialPlacement":oe=l;break}if(o!==oe)return{reset:{placement:oe}}}return{}}}};function f_(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function h_(t){return o2.some(e=>t[e]>=0)}const g2=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:r="referenceHidden",...o}=$o(t,e);switch(r){case"referenceHidden":{const a=await vc(e,{...o,elementContext:"reference"}),s=f_(a,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:h_(s)}}}case"escaped":{const a=await vc(e,{...o,altBoundary:!0}),s=f_(a,n.floating);return{data:{escapedOffsets:s,escaped:h_(s)}}}default:return{}}}}};async function m2(t,e){const{placement:n,platform:r,elements:o}=t,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Ho(n),l=Za(n),u=Uo(n)==="y",h=["left","top"].includes(s)?-1:1,p=a&&u?-1:1,g=$o(e,t);let{mainAxis:w,crossAxis:y,alignmentAxis:x}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return l&&typeof x=="number"&&(y=l==="end"?x*-1:x),u?{x:y*p,y:w*h}:{x:w*h,y:y*p}}const v2=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:o,y:a,placement:s,middlewareData:l}=e,u=await m2(e,t);return s===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:a+u.y,data:{...u,placement:s}}}}},y2=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:o}=e,{mainAxis:a=!0,crossAxis:s=!1,limiter:l={fn:b=>{let{x:E,y:T}=b;return{x:E,y:T}}},...u}=$o(t,e),h={x:n,y:r},p=await vc(e,u),g=Uo(Ho(o)),w=Lg(g);let y=h[w],x=h[g];if(a){const b=w==="y"?"top":"left",E=w==="y"?"bottom":"right",T=y+p[b],N=y-p[E];y=Dg(T,y,N)}if(s){const b=g==="y"?"top":"left",E=g==="y"?"bottom":"right",T=x+p[b],N=x-p[E];x=Dg(T,x,N)}const v=l.fn({...e,[w]:y,[g]:x});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[w]:a,[g]:s}}}}}},w2=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:o,rects:a,middlewareData:s}=e,{offset:l=0,mainAxis:u=!0,crossAxis:h=!0}=$o(t,e),p={x:n,y:r},g=Uo(o),w=Lg(g);let y=p[w],x=p[g];const v=$o(l,e),b=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(u){const N=w==="y"?"height":"width",P=a.reference[w]-a.floating[N]+b.mainAxis,_=a.reference[w]+a.reference[N]-b.mainAxis;y<P?y=P:y>_&&(y=_)}if(h){var E,T;const N=w==="y"?"width":"height",P=["top","left"].includes(Ho(o)),_=a.reference[g]-a.floating[N]+(P&&((E=s.offset)==null?void 0:E[g])||0)+(P?0:b.crossAxis),D=a.reference[g]+a.reference[N]+(P?0:((T=s.offset)==null?void 0:T[g])||0)-(P?b.crossAxis:0);x<_?x=_:x>D&&(x=D)}return{[w]:y,[g]:x}}}},C2=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:o,rects:a,platform:s,elements:l}=e,{apply:u=()=>{},...h}=$o(t,e),p=await vc(e,h),g=Ho(o),w=Za(o),y=Uo(o)==="y",{width:x,height:v}=a.floating;let b,E;g==="top"||g==="bottom"?(b=g,E=w===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(E=g,b=w==="end"?"top":"bottom");const T=v-p.top-p.bottom,N=x-p.left-p.right,P=bi(v-p[b],T),_=bi(x-p[E],N),D=!e.middlewareData.shift;let H=P,K=_;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(K=N),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(H=T),D&&!w){const W=sr(p.left,0),de=sr(p.right,0),se=sr(p.top,0),fe=sr(p.bottom,0);y?K=x-2*(W!==0||de!==0?W+de:sr(p.left,p.right)):H=v-2*(se!==0||fe!==0?se+fe:sr(p.top,p.bottom))}await u({...e,availableWidth:K,availableHeight:H});const ee=await s.getDimensions(l.floating);return x!==ee.width||v!==ee.height?{reset:{rects:!0}}:{}}}};function hu(){return typeof window<"u"}function es(t){return p_(t)?(t.nodeName||"").toLowerCase():"#document"}function cr(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function mo(t){var e;return(e=(p_(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function p_(t){return hu()?t instanceof Node||t instanceof cr(t).Node:!1}function Ur(t){return hu()?t instanceof Element||t instanceof cr(t).Element:!1}function vo(t){return hu()?t instanceof HTMLElement||t instanceof cr(t).HTMLElement:!1}function g_(t){return!hu()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof cr(t).ShadowRoot}function yc(t){const{overflow:e,overflowX:n,overflowY:r,display:o}=Br(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(o)}function b2(t){return["table","td","th"].includes(es(t))}function pu(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function Ug(t){const e=Bg(),n=Ur(t)?Br(t):t;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function x2(t){let e=xi(t);for(;vo(e)&&!ts(e);){if(Ug(e))return e;if(pu(e))return null;e=xi(e)}return null}function Bg(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ts(t){return["html","body","#document"].includes(es(t))}function Br(t){return cr(t).getComputedStyle(t)}function gu(t){return Ur(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function xi(t){if(es(t)==="html")return t;const e=t.assignedSlot||t.parentNode||g_(t)&&t.host||mo(t);return g_(e)?e.host:e}function m_(t){const e=xi(t);return ts(e)?t.ownerDocument?t.ownerDocument.body:t.body:vo(e)&&yc(e)?e:m_(e)}function wc(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const o=m_(t),a=o===((r=t.ownerDocument)==null?void 0:r.body),s=cr(o);if(a){const l=zg(s);return e.concat(s,s.visualViewport||[],yc(o)?o:[],l&&n?wc(l):[])}return e.concat(o,wc(o,[],n))}function zg(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function v_(t){const e=Br(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const o=vo(t),a=o?t.offsetWidth:n,s=o?t.offsetHeight:r,l=lu(n)!==a||lu(r)!==s;return l&&(n=a,r=s),{width:n,height:r,$:l}}function Vg(t){return Ur(t)?t:t.contextElement}function ns(t){const e=Vg(t);if(!vo(e))return go(1);const n=e.getBoundingClientRect(),{width:r,height:o,$:a}=v_(e);let s=(a?lu(n.width):n.width)/r,l=(a?lu(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const S2=go(0);function y_(t){const e=cr(t);return!Bg()||!e.visualViewport?S2:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function _2(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==cr(t)?!1:e}function Qi(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const o=t.getBoundingClientRect(),a=Vg(t);let s=go(1);e&&(r?Ur(r)&&(s=ns(r)):s=ns(t));const l=_2(a,n,r)?y_(a):go(0);let u=(o.left+l.x)/s.x,h=(o.top+l.y)/s.y,p=o.width/s.x,g=o.height/s.y;if(a){const w=cr(a),y=r&&Ur(r)?cr(r):r;let x=w,v=zg(x);for(;v&&r&&y!==x;){const b=ns(v),E=v.getBoundingClientRect(),T=Br(v),N=E.left+(v.clientLeft+parseFloat(T.paddingLeft))*b.x,P=E.top+(v.clientTop+parseFloat(T.paddingTop))*b.y;u*=b.x,h*=b.y,p*=b.x,g*=b.y,u+=N,h+=P,x=cr(v),v=zg(x)}}return fu({width:p,height:g,x:u,y:h})}function Kg(t,e){const n=gu(t).scrollLeft;return e?e.left+n:Qi(mo(t)).left+n}function w_(t,e,n){n===void 0&&(n=!1);const r=t.getBoundingClientRect(),o=r.left+e.scrollLeft-(n?0:Kg(t,r)),a=r.top+e.scrollTop;return{x:o,y:a}}function E2(t){let{elements:e,rect:n,offsetParent:r,strategy:o}=t;const a=o==="fixed",s=mo(r),l=e?pu(e.floating):!1;if(r===s||l&&a)return n;let u={scrollLeft:0,scrollTop:0},h=go(1);const p=go(0),g=vo(r);if((g||!g&&!a)&&((es(r)!=="body"||yc(s))&&(u=gu(r)),vo(r))){const y=Qi(r);h=ns(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const w=s&&!g&&!a?w_(s,u,!0):go(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-u.scrollLeft*h.x+p.x+w.x,y:n.y*h.y-u.scrollTop*h.y+p.y+w.y}}function T2(t){return Array.from(t.getClientRects())}function A2(t){const e=mo(t),n=gu(t),r=t.ownerDocument.body,o=sr(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),a=sr(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Kg(t);const l=-n.scrollTop;return Br(r).direction==="rtl"&&(s+=sr(e.clientWidth,r.clientWidth)-o),{width:o,height:a,x:s,y:l}}function I2(t,e){const n=cr(t),r=mo(t),o=n.visualViewport;let a=r.clientWidth,s=r.clientHeight,l=0,u=0;if(o){a=o.width,s=o.height;const h=Bg();(!h||h&&e==="fixed")&&(l=o.offsetLeft,u=o.offsetTop)}return{width:a,height:s,x:l,y:u}}function k2(t,e){const n=Qi(t,!0,e==="fixed"),r=n.top+t.clientTop,o=n.left+t.clientLeft,a=vo(t)?ns(t):go(1),s=t.clientWidth*a.x,l=t.clientHeight*a.y,u=o*a.x,h=r*a.y;return{width:s,height:l,x:u,y:h}}function C_(t,e,n){let r;if(e==="viewport")r=I2(t,n);else if(e==="document")r=A2(mo(t));else if(Ur(e))r=k2(e,n);else{const o=y_(t);r={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return fu(r)}function b_(t,e){const n=xi(t);return n===e||!Ur(n)||ts(n)?!1:Br(n).position==="fixed"||b_(n,e)}function N2(t,e){const n=e.get(t);if(n)return n;let r=wc(t,[],!1).filter(l=>Ur(l)&&es(l)!=="body"),o=null;const a=Br(t).position==="fixed";let s=a?xi(t):t;for(;Ur(s)&&!ts(s);){const l=Br(s),u=Ug(s);!u&&l.position==="fixed"&&(o=null),(a?!u&&!o:!u&&l.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||yc(s)&&!u&&b_(t,s))?r=r.filter(p=>p!==s):o=l,s=xi(s)}return e.set(t,r),r}function P2(t){let{element:e,boundary:n,rootBoundary:r,strategy:o}=t;const s=[...n==="clippingAncestors"?pu(e)?[]:N2(e,this._c):[].concat(n),r],l=s[0],u=s.reduce((h,p)=>{const g=C_(e,p,o);return h.top=sr(g.top,h.top),h.right=bi(g.right,h.right),h.bottom=bi(g.bottom,h.bottom),h.left=sr(g.left,h.left),h},C_(e,l,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function O2(t){const{width:e,height:n}=v_(t);return{width:e,height:n}}function M2(t,e,n){const r=vo(e),o=mo(e),a=n==="fixed",s=Qi(t,!0,a,e);let l={scrollLeft:0,scrollTop:0};const u=go(0);function h(){u.x=Kg(o)}if(r||!r&&!a)if((es(e)!=="body"||yc(o))&&(l=gu(e)),r){const y=Qi(e,!0,a,e);u.x=y.x+e.clientLeft,u.y=y.y+e.clientTop}else o&&h();a&&!r&&o&&h();const p=o&&!r&&!a?w_(o,l):go(0),g=s.left+l.scrollLeft-u.x-p.x,w=s.top+l.scrollTop-u.y-p.y;return{x:g,y:w,width:s.width,height:s.height}}function Gg(t){return Br(t).position==="static"}function x_(t,e){if(!vo(t)||Br(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return mo(t)===n&&(n=n.ownerDocument.body),n}function S_(t,e){const n=cr(t);if(pu(t))return n;if(!vo(t)){let o=xi(t);for(;o&&!ts(o);){if(Ur(o)&&!Gg(o))return o;o=xi(o)}return n}let r=x_(t,e);for(;r&&b2(r)&&Gg(r);)r=x_(r,e);return r&&ts(r)&&Gg(r)&&!Ug(r)?n:r||x2(t)||n}const R2=async function(t){const e=this.getOffsetParent||S_,n=this.getDimensions,r=await n(t.floating);return{reference:M2(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function D2(t){return Br(t).direction==="rtl"}const L2={convertOffsetParentRelativeRectToViewportRelativeRect:E2,getDocumentElement:mo,getClippingRect:P2,getOffsetParent:S_,getElementRects:R2,getClientRects:T2,getDimensions:O2,getScale:ns,isElement:Ur,isRTL:D2};function __(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function F2(t,e){let n=null,r;const o=mo(t);function a(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function s(l,u){l===void 0&&(l=!1),u===void 0&&(u=1),a();const h=t.getBoundingClientRect(),{left:p,top:g,width:w,height:y}=h;if(l||e(),!w||!y)return;const x=du(g),v=du(o.clientWidth-(p+w)),b=du(o.clientHeight-(g+y)),E=du(p),N={rootMargin:-x+"px "+-v+"px "+-b+"px "+-E+"px",threshold:sr(0,bi(1,u))||1};let P=!0;function _(D){const H=D[0].intersectionRatio;if(H!==u){if(!P)return s();H?s(!1,H):r=setTimeout(()=>{s(!1,1e-7)},1e3)}H===1&&!__(h,t.getBoundingClientRect())&&s(),P=!1}try{n=new IntersectionObserver(_,{...N,root:o.ownerDocument})}catch{n=new IntersectionObserver(_,N)}n.observe(t)}return s(!0),a}function E_(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,h=Vg(t),p=o||a?[...h?wc(h):[],...wc(e)]:[];p.forEach(E=>{o&&E.addEventListener("scroll",n,{passive:!0}),a&&E.addEventListener("resize",n)});const g=h&&l?F2(h,n):null;let w=-1,y=null;s&&(y=new ResizeObserver(E=>{let[T]=E;T&&T.target===h&&y&&(y.unobserve(e),cancelAnimationFrame(w),w=requestAnimationFrame(()=>{var N;(N=y)==null||N.observe(e)})),n()}),h&&!u&&y.observe(h),y.observe(e));let x,v=u?Qi(t):null;u&&b();function b(){const E=Qi(t);v&&!__(v,E)&&n(),v=E,x=requestAnimationFrame(b)}return n(),()=>{var E;p.forEach(T=>{o&&T.removeEventListener("scroll",n),a&&T.removeEventListener("resize",n)}),g==null||g(),(E=y)==null||E.disconnect(),y=null,u&&cancelAnimationFrame(x)}}const $2=v2,H2=y2,U2=p2,B2=C2,z2=g2,T_=h2,V2=w2,K2=(t,e,n)=>{const r=new Map,o={platform:L2,...n},a={...o.platform,_c:r};return f2(t,e,{...o,platform:a})};var mu=typeof document<"u"?M.useLayoutEffect:M.useEffect;function vu(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,o;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!vu(t[r],e[r]))return!1;return!0}if(o=Object.keys(t),n=o.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,o[r]))return!1;for(r=n;r--!==0;){const a=o[r];if(!(a==="_owner"&&t.$$typeof)&&!vu(t[a],e[a]))return!1}return!0}return t!==t&&e!==e}function A_(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function I_(t,e){const n=A_(t);return Math.round(e*n)/n}function jg(t){const e=C.useRef(t);return mu(()=>{e.current=t}),e}function k_(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:s}={},transform:l=!0,whileElementsMounted:u,open:h}=t,[p,g]=C.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[w,y]=C.useState(r);vu(w,r)||y(r);const[x,v]=C.useState(null),[b,E]=C.useState(null),T=C.useCallback(Q=>{Q!==D.current&&(D.current=Q,v(Q))},[]),N=C.useCallback(Q=>{Q!==H.current&&(H.current=Q,E(Q))},[]),P=a||x,_=s||b,D=C.useRef(null),H=C.useRef(null),K=C.useRef(p),ee=u!=null,W=jg(u),de=jg(o),se=jg(h),fe=C.useCallback(()=>{if(!D.current||!H.current)return;const Q={placement:e,strategy:n,middleware:w};de.current&&(Q.platform=de.current),K2(D.current,H.current,Q).then(X=>{const $={...X,isPositioned:se.current!==!1};q.current&&!vu(K.current,$)&&(K.current=$,Ia.flushSync(()=>{g($)}))})},[w,e,n,de,se]);mu(()=>{h===!1&&K.current.isPositioned&&(K.current.isPositioned=!1,g(Q=>({...Q,isPositioned:!1})))},[h]);const q=C.useRef(!1);mu(()=>(q.current=!0,()=>{q.current=!1}),[]),mu(()=>{if(P&&(D.current=P),_&&(H.current=_),P&&_){if(W.current)return W.current(P,_,fe);fe()}},[P,_,fe,W,ee]);const Z=C.useMemo(()=>({reference:D,floating:H,setReference:T,setFloating:N}),[T,N]),Y=C.useMemo(()=>({reference:P,floating:_}),[P,_]),oe=C.useMemo(()=>{const Q={position:n,left:0,top:0};if(!Y.floating)return Q;const X=I_(Y.floating,p.x),$=I_(Y.floating,p.y);return l?{...Q,transform:"translate("+X+"px, "+$+"px)",...A_(Y.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:X,top:$}},[n,l,Y.floating,p.x,p.y]);return C.useMemo(()=>({...p,update:fe,refs:Z,elements:Y,floatingStyles:oe}),[p,fe,Z,Y,oe])}const G2=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:o}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?T_({element:r.current,padding:o}).fn(n):{}:r?T_({element:r,padding:o}).fn(n):{}}}},N_=(t,e)=>({...$2(t),options:[t,e]}),P_=(t,e)=>({...H2(t),options:[t,e]}),O_=(t,e)=>({...V2(t),options:[t,e]}),M_=(t,e)=>({...U2(t),options:[t,e]}),R_=(t,e)=>({...B2(t),options:[t,e]}),D_=(t,e)=>({...z2(t),options:[t,e]}),L_=(t,e)=>({...G2(t),options:[t,e]});var j2="Arrow",F_=C.forwardRef((t,e)=>{const{children:n,width:r=10,height:o=5,...a}=t;return d.jsx(mt.svg,{...a,ref:e,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});F_.displayName=j2;var W2=F_,Wg="Popper",[$_,H_]=gr(Wg),[q2,U_]=$_(Wg),B_=t=>{const{__scopePopper:e,children:n}=t,[r,o]=C.useState(null);return d.jsx(q2,{scope:e,anchor:r,onAnchorChange:o,children:n})};B_.displayName=Wg;var z_="PopperAnchor",V_=C.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:r,...o}=t,a=U_(z_,n),s=C.useRef(null),l=rt(e,s);return C.useEffect(()=>{a.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:d.jsx(mt.div,{...o,ref:l})});V_.displayName=z_;var qg="PopperContent",[Y2,J2]=$_(qg),K_=C.forwardRef((t,e)=>{var z,ce,Ae,Ce,Ne,ne;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,arrowPadding:l=0,avoidCollisions:u=!0,collisionBoundary:h=[],collisionPadding:p=0,sticky:g="partial",hideWhenDetached:w=!1,updatePositionStrategy:y="optimized",onPlaced:x,...v}=t,b=U_(qg,n),[E,T]=C.useState(null),N=rt(e,Ve=>T(Ve)),[P,_]=C.useState(null),D=vg(P),H=(D==null?void 0:D.width)??0,K=(D==null?void 0:D.height)??0,ee=r+(a!=="center"?"-"+a:""),W=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},de=Array.isArray(h)?h:[h],se=de.length>0,fe={padding:W,boundary:de.filter(X2),altBoundary:se},{refs:q,floatingStyles:Z,placement:Y,isPositioned:oe,middlewareData:Q}=k_({strategy:"fixed",placement:ee,whileElementsMounted:(...Ve)=>E_(...Ve,{animationFrame:y==="always"}),elements:{reference:b.anchor},middleware:[N_({mainAxis:o+K,alignmentAxis:s}),u&&P_({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?O_():void 0,...fe}),u&&M_({...fe}),R_({...fe,apply:({elements:Ve,rects:Qe,availableWidth:Ct,availableHeight:Yt})=>{const{width:bt,height:rn}=Qe.reference,zt=Ve.floating.style;zt.setProperty("--radix-popper-available-width",`${Ct}px`),zt.setProperty("--radix-popper-available-height",`${Yt}px`),zt.setProperty("--radix-popper-anchor-width",`${bt}px`),zt.setProperty("--radix-popper-anchor-height",`${rn}px`)}}),P&&L_({element:P,padding:l}),Z2({arrowWidth:H,arrowHeight:K}),w&&D_({strategy:"referenceHidden",...fe})]}),[X,$]=W_(Y),te=gn(x);tn(()=>{oe&&(te==null||te())},[oe,te]);const _e=(z=Q.arrow)==null?void 0:z.x,ke=(ce=Q.arrow)==null?void 0:ce.y,xe=((Ae=Q.arrow)==null?void 0:Ae.centerOffset)!==0,[Pe,Te]=C.useState();return tn(()=>{E&&Te(window.getComputedStyle(E).zIndex)},[E]),d.jsx("div",{ref:q.setFloating,"data-radix-popper-content-wrapper":"",style:{...Z,transform:oe?Z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Pe,"--radix-popper-transform-origin":[(Ce=Q.transformOrigin)==null?void 0:Ce.x,(Ne=Q.transformOrigin)==null?void 0:Ne.y].join(" "),...((ne=Q.hide)==null?void 0:ne.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:d.jsx(Y2,{scope:n,placedSide:X,onArrowChange:_,arrowX:_e,arrowY:ke,shouldHideArrow:xe,children:d.jsx(mt.div,{"data-side":X,"data-align":$,...v,ref:N,style:{...v.style,animation:oe?void 0:"none"}})})})});K_.displayName=qg;var G_="PopperArrow",Q2={top:"bottom",right:"left",bottom:"top",left:"right"},j_=C.forwardRef(function(e,n){const{__scopePopper:r,...o}=e,a=J2(G_,r),s=Q2[a.placedSide];return d.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:d.jsx(W2,{...o,ref:n,style:{...o.style,display:"block"}})})});j_.displayName=G_;function X2(t){return t!==null}var Z2=t=>({name:"transformOrigin",options:t,fn(e){var b,E,T;const{placement:n,rects:r,middlewareData:o}=e,s=((b=o.arrow)==null?void 0:b.centerOffset)!==0,l=s?0:t.arrowWidth,u=s?0:t.arrowHeight,[h,p]=W_(n),g={start:"0%",center:"50%",end:"100%"}[p],w=(((E=o.arrow)==null?void 0:E.x)??0)+l/2,y=(((T=o.arrow)==null?void 0:T.y)??0)+u/2;let x="",v="";return h==="bottom"?(x=s?g:`${w}px`,v=`${-u}px`):h==="top"?(x=s?g:`${w}px`,v=`${r.floating.height+u}px`):h==="right"?(x=`${-u}px`,v=s?g:`${y}px`):h==="left"&&(x=`${r.floating.width+u}px`,v=s?g:`${y}px`),{data:{x,y:v}}}});function W_(t){const[e,n="center"]=t.split("-");return[e,n]}var e$=B_,t$=V_,n$=K_,r$=j_,o$=Symbol("radix.slottable");function i$(t){const e=({children:n})=>d.jsx(d.Fragment,{children:n});return e.displayName=`${t}.Slottable`,e.__radixId=o$,e}var a$=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),s$="VisuallyHidden",q_=C.forwardRef((t,e)=>d.jsx(mt.span,{...t,ref:e,style:{...a$,...t.style}}));q_.displayName=s$;var c$=q_,[yu,Bj]=gr("Tooltip",[H_]),wu=H_(),Y_="TooltipProvider",l$=700,Yg="tooltip.open",[d$,Jg]=yu(Y_),J_=t=>{const{__scopeTooltip:e,delayDuration:n=l$,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=t,s=C.useRef(!0),l=C.useRef(!1),u=C.useRef(0);return C.useEffect(()=>{const h=u.current;return()=>window.clearTimeout(h)},[]),d.jsx(d$,{scope:e,isOpenDelayedRef:s,delayDuration:n,onOpen:C.useCallback(()=>{window.clearTimeout(u.current),s.current=!1},[]),onClose:C.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:C.useCallback(h=>{l.current=h},[]),disableHoverableContent:o,children:a})};J_.displayName=Y_;var Cc="Tooltip",[u$,bc]=yu(Cc),Q_=t=>{const{__scopeTooltip:e,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:s,delayDuration:l}=t,u=Jg(Cc,t.__scopeTooltip),h=wu(e),[p,g]=C.useState(null),w=Mo(),y=C.useRef(0),x=s??u.disableHoverableContent,v=l??u.delayDuration,b=C.useRef(!1),[E,T]=ui({prop:r,defaultProp:o??!1,onChange:H=>{H?(u.onOpen(),document.dispatchEvent(new CustomEvent(Yg))):u.onClose(),a==null||a(H)},caller:Cc}),N=C.useMemo(()=>E?b.current?"delayed-open":"instant-open":"closed",[E]),P=C.useCallback(()=>{window.clearTimeout(y.current),y.current=0,b.current=!1,T(!0)},[T]),_=C.useCallback(()=>{window.clearTimeout(y.current),y.current=0,T(!1)},[T]),D=C.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{b.current=!0,T(!0),y.current=0},v)},[v,T]);return C.useEffect(()=>()=>{y.current&&(window.clearTimeout(y.current),y.current=0)},[]),d.jsx(e$,{...h,children:d.jsx(u$,{scope:e,contentId:w,open:E,stateAttribute:N,trigger:p,onTriggerChange:g,onTriggerEnter:C.useCallback(()=>{u.isOpenDelayedRef.current?D():P()},[u.isOpenDelayedRef,D,P]),onTriggerLeave:C.useCallback(()=>{x?_():(window.clearTimeout(y.current),y.current=0)},[_,x]),onOpen:P,onClose:_,disableHoverableContent:x,children:n})})};Q_.displayName=Cc;var Qg="TooltipTrigger",X_=C.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,o=bc(Qg,n),a=Jg(Qg,n),s=wu(n),l=C.useRef(null),u=rt(e,l,o.onTriggerChange),h=C.useRef(!1),p=C.useRef(!1),g=C.useCallback(()=>h.current=!1,[]);return C.useEffect(()=>()=>document.removeEventListener("pointerup",g),[g]),d.jsx(t$,{asChild:!0,...s,children:d.jsx(mt.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:u,onPointerMove:Ue(t.onPointerMove,w=>{w.pointerType!=="touch"&&!p.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),p.current=!0)}),onPointerLeave:Ue(t.onPointerLeave,()=>{o.onTriggerLeave(),p.current=!1}),onPointerDown:Ue(t.onPointerDown,()=>{o.open&&o.onClose(),h.current=!0,document.addEventListener("pointerup",g,{once:!0})}),onFocus:Ue(t.onFocus,()=>{h.current||o.onOpen()}),onBlur:Ue(t.onBlur,o.onClose),onClick:Ue(t.onClick,o.onClose)})})});X_.displayName=Qg;var Xg="TooltipPortal",[f$,h$]=yu(Xg,{forceMount:void 0}),Z_=t=>{const{__scopeTooltip:e,forceMount:n,children:r,container:o}=t,a=bc(Xg,e);return d.jsx(f$,{scope:e,forceMount:n,children:d.jsx(Ro,{present:n||a.open,children:d.jsx(fd,{asChild:!0,container:o,children:r})})})};Z_.displayName=Xg;var rs="TooltipContent",eE=C.forwardRef((t,e)=>{const n=h$(rs,t.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=t,s=bc(rs,t.__scopeTooltip);return d.jsx(Ro,{present:r||s.open,children:s.disableHoverableContent?d.jsx(tE,{side:o,...a,ref:e}):d.jsx(p$,{side:o,...a,ref:e})})}),p$=C.forwardRef((t,e)=>{const n=bc(rs,t.__scopeTooltip),r=Jg(rs,t.__scopeTooltip),o=C.useRef(null),a=rt(e,o),[s,l]=C.useState(null),{trigger:u,onClose:h}=n,p=o.current,{onPointerInTransitChange:g}=r,w=C.useCallback(()=>{l(null),g(!1)},[g]),y=C.useCallback((x,v)=>{const b=x.currentTarget,E={x:x.clientX,y:x.clientY},T=w$(E,b.getBoundingClientRect()),N=C$(E,T),P=b$(v.getBoundingClientRect()),_=S$([...N,...P]);l(_),g(!0)},[g]);return C.useEffect(()=>()=>w(),[w]),C.useEffect(()=>{if(u&&p){const x=b=>y(b,p),v=b=>y(b,u);return u.addEventListener("pointerleave",x),p.addEventListener("pointerleave",v),()=>{u.removeEventListener("pointerleave",x),p.removeEventListener("pointerleave",v)}}},[u,p,y,w]),C.useEffect(()=>{if(s){const x=v=>{const b=v.target,E={x:v.clientX,y:v.clientY},T=(u==null?void 0:u.contains(b))||(p==null?void 0:p.contains(b)),N=!x$(E,s);T?w():N&&(w(),h())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[u,p,s,h,w]),d.jsx(tE,{...t,ref:a})}),[g$,m$]=yu(Cc,{isInside:!1}),v$=i$("TooltipContent"),tE=C.forwardRef((t,e)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...l}=t,u=bc(rs,n),h=wu(n),{onClose:p}=u;return C.useEffect(()=>(document.addEventListener(Yg,p),()=>document.removeEventListener(Yg,p)),[p]),C.useEffect(()=>{if(u.trigger){const g=w=>{const y=w.target;y!=null&&y.contains(u.trigger)&&p()};return window.addEventListener("scroll",g,{capture:!0}),()=>window.removeEventListener("scroll",g,{capture:!0})}},[u.trigger,p]),d.jsx(ud,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:g=>g.preventDefault(),onDismiss:p,children:d.jsxs(n$,{"data-state":u.stateAttribute,...h,...l,ref:e,style:{...l.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(v$,{children:r}),d.jsx(g$,{scope:n,isInside:!0,children:d.jsx(c$,{id:u.contentId,role:"tooltip",children:o||r})})]})})});eE.displayName=rs;var nE="TooltipArrow",y$=C.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,o=wu(n);return m$(nE,n).isInside?null:d.jsx(r$,{...o,...r,ref:e})});y$.displayName=nE;function w$(t,e){const n=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),o=Math.abs(e.right-t.x),a=Math.abs(e.left-t.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function C$(t,e,n=5){const r=[];switch(e){case"top":r.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":r.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":r.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":r.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return r}function b$(t){const{top:e,right:n,bottom:r,left:o}=t;return[{x:o,y:e},{x:n,y:e},{x:n,y:r},{x:o,y:r}]}function x$(t,e){const{x:n,y:r}=t;let o=!1;for(let a=0,s=e.length-1;a<e.length;s=a++){const l=e[a],u=e[s],h=l.x,p=l.y,g=u.x,w=u.y;p>r!=w>r&&n<(g-h)*(r-p)/(w-p)+h&&(o=!o)}return o}function S$(t){const e=t.slice();return e.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),_$(e)}function _$(t){if(t.length<=1)return t.slice();const e=[];for(let r=0;r<t.length;r++){const o=t[r];for(;e.length>=2;){const a=e[e.length-1],s=e[e.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))e.pop();else break}e.push(o)}e.pop();const n=[];for(let r=t.length-1;r>=0;r--){const o=t[r];for(;n.length>=2;){const a=n[n.length-1],s=n[n.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var E$=J_,T$=Q_,A$=X_,I$=Z_,rE=eE;const vr=E$,yr=T$,wr=A$,lr=C.forwardRef(({className:t,sideOffset:e=4,...n},r)=>d.jsx(I$,{children:d.jsx(rE,{ref:r,sideOffset:e,className:ze("z-[1001] 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",t),...n})}));lr.displayName=rE.displayName;function k$({title:t,titleId:e,...n},r){return C.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":e},n),t?C.createElement("title",{id:e},t):null,C.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 N$=C.forwardRef(k$);var P$=function(t){return function(e,n){var r=M.useRef(!1);t(function(){return function(){r.current=!1}},[]),t(function(){if(!r.current)r.current=!0;else return e()},n)}},oE=function(t){return typeof t=="function"},iE=process.env.NODE_ENV==="development"||process.env.NODE_ENV==="test";const O$=P$(M.useEffect);function aE(t){var e=M.useRef(t);return e.current=t,e}var M$=function(t){iE&&(oE(t)||console.error("useUnmount expected parameter is a function, got ".concat(typeof t)));var e=aE(t);M.useEffect(function(){return function(){e.current()}},[])};function R$(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var sE=R$,D$=typeof fo=="object"&&fo&&fo.Object===Object&&fo,L$=D$,F$=L$,$$=typeof self=="object"&&self&&self.Object===Object&&self,H$=F$||$$||Function("return this")(),cE=H$,U$=cE,B$=function(){return U$.Date.now()},z$=B$,V$=/\s/;function K$(t){for(var e=t.length;e--&&V$.test(t.charAt(e)););return e}var G$=K$,j$=G$,W$=/^\s+/;function q$(t){return t&&t.slice(0,j$(t)+1).replace(W$,"")}var Y$=q$,J$=cE,Q$=J$.Symbol,lE=Q$,dE=lE,uE=Object.prototype,X$=uE.hasOwnProperty,Z$=uE.toString,xc=dE?dE.toStringTag:void 0;function eH(t){var e=X$.call(t,xc),n=t[xc];try{t[xc]=void 0;var r=!0}catch{}var o=Z$.call(t);return r&&(e?t[xc]=n:delete t[xc]),o}var tH=eH,nH=Object.prototype,rH=nH.toString;function oH(t){return rH.call(t)}var iH=oH,fE=lE,aH=tH,sH=iH,cH="[object Null]",lH="[object Undefined]",hE=fE?fE.toStringTag:void 0;function dH(t){return t==null?t===void 0?lH:cH:hE&&hE in Object(t)?aH(t):sH(t)}var uH=dH;function fH(t){return t!=null&&typeof t=="object"}var hH=fH,pH=uH,gH=hH,mH="[object Symbol]";function vH(t){return typeof t=="symbol"||gH(t)&&pH(t)==mH}var yH=vH,wH=Y$,pE=sE,CH=yH,gE=NaN,bH=/^[-+]0x[0-9a-f]+$/i,xH=/^0b[01]+$/i,SH=/^0o[0-7]+$/i,_H=parseInt;function EH(t){if(typeof t=="number")return t;if(CH(t))return gE;if(pE(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=pE(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=wH(t);var n=xH.test(t);return n||SH.test(t)?_H(t.slice(2),n?2:8):bH.test(t)?gE:+t}var TH=EH,AH=sE,Zg=z$,mE=TH,IH="Expected a function",kH=Math.max,NH=Math.min;function PH(t,e,n){var r,o,a,s,l,u,h=0,p=!1,g=!1,w=!0;if(typeof t!="function")throw new TypeError(IH);e=mE(e)||0,AH(n)&&(p=!!n.leading,g="maxWait"in n,a=g?kH(mE(n.maxWait)||0,e):a,w="trailing"in n?!!n.trailing:w);function y(D){var H=r,K=o;return r=o=void 0,h=D,s=t.apply(K,H),s}function x(D){return h=D,l=setTimeout(E,e),p?y(D):s}function v(D){var H=D-u,K=D-h,ee=e-H;return g?NH(ee,a-K):ee}function b(D){var H=D-u,K=D-h;return u===void 0||H>=e||H<0||g&&K>=a}function E(){var D=Zg();if(b(D))return T(D);l=setTimeout(E,v(D))}function T(D){return l=void 0,w&&r?y(D):(r=o=void 0,s)}function N(){l!==void 0&&clearTimeout(l),h=0,r=u=o=l=void 0}function P(){return l===void 0?s:T(Zg())}function _(){var D=Zg(),H=b(D);if(r=arguments,o=this,u=D,H){if(l===void 0)return x(u);if(g)return clearTimeout(l),l=setTimeout(E,e),y(u)}return l===void 0&&(l=setTimeout(E,e)),s}return _.cancel=N,_.flush=P,_}var OH=PH;const MH=Ud(OH);function RH(){var t=(typeof global>"u"?"undefined":typeof global)=="object"&&global&&global.Object===Object&&global,e=typeof self=="object"&&self&&self.Object===Object&&self;return t||e}RH()||(global.Date=Date);function DH(t,e){var n;iE&&(oE(t)||console.error("useDebounceFn expected parameter is a function, got ".concat(typeof t)));var r=aE(t),o=(n=e==null?void 0:e.wait)!==null&&n!==void 0?n:1e3,a=M.useMemo(function(){return MH(function(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];return r.current.apply(r,tb([],eb(s),!1))},o,e)},[]);return M$(function(){a.cancel()}),{run:a,cancel:a.cancel,flush:a.flush}}function LH(t,e,n){var r=eb(M.useState({}),2),o=r[0],a=r[1],s=DH(function(){a({})},n).run;M.useEffect(function(){return s()},e),O$(t,[o])}const FH=M.forwardRef(({onChange:t},e)=>{const n=M.useRef(null),[r,o]=M.useState("");return M.useImperativeHandle(e,()=>({setValue:a=>{var s;o(a),(s=n.current)==null||s.focus()}})),LH(()=>{t==null||t(r)},[r],{wait:300}),d.jsxs(d.Fragment,{children:[d.jsx(Gn,{ref:n,type:"text",placeholder:"Search files...",value:r,onChange:a=>o(a.target.value),className:"pr-8"}),r&&d.jsx("button",{onClick:()=>{var a;o(""),(a=n.current)==null||a.focus()},className:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-500 hover:text-gray-700",children:d.jsx(N$,{className:"h-5 w-5"})})]})});var zr=(t=>(t.VIEW_DOCUMENT="VIEW_DOCUMENT",t.DOWNLOAD_DOCUMENT="DOWNLOAD_DOCUMENT",t.EDIT_DOCUMENT="EDIT_DOCUMENT",t.OWNER_DOCUMENT="OWNER_DOCUMENT",t))(zr||{});const $H=(t,e)=>{const[n,r]=M.useState([]),[o,a]=M.useState([]),[s,l]=M.useState([]),[u,h]=M.useState([]),{toast:p}=mc(),[g,w]=M.useState(!1),[y,x]=M.useState(!1),v=M.useCallback(async(P,_,D)=>{if(!y){x(!0);try{const H=await Le.post(t+"/document-permission/grandted",{path:P,grandtedBy:_,data:D});return H.status===200&&(p({title:"Phân quyền tài liệu thành công."}),await N(P)),H}catch{return null}finally{x(!1)}}},[]),b=M.useCallback(async()=>{var P;try{return(P=(await Le.get(e+"admin/users/get-all",{params:{limit:1e4}})).data||[])==null?void 0:P.filter(K=>K.role!=="MASTER_ADMIN")}catch(_){return console.error("Error fetchAllUsers",_),[]}},[]),E=M.useCallback(async()=>{try{return(await Le.get(e+"admin/group-users")).data.filter(_=>`${_.groupname}`.toUpperCase()!=="MASTER_ADMIN").map(_=>{var D;return{..._,users:((D=_.users)==null?void 0:D.length)||0}})}catch(P){return console.error("Error fetchAllGroups",P),[]}},[]),T=M.useCallback(async P=>{try{const D=(await Le.get(t+"/document-permission/grandted",{params:{path:P}})).data;return{usersShared:(D==null?void 0:D.users)||[],groupsShared:(D==null?void 0:D.groups)||[]}}catch(_){return console.error("Error fetchShared",_),{usersShared:[],groupsShared:[]}}},[]),N=M.useCallback(async P=>{if(g)return;w(!0);let[_,D,{usersShared:H,groupsShared:K}]=await Promise.all([b(),E(),T(P)]);_=_==null?void 0:_.filter(ee=>!(H!=null&&H.find(W=>W.userId===ee.id))),D=D==null?void 0:D.filter(ee=>!(K!=null&&K.find(W=>W.groupname===ee.groupname))),Array.isArray(_)&&r(_),Array.isArray(D)&&a(D),Array.isArray(H)&&l(H),Array.isArray(K)&&h(K),w(!1)},[]);return{users:n,groups:o,sharedUsers:s,sharedGroups:u,setUsers:r,setGroups:a,setSharedUsers:l,setSharedGroups:h,fetchData:N,loading:g,postGranted:v,loadingGrandted:y}},HH=({failureReasons:t,onNavigateToFile:e})=>{const n=u=>{if(e){const h=u.replace("s3://cts-llm-docs-bucket/","");e(h)}},r=u=>{const h=[];return u.forEach(p=>{try{JSON.parse(p).forEach(w=>{const y=w.match(/\[Files: ([^\]]+)\]/),x=w.match(/^([^[]+)/);if(y&&x&&y[1]&&x[1]){const v=y[1].split(", ").map(T=>T.trim()),b=x[1].trim().replace("Encountered error: ","");let E="unknown";b.includes("invalid metadata attributes")||b.includes("metadata quota")?E="metadata":b.includes("No metadata was provided")||b.includes("metadata file")?E="missing_metadata":b.includes("file size")||b.includes("exceeds")||b.includes("50 MB")?E="file_size":b.includes("format not supported")||b.includes("unsupported format")||b.includes("file type")?E="file_format":b.includes("embedding failed")||b.includes("EMBEDDING_FAILED")?E="embedding_failed":b.includes("indexing failed")||b.includes("INDEXING_FAILED")?E="indexing_failed":b.includes("access denied")||b.includes("AccessDeniedException")||b.includes("permission")?E="access_denied":(b.includes("quota")||b.includes("limit")||b.includes("ServiceQuotaExceededException"))&&(E="quota_exceeded"),h.push({errorMessage:b,files:v,errorType:E})}})}catch{h.push({errorMessage:p,files:[],errorType:"unknown"})}}),h},o=u=>{switch(u){case"metadata":return d.jsx(gi,{className:"h-4 w-4 text-orange-500"});case"missing_metadata":return d.jsx(cg,{className:"h-4 w-4 text-red-500"});case"file_size":return d.jsx(gi,{className:"h-4 w-4 text-yellow-500"});case"file_format":return d.jsx(cg,{className:"h-4 w-4 text-purple-500"});case"embedding_failed":return d.jsx(gi,{className:"h-4 w-4 text-red-600"});case"indexing_failed":return d.jsx(gi,{className:"h-4 w-4 text-red-600"});case"access_denied":return d.jsx(gi,{className:"h-4 w-4 text-red-700"});case"quota_exceeded":return d.jsx(gi,{className:"h-4 w-4 text-orange-600"});default:return d.jsx(gi,{className:"h-4 w-4 text-red-500"})}},a=u=>{switch(u){case"metadata":return"border-orange-200 bg-orange-50";case"missing_metadata":return"border-red-200 bg-red-50";case"file_size":return"border-yellow-200 bg-yellow-50";case"file_format":return"border-purple-200 bg-purple-50";case"embedding_failed":return"border-red-300 bg-red-100";case"indexing_failed":return"border-red-300 bg-red-100";case"access_denied":return"border-red-400 bg-red-100";case"quota_exceeded":return"border-orange-300 bg-orange-100";default:return"border-red-200 bg-red-50"}},s=u=>{switch(u){case"metadata":return"text-orange-800";case"missing_metadata":return"text-red-800";case"file_size":return"text-yellow-800";case"file_format":return"text-purple-800";case"embedding_failed":return"text-red-900";case"indexing_failed":return"text-red-900";case"access_denied":return"text-red-900";case"quota_exceeded":return"text-orange-900";default:return"text-red-800"}},l=r(t);return l.length===0?null:d.jsxs("div",{className:"border-t pt-2",children:[d.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[d.jsx(gi,{className:"h-4 w-4 text-red-500"}),d.jsxs("p",{className:"text-red-600 font-medium",children:["Các file lỗi (",l.reduce((u,h)=>u+h.files.length,0)," file)"]})]}),d.jsx("div",{className:"space-y-3 max-h-80 overflow-y-auto",children:l.map((u,h)=>d.jsxs("div",{className:`p-3 rounded-lg border ${a(u.errorType)}`,children:[d.jsx("div",{className:"flex items-start justify-between",children:d.jsxs("div",{className:"flex items-start gap-2 flex-1",children:[o(u.errorType),d.jsxs("div",{className:"flex-1",children:[d.jsx("p",{className:`font-medium text-sm ${s(u.errorType)}`,children:u.errorMessage}),u.files.length>0&&d.jsxs("p",{className:"text-xs text-gray-600 mt-1",children:[u.files.length," file bị ảnh hưởng"]})]})]})}),u.files.length>0&&d.jsxs("div",{className:"mt-3 pt-2 border-t border-gray-200",children:[d.jsx("p",{className:"text-xs font-medium text-gray-700 mb-2",children:"Danh sách file lỗi:"}),d.jsx("div",{className:"max-h-32 overflow-y-auto space-y-1",children:u.files.map((p,g)=>d.jsxs("div",{className:"flex items-center gap-2 text-xs p-2 bg-white/50 rounded hover:bg-white/80 transition-colors",children:[d.jsx(cg,{className:"h-3 w-3 text-red-400 flex-shrink-0"}),e?d.jsxs("button",{onClick:()=>n(p),className:"text-blue-600 hover:text-blue-800 underline break-all font-mono text-left flex-1 flex items-center gap-1",title:"Nhấp để điều hướng đến file",children:[d.jsx("span",{children:p.replace("s3://cts-llm-docs-bucket/","")}),d.jsx(VD,{className:"h-3 w-3 flex-shrink-0"})]}):d.jsx("span",{className:"text-gray-700 break-all font-mono",children:p.replace("s3://cts-llm-docs-bucket/","")})]},g))})]})]},h))})]})};var em={exports:{}},Cu={exports:{}},yt={};/** @license React v16.13.1
|
|
204
|
+
`);var dg=t=>typeof t=="number"&&!isNaN(t),oc=t=>typeof t=="string",Vx=t=>typeof t=="function",qD=t=>oc(t)||dg(t),YD=t=>M.isValidElement(t)||oc(t)||Vx(t)||dg(t),JD=1,Kx=()=>`${JD++}`,ho=new Map,ug=[],Gx=new Set,jx=()=>ho.size>0,QD=(t,{containerId:e})=>{var n;return(n=ho.get(e||1))==null?void 0:n.toasts.get(t)};function XD(t,e){var n;if(e)return!!((n=ho.get(e))!=null&&n.isToastActive(t));let r=!1;return ho.forEach(o=>{o.isToastActive(t)&&(r=!0)}),r}function ZD(t){if(!jx()){ug=ug.filter(e=>t!=null&&e.options.toastId!==t);return}if(t==null||qD(t))ho.forEach(e=>{e.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){let e=ho.get(t.containerId);e?e.removeToast(t.id):ho.forEach(n=>{n.removeToast(t.id)})}}var eL=(t={})=>{ho.forEach(e=>{e.props.limit&&(!t.containerId||e.id===t.containerId)&&e.clearQueue()})};function tL(t,e){YD(t)&&(jx()||ug.push({content:t,options:e}),ho.forEach(n=>{n.buildToast(t,e)}))}function Wx(t,e){ho.forEach(n=>{(e==null||!(e!=null&&e.containerId)||(e==null?void 0:e.containerId)===n.id)&&n.toggle(t,e==null?void 0:e.id)})}function nL(t){return Gx.add(t),()=>{Gx.delete(t)}}function rL(t){return t&&(oc(t.toastId)||dg(t.toastId))?t.toastId:Kx()}function ic(t,e){return tL(t,e),e.toastId}function Vd(t,e){return{...e,type:e&&e.type||t,toastId:rL(e)}}function Kd(t){return(e,n)=>ic(e,Vd(t,n))}function st(t,e){return ic(t,Vd("default",e))}st.loading=(t,e)=>ic(t,Vd("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...e}));function oL(t,{pending:e,error:n,success:r},o){let a;e&&(a=oc(e)?st.loading(e,o):st.loading(e.render,{...o,...e}));let s={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},l=(h,p,g)=>{if(p==null){st.dismiss(a);return}let w={type:h,...s,...o,data:g},y=oc(p)?{render:p}:p;return a?st.update(a,{...w,...y}):st(y.render,{...w,...y}),g},u=Vx(t)?t():t;return u.then(h=>l("success",r,h)).catch(h=>l("error",n,h)),u}st.promise=oL,st.success=Kd("success"),st.info=Kd("info"),st.error=Kd("error"),st.warning=Kd("warning"),st.warn=st.warning,st.dark=(t,e)=>ic(t,Vd("default",{theme:"dark",...e}));function iL(t){ZD(t)}st.dismiss=iL,st.clearWaitingQueue=eL,st.isActive=XD,st.update=(t,e={})=>{let n=QD(t,e);if(n){let{props:r,content:o}=n,a={delay:100,...r,...e,toastId:e.toastId||t,updateId:Kx()};a.toastId!==t&&(a.staleId=t);let s=a.render||o;delete a.render,ic(s,a)}},st.done=t=>{st.update(t,{progress:1})},st.onChange=nL,st.play=t=>Wx(!0,t),st.pause=t=>Wx(!1,t);const aL={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"},sL=t=>t==="SummaryOfSuggestedAI"||t==="KeywordAISuggestion"||t==="SuggestedAICategories",fg=t=>t==="fullPath"||t==="createAt"||t==="creator"||t==="creatorId"||t==="DataSource"||t==="AccessLevel"||t==="category"||t==="fileName",cL={STARTING:"Đang bắt đầu",IN_PROGRESS:"Đang đồng bộ",COMPLETE:"Đồng bộ thành công",FAILED:"Đồng bộ thất bại",STOPPING:"Đang dừng",STOPPED:"Đã dừng"},lL=t=>cL[t]||t;function mi(t){const e=dL(t),n=C.forwardRef((r,o)=>{const{children:a,...s}=r,l=C.Children.toArray(a),u=l.find(fL);if(u){const h=u.props.children,p=l.map(g=>g===u?C.Children.count(h)>1?C.Children.only(null):C.isValidElement(h)?h.props.children:null:g);return d.jsx(e,{...s,ref:o,children:C.isValidElement(h)?C.cloneElement(h,void 0,p):null})}return d.jsx(e,{...s,ref:o,children:a})});return n.displayName=`${t}.Slot`,n}var qx=mi("Slot");function dL(t){const e=C.forwardRef((n,r)=>{const{children:o,...a}=n;if(C.isValidElement(o)){const s=pL(o),l=hL(a,o.props);return o.type!==C.Fragment&&(l.ref=r?FC(r,s):s),C.cloneElement(o,l)}return C.Children.count(o)>1?C.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var uL=Symbol("radix.slottable");function fL(t){return C.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===uL}function hL(t,e){const n={...e};for(const r in e){const o=t[r],a=e[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...l)=>{const u=a(...l);return o(...l),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...t,...n}}function pL(t){var r,o;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(o=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:o.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}const hg="-",gL=t=>{const e=vL(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:s=>{const l=s.split(hg);return l[0]===""&&l.length!==1&&l.shift(),Yx(l,e)||mL(s)},getConflictingClassGroupIds:(s,l)=>{const u=n[s]||[];return l&&r[s]?[...u,...r[s]]:u}}},Yx=(t,e)=>{var s;if(t.length===0)return e.classGroupId;const n=t[0],r=e.nextPart.get(n),o=r?Yx(t.slice(1),r):void 0;if(o)return o;if(e.validators.length===0)return;const a=t.join(hg);return(s=e.validators.find(({validator:l})=>l(a)))==null?void 0:s.classGroupId},Jx=/^\[(.+)\]$/,mL=t=>{if(Jx.test(t)){const e=Jx.exec(t)[1],n=e==null?void 0:e.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},vL=t=>{const{theme:e,prefix:n}=t,r={nextPart:new Map,validators:[]};return wL(Object.entries(t.classGroups),n).forEach(([a,s])=>{pg(s,r,a,e)}),r},pg=(t,e,n,r)=>{t.forEach(o=>{if(typeof o=="string"){const a=o===""?e:Qx(e,o);a.classGroupId=n;return}if(typeof o=="function"){if(yL(o)){pg(o(r),e,n,r);return}e.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([a,s])=>{pg(s,Qx(e,a),n,r)})})},Qx=(t,e)=>{let n=t;return e.split(hg).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},yL=t=>t.isThemeGetter,wL=(t,e)=>e?t.map(([n,r])=>{const o=r.map(a=>typeof a=="string"?e+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([s,l])=>[e+s,l])):a);return[n,o]}):t,CL=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,r=new Map;const o=(a,s)=>{n.set(a,s),e++,e>t&&(e=0,r=n,n=new Map)};return{get(a){let s=n.get(a);if(s!==void 0)return s;if((s=r.get(a))!==void 0)return o(a,s),s},set(a,s){n.has(a)?n.set(a,s):o(a,s)}}},Xx="!",bL=t=>{const{separator:e,experimentalParseClassName:n}=t,r=e.length===1,o=e[0],a=e.length,s=l=>{const u=[];let h=0,p=0,g;for(let b=0;b<l.length;b++){let E=l[b];if(h===0){if(E===o&&(r||l.slice(b,b+a)===e)){u.push(l.slice(p,b)),p=b+a;continue}if(E==="/"){g=b;continue}}E==="["?h++:E==="]"&&h--}const w=u.length===0?l:l.substring(p),y=w.startsWith(Xx),x=y?w.substring(1):w,v=g&&g>p?g-p:void 0;return{modifiers:u,hasImportantModifier:y,baseClassName:x,maybePostfixModifierPosition:v}};return n?l=>n({className:l,parseClassName:s}):s},xL=t=>{if(t.length<=1)return t;const e=[];let n=[];return t.forEach(r=>{r[0]==="["?(e.push(...n.sort(),r),n=[]):n.push(r)}),e.push(...n.sort()),e},SL=t=>({cache:CL(t.cacheSize),parseClassName:bL(t),...gL(t)}),_L=/\s+/,EL=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=e,a=[],s=t.trim().split(_L);let l="";for(let u=s.length-1;u>=0;u-=1){const h=s[u],{modifiers:p,hasImportantModifier:g,baseClassName:w,maybePostfixModifierPosition:y}=n(h);let x=!!y,v=r(x?w.substring(0,y):w);if(!v){if(!x){l=h+(l.length>0?" "+l:l);continue}if(v=r(w),!v){l=h+(l.length>0?" "+l:l);continue}x=!1}const b=xL(p).join(":"),E=g?b+Xx:b,T=E+v;if(a.includes(T))continue;a.push(T);const N=o(v,x);for(let P=0;P<N.length;++P){const _=N[P];a.push(E+_)}l=h+(l.length>0?" "+l:l)}return l};function TL(){let t=0,e,n,r="";for(;t<arguments.length;)(e=arguments[t++])&&(n=Zx(e))&&(r&&(r+=" "),r+=n);return r}const Zx=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=Zx(t[r]))&&(n&&(n+=" "),n+=e);return n};function AL(t,...e){let n,r,o,a=s;function s(u){const h=e.reduce((p,g)=>g(p),t());return n=SL(h),r=n.cache.get,o=n.cache.set,a=l,l(u)}function l(u){const h=r(u);if(h)return h;const p=EL(u,n);return o(u,p),p}return function(){return a(TL.apply(null,arguments))}}const Ft=t=>{const e=n=>n[t]||[];return e.isThemeGetter=!0,e},eS=/^\[(?:([a-z-]+):)?(.+)\]$/i,IL=/^\d+\/\d+$/,kL=new Set(["px","full","screen"]),NL=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,PL=/\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$/,OL=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,ML=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,RL=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Fo=t=>Ja(t)||kL.has(t)||IL.test(t),vi=t=>Qa(t,"length",zL),Ja=t=>!!t&&!Number.isNaN(Number(t)),gg=t=>Qa(t,"number",Ja),ac=t=>!!t&&Number.isInteger(Number(t)),DL=t=>t.endsWith("%")&&Ja(t.slice(0,-1)),ot=t=>eS.test(t),yi=t=>NL.test(t),LL=new Set(["length","size","percentage"]),FL=t=>Qa(t,LL,tS),$L=t=>Qa(t,"position",tS),HL=new Set(["image","url"]),UL=t=>Qa(t,HL,KL),BL=t=>Qa(t,"",VL),sc=()=>!0,Qa=(t,e,n)=>{const r=eS.exec(t);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):n(r[2]):!1},zL=t=>PL.test(t)&&!OL.test(t),tS=()=>!1,VL=t=>ML.test(t),KL=t=>RL.test(t),GL=AL(()=>{const t=Ft("colors"),e=Ft("spacing"),n=Ft("blur"),r=Ft("brightness"),o=Ft("borderColor"),a=Ft("borderRadius"),s=Ft("borderSpacing"),l=Ft("borderWidth"),u=Ft("contrast"),h=Ft("grayscale"),p=Ft("hueRotate"),g=Ft("invert"),w=Ft("gap"),y=Ft("gradientColorStops"),x=Ft("gradientColorStopPositions"),v=Ft("inset"),b=Ft("margin"),E=Ft("opacity"),T=Ft("padding"),N=Ft("saturate"),P=Ft("scale"),_=Ft("sepia"),D=Ft("skew"),H=Ft("space"),K=Ft("translate"),ee=()=>["auto","contain","none"],W=()=>["auto","hidden","clip","visible","scroll"],de=()=>["auto",ot,e],se=()=>[ot,e],fe=()=>["",Fo,vi],q=()=>["auto",Ja,ot],Z=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Y=()=>["solid","dashed","dotted","double","none"],oe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Q=()=>["start","end","center","between","around","evenly","stretch"],X=()=>["","0",ot],$=()=>["auto","avoid","all","avoid-page","page","left","right","column"],te=()=>[Ja,ot];return{cacheSize:500,separator:":",theme:{colors:[sc],spacing:[Fo,vi],blur:["none","",yi,ot],brightness:te(),borderColor:[t],borderRadius:["none","","full",yi,ot],borderSpacing:se(),borderWidth:fe(),contrast:te(),grayscale:X(),hueRotate:te(),invert:X(),gap:se(),gradientColorStops:[t],gradientColorStopPositions:[DL,vi],inset:de(),margin:de(),opacity:te(),padding:se(),saturate:te(),scale:te(),sepia:X(),skew:te(),space:se(),translate:se()},classGroups:{aspect:[{aspect:["auto","square","video",ot]}],container:["container"],columns:[{columns:[yi]}],"break-after":[{"break-after":$()}],"break-before":[{"break-before":$()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Z(),ot]}],overflow:[{overflow:W()}],"overflow-x":[{"overflow-x":W()}],"overflow-y":[{"overflow-y":W()}],overscroll:[{overscroll:ee()}],"overscroll-x":[{"overscroll-x":ee()}],"overscroll-y":[{"overscroll-y":ee()}],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",ac,ot]}],basis:[{basis:de()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ot]}],grow:[{grow:X()}],shrink:[{shrink:X()}],order:[{order:["first","last","none",ac,ot]}],"grid-cols":[{"grid-cols":[sc]}],"col-start-end":[{col:["auto",{span:["full",ac,ot]},ot]}],"col-start":[{"col-start":q()}],"col-end":[{"col-end":q()}],"grid-rows":[{"grid-rows":[sc]}],"row-start-end":[{row:["auto",{span:[ac,ot]},ot]}],"row-start":[{"row-start":q()}],"row-end":[{"row-end":q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ot]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ot]}],gap:[{gap:[w]}],"gap-x":[{"gap-x":[w]}],"gap-y":[{"gap-y":[w]}],"justify-content":[{justify:["normal",...Q()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Q(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Q(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[T]}],px:[{px:[T]}],py:[{py:[T]}],ps:[{ps:[T]}],pe:[{pe:[T]}],pt:[{pt:[T]}],pr:[{pr:[T]}],pb:[{pb:[T]}],pl:[{pl:[T]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[H]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[H]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ot,e]}],"min-w":[{"min-w":[ot,e,"min","max","fit"]}],"max-w":[{"max-w":[ot,e,"none","full","min","max","fit","prose",{screen:[yi]},yi]}],h:[{h:[ot,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ot,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ot,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ot,e,"auto","min","max","fit"]}],"font-size":[{text:["base",yi,vi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",gg]}],"font-family":[{font:[sc]}],"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",ot]}],"line-clamp":[{"line-clamp":["none",Ja,gg]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Fo,ot]}],"list-image":[{"list-image":["none",ot]}],"list-style-type":[{list:["none","disc","decimal",ot]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[E]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[E]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Y(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Fo,vi]}],"underline-offset":[{"underline-offset":["auto",Fo,ot]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:se()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ot]}],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",ot]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[E]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Z(),$L]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",FL]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},UL]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[y]}],"gradient-via":[{via:[y]}],"gradient-to":[{to:[y]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[E]}],"border-style":[{border:[...Y(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[E]}],"divide-style":[{divide:Y()}],"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:["",...Y()]}],"outline-offset":[{"outline-offset":[Fo,ot]}],"outline-w":[{outline:[Fo,vi]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:fe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[E]}],"ring-offset-w":[{"ring-offset":[Fo,vi]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",yi,BL]}],"shadow-color":[{shadow:[sc]}],opacity:[{opacity:[E]}],"mix-blend":[{"mix-blend":[...oe(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":oe()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",yi,ot]}],grayscale:[{grayscale:[h]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[g]}],saturate:[{saturate:[N]}],sepia:[{sepia:[_]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[h]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[E]}],"backdrop-saturate":[{"backdrop-saturate":[N]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ot]}],duration:[{duration:te()}],ease:[{ease:["linear","in","out","in-out",ot]}],delay:[{delay:te()}],animate:[{animate:["none","spin","ping","pulse","bounce",ot]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[P]}],"scale-x":[{"scale-x":[P]}],"scale-y":[{"scale-y":[P]}],rotate:[{rotate:[ac,ot]}],"translate-x":[{"translate-x":[K]}],"translate-y":[{"translate-y":[K]}],"skew-x":[{"skew-x":[D]}],"skew-y":[{"skew-y":[D]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ot]}],accent:[{accent:["auto",t]}],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",ot]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":se()}],"scroll-mx":[{"scroll-mx":se()}],"scroll-my":[{"scroll-my":se()}],"scroll-ms":[{"scroll-ms":se()}],"scroll-me":[{"scroll-me":se()}],"scroll-mt":[{"scroll-mt":se()}],"scroll-mr":[{"scroll-mr":se()}],"scroll-mb":[{"scroll-mb":se()}],"scroll-ml":[{"scroll-ml":se()}],"scroll-p":[{"scroll-p":se()}],"scroll-px":[{"scroll-px":se()}],"scroll-py":[{"scroll-py":se()}],"scroll-ps":[{"scroll-ps":se()}],"scroll-pe":[{"scroll-pe":se()}],"scroll-pt":[{"scroll-pt":se()}],"scroll-pr":[{"scroll-pr":se()}],"scroll-pb":[{"scroll-pb":se()}],"scroll-pl":[{"scroll-pl":se()}],"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",ot]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[Fo,vi,gg]}],stroke:[{stroke:[t,"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 ze(...t){return GL(zx(t))}function qi(){let t=localStorage.getItem("dataLogin"),e;try{t&&(t=JSON.parse(t),e=t.user)}catch(n){console.error("Error parsing dataLogin from localStorage:",n),t=null}return e}const Gd=C.forwardRef(({className:t,...e},n)=>d.jsx("nav",{ref:n,"aria-label":"breadcrumb",className:ze("s3-explr-ui-breadcrumb",t),...e}));Gd.displayName="Breadcrumb";const jd=C.forwardRef(({className:t,...e},n)=>d.jsx("ol",{ref:n,className:ze("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5","s3-explr-ui-breadcrumb-list",t),...e}));jd.displayName="BreadcrumbList";const cc=C.forwardRef(({className:t,...e},n)=>d.jsx("li",{ref:n,className:ze("inline-flex items-center gap-1.5","s3-explr-ui-breadcrumb-item",t),...e}));cc.displayName="BreadcrumbItem";const lc=C.forwardRef(({asChild:t,className:e,...n},r)=>{const o=t?qx:"a";return d.jsx(o,{ref:r,className:ze("transition-colors hover:text-foreground","s3-explr-ui-breadcrumb-link",e),...n})});lc.displayName="BreadcrumbLink";const jL=C.forwardRef(({className:t,...e},n)=>d.jsx("span",{ref:n,role:"link","aria-disabled":"true","aria-current":"page",className:ze("font-normal text-foreground","s3-explr-ui-breadcrumb-page",t),...e}));jL.displayName="BreadcrumbPage";const Wd=({children:t,className:e,...n})=>d.jsx("li",{role:"presentation","aria-hidden":"true",className:ze("[&>svg]:w-3.5 [&>svg]:h-3.5","s3-explr-ui-breadcrumb-separator",e),...n,children:t??d.jsx(Hx,{})});Wd.displayName="BreadcrumbSeparator";const nS=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,rS=zx,mg=(t,e)=>n=>{var r;if((e==null?void 0:e.variants)==null)return rS(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:a}=e,s=Object.keys(o).map(h=>{const p=n==null?void 0:n[h],g=a==null?void 0:a[h];if(p===null)return null;const w=nS(p)||nS(g);return o[h][w]}),l=n&&Object.entries(n).reduce((h,p)=>{let[g,w]=p;return w===void 0||(h[g]=w),h},{}),u=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((h,p)=>{let{class:g,className:w,...y}=p;return Object.entries(y).every(x=>{let[v,b]=x;return Array.isArray(b)?b.includes({...a,...l}[v]):{...a,...l}[v]===b})?[...h,g,w]:h},[]);return rS(t,s,u,n==null?void 0:n.class,n==null?void 0:n.className)},oS=mg("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"}}),He=C.forwardRef(({className:t,variant:e,size:n,asChild:r=!1,...o},a)=>{const s=r?qx:"button";return d.jsx(s,{className:ze(oS({variant:e,size:n,className:t})),ref:a,...o})});He.displayName="Button";function iS(t){const e=C.useRef({value:t,previous:t});return C.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}function vg(t){const[e,n]=C.useState(void 0);return tn(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let s,l;if("borderBoxSize"in a){const u=a.borderBoxSize,h=Array.isArray(u)?u[0]:u;s=h.inlineSize,l=h.blockSize}else s=t.offsetWidth,l=t.offsetHeight;n({width:s,height:l})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else n(void 0)},[t]),e}var qd="Checkbox",[WL,$j]=gr(qd),[qL,yg]=WL(qd);function YL(t){const{__scopeCheckbox:e,checked:n,children:r,defaultChecked:o,disabled:a,form:s,name:l,onCheckedChange:u,required:h,value:p="on",internal_do_not_use_render:g}=t,[w,y]=ui({prop:n,defaultProp:o??!1,onChange:u,caller:qd}),[x,v]=C.useState(null),[b,E]=C.useState(null),T=C.useRef(!1),N=x?!!s||!!x.closest("form"):!0,P={checked:w,disabled:a,setChecked:y,control:x,setControl:v,name:l,form:s,value:p,hasConsumerStoppedPropagationRef:T,required:h,defaultChecked:wi(o)?!1:o,isFormControl:N,bubbleInput:b,setBubbleInput:E};return d.jsx(qL,{scope:e,...P,children:JL(g)?g(P):r})}var aS="CheckboxTrigger",sS=C.forwardRef(({__scopeCheckbox:t,onKeyDown:e,onClick:n,...r},o)=>{const{control:a,value:s,disabled:l,checked:u,required:h,setControl:p,setChecked:g,hasConsumerStoppedPropagationRef:w,isFormControl:y,bubbleInput:x}=yg(aS,t),v=rt(o,p),b=C.useRef(u);return C.useEffect(()=>{const E=a==null?void 0:a.form;if(E){const T=()=>g(b.current);return E.addEventListener("reset",T),()=>E.removeEventListener("reset",T)}},[a,g]),d.jsx(mt.button,{type:"button",role:"checkbox","aria-checked":wi(u)?"mixed":u,"aria-required":h,"data-state":fS(u),"data-disabled":l?"":void 0,disabled:l,value:s,...r,ref:v,onKeyDown:Ue(e,E=>{E.key==="Enter"&&E.preventDefault()}),onClick:Ue(n,E=>{g(T=>wi(T)?!0:!T),x&&y&&(w.current=E.isPropagationStopped(),w.current||E.stopPropagation())})})});sS.displayName=aS;var wg=C.forwardRef((t,e)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:s,disabled:l,value:u,onCheckedChange:h,form:p,...g}=t;return d.jsx(YL,{__scopeCheckbox:n,checked:o,defaultChecked:a,disabled:l,required:s,onCheckedChange:h,name:r,form:p,value:u,internal_do_not_use_render:({isFormControl:w})=>d.jsxs(d.Fragment,{children:[d.jsx(sS,{...g,ref:e,__scopeCheckbox:n}),w&&d.jsx(uS,{__scopeCheckbox:n})]})})});wg.displayName=qd;var cS="CheckboxIndicator",lS=C.forwardRef((t,e)=>{const{__scopeCheckbox:n,forceMount:r,...o}=t,a=yg(cS,n);return d.jsx(Ro,{present:r||wi(a.checked)||a.checked===!0,children:d.jsx(mt.span,{"data-state":fS(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:e,style:{pointerEvents:"none",...t.style}})})});lS.displayName=cS;var dS="CheckboxBubbleInput",uS=C.forwardRef(({__scopeCheckbox:t,...e},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:a,defaultChecked:s,required:l,disabled:u,name:h,value:p,form:g,bubbleInput:w,setBubbleInput:y}=yg(dS,t),x=rt(n,y),v=iS(a),b=vg(r);C.useEffect(()=>{const T=w;if(!T)return;const N=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(N,"checked").set,D=!o.current;if(v!==a&&_){const H=new Event("click",{bubbles:D});T.indeterminate=wi(a),_.call(T,wi(a)?!1:a),T.dispatchEvent(H)}},[w,v,a,o]);const E=C.useRef(wi(a)?!1:a);return d.jsx(mt.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??E.current,required:l,disabled:u,name:h,value:p,form:g,...e,tabIndex:-1,ref:x,style:{...e.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});uS.displayName=dS;function JL(t){return typeof t=="function"}function wi(t){return t==="indeterminate"}function fS(t){return wi(t)?"indeterminate":t?"checked":"unchecked"}const dc=C.forwardRef(({className:t,...e},n)=>d.jsx(wg,{ref:n,className:ze("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",t),...e,children:d.jsx(lS,{className:ze("s3-explr-ui-checkbox-indicator flex items-center justify-center text-current"),children:d.jsx($x,{className:"s3-explr-ui-checkbox-check h-4 w-4"})})}));dc.displayName=wg.displayName;const ar=Qs,uc=lM,QL=dM,hS=C.forwardRef(({className:t,...e},n)=>d.jsx(ja,{ref:n,className:ze("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",t),...e}));hS.displayName=ja.displayName;const zn=C.forwardRef(({className:t,children:e,...n},r)=>d.jsxs(QL,{children:[d.jsx(hS,{}),d.jsxs(Wa,{ref:r,className:ze("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",t),...n,children:[e,d.jsxs(kp,{className:ze("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(lg,{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"})]})]})]}));zn.displayName=Wa.displayName;const Vn=({className:t,...e})=>d.jsx("div",{className:ze("s3-explr-ui-dialog-header flex flex-col space-y-1.5 text-center sm:text-left",t),...e});Vn.displayName="DialogHeader";const Fr=({className:t,...e})=>d.jsx("div",{className:ze("s3-explr-ui-dialog-footer flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...e});Fr.displayName="DialogFooter";const Kn=C.forwardRef(({className:t,...e},n)=>d.jsx(Pb,{ref:n,className:ze("s3-explr-ui-dialog-title text-lg font-semibold leading-none tracking-tight",t),...e}));Kn.displayName=Pb.displayName;const Ci=C.forwardRef(({className:t,...e},n)=>d.jsx(Ob,{ref:n,className:ze("s3-explr-ui-dialog-description text-sm text-muted-foreground",t),...e}));Ci.displayName=Ob.displayName;const Gn=C.forwardRef(({className:t,type:e,...n},r)=>d.jsx("input",{type:e,className:ze("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",t),ref:r,...n}));Gn.displayName="Input";var XL="Label",pS=C.forwardRef((t,e)=>d.jsx(mt.label,{...t,ref:e,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=t.onMouseDown)==null||o.call(t,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));pS.displayName=XL;var gS=pS;const ZL=mg("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"}}),mr=C.forwardRef(({className:t,variant:e,size:n,...r},o)=>d.jsx(gS,{ref:o,className:ze(ZL({variant:e,size:n}),t),...r}));mr.displayName=gS.displayName;const Yd=({className:t,...e})=>d.jsx("nav",{role:"navigation","aria-label":"pagination",className:ze("mx-auto flex w-full justify-center",t),...e});Yd.displayName="Pagination";const Jd=C.forwardRef(({className:t,...e},n)=>d.jsx("ul",{ref:n,className:ze("flex flex-row items-center gap-1",t),...e}));Jd.displayName="PaginationContent";const $r=C.forwardRef(({className:t,...e},n)=>d.jsx("li",{ref:n,className:ze("",t),...e}));$r.displayName="PaginationItem";const Xa=({className:t,isActive:e,size:n="icon",...r})=>d.jsx("a",{"aria-current":e?"page":void 0,className:ze(oS({variant:e?"outline":"ghost",size:n}),t),...r});Xa.displayName="PaginationLink";const Qd=({className:t,...e})=>d.jsxs(Xa,{"aria-label":"Go to previous page",size:"default",className:ze("gap-1 pl-2.5",t),...e,children:[d.jsx(BD,{className:"h-4 w-4"}),d.jsx("span",{children:"Previous"})]});Qd.displayName="PaginationPrevious";const Xd=({className:t,...e})=>d.jsxs(Xa,{"aria-label":"Go to next page",size:"default",className:ze("gap-1 pr-2.5",t),...e,children:[d.jsx("span",{children:"Next"}),d.jsx(Hx,{className:"h-4 w-4"})]});Xd.displayName="PaginationNext";const Zd=({className:t,...e})=>d.jsxs("span",{"aria-hidden":!0,className:ze("flex h-9 w-9 items-center justify-center",t),...e,children:[d.jsx(zD,{className:"h-4 w-4"}),d.jsx("span",{className:"sr-only",children:"More pages"})]});Zd.displayName="PaginationEllipsis";const eu=C.forwardRef(({className:t,...e},n)=>d.jsx("div",{className:ze("relative w-full overflow-auto","s3-explr-ui-table-container"),children:d.jsx("table",{ref:n,className:ze("w-full caption-bottom text-sm","s3-explr-ui-table",t),...e})}));eu.displayName="Table";const tu=C.forwardRef(({className:t,...e},n)=>d.jsx("thead",{ref:n,className:ze("[&_tr]:border-b","s3-explr-ui-table-header",t),...e}));tu.displayName="TableHeader";const nu=C.forwardRef(({className:t,...e},n)=>d.jsx("tbody",{ref:n,className:ze("[&_tr:last-child]:border-0","s3-explr-ui-table-body",t),...e}));nu.displayName="TableBody";const eF=C.forwardRef(({className:t,...e},n)=>d.jsx("tfoot",{ref:n,className:ze("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0","s3-explr-ui-table-footer",t),...e}));eF.displayName="TableFooter";const Hr=C.forwardRef(({className:t,...e},n)=>d.jsx("tr",{ref:n,className:ze("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted","s3-explr-ui-table-row",t),...e}));Hr.displayName="TableRow";const po=C.forwardRef(({className:t,...e},n)=>d.jsx("th",{ref:n,className:ze("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",t),...e}));po.displayName="TableHead";const jn=C.forwardRef(({className:t,...e},n)=>d.jsx("td",{ref:n,className:ze("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]","s3-explr-ui-table-cell",t),...e}));jn.displayName="TableCell";const tF=C.forwardRef(({className:t,...e},n)=>d.jsx("caption",{ref:n,className:ze("mt-4 text-sm text-muted-foreground","s3-explr-ui-table-caption",t),...e}));tF.displayName="TableCaption";function mS(t){const e=nF(t),n=C.forwardRef((r,o)=>{const{children:a,...s}=r,l=C.Children.toArray(a),u=l.find(oF);if(u){const h=u.props.children,p=l.map(g=>g===u?C.Children.count(h)>1?C.Children.only(null):C.isValidElement(h)?h.props.children:null:g);return d.jsx(e,{...s,ref:o,children:C.isValidElement(h)?C.cloneElement(h,void 0,p):null})}return d.jsx(e,{...s,ref:o,children:a})});return n.displayName=`${t}.Slot`,n}function nF(t){const e=C.forwardRef((n,r)=>{const{children:o,...a}=n,s=C.isValidElement(o)?aF(o):void 0,l=rt(s,r);if(C.isValidElement(o)){const u=iF(a,o.props);return o.type!==C.Fragment&&(u.ref=l),C.cloneElement(o,u)}return C.Children.count(o)>1?C.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var rF=Symbol("radix.slottable");function oF(t){return C.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===rF}function iF(t,e){const n={...e};for(const r in e){const o=t[r],a=e[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...l)=>{const u=a(...l);return o(...l),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...t,...n}}function aF(t){var r,o;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(o=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:o.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function sF(t){const e=t+"CollectionProvider",[n,r]=gr(e),[o,a]=n(e,{collectionRef:{current:null},itemMap:new Map}),s=v=>{const{scope:b,children:E}=v,T=M.useRef(null),N=M.useRef(new Map).current;return d.jsx(o,{scope:b,itemMap:N,collectionRef:T,children:E})};s.displayName=e;const l=t+"CollectionSlot",u=mS(l),h=M.forwardRef((v,b)=>{const{scope:E,children:T}=v,N=a(l,E),P=rt(b,N.collectionRef);return d.jsx(u,{ref:P,children:T})});h.displayName=l;const p=t+"CollectionItemSlot",g="data-radix-collection-item",w=mS(p),y=M.forwardRef((v,b)=>{const{scope:E,children:T,...N}=v,P=M.useRef(null),_=rt(b,P),D=a(p,E);return M.useEffect(()=>(D.itemMap.set(P,{ref:P,...N}),()=>void D.itemMap.delete(P))),d.jsx(w,{[g]:"",ref:_,children:T})});y.displayName=p;function x(v){const b=a(t+"CollectionConsumer",v);return M.useCallback(()=>{const T=b.collectionRef.current;if(!T)return[];const N=Array.from(T.querySelectorAll(`[${g}]`));return Array.from(b.itemMap.values()).sort((D,H)=>N.indexOf(D.ref.current)-N.indexOf(H.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:s,Slot:h,ItemSlot:y},x,r]}var cF=C.createContext(void 0);function Cg(t){const e=C.useContext(cF);return t||e||"ltr"}var bg="rovingFocusGroup.onEntryFocus",lF={bubbles:!1,cancelable:!0},fc="RovingFocusGroup",[xg,vS,dF]=sF(fc),[uF,yS]=gr(fc,[dF]),[fF,hF]=uF(fc),wS=C.forwardRef((t,e)=>d.jsx(xg.Provider,{scope:t.__scopeRovingFocusGroup,children:d.jsx(xg.Slot,{scope:t.__scopeRovingFocusGroup,children:d.jsx(pF,{...t,ref:e})})}));wS.displayName=fc;var pF=C.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:h,preventScrollOnEntryFocus:p=!1,...g}=t,w=C.useRef(null),y=rt(e,w),x=Cg(a),[v,b]=ui({prop:s,defaultProp:l??null,onChange:u,caller:fc}),[E,T]=C.useState(!1),N=gn(h),P=vS(n),_=C.useRef(!1),[D,H]=C.useState(0);return C.useEffect(()=>{const K=w.current;if(K)return K.addEventListener(bg,N),()=>K.removeEventListener(bg,N)},[N]),d.jsx(fF,{scope:n,orientation:r,dir:x,loop:o,currentTabStopId:v,onItemFocus:C.useCallback(K=>b(K),[b]),onItemShiftTab:C.useCallback(()=>T(!0),[]),onFocusableItemAdd:C.useCallback(()=>H(K=>K+1),[]),onFocusableItemRemove:C.useCallback(()=>H(K=>K-1),[]),children:d.jsx(mt.div,{tabIndex:E||D===0?-1:0,"data-orientation":r,...g,ref:y,style:{outline:"none",...t.style},onMouseDown:Ue(t.onMouseDown,()=>{_.current=!0}),onFocus:Ue(t.onFocus,K=>{const ee=!_.current;if(K.target===K.currentTarget&&ee&&!E){const W=new CustomEvent(bg,lF);if(K.currentTarget.dispatchEvent(W),!W.defaultPrevented){const de=P().filter(Y=>Y.focusable),se=de.find(Y=>Y.active),fe=de.find(Y=>Y.id===v),Z=[se,fe,...de].filter(Boolean).map(Y=>Y.ref.current);xS(Z,p)}}_.current=!1}),onBlur:Ue(t.onBlur,()=>T(!1))})})}),CS="RovingFocusGroupItem",bS=C.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:s,...l}=t,u=Mo(),h=a||u,p=hF(CS,n),g=p.currentTabStopId===h,w=vS(n),{onFocusableItemAdd:y,onFocusableItemRemove:x,currentTabStopId:v}=p;return C.useEffect(()=>{if(r)return y(),()=>x()},[r,y,x]),d.jsx(xg.ItemSlot,{scope:n,id:h,focusable:r,active:o,children:d.jsx(mt.span,{tabIndex:g?0:-1,"data-orientation":p.orientation,...l,ref:e,onMouseDown:Ue(t.onMouseDown,b=>{r?p.onItemFocus(h):b.preventDefault()}),onFocus:Ue(t.onFocus,()=>p.onItemFocus(h)),onKeyDown:Ue(t.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){p.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const E=vF(b,p.orientation,p.dir);if(E!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let N=w().filter(P=>P.focusable).map(P=>P.ref.current);if(E==="last")N.reverse();else if(E==="prev"||E==="next"){E==="prev"&&N.reverse();const P=N.indexOf(b.currentTarget);N=p.loop?yF(N,P+1):N.slice(P+1)}setTimeout(()=>xS(N))}}),children:typeof s=="function"?s({isCurrentTabStop:g,hasTabStop:v!=null}):s})})});bS.displayName=CS;var gF={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function mF(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function vF(t,e,n){const r=mF(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return gF[r]}function xS(t,e=!1){const n=document.activeElement;for(const r of t)if(r===n||(r.focus({preventScroll:e}),document.activeElement!==n))return}function yF(t,e){return t.map((n,r)=>t[(e+r)%t.length])}var wF=wS,CF=bS,ru="Tabs",[bF,Hj]=gr(ru,[yS]),SS=yS(),[xF,Sg]=bF(ru),_S=C.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:s="horizontal",dir:l,activationMode:u="automatic",...h}=t,p=Cg(l),[g,w]=ui({prop:r,onChange:o,defaultProp:a??"",caller:ru});return d.jsx(xF,{scope:n,baseId:Mo(),value:g,onValueChange:w,orientation:s,dir:p,activationMode:u,children:d.jsx(mt.div,{dir:p,"data-orientation":s,...h,ref:e})})});_S.displayName=ru;var ES="TabsList",TS=C.forwardRef((t,e)=>{const{__scopeTabs:n,loop:r=!0,...o}=t,a=Sg(ES,n),s=SS(n);return d.jsx(wF,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:r,children:d.jsx(mt.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:e})})});TS.displayName=ES;var AS="TabsTrigger",IS=C.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=t,s=Sg(AS,n),l=SS(n),u=PS(s.baseId,r),h=OS(s.baseId,r),p=r===s.value;return d.jsx(CF,{asChild:!0,...l,focusable:!o,active:p,children:d.jsx(mt.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":h,"data-state":p?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:u,...a,ref:e,onMouseDown:Ue(t.onMouseDown,g=>{!o&&g.button===0&&g.ctrlKey===!1?s.onValueChange(r):g.preventDefault()}),onKeyDown:Ue(t.onKeyDown,g=>{[" ","Enter"].includes(g.key)&&s.onValueChange(r)}),onFocus:Ue(t.onFocus,()=>{const g=s.activationMode!=="manual";!p&&!o&&g&&s.onValueChange(r)})})})});IS.displayName=AS;var kS="TabsContent",NS=C.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...s}=t,l=Sg(kS,n),u=PS(l.baseId,r),h=OS(l.baseId,r),p=r===l.value,g=C.useRef(p);return C.useEffect(()=>{const w=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(w)},[]),d.jsx(Ro,{present:o||p,children:({present:w})=>d.jsx(mt.div,{"data-state":p?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":u,hidden:!w,id:h,tabIndex:0,...s,ref:e,style:{...t.style,animationDuration:g.current?"0s":void 0},children:w&&a})})});NS.displayName=kS;function PS(t,e){return`${t}-trigger-${e}`}function OS(t,e){return`${t}-content-${e}`}var SF=_S,MS=TS,RS=IS,DS=NS;const _g=SF,ou=C.forwardRef(({className:t,...e},n)=>d.jsx(MS,{ref:n,className:ze("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",t),...e}));ou.displayName=MS.displayName;const Yi=C.forwardRef(({className:t,...e},n)=>d.jsx(RS,{ref:n,className:ze("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",t),...e}));Yi.displayName=RS.displayName;const Ji=C.forwardRef(({className:t,...e},n)=>d.jsx(DS,{ref:n,className:ze("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t),...e}));Ji.displayName=DS.displayName;const hc=C.forwardRef(({className:t,...e},n)=>d.jsx("textarea",{className:ze("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",t),ref:n,...e}));hc.displayName="Textarea";function LS(t){const e=_F(t),n=C.forwardRef((r,o)=>{const{children:a,...s}=r,l=C.Children.toArray(a),u=l.find(TF);if(u){const h=u.props.children,p=l.map(g=>g===u?C.Children.count(h)>1?C.Children.only(null):C.isValidElement(h)?h.props.children:null:g);return d.jsx(e,{...s,ref:o,children:C.isValidElement(h)?C.cloneElement(h,void 0,p):null})}return d.jsx(e,{...s,ref:o,children:a})});return n.displayName=`${t}.Slot`,n}function _F(t){const e=C.forwardRef((n,r)=>{const{children:o,...a}=n,s=C.isValidElement(o)?IF(o):void 0,l=rt(s,r);if(C.isValidElement(o)){const u=AF(a,o.props);return o.type!==C.Fragment&&(u.ref=l),C.cloneElement(o,u)}return C.Children.count(o)>1?C.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var EF=Symbol("radix.slottable");function TF(t){return C.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===EF}function AF(t,e){const n={...e};for(const r in e){const o=t[r],a=e[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...l)=>{const u=a(...l);return o(...l),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...t,...n}}function IF(t){var r,o;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(o=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:o.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function kF(t){const e=t+"CollectionProvider",[n,r]=gr(e),[o,a]=n(e,{collectionRef:{current:null},itemMap:new Map}),s=v=>{const{scope:b,children:E}=v,T=M.useRef(null),N=M.useRef(new Map).current;return d.jsx(o,{scope:b,itemMap:N,collectionRef:T,children:E})};s.displayName=e;const l=t+"CollectionSlot",u=LS(l),h=M.forwardRef((v,b)=>{const{scope:E,children:T}=v,N=a(l,E),P=rt(b,N.collectionRef);return d.jsx(u,{ref:P,children:T})});h.displayName=l;const p=t+"CollectionItemSlot",g="data-radix-collection-item",w=LS(p),y=M.forwardRef((v,b)=>{const{scope:E,children:T,...N}=v,P=M.useRef(null),_=rt(b,P),D=a(p,E);return M.useEffect(()=>(D.itemMap.set(P,{ref:P,...N}),()=>void D.itemMap.delete(P))),d.jsx(w,{[g]:"",ref:_,children:T})});y.displayName=p;function x(v){const b=a(t+"CollectionConsumer",v);return M.useCallback(()=>{const T=b.collectionRef.current;if(!T)return[];const N=Array.from(T.querySelectorAll(`[${g}]`));return Array.from(b.itemMap.values()).sort((D,H)=>N.indexOf(D.ref.current)-N.indexOf(H.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:s,Slot:h,ItemSlot:y},x,r]}var NF=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),PF="VisuallyHidden",Eg=C.forwardRef((t,e)=>d.jsx(mt.span,{...t,ref:e,style:{...NF,...t.style}}));Eg.displayName=PF;var Tg="ToastProvider",[Ag,OF,MF]=kF("Toast"),[FS,Uj]=gr("Toast",[MF]),[RF,iu]=FS(Tg),$S=t=>{const{__scopeToast:e,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:a=50,children:s}=t,[l,u]=C.useState(null),[h,p]=C.useState(0),g=C.useRef(!1),w=C.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Tg}\`. Expected non-empty \`string\`.`),d.jsx(Ag.Provider,{scope:e,children:d.jsx(RF,{scope:e,label:n,duration:r,swipeDirection:o,swipeThreshold:a,toastCount:h,viewport:l,onViewportChange:u,onToastAdd:C.useCallback(()=>p(y=>y+1),[]),onToastRemove:C.useCallback(()=>p(y=>y-1),[]),isFocusedToastEscapeKeyDownRef:g,isClosePausedRef:w,children:s})})};$S.displayName=Tg;var HS="ToastViewport",DF=["F8"],Ig="toast.viewportPause",kg="toast.viewportResume",US=C.forwardRef((t,e)=>{const{__scopeToast:n,hotkey:r=DF,label:o="Notifications ({hotkey})",...a}=t,s=iu(HS,n),l=OF(n),u=C.useRef(null),h=C.useRef(null),p=C.useRef(null),g=C.useRef(null),w=rt(e,g,s.onViewportChange),y=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),x=s.toastCount>0;C.useEffect(()=>{const b=E=>{var N;r.length!==0&&r.every(P=>E[P]||E.code===P)&&((N=g.current)==null||N.focus())};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[r]),C.useEffect(()=>{const b=u.current,E=g.current;if(x&&b&&E){const T=()=>{if(!s.isClosePausedRef.current){const D=new CustomEvent(Ig);E.dispatchEvent(D),s.isClosePausedRef.current=!0}},N=()=>{if(s.isClosePausedRef.current){const D=new CustomEvent(kg);E.dispatchEvent(D),s.isClosePausedRef.current=!1}},P=D=>{!b.contains(D.relatedTarget)&&N()},_=()=>{b.contains(document.activeElement)||N()};return b.addEventListener("focusin",T),b.addEventListener("focusout",P),b.addEventListener("pointermove",T),b.addEventListener("pointerleave",_),window.addEventListener("blur",T),window.addEventListener("focus",N),()=>{b.removeEventListener("focusin",T),b.removeEventListener("focusout",P),b.removeEventListener("pointermove",T),b.removeEventListener("pointerleave",_),window.removeEventListener("blur",T),window.removeEventListener("focus",N)}}},[x,s.isClosePausedRef]);const v=C.useCallback(({tabbingDirection:b})=>{const T=l().map(N=>{const P=N.ref.current,_=[P,...qF(P)];return b==="forwards"?_:_.reverse()});return(b==="forwards"?T.reverse():T).flat()},[l]);return C.useEffect(()=>{const b=g.current;if(b){const E=T=>{var _,D,H;const N=T.altKey||T.ctrlKey||T.metaKey;if(T.key==="Tab"&&!N){const K=document.activeElement,ee=T.shiftKey;if(T.target===b&&ee){(_=h.current)==null||_.focus();return}const se=v({tabbingDirection:ee?"backwards":"forwards"}),fe=se.findIndex(q=>q===K);Og(se.slice(fe+1))?T.preventDefault():ee?(D=h.current)==null||D.focus():(H=p.current)==null||H.focus()}};return b.addEventListener("keydown",E),()=>b.removeEventListener("keydown",E)}},[l,v]),d.jsxs(XO,{ref:u,role:"region","aria-label":o.replace("{hotkey}",y),tabIndex:-1,style:{pointerEvents:x?void 0:"none"},children:[x&&d.jsx(Ng,{ref:h,onFocusFromOutsideViewport:()=>{const b=v({tabbingDirection:"forwards"});Og(b)}}),d.jsx(Ag.Slot,{scope:n,children:d.jsx(mt.ol,{tabIndex:-1,...a,ref:w})}),x&&d.jsx(Ng,{ref:p,onFocusFromOutsideViewport:()=>{const b=v({tabbingDirection:"backwards"});Og(b)}})]})});US.displayName=HS;var BS="ToastFocusProxy",Ng=C.forwardRef((t,e)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=t,a=iu(BS,n);return d.jsx(Eg,{"aria-hidden":!0,tabIndex:0,...o,ref:e,style:{position:"fixed"},onFocus:s=>{var h;const l=s.relatedTarget;!((h=a.viewport)!=null&&h.contains(l))&&r()}})});Ng.displayName=BS;var pc="Toast",LF="toast.swipeStart",FF="toast.swipeMove",$F="toast.swipeCancel",HF="toast.swipeEnd",zS=C.forwardRef((t,e)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:a,...s}=t,[l,u]=ui({prop:r,defaultProp:o??!0,onChange:a,caller:pc});return d.jsx(Ro,{present:n||l,children:d.jsx(zF,{open:l,...s,ref:e,onClose:()=>u(!1),onPause:gn(t.onPause),onResume:gn(t.onResume),onSwipeStart:Ue(t.onSwipeStart,h=>{h.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Ue(t.onSwipeMove,h=>{const{x:p,y:g}=h.detail.delta;h.currentTarget.setAttribute("data-swipe","move"),h.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${p}px`),h.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${g}px`)}),onSwipeCancel:Ue(t.onSwipeCancel,h=>{h.currentTarget.setAttribute("data-swipe","cancel"),h.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),h.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),h.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),h.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Ue(t.onSwipeEnd,h=>{const{x:p,y:g}=h.detail.delta;h.currentTarget.setAttribute("data-swipe","end"),h.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),h.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),h.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${p}px`),h.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${g}px`),u(!1)})})})});zS.displayName=pc;var[UF,BF]=FS(pc,{onClose(){}}),zF=C.forwardRef((t,e)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:a,onClose:s,onEscapeKeyDown:l,onPause:u,onResume:h,onSwipeStart:p,onSwipeMove:g,onSwipeCancel:w,onSwipeEnd:y,...x}=t,v=iu(pc,n),[b,E]=C.useState(null),T=rt(e,q=>E(q)),N=C.useRef(null),P=C.useRef(null),_=o||v.duration,D=C.useRef(0),H=C.useRef(_),K=C.useRef(0),{onToastAdd:ee,onToastRemove:W}=v,de=gn(()=>{var Z;(b==null?void 0:b.contains(document.activeElement))&&((Z=v.viewport)==null||Z.focus()),s()}),se=C.useCallback(q=>{!q||q===1/0||(window.clearTimeout(K.current),D.current=new Date().getTime(),K.current=window.setTimeout(de,q))},[de]);C.useEffect(()=>{const q=v.viewport;if(q){const Z=()=>{se(H.current),h==null||h()},Y=()=>{const oe=new Date().getTime()-D.current;H.current=H.current-oe,window.clearTimeout(K.current),u==null||u()};return q.addEventListener(Ig,Y),q.addEventListener(kg,Z),()=>{q.removeEventListener(Ig,Y),q.removeEventListener(kg,Z)}}},[v.viewport,_,u,h,se]),C.useEffect(()=>{a&&!v.isClosePausedRef.current&&se(_)},[a,_,v.isClosePausedRef,se]),C.useEffect(()=>(ee(),()=>W()),[ee,W]);const fe=C.useMemo(()=>b?YS(b):null,[b]);return v.viewport?d.jsxs(d.Fragment,{children:[fe&&d.jsx(VF,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:fe}),d.jsx(UF,{scope:n,onClose:de,children:Ia.createPortal(d.jsx(Ag.ItemSlot,{scope:n,children:d.jsx(QO,{asChild:!0,onEscapeKeyDown:Ue(l,()=>{v.isFocusedToastEscapeKeyDownRef.current||de(),v.isFocusedToastEscapeKeyDownRef.current=!1}),children:d.jsx(mt.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":v.swipeDirection,...x,ref:T,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:Ue(t.onKeyDown,q=>{q.key==="Escape"&&(l==null||l(q.nativeEvent),q.nativeEvent.defaultPrevented||(v.isFocusedToastEscapeKeyDownRef.current=!0,de()))}),onPointerDown:Ue(t.onPointerDown,q=>{q.button===0&&(N.current={x:q.clientX,y:q.clientY})}),onPointerMove:Ue(t.onPointerMove,q=>{if(!N.current)return;const Z=q.clientX-N.current.x,Y=q.clientY-N.current.y,oe=!!P.current,Q=["left","right"].includes(v.swipeDirection),X=["left","up"].includes(v.swipeDirection)?Math.min:Math.max,$=Q?X(0,Z):0,te=Q?0:X(0,Y),_e=q.pointerType==="touch"?10:2,ke={x:$,y:te},xe={originalEvent:q,delta:ke};oe?(P.current=ke,au(FF,g,xe,{discrete:!1})):JS(ke,v.swipeDirection,_e)?(P.current=ke,au(LF,p,xe,{discrete:!1}),q.target.setPointerCapture(q.pointerId)):(Math.abs(Z)>_e||Math.abs(Y)>_e)&&(N.current=null)}),onPointerUp:Ue(t.onPointerUp,q=>{const Z=P.current,Y=q.target;if(Y.hasPointerCapture(q.pointerId)&&Y.releasePointerCapture(q.pointerId),P.current=null,N.current=null,Z){const oe=q.currentTarget,Q={originalEvent:q,delta:Z};JS(Z,v.swipeDirection,v.swipeThreshold)?au(HF,y,Q,{discrete:!0}):au($F,w,Q,{discrete:!0}),oe.addEventListener("click",X=>X.preventDefault(),{once:!0})}})})})}),v.viewport)})]}):null}),VF=t=>{const{__scopeToast:e,children:n,...r}=t,o=iu(pc,e),[a,s]=C.useState(!1),[l,u]=C.useState(!1);return jF(()=>s(!0)),C.useEffect(()=>{const h=window.setTimeout(()=>u(!0),1e3);return()=>window.clearTimeout(h)},[]),l?null:d.jsx(fd,{asChild:!0,children:d.jsx(Eg,{...r,children:a&&d.jsxs(d.Fragment,{children:[o.label," ",n]})})})},KF="ToastTitle",VS=C.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return d.jsx(mt.div,{...r,ref:e})});VS.displayName=KF;var GF="ToastDescription",KS=C.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return d.jsx(mt.div,{...r,ref:e})});KS.displayName=GF;var GS="ToastAction",jS=C.forwardRef((t,e)=>{const{altText:n,...r}=t;return n.trim()?d.jsx(qS,{altText:n,asChild:!0,children:d.jsx(Pg,{...r,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${GS}\`. Expected non-empty \`string\`.`),null)});jS.displayName=GS;var WS="ToastClose",Pg=C.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t,o=BF(WS,n);return d.jsx(qS,{asChild:!0,children:d.jsx(mt.button,{type:"button",...r,ref:e,onClick:Ue(t.onClick,o.onClose)})})});Pg.displayName=WS;var qS=C.forwardRef((t,e)=>{const{__scopeToast:n,altText:r,...o}=t;return d.jsx(mt.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:e})});function YS(t){const e=[];return Array.from(t.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&e.push(r.textContent),WF(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",a=r.dataset.radixToastAnnounceExclude==="";if(!o)if(a){const s=r.dataset.radixToastAnnounceAlt;s&&e.push(s)}else e.push(...YS(r))}}),e}function au(t,e,n,{discrete:r}){const o=n.originalEvent.currentTarget,a=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});e&&o.addEventListener(t,e,{once:!0}),r?$C(o,a):o.dispatchEvent(a)}var JS=(t,e,n=0)=>{const r=Math.abs(t.x),o=Math.abs(t.y),a=r>o;return e==="left"||e==="right"?a&&r>n:!a&&o>n};function jF(t=()=>{}){const e=gn(t);tn(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[e])}function WF(t){return t.nodeType===t.ELEMENT_NODE}function qF(t){const e=[],n=document.createTreeWalker(t,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();)e.push(n.currentNode);return e}function Og(t){const e=document.activeElement;return t.some(n=>n===e?!0:(n.focus(),document.activeElement!==e))}var YF=$S,QS=US,XS=zS,ZS=VS,e_=KS,t_=jS,n_=Pg;const JF=YF,r_=C.forwardRef(({className:t,...e},n)=>d.jsx(QS,{ref:n,className:ze("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]",t),...e}));r_.displayName=QS.displayName;const QF=mg("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"}}),o_=C.forwardRef(({className:t,variant:e,...n},r)=>d.jsx(XS,{ref:r,className:ze(QF({variant:e}),t),...n}));o_.displayName=XS.displayName;const XF=C.forwardRef(({className:t,...e},n)=>d.jsx(t_,{ref:n,className:ze("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",t),...e}));XF.displayName=t_.displayName;const i_=C.forwardRef(({className:t,...e},n)=>d.jsx(n_,{ref:n,className:ze("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",t),"toast-close":"",...e,children:d.jsx(lg,{className:"s3-explr-ui-toast-close-icon h-4 w-4"})}));i_.displayName=n_.displayName;const a_=C.forwardRef(({className:t,...e},n)=>d.jsx(ZS,{ref:n,className:ze("s3-explr-ui-toast-title text-sm font-semibold [&+div]:text-xs",t),...e}));a_.displayName=ZS.displayName;const s_=C.forwardRef(({className:t,...e},n)=>d.jsx(e_,{ref:n,className:ze("text-sm opacity-90 font-bold",t),...e}));s_.displayName=e_.displayName;const ZF=1,e2=1e6;let Mg=0;function t2(){return Mg=(Mg+1)%Number.MAX_SAFE_INTEGER,Mg.toString()}const Rg=new Map,c_=t=>{if(Rg.has(t))return;const e=setTimeout(()=>{Rg.delete(t),gc({type:"REMOVE_TOAST",toastId:t})},e2);Rg.set(t,e)},n2=(t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,ZF)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(n=>n.id===e.toast.id?{...n,...e.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=e;return n?c_(n):t.toasts.forEach(r=>{c_(r.id)}),{...t,toasts:t.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(n=>n.id!==e.toastId)}}},su=[];let cu={toasts:[]};function gc(t){cu=n2(cu,t),su.forEach(e=>{e(cu)})}function r2({...t}){const e=t2(),n=o=>gc({type:"UPDATE_TOAST",toast:{...o,id:e}}),r=()=>gc({type:"DISMISS_TOAST",toastId:e});return gc({type:"ADD_TOAST",toast:{...t,id:e,open:!0,onOpenChange:o=>{o||r()}}}),{id:e,dismiss:r,update:n}}function mc(){const[t,e]=C.useState(cu);return C.useEffect(()=>(su.push(e),()=>{const n=su.indexOf(e);n>-1&&su.splice(n,1)}),[t]),{...t,toast:r2,dismiss:n=>gc({type:"DISMISS_TOAST",toastId:n})}}function l_(){const{toasts:t}=mc();return d.jsxs(JF,{children:[t.map(function({id:e,title:n,description:r,action:o,...a}){return d.jsxs(o_,{...a,className:`s3-explr-ui-toast ${a.className||""}`,children:[d.jsxs("div",{className:"s3-explr-ui-toast-content grid gap-1",children:[n&&d.jsx(a_,{className:"s3-explr-ui-toast-title",children:n}),r&&d.jsx(s_,{className:"s3-explr-ui-toast-description",children:r})]}),o&&d.jsx("div",{className:"s3-explr-ui-toast-action",children:o}),d.jsx(i_,{className:"s3-explr-ui-toast-close"})]},e)}),d.jsx(r_,{className:"s3-explr-ui-toast-viewport"})]})}const o2=["top","right","bottom","left"],bi=Math.min,sr=Math.max,lu=Math.round,du=Math.floor,go=t=>({x:t,y:t}),i2={left:"right",right:"left",bottom:"top",top:"bottom"},a2={start:"end",end:"start"};function Dg(t,e,n){return sr(t,bi(e,n))}function $o(t,e){return typeof t=="function"?t(e):t}function Ho(t){return t.split("-")[0]}function Za(t){return t.split("-")[1]}function Lg(t){return t==="x"?"y":"x"}function Fg(t){return t==="y"?"height":"width"}function Uo(t){return["top","bottom"].includes(Ho(t))?"y":"x"}function $g(t){return Lg(Uo(t))}function s2(t,e,n){n===void 0&&(n=!1);const r=Za(t),o=$g(t),a=Fg(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[a]>e.floating[a]&&(s=uu(s)),[s,uu(s)]}function c2(t){const e=uu(t);return[Hg(t),e,Hg(e)]}function Hg(t){return t.replace(/start|end/g,e=>a2[e])}function l2(t,e,n){const r=["left","right"],o=["right","left"],a=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return n?e?o:r:e?r:o;case"left":case"right":return e?a:s;default:return[]}}function d2(t,e,n,r){const o=Za(t);let a=l2(Ho(t),n==="start",r);return o&&(a=a.map(s=>s+"-"+o),e&&(a=a.concat(a.map(Hg)))),a}function uu(t){return t.replace(/left|right|bottom|top/g,e=>i2[e])}function u2(t){return{top:0,right:0,bottom:0,left:0,...t}}function d_(t){return typeof t!="number"?u2(t):{top:t,right:t,bottom:t,left:t}}function fu(t){const{x:e,y:n,width:r,height:o}=t;return{width:r,height:o,top:n,left:e,right:e+r,bottom:n+o,x:e,y:n}}function u_(t,e,n){let{reference:r,floating:o}=t;const a=Uo(e),s=$g(e),l=Fg(s),u=Ho(e),h=a==="y",p=r.x+r.width/2-o.width/2,g=r.y+r.height/2-o.height/2,w=r[l]/2-o[l]/2;let y;switch(u){case"top":y={x:p,y:r.y-o.height};break;case"bottom":y={x:p,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:g};break;case"left":y={x:r.x-o.width,y:g};break;default:y={x:r.x,y:r.y}}switch(Za(e)){case"start":y[s]-=w*(n&&h?-1:1);break;case"end":y[s]+=w*(n&&h?-1:1);break}return y}const f2=async(t,e,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:s}=n,l=a.filter(Boolean),u=await(s.isRTL==null?void 0:s.isRTL(e));let h=await s.getElementRects({reference:t,floating:e,strategy:o}),{x:p,y:g}=u_(h,r,u),w=r,y={},x=0;for(let v=0;v<l.length;v++){const{name:b,fn:E}=l[v],{x:T,y:N,data:P,reset:_}=await E({x:p,y:g,initialPlacement:r,placement:w,strategy:o,middlewareData:y,rects:h,platform:s,elements:{reference:t,floating:e}});p=T??p,g=N??g,y={...y,[b]:{...y[b],...P}},_&&x<=50&&(x++,typeof _=="object"&&(_.placement&&(w=_.placement),_.rects&&(h=_.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:o}):_.rects),{x:p,y:g}=u_(h,w,u)),v=-1)}return{x:p,y:g,placement:w,strategy:o,middlewareData:y}};async function vc(t,e){var n;e===void 0&&(e={});const{x:r,y:o,platform:a,rects:s,elements:l,strategy:u}=t,{boundary:h="clippingAncestors",rootBoundary:p="viewport",elementContext:g="floating",altBoundary:w=!1,padding:y=0}=$o(e,t),x=d_(y),b=l[w?g==="floating"?"reference":"floating":g],E=fu(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(b)))==null||n?b:b.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:h,rootBoundary:p,strategy:u})),T=g==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,N=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),P=await(a.isElement==null?void 0:a.isElement(N))?await(a.getScale==null?void 0:a.getScale(N))||{x:1,y:1}:{x:1,y:1},_=fu(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:T,offsetParent:N,strategy:u}):T);return{top:(E.top-_.top+x.top)/P.y,bottom:(_.bottom-E.bottom+x.bottom)/P.y,left:(E.left-_.left+x.left)/P.x,right:(_.right-E.right+x.right)/P.x}}const h2=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:o,rects:a,platform:s,elements:l,middlewareData:u}=e,{element:h,padding:p=0}=$o(t,e)||{};if(h==null)return{};const g=d_(p),w={x:n,y:r},y=$g(o),x=Fg(y),v=await s.getDimensions(h),b=y==="y",E=b?"top":"left",T=b?"bottom":"right",N=b?"clientHeight":"clientWidth",P=a.reference[x]+a.reference[y]-w[y]-a.floating[x],_=w[y]-a.reference[y],D=await(s.getOffsetParent==null?void 0:s.getOffsetParent(h));let H=D?D[N]:0;(!H||!await(s.isElement==null?void 0:s.isElement(D)))&&(H=l.floating[N]||a.floating[x]);const K=P/2-_/2,ee=H/2-v[x]/2-1,W=bi(g[E],ee),de=bi(g[T],ee),se=W,fe=H-v[x]-de,q=H/2-v[x]/2+K,Z=Dg(se,q,fe),Y=!u.arrow&&Za(o)!=null&&q!==Z&&a.reference[x]/2-(q<se?W:de)-v[x]/2<0,oe=Y?q<se?q-se:q-fe:0;return{[y]:w[y]+oe,data:{[y]:Z,centerOffset:q-Z-oe,...Y&&{alignmentOffset:oe}},reset:Y}}}),p2=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:o,middlewareData:a,rects:s,initialPlacement:l,platform:u,elements:h}=e,{mainAxis:p=!0,crossAxis:g=!0,fallbackPlacements:w,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:v=!0,...b}=$o(t,e);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const E=Ho(o),T=Uo(l),N=Ho(l)===l,P=await(u.isRTL==null?void 0:u.isRTL(h.floating)),_=w||(N||!v?[uu(l)]:c2(l)),D=x!=="none";!w&&D&&_.push(...d2(l,v,x,P));const H=[l,..._],K=await vc(e,b),ee=[];let W=((r=a.flip)==null?void 0:r.overflows)||[];if(p&&ee.push(K[E]),g){const Z=s2(o,s,P);ee.push(K[Z[0]],K[Z[1]])}if(W=[...W,{placement:o,overflows:ee}],!ee.every(Z=>Z<=0)){var de,se;const Z=(((de=a.flip)==null?void 0:de.index)||0)+1,Y=H[Z];if(Y){var fe;const Q=g==="alignment"?T!==Uo(Y):!1,X=((fe=W[0])==null?void 0:fe.overflows[0])>0;if(!Q||X)return{data:{index:Z,overflows:W},reset:{placement:Y}}}let oe=(se=W.filter(Q=>Q.overflows[0]<=0).sort((Q,X)=>Q.overflows[1]-X.overflows[1])[0])==null?void 0:se.placement;if(!oe)switch(y){case"bestFit":{var q;const Q=(q=W.filter(X=>{if(D){const $=Uo(X.placement);return $===T||$==="y"}return!0}).map(X=>[X.placement,X.overflows.filter($=>$>0).reduce(($,te)=>$+te,0)]).sort((X,$)=>X[1]-$[1])[0])==null?void 0:q[0];Q&&(oe=Q);break}case"initialPlacement":oe=l;break}if(o!==oe)return{reset:{placement:oe}}}return{}}}};function f_(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function h_(t){return o2.some(e=>t[e]>=0)}const g2=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:r="referenceHidden",...o}=$o(t,e);switch(r){case"referenceHidden":{const a=await vc(e,{...o,elementContext:"reference"}),s=f_(a,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:h_(s)}}}case"escaped":{const a=await vc(e,{...o,altBoundary:!0}),s=f_(a,n.floating);return{data:{escapedOffsets:s,escaped:h_(s)}}}default:return{}}}}};async function m2(t,e){const{placement:n,platform:r,elements:o}=t,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Ho(n),l=Za(n),u=Uo(n)==="y",h=["left","top"].includes(s)?-1:1,p=a&&u?-1:1,g=$o(e,t);let{mainAxis:w,crossAxis:y,alignmentAxis:x}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return l&&typeof x=="number"&&(y=l==="end"?x*-1:x),u?{x:y*p,y:w*h}:{x:w*h,y:y*p}}const v2=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:o,y:a,placement:s,middlewareData:l}=e,u=await m2(e,t);return s===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:a+u.y,data:{...u,placement:s}}}}},y2=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:o}=e,{mainAxis:a=!0,crossAxis:s=!1,limiter:l={fn:b=>{let{x:E,y:T}=b;return{x:E,y:T}}},...u}=$o(t,e),h={x:n,y:r},p=await vc(e,u),g=Uo(Ho(o)),w=Lg(g);let y=h[w],x=h[g];if(a){const b=w==="y"?"top":"left",E=w==="y"?"bottom":"right",T=y+p[b],N=y-p[E];y=Dg(T,y,N)}if(s){const b=g==="y"?"top":"left",E=g==="y"?"bottom":"right",T=x+p[b],N=x-p[E];x=Dg(T,x,N)}const v=l.fn({...e,[w]:y,[g]:x});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[w]:a,[g]:s}}}}}},w2=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:o,rects:a,middlewareData:s}=e,{offset:l=0,mainAxis:u=!0,crossAxis:h=!0}=$o(t,e),p={x:n,y:r},g=Uo(o),w=Lg(g);let y=p[w],x=p[g];const v=$o(l,e),b=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(u){const N=w==="y"?"height":"width",P=a.reference[w]-a.floating[N]+b.mainAxis,_=a.reference[w]+a.reference[N]-b.mainAxis;y<P?y=P:y>_&&(y=_)}if(h){var E,T;const N=w==="y"?"width":"height",P=["top","left"].includes(Ho(o)),_=a.reference[g]-a.floating[N]+(P&&((E=s.offset)==null?void 0:E[g])||0)+(P?0:b.crossAxis),D=a.reference[g]+a.reference[N]+(P?0:((T=s.offset)==null?void 0:T[g])||0)-(P?b.crossAxis:0);x<_?x=_:x>D&&(x=D)}return{[w]:y,[g]:x}}}},C2=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:o,rects:a,platform:s,elements:l}=e,{apply:u=()=>{},...h}=$o(t,e),p=await vc(e,h),g=Ho(o),w=Za(o),y=Uo(o)==="y",{width:x,height:v}=a.floating;let b,E;g==="top"||g==="bottom"?(b=g,E=w===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(E=g,b=w==="end"?"top":"bottom");const T=v-p.top-p.bottom,N=x-p.left-p.right,P=bi(v-p[b],T),_=bi(x-p[E],N),D=!e.middlewareData.shift;let H=P,K=_;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(K=N),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(H=T),D&&!w){const W=sr(p.left,0),de=sr(p.right,0),se=sr(p.top,0),fe=sr(p.bottom,0);y?K=x-2*(W!==0||de!==0?W+de:sr(p.left,p.right)):H=v-2*(se!==0||fe!==0?se+fe:sr(p.top,p.bottom))}await u({...e,availableWidth:K,availableHeight:H});const ee=await s.getDimensions(l.floating);return x!==ee.width||v!==ee.height?{reset:{rects:!0}}:{}}}};function hu(){return typeof window<"u"}function es(t){return p_(t)?(t.nodeName||"").toLowerCase():"#document"}function cr(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function mo(t){var e;return(e=(p_(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function p_(t){return hu()?t instanceof Node||t instanceof cr(t).Node:!1}function Ur(t){return hu()?t instanceof Element||t instanceof cr(t).Element:!1}function vo(t){return hu()?t instanceof HTMLElement||t instanceof cr(t).HTMLElement:!1}function g_(t){return!hu()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof cr(t).ShadowRoot}function yc(t){const{overflow:e,overflowX:n,overflowY:r,display:o}=Br(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(o)}function b2(t){return["table","td","th"].includes(es(t))}function pu(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function Ug(t){const e=Bg(),n=Ur(t)?Br(t):t;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function x2(t){let e=xi(t);for(;vo(e)&&!ts(e);){if(Ug(e))return e;if(pu(e))return null;e=xi(e)}return null}function Bg(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ts(t){return["html","body","#document"].includes(es(t))}function Br(t){return cr(t).getComputedStyle(t)}function gu(t){return Ur(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function xi(t){if(es(t)==="html")return t;const e=t.assignedSlot||t.parentNode||g_(t)&&t.host||mo(t);return g_(e)?e.host:e}function m_(t){const e=xi(t);return ts(e)?t.ownerDocument?t.ownerDocument.body:t.body:vo(e)&&yc(e)?e:m_(e)}function wc(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const o=m_(t),a=o===((r=t.ownerDocument)==null?void 0:r.body),s=cr(o);if(a){const l=zg(s);return e.concat(s,s.visualViewport||[],yc(o)?o:[],l&&n?wc(l):[])}return e.concat(o,wc(o,[],n))}function zg(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function v_(t){const e=Br(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const o=vo(t),a=o?t.offsetWidth:n,s=o?t.offsetHeight:r,l=lu(n)!==a||lu(r)!==s;return l&&(n=a,r=s),{width:n,height:r,$:l}}function Vg(t){return Ur(t)?t:t.contextElement}function ns(t){const e=Vg(t);if(!vo(e))return go(1);const n=e.getBoundingClientRect(),{width:r,height:o,$:a}=v_(e);let s=(a?lu(n.width):n.width)/r,l=(a?lu(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const S2=go(0);function y_(t){const e=cr(t);return!Bg()||!e.visualViewport?S2:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function _2(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==cr(t)?!1:e}function Qi(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const o=t.getBoundingClientRect(),a=Vg(t);let s=go(1);e&&(r?Ur(r)&&(s=ns(r)):s=ns(t));const l=_2(a,n,r)?y_(a):go(0);let u=(o.left+l.x)/s.x,h=(o.top+l.y)/s.y,p=o.width/s.x,g=o.height/s.y;if(a){const w=cr(a),y=r&&Ur(r)?cr(r):r;let x=w,v=zg(x);for(;v&&r&&y!==x;){const b=ns(v),E=v.getBoundingClientRect(),T=Br(v),N=E.left+(v.clientLeft+parseFloat(T.paddingLeft))*b.x,P=E.top+(v.clientTop+parseFloat(T.paddingTop))*b.y;u*=b.x,h*=b.y,p*=b.x,g*=b.y,u+=N,h+=P,x=cr(v),v=zg(x)}}return fu({width:p,height:g,x:u,y:h})}function Kg(t,e){const n=gu(t).scrollLeft;return e?e.left+n:Qi(mo(t)).left+n}function w_(t,e,n){n===void 0&&(n=!1);const r=t.getBoundingClientRect(),o=r.left+e.scrollLeft-(n?0:Kg(t,r)),a=r.top+e.scrollTop;return{x:o,y:a}}function E2(t){let{elements:e,rect:n,offsetParent:r,strategy:o}=t;const a=o==="fixed",s=mo(r),l=e?pu(e.floating):!1;if(r===s||l&&a)return n;let u={scrollLeft:0,scrollTop:0},h=go(1);const p=go(0),g=vo(r);if((g||!g&&!a)&&((es(r)!=="body"||yc(s))&&(u=gu(r)),vo(r))){const y=Qi(r);h=ns(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const w=s&&!g&&!a?w_(s,u,!0):go(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-u.scrollLeft*h.x+p.x+w.x,y:n.y*h.y-u.scrollTop*h.y+p.y+w.y}}function T2(t){return Array.from(t.getClientRects())}function A2(t){const e=mo(t),n=gu(t),r=t.ownerDocument.body,o=sr(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),a=sr(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Kg(t);const l=-n.scrollTop;return Br(r).direction==="rtl"&&(s+=sr(e.clientWidth,r.clientWidth)-o),{width:o,height:a,x:s,y:l}}function I2(t,e){const n=cr(t),r=mo(t),o=n.visualViewport;let a=r.clientWidth,s=r.clientHeight,l=0,u=0;if(o){a=o.width,s=o.height;const h=Bg();(!h||h&&e==="fixed")&&(l=o.offsetLeft,u=o.offsetTop)}return{width:a,height:s,x:l,y:u}}function k2(t,e){const n=Qi(t,!0,e==="fixed"),r=n.top+t.clientTop,o=n.left+t.clientLeft,a=vo(t)?ns(t):go(1),s=t.clientWidth*a.x,l=t.clientHeight*a.y,u=o*a.x,h=r*a.y;return{width:s,height:l,x:u,y:h}}function C_(t,e,n){let r;if(e==="viewport")r=I2(t,n);else if(e==="document")r=A2(mo(t));else if(Ur(e))r=k2(e,n);else{const o=y_(t);r={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return fu(r)}function b_(t,e){const n=xi(t);return n===e||!Ur(n)||ts(n)?!1:Br(n).position==="fixed"||b_(n,e)}function N2(t,e){const n=e.get(t);if(n)return n;let r=wc(t,[],!1).filter(l=>Ur(l)&&es(l)!=="body"),o=null;const a=Br(t).position==="fixed";let s=a?xi(t):t;for(;Ur(s)&&!ts(s);){const l=Br(s),u=Ug(s);!u&&l.position==="fixed"&&(o=null),(a?!u&&!o:!u&&l.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||yc(s)&&!u&&b_(t,s))?r=r.filter(p=>p!==s):o=l,s=xi(s)}return e.set(t,r),r}function P2(t){let{element:e,boundary:n,rootBoundary:r,strategy:o}=t;const s=[...n==="clippingAncestors"?pu(e)?[]:N2(e,this._c):[].concat(n),r],l=s[0],u=s.reduce((h,p)=>{const g=C_(e,p,o);return h.top=sr(g.top,h.top),h.right=bi(g.right,h.right),h.bottom=bi(g.bottom,h.bottom),h.left=sr(g.left,h.left),h},C_(e,l,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function O2(t){const{width:e,height:n}=v_(t);return{width:e,height:n}}function M2(t,e,n){const r=vo(e),o=mo(e),a=n==="fixed",s=Qi(t,!0,a,e);let l={scrollLeft:0,scrollTop:0};const u=go(0);function h(){u.x=Kg(o)}if(r||!r&&!a)if((es(e)!=="body"||yc(o))&&(l=gu(e)),r){const y=Qi(e,!0,a,e);u.x=y.x+e.clientLeft,u.y=y.y+e.clientTop}else o&&h();a&&!r&&o&&h();const p=o&&!r&&!a?w_(o,l):go(0),g=s.left+l.scrollLeft-u.x-p.x,w=s.top+l.scrollTop-u.y-p.y;return{x:g,y:w,width:s.width,height:s.height}}function Gg(t){return Br(t).position==="static"}function x_(t,e){if(!vo(t)||Br(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return mo(t)===n&&(n=n.ownerDocument.body),n}function S_(t,e){const n=cr(t);if(pu(t))return n;if(!vo(t)){let o=xi(t);for(;o&&!ts(o);){if(Ur(o)&&!Gg(o))return o;o=xi(o)}return n}let r=x_(t,e);for(;r&&b2(r)&&Gg(r);)r=x_(r,e);return r&&ts(r)&&Gg(r)&&!Ug(r)?n:r||x2(t)||n}const R2=async function(t){const e=this.getOffsetParent||S_,n=this.getDimensions,r=await n(t.floating);return{reference:M2(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function D2(t){return Br(t).direction==="rtl"}const L2={convertOffsetParentRelativeRectToViewportRelativeRect:E2,getDocumentElement:mo,getClippingRect:P2,getOffsetParent:S_,getElementRects:R2,getClientRects:T2,getDimensions:O2,getScale:ns,isElement:Ur,isRTL:D2};function __(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function F2(t,e){let n=null,r;const o=mo(t);function a(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function s(l,u){l===void 0&&(l=!1),u===void 0&&(u=1),a();const h=t.getBoundingClientRect(),{left:p,top:g,width:w,height:y}=h;if(l||e(),!w||!y)return;const x=du(g),v=du(o.clientWidth-(p+w)),b=du(o.clientHeight-(g+y)),E=du(p),N={rootMargin:-x+"px "+-v+"px "+-b+"px "+-E+"px",threshold:sr(0,bi(1,u))||1};let P=!0;function _(D){const H=D[0].intersectionRatio;if(H!==u){if(!P)return s();H?s(!1,H):r=setTimeout(()=>{s(!1,1e-7)},1e3)}H===1&&!__(h,t.getBoundingClientRect())&&s(),P=!1}try{n=new IntersectionObserver(_,{...N,root:o.ownerDocument})}catch{n=new IntersectionObserver(_,N)}n.observe(t)}return s(!0),a}function E_(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,h=Vg(t),p=o||a?[...h?wc(h):[],...wc(e)]:[];p.forEach(E=>{o&&E.addEventListener("scroll",n,{passive:!0}),a&&E.addEventListener("resize",n)});const g=h&&l?F2(h,n):null;let w=-1,y=null;s&&(y=new ResizeObserver(E=>{let[T]=E;T&&T.target===h&&y&&(y.unobserve(e),cancelAnimationFrame(w),w=requestAnimationFrame(()=>{var N;(N=y)==null||N.observe(e)})),n()}),h&&!u&&y.observe(h),y.observe(e));let x,v=u?Qi(t):null;u&&b();function b(){const E=Qi(t);v&&!__(v,E)&&n(),v=E,x=requestAnimationFrame(b)}return n(),()=>{var E;p.forEach(T=>{o&&T.removeEventListener("scroll",n),a&&T.removeEventListener("resize",n)}),g==null||g(),(E=y)==null||E.disconnect(),y=null,u&&cancelAnimationFrame(x)}}const $2=v2,H2=y2,U2=p2,B2=C2,z2=g2,T_=h2,V2=w2,K2=(t,e,n)=>{const r=new Map,o={platform:L2,...n},a={...o.platform,_c:r};return f2(t,e,{...o,platform:a})};var mu=typeof document<"u"?M.useLayoutEffect:M.useEffect;function vu(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,o;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!vu(t[r],e[r]))return!1;return!0}if(o=Object.keys(t),n=o.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,o[r]))return!1;for(r=n;r--!==0;){const a=o[r];if(!(a==="_owner"&&t.$$typeof)&&!vu(t[a],e[a]))return!1}return!0}return t!==t&&e!==e}function A_(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function I_(t,e){const n=A_(t);return Math.round(e*n)/n}function jg(t){const e=C.useRef(t);return mu(()=>{e.current=t}),e}function k_(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:s}={},transform:l=!0,whileElementsMounted:u,open:h}=t,[p,g]=C.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[w,y]=C.useState(r);vu(w,r)||y(r);const[x,v]=C.useState(null),[b,E]=C.useState(null),T=C.useCallback(Q=>{Q!==D.current&&(D.current=Q,v(Q))},[]),N=C.useCallback(Q=>{Q!==H.current&&(H.current=Q,E(Q))},[]),P=a||x,_=s||b,D=C.useRef(null),H=C.useRef(null),K=C.useRef(p),ee=u!=null,W=jg(u),de=jg(o),se=jg(h),fe=C.useCallback(()=>{if(!D.current||!H.current)return;const Q={placement:e,strategy:n,middleware:w};de.current&&(Q.platform=de.current),K2(D.current,H.current,Q).then(X=>{const $={...X,isPositioned:se.current!==!1};q.current&&!vu(K.current,$)&&(K.current=$,Ia.flushSync(()=>{g($)}))})},[w,e,n,de,se]);mu(()=>{h===!1&&K.current.isPositioned&&(K.current.isPositioned=!1,g(Q=>({...Q,isPositioned:!1})))},[h]);const q=C.useRef(!1);mu(()=>(q.current=!0,()=>{q.current=!1}),[]),mu(()=>{if(P&&(D.current=P),_&&(H.current=_),P&&_){if(W.current)return W.current(P,_,fe);fe()}},[P,_,fe,W,ee]);const Z=C.useMemo(()=>({reference:D,floating:H,setReference:T,setFloating:N}),[T,N]),Y=C.useMemo(()=>({reference:P,floating:_}),[P,_]),oe=C.useMemo(()=>{const Q={position:n,left:0,top:0};if(!Y.floating)return Q;const X=I_(Y.floating,p.x),$=I_(Y.floating,p.y);return l?{...Q,transform:"translate("+X+"px, "+$+"px)",...A_(Y.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:X,top:$}},[n,l,Y.floating,p.x,p.y]);return C.useMemo(()=>({...p,update:fe,refs:Z,elements:Y,floatingStyles:oe}),[p,fe,Z,Y,oe])}const G2=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:o}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?T_({element:r.current,padding:o}).fn(n):{}:r?T_({element:r,padding:o}).fn(n):{}}}},N_=(t,e)=>({...$2(t),options:[t,e]}),P_=(t,e)=>({...H2(t),options:[t,e]}),O_=(t,e)=>({...V2(t),options:[t,e]}),M_=(t,e)=>({...U2(t),options:[t,e]}),R_=(t,e)=>({...B2(t),options:[t,e]}),D_=(t,e)=>({...z2(t),options:[t,e]}),L_=(t,e)=>({...G2(t),options:[t,e]});var j2="Arrow",F_=C.forwardRef((t,e)=>{const{children:n,width:r=10,height:o=5,...a}=t;return d.jsx(mt.svg,{...a,ref:e,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});F_.displayName=j2;var W2=F_,Wg="Popper",[$_,H_]=gr(Wg),[q2,U_]=$_(Wg),B_=t=>{const{__scopePopper:e,children:n}=t,[r,o]=C.useState(null);return d.jsx(q2,{scope:e,anchor:r,onAnchorChange:o,children:n})};B_.displayName=Wg;var z_="PopperAnchor",V_=C.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:r,...o}=t,a=U_(z_,n),s=C.useRef(null),l=rt(e,s);return C.useEffect(()=>{a.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:d.jsx(mt.div,{...o,ref:l})});V_.displayName=z_;var qg="PopperContent",[Y2,J2]=$_(qg),K_=C.forwardRef((t,e)=>{var z,ce,Ae,Ce,Ne,ne;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,arrowPadding:l=0,avoidCollisions:u=!0,collisionBoundary:h=[],collisionPadding:p=0,sticky:g="partial",hideWhenDetached:w=!1,updatePositionStrategy:y="optimized",onPlaced:x,...v}=t,b=U_(qg,n),[E,T]=C.useState(null),N=rt(e,Ve=>T(Ve)),[P,_]=C.useState(null),D=vg(P),H=(D==null?void 0:D.width)??0,K=(D==null?void 0:D.height)??0,ee=r+(a!=="center"?"-"+a:""),W=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},de=Array.isArray(h)?h:[h],se=de.length>0,fe={padding:W,boundary:de.filter(X2),altBoundary:se},{refs:q,floatingStyles:Z,placement:Y,isPositioned:oe,middlewareData:Q}=k_({strategy:"fixed",placement:ee,whileElementsMounted:(...Ve)=>E_(...Ve,{animationFrame:y==="always"}),elements:{reference:b.anchor},middleware:[N_({mainAxis:o+K,alignmentAxis:s}),u&&P_({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?O_():void 0,...fe}),u&&M_({...fe}),R_({...fe,apply:({elements:Ve,rects:Qe,availableWidth:Ct,availableHeight:Yt})=>{const{width:bt,height:rn}=Qe.reference,zt=Ve.floating.style;zt.setProperty("--radix-popper-available-width",`${Ct}px`),zt.setProperty("--radix-popper-available-height",`${Yt}px`),zt.setProperty("--radix-popper-anchor-width",`${bt}px`),zt.setProperty("--radix-popper-anchor-height",`${rn}px`)}}),P&&L_({element:P,padding:l}),Z2({arrowWidth:H,arrowHeight:K}),w&&D_({strategy:"referenceHidden",...fe})]}),[X,$]=W_(Y),te=gn(x);tn(()=>{oe&&(te==null||te())},[oe,te]);const _e=(z=Q.arrow)==null?void 0:z.x,ke=(ce=Q.arrow)==null?void 0:ce.y,xe=((Ae=Q.arrow)==null?void 0:Ae.centerOffset)!==0,[Pe,Te]=C.useState();return tn(()=>{E&&Te(window.getComputedStyle(E).zIndex)},[E]),d.jsx("div",{ref:q.setFloating,"data-radix-popper-content-wrapper":"",style:{...Z,transform:oe?Z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Pe,"--radix-popper-transform-origin":[(Ce=Q.transformOrigin)==null?void 0:Ce.x,(Ne=Q.transformOrigin)==null?void 0:Ne.y].join(" "),...((ne=Q.hide)==null?void 0:ne.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:d.jsx(Y2,{scope:n,placedSide:X,onArrowChange:_,arrowX:_e,arrowY:ke,shouldHideArrow:xe,children:d.jsx(mt.div,{"data-side":X,"data-align":$,...v,ref:N,style:{...v.style,animation:oe?void 0:"none"}})})})});K_.displayName=qg;var G_="PopperArrow",Q2={top:"bottom",right:"left",bottom:"top",left:"right"},j_=C.forwardRef(function(e,n){const{__scopePopper:r,...o}=e,a=J2(G_,r),s=Q2[a.placedSide];return d.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:d.jsx(W2,{...o,ref:n,style:{...o.style,display:"block"}})})});j_.displayName=G_;function X2(t){return t!==null}var Z2=t=>({name:"transformOrigin",options:t,fn(e){var b,E,T;const{placement:n,rects:r,middlewareData:o}=e,s=((b=o.arrow)==null?void 0:b.centerOffset)!==0,l=s?0:t.arrowWidth,u=s?0:t.arrowHeight,[h,p]=W_(n),g={start:"0%",center:"50%",end:"100%"}[p],w=(((E=o.arrow)==null?void 0:E.x)??0)+l/2,y=(((T=o.arrow)==null?void 0:T.y)??0)+u/2;let x="",v="";return h==="bottom"?(x=s?g:`${w}px`,v=`${-u}px`):h==="top"?(x=s?g:`${w}px`,v=`${r.floating.height+u}px`):h==="right"?(x=`${-u}px`,v=s?g:`${y}px`):h==="left"&&(x=`${r.floating.width+u}px`,v=s?g:`${y}px`),{data:{x,y:v}}}});function W_(t){const[e,n="center"]=t.split("-");return[e,n]}var e$=B_,t$=V_,n$=K_,r$=j_,o$=Symbol("radix.slottable");function i$(t){const e=({children:n})=>d.jsx(d.Fragment,{children:n});return e.displayName=`${t}.Slottable`,e.__radixId=o$,e}var a$=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),s$="VisuallyHidden",q_=C.forwardRef((t,e)=>d.jsx(mt.span,{...t,ref:e,style:{...a$,...t.style}}));q_.displayName=s$;var c$=q_,[yu,Bj]=gr("Tooltip",[H_]),wu=H_(),Y_="TooltipProvider",l$=700,Yg="tooltip.open",[d$,Jg]=yu(Y_),J_=t=>{const{__scopeTooltip:e,delayDuration:n=l$,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=t,s=C.useRef(!0),l=C.useRef(!1),u=C.useRef(0);return C.useEffect(()=>{const h=u.current;return()=>window.clearTimeout(h)},[]),d.jsx(d$,{scope:e,isOpenDelayedRef:s,delayDuration:n,onOpen:C.useCallback(()=>{window.clearTimeout(u.current),s.current=!1},[]),onClose:C.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:C.useCallback(h=>{l.current=h},[]),disableHoverableContent:o,children:a})};J_.displayName=Y_;var Cc="Tooltip",[u$,bc]=yu(Cc),Q_=t=>{const{__scopeTooltip:e,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:s,delayDuration:l}=t,u=Jg(Cc,t.__scopeTooltip),h=wu(e),[p,g]=C.useState(null),w=Mo(),y=C.useRef(0),x=s??u.disableHoverableContent,v=l??u.delayDuration,b=C.useRef(!1),[E,T]=ui({prop:r,defaultProp:o??!1,onChange:H=>{H?(u.onOpen(),document.dispatchEvent(new CustomEvent(Yg))):u.onClose(),a==null||a(H)},caller:Cc}),N=C.useMemo(()=>E?b.current?"delayed-open":"instant-open":"closed",[E]),P=C.useCallback(()=>{window.clearTimeout(y.current),y.current=0,b.current=!1,T(!0)},[T]),_=C.useCallback(()=>{window.clearTimeout(y.current),y.current=0,T(!1)},[T]),D=C.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{b.current=!0,T(!0),y.current=0},v)},[v,T]);return C.useEffect(()=>()=>{y.current&&(window.clearTimeout(y.current),y.current=0)},[]),d.jsx(e$,{...h,children:d.jsx(u$,{scope:e,contentId:w,open:E,stateAttribute:N,trigger:p,onTriggerChange:g,onTriggerEnter:C.useCallback(()=>{u.isOpenDelayedRef.current?D():P()},[u.isOpenDelayedRef,D,P]),onTriggerLeave:C.useCallback(()=>{x?_():(window.clearTimeout(y.current),y.current=0)},[_,x]),onOpen:P,onClose:_,disableHoverableContent:x,children:n})})};Q_.displayName=Cc;var Qg="TooltipTrigger",X_=C.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,o=bc(Qg,n),a=Jg(Qg,n),s=wu(n),l=C.useRef(null),u=rt(e,l,o.onTriggerChange),h=C.useRef(!1),p=C.useRef(!1),g=C.useCallback(()=>h.current=!1,[]);return C.useEffect(()=>()=>document.removeEventListener("pointerup",g),[g]),d.jsx(t$,{asChild:!0,...s,children:d.jsx(mt.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:u,onPointerMove:Ue(t.onPointerMove,w=>{w.pointerType!=="touch"&&!p.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),p.current=!0)}),onPointerLeave:Ue(t.onPointerLeave,()=>{o.onTriggerLeave(),p.current=!1}),onPointerDown:Ue(t.onPointerDown,()=>{o.open&&o.onClose(),h.current=!0,document.addEventListener("pointerup",g,{once:!0})}),onFocus:Ue(t.onFocus,()=>{h.current||o.onOpen()}),onBlur:Ue(t.onBlur,o.onClose),onClick:Ue(t.onClick,o.onClose)})})});X_.displayName=Qg;var Xg="TooltipPortal",[f$,h$]=yu(Xg,{forceMount:void 0}),Z_=t=>{const{__scopeTooltip:e,forceMount:n,children:r,container:o}=t,a=bc(Xg,e);return d.jsx(f$,{scope:e,forceMount:n,children:d.jsx(Ro,{present:n||a.open,children:d.jsx(fd,{asChild:!0,container:o,children:r})})})};Z_.displayName=Xg;var rs="TooltipContent",eE=C.forwardRef((t,e)=>{const n=h$(rs,t.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=t,s=bc(rs,t.__scopeTooltip);return d.jsx(Ro,{present:r||s.open,children:s.disableHoverableContent?d.jsx(tE,{side:o,...a,ref:e}):d.jsx(p$,{side:o,...a,ref:e})})}),p$=C.forwardRef((t,e)=>{const n=bc(rs,t.__scopeTooltip),r=Jg(rs,t.__scopeTooltip),o=C.useRef(null),a=rt(e,o),[s,l]=C.useState(null),{trigger:u,onClose:h}=n,p=o.current,{onPointerInTransitChange:g}=r,w=C.useCallback(()=>{l(null),g(!1)},[g]),y=C.useCallback((x,v)=>{const b=x.currentTarget,E={x:x.clientX,y:x.clientY},T=w$(E,b.getBoundingClientRect()),N=C$(E,T),P=b$(v.getBoundingClientRect()),_=S$([...N,...P]);l(_),g(!0)},[g]);return C.useEffect(()=>()=>w(),[w]),C.useEffect(()=>{if(u&&p){const x=b=>y(b,p),v=b=>y(b,u);return u.addEventListener("pointerleave",x),p.addEventListener("pointerleave",v),()=>{u.removeEventListener("pointerleave",x),p.removeEventListener("pointerleave",v)}}},[u,p,y,w]),C.useEffect(()=>{if(s){const x=v=>{const b=v.target,E={x:v.clientX,y:v.clientY},T=(u==null?void 0:u.contains(b))||(p==null?void 0:p.contains(b)),N=!x$(E,s);T?w():N&&(w(),h())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[u,p,s,h,w]),d.jsx(tE,{...t,ref:a})}),[g$,m$]=yu(Cc,{isInside:!1}),v$=i$("TooltipContent"),tE=C.forwardRef((t,e)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...l}=t,u=bc(rs,n),h=wu(n),{onClose:p}=u;return C.useEffect(()=>(document.addEventListener(Yg,p),()=>document.removeEventListener(Yg,p)),[p]),C.useEffect(()=>{if(u.trigger){const g=w=>{const y=w.target;y!=null&&y.contains(u.trigger)&&p()};return window.addEventListener("scroll",g,{capture:!0}),()=>window.removeEventListener("scroll",g,{capture:!0})}},[u.trigger,p]),d.jsx(ud,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:g=>g.preventDefault(),onDismiss:p,children:d.jsxs(n$,{"data-state":u.stateAttribute,...h,...l,ref:e,style:{...l.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(v$,{children:r}),d.jsx(g$,{scope:n,isInside:!0,children:d.jsx(c$,{id:u.contentId,role:"tooltip",children:o||r})})]})})});eE.displayName=rs;var nE="TooltipArrow",y$=C.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,o=wu(n);return m$(nE,n).isInside?null:d.jsx(r$,{...o,...r,ref:e})});y$.displayName=nE;function w$(t,e){const n=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),o=Math.abs(e.right-t.x),a=Math.abs(e.left-t.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function C$(t,e,n=5){const r=[];switch(e){case"top":r.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":r.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":r.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":r.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return r}function b$(t){const{top:e,right:n,bottom:r,left:o}=t;return[{x:o,y:e},{x:n,y:e},{x:n,y:r},{x:o,y:r}]}function x$(t,e){const{x:n,y:r}=t;let o=!1;for(let a=0,s=e.length-1;a<e.length;s=a++){const l=e[a],u=e[s],h=l.x,p=l.y,g=u.x,w=u.y;p>r!=w>r&&n<(g-h)*(r-p)/(w-p)+h&&(o=!o)}return o}function S$(t){const e=t.slice();return e.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),_$(e)}function _$(t){if(t.length<=1)return t.slice();const e=[];for(let r=0;r<t.length;r++){const o=t[r];for(;e.length>=2;){const a=e[e.length-1],s=e[e.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))e.pop();else break}e.push(o)}e.pop();const n=[];for(let r=t.length-1;r>=0;r--){const o=t[r];for(;n.length>=2;){const a=n[n.length-1],s=n[n.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var E$=J_,T$=Q_,A$=X_,I$=Z_,rE=eE;const vr=E$,yr=T$,wr=A$,lr=C.forwardRef(({className:t,sideOffset:e=4,...n},r)=>d.jsx(I$,{children:d.jsx(rE,{ref:r,sideOffset:e,className:ze("z-[100001] 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",t),...n})}));lr.displayName=rE.displayName;function k$({title:t,titleId:e,...n},r){return C.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":e},n),t?C.createElement("title",{id:e},t):null,C.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 N$=C.forwardRef(k$);var P$=function(t){return function(e,n){var r=M.useRef(!1);t(function(){return function(){r.current=!1}},[]),t(function(){if(!r.current)r.current=!0;else return e()},n)}},oE=function(t){return typeof t=="function"},iE=process.env.NODE_ENV==="development"||process.env.NODE_ENV==="test";const O$=P$(M.useEffect);function aE(t){var e=M.useRef(t);return e.current=t,e}var M$=function(t){iE&&(oE(t)||console.error("useUnmount expected parameter is a function, got ".concat(typeof t)));var e=aE(t);M.useEffect(function(){return function(){e.current()}},[])};function R$(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var sE=R$,D$=typeof fo=="object"&&fo&&fo.Object===Object&&fo,L$=D$,F$=L$,$$=typeof self=="object"&&self&&self.Object===Object&&self,H$=F$||$$||Function("return this")(),cE=H$,U$=cE,B$=function(){return U$.Date.now()},z$=B$,V$=/\s/;function K$(t){for(var e=t.length;e--&&V$.test(t.charAt(e)););return e}var G$=K$,j$=G$,W$=/^\s+/;function q$(t){return t&&t.slice(0,j$(t)+1).replace(W$,"")}var Y$=q$,J$=cE,Q$=J$.Symbol,lE=Q$,dE=lE,uE=Object.prototype,X$=uE.hasOwnProperty,Z$=uE.toString,xc=dE?dE.toStringTag:void 0;function eH(t){var e=X$.call(t,xc),n=t[xc];try{t[xc]=void 0;var r=!0}catch{}var o=Z$.call(t);return r&&(e?t[xc]=n:delete t[xc]),o}var tH=eH,nH=Object.prototype,rH=nH.toString;function oH(t){return rH.call(t)}var iH=oH,fE=lE,aH=tH,sH=iH,cH="[object Null]",lH="[object Undefined]",hE=fE?fE.toStringTag:void 0;function dH(t){return t==null?t===void 0?lH:cH:hE&&hE in Object(t)?aH(t):sH(t)}var uH=dH;function fH(t){return t!=null&&typeof t=="object"}var hH=fH,pH=uH,gH=hH,mH="[object Symbol]";function vH(t){return typeof t=="symbol"||gH(t)&&pH(t)==mH}var yH=vH,wH=Y$,pE=sE,CH=yH,gE=NaN,bH=/^[-+]0x[0-9a-f]+$/i,xH=/^0b[01]+$/i,SH=/^0o[0-7]+$/i,_H=parseInt;function EH(t){if(typeof t=="number")return t;if(CH(t))return gE;if(pE(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=pE(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=wH(t);var n=xH.test(t);return n||SH.test(t)?_H(t.slice(2),n?2:8):bH.test(t)?gE:+t}var TH=EH,AH=sE,Zg=z$,mE=TH,IH="Expected a function",kH=Math.max,NH=Math.min;function PH(t,e,n){var r,o,a,s,l,u,h=0,p=!1,g=!1,w=!0;if(typeof t!="function")throw new TypeError(IH);e=mE(e)||0,AH(n)&&(p=!!n.leading,g="maxWait"in n,a=g?kH(mE(n.maxWait)||0,e):a,w="trailing"in n?!!n.trailing:w);function y(D){var H=r,K=o;return r=o=void 0,h=D,s=t.apply(K,H),s}function x(D){return h=D,l=setTimeout(E,e),p?y(D):s}function v(D){var H=D-u,K=D-h,ee=e-H;return g?NH(ee,a-K):ee}function b(D){var H=D-u,K=D-h;return u===void 0||H>=e||H<0||g&&K>=a}function E(){var D=Zg();if(b(D))return T(D);l=setTimeout(E,v(D))}function T(D){return l=void 0,w&&r?y(D):(r=o=void 0,s)}function N(){l!==void 0&&clearTimeout(l),h=0,r=u=o=l=void 0}function P(){return l===void 0?s:T(Zg())}function _(){var D=Zg(),H=b(D);if(r=arguments,o=this,u=D,H){if(l===void 0)return x(u);if(g)return clearTimeout(l),l=setTimeout(E,e),y(u)}return l===void 0&&(l=setTimeout(E,e)),s}return _.cancel=N,_.flush=P,_}var OH=PH;const MH=Ud(OH);function RH(){var t=(typeof global>"u"?"undefined":typeof global)=="object"&&global&&global.Object===Object&&global,e=typeof self=="object"&&self&&self.Object===Object&&self;return t||e}RH()||(global.Date=Date);function DH(t,e){var n;iE&&(oE(t)||console.error("useDebounceFn expected parameter is a function, got ".concat(typeof t)));var r=aE(t),o=(n=e==null?void 0:e.wait)!==null&&n!==void 0?n:1e3,a=M.useMemo(function(){return MH(function(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];return r.current.apply(r,tb([],eb(s),!1))},o,e)},[]);return M$(function(){a.cancel()}),{run:a,cancel:a.cancel,flush:a.flush}}function LH(t,e,n){var r=eb(M.useState({}),2),o=r[0],a=r[1],s=DH(function(){a({})},n).run;M.useEffect(function(){return s()},e),O$(t,[o])}const FH=M.forwardRef(({onChange:t},e)=>{const n=M.useRef(null),[r,o]=M.useState("");return M.useImperativeHandle(e,()=>({setValue:a=>{var s;o(a),(s=n.current)==null||s.focus()}})),LH(()=>{t==null||t(r)},[r],{wait:300}),d.jsxs(d.Fragment,{children:[d.jsx(Gn,{ref:n,type:"text",placeholder:"Search files...",value:r,onChange:a=>o(a.target.value),className:"pr-8"}),r&&d.jsx("button",{onClick:()=>{var a;o(""),(a=n.current)==null||a.focus()},className:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-500 hover:text-gray-700",children:d.jsx(N$,{className:"h-5 w-5"})})]})});var zr=(t=>(t.VIEW_DOCUMENT="VIEW_DOCUMENT",t.DOWNLOAD_DOCUMENT="DOWNLOAD_DOCUMENT",t.EDIT_DOCUMENT="EDIT_DOCUMENT",t.OWNER_DOCUMENT="OWNER_DOCUMENT",t))(zr||{});const $H=(t,e)=>{const[n,r]=M.useState([]),[o,a]=M.useState([]),[s,l]=M.useState([]),[u,h]=M.useState([]),{toast:p}=mc(),[g,w]=M.useState(!1),[y,x]=M.useState(!1),v=M.useCallback(async(P,_,D)=>{if(!y){x(!0);try{const H=await Le.post(t+"/document-permission/grandted",{path:P,grandtedBy:_,data:D});return H.status===200&&(p({title:"Phân quyền tài liệu thành công."}),await N(P)),H}catch{return null}finally{x(!1)}}},[]),b=M.useCallback(async()=>{var P;try{return(P=(await Le.get(e+"admin/users/get-all",{params:{limit:1e4}})).data||[])==null?void 0:P.filter(K=>K.role!=="MASTER_ADMIN")}catch(_){return console.error("Error fetchAllUsers",_),[]}},[]),E=M.useCallback(async()=>{try{return(await Le.get(e+"admin/group-users")).data.filter(_=>`${_.groupname}`.toUpperCase()!=="MASTER_ADMIN").map(_=>{var D;return{..._,users:((D=_.users)==null?void 0:D.length)||0}})}catch(P){return console.error("Error fetchAllGroups",P),[]}},[]),T=M.useCallback(async P=>{try{const D=(await Le.get(t+"/document-permission/grandted",{params:{path:P}})).data;return{usersShared:(D==null?void 0:D.users)||[],groupsShared:(D==null?void 0:D.groups)||[]}}catch(_){return console.error("Error fetchShared",_),{usersShared:[],groupsShared:[]}}},[]),N=M.useCallback(async P=>{if(g)return;w(!0);let[_,D,{usersShared:H,groupsShared:K}]=await Promise.all([b(),E(),T(P)]);_=_==null?void 0:_.filter(ee=>!(H!=null&&H.find(W=>W.userId===ee.id))),D=D==null?void 0:D.filter(ee=>!(K!=null&&K.find(W=>W.groupname===ee.groupname))),Array.isArray(_)&&r(_),Array.isArray(D)&&a(D),Array.isArray(H)&&l(H),Array.isArray(K)&&h(K),w(!1)},[]);return{users:n,groups:o,sharedUsers:s,sharedGroups:u,setUsers:r,setGroups:a,setSharedUsers:l,setSharedGroups:h,fetchData:N,loading:g,postGranted:v,loadingGrandted:y}},HH=({failureReasons:t,onNavigateToFile:e})=>{const n=u=>{if(e){const h=u.replace("s3://cts-llm-docs-bucket/","");e(h)}},r=u=>{const h=[];return u.forEach(p=>{try{JSON.parse(p).forEach(w=>{const y=w.match(/\[Files: ([^\]]+)\]/),x=w.match(/^([^[]+)/);if(y&&x&&y[1]&&x[1]){const v=y[1].split(", ").map(T=>T.trim()),b=x[1].trim().replace("Encountered error: ","");let E="unknown";b.includes("invalid metadata attributes")||b.includes("metadata quota")?E="metadata":b.includes("No metadata was provided")||b.includes("metadata file")?E="missing_metadata":b.includes("file size")||b.includes("exceeds")||b.includes("50 MB")?E="file_size":b.includes("format not supported")||b.includes("unsupported format")||b.includes("file type")?E="file_format":b.includes("embedding failed")||b.includes("EMBEDDING_FAILED")?E="embedding_failed":b.includes("indexing failed")||b.includes("INDEXING_FAILED")?E="indexing_failed":b.includes("access denied")||b.includes("AccessDeniedException")||b.includes("permission")?E="access_denied":(b.includes("quota")||b.includes("limit")||b.includes("ServiceQuotaExceededException"))&&(E="quota_exceeded"),h.push({errorMessage:b,files:v,errorType:E})}})}catch{h.push({errorMessage:p,files:[],errorType:"unknown"})}}),h},o=u=>{switch(u){case"metadata":return d.jsx(gi,{className:"h-4 w-4 text-orange-500"});case"missing_metadata":return d.jsx(cg,{className:"h-4 w-4 text-red-500"});case"file_size":return d.jsx(gi,{className:"h-4 w-4 text-yellow-500"});case"file_format":return d.jsx(cg,{className:"h-4 w-4 text-purple-500"});case"embedding_failed":return d.jsx(gi,{className:"h-4 w-4 text-red-600"});case"indexing_failed":return d.jsx(gi,{className:"h-4 w-4 text-red-600"});case"access_denied":return d.jsx(gi,{className:"h-4 w-4 text-red-700"});case"quota_exceeded":return d.jsx(gi,{className:"h-4 w-4 text-orange-600"});default:return d.jsx(gi,{className:"h-4 w-4 text-red-500"})}},a=u=>{switch(u){case"metadata":return"border-orange-200 bg-orange-50";case"missing_metadata":return"border-red-200 bg-red-50";case"file_size":return"border-yellow-200 bg-yellow-50";case"file_format":return"border-purple-200 bg-purple-50";case"embedding_failed":return"border-red-300 bg-red-100";case"indexing_failed":return"border-red-300 bg-red-100";case"access_denied":return"border-red-400 bg-red-100";case"quota_exceeded":return"border-orange-300 bg-orange-100";default:return"border-red-200 bg-red-50"}},s=u=>{switch(u){case"metadata":return"text-orange-800";case"missing_metadata":return"text-red-800";case"file_size":return"text-yellow-800";case"file_format":return"text-purple-800";case"embedding_failed":return"text-red-900";case"indexing_failed":return"text-red-900";case"access_denied":return"text-red-900";case"quota_exceeded":return"text-orange-900";default:return"text-red-800"}},l=r(t);return l.length===0?null:d.jsxs("div",{className:"border-t pt-2",children:[d.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[d.jsx(gi,{className:"h-4 w-4 text-red-500"}),d.jsxs("p",{className:"text-red-600 font-medium",children:["Các file lỗi (",l.reduce((u,h)=>u+h.files.length,0)," file)"]})]}),d.jsx("div",{className:"space-y-3 max-h-80 overflow-y-auto",children:l.map((u,h)=>d.jsxs("div",{className:`p-3 rounded-lg border ${a(u.errorType)}`,children:[d.jsx("div",{className:"flex items-start justify-between",children:d.jsxs("div",{className:"flex items-start gap-2 flex-1",children:[o(u.errorType),d.jsxs("div",{className:"flex-1",children:[d.jsx("p",{className:`font-medium text-sm ${s(u.errorType)}`,children:u.errorMessage}),u.files.length>0&&d.jsxs("p",{className:"text-xs text-gray-600 mt-1",children:[u.files.length," file bị ảnh hưởng"]})]})]})}),u.files.length>0&&d.jsxs("div",{className:"mt-3 pt-2 border-t border-gray-200",children:[d.jsx("p",{className:"text-xs font-medium text-gray-700 mb-2",children:"Danh sách file lỗi:"}),d.jsx("div",{className:"max-h-32 overflow-y-auto space-y-1",children:u.files.map((p,g)=>d.jsxs("div",{className:"flex items-center gap-2 text-xs p-2 bg-white/50 rounded hover:bg-white/80 transition-colors",children:[d.jsx(cg,{className:"h-3 w-3 text-red-400 flex-shrink-0"}),e?d.jsxs("button",{onClick:()=>n(p),className:"text-blue-600 hover:text-blue-800 underline break-all font-mono text-left flex-1 flex items-center gap-1",title:"Nhấp để điều hướng đến file",children:[d.jsx("span",{children:p.replace("s3://cts-llm-docs-bucket/","")}),d.jsx(VD,{className:"h-3 w-3 flex-shrink-0"})]}):d.jsx("span",{className:"text-gray-700 break-all font-mono",children:p.replace("s3://cts-llm-docs-bucket/","")})]},g))})]})]},h))})]})};var em={exports:{}},Cu={exports:{}},yt={};/** @license React v16.13.1
|
|
205
205
|
* react-is.production.min.js
|
|
206
206
|
*
|
|
207
207
|
* Copyright (c) Facebook, Inc. and its affiliates.
|