affiliate-front-shared 1.3.10 → 1.3.12

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/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
- "use strict";var Cr=Object.defineProperty;var jr=(n,e,t)=>e in n?Cr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var Pe=(n,e,t)=>jr(n,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),S=require("react"),H=require("antd"),m=require("styled-components"),ne=require("react-router"),tt=require("zustand"),Bt=require("react-i18next"),kr=require("echarts"),Lr=require("react-dom"),Dr=require("i18next-browser-languagedetector"),$r=require("i18next-http-backend"),Er=require("xlsx"),Or=require("lodash");function rt(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>n[t]})}}return e.default=n,Object.freeze(e)}const P=rt(S),Tr=rt(kr),He=rt(Er),Gt=S.createContext({});function Ir({services:n,children:e}){return i.jsx(Gt.Provider,{value:n,children:e})}function we(){return S.useContext(Gt)}let he=n=>n;function xt(n){he=n}const B=(n,e)=>he(`general.${n}`,e),ae=(n,e)=>he(`actions.${n}`,e),te=(n,e)=>he(`authentication.${n}`,e),oe=(n,e)=>he(`months.${n}`,e),Ce=(n,e)=>he(`date.${n}`,e),xe=(n,e)=>he(`weekDays.${n}`,e),zr=(n,e)=>he(`noData.${n}`,e),yt=(n,e)=>he(`comingSoon.${n}`,e);function Mr({t:n,children:e}){return xt(n),S.useEffect(()=>{xt(n)},[n]),i.jsx(i.Fragment,{children:e})}const nt=n=>P.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M5.33343 5.72363L8.0001 8.3903L10.6668 5.72363L11.6096 6.66644L8.0001 10.2759L4.39062 6.66644L5.33343 5.72363Z",fill:"currentColor",fillOpacity:.75})),Pr=m(nt)`
1
+ "use strict";var $r=Object.defineProperty;var Er=(n,e,t)=>e in n?$r(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var Re=(n,e,t)=>Er(n,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),S=require("react"),R=require("antd"),m=require("styled-components"),ne=require("react-router"),ot=require("zustand"),Gt=require("react-i18next"),Or=require("echarts"),Tr=require("react-dom"),Ir=require("i18next-browser-languagedetector"),zr=require("i18next-http-backend"),Mr=require("xlsx"),Pr=require("lodash");function at(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>n[t]})}}return e.default=n,Object.freeze(e)}const P=at(S),Hr=at(Or),Fe=at(Mr),Ut=S.createContext({});function Rr({services:n,children:e}){return i.jsx(Ut.Provider,{value:n,children:e})}function we(){return S.useContext(Ut)}let he=n=>n;function yt(n){he=n}const B=(n,e)=>he(`general.${n}`,e),ae=(n,e)=>he(`actions.${n}`,e),te=(n,e)=>he(`authentication.${n}`,e),oe=(n,e)=>he(`months.${n}`,e),Ce=(n,e)=>he(`date.${n}`,e),xe=(n,e)=>he(`weekDays.${n}`,e),Fr=(n,e)=>he(`noData.${n}`,e),bt=(n,e)=>he(`comingSoon.${n}`,e);function Nr({t:n,children:e}){return yt(n),S.useEffect(()=>{yt(n)},[n]),i.jsx(i.Fragment,{children:e})}const it=n=>P.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M5.33343 5.72363L8.0001 8.3903L10.6668 5.72363L11.6096 6.66644L8.0001 10.2759L4.39062 6.66644L5.33343 5.72363Z",fill:"currentColor",fillOpacity:.75})),Vr=m(it)`
2
2
  color: var(--color-text-primary, #131412);
3
- `,Hr=m.div`
3
+ `,Ar=m.div`
4
4
  background: var(--color-bg-secondary, #f5f5f5);
5
5
  color: #000;
6
6
  width: 100%;
@@ -12,7 +12,7 @@
12
12
  flex-direction: column;
13
13
  box-sizing: border-box;
14
14
  position: relative;
15
- `,Rr=m.div`
15
+ `,Br=m.div`
16
16
  display: inline-flex;
17
17
  flex-direction: column;
18
18
  gap: 0.5rem;
@@ -29,7 +29,7 @@
29
29
  line-height: var(--typo-caption-lineHeight-medium, 1.125rem);
30
30
  letter-spacing: var(--typo-caption-spacing-medium, 0.00625rem);
31
31
  }
32
- `,Fr=m.div`
32
+ `,Gr=m.div`
33
33
  display: flex;
34
34
  align-items: center;
35
35
  gap: 5px;
@@ -44,7 +44,7 @@
44
44
  font-weight: var(--text-weight-medium, 500);
45
45
  line-height: var(--typo-caption-lineHeight-medium, 18px); /* 128.571% */
46
46
  letter-spacing: var(--typo-caption-spacing-medium, 0.1px);
47
- `,Nr=m(H.Menu)`
47
+ `,Ur=m(R.Menu)`
48
48
  border: none !important;
49
49
  background: transparent;
50
50
  flex: 1;
@@ -112,16 +112,16 @@
112
112
  margin-left: 1.5rem !important;
113
113
  }
114
114
  }
115
- `,ot=(n,e=[])=>{const[t,r]=S.useState(null),[o,a]=S.useState(null),[s,l]=S.useState(!0),[d,c]=S.useState(null),u=async()=>{var p;try{l(!0),r(null);const h=await n();r(h),(p=h==null?void 0:h.data)!=null&&p.items&&a(h.data.items)}catch{c("Failed to fetch data")}finally{l(!1)}};return S.useEffect(()=>{u()},[...e]),{response:t,loading:s,error:d,fetchData:u,listItems:o}},Se=tt.create((n,e)=>({user:localStorage.getItem("userData")?JSON.parse(localStorage.getItem("userData")):null,prefersDark:!1,storedThemeMode:null,setUser:t=>{localStorage.setItem("useToken",t.token),localStorage.setItem("userData",JSON.stringify(t)),n({user:t})},setThemeMode:t=>{const r=t===null?window.matchMedia("(prefers-color-scheme: dark)").matches:!!t;n({prefersDark:r,storedThemeMode:t}),document.documentElement.setAttribute("data-theme",r?"dark":"light"),localStorage.setItem("themeMode",JSON.stringify(t))},logout:()=>{localStorage.removeItem("userData"),localStorage.removeItem("useToken"),n({user:null})},isSentsitiveInfoVisible:()=>{const t=e().user;return t!=null&&t.sensitiveDataExpiration?new Date<new Date(t.sensitiveDataExpiration):!1},isTokenActive:()=>{const t=e().user;return t!=null&&t.expired?new Date<new Date(t.expired):!1},isManager:()=>{const t=e().user;return(t==null?void 0:t.type)==="Manager"},hasPermission:t=>{const r=e().user;return r!=null&&r.permissions?!!r.permissions[t]:!1}})),Ee=n=>P.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M13.4715 5.13812L12.5286 4.19531L7.00005 9.72391L4.13812 6.86198L3.19531 7.80479L7.00005 11.6095L13.4715 5.13812Z",fill:"currentColor"})),Vr=m(Ee)`
115
+ `,st=(n,e=[])=>{const[t,r]=S.useState(null),[o,a]=S.useState(null),[s,l]=S.useState(!0),[d,c]=S.useState(null),u=async()=>{var p;try{l(!0),r(null);const h=await n();r(h),(p=h==null?void 0:h.data)!=null&&p.items&&a(h.data.items)}catch{c("Failed to fetch data")}finally{l(!1)}};return S.useEffect(()=>{u()},[...e]),{response:t,loading:s,error:d,fetchData:u,listItems:o}},Se=ot.create((n,e)=>({user:localStorage.getItem("userData")?JSON.parse(localStorage.getItem("userData")):null,prefersDark:!1,storedThemeMode:null,setUser:t=>{localStorage.setItem("useToken",t.token),localStorage.setItem("userData",JSON.stringify(t)),n({user:t})},setThemeMode:t=>{const r=t===null?window.matchMedia("(prefers-color-scheme: dark)").matches:!!t;n({prefersDark:r,storedThemeMode:t}),document.documentElement.setAttribute("data-theme",r?"dark":"light"),localStorage.setItem("themeMode",JSON.stringify(t))},logout:()=>{localStorage.removeItem("userData"),localStorage.removeItem("useToken"),n({user:null})},isSentsitiveInfoVisible:()=>{const t=e().user;return t!=null&&t.sensitiveDataExpiration?new Date<new Date(t.sensitiveDataExpiration):!1},isTokenActive:()=>{const t=e().user;return t!=null&&t.expired?new Date<new Date(t.expired):!1},isManager:()=>{const t=e().user;return(t==null?void 0:t.type)==="Manager"},hasPermission:t=>{const r=e().user;return r!=null&&r.permissions?!!r.permissions[t]:!1}})),Ee=n=>P.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M13.4715 5.13812L12.5286 4.19531L7.00005 9.72391L4.13812 6.86198L3.19531 7.80479L7.00005 11.6095L13.4715 5.13812Z",fill:"currentColor"})),_r=m(Ee)`
116
116
  display: flex;
117
117
  justify-content: center;
118
118
  color: var(--color-text-primary, #131412) !important;
119
- `,Ar=m.div`
119
+ `,Wr=m.div`
120
120
  display: flex;
121
121
  align-items: center;
122
122
  justify-content: space-between;
123
123
  width: 256px;
124
- `,Br=m.span`
124
+ `,Yr=m.span`
125
125
  color: var(--color-text-primary, #131412);
126
126
 
127
127
  /* caption/medium-r */
@@ -131,7 +131,7 @@
131
131
  font-weight: var(--text-weight-regular, 400);
132
132
  line-height: var(--typo-caption-lineHeight-medium, 18px); /* 128.571% */
133
133
  letter-spacing: var(--typo-caption-spacing-medium, 0.1px);
134
- `,J=m(H.Menu)`
134
+ `,J=m(R.Menu)`
135
135
  display: flex;
136
136
  padding: var(--spacing-050, 4px) 0;
137
137
  flex-direction: column;
@@ -175,11 +175,11 @@
175
175
  .ant-menu-submenu-popup .ant-menu-item:hover {
176
176
  background-color: transparent !important;
177
177
  }
178
- `,Gr=m.div`
178
+ `,Kr=m.div`
179
179
  width: 256px;
180
180
  position: absolute !important;
181
181
  z-index: 10000;
182
- `,Ur=({closeProfileDropdown:n})=>{const e=ne.useNavigate(),{getCustomers:t,postSelectedCustomer:r}=we(),{storedThemeMode:o,logout:a,setThemeMode:s,user:l}=Se(),{i18n:d}=Bt.useTranslation();function c(){a(),e("/authorization/login")}function u(w){d.changeLanguage(w),window.location.reload()}const p=(w,O)=>i.jsxs(Ar,{children:[i.jsx(Br,{children:w}),O&&i.jsx("span",{children:i.jsx(Vr,{})})]}),{response:h}=ot(t??(()=>Promise.resolve({data:[]})),[]);async function f(w){if(!r)return;const A=(await r(w)).data.value;localStorage.setItem("useToken",A.token),localStorage.setItem("userData",JSON.stringify(A))}const g=()=>{(l==null?void 0:l.type)==="Manager"?e(`/affiliate-manager/profile/${l.id}`):e(`/affiliate-users/profile/${l==null?void 0:l.affiliateUserId}`)};return i.jsx(Gr,{children:i.jsxs(J,{mode:window.innerWidth<780?"inline":"vertical",getPopupContainer:w=>w.parentElement||document.body,onClick:()=>n(!1),children:[i.jsx(J.Item,{onClick:g,children:"Profile"},"10-1"),i.jsxs(J.Item,{children:[" ","Notifications"]},"10-2"),i.jsxs(J.Item,{children:[" ","SecurityAccess"]},"10-3"),i.jsx(J.Divider,{}),i.jsxs(J.SubMenu,{title:"Language",children:[i.jsx(J.Item,{onClick:()=>u("en"),children:p("English",d.language==="en")},"20-1"),i.jsx(J.Item,{onClick:()=>u("ka"),children:p("Georgian",d.language==="ka")},"20-2")]},"20"),i.jsxs(J.SubMenu,{title:"ColorTheme",children:[i.jsx(J.Item,{onClick:()=>s(!1),children:p("Light",o===!1)},"30-1"),i.jsx(J.Item,{onClick:()=>s(!0),children:p("Dark",o===!0)},"30-2"),i.jsx(J.Item,{onClick:()=>s(null),children:p(`DefinedBySystem (${window.matchMedia("(prefers-color-scheme: dark)").matches?"Dark":"Light"})`,o===null)},"30-3")]},"30"),i.jsx(J.Divider,{}),i.jsx(J.SubMenu,{title:"ConnectedAccounts",children:((h==null?void 0:h.data)||[]).map(w=>i.jsx(J.Item,{onClick:()=>f(w.id),children:p(w.name)},w.id))},"40"),i.jsx(J.Divider,{}),i.jsx(J.Item,{onClick:c,children:"LogOut"},"100")]},"10")})},Ut=({items:n,topLogoPrimaryUrl:e,shortName:t})=>{const r=ne.useLocation(),[o,a]=S.useState(!1),s=S.useRef(null),l=()=>a(d=>!d);return S.useEffect(()=>{function d(c){s.current&&!s.current.contains(c.target)&&a(!1)}return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[]),i.jsxs(Hr,{className:"sidebar-wrapper",children:[i.jsxs(Rr,{ref:s,children:[i.jsxs(Fr,{onClick:l,children:[i.jsx("img",{src:e,alt:"logo"}),i.jsx("span",{children:t}),i.jsx(Pr,{})]}),i.jsx("div",{children:o&&i.jsx(Ur,{closeProfileDropdown:a})})]}),i.jsx(Nr,{mode:"inline",selectedKeys:[r.pathname],items:n})]})},_r=m.div`
182
+ `,qr=({closeProfileDropdown:n})=>{const e=ne.useNavigate(),{getCustomers:t,postSelectedCustomer:r}=we(),{storedThemeMode:o,logout:a,setThemeMode:s,user:l}=Se(),{i18n:d}=Gt.useTranslation();function c(){a(),e("/authorization/login")}function u(w){d.changeLanguage(w),window.location.reload()}const p=(w,O)=>i.jsxs(Wr,{children:[i.jsx(Yr,{children:w}),O&&i.jsx("span",{children:i.jsx(_r,{})})]}),{response:h}=st(t??(()=>Promise.resolve({data:[]})),[]);async function f(w){if(!r)return;const A=(await r(w)).data.value;localStorage.setItem("useToken",A.token),localStorage.setItem("userData",JSON.stringify(A))}const g=()=>{(l==null?void 0:l.type)==="Manager"?e(`/affiliate-manager/profile/${l.id}`):e(`/affiliate-users/profile/${l==null?void 0:l.affiliateUserId}`)};return i.jsx(Kr,{children:i.jsxs(J,{mode:window.innerWidth<780?"inline":"vertical",getPopupContainer:w=>w.parentElement||document.body,onClick:()=>n(!1),children:[i.jsx(J.Item,{onClick:g,children:"Profile"},"10-1"),i.jsxs(J.Item,{children:[" ","Notifications"]},"10-2"),i.jsxs(J.Item,{children:[" ","SecurityAccess"]},"10-3"),i.jsx(J.Divider,{}),i.jsxs(J.SubMenu,{title:"Language",children:[i.jsx(J.Item,{onClick:()=>u("en"),children:p("English",d.language==="en")},"20-1"),i.jsx(J.Item,{onClick:()=>u("ka"),children:p("Georgian",d.language==="ka")},"20-2")]},"20"),i.jsxs(J.SubMenu,{title:"ColorTheme",children:[i.jsx(J.Item,{onClick:()=>s(!1),children:p("Light",o===!1)},"30-1"),i.jsx(J.Item,{onClick:()=>s(!0),children:p("Dark",o===!0)},"30-2"),i.jsx(J.Item,{onClick:()=>s(null),children:p(`DefinedBySystem (${window.matchMedia("(prefers-color-scheme: dark)").matches?"Dark":"Light"})`,o===null)},"30-3")]},"30"),i.jsx(J.Divider,{}),i.jsx(J.SubMenu,{title:"ConnectedAccounts",children:((h==null?void 0:h.data)||[]).map(w=>i.jsx(J.Item,{onClick:()=>f(w.id),children:p(w.name)},w.id))},"40"),i.jsx(J.Divider,{}),i.jsx(J.Item,{onClick:c,children:"LogOut"},"100")]},"10")})},_t=({items:n,topLogoPrimaryUrl:e,shortName:t})=>{const r=ne.useLocation(),[o,a]=S.useState(!1),s=S.useRef(null),l=()=>a(d=>!d);return S.useEffect(()=>{function d(c){s.current&&!s.current.contains(c.target)&&a(!1)}return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[]),i.jsxs(Ar,{className:"sidebar-wrapper",children:[i.jsxs(Br,{ref:s,children:[i.jsxs(Gr,{onClick:l,children:[i.jsx("img",{src:e,alt:"logo"}),i.jsx("span",{children:t}),i.jsx(Vr,{})]}),i.jsx("div",{children:o&&i.jsx(qr,{closeProfileDropdown:a})})]}),i.jsx(Ur,{mode:"inline",selectedKeys:[r.pathname],items:n})]})},Zr=m.div`
183
183
  min-height: 100vh;
184
184
  min-height: 100dvh;
185
185
  background: var(--color-bg-primary, #fff);
@@ -198,15 +198,15 @@
198
198
  display: none;
199
199
  }
200
200
  }
201
- `,Wr=m.div`
201
+ `,Jr=m.div`
202
202
  display: flex;
203
203
  flex-direction: column;
204
204
  flex: 1;
205
205
  overflow-y: auto;
206
206
  max-height: 100vh;
207
- `,Yr=m.div`
207
+ `,Xr=m.div`
208
208
  background: var(--color-bg-primary, #fff);
209
- `,Kr=({children:n})=>i.jsxs(_r,{children:[i.jsx(Ut,{}),i.jsx(Wr,{children:i.jsx(Yr,{children:n})})]}),qr=m.div`
209
+ `,Qr=({children:n})=>i.jsxs(Zr,{children:[i.jsx(_t,{}),i.jsx(Jr,{children:i.jsx(Xr,{children:n})})]}),en=m.div`
210
210
  display: grid;
211
211
  grid-template-columns: 33.625rem 1fr;
212
212
  min-height: 100vh;
@@ -225,9 +225,9 @@
225
225
  flex-shrink: 0;
226
226
  object-fit: contain;
227
227
  }
228
- `,Zr=m.span`
228
+ `,tn=m.span`
229
229
  font-size: 15px;
230
- `,Jr=m.button`
230
+ `,rn=m.button`
231
231
  height: var(--size-400, 2rem);
232
232
  width: var(--size-400, 2rem);
233
233
  display: flex;
@@ -241,7 +241,7 @@
241
241
  path {
242
242
  fill: var(--color-icon-primary, #131412);
243
243
  }
244
- `,Xr=m.div`
244
+ `,nn=m.div`
245
245
  display: flex;
246
246
  flex-direction: column;
247
247
  padding: 0 1.5rem;
@@ -284,7 +284,7 @@
284
284
  margin-bottom: 2rem;
285
285
  }
286
286
  }
287
- `,Qr=m.div``,en=m.div`
287
+ `,on=m.div``,an=m.div`
288
288
  display: flex;
289
289
  flex-direction: column;
290
290
  gap: 0.25rem;
@@ -308,7 +308,7 @@
308
308
  @media (max-width: 768px) {
309
309
  padding: 1.7rem 0 1rem;
310
310
  }
311
- `,tn=m.div`
311
+ `,sn=m.div`
312
312
  display: flex;
313
313
  align-items: center;
314
314
  justify-content: center;
@@ -323,7 +323,7 @@
323
323
  @media (max-width: 1024px) {
324
324
  display: none;
325
325
  }
326
- `,rn=m.p`
326
+ `,ln=m.p`
327
327
  /* body/medium */
328
328
  font-family: var(--text-font-family-base, Geist);
329
329
  font-size: var(--typo-body-size-medium, 18px);
@@ -331,7 +331,7 @@
331
331
  font-weight: var(--text-weight-regular, 400);
332
332
  line-height: var(--typo-body-lineHeight-medium, 20px); /* 111.111% */
333
333
  letter-spacing: var(--typo-body-spacing-medium, 0.15px);
334
- `,nn=m.span`
334
+ `,cn=m.span`
335
335
  /* heading/medium */
336
336
  font-family: var(--text-font-family-base, Geist);
337
337
  font-size: var(--typo-heading-size-medium, 24px);
@@ -339,14 +339,14 @@
339
339
  font-weight: var(--text-weight-medium, 500);
340
340
  line-height: var(--typo-heading-lineHeight-medium, 28px); /* 116.667% */
341
341
  letter-spacing: var(--typo-heading-spacing-medium, -0.5px);
342
- `,on=m.div`
342
+ `,dn=m.div`
343
343
  display: none;
344
344
  margin-bottom: 3px;
345
345
 
346
346
  @media (max-width: 768px) {
347
347
  display: block;
348
348
  }
349
- `,an=m.footer`
349
+ `,pn=m.footer`
350
350
  display: flex;
351
351
  gap: 10px;
352
352
 
@@ -355,7 +355,7 @@
355
355
  flex-direction: column;
356
356
  align-items: start !important;
357
357
  }
358
- `,bt=m.span``,_t=n=>P.createElement("svg",{width:12,height:10,viewBox:"0 0 12 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M5.60945 1.66669L2.94279 4.33335H11.3333V5.66669H2.94279L5.60945 8.33335L4.66665 9.27616L0.390503 5.00002L4.66665 0.723877L5.60945 1.66669Z",fill:"currentColor"})),sn=m(_t)`
358
+ `,vt=m.span``,Wt=n=>P.createElement("svg",{width:12,height:10,viewBox:"0 0 12 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M5.60945 1.66669L2.94279 4.33335H11.3333V5.66669H2.94279L5.60945 8.33335L4.66665 9.27616L0.390503 5.00002L4.66665 0.723877L5.60945 1.66669Z",fill:"currentColor"})),un=m(Wt)`
359
359
  cursor: pointer;
360
360
 
361
361
  svg {
@@ -366,12 +366,12 @@
366
366
  transition: 0.1s;
367
367
  }
368
368
  }
369
- `,ln=m.div`
369
+ `,fn=m.div`
370
370
  width: 100%;
371
371
  height: 128px;
372
372
  max-height: max-content;
373
373
  border-radius: 2px;
374
- `,cn=m.div`
374
+ `,gn=m.div`
375
375
  display: flex;
376
376
  height: 100%;
377
377
  padding: 20px;
@@ -394,7 +394,7 @@
394
394
  /* var(--color-bg-secondary, #232323); */
395
395
  border-left: 4px solid ${n=>n.color};
396
396
  }
397
- `,dn=m.span`
397
+ `,hn=m.span`
398
398
  color: var(--color-text-primary, #fff);
399
399
 
400
400
  /* subheading/medium */
@@ -404,7 +404,7 @@
404
404
  font-weight: var(--text-weight-medium, 500);
405
405
  line-height: var(--typo-subheading-lineHeight-medium, 28px); /* 116.667% */
406
406
  letter-spacing: var(--typo-subheading-spacing-medium, -0.5px);
407
- `,pn=m.span`
407
+ `,mn=m.span`
408
408
  color: var(--color-text-secondary, rgba(255, 255, 255, 0.75));
409
409
 
410
410
  /* caption/medium-r */
@@ -424,12 +424,12 @@
424
424
  font-weight: var(--text-weight-regular, 400);
425
425
  line-height: var(--typo-caption-lineHeight-small, 16px); /* 133.333% */
426
426
  letter-spacing: var(--typo-caption-spacing-small, 0.1px);
427
- `;const un=m.span`
427
+ `;const xn=m.span`
428
428
  color: ${n=>n.color};
429
429
  font-size: 12px;
430
- `,Wt=({boxBottomText:n,boxTopText:e,onClick:t,className:r,color:o,commissionStatus:a})=>i.jsx(i.Fragment,{children:i.jsx(ln,{children:i.jsxs(cn,{color:o,onClick:t,className:r,children:[i.jsx(pn,{children:e}),i.jsx(dn,{children:n}),a&&e===B("Commission")&&i.jsx(un,{color:o,children:a})]})})}),fn=({pageTitle:n,pageDesc:e,logoPrimaryUrl:t,shortName:r,colorPrimary:o,children:a})=>{const[s]=ne.useSearchParams(),l=s.get("backPath"),d=ne.useNavigate();function c(u){d(u)}return i.jsxs(qr,{children:[i.jsxs(Xr,{children:[i.jsx("header",{children:l&&i.jsx(Jr,{onClick:()=>c(l),children:i.jsx(sn,{})})}),i.jsx(Qr,{children:i.jsxs(en,{children:[i.jsx(nn,{children:n}),i.jsx(rn,{children:e})]})}),i.jsx(on,{children:i.jsx(Wt,{boxTopText:i.jsx("img",{className:"card-logo",src:t,alt:"logo"}),boxBottomText:i.jsx(Zr,{children:r})})}),a,i.jsxs(an,{children:[i.jsx("img",{className:"terms-logo",width:60,height:20,src:t,alt:"logo"}),i.jsxs("nav",{children:[i.jsx("a",{href:"",children:i.jsx(bt,{children:te("TermsOfUsage")})}),i.jsx("a",{href:"",children:i.jsx(bt,{children:te("PrivacyPolicy")})})]})]})]}),i.jsx(tn,{backgroundcolor:o,children:i.jsx("img",{src:t,alt:"logo"})})]})};var fe=(n=>(n[n.TABLE=0]="TABLE",n[n.LIST=1]="LIST",n[n.BOARD=2]="BOARD",n))(fe||{}),Q=(n=>(n[n.ASC=0]="ASC",n[n.DESC=1]="DESC",n))(Q||{}),be=(n=>(n[n.NONE=0]="NONE",n[n.COLUMN=1]="COLUMN",n[n.TYPE=2]="TYPE",n[n.VALUE=3]="VALUE",n))(be||{}),se=(n=>(n[n.INPUT=0]="INPUT",n[n.SELECT=1]="SELECT",n[n.TwoComponentSelect=2]="TwoComponentSelect",n[n.DATEPICKER=3]="DATEPICKER",n[n.MULTISELECT=4]="MULTISELECT",n))(se||{});const vt=n=>{let e;const t=new Set,r=(c,u)=>{const p=typeof c=="function"?c(e):c;if(!Object.is(p,e)){const h=e;e=u??(typeof p!="object"||p===null)?p:Object.assign({},e,p),t.forEach(f=>f(e,h))}},o=()=>e,l={setState:r,getState:o,getInitialState:()=>d,subscribe:c=>(t.add(c),()=>t.delete(c))},d=e=n(r,o,l);return l},gn=(n=>n?vt(n):vt),Yt={Page:1,PageSize:25},wt={filters:Yt,filterItems:[],sortItems:[],hideItems:{},groupByArr:[],activeTableView:fe.TABLE},hn=()=>gn((n,e)=>({columns:[],...wt,isHydrated:!1,hasDeleteBtn:!1,selectedConfig:null,setSelectedConfig:t=>n({selectedConfig:t}),configsVersion:0,bumpConfigsVersion:()=>n(t=>({configsVersion:t.configsVersion+1})),hydrateFromStorage:(t,r=fe.TABLE)=>{if(e().isHydrated)return;const o=sessionStorage.getItem(t);if(o)try{const a=JSON.parse(o);n({filters:a.filters??Yt,filterItems:a.filterItems??[],sortItems:a.sortItems??[],activeTableView:a.activeTableView??r,hideItems:a.hideItems??{},groupByArr:a.groupByArr??[],selectedConfig:a.selectedConfig??null,isHydrated:!0});return}catch{console.warn("Failed to hydrate grid view state")}n({activeTableView:r,isHydrated:!0})},hasCreateBtn:!1,setHasCreateBtn:t=>n({hasCreateBtn:!!t}),checkedValue:!0,setCheckedValue:t=>n({checkedValue:t}),hasSelect:!1,setHasSelect:t=>n({hasSelect:!!t}),setFilters:t=>{e().isHydrated&&n({filters:t})},setSortItems:t=>{e().isHydrated&&(n({sortItems:t}),n(r=>{const{Sort:o,Asc:a,...s}=r.filters,l=t.length>0?{Sort:t[0].param,Asc:t[0].direction===Q.ASC}:{};return{filters:{...s,...l}}}))},setFilterItems:(t,r=!1)=>{if(!e().isHydrated||(n({filterItems:t}),!r))return;const{filters:o,sortItems:a}=e(),{PageSize:s,Sort:l,Asc:d,QuickSearch:c}=o,u={};t.forEach(p=>{u[p.dataIndex]=p.filterValue,p.isCountryGroup!==void 0&&(u.isCountryGroup=p.isCountryGroup)}),n({filters:{Page:1,PageSize:s,QuickSearch:c||"",...a.length>0?{Sort:l,Asc:d}:{},...u}})},setHideItems:t=>n({hideItems:t}),setGroupByArr:t=>n({groupByArr:t}),setActiveTableView:t=>n({activeTableView:t}),setColumns:t=>n({columns:t}),resetStore:()=>{n({...wt,isHydrated:!0,selectedConfig:null})}})),Kt=S.createContext(null),mn=({children:n})=>{const e=S.useRef();return e.current||(e.current=hn()),i.jsx(Kt.Provider,{value:e.current,children:n})},D=n=>{const e=S.useContext(Kt);if(!e)throw new Error("GridViewStoreProvider is missing");return tt.useStore(e,n)},xn=()=>{const n=D(u=>u.hydrateFromStorage),e=D(u=>u.isHydrated),t=D(u=>u.filters),r=D(u=>u.filterItems),o=D(u=>u.sortItems),a=D(u=>u.hideItems),s=D(u=>u.groupByArr),l=D(u=>u.activeTableView),d=D(u=>u.selectedConfig),c=ne.useLocation();S.useEffect(()=>(n(`grid-filters:${c.pathname}`),sessionStorage.clear()),[]),S.useEffect(()=>{e&&sessionStorage.setItem(`grid-filters:${c.pathname}`,JSON.stringify({filters:t,filterItems:r,sortItems:o,activeTableView:l,hideItems:a,groupByArr:s,selectedConfig:d}))},[t,r,o,l,a,s,d,e])};function qt(n){const[e,t]=S.useState(0);return S.useEffect(()=>{if(!n.current)return;const r=new ResizeObserver(([o])=>{t(o.contentRect.height)});return r.observe(n.current),t(n.current.clientHeight),()=>r.disconnect()},[n]),e}const{RangePicker:yn}=H.DatePicker,bn=m.div`
430
+ `,Yt=({boxBottomText:n,boxTopText:e,onClick:t,className:r,color:o,commissionStatus:a})=>i.jsx(i.Fragment,{children:i.jsx(fn,{children:i.jsxs(gn,{color:o,onClick:t,className:r,children:[i.jsx(mn,{children:e}),i.jsx(hn,{children:n}),a&&e===B("Commission")&&i.jsx(xn,{color:o,children:a})]})})}),yn=({pageTitle:n,pageDesc:e,logoPrimaryUrl:t,shortName:r,colorPrimary:o,children:a})=>{const[s]=ne.useSearchParams(),l=s.get("backPath"),d=ne.useNavigate();function c(u){d(u)}return i.jsxs(en,{children:[i.jsxs(nn,{children:[i.jsx("header",{children:l&&i.jsx(rn,{onClick:()=>c(l),children:i.jsx(un,{})})}),i.jsx(on,{children:i.jsxs(an,{children:[i.jsx(cn,{children:n}),i.jsx(ln,{children:e})]})}),i.jsx(dn,{children:i.jsx(Yt,{boxTopText:i.jsx("img",{className:"card-logo",src:t,alt:"logo"}),boxBottomText:i.jsx(tn,{children:r})})}),a,i.jsxs(pn,{children:[i.jsx("img",{className:"terms-logo",width:60,height:20,src:t,alt:"logo"}),i.jsxs("nav",{children:[i.jsx("a",{href:"",children:i.jsx(vt,{children:te("TermsOfUsage")})}),i.jsx("a",{href:"",children:i.jsx(vt,{children:te("PrivacyPolicy")})})]})]})]}),i.jsx(sn,{backgroundcolor:o,children:i.jsx("img",{src:t,alt:"logo"})})]})};var fe=(n=>(n[n.TABLE=0]="TABLE",n[n.LIST=1]="LIST",n[n.BOARD=2]="BOARD",n))(fe||{}),Q=(n=>(n[n.ASC=0]="ASC",n[n.DESC=1]="DESC",n))(Q||{}),be=(n=>(n[n.NONE=0]="NONE",n[n.COLUMN=1]="COLUMN",n[n.TYPE=2]="TYPE",n[n.VALUE=3]="VALUE",n))(be||{}),se=(n=>(n[n.INPUT=0]="INPUT",n[n.SELECT=1]="SELECT",n[n.TwoComponentSelect=2]="TwoComponentSelect",n[n.DATEPICKER=3]="DATEPICKER",n[n.MULTISELECT=4]="MULTISELECT",n))(se||{});const wt=n=>{let e;const t=new Set,r=(c,u)=>{const p=typeof c=="function"?c(e):c;if(!Object.is(p,e)){const h=e;e=u??(typeof p!="object"||p===null)?p:Object.assign({},e,p),t.forEach(f=>f(e,h))}},o=()=>e,l={setState:r,getState:o,getInitialState:()=>d,subscribe:c=>(t.add(c),()=>t.delete(c))},d=e=n(r,o,l);return l},bn=(n=>n?wt(n):wt),Kt={Page:1,PageSize:25},St={filters:Kt,filterItems:[],sortItems:[],hideItems:{},groupByArr:[],activeTableView:fe.TABLE},vn=()=>bn((n,e)=>({columns:[],...St,isHydrated:!1,hasDeleteBtn:!1,selectedConfig:null,setSelectedConfig:t=>n({selectedConfig:t}),configsVersion:0,bumpConfigsVersion:()=>n(t=>({configsVersion:t.configsVersion+1})),hydrateFromStorage:(t,r=fe.TABLE)=>{if(e().isHydrated)return;const o=sessionStorage.getItem(t);if(o)try{const a=JSON.parse(o);n({filters:a.filters??Kt,filterItems:a.filterItems??[],sortItems:a.sortItems??[],activeTableView:a.activeTableView??r,hideItems:a.hideItems??{},groupByArr:a.groupByArr??[],selectedConfig:a.selectedConfig??null,isHydrated:!0});return}catch{console.warn("Failed to hydrate grid view state")}n({activeTableView:r,isHydrated:!0})},hasCreateBtn:!1,setHasCreateBtn:t=>n({hasCreateBtn:!!t}),checkedValue:!0,setCheckedValue:t=>n({checkedValue:t}),hasSelect:!1,setHasSelect:t=>n({hasSelect:!!t}),setFilters:t=>{e().isHydrated&&n({filters:t})},setSortItems:t=>{e().isHydrated&&(n({sortItems:t}),n(r=>{const{Sort:o,Asc:a,...s}=r.filters,l=t.length>0?{Sort:t[0].param,Asc:t[0].direction===Q.ASC}:{};return{filters:{...s,...l}}}))},setFilterItems:(t,r=!1)=>{if(!e().isHydrated||(n({filterItems:t}),!r))return;const{filters:o,sortItems:a}=e(),{PageSize:s,Sort:l,Asc:d,QuickSearch:c}=o,u={};t.forEach(p=>{u[p.dataIndex]=p.filterValue,p.isCountryGroup!==void 0&&(u.isCountryGroup=p.isCountryGroup)}),n({filters:{Page:1,PageSize:s,QuickSearch:c||"",...a.length>0?{Sort:l,Asc:d}:{},...u}})},setHideItems:t=>n({hideItems:t}),setGroupByArr:t=>n({groupByArr:t}),setActiveTableView:t=>n({activeTableView:t}),setColumns:t=>n({columns:t}),resetStore:()=>{n({...St,isHydrated:!0,selectedConfig:null})}})),qt=S.createContext(null),wn=({children:n})=>{const e=S.useRef();return e.current||(e.current=vn()),i.jsx(qt.Provider,{value:e.current,children:n})},D=n=>{const e=S.useContext(qt);if(!e)throw new Error("GridViewStoreProvider is missing");return ot.useStore(e,n)},Sn=()=>{const n=D(u=>u.hydrateFromStorage),e=D(u=>u.isHydrated),t=D(u=>u.filters),r=D(u=>u.filterItems),o=D(u=>u.sortItems),a=D(u=>u.hideItems),s=D(u=>u.groupByArr),l=D(u=>u.activeTableView),d=D(u=>u.selectedConfig),c=ne.useLocation();S.useEffect(()=>(n(`grid-filters:${c.pathname}`),sessionStorage.clear()),[]),S.useEffect(()=>{e&&sessionStorage.setItem(`grid-filters:${c.pathname}`,JSON.stringify({filters:t,filterItems:r,sortItems:o,activeTableView:l,hideItems:a,groupByArr:s,selectedConfig:d}))},[t,r,o,l,a,s,d,e])};function Zt(n){const[e,t]=S.useState(0);return S.useEffect(()=>{if(!n.current)return;const r=new ResizeObserver(([o])=>{t(o.contentRect.height)});return r.observe(n.current),t(n.current.clientHeight),()=>r.disconnect()},[n]),e}const{RangePicker:Cn}=R.DatePicker,jn=m.div`
431
431
  background: var(--color-bg-primary, #fff);
432
- `,vn=m.div`
432
+ `,kn=m.div`
433
433
  height: var(--size-800, 4rem);
434
434
  display: flex;
435
435
  justify-content: space-between;
@@ -562,7 +562,7 @@
562
562
  overflow-y: auto;
563
563
  }
564
564
  }
565
- `,wn=m.div``;m(H.Table)`
565
+ `,Ln=m.div``;m(R.Table)`
566
566
  .ant-table-thead {
567
567
  tr {
568
568
  th {
@@ -617,7 +617,7 @@
617
617
  }
618
618
  }
619
619
  }
620
- `;const at=m.div`
620
+ `;const lt=m.div`
621
621
  border-radius: var(--border-radius-025, 0.125rem);
622
622
  /* background: var(--color-bg-secondary, #f5f5f5);
623
623
  box-shadow:
@@ -698,7 +698,7 @@
698
698
  width: calc(100vw - 32px);
699
699
  }
700
700
  }
701
- `,Sn=m.div`
701
+ `,Dn=m.div`
702
702
  display: flex;
703
703
  flex-wrap: wrap;
704
704
  gap: 0.12rem;
@@ -710,7 +710,7 @@
710
710
  inset-inline-start: 16px !important;
711
711
  }
712
712
  }
713
- `,Je=m.div`
713
+ `,et=m.div`
714
714
  display: flex;
715
715
  color: var(--color-text-secondary, rgba(19, 20, 18, 0.75));
716
716
  font-family: var(--text-font-family-base, Geist);
@@ -759,7 +759,7 @@
759
759
  border-left: 1px solid var(--color-border-primary, rgba(20, 20, 20, 0.05));
760
760
  }
761
761
  }
762
- `,Cn=m.div`
762
+ `,$n=m.div`
763
763
  display: flex;
764
764
  align-items: center;
765
765
  justify-content: flex-end;
@@ -786,12 +786,12 @@
786
786
  }
787
787
  }
788
788
  }
789
- `,Zt=m(yn)`
789
+ `,Jt=m(Cn)`
790
790
  height: 0;
791
791
  padding: 0 !important;
792
792
  overflow: hidden;
793
793
  border: none !important;
794
- `,jn=m.span`
794
+ `,En=m.span`
795
795
  color: var(--color-text-primary, #fff);
796
796
 
797
797
  /* caption/medium-r */
@@ -801,25 +801,25 @@
801
801
  font-weight: var(--text-weight-regular, 400);
802
802
  line-height: var(--typo-caption-lineHeight-medium, 18px); /* 128.571% */
803
803
  letter-spacing: var(--typo-caption-spacing-medium, 0.1px);
804
- `,kn=m.div`
804
+ `,On=m.div`
805
805
  display: flex;
806
806
  min-height: var(--size-400, 32px);
807
807
  padding: var(--spacing-050, 4px) var(--spacing-150, 12px) !important;
808
808
  gap: var(--spacing-150, 12px);
809
809
  align-self: stretch;
810
- `,Ln=m.div`
810
+ `,Tn=m.div`
811
811
  color: var(--color-text-tertiary, rgba(255, 255, 255, 0.5));
812
812
 
813
813
  background: var(--color-bg-secondary, #232323);
814
814
  display: flex;
815
815
  padding-left: 30px !important;
816
816
  gap: 8px;
817
- `,Dn=m.div`
817
+ `,In=m.div`
818
818
  max-height: 300px;
819
819
  overflow: hidden;
820
- `,$n=m.div`
820
+ `,zn=m.div`
821
821
  height: ${n=>n.height||"100%"};
822
- `,Ne=n=>P.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M1.33203 3.33333H14.6654V4.66667H1.33203V3.33333Z",fill:"#131412"}),P.createElement("path",{d:"M3.33203 7.33333H12.6654V8.66667H3.33203V7.33333Z",fill:"#131412"}),P.createElement("path",{d:"M5.33203 11.3333H10.6654V12.6667H5.33203V11.3333Z",fill:"#131412"})),Jt=n=>P.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.9987 2V4H1.33203V5.33333H3.9987V7.33333H7.9987V5.33333H14.6654V4H7.9987V2H3.9987ZM6.66536 3.33333H5.33203V6H6.66536V3.33333Z",fill:"currentColor"}),P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.9987 8.66667V10.6667H1.33203V12H7.9987V14H11.9987V12H14.6654V10.6667H11.9987V8.66667H7.9987ZM9.33203 10H10.6654V12.6667H9.33203V10Z",fill:"currentColor"})),En=n=>P.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M4 12H0V8H4V12Z",fill:"white"}),P.createElement("path",{d:"M12 12H8V8H12V12Z",fill:"white"}),P.createElement("path",{d:"M4 4H0V0H4V4Z",fill:"white"}),P.createElement("path",{d:"M12 4H8V0H12V4Z",fill:"white"})),it=(n,e,t=[])=>{const r=S.useMemo(()=>Or.debounce(n,e),t);return S.useEffect(()=>()=>{r.cancel()},[r]),r},st=n=>P.createElement("svg",{width:24,height:24,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M7.99947 2.38989L3.72266 6.6667L4.66547 7.60951L7.3328 4.94218V13.3334H8.66613V4.94218L11.3335 7.60951L12.2763 6.6667L7.99947 2.38989Z",fill:"currentColor",fillOpacity:.75})),lt=n=>P.createElement("svg",{width:24,height:24,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M8.66613 2.66675H7.3328V11.0573L4.66547 8.38994L3.72266 9.33275L7.99947 13.6096L12.2763 9.33275L11.3335 8.38994L8.66613 11.0573V2.66675Z",fill:"currentColor",fillOpacity:.75})),On=n=>P.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M13.7337 6.67614L14.6765 5.73333L11.3337 2.39052L7.99089 5.73333L8.93369 6.67614L10.667 4.94281L10.667 13.3333H12.0004L12.0004 4.94281L13.7337 6.67614Z",fill:"#131412"}),P.createElement("path",{d:"M8.00984 10.2667L4.66703 13.6095L1.32422 10.2667L2.26703 9.32385L4.00036 11.0572L4.00036 2.66666L5.33369 2.66666L5.33369 11.0572L7.06703 9.32386L8.00984 10.2667Z",fill:"#131412"})),Tn=({children:n,overlay:e,placement:t="bottomRight"})=>{const[r,o]=S.useState(!1);return i.jsx(H.Dropdown,{open:r,onOpenChange:o,placement:t,popupRender:()=>typeof e=="function"?e(o):e,trigger:["click"],children:i.jsx("button",{className:"icon",children:n})})},Xt=({placement:n,children:e})=>{const t=D(f=>f.columns),r=D(f=>f.sortItems),o=D(f=>f.setSortItems),a=r[0],[s,l]=S.useState(""),[d,c]=S.useState((a==null?void 0:a.direction)===Q.ASC?Q.ASC:Q.DESC),u=t.filter(f=>f.title.toLowerCase().includes(s.toLowerCase())&&f.sortable!==!1);function p(f,g){o([{title:f.title,dataIndex:f.dataIndex.charAt(0).toUpperCase()+f.dataIndex.slice(1),direction:g}])}function h(){o([])}return i.jsx(Tn,{overlay:f=>i.jsxs(at,{children:[i.jsx("input",{type:"text",placeholder:"Search...",value:s,onChange:g=>l(g.target.value)}),i.jsx("div",{children:u.map((g,w)=>i.jsxs("button",{onClick:()=>{g.title==(a==null?void 0:a.title)?h():p(g,d)},children:[g.title,g.title==(a==null?void 0:a.title)&&i.jsx("span",{children:i.jsx(Ee,{})})]},w))}),i.jsxs("div",{children:[i.jsxs("button",{onClick:()=>{c(Q.ASC),a&&p(a,Q.ASC)},children:[i.jsx(st,{}),"Ascending",d===Q.ASC&&i.jsx(Ee,{})]}),i.jsxs("button",{onClick:()=>{c(Q.DESC),a&&p(a,Q.DESC)},children:[i.jsx(lt,{}),"Descending",d===Q.DESC&&i.jsx(Ee,{})]})]})]}),placement:n||"bottomRight",children:e||i.jsx(On,{})})},ct=({placement:n,children:e,onSelect:t,CustomFilters:r})=>{const[o,a]=S.useState(!1),[s,l]=S.useState(""),d=D(h=>h.columns),c=D(h=>h.filterItems),u=D(h=>h.setFilterItems);function p(h){t?t(h):u([...c,{...h,selectType:be.VALUE}]),a(!1)}return i.jsx(H.Dropdown,{open:o,onOpenChange:a,placement:n||"bottomRight",popupRender:()=>i.jsxs(at,{children:[i.jsx("input",{type:"text",placeholder:ae("Search")+"...",value:s,onChange:h=>l(h.target.value)}),i.jsx("div",{children:d.filter(h=>h.filterable!==!1).filter(h=>!c.some(f=>f.title==h.title)).filter(h=>h.filterable!==!1).filter(h=>h.title.toLowerCase().includes(s)).map((h,f)=>i.jsx("button",{onClick:()=>p(h),children:h.title},f))}),r&&i.jsx(r,{setFilterItems:u,filterItems:c,columns:d,setDropdownOpen:a})]}),trigger:["click"],children:i.jsx("button",{className:"icon",children:e})})},In={open:!0,closeIcon:!1,footer:null,maskClosable:!0},zn={okText:"Create",cancelText:"Cancel"},ge=tt.create((n,e)=>{const t=r=>({...r,popupOptions:{...In,...r.popupOptions},footerOptions:{...zn,...r.footerOptions},hideFooter:r.hideFooter??!1,onCancel:r.onCancel??(()=>e().close())});return{options:null,isOpen:!1,store:r=>n({options:t(r)}),openModal:r=>n({isOpen:!0,options:t(r)}),open:()=>n(r=>r.options?{...r,isOpen:!0}:r),close:()=>n({isOpen:!1}),setOnOk:r=>n(o=>o.options?{options:{...o.options,onOk:r}}:o),setOnCancel:r=>n(o=>o.options?{options:{...o.options,onCancel:r}}:o),setComponentProps:r=>n(o=>o.options?{options:{...o.options,componentProps:{...o.options.componentProps,...r}}}:o),setPopupOptions:r=>n(o=>o.options?{options:{...o.options,popupOptions:{...o.options.popupOptions,...r}}}:o),setFooterOptions:r=>n(o=>o.options?{options:{...o.options,footerOptions:r==null?void 0:{...o.options.footerOptions,...r}}}:o),setHideFooter:r=>n(o=>o.options?{options:{...o.options,hideFooter:r,footerOptions:r?void 0:o.options.footerOptions}}:o),setTitle:r=>n(o=>o.options?{options:{...o.options,title:r}}:o)}}),St=m(H.Select)`
822
+ `,Ae=n=>P.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M1.33203 3.33333H14.6654V4.66667H1.33203V3.33333Z",fill:"#131412"}),P.createElement("path",{d:"M3.33203 7.33333H12.6654V8.66667H3.33203V7.33333Z",fill:"#131412"}),P.createElement("path",{d:"M5.33203 11.3333H10.6654V12.6667H5.33203V11.3333Z",fill:"#131412"})),Xt=n=>P.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.9987 2V4H1.33203V5.33333H3.9987V7.33333H7.9987V5.33333H14.6654V4H7.9987V2H3.9987ZM6.66536 3.33333H5.33203V6H6.66536V3.33333Z",fill:"currentColor"}),P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.9987 8.66667V10.6667H1.33203V12H7.9987V14H11.9987V12H14.6654V10.6667H11.9987V8.66667H7.9987ZM9.33203 10H10.6654V12.6667H9.33203V10Z",fill:"currentColor"})),Mn=n=>P.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M4 12H0V8H4V12Z",fill:"white"}),P.createElement("path",{d:"M12 12H8V8H12V12Z",fill:"white"}),P.createElement("path",{d:"M4 4H0V0H4V4Z",fill:"white"}),P.createElement("path",{d:"M12 4H8V0H12V4Z",fill:"white"})),ct=(n,e,t=[])=>{const r=S.useMemo(()=>Pr.debounce(n,e),t);return S.useEffect(()=>()=>{r.cancel()},[r]),r},dt=n=>P.createElement("svg",{width:24,height:24,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M7.99947 2.38989L3.72266 6.6667L4.66547 7.60951L7.3328 4.94218V13.3334H8.66613V4.94218L11.3335 7.60951L12.2763 6.6667L7.99947 2.38989Z",fill:"currentColor",fillOpacity:.75})),pt=n=>P.createElement("svg",{width:24,height:24,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M8.66613 2.66675H7.3328V11.0573L4.66547 8.38994L3.72266 9.33275L7.99947 13.6096L12.2763 9.33275L11.3335 8.38994L8.66613 11.0573V2.66675Z",fill:"currentColor",fillOpacity:.75})),Pn=n=>P.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M13.7337 6.67614L14.6765 5.73333L11.3337 2.39052L7.99089 5.73333L8.93369 6.67614L10.667 4.94281L10.667 13.3333H12.0004L12.0004 4.94281L13.7337 6.67614Z",fill:"#131412"}),P.createElement("path",{d:"M8.00984 10.2667L4.66703 13.6095L1.32422 10.2667L2.26703 9.32385L4.00036 11.0572L4.00036 2.66666L5.33369 2.66666L5.33369 11.0572L7.06703 9.32386L8.00984 10.2667Z",fill:"#131412"})),Hn=({children:n,overlay:e,placement:t="bottomRight"})=>{const[r,o]=S.useState(!1);return i.jsx(R.Dropdown,{open:r,onOpenChange:o,placement:t,popupRender:()=>typeof e=="function"?e(o):e,trigger:["click"],children:i.jsx("button",{className:"icon",children:n})})},Qt=({placement:n,children:e})=>{const t=D(f=>f.columns),r=D(f=>f.sortItems),o=D(f=>f.setSortItems),a=r[0],[s,l]=S.useState(""),[d,c]=S.useState((a==null?void 0:a.direction)===Q.ASC?Q.ASC:Q.DESC),u=t.filter(f=>f.title.toLowerCase().includes(s.toLowerCase())&&f.sortable!==!1);function p(f,g){o([{title:f.title,dataIndex:f.dataIndex.charAt(0).toUpperCase()+f.dataIndex.slice(1),direction:g}])}function h(){o([])}return i.jsx(Hn,{overlay:f=>i.jsxs(lt,{children:[i.jsx("input",{type:"text",placeholder:"Search...",value:s,onChange:g=>l(g.target.value)}),i.jsx("div",{children:u.map((g,w)=>i.jsxs("button",{onClick:()=>{g.title==(a==null?void 0:a.title)?h():p(g,d)},children:[g.title,g.title==(a==null?void 0:a.title)&&i.jsx("span",{children:i.jsx(Ee,{})})]},w))}),i.jsxs("div",{children:[i.jsxs("button",{onClick:()=>{c(Q.ASC),a&&p(a,Q.ASC)},children:[i.jsx(dt,{}),"Ascending",d===Q.ASC&&i.jsx(Ee,{})]}),i.jsxs("button",{onClick:()=>{c(Q.DESC),a&&p(a,Q.DESC)},children:[i.jsx(pt,{}),"Descending",d===Q.DESC&&i.jsx(Ee,{})]})]})]}),placement:n||"bottomRight",children:e||i.jsx(Pn,{})})},ut=({placement:n,children:e,onSelect:t,CustomFilters:r})=>{const[o,a]=S.useState(!1),[s,l]=S.useState(""),d=D(h=>h.columns),c=D(h=>h.filterItems),u=D(h=>h.setFilterItems);function p(h){t?t(h):u([...c,{...h,selectType:be.VALUE}]),a(!1)}return i.jsx(R.Dropdown,{open:o,onOpenChange:a,placement:n||"bottomRight",popupRender:()=>i.jsxs(lt,{children:[i.jsx("input",{type:"text",placeholder:ae("Search")+"...",value:s,onChange:h=>l(h.target.value)}),i.jsx("div",{children:d.filter(h=>h.filterable!==!1).filter(h=>!c.some(f=>f.title==h.title)).filter(h=>h.filterable!==!1).filter(h=>h.title.toLowerCase().includes(s)).map((h,f)=>i.jsx("button",{onClick:()=>p(h),children:h.title},f))}),r&&i.jsx(r,{setFilterItems:u,filterItems:c,columns:d,setDropdownOpen:a})]}),trigger:["click"],children:i.jsx("button",{className:"icon",children:e})})},Rn={open:!0,closeIcon:!1,footer:null,maskClosable:!0},Fn={okText:"Create",cancelText:"Cancel"},ge=ot.create((n,e)=>{const t=r=>({...r,popupOptions:{...Rn,...r.popupOptions},footerOptions:{...Fn,...r.footerOptions},hideFooter:r.hideFooter??!1,onCancel:r.onCancel??(()=>e().close())});return{options:null,isOpen:!1,store:r=>n({options:t(r)}),openModal:r=>n({isOpen:!0,options:t(r)}),open:()=>n(r=>r.options?{...r,isOpen:!0}:r),close:()=>n({isOpen:!1}),setOnOk:r=>n(o=>o.options?{options:{...o.options,onOk:r}}:o),setOnCancel:r=>n(o=>o.options?{options:{...o.options,onCancel:r}}:o),setComponentProps:r=>n(o=>o.options?{options:{...o.options,componentProps:{...o.options.componentProps,...r}}}:o),setPopupOptions:r=>n(o=>o.options?{options:{...o.options,popupOptions:{...o.options.popupOptions,...r}}}:o),setFooterOptions:r=>n(o=>o.options?{options:{...o.options,footerOptions:r==null?void 0:{...o.options.footerOptions,...r}}}:o),setHideFooter:r=>n(o=>o.options?{options:{...o.options,hideFooter:r,footerOptions:r?void 0:o.options.footerOptions}}:o),setTitle:r=>n(o=>o.options?{options:{...o.options,title:r}}:o)}}),Ct=m(R.Select)`
823
823
  width: 200px;
824
824
 
825
825
  display: flex;
@@ -846,7 +846,7 @@
846
846
  line-height: var(--typo-caption-lineHeight-medium, 1.125rem); /* 128.571% */
847
847
  letter-spacing: var(--typo-caption-spacing-medium, 0.00625rem);
848
848
  }
849
- `,Ct={"/reports/activity-report":1,"/reports/commission-report":2,"/reports/deposit-report":3,"/reports/media-report":4,"/reports/payments-report":5,"/reports/registation-report":6,"/affiliate-manager":7,"/end-user":8,"/marketing-tools":9,"/sub-affiliates":10,"/affiliate-users":14,"/country-group":11,"/email-constructor":15,"/roles":12,"/tags":13},dt=()=>{const{pathname:n}=ne.useLocation(),e=Object.keys(Ct).find(t=>n===t||n.startsWith(t+"/"));return e?Ct[e]:void 0};function Qt(n,e){return e.label.toLowerCase().includes(n.toLowerCase())||e.value==n}const Mn=({setisSettingPopupVisible:n,CustomFilters:e,tableAdditionalFields:t,createIsModal:r,exportButton:o,hasSelect:a,selectProps:s,GridPageTopLeftComponent:l,noNeedSidebarResponsiveButton:d})=>{const c=ne.useNavigate(),u=D(x=>x.filters),p=D(x=>x.hasCreateBtn),h=D(x=>x.setFilters),f=D(x=>x.setFilterItems),g=D(x=>x.setSortItems),[w,O]=S.useState(()=>{var x,b;try{const E=sessionStorage.getItem(`grid-filters:${window.location.pathname}`);return E?!!((b=(x=JSON.parse(E))==null?void 0:x.filters)!=null&&b.QuickSearch):!1}catch{return!1}}),[A,j]=S.useState(!1),{open:L}=ge(),[T,V]=S.useState(!1),{getMyFilters:G}=we(),_=dt(),[Y,I]=S.useState([]),$=D(x=>x.selectedConfig),v=D(x=>x.setSelectedConfig),F=D(x=>x.configsVersion);S.useEffect(()=>{_==null||!G||G(String(_)).then(x=>I(x.data??[]))},[_,F,G]);function M(x){const b=Y.find(N=>N.id===x);if(!b)return;const{filterItems:E,sortItems:z}=JSON.parse(b.value);f(E,!0),g(z),v({id:b.id,name:b.name})}const k=it(x=>{h({...u,QuickSearch:x.target.value})},500);function C(){n(!0)}function y(){r?L():c("new")}return i.jsxs(vn,{children:[!d&&i.jsx("button",{className:"icon sidebar",onClick:()=>j(!0),children:i.jsx(En,{})}),l&&i.jsx(l,{}),i.jsxs("div",{className:"page-actions",children:[Y.length>0&&i.jsx(St,{showSearch:!0,placeholder:B("SavedConfiguration"),options:Y.map(x=>({value:x.id,label:x.name})),value:($==null?void 0:$.id)??null,filterOption:Qt,onChange:x=>x!=null?M(x):v(null)}),a&&s&&i.jsx("div",{children:i.jsx(St,{options:s.options,placeholder:s.placeholder,onChange:x=>{s.onChange(x??null)}})}),t&&t(T,V),w?i.jsx("input",{type:"text",placeholder:ae("QuickSearch"),defaultValue:(u==null?void 0:u.QuickSearch)??"",onChange:k}):i.jsx("button",{onClick:()=>O(!0),children:ae("Search")}),i.jsx(Xt,{}),i.jsx(ct,{CustomFilters:e,children:i.jsx(Ne,{})}),i.jsx("button",{className:"icon",onClick:C,children:i.jsx(Jt,{})}),o&&o,p&&i.jsx("button",{onClick:y,className:"create-btn",children:ae("Create")})]}),A&&i.jsx(Ut,{})]})},Pn=n=>P.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M8.66665 7.3335H12.6666V8.66683H8.66665V12.6668H7.33331V8.66683H3.33331V7.3335H7.33331V3.3335H8.66665V7.3335Z",fill:"white"})),er=n=>P.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M8 2C9.69989 2 11.2343 2.70742 12.3255 3.84245V2.42578H13.6589V6.11654H9.96875V4.7832H11.3796C10.5289 3.88969 9.32909 3.33333 8 3.33333C5.42286 3.33333 3.33333 5.42286 3.33333 8C3.33333 10.5771 5.42286 12.6667 8 12.6667C10.5771 12.6667 12.6667 10.5771 12.6667 8V7.33333H14V8C14 11.3135 11.3135 14 8 14C4.68648 14 2 11.3135 2 8C2 4.68648 4.68648 2 8 2Z",fill:"#131412"})),ue=class ue{static equals(e,t){const r=e??null,o=t??null;return r===o?!0:!r||!o?!1:r.getTime()===o.getTime()}static toMMddyyyy(e){const t=this.parseDate(e);if(!t)return null;const r=t.getMonth()+1,o=t.getDate(),a=t.getFullYear(),s=r<10?`0${r}`:`${r}`,l=o<10?`0${o}`:`${o}`;return`${s}/${l}/${a}`}static toLocal(e,t=!1,r=!1){const o=this.parseDate(e);return o?(t&&o.setHours(0,0,0,0),r&&o.setHours(23,59,59,999),this.utcToLocal(o)):null}static getDates(e,t){const r=new Array;let o=new Date(e.valueOf());for(;o<=t;)r.push(new Date(o)),o=this.addDays(o,1);return r}static dateOnly(e){const t=e.getFullYear(),r=e.getMonth()+1,o=e.getDate();return`${t}/${r}/${o}`}static dateWithDashes(e){const t=e.getFullYear(),r=e.getMonth()+1,o=e.getDate();return`${t}-${r}-${o}`}static today(){return this.dateOnly(new Date)}static toISODateString(e){const t=this.parseDate(e);if(!t)return null;const r=t.getFullYear(),o=t.getMonth()+1,a=t.getDate();return`${r}-${o<10?"0":""}${o}-${a<10?"0":""}${a}`}static toISODateStringWithTime(e){const t=this.parseDate(e);if(!t)return null;const r=t.getFullYear(),o=t.getMonth()+1,a=t.getDate(),s=t.getHours(),l=t.getMinutes(),d=`${s<10?"0":""}${s}:${l<10?"0":""}${l}`;return`${r}-${o<10?"0":""}${o}-${a<10?"0":""}${a} `+d}static monthDayYear(e){const t=this.parseDate(e);if(!t)return null;const o=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][t.getMonth()],a=t.getDate(),s=t.getFullYear();return`${o} ${a}, ${s}`}static withdrawalTableDateFormat(e){const t=this.parseDate(e);if(!t||isNaN(t.getTime()))return null;const r=e.getFullYear(),o=e.getMonth()+1,a=e.getDate(),s=`${r}/${o}/${a}`,l=t.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1});return`${s}, ${l}`}static getDateOnlyMonthAndNumber(e){if(!e)return"";const t=new Date(e);if(isNaN(t.getTime()))return"";const r=t.getDate(),a=t.getMonth();return`${r} ${a}`}static fromDateOrStringToTable(e){const t=this.parseDate(e);if(!t||isNaN(t.getTime()))return null;const r=t.toLocaleString("en-US",{month:"long",day:"numeric",year:"numeric"}),o=t.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1});return`${r}, ${o}`}static toISOTimeString(e){const t=ue.parseDate(e);if(!t)return null;const r=t.getHours(),o=t.getMinutes(),a=t.getSeconds();return`${r<10?"0":""}${r}:${o<10?"0":""}${o}:${a<10?"0":""}${a}`}static toTimeInput(e){const t=ue.parseDate(e);if(!t)return null;const r=t.getHours(),o=t.getMinutes();return`${r<10?"0":""}${r}:${o<10?"0":""}${o}`}static utcToLocal(e){const t=e instanceof Date?e:new Date(e);return new Date(t.getTime()+this._utcDiff)}static localToUtc(e){const t=e instanceof Date?e:new Date(e);return new Date(t.getTime()+this._utcDiff)}static addYears(e,t){if(!t)return e;const r=e;return r.setFullYear(e.getFullYear()+t),r}static addMonths(e,t){if(!t)return e;const r=e;return r.setMonth(r.getMonth()+t),r}static addDays(e,t){if(!t)return e;const r=e;return r.setDate(r.getDate()+t),r}static addHours(e,t){if(!t)return e;const r=new Date(e);return r.setHours(r.getHours()+t),r}static addMinutes(e,t){if(!t)return e;const r=new Date(e);return r.setMinutes(r.getMinutes()+t),r}static addSeconds(e,t){if(!t)return e;const r=e;return r.setSeconds(r.getSeconds()+t),r}static isToday(e){const t=new Date;return this.isSameDate(e,t)}static clone(e){return new Date(+e)}static isAnotherMonth(e,t){return t&&e.getMonth()!==t.getMonth()}static isWeekend(e){return e.getDay()===0||e.getDay()===6}static isSameDate(e,t){return t&&e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}static getAge(e,t){if(e==null||e===""||e!==e)return null;const r=this.toDate(e),a=(t?t.getTime():Date.now())-r.getTime();return Math.floor(a/864e5/365.25)}static subtractMonths(e,t){const r=t<=e?t:e,o=t<=e?e:t,a=t<=e?1:-1;let s=(o.getFullYear()-r.getFullYear())*12;return s-=r.getMonth(),s+=o.getMonth(),s*a}static subtractDays(e,t){if(!t)return null;t=this.toDate(t);const r=t.getTime()-e.getTime();return Math.floor(r/864e5)}static subtractHours(e,t){if(!t)return null;t=this.toDate(t);const r=t.getTime()-e.getTime();return Math.floor(r%864e5/36e5)}static subtractMinutes(e,t){if(!t)return null;t=this.toDate(t);const r=t.getTime()-e.getTime();return Math.floor(r%864e5%36e5/6e4)}static parseDate(e){return typeof e>"u"||e==null||e===""?null:this.toDate(e)}static toDate(e){if(this.isDate(e))return e;if(typeof e=="number"&&!isNaN(e))return new Date(e);if(typeof e=="string"){e=e.trim();const r=parseFloat(e);if(!isNaN(e-r))return new Date(r);if(/^(\d{4}-\d{1,2}-\d{1,2})$/.test(e)){const[a,s,l]=e.split("-").map(d=>+d);return new Date(a,s-1,l)}let o;if(o=e.match(this.ISO8601_DATE_REGEX))return this.isoStringToDate(o)}const t=new Date(e);if(!this.isDate(t))throw new Error(`Unable to convert "${e}" into a date`);return t}static isoStringToDate(e){const t=new Date(0);let r=0,o=0;const a=e[8]?t.setUTCFullYear:t.setFullYear,s=e[8]?t.setUTCHours:t.setHours;e[9]&&(r=Number(e[9]+e[10]),o=Number(e[9]+e[11])),a.call(t,Number(e[1]),Number(e[2])-1,Number(e[3]));const l=Number(e[4]||0)-r,d=Number(e[5]||0)-o,c=Number(e[6]||0),u=Math.round(parseFloat("0."+(e[7]||0))*1e3);return s.call(t,l,d,c,u),t}static isDate(e){return e instanceof Date&&!isNaN(e.valueOf())}};Pe(ue,"getCommonDateRange",e=>{let t=new Date,r=new Date;switch(e){case"week":r.setDate(t.getDate()-7);break;case"month":r.setDate(t.getDate()-30);break;case"threeMonth":r.setMonth(t.getMonth()-3),r.setDate(1);break;case"sixMonth":r.setMonth(t.getMonth()-6),r.setDate(1);break;case"twelveMonth":r.setMonth(t.getMonth()-12),r.setDate(1);break;case"year":r.setMonth(0),r.setDate(1);break;case"all":t=null,r=null;break;case"custom":break;default:r.setDate(t.getDate()-7)}return{startDate:r?ue.toISODateString(r):null,endDate:t?ue.toISODateString(t):null}}),Pe(ue,"_utcDiff",-new Date().getTimezoneOffset()*6e4),Pe(ue,"ISO8601_DATE_REGEX",/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/);let ee=ue;const Hn=n=>P.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M12.471 4.47152L8.94238 8.00016L12.471 11.5288L11.5283 12.4715L7.99967 8.94287L4.47103 12.4715L3.52832 11.5288L7.05697 8.00016L3.52832 4.47152L4.47103 3.52881L7.99967 7.05745L11.5283 3.52881L12.471 4.47152Z",fill:"currentColor",fillOpacity:.75})),pt=m(Hn)`
849
+ `,jt={"/reports/activity-report":1,"/reports/commission-report":2,"/reports/deposit-report":3,"/reports/media-report":4,"/reports/payments-report":5,"/reports/registation-report":6,"/affiliate-manager":7,"/end-user":8,"/marketing-tools":9,"/sub-affiliates":10,"/affiliate-users":14,"/country-group":11,"/email-constructor":15,"/roles":12,"/tags":13},ft=()=>{const{pathname:n}=ne.useLocation(),e=Object.keys(jt).find(t=>n===t||n.startsWith(t+"/"));return e?jt[e]:void 0};function er(n,e){return e.label.toLowerCase().includes(n.toLowerCase())||e.value==n}const Nn=({setisSettingPopupVisible:n,CustomFilters:e,tableAdditionalFields:t,createIsModal:r,exportButton:o,hasSelect:a,selectProps:s,GridPageTopLeftComponent:l,noNeedSidebarResponsiveButton:d})=>{const c=ne.useNavigate(),u=D(x=>x.filters),p=D(x=>x.hasCreateBtn),h=D(x=>x.setFilters),f=D(x=>x.setFilterItems),g=D(x=>x.setSortItems),[w,O]=S.useState(()=>{var x,b;try{const E=sessionStorage.getItem(`grid-filters:${window.location.pathname}`);return E?!!((b=(x=JSON.parse(E))==null?void 0:x.filters)!=null&&b.QuickSearch):!1}catch{return!1}}),[A,j]=S.useState(!1),{open:L}=ge(),[T,V]=S.useState(!1),{getMyFilters:G}=we(),_=ft(),[Y,I]=S.useState([]),$=D(x=>x.selectedConfig),v=D(x=>x.setSelectedConfig),F=D(x=>x.configsVersion);S.useEffect(()=>{_==null||!G||G(String(_)).then(x=>I(x.data??[]))},[_,F,G]);function M(x){const b=Y.find(N=>N.id===x);if(!b)return;const{filterItems:E,sortItems:z}=JSON.parse(b.value);f(E,!0),g(z),v({id:b.id,name:b.name})}const k=ct(x=>{h({...u,QuickSearch:x.target.value})},500);function C(){n(!0)}function y(){r?L():c("new")}return i.jsxs(kn,{children:[!d&&i.jsx("button",{className:"icon sidebar",onClick:()=>j(!0),children:i.jsx(Mn,{})}),l&&i.jsx(l,{}),i.jsxs("div",{className:"page-actions",children:[Y.length>0&&i.jsx(Ct,{showSearch:!0,placeholder:B("SavedConfiguration"),options:Y.map(x=>({value:x.id,label:x.name})),value:($==null?void 0:$.id)??null,filterOption:er,onChange:x=>x!=null?M(x):v(null)}),a&&s&&i.jsx("div",{children:i.jsx(Ct,{options:s.options,placeholder:s.placeholder,onChange:x=>{s.onChange(x??null)}})}),t&&t(T,V),w?i.jsx("input",{type:"text",placeholder:ae("QuickSearch"),defaultValue:(u==null?void 0:u.QuickSearch)??"",onChange:k}):i.jsx("button",{onClick:()=>O(!0),children:ae("Search")}),i.jsx(Qt,{}),i.jsx(ut,{CustomFilters:e,children:i.jsx(Ae,{})}),i.jsx("button",{className:"icon",onClick:C,children:i.jsx(Xt,{})}),o&&o,p&&i.jsx("button",{onClick:y,className:"create-btn",children:ae("Create")})]}),A&&i.jsx(_t,{})]})},Vn=n=>P.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M8.66665 7.3335H12.6666V8.66683H8.66665V12.6668H7.33331V8.66683H3.33331V7.3335H7.33331V3.3335H8.66665V7.3335Z",fill:"white"})),tr=n=>P.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M8 2C9.69989 2 11.2343 2.70742 12.3255 3.84245V2.42578H13.6589V6.11654H9.96875V4.7832H11.3796C10.5289 3.88969 9.32909 3.33333 8 3.33333C5.42286 3.33333 3.33333 5.42286 3.33333 8C3.33333 10.5771 5.42286 12.6667 8 12.6667C10.5771 12.6667 12.6667 10.5771 12.6667 8V7.33333H14V8C14 11.3135 11.3135 14 8 14C4.68648 14 2 11.3135 2 8C2 4.68648 4.68648 2 8 2Z",fill:"#131412"})),ue=class ue{static equals(e,t){const r=e??null,o=t??null;return r===o?!0:!r||!o?!1:r.getTime()===o.getTime()}static toMMddyyyy(e){const t=this.parseDate(e);if(!t)return null;const r=t.getMonth()+1,o=t.getDate(),a=t.getFullYear(),s=r<10?`0${r}`:`${r}`,l=o<10?`0${o}`:`${o}`;return`${s}/${l}/${a}`}static toLocal(e,t=!1,r=!1){const o=this.parseDate(e);return o?(t&&o.setHours(0,0,0,0),r&&o.setHours(23,59,59,999),this.utcToLocal(o)):null}static getDates(e,t){const r=new Array;let o=new Date(e.valueOf());for(;o<=t;)r.push(new Date(o)),o=this.addDays(o,1);return r}static dateOnly(e){const t=e.getFullYear(),r=e.getMonth()+1,o=e.getDate();return`${t}/${r}/${o}`}static dateWithDashes(e){const t=e.getFullYear(),r=e.getMonth()+1,o=e.getDate();return`${t}-${r}-${o}`}static today(){return this.dateOnly(new Date)}static toISODateString(e){const t=this.parseDate(e);if(!t)return null;const r=t.getFullYear(),o=t.getMonth()+1,a=t.getDate();return`${r}-${o<10?"0":""}${o}-${a<10?"0":""}${a}`}static toISODateStringWithTime(e){const t=this.parseDate(e);if(!t)return null;const r=t.getFullYear(),o=t.getMonth()+1,a=t.getDate(),s=t.getHours(),l=t.getMinutes(),d=`${s<10?"0":""}${s}:${l<10?"0":""}${l}`;return`${r}-${o<10?"0":""}${o}-${a<10?"0":""}${a} `+d}static monthDayYear(e){const t=this.parseDate(e);if(!t)return null;const o=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][t.getMonth()],a=t.getDate(),s=t.getFullYear();return`${o} ${a}, ${s}`}static withdrawalTableDateFormat(e){const t=this.parseDate(e);if(!t||isNaN(t.getTime()))return null;const r=e.getFullYear(),o=e.getMonth()+1,a=e.getDate(),s=`${r}/${o}/${a}`,l=t.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1});return`${s}, ${l}`}static getDateOnlyMonthAndNumber(e){if(!e)return"";const t=new Date(e);if(isNaN(t.getTime()))return"";const r=t.getDate(),a=t.getMonth();return`${r} ${a}`}static fromDateOrStringToTable(e){const t=this.parseDate(e);if(!t||isNaN(t.getTime()))return null;const r=t.toLocaleString("en-US",{month:"long",day:"numeric",year:"numeric"}),o=t.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1});return`${r}, ${o}`}static toISOTimeString(e){const t=ue.parseDate(e);if(!t)return null;const r=t.getHours(),o=t.getMinutes(),a=t.getSeconds();return`${r<10?"0":""}${r}:${o<10?"0":""}${o}:${a<10?"0":""}${a}`}static toTimeInput(e){const t=ue.parseDate(e);if(!t)return null;const r=t.getHours(),o=t.getMinutes();return`${r<10?"0":""}${r}:${o<10?"0":""}${o}`}static utcToLocal(e){const t=e instanceof Date?e:new Date(e);return new Date(t.getTime()+this._utcDiff)}static localToUtc(e){const t=e instanceof Date?e:new Date(e);return new Date(t.getTime()+this._utcDiff)}static addYears(e,t){if(!t)return e;const r=e;return r.setFullYear(e.getFullYear()+t),r}static addMonths(e,t){if(!t)return e;const r=e;return r.setMonth(r.getMonth()+t),r}static addDays(e,t){if(!t)return e;const r=e;return r.setDate(r.getDate()+t),r}static addHours(e,t){if(!t)return e;const r=new Date(e);return r.setHours(r.getHours()+t),r}static addMinutes(e,t){if(!t)return e;const r=new Date(e);return r.setMinutes(r.getMinutes()+t),r}static addSeconds(e,t){if(!t)return e;const r=e;return r.setSeconds(r.getSeconds()+t),r}static isToday(e){const t=new Date;return this.isSameDate(e,t)}static clone(e){return new Date(+e)}static isAnotherMonth(e,t){return t&&e.getMonth()!==t.getMonth()}static isWeekend(e){return e.getDay()===0||e.getDay()===6}static isSameDate(e,t){return t&&e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}static getAge(e,t){if(e==null||e===""||e!==e)return null;const r=this.toDate(e),a=(t?t.getTime():Date.now())-r.getTime();return Math.floor(a/864e5/365.25)}static subtractMonths(e,t){const r=t<=e?t:e,o=t<=e?e:t,a=t<=e?1:-1;let s=(o.getFullYear()-r.getFullYear())*12;return s-=r.getMonth(),s+=o.getMonth(),s*a}static subtractDays(e,t){if(!t)return null;t=this.toDate(t);const r=t.getTime()-e.getTime();return Math.floor(r/864e5)}static subtractHours(e,t){if(!t)return null;t=this.toDate(t);const r=t.getTime()-e.getTime();return Math.floor(r%864e5/36e5)}static subtractMinutes(e,t){if(!t)return null;t=this.toDate(t);const r=t.getTime()-e.getTime();return Math.floor(r%864e5%36e5/6e4)}static parseDate(e){return typeof e>"u"||e==null||e===""?null:this.toDate(e)}static toDate(e){if(this.isDate(e))return e;if(typeof e=="number"&&!isNaN(e))return new Date(e);if(typeof e=="string"){e=e.trim();const r=parseFloat(e);if(!isNaN(e-r))return new Date(r);if(/^(\d{4}-\d{1,2}-\d{1,2})$/.test(e)){const[a,s,l]=e.split("-").map(d=>+d);return new Date(a,s-1,l)}let o;if(o=e.match(this.ISO8601_DATE_REGEX))return this.isoStringToDate(o)}const t=new Date(e);if(!this.isDate(t))throw new Error(`Unable to convert "${e}" into a date`);return t}static isoStringToDate(e){const t=new Date(0);let r=0,o=0;const a=e[8]?t.setUTCFullYear:t.setFullYear,s=e[8]?t.setUTCHours:t.setHours;e[9]&&(r=Number(e[9]+e[10]),o=Number(e[9]+e[11])),a.call(t,Number(e[1]),Number(e[2])-1,Number(e[3]));const l=Number(e[4]||0)-r,d=Number(e[5]||0)-o,c=Number(e[6]||0),u=Math.round(parseFloat("0."+(e[7]||0))*1e3);return s.call(t,l,d,c,u),t}static isDate(e){return e instanceof Date&&!isNaN(e.valueOf())}};Re(ue,"getCommonDateRange",e=>{let t=new Date,r=new Date;switch(e){case"week":r.setDate(t.getDate()-7);break;case"month":r.setDate(t.getDate()-30);break;case"threeMonth":r.setMonth(t.getMonth()-3),r.setDate(1);break;case"sixMonth":r.setMonth(t.getMonth()-6),r.setDate(1);break;case"twelveMonth":r.setMonth(t.getMonth()-12),r.setDate(1);break;case"year":r.setMonth(0),r.setDate(1);break;case"all":t=null,r=null;break;case"custom":break;default:r.setDate(t.getDate()-7)}return{startDate:r?ue.toISODateString(r):null,endDate:t?ue.toISODateString(t):null}}),Re(ue,"_utcDiff",-new Date().getTimezoneOffset()*6e4),Re(ue,"ISO8601_DATE_REGEX",/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/);let ee=ue;const An=n=>P.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M12.471 4.47152L8.94238 8.00016L12.471 11.5288L11.5283 12.4715L7.99967 8.94287L4.47103 12.4715L3.52832 11.5288L7.05697 8.00016L3.52832 4.47152L4.47103 3.52881L7.99967 7.05745L11.5283 3.52881L12.471 4.47152Z",fill:"currentColor",fillOpacity:.75})),gt=m(An)`
850
850
  width: 25px;
851
851
  height: 25px;
852
852
  cursor: pointer;
@@ -858,7 +858,7 @@
858
858
  fill: var(--color-text-primary, #fff);
859
859
  }
860
860
  }
861
- `,ut=m(H.Modal)`
861
+ `,We=m(R.Modal)`
862
862
  display: flex;
863
863
  width: 420px;
864
864
  padding: var(--spacing-025, 2px);
@@ -911,7 +911,7 @@
911
911
  .ant-modal-mask {
912
912
  background: rgba(0, 0, 0, 0.25) !important;
913
913
  }
914
- `,Rn=m.div`
914
+ `,rr=m.div`
915
915
  color: var(--color-text-primary, #fff);
916
916
  display: flex;
917
917
  padding: 24px 24px 0;
@@ -928,7 +928,7 @@
928
928
  font-weight: var(--text-weight-medium, 500);
929
929
  line-height: var(--typo-subheading-lineHeight-medium, 28px);
930
930
  letter-spacing: var(--typo-subheading-spacing-medium, -0.5px);
931
- `,Fn=m.button`
931
+ `,nr=m.button`
932
932
  color: var(--color-text-primary, #fff);
933
933
  display: flex;
934
934
  align-items: center;
@@ -945,7 +945,7 @@
945
945
  fill: var(--color-text-primary, #fff);
946
946
  }
947
947
  }
948
- `,ft=m.div`
948
+ `,Ye=m.div`
949
949
  display: flex;
950
950
  align-items: start;
951
951
  flex-direction: column;
@@ -954,83 +954,9 @@
954
954
 
955
955
  border-radius: var(--border-radius-025, 2px);
956
956
  padding-bottom: var(--spacing-200, 16px);
957
- `,Nn=m(H.Select)`
958
- width: 100%;
959
-
960
- min-height: 40px;
961
- align-items: center;
962
- gap: 8px;
963
- align-self: stretch;
964
- border-radius: var(--border-radius-025, 2px);
965
- background: var(--color-bg-secondary, #f5f5f5);
966
-
967
- .arrow-svg {
968
- svg {
969
- width: 16px;
970
- height: 16px;
971
- path {
972
- fill: var(--color-text-primary, #131412);
973
- }
974
- }
975
- }
976
-
977
- &.ant-select-multiple .ant-select-selection-placeholder {
978
- color: var(--color-text-tertiary, rgba(255, 255, 255, 0.5)) !important;
979
- }
980
-
981
- &:hover {
982
- border: 1px solid var(--color-border-brand-special, #02e0ae) !important;
983
- }
984
-
985
- .ant-select-selector {
986
- padding: 0 !important;
987
- border: none !important;
988
- background-color: transparent !important;
989
- box-shadow: none !important;
990
- }
991
- .ant-select-selection-overflow {
992
- justify-content: flex-start !important;
993
- background-color: none;
994
- margin-top: 5px;
995
- }
996
- .ant-select-selection-item {
997
- background: transparent !important;
998
- }
999
-
1000
- &&& {
1001
- .ant-select-selector {
1002
- border: none !important;
1003
- box-shadow: none !important;
1004
- background-color: transparent !important;
1005
- padding: 0 !important;
1006
- }
1007
-
1008
- &:hover .ant-select-selector,
1009
- &.ant-select-focused .ant-select-selector,
1010
- &.ant-select-open .ant-select-selector {
1011
- border: none !important;
1012
- box-shadow: none !important;
1013
- }
1014
- }
1015
- &.ant-select-single {
1016
- .ant-select-selector .ant-select-selection-placeholder {
1017
- color: var(--color-text-tertiary, rgba(255, 255, 255, 0.5)) !important;
1018
- }
1019
- padding: var(--spacing-025, 2px) var(--spacing-150, 12px);
1020
- }
1021
-
1022
- &.ant-select-multiple {
1023
- .ant-select-selection-placeholder {
1024
- color: var(--color-text-tertiary, rgba(255, 255, 255, 0.5)) !important;
1025
- }
1026
- padding: var(--spacing-025, 2px) var(--spacing-150, 5px);
1027
- }
1028
- .anticon.anticon-close {
1029
- color: var(--color-text-secondary, rgba(255, 255, 255, 0.5)) !important;
1030
- }
1031
- `;m.span`
957
+ `,Bn=m.span`
1032
958
  color: var(--color-text-secondary, rgba(255, 255, 255, 0.5)) !important;
1033
- `;const Ve=m.div`
959
+ `,Ie=m.div`
1034
960
  color: var(--color-text-secondary, rgba(19, 20, 18, 0.75));
1035
961
  font-family: var(--text-font-family-base, Geist);
1036
962
  font-size: var(--typo-caption-size-medium, 14px);
@@ -1040,12 +966,12 @@
1040
966
  letter-spacing: var(--typo-caption-spacing-medium, 0.1px);
1041
967
  margin-bottom: 0.25rem;
1042
968
  max-width: 350px;
1043
- `,Vn=m.div`
969
+ `,or=m.div`
1044
970
  padding-top: 2px;
1045
971
  display: flex;
1046
972
  width: 100%;
1047
973
  background: var(--color-bg-secondary, #232323);
1048
- `,gt=m(H.Button)`
974
+ `,Ke=m(R.Button)`
1049
975
  display: flex;
1050
976
  height: var(--size-800, 64px);
1051
977
  padding: var(--spacing-200, 16px) var(--spacing-300, 24px);
@@ -1071,9 +997,9 @@
1071
997
  &:hover {
1072
998
  border: none !important;
1073
999
  }
1074
- `,An=m.div`
1000
+ `,ar=m.div`
1075
1001
  width: 50%;
1076
- `,Ae=m(H.Button)`
1002
+ `,ze=m(R.Button)`
1077
1003
  display: flex;
1078
1004
  height: var(--size-800, 64px);
1079
1005
  padding: var(--spacing-200, 16px) var(--spacing-300, 24px);
@@ -1137,7 +1063,7 @@
1137
1063
  background: var(--color-bg-brand-special, #141414) !important;
1138
1064
  color: var(--color-text-inverse-primary, #fff) !important;
1139
1065
  }
1140
- `;m(H.Button)`
1066
+ `,Gn=m(R.Button)`
1141
1067
  display: flex;
1142
1068
  height: var(--size-800, 64px);
1143
1069
  padding: var(--spacing-200, 16px) var(--spacing-300, 24px);
@@ -1198,7 +1124,7 @@
1198
1124
  color: var(--color-text-inverse-primary, #fff) !important;
1199
1125
  background: var(--color-bg-status-error, #fd7f60) !important;
1200
1126
  }
1201
- `;const tr=m(H.Input)`
1127
+ `,ht=m(R.Input)`
1202
1128
  input[type='number'] {
1203
1129
  &::-webkit-outer-spin-button,
1204
1130
  &::-webkit-inner-spin-button {
@@ -1269,7 +1195,7 @@
1269
1195
  line-height: var(--typo-caption-lineHeight-medium, 18px); /* 128.571% */
1270
1196
  letter-spacing: var(--typo-caption-spacing-medium, 0.1px);
1271
1197
  }
1272
- `,Bn=n=>new Promise((e,t)=>{const r=new FileReader;r.readAsDataURL(n),r.onload=()=>e(r.result),r.onerror=o=>t(o)});function rr(n){return n&&n.charAt(0).toLowerCase()+n.slice(1)}const Gn=async n=>{try{await navigator.clipboard.writeText(n),H.notification.success({className:"bottom-right-notification",placement:"bottomRight",message:"Copy To Clipboard"})}catch{H.notification.error({className:"bottom-right-notification",placement:"bottomRight",message:"Error",description:"Failed to copy text."})}};function nr(n,e){if(n.status===400){const t=n.response.data,r=[];for(const o in t.errors)r.push({name:rr(o),errors:t.errors[o]});e.setFields(r)}}const or=({type:n,value:e,selectedConfig:t,onSuccess:r,postMyFilter:o,putMyFilter:a})=>{const[s]=H.Form.useForm(),l=ge(c=>c.setOnOk),d=ge(c=>c.close);return S.useEffect(()=>{t&&s.setFieldsValue({name:t.name})},[t,s]),S.useEffect(()=>{l(async()=>{try{const c=await s.validateFields();t?await a({id:t.id,type:n,name:c.name,value:e??""}):await o({type:n,name:c.name,value:e??""}),r==null||r(c.name),d()}catch(c){const u=nr(c,s);s.setFields(u)}})},[n,e,t,r,s,l,d]),i.jsxs(H.Form,{form:s,children:[i.jsx(Ve,{children:B("ConfigurationName")}),i.jsx(H.Form.Item,{name:"name",children:i.jsx(tr,{})})]})},Un=n=>P.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M11.6666 4.65485L10.4881 5.83336L13.8215 9.16669H3.33331V10.8334H13.8215L10.4881 14.1667L11.6666 15.3452L17.0118 10L11.6666 4.65485Z",fill:"currentColor"})),ke=m(Un)`
1198
+ `,Un=n=>new Promise((e,t)=>{const r=new FileReader;r.readAsDataURL(n),r.onload=()=>e(r.result),r.onerror=o=>t(o)});function ir(n){return n&&n.charAt(0).toLowerCase()+n.slice(1)}const _n=async n=>{try{await navigator.clipboard.writeText(n),R.notification.success({className:"bottom-right-notification",placement:"bottomRight",message:"Copy To Clipboard"})}catch{R.notification.error({className:"bottom-right-notification",placement:"bottomRight",message:"Error",description:"Failed to copy text."})}};function sr(n,e){if(n.status===400){const t=n.response.data,r=[];for(const o in t.errors)r.push({name:ir(o),errors:t.errors[o]});e.setFields(r)}}const lr=({type:n,value:e,selectedConfig:t,onSuccess:r,postMyFilter:o,putMyFilter:a})=>{const[s]=R.Form.useForm(),l=ge(c=>c.setOnOk),d=ge(c=>c.close);return S.useEffect(()=>{t&&s.setFieldsValue({name:t.name})},[t,s]),S.useEffect(()=>{l(async()=>{try{const c=await s.validateFields();t?await a({id:t.id,type:n,name:c.name,value:e??""}):await o({type:n,name:c.name,value:e??""}),r==null||r(c.name),d()}catch(c){const u=sr(c,s);s.setFields(u)}})},[n,e,t,r,s,l,d]),i.jsxs(R.Form,{form:s,children:[i.jsx(Ie,{children:B("ConfigurationName")}),i.jsx(R.Form.Item,{name:"name",children:i.jsx(ht,{})})]})},Wn=n=>P.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M11.6666 4.65485L10.4881 5.83336L13.8215 9.16669H3.33331V10.8334H13.8215L10.4881 14.1667L11.6666 15.3452L17.0118 10L11.6666 4.65485Z",fill:"currentColor"})),ke=m(Wn)`
1273
1199
  cursor: pointer;
1274
1200
  svg {
1275
1201
  width: 1rem;
@@ -1279,7 +1205,7 @@
1279
1205
  transition: 0.1s;
1280
1206
  }
1281
1207
  }
1282
- `,_n=()=>i.jsx(ft,{children:i.jsx("div",{children:i.jsx("p",{children:B("DeleteRecordQuestion")})})}),Wn=m(H.Checkbox)`
1208
+ `,Yn=()=>i.jsx(Ye,{children:i.jsx("div",{children:i.jsx("p",{children:B("DeleteRecordQuestion")})})}),Kn=m(R.Checkbox)`
1283
1209
  .ant-checkbox-inner {
1284
1210
  background-color: transparent;
1285
1211
  border: 1px solid #ccc;
@@ -1304,7 +1230,7 @@
1304
1230
  .ant-checkbox-checked .ant-checkbox-inner::after {
1305
1231
  border-color: black;
1306
1232
  }
1307
- `,Yn=({item:n})=>{var j,L,T,V,G,_,Y,I,$;const e=S.useRef(null),t=D(v=>v.filterItems),r=D(v=>v.setFilterItems),[o,a]=S.useState(n.selectType==be.VALUE);function s(){var v;(v=e==null?void 0:e.current)==null||v.focus()}function l(v){r(t.map(F=>F.title==n.title?{...F,filterValue:v.id,filterLabel:v.name}:F),!0),a(!1)}function d(v,F=!1){r(t.map(M=>M.title==n.title?{...M,filterValue:v.id,filterLabel:v.name,isCountryGroup:F}:M),!0),a(!1)}const[c,u]=S.useState(n.filterValue||[]),p=v=>{var k,C;const F=c.includes(v)?c.filter(y=>y!==v):[...c,v];u(F);const M=(C=(k=n==null?void 0:n.filters)==null?void 0:k.options)==null?void 0:C.filter(y=>F.includes(y.id)).map(y=>y.name).join(", ");r(t.map(y=>y.title===n.title?{...y,filterValue:F,filterLabel:M||""}:y),!0)};function h(v){r(t.map(F=>F.title==n.title?{...v,selectType:be.VALUE}:F))}const f=it(v=>{const F=v.target.value;r(t.map(M=>M.title==n.title?{...M,filterValue:F}:M),!0)},500);function g(v){r(t.map(F=>F.title==n.title?{...F,selectType:be.NONE}:F)),a(v)}function w(){r(t.filter(v=>v.title!=n.title),!0)}S.useEffect(()=>{var v;o&&((v=n==null?void 0:n.filters)==null?void 0:v.type)!==se.SELECT&&setTimeout(()=>{s()},0)},[o]);const O={[se.INPUT]:i.jsx("input",{ref:e,type:"text",placeholder:"Search...",className:"filter-item-search",onChange:f}),[se.SELECT]:i.jsx("div",{children:(L=(j=n==null?void 0:n.filters)==null?void 0:j.options)==null?void 0:L.map(v=>i.jsx("button",{onClick:()=>l(v),children:v.name},v.id))}),[se.TwoComponentSelect]:i.jsxs(i.Fragment,{children:[i.jsx(Ln,{children:(T=n==null?void 0:n.filters)==null?void 0:T.firstGroupName}),i.jsx(Dn,{children:(G=(V=n==null?void 0:n.filters)==null?void 0:V.options)==null?void 0:G.map(v=>i.jsx("button",{onClick:()=>d(v,!1),children:v.name},v.id))})]}),[se.MULTISELECT]:i.jsx("div",{children:(Y=(_=n==null?void 0:n.filters)==null?void 0:_.options)==null?void 0:Y.map(v=>i.jsx(kn,{children:i.jsx(Wn,{onChange:()=>p(v==null?void 0:v.id),children:i.jsx(jn,{children:v.name})})},v.id))}),[se.DATEPICKER]:i.jsx(Zt,{open:!0,allowClear:!0,format:"MMM D, YYYY",placeholder:["From","To"],onChange:v=>{if(!v)r(t.map(F=>F.title===n.title?{...F,filterValue:null,filterLabel:""}:F),!0);else{const F=v.map((M,k)=>{var C;return M?(C=ee.toLocal(M,k===0,k===v.length-1))==null?void 0:C.toISOString():null});r(t.map(M=>M.title===n.title?{...M,filterValue:F,filterLabel:`${v[0].format("MMM D, YYYY")} → ${v[1].format("MMM D, YYYY")}`}:M),!0)}a(!1)},getPopupContainer:v=>{var F;return((F=v==null?void 0:v.parentElement)==null?void 0:F.parentElement)??document.body}})},A=i.jsx(at,{style:{border:((I=n==null?void 0:n.filters)==null?void 0:I.type)===se.DATEPICKER?"none":"inherit"},children:O[(($=n==null?void 0:n.filters)==null?void 0:$.type)||se.INPUT]});return i.jsxs(Je,{children:[i.jsx(ct,{placement:"bottomLeft",onSelect:h,children:i.jsxs("span",{children:[i.jsx(Jt,{}),n.title]})}),i.jsx(H.Dropdown,{overlayClassName:"debug-dropdwon",placement:"bottomLeft",open:o,onOpenChange:g,popupRender:()=>A,trigger:["click"],getPopupContainer:v=>{var F;return((F=v==null?void 0:v.parentElement)==null?void 0:F.parentElement)??document.body},children:i.jsx("div",{children:n.filterValue?n.filterLabel?n.filterLabel:n.filterValue:"NotSelected"})}),i.jsx("span",{onClick:w,children:i.jsx(pt,{})})]})},Kn=()=>{const n=D(g=>g.filterItems),e=D(g=>g.sortItems),t=D(g=>g.setSelectedConfig),r=D(g=>g.resetStore),o=D(g=>g.selectedConfig),{deleteMyFilter:a}=we(),s=D(g=>g.bumpConfigsVersion),{open:l,store:d,close:c}=ge(),u=dt();async function p(){try{if(!o||!a)return;await a(o.id),t(null),s()}catch(g){console.log(g,"Error happened deleting configuration")}}function h(){d({component:_n,title:o?"UpdateConfiguration":"NameYourConfiguration",footerOptions:{okText:i.jsx(Ae,{onClick:()=>{p(),c(),r()},children:i.jsxs("span",{className:"arrow-styled",children:["Delete",i.jsx(ke,{})]})}),cancelText:"Cancel"}}),l()}function f(){const g=JSON.stringify({filterItems:n,sortItems:e});d({component:or,componentProps:{type:u,value:g,selectedConfig:o,onSuccess:w=>{o&&t({...o,name:w}),s()}},title:o?"UpdateConfiguration":"NameYourConfiguration",footerOptions:{okText:i.jsx(Ae,{children:i.jsxs("span",{className:"arrow-styled",children:["Save",i.jsx(ke,{})]})}),cancelText:"Cancel"}}),l()}return i.jsxs(Sn,{children:[e.length>0&&i.jsx(Xt,{placement:"bottomLeft",children:i.jsx(Je,{className:"sort",children:i.jsxs("span",{children:[e[0].title,e[0].direction==Q.ASC?i.jsx(st,{}):i.jsx(lt,{})]})})}),n.map(g=>i.jsx(Yn,{item:g},g.title)),i.jsx(ct,{placement:"bottomLeft",children:i.jsx(Je,{className:"add-filter",children:i.jsxs("span",{children:[i.jsx(Pn,{}),"AddFilter"]})})}),i.jsxs(Cn,{children:[i.jsx("button",{onClick:f,children:o?"UpdateConfiguration":"SaveConfiguration"}),o&&i.jsx("button",{onClick:h,children:"DeleteConfiguration"}),i.jsxs("button",{onClick:r,children:[i.jsx(er,{}),"ResetConditions"]})]})]})},qn=m.div`
1233
+ `,qn=({item:n})=>{var j,L,T,V,G,_,Y,I,$;const e=S.useRef(null),t=D(v=>v.filterItems),r=D(v=>v.setFilterItems),[o,a]=S.useState(n.selectType==be.VALUE);function s(){var v;(v=e==null?void 0:e.current)==null||v.focus()}function l(v){r(t.map(F=>F.title==n.title?{...F,filterValue:v.id,filterLabel:v.name}:F),!0),a(!1)}function d(v,F=!1){r(t.map(M=>M.title==n.title?{...M,filterValue:v.id,filterLabel:v.name,isCountryGroup:F}:M),!0),a(!1)}const[c,u]=S.useState(n.filterValue||[]),p=v=>{var k,C;const F=c.includes(v)?c.filter(y=>y!==v):[...c,v];u(F);const M=(C=(k=n==null?void 0:n.filters)==null?void 0:k.options)==null?void 0:C.filter(y=>F.includes(y.id)).map(y=>y.name).join(", ");r(t.map(y=>y.title===n.title?{...y,filterValue:F,filterLabel:M||""}:y),!0)};function h(v){r(t.map(F=>F.title==n.title?{...v,selectType:be.VALUE}:F))}const f=ct(v=>{const F=v.target.value;r(t.map(M=>M.title==n.title?{...M,filterValue:F}:M),!0)},500);function g(v){r(t.map(F=>F.title==n.title?{...F,selectType:be.NONE}:F)),a(v)}function w(){r(t.filter(v=>v.title!=n.title),!0)}S.useEffect(()=>{var v;o&&((v=n==null?void 0:n.filters)==null?void 0:v.type)!==se.SELECT&&setTimeout(()=>{s()},0)},[o]);const O={[se.INPUT]:i.jsx("input",{ref:e,type:"text",placeholder:"Search...",className:"filter-item-search",onChange:f}),[se.SELECT]:i.jsx("div",{children:(L=(j=n==null?void 0:n.filters)==null?void 0:j.options)==null?void 0:L.map(v=>i.jsx("button",{onClick:()=>l(v),children:v.name},v.id))}),[se.TwoComponentSelect]:i.jsxs(i.Fragment,{children:[i.jsx(Tn,{children:(T=n==null?void 0:n.filters)==null?void 0:T.firstGroupName}),i.jsx(In,{children:(G=(V=n==null?void 0:n.filters)==null?void 0:V.options)==null?void 0:G.map(v=>i.jsx("button",{onClick:()=>d(v,!1),children:v.name},v.id))})]}),[se.MULTISELECT]:i.jsx("div",{children:(Y=(_=n==null?void 0:n.filters)==null?void 0:_.options)==null?void 0:Y.map(v=>i.jsx(On,{children:i.jsx(Kn,{onChange:()=>p(v==null?void 0:v.id),children:i.jsx(En,{children:v.name})})},v.id))}),[se.DATEPICKER]:i.jsx(Jt,{open:!0,allowClear:!0,format:"MMM D, YYYY",placeholder:["From","To"],onChange:v=>{if(!v)r(t.map(F=>F.title===n.title?{...F,filterValue:null,filterLabel:""}:F),!0);else{const F=v.map((M,k)=>{var C;return M?(C=ee.toLocal(M,k===0,k===v.length-1))==null?void 0:C.toISOString():null});r(t.map(M=>M.title===n.title?{...M,filterValue:F,filterLabel:`${v[0].format("MMM D, YYYY")} → ${v[1].format("MMM D, YYYY")}`}:M),!0)}a(!1)},getPopupContainer:v=>{var F;return((F=v==null?void 0:v.parentElement)==null?void 0:F.parentElement)??document.body}})},A=i.jsx(lt,{style:{border:((I=n==null?void 0:n.filters)==null?void 0:I.type)===se.DATEPICKER?"none":"inherit"},children:O[(($=n==null?void 0:n.filters)==null?void 0:$.type)||se.INPUT]});return i.jsxs(et,{children:[i.jsx(ut,{placement:"bottomLeft",onSelect:h,children:i.jsxs("span",{children:[i.jsx(Xt,{}),n.title]})}),i.jsx(R.Dropdown,{overlayClassName:"debug-dropdwon",placement:"bottomLeft",open:o,onOpenChange:g,popupRender:()=>A,trigger:["click"],getPopupContainer:v=>{var F;return((F=v==null?void 0:v.parentElement)==null?void 0:F.parentElement)??document.body},children:i.jsx("div",{children:n.filterValue?n.filterLabel?n.filterLabel:n.filterValue:"NotSelected"})}),i.jsx("span",{onClick:w,children:i.jsx(gt,{})})]})},Zn=()=>{const n=D(g=>g.filterItems),e=D(g=>g.sortItems),t=D(g=>g.setSelectedConfig),r=D(g=>g.resetStore),o=D(g=>g.selectedConfig),{deleteMyFilter:a}=we(),s=D(g=>g.bumpConfigsVersion),{open:l,store:d,close:c}=ge(),u=ft();async function p(){try{if(!o||!a)return;await a(o.id),t(null),s()}catch(g){console.log(g,"Error happened deleting configuration")}}function h(){d({component:Yn,title:o?"UpdateConfiguration":"NameYourConfiguration",footerOptions:{okText:i.jsx(ze,{onClick:()=>{p(),c(),r()},children:i.jsxs("span",{className:"arrow-styled",children:["Delete",i.jsx(ke,{})]})}),cancelText:"Cancel"}}),l()}function f(){const g=JSON.stringify({filterItems:n,sortItems:e});d({component:lr,componentProps:{type:u,value:g,selectedConfig:o,onSuccess:w=>{o&&t({...o,name:w}),s()}},title:o?"UpdateConfiguration":"NameYourConfiguration",footerOptions:{okText:i.jsx(ze,{children:i.jsxs("span",{className:"arrow-styled",children:["Save",i.jsx(ke,{})]})}),cancelText:"Cancel"}}),l()}return i.jsxs(Dn,{children:[e.length>0&&i.jsx(Qt,{placement:"bottomLeft",children:i.jsx(et,{className:"sort",children:i.jsxs("span",{children:[e[0].title,e[0].direction==Q.ASC?i.jsx(dt,{}):i.jsx(pt,{})]})})}),n.map(g=>i.jsx(qn,{item:g},g.title)),i.jsx(ut,{placement:"bottomLeft",children:i.jsx(et,{className:"add-filter",children:i.jsxs("span",{children:[i.jsx(Vn,{}),"AddFilter"]})})}),i.jsxs($n,{children:[i.jsx("button",{onClick:f,children:o?"UpdateConfiguration":"SaveConfiguration"}),o&&i.jsx("button",{onClick:h,children:"DeleteConfiguration"}),i.jsxs("button",{onClick:r,children:[i.jsx(tr,{}),"ResetConditions"]})]})]})},Jn=m.div`
1308
1234
  height: 100%;
1309
1235
  display: flex;
1310
1236
  flex-direction: column;
@@ -1497,7 +1423,7 @@
1497
1423
  background: var(--color-interaction-press-primary) !important;
1498
1424
  }
1499
1425
  }
1500
- `,Zn=m.div`
1426
+ `,Xn=m.div`
1501
1427
  display: flex;
1502
1428
  flex-direction: column;
1503
1429
  background: var(--color-bg-quaternary, #fff);
@@ -1530,7 +1456,7 @@
1530
1456
  background: var(--color-bg-secondary, #f5f5f5);
1531
1457
  }
1532
1458
  }
1533
- `,Jn=m.div`
1459
+ `,Qn=m.div`
1534
1460
  display: flex;
1535
1461
  justify-content: space-between;
1536
1462
  align-items: center;
@@ -1622,7 +1548,7 @@
1622
1548
  @media (max-width: 991px) {
1623
1549
  padding: 0 1rem;
1624
1550
  }
1625
- `,Xn=m.div`
1551
+ `,eo=m.div`
1626
1552
  border-radius: var(--border-radius-025, 0.125rem);
1627
1553
  background: var(--color-bg-secondary, #232323);
1628
1554
  box-shadow:
@@ -1647,7 +1573,7 @@
1647
1573
  fill: var(--color-text-primary, #fff);
1648
1574
  }
1649
1575
  }
1650
- `;function jt(n,e){const t={};return e.forEach(r=>{const o=r[n.dataIndex];t[o]?t[o].push(r):t[o]=[r]}),t}function Qn(n){return Object.values(n).reduce((e,t)=>e+t.length,0)}function eo({item:n,columns:e,rowKey:t,onRowClick:r}){const o=D(a=>a.checkedValue);return i.jsx("tr",{onClick:r?()=>r(n):void 0,className:`${o&&o[n[t]]?"checked":""}`,children:e.map(a=>i.jsx("td",{children:a!=null&&a.render?a.render(n[a.dataIndex],n):n[a.dataIndex]},`${n[t]}-${a.dataIndex}`))},n[t])}function ht({rows:n,columns:e,rowKey:t,onRowClick:r}){return n.map(o=>i.jsx(eo,{item:o,columns:e,rowKey:t,onRowClick:r},o[t]))}function to({rowLength:n,columnLength:e}){return Array(n).fill(null).map((t,r)=>i.jsx("tr",{children:Array(e).fill(null).map((o,a)=>i.jsx("td",{children:i.jsx(H.Skeleton,{active:!0,title:!1,paragraph:{rows:1,width:"100%"}})},`${r}-${a}`))},`skeleton-row-${r}`))}function ro({subGroups:n,columns:e,rowKey:t,onRowClick:r}){return i.jsx(i.Fragment,{children:Object.keys(n).map(o=>i.jsxs(S.Fragment,{children:[i.jsxs("tr",{className:"sub-group-header",children:[i.jsx("td",{}),i.jsx("td",{colSpan:e.length,children:i.jsxs("div",{children:[o," ",i.jsx("span",{children:n[o].length}),i.jsx("span",{className:"line"})]})})]}),i.jsx(ht,{rows:n[o],columns:e,rowKey:t,onRowClick:r})]},o))})}function no({label:n,colSpan:e,count:t}){return i.jsxs("tr",{className:"main-group-header",children:[i.jsx("td",{}),i.jsxs("td",{colSpan:e,children:[n," ",i.jsx("span",{children:t})]}),i.jsx("td",{})]})}function oo({dataSource:n,columns:e,isSubGroupped:t,getGroupLength:r,rowKey:o,onRowClick:a}){return i.jsx(i.Fragment,{children:Object.keys(n).map(s=>{var l;return i.jsxs(S.Fragment,{children:[i.jsx(no,{label:s,colSpan:e.length,count:t?r(n[s]):(l=n[s])==null?void 0:l.length}),t?i.jsx(ro,{subGroups:n[s],columns:e,rowKey:o,onRowClick:a}):i.jsx(ht,{rows:n[s],columns:e,rowKey:o,onRowClick:a})]},s)})})}function ao({pagination:n,onPerPageSelectChange:e,totalItemCount:t,onPaginationChange:r}){const[o,a]=S.useState(!1);return i.jsxs(Jn,{children:[i.jsx(H.Pagination,{current:n.current,pageSize:n.pageSize,total:t,showSizeChanger:!1,onChange:r}),i.jsx(H.Dropdown,{placement:"bottomRight",popupRender:()=>i.jsx(Xn,{children:((n==null?void 0:n.items)||[{label:`10 ${B("Items")}`,value:10},{label:`25 ${B("Items")}`,value:25},{label:`50 ${B("Items")}`,value:50},{label:`100 ${B("Items")}`,value:100}]).map(s=>i.jsxs("button",{onClick:()=>e(s.value),children:[s.label," ",s.value==n.pageSize&&i.jsx(Ee,{})]},s.value))}),trigger:["click"],open:o,onOpenChange:a,children:i.jsxs("div",{className:"page-size-select-header",children:[n.pageSize," ",B("ItemsPerPage")," ",i.jsx(nt,{})]})})]})}const io=n=>P.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.6094 3.33333L5.1263 11.8158C5.12139 11.8211 5.11638 11.8263 5.11133 11.8314L3.33333 13.6094L2.39062 12.6667L3.66211 11.3939C2.75363 10.5112 1.95159 9.31206 1.41341 8.31706L1.24219 8L1.41341 7.68294C2.08047 6.44895 3.05011 5.21371 4.17253 4.2793C5.28611 3.35227 6.61809 2.66667 8 2.66667C9.16616 2.66667 10.294 3.10021 11.291 3.76562L12.6667 2.39062L13.6094 3.33333ZM8 4C7.05196 4 6.01458 4.48114 5.02604 5.30404C4.14063 6.04112 3.34853 7.00907 2.76562 8C3.26512 8.86691 3.9209 9.79039 4.60482 10.4512L5.63021 9.42643C4.98911 8.36284 5.12669 6.96121 6.04427 6.04362C6.96186 5.12604 8.36349 4.98846 9.42708 5.62956L10.3255 4.73047C9.55755 4.26174 8.76273 4 8 4ZM8.42513 6.63151C7.93343 6.47928 7.37623 6.59708 6.98698 6.98633C6.59773 7.37558 6.47993 7.93278 6.63216 8.42448L8.42513 6.63151Z",fill:"currentColor",fillOpacity:.75}),P.createElement("path",{d:"M13.2266 5.51432L13.4199 5.75651C13.8705 6.35556 14.306 7.16405 14.5866 7.68294L14.7578 8L14.5866 8.31706C13.9196 9.55061 12.9498 10.7856 11.8275 11.7201C10.714 12.6471 9.38194 13.3333 8 13.3333C7.42626 13.3333 6.86164 13.2272 6.32031 13.0423L6.08984 12.9583L5.5332 12.7422L6.5638 11.7116L6.57161 11.7148L6.75195 11.7806C7.17263 11.9243 7.59142 12 8 12C8.94792 12 9.98545 11.5189 10.974 10.696C11.8609 9.95749 12.6538 8.98668 13.237 7.99414C12.9701 7.50763 12.6616 6.96796 12.3665 6.57357L12.2122 6.38021L12.0664 6.20898L13.0124 5.26302L13.2266 5.51432Z",fill:"currentColor",fillOpacity:.75}));function so({col:n}){const[e,t]=S.useState(!1),r=D(f=>f.filterItems),o=D(f=>f.hideItems),a=D(f=>f.setFilterItems),s=D(f=>f.setSortItems),l=D(f=>f.setHideItems);function d(f,g){s([{title:f.title,dataIndex:f.dataIndex.charAt(0).toUpperCase()+f.dataIndex.slice(1),direction:g}])}function c(f){const g=r.filter(w=>f.title!=w.title);a([...g,{...f,selectType:be.VALUE}])}function u(f,g){l({...o,[f.dataIndex]:!0})}const p=()=>t(!1),h=[{icon:i.jsx(Ne,{}),text:B("Filter"),action:()=>c(n)},{icon:i.jsx(st,{}),text:ae("Ascending"),action:()=>d(n,Q.ASC)},{icon:i.jsx(lt,{}),text:ae("Descending"),action:()=>d(n,Q.DESC)},{icon:i.jsx(io,{}),text:B("HideInView"),action:()=>u(n)}];return n.filterDropdown===!1?i.jsx("th",{}):i.jsx(H.Dropdown,{placement:"bottomLeft",popupRender:()=>i.jsx(Zn,{children:h.map(({icon:f,text:g,action:w})=>i.jsxs("button",{onClick:()=>{w(),p()},children:[f,g]},g))}),trigger:["click"],open:e,onOpenChange:t,getPopupContainer:f=>(f==null?void 0:f.parentElement)??document.body,children:i.jsx("th",{className:e?"active":"",children:i.jsx("span",{children:n.title})})})}const lo=m.div`
1576
+ `;function kt(n,e){const t={};return e.forEach(r=>{const o=r[n.dataIndex];t[o]?t[o].push(r):t[o]=[r]}),t}function to(n){return Object.values(n).reduce((e,t)=>e+t.length,0)}function ro({item:n,columns:e,rowKey:t,onRowClick:r}){const o=D(a=>a.checkedValue);return i.jsx("tr",{onClick:r?()=>r(n):void 0,className:`${o&&o[n[t]]?"checked":""}`,children:e.map(a=>i.jsx("td",{children:a!=null&&a.render?a.render(n[a.dataIndex],n):n[a.dataIndex]},`${n[t]}-${a.dataIndex}`))},n[t])}function mt({rows:n,columns:e,rowKey:t,onRowClick:r}){return n.map(o=>i.jsx(ro,{item:o,columns:e,rowKey:t,onRowClick:r},o[t]))}function no({rowLength:n,columnLength:e}){return Array(n).fill(null).map((t,r)=>i.jsx("tr",{children:Array(e).fill(null).map((o,a)=>i.jsx("td",{children:i.jsx(R.Skeleton,{active:!0,title:!1,paragraph:{rows:1,width:"100%"}})},`${r}-${a}`))},`skeleton-row-${r}`))}function oo({subGroups:n,columns:e,rowKey:t,onRowClick:r}){return i.jsx(i.Fragment,{children:Object.keys(n).map(o=>i.jsxs(S.Fragment,{children:[i.jsxs("tr",{className:"sub-group-header",children:[i.jsx("td",{}),i.jsx("td",{colSpan:e.length,children:i.jsxs("div",{children:[o," ",i.jsx("span",{children:n[o].length}),i.jsx("span",{className:"line"})]})})]}),i.jsx(mt,{rows:n[o],columns:e,rowKey:t,onRowClick:r})]},o))})}function ao({label:n,colSpan:e,count:t}){return i.jsxs("tr",{className:"main-group-header",children:[i.jsx("td",{}),i.jsxs("td",{colSpan:e,children:[n," ",i.jsx("span",{children:t})]}),i.jsx("td",{})]})}function io({dataSource:n,columns:e,isSubGroupped:t,getGroupLength:r,rowKey:o,onRowClick:a}){return i.jsx(i.Fragment,{children:Object.keys(n).map(s=>{var l;return i.jsxs(S.Fragment,{children:[i.jsx(ao,{label:s,colSpan:e.length,count:t?r(n[s]):(l=n[s])==null?void 0:l.length}),t?i.jsx(oo,{subGroups:n[s],columns:e,rowKey:o,onRowClick:a}):i.jsx(mt,{rows:n[s],columns:e,rowKey:o,onRowClick:a})]},s)})})}function so({pagination:n,onPerPageSelectChange:e,totalItemCount:t,onPaginationChange:r}){const[o,a]=S.useState(!1);return i.jsxs(Qn,{children:[i.jsx(R.Pagination,{current:n.current,pageSize:n.pageSize,total:t,showSizeChanger:!1,onChange:r}),i.jsx(R.Dropdown,{placement:"bottomRight",popupRender:()=>i.jsx(eo,{children:((n==null?void 0:n.items)||[{label:`10 ${B("Items")}`,value:10},{label:`25 ${B("Items")}`,value:25},{label:`50 ${B("Items")}`,value:50},{label:`100 ${B("Items")}`,value:100}]).map(s=>i.jsxs("button",{onClick:()=>e(s.value),children:[s.label," ",s.value==n.pageSize&&i.jsx(Ee,{})]},s.value))}),trigger:["click"],open:o,onOpenChange:a,children:i.jsxs("div",{className:"page-size-select-header",children:[n.pageSize," ",B("ItemsPerPage")," ",i.jsx(it,{})]})})]})}const lo=n=>P.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.6094 3.33333L5.1263 11.8158C5.12139 11.8211 5.11638 11.8263 5.11133 11.8314L3.33333 13.6094L2.39062 12.6667L3.66211 11.3939C2.75363 10.5112 1.95159 9.31206 1.41341 8.31706L1.24219 8L1.41341 7.68294C2.08047 6.44895 3.05011 5.21371 4.17253 4.2793C5.28611 3.35227 6.61809 2.66667 8 2.66667C9.16616 2.66667 10.294 3.10021 11.291 3.76562L12.6667 2.39062L13.6094 3.33333ZM8 4C7.05196 4 6.01458 4.48114 5.02604 5.30404C4.14063 6.04112 3.34853 7.00907 2.76562 8C3.26512 8.86691 3.9209 9.79039 4.60482 10.4512L5.63021 9.42643C4.98911 8.36284 5.12669 6.96121 6.04427 6.04362C6.96186 5.12604 8.36349 4.98846 9.42708 5.62956L10.3255 4.73047C9.55755 4.26174 8.76273 4 8 4ZM8.42513 6.63151C7.93343 6.47928 7.37623 6.59708 6.98698 6.98633C6.59773 7.37558 6.47993 7.93278 6.63216 8.42448L8.42513 6.63151Z",fill:"currentColor",fillOpacity:.75}),P.createElement("path",{d:"M13.2266 5.51432L13.4199 5.75651C13.8705 6.35556 14.306 7.16405 14.5866 7.68294L14.7578 8L14.5866 8.31706C13.9196 9.55061 12.9498 10.7856 11.8275 11.7201C10.714 12.6471 9.38194 13.3333 8 13.3333C7.42626 13.3333 6.86164 13.2272 6.32031 13.0423L6.08984 12.9583L5.5332 12.7422L6.5638 11.7116L6.57161 11.7148L6.75195 11.7806C7.17263 11.9243 7.59142 12 8 12C8.94792 12 9.98545 11.5189 10.974 10.696C11.8609 9.95749 12.6538 8.98668 13.237 7.99414C12.9701 7.50763 12.6616 6.96796 12.3665 6.57357L12.2122 6.38021L12.0664 6.20898L13.0124 5.26302L13.2266 5.51432Z",fill:"currentColor",fillOpacity:.75}));function co({col:n}){const[e,t]=S.useState(!1),r=D(f=>f.filterItems),o=D(f=>f.hideItems),a=D(f=>f.setFilterItems),s=D(f=>f.setSortItems),l=D(f=>f.setHideItems);function d(f,g){s([{title:f.title,dataIndex:f.dataIndex.charAt(0).toUpperCase()+f.dataIndex.slice(1),direction:g}])}function c(f){const g=r.filter(w=>f.title!=w.title);a([...g,{...f,selectType:be.VALUE}])}function u(f,g){l({...o,[f.dataIndex]:!0})}const p=()=>t(!1),h=[{icon:i.jsx(Ae,{}),text:B("Filter"),action:()=>c(n)},{icon:i.jsx(dt,{}),text:ae("Ascending"),action:()=>d(n,Q.ASC)},{icon:i.jsx(pt,{}),text:ae("Descending"),action:()=>d(n,Q.DESC)},{icon:i.jsx(lo,{}),text:B("HideInView"),action:()=>u(n)}];return n.filterDropdown===!1?i.jsx("th",{}):i.jsx(R.Dropdown,{placement:"bottomLeft",popupRender:()=>i.jsx(Xn,{children:h.map(({icon:f,text:g,action:w})=>i.jsxs("button",{onClick:()=>{w(),p()},children:[f,g]},g))}),trigger:["click"],open:e,onOpenChange:t,getPopupContainer:f=>(f==null?void 0:f.parentElement)??document.body,children:i.jsx("th",{className:e?"active":"",children:i.jsx("span",{children:n.title})})})}const po=m.div`
1651
1577
  display: flex;
1652
1578
  height: 80vh;
1653
1579
  padding: 24px var(--spacing-300, 24px);
@@ -1656,13 +1582,13 @@
1656
1582
  flex-direction: column;
1657
1583
  text-align: center;
1658
1584
  gap: var(--spacing-400, 32px);
1659
- `,co=m.div`
1585
+ `,uo=m.div`
1660
1586
  display: flex;
1661
1587
  width: 864px;
1662
1588
  flex-direction: column;
1663
1589
  align-items: center;
1664
1590
  gap: 8px;
1665
- `,po=m.p`
1591
+ `,fo=m.p`
1666
1592
  color: var(--color-text-primary, #131412);
1667
1593
  text-align: center;
1668
1594
 
@@ -1673,7 +1599,7 @@
1673
1599
  font-weight: var(--text-weight-regular, 400);
1674
1600
  line-height: var(--typo-body-lineHeight-medium, 20px); /* 111.111% */
1675
1601
  letter-spacing: var(--typo-body-spacing-medium, 0.15px);
1676
- `,uo=m.p`
1602
+ `,go=m.p`
1677
1603
  color: var(--color-text-secondary, rgba(19, 20, 18, 0.75));
1678
1604
  text-align: center;
1679
1605
  width: 400px;
@@ -1690,7 +1616,7 @@
1690
1616
  font-size: 10px;
1691
1617
  width: 350px;
1692
1618
  }
1693
- `,fo=m.span`
1619
+ `,ho=m.span`
1694
1620
  color: var(--color-text-status-info, #17adc1);
1695
1621
 
1696
1622
  /* caption/medium-r */
@@ -1700,7 +1626,7 @@
1700
1626
  font-weight: var(--text-weight-regular, 400);
1701
1627
  line-height: var(--typo-caption-lineHeight-medium, 18px);
1702
1628
  letter-spacing: var(--typo-caption-spacing-medium, 0.1px);
1703
- `;m(H.Button)`
1629
+ `;m(R.Button)`
1704
1630
  display: flex;
1705
1631
  height: var(--size-400, 32px);
1706
1632
  padding: 8px;
@@ -1721,7 +1647,7 @@
1721
1647
  font-weight: var(--text-weight-regular, 400);
1722
1648
  line-height: var(--typo-caption-lineHeight-medium, 18px); /* 128.571% */
1723
1649
  letter-spacing: var(--typo-caption-spacing-medium, 0.1px);
1724
- `;const ar=({title:n,description:e,button:t,helpSpan:r})=>i.jsx(lo,{children:i.jsxs(co,{children:[i.jsx(po,{children:n}),i.jsxs(uo,{children:[e," ",r&&i.jsx(fo,{children:r})]}),t&&t]})}),go=({activeTableView:n,columns:e,rowKey:t,dataSource:r,loading:o,pagination:a,totalItemCount:s,onRowClick:l,noPagination:d,noDataProps:c})=>{const u=D(L=>L.filters),p=D(L=>L.groupByArr),h=D(L=>L.setFilters),f=S.useMemo(()=>p.length>0?e.filter(L=>!p.some(T=>T.dataIndex==L.dataIndex)):e,[e,p]),{isTableGroupped:g,isTableSubGroupped:w}=S.useMemo(()=>({isTableGroupped:!!p[0],isTableSubGroupped:!!p[1]}),[p]),O=S.useMemo(()=>{if(p[0]){const L=jt(p[0],r);if(p[1]){const T={};return Object.keys(L).forEach(V=>{T[V]=jt(p[1],L[V])}),T}return L}return r},[r,p]);function A(L){h({...u,PageSize:L,Page:1})}function j(L){h({...u,Page:L})}return i.jsxs(qn,{children:[i.jsxs("table",{children:[n!=fe.LIST&&i.jsx("thead",{children:i.jsxs("tr",{children:[f.map(L=>i.jsx(so,{col:L},L.dataIndex)),i.jsx("th",{})]})}),i.jsx("tbody",{children:o?i.jsx(to,{rowLength:a.pageSize,columnLength:f.length}):(O==null?void 0:O.length)==0&&c?i.jsx("tr",{children:i.jsx("td",{colSpan:f.length,children:i.jsx(ar,{...c})})}):i.jsx(i.Fragment,{children:g?i.jsx(oo,{dataSource:O,columns:f,isSubGroupped:w,getGroupLength:Qn,rowKey:t,onRowClick:l}):i.jsx(ht,{rows:O,columns:f,rowKey:t,onRowClick:l})})})]}),a&&!d&&i.jsx(ao,{pagination:a,totalItemCount:s,onPerPageSelectChange:A,onPaginationChange:j})]})},ho=m.div`
1650
+ `;const cr=({title:n,description:e,button:t,helpSpan:r})=>i.jsx(po,{children:i.jsxs(uo,{children:[i.jsx(fo,{children:n}),i.jsxs(go,{children:[e," ",r&&i.jsx(ho,{children:r})]}),t&&t]})}),mo=({activeTableView:n,columns:e,rowKey:t,dataSource:r,loading:o,pagination:a,totalItemCount:s,onRowClick:l,noPagination:d,noDataProps:c})=>{const u=D(L=>L.filters),p=D(L=>L.groupByArr),h=D(L=>L.setFilters),f=S.useMemo(()=>p.length>0?e.filter(L=>!p.some(T=>T.dataIndex==L.dataIndex)):e,[e,p]),{isTableGroupped:g,isTableSubGroupped:w}=S.useMemo(()=>({isTableGroupped:!!p[0],isTableSubGroupped:!!p[1]}),[p]),O=S.useMemo(()=>{if(p[0]){const L=kt(p[0],r);if(p[1]){const T={};return Object.keys(L).forEach(V=>{T[V]=kt(p[1],L[V])}),T}return L}return r},[r,p]);function A(L){h({...u,PageSize:L,Page:1})}function j(L){h({...u,Page:L})}return i.jsxs(Jn,{children:[i.jsxs("table",{children:[n!=fe.LIST&&i.jsx("thead",{children:i.jsxs("tr",{children:[f.map(L=>i.jsx(co,{col:L},L.dataIndex)),i.jsx("th",{})]})}),i.jsx("tbody",{children:o?i.jsx(no,{rowLength:a.pageSize,columnLength:f.length}):(O==null?void 0:O.length)==0&&c?i.jsx("tr",{children:i.jsx("td",{colSpan:f.length,children:i.jsx(cr,{...c})})}):i.jsx(i.Fragment,{children:g?i.jsx(io,{dataSource:O,columns:f,isSubGroupped:w,getGroupLength:to,rowKey:t,onRowClick:l}):i.jsx(mt,{rows:O,columns:f,rowKey:t,onRowClick:l})})})]}),a&&!d&&i.jsx(so,{pagination:a,totalItemCount:s,onPerPageSelectChange:A,onPaginationChange:j})]})},xo=m.div`
1725
1651
  display: flex;
1726
1652
  flex-direction: column;
1727
1653
  position: fixed;
@@ -1939,11 +1865,11 @@
1939
1865
  z-index: 9;
1940
1866
  }
1941
1867
  }
1942
- `,mo=m.div`
1868
+ `,yo=m.div`
1943
1869
  display: flex;
1944
1870
  align-items: center;
1945
1871
  gap: 8px;
1946
- `,kt=n=>P.createElement("svg",{width:20,height:20,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 2C6.47672 2 2 6.47672 2 12C2 17.5233 6.47672 22 12 22C17.5233 22 22 17.5233 22 12C22 6.47672 17.5233 2 12 2ZM4 12C4 7.58128 7.58128 4 12 4C16.4187 4 20 7.58128 20 12C20 16.4187 16.4187 20 12 20C7.58128 20 4 16.4187 4 12Z",fill:"currentColor"}),P.createElement("path",{d:"M16.207 9.20703L13.4141 12L16.207 14.793L14.793 16.207L12 13.4141L9.20703 16.207L7.79297 14.793L10.5859 12L7.79297 9.20703L9.20703 7.79297L12 10.5859L14.793 7.79297L16.207 9.20703Z",fill:"currentColor"})),Lt=n=>P.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.0013 1.66675C5.39856 1.66675 1.66797 5.39734 1.66797 10.0001C1.66797 14.6028 5.39856 18.3334 10.0013 18.3334C14.604 18.3334 18.3346 14.6028 18.3346 10.0001C18.3346 5.39734 14.604 1.66675 10.0013 1.66675ZM13.9239 8.92267C14.2493 8.59723 14.2493 8.0696 13.9239 7.74416C13.5985 7.41872 13.0708 7.41872 12.7454 7.74416L9.16797 11.3216L7.25722 9.41083C6.93179 9.08539 6.40415 9.08539 6.07871 9.41083C5.75328 9.73626 5.75328 10.2639 6.07871 10.5893L8.57871 13.0893C8.90415 13.4148 9.43179 13.4148 9.75723 13.0893L13.9239 8.92267Z",fill:"currentColor"})),ir=m.div`
1872
+ `,Lt=n=>P.createElement("svg",{width:20,height:20,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 2C6.47672 2 2 6.47672 2 12C2 17.5233 6.47672 22 12 22C17.5233 22 22 17.5233 22 12C22 6.47672 17.5233 2 12 2ZM4 12C4 7.58128 7.58128 4 12 4C16.4187 4 20 7.58128 20 12C20 16.4187 16.4187 20 12 20C7.58128 20 4 16.4187 4 12Z",fill:"currentColor"}),P.createElement("path",{d:"M16.207 9.20703L13.4141 12L16.207 14.793L14.793 16.207L12 13.4141L9.20703 16.207L7.79297 14.793L10.5859 12L7.79297 9.20703L9.20703 7.79297L12 10.5859L14.793 7.79297L16.207 9.20703Z",fill:"currentColor"})),Dt=n=>P.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.0013 1.66675C5.39856 1.66675 1.66797 5.39734 1.66797 10.0001C1.66797 14.6028 5.39856 18.3334 10.0013 18.3334C14.604 18.3334 18.3346 14.6028 18.3346 10.0001C18.3346 5.39734 14.604 1.66675 10.0013 1.66675ZM13.9239 8.92267C14.2493 8.59723 14.2493 8.0696 13.9239 7.74416C13.5985 7.41872 13.0708 7.41872 12.7454 7.74416L9.16797 11.3216L7.25722 9.41083C6.93179 9.08539 6.40415 9.08539 6.07871 9.41083C5.75328 9.73626 5.75328 10.2639 6.07871 10.5893L8.57871 13.0893C8.90415 13.4148 9.43179 13.4148 9.75723 13.0893L13.9239 8.92267Z",fill:"currentColor"})),dr=m.div`
1947
1873
  display: flex;
1948
1874
  flex-direction: column;
1949
1875
  padding-top: 1.5rem;
@@ -1984,7 +1910,7 @@
1984
1910
  fill: var(--color-icon-inverse);
1985
1911
  }
1986
1912
  }
1987
- `,xo=m.div`
1913
+ `,bo=m.div`
1988
1914
  margin-bottom: 2.5rem;
1989
1915
  padding: 0 1.5rem;
1990
1916
  display: flex;
@@ -2031,7 +1957,7 @@
2031
1957
  letter-spacing: var(--typo-body-spacing-small, 0.00938rem);
2032
1958
  }
2033
1959
  }
2034
- `,yo=m.span`
1960
+ `,vo=m.span`
2035
1961
  color: var(--color-text-secondary, rgba(255, 255, 255, 0.75));
2036
1962
 
2037
1963
  font-family: var(--text-font-family-base, Geist);
@@ -2040,18 +1966,18 @@
2040
1966
  font-weight: var(--text-weight-regular, 400);
2041
1967
  line-height: var(--typo-caption-lineHeight-medium, 18px); /* 128.571% */
2042
1968
  letter-spacing: var(--typo-caption-spacing-medium, 0.1px);
2043
- `,bo=m(ir)`
1969
+ `,wo=m(dr)`
2044
1970
  border-radius: var(--border-radius-025, 2px);
2045
1971
  background: var(--color-bg-status-error, #fd7f60) !important;
2046
1972
  border: 2px solid var(--color-bg-secondary, #f5f5f5);
2047
1973
  padding-top: 0 !important;
2048
- `,vo=m.div`
1974
+ `,So=m.div`
2049
1975
  width: 100%;
2050
1976
  display: flex;
2051
1977
  flex-direction: column;
2052
1978
  gap: var(--spacing-050, 4px);
2053
1979
  padding: var(--spacing-400, 32px) var(--spacing-300, 24px) !important;
2054
- `,wo=m.div`
1980
+ `,Co=m.div`
2055
1981
  display: flex;
2056
1982
  justify-content: space-between;
2057
1983
  color: var(--color-text-contrast-onlight-primary, #131412);
@@ -2063,7 +1989,7 @@
2063
1989
  font-weight: var(--text-weight-medium, 500);
2064
1990
  line-height: var(--typo-subheading-lineHeight-medium, 28px); /* 116.667% */
2065
1991
  letter-spacing: var(--typo-subheading-spacing-medium, -0.5px);
2066
- `,So=m.div`
1992
+ `,jo=m.div`
2067
1993
  color: var(--color-text-contrast-onlight-secondary, rgba(19, 20, 18, 0.75));
2068
1994
 
2069
1995
  /* body/small */
@@ -2074,7 +2000,7 @@
2074
2000
  line-height: var(--typo-body-lineHeight-small, 20px); /* 125% */
2075
2001
  letter-spacing: var(--typo-body-spacing-small, 0.15px);
2076
2002
  padding-bottom: var(--spacing-400, 32px) !important;
2077
- `,Co=m(H.Button)`
2003
+ `,ko=m(R.Button)`
2078
2004
  border-radius: var(--border-radius-025, 2px);
2079
2005
  background: var(--color-bg-brand-special, #02e0ae);
2080
2006
  display: flex;
@@ -2097,7 +2023,7 @@
2097
2023
  color: var(--color-text-inverse-primary, #131412) !important;
2098
2024
  border-top: 2px solid var(--color-bg-secondary, #f5f5f5) !important;
2099
2025
  }
2100
- `,mt=n=>P.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M7.16635 10.8358C7.16765 11.2949 7.54029 11.6667 7.99968 11.6667C8.45987 11.6667 8.83301 11.2936 8.83301 10.8334C8.83301 10.3715 8.45813 10 7.99901 10C7.54056 10 7.1643 10.372 7.16635 10.8358Z",fill:"#FD6C49"}),P.createElement("path",{d:"M8.66634 9.00004V4.33338H7.33301V9.00004H8.66634Z",fill:"#FD6C49"}),P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.943 1.33337L11.1383 1.52921C12.2476 2.64117 13.3589 3.75126 14.4708 4.86166L14.6663 5.05698V10.9429L10.9425 14.6667H5.05687L1.33301 10.9429L1.33301 5.05723L5.05687 1.33338L10.943 1.33337ZM5.60915 2.66671L2.66634 5.60952L2.66634 10.3906L5.60915 13.3334H10.3902L13.333 10.3906V5.60977C12.3516 4.62959 11.37 3.64891 10.3898 2.66671L5.60915 2.66671Z",fill:"#FD6C49"}));function sr(n){if(!n)return n;let e=n[0].toLowerCase();for(let t=1;t<n.length;t++){const r=n[t-1],o=n[t],a=n[t+1];/[A-Z]/.test(o)?/[A-Z]/.test(r)&&/[A-Z]/.test(a)?e+=o.toLowerCase():(/[A-Z]/.test(r)&&(!a||/[^A-Z]/.test(a)),e+=o):e+=o}return e}function ve(n){return Object.entries(n).map(([e,t])=>({name:e.replace(/\[(\d+)\]/g,".$1").split(".").map(o=>isNaN(o)?sr(o):Number(o)),errors:t}))}m(H.Form.Item)`
2026
+ `,xt=n=>P.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M7.16635 10.8358C7.16765 11.2949 7.54029 11.6667 7.99968 11.6667C8.45987 11.6667 8.83301 11.2936 8.83301 10.8334C8.83301 10.3715 8.45813 10 7.99901 10C7.54056 10 7.1643 10.372 7.16635 10.8358Z",fill:"#FD6C49"}),P.createElement("path",{d:"M8.66634 9.00004V4.33338H7.33301V9.00004H8.66634Z",fill:"#FD6C49"}),P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.943 1.33337L11.1383 1.52921C12.2476 2.64117 13.3589 3.75126 14.4708 4.86166L14.6663 5.05698V10.9429L10.9425 14.6667H5.05687L1.33301 10.9429L1.33301 5.05723L5.05687 1.33338L10.943 1.33337ZM5.60915 2.66671L2.66634 5.60952L2.66634 10.3906L5.60915 13.3334H10.3902L13.333 10.3906V5.60977C12.3516 4.62959 11.37 3.64891 10.3898 2.66671L5.60915 2.66671Z",fill:"#FD6C49"}));function pr(n){if(!n)return n;let e=n[0].toLowerCase();for(let t=1;t<n.length;t++){const r=n[t-1],o=n[t],a=n[t+1];/[A-Z]/.test(o)?/[A-Z]/.test(r)&&/[A-Z]/.test(a)?e+=o.toLowerCase():(/[A-Z]/.test(r)&&(!a||/[^A-Z]/.test(a)),e+=o):e+=o}return e}function ve(n){return Object.entries(n).map(([e,t])=>({name:e.replace(/\[(\d+)\]/g,".$1").split(".").map(o=>isNaN(o)?pr(o):Number(o)),errors:t}))}m(R.Form.Item)`
2101
2027
  margin-bottom: 2.5rem;
2102
2028
  padding: 0 1.5rem;
2103
2029
  display: flex;
@@ -2144,11 +2070,11 @@
2144
2070
  letter-spacing: var(--typo-body-spacing-small, 0.00938rem);
2145
2071
  }
2146
2072
  }
2147
- `;const lr=m.div`
2073
+ `;const ur=m.div`
2148
2074
  display: flex;
2149
2075
  flex-direction: column;
2150
2076
  border-top: 1px solid black;
2151
- `;m(H.Button)`
2077
+ `;m(R.Button)`
2152
2078
  display: flex;
2153
2079
  height: var(--size-800, 64px);
2154
2080
  padding: var(--spacing-200, 16px) var(--spacing-300, 24px);
@@ -2158,7 +2084,7 @@
2158
2084
 
2159
2085
  border-radius: var(--border-radius-025, 2px);
2160
2086
  background: var(--color-bg-quaternary, #2f2f2f);
2161
- `;const cr=m.span`
2087
+ `;const fr=m.span`
2162
2088
  color: var(--color-text-brand, #06c193);
2163
2089
  cursor: pointer;
2164
2090
 
@@ -2169,7 +2095,7 @@
2169
2095
  line-height: var(--typo-caption-lineHeight-medium, 18px);
2170
2096
  letter-spacing: var(--typo-caption-spacing-medium, 0.1px);
2171
2097
  cursor: pointer;
2172
- `,jo=m.span`
2098
+ `,Lo=m.span`
2173
2099
  color: var(--color-text-secondary, rgba(255, 255, 255, 0.75));
2174
2100
 
2175
2101
  font-family: var(--text-font-family-base, Geist);
@@ -2178,7 +2104,7 @@
2178
2104
  font-weight: var(--text-weight-regular, 400);
2179
2105
  line-height: var(--typo-caption-lineHeight-medium, 18px); /* 128.571% */
2180
2106
  letter-spacing: var(--typo-caption-spacing-medium, 0.1px);
2181
- `,ko=m.span`
2107
+ `,Do=m.span`
2182
2108
  color: var(--color-text-tertiary, rgba(255, 255, 255, 0.5));
2183
2109
 
2184
2110
  font-family: var(--text-font-family-base, Geist);
@@ -2187,7 +2113,7 @@
2187
2113
  font-weight: var(--text-weight-regular, 400);
2188
2114
  line-height: var(--typo-caption-lineHeight-small, 16px); /* 133.333% */
2189
2115
  letter-spacing: var(--typo-caption-spacing-small, 0.1px);
2190
- `,dr=m.div`
2116
+ `,gr=m.div`
2191
2117
  margin-bottom: 2.5rem;
2192
2118
  padding: 0 1.5rem;
2193
2119
  display: flex;
@@ -2275,7 +2201,7 @@
2275
2201
  letter-spacing: var(--typo-body-spacing-small, 0.00938rem);
2276
2202
  }
2277
2203
  }
2278
- `,pr=m.div`
2204
+ `,hr=m.div`
2279
2205
  display: flex;
2280
2206
  flex-direction: column;
2281
2207
  gap: 8px;
@@ -2337,7 +2263,7 @@
2337
2263
  }
2338
2264
  `;m.div`
2339
2265
  padding: 1.5rem;
2340
- `;const Lo=m.div`
2266
+ `;const $o=m.div`
2341
2267
  display: flex;
2342
2268
  align-items: center;
2343
2269
  justify-content: center;
@@ -2355,7 +2281,7 @@
2355
2281
  color: var(--color-text-inverse-primary, #131412) !important;
2356
2282
  }
2357
2283
  }
2358
- `;m(H.Input.Password)`
2284
+ `;m(R.Input.Password)`
2359
2285
  input[type='number'] {
2360
2286
  &::-webkit-outer-spin-button,
2361
2287
  &::-webkit-inner-spin-button {
@@ -2458,7 +2384,7 @@
2458
2384
  fill: var(--color-text-primary, #131412) !important;
2459
2385
  }
2460
2386
  }
2461
- `;const ur=({confirmationToken:n,backupCodeEndpoint:e,setBackupActivated:t,setVisible:r,id:o,setRefetchData:a})=>{const[s,l]=S.useState(),[d,c]=S.useState([]);async function u(){var p,h,f;try{const g=await e({confirmationToken:n,code:s,id:o});(p=g==null?void 0:g.data)!=null&&p.success&&(r(!1),a(w=>!w))}catch(g){const w=ve((f=(h=g==null?void 0:g.response)==null?void 0:h.data)==null?void 0:f.errors);c(w),console.log(g)}}return i.jsxs("div",{children:[i.jsx(ft,{children:i.jsxs(pr,{children:[te("EnterBackupCode"),i.jsx(Ve,{children:te("BackupCodesDesc")})]})}),i.jsxs(dr,{className:d.length>0?"verification-error":"",children:[i.jsx(Ve,{children:te("BackupCode")}),i.jsx(tr,{value:s,onChange:p=>l(p.target.value),placeholder:"xxxx-xxxx-xxxx"}),d.map(p=>i.jsxs("span",{children:[i.jsx(mt,{})," ",p.errors[0]]},p.name)),i.jsx(ko,{children:te("BackupCodeSpan")})]}),i.jsxs(lr,{children:[i.jsx(gt,{onClick:()=>{t(!1)},children:ae("Back")}),i.jsx(Ae,{onClick:u,children:i.jsxs("span",{className:"arrow-styled",children:[ae("Continue")," ",i.jsx(ke,{})]})})]})]})},Do=m.div`
2387
+ `;const mr=({confirmationToken:n,backupCodeEndpoint:e,setBackupActivated:t,setVisible:r,id:o,setRefetchData:a})=>{const[s,l]=S.useState(),[d,c]=S.useState([]);async function u(){var p,h,f;try{const g=await e({confirmationToken:n,code:s,id:o});(p=g==null?void 0:g.data)!=null&&p.success&&(r(!1),a(w=>!w))}catch(g){const w=ve((f=(h=g==null?void 0:g.response)==null?void 0:h.data)==null?void 0:f.errors);c(w),console.log(g)}}return i.jsxs("div",{children:[i.jsx(Ye,{children:i.jsxs(hr,{children:[te("EnterBackupCode"),i.jsx(Ie,{children:te("BackupCodesDesc")})]})}),i.jsxs(gr,{className:d.length>0?"verification-error":"",children:[i.jsx(Ie,{children:te("BackupCode")}),i.jsx(ht,{value:s,onChange:p=>l(p.target.value),placeholder:"xxxx-xxxx-xxxx"}),d.map(p=>i.jsxs("span",{children:[i.jsx(xt,{})," ",p.errors[0]]},p.name)),i.jsx(Do,{children:te("BackupCodeSpan")})]}),i.jsxs(ur,{children:[i.jsx(Ke,{onClick:()=>{t(!1)},children:ae("Back")}),i.jsx(ze,{onClick:u,children:i.jsxs("span",{className:"arrow-styled",children:[ae("Continue")," ",i.jsx(ke,{})]})})]})]})},Eo=m.div`
2462
2388
  position: fixed;
2463
2389
  top: 0;
2464
2390
  left: 0;
@@ -2469,14 +2395,14 @@
2469
2395
  justify-content: center;
2470
2396
  align-items: center;
2471
2397
  z-index: 1000;
2472
- `,$o=m.div`
2398
+ `,Oo=m.div`
2473
2399
  border-radius: var(--border-radius-025, 0.125rem);
2474
2400
  background: var(--color-bg-quaternary, #2f2f2f);
2475
2401
  min-width: 300px;
2476
2402
  max-width: 500px;
2477
2403
  position: relative;
2478
2404
  animation: fadeIn 0.3s ease;
2479
- `,Eo=document.getElementById("modal-root")||(()=>{const n=document.createElement("div");return n.id="modal-root",document.body.appendChild(n),n})();function Xe({isOpen:n,onClose:e,children:t}){return S.useEffect(()=>{const r=o=>{o.key==="Escape"&&e()};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e]),n?Lr.createPortal(i.jsx(Do,{onClick:e,children:i.jsx($o,{onClick:r=>r.stopPropagation(),children:t})}),Eo):null}const Oo={1:"Enable2FaFirst",2:"ToViewOtpContactInfoDesc",3:"ToViewTotpContactInfoDesc",4:"ToViewBackupCodeContactInfoDesc"},fr=({isVisible:n,setVisible:e,code:t,mfaType:r,id:o,isBlocked:a,onBlockStateClose:s})=>{const{confirmContactInfo:l,confirmContactInfoBackup:d}=we(),{setUser:c}=Se(),[u,p]=S.useState(""),[h,f]=S.useState([]),[g,w]=S.useState(!1);function O(T){p(T)}async function A(){const T=l;if(T)try{f([]);const V=await T(t,u,o);c(V.data.value),L()}catch(V){if(console.log(V),V.status===400){const G=V.response.data,_=ve(G.errors);f(_)}}}async function j(T){const V=d;if(V)try{f([]);const G=await V(T);c(G.data.value)}catch(G){if(console.log(G),G.status===400){const _=G.response.data,Y=ve(_.errors);f(Y)}}}function L(){p(""),e(!1),f([])}return a?i.jsx(Xe,{isOpen:a,onClose:s,children:i.jsxs(bo,{children:[i.jsxs(vo,{children:[i.jsxs(wo,{children:[i.jsx("span",{children:B("ContactInformationBlocked")}),i.jsx("span",{onClick:s,children:i.jsx(pt,{})})]}),i.jsx(So,{children:B("ContactInformationBlockedDesc")})]}),i.jsxs(Co,{children:[B("TryAgain"),i.jsx(ke,{})]})]})}):i.jsx(Xe,{isOpen:n,onClose:L,children:g?i.jsx(ur,{setBackupActivated:w,backupCodeEndpoint:j,confirmationToken:t,id:o,setVisible:e}):i.jsxs(ir,{children:[i.jsx("h2",{children:te("EnterVerificationCode")}),i.jsx("p",{children:r!==void 0?B(Oo[r]):""}),r!==1&&i.jsxs(i.Fragment,{children:[i.jsxs(xo,{className:h.length>0?"verification-error":"",children:[i.jsx(H.Input.OTP,{value:u,onChange:O}),i.jsxs(yo,{children:[te("DidnReceiveCode")," ",i.jsx(cr,{onClick:()=>w(!0),children:te("EnterBackupCode")})]}),h.map(T=>i.jsxs("span",{children:[i.jsx(mt,{}),T.errors[0]]},T.name))]}),i.jsxs("button",{onClick:A,disabled:u.length!==6,children:[ae("ShowContactInformation"),i.jsx(ke,{})]})]})]})})},gr=()=>{const{enableContactInfo:n,disableContactInfo:e}=we(),{setUser:t}=Se(),[r,o]=S.useState(!1),[a,s]=S.useState(null),[l,d]=S.useState(!1),c=async()=>{var h,f,g,w,O,A,j;if(n)try{d(!1);const L=await n();s({token:(f=(h=L.data)==null?void 0:h.value)==null?void 0:f.token,id:(w=(g=L.data)==null?void 0:g.value)==null?void 0:w.id,mfaType:(A=(O=L.data)==null?void 0:O.value)==null?void 0:A.mfaType}),o(!0)}catch(L){const T=(j=L.response)==null?void 0:j.data,V=T==null?void 0:T.errors;(V&&Array.isArray(V[""])&&V[""][0]==="TooManyAttempts"||V[""][0]==="IsNotAllowed")&&d(!0)}};async function u(){if(!e)return;const h=await e();t(h.data.value)}const p=()=>{d(!1),o(!1)};return{isContactInfoModalVisible:r,setIsContactInfoModalVisible:o,isBlocked:l,setIsBlocked:d,onBlockStateClose:p,handleEnableContactInfo:c,handleDisableContactInfo:u,ContactInfoModalProps:{isVisible:r,setVisible:o,code:a==null?void 0:a.token,mfaType:a==null?void 0:a.mfaType,id:a==null?void 0:a.id,isBlocked:l,onBlockStateClose:p}}},To=({close:n})=>{var A;const{user:e}=Se(),t=D(j=>j.columns),r=D(j=>j.groupByArr),o=D(j=>j.hideItems),a=D(j=>j.activeTableView),s=D(j=>j.setActiveTableView),l=D(j=>j.setGroupByArr),d=D(j=>j.setHideItems),c=D(j=>j.resetStore),{handleEnableContactInfo:u,handleDisableContactInfo:p,ContactInfoModalProps:h}=gr();function f(j){const L=t.find(T=>T.dataIndex==j.value);l([L])}function g(j,L){d({...o,[j.dataIndex]:!!L})}function w(j,L){const T=new Date(j),V=new Date(L),G=Math.abs(V.getTime()-T.getTime()),_=Math.floor(G/(1e3*60))%60,Y=Math.floor(G/(1e3*60*60))%24,I=[];return Y>0&&I.push(`${Y}h`),_>0&&I.push(`${_}m`),I.join(" ")}function O(){c(),n()}return i.jsxs(ho,{children:[i.jsxs("header",{children:[i.jsx("span",{children:B("ViewOptions")}),i.jsx("button",{onClick:n,children:i.jsx(kt,{})})]}),i.jsxs("div",{className:"setting-sidebar-content",children:[i.jsxs("ul",{className:"table-view-list",children:[i.jsxs("li",{className:a==fe.TABLE?"active":"",onClick:()=>s(fe.TABLE),children:[i.jsx(Lt,{}),i.jsx("span",{children:B("Table")})]}),i.jsxs("li",{className:a==fe.LIST?"active":"",onClick:()=>s(fe.LIST),children:[i.jsx(Ne,{}),i.jsx("span",{children:B("List")})]})]}),i.jsx("ul",{className:"grouping-list",children:i.jsxs("li",{children:[i.jsx("span",{children:B("Grouping")}),i.jsx(H.Select,{className:"teeest",showSearch:!0,options:t.map(j=>({value:j.dataIndex,label:j.title})),labelInValue:!0,placeholder:i.jsxs(mo,{children:[i.jsx(Ne,{}),B("NoGrouping")]}),value:((A=r[0])==null?void 0:A.dataIndex)||null,onChange:f})]})}),i.jsxs("div",{className:"properties-list",children:[i.jsx("span",{children:B("ShowProperties")}),i.jsx("ul",{children:t.map(j=>i.jsx("li",{className:o[j.dataIndex]===!0?"hide":"",onClick:()=>g(j,o[j.dataIndex]!==!0),children:j.title},j.dataIndex))})]})]}),i.jsxs("footer",{children:[e!=null&&e.sensitiveDataExpiration&&new Date(e==null?void 0:e.sensitiveDataExpiration)>new Date?i.jsxs("button",{onClick:p,children:[B("HideContactInfo")," •"," ",w(new Date(e==null?void 0:e.sensitiveDataExpiration),new Date),i.jsx(kt,{})]}):i.jsxs("button",{onClick:u,children:[ae("ShowContactInformation")," ",i.jsx(Lt,{})]}),i.jsxs("button",{onClick:O,children:[ae("ResetAllOptions"),i.jsx(er,{})]})]}),i.jsx(fr,{...h})]})},Io=({columns:n,getData:e,update:t,hasCreateBtn:r,GridPageTopLeftComponent:o,contentAfterPageHeader:a,onRowClick:s,checkedValue:l,rowKey:d,pagination:c,CustomFilters:u,initialFilterValues:p,tableAdditionalFields:h,createIsModal:f,editButton:g,noPagination:w,noDataProps:O,exportButton:A,hasSelect:j,selectProps:L,TableComponent:T,tableProps:V={},noNeedSidebarResponsiveButton:G,loadedData:_=()=>{}})=>{var Z,ce,ie;const{user:Y}=Se(),I=D(K=>K.filters),$=D(K=>K.filterItems),v=D(K=>K.sortItems),F=D(K=>K.hideItems),M=D(K=>K.activeTableView),k=D(K=>K.setColumns),C=D(K=>K.setHasCreateBtn),y=D(K=>K.setHasSelect),x=D(K=>K.setCheckedValue),{response:b,loading:E}=ot(()=>e({...I,...p}),[I,Y,t]);xn(),S.useEffect(()=>{b!=null&&b.data&&_(b.data)},[b,_]);const[z,N]=S.useState(!1),U=S.useRef(null),W=qt(U),q=S.useMemo(()=>n.filter(de=>F[de.dataIndex]!==!0),[n,F]);return S.useEffect(()=>{C(r||!1),y(j||!1)},[j]),S.useEffect(()=>{k(n)},[n]),S.useEffect(()=>{x(l)},[l]),i.jsxs(bn,{children:[i.jsxs(wn,{ref:U,children:[i.jsx(Mn,{noNeedSidebarResponsiveButton:G,hasSelect:j,selectProps:L,exportButton:A,setisSettingPopupVisible:N,CustomFilters:u,tableAdditionalFields:h,createIsModal:f,GridPageTopLeftComponent:o}),a,($.length>0||v.length>0)&&i.jsx(Kn,{})]}),i.jsx($n,{height:`calc(100vh - ${`${W}px`})`,children:T?i.jsx(T,{dataSource:((Z=b==null?void 0:b.data)==null?void 0:Z.items)||[],...V,rowKey:d||"id",columns:[{title:"",dataIndex:""},...q],loading:E,pagination:{current:I.Page,pageSize:I.PageSize,items:c==null?void 0:c.items}}):i.jsx(go,{noPagination:w,editButton:g,createIsModal:f,rowKey:d||"id",columns:[{title:"",dataIndex:""},...q],dataSource:((ce=b==null?void 0:b.data)==null?void 0:ce.items)||[],loading:E,pagination:{current:I.Page,pageSize:I.PageSize,items:c==null?void 0:c.items},activeTableView:M,totalItemCount:((ie=b==null?void 0:b.data)==null?void 0:ie.totalItemCount)||0,onRowClick:s,noDataProps:O||null})}),z&&i.jsx(To,{close:()=>N(!1)})]})},zo=n=>i.jsx(mn,{children:i.jsx(Io,{...n})}),Mo=()=>{const n=ge(w=>w.isOpen),e=ge(w=>w.options),t=ge(w=>w.close),r=ne.useLocation();if(S.useEffect(()=>{n&&t()},[r.pathname]),!e||!n)return null;const{title:o,component:a,componentProps:s,popupOptions:l,footerOptions:d,hideFooter:c,showCloseButton:u,onOk:p,onCancel:h}=e,f=()=>{h==null||h()},g=()=>{p==null||p()};return i.jsxs(ut,{centered:!0,title:o||u?i.jsxs(Rn,{children:[i.jsx("span",{children:o}),u&&i.jsx(Fn,{onClick:t,children:i.jsx(pt,{})})]}):void 0,...l,children:[a&&i.jsx(a,{...s}),!c&&i.jsxs(Vn,{children:[i.jsx(gt,{onClick:f,children:d==null?void 0:d.cancelText}),i.jsx(An,{onClick:g,role:"button",tabIndex:0,onKeyDown:w=>{(w.key==="Enter"||w.key===" ")&&g()},children:d==null?void 0:d.okText})]})]})},Po=({displayAddRuleModal:n,onClose:e,title:t,hideFooter:r=!1,children:o})=>i.jsx(ut,{open:n,onCancel:e,closeIcon:!1,title:t,footer:r?null:void 0,destroyOnClose:!0,centered:!0,children:o}),Ho=m.div`
2405
+ `,To=document.getElementById("modal-root")||(()=>{const n=document.createElement("div");return n.id="modal-root",document.body.appendChild(n),n})();function tt({isOpen:n,onClose:e,children:t}){return S.useEffect(()=>{const r=o=>{o.key==="Escape"&&e()};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e]),n?Tr.createPortal(i.jsx(Eo,{onClick:e,children:i.jsx(Oo,{onClick:r=>r.stopPropagation(),children:t})}),To):null}const Io={1:"Enable2FaFirst",2:"ToViewOtpContactInfoDesc",3:"ToViewTotpContactInfoDesc",4:"ToViewBackupCodeContactInfoDesc"},xr=({isVisible:n,setVisible:e,code:t,mfaType:r,id:o,isBlocked:a,onBlockStateClose:s})=>{const{confirmContactInfo:l,confirmContactInfoBackup:d}=we(),{setUser:c}=Se(),[u,p]=S.useState(""),[h,f]=S.useState([]),[g,w]=S.useState(!1);function O(T){p(T)}async function A(){const T=l;if(T)try{f([]);const V=await T(t,u,o);c(V.data.value),L()}catch(V){if(console.log(V),V.status===400){const G=V.response.data,_=ve(G.errors);f(_)}}}async function j(T){const V=d;if(V)try{f([]);const G=await V(T);c(G.data.value)}catch(G){if(console.log(G),G.status===400){const _=G.response.data,Y=ve(_.errors);f(Y)}}}function L(){p(""),e(!1),f([])}return a?i.jsx(tt,{isOpen:a,onClose:s,children:i.jsxs(wo,{children:[i.jsxs(So,{children:[i.jsxs(Co,{children:[i.jsx("span",{children:B("ContactInformationBlocked")}),i.jsx("span",{onClick:s,children:i.jsx(gt,{})})]}),i.jsx(jo,{children:B("ContactInformationBlockedDesc")})]}),i.jsxs(ko,{children:[B("TryAgain"),i.jsx(ke,{})]})]})}):i.jsx(tt,{isOpen:n,onClose:L,children:g?i.jsx(mr,{setBackupActivated:w,backupCodeEndpoint:j,confirmationToken:t,id:o,setVisible:e}):i.jsxs(dr,{children:[i.jsx("h2",{children:te("EnterVerificationCode")}),i.jsx("p",{children:r!==void 0?B(Io[r]):""}),r!==1&&i.jsxs(i.Fragment,{children:[i.jsxs(bo,{className:h.length>0?"verification-error":"",children:[i.jsx(R.Input.OTP,{value:u,onChange:O}),i.jsxs(vo,{children:[te("DidnReceiveCode")," ",i.jsx(fr,{onClick:()=>w(!0),children:te("EnterBackupCode")})]}),h.map(T=>i.jsxs("span",{children:[i.jsx(xt,{}),T.errors[0]]},T.name))]}),i.jsxs("button",{onClick:A,disabled:u.length!==6,children:[ae("ShowContactInformation"),i.jsx(ke,{})]})]})]})})},yr=()=>{const{enableContactInfo:n,disableContactInfo:e}=we(),{setUser:t}=Se(),[r,o]=S.useState(!1),[a,s]=S.useState(null),[l,d]=S.useState(!1),c=async()=>{var h,f,g,w,O,A,j;if(n)try{d(!1);const L=await n();s({token:(f=(h=L.data)==null?void 0:h.value)==null?void 0:f.token,id:(w=(g=L.data)==null?void 0:g.value)==null?void 0:w.id,mfaType:(A=(O=L.data)==null?void 0:O.value)==null?void 0:A.mfaType}),o(!0)}catch(L){const T=(j=L.response)==null?void 0:j.data,V=T==null?void 0:T.errors;(V&&Array.isArray(V[""])&&V[""][0]==="TooManyAttempts"||V[""][0]==="IsNotAllowed")&&d(!0)}};async function u(){if(!e)return;const h=await e();t(h.data.value)}const p=()=>{d(!1),o(!1)};return{isContactInfoModalVisible:r,setIsContactInfoModalVisible:o,isBlocked:l,setIsBlocked:d,onBlockStateClose:p,handleEnableContactInfo:c,handleDisableContactInfo:u,ContactInfoModalProps:{isVisible:r,setVisible:o,code:a==null?void 0:a.token,mfaType:a==null?void 0:a.mfaType,id:a==null?void 0:a.id,isBlocked:l,onBlockStateClose:p}}},zo=({close:n})=>{var A;const{user:e}=Se(),t=D(j=>j.columns),r=D(j=>j.groupByArr),o=D(j=>j.hideItems),a=D(j=>j.activeTableView),s=D(j=>j.setActiveTableView),l=D(j=>j.setGroupByArr),d=D(j=>j.setHideItems),c=D(j=>j.resetStore),{handleEnableContactInfo:u,handleDisableContactInfo:p,ContactInfoModalProps:h}=yr();function f(j){const L=t.find(T=>T.dataIndex==j.value);l([L])}function g(j,L){d({...o,[j.dataIndex]:!!L})}function w(j,L){const T=new Date(j),V=new Date(L),G=Math.abs(V.getTime()-T.getTime()),_=Math.floor(G/(1e3*60))%60,Y=Math.floor(G/(1e3*60*60))%24,I=[];return Y>0&&I.push(`${Y}h`),_>0&&I.push(`${_}m`),I.join(" ")}function O(){c(),n()}return i.jsxs(xo,{children:[i.jsxs("header",{children:[i.jsx("span",{children:B("ViewOptions")}),i.jsx("button",{onClick:n,children:i.jsx(Lt,{})})]}),i.jsxs("div",{className:"setting-sidebar-content",children:[i.jsxs("ul",{className:"table-view-list",children:[i.jsxs("li",{className:a==fe.TABLE?"active":"",onClick:()=>s(fe.TABLE),children:[i.jsx(Dt,{}),i.jsx("span",{children:B("Table")})]}),i.jsxs("li",{className:a==fe.LIST?"active":"",onClick:()=>s(fe.LIST),children:[i.jsx(Ae,{}),i.jsx("span",{children:B("List")})]})]}),i.jsx("ul",{className:"grouping-list",children:i.jsxs("li",{children:[i.jsx("span",{children:B("Grouping")}),i.jsx(R.Select,{className:"teeest",showSearch:!0,options:t.map(j=>({value:j.dataIndex,label:j.title})),labelInValue:!0,placeholder:i.jsxs(yo,{children:[i.jsx(Ae,{}),B("NoGrouping")]}),value:((A=r[0])==null?void 0:A.dataIndex)||null,onChange:f})]})}),i.jsxs("div",{className:"properties-list",children:[i.jsx("span",{children:B("ShowProperties")}),i.jsx("ul",{children:t.map(j=>i.jsx("li",{className:o[j.dataIndex]===!0?"hide":"",onClick:()=>g(j,o[j.dataIndex]!==!0),children:j.title},j.dataIndex))})]})]}),i.jsxs("footer",{children:[e!=null&&e.sensitiveDataExpiration&&new Date(e==null?void 0:e.sensitiveDataExpiration)>new Date?i.jsxs("button",{onClick:p,children:[B("HideContactInfo")," •"," ",w(new Date(e==null?void 0:e.sensitiveDataExpiration),new Date),i.jsx(Lt,{})]}):i.jsxs("button",{onClick:u,children:[ae("ShowContactInformation")," ",i.jsx(Dt,{})]}),i.jsxs("button",{onClick:O,children:[ae("ResetAllOptions"),i.jsx(tr,{})]})]}),i.jsx(xr,{...h})]})},Mo=({columns:n,getData:e,update:t,hasCreateBtn:r,GridPageTopLeftComponent:o,contentAfterPageHeader:a,onRowClick:s,checkedValue:l,rowKey:d,pagination:c,CustomFilters:u,initialFilterValues:p,tableAdditionalFields:h,createIsModal:f,editButton:g,noPagination:w,noDataProps:O,exportButton:A,hasSelect:j,selectProps:L,TableComponent:T,tableProps:V={},noNeedSidebarResponsiveButton:G,loadedData:_=()=>{}})=>{var Z,ce,ie;const{user:Y}=Se(),I=D(K=>K.filters),$=D(K=>K.filterItems),v=D(K=>K.sortItems),F=D(K=>K.hideItems),M=D(K=>K.activeTableView),k=D(K=>K.setColumns),C=D(K=>K.setHasCreateBtn),y=D(K=>K.setHasSelect),x=D(K=>K.setCheckedValue),{response:b,loading:E}=st(()=>e({...I,...p}),[I,Y,t]);Sn(),S.useEffect(()=>{b!=null&&b.data&&_(b.data)},[b,_]);const[z,N]=S.useState(!1),U=S.useRef(null),W=Zt(U),q=S.useMemo(()=>n.filter(de=>F[de.dataIndex]!==!0),[n,F]);return S.useEffect(()=>{C(r||!1),y(j||!1)},[j]),S.useEffect(()=>{k(n)},[n]),S.useEffect(()=>{x(l)},[l]),i.jsxs(jn,{children:[i.jsxs(Ln,{ref:U,children:[i.jsx(Nn,{noNeedSidebarResponsiveButton:G,hasSelect:j,selectProps:L,exportButton:A,setisSettingPopupVisible:N,CustomFilters:u,tableAdditionalFields:h,createIsModal:f,GridPageTopLeftComponent:o}),a,($.length>0||v.length>0)&&i.jsx(Zn,{})]}),i.jsx(zn,{height:`calc(100vh - ${`${W}px`})`,children:T?i.jsx(T,{dataSource:((Z=b==null?void 0:b.data)==null?void 0:Z.items)||[],...V,rowKey:d||"id",columns:[{title:"",dataIndex:""},...q],loading:E,pagination:{current:I.Page,pageSize:I.PageSize,items:c==null?void 0:c.items}}):i.jsx(mo,{noPagination:w,editButton:g,createIsModal:f,rowKey:d||"id",columns:[{title:"",dataIndex:""},...q],dataSource:((ce=b==null?void 0:b.data)==null?void 0:ce.items)||[],loading:E,pagination:{current:I.Page,pageSize:I.PageSize,items:c==null?void 0:c.items},activeTableView:M,totalItemCount:((ie=b==null?void 0:b.data)==null?void 0:ie.totalItemCount)||0,onRowClick:s,noDataProps:O||null})}),z&&i.jsx(zo,{close:()=>N(!1)})]})},Po=n=>i.jsx(wn,{children:i.jsx(Mo,{...n})}),Ho=()=>{const n=ge(w=>w.isOpen),e=ge(w=>w.options),t=ge(w=>w.close),r=ne.useLocation();if(S.useEffect(()=>{n&&t()},[r.pathname]),!e||!n)return null;const{title:o,component:a,componentProps:s,popupOptions:l,footerOptions:d,hideFooter:c,showCloseButton:u,onOk:p,onCancel:h}=e,f=()=>{h==null||h()},g=()=>{p==null||p()};return i.jsxs(We,{centered:!0,title:o||u?i.jsxs(rr,{children:[i.jsx("span",{children:o}),u&&i.jsx(nr,{onClick:t,children:i.jsx(gt,{})})]}):void 0,...l,children:[a&&i.jsx(a,{...s}),!c&&i.jsxs(or,{children:[i.jsx(Ke,{onClick:f,children:d==null?void 0:d.cancelText}),i.jsx(ar,{onClick:g,role:"button",tabIndex:0,onKeyDown:w=>{(w.key==="Enter"||w.key===" ")&&g()},children:d==null?void 0:d.okText})]})]})},Ro=({displayAddRuleModal:n,onClose:e,title:t,hideFooter:r=!1,children:o})=>i.jsx(We,{open:n,onCancel:e,closeIcon:!1,title:t,footer:r?null:void 0,destroyOnClose:!0,centered:!0,children:o}),Fo=m.div`
2480
2406
  height: var(--size-800, 4rem);
2481
2407
  display: flex;
2482
2408
  justify-content: space-between;
@@ -2513,16 +2439,16 @@
2513
2439
  display: flex;
2514
2440
  gap: 0.12rem;
2515
2441
  }
2516
- `,Ro=m.div`
2442
+ `,No=m.div`
2517
2443
  cursor: pointer;
2518
- `,Fo=m(_t)`
2444
+ `,Vo=m(Wt)`
2519
2445
  width: 10.943px !important;
2520
2446
  height: 8.552px !important;
2521
2447
 
2522
2448
  path {
2523
2449
  fill: var(--color-icon-primary, #131412) !important;
2524
2450
  }
2525
- `,hr=m(H.Breadcrumb)`
2451
+ `,br=m(R.Breadcrumb)`
2526
2452
  font-family: var(--text-font-family-base, Geist);
2527
2453
  font-size: var(--typo-caption-size-medium, 0.875rem);
2528
2454
  font-weight: var(--text-weight-regular, 400);
@@ -2543,20 +2469,20 @@
2543
2469
  letter-spacing: var(--typo-caption-spacing-medium, 0.00625rem);
2544
2470
  color: var(--color-text-secondary, rgba(19, 20, 18, 0.75));
2545
2471
  }
2546
- `,No=({breadcrumbItems:n,logo:e,button:t,className:r,backButton:o=i.jsx(Fo,{})})=>{const a=ne.useNavigate();return i.jsxs(Ho,{className:r||"",children:[i.jsxs("div",{className:"page-starter",children:[e?i.jsx("div",{className:"icon",children:e}):i.jsx(Ro,{className:"icon",onClick:()=>a(-1),children:o}),i.jsx(hr,{items:n})]}),i.jsx("div",{children:t&&t})]})};var Qe=(n=>(n[n.None=1]="None",n[n.OTP=2]="OTP",n[n.TOTP=3]="TOTP",n[n.BackupCode=4]="BackupCode",n))(Qe||{});const Vo={1:"",2:"OtpDesc",3:"TotpDesc",4:"TotpDesc"},Ao=({confirmationToken:n,updatedResponse:e,mfaType:t=1,id:r,setRefetchData:o,setVisible:a,visible:s})=>{const{confirmTwoFactor:l,resendOTP:d,confirmTwoFactorBackupCode:c}=we(),[u,p]=S.useState(""),[h,f]=S.useState(!0),[g,w]=S.useState(60),{close:O}=ge(),[A,j]=S.useState([]),[L,T]=S.useState(!1);async function V(){var $,v,F;const I=l;if(!(!u||!I))try{const M=await I({confirmationToken:n,code:u,id:r});($=M==null?void 0:M.data)!=null&&$.success&&(a(!1),o&&o(k=>!k),O())}catch(M){const k=ve((F=(v=M==null?void 0:M.response)==null?void 0:v.data)==null?void 0:F.errors);j(k),console.log("Error in Save OTP",M)}}async function G(){const I=d;if(I)try{const $=await I(n,r);$.data.success&&(e($),f(!0),w(60))}catch($){console.log("Error in OTP resend",$)}}function _(){a(!1)}function Y(I){p(I)}return S.useEffect(()=>{if(!h)return;const I=setInterval(()=>{w($=>$<=1?(clearInterval(I),f(!1),0):$-1)},1e3);return()=>clearInterval(I)},[h]),i.jsx(ut,{open:s,onCancel:_,footer:[null],children:n?i.jsx(i.Fragment,{children:L?i.jsx(i.Fragment,{children:i.jsx(ur,{setBackupActivated:T,backupCodeEndpoint:c,setVisible:a,id:r,setRefetchData:o,confirmationToken:n})}):i.jsxs(i.Fragment,{children:[i.jsx(ft,{children:i.jsxs(pr,{children:[te("EnterVerificationCode"),i.jsx(Ve,{children:te(Vo[t])})]})}),i.jsxs(dr,{className:A.length>0?"verification-error":"",children:[i.jsx(H.Input.OTP,{value:u,onChange:Y}),A.map(I=>i.jsxs("span",{children:[i.jsx(mt,{}),I.errors[0]]},I.name)),i.jsxs(jo,{children:[te("DidnReceiveCode")," ",i.jsx(cr,{onClick:()=>T(!0),children:te("EnterBackupCode")})]})]}),i.jsxs(lr,{children:[t!==Qe.TOTP&&i.jsx(gt,{disabled:h,onClick:G,children:h?`${te("ResendAvailable")} ${g} ${B("Second")}`:`${te("Resend")}`}),i.jsxs(Ae,{onClick:V,disabled:(u==null?void 0:u.length)!==6&&t!==Qe.TOTP,children:[i.jsxs("span",{children:[" ",ae("Continue")]}),i.jsx(ke,{})]})]})]})}):i.jsx(Lo,{children:i.jsx(H.Spin,{})})})},Bo=m.div`
2472
+ `,Ao=({breadcrumbItems:n,logo:e,button:t,className:r,backButton:o=i.jsx(Vo,{})})=>{const a=ne.useNavigate();return i.jsxs(Fo,{className:r||"",children:[i.jsxs("div",{className:"page-starter",children:[e?i.jsx("div",{className:"icon",children:e}):i.jsx(No,{className:"icon",onClick:()=>a(-1),children:o}),i.jsx(br,{items:n})]}),i.jsx("div",{children:t&&t})]})};var rt=(n=>(n[n.None=1]="None",n[n.OTP=2]="OTP",n[n.TOTP=3]="TOTP",n[n.BackupCode=4]="BackupCode",n))(rt||{});const Bo={1:"",2:"OtpDesc",3:"TotpDesc",4:"TotpDesc"},Go=({confirmationToken:n,updatedResponse:e,mfaType:t=1,id:r,setRefetchData:o,setVisible:a,visible:s})=>{const{confirmTwoFactor:l,resendOTP:d,confirmTwoFactorBackupCode:c}=we(),[u,p]=S.useState(""),[h,f]=S.useState(!0),[g,w]=S.useState(60),{close:O}=ge(),[A,j]=S.useState([]),[L,T]=S.useState(!1);async function V(){var $,v,F;const I=l;if(!(!u||!I))try{const M=await I({confirmationToken:n,code:u,id:r});($=M==null?void 0:M.data)!=null&&$.success&&(a(!1),o&&o(k=>!k),O())}catch(M){const k=ve((F=(v=M==null?void 0:M.response)==null?void 0:v.data)==null?void 0:F.errors);j(k),console.log("Error in Save OTP",M)}}async function G(){const I=d;if(I)try{const $=await I(n,r);$.data.success&&(e($),f(!0),w(60))}catch($){console.log("Error in OTP resend",$)}}function _(){a(!1)}function Y(I){p(I)}return S.useEffect(()=>{if(!h)return;const I=setInterval(()=>{w($=>$<=1?(clearInterval(I),f(!1),0):$-1)},1e3);return()=>clearInterval(I)},[h]),i.jsx(We,{open:s,onCancel:_,footer:[null],children:n?i.jsx(i.Fragment,{children:L?i.jsx(i.Fragment,{children:i.jsx(mr,{setBackupActivated:T,backupCodeEndpoint:c,setVisible:a,id:r,setRefetchData:o,confirmationToken:n})}):i.jsxs(i.Fragment,{children:[i.jsx(Ye,{children:i.jsxs(hr,{children:[te("EnterVerificationCode"),i.jsx(Ie,{children:te(Bo[t])})]})}),i.jsxs(gr,{className:A.length>0?"verification-error":"",children:[i.jsx(R.Input.OTP,{value:u,onChange:Y}),A.map(I=>i.jsxs("span",{children:[i.jsx(xt,{}),I.errors[0]]},I.name)),i.jsxs(Lo,{children:[te("DidnReceiveCode")," ",i.jsx(fr,{onClick:()=>T(!0),children:te("EnterBackupCode")})]})]}),i.jsxs(ur,{children:[t!==rt.TOTP&&i.jsx(Ke,{disabled:h,onClick:G,children:h?`${te("ResendAvailable")} ${g} ${B("Second")}`:`${te("Resend")}`}),i.jsxs(ze,{onClick:V,disabled:(u==null?void 0:u.length)!==6&&t!==rt.TOTP,children:[i.jsxs("span",{children:[" ",ae("Continue")]}),i.jsx(ke,{})]})]})]})}):i.jsx($o,{children:i.jsx(R.Spin,{})})})},Uo=m.div`
2547
2473
  width: 100%;
2548
2474
  height: 100%;
2549
- `,Go=({option:n})=>(S.useEffect(()=>{const e=document.getElementById("my-chart"),t=Tr.init(e);t.setOption(n);const r=()=>t.resize();return window.addEventListener("resize",r,{passive:!0,capture:!0}),()=>{window.removeEventListener("resize",r),t.dispose()}},[n]),i.jsx(Bo,{id:"my-chart"}));m.div`
2475
+ `,_o=({option:n})=>(S.useEffect(()=>{const e=document.getElementById("my-chart"),t=Hr.init(e);t.setOption(n);const r=()=>t.resize();return window.addEventListener("resize",r,{passive:!0,capture:!0}),()=>{window.removeEventListener("resize",r),t.dispose()}},[n]),i.jsx(Uo,{id:"my-chart"}));m.div`
2550
2476
  display: flex;
2551
2477
  justify-content: center;
2552
2478
  align-items: center;
2553
2479
  height: 100vh;
2554
2480
  background-color: ${n=>n.backgroundcolor};
2555
- `;const Uo=m(H.Spin)`
2481
+ `;const Wo=m(R.Spin)`
2556
2482
  .ant-spin-dot-item {
2557
2483
  background-color: ${n=>n.backgroundcolor};
2558
2484
  }
2559
- `,_o=({backgroundcolor:n})=>i.jsx("div",{children:i.jsx(Uo,{size:"large",backgroundcolor:n})}),Wo=m.div`
2485
+ `,Yo=({backgroundcolor:n})=>i.jsx("div",{children:i.jsx(Wo,{size:"large",backgroundcolor:n})}),Ko=m.div`
2560
2486
  position: absolute;
2561
2487
  left: 0;
2562
2488
  top: 0;
@@ -2591,7 +2517,7 @@
2591
2517
  font-size: 1.125rem;
2592
2518
  max-width: 25rem;
2593
2519
  }
2594
- `,Yo=m.keyframes`
2520
+ `,qo=m.keyframes`
2595
2521
  0% {
2596
2522
  opacity: 90%;
2597
2523
  }
@@ -2601,21 +2527,21 @@
2601
2527
  100% {
2602
2528
  opacity: 90%;
2603
2529
  }
2604
- `,ze=m.div`
2530
+ `,Pe=m.div`
2605
2531
  background: #282828; /* Dark base color */
2606
2532
  border-radius: 4px;
2607
2533
  background-size: 1000px 100%;
2608
- animation: ${Yo} 1.5s infinite linear;
2534
+ animation: ${qo} 1.5s infinite linear;
2609
2535
  background: var(--color-interaction-press-primary, rgba(20, 20, 20, 0.1));
2610
- `,Ko=m(ze)`
2536
+ `,Zo=m(Pe)`
2611
2537
  width: 70%; /* Mimics the main title area */
2612
2538
  height: 20px;
2613
2539
  margin-bottom: 10px;
2614
- `,pe=m(ze)`
2540
+ `,pe=m(Pe)`
2615
2541
  width: ${n=>n.width};
2616
2542
  height: ${n=>n.height};
2617
2543
  margin-bottom: ${n=>n.marginbottom};
2618
- `,Be=m(ze)`
2544
+ `,Be=m(Pe)`
2619
2545
  flex-grow: 1;
2620
2546
  height: 130px;
2621
2547
  margin: 0 1px;
@@ -2625,7 +2551,7 @@
2625
2551
  flex-direction: column;
2626
2552
  justify-content: space-between;
2627
2553
  animation: unset;
2628
- `,Ye=m.div`
2554
+ `,Ze=m.div`
2629
2555
  display: flex;
2630
2556
  margin-bottom: 2px;
2631
2557
  justify-content: space-between;
@@ -2636,13 +2562,13 @@
2636
2562
  ${Be}:last-child {
2637
2563
  margin-right: 0;
2638
2564
  }
2639
- `,qo=m.div`
2565
+ `,Jo=m.div`
2640
2566
  padding: 20px;
2641
2567
  overflow-y: hidden;
2642
2568
  height: 100vh;
2643
2569
  position: relative;
2644
2570
  background: var(--color-bg-primary, #fff);
2645
- `,Zo=m.div`
2571
+ `,Xo=m.div`
2646
2572
  display: flex;
2647
2573
  width: fit-content;
2648
2574
  gap: 2rem;
@@ -2650,15 +2576,15 @@
2650
2576
  padding: 0.5rem;
2651
2577
  margin-top: 3rem;
2652
2578
  margin-bottom: 1.5rem;
2653
- `,Jo=m(ze)`
2579
+ `,Qo=m(Pe)`
2654
2580
  width: 4rem;
2655
2581
  height: 1rem;
2656
2582
  border-radius: 5px;
2657
- `,Dt=m(ze)`
2583
+ `,$t=m(Pe)`
2658
2584
  width: ${n=>n.width||"100%"};
2659
2585
  height: 20px;
2660
2586
  margin-bottom: 8px;
2661
- `,Xo=m.div`
2587
+ `,ea=m.div`
2662
2588
  border-radius: 2px;
2663
2589
  background: var(--color-bg-secondary, #232323);
2664
2590
  height: 40rem;
@@ -2666,7 +2592,7 @@
2666
2592
  flex-direction: column;
2667
2593
  padding: 1rem;
2668
2594
  margin-bottom: 2px;
2669
- `,$t=()=>i.jsxs(i.Fragment,{children:[i.jsx(Dt,{width:"80%"}),i.jsx(Dt,{width:"60%"})]}),Qo=()=>i.jsxs(qo,{children:[i.jsx(Wo,{children:i.jsxs("div",{children:[i.jsx("h2",{children:yt("ComingSoon")}),i.jsx("p",{children:yt("ComingSoonDesc")})]})}),i.jsx(Ko,{}),i.jsx(pe,{}),i.jsx(Zo,{children:[...Array(7)].map((n,e)=>i.jsx(Jo,{},e))}),i.jsx(Ye,{children:[...Array(5)].map((n,e)=>i.jsx(Be,{children:i.jsx($t,{})},e))}),i.jsxs(Xo,{children:[i.jsx(pe,{width:"20%",height:"18px",marginbottom:"10px"}),i.jsx(pe,{width:"20%",height:"18px",marginbottom:"20px"}),i.jsxs(Ye,{children:[i.jsx(pe,{width:"12%",height:"18px",marginbottom:"10"}),i.jsx(pe,{width:"12%",height:"18px",marginbottom:"10"}),i.jsx(pe,{width:"12%",height:"18px",marginbottom:"10"}),i.jsx(pe,{width:"12%",height:"18px",marginbottom:"10px"}),i.jsx(pe,{width:"120%",height:"18px",marginbottom:"10"}),i.jsx(pe,{width:"12%",height:"18px",marginbottom:"10px"})]})]}),i.jsx(Ye,{children:[...Array(5)].map((n,e)=>i.jsx(Be,{children:i.jsx($t,{})},e))})]}),ea=m(H.Table)`
2595
+ `,Et=()=>i.jsxs(i.Fragment,{children:[i.jsx($t,{width:"80%"}),i.jsx($t,{width:"60%"})]}),ta=()=>i.jsxs(Jo,{children:[i.jsx(Ko,{children:i.jsxs("div",{children:[i.jsx("h2",{children:bt("ComingSoon")}),i.jsx("p",{children:bt("ComingSoonDesc")})]})}),i.jsx(Zo,{}),i.jsx(pe,{}),i.jsx(Xo,{children:[...Array(7)].map((n,e)=>i.jsx(Qo,{},e))}),i.jsx(Ze,{children:[...Array(5)].map((n,e)=>i.jsx(Be,{children:i.jsx(Et,{})},e))}),i.jsxs(ea,{children:[i.jsx(pe,{width:"20%",height:"18px",marginbottom:"10px"}),i.jsx(pe,{width:"20%",height:"18px",marginbottom:"20px"}),i.jsxs(Ze,{children:[i.jsx(pe,{width:"12%",height:"18px",marginbottom:"10"}),i.jsx(pe,{width:"12%",height:"18px",marginbottom:"10"}),i.jsx(pe,{width:"12%",height:"18px",marginbottom:"10"}),i.jsx(pe,{width:"12%",height:"18px",marginbottom:"10px"}),i.jsx(pe,{width:"120%",height:"18px",marginbottom:"10"}),i.jsx(pe,{width:"12%",height:"18px",marginbottom:"10px"})]})]}),i.jsx(Ze,{children:[...Array(5)].map((n,e)=>i.jsx(Be,{children:i.jsx(Et,{})},e))})]}),ra=m(R.Table)`
2670
2596
  .ant-table-thead > tr > th {
2671
2597
  background: var(--color-bg-primary, #fff);
2672
2598
  color: var(--color-text-secondary, rgba(19, 20, 18, 0.75));
@@ -2787,7 +2713,7 @@
2787
2713
  }
2788
2714
  }
2789
2715
  }
2790
- `,ta=n=>P.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M8.0001 5.72363L11.6096 9.33311L10.6668 10.2759L8.0001 7.60925L5.33343 10.2759L4.39062 9.33311L8.0001 5.72363Z",fill:"currentColor"})),ra=({rowKey:n,CustomExpandableRow:e,columns:t,dataTableColumns:r,dataSource:o,expandableRowProps:a,expandedRows:s,setExpandedRow:l,loading:d,pagination:c})=>{const[u,p]=S.useState([]),h=t||r;S.useEffect(()=>{s&&s.length>0&&p(g=>[...s,...g])},[s]);function f(g){p(g),l&&l([])}return i.jsx(ea,{rowKey:n||"id",pagination:c,scroll:{x:1500},locale:{emptyText:i.jsx(H.Empty,{description:zr("NoData")})},loading:d,columns:h,expandedRowKeys:u,onExpandedRowsChange:f,expandable:{expandedRowRender:g=>i.jsx(e,{...a,record:g}),expandIcon:({expanded:g})=>i.jsx(i.Fragment,{children:g?i.jsx("span",{className:"arrow-svg",children:i.jsx(ta,{})}):i.jsx("span",{className:"arrow-svg",children:i.jsx(nt,{})})}),expandRowByClick:!0},dataSource:o})},na=m(H.Tabs)`
2716
+ `,na=n=>P.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M8.0001 5.72363L11.6096 9.33311L10.6668 10.2759L8.0001 7.60925L5.33343 10.2759L4.39062 9.33311L8.0001 5.72363Z",fill:"currentColor"})),oa=({rowKey:n,CustomExpandableRow:e,columns:t,dataTableColumns:r,dataSource:o,expandableRowProps:a,expandedRows:s,setExpandedRow:l,loading:d,pagination:c})=>{const[u,p]=S.useState([]),h=t||r;S.useEffect(()=>{s&&s.length>0&&p(g=>[...s,...g])},[s]);function f(g){p(g),l&&l([])}return i.jsx(ra,{rowKey:n||"id",pagination:c,scroll:{x:1500},locale:{emptyText:i.jsx(R.Empty,{description:Fr("NoData")})},loading:d,columns:h,expandedRowKeys:u,onExpandedRowsChange:f,expandable:{expandedRowRender:g=>i.jsx(e,{...a,record:g}),expandIcon:({expanded:g})=>i.jsx(i.Fragment,{children:g?i.jsx("span",{className:"arrow-svg",children:i.jsx(na,{})}):i.jsx("span",{className:"arrow-svg",children:i.jsx(it,{})})}),expandRowByClick:!0},dataSource:o})},aa=m(R.Tabs)`
2791
2717
  display: flex;
2792
2718
  gap: var(--spacing-025, 2px);
2793
2719
  color: var(--color-text-secondary, rgba(19, 20, 18, 0.75));
@@ -2885,97 +2811,23 @@
2885
2811
  display: flex;
2886
2812
  gap: 5px;
2887
2813
  }
2888
- `;const oa=m.div`
2814
+ `;const ia=m.div`
2889
2815
  position: relative;
2890
2816
  @media (min-width: 1080px) {
2891
2817
  .tab-select {
2892
2818
  display: none;
2893
2819
  }
2894
2820
  }
2895
- `,aa=m.div`
2821
+ `,sa=m.div`
2896
2822
  position: absolute;
2897
2823
  left: 20px;
2898
2824
  top: 10px;
2899
2825
  z-index: 1000;
2900
- `,R=n=>typeof n=="string",De=()=>{let n,e;const t=new Promise((r,o)=>{n=r,e=o});return t.resolve=n,t.reject=e,t},Et=n=>n==null?"":String(n),ia=(n,e,t)=>{n.forEach(r=>{e[r]&&(t[r]=e[r])})},sa=/###/g,Ot=n=>n&&n.includes("###")?n.replace(sa,"."):n,Tt=n=>!n||R(n),Oe=(n,e,t)=>{const r=R(e)?e.split("."):e;let o=0;for(;o<r.length-1;){if(Tt(n))return{};const a=Ot(r[o]);!n[a]&&t&&(n[a]=new t),Object.prototype.hasOwnProperty.call(n,a)?n=n[a]:n={},++o}return Tt(n)?{}:{obj:n,k:Ot(r[o])}},It=(n,e,t)=>{const{obj:r,k:o}=Oe(n,e,Object);if(r!==void 0||e.length===1){r[o]=t;return}let a=e[e.length-1],s=e.slice(0,e.length-1),l=Oe(n,s,Object);for(;l.obj===void 0&&s.length;)a=`${s[s.length-1]}.${a}`,s=s.slice(0,s.length-1),l=Oe(n,s,Object),l!=null&&l.obj&&typeof l.obj[`${l.k}.${a}`]<"u"&&(l.obj=void 0);l.obj[`${l.k}.${a}`]=t},la=(n,e,t,r)=>{const{obj:o,k:a}=Oe(n,e,Object);o[a]=o[a]||[],o[a].push(t)},Ge=(n,e)=>{const{obj:t,k:r}=Oe(n,e);if(t&&Object.prototype.hasOwnProperty.call(t,r))return t[r]},ca=(n,e,t)=>{const r=Ge(n,t);return r!==void 0?r:Ge(e,t)},mr=(n,e,t)=>{for(const r in e)r!=="__proto__"&&r!=="constructor"&&(r in n?R(n[r])||n[r]instanceof String||R(e[r])||e[r]instanceof String?t&&(n[r]=e[r]):mr(n[r],e[r],t):n[r]=e[r]);return n},ye=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),da={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},pa=n=>R(n)?n.replace(/[&<>"'\/]/g,e=>da[e]):n;class ua{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(t!==void 0)return t;const r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}const fa=[" ",",","?","!",";"],ga=new ua(20),ha=(n,e,t)=>{e=e||"",t=t||"";const r=fa.filter(s=>!e.includes(s)&&!t.includes(s));if(r.length===0)return!0;const o=ga.getRegExp(`(${r.map(s=>s==="?"?"\\?":s).join("|")})`);let a=!o.test(n);if(!a){const s=n.indexOf(t);s>0&&!o.test(n.substring(0,s))&&(a=!0)}return a},et=(n,e,t=".")=>{if(!n)return;if(n[e])return Object.prototype.hasOwnProperty.call(n,e)?n[e]:void 0;const r=e.split(t);let o=n;for(let a=0;a<r.length;){if(!o||typeof o!="object")return;let s,l="";for(let d=a;d<r.length;++d)if(d!==a&&(l+=t),l+=r[d],s=o[l],s!==void 0){if(["string","number","boolean"].includes(typeof s)&&d<r.length-1)continue;a+=d-a+1;break}o=s}return o},Ie=n=>n==null?void 0:n.replace(/_/g,"-"),ma={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,e){var t,r;(r=(t=console==null?void 0:console[n])==null?void 0:t.apply)==null||r.call(t,console,e)}};class Ue{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||ma,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,r,o){return o&&!this.debug?null:(R(e[0])&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new Ue(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new Ue(this.logger,e)}}var le=new Ue;class We{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const o=this.observers[r].get(t)||0;this.observers[r].set(t,o+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}once(e,t){const r=(...o)=>{t(...o),this.off(e,r)};return this.on(e,r),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([o,a])=>{for(let s=0;s<a;s++)o(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([o,a])=>{for(let s=0;s<a;s++)o(e,...t)})}}class zt extends We{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.includes(e)||this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,r,o={}){var c,u;const a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,s=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;e.includes(".")?l=e.split("."):(l=[e,t],r&&(Array.isArray(r)?l.push(...r):R(r)&&a?l.push(...r.split(a)):l.push(r)));const d=Ge(this.data,l);return!d&&!t&&!r&&e.includes(".")&&(e=l[0],t=l[1],r=l.slice(2).join(".")),d||!s||!R(r)?d:et((u=(c=this.data)==null?void 0:c[e])==null?void 0:u[t],r,a)}addResource(e,t,r,o,a={silent:!1}){const s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let l=[e,t];r&&(l=l.concat(s?r.split(s):r)),e.includes(".")&&(l=e.split("."),o=t,t=l[1]),this.addNamespaces(t),It(this.data,l,o),a.silent||this.emit("added",e,t,r,o)}addResources(e,t,r,o={silent:!1}){for(const a in r)(R(r[a])||Array.isArray(r[a]))&&this.addResource(e,t,a,r[a],{silent:!0});o.silent||this.emit("added",e,t,r)}addResourceBundle(e,t,r,o,a,s={silent:!1,skipCopy:!1}){let l=[e,t];e.includes(".")&&(l=e.split("."),o=r,r=t,t=l[1]),this.addNamespaces(t);let d=Ge(this.data,l)||{};s.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?mr(d,r,a):d={...d,...r},It(this.data,l,d),s.silent||this.emit("added",e,t,r)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(o=>t[o]&&Object.keys(t[o]).length>0)}toJSON(){return this.data}}var xr={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,e,t,r,o){return n.forEach(a=>{var s;e=((s=this.processors[a])==null?void 0:s.process(e,t,r,o))??e}),e}};const yr=Symbol("i18next/PATH_KEY");function xa(){const n=[],e=Object.create(null);let t;return e.get=(r,o)=>{var a;return(a=t==null?void 0:t.revoke)==null||a.call(t),o===yr?n:(n.push(o),t=Proxy.revocable(r,e),t.proxy)},Proxy.revocable(Object.create(null),e).proxy}function je(n,e){const{[yr]:t}=n(xa()),r=(e==null?void 0:e.keySeparator)??".",o=(e==null?void 0:e.nsSeparator)??":";if(t.length>1&&o){const a=e==null?void 0:e.ns,s=Array.isArray(a)?a:null;if(s&&s.length>1&&s.slice(1).includes(t[0]))return`${t[0]}${o}${t.slice(1).join(r)}`}return t.join(r)}const Ke=n=>!R(n)&&typeof n!="boolean"&&typeof n!="number";class _e extends We{constructor(e,t={}){super(),ia(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=le.create("translator"),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const r={...t};if(e==null)return!1;const o=this.resolve(e,r);if((o==null?void 0:o.res)===void 0)return!1;const a=Ke(o.res);return!(r.returnObjects===!1&&a)}extractFromKey(e,t){let r=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let a=t.ns||this.options.defaultNS||[];const s=r&&e.includes(r),l=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!ha(e,r,o);if(s&&!l){const d=e.match(this.interpolator.nestingRegexp);if(d&&d.length>0)return{key:e,namespaces:R(a)?[a]:a};const c=e.split(r);(r!==o||r===o&&this.options.ns.includes(c[0]))&&(a=c.shift()),e=c.join(o)}return{key:e,namespaces:R(a)?[a]:a}}translate(e,t,r){let o=typeof t=="object"?{...t}:t;if(typeof o!="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),typeof o=="object"&&(o={...o}),o||(o={}),e==null)return"";typeof e=="function"&&(e=je(e,{...this.options,...o})),Array.isArray(e)||(e=[String(e)]),e=e.map(M=>typeof M=="function"?je(M,{...this.options,...o}):String(M));const a=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,{key:l,namespaces:d}=this.extractFromKey(e[e.length-1],o),c=d[d.length-1];let u=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;u===void 0&&(u=":");const p=o.lng||this.language,h=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((p==null?void 0:p.toLowerCase())==="cimode")return h?a?{res:`${c}${u}${l}`,usedKey:l,exactUsedKey:l,usedLng:p,usedNS:c,usedParams:this.getUsedParamsDetails(o)}:`${c}${u}${l}`:a?{res:l,usedKey:l,exactUsedKey:l,usedLng:p,usedNS:c,usedParams:this.getUsedParamsDetails(o)}:l;const f=this.resolve(e,o);let g=f==null?void 0:f.res;const w=(f==null?void 0:f.usedKey)||l,O=(f==null?void 0:f.exactUsedKey)||l,A=["[object Number]","[object Function]","[object RegExp]"],j=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,L=!this.i18nFormat||this.i18nFormat.handleAsObject,T=o.count!==void 0&&!R(o.count),V=_e.hasDefaultValue(o),G=T?this.pluralResolver.getSuffix(p,o.count,o):"",_=o.ordinal&&T?this.pluralResolver.getSuffix(p,o.count,{ordinal:!1}):"",Y=T&&!o.ordinal&&o.count===0,I=Y&&o[`defaultValue${this.options.pluralSeparator}zero`]||o[`defaultValue${G}`]||o[`defaultValue${_}`]||o.defaultValue;let $=g;L&&!g&&V&&($=I);const v=Ke($),F=Object.prototype.toString.apply($);if(L&&$&&v&&!A.includes(F)&&!(R(j)&&Array.isArray($))){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const M=this.options.returnedObjectHandler?this.options.returnedObjectHandler(w,$,{...o,ns:d}):`key '${l} (${this.language})' returned an object instead of string.`;return a?(f.res=M,f.usedParams=this.getUsedParamsDetails(o),f):M}if(s){const M=Array.isArray($),k=M?[]:{},C=M?O:w;for(const y in $)if(Object.prototype.hasOwnProperty.call($,y)){const x=`${C}${s}${y}`;V&&!g?k[y]=this.translate(x,{...o,defaultValue:Ke(I)?I[y]:void 0,joinArrays:!1,ns:d}):k[y]=this.translate(x,{...o,joinArrays:!1,ns:d}),k[y]===x&&(k[y]=$[y])}g=k}}else if(L&&R(j)&&Array.isArray(g))g=g.join(j),g&&(g=this.extendTranslation(g,e,o,r));else{let M=!1,k=!1;!this.isValidLookup(g)&&V&&(M=!0,g=I),this.isValidLookup(g)||(k=!0,g=l);const y=(o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&k?void 0:g,x=V&&I!==g&&this.options.updateMissing;if(k||M||x){if(this.logger.log(x?"updateKey":"missingKey",p,c,l,x?I:g),s){const N=this.resolve(l,{...o,keySeparator:!1});N&&N.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let b=[];const E=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&E&&E[0])for(let N=0;N<E.length;N++)b.push(E[N]);else this.options.saveMissingTo==="all"?b=this.languageUtils.toResolveHierarchy(o.lng||this.language):b.push(o.lng||this.language);const z=(N,U,W)=>{var Z;const q=V&&W!==g?W:y;this.options.missingKeyHandler?this.options.missingKeyHandler(N,c,U,q,x,o):(Z=this.backendConnector)!=null&&Z.saveMissing&&this.backendConnector.saveMissing(N,c,U,q,x,o),this.emit("missingKey",N,c,U,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&T?b.forEach(N=>{const U=this.pluralResolver.getSuffixes(N,o);Y&&o[`defaultValue${this.options.pluralSeparator}zero`]&&!U.includes(`${this.options.pluralSeparator}zero`)&&U.push(`${this.options.pluralSeparator}zero`),U.forEach(W=>{z([N],l+W,o[`defaultValue${W}`]||I)})}):z(b,l,I))}g=this.extendTranslation(g,e,o,f,r),k&&g===l&&this.options.appendNamespaceToMissingKey&&(g=`${c}${u}${l}`),(k||M)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${u}${l}`:l,M?g:void 0,o))}return a?(f.res=g,f.usedParams=this.getUsedParamsDetails(o),f):g}extendTranslation(e,t,r,o,a){var d,c;if((d=this.i18nFormat)!=null&&d.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=R(e)&&(((c=r==null?void 0:r.interpolation)==null?void 0:c.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let p;if(u){const f=e.match(this.interpolator.nestingRegexp);p=f&&f.length}let h=r.replace&&!R(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),e=this.interpolator.interpolate(e,h,r.lng||this.language||o.usedLng,r),u){const f=e.match(this.interpolator.nestingRegexp),g=f&&f.length;p<g&&(r.nest=!1)}!r.lng&&o&&o.res&&(r.lng=this.language||o.usedLng),r.nest!==!1&&(e=this.interpolator.nest(e,(...f)=>(a==null?void 0:a[0])===f[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${f[0]} in key: ${t[0]}`),null):this.translate(...f,t),r)),r.interpolation&&this.interpolator.reset()}const s=r.postProcess||this.options.postProcess,l=R(s)?[s]:s;return e!=null&&(l!=null&&l.length)&&r.applyPostProcessor!==!1&&(e=xr.handle(l,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e,t={}){let r,o,a,s,l;return R(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(d=>typeof d=="function"?je(d,{...this.options,...t}):d)),e.forEach(d=>{if(this.isValidLookup(r))return;const c=this.extractFromKey(d,t),u=c.key;o=u;let p=c.namespaces;this.options.fallbackNS&&(p=p.concat(this.options.fallbackNS));const h=t.count!==void 0&&!R(t.count),f=h&&!t.ordinal&&t.count===0,g=t.context!==void 0&&(R(t.context)||typeof t.context=="number")&&t.context!=="",w=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);p.forEach(O=>{var A,j;this.isValidLookup(r)||(l=O,!this.checkedLoadedFor[`${w[0]}-${O}`]&&((A=this.utils)!=null&&A.hasLoadedNamespace)&&!((j=this.utils)!=null&&j.hasLoadedNamespace(l))&&(this.checkedLoadedFor[`${w[0]}-${O}`]=!0,this.logger.warn(`key "${o}" for languages "${w.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),w.forEach(L=>{var G;if(this.isValidLookup(r))return;s=L;const T=[u];if((G=this.i18nFormat)!=null&&G.addLookupKeys)this.i18nFormat.addLookupKeys(T,u,L,O,t);else{let _;h&&(_=this.pluralResolver.getSuffix(L,t.count,t));const Y=`${this.options.pluralSeparator}zero`,I=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(t.ordinal&&_.startsWith(I)&&T.push(u+_.replace(I,this.options.pluralSeparator)),T.push(u+_),f&&T.push(u+Y)),g){const $=`${u}${this.options.contextSeparator||"_"}${t.context}`;T.push($),h&&(t.ordinal&&_.startsWith(I)&&T.push($+_.replace(I,this.options.pluralSeparator)),T.push($+_),f&&T.push($+Y))}}let V;for(;V=T.pop();)this.isValidLookup(r)||(a=V,r=this.getResource(L,O,V,t))}))})}),{res:r,usedKey:o,exactUsedKey:a,usedLng:s,usedNS:l}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,r,o={}){var a;return(a=this.i18nFormat)!=null&&a.getResource?this.i18nFormat.getResource(e,t,r,o):this.resourceStore.getResource(e,t,r,o)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=e.replace&&!R(e.replace);let o=r?e.replace:e;if(r&&typeof e.count<"u"&&(o.count=e.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!r){o={...o};for(const a of t)delete o[a]}return o}static hasDefaultValue(e){const t="defaultValue";for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&r.startsWith(t)&&e[r]!==void 0)return!0;return!1}}class Mt{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=le.create("languageUtils")}getScriptPartFromCode(e){if(e=Ie(e),!e||!e.includes("-"))return null;const t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=Ie(e),!e||!e.includes("-"))return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(R(e)&&e.includes("-")){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(r=>{if(t)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(t=o)}),!t&&this.options.supportedLngs&&e.forEach(r=>{if(t)return;const o=this.getScriptPartFromCode(r);if(this.isSupportedCode(o))return t=o;const a=this.getLanguagePartFromCode(r);if(this.isSupportedCode(a))return t=a;t=this.options.supportedLngs.find(s=>s===a?!0:!s.includes("-")&&!a.includes("-")?!1:!!(s.includes("-")&&!a.includes("-")&&s.slice(0,s.indexOf("-"))===a||s.startsWith(a)&&a.length>1))}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),R(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}toResolveHierarchy(e,t){const r=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),o=[],a=s=>{s&&(this.isSupportedCode(s)?o.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return R(e)&&(e.includes("-")||e.includes("_"))?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(e))):R(e)&&a(this.formatLanguageCode(e)),r.forEach(s=>{o.includes(s)||a(this.formatLanguageCode(s))}),o}}const Pt={zero:0,one:1,two:2,few:3,many:4,other:5},Ht={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class ya{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=le.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const r=Ie(e==="dev"?"en":e),o=t.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:r,type:o});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let s;try{s=new Intl.PluralRules(r,{type:o})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),Ht;if(!e.match(/-|_/))return Ht;const d=this.languageUtils.getLanguagePartFromCode(e);s=this.getRule(d,t)}return this.pluralRulesCache[a]=s,s}needsPlural(e,t={}){let r=this.getRule(e,t);return r||(r=this.getRule("dev",t)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,t,r={}){return this.getSuffixes(e,r).map(o=>`${t}${o}`)}getSuffixes(e,t={}){let r=this.getRule(e,t);return r||(r=this.getRule("dev",t)),r?r.resolvedOptions().pluralCategories.sort((o,a)=>Pt[o]-Pt[a]).map(o=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${o}`):[]}getSuffix(e,t,r={}){const o=this.getRule(e,r);return o?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,r))}}const Rt=(n,e,t,r=".",o=!0)=>{let a=ca(n,e,t);return!a&&o&&R(t)&&(a=et(n,t,r),a===void 0&&(a=et(e,t,r))),a},qe=n=>n.replace(/\$/g,"$$$$");class Ft{constructor(e={}){var t;this.logger=le.create("interpolator"),this.options=e,this.format=((t=e==null?void 0:e.interpolation)==null?void 0:t.format)||(r=>r),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:r,useRawValueToEscape:o,prefix:a,prefixEscaped:s,suffix:l,suffixEscaped:d,formatSeparator:c,unescapeSuffix:u,unescapePrefix:p,nestingPrefix:h,nestingPrefixEscaped:f,nestingSuffix:g,nestingSuffixEscaped:w,nestingOptionsSeparator:O,maxReplaces:A,alwaysFormat:j}=e.interpolation;this.escape=t!==void 0?t:pa,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=a?ye(a):s||"{{",this.suffix=l?ye(l):d||"}}",this.formatSeparator=c||",",this.unescapePrefix=u?"":p||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=h?ye(h):f||ye("$t("),this.nestingSuffix=g?ye(g):w||ye(")"),this.nestingOptionsSeparator=O||",",this.maxReplaces=A||1e3,this.alwaysFormat=j!==void 0?j:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,r)=>(t==null?void 0:t.source)===r?(t.lastIndex=0,t):new RegExp(r,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,r,o){var f;let a,s,l;const d=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=g=>{if(!g.includes(this.formatSeparator)){const j=Rt(t,d,g,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(j,void 0,r,{...o,...t,interpolationkey:g}):j}const w=g.split(this.formatSeparator),O=w.shift().trim(),A=w.join(this.formatSeparator).trim();return this.format(Rt(t,d,O,this.options.keySeparator,this.options.ignoreJSONStructure),A,r,{...o,...t,interpolationkey:O})};this.resetRegExp();const u=(o==null?void 0:o.missingInterpolationHandler)||this.options.missingInterpolationHandler,p=((f=o==null?void 0:o.interpolation)==null?void 0:f.skipOnVariables)!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:g=>qe(g)},{regex:this.regexp,safeValue:g=>this.escapeValue?qe(this.escape(g)):qe(g)}].forEach(g=>{for(l=0;a=g.regex.exec(e);){const w=a[1].trim();if(s=c(w),s===void 0)if(typeof u=="function"){const A=u(e,a,o);s=R(A)?A:""}else if(o&&Object.prototype.hasOwnProperty.call(o,w))s="";else if(p){s=a[0];continue}else this.logger.warn(`missed to pass in variable ${w} for interpolating ${e}`),s="";else!R(s)&&!this.useRawValueToEscape&&(s=Et(s));const O=g.safeValue(s);if(e=e.replace(a[0],O),p?(g.regex.lastIndex+=s.length,g.regex.lastIndex-=a[0].length):g.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),e}nest(e,t,r={}){let o,a,s;const l=(d,c)=>{const u=this.nestingOptionsSeparator;if(!d.includes(u))return d;const p=d.split(new RegExp(`${ye(u)}[ ]*{`));let h=`{${p[1]}`;d=p[0],h=this.interpolate(h,s);const f=h.match(/'/g),g=h.match(/"/g);(((f==null?void 0:f.length)??0)%2===0&&!g||((g==null?void 0:g.length)??0)%2!==0)&&(h=h.replace(/'/g,'"'));try{s=JSON.parse(h),c&&(s={...c,...s})}catch(w){return this.logger.warn(`failed parsing options string in nesting for key ${d}`,w),`${d}${u}${h}`}return s.defaultValue&&s.defaultValue.includes(this.prefix)&&delete s.defaultValue,d};for(;o=this.nestingRegexp.exec(e);){let d=[];s={...r},s=s.replace&&!R(s.replace)?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;const c=/{.*}/.test(o[1])?o[1].lastIndexOf("}")+1:o[1].indexOf(this.formatSeparator);if(c!==-1&&(d=o[1].slice(c).split(this.formatSeparator).map(u=>u.trim()).filter(Boolean),o[1]=o[1].slice(0,c)),a=t(l.call(this,o[1].trim(),s),s),a&&o[0]===e&&!R(a))return a;R(a)||(a=Et(a)),a||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${e}`),a=""),d.length&&(a=d.reduce((u,p)=>this.format(u,p,r.lng,{...r,interpolationkey:o[1].trim()}),a.trim())),e=e.replace(o[0],a),this.regexp.lastIndex=0}return e}}const ba=n=>{let e=n.toLowerCase().trim();const t={};if(n.includes("(")){const r=n.split("(");e=r[0].toLowerCase().trim();const o=r[1].slice(0,-1);e==="currency"&&!o.includes(":")?t.currency||(t.currency=o.trim()):e==="relativetime"&&!o.includes(":")?t.range||(t.range=o.trim()):o.split(";").forEach(s=>{if(s){const[l,...d]=s.split(":"),c=d.join(":").trim().replace(/^'+|'+$/g,""),u=l.trim();t[u]||(t[u]=c),c==="false"&&(t[u]=!1),c==="true"&&(t[u]=!0),isNaN(c)||(t[u]=parseInt(c,10))}})}return{formatName:e,formatOptions:t}},Nt=n=>{const e={};return(t,r,o)=>{let a=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(a={...a,[o.interpolationkey]:void 0});const s=r+JSON.stringify(a);let l=e[s];return l||(l=n(Ie(r),o),e[s]=l),l(t)}},va=n=>(e,t,r)=>n(Ie(t),r)(e);class wa{constructor(e={}){this.logger=le.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const r=t.cacheInBuiltFormats?Nt:va;this.formats={number:r((o,a)=>{const s=new Intl.NumberFormat(o,{...a});return l=>s.format(l)}),currency:r((o,a)=>{const s=new Intl.NumberFormat(o,{...a,style:"currency"});return l=>s.format(l)}),datetime:r((o,a)=>{const s=new Intl.DateTimeFormat(o,{...a});return l=>s.format(l)}),relativetime:r((o,a)=>{const s=new Intl.RelativeTimeFormat(o,{...a});return l=>s.format(l,a.range||"day")}),list:r((o,a)=>{const s=new Intl.ListFormat(o,{...a});return l=>s.format(l)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Nt(t)}format(e,t,r,o={}){if(!t||e==null)return e;const a=t.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&!a[0].includes(")")&&a.find(l=>l.includes(")"))){const l=a.findIndex(d=>d.includes(")"));a[0]=[a[0],...a.splice(1,l)].join(this.formatSeparator)}return a.reduce((l,d)=>{var p;const{formatName:c,formatOptions:u}=ba(d);if(this.formats[c]){let h=l;try{const f=((p=o==null?void 0:o.formatParams)==null?void 0:p[o.interpolationkey])||{},g=f.locale||f.lng||o.locale||o.lng||r;h=this.formats[c](l,g,{...u,...o,...f})}catch(f){this.logger.warn(f)}return h}else this.logger.warn(`there was no format function for ${c}`);return l},e)}}const Sa=(n,e)=>{n.pending[e]!==void 0&&(delete n.pending[e],n.pendingCount--)};class Ca extends We{constructor(e,t,r,o={}){var a,s;super(),this.backend=e,this.store=t,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=le.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],(s=(a=this.backend)==null?void 0:a.init)==null||s.call(a,r,o.backend,o)}queueLoad(e,t,r,o){const a={},s={},l={},d={};return e.forEach(c=>{let u=!0;t.forEach(p=>{const h=`${c}|${p}`;!r.reload&&this.store.hasResourceBundle(c,p)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?s[h]===void 0&&(s[h]=!0):(this.state[h]=1,u=!1,s[h]===void 0&&(s[h]=!0),a[h]===void 0&&(a[h]=!0),d[p]===void 0&&(d[p]=!0)))}),u||(l[c]=!0)}),(Object.keys(a).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(a),pending:Object.keys(s),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(d)}}loaded(e,t,r){const o=e.split("|"),a=o[0],s=o[1];t&&this.emit("failedLoading",a,s,t),!t&&r&&this.store.addResourceBundle(a,s,r,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&r&&(this.state[e]=0);const l={};this.queue.forEach(d=>{la(d.loaded,[a],s),Sa(d,e),t&&d.errors.push(t),d.pendingCount===0&&!d.done&&(Object.keys(d.loaded).forEach(c=>{l[c]||(l[c]={});const u=d.loaded[c];u.length&&u.forEach(p=>{l[c][p]===void 0&&(l[c][p]=!0)})}),d.done=!0,d.errors.length?d.callback(d.errors):d.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(d=>!d.done)}read(e,t,r,o=0,a=this.retryTimeout,s){if(!e.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:r,tried:o,wait:a,callback:s});return}this.readingCalls++;const l=(c,u)=>{if(this.readingCalls--,this.waitingReads.length>0){const p=this.waitingReads.shift();this.read(p.lng,p.ns,p.fcName,p.tried,p.wait,p.callback)}if(c&&u&&o<this.maxRetries){setTimeout(()=>{this.read(e,t,r,o+1,a*2,s)},a);return}s(c,u)},d=this.backend[r].bind(this.backend);if(d.length===2){try{const c=d(e,t);c&&typeof c.then=="function"?c.then(u=>l(null,u)).catch(l):l(null,c)}catch(c){l(c)}return}return d(e,t,l)}prepareLoading(e,t,r={},o){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();R(e)&&(e=this.languageUtils.toResolveHierarchy(e)),R(t)&&(t=[t]);const a=this.queueLoad(e,t,r,o);if(!a.toLoad.length)return a.pending.length||o(),null;a.toLoad.forEach(s=>{this.loadOne(s)})}load(e,t,r){this.prepareLoading(e,t,{},r)}reload(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}loadOne(e,t=""){const r=e.split("|"),o=r[0],a=r[1];this.read(o,a,"read",void 0,void 0,(s,l)=>{s&&this.logger.warn(`${t}loading namespace ${a} for language ${o} failed`,s),!s&&l&&this.logger.log(`${t}loaded namespace ${a} for language ${o}`,l),this.loaded(e,s,l)})}saveMissing(e,t,r,o,a,s={},l=()=>{}){var d,c,u,p,h;if((c=(d=this.services)==null?void 0:d.utils)!=null&&c.hasLoadedNamespace&&!((p=(u=this.services)==null?void 0:u.utils)!=null&&p.hasLoadedNamespace(t))){this.logger.warn(`did not save key "${r}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if((h=this.backend)!=null&&h.create){const f={...s,isUpdate:a},g=this.backend.create.bind(this.backend);if(g.length<6)try{let w;g.length===5?w=g(e,t,r,o,f):w=g(e,t,r,o),w&&typeof w.then=="function"?w.then(O=>l(null,O)).catch(l):l(null,w)}catch(w){l(w)}else g(e,t,r,o,l,f)}!e||!e[0]||this.store.addResource(e[0],t,r,o)}}}const Ze=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:n=>{let e={};if(typeof n[1]=="object"&&(e=n[1]),R(n[1])&&(e.defaultValue=n[1]),R(n[2])&&(e.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){const t=n[3]||n[2];Object.keys(t).forEach(r=>{e[r]=t[r]})}return e},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Vt=n=>(R(n.ns)&&(n.ns=[n.ns]),R(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),R(n.fallbackNS)&&(n.fallbackNS=[n.fallbackNS]),n.supportedLngs&&!n.supportedLngs.includes("cimode")&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),n),Re=()=>{},ja=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(t=>{typeof n[t]=="function"&&(n[t]=n[t].bind(n))})};class Te extends We{constructor(e={},t){if(super(),this.options=Vt(e),this.services={},this.logger=le,this.modules={external:[]},ja(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e=="function"&&(t=e,e={}),e.defaultNS==null&&e.ns&&(R(e.ns)?e.defaultNS=e.ns:e.ns.includes("translation")||(e.defaultNS=e.ns[0]));const r=Ze();this.options={...r,...this.options,...Vt(e)},this.options.interpolation={...r.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=r.overloadTranslationOptionHandler);const o=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?le.init(o(this.modules.logger),this.options):le.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=wa;const u=new Mt(this.options);this.store=new zt(this.options.resources,this.options);const p=this.services;p.logger=le,p.resourceStore=this.store,p.languageUtils=u,p.pluralResolver=new ya(u,{prepend:this.options.pluralSeparator}),c&&(p.formatter=o(c),p.formatter.init&&p.formatter.init(p,this.options),this.options.interpolation.format=p.formatter.format.bind(p.formatter)),p.interpolator=new Ft(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new Ca(o(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",(h,...f)=>{this.emit(h,...f)}),this.modules.languageDetector&&(p.languageDetector=o(this.modules.languageDetector),p.languageDetector.init&&p.languageDetector.init(p,this.options.detection,this.options)),this.modules.i18nFormat&&(p.i18nFormat=o(this.modules.i18nFormat),p.i18nFormat.init&&p.i18nFormat.init(this)),this.translator=new _e(this.services,this.options),this.translator.on("*",(h,...f)=>{this.emit(h,...f)}),this.modules.external.forEach(h=>{h.init&&h.init(this)})}if(this.format=this.options.interpolation.format,t||(t=Re),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=(...u)=>this.store[c](...u)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=(...u)=>(this.store[c](...u),this)});const l=De(),d=()=>{const c=(u,p)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(p),t(u,p)};if(this.languages&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?d():setTimeout(d,0),l}loadResources(e,t=Re){var a,s;let r=t;const o=R(e)?e:this.language;if(typeof e=="function"&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if((o==null?void 0:o.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const l=[],d=c=>{if(!c||c==="cimode")return;this.services.languageUtils.toResolveHierarchy(c).forEach(p=>{p!=="cimode"&&(l.includes(p)||l.push(p))})};o?d(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>d(u)),(s=(a=this.options.preload)==null?void 0:a.forEach)==null||s.call(a,c=>d(c)),this.services.backendConnector.load(l,this.options.ns,c=>{!c&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(c)})}else r(null)}reloadResources(e,t,r){const o=De();return typeof e=="function"&&(r=e,e=void 0),typeof t=="function"&&(r=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),r||(r=Re),this.services.backendConnector.reload(e,t,a=>{o.resolve(),r(a)}),o}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&xr.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!["cimode","dev"].includes(e)){for(let t=0;t<this.languages.length;t++){const r=this.languages[t];if(!["cimode","dev"].includes(r)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}!this.resolvedLanguage&&!this.languages.includes(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const r=De();this.emit("languageChanging",e);const o=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},a=(l,d)=>{d?this.isLanguageChangingTo===e&&(o(d),this.translator.changeLanguage(d),this.isLanguageChangingTo=void 0,this.emit("languageChanged",d),this.logger.log("languageChanged",d)):this.isLanguageChangingTo=void 0,r.resolve((...c)=>this.t(...c)),t&&t(l,(...c)=>this.t(...c))},s=l=>{var u,p;!e&&!l&&this.services.languageDetector&&(l=[]);const d=R(l)?l:l&&l[0],c=this.store.hasLanguageSomeTranslations(d)?d:this.services.languageUtils.getBestMatchFromCodes(R(l)?[l]:l);c&&(this.language||o(c),this.translator.language||this.translator.changeLanguage(c),(p=(u=this.services.languageDetector)==null?void 0:u.cacheUserLanguage)==null||p.call(u,c)),this.loadResources(c,h=>{a(h,c)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(e),r}getFixedT(e,t,r){const o=(a,s,...l)=>{let d;typeof s!="object"?d=this.options.overloadTranslationOptionHandler([a,s].concat(l)):d={...s},d.lng=d.lng||o.lng,d.lngs=d.lngs||o.lngs,d.ns=d.ns||o.ns,d.keyPrefix!==""&&(d.keyPrefix=d.keyPrefix||r||o.keyPrefix);const c={...this.options,...d};typeof d.keyPrefix=="function"&&(d.keyPrefix=je(d.keyPrefix,c));const u=this.options.keySeparator||".";let p;return d.keyPrefix&&Array.isArray(a)?p=a.map(h=>(typeof h=="function"&&(h=je(h,c)),`${d.keyPrefix}${u}${h}`)):(typeof a=="function"&&(a=je(a,c)),p=d.keyPrefix?`${d.keyPrefix}${u}${a}`:a),this.t(p,d)};return R(e)?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=r,o}t(...e){var t;return(t=this.translator)==null?void 0:t.translate(...e)}exists(...e){var t;return(t=this.translator)==null?void 0:t.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=t.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(l,d)=>{const c=this.services.backendConnector.state[`${l}|${d}`];return c===-1||c===0||c===2};if(t.precheck){const l=t.precheck(this,s);if(l!==void 0)return l}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(r,e)&&(!o||s(a,e)))}loadNamespaces(e,t){const r=De();return this.options.ns?(R(e)&&(e=[e]),e.forEach(o=>{this.options.ns.includes(o)||this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),t&&t(o)}),r):(t&&t(),Promise.resolve())}loadLanguages(e,t){const r=De();R(e)&&(e=[e]);const o=this.options.preload||[],a=e.filter(s=>!o.includes(s)&&this.services.languageUtils.isSupportedCode(s));return a.length?(this.options.preload=o.concat(a),this.loadResources(s=>{r.resolve(),t&&t(s)}),r):(t&&t(),Promise.resolve())}dir(e){var o,a;if(e||(e=this.resolvedLanguage||(((o=this.languages)==null?void 0:o.length)>0?this.languages[0]:this.language)),!e)return"rtl";try{const s=new Intl.Locale(e);if(s&&s.getTextInfo){const l=s.getTextInfo();if(l&&l.direction)return l.direction}}catch{}const t=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=((a=this.services)==null?void 0:a.languageUtils)||new Mt(Ze());return e.toLowerCase().indexOf("-latn")>1?"ltr":t.includes(r.getLanguagePartFromCode(e))||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){const r=new Te(e,t);return r.createInstance=Te.createInstance,r}cloneInstance(e={},t=Re){const r=e.forkResourceStore;r&&delete e.forkResourceStore;const o={...this.options,...e,isClone:!0},a=new Te(o);if((e.debug!==void 0||e.prefix!==void 0)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(l=>{a[l]=this[l]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r){const l=Object.keys(this.store.data).reduce((d,c)=>(d[c]={...this.store.data[c]},d[c]=Object.keys(d[c]).reduce((u,p)=>(u[p]={...d[c][p]},u),d[c]),d),{});a.store=new zt(l,o),a.services.resourceStore=a.store}if(e.interpolation){const d={...Ze().interpolation,...this.options.interpolation,...e.interpolation},c={...o,interpolation:d};a.services.interpolator=new Ft(c)}return a.translator=new _e(a.services,o),a.translator.on("*",(l,...d)=>{a.emit(l,...d)}),a.init(o,t),a.translator.options=o,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const X=Te.createInstance();X.createInstance;X.dir;X.init;X.loadResources;X.reloadResources;X.use;X.changeLanguage;X.getFixedT;X.t;X.exists;X.setDefaultNamespace;X.hasLoadedNamespace;X.loadNamespaces;X.loadLanguages;X.use($r).use(Dr).use(Bt.initReactI18next).init({fallbackLng:"en",supportedLngs:["en","ka"],debug:!1,backend:{loadPath:"/locales/langs/{{lng}}.json"},detection:{order:["localStorage"],lookupLocalStorage:"Language",caches:["localStorage"]},interpolation:{escapeValue:!1}});function ka(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Fe={exports:{}},La=Fe.exports,At;function Da(){return At||(At=1,(function(n,e){(function(t,r){n.exports=r()})(La,(function(){var t=1e3,r=6e4,o=36e5,a="millisecond",s="second",l="minute",d="hour",c="day",u="week",p="month",h="quarter",f="year",g="date",w="Invalid Date",O=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,A=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,j={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(k){var C=["th","st","nd","rd"],y=k%100;return"["+k+(C[(y-20)%10]||C[y]||C[0])+"]"}},L=function(k,C,y){var x=String(k);return!x||x.length>=C?k:""+Array(C+1-x.length).join(y)+k},T={s:L,z:function(k){var C=-k.utcOffset(),y=Math.abs(C),x=Math.floor(y/60),b=y%60;return(C<=0?"+":"-")+L(x,2,"0")+":"+L(b,2,"0")},m:function k(C,y){if(C.date()<y.date())return-k(y,C);var x=12*(y.year()-C.year())+(y.month()-C.month()),b=C.clone().add(x,p),E=y-b<0,z=C.clone().add(x+(E?-1:1),p);return+(-(x+(y-b)/(E?b-z:z-b))||0)},a:function(k){return k<0?Math.ceil(k)||0:Math.floor(k)},p:function(k){return{M:p,y:f,w:u,d:c,D:g,h:d,m:l,s,ms:a,Q:h}[k]||String(k||"").toLowerCase().replace(/s$/,"")},u:function(k){return k===void 0}},V="en",G={};G[V]=j;var _="$isDayjsObject",Y=function(k){return k instanceof F||!(!k||!k[_])},I=function k(C,y,x){var b;if(!C)return V;if(typeof C=="string"){var E=C.toLowerCase();G[E]&&(b=E),y&&(G[E]=y,b=E);var z=C.split("-");if(!b&&z.length>1)return k(z[0])}else{var N=C.name;G[N]=C,b=N}return!x&&b&&(V=b),b||!x&&V},$=function(k,C){if(Y(k))return k.clone();var y=typeof C=="object"?C:{};return y.date=k,y.args=arguments,new F(y)},v=T;v.l=I,v.i=Y,v.w=function(k,C){return $(k,{locale:C.$L,utc:C.$u,x:C.$x,$offset:C.$offset})};var F=(function(){function k(y){this.$L=I(y.locale,null,!0),this.parse(y),this.$x=this.$x||y.x||{},this[_]=!0}var C=k.prototype;return C.parse=function(y){this.$d=(function(x){var b=x.date,E=x.utc;if(b===null)return new Date(NaN);if(v.u(b))return new Date;if(b instanceof Date)return new Date(b);if(typeof b=="string"&&!/Z$/i.test(b)){var z=b.match(O);if(z){var N=z[2]-1||0,U=(z[7]||"0").substring(0,3);return E?new Date(Date.UTC(z[1],N,z[3]||1,z[4]||0,z[5]||0,z[6]||0,U)):new Date(z[1],N,z[3]||1,z[4]||0,z[5]||0,z[6]||0,U)}}return new Date(b)})(y),this.init()},C.init=function(){var y=this.$d;this.$y=y.getFullYear(),this.$M=y.getMonth(),this.$D=y.getDate(),this.$W=y.getDay(),this.$H=y.getHours(),this.$m=y.getMinutes(),this.$s=y.getSeconds(),this.$ms=y.getMilliseconds()},C.$utils=function(){return v},C.isValid=function(){return this.$d.toString()!==w},C.isSame=function(y,x){var b=$(y);return this.startOf(x)<=b&&b<=this.endOf(x)},C.isAfter=function(y,x){return $(y)<this.startOf(x)},C.isBefore=function(y,x){return this.endOf(x)<$(y)},C.$g=function(y,x,b){return v.u(y)?this[x]:this.set(b,y)},C.unix=function(){return Math.floor(this.valueOf()/1e3)},C.valueOf=function(){return this.$d.getTime()},C.startOf=function(y,x){var b=this,E=!!v.u(x)||x,z=v.p(y),N=function(de,re){var me=v.w(b.$u?Date.UTC(b.$y,re,de):new Date(b.$y,re,de),b);return E?me:me.endOf(c)},U=function(de,re){return v.w(b.toDate()[de].apply(b.toDate("s"),(E?[0,0,0,0]:[23,59,59,999]).slice(re)),b)},W=this.$W,q=this.$M,Z=this.$D,ce="set"+(this.$u?"UTC":"");switch(z){case f:return E?N(1,0):N(31,11);case p:return E?N(1,q):N(0,q+1);case u:var ie=this.$locale().weekStart||0,K=(W<ie?W+7:W)-ie;return N(E?Z-K:Z+(6-K),q);case c:case g:return U(ce+"Hours",0);case d:return U(ce+"Minutes",1);case l:return U(ce+"Seconds",2);case s:return U(ce+"Milliseconds",3);default:return this.clone()}},C.endOf=function(y){return this.startOf(y,!1)},C.$set=function(y,x){var b,E=v.p(y),z="set"+(this.$u?"UTC":""),N=(b={},b[c]=z+"Date",b[g]=z+"Date",b[p]=z+"Month",b[f]=z+"FullYear",b[d]=z+"Hours",b[l]=z+"Minutes",b[s]=z+"Seconds",b[a]=z+"Milliseconds",b)[E],U=E===c?this.$D+(x-this.$W):x;if(E===p||E===f){var W=this.clone().set(g,1);W.$d[N](U),W.init(),this.$d=W.set(g,Math.min(this.$D,W.daysInMonth())).$d}else N&&this.$d[N](U);return this.init(),this},C.set=function(y,x){return this.clone().$set(y,x)},C.get=function(y){return this[v.p(y)]()},C.add=function(y,x){var b,E=this;y=Number(y);var z=v.p(x),N=function(q){var Z=$(E);return v.w(Z.date(Z.date()+Math.round(q*y)),E)};if(z===p)return this.set(p,this.$M+y);if(z===f)return this.set(f,this.$y+y);if(z===c)return N(1);if(z===u)return N(7);var U=(b={},b[l]=r,b[d]=o,b[s]=t,b)[z]||1,W=this.$d.getTime()+y*U;return v.w(W,this)},C.subtract=function(y,x){return this.add(-1*y,x)},C.format=function(y){var x=this,b=this.$locale();if(!this.isValid())return b.invalidDate||w;var E=y||"YYYY-MM-DDTHH:mm:ssZ",z=v.z(this),N=this.$H,U=this.$m,W=this.$M,q=b.weekdays,Z=b.months,ce=b.meridiem,ie=function(re,me,Le,Me){return re&&(re[me]||re(x,E))||Le[me].slice(0,Me)},K=function(re){return v.s(N%12||12,re,"0")},de=ce||function(re,me,Le){var Me=re<12?"AM":"PM";return Le?Me.toLowerCase():Me};return E.replace(A,(function(re,me){return me||(function(Le){switch(Le){case"YY":return String(x.$y).slice(-2);case"YYYY":return v.s(x.$y,4,"0");case"M":return W+1;case"MM":return v.s(W+1,2,"0");case"MMM":return ie(b.monthsShort,W,Z,3);case"MMMM":return ie(Z,W);case"D":return x.$D;case"DD":return v.s(x.$D,2,"0");case"d":return String(x.$W);case"dd":return ie(b.weekdaysMin,x.$W,q,2);case"ddd":return ie(b.weekdaysShort,x.$W,q,3);case"dddd":return q[x.$W];case"H":return String(N);case"HH":return v.s(N,2,"0");case"h":return K(1);case"hh":return K(2);case"a":return de(N,U,!0);case"A":return de(N,U,!1);case"m":return String(U);case"mm":return v.s(U,2,"0");case"s":return String(x.$s);case"ss":return v.s(x.$s,2,"0");case"SSS":return v.s(x.$ms,3,"0");case"Z":return z}return null})(re)||z.replace(":","")}))},C.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},C.diff=function(y,x,b){var E,z=this,N=v.p(x),U=$(y),W=(U.utcOffset()-this.utcOffset())*r,q=this-U,Z=function(){return v.m(z,U)};switch(N){case f:E=Z()/12;break;case p:E=Z();break;case h:E=Z()/3;break;case u:E=(q-W)/6048e5;break;case c:E=(q-W)/864e5;break;case d:E=q/o;break;case l:E=q/r;break;case s:E=q/t;break;default:E=q}return b?E:v.a(E)},C.daysInMonth=function(){return this.endOf(p).$D},C.$locale=function(){return G[this.$L]},C.locale=function(y,x){if(!y)return this.$L;var b=this.clone(),E=I(y,x,!0);return E&&(b.$L=E),b},C.clone=function(){return v.w(this.$d,this)},C.toDate=function(){return new Date(this.valueOf())},C.toJSON=function(){return this.isValid()?this.toISOString():null},C.toISOString=function(){return this.$d.toISOString()},C.toString=function(){return this.$d.toUTCString()},k})(),M=F.prototype;return $.prototype=M,[["$ms",a],["$s",s],["$m",l],["$H",d],["$W",c],["$M",p],["$y",f],["$D",g]].forEach((function(k){M[k[1]]=function(C){return this.$g(C,k[0],k[1])}})),$.extend=function(k,C){return k.$i||(k(C,F,$),k.$i=!0),$},$.locale=I,$.isDayjs=Y,$.unix=function(k){return $(1e3*k)},$.en=G[V],$.Ls=G,$.p={},$}))})(Fe)),Fe.exports}var $a=Da();const br=ka($a),Ea=({setDateFilter:n,setShowRange:e,setDates:t})=>{const r=s=>s&&s>br().endOf("day"),o=s=>{if(s&&s[0]&&s[1]){const l=ee.toISODateString(s[0].toDate()),d=ee.toISODateString(s[1].toDate());t([l,d]),n(c=>({...c,startDate:l,endDate:d})),e(!1)}},a={lang:{locale:X.language,shortMonths:[oe("0"),oe("1"),oe("2"),oe("3"),oe("4"),oe("5"),oe("6"),oe("7"),oe("8"),oe("9"),oe("10"),oe("11")],shortWeekDays:[xe("Sun"),xe("Mon"),xe("Tue"),xe("Wed"),xe("Thu"),xe("Fri"),xe("Sat")]}};return i.jsx(Zt,{dropdownClassName:"date-picker-column-style",locale:a,open:!0,allowClear:!0,format:"MMM D, YYYY",placeholder:["From","To"],getPopupContainer:s=>{var l;return((l=s==null?void 0:s.parentElement)==null?void 0:l.parentElement)??document.body},onOpenChange:s=>{s||e(!1)},onChange:s=>o(s),disabledDate:r})},Oa=m(Nn)`
2901
- border: ${n=>n.border||"1px solid transparent"};
2902
- .ant-select-dropdown {
2903
- max-height: 200px;
2904
- overflow-y: auto;
2905
- }
2906
- width: ${n=>n.width||"auto"};
2907
- `,Ta=({setDateFilters:n,hasAllFilter:e=!1})=>{const[t,r]=S.useState([]),o=[{key:"week",label:Ce("7D"),...ee.getCommonDateRange("week")},{key:"month",label:Ce("30D"),...ee.getCommonDateRange("month")},{key:"threeMonth",label:Ce("3M"),...ee.getCommonDateRange("threeMonth")},{key:"sixMonth",label:Ce("6M"),...ee.getCommonDateRange("sixMonth")},{key:"twelveMonth",label:Ce("12M"),...ee.getCommonDateRange("twelveMonth")},{key:"year",label:Ce("YTD"),...ee.getCommonDateRange("year")},{key:"custom",label:t.length===2&&t[0]!==""?`${B("Custom")}: ${t[0]} / ${t[1]}`:B("Custom"),...ee.getCommonDateRange("custom")}],[a,s]=S.useState(),l=S.useMemo(()=>e?[{key:"all",label:B("All"),...ee.getCommonDateRange("all")},...o]:o,[e,t]);function d(c){if(c==="custom")s(!0);else{s(!1);const u=l.find(p=>p.key===c);u&&n(p=>({...p,startDate:u.startDate,endDate:u.endDate}))}return c}return i.jsxs(oa,{id:"tabs-container",children:[i.jsx(na,{type:"editable-card",items:l,onTabClick:d,activeKey:a?"custom":void 0,removeIcon:!0,hideAdd:!0}),a&&i.jsx(aa,{children:i.jsx(Ea,{setDates:r,setDateFilter:n,setShowRange:s,getPopupContainer:()=>document.getElementById("tabs-container")})}),i.jsx(Oa,{border:"1px solid var(--color-border-brand-special, #02e0ae)",className:"tab-select",width:"200px",placeholder:B("Choose"),getPopupContainer:c=>c.parentElement,onChange:d,options:l.map(c=>({value:c.key,label:c.label}))})]})},vr=m.div`
2908
- .ant-dropdown-menu {
2909
- border-radius: 2px !important;
2910
- background: var(--color-bg-quaternary, #2f2f2f) !important;
2911
- width: 150px !important;
2912
- padding: 0 !important;
2913
- }
2914
-
2915
- .ant-dropdown-menu-item {
2916
- padding: 0 !important; /* რომ შიდა კონტენტი გაიწელოს */
2917
-
2918
- &:hover {
2919
- background-color: rgba(255, 255, 255, 0.05) !important;
2920
- }
2921
- }
2922
-
2923
- .ant-dropdown-menu-title-content {
2924
- color: var(--color-text-primary, #fff) !important;
2925
- font-family: Geist;
2926
- font-size: var(--typo-caption-size-medium, 14px);
2927
- font-weight: 400;
2928
- line-height: var(--typo-caption-lineHeight-medium, 18px);
2929
- letter-spacing: var(--typo-caption-spacing-medium, 0.1px);
2930
- padding: 8px 12px; /* აქ დაარეგულირე შიდა დაშორება */
2931
- display: block;
2932
- }
2933
- `,Ia=(n,e)=>{const t=window.URL.createObjectURL(n),r=document.createElement("a");r.href=t,r.setAttribute("download",e),document.body.appendChild(r),r.click(),document.body.removeChild(r),window.URL.revokeObjectURL(t)},za=(n,e)=>{const t=new Blob([n],{type:"text/csv;charset=utf-8;"}),r=window.URL.createObjectURL(t),o=document.createElement("a");o.href=r,o.setAttribute("download",e),document.body.appendChild(o),o.click(),document.body.removeChild(o),window.URL.revokeObjectURL(r)},Ma=m(H.Dropdown)`
2934
- background: var(--color-bg-secondary, #f0ededff) !important;
2935
- font-size: 14px;
2936
- font-weight: 500;
2937
-
2938
- .menu .ant-dropdown-menu-item .ant-dropdown-trigger {
2939
- padding: 10px 14px !important;
2940
- border-radius: 8px !important;
2941
- background: #000 !important;
2942
-
2943
- font-size: 14px;
2944
- font-weight: 500;
2945
- color: var(--color-text-primary, #000000ff) !important;
2946
- }
2947
- `,Pa=m.div`
2948
- background-color: red;
2949
- padding: 5px;
2950
- background: var(--color-bg-opaque-primary, rgba(255, 255, 255, 0.05));
2951
- color: var(--color-text-primary, #fff);
2952
- cursor: pointer;
2953
- `,Ha=({exportFileName:n,filters:e,service:t})=>{const r=async a=>{try{const{PageSize:s,Page:l,...d}=e,u=(await t(d,a)).data;a==="xlsx"?Ia(u,`${n}.${a}`):za(u,`${n}`)}catch(s){console.error("Export failed:",s)}},o=[{key:"1",label:`${B("ExportAs")} ${B("Xlsx")}`,onClick:()=>r("xlsx")},{key:"2",label:`${B("ExportAs")} ${B("Csv")}`,onClick:()=>r("csv")}];return i.jsx(Ma,{menu:{items:o,className:"dropdown-menu"},popupRender:a=>i.jsx(vr,{children:a}),placement:"bottomLeft",children:i.jsx(Pa,{children:B("Export")})})},wr=(n,e,t)=>{const r=n.filter(p=>e[p.id]),o=Object.keys(r[0]),a=r.map(p=>o.map(h=>{const f=p[h];return f==null?"":typeof f=="object"?Object.values(f).find(w=>typeof w!="object")??"":f})),s=[o,...a].map(p=>p.map(h=>`"${(h||"").toString().replace(/"/g,'""')}"`).join(",")).join(`\r
2954
- `),l="\uFEFF",d=new Blob([l+s],{type:"text/csv;charset=utf-8;"}),c=document.createElement("a"),u=URL.createObjectURL(d);c.setAttribute("href",u),c.setAttribute("download",t),document.body.appendChild(c),c.click(),document.body.removeChild(c),URL.revokeObjectURL(u)},Sr=(n,e,t)=>{const o=n.filter(p=>e[p.id]).map(p=>{const h={};return Object.entries(p).forEach(([f,g])=>{if(g==null)h[f]="";else if(typeof g=="object"){const w=Object.values(g).find(O=>typeof O!="object");h[f]=w??""}else h[f]=g}),h}),a=He.utils.json_to_sheet(o),s=He.utils.book_new();He.utils.book_append_sheet(s,a,"Data");const l=He.write(s,{bookType:"xlsx",type:"array"}),d=new Blob([l],{type:"application/octet-stream"}),c=URL.createObjectURL(d),u=document.createElement("a");u.href=c,u.download=t,document.body.appendChild(u),u.click(),document.body.removeChild(u),URL.revokeObjectURL(c)},Ra=m(H.Dropdown)`
2955
- background: var(--color-bg-secondary, #f0ededff) !important;
2956
- font-size: 14px;
2957
- font-weight: 500;
2958
-
2959
- .menu .ant-dropdown-menu-item .ant-dropdown-trigger {
2960
- padding: 10px 14px !important;
2961
- border-radius: 8px !important;
2962
- background: #000 !important;
2963
-
2964
- font-size: 14px;
2965
- font-weight: 500;
2966
- color: var(--color-text-primary, #000000ff) !important;
2967
- }
2968
- `,Fa=m.div`
2969
- background-color: red;
2970
- padding: 5px;
2971
- background: var(--color-bg-opaque-primary, rgba(255, 255, 255, 0.05));
2972
- color: var(--color-text-primary, #fff);
2973
- cursor: pointer;
2974
- `,Na=({tableData:n,checked:e,fileName:t})=>{const r=async a=>{try{a==="xlsx"?Sr(n,e,t+".xlsx"):wr(n,e,t+".csv")}catch(s){console.error("Export failed:",s)}},o=[{key:"1",label:`${B("ExportAs")} ${B("Xlsx")}`,onClick:()=>r("xlsx")},{key:"2",label:`${B("ExportAs")} ${B("Csv")}`,onClick:()=>r("csv")}];return i.jsx(Ra,{menu:{items:o,className:"dropdown-menu"},popupRender:a=>i.jsx(vr,{children:a}),placement:"bottomLeft",children:i.jsx(Fa,{children:B("Export")})})},Va=({value:n,onChange:e,...t})=>{const r=n?br(n):null,o=a=>{a?e==null||e(ee.toISODateString(a.toDate())):e==null||e(null)};return i.jsx(H.DatePicker,{value:r,onChange:o,allowClear:!0,...t})},Aa=({id:n,refetchFormItems:e,redirectPrevPage:t,updateItem:r,addItem:o,getItemById:a,onSetFormValues:s})=>{const l=ne.useNavigate(),[d]=H.Form.useForm(),[c,u]=S.useState(n=="new"),[p,h]=S.useState(null),f=async w=>{const O=window.location.pathname,A=O.substring(0,O.lastIndexOf("/"));try{if(p){let j;return n?j=await r({...w,id:n}):j=await r(w),t!==!1&&j.data.success===!0&&l(A),j}else{const j=await o(w);return t!==!1&&j.data.success===!0&&l(A),j}}catch(j){if(j.status===400){const L=j.response.data,T=ve(L.errors);d.setFields(T)}}},g=async w=>{try{const O=await a(w),A=s?s(O.data):O.data;h(A),d.setFieldsValue(A)}catch(O){console.log(O,"Error in Form Controller.")}};return S.useEffect(()=>{u(n=="new"),n!="new"?g(Number(n)):d.resetFields()},[n,e]),{form:d,item:p,getItemById:a,isAddingForm:c,handleSave:f}},Ba=({id:n,formItem:e,updateItem:t,addItem:r,getItemById:o})=>{const[a]=H.Form.useForm(),[s,l]=S.useState(null),d=async u=>{try{let p;return n?p=await t({...u}):p=await r(u),p}catch(p){if(p.status===400){const h=p.response.data,f=ve(h.errors);a.setFields(f)}throw p}},c=async u=>{try{const h=(await o(u)).data;l(h),a.setFieldsValue(h)}catch(p){console.log(p,"Error in Form Controller.")}};return S.useEffect(()=>{try{if(!e)return;l(e),a.setFieldsValue(e)}catch(u){console.log(u,"Error in Form Controller.")}},[e]),S.useEffect(()=>{n&&c(Number(n))},[n]),{form:a,item:s,handleSave:d}},Ga=()=>{const n=ne.useNavigate(),{setUser:e}=Se(),[t,r]=S.useState({visible:!1,token:""}),o=s=>{e(s),r({visible:!1,token:""}),n("/")};return{handleTwoFactorResponse:(s,l)=>{const{success:d,value:c}=s.data;if(!d)throw new Error("Authentication failed");if(c.isTwoFactorRequired){r({visible:!0,token:c.token,id:c.id,mfaType:c.mfaType});return}l&&o(c)},finalizeLogin:o,twoFactor:t,setTwoFactor:r}};function Ua(n){const{navigator:e}=S.useContext(ne.UNSAFE_NavigationContext),t=ne.useLocation();S.useEffect(()=>{if(!n)return;const r=e.push,o=e.replace,a=s=>(...l)=>{H.Modal.confirm({title:"UnsavedChanges",content:"UnsavedMoveDesc",okText:"Leave",className:"custom-confirm-modal",cancelText:"Save",okButtonProps:{className:"ok-text-btn"},cancelButtonProps:{className:"no-hover-cancel-btn"},onOk:()=>{s(...l)},onCancel:()=>{}})};return e.push=a(r),e.replace=a(o),()=>{e.push=r,e.replace=o}},[n,e,t]),S.useEffect(()=>{const r=o=>{n&&(o.preventDefault(),o.returnValue="")};return window.addEventListener("beforeunload",r),()=>{window.removeEventListener("beforeunload",r)}},[n])}function _a(n){S.useEffect(()=>{const e=t=>{t.animationName==="onAutoFillStart"&&n(t)};return document.addEventListener("animationstart",e,!0),()=>{document.removeEventListener("animationstart",e,!0)}},[])}function Wa(n,e){if(!n)return"";const t=new Date(n);if(isNaN(t.getTime()))return"";const r=t.getDate(),o=t.getMonth(),a=t.getFullYear(),l=`${r} ${o}, ${a}`;if(e!=null&&e.withTime){const d=t.getHours().toString().padStart(2,"0"),c=t.getMinutes().toString().padStart(2,"0");return`${l} ${d}:${c}`}return l}function Ya(n,e="en-US"){return n<1?0:n?n.toLocaleString(e):""}const Ka=(n,e)=>Array.isArray(n)?n.filter(t=>t.type?(Array.isArray(t.type)?t.type:[t.type]).some(o=>e.includes(o)):!1):[],$e=n=>n.replace(/^[A-Z]+/,e=>e.length===n.length?e.toLowerCase():e.length>1?e.slice(0,-1).toLowerCase()+e.slice(-1):e.toLowerCase()),qa=/^Commissions\[(\d+)\]\.(\w+)\.(\w+)\[(\d+)\]\.(\w+)$/,Za=/^Commissions\[(\d+)\]\.(\w+)\.(\w+)$/,Ja=/^Commissions\[(\d+)\]\.(\w+)\.(\w+)\.(\w+)$/,Xa=/^Commissions\[(\d+)\]$/;function Qa(n){const{errors:e}=n.response.data,t=Object.keys(e)[0],r=e[t][0],o=t.match(qa);if(o){const[,l,d,c,u,p]=o;return{brandIndex:Number(l),generalType:$e(d),specificType:$e(c),itemIndex:Number(u),field:$e(p),message:r}}const a=t.match(Za)||t.match(Ja);if(a){const[,l,d,c]=a;return{brandIndex:Number(l),generalType:$e(d),specificType:$e(c),message:r}}const s=t.match(Xa);return s?{brandIndex:Number(s[1]),message:r}:(console.warn("parseCommissionErrors: unrecognized key format from the validations on commissions",t),null)}const ei=m(H.Empty)`
2826
+ `,H=n=>typeof n=="string",De=()=>{let n,e;const t=new Promise((r,o)=>{n=r,e=o});return t.resolve=n,t.reject=e,t},Ot=n=>n==null?"":String(n),la=(n,e,t)=>{n.forEach(r=>{e[r]&&(t[r]=e[r])})},ca=/###/g,Tt=n=>n&&n.includes("###")?n.replace(ca,"."):n,It=n=>!n||H(n),Oe=(n,e,t)=>{const r=H(e)?e.split("."):e;let o=0;for(;o<r.length-1;){if(It(n))return{};const a=Tt(r[o]);!n[a]&&t&&(n[a]=new t),Object.prototype.hasOwnProperty.call(n,a)?n=n[a]:n={},++o}return It(n)?{}:{obj:n,k:Tt(r[o])}},zt=(n,e,t)=>{const{obj:r,k:o}=Oe(n,e,Object);if(r!==void 0||e.length===1){r[o]=t;return}let a=e[e.length-1],s=e.slice(0,e.length-1),l=Oe(n,s,Object);for(;l.obj===void 0&&s.length;)a=`${s[s.length-1]}.${a}`,s=s.slice(0,s.length-1),l=Oe(n,s,Object),l!=null&&l.obj&&typeof l.obj[`${l.k}.${a}`]<"u"&&(l.obj=void 0);l.obj[`${l.k}.${a}`]=t},da=(n,e,t,r)=>{const{obj:o,k:a}=Oe(n,e,Object);o[a]=o[a]||[],o[a].push(t)},Ge=(n,e)=>{const{obj:t,k:r}=Oe(n,e);if(t&&Object.prototype.hasOwnProperty.call(t,r))return t[r]},pa=(n,e,t)=>{const r=Ge(n,t);return r!==void 0?r:Ge(e,t)},vr=(n,e,t)=>{for(const r in e)r!=="__proto__"&&r!=="constructor"&&(r in n?H(n[r])||n[r]instanceof String||H(e[r])||e[r]instanceof String?t&&(n[r]=e[r]):vr(n[r],e[r],t):n[r]=e[r]);return n},ye=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),ua={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},fa=n=>H(n)?n.replace(/[&<>"'\/]/g,e=>ua[e]):n;class ga{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(t!==void 0)return t;const r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}const ha=[" ",",","?","!",";"],ma=new ga(20),xa=(n,e,t)=>{e=e||"",t=t||"";const r=ha.filter(s=>!e.includes(s)&&!t.includes(s));if(r.length===0)return!0;const o=ma.getRegExp(`(${r.map(s=>s==="?"?"\\?":s).join("|")})`);let a=!o.test(n);if(!a){const s=n.indexOf(t);s>0&&!o.test(n.substring(0,s))&&(a=!0)}return a},nt=(n,e,t=".")=>{if(!n)return;if(n[e])return Object.prototype.hasOwnProperty.call(n,e)?n[e]:void 0;const r=e.split(t);let o=n;for(let a=0;a<r.length;){if(!o||typeof o!="object")return;let s,l="";for(let d=a;d<r.length;++d)if(d!==a&&(l+=t),l+=r[d],s=o[l],s!==void 0){if(["string","number","boolean"].includes(typeof s)&&d<r.length-1)continue;a+=d-a+1;break}o=s}return o},Me=n=>n==null?void 0:n.replace(/_/g,"-"),ya={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,e){var t,r;(r=(t=console==null?void 0:console[n])==null?void 0:t.apply)==null||r.call(t,console,e)}};class Ue{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||ya,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,r,o){return o&&!this.debug?null:(H(e[0])&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new Ue(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new Ue(this.logger,e)}}var le=new Ue;class qe{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const o=this.observers[r].get(t)||0;this.observers[r].set(t,o+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}once(e,t){const r=(...o)=>{t(...o),this.off(e,r)};return this.on(e,r),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([o,a])=>{for(let s=0;s<a;s++)o(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([o,a])=>{for(let s=0;s<a;s++)o(e,...t)})}}class Mt extends qe{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.includes(e)||this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,r,o={}){var c,u;const a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,s=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;e.includes(".")?l=e.split("."):(l=[e,t],r&&(Array.isArray(r)?l.push(...r):H(r)&&a?l.push(...r.split(a)):l.push(r)));const d=Ge(this.data,l);return!d&&!t&&!r&&e.includes(".")&&(e=l[0],t=l[1],r=l.slice(2).join(".")),d||!s||!H(r)?d:nt((u=(c=this.data)==null?void 0:c[e])==null?void 0:u[t],r,a)}addResource(e,t,r,o,a={silent:!1}){const s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let l=[e,t];r&&(l=l.concat(s?r.split(s):r)),e.includes(".")&&(l=e.split("."),o=t,t=l[1]),this.addNamespaces(t),zt(this.data,l,o),a.silent||this.emit("added",e,t,r,o)}addResources(e,t,r,o={silent:!1}){for(const a in r)(H(r[a])||Array.isArray(r[a]))&&this.addResource(e,t,a,r[a],{silent:!0});o.silent||this.emit("added",e,t,r)}addResourceBundle(e,t,r,o,a,s={silent:!1,skipCopy:!1}){let l=[e,t];e.includes(".")&&(l=e.split("."),o=r,r=t,t=l[1]),this.addNamespaces(t);let d=Ge(this.data,l)||{};s.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?vr(d,r,a):d={...d,...r},zt(this.data,l,d),s.silent||this.emit("added",e,t,r)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(o=>t[o]&&Object.keys(t[o]).length>0)}toJSON(){return this.data}}var wr={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,e,t,r,o){return n.forEach(a=>{var s;e=((s=this.processors[a])==null?void 0:s.process(e,t,r,o))??e}),e}};const Sr=Symbol("i18next/PATH_KEY");function ba(){const n=[],e=Object.create(null);let t;return e.get=(r,o)=>{var a;return(a=t==null?void 0:t.revoke)==null||a.call(t),o===Sr?n:(n.push(o),t=Proxy.revocable(r,e),t.proxy)},Proxy.revocable(Object.create(null),e).proxy}function je(n,e){const{[Sr]:t}=n(ba()),r=(e==null?void 0:e.keySeparator)??".",o=(e==null?void 0:e.nsSeparator)??":";if(t.length>1&&o){const a=e==null?void 0:e.ns,s=Array.isArray(a)?a:null;if(s&&s.length>1&&s.slice(1).includes(t[0]))return`${t[0]}${o}${t.slice(1).join(r)}`}return t.join(r)}const Je=n=>!H(n)&&typeof n!="boolean"&&typeof n!="number";class _e extends qe{constructor(e,t={}){super(),la(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=le.create("translator"),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const r={...t};if(e==null)return!1;const o=this.resolve(e,r);if((o==null?void 0:o.res)===void 0)return!1;const a=Je(o.res);return!(r.returnObjects===!1&&a)}extractFromKey(e,t){let r=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let a=t.ns||this.options.defaultNS||[];const s=r&&e.includes(r),l=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!xa(e,r,o);if(s&&!l){const d=e.match(this.interpolator.nestingRegexp);if(d&&d.length>0)return{key:e,namespaces:H(a)?[a]:a};const c=e.split(r);(r!==o||r===o&&this.options.ns.includes(c[0]))&&(a=c.shift()),e=c.join(o)}return{key:e,namespaces:H(a)?[a]:a}}translate(e,t,r){let o=typeof t=="object"?{...t}:t;if(typeof o!="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),typeof o=="object"&&(o={...o}),o||(o={}),e==null)return"";typeof e=="function"&&(e=je(e,{...this.options,...o})),Array.isArray(e)||(e=[String(e)]),e=e.map(M=>typeof M=="function"?je(M,{...this.options,...o}):String(M));const a=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,{key:l,namespaces:d}=this.extractFromKey(e[e.length-1],o),c=d[d.length-1];let u=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;u===void 0&&(u=":");const p=o.lng||this.language,h=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((p==null?void 0:p.toLowerCase())==="cimode")return h?a?{res:`${c}${u}${l}`,usedKey:l,exactUsedKey:l,usedLng:p,usedNS:c,usedParams:this.getUsedParamsDetails(o)}:`${c}${u}${l}`:a?{res:l,usedKey:l,exactUsedKey:l,usedLng:p,usedNS:c,usedParams:this.getUsedParamsDetails(o)}:l;const f=this.resolve(e,o);let g=f==null?void 0:f.res;const w=(f==null?void 0:f.usedKey)||l,O=(f==null?void 0:f.exactUsedKey)||l,A=["[object Number]","[object Function]","[object RegExp]"],j=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,L=!this.i18nFormat||this.i18nFormat.handleAsObject,T=o.count!==void 0&&!H(o.count),V=_e.hasDefaultValue(o),G=T?this.pluralResolver.getSuffix(p,o.count,o):"",_=o.ordinal&&T?this.pluralResolver.getSuffix(p,o.count,{ordinal:!1}):"",Y=T&&!o.ordinal&&o.count===0,I=Y&&o[`defaultValue${this.options.pluralSeparator}zero`]||o[`defaultValue${G}`]||o[`defaultValue${_}`]||o.defaultValue;let $=g;L&&!g&&V&&($=I);const v=Je($),F=Object.prototype.toString.apply($);if(L&&$&&v&&!A.includes(F)&&!(H(j)&&Array.isArray($))){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const M=this.options.returnedObjectHandler?this.options.returnedObjectHandler(w,$,{...o,ns:d}):`key '${l} (${this.language})' returned an object instead of string.`;return a?(f.res=M,f.usedParams=this.getUsedParamsDetails(o),f):M}if(s){const M=Array.isArray($),k=M?[]:{},C=M?O:w;for(const y in $)if(Object.prototype.hasOwnProperty.call($,y)){const x=`${C}${s}${y}`;V&&!g?k[y]=this.translate(x,{...o,defaultValue:Je(I)?I[y]:void 0,joinArrays:!1,ns:d}):k[y]=this.translate(x,{...o,joinArrays:!1,ns:d}),k[y]===x&&(k[y]=$[y])}g=k}}else if(L&&H(j)&&Array.isArray(g))g=g.join(j),g&&(g=this.extendTranslation(g,e,o,r));else{let M=!1,k=!1;!this.isValidLookup(g)&&V&&(M=!0,g=I),this.isValidLookup(g)||(k=!0,g=l);const y=(o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&k?void 0:g,x=V&&I!==g&&this.options.updateMissing;if(k||M||x){if(this.logger.log(x?"updateKey":"missingKey",p,c,l,x?I:g),s){const N=this.resolve(l,{...o,keySeparator:!1});N&&N.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let b=[];const E=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&E&&E[0])for(let N=0;N<E.length;N++)b.push(E[N]);else this.options.saveMissingTo==="all"?b=this.languageUtils.toResolveHierarchy(o.lng||this.language):b.push(o.lng||this.language);const z=(N,U,W)=>{var Z;const q=V&&W!==g?W:y;this.options.missingKeyHandler?this.options.missingKeyHandler(N,c,U,q,x,o):(Z=this.backendConnector)!=null&&Z.saveMissing&&this.backendConnector.saveMissing(N,c,U,q,x,o),this.emit("missingKey",N,c,U,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&T?b.forEach(N=>{const U=this.pluralResolver.getSuffixes(N,o);Y&&o[`defaultValue${this.options.pluralSeparator}zero`]&&!U.includes(`${this.options.pluralSeparator}zero`)&&U.push(`${this.options.pluralSeparator}zero`),U.forEach(W=>{z([N],l+W,o[`defaultValue${W}`]||I)})}):z(b,l,I))}g=this.extendTranslation(g,e,o,f,r),k&&g===l&&this.options.appendNamespaceToMissingKey&&(g=`${c}${u}${l}`),(k||M)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${u}${l}`:l,M?g:void 0,o))}return a?(f.res=g,f.usedParams=this.getUsedParamsDetails(o),f):g}extendTranslation(e,t,r,o,a){var d,c;if((d=this.i18nFormat)!=null&&d.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=H(e)&&(((c=r==null?void 0:r.interpolation)==null?void 0:c.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let p;if(u){const f=e.match(this.interpolator.nestingRegexp);p=f&&f.length}let h=r.replace&&!H(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),e=this.interpolator.interpolate(e,h,r.lng||this.language||o.usedLng,r),u){const f=e.match(this.interpolator.nestingRegexp),g=f&&f.length;p<g&&(r.nest=!1)}!r.lng&&o&&o.res&&(r.lng=this.language||o.usedLng),r.nest!==!1&&(e=this.interpolator.nest(e,(...f)=>(a==null?void 0:a[0])===f[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${f[0]} in key: ${t[0]}`),null):this.translate(...f,t),r)),r.interpolation&&this.interpolator.reset()}const s=r.postProcess||this.options.postProcess,l=H(s)?[s]:s;return e!=null&&(l!=null&&l.length)&&r.applyPostProcessor!==!1&&(e=wr.handle(l,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e,t={}){let r,o,a,s,l;return H(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(d=>typeof d=="function"?je(d,{...this.options,...t}):d)),e.forEach(d=>{if(this.isValidLookup(r))return;const c=this.extractFromKey(d,t),u=c.key;o=u;let p=c.namespaces;this.options.fallbackNS&&(p=p.concat(this.options.fallbackNS));const h=t.count!==void 0&&!H(t.count),f=h&&!t.ordinal&&t.count===0,g=t.context!==void 0&&(H(t.context)||typeof t.context=="number")&&t.context!=="",w=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);p.forEach(O=>{var A,j;this.isValidLookup(r)||(l=O,!this.checkedLoadedFor[`${w[0]}-${O}`]&&((A=this.utils)!=null&&A.hasLoadedNamespace)&&!((j=this.utils)!=null&&j.hasLoadedNamespace(l))&&(this.checkedLoadedFor[`${w[0]}-${O}`]=!0,this.logger.warn(`key "${o}" for languages "${w.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),w.forEach(L=>{var G;if(this.isValidLookup(r))return;s=L;const T=[u];if((G=this.i18nFormat)!=null&&G.addLookupKeys)this.i18nFormat.addLookupKeys(T,u,L,O,t);else{let _;h&&(_=this.pluralResolver.getSuffix(L,t.count,t));const Y=`${this.options.pluralSeparator}zero`,I=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(t.ordinal&&_.startsWith(I)&&T.push(u+_.replace(I,this.options.pluralSeparator)),T.push(u+_),f&&T.push(u+Y)),g){const $=`${u}${this.options.contextSeparator||"_"}${t.context}`;T.push($),h&&(t.ordinal&&_.startsWith(I)&&T.push($+_.replace(I,this.options.pluralSeparator)),T.push($+_),f&&T.push($+Y))}}let V;for(;V=T.pop();)this.isValidLookup(r)||(a=V,r=this.getResource(L,O,V,t))}))})}),{res:r,usedKey:o,exactUsedKey:a,usedLng:s,usedNS:l}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,r,o={}){var a;return(a=this.i18nFormat)!=null&&a.getResource?this.i18nFormat.getResource(e,t,r,o):this.resourceStore.getResource(e,t,r,o)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=e.replace&&!H(e.replace);let o=r?e.replace:e;if(r&&typeof e.count<"u"&&(o.count=e.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!r){o={...o};for(const a of t)delete o[a]}return o}static hasDefaultValue(e){const t="defaultValue";for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&r.startsWith(t)&&e[r]!==void 0)return!0;return!1}}class Pt{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=le.create("languageUtils")}getScriptPartFromCode(e){if(e=Me(e),!e||!e.includes("-"))return null;const t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=Me(e),!e||!e.includes("-"))return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(H(e)&&e.includes("-")){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(r=>{if(t)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(t=o)}),!t&&this.options.supportedLngs&&e.forEach(r=>{if(t)return;const o=this.getScriptPartFromCode(r);if(this.isSupportedCode(o))return t=o;const a=this.getLanguagePartFromCode(r);if(this.isSupportedCode(a))return t=a;t=this.options.supportedLngs.find(s=>s===a?!0:!s.includes("-")&&!a.includes("-")?!1:!!(s.includes("-")&&!a.includes("-")&&s.slice(0,s.indexOf("-"))===a||s.startsWith(a)&&a.length>1))}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),H(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}toResolveHierarchy(e,t){const r=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),o=[],a=s=>{s&&(this.isSupportedCode(s)?o.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return H(e)&&(e.includes("-")||e.includes("_"))?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(e))):H(e)&&a(this.formatLanguageCode(e)),r.forEach(s=>{o.includes(s)||a(this.formatLanguageCode(s))}),o}}const Ht={zero:0,one:1,two:2,few:3,many:4,other:5},Rt={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class va{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=le.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const r=Me(e==="dev"?"en":e),o=t.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:r,type:o});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let s;try{s=new Intl.PluralRules(r,{type:o})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),Rt;if(!e.match(/-|_/))return Rt;const d=this.languageUtils.getLanguagePartFromCode(e);s=this.getRule(d,t)}return this.pluralRulesCache[a]=s,s}needsPlural(e,t={}){let r=this.getRule(e,t);return r||(r=this.getRule("dev",t)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,t,r={}){return this.getSuffixes(e,r).map(o=>`${t}${o}`)}getSuffixes(e,t={}){let r=this.getRule(e,t);return r||(r=this.getRule("dev",t)),r?r.resolvedOptions().pluralCategories.sort((o,a)=>Ht[o]-Ht[a]).map(o=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${o}`):[]}getSuffix(e,t,r={}){const o=this.getRule(e,r);return o?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,r))}}const Ft=(n,e,t,r=".",o=!0)=>{let a=pa(n,e,t);return!a&&o&&H(t)&&(a=nt(n,t,r),a===void 0&&(a=nt(e,t,r))),a},Xe=n=>n.replace(/\$/g,"$$$$");class Nt{constructor(e={}){var t;this.logger=le.create("interpolator"),this.options=e,this.format=((t=e==null?void 0:e.interpolation)==null?void 0:t.format)||(r=>r),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:r,useRawValueToEscape:o,prefix:a,prefixEscaped:s,suffix:l,suffixEscaped:d,formatSeparator:c,unescapeSuffix:u,unescapePrefix:p,nestingPrefix:h,nestingPrefixEscaped:f,nestingSuffix:g,nestingSuffixEscaped:w,nestingOptionsSeparator:O,maxReplaces:A,alwaysFormat:j}=e.interpolation;this.escape=t!==void 0?t:fa,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=a?ye(a):s||"{{",this.suffix=l?ye(l):d||"}}",this.formatSeparator=c||",",this.unescapePrefix=u?"":p||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=h?ye(h):f||ye("$t("),this.nestingSuffix=g?ye(g):w||ye(")"),this.nestingOptionsSeparator=O||",",this.maxReplaces=A||1e3,this.alwaysFormat=j!==void 0?j:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,r)=>(t==null?void 0:t.source)===r?(t.lastIndex=0,t):new RegExp(r,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,r,o){var f;let a,s,l;const d=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=g=>{if(!g.includes(this.formatSeparator)){const j=Ft(t,d,g,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(j,void 0,r,{...o,...t,interpolationkey:g}):j}const w=g.split(this.formatSeparator),O=w.shift().trim(),A=w.join(this.formatSeparator).trim();return this.format(Ft(t,d,O,this.options.keySeparator,this.options.ignoreJSONStructure),A,r,{...o,...t,interpolationkey:O})};this.resetRegExp();const u=(o==null?void 0:o.missingInterpolationHandler)||this.options.missingInterpolationHandler,p=((f=o==null?void 0:o.interpolation)==null?void 0:f.skipOnVariables)!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:g=>Xe(g)},{regex:this.regexp,safeValue:g=>this.escapeValue?Xe(this.escape(g)):Xe(g)}].forEach(g=>{for(l=0;a=g.regex.exec(e);){const w=a[1].trim();if(s=c(w),s===void 0)if(typeof u=="function"){const A=u(e,a,o);s=H(A)?A:""}else if(o&&Object.prototype.hasOwnProperty.call(o,w))s="";else if(p){s=a[0];continue}else this.logger.warn(`missed to pass in variable ${w} for interpolating ${e}`),s="";else!H(s)&&!this.useRawValueToEscape&&(s=Ot(s));const O=g.safeValue(s);if(e=e.replace(a[0],O),p?(g.regex.lastIndex+=s.length,g.regex.lastIndex-=a[0].length):g.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),e}nest(e,t,r={}){let o,a,s;const l=(d,c)=>{const u=this.nestingOptionsSeparator;if(!d.includes(u))return d;const p=d.split(new RegExp(`${ye(u)}[ ]*{`));let h=`{${p[1]}`;d=p[0],h=this.interpolate(h,s);const f=h.match(/'/g),g=h.match(/"/g);(((f==null?void 0:f.length)??0)%2===0&&!g||((g==null?void 0:g.length)??0)%2!==0)&&(h=h.replace(/'/g,'"'));try{s=JSON.parse(h),c&&(s={...c,...s})}catch(w){return this.logger.warn(`failed parsing options string in nesting for key ${d}`,w),`${d}${u}${h}`}return s.defaultValue&&s.defaultValue.includes(this.prefix)&&delete s.defaultValue,d};for(;o=this.nestingRegexp.exec(e);){let d=[];s={...r},s=s.replace&&!H(s.replace)?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;const c=/{.*}/.test(o[1])?o[1].lastIndexOf("}")+1:o[1].indexOf(this.formatSeparator);if(c!==-1&&(d=o[1].slice(c).split(this.formatSeparator).map(u=>u.trim()).filter(Boolean),o[1]=o[1].slice(0,c)),a=t(l.call(this,o[1].trim(),s),s),a&&o[0]===e&&!H(a))return a;H(a)||(a=Ot(a)),a||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${e}`),a=""),d.length&&(a=d.reduce((u,p)=>this.format(u,p,r.lng,{...r,interpolationkey:o[1].trim()}),a.trim())),e=e.replace(o[0],a),this.regexp.lastIndex=0}return e}}const wa=n=>{let e=n.toLowerCase().trim();const t={};if(n.includes("(")){const r=n.split("(");e=r[0].toLowerCase().trim();const o=r[1].slice(0,-1);e==="currency"&&!o.includes(":")?t.currency||(t.currency=o.trim()):e==="relativetime"&&!o.includes(":")?t.range||(t.range=o.trim()):o.split(";").forEach(s=>{if(s){const[l,...d]=s.split(":"),c=d.join(":").trim().replace(/^'+|'+$/g,""),u=l.trim();t[u]||(t[u]=c),c==="false"&&(t[u]=!1),c==="true"&&(t[u]=!0),isNaN(c)||(t[u]=parseInt(c,10))}})}return{formatName:e,formatOptions:t}},Vt=n=>{const e={};return(t,r,o)=>{let a=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(a={...a,[o.interpolationkey]:void 0});const s=r+JSON.stringify(a);let l=e[s];return l||(l=n(Me(r),o),e[s]=l),l(t)}},Sa=n=>(e,t,r)=>n(Me(t),r)(e);class Ca{constructor(e={}){this.logger=le.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const r=t.cacheInBuiltFormats?Vt:Sa;this.formats={number:r((o,a)=>{const s=new Intl.NumberFormat(o,{...a});return l=>s.format(l)}),currency:r((o,a)=>{const s=new Intl.NumberFormat(o,{...a,style:"currency"});return l=>s.format(l)}),datetime:r((o,a)=>{const s=new Intl.DateTimeFormat(o,{...a});return l=>s.format(l)}),relativetime:r((o,a)=>{const s=new Intl.RelativeTimeFormat(o,{...a});return l=>s.format(l,a.range||"day")}),list:r((o,a)=>{const s=new Intl.ListFormat(o,{...a});return l=>s.format(l)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Vt(t)}format(e,t,r,o={}){if(!t||e==null)return e;const a=t.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&!a[0].includes(")")&&a.find(l=>l.includes(")"))){const l=a.findIndex(d=>d.includes(")"));a[0]=[a[0],...a.splice(1,l)].join(this.formatSeparator)}return a.reduce((l,d)=>{var p;const{formatName:c,formatOptions:u}=wa(d);if(this.formats[c]){let h=l;try{const f=((p=o==null?void 0:o.formatParams)==null?void 0:p[o.interpolationkey])||{},g=f.locale||f.lng||o.locale||o.lng||r;h=this.formats[c](l,g,{...u,...o,...f})}catch(f){this.logger.warn(f)}return h}else this.logger.warn(`there was no format function for ${c}`);return l},e)}}const ja=(n,e)=>{n.pending[e]!==void 0&&(delete n.pending[e],n.pendingCount--)};class ka extends qe{constructor(e,t,r,o={}){var a,s;super(),this.backend=e,this.store=t,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=le.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],(s=(a=this.backend)==null?void 0:a.init)==null||s.call(a,r,o.backend,o)}queueLoad(e,t,r,o){const a={},s={},l={},d={};return e.forEach(c=>{let u=!0;t.forEach(p=>{const h=`${c}|${p}`;!r.reload&&this.store.hasResourceBundle(c,p)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?s[h]===void 0&&(s[h]=!0):(this.state[h]=1,u=!1,s[h]===void 0&&(s[h]=!0),a[h]===void 0&&(a[h]=!0),d[p]===void 0&&(d[p]=!0)))}),u||(l[c]=!0)}),(Object.keys(a).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(a),pending:Object.keys(s),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(d)}}loaded(e,t,r){const o=e.split("|"),a=o[0],s=o[1];t&&this.emit("failedLoading",a,s,t),!t&&r&&this.store.addResourceBundle(a,s,r,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&r&&(this.state[e]=0);const l={};this.queue.forEach(d=>{da(d.loaded,[a],s),ja(d,e),t&&d.errors.push(t),d.pendingCount===0&&!d.done&&(Object.keys(d.loaded).forEach(c=>{l[c]||(l[c]={});const u=d.loaded[c];u.length&&u.forEach(p=>{l[c][p]===void 0&&(l[c][p]=!0)})}),d.done=!0,d.errors.length?d.callback(d.errors):d.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(d=>!d.done)}read(e,t,r,o=0,a=this.retryTimeout,s){if(!e.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:r,tried:o,wait:a,callback:s});return}this.readingCalls++;const l=(c,u)=>{if(this.readingCalls--,this.waitingReads.length>0){const p=this.waitingReads.shift();this.read(p.lng,p.ns,p.fcName,p.tried,p.wait,p.callback)}if(c&&u&&o<this.maxRetries){setTimeout(()=>{this.read(e,t,r,o+1,a*2,s)},a);return}s(c,u)},d=this.backend[r].bind(this.backend);if(d.length===2){try{const c=d(e,t);c&&typeof c.then=="function"?c.then(u=>l(null,u)).catch(l):l(null,c)}catch(c){l(c)}return}return d(e,t,l)}prepareLoading(e,t,r={},o){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();H(e)&&(e=this.languageUtils.toResolveHierarchy(e)),H(t)&&(t=[t]);const a=this.queueLoad(e,t,r,o);if(!a.toLoad.length)return a.pending.length||o(),null;a.toLoad.forEach(s=>{this.loadOne(s)})}load(e,t,r){this.prepareLoading(e,t,{},r)}reload(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}loadOne(e,t=""){const r=e.split("|"),o=r[0],a=r[1];this.read(o,a,"read",void 0,void 0,(s,l)=>{s&&this.logger.warn(`${t}loading namespace ${a} for language ${o} failed`,s),!s&&l&&this.logger.log(`${t}loaded namespace ${a} for language ${o}`,l),this.loaded(e,s,l)})}saveMissing(e,t,r,o,a,s={},l=()=>{}){var d,c,u,p,h;if((c=(d=this.services)==null?void 0:d.utils)!=null&&c.hasLoadedNamespace&&!((p=(u=this.services)==null?void 0:u.utils)!=null&&p.hasLoadedNamespace(t))){this.logger.warn(`did not save key "${r}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if((h=this.backend)!=null&&h.create){const f={...s,isUpdate:a},g=this.backend.create.bind(this.backend);if(g.length<6)try{let w;g.length===5?w=g(e,t,r,o,f):w=g(e,t,r,o),w&&typeof w.then=="function"?w.then(O=>l(null,O)).catch(l):l(null,w)}catch(w){l(w)}else g(e,t,r,o,l,f)}!e||!e[0]||this.store.addResource(e[0],t,r,o)}}}const Qe=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:n=>{let e={};if(typeof n[1]=="object"&&(e=n[1]),H(n[1])&&(e.defaultValue=n[1]),H(n[2])&&(e.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){const t=n[3]||n[2];Object.keys(t).forEach(r=>{e[r]=t[r]})}return e},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),At=n=>(H(n.ns)&&(n.ns=[n.ns]),H(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),H(n.fallbackNS)&&(n.fallbackNS=[n.fallbackNS]),n.supportedLngs&&!n.supportedLngs.includes("cimode")&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),n),Ne=()=>{},La=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(t=>{typeof n[t]=="function"&&(n[t]=n[t].bind(n))})};class Te extends qe{constructor(e={},t){if(super(),this.options=At(e),this.services={},this.logger=le,this.modules={external:[]},La(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e=="function"&&(t=e,e={}),e.defaultNS==null&&e.ns&&(H(e.ns)?e.defaultNS=e.ns:e.ns.includes("translation")||(e.defaultNS=e.ns[0]));const r=Qe();this.options={...r,...this.options,...At(e)},this.options.interpolation={...r.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=r.overloadTranslationOptionHandler);const o=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?le.init(o(this.modules.logger),this.options):le.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=Ca;const u=new Pt(this.options);this.store=new Mt(this.options.resources,this.options);const p=this.services;p.logger=le,p.resourceStore=this.store,p.languageUtils=u,p.pluralResolver=new va(u,{prepend:this.options.pluralSeparator}),c&&(p.formatter=o(c),p.formatter.init&&p.formatter.init(p,this.options),this.options.interpolation.format=p.formatter.format.bind(p.formatter)),p.interpolator=new Nt(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new ka(o(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",(h,...f)=>{this.emit(h,...f)}),this.modules.languageDetector&&(p.languageDetector=o(this.modules.languageDetector),p.languageDetector.init&&p.languageDetector.init(p,this.options.detection,this.options)),this.modules.i18nFormat&&(p.i18nFormat=o(this.modules.i18nFormat),p.i18nFormat.init&&p.i18nFormat.init(this)),this.translator=new _e(this.services,this.options),this.translator.on("*",(h,...f)=>{this.emit(h,...f)}),this.modules.external.forEach(h=>{h.init&&h.init(this)})}if(this.format=this.options.interpolation.format,t||(t=Ne),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=(...u)=>this.store[c](...u)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=(...u)=>(this.store[c](...u),this)});const l=De(),d=()=>{const c=(u,p)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(p),t(u,p)};if(this.languages&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?d():setTimeout(d,0),l}loadResources(e,t=Ne){var a,s;let r=t;const o=H(e)?e:this.language;if(typeof e=="function"&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if((o==null?void 0:o.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const l=[],d=c=>{if(!c||c==="cimode")return;this.services.languageUtils.toResolveHierarchy(c).forEach(p=>{p!=="cimode"&&(l.includes(p)||l.push(p))})};o?d(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>d(u)),(s=(a=this.options.preload)==null?void 0:a.forEach)==null||s.call(a,c=>d(c)),this.services.backendConnector.load(l,this.options.ns,c=>{!c&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(c)})}else r(null)}reloadResources(e,t,r){const o=De();return typeof e=="function"&&(r=e,e=void 0),typeof t=="function"&&(r=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),r||(r=Ne),this.services.backendConnector.reload(e,t,a=>{o.resolve(),r(a)}),o}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&wr.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!["cimode","dev"].includes(e)){for(let t=0;t<this.languages.length;t++){const r=this.languages[t];if(!["cimode","dev"].includes(r)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}!this.resolvedLanguage&&!this.languages.includes(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const r=De();this.emit("languageChanging",e);const o=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},a=(l,d)=>{d?this.isLanguageChangingTo===e&&(o(d),this.translator.changeLanguage(d),this.isLanguageChangingTo=void 0,this.emit("languageChanged",d),this.logger.log("languageChanged",d)):this.isLanguageChangingTo=void 0,r.resolve((...c)=>this.t(...c)),t&&t(l,(...c)=>this.t(...c))},s=l=>{var u,p;!e&&!l&&this.services.languageDetector&&(l=[]);const d=H(l)?l:l&&l[0],c=this.store.hasLanguageSomeTranslations(d)?d:this.services.languageUtils.getBestMatchFromCodes(H(l)?[l]:l);c&&(this.language||o(c),this.translator.language||this.translator.changeLanguage(c),(p=(u=this.services.languageDetector)==null?void 0:u.cacheUserLanguage)==null||p.call(u,c)),this.loadResources(c,h=>{a(h,c)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(e),r}getFixedT(e,t,r){const o=(a,s,...l)=>{let d;typeof s!="object"?d=this.options.overloadTranslationOptionHandler([a,s].concat(l)):d={...s},d.lng=d.lng||o.lng,d.lngs=d.lngs||o.lngs,d.ns=d.ns||o.ns,d.keyPrefix!==""&&(d.keyPrefix=d.keyPrefix||r||o.keyPrefix);const c={...this.options,...d};typeof d.keyPrefix=="function"&&(d.keyPrefix=je(d.keyPrefix,c));const u=this.options.keySeparator||".";let p;return d.keyPrefix&&Array.isArray(a)?p=a.map(h=>(typeof h=="function"&&(h=je(h,c)),`${d.keyPrefix}${u}${h}`)):(typeof a=="function"&&(a=je(a,c)),p=d.keyPrefix?`${d.keyPrefix}${u}${a}`:a),this.t(p,d)};return H(e)?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=r,o}t(...e){var t;return(t=this.translator)==null?void 0:t.translate(...e)}exists(...e){var t;return(t=this.translator)==null?void 0:t.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=t.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(l,d)=>{const c=this.services.backendConnector.state[`${l}|${d}`];return c===-1||c===0||c===2};if(t.precheck){const l=t.precheck(this,s);if(l!==void 0)return l}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(r,e)&&(!o||s(a,e)))}loadNamespaces(e,t){const r=De();return this.options.ns?(H(e)&&(e=[e]),e.forEach(o=>{this.options.ns.includes(o)||this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),t&&t(o)}),r):(t&&t(),Promise.resolve())}loadLanguages(e,t){const r=De();H(e)&&(e=[e]);const o=this.options.preload||[],a=e.filter(s=>!o.includes(s)&&this.services.languageUtils.isSupportedCode(s));return a.length?(this.options.preload=o.concat(a),this.loadResources(s=>{r.resolve(),t&&t(s)}),r):(t&&t(),Promise.resolve())}dir(e){var o,a;if(e||(e=this.resolvedLanguage||(((o=this.languages)==null?void 0:o.length)>0?this.languages[0]:this.language)),!e)return"rtl";try{const s=new Intl.Locale(e);if(s&&s.getTextInfo){const l=s.getTextInfo();if(l&&l.direction)return l.direction}}catch{}const t=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=((a=this.services)==null?void 0:a.languageUtils)||new Pt(Qe());return e.toLowerCase().indexOf("-latn")>1?"ltr":t.includes(r.getLanguagePartFromCode(e))||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){const r=new Te(e,t);return r.createInstance=Te.createInstance,r}cloneInstance(e={},t=Ne){const r=e.forkResourceStore;r&&delete e.forkResourceStore;const o={...this.options,...e,isClone:!0},a=new Te(o);if((e.debug!==void 0||e.prefix!==void 0)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(l=>{a[l]=this[l]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r){const l=Object.keys(this.store.data).reduce((d,c)=>(d[c]={...this.store.data[c]},d[c]=Object.keys(d[c]).reduce((u,p)=>(u[p]={...d[c][p]},u),d[c]),d),{});a.store=new Mt(l,o),a.services.resourceStore=a.store}if(e.interpolation){const d={...Qe().interpolation,...this.options.interpolation,...e.interpolation},c={...o,interpolation:d};a.services.interpolator=new Nt(c)}return a.translator=new _e(a.services,o),a.translator.on("*",(l,...d)=>{a.emit(l,...d)}),a.init(o,t),a.translator.options=o,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const X=Te.createInstance();X.createInstance;X.dir;X.init;X.loadResources;X.reloadResources;X.use;X.changeLanguage;X.getFixedT;X.t;X.exists;X.setDefaultNamespace;X.hasLoadedNamespace;X.loadNamespaces;X.loadLanguages;X.use(zr).use(Ir).use(Gt.initReactI18next).init({fallbackLng:"en",supportedLngs:["en","ka"],debug:!1,backend:{loadPath:"/locales/langs/{{lng}}.json"},detection:{order:["localStorage"],lookupLocalStorage:"Language",caches:["localStorage"]},interpolation:{escapeValue:!1}});function Da(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Ve={exports:{}},$a=Ve.exports,Bt;function Ea(){return Bt||(Bt=1,(function(n,e){(function(t,r){n.exports=r()})($a,(function(){var t=1e3,r=6e4,o=36e5,a="millisecond",s="second",l="minute",d="hour",c="day",u="week",p="month",h="quarter",f="year",g="date",w="Invalid Date",O=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,A=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,j={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(k){var C=["th","st","nd","rd"],y=k%100;return"["+k+(C[(y-20)%10]||C[y]||C[0])+"]"}},L=function(k,C,y){var x=String(k);return!x||x.length>=C?k:""+Array(C+1-x.length).join(y)+k},T={s:L,z:function(k){var C=-k.utcOffset(),y=Math.abs(C),x=Math.floor(y/60),b=y%60;return(C<=0?"+":"-")+L(x,2,"0")+":"+L(b,2,"0")},m:function k(C,y){if(C.date()<y.date())return-k(y,C);var x=12*(y.year()-C.year())+(y.month()-C.month()),b=C.clone().add(x,p),E=y-b<0,z=C.clone().add(x+(E?-1:1),p);return+(-(x+(y-b)/(E?b-z:z-b))||0)},a:function(k){return k<0?Math.ceil(k)||0:Math.floor(k)},p:function(k){return{M:p,y:f,w:u,d:c,D:g,h:d,m:l,s,ms:a,Q:h}[k]||String(k||"").toLowerCase().replace(/s$/,"")},u:function(k){return k===void 0}},V="en",G={};G[V]=j;var _="$isDayjsObject",Y=function(k){return k instanceof F||!(!k||!k[_])},I=function k(C,y,x){var b;if(!C)return V;if(typeof C=="string"){var E=C.toLowerCase();G[E]&&(b=E),y&&(G[E]=y,b=E);var z=C.split("-");if(!b&&z.length>1)return k(z[0])}else{var N=C.name;G[N]=C,b=N}return!x&&b&&(V=b),b||!x&&V},$=function(k,C){if(Y(k))return k.clone();var y=typeof C=="object"?C:{};return y.date=k,y.args=arguments,new F(y)},v=T;v.l=I,v.i=Y,v.w=function(k,C){return $(k,{locale:C.$L,utc:C.$u,x:C.$x,$offset:C.$offset})};var F=(function(){function k(y){this.$L=I(y.locale,null,!0),this.parse(y),this.$x=this.$x||y.x||{},this[_]=!0}var C=k.prototype;return C.parse=function(y){this.$d=(function(x){var b=x.date,E=x.utc;if(b===null)return new Date(NaN);if(v.u(b))return new Date;if(b instanceof Date)return new Date(b);if(typeof b=="string"&&!/Z$/i.test(b)){var z=b.match(O);if(z){var N=z[2]-1||0,U=(z[7]||"0").substring(0,3);return E?new Date(Date.UTC(z[1],N,z[3]||1,z[4]||0,z[5]||0,z[6]||0,U)):new Date(z[1],N,z[3]||1,z[4]||0,z[5]||0,z[6]||0,U)}}return new Date(b)})(y),this.init()},C.init=function(){var y=this.$d;this.$y=y.getFullYear(),this.$M=y.getMonth(),this.$D=y.getDate(),this.$W=y.getDay(),this.$H=y.getHours(),this.$m=y.getMinutes(),this.$s=y.getSeconds(),this.$ms=y.getMilliseconds()},C.$utils=function(){return v},C.isValid=function(){return this.$d.toString()!==w},C.isSame=function(y,x){var b=$(y);return this.startOf(x)<=b&&b<=this.endOf(x)},C.isAfter=function(y,x){return $(y)<this.startOf(x)},C.isBefore=function(y,x){return this.endOf(x)<$(y)},C.$g=function(y,x,b){return v.u(y)?this[x]:this.set(b,y)},C.unix=function(){return Math.floor(this.valueOf()/1e3)},C.valueOf=function(){return this.$d.getTime()},C.startOf=function(y,x){var b=this,E=!!v.u(x)||x,z=v.p(y),N=function(de,re){var me=v.w(b.$u?Date.UTC(b.$y,re,de):new Date(b.$y,re,de),b);return E?me:me.endOf(c)},U=function(de,re){return v.w(b.toDate()[de].apply(b.toDate("s"),(E?[0,0,0,0]:[23,59,59,999]).slice(re)),b)},W=this.$W,q=this.$M,Z=this.$D,ce="set"+(this.$u?"UTC":"");switch(z){case f:return E?N(1,0):N(31,11);case p:return E?N(1,q):N(0,q+1);case u:var ie=this.$locale().weekStart||0,K=(W<ie?W+7:W)-ie;return N(E?Z-K:Z+(6-K),q);case c:case g:return U(ce+"Hours",0);case d:return U(ce+"Minutes",1);case l:return U(ce+"Seconds",2);case s:return U(ce+"Milliseconds",3);default:return this.clone()}},C.endOf=function(y){return this.startOf(y,!1)},C.$set=function(y,x){var b,E=v.p(y),z="set"+(this.$u?"UTC":""),N=(b={},b[c]=z+"Date",b[g]=z+"Date",b[p]=z+"Month",b[f]=z+"FullYear",b[d]=z+"Hours",b[l]=z+"Minutes",b[s]=z+"Seconds",b[a]=z+"Milliseconds",b)[E],U=E===c?this.$D+(x-this.$W):x;if(E===p||E===f){var W=this.clone().set(g,1);W.$d[N](U),W.init(),this.$d=W.set(g,Math.min(this.$D,W.daysInMonth())).$d}else N&&this.$d[N](U);return this.init(),this},C.set=function(y,x){return this.clone().$set(y,x)},C.get=function(y){return this[v.p(y)]()},C.add=function(y,x){var b,E=this;y=Number(y);var z=v.p(x),N=function(q){var Z=$(E);return v.w(Z.date(Z.date()+Math.round(q*y)),E)};if(z===p)return this.set(p,this.$M+y);if(z===f)return this.set(f,this.$y+y);if(z===c)return N(1);if(z===u)return N(7);var U=(b={},b[l]=r,b[d]=o,b[s]=t,b)[z]||1,W=this.$d.getTime()+y*U;return v.w(W,this)},C.subtract=function(y,x){return this.add(-1*y,x)},C.format=function(y){var x=this,b=this.$locale();if(!this.isValid())return b.invalidDate||w;var E=y||"YYYY-MM-DDTHH:mm:ssZ",z=v.z(this),N=this.$H,U=this.$m,W=this.$M,q=b.weekdays,Z=b.months,ce=b.meridiem,ie=function(re,me,Le,He){return re&&(re[me]||re(x,E))||Le[me].slice(0,He)},K=function(re){return v.s(N%12||12,re,"0")},de=ce||function(re,me,Le){var He=re<12?"AM":"PM";return Le?He.toLowerCase():He};return E.replace(A,(function(re,me){return me||(function(Le){switch(Le){case"YY":return String(x.$y).slice(-2);case"YYYY":return v.s(x.$y,4,"0");case"M":return W+1;case"MM":return v.s(W+1,2,"0");case"MMM":return ie(b.monthsShort,W,Z,3);case"MMMM":return ie(Z,W);case"D":return x.$D;case"DD":return v.s(x.$D,2,"0");case"d":return String(x.$W);case"dd":return ie(b.weekdaysMin,x.$W,q,2);case"ddd":return ie(b.weekdaysShort,x.$W,q,3);case"dddd":return q[x.$W];case"H":return String(N);case"HH":return v.s(N,2,"0");case"h":return K(1);case"hh":return K(2);case"a":return de(N,U,!0);case"A":return de(N,U,!1);case"m":return String(U);case"mm":return v.s(U,2,"0");case"s":return String(x.$s);case"ss":return v.s(x.$s,2,"0");case"SSS":return v.s(x.$ms,3,"0");case"Z":return z}return null})(re)||z.replace(":","")}))},C.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},C.diff=function(y,x,b){var E,z=this,N=v.p(x),U=$(y),W=(U.utcOffset()-this.utcOffset())*r,q=this-U,Z=function(){return v.m(z,U)};switch(N){case f:E=Z()/12;break;case p:E=Z();break;case h:E=Z()/3;break;case u:E=(q-W)/6048e5;break;case c:E=(q-W)/864e5;break;case d:E=q/o;break;case l:E=q/r;break;case s:E=q/t;break;default:E=q}return b?E:v.a(E)},C.daysInMonth=function(){return this.endOf(p).$D},C.$locale=function(){return G[this.$L]},C.locale=function(y,x){if(!y)return this.$L;var b=this.clone(),E=I(y,x,!0);return E&&(b.$L=E),b},C.clone=function(){return v.w(this.$d,this)},C.toDate=function(){return new Date(this.valueOf())},C.toJSON=function(){return this.isValid()?this.toISOString():null},C.toISOString=function(){return this.$d.toISOString()},C.toString=function(){return this.$d.toUTCString()},k})(),M=F.prototype;return $.prototype=M,[["$ms",a],["$s",s],["$m",l],["$H",d],["$W",c],["$M",p],["$y",f],["$D",g]].forEach((function(k){M[k[1]]=function(C){return this.$g(C,k[0],k[1])}})),$.extend=function(k,C){return k.$i||(k(C,F,$),k.$i=!0),$},$.locale=I,$.isDayjs=Y,$.unix=function(k){return $(1e3*k)},$.en=G[V],$.Ls=G,$.p={},$}))})(Ve)),Ve.exports}var Oa=Ea();const Cr=Da(Oa),Ta=({setDateFilter:n,setShowRange:e,setDates:t})=>{const r=s=>s&&s>Cr().endOf("day"),o=s=>{if(s&&s[0]&&s[1]){const l=ee.toISODateString(s[0].toDate()),d=ee.toISODateString(s[1].toDate());t([l,d]),n(c=>({...c,startDate:l,endDate:d})),e(!1)}},a={lang:{locale:X.language,shortMonths:[oe("0"),oe("1"),oe("2"),oe("3"),oe("4"),oe("5"),oe("6"),oe("7"),oe("8"),oe("9"),oe("10"),oe("11")],shortWeekDays:[xe("Sun"),xe("Mon"),xe("Tue"),xe("Wed"),xe("Thu"),xe("Fri"),xe("Sat")]}};return i.jsx(Jt,{dropdownClassName:"date-picker-column-style",locale:a,open:!0,allowClear:!0,format:"MMM D, YYYY",placeholder:["From","To"],getPopupContainer:s=>{var l;return((l=s==null?void 0:s.parentElement)==null?void 0:l.parentElement)??document.body},onOpenChange:s=>{s||e(!1)},onChange:s=>o(s),disabledDate:r})},Ia=m(R.Empty)`
2975
2827
  .ant-empty-description {
2976
2828
  color: var(--color-text-secondary, rgba(19, 20, 18, 0.75));
2977
2829
  }
2978
- `,ti=m(H.Table)`
2830
+ `,za=m(R.Table)`
2979
2831
  .ant-table-thead > tr > th {
2980
2832
  background: var(--color-bg-primary, #fff);
2981
2833
  color: var(--color-text-secondary, rgba(19, 20, 18, 0.75));
@@ -3078,13 +2930,14 @@
3078
2930
  .ant-collapse-header {
3079
2931
  background-color: transparent !important;
3080
2932
  }
3081
- `,ri=m(H.Select)`
2933
+ `,jr=m(R.Select)`
3082
2934
  width: ${({$width:n})=>n??"100%"};
3083
2935
 
3084
- min-height: 40px;
3085
- align-items: center;
3086
- gap: 8px;
3087
- align-self: stretch;
2936
+ min-height: ${({$height:n})=>n??"unset"};
2937
+ gap: 2.5rem;
2938
+ display: flex;
2939
+ flex-direction: column;
2940
+ gap: 0.5rem;
3088
2941
  border-radius: var(--border-radius-025, 2px);
3089
2942
  background: var(--color-bg-secondary, #f5f5f5);
3090
2943
 
@@ -3152,5 +3005,72 @@
3152
3005
  .anticon.anticon-close {
3153
3006
  color: var(--color-text-secondary, rgba(255, 255, 255, 0.5)) !important;
3154
3007
  }
3155
- `;exports.AdminLayout=Kr;exports.AuthorizationLayout=fn;exports.BoxComponent=Wt;exports.Chart=Go;exports.ColumnFilterType=se;exports.ComingSoon=Qo;exports.ContactInfoModal=fr;exports.DateHelper=ee;exports.DatePickerToISO=Va;exports.DateRangeFilterTabs=Ta;exports.ExcelExport=Ha;exports.ExcelExportSelected=Na;exports.ExpandableTable=ra;exports.FilterConfiguration=or;exports.FilterSelectTypes=be;exports.GenericModal=Xe;exports.GridViewPage=zo;exports.ModalHost=Mo;exports.NoData=ar;exports.PackageServicesProvider=Ir;exports.PackageTranslationProvider=Mr;exports.PageBreadcrumb=No;exports.PopupMFA=Po;exports.SortDirections=Q;exports.Spinner=_o;exports.StyledBreadcrumb=hr;exports.StyledEmpty=ei;exports.StyledSelect=ri;exports.StyledTable=ti;exports.TableViewOptions=fe;exports.TwoFactorPopup=Ao;exports.catchErrorMessage=nr;exports.exportSelectedToCSV=wr;exports.exportSelectedToXLSX=Sr;exports.formatDate=Wa;exports.getBase64=Bn;exports.handleCopy=Gn;exports.handleDictionarySelectFilter=Qt;exports.lowercaseFirstLetter=rr;exports.numberFormatterWithComma=Ya;exports.parseCommissionErrors=Qa;exports.parseErrorMessageKey=sr;exports.parseServerErrors=ve;exports.showByType=Ka;exports.useAutofillStartDetection=_a;exports.useContactInfoController=gr;exports.useDebounce=it;exports.useElementHeight=qt;exports.useFetch=ot;exports.useFilterDataSourceType=dt;exports.useFormController=Aa;exports.useModalStore=ge;exports.useNavigationGuard=Ua;exports.useNewDesignFormController=Ba;exports.usePackageServices=we;exports.useTwoFactor=Ga;exports.useUserStore=Se;
3008
+ `,Ma=({setDateFilters:n,hasAllFilter:e=!1})=>{const[t,r]=S.useState([]),o=[{key:"week",label:Ce("7D"),...ee.getCommonDateRange("week")},{key:"month",label:Ce("30D"),...ee.getCommonDateRange("month")},{key:"threeMonth",label:Ce("3M"),...ee.getCommonDateRange("threeMonth")},{key:"sixMonth",label:Ce("6M"),...ee.getCommonDateRange("sixMonth")},{key:"twelveMonth",label:Ce("12M"),...ee.getCommonDateRange("twelveMonth")},{key:"year",label:Ce("YTD"),...ee.getCommonDateRange("year")},{key:"custom",label:t.length===2&&t[0]!==""?`${B("Custom")}: ${t[0]} / ${t[1]}`:B("Custom"),...ee.getCommonDateRange("custom")}],[a,s]=S.useState(),l=S.useMemo(()=>e?[{key:"all",label:B("All"),...ee.getCommonDateRange("all")},...o]:o,[e,t]);function d(c){if(c==="custom")s(!0);else{s(!1);const u=l.find(p=>p.key===c);u&&n(p=>({...p,startDate:u.startDate,endDate:u.endDate}))}return c}return i.jsxs(ia,{id:"tabs-container",children:[i.jsx(aa,{type:"editable-card",items:l,onTabClick:d,activeKey:a?"custom":void 0,removeIcon:!0,hideAdd:!0}),a&&i.jsx(sa,{children:i.jsx(Ta,{setDates:r,setDateFilter:n,setShowRange:s,getPopupContainer:()=>document.getElementById("tabs-container")})}),i.jsx(jr,{className:"tab-select",$width:"200px",placeholder:B("Choose"),getPopupContainer:c=>c.parentElement,onChange:d,options:l.map(c=>({value:c.key,label:c.label}))})]})},kr=m.div`
3009
+ .ant-dropdown-menu {
3010
+ border-radius: 2px !important;
3011
+ background: var(--color-bg-quaternary, #2f2f2f) !important;
3012
+ width: 150px !important;
3013
+ padding: 0 !important;
3014
+ }
3015
+
3016
+ .ant-dropdown-menu-item {
3017
+ padding: 0 !important; /* რომ შიდა კონტენტი გაიწელოს */
3018
+
3019
+ &:hover {
3020
+ background-color: rgba(255, 255, 255, 0.05) !important;
3021
+ }
3022
+ }
3023
+
3024
+ .ant-dropdown-menu-title-content {
3025
+ color: var(--color-text-primary, #fff) !important;
3026
+ font-family: Geist;
3027
+ font-size: var(--typo-caption-size-medium, 14px);
3028
+ font-weight: 400;
3029
+ line-height: var(--typo-caption-lineHeight-medium, 18px);
3030
+ letter-spacing: var(--typo-caption-spacing-medium, 0.1px);
3031
+ padding: 8px 12px; /* აქ დაარეგულირე შიდა დაშორება */
3032
+ display: block;
3033
+ }
3034
+ `,Pa=(n,e)=>{const t=window.URL.createObjectURL(n),r=document.createElement("a");r.href=t,r.setAttribute("download",e),document.body.appendChild(r),r.click(),document.body.removeChild(r),window.URL.revokeObjectURL(t)},Ha=(n,e)=>{const t=new Blob([n],{type:"text/csv;charset=utf-8;"}),r=window.URL.createObjectURL(t),o=document.createElement("a");o.href=r,o.setAttribute("download",e),document.body.appendChild(o),o.click(),document.body.removeChild(o),window.URL.revokeObjectURL(r)},Ra=m(R.Dropdown)`
3035
+ background: var(--color-bg-secondary, #f0ededff) !important;
3036
+ font-size: 14px;
3037
+ font-weight: 500;
3038
+
3039
+ .menu .ant-dropdown-menu-item .ant-dropdown-trigger {
3040
+ padding: 10px 14px !important;
3041
+ border-radius: 8px !important;
3042
+ background: #000 !important;
3043
+
3044
+ font-size: 14px;
3045
+ font-weight: 500;
3046
+ color: var(--color-text-primary, #000000ff) !important;
3047
+ }
3048
+ `,Fa=m.div`
3049
+ background-color: red;
3050
+ padding: 5px;
3051
+ background: var(--color-bg-opaque-primary, rgba(255, 255, 255, 0.05));
3052
+ color: var(--color-text-primary, #fff);
3053
+ cursor: pointer;
3054
+ `,Na=({exportFileName:n,filters:e,service:t})=>{const r=async a=>{try{const{PageSize:s,Page:l,...d}=e,u=(await t(d,a)).data;a==="xlsx"?Pa(u,`${n}.${a}`):Ha(u,`${n}`)}catch(s){console.error("Export failed:",s)}},o=[{key:"1",label:`${B("ExportAs")} ${B("Xlsx")}`,onClick:()=>r("xlsx")},{key:"2",label:`${B("ExportAs")} ${B("Csv")}`,onClick:()=>r("csv")}];return i.jsx(Ra,{menu:{items:o,className:"dropdown-menu"},popupRender:a=>i.jsx(kr,{children:a}),placement:"bottomLeft",children:i.jsx(Fa,{children:B("Export")})})},Lr=(n,e,t)=>{const r=n.filter(p=>e[p.id]),o=Object.keys(r[0]),a=r.map(p=>o.map(h=>{const f=p[h];return f==null?"":typeof f=="object"?Object.values(f).find(w=>typeof w!="object")??"":f})),s=[o,...a].map(p=>p.map(h=>`"${(h||"").toString().replace(/"/g,'""')}"`).join(",")).join(`\r
3055
+ `),l="\uFEFF",d=new Blob([l+s],{type:"text/csv;charset=utf-8;"}),c=document.createElement("a"),u=URL.createObjectURL(d);c.setAttribute("href",u),c.setAttribute("download",t),document.body.appendChild(c),c.click(),document.body.removeChild(c),URL.revokeObjectURL(u)},Dr=(n,e,t)=>{const o=n.filter(p=>e[p.id]).map(p=>{const h={};return Object.entries(p).forEach(([f,g])=>{if(g==null)h[f]="";else if(typeof g=="object"){const w=Object.values(g).find(O=>typeof O!="object");h[f]=w??""}else h[f]=g}),h}),a=Fe.utils.json_to_sheet(o),s=Fe.utils.book_new();Fe.utils.book_append_sheet(s,a,"Data");const l=Fe.write(s,{bookType:"xlsx",type:"array"}),d=new Blob([l],{type:"application/octet-stream"}),c=URL.createObjectURL(d),u=document.createElement("a");u.href=c,u.download=t,document.body.appendChild(u),u.click(),document.body.removeChild(u),URL.revokeObjectURL(c)},Va=m(R.Dropdown)`
3056
+ background: var(--color-bg-secondary, #f0ededff) !important;
3057
+ font-size: 14px;
3058
+ font-weight: 500;
3059
+
3060
+ .menu .ant-dropdown-menu-item .ant-dropdown-trigger {
3061
+ padding: 10px 14px !important;
3062
+ border-radius: 8px !important;
3063
+ background: #000 !important;
3064
+
3065
+ font-size: 14px;
3066
+ font-weight: 500;
3067
+ color: var(--color-text-primary, #000000ff) !important;
3068
+ }
3069
+ `,Aa=m.div`
3070
+ background-color: red;
3071
+ padding: 5px;
3072
+ background: var(--color-bg-opaque-primary, rgba(255, 255, 255, 0.05));
3073
+ color: var(--color-text-primary, #fff);
3074
+ cursor: pointer;
3075
+ `,Ba=({tableData:n,checked:e,fileName:t})=>{const r=async a=>{try{a==="xlsx"?Dr(n,e,t+".xlsx"):Lr(n,e,t+".csv")}catch(s){console.error("Export failed:",s)}},o=[{key:"1",label:`${B("ExportAs")} ${B("Xlsx")}`,onClick:()=>r("xlsx")},{key:"2",label:`${B("ExportAs")} ${B("Csv")}`,onClick:()=>r("csv")}];return i.jsx(Va,{menu:{items:o,className:"dropdown-menu"},popupRender:a=>i.jsx(kr,{children:a}),placement:"bottomLeft",children:i.jsx(Aa,{children:B("Export")})})},Ga=({value:n,onChange:e,...t})=>{const r=n?Cr(n):null,o=a=>{a?e==null||e(ee.toISODateString(a.toDate())):e==null||e(null)};return i.jsx(R.DatePicker,{value:r,onChange:o,allowClear:!0,...t})},Ua=({id:n,refetchFormItems:e,redirectPrevPage:t,updateItem:r,addItem:o,getItemById:a,onSetFormValues:s})=>{const l=ne.useNavigate(),[d]=R.Form.useForm(),[c,u]=S.useState(n=="new"),[p,h]=S.useState(null),f=async w=>{const O=window.location.pathname,A=O.substring(0,O.lastIndexOf("/"));try{if(p){let j;return n?j=await r({...w,id:n}):j=await r(w),t!==!1&&j.data.success===!0&&l(A),j}else{const j=await o(w);return t!==!1&&j.data.success===!0&&l(A),j}}catch(j){if(j.status===400){const L=j.response.data,T=ve(L.errors);d.setFields(T)}}},g=async w=>{try{const O=await a(w),A=s?s(O.data):O.data;h(A),d.setFieldsValue(A)}catch(O){console.log(O,"Error in Form Controller.")}};return S.useEffect(()=>{u(n=="new"),n!="new"?g(Number(n)):d.resetFields()},[n,e]),{form:d,item:p,getItemById:a,isAddingForm:c,handleSave:f}},_a=({id:n,formItem:e,updateItem:t,addItem:r,getItemById:o})=>{const[a]=R.Form.useForm(),[s,l]=S.useState(null),d=async u=>{try{let p;return n?p=await t({...u}):p=await r(u),p}catch(p){if(p.status===400){const h=p.response.data,f=ve(h.errors);a.setFields(f)}throw p}},c=async u=>{try{const h=(await o(u)).data;l(h),a.setFieldsValue(h)}catch(p){console.log(p,"Error in Form Controller.")}};return S.useEffect(()=>{try{if(!e)return;l(e),a.setFieldsValue(e)}catch(u){console.log(u,"Error in Form Controller.")}},[e]),S.useEffect(()=>{n&&c(Number(n))},[n]),{form:a,item:s,handleSave:d}},Wa=()=>{const n=ne.useNavigate(),{setUser:e}=Se(),[t,r]=S.useState({visible:!1,token:""}),o=s=>{e(s),r({visible:!1,token:""}),n("/")};return{handleTwoFactorResponse:(s,l)=>{const{success:d,value:c}=s.data;if(!d)throw new Error("Authentication failed");if(c.isTwoFactorRequired){r({visible:!0,token:c.token,id:c.id,mfaType:c.mfaType});return}l&&o(c)},finalizeLogin:o,twoFactor:t,setTwoFactor:r}};function Ya(n){const{navigator:e}=S.useContext(ne.UNSAFE_NavigationContext),t=ne.useLocation();S.useEffect(()=>{if(!n)return;const r=e.push,o=e.replace,a=s=>(...l)=>{R.Modal.confirm({title:"UnsavedChanges",content:"UnsavedMoveDesc",okText:"Leave",className:"custom-confirm-modal",cancelText:"Save",okButtonProps:{className:"ok-text-btn"},cancelButtonProps:{className:"no-hover-cancel-btn"},onOk:()=>{s(...l)},onCancel:()=>{}})};return e.push=a(r),e.replace=a(o),()=>{e.push=r,e.replace=o}},[n,e,t]),S.useEffect(()=>{const r=o=>{n&&(o.preventDefault(),o.returnValue="")};return window.addEventListener("beforeunload",r),()=>{window.removeEventListener("beforeunload",r)}},[n])}function Ka(n){S.useEffect(()=>{const e=t=>{t.animationName==="onAutoFillStart"&&n(t)};return document.addEventListener("animationstart",e,!0),()=>{document.removeEventListener("animationstart",e,!0)}},[])}function qa(n,e){if(!n)return"";const t=new Date(n);if(isNaN(t.getTime()))return"";const r=t.getDate(),o=t.getMonth(),a=t.getFullYear(),l=`${r} ${o}, ${a}`;if(e!=null&&e.withTime){const d=t.getHours().toString().padStart(2,"0"),c=t.getMinutes().toString().padStart(2,"0");return`${l} ${d}:${c}`}return l}function Za(n,e="en-US"){return n<1?0:n?n.toLocaleString(e):""}const Ja=(n,e)=>Array.isArray(n)?n.filter(t=>t.type?(Array.isArray(t.type)?t.type:[t.type]).some(o=>e.includes(o)):!1):[],$e=n=>n.replace(/^[A-Z]+/,e=>e.length===n.length?e.toLowerCase():e.length>1?e.slice(0,-1).toLowerCase()+e.slice(-1):e.toLowerCase()),Xa=/^Commissions\[(\d+)\]\.(\w+)\.(\w+)\[(\d+)\]\.(\w+)$/,Qa=/^Commissions\[(\d+)\]\.(\w+)\.(\w+)$/,ei=/^Commissions\[(\d+)\]\.(\w+)\.(\w+)\.(\w+)$/,ti=/^Commissions\[(\d+)\]$/;function ri(n){const{errors:e}=n.response.data,t=Object.keys(e)[0],r=e[t][0],o=t.match(Xa);if(o){const[,l,d,c,u,p]=o;return{brandIndex:Number(l),generalType:$e(d),specificType:$e(c),itemIndex:Number(u),field:$e(p),message:r}}const a=t.match(Qa)||t.match(ei);if(a){const[,l,d,c]=a;return{brandIndex:Number(l),generalType:$e(d),specificType:$e(c),message:r}}const s=t.match(ti);return s?{brandIndex:Number(s[1]),message:r}:(console.warn("parseCommissionErrors: unrecognized key format from the validations on commissions",t),null)}exports.AdminLayout=Qr;exports.AuthorizationLayout=yn;exports.BoxComponent=Yt;exports.CancelModalButton=Ke;exports.Chart=_o;exports.CloseButton=nr;exports.ColumnFilterType=se;exports.ComingSoon=ta;exports.ContactInfoModal=xr;exports.ContentContainer=Ye;exports.CreateModalButton=ze;exports.DateHelper=ee;exports.DatePickerToISO=Ga;exports.DateRangeFilterTabs=Ma;exports.ExcelExport=Na;exports.ExcelExportSelected=Ba;exports.ExpandableTable=oa;exports.FilterConfiguration=lr;exports.FilterSelectTypes=be;exports.GeneralInput=ht;exports.GenericModal=tt;exports.GridViewPage=Po;exports.LabelText=Ie;exports.ModalHost=Ho;exports.ModalHostButtonWrapper=ar;exports.NoData=cr;exports.NoDataSpanForSelect=Bn;exports.PackageServicesProvider=Rr;exports.PackageTranslationProvider=Nr;exports.PageBreadcrumb=Ao;exports.Popup=We;exports.PopupFooterContainer=or;exports.PopupHeader=rr;exports.PopupMFA=Ro;exports.RejectButton=Gn;exports.SortDirections=Q;exports.Spinner=Yo;exports.StyledBreadcrumb=br;exports.StyledEmpty=Ia;exports.StyledSelect=jr;exports.StyledTable=za;exports.TableViewOptions=fe;exports.TwoFactorPopup=Go;exports.catchErrorMessage=sr;exports.exportSelectedToCSV=Lr;exports.exportSelectedToXLSX=Dr;exports.formatDate=qa;exports.getBase64=Un;exports.handleCopy=_n;exports.handleDictionarySelectFilter=er;exports.lowercaseFirstLetter=ir;exports.numberFormatterWithComma=Za;exports.parseCommissionErrors=ri;exports.parseErrorMessageKey=pr;exports.parseServerErrors=ve;exports.showByType=Ja;exports.useAutofillStartDetection=Ka;exports.useContactInfoController=yr;exports.useDebounce=ct;exports.useElementHeight=Zt;exports.useFetch=st;exports.useFilterDataSourceType=ft;exports.useFormController=Ua;exports.useModalStore=ge;exports.useNavigationGuard=Ya;exports.useNewDesignFormController=_a;exports.usePackageServices=we;exports.useTwoFactor=Wa;exports.useUserStore=Se;
3156
3076
  //# sourceMappingURL=index.cjs.map