@fluidattacks/design 3.26.5-pr → 3.27.0

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.
Files changed (172) hide show
  1. package/dist/assets/index.css +1 -1
  2. package/dist/components/@core/index.js +1 -1
  3. package/dist/components/@core/types.d.ts +1 -0
  4. package/dist/components/accordion/accordion-content/index.js +1 -1
  5. package/dist/components/accordion/index.js +1 -1
  6. package/dist/components/alert/index.js +1 -1
  7. package/dist/components/alert/index.stories.d.ts +1 -2
  8. package/dist/components/avatar/index.js +1 -1
  9. package/dist/components/button/index.js +1 -1
  10. package/dist/components/button/types.d.ts +1 -0
  11. package/dist/components/card/card-header/index.js +1 -1
  12. package/dist/components/card/card-with-image/index.js +1 -1
  13. package/dist/components/card/card-with-input/index.js +1 -1
  14. package/dist/components/card/card-with-options/index.js +1 -1
  15. package/dist/components/card/card-with-selector/index.js +1 -1
  16. package/dist/components/card/card-with-switch/index.js +1 -1
  17. package/dist/components/card/index.js +1 -1
  18. package/dist/components/card-container/index.js +1 -1
  19. package/dist/components/carousel/index.js +1 -1
  20. package/dist/components/checkbox/index.js +1 -1
  21. package/dist/components/cloud-image/index.js +1 -1
  22. package/dist/components/code-snippet/index.js +1 -1
  23. package/dist/components/code-snippet/location-code/index.js +1 -1
  24. package/dist/components/colors/index.js +1 -1
  25. package/dist/components/conditions-dialog/index.js +1 -1
  26. package/dist/components/confirm-dialog/index.js +1 -1
  27. package/dist/components/container/index.js +1 -1
  28. package/dist/components/copy-button/index.js +1 -1
  29. package/dist/components/divider/index.js +1 -1
  30. package/dist/components/dropdown/index.js +1 -1
  31. package/dist/components/empty-state/empty-button/index.js +1 -1
  32. package/dist/components/empty-state/index.js +1 -1
  33. package/dist/components/file-preview/index.js +1 -1
  34. package/dist/components/form/index.js +1 -1
  35. package/dist/components/form/inner-form/index.js +1 -1
  36. package/dist/components/grid-container/index.js +1 -1
  37. package/dist/components/grid-layout/index.stories.d.ts +1 -10
  38. package/dist/components/grid-layout/styles.d.ts +1 -8
  39. package/dist/components/group-selector/index.js +1 -1
  40. package/dist/components/group-selector/option-container/index.js +1 -1
  41. package/dist/components/icon/index.js +1 -1
  42. package/dist/components/icon-button/index.js +1 -1
  43. package/dist/components/indicator-card/index.js +1 -1
  44. package/dist/components/info-sidebar/index.js +1 -1
  45. package/dist/components/inputs/fields/combobox/field/index.js +1 -1
  46. package/dist/components/inputs/fields/combobox/index.js +1 -1
  47. package/dist/components/inputs/fields/combobox/option/index.js +1 -1
  48. package/dist/components/inputs/fields/date/calendar/cell/index.js +1 -1
  49. package/dist/components/inputs/fields/date/calendar/grid/index.js +1 -1
  50. package/dist/components/inputs/fields/date/calendar/header/index.js +1 -1
  51. package/dist/components/inputs/fields/date/calendar/index.js +1 -1
  52. package/dist/components/inputs/fields/date/index.js +1 -1
  53. package/dist/components/inputs/fields/date-range/calendar/index.js +1 -1
  54. package/dist/components/inputs/fields/date-range/index.js +1 -1
  55. package/dist/components/inputs/fields/date-time/calendar/index.js +1 -1
  56. package/dist/components/inputs/fields/date-time/index.js +1 -1
  57. package/dist/components/inputs/fields/editable/index.js +1 -1
  58. package/dist/components/inputs/fields/input-array/field/index.js +1 -1
  59. package/dist/components/inputs/fields/input-array/index.js +1 -1
  60. package/dist/components/inputs/fields/input-file/index.js +1 -1
  61. package/dist/components/inputs/fields/input-tags/field/index.js +1 -1
  62. package/dist/components/inputs/fields/input-tags/index.js +1 -1
  63. package/dist/components/inputs/fields/number/index.js +1 -1
  64. package/dist/components/inputs/fields/number-range/index.js +1 -1
  65. package/dist/components/inputs/fields/phone/index.js +1 -1
  66. package/dist/components/inputs/fields/text-area/index.js +1 -1
  67. package/dist/components/inputs/fields/text-input/index.js +1 -1
  68. package/dist/components/inputs/index.js +1 -1
  69. package/dist/components/inputs/label/index.js +1 -1
  70. package/dist/components/inputs/outline-container/index.js +1 -1
  71. package/dist/components/inputs/utils/action-button/index.js +1 -1
  72. package/dist/components/inputs/utils/calendar-button/index.js +1 -1
  73. package/dist/components/inputs/utils/date-selector/index.js +1 -1
  74. package/dist/components/inputs/utils/date-time-field/index.js +1 -1
  75. package/dist/components/inputs/utils/dialog/index.js +1 -1
  76. package/dist/components/inputs/utils/number-field/index.js +1 -1
  77. package/dist/components/inputs/utils/popover/index.js +1 -1
  78. package/dist/components/layout/categories/buttons/index.js +1 -1
  79. package/dist/components/layout/categories/column/index.js +1 -1
  80. package/dist/components/layout/categories/gap/index.js +1 -1
  81. package/dist/components/layout/categories/row/index.js +1 -1
  82. package/dist/components/layout/index.js +1 -1
  83. package/dist/components/link/index.js +1 -1
  84. package/dist/components/list-item/index.js +1 -1
  85. package/dist/components/little-flag/index.js +1 -1
  86. package/dist/components/loading/index.js +1 -1
  87. package/dist/components/logo/index.js +1 -1
  88. package/dist/components/lottie/index.js +1 -1
  89. package/dist/components/menu/index.js +1 -1
  90. package/dist/components/message-banner/index.js +1 -1
  91. package/dist/components/modal/columns-modal/index.js +1 -1
  92. package/dist/components/modal/columns-modal/preview-panel/index.js +1 -1
  93. package/dist/components/modal/columns-modal/search-panel/index.js +1 -1
  94. package/dist/components/modal/filters-modal/applied-filter/index.js +1 -1
  95. package/dist/components/modal/filters-modal/applied-filters/index.js +1 -1
  96. package/dist/components/modal/filters-modal/column-filters/index.js +1 -1
  97. package/dist/components/modal/filters-modal/filter-control/index.js +1 -1
  98. package/dist/components/modal/filters-modal/filter-form/form-content/index.js +1 -1
  99. package/dist/components/modal/filters-modal/filter-form/hooks/index.js +1 -1
  100. package/dist/components/modal/filters-modal/filter-form/index.js +1 -1
  101. package/dist/components/modal/filters-modal/filters-list/index.js +1 -1
  102. package/dist/components/modal/filters-modal/index.js +1 -1
  103. package/dist/components/modal/footer/index.js +1 -1
  104. package/dist/components/modal/header/index.js +1 -1
  105. package/dist/components/modal/index.js +1 -1
  106. package/dist/components/modal/modal-confirm/index.js +1 -1
  107. package/dist/components/notification/index.js +1 -1
  108. package/dist/components/notification-sign/index.js +1 -1
  109. package/dist/components/notification-sign/index.stories.d.ts +3 -2
  110. package/dist/components/notification-sign/styles.d.ts +270 -1
  111. package/dist/components/number-input/index.js +1 -1
  112. package/dist/components/oauth-selector/index.js +1 -1
  113. package/dist/components/oauth-selector/option-container/index.js +1 -1
  114. package/dist/components/pop-up/description/index.js +1 -1
  115. package/dist/components/pop-up/index.js +1 -1
  116. package/dist/components/premium-feature/index.js +1 -1
  117. package/dist/components/priority-score/index.js +1 -1
  118. package/dist/components/progress-bar/index.js +1 -1
  119. package/dist/components/progress-indicator/in-progress-icon/index.js +1 -1
  120. package/dist/components/progress-indicator/index.js +1 -1
  121. package/dist/components/progress-indicator/step/index.js +1 -1
  122. package/dist/components/radio-button/index.js +1 -1
  123. package/dist/components/scroll-button/index.js +1 -1
  124. package/dist/components/search/index.js +1 -1
  125. package/dist/components/severity-badge/index.js +1 -1
  126. package/dist/components/severity-overview/badge/index.js +1 -1
  127. package/dist/components/severity-overview/index.js +1 -1
  128. package/dist/components/show-on-hover/index.js +1 -1
  129. package/dist/components/slide-out-menu/index.js +1 -1
  130. package/dist/components/slide-out-menu/menu-item/index.js +1 -1
  131. package/dist/components/slider/index.js +1 -1
  132. package/dist/components/slider/thumb/index.js +1 -1
  133. package/dist/components/step-lapse/index.js +1 -1
  134. package/dist/components/table/context/index.js +1 -1
  135. package/dist/components/table/export-csv/index.js +1 -1
  136. package/dist/components/table/index.js +1 -1
  137. package/dist/components/table/pagination/pagination-control/index.js +1 -1
  138. package/dist/components/table/pagination/pagination-dropdown/index.js +1 -1
  139. package/dist/components/table/pagination/pagination-size/index.js +1 -1
  140. package/dist/components/table/sort-icon/index.js +1 -1
  141. package/dist/components/table/table-body/index.js +1 -1
  142. package/dist/components/table/table-column-toggle/index.js +1 -1
  143. package/dist/components/table/table-content/head/index.js +1 -1
  144. package/dist/components/table/table-content/index.js +1 -1
  145. package/dist/components/table/table-footer/footer-content/index.js +1 -1
  146. package/dist/components/table/table-footer/index.js +1 -1
  147. package/dist/components/table/table-options/caption-content/index.js +1 -1
  148. package/dist/components/table/table-options/controls-content/index.js +1 -1
  149. package/dist/components/table/table-options/highlighted-content/index.js +1 -1
  150. package/dist/components/table/table-options/index.js +1 -1
  151. package/dist/components/table/wrapper/index.js +1 -1
  152. package/dist/components/table-button/index.js +1 -1
  153. package/dist/components/tabs/index.js +1 -1
  154. package/dist/components/tabs/tab/index.js +1 -1
  155. package/dist/components/tag/index.js +1 -1
  156. package/dist/components/timeline/card/index.js +1 -1
  157. package/dist/components/timeline/index.js +1 -1
  158. package/dist/components/toggle/index.js +1 -1
  159. package/dist/components/tooltip/index.js +1 -1
  160. package/dist/components/tour/index.js +1 -1
  161. package/dist/components/typography/heading/index.js +1 -1
  162. package/dist/components/typography/index.js +1 -1
  163. package/dist/components/typography/span/index.js +1 -1
  164. package/dist/components/typography/text/index.js +1 -1
  165. package/dist/{components-DDLe9vjp.js → components-Bw8rtrtb.js} +38 -28
  166. package/dist/{components-9VtMJBKA.mjs → components-CNhTcHJm.mjs} +522 -513
  167. package/dist/hooks/index.js +1 -1
  168. package/dist/index.js +1 -1
  169. package/dist/{vendor-n0YlGhIk.mjs → vendor-C4aloG3g.mjs} +11034 -11014
  170. package/dist/vendor-p_HN3CLJ.js +223 -0
  171. package/package.json +8 -8
  172. package/dist/vendor-aX2fiAjI.js +0 -223
@@ -1,4 +1,4 @@
1
- "use strict";const n=require("react/jsx-runtime"),x=require("react"),c=require("./vendor-aX2fiAjI.js"),se=require("react-dom"),_e=require("react-router-dom"),Z=e=>({getVariant:(t,i)=>e(t)[i]}),zt=["padding","px","py","pl","pr","pt","pb","margin","mx","my","ml","mr","mt","mb","zIndex","position","top","right","bottom","left","border","borderTop","borderRight","borderBottom","borderLeft","borderColor","borderRadius","scroll","visibility","display","height","width","maxHeight","maxWidth","minHeight","minWidth","shadow","bgColor","bgGradient","gap","flexDirection","flexGrow","justify","justifySelf","alignItems","alignSelf","wrap","color","fontFamily","fontSize","fontWeight","textAlign","whiteSpace","letterSpacing","lineSpacing","textDecoration","textOverflow","whiteSpace","wordBreak","wordWrap","cursor","transition","borderColorHover","bgColorHover","shadowHover"],ei={25:"#fcfcfd",50:"#f9fafb",100:"#f2f4f7",200:"#eaecf0",300:"#d0d5dd",400:"#98a2b3",500:"#667085",600:"#475467",700:"#2f394b",800:"#212a36",900:"#161b25"},ti={25:"#fef2f3",50:"#fddfe2",100:"#fbbac0",200:"#f9959e",300:"#f65e6a",400:"#f32637",500:"#bf0b1a",600:"#ac0a17",700:"#9a0915",800:"#870812",900:"#750710"},ni={25:"",50:"",100:"#f59dbe",200:"",300:"#b8075d",400:"",500:"#7f0540",600:"",700:"#59042d",800:"",900:"#460323"},ii={25:"",50:"#fef3f2",100:"",200:"#fecdca",300:"",400:"",500:"#f04438",600:"",700:"#b42318",800:"",900:""},oi={25:"",50:"#fffaeb",100:"",200:"#fef0c7",300:"",400:"#ffd562",500:"#fdb022",600:"#f27100",700:"#b54708",800:"",900:""},ri={25:"",50:"#f6fef9",100:"",200:"#a6f4c5",300:"",400:"",500:"#12b76a",600:"",700:"#027a48",800:"",900:""},ai={25:"",50:"#eff8ff",100:"",200:"#b2ddff",300:"",400:"",500:"#2e90fa",600:"",700:"#175cd3",800:"",900:""},si={type:{primary:"Roboto, sans-serif",poppins:"'Poppins', sans-serif",mono:"'Space Mono', monospace"},heading:{xxl:"64px",xl:"48px",lg:"32px",md:"24px",sm:"20px",xs:"16px"},text:{xl:"20px",lg:"18px",md:"16px",sm:"14px",xs:"12px"},weight:{bold:"700",semibold:"600",regular:"400"}},li={none:"none",sm:"0px 1px 2px 0px rgba(16, 24, 40, 0.15)",md:"0px 4px 6px 0px rgba(16, 24, 40, 0.15)",lg:"0px 8px 24px 0px rgba(16, 24, 40, 0.15)"},ci={mobile:"480px",tablet:"960px",sm:"1024px",md:"1440px",lg:"1920px"},di={0:"0rem",.125:"0.125rem",.188:"0.188rem",.25:"0.25rem",.5:"0.5rem",.625:"0.625rem",.75:"0.75rem",1:"1rem",1.25:"1.25rem",1.5:"1.5rem",1.75:"1.75rem",2:"2rem",2.25:"2.25rem",2.5:"2.5rem",3:"3rem",3.5:"3.5rem",4:"4rem",4.5:"4.5rem",5:"5rem",6:"6rem"},pi=["lock-keyhole","bars-sort","bolt","books","brain-circuit","briefcase","bug","buildings","bullseye-pointer","calendar-clock","calendar-xmark","chart-network","clipboard-check","comment","envelope","eye","file","flag","globe","hand-holding-dollar","hands-clapping","headset","hexagon-exclamation","light-emergency-on","magnifying-glass","pen-line","plane-departure","screwdriver-wrench","sensor-triangle-exclamation","shield-check","sidebar","skull","sliders","star-christmas","telescope","trash","unlock","user-group","user-hoodie","xmark","arrow-down","arrow-left","arrow-right","arrow-up","plus","minus","check","circle-question"],D={typography:si,shadows:li,breakpoints:ci,spacing:di,palette:{primary:ti,complementary:ni,error:ii,info:ai,warning:oi,success:ri,black:"#0c111d",white:"#ffffff",gray:ei}},gi=({children:e})=>n.jsx(c.Xe,{theme:D,children:e}),N=(e,t)=>t===void 0?"":`${e}: ${t};`,he=e=>{const t=e.py??e.pt??0,i=e.px??e.pr??0,o=e.py??e.pb??0,r=e.px??e.pl??0;if(e.padding){const[a,l,s,d]=e.padding;return`padding: ${D.spacing[a]} ${D.spacing[l]} ${D.spacing[s]} ${D.spacing[d]};`}return`padding: ${D.spacing[t]} ${D.spacing[i]} ${D.spacing[o]} ${D.spacing[r]};`},ye=e=>{const t=e.my??e.mt??0,i=e.mx??e.mr??0,o=e.my??e.mb??0,r=e.mx??e.ml??0;if(e.margin){const[a,l,s,d]=e.margin;return`margin: ${D.spacing[a]} ${D.spacing[l]} ${D.spacing[s]} ${D.spacing[d]};`}return`margin: ${D.spacing[t]} ${D.spacing[i]} ${D.spacing[o]} ${D.spacing[r]};`},be=e=>{const t=N("position",e.position),i=N("top",e.top),o=N("right",e.right),r=N("bottom",e.bottom),a=N("left",e.left),l=N("z-index",e.zIndex);return`
1
+ "use strict";const n=require("react/jsx-runtime"),x=require("react"),c=require("./vendor-p_HN3CLJ.js"),se=require("react-dom"),_e=require("react-router-dom"),Z=e=>({getVariant:(t,i)=>e(t)[i]}),zt=["padding","px","py","pl","pr","pt","pb","margin","mx","my","ml","mr","mt","mb","zIndex","position","top","right","bottom","left","border","borderTop","borderRight","borderBottom","borderLeft","borderColor","borderRadius","scroll","visibility","display","height","width","maxHeight","maxWidth","minHeight","minWidth","shadow","bgColor","bgGradient","gap","flexDirection","flexGrow","justify","justifySelf","alignItems","alignSelf","wrap","color","fontFamily","fontSize","fontWeight","textAlign","whiteSpace","letterSpacing","lineSpacing","textDecoration","textOverflow","whiteSpace","wordBreak","wordWrap","cursor","transition","borderColorHover","bgColorHover","shadowHover"],ei={25:"#fcfcfd",50:"#f9fafb",100:"#f2f4f7",200:"#eaecf0",300:"#d0d5dd",400:"#98a2b3",500:"#667085",600:"#475467",700:"#2f394b",800:"#212a36",900:"#161b25"},ti={25:"#fef2f3",50:"#fddfe2",100:"#fbbac0",200:"#f9959e",300:"#f65e6a",400:"#f32637",500:"#bf0b1a",600:"#ac0a17",700:"#9a0915",800:"#870812",900:"#750710"},ni={25:"",50:"",100:"#f59dbe",200:"",300:"#b8075d",400:"",500:"#7f0540",600:"",700:"#59042d",800:"",900:"#460323"},ii={25:"",50:"#fef3f2",100:"",200:"#fecdca",300:"",400:"",500:"#f04438",600:"",700:"#b42318",800:"",900:""},oi={25:"",50:"#fffaeb",100:"",200:"#fef0c7",300:"",400:"#ffd562",500:"#fdb022",600:"#f27100",700:"#b54708",800:"",900:""},ri={25:"",50:"#f6fef9",100:"",200:"#a6f4c5",300:"",400:"",500:"#12b76a",600:"",700:"#027a48",800:"",900:""},ai={25:"",50:"#eff8ff",100:"",200:"#b2ddff",300:"",400:"",500:"#2e90fa",600:"",700:"#175cd3",800:"",900:""},si={type:{primary:"Roboto, sans-serif",poppins:"'Poppins', sans-serif",mono:"'Space Mono', monospace"},heading:{xxl:"64px",xl:"48px",lg:"32px",md:"24px",sm:"20px",xs:"16px"},text:{xl:"20px",lg:"18px",md:"16px",sm:"14px",xs:"12px"},weight:{bold:"700",semibold:"600",regular:"400"}},li={none:"none",sm:"0px 1px 2px 0px rgba(16, 24, 40, 0.15)",md:"0px 4px 6px 0px rgba(16, 24, 40, 0.15)",lg:"0px 8px 24px 0px rgba(16, 24, 40, 0.15)"},ci={sm:"1024px",md:"1440px",lg:"1920px"},di={0:"0rem",.125:"0.125rem",.25:"0.25rem",.5:"0.5rem",.625:"0.625rem",.75:"0.75rem",.875:"0.875rem",1:"1rem",1.25:"1.25rem",1.5:"1.5rem",1.75:"1.75rem",2:"2rem",2.25:"2.25rem",2.5:"2.5rem",3:"3rem",4:"4rem",5:"5rem",6:"6rem"},pi=["lock-keyhole","bars-sort","bolt","books","brain-circuit","briefcase","bug","buildings","bullseye-pointer","calendar-clock","calendar-xmark","chart-network","clipboard-check","comment","envelope","eye","file","flag","globe","hand-holding-dollar","hands-clapping","headset","hexagon-exclamation","light-emergency-on","magnifying-glass","pen-line","plane-departure","screwdriver-wrench","sensor-triangle-exclamation","shield-check","sidebar","skull","sliders","star-christmas","telescope","trash","unlock","user-group","user-hoodie","xmark","arrow-down","arrow-left","arrow-right","arrow-up","plus","minus","check","circle-question"],D={typography:si,shadows:li,breakpoints:ci,spacing:di,palette:{primary:ti,complementary:ni,error:ii,info:ai,warning:oi,success:ri,black:"#0c111d",white:"#ffffff",gray:ei}},gi=({children:e})=>n.jsx(c.Xe,{theme:D,children:e}),N=(e,t)=>t===void 0?"":`${e}: ${t};`,he=e=>{const t=e.py??e.pt??0,i=e.px??e.pr??0,o=e.py??e.pb??0,r=e.px??e.pl??0;if(e.padding){const[a,l,s,d]=e.padding;return`padding: ${D.spacing[a]} ${D.spacing[l]} ${D.spacing[s]} ${D.spacing[d]};`}return`padding: ${D.spacing[t]} ${D.spacing[i]} ${D.spacing[o]} ${D.spacing[r]};`},ye=e=>{const t=e.my??e.mt??0,i=e.mx??e.mr??0,o=e.my??e.mb??0,r=e.mx??e.ml??0;if(e.margin){const[a,l,s,d]=e.margin;return`margin: ${D.spacing[a]} ${D.spacing[l]} ${D.spacing[s]} ${D.spacing[d]};`}return`margin: ${D.spacing[t]} ${D.spacing[i]} ${D.spacing[o]} ${D.spacing[r]};`},be=e=>{const t=N("position",e.position),i=N("top",e.top),o=N("right",e.right),r=N("bottom",e.bottom),a=N("left",e.left),l=N("z-index",e.zIndex);return`
2
2
  ${t}
3
3
  ${i}
4
4
  ${o}
@@ -16,7 +16,7 @@
16
16
  `},ui=e=>e.includes("x")?"overflow-x: auto;":"",xi=e=>e.includes("y")?"overflow-y: auto;":"",me=e=>{const t=e.scroll?`
17
17
  ${ui(e.scroll)}
18
18
  ${xi(e.scroll)}
19
- `:"",i=N("visibility",e.visibility),o=N("display",e.display),r=N("height",e.height),a=N("width",e.width),l=N("max-height",e.maxHeight),s=N("max-width",e.maxWidth),d=N("min-height",e.minHeight),p=N("min-width",e.minWidth),g=N("box-shadow",e.shadow?D.shadows[e.shadow]:void 0),u=N("gap",e.gap===void 0?void 0:D.spacing[e.gap]),f=N("background-color",e.bgColor),h=N("background",e.bgGradient),y=N("flex-direction",e.flexDirection),m=N("flex-grow",e.flexGrow),b=N("justify-content",e.justify),k=N("justify-self",e.justifySelf),w=N("align-items",e.alignItems),v=N("align-self",e.alignSelf),j=N("flex-wrap",e.wrap);return`
19
+ `:"",i=N("visibility",e.visibility),o=N("display",e.display),r=N("height",e.height),a=N("width",e.width),l=N("max-height",e.maxHeight),s=N("max-width",e.maxWidth),d=N("min-height",e.minHeight),p=N("min-width",e.minWidth),g=N("box-shadow",e.shadow?D.shadows[e.shadow]:void 0),u=N("gap",e.gap===void 0?void 0:D.spacing[e.gap]),f=N("background-color",e.bgColor),h=N("background",e.bgGradient),y=N("flex-direction",e.flexDirection),m=N("flex-grow",e.flexGrow),b=N("justify-content",e.justify),j=N("justify-self",e.justifySelf),w=N("align-items",e.alignItems),k=N("align-self",e.alignSelf),v=N("flex-wrap",e.wrap);return`
20
20
  ${t}
21
21
  ${i}
22
22
  ${o}
@@ -33,10 +33,10 @@
33
33
  ${y}
34
34
  ${m}
35
35
  ${b}
36
- ${k}
36
+ ${j}
37
37
  ${w}
38
+ ${k}
38
39
  ${v}
39
- ${j}
40
40
  `},we=e=>{const t=N("color",e.color),i=N("font-family",e.fontFamily),o=N("font-size",e.fontSize),r=N("font-weight",e.fontWeight),a=N("line-spacing",e.letterSpacing),l=N("line-height",e.lineSpacing),s=N("text-align",e.textAlign),d=N("text-decoration",e.textDecoration),p=N("text-overflow",e.textOverflow),g=N("white-space",e.whiteSpace),u=N("word-break",e.wordBreak),f=N("word-wrap",e.wordWrap);return`
41
41
  ${t}
42
42
  ${i}
@@ -182,7 +182,7 @@
182
182
 
183
183
  ${i===void 0?"":`&::after { content: "${i}"; }`}
184
184
  `}
185
- `,q=x.forwardRef(function({bgGradient:t,children:i,className:o,color:r,display:a,fontFamily:l,fontWeight:s,letterSpacing:d,lineSpacing:p,lineSpacingSm:g,overflow:u,size:f,sizeMd:h,sizeSm:y,textFill:m,whiteSpace:b,wordBreak:k,...w},v){return n.jsx(hi,{$bgGradient:t,$color:r,$display:a,$fontFamily:l,$fontWeight:s,$letterSpacing:d,$lineSpacing:p,$lineSpacingSm:g,$overflow:u,$size:f,$sizeMd:h,$sizeSm:y,$textFill:m,$whiteSpace:b,$wordBreak:k,className:o,ref:v,...w,children:i})}),ue=x.forwardRef(function({children:t,color:i,content:o,display:r,fontFamily:a,fontWeight:l,letterSpacing:s,lineSpacing:d,lineSpacingSm:p,size:g,sizeMd:u,sizeSm:f,...h},y){return n.jsx(yi,{$color:i,$content:o,$display:r,$fontFamily:a,$fontWeight:l,$letterSpacing:s,$lineSpacing:d,$lineSpacingSm:p,$size:g,$sizeMd:u,$sizeSm:f,ref:y,...h,children:t})}),I=x.forwardRef(function({bgGradient:t,children:i,className:o,color:r,display:a,fontFamily:l,fontWeight:s,letterSpacing:d,lineSpacing:p,lineSpacingSm:g,overflow:u,size:f,sizeMd:h,sizeSm:y,textFill:m,whiteSpace:b,wordBreak:k,fontStyle:w,...v},j){return n.jsx(It,{$bgGradient:t,$color:r,$display:a,$fontFamily:l,$fontStyle:w,$fontWeight:s,$letterSpacing:d,$lineSpacing:p,$lineSpacingSm:g,$overflow:u,$size:f,$sizeMd:h,$sizeSm:y,$textFill:m,$whiteSpace:b,$wordBreak:k,className:o,ref:j,...v,children:i})}),Tt=({item:e})=>{const t=e.description&&typeof e.description=="string"?n.jsx(I,{mb:e.extraElement?.5:void 0,size:"sm",children:e.description}):e.description??void 0;return n.jsxs($,{display:"block",id:`panel-${e.title}`,padding:[.75,.75,.75,.75],children:[t,e.extraElement?n.jsx($,{children:e.extraElement}):void 0]})},We={xl:"24px",lg:"16px",md:"14px",sm:"12px",xs:"10px"},bi=e=>We[e]?We[e]:typeof e=="string"&&e.includes("px")?e:We.md,$i=c.st(tt)`
185
+ `,q=x.forwardRef(function({bgGradient:t,children:i,className:o,color:r,display:a,fontFamily:l,fontWeight:s,letterSpacing:d,lineSpacing:p,lineSpacingSm:g,overflow:u,size:f,sizeMd:h,sizeSm:y,textFill:m,whiteSpace:b,wordBreak:j,...w},k){return n.jsx(hi,{$bgGradient:t,$color:r,$display:a,$fontFamily:l,$fontWeight:s,$letterSpacing:d,$lineSpacing:p,$lineSpacingSm:g,$overflow:u,$size:f,$sizeMd:h,$sizeSm:y,$textFill:m,$whiteSpace:b,$wordBreak:j,className:o,ref:k,...w,children:i})}),ue=x.forwardRef(function({children:t,color:i,content:o,display:r,fontFamily:a,fontWeight:l,letterSpacing:s,lineSpacing:d,lineSpacingSm:p,size:g,sizeMd:u,sizeSm:f,...h},y){return n.jsx(yi,{$color:i,$content:o,$display:r,$fontFamily:a,$fontWeight:l,$letterSpacing:s,$lineSpacing:d,$lineSpacingSm:p,$size:g,$sizeMd:u,$sizeSm:f,ref:y,...h,children:t})}),I=x.forwardRef(function({bgGradient:t,children:i,className:o,color:r,display:a,fontFamily:l,fontWeight:s,letterSpacing:d,lineSpacing:p,lineSpacingSm:g,overflow:u,size:f,sizeMd:h,sizeSm:y,textFill:m,whiteSpace:b,wordBreak:j,fontStyle:w,...k},v){return n.jsx(It,{$bgGradient:t,$color:r,$display:a,$fontFamily:l,$fontStyle:w,$fontWeight:s,$letterSpacing:d,$lineSpacing:p,$lineSpacingSm:g,$overflow:u,$size:f,$sizeMd:h,$sizeSm:y,$textFill:m,$whiteSpace:b,$wordBreak:j,className:o,ref:v,...k,children:i})}),Tt=({item:e})=>{const t=e.description&&typeof e.description=="string"?n.jsx(I,{mb:e.extraElement?.5:void 0,size:"sm",children:e.description}):e.description??void 0;return n.jsxs($,{display:"block",id:`panel-${e.title}`,padding:[.875,.875,.875,.875],children:[t,e.extraElement?n.jsx($,{children:e.extraElement}):void 0]})},We={xl:"24px",lg:"16px",md:"14px",sm:"12px",xs:"10px"},bi=e=>We[e]?We[e]:typeof e=="string"&&e.includes("px")?e:We.md,$i=c.st(tt)`
186
186
  ${({$clickable:e,$color:t="inherit",$disabled:i=!1,$hoverColor:o,$rotation:r,$size:a,$secondaryColor:l})=>{const s=o?"":"brightness(50%)",d=o??"";return`
187
187
  color: ${t};
188
188
  cursor: ${e?"pointer":"inherit"};
@@ -218,7 +218,7 @@
218
218
  &:hover:not([disabled]) {
219
219
  transform: scale(1.2);
220
220
  }
221
- `;const R=x.forwardRef(function({clickable:t,disabled:i,hoverColor:o,icon:r,iconClass:a="",iconColor:l,iconMask:s,iconSize:d,iconTransform:p,iconType:g="fa-solid",onClick:u,rotation:f,spanClass:h,secondaryColor:y,...m},b){return n.jsx($i,{$clickable:t,$color:l,$disabled:i,$hoverColor:o,$rotation:f,$secondaryColor:y,$size:d,className:h,"data-testid":`${r}-icon`,onClick:u,ref:b,...m,children:n.jsx("i",{className:`${g} fa-${r} ${a}`,...s!==void 0?{"data-fa-mask":s}:{},...p!==void 0?{"data-fa-transform":p}:{}})},`${g}-${r}`)}),mi=x.forwardRef(function({aligned:t="end",items:i,bgColor:o},r){const a=c.Je(),[l,s]=x.useState(i.map(p=>p.expanded??!1)),d=x.useCallback(p=>g=>{g.preventDefault(),s(u=>u.map((f,h)=>h===p?!f:f))},[]);return n.jsx($,{borderColor:a.palette.gray[200],borderTop:"1px solid",ref:r,children:i.map((p,g)=>{const u=l[g];return n.jsxs($,{bgColor:o??a.palette.white,borderBottom:"1px solid",borderColor:a.palette.gray[200],children:[n.jsx($,{"aria-controls":`panel-${p.title}`,"aria-expanded":u,"aria-label":p.title,as:"button",bgColor:o??a.palette.white,bgColorHover:a.palette.gray[100],cursor:"pointer",display:"flex",onClick:d(g),padding:[.75,.75,.75,.75],width:"100%",children:n.jsxs($,{as:"summary",display:"flex",flexDirection:t==="end"?"row":"row-reverse",gap:.75,justify:"space-between",width:"100%",children:[n.jsx(I,{color:a.palette.gray[800],fontWeight:"bold",size:"sm",sizeSm:"sm",textAlign:"start",children:p.title}),n.jsx(R,{icon:u?"chevron-up":"chevron-down",iconColor:a.palette.gray[400],iconSize:"lg",iconType:"fa-light"})]})}),u&&n.jsx(Tt,{item:p})]},p.title)})})}),wi=e=>{switch(e){case"warning":return"triangle-exclamation";case"info":return"circle-info";case"success":return"circle-check";case"error":default:return"circle-exclamation"}},{getVariant:vi}=Z(e=>({error:`
221
+ `;const R=x.forwardRef(function({clickable:t,disabled:i,hoverColor:o,icon:r,iconClass:a="",iconColor:l,iconMask:s,iconSize:d,iconTransform:p,iconType:g="fa-solid",onClick:u,rotation:f,spanClass:h,secondaryColor:y,...m},b){return n.jsx($i,{$clickable:t,$color:l,$disabled:i,$hoverColor:o,$rotation:f,$secondaryColor:y,$size:d,className:h,"data-testid":`${r}-icon`,onClick:u,ref:b,...m,children:n.jsx("i",{className:`${g} fa-${r} ${a}`,...s!==void 0?{"data-fa-mask":s}:{},...p!==void 0?{"data-fa-transform":p}:{}})},`${g}-${r}`)}),mi=x.forwardRef(function({aligned:t="end",items:i,bgColor:o},r){const a=c.Je(),[l,s]=x.useState(i.map(p=>p.expanded??!1)),d=x.useCallback(p=>g=>{g.preventDefault(),s(u=>u.map((f,h)=>h===p?!f:f))},[]);return n.jsx($,{borderColor:a.palette.gray[200],borderTop:"1px solid",ref:r,children:i.map((p,g)=>{const u=l[g];return n.jsxs($,{bgColor:o??a.palette.white,borderBottom:"1px solid",borderColor:a.palette.gray[200],children:[n.jsx($,{"aria-controls":`panel-${p.title}`,"aria-expanded":u,"aria-label":p.title,as:"button",bgColor:o??a.palette.white,bgColorHover:a.palette.gray[100],cursor:"pointer",display:"flex",onClick:d(g),padding:[.875,.875,.875,.875],width:"100%",children:n.jsxs($,{as:"summary",display:"flex",flexDirection:t==="end"?"row":"row-reverse",gap:.75,justify:"space-between",width:"100%",children:[n.jsx(I,{color:a.palette.gray[800],fontWeight:"bold",size:"sm",sizeSm:"sm",textAlign:"start",children:p.title}),n.jsx(R,{icon:u?"chevron-up":"chevron-down",iconColor:a.palette.gray[400],iconSize:"lg",iconType:"fa-light"})]})}),u&&n.jsx(Tt,{item:p})]},p.title)})})}),wi=e=>{switch(e){case"warning":return"triangle-exclamation";case"info":return"circle-info";case"success":return"circle-check";case"error":default:return"circle-exclamation"}},{getVariant:vi}=Z(e=>({error:`
222
222
  background: ${e.palette.error[50]};
223
223
  border: 1px solid ${e.palette.error[500]};
224
224
  color: ${e.palette.error[700]};
@@ -448,7 +448,7 @@
448
448
  width: max-content;
449
449
  z-index: 999999;
450
450
  `}
451
- `,J=({children:e,disabled:t=!1,display:i="inline-block",height:o,icon:r,iconColor:a,iconSize:l,id:s,maxWidth:d,nodeTip:p,place:g="bottom",tip:u="",title:f="",hide:h=u===""&&f===""&&p===void 0,width:y})=>{const m=c.Je(),[b,k]=x.useState(!1),{refs:w,floatingStyles:v,context:j}=c.useFloating({middleware:[c.flip({fallbackAxisSideDirection:"start"}),c.offset({mainAxis:10}),c.shift()],onOpenChange:k,open:b,placement:g,whileElementsMounted:c.autoUpdate}),S=c.useHover(j,{delay:{close:0,open:500},move:!1}),E=c.useFocus(j),z=c.useRole(j,{role:r?"label":"tooltip"}),{getReferenceProps:C,getFloatingProps:F}=c.useInteractions([S,E,z]);return t?n.jsx(x.StrictMode,{children:e}):n.jsxs(n.Fragment,{children:[n.jsx(Ii,{...C(),display:i,height:o,id:s,ref:w.setReference,width:y,children:r?n.jsx(R,{clickable:!0,disabled:t,icon:r,iconColor:a,iconSize:l??"sm",iconType:b?"fa-solid":"fa-light"}):e}),b&&!h&&se.createPortal(n.jsxs(Ti,{...F(),$maxWidth:d,id:`floating-${s}`,ref:w.setFloating,style:v,children:[c.lodashExports.isEmpty(f)?void 0:n.jsx(I,{color:m.palette.white,fontWeight:"bold",lineSpacing:1.5,size:"sm",textAlign:"start",wordWrap:"break-word",children:f}),c.lodashExports.isEmpty(u)?void 0:n.jsx(I,{color:m.palette.gray[100],lineSpacing:1.5,size:"sm",textAlign:"start",wordWrap:"break-word",children:u}),c.lodashExports.isEmpty(p)?void 0:p]}),document.getElementById("root")??document.body)]})},M=x.forwardRef(function({borderRadius:t,disabled:i,icon:o,iconColor:r,iconSize:a="sm",iconTransform:l,iconType:s,id:d,justify:p="center",onClick:g,px:u,py:f,type:h="button",tooltip:y,tooltipPlace:m,value:b,variant:k="primary",...w},v){const j=n.jsx(zi,{$variant:k,"aria-disabled":i,"aria-label":d,borderRadius:t,disabled:i,id:d,justify:p,onClick:g,px:u,py:f,ref:v,type:h,value:b,...w,children:n.jsx(R,{clickable:!1,icon:o,iconColor:r,iconSize:a,iconTransform:l,iconType:s})}),E=(h+(k??"")+(d??o)).replace(/ /u,"_");return y===void 0?j:n.jsx(J,{id:`${E}-tooltip`,place:m,tip:y,children:j})}),Ei=x.forwardRef(function({autoHide:t=!1,children:i,closable:o=!1,iconEnabled:r=!0,onTimeOut:a,show:l=!0,time:s=8,variant:d="error",id:p,...g},u){const[f,h]=x.useState(l),y=x.useCallback(()=>{h(!1)},[]);return x.useEffect(()=>{const m=setTimeout(()=>{a==null||a(!0),t&&y()},s*1e3);return()=>{clearTimeout(m)}},[t,y,s,a]),x.useEffect(()=>{h(l)},[l,h]),n.jsx($,{display:f?"block":"none",ref:u,role:"alert",...g,children:n.jsxs(ji,{$variant:d,id:p,children:[r?n.jsx(R,{clickable:!1,icon:wi(d),iconSize:"lg",iconType:"fa-light"}):void 0,n.jsx(ki,{children:i}),o?n.jsx(M,{height:"fit-content",icon:"close",iconSize:"lg",iconType:"fa-light",onClick:y,px:.125,py:.125,variant:"ghost"}):void 0]})})}),xt=c.st.div`
451
+ `,J=({children:e,disabled:t=!1,display:i="inline-block",height:o,icon:r,iconColor:a,iconSize:l,id:s,maxWidth:d,nodeTip:p,place:g="bottom",tip:u="",title:f="",hide:h=u===""&&f===""&&p===void 0,width:y})=>{const m=c.Je(),[b,j]=x.useState(!1),{refs:w,floatingStyles:k,context:v}=c.useFloating({middleware:[c.flip({fallbackAxisSideDirection:"start"}),c.offset({mainAxis:10}),c.shift()],onOpenChange:j,open:b,placement:g,whileElementsMounted:c.autoUpdate}),S=c.useHover(v,{delay:{close:0,open:500},move:!1}),T=c.useFocus(v),z=c.useRole(v,{role:r?"label":"tooltip"}),{getReferenceProps:C,getFloatingProps:F}=c.useInteractions([S,T,z]);return t?n.jsx(x.StrictMode,{children:e}):n.jsxs(n.Fragment,{children:[n.jsx(Ii,{...C(),display:i,height:o,id:s,ref:w.setReference,width:y,children:r?n.jsx(R,{clickable:!0,disabled:t,icon:r,iconColor:a,iconSize:l??"sm",iconType:b?"fa-solid":"fa-light"}):e}),b&&!h&&se.createPortal(n.jsxs(Ti,{...F(),$maxWidth:d,id:`floating-${s}`,ref:w.setFloating,style:k,children:[c.lodashExports.isEmpty(f)?void 0:n.jsx(I,{color:m.palette.white,fontWeight:"bold",lineSpacing:1.5,size:"sm",textAlign:"start",wordWrap:"break-word",children:f}),c.lodashExports.isEmpty(u)?void 0:n.jsx(I,{color:m.palette.gray[100],lineSpacing:1.5,size:"sm",textAlign:"start",wordWrap:"break-word",children:u}),c.lodashExports.isEmpty(p)?void 0:p]}),document.getElementById("root")??document.body)]})},M=x.forwardRef(function({borderRadius:t,disabled:i,icon:o,iconColor:r,iconSize:a="sm",iconTransform:l,iconType:s,id:d,justify:p="center",onClick:g,px:u,py:f,type:h="button",tooltip:y,tooltipPlace:m,value:b,variant:j="primary",...w},k){const v=n.jsx(zi,{$variant:j,"aria-disabled":i,"aria-label":d,borderRadius:t,disabled:i,id:d,justify:p,onClick:g,px:u,py:f,ref:k,type:h,value:b,...w,children:n.jsx(R,{clickable:!1,icon:o,iconColor:r,iconSize:a,iconTransform:l,iconType:s})}),T=(h+(j??"")+(d??o)).replace(/ /u,"_");return y===void 0?v:n.jsx(J,{id:`${T}-tooltip`,place:m,tip:y,children:v})}),Ei=x.forwardRef(function({autoHide:t=!1,children:i,closable:o=!1,iconEnabled:r=!0,onTimeOut:a,show:l=!0,time:s=8,variant:d="error",id:p,...g},u){const[f,h]=x.useState(l),y=x.useCallback(()=>{h(!1)},[]);return x.useEffect(()=>{const m=setTimeout(()=>{a==null||a(!0),t&&y()},s*1e3);return()=>{clearTimeout(m)}},[t,y,s,a]),x.useEffect(()=>{h(l)},[l,h]),n.jsx($,{display:f?"block":"none",ref:u,role:"alert",...g,children:n.jsxs(ji,{$variant:d,id:p,children:[r?n.jsx(R,{clickable:!1,icon:wi(d),iconSize:"lg",iconType:"fa-light"}):void 0,n.jsx(ki,{children:i}),o?n.jsx(M,{height:"fit-content",icon:"close",iconSize:"lg",iconType:"fa-light",onClick:y,px:.125,py:.125,variant:"ghost"}):void 0]})})}),xt=c.st.div`
452
452
  ${({theme:e})=>`
453
453
  align-items: center;
454
454
  background-color: ${e.palette.gray[200]};
@@ -666,7 +666,7 @@
666
666
  ${Rt}
667
667
  `,Li=c.st(_e.Link)`
668
668
  ${Rt}
669
- `,X=({children:e,color:t,download:i,href:o,iconPosition:r="right",onClick:a,target:l,variant:s="lowRelevance"})=>{const d=o.startsWith("https://"),p=n.jsx(R,{icon:i===void 0?"arrow-up-right-from-square":"arrow-down-to-bracket",iconSize:"sm",iconType:"fa-light",ml:.25,mr:.25});return d?n.jsxs(Ai,{$color:t,$variant:s,download:i,href:o,onClick:a,rel:"nofollow noopener noreferrer",target:l??"_blank",children:[r==="left"?p:void 0,e,r==="right"?p:void 0]}):n.jsxs(Li,{$variant:s,download:i,onClick:a,rel:"nofollow noopener noreferrer",target:l,to:o,children:[l!==void 0&&r==="left"?p:void 0,e,l!==void 0&&r==="right"?p:void 0]})},U=({disabled:e,icon:t,iconColor:i="inherit",iconType:o="fa-light",id:r="close-tag",filterValues:a="",fontSize:l,href:s,linkLabel:d,onClose:p,priority:g="default",tagTitle:u="",tagLabel:f,variant:h="default"})=>{const y=f.length>25&&c.lodashExports.isEmpty(u+a),m=`${f.slice(0,25)}...`;return n.jsxs(ue,{className:"gap-0.5",display:s===void 0?"initial":"flex",size:"sm",children:[n.jsxs(Ni,{$fontSize:l,$variant:h,className:g,children:[t&&n.jsx(R,{icon:t,iconColor:i,iconSize:"sm",iconType:o}),n.jsxs("span",{className:"w-full",children:[n.jsx("strong",{children:u}),n.jsx("span",{children:y?m:f}),n.jsx("strong",{className:"w-full",children:a})]}),p?n.jsx(M,{disabled:e,icon:"xmark",iconSize:"sm",iconType:"fa-light",id:r,onClick:p,px:.125,py:.125,variant:"ghost"}):void 0]}),s===void 0?void 0:n.jsx(X,{href:s,children:d})]})},Dt=(e,t=!0)=>{const i=window.open(e,t?void 0:"_self","noopener,noreferrer,");c.lodashExports.isObject(i)&&(i.opener=null)},P=x.forwardRef(function({children:t,disabled:i=!1,external:o=!1,href:r,id:a,icon:l,iconColor:s,iconType:d,name:p,notification:g,onClick:u,rightIcon:f,tag:h,type:y="button",tooltip:m,tooltipPlace:b="bottom",underline:k=!1,value:w,variant:v="primary",width:j,...S},E){const z=m!==void 0,C=`${a}-tooltip`,F=x.useCallback(()=>{r&&Dt(r,o)},[o,r]),T=n.jsxs(Et,{$icon:l!==void 0,$notification:g!==void 0&&v==="ghost"&&!i,$variant:v,"aria-disabled":i,className:k?"underline":void 0,disabled:i,id:a,name:p,onClick:v==="link"?F:u,ref:E,type:y,value:w,width:j,...z?{"data-tooltip-id":C}:{},...S,children:[l!==void 0&&n.jsx(R,{icon:l,iconColor:s??void 0,iconSize:"lg",iconType:d??"fa-light"}),t,f||v==="link"?n.jsx(R,{icon:f??"arrow-right",iconSize:"lg",iconType:"fa-light"}):void 0,h===void 0||i?null:n.jsx(U,{tagLabel:h,variant:"default"}),g!==void 0&&v==="ghost"&&!i?n.jsx(Si,{children:g}):void 0]});return z?n.jsx(J,{disabled:!z,id:C,place:b,tip:m,width:j,children:T}):T}),Pi=x.forwardRef(function({children:t,onClick:i,userName:o,showIcon:r=!1,showUsername:a=!1},l){const s=!!i;return n.jsx($,{id:"navbar-user-profile",ref:l,zIndex:9999,children:n.jsxs($,{alignItems:"end",display:"flex",flexDirection:"column",position:"relative",zIndex:30,children:[s?n.jsxs(P,{onClick:i,pb:.5,pl:.5,pr:.5,pt:.5,variant:"ghost",children:[n.jsx(xt,{children:o[0].toUpperCase()}),a?n.jsx(I,{color:"#1d2939",display:"inline",ml:.5,size:"sm",children:o.split(" ")[0]}):void 0,r?n.jsx(R,{clickable:!1,icon:"ellipsis-v",iconSize:"xs",ml:.5}):void 0]}):n.jsxs($,{alignItems:"center",display:"flex",px:.5,py:.5,children:[n.jsx(xt,{children:o[0].toUpperCase()}),a?n.jsxs(I,{color:"#1d2939",display:"inline",ml:.5,size:"sm",children:["Hi ",o.split(" ")[0],"!"]}):void 0,r?n.jsx(R,{clickable:!1,icon:"ellipsis-v",iconSize:"xs",ml:.5}):void 0]}),n.jsx(Ri,{children:t})]})})}),De=({authorEmail:e,date:t,description:i,descriptionColor:o,id:r,title:a,titleColor:l,textAlign:s,textSpacing:d=0,tooltip:p})=>{const g=c.Je();return n.jsxs($,{width:"100%",children:[typeof a=="string"||p?n.jsxs($,{alignItems:"center",display:"inline-flex",gap:.5,width:"100%",children:[typeof a=="string"?n.jsx(I,{color:l??g.palette.gray[800],fontWeight:"bold",mb:d,size:"sm",textAlign:s,wordBreak:"break-word",children:a}):a,p&&n.jsx(J,{icon:"circle-info",id:r,place:"top",tip:p})]}):void 0,n.jsxs($,{alignItems:"start",display:"flex",flexDirection:"column",gap:.25,children:[i&&n.jsx(I,{color:o??g.palette.gray[800],fontWeight:i===void 0?"bold":"regular",size:"sm",textAlign:s,wordBreak:"break-word",children:i}),t&&n.jsx(I,{color:g.palette.gray[800],fontWeight:"bold",size:"sm",textAlign:s,wordBreak:"break-word",children:`Date: ${t.split(" ")[0]}`}),e&&n.jsx(I,{color:g.palette.gray[800],fontWeight:"bold",size:"sm",textAlign:s,wordBreak:"break-word",children:`Author: ${e}`})]})]})},ft=c.st($).attrs(({...e})=>({display:"inline-block",position:"relative",...e}))`
669
+ `,X=({children:e,color:t,download:i,href:o,iconPosition:r="right",onClick:a,target:l,variant:s="lowRelevance"})=>{const d=o.startsWith("https://"),p=n.jsx(R,{icon:i===void 0?"arrow-up-right-from-square":"arrow-down-to-bracket",iconSize:"sm",iconType:"fa-light",ml:.25,mr:.25});return d?n.jsxs(Ai,{$color:t,$variant:s,download:i,href:o,onClick:a,rel:"nofollow noopener noreferrer",target:l??"_blank",children:[r==="left"?p:void 0,e,r==="right"?p:void 0]}):n.jsxs(Li,{$variant:s,download:i,onClick:a,rel:"nofollow noopener noreferrer",target:l,to:o,children:[l!==void 0&&r==="left"?p:void 0,e,l!==void 0&&r==="right"?p:void 0]})},U=({disabled:e,icon:t,iconColor:i="inherit",iconType:o="fa-light",id:r="close-tag",filterValues:a="",fontSize:l,href:s,linkLabel:d,onClose:p,priority:g="default",tagTitle:u="",tagLabel:f,variant:h="default"})=>{const y=f.length>25&&c.lodashExports.isEmpty(u+a),m=`${f.slice(0,25)}...`;return n.jsxs(ue,{className:"gap-0.5",display:s===void 0?"initial":"flex",size:"sm",children:[n.jsxs(Ni,{$fontSize:l,$variant:h,className:g,children:[t&&n.jsx(R,{icon:t,iconColor:i,iconSize:"sm",iconType:o}),n.jsxs("span",{className:"w-full",children:[n.jsx("strong",{children:u}),n.jsx("span",{children:y?m:f}),n.jsx("strong",{className:"w-full",children:a})]}),p?n.jsx(M,{disabled:e,icon:"xmark",iconSize:"sm",iconType:"fa-light",id:r,onClick:p,px:.125,py:.125,variant:"ghost"}):void 0]}),s===void 0?void 0:n.jsx(X,{href:s,children:d})]})},Dt=(e,t=!0)=>{const i=window.open(e,t?void 0:"_self","noopener,noreferrer,");c.lodashExports.isObject(i)&&(i.opener=null)},P=x.forwardRef(function({children:t,disabled:i=!1,external:o=!1,href:r,id:a,icon:l,iconColor:s,iconType:d,name:p,dotNotification:g,notification:u,onClick:f,rightIcon:h,tag:y,type:m="button",tooltip:b,tooltipPlace:j="bottom",underline:w=!1,value:k,variant:v="primary",width:S,...T},z){const C=b!==void 0,F=`${a}-tooltip`,E=x.useCallback(()=>{r&&Dt(r,o)},[o,r]),A=n.jsxs(Et,{$icon:l!==void 0,$notification:g&&v==="ghost"&&!i,$variant:v,"aria-disabled":i,className:w?"underline":void 0,disabled:i,id:a,name:p,onClick:v==="link"?E:f,ref:z,type:m,value:k,width:S,...C?{"data-tooltip-id":F}:{},...T,children:[l!==void 0&&n.jsx(R,{icon:l,iconColor:s??void 0,iconSize:"lg",iconType:d??"fa-light"}),t,h||v==="link"?n.jsx(R,{icon:h??"arrow-right",iconSize:"lg",iconType:"fa-light"}):void 0,y===void 0||i?null:n.jsx(U,{tagLabel:y,variant:"default"}),u!==void 0&&v==="ghost"&&!i?n.jsx(Si,{children:u}):void 0]});return C?n.jsx(J,{disabled:!C,id:F,place:j,tip:b,width:S,children:A}):A}),Pi=x.forwardRef(function({children:t,onClick:i,userName:o,showIcon:r=!1,showUsername:a=!1},l){const s=!!i;return n.jsx($,{id:"navbar-user-profile",ref:l,zIndex:9999,children:n.jsxs($,{alignItems:"end",display:"flex",flexDirection:"column",position:"relative",zIndex:30,children:[s?n.jsxs(P,{onClick:i,pb:.5,pl:.5,pr:.5,pt:.5,variant:"ghost",children:[n.jsx(xt,{children:o[0].toUpperCase()}),a?n.jsx(I,{color:"#1d2939",display:"inline",ml:.5,size:"sm",children:o.split(" ")[0]}):void 0,r?n.jsx(R,{clickable:!1,icon:"ellipsis-v",iconSize:"xs",ml:.5}):void 0]}):n.jsxs($,{alignItems:"center",display:"flex",px:.5,py:.5,children:[n.jsx(xt,{children:o[0].toUpperCase()}),a?n.jsxs(I,{color:"#1d2939",display:"inline",ml:.5,size:"sm",children:["Hi ",o.split(" ")[0],"!"]}):void 0,r?n.jsx(R,{clickable:!1,icon:"ellipsis-v",iconSize:"xs",ml:.5}):void 0]}),n.jsx(Ri,{children:t})]})})}),De=({authorEmail:e,date:t,description:i,descriptionColor:o,id:r,title:a,titleColor:l,textAlign:s,textSpacing:d=0,tooltip:p})=>{const g=c.Je();return n.jsxs($,{width:"100%",children:[typeof a=="string"||p?n.jsxs($,{alignItems:"center",display:"inline-flex",gap:.5,width:"100%",children:[typeof a=="string"?n.jsx(I,{color:l??g.palette.gray[800],fontWeight:"bold",mb:d,size:"sm",textAlign:s,wordBreak:"break-word",children:a}):a,p&&n.jsx(J,{icon:"circle-info",id:r,place:"top",tip:p})]}):void 0,n.jsxs($,{alignItems:"start",display:"flex",flexDirection:"column",gap:.25,children:[i&&n.jsx(I,{color:o??g.palette.gray[800],fontWeight:i===void 0?"bold":"regular",size:"sm",textAlign:s,wordBreak:"break-word",children:i}),t&&n.jsx(I,{color:g.palette.gray[800],fontWeight:"bold",size:"sm",textAlign:s,wordBreak:"break-word",children:`Date: ${t.split(" ")[0]}`}),e&&n.jsx(I,{color:g.palette.gray[800],fontWeight:"bold",size:"sm",textAlign:s,wordBreak:"break-word",children:`Author: ${e}`})]})]})},ft=c.st($).attrs(({...e})=>({display:"inline-block",position:"relative",...e}))`
670
670
  & img {
671
671
  display: block;
672
672
  }
@@ -681,7 +681,7 @@
681
681
  pointer-events: none;
682
682
  ${({$opacity:e=0})=>`background-color: rgba(0, 0, 0, ${e});`}
683
683
  }
684
- `,Oi=e=>{if(c._.isNil(e))return"";const t=e.split(".");return(t.length>1?c._.last(t):"").toLowerCase()},Mi=(e,t)=>c._.isUndefined(t)?!1:c._.includes(e,Oi(t)),Nt=({alt:e,fileType:t,width:i="100%",opacity:o=0,src:r,height:a="auto",videoViewStatus:l})=>{const[s,d]=x.useState({start:!1,half:!1,end:!1}),p=x.useCallback(g=>{if(!l)return;const u=g.target,f=u.currentTime/u.duration*100;f>5&&f<50?(s.start||l("start"),d({start:!0,half:!1,end:!1})):f>=50&&f<99?(s.half||l("half"),d({start:!0,half:!0,end:!1})):f>=99?(s.end||l("end"),d({start:!0,half:!0,end:!0})):d({start:!1,half:!1,end:!1})},[l,s]);return t==="video"||Mi(["webm"],r)?n.jsx(ft,{$opacity:o,children:n.jsx(X,{href:r,iconPosition:"hidden",children:n.jsxs("video",{controls:!0,muted:!0,onTimeUpdate:p,style:{height:a,width:i},children:[n.jsx("source",{src:r,type:"video/webm"}),r]})})}):n.jsx(ft,{$opacity:o,children:n.jsx("img",{alt:e,src:r,style:{height:a,width:i}})})},Hi=({alt:e,authorEmail:t,date:i,description:o,src:r,children:a,isEditing:l,onClick:s,title:d,hideDescription:p=!1,headerType:g="image",showMaximize:u=!0,videoViewStatus:f})=>{const h=c.Je(),[y,m]=x.useState(!1),b=x.useCallback(()=>{m(!0)},[]),k=x.useCallback(()=>{m(!1)},[]);return n.jsxs($,{bgColor:"transparent",border:"1px solid transparent",borderColorHover:"black",borderRadius:h.spacing[.25],display:"flex",flexDirection:"column",gap:1,onHover:b,onLeave:k,padding:[.5,.5,.5,.5],width:"100%",children:[n.jsx($,{cursor:l?"unset":"pointer",display:"inline-flex",justify:"center",onClick:s,position:"relative",width:"100%",children:a===void 0?n.jsxs(x.Fragment,{children:[n.jsx(Nt,{alt:e,fileType:g,height:"147px",opacity:y?.3:0,src:r,videoViewStatus:f,width:"100%"}),u?n.jsx($,{bottom:"10px",position:"absolute",right:"10px",children:n.jsx(M,{color:"white",icon:"arrows-maximize",iconSize:"sm",iconType:"fa-light",variant:"secondary"})}):void 0]}):a}),p?null:n.jsx(De,{authorEmail:t,date:i,description:o,descriptionColor:h.palette.gray[600],id:`${e}-card-header`,title:d})]})},Wi=c.st.div`
684
+ `,Oi=e=>{if(c._.isNil(e))return"";const t=e.split(".");return(t.length>1?c._.last(t):"").toLowerCase()},Mi=(e,t)=>c._.isUndefined(t)?!1:c._.includes(e,Oi(t)),Nt=({alt:e,fileType:t,width:i="100%",opacity:o=0,src:r,height:a="auto",videoViewStatus:l})=>{const[s,d]=x.useState({start:!1,half:!1,end:!1}),p=x.useCallback(g=>{if(!l)return;const u=g.target,f=u.currentTime/u.duration*100;f>5&&f<50?(s.start||l("start"),d({start:!0,half:!1,end:!1})):f>=50&&f<99?(s.half||l("half"),d({start:!0,half:!0,end:!1})):f>=99?(s.end||l("end"),d({start:!0,half:!0,end:!0})):d({start:!1,half:!1,end:!1})},[l,s]);return t==="video"||Mi(["webm"],r)?n.jsx(ft,{$opacity:o,children:n.jsx(X,{href:r,iconPosition:"hidden",children:n.jsxs("video",{controls:!0,muted:!0,onTimeUpdate:p,style:{height:a,width:i},children:[n.jsx("source",{src:r,type:"video/webm"}),r]})})}):n.jsx(ft,{$opacity:o,children:n.jsx("img",{alt:e,src:r,style:{height:a,width:i}})})},Hi=({alt:e,authorEmail:t,date:i,description:o,src:r,children:a,isEditing:l,onClick:s,title:d,hideDescription:p=!1,headerType:g="image",showMaximize:u=!0,videoViewStatus:f})=>{const h=c.Je(),[y,m]=x.useState(!1),b=x.useCallback(()=>{m(!0)},[]),j=x.useCallback(()=>{m(!1)},[]);return n.jsxs($,{bgColor:"transparent",border:"1px solid transparent",borderColorHover:"black",borderRadius:h.spacing[.25],display:"flex",flexDirection:"column",gap:1,onHover:b,onLeave:j,padding:[.5,.5,.5,.5],width:"100%",children:[n.jsx($,{cursor:l?"unset":"pointer",display:"inline-flex",justify:"center",onClick:s,position:"relative",width:"100%",children:a===void 0?n.jsxs(x.Fragment,{children:[n.jsx(Nt,{alt:e,fileType:g,height:"147px",opacity:y?.3:0,src:r,videoViewStatus:f,width:"100%"}),u?n.jsx($,{bottom:"10px",position:"absolute",right:"10px",children:n.jsx(M,{color:"white",icon:"arrows-maximize",iconSize:"sm",iconType:"fa-light",variant:"secondary"})}):void 0]}):a}),p?null:n.jsx(De,{authorEmail:t,date:i,description:o,descriptionColor:h.palette.gray[600],id:`${e}-card-header`,title:d})]})},Wi=c.st.div`
685
685
  ${({theme:e,$align:t="center",$minWidth:i="auto",$minHeight:o="auto"})=>`
686
686
  display: flex;
687
687
  background-color: ${e.palette.white};
@@ -1001,7 +1001,7 @@
1001
1001
  fill: ${e.palette.white};
1002
1002
  }
1003
1003
  `}
1004
- `,oe=x.forwardRef(function({checked:t,disabled:i=!1,label:o,name:r,onChange:a,onClick:l,onFocus:s,onKeyDown:d,tooltip:p,value:g,...u},f){return n.jsxs("div",{className:"gap-1 inline-flex items-start",children:[n.jsxs(Ui,{"aria-disabled":i,children:[n.jsx("input",{"aria-checked":t,"aria-disabled":i,"aria-hidden":!1,"aria-label":r,checked:t,"data-testid":o??g,disabled:i,id:r,name:r,onChange:a,onClick:l,onFocus:s,onKeyDown:d,ref:f,type:"checkbox",value:g,...u}),n.jsx(R,{disabled:i,icon:"check",iconSize:"xl"}),o??g]}),p===void 0?void 0:n.jsx(J,{icon:"circle-info",id:p,place:"right",tip:p})]})}),Q=(e,t,i=!1,o)=>{x.useEffect(()=>{var a;const r=l=>{e&&!e.contains(l.target)&&!(o!=null&&o.contains(l.target))&&t()};return i?(document.addEventListener("mousedown",r,!0),()=>{document.removeEventListener("mousedown",r,!0)}):((a=document.getElementById("root"))==null||a.addEventListener("mousedown",r,!0),()=>{var l;(l=document.getElementById("root"))==null||l.removeEventListener("mousedown",r,!0)})},[i,e,o,t])},Ft=({item:e,multiSelection:t,name:i,register:o,setInputValue:r,setValue:a,state:l,watch:s})=>{var z,C,F;const d=c.Je(),p=x.useRef(null),g=e.props.hrefLang,u=l.disabledKeys,f=Array.from(l.collection.getKeys()).filter(T=>!Array.from(u).includes(T)&&T!=="All"),{optionProps:h,isSelected:y,isFocused:m,isDisabled:b}=c.$293f70390ea03370$export$497855f14858aa34({key:e.key},l,p),k=[y?"selected":"",m?"focused":"",b?"disabled":""].join(" "),w=x.useCallback(T=>{r(""),a==null||a(`${i}Options`,""),T.currentTarget.checked&&(r(T.currentTarget.value),a==null||a(`${i}Options`,f))},[f,i,r,a]),v=x.useCallback(()=>{const T=s==null?void 0:s(`${i}Options`),A=typeof T=="string"?[T]:T;c.isEqual(f,A)&&!Array.from(u).includes("All")?(a==null||a("checkAll","All vulnerability types"),r("All vulnerability types")):(a==null||a("checkAll",""),r((A==null?void 0:A.length)<=2?A.join(", "):`${A.slice(0,2).join(", ")+`, +${A.length-2} more`}`))},[u,f,i,r,a,s]),j=e.key==="All"?n.jsx(oe,{...o==null?void 0:o("checkAll",{onChange:w}),label:(z=e.rendered)==null?void 0:z.toString(),name:"checkAll",value:(C=e.rendered)==null?void 0:C.toString()}):n.jsx(oe,{...o==null?void 0:o(`${i}Options`,{onChange:v}),label:(F=e.rendered)==null?void 0:F.toString(),name:`${i}Options`,value:e.key.toString()}),S=t&&!b?j:n.jsx(I,{color:d.palette.gray[800],size:"sm",textOverflow:"ellipsis",whiteSpace:"nowrap",children:e.rendered}),E=x.useCallback(T=>{var A;T.preventDefault(),r(((A=e.rendered)==null?void 0:A.toString())??""),l.setSelectedKey(e.key),setTimeout(()=>{l.setOpen(!1)},50),Dt(g)},[g,e.key,e.rendered,l,r]);return Q(document.getElementsByClassName("dropdown")[0],()=>{t&&l.close()},!0,document.getElementById("combobox")),n.jsxs(Vi,{...!t&&!g?h:{},$multiSelection:t,className:k,ref:p,children:[g?n.jsx(X,{href:g,onClick:E,children:S}):S,y&&!b&&!t?n.jsx(R,{icon:"check",iconSize:"sm",iconType:"fa-light"}):void 0,e.rendered===e.textValue?void 0:n.jsx(U,{tagLabel:e.textValue,variant:"inactive"})]})},Je=({field:e,disabled:t=!1,disabledKeys:i,error:o,helpLink:r,helpLinkText:a,helpText:l,label:s,loadingItems:d,name:p,multiSelection:g=!1,items:u,onBlur:f,onChange:h,placeholder:y,register:m,required:b,setValue:k,tooltip:w,value:v,watch:j,weight:S})=>{var gt;const E=c.Je(),z=t?void 0:o,C=(e==null?void 0:e.value)??v,[F,T]=x.useState(((gt=u.find(L=>L.value===C))==null?void 0:gt.name)??""),[A,G]=x.useState(C),[Y,ie]=x.useState(u),[H,O]=x.useState(!1),{contains:K}=c.$bb77f239b46e8c72$export$3274cf84b703fff({sensitivity:"base"}),le=x.useRef(null),Pe=x.useRef(null),Oe=x.useRef(null),Me=x.useRef(null),He=x.useRef(null),Jn=x.useMemo(()=>u.toSorted((L,W)=>{const B=Array.from(i??[]),ce=B.includes(L.value),ut=B.includes(W.value);return ce&&!ut?1:!ce&&ut?-1:0}).map(L=>K(L.name,F)||H?n.jsx(c.$c1d7fb2ec91bae71$export$6d08773d2e66f8f2,{"aria-label":L.value,hrefLang:L.href,textValue:L.tag,children:L.name},L.value):null),[K,i,F,u,H]),Vn=x.useCallback(L=>{const W=L.split(/,|\s/u).slice(-1)[0].trim();T(g?W:L),L===""||L.endsWith(",")?O(!0):(O(!1),G(B=>{const ce=L===""?"":B;return e&&e.onChange(ce),h&&h(L),ce}),ie(u.filter(B=>K(B.name,g?W:L))))},[K,u,e,g,h]),Un=x.useCallback(L=>{var W;T(((W=u.find(B=>B.value===L))==null?void 0:W.name)??""),G(L?String(L):""),e&&e.onChange(L),h&&h(L?String(L):""),ie(u)},[u,e,h]),pt=x.useCallback(L=>{L.key==="Enter"&&L.preventDefault(),O(!1)},[]),Gn=x.useCallback(()=>{f&&f(),e&&e.onBlur()},[e,f]),Yn=x.useCallback(()=>{O(!0)},[]),V=c.$a9e7382a7d111cb5$export$b453a3bfd4a5fa9e({allowsCustomValue:g,allowsEmptyCollection:!0,disabledKeys:i,inputValue:F,items:Y,menuTrigger:"focus",shouldCloseOnBlur:!g,selectedKey:A,onBlur:Gn,onInputChange:Vn,onKeyDown:pt,onKeyUp:Yn,onOpenChange(L,W){O(L&&(W==="manual"||W==="focus")),L&&setTimeout(()=>{var B;return(B=le.current)==null?void 0:B.focus()},50)},onSelectionChange:g?void 0:Un,children:Jn}),{buttonProps:Kn,inputProps:Zn,listBoxProps:qn}=c.$c350ade66beef0af$export$8c18d1b4f7232bbf({inputValue:F,buttonRef:Pe,id:p,inputRef:le,label:s??p,listBoxRef:Oe,name:p,placeholder:y,popoverRef:He},V),{listBoxProps:Xn}=c.$c132121280ec012d$export$50eacbbf140a3141(qn,V,Oe),{buttonProps:Qn}=c.$701a24aa0da5b062$export$ea18c227d4417cc3(Kn,Pe);return Q(Me.current,()=>{V.isOpen&&!g&&V.close()},!0,He.current),x.useEffect(()=>{var L;if((d===!1||!C)&&!g){const W=((L=u.find(B=>B.value===C))==null?void 0:L.name)??"";T(W),G(W)}},[C,u,d,g]),n.jsxs(_,{error:z,helpLink:r,helpLinkText:a,helpText:l,htmlFor:p,id:"combobox",label:s,required:b,tooltip:w,weight:S,children:[n.jsxs(ne,{className:`${t?"disabled":""} ${z?"error":""}`,ref:Me,children:[n.jsx("input",{...Zn,"aria-invalid":z?"true":"false","aria-label":p,disabled:t,onKeyDown:pt,ref:le}),z?n.jsx(R,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:E.palette.error[500],iconSize:"lg"}):void 0,n.jsx(M,{...Qn,className:"action",disabled:t,icon:V.isOpen&&!t?"chevron-up":"chevron-down",iconColor:E.palette.gray[400],iconSize:"sm",iconType:"fa-light",px:.125,py:.125,ref:Pe,type:"button",variant:"ghost"})]}),V.isOpen&&V.collection.size>0&&!t?n.jsx(Ce,{className:"dropdown",offset:4,placement:"bottom start",popoverRef:He,state:V,triggerRef:Me,children:n.jsx(Ji,{...Xn,$multiSelection:g&&!Array.from(i??[]).includes("All"),ref:Oe,children:[...V.collection].map(L=>n.jsx(Ft,{item:L,multiSelection:g,name:p,register:m,setInputValue:T,setValue:k,state:V,watch:j},L.key))})}):null]})},it=({control:e,disabled:t=!1,disabledKeys:i,error:o,helpLink:r,helpLinkText:a,helpText:l,label:s,loadingItems:d,name:p,multiSelection:g,items:u,onBlur:f,onChange:h,placeholder:y,register:m,required:b,setValue:k,tooltip:w,value:v,watch:j,weight:S})=>e?n.jsx(c.Controller,{control:e,name:p,render:({field:E,fieldState:z})=>{var C;return n.jsx(Je,{disabled:t,disabledKeys:i,error:(C=z.error)==null?void 0:C.message,field:E,helpLink:r,helpLinkText:a,helpText:l,items:u,label:s,loadingItems:d,multiSelection:g,name:p,onBlur:f,onChange:h,placeholder:y,register:m,required:b,setValue:k,tooltip:w,value:v,watch:j,weight:S})},rules:{required:b}}):n.jsx(Je,{disabled:t,disabledKeys:i,error:o,helpLink:r,helpLinkText:a,helpText:l,items:u,label:s,loadingItems:d,multiSelection:g,name:p,onBlur:f,onChange:h,placeholder:y,required:b,tooltip:w,value:v,weight:S}),Gi=c.st.div`
1004
+ `,oe=x.forwardRef(function({checked:t,disabled:i=!1,label:o,name:r,onChange:a,onClick:l,onFocus:s,onKeyDown:d,tooltip:p,value:g,...u},f){return n.jsxs("div",{className:"gap-1 inline-flex items-start",children:[n.jsxs(Ui,{"aria-disabled":i,children:[n.jsx("input",{"aria-checked":t,"aria-disabled":i,"aria-hidden":!1,"aria-label":r,checked:t,"data-testid":o??g,disabled:i,id:r,name:r,onChange:a,onClick:l,onFocus:s,onKeyDown:d,ref:f,type:"checkbox",value:g,...u}),n.jsx(R,{disabled:i,icon:"check",iconSize:"xl"}),o??g]}),p===void 0?void 0:n.jsx(J,{icon:"circle-info",id:p,place:"right",tip:p})]})}),Q=(e,t,i=!1,o)=>{x.useEffect(()=>{var a;const r=l=>{e&&!e.contains(l.target)&&!(o!=null&&o.contains(l.target))&&t()};return i?(document.addEventListener("mousedown",r,!0),()=>{document.removeEventListener("mousedown",r,!0)}):((a=document.getElementById("root"))==null||a.addEventListener("mousedown",r,!0),()=>{var l;(l=document.getElementById("root"))==null||l.removeEventListener("mousedown",r,!0)})},[i,e,o,t])},Ft=({item:e,multiSelection:t,name:i,register:o,setInputValue:r,setValue:a,state:l,watch:s})=>{var z,C,F;const d=c.Je(),p=x.useRef(null),g=e.props.hrefLang,u=l.disabledKeys,f=Array.from(l.collection.getKeys()).filter(E=>!Array.from(u).includes(E)&&E!=="All"),{optionProps:h,isSelected:y,isFocused:m,isDisabled:b}=c.$293f70390ea03370$export$497855f14858aa34({key:e.key},l,p),j=[y?"selected":"",m?"focused":"",b?"disabled":""].join(" "),w=x.useCallback(E=>{r(""),a==null||a(`${i}Options`,""),E.currentTarget.checked&&(r(E.currentTarget.value),a==null||a(`${i}Options`,f))},[f,i,r,a]),k=x.useCallback(()=>{const E=s==null?void 0:s(`${i}Options`),A=typeof E=="string"?[E]:E;c.isEqual(f,A)&&!Array.from(u).includes("All")?(a==null||a("checkAll","All vulnerability types"),r("All vulnerability types")):(a==null||a("checkAll",""),r((A==null?void 0:A.length)<=2?A.join(", "):`${A.slice(0,2).join(", ")+`, +${A.length-2} more`}`))},[u,f,i,r,a,s]),v=e.key==="All"?n.jsx(oe,{...o==null?void 0:o("checkAll",{onChange:w}),label:(z=e.rendered)==null?void 0:z.toString(),name:"checkAll",value:(C=e.rendered)==null?void 0:C.toString()}):n.jsx(oe,{...o==null?void 0:o(`${i}Options`,{onChange:k}),label:(F=e.rendered)==null?void 0:F.toString(),name:`${i}Options`,value:e.key.toString()}),S=t&&!b?v:n.jsx(I,{color:d.palette.gray[800],size:"sm",textOverflow:"ellipsis",whiteSpace:"nowrap",children:e.rendered}),T=x.useCallback(E=>{var A;E.preventDefault(),r(((A=e.rendered)==null?void 0:A.toString())??""),l.setSelectedKey(e.key),setTimeout(()=>{l.setOpen(!1)},50),Dt(g)},[g,e.key,e.rendered,l,r]);return Q(document.getElementsByClassName("dropdown")[0],()=>{t&&l.close()},!0,document.getElementById("combobox")),n.jsxs(Vi,{...!t&&!g?h:{},$multiSelection:t,className:j,ref:p,children:[g?n.jsx(X,{href:g,onClick:T,children:S}):S,y&&!b&&!t?n.jsx(R,{icon:"check",iconSize:"sm",iconType:"fa-light"}):void 0,e.rendered===e.textValue?void 0:n.jsx(U,{tagLabel:e.textValue,variant:"inactive"})]})},Je=({field:e,disabled:t=!1,disabledKeys:i,error:o,helpLink:r,helpLinkText:a,helpText:l,label:s,loadingItems:d,name:p,multiSelection:g=!1,items:u,onBlur:f,onChange:h,placeholder:y,register:m,required:b,setValue:j,tooltip:w,value:k,watch:v,weight:S})=>{var gt;const T=c.Je(),z=t?void 0:o,C=(e==null?void 0:e.value)??k,[F,E]=x.useState(((gt=u.find(L=>L.value===C))==null?void 0:gt.name)??""),[A,G]=x.useState(C),[Y,ie]=x.useState(u),[H,O]=x.useState(!1),{contains:K}=c.$bb77f239b46e8c72$export$3274cf84b703fff({sensitivity:"base"}),le=x.useRef(null),Pe=x.useRef(null),Oe=x.useRef(null),Me=x.useRef(null),He=x.useRef(null),Jn=x.useMemo(()=>u.toSorted((L,W)=>{const B=Array.from(i??[]),ce=B.includes(L.value),ut=B.includes(W.value);return ce&&!ut?1:!ce&&ut?-1:0}).map(L=>K(L.name,F)||H?n.jsx(c.$c1d7fb2ec91bae71$export$6d08773d2e66f8f2,{"aria-label":L.value,hrefLang:L.href,textValue:L.tag,children:L.name},L.value):null),[K,i,F,u,H]),Vn=x.useCallback(L=>{const W=L.split(/,|\s/u).slice(-1)[0].trim();E(g?W:L),L===""||L.endsWith(",")?O(!0):(O(!1),G(B=>{const ce=L===""?"":B;return e&&e.onChange(ce),h&&h(L),ce}),ie(u.filter(B=>K(B.name,g?W:L))))},[K,u,e,g,h]),Un=x.useCallback(L=>{var W;E(((W=u.find(B=>B.value===L))==null?void 0:W.name)??""),G(L?String(L):""),e&&e.onChange(L),h&&h(L?String(L):""),ie(u)},[u,e,h]),pt=x.useCallback(L=>{L.key==="Enter"&&L.preventDefault(),O(!1)},[]),Gn=x.useCallback(()=>{f&&f(),e&&e.onBlur()},[e,f]),Yn=x.useCallback(()=>{O(!0)},[]),V=c.$a9e7382a7d111cb5$export$b453a3bfd4a5fa9e({allowsCustomValue:g,allowsEmptyCollection:!0,disabledKeys:i,inputValue:F,items:Y,menuTrigger:"focus",shouldCloseOnBlur:!g,selectedKey:A,onBlur:Gn,onInputChange:Vn,onKeyDown:pt,onKeyUp:Yn,onOpenChange(L,W){O(L&&(W==="manual"||W==="focus")),L&&setTimeout(()=>{var B;return(B=le.current)==null?void 0:B.focus()},50)},onSelectionChange:g?void 0:Un,children:Jn}),{buttonProps:Kn,inputProps:Zn,listBoxProps:qn}=c.$c350ade66beef0af$export$8c18d1b4f7232bbf({inputValue:F,buttonRef:Pe,id:p,inputRef:le,label:s??p,listBoxRef:Oe,name:p,placeholder:y,popoverRef:He},V),{listBoxProps:Xn}=c.$c132121280ec012d$export$50eacbbf140a3141(qn,V,Oe),{buttonProps:Qn}=c.$701a24aa0da5b062$export$ea18c227d4417cc3(Kn,Pe);return Q(Me.current,()=>{V.isOpen&&!g&&V.close()},!0,He.current),x.useEffect(()=>{var L;if((d===!1||!C)&&!g){const W=((L=u.find(B=>B.value===C))==null?void 0:L.name)??"";E(W),G(W)}},[C,u,d,g]),n.jsxs(_,{error:z,helpLink:r,helpLinkText:a,helpText:l,htmlFor:p,id:"combobox",label:s,required:b,tooltip:w,weight:S,children:[n.jsxs(ne,{className:`${t?"disabled":""} ${z?"error":""}`,ref:Me,children:[n.jsx("input",{...Zn,"aria-invalid":z?"true":"false","aria-label":p,disabled:t,onKeyDown:pt,ref:le}),z?n.jsx(R,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:T.palette.error[500],iconSize:"lg"}):void 0,n.jsx(M,{...Qn,className:"action",disabled:t,icon:V.isOpen&&!t?"chevron-up":"chevron-down",iconColor:T.palette.gray[400],iconSize:"sm",iconType:"fa-light",px:.125,py:.125,ref:Pe,type:"button",variant:"ghost"})]}),V.isOpen&&V.collection.size>0&&!t?n.jsx(Ce,{className:"dropdown",offset:4,placement:"bottom start",popoverRef:He,state:V,triggerRef:Me,children:n.jsx(Ji,{...Xn,$multiSelection:g&&!Array.from(i??[]).includes("All"),ref:Oe,children:[...V.collection].map(L=>n.jsx(Ft,{item:L,multiSelection:g,name:p,register:m,setInputValue:E,setValue:j,state:V,watch:v},L.key))})}):null]})},it=({control:e,disabled:t=!1,disabledKeys:i,error:o,helpLink:r,helpLinkText:a,helpText:l,label:s,loadingItems:d,name:p,multiSelection:g,items:u,onBlur:f,onChange:h,placeholder:y,register:m,required:b,setValue:j,tooltip:w,value:k,watch:v,weight:S})=>e?n.jsx(c.Controller,{control:e,name:p,render:({field:T,fieldState:z})=>{var C;return n.jsx(Je,{disabled:t,disabledKeys:i,error:(C=z.error)==null?void 0:C.message,field:T,helpLink:r,helpLinkText:a,helpText:l,items:u,label:s,loadingItems:d,multiSelection:g,name:p,onBlur:f,onChange:h,placeholder:y,register:m,required:b,setValue:j,tooltip:w,value:k,watch:v,weight:S})},rules:{required:b}}):n.jsx(Je,{disabled:t,disabledKeys:i,error:o,helpLink:r,helpLinkText:a,helpText:l,items:u,label:s,loadingItems:d,multiSelection:g,name:p,onBlur:f,onChange:h,placeholder:y,required:b,tooltip:w,value:k,weight:S}),Gi=c.st.div`
1005
1005
  ${({theme:e})=>`
1006
1006
  align-items: center;
1007
1007
  color: ${e.palette.gray[800]};
@@ -1233,7 +1233,7 @@
1233
1233
  font-weight: ${e.typography.weight.bold};
1234
1234
  }
1235
1235
  `}
1236
- `,Te=({disabled:e=!1,icon:t,props:i})=>{const o=x.useRef(null),{buttonProps:r}=c.$701a24aa0da5b062$export$ea18c227d4417cc3(i,o);return n.jsx(eo,{...r,$disabled:e,$focus:!!r["aria-expanded"],$header:t==="calendar"||t==="calendar-clock",disabled:e,ref:o,type:"button",children:n.jsx(R,{icon:t,iconColor:D.palette.gray[e?400:700],iconSize:"lg",iconType:"fa-light"})})},Fe=({state:e,prevButtonProps:t,nextButtonProps:i,title:o})=>{const r=e.focusedDate,a=c.Je(),l=x.useCallback(()=>{e.setFocusedDate(r.add({years:1}))},[r,e]),s=x.useCallback(()=>{e.setFocusedDate(r.subtract({years:1}))},[r,e]);return n.jsxs("div",{className:"header flex items-start",style:{position:"sticky",top:0,zIndex:2,background:a.palette.white},children:[n.jsx(Te,{icon:"chevron-left",props:t}),n.jsxs(Gi,{children:[o,n.jsxs(Yi,{children:[n.jsx(yt,{"aria-label":"top",onClick:l,children:n.jsx(R,{icon:"caret-up",iconClass:"fa-sharp",iconSize:"xs"})}),n.jsx(yt,{"aria-label":"bottom",onClick:s,children:n.jsx(R,{icon:"caret-down",iconClass:"fa-sharp",iconSize:"xs"})})]})]}),n.jsx(Te,{icon:"chevron-right",props:i})]})},Pt=({onClose:e,props:t})=>{const{locale:i}=c.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),o=c.$131cf43a05231e1e$export$6d095e787d2b5e1f({...t,createCalendar:c.$64244302c3013299$export$dd0bbc9b26defe37,locale:i}),{prevButtonProps:r,nextButtonProps:a,title:l}=c.$9942cad8a072a530$export$3ee915f8151bd4f1(t,o);return n.jsxs("div",{className:"calendar",children:[n.jsx(Fe,{nextButtonProps:a,prevButtonProps:r,state:o,title:l}),n.jsx(Ne,{state:o}),n.jsx(ot,{children:n.jsx(P,{onClick:e,variant:"ghost",children:"Cancel"})})]})},Ot=({segment:e,state:t})=>{const i=c.Je(),o=x.useRef(null),a={...e,placeholder:{day:"dd",dayPeriod:"(AM/PM)",era:"",hour:"hh",literal:"",minute:"mm",month:"mm",second:"",timeZoneName:"",year:"yyyy"}[e.type]},{segmentProps:l}=c.$32489daedd52963e$export$1315d136e6f7581(a,t,o),s=i.palette.gray[a.isEditable?800:500];return n.jsx("div",{...a.type!=="literal"&&{...l,className:"segment-cell"},ref:o,style:a.type==="literal"?void 0:{color:a.isPlaceholder?i.palette.gray[400]:s},children:a.isPlaceholder?a.placeholder:a.text})},Mt=({disabled:e,error:t=!1,props:i})=>{const o=c.Je(),r=x.useRef(null),a=c.$3c0fc76039f1c516$export$60e84778edff6d26({...i,createCalendar:c.$64244302c3013299$export$dd0bbc9b26defe37,locale:"en-US"}),{fieldProps:l}=c.$16f0b7bb276bc17e$export$5591b0b878c1a989(i,a,r),s=x.useCallback(d=>{const p=document.getElementsByClassName("segment-cell"),g=d.currentTarget;Object.values(p).some(u=>u.contains(g))||(d.preventDefault(),d.stopPropagation())},[]);return n.jsxs(to,{...l,onClick:s,children:[n.jsx("div",{className:"flex flex-row",style:{color:o.palette.gray[c.lodashExports.isNil(a.value)?400:800]},tabIndex:-1,children:a.segments.map((d,p)=>{const g=`key_${p}`;return n.jsx(Ot,{segment:{...d,isEditable:!e},state:a},g)})}),t?n.jsx(R,{icon:"exclamation-circle",iconColor:o.palette.error[500],iconSize:"lg"}):void 0]})},Ht=e=>{const t=x.useRef(null),i=c.$eff5d8ee529ac4bb$export$fd53cef0cc796101({...e,locale:"en-US",shouldForceLeadingZeros:!0}),{timeValue:o}=i,r=!c.lodashExports.isNil(o)&&o.hour<12?"AM":"PM",[a,l]=x.useState(c.lodashExports.isNil(o)?"AM":r),{fieldProps:s}=c.$16f0b7bb276bc17e$export$4c842f6a241dc825(e,i,t),d=x.useCallback(p=>{const g=p.currentTarget.name;g!==a&&(c.lodashExports.isNil(o)||(g==="AM"?i.setSegment("dayPeriod",0):g==="PM"&&i.setSegment("dayPeriod",12))),l(g)},[a,i,o]);return n.jsxs(no,{children:[n.jsx(bt,{...s,ref:t,children:i.segments.slice(0,-2).map((p,g)=>{const u=`key_${g}`;return n.jsx(Ot,{segment:p,state:i},u)})}),n.jsxs(bt,{children:[n.jsx($t,{id:a==="AM"?"active":"",name:"AM",onClick:d,type:"button",children:"AM"}),n.jsx($t,{id:a==="PM"?"active":"",name:"PM",onClick:d,type:"button",children:"PM"})]})]})},Ee=e=>e&&e!=="-"?c.dayjs(e).format("YYYY-MM-DD"):"-",io=e=>e&&e!=="-"?c.dayjs(e).format("YYYY-MM-DD hh:mm A"):"-",mt=(e,t)=>c.dayjs(String(e).replace(/-/gu,"/")).hour(t.hour).minute(t.minute).second(t.second).format("YYYY/MM/DD hh:mm A"),xe=({error:e,buttonProps:t,datePickerRef:i,disabled:o=!1,granularity:r="day",fieldProps:a,groupProps:l,name:s,register:d,required:p,setValue:g,value:u})=>{const f=x.useCallback(h=>{if(!h)return;const y=r==="day"?Ee(String(h)):io(String(h));a.onChange&&a.onChange(h??null),g&&g(s,y,{shouldDirty:!0})},[a,r,s,g]);return n.jsxs(ne,{...l,className:`${o?"disabled":""} ${e?"error":""}`,ref:i,children:[n.jsx(Mt,{disabled:o,error:e!=null,props:{...a,autoFocus:!1,granularity:r,onChange:f,shouldForceLeadingZeros:!0}}),n.jsx(Te,{disabled:o,icon:r==="minute"?"calendar-clock":"calendar",props:t}),n.jsx("input",{...d==null?void 0:d(s,{required:p}),"aria-label":s,className:"date-input",disabled:o,id:s,name:s,type:"text",value:u??""})]})},Ae=({children:e,...t})=>{const i=x.useRef(null),{dialogProps:o}=c.$40df3f8667284809$export$d55e7ee900f34e93(t,i);return n.jsx(Qi,{...o,ref:i,children:e})},Wt=({disabled:e=!1,error:t,helpLink:i,helpLinkText:o,helpText:r,required:a,label:l,name:s,register:d,setValue:p,tooltip:g,watch:u,...f})=>{const h=x.useRef(null),y=u==null?void 0:u(s),m=x.useCallback(z=>{p&&z&&p(s,Ee(String(z)),{shouldDirty:!0})},[s,p]),b=c.$ab5bf3f618090389$export$87194bb378cc3ac2({...f,onChange(z){m(z)},...!c._.isNil(y)&&!c._.isEmpty(y)&&c.dayjs(y).isValid()?{defaultValue:c.$fae977aafc393c5c$export$6b862160d295c8e(y.replace(/\//gu,"-"))}:{}}),{close:k}=b,{groupProps:w,fieldProps:v,buttonProps:j,dialogProps:S,calendarProps:E}=c.$6057a3d2a53a12fd$export$42df105a73306d51({...f,"aria-label":l??s,name:s},b,h);return n.jsxs(_,{error:e?void 0:t,helpLink:i,helpLinkText:o,helpText:r,htmlFor:s,label:l,required:a,tooltip:g,children:[n.jsx(xe,{buttonProps:j,datePickerRef:h,disabled:e,error:t,fieldProps:v,groupProps:w,name:s,register:d,required:a,setValue:p,value:y}),b.isOpen&&!e?n.jsx(Ce,{offset:8,placement:"bottom start",state:b,triggerRef:h,children:n.jsx(Ae,{...S,children:n.jsx(Pt,{onClose:k,props:E})})}):null]})},Bt=({onClose:e,props:t})=>{const{locale:i}=c.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),o=x.useRef(null),r=c.$9a36b6ba2fb1a7c5$export$9a987164d97ecc90({...t,createCalendar:c.$64244302c3013299$export$dd0bbc9b26defe37,locale:i}),{prevButtonProps:a,nextButtonProps:l,title:s}=c.$46a4342aab3d8076$export$87e0539f600c24e5(t,r,o);return n.jsxs("div",{className:"calendar-range",ref:o,children:[n.jsx(Fe,{nextButtonProps:l,prevButtonProps:a,state:r,title:s}),n.jsx(Ne,{state:r}),n.jsx(ot,{children:n.jsx(P,{onClick:e,variant:"ghost",children:"Cancel"})})]})},oo=c.st.div`
1236
+ `,Te=({disabled:e=!1,icon:t,props:i})=>{const o=x.useRef(null),{buttonProps:r}=c.$701a24aa0da5b062$export$ea18c227d4417cc3(i,o);return n.jsx(eo,{...r,$disabled:e,$focus:!!r["aria-expanded"],$header:t==="calendar"||t==="calendar-clock",disabled:e,ref:o,type:"button",children:n.jsx(R,{icon:t,iconColor:D.palette.gray[e?400:700],iconSize:"lg",iconType:"fa-light"})})},Fe=({state:e,prevButtonProps:t,nextButtonProps:i,title:o})=>{const r=e.focusedDate,a=c.Je(),l=x.useCallback(()=>{e.setFocusedDate(r.add({years:1}))},[r,e]),s=x.useCallback(()=>{e.setFocusedDate(r.subtract({years:1}))},[r,e]);return n.jsxs("div",{className:"header flex items-start",style:{position:"sticky",top:0,zIndex:2,background:a.palette.white},children:[n.jsx(Te,{icon:"chevron-left",props:t}),n.jsxs(Gi,{children:[o,n.jsxs(Yi,{children:[n.jsx(yt,{"aria-label":"top",onClick:l,children:n.jsx(R,{icon:"caret-up",iconClass:"fa-sharp",iconSize:"xs"})}),n.jsx(yt,{"aria-label":"bottom",onClick:s,children:n.jsx(R,{icon:"caret-down",iconClass:"fa-sharp",iconSize:"xs"})})]})]}),n.jsx(Te,{icon:"chevron-right",props:i})]})},Pt=({onClose:e,props:t})=>{const{locale:i}=c.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),o=c.$131cf43a05231e1e$export$6d095e787d2b5e1f({...t,createCalendar:c.$64244302c3013299$export$dd0bbc9b26defe37,locale:i}),{prevButtonProps:r,nextButtonProps:a,title:l}=c.$9942cad8a072a530$export$3ee915f8151bd4f1(t,o);return n.jsxs("div",{className:"calendar",children:[n.jsx(Fe,{nextButtonProps:a,prevButtonProps:r,state:o,title:l}),n.jsx(Ne,{state:o}),n.jsx(ot,{children:n.jsx(P,{onClick:e,variant:"ghost",children:"Cancel"})})]})},Ot=({segment:e,state:t})=>{const i=c.Je(),o=x.useRef(null),a={...e,placeholder:{day:"dd",dayPeriod:"(AM/PM)",era:"",hour:"hh",literal:"",minute:"mm",month:"mm",second:"",timeZoneName:"",year:"yyyy"}[e.type]},{segmentProps:l}=c.$32489daedd52963e$export$1315d136e6f7581(a,t,o),s=i.palette.gray[a.isEditable?800:500];return n.jsx("div",{...a.type!=="literal"&&{...l,className:"segment-cell"},ref:o,style:a.type==="literal"?void 0:{color:a.isPlaceholder?i.palette.gray[400]:s},children:a.isPlaceholder?a.placeholder:a.text})},Mt=({disabled:e,error:t=!1,props:i})=>{const o=c.Je(),r=x.useRef(null),a=c.$3c0fc76039f1c516$export$60e84778edff6d26({...i,createCalendar:c.$64244302c3013299$export$dd0bbc9b26defe37,locale:"en-US"}),{fieldProps:l}=c.$16f0b7bb276bc17e$export$5591b0b878c1a989(i,a,r),s=x.useCallback(d=>{const p=document.getElementsByClassName("segment-cell"),g=d.currentTarget;Object.values(p).some(u=>u.contains(g))||(d.preventDefault(),d.stopPropagation())},[]);return n.jsxs(to,{...l,onClick:s,children:[n.jsx("div",{className:"flex flex-row",style:{color:o.palette.gray[c.lodashExports.isNil(a.value)?400:800]},tabIndex:-1,children:a.segments.map((d,p)=>{const g=`key_${p}`;return n.jsx(Ot,{segment:{...d,isEditable:!e},state:a},g)})}),t?n.jsx(R,{icon:"exclamation-circle",iconColor:o.palette.error[500],iconSize:"lg"}):void 0]})},Ht=e=>{const t=x.useRef(null),i=c.$eff5d8ee529ac4bb$export$fd53cef0cc796101({...e,locale:"en-US",shouldForceLeadingZeros:!0}),{timeValue:o}=i,r=!c.lodashExports.isNil(o)&&o.hour<12?"AM":"PM",[a,l]=x.useState(c.lodashExports.isNil(o)?"AM":r),{fieldProps:s}=c.$16f0b7bb276bc17e$export$4c842f6a241dc825(e,i,t),d=x.useCallback(p=>{const g=p.currentTarget.name;g!==a&&(c.lodashExports.isNil(o)||(g==="AM"?i.setSegment("dayPeriod",0):g==="PM"&&i.setSegment("dayPeriod",12))),l(g)},[a,i,o]);return n.jsxs(no,{children:[n.jsx(bt,{...s,ref:t,children:i.segments.slice(0,-2).map((p,g)=>{const u=`key_${g}`;return n.jsx(Ot,{segment:p,state:i},u)})}),n.jsxs(bt,{children:[n.jsx($t,{id:a==="AM"?"active":"",name:"AM",onClick:d,type:"button",children:"AM"}),n.jsx($t,{id:a==="PM"?"active":"",name:"PM",onClick:d,type:"button",children:"PM"})]})]})},Ee=e=>e&&e!=="-"?c.dayjs(e).format("YYYY-MM-DD"):"-",io=e=>e&&e!=="-"?c.dayjs(e).format("YYYY-MM-DD hh:mm A"):"-",mt=(e,t)=>c.dayjs(String(e).replace(/-/gu,"/")).hour(t.hour).minute(t.minute).second(t.second).format("YYYY/MM/DD hh:mm A"),xe=({error:e,buttonProps:t,datePickerRef:i,disabled:o=!1,granularity:r="day",fieldProps:a,groupProps:l,name:s,register:d,required:p,setValue:g,value:u})=>{const f=x.useCallback(h=>{if(!h)return;const y=r==="day"?Ee(String(h)):io(String(h));a.onChange&&a.onChange(h??null),g&&g(s,y,{shouldDirty:!0})},[a,r,s,g]);return n.jsxs(ne,{...l,className:`${o?"disabled":""} ${e?"error":""}`,ref:i,children:[n.jsx(Mt,{disabled:o,error:e!=null,props:{...a,autoFocus:!1,granularity:r,onChange:f,shouldForceLeadingZeros:!0}}),n.jsx(Te,{disabled:o,icon:r==="minute"?"calendar-clock":"calendar",props:t}),n.jsx("input",{...d==null?void 0:d(s,{required:p}),"aria-label":s,className:"date-input",disabled:o,id:s,name:s,type:"text",value:u??""})]})},Ae=({children:e,...t})=>{const i=x.useRef(null),{dialogProps:o}=c.$40df3f8667284809$export$d55e7ee900f34e93(t,i);return n.jsx(Qi,{...o,ref:i,children:e})},Wt=({disabled:e=!1,error:t,helpLink:i,helpLinkText:o,helpText:r,required:a,label:l,name:s,register:d,setValue:p,tooltip:g,watch:u,...f})=>{const h=x.useRef(null),y=u==null?void 0:u(s),m=x.useCallback(z=>{p&&z&&p(s,Ee(String(z)),{shouldDirty:!0})},[s,p]),b=c.$ab5bf3f618090389$export$87194bb378cc3ac2({...f,onChange(z){m(z)},...!c._.isNil(y)&&!c._.isEmpty(y)&&c.dayjs(y).isValid()?{defaultValue:c.$fae977aafc393c5c$export$6b862160d295c8e(y.replace(/\//gu,"-"))}:{}}),{close:j}=b,{groupProps:w,fieldProps:k,buttonProps:v,dialogProps:S,calendarProps:T}=c.$6057a3d2a53a12fd$export$42df105a73306d51({...f,"aria-label":l??s,name:s},b,h);return n.jsxs(_,{error:e?void 0:t,helpLink:i,helpLinkText:o,helpText:r,htmlFor:s,label:l,required:a,tooltip:g,children:[n.jsx(xe,{buttonProps:v,datePickerRef:h,disabled:e,error:t,fieldProps:k,groupProps:w,name:s,register:d,required:a,setValue:p,value:y}),b.isOpen&&!e?n.jsx(Ce,{offset:8,placement:"bottom start",state:b,triggerRef:h,children:n.jsx(Ae,{...S,children:n.jsx(Pt,{onClose:j,props:T})})}):null]})},Bt=({onClose:e,props:t})=>{const{locale:i}=c.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),o=x.useRef(null),r=c.$9a36b6ba2fb1a7c5$export$9a987164d97ecc90({...t,createCalendar:c.$64244302c3013299$export$dd0bbc9b26defe37,locale:i}),{prevButtonProps:a,nextButtonProps:l,title:s}=c.$46a4342aab3d8076$export$87e0539f600c24e5(t,r,o);return n.jsxs("div",{className:"calendar-range",ref:o,children:[n.jsx(Fe,{nextButtonProps:l,prevButtonProps:a,state:r,title:s}),n.jsx(Ne,{state:r}),n.jsx(ot,{children:n.jsx(P,{onClick:e,variant:"ghost",children:"Cancel"})})]})},oo=c.st.div`
1237
1237
  ${({theme:e,$disabled:t,$show:i})=>`
1238
1238
  border-color: ${i?e.palette.error[500]:e.palette.gray[300]};
1239
1239
  display: flex;
@@ -1244,7 +1244,7 @@
1244
1244
  background: ${t?e.palette.gray[200]:e.palette.white};
1245
1245
  }
1246
1246
  `}
1247
- `,_t=({disabled:e=!1,error:t,label:i,name:o,required:r,tooltip:a,register:l,setValue:s,propsMax:d,propsMin:p,variant:g="default",...u})=>{const f=`${o}Max`,h=`${o}Min`,y=x.useRef(null),m=x.useCallback(C=>{s&&C&&(s((d==null?void 0:d.name)??f,Ee(String(C.end))),s((p==null?void 0:p.name)??h,Ee(String(C.start))))},[f,h,s,d,p]),b=c.$93c38a5e28be6249$export$e50a61c1de9f574({...u,endName:(d==null?void 0:d.name)??f,startName:(p==null?void 0:p.name)??h,onChange(C){m(C)}}),{close:k}=b,{groupProps:w,startFieldProps:v,endFieldProps:j,buttonProps:S,dialogProps:E,calendarProps:z}=c.$887cac91b7cc8801$export$12fd5f0e9f4bb192({...u,"aria-label":i??o},b,y);return n.jsxs(_,{error:e?void 0:t,htmlFor:o,label:i,required:r,tooltip:a,children:[n.jsxs(oo,{$disabled:e,$show:t!==void 0,ref:y,style:{flexDirection:g==="filters"?"column":"row"},children:[n.jsx(xe,{buttonProps:S,datePickerRef:y,disabled:e,error:t,fieldProps:{...v,"aria-label":`${v["aria-label"]} ${o}`,validate:C=>j.value&&C>j.value?"Start date must be less than or equal to end date":null},groupProps:w,name:(p==null?void 0:p.name)??h,register:l,setValue:s,value:p==null?void 0:p.value}),n.jsx(xe,{buttonProps:S,datePickerRef:y,disabled:e,error:t,fieldProps:{...j,"aria-label":`${j["aria-label"]} ${o}`,validate:C=>v.value&&C<v.value?"End date must be greater than or equal to start date":null},groupProps:w,name:(d==null?void 0:d.name)??f,register:l,setValue:s,value:d==null?void 0:d.value})]}),b.isOpen&&!e?n.jsx(Ce,{offset:8,placement:"bottom start",state:b,triggerRef:y,children:n.jsx(Ae,{...E,children:n.jsx(Bt,{onClose:k,props:z})})}):null]})},ro=c.st.div`
1247
+ `,_t=({disabled:e=!1,error:t,label:i,name:o,required:r,tooltip:a,register:l,setValue:s,propsMax:d,propsMin:p,variant:g="default",...u})=>{const f=`${o}Max`,h=`${o}Min`,y=x.useRef(null),m=x.useCallback(C=>{s&&C&&(s((d==null?void 0:d.name)??f,Ee(String(C.end))),s((p==null?void 0:p.name)??h,Ee(String(C.start))))},[f,h,s,d,p]),b=c.$93c38a5e28be6249$export$e50a61c1de9f574({...u,endName:(d==null?void 0:d.name)??f,startName:(p==null?void 0:p.name)??h,onChange(C){m(C)}}),{close:j}=b,{groupProps:w,startFieldProps:k,endFieldProps:v,buttonProps:S,dialogProps:T,calendarProps:z}=c.$887cac91b7cc8801$export$12fd5f0e9f4bb192({...u,"aria-label":i??o},b,y);return n.jsxs(_,{error:e?void 0:t,htmlFor:o,label:i,required:r,tooltip:a,children:[n.jsxs(oo,{$disabled:e,$show:t!==void 0,ref:y,style:{flexDirection:g==="filters"?"column":"row"},children:[n.jsx(xe,{buttonProps:S,datePickerRef:y,disabled:e,error:t,fieldProps:{...k,"aria-label":`${k["aria-label"]} ${o}`,validate:C=>v.value&&C>v.value?"Start date must be less than or equal to end date":null},groupProps:w,name:(p==null?void 0:p.name)??h,register:l,setValue:s,value:p==null?void 0:p.value}),n.jsx(xe,{buttonProps:S,datePickerRef:y,disabled:e,error:t,fieldProps:{...v,"aria-label":`${v["aria-label"]} ${o}`,validate:C=>k.value&&C<k.value?"End date must be greater than or equal to start date":null},groupProps:w,name:(d==null?void 0:d.name)??f,register:l,setValue:s,value:d==null?void 0:d.value})]}),b.isOpen&&!e?n.jsx(Ce,{offset:8,placement:"bottom start",state:b,triggerRef:y,children:n.jsx(Ae,{...T,children:n.jsx(Bt,{onClose:j,props:z})})}):null]})},ro=c.st.div`
1248
1248
  ${({theme:e})=>`
1249
1249
  align-items: center;
1250
1250
  border-top: 1px solid ${e.palette.gray[200]};
@@ -1259,9 +1259,9 @@
1259
1259
  gap: ${({theme:e})=>e.spacing[.5]};
1260
1260
  justify-content: flex-end;
1261
1261
  flex: 1 0 0;
1262
- `,Jt=({handleTimeChange:e,onClose:t,props:i,timeState:o})=>{const r=c.Je(),{locale:a}=c.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),l=c.$131cf43a05231e1e$export$6d095e787d2b5e1f({...i,createCalendar:c.$64244302c3013299$export$dd0bbc9b26defe37,locale:a}),{prevButtonProps:s,nextButtonProps:d,title:p}=c.$9942cad8a072a530$export$3ee915f8151bd4f1(i,l);return n.jsxs("div",{className:"calendar",children:[n.jsx(Fe,{nextButtonProps:d,prevButtonProps:s,state:l,title:p}),n.jsx(Ne,{state:l}),n.jsxs(ro,{children:[n.jsx(I,{color:r.palette.gray[800],fontWeight:"bold",size:"sm",children:"Time"}),n.jsx(ao,{children:n.jsx(Ht,{hourCycle:12,label:"time-field",onChange:e,value:o.timeValue})})]}),n.jsx(ot,{children:n.jsx(P,{onClick:t,variant:"ghost",children:"Cancel"})})]})},so=e=>{const{disabled:t=!1,error:i,required:o,label:r,name:a,tooltip:l,register:s,setValue:d,watch:p}=e,g=p==null?void 0:p(a),u=x.useRef(null),f=c.$ab5bf3f618090389$export$87194bb378cc3ac2({...e,granularity:"minute",hourCycle:12,isDisabled:t,isRequired:o,shouldCloseOnSelect:!1,value:c._.isNil(g)||c._.isEmpty(g)||g==="-"||c.dayjs(g,"YYYY/MM/DD hh:mm A").isValid()===!1?null:c.$fae977aafc393c5c$export$588937bcd60ade55(c.dayjs(g,"YYYY/MM/DD hh:mm A").format("YYYY-MM-DDTHH:mm:ss"))}),{close:h}=f,{groupProps:y,fieldProps:m,buttonProps:b,dialogProps:k,calendarProps:w}=c.$6057a3d2a53a12fd$export$42df105a73306d51(e,f,u),v=x.useCallback(S=>{if(w.onChange&&w.onChange(S),f.timeValue){const E=mt(S,f.timeValue);d==null||d(a,E,{shouldDirty:!0})}else f.setDateValue(S)},[w,a,d,f]),j=x.useCallback(S=>{if(S){f.setTimeValue(S);const E=f.dateValue;if(E){const z=mt(E,S);d==null||d(a,z,{shouldDirty:!0})}}},[f,d,a]);return n.jsxs(_,{error:t?void 0:i,htmlFor:a,label:r,required:o,tooltip:l,children:[n.jsx(xe,{buttonProps:b,datePickerRef:u,disabled:t,error:i,fieldProps:m,granularity:"minute",groupProps:y,name:a,register:s,setValue:d,value:g}),f.isOpen&&!t?n.jsx(Ce,{offset:8,placement:"bottom start",state:f,triggerRef:u,children:n.jsx(Ae,{...k,children:n.jsx(Jt,{handleTimeChange:j,onClose:h,props:{...w,onChange:v},timeState:f})})}):null]})},lo=({children:e,currentValue:t,externalLink:i,isEditing:o,label:r,name:a,tooltip:l})=>{if(o)return n.jsx("div",{children:e});const s=c.lodashExports.isNil(t)?"":t,d=String(i??s);return n.jsxs($,{children:[n.jsx(nt,{htmlFor:a,label:r,tooltip:l,weight:"bold"}),d.startsWith("https://")?n.jsx(X,{href:d,children:s}):n.jsx(I,{size:"md",children:s})]})},Le=({disabled:e=!1,hasIcon:t=!1,helpLink:i,helpLinkText:o,helpText:r,error:a,id:l,indexArray:s=0,isValid:d,isTouched:p,label:g,name:u,maskValue:f=!1,onPaste:h,placeholder:y,removeItemArray:m,register:b,suggestions:k,tooltip:w,type:v="text",weight:j,...S})=>{const{required:E,onBlur:z,onChange:C}=S,F=c.Je(),T=e?void 0:a,[A,G]=x.useState(""),Y=x.useCallback(O=>{G(O.target.value),C==null||C(O)},[C]),ie=d&&p&&!e&&A.trim()!=="",H=x.useCallback(O=>{O.key==="Enter"&&O.preventDefault()},[]);return n.jsxs(_,{error:T,helpLink:i,helpLinkText:o,helpText:r,htmlFor:u,label:g,required:E,tooltip:w,weight:j,children:[n.jsxs(ne,{className:`
1263
- ${e?"disabled":""} ${T?"error":""} ${ie?"success":""}
1264
- `,children:[t?n.jsx(R,{icon:"user",iconSize:"xl",iconType:"fa-light"}):void 0,n.jsx("input",{"aria-hidden":!1,"aria-invalid":T?"true":"false","aria-label":u,"aria-required":E,autoComplete:"off",className:f?"sr-block":"","data-testid":`${u}-input`,disabled:e,id:u,list:k?`list_${u}`:void 0,onKeyDown:H,onPaste:h,placeholder:y,type:v,...b?b(u,{required:E,onBlur:z,onChange:Y}):{...S,onChange:Y}}),T?n.jsx(R,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:F.palette.error[500],iconSize:"lg"}):void 0,ie?n.jsx(R,{icon:"check-circle",iconClass:"success-icon",iconColor:F.palette.success[500],iconSize:"lg"}):void 0,l==="array"&&s>0?n.jsx(M,{color:F.palette.gray[400],icon:"trash",iconSize:"sm",iconType:"fa-light",onClick:m?m(s):void 0,variant:"ghost"}):void 0]}),k?n.jsx("datalist",{id:`list_${u}`,children:k.map(O=>n.jsx("option",{value:O},O))}):void 0]})},co=c.st.div.attrs({className:"flex flex-wrap justify-center pv3 w-100"})``,po=c.st.div.attrs({className:"flex flex-wrap items-center justify-start mb2"})`
1262
+ `,Jt=({handleTimeChange:e,onClose:t,props:i,timeState:o})=>{const r=c.Je(),{locale:a}=c.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),l=c.$131cf43a05231e1e$export$6d095e787d2b5e1f({...i,createCalendar:c.$64244302c3013299$export$dd0bbc9b26defe37,locale:a}),{prevButtonProps:s,nextButtonProps:d,title:p}=c.$9942cad8a072a530$export$3ee915f8151bd4f1(i,l);return n.jsxs("div",{className:"calendar",children:[n.jsx(Fe,{nextButtonProps:d,prevButtonProps:s,state:l,title:p}),n.jsx(Ne,{state:l}),n.jsxs(ro,{children:[n.jsx(I,{color:r.palette.gray[800],fontWeight:"bold",size:"sm",children:"Time"}),n.jsx(ao,{children:n.jsx(Ht,{hourCycle:12,label:"time-field",onChange:e,value:o.timeValue})})]}),n.jsx(ot,{children:n.jsx(P,{onClick:t,variant:"ghost",children:"Cancel"})})]})},so=e=>{const{disabled:t=!1,error:i,required:o,label:r,name:a,tooltip:l,register:s,setValue:d,watch:p}=e,g=p==null?void 0:p(a),u=x.useRef(null),f=c.$ab5bf3f618090389$export$87194bb378cc3ac2({...e,granularity:"minute",hourCycle:12,isDisabled:t,isRequired:o,shouldCloseOnSelect:!1,value:c._.isNil(g)||c._.isEmpty(g)||g==="-"||c.dayjs(g,"YYYY/MM/DD hh:mm A").isValid()===!1?null:c.$fae977aafc393c5c$export$588937bcd60ade55(c.dayjs(g,"YYYY/MM/DD hh:mm A").format("YYYY-MM-DDTHH:mm:ss"))}),{close:h}=f,{groupProps:y,fieldProps:m,buttonProps:b,dialogProps:j,calendarProps:w}=c.$6057a3d2a53a12fd$export$42df105a73306d51(e,f,u),k=x.useCallback(S=>{if(w.onChange&&w.onChange(S),f.timeValue){const T=mt(S,f.timeValue);d==null||d(a,T,{shouldDirty:!0})}else f.setDateValue(S)},[w,a,d,f]),v=x.useCallback(S=>{if(S){f.setTimeValue(S);const T=f.dateValue;if(T){const z=mt(T,S);d==null||d(a,z,{shouldDirty:!0})}}},[f,d,a]);return n.jsxs(_,{error:t?void 0:i,htmlFor:a,label:r,required:o,tooltip:l,children:[n.jsx(xe,{buttonProps:b,datePickerRef:u,disabled:t,error:i,fieldProps:m,granularity:"minute",groupProps:y,name:a,register:s,setValue:d,value:g}),f.isOpen&&!t?n.jsx(Ce,{offset:8,placement:"bottom start",state:f,triggerRef:u,children:n.jsx(Ae,{...j,children:n.jsx(Jt,{handleTimeChange:v,onClose:h,props:{...w,onChange:k},timeState:f})})}):null]})},lo=({children:e,currentValue:t,externalLink:i,isEditing:o,label:r,name:a,tooltip:l})=>{if(o)return n.jsx("div",{children:e});const s=c.lodashExports.isNil(t)?"":t,d=String(i??s);return n.jsxs($,{children:[n.jsx(nt,{htmlFor:a,label:r,tooltip:l,weight:"bold"}),d.startsWith("https://")?n.jsx(X,{href:d,children:s}):n.jsx(I,{size:"md",children:s})]})},Le=({disabled:e=!1,hasIcon:t=!1,helpLink:i,helpLinkText:o,helpText:r,error:a,id:l,indexArray:s=0,isValid:d,isTouched:p,label:g,name:u,maskValue:f=!1,onPaste:h,placeholder:y,removeItemArray:m,register:b,suggestions:j,tooltip:w,type:k="text",weight:v,...S})=>{const{required:T,onBlur:z,onChange:C}=S,F=c.Je(),E=e?void 0:a,[A,G]=x.useState(""),Y=x.useCallback(O=>{G(O.target.value),C==null||C(O)},[C]),ie=d&&p&&!e&&A.trim()!=="",H=x.useCallback(O=>{O.key==="Enter"&&O.preventDefault()},[]);return n.jsxs(_,{error:E,helpLink:i,helpLinkText:o,helpText:r,htmlFor:u,label:g,required:T,tooltip:w,weight:v,children:[n.jsxs(ne,{className:`
1263
+ ${e?"disabled":""} ${E?"error":""} ${ie?"success":""}
1264
+ `,children:[t?n.jsx(R,{icon:"user",iconSize:"xl",iconType:"fa-light"}):void 0,n.jsx("input",{"aria-hidden":!1,"aria-invalid":E?"true":"false","aria-label":u,"aria-required":T,autoComplete:"off",className:f?"sr-block":"","data-testid":`${u}-input`,disabled:e,id:u,list:j?`list_${u}`:void 0,onKeyDown:H,onPaste:h,placeholder:y,type:k,...b?b(u,{required:T,onBlur:z,onChange:Y}):{...S,onChange:Y}}),E?n.jsx(R,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:F.palette.error[500],iconSize:"lg"}):void 0,ie?n.jsx(R,{icon:"check-circle",iconClass:"success-icon",iconColor:F.palette.success[500],iconSize:"lg"}):void 0,l==="array"&&s>0?n.jsx(M,{color:F.palette.gray[400],icon:"trash",iconSize:"sm",iconType:"fa-light",onClick:m?m(s):void 0,variant:"ghost"}):void 0]}),j?n.jsx("datalist",{id:`list_${u}`,children:j.map(O=>n.jsx("option",{value:O},O))}):void 0]})},co=c.st.div.attrs({className:"flex flex-wrap justify-center pv3 w-100"})``,po=c.st.div.attrs({className:"flex flex-wrap items-center justify-start mb2"})`
1265
1265
  gap: 12px;
1266
1266
  `,go=c.st.div.attrs({className:"flex flex-wrap items-center justify-end mb2"})`
1267
1267
  gap: 8px;
@@ -1317,7 +1317,7 @@
1317
1317
  padding: ${i}px;
1318
1318
  }
1319
1319
  `}
1320
- `,Vt=({align:e,children:t,cols:i,colsPadding:o,justify:r})=>n.jsx(ho,{$align:e,$cols:i,$colsPadding:o,$justify:r,children:t}),Ue=({addText:e,append:t,disabled:i=!1,fields:o,fieldState:r,initValue:a="",index:l=0,required:s,label:d,max:p=100,name:g,onBlur:u,onChange:f,placeholder:h,tooltip:y,remove:m,value:b})=>{var v;const k=x.useCallback(()=>{t==null||t(a)},[t,a]),w=x.useCallback(j=>()=>{m==null||m(j)},[m]);return n.jsxs(Vt,{align:"start",children:[n.jsx(Ve,{lg:75,md:75,sm:75,children:n.jsx(Le,{disabled:i,error:r?(v=r.error)==null?void 0:v.message:void 0,id:"array",indexArray:l,isTouched:r?r.isTouched:void 0,isValid:r?!r.invalid:void 0,label:d,name:g,onBlur:u,onChange:f,placeholder:h,removeItemArray:w,required:s,tooltip:y,value:b})}),l<p-1&&l+1===(o==null?void 0:o.length)?n.jsx(Ve,{lg:25,md:25,sm:25,children:n.jsx(P,{disabled:i,icon:"plus",onClick:k,variant:"ghost",width:"max-content",children:e??"Add"})}):void 0]})},yo=({addText:e,append:t,control:i,disabled:o,fields:r,initValue:a="",required:l,label:s,max:d=void 0,name:p="array-field",onChange:g,placeholder:u,remove:f,tooltip:h})=>i&&r?n.jsx(x.Fragment,{children:r.map((y,m)=>n.jsx(c.Controller,{control:i,name:`${p}.${m}`,render:({field:b,fieldState:k})=>n.jsx(Ue,{addText:e,append:t,disabled:o,fieldState:k,fields:r,index:m,initValue:a,label:s,max:d,name:b.name,onBlur:b.onBlur,onChange:g??b.onChange,placeholder:u,remove:f,required:l,tooltip:h,value:typeof b.value=="object"?b.value.value:b.value}),index:m},y.id))}):n.jsx(Ue,{addText:e,disabled:o,initValue:a,label:s,max:d,name:p,onChange:g,placeholder:u,required:l,tooltip:h}),bo=c.st(It)`
1320
+ `,Vt=({align:e,children:t,cols:i,colsPadding:o,justify:r})=>n.jsx(ho,{$align:e,$cols:i,$colsPadding:o,$justify:r,children:t}),Ue=({addText:e,append:t,disabled:i=!1,fields:o,fieldState:r,initValue:a="",index:l=0,required:s,label:d,max:p=100,name:g,onBlur:u,onChange:f,placeholder:h,tooltip:y,remove:m,value:b})=>{var k;const j=x.useCallback(()=>{t==null||t(a)},[t,a]),w=x.useCallback(v=>()=>{m==null||m(v)},[m]);return n.jsxs(Vt,{align:"start",children:[n.jsx(Ve,{lg:75,md:75,sm:75,children:n.jsx(Le,{disabled:i,error:r?(k=r.error)==null?void 0:k.message:void 0,id:"array",indexArray:l,isTouched:r?r.isTouched:void 0,isValid:r?!r.invalid:void 0,label:d,name:g,onBlur:u,onChange:f,placeholder:h,removeItemArray:w,required:s,tooltip:y,value:b})}),l<p-1&&l+1===(o==null?void 0:o.length)?n.jsx(Ve,{lg:25,md:25,sm:25,children:n.jsx(P,{disabled:i,icon:"plus",onClick:j,variant:"ghost",width:"max-content",children:e??"Add"})}):void 0]})},yo=({addText:e,append:t,control:i,disabled:o,fields:r,initValue:a="",required:l,label:s,max:d=void 0,name:p="array-field",onChange:g,placeholder:u,remove:f,tooltip:h})=>i&&r?n.jsx(x.Fragment,{children:r.map((y,m)=>n.jsx(c.Controller,{control:i,name:`${p}.${m}`,render:({field:b,fieldState:j})=>n.jsx(Ue,{addText:e,append:t,disabled:o,fieldState:j,fields:r,index:m,initValue:a,label:s,max:d,name:b.name,onBlur:b.onBlur,onChange:g??b.onChange,placeholder:u,remove:f,required:l,tooltip:h,value:typeof b.value=="object"?b.value.value:b.value}),index:m},y.id))}):n.jsx(Ue,{addText:e,disabled:o,initValue:a,label:s,max:d,name:p,onChange:g,placeholder:u,required:l,tooltip:h}),bo=c.st(It)`
1321
1321
  white-space: nowrap;
1322
1322
  margin-right: ${({theme:e})=>e.spacing[.25]};
1323
1323
  text-overflow: ellipsis;
@@ -1328,13 +1328,13 @@
1328
1328
  position: absolute;
1329
1329
  visibility: hidden;
1330
1330
  width: 0;
1331
- `,fe=(e,t,i)=>{const o=new Event(e);return Object.defineProperty(o,"target",{value:{name:t,value:i}}),o},mo=e=>{const t=e;return t?Array.from(t).map(i=>i.name).join(", "):""},wo=({accept:e,disabled:t=!1,error:i,label:o,helpLink:r,helpText:a,id:l,multiple:s,name:d,onChange:p,required:g,register:u,setValue:f,tooltip:h,watch:y,weight:m})=>{const b=c.Je(),k=t?void 0:i,w=x.useRef(null),v=u==null?void 0:u(d,{required:g}),j=y==null?void 0:y(d),S=mo(j),E=x.useCallback(()=>{const F=fe("change",d,void 0);f&&f(d,void 0),v&&v.onChange(F)},[v,d,f]),z=x.useCallback(F=>{const{files:T}=F.currentTarget,A=fe("change",d,T&&T.length>0?T:void 0);T&&T.length>0&&(p==null||p(A),f&&f(d,T),v&&v.onChange(A))},[v,d,p,f]),C=x.useCallback(F=>{t?F.preventDefault():w.current&&w.current.click()},[t]);return n.jsxs(_,{error:k,helpLink:r,helpText:a,htmlFor:l??d,label:o,required:g,tooltip:h,weight:m,children:[n.jsxs(ne,{className:`${t?"disabled":""} ${k?"error":""}`,children:[n.jsx(bo,{$size:"xs",children:S}),n.jsxs($,{alignItems:"center",display:"flex",gap:.625,children:[c.lodashExports.isEmpty(S)||t?void 0:n.jsx(M,{color:b.palette.gray[400],height:"20px",icon:"xmark",iconSize:"64px",iconType:"fa-light",onClick:E,variant:"ghost",width:"20px"}),k&&n.jsx(R,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:b.palette.error[500],iconSize:"lg"}),n.jsxs(P,{border:t?`1px solid ${b.palette.gray[300]} !important`:"",borderRadius:"0px 8px 8px 0px !important",disabled:t,height:"40px",onClick:C,variant:"primary",width:"96px",children:[n.jsx(R,{icon:"search",iconSize:"xl",mr:.5}),"Add file"]})]})]}),n.jsx($o,{...v,accept:e,"aria-label":d,"data-testid":d,disabled:t,id:l??d,multiple:s,name:d,onChange:z,ref:w,type:"file"})]})},vo=c.st.input`
1331
+ `,fe=(e,t,i)=>{const o=new Event(e);return Object.defineProperty(o,"target",{value:{name:t,value:i}}),o},mo=e=>{const t=e;return t?Array.from(t).map(i=>i.name).join(", "):""},wo=({accept:e,disabled:t=!1,error:i,label:o,helpLink:r,helpText:a,id:l,multiple:s,name:d,onChange:p,required:g,register:u,setValue:f,tooltip:h,watch:y,weight:m})=>{const b=c.Je(),j=t?void 0:i,w=x.useRef(null),k=u==null?void 0:u(d,{required:g}),v=y==null?void 0:y(d),S=mo(v),T=x.useCallback(()=>{const F=fe("change",d,void 0);f&&f(d,void 0),k&&k.onChange(F)},[k,d,f]),z=x.useCallback(F=>{const{files:E}=F.currentTarget,A=fe("change",d,E&&E.length>0?E:void 0);E&&E.length>0&&(p==null||p(A),f&&f(d,E),k&&k.onChange(A))},[k,d,p,f]),C=x.useCallback(F=>{t?F.preventDefault():w.current&&w.current.click()},[t]);return n.jsxs(_,{error:j,helpLink:r,helpText:a,htmlFor:l??d,label:o,required:g,tooltip:h,weight:m,children:[n.jsxs(ne,{className:`${t?"disabled":""} ${j?"error":""}`,children:[n.jsx(bo,{$size:"xs",children:S}),n.jsxs($,{alignItems:"center",display:"flex",gap:.625,children:[c.lodashExports.isEmpty(S)||t?void 0:n.jsx(M,{color:b.palette.gray[400],height:"20px",icon:"xmark",iconSize:"64px",iconType:"fa-light",onClick:T,variant:"ghost",width:"20px"}),j&&n.jsx(R,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:b.palette.error[500],iconSize:"lg"}),n.jsxs(P,{border:t?`1px solid ${b.palette.gray[300]} !important`:"",borderRadius:"0px 8px 8px 0px !important",disabled:t,height:"40px",onClick:C,variant:"primary",width:"96px",children:[n.jsx(R,{icon:"search",iconSize:"xl",mr:.5}),"Add file"]})]})]}),n.jsx($o,{...k,accept:e,"aria-label":d,"data-testid":d,disabled:t,id:l??d,multiple:s,name:d,onChange:z,ref:w,type:"file"})]})},vo=c.st.input`
1332
1332
  border: none;
1333
1333
  background: transparent;
1334
1334
  min-width: 15rem;
1335
1335
  padding: 0;
1336
1336
  flex: 1;
1337
- `,Ge=({disabled:e=!1,error:t,field:i,helpLink:o,helpLinkText:r,helpText:a,label:l,name:s="input-tag",onChange:d,onRemove:p,placeholder:g,required:u,tooltip:f,value:h,weight:y})=>{const m=c.Je(),b=e?void 0:t,[k,w]=x.useState(""),v=d?h:i==null?void 0:i.value,j=x.useMemo(()=>v&&typeof v=="string"?v.split(",").filter(Boolean):[],[v]),S=x.useCallback(T=>{const G=[...new Set(T.filter(Boolean))].join(","),Y=fe("change",s,G);i&&i.onChange(Y),d&&d(Y)},[i,s,d]),E=x.useCallback(T=>{w(T.target.value)},[]),z=x.useCallback(T=>{const A=k.trim();A.length&&!j.includes(A)&&(T.preventDefault(),S([...j,A]),w("")),i&&i.onBlur()},[k,i,S,j]),C=x.useCallback(T=>{const A=k.trim();T.key==="Enter"&&A.length===0&&T.preventDefault(),["Enter",","].includes(T.key)&&A.length>0&&!j.includes(A)?(T.preventDefault(),S([...j,A]),w("")):T.key==="Backspace"&&!A.length&&j.length&&(T.preventDefault(),p==null||p(j[j.length-1]),S(j.slice(0,-1)))},[k,p,S,j]),F=x.useCallback(T=>()=>{p==null||p(T),S(j.filter(A=>A!==T))},[p,S,j]);return n.jsx(_,{error:b,helpLink:o,helpLinkText:r,helpText:a,htmlFor:s,label:l,required:u,tooltip:f,weight:y,children:n.jsxs(ne,{$overflowX:"auto",className:`${e?"disabled":""} ${b?"error":""}`,children:[j.map(T=>n.jsx(U,{disabled:e,onClose:F(T),tagLabel:T},T)),n.jsx(vo,{"aria-hidden":!1,"aria-invalid":b?"true":"false","aria-label":s,"aria-required":u,autoComplete:"off",disabled:e,id:s,onBlur:z,onChange:E,onKeyDown:C,placeholder:j.length===0?g:void 0,ref:i==null?void 0:i.ref,type:"text",value:k}),b?n.jsx(R,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:m.palette.error[500],iconSize:"lg"}):void 0]})})},jo=({disabled:e=!1,control:t,error:i,helpLink:o,helpLinkText:r,helpText:a,label:l,name:s="input-tag",onChange:d,onRemove:p,placeholder:g,required:u,tooltip:f,value:h,weight:y})=>t?n.jsx(c.Controller,{control:t,name:s,render:({field:m})=>n.jsx(Ge,{disabled:e,error:i,field:m,helpLink:o,helpLinkText:r,helpText:a,label:l,name:s,onRemove:p,placeholder:g,required:u,tooltip:f,weight:y}),rules:{required:u}}):n.jsx(Ge,{disabled:e,error:i,helpLink:o,helpLinkText:r,helpText:a,label:l,name:s,onChange:d,onRemove:p,placeholder:g,required:u,tooltip:f,value:h,weight:y}),Ye=x.forwardRef(function({disabled:t,icon:i,margin:o,onClick:r,...a},l){return n.jsx(Xi,{$margin:o,"aria-label":i,className:"action-btn",disabled:t,onClick:r,ref:l,type:"button",...a,children:n.jsx(R,{icon:i,iconClass:"action",iconSize:"lg",iconType:"fa-light"})})}),Re=({error:e,decimalPlaces:t=0,disabled:i=!1,id:o,maxLength:r,max:a=1/0,min:l=0,name:s,onChange:d,placeholder:p,register:g,required:u,setValue:f,value:h})=>{const y=c.Je(),m=i?void 0:e,b=t<0?0:t,[k,w]=x.useState(h?c._.toNumber(h):0),v=x.useCallback(()=>{const z=(k-10**-b).toFixed(b),C=Math.max(Number(l),Number(z));f&&f(s,C,{shouldDirty:!0}),w(C);const F=fe("change",s,z);d&&d(F)},[k,b,l,f,s,d]),j=x.useCallback(()=>{const z=(k+10**-b).toFixed(b),C=Math.min(Number(a),Number(z)>Number(l)?Number(z):Number(l));f&&f(s,C,{shouldDirty:!0}),w(C);const F=fe("change",s,z);d&&d(F)},[k,b,a,l,f,s,d]),S=x.useCallback(z=>{const{value:C}=z.target,F=/\d+/u.test(C)&&!c._.isEmpty(C);f&&f(s,F?C:void 0),d&&d(z),w(Number(C))},[s,d,f]),E=x.useCallback(z=>{z.key==="Enter"&&z.preventDefault()},[]);return n.jsxs(ne,{className:`${i?"disabled":""} ${m?"error":""}`,children:[n.jsx("input",{"aria-hidden":!1,"aria-invalid":m?"true":"false","aria-label":s,"aria-required":u,autoComplete:"off",disabled:i,id:o??s,max:a,min:l,onChange:S,onKeyDown:E,placeholder:p,required:u,step:10**-b,type:"number",value:k,...g==null?void 0:g(s,{maxLength:r,max:a,min:l,onChange:S,value:h,valueAsNumber:!0})}),m&&n.jsx(R,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:y.palette.error[500],iconSize:"lg"}),n.jsx(Ye,{borderLeft:"inherit",borderRight:"inherit",disabled:i,icon:"minus",margin:"0 -0.625rem 0 0",onClick:v,px:.75,py:.75}),n.jsx(Ye,{borderRadius:`0 ${y.spacing[.5]} ${y.spacing[.5]} 0`,disabled:i,icon:"plus",onClick:j,px:.75,py:.75})]})},Ut=({decimalPlaces:e,disabled:t=!1,error:i,helpLink:o,helpLinkText:r,helpText:a,id:l,label:s,linkPosition:d,maxLength:p,max:g,min:u,name:f,onChange:h,placeholder:y,register:m,required:b,setValue:k,tooltip:w,value:v,watch:j,weight:S})=>n.jsx(_,{error:t?void 0:i,helpLink:o,helpLinkText:r,helpText:a,htmlFor:f,label:s,linkPosition:d,maxLength:p,required:b,tooltip:w,weight:S,children:n.jsx(Re,{decimalPlaces:e,disabled:t,error:i,id:l,max:g,maxLength:p,min:u,name:f,onChange:h,placeholder:y,register:m,required:b,setValue:k,value:j?j(f):v})}),Gt=({disabled:e=!1,error:t,name:i,label:o,propsMax:r,propsMin:a,required:l,tooltip:s,variant:d="default"})=>{const p=`${i}Max`,g=`${i}Min`;return n.jsx(_,{error:e?void 0:t,htmlFor:i,label:o,required:l,tooltip:s,children:n.jsxs($,{display:"flex",flexDirection:d==="filters"?"column":"row",gap:.25,width:"100%",children:[n.jsx(Re,{...a,disabled:e,error:t,name:(a==null?void 0:a.name)??g}),n.jsx(Re,{...r,disabled:e,error:t,name:(r==null?void 0:r.name)??p})]})})},ko=c.st.div`
1337
+ `,Ge=({disabled:e=!1,error:t,field:i,helpLink:o,helpLinkText:r,helpText:a,label:l,name:s="input-tag",onChange:d,onRemove:p,placeholder:g,required:u,tooltip:f,value:h,weight:y})=>{const m=c.Je(),b=e?void 0:t,[j,w]=x.useState(""),k=d?h:i==null?void 0:i.value,v=x.useMemo(()=>k&&typeof k=="string"?k.split(",").filter(Boolean):[],[k]),S=x.useCallback(E=>{const G=[...new Set(E.filter(Boolean))].join(","),Y=fe("change",s,G);i&&i.onChange(Y),d&&d(Y)},[i,s,d]),T=x.useCallback(E=>{w(E.target.value)},[]),z=x.useCallback(E=>{const A=j.trim();A.length&&!v.includes(A)&&(E.preventDefault(),S([...v,A]),w("")),i&&i.onBlur()},[j,i,S,v]),C=x.useCallback(E=>{const A=j.trim();E.key==="Enter"&&A.length===0&&E.preventDefault(),["Enter",","].includes(E.key)&&A.length>0&&!v.includes(A)?(E.preventDefault(),S([...v,A]),w("")):E.key==="Backspace"&&!A.length&&v.length&&(E.preventDefault(),p==null||p(v[v.length-1]),S(v.slice(0,-1)))},[j,p,S,v]),F=x.useCallback(E=>()=>{p==null||p(E),S(v.filter(A=>A!==E))},[p,S,v]);return n.jsx(_,{error:b,helpLink:o,helpLinkText:r,helpText:a,htmlFor:s,label:l,required:u,tooltip:f,weight:y,children:n.jsxs(ne,{$overflowX:"auto",className:`${e?"disabled":""} ${b?"error":""}`,children:[v.map(E=>n.jsx(U,{disabled:e,onClose:F(E),tagLabel:E},E)),n.jsx(vo,{"aria-hidden":!1,"aria-invalid":b?"true":"false","aria-label":s,"aria-required":u,autoComplete:"off",disabled:e,id:s,onBlur:z,onChange:T,onKeyDown:C,placeholder:v.length===0?g:void 0,ref:i==null?void 0:i.ref,type:"text",value:j}),b?n.jsx(R,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:m.palette.error[500],iconSize:"lg"}):void 0]})})},jo=({disabled:e=!1,control:t,error:i,helpLink:o,helpLinkText:r,helpText:a,label:l,name:s="input-tag",onChange:d,onRemove:p,placeholder:g,required:u,tooltip:f,value:h,weight:y})=>t?n.jsx(c.Controller,{control:t,name:s,render:({field:m})=>n.jsx(Ge,{disabled:e,error:i,field:m,helpLink:o,helpLinkText:r,helpText:a,label:l,name:s,onRemove:p,placeholder:g,required:u,tooltip:f,weight:y}),rules:{required:u}}):n.jsx(Ge,{disabled:e,error:i,helpLink:o,helpLinkText:r,helpText:a,label:l,name:s,onChange:d,onRemove:p,placeholder:g,required:u,tooltip:f,value:h,weight:y}),Ye=x.forwardRef(function({disabled:t,icon:i,margin:o,onClick:r,...a},l){return n.jsx(Xi,{$margin:o,"aria-label":i,className:"action-btn",disabled:t,onClick:r,ref:l,type:"button",...a,children:n.jsx(R,{icon:i,iconClass:"action",iconSize:"lg",iconType:"fa-light"})})}),Re=({error:e,decimalPlaces:t=0,disabled:i=!1,id:o,maxLength:r,max:a=1/0,min:l=0,name:s,onChange:d,placeholder:p,register:g,required:u,setValue:f,value:h})=>{const y=c.Je(),m=i?void 0:e,b=t<0?0:t,[j,w]=x.useState(h?c._.toNumber(h):0),k=x.useCallback(()=>{const z=(j-10**-b).toFixed(b),C=Math.max(Number(l),Number(z));f&&f(s,C,{shouldDirty:!0}),w(C);const F=fe("change",s,z);d&&d(F)},[j,b,l,f,s,d]),v=x.useCallback(()=>{const z=(j+10**-b).toFixed(b),C=Math.min(Number(a),Number(z)>Number(l)?Number(z):Number(l));f&&f(s,C,{shouldDirty:!0}),w(C);const F=fe("change",s,z);d&&d(F)},[j,b,a,l,f,s,d]),S=x.useCallback(z=>{const{value:C}=z.target,F=/\d+/u.test(C)&&!c._.isEmpty(C);f&&f(s,F?C:void 0),d&&d(z),w(Number(C))},[s,d,f]),T=x.useCallback(z=>{z.key==="Enter"&&z.preventDefault()},[]);return n.jsxs(ne,{className:`${i?"disabled":""} ${m?"error":""}`,children:[n.jsx("input",{"aria-hidden":!1,"aria-invalid":m?"true":"false","aria-label":s,"aria-required":u,autoComplete:"off",disabled:i,id:o??s,max:a,min:l,onChange:S,onKeyDown:T,placeholder:p,required:u,step:10**-b,type:"number",value:j,...g==null?void 0:g(s,{maxLength:r,max:a,min:l,onChange:S,value:h,valueAsNumber:!0})}),m&&n.jsx(R,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:y.palette.error[500],iconSize:"lg"}),n.jsx(Ye,{borderLeft:"inherit",borderRight:"inherit",disabled:i,icon:"minus",margin:"0 -0.625rem 0 0",onClick:k,px:.75,py:.75}),n.jsx(Ye,{borderRadius:`0 ${y.spacing[.5]} ${y.spacing[.5]} 0`,disabled:i,icon:"plus",onClick:v,px:.75,py:.75})]})},Ut=({decimalPlaces:e,disabled:t=!1,error:i,helpLink:o,helpLinkText:r,helpText:a,id:l,label:s,linkPosition:d,maxLength:p,max:g,min:u,name:f,onChange:h,placeholder:y,register:m,required:b,setValue:j,tooltip:w,value:k,watch:v,weight:S})=>n.jsx(_,{error:t?void 0:i,helpLink:o,helpLinkText:r,helpText:a,htmlFor:f,label:s,linkPosition:d,maxLength:p,required:b,tooltip:w,weight:S,children:n.jsx(Re,{decimalPlaces:e,disabled:t,error:i,id:l,max:g,maxLength:p,min:u,name:f,onChange:h,placeholder:y,register:m,required:b,setValue:j,value:v?v(f):k})}),Gt=({disabled:e=!1,error:t,name:i,label:o,propsMax:r,propsMin:a,required:l,tooltip:s,variant:d="default"})=>{const p=`${i}Max`,g=`${i}Min`;return n.jsx(_,{error:e?void 0:t,htmlFor:i,label:o,required:l,tooltip:s,children:n.jsxs($,{display:"flex",flexDirection:d==="filters"?"column":"row",gap:.25,width:"100%",children:[n.jsx(Re,{...a,disabled:e,error:t,name:(a==null?void 0:a.name)??g}),n.jsx(Re,{...r,disabled:e,error:t,name:(r==null?void 0:r.name)??p})]})})},ko=c.st.div`
1338
1338
  ${({theme:e})=>`
1339
1339
  align-items: flex-start;
1340
1340
  align-self: stretch;
@@ -1428,15 +1428,15 @@
1428
1428
  overflow: hidden;
1429
1429
  text-overflow: ellipsis;
1430
1430
  white-space: nowrap;
1431
- `,To=({disabled:e,error:t,label:i,name:o,placeholder:r,required:a,register:l,tooltip:s,value:d,watch:p,weight:g})=>{const u=c.Je(),f=x.useRef(null),h=e?void 0:t,y=(p==null?void 0:p(o))??d,[m,b]=x.useState(!1),[k,w]=x.useState(""),{refs:v,floatingStyles:j}=c.useFloating$1({placement:"bottom-start",whileElementsMounted:c.autoUpdate}),{inputRef:S,inputValue:E,handlePhoneValueChange:z,country:C,setCountry:F}=c.ee({countries:c.R,defaultCountry:"co",forceDialCode:!0,value:y?String(y):""}),T=x.useCallback(H=>{H.key==="Enter"&&H.preventDefault()},[]),A=x.useCallback(H=>{H.preventDefault(),b(O=>!O),m||w("")},[m]),G=x.useCallback(H=>()=>{F(H),b(!1),w("")},[F,b]),Y=x.useCallback(H=>{H.key.length===1?w(O=>O+H.key):H.key==="Backspace"&&w(O=>O.slice(0,-1))},[]),ie=c.R.filter(H=>{const{name:O}=c.M(H);return O.toLowerCase().includes(k.toLowerCase())});return Q(v.floating.current,()=>{b(!1),w("")},!0),n.jsx(_,{error:h,htmlFor:o,label:i,required:a,tooltip:s,weight:g,children:n.jsxs(ko,{className:`${e?"disabled":""} ${h?"error":""}`,ref:f,children:[n.jsxs(Co,{"aria-label":"country-selector","data-testid":"country-selector",disabled:e,id:"country-selector",onClick:A,onKeyDown:Y,ref:v.setReference,children:[n.jsx(c.q,{iso2:C.iso2,size:"16px"}),n.jsx(R,{icon:"angle-down",iconColor:u.palette.gray[400],iconSize:"lg",iconType:"fa-light"})]}),n.jsxs(ne,{className:`${e?"disabled":""} ${h?"error":""}`,children:[n.jsx("input",{"aria-hidden":!1,"aria-invalid":h?"true":"false","aria-label":o,"aria-required":a,autoComplete:"off","data-testid":`${o}-input`,disabled:e,id:o,name:o,onKeyDown:T,placeholder:r,ref:S,type:"tel",value:E,...l==null?void 0:l(o,{required:a,onChange:z})}),h?n.jsx(R,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:u.palette.error[500],iconSize:"lg"}):void 0]}),m&&se.createPortal(n.jsx(So,{ref:v.setFloating,style:j,children:ie.map(H=>{const{dialCode:O,iso2:K,name:le}=c.M(H);return n.jsxs(zo,{onClick:G(K),value:K,children:[n.jsx(c.q,{iso2:K,size:"16px"}),n.jsx(Io,{children:le}),n.jsx(I,{color:u.palette.gray[400],size:"sm",sizeSm:"xs",textAlign:"end",children:"+"+O})]},K)})}),document.getElementById("modal-wrapper")??document.getElementById("root")??document.body)]})})},Eo=({disabled:e=!1,error:t,helpLink:i,helpLinkText:o,helpText:r,isTouched:a,isValid:l,label:s,name:d="input-text",id:p,maskValue:g=!1,maxLength:u,onBlur:f,placeholder:h,register:y,required:m,rows:b,tooltip:k,watch:w,weight:v,value:j})=>{const S=c.Je(),E=(w==null?void 0:w(d))??j,z=l&&a&&!e,C=e?void 0:t;return n.jsx(_,{disabled:e,error:C,helpLink:i,helpLinkText:o,helpText:r,htmlFor:d,label:s,maxLength:u,required:m,tooltip:k,value:E?String(E):void 0,weight:v,children:n.jsxs(ne,{className:`
1431
+ `,To=({disabled:e,error:t,label:i,name:o,placeholder:r,required:a,register:l,tooltip:s,value:d,watch:p,weight:g})=>{const u=c.Je(),f=x.useRef(null),h=e?void 0:t,y=(p==null?void 0:p(o))??d,[m,b]=x.useState(!1),[j,w]=x.useState(""),{refs:k,floatingStyles:v}=c.useFloating$1({placement:"bottom-start",whileElementsMounted:c.autoUpdate}),{inputRef:S,inputValue:T,handlePhoneValueChange:z,country:C,setCountry:F}=c.ee({countries:c._$1,defaultCountry:"co",forceDialCode:!0,value:y?String(y):""}),E=x.useCallback(H=>{H.key==="Enter"&&H.preventDefault()},[]),A=x.useCallback(H=>{H.preventDefault(),b(O=>!O),m||w("")},[m]),G=x.useCallback(H=>()=>{F(H),b(!1),w("")},[F,b]),Y=x.useCallback(H=>{H.key.length===1?w(O=>O+H.key):H.key==="Backspace"&&w(O=>O.slice(0,-1))},[]),ie=c._$1.filter(H=>{const{name:O}=c.M(H);return O.toLowerCase().includes(j.toLowerCase())});return Q(k.floating.current,()=>{b(!1),w("")},!0),n.jsx(_,{error:h,htmlFor:o,label:i,required:a,tooltip:s,weight:g,children:n.jsxs(ko,{className:`${e?"disabled":""} ${h?"error":""}`,ref:f,children:[n.jsxs(Co,{"aria-label":"country-selector","data-testid":"country-selector",disabled:e,id:"country-selector",onClick:A,onKeyDown:Y,ref:k.setReference,children:[n.jsx(c.q,{iso2:C.iso2,size:"16px"}),n.jsx(R,{icon:"angle-down",iconColor:u.palette.gray[400],iconSize:"lg",iconType:"fa-light"})]}),n.jsxs(ne,{className:`${e?"disabled":""} ${h?"error":""}`,children:[n.jsx("input",{"aria-hidden":!1,"aria-invalid":h?"true":"false","aria-label":o,"aria-required":a,autoComplete:"off","data-testid":`${o}-input`,disabled:e,id:o,name:o,onKeyDown:E,placeholder:r,ref:S,type:"tel",value:T,...l==null?void 0:l(o,{required:a,onChange:z})}),h?n.jsx(R,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:u.palette.error[500],iconSize:"lg"}):void 0]}),m&&se.createPortal(n.jsx(So,{ref:k.setFloating,style:v,children:ie.map(H=>{const{dialCode:O,iso2:K,name:le}=c.M(H);return n.jsxs(zo,{onClick:G(K),value:K,children:[n.jsx(c.q,{iso2:K,size:"16px"}),n.jsx(Io,{children:le}),n.jsx(I,{color:u.palette.gray[400],size:"sm",sizeSm:"xs",textAlign:"end",children:"+"+O})]},K)})}),document.getElementById("modal-wrapper")??document.getElementById("root")??document.body)]})})},Eo=({disabled:e=!1,error:t,helpLink:i,helpLinkText:o,helpText:r,isTouched:a,isValid:l,label:s,name:d="input-text",id:p,maskValue:g=!1,maxLength:u,onBlur:f,placeholder:h,register:y,required:m,rows:b,tooltip:j,watch:w,weight:k,value:v})=>{const S=c.Je(),T=(w==null?void 0:w(d))??v,z=l&&a&&!e,C=e?void 0:t;return n.jsx(_,{disabled:e,error:C,helpLink:i,helpLinkText:o,helpText:r,htmlFor:d,label:s,maxLength:u,required:m,tooltip:j,value:T?String(T):void 0,weight:k,children:n.jsxs(ne,{className:`
1432
1432
  ${e?"disabled":""} ${C?"error":""} ${z?"success":""}
1433
- `,children:[n.jsx("textarea",{"aria-hidden":!1,"aria-invalid":C?"true":"false","aria-label":d,"aria-required":m,className:g?"sr-block":"","data-testid":`${d}-text-area`,disabled:e,id:p??d,maxLength:u,placeholder:h,rows:b,value:E,...y==null?void 0:y(d,{required:m,onBlur:f})}),C?n.jsx(R,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:S.palette.error[500],iconSize:"lg"}):void 0,z?n.jsx(R,{icon:"check-circle",iconClass:"success-icon",iconColor:S.palette.success[500],iconSize:"lg"}):void 0]})})},Ro=({control:e,description:t,disabled:i,id:o,items:r,align:a,inputType:l="text",inputNumberProps:s,minHeight:d,minWidth:p,name:g,placeholder:u,textAlign:f,tooltip:h,title:y,value:m,isTouched:b,isValid:k,error:w,onChange:v,register:j,setValue:S,watch:E})=>{const z=x.useMemo(()=>{if(l==="text")return n.jsx(Le,{disabled:i,error:w,isTouched:b,isValid:k,name:g,placeholder:u,register:j});if(l==="date")return n.jsx(Wt,{disabled:i,error:w,name:g,register:j,setValue:S,watch:E});if(l==="select"&&r)return n.jsx(it,{control:e,disabled:i,items:r,name:g,placeholder:u,value:m});const{decimalPlaces:C,max:F,min:T}=s??{};return n.jsx(Ut,{decimalPlaces:C,disabled:i,error:w,max:F,min:T,name:g,onChange:v,placeholder:u,register:j,setValue:S,value:m,watch:E})},[e,i,w,s,l,b,k,r,g,v,u,j,S,m,E]);return n.jsxs(Wi,{$align:a,$minHeight:d,$minWidth:p,children:[n.jsx(De,{description:t,id:o,textAlign:f,title:y,tooltip:h}),z]})},Do=c.st.div`
1433
+ `,children:[n.jsx("textarea",{"aria-hidden":!1,"aria-invalid":C?"true":"false","aria-label":d,"aria-required":m,className:g?"sr-block":"","data-testid":`${d}-text-area`,disabled:e,id:p??d,maxLength:u,placeholder:h,rows:b,value:T,...y==null?void 0:y(d,{required:m,onBlur:f})}),C?n.jsx(R,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:S.palette.error[500],iconSize:"lg"}):void 0,z?n.jsx(R,{icon:"check-circle",iconClass:"success-icon",iconColor:S.palette.success[500],iconSize:"lg"}):void 0]})})},Ro=({control:e,description:t,disabled:i,id:o,items:r,align:a,inputType:l="text",inputNumberProps:s,minHeight:d,minWidth:p,name:g,placeholder:u,textAlign:f,tooltip:h,title:y,value:m,isTouched:b,isValid:j,error:w,onChange:k,register:v,setValue:S,watch:T})=>{const z=x.useMemo(()=>{if(l==="text")return n.jsx(Le,{disabled:i,error:w,isTouched:b,isValid:j,name:g,placeholder:u,register:v});if(l==="date")return n.jsx(Wt,{disabled:i,error:w,name:g,register:v,setValue:S,watch:T});if(l==="select"&&r)return n.jsx(it,{control:e,disabled:i,items:r,name:g,placeholder:u,value:m});const{decimalPlaces:C,max:F,min:E}=s??{};return n.jsx(Ut,{decimalPlaces:C,disabled:i,error:w,max:F,min:E,name:g,onChange:k,placeholder:u,register:v,setValue:S,value:m,watch:T})},[e,i,w,s,l,b,j,r,g,k,u,v,S,m,T]);return n.jsxs(Wi,{$align:a,$minHeight:d,$minWidth:p,children:[n.jsx(De,{description:t,id:o,textAlign:f,title:y,tooltip:h}),z]})},Do=c.st.div`
1434
1434
  display: flex;
1435
1435
  align-self: flex-start;
1436
1436
  margin-left: auto;
1437
1437
  width: 40px;
1438
1438
  height: auto;
1439
- `,Yt=(e,t)=>{const[o,r]=x.useState(0),[a,l]=x.useState(0);return x.useEffect(()=>{a===100&&(()=>{r(d=>d===t-1?0:d+1)})()},[a,t]),x.useEffect(()=>{const s=setInterval(()=>{l(d=>d===100?0:d+1)},e);return()=>{clearInterval(s)}},[e]),{cycle:o,progress:a,setCycle:r,setProgress:l}},Kt=({publicId:e,format:t="webp"})=>{const i=x.useMemo(()=>new c.Cloudinary({cloud:{cloudName:"fluid-attacks"}}),[]);return x.useMemo(()=>i.image(e).format(t),[i,e,t])},Se=e=>{const[t,i]=x.useState(!1),o=x.useCallback(()=>{i(!0)},[]),r=x.useCallback(()=>{i(!1)},[]),a=x.useCallback(()=>{i(l=>!l)},[]);return{close:r,isOpen:t,name:e,open:o,setIsOpen:i,toggle:a}},No=e=>e.reduce((t,i)=>({...t,[i.id]:i.visible}),{}),Zt=({name:e,items:t,columnOrder:i,setColumnOrder:o,setColumnVisibility:r})=>{const a=x.useMemo(()=>[...t.filter(({locked:u})=>u).map(({locked:u,...f})=>({...f,visible:!0,locked:u})),...t.filter(({locked:u})=>!u)],[t]),[l,s]=x.useState(a),d=x.useCallback(u=>{const f=u.filter(({locked:b})=>!b),y=[...u.filter(({locked:b})=>b),...f],m=y.map(({name:b})=>b);s(b=>[...y,...b.filter(({name:k})=>!m.includes(k))]),o&&o(y.map(({id:b})=>b))},[o]),p=x.useCallback(()=>{const u=l.map(f=>({...f,visible:f.locked||((i==null?void 0:i.includes(f.id))??!1)})).toSorted((f,h)=>{if(f.locked&&!h.locked)return-1;if(!f.locked&&h.locked)return 1;if(Number(h.visible)!==Number(f.visible))return Number(h.visible)-Number(f.visible);const y=(i==null?void 0:i.indexOf(f.id))??0,m=(i==null?void 0:i.indexOf(h.id))??0;return y-m});r==null||r(No(u)),d(u)},[l,i,d,r]),g=x.useMemo(()=>c.some(l,u=>((i==null?void 0:i.includes(u.id))??!1)!==u.visible),[l,i]);return{setColumns:d,resetToDefault:p,columns:l,...Se(e),hasChanged:g}},rt=(e,t)=>x.useMemo(()=>c._.debounce(e,t),[e,t]),Fo=e=>{const[t,i]=x.useState(),o=rt(r=>{i(r)},(e==null?void 0:e.debounceWait)??300);return[t,o]},Ao=({alt:e="img",height:t="",width:i="",plugins:o=[c.lazyload(),c.placeholder()],publicId:r})=>{const a=Kt({publicId:r});return n.jsx(c.AdvancedImage,{alt:e,cldImg:a,height:t,plugins:o,width:i})},te=x.memo(Ao),Lo=c.st.label`
1439
+ `,Yt=(e,t)=>{const[o,r]=x.useState(0),[a,l]=x.useState(0);return x.useEffect(()=>{a===100&&(()=>{r(d=>d===t-1?0:d+1)})()},[a,t]),x.useEffect(()=>{const s=setInterval(()=>{l(d=>d===100?0:d+1)},e);return()=>{clearInterval(s)}},[e]),{cycle:o,progress:a,setCycle:r,setProgress:l}},Kt=({publicId:e,format:t="webp"})=>{const i=x.useMemo(()=>new c.Cloudinary({cloud:{cloudName:"fluid-attacks"}}),[]);return x.useMemo(()=>i.image(e).format(t),[i,e,t])},Se=e=>{const[t,i]=x.useState(!1),o=x.useCallback(()=>{i(!0)},[]),r=x.useCallback(()=>{i(!1)},[]),a=x.useCallback(()=>{i(l=>!l)},[]);return{close:r,isOpen:t,name:e,open:o,setIsOpen:i,toggle:a}},No=e=>e.reduce((t,i)=>({...t,[i.id]:i.visible}),{}),Zt=({name:e,items:t,columnOrder:i,setColumnOrder:o,setColumnVisibility:r})=>{const a=x.useMemo(()=>[...t.filter(({locked:u})=>u).map(({locked:u,...f})=>({...f,visible:!0,locked:u})),...t.filter(({locked:u})=>!u)],[t]),[l,s]=x.useState(a),d=x.useCallback(u=>{const f=u.filter(({locked:b})=>!b),y=[...u.filter(({locked:b})=>b),...f],m=y.map(({name:b})=>b);s(b=>[...y,...b.filter(({name:j})=>!m.includes(j))]),o&&o(y.map(({id:b})=>b))},[o]),p=x.useCallback(()=>{const u=l.map(f=>({...f,visible:f.locked||((i==null?void 0:i.includes(f.id))??!1)})).toSorted((f,h)=>{if(f.locked&&!h.locked)return-1;if(!f.locked&&h.locked)return 1;if(Number(h.visible)!==Number(f.visible))return Number(h.visible)-Number(f.visible);const y=(i==null?void 0:i.indexOf(f.id))??0,m=(i==null?void 0:i.indexOf(h.id))??0;return y-m});r==null||r(No(u)),d(u)},[l,i,d,r]),g=x.useMemo(()=>c.some(l,u=>((i==null?void 0:i.includes(u.id))??!1)!==u.visible),[l,i]);return{setColumns:d,resetToDefault:p,columns:l,...Se(e),hasChanged:g}},rt=(e,t)=>x.useMemo(()=>c._.debounce(e,t),[e,t]),Fo=e=>{const[t,i]=x.useState(),o=rt(r=>{i(r)},(e==null?void 0:e.debounceWait)??300);return[t,o]},Ao=({alt:e="img",height:t="",width:i="",plugins:o=[c.lazyload(),c.placeholder()],publicId:r})=>{const a=Kt({publicId:r});return n.jsx(c.AdvancedImage,{alt:e,cldImg:a,height:t,plugins:o,width:i})},te=x.memo(Ao),Lo=c.st.label`
1440
1440
  ${({theme:e})=>`
1441
1441
  align-items: center;
1442
1442
  display: flex;
@@ -1862,7 +1862,17 @@ ${y[8]}...`:(y.length<8&&p(!1),t)},[l,t,e]),f=x.useMemo(u,[u]),h=x.useCallback(a
1862
1862
  font-size: 6px;
1863
1863
  font-weight: ${({theme:e})=>e.typography.weight.bold};
1864
1864
  justify-content: center;
1865
- `,rn=x.forwardRef(function({numberIndicator:t,show:i,variant:o="error",...r},a){return n.jsx(ar,{$variant:o,className:i?"flex":"hidden","data-testid":"notification-sign",ref:a,...r,children:t&&n.jsx(sr,{children:t<=9?t:9})})}),an=({end:e=!1,label:t,id:i,isActive:o=!1,link:r,notificationSign:a,onClick:l,tooltip:s="",variant:d="primary",tag:p})=>{const{pathname:g}=_e.useLocation(),u=o||(d==="primary"?g.includes(r):g.endsWith(r));return n.jsx(J,{display:"flex",id:`${i}-tooltip`,tip:s,children:n.jsxs(rr,{$borderButton:u,$variant:d,children:[n.jsxs(_e.NavLink,{end:e,id:i,onClick:l,to:r,children:[t,n.jsx(rn,{left:a==null?void 0:a.left,numberIndicator:a==null?void 0:a.numberIndicator,show:a==null?void 0:a.show,top:a==null?void 0:a.top,variant:a==null?void 0:a.variant})]}),p===void 0?null:n.jsx(U,{tagLabel:`${p}`,variant:"default"})]})})},lt=({items:e,borders:t=!0,box:i=!1,variant:o="primary"})=>{const r=c.Je();return n.jsx($,{alignItems:"center",bgColor:r.palette.white,border:i?"1px solid":void 0,borderBottom:t?`1px solid ${r.palette.gray[300]}`:void 0,borderColor:i?r.palette.gray[200]:void 0,borderRadius:i?r.spacing[.25]:void 0,display:"inline-flex",gap:.25,id:"tablist",padding:i?[0,0,0,0]:void 0,pl:t?1.25:void 0,pr:t?1.25:void 0,role:"tablist",width:i?"max-content":"100%",children:e.map(({end:a,id:l,isActive:s,link:d,label:p,notificationSign:g,onClick:u,tag:f,tooltip:h})=>n.jsx(an,{end:a,id:l,isActive:s,label:p,link:d,notificationSign:g,onClick:u,tag:f,tooltip:h,variant:o},l))})},re=x.forwardRef(function({color:t=D.palette.gray[100],mt:i=.5,mb:o=.5,width:r,...a},l){return n.jsx($,{as:"hr",borderTop:`1px solid ${t}`,mb:o,mt:i,ref:l,width:r??"100%",...a})}),lr=c.st.li`
1865
+ `;c.st.div`
1866
+ /* Override component size only in Storybook */
1867
+ & > div {
1868
+ width: 24px !important;
1869
+ height: 24px !important;
1870
+
1871
+ & > div {
1872
+ font-size: 12px !important;
1873
+ }
1874
+ }
1875
+ `;const rn=x.forwardRef(function({numberIndicator:t,show:i,variant:o="error",...r},a){return n.jsx(ar,{$variant:o,className:i?"flex":"hidden","data-testid":"notification-sign",ref:a,...r,children:t&&n.jsx(sr,{children:t<=9?t:9})})}),an=({end:e=!1,label:t,id:i,isActive:o=!1,link:r,notificationSign:a,onClick:l,tooltip:s="",variant:d="primary",tag:p})=>{const{pathname:g}=_e.useLocation(),u=o||(d==="primary"?g.includes(r):g.endsWith(r));return n.jsx(J,{display:"flex",id:`${i}-tooltip`,tip:s,children:n.jsxs(rr,{$borderButton:u,$variant:d,children:[n.jsxs(_e.NavLink,{end:e,id:i,onClick:l,to:r,children:[t,n.jsx(rn,{left:a==null?void 0:a.left,numberIndicator:a==null?void 0:a.numberIndicator,show:a==null?void 0:a.show,top:a==null?void 0:a.top,variant:a==null?void 0:a.variant})]}),p===void 0?null:n.jsx(U,{tagLabel:`${p}`,variant:"default"})]})})},lt=({items:e,borders:t=!0,box:i=!1,variant:o="primary"})=>{const r=c.Je();return n.jsx($,{alignItems:"center",bgColor:r.palette.white,border:i?"1px solid":void 0,borderBottom:t?`1px solid ${r.palette.gray[300]}`:void 0,borderColor:i?r.palette.gray[200]:void 0,borderRadius:i?r.spacing[.25]:void 0,display:"inline-flex",gap:.25,id:"tablist",padding:i?[0,0,0,0]:void 0,pl:t?1.25:void 0,pr:t?1.25:void 0,role:"tablist",width:i?"max-content":"100%",children:e.map(({end:a,id:l,isActive:s,link:d,label:p,notificationSign:g,onClick:u,tag:f,tooltip:h})=>n.jsx(an,{end:a,id:l,isActive:s,label:p,link:d,notificationSign:g,onClick:u,tag:f,tooltip:h,variant:o},l))})},re=x.forwardRef(function({color:t=D.palette.gray[100],mt:i=.5,mb:o=.5,width:r,...a},l){return n.jsx($,{as:"hr",borderTop:`1px solid ${t}`,mb:o,mt:i,ref:l,width:r??"100%",...a})}),lr=c.st.li`
1866
1876
  ${({theme:e})=>`
1867
1877
  align-items: center;
1868
1878
  background-color: ${e.palette.white};
@@ -2010,7 +2020,7 @@ ${y[8]}...`:(y.length<8&&p(!1),t)},[l,t,e]),f=x.useMemo(u,[u]),h=x.useCallback(a
2010
2020
  border-radius: ${e.spacing[.5]};
2011
2021
  width: 250px;
2012
2022
  `}
2013
- `,ae=({name:e,smallSearch:t=!1,onClear:i,onChange:o,value:r,...a})=>{const l=x.useRef(null),s=c.Je(),[d,p]=x.useState(!1),[g,u]=x.useState(r??""),{refs:f,floatingStyles:h}=c.useFloating$1(),y=x.useCallback(()=>{p(v=>!v)},[]),m=x.useCallback(v=>{v.key==="Enter"&&v.preventDefault()},[]),b=x.useCallback(v=>{u(v.target.value),o==null||o(v)},[o]),k=x.useCallback(()=>{u(""),i==null||i()},[i]);Q(f.floating.current,()=>{p(!1)},!0);const w=n.jsxs(gr,{children:[n.jsx(R,{icon:"magnifying-glass",iconColor:s.palette.gray[700],iconSize:"lg",iconType:"fa-light"}),n.jsx(pr,{id:e,name:e,onChange:b,onKeyDown:m,ref:l,type:"search",value:g,...a}),!c.lodashExports.isEmpty(g)&&n.jsx(M,{icon:"xmark",iconColor:s.palette.gray[300],iconSize:"lg",iconType:"fa-light",onClick:k,px:.25,py:.25,type:"reset",variant:"ghost"})]});return t?n.jsxs(x.Fragment,{children:[n.jsx(M,{border:`1px solid ${s.palette.gray[300]} !important`,icon:"magnifying-glass",iconSize:"lg",iconType:"fa-light",onClick:y,ref:f.setReference,variant:"ghost"}),d?n.jsx(ur,{ref:f.setFloating,style:h,children:w}):void 0]}):w},pn=({columns:e,formId:t,onChangeHandler:i,variant:o})=>{const r=x.useRef(null),[a,l]=x.useState([]),[s,d]=x.useState(""),p=x.useCallback(u=>{const{value:f}=u.target;d(f)},[]),g=x.useCallback(()=>{r.current&&(r.current.reset(),d(""))},[r]);return x.useEffect(()=>{l(e.filter(u=>{var f;return o==="grouped"?u.name.toLowerCase().includes(s.toLowerCase())||((f=u.group)==null?void 0:f.includes(s.toLowerCase())):u.name.toLowerCase().includes(s.toLowerCase())}))},[e,s,o]),o==="grouped"?n.jsxs($,{display:"flex",flexDirection:"column",gap:.625,height:"100%",id:"columns-buttons",py:1.25,width:"55%",children:[n.jsx("form",{id:"search-form",ref:r,children:n.jsx(ae,{name:"search",onChange:p,onClear:g,value:s})}),n.jsx("form",{"data-testid":t,id:t,onReset:g,style:{display:"flex",flexDirection:"column",gap:"0.625rem"},children:Object.entries(dn(a)).map(([u,f],h)=>{const y=`li-checkbox${u}`;return n.jsx(cn,{checkboxesName:u,defaultCollapsed:h===0,onChange:i,options:f,title:u},y)})})]}):n.jsxs($,{height:"100%",id:"columns-buttons",py:1.25,width:"55%",children:[n.jsx("form",{id:"search-form",ref:r,children:n.jsx(ae,{name:"search",onChange:p,onClear:g,value:s})}),n.jsx("form",{"data-testid":t,id:t,onReset:g,style:{paddingTop:"0.625rem"},children:a.map(u=>{const f=`li-checkbox-${u.name}`;return n.jsx(dr,{selected:u.visible,value:f,width:"content",children:n.jsx(oe,{checked:u.visible,disabled:u.locked,label:u.name,name:u.name,onChange:i,value:u.name})},f)})})]})},gn=({_containerId:e="portals",title:t,modalRef:i,variant:o})=>{const r=c.Je(),a=x.useRef(null),[l,s]=x.useState(void 0),d=x.useCallback(u=>{const{checked:f,value:h}=u.target,y=i.columns.map(m=>{var b;return m.name===h?((b=m.toggleVisibility)==null||b.call(m,f),{...m,visible:f}):m});i.setColumns(y)},[i]),p=x.useCallback(u=>{const f=i.columns.map(h=>{var y;return h.id===u?((y=h.toggleVisibility)==null||y.call(h,!1),{...h,visible:!1}):h});i.setColumns(f)},[i]),g=x.useCallback(()=>{var f;const u=(f=a.current)==null?void 0:f.scrollHeight;l!==u&&s(u)},[l]);return i.isOpen?se.createPortal(n.jsx(en,{"aria-label":i.name,"aria-modal":"true",children:n.jsxs(st,{$size:"md",flexDirection:"column",children:[n.jsxs($,{display:"flex",justify:"space-between",px:1.25,py:1.25,children:[n.jsx(q,{size:"sm",children:t}),n.jsx(M,{icon:"close",iconColor:r.palette.gray[400],iconSize:"lg",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:i.close,px:.25,py:.25,variant:"ghost"})]}),n.jsx(re,{mb:0,mt:0}),n.jsxs($,{display:"flex",gap:1.25,onScroll:g,px:1.25,ref:a,scroll:"y",width:"100%",children:[n.jsx(pn,{columns:i.columns,formId:"columns-visibility",onChangeHandler:d,variant:o}),n.jsx($,{borderLeft:`2px solid ${r.palette.gray[100]}`,height:l?`${l}px`:"auto"}),n.jsx(ln,{description:"Click and drag to reorder the columns",items:i.columns,onClickClose:p,onReorder:i.setColumns,title:"Reorder columns"})]}),n.jsx(re,{mb:0,mt:0}),n.jsxs($,{display:"flex",justify:"space-between",px:1.25,py:1.25,children:[n.jsx(P,{disabled:!i.hasChanged,form:"columns-visibility",id:"columns-modal-cancel",justify:"center",onClick:i.resetToDefault,type:"reset",variant:"tertiary",children:"Reset to default"}),n.jsx(P,{id:"columns-modal-submit",justify:"center",onClick:i.close,variant:"primary",children:"Save"})]})]})}),document.getElementById(e)??document.body):n.jsx("div",{})},xr=c.st(ze)`
2023
+ `,ae=({name:e,smallSearch:t=!1,onClear:i,onChange:o,value:r,...a})=>{const l=x.useRef(null),s=c.Je(),[d,p]=x.useState(!1),[g,u]=x.useState(r??""),{refs:f,floatingStyles:h}=c.useFloating$1(),y=x.useCallback(()=>{p(k=>!k)},[]),m=x.useCallback(k=>{k.key==="Enter"&&k.preventDefault()},[]),b=x.useCallback(k=>{u(k.target.value),o==null||o(k)},[o]),j=x.useCallback(()=>{u(""),i==null||i()},[i]);Q(f.floating.current,()=>{p(!1)},!0);const w=n.jsxs(gr,{children:[n.jsx(R,{icon:"magnifying-glass",iconColor:s.palette.gray[700],iconSize:"lg",iconType:"fa-light"}),n.jsx(pr,{id:e,name:e,onChange:b,onKeyDown:m,ref:l,type:"search",value:g,...a}),!c.lodashExports.isEmpty(g)&&n.jsx(M,{icon:"xmark",iconColor:s.palette.gray[300],iconSize:"lg",iconType:"fa-light",onClick:j,px:.25,py:.25,type:"reset",variant:"ghost"})]});return t?n.jsxs(x.Fragment,{children:[n.jsx(M,{border:`1px solid ${s.palette.gray[300]} !important`,icon:"magnifying-glass",iconSize:"lg",iconType:"fa-light",onClick:y,ref:f.setReference,variant:"ghost"}),d?n.jsx(ur,{ref:f.setFloating,style:h,children:w}):void 0]}):w},pn=({columns:e,formId:t,onChangeHandler:i,variant:o})=>{const r=x.useRef(null),[a,l]=x.useState([]),[s,d]=x.useState(""),p=x.useCallback(u=>{const{value:f}=u.target;d(f)},[]),g=x.useCallback(()=>{r.current&&(r.current.reset(),d(""))},[r]);return x.useEffect(()=>{l(e.filter(u=>{var f;return o==="grouped"?u.name.toLowerCase().includes(s.toLowerCase())||((f=u.group)==null?void 0:f.includes(s.toLowerCase())):u.name.toLowerCase().includes(s.toLowerCase())}))},[e,s,o]),o==="grouped"?n.jsxs($,{display:"flex",flexDirection:"column",gap:.625,height:"100%",id:"columns-buttons",py:1.25,width:"55%",children:[n.jsx("form",{id:"search-form",ref:r,children:n.jsx(ae,{name:"search",onChange:p,onClear:g,value:s})}),n.jsx("form",{"data-testid":t,id:t,onReset:g,style:{display:"flex",flexDirection:"column",gap:"0.625rem"},children:Object.entries(dn(a)).map(([u,f],h)=>{const y=`li-checkbox${u}`;return n.jsx(cn,{checkboxesName:u,defaultCollapsed:h===0,onChange:i,options:f,title:u},y)})})]}):n.jsxs($,{height:"100%",id:"columns-buttons",py:1.25,width:"55%",children:[n.jsx("form",{id:"search-form",ref:r,children:n.jsx(ae,{name:"search",onChange:p,onClear:g,value:s})}),n.jsx("form",{"data-testid":t,id:t,onReset:g,style:{paddingTop:"0.625rem"},children:a.map(u=>{const f=`li-checkbox-${u.name}`;return n.jsx(dr,{selected:u.visible,value:f,width:"content",children:n.jsx(oe,{checked:u.visible,disabled:u.locked,label:u.name,name:u.name,onChange:i,value:u.name})},f)})})]})},gn=({_containerId:e="portals",title:t,modalRef:i,variant:o})=>{const r=c.Je(),a=x.useRef(null),[l,s]=x.useState(void 0),d=x.useCallback(u=>{const{checked:f,value:h}=u.target,y=i.columns.map(m=>{var b;return m.name===h?((b=m.toggleVisibility)==null||b.call(m,f),{...m,visible:f}):m});i.setColumns(y)},[i]),p=x.useCallback(u=>{const f=i.columns.map(h=>{var y;return h.id===u?((y=h.toggleVisibility)==null||y.call(h,!1),{...h,visible:!1}):h});i.setColumns(f)},[i]),g=x.useCallback(()=>{var f;const u=(f=a.current)==null?void 0:f.scrollHeight;l!==u&&s(u)},[l]);return i.isOpen?se.createPortal(n.jsx(en,{"aria-label":i.name,"aria-modal":"true",children:n.jsxs(st,{$size:"md",flexDirection:"column",children:[n.jsxs($,{display:"flex",justify:"space-between",px:1.25,py:1.25,children:[n.jsx(q,{size:"sm",children:t}),n.jsx(M,{icon:"close",iconColor:r.palette.gray[400],iconSize:"lg",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:i.close,px:.25,py:.25,variant:"ghost"})]}),n.jsx(re,{mb:0,mt:0}),n.jsxs($,{display:"flex",gap:1.25,onScroll:g,px:1.25,ref:a,scroll:"y",width:"100%",children:[n.jsx(pn,{columns:i.columns,formId:"columns-visibility",onChangeHandler:d,variant:o}),n.jsx($,{borderLeft:`2px solid ${r.palette.gray[100]}`,height:l?`${l}px`:"auto"}),n.jsx(ln,{description:"Click and drag to reorder the columns",items:i.columns,onClickClose:p,onReorder:i.setColumns,title:"Reorder columns"})]}),n.jsx(re,{mb:0,mt:0}),n.jsxs($,{display:"flex",justify:"space-between",px:1.25,py:1.25,children:[n.jsx(P,{disabled:!i.hasChanged,form:"columns-visibility",id:"columns-modal-cancel",justify:"center",onClick:i.resetToDefault,type:"reset",variant:"tertiary",children:"Reset to default"}),n.jsx(P,{id:"columns-modal-submit",justify:"center",onClick:i.close,variant:"primary",children:"Save"})]})]})}),document.getElementById(e)??document.body):n.jsx("div",{})},xr=c.st(ze)`
2014
2024
  padding: 8px;
2015
2025
  min-height: 36px;
2016
2026
  min-width: unset;
@@ -2027,7 +2037,7 @@ ${y[8]}...`:(y.length<8&&p(!1),t)},[l,t,e]),f=x.useMemo(u,[u]),h=x.useCallback(a
2027
2037
  svg.fa-check {
2028
2038
  border-radius: 2px;
2029
2039
  }
2030
- `,un=({control:e,option:t,register:i,setValue:o})=>{var r,a,l,s,d;switch(t.type){case"checkboxes":return n.jsx("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:(r=t.options)==null?void 0:r.map(g=>n.jsx(vt,{value:g.value,width:"content",children:n.jsx(oe,{...i("checkbox"),label:g.label,value:g.value})},`li-checkbox-${g.value}`))});case"radioButton":return n.jsxs("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:[t.label,(a=t.options)==null?void 0:a.map(g=>n.jsx(vt,{value:g.value,width:"content",children:n.jsx(at,{...i("radio"),label:g.label,value:g.value})},`li-radio-${g.value}`))]});case"select":return n.jsx(it,{control:e,items:((l=t.options)==null?void 0:l.map(g=>({name:g.label??"",value:g.value})))??[],label:t.label,name:`text.${String(t.key)}-${t.filterFn??"caseInsensitive"}`,placeholder:t.placeholder,value:t.value});case"text":const p=`text.${String(t.key)}-${t.filterFn??"caseInsensitive"}`;return n.jsx(Le,{label:t.label,name:p,placeholder:t.placeholder,register:i,value:t.value});case"numberRange":return n.jsx(Gt,{label:t.label,name:String(t.key),propsMax:{placeholder:t.placeholder?`${t.placeholder} Max`:"Max",register:i,name:"maxValue",value:t.maxValue,setValue:o},propsMin:{placeholder:t.placeholder?`${t.placeholder} Min`:"Min",register:i,name:"minValue",value:t.minValue,setValue:o},variant:"filters"});case"dateRange":return n.jsx(_t,{label:t.label,name:String(t.key),propsMax:{name:"maxValue",value:(s=t.maxValue)==null?void 0:s.toString()},propsMin:{name:"minValue",value:(d=t.minValue)==null?void 0:d.toString()},register:i,setValue:o,variant:"filters"});default:return n.jsx("div",{})}},xn=({control:e,items:t,register:i,setValue:o})=>n.jsx(n.Fragment,{children:t.map((r,a)=>{const l=`${r.type}-${r.value}-${r.filterFn??"default"}`;return n.jsxs("div",{children:[n.jsx(un,{control:e,option:r,register:i,setValue:o}),a<t.length-1&&n.jsx("hr",{style:{margin:"1.25rem 0 0.625rem"}})]},l)})}),fn=e=>{var s,d,p,g,u;const[t,i]=x.useState([...e]),{control:o,register:r,handleSubmit:a,setValue:l}=c.useForm({defaultValues:{checkbox:e.filter(f=>f.type==="checkboxes").flatMap(f=>{var h;return((h=f.options)==null?void 0:h.filter(y=>y.checked).map(y=>y.value))??[]}),radio:((p=(d=(s=e.find(f=>f.type==="radioButton"))==null?void 0:s.options)==null?void 0:d.find(({checked:f})=>f))==null?void 0:p.value)??"",text:e.filter(f=>["text","select"].includes(f.type)).reduce((f,h)=>({...f,[`${String(h.key)}-${h.filterFn??"caseInsensitive"}`]:h.value??""}),{}),minValue:(g=e.find(f=>["numberRange","dateRange"].includes(f.type)))==null?void 0:g.minValue,maxValue:(u=e.find(f=>["numberRange","dateRange"].includes(f.type)))==null?void 0:u.maxValue}});return{control:o,items:t,setItems:i,register:r,handleSubmit:a,setValue:l}},hr=(e,t)=>{var i,o,r,a,l;t("checkbox",e.filter(s=>s.type==="checkboxes").flatMap(s=>{var d;return((d=s.options)==null?void 0:d.filter(p=>p.checked).map(p=>p.value))??[]})),t("radio",((r=(o=(i=e.find(s=>s.type==="radioButton"))==null?void 0:i.options)==null?void 0:o.find(({checked:s})=>s))==null?void 0:r.value)??""),t("text",e.filter(s=>["text","select"].includes(s.type)).reduce((s,d)=>({...s,[`${String(d.key)}-${d.filterFn??"caseInsensitive"}`]:d.value??""}),{})),t("minValue",(a=e.find(s=>["numberRange","dateRange"].includes(s.type)))==null?void 0:a.minValue),t("maxValue",(l=e.find(s=>["numberRange","dateRange"].includes(s.type)))==null?void 0:l.maxValue)},yr=(e,t)=>(e==null?void 0:e.filter(i=>{var o;return((o=i.label)==null?void 0:o.toLowerCase().includes((t==null?void 0:t.toLowerCase())??""))??i.value.toLowerCase().includes((t==null?void 0:t.toLowerCase())??"")}))??[],br=async(e,t)=>await Promise.all(e.map(async i=>{if(i.type==="checkboxes"){const r=(i.filterOptions?await i.filterOptions(i.options??[],t):yr(i.options??[],t)).filter((a,l,s)=>s.findIndex(d=>d.value===a.value)===l);return{...i,options:r}}return i})),Ke=({options:e,onSearch:t,onSubmit:i,id:o,selectedFilter:r})=>{const{control:a,items:l,setItems:s,register:d,handleSubmit:p,setValue:g}=fn(e),u=e.some(y=>y.type==="checkboxes"&&y.hideSearch!==!0),f=x.useCallback(async y=>{const{value:m}=y.target;t&&t(m);const b=await br(e,m);s(b)},[e,t,s]),h=x.useCallback(y=>{i&&i(y)},[i]);return x.useEffect(()=>{s(e),hr(e,g)},[e,s,g]),n.jsxs("div",{className:"flex flex-col gap-[8px]",id:o,style:{writingMode:"horizontal-tb",maxWidth:"300px",width:"100%"},children:[u&&n.jsxs("div",{children:[r,n.jsx(ae,{onChange:f})]}),n.jsxs("form",{id:o,onSubmit:p(h),children:[n.jsx(xn,{control:a,items:l,register:d,setValue:g}),n.jsx(P,{mt:1,type:"submit",children:"Apply"})]})]})},hn=({options:e,variant:t,onApplyFilters:i,onSearch:o,setDirection:r,setHandler:a})=>{const l=c.Je(),[s,d]=x.useState(e),[p,g]=x.useState([]),[u,f]=x.useState({}),[h,y]=x.useState(""),m=x.useCallback(w=>()=>{const v=s.find(S=>S.label===w),j=!(v!=null&&v.filterOptions.some(S=>S.type==="dateRange"||S.type==="select"));a==null||a(j??!0),y(w),g((v==null?void 0:v.filterOptions)??[])},[s,a]),b=x.useCallback(w=>{const v=[...w.checkbox,...Object.values(w.text??{}),...w.radio?[w.radio]:[],...w.minValue?[String(w.minValue)]:[],...w.maxValue?[String(w.maxValue)]:[]];f(C=>v.length>0?{...C,[h]:v}:C);const j=C=>{var F,T;return{...C,options:(F=C.options)==null?void 0:F.map(A=>({...A,checked:w.checkbox.includes(A.value)||w.radio===A.value})),value:["text","select"].includes(C.type)?((T=w.text)==null?void 0:T[`${String(C.key)}-${C.filterFn??"caseInsensitive"}`])??C.value:C.value,minValue:["numberRange","dateRange"].includes(C.type)?w.minValue:C.minValue,maxValue:["numberRange","dateRange"].includes(C.type)?w.maxValue:C.maxValue}},S=C=>C.label===h?{...C,filterOptions:C.filterOptions.map(j)}:C,E=s.map(S);d(C=>C.map(S));const z=E.flatMap(({filterOptions:C})=>C);i(z),g([])},[s,i,h]),k=x.useCallback((w,v)=>{const j=`li-filter-option-${w}`;return n.jsxs(xr,{icon:v,onClick:m(w),style:{minWidth:"180px",writingMode:"horizontal-tb"},value:j,width:"100%",children:[w,u[w]===void 0?void 0:n.jsx(U,{tagLabel:u[w].length.toString()})]},j)},[u,m]);return x.useEffect(()=>{const w=e.reduce((v,{label:j,filterOptions:S})=>{const E=S.flatMap(({value:F,minValue:T,maxValue:A})=>[T,A,F]).filter(Boolean),z=S.flatMap(({options:F})=>F??[]).filter(({checked:F=!1})=>F).map(({value:F})=>F),C=[...E,...z];return C.length===0?v:{...v,[j]:C}},{});f(w),p.length>0&&r&&r("column")},[p,e,r]),t==="grouped"?n.jsx($,{display:"flex",flexDirection:"row",maxHeight:p.length>0?"unset":"360px",style:{rowGap:"10px",writingMode:"vertical-lr"},wrap:"wrap",children:p.length>0?n.jsx(Ke,{id:"filters-options",onSearch:o,onSubmit:b,options:p,selectedFilter:h}):Object.entries(dn(e)).map(([w,v])=>n.jsxs($,{style:{writingMode:"horizontal-tb"},children:[n.jsx(I,{color:l.palette.gray[400],mb:.25,size:"sm",children:w}),v.map(({label:j,icon:S="filter-list"})=>k(j,S))]},w))}):n.jsx($,{display:"flex",flexDirection:"row",maxHeight:p.length>0?"unset":"200px",style:{rowGap:"10px",writingMode:"vertical-lr"},wrap:"wrap",children:p.length>0?n.jsx(Ke,{id:"filters-options",onSearch:o,onSubmit:b,options:p,selectedFilter:h}):e.map(({label:w,icon:v="filter-list"})=>k(w,v))})},yn=({options:e,onApplyFilters:t,onSearch:i,modalRef:o,variant:r})=>{const[a,l]=x.useState("row"),[s,d]=x.useState(!0),p=c.Je(),g=x.useRef(null),u=n.jsx(M,{icon:"close",iconColor:p.palette.gray[400],iconSize:"lg",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:o.close,px:.25,py:.25,variant:"ghost"});return x.useEffect(()=>{const f=h=>{const y=g.current;y&&!y.contains(h.target)&&o.close()};if(s)return document.addEventListener("mousedown",f,!0),()=>{document.removeEventListener("mousedown",f,!0)}},[g,s,o]),n.jsx(fr,{$bgColor:"transparent","aria-label":o.name,children:n.jsxs(st,{$size:"fixed",alignItems:a==="row"?"start":"end",display:"flex",flexDirection:a,gap:.5,id:"filters-list",justify:"space-between",position:"relative",px:1.25,py:1.25,ref:g,style:{maxWidth:"620px",overflow:"hidden",width:"fit-content"},children:[a==="column"?u:void 0,n.jsx(hn,{onApplyFilters:t,onSearch:i,options:e,setDirection:l,setHandler:d,variant:r}),a==="row"?u:void 0]})})};function $r(e){if(e)return e}function bn(e){if(!e||e.length===0)return;const t=e.filter(o=>o.checked).map(o=>o.label??o.value);return t.length===0?void 0:t.join(", ")}function mr(e,t,i){const o=i??"",r=c._.isEmpty(e)&&typeof e!="number"||Number.isNaN(e)?void 0:Number(e),a=c._.isEmpty(t)&&typeof t!="number"||Number.isNaN(t)?void 0:Number(String(t));if(!c._.isUndefined(r)&&!c._.isUndefined(a))return`${r}${o} - ${a}${o}`;if(!c._.isUndefined(r))return`Min ${r}${o}`;if(!c._.isUndefined(a))return`Max ${a}${o}`}function wr(e,t){if(c.dayjs_minExports.extend(c.localizedFormat),!(c._.isUndefined(e)&&c._.isUndefined(t))){if(e!==""&&t!==""&&!c._.isUndefined(e)&&!c._.isUndefined(t))return`${c.dayjs(e).format("LL")} - ${c.dayjs(t).format("LL")}`;if(e!==""&&!c._.isUndefined(e))return`From ${c.dayjs(e).format("LL")}`;if(t!==""&&!c._.isUndefined(t))return`To ${c.dayjs(t).format("LL")}`}}function vr(e,t,i){return e==="select"?t:`${t} ${i==="includesInsensitive"?"contains":"is"}`}const pe=({filter:e,icon:t="filter-list",label:i,onClose:o,filterValue:r})=>c._.isNil(r)||c._.isEmpty(String(r))?null:n.jsx(U,{filterValues:r,icon:t,id:"remove-filter",onClose:o(e),tagLabel:`${i} `}),jr=({options:e,onClose:t})=>{const i=e.flatMap(o=>o.filterOptions.map(r=>{const{filterFn:a,label:l,type:s,value:d,options:p,minValue:g,maxValue:u}=r;switch(s){case"numberRange":{const f=mr(g,u,o.placeholder);return n.jsx(pe,{filter:r,filterValue:f,icon:o.icon,label:o.label,onClose:t},l)}case"dateRange":{const f=wr(g==null?void 0:g.toString(),u==null?void 0:u.toString());return n.jsx(pe,{filter:r,filterValue:f,icon:o.icon,label:o.label,onClose:t},l)}case"radioButton":case"checkboxes":{const f=bn(p);return n.jsx(pe,{filter:r,filterValue:f,icon:o.icon,label:o.label,onClose:t},l)}case void 0:case"select":case"text":default:{const f=$r(d),h=vr(s,o.label,a);return n.jsx(pe,{filter:r,filterValue:f,icon:o.icon,label:h,onClose:t},l)}}})).filter(o=>{if(o===null)return!1;const{filterValue:r}=o.props;return!c._.isNil(r)&&!c._.isEmpty(String(r))});return i.length>0?n.jsx($,{alignItems:"center",display:"flex",gap:.5,pb:1,width:"100%",wrap:"wrap",children:i}):null},kr=e=>e.map(t=>{const i={key:String(t.key),type:t.type},o=(()=>{let r={...i};if(t.filterFn&&(r={...r,filterFn:t.filterFn}),t.value&&(r={...r,value:t.value}),t.minValue!==void 0&&t.minValue!==null&&(r={...r,minValue:t.minValue}),t.maxValue!==void 0&&t.maxValue!==null&&(r={...r,maxValue:t.maxValue}),t.options&&t.options.length>0){const a=t.options.filter(l=>l.checked).map(l=>l.value);a.length>0&&(r={...r,selectedValues:a})}return r})();return Object.keys(o).length>2?o:null}).filter(Boolean),Cr=(e,t)=>t.map(i=>{const o=e.find(a=>a.key===String(i.key)&&a.type===i.type);return o?(()=>{let a={...i};return o.filterFn&&(a={...a,filterFn:o.filterFn}),o.value!==void 0&&o.value!==null&&(a={...a,value:o.value}),o.minValue!==void 0&&o.minValue!==null&&(a={...a,minValue:o.minValue}),o.maxValue!==void 0&&o.maxValue!==null&&(a={...a,maxValue:o.maxValue}),o.selectedValues&&i.options&&(a={...a,options:i.options.map(l=>{var s;return{...l,checked:((s=o.selectedValues)==null?void 0:s.includes(l.value))??!1}})}),a})():i}),Be=(e,t)=>{const i=kr(e);t(JSON.stringify(i))},Sr=(e,t)=>{const i=e();if(!i)return t;try{const o=JSON.parse(i);return Cr(o,t)}catch{return t}},zr=(e,t)=>{function i(l,s){if(s.value===""||s.value===void 0||c._.defaultTo(s.isBackFilter,!1))return!0;switch(s.filterFn){case"includesInsensitive":return String(l[s.key]).toLowerCase().includes(s.value.toLowerCase());case"caseInsensitive":case void 0:default:return String(l[s.key]).toLowerCase()===s.value.toLowerCase()}}function o(l,s){if(!s.options||s.options.length===0)return!0;const d=s.options.filter(p=>p.checked).map(p=>p.value);return d.length===0?!0:d.includes(String(l[s.key]))}function r(l,s,d){const p=d(String(l[s.key])),{minValue:g,maxValue:u}=s,f=c._.isEmpty(g)&&typeof g!="number"?void 0:d(String(g)),h=c._.isEmpty(u)&&typeof u!="number"?void 0:d(String(u));return c._.isUndefined(f)&&c._.isUndefined(h)?!0:(f??-1/0)<=p&&p<=(h??1/0)}function a(l){return t.every(s=>{if(typeof s.key=="function")return s.key(l,s.value);switch(s.type){case"radioButton":case"checkboxes":return o(l,s);case"numberRange":return r(l,s,Number);case"dateRange":return r(l,s,d=>new Date(d));case"select":case"text":default:return i(l,s)}})}return e.filter(a)},Ir=e=>[...e.flatMap(({options:i})=>i).filter(i=>i==null?void 0:i.checked),...e.flatMap(i=>[i.value,i.maxValue,i.minValue]).filter(Boolean)].length,Tr=e=>{var i;const t=((i=e.options)==null?void 0:i.map(o=>({...o,checked:void 0})))??void 0;return{...e,minValue:void 0,maxValue:void 0,value:void 0,options:t}},Er=({dataset:e,setValues:t,getValues:i,options:o,setFilteredDataset:r,onFiltersChange:a,onReset:l,onSearch:s,variant:d="ungrouped"})=>{const p=Se("filters-modal"),[g,u]=x.useState(!1),[f,h]=x.useState([]),y=Ir(f),m=o.map(j=>({...j,filterOptions:j.filterOptions.map(S=>f.find(z=>z.key===S.key&&z.type===S.type&&z.filterFn===S.filterFn)??{...S})})),b=x.useCallback(j=>{h([...j]),Be(j,t)},[h,t]),k=x.useCallback(()=>{l&&l(),p.isOpen||u(!0),p.toggle()},[p,l]),w=x.useCallback(j=>()=>{l&&l();const S=f.map(E=>E.key===j.key&&E.type===j.type&&E.filterFn===j.filterFn?Tr(E):E);h(S),Be(S,t)},[f,l,t]);return x.useEffect(()=>{const j=o.flatMap(z=>z.filterOptions),S=i();if((()=>{if(!S)return!1;try{const z=JSON.parse(S);return Array.isArray(z)&&z.length>0}catch{return!1}})()){const z=Sr(i,j);h(z)}else j.flatMap(C=>C.value).filter(Boolean).length>0||j.flatMap(C=>C.options).filter(C=>(C==null?void 0:C.checked)===!0).length>0?(h(j),g&&Be(j,t)):h(j)},[o,h,t,i,g]),x.useEffect(()=>{r&&e!==void 0&&r(zr(e,f)),a==null||a(f)},[e,f,r,a]),{Filters:()=>n.jsxs($,{alignItems:"center",display:"flex",gap:.25,maxWidth:"100%",position:"relative",wrap:"wrap",children:[n.jsx($,{pr:.25,children:n.jsx(P,{icon:"filter",id:"filter-btn",onClick:k,tag:y.toString(),variant:"ghost"})}),p.isOpen&&n.jsx(yn,{modalRef:p,onApplyFilters:b,onSearch:s,options:m,variant:d})]}),options:m,removeFilter:w}},ct=({_portal:e=!0,alert:t,cancelButton:i=void 0,children:o=void 0,confirmButton:r=void 0,content:a=void 0,description:l=void 0,modalRef:s,otherActions:d=void 0,onClose:p=void 0,tabItems:g=void 0,title:u=void 0,size:f,id:h="modal-container"})=>{const y=c.Je(),[m,b]=x.useState(void 0),k=x.useRef(null),w=x.useRef(!1),v=Array.isArray(g)&&g.length>0,j=i??r;x.useEffect(()=>{if(v&&!w.current&&k.current){const E=k.current.getBoundingClientRect().height;E>50&&(b(E),w.current=!0)}s.isOpen||(b(void 0),w.current=!1)},[v,s.isOpen]);const S=n.jsx(en,{"aria-label":s.name,"aria-modal":"true",id:"modal-wrapper",children:n.jsxs(st,{$size:f,"data-testid":h,flexDirection:"column",id:h,ref:v?k:void 0,style:v&&m?{height:m}:void 0,children:[!c._.isEmpty(u)&&!c._.isNil(u)&&n.jsx(nn,{description:l,modalRef:s,onClose:p,otherActions:d,title:u}),g&&n.jsx($,{borderTop:`1px solid ${y.palette.gray[300]}`,display:"block",mb:1.25,position:"sticky",children:n.jsx(lt,{items:g})}),(c._.isObject(a)||o)&&n.jsxs(Qo,{style:j?{borderBottom:`1px solid ${y.palette.gray[200]}`}:void 0,children:[o,c._.isObject(a)&&c._.isString(a.imageSrc)&&n.jsx(ir,{$framed:a.imageFramed,children:n.jsx(te,{alt:"modal-img",publicId:a.imageSrc})}),c._.isObject(a)&&c._.isString(a.imageText)&&n.jsx(I,{size:"sm",children:a.imageText})]}),n.jsx(tn,{alert:t,cancelButton:i,confirmButton:r,modalRef:s})]})});return e&&s.isOpen?se.createPortal(S,document.getElementById("portals")??document.body):s.isOpen?S:null},Rr=(e,t,i)=>{const o=Se("confirm-dialog-modal"),r=x.useRef(null),a=x.useCallback(async()=>(o.open(),new Promise(p=>{r.current=p})),[o]),l=x.useCallback(()=>{var p;o.close(),(p=r.current)==null||p.call(r,!0)},[o]),s=x.useCallback(()=>{var p;o.close(),(p=r.current)==null||p.call(r,!1)},[o]);return[a,({children:p})=>{const[g,u]=x.useState(i),f=x.useCallback(()=>{u({...i})},[]),h=x.useCallback(b=>()=>{u(k=>({...k,[b]:{...k[b],state:!k[b].state}}))},[]),y=!Object.values(g).every(({state:b})=>b),m=Object.entries(g).map(([b,{state:k,label:w}])=>n.jsx(oe,{defaultChecked:k,label:w,name:b,onChange:h(b)},b));return n.jsxs(ct,{"data-testid":e,id:e,modalRef:{...o,close:s},onClose:f,size:"sm",title:t,children:[p,n.jsx($,{display:"flex",flexDirection:"column",gap:.5,children:m}),n.jsx(on,{disabled:y,id:e,onConfirm:l})]})}]},Dr=()=>{const[e,t]=x.useState(!1),[i,o]=x.useState(),r=x.useRef(null),a=Se("confirm-dialog-modal"),l=x.useCallback(async g=>(o(g),t(!0),new Promise(u=>{r.current=u})),[]),s=x.useCallback(()=>{var g;t(!1),o(void 0),(g=r.current)==null||g.call(r,!0)},[]),d=x.useCallback(()=>{var g;t(!1),o(void 0),(g=r.current)==null||g.call(r,!1)},[]);return x.useEffect(()=>{a.setIsOpen(e)},[e,a]),{ConfirmDialog:({id:g="confirm-dialog-modal",children:u})=>n.jsxs(ct,{cancelButton:{onClick:d,text:"Cancel"},confirmButton:{id:(i==null?void 0:i.id)??"modal-confirm",onClick:s,text:"Confirm"},description:i==null?void 0:i.message,id:g,modalRef:{...a,close:d},size:"sm",title:i==null?void 0:i.title,children:[i==null?void 0:i.content,u]}),confirm:l}},Nr=2e3,Fr=({content:e})=>{const[t,i]=x.useState("Copy"),o=x.useCallback(()=>{navigator.clipboard.writeText(e).then(()=>{i("Copied"),setTimeout(()=>{i("Copy")},Nr)}).catch(()=>{i("Failed to copy")})},[e]);return n.jsx(M,{icon:"copy",iconSize:"lg",iconType:"fa-light",onClick:o,tooltip:t,variant:"ghost"})},Ar=c.st.ul`
2040
+ `,un=({control:e,option:t,register:i,setValue:o})=>{var r,a,l,s,d;switch(t.type){case"checkboxes":return n.jsx("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:(r=t.options)==null?void 0:r.map(g=>n.jsx(vt,{value:g.value,width:"content",children:n.jsx(oe,{...i("checkbox"),label:g.label,value:g.value})},`li-checkbox-${g.value}`))});case"radioButton":return n.jsxs("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:[t.label,(a=t.options)==null?void 0:a.map(g=>n.jsx(vt,{value:g.value,width:"content",children:n.jsx(at,{...i("radio"),label:g.label,value:g.value})},`li-radio-${g.value}`))]});case"select":return n.jsx(it,{control:e,items:((l=t.options)==null?void 0:l.map(g=>({name:g.label??"",value:g.value})))??[],label:t.label,name:`text.${String(t.key)}-${t.filterFn??"caseInsensitive"}`,placeholder:t.placeholder,value:t.value});case"text":const p=`text.${String(t.key)}-${t.filterFn??"caseInsensitive"}`;return n.jsx(Le,{label:t.label,name:p,placeholder:t.placeholder,register:i,value:t.value});case"numberRange":return n.jsx(Gt,{label:t.label,name:String(t.key),propsMax:{placeholder:t.placeholder?`${t.placeholder} Max`:"Max",register:i,name:"maxValue",value:t.maxValue,setValue:o},propsMin:{placeholder:t.placeholder?`${t.placeholder} Min`:"Min",register:i,name:"minValue",value:t.minValue,setValue:o},variant:"filters"});case"dateRange":return n.jsx(_t,{label:t.label,name:String(t.key),propsMax:{name:"maxValue",value:(s=t.maxValue)==null?void 0:s.toString()},propsMin:{name:"minValue",value:(d=t.minValue)==null?void 0:d.toString()},register:i,setValue:o,variant:"filters"});default:return n.jsx("div",{})}},xn=({control:e,items:t,register:i,setValue:o})=>n.jsx(n.Fragment,{children:t.map((r,a)=>{const l=`${r.type}-${r.value}-${r.filterFn??"default"}`;return n.jsxs("div",{children:[n.jsx(un,{control:e,option:r,register:i,setValue:o}),a<t.length-1&&n.jsx("hr",{style:{margin:"1.25rem 0 0.625rem"}})]},l)})}),fn=e=>{var s,d,p,g,u;const[t,i]=x.useState([...e]),{control:o,register:r,handleSubmit:a,setValue:l}=c.useForm({defaultValues:{checkbox:e.filter(f=>f.type==="checkboxes").flatMap(f=>{var h;return((h=f.options)==null?void 0:h.filter(y=>y.checked).map(y=>y.value))??[]}),radio:((p=(d=(s=e.find(f=>f.type==="radioButton"))==null?void 0:s.options)==null?void 0:d.find(({checked:f})=>f))==null?void 0:p.value)??"",text:e.filter(f=>["text","select"].includes(f.type)).reduce((f,h)=>({...f,[`${String(h.key)}-${h.filterFn??"caseInsensitive"}`]:h.value??""}),{}),minValue:(g=e.find(f=>["numberRange","dateRange"].includes(f.type)))==null?void 0:g.minValue,maxValue:(u=e.find(f=>["numberRange","dateRange"].includes(f.type)))==null?void 0:u.maxValue}});return{control:o,items:t,setItems:i,register:r,handleSubmit:a,setValue:l}},hr=(e,t)=>{var i,o,r,a,l;t("checkbox",e.filter(s=>s.type==="checkboxes").flatMap(s=>{var d;return((d=s.options)==null?void 0:d.filter(p=>p.checked).map(p=>p.value))??[]})),t("radio",((r=(o=(i=e.find(s=>s.type==="radioButton"))==null?void 0:i.options)==null?void 0:o.find(({checked:s})=>s))==null?void 0:r.value)??""),t("text",e.filter(s=>["text","select"].includes(s.type)).reduce((s,d)=>({...s,[`${String(d.key)}-${d.filterFn??"caseInsensitive"}`]:d.value??""}),{})),t("minValue",(a=e.find(s=>["numberRange","dateRange"].includes(s.type)))==null?void 0:a.minValue),t("maxValue",(l=e.find(s=>["numberRange","dateRange"].includes(s.type)))==null?void 0:l.maxValue)},yr=(e,t)=>(e==null?void 0:e.filter(i=>{var o;return((o=i.label)==null?void 0:o.toLowerCase().includes((t==null?void 0:t.toLowerCase())??""))??i.value.toLowerCase().includes((t==null?void 0:t.toLowerCase())??"")}))??[],br=async(e,t)=>await Promise.all(e.map(async i=>{if(i.type==="checkboxes"){const r=(i.filterOptions?await i.filterOptions(i.options??[],t):yr(i.options??[],t)).filter((a,l,s)=>s.findIndex(d=>d.value===a.value)===l);return{...i,options:r}}return i})),Ke=({options:e,onSearch:t,onSubmit:i,id:o,selectedFilter:r})=>{const{control:a,items:l,setItems:s,register:d,handleSubmit:p,setValue:g}=fn(e),u=e.some(y=>y.type==="checkboxes"&&y.hideSearch!==!0),f=x.useCallback(async y=>{const{value:m}=y.target;t&&t(m);const b=await br(e,m);s(b)},[e,t,s]),h=x.useCallback(y=>{i&&i(y)},[i]);return x.useEffect(()=>{s(e),hr(e,g)},[e,s,g]),n.jsxs("div",{className:"flex flex-col gap-[8px]",id:o,style:{writingMode:"horizontal-tb",maxWidth:"300px",width:"100%"},children:[u&&n.jsxs("div",{children:[r,n.jsx(ae,{onChange:f})]}),n.jsxs("form",{id:o,onSubmit:p(h),children:[n.jsx(xn,{control:a,items:l,register:d,setValue:g}),n.jsx(P,{mt:1,type:"submit",children:"Apply"})]})]})},hn=({options:e,variant:t,onApplyFilters:i,onSearch:o,setDirection:r,setHandler:a})=>{const l=c.Je(),[s,d]=x.useState(e),[p,g]=x.useState([]),[u,f]=x.useState({}),[h,y]=x.useState(""),m=x.useCallback(w=>()=>{const k=s.find(S=>S.label===w),v=!(k!=null&&k.filterOptions.some(S=>S.type==="dateRange"||S.type==="select"));a==null||a(v??!0),y(w),g((k==null?void 0:k.filterOptions)??[])},[s,a]),b=x.useCallback(w=>{const k=[...w.checkbox,...Object.values(w.text??{}),...w.radio?[w.radio]:[],...w.minValue?[String(w.minValue)]:[],...w.maxValue?[String(w.maxValue)]:[]];f(C=>k.length>0?{...C,[h]:k}:C);const v=C=>{var F,E;return{...C,options:(F=C.options)==null?void 0:F.map(A=>({...A,checked:w.checkbox.includes(A.value)||w.radio===A.value})),value:["text","select"].includes(C.type)?((E=w.text)==null?void 0:E[`${String(C.key)}-${C.filterFn??"caseInsensitive"}`])??C.value:C.value,minValue:["numberRange","dateRange"].includes(C.type)?w.minValue:C.minValue,maxValue:["numberRange","dateRange"].includes(C.type)?w.maxValue:C.maxValue}},S=C=>C.label===h?{...C,filterOptions:C.filterOptions.map(v)}:C,T=s.map(S);d(C=>C.map(S));const z=T.flatMap(({filterOptions:C})=>C);i(z),g([])},[s,i,h]),j=x.useCallback((w,k)=>{const v=`li-filter-option-${w}`;return n.jsxs(xr,{icon:k,onClick:m(w),style:{minWidth:"180px",writingMode:"horizontal-tb"},value:v,width:"100%",children:[w,u[w]===void 0?void 0:n.jsx(U,{tagLabel:u[w].length.toString()})]},v)},[u,m]);return x.useEffect(()=>{const w=e.reduce((k,{label:v,filterOptions:S})=>{const T=S.flatMap(({value:F,minValue:E,maxValue:A})=>[E,A,F]).filter(Boolean),z=S.flatMap(({options:F})=>F??[]).filter(({checked:F=!1})=>F).map(({value:F})=>F),C=[...T,...z];return C.length===0?k:{...k,[v]:C}},{});f(w),p.length>0&&r&&r("column")},[p,e,r]),t==="grouped"?n.jsx($,{display:"flex",flexDirection:"row",maxHeight:p.length>0?"unset":"360px",style:{rowGap:"10px",writingMode:"vertical-lr"},wrap:"wrap",children:p.length>0?n.jsx(Ke,{id:"filters-options",onSearch:o,onSubmit:b,options:p,selectedFilter:h}):Object.entries(dn(e)).map(([w,k])=>n.jsxs($,{style:{writingMode:"horizontal-tb"},children:[n.jsx(I,{color:l.palette.gray[400],mb:.25,size:"sm",children:w}),k.map(({label:v,icon:S="filter-list"})=>j(v,S))]},w))}):n.jsx($,{display:"flex",flexDirection:"row",maxHeight:p.length>0?"unset":"200px",style:{rowGap:"10px",writingMode:"vertical-lr"},wrap:"wrap",children:p.length>0?n.jsx(Ke,{id:"filters-options",onSearch:o,onSubmit:b,options:p,selectedFilter:h}):e.map(({label:w,icon:k="filter-list"})=>j(w,k))})},yn=({options:e,onApplyFilters:t,onSearch:i,modalRef:o,variant:r})=>{const[a,l]=x.useState("row"),[s,d]=x.useState(!0),p=c.Je(),g=x.useRef(null),u=n.jsx(M,{icon:"close",iconColor:p.palette.gray[400],iconSize:"lg",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:o.close,px:.25,py:.25,variant:"ghost"});return x.useEffect(()=>{const f=h=>{const y=g.current;y&&!y.contains(h.target)&&o.close()};if(s)return document.addEventListener("mousedown",f,!0),()=>{document.removeEventListener("mousedown",f,!0)}},[g,s,o]),n.jsx(fr,{$bgColor:"transparent","aria-label":o.name,children:n.jsxs(st,{$size:"fixed",alignItems:a==="row"?"start":"end",display:"flex",flexDirection:a,gap:.5,id:"filters-list",justify:"space-between",position:"relative",px:1.25,py:1.25,ref:g,style:{maxWidth:"620px",overflow:"hidden",width:"fit-content"},children:[a==="column"?u:void 0,n.jsx(hn,{onApplyFilters:t,onSearch:i,options:e,setDirection:l,setHandler:d,variant:r}),a==="row"?u:void 0]})})};function $r(e){if(e)return e}function bn(e){if(!e||e.length===0)return;const t=e.filter(o=>o.checked).map(o=>o.label??o.value);return t.length===0?void 0:t.join(", ")}function mr(e,t,i){const o=i??"",r=c._.isEmpty(e)&&typeof e!="number"||Number.isNaN(e)?void 0:Number(e),a=c._.isEmpty(t)&&typeof t!="number"||Number.isNaN(t)?void 0:Number(String(t));if(!c._.isUndefined(r)&&!c._.isUndefined(a))return`${r}${o} - ${a}${o}`;if(!c._.isUndefined(r))return`Min ${r}${o}`;if(!c._.isUndefined(a))return`Max ${a}${o}`}function wr(e,t){if(c.dayjs_minExports.extend(c.localizedFormat),!(c._.isUndefined(e)&&c._.isUndefined(t))){if(e!==""&&t!==""&&!c._.isUndefined(e)&&!c._.isUndefined(t))return`${c.dayjs(e).format("LL")} - ${c.dayjs(t).format("LL")}`;if(e!==""&&!c._.isUndefined(e))return`From ${c.dayjs(e).format("LL")}`;if(t!==""&&!c._.isUndefined(t))return`To ${c.dayjs(t).format("LL")}`}}function vr(e,t,i){return e==="select"?t:`${t} ${i==="includesInsensitive"?"contains":"is"}`}const pe=({filter:e,icon:t="filter-list",label:i,onClose:o,filterValue:r})=>c._.isNil(r)||c._.isEmpty(String(r))?null:n.jsx(U,{filterValues:r,icon:t,id:"remove-filter",onClose:o(e),tagLabel:`${i} `}),jr=({options:e,onClose:t})=>{const i=e.flatMap(o=>o.filterOptions.map(r=>{const{filterFn:a,label:l,type:s,value:d,options:p,minValue:g,maxValue:u}=r;switch(s){case"numberRange":{const f=mr(g,u,o.placeholder);return n.jsx(pe,{filter:r,filterValue:f,icon:o.icon,label:o.label,onClose:t},l)}case"dateRange":{const f=wr(g==null?void 0:g.toString(),u==null?void 0:u.toString());return n.jsx(pe,{filter:r,filterValue:f,icon:o.icon,label:o.label,onClose:t},l)}case"radioButton":case"checkboxes":{const f=bn(p);return n.jsx(pe,{filter:r,filterValue:f,icon:o.icon,label:o.label,onClose:t},l)}case void 0:case"select":case"text":default:{const f=$r(d),h=vr(s,o.label,a);return n.jsx(pe,{filter:r,filterValue:f,icon:o.icon,label:h,onClose:t},l)}}})).filter(o=>{if(o===null)return!1;const{filterValue:r}=o.props;return!c._.isNil(r)&&!c._.isEmpty(String(r))});return i.length>0?n.jsx($,{alignItems:"center",display:"flex",gap:.5,pb:1,width:"100%",wrap:"wrap",children:i}):null},kr=e=>e.map(t=>{const i={key:String(t.key),type:t.type},o=(()=>{let r={...i};if(t.filterFn&&(r={...r,filterFn:t.filterFn}),t.value&&(r={...r,value:t.value}),t.minValue!==void 0&&t.minValue!==null&&(r={...r,minValue:t.minValue}),t.maxValue!==void 0&&t.maxValue!==null&&(r={...r,maxValue:t.maxValue}),t.options&&t.options.length>0){const a=t.options.filter(l=>l.checked).map(l=>l.value);a.length>0&&(r={...r,selectedValues:a})}return r})();return Object.keys(o).length>2?o:null}).filter(Boolean),Cr=(e,t)=>t.map(i=>{const o=e.find(a=>a.key===String(i.key)&&a.type===i.type);return o?(()=>{let a={...i};return o.filterFn&&(a={...a,filterFn:o.filterFn}),o.value!==void 0&&o.value!==null&&(a={...a,value:o.value}),o.minValue!==void 0&&o.minValue!==null&&(a={...a,minValue:o.minValue}),o.maxValue!==void 0&&o.maxValue!==null&&(a={...a,maxValue:o.maxValue}),o.selectedValues&&i.options&&(a={...a,options:i.options.map(l=>{var s;return{...l,checked:((s=o.selectedValues)==null?void 0:s.includes(l.value))??!1}})}),a})():i}),Be=(e,t)=>{const i=kr(e);t(JSON.stringify(i))},Sr=(e,t)=>{const i=e();if(!i)return t;try{const o=JSON.parse(i);return Cr(o,t)}catch{return t}},zr=(e,t)=>{function i(l,s){if(s.value===""||s.value===void 0||c._.defaultTo(s.isBackFilter,!1))return!0;switch(s.filterFn){case"includesInsensitive":return String(l[s.key]).toLowerCase().includes(s.value.toLowerCase());case"caseInsensitive":case void 0:default:return String(l[s.key]).toLowerCase()===s.value.toLowerCase()}}function o(l,s){if(!s.options||s.options.length===0)return!0;const d=s.options.filter(p=>p.checked).map(p=>p.value);return d.length===0?!0:d.includes(String(l[s.key]))}function r(l,s,d){const p=d(String(l[s.key])),{minValue:g,maxValue:u}=s,f=c._.isEmpty(g)&&typeof g!="number"?void 0:d(String(g)),h=c._.isEmpty(u)&&typeof u!="number"?void 0:d(String(u));return c._.isUndefined(f)&&c._.isUndefined(h)?!0:(f??-1/0)<=p&&p<=(h??1/0)}function a(l){return t.every(s=>{if(typeof s.key=="function")return s.key(l,s.value);switch(s.type){case"radioButton":case"checkboxes":return o(l,s);case"numberRange":return r(l,s,Number);case"dateRange":return r(l,s,d=>new Date(d));case"select":case"text":default:return i(l,s)}})}return e.filter(a)},Ir=e=>[...e.flatMap(({options:i})=>i).filter(i=>i==null?void 0:i.checked),...e.flatMap(i=>[i.value,i.maxValue,i.minValue]).filter(Boolean)].length,Tr=e=>{var i;const t=((i=e.options)==null?void 0:i.map(o=>({...o,checked:void 0})))??void 0;return{...e,minValue:void 0,maxValue:void 0,value:void 0,options:t}},Er=({dataset:e,setValues:t,getValues:i,options:o,setFilteredDataset:r,onFiltersChange:a,onReset:l,onSearch:s,variant:d="ungrouped"})=>{const p=Se("filters-modal"),[g,u]=x.useState(!1),[f,h]=x.useState([]),y=Ir(f),m=o.map(v=>({...v,filterOptions:v.filterOptions.map(S=>f.find(z=>z.key===S.key&&z.type===S.type&&z.filterFn===S.filterFn)??{...S})})),b=x.useCallback(v=>{h([...v]),Be(v,t)},[h,t]),j=x.useCallback(()=>{l&&l(),p.isOpen||u(!0),p.toggle()},[p,l]),w=x.useCallback(v=>()=>{l&&l();const S=f.map(T=>T.key===v.key&&T.type===v.type&&T.filterFn===v.filterFn?Tr(T):T);h(S),Be(S,t)},[f,l,t]);return x.useEffect(()=>{const v=o.flatMap(z=>z.filterOptions),S=i();if((()=>{if(!S)return!1;try{const z=JSON.parse(S);return Array.isArray(z)&&z.length>0}catch{return!1}})()){const z=Sr(i,v);h(z)}else v.flatMap(C=>C.value).filter(Boolean).length>0||v.flatMap(C=>C.options).filter(C=>(C==null?void 0:C.checked)===!0).length>0?(h(v),g&&Be(v,t)):h(v)},[o,h,t,i,g]),x.useEffect(()=>{r&&e!==void 0&&r(zr(e,f)),a==null||a(f)},[e,f,r,a]),{Filters:()=>n.jsxs($,{alignItems:"center",display:"flex",gap:.25,maxWidth:"100%",position:"relative",wrap:"wrap",children:[n.jsx($,{pr:.25,children:n.jsx(P,{icon:"filter",id:"filter-btn",onClick:j,tag:y.toString(),variant:"ghost"})}),p.isOpen&&n.jsx(yn,{modalRef:p,onApplyFilters:b,onSearch:s,options:m,variant:d})]}),options:m,removeFilter:w}},ct=({_portal:e=!0,alert:t,cancelButton:i=void 0,children:o=void 0,confirmButton:r=void 0,content:a=void 0,description:l=void 0,modalRef:s,otherActions:d=void 0,onClose:p=void 0,tabItems:g=void 0,title:u=void 0,size:f,id:h="modal-container"})=>{const y=c.Je(),[m,b]=x.useState(void 0),j=x.useRef(null),w=x.useRef(!1),k=Array.isArray(g)&&g.length>0,v=i??r;x.useEffect(()=>{if(k&&!w.current&&j.current){const T=j.current.getBoundingClientRect().height;T>50&&(b(T),w.current=!0)}s.isOpen||(b(void 0),w.current=!1)},[k,s.isOpen]);const S=n.jsx(en,{"aria-label":s.name,"aria-modal":"true",id:"modal-wrapper",children:n.jsxs(st,{$size:f,"data-testid":h,flexDirection:"column",id:h,ref:k?j:void 0,style:k&&m?{height:m}:void 0,children:[!c._.isEmpty(u)&&!c._.isNil(u)&&n.jsx(nn,{description:l,modalRef:s,onClose:p,otherActions:d,title:u}),g&&n.jsx($,{borderTop:`1px solid ${y.palette.gray[300]}`,display:"block",mb:1.25,position:"sticky",children:n.jsx(lt,{items:g})}),(c._.isObject(a)||o)&&n.jsxs(Qo,{style:v?{borderBottom:`1px solid ${y.palette.gray[200]}`}:void 0,children:[o,c._.isObject(a)&&c._.isString(a.imageSrc)&&n.jsx(ir,{$framed:a.imageFramed,children:n.jsx(te,{alt:"modal-img",publicId:a.imageSrc})}),c._.isObject(a)&&c._.isString(a.imageText)&&n.jsx(I,{size:"sm",children:a.imageText})]}),n.jsx(tn,{alert:t,cancelButton:i,confirmButton:r,modalRef:s})]})});return e&&s.isOpen?se.createPortal(S,document.getElementById("portals")??document.body):s.isOpen?S:null},Rr=(e,t,i)=>{const o=Se("confirm-dialog-modal"),r=x.useRef(null),a=x.useCallback(async()=>(o.open(),new Promise(p=>{r.current=p})),[o]),l=x.useCallback(()=>{var p;o.close(),(p=r.current)==null||p.call(r,!0)},[o]),s=x.useCallback(()=>{var p;o.close(),(p=r.current)==null||p.call(r,!1)},[o]);return[a,({children:p})=>{const[g,u]=x.useState(i),f=x.useCallback(()=>{u({...i})},[]),h=x.useCallback(b=>()=>{u(j=>({...j,[b]:{...j[b],state:!j[b].state}}))},[]),y=!Object.values(g).every(({state:b})=>b),m=Object.entries(g).map(([b,{state:j,label:w}])=>n.jsx(oe,{defaultChecked:j,label:w,name:b,onChange:h(b)},b));return n.jsxs(ct,{"data-testid":e,id:e,modalRef:{...o,close:s},onClose:f,size:"sm",title:t,children:[p,n.jsx($,{display:"flex",flexDirection:"column",gap:.5,children:m}),n.jsx(on,{disabled:y,id:e,onConfirm:l})]})}]},Dr=()=>{const[e,t]=x.useState(!1),[i,o]=x.useState(),r=x.useRef(null),a=Se("confirm-dialog-modal"),l=x.useCallback(async g=>(o(g),t(!0),new Promise(u=>{r.current=u})),[]),s=x.useCallback(()=>{var g;t(!1),o(void 0),(g=r.current)==null||g.call(r,!0)},[]),d=x.useCallback(()=>{var g;t(!1),o(void 0),(g=r.current)==null||g.call(r,!1)},[]);return x.useEffect(()=>{a.setIsOpen(e)},[e,a]),{ConfirmDialog:({id:g="confirm-dialog-modal",children:u})=>n.jsxs(ct,{cancelButton:{onClick:d,text:"Cancel"},confirmButton:{id:(i==null?void 0:i.id)??"modal-confirm",onClick:s,text:"Confirm"},description:i==null?void 0:i.message,id:g,modalRef:{...a,close:d},size:"sm",title:i==null?void 0:i.title,children:[i==null?void 0:i.content,u]}),confirm:l}},Nr=2e3,Fr=({content:e})=>{const[t,i]=x.useState("Copy"),o=x.useCallback(()=>{navigator.clipboard.writeText(e).then(()=>{i("Copied"),setTimeout(()=>{i("Copy")},Nr)}).catch(()=>{i("Failed to copy")})},[e]);return n.jsx(M,{icon:"copy",iconSize:"lg",iconType:"fa-light",onClick:o,tooltip:t,variant:"ghost"})},Ar=c.st.ul`
2031
2041
  ${({theme:e})=>`
2032
2042
  align-items: flex-start;
2033
2043
  border-radius: ${e.spacing[.25]};
@@ -2110,7 +2120,7 @@ ${y[8]}...`:(y.length<8&&p(!1),t)},[l,t,e]),f=x.useMemo(u,[u]),h=x.useCallback(a
2110
2120
  overflow: hidden auto;
2111
2121
  width: 100%;
2112
2122
  `}
2113
- `,Jr=({alert:e,buttonAlignment:t,cancelButton:i,children:o,confirmButton:r,defaultDisabled:a=!0,id:l="modal-confirm",maxButtonWidth:s="392px",mode:d,onSubmit:p,padding:g=!0,showButtons:u=!0,yupSchema:f,...h})=>{const y=c.Je(),m=c.useForm({...h,mode:d??"all",resolver:f?c.o(f):void 0});function b(j){j.stopPropagation(),m.handleSubmit(p)(j)}const w=u?`calc(100% - ${e?"139px":"83px"})`:"100%",v=g?1.5:0;return n.jsx(c.FormProvider,{...m,children:n.jsx(_r,{onSubmit:b,children:n.jsxs($,{scroll:"y",width:"100%",children:[n.jsx($,{borderRadius:`0 0 ${y.spacing[.25]} ${y.spacing[.25]}`,display:"flex",flexDirection:"column",gap:.5,height:w,pb:v,pt:0,px:v,scroll:"y",children:o}),u&&n.jsxs($,{borderRadius:`0 0 ${y.spacing[.25]} ${y.spacing[.25]}`,borderTop:`1px solid ${y.palette.gray[200]}`,display:"flex",flexDirection:t?"unset":"column",gap:.625,justify:t??"stretch",position:"sticky",px:1.25,py:1.25,children:[e,n.jsxs($,{display:"flex",gap:.75,maxWidth:s,children:[i?n.jsx(P,{icon:i.icon,id:`${l}-cancel`,justify:"center",onClick:i.onClick,type:"reset",variant:"tertiary",width:"100%",children:i.label??"Cancel"}):void 0,n.jsx(P,{disabled:((r==null?void 0:r.disabled)??!1)||m.formState.isSubmitting||a&&!m.formState.isDirty,icon:r==null?void 0:r.icon,id:l,justify:"center",type:"submit",width:"100%",children:(r==null?void 0:r.label)??"Confirm"})]})]})]})})})},Vr=c.st(ke)`
2123
+ `,Jr=({alert:e,buttonAlignment:t,cancelButton:i,children:o,confirmButton:r,defaultDisabled:a=!0,id:l="modal-confirm",maxButtonWidth:s="392px",mode:d,onSubmit:p,padding:g=!0,showButtons:u=!0,yupSchema:f,...h})=>{const y=c.Je(),m=c.useForm({...h,mode:d??"all",resolver:f?c.o(f):void 0});function b(v){v.stopPropagation(),m.handleSubmit(p)(v)}const w=u?`calc(100% - ${e?"139px":"83px"})`:"100%",k=g?1.5:0;return n.jsx(c.FormProvider,{...m,children:n.jsx(_r,{onSubmit:b,children:n.jsxs($,{scroll:"y",width:"100%",children:[n.jsx($,{borderRadius:`0 0 ${y.spacing[.25]} ${y.spacing[.25]}`,display:"flex",flexDirection:"column",gap:.5,height:w,pb:k,pt:0,px:k,scroll:"y",children:o}),u&&n.jsxs($,{borderRadius:`0 0 ${y.spacing[.25]} ${y.spacing[.25]}`,borderTop:`1px solid ${y.palette.gray[200]}`,display:"flex",flexDirection:t?"unset":"column",gap:.625,justify:t??"stretch",position:"sticky",px:1.25,py:1.25,children:[e,n.jsxs($,{display:"flex",gap:.75,maxWidth:s,children:[i?n.jsx(P,{icon:i.icon,id:`${l}-cancel`,justify:"center",onClick:i.onClick,type:"reset",variant:"tertiary",width:"100%",children:i.label??"Cancel"}):void 0,n.jsx(P,{disabled:((r==null?void 0:r.disabled)??!1)||m.formState.isSubmitting||a&&!m.formState.isDirty,icon:r==null?void 0:r.icon,id:l,justify:"center",type:"submit",width:"100%",children:(r==null?void 0:r.label)??"Confirm"})]})]})]})})})},Vr=c.st(ke)`
2114
2124
  display: grid;
2115
2125
  gap: ${({$gap:e=1.25})=>`${e}rem`};
2116
2126
  grid-template-columns: ${({$sm:e})=>`repeat(${e}, 1fr)`};
@@ -2164,7 +2174,7 @@ ${y[8]}...`:(y.length<8&&p(!1),t)},[l,t,e]),f=x.useMemo(u,[u]),h=x.useCallback(a
2164
2174
  background-color: ${e.palette.gray[100]};
2165
2175
  }
2166
2176
  `}
2167
- `,$n=({isSelected:e=!1,label:t,onSelect:i})=>{const o=c.Je(),r=x.useCallback(()=>{i&&i(t)},[i,t]);return n.jsxs(dt,{$isSelected:e,onClick:r,children:[e?n.jsx(R,{icon:"check",iconColor:o.palette.gray[800],iconSize:"lg"}):null,n.jsx(I,{color:o.palette.gray[800],fontWeight:"bold",size:"sm",children:t})]})},Yr=({isOpen:e=!0,items:t,handleNewOrganization:i,onSelect:o,onClose:r,selectedItem:a,title:l,variant:s})=>{const d=c.Je(),[p,g]=x.useState(t),[u,f]=x.useState(""),h=x.useCallback(b=>{g(k=>k.filter(w=>String(w.name).toLowerCase().includes(b.toLocaleLowerCase())))},[g]),y=x.useCallback(b=>{b.currentTarget&&(f(b.currentTarget.value),h(b.currentTarget.value))},[f,h]);x.useEffect(()=>{g(t),h(u)},[t,h,u]);const m=n.jsx($,{"aria-modal":"true",className:"comp-modal fixed inset-0 overflow-auto",zIndex:99999,children:n.jsx($,{alignItems:"center",bgColor:"rgb(52 64 84 / 70%)",display:"flex",height:"100vh",justify:"center",left:"0",top:"0",width:"100%",children:n.jsxs(Gr,{$itemsLength:p.length,children:[n.jsxs($,{alignItems:"center",display:"flex",justify:"space-between",children:[n.jsx(I,{color:d.palette.gray[800],fontWeight:"bold",size:"lg",children:l}),n.jsx(M,{icon:"xmark",iconColor:d.palette.gray[400],iconSize:"lg",iconType:"fa-light",onClick:r,variant:"ghost"})]}),n.jsx($,{mt:1,children:n.jsx(ae,{onInput:y,placeholder:"Search"})}),n.jsx(re,{mb:1,mt:1}),n.jsxs($,{display:"inline-flex",gap:1,maxHeight:"332px",scroll:"y",wrap:"wrap",children:[s==="organization-selector"?n.jsx(dt,{onClick:i,children:n.jsxs($,{alignItems:"center",display:"flex",children:[n.jsx(R,{icon:"square-plus",iconColor:d.palette.gray[400],iconSize:"lg",iconType:"fa-light",mr:.5}),n.jsx(I,{color:d.palette.gray[400],size:"sm",children:"New organization"})]})}):void 0,p.map(b=>n.jsx($n,{isSelected:a.toLowerCase()===b.name,label:b.name.charAt(0).toUpperCase()+b.name.slice(1),onSelect:o},b.name))]})]})})});return e?se.createPortal(m,document.body):n.jsx("div",{})},Kr=({description:e,height:t="auto",leftIconName:i,children:o,rightIconName:r,title:a,tooltipId:l,tooltipTip:s,tooltipPlace:d="bottom",variant:p="centered",width:g="318px"})=>{const u=c.Je(),f=p==="centered",h=l&&n.jsx(J,{icon:r??i,iconColor:u.palette.gray[800],id:l,place:d,tip:s});return n.jsxs($,{alignItems:f?"center":"flex-start",bgColor:u.palette.gray[50],border:`1px solid ${u.palette.gray[200]}`,borderRadius:"4px",display:"inline-flex",flexDirection:f?"column":"column-reverse",gap:.5,height:t,justify:"center",padding:[1.25,1.25,1.25,1.25],width:g,children:[n.jsxs($,{alignItems:"center",display:"flex",gap:.5,children:[f||c.lodashExports.isUndefined(i)?void 0:h,n.jsx(I,{color:f?u.palette.gray[800]:u.palette.gray[400],size:"md",textAlign:f?"center":"start",children:e}),f||c.lodashExports.isUndefined(r)?void 0:h]}),n.jsxs($,{alignItems:"center",display:"flex",gap:.5,my:.5,children:[f&&!c.lodashExports.isUndefined(i)?h:void 0,n.jsxs("div",{style:{display:"flex",gap:"12px"},children:[c.lodashExports.isUndefined(a)?void 0:n.jsx(q,{fontWeight:"bold",size:"md",children:a}),o]}),f&&!c.lodashExports.isUndefined(r)?h:void 0]})]})},Zr=({actions:e,children:t,header:i,title:o,tabs:r,footer:a})=>{const l=c.Je();return n.jsxs($,{alignItems:"flex-start",bgColor:l.palette.white,borderLeft:`1px solid ${l.palette.gray[300]}`,display:"flex",flexDirection:"column",maxHeight:"750px",width:"480px",children:[n.jsxs($,{alignItems:"flex-start",alignSelf:"stretch",borderBottom:`1px solid ${l.palette.gray[300]}`,display:"flex",gap:.25,justify:"space-between",px:1.25,py:1,children:[n.jsxs($,{display:"flex",flexDirection:"column",gap:.25,children:[n.jsx(I,{color:l.palette.gray[800],fontWeight:"bold",lineSpacing:1.75,size:"xl",children:o}),i]}),e&&n.jsx($,{display:"flex",gap:.25,children:e.map(({icon:s,onClick:d},p)=>n.jsx(M,{icon:s??"paper-plane",iconColor:l.palette.gray[400],iconSize:"sm",iconType:"fa-light",onClick:d,variant:"ghost"},`${p}-${s}`))})]}),n.jsx($,{display:"flex",pt:.25,width:"100%",children:n.jsx(lt,{items:r})}),n.jsx($,{alignSelf:"stretch",display:"flex",flexDirection:"column",px:1.25,py:1,scroll:"y",children:t}),a&&n.jsx($,{alignSelf:"stretch",borderTop:`1px solid ${l.palette.gray[300]}`,display:"flex",gap:.5,justify:"end",px:1.25,py:1,children:a.map(({icon:s,text:d,onClick:p},g)=>n.jsx(P,{icon:s,onClick:p,variant:g===0?"primary":"tertiary",width:"100%",children:d},`${g}-${d}`))})]})},qr=c.st.span`
2177
+ `,$n=({isSelected:e=!1,label:t,onSelect:i})=>{const o=c.Je(),r=x.useCallback(()=>{i&&i(t)},[i,t]);return n.jsxs(dt,{$isSelected:e,onClick:r,children:[e?n.jsx(R,{icon:"check",iconColor:o.palette.gray[800],iconSize:"lg"}):null,n.jsx(I,{color:o.palette.gray[800],fontWeight:"bold",size:"sm",children:t})]})},Yr=({isOpen:e=!0,items:t,handleNewOrganization:i,onSelect:o,onClose:r,selectedItem:a,title:l,variant:s})=>{const d=c.Je(),[p,g]=x.useState(t),[u,f]=x.useState(""),h=x.useCallback(b=>{g(j=>j.filter(w=>String(w.name).toLowerCase().includes(b.toLocaleLowerCase())))},[g]),y=x.useCallback(b=>{b.currentTarget&&(f(b.currentTarget.value),h(b.currentTarget.value))},[f,h]);x.useEffect(()=>{g(t),h(u)},[t,h,u]);const m=n.jsx($,{"aria-modal":"true",className:"comp-modal fixed inset-0 overflow-auto",zIndex:99999,children:n.jsx($,{alignItems:"center",bgColor:"rgb(52 64 84 / 70%)",display:"flex",height:"100vh",justify:"center",left:"0",top:"0",width:"100%",children:n.jsxs(Gr,{$itemsLength:p.length,children:[n.jsxs($,{alignItems:"center",display:"flex",justify:"space-between",children:[n.jsx(I,{color:d.palette.gray[800],fontWeight:"bold",size:"lg",children:l}),n.jsx(M,{icon:"xmark",iconColor:d.palette.gray[400],iconSize:"lg",iconType:"fa-light",onClick:r,variant:"ghost"})]}),n.jsx($,{mt:1,children:n.jsx(ae,{onInput:y,placeholder:"Search"})}),n.jsx(re,{mb:1,mt:1}),n.jsxs($,{display:"inline-flex",gap:1,maxHeight:"332px",scroll:"y",wrap:"wrap",children:[s==="organization-selector"?n.jsx(dt,{onClick:i,children:n.jsxs($,{alignItems:"center",display:"flex",children:[n.jsx(R,{icon:"square-plus",iconColor:d.palette.gray[400],iconSize:"lg",iconType:"fa-light",mr:.5}),n.jsx(I,{color:d.palette.gray[400],size:"sm",children:"New organization"})]})}):void 0,p.map(b=>n.jsx($n,{isSelected:a.toLowerCase()===b.name,label:b.name.charAt(0).toUpperCase()+b.name.slice(1),onSelect:o},b.name))]})]})})});return e?se.createPortal(m,document.body):n.jsx("div",{})},Kr=({description:e,height:t="auto",leftIconName:i,children:o,rightIconName:r,title:a,tooltipId:l,tooltipTip:s,tooltipPlace:d="bottom",variant:p="centered",width:g="318px"})=>{const u=c.Je(),f=p==="centered",h=l&&n.jsx(J,{icon:r??i,iconColor:u.palette.gray[800],id:l,place:d,tip:s});return n.jsxs($,{alignItems:f?"center":"flex-start",bgColor:u.palette.gray[50],border:`1px solid ${u.palette.gray[200]}`,borderRadius:"4px",display:"inline-flex",flexDirection:f?"column":"column-reverse",gap:.5,height:t,justify:"center",padding:[1.25,1.25,1.25,1.25],width:g,children:[n.jsxs($,{alignItems:"center",display:"flex",gap:.5,children:[f||c.lodashExports.isUndefined(i)?void 0:h,n.jsx(I,{color:f?u.palette.gray[800]:u.palette.gray[400],size:"md",textAlign:f?"center":"start",children:e}),f||c.lodashExports.isUndefined(r)?void 0:h]}),n.jsxs($,{alignItems:"center",display:"flex",gap:.5,my:.5,children:[f&&!c.lodashExports.isUndefined(i)?h:void 0,n.jsxs("div",{style:{display:"flex",gap:"12px"},children:[c.lodashExports.isUndefined(a)?void 0:n.jsx(q,{fontWeight:"bold",size:"md",children:a}),o]}),f&&!c.lodashExports.isUndefined(r)?h:void 0]})]})},Zr=({actions:e,children:t,header:i,title:o,tabs:r,footer:a})=>{const l=c.Je();return n.jsxs($,{alignItems:"flex-start",bgColor:l.palette.white,borderLeft:`1px solid ${l.palette.gray[300]}`,display:"flex",flexDirection:"column",maxHeight:"750px",width:"480px",children:[n.jsxs($,{alignItems:"flex-start",alignSelf:"stretch",borderBottom:`1px solid ${l.palette.gray[300]}`,display:"flex",gap:.25,justify:"space-between",px:1.25,py:1,children:[n.jsxs($,{display:"flex",flexDirection:"column",gap:.25,children:[n.jsx(I,{color:l.palette.gray[800],fontWeight:"bold",lineSpacing:1.75,size:"xl",children:o}),i]}),e&&n.jsx($,{display:"flex",gap:.25,children:e.map(({icon:s,onClick:d},p)=>n.jsx(M,{icon:s??"paper-plane",iconColor:l.palette.gray[400],iconSize:"sm",iconType:"fa-light",onClick:d,variant:"ghost"},`${p}-${s}`))})]}),n.jsx($,{display:"flex",pt:.25,width:"100%",children:n.jsx(lt,{items:r})}),n.jsx($,{alignSelf:"stretch",display:"flex",flexDirection:"column",px:1.25,py:1,scroll:"y",children:t}),a&&n.jsx($,{alignSelf:"stretch",borderTop:`1px solid ${l.palette.gray[300]}`,display:"flex",gap:.5,justify:"end",px:1.25,py:1,children:a.map(({icon:s,text:d,onClick:p},g)=>n.jsx(P,{icon:s,onClick:p,variant:g===0?"primary":"tertiary",width:"100%",children:d},`${g}-${d}`))})]})},qr=c.st.span`
2168
2178
  ${({theme:e,$bgColor:t=e.palette.secondary[500],$txtDecoration:i="none"})=>`
2169
2179
  background-color: ${t};
2170
2180
  border-radius: 5px;
@@ -2332,7 +2342,7 @@ ${y[8]}...`:(y.length<8&&p(!1),t)},[l,t,e]),f=x.useMemo(u,[u]),h=x.useCallback(a
2332
2342
  &::-webkit-inner-spin-button {
2333
2343
  opacity: 1;
2334
2344
  }
2335
- `,ma=x.forwardRef(function({autoUpdate:t=!1,decimalPlaces:i=0,defaultValue:o=0,max:r,min:a,name:l,onEnter:s,tooltipMessage:d,...p},g){const u=i<0?0:i,[f,h]=x.useState(Number(o).toFixed(u)),y=x.useCallback(k=>{const w=c.lodashExports.toNumber(k.target.value);k.target.value.endsWith(".")?h(k.target.value):w>=Number(a)&&w<=Number(r)&&(h(String(w)),t&&s(c.lodashExports.toNumber(w.toFixed(u)))),k.stopPropagation()},[t,u,r,a,s]),m=x.useCallback(k=>{k.currentTarget.contains(k.relatedTarget)||h(Number(o).toFixed(u)),k.stopPropagation()},[u,o]),b=x.useCallback(k=>{k.stopPropagation(),k.key==="Enter"&&!c.lodashExports.isEmpty(k.currentTarget.value)&&s(c.lodashExports.toNumber(k.currentTarget.value))},[s]);return n.jsx(ba,{onBlur:m,tabIndex:-1,children:n.jsx(J,{id:"numberInputTooltip",tip:d,children:n.jsx($a,{...p,"aria-label":l,"aria-valuemax":Number(r),"aria-valuemin":Number(a),"aria-valuenow":Number(f),max:r,min:a,name:l,onChange:y,onKeyUp:b,ref:g,step:10**-u,type:"number",value:f})})})}),wa={Azure:"integrates/autoenrollment/azureIcon",Bitbucket:"integrates/autoenrollment/bitbucketLogo",GitHub:"integrates/autoenrollment/githubLogo",GitLab:"integrates/autoenrollment/gitlabIcon"},qe=({icon:e,label:t,onClick:i,onlyLabel:o=!1,provider:r="GitLab"})=>{const a=c.Je();return n.jsxs($,{alignItems:"center",bgColorHover:a.palette.gray[100],borderRadius:"4px",cursor:"pointer",display:"flex",flexDirection:"column",gap:.25,height:"62px",justify:"center",minWidth:"64px",onClick:i,pb:.5,pl:.25,pr:.25,pt:.5,children:[o?!1:n.jsx($,{height:"24px",width:"24px",children:e===void 0?n.jsx(te,{alt:`${r} Logo`,height:"100%",publicId:wa[r],width:"100%"}):n.jsx(R,{icon:e,iconColor:"#000",iconSize:"xl",iconType:"fa-light"})}),n.jsx($,{alignItems:"center",display:"flex",minWidth:"24px",children:n.jsx(I,{color:a.palette.gray[800],display:"inline",size:"xs",textAlign:"center",whiteSpace:o?"break-spaces":"nowrap",wordWrap:"unset",children:t??r})})]})},va=({align:e="end",buttonLabel:t="Add Credential",children:i,id:o,manualOption:r,providers:a})=>{const l=c.Je(),[s,d]=x.useState(!1),p=x.useRef(null);Q(p.current,()=>{d(!1)},!0);const g=x.useCallback(h=>{r==null||r.onClick(h),d(!1)},[r]),u=x.useCallback(()=>{d(h=>!h)},[d]),f=x.useCallback(h=>y=>{var m;(m=a[h])==null||m.onClick(y),d(!1)},[a]);return n.jsxs($,{alignItems:e,display:"flex",flexDirection:"column",position:"relative",ref:p,width:"max-content",zIndex:10,children:[n.jsx(P,{icon:"plus",onClick:u,variant:"primary",children:t}),n.jsxs($,{alignItems:"center",bgColor:"#fff",border:`1px solid ${l.palette.gray[200]}`,borderRadius:"4px",display:"flex",gap:.5,height:"78px",id:o,pb:.5,pl:.75,position:"absolute",pr:.75,pt:.5,shadow:"md",top:"40px",visibility:s?"visible":"hidden",zIndex:10,children:[Object.keys(a).map(h=>n.jsx(qe,{onClick:f(h),provider:h},h)),r===void 0?void 0:n.jsx(qe,{icon:"square-plus",label:r.label??"Add manually",onClick:g}),i]})]})},ja=c.st.div`
2345
+ `,ma=x.forwardRef(function({autoUpdate:t=!1,decimalPlaces:i=0,defaultValue:o=0,max:r,min:a,name:l,onEnter:s,tooltipMessage:d,...p},g){const u=i<0?0:i,[f,h]=x.useState(Number(o).toFixed(u)),y=x.useCallback(j=>{const w=c.lodashExports.toNumber(j.target.value);j.target.value.endsWith(".")?h(j.target.value):w>=Number(a)&&w<=Number(r)&&(h(String(w)),t&&s(c.lodashExports.toNumber(w.toFixed(u)))),j.stopPropagation()},[t,u,r,a,s]),m=x.useCallback(j=>{j.currentTarget.contains(j.relatedTarget)||h(Number(o).toFixed(u)),j.stopPropagation()},[u,o]),b=x.useCallback(j=>{j.stopPropagation(),j.key==="Enter"&&!c.lodashExports.isEmpty(j.currentTarget.value)&&s(c.lodashExports.toNumber(j.currentTarget.value))},[s]);return n.jsx(ba,{onBlur:m,tabIndex:-1,children:n.jsx(J,{id:"numberInputTooltip",tip:d,children:n.jsx($a,{...p,"aria-label":l,"aria-valuemax":Number(r),"aria-valuemin":Number(a),"aria-valuenow":Number(f),max:r,min:a,name:l,onChange:y,onKeyUp:b,ref:g,step:10**-u,type:"number",value:f})})})}),wa={Azure:"integrates/autoenrollment/azureIcon",Bitbucket:"integrates/autoenrollment/bitbucketLogo",GitHub:"integrates/autoenrollment/githubLogo",GitLab:"integrates/autoenrollment/gitlabIcon"},qe=({icon:e,label:t,onClick:i,onlyLabel:o=!1,provider:r="GitLab"})=>{const a=c.Je();return n.jsxs($,{alignItems:"center",bgColorHover:a.palette.gray[100],borderRadius:"4px",cursor:"pointer",display:"flex",flexDirection:"column",gap:.25,height:"62px",justify:"center",minWidth:"64px",onClick:i,pb:.5,pl:.25,pr:.25,pt:.5,children:[o?!1:n.jsx($,{height:"24px",width:"24px",children:e===void 0?n.jsx(te,{alt:`${r} Logo`,height:"100%",publicId:wa[r],width:"100%"}):n.jsx(R,{icon:e,iconColor:"#000",iconSize:"xl",iconType:"fa-light"})}),n.jsx($,{alignItems:"center",display:"flex",minWidth:"24px",children:n.jsx(I,{color:a.palette.gray[800],display:"inline",size:"xs",textAlign:"center",whiteSpace:o?"break-spaces":"nowrap",wordWrap:"unset",children:t??r})})]})},va=({align:e="end",buttonLabel:t="Add Credential",children:i,id:o,manualOption:r,providers:a})=>{const l=c.Je(),[s,d]=x.useState(!1),p=x.useRef(null);Q(p.current,()=>{d(!1)},!0);const g=x.useCallback(h=>{r==null||r.onClick(h),d(!1)},[r]),u=x.useCallback(()=>{d(h=>!h)},[d]),f=x.useCallback(h=>y=>{var m;(m=a[h])==null||m.onClick(y),d(!1)},[a]);return n.jsxs($,{alignItems:e,display:"flex",flexDirection:"column",position:"relative",ref:p,width:"max-content",zIndex:10,children:[n.jsx(P,{icon:"plus",onClick:u,variant:"primary",children:t}),n.jsxs($,{alignItems:"center",bgColor:"#fff",border:`1px solid ${l.palette.gray[200]}`,borderRadius:"4px",display:"flex",gap:.5,height:"78px",id:o,pb:.5,pl:.75,position:"absolute",pr:.75,pt:.5,shadow:"md",top:"40px",visibility:s?"visible":"hidden",zIndex:10,children:[Object.keys(a).map(h=>n.jsx(qe,{onClick:f(h),provider:h},h)),r===void 0?void 0:n.jsx(qe,{icon:"square-plus",label:r.label??"Add manually",onClick:g}),i]})]})},ja=c.st.div`
2336
2346
  ${({theme:e})=>`
2337
2347
  height: ${e.spacing[1]};
2338
2348
  width: ${e.spacing[1]};
@@ -2458,7 +2468,7 @@ ${y[8]}...`:(y.length<8&&p(!1),t)},[l,t,e]),f=x.useMemo(u,[u]),h=x.useCallback(a
2458
2468
  flex-flow: row wrap;
2459
2469
  }
2460
2470
  `}
2461
- `,Ra=150,Da=({label:e,minWidth:t=Ra,state:i="not completed",stepNumber:o=1,title:r,onClick:a,orientation:l="horizontal"})=>{const s=c.Je(),d={completed:"circle-check",disabled:"circle-dashed",error:"circle-exclamation","in progress":"circle-half","not completed":"circle-dashed"},p=i==="disabled";return n.jsxs($,{display:"inline-flex",flexDirection:l==="horizontal"?"column":"row",minWidth:`${t}px`,children:[n.jsx(vn,{minWidth:t,orientation:l,percentage:p||i==="not completed"?0:100,rounded:!1,variant:i==="error"?"progressIndicatorError":"progressIndicator"}),n.jsxs($,{display:"flex",gap:.5,px:.5,py:.5,width:"100%",children:[i==="in progress"?n.jsx(jn,{onClick:a}):n.jsx(Ta,{$variant:i,clickable:!p,disabled:p,icon:d[i],iconColor:kn(i,s),iconSize:"lg",iconType:"fa-light",onClick:p?void 0:a}),n.jsxs($,{children:[n.jsx(I,{color:s.palette.gray[p?300:800],fontWeight:"bold",size:"sm",children:`${o}.${r}`}),e===void 0?null:n.jsx(I,{color:s.palette.gray[p?300:600],size:"xs",children:e})]})]})]})},Na=150,Fa=({children:e,orientation:t="horizontal",minWidth:i=Na})=>{const o=x.Children.toArray(e),r=x.useMemo(()=>x.Children.count(e),[e]),a=x.useMemo(()=>r*i,[r,i]);return n.jsx(Ea,{$minWidth:`${a}px`,$orientation:t,children:o.map(l=>x.cloneElement(l,{minWidth:i,orientation:t}))})},Cn=({description:e="",highlightDescription:t="",mobile:i})=>{const o=c.Je(),r=i?"md":"lg",a=typeof t=="string",l=a?"":new RegExp(`(${t.join("|")})`,"u");return t.length>0?n.jsx(I,{display:"inline",lineSpacing:1.5,size:r,textAlign:i?"start":"center",children:a?n.jsxs(x.Fragment,{children:[n.jsx(ue,{color:o.palette.gray[600],display:"inline",fontWeight:"bold",lineSpacing:1.5,size:r,children:t}),e]}):e.split(l).map((s,d)=>t.includes(s)?n.jsx(ue,{color:o.palette.gray[600],display:"inline",fontWeight:"bold",lineSpacing:1.5,size:r,children:s},`${d+1}-bold`):s)}):n.jsx(I,{lineSpacing:1.5,size:r,textAlign:i?"start":"center",children:e})},Aa=({_portal:e=!1,cancelButton:t,darkBackground:i=!1,children:o,confirmButton:r,container:a,description:l,highlightDescription:s="",image:d,maxWidth:p,mobile:g=!1,title:u,titleColor:f})=>{const h=c.Je(),{alt:y,src:m,width:b="77px",height:k="77px"}=d,w=x.useCallback(()=>{t==null||t.onClick()},[t]),v=x.useCallback(()=>{r==null||r.onClick()},[r]),j=n.jsx(q,{color:f,fontWeight:"bold",lineSpacing:g?1.5:2.5,mb:g?1.5:0,size:g?"sm":"lg",textAlign:g?"start":"center",children:u}),S=n.jsx(te,{alt:y,height:k,publicId:m,width:b}),E=n.jsx($,{alignItems:"center","aria-label":u,"aria-modal":"true",bgColor:i?"rgba(52, 64, 84, 70%)":"",display:"flex",height:"100vh",justify:"center",left:"0",position:e?"fixed":"absolute",top:"0px",width:"100%",zIndex:99999,children:n.jsxs($,{bgColor:h.palette.white,border:`1px solid ${h.palette.gray[200]}`,borderRadius:"8px",display:"inline-flex",flexDirection:"column",maxWidth:p,position:"relative",px:g?1.5:2.5,py:g?1.5:2.5,shadow:"lg",width:g?"335px":"100%",zIndex:11,children:[n.jsxs($,{alignItems:"center",display:"flex",flexDirection:"column",width:"100%",children:[g?j:void 0,g?n.jsx($,{alignItems:"center",height:k,justify:"center",mr:0,children:n.jsx($,{bgColor:h.palette.gray[100],left:"0",position:"absolute",textAlign:"center",width:"100%",children:S})}):S,n.jsxs($,{display:"flex",flexDirection:"column",gap:.5,mb:1.5,mt:1.5,children:[g?void 0:j,n.jsx(Cn,{description:l,highlightDescription:s,mobile:g})]})]}),o&&n.jsx($,{mb:1,scroll:"y",children:n.jsx($,{height:"100%",children:o})}),n.jsxs($,{alignItems:"flex-start",display:"flex",gap:1,justify:g?"start":"center",children:[c.lodashExports.isObject(r)?n.jsx(P,{onClick:v,variant:(r==null?void 0:r.variant)??"primary",children:r==null?void 0:r.text},r==null?void 0:r.key):void 0,c.lodashExports.isObject(t)?n.jsx(P,{onClick:w,variant:(t==null?void 0:t.variant)??"tertiary",children:t==null?void 0:t.text},t==null?void 0:t.key):void 0]})]})});return e?se.createPortal(E,a??document.body):E},La=c.st.div.attrs({className:"comp-scroll-up"})`
2471
+ `,Ra=150,Da=({label:e,minWidth:t=Ra,state:i="not completed",stepNumber:o=1,title:r,onClick:a,orientation:l="horizontal"})=>{const s=c.Je(),d={completed:"circle-check",disabled:"circle-dashed",error:"circle-exclamation","in progress":"circle-half","not completed":"circle-dashed"},p=i==="disabled";return n.jsxs($,{display:"inline-flex",flexDirection:l==="horizontal"?"column":"row",minWidth:`${t}px`,children:[n.jsx(vn,{minWidth:t,orientation:l,percentage:p||i==="not completed"?0:100,rounded:!1,variant:i==="error"?"progressIndicatorError":"progressIndicator"}),n.jsxs($,{display:"flex",gap:.5,px:.5,py:.5,width:"100%",children:[i==="in progress"?n.jsx(jn,{onClick:a}):n.jsx(Ta,{$variant:i,clickable:!p,disabled:p,icon:d[i],iconColor:kn(i,s),iconSize:"lg",iconType:"fa-light",onClick:p?void 0:a}),n.jsxs($,{children:[n.jsx(I,{color:s.palette.gray[p?300:800],fontWeight:"bold",size:"sm",children:`${o}.${r}`}),e===void 0?null:n.jsx(I,{color:s.palette.gray[p?300:600],size:"xs",children:e})]})]})]})},Na=150,Fa=({children:e,orientation:t="horizontal",minWidth:i=Na})=>{const o=x.Children.toArray(e),r=x.useMemo(()=>x.Children.count(e),[e]),a=x.useMemo(()=>r*i,[r,i]);return n.jsx(Ea,{$minWidth:`${a}px`,$orientation:t,children:o.map(l=>x.cloneElement(l,{minWidth:i,orientation:t}))})},Cn=({description:e="",highlightDescription:t="",mobile:i})=>{const o=c.Je(),r=i?"md":"lg",a=typeof t=="string",l=a?"":new RegExp(`(${t.join("|")})`,"u");return t.length>0?n.jsx(I,{display:"inline",lineSpacing:1.5,size:r,textAlign:i?"start":"center",children:a?n.jsxs(x.Fragment,{children:[n.jsx(ue,{color:o.palette.gray[600],display:"inline",fontWeight:"bold",lineSpacing:1.5,size:r,children:t}),e]}):e.split(l).map((s,d)=>t.includes(s)?n.jsx(ue,{color:o.palette.gray[600],display:"inline",fontWeight:"bold",lineSpacing:1.5,size:r,children:s},`${d+1}-bold`):s)}):n.jsx(I,{lineSpacing:1.5,size:r,textAlign:i?"start":"center",children:e})},Aa=({_portal:e=!1,cancelButton:t,darkBackground:i=!1,children:o,confirmButton:r,container:a,description:l,highlightDescription:s="",image:d,maxWidth:p,mobile:g=!1,title:u,titleColor:f})=>{const h=c.Je(),{alt:y,src:m,width:b="77px",height:j="77px"}=d,w=x.useCallback(()=>{t==null||t.onClick()},[t]),k=x.useCallback(()=>{r==null||r.onClick()},[r]),v=n.jsx(q,{color:f,fontWeight:"bold",lineSpacing:g?1.5:2.5,mb:g?1.5:0,size:g?"sm":"lg",textAlign:g?"start":"center",children:u}),S=n.jsx(te,{alt:y,height:j,publicId:m,width:b}),T=n.jsx($,{alignItems:"center","aria-label":u,"aria-modal":"true",bgColor:i?"rgba(52, 64, 84, 70%)":"",display:"flex",height:"100vh",justify:"center",left:"0",position:e?"fixed":"absolute",top:"0px",width:"100%",zIndex:99999,children:n.jsxs($,{bgColor:h.palette.white,border:`1px solid ${h.palette.gray[200]}`,borderRadius:"8px",display:"inline-flex",flexDirection:"column",maxWidth:p,position:"relative",px:g?1.5:2.5,py:g?1.5:2.5,shadow:"lg",width:g?"335px":"100%",zIndex:11,children:[n.jsxs($,{alignItems:"center",display:"flex",flexDirection:"column",width:"100%",children:[g?v:void 0,g?n.jsx($,{alignItems:"center",height:j,justify:"center",mr:0,children:n.jsx($,{bgColor:h.palette.gray[100],left:"0",position:"absolute",textAlign:"center",width:"100%",children:S})}):S,n.jsxs($,{display:"flex",flexDirection:"column",gap:.5,mb:1.5,mt:1.5,children:[g?void 0:v,n.jsx(Cn,{description:l,highlightDescription:s,mobile:g})]})]}),o&&n.jsx($,{mb:1,scroll:"y",children:n.jsx($,{height:"100%",children:o})}),n.jsxs($,{alignItems:"flex-start",display:"flex",gap:1,justify:g?"start":"center",children:[c.lodashExports.isObject(r)?n.jsx(P,{onClick:k,variant:(r==null?void 0:r.variant)??"primary",children:r==null?void 0:r.text},r==null?void 0:r.key):void 0,c.lodashExports.isObject(t)?n.jsx(P,{onClick:w,variant:(t==null?void 0:t.variant)??"tertiary",children:t==null?void 0:t.text},t==null?void 0:t.key):void 0]})]})});return e?se.createPortal(T,a??document.body):T},La=c.st.div.attrs({className:"comp-scroll-up"})`
2462
2472
  position: fixed;
2463
2473
  bottom: ${({bottom:e})=>e??"unset"};
2464
2474
  right: ${({right:e})=>e??"unset"};