@starasia/admin 6.6.3 → 6.6.6
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/components/BackButton/index.d.ts +2 -2
- package/dist/components/HeaderLeftSlot/index.d.ts +4 -4
- package/dist/components/ImagePreview/ImagePreview.d.ts +3 -1
- package/dist/components/Pressable/index.d.ts +1 -1
- package/dist/components/SidebarGroupSlot/index.d.ts +4 -4
- package/dist/components/TableSection/types.d.ts +4 -0
- package/dist/components/index.d.ts +2 -2
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +1197 -1201
- package/dist/index.umd.js +1 -1
- package/package.json +11 -5
package/dist/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(a,Be){typeof exports=="object"&&typeof module<"u"?Be(exports,require("@starasia/alert"),require("@starasia/badges"),require("@starasia/box"),require("@starasia/breadcrumb"),require("@starasia/button"),require("@starasia/card"),require("@starasia/date"),require("@starasia/dialog"),require("@starasia/drawer"),require("@starasia/dropdown"),require("@starasia/hooks"),require("@starasia/http"),require("@starasia/input"),require("@starasia/menu"),require("@starasia/pagination"),require("@starasia/storage"),require("@starasia/table"),require("@starasia/tabs"),require("@starasia/textarea"),require("@starasia/theme"),require("@starasia/toast"),require("@starasia/toggle"),require("@starasia/tooltip"),require("@starasia/checkbox"),require("@starasia/radio"),require("@starasia/text"),require("@starasia/icon"),require("@starasia/flex"),require("@starasia/progress"),require("@starasia/stepper"),require("@starasia/accordion"),require("@starasia/story-record"),require("@starasia/skeleton"),require("@starasia/progress-stepper"),require("react/jsx-runtime"),require("react"),require("react-router"),require("react-dom"),require("react-easy-crop")):typeof define=="function"&&define.amd?define(["exports","@starasia/alert","@starasia/badges","@starasia/box","@starasia/breadcrumb","@starasia/button","@starasia/card","@starasia/date","@starasia/dialog","@starasia/drawer","@starasia/dropdown","@starasia/hooks","@starasia/http","@starasia/input","@starasia/menu","@starasia/pagination","@starasia/storage","@starasia/table","@starasia/tabs","@starasia/textarea","@starasia/theme","@starasia/toast","@starasia/toggle","@starasia/tooltip","@starasia/checkbox","@starasia/radio","@starasia/text","@starasia/icon","@starasia/flex","@starasia/progress","@starasia/stepper","@starasia/accordion","@starasia/story-record","@starasia/skeleton","@starasia/progress-stepper","react/jsx-runtime","react","react-router","react-dom","react-easy-crop"],Be):(a=typeof globalThis<"u"?globalThis:a||self,Be(a["@starasia/admin"]={},a.alert,a.badges,a.box,a.breadcrumb,a.button,a.card,a.date,a.dialog,a.drawer,a.dropdown,a.hooks,a.http,a.input,a.menu,a.pagination,a.storage,a.table,a.tabs,a.textarea,a.theme,a.toast,a.toggle,a.tooltip,a.checkbox,a.radio,a.text,a.icon,a.flex,a.progress,a.stepper,a.accordion,a.storyRecord,a.skeleton,a.progressStepper,a.jsxRuntime,a.React,a.ReactRouter,a.ReactDOM,a.ReactEasyCrop))})(this,function(a,Be,we,y,ke,A,Fr,or,fe,cr,me,$,Ee,We,oe,ir,Br,Q,kr,nr,Me,Er,Pe,ce,Ie,ar,v,S,N,Mr,Lr,Or,Tr,be,mr,e,g,G,sr,vt){"use strict";const Dt={menus:[],menuBottom:void 0,logo:"",appName:"Workspace",userData:null,setUserData:()=>{}},dr=g.createContext(Dt),hr=()=>g.useContext(dr),Wr=r=>{const[t,l]=g.useState((r==null?void 0:r.initialUserData)||null);return{userData:t,setUserData:l}},Ir=g.createContext({badges:{},setBadge:()=>{},setBadges:()=>{},clearBadge:()=>{}}),Hr=({children:r})=>{const[t,l]=g.useState({}),c=g.useCallback(s=>{l(f=>typeof s=="function"?s(f):s)},[]),o=g.useCallback((s,f)=>{l(d=>{const u=typeof f=="function"?f(d[s]):f;return{...d,[s]:u}})},[]),i=g.useCallback(s=>{l(f=>{if(!(s in f))return f;const d={...f};return delete d[s],d})},[]),h=g.useMemo(()=>({badges:t,setBadge:o,setBadges:c,clearBadge:i}),[t,o,c,i]);return e.jsx(Ir.Provider,{value:h,children:r})},Ar=()=>g.useContext(Ir),_e=(r,t)=>{const l=t!==void 0?t:r;return l==null?null:typeof l=="string"||typeof l=="number"?{value:l}:l},Vr=({router:r,menus:t=[],menuBottom:l,logo:c,appName:o="Workspace",initialUserData:i,theme:h})=>{const s=Wr({initialUserData:i}),{theme:f}=Me.useTheme();return e.jsx(dr.Provider,{value:{logo:c,appName:o,menus:t,userData:s.userData,setUserData:s.setUserData,menuBottom:l},children:e.jsx(Hr,{children:h?e.jsx(Me.ThemeProvider,{value:h,children:r}):f?e.jsx(Me.ThemeProvider,{value:f,children:r}):r})})},wt=g.memo(Vr);function zr({collapsed:r=!1,children:t}){if(!t)return null;const l=typeof t=="function",c=l?t({collapsed:r}):t;return c==null||c===!1?null:e.jsx("div",{style:{position:"sticky",top:"4rem",zIndex:1,borderBottom:"1px solid var(--sa-border-subtle, #0b120e24)",paddingLeft:"0.5rem",paddingRight:"0.5rem",paddingTop:"0.5rem",paddingBottom:"0.5rem",boxSizing:"border-box"},children:l?c:e.jsx("div",{style:{opacity:r?0:1,transition:"opacity 0.3s",visibility:r?"hidden":"visible"},children:c})})}const fr=g.createContext(null);function jr({children:r}){const[t,l]=g.useState(null),[c,o]=g.useState(null),[i,h]=g.useState(null),[s,f]=g.useState(0),d=g.useCallback(()=>(f(u=>u+1),()=>f(u=>u-1)),[]);return e.jsx(fr.Provider,{value:{prependNode:t,appendNode:c,replaceNode:i,setPrependNode:l,setAppendNode:o,setReplaceNode:h,replaceCount:s,registerReplace:d},children:r})}function Nr({children:r}){const t=g.useContext(fr);return t?e.jsxs(e.Fragment,{children:[e.jsx("div",{ref:t.setPrependNode,style:{display:"contents"}}),t.replaceCount>0?e.jsx("div",{ref:t.setReplaceNode,style:{display:"contents"}}):r,e.jsx("div",{ref:t.setAppendNode,style:{display:"contents"}})]}):e.jsx(e.Fragment,{children:r})}function bt({children:r,mode:t="append"}){const l=g.useContext(fr);if(g.useEffect(()=>{if(!(t!=="replace"||!l))return l.registerReplace()},[t,l]),!l)return process.env.NODE_ENV!=="production"&&console.warn("[HeaderLeftSlot] used outside AppLayout — content not rendered"),null;const c=t==="prepend"?l.prependNode:t==="replace"?l.replaceNode:l.appendNode;return c?sr.createPortal(r,c):null}const gr=g.createContext(null);function Pr({children:r}){const[t,l]=g.useState({}),[c,o]=g.useState({}),i=g.useCallback((f,d)=>{l(u=>u[f]===d?u:{...u,[f]:d})},[]),h=g.useCallback(f=>(o(d=>({...d,[f]:(d[f]??0)+1})),()=>o(d=>({...d,[f]:Math.max(0,(d[f]??0)-1)}))),[]),s=g.useMemo(()=>({outletNodes:t,setOutletNode:i,slotCounts:c,registerSlot:h}),[t,i,c,h]);return e.jsx(gr.Provider,{value:s,children:r})}function _r({slotKey:r,fallback:t}){const l=g.useContext(gr),c=l?(l.slotCounts[r]??0)>0:!1,o=g.useRef(l==null?void 0:l.setOutletNode);o.current=l==null?void 0:l.setOutletNode;const i=g.useCallback(h=>{var s;return(s=o.current)==null?void 0:s.call(o,r,h)},[r]);return e.jsx(e.Fragment,{children:c?e.jsx("div",{ref:i,style:{display:"contents"}}):t})}function St({slotKey:r,children:t}){const l=g.useContext(gr),c=g.useRef(l==null?void 0:l.registerSlot);if(c.current=l==null?void 0:l.registerSlot,g.useEffect(()=>{var i;return(i=c.current)==null?void 0:i.call(c,r)},[r]),!l)return process.env.NODE_ENV!=="production"&&console.warn("[SidebarGroupSlot] used outside AppLayout — content not rendered"),null;const o=l.outletNodes[r];return o?sr.createPortal(t,o):null}const Ze="moduleSwitcherGroupId",yr="sa-module-switcher-change";function Zr(){if(typeof window>"u")return null;const r=window.localStorage.getItem(Ze);if(r===null)return null;const t=Number(r);return Number.isFinite(t)?t:null}function qr(r){typeof window>"u"||(r===null?window.localStorage.removeItem(Ze):window.localStorage.setItem(Ze,String(r)),window.dispatchEvent(new CustomEvent(yr,{detail:r})))}function Ft(){qr(null)}function ur(){const[r,t]=g.useState(()=>Zr());return g.useEffect(()=>{const c=()=>{t(Zr())},o=i=>{i.key===Ze&&c()};return window.addEventListener(yr,c),window.addEventListener("storage",o),()=>{window.removeEventListener(yr,c),window.removeEventListener("storage",o)}},[]),{selectedGroupId:r,setSelectedGroupId:c=>{qr(c),t(c)}}}let qe=0,Se=!1,Qr=new Set;const Gr=()=>e.jsxs("svg",{width:"100%",height:"100%",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[e.jsx("rect",{x:"1.667",y:"1.667",width:"12.667",height:"12.667",rx:"2"}),e.jsx("line",{x1:"6",y1:"1.667",x2:"6",y2:"14.333"})]}),Ur={width:"100%",display:"flex",alignItems:"center",gap:"0.75rem",paddingLeft:"0.75rem",paddingRight:"0.75rem",paddingTop:"0.5rem",paddingBottom:"0.5rem",fontSize:"0.875rem",color:"var(--sa-text-subtle, #8c8f97)",background:"transparent",border:"none",borderRadius:"0.375rem",cursor:"pointer",textAlign:"left"};function Bt({children:r,headerLeftSlot:t,profile:l,isLoadingProfile:c,onLogout:o,isLoggingOut:i,loadingComponent:h,sidebarHeaderContent:s,headerActions:f,profileRole:d,profileMenuButtons:u,profileMenuItems:p,logoutButton:C}){var Oe,tr;const[b]=G.useSearchParams(),B=b.get("embed")==="true",D=hr(),{badges:H}=Ar(),Z=G.useNavigate(),P=G.useLocation(),L=!$.useMediaQuery("md"),[ae,Y]=g.useState(!1),[W,X]=g.useState(!1),[ie,ne]=g.useState(!1),[q,K]=g.useState(!1),[re,se]=g.useState(()=>new Set(Qr)),[te,R]=g.useState(null),{selectedGroupId:z,setSelectedGroupId:j}=ur();g.useEffect(()=>{Qr=re},[re]);const le=g.useRef(null),ye=g.useRef(null);g.useEffect(()=>{const x=le.current;if(!x)return;const E=()=>{Se||(qe=x.scrollTop)};return x.addEventListener("scroll",E),()=>x.removeEventListener("scroll",E)},[]);const ue=()=>{const x=le.current;x&&qe>0&&(Se=!0,x.scrollTop=qe,requestAnimationFrame(()=>{Se=!1}))};g.useLayoutEffect(()=>{Se=!0,ue();const x=setTimeout(()=>{Se=!1},300);return()=>clearTimeout(x)},[]),g.useLayoutEffect(()=>{D.menus.length>0&&(qe>0?ue():requestAnimationFrame(()=>{var E;const x=(E=le.current)==null?void 0:E.querySelector("[data-menu-active='true']");x&&x.scrollIntoView({block:"center",behavior:"instant"})}))},[D.menus]),g.useEffect(()=>{Se=!0,ue();const x=setTimeout(ue,0),E=setTimeout(ue,50),O=setTimeout(ue,100),w=setTimeout(ue,200),k=setTimeout(()=>{Se=!1},300);return()=>{clearTimeout(x),clearTimeout(E),clearTimeout(O),clearTimeout(w),clearTimeout(k)}},[P.pathname]),g.useEffect(()=>{ye.current&&(ye.current.scrollTop=0)},[P.pathname]),g.useEffect(()=>{L&&ne(!1)},[P.pathname,L]),g.useEffect(()=>{L&&X(!0)},[L]);const Ve=()=>{Y(!0)},Re=()=>{Y(!1)},br=()=>{Y(!1),o()},er=x=>{const E=[x.to];return x.children&&E.push(...x.children.map(O=>O.to)),E},ze=[...D.menus.flatMap(x=>x.items.flatMap(er)),...((Oe=D.menuBottom)==null?void 0:Oe.flatMap(er))??[]],de=x=>{if(!P.pathname.startsWith(x))return!1;const E=ze.filter(O=>P.pathname.startsWith(O)).sort((O,w)=>w.length-O.length)[0];return x===E};g.useEffect(()=>{var E;const x=O=>{var w;(w=O.children)!=null&&w.some(k=>P.pathname.startsWith(k.to))&&se(k=>{const F=new Set(k);return F.add(O.id),F})};D.menus.forEach(O=>{O.items.forEach(x)}),(E=D.menuBottom)==null||E.forEach(x)},[P.pathname,D.menus,D.menuBottom]);const rr=x=>{se(E=>{const O=new Set(E);return O.has(x)?O.delete(x):O.add(x),O})};g.useEffect(()=>{D.menus.length!==0&&z!==null&&!D.menus.some(x=>x.id===z)&&j(null)},[D.menus,z,j]);const je=g.useMemo(()=>{if(z!==null)return D.menus.filter(O=>O.id===z||O.parentGroupId===z);const x=D.menus.filter(O=>O.parentGroupId===void 0),E=D.menus.filter(O=>O.parentGroupId!==void 0).flatMap(O=>O.items);return E.length===0?x:[...x,{id:18,name:"Pengaturan",items:E,parentGroupId:void 0}]},[D.menus,z]);if(B)return e.jsx("main",{style:{height:"100vh",overflowY:"auto",backgroundColor:"var(--sa-background-primary-inverse, #f8f8f8)"},children:r||e.jsx(G.Outlet,{})});const Le=x=>{const E=x.children&&x.children.length>0,O=re.has(x.id),w=E?x.children.some(T=>de(T.to)):de(x.to),k=_e(x.badge,H[x.id]),F=!!k&&W&&!L;return e.jsxs("div",{"data-menu-active":w||void 0,children:[e.jsxs("button",{onClick:T=>{if(E)if(W&&!L){const I=T.currentTarget.getBoundingClientRect();R({item:x,top:I.top,left:I.right+8})}else rr(x.id);else Z(x.to)},style:{width:"100%",display:"flex",alignItems:"center",justifyContent:W&&!L?"center":void 0,gap:"0.5rem",paddingLeft:W&&!L?"0":"0.5rem",paddingRight:W&&!L?"0":"0.5rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",height:"2rem",borderRadius:w?"var(--sa-radii-sm, 0.375rem)":"var(--sa-radii-md, 0.5rem)",textAlign:"left",border:w?"1px solid var(--sa-border-subtle, #0b120e24)":"1px solid transparent",backgroundColor:w?"var(--sa-background-primary, #ffffff)":"transparent",color:"var(--sa-text-primary, #292a2e)",cursor:"pointer"},title:W&&!L?x.title:void 0,onMouseEnter:T=>{w||(T.currentTarget.style.backgroundColor="var(--sa-background-neutral, #f0f1f2)")},onMouseLeave:T=>{w||(T.currentTarget.style.backgroundColor="transparent")},children:[e.jsxs("span",{style:{position:"relative",display:"inline-flex",flexShrink:0},children:[e.jsx(S.Icon,{name:x.icon,size:"sm",style:{flexShrink:0}}),F&&e.jsx("span",{"aria-hidden":"true",style:{position:"absolute",top:"-2px",right:"-2px",width:"0.5rem",height:"0.5rem",borderRadius:"9999px",backgroundColor:"var(--sa-color-error-500, #ff4d6d)",border:"1px solid var(--sa-background-primary, #ffffff)"}})]}),(!W||L)&&e.jsxs(e.Fragment,{children:[e.jsx("span",{style:{fontSize:"0.875rem",fontWeight:"500",whiteSpace:"nowrap",transition:"opacity 0.3s",flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},children:x.title}),k&&e.jsx(we.Badges,{text:String(k.value),variant:k.variant??"info",size:"xs",border:!0}),E&&e.jsx("svg",{style:{width:"1rem",height:"1rem",flexShrink:0,transition:"transform 0.2s",transform:O?"rotate(180deg)":"rotate(0deg)"},fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]}),E&&(!W||L)&&(()=>{const T=x.children.findIndex(I=>de(I.to));return e.jsxs("div",{style:{position:"relative",marginLeft:"0.9375rem",paddingLeft:"1.125rem",overflow:"hidden",transition:"all 0.3s ease-in-out",maxHeight:O?`${x.children.length*36}px`:"0px",opacity:O?1:0,marginTop:O?"0.25rem":"0px"},children:[e.jsx("span",{"aria-hidden":"true",style:{position:"absolute",left:0,top:0,width:"1.5px",height:"100%",backgroundColor:"var(--sa-border-subtle, #0b120e24)",pointerEvents:"none"}}),T>=0&&e.jsx("span",{"aria-hidden":"true",style:{position:"absolute",left:0,top:`${T*32}px`,width:"1.5px",height:"32px",backgroundColor:"var(--sa-text-primary, #292a2e)",transition:"top 0.2s ease-in-out",pointerEvents:"none",zIndex:1}}),x.children.map(I=>{const he=_e(I.badge,H[I.id]);return e.jsxs("button",{onClick:()=>Z(I.to),style:{width:"100%",display:"flex",alignItems:"center",gap:"0.5rem",paddingLeft:"0.75rem",paddingRight:"0.5rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",height:"2rem",borderRadius:de(I.to)?"var(--sa-radii-sm, 0.375rem)":"var(--sa-radii-md, 0.5rem)",textAlign:"left",backgroundColor:de(I.to)?"var(--sa-background-primary, #ffffff)":"transparent",color:de(I.to)?"var(--sa-text-primary, #292a2e)":"var(--sa-text-subtle, #505258)",cursor:"pointer",border:de(I.to)?"1px solid var(--sa-border-subtle, #0b120e24)":"1px solid transparent"},onMouseEnter:Ce=>{de(I.to)||(Ce.currentTarget.style.backgroundColor="var(--sa-background-neutral, #f0f1f2)")},onMouseLeave:Ce=>{de(I.to)||(Ce.currentTarget.style.backgroundColor="transparent")},children:[e.jsx(S.Icon,{name:I.icon,size:"sm",style:{flexShrink:0}}),e.jsx("span",{style:{fontSize:"0.875rem",fontWeight:"500",whiteSpace:"nowrap",flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},children:I.title}),he&&e.jsx(we.Badges,{text:String(he.value),variant:he.variant??"info",size:"xs",border:!0})]},I.id)})]})})()]},x.id)};return e.jsx(Pr,{children:e.jsxs(jr,{children:[e.jsxs("div",{style:{display:"flex",height:"100vh",position:"relative","--app-sidebar-width":L?"0px":W?"4.375rem":"16.375rem","--app-footer-zindex":L&&ie?"40":"999"},children:[L&&e.jsx("div",{style:{position:"fixed",inset:0,backgroundColor:"var(--sa-color-black-alpha-a50, #181a198f)",zIndex:40,opacity:ie?.5:0,pointerEvents:ie?"auto":"none",transition:"opacity 0.3s"},onClick:()=>ne(!1)}),e.jsxs("aside",{style:{width:L?"16.375rem":W?"4.375rem":"16.375rem",position:L?"fixed":"relative",...L&&{inset:0,zIndex:50,transform:ie?"translateX(0)":"translateX(-100%)"},backgroundColor:"var(--sa-background-primary-inverse, #f8f8f8)",borderRight:"1px solid var(--sa-border-subtle, #0b120e24)",display:"flex",flexDirection:"column",transition:"all 0.3s ease-in-out",flexShrink:L?void 0:0},children:[e.jsx("div",{onMouseEnter:()=>K(!0),onMouseLeave:()=>K(!1),style:{height:"4rem",display:"flex",alignItems:"center",justifyContent:"space-between",paddingLeft:"1rem",paddingRight:"1rem",borderBottom:"1px solid var(--sa-border-subtle, #0b120e24)",position:"relative"},children:(()=>{const x=!L&&W&&!ie,E=x&&q;return e.jsxs(e.Fragment,{children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem",flex:x?1:void 0,justifyContent:x?"center":void 0,transition:"opacity 0.2s",opacity:E?0:1,pointerEvents:E?"none":"auto"},children:[e.jsx("img",{src:D.logo,alt:"Logo",style:{width:"2rem",height:"2rem",flexShrink:0}}),(!W||ie)&&e.jsx("span",{style:{fontWeight:"600",color:"var(--sa-text-primary, #292a2e)",whiteSpace:"nowrap",transition:"opacity 0.3s"},children:D.appName})]}),!L&&!W&&e.jsx("button",{type:"button",onClick:()=>X(!0),"aria-label":"Collapse sidebar",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"1rem",height:"1rem",padding:0,background:"transparent",border:"none",color:"var(--sa-text-subtle, #8c8f97)",cursor:"pointer",flexShrink:0},children:e.jsx(Gr,{})}),x&&e.jsx("button",{type:"button",onClick:()=>X(!1),"aria-label":"Expand sidebar",style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",display:"inline-flex",alignItems:"center",justifyContent:"center",width:"2rem",height:"2rem",padding:0,background:"var(--sa-background-primary, #ffffff)",border:"1px solid var(--sa-border-subtle, #0b120e24)",borderRadius:"var(--sa-radii-sm, 0.375rem)",color:"var(--sa-text-primary, #292a2e)",cursor:"pointer",opacity:E?1:0,pointerEvents:E?"auto":"none",transition:"opacity 0.2s"},children:e.jsx("span",{style:{width:"1rem",height:"1rem",display:"inline-flex"},children:e.jsx(Gr,{})})}),L&&e.jsx("button",{onClick:()=>ne(!1),"aria-label":"Close menu",style:{padding:"0.375rem",borderRadius:"0.5rem",backgroundColor:"transparent",border:"none",color:"var(--sa-text-subtle, #8c8f97)",cursor:"pointer"},children:e.jsx("svg",{style:{width:"1.25rem",height:"1.25rem"},fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})})()}),s&&e.jsx(zr,{collapsed:L?!1:W,children:s}),e.jsx("div",{ref:le,style:{flex:1,overflowY:"auto",paddingTop:"1rem",paddingBottom:"1rem"},children:je.map(x=>e.jsxs("div",{style:{marginBottom:"1rem"},children:[!W||L?x.name&&e.jsx("div",{style:{paddingLeft:"1.5rem",paddingRight:"1rem",paddingTop:"0rem",paddingBottom:"0.25rem",fontSize:"0.875rem",fontWeight:"400",color:"var(--sa-text-subtlest, #6b6e76)",transition:"opacity 0.3s",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:x.name}):x.name&&e.jsx("div",{"aria-label":x.name,style:{display:"flex",alignItems:"center",justifyContent:"center",paddingTop:"0.75rem",paddingBottom:"0.75rem"},children:e.jsx("span",{style:{display:"block",width:"1rem",height:"2px",borderRadius:"1px",backgroundColor:x.color??"var(--sa-background-brand, #04254f)"}})}),e.jsx("div",{style:{paddingLeft:"1rem",paddingRight:"1rem",display:"flex",flexDirection:"column",gap:"var(--sa-spacing-xs, 0.25rem)"},children:x.slotKey?e.jsx(_r,{slotKey:x.slotKey,fallback:x.items.map(E=>Le(E))}):x.items.map(E=>Le(E))})]},x.id))}),D.menuBottom&&D.menuBottom.length>0&&e.jsx("div",{style:{borderTop:"1px solid var(--sa-border-subtle, #0b120e24)",paddingTop:"0.75rem",paddingBottom:"0.75rem",paddingLeft:"1rem",paddingRight:"1rem",backgroundColor:"var(--sa-background-primary-inverse, #f8f8f8)",display:"flex",flexDirection:"column",gap:"var(--sa-spacing-xs, 0.25rem)",flexShrink:0},children:D.menuBottom.map(x=>Le(x))})]}),e.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},children:[e.jsxs("header",{style:{height:"4rem",backgroundColor:"var(--sa-background-primary, #ffffff)",borderBottom:"1px solid var(--sa-border-subtle, #0b120e24)",display:"flex",alignItems:"center",justifyContent:"space-between",paddingLeft:"1rem",paddingRight:"1rem",flexShrink:0},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"1rem"},children:[L&&e.jsx("button",{onClick:()=>ne(!0),style:{padding:"0.375rem",borderRadius:"0.5rem",backgroundColor:"transparent",border:"none",color:"var(--sa-text-subtle, #8c8f97)",cursor:"pointer"},children:e.jsx("svg",{style:{width:"1.5rem",height:"1.5rem"},fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})}),e.jsx(Nr,{children:t})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.75rem"},children:[f,e.jsxs(oe.Menu,{position:"bottom-right",children:[e.jsx(oe.MenuButton,{children:e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem",cursor:"pointer"},children:[e.jsxs("div",{style:{textAlign:"right",maxWidth:"12.5rem"},children:[e.jsx("p",{style:{margin:0,fontSize:"0.875rem",fontWeight:500,color:"var(--sa-text-subtle, #8c8f97)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:c?"Loading...":(l==null?void 0:l.name)||"unknown"}),e.jsx("p",{style:{margin:0,fontSize:"0.75rem",color:"var(--sa-text-subtle, #8c8f97)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:c?"":(l==null?void 0:l.email)||"unknown"})]}),e.jsx("div",{style:{width:"2.5rem",height:"2.5rem",borderRadius:"9999px",display:"flex",alignItems:"center",justifyContent:"center",color:"var(--sa-background-primary, #ffffff)",fontWeight:600,fontSize:"0.875rem",boxShadow:"var(--sa-shadow-sm, 0 1px 2px 0 #0000000d)",flexShrink:0,backgroundColor:"var(--sa-background-brand, #04254f)"},children:((l==null?void 0:l.name)||"U")[0].toUpperCase()}),e.jsx(S.Icon,{name:"ChevronDown",size:"sm",style:{color:"var(--sa-text-subtle, #8c8f97)"}})]})}),e.jsxs(oe.MenuLists,{style:{width:"280px",paddingBlock:"12px",paddingInline:"12px",gap:"8px",marginTop:"16px"},children:[e.jsx(oe.MenuHeading,{children:e.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center",paddingBlock:"0.5rem"},children:[e.jsx("div",{style:{width:"4rem",height:"4rem",borderRadius:"9999px",display:"flex",alignItems:"center",justifyContent:"center",color:"var(--sa-background-primary, #ffffff)",fontWeight:600,fontSize:"1.25rem",boxShadow:"var(--sa-shadow-sm, 0 1px 2px 0 #0000000d)",marginBottom:"0.75rem",backgroundColor:"var(--sa-background-brand, #04254f)"},children:((l==null?void 0:l.name)||"U")[0].toUpperCase()}),e.jsx("p",{style:{margin:0,fontSize:"0.875rem",fontWeight:600,color:"var(--sa-text-primary, #292a2e)",maxWidth:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:(l==null?void 0:l.name)||"unknown"}),e.jsx("p",{style:{margin:0,fontSize:"0.75rem",color:"var(--sa-text-subtle, #8c8f97)",maxWidth:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:(l==null?void 0:l.email)||"unknown"}),d&&e.jsx("p",{style:{margin:0,fontSize:"0.75rem",color:"var(--sa-text-subtle, #8c8f97)",maxWidth:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:d})]})}),(u&&u.length>0||p)&&e.jsxs(oe.MenuBody,{children:[u==null?void 0:u.map((x,E)=>e.jsx(oe.MenuButton,{children:e.jsxs("button",{type:"button",onClick:x.onClick,style:Ur,onMouseEnter:O=>{O.currentTarget.style.backgroundColor="var(--sa-background-neutral, #f0f1f2)"},onMouseLeave:O=>{O.currentTarget.style.backgroundColor="transparent"},children:[e.jsx(S.Icon,{name:x.icon,size:"md"}),e.jsx("span",{children:x.label})]})},`${x.label}-${E}`)),p]}),C??e.jsx(oe.MenuFooter,{children:e.jsx(oe.MenuButton,{children:e.jsxs("button",{type:"button",onClick:Ve,style:{...Ur,color:"var(--sa-background-error, #c9184a)",fontWeight:500},onMouseEnter:x=>{x.currentTarget.style.backgroundColor="var(--sa-color-error-50, #fff0f3)"},onMouseLeave:x=>{x.currentTarget.style.backgroundColor="transparent"},children:[e.jsx(S.Icon,{name:"Logout",size:"md",style:{color:"var(--sa-background-error, #c9184a)"}}),e.jsx("span",{children:"Logout"})]})})})]})]})]})]}),e.jsx("main",{ref:ye,style:{flex:1,overflowY:"auto"},children:r||e.jsx(G.Outlet,{})})]})]}),i&&h&&e.jsx("div",{style:{position:"fixed",inset:0,background:"var(--sa-color-black-alpha-a70, #181a19b8)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999},children:h}),e.jsxs(fe.Dialog,{isShow:ae,onHide:Re,children:[e.jsx(fe.DialogTitle,{children:"Confirmation Logout"}),e.jsx(fe.DialogBody,{children:"Are you sure you want to end the session and exit the page?"}),e.jsx(fe.DialogFooter,{children:e.jsx(y.Box,{display:"flex",align:"flex-end",justify:"center",children:e.jsxs(N.Flex,{direction:"row",gap:"sm",align:"center",children:[e.jsx(y.Box,{children:e.jsx(A.Button,{secondary:!0,onClick:Re,children:"Cancel"})}),e.jsx(y.Box,{children:e.jsx(A.Button,{primary:!0,onClick:br,children:"Yes, Sure"})})]})})})]}),te&&e.jsxs(e.Fragment,{children:[e.jsx("div",{onClick:()=>R(null),style:{position:"fixed",inset:0,zIndex:60,backgroundColor:"transparent"}}),e.jsxs("div",{role:"dialog","aria-label":te.item.title,style:{position:"fixed",top:te.top,left:te.left,zIndex:61,minWidth:"13rem",maxWidth:"16rem",backgroundColor:"var(--sa-background-primary, #ffffff)",border:"1px solid var(--sa-border-subtle, #0b120e24)",borderRadius:"var(--sa-radii-md, 0.5rem)",boxShadow:"var(--sa-shadow-lg, 0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a)",padding:"0.5rem",display:"flex",flexDirection:"column",gap:"0.125rem"},children:[e.jsx("div",{style:{fontSize:"0.75rem",fontWeight:600,color:"var(--sa-color-gray-500, #8c8f97)",padding:"0.25rem 0.5rem 0.5rem",textTransform:"uppercase",letterSpacing:"0.05em"},children:te.item.title}),(tr=te.item.children)==null?void 0:tr.map(x=>{const E=de(x.to),O=_e(x.badge,H[x.id]);return e.jsxs("button",{onClick:()=>{Z(x.to),R(null)},style:{width:"100%",display:"flex",alignItems:"center",gap:"0.75rem",padding:"0.5rem 0.75rem",borderRadius:"var(--sa-radii-md, 0.5rem)",textAlign:"left",backgroundColor:E?"var(--sa-color-gray-100, #f8f8f8)":"transparent",color:E?"var(--sa-text-primary, #292a2e)":"var(--sa-color-gray-800, #505258)",border:"1px solid transparent",cursor:"pointer",fontSize:"0.875rem",fontWeight:500},onMouseEnter:w=>{E||(w.currentTarget.style.backgroundColor="var(--sa-color-gray-100, #f8f8f8)")},onMouseLeave:w=>{E||(w.currentTarget.style.backgroundColor="transparent")},children:[x.icon&&e.jsx(S.Icon,{name:x.icon,size:"sm",style:{flexShrink:0}}),e.jsx("span",{style:{flex:1,whiteSpace:"nowrap"},children:x.title}),O&&e.jsx(we.Badges,{text:String(O.value),variant:O.variant??"info",size:"xs",border:!0})]},x.id)})]})]})]})})}const kt=({children:r,...t})=>e.jsx(y.Box,{role:"button",cursor:"pointer","aria-pressed":"true",display:"inline-block",tabIndex:0,...t,children:r}),He=g.memo(kt),Jr=({title:r,iconName:t,textColor:l,iconColor:c,hoverTextColor:o,hoverIconColor:i})=>{const[h,s]=g.useState(!1),f=c??"var(--sa-text-subtle, #8c8f97)",d=l??"var(--sa-text-subtle, #8c8f97)",u=i??"var(--sa-text-subtle, #8c8f97)",p=o??"var(--sa-text-primary, #292a2e)";return e.jsxs(y.Box,{direction:"row",gap:"xs",align:"center",onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),style:{cursor:"pointer"},children:[e.jsx(S.Icon,{name:t||"ChevronLeft",size:"xs",style:{color:h?u:f,transition:"color 0.15s ease"}}),e.jsx(v.Text,{variant:"sub-h3",style:{color:h?p:d,transition:"color 0.15s ease"},children:r||"Back"})]})},Et=({items:r,separator:t="/",iconName:l,iconColor:c,hoverIconColor:o})=>{const[i,h]=g.useState(!1),s=c??"var(--sa-text-subtle, #8c8f97)",f=o??"var(--sa-text-subtle, #8c8f97)",d=r.length>1?r[0]:void 0,u=!!(d!=null&&d.to||d!=null&&d.onClick),p=e.jsx(S.Icon,{name:l||"ChevronLeft",size:"xs",onMouseEnter:u?()=>h(!0):void 0,onMouseLeave:u?()=>h(!1):void 0,style:{color:u&&i?f:s,transition:"color 0.15s ease",cursor:u?"pointer":void 0}}),C=d!=null&&d.to?e.jsx(G.Link,{to:d.to,replace:!0,style:{textDecoration:"none"},children:p}):d!=null&&d.onClick?e.jsx(He,{onClick:d.onClick,children:p}):p;return e.jsxs(y.Box,{direction:"row",gap:"xs",align:"center",children:[C,e.jsx(ke.Breadcrumb,{separator:t,size:"md",children:r.map((b,B)=>{const D=B===r.length-1;return b.to&&!D?e.jsx(ke.BreadcrumbItem,{children:e.jsx(G.Link,{to:b.to,children:b.label})},B):e.jsx(ke.BreadcrumbItem,{currentPage:D,children:e.jsx(ke.BreadcrumbLink,{onClick:D?void 0:b.onClick,children:b.label})},B)})})]})},Mt=r=>{const{items:t,separator:l,onClick:c,navigateTo:o,...i}=r;return t&&t.length>0?e.jsx(Et,{items:t,separator:l,iconName:i.iconName,iconColor:i.iconColor,hoverIconColor:i.hoverIconColor}):o?e.jsx(y.Box,{direction:"row",children:e.jsx(G.Link,{to:o,replace:!0,style:{textDecoration:"none"},children:e.jsx(Jr,{...i})})}):e.jsx(y.Box,{direction:"row",children:e.jsx(He,{onClick:c,children:e.jsx(Jr,{...i})})})},pr=[{icon:"var(--sa-color-brand-400, #3366b7)",activeBg:"var(--sa-color-brand-50, #e6edf6)",activeBorder:"var(--sa-color-brand-300, #668cc9)",activeShadow:"rgba(51, 102, 183, 0.25)"},{icon:"var(--sa-color-warning-400, #ed9f30)",activeBg:"var(--sa-color-warning-50, #fef2e6)",activeBorder:"var(--sa-color-warning-300, #f1b259)",activeShadow:"rgba(237, 159, 48, 0.25)"},{icon:"var(--sa-color-secondary-300, #5468e1)",activeBg:"var(--sa-color-secondary-50, #e6e9fb)",activeBorder:"var(--sa-color-secondary-200, #8a98ea)",activeShadow:"rgba(84, 104, 225, 0.25)"},{icon:"var(--sa-color-info-500, #00abeb)",activeBg:"var(--sa-color-info-50, #effaff)",activeBorder:"var(--sa-color-info-300, #75dbff)",activeShadow:"rgba(0, 171, 235, 0.25)"},{icon:"var(--sa-color-success-500, #30ce84)",activeBg:"var(--sa-color-success-50, #ecfff6)",activeBorder:"var(--sa-color-success-300, #75dead)",activeShadow:"rgba(48, 206, 132, 0.25)"},{icon:"var(--sa-color-error-400, #ff758f)",activeBg:"var(--sa-color-error-50, #fff0f3)",activeBorder:"var(--sa-color-error-300, #ff8fa3)",activeShadow:"rgba(255, 117, 143, 0.25)"}];function Yr(r,t,l){return{display:"flex",alignItems:"center",justifyContent:"center",width:"64px",height:"64px",borderRadius:"var(--sa-radii-sm, 6px)",border:r?`2px solid ${l.activeBorder}`:"2px solid var(--sa-color-gray-200, #f0f1f2)",backgroundColor:r?l.activeBg:"var(--sa-color-gray-50, #ffffff)",boxShadow:r?t?`0 8px 20px ${l.activeShadow.replace("0.25","0.35")}`:`0 2px 8px ${l.activeShadow}`:t?"0 8px 20px rgba(0, 0, 0, 0.14)":"0 1px 4px rgba(0, 0, 0, 0.08)",transform:t?"translateY(-3px) scale(1.05)":"translateY(0) scale(1)",transition:"box-shadow 0.2s ease, transform 0.2s ease, background-color 0.15s ease, border-color 0.15s ease"}}const Xr={fontSize:"11px",fontWeight:500,textAlign:"center",overflowWrap:"normal",wordBreak:"normal",color:"var(--sa-background-primary, #ffffff)",lineHeight:"1.3",maxWidth:"80px"},Kr={display:"flex",flexDirection:"column",alignItems:"center",gap:"8px",background:"none",border:"none",cursor:"pointer",padding:0};function $r({isShow:r,onHide:t,menus:l,selectedGroupId:c,onSelect:o}){const[i,h]=g.useState(void 0),s=d=>{o(d),t()},f=pr[0];return e.jsx(fe.Dialog,{isShow:r,onHide:t,style:{width:560,background:"transparent",boxShadow:"none",border:"none"},children:e.jsx(fe.DialogBody,{children:e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(5, 1fr)",gap:"16px"},children:[e.jsxs("button",{onClick:()=>s(null),onMouseEnter:()=>h("all"),onMouseLeave:()=>h(void 0),style:Kr,children:[e.jsx("div",{style:Yr(c===null,i==="all",f),children:e.jsx("div",{style:{color:f.icon,display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx(S.Icon,{name:"Grid",size:"lg",style:{width:32,height:32}})})}),e.jsx("span",{style:Xr,children:"Semua"})]}),l.map((d,u)=>{var D;const p=c===d.id,C=i===d.id,b=((D=d.items[0])==null?void 0:D.icon)??"Grid",B=pr[(u+1)%pr.length];return e.jsxs("button",{onClick:()=>s(d.id),onMouseEnter:()=>h(d.id),onMouseLeave:()=>h(void 0),style:Kr,children:[e.jsx("div",{style:Yr(p,C,B),children:e.jsx("div",{style:{color:B.icon,display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx(S.Icon,{name:b,size:"lg",style:{width:32,height:32}})})}),e.jsx("span",{style:Xr,children:d.name})]},d.id)})]})})})}function Lt({onSelect:r,"aria-label":t="Pilih module"}={}){const l=hr(),c=G.useNavigate(),{selectedGroupId:o,setSelectedGroupId:i}=ur(),[h,s]=g.useState(!1),f=d=>{var u;if(i(d),d!==null){const p=l.menus.find(b=>b.id===d),C=(u=p==null?void 0:p.items[0])==null?void 0:u.to;C&&c(C)}r==null||r(d)};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{style:{position:"relative"},children:[e.jsx("button",{onClick:()=>s(!0),style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"2.25rem",height:"2.25rem",borderRadius:"var(--sa-radii-sm, 0.25rem)",border:"1px solid var(--sa-border-subtle, #0b120e24)",color:"var(--sa-text-subtle, #8c8f97)",backgroundColor:"transparent",cursor:"pointer"},"aria-label":t,onMouseEnter:d=>{d.currentTarget.style.backgroundColor="var(--sa-background-primary-inverse, #f8f8f8)"},onMouseLeave:d=>{d.currentTarget.style.backgroundColor="transparent"},children:e.jsx(S.Icon,{name:"GridApplication",size:"sm"})}),o!==null&&e.jsx("span",{style:{position:"absolute",top:"0.25rem",right:"0.25rem",width:"0.5rem",height:"0.5rem",borderRadius:"9999px",backgroundColor:"var(--sa-color-brand-500, #1a4fa0)"},"aria-hidden":"true"})]}),e.jsx($r,{isShow:h,onHide:()=>s(!1),menus:l.menus.filter(d=>d.parentGroupId===void 0),selectedGroupId:o,onSelect:f})]})}const Ot=(r,t)=>{const l=[];if(t===0)return l.push(r),l;for(let c=0;c<r.length;c+=t){const o=r.slice(c,c+t);l.push(o)}return l},Tt=g.memo(({value:r,label:t,separator:l,labelWidth:c,lastIndex:o,labelAlign:i="top"})=>{const h=g.useMemo(()=>({padding:0,paddingBottom:o?0:12,verticalAlign:i}),[o,i]),s=g.useMemo(()=>({padding:0,paddingRight:12,paddingLeft:12,paddingBottom:o?0:12,verticalAlign:i}),[o,i]),f=()=>typeof t=="string"?e.jsx(v.Text,{fontWeight:"medium",color:"text-muted",children:t}):t,d=()=>typeof r=="string"||typeof r=="number"?e.jsx(v.Text,{color:"text",fontWeight:"medium",children:r}):r,u=()=>typeof l=="string"||typeof l=="number"?e.jsx(v.Text,{fontWeight:"medium",color:"text-muted",children:l}):l;return e.jsxs(Q.Tr,{children:[e.jsx(Q.Td,{style:h,width:c,children:f()}),l?e.jsx(Q.Td,{style:s,width:24,children:u()}):null,e.jsx(Q.Td,{style:h,children:d()})]})}),mt=g.memo(({fields:r,separator:t,labelWidth:l})=>e.jsx(Q.Table,{children:r.map((c,o)=>e.jsx(Tt,{separator:t,labelWidth:l,lastIndex:o===r.length-1,...c},`field-group-field-${o}`))})),Wt=g.memo(({maxRow:r=0,maxColumn:t=2,separator:l=":",fields:c=[],labelWidth:o=150,bordered:i=!1})=>{const h=g.useMemo(()=>Ot(c,r),[c,r]),s=h.length>2,f=()=>{switch(t){case 1:return"width-full";case 2:return"width-1-2";case 3:return"width-1-3";case 4:return"width-1-4";default:return"width-1-2"}};return e.jsx(y.Box,{gap:s?void 0:"lg",direction:"row",flexWrap:"wrap",borderRadius:"rounded-sm",padding:"lg",paddingBottom:s?"xs":"lg",bg:"accent-dark-tertiary",borderWidth:i?"border":void 0,borderStyle:i?"border-solid":void 0,borderColor:i?"border-subtle":void 0,children:h.map((d,u)=>e.jsx(y.Box,{flex:s?void 0:"1",width:s?f():void 0,marginBottom:s?"lg":void 0,children:e.jsx(mt,{labelWidth:o,fields:d,separator:l})},u))})}),It=({backButton:r})=>{const[t,l]=g.useState(!1),c=(r==null?void 0:r.iconColor)??"var(--sa-text-subtle, #8c8f97)",o=(r==null?void 0:r.textColor)??"var(--sa-text-subtle, #8c8f97)",i=(r==null?void 0:r.hoverIconColor)??"var(--sa-text-subtle, #8c8f97)",h=(r==null?void 0:r.hoverTextColor)??"var(--sa-text-primary, #292a2e)";return e.jsxs(y.Box,{direction:"row",gap:"xs",align:"center",onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),style:{cursor:"pointer"},children:[e.jsx(S.Icon,{name:(r==null?void 0:r.iconName)||"ChevronLeft",size:"xs",style:{color:t?i:c,transition:"color 0.15s ease"}}),e.jsx(v.Text,{variant:"sub-h3",style:{color:t?h:o,textDecoration:t?"underline":"none",transition:"color 0.15s ease"},children:(r==null?void 0:r.title)||"Back"})]})},Ht=({backButton:r,title:t,titleTag:l,children:c,header:o=!0,action:i,titleTagProps:h,containerProps:s,headerProps:f})=>{const d=$.useMediaQuery("lg"),u=G.useNavigate(),p=G.useLocation(),C=r==null?void 0:r.show,b=()=>{if(typeof(r==null?void 0:r.onClick)=="function"){r.onClick();return}u(-1,{replace:!0})},B=()=>i?g.isValidElement(i)?i:e.jsx(y.Box,{direction:"row",gap:"lg",children:i.map(({title:P,icon:J,buttonProps:L,onClick:ae},Y)=>!P&&!J?null:e.jsx(A.Button,{fullWidth:!d,iconLeft:J?e.jsx(S.Icon,{name:J,size:"md"}):void 0,onClick:ae,...L,children:P},`action-${Y}`))}):null,D=()=>{const P=e.jsx(It,{backButton:r});return r!=null&&r.navigateTo?e.jsx(y.Box,{direction:"row",children:e.jsx(G.Link,{to:r.navigateTo,replace:!0,style:{textDecoration:"none"},children:P})}):e.jsx(y.Box,{direction:"row",children:e.jsx(He,{onClick:b,children:P})})},H=()=>{const P=!!t,J=g.isValidElement(i)?!0:Array.isArray(i)&&i.length>0;return!P&&!J&&!C?null:e.jsxs(y.Box,{gap:"xs",paddingTop:f==null?void 0:f.paddingTop,paddingInline:f==null?void 0:f.paddingInline,...f,children:[C&&D(),(P||J)&&e.jsxs(y.Box,{direction:d?"row":"column",gap:"lg",justify:"space-between",align:"center",children:[P?typeof t=="string"?e.jsxs(y.Box,{direction:"row",gap:"lg",align:"center",children:[e.jsx(v.Text,{variant:"h2",fontWeight:"semibold",fontFamily:"Poppins",children:t}),l&&e.jsx(we.Badges,{border:!0,size:"lg",text:l,...h})]}):t:null,B()]})]})},Z=()=>c;return e.jsxs(y.Box,{gap:"md",variant:"main",...s,padding:"md",style:{...(s==null?void 0:s.style)??{},animation:"pageLayoutEnter 320ms cubic-bezier(0.16, 1, 0.3, 1) backwards"},children:[o&&H(),Z()]},p.pathname)},At=g.memo(Ht),Vt={icon:"Cross",title:""},zt="calc(100vw - 16px)",Rr=r=>r==null?void 0:`min(${typeof r=="number"?`${r}px`:r}, ${zt})`,et=g.forwardRef(({onHide:r,show:t,withBlur:l=!1,style:c,children:o,closeButton:i=Vt,width:h,minWidth:s="357px",maxWidth:f="357px"},d)=>{const u=Rr(h??s),p=Rr(h??f);return e.jsx(cr.Drawer,{blur:l,isShow:t,position:"right",onHide:r,ref:d,style:{minWidth:u,maxWidth:p,...c},children:e.jsxs(y.Box,{padding:"lg",children:[i?e.jsxs(y.Box,{direction:"row",align:"center",gap:"sm",onClick:r,marginBottom:"lg",cursor:"pointer",children:[e.jsx(S.Icon,{name:i.icon,size:"md",color:"subtle",cursor:"pointer"}),i.title?e.jsx(v.Text,{fontFamily:"Poppins",fontSize:"md",color:"text-muted",children:i.title}):null]}):null,o]})})}),Cr=g.memo(({children:r,borderBottom:t=!0,padding:l=!0})=>{const c=$.useMediaQuery("lg");return e.jsx(y.Box,{padding:l?"md":"spacing-0",paddingLeft:l?"md":"spacing-0",paddingRight:l?"md":"spacing-0",style:t?{borderBottom:"1px solid var(--sa-border-subtle, #0b120e24)"}:void 0,children:r})}),xr=g.memo(({children:r,borderTop:t=!0,padding:l=!0})=>{const c=$.useMediaQuery("lg");return e.jsx(y.Box,{padding:l?"md":"spacing-0",paddingLeft:l?"md":"spacing-0",paddingRight:l?"md":"spacing-0",style:t?{borderTop:"1px solid var(--sa-border-subtle, #0b120e24)"}:void 0,children:r})}),jt=g.memo(({children:r,...t})=>e.jsx(y.Box,{padding:"md",paddingLeft:"md",paddingRight:"md",gap:"md",...t,children:r})),Nt=g.memo(({children:r,title:t,titleTag:l,action:c,header:o,footer:i,actionContainer:h,containerProps:s,bodyProps:f,headerProps:d={borderBottom:!0},footerProps:u={borderTop:!0},variantTag:p="info"})=>{const C=$.useMediaQuery("lg"),b=()=>l?e.jsxs(y.Box,{direction:"row",gap:"sm",align:"center",children:[e.jsx(v.Text,{fontWeight:"medium",children:t}),e.jsx(we.Badges,{border:!0,text:l,variant:p})]}):e.jsx(v.Text,{fontWeight:"medium",children:t}),B=()=>o||e.jsxs(y.Box,{direction:"row",justify:"space-between",align:"flex-start",gap:"md",children:[e.jsx(y.Box,{children:t?b():null}),e.jsx(y.Box,{style:C?{width:"100%",maxWidth:"19.313rem"}:{flex:1},...h,children:c??null})]}),D=!!(o||t||c);return e.jsxs(y.Box,{bg:"white",borderRadius:"rounded-xs",variant:"section",borderWidth:"border",borderStyle:"border-solid",borderColor:"border-base",...s,style:{backgroundColor:"var(--sa-background-primary, #ffffff)",...(s==null?void 0:s.style)??{}},children:[o!==null&&D?e.jsx(Cr,{...d,children:B()}):null,e.jsx(jt,{...f,children:r}),i?e.jsx(xr,{...u,children:i}):null]})}),Pt="var(--sa-color-secondary-50, #e6e9fb)",_t=({children:r,onClick:t})=>{const[l,c]=g.useState(""),o=()=>c(Pt),i=()=>c("");return e.jsx(He,{fullWidth:!0,height:"height-8",paddingRight:"spacing-4",paddingLeft:"spacing-4",display:"flex",direction:"row",align:"center",gap:"spacing-1",cursor:"pointer",onClick:t,onMouseEnter:o,borderRadius:"rounded-md",onMouseLeave:i,style:{backgroundColor:l},children:r})},Zt=g.memo(_t),qt=({icon:r,items:t=[],style:l,triggerStyle:c,containerStyle:o,position:i="bottom-right",buttonProps:h,iconProps:s,variant:f="default"})=>{const d=g.useMemo(()=>({zIndex:10,width:"150px",...o}),[o]);return e.jsxs(oe.Menu,{position:i,style:l,children:[e.jsx(oe.MenuButton,{style:c,children:e.jsx(A.Button,{size:"sm",secondary:!0,...h,children:e.jsx(S.Icon,{name:r,...s})})}),e.jsx(oe.MenuLists,{style:d,children:t.map((u,p)=>f==="outline-button"?e.jsx(oe.MenuBody,{children:e.jsxs(A.Button,{size:"sm",secondary:!0,fullWidth:!0,onClick:u.onClick,...u.buttonProps,children:[e.jsx(S.Icon,{name:u.icon,size:"md",...u.iconProps}),e.jsx(v.Text,{fontSize:"sm",color:"text",...u.textProps,children:u.label})]})},u.id||p):e.jsxs(Zt,{onClick:u.onClick,...u.buttonProps,children:[e.jsx(S.Icon,{name:u.icon,size:"md",...u.iconProps}),e.jsx(v.Text,{fontSize:"sm",color:"text",...u.textProps,children:u.label})]},u.id||p))})]})},Qt=g.memo(qt),ge={H1:r=>e.jsx(v.Text,{variant:"h1",children:r.children,...r.props}),H2:r=>e.jsx(v.Text,{variant:"h2",children:r.children,...r.props}),H3:r=>e.jsx(v.Text,{variant:"h3",children:r.children,...r.props}),H4:r=>e.jsx(v.Text,{variant:"h4",children:r.children,...r.props}),H5:r=>e.jsx(v.Text,{variant:"h5",children:r.children,...r.props}),H6:r=>e.jsx(v.Text,{variant:"h6",children:r.children,...r.props}),SubH1:r=>e.jsx(v.Text,{variant:"sub-h1",children:r.children,...r.props}),SubH2:r=>e.jsx(v.Text,{variant:"sub-h2",children:r.children,...r.props}),SubH3:r=>e.jsx(v.Text,{variant:"sub-h3",children:r.children,...r.props}),Body1:r=>e.jsx(v.Text,{variant:"body-1",children:r.children,...r.props}),Body2:r=>e.jsx(v.Text,{variant:"body-2",children:r.children,...r.props}),Body3:r=>e.jsx(v.Text,{variant:"body-3",children:r.children,...r.props})},Qe=()=>{const[r,t]=G.useSearchParams(),l=Ee.searchParamsToObject(r.toString()),c=G.useParams(),o=G.useLocation(),i=c.id;return{setSearchParams:t,searchParams:r,searchQueries:l,isHasQuery:(u,p)=>r.has(u)&&r.get(u)===p,getQueryParam:u=>r.get(u),getRouteParam:u=>c[u],params:c,location:o,id:i,hasId:!!i}},rt=r=>JSON.stringify(r),tt=r=>JSON.stringify(r),lt=r=>JSON.stringify(r),ot=r=>JSON.stringify(r),Gt=r=>r,Ut=r=>JSON.stringify(r),vr=({value:r,name:t,type:l,withSearchParam:c=!0,setSearchParams:o,searchQueries:i,dropdownSearchKey:h,filterKey:s="filter",pageKey:f="page"})=>{if(c){let d;switch(l){case"search":d=Gt(r);break;case"dropdown":case"dropdown-multiple":d=rt(r);break;case"radio":d=tt(r);break;case"date-range":d=lt(r);break;case"advanced-date-range":d=Ut(r);break;case"date":d=ot(r);break;default:d=r;break}if(typeof d<"u"){const p={...i[s]&&typeof i[s]=="string"?JSON.parse(i[s]):void 0,[t]:d},C={...i};h&&typeof h=="string"&&delete C[h],delete C[f];const b={...C,[s]:JSON.stringify(p)},B=new URLSearchParams(i).toString(),D=new URLSearchParams(b).toString();if(B===D)return;o(b)}}},Ge=({name:r,filterKey:t="filter",searchParams:l,get:c})=>{const o=l.get(t)||void 0,i=o&&typeof o=="string"?JSON.parse(o):void 0,h=i?i[r]:void 0;return c==="label"&&h?JSON.parse(h)[0].label:c==="value"&&h?JSON.parse(h)[0].value:h},Jt=({name:r,filterKey:t="filter",searchParams:l,get:c})=>{const o=l.get(t)||void 0,i=o&&typeof o=="string"?JSON.parse(o):void 0,h=i?i[r]:void 0;return c==="label"&&h?JSON.parse(h).map(s=>s.label):c==="value"&&h?JSON.parse(h).map(s=>s.value):c==="array"&&h?JSON.parse(h):h},Yt=({name:r,filterKey:t="filter",searchParams:l,get:c})=>{const o=l.get(t)||void 0,i=o&&typeof o=="string"?JSON.parse(o):void 0,h=i?i[r]:void 0;return c==="id"&&h?JSON.parse(h).id:c==="label"&&h?JSON.parse(h).label:c==="value"&&h?JSON.parse(h).value:h},ct=(r,t,l)=>{const c=t.get(l||"filter")||void 0,o=c&&typeof c=="string"?JSON.parse(c):void 0;return o?o[r]:void 0},Xt=({name:r,filterKey:t="filter",searchParams:l})=>{const c=l.get(t||"filter")||void 0,o=c&&typeof c=="string"?JSON.parse(c):void 0,i=o?o[r]:void 0;return{start:i?JSON.parse(i).from:void 0,end:i?JSON.parse(i).to:void 0}},Kt=({name:r,filterKey:t="filter",searchParams:l})=>{const c=l.get(t||"filter")||void 0,o=c&&typeof c=="string"?JSON.parse(c):void 0,i=o?o[r]:void 0;return i?JSON.parse(i):void 0},$t=(r,{filterKey:t="filter",perPageKey:l="perPage",pageKey:c="page"})=>{const o=r.get(t)||void 0,i=r.get(l)||void 0,h=r.get(c)||void 0;return!!o||!!i||!!h},it=({isOpen:r,onClose:t,filterKey:l,pageKey:c,filters:o})=>{const{searchParams:i,setSearchParams:h,searchQueries:s}=Qe(),[f,d]=g.useState({}),u=()=>{i.delete(l||"filter"),h(i)},p=(C,b)=>{switch(C.type){case"radio":{const{show:B=!0}=C;return B&&e.jsx(y.Box,{children:e.jsx(y.Box,{children:C.title})},b)}case"dropdown":{const{show:B=!0}=C;return B&&e.jsx(y.Box,{children:e.jsx(y.Box,{children:C.title})},b)}case"date-range":return e.jsx(y.Box,{children:e.jsx(y.Box,{children:C.title})},b);case"date":return e.jsx(y.Box,{children:e.jsx(y.Box,{children:C.title})},b);case"dropdown-multiple":{const{show:B=!0}=C;return B&&e.jsx(y.Box,{children:e.jsx(y.Box,{children:C.title})},b)}default:return null}};return e.jsx(et,{onHide:t,show:r||!1,children:e.jsxs(y.Box,{direction:"column",gap:"md",children:[e.jsxs(N.Flex,{direction:"row",justify:"space-between",align:"center",children:[e.jsx(y.Box,{children:"Filter"}),e.jsx(y.Box,{style:{cursor:"pointer"},onClick:u,children:"Reset"})]}),o==null?void 0:o.map((C,b)=>p(C,b))]})})},nt=({searchKey:r="q",statusKey:t="status",searchPlaceholder:l="Search",searchHighlightPlaceholder:c,extendedFilter:o,showSearchFilter:i=!0,showStatusFilter:h=!0,filterKey:s="filter",pageKey:f="page",customWidthSearch:d,handleOnReset:u,filterConfigs:p,buttonToggleProps:C,position:b="right",titleSearchLabel:B="Work Order",withTitleLabels:D=!1})=>{const Z=(C==null?void 0:C.isShowLabel)??!0,[P,J]=g.useState(!1),[L,ae]=g.useState(0),Y=()=>{ae(j=>j+1)},{searchParams:W,setSearchParams:X,getQueryParam:ie}=Qe(),ne=Ee.searchParamsToObject(W.toString()),q=ct(r,W,s)||"",[K,re]=g.useState(q),se=ie(s),R=!!(se&&!(()=>{if(se)try{const j=JSON.parse(se);return Object.keys(j).length===1&&j[r]===""}catch(j){console.error("Filter parameter is not a valid JSON:",j)}return!1})()),z=$.useMediaQuery("md");return g.useEffect(()=>{re(q)},[q]),g.useEffect(()=>{if(K===q)return;const j=window.setTimeout(()=>{vr({value:K,name:r,type:"search",searchQueries:ne,setSearchParams:X,filterKey:s,pageKey:f})},350);return()=>{window.clearTimeout(j)}},[K,q,r,ne,X,s,f]),e.jsxs(N.Flex,{gap:"md",style:{flexDirection:z&&b==="left"?"row":z&&b==="right"?"row-reverse":"column"},align:"flex-end",children:[R&&e.jsx(y.Box,{justify:"flex-end",children:e.jsx(A.Button,{onClick:()=>{const j=new URLSearchParams(W);j.delete(s),X(j),re(""),Y(),u&&u()},variant:"outline",tone:"neutral",children:e.jsx(v.Text,{color:"error",fontWeight:"semibold",children:"Reset"})})}),o==null?void 0:o.map(({minWidth:j,content:le,title:ye,onClickContainer:ue},Ve)=>e.jsxs(y.Box,{gap:"sm",onClick:ue,style:{minWidth:j},children:[ye&&e.jsx(ge.SubH3,{children:ye}),le]},`extended-filter-${Ve}-${L}`)),!!(p!=null&&p.length)&&e.jsx(A.Button,{primary:R,secondary:!R,iconLeft:e.jsx(S.Icon,{size:"sm",name:(C==null?void 0:C.icon)||"FilterHorizontal",style:{color:se?"var(--sa-background-brand, #04254f)":"var(--sa-text-primary, #292a2e)"}}),fullWidth:!z,onClick:()=>J(!0),children:Z?"Filter":void 0}),h&&e.jsxs(y.Box,{gap:"sm",style:{minWidth:"126px"},children:[D&&e.jsx(ge.SubH3,{children:"Status"}),e.jsx(me.Dropdown,{dropdownLists:[{label:"Active",value:"active"},{label:"InActive",value:"inactive"}],defaultValue:Ge({get:"value",name:t,searchParams:W,filterKey:s})?[{label:Ge({get:"value",name:t,searchParams:W,filterKey:s})==="active"?"Active":"InActive",value:Ge({get:"value",name:t,searchParams:W,filterKey:s})}]:[],onChange:j=>vr({value:j,name:t,type:"dropdown",searchQueries:ne,setSearchParams:X,filterKey:s}),placeholder:D?"All":"All Status"},L)]}),i&&e.jsxs(y.Box,{gap:"sm",style:{width:d&&z?d:z?"310px":""},children:[D&&e.jsxs(ge.SubH3,{children:["Search for ",B]}),e.jsx(We.Input,{placeholder:l,leftIcon:e.jsx(S.Icon,{name:"Search",width:20,height:20}),onChange:j=>re(j.target.value),value:K,fullWidth:!0},L+1+s)]}),e.jsx(it,{isOpen:P,onClose:()=>J(!1),filterKey:s,filters:p,pageKey:f})]})},at=({children:r,borderRadius:t,height:l})=>{const c=g.useRef(null),[o,i]=g.useState("100vh");return g.useEffect(()=>{if(l)return;const h=()=>{if(c.current){const s=c.current.getBoundingClientRect().top;i(`calc(100vh - ${s}px)`)}};return h(),window.addEventListener("resize",h),()=>window.removeEventListener("resize",h)},[l]),e.jsx(y.Box,{ref:c,fullWidth:!0,borderStyle:"border-solid",borderWidth:"border",borderColor:"border-base",borderRadius:t||"rounded-xs",style:{height:l??o,display:"flex",flexDirection:"column"},children:r})},st=({action:r,rightContent:t,leftContent:l,headerSlot:c,advanceFilter:o,showFilter:i=!0})=>{const h=$.useMediaQuery("md"),s=i?e.jsx(nt,{...o}):null,f=()=>r?g.isValidElement(r)?r:e.jsx(y.Box,{style:{display:"flex",flexDirection:h?"row":"column",gap:"8px",width:h?"auto":"100%",textWrap:"nowrap"},children:r.map(({title:d,icon:u,buttonProps:p,onClick:C},b)=>!d&&!u?null:e.jsx(A.Button,{fullWidth:!h,iconLeft:u?e.jsx(S.Icon,{name:u}):void 0,onClick:C,...p,children:d},`action-${b}`))}):null;return e.jsx(y.Box,{style:{display:"flex",width:"100%",justifyContent:"space-between",alignItems:"center",paddingLeft:"8px",paddingRight:"8px",paddingTop:"8px",paddingBottom:"8px",borderBottom:"1px solid var(--sa-border-subtle, #0b120e24)",flexShrink:0,position:"relative",zIndex:10,flexDirection:h?"row":"column-reverse",gap:"16px"},children:c?c({filter:s}):e.jsxs(e.Fragment,{children:[e.jsxs(y.Box,{style:{display:"flex",gap:"8px",flexDirection:"row",alignItems:"center",flex:1,minWidth:0},children:[s,l]}),e.jsxs(y.Box,{style:{display:"flex",gap:"8px",flexDirection:"row",alignItems:"center",flexShrink:0},children:[t,f()]})]})})},Rt=({totalData:r,withMarginBottom:t=!0,withMarginTop:l=!0})=>e.jsxs(y.Box,{style:{display:"flex",gap:"4px",flexDirection:"row",alignItems:"center",marginBottom:t?"16px":void 0,marginTop:l?"16px":void 0},children:[e.jsxs(ge.Body1,{props:{color:"gray-500"},children:["Total data:"," "]}),e.jsx(ge.Body1,{children:r||0})]}),dt=({pagination:r,pageKey:t="page",perPageKey:l="perPage",defaultPerPage:c=10,showPagination:o=!0,totalData:i})=>{const{searchQueries:h,setSearchParams:s,searchParams:f}=Qe(),d=f.get(l),u=B=>{s({...h,[t]:String(B)})},p=B=>{s({...h,[l]:B,[t]:"1"})},C=(r==null?void 0:r.rangeStart)??(((r==null?void 0:r.currentPage)||0)>1?(((r==null?void 0:r.currentPage)||0)-1)*((r==null?void 0:r.perPage)||0)+1:1),b=(r==null?void 0:r.rangeEnd)??((r==null?void 0:r.totalCurrentPage)!==(r==null?void 0:r.perPage)?r==null?void 0:r.totalData:((r==null?void 0:r.currentPage)||1)*((r==null?void 0:r.totalCurrentPage)||0));return e.jsx(y.Box,{style:{display:"flex",width:"100%",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingLeft:"16px",paddingRight:"16px",paddingTop:"8px",paddingBottom:"8px",borderTop:"1px solid var(--sa-border-subtle, #0b120e24)",flexShrink:0},children:o?e.jsxs(e.Fragment,{children:[e.jsxs(y.Box,{style:{display:"flex",flexDirection:"row",gap:"8px",alignItems:"center",textWrap:"nowrap"},children:[e.jsx(v.Text,{children:"Rows Per Page: "}),e.jsx(me.Dropdown,{dropdownLists:[{label:"5",value:"5"},{label:"10",value:"10"},{label:"25",value:"25"},{label:"50",value:"50"},{label:"100",value:"100"}],onChange:B=>{p(B[0].value)},value:d?[{label:`${d} per row`,value:d}]:[{label:`${c} per row`,value:`${c}`}],defaultValue:d?[{label:`${d} per row`,value:d}]:[{label:`${c} per row`,value:`${c}`}]}),e.jsx(v.Text,{children:`${C}-${b} of ${(r==null?void 0:r.totalData)||0}`})]}),e.jsx(ir.Pagination,{currentPage:r!=null&&r.currentPage?Number(r==null?void 0:r.currentPage):1,totalCount:r!=null&&r.totalPage?Number(r==null?void 0:r.totalPage):1,onPageChange:u})]}):e.jsx(Rt,{totalData:i,withMarginBottom:!1,withMarginTop:!1})})},ht=({filter:r,columnTitle:t})=>{const[l,c]=g.useState(!1),o=g.useRef(null),i=g.useRef(null),h=g.useRef(null),[s,f]=g.useState(""),[d,u]=g.useState({top:0,left:0}),p=r.selectedValues,C=g.useMemo(()=>s?r.options.filter(D=>D.label.toLowerCase().includes(s.toLowerCase())):r.options,[r.options,s]);g.useEffect(()=>{if(l&&i.current){const D=i.current.getBoundingClientRect(),H=280,Z={top:D.bottom+8};r.position==="left"||D.left+H>window.innerWidth?Z.right=window.innerWidth-D.right:Z.left=D.left,u(Z)}},[l,r.position]),g.useEffect(()=>{l&&h.current?setTimeout(()=>{var D;return(D=h.current)==null?void 0:D.focus()},50):f("")},[l]),g.useEffect(()=>{const D=H=>{o.current&&!o.current.contains(H.target)&&i.current&&!i.current.contains(H.target)&&c(!1)};return l&&document.addEventListener("mousedown",D),()=>document.removeEventListener("mousedown",D)},[l]);const b=D=>{const H=p.includes(D)?p.filter(Z=>Z!==D):[...p,D];r.onFilterChange(H)},B=()=>r.onFilterChange([]);return e.jsxs(y.Box,{style:{position:"relative"},children:[e.jsx(y.Box,{ref:i,style:{display:"flex",flexDirection:"row",alignItems:"center",cursor:"pointer"},onClick:D=>{var H;D.stopPropagation(),l||(H=r.onOpen)==null||H.call(r),c(Z=>!Z)},children:e.jsx(S.Icon,{name:l?"ChevronUp":"ChevronDown",size:"sm",style:{color:p.length>0?"var(--sa-color-brand-500, #1a4fa0)":"var(--sa-text-subtle, #8c8f97)"}})}),l&&e.jsxs(y.Box,{ref:o,style:{position:"fixed",top:`${d.top}px`,...d.left!==void 0?{left:`${d.left}px`}:{right:`${d.right}px`},backgroundColor:"white",borderRadius:"4px",minWidth:"280px",maxHeight:"400px",display:"flex",flexDirection:"column",zIndex:9999,animation:"fadeInDropdown 0.15s ease-out",border:"1px solid var(--sa-border-subtle, #0b120e24)"},children:[e.jsxs(y.Box,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingTop:"12px",paddingBottom:"12px",paddingLeft:"16px",paddingRight:"16px",borderBottom:"1px solid var(--sa-border-subtle, #0b120e24)"},children:[e.jsxs(v.Text,{fontSize:"sm",fontWeight:"semibold",color:"gray-700",children:["Filter ",t]}),p.length>0&&e.jsx(y.Box,{style:{cursor:"pointer"},children:e.jsx(v.Text,{fontSize:"xs",color:"primary",fontWeight:"semibold",onClick:D=>{D.stopPropagation(),B()},children:"CLEAR"})})]}),!r.hideSearch&&e.jsx(y.Box,{style:{paddingLeft:"16px",paddingRight:"16px",paddingTop:"8px",paddingBottom:"8px"},children:e.jsx(We.Input,{ref:h,placeholder:`Search ${t.toLowerCase()}...`,leftIcon:e.jsx(S.Icon,{name:"Search",size:"sm"}),value:s,onChange:D=>f(D.target.value),style:{fontSize:"14px"}})}),e.jsx(y.Box,{className:"ts-filter-dropdown-options",style:{overflowY:"auto",maxHeight:"250px",paddingLeft:"8px",paddingRight:"8px"},children:r.isLoadingOptions?e.jsxs(y.Box,{style:{paddingTop:"40px",paddingBottom:"40px",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"},children:[e.jsx(S.Icon,{name:"Loading",size:"lg",style:{color:"var(--sa-background-brand, #04254f)",animation:"spin 1s linear infinite"}}),e.jsx(v.Text,{fontSize:"sm",color:"gray-500",style:{textAlign:"center",marginTop:"8px"},children:"Loading options..."})]}):C.length>0?e.jsx(y.Box,{style:{gap:"2px",paddingTop:"4px",paddingBottom:"4px"},children:C.map(D=>e.jsxs(y.Box,{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"8px",paddingTop:"8px",paddingBottom:"8px",paddingLeft:"8px",paddingRight:"8px",cursor:"pointer",borderRadius:"8px",transition:"all 0.2s ease",backgroundColor:p.includes(D.value)?"var(--sa-color-brand-50, #e6edf6)":"transparent"},onClick:H=>{H.stopPropagation(),b(D.value)},onMouseEnter:H=>{p.includes(D.value)||(H.currentTarget.style.backgroundColor="var(--sa-background-primary, #ffffff)"),H.currentTarget.style.transform="translateX(2px)"},onMouseLeave:H=>{H.currentTarget.style.backgroundColor=p.includes(D.value)?"var(--sa-color-brand-50, #e6edf6)":"transparent",H.currentTarget.style.transform="translateX(0)"},children:[e.jsx(Ie.Checkbox,{checked:p.includes(D.value),onChange:()=>{}}),e.jsx(v.Text,{fontSize:"sm",fontWeight:p.includes(D.value)?"medium":"normal",color:p.includes(D.value)?"primary":"gray-700",children:D.label})]},D.value))}):e.jsxs(y.Box,{style:{paddingTop:"40px",paddingBottom:"40px",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"},children:[e.jsx(S.Icon,{name:"Search",size:"lg",style:{color:"var(--sa-text-subtle, #8c8f97)"}}),e.jsx(v.Text,{fontSize:"sm",color:"gray-500",style:{textAlign:"center",marginTop:"8px"},children:"No results found"})]})}),p.length>0&&e.jsx(y.Box,{style:{paddingTop:"8px",paddingBottom:"8px",paddingLeft:"16px",paddingRight:"16px",borderTop:"1px solid var(--sa-border-subtle, #0b120e24)",backgroundColor:"var(--sa-color-brand-50, #e6edf6)",marginTop:"auto"},children:e.jsxs(y.Box,{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"},children:[e.jsx(y.Box,{style:{backgroundColor:"var(--sa-background-brand, #04254f)",borderRadius:"12px",padding:"2px 8px",fontSize:"11px",fontWeight:600,color:"white"},children:p.length}),e.jsxs(v.Text,{fontSize:"xs",color:"primary",fontWeight:"medium",children:["item",p.length>1?"s":""," selected"]})]})})]})]})},el=({direction:r})=>{const t="var(--sa-text-primary, #292a2e)",l="var(--sa-text-subtle, #8c8f97)",c=r==="asc"?t:l,o=r==="desc"?t:l,i=r==="asc"?1:.45,h=r==="desc"?1:.45;return e.jsxs("span",{style:{display:"inline-flex",flexDirection:"column",alignItems:"center",justifyContent:"center",flexShrink:0,lineHeight:0},"aria-hidden":!0,children:[e.jsx("svg",{width:"8",height:"5",viewBox:"0 0 8 5",style:{color:c,opacity:i,marginBottom:1},children:e.jsx("path",{d:"M4 0 L8 5 L0 5 Z",fill:"currentColor"})}),e.jsx("svg",{width:"8",height:"5",viewBox:"0 0 8 5",style:{color:o,opacity:h},children:e.jsx("path",{d:"M0 0 L8 0 L4 5 Z",fill:"currentColor"})})]})},rl=({frozen:r})=>e.jsxs("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:r?"currentColor":"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"}),e.jsx("path",{d:r?"M7 11V7a5 5 0 0 1 10 0v4":"M7 11V7a5 5 0 0 1 9.9-1"})]}),Dr="var(--sa-background-primary, #ffffff)",ft="var(--sa-background-primary-inverse, #f8f8f8)",gt=({columns:r,records:t,handleDetail:l,handleUpdate:c,handleDelete:o,isLoading:i,visibleHandleDelete:h,visibleHandleUpdate:s,visibleHandleDetail:f,showHeadBorder:d=!1,scrollParentRef:u,frozenCount:p=0,onFrozenCountChange:C,customActions:b,actionsOrder:B=["detail","update","delete","custom"],customEmptyState:D,enableColumnResize:H=!1,defaultColumnWidths:Z,onColumnWidthsChange:P,defaultMinColumnWidth:J=60,sort:L,defaultSort:ae,onSortChange:Y,showActionDivider:W=!1})=>{const X=L!==void 0,[ie,ne]=g.useState(ae??null),q=X?L??null:ie,K=w=>{if(w.sortKey)return w.sortKey;if(typeof w.accessor=="string")return w.accessor},re=w=>{const k=K(w);if(!k)return;let F;!q||q.key!==k?F={key:k,direction:"asc"}:q.direction==="asc"?F={key:k,direction:"desc"}:F=null,X||ne(F),Y==null||Y(F)},te=[l,c,o].filter(w=>w!==void 0).length,R=!!b,z=!!l||!!c||!!o||R,j="var(--sa-border-subtle, #0b120e24)",le=`1px solid ${j}`,ye=`inset 1px 0 0 ${j}`,ue=`inset -1px 0 0 ${j}`,Ve=te===3?R?"178px":"140px":te===2?R?"140px":"102px":te===1?R?"112px":"74px":R?"74px":"",Re=(w,k)=>{if(!k)return w;if(typeof k=="function")return k(w);if(typeof k=="string")return w[k]},[br,er]=g.useState(!1);g.useEffect(()=>{if(!(u!=null&&u.current))return;const w=u.current;er(w.scrollHeight>w.clientHeight)},[t,u]);const ze=g.useRef(null),[de,rr]=g.useState([]),[je,Le]=g.useState(()=>Z??{}),Oe=g.useRef(null);g.useLayoutEffect(()=>{if(!p||!ze.current){rr([]);return}const w=Array.from(ze.current.querySelectorAll("thead tr th")),k=[];let F=0;w.forEach((T,I)=>{k[I]=F,I<p&&(F+=T.offsetWidth)}),rr(k)},[p,r,t,je]);const tr=w=>{C&&C(w<p?w:w+1)},x=(w,k)=>{const F=je[w];if(F!==void 0){const T=`${F}px`;return{width:T,minWidth:T,maxWidth:T}}return k?{width:k}:{}},E=w=>H&&(w.resizable??!0),O=(w,k)=>{w.preventDefault(),w.stopPropagation();const F=w.currentTarget.closest("th");if(!F)return;const T=Math.round(F.getBoundingClientRect().width);Oe.current={colIndex:k,startX:w.clientX,startWidth:T};const I=document.body.style.userSelect,he=document.body.style.cursor;document.body.style.userSelect="none",document.body.style.cursor="col-resize";const Ce=De=>{var Te;const xe=Oe.current;if(!xe)return;const lr=((Te=r[xe.colIndex])==null?void 0:Te.minWidth)??J,Ne=Math.max(lr,xe.startWidth+(De.clientX-xe.startX));Le(Sr=>Sr[xe.colIndex]===Ne?Sr:{...Sr,[xe.colIndex]:Ne})},Fe=()=>{document.removeEventListener("mousemove",Ce),document.removeEventListener("mouseup",Fe),document.body.style.userSelect=I,document.body.style.cursor=he,Oe.current=null,P&&Le(De=>(P(De),De))};document.addEventListener("mousemove",Ce),document.addEventListener("mouseup",Fe)};return e.jsx("div",{ref:ze,children:e.jsxs(Q.Table,{fullWidth:!0,children:[e.jsx(Q.Thead,{style:{height:"40px",whiteSpace:"nowrap"},children:e.jsxs(Q.Tr,{children:[r.map((w,k)=>{var lr,Ne;const F=p>0&&k<p,T=de[k]??0,I=E(w),Ce=k===r.length-1&&z&&W,Fe=K(w),De=!!w.sortable&&!!Fe,xe=De&&(q==null?void 0:q.key)===Fe?q.direction:null;return e.jsxs(Q.Th,{style:{position:"sticky",top:0,left:F?T:void 0,zIndex:F?4:2,paddingLeft:k===0?"12px":"",borderRight:d&&!Ce&&!F?le:void 0,borderBottom:d?le:void 0,boxShadow:d&&F?ue:void 0,backgroundColor:"var(--sa-background-primary-inverse, #f8f8f8)",textAlign:w.textAlign==="text-right"?"right":w.textAlign==="text-center"?"center":"left",...x(k,w.width)},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px",justifyContent:"space-between",minWidth:0},children:[De?e.jsxs("button",{type:"button",onClick:()=>re(w),title:xe==="asc"?"Sorted ascending — click to sort descending":xe==="desc"?"Sorted descending — click to clear":"Click to sort ascending",style:{flex:1,minWidth:0,display:"flex",alignItems:"center",gap:4,background:"none",border:"none",padding:0,margin:0,font:"inherit",color:"inherit",cursor:"pointer",textAlign:w.textAlign==="text-right"?"right":w.textAlign==="text-center"?"center":"left"},children:[e.jsx("span",{style:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:w.title||((lr=w.accessor)==null?void 0:lr.toString())}),e.jsx(el,{direction:xe})]}):e.jsx("span",{style:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:w.title||((Ne=w.accessor)==null?void 0:Ne.toString())}),w.filter&&e.jsx(ht,{filter:w.filter,columnTitle:w.title}),C&&e.jsx("button",{onClick:()=>tr(k),title:F?"Unfreeze column":"Freeze column",style:{background:"none",border:"none",cursor:"pointer",padding:"2px",display:"flex",alignItems:"center",flexShrink:0,color:F?"var(--sa-background-brand, #04254f)":"var(--sa-text-subtle, #8c8f97)",opacity:F?1:.45,transition:"opacity 0.15s"},children:e.jsx(rl,{frozen:F})})]}),I&&e.jsx("div",{onMouseDown:Te=>O(Te,k),onClick:Te=>Te.stopPropagation(),role:"separator","aria-orientation":"vertical",title:"Drag to resize",style:{position:"absolute",top:0,right:-3,width:6,height:"100%",cursor:"col-resize",userSelect:"none",zIndex:5,touchAction:"none"}})]},`table-head-${k}`)}),z?e.jsx(Q.Th,{style:{backgroundColor:"var(--sa-background-primary-inverse, #f8f8f8)",position:"sticky",top:0,right:0,zIndex:3,borderBottom:d?le:void 0,boxShadow:d&&W?ye:void 0}}):null]})}),e.jsx(Q.Tbody,{children:i?e.jsx(Q.Tr,{children:e.jsx(Q.Td,{colSpan:r.length+1,children:e.jsxs(y.Box,{style:{gap:"16px"},children:[e.jsx(be.Skeleton,{variant:"list"}),e.jsx(be.Skeleton,{variant:"list"}),e.jsx(be.Skeleton,{variant:"list"}),e.jsx(be.Skeleton,{variant:"list"}),e.jsx(be.Skeleton,{variant:"list"})]})})}):!(t!=null&&t.length)&&D?e.jsx(Q.Tr,{children:e.jsx(Q.Td,{colSpan:r.length+1,children:D})}):t==null?void 0:t.map((w,k)=>e.jsxs(Q.Tr,{style:{transition:"background-color 0.3s ease",padding:0,borderBottom:k===t.length-1&&br?void 0:"1px solid var(--sa-border-subtle, #0b120e24)"},onMouseEnter:F=>{const T=F.currentTarget;T.style.backgroundColor=ft,Array.from(T.querySelectorAll("td")).forEach(I=>{I.style.position==="sticky"&&(I.style.backgroundColor=ft)})},onMouseLeave:F=>{const T=F.currentTarget;T.style.backgroundColor="",Array.from(T.querySelectorAll("td")).forEach(I=>{I.style.position==="sticky"&&(I.style.backgroundColor=Dr)})},children:[r.map((F,T)=>{const I=F.render?F.render(w,k,t):Re(w,F.accessor),he=p>0&&T<p,Ce=de[T]??0,Fe=je[T]!==void 0,De=he&&T===p-1;return e.jsx(Q.Td,{style:{position:he?"sticky":void 0,left:he?Ce:void 0,zIndex:he?1:void 0,backgroundColor:he?Dr:void 0,transition:he?"background-color 0.3s ease":void 0,paddingLeft:T===0?"12px":"",whiteSpace:"nowrap",overflow:Fe?"hidden":void 0,borderLeft:F.showBorderLeft?le:void 0,borderRight:F.showBorderRight?le:void 0,boxShadow:De?ue:void 0,textAlign:F.textAlign==="text-right"?"right":F.textAlign==="text-center"?"center":"left",...x(T,F.width)},children:typeof I=="string"?e.jsx(v.Text,{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",textAlign:F.textAlign==="text-right"?"right":F.textAlign==="text-center"?"center":"left"},children:I}):I},`row-${k}-col-${T}`)}),z?e.jsx(Q.Td,{style:{width:Ve,position:"sticky",right:0,zIndex:1,backgroundColor:Dr,boxShadow:W?ye:void 0,transition:"background-color 0.3s ease"},children:e.jsx(N.Flex,{direction:"row",align:"center",justify:"center",gap:"sm",children:B.map(F=>{const T=k===t.length-1?"top":"bottom";return F==="detail"&&l&&(f==null?void 0:f(w))!==!1?e.jsx(ce.Tooltip,{label:"Detail",position:T,children:e.jsx(A.Button,{size:"xs",variant:"outline",tone:"neutral",onClick:()=>l(w.id,w),iconLeft:e.jsx(S.Icon,{name:"DocumentClean",size:"sm",style:{color:"var(--sa-text-subtle, #8c8f97)"}})})},"detail"):F==="update"&&c&&(s==null?void 0:s(w))!==!1?e.jsx(ce.Tooltip,{label:"Update",position:T,children:e.jsx(A.Button,{size:"xs",variant:"outline",tone:"neutral",onClick:()=>c(w),iconLeft:e.jsx(S.Icon,{name:"Edit1",size:"sm",style:{color:"var(--sa-text-subtle, #8c8f97)"}})})},"update"):F==="delete"&&o&&(h==null?void 0:h(w))!==!1?e.jsx(ce.Tooltip,{label:"Delete",position:T,children:e.jsx(A.Button,{size:"xs",variant:"outline",tone:"neutral",onClick:()=>o(w.id,w),iconLeft:e.jsx(S.Icon,{name:"Trash1",size:"sm",style:{color:"var(--sa-color-error-600, #c9184a)"}})})},"delete"):F==="custom"?e.jsx(g.Fragment,{children:b==null?void 0:b(w)},"custom"):null})})}):null]},`${w}${k}`))})]})})},tl=({wrapperProps:r,dataTableProps:t,headerProps:l,footerProps:c})=>{var p;const o=g.useRef(null),[i,h]=g.useState((t==null?void 0:t.defaultFrozenCount)??0),s=(l==null?void 0:l.show)??!0,f=g.useRef(null),d=(p=t==null?void 0:t.pagination)==null?void 0:p.totalData;typeof d=="number"&&(f.current=d);const u=(c==null?void 0:c.showFooter)??(d===void 0?f.current!==0:d!==0);return e.jsxs(at,{...r,children:[s&&e.jsx(st,{...l}),e.jsx(y.Box,{ref:o,style:{flex:1,overflowY:"auto",overflowX:"auto"},children:t?e.jsx(gt,{...t,scrollParentRef:o,frozenCount:t!=null&&t.enableFreezeColumns?i:0,onFrozenCountChange:t!=null&&t.enableFreezeColumns?h:void 0}):null}),u&&e.jsx(dt,{pagination:t==null?void 0:t.pagination,pageKey:t==null?void 0:t.pageKey,perPageKey:t==null?void 0:t.perPageKey,defaultPerPage:t==null?void 0:t.defaultPerPage,showPagination:t==null?void 0:t.showPagination,totalData:c==null?void 0:c.totalData})]})};function ll(r){return g.memo(r)}const ol=ll(tl),Ue=({of:r,render:t})=>g.Children.toArray(r==null?void 0:r.map((l,c,o)=>t(l,c,o))),V=({condition:r,fallback:t,children:l,loading:c,isLoading:o})=>e.jsx(e.Fragment,{children:o?c:r?l:t}),_=r=>e.jsx(v.Text,{...r,fontFamily:"Poppins",fontSize:r.fontSize||"md",fontWeight:r.fontWeight||"medium",color:r.color||"gray-700",children:r.children}),ve=r=>e.jsx(v.Text,{color:"red-600",fontSize:"sm",children:r.message}),cl=({size:r="md",direction:t="vertical",requiredTitle:l="(Required)",fullWidth:c=!1,...o})=>{var s,f,d;const i=o.hideMessageError||!1,h=t==="horizontal"?r==="sm"?342:r==="lg"?400:342:void 0;return e.jsxs(y.Box,{gap:t==="horizontal"?"spacing-96":"sm",direction:t==="horizontal"?"row":"column",...o.containerProps,children:[o.title&&e.jsx(V,{condition:!!o.inputProps.required,fallback:e.jsxs(y.Box,{direction:"column",customMaxWidth:h,fullWidth:c,children:[e.jsx(_,{children:o.title}),e.jsx(v.Text,{fontSize:r,color:"gray-500",children:o.description})]}),children:e.jsxs(y.Box,{direction:"column",customMaxWidth:h,fullWidth:c,children:[e.jsxs(N.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(_,{fontSize:r,children:o.title}),e.jsx(_,{color:"error",fontSize:r,children:l}),e.jsx(V,{condition:!!((s=o.tooltip)!=null&&s.label),children:e.jsx(ce.Tooltip,{label:(f=o.tooltip)==null?void 0:f.label,arrowPosition:(d=o.tooltip)==null?void 0:d.arrowPosition,...o.tooltip,children:e.jsx(S.Icon,{name:"InfoCircle",size:r==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(V,{condition:!!o.description,children:e.jsx(v.Text,{fontSize:r,color:"gray-500",children:o.description})})]})}),e.jsxs(y.Box,{gap:"xs",fullWidth:o.inputProps.fullWidth||!1,children:[e.jsx(We.Input,{ref:o.inputRef,size:r,...o.inputProps,status:o.errorMessage?"error":"default",fullWidth:!0}),!i&&o.errorMessage&&e.jsx(ve,{message:o.errorMessage}),o.inputProps.extended&&o.inputProps.extended]})]})},il=({size:r="md",direction:t="vertical",requiredTitle:l="(Required)",fullWidth:c=!1,...o})=>{var s,f,d;const i=o.hideMessageError||!1,h=t==="horizontal"?r==="sm"?342:r==="lg"?400:342:void 0;return e.jsxs(y.Box,{gap:t==="horizontal"?"spacing-96":"sm",direction:t==="horizontal"?"row":"column",onClick:o.onClickContainer,children:[o.title&&e.jsx(V,{condition:!!o.inputProps.required,fallback:e.jsxs(y.Box,{direction:"column",customMaxWidth:h,fullWidth:c,children:[e.jsx(_,{children:o.title}),e.jsx(v.Text,{fontSize:r,color:"gray-500",children:o.description})]}),children:e.jsxs(y.Box,{direction:"column",customMaxWidth:h,fullWidth:c,children:[e.jsxs(N.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(_,{fontSize:r,children:o.title}),e.jsx(_,{color:"error",fontSize:r,children:l}),e.jsx(V,{condition:!!((s=o.tooltip)!=null&&s.label),children:e.jsx(ce.Tooltip,{label:(f=o.tooltip)==null?void 0:f.label,arrowPosition:(d=o.tooltip)==null?void 0:d.arrowPosition,...o.tooltip,children:e.jsx(S.Icon,{name:"InfoCircle",size:r==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(V,{condition:!!o.description,children:e.jsx(v.Text,{fontSize:r,color:"gray-500",children:o.description})})]})}),e.jsxs(y.Box,{gap:"xs",fullWidth:o.inputProps.fullWidth||!1,children:[e.jsx(y.Box,{style:{width:o.inputProps.fullWidth?"100%":t==="horizontal"&&o.customWidth?o.customWidth:t==="horizontal"?"343px":""},children:e.jsx(me.Dropdown,{size:r,...o.inputProps,error:!!o.errorMessage})}),!i&&o.errorMessage&&e.jsx(ve,{message:o.errorMessage}),o.inputProps.extended&&o.inputProps.extended]})]})},nl=(r,t)=>typeof r=="string"&&r||t==="error"?"var(--sa-border-danger)":"var(--sa-border-subtle)",al=r=>{var s;const[t,l]=g.useState(!1),c=f=>{f.preventDefault(),f.stopPropagation()},o=f=>{f.preventDefault(),f.stopPropagation(),f.dataTransfer&&r.handleOnFileChange(f.dataTransfer.files.item(0))},i=f=>{f.preventDefault(),l(!0)},h=f=>{f.preventDefault(),l(!1)};return e.jsxs(y.Box,{width:"width-full",paddingInline:"md",direction:"row",gap:"sm",align:"center",onClick:r.handleOnClick,onDragOver:c,onDrop:o,onDragEnter:i,onDragLeave:h,paddingBlock:"md",borderRadius:"rounded-md",style:{border:t?"1px solid var(--sa-border-info)":`1px solid ${nl(r.errorMessage,r.status)}`},children:[e.jsx(S.Icon,{name:"Upload",size:"lg",style:{width:30,height:30}}),e.jsxs(N.Flex,{direction:"column",gap:"xs",children:[e.jsxs(N.Flex,{direction:"row",gap:"xs",children:[e.jsx(v.Text,{fontWeight:"medium",color:"gray-500",style:{textWrap:"nowrap"},fontSize:r.isDesktop?"md":"sm",children:"Click your upload"}),e.jsx(v.Text,{fontWeight:"medium",style:{textWrap:"nowrap"},fontSize:r.isDesktop?"md":"sm",children:"or Drag & Drop"})]}),e.jsx(v.Text,{fontSize:"sm",color:"gray-500",children:(s=r.fileSupports)==null?void 0:s.map(f=>f.toLocaleUpperCase()).join(", ")})]})]})};function sl(r){return r.split(" ").map(t=>t[0]).join("").slice(0,2).toUpperCase()}const yt=r=>{const t={day:"2-digit",month:"short",year:"numeric"};return r.toLocaleDateString("id-ID",t)},dl=r=>{const t={Jan:0,Feb:1,Mar:2,Apr:3,Mei:4,Jun:5,Jul:6,Agu:7,Sep:8,Okt:9,Nov:10,Des:11},l=r.split(" ");if(l.length!==3)return null;const c=parseInt(l[0],10),o=t[l[1]],i=parseInt(l[2],10);return isNaN(c)||isNaN(o)||isNaN(i)?null:new Date(i,o,c)};function hl(r,t=!0){if(!r)return"Rp 0";const l=typeof r=="number"?r.toString():r;if(isNaN(Number(l)))return"Rp 0";const c=l.split("."),o=c[0].replace(/\B(?=(\d{3})+(?!\d))/g,"."),i=c.length===2?o+"."+c[1]:o;return t?"Rp"+i:i}String.prototype.toTitleCase=function(){return this.toLowerCase().split(" ").map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(" ")},String.prototype.toNumber=function(){return Number(this)};const fl=r=>{const t=r.split(" ");let l=t[0].charAt(0);return t.length>1&&(l+=""+t[1].charAt(0)),l.toUpperCase()};function gl(r){const t=typeof r=="string"?new Date(r):r;if(isNaN(t.getTime()))throw new Error("Invalid date format");const l=t.getFullYear(),c=String(t.getMonth()+1).padStart(2,"0"),o=String(t.getDate()).padStart(2,"0");return`${l}-${c}-${o}`}const yl="sa-admin",pe=r=>`var(--${yl}-${r})`,ul={base:{borderColor:pe("base-border-color"),textColor:pe("base-text-color"),iconColor:pe("base-icon-color"),placeholderColor:pe("base-placeholder-color")},document:{bgColor:pe("document-bg-color")},sidebar:{bgColor:pe("sidebar-bg-color"),borderColor:pe("sidebar-border-color"),maxWidth:pe("sidebar-max-width"),width:pe("sidebar-width"),collapseWidth:pe("sidebar-collapse-width"),collapseV2Width:pe("sidebar-v2-collapse-width")}},pl=24*60*60*1e3,Cl=r=>{const t="14px poppins",c=document.createElement("canvas").getContext("2d");c.font=t;const o=c.measureText(r).width;return Number(Math.ceil(o))},xl=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,vl=/--+/,Dl=/-$/;function wl(r,t){return JSON.stringify(r)!==JSON.stringify(t)}function bl(r){return/^(?:\+62|62|0)8[1-9][0-9]{7,10}$/.test(r)}function Sl(r){return/^[A-Za-z\s]+$/.test(r)}const Fl=r=>{const t=/^[0-9]$/,l=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Backspace","Delete","Enter","Tab"];(r.ctrlKey||r.metaKey)&&(r.key==="a"||r.key==="c"||r.key==="v")||!t.test(r.key)&&!l.includes(r.key)&&r.preventDefault()},Bl=r=>{const t=/^[0-9]$/,l=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Backspace","Delete","Enter","Tab"];(r.ctrlKey||r.metaKey)&&r.key==="v"||t.test(r.key)&&!l.includes(r.key)&&r.preventDefault()},kl=r=>{const t=/^[0-9.]$/,l=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Backspace","Delete","Enter","Tab"];(r.ctrlKey||r.metaKey)&&r.key==="v"||!t.test(r.key)&&!l.includes(r.key)&&r.preventDefault()},El=r=>xl.test(r);function Ml(r){return!(vl.test(r)||Dl.test(r))}const Ll=r=>{const t=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Backspace","Delete","Enter","Tab","Home","End"];if((r.ctrlKey||r.metaKey)&&["a","c","v","x"].includes(r.key.toLowerCase()))return;const l=r.currentTarget.value;/^[0-9]$/.test(r.key)||r.key==="."&&!l.includes(".")||r.key==="-"&&l.length===0&&!l.includes("-")||t.includes(r.key)||r.preventDefault()},Ol=r=>{const t=document.getElementById(r);if(t){const l=t.getBoundingClientRect(),c=window.scrollY+l.top-80;window.scrollTo({top:c,behavior:"smooth"})}};function Tl(r){const t=r.toLowerCase();if(["kb","mb","gb"].find(i=>t.endsWith(i)))return r;const o=Number(r);if(isNaN(o))throw new Error("Invalid size format");return o>=1e6?`${(o/1e6).toFixed(2)}MB`:o>=1e3?`${(o/1e3).toFixed(2)}KB`:`${o}B`}function ml(r){const t=r.split("/");return t[t.length-1]}const Wl=r=>{var t,l;return e.jsxs(y.Box,{width:"width-full",paddingInline:"md",height:"height-full",direction:"row",justify:"space-between",align:"center",onClick:r.handleOnClickFile,fullHeight:!0,paddingBlock:"md",id:"file-item",borderRadius:"rounded-md",style:{border:"1px solid var(--sa-border-subtle)",cursor:"pointer"},children:[e.jsxs(N.Flex,{direction:"row",align:"center",gap:"sm",style:{flex:1,minWidth:0},children:[e.jsx(S.Icon,{name:"DocumentFilled",size:"lg",style:{color:"var(--sa-icon-brand)",width:30,height:30,flexShrink:0}}),e.jsxs(N.Flex,{direction:"column",style:{minWidth:0,flex:1},children:[e.jsx(v.Text,{fontWeight:"bold",style:{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},children:r.defaultFile?ml(r.defaultFile.url):(t=r.fileSelected)==null?void 0:t.name}),r.defaultFile?(r.defaultFile.size||r.defaultFile.date)&&e.jsxs(N.Flex,{direction:"row",gap:"xs",align:"center",children:[r.defaultFile.size&&e.jsx(v.Text,{fontSize:"sm",fontWeight:"medium",children:r.defaultFile.size}),r.defaultFile.size&&r.defaultFile.date&&e.jsx(S.Icon,{name:"Dot",size:"xs"}),r.defaultFile.date&&e.jsx(v.Text,{fontSize:"sm",fontWeight:"medium",style:{textWrap:"nowrap"},children:r.defaultFile.date})]}):e.jsxs(N.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(v.Text,{fontSize:"sm",fontWeight:"medium",children:Tl(((l=r.fileSelected)==null?void 0:l.size.toString())||"100000")}),e.jsx(S.Icon,{name:"Dot",size:"xs"}),e.jsx(v.Text,{fontSize:"sm",fontWeight:"medium",style:{textWrap:"nowrap"},children:yt(new Date)})]})]})]}),e.jsx(A.Button,{size:"xs",variant:"tertiary",tone:"error",type:"button",onClick:c=>{c.stopPropagation(),r.handleOnDeleteFile()},iconLeft:e.jsx(S.Icon,{name:"Trash1"})})]})},ut=({status:r="default",labelPosition:t="outside-top",...l})=>{var C;const c=g.useRef(null),o=()=>{if(l.defaultFile){window.open(l.defaultFile.url);return}c.current&&c.current.click()},i=$.useMediaQuery("md"),h=r==="error"||typeof l.errorMessage=="string"&&!!l.errorMessage,s=l.label?e.jsxs(N.Flex,{direction:"row",align:"center",gap:"xs",children:[e.jsx(v.Text,{style:{fontSize:"14px",fontWeight:500,color:"var(--sa-text-primary)"},children:l.label}),l.optional&&e.jsx("span",{style:{background:"var(--sa-background-neutral)",border:"1px solid var(--sa-border-subtle)",borderRadius:"4px",padding:"0 8px",fontSize:"10px",fontWeight:500,lineHeight:"18px",color:"var(--sa-text-primary)",display:"inline-flex",alignItems:"center"},children:"Optional"}),l.required&&e.jsx("span",{style:{fontSize:"14px",fontWeight:500,color:"var(--sa-text-error)"},children:"*"})]}):null,f=l.description?e.jsx(v.Text,{style:{fontSize:"12px",fontWeight:400,color:"var(--sa-text-subtlest, #6b6e76)",lineHeight:"18px"},children:l.description}):null,d=e.jsxs(e.Fragment,{children:[l.helperText&&e.jsx(v.Text,{style:{fontSize:"12px",fontWeight:400,color:"var(--sa-text-subtlest, #6b6e76)",lineHeight:"18px"},children:l.helperText}),l.errorText&&r==="error"&&e.jsx(v.Text,{style:{fontSize:"12px",fontWeight:400,color:"var(--sa-text-error, #a4133c)",lineHeight:"18px"},children:l.errorText}),l.errorMessage&&!l.errorText&&e.jsx(v.Text,{style:{fontSize:"12px",fontWeight:400,color:"var(--sa-text-error, #a4133c)",lineHeight:"18px"},children:l.errorMessage})]}),u=e.jsx("input",{type:"file",style:{display:"none"},ref:c,onChange:b=>{var B;return l.handleOnChangeFile(((B=b.target.files)==null?void 0:B.item(0))||null)},accept:(C=l.fileSupportOption)==null?void 0:C.map(b=>"."+(b==null?void 0:b.toLowerCase())).join(", ")}),p=e.jsxs(y.Box,{fullWidth:!0,style:{minHeight:"69px"},borderRadius:"rounded-md",display:"flex",justify:"center",align:"center",cursor:"pointer",gap:"md",...l.containerProps,children:[u,(l.fileSelected||l.defaultFile)&&e.jsx(Wl,{fileSelected:l.fileSelected,defaultFile:l.defaultFile,handleOnDeleteFile:l.handleOnDeleteFile,handleOnClickFile:o}),!l.fileSelected&&!l.defaultFile&&e.jsx(al,{fileSupports:l.fileSupportOption,isDesktop:i,errorMessage:h?l.errorText||l.errorMessage||" ":void 0,status:h?"error":"default",handleOnClick:o,handleOnFileChange:l.handleOnChangeFile})]});return t==="outside-left"?e.jsxs(N.Flex,{direction:"row",align:"flex-start",gap:"sm",fullWidth:!0,children:[e.jsxs(N.Flex,{direction:"column",gap:"xs",style:{width:"40%",minWidth:"120px",paddingTop:"10px"},children:[s,f]}),e.jsxs(N.Flex,{direction:"column",gap:"sm",style:{flex:1,minWidth:0},children:[p,d]})]}):e.jsxs(N.Flex,{direction:"column",gap:"sm",fullWidth:!0,children:[s,f,p,d]})},Il=({size:r="md",direction:t="vertical",requiredTitle:l="(Required)",fullWidth:c=!1,...o})=>{var s,f,d;const i=o.hideMessageError||!1,h=t==="horizontal"?r==="sm"?342:r==="lg"?400:342:void 0;return e.jsxs(y.Box,{gap:t==="horizontal"?"spacing-96":"sm",direction:t==="horizontal"?"row":"column",...o.containerProps,children:[o.title&&e.jsx(V,{condition:!!o.inputProps.required,fallback:e.jsxs(y.Box,{direction:"column",customMaxWidth:h,fullWidth:c,children:[e.jsx(_,{children:o.title}),e.jsx(v.Text,{fontSize:r,color:"gray-500",children:o.description})]}),children:e.jsxs(y.Box,{direction:"column",customMaxWidth:h,fullWidth:c,children:[e.jsxs(N.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(_,{fontSize:r,children:o.title}),e.jsx(_,{color:"error",fontSize:r,children:l}),e.jsx(V,{condition:!!((s=o.tooltip)!=null&&s.label),children:e.jsx(ce.Tooltip,{label:(f=o.tooltip)==null?void 0:f.label,arrowPosition:(d=o.tooltip)==null?void 0:d.arrowPosition,...o.tooltip,children:e.jsx(S.Icon,{name:"InfoCircle",size:r==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(V,{condition:!!o.description,children:e.jsx(v.Text,{fontSize:r,color:"gray-500",children:o.description})})]})}),e.jsxs(N.Flex,{direction:"column",gap:"xs",children:[e.jsx(ut,{...o.inputProps,status:o.errorMessage?"error":"default"}),!i&&o.errorMessage&&e.jsx(ve,{message:o.errorMessage})]})]})},Hl=({size:r="md",direction:t="vertical",requiredTitle:l="(Required)",fullWidth:c=!1,required:o=!1,...i})=>{var f,d,u,p;const h=i.hideMessageError||!1,s=t==="horizontal"?r==="sm"?342:r==="lg"?400:342:void 0;return e.jsxs(y.Box,{gap:t==="horizontal"||t==="horizontal-inline"?"spacing-96":"sm",direction:t==="horizontal"||t==="horizontal-inline"?"row":"column",...i.containerProps,children:[i.title&&e.jsx(V,{condition:!!o,fallback:e.jsxs(y.Box,{direction:"column",customMaxWidth:s,fullWidth:c,children:[e.jsx(_,{children:i.title}),e.jsx(ge.Body3,{props:{color:"gray-500"},children:i.description})]}),children:e.jsxs(y.Box,{direction:"column",customMaxWidth:s,fullWidth:c,children:[e.jsxs(N.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(_,{fontSize:r,children:i.title}),e.jsx(_,{color:"error",fontSize:r,children:l}),e.jsx(V,{condition:!!((f=i.tooltip)!=null&&f.label),children:e.jsx(ce.Tooltip,{label:(d=i.tooltip)==null?void 0:d.label,arrowPosition:(u=i.tooltip)==null?void 0:u.arrowPosition,...i.tooltip,children:e.jsx(S.Icon,{name:"InfoCircle",size:r==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(V,{condition:!!i.description,children:e.jsx(v.Text,{fontSize:r,color:"gray-500",children:i.description})})]})}),e.jsx(y.Box,{gap:t==="horizontal-inline"?"xl":"md",direction:t==="horizontal-inline"?"row":"column",align:"flex-start",children:e.jsx(Ue,{of:(p=i.checkBoxesList)==null?void 0:p.map(C=>({...C,isChecked:i.checkBoxesAreChecked.includes(C.id)})),render:C=>C.renderBadge?e.jsxs(y.Box,{direction:"row",justify:"space-between",gap:"lg",...i.badgeContainerProps,children:[e.jsx(Ie.Checkbox,{name:C.name,value:C.id,checked:C.isChecked,onChange:b=>i.onChecked(b.target.value,C),label:C.name,description:C.description}),C.renderBadge]}):e.jsx(Ie.Checkbox,{name:C.name,value:C.id,checked:C.isChecked,onChange:b=>i.onChecked(b.target.value,C),label:C.name,description:C.description})})}),!h&&i.errorMessage&&e.jsx(ve,{message:i.errorMessage})]})},Al=({position:r="vertical",size:t="md",fullWidth:l=!1,...c})=>{var i;const o=r==="horizontal-inline"||r==="horizontal-block"?t==="sm"?342:t==="lg"?400:342:void 0;return e.jsxs(y.Box,{gap:r==="horizontal-inline"||r==="horizontal-block"?"spacing-96":"sm",direction:r==="horizontal-inline"||r==="horizontal-block"?"row":"column",children:[e.jsx(V,{condition:!!c.description||!!c.title,children:e.jsxs(y.Box,{direction:"column",customMaxWidth:o,fullWidth:l,children:[c.title&&e.jsx(_,{children:c.title}),e.jsx(V,{condition:!!c.description,children:e.jsx(v.Text,{color:"gray-500",children:c.description})})]})}),e.jsx(y.Box,{gap:"sm",direction:r==="horizontal"||r==="horizontal-inline"?"row":"column",align:"flex-start",flexWrap:"wrap",children:e.jsx(Ue,{of:(i=c.radioList)==null?void 0:i.map(h=>({...h,isChecked:c.radioIsChecked===h.id})),render:({value:h,id:s,isChecked:f,subInput:d,label:u,description:p})=>e.jsxs(y.Box,{gap:"xs",customMaxWidth:o,children:[e.jsx(ar.Radio,{id:`${s.toString()}-${h}`,name:c.groupName||u,label:u,value:h,checked:f,onChange:C=>c.onChecked({id:s,label:C.target.name,value:C.target.value}),disabled:c.disableAll},s),p&&e.jsx(v.Text,{color:"gray-500",style:{marginLeft:28},children:p}),d]})})}),c.errorMessage&&e.jsx(ve,{message:c.errorMessage})]})},Vl=({size:r="md",direction:t="vertical",requiredTitle:l="(Required)",fullWidth:c=!1,...o})=>{var s,f,d;const i=o.hideMessageError||!1,h=t==="horizontal"?r==="sm"?342:r==="lg"?400:342:void 0;return e.jsxs(y.Box,{gap:t==="horizontal"?"spacing-96":"sm",direction:t==="horizontal"?"row":"column",...o.containerProps,children:[o.title&&e.jsx(V,{condition:!!o.inputProps.required,fallback:e.jsxs(y.Box,{direction:"column",customMaxWidth:h,fullWidth:c,children:[e.jsx(_,{children:o.title}),e.jsx(v.Text,{fontSize:r,color:"gray-500",children:o.description})]}),children:e.jsxs(y.Box,{direction:"column",customMaxWidth:h,fullWidth:c,children:[e.jsxs(N.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(_,{fontSize:r,children:o.title}),e.jsx(_,{color:"error",fontSize:r,children:l}),e.jsx(V,{condition:!!((s=o.tooltip)!=null&&s.label),children:e.jsx(ce.Tooltip,{label:(f=o.tooltip)==null?void 0:f.label,arrowPosition:(d=o.tooltip)==null?void 0:d.arrowPosition,...o.tooltip,children:e.jsx(S.Icon,{name:"InfoCircle",size:r==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(V,{condition:!!o.description,children:e.jsx(v.Text,{fontSize:r,color:"gray-500",children:o.description})})]})}),e.jsxs(N.Flex,{direction:"column",gap:"xs",children:[e.jsx(nr.Textarea,{ref:o.inputRef,size:r,...o.inputProps,status:o.errorMessage?"error":"default"}),!i&&o.errorMessage&&e.jsx(ve,{message:o.errorMessage})]})]})},zl=({size:r="md",direction:t="vertical",requiredTitle:l="(Required)",required:c=!1,fullWidth:o=!1,...i})=>{var s,f,d;const h=t==="horizontal"?r==="sm"?342:r==="lg"?400:342:void 0;return e.jsxs(y.Box,{gap:t==="horizontal"?"spacing-96":"sm",direction:t==="horizontal"?"row":"column",...i.containerProps,children:[i.title&&e.jsx(V,{condition:c,fallback:e.jsxs(y.Box,{direction:"column",customMaxWidth:h,fullWidth:o,children:[e.jsx(_,{children:i.title}),e.jsx(v.Text,{fontSize:r,color:"gray-500",children:i.titleDescription})]}),children:e.jsxs(y.Box,{direction:"column",customMaxWidth:h,fullWidth:o,children:[e.jsxs(N.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(_,{fontSize:r,children:i.title}),e.jsx(_,{color:"error",fontSize:r,children:l}),e.jsx(V,{condition:!!((s=i.tooltip)!=null&&s.label),children:e.jsx(ce.Tooltip,{label:(f=i.tooltip)==null?void 0:f.label,arrowPosition:(d=i.tooltip)==null?void 0:d.arrowPosition,...i.tooltip,children:e.jsx(S.Icon,{name:"InfoCircle",size:r==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(V,{condition:!!i.titleDescription,children:e.jsx(v.Text,{fontSize:r,color:"gray-500",children:i.titleDescription})})]})}),e.jsx(Pe.Toggle,{checked:i.checked,onChange:i.onChange,label:i.label,description:i.description}),i.errorMessage&&e.jsx(ve,{message:i.errorMessage})]})},jl=({variant:r="primary",size:t="md",...l})=>{const c=Me.useColor(),o=h=>{var f,d,u,p,C,b;if(!h)return;const s=l.disabled?"var(--sa-text-disable, #181a198f)":r==="secondary"?"var(--sa-text-subtle, #8c8f97)":r==="secondary-danger"?(d=(f=c==null?void 0:c.computed)==null?void 0:f.red)==null?void 0:d[600]:r==="secondary-primary"?(p=(u=c==null?void 0:c.computed)==null?void 0:u.blue)==null?void 0:p[700]:(b=(C=c==null?void 0:c.computed)==null?void 0:C.gray)==null?void 0:b[50];return e.jsx(S.Icon,{name:h,size:t,style:{color:s}})},i=()=>{var s,f,d,u;if(r!=="secondary-danger"&&r!=="secondary-primary")return l.title;const h={color:l.disabled?"var(--sa-text-disable, #181a198f)":r==="secondary-danger"?(f=(s=c==null?void 0:c.computed)==null?void 0:s.red)==null?void 0:f[600]:(u=(d=c==null?void 0:c.computed)==null?void 0:d.blue)==null?void 0:u[700]};switch(t){case"xs":return e.jsx(ge.Body2,{props:{style:h},children:l.title});case"sm":case"md":return e.jsx(ge.SubH3,{props:{style:h},children:l.title});case"lg":return e.jsx(ge.SubH2,{props:{style:h},children:l.title});default:return l.title}};return e.jsx(A.Button,{fullWidth:!0,disabled:l.disabled,primary:r==="primary",secondary:r==="secondary"||r==="secondary-danger"||r==="secondary-primary",success:r==="success",onClick:l.onClick,type:l.type,iconLeft:o(l.iconLeft),iconRight:o(l.iconRight),size:t,children:i()})},Nl=r=>e.jsx(ge.H5,{props:{...r},children:r.title}),Pl=({size:r="md",direction:t="vertical",requiredTitle:l="(Required)",fullWidth:c=!1,...o})=>{var s,f,d;const i=o.hideMessageError||!1,h=t==="horizontal"?r==="sm"?342:r==="lg"?400:342:void 0;return e.jsxs(y.Box,{gap:t==="horizontal"?"spacing-96":"sm",direction:t==="horizontal"?"row":"column",onClick:o.onClickContainer,children:[o.title&&e.jsx(V,{condition:!!o.inputProps.required,fallback:e.jsxs(y.Box,{direction:"column",customMaxWidth:h,fullWidth:c,children:[e.jsx(_,{children:o.title}),e.jsx(v.Text,{fontSize:r,color:"gray-500",children:o.description})]}),children:e.jsxs(y.Box,{direction:"column",customMaxWidth:h,fullWidth:c,children:[e.jsxs(N.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(_,{fontSize:r,children:o.title}),e.jsx(_,{color:"error",fontSize:r,children:l}),e.jsx(V,{condition:!!((s=o.tooltip)!=null&&s.label),children:e.jsx(ce.Tooltip,{label:(f=o.tooltip)==null?void 0:f.label,arrowPosition:(d=o.tooltip)==null?void 0:d.arrowPosition,...o.tooltip,children:e.jsx(S.Icon,{name:"InfoCircle",size:r==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(V,{condition:!!o.description,children:e.jsx(v.Text,{fontSize:r,color:"gray-500",children:o.description})})]})}),e.jsxs(N.Flex,{direction:"column",gap:"xs",children:[e.jsx(y.Box,{style:{width:t==="horizontal"&&o.customWidth?o.customWidth:t==="horizontal"?"343px":""},children:e.jsx(or.StarasiaDate,{size:r,...o.inputProps,status:o.errorMessage?"error":void 0})}),!i&&o.errorMessage&&e.jsx(ve,{message:o.errorMessage})]})]})};async function _l(r,t){const l=new Image;l.src=r,await new Promise((i,h)=>{l.onload=i,l.onerror=h});const c=document.createElement("canvas");c.width=t.width,c.height=t.height;const o=c.getContext("2d",{alpha:!0});if(!o)throw new Error("No 2D context");return o.drawImage(l,t.x,t.y,t.width,t.height,0,0,t.width,t.height),new Promise((i,h)=>{c.toBlob(s=>{if(!s)return h("Canvas is empty");const f=new File([s],"cropped.png",{type:"image/png"});i(f)},"image/png")})}const pt={"1:1":1,"4:3":4/3,"16:9":16/9,"3:4":3/4,"9:16":9/16,"2:3":2/3,"3:2":3/2,"32:9":32/9},Ct=g.forwardRef(({handleUpload:r,urlImage:t,isUploading:l,croppedImage:c,setCroppedImage:o,size:i="96",aspect:h="1:1",containerProps:s,maxFileSize:f=2,onError:d},u)=>{const p=$.useMediaQuery("md"),[C,b]=g.useState(!1),[B,D]=g.useState(null),[H,Z]=g.useState(!1),[P,J]=g.useState({x:0,y:0}),[L,ae]=g.useState(1),[Y,W]=g.useState(null);g.useEffect(()=>{t===null&&o(null)},[t]);const X=g.useCallback((z,j)=>{W(j)},[]),ie=z=>{var ye;const j=(ye=z.target.files)==null?void 0:ye[0];if(!j)return;const le=new FileReader;le.onload=()=>{D(le.result),Z(!0)},le.readAsDataURL(j)},ne=async()=>{if(!(!B||!Y))try{const z=await _l(B,Y);if(f&&z.size>f*1024*1024){d==null||d(`Ukuran file maksimal ${f}MB`);return}r==null||r(z);const j=URL.createObjectURL(z);o(j,z),Z(!1)}catch{d==null||d("Gagal memproses gambar")}},q=g.useRef(null),K=()=>{q.current&&q.current.click()};g.useImperativeHandle(u,()=>({openFileDialog:()=>{var z;(z=q.current)==null||z.click()}}));const re=parseInt(i,10),se=pt[h];let te,R;return se>=1?(R=re,te=re*se):(te=re,R=re/se),e.jsxs(y.Box,{display:"flex",position:"relative",bg:(s==null?void 0:s.bg)||"gray-200",borderStyle:(s==null?void 0:s.borderStyle)||"border-none",borderColor:(s==null?void 0:s.borderColor)||"gray-200",borderWidth:(s==null?void 0:s.borderWidth)||"border-2",borderRadius:(s==null?void 0:s.borderRadius)||"rounded-md",overflow:"overflow-hidden",align:"center",justify:"center",style:{width:s!=null&&s.fullWidth?"100%":`${te}px`,height:s!=null&&s.fullWidth?"auto":`${R}px`,aspectRatio:se,flexShrink:0},onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),children:[c||t?e.jsx("img",{src:c||t||void 0,alt:"Profile",style:{objectFit:"cover",width:"100%",height:"100%"}}):e.jsx(y.Box,{display:"flex",direction:"column",align:"center",justify:"center",padding:"spacing-4",children:e.jsx(S.Icon,{name:"Image",style:{color:"var(--sa-text-subtle, #8c8f97)",width:Number(i)/2<40?Number(i)/2:40,height:Number(i)/2<40?Number(i)/2:40}})}),e.jsxs(y.Box,{position:"absolute",display:"flex",align:"center",justify:"center",cursor:"pointer",style:{inset:0,backgroundColor:"var(--sa-color-black-alpha-a30, #080f214a)",opacity:C?1:0,transition:"opacity 0.3s ease-in-out"},onClick:K,children:[e.jsx("input",{ref:q,type:"file",accept:"image/*",onChange:ie,disabled:l,style:{display:"none"}}),e.jsxs(y.Box,{display:"flex",align:"center",gap:"spacing-2",direction:"row",children:[e.jsx(S.Icon,{name:"Edit3",style:{color:"var(--sa-background-primary, #ffffff)"}}),e.jsx(V,{condition:i.toNumber()>80,children:e.jsx(v.Text,{color:"gray-50",fontSize:i.toNumber()>80?"sm":"md",fontWeight:"medium",children:"Edit Image"})})]})]}),l&&e.jsx(y.Box,{position:"absolute",display:"flex",align:"center",justify:"center",style:{inset:0,zIndex:20,backgroundColor:"var(--sa-color-white-alpha-a80, #e5e9f640)"},children:e.jsx(y.Box,{borderRadius:"rounded-full",style:{animation:"spin 1s linear infinite",border:"2px solid transparent",height:"2rem",width:"2rem"},borderColor:"blue-600"})}),H&&sr.createPortal(e.jsx("div",{style:{position:"fixed",inset:0,zIndex:19999,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(0,0,0,0.6)"},onClick:()=>Z(!1),children:e.jsxs("div",{style:{backgroundColor:"var(--sa-background-primary)",borderRadius:"var(--sa-radii-md)",boxShadow:"0 20px 60px rgba(0,0,0,0.3)",overflow:"hidden",width:p?h==="1:1"?"min(90vw, 480px)":`min(90vw, ${te*2}px)`:"calc(100vw - 2rem)",display:"flex",flexDirection:"column"},onClick:z=>z.stopPropagation(),children:[e.jsx("div",{style:{position:"relative",width:"100%",height:"20rem",backgroundColor:"var(--sa-color-gray-100)"},children:B&&e.jsx(vt,{image:B,crop:P,zoom:L,aspect:h?pt[h]:void 0,onCropChange:J,onZoomChange:ae,onCropComplete:X,objectFit:"contain",minZoom:.5,restrictPosition:!1})}),e.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:"0.5rem",padding:"0.75rem 1rem",borderTop:"1px solid var(--sa-border-subtle)"},children:[e.jsx(A.Button,{size:"sm",secondary:!0,onClick:()=>Z(!1),children:"Cancel"}),e.jsx(A.Button,{size:"sm",primary:!0,onClick:ne,children:"Crop"})]})]})}),document.body)]})}),Zl=({size:r="md",direction:t="vertical",requiredTitle:l="(Required)",fullWidth:c=!1,required:o=!1,...i})=>{var f,d,u;const h=i.hideMessageError||!1,s=t==="horizontal"?r==="sm"?342:r==="lg"?400:342:void 0;return e.jsxs(y.Box,{gap:t==="horizontal"?"spacing-96":"sm",direction:t==="horizontal"?"row":"column",...i.containerProps,children:[i.title&&e.jsx(V,{condition:!!o,fallback:e.jsxs(y.Box,{direction:"column",customMaxWidth:s,fullWidth:c,children:[e.jsx(_,{children:i.title}),e.jsx(v.Text,{fontSize:r,color:"gray-500",children:i.description})]}),children:e.jsxs(y.Box,{direction:"column",customMaxWidth:s,fullWidth:c,children:[e.jsxs(N.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(_,{fontSize:r,children:i.title}),e.jsx(_,{color:"error",fontSize:r,children:l}),e.jsx(V,{condition:!!((f=i.tooltip)!=null&&f.label),children:e.jsx(ce.Tooltip,{label:(d=i.tooltip)==null?void 0:d.label,arrowPosition:(u=i.tooltip)==null?void 0:u.arrowPosition,...i.tooltip,children:e.jsx(S.Icon,{name:"InfoCircle",size:r==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(V,{condition:!!i.description,children:e.jsx(v.Text,{fontSize:r,color:"gray-500",children:i.description})})]})}),e.jsxs(N.Flex,{direction:"column",gap:"xs",children:[e.jsx(Ct,{...i.inputProps}),!h&&i.errorMessage&&e.jsx(ve,{message:i.errorMessage})]})]})},ql=({size:r="md",direction:t="vertical",requiredTitle:l="(Required)",fullWidth:c=!1,...o})=>{var h,s,f;const i=t==="horizontal"?r==="sm"?342:r==="lg"?400:342:void 0;return e.jsxs(y.Box,{gap:t==="horizontal"?"spacing-96":"sm",direction:t==="horizontal"?"row":"column",...o.containerProps,children:[o.title&&e.jsx(V,{condition:!!o.inputProps.required,fallback:e.jsxs(y.Box,{direction:"column",customMaxWidth:i,fullWidth:c,children:[e.jsx(_,{children:o.title}),e.jsx(v.Text,{fontSize:r,color:"gray-500",children:o.description})]}),children:e.jsxs(y.Box,{direction:"column",customMaxWidth:i,fullWidth:c,children:[e.jsxs(N.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(_,{fontSize:r,children:o.title}),e.jsx(_,{color:"error",fontSize:r,children:l}),e.jsx(V,{condition:!!((h=o.tooltip)!=null&&h.label),children:e.jsx(ce.Tooltip,{label:(s=o.tooltip)==null?void 0:s.label,arrowPosition:(f=o.tooltip)==null?void 0:f.arrowPosition,...o.tooltip,children:e.jsx(S.Icon,{name:"InfoCircle",size:r==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(V,{condition:!!o.description,children:e.jsx(v.Text,{fontSize:r,color:"gray-500",children:o.description})})]})}),o.inputProps.extended&&o.inputProps.extended]})},Ql=({items:r,id:t,handleOnUpdate:l,width:c,toggleShow:o=!0,disabled:i=!1})=>{var u;const[h,s]=g.useState([]);g.useEffect(()=>{r&&s([...r.map(p=>({id:p.id,isActive:p.isActive}))])},[r]);const f=(u=h.find(p=>p.id===t))==null?void 0:u.isActive,d=g.useCallback(()=>{s(p=>p.map(C=>C.id===t?{...C,isActive:!C.isActive}:C)),l&&l(!f)},[t,l,f]);return e.jsx(y.Box,{direction:"row",gap:"md",style:{width:c},children:o&&e.jsx(Pe.Toggle,{disabled:i,checked:f,onChange:d,label:f?"Active":"Inactive"})})},Gl={InputText:cl,InputDropdown:il,InputSingleFile:Il,CheckBoxOptions:Hl,RadioOptions:Al,InputTextArea:Vl,ToggleForm:zl,ActionButton:jl,FormTitle:Nl,InputDate:Pl,InputImgFile:Zl,Custom:ql},xt=({customBottom:r})=>{const[t,l]=g.useState(!1),c=()=>{window.scrollY>window.screenY?l(!0):l(!1)},o=()=>{window.scrollTo({top:0,behavior:"smooth"})};return g.useEffect(()=>(window.addEventListener("scroll",c),()=>{window.removeEventListener("scroll",c)}),[]),e.jsx(y.Box,{style:{position:"fixed",bottom:0,right:0},children:e.jsx(y.Box,{position:"absolute",style:{bottom:r||"1.6rem",right:"2rem",transform:t?"scale(1)":"scale(0)",transition:"transform 0.2s ease-in-out"},children:e.jsx(A.Button,{secondary:!0,size:"xs",onClick:o,type:"button",iconLeft:e.jsx(S.Icon,{width:16,size:"xs",name:"ArrowPullUp",style:{color:"var(--sa-background-brand, #04254f)"}})})})})},Ul=({pageLayout:r,children:t,wrapperProps:l,containerProps:c})=>{const o=$.useMediaQuery("md"),i=(c==null?void 0:c.customWidth)??264;return e.jsxs(y.Box,{display:"block",direction:"row",...l,style:{marginRight:o?i:24,...(l==null?void 0:l.style)??{}},children:[r,e.jsx(y.Box,{show:"desktop",variant:"aside",position:"fixed",top:"top-0",bottom:"bottom-0",right:"right-0",customWidth:264,borderStyle:"border-solid-l",borderWidth:"border-l",...c,style:{marginTop:"4rem",backgroundColor:"var(--sa-background-white, #ffffff)",borderColor:"var(--sa-border-subtle, #0b120e24)",...(c==null?void 0:c.style)??{}},children:t})]})},Jl=({children:r,withScrollToTopButton:t=!1,scrollToTopButtonProps:l,containerProps:c})=>e.jsx(y.Box,{position:"absolute",width:"width-full",style:{zIndex:"var(--app-footer-zindex, 999)"},children:e.jsxs(y.Box,{position:"fixed",bottom:"bottom-0",right:"right-0",padding:"spacing-32",height:"height-24",bg:"gray-50",direction:"row",align:"center",display:"flex",style:{left:"var(--app-sidebar-width, 0px)",transition:"left 0.3s ease-in-out",borderColor:"var(--sa-border-subtle, #0b120e24)"},justify:(c==null?void 0:c.justify)||"flex-end",borderStyle:"border-solid-t",borderWidth:"border-t",children:[t&&e.jsx(xt,{...l,customBottom:(l==null?void 0:l.customBottom)||"5.7rem"}),r]})}),Yl=({fields:r})=>e.jsx(y.Box,{display:"flex",direction:"column",gap:"lg",children:e.jsx(Ue,{of:r,render:(t,l)=>e.jsx(Xl,{...t},l)})}),Xl=({title:r,value:t,icon:l})=>e.jsxs(y.Box,{display:"flex",direction:"column",gap:"sm",children:[l?e.jsxs(y.Box,{display:"flex",direction:"row",align:"center",gap:"xs",children:[e.jsx(S.Icon,{name:l,color:"subtle"}),e.jsx(v.Text,{color:"gray-500",variant:"sub-h3",children:r})]}):e.jsx(v.Text,{color:"gray-500",variant:"sub-h3",children:r}),typeof t=="string"?e.jsx(v.Text,{variant:"sub-h3",children:t}):t]}),U={silhouette:"#A7B0AC",accent:"#78867F"};function Kl({width:r,height:t}){return e.jsx(e.Fragment,{children:e.jsxs("svg",{width:r||"100",height:t||"90",viewBox:"0 0 102 90",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M51.0002 16.8145C36.0811 16.8145 24.8296 21.3801 24.8296 27.4328V76.5344C24.8296 82.573 36.0799 87.127 51.0002 87.127C65.9204 87.127 77.1707 82.573 77.1707 76.5344V27.4328C77.1707 21.3801 65.9204 16.8145 51.0002 16.8145ZM51.0002 19.1582C65.0602 19.1582 74.8582 23.5187 74.8582 27.4328C74.8582 30.1363 70.1615 32.9664 63.1708 34.4746C55.861 36.0543 46.1416 36.0543 38.8318 34.4746C31.8399 32.9664 27.1432 30.1363 27.1432 27.4328C27.1432 23.5187 36.9402 19.1582 51.0002 19.1582ZM74.8582 31.9199V43.784C74.8582 46.532 70.3142 49.2941 63.2737 50.8328C63.2391 50.8375 63.2032 50.8434 63.1697 50.8504C57.6867 52.0352 50.8498 52.3305 44.6893 51.7387C42.6358 51.5418 40.6575 51.2453 38.8306 50.8504C38.8029 50.8445 38.7682 50.8387 38.7347 50.8352C32.5707 49.4898 28.318 47.2047 27.3514 44.8141C27.2138 44.4719 27.1421 44.1285 27.1421 43.7852V31.9199C27.1999 31.9715 27.2693 32.0207 27.3294 32.0723C27.5052 32.2246 27.6902 32.3758 27.8844 32.5234C27.9954 32.609 28.1064 32.6934 28.2232 32.7766C28.4371 32.9301 28.6637 33.0801 28.8973 33.2289C29.0083 33.2992 29.1135 33.3719 29.2291 33.441C29.5702 33.6473 29.9275 33.8488 30.3044 34.0434C30.3195 34.0516 30.3333 34.0598 30.3484 34.068C30.7427 34.2707 31.1601 34.4652 31.5925 34.6551C31.7301 34.716 31.8758 34.7734 32.0168 34.832C32.3221 34.9598 32.6331 35.0852 32.9557 35.207C33.1303 35.2727 33.3095 35.3359 33.4887 35.4004C33.8032 35.5117 34.1247 35.6207 34.4542 35.7273C34.6404 35.7871 34.8254 35.8469 35.015 35.9043C35.3734 36.0133 35.7434 36.1164 36.1181 36.2184C36.2915 36.2652 36.4603 36.3145 36.6361 36.3602C37.1911 36.5031 37.7588 36.6402 38.3485 36.7668C42.1595 37.5906 46.5336 38.0254 50.999 38.0254C55.4644 38.0254 59.8397 37.5906 63.6495 36.768C64.2404 36.6402 64.8092 36.5031 65.3666 36.3602C65.5377 36.3156 65.7007 36.2688 65.8684 36.223C66.2499 36.1199 66.6246 36.0145 66.9888 35.9031C67.1749 35.8469 67.3553 35.7883 67.5368 35.7309C67.8745 35.623 68.2028 35.5105 68.5243 35.3969C68.6966 35.3359 68.8677 35.275 69.0353 35.2117C69.3672 35.0863 69.6852 34.9574 69.9985 34.8262C70.1326 34.7699 70.2725 34.7148 70.4032 34.6574C70.8379 34.4664 71.2576 34.2707 71.6542 34.0668C71.66 34.0633 71.6658 34.0609 71.6716 34.0574C72.0589 33.8582 72.4243 33.6508 72.7735 33.441C72.8868 33.3719 72.9909 33.3016 73.1007 33.2313C73.3354 33.0813 73.5632 32.9312 73.7794 32.7766C73.8951 32.6934 74.0049 32.609 74.1159 32.5258C74.3102 32.377 74.4963 32.2258 74.6732 32.0723C74.7322 32.0207 74.8027 31.9727 74.8594 31.9211L74.8582 31.9199ZM74.8582 48.2887V60.1598C74.8582 62.8773 70.3396 65.6359 63.335 67.2004C63.2737 67.2051 63.2136 67.2156 63.1547 67.2285C59.5021 68.016 55.2482 68.4109 50.9955 68.4098C48.8692 68.4098 46.7428 68.3113 44.6917 68.1145C42.6405 67.9176 40.6656 67.6211 38.8399 67.2273C38.7832 67.2133 38.7266 67.2051 38.6699 67.2004C31.663 65.6359 27.1432 62.8785 27.1432 60.1598V48.2887C27.2022 48.3426 27.2739 48.393 27.3352 48.4457C27.5075 48.5945 27.6878 48.7422 27.8763 48.8875C27.9908 48.9754 28.1052 49.0633 28.2255 49.15C28.4348 49.3 28.6568 49.4477 28.8834 49.593C28.999 49.6668 29.1089 49.7418 29.228 49.8145C29.5633 50.0172 29.9136 50.2152 30.2825 50.4074C30.3114 50.4227 30.338 50.4379 30.3669 50.452C30.7507 50.6488 31.1566 50.8398 31.5775 51.0262C31.722 51.0895 31.8746 51.1504 32.0226 51.2125C32.3198 51.3379 32.6227 51.4609 32.9372 51.5793C33.1164 51.6473 33.2991 51.7129 33.4841 51.7785C33.7917 51.8887 34.1073 51.9953 34.4299 52.0996C34.6196 52.1605 34.8092 52.2227 35.0046 52.2812C35.3584 52.3891 35.7238 52.4922 36.0938 52.593C36.2684 52.641 36.4395 52.6902 36.6176 52.7359C37.1714 52.8789 37.738 53.016 38.3253 53.1426C38.3554 53.1496 38.3889 53.1555 38.4236 53.159C42.2161 53.9723 46.5636 54.4023 51.0013 54.4023C55.439 54.4023 59.7784 53.9734 63.5697 53.1613C63.6056 53.1566 63.6414 53.1508 63.6773 53.1426C64.2647 53.0148 64.8312 52.8789 65.3851 52.7359C65.5643 52.6902 65.7342 52.6398 65.9088 52.593C66.2788 52.4922 66.6442 52.3891 66.998 52.2812C67.1934 52.2215 67.3831 52.1605 67.5727 52.0996C67.8953 51.9953 68.2109 51.8887 68.5185 51.7785C68.7023 51.7129 68.8862 51.6473 69.0654 51.5793C69.3799 51.4598 69.6817 51.3367 69.98 51.2125C70.128 51.1504 70.2806 51.0895 70.4252 51.0262C70.846 50.841 71.2507 50.65 71.6357 50.452C71.6646 50.4367 71.6912 50.4215 71.7201 50.4074C72.0901 50.2152 72.4405 50.0172 72.7747 49.8145C72.8949 49.7418 73.0036 49.6668 73.1192 49.593C73.347 49.4477 73.5678 49.3 73.7771 49.15C73.8974 49.0633 74.0118 48.9766 74.1263 48.8875C74.3148 48.7422 74.4952 48.5945 74.6674 48.4457C74.7287 48.393 74.7992 48.3426 74.8582 48.2887ZM74.8582 76.5355C74.8582 80.4367 65.0602 84.7844 51.0002 84.7844C36.9402 84.7844 27.1421 80.4367 27.1421 76.5355V64.6469C27.1987 64.6984 27.2693 64.7477 27.3282 64.7992C27.5028 64.9504 27.6844 65.0992 27.8763 65.2469C27.9873 65.3324 28.0995 65.418 28.2162 65.5023C28.4302 65.6559 28.6568 65.807 28.8892 65.9559C28.9979 66.0262 29.1019 66.0977 29.2152 66.1656C29.5691 66.3801 29.9367 66.591 30.3299 66.7937C30.331 66.7937 30.3322 66.7938 30.3333 66.7961C30.7253 66.9988 31.1404 67.1945 31.5694 67.3855C31.7058 67.4465 31.8515 67.5039 31.9914 67.5637C32.2955 67.6926 32.6054 67.8191 32.928 67.9422C33.1002 68.0078 33.2772 68.0711 33.4541 68.1355C33.7674 68.248 34.0888 68.3582 34.4184 68.466C34.6034 68.5258 34.7872 68.5867 34.9768 68.6453C35.3341 68.7555 35.703 68.8609 36.0764 68.9641C36.2476 69.0109 36.4141 69.0602 36.5887 69.1059C37.1413 69.2512 37.7079 69.3895 38.2941 69.5195C38.3462 69.5312 38.3993 69.5383 38.4514 69.543C42.2369 70.3516 46.5717 70.7793 50.999 70.7793C55.4263 70.7793 59.7599 70.3527 63.5478 69.543C63.5998 69.5383 63.653 69.5312 63.705 69.5195C64.2912 69.3906 64.8578 69.2512 65.4105 69.1059C65.5839 69.0602 65.7493 69.0121 65.9192 68.9652C66.295 68.8621 66.665 68.7555 67.0246 68.6453C67.2131 68.5879 67.3958 68.5281 67.5785 68.4684C67.9092 68.3605 68.2329 68.2492 68.5486 68.1355C68.7231 68.0723 68.8977 68.009 69.0689 67.9445C69.3938 67.8203 69.7071 67.6926 70.0135 67.5625C70.1511 67.5039 70.2933 67.4477 70.4275 67.3879C71.29 67.0047 72.0774 66.5969 72.7851 66.1668C72.8972 66.0988 73.0001 66.0273 73.1088 65.9582C73.3424 65.8082 73.5702 65.657 73.7852 65.5023C73.9008 65.4191 74.0118 65.3336 74.1217 65.2492C74.3148 65.1016 74.4975 64.9516 74.6732 64.7992C74.7322 64.7488 74.8016 64.6996 74.8582 64.648V76.5355Z",fill:U.silhouette}),e.jsx("path",{d:"M33.2089 38.8535C31.3993 38.8535 29.9263 40.3453 29.9263 42.1805C29.9263 44.0156 31.3982 45.5062 33.2089 45.5062C35.0196 45.5062 36.4903 44.0145 36.4903 42.1805C36.4903 40.3465 35.0184 38.8535 33.2089 38.8535ZM33.2089 43.1625C32.6735 43.1625 32.2388 42.7219 32.2388 42.1805C32.2388 41.6391 32.6735 41.1973 33.2089 41.1973C33.7442 41.1973 34.1778 41.6379 34.1778 42.1805C34.1778 42.723 33.7431 43.1625 33.2089 43.1625Z",fill:U.silhouette}),e.jsx("path",{d:"M33.2089 54.6777C31.3993 54.6777 29.9263 56.1695 29.9263 58.0047C29.9263 59.8398 31.3982 61.3316 33.2089 61.3316C35.0196 61.3316 36.4903 59.8398 36.4903 58.0047C36.4903 56.1695 35.0184 54.6777 33.2089 54.6777ZM33.2089 58.9879C32.6735 58.9879 32.2388 58.5473 32.2388 58.0047C32.2388 57.4621 32.6735 57.0215 33.2089 57.0215C33.7442 57.0215 34.1778 57.4621 34.1778 58.0047C34.1778 58.5473 33.7431 58.9879 33.2089 58.9879Z",fill:U.silhouette}),e.jsx("path",{d:"M33.2089 70.5C31.3993 70.5 29.9263 71.9918 29.9263 73.827C29.9263 75.6621 31.3982 77.1539 33.2089 77.1539C35.0196 77.1539 36.4903 75.6621 36.4903 73.827C36.4903 71.9918 35.0184 70.5 33.2089 70.5ZM33.2089 74.8102C32.6735 74.8102 32.2388 74.3695 32.2388 73.827C32.2388 73.2844 32.6735 72.8438 33.2089 72.8438C33.7442 72.8438 34.1778 73.2844 34.1778 73.827C34.1778 74.3695 33.7431 74.8102 33.2089 74.8102Z",fill:U.silhouette}),e.jsx("path",{d:"M70.0215 38.2852C69.3821 38.2852 68.8652 38.809 68.8652 39.457V44.3332C68.8652 44.9812 69.3821 45.5051 70.0215 45.5051C70.6609 45.5051 71.1777 44.9812 71.1777 44.3332V39.457C71.1777 38.809 70.6609 38.2852 70.0215 38.2852Z",fill:U.silhouette}),e.jsx("path",{d:"M70.0215 54.3926C69.3821 54.3926 68.8652 54.9164 68.8652 55.5645V60.4406C68.8652 61.0887 69.3821 61.6125 70.0215 61.6125C70.6609 61.6125 71.1777 61.0887 71.1777 60.4406V55.5645C71.1777 54.9164 70.6609 54.3926 70.0215 54.3926Z",fill:U.silhouette}),e.jsx("path",{d:"M70.0215 70.5C69.3821 70.5 68.8652 71.0238 68.8652 71.6719V76.5492C68.8652 77.1973 69.3821 77.7211 70.0215 77.7211C70.6609 77.7211 71.1777 77.1973 71.1777 76.5492V71.6719C71.1777 71.0238 70.6609 70.5 70.0215 70.5Z",fill:U.silhouette}),e.jsx("path",{d:"M65.77 39.7617C65.1306 39.7617 64.6138 40.2855 64.6138 40.9336V45.8098C64.6138 46.4578 65.1306 46.9816 65.77 46.9816C66.4094 46.9816 66.9263 46.4578 66.9263 45.8098V40.9336C66.9263 40.2855 66.4094 39.7617 65.77 39.7617Z",fill:U.silhouette}),e.jsx("path",{d:"M65.77 55.8691C65.1306 55.8691 64.6138 56.393 64.6138 57.041V61.9172C64.6138 62.5652 65.1306 63.0891 65.77 63.0891C66.4094 63.0891 66.9263 62.5652 66.9263 61.9172V57.041C66.9263 56.393 66.4094 55.8691 65.77 55.8691Z",fill:U.silhouette}),e.jsx("path",{d:"M65.77 71.9766C65.1306 71.9766 64.6138 72.5004 64.6138 73.1484V78.0246C64.6138 78.6727 65.1306 79.1965 65.77 79.1965C66.4094 79.1965 66.9263 78.6727 66.9263 78.0246V73.1484C66.9263 72.5004 66.4094 71.9766 65.77 71.9766Z",fill:U.silhouette}),e.jsx("path",{d:"M61.2939 40.7246C60.6545 40.7246 60.1377 41.2484 60.1377 41.8965V46.7727C60.1377 47.4207 60.6545 47.9445 61.2939 47.9445C61.9334 47.9445 62.4502 47.4207 62.4502 46.7727V41.8965C62.4502 41.2484 61.9334 40.7246 61.2939 40.7246Z",fill:U.silhouette}),e.jsx("path",{d:"M61.2939 56.832C60.6545 56.832 60.1377 57.3559 60.1377 58.0039V62.8801C60.1377 63.5281 60.6545 64.052 61.2939 64.052C61.9334 64.052 62.4502 63.5281 62.4502 62.8801V58.0039C62.4502 57.3559 61.9334 56.832 61.2939 56.832Z",fill:U.silhouette}),e.jsx("path",{d:"M61.2939 72.9395C60.6545 72.9395 60.1377 73.4633 60.1377 74.1113V78.9875C60.1377 79.6355 60.6545 80.1594 61.2939 80.1594C61.9334 80.1594 62.4502 79.6355 62.4502 78.9875V74.1113C62.4502 73.4633 61.9334 72.9395 61.2939 72.9395Z",fill:U.silhouette}),e.jsx("path",{d:"M39.0489 24.4037C39.131 24.4037 39.2154 24.3944 39.2986 24.3768C42.7316 23.6127 46.6755 23.185 51.0207 23.11C51.659 23.0983 52.1677 22.5651 52.1561 21.917C52.1446 21.2701 51.652 20.7451 50.9791 20.7662C46.4813 20.8448 42.3835 21.2889 38.8015 22.0881C38.1782 22.2264 37.7828 22.8522 37.9204 23.4838C38.0395 24.0311 38.5182 24.4037 39.0489 24.4037Z",fill:U.silhouette}),e.jsx("path",{d:"M32.5406 26.6215C32.7407 26.6215 32.9442 26.57 33.128 26.4586C33.1315 26.4563 33.5096 26.2336 34.2889 25.9055C34.8786 25.6582 35.1584 24.9727 34.9144 24.3739C34.6704 23.775 33.9917 23.4926 33.4032 23.7399C32.4632 24.1348 31.9926 24.4149 31.9417 24.4465C31.396 24.7782 31.219 25.4942 31.544 26.0485C31.7613 26.4164 32.1452 26.6204 32.5395 26.6204L32.5406 26.6215Z",fill:U.silhouette}),e.jsx("path",{d:"M92.7251 26.7272L82.3845 29.3124C81.6929 29.4856 80.9911 29.0642 80.8179 28.3727C80.6447 27.6799 81.066 26.978 81.7576 26.8048L92.0982 24.2196C92.791 24.0464 93.4929 24.4678 93.6661 25.1593C93.8393 25.8521 93.4179 26.554 92.7251 26.7272Z",fill:U.accent,fillOpacity:"0.65"}),e.jsx("path",{d:"M94.4649 11.0082L80.2465 21.3488C79.6701 21.7676 78.8609 21.6409 78.4408 21.0632C78.022 20.4867 78.1487 19.6775 78.7265 19.2574L92.9448 8.91682C93.5213 8.49803 94.3305 8.6247 94.7505 9.20248C95.1693 9.77897 95.0414 10.5881 94.4649 11.0082Z",fill:U.accent,fillOpacity:"0.65"}),e.jsx("path",{d:"M78.0091 10.6269L74.1314 17.0898C73.7643 17.7025 72.9706 17.9002 72.358 17.5331C71.7466 17.1673 71.5475 16.3724 71.9146 15.7597L75.7923 9.29684C76.1594 8.68545 76.9544 8.48769 77.5657 8.85349C78.1784 9.22058 78.3762 10.0155 78.0091 10.6269Z",fill:U.accent,fillOpacity:"0.65"})]})})}const $l=({title:r="create",children:t,onClickAction:l,variant:c="primary",variantTitle:o,leftIcon:i,showButton:h=!0,customHeight:s,childrenButton:f,customIcon:d})=>{const u=()=>{switch(c){case"primary":return e.jsx(e.Fragment,{children:i?e.jsx(A.Button,{primary:!0,iconLeft:i,onClick:l,children:f||r}):e.jsx(A.Button,{primary:!0,onClick:l,children:f||r})});case"secondary":return e.jsx(e.Fragment,{children:i?e.jsx(A.Button,{secondary:!0,iconLeft:i,onClick:l,children:o?e.jsx(v.Text,{fontFamily:"Poppins",fontSize:"md",fontWeight:"medium",style:{color:"var(--sa-background-success, #28ac6e)"},children:f||r}):r}):e.jsx(A.Button,{secondary:!0,onClick:l,children:f||r})});case"success":return e.jsx(e.Fragment,{children:i?e.jsx(A.Button,{success:!0,iconLeft:i,onClick:l,children:f||r}):e.jsx(A.Button,{success:!0,onClick:l,children:f||r})});default:return e.jsx(e.Fragment,{children:i?e.jsx(A.Button,{primary:!0,iconLeft:i,onClick:l,children:f||r}):e.jsx(A.Button,{primary:!0,onClick:l,children:f||r})})}};return e.jsxs(y.Box,{height:"height-full",display:"flex",direction:"column",gap:"sm",justify:"center",align:"center",marginBlock:"auto",customHeight:s,children:[d||e.jsx(Kl,{}),e.jsx(y.Box,{children:t.map((p,C)=>e.jsx(ge.Body1,{props:{align:"center",textAlign:"center"},children:C>2?null:p},C))}),h?u():null]})},M={c001A72:"#001A72",c64B5F6:"#64B5F6",c98B4CB:"#98B4CB",cBBDEFB:"#BBDEFB",cD0E5F7:"#D0E5F7",cD6EBFD:"#D6EBFD",c000000:"#000000",cFFFFFF:"#FFFFFF"};function Rl({width:r,height:t}){return e.jsx(e.Fragment,{children:e.jsxs("svg",{width:r,height:t,viewBox:"0 0 622 271",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M32.4375 254.5H612.437",stroke:M.c64B5F6,strokeWidth:"5",strokeLinecap:"round"}),e.jsx("rect",{x:"216.562",y:"45.5605",width:"55",height:"20",fill:M.cD6EBFD}),e.jsx("rect",{x:"14.4375",y:"89.7803",width:"46",height:"20",fill:M.cD6EBFD}),e.jsx("rect",{x:"0.4375",y:"111.78",width:"46",height:"20",fill:M.cD6EBFD}),e.jsx("rect",{x:"0.4375",y:"67.7803",width:"46",height:"20",fill:M.cD6EBFD}),e.jsx("rect",{x:"344.312",y:"0.5",width:"55",height:"20",fill:M.cD6EBFD}),e.jsx("rect",{x:"549.562",y:"86.7803",width:"55",height:"20",fill:M.cD6EBFD}),e.jsx("rect",{x:"566.562",y:"64.7803",width:"55",height:"20",fill:M.cD6EBFD}),e.jsx("path",{d:"M233.438 165.217C233.438 132.764 239.035 107.198 250.231 88.5189C261.596 69.8396 279.832 60.5 304.938 60.5C330.043 60.5 348.194 69.8396 359.389 88.5189C370.755 107.198 376.438 132.764 376.438 165.217C376.438 198.047 370.755 223.802 359.389 242.481C348.194 261.16 330.043 270.5 304.938 270.5C279.832 270.5 261.596 261.16 250.231 242.481C239.035 223.802 233.438 198.047 233.438 165.217ZM333.69 165.217C333.69 146.16 331.824 131.538 328.092 121.349C324.36 110.972 316.642 105.783 304.938 105.783C293.233 105.783 285.515 110.972 281.783 121.349C278.051 131.538 276.185 146.16 276.185 165.217C276.185 178.047 276.863 188.708 278.22 197.198C279.577 205.5 282.292 212.292 286.363 217.575C290.604 222.67 296.795 225.217 304.938 225.217C313.08 225.217 319.187 222.67 323.258 217.575C327.499 212.292 330.298 205.5 331.655 197.198C333.012 188.708 333.69 178.047 333.69 165.217Z",fill:M.cD0E5F7}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50.4375 235.124V194.28L138.96 60.5H192.466V191.32H215.438V235.124H192.466V249.5H144.563V235.124H50.4375ZM100.862 191.32L147.925 116.143V191.32H100.862Z",fill:M.cBBDEFB,fillOpacity:"0.6"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M394.438 235.124V194.28L482.96 60.5H536.466V191.32H559.438V235.124H536.466V249.5H488.563V235.124H394.438ZM444.862 191.32L491.925 116.143V191.32H444.862Z",fill:M.cBBDEFB,fillOpacity:"0.6"}),e.jsx("path",{d:"M349.472 171.5H261.64V186.396H349.472V171.5Z",fill:M.c98B4CB}),e.jsx("path",{d:"M261.64 171.5L244.719 186.396H261.64V171.5Z",fill:M.c98B4CB}),e.jsx("path",{d:"M363.574 186.396L349.472 171.5V186.396H363.574Z",fill:M.c98B4CB}),e.jsx("path",{d:"M244.719 200.89V264.5H363.574V200.89M244.719 200.89H233.438L244.719 186.396M244.719 200.89H363.574M363.574 200.89H372.437L363.574 186.396M244.719 186.396L261.64 171.5M244.719 186.396H261.64M363.574 186.396L349.472 171.5M363.574 186.396H349.472M261.64 171.5H349.472M261.64 171.5V186.396M349.472 171.5V186.396M349.472 186.396H261.64",stroke:M.c000000,strokeWidth:"2"}),e.jsx("rect",{x:"246.438",y:"202.5",width:"116",height:"60",fill:M.cFFFFFF}),e.jsx("path",{d:"M245.536 187.5H362.959L369.438 198.5H237.438L245.536 187.5Z",fill:M.cFFFFFF}),e.jsx("path",{d:"M332.438 129.846C332.438 141.175 329.183 152.403 323.949 160.772C318.699 169.168 311.592 174.5 303.938 174.5C296.283 174.5 289.176 169.168 283.926 160.772C278.692 152.403 275.438 141.175 275.438 129.846C275.438 118.458 277.838 109.628 282.543 103.663C287.216 97.7387 294.274 94.5 303.938 94.5C313.601 94.5 320.659 97.7387 325.332 103.663C330.037 109.628 332.438 118.458 332.438 129.846Z",fill:M.cFFFFFF,stroke:M.c000000,strokeWidth:"2"}),e.jsx("path",{d:"M281.438 145.5C284.032 154.136 285.762 158.682 290.951 164.591M292.681 166.409C293.624 167.647 295.708 169.591 297.438 170.5",stroke:M.c000000,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M304.438 175C299.54 176.339 297.208 177.876 293.938 182.5M304.438 175C301.183 178.041 299.537 178.883 299.438 182.5M304.438 175C308.173 177.107 309.635 178.834 311.438 182.5",stroke:M.c000000,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M304.936 175.5C303.438 180 302.529 181.628 304.936 186.5",stroke:M.c000000,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M288.178 120.981C289.969 120.93 290.921 121.313 292.167 122.754",stroke:M.c000000,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("circle",{cx:"291.724",cy:"118.765",r:"3.1027",fill:M.c000000}),e.jsx("path",{d:"M308.128 122.463C309.123 120.973 309.987 120.418 311.883 120.237",stroke:M.c000000,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("circle",{cx:"307.681",cy:"118.765",r:"3.1027",fill:M.c000000}),e.jsx("ellipse",{cx:"297.938",cy:"134.5",rx:"2.5",ry:"2",fill:M.c000000}),e.jsx("path",{d:"M340.437 97.5L333.438 104.5M333.438 97.5L340.438 104.5",stroke:M.c001A72,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M265.437 115.5L260.438 120.5M260.438 115.5L265.438 120.5",stroke:M.c001A72,strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M288.437 87.5L283.438 92.5M283.438 87.5L288.438 92.5",stroke:M.c001A72,strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M305.437 83.5L298.438 90.5M298.438 83.5L305.438 90.5",stroke:M.c001A72,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M342.437 145.5L337.438 150.5M337.438 145.5L342.438 150.5",stroke:M.c001A72,strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("circle",{cx:"339.938",cy:"111",r:"2.5",fill:M.c001A72}),e.jsx("circle",{cx:"336.438",cy:"94.5",r:"1",fill:M.c001A72}),e.jsx("circle",{cx:"347.438",cy:"99.5",r:"1",fill:M.c001A72}),e.jsx("circle",{cx:"267.438",cy:"109.5",r:"2",fill:M.c001A72}),e.jsx("circle",{cx:"293.438",cy:"85.5",r:"2",fill:M.c001A72}),e.jsx("circle",{cx:"339.438",cy:"138.5",r:"2",fill:M.c001A72}),e.jsx("circle",{cx:"267.438",cy:"150.5",r:"2",fill:M.c001A72}),e.jsx("circle",{cx:"268.438",cy:"118.5",r:"1",fill:M.c001A72}),e.jsx("circle",{cx:"260.438",cy:"124.5",r:"1",fill:M.c001A72})]})})}function eo({onClick:r}){const t=$.useMediaQuery("md");return e.jsxs(y.Box,{height:"height-screen",fullWidth:!0,display:"flex",align:"center",justify:"center",gap:"md",children:[e.jsx(Rl,{width:t?600:300}),e.jsx(v.Text,{fontWeight:"bold",fontSize:t?"3xl":"2xl",textAlign:"center",children:"Page Not Found"}),e.jsx(v.Text,{fontWeight:"semibold",fontSize:t?"lg":"md",textAlign:"center",children:"Sorry, we couldn't find the page you are looking for"}),r&&e.jsx(A.Button,{size:t?"md":"xs",onClick:r,children:"Go Back"})]})}const m={c46F16B:"#46F16B",c48504C:"#48504C",c64B5F6:"#64B5F6",c67AEE6:"#67AEE6",c86512B:"#86512B",c956847:"#956847",cBBC3F5:"#BBC3F5",cBBDEFB:"#BBDEFB",cC0B2A2:"#C0B2A2",cC8CEF4:"#C8CEF4",cCABEB1:"#CABEB1",cD5C7BD:"#D5C7BD",cD6D6D6:"#D6D6D6",cD6EBFD:"#D6EBFD",cE5EE80:"#E5EE80",cEE8080:"#EE8080",cEFF3F8:"#EFF3F8",cF4F4F4:"#F4F4F4",cFFFFFF:"#FFFFFF"};function ro({width:r,height:t}){return e.jsx(e.Fragment,{children:e.jsxs("svg",{width:r,height:t,viewBox:"0 0 654 258",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("rect",{x:"228",y:"55.5",width:"55",height:"20",fill:m.cD6EBFD}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M75 238.124V197.28L163.523 63.5H217.029V194.32H240V238.124H217.029V252.5H169.126V238.124H75ZM125.424 194.32L172.487 119.143V194.32H125.424Z",fill:m.cBBDEFB,fillOpacity:"0.6"}),e.jsxs("g",{clipPath:"url(#clip0_2949_9690)",children:[e.jsx("path",{d:"M334.5 274.5C381.168 274.5 419 227.266 419 169C419 110.734 381.168 63.5 334.5 63.5C287.832 63.5 250 110.734 250 169C250 227.266 287.832 274.5 334.5 274.5Z",fill:m.cEFF3F8,stroke:m.c67AEE6,strokeWidth:"5"}),e.jsx("path",{d:"M413 197.5C411.397 211.835 402.919 230.898 389.361 246.49C375.596 262.32 356.651 274.5 334.496 274.5C311.331 274.5 292.389 261.672 278.878 245.52C265.592 229.638 257.606 210.603 256 197.5H413Z",fill:m.cD5C7BD}),e.jsx("path",{d:"M278.887 211.766H391.104L392.583 222.856C392.687 223.635 392.08 224.328 391.294 224.328H277.961C277.14 224.328 276.525 223.577 276.686 222.773L278.887 211.766Z",fill:m.cCABEB1}),e.jsx("path",{d:"M287.68 218.884L289.354 213.022H378.961L381.473 218.884H287.68Z",fill:m.cC0B2A2}),e.jsx("path",{d:"M381.944 218.803L381.58 212.266H386.385L386.022 218.803H381.944Z",fill:m.c956847,stroke:m.c48504C}),e.jsx("path",{d:"M283.124 218.803L282.768 213.104H287.565L287.209 218.803H283.124Z",fill:m.c956847,stroke:m.c48504C}),e.jsx("path",{d:"M285.902 212.103L284.935 186.306H279.606C278.151 186.306 277.004 187.542 277.113 188.993L278.673 209.79C278.77 211.095 279.857 212.103 281.166 212.103H285.902Z",fill:m.cC8CEF4,stroke:m.c48504C}),e.jsx("path",{d:"M383.256 212.103L384.638 186.306H389.556C391.007 186.306 392.153 187.537 392.05 188.984L390.564 209.782C390.471 211.09 389.382 212.103 388.07 212.103H383.256Z",fill:m.cC8CEF4,stroke:m.c48504C}),e.jsx("path",{d:"M284.497 178.155C284.455 176.194 286.034 174.581 287.996 174.581H381.904C383.895 174.581 385.485 176.24 385.401 178.23L384.066 209.59C383.987 211.463 382.445 212.941 380.569 212.941H288.663C286.759 212.941 285.205 211.419 285.164 209.515L284.497 178.155Z",fill:m.cC8CEF4,stroke:m.c48504C}),e.jsx("path",{d:"M284.845 181.524C284.792 179.279 286.598 177.431 288.844 177.431H380.687C382.948 177.431 384.76 179.304 384.684 181.565L383.774 208.737C383.701 210.893 381.933 212.603 379.776 212.603H289.48C287.307 212.603 285.532 210.869 285.481 208.697L284.845 181.524Z",fill:m.cBBC3F5}),e.jsx("mask",{id:"mask0_2949_9690",maskUnits:"userSpaceOnUse",x:"301",y:"144",width:"68",height:"17",style:{maskType:"luminance"},children:e.jsx("path",{d:"M301 146.5C301 145.395 301.887 144.5 302.98 144.5H367.02C368.114 144.5 369 145.395 369 146.5V160.411H301V146.5Z",fill:m.cFFFFFF})}),e.jsxs("g",{mask:"url(#mask0_2949_9690)",children:[e.jsx("path",{d:"M301 146.191C301 145.257 301.748 144.5 302.671 144.5H356.701C357.624 144.5 358.372 145.257 358.372 146.191V157.949H301V146.191Z",fill:m.cFFFFFF}),e.jsx("path",{d:"M301.336 146.607C301.336 145.673 302.08 144.916 302.999 144.916H367.01C367.929 144.916 368.673 145.673 368.673 146.607V152.523H301.336V146.607Z",fill:m.cD6D6D6}),e.jsx("path",{d:"M368.673 152.523H301.336V174.5H368.673V152.523Z",fill:m.cF4F4F4}),e.jsx("path",{d:"M307.685 150.417C308.607 150.417 309.356 149.66 309.356 148.726C309.356 147.793 308.607 147.036 307.685 147.036C306.762 147.036 306.014 147.793 306.014 148.726C306.014 149.66 306.762 150.417 307.685 150.417Z",fill:m.cEE8080}),e.jsx("path",{d:"M313.532 150.417C314.455 150.417 315.203 149.66 315.203 148.726C315.203 147.793 314.455 147.036 313.532 147.036C312.609 147.036 311.861 147.793 311.861 148.726C311.861 149.66 312.609 150.417 313.532 150.417Z",fill:m.cE5EE80}),e.jsx("path",{d:"M318.546 150.417C319.469 150.417 320.217 149.66 320.217 148.726C320.217 147.793 319.469 147.036 318.546 147.036C317.623 147.036 316.875 147.793 316.875 148.726C316.875 149.66 317.623 150.417 318.546 150.417Z",fill:m.c46F16B})]}),e.jsx("path",{d:"M301.16 146C301.16 145.172 301.832 144.5 302.66 144.5H367.33C368.159 144.5 368.83 145.172 368.83 146V174.419H301.16V146Z",stroke:m.c48504C}),e.jsx("path",{d:"M395.29 207.579H423.344M354.255 236.889H369.329M327.038 222.234H347.556M350.905 222.234H358.024M288.097 230.19H304.846M253.344 210.091H272.605M278.467 246.938H295.216M297.309 246.938H303.59M337.088 252.801H354.255",stroke:m.c86512B,strokeWidth:"2",strokeLinecap:"round"})]}),e.jsx("path",{d:"M430.241 125.78C430.987 105.807 437.521 90.4065 449.841 79.5799C462.161 68.7532 478.867 63.3398 499.961 63.3398C513.961 63.3398 525.907 65.7665 535.801 70.6199C545.881 75.4732 553.441 82.0998 558.481 90.4998C563.707 98.8998 566.321 108.327 566.321 118.78C566.321 131.1 563.241 141.18 557.081 149.02C550.921 156.673 543.734 161.9 535.521 164.7V165.82C546.161 169.367 554.561 175.247 560.721 183.46C566.881 191.673 569.961 202.22 569.961 215.1C569.961 226.673 567.254 236.94 561.841 245.9C560.436 248.258 558.849 250.481 557.081 252.569L443.5 252.662C432.5 241 427.721 230.5 427.721 207.82H474.201C474.387 216.033 476.721 222.567 481.201 227.42C485.681 232.087 492.214 234.42 500.801 234.42C508.081 234.42 513.681 232.367 517.601 228.26C521.707 223.967 523.761 218.367 523.761 211.46C523.761 202.5 520.867 196.06 515.081 192.14C509.481 188.033 500.427 185.98 487.921 185.98H478.961V147.06H487.921C497.441 147.06 505.094 145.473 510.881 142.3C516.854 138.94 519.841 133.06 519.841 124.66C519.841 117.94 517.974 112.713 514.241 108.98C510.507 105.247 505.374 103.38 498.841 103.38C491.747 103.38 486.427 105.527 482.881 109.82C479.521 114.113 477.561 119.433 477.001 125.78H430.241Z",fill:m.cBBDEFB,fillOpacity:"0.6"}),e.jsx("rect",{x:"43",y:"87.5",width:"46",height:"20",fill:m.cD6EBFD}),e.jsx("rect",{x:"29",y:"109.5",width:"46",height:"20",fill:m.cD6EBFD}),e.jsx("rect",{x:"29",y:"65.5",width:"46",height:"20",fill:m.cD6EBFD}),e.jsx("rect",{x:"356",y:"0.5",width:"55",height:"20",fill:m.cD6EBFD}),e.jsx("rect",{x:"572",y:"142.5",width:"55",height:"20",fill:m.cD6EBFD}),e.jsx("rect",{x:"589",y:"120.5",width:"55",height:"20",fill:m.cD6EBFD}),e.jsx("path",{d:"M3 255.5L651 255.5",stroke:m.c64B5F6,strokeWidth:"5",strokeLinecap:"round"}),e.jsx("defs",{children:e.jsx("clipPath",{id:"clip0_2949_9690",children:e.jsx("rect",{width:"179",height:"192",fill:m.cFFFFFF,transform:"translate(246 60.5)"})})})]})})}function to({onClick:r}){const t=$.useMediaQuery("md");return e.jsxs(y.Box,{height:"height-screen",fullWidth:!0,display:"flex",align:"center",justify:"center",gap:"md",children:[e.jsx(ro,{width:t?600:300}),e.jsx(v.Text,{fontWeight:"bold",fontSize:t?"3xl":"2xl",children:"We Are Sorry ..."}),r&&e.jsx(A.Button,{size:t?"md":"xs",onClick:r,children:"Go Back"})]})}const n={c000D58:"#000D58",c001174:"#001174",c28AC6E:"#28AC6E",c48504C:"#48504C",c64B5F6:"#64B5F6",c90CAF9:"#90CAF9",cC9184A:"#C9184A",cD6D6D6:"#D6D6D6",cD6EBFD:"#D6EBFD",cD9D9D9:"#D9D9D9",cDEECF8:"#DEECF8",cE7EAE9:"#E7EAE9",cF3F8FD:"#F3F8FD",cFFE18B:"#FFE18B",cFFFFFF:"#FFFFFF"};function lo({width:r,height:t}){return e.jsx(e.Fragment,{children:e.jsxs("svg",{width:r,height:t,viewBox:"0 0 622 287",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M406.562 180.997C406.562 148.544 412.16 122.978 423.356 104.299C434.721 85.6199 452.957 76.2803 478.063 76.2803C503.168 76.2803 521.319 85.6199 532.514 104.299C543.88 122.978 549.562 148.544 549.562 180.997C549.562 213.827 543.88 239.582 532.514 258.261C521.319 276.941 503.168 286.28 478.063 286.28C452.957 286.28 434.721 276.941 423.356 258.261C412.16 239.582 406.562 213.827 406.562 180.997ZM506.815 180.997C506.815 161.941 504.949 147.318 501.217 137.129C497.485 126.752 489.767 121.563 478.063 121.563C466.358 121.563 458.64 126.752 454.908 137.129C451.176 147.318 449.31 161.941 449.31 180.997C449.31 193.827 449.988 204.488 451.345 212.978C452.703 221.28 455.417 228.073 459.488 233.356C463.729 238.45 469.92 240.997 478.063 240.997C486.205 240.997 492.312 238.45 496.383 233.356C500.624 228.073 503.423 221.28 504.78 212.978C506.137 204.488 506.815 193.827 506.815 180.997Z",fill:n.cD6EBFD}),e.jsx("path",{d:"M246.562 180.558C246.562 148.105 252.16 122.539 263.356 103.86C274.721 85.1804 292.957 75.8408 318.063 75.8408C343.168 75.8408 361.319 85.1804 372.514 103.86C383.88 122.539 389.562 148.105 389.562 180.558C389.562 213.388 383.88 239.143 372.514 257.822C361.319 276.501 343.168 285.841 318.063 285.841C292.957 285.841 274.721 276.501 263.356 257.822C252.16 239.143 246.562 213.388 246.562 180.558ZM346.815 180.558C346.815 161.501 344.949 146.879 341.217 136.69C337.485 126.313 329.767 121.124 318.063 121.124C306.358 121.124 298.64 126.313 294.908 136.69C291.176 146.879 289.31 161.501 289.31 180.558C289.31 193.388 289.988 204.048 291.345 212.539C292.702 220.841 295.417 227.633 299.488 232.916C303.729 238.011 309.92 240.558 318.063 240.558C326.205 240.558 332.312 238.011 336.383 232.916C340.624 227.633 343.423 220.841 344.78 212.539C346.137 204.048 346.815 193.388 346.815 180.558Z",fill:n.cD6EBFD}),e.jsx("path",{d:"M222.808 118.703H128.062V159.858C132.111 155.484 137.779 151.905 145.067 149.122C152.356 146.338 160.251 144.946 168.754 144.946C183.938 144.946 196.49 148.326 206.41 155.086C216.532 161.846 223.922 170.594 228.578 181.329C233.234 192.065 235.562 203.696 235.562 216.221C235.562 239.483 228.882 257.972 215.52 271.691C202.158 285.21 183.357 282.89 159.062 282.89C142.867 282.89 131.098 284.939 116.826 283.918C104.881 278.351 95.6695 270.697 89.1911 260.955C82.7127 251.213 79.1698 239.98 78.5625 227.256H129.276C130.491 233.419 133.426 238.588 138.083 242.763C142.739 246.739 149.116 248.728 157.214 248.728C166.729 248.728 173.815 245.745 178.472 239.781C183.128 233.817 185.456 225.864 185.456 215.923C185.456 206.181 183.027 198.726 178.168 193.557C173.309 188.387 166.223 185.803 156.911 185.803C150.027 185.803 144.359 187.493 139.905 190.873C135.451 194.054 132.515 198.328 131.098 203.696H80.9919V73.9697H222.808V118.703Z",fill:n.cD6EBFD}),e.jsx("rect",{x:"216.562",y:"45.7803",width:"55",height:"20",fill:n.cD6EBFD}),e.jsx("rect",{x:"14.4375",y:"90",width:"46",height:"20",fill:n.cD6EBFD}),e.jsx("rect",{x:"0.4375",y:"112",width:"46",height:"20",fill:n.cD6EBFD}),e.jsx("rect",{x:"0.4375",y:"68",width:"46",height:"20",fill:n.cD6EBFD}),e.jsx("rect",{x:"344.312",y:"0.719727",width:"55",height:"20",fill:n.cD6EBFD}),e.jsx("rect",{x:"549.562",y:"87",width:"55",height:"20",fill:n.cD6EBFD}),e.jsx("rect",{x:"566.562",y:"65",width:"55",height:"20",fill:n.cD6EBFD}),e.jsx("path",{d:"M25.8125 282.22H605.812",stroke:n.c64B5F6,strokeWidth:"5",strokeLinecap:"round"}),e.jsx("rect",{x:"263.012",y:"175.42",width:"104.6",height:"31.2833",rx:"3.3",fill:n.cFFFFFF,stroke:n.c001174,strokeWidth:"1.4"}),e.jsx("path",{d:"M269.878 200.539C269.878 200.263 270.101 200.039 270.377 200.039L305.476 199.955C305.753 199.955 305.978 200.179 305.978 200.455V206.461H269.878V200.539Z",stroke:n.c001174}),e.jsx("rect",{x:"263.012",y:"210.752",width:"104.6",height:"31.2833",rx:"3.3",fill:n.cFFFFFF,stroke:n.c001174,strokeWidth:"1.4"}),e.jsx("path",{d:"M269.878 235.871C269.878 235.595 270.101 235.372 270.377 235.371L305.476 235.288C305.753 235.287 305.978 235.511 305.978 235.788V241.794H269.878V235.871Z",stroke:n.c001174}),e.jsx("rect",{x:"263.012",y:"246.969",width:"104.6",height:"31.2833",rx:"3.3",fill:n.cFFFFFF,stroke:n.c001174,strokeWidth:"1.4"}),e.jsx("path",{d:"M269.878 272.088C269.878 271.812 270.101 271.589 270.377 271.588L305.476 271.505C305.753 271.504 305.978 271.728 305.978 272.005V278.011H269.878V272.088Z",stroke:n.c001174}),e.jsx("path",{d:"M279.095 176.348H364.373C365.459 176.348 366.125 176.992 366.986 178.252V202.985C366.986 202.985 366.986 203.869 366.545 204.752C366.103 205.635 365.661 206.077 365.661 206.077L306.478 206.163V199.452L279.095 199.518V176.348Z",fill:n.cF3F8FD}),e.jsx("path",{d:"M279.095 211.093H364.373C365.459 211.093 366.125 211.736 366.986 212.997V237.73C366.986 237.73 366.986 238.613 366.545 239.497C366.103 240.38 365.661 240.822 365.661 240.822L306.478 240.908V234.197L279.095 234.262V211.093Z",fill:n.cF3F8FD}),e.jsx("path",{d:"M279.095 248.008H364.373C365.459 248.008 366.125 248.652 366.986 249.912V274.646C366.986 274.646 366.986 275.529 366.545 276.412C366.103 277.296 365.661 277.737 365.661 277.737L306.478 277.824V271.112L279.095 271.178V248.008Z",fill:n.cF3F8FD}),e.jsx("circle",{cx:"270.258",cy:"179.136",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"270.258",cy:"181.786",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"281.561",cy:"179.136",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"281.561",cy:"181.786",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"273.085",cy:"179.136",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"273.085",cy:"181.786",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"284.388",cy:"179.136",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"284.388",cy:"181.786",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"275.91",cy:"179.136",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"275.91",cy:"181.786",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"287.214",cy:"179.136",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"287.214",cy:"181.786",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"278.737",cy:"179.136",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"278.737",cy:"181.786",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"290.04",cy:"179.136",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"290.04",cy:"181.786",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"344.462",cy:"179.136",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"344.462",cy:"181.786",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"355.765",cy:"179.136",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"355.765",cy:"181.786",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"347.29",cy:"179.136",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"347.29",cy:"181.786",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"358.592",cy:"179.136",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"358.592",cy:"181.786",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"350.114",cy:"179.136",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"350.114",cy:"181.786",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"361.418",cy:"179.136",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"361.418",cy:"181.786",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"352.941",cy:"179.136",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"352.941",cy:"181.786",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"364.244",cy:"179.136",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"364.244",cy:"181.786",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"344.462",cy:"200.336",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"344.462",cy:"202.986",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"355.765",cy:"200.336",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"355.765",cy:"202.986",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"347.29",cy:"200.336",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"347.29",cy:"202.986",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"358.592",cy:"200.336",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"358.592",cy:"202.986",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"350.114",cy:"200.336",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"350.114",cy:"202.986",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"361.418",cy:"200.336",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"361.418",cy:"202.986",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"352.941",cy:"200.336",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"352.941",cy:"202.986",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"364.244",cy:"200.336",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"364.244",cy:"202.986",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"359.918",cy:"191.061",r:"4.45833",stroke:n.c001174,strokeWidth:"0.8"}),e.jsx("circle",{cx:"359.918",cy:"191.061",r:"2.20833",fill:n.cE7EAE9}),e.jsx("rect",{x:"269.726",y:"186.553",width:"36.4",height:"9.01667",rx:"0.65",fill:n.cE7EAE9,stroke:n.c001174,strokeWidth:"0.7"}),e.jsx("rect",{x:"310.537",y:"186.553",width:"6.54333",height:"9.01667",rx:"0.65",fill:n.cE7EAE9,stroke:n.c001174,strokeWidth:"0.7"}),e.jsx("rect",{x:"321.312",y:"186.553",width:"6.54333",height:"9.01667",rx:"0.65",fill:n.cE7EAE9,stroke:n.c001174,strokeWidth:"0.7"}),e.jsx("rect",{x:"332.089",y:"186.553",width:"6.54333",height:"9.01667",rx:"0.65",fill:n.cE7EAE9,stroke:n.c001174,strokeWidth:"0.7"}),e.jsx("rect",{x:"342.864",y:"186.553",width:"6.54333",height:"9.01667",rx:"0.65",fill:n.cE7EAE9,stroke:n.c001174,strokeWidth:"0.7"}),e.jsx("circle",{cx:"270.258",cy:"214.468",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"270.258",cy:"217.118",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"281.561",cy:"214.468",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"281.561",cy:"217.118",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"273.085",cy:"214.468",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"273.085",cy:"217.118",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"284.388",cy:"214.468",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"284.388",cy:"217.118",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"275.91",cy:"214.468",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"275.91",cy:"217.118",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"287.214",cy:"214.468",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"287.214",cy:"217.118",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"278.737",cy:"214.468",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"278.737",cy:"217.118",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"290.04",cy:"214.468",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"290.04",cy:"217.118",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"344.462",cy:"214.468",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"344.462",cy:"217.118",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"355.765",cy:"214.468",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"355.765",cy:"217.118",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"347.29",cy:"214.468",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"347.29",cy:"217.118",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"358.592",cy:"214.468",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"358.592",cy:"217.118",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"350.114",cy:"214.468",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"350.114",cy:"217.118",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"361.418",cy:"214.468",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"361.418",cy:"217.118",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"352.941",cy:"214.468",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"352.941",cy:"217.118",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"364.244",cy:"214.468",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"364.244",cy:"217.118",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"344.462",cy:"235.668",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"344.462",cy:"238.318",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"355.765",cy:"235.668",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"355.765",cy:"238.318",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"347.29",cy:"235.668",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"347.29",cy:"238.318",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"358.592",cy:"235.668",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"358.592",cy:"238.318",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"350.114",cy:"235.668",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"350.114",cy:"238.318",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"361.418",cy:"235.668",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"361.418",cy:"238.318",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"352.941",cy:"235.668",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"352.941",cy:"238.318",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"364.244",cy:"235.668",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"364.244",cy:"238.318",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"359.918",cy:"226.393",r:"4.45833",stroke:n.c001174,strokeWidth:"0.8"}),e.jsx("circle",{cx:"359.918",cy:"226.393",r:"2.20833",fill:n.cE7EAE9}),e.jsx("rect",{x:"269.726",y:"221.885",width:"36.4",height:"9.01667",rx:"0.65",fill:n.cE7EAE9,stroke:n.c001174,strokeWidth:"0.7"}),e.jsx("rect",{x:"310.537",y:"221.885",width:"6.54333",height:"9.01667",rx:"0.65",fill:n.cE7EAE9,stroke:n.c001174,strokeWidth:"0.7"}),e.jsx("rect",{x:"321.312",y:"221.885",width:"6.54333",height:"9.01667",rx:"0.65",fill:n.cE7EAE9,stroke:n.c001174,strokeWidth:"0.7"}),e.jsx("rect",{x:"332.089",y:"221.885",width:"6.54333",height:"9.01667",rx:"0.65",fill:n.cE7EAE9,stroke:n.c001174,strokeWidth:"0.7"}),e.jsx("rect",{x:"342.864",y:"221.885",width:"6.54333",height:"9.01667",rx:"0.65",fill:n.cE7EAE9,stroke:n.c001174,strokeWidth:"0.7"}),e.jsx("circle",{cx:"270.258",cy:"250.685",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"270.258",cy:"253.335",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"281.561",cy:"250.685",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"281.561",cy:"253.335",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"273.085",cy:"250.685",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"273.085",cy:"253.335",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"284.388",cy:"250.685",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"284.388",cy:"253.335",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"275.91",cy:"250.685",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"275.91",cy:"253.335",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"287.214",cy:"250.685",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"287.214",cy:"253.335",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"278.737",cy:"250.685",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"278.737",cy:"253.335",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"290.04",cy:"250.685",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"290.04",cy:"253.335",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"344.462",cy:"250.685",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"344.462",cy:"253.335",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"355.765",cy:"250.685",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"355.765",cy:"253.335",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"347.29",cy:"250.685",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"347.29",cy:"253.335",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"358.592",cy:"250.685",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"358.592",cy:"253.335",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"350.114",cy:"250.685",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"350.114",cy:"253.335",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"361.418",cy:"250.685",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"361.418",cy:"253.335",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"352.941",cy:"250.685",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"352.941",cy:"253.335",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"364.244",cy:"250.685",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"364.244",cy:"253.335",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"344.462",cy:"271.885",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"344.462",cy:"274.535",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"355.765",cy:"271.885",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"355.765",cy:"274.535",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"347.29",cy:"271.885",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"347.29",cy:"274.535",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"358.592",cy:"271.885",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"358.592",cy:"274.535",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"350.114",cy:"271.885",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"350.114",cy:"274.535",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"361.418",cy:"271.885",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"361.418",cy:"274.535",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"352.941",cy:"271.885",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"352.941",cy:"274.535",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"364.244",cy:"271.885",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"364.244",cy:"274.535",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"359.918",cy:"262.61",r:"4.45833",stroke:n.c001174,strokeWidth:"0.8"}),e.jsx("circle",{cx:"359.918",cy:"262.61",r:"2.20833",fill:n.cE7EAE9}),e.jsx("rect",{x:"269.726",y:"258.102",width:"36.4",height:"9.01667",rx:"0.65",fill:n.cE7EAE9,stroke:n.c001174,strokeWidth:"0.7"}),e.jsx("rect",{x:"310.537",y:"258.102",width:"6.54333",height:"9.01667",rx:"0.65",fill:n.cE7EAE9,stroke:n.c001174,strokeWidth:"0.7"}),e.jsx("rect",{x:"321.312",y:"258.102",width:"6.54333",height:"9.01667",rx:"0.65",fill:n.cE7EAE9,stroke:n.c001174,strokeWidth:"0.7"}),e.jsx("rect",{x:"332.089",y:"258.102",width:"6.54333",height:"9.01667",rx:"0.65",fill:n.cE7EAE9,stroke:n.c001174,strokeWidth:"0.7"}),e.jsx("rect",{x:"342.864",y:"258.102",width:"6.54333",height:"9.01667",rx:"0.65",fill:n.cE7EAE9,stroke:n.c001174,strokeWidth:"0.7"}),e.jsx("rect",{x:"270.261",y:"200.336",width:"8.83333",height:"6.18333",fill:n.cFFFFFF}),e.jsx("rect",{x:"270.261",y:"235.668",width:"8.83333",height:"6.18333",fill:n.cFFFFFF}),e.jsx("rect",{x:"270.261",y:"271.885",width:"8.83333",height:"6.18333",fill:n.cFFFFFF}),e.jsx("rect",{x:"279.095",y:"200.336",width:"26.5",height:"6.18333",fill:n.cDEECF8}),e.jsx("rect",{x:"279.095",y:"235.668",width:"26.5",height:"6.18333",fill:n.cDEECF8}),e.jsx("rect",{x:"279.095",y:"271.885",width:"26.5",height:"6.18333",fill:n.cDEECF8}),e.jsx("path",{d:"M268.053 210.494C268.483 209.112 268.564 208.343 268.053 206.961H362.569C361.955 208.363 361.972 209.136 362.569 210.494H268.053Z",fill:n.c000D58,stroke:n.c001174}),e.jsx("path",{d:"M268.053 246.269C268.483 244.887 268.564 244.118 268.053 242.736H362.569C361.955 244.138 361.972 244.911 362.569 246.269H268.053Z",fill:n.c000D58,stroke:n.c001174}),e.jsx("path",{d:"M283.312 130.775C283.312 129.64 283.987 128.72 284.82 128.72H349.805C350.638 128.72 351.312 129.64 351.312 130.775V169.72H283.312V130.775Z",fill:n.cFFFFFF,stroke:n.c48504C,strokeWidth:"2"}),e.jsx("path",{d:"M279.574 171.847C279.381 171.283 279.267 170.624 279.33 169.72H355.195C355.423 170.925 355.287 171.695 355.063 172.241C354.834 172.802 354.506 173.186 354.101 173.66C354.084 173.68 354.067 173.7 354.05 173.72H280.503C280.468 173.658 280.434 173.598 280.4 173.539C280.051 172.922 279.774 172.434 279.574 171.847Z",stroke:n.c48504C,strokeWidth:"2"}),e.jsx("path",{d:"M350.312 133.72V129.726L284.812 129.72C284.312 129.726 284.312 129.726 284.312 130.125V133.72H350.312Z",fill:n.cD6D6D6}),e.jsx("circle",{cx:"287.212",cy:"131.62",r:"0.9",fill:n.c28AC6E}),e.jsx("circle",{cx:"289.812",cy:"131.62",r:"0.9",fill:n.cC9184A}),e.jsx("circle",{cx:"292.412",cy:"131.62",r:"0.9",fill:n.cFFE18B}),e.jsx("rect",{x:"315.312",y:"133.72",width:"35",height:"35",fill:n.c90CAF9}),e.jsx("path",{d:"M319.312 153.22H341.312",stroke:n.cFFFFFF,strokeWidth:"1.3",strokeLinecap:"round"}),e.jsx("path",{d:"M288.312 150.72H310.312",stroke:n.c001174,strokeWidth:"1.3",strokeLinecap:"round"}),e.jsx("path",{d:"M319.312 156.22H336.312",stroke:n.cFFFFFF,strokeWidth:"1.3",strokeLinecap:"round"}),e.jsx("path",{d:"M288.312 153.72H305.312",stroke:n.c001174,strokeWidth:"1.3",strokeLinecap:"round"}),e.jsx("path",{d:"M319.312 159.22H336.312",stroke:n.cFFFFFF,strokeWidth:"1.3",strokeLinecap:"round"}),e.jsx("path",{d:"M288.312 156.72H305.312",stroke:n.c001174,strokeWidth:"1.3",strokeLinecap:"round"}),e.jsx("path",{d:"M337.312 139.72L328.312 148.72M328.313 139.72L337.313 148.72",stroke:n.cFFFFFF,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})}function oo({onClick:r}){const t=$.useMediaQuery("md");return e.jsxs(y.Box,{height:"height-screen",fullWidth:!0,display:"flex",align:"center",justify:"center",gap:"md",overflow:"overflow-hidden",children:[e.jsx(lo,{width:t?600:300}),e.jsx(v.Text,{fontWeight:"bold",fontSize:t?"3xl":"2xl",textAlign:"center",children:"Server Problem"}),e.jsx(v.Text,{fontWeight:"semibold",fontSize:t?"lg":"md",textAlign:"center",children:"we are trying to fix the problem"}),r&&e.jsx(A.Button,{size:t?"md":"xs",onClick:r,children:"Go Back"})]})}const co=r=>{var l,c,o,i,h;const t=$.useMediaQuery("md");return e.jsxs(fe.Dialog,{isShow:r.isShow,onHide:r.onHide,style:{...t?{minWidth:r.customMinWidth||"458px"}:{maxWidth:r.customMinWidth||"458px"}},children:[e.jsx(fe.DialogTitle,{...r.dialogTitleProps,children:typeof r.title=="string"?e.jsx(v.Text,{fontSize:"lg",fontWeight:"medium",children:r.title}):r.title}),e.jsx(fe.DialogBody,{children:typeof r.description=="string"?e.jsx(v.Text,{fontSize:"md",lineHeight:"leading-6",color:"tertiary",children:r.description}):r.description}),e.jsx(fe.DialogFooter,{children:e.jsx(y.Box,{display:"flex",direction:((l=r.containerConfirmBtnProps)==null?void 0:l.direction)||"row",justify:((c=r.containerConfirmBtnProps)==null?void 0:c.justify)||"flex-end",...r.containerConfirmBtnProps,children:e.jsxs(y.Box,{display:"flex",direction:((o=r.wrapperConfirmBtnProps)==null?void 0:o.direction)||"row",justify:((i=r.wrapperConfirmBtnProps)==null?void 0:i.justify)||"flex-end",gap:((h=r.wrapperConfirmBtnProps)==null?void 0:h.gap)||"sm",...r.wrapperConfirmBtnProps,children:[r.onCancel&&e.jsx(A.Button,{secondary:!0,onClick:r.onCancel,size:"md",fullWidth:!0,children:r.titleCancelBtn||"Cancel"}),e.jsx(y.Box,{fullWidth:!0,style:{textWrap:"nowrap"},children:e.jsx(A.Button,{...r.buttonConfirmProps,onClick:r.onConfirm,size:"md",fullWidth:!0,children:r.titleConfirmBtn||"Ok"})})]})})})]},r.key)},io=g.memo(({children:r,height:t,minHeight:l,customHeight:c,paddingInline:o="spacing-0",paddingBlock:i="spacing-0",header:h,footer:s,title:f,titleTag:d,action:u,actionContainer:p,containerProps:C,bodyProps:b,headerProps:B={borderBottom:!0},footerProps:D={borderTop:!0},variantTag:H="info"})=>{const Z=g.useRef(null),[P,J]=g.useState("100vh");g.useEffect(()=>{const W=()=>{if(Z.current){const X=Z.current.getBoundingClientRect().top;J(`calc(100vh - ${X}px)`)}};return W(),window.addEventListener("resize",W),()=>window.removeEventListener("resize",W)},[]);const L=()=>d?e.jsxs(y.Box,{direction:"row",gap:"sm",align:"center",children:[e.jsx(v.Text,{fontWeight:"medium",children:f}),e.jsx(we.Badges,{border:!0,text:d,variant:H})]}):e.jsx(v.Text,{fontWeight:"medium",children:f}),ae=()=>h||e.jsxs(y.Box,{direction:"row",justify:"space-between",align:"flex-start",gap:"md",children:[e.jsx(y.Box,{children:f?L():null}),e.jsx(y.Box,{...p,children:u??null})]}),Y=!!(h||f||u);return e.jsxs(y.Box,{ref:Z,height:t,customMinHeight:l,customHeight:c,paddingBlock:i,paddingInline:o,bg:"white",direction:"column",...C,style:{backgroundColor:"var(--sa-background-primary, #ffffff)",display:"flex",minHeight:P,...(C==null?void 0:C.style)??{}},children:[h!==null&&Y?e.jsx(Cr,{...B,children:ae()}):null,e.jsx(y.Box,{padding:"spacing-0",...b,style:{flex:1,overflow:"auto",...(b==null?void 0:b.style)??{}},children:r}),s?e.jsx(xr,{...D,children:s}):null]})}),no=g.memo(({value:r,options:t=[],onChange:l,multiple:c})=>{const o=(r==null?void 0:r.map(s=>s.value))||[],i=(t==null?void 0:t.filter(s=>o.includes(s.value)))||[],h=s=>{const f=[...i];let d=[];c?d=o.includes(s.value)?f.filter(u=>u.value!==s.value):[...f,s]:d=[s],l==null||l(d)};return e.jsx(y.Box,{direction:"row",gap:"sm",flexWrap:"wrap",children:t==null?void 0:t.map((s,f)=>e.jsx(A.Button,{...o.includes(s.value)?{primary:!0}:{secondary:!0},onClick:()=>h(s),children:s.label},f))})});function Je(r){return null}Je.displayName="LayoutDialog.Header";function Ye(r){return null}Ye.displayName="LayoutDialog.Body";function Xe(r){return null}Xe.displayName="LayoutDialog.Aside";function Ke(r){return null}Ke.displayName="LayoutDialog.Footer";const ee={"lyd-root":"_lyd-root_1e92c_1","lyd-backdrop":"_lyd-backdrop_1e92c_28","lyd-panel":"_lyd-panel_1e92c_37","lyd-modal":"_lyd-modal_1e92c_48","lyd-fullscreen":"_lyd-fullscreen_1e92c_58","lyd-sidebar":"_lyd-sidebar_1e92c_66","lyd-header":"_lyd-header_1e92c_94","lyd-header-content":"_lyd-header-content_1e92c_105","lyd-header-actions":"_lyd-header-actions_1e92c_113","lyd-main":"_lyd-main_1e92c_120","lyd-body":"_lyd-body_1e92c_127","lyd-aside":"_lyd-aside_1e92c_133","lyd-footer":"_lyd-footer_1e92c_149","lyd-vm-group":"_lyd-vm-group_1e92c_162","lyd-vm-btn":"_lyd-vm-btn_1e92c_170","lyd-close-btn":"_lyd-close-btn_1e92c_193"},ao=[{mode:"sidebar",label:"Sidebar",icon:e.jsx(ho,{})},{mode:"modal",label:"Modal",icon:e.jsx(S.Icon,{name:"Newscreen",size:"sm"})},{mode:"fullscreen",label:"Fullscreen",icon:e.jsx(S.Icon,{name:"Fullscreen",size:"sm"})}];function so({value:r,onChange:t}){return e.jsx("div",{className:ee["lyd-vm-group"],role:"group","aria-label":"View mode",children:ao.map(l=>e.jsx("button",{type:"button",className:ee["lyd-vm-btn"],"data-active":r===l.mode,"aria-label":`Switch to ${l.label} view`,"aria-pressed":r===l.mode,onClick:()=>t(l.mode),children:l.icon},l.mode))})}function ho(){return e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[e.jsx("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),e.jsx("line",{x1:"15",y1:"4",x2:"15",y2:"20"})]})}const wr={md:"768px",lg:"1024px",xl:"1200px","2xl":"1440px"};function fo(r){return r?r in wr?wr[r]:r:wr.xl}function $e(r,t){let l=null;return g.Children.forEach(r,c=>{g.isValidElement(c)&&c.type===t&&(l=c.props.children??null)}),l}function go(r){const{isOpen:t,onClose:l,viewMode:c,defaultViewMode:o="modal",onViewModeChange:i,showViewModeToggle:h=!0,showCloseButton:s=!0,size:f,asideWidth:d,disableEscapeClose:u=!1,disableBackdropClose:p=!1,lockBodyScroll:C=!0,children:b}=r,[B,D]=g.useState(o),H=c??B,P=$.useMediaQuery("md")?H:"fullscreen",J=g.useCallback(K=>{c===void 0&&D(K),i==null||i(K)},[c,i]),L=g.useRef(null);g.useEffect(()=>{if(!(!t||!C))return L.current=document.body.style.overflow,document.body.style.overflow="hidden",()=>{document.body.style.overflow=L.current??""}},[t,C]),g.useEffect(()=>{if(!t||u)return;const K=re=>{re.key==="Escape"&&l()};return window.addEventListener("keydown",K),()=>window.removeEventListener("keydown",K)},[t,u,l]);const ae=g.useMemo(()=>$e(b,Je),[b]),Y=g.useMemo(()=>$e(b,Ye),[b]),W=g.useMemo(()=>$e(b,Xe),[b]),X=g.useMemo(()=>$e(b,Ke),[b]);if(!t)return null;const ie=[ee["lyd-panel"],P==="modal"&&ee["lyd-modal"],P==="fullscreen"&&ee["lyd-fullscreen"],P==="sidebar"&&ee["lyd-sidebar"]].filter(Boolean).join(" "),ne={"--lyd-max-w":fo(f),...d!==void 0&&{"--lyd-aside-w":d}},q=()=>{p||l()};return e.jsxs("div",{className:ee["lyd-root"],style:ne,role:"dialog","aria-modal":"true",children:[e.jsx("div",{className:ee["lyd-backdrop"],onClick:q,"aria-hidden":"true"}),e.jsxs("div",{className:ie,children:[e.jsxs("div",{className:ee["lyd-header"],children:[e.jsx("div",{className:ee["lyd-header-content"],children:ae}),e.jsxs("div",{className:ee["lyd-header-actions"],children:[h&&e.jsx(so,{value:H,onChange:J}),s&&e.jsx("button",{type:"button",className:ee["lyd-close-btn"],onClick:l,"aria-label":"Close dialog",children:e.jsx(S.Icon,{name:"Cross",size:"md"})})]})]}),e.jsxs("div",{className:ee["lyd-main"],children:[e.jsx("div",{className:ee["lyd-body"],children:Y}),W&&e.jsx("aside",{className:ee["lyd-aside"],children:W})]}),X&&e.jsx("div",{className:ee["lyd-footer"],children:X})]})]})}const Ae=go;Ae.Header=Je,Ae.Body=Ye,Ae.Aside=Xe,Ae.Footer=Ke;function yo({url:r,filename:t,onClose:l}){return g.useEffect(()=>{const c=o=>{o.key==="Escape"&&l()};return window.addEventListener("keydown",c),()=>window.removeEventListener("keydown",c)},[l]),e.jsxs("div",{onClick:l,style:{position:"fixed",inset:0,zIndex:9999,backgroundColor:"rgba(0,0,0,0.85)",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"12px"},children:[e.jsxs("div",{onClick:c=>c.stopPropagation(),style:{position:"absolute",top:"16px",right:"16px",display:"flex",gap:"8px"},children:[e.jsx("a",{href:r,download:t,style:{display:"inline-flex",alignItems:"center",gap:"6px",padding:"6px 12px",backgroundColor:"rgba(255,255,255,0.15)",color:"#fff",borderRadius:"var(--sa-radii-sm, 6px)",fontSize:"13px",textDecoration:"none",backdropFilter:"blur(4px)"},children:"Download"}),e.jsx("button",{onClick:l,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",backgroundColor:"rgba(255,255,255,0.15)",border:"none",borderRadius:"var(--sa-radii-sm, 6px)",color:"#fff",cursor:"pointer",backdropFilter:"blur(4px)"},"aria-label":"Close preview",children:"✕"})]}),e.jsx("img",{src:r,alt:t,onClick:c=>c.stopPropagation(),style:{maxWidth:"90vw",maxHeight:"85vh",objectFit:"contain",borderRadius:"var(--sa-radii-sm, 6px)",boxShadow:"var(--sa-shadow-lg, 0 25px 50px rgba(0,0,0,0.5))"}}),e.jsx("span",{style:{color:"rgba(255,255,255,0.6)",fontSize:"12px"},children:t})]})}const uo=r=>{const{defaultTab:t=0,paramKey:l="tab"}=r||{},[c,o]=G.useSearchParams(),i=Ee.searchParamsToObject(c.toString());return{activeTab:i[l]?parseInt(i[l]):t,handleTabChange:f=>{o({...i,[l]:f.toString()})},searchQueries:i}};function po({appName:r,menuConfig:t,formatTitle:l}){const c=G.useLocation();g.useEffect(()=>{let o=null,i=null;for(const f of t){const d=f.items.find(u=>u.to?u.to==="/"?c.pathname==="/":!!(u.to===c.pathname||c.pathname.startsWith(u.to+"/")):!1);if(d){o=d,i=f;break}}const h=[];o!=null&&o.title&&h.push(o.title),i!=null&&i.name&&h.push(i.name.toTitleCase());const s=(f,d)=>f.length>0?`${f.join(" - ")} | ${d}`:d;document.title=(l||s)(h,r)},[c.pathname])}const Co=()=>{const[r,t]=G.useSearchParams(),l=Ee.searchParamsToObject(r.toString()),c=G.useParams(),o=G.useLocation(),i=c.id;return{setSearchParams:t,searchParams:r,searchQueries:l,isHasQuery:(u,p)=>r.has(u)&&r.get(u)===p,getQueryParam:u=>r.get(u),getRouteParam:u=>c[u],params:c,location:o,id:i,hasId:!!i}};function xo(r){var c,o;const t=r.decodedAccessToken;return g.useMemo(()=>{var f,d;const i=((d=(f=t==null?void 0:t.access)==null?void 0:f.role)==null?void 0:d.code)??"",h=Object.keys(r.role).reduce((u,p)=>{const C=`is${p.toLowerCase().replace(/(^\w|_\w)/g,b=>b.replace("_","").toUpperCase())}`;return{...u,[C]:!1}},{});return{...Object.keys(r.role).reduce((u,p)=>{const C=`is${p.toLowerCase().replace(/(^\w|_\w)/g,b=>b.replace("_","").toUpperCase())}`;return{...u,[C]:i===r.role[p]}},h),hasRole:u=>i===r.role[u],getRoleKey:()=>i}},[(o=(c=t==null?void 0:t.access)==null?void 0:c.role)==null?void 0:o.code,r])}a.ActionMenu=Qt,a.AdvanceFilterBar=nt,a.App=wt,a.AppComponent=Vr,a.AppContext=dr,a.AppLayout=Bt,a.AsideBar=Ul,a.BackButton=Mt,a.ColumnFilterDropdown=ht,a.ConfirmationDialog=co,a.DataTable=gt,a.DecisionWrapper=V,a.EachUtils=Ue,a.EmptyStatePage=$l,a.FilterDrawer=it,a.FloatingFooter=Jl,a.ForbiddenPage=to,a.Form=Gl,a.FullSection=io,a.HeaderLeftSlot=bt,a.HeaderLeftSlotOutlet=Nr,a.HeaderLeftSlotProvider=jr,a.HorizontalField=Wt,a.ImagePreview=yo,a.InputFile=ut,a.InputImage=Ct,a.LayoutDialog=Ae,a.LayoutDialogAside=Xe,a.LayoutDialogBody=Ye,a.LayoutDialogFooter=Ke,a.LayoutDialogHeader=Je,a.ModuleSwitcher=Lt,a.ModuleSwitcherModal=$r,a.NotFoundPage=eo,a.PageLayout=At,a.Pressable=He,a.RightDrawer=et,a.ScrollToTopButton=xt,a.Section=Nt,a.SectionFooter=xr,a.SectionHeader=Cr,a.SelectButton=no,a.ServerErrorPage=oo,a.SidebarBadgesProvider=Hr,a.SidebarGroupSlot=St,a.SidebarGroupSlotOutlet=_r,a.SidebarGroupSlotProvider=Pr,a.SidebarHeaderSlot=zr,a.TableFooter=dt,a.TableHeader=st,a.TableSection=ol,a.TableWrapper=at,a.ToggleStatus=Ql,a.Typography=ge,a.VerticalField=Yl,a.clearModuleSelection=Ft,a.createInitialFromUserName=sl,a.cssVars=ul,a.formHasChanged=wl,a.formatDate=gl,a.formatDateToIndonesian=yt,a.formatRupiah=hl,a.getDateFilterValue=Kt,a.getDateRangeFilterValue=Xt,a.getInitials=fl,a.getValueDropdownMultipleFilter=Jt,a.getValueRadioFilter=Yt,a.getValueSearch=ct,a.getValuesFilter=Ge,a.handleChangeFilter=vr,a.handleOnScroll=Ol,a.isEmail=El,a.isFilterActive=$t,a.isOnlyLettersAndSpaces=Sl,a.isPhoneNumber=bl,a.isSlug=Ml,a.oneDayInMs=pl,a.parseIndonesianDateToDate=dl,a.preventNonCoordinateInput=Ll,a.preventNonNumberAndDecimalInput=kl,a.preventNonNumberInput=Fl,a.preventNumberInput=Bl,a.resolveDateRangeValueToString=lt,a.resolveDateValueToString=ot,a.resolveDropdownValueToString=rt,a.resolveRadioValueToString=tt,a.resolveSidebarBadge=_e,a.textWidth=Cl,a.useApp=hr,a.useAppState=Wr,a.useAuthRole=xo,a.useDynamicTitle=po,a.useModuleSelection=ur,a.useRouteInfo=Qe,a.useRouteParams=Co,a.useSidebarBadges=Ar,a.useTabState=uo,Object.keys(Be).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>Be[r]})}),Object.keys(we).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>we[r]})}),Object.keys(y).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>y[r]})}),Object.keys(ke).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>ke[r]})}),Object.keys(A).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>A[r]})}),Object.keys(Fr).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>Fr[r]})}),Object.keys(or).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>or[r]})}),Object.keys(fe).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>fe[r]})}),Object.keys(cr).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>cr[r]})}),Object.keys(me).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>me[r]})}),Object.keys($).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>$[r]})}),Object.keys(Ee).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>Ee[r]})}),Object.keys(We).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>We[r]})}),Object.keys(oe).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>oe[r]})}),Object.keys(ir).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>ir[r]})}),Object.keys(Br).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>Br[r]})}),Object.keys(Q).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>Q[r]})}),Object.keys(kr).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>kr[r]})}),Object.keys(nr).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>nr[r]})}),Object.keys(Me).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>Me[r]})}),Object.keys(Er).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>Er[r]})}),Object.keys(Pe).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>Pe[r]})}),Object.keys(ce).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>ce[r]})}),Object.keys(Ie).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>Ie[r]})}),Object.keys(ar).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>ar[r]})}),Object.keys(v).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>v[r]})}),Object.keys(S).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>S[r]})}),Object.keys(N).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>N[r]})}),Object.keys(Mr).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>Mr[r]})}),Object.keys(Lr).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>Lr[r]})}),Object.keys(Or).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>Or[r]})}),Object.keys(Tr).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>Tr[r]})}),Object.keys(be).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>be[r]})}),Object.keys(mr).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>mr[r]})}),Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(a,Be){typeof exports=="object"&&typeof module<"u"?Be(exports,require("@starasia/alert"),require("@starasia/badges"),require("@starasia/box"),require("@starasia/breadcrumb"),require("@starasia/button"),require("@starasia/card"),require("@starasia/date"),require("@starasia/dialog"),require("@starasia/drawer"),require("@starasia/dropdown"),require("@starasia/hooks"),require("@starasia/http"),require("@starasia/input"),require("@starasia/menu"),require("@starasia/pagination"),require("@starasia/storage"),require("@starasia/table"),require("@starasia/tabs"),require("@starasia/textarea"),require("@starasia/theme"),require("@starasia/toast"),require("@starasia/toggle"),require("@starasia/tooltip"),require("@starasia/checkbox"),require("@starasia/radio"),require("@starasia/text"),require("@starasia/icon"),require("@starasia/flex"),require("@starasia/progress"),require("@starasia/stepper"),require("@starasia/accordion"),require("@starasia/story-record"),require("@starasia/skeleton"),require("@starasia/progress-stepper"),require("react/jsx-runtime"),require("react"),require("react-router"),require("react-dom"),require("react-easy-crop")):typeof define=="function"&&define.amd?define(["exports","@starasia/alert","@starasia/badges","@starasia/box","@starasia/breadcrumb","@starasia/button","@starasia/card","@starasia/date","@starasia/dialog","@starasia/drawer","@starasia/dropdown","@starasia/hooks","@starasia/http","@starasia/input","@starasia/menu","@starasia/pagination","@starasia/storage","@starasia/table","@starasia/tabs","@starasia/textarea","@starasia/theme","@starasia/toast","@starasia/toggle","@starasia/tooltip","@starasia/checkbox","@starasia/radio","@starasia/text","@starasia/icon","@starasia/flex","@starasia/progress","@starasia/stepper","@starasia/accordion","@starasia/story-record","@starasia/skeleton","@starasia/progress-stepper","react/jsx-runtime","react","react-router","react-dom","react-easy-crop"],Be):(a=typeof globalThis<"u"?globalThis:a||self,Be(a["@starasia/admin"]={},a.alert,a.badges,a.box,a.breadcrumb,a.button,a.card,a.date,a.dialog,a.drawer,a.dropdown,a.hooks,a.http,a.input,a.menu,a.pagination,a.storage,a.table,a.tabs,a.textarea,a.theme,a.toast,a.toggle,a.tooltip,a.checkbox,a.radio,a.text,a.icon,a.flex,a.progress,a.stepper,a.accordion,a.storyRecord,a.skeleton,a.progressStepper,a.jsxRuntime,a.React,a.ReactRouter,a.ReactDOM,a.ReactEasyCrop))})(this,function(a,Be,be,y,ke,A,Br,or,ge,cr,me,$,Ee,Ie,ie,ir,kr,Q,Er,nr,Me,Mr,_e,ce,We,ar,v,S,N,Lr,Tr,Or,mr,Se,Ir,e,g,G,sr,wt){"use strict";const St={menus:[],menuBottom:void 0,logo:"",appName:"Workspace",userData:null,setUserData:()=>{}},dr=g.createContext(St),hr=()=>g.useContext(dr),Wr=r=>{const[t,l]=g.useState((r==null?void 0:r.initialUserData)||null);return{userData:t,setUserData:l}},Hr=g.createContext({badges:{},setBadge:()=>{},setBadges:()=>{},clearBadge:()=>{}}),Ar=({children:r})=>{const[t,l]=g.useState({}),c=g.useCallback(s=>{l(f=>typeof s=="function"?s(f):s)},[]),o=g.useCallback((s,f)=>{l(d=>{const u=typeof f=="function"?f(d[s]):f;return{...d,[s]:u}})},[]),i=g.useCallback(s=>{l(f=>{if(!(s in f))return f;const d={...f};return delete d[s],d})},[]),h=g.useMemo(()=>({badges:t,setBadge:o,setBadges:c,clearBadge:i}),[t,o,c,i]);return e.jsx(Hr.Provider,{value:h,children:r})},Vr=()=>g.useContext(Hr),Ze=(r,t)=>{const l=t!==void 0?t:r;return l==null?null:typeof l=="string"||typeof l=="number"?{value:l}:l},zr=({router:r,menus:t=[],menuBottom:l,logo:c,appName:o="Workspace",initialUserData:i,theme:h})=>{const s=Wr({initialUserData:i}),{theme:f}=Me.useTheme();return e.jsx(dr.Provider,{value:{logo:c,appName:o,menus:t,userData:s.userData,setUserData:s.setUserData,menuBottom:l},children:e.jsx(Ar,{children:h?e.jsx(Me.ThemeProvider,{value:h,children:r}):f?e.jsx(Me.ThemeProvider,{value:f,children:r}):r})})},Ft=g.memo(zr);function jr({collapsed:r=!1,children:t}){if(!t)return null;const l=typeof t=="function",c=l?t({collapsed:r}):t;return c==null||c===!1?null:e.jsx("div",{style:{position:"sticky",top:"4rem",zIndex:1,borderBottom:"1px solid var(--sa-border-subtle, #0b120e24)",paddingLeft:"0.5rem",paddingRight:"0.5rem",paddingTop:"0.5rem",paddingBottom:"0.5rem",boxSizing:"border-box"},children:l?c:e.jsx("div",{style:{opacity:r?0:1,transition:"opacity 0.3s",visibility:r?"hidden":"visible"},children:c})})}const fr=g.createContext(null);function Nr({children:r}){const[t,l]=g.useState(null),[c,o]=g.useState(null),[i,h]=g.useState(null),[s,f]=g.useState(0),d=g.useCallback(()=>(f(u=>u+1),()=>f(u=>u-1)),[]);return e.jsx(fr.Provider,{value:{prependNode:t,appendNode:c,replaceNode:i,setPrependNode:l,setAppendNode:o,setReplaceNode:h,replaceCount:s,registerReplace:d},children:r})}function Pr({children:r}){const t=g.useContext(fr);return t?e.jsxs(e.Fragment,{children:[e.jsx("div",{ref:t.setPrependNode,style:{display:"contents"}}),t.replaceCount>0?e.jsx("div",{ref:t.setReplaceNode,style:{display:"contents"}}):r,e.jsx("div",{ref:t.setAppendNode,style:{display:"contents"}})]}):e.jsx(e.Fragment,{children:r})}function Bt({children:r,mode:t="append"}){const l=g.useContext(fr);if(g.useEffect(()=>{if(!(t!=="replace"||!l))return l.registerReplace()},[t,l]),!l)return process.env.NODE_ENV!=="production"&&console.warn("[HeaderLeftSlot] used outside AppLayout — content not rendered"),null;const c=t==="prepend"?l.prependNode:t==="replace"?l.replaceNode:l.appendNode;return c?sr.createPortal(r,c):null}const gr=g.createContext(null);function _r({children:r}){const[t,l]=g.useState({}),[c,o]=g.useState({}),i=g.useCallback((f,d)=>{l(u=>u[f]===d?u:{...u,[f]:d})},[]),h=g.useCallback(f=>(o(d=>({...d,[f]:(d[f]??0)+1})),()=>o(d=>({...d,[f]:Math.max(0,(d[f]??0)-1)}))),[]),s=g.useMemo(()=>({outletNodes:t,setOutletNode:i,slotCounts:c,registerSlot:h}),[t,i,c,h]);return e.jsx(gr.Provider,{value:s,children:r})}function Zr({slotKey:r,fallback:t}){const l=g.useContext(gr),c=l?(l.slotCounts[r]??0)>0:!1,o=g.useRef(l==null?void 0:l.setOutletNode);o.current=l==null?void 0:l.setOutletNode;const i=g.useCallback(h=>{var s;return(s=o.current)==null?void 0:s.call(o,r,h)},[r]);return e.jsx(e.Fragment,{children:c?e.jsx("div",{ref:i,style:{display:"contents"}}):t})}function kt({slotKey:r,children:t}){const l=g.useContext(gr),c=g.useRef(l==null?void 0:l.registerSlot);if(c.current=l==null?void 0:l.registerSlot,g.useEffect(()=>{var i;return(i=c.current)==null?void 0:i.call(c,r)},[r]),!l)return process.env.NODE_ENV!=="production"&&console.warn("[SidebarGroupSlot] used outside AppLayout — content not rendered"),null;const o=l.outletNodes[r];return o?sr.createPortal(t,o):null}const qe="moduleSwitcherGroupId",yr="sa-module-switcher-change";function qr(){if(typeof window>"u")return null;const r=window.localStorage.getItem(qe);if(r===null)return null;const t=Number(r);return Number.isFinite(t)?t:null}function Qr(r){typeof window>"u"||(r===null?window.localStorage.removeItem(qe):window.localStorage.setItem(qe,String(r)),window.dispatchEvent(new CustomEvent(yr,{detail:r})))}function Et(){Qr(null)}function ur(){const[r,t]=g.useState(()=>qr());return g.useEffect(()=>{const c=()=>{t(qr())},o=i=>{i.key===qe&&c()};return window.addEventListener(yr,c),window.addEventListener("storage",o),()=>{window.removeEventListener(yr,c),window.removeEventListener("storage",o)}},[]),{selectedGroupId:r,setSelectedGroupId:c=>{Qr(c),t(c)}}}let Qe=0,Fe=!1,Gr=new Set;const Ur=()=>e.jsxs("svg",{width:"100%",height:"100%",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[e.jsx("rect",{x:"1.667",y:"1.667",width:"12.667",height:"12.667",rx:"2"}),e.jsx("line",{x1:"6",y1:"1.667",x2:"6",y2:"14.333"})]}),Jr={width:"100%",display:"flex",alignItems:"center",gap:"0.75rem",paddingLeft:"0.75rem",paddingRight:"0.75rem",paddingTop:"0.5rem",paddingBottom:"0.5rem",fontSize:"0.875rem",color:"var(--sa-text-subtle, #8c8f97)",background:"transparent",border:"none",borderRadius:"0.375rem",cursor:"pointer",textAlign:"left"};function Mt({children:r,headerLeftSlot:t,profile:l,isLoadingProfile:c,onLogout:o,isLoggingOut:i,loadingComponent:h,sidebarHeaderContent:s,headerActions:f,profileRole:d,profileMenuButtons:u,profileMenuItems:p,logoutButton:C}){var Te,lr;const[w]=G.useSearchParams(),B=w.get("embed")==="true",D=hr(),{badges:H}=Vr(),Z=G.useNavigate(),P=G.useLocation(),T=!$.useMediaQuery("md"),[se,Y]=g.useState(!1),[W,X]=g.useState(!1),[ne,ae]=g.useState(!1),[q,K]=g.useState(!1),[te,de]=g.useState(()=>new Set(Gr)),[le,R]=g.useState(null),{selectedGroupId:z,setSelectedGroupId:j}=ur();g.useEffect(()=>{Gr=te},[te]);const ee=g.useRef(null),ue=g.useRef(null);g.useEffect(()=>{const x=ee.current;if(!x)return;const M=()=>{Fe||(Qe=x.scrollTop)};return x.addEventListener("scroll",M),()=>x.removeEventListener("scroll",M)},[]);const pe=()=>{const x=ee.current;x&&Qe>0&&(Fe=!0,x.scrollTop=Qe,requestAnimationFrame(()=>{Fe=!1}))};g.useLayoutEffect(()=>{Fe=!0,pe();const x=setTimeout(()=>{Fe=!1},300);return()=>clearTimeout(x)},[]),g.useLayoutEffect(()=>{D.menus.length>0&&(Qe>0?pe():requestAnimationFrame(()=>{var M;const x=(M=ee.current)==null?void 0:M.querySelector("[data-menu-active='true']");x&&x.scrollIntoView({block:"center",behavior:"instant"})}))},[D.menus]),g.useEffect(()=>{Fe=!0,pe();const x=setTimeout(pe,0),M=setTimeout(pe,50),O=setTimeout(pe,100),b=setTimeout(pe,200),k=setTimeout(()=>{Fe=!1},300),F=setTimeout(()=>{const E=ee.current,m=E==null?void 0:E.querySelector("[data-menu-active='true']");if(E&&m){const oe=E.getBoundingClientRect(),fe=m.getBoundingClientRect();fe.top>=oe.top&&fe.bottom<=oe.bottom||m.scrollIntoView({block:"center",behavior:"smooth"})}},250);return()=>{clearTimeout(x),clearTimeout(M),clearTimeout(O),clearTimeout(b),clearTimeout(k),clearTimeout(F)}},[P.pathname]),g.useEffect(()=>{ue.current&&(ue.current.scrollTop=0)},[P.pathname]),g.useEffect(()=>{T&&ae(!1)},[P.pathname,T]),g.useEffect(()=>{T&&X(!0)},[T]);const Ve=()=>{Y(!0)},er=()=>{Y(!1)},wr=()=>{Y(!1),o()},rr=x=>{const M=[x.to];return x.children&&M.push(...x.children.map(O=>O.to)),M},ze=[...D.menus.flatMap(x=>x.items.flatMap(rr)),...((Te=D.menuBottom)==null?void 0:Te.flatMap(rr))??[]],he=x=>{if(!P.pathname.startsWith(x))return!1;const M=ze.filter(O=>P.pathname.startsWith(O)).sort((O,b)=>b.length-O.length)[0];return x===M};g.useEffect(()=>{var M;const x=O=>{var b;(b=O.children)!=null&&b.some(k=>P.pathname.startsWith(k.to))&&de(k=>{const F=new Set(k);return F.add(O.id),F})};D.menus.forEach(O=>{O.items.forEach(x)}),(M=D.menuBottom)==null||M.forEach(x)},[P.pathname,D.menus,D.menuBottom]);const tr=x=>{de(M=>{const O=new Set(M);return O.has(x)?O.delete(x):O.add(x),O})};g.useEffect(()=>{D.menus.length!==0&&z!==null&&!D.menus.some(x=>x.id===z)&&j(null)},[D.menus,z,j]);const je=g.useMemo(()=>{if(z!==null)return D.menus.filter(O=>O.id===z||O.parentGroupId===z);const x=D.menus.filter(O=>O.parentGroupId===void 0),M=D.menus.filter(O=>O.parentGroupId!==void 0).flatMap(O=>O.items);return M.length===0?x:[...x,{id:18,name:"Pengaturan",items:M,parentGroupId:void 0}]},[D.menus,z]);if(B)return e.jsx("main",{style:{height:"100vh",overflowY:"auto",backgroundColor:"var(--sa-background-primary-inverse, #f8f8f8)"},children:r||e.jsx(G.Outlet,{})});const Le=x=>{const M=x.children&&x.children.length>0,O=te.has(x.id),b=M?x.children.some(E=>he(E.to)):he(x.to),k=Ze(x.badge,H[x.id]),F=!!k&&W&&!T;return e.jsxs("div",{"data-menu-active":b||void 0,children:[e.jsxs("button",{onClick:E=>{if(M)if(W&&!T){const m=E.currentTarget.getBoundingClientRect();R({item:x,top:m.top,left:m.right+8})}else tr(x.id);else Z(x.to)},style:{width:"100%",display:"flex",alignItems:"center",justifyContent:W&&!T?"center":void 0,gap:"0.5rem",paddingLeft:W&&!T?"0":"0.5rem",paddingRight:W&&!T?"0":"0.5rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",height:"2rem",borderRadius:b?"var(--sa-radii-sm, 0.375rem)":"var(--sa-radii-md, 0.5rem)",textAlign:"left",border:b?"1px solid var(--sa-border-subtle, #0b120e24)":"1px solid transparent",backgroundColor:b?"var(--sa-background-primary, #ffffff)":"transparent",color:"var(--sa-text-primary, #292a2e)",cursor:"pointer"},title:W&&!T?x.title:void 0,onMouseEnter:E=>{b||(E.currentTarget.style.backgroundColor="var(--sa-background-neutral, #f0f1f2)")},onMouseLeave:E=>{b||(E.currentTarget.style.backgroundColor="transparent")},children:[e.jsxs("span",{style:{position:"relative",display:"inline-flex",flexShrink:0},children:[e.jsx(S.Icon,{name:x.icon,size:"sm",style:{flexShrink:0}}),F&&e.jsx("span",{"aria-hidden":"true",style:{position:"absolute",top:"-2px",right:"-2px",width:"0.5rem",height:"0.5rem",borderRadius:"9999px",backgroundColor:"var(--sa-color-error-500, #ff4d6d)",border:"1px solid var(--sa-background-primary, #ffffff)"}})]}),(!W||T)&&e.jsxs(e.Fragment,{children:[e.jsx("span",{style:{fontSize:"0.875rem",fontWeight:"500",whiteSpace:"nowrap",transition:"opacity 0.3s",flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},children:x.title}),k&&e.jsx(be.Badges,{text:String(k.value),variant:k.variant??"info",size:"xs",border:!0}),M&&e.jsx("svg",{style:{width:"1rem",height:"1rem",flexShrink:0,transition:"transform 0.2s",transform:O?"rotate(180deg)":"rotate(0deg)"},fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]}),M&&(!W||T)&&(()=>{const E=x.children.findIndex(m=>he(m.to));return e.jsxs("div",{style:{position:"relative",marginLeft:"0.9375rem",paddingLeft:"1.125rem",overflow:"hidden",transition:"all 0.3s ease-in-out",maxHeight:O?`${x.children.length*36}px`:"0px",opacity:O?1:0,marginTop:O?"0.25rem":"0px"},children:[e.jsx("span",{"aria-hidden":"true",style:{position:"absolute",left:0,top:0,width:"1.5px",height:"100%",backgroundColor:"var(--sa-border-subtle, #0b120e24)",pointerEvents:"none"}}),E>=0&&e.jsx("span",{"aria-hidden":"true",style:{position:"absolute",left:0,top:`${E*32}px`,width:"1.5px",height:"32px",backgroundColor:"var(--sa-text-primary, #292a2e)",transition:"top 0.2s ease-in-out",pointerEvents:"none",zIndex:1}}),x.children.map(m=>{const oe=Ze(m.badge,H[m.id]);return e.jsxs("button",{onClick:()=>Z(m.to),style:{width:"100%",display:"flex",alignItems:"center",gap:"0.5rem",paddingLeft:"0.75rem",paddingRight:"0.5rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",height:"2rem",borderRadius:he(m.to)?"var(--sa-radii-sm, 0.375rem)":"var(--sa-radii-md, 0.5rem)",textAlign:"left",backgroundColor:he(m.to)?"var(--sa-background-primary, #ffffff)":"transparent",color:he(m.to)?"var(--sa-text-primary, #292a2e)":"var(--sa-text-subtle, #505258)",cursor:"pointer",border:he(m.to)?"1px solid var(--sa-border-subtle, #0b120e24)":"1px solid transparent"},onMouseEnter:fe=>{he(m.to)||(fe.currentTarget.style.backgroundColor="var(--sa-background-neutral, #f0f1f2)")},onMouseLeave:fe=>{he(m.to)||(fe.currentTarget.style.backgroundColor="transparent")},children:[e.jsx(S.Icon,{name:m.icon,size:"sm",style:{flexShrink:0}}),e.jsx("span",{style:{fontSize:"0.875rem",fontWeight:"500",whiteSpace:"nowrap",flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},children:m.title}),oe&&e.jsx(be.Badges,{text:String(oe.value),variant:oe.variant??"info",size:"xs",border:!0})]},m.id)})]})})()]},x.id)};return e.jsx(_r,{children:e.jsxs(Nr,{children:[e.jsxs("div",{style:{display:"flex",height:"100vh",position:"relative","--app-sidebar-width":T?"0px":W?"4.375rem":"16.375rem","--app-footer-zindex":T&&ne?"40":"999"},children:[T&&e.jsx("div",{style:{position:"fixed",inset:0,backgroundColor:"var(--sa-color-black-alpha-a50, #181a198f)",zIndex:40,opacity:ne?.5:0,pointerEvents:ne?"auto":"none",transition:"opacity 0.3s"},onClick:()=>ae(!1)}),e.jsxs("aside",{style:{width:T?"16.375rem":W?"4.375rem":"16.375rem",position:T?"fixed":"relative",...T&&{inset:0,zIndex:50,transform:ne?"translateX(0)":"translateX(-100%)"},backgroundColor:"var(--sa-background-primary-inverse, #f8f8f8)",borderRight:"1px solid var(--sa-border-subtle, #0b120e24)",display:"flex",flexDirection:"column",transition:"all 0.3s ease-in-out",flexShrink:T?void 0:0},children:[e.jsx("div",{onMouseEnter:()=>K(!0),onMouseLeave:()=>K(!1),style:{height:"4rem",display:"flex",alignItems:"center",justifyContent:"space-between",paddingLeft:"1rem",paddingRight:"1rem",borderBottom:"1px solid var(--sa-border-subtle, #0b120e24)",position:"relative"},children:(()=>{const x=!T&&W&&!ne,M=x&&q;return e.jsxs(e.Fragment,{children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem",flex:x?1:void 0,justifyContent:x?"center":void 0,transition:"opacity 0.2s",opacity:M?0:1,pointerEvents:M?"none":"auto"},children:[e.jsx("img",{src:D.logo,alt:"Logo",style:{width:"2rem",height:"2rem",flexShrink:0}}),(!W||ne)&&e.jsx("span",{style:{fontWeight:"600",color:"var(--sa-text-primary, #292a2e)",whiteSpace:"nowrap",transition:"opacity 0.3s"},children:D.appName})]}),!T&&!W&&e.jsx("button",{type:"button",onClick:()=>X(!0),"aria-label":"Collapse sidebar",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"1rem",height:"1rem",padding:0,background:"transparent",border:"none",color:"var(--sa-text-subtle, #8c8f97)",cursor:"pointer",flexShrink:0},children:e.jsx(Ur,{})}),x&&e.jsx("button",{type:"button",onClick:()=>X(!1),"aria-label":"Expand sidebar",style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",display:"inline-flex",alignItems:"center",justifyContent:"center",width:"2rem",height:"2rem",padding:0,background:"var(--sa-background-primary, #ffffff)",border:"1px solid var(--sa-border-subtle, #0b120e24)",borderRadius:"var(--sa-radii-sm, 0.375rem)",color:"var(--sa-text-primary, #292a2e)",cursor:"pointer",opacity:M?1:0,pointerEvents:M?"auto":"none",transition:"opacity 0.2s"},children:e.jsx("span",{style:{width:"1rem",height:"1rem",display:"inline-flex"},children:e.jsx(Ur,{})})}),T&&e.jsx("button",{onClick:()=>ae(!1),"aria-label":"Close menu",style:{padding:"0.375rem",borderRadius:"0.5rem",backgroundColor:"transparent",border:"none",color:"var(--sa-text-subtle, #8c8f97)",cursor:"pointer"},children:e.jsx("svg",{style:{width:"1.25rem",height:"1.25rem"},fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})})()}),s&&e.jsx(jr,{collapsed:T?!1:W,children:s}),e.jsx("div",{ref:ee,style:{flex:1,overflowY:"auto",paddingTop:"1rem",paddingBottom:"1rem"},children:je.map(x=>e.jsxs("div",{style:{marginBottom:"1rem"},children:[!W||T?x.name&&e.jsx("div",{style:{paddingLeft:"1.5rem",paddingRight:"1rem",paddingTop:"0rem",paddingBottom:"0.25rem",fontSize:"0.875rem",fontWeight:"400",color:"var(--sa-text-subtlest, #6b6e76)",transition:"opacity 0.3s",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:x.name}):x.name&&e.jsx("div",{"aria-label":x.name,style:{display:"flex",alignItems:"center",justifyContent:"center",paddingTop:"0.75rem",paddingBottom:"0.75rem"},children:e.jsx("span",{style:{display:"block",width:"1rem",height:"2px",borderRadius:"1px",backgroundColor:x.color??"var(--sa-background-brand, #04254f)"}})}),e.jsx("div",{style:{paddingLeft:"1rem",paddingRight:"1rem",display:"flex",flexDirection:"column",gap:"var(--sa-spacing-xs, 0.25rem)"},children:x.slotKey?e.jsx(Zr,{slotKey:x.slotKey,fallback:x.items.map(M=>Le(M))}):x.items.map(M=>Le(M))})]},x.id))}),D.menuBottom&&D.menuBottom.length>0&&e.jsx("div",{style:{borderTop:"1px solid var(--sa-border-subtle, #0b120e24)",paddingTop:"0.75rem",paddingBottom:"0.75rem",paddingLeft:"1rem",paddingRight:"1rem",backgroundColor:"var(--sa-background-primary-inverse, #f8f8f8)",display:"flex",flexDirection:"column",gap:"var(--sa-spacing-xs, 0.25rem)",flexShrink:0},children:D.menuBottom.map(x=>Le(x))})]}),e.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},children:[e.jsxs("header",{style:{height:"4rem",backgroundColor:"var(--sa-background-primary, #ffffff)",borderBottom:"1px solid var(--sa-border-subtle, #0b120e24)",display:"flex",alignItems:"center",justifyContent:"space-between",paddingLeft:"1rem",paddingRight:"1rem",flexShrink:0},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"1rem"},children:[T&&e.jsx("button",{onClick:()=>ae(!0),style:{padding:"0.375rem",borderRadius:"0.5rem",backgroundColor:"transparent",border:"none",color:"var(--sa-text-subtle, #8c8f97)",cursor:"pointer"},children:e.jsx("svg",{style:{width:"1.5rem",height:"1.5rem"},fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})}),e.jsx(Pr,{children:t})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.75rem"},children:[f,e.jsxs(ie.Menu,{position:"bottom-right",children:[e.jsx(ie.MenuButton,{children:e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem",cursor:"pointer"},children:[e.jsxs("div",{style:{textAlign:"right",maxWidth:"12.5rem"},children:[e.jsx("p",{style:{margin:0,fontSize:"0.875rem",fontWeight:500,color:"var(--sa-text-subtle, #8c8f97)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:c?"Loading...":(l==null?void 0:l.name)||"unknown"}),e.jsx("p",{style:{margin:0,fontSize:"0.75rem",color:"var(--sa-text-subtle, #8c8f97)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:c?"":(l==null?void 0:l.email)||"unknown"})]}),e.jsx("div",{style:{width:"2.5rem",height:"2.5rem",borderRadius:"9999px",display:"flex",alignItems:"center",justifyContent:"center",color:"var(--sa-background-primary, #ffffff)",fontWeight:600,fontSize:"0.875rem",boxShadow:"var(--sa-shadow-sm, 0 1px 2px 0 #0000000d)",flexShrink:0,backgroundColor:"var(--sa-background-brand, #04254f)"},children:((l==null?void 0:l.name)||"U")[0].toUpperCase()}),e.jsx(S.Icon,{name:"ChevronDown",size:"sm",style:{color:"var(--sa-text-subtle, #8c8f97)"}})]})}),e.jsxs(ie.MenuLists,{style:{width:"280px",paddingBlock:"12px",paddingInline:"12px",gap:"8px",marginTop:"16px"},children:[e.jsx(ie.MenuHeading,{children:e.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center",paddingBlock:"0.5rem"},children:[e.jsx("div",{style:{width:"4rem",height:"4rem",borderRadius:"9999px",display:"flex",alignItems:"center",justifyContent:"center",color:"var(--sa-background-primary, #ffffff)",fontWeight:600,fontSize:"1.25rem",boxShadow:"var(--sa-shadow-sm, 0 1px 2px 0 #0000000d)",marginBottom:"0.75rem",backgroundColor:"var(--sa-background-brand, #04254f)"},children:((l==null?void 0:l.name)||"U")[0].toUpperCase()}),e.jsx("p",{style:{margin:0,fontSize:"0.875rem",fontWeight:600,color:"var(--sa-text-primary, #292a2e)",maxWidth:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:(l==null?void 0:l.name)||"unknown"}),e.jsx("p",{style:{margin:0,fontSize:"0.75rem",color:"var(--sa-text-subtle, #8c8f97)",maxWidth:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:(l==null?void 0:l.email)||"unknown"}),d&&e.jsx("p",{style:{margin:0,fontSize:"0.75rem",color:"var(--sa-text-subtle, #8c8f97)",maxWidth:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:d})]})}),(u&&u.length>0||p)&&e.jsxs(ie.MenuBody,{children:[u==null?void 0:u.map((x,M)=>e.jsx(ie.MenuButton,{children:e.jsxs("button",{type:"button",onClick:x.onClick,style:Jr,onMouseEnter:O=>{O.currentTarget.style.backgroundColor="var(--sa-background-neutral, #f0f1f2)"},onMouseLeave:O=>{O.currentTarget.style.backgroundColor="transparent"},children:[e.jsx(S.Icon,{name:x.icon,size:"md"}),e.jsx("span",{children:x.label})]})},`${x.label}-${M}`)),p]}),C??e.jsx(ie.MenuFooter,{children:e.jsx(ie.MenuButton,{children:e.jsxs("button",{type:"button",onClick:Ve,style:{...Jr,color:"var(--sa-background-error, #c9184a)",fontWeight:500},onMouseEnter:x=>{x.currentTarget.style.backgroundColor="var(--sa-color-error-50, #fff0f3)"},onMouseLeave:x=>{x.currentTarget.style.backgroundColor="transparent"},children:[e.jsx(S.Icon,{name:"Logout",size:"md",style:{color:"var(--sa-background-error, #c9184a)"}}),e.jsx("span",{children:"Logout"})]})})})]})]})]})]}),e.jsx("main",{ref:ue,style:{flex:1,overflowY:"auto"},children:r||e.jsx(G.Outlet,{})})]})]}),i&&h&&e.jsx("div",{style:{position:"fixed",inset:0,background:"var(--sa-color-black-alpha-a70, #181a19b8)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999},children:h}),e.jsxs(ge.Dialog,{isShow:se,onHide:er,children:[e.jsx(ge.DialogTitle,{children:"Confirmation Logout"}),e.jsx(ge.DialogBody,{children:"Are you sure you want to end the session and exit the page?"}),e.jsx(ge.DialogFooter,{children:e.jsx(y.Box,{display:"flex",align:"flex-end",justify:"center",children:e.jsxs(N.Flex,{direction:"row",gap:"sm",align:"center",children:[e.jsx(y.Box,{children:e.jsx(A.Button,{secondary:!0,onClick:er,children:"Cancel"})}),e.jsx(y.Box,{children:e.jsx(A.Button,{primary:!0,onClick:wr,children:"Yes, Sure"})})]})})})]}),le&&e.jsxs(e.Fragment,{children:[e.jsx("div",{onClick:()=>R(null),style:{position:"fixed",inset:0,zIndex:60,backgroundColor:"transparent"}}),e.jsxs("div",{role:"dialog","aria-label":le.item.title,style:{position:"fixed",top:le.top,left:le.left,zIndex:61,minWidth:"13rem",maxWidth:"16rem",backgroundColor:"var(--sa-background-primary, #ffffff)",border:"1px solid var(--sa-border-subtle, #0b120e24)",borderRadius:"var(--sa-radii-md, 0.5rem)",boxShadow:"var(--sa-shadow-lg, 0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a)",padding:"0.5rem",display:"flex",flexDirection:"column",gap:"0.125rem"},children:[e.jsx("div",{style:{fontSize:"0.75rem",fontWeight:600,color:"var(--sa-color-gray-500, #8c8f97)",padding:"0.25rem 0.5rem 0.5rem",textTransform:"uppercase",letterSpacing:"0.05em"},children:le.item.title}),(lr=le.item.children)==null?void 0:lr.map(x=>{const M=he(x.to),O=Ze(x.badge,H[x.id]);return e.jsxs("button",{onClick:()=>{Z(x.to),R(null)},style:{width:"100%",display:"flex",alignItems:"center",gap:"0.75rem",padding:"0.5rem 0.75rem",borderRadius:"var(--sa-radii-md, 0.5rem)",textAlign:"left",backgroundColor:M?"var(--sa-color-gray-100, #f8f8f8)":"transparent",color:M?"var(--sa-text-primary, #292a2e)":"var(--sa-color-gray-800, #505258)",border:"1px solid transparent",cursor:"pointer",fontSize:"0.875rem",fontWeight:500},onMouseEnter:b=>{M||(b.currentTarget.style.backgroundColor="var(--sa-color-gray-100, #f8f8f8)")},onMouseLeave:b=>{M||(b.currentTarget.style.backgroundColor="transparent")},children:[x.icon&&e.jsx(S.Icon,{name:x.icon,size:"sm",style:{flexShrink:0}}),e.jsx("span",{style:{flex:1,whiteSpace:"nowrap"},children:x.title}),O&&e.jsx(be.Badges,{text:String(O.value),variant:O.variant??"info",size:"xs",border:!0})]},x.id)})]})]})]})})}const He=g.forwardRef(({children:r,...t},l)=>e.jsx(y.Box,{ref:l,role:"button",cursor:"pointer","aria-pressed":"true",display:"inline-block",tabIndex:0,...t,children:r})),Yr=({title:r,iconName:t,textColor:l,iconColor:c,hoverTextColor:o,hoverIconColor:i})=>{const[h,s]=g.useState(!1),f=c??"var(--sa-text-subtle, #8c8f97)",d=l??"var(--sa-text-subtle, #8c8f97)",u=i??"var(--sa-text-subtle, #8c8f97)",p=o??"var(--sa-text-primary, #292a2e)";return e.jsxs(y.Box,{direction:"row",gap:"xs",align:"center",onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),style:{cursor:"pointer"},children:[e.jsx(S.Icon,{name:t||"ChevronLeft",size:"xs",style:{color:h?u:f,transition:"color 0.15s ease"}}),e.jsx(v.Text,{variant:"sub-h3",style:{color:h?p:d,transition:"color 0.15s ease"},children:r||"Back"})]})},Lt=({items:r,separator:t="/",iconName:l,iconColor:c,hoverIconColor:o})=>{const[i,h]=g.useState(!1),s=c??"var(--sa-text-subtle, #8c8f97)",f=o??"var(--sa-text-subtle, #8c8f97)",d=r.length>1?r[0]:void 0,u=!!(d!=null&&d.to||d!=null&&d.onClick),p=e.jsx(S.Icon,{name:l||"ChevronLeft",size:"xs",onMouseEnter:u?()=>h(!0):void 0,onMouseLeave:u?()=>h(!1):void 0,style:{color:u&&i?f:s,transition:"color 0.15s ease",cursor:u?"pointer":void 0}}),C=d!=null&&d.to?e.jsx(G.Link,{to:d.to,replace:!0,style:{textDecoration:"none"},children:p}):d!=null&&d.onClick?e.jsx(He,{onClick:d.onClick,children:p}):p;return e.jsxs(y.Box,{direction:"row",gap:"xs",align:"center",children:[C,e.jsx(ke.Breadcrumb,{separator:t,size:"md",children:r.map((w,B)=>{const D=B===r.length-1;return w.to&&!D?e.jsx(ke.BreadcrumbItem,{children:e.jsx(G.Link,{to:w.to,children:w.label})},B):e.jsx(ke.BreadcrumbItem,{currentPage:D,children:e.jsx(ke.BreadcrumbLink,{onClick:D?void 0:w.onClick,children:w.label})},B)})})]})},Tt=r=>{const{items:t,separator:l,onClick:c,navigateTo:o,...i}=r;return t&&t.length>0?e.jsx(Lt,{items:t,separator:l,iconName:i.iconName,iconColor:i.iconColor,hoverIconColor:i.hoverIconColor}):o?e.jsx(y.Box,{direction:"row",children:e.jsx(G.Link,{to:o,replace:!0,style:{textDecoration:"none"},children:e.jsx(Yr,{...i})})}):e.jsx(y.Box,{direction:"row",children:e.jsx(He,{onClick:c,children:e.jsx(Yr,{...i})})})},pr=[{icon:"var(--sa-color-brand-400, #3366b7)",activeBg:"var(--sa-color-brand-50, #e6edf6)",activeBorder:"var(--sa-color-brand-300, #668cc9)",activeShadow:"rgba(51, 102, 183, 0.25)"},{icon:"var(--sa-color-warning-400, #ed9f30)",activeBg:"var(--sa-color-warning-50, #fef2e6)",activeBorder:"var(--sa-color-warning-300, #f1b259)",activeShadow:"rgba(237, 159, 48, 0.25)"},{icon:"var(--sa-color-secondary-300, #5468e1)",activeBg:"var(--sa-color-secondary-50, #e6e9fb)",activeBorder:"var(--sa-color-secondary-200, #8a98ea)",activeShadow:"rgba(84, 104, 225, 0.25)"},{icon:"var(--sa-color-info-500, #00abeb)",activeBg:"var(--sa-color-info-50, #effaff)",activeBorder:"var(--sa-color-info-300, #75dbff)",activeShadow:"rgba(0, 171, 235, 0.25)"},{icon:"var(--sa-color-success-500, #30ce84)",activeBg:"var(--sa-color-success-50, #ecfff6)",activeBorder:"var(--sa-color-success-300, #75dead)",activeShadow:"rgba(48, 206, 132, 0.25)"},{icon:"var(--sa-color-error-400, #ff758f)",activeBg:"var(--sa-color-error-50, #fff0f3)",activeBorder:"var(--sa-color-error-300, #ff8fa3)",activeShadow:"rgba(255, 117, 143, 0.25)"}];function Xr(r,t,l){return{display:"flex",alignItems:"center",justifyContent:"center",width:"64px",height:"64px",borderRadius:"var(--sa-radii-sm, 6px)",border:r?`2px solid ${l.activeBorder}`:"2px solid var(--sa-color-gray-200, #f0f1f2)",backgroundColor:r?l.activeBg:"var(--sa-color-gray-50, #ffffff)",boxShadow:r?t?`0 8px 20px ${l.activeShadow.replace("0.25","0.35")}`:`0 2px 8px ${l.activeShadow}`:t?"0 8px 20px rgba(0, 0, 0, 0.14)":"0 1px 4px rgba(0, 0, 0, 0.08)",transform:t?"translateY(-3px) scale(1.05)":"translateY(0) scale(1)",transition:"box-shadow 0.2s ease, transform 0.2s ease, background-color 0.15s ease, border-color 0.15s ease"}}const Kr={fontSize:"11px",fontWeight:500,textAlign:"center",overflowWrap:"normal",wordBreak:"normal",color:"var(--sa-background-primary, #ffffff)",lineHeight:"1.3",maxWidth:"80px"},$r={display:"flex",flexDirection:"column",alignItems:"center",gap:"8px",background:"none",border:"none",cursor:"pointer",padding:0};function Rr({isShow:r,onHide:t,menus:l,selectedGroupId:c,onSelect:o}){const[i,h]=g.useState(void 0),s=d=>{o(d),t()},f=pr[0];return e.jsx(ge.Dialog,{isShow:r,onHide:t,style:{width:560,background:"transparent",boxShadow:"none",border:"none"},children:e.jsx(ge.DialogBody,{children:e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(5, 1fr)",gap:"16px"},children:[e.jsxs("button",{onClick:()=>s(null),onMouseEnter:()=>h("all"),onMouseLeave:()=>h(void 0),style:$r,children:[e.jsx("div",{style:Xr(c===null,i==="all",f),children:e.jsx("div",{style:{color:f.icon,display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx(S.Icon,{name:"Grid",size:"lg",style:{width:32,height:32}})})}),e.jsx("span",{style:Kr,children:"Semua"})]}),l.map((d,u)=>{var D;const p=c===d.id,C=i===d.id,w=((D=d.items[0])==null?void 0:D.icon)??"Grid",B=pr[(u+1)%pr.length];return e.jsxs("button",{onClick:()=>s(d.id),onMouseEnter:()=>h(d.id),onMouseLeave:()=>h(void 0),style:$r,children:[e.jsx("div",{style:Xr(p,C,B),children:e.jsx("div",{style:{color:B.icon,display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx(S.Icon,{name:w,size:"lg",style:{width:32,height:32}})})}),e.jsx("span",{style:Kr,children:d.name})]},d.id)})]})})})}function Ot({onSelect:r,"aria-label":t="Pilih module"}={}){const l=hr(),c=G.useNavigate(),{selectedGroupId:o,setSelectedGroupId:i}=ur(),[h,s]=g.useState(!1),f=d=>{var u;if(i(d),d!==null){const p=l.menus.find(w=>w.id===d),C=(u=p==null?void 0:p.items[0])==null?void 0:u.to;C&&c(C)}r==null||r(d)};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{style:{position:"relative"},children:[e.jsx("button",{onClick:()=>s(!0),style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"2.25rem",height:"2.25rem",borderRadius:"var(--sa-radii-sm, 0.25rem)",border:"1px solid var(--sa-border-subtle, #0b120e24)",color:"var(--sa-text-subtle, #8c8f97)",backgroundColor:"transparent",cursor:"pointer"},"aria-label":t,onMouseEnter:d=>{d.currentTarget.style.backgroundColor="var(--sa-background-primary-inverse, #f8f8f8)"},onMouseLeave:d=>{d.currentTarget.style.backgroundColor="transparent"},children:e.jsx(S.Icon,{name:"GridApplication",size:"sm"})}),o!==null&&e.jsx("span",{style:{position:"absolute",top:"0.25rem",right:"0.25rem",width:"0.5rem",height:"0.5rem",borderRadius:"9999px",backgroundColor:"var(--sa-color-brand-500, #1a4fa0)"},"aria-hidden":"true"})]}),e.jsx(Rr,{isShow:h,onHide:()=>s(!1),menus:l.menus.filter(d=>d.parentGroupId===void 0),selectedGroupId:o,onSelect:f})]})}const mt=(r,t)=>{const l=[];if(t===0)return l.push(r),l;for(let c=0;c<r.length;c+=t){const o=r.slice(c,c+t);l.push(o)}return l},It=g.memo(({value:r,label:t,separator:l,labelWidth:c,lastIndex:o,labelAlign:i="top"})=>{const h=g.useMemo(()=>({padding:0,paddingBottom:o?0:12,verticalAlign:i}),[o,i]),s=g.useMemo(()=>({padding:0,paddingRight:12,paddingLeft:12,paddingBottom:o?0:12,verticalAlign:i}),[o,i]),f=()=>typeof t=="string"?e.jsx(v.Text,{fontWeight:"medium",color:"text-muted",children:t}):t,d=()=>typeof r=="string"||typeof r=="number"?e.jsx(v.Text,{color:"text",fontWeight:"medium",children:r}):r,u=()=>typeof l=="string"||typeof l=="number"?e.jsx(v.Text,{fontWeight:"medium",color:"text-muted",children:l}):l;return e.jsxs(Q.Tr,{children:[e.jsx(Q.Td,{style:h,width:c,children:f()}),l?e.jsx(Q.Td,{style:s,width:24,children:u()}):null,e.jsx(Q.Td,{style:h,children:d()})]})}),Wt=g.memo(({fields:r,separator:t,labelWidth:l})=>e.jsx(Q.Table,{children:r.map((c,o)=>e.jsx(It,{separator:t,labelWidth:l,lastIndex:o===r.length-1,...c},`field-group-field-${o}`))})),Ht=g.memo(({maxRow:r=0,maxColumn:t=2,separator:l=":",fields:c=[],labelWidth:o=150,bordered:i=!1})=>{const h=g.useMemo(()=>mt(c,r),[c,r]),s=h.length>2,f=()=>{switch(t){case 1:return"width-full";case 2:return"width-1-2";case 3:return"width-1-3";case 4:return"width-1-4";default:return"width-1-2"}};return e.jsx(y.Box,{gap:s?void 0:"lg",direction:"row",flexWrap:"wrap",borderRadius:"rounded-sm",padding:"lg",paddingBottom:s?"xs":"lg",bg:"accent-dark-tertiary",borderWidth:i?"border":void 0,borderStyle:i?"border-solid":void 0,borderColor:i?"border-subtle":void 0,children:h.map((d,u)=>e.jsx(y.Box,{flex:s?void 0:"1",width:s?f():void 0,marginBottom:s?"lg":void 0,children:e.jsx(Wt,{labelWidth:o,fields:d,separator:l})},u))})}),At=({backButton:r})=>{const[t,l]=g.useState(!1),c=(r==null?void 0:r.iconColor)??"var(--sa-text-subtle, #8c8f97)",o=(r==null?void 0:r.textColor)??"var(--sa-text-subtle, #8c8f97)",i=(r==null?void 0:r.hoverIconColor)??"var(--sa-text-subtle, #8c8f97)",h=(r==null?void 0:r.hoverTextColor)??"var(--sa-text-primary, #292a2e)";return e.jsxs(y.Box,{direction:"row",gap:"xs",align:"center",onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),style:{cursor:"pointer"},children:[e.jsx(S.Icon,{name:(r==null?void 0:r.iconName)||"ChevronLeft",size:"xs",style:{color:t?i:c,transition:"color 0.15s ease"}}),e.jsx(v.Text,{variant:"sub-h3",style:{color:t?h:o,textDecoration:t?"underline":"none",transition:"color 0.15s ease"},children:(r==null?void 0:r.title)||"Back"})]})},Vt=({backButton:r,title:t,titleTag:l,children:c,header:o=!0,action:i,titleTagProps:h,containerProps:s,headerProps:f})=>{const d=$.useMediaQuery("lg"),u=G.useNavigate(),p=G.useLocation(),C=r==null?void 0:r.show,w=()=>{if(typeof(r==null?void 0:r.onClick)=="function"){r.onClick();return}u(-1,{replace:!0})},B=()=>i?g.isValidElement(i)?i:e.jsx(y.Box,{direction:"row",gap:"lg",children:i.map(({title:P,icon:J,buttonProps:T,onClick:se},Y)=>!P&&!J?null:e.jsx(A.Button,{fullWidth:!d,iconLeft:J?e.jsx(S.Icon,{name:J,size:"md"}):void 0,onClick:se,...T,children:P},`action-${Y}`))}):null,D=()=>{const P=e.jsx(At,{backButton:r});return r!=null&&r.navigateTo?e.jsx(y.Box,{direction:"row",children:e.jsx(G.Link,{to:r.navigateTo,replace:!0,style:{textDecoration:"none"},children:P})}):e.jsx(y.Box,{direction:"row",children:e.jsx(He,{onClick:w,children:P})})},H=()=>{const P=!!t,J=g.isValidElement(i)?!0:Array.isArray(i)&&i.length>0;return!P&&!J&&!C?null:e.jsxs(y.Box,{gap:"xs",paddingTop:f==null?void 0:f.paddingTop,paddingInline:f==null?void 0:f.paddingInline,...f,children:[C&&D(),(P||J)&&e.jsxs(y.Box,{direction:d?"row":"column",gap:"lg",justify:"space-between",align:"center",children:[P?typeof t=="string"?e.jsxs(y.Box,{direction:"row",gap:"lg",align:"center",children:[e.jsx(v.Text,{variant:"h2",fontWeight:"semibold",fontFamily:"Poppins",children:t}),l&&e.jsx(be.Badges,{border:!0,size:"lg",text:l,...h})]}):t:null,B()]})]})},Z=()=>c;return e.jsxs(y.Box,{gap:"md",variant:"main",...s,padding:"md",style:{...(s==null?void 0:s.style)??{},animation:"pageLayoutEnter 320ms cubic-bezier(0.16, 1, 0.3, 1) backwards"},children:[o&&H(),Z()]},p.pathname)},zt=g.memo(Vt),jt={icon:"Cross",title:""},Nt="calc(100vw - 16px)",et=r=>r==null?void 0:`min(${typeof r=="number"?`${r}px`:r}, ${Nt})`,rt=g.forwardRef(({onHide:r,show:t,withBlur:l=!1,style:c,children:o,closeButton:i=jt,width:h,minWidth:s="357px",maxWidth:f="357px"},d)=>{const u=et(h??s),p=et(h??f);return e.jsx(cr.Drawer,{blur:l,isShow:t,position:"right",onHide:r,ref:d,style:{minWidth:u,maxWidth:p,...c},children:e.jsxs(y.Box,{padding:"lg",children:[i?e.jsxs(y.Box,{direction:"row",align:"center",gap:"sm",onClick:r,marginBottom:"lg",cursor:"pointer",children:[e.jsx(S.Icon,{name:i.icon,size:"md",color:"subtle",cursor:"pointer"}),i.title?e.jsx(v.Text,{fontFamily:"Poppins",fontSize:"md",color:"text-muted",children:i.title}):null]}):null,o]})})}),Cr=g.memo(({children:r,borderBottom:t=!0,padding:l=!0})=>{const c=$.useMediaQuery("lg");return e.jsx(y.Box,{padding:l?"md":"spacing-0",paddingLeft:l?"md":"spacing-0",paddingRight:l?"md":"spacing-0",style:t?{borderBottom:"1px solid var(--sa-border-subtle, #0b120e24)"}:void 0,children:r})}),xr=g.memo(({children:r,borderTop:t=!0,padding:l=!0})=>{const c=$.useMediaQuery("lg");return e.jsx(y.Box,{padding:l?"md":"spacing-0",paddingLeft:l?"md":"spacing-0",paddingRight:l?"md":"spacing-0",style:t?{borderTop:"1px solid var(--sa-border-subtle, #0b120e24)"}:void 0,children:r})}),Pt=g.memo(({children:r,...t})=>e.jsx(y.Box,{padding:"md",paddingLeft:"md",paddingRight:"md",gap:"md",...t,children:r})),_t=g.memo(({children:r,title:t,titleTag:l,action:c,header:o,footer:i,actionContainer:h,containerProps:s,bodyProps:f,headerProps:d={borderBottom:!0},footerProps:u={borderTop:!0},variantTag:p="info"})=>{const C=$.useMediaQuery("lg"),w=()=>l?e.jsxs(y.Box,{direction:"row",gap:"sm",align:"center",children:[e.jsx(v.Text,{fontWeight:"medium",children:t}),e.jsx(be.Badges,{border:!0,text:l,variant:p})]}):e.jsx(v.Text,{fontWeight:"medium",children:t}),B=()=>o||e.jsxs(y.Box,{direction:"row",justify:"space-between",align:"flex-start",gap:"md",children:[e.jsx(y.Box,{children:t?w():null}),e.jsx(y.Box,{style:C?{width:"100%",maxWidth:"19.313rem"}:{flex:1},...h,children:c??null})]}),D=!!(o||t||c);return e.jsxs(y.Box,{bg:"white",borderRadius:"rounded-xs",variant:"section",borderWidth:"border",borderStyle:"border-solid",borderColor:"border-base",...s,style:{backgroundColor:"var(--sa-background-primary, #ffffff)",...(s==null?void 0:s.style)??{}},children:[o!==null&&D?e.jsx(Cr,{...d,children:B()}):null,e.jsx(Pt,{...f,children:r}),i?e.jsx(xr,{...u,children:i}):null]})}),Zt="var(--sa-color-secondary-50, #e6e9fb)",qt=({children:r,onClick:t})=>{const[l,c]=g.useState(""),o=()=>c(Zt),i=()=>c("");return e.jsx(He,{fullWidth:!0,height:"height-8",paddingRight:"spacing-4",paddingLeft:"spacing-4",display:"flex",direction:"row",align:"center",gap:"spacing-1",cursor:"pointer",onClick:t,onMouseEnter:o,borderRadius:"rounded-md",onMouseLeave:i,style:{backgroundColor:l},children:r})},Qt=g.memo(qt),Gt=({icon:r,items:t=[],style:l,triggerStyle:c,containerStyle:o,position:i="bottom-right",buttonProps:h,iconProps:s,variant:f="default"})=>{const d=g.useMemo(()=>({zIndex:10,width:"150px",...o}),[o]);return e.jsxs(ie.Menu,{position:i,style:l,children:[e.jsx(ie.MenuButton,{style:c,children:e.jsx(A.Button,{size:"sm",secondary:!0,...h,children:e.jsx(S.Icon,{name:r,...s})})}),e.jsx(ie.MenuLists,{style:d,children:t.map((u,p)=>f==="outline-button"?e.jsx(ie.MenuBody,{children:e.jsxs(A.Button,{size:"sm",secondary:!0,fullWidth:!0,onClick:u.onClick,...u.buttonProps,children:[e.jsx(S.Icon,{name:u.icon,size:"md",...u.iconProps}),e.jsx(v.Text,{fontSize:"sm",color:"text",...u.textProps,children:u.label})]})},u.id||p):e.jsxs(Qt,{onClick:u.onClick,...u.buttonProps,children:[e.jsx(S.Icon,{name:u.icon,size:"md",...u.iconProps}),e.jsx(v.Text,{fontSize:"sm",color:"text",...u.textProps,children:u.label})]},u.id||p))})]})},Ut=g.memo(Gt),ye={H1:r=>e.jsx(v.Text,{variant:"h1",children:r.children,...r.props}),H2:r=>e.jsx(v.Text,{variant:"h2",children:r.children,...r.props}),H3:r=>e.jsx(v.Text,{variant:"h3",children:r.children,...r.props}),H4:r=>e.jsx(v.Text,{variant:"h4",children:r.children,...r.props}),H5:r=>e.jsx(v.Text,{variant:"h5",children:r.children,...r.props}),H6:r=>e.jsx(v.Text,{variant:"h6",children:r.children,...r.props}),SubH1:r=>e.jsx(v.Text,{variant:"sub-h1",children:r.children,...r.props}),SubH2:r=>e.jsx(v.Text,{variant:"sub-h2",children:r.children,...r.props}),SubH3:r=>e.jsx(v.Text,{variant:"sub-h3",children:r.children,...r.props}),Body1:r=>e.jsx(v.Text,{variant:"body-1",children:r.children,...r.props}),Body2:r=>e.jsx(v.Text,{variant:"body-2",children:r.children,...r.props}),Body3:r=>e.jsx(v.Text,{variant:"body-3",children:r.children,...r.props})},Ge=()=>{const[r,t]=G.useSearchParams(),l=Ee.searchParamsToObject(r.toString()),c=G.useParams(),o=G.useLocation(),i=c.id;return{setSearchParams:t,searchParams:r,searchQueries:l,isHasQuery:(u,p)=>r.has(u)&&r.get(u)===p,getQueryParam:u=>r.get(u),getRouteParam:u=>c[u],params:c,location:o,id:i,hasId:!!i}},tt=r=>JSON.stringify(r),lt=r=>JSON.stringify(r),ot=r=>JSON.stringify(r),ct=r=>JSON.stringify(r),Jt=r=>r,Yt=r=>JSON.stringify(r),vr=({value:r,name:t,type:l,withSearchParam:c=!0,setSearchParams:o,searchQueries:i,dropdownSearchKey:h,filterKey:s="filter",pageKey:f="page"})=>{if(c){let d;switch(l){case"search":d=Jt(r);break;case"dropdown":case"dropdown-multiple":d=tt(r);break;case"radio":d=lt(r);break;case"date-range":d=ot(r);break;case"advanced-date-range":d=Yt(r);break;case"date":d=ct(r);break;default:d=r;break}if(typeof d<"u"){const p={...i[s]&&typeof i[s]=="string"?JSON.parse(i[s]):void 0,[t]:d},C={...i};h&&typeof h=="string"&&delete C[h],delete C[f];const w={...C,[s]:JSON.stringify(p)},B=new URLSearchParams(i).toString(),D=new URLSearchParams(w).toString();if(B===D)return;o(w)}}},Ue=({name:r,filterKey:t="filter",searchParams:l,get:c})=>{const o=l.get(t)||void 0,i=o&&typeof o=="string"?JSON.parse(o):void 0,h=i?i[r]:void 0;return c==="label"&&h?JSON.parse(h)[0].label:c==="value"&&h?JSON.parse(h)[0].value:h},Xt=({name:r,filterKey:t="filter",searchParams:l,get:c})=>{const o=l.get(t)||void 0,i=o&&typeof o=="string"?JSON.parse(o):void 0,h=i?i[r]:void 0;return c==="label"&&h?JSON.parse(h).map(s=>s.label):c==="value"&&h?JSON.parse(h).map(s=>s.value):c==="array"&&h?JSON.parse(h):h},Kt=({name:r,filterKey:t="filter",searchParams:l,get:c})=>{const o=l.get(t)||void 0,i=o&&typeof o=="string"?JSON.parse(o):void 0,h=i?i[r]:void 0;return c==="id"&&h?JSON.parse(h).id:c==="label"&&h?JSON.parse(h).label:c==="value"&&h?JSON.parse(h).value:h},it=(r,t,l)=>{const c=t.get(l||"filter")||void 0,o=c&&typeof c=="string"?JSON.parse(c):void 0;return o?o[r]:void 0},$t=({name:r,filterKey:t="filter",searchParams:l})=>{const c=l.get(t||"filter")||void 0,o=c&&typeof c=="string"?JSON.parse(c):void 0,i=o?o[r]:void 0;return{start:i?JSON.parse(i).from:void 0,end:i?JSON.parse(i).to:void 0}},Rt=({name:r,filterKey:t="filter",searchParams:l})=>{const c=l.get(t||"filter")||void 0,o=c&&typeof c=="string"?JSON.parse(c):void 0,i=o?o[r]:void 0;return i?JSON.parse(i):void 0},el=(r,{filterKey:t="filter",perPageKey:l="perPage",pageKey:c="page"})=>{const o=r.get(t)||void 0,i=r.get(l)||void 0,h=r.get(c)||void 0;return!!o||!!i||!!h},nt=({isOpen:r,onClose:t,filterKey:l,pageKey:c,filters:o})=>{const{searchParams:i,setSearchParams:h,searchQueries:s}=Ge(),[f,d]=g.useState({}),u=()=>{i.delete(l||"filter"),h(i)},p=(C,w)=>{switch(C.type){case"radio":{const{show:B=!0}=C;return B&&e.jsx(y.Box,{children:e.jsx(y.Box,{children:C.title})},w)}case"dropdown":{const{show:B=!0}=C;return B&&e.jsx(y.Box,{children:e.jsx(y.Box,{children:C.title})},w)}case"date-range":return e.jsx(y.Box,{children:e.jsx(y.Box,{children:C.title})},w);case"date":return e.jsx(y.Box,{children:e.jsx(y.Box,{children:C.title})},w);case"dropdown-multiple":{const{show:B=!0}=C;return B&&e.jsx(y.Box,{children:e.jsx(y.Box,{children:C.title})},w)}default:return null}};return e.jsx(rt,{onHide:t,show:r||!1,children:e.jsxs(y.Box,{direction:"column",gap:"md",children:[e.jsxs(N.Flex,{direction:"row",justify:"space-between",align:"center",children:[e.jsx(y.Box,{children:"Filter"}),e.jsx(y.Box,{style:{cursor:"pointer"},onClick:u,children:"Reset"})]}),o==null?void 0:o.map((C,w)=>p(C,w))]})})},at=({searchKey:r="q",statusKey:t="status",searchPlaceholder:l="Search",searchHighlightPlaceholder:c,extendedFilter:o,showSearchFilter:i=!0,showStatusFilter:h=!0,filterKey:s="filter",pageKey:f="page",customWidthSearch:d,handleOnReset:u,filterConfigs:p,buttonToggleProps:C,position:w="right",titleSearchLabel:B="Work Order",withTitleLabels:D=!1})=>{const Z=(C==null?void 0:C.isShowLabel)??!0,[P,J]=g.useState(!1),[T,se]=g.useState(0),Y=()=>{se(j=>j+1)},{searchParams:W,setSearchParams:X,getQueryParam:ne}=Ge(),ae=Ee.searchParamsToObject(W.toString()),q=it(r,W,s)||"",[K,te]=g.useState(q),de=ne(s),R=!!(de&&!(()=>{if(de)try{const j=JSON.parse(de);return Object.keys(j).length===1&&j[r]===""}catch(j){console.error("Filter parameter is not a valid JSON:",j)}return!1})()),z=$.useMediaQuery("md");return g.useEffect(()=>{te(q)},[q]),g.useEffect(()=>{if(K===q)return;const j=window.setTimeout(()=>{vr({value:K,name:r,type:"search",searchQueries:ae,setSearchParams:X,filterKey:s,pageKey:f})},350);return()=>{window.clearTimeout(j)}},[K,q,r,ae,X,s,f]),e.jsxs(N.Flex,{gap:"md",style:{flexDirection:z&&w==="left"?"row":z&&w==="right"?"row-reverse":"column"},align:"flex-end",children:[R&&e.jsx(y.Box,{justify:"flex-end",children:e.jsx(A.Button,{onClick:()=>{const j=new URLSearchParams(W);j.delete(s),X(j),te(""),Y(),u&&u()},variant:"outline",tone:"neutral",children:e.jsx(v.Text,{color:"error",fontWeight:"semibold",children:"Reset"})})}),o==null?void 0:o.map(({minWidth:j,content:ee,title:ue,onClickContainer:pe},Ve)=>e.jsxs(y.Box,{gap:"sm",onClick:pe,style:{minWidth:j},children:[ue&&e.jsx(ye.SubH3,{children:ue}),ee]},`extended-filter-${Ve}-${T}`)),!!(p!=null&&p.length)&&e.jsx(A.Button,{primary:R,secondary:!R,iconLeft:e.jsx(S.Icon,{size:"sm",name:(C==null?void 0:C.icon)||"FilterHorizontal",style:{color:de?"var(--sa-background-brand, #04254f)":"var(--sa-text-primary, #292a2e)"}}),fullWidth:!z,onClick:()=>J(!0),children:Z?"Filter":void 0}),h&&e.jsxs(y.Box,{gap:"sm",style:{minWidth:"126px"},children:[D&&e.jsx(ye.SubH3,{children:"Status"}),e.jsx(me.Dropdown,{dropdownLists:[{label:"Active",value:"active"},{label:"InActive",value:"inactive"}],defaultValue:Ue({get:"value",name:t,searchParams:W,filterKey:s})?[{label:Ue({get:"value",name:t,searchParams:W,filterKey:s})==="active"?"Active":"InActive",value:Ue({get:"value",name:t,searchParams:W,filterKey:s})}]:[],onChange:j=>vr({value:j,name:t,type:"dropdown",searchQueries:ae,setSearchParams:X,filterKey:s}),placeholder:D?"All":"All Status"},T)]}),i&&e.jsxs(y.Box,{gap:"sm",style:{width:d&&z?d:z?"310px":""},children:[D&&e.jsxs(ye.SubH3,{children:["Search for ",B]}),e.jsx(Ie.Input,{placeholder:l,leftIcon:e.jsx(S.Icon,{name:"Search",width:20,height:20}),onChange:j=>te(j.target.value),value:K,fullWidth:!0},T+1+s)]}),e.jsx(nt,{isOpen:P,onClose:()=>J(!1),filterKey:s,filters:p,pageKey:f})]})},st=({children:r,borderRadius:t,height:l})=>{const c=g.useRef(null),[o,i]=g.useState("100vh");return g.useEffect(()=>{if(l)return;const h=()=>{if(c.current){const s=c.current.getBoundingClientRect().top;i(`calc(100vh - ${s}px)`)}};return h(),window.addEventListener("resize",h),()=>window.removeEventListener("resize",h)},[l]),e.jsx(y.Box,{ref:c,fullWidth:!0,borderStyle:"border-solid",borderWidth:"border",borderColor:"border-base",borderRadius:t||"rounded-xs",style:{height:l??o,display:"flex",flexDirection:"column"},children:r})},dt=({action:r,rightContent:t,leftContent:l,headerSlot:c,advanceFilter:o,showFilter:i=!0})=>{const h=$.useMediaQuery("md"),s=i?e.jsx(at,{...o}):null,f=()=>r?g.isValidElement(r)?r:e.jsx(y.Box,{style:{display:"flex",flexDirection:h?"row":"column",gap:"8px",width:h?"auto":"100%",textWrap:"nowrap"},children:r.map(({title:d,icon:u,buttonProps:p,onClick:C},w)=>!d&&!u?null:e.jsx(A.Button,{fullWidth:!h,iconLeft:u?e.jsx(S.Icon,{name:u}):void 0,onClick:C,...p,children:d},`action-${w}`))}):null;return e.jsx(y.Box,{style:{display:"flex",width:"100%",justifyContent:"space-between",alignItems:"center",paddingLeft:"8px",paddingRight:"8px",paddingTop:"8px",paddingBottom:"8px",borderBottom:"1px solid var(--sa-border-subtle, #0b120e24)",flexShrink:0,position:"relative",zIndex:10,flexDirection:h?"row":"column-reverse",gap:"16px"},children:c?c({filter:s}):e.jsxs(e.Fragment,{children:[e.jsxs(y.Box,{style:{display:"flex",gap:"8px",flexDirection:"row",alignItems:"center",flex:1,minWidth:0},children:[s,l]}),e.jsxs(y.Box,{style:{display:"flex",gap:"8px",flexDirection:"row",alignItems:"center",flexShrink:0},children:[t,f()]})]})})},rl=({totalData:r,withMarginBottom:t=!0,withMarginTop:l=!0})=>e.jsxs(y.Box,{style:{display:"flex",gap:"4px",flexDirection:"row",alignItems:"center",marginBottom:t?"16px":void 0,marginTop:l?"16px":void 0},children:[e.jsxs(ye.Body1,{props:{color:"gray-500"},children:["Total data:"," "]}),e.jsx(ye.Body1,{children:r||0})]}),ht=({pagination:r,pageKey:t="page",perPageKey:l="perPage",defaultPerPage:c=10,showPagination:o=!0,totalData:i})=>{const{searchQueries:h,setSearchParams:s,searchParams:f}=Ge(),d=f.get(l),u=B=>{s({...h,[t]:String(B)})},p=B=>{s({...h,[l]:B,[t]:"1"})},C=(r==null?void 0:r.rangeStart)??(((r==null?void 0:r.currentPage)||0)>1?(((r==null?void 0:r.currentPage)||0)-1)*((r==null?void 0:r.perPage)||0)+1:1),w=(r==null?void 0:r.rangeEnd)??((r==null?void 0:r.totalCurrentPage)!==(r==null?void 0:r.perPage)?r==null?void 0:r.totalData:((r==null?void 0:r.currentPage)||1)*((r==null?void 0:r.totalCurrentPage)||0));return e.jsx(y.Box,{style:{display:"flex",width:"100%",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingLeft:"16px",paddingRight:"16px",paddingTop:"8px",paddingBottom:"8px",borderTop:"1px solid var(--sa-border-subtle, #0b120e24)",flexShrink:0},children:o?e.jsxs(e.Fragment,{children:[e.jsxs(y.Box,{style:{display:"flex",flexDirection:"row",gap:"8px",alignItems:"center",textWrap:"nowrap"},children:[e.jsx(v.Text,{children:"Rows Per Page: "}),e.jsx(me.Dropdown,{dropdownLists:[{label:"5",value:"5"},{label:"10",value:"10"},{label:"25",value:"25"},{label:"50",value:"50"},{label:"100",value:"100"}],onChange:B=>{p(B[0].value)},value:d?[{label:`${d} per row`,value:d}]:[{label:`${c} per row`,value:`${c}`}],defaultValue:d?[{label:`${d} per row`,value:d}]:[{label:`${c} per row`,value:`${c}`}]}),e.jsx(v.Text,{children:`${C}-${w} of ${(r==null?void 0:r.totalData)||0}`})]}),e.jsx(ir.Pagination,{currentPage:r!=null&&r.currentPage?Number(r==null?void 0:r.currentPage):1,totalCount:r!=null&&r.totalPage?Number(r==null?void 0:r.totalPage):1,onPageChange:u})]}):e.jsx(rl,{totalData:i,withMarginBottom:!1,withMarginTop:!1})})},ft=({filter:r,columnTitle:t})=>{const[l,c]=g.useState(!1),o=g.useRef(null),i=g.useRef(null),h=g.useRef(null),[s,f]=g.useState(""),[d,u]=g.useState({top:0,left:0}),p=r.selectedValues,C=g.useMemo(()=>s?r.options.filter(D=>D.label.toLowerCase().includes(s.toLowerCase())):r.options,[r.options,s]);g.useEffect(()=>{if(l&&i.current){const D=i.current.getBoundingClientRect(),H=280,Z={top:D.bottom+8};r.position==="left"||D.left+H>window.innerWidth?Z.right=window.innerWidth-D.right:Z.left=D.left,u(Z)}},[l,r.position]),g.useEffect(()=>{l&&h.current?setTimeout(()=>{var D;return(D=h.current)==null?void 0:D.focus()},50):f("")},[l]),g.useEffect(()=>{const D=H=>{o.current&&!o.current.contains(H.target)&&i.current&&!i.current.contains(H.target)&&c(!1)};return l&&document.addEventListener("mousedown",D),()=>document.removeEventListener("mousedown",D)},[l]);const w=D=>{const H=p.includes(D)?p.filter(Z=>Z!==D):[...p,D];r.onFilterChange(H)},B=()=>r.onFilterChange([]);return e.jsxs(y.Box,{style:{position:"relative"},children:[e.jsx(y.Box,{ref:i,style:{display:"flex",flexDirection:"row",alignItems:"center",cursor:"pointer"},onClick:D=>{var H;D.stopPropagation(),l||(H=r.onOpen)==null||H.call(r),c(Z=>!Z)},children:e.jsx(S.Icon,{name:l?"ChevronUp":"ChevronDown",size:"sm",style:{color:p.length>0?"var(--sa-color-brand-500, #1a4fa0)":"var(--sa-text-subtle, #8c8f97)"}})}),l&&e.jsxs(y.Box,{ref:o,style:{position:"fixed",top:`${d.top}px`,...d.left!==void 0?{left:`${d.left}px`}:{right:`${d.right}px`},backgroundColor:"white",borderRadius:"4px",minWidth:"280px",maxHeight:"400px",display:"flex",flexDirection:"column",zIndex:9999,animation:"fadeInDropdown 0.15s ease-out",border:"1px solid var(--sa-border-subtle, #0b120e24)"},children:[e.jsxs(y.Box,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingTop:"12px",paddingBottom:"12px",paddingLeft:"16px",paddingRight:"16px",borderBottom:"1px solid var(--sa-border-subtle, #0b120e24)"},children:[e.jsxs(v.Text,{fontSize:"sm",fontWeight:"semibold",color:"gray-700",children:["Filter ",t]}),p.length>0&&e.jsx(y.Box,{style:{cursor:"pointer"},children:e.jsx(v.Text,{fontSize:"xs",color:"primary",fontWeight:"semibold",onClick:D=>{D.stopPropagation(),B()},children:"CLEAR"})})]}),!r.hideSearch&&e.jsx(y.Box,{style:{paddingLeft:"16px",paddingRight:"16px",paddingTop:"8px",paddingBottom:"8px"},children:e.jsx(Ie.Input,{ref:h,placeholder:`Search ${t.toLowerCase()}...`,leftIcon:e.jsx(S.Icon,{name:"Search",size:"sm"}),value:s,onChange:D=>f(D.target.value),style:{fontSize:"14px"}})}),e.jsx(y.Box,{className:"ts-filter-dropdown-options",style:{overflowY:"auto",maxHeight:"250px",paddingLeft:"8px",paddingRight:"8px"},children:r.isLoadingOptions?e.jsxs(y.Box,{style:{paddingTop:"40px",paddingBottom:"40px",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"},children:[e.jsx(S.Icon,{name:"Loading",size:"lg",style:{color:"var(--sa-background-brand, #04254f)",animation:"spin 1s linear infinite"}}),e.jsx(v.Text,{fontSize:"sm",color:"gray-500",style:{textAlign:"center",marginTop:"8px"},children:"Loading options..."})]}):C.length>0?e.jsx(y.Box,{style:{gap:"2px",paddingTop:"4px",paddingBottom:"4px"},children:C.map(D=>e.jsxs(y.Box,{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"8px",paddingTop:"8px",paddingBottom:"8px",paddingLeft:"8px",paddingRight:"8px",cursor:"pointer",borderRadius:"8px",transition:"all 0.2s ease",backgroundColor:p.includes(D.value)?"var(--sa-color-brand-50, #e6edf6)":"transparent"},onClick:H=>{H.stopPropagation(),w(D.value)},onMouseEnter:H=>{p.includes(D.value)||(H.currentTarget.style.backgroundColor="var(--sa-background-primary, #ffffff)"),H.currentTarget.style.transform="translateX(2px)"},onMouseLeave:H=>{H.currentTarget.style.backgroundColor=p.includes(D.value)?"var(--sa-color-brand-50, #e6edf6)":"transparent",H.currentTarget.style.transform="translateX(0)"},children:[e.jsx(We.Checkbox,{checked:p.includes(D.value),onChange:()=>{}}),e.jsx(v.Text,{fontSize:"sm",fontWeight:p.includes(D.value)?"medium":"normal",color:p.includes(D.value)?"primary":"gray-700",children:D.label})]},D.value))}):e.jsxs(y.Box,{style:{paddingTop:"40px",paddingBottom:"40px",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"},children:[e.jsx(S.Icon,{name:"Search",size:"lg",style:{color:"var(--sa-text-subtle, #8c8f97)"}}),e.jsx(v.Text,{fontSize:"sm",color:"gray-500",style:{textAlign:"center",marginTop:"8px"},children:"No results found"})]})}),p.length>0&&e.jsx(y.Box,{style:{paddingTop:"8px",paddingBottom:"8px",paddingLeft:"16px",paddingRight:"16px",borderTop:"1px solid var(--sa-border-subtle, #0b120e24)",backgroundColor:"var(--sa-color-brand-50, #e6edf6)",marginTop:"auto"},children:e.jsxs(y.Box,{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"},children:[e.jsx(y.Box,{style:{backgroundColor:"var(--sa-background-brand, #04254f)",borderRadius:"12px",padding:"2px 8px",fontSize:"11px",fontWeight:600,color:"white"},children:p.length}),e.jsxs(v.Text,{fontSize:"xs",color:"primary",fontWeight:"medium",children:["item",p.length>1?"s":""," selected"]})]})})]})]})},tl=({direction:r})=>{const t="var(--sa-text-primary, #292a2e)",l="var(--sa-text-subtle, #8c8f97)",c=r==="asc"?t:l,o=r==="desc"?t:l,i=r==="asc"?1:.45,h=r==="desc"?1:.45;return e.jsxs("span",{style:{display:"inline-flex",flexDirection:"column",alignItems:"center",justifyContent:"center",flexShrink:0,lineHeight:0},"aria-hidden":!0,children:[e.jsx("svg",{width:"8",height:"5",viewBox:"0 0 8 5",style:{color:c,opacity:i,marginBottom:1},children:e.jsx("path",{d:"M4 0 L8 5 L0 5 Z",fill:"currentColor"})}),e.jsx("svg",{width:"8",height:"5",viewBox:"0 0 8 5",style:{color:o,opacity:h},children:e.jsx("path",{d:"M0 0 L8 0 L4 5 Z",fill:"currentColor"})})]})},ll=({frozen:r})=>e.jsxs("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:r?"currentColor":"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"}),e.jsx("path",{d:r?"M7 11V7a5 5 0 0 1 10 0v4":"M7 11V7a5 5 0 0 1 9.9-1"})]}),Dr="var(--sa-background-primary, #ffffff)",gt="var(--sa-background-primary-inverse, #f8f8f8)",yt=({columns:r,records:t,handleDetail:l,handleUpdate:c,handleDelete:o,isLoading:i,visibleHandleDelete:h,visibleHandleUpdate:s,visibleHandleDetail:f,showHeadBorder:d=!1,scrollParentRef:u,frozenCount:p=0,onFrozenCountChange:C,customActions:w,actionsOrder:B=["detail","update","delete","custom"],customEmptyState:D,enableColumnResize:H=!1,defaultColumnWidths:Z,onColumnWidthsChange:P,defaultMinColumnWidth:J=60,sort:T,defaultSort:se,onSortChange:Y,showActionDivider:W=!1})=>{const X=T!==void 0,[ne,ae]=g.useState(se??null),q=X?T??null:ne,K=b=>{if(b.sortKey)return b.sortKey;if(typeof b.accessor=="string")return b.accessor},te=b=>{const k=K(b);if(!k)return;let F;!q||q.key!==k?F={key:k,direction:"asc"}:q.direction==="asc"?F={key:k,direction:"desc"}:F=null,X||ae(F),Y==null||Y(F)},le=[l,c,o].filter(b=>b!==void 0).length,R=!!w,z=!!l||!!c||!!o||R,j="var(--sa-border-subtle, #0b120e24)",ee=`1px solid ${j}`,ue=`inset 1px 0 0 ${j}`,pe=`inset -1px 0 0 ${j}`,Ve=le===3?R?"178px":"140px":le===2?R?"140px":"102px":le===1?R?"112px":"74px":R?"74px":"",er=(b,k)=>{if(!k)return b;if(typeof k=="function")return k(b);if(typeof k=="string")return b[k]},[wr,rr]=g.useState(!1);g.useEffect(()=>{if(!(u!=null&&u.current))return;const b=u.current;rr(b.scrollHeight>b.clientHeight)},[t,u]);const ze=g.useRef(null),[he,tr]=g.useState([]),[je,Le]=g.useState(()=>Z??{}),Te=g.useRef(null);g.useLayoutEffect(()=>{if(!p||!ze.current){tr([]);return}const b=Array.from(ze.current.querySelectorAll("thead tr th")),k=[];let F=0;b.forEach((E,m)=>{k[m]=F,m<p&&(F+=E.offsetWidth)}),tr(k)},[p,r,t,je]);const lr=b=>{C&&C(b<p?b:b+1)},x=(b,k)=>{const F=je[b];if(F!==void 0){const E=`${F}px`;return{width:E,minWidth:E,maxWidth:E}}return k?{width:k}:{}},M=b=>H&&(b.resizable??!0),O=(b,k)=>{b.preventDefault(),b.stopPropagation();const F=b.currentTarget.closest("th");if(!F)return;const E=Math.round(F.getBoundingClientRect().width);Te.current={colIndex:k,startX:b.clientX,startWidth:E};const m=document.body.style.userSelect,oe=document.body.style.cursor;document.body.style.userSelect="none",document.body.style.cursor="col-resize";const fe=De=>{var Pe;const xe=Te.current;if(!xe)return;const Sr=((Pe=r[xe.colIndex])==null?void 0:Pe.minWidth)??J,Ne=Math.max(Sr,xe.startWidth+(De.clientX-xe.startX));Le(Oe=>Oe[xe.colIndex]===Ne?Oe:{...Oe,[xe.colIndex]:Ne})},we=()=>{document.removeEventListener("mousemove",fe),document.removeEventListener("mouseup",we),document.body.style.userSelect=m,document.body.style.cursor=oe,Te.current=null,P&&Le(De=>(P(De),De))};document.addEventListener("mousemove",fe),document.addEventListener("mouseup",we)};return e.jsx("div",{ref:ze,children:e.jsxs(Q.Table,{fullWidth:!0,children:[e.jsx(Q.Thead,{style:{height:"40px",whiteSpace:"nowrap"},children:e.jsxs(Q.Tr,{children:[r.map((b,k)=>{var Dt,bt;const F=p>0&&k<p,E=he[k]??0,m=M(b),fe=k===r.length-1&&z&&W,we=K(b),De=!!b.sortable&&!!we,xe=De&&(q==null?void 0:q.key)===we?q.direction:null,Sr=b.title||((Dt=b.accessor)==null?void 0:Dt.toString())||"",Ne=(bt=b.headerTooltip)!=null&&bt.showIcon?e.jsx(S.Icon,{name:"InfoCircle",size:"xs",style:{flexShrink:0,color:"var(--sa-icon-subtle, #8c8f97)",opacity:.75}}):null,Pe=e.jsx("span",{style:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:Sr}),Oe=De?e.jsxs("button",{type:"button",onClick:()=>te(b),title:xe==="asc"?"Sorted ascending — click to sort descending":xe==="desc"?"Sorted descending — click to clear":"Click to sort ascending",style:{flex:1,minWidth:0,display:"flex",alignItems:"center",gap:4,background:"none",border:"none",padding:0,margin:0,font:"inherit",color:"inherit",cursor:"pointer",textAlign:b.textAlign==="text-right"?"right":b.textAlign==="text-center"?"center":"left"},children:[Pe,Ne,e.jsx(tl,{direction:xe})]}):e.jsxs("span",{style:{flex:1,minWidth:0,display:"flex",alignItems:"center",gap:4},children:[Pe,Ne]});return e.jsxs(Q.Th,{style:{position:"sticky",top:0,left:F?E:void 0,zIndex:F?4:2,paddingLeft:k===0?"12px":"",borderRight:d&&!fe&&!F?ee:void 0,borderBottom:d?ee:void 0,boxShadow:d&&F?pe:void 0,backgroundColor:"var(--sa-background-primary-inverse, #f8f8f8)",textAlign:b.textAlign==="text-right"?"right":b.textAlign==="text-center"?"center":"left",...x(k,b.width)},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px",justifyContent:"space-between",minWidth:0},children:[b.headerTooltip?e.jsx(ce.Tooltip,{label:b.headerTooltip.content,position:"bottom",children:Oe}):Oe,b.filter&&e.jsx(ft,{filter:b.filter,columnTitle:b.title}),C&&e.jsx("button",{onClick:()=>lr(k),title:F?"Unfreeze column":"Freeze column",style:{background:"none",border:"none",cursor:"pointer",padding:"2px",display:"flex",alignItems:"center",flexShrink:0,color:F?"var(--sa-background-brand, #04254f)":"var(--sa-text-subtle, #8c8f97)",opacity:F?1:.45,transition:"opacity 0.15s"},children:e.jsx(ll,{frozen:F})})]}),m&&e.jsx("div",{onMouseDown:Fr=>O(Fr,k),onClick:Fr=>Fr.stopPropagation(),role:"separator","aria-orientation":"vertical",title:"Drag to resize",style:{position:"absolute",top:0,right:-3,width:6,height:"100%",cursor:"col-resize",userSelect:"none",zIndex:5,touchAction:"none"}})]},`table-head-${k}`)}),z?e.jsx(Q.Th,{style:{backgroundColor:"var(--sa-background-primary-inverse, #f8f8f8)",position:"sticky",top:0,right:0,zIndex:3,borderBottom:d?ee:void 0,boxShadow:d&&W?ue:void 0}}):null]})}),e.jsx(Q.Tbody,{children:i?e.jsx(Q.Tr,{children:e.jsx(Q.Td,{colSpan:r.length+1,children:e.jsxs(y.Box,{style:{gap:"16px"},children:[e.jsx(Se.Skeleton,{variant:"list"}),e.jsx(Se.Skeleton,{variant:"list"}),e.jsx(Se.Skeleton,{variant:"list"}),e.jsx(Se.Skeleton,{variant:"list"}),e.jsx(Se.Skeleton,{variant:"list"})]})})}):!(t!=null&&t.length)&&D?e.jsx(Q.Tr,{children:e.jsx(Q.Td,{colSpan:r.length+1,children:D})}):t==null?void 0:t.map((b,k)=>e.jsxs(Q.Tr,{style:{transition:"background-color 0.3s ease",padding:0,borderBottom:k===t.length-1&&wr?void 0:"1px solid var(--sa-border-subtle, #0b120e24)"},onMouseEnter:F=>{const E=F.currentTarget;E.style.backgroundColor=gt,Array.from(E.querySelectorAll("td")).forEach(m=>{m.style.position==="sticky"&&(m.style.backgroundColor=gt)})},onMouseLeave:F=>{const E=F.currentTarget;E.style.backgroundColor="",Array.from(E.querySelectorAll("td")).forEach(m=>{m.style.position==="sticky"&&(m.style.backgroundColor=Dr)})},children:[r.map((F,E)=>{const m=F.render?F.render(b,k,t):er(b,F.accessor),oe=p>0&&E<p,fe=he[E]??0,we=je[E]!==void 0,De=oe&&E===p-1;return e.jsx(Q.Td,{style:{position:oe?"sticky":void 0,left:oe?fe:void 0,zIndex:oe?1:void 0,backgroundColor:oe?Dr:void 0,transition:oe?"background-color 0.3s ease":void 0,paddingLeft:E===0?"12px":"",whiteSpace:"nowrap",overflow:we?"hidden":void 0,borderLeft:F.showBorderLeft?ee:void 0,borderRight:F.showBorderRight?ee:void 0,boxShadow:De?pe:void 0,textAlign:F.textAlign==="text-right"?"right":F.textAlign==="text-center"?"center":"left",...x(E,F.width)},children:typeof m=="string"?e.jsx(v.Text,{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",textAlign:F.textAlign==="text-right"?"right":F.textAlign==="text-center"?"center":"left"},children:m}):m},`row-${k}-col-${E}`)}),z?e.jsx(Q.Td,{style:{width:Ve,position:"sticky",right:0,zIndex:1,backgroundColor:Dr,boxShadow:W?ue:void 0,transition:"background-color 0.3s ease"},children:e.jsx(N.Flex,{direction:"row",align:"center",justify:"center",gap:"sm",children:B.map(F=>{const E=k===t.length-1?"top":"bottom";return F==="detail"&&l&&(f==null?void 0:f(b))!==!1?e.jsx(ce.Tooltip,{label:"Detail",position:E,children:e.jsx(A.Button,{size:"xs",variant:"outline",tone:"neutral",onClick:()=>l(b.id,b),iconLeft:e.jsx(S.Icon,{name:"DocumentClean",size:"sm",style:{color:"var(--sa-text-subtle, #8c8f97)"}})})},"detail"):F==="update"&&c&&(s==null?void 0:s(b))!==!1?e.jsx(ce.Tooltip,{label:"Update",position:E,children:e.jsx(A.Button,{size:"xs",variant:"outline",tone:"neutral",onClick:()=>c(b),iconLeft:e.jsx(S.Icon,{name:"Edit1",size:"sm",style:{color:"var(--sa-text-subtle, #8c8f97)"}})})},"update"):F==="delete"&&o&&(h==null?void 0:h(b))!==!1?e.jsx(ce.Tooltip,{label:"Delete",position:E,children:e.jsx(A.Button,{size:"xs",variant:"outline",tone:"neutral",onClick:()=>o(b.id,b),iconLeft:e.jsx(S.Icon,{name:"Trash1",size:"sm",style:{color:"var(--sa-color-error-600, #c9184a)"}})})},"delete"):F==="custom"?e.jsx(g.Fragment,{children:w==null?void 0:w(b)},"custom"):null})})}):null]},`${b}${k}`))})]})})},ol=({wrapperProps:r,dataTableProps:t,headerProps:l,footerProps:c})=>{var p;const o=g.useRef(null),[i,h]=g.useState((t==null?void 0:t.defaultFrozenCount)??0),s=(l==null?void 0:l.show)??!0,f=g.useRef(null),d=(p=t==null?void 0:t.pagination)==null?void 0:p.totalData;typeof d=="number"&&(f.current=d);const u=(c==null?void 0:c.showFooter)??(d===void 0?f.current!==0:d!==0);return e.jsxs(st,{...r,children:[s&&e.jsx(dt,{...l}),e.jsx(y.Box,{ref:o,style:{flex:1,overflowY:"auto",overflowX:"auto"},children:t?e.jsx(yt,{...t,scrollParentRef:o,frozenCount:t!=null&&t.enableFreezeColumns?i:0,onFrozenCountChange:t!=null&&t.enableFreezeColumns?h:void 0}):null}),u&&e.jsx(ht,{pagination:t==null?void 0:t.pagination,pageKey:t==null?void 0:t.pageKey,perPageKey:t==null?void 0:t.perPageKey,defaultPerPage:t==null?void 0:t.defaultPerPage,showPagination:t==null?void 0:t.showPagination,totalData:c==null?void 0:c.totalData})]})};function cl(r){return g.memo(r)}const il=cl(ol),Je=({of:r,render:t})=>g.Children.toArray(r==null?void 0:r.map((l,c,o)=>t(l,c,o))),V=({condition:r,fallback:t,children:l,loading:c,isLoading:o})=>e.jsx(e.Fragment,{children:o?c:r?l:t}),_=r=>e.jsx(v.Text,{...r,fontFamily:"Poppins",fontSize:r.fontSize||"md",fontWeight:r.fontWeight||"medium",color:r.color||"gray-700",children:r.children}),ve=r=>e.jsx(v.Text,{color:"red-600",fontSize:"sm",children:r.message}),nl=({size:r="md",direction:t="vertical",requiredTitle:l="(Required)",fullWidth:c=!1,...o})=>{var s,f,d;const i=o.hideMessageError||!1,h=t==="horizontal"?r==="sm"?342:r==="lg"?400:342:void 0;return e.jsxs(y.Box,{gap:t==="horizontal"?"spacing-96":"sm",direction:t==="horizontal"?"row":"column",...o.containerProps,children:[o.title&&e.jsx(V,{condition:!!o.inputProps.required,fallback:e.jsxs(y.Box,{direction:"column",customMaxWidth:h,fullWidth:c,children:[e.jsx(_,{children:o.title}),e.jsx(v.Text,{fontSize:r,color:"gray-500",children:o.description})]}),children:e.jsxs(y.Box,{direction:"column",customMaxWidth:h,fullWidth:c,children:[e.jsxs(N.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(_,{fontSize:r,children:o.title}),e.jsx(_,{color:"error",fontSize:r,children:l}),e.jsx(V,{condition:!!((s=o.tooltip)!=null&&s.label),children:e.jsx(ce.Tooltip,{label:(f=o.tooltip)==null?void 0:f.label,arrowPosition:(d=o.tooltip)==null?void 0:d.arrowPosition,...o.tooltip,children:e.jsx(S.Icon,{name:"InfoCircle",size:r==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(V,{condition:!!o.description,children:e.jsx(v.Text,{fontSize:r,color:"gray-500",children:o.description})})]})}),e.jsxs(y.Box,{gap:"xs",fullWidth:o.inputProps.fullWidth||!1,children:[e.jsx(Ie.Input,{ref:o.inputRef,size:r,...o.inputProps,status:o.errorMessage?"error":"default",fullWidth:!0}),!i&&o.errorMessage&&e.jsx(ve,{message:o.errorMessage}),o.inputProps.extended&&o.inputProps.extended]})]})},al=({size:r="md",direction:t="vertical",requiredTitle:l="(Required)",fullWidth:c=!1,...o})=>{var s,f,d;const i=o.hideMessageError||!1,h=t==="horizontal"?r==="sm"?342:r==="lg"?400:342:void 0;return e.jsxs(y.Box,{gap:t==="horizontal"?"spacing-96":"sm",direction:t==="horizontal"?"row":"column",onClick:o.onClickContainer,children:[o.title&&e.jsx(V,{condition:!!o.inputProps.required,fallback:e.jsxs(y.Box,{direction:"column",customMaxWidth:h,fullWidth:c,children:[e.jsx(_,{children:o.title}),e.jsx(v.Text,{fontSize:r,color:"gray-500",children:o.description})]}),children:e.jsxs(y.Box,{direction:"column",customMaxWidth:h,fullWidth:c,children:[e.jsxs(N.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(_,{fontSize:r,children:o.title}),e.jsx(_,{color:"error",fontSize:r,children:l}),e.jsx(V,{condition:!!((s=o.tooltip)!=null&&s.label),children:e.jsx(ce.Tooltip,{label:(f=o.tooltip)==null?void 0:f.label,arrowPosition:(d=o.tooltip)==null?void 0:d.arrowPosition,...o.tooltip,children:e.jsx(S.Icon,{name:"InfoCircle",size:r==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(V,{condition:!!o.description,children:e.jsx(v.Text,{fontSize:r,color:"gray-500",children:o.description})})]})}),e.jsxs(y.Box,{gap:"xs",fullWidth:o.inputProps.fullWidth||!1,children:[e.jsx(y.Box,{style:{width:o.inputProps.fullWidth?"100%":t==="horizontal"&&o.customWidth?o.customWidth:t==="horizontal"?"343px":""},children:e.jsx(me.Dropdown,{size:r,...o.inputProps,error:!!o.errorMessage})}),!i&&o.errorMessage&&e.jsx(ve,{message:o.errorMessage}),o.inputProps.extended&&o.inputProps.extended]})]})},sl=(r,t)=>typeof r=="string"&&r||t==="error"?"var(--sa-border-danger)":"var(--sa-border-subtle)",dl=r=>{var s;const[t,l]=g.useState(!1),c=f=>{f.preventDefault(),f.stopPropagation()},o=f=>{f.preventDefault(),f.stopPropagation(),f.dataTransfer&&r.handleOnFileChange(f.dataTransfer.files.item(0))},i=f=>{f.preventDefault(),l(!0)},h=f=>{f.preventDefault(),l(!1)};return e.jsxs(y.Box,{width:"width-full",paddingInline:"md",direction:"row",gap:"sm",align:"center",onClick:r.handleOnClick,onDragOver:c,onDrop:o,onDragEnter:i,onDragLeave:h,paddingBlock:"md",borderRadius:"rounded-md",style:{border:t?"1px solid var(--sa-border-info)":`1px solid ${sl(r.errorMessage,r.status)}`},children:[e.jsx(S.Icon,{name:"Upload",size:"lg",style:{width:30,height:30}}),e.jsxs(N.Flex,{direction:"column",gap:"xs",children:[e.jsxs(N.Flex,{direction:"row",gap:"xs",children:[e.jsx(v.Text,{fontWeight:"medium",color:"gray-500",style:{textWrap:"nowrap"},fontSize:r.isDesktop?"md":"sm",children:"Click your upload"}),e.jsx(v.Text,{fontWeight:"medium",style:{textWrap:"nowrap"},fontSize:r.isDesktop?"md":"sm",children:"or Drag & Drop"})]}),e.jsx(v.Text,{fontSize:"sm",color:"gray-500",children:(s=r.fileSupports)==null?void 0:s.map(f=>f.toLocaleUpperCase()).join(", ")})]})]})};function hl(r){return r.split(" ").map(t=>t[0]).join("").slice(0,2).toUpperCase()}const ut=r=>{const t={day:"2-digit",month:"short",year:"numeric"};return r.toLocaleDateString("id-ID",t)},fl=r=>{const t={Jan:0,Feb:1,Mar:2,Apr:3,Mei:4,Jun:5,Jul:6,Agu:7,Sep:8,Okt:9,Nov:10,Des:11},l=r.split(" ");if(l.length!==3)return null;const c=parseInt(l[0],10),o=t[l[1]],i=parseInt(l[2],10);return isNaN(c)||isNaN(o)||isNaN(i)?null:new Date(i,o,c)};function gl(r,t=!0){if(!r)return"Rp 0";const l=typeof r=="number"?r.toString():r;if(isNaN(Number(l)))return"Rp 0";const c=l.split("."),o=c[0].replace(/\B(?=(\d{3})+(?!\d))/g,"."),i=c.length===2?o+"."+c[1]:o;return t?"Rp"+i:i}String.prototype.toTitleCase=function(){return this.toLowerCase().split(" ").map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(" ")},String.prototype.toNumber=function(){return Number(this)};const yl=r=>{const t=r.split(" ");let l=t[0].charAt(0);return t.length>1&&(l+=""+t[1].charAt(0)),l.toUpperCase()};function ul(r){const t=typeof r=="string"?new Date(r):r;if(isNaN(t.getTime()))throw new Error("Invalid date format");const l=t.getFullYear(),c=String(t.getMonth()+1).padStart(2,"0"),o=String(t.getDate()).padStart(2,"0");return`${l}-${c}-${o}`}const pl="sa-admin",Ce=r=>`var(--${pl}-${r})`,Cl={base:{borderColor:Ce("base-border-color"),textColor:Ce("base-text-color"),iconColor:Ce("base-icon-color"),placeholderColor:Ce("base-placeholder-color")},document:{bgColor:Ce("document-bg-color")},sidebar:{bgColor:Ce("sidebar-bg-color"),borderColor:Ce("sidebar-border-color"),maxWidth:Ce("sidebar-max-width"),width:Ce("sidebar-width"),collapseWidth:Ce("sidebar-collapse-width"),collapseV2Width:Ce("sidebar-v2-collapse-width")}},xl=24*60*60*1e3,vl=r=>{const t="14px poppins",c=document.createElement("canvas").getContext("2d");c.font=t;const o=c.measureText(r).width;return Number(Math.ceil(o))},Dl=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,bl=/--+/,wl=/-$/;function Sl(r,t){return JSON.stringify(r)!==JSON.stringify(t)}function Fl(r){return/^(?:\+62|62|0)8[1-9][0-9]{7,10}$/.test(r)}function Bl(r){return/^[A-Za-z\s]+$/.test(r)}const kl=r=>{const t=/^[0-9]$/,l=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Backspace","Delete","Enter","Tab"];(r.ctrlKey||r.metaKey)&&(r.key==="a"||r.key==="c"||r.key==="v")||!t.test(r.key)&&!l.includes(r.key)&&r.preventDefault()},El=r=>{const t=/^[0-9]$/,l=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Backspace","Delete","Enter","Tab"];(r.ctrlKey||r.metaKey)&&r.key==="v"||t.test(r.key)&&!l.includes(r.key)&&r.preventDefault()},Ml=r=>{const t=/^[0-9.]$/,l=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Backspace","Delete","Enter","Tab"];(r.ctrlKey||r.metaKey)&&r.key==="v"||!t.test(r.key)&&!l.includes(r.key)&&r.preventDefault()},Ll=r=>Dl.test(r);function Tl(r){return!(bl.test(r)||wl.test(r))}const Ol=r=>{const t=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Backspace","Delete","Enter","Tab","Home","End"];if((r.ctrlKey||r.metaKey)&&["a","c","v","x"].includes(r.key.toLowerCase()))return;const l=r.currentTarget.value;/^[0-9]$/.test(r.key)||r.key==="."&&!l.includes(".")||r.key==="-"&&l.length===0&&!l.includes("-")||t.includes(r.key)||r.preventDefault()},ml=r=>{const t=document.getElementById(r);if(t){const l=t.getBoundingClientRect(),c=window.scrollY+l.top-80;window.scrollTo({top:c,behavior:"smooth"})}};function Il(r){const t=r.toLowerCase();if(["kb","mb","gb"].find(i=>t.endsWith(i)))return r;const o=Number(r);if(isNaN(o))throw new Error("Invalid size format");return o>=1e6?`${(o/1e6).toFixed(2)}MB`:o>=1e3?`${(o/1e3).toFixed(2)}KB`:`${o}B`}function Wl(r){const t=r.split("/");return t[t.length-1]}const Hl=r=>{var t,l;return e.jsxs(y.Box,{width:"width-full",paddingInline:"md",height:"height-full",direction:"row",justify:"space-between",align:"center",onClick:r.handleOnClickFile,fullHeight:!0,paddingBlock:"md",id:"file-item",borderRadius:"rounded-md",style:{border:"1px solid var(--sa-border-subtle)",cursor:"pointer"},children:[e.jsxs(N.Flex,{direction:"row",align:"center",gap:"sm",style:{flex:1,minWidth:0},children:[e.jsx(S.Icon,{name:"DocumentFilled",size:"lg",style:{color:"var(--sa-icon-brand)",width:30,height:30,flexShrink:0}}),e.jsxs(N.Flex,{direction:"column",style:{minWidth:0,flex:1},children:[e.jsx(v.Text,{fontWeight:"bold",style:{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},children:r.defaultFile?Wl(r.defaultFile.url):(t=r.fileSelected)==null?void 0:t.name}),r.defaultFile?(r.defaultFile.size||r.defaultFile.date)&&e.jsxs(N.Flex,{direction:"row",gap:"xs",align:"center",children:[r.defaultFile.size&&e.jsx(v.Text,{fontSize:"sm",fontWeight:"medium",children:r.defaultFile.size}),r.defaultFile.size&&r.defaultFile.date&&e.jsx(S.Icon,{name:"Dot",size:"xs"}),r.defaultFile.date&&e.jsx(v.Text,{fontSize:"sm",fontWeight:"medium",style:{textWrap:"nowrap"},children:r.defaultFile.date})]}):e.jsxs(N.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(v.Text,{fontSize:"sm",fontWeight:"medium",children:Il(((l=r.fileSelected)==null?void 0:l.size.toString())||"100000")}),e.jsx(S.Icon,{name:"Dot",size:"xs"}),e.jsx(v.Text,{fontSize:"sm",fontWeight:"medium",style:{textWrap:"nowrap"},children:ut(new Date)})]})]})]}),e.jsx(A.Button,{size:"xs",variant:"tertiary",tone:"error",type:"button",onClick:c=>{c.stopPropagation(),r.handleOnDeleteFile()},iconLeft:e.jsx(S.Icon,{name:"Trash1"})})]})},pt=({status:r="default",labelPosition:t="outside-top",...l})=>{var C;const c=g.useRef(null),o=()=>{if(l.defaultFile){window.open(l.defaultFile.url);return}c.current&&c.current.click()},i=$.useMediaQuery("md"),h=r==="error"||typeof l.errorMessage=="string"&&!!l.errorMessage,s=l.label?e.jsxs(N.Flex,{direction:"row",align:"center",gap:"xs",children:[e.jsx(v.Text,{style:{fontSize:"14px",fontWeight:500,color:"var(--sa-text-primary)"},children:l.label}),l.optional&&e.jsx("span",{style:{background:"var(--sa-background-neutral)",border:"1px solid var(--sa-border-subtle)",borderRadius:"4px",padding:"0 8px",fontSize:"10px",fontWeight:500,lineHeight:"18px",color:"var(--sa-text-primary)",display:"inline-flex",alignItems:"center"},children:"Optional"}),l.required&&e.jsx("span",{style:{fontSize:"14px",fontWeight:500,color:"var(--sa-text-error)"},children:"*"})]}):null,f=l.description?e.jsx(v.Text,{style:{fontSize:"12px",fontWeight:400,color:"var(--sa-text-subtlest, #6b6e76)",lineHeight:"18px"},children:l.description}):null,d=e.jsxs(e.Fragment,{children:[l.helperText&&e.jsx(v.Text,{style:{fontSize:"12px",fontWeight:400,color:"var(--sa-text-subtlest, #6b6e76)",lineHeight:"18px"},children:l.helperText}),l.errorText&&r==="error"&&e.jsx(v.Text,{style:{fontSize:"12px",fontWeight:400,color:"var(--sa-text-error, #a4133c)",lineHeight:"18px"},children:l.errorText}),l.errorMessage&&!l.errorText&&e.jsx(v.Text,{style:{fontSize:"12px",fontWeight:400,color:"var(--sa-text-error, #a4133c)",lineHeight:"18px"},children:l.errorMessage})]}),u=e.jsx("input",{type:"file",style:{display:"none"},ref:c,onChange:w=>{var B;return l.handleOnChangeFile(((B=w.target.files)==null?void 0:B.item(0))||null)},accept:(C=l.fileSupportOption)==null?void 0:C.map(w=>"."+(w==null?void 0:w.toLowerCase())).join(", ")}),p=e.jsxs(y.Box,{fullWidth:!0,style:{minHeight:"69px"},borderRadius:"rounded-md",display:"flex",justify:"center",align:"center",cursor:"pointer",gap:"md",...l.containerProps,children:[u,(l.fileSelected||l.defaultFile)&&e.jsx(Hl,{fileSelected:l.fileSelected,defaultFile:l.defaultFile,handleOnDeleteFile:l.handleOnDeleteFile,handleOnClickFile:o}),!l.fileSelected&&!l.defaultFile&&e.jsx(dl,{fileSupports:l.fileSupportOption,isDesktop:i,errorMessage:h?l.errorText||l.errorMessage||" ":void 0,status:h?"error":"default",handleOnClick:o,handleOnFileChange:l.handleOnChangeFile})]});return t==="outside-left"?e.jsxs(N.Flex,{direction:"row",align:"flex-start",gap:"sm",style:{width:"100%"},children:[e.jsxs(N.Flex,{direction:"column",gap:"xs",style:{width:"40%",minWidth:"120px",paddingTop:"10px"},children:[s,f]}),e.jsxs(N.Flex,{direction:"column",gap:"sm",style:{flex:1,minWidth:0},children:[p,d]})]}):e.jsxs(N.Flex,{direction:"column",gap:"sm",style:{width:"100%"},children:[s,f,p,d]})},Al=({size:r="md",direction:t="vertical",requiredTitle:l="(Required)",fullWidth:c=!1,...o})=>{var s,f,d;const i=o.hideMessageError||!1,h=t==="horizontal"?r==="sm"?342:r==="lg"?400:342:void 0;return e.jsxs(y.Box,{gap:t==="horizontal"?"spacing-96":"sm",direction:t==="horizontal"?"row":"column",...o.containerProps,children:[o.title&&e.jsx(V,{condition:!!o.inputProps.required,fallback:e.jsxs(y.Box,{direction:"column",customMaxWidth:h,fullWidth:c,children:[e.jsx(_,{children:o.title}),e.jsx(v.Text,{fontSize:r,color:"gray-500",children:o.description})]}),children:e.jsxs(y.Box,{direction:"column",customMaxWidth:h,fullWidth:c,children:[e.jsxs(N.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(_,{fontSize:r,children:o.title}),e.jsx(_,{color:"error",fontSize:r,children:l}),e.jsx(V,{condition:!!((s=o.tooltip)!=null&&s.label),children:e.jsx(ce.Tooltip,{label:(f=o.tooltip)==null?void 0:f.label,arrowPosition:(d=o.tooltip)==null?void 0:d.arrowPosition,...o.tooltip,children:e.jsx(S.Icon,{name:"InfoCircle",size:r==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(V,{condition:!!o.description,children:e.jsx(v.Text,{fontSize:r,color:"gray-500",children:o.description})})]})}),e.jsxs(N.Flex,{direction:"column",gap:"xs",children:[e.jsx(pt,{...o.inputProps,status:o.errorMessage?"error":"default"}),!i&&o.errorMessage&&e.jsx(ve,{message:o.errorMessage})]})]})},Vl=({size:r="md",direction:t="vertical",requiredTitle:l="(Required)",fullWidth:c=!1,required:o=!1,...i})=>{var f,d,u,p;const h=i.hideMessageError||!1,s=t==="horizontal"?r==="sm"?342:r==="lg"?400:342:void 0;return e.jsxs(y.Box,{gap:t==="horizontal"||t==="horizontal-inline"?"spacing-96":"sm",direction:t==="horizontal"||t==="horizontal-inline"?"row":"column",...i.containerProps,children:[i.title&&e.jsx(V,{condition:!!o,fallback:e.jsxs(y.Box,{direction:"column",customMaxWidth:s,fullWidth:c,children:[e.jsx(_,{children:i.title}),e.jsx(ye.Body3,{props:{color:"gray-500"},children:i.description})]}),children:e.jsxs(y.Box,{direction:"column",customMaxWidth:s,fullWidth:c,children:[e.jsxs(N.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(_,{fontSize:r,children:i.title}),e.jsx(_,{color:"error",fontSize:r,children:l}),e.jsx(V,{condition:!!((f=i.tooltip)!=null&&f.label),children:e.jsx(ce.Tooltip,{label:(d=i.tooltip)==null?void 0:d.label,arrowPosition:(u=i.tooltip)==null?void 0:u.arrowPosition,...i.tooltip,children:e.jsx(S.Icon,{name:"InfoCircle",size:r==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(V,{condition:!!i.description,children:e.jsx(v.Text,{fontSize:r,color:"gray-500",children:i.description})})]})}),e.jsx(y.Box,{gap:t==="horizontal-inline"?"xl":"md",direction:t==="horizontal-inline"?"row":"column",align:"flex-start",children:e.jsx(Je,{of:(p=i.checkBoxesList)==null?void 0:p.map(C=>({...C,isChecked:i.checkBoxesAreChecked.includes(C.id)})),render:C=>C.renderBadge?e.jsxs(y.Box,{direction:"row",justify:"space-between",gap:"lg",...i.badgeContainerProps,children:[e.jsx(We.Checkbox,{name:C.name,value:C.id,checked:C.isChecked,onChange:w=>i.onChecked(w.target.value,C),label:C.name,description:C.description}),C.renderBadge]}):e.jsx(We.Checkbox,{name:C.name,value:C.id,checked:C.isChecked,onChange:w=>i.onChecked(w.target.value,C),label:C.name,description:C.description})})}),!h&&i.errorMessage&&e.jsx(ve,{message:i.errorMessage})]})},zl=({position:r="vertical",size:t="md",fullWidth:l=!1,...c})=>{var i;const o=r==="horizontal-inline"||r==="horizontal-block"?t==="sm"?342:t==="lg"?400:342:void 0;return e.jsxs(y.Box,{gap:r==="horizontal-inline"||r==="horizontal-block"?"spacing-96":"sm",direction:r==="horizontal-inline"||r==="horizontal-block"?"row":"column",children:[e.jsx(V,{condition:!!c.description||!!c.title,children:e.jsxs(y.Box,{direction:"column",customMaxWidth:o,fullWidth:l,children:[c.title&&e.jsx(_,{children:c.title}),e.jsx(V,{condition:!!c.description,children:e.jsx(v.Text,{color:"gray-500",children:c.description})})]})}),e.jsx(y.Box,{gap:"sm",direction:r==="horizontal"||r==="horizontal-inline"?"row":"column",align:"flex-start",flexWrap:"wrap",children:e.jsx(Je,{of:(i=c.radioList)==null?void 0:i.map(h=>({...h,isChecked:c.radioIsChecked===h.id})),render:({value:h,id:s,isChecked:f,subInput:d,label:u,description:p})=>e.jsxs(y.Box,{gap:"xs",customMaxWidth:o,children:[e.jsx(ar.Radio,{id:`${s.toString()}-${h}`,name:c.groupName||u,label:u,value:h,checked:f,onChange:C=>c.onChecked({id:s,label:C.target.name,value:C.target.value}),disabled:c.disableAll},s),p&&e.jsx(v.Text,{color:"gray-500",style:{marginLeft:28},children:p}),d]})})}),c.errorMessage&&e.jsx(ve,{message:c.errorMessage})]})},jl=({size:r="md",direction:t="vertical",requiredTitle:l="(Required)",fullWidth:c=!1,...o})=>{var s,f,d;const i=o.hideMessageError||!1,h=t==="horizontal"?r==="sm"?342:r==="lg"?400:342:void 0;return e.jsxs(y.Box,{gap:t==="horizontal"?"spacing-96":"sm",direction:t==="horizontal"?"row":"column",...o.containerProps,children:[o.title&&e.jsx(V,{condition:!!o.inputProps.required,fallback:e.jsxs(y.Box,{direction:"column",customMaxWidth:h,fullWidth:c,children:[e.jsx(_,{children:o.title}),e.jsx(v.Text,{fontSize:r,color:"gray-500",children:o.description})]}),children:e.jsxs(y.Box,{direction:"column",customMaxWidth:h,fullWidth:c,children:[e.jsxs(N.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(_,{fontSize:r,children:o.title}),e.jsx(_,{color:"error",fontSize:r,children:l}),e.jsx(V,{condition:!!((s=o.tooltip)!=null&&s.label),children:e.jsx(ce.Tooltip,{label:(f=o.tooltip)==null?void 0:f.label,arrowPosition:(d=o.tooltip)==null?void 0:d.arrowPosition,...o.tooltip,children:e.jsx(S.Icon,{name:"InfoCircle",size:r==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(V,{condition:!!o.description,children:e.jsx(v.Text,{fontSize:r,color:"gray-500",children:o.description})})]})}),e.jsxs(N.Flex,{direction:"column",gap:"xs",children:[e.jsx(nr.Textarea,{ref:o.inputRef,size:r,...o.inputProps,status:o.errorMessage?"error":"default"}),!i&&o.errorMessage&&e.jsx(ve,{message:o.errorMessage})]})]})},Nl=({size:r="md",direction:t="vertical",requiredTitle:l="(Required)",required:c=!1,fullWidth:o=!1,...i})=>{var s,f,d;const h=t==="horizontal"?r==="sm"?342:r==="lg"?400:342:void 0;return e.jsxs(y.Box,{gap:t==="horizontal"?"spacing-96":"sm",direction:t==="horizontal"?"row":"column",...i.containerProps,children:[i.title&&e.jsx(V,{condition:c,fallback:e.jsxs(y.Box,{direction:"column",customMaxWidth:h,fullWidth:o,children:[e.jsx(_,{children:i.title}),e.jsx(v.Text,{fontSize:r,color:"gray-500",children:i.titleDescription})]}),children:e.jsxs(y.Box,{direction:"column",customMaxWidth:h,fullWidth:o,children:[e.jsxs(N.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(_,{fontSize:r,children:i.title}),e.jsx(_,{color:"error",fontSize:r,children:l}),e.jsx(V,{condition:!!((s=i.tooltip)!=null&&s.label),children:e.jsx(ce.Tooltip,{label:(f=i.tooltip)==null?void 0:f.label,arrowPosition:(d=i.tooltip)==null?void 0:d.arrowPosition,...i.tooltip,children:e.jsx(S.Icon,{name:"InfoCircle",size:r==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(V,{condition:!!i.titleDescription,children:e.jsx(v.Text,{fontSize:r,color:"gray-500",children:i.titleDescription})})]})}),e.jsx(_e.Toggle,{checked:i.checked,onChange:i.onChange,label:i.label,description:i.description}),i.errorMessage&&e.jsx(ve,{message:i.errorMessage})]})},Pl=({variant:r="primary",size:t="md",...l})=>{const c=Me.useColor(),o=h=>{var f,d,u,p,C,w;if(!h)return;const s=l.disabled?"var(--sa-text-disable, #181a198f)":r==="secondary"?"var(--sa-text-subtle, #8c8f97)":r==="secondary-danger"?(d=(f=c==null?void 0:c.computed)==null?void 0:f.red)==null?void 0:d[600]:r==="secondary-primary"?(p=(u=c==null?void 0:c.computed)==null?void 0:u.blue)==null?void 0:p[700]:(w=(C=c==null?void 0:c.computed)==null?void 0:C.gray)==null?void 0:w[50];return e.jsx(S.Icon,{name:h,size:t,style:{color:s}})},i=()=>{var s,f,d,u;if(r!=="secondary-danger"&&r!=="secondary-primary")return l.title;const h={color:l.disabled?"var(--sa-text-disable, #181a198f)":r==="secondary-danger"?(f=(s=c==null?void 0:c.computed)==null?void 0:s.red)==null?void 0:f[600]:(u=(d=c==null?void 0:c.computed)==null?void 0:d.blue)==null?void 0:u[700]};switch(t){case"xs":return e.jsx(ye.Body2,{props:{style:h},children:l.title});case"sm":case"md":return e.jsx(ye.SubH3,{props:{style:h},children:l.title});case"lg":return e.jsx(ye.SubH2,{props:{style:h},children:l.title});default:return l.title}};return e.jsx(A.Button,{fullWidth:!0,disabled:l.disabled,primary:r==="primary",secondary:r==="secondary"||r==="secondary-danger"||r==="secondary-primary",success:r==="success",onClick:l.onClick,type:l.type,iconLeft:o(l.iconLeft),iconRight:o(l.iconRight),size:t,children:i()})},_l=r=>e.jsx(ye.H5,{props:{...r},children:r.title}),Zl=({size:r="md",direction:t="vertical",requiredTitle:l="(Required)",fullWidth:c=!1,...o})=>{var s,f,d;const i=o.hideMessageError||!1,h=t==="horizontal"?r==="sm"?342:r==="lg"?400:342:void 0;return e.jsxs(y.Box,{gap:t==="horizontal"?"spacing-96":"sm",direction:t==="horizontal"?"row":"column",onClick:o.onClickContainer,children:[o.title&&e.jsx(V,{condition:!!o.inputProps.required,fallback:e.jsxs(y.Box,{direction:"column",customMaxWidth:h,fullWidth:c,children:[e.jsx(_,{children:o.title}),e.jsx(v.Text,{fontSize:r,color:"gray-500",children:o.description})]}),children:e.jsxs(y.Box,{direction:"column",customMaxWidth:h,fullWidth:c,children:[e.jsxs(N.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(_,{fontSize:r,children:o.title}),e.jsx(_,{color:"error",fontSize:r,children:l}),e.jsx(V,{condition:!!((s=o.tooltip)!=null&&s.label),children:e.jsx(ce.Tooltip,{label:(f=o.tooltip)==null?void 0:f.label,arrowPosition:(d=o.tooltip)==null?void 0:d.arrowPosition,...o.tooltip,children:e.jsx(S.Icon,{name:"InfoCircle",size:r==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(V,{condition:!!o.description,children:e.jsx(v.Text,{fontSize:r,color:"gray-500",children:o.description})})]})}),e.jsxs(N.Flex,{direction:"column",gap:"xs",children:[e.jsx(y.Box,{style:{width:t==="horizontal"&&o.customWidth?o.customWidth:t==="horizontal"?"343px":""},children:e.jsx(or.StarasiaDate,{size:r,...o.inputProps,status:o.errorMessage?"error":void 0})}),!i&&o.errorMessage&&e.jsx(ve,{message:o.errorMessage})]})]})};async function ql(r,t){const l=new Image;l.src=r,await new Promise((i,h)=>{l.onload=i,l.onerror=h});const c=document.createElement("canvas");c.width=t.width,c.height=t.height;const o=c.getContext("2d",{alpha:!0});if(!o)throw new Error("No 2D context");return o.drawImage(l,t.x,t.y,t.width,t.height,0,0,t.width,t.height),new Promise((i,h)=>{c.toBlob(s=>{if(!s)return h("Canvas is empty");const f=new File([s],"cropped.png",{type:"image/png"});i(f)},"image/png")})}const Ct={"1:1":1,"4:3":4/3,"16:9":16/9,"3:4":3/4,"9:16":9/16,"2:3":2/3,"3:2":3/2,"32:9":32/9},xt=g.forwardRef(({handleUpload:r,urlImage:t,isUploading:l,croppedImage:c,setCroppedImage:o,size:i="96",aspect:h="1:1",containerProps:s,maxFileSize:f=2,onError:d},u)=>{const p=$.useMediaQuery("md"),[C,w]=g.useState(!1),[B,D]=g.useState(null),[H,Z]=g.useState(!1),[P,J]=g.useState({x:0,y:0}),[T,se]=g.useState(1),[Y,W]=g.useState(null);g.useEffect(()=>{t===null&&o(null)},[t]);const X=g.useCallback((z,j)=>{W(j)},[]),ne=z=>{var ue;const j=(ue=z.target.files)==null?void 0:ue[0];if(!j)return;const ee=new FileReader;ee.onload=()=>{D(ee.result),Z(!0)},ee.readAsDataURL(j)},ae=async()=>{if(!(!B||!Y))try{const z=await ql(B,Y);if(f&&z.size>f*1024*1024){d==null||d(`Ukuran file maksimal ${f}MB`);return}r==null||r(z);const j=URL.createObjectURL(z);o(j,z),Z(!1)}catch{d==null||d("Gagal memproses gambar")}},q=g.useRef(null),K=()=>{q.current&&q.current.click()};g.useImperativeHandle(u,()=>({openFileDialog:()=>{var z;(z=q.current)==null||z.click()}}));const te=parseInt(i,10),de=Ct[h];let le,R;return de>=1?(R=te,le=te*de):(le=te,R=te/de),e.jsxs(y.Box,{display:"flex",position:"relative",bg:(s==null?void 0:s.bg)||"gray-200",borderStyle:(s==null?void 0:s.borderStyle)||"border-none",borderColor:(s==null?void 0:s.borderColor)||"gray-200",borderWidth:(s==null?void 0:s.borderWidth)||"border-2",borderRadius:(s==null?void 0:s.borderRadius)||"rounded-md",overflow:"overflow-hidden",align:"center",justify:"center",style:{width:s!=null&&s.fullWidth?"100%":`${le}px`,height:s!=null&&s.fullWidth?"auto":`${R}px`,aspectRatio:de,flexShrink:0},onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1),children:[c||t?e.jsx("img",{src:c||t||void 0,alt:"Profile",style:{objectFit:"cover",width:"100%",height:"100%"}}):e.jsx(y.Box,{display:"flex",direction:"column",align:"center",justify:"center",padding:"spacing-4",children:e.jsx(S.Icon,{name:"Image",style:{color:"var(--sa-text-subtle, #8c8f97)",width:Number(i)/2<40?Number(i)/2:40,height:Number(i)/2<40?Number(i)/2:40}})}),e.jsxs(y.Box,{position:"absolute",display:"flex",align:"center",justify:"center",cursor:"pointer",style:{inset:0,backgroundColor:"var(--sa-color-black-alpha-a30, #080f214a)",opacity:C?1:0,transition:"opacity 0.3s ease-in-out"},onClick:K,children:[e.jsx("input",{ref:q,type:"file",accept:"image/*",onChange:ne,disabled:l,style:{display:"none"}}),e.jsxs(y.Box,{display:"flex",align:"center",gap:"spacing-2",direction:"row",children:[e.jsx(S.Icon,{name:"Edit3",style:{color:"var(--sa-background-primary, #ffffff)"}}),e.jsx(V,{condition:i.toNumber()>80,children:e.jsx(v.Text,{color:"gray-50",fontSize:i.toNumber()>80?"sm":"md",fontWeight:"medium",children:"Edit Image"})})]})]}),l&&e.jsx(y.Box,{position:"absolute",display:"flex",align:"center",justify:"center",style:{inset:0,zIndex:20,backgroundColor:"var(--sa-color-white-alpha-a80, #e5e9f640)"},children:e.jsx(y.Box,{borderRadius:"rounded-full",style:{animation:"spin 1s linear infinite",border:"2px solid transparent",height:"2rem",width:"2rem"},borderColor:"blue-600"})}),H&&sr.createPortal(e.jsx("div",{style:{position:"fixed",inset:0,zIndex:19999,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(0,0,0,0.6)"},onClick:()=>Z(!1),children:e.jsxs("div",{style:{backgroundColor:"var(--sa-background-primary)",borderRadius:"var(--sa-radii-md)",boxShadow:"0 20px 60px rgba(0,0,0,0.3)",overflow:"hidden",width:p?h==="1:1"?"min(90vw, 480px)":`min(90vw, ${le*2}px)`:"calc(100vw - 2rem)",display:"flex",flexDirection:"column"},onClick:z=>z.stopPropagation(),children:[e.jsx("div",{style:{position:"relative",width:"100%",height:"20rem",backgroundColor:"var(--sa-color-gray-100)"},children:B&&e.jsx(wt,{image:B,crop:P,zoom:T,aspect:h?Ct[h]:void 0,onCropChange:J,onZoomChange:se,onCropComplete:X,objectFit:"contain",minZoom:.5,restrictPosition:!1})}),e.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:"0.5rem",padding:"0.75rem 1rem",borderTop:"1px solid var(--sa-border-subtle)"},children:[e.jsx(A.Button,{size:"sm",secondary:!0,onClick:()=>Z(!1),children:"Cancel"}),e.jsx(A.Button,{size:"sm",primary:!0,onClick:ae,children:"Crop"})]})]})}),document.body)]})}),Ql=({size:r="md",direction:t="vertical",requiredTitle:l="(Required)",fullWidth:c=!1,required:o=!1,...i})=>{var f,d,u;const h=i.hideMessageError||!1,s=t==="horizontal"?r==="sm"?342:r==="lg"?400:342:void 0;return e.jsxs(y.Box,{gap:t==="horizontal"?"spacing-96":"sm",direction:t==="horizontal"?"row":"column",...i.containerProps,children:[i.title&&e.jsx(V,{condition:!!o,fallback:e.jsxs(y.Box,{direction:"column",customMaxWidth:s,fullWidth:c,children:[e.jsx(_,{children:i.title}),e.jsx(v.Text,{fontSize:r,color:"gray-500",children:i.description})]}),children:e.jsxs(y.Box,{direction:"column",customMaxWidth:s,fullWidth:c,children:[e.jsxs(N.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(_,{fontSize:r,children:i.title}),e.jsx(_,{color:"error",fontSize:r,children:l}),e.jsx(V,{condition:!!((f=i.tooltip)!=null&&f.label),children:e.jsx(ce.Tooltip,{label:(d=i.tooltip)==null?void 0:d.label,arrowPosition:(u=i.tooltip)==null?void 0:u.arrowPosition,...i.tooltip,children:e.jsx(S.Icon,{name:"InfoCircle",size:r==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(V,{condition:!!i.description,children:e.jsx(v.Text,{fontSize:r,color:"gray-500",children:i.description})})]})}),e.jsxs(N.Flex,{direction:"column",gap:"xs",children:[e.jsx(xt,{...i.inputProps}),!h&&i.errorMessage&&e.jsx(ve,{message:i.errorMessage})]})]})},Gl=({size:r="md",direction:t="vertical",requiredTitle:l="(Required)",fullWidth:c=!1,...o})=>{var h,s,f;const i=t==="horizontal"?r==="sm"?342:r==="lg"?400:342:void 0;return e.jsxs(y.Box,{gap:t==="horizontal"?"spacing-96":"sm",direction:t==="horizontal"?"row":"column",...o.containerProps,children:[o.title&&e.jsx(V,{condition:!!o.inputProps.required,fallback:e.jsxs(y.Box,{direction:"column",customMaxWidth:i,fullWidth:c,children:[e.jsx(_,{children:o.title}),e.jsx(v.Text,{fontSize:r,color:"gray-500",children:o.description})]}),children:e.jsxs(y.Box,{direction:"column",customMaxWidth:i,fullWidth:c,children:[e.jsxs(N.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(_,{fontSize:r,children:o.title}),e.jsx(_,{color:"error",fontSize:r,children:l}),e.jsx(V,{condition:!!((h=o.tooltip)!=null&&h.label),children:e.jsx(ce.Tooltip,{label:(s=o.tooltip)==null?void 0:s.label,arrowPosition:(f=o.tooltip)==null?void 0:f.arrowPosition,...o.tooltip,children:e.jsx(S.Icon,{name:"InfoCircle",size:r==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(V,{condition:!!o.description,children:e.jsx(v.Text,{fontSize:r,color:"gray-500",children:o.description})})]})}),o.inputProps.extended&&o.inputProps.extended]})},Ul=({items:r,id:t,handleOnUpdate:l,width:c,toggleShow:o=!0,disabled:i=!1})=>{var u;const[h,s]=g.useState([]);g.useEffect(()=>{r&&s([...r.map(p=>({id:p.id,isActive:p.isActive}))])},[r]);const f=(u=h.find(p=>p.id===t))==null?void 0:u.isActive,d=g.useCallback(()=>{s(p=>p.map(C=>C.id===t?{...C,isActive:!C.isActive}:C)),l&&l(!f)},[t,l,f]);return e.jsx(y.Box,{direction:"row",gap:"md",style:{width:c},children:o&&e.jsx(_e.Toggle,{disabled:i,checked:f,onChange:d,label:f?"Active":"Inactive"})})},Jl={InputText:nl,InputDropdown:al,InputSingleFile:Al,CheckBoxOptions:Vl,RadioOptions:zl,InputTextArea:jl,ToggleForm:Nl,ActionButton:Pl,FormTitle:_l,InputDate:Zl,InputImgFile:Ql,Custom:Gl},vt=({customBottom:r})=>{const[t,l]=g.useState(!1),c=()=>{window.scrollY>window.screenY?l(!0):l(!1)},o=()=>{window.scrollTo({top:0,behavior:"smooth"})};return g.useEffect(()=>(window.addEventListener("scroll",c),()=>{window.removeEventListener("scroll",c)}),[]),e.jsx(y.Box,{style:{position:"fixed",bottom:0,right:0},children:e.jsx(y.Box,{position:"absolute",style:{bottom:r||"1.6rem",right:"2rem",transform:t?"scale(1)":"scale(0)",transition:"transform 0.2s ease-in-out"},children:e.jsx(A.Button,{secondary:!0,size:"xs",onClick:o,type:"button",iconLeft:e.jsx(S.Icon,{width:16,size:"xs",name:"ArrowPullUp",style:{color:"var(--sa-background-brand, #04254f)"}})})})})},Yl=({pageLayout:r,children:t,wrapperProps:l,containerProps:c})=>{const o=$.useMediaQuery("md"),i=(c==null?void 0:c.customWidth)??264;return e.jsxs(y.Box,{display:"block",direction:"row",...l,style:{marginRight:o?i:24,...(l==null?void 0:l.style)??{}},children:[r,e.jsx(y.Box,{show:"desktop",variant:"aside",position:"fixed",top:"top-0",bottom:"bottom-0",right:"right-0",customWidth:264,borderStyle:"border-solid-l",borderWidth:"border-l",...c,style:{marginTop:"4rem",backgroundColor:"var(--sa-background-white, #ffffff)",borderColor:"var(--sa-border-subtle, #0b120e24)",...(c==null?void 0:c.style)??{}},children:t})]})},Xl=({children:r,withScrollToTopButton:t=!1,scrollToTopButtonProps:l,containerProps:c})=>e.jsx(y.Box,{position:"absolute",width:"width-full",style:{zIndex:"var(--app-footer-zindex, 999)"},children:e.jsxs(y.Box,{position:"fixed",bottom:"bottom-0",right:"right-0",padding:"spacing-32",height:"height-24",bg:"gray-50",direction:"row",align:"center",display:"flex",style:{left:"var(--app-sidebar-width, 0px)",transition:"left 0.3s ease-in-out",borderColor:"var(--sa-border-subtle, #0b120e24)"},justify:(c==null?void 0:c.justify)||"flex-end",borderStyle:"border-solid-t",borderWidth:"border-t",children:[t&&e.jsx(vt,{...l,customBottom:(l==null?void 0:l.customBottom)||"5.7rem"}),r]})}),Kl=({fields:r})=>e.jsx(y.Box,{display:"flex",direction:"column",gap:"lg",children:e.jsx(Je,{of:r,render:(t,l)=>e.jsx($l,{...t},l)})}),$l=({title:r,value:t,icon:l})=>e.jsxs(y.Box,{display:"flex",direction:"column",gap:"sm",children:[l?e.jsxs(y.Box,{display:"flex",direction:"row",align:"center",gap:"xs",children:[e.jsx(S.Icon,{name:l,color:"subtle"}),e.jsx(v.Text,{color:"gray-500",variant:"sub-h3",children:r})]}):e.jsx(v.Text,{color:"gray-500",variant:"sub-h3",children:r}),typeof t=="string"?e.jsx(v.Text,{variant:"sub-h3",children:t}):t]}),U={silhouette:"#A7B0AC",accent:"#78867F"};function Rl({width:r,height:t}){return e.jsx(e.Fragment,{children:e.jsxs("svg",{width:r||"100",height:t||"90",viewBox:"0 0 102 90",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M51.0002 16.8145C36.0811 16.8145 24.8296 21.3801 24.8296 27.4328V76.5344C24.8296 82.573 36.0799 87.127 51.0002 87.127C65.9204 87.127 77.1707 82.573 77.1707 76.5344V27.4328C77.1707 21.3801 65.9204 16.8145 51.0002 16.8145ZM51.0002 19.1582C65.0602 19.1582 74.8582 23.5187 74.8582 27.4328C74.8582 30.1363 70.1615 32.9664 63.1708 34.4746C55.861 36.0543 46.1416 36.0543 38.8318 34.4746C31.8399 32.9664 27.1432 30.1363 27.1432 27.4328C27.1432 23.5187 36.9402 19.1582 51.0002 19.1582ZM74.8582 31.9199V43.784C74.8582 46.532 70.3142 49.2941 63.2737 50.8328C63.2391 50.8375 63.2032 50.8434 63.1697 50.8504C57.6867 52.0352 50.8498 52.3305 44.6893 51.7387C42.6358 51.5418 40.6575 51.2453 38.8306 50.8504C38.8029 50.8445 38.7682 50.8387 38.7347 50.8352C32.5707 49.4898 28.318 47.2047 27.3514 44.8141C27.2138 44.4719 27.1421 44.1285 27.1421 43.7852V31.9199C27.1999 31.9715 27.2693 32.0207 27.3294 32.0723C27.5052 32.2246 27.6902 32.3758 27.8844 32.5234C27.9954 32.609 28.1064 32.6934 28.2232 32.7766C28.4371 32.9301 28.6637 33.0801 28.8973 33.2289C29.0083 33.2992 29.1135 33.3719 29.2291 33.441C29.5702 33.6473 29.9275 33.8488 30.3044 34.0434C30.3195 34.0516 30.3333 34.0598 30.3484 34.068C30.7427 34.2707 31.1601 34.4652 31.5925 34.6551C31.7301 34.716 31.8758 34.7734 32.0168 34.832C32.3221 34.9598 32.6331 35.0852 32.9557 35.207C33.1303 35.2727 33.3095 35.3359 33.4887 35.4004C33.8032 35.5117 34.1247 35.6207 34.4542 35.7273C34.6404 35.7871 34.8254 35.8469 35.015 35.9043C35.3734 36.0133 35.7434 36.1164 36.1181 36.2184C36.2915 36.2652 36.4603 36.3145 36.6361 36.3602C37.1911 36.5031 37.7588 36.6402 38.3485 36.7668C42.1595 37.5906 46.5336 38.0254 50.999 38.0254C55.4644 38.0254 59.8397 37.5906 63.6495 36.768C64.2404 36.6402 64.8092 36.5031 65.3666 36.3602C65.5377 36.3156 65.7007 36.2688 65.8684 36.223C66.2499 36.1199 66.6246 36.0145 66.9888 35.9031C67.1749 35.8469 67.3553 35.7883 67.5368 35.7309C67.8745 35.623 68.2028 35.5105 68.5243 35.3969C68.6966 35.3359 68.8677 35.275 69.0353 35.2117C69.3672 35.0863 69.6852 34.9574 69.9985 34.8262C70.1326 34.7699 70.2725 34.7148 70.4032 34.6574C70.8379 34.4664 71.2576 34.2707 71.6542 34.0668C71.66 34.0633 71.6658 34.0609 71.6716 34.0574C72.0589 33.8582 72.4243 33.6508 72.7735 33.441C72.8868 33.3719 72.9909 33.3016 73.1007 33.2313C73.3354 33.0813 73.5632 32.9312 73.7794 32.7766C73.8951 32.6934 74.0049 32.609 74.1159 32.5258C74.3102 32.377 74.4963 32.2258 74.6732 32.0723C74.7322 32.0207 74.8027 31.9727 74.8594 31.9211L74.8582 31.9199ZM74.8582 48.2887V60.1598C74.8582 62.8773 70.3396 65.6359 63.335 67.2004C63.2737 67.2051 63.2136 67.2156 63.1547 67.2285C59.5021 68.016 55.2482 68.4109 50.9955 68.4098C48.8692 68.4098 46.7428 68.3113 44.6917 68.1145C42.6405 67.9176 40.6656 67.6211 38.8399 67.2273C38.7832 67.2133 38.7266 67.2051 38.6699 67.2004C31.663 65.6359 27.1432 62.8785 27.1432 60.1598V48.2887C27.2022 48.3426 27.2739 48.393 27.3352 48.4457C27.5075 48.5945 27.6878 48.7422 27.8763 48.8875C27.9908 48.9754 28.1052 49.0633 28.2255 49.15C28.4348 49.3 28.6568 49.4477 28.8834 49.593C28.999 49.6668 29.1089 49.7418 29.228 49.8145C29.5633 50.0172 29.9136 50.2152 30.2825 50.4074C30.3114 50.4227 30.338 50.4379 30.3669 50.452C30.7507 50.6488 31.1566 50.8398 31.5775 51.0262C31.722 51.0895 31.8746 51.1504 32.0226 51.2125C32.3198 51.3379 32.6227 51.4609 32.9372 51.5793C33.1164 51.6473 33.2991 51.7129 33.4841 51.7785C33.7917 51.8887 34.1073 51.9953 34.4299 52.0996C34.6196 52.1605 34.8092 52.2227 35.0046 52.2812C35.3584 52.3891 35.7238 52.4922 36.0938 52.593C36.2684 52.641 36.4395 52.6902 36.6176 52.7359C37.1714 52.8789 37.738 53.016 38.3253 53.1426C38.3554 53.1496 38.3889 53.1555 38.4236 53.159C42.2161 53.9723 46.5636 54.4023 51.0013 54.4023C55.439 54.4023 59.7784 53.9734 63.5697 53.1613C63.6056 53.1566 63.6414 53.1508 63.6773 53.1426C64.2647 53.0148 64.8312 52.8789 65.3851 52.7359C65.5643 52.6902 65.7342 52.6398 65.9088 52.593C66.2788 52.4922 66.6442 52.3891 66.998 52.2812C67.1934 52.2215 67.3831 52.1605 67.5727 52.0996C67.8953 51.9953 68.2109 51.8887 68.5185 51.7785C68.7023 51.7129 68.8862 51.6473 69.0654 51.5793C69.3799 51.4598 69.6817 51.3367 69.98 51.2125C70.128 51.1504 70.2806 51.0895 70.4252 51.0262C70.846 50.841 71.2507 50.65 71.6357 50.452C71.6646 50.4367 71.6912 50.4215 71.7201 50.4074C72.0901 50.2152 72.4405 50.0172 72.7747 49.8145C72.8949 49.7418 73.0036 49.6668 73.1192 49.593C73.347 49.4477 73.5678 49.3 73.7771 49.15C73.8974 49.0633 74.0118 48.9766 74.1263 48.8875C74.3148 48.7422 74.4952 48.5945 74.6674 48.4457C74.7287 48.393 74.7992 48.3426 74.8582 48.2887ZM74.8582 76.5355C74.8582 80.4367 65.0602 84.7844 51.0002 84.7844C36.9402 84.7844 27.1421 80.4367 27.1421 76.5355V64.6469C27.1987 64.6984 27.2693 64.7477 27.3282 64.7992C27.5028 64.9504 27.6844 65.0992 27.8763 65.2469C27.9873 65.3324 28.0995 65.418 28.2162 65.5023C28.4302 65.6559 28.6568 65.807 28.8892 65.9559C28.9979 66.0262 29.1019 66.0977 29.2152 66.1656C29.5691 66.3801 29.9367 66.591 30.3299 66.7937C30.331 66.7937 30.3322 66.7938 30.3333 66.7961C30.7253 66.9988 31.1404 67.1945 31.5694 67.3855C31.7058 67.4465 31.8515 67.5039 31.9914 67.5637C32.2955 67.6926 32.6054 67.8191 32.928 67.9422C33.1002 68.0078 33.2772 68.0711 33.4541 68.1355C33.7674 68.248 34.0888 68.3582 34.4184 68.466C34.6034 68.5258 34.7872 68.5867 34.9768 68.6453C35.3341 68.7555 35.703 68.8609 36.0764 68.9641C36.2476 69.0109 36.4141 69.0602 36.5887 69.1059C37.1413 69.2512 37.7079 69.3895 38.2941 69.5195C38.3462 69.5312 38.3993 69.5383 38.4514 69.543C42.2369 70.3516 46.5717 70.7793 50.999 70.7793C55.4263 70.7793 59.7599 70.3527 63.5478 69.543C63.5998 69.5383 63.653 69.5312 63.705 69.5195C64.2912 69.3906 64.8578 69.2512 65.4105 69.1059C65.5839 69.0602 65.7493 69.0121 65.9192 68.9652C66.295 68.8621 66.665 68.7555 67.0246 68.6453C67.2131 68.5879 67.3958 68.5281 67.5785 68.4684C67.9092 68.3605 68.2329 68.2492 68.5486 68.1355C68.7231 68.0723 68.8977 68.009 69.0689 67.9445C69.3938 67.8203 69.7071 67.6926 70.0135 67.5625C70.1511 67.5039 70.2933 67.4477 70.4275 67.3879C71.29 67.0047 72.0774 66.5969 72.7851 66.1668C72.8972 66.0988 73.0001 66.0273 73.1088 65.9582C73.3424 65.8082 73.5702 65.657 73.7852 65.5023C73.9008 65.4191 74.0118 65.3336 74.1217 65.2492C74.3148 65.1016 74.4975 64.9516 74.6732 64.7992C74.7322 64.7488 74.8016 64.6996 74.8582 64.648V76.5355Z",fill:U.silhouette}),e.jsx("path",{d:"M33.2089 38.8535C31.3993 38.8535 29.9263 40.3453 29.9263 42.1805C29.9263 44.0156 31.3982 45.5062 33.2089 45.5062C35.0196 45.5062 36.4903 44.0145 36.4903 42.1805C36.4903 40.3465 35.0184 38.8535 33.2089 38.8535ZM33.2089 43.1625C32.6735 43.1625 32.2388 42.7219 32.2388 42.1805C32.2388 41.6391 32.6735 41.1973 33.2089 41.1973C33.7442 41.1973 34.1778 41.6379 34.1778 42.1805C34.1778 42.723 33.7431 43.1625 33.2089 43.1625Z",fill:U.silhouette}),e.jsx("path",{d:"M33.2089 54.6777C31.3993 54.6777 29.9263 56.1695 29.9263 58.0047C29.9263 59.8398 31.3982 61.3316 33.2089 61.3316C35.0196 61.3316 36.4903 59.8398 36.4903 58.0047C36.4903 56.1695 35.0184 54.6777 33.2089 54.6777ZM33.2089 58.9879C32.6735 58.9879 32.2388 58.5473 32.2388 58.0047C32.2388 57.4621 32.6735 57.0215 33.2089 57.0215C33.7442 57.0215 34.1778 57.4621 34.1778 58.0047C34.1778 58.5473 33.7431 58.9879 33.2089 58.9879Z",fill:U.silhouette}),e.jsx("path",{d:"M33.2089 70.5C31.3993 70.5 29.9263 71.9918 29.9263 73.827C29.9263 75.6621 31.3982 77.1539 33.2089 77.1539C35.0196 77.1539 36.4903 75.6621 36.4903 73.827C36.4903 71.9918 35.0184 70.5 33.2089 70.5ZM33.2089 74.8102C32.6735 74.8102 32.2388 74.3695 32.2388 73.827C32.2388 73.2844 32.6735 72.8438 33.2089 72.8438C33.7442 72.8438 34.1778 73.2844 34.1778 73.827C34.1778 74.3695 33.7431 74.8102 33.2089 74.8102Z",fill:U.silhouette}),e.jsx("path",{d:"M70.0215 38.2852C69.3821 38.2852 68.8652 38.809 68.8652 39.457V44.3332C68.8652 44.9812 69.3821 45.5051 70.0215 45.5051C70.6609 45.5051 71.1777 44.9812 71.1777 44.3332V39.457C71.1777 38.809 70.6609 38.2852 70.0215 38.2852Z",fill:U.silhouette}),e.jsx("path",{d:"M70.0215 54.3926C69.3821 54.3926 68.8652 54.9164 68.8652 55.5645V60.4406C68.8652 61.0887 69.3821 61.6125 70.0215 61.6125C70.6609 61.6125 71.1777 61.0887 71.1777 60.4406V55.5645C71.1777 54.9164 70.6609 54.3926 70.0215 54.3926Z",fill:U.silhouette}),e.jsx("path",{d:"M70.0215 70.5C69.3821 70.5 68.8652 71.0238 68.8652 71.6719V76.5492C68.8652 77.1973 69.3821 77.7211 70.0215 77.7211C70.6609 77.7211 71.1777 77.1973 71.1777 76.5492V71.6719C71.1777 71.0238 70.6609 70.5 70.0215 70.5Z",fill:U.silhouette}),e.jsx("path",{d:"M65.77 39.7617C65.1306 39.7617 64.6138 40.2855 64.6138 40.9336V45.8098C64.6138 46.4578 65.1306 46.9816 65.77 46.9816C66.4094 46.9816 66.9263 46.4578 66.9263 45.8098V40.9336C66.9263 40.2855 66.4094 39.7617 65.77 39.7617Z",fill:U.silhouette}),e.jsx("path",{d:"M65.77 55.8691C65.1306 55.8691 64.6138 56.393 64.6138 57.041V61.9172C64.6138 62.5652 65.1306 63.0891 65.77 63.0891C66.4094 63.0891 66.9263 62.5652 66.9263 61.9172V57.041C66.9263 56.393 66.4094 55.8691 65.77 55.8691Z",fill:U.silhouette}),e.jsx("path",{d:"M65.77 71.9766C65.1306 71.9766 64.6138 72.5004 64.6138 73.1484V78.0246C64.6138 78.6727 65.1306 79.1965 65.77 79.1965C66.4094 79.1965 66.9263 78.6727 66.9263 78.0246V73.1484C66.9263 72.5004 66.4094 71.9766 65.77 71.9766Z",fill:U.silhouette}),e.jsx("path",{d:"M61.2939 40.7246C60.6545 40.7246 60.1377 41.2484 60.1377 41.8965V46.7727C60.1377 47.4207 60.6545 47.9445 61.2939 47.9445C61.9334 47.9445 62.4502 47.4207 62.4502 46.7727V41.8965C62.4502 41.2484 61.9334 40.7246 61.2939 40.7246Z",fill:U.silhouette}),e.jsx("path",{d:"M61.2939 56.832C60.6545 56.832 60.1377 57.3559 60.1377 58.0039V62.8801C60.1377 63.5281 60.6545 64.052 61.2939 64.052C61.9334 64.052 62.4502 63.5281 62.4502 62.8801V58.0039C62.4502 57.3559 61.9334 56.832 61.2939 56.832Z",fill:U.silhouette}),e.jsx("path",{d:"M61.2939 72.9395C60.6545 72.9395 60.1377 73.4633 60.1377 74.1113V78.9875C60.1377 79.6355 60.6545 80.1594 61.2939 80.1594C61.9334 80.1594 62.4502 79.6355 62.4502 78.9875V74.1113C62.4502 73.4633 61.9334 72.9395 61.2939 72.9395Z",fill:U.silhouette}),e.jsx("path",{d:"M39.0489 24.4037C39.131 24.4037 39.2154 24.3944 39.2986 24.3768C42.7316 23.6127 46.6755 23.185 51.0207 23.11C51.659 23.0983 52.1677 22.5651 52.1561 21.917C52.1446 21.2701 51.652 20.7451 50.9791 20.7662C46.4813 20.8448 42.3835 21.2889 38.8015 22.0881C38.1782 22.2264 37.7828 22.8522 37.9204 23.4838C38.0395 24.0311 38.5182 24.4037 39.0489 24.4037Z",fill:U.silhouette}),e.jsx("path",{d:"M32.5406 26.6215C32.7407 26.6215 32.9442 26.57 33.128 26.4586C33.1315 26.4563 33.5096 26.2336 34.2889 25.9055C34.8786 25.6582 35.1584 24.9727 34.9144 24.3739C34.6704 23.775 33.9917 23.4926 33.4032 23.7399C32.4632 24.1348 31.9926 24.4149 31.9417 24.4465C31.396 24.7782 31.219 25.4942 31.544 26.0485C31.7613 26.4164 32.1452 26.6204 32.5395 26.6204L32.5406 26.6215Z",fill:U.silhouette}),e.jsx("path",{d:"M92.7251 26.7272L82.3845 29.3124C81.6929 29.4856 80.9911 29.0642 80.8179 28.3727C80.6447 27.6799 81.066 26.978 81.7576 26.8048L92.0982 24.2196C92.791 24.0464 93.4929 24.4678 93.6661 25.1593C93.8393 25.8521 93.4179 26.554 92.7251 26.7272Z",fill:U.accent,fillOpacity:"0.65"}),e.jsx("path",{d:"M94.4649 11.0082L80.2465 21.3488C79.6701 21.7676 78.8609 21.6409 78.4408 21.0632C78.022 20.4867 78.1487 19.6775 78.7265 19.2574L92.9448 8.91682C93.5213 8.49803 94.3305 8.6247 94.7505 9.20248C95.1693 9.77897 95.0414 10.5881 94.4649 11.0082Z",fill:U.accent,fillOpacity:"0.65"}),e.jsx("path",{d:"M78.0091 10.6269L74.1314 17.0898C73.7643 17.7025 72.9706 17.9002 72.358 17.5331C71.7466 17.1673 71.5475 16.3724 71.9146 15.7597L75.7923 9.29684C76.1594 8.68545 76.9544 8.48769 77.5657 8.85349C78.1784 9.22058 78.3762 10.0155 78.0091 10.6269Z",fill:U.accent,fillOpacity:"0.65"})]})})}const eo=({title:r="create",children:t,onClickAction:l,variant:c="primary",variantTitle:o,leftIcon:i,showButton:h=!0,customHeight:s,childrenButton:f,customIcon:d})=>{const u=()=>{switch(c){case"primary":return e.jsx(e.Fragment,{children:i?e.jsx(A.Button,{primary:!0,iconLeft:i,onClick:l,children:f||r}):e.jsx(A.Button,{primary:!0,onClick:l,children:f||r})});case"secondary":return e.jsx(e.Fragment,{children:i?e.jsx(A.Button,{secondary:!0,iconLeft:i,onClick:l,children:o?e.jsx(v.Text,{fontFamily:"Poppins",fontSize:"md",fontWeight:"medium",style:{color:"var(--sa-background-success, #28ac6e)"},children:f||r}):r}):e.jsx(A.Button,{secondary:!0,onClick:l,children:f||r})});case"success":return e.jsx(e.Fragment,{children:i?e.jsx(A.Button,{success:!0,iconLeft:i,onClick:l,children:f||r}):e.jsx(A.Button,{success:!0,onClick:l,children:f||r})});default:return e.jsx(e.Fragment,{children:i?e.jsx(A.Button,{primary:!0,iconLeft:i,onClick:l,children:f||r}):e.jsx(A.Button,{primary:!0,onClick:l,children:f||r})})}};return e.jsxs(y.Box,{height:"height-full",display:"flex",direction:"column",gap:"sm",justify:"center",align:"center",marginBlock:"auto",customHeight:s,children:[d||e.jsx(Rl,{}),e.jsx(y.Box,{children:t.map((p,C)=>e.jsx(ye.Body1,{props:{align:"center",textAlign:"center"},children:C>2?null:p},C))}),h?u():null]})},L={c001A72:"#001A72",c64B5F6:"#64B5F6",c98B4CB:"#98B4CB",cBBDEFB:"#BBDEFB",cD0E5F7:"#D0E5F7",cD6EBFD:"#D6EBFD",c000000:"#000000",cFFFFFF:"#FFFFFF"};function ro({width:r,height:t}){return e.jsx(e.Fragment,{children:e.jsxs("svg",{width:r,height:t,viewBox:"0 0 622 271",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M32.4375 254.5H612.437",stroke:L.c64B5F6,strokeWidth:"5",strokeLinecap:"round"}),e.jsx("rect",{x:"216.562",y:"45.5605",width:"55",height:"20",fill:L.cD6EBFD}),e.jsx("rect",{x:"14.4375",y:"89.7803",width:"46",height:"20",fill:L.cD6EBFD}),e.jsx("rect",{x:"0.4375",y:"111.78",width:"46",height:"20",fill:L.cD6EBFD}),e.jsx("rect",{x:"0.4375",y:"67.7803",width:"46",height:"20",fill:L.cD6EBFD}),e.jsx("rect",{x:"344.312",y:"0.5",width:"55",height:"20",fill:L.cD6EBFD}),e.jsx("rect",{x:"549.562",y:"86.7803",width:"55",height:"20",fill:L.cD6EBFD}),e.jsx("rect",{x:"566.562",y:"64.7803",width:"55",height:"20",fill:L.cD6EBFD}),e.jsx("path",{d:"M233.438 165.217C233.438 132.764 239.035 107.198 250.231 88.5189C261.596 69.8396 279.832 60.5 304.938 60.5C330.043 60.5 348.194 69.8396 359.389 88.5189C370.755 107.198 376.438 132.764 376.438 165.217C376.438 198.047 370.755 223.802 359.389 242.481C348.194 261.16 330.043 270.5 304.938 270.5C279.832 270.5 261.596 261.16 250.231 242.481C239.035 223.802 233.438 198.047 233.438 165.217ZM333.69 165.217C333.69 146.16 331.824 131.538 328.092 121.349C324.36 110.972 316.642 105.783 304.938 105.783C293.233 105.783 285.515 110.972 281.783 121.349C278.051 131.538 276.185 146.16 276.185 165.217C276.185 178.047 276.863 188.708 278.22 197.198C279.577 205.5 282.292 212.292 286.363 217.575C290.604 222.67 296.795 225.217 304.938 225.217C313.08 225.217 319.187 222.67 323.258 217.575C327.499 212.292 330.298 205.5 331.655 197.198C333.012 188.708 333.69 178.047 333.69 165.217Z",fill:L.cD0E5F7}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50.4375 235.124V194.28L138.96 60.5H192.466V191.32H215.438V235.124H192.466V249.5H144.563V235.124H50.4375ZM100.862 191.32L147.925 116.143V191.32H100.862Z",fill:L.cBBDEFB,fillOpacity:"0.6"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M394.438 235.124V194.28L482.96 60.5H536.466V191.32H559.438V235.124H536.466V249.5H488.563V235.124H394.438ZM444.862 191.32L491.925 116.143V191.32H444.862Z",fill:L.cBBDEFB,fillOpacity:"0.6"}),e.jsx("path",{d:"M349.472 171.5H261.64V186.396H349.472V171.5Z",fill:L.c98B4CB}),e.jsx("path",{d:"M261.64 171.5L244.719 186.396H261.64V171.5Z",fill:L.c98B4CB}),e.jsx("path",{d:"M363.574 186.396L349.472 171.5V186.396H363.574Z",fill:L.c98B4CB}),e.jsx("path",{d:"M244.719 200.89V264.5H363.574V200.89M244.719 200.89H233.438L244.719 186.396M244.719 200.89H363.574M363.574 200.89H372.437L363.574 186.396M244.719 186.396L261.64 171.5M244.719 186.396H261.64M363.574 186.396L349.472 171.5M363.574 186.396H349.472M261.64 171.5H349.472M261.64 171.5V186.396M349.472 171.5V186.396M349.472 186.396H261.64",stroke:L.c000000,strokeWidth:"2"}),e.jsx("rect",{x:"246.438",y:"202.5",width:"116",height:"60",fill:L.cFFFFFF}),e.jsx("path",{d:"M245.536 187.5H362.959L369.438 198.5H237.438L245.536 187.5Z",fill:L.cFFFFFF}),e.jsx("path",{d:"M332.438 129.846C332.438 141.175 329.183 152.403 323.949 160.772C318.699 169.168 311.592 174.5 303.938 174.5C296.283 174.5 289.176 169.168 283.926 160.772C278.692 152.403 275.438 141.175 275.438 129.846C275.438 118.458 277.838 109.628 282.543 103.663C287.216 97.7387 294.274 94.5 303.938 94.5C313.601 94.5 320.659 97.7387 325.332 103.663C330.037 109.628 332.438 118.458 332.438 129.846Z",fill:L.cFFFFFF,stroke:L.c000000,strokeWidth:"2"}),e.jsx("path",{d:"M281.438 145.5C284.032 154.136 285.762 158.682 290.951 164.591M292.681 166.409C293.624 167.647 295.708 169.591 297.438 170.5",stroke:L.c000000,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M304.438 175C299.54 176.339 297.208 177.876 293.938 182.5M304.438 175C301.183 178.041 299.537 178.883 299.438 182.5M304.438 175C308.173 177.107 309.635 178.834 311.438 182.5",stroke:L.c000000,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M304.936 175.5C303.438 180 302.529 181.628 304.936 186.5",stroke:L.c000000,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M288.178 120.981C289.969 120.93 290.921 121.313 292.167 122.754",stroke:L.c000000,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("circle",{cx:"291.724",cy:"118.765",r:"3.1027",fill:L.c000000}),e.jsx("path",{d:"M308.128 122.463C309.123 120.973 309.987 120.418 311.883 120.237",stroke:L.c000000,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("circle",{cx:"307.681",cy:"118.765",r:"3.1027",fill:L.c000000}),e.jsx("ellipse",{cx:"297.938",cy:"134.5",rx:"2.5",ry:"2",fill:L.c000000}),e.jsx("path",{d:"M340.437 97.5L333.438 104.5M333.438 97.5L340.438 104.5",stroke:L.c001A72,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M265.437 115.5L260.438 120.5M260.438 115.5L265.438 120.5",stroke:L.c001A72,strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M288.437 87.5L283.438 92.5M283.438 87.5L288.438 92.5",stroke:L.c001A72,strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M305.437 83.5L298.438 90.5M298.438 83.5L305.438 90.5",stroke:L.c001A72,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M342.437 145.5L337.438 150.5M337.438 145.5L342.438 150.5",stroke:L.c001A72,strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("circle",{cx:"339.938",cy:"111",r:"2.5",fill:L.c001A72}),e.jsx("circle",{cx:"336.438",cy:"94.5",r:"1",fill:L.c001A72}),e.jsx("circle",{cx:"347.438",cy:"99.5",r:"1",fill:L.c001A72}),e.jsx("circle",{cx:"267.438",cy:"109.5",r:"2",fill:L.c001A72}),e.jsx("circle",{cx:"293.438",cy:"85.5",r:"2",fill:L.c001A72}),e.jsx("circle",{cx:"339.438",cy:"138.5",r:"2",fill:L.c001A72}),e.jsx("circle",{cx:"267.438",cy:"150.5",r:"2",fill:L.c001A72}),e.jsx("circle",{cx:"268.438",cy:"118.5",r:"1",fill:L.c001A72}),e.jsx("circle",{cx:"260.438",cy:"124.5",r:"1",fill:L.c001A72})]})})}function to({onClick:r}){const t=$.useMediaQuery("md");return e.jsxs(y.Box,{height:"height-screen",fullWidth:!0,display:"flex",align:"center",justify:"center",gap:"md",children:[e.jsx(ro,{width:t?600:300}),e.jsx(v.Text,{fontWeight:"bold",fontSize:t?"3xl":"2xl",textAlign:"center",children:"Page Not Found"}),e.jsx(v.Text,{fontWeight:"semibold",fontSize:t?"lg":"md",textAlign:"center",children:"Sorry, we couldn't find the page you are looking for"}),r&&e.jsx(A.Button,{size:t?"md":"xs",onClick:r,children:"Go Back"})]})}const I={c46F16B:"#46F16B",c48504C:"#48504C",c64B5F6:"#64B5F6",c67AEE6:"#67AEE6",c86512B:"#86512B",c956847:"#956847",cBBC3F5:"#BBC3F5",cBBDEFB:"#BBDEFB",cC0B2A2:"#C0B2A2",cC8CEF4:"#C8CEF4",cCABEB1:"#CABEB1",cD5C7BD:"#D5C7BD",cD6D6D6:"#D6D6D6",cD6EBFD:"#D6EBFD",cE5EE80:"#E5EE80",cEE8080:"#EE8080",cEFF3F8:"#EFF3F8",cF4F4F4:"#F4F4F4",cFFFFFF:"#FFFFFF"};function lo({width:r,height:t}){return e.jsx(e.Fragment,{children:e.jsxs("svg",{width:r,height:t,viewBox:"0 0 654 258",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("rect",{x:"228",y:"55.5",width:"55",height:"20",fill:I.cD6EBFD}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M75 238.124V197.28L163.523 63.5H217.029V194.32H240V238.124H217.029V252.5H169.126V238.124H75ZM125.424 194.32L172.487 119.143V194.32H125.424Z",fill:I.cBBDEFB,fillOpacity:"0.6"}),e.jsxs("g",{clipPath:"url(#clip0_2949_9690)",children:[e.jsx("path",{d:"M334.5 274.5C381.168 274.5 419 227.266 419 169C419 110.734 381.168 63.5 334.5 63.5C287.832 63.5 250 110.734 250 169C250 227.266 287.832 274.5 334.5 274.5Z",fill:I.cEFF3F8,stroke:I.c67AEE6,strokeWidth:"5"}),e.jsx("path",{d:"M413 197.5C411.397 211.835 402.919 230.898 389.361 246.49C375.596 262.32 356.651 274.5 334.496 274.5C311.331 274.5 292.389 261.672 278.878 245.52C265.592 229.638 257.606 210.603 256 197.5H413Z",fill:I.cD5C7BD}),e.jsx("path",{d:"M278.887 211.766H391.104L392.583 222.856C392.687 223.635 392.08 224.328 391.294 224.328H277.961C277.14 224.328 276.525 223.577 276.686 222.773L278.887 211.766Z",fill:I.cCABEB1}),e.jsx("path",{d:"M287.68 218.884L289.354 213.022H378.961L381.473 218.884H287.68Z",fill:I.cC0B2A2}),e.jsx("path",{d:"M381.944 218.803L381.58 212.266H386.385L386.022 218.803H381.944Z",fill:I.c956847,stroke:I.c48504C}),e.jsx("path",{d:"M283.124 218.803L282.768 213.104H287.565L287.209 218.803H283.124Z",fill:I.c956847,stroke:I.c48504C}),e.jsx("path",{d:"M285.902 212.103L284.935 186.306H279.606C278.151 186.306 277.004 187.542 277.113 188.993L278.673 209.79C278.77 211.095 279.857 212.103 281.166 212.103H285.902Z",fill:I.cC8CEF4,stroke:I.c48504C}),e.jsx("path",{d:"M383.256 212.103L384.638 186.306H389.556C391.007 186.306 392.153 187.537 392.05 188.984L390.564 209.782C390.471 211.09 389.382 212.103 388.07 212.103H383.256Z",fill:I.cC8CEF4,stroke:I.c48504C}),e.jsx("path",{d:"M284.497 178.155C284.455 176.194 286.034 174.581 287.996 174.581H381.904C383.895 174.581 385.485 176.24 385.401 178.23L384.066 209.59C383.987 211.463 382.445 212.941 380.569 212.941H288.663C286.759 212.941 285.205 211.419 285.164 209.515L284.497 178.155Z",fill:I.cC8CEF4,stroke:I.c48504C}),e.jsx("path",{d:"M284.845 181.524C284.792 179.279 286.598 177.431 288.844 177.431H380.687C382.948 177.431 384.76 179.304 384.684 181.565L383.774 208.737C383.701 210.893 381.933 212.603 379.776 212.603H289.48C287.307 212.603 285.532 210.869 285.481 208.697L284.845 181.524Z",fill:I.cBBC3F5}),e.jsx("mask",{id:"mask0_2949_9690",maskUnits:"userSpaceOnUse",x:"301",y:"144",width:"68",height:"17",style:{maskType:"luminance"},children:e.jsx("path",{d:"M301 146.5C301 145.395 301.887 144.5 302.98 144.5H367.02C368.114 144.5 369 145.395 369 146.5V160.411H301V146.5Z",fill:I.cFFFFFF})}),e.jsxs("g",{mask:"url(#mask0_2949_9690)",children:[e.jsx("path",{d:"M301 146.191C301 145.257 301.748 144.5 302.671 144.5H356.701C357.624 144.5 358.372 145.257 358.372 146.191V157.949H301V146.191Z",fill:I.cFFFFFF}),e.jsx("path",{d:"M301.336 146.607C301.336 145.673 302.08 144.916 302.999 144.916H367.01C367.929 144.916 368.673 145.673 368.673 146.607V152.523H301.336V146.607Z",fill:I.cD6D6D6}),e.jsx("path",{d:"M368.673 152.523H301.336V174.5H368.673V152.523Z",fill:I.cF4F4F4}),e.jsx("path",{d:"M307.685 150.417C308.607 150.417 309.356 149.66 309.356 148.726C309.356 147.793 308.607 147.036 307.685 147.036C306.762 147.036 306.014 147.793 306.014 148.726C306.014 149.66 306.762 150.417 307.685 150.417Z",fill:I.cEE8080}),e.jsx("path",{d:"M313.532 150.417C314.455 150.417 315.203 149.66 315.203 148.726C315.203 147.793 314.455 147.036 313.532 147.036C312.609 147.036 311.861 147.793 311.861 148.726C311.861 149.66 312.609 150.417 313.532 150.417Z",fill:I.cE5EE80}),e.jsx("path",{d:"M318.546 150.417C319.469 150.417 320.217 149.66 320.217 148.726C320.217 147.793 319.469 147.036 318.546 147.036C317.623 147.036 316.875 147.793 316.875 148.726C316.875 149.66 317.623 150.417 318.546 150.417Z",fill:I.c46F16B})]}),e.jsx("path",{d:"M301.16 146C301.16 145.172 301.832 144.5 302.66 144.5H367.33C368.159 144.5 368.83 145.172 368.83 146V174.419H301.16V146Z",stroke:I.c48504C}),e.jsx("path",{d:"M395.29 207.579H423.344M354.255 236.889H369.329M327.038 222.234H347.556M350.905 222.234H358.024M288.097 230.19H304.846M253.344 210.091H272.605M278.467 246.938H295.216M297.309 246.938H303.59M337.088 252.801H354.255",stroke:I.c86512B,strokeWidth:"2",strokeLinecap:"round"})]}),e.jsx("path",{d:"M430.241 125.78C430.987 105.807 437.521 90.4065 449.841 79.5799C462.161 68.7532 478.867 63.3398 499.961 63.3398C513.961 63.3398 525.907 65.7665 535.801 70.6199C545.881 75.4732 553.441 82.0998 558.481 90.4998C563.707 98.8998 566.321 108.327 566.321 118.78C566.321 131.1 563.241 141.18 557.081 149.02C550.921 156.673 543.734 161.9 535.521 164.7V165.82C546.161 169.367 554.561 175.247 560.721 183.46C566.881 191.673 569.961 202.22 569.961 215.1C569.961 226.673 567.254 236.94 561.841 245.9C560.436 248.258 558.849 250.481 557.081 252.569L443.5 252.662C432.5 241 427.721 230.5 427.721 207.82H474.201C474.387 216.033 476.721 222.567 481.201 227.42C485.681 232.087 492.214 234.42 500.801 234.42C508.081 234.42 513.681 232.367 517.601 228.26C521.707 223.967 523.761 218.367 523.761 211.46C523.761 202.5 520.867 196.06 515.081 192.14C509.481 188.033 500.427 185.98 487.921 185.98H478.961V147.06H487.921C497.441 147.06 505.094 145.473 510.881 142.3C516.854 138.94 519.841 133.06 519.841 124.66C519.841 117.94 517.974 112.713 514.241 108.98C510.507 105.247 505.374 103.38 498.841 103.38C491.747 103.38 486.427 105.527 482.881 109.82C479.521 114.113 477.561 119.433 477.001 125.78H430.241Z",fill:I.cBBDEFB,fillOpacity:"0.6"}),e.jsx("rect",{x:"43",y:"87.5",width:"46",height:"20",fill:I.cD6EBFD}),e.jsx("rect",{x:"29",y:"109.5",width:"46",height:"20",fill:I.cD6EBFD}),e.jsx("rect",{x:"29",y:"65.5",width:"46",height:"20",fill:I.cD6EBFD}),e.jsx("rect",{x:"356",y:"0.5",width:"55",height:"20",fill:I.cD6EBFD}),e.jsx("rect",{x:"572",y:"142.5",width:"55",height:"20",fill:I.cD6EBFD}),e.jsx("rect",{x:"589",y:"120.5",width:"55",height:"20",fill:I.cD6EBFD}),e.jsx("path",{d:"M3 255.5L651 255.5",stroke:I.c64B5F6,strokeWidth:"5",strokeLinecap:"round"}),e.jsx("defs",{children:e.jsx("clipPath",{id:"clip0_2949_9690",children:e.jsx("rect",{width:"179",height:"192",fill:I.cFFFFFF,transform:"translate(246 60.5)"})})})]})})}function oo({onClick:r}){const t=$.useMediaQuery("md");return e.jsxs(y.Box,{height:"height-screen",fullWidth:!0,display:"flex",align:"center",justify:"center",gap:"md",children:[e.jsx(lo,{width:t?600:300}),e.jsx(v.Text,{fontWeight:"bold",fontSize:t?"3xl":"2xl",children:"We Are Sorry ..."}),r&&e.jsx(A.Button,{size:t?"md":"xs",onClick:r,children:"Go Back"})]})}const n={c000D58:"#000D58",c001174:"#001174",c28AC6E:"#28AC6E",c48504C:"#48504C",c64B5F6:"#64B5F6",c90CAF9:"#90CAF9",cC9184A:"#C9184A",cD6D6D6:"#D6D6D6",cD6EBFD:"#D6EBFD",cD9D9D9:"#D9D9D9",cDEECF8:"#DEECF8",cE7EAE9:"#E7EAE9",cF3F8FD:"#F3F8FD",cFFE18B:"#FFE18B",cFFFFFF:"#FFFFFF"};function co({width:r,height:t}){return e.jsx(e.Fragment,{children:e.jsxs("svg",{width:r,height:t,viewBox:"0 0 622 287",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M406.562 180.997C406.562 148.544 412.16 122.978 423.356 104.299C434.721 85.6199 452.957 76.2803 478.063 76.2803C503.168 76.2803 521.319 85.6199 532.514 104.299C543.88 122.978 549.562 148.544 549.562 180.997C549.562 213.827 543.88 239.582 532.514 258.261C521.319 276.941 503.168 286.28 478.063 286.28C452.957 286.28 434.721 276.941 423.356 258.261C412.16 239.582 406.562 213.827 406.562 180.997ZM506.815 180.997C506.815 161.941 504.949 147.318 501.217 137.129C497.485 126.752 489.767 121.563 478.063 121.563C466.358 121.563 458.64 126.752 454.908 137.129C451.176 147.318 449.31 161.941 449.31 180.997C449.31 193.827 449.988 204.488 451.345 212.978C452.703 221.28 455.417 228.073 459.488 233.356C463.729 238.45 469.92 240.997 478.063 240.997C486.205 240.997 492.312 238.45 496.383 233.356C500.624 228.073 503.423 221.28 504.78 212.978C506.137 204.488 506.815 193.827 506.815 180.997Z",fill:n.cD6EBFD}),e.jsx("path",{d:"M246.562 180.558C246.562 148.105 252.16 122.539 263.356 103.86C274.721 85.1804 292.957 75.8408 318.063 75.8408C343.168 75.8408 361.319 85.1804 372.514 103.86C383.88 122.539 389.562 148.105 389.562 180.558C389.562 213.388 383.88 239.143 372.514 257.822C361.319 276.501 343.168 285.841 318.063 285.841C292.957 285.841 274.721 276.501 263.356 257.822C252.16 239.143 246.562 213.388 246.562 180.558ZM346.815 180.558C346.815 161.501 344.949 146.879 341.217 136.69C337.485 126.313 329.767 121.124 318.063 121.124C306.358 121.124 298.64 126.313 294.908 136.69C291.176 146.879 289.31 161.501 289.31 180.558C289.31 193.388 289.988 204.048 291.345 212.539C292.702 220.841 295.417 227.633 299.488 232.916C303.729 238.011 309.92 240.558 318.063 240.558C326.205 240.558 332.312 238.011 336.383 232.916C340.624 227.633 343.423 220.841 344.78 212.539C346.137 204.048 346.815 193.388 346.815 180.558Z",fill:n.cD6EBFD}),e.jsx("path",{d:"M222.808 118.703H128.062V159.858C132.111 155.484 137.779 151.905 145.067 149.122C152.356 146.338 160.251 144.946 168.754 144.946C183.938 144.946 196.49 148.326 206.41 155.086C216.532 161.846 223.922 170.594 228.578 181.329C233.234 192.065 235.562 203.696 235.562 216.221C235.562 239.483 228.882 257.972 215.52 271.691C202.158 285.21 183.357 282.89 159.062 282.89C142.867 282.89 131.098 284.939 116.826 283.918C104.881 278.351 95.6695 270.697 89.1911 260.955C82.7127 251.213 79.1698 239.98 78.5625 227.256H129.276C130.491 233.419 133.426 238.588 138.083 242.763C142.739 246.739 149.116 248.728 157.214 248.728C166.729 248.728 173.815 245.745 178.472 239.781C183.128 233.817 185.456 225.864 185.456 215.923C185.456 206.181 183.027 198.726 178.168 193.557C173.309 188.387 166.223 185.803 156.911 185.803C150.027 185.803 144.359 187.493 139.905 190.873C135.451 194.054 132.515 198.328 131.098 203.696H80.9919V73.9697H222.808V118.703Z",fill:n.cD6EBFD}),e.jsx("rect",{x:"216.562",y:"45.7803",width:"55",height:"20",fill:n.cD6EBFD}),e.jsx("rect",{x:"14.4375",y:"90",width:"46",height:"20",fill:n.cD6EBFD}),e.jsx("rect",{x:"0.4375",y:"112",width:"46",height:"20",fill:n.cD6EBFD}),e.jsx("rect",{x:"0.4375",y:"68",width:"46",height:"20",fill:n.cD6EBFD}),e.jsx("rect",{x:"344.312",y:"0.719727",width:"55",height:"20",fill:n.cD6EBFD}),e.jsx("rect",{x:"549.562",y:"87",width:"55",height:"20",fill:n.cD6EBFD}),e.jsx("rect",{x:"566.562",y:"65",width:"55",height:"20",fill:n.cD6EBFD}),e.jsx("path",{d:"M25.8125 282.22H605.812",stroke:n.c64B5F6,strokeWidth:"5",strokeLinecap:"round"}),e.jsx("rect",{x:"263.012",y:"175.42",width:"104.6",height:"31.2833",rx:"3.3",fill:n.cFFFFFF,stroke:n.c001174,strokeWidth:"1.4"}),e.jsx("path",{d:"M269.878 200.539C269.878 200.263 270.101 200.039 270.377 200.039L305.476 199.955C305.753 199.955 305.978 200.179 305.978 200.455V206.461H269.878V200.539Z",stroke:n.c001174}),e.jsx("rect",{x:"263.012",y:"210.752",width:"104.6",height:"31.2833",rx:"3.3",fill:n.cFFFFFF,stroke:n.c001174,strokeWidth:"1.4"}),e.jsx("path",{d:"M269.878 235.871C269.878 235.595 270.101 235.372 270.377 235.371L305.476 235.288C305.753 235.287 305.978 235.511 305.978 235.788V241.794H269.878V235.871Z",stroke:n.c001174}),e.jsx("rect",{x:"263.012",y:"246.969",width:"104.6",height:"31.2833",rx:"3.3",fill:n.cFFFFFF,stroke:n.c001174,strokeWidth:"1.4"}),e.jsx("path",{d:"M269.878 272.088C269.878 271.812 270.101 271.589 270.377 271.588L305.476 271.505C305.753 271.504 305.978 271.728 305.978 272.005V278.011H269.878V272.088Z",stroke:n.c001174}),e.jsx("path",{d:"M279.095 176.348H364.373C365.459 176.348 366.125 176.992 366.986 178.252V202.985C366.986 202.985 366.986 203.869 366.545 204.752C366.103 205.635 365.661 206.077 365.661 206.077L306.478 206.163V199.452L279.095 199.518V176.348Z",fill:n.cF3F8FD}),e.jsx("path",{d:"M279.095 211.093H364.373C365.459 211.093 366.125 211.736 366.986 212.997V237.73C366.986 237.73 366.986 238.613 366.545 239.497C366.103 240.38 365.661 240.822 365.661 240.822L306.478 240.908V234.197L279.095 234.262V211.093Z",fill:n.cF3F8FD}),e.jsx("path",{d:"M279.095 248.008H364.373C365.459 248.008 366.125 248.652 366.986 249.912V274.646C366.986 274.646 366.986 275.529 366.545 276.412C366.103 277.296 365.661 277.737 365.661 277.737L306.478 277.824V271.112L279.095 271.178V248.008Z",fill:n.cF3F8FD}),e.jsx("circle",{cx:"270.258",cy:"179.136",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"270.258",cy:"181.786",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"281.561",cy:"179.136",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"281.561",cy:"181.786",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"273.085",cy:"179.136",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"273.085",cy:"181.786",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"284.388",cy:"179.136",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"284.388",cy:"181.786",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"275.91",cy:"179.136",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"275.91",cy:"181.786",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"287.214",cy:"179.136",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"287.214",cy:"181.786",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"278.737",cy:"179.136",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"278.737",cy:"181.786",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"290.04",cy:"179.136",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"290.04",cy:"181.786",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"344.462",cy:"179.136",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"344.462",cy:"181.786",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"355.765",cy:"179.136",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"355.765",cy:"181.786",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"347.29",cy:"179.136",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"347.29",cy:"181.786",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"358.592",cy:"179.136",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"358.592",cy:"181.786",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"350.114",cy:"179.136",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"350.114",cy:"181.786",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"361.418",cy:"179.136",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"361.418",cy:"181.786",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"352.941",cy:"179.136",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"352.941",cy:"181.786",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"364.244",cy:"179.136",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"364.244",cy:"181.786",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"344.462",cy:"200.336",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"344.462",cy:"202.986",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"355.765",cy:"200.336",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"355.765",cy:"202.986",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"347.29",cy:"200.336",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"347.29",cy:"202.986",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"358.592",cy:"200.336",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"358.592",cy:"202.986",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"350.114",cy:"200.336",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"350.114",cy:"202.986",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"361.418",cy:"200.336",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"361.418",cy:"202.986",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"352.941",cy:"200.336",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"352.941",cy:"202.986",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"364.244",cy:"200.336",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"364.244",cy:"202.986",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"359.918",cy:"191.061",r:"4.45833",stroke:n.c001174,strokeWidth:"0.8"}),e.jsx("circle",{cx:"359.918",cy:"191.061",r:"2.20833",fill:n.cE7EAE9}),e.jsx("rect",{x:"269.726",y:"186.553",width:"36.4",height:"9.01667",rx:"0.65",fill:n.cE7EAE9,stroke:n.c001174,strokeWidth:"0.7"}),e.jsx("rect",{x:"310.537",y:"186.553",width:"6.54333",height:"9.01667",rx:"0.65",fill:n.cE7EAE9,stroke:n.c001174,strokeWidth:"0.7"}),e.jsx("rect",{x:"321.312",y:"186.553",width:"6.54333",height:"9.01667",rx:"0.65",fill:n.cE7EAE9,stroke:n.c001174,strokeWidth:"0.7"}),e.jsx("rect",{x:"332.089",y:"186.553",width:"6.54333",height:"9.01667",rx:"0.65",fill:n.cE7EAE9,stroke:n.c001174,strokeWidth:"0.7"}),e.jsx("rect",{x:"342.864",y:"186.553",width:"6.54333",height:"9.01667",rx:"0.65",fill:n.cE7EAE9,stroke:n.c001174,strokeWidth:"0.7"}),e.jsx("circle",{cx:"270.258",cy:"214.468",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"270.258",cy:"217.118",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"281.561",cy:"214.468",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"281.561",cy:"217.118",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"273.085",cy:"214.468",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"273.085",cy:"217.118",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"284.388",cy:"214.468",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"284.388",cy:"217.118",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"275.91",cy:"214.468",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"275.91",cy:"217.118",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"287.214",cy:"214.468",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"287.214",cy:"217.118",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"278.737",cy:"214.468",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"278.737",cy:"217.118",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"290.04",cy:"214.468",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"290.04",cy:"217.118",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"344.462",cy:"214.468",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"344.462",cy:"217.118",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"355.765",cy:"214.468",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"355.765",cy:"217.118",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"347.29",cy:"214.468",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"347.29",cy:"217.118",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"358.592",cy:"214.468",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"358.592",cy:"217.118",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"350.114",cy:"214.468",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"350.114",cy:"217.118",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"361.418",cy:"214.468",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"361.418",cy:"217.118",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"352.941",cy:"214.468",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"352.941",cy:"217.118",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"364.244",cy:"214.468",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"364.244",cy:"217.118",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"344.462",cy:"235.668",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"344.462",cy:"238.318",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"355.765",cy:"235.668",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"355.765",cy:"238.318",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"347.29",cy:"235.668",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"347.29",cy:"238.318",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"358.592",cy:"235.668",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"358.592",cy:"238.318",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"350.114",cy:"235.668",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"350.114",cy:"238.318",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"361.418",cy:"235.668",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"361.418",cy:"238.318",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"352.941",cy:"235.668",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"352.941",cy:"238.318",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"364.244",cy:"235.668",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"364.244",cy:"238.318",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"359.918",cy:"226.393",r:"4.45833",stroke:n.c001174,strokeWidth:"0.8"}),e.jsx("circle",{cx:"359.918",cy:"226.393",r:"2.20833",fill:n.cE7EAE9}),e.jsx("rect",{x:"269.726",y:"221.885",width:"36.4",height:"9.01667",rx:"0.65",fill:n.cE7EAE9,stroke:n.c001174,strokeWidth:"0.7"}),e.jsx("rect",{x:"310.537",y:"221.885",width:"6.54333",height:"9.01667",rx:"0.65",fill:n.cE7EAE9,stroke:n.c001174,strokeWidth:"0.7"}),e.jsx("rect",{x:"321.312",y:"221.885",width:"6.54333",height:"9.01667",rx:"0.65",fill:n.cE7EAE9,stroke:n.c001174,strokeWidth:"0.7"}),e.jsx("rect",{x:"332.089",y:"221.885",width:"6.54333",height:"9.01667",rx:"0.65",fill:n.cE7EAE9,stroke:n.c001174,strokeWidth:"0.7"}),e.jsx("rect",{x:"342.864",y:"221.885",width:"6.54333",height:"9.01667",rx:"0.65",fill:n.cE7EAE9,stroke:n.c001174,strokeWidth:"0.7"}),e.jsx("circle",{cx:"270.258",cy:"250.685",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"270.258",cy:"253.335",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"281.561",cy:"250.685",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"281.561",cy:"253.335",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"273.085",cy:"250.685",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"273.085",cy:"253.335",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"284.388",cy:"250.685",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"284.388",cy:"253.335",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"275.91",cy:"250.685",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"275.91",cy:"253.335",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"287.214",cy:"250.685",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"287.214",cy:"253.335",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"278.737",cy:"250.685",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"278.737",cy:"253.335",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"290.04",cy:"250.685",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"290.04",cy:"253.335",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"344.462",cy:"250.685",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"344.462",cy:"253.335",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"355.765",cy:"250.685",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"355.765",cy:"253.335",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"347.29",cy:"250.685",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"347.29",cy:"253.335",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"358.592",cy:"250.685",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"358.592",cy:"253.335",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"350.114",cy:"250.685",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"350.114",cy:"253.335",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"361.418",cy:"250.685",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"361.418",cy:"253.335",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"352.941",cy:"250.685",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"352.941",cy:"253.335",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"364.244",cy:"250.685",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"364.244",cy:"253.335",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"344.462",cy:"271.885",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"344.462",cy:"274.535",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"355.765",cy:"271.885",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"355.765",cy:"274.535",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"347.29",cy:"271.885",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"347.29",cy:"274.535",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"358.592",cy:"271.885",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"358.592",cy:"274.535",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"350.114",cy:"271.885",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"350.114",cy:"274.535",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"361.418",cy:"271.885",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"361.418",cy:"274.535",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"352.941",cy:"271.885",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"352.941",cy:"274.535",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"364.244",cy:"271.885",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"364.244",cy:"274.535",r:"0.883333",fill:n.cD9D9D9}),e.jsx("circle",{cx:"359.918",cy:"262.61",r:"4.45833",stroke:n.c001174,strokeWidth:"0.8"}),e.jsx("circle",{cx:"359.918",cy:"262.61",r:"2.20833",fill:n.cE7EAE9}),e.jsx("rect",{x:"269.726",y:"258.102",width:"36.4",height:"9.01667",rx:"0.65",fill:n.cE7EAE9,stroke:n.c001174,strokeWidth:"0.7"}),e.jsx("rect",{x:"310.537",y:"258.102",width:"6.54333",height:"9.01667",rx:"0.65",fill:n.cE7EAE9,stroke:n.c001174,strokeWidth:"0.7"}),e.jsx("rect",{x:"321.312",y:"258.102",width:"6.54333",height:"9.01667",rx:"0.65",fill:n.cE7EAE9,stroke:n.c001174,strokeWidth:"0.7"}),e.jsx("rect",{x:"332.089",y:"258.102",width:"6.54333",height:"9.01667",rx:"0.65",fill:n.cE7EAE9,stroke:n.c001174,strokeWidth:"0.7"}),e.jsx("rect",{x:"342.864",y:"258.102",width:"6.54333",height:"9.01667",rx:"0.65",fill:n.cE7EAE9,stroke:n.c001174,strokeWidth:"0.7"}),e.jsx("rect",{x:"270.261",y:"200.336",width:"8.83333",height:"6.18333",fill:n.cFFFFFF}),e.jsx("rect",{x:"270.261",y:"235.668",width:"8.83333",height:"6.18333",fill:n.cFFFFFF}),e.jsx("rect",{x:"270.261",y:"271.885",width:"8.83333",height:"6.18333",fill:n.cFFFFFF}),e.jsx("rect",{x:"279.095",y:"200.336",width:"26.5",height:"6.18333",fill:n.cDEECF8}),e.jsx("rect",{x:"279.095",y:"235.668",width:"26.5",height:"6.18333",fill:n.cDEECF8}),e.jsx("rect",{x:"279.095",y:"271.885",width:"26.5",height:"6.18333",fill:n.cDEECF8}),e.jsx("path",{d:"M268.053 210.494C268.483 209.112 268.564 208.343 268.053 206.961H362.569C361.955 208.363 361.972 209.136 362.569 210.494H268.053Z",fill:n.c000D58,stroke:n.c001174}),e.jsx("path",{d:"M268.053 246.269C268.483 244.887 268.564 244.118 268.053 242.736H362.569C361.955 244.138 361.972 244.911 362.569 246.269H268.053Z",fill:n.c000D58,stroke:n.c001174}),e.jsx("path",{d:"M283.312 130.775C283.312 129.64 283.987 128.72 284.82 128.72H349.805C350.638 128.72 351.312 129.64 351.312 130.775V169.72H283.312V130.775Z",fill:n.cFFFFFF,stroke:n.c48504C,strokeWidth:"2"}),e.jsx("path",{d:"M279.574 171.847C279.381 171.283 279.267 170.624 279.33 169.72H355.195C355.423 170.925 355.287 171.695 355.063 172.241C354.834 172.802 354.506 173.186 354.101 173.66C354.084 173.68 354.067 173.7 354.05 173.72H280.503C280.468 173.658 280.434 173.598 280.4 173.539C280.051 172.922 279.774 172.434 279.574 171.847Z",stroke:n.c48504C,strokeWidth:"2"}),e.jsx("path",{d:"M350.312 133.72V129.726L284.812 129.72C284.312 129.726 284.312 129.726 284.312 130.125V133.72H350.312Z",fill:n.cD6D6D6}),e.jsx("circle",{cx:"287.212",cy:"131.62",r:"0.9",fill:n.c28AC6E}),e.jsx("circle",{cx:"289.812",cy:"131.62",r:"0.9",fill:n.cC9184A}),e.jsx("circle",{cx:"292.412",cy:"131.62",r:"0.9",fill:n.cFFE18B}),e.jsx("rect",{x:"315.312",y:"133.72",width:"35",height:"35",fill:n.c90CAF9}),e.jsx("path",{d:"M319.312 153.22H341.312",stroke:n.cFFFFFF,strokeWidth:"1.3",strokeLinecap:"round"}),e.jsx("path",{d:"M288.312 150.72H310.312",stroke:n.c001174,strokeWidth:"1.3",strokeLinecap:"round"}),e.jsx("path",{d:"M319.312 156.22H336.312",stroke:n.cFFFFFF,strokeWidth:"1.3",strokeLinecap:"round"}),e.jsx("path",{d:"M288.312 153.72H305.312",stroke:n.c001174,strokeWidth:"1.3",strokeLinecap:"round"}),e.jsx("path",{d:"M319.312 159.22H336.312",stroke:n.cFFFFFF,strokeWidth:"1.3",strokeLinecap:"round"}),e.jsx("path",{d:"M288.312 156.72H305.312",stroke:n.c001174,strokeWidth:"1.3",strokeLinecap:"round"}),e.jsx("path",{d:"M337.312 139.72L328.312 148.72M328.313 139.72L337.313 148.72",stroke:n.cFFFFFF,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})}function io({onClick:r}){const t=$.useMediaQuery("md");return e.jsxs(y.Box,{height:"height-screen",fullWidth:!0,display:"flex",align:"center",justify:"center",gap:"md",overflow:"overflow-hidden",children:[e.jsx(co,{width:t?600:300}),e.jsx(v.Text,{fontWeight:"bold",fontSize:t?"3xl":"2xl",textAlign:"center",children:"Server Problem"}),e.jsx(v.Text,{fontWeight:"semibold",fontSize:t?"lg":"md",textAlign:"center",children:"we are trying to fix the problem"}),r&&e.jsx(A.Button,{size:t?"md":"xs",onClick:r,children:"Go Back"})]})}const no=r=>{var l,c,o,i,h;const t=$.useMediaQuery("md");return e.jsxs(ge.Dialog,{isShow:r.isShow,onHide:r.onHide,style:{...t?{minWidth:r.customMinWidth||"458px"}:{maxWidth:r.customMinWidth||"458px"}},children:[e.jsx(ge.DialogTitle,{...r.dialogTitleProps,children:typeof r.title=="string"?e.jsx(v.Text,{fontSize:"lg",fontWeight:"medium",children:r.title}):r.title}),e.jsx(ge.DialogBody,{children:typeof r.description=="string"?e.jsx(v.Text,{fontSize:"md",lineHeight:"leading-6",color:"tertiary",children:r.description}):r.description}),e.jsx(ge.DialogFooter,{children:e.jsx(y.Box,{display:"flex",direction:((l=r.containerConfirmBtnProps)==null?void 0:l.direction)||"row",justify:((c=r.containerConfirmBtnProps)==null?void 0:c.justify)||"flex-end",...r.containerConfirmBtnProps,children:e.jsxs(y.Box,{display:"flex",direction:((o=r.wrapperConfirmBtnProps)==null?void 0:o.direction)||"row",justify:((i=r.wrapperConfirmBtnProps)==null?void 0:i.justify)||"flex-end",gap:((h=r.wrapperConfirmBtnProps)==null?void 0:h.gap)||"sm",...r.wrapperConfirmBtnProps,children:[r.onCancel&&e.jsx(A.Button,{secondary:!0,onClick:r.onCancel,size:"md",fullWidth:!0,children:r.titleCancelBtn||"Cancel"}),e.jsx(y.Box,{fullWidth:!0,style:{textWrap:"nowrap"},children:e.jsx(A.Button,{...r.buttonConfirmProps,onClick:r.onConfirm,size:"md",fullWidth:!0,children:r.titleConfirmBtn||"Ok"})})]})})})]},r.key)},ao=g.memo(({children:r,height:t,minHeight:l,customHeight:c,paddingInline:o="spacing-0",paddingBlock:i="spacing-0",header:h,footer:s,title:f,titleTag:d,action:u,actionContainer:p,containerProps:C,bodyProps:w,headerProps:B={borderBottom:!0},footerProps:D={borderTop:!0},variantTag:H="info"})=>{const Z=g.useRef(null),[P,J]=g.useState("100vh");g.useEffect(()=>{const W=()=>{if(Z.current){const X=Z.current.getBoundingClientRect().top;J(`calc(100vh - ${X}px)`)}};return W(),window.addEventListener("resize",W),()=>window.removeEventListener("resize",W)},[]);const T=()=>d?e.jsxs(y.Box,{direction:"row",gap:"sm",align:"center",children:[e.jsx(v.Text,{fontWeight:"medium",children:f}),e.jsx(be.Badges,{border:!0,text:d,variant:H})]}):e.jsx(v.Text,{fontWeight:"medium",children:f}),se=()=>h||e.jsxs(y.Box,{direction:"row",justify:"space-between",align:"flex-start",gap:"md",children:[e.jsx(y.Box,{children:f?T():null}),e.jsx(y.Box,{...p,children:u??null})]}),Y=!!(h||f||u);return e.jsxs(y.Box,{ref:Z,height:t,customMinHeight:l,customHeight:c,paddingBlock:i,paddingInline:o,bg:"white",direction:"column",...C,style:{backgroundColor:"var(--sa-background-primary, #ffffff)",display:"flex",minHeight:P,...(C==null?void 0:C.style)??{}},children:[h!==null&&Y?e.jsx(Cr,{...B,children:se()}):null,e.jsx(y.Box,{padding:"spacing-0",...w,style:{flex:1,overflow:"auto",...(w==null?void 0:w.style)??{}},children:r}),s?e.jsx(xr,{...D,children:s}):null]})}),so=g.memo(({value:r,options:t=[],onChange:l,multiple:c})=>{const o=(r==null?void 0:r.map(s=>s.value))||[],i=(t==null?void 0:t.filter(s=>o.includes(s.value)))||[],h=s=>{const f=[...i];let d=[];c?d=o.includes(s.value)?f.filter(u=>u.value!==s.value):[...f,s]:d=[s],l==null||l(d)};return e.jsx(y.Box,{direction:"row",gap:"sm",flexWrap:"wrap",children:t==null?void 0:t.map((s,f)=>e.jsx(A.Button,{...o.includes(s.value)?{primary:!0}:{secondary:!0},onClick:()=>h(s),children:s.label},f))})});function Ye(r){return null}Ye.displayName="LayoutDialog.Header";function Xe(r){return null}Xe.displayName="LayoutDialog.Body";function Ke(r){return null}Ke.displayName="LayoutDialog.Aside";function $e(r){return null}$e.displayName="LayoutDialog.Footer";const re={"lyd-root":"_lyd-root_1e92c_1","lyd-backdrop":"_lyd-backdrop_1e92c_28","lyd-panel":"_lyd-panel_1e92c_37","lyd-modal":"_lyd-modal_1e92c_48","lyd-fullscreen":"_lyd-fullscreen_1e92c_58","lyd-sidebar":"_lyd-sidebar_1e92c_66","lyd-header":"_lyd-header_1e92c_94","lyd-header-content":"_lyd-header-content_1e92c_105","lyd-header-actions":"_lyd-header-actions_1e92c_113","lyd-main":"_lyd-main_1e92c_120","lyd-body":"_lyd-body_1e92c_127","lyd-aside":"_lyd-aside_1e92c_133","lyd-footer":"_lyd-footer_1e92c_149","lyd-vm-group":"_lyd-vm-group_1e92c_162","lyd-vm-btn":"_lyd-vm-btn_1e92c_170","lyd-close-btn":"_lyd-close-btn_1e92c_193"},ho=[{mode:"sidebar",label:"Sidebar",icon:e.jsx(go,{})},{mode:"modal",label:"Modal",icon:e.jsx(S.Icon,{name:"Newscreen",size:"sm"})},{mode:"fullscreen",label:"Fullscreen",icon:e.jsx(S.Icon,{name:"Fullscreen",size:"sm"})}];function fo({value:r,onChange:t}){return e.jsx("div",{className:re["lyd-vm-group"],role:"group","aria-label":"View mode",children:ho.map(l=>e.jsx("button",{type:"button",className:re["lyd-vm-btn"],"data-active":r===l.mode,"aria-label":`Switch to ${l.label} view`,"aria-pressed":r===l.mode,onClick:()=>t(l.mode),children:l.icon},l.mode))})}function go(){return e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[e.jsx("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),e.jsx("line",{x1:"15",y1:"4",x2:"15",y2:"20"})]})}const br={md:"768px",lg:"1024px",xl:"1200px","2xl":"1440px"};function yo(r){return r?r in br?br[r]:r:br.xl}function Re(r,t){let l=null;return g.Children.forEach(r,c=>{g.isValidElement(c)&&c.type===t&&(l=c.props.children??null)}),l}function uo(r){const{isOpen:t,onClose:l,viewMode:c,defaultViewMode:o="modal",onViewModeChange:i,showViewModeToggle:h=!0,showCloseButton:s=!0,size:f,asideWidth:d,disableEscapeClose:u=!1,disableBackdropClose:p=!1,lockBodyScroll:C=!0,children:w}=r,[B,D]=g.useState(o),H=c??B,P=$.useMediaQuery("md")?H:"fullscreen",J=g.useCallback(K=>{c===void 0&&D(K),i==null||i(K)},[c,i]),T=g.useRef(null);g.useEffect(()=>{if(!(!t||!C))return T.current=document.body.style.overflow,document.body.style.overflow="hidden",()=>{document.body.style.overflow=T.current??""}},[t,C]),g.useEffect(()=>{if(!t||u)return;const K=te=>{te.key==="Escape"&&l()};return window.addEventListener("keydown",K),()=>window.removeEventListener("keydown",K)},[t,u,l]);const se=g.useMemo(()=>Re(w,Ye),[w]),Y=g.useMemo(()=>Re(w,Xe),[w]),W=g.useMemo(()=>Re(w,Ke),[w]),X=g.useMemo(()=>Re(w,$e),[w]);if(!t)return null;const ne=[re["lyd-panel"],P==="modal"&&re["lyd-modal"],P==="fullscreen"&&re["lyd-fullscreen"],P==="sidebar"&&re["lyd-sidebar"]].filter(Boolean).join(" "),ae={"--lyd-max-w":yo(f),...d!==void 0&&{"--lyd-aside-w":d}},q=()=>{p||l()};return e.jsxs("div",{className:re["lyd-root"],style:ae,role:"dialog","aria-modal":"true",children:[e.jsx("div",{className:re["lyd-backdrop"],onClick:q,"aria-hidden":"true"}),e.jsxs("div",{className:ne,children:[e.jsxs("div",{className:re["lyd-header"],children:[e.jsx("div",{className:re["lyd-header-content"],children:se}),e.jsxs("div",{className:re["lyd-header-actions"],children:[h&&e.jsx(fo,{value:H,onChange:J}),s&&e.jsx("button",{type:"button",className:re["lyd-close-btn"],onClick:l,"aria-label":"Close dialog",children:e.jsx(S.Icon,{name:"Cross",size:"md"})})]})]}),e.jsxs("div",{className:re["lyd-main"],children:[e.jsx("div",{className:re["lyd-body"],children:Y}),W&&e.jsx("aside",{className:re["lyd-aside"],children:W})]}),X&&e.jsx("div",{className:re["lyd-footer"],children:X})]})]})}const Ae=uo;Ae.Header=Ye,Ae.Body=Xe,Ae.Aside=Ke,Ae.Footer=$e;function po({url:r,filename:t,onClose:l}){return g.useEffect(()=>{const c=o=>{o.key==="Escape"&&l()};return window.addEventListener("keydown",c),()=>window.removeEventListener("keydown",c)},[l]),e.jsxs("div",{onClick:l,style:{position:"fixed",inset:0,zIndex:9999,backgroundColor:"rgba(0,0,0,0.85)",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"12px"},children:[e.jsxs("div",{onClick:c=>c.stopPropagation(),style:{position:"absolute",top:"16px",right:"16px",display:"flex",gap:"8px"},children:[e.jsx("a",{href:r,download:t,style:{display:"inline-flex",alignItems:"center",gap:"6px",padding:"6px 12px",backgroundColor:"rgba(255,255,255,0.15)",color:"#fff",borderRadius:"var(--sa-radii-sm, 6px)",fontSize:"13px",textDecoration:"none",backdropFilter:"blur(4px)"},children:"Download"}),e.jsx("button",{onClick:l,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",backgroundColor:"rgba(255,255,255,0.15)",border:"none",borderRadius:"var(--sa-radii-sm, 6px)",color:"#fff",cursor:"pointer",backdropFilter:"blur(4px)"},"aria-label":"Close preview",children:"✕"})]}),e.jsx("img",{src:r,alt:t,onClick:c=>c.stopPropagation(),style:{maxWidth:"90vw",maxHeight:"85vh",objectFit:"contain",borderRadius:"var(--sa-radii-sm, 6px)",boxShadow:"var(--sa-shadow-lg, 0 25px 50px rgba(0,0,0,0.5))"}}),e.jsx("span",{style:{color:"rgba(255,255,255,0.6)",fontSize:"12px"},children:t})]})}const Co=r=>{const{defaultTab:t=0,paramKey:l="tab"}=r||{},[c,o]=G.useSearchParams(),i=Ee.searchParamsToObject(c.toString());return{activeTab:i[l]?parseInt(i[l]):t,handleTabChange:f=>{o({...i,[l]:f.toString()})},searchQueries:i}};function xo({appName:r,menuConfig:t,formatTitle:l}){const c=G.useLocation();g.useEffect(()=>{let o=null,i=null;for(const f of t){const d=f.items.find(u=>u.to?u.to==="/"?c.pathname==="/":!!(u.to===c.pathname||c.pathname.startsWith(u.to+"/")):!1);if(d){o=d,i=f;break}}const h=[];o!=null&&o.title&&h.push(o.title),i!=null&&i.name&&h.push(i.name.toTitleCase());const s=(f,d)=>f.length>0?`${f.join(" - ")} | ${d}`:d;document.title=(l||s)(h,r)},[c.pathname])}const vo=()=>{const[r,t]=G.useSearchParams(),l=Ee.searchParamsToObject(r.toString()),c=G.useParams(),o=G.useLocation(),i=c.id;return{setSearchParams:t,searchParams:r,searchQueries:l,isHasQuery:(u,p)=>r.has(u)&&r.get(u)===p,getQueryParam:u=>r.get(u),getRouteParam:u=>c[u],params:c,location:o,id:i,hasId:!!i}};function Do(r){var c,o;const t=r.decodedAccessToken;return g.useMemo(()=>{var f,d;const i=((d=(f=t==null?void 0:t.access)==null?void 0:f.role)==null?void 0:d.code)??"",h=Object.keys(r.role).reduce((u,p)=>{const C=`is${p.toLowerCase().replace(/(^\w|_\w)/g,w=>w.replace("_","").toUpperCase())}`;return{...u,[C]:!1}},{});return{...Object.keys(r.role).reduce((u,p)=>{const C=`is${p.toLowerCase().replace(/(^\w|_\w)/g,w=>w.replace("_","").toUpperCase())}`;return{...u,[C]:i===r.role[p]}},h),hasRole:u=>i===r.role[u],getRoleKey:()=>i}},[(o=(c=t==null?void 0:t.access)==null?void 0:c.role)==null?void 0:o.code,r])}a.ActionMenu=Ut,a.AdvanceFilterBar=at,a.App=Ft,a.AppComponent=zr,a.AppContext=dr,a.AppLayout=Mt,a.AsideBar=Yl,a.BackButton=Tt,a.ColumnFilterDropdown=ft,a.ConfirmationDialog=no,a.DataTable=yt,a.DecisionWrapper=V,a.EachUtils=Je,a.EmptyStatePage=eo,a.FilterDrawer=nt,a.FloatingFooter=Xl,a.ForbiddenPage=oo,a.Form=Jl,a.FullSection=ao,a.HeaderLeftSlot=Bt,a.HeaderLeftSlotOutlet=Pr,a.HeaderLeftSlotProvider=Nr,a.HorizontalField=Ht,a.ImagePreview=po,a.InputFile=pt,a.InputImage=xt,a.LayoutDialog=Ae,a.LayoutDialogAside=Ke,a.LayoutDialogBody=Xe,a.LayoutDialogFooter=$e,a.LayoutDialogHeader=Ye,a.ModuleSwitcher=Ot,a.ModuleSwitcherModal=Rr,a.NotFoundPage=to,a.PageLayout=zt,a.Pressable=He,a.RightDrawer=rt,a.ScrollToTopButton=vt,a.Section=_t,a.SectionFooter=xr,a.SectionHeader=Cr,a.SelectButton=so,a.ServerErrorPage=io,a.SidebarBadgesProvider=Ar,a.SidebarGroupSlot=kt,a.SidebarGroupSlotOutlet=Zr,a.SidebarGroupSlotProvider=_r,a.SidebarHeaderSlot=jr,a.TableFooter=ht,a.TableHeader=dt,a.TableSection=il,a.TableWrapper=st,a.ToggleStatus=Ul,a.Typography=ye,a.VerticalField=Kl,a.clearModuleSelection=Et,a.createInitialFromUserName=hl,a.cssVars=Cl,a.formHasChanged=Sl,a.formatDate=ul,a.formatDateToIndonesian=ut,a.formatRupiah=gl,a.getDateFilterValue=Rt,a.getDateRangeFilterValue=$t,a.getInitials=yl,a.getValueDropdownMultipleFilter=Xt,a.getValueRadioFilter=Kt,a.getValueSearch=it,a.getValuesFilter=Ue,a.handleChangeFilter=vr,a.handleOnScroll=ml,a.isEmail=Ll,a.isFilterActive=el,a.isOnlyLettersAndSpaces=Bl,a.isPhoneNumber=Fl,a.isSlug=Tl,a.oneDayInMs=xl,a.parseIndonesianDateToDate=fl,a.preventNonCoordinateInput=Ol,a.preventNonNumberAndDecimalInput=Ml,a.preventNonNumberInput=kl,a.preventNumberInput=El,a.resolveDateRangeValueToString=ot,a.resolveDateValueToString=ct,a.resolveDropdownValueToString=tt,a.resolveRadioValueToString=lt,a.resolveSidebarBadge=Ze,a.textWidth=vl,a.useApp=hr,a.useAppState=Wr,a.useAuthRole=Do,a.useDynamicTitle=xo,a.useModuleSelection=ur,a.useRouteInfo=Ge,a.useRouteParams=vo,a.useSidebarBadges=Vr,a.useTabState=Co,Object.keys(Be).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>Be[r]})}),Object.keys(be).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>be[r]})}),Object.keys(y).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>y[r]})}),Object.keys(ke).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>ke[r]})}),Object.keys(A).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>A[r]})}),Object.keys(Br).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>Br[r]})}),Object.keys(or).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>or[r]})}),Object.keys(ge).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>ge[r]})}),Object.keys(cr).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>cr[r]})}),Object.keys(me).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>me[r]})}),Object.keys($).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>$[r]})}),Object.keys(Ee).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>Ee[r]})}),Object.keys(Ie).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>Ie[r]})}),Object.keys(ie).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>ie[r]})}),Object.keys(ir).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>ir[r]})}),Object.keys(kr).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>kr[r]})}),Object.keys(Q).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>Q[r]})}),Object.keys(Er).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>Er[r]})}),Object.keys(nr).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>nr[r]})}),Object.keys(Me).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>Me[r]})}),Object.keys(Mr).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>Mr[r]})}),Object.keys(_e).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>_e[r]})}),Object.keys(ce).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>ce[r]})}),Object.keys(We).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>We[r]})}),Object.keys(ar).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>ar[r]})}),Object.keys(v).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>v[r]})}),Object.keys(S).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>S[r]})}),Object.keys(N).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>N[r]})}),Object.keys(Lr).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>Lr[r]})}),Object.keys(Tr).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>Tr[r]})}),Object.keys(Or).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>Or[r]})}),Object.keys(mr).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>mr[r]})}),Object.keys(Se).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>Se[r]})}),Object.keys(Ir).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:()=>Ir[r]})}),Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})});
|