streamlit-nightly 1.53.2.dev20260127__py3-none-any.whl → 1.53.2.dev20260131__py3-none-any.whl

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 (225) hide show
  1. streamlit/config.py +14 -2
  2. streamlit/config_util.py +63 -8
  3. streamlit/elements/deck_gl_json_chart.py +5 -1
  4. streamlit/elements/lib/built_in_chart_utils.py +24 -4
  5. streamlit/elements/lib/color_util.py +20 -1
  6. streamlit/elements/vega_charts.py +24 -4
  7. streamlit/proto/Alert_pb2.py +2 -3
  8. streamlit/proto/AppPage_pb2.py +2 -3
  9. streamlit/proto/ArrowData_pb2.py +2 -3
  10. streamlit/proto/ArrowNamedDataSet_pb2.py +2 -3
  11. streamlit/proto/ArrowVegaLiteChart_pb2.py +2 -3
  12. streamlit/proto/Arrow_pb2.py +11 -18
  13. streamlit/proto/Arrow_pb2.pyi +1 -42
  14. streamlit/proto/AudioInput_pb2.py +2 -3
  15. streamlit/proto/Audio_pb2.py +2 -3
  16. streamlit/proto/AuthRedirect_pb2.py +2 -3
  17. streamlit/proto/AutoRerun_pb2.py +2 -3
  18. streamlit/proto/BackMsg_pb2.py +2 -3
  19. streamlit/proto/Balloons_pb2.py +2 -3
  20. streamlit/proto/BidiComponent_pb2.py +2 -3
  21. streamlit/proto/Block_pb2.py +36 -43
  22. streamlit/proto/Block_pb2.pyi +3 -48
  23. streamlit/proto/BokehChart_pb2.py +2 -3
  24. streamlit/proto/ButtonGroup_pb2.py +2 -3
  25. streamlit/proto/ButtonLikeIconPosition_pb2.py +2 -3
  26. streamlit/proto/Button_pb2.py +3 -6
  27. streamlit/proto/Button_pb2.pyi +1 -18
  28. streamlit/proto/CameraInput_pb2.py +2 -3
  29. streamlit/proto/ChatInput_pb2.py +5 -8
  30. streamlit/proto/ChatInput_pb2.pyi +1 -17
  31. streamlit/proto/Checkbox_pb2.py +2 -3
  32. streamlit/proto/ClientState_pb2.py +2 -3
  33. streamlit/proto/Code_pb2.py +3 -6
  34. streamlit/proto/Code_pb2.pyi +1 -18
  35. streamlit/proto/ColorPicker_pb2.py +2 -3
  36. streamlit/proto/Common_pb2.py +7 -8
  37. streamlit/proto/Common_pb2.pyi +2 -10
  38. streamlit/proto/Components_pb2.py +2 -3
  39. streamlit/proto/DateInput_pb2.py +2 -3
  40. streamlit/proto/DateTimeInput_pb2.py +2 -3
  41. streamlit/proto/DeckGlJsonChart_pb2.py +5 -12
  42. streamlit/proto/DeckGlJsonChart_pb2.pyi +1 -54
  43. streamlit/proto/Delta_pb2.py +4 -6
  44. streamlit/proto/Delta_pb2.pyi +5 -14
  45. streamlit/proto/DocString_pb2.py +2 -3
  46. streamlit/proto/DownloadButton_pb2.py +2 -3
  47. streamlit/proto/Element_pb2.py +4 -7
  48. streamlit/proto/Element_pb2.pyi +3 -23
  49. streamlit/proto/Empty_pb2.py +2 -3
  50. streamlit/proto/Exception_pb2.py +2 -3
  51. streamlit/proto/Favicon_pb2.py +2 -3
  52. streamlit/proto/FileUploader_pb2.py +2 -3
  53. streamlit/proto/ForwardMsg_pb2.py +12 -18
  54. streamlit/proto/ForwardMsg_pb2.pyi +4 -48
  55. streamlit/proto/GapSize_pb2.py +2 -3
  56. streamlit/proto/GitInfo_pb2.py +2 -3
  57. streamlit/proto/GraphVizChart_pb2.py +3 -6
  58. streamlit/proto/GraphVizChart_pb2.pyi +1 -18
  59. streamlit/proto/Heading_pb2.py +2 -3
  60. streamlit/proto/HeightConfig_pb2.py +2 -3
  61. streamlit/proto/Html_pb2.py +2 -3
  62. streamlit/proto/IFrame_pb2.py +3 -10
  63. streamlit/proto/IFrame_pb2.pyi +1 -42
  64. streamlit/proto/Image_pb2.py +3 -6
  65. streamlit/proto/Image_pb2.pyi +1 -18
  66. streamlit/proto/Json_pb2.py +2 -3
  67. streamlit/proto/LabelVisibilityMessage_pb2.py +2 -3
  68. streamlit/proto/LinkButton_pb2.py +2 -3
  69. streamlit/proto/Logo_pb2.py +2 -3
  70. streamlit/proto/Markdown_pb2.py +2 -3
  71. streamlit/proto/Metric_pb2.py +2 -3
  72. streamlit/proto/MetricsEvent_pb2.py +2 -3
  73. streamlit/proto/MultiSelect_pb2.py +3 -6
  74. streamlit/proto/MultiSelect_pb2.pyi +1 -11
  75. streamlit/proto/Navigation_pb2.py +2 -3
  76. streamlit/proto/NewSession_pb2.py +27 -26
  77. streamlit/proto/NewSession_pb2.pyi +24 -12
  78. streamlit/proto/NumberInput_pb2.py +2 -3
  79. streamlit/proto/PageConfig_pb2.py +2 -3
  80. streamlit/proto/PageInfo_pb2.py +2 -3
  81. streamlit/proto/PageLink_pb2.py +2 -3
  82. streamlit/proto/PageNotFound_pb2.py +2 -3
  83. streamlit/proto/PageProfile_pb2.py +2 -3
  84. streamlit/proto/ParentMessage_pb2.py +2 -3
  85. streamlit/proto/PlotlyChart_pb2.py +5 -10
  86. streamlit/proto/PlotlyChart_pb2.pyi +1 -58
  87. streamlit/proto/Progress_pb2.py +2 -3
  88. streamlit/proto/Radio_pb2.py +3 -6
  89. streamlit/proto/Radio_pb2.pyi +2 -19
  90. streamlit/proto/RootContainer_pb2.py +2 -3
  91. streamlit/proto/Selectbox_pb2.py +3 -6
  92. streamlit/proto/Selectbox_pb2.pyi +2 -19
  93. streamlit/proto/SessionEvent_pb2.py +2 -3
  94. streamlit/proto/SessionStatus_pb2.py +2 -3
  95. streamlit/proto/Skeleton_pb2.py +2 -3
  96. streamlit/proto/Slider_pb2.py +2 -3
  97. streamlit/proto/Snow_pb2.py +2 -3
  98. streamlit/proto/Space_pb2.py +2 -3
  99. streamlit/proto/Spinner_pb2.py +2 -3
  100. streamlit/proto/TextAlignmentConfig_pb2.py +2 -3
  101. streamlit/proto/TextArea_pb2.py +3 -6
  102. streamlit/proto/TextArea_pb2.pyi +1 -18
  103. streamlit/proto/TextInput_pb2.py +2 -3
  104. streamlit/proto/Text_pb2.py +2 -3
  105. streamlit/proto/TimeInput_pb2.py +2 -3
  106. streamlit/proto/Toast_pb2.py +2 -3
  107. streamlit/proto/Transient_pb2.py +2 -3
  108. streamlit/proto/Video_pb2.py +2 -3
  109. streamlit/proto/WidgetStates_pb2.py +2 -3
  110. streamlit/proto/WidthConfig_pb2.py +2 -3
  111. streamlit/proto/openmetrics_data_model_pb2.py +2 -3
  112. streamlit/runtime/app_session.py +19 -0
  113. streamlit/runtime/runtime.py +0 -4
  114. streamlit/static/index.html +1 -1
  115. streamlit/static/manifest.json +296 -296
  116. streamlit/static/static/js/{ErrorOutline.esm.DiaGWPsE.js → ErrorOutline.esm.DC6KVDKK.js} +1 -1
  117. streamlit/static/static/js/{FileDownload.esm.D-Qgpk5d.js → FileDownload.esm.Z9hRQIHi.js} +1 -1
  118. streamlit/static/static/js/{FileHelper.DmtDDGp0.js → FileHelper.DqvW90pm.js} +1 -1
  119. streamlit/static/static/js/{FormClearHelper.BM3uDLnU.js → FormClearHelper.DTFnX0js.js} +1 -1
  120. streamlit/static/static/js/{InputInstructions.B2YZ5Lle.js → InputInstructions.CdzsN_Va.js} +1 -1
  121. streamlit/static/static/js/{Particles.BzfZrl-0.js → Particles.12xFSjcn.js} +1 -1
  122. streamlit/static/static/js/{ProgressBar.DWErD3j3.js → ProgressBar.Dg-oMbWg.js} +1 -1
  123. streamlit/static/static/js/{StreamlitSyntaxHighlighter.DB31rUPf.js → StreamlitSyntaxHighlighter.rbzmcipw.js} +1 -1
  124. streamlit/static/static/js/{TableChart.esm.D3oUYYYd.js → TableChart.esm.CzJtGIR-.js} +1 -1
  125. streamlit/static/static/js/{Toolbar.CPyjMABY.js → Toolbar.COH7NaOE.js} +1 -1
  126. streamlit/static/static/js/{WidgetLabelHelpIconInline.C1NBCx-y.js → WidgetLabelHelpIconInline.Dlc8f0Ji.js} +1 -1
  127. streamlit/static/static/js/{base-input.C_CrNgNd.js → base-input.Q-zJLgRK.js} +4 -4
  128. streamlit/static/static/js/{checkbox.S6O8DPFl.js → checkbox.BKgWNdeI.js} +1 -1
  129. streamlit/static/static/js/{createDownloadLinkElement.B-5tIJBw.js → createDownloadLinkElement.6oO-YlYv.js} +1 -1
  130. streamlit/static/static/js/{data-grid-overlay-editor.BW5aAEJN.js → data-grid-overlay-editor.CO0xdNiG.js} +1 -1
  131. streamlit/static/static/js/{downloader.BswLlj7p.js → downloader.BBXcXdX1.js} +1 -1
  132. streamlit/static/static/js/{embed.QjYZXbaW.js → embed.CJzOXYBF.js} +1 -1
  133. streamlit/static/static/js/{es6.Dm_kl6Cp.js → es6.CdxPQzwJ.js} +2 -2
  134. streamlit/static/static/js/{formatNumber.CH39oSMw.js → formatNumber.DB5irY8c.js} +1 -1
  135. streamlit/static/static/js/{iconPosition.Dp9f2jam.js → iconPosition.BVScIr6G.js} +1 -1
  136. streamlit/static/static/js/{iframeResizer.contentWindow.DOprY46-.js → iframeResizer.contentWindow.D_QHVqPM.js} +1 -1
  137. streamlit/static/static/js/{index.CAzk7fUP.js → index.6DFY6LUF.js} +1 -1
  138. streamlit/static/static/js/{index.BBVcEzWu.js → index.B80gSxrS.js} +1 -1
  139. streamlit/static/static/js/{index.6UQ__fP7.js → index.BDtN2n7T.js} +1 -1
  140. streamlit/static/static/js/{index.BYjec3-R.js → index.BED2_zc7.js} +1 -1
  141. streamlit/static/static/js/{index.DMwRlpNi.js → index.BQnLeHnr.js} +1 -1
  142. streamlit/static/static/js/{index.s9zpEF8P.js → index.BSYebegS.js} +1 -1
  143. streamlit/static/static/js/{index.6OwBTJdz.js → index.BSpYHDvk.js} +1 -1
  144. streamlit/static/static/js/{index.BUbgW8RJ.js → index.BiCbrx53.js} +1 -1
  145. streamlit/static/static/js/{index.CYxcFtYt.js → index.Biyf9aUg.js} +1 -1
  146. streamlit/static/static/js/{index.BQu5Qf_i.js → index.BqbKiDp2.js} +1 -1
  147. streamlit/static/static/js/{index.BcUwq6kI.js → index.BqxwnMem.js} +1 -1
  148. streamlit/static/static/js/{index.CDZffl1q.js → index.BtOoVQt7.js} +1 -1
  149. streamlit/static/static/js/{index.C57ViuAX.js → index.BxMkW82k.js} +1 -1
  150. streamlit/static/static/js/{index.DypwtfIh.js → index.BxQxTpWl.js} +1 -1
  151. streamlit/static/static/js/{index.BaKZ4ira.js → index.C5oqIM3a.js} +1 -1
  152. streamlit/static/static/js/{index.tjRGlTlQ.js → index.CBE2cIbj.js} +1 -1
  153. streamlit/static/static/js/{index.Cb7V19H9.js → index.CE2WIFD1.js} +1 -1
  154. streamlit/static/static/js/{index.lMhsw-5K.js → index.CPc_uZux.js} +50 -50
  155. streamlit/static/static/js/{index.CfXTal6g.js → index.CUYi3FrD.js} +1 -1
  156. streamlit/static/static/js/index.Cpu2p5bH.js +1 -0
  157. streamlit/static/static/js/{index.OI2eh_me.js → index.CrY1BsL3.js} +1 -1
  158. streamlit/static/static/js/{index.B9XI6y3j.js → index.CtbETWQK.js} +1 -1
  159. streamlit/static/static/js/{index.6iOQDEVC.js → index.CvtybR-u.js} +1 -1
  160. streamlit/static/static/js/{index.DK9Im19R.js → index.CxoREvnF.js} +1 -1
  161. streamlit/static/static/js/{index.DsZNm1_D.js → index.D6OexhdL.js} +1 -1
  162. streamlit/static/static/js/{index.Ci3x7GcT.js → index.D9v2Y8Gk.js} +1 -1
  163. streamlit/static/static/js/{index.BFxjXeYb.js → index.DAfIQKfP.js} +1 -1
  164. streamlit/static/static/js/index.DAnczAW2.js +2 -0
  165. streamlit/static/static/js/{index.D1tkD8Lg.js → index.DAyGxxdm.js} +1 -1
  166. streamlit/static/static/js/{index.BNsCI-Q1.js → index.DCe7fo-m.js} +1 -1
  167. streamlit/static/static/js/{index.B6Sk5Jwr.js → index.DNfyKqhQ.js} +1 -1
  168. streamlit/static/static/js/{index.BlgpfTUq.js → index.DRoJNzFX.js} +1 -1
  169. streamlit/static/static/js/{index.CkSzTTpO.js → index.DU68jVpM.js} +54 -54
  170. streamlit/static/static/js/{index.TTO_Lb69.js → index.DZmBuE3z.js} +2 -2
  171. streamlit/static/static/js/{index.Cw5Xlisw.js → index.DhRAGiPR.js} +1 -1
  172. streamlit/static/static/js/{index.BUOjbZl6.js → index.DrcbvB2t.js} +1 -1
  173. streamlit/static/static/js/{index.wKGUZfH4.js → index.Dud7RRHc.js} +1 -1
  174. streamlit/static/static/js/{index.BxtweGcn.js → index.DyXcT2tD.js} +1 -1
  175. streamlit/static/static/js/{index.X1r5cenD.js → index.DyfvmNCy.js} +222 -222
  176. streamlit/static/static/js/{index.JKOtpaMf.js → index.GieKl4BG.js} +1 -1
  177. streamlit/static/static/js/{index.CuJ82OKQ.js → index.YULCxEtm.js} +1 -1
  178. streamlit/static/static/js/{index.-7yn3zqE.js → index._1zqETQ9.js} +2 -2
  179. streamlit/static/static/js/{index.gsc49XzN.js → index.bQJYmJ2T.js} +1 -1
  180. streamlit/static/static/js/{index.BlchQrZL.js → index.iXh5nbLZ.js} +1 -1
  181. streamlit/static/static/js/index.mSdC1FV6.js +1 -0
  182. streamlit/static/static/js/{index.DoRYpzHm.js → index.nL1fkE1D.js} +1 -1
  183. streamlit/static/static/js/{index.4QSKV4yi.js → index.tuFFlbxa.js} +1 -1
  184. streamlit/static/static/js/{index.Bwaj-9Zv.js → index.y-pa6LIX.js} +1 -1
  185. streamlit/static/static/js/{input.CIKqvWjB.js → input.BcC6sPE_.js} +1 -1
  186. streamlit/static/static/js/{main.BkNqoTrd.js → main.TU5_aabd.js} +1 -1
  187. streamlit/static/static/js/{memory.DNcbFok2.js → memory.By_OTlI4.js} +1 -1
  188. streamlit/static/static/js/{number-overlay-editor.DwjiYKav.js → number-overlay-editor.FSRaRpbU.js} +1 -1
  189. streamlit/static/static/js/{pandasStylerUtils.BSc50we3.js → pandasStylerUtils.3IiIKU9-.js} +1 -1
  190. streamlit/static/static/js/{sandbox.DJL9Gdcf.js → sandbox.DnxTbWzV.js} +1 -1
  191. streamlit/static/static/js/{styled-components.D4jE1G9j.js → styled-components.BeEcZ0vW.js} +1 -1
  192. streamlit/static/static/js/{throttle.dHeXiPIK.js → throttle.emUyC44c.js} +1 -1
  193. streamlit/static/static/js/{timepicker.CIpoSUyW.js → timepicker.DZ_ZufYF.js} +1 -1
  194. streamlit/static/static/js/{toConsumableArray.AOXQx2YY.js → toConsumableArray.DDV1bN1-.js} +1 -1
  195. streamlit/static/static/js/uniqueId.DTwvAE-J.js +1 -0
  196. streamlit/static/static/js/{useBasicWidgetState.BwQxG7iA.js → useBasicWidgetState.DvpdEDYZ.js} +1 -1
  197. streamlit/static/static/js/{useIntlLocale.JXPZPWaJ.js → useIntlLocale.BBDLbTq9.js} +1 -1
  198. streamlit/static/static/js/{useTextInputAutoExpand.CD_nhoE_.js → useTextInputAutoExpand.BIApLJKn.js} +1 -1
  199. streamlit/static/static/js/{useUpdateUiValue.Cl1Y22Ao.js → useUpdateUiValue.DQ4RuJNC.js} +1 -1
  200. streamlit/static/static/js/{useWaveformController.DJhScSDn.js → useWaveformController.B0olyXLQ.js} +1 -1
  201. streamlit/static/static/js/{withCalculatedWidth.CrAfFzO9.js → withCalculatedWidth.DYeqePuh.js} +1 -1
  202. streamlit/static/static/js/{withFullScreenWrapper.EdE3zOz5.js → withFullScreenWrapper.DtkUCO_d.js} +1 -1
  203. streamlit/testing/v1/element_tree.py +16 -2
  204. streamlit/web/bootstrap.py +5 -2
  205. streamlit/web/server/server.py +0 -1
  206. streamlit/web/server/server_util.py +22 -0
  207. streamlit/web/server/starlette/starlette_app.py +0 -1
  208. {streamlit_nightly-1.53.2.dev20260127.dist-info → streamlit_nightly-1.53.2.dev20260131.dist-info}/METADATA +10 -25
  209. {streamlit_nightly-1.53.2.dev20260127.dist-info → streamlit_nightly-1.53.2.dev20260131.dist-info}/RECORD +212 -221
  210. streamlit/proto/DataFrame_pb2.py +0 -56
  211. streamlit/proto/DataFrame_pb2.pyi +0 -430
  212. streamlit/proto/NamedDataSet_pb2.py +0 -28
  213. streamlit/proto/NamedDataSet_pb2.pyi +0 -67
  214. streamlit/proto/PagesChanged_pb2.py +0 -28
  215. streamlit/proto/PagesChanged_pb2.pyi +0 -55
  216. streamlit/proto/VegaLiteChart_pb2.py +0 -29
  217. streamlit/proto/VegaLiteChart_pb2.pyi +0 -79
  218. streamlit/static/static/js/index.B0Wcvg8a.js +0 -2
  219. streamlit/static/static/js/index.CivdhE_9.js +0 -1
  220. streamlit/static/static/js/index.DTUAvbJ0.js +0 -1
  221. streamlit/static/static/js/uniqueId.DRPc21MO.js +0 -1
  222. streamlit_nightly-1.53.2.dev20260127.data/scripts/streamlit.cmd +0 -16
  223. {streamlit_nightly-1.53.2.dev20260127.dist-info → streamlit_nightly-1.53.2.dev20260131.dist-info}/WHEEL +0 -0
  224. {streamlit_nightly-1.53.2.dev20260127.dist-info → streamlit_nightly-1.53.2.dev20260131.dist-info}/entry_points.txt +0 -0
  225. {streamlit_nightly-1.53.2.dev20260127.dist-info → streamlit_nightly-1.53.2.dev20260131.dist-info}/top_level.txt +0 -0
@@ -1,2 +1,2 @@
1
- import{al as Ge,am as Q,r as _,bR as mt,an as bt,w as J,bo as yt,bp as Tt,z as se,l as kt,bS as Ot,bT as wt,bU as Rt,j as Z,q as De,o as xe,p as St,ab as Mt,ac as $t,bV as oe}from"./index.lMhsw-5K.js";import{h as _t}from"./moment.C7qA8nIE.js";import{w as Et}from"./withCalculatedWidth.CrAfFzO9.js";import{u as It}from"./useBasicWidgetState.BwQxG7iA.js";import{f as Dt}from"./formatMoment.C6Hwn6X5.js";import{f as xt}from"./formatNumber.CH39oSMw.js";import"./FormClearHelper.BM3uDLnU.js";import"./numbro.B9_PXfzp.js";import"./sprintf.DpPCfzXw.js";var ce={},H={},le={},de={},He;function Ce(){if(He)return de;He=1,Object.defineProperty(de,"__esModule",{value:!0}),de.Direction=void 0;var e;return(function(r){r.Right="to right",r.Left="to left",r.Down="to bottom",r.Up="to top"})(e||(de.Direction=e={})),de}var We;function Je(){return We||(We=1,(function(e){var r=le&&le.__spreadArray||function(i,s,u){if(u||arguments.length===2)for(var p=0,m=s.length,v;p<m;p++)(v||!(p in s))&&(v||(v=Array.prototype.slice.call(s,0,p)),v[p]=s[p]);return i.concat(v||Array.prototype.slice.call(s))};Object.defineProperty(e,"__esModule",{value:!0}),e.isIOS=e.useThumbOverlap=e.assertUnreachable=e.voidFn=e.getTrackBackground=e.replaceAt=e.schd=e.translate=e.getClosestThumbIndex=e.translateThumbs=e.getPaddingAndBorder=e.getMargin=e.checkInitialOverlap=e.checkValuesAgainstBoundaries=e.checkBoundaries=e.isVertical=e.relativeValue=e.normalizeValue=e.isStepDivisible=e.isTouchEvent=e.getStepDecimals=void 0;var n=Ge(),o=Ce(),h=function(i){var s=i.toString().split(".")[1];return s?s.length:0};e.getStepDecimals=h;function O(i){return i.touches&&i.touches.length||i.changedTouches&&i.changedTouches.length}e.isTouchEvent=O;function l(i,s,u){var p=(s-i)/u,m=8,v=Number(p.toFixed(m));return parseInt(v.toString(),10)===v}e.isStepDivisible=l;function g(i,s,u,p,m,v,b){var $=1e11;if(i=Math.round(i*$)/$,!v){var C=b[s-1],E=b[s+1];if(C&&C>i)return C;if(E&&E<i)return E}if(i>p)return p;if(i<u)return u;var U=Math.floor(i*$-u*$)%Math.floor(m*$),z=Math.floor(i*$-Math.abs(U)),W=U===0?i:z/$,A=Math.abs(U/$)<m/2?W:W+m,B=(0,e.getStepDecimals)(m);return parseFloat(A.toFixed(B))}e.normalizeValue=g;function F(i,s,u){return(i-s)/(u-s)}e.relativeValue=F;function V(i){return i===o.Direction.Up||i===o.Direction.Down}e.isVertical=V;function j(i,s,u){if(s>=u)throw new RangeError("min (".concat(s,") is equal/bigger than max (").concat(u,")"));if(i<s)throw new RangeError("value (".concat(i,") is smaller than min (").concat(s,")"));if(i>u)throw new RangeError("value (".concat(i,") is bigger than max (").concat(u,")"))}e.checkBoundaries=j;function I(i,s,u){return i<s?s:i>u?u:i}e.checkValuesAgainstBoundaries=I;function T(i){if(!(i.length<2)&&!i.slice(1).every(function(s,u){return i[u]<=s}))throw new RangeError("values={[".concat(i,"]} needs to be sorted when allowOverlap={false}"))}e.checkInitialOverlap=T;function d(i){var s=window.getComputedStyle(i);return{top:parseInt(s["margin-top"],10),bottom:parseInt(s["margin-bottom"],10),left:parseInt(s["margin-left"],10),right:parseInt(s["margin-right"],10)}}e.getMargin=d;function t(i){var s=window.getComputedStyle(i);return{top:parseInt(s["padding-top"],10)+parseInt(s["border-top-width"],10),bottom:parseInt(s["padding-bottom"],10)+parseInt(s["border-bottom-width"],10),left:parseInt(s["padding-left"],10)+parseInt(s["border-left-width"],10),right:parseInt(s["padding-right"],10)+parseInt(s["border-right-width"],10)}}e.getPaddingAndBorder=t;function a(i,s,u){var p=u?-1:1;i.forEach(function(m,v){return f(m,p*s[v].x,s[v].y)})}e.translateThumbs=a;function c(i,s,u,p){for(var m=0,v=L(i[0],s,u,p),b=1;b<i.length;b++){var $=L(i[b],s,u,p);$<v&&(v=$,m=b)}return m}e.getClosestThumbIndex=c;function f(i,s,u){i.style.transform="translate(".concat(s,"px, ").concat(u,"px)")}e.translate=f;var y=function(i){var s=[],u=null,p=function(){for(var m=[],v=0;v<arguments.length;v++)m[v]=arguments[v];s=m,!u&&(u=requestAnimationFrame(function(){u=null,i.apply(void 0,s)}))};return p};e.schd=y;function k(i,s,u){var p=i.slice(0);return p[s]=u,p}e.replaceAt=k;function D(i){var s=i.values,u=i.colors,p=i.min,m=i.max,v=i.direction,b=v===void 0?o.Direction.Right:v,$=i.rtl,C=$===void 0?!1:$;C&&b===o.Direction.Right?b=o.Direction.Left:C&&o.Direction.Left&&(b=o.Direction.Right);var E=s.slice(0).sort(function(z,W){return z-W}).map(function(z){return(z-p)/(m-p)*100}),U=E.reduce(function(z,W,A){return"".concat(z,", ").concat(u[A]," ").concat(W,"%, ").concat(u[A+1]," ").concat(W,"%")},"");return"linear-gradient(".concat(b,", ").concat(u[0]," 0%").concat(U,", ").concat(u[u.length-1]," 100%)")}e.getTrackBackground=D;function w(){}e.voidFn=w;function R(i){throw new Error("Didn't expect to get here")}e.assertUnreachable=R;var M=function(i,s,u,p,m){m===void 0&&(m=function(b){return b});var v=Math.ceil(r([i],Array.from(i.children),!0).reduce(function(b,$){var C=Math.ceil($.getBoundingClientRect().width);if($.innerText&&$.innerText.includes(u)&&$.childElementCount===0){var E=$.cloneNode(!0);E.innerHTML=m(s.toFixed(p)),E.style.visibility="hidden",document.body.appendChild(E),C=Math.ceil(E.getBoundingClientRect().width),document.body.removeChild(E)}return C>b?C:b},i.getBoundingClientRect().width));return v},P=function(i,s,u,p,m,v,b){b===void 0&&(b=function(E){return E});var $=[],C=function(E){var U=M(u[E],p[E],m,v,b),z=s[E].x;s.forEach(function(W,A){var B=W.x,G=M(u[A],p[A],m,v,b);E!==A&&(z>=B&&z<=B+G||z+U>=B&&z+U<=B+G)&&($.includes(A)||($.push(E),$.push(A),$=r(r([],$,!0),[E,A],!1),C(A)))})};return C(i),Array.from(new Set($.sort()))},S=function(i,s,u,p,m,v){p===void 0&&(p=.1),m===void 0&&(m=" - "),v===void 0&&(v=function(A){return A});var b=(0,e.getStepDecimals)(p),$=(0,n.useState)({}),C=$[0],E=$[1],U=(0,n.useState)(v(s[u].toFixed(b))),z=U[0],W=U[1];return(0,n.useEffect)(function(){if(i){var A=i.getThumbs();if(A.length<1)return;var B={},G=i.getOffsets(),ne=P(u,G,A,s,m,b,v),he=v(s[u].toFixed(b));if(ne.length){var ee=ne.reduce(function(te,ue,me,be){return te.length?r(r([],te,!0),[G[be[me]].x],!1):[G[be[me]].x]},[]);if(Math.min.apply(Math,ee)===G[u].x){var ge=[];ne.forEach(function(te){ge.push(s[te].toFixed(b))}),he=Array.from(new Set(ge.sort(function(te,ue){return parseFloat(te)-parseFloat(ue)}))).map(v).join(m);var pe=Math.min.apply(Math,ee),ve=Math.max.apply(Math,ee),Ie=A[ne[ee.indexOf(ve)]].getBoundingClientRect().width;B.left="".concat(Math.abs(pe-(ve+Ie))/2,"px"),B.transform="translate(-50%, 0)"}else B.visibility="hidden"}W(he),E(B)}},[i,s]),[z,C]};e.useThumbOverlap=S;function L(i,s,u,p){var m=i.getBoundingClientRect(),v=m.left,b=m.top,$=m.width,C=m.height;return V(p)?Math.abs(u-(b+C/2)):Math.abs(s-(v+$/2))}var x=function(){var i,s=((i=navigator.userAgentData)===null||i===void 0?void 0:i.platform)||navigator.platform;return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(s)||navigator.userAgent.includes("Mac")&&"ontouchend"in document};e.isIOS=x})(le)),le}var qe;function Ct(){if(qe)return H;qe=1;var e=H&&H.__extends||(function(){var I=function(T,d){return I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,a){t.__proto__=a}||function(t,a){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(t[c]=a[c])},I(T,d)};return function(T,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");I(T,d);function t(){this.constructor=T}T.prototype=d===null?Object.create(d):(t.prototype=d.prototype,new t)}})(),r=H&&H.__createBinding||(Object.create?(function(I,T,d,t){t===void 0&&(t=d);var a=Object.getOwnPropertyDescriptor(T,d);(!a||("get"in a?!T.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return T[d]}}),Object.defineProperty(I,t,a)}):(function(I,T,d,t){t===void 0&&(t=d),I[t]=T[d]})),n=H&&H.__setModuleDefault||(Object.create?(function(I,T){Object.defineProperty(I,"default",{enumerable:!0,value:T})}):function(I,T){I.default=T}),o=H&&H.__importStar||function(I){if(I&&I.__esModule)return I;var T={};if(I!=null)for(var d in I)d!=="default"&&Object.prototype.hasOwnProperty.call(I,d)&&r(T,I,d);return n(T,I),T},h=H&&H.__spreadArray||function(I,T,d){if(d||arguments.length===2)for(var t=0,a=T.length,c;t<a;t++)(c||!(t in T))&&(c||(c=Array.prototype.slice.call(T,0,t)),c[t]=T[t]);return I.concat(c||Array.prototype.slice.call(T))};Object.defineProperty(H,"__esModule",{value:!0});var O=o(Ge()),l=Je(),g=Ce(),F=["ArrowRight","ArrowUp","k","PageUp"],V=["ArrowLeft","ArrowDown","j","PageDown"],j=(function(I){e(T,I);function T(d){var t=I.call(this,d)||this;if(t.trackRef=O.createRef(),t.thumbRefs=[],t.state={draggedTrackPos:[-1,-1],draggedThumbIndex:-1,thumbZIndexes:new Array(t.props.values.length).fill(0).map(function(a,c){return c}),isChanged:!1,markOffsets:[]},t.getOffsets=function(){var a=t.props,c=a.direction,f=a.values,y=a.min,k=a.max,D=t.trackRef.current;if(!D)return console.warn("No track element found."),[];var w=D.getBoundingClientRect(),R=(0,l.getPaddingAndBorder)(D);return t.getThumbs().map(function(M,P){var S={x:0,y:0},L=M.getBoundingClientRect(),x=(0,l.getMargin)(M);switch(c){case g.Direction.Right:return S.x=(x.left+R.left)*-1,S.y=((L.height-w.height)/2+R.top)*-1,S.x+=w.width*(0,l.relativeValue)(f[P],y,k)-L.width/2,S;case g.Direction.Left:return S.x=(x.right+R.right)*-1,S.y=((L.height-w.height)/2+R.top)*-1,S.x+=w.width-w.width*(0,l.relativeValue)(f[P],y,k)-L.width/2,S;case g.Direction.Up:return S.x=((L.width-w.width)/2+x.left+R.left)*-1,S.y=-R.left,S.y+=w.height-w.height*(0,l.relativeValue)(f[P],y,k)-L.height/2,S;case g.Direction.Down:return S.x=((L.width-w.width)/2+x.left+R.left)*-1,S.y=-R.left,S.y+=w.height*(0,l.relativeValue)(f[P],y,k)-L.height/2,S;default:return(0,l.assertUnreachable)(c)}})},t.getThumbs=function(){return t.trackRef&&t.trackRef.current?Array.from(t.trackRef.current.children).filter(function(a){return a.hasAttribute("aria-valuenow")}):(console.warn("No thumbs found in the track container. Did you forget to pass & spread the `props` param in renderTrack?"),[])},t.getTargetIndex=function(a){return t.getThumbs().findIndex(function(c){return c===a.target||c.contains(a.target)})},t.addTouchEvents=function(a){document.addEventListener("touchmove",t.schdOnTouchMove,{passive:!1}),document.addEventListener("touchend",t.schdOnEnd,{passive:!1}),document.addEventListener("touchcancel",t.schdOnEnd,{passive:!1})},t.addMouseEvents=function(a){document.addEventListener("mousemove",t.schdOnMouseMove),document.addEventListener("mouseup",t.schdOnEnd)},t.onMouseDownTrack=function(a){var c;if(!(a.button!==0||(0,l.isIOS)()))if(a.persist(),a.preventDefault(),t.addMouseEvents(a.nativeEvent),t.props.values.length>1&&t.props.draggableTrack){if(t.thumbRefs.some(function(y){var k;return(k=y.current)===null||k===void 0?void 0:k.contains(a.target)}))return;t.setState({draggedTrackPos:[a.clientX,a.clientY]},function(){return t.onMove(a.clientX,a.clientY)})}else{var f=(0,l.getClosestThumbIndex)(t.thumbRefs.map(function(y){return y.current}),a.clientX,a.clientY,t.props.direction);(c=t.thumbRefs[f].current)===null||c===void 0||c.focus(),t.setState({draggedThumbIndex:f},function(){return t.onMove(a.clientX,a.clientY)})}},t.onResize=function(){(0,l.translateThumbs)(t.getThumbs(),t.getOffsets(),t.props.rtl),t.calculateMarkOffsets()},t.onTouchStartTrack=function(a){var c;if(a.persist(),t.addTouchEvents(a.nativeEvent),t.props.values.length>1&&t.props.draggableTrack){if(t.thumbRefs.some(function(y){var k;return(k=y.current)===null||k===void 0?void 0:k.contains(a.target)}))return;t.setState({draggedTrackPos:[a.touches[0].clientX,a.touches[0].clientY]},function(){return t.onMove(a.touches[0].clientX,a.touches[0].clientY)})}else{var f=(0,l.getClosestThumbIndex)(t.thumbRefs.map(function(y){return y.current}),a.touches[0].clientX,a.touches[0].clientY,t.props.direction);(c=t.thumbRefs[f].current)===null||c===void 0||c.focus(),t.setState({draggedThumbIndex:f},function(){return t.onMove(a.touches[0].clientX,a.touches[0].clientY)})}},t.onMouseOrTouchStart=function(a){if(!t.props.disabled){var c=(0,l.isTouchEvent)(a);if(!(!c&&a.button!==0)){var f=t.getTargetIndex(a);f!==-1&&(c?t.addTouchEvents(a):t.addMouseEvents(a),t.setState({draggedThumbIndex:f,thumbZIndexes:t.state.thumbZIndexes.map(function(y,k){return k===f?Math.max.apply(Math,t.state.thumbZIndexes):y<=t.state.thumbZIndexes[f]?y:y-1})}))}}},t.onMouseMove=function(a){a.preventDefault(),t.onMove(a.clientX,a.clientY)},t.onTouchMove=function(a){a.preventDefault(),t.onMove(a.touches[0].clientX,a.touches[0].clientY)},t.onKeyDown=function(a){var c=t.props,f=c.values,y=c.onChange,k=c.step,D=c.rtl,w=c.direction,R=t.state.isChanged,M=t.getTargetIndex(a.nativeEvent),P=D||w===g.Direction.Left||w===g.Direction.Down?-1:1;M!==-1&&(F.includes(a.key)?(a.preventDefault(),t.setState({draggedThumbIndex:M,isChanged:!0}),y((0,l.replaceAt)(f,M,t.normalizeValue(f[M]+P*(a.key==="PageUp"?k*10:k),M)))):V.includes(a.key)?(a.preventDefault(),t.setState({draggedThumbIndex:M,isChanged:!0}),y((0,l.replaceAt)(f,M,t.normalizeValue(f[M]-P*(a.key==="PageDown"?k*10:k),M)))):a.key==="Tab"?t.setState({draggedThumbIndex:-1},function(){R&&t.fireOnFinalChange()}):R&&t.fireOnFinalChange())},t.onKeyUp=function(a){var c=t.state.isChanged;t.setState({draggedThumbIndex:-1},function(){c&&t.fireOnFinalChange()})},t.onMove=function(a,c){var f=t.state,y=f.draggedThumbIndex,k=f.draggedTrackPos,D=t.props,w=D.direction,R=D.min,M=D.max,P=D.onChange,S=D.values,L=D.step,x=D.rtl;if(y===-1&&k[0]===-1&&k[1]===-1)return null;var i=t.trackRef.current;if(!i)return null;var s=i.getBoundingClientRect(),u=(0,l.isVertical)(w)?s.height:s.width;if(k[0]!==-1&&k[1]!==-1){var p=a-k[0],m=c-k[1],v=0;switch(w){case g.Direction.Right:case g.Direction.Left:v=p/u*(M-R);break;case g.Direction.Down:case g.Direction.Up:v=m/u*(M-R);break;default:(0,l.assertUnreachable)(w)}if(x&&(v*=-1),Math.abs(v)>=L/2){for(var b=0;b<t.thumbRefs.length;b++){if(S[b]===M&&Math.sign(v)===1||S[b]===R&&Math.sign(v)===-1)return;var $=S[b]+v;$>M?v=M-S[b]:$<R&&(v=R-S[b])}for(var C=S.slice(0),b=0;b<t.thumbRefs.length;b++)C=(0,l.replaceAt)(C,b,t.normalizeValue(S[b]+v,b));t.setState({draggedTrackPos:[a,c]}),P(C)}}else{var E=0;switch(w){case g.Direction.Right:E=(a-s.left)/u*(M-R)+R;break;case g.Direction.Left:E=(u-(a-s.left))/u*(M-R)+R;break;case g.Direction.Down:E=(c-s.top)/u*(M-R)+R;break;case g.Direction.Up:E=(u-(c-s.top))/u*(M-R)+R;break;default:(0,l.assertUnreachable)(w)}x&&(E=M+R-E),Math.abs(S[y]-E)>=L/2&&P((0,l.replaceAt)(S,y,t.normalizeValue(E,y)))}},t.normalizeValue=function(a,c){var f=t.props,y=f.min,k=f.max,D=f.step,w=f.allowOverlap,R=f.values;return(0,l.normalizeValue)(a,c,y,k,D,w,R)},t.onEnd=function(a){if(a.preventDefault(),document.removeEventListener("mousemove",t.schdOnMouseMove),document.removeEventListener("touchmove",t.schdOnTouchMove),document.removeEventListener("mouseup",t.schdOnEnd),document.removeEventListener("touchend",t.schdOnEnd),document.removeEventListener("touchcancel",t.schdOnEnd),t.state.draggedThumbIndex===-1&&t.state.draggedTrackPos[0]===-1&&t.state.draggedTrackPos[1]===-1)return null;t.setState({draggedThumbIndex:-1,draggedTrackPos:[-1,-1]},function(){t.fireOnFinalChange()})},t.fireOnFinalChange=function(){t.setState({isChanged:!1});var a=t.props,c=a.onFinalChange,f=a.values;c&&c(f)},t.updateMarkRefs=function(a){if(!a.renderMark){t.numOfMarks=void 0,t.markRefs=void 0;return}t.numOfMarks=(a.max-a.min)/t.props.step,t.markRefs=[];for(var c=0;c<t.numOfMarks+1;c++)t.markRefs[c]=O.createRef()},t.calculateMarkOffsets=function(){if(!(!t.props.renderMark||!t.trackRef||!t.numOfMarks||!t.markRefs||t.trackRef.current===null)){for(var a=window.getComputedStyle(t.trackRef.current),c=parseInt(a.width,10),f=parseInt(a.height,10),y=parseInt(a.paddingLeft,10),k=parseInt(a.paddingTop,10),D=[],w=0;w<t.numOfMarks+1;w++){var R=9999,M=9999;if(t.markRefs[w].current){var P=t.markRefs[w].current.getBoundingClientRect();R=P.height,M=P.width}t.props.direction===g.Direction.Left||t.props.direction===g.Direction.Right?D.push([Math.round(c/t.numOfMarks*w+y-M/2),-Math.round((R-f)/2)]):D.push([Math.round(f/t.numOfMarks*w+k-R/2),-Math.round((M-c)/2)])}t.setState({markOffsets:D})}},d.step===0)throw new Error('"step" property should be a positive number');return t.schdOnMouseMove=(0,l.schd)(t.onMouseMove),t.schdOnTouchMove=(0,l.schd)(t.onTouchMove),t.schdOnEnd=(0,l.schd)(t.onEnd),t.thumbRefs=d.values.map(function(){return O.createRef()}),t.updateMarkRefs(d),t}return T.prototype.componentDidMount=function(){var d=this,t=this.props,a=t.values,c=t.min,f=t.step;this.resizeObserver=window.ResizeObserver?new window.ResizeObserver(this.onResize):{observe:function(){return window.addEventListener("resize",d.onResize)},unobserve:function(){return window.removeEventListener("resize",d.onResize)}},document.addEventListener("touchstart",this.onMouseOrTouchStart,{passive:!1}),document.addEventListener("mousedown",this.onMouseOrTouchStart,{passive:!1}),!this.props.allowOverlap&&(0,l.checkInitialOverlap)(this.props.values),this.props.values.forEach(function(y){return(0,l.checkBoundaries)(y,d.props.min,d.props.max)}),this.resizeObserver.observe(this.trackRef.current),(0,l.translateThumbs)(this.getThumbs(),this.getOffsets(),this.props.rtl),this.calculateMarkOffsets(),a.forEach(function(y){(0,l.isStepDivisible)(c,y,f)||console.warn("The `values` property is in conflict with the current `step`, `min`, and `max` properties. Please provide values that are accessible using the min, max, and step values.")})},T.prototype.componentDidUpdate=function(d,t){var a=this.props,c=a.max,f=a.min,y=a.step,k=a.values,D=a.rtl;(d.max!==c||d.min!==f||d.step!==y)&&this.updateMarkRefs(this.props),(0,l.translateThumbs)(this.getThumbs(),this.getOffsets(),D),(d.max!==c||d.min!==f||d.step!==y||t.markOffsets.length!==this.state.markOffsets.length)&&(this.calculateMarkOffsets(),k.forEach(function(w){(0,l.isStepDivisible)(f,w,y)||console.warn("The `values` property is in conflict with the current `step`, `min`, and `max` properties. Please provide values that are accessible using the min, max, and step values.")}))},T.prototype.componentWillUnmount=function(){var d={passive:!1};document.removeEventListener("mousedown",this.onMouseOrTouchStart,d),document.removeEventListener("mousemove",this.schdOnMouseMove),document.removeEventListener("touchmove",this.schdOnTouchMove),document.removeEventListener("touchstart",this.onMouseOrTouchStart),document.removeEventListener("mouseup",this.schdOnEnd),document.removeEventListener("touchend",this.schdOnEnd),this.resizeObserver.unobserve(this.trackRef.current)},T.prototype.render=function(){var d=this,t=this.props,a=t.label,c=t.labelledBy,f=t.renderTrack,y=t.renderThumb,k=t.renderMark,D=k===void 0?function(){return null}:k,w=t.values,R=t.min,M=t.max,P=t.allowOverlap,S=t.disabled,L=this.state,x=L.draggedThumbIndex,i=L.thumbZIndexes,s=L.markOffsets;return f({props:{style:{transform:"scale(1)",cursor:x>-1?"grabbing":this.props.draggableTrack?(0,l.isVertical)(this.props.direction)?"ns-resize":"ew-resize":w.length===1&&!S?"pointer":"inherit"},onMouseDown:S?l.voidFn:this.onMouseDownTrack,onTouchStart:S?l.voidFn:this.onTouchStartTrack,ref:this.trackRef},isDragged:this.state.draggedThumbIndex>-1,disabled:S,children:h(h([],s.map(function(u,p,m){return D({props:{style:d.props.direction===g.Direction.Left||d.props.direction===g.Direction.Right?{position:"absolute",left:"".concat(u[0],"px"),marginTop:"".concat(u[1],"px")}:{position:"absolute",top:"".concat(u[0],"px"),marginLeft:"".concat(u[1],"px")},key:"mark".concat(p),ref:d.markRefs[p]},index:p})}),!0),w.map(function(u,p){var m=d.state.draggedThumbIndex===p;return y({index:p,value:u,isDragged:m,props:{style:{position:"absolute",zIndex:i[p],cursor:S?"inherit":m?"grabbing":"grab",userSelect:"none",touchAction:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},key:p,tabIndex:S?void 0:0,"aria-valuemax":P?M:w[p+1]||M,"aria-valuemin":P?R:w[p-1]||R,"aria-valuenow":u,draggable:!1,ref:d.thumbRefs[p],"aria-label":a,"aria-labelledby":c,role:"slider",onKeyDown:S?l.voidFn:d.onKeyDown,onKeyUp:S?l.voidFn:d.onKeyUp}})}),!0)})},T.defaultProps={label:"Accessibility label",labelledBy:null,step:1,direction:g.Direction.Right,rtl:!1,disabled:!1,allowOverlap:!1,draggableTrack:!1,min:0,max:100},T})(O.Component);return H.default=j,H}var Ke;function Pt(){return Ke||(Ke=1,(function(e){var r=ce&&ce.__importDefault||function(O){return O&&O.__esModule?O:{default:O}};Object.defineProperty(e,"__esModule",{value:!0}),e.checkValuesAgainstBoundaries=e.relativeValue=e.useThumbOverlap=e.Direction=e.getTrackBackground=e.Range=void 0;var n=r(Ct());e.Range=n.default;var o=Je();Object.defineProperty(e,"getTrackBackground",{enumerable:!0,get:function(){return o.getTrackBackground}}),Object.defineProperty(e,"useThumbOverlap",{enumerable:!0,get:function(){return o.useThumbOverlap}}),Object.defineProperty(e,"relativeValue",{enumerable:!0,get:function(){return o.relativeValue}}),Object.defineProperty(e,"checkValuesAgainstBoundaries",{enumerable:!0,get:function(){return o.checkValuesAgainstBoundaries}});var h=Ce();Object.defineProperty(e,"Direction",{enumerable:!0,get:function(){return h.Direction}})})(ce)),ce}var Qe=Pt();function Xe(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(h){return Object.getOwnPropertyDescriptor(e,h).enumerable})),n.push.apply(n,o)}return n}function Te(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Xe(Object(n),!0).forEach(function(o){Lt(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xe(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function Lt(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}var ke=Q("div",{position:"relative",width:"100%"});ke.displayName="Root";ke.displayName="Root";ke.displayName="StyledRoot";var Oe=Q("div",function(e){var r=e.$theme,n=e.$value,o=n===void 0?[]:n,h=e.$disabled,O=e.$isDragged,l=r.sizing,g="inherit";return h?g="not-allowed":O?g="grabbing":o.length===1&&(g="pointer"),{paddingTop:l.scale600,paddingBottom:l.scale600,paddingRight:l.scale600,paddingLeft:l.scale600,display:"flex",cursor:g,backgroundColor:r.colors.sliderTrackFill}});Oe.displayName="Track";Oe.displayName="Track";Oe.displayName="StyledTrack";var fe=Q("div",function(e){var r=e.$theme,n=e.$value,o=n===void 0?[]:n,h=e.$min,O=e.$max,l=e.$disabled,g=r.colors,F=r.borders,V=r.direction,j=r.borders.useRoundedCorners?F.radius100:0;return{borderTopLeftRadius:j,borderTopRightRadius:j,borderBottomRightRadius:j,borderBottomLeftRadius:j,background:Qe.getTrackBackground({values:o,colors:o.length===1?[l?g.borderOpaque:g.primary,l?g.backgroundSecondary:g.borderOpaque]:[l?g.backgroundSecondary:g.borderOpaque,l?g.borderOpaque:g.primary,l?g.backgroundSecondary:g.borderOpaque],min:h||0,max:O||0,rtl:V==="rtl"}),height:"2px",width:"100%",alignSelf:"center",cursor:l?"not-allowed":"inherit"}});fe.displayName="InnerTrack";fe.displayName="InnerTrack";fe.displayName="StyledInnerTrack";var we=Q("div",function(e){return{width:"4px",height:"2px",backgroundColor:e.$theme.colors.backgroundPrimary,marginLeft:"16px"}});we.displayName="Mark";we.displayName="Mark";we.displayName="StyledMark";var Re=Q("div",function(e){return Te(Te({},e.$theme.typography.font200),{},{color:e.$theme.colors.contentPrimary})});Re.displayName="Tick";Re.displayName="Tick";Re.displayName="StyledTick";var Se=Q("div",function(e){var r=e.$theme,n=r.sizing;return{display:"flex",justifyContent:"space-between",alignItems:"center",paddingRight:n.scale600,paddingLeft:n.scale600,paddingBottom:n.scale400}});Se.displayName="TickBar";Se.displayName="TickBar";Se.displayName="StyledTickBar";var Me=Q("div",function(e){var r=e.$theme,n=e.$value,o=n===void 0?[]:n,h=e.$thumbIndex,O=e.$disabled,l=o.length===2&&h===0,g=o.length===2&&h===1;return r.direction==="rtl"&&(g||l)&&(l=!l,g=!g),{height:"24px",width:"24px",borderTopLeftRadius:"24px",borderTopRightRadius:"24px",borderBottomLeftRadius:"24px",borderBottomRightRadius:"24px",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:O?r.colors.sliderHandleFillDisabled:r.colors.sliderHandleFill,outline:"none",boxShadow:e.$isFocusVisible?"0 0 0 3px ".concat(r.colors.accent):"0 1px 4px rgba(0, 0, 0, 0.12)",cursor:O?"not-allowed":"inherit"}});Me.displayName="Thumb";Me.displayName="Thumb";Me.displayName="StyledThumb";var $e=Q("div",function(e){var r=e.$disabled,n=e.$theme;return{position:"absolute",top:"-16px",width:"4px",height:"20px",backgroundColor:r?n.colors.sliderHandleFillDisabled:n.colors.sliderHandleInnerFill}});$e.displayName="InnerThumb";$e.displayName="InnerThumb";$e.displayName="StyledInnerThumb";var _e=Q("div",function(e){var r=e.$disabled,n=e.$theme;return Te(Te({position:"absolute",top:"-".concat(n.sizing.scale1400)},n.typography.font200),{},{backgroundColor:r?n.colors.sliderHandleFillDisabled:n.colors.sliderHandleInnerFill,color:n.colors.contentInversePrimary,paddingLeft:n.sizing.scale600,paddingRight:n.sizing.scale600,paddingTop:n.sizing.scale500,paddingBottom:n.sizing.scale500,borderBottomLeftRadius:"48px",borderBottomRightRadius:"48px",borderTopLeftRadius:"48px",borderTopRightRadius:"48px",whiteSpace:"nowrap"})});_e.displayName="ThumbValue";_e.displayName="ThumbValue";_e.displayName="StyledThumbValue";function Ye(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(h){return Object.getOwnPropertyDescriptor(e,h).enumerable})),n.push.apply(n,o)}return n}function At(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Ye(Object(n),!0).forEach(function(o){Bt(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ye(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function Bt(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function X(){return X=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},X.apply(this,arguments)}function K(e,r){return zt(e)||jt(e,r)||Vt(e,r)||Ft()}function Ft(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{al as Ge,am as Q,r as _,bT as mt,an as bt,w as J,bi as yt,bj as Tt,z as se,l as kt,bU as Ot,bV as wt,bW as Rt,j as Z,q as De,o as xe,p as St,ab as Mt,ac as $t,bX as oe}from"./index.CPc_uZux.js";import{h as _t}from"./moment.C7qA8nIE.js";import{w as Et}from"./withCalculatedWidth.DYeqePuh.js";import{u as It}from"./useBasicWidgetState.DvpdEDYZ.js";import{f as Dt}from"./formatMoment.C6Hwn6X5.js";import{f as xt}from"./formatNumber.DB5irY8c.js";import"./FormClearHelper.DTFnX0js.js";import"./numbro.B9_PXfzp.js";import"./sprintf.DpPCfzXw.js";var ce={},H={},le={},de={},He;function Ce(){if(He)return de;He=1,Object.defineProperty(de,"__esModule",{value:!0}),de.Direction=void 0;var e;return(function(r){r.Right="to right",r.Left="to left",r.Down="to bottom",r.Up="to top"})(e||(de.Direction=e={})),de}var We;function Je(){return We||(We=1,(function(e){var r=le&&le.__spreadArray||function(i,s,u){if(u||arguments.length===2)for(var p=0,m=s.length,v;p<m;p++)(v||!(p in s))&&(v||(v=Array.prototype.slice.call(s,0,p)),v[p]=s[p]);return i.concat(v||Array.prototype.slice.call(s))};Object.defineProperty(e,"__esModule",{value:!0}),e.isIOS=e.useThumbOverlap=e.assertUnreachable=e.voidFn=e.getTrackBackground=e.replaceAt=e.schd=e.translate=e.getClosestThumbIndex=e.translateThumbs=e.getPaddingAndBorder=e.getMargin=e.checkInitialOverlap=e.checkValuesAgainstBoundaries=e.checkBoundaries=e.isVertical=e.relativeValue=e.normalizeValue=e.isStepDivisible=e.isTouchEvent=e.getStepDecimals=void 0;var n=Ge(),o=Ce(),h=function(i){var s=i.toString().split(".")[1];return s?s.length:0};e.getStepDecimals=h;function O(i){return i.touches&&i.touches.length||i.changedTouches&&i.changedTouches.length}e.isTouchEvent=O;function l(i,s,u){var p=(s-i)/u,m=8,v=Number(p.toFixed(m));return parseInt(v.toString(),10)===v}e.isStepDivisible=l;function g(i,s,u,p,m,v,b){var $=1e11;if(i=Math.round(i*$)/$,!v){var C=b[s-1],E=b[s+1];if(C&&C>i)return C;if(E&&E<i)return E}if(i>p)return p;if(i<u)return u;var U=Math.floor(i*$-u*$)%Math.floor(m*$),z=Math.floor(i*$-Math.abs(U)),W=U===0?i:z/$,A=Math.abs(U/$)<m/2?W:W+m,B=(0,e.getStepDecimals)(m);return parseFloat(A.toFixed(B))}e.normalizeValue=g;function F(i,s,u){return(i-s)/(u-s)}e.relativeValue=F;function V(i){return i===o.Direction.Up||i===o.Direction.Down}e.isVertical=V;function j(i,s,u){if(s>=u)throw new RangeError("min (".concat(s,") is equal/bigger than max (").concat(u,")"));if(i<s)throw new RangeError("value (".concat(i,") is smaller than min (").concat(s,")"));if(i>u)throw new RangeError("value (".concat(i,") is bigger than max (").concat(u,")"))}e.checkBoundaries=j;function I(i,s,u){return i<s?s:i>u?u:i}e.checkValuesAgainstBoundaries=I;function T(i){if(!(i.length<2)&&!i.slice(1).every(function(s,u){return i[u]<=s}))throw new RangeError("values={[".concat(i,"]} needs to be sorted when allowOverlap={false}"))}e.checkInitialOverlap=T;function d(i){var s=window.getComputedStyle(i);return{top:parseInt(s["margin-top"],10),bottom:parseInt(s["margin-bottom"],10),left:parseInt(s["margin-left"],10),right:parseInt(s["margin-right"],10)}}e.getMargin=d;function t(i){var s=window.getComputedStyle(i);return{top:parseInt(s["padding-top"],10)+parseInt(s["border-top-width"],10),bottom:parseInt(s["padding-bottom"],10)+parseInt(s["border-bottom-width"],10),left:parseInt(s["padding-left"],10)+parseInt(s["border-left-width"],10),right:parseInt(s["padding-right"],10)+parseInt(s["border-right-width"],10)}}e.getPaddingAndBorder=t;function a(i,s,u){var p=u?-1:1;i.forEach(function(m,v){return f(m,p*s[v].x,s[v].y)})}e.translateThumbs=a;function c(i,s,u,p){for(var m=0,v=L(i[0],s,u,p),b=1;b<i.length;b++){var $=L(i[b],s,u,p);$<v&&(v=$,m=b)}return m}e.getClosestThumbIndex=c;function f(i,s,u){i.style.transform="translate(".concat(s,"px, ").concat(u,"px)")}e.translate=f;var y=function(i){var s=[],u=null,p=function(){for(var m=[],v=0;v<arguments.length;v++)m[v]=arguments[v];s=m,!u&&(u=requestAnimationFrame(function(){u=null,i.apply(void 0,s)}))};return p};e.schd=y;function k(i,s,u){var p=i.slice(0);return p[s]=u,p}e.replaceAt=k;function D(i){var s=i.values,u=i.colors,p=i.min,m=i.max,v=i.direction,b=v===void 0?o.Direction.Right:v,$=i.rtl,C=$===void 0?!1:$;C&&b===o.Direction.Right?b=o.Direction.Left:C&&o.Direction.Left&&(b=o.Direction.Right);var E=s.slice(0).sort(function(z,W){return z-W}).map(function(z){return(z-p)/(m-p)*100}),U=E.reduce(function(z,W,A){return"".concat(z,", ").concat(u[A]," ").concat(W,"%, ").concat(u[A+1]," ").concat(W,"%")},"");return"linear-gradient(".concat(b,", ").concat(u[0]," 0%").concat(U,", ").concat(u[u.length-1]," 100%)")}e.getTrackBackground=D;function w(){}e.voidFn=w;function R(i){throw new Error("Didn't expect to get here")}e.assertUnreachable=R;var M=function(i,s,u,p,m){m===void 0&&(m=function(b){return b});var v=Math.ceil(r([i],Array.from(i.children),!0).reduce(function(b,$){var C=Math.ceil($.getBoundingClientRect().width);if($.innerText&&$.innerText.includes(u)&&$.childElementCount===0){var E=$.cloneNode(!0);E.innerHTML=m(s.toFixed(p)),E.style.visibility="hidden",document.body.appendChild(E),C=Math.ceil(E.getBoundingClientRect().width),document.body.removeChild(E)}return C>b?C:b},i.getBoundingClientRect().width));return v},P=function(i,s,u,p,m,v,b){b===void 0&&(b=function(E){return E});var $=[],C=function(E){var U=M(u[E],p[E],m,v,b),z=s[E].x;s.forEach(function(W,A){var B=W.x,G=M(u[A],p[A],m,v,b);E!==A&&(z>=B&&z<=B+G||z+U>=B&&z+U<=B+G)&&($.includes(A)||($.push(E),$.push(A),$=r(r([],$,!0),[E,A],!1),C(A)))})};return C(i),Array.from(new Set($.sort()))},S=function(i,s,u,p,m,v){p===void 0&&(p=.1),m===void 0&&(m=" - "),v===void 0&&(v=function(A){return A});var b=(0,e.getStepDecimals)(p),$=(0,n.useState)({}),C=$[0],E=$[1],U=(0,n.useState)(v(s[u].toFixed(b))),z=U[0],W=U[1];return(0,n.useEffect)(function(){if(i){var A=i.getThumbs();if(A.length<1)return;var B={},G=i.getOffsets(),ne=P(u,G,A,s,m,b,v),he=v(s[u].toFixed(b));if(ne.length){var ee=ne.reduce(function(te,ue,me,be){return te.length?r(r([],te,!0),[G[be[me]].x],!1):[G[be[me]].x]},[]);if(Math.min.apply(Math,ee)===G[u].x){var ge=[];ne.forEach(function(te){ge.push(s[te].toFixed(b))}),he=Array.from(new Set(ge.sort(function(te,ue){return parseFloat(te)-parseFloat(ue)}))).map(v).join(m);var pe=Math.min.apply(Math,ee),ve=Math.max.apply(Math,ee),Ie=A[ne[ee.indexOf(ve)]].getBoundingClientRect().width;B.left="".concat(Math.abs(pe-(ve+Ie))/2,"px"),B.transform="translate(-50%, 0)"}else B.visibility="hidden"}W(he),E(B)}},[i,s]),[z,C]};e.useThumbOverlap=S;function L(i,s,u,p){var m=i.getBoundingClientRect(),v=m.left,b=m.top,$=m.width,C=m.height;return V(p)?Math.abs(u-(b+C/2)):Math.abs(s-(v+$/2))}var x=function(){var i,s=((i=navigator.userAgentData)===null||i===void 0?void 0:i.platform)||navigator.platform;return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(s)||navigator.userAgent.includes("Mac")&&"ontouchend"in document};e.isIOS=x})(le)),le}var qe;function Ct(){if(qe)return H;qe=1;var e=H&&H.__extends||(function(){var I=function(T,d){return I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,a){t.__proto__=a}||function(t,a){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(t[c]=a[c])},I(T,d)};return function(T,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");I(T,d);function t(){this.constructor=T}T.prototype=d===null?Object.create(d):(t.prototype=d.prototype,new t)}})(),r=H&&H.__createBinding||(Object.create?(function(I,T,d,t){t===void 0&&(t=d);var a=Object.getOwnPropertyDescriptor(T,d);(!a||("get"in a?!T.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return T[d]}}),Object.defineProperty(I,t,a)}):(function(I,T,d,t){t===void 0&&(t=d),I[t]=T[d]})),n=H&&H.__setModuleDefault||(Object.create?(function(I,T){Object.defineProperty(I,"default",{enumerable:!0,value:T})}):function(I,T){I.default=T}),o=H&&H.__importStar||function(I){if(I&&I.__esModule)return I;var T={};if(I!=null)for(var d in I)d!=="default"&&Object.prototype.hasOwnProperty.call(I,d)&&r(T,I,d);return n(T,I),T},h=H&&H.__spreadArray||function(I,T,d){if(d||arguments.length===2)for(var t=0,a=T.length,c;t<a;t++)(c||!(t in T))&&(c||(c=Array.prototype.slice.call(T,0,t)),c[t]=T[t]);return I.concat(c||Array.prototype.slice.call(T))};Object.defineProperty(H,"__esModule",{value:!0});var O=o(Ge()),l=Je(),g=Ce(),F=["ArrowRight","ArrowUp","k","PageUp"],V=["ArrowLeft","ArrowDown","j","PageDown"],j=(function(I){e(T,I);function T(d){var t=I.call(this,d)||this;if(t.trackRef=O.createRef(),t.thumbRefs=[],t.state={draggedTrackPos:[-1,-1],draggedThumbIndex:-1,thumbZIndexes:new Array(t.props.values.length).fill(0).map(function(a,c){return c}),isChanged:!1,markOffsets:[]},t.getOffsets=function(){var a=t.props,c=a.direction,f=a.values,y=a.min,k=a.max,D=t.trackRef.current;if(!D)return console.warn("No track element found."),[];var w=D.getBoundingClientRect(),R=(0,l.getPaddingAndBorder)(D);return t.getThumbs().map(function(M,P){var S={x:0,y:0},L=M.getBoundingClientRect(),x=(0,l.getMargin)(M);switch(c){case g.Direction.Right:return S.x=(x.left+R.left)*-1,S.y=((L.height-w.height)/2+R.top)*-1,S.x+=w.width*(0,l.relativeValue)(f[P],y,k)-L.width/2,S;case g.Direction.Left:return S.x=(x.right+R.right)*-1,S.y=((L.height-w.height)/2+R.top)*-1,S.x+=w.width-w.width*(0,l.relativeValue)(f[P],y,k)-L.width/2,S;case g.Direction.Up:return S.x=((L.width-w.width)/2+x.left+R.left)*-1,S.y=-R.left,S.y+=w.height-w.height*(0,l.relativeValue)(f[P],y,k)-L.height/2,S;case g.Direction.Down:return S.x=((L.width-w.width)/2+x.left+R.left)*-1,S.y=-R.left,S.y+=w.height*(0,l.relativeValue)(f[P],y,k)-L.height/2,S;default:return(0,l.assertUnreachable)(c)}})},t.getThumbs=function(){return t.trackRef&&t.trackRef.current?Array.from(t.trackRef.current.children).filter(function(a){return a.hasAttribute("aria-valuenow")}):(console.warn("No thumbs found in the track container. Did you forget to pass & spread the `props` param in renderTrack?"),[])},t.getTargetIndex=function(a){return t.getThumbs().findIndex(function(c){return c===a.target||c.contains(a.target)})},t.addTouchEvents=function(a){document.addEventListener("touchmove",t.schdOnTouchMove,{passive:!1}),document.addEventListener("touchend",t.schdOnEnd,{passive:!1}),document.addEventListener("touchcancel",t.schdOnEnd,{passive:!1})},t.addMouseEvents=function(a){document.addEventListener("mousemove",t.schdOnMouseMove),document.addEventListener("mouseup",t.schdOnEnd)},t.onMouseDownTrack=function(a){var c;if(!(a.button!==0||(0,l.isIOS)()))if(a.persist(),a.preventDefault(),t.addMouseEvents(a.nativeEvent),t.props.values.length>1&&t.props.draggableTrack){if(t.thumbRefs.some(function(y){var k;return(k=y.current)===null||k===void 0?void 0:k.contains(a.target)}))return;t.setState({draggedTrackPos:[a.clientX,a.clientY]},function(){return t.onMove(a.clientX,a.clientY)})}else{var f=(0,l.getClosestThumbIndex)(t.thumbRefs.map(function(y){return y.current}),a.clientX,a.clientY,t.props.direction);(c=t.thumbRefs[f].current)===null||c===void 0||c.focus(),t.setState({draggedThumbIndex:f},function(){return t.onMove(a.clientX,a.clientY)})}},t.onResize=function(){(0,l.translateThumbs)(t.getThumbs(),t.getOffsets(),t.props.rtl),t.calculateMarkOffsets()},t.onTouchStartTrack=function(a){var c;if(a.persist(),t.addTouchEvents(a.nativeEvent),t.props.values.length>1&&t.props.draggableTrack){if(t.thumbRefs.some(function(y){var k;return(k=y.current)===null||k===void 0?void 0:k.contains(a.target)}))return;t.setState({draggedTrackPos:[a.touches[0].clientX,a.touches[0].clientY]},function(){return t.onMove(a.touches[0].clientX,a.touches[0].clientY)})}else{var f=(0,l.getClosestThumbIndex)(t.thumbRefs.map(function(y){return y.current}),a.touches[0].clientX,a.touches[0].clientY,t.props.direction);(c=t.thumbRefs[f].current)===null||c===void 0||c.focus(),t.setState({draggedThumbIndex:f},function(){return t.onMove(a.touches[0].clientX,a.touches[0].clientY)})}},t.onMouseOrTouchStart=function(a){if(!t.props.disabled){var c=(0,l.isTouchEvent)(a);if(!(!c&&a.button!==0)){var f=t.getTargetIndex(a);f!==-1&&(c?t.addTouchEvents(a):t.addMouseEvents(a),t.setState({draggedThumbIndex:f,thumbZIndexes:t.state.thumbZIndexes.map(function(y,k){return k===f?Math.max.apply(Math,t.state.thumbZIndexes):y<=t.state.thumbZIndexes[f]?y:y-1})}))}}},t.onMouseMove=function(a){a.preventDefault(),t.onMove(a.clientX,a.clientY)},t.onTouchMove=function(a){a.preventDefault(),t.onMove(a.touches[0].clientX,a.touches[0].clientY)},t.onKeyDown=function(a){var c=t.props,f=c.values,y=c.onChange,k=c.step,D=c.rtl,w=c.direction,R=t.state.isChanged,M=t.getTargetIndex(a.nativeEvent),P=D||w===g.Direction.Left||w===g.Direction.Down?-1:1;M!==-1&&(F.includes(a.key)?(a.preventDefault(),t.setState({draggedThumbIndex:M,isChanged:!0}),y((0,l.replaceAt)(f,M,t.normalizeValue(f[M]+P*(a.key==="PageUp"?k*10:k),M)))):V.includes(a.key)?(a.preventDefault(),t.setState({draggedThumbIndex:M,isChanged:!0}),y((0,l.replaceAt)(f,M,t.normalizeValue(f[M]-P*(a.key==="PageDown"?k*10:k),M)))):a.key==="Tab"?t.setState({draggedThumbIndex:-1},function(){R&&t.fireOnFinalChange()}):R&&t.fireOnFinalChange())},t.onKeyUp=function(a){var c=t.state.isChanged;t.setState({draggedThumbIndex:-1},function(){c&&t.fireOnFinalChange()})},t.onMove=function(a,c){var f=t.state,y=f.draggedThumbIndex,k=f.draggedTrackPos,D=t.props,w=D.direction,R=D.min,M=D.max,P=D.onChange,S=D.values,L=D.step,x=D.rtl;if(y===-1&&k[0]===-1&&k[1]===-1)return null;var i=t.trackRef.current;if(!i)return null;var s=i.getBoundingClientRect(),u=(0,l.isVertical)(w)?s.height:s.width;if(k[0]!==-1&&k[1]!==-1){var p=a-k[0],m=c-k[1],v=0;switch(w){case g.Direction.Right:case g.Direction.Left:v=p/u*(M-R);break;case g.Direction.Down:case g.Direction.Up:v=m/u*(M-R);break;default:(0,l.assertUnreachable)(w)}if(x&&(v*=-1),Math.abs(v)>=L/2){for(var b=0;b<t.thumbRefs.length;b++){if(S[b]===M&&Math.sign(v)===1||S[b]===R&&Math.sign(v)===-1)return;var $=S[b]+v;$>M?v=M-S[b]:$<R&&(v=R-S[b])}for(var C=S.slice(0),b=0;b<t.thumbRefs.length;b++)C=(0,l.replaceAt)(C,b,t.normalizeValue(S[b]+v,b));t.setState({draggedTrackPos:[a,c]}),P(C)}}else{var E=0;switch(w){case g.Direction.Right:E=(a-s.left)/u*(M-R)+R;break;case g.Direction.Left:E=(u-(a-s.left))/u*(M-R)+R;break;case g.Direction.Down:E=(c-s.top)/u*(M-R)+R;break;case g.Direction.Up:E=(u-(c-s.top))/u*(M-R)+R;break;default:(0,l.assertUnreachable)(w)}x&&(E=M+R-E),Math.abs(S[y]-E)>=L/2&&P((0,l.replaceAt)(S,y,t.normalizeValue(E,y)))}},t.normalizeValue=function(a,c){var f=t.props,y=f.min,k=f.max,D=f.step,w=f.allowOverlap,R=f.values;return(0,l.normalizeValue)(a,c,y,k,D,w,R)},t.onEnd=function(a){if(a.preventDefault(),document.removeEventListener("mousemove",t.schdOnMouseMove),document.removeEventListener("touchmove",t.schdOnTouchMove),document.removeEventListener("mouseup",t.schdOnEnd),document.removeEventListener("touchend",t.schdOnEnd),document.removeEventListener("touchcancel",t.schdOnEnd),t.state.draggedThumbIndex===-1&&t.state.draggedTrackPos[0]===-1&&t.state.draggedTrackPos[1]===-1)return null;t.setState({draggedThumbIndex:-1,draggedTrackPos:[-1,-1]},function(){t.fireOnFinalChange()})},t.fireOnFinalChange=function(){t.setState({isChanged:!1});var a=t.props,c=a.onFinalChange,f=a.values;c&&c(f)},t.updateMarkRefs=function(a){if(!a.renderMark){t.numOfMarks=void 0,t.markRefs=void 0;return}t.numOfMarks=(a.max-a.min)/t.props.step,t.markRefs=[];for(var c=0;c<t.numOfMarks+1;c++)t.markRefs[c]=O.createRef()},t.calculateMarkOffsets=function(){if(!(!t.props.renderMark||!t.trackRef||!t.numOfMarks||!t.markRefs||t.trackRef.current===null)){for(var a=window.getComputedStyle(t.trackRef.current),c=parseInt(a.width,10),f=parseInt(a.height,10),y=parseInt(a.paddingLeft,10),k=parseInt(a.paddingTop,10),D=[],w=0;w<t.numOfMarks+1;w++){var R=9999,M=9999;if(t.markRefs[w].current){var P=t.markRefs[w].current.getBoundingClientRect();R=P.height,M=P.width}t.props.direction===g.Direction.Left||t.props.direction===g.Direction.Right?D.push([Math.round(c/t.numOfMarks*w+y-M/2),-Math.round((R-f)/2)]):D.push([Math.round(f/t.numOfMarks*w+k-R/2),-Math.round((M-c)/2)])}t.setState({markOffsets:D})}},d.step===0)throw new Error('"step" property should be a positive number');return t.schdOnMouseMove=(0,l.schd)(t.onMouseMove),t.schdOnTouchMove=(0,l.schd)(t.onTouchMove),t.schdOnEnd=(0,l.schd)(t.onEnd),t.thumbRefs=d.values.map(function(){return O.createRef()}),t.updateMarkRefs(d),t}return T.prototype.componentDidMount=function(){var d=this,t=this.props,a=t.values,c=t.min,f=t.step;this.resizeObserver=window.ResizeObserver?new window.ResizeObserver(this.onResize):{observe:function(){return window.addEventListener("resize",d.onResize)},unobserve:function(){return window.removeEventListener("resize",d.onResize)}},document.addEventListener("touchstart",this.onMouseOrTouchStart,{passive:!1}),document.addEventListener("mousedown",this.onMouseOrTouchStart,{passive:!1}),!this.props.allowOverlap&&(0,l.checkInitialOverlap)(this.props.values),this.props.values.forEach(function(y){return(0,l.checkBoundaries)(y,d.props.min,d.props.max)}),this.resizeObserver.observe(this.trackRef.current),(0,l.translateThumbs)(this.getThumbs(),this.getOffsets(),this.props.rtl),this.calculateMarkOffsets(),a.forEach(function(y){(0,l.isStepDivisible)(c,y,f)||console.warn("The `values` property is in conflict with the current `step`, `min`, and `max` properties. Please provide values that are accessible using the min, max, and step values.")})},T.prototype.componentDidUpdate=function(d,t){var a=this.props,c=a.max,f=a.min,y=a.step,k=a.values,D=a.rtl;(d.max!==c||d.min!==f||d.step!==y)&&this.updateMarkRefs(this.props),(0,l.translateThumbs)(this.getThumbs(),this.getOffsets(),D),(d.max!==c||d.min!==f||d.step!==y||t.markOffsets.length!==this.state.markOffsets.length)&&(this.calculateMarkOffsets(),k.forEach(function(w){(0,l.isStepDivisible)(f,w,y)||console.warn("The `values` property is in conflict with the current `step`, `min`, and `max` properties. Please provide values that are accessible using the min, max, and step values.")}))},T.prototype.componentWillUnmount=function(){var d={passive:!1};document.removeEventListener("mousedown",this.onMouseOrTouchStart,d),document.removeEventListener("mousemove",this.schdOnMouseMove),document.removeEventListener("touchmove",this.schdOnTouchMove),document.removeEventListener("touchstart",this.onMouseOrTouchStart),document.removeEventListener("mouseup",this.schdOnEnd),document.removeEventListener("touchend",this.schdOnEnd),this.resizeObserver.unobserve(this.trackRef.current)},T.prototype.render=function(){var d=this,t=this.props,a=t.label,c=t.labelledBy,f=t.renderTrack,y=t.renderThumb,k=t.renderMark,D=k===void 0?function(){return null}:k,w=t.values,R=t.min,M=t.max,P=t.allowOverlap,S=t.disabled,L=this.state,x=L.draggedThumbIndex,i=L.thumbZIndexes,s=L.markOffsets;return f({props:{style:{transform:"scale(1)",cursor:x>-1?"grabbing":this.props.draggableTrack?(0,l.isVertical)(this.props.direction)?"ns-resize":"ew-resize":w.length===1&&!S?"pointer":"inherit"},onMouseDown:S?l.voidFn:this.onMouseDownTrack,onTouchStart:S?l.voidFn:this.onTouchStartTrack,ref:this.trackRef},isDragged:this.state.draggedThumbIndex>-1,disabled:S,children:h(h([],s.map(function(u,p,m){return D({props:{style:d.props.direction===g.Direction.Left||d.props.direction===g.Direction.Right?{position:"absolute",left:"".concat(u[0],"px"),marginTop:"".concat(u[1],"px")}:{position:"absolute",top:"".concat(u[0],"px"),marginLeft:"".concat(u[1],"px")},key:"mark".concat(p),ref:d.markRefs[p]},index:p})}),!0),w.map(function(u,p){var m=d.state.draggedThumbIndex===p;return y({index:p,value:u,isDragged:m,props:{style:{position:"absolute",zIndex:i[p],cursor:S?"inherit":m?"grabbing":"grab",userSelect:"none",touchAction:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},key:p,tabIndex:S?void 0:0,"aria-valuemax":P?M:w[p+1]||M,"aria-valuemin":P?R:w[p-1]||R,"aria-valuenow":u,draggable:!1,ref:d.thumbRefs[p],"aria-label":a,"aria-labelledby":c,role:"slider",onKeyDown:S?l.voidFn:d.onKeyDown,onKeyUp:S?l.voidFn:d.onKeyUp}})}),!0)})},T.defaultProps={label:"Accessibility label",labelledBy:null,step:1,direction:g.Direction.Right,rtl:!1,disabled:!1,allowOverlap:!1,draggableTrack:!1,min:0,max:100},T})(O.Component);return H.default=j,H}var Ke;function Pt(){return Ke||(Ke=1,(function(e){var r=ce&&ce.__importDefault||function(O){return O&&O.__esModule?O:{default:O}};Object.defineProperty(e,"__esModule",{value:!0}),e.checkValuesAgainstBoundaries=e.relativeValue=e.useThumbOverlap=e.Direction=e.getTrackBackground=e.Range=void 0;var n=r(Ct());e.Range=n.default;var o=Je();Object.defineProperty(e,"getTrackBackground",{enumerable:!0,get:function(){return o.getTrackBackground}}),Object.defineProperty(e,"useThumbOverlap",{enumerable:!0,get:function(){return o.useThumbOverlap}}),Object.defineProperty(e,"relativeValue",{enumerable:!0,get:function(){return o.relativeValue}}),Object.defineProperty(e,"checkValuesAgainstBoundaries",{enumerable:!0,get:function(){return o.checkValuesAgainstBoundaries}});var h=Ce();Object.defineProperty(e,"Direction",{enumerable:!0,get:function(){return h.Direction}})})(ce)),ce}var Qe=Pt();function Xe(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(h){return Object.getOwnPropertyDescriptor(e,h).enumerable})),n.push.apply(n,o)}return n}function Te(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Xe(Object(n),!0).forEach(function(o){Lt(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xe(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function Lt(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}var ke=Q("div",{position:"relative",width:"100%"});ke.displayName="Root";ke.displayName="Root";ke.displayName="StyledRoot";var Oe=Q("div",function(e){var r=e.$theme,n=e.$value,o=n===void 0?[]:n,h=e.$disabled,O=e.$isDragged,l=r.sizing,g="inherit";return h?g="not-allowed":O?g="grabbing":o.length===1&&(g="pointer"),{paddingTop:l.scale600,paddingBottom:l.scale600,paddingRight:l.scale600,paddingLeft:l.scale600,display:"flex",cursor:g,backgroundColor:r.colors.sliderTrackFill}});Oe.displayName="Track";Oe.displayName="Track";Oe.displayName="StyledTrack";var fe=Q("div",function(e){var r=e.$theme,n=e.$value,o=n===void 0?[]:n,h=e.$min,O=e.$max,l=e.$disabled,g=r.colors,F=r.borders,V=r.direction,j=r.borders.useRoundedCorners?F.radius100:0;return{borderTopLeftRadius:j,borderTopRightRadius:j,borderBottomRightRadius:j,borderBottomLeftRadius:j,background:Qe.getTrackBackground({values:o,colors:o.length===1?[l?g.borderOpaque:g.primary,l?g.backgroundSecondary:g.borderOpaque]:[l?g.backgroundSecondary:g.borderOpaque,l?g.borderOpaque:g.primary,l?g.backgroundSecondary:g.borderOpaque],min:h||0,max:O||0,rtl:V==="rtl"}),height:"2px",width:"100%",alignSelf:"center",cursor:l?"not-allowed":"inherit"}});fe.displayName="InnerTrack";fe.displayName="InnerTrack";fe.displayName="StyledInnerTrack";var we=Q("div",function(e){return{width:"4px",height:"2px",backgroundColor:e.$theme.colors.backgroundPrimary,marginLeft:"16px"}});we.displayName="Mark";we.displayName="Mark";we.displayName="StyledMark";var Re=Q("div",function(e){return Te(Te({},e.$theme.typography.font200),{},{color:e.$theme.colors.contentPrimary})});Re.displayName="Tick";Re.displayName="Tick";Re.displayName="StyledTick";var Se=Q("div",function(e){var r=e.$theme,n=r.sizing;return{display:"flex",justifyContent:"space-between",alignItems:"center",paddingRight:n.scale600,paddingLeft:n.scale600,paddingBottom:n.scale400}});Se.displayName="TickBar";Se.displayName="TickBar";Se.displayName="StyledTickBar";var Me=Q("div",function(e){var r=e.$theme,n=e.$value,o=n===void 0?[]:n,h=e.$thumbIndex,O=e.$disabled,l=o.length===2&&h===0,g=o.length===2&&h===1;return r.direction==="rtl"&&(g||l)&&(l=!l,g=!g),{height:"24px",width:"24px",borderTopLeftRadius:"24px",borderTopRightRadius:"24px",borderBottomLeftRadius:"24px",borderBottomRightRadius:"24px",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:O?r.colors.sliderHandleFillDisabled:r.colors.sliderHandleFill,outline:"none",boxShadow:e.$isFocusVisible?"0 0 0 3px ".concat(r.colors.accent):"0 1px 4px rgba(0, 0, 0, 0.12)",cursor:O?"not-allowed":"inherit"}});Me.displayName="Thumb";Me.displayName="Thumb";Me.displayName="StyledThumb";var $e=Q("div",function(e){var r=e.$disabled,n=e.$theme;return{position:"absolute",top:"-16px",width:"4px",height:"20px",backgroundColor:r?n.colors.sliderHandleFillDisabled:n.colors.sliderHandleInnerFill}});$e.displayName="InnerThumb";$e.displayName="InnerThumb";$e.displayName="StyledInnerThumb";var _e=Q("div",function(e){var r=e.$disabled,n=e.$theme;return Te(Te({position:"absolute",top:"-".concat(n.sizing.scale1400)},n.typography.font200),{},{backgroundColor:r?n.colors.sliderHandleFillDisabled:n.colors.sliderHandleInnerFill,color:n.colors.contentInversePrimary,paddingLeft:n.sizing.scale600,paddingRight:n.sizing.scale600,paddingTop:n.sizing.scale500,paddingBottom:n.sizing.scale500,borderBottomLeftRadius:"48px",borderBottomRightRadius:"48px",borderTopLeftRadius:"48px",borderTopRightRadius:"48px",whiteSpace:"nowrap"})});_e.displayName="ThumbValue";_e.displayName="ThumbValue";_e.displayName="StyledThumbValue";function Ye(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(h){return Object.getOwnPropertyDescriptor(e,h).enumerable})),n.push.apply(n,o)}return n}function At(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Ye(Object(n),!0).forEach(function(o){Bt(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ye(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function Bt(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function X(){return X=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},X.apply(this,arguments)}function K(e,r){return zt(e)||jt(e,r)||Vt(e,r)||Ft()}function Ft(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vt(e,r){if(e){if(typeof e=="string")return Ze(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ze(e,r)}}function Ze(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,o=new Array(r);n<r;n++)o[n]=e[n];return o}function jt(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var o=[],h=!0,O=!1,l,g;try{for(n=n.call(e);!(h=(l=n.next()).done)&&(o.push(l.value),!(r&&o.length===r));h=!0);}catch(F){O=!0,g=F}finally{try{!h&&n.return!=null&&n.return()}finally{if(O)throw g}}return o}}function zt(e){if(Array.isArray(e))return e}var Nt=function(r){if(r.length>2||r.length===0)throw new Error("the value prop represents positions of thumbs, so its length can be only one or two");return r};function Ut(e){var r=e.overrides,n=r===void 0?{}:r,o=e.disabled,h=o===void 0?!1:o,O=e.marks,l=O===void 0?!1:O,g=e.onChange,F=g===void 0?function(){}:g,V=e.onFinalChange,j=V===void 0?function(){}:V,I=e.min,T=I===void 0?0:I,d=e.max,t=d===void 0?100:d,a=e.step,c=a===void 0?1:a,f=e.persistentThumb,y=f===void 0?!1:f,k=e.valueToLabel,D=k===void 0?function(Y){return Y}:k,w=e.value,R=_.useContext(mt),M=_.useState(!1),P=K(M,2),S=P[0],L=P[1],x=_.useState(!1),i=K(x,2),s=i[0],u=i[1],p=_.useState(!1),m=K(p,2),v=m[0],b=m[1],$=_.useState(-1),C=K($,2),E=C[0],U=C[1],z=_.useCallback(function(Y){bt(Y)&&b(!0);var N=Y.target.parentNode.firstChild===Y.target?0:1;U(N)},[]),W=_.useCallback(function(Y){v!==!1&&b(!1),U(-1)},[]),A=Nt(w),B={$disabled:h,$step:c,$min:T,$max:t,$marks:l,$value:A,$isFocusVisible:v},G=J(n.Root,ke),ne=K(G,2),he=ne[0],ee=ne[1],ge=J(n.Track,Oe),pe=K(ge,2),ve=pe[0],Ie=pe[1],te=J(n.InnerTrack,fe),ue=K(te,2),me=ue[0],be=ue[1],et=J(n.Thumb,Me),Le=K(et,2),tt=Le[0],rt=Le[1],nt=J(n.InnerThumb,$e),Ae=K(nt,2),at=Ae[0],it=Ae[1],ot=J(n.ThumbValue,_e),Be=K(ot,2),st=Be[0],ut=Be[1],ct=J(n.Tick,Re),Fe=K(ct,2),Ve=Fe[0],je=Fe[1],lt=J(n.TickBar,Se),ze=K(lt,2),dt=ze[0],ft=ze[1],ht=J(n.Mark,we),Ne=K(ht,2),gt=Ne[0],pt=Ne[1];return _.createElement(he,X({"data-baseweb":"slider"},B,ee,{onFocus:Tt(ee,z),onBlur:yt(ee,W)}),_.createElement(Qe.Range,X({step:c,min:T,max:t,values:A,disabled:h,onChange:function(N){return F({value:N})},onFinalChange:function(N){return j({value:N})},rtl:R.direction==="rtl",renderTrack:function(N){var re=N.props,q=N.children,ae=N.isDragged;return _.createElement(ve,X({onMouseDown:re.onMouseDown,onTouchStart:re.onTouchStart,$isDragged:ae},B,Ie),_.createElement(me,X({$isDragged:ae,ref:re.ref},B,be),q))},renderThumb:function(N){var re=N.props,q=N.index,ae=N.isDragged,Ue=y||(!!q&&s||!q&&S||ae)&&!h;return _.createElement(tt,X({},re,{onMouseEnter:function(){q===0?L(!0):u(!0)},onMouseLeave:function(){q===0?L(!1):u(!1)},$thumbIndex:q,$isDragged:ae,style:At({},re.style)},B,rt,{$isFocusVisible:v&&E===q}),Ue&&_.createElement(st,X({$thumbIndex:q,$isDragged:ae},B,ut),D(A[q])),Ue&&_.createElement(at,X({$thumbIndex:q,$isDragged:ae},B,it)))}},l?{renderMark:function(N){var re=N.props,q=N.index;return _.createElement(gt,X({$markIndex:q},re,B,pt))}}:{})),_.createElement(dt,X({},B,ft),_.createElement(Ve,X({},B,je),D(T)),_.createElement(Ve,X({},B,je),D(t))))}const Ht=se("div",{target:"e16ozfla0"})({position:"relative",":focus-within:has(:focus-visible)":{"--slider-focused":1}}),Wt=se("div",{target:"e16ozfla1"})(({disabled:e,theme:r,isDragged:n})=>({alignItems:"center",backgroundColor:e?r.colors.gray60:r.colors.primary,borderTopLeftRadius:"100%",borderTopRightRadius:"100%",borderBottomLeftRadius:"100%",borderBottomRightRadius:"100%",borderTopStyle:"none",borderBottomStyle:"none",borderRightStyle:"none",borderLeftStyle:"none",display:"flex",justifyContent:"center",height:r.sizes.sliderThumb,width:r.sizes.sliderThumb,boxShadow:n?r.shadows.focusRing:r.shadows.none,":focus":{outline:"none"},":focus-visible":{boxShadow:r.shadows.focusRing}})),qt=se("div",{target:"e16ozfla2"})(({disabled:e,theme:r})=>({fontFamily:r.genericFonts.bodyFont,fontSize:r.fontSizes.sm,color:e?r.colors.gray60:r.colors.primary,top:"-1.6em",position:"absolute",whiteSpace:"nowrap",backgroundColor:r.colors.transparent,lineHeight:r.lineHeights.base,fontWeight:r.fontWeights.normal,pointerEvents:"none"})),Kt=se("div",{target:"e16ozfla3"})({flex:1}),Xt=se("div",{target:"e16ozfla4"})(({theme:e})=>({position:"absolute",height:e.spacing.twoXS,left:`calc(${e.sizes.sliderThumb} / 2)`,right:`calc(${e.sizes.sliderThumb} / 2)`})),Yt=se("div",{target:"e16ozfla5"})(({theme:e,isHovered:r,isDisabled:n})=>({position:"absolute",left:0,right:0,top:"100%",display:"flex",justifyContent:"space-between",pointerEvents:"none",marginTop:`-${e.spacing.md}`,fontSize:e.fontSizes.sm,lineHeight:e.lineHeights.base,fontWeight:e.fontWeights.normal,color:n?e.colors.fadedText40:e.colors.fadedText60,opacity:r?1:"var(--slider-focused, 0)",transition:r?"none":"opacity 300ms 200ms"}));function Zt({minLabel:e,maxLabel:r,isHovered:n,isDisabled:o}){return xe(Yt,{"data-testid":"stSliderTickBar",isHovered:n,isDisabled:o,children:[Z(De,{source:e,allowHTML:!1,inheritFont:!0,isLabel:!0}),Z(De,{source:r,allowHTML:!1,inheritFont:!0,isLabel:!0})]})}function Ee(e){return e.type===oe.Type.SELECT_SLIDER}function Pe(e,r,n){return e.map((o,h)=>{const O=r.indexOf(o);return O>=0?O:n[h]??0})}function Gt(e,r){return e.map(n=>r[n]??"")}function Jt({disabled:e,element:r,widgetMgr:n,fragmentId:o}){const[h,O]=It({getStateFromWidgetMgr:Qt,getDefaultStateFromProto:er,getCurrStateFromProto:tr,updateWidgetMgrState:rr,element:r,widgetMgr:n,fragmentId:o}),[l,g]=_.useState(h),[F,V]=_.useState(!1),[j,I]=_.useState(!1),T=_.useCallback(()=>V(!0),[]),d=_.useCallback(()=>V(!1),[]),t=_.useRef(null),[a]=_.useState([]),[c]=_.useState([]),f=kt(),y=_.useRef(r);y.current=r;const k=l.map(x=>ye(x,r)),D=ye(r.min,r),w=ye(r.max,r);_.useEffect(()=>{g(h)},[h]),Ot(()=>{if(!Ee(r))return;const x=n.getStringArrayValue(r);if(x===void 0)return;const i=Pe(x,r.options,r.default);g(i)},[r.options],(x,i)=>wt(x[0],i[0]));const R=_.useCallback(({value:x})=>{O({value:x,fromUi:!0}),I(!1)},[O]),M=_.useCallback(({value:x})=>{g(x),I(!0)},[]),P=_.useCallback(_.forwardRef(function(i,s){const{$thumbIndex:u,$value:p}=i,m=u||0;a[m]=s,c[m]||=_.createRef();const v=Rt(i,["role","style","aria-valuemax","aria-valuemin","aria-valuenow","tabIndex","onKeyUp","onKeyDown","onMouseEnter","onMouseLeave","draggable"]),b=y.current,C=(p??[b.min])[m]??b.min,E=ye(C,b);return Z(Wt,{...v,disabled:i.$disabled===!0,isDragged:i.$isDragged===!0,ref:a[m],"aria-valuetext":E,"aria-label":b.label,children:Z(qt,{"data-testid":"stSliderThumbValue",disabled:i.$disabled===!0,ref:c[m],children:Z(De,{source:E,allowHTML:!1,inheritFont:!0,isLabel:!0})})})}),[]);_.useLayoutEffect(()=>{a.forEach((m,v)=>{m.current&&m.current.setAttribute("aria-valuetext",k[v])});const x=t.current??null,i=a[0].current,s=a[1]?.current,u=c[0].current,p=c[1]?.current;or(x,i,s,u,p)});const S=_.useCallback(({$disabled:x})=>({height:f.spacing.twoXS,...x?{background:f.colors.darkenedBgMix25}:{}}),[f.colors.darkenedBgMix25,f.spacing.twoXS]),L=_.useCallback(_.forwardRef(function(i,s){const{children:u,...p}=i;return xe(Kt,{children:[Z(Xt,{ref:s,children:u}),Z(fe,{...p,style:S({$disabled:i.$disabled})})]})}),[]);return xe(Ht,{ref:t,className:"stSlider","data-testid":"stSlider",onMouseEnter:T,onMouseLeave:d,children:[Z($t,{label:r.label,disabled:e,labelVisibility:St(r.labelVisibility?.value),children:r.help&&Z(Mt,{content:r.help,label:r.label})}),Z(Ut,{min:r.min,max:r.max,step:r.step,value:ir(l,r),onChange:M,onFinalChange:R,disabled:e,overrides:{Thumb:P,Track:{style:{backgroundColor:"none !important",paddingLeft:f.spacing.none,paddingRight:f.spacing.none,paddingTop:`calc((${f.sizes.minElementHeight} - ${f.spacing.twoXS}) / 2)`,paddingBottom:`calc((${f.sizes.minElementHeight} - ${f.spacing.twoXS}) / 2)`}},InnerTrack:L,TickBar:{component:Zt,props:{minLabel:D,maxLabel:w,isHovered:F||j,isDisabled:e}}}})]})}function Qt(e,r){if(Ee(r)){const n=e.getStringArrayValue(r);return n===void 0?void 0:Pe(n,r.options,r.default)}return e.getDoubleArrayValue(r)}function er(e){return e.default}function tr(e){if(Ee(e)){const r=e.rawValue;return r&&r.length>0?Pe(r,e.options,e.default):e.default}return e.value}function rr(e,r,n,o){if(Ee(e)){const h=Gt(n.value,e.options);r.setStringArrayValue(e,h,{fromUi:n.fromUi},o)}else r.setDoubleArrayValue(e,n.value,{fromUi:n.fromUi},o)}function nr(e){const{dataType:r}=e;return r===oe.DataType.DATETIME||r===oe.DataType.DATE||r===oe.DataType.TIME}function ar(e){const{dataType:r}=e;return r===oe.DataType.DATE?"date":r===oe.DataType.TIME?"time":"datetime"}function ye(e,r){const{format:n,options:o}=r;if(o.length>0)return o[e]??"";if(nr(r)){const h=_t.utc(e/1e3);return Dt(h,n,ar(r))}return xt(e,n)}function ir(e,r){const{min:n,max:o}=r;let h=e[0],O=e.length>1?e[1]:e[0];return h>O&&(h=O),h<n&&(h=n),h>o&&(h=o),O<n&&(O=n),O>o&&(O=o),e.length>1?[h,O]:[h]}function or(e,r,n,o,h){!e||!r||!o||(ie(e,r,o),n&&h&&(ie(e,n,h),sr(e,r,n,o,h)))}function ie(e,r,n){const o=e.getBoundingClientRect(),h=r.getBoundingClientRect(),O=n.getBoundingClientRect(),l=h.left+h.width/2,g=l-O.width/2<o.left,F=l+O.width/2>o.right;n.style.left=g?"0":"",n.style.right=F?"0":""}function sr(e,r,n,o,h){const l=e.getBoundingClientRect(),g=r.getBoundingClientRect(),F=n.getBoundingClientRect(),V=o.getBoundingClientRect(),j=h.getBoundingClientRect(),I=l.left+l.width/2,T=g.left+g.width/2,d=F.left+F.width/2,t=T-V.width/2>=l.left,a=d+j.width/2<=l.right,c=g.left-V.width>=l.left,f=F.right+j.width<=l.right,y=t?V.width/2:V.width,k=a?j.width/2:j.width,D=T+y;if(d-k-D>24){ie(e,r,o),ie(e,n,h);return}if(c&&f){o.style.left="",o.style.right=`${Math.round(g.width)}px`,h.style.left=`${Math.round(F.width)}px`,h.style.right="";return}T<I?(ie(e,r,o),h.style.left=`${Math.round(T+y+24-d)}px`,h.style.right=""):(ie(e,n,h),o.style.left="",o.style.right=`${-Math.round(d-k-24-T)}px`)}const mr=Et(_.memo(Jt));export{mr as default};