streamlit 1.50.0__py3-none-any.whl → 1.51.0__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 (232) hide show
  1. streamlit/__init__.py +4 -1
  2. streamlit/commands/navigation.py +4 -6
  3. streamlit/commands/page_config.py +4 -6
  4. streamlit/components/v2/__init__.py +458 -0
  5. streamlit/components/v2/bidi_component/__init__.py +20 -0
  6. streamlit/components/v2/bidi_component/constants.py +29 -0
  7. streamlit/components/v2/bidi_component/main.py +386 -0
  8. streamlit/components/v2/bidi_component/serialization.py +265 -0
  9. streamlit/components/v2/bidi_component/state.py +92 -0
  10. streamlit/components/v2/component_definition_resolver.py +143 -0
  11. streamlit/components/v2/component_file_watcher.py +403 -0
  12. streamlit/components/v2/component_manager.py +431 -0
  13. streamlit/components/v2/component_manifest_handler.py +122 -0
  14. streamlit/components/v2/component_path_utils.py +245 -0
  15. streamlit/components/v2/component_registry.py +409 -0
  16. streamlit/components/v2/get_bidi_component_manager.py +51 -0
  17. streamlit/components/v2/manifest_scanner.py +615 -0
  18. streamlit/components/v2/presentation.py +198 -0
  19. streamlit/components/v2/types.py +324 -0
  20. streamlit/config.py +456 -53
  21. streamlit/config_option.py +4 -1
  22. streamlit/config_util.py +650 -1
  23. streamlit/dataframe_util.py +15 -8
  24. streamlit/delta_generator.py +6 -4
  25. streamlit/delta_generator_singletons.py +3 -1
  26. streamlit/deprecation_util.py +17 -6
  27. streamlit/elements/arrow.py +37 -9
  28. streamlit/elements/deck_gl_json_chart.py +97 -39
  29. streamlit/elements/dialog_decorator.py +2 -1
  30. streamlit/elements/exception.py +3 -1
  31. streamlit/elements/graphviz_chart.py +1 -3
  32. streamlit/elements/heading.py +3 -5
  33. streamlit/elements/image.py +2 -4
  34. streamlit/elements/layouts.py +31 -11
  35. streamlit/elements/lib/built_in_chart_utils.py +1 -3
  36. streamlit/elements/lib/color_util.py +8 -18
  37. streamlit/elements/lib/column_config_utils.py +4 -8
  38. streamlit/elements/lib/column_types.py +40 -12
  39. streamlit/elements/lib/dialog.py +2 -2
  40. streamlit/elements/lib/image_utils.py +3 -5
  41. streamlit/elements/lib/layout_utils.py +50 -13
  42. streamlit/elements/lib/mutable_status_container.py +2 -2
  43. streamlit/elements/lib/options_selector_utils.py +2 -2
  44. streamlit/elements/lib/utils.py +4 -4
  45. streamlit/elements/map.py +80 -37
  46. streamlit/elements/media.py +5 -7
  47. streamlit/elements/metric.py +3 -5
  48. streamlit/elements/pdf.py +2 -4
  49. streamlit/elements/plotly_chart.py +125 -17
  50. streamlit/elements/progress.py +2 -4
  51. streamlit/elements/space.py +113 -0
  52. streamlit/elements/vega_charts.py +339 -148
  53. streamlit/elements/widgets/audio_input.py +5 -5
  54. streamlit/elements/widgets/button.py +2 -4
  55. streamlit/elements/widgets/button_group.py +33 -7
  56. streamlit/elements/widgets/camera_input.py +2 -4
  57. streamlit/elements/widgets/chat.py +7 -1
  58. streamlit/elements/widgets/color_picker.py +1 -1
  59. streamlit/elements/widgets/data_editor.py +28 -24
  60. streamlit/elements/widgets/file_uploader.py +5 -10
  61. streamlit/elements/widgets/multiselect.py +4 -3
  62. streamlit/elements/widgets/number_input.py +2 -4
  63. streamlit/elements/widgets/radio.py +10 -3
  64. streamlit/elements/widgets/select_slider.py +8 -5
  65. streamlit/elements/widgets/selectbox.py +6 -3
  66. streamlit/elements/widgets/slider.py +38 -42
  67. streamlit/elements/widgets/time_widgets.py +6 -12
  68. streamlit/elements/write.py +27 -6
  69. streamlit/emojis.py +1 -1
  70. streamlit/errors.py +115 -0
  71. streamlit/hello/hello.py +8 -0
  72. streamlit/hello/utils.py +2 -1
  73. streamlit/material_icon_names.py +1 -1
  74. streamlit/navigation/page.py +4 -1
  75. streamlit/proto/ArrowData_pb2.py +27 -0
  76. streamlit/proto/ArrowData_pb2.pyi +46 -0
  77. streamlit/proto/BidiComponent_pb2.py +34 -0
  78. streamlit/proto/BidiComponent_pb2.pyi +153 -0
  79. streamlit/proto/Block_pb2.py +7 -7
  80. streamlit/proto/Block_pb2.pyi +4 -1
  81. streamlit/proto/DeckGlJsonChart_pb2.py +10 -4
  82. streamlit/proto/DeckGlJsonChart_pb2.pyi +9 -3
  83. streamlit/proto/Element_pb2.py +5 -3
  84. streamlit/proto/Element_pb2.pyi +14 -4
  85. streamlit/proto/HeightConfig_pb2.py +2 -2
  86. streamlit/proto/HeightConfig_pb2.pyi +6 -3
  87. streamlit/proto/NewSession_pb2.py +18 -18
  88. streamlit/proto/NewSession_pb2.pyi +25 -6
  89. streamlit/proto/PlotlyChart_pb2.py +8 -6
  90. streamlit/proto/PlotlyChart_pb2.pyi +3 -1
  91. streamlit/proto/Space_pb2.py +27 -0
  92. streamlit/proto/Space_pb2.pyi +42 -0
  93. streamlit/proto/WidgetStates_pb2.py +2 -2
  94. streamlit/proto/WidgetStates_pb2.pyi +13 -3
  95. streamlit/proto/WidthConfig_pb2.py +2 -2
  96. streamlit/proto/WidthConfig_pb2.pyi +6 -3
  97. streamlit/runtime/app_session.py +27 -1
  98. streamlit/runtime/caching/cache_data_api.py +4 -4
  99. streamlit/runtime/caching/cache_errors.py +4 -1
  100. streamlit/runtime/caching/cache_resource_api.py +3 -2
  101. streamlit/runtime/caching/cache_utils.py +2 -1
  102. streamlit/runtime/caching/cached_message_replay.py +3 -3
  103. streamlit/runtime/caching/hashing.py +3 -4
  104. streamlit/runtime/caching/legacy_cache_api.py +2 -1
  105. streamlit/runtime/connection_factory.py +1 -3
  106. streamlit/runtime/forward_msg_queue.py +4 -1
  107. streamlit/runtime/fragment.py +2 -1
  108. streamlit/runtime/memory_media_file_storage.py +1 -1
  109. streamlit/runtime/metrics_util.py +6 -2
  110. streamlit/runtime/runtime.py +14 -0
  111. streamlit/runtime/scriptrunner/exec_code.py +2 -1
  112. streamlit/runtime/scriptrunner/script_runner.py +2 -2
  113. streamlit/runtime/scriptrunner_utils/script_run_context.py +3 -6
  114. streamlit/runtime/secrets.py +2 -4
  115. streamlit/runtime/session_manager.py +3 -1
  116. streamlit/runtime/state/common.py +30 -5
  117. streamlit/runtime/state/presentation.py +85 -0
  118. streamlit/runtime/state/safe_session_state.py +2 -2
  119. streamlit/runtime/state/session_state.py +220 -16
  120. streamlit/runtime/state/widgets.py +19 -3
  121. streamlit/runtime/websocket_session_manager.py +3 -1
  122. streamlit/source_util.py +2 -2
  123. streamlit/static/index.html +2 -2
  124. streamlit/static/manifest.json +243 -226
  125. streamlit/static/static/css/{index.CIiu7Ygf.css → index.BpABIXK9.css} +1 -1
  126. streamlit/static/static/css/index.DgR7E2CV.css +1 -0
  127. streamlit/static/static/js/{ErrorOutline.esm.DUpR0_Ka.js → ErrorOutline.esm.YoJdlW1p.js} +1 -1
  128. streamlit/static/static/js/{FileDownload.esm.CN4j9-1w.js → FileDownload.esm.Ddx8VEYy.js} +1 -1
  129. streamlit/static/static/js/{FileHelper.CaIUKG91.js → FileHelper.90EtOmj9.js} +1 -1
  130. streamlit/static/static/js/{FormClearHelper.DTcdrasw.js → FormClearHelper.BB1Km6eP.js} +1 -1
  131. streamlit/static/static/js/InputInstructions.jhH15PqV.js +1 -0
  132. streamlit/static/static/js/{Particles.CElH0XX2.js → Particles.DUsputn1.js} +1 -1
  133. streamlit/static/static/js/{ProgressBar.DetlP5aY.js → ProgressBar.DLY8H6nE.js} +1 -1
  134. streamlit/static/static/js/{Toolbar.C77ar7rq.js → Toolbar.D8nHCkuz.js} +1 -1
  135. streamlit/static/static/js/{base-input.BQft14La.js → base-input.CJGiNqed.js} +3 -3
  136. streamlit/static/static/js/{checkbox.yZOfXCeX.js → checkbox.Cpdd482O.js} +1 -1
  137. streamlit/static/static/js/{createSuper.Dh9w1cs8.js → createSuper.CuQIogbW.js} +1 -1
  138. streamlit/static/static/js/{data-grid-overlay-editor.DcuHuCyW.js → data-grid-overlay-editor.2Ufgxc6y.js} +1 -1
  139. streamlit/static/static/js/{downloader.MeHtkq8r.js → downloader.CN0K7xlu.js} +1 -1
  140. streamlit/static/static/js/{es6.VpBPGCnM.js → es6.BJcsVXQ0.js} +2 -2
  141. streamlit/static/static/js/{iframeResizer.contentWindow.yMw_ARIL.js → iframeResizer.contentWindow.XzUvQqcZ.js} +1 -1
  142. streamlit/static/static/js/index.B1ZQh4P1.js +1 -0
  143. streamlit/static/static/js/index.BKstZk0M.js +27 -0
  144. streamlit/static/static/js/{index.Cnpi3o3E.js → index.BMcFsUee.js} +1 -1
  145. streamlit/static/static/js/{index.DKv_lNO7.js → index.BR-IdcTb.js} +1 -1
  146. streamlit/static/static/js/{index.FFOzOWzC.js → index.B_dWA3vd.js} +1 -1
  147. streamlit/static/static/js/{index.Bj9JgOEC.js → index.BgnZEMVh.js} +1 -1
  148. streamlit/static/static/js/{index.Bxz2yX3P.js → index.BohqXifI.js} +1 -1
  149. streamlit/static/static/js/{index.Dbe-Q3C-.js → index.Br5nxKNj.js} +1 -1
  150. streamlit/static/static/js/{index.BjCwMzj4.js → index.BrIKVbNc.js} +2 -2
  151. streamlit/static/static/js/index.BtWUPzle.js +1 -0
  152. streamlit/static/static/js/{index.CGYqqs6j.js → index.C0RLraek.js} +1 -1
  153. streamlit/static/static/js/{index.D2QEXQq_.js → index.CAIjskgG.js} +1 -1
  154. streamlit/static/static/js/{index.6xX1278W.js → index.CAj-7vWz.js} +131 -157
  155. streamlit/static/static/js/{index.DK7hD7_w.js → index.CMtEit2O.js} +1 -1
  156. streamlit/static/static/js/{index.DNLrMXgm.js → index.CkRlykEE.js} +1 -1
  157. streamlit/static/static/js/{index.ClELlchS.js → index.CmN3FXfI.js} +1 -1
  158. streamlit/static/static/js/{index.GRUzrudl.js → index.CwbFI1_-.js} +1 -1
  159. streamlit/static/static/js/{index.Ctn27_AE.js → index.CxIUUfab.js} +27 -27
  160. streamlit/static/static/js/index.D2KPNy7e.js +1 -0
  161. streamlit/static/static/js/{index.B0H9IXUJ.js → index.D3GPA5k4.js} +3 -3
  162. streamlit/static/static/js/{index.BycLveZ4.js → index.DGAh7DMq.js} +1 -1
  163. streamlit/static/static/js/index.DKb_NvmG.js +197 -0
  164. streamlit/static/static/js/{index.BPQo7BKk.js → index.DMqgUYKq.js} +1 -1
  165. streamlit/static/static/js/{index.CH1tqnSs.js → index.DOFlg3dS.js} +1 -1
  166. streamlit/static/static/js/{index.64ejlaaT.js → index.DPUXkcQL.js} +1 -1
  167. streamlit/static/static/js/{index.B-hiXRzw.js → index.DX1xY89g.js} +1 -1
  168. streamlit/static/static/js/index.DYATBCsq.js +2 -0
  169. streamlit/static/static/js/{index.DHh-U0dK.js → index.DaSmGJ76.js} +3 -3
  170. streamlit/static/static/js/{index.DuxqVQpd.js → index.Dd7bMeLP.js} +1 -1
  171. streamlit/static/static/js/{index.B4cAbHP6.js → index.DjmmgI5U.js} +1 -1
  172. streamlit/static/static/js/{index.DcPNYEUo.js → index.Dq56CyM2.js} +1 -1
  173. streamlit/static/static/js/{index.CiAQIz1H.js → index.DuiXaS5_.js} +1 -1
  174. streamlit/static/static/js/index.DvFidMLe.js +2 -0
  175. streamlit/static/static/js/{index.C9BdUqTi.js → index.DwkhC5Pc.js} +1 -1
  176. streamlit/static/static/js/{index.B4dUQfni.js → index.Q-3sFn1v.js} +1 -1
  177. streamlit/static/static/js/{index.CMItVsFA.js → index.QJ5QO9sJ.js} +1 -1
  178. streamlit/static/static/js/{index.CTBk8Vk2.js → index.VwTaeety.js} +1 -1
  179. streamlit/static/static/js/{index.Ck8rQ9OL.js → index.YOqQbeX8.js} +1 -1
  180. streamlit/static/static/js/{input.s6pjQ49A.js → input.D4MN_FzN.js} +1 -1
  181. streamlit/static/static/js/{memory.Cuvsdfrl.js → memory.DrZjtdGT.js} +1 -1
  182. streamlit/static/static/js/{number-overlay-editor.DdgVR5m3.js → number-overlay-editor.DRwAw1In.js} +1 -1
  183. streamlit/static/static/js/{possibleConstructorReturn.CqidKeei.js → possibleConstructorReturn.exeeJQEP.js} +1 -1
  184. streamlit/static/static/js/record.B-tDciZb.js +1 -0
  185. streamlit/static/static/js/{sandbox.CCQREcJx.js → sandbox.ClO3IuUr.js} +1 -1
  186. streamlit/static/static/js/{timepicker.mkJF97Bb.js → timepicker.DAhu-vcF.js} +1 -1
  187. streamlit/static/static/js/{toConsumableArray.De7I7KVR.js → toConsumableArray.DNbljYEC.js} +1 -1
  188. streamlit/static/static/js/{uniqueId.RI1LJdtz.js → uniqueId.oG4Gvj1v.js} +1 -1
  189. streamlit/static/static/js/{useBasicWidgetState.CedkNjUW.js → useBasicWidgetState.D6sOH6oI.js} +1 -1
  190. streamlit/static/static/js/{useTextInputAutoExpand.Ca7w8dVs.js → useTextInputAutoExpand.4u3_GcuN.js} +1 -1
  191. streamlit/static/static/js/{useUpdateUiValue.DeXelfRH.js → useUpdateUiValue.F2R3eTeR.js} +1 -1
  192. streamlit/static/static/js/wavesurfer.esm.vI8Eid4k.js +73 -0
  193. streamlit/static/static/js/{withFullScreenWrapper.C3561XxJ.js → withFullScreenWrapper.zothJIsI.js} +1 -1
  194. streamlit/static/static/media/MaterialSymbols-Rounded.C7IFxh57.woff2 +0 -0
  195. streamlit/string_util.py +1 -3
  196. streamlit/testing/v1/app_test.py +2 -2
  197. streamlit/testing/v1/element_tree.py +23 -9
  198. streamlit/testing/v1/util.py +2 -2
  199. streamlit/type_util.py +3 -4
  200. streamlit/url_util.py +1 -3
  201. streamlit/user_info.py +1 -2
  202. streamlit/util.py +3 -1
  203. streamlit/watcher/event_based_path_watcher.py +23 -12
  204. streamlit/watcher/local_sources_watcher.py +11 -1
  205. streamlit/watcher/path_watcher.py +9 -6
  206. streamlit/watcher/polling_path_watcher.py +4 -1
  207. streamlit/watcher/util.py +2 -2
  208. streamlit/web/cli.py +51 -22
  209. streamlit/web/server/bidi_component_request_handler.py +193 -0
  210. streamlit/web/server/component_file_utils.py +97 -0
  211. streamlit/web/server/component_request_handler.py +8 -21
  212. streamlit/web/server/oidc_mixin.py +3 -1
  213. streamlit/web/server/routes.py +2 -2
  214. streamlit/web/server/server.py +9 -0
  215. streamlit/web/server/server_util.py +3 -1
  216. streamlit/web/server/upload_file_request_handler.py +3 -1
  217. {streamlit-1.50.0.dist-info → streamlit-1.51.0.dist-info}/METADATA +4 -5
  218. {streamlit-1.50.0.dist-info → streamlit-1.51.0.dist-info}/RECORD +222 -194
  219. streamlit/static/static/css/index.CHEnSPGk.css +0 -1
  220. streamlit/static/static/js/Hooks.BRba_Own.js +0 -1
  221. streamlit/static/static/js/InputInstructions.xnSDuYeQ.js +0 -1
  222. streamlit/static/static/js/index.Baqa90pe.js +0 -2
  223. streamlit/static/static/js/index.Bm3VbPB5.js +0 -1
  224. streamlit/static/static/js/index.CFMf5_ez.js +0 -197
  225. streamlit/static/static/js/index.Cj7DSzVR.js +0 -73
  226. streamlit/static/static/js/index.DH71Ezyj.js +0 -1
  227. streamlit/static/static/js/index.DW0Grddz.js +0 -1
  228. streamlit/static/static/media/MaterialSymbols-Rounded.DeCZgS-4.woff2 +0 -0
  229. {streamlit-1.50.0.data → streamlit-1.51.0.data}/scripts/streamlit.cmd +0 -0
  230. {streamlit-1.50.0.dist-info → streamlit-1.51.0.dist-info}/WHEEL +0 -0
  231. {streamlit-1.50.0.dist-info → streamlit-1.51.0.dist-info}/entry_points.txt +0 -0
  232. {streamlit-1.50.0.dist-info → streamlit-1.51.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1 @@
1
+ import{r as t,E as Z,_ as K,u as Le,bb as ae,ax as ze,bt as le,L as We,k as he,n as q,b0 as ce,bn as Me,bh as Oe,bg as _e,s as C,j as d,af as Ve,e as $,B as Ne,al as He,b as je,bu as qe,l as $e,T as Ge,P as Xe,W as Ze}from"./index.CAj-7vWz.js";import{T as Ke,a as de}from"./Toolbar.D8nHCkuz.js";import{u as Je,F as Qe}from"./FormClearHelper.BB1Km6eP.js";import{c as Ye}from"./createDownloadLinkElement.ZaXNnPK4.js";import{F as er,D as rr}from"./FileDownload.esm.Ddx8VEYy.js";var pe=t.forwardRef(function(e,r){var o={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return t.createElement(Z,K({iconAttrs:o,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:r}),t.createElement("g",{fill:"none"},t.createElement("rect",{width:24,height:24}),t.createElement("rect",{width:24,height:24}),t.createElement("rect",{width:24,height:24})),t.createElement("path",{d:"M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z"}),t.createElement("path",{d:"M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z"}))});pe.displayName="Mic";var ge=t.forwardRef(function(e,r){var o={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return t.createElement(Z,K({iconAttrs:o,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:r}),t.createElement("rect",{width:24,height:24,fill:"none"}),t.createElement("path",{d:"M8 19c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2v10c0 1.1.9 2 2 2zm6-12v10c0 1.1.9 2 2 2s2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2z"}))});ge.displayName="Pause";var ye=t.forwardRef(function(e,r){var o={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return t.createElement(Z,K({iconAttrs:o,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:r}),t.createElement("rect",{width:24,height:24,fill:"none"}),t.createElement("path",{d:"M8 6.82v10.36c0 .79.87 1.27 1.54.84l8.14-5.18a1 1 0 000-1.69L9.54 5.98A.998.998 0 008 6.82z"}))});ye.displayName="PlayArrow";var ve=t.forwardRef(function(e,r){var o={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return t.createElement(Z,K({iconAttrs:o,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:r}),t.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),t.createElement("path",{d:"M17.65 6.35a7.95 7.95 0 00-6.48-2.31c-3.67.37-6.69 3.35-7.1 7.02C3.52 15.91 7.27 20 12 20a7.98 7.98 0 007.21-4.56c.32-.67-.16-1.44-.9-1.44-.37 0-.72.2-.88.53a5.994 5.994 0 01-6.8 3.31c-2.22-.49-4.01-2.3-4.48-4.52A6.002 6.002 0 0112 6c1.66 0 3.14.69 4.22 1.78l-1.51 1.51c-.63.63-.19 1.71.7 1.71H19c.55 0 1-.45 1-1V6.41c0-.89-1.08-1.34-1.71-.71l-.64.65z"}))});ve.displayName="Refresh";var we=t.forwardRef(function(e,r){var o={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return t.createElement(Z,K({iconAttrs:o,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:r}),t.createElement("g",{fill:"none"},t.createElement("rect",{width:24,height:24}),t.createElement("rect",{width:24,height:24})),t.createElement("path",{fillRule:"evenodd",d:"M9 16h6c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1H9c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1zm3-14C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z"}))});we.displayName="StopCircle";async function tr(e,r=16e3){if(!e||e.size===0)throw new Error("Invalid or empty blob provided");if(!window.AudioContext)throw new Error("AudioContext not supported in this browser");const o=new AudioContext;try{const n=await e.arrayBuffer(),s=await o.decodeAudioData(n),p=r??s.sampleRate,l=await nr(s,p);return or(l,p)}finally{o.close()}}async function nr(e,r){const{duration:o,numberOfChannels:n,sampleRate:s}=e,p=Math.ceil(o*r);if(!window.OfflineAudioContext)throw new Error("OfflineAudioContext not supported");const l=new OfflineAudioContext(1,p,r),v=l.createBufferSource();if(v.buffer=e,n>1){const y=l.createChannelSplitter(n),u=l.createChannelMerger(1);v.connect(y);for(let i=0;i<n;i++){const a=l.createGain();a.gain.value=1/n,y.connect(a,i),a.connect(u,0,0)}u.connect(l.destination)}else v.connect(l.destination);v.start(0);try{return await l.startRendering()}catch(y){throw new Error(`Failed to resample audio from ${s}Hz to ${r}Hz: ${y instanceof Error?y.message:String(y)}`)}}function or(e,r){const n=e.length,s=n*2+44,p=new ArrayBuffer(s),l=new DataView(p),v=e.getChannelData(0),y=(i,a)=>{for(let f=0;f<a.length;f++)l.setUint8(i+f,a.charCodeAt(f))};y(0,"RIFF"),l.setUint32(4,s-8,!0),y(8,"WAVE"),y(12,"fmt "),l.setUint32(16,16,!0),l.setUint16(20,1,!0),l.setUint16(22,1,!0),l.setUint32(24,r,!0),l.setUint32(28,r*2,!0),l.setUint16(32,2,!0),l.setUint16(34,16,!0),y(36,"data"),l.setUint32(40,n*2,!0);let u=44;for(let i=0;i<n;i++){const a=Math.max(-1,Math.min(1,v[i]));l.setInt16(u,a*32767,!0),u+=2}return new Blob([p],{type:"audio/wav"})}class ue{constructor(){this.wavesurfer=null,this.currentBlobUrl=null,this.events={},this.isPlaying=!1}initialize(r){this.wavesurfer=r,this.setupEventListeners()}setupEventListeners(){this.wavesurfer&&(this.teardownEventListeners(),this.handleTimeUpdate=r=>{this.events.onTimeUpdate?.(r*1e3)},this.handlePause=()=>{this.isPlaying=!1,this.events.onPause?.()},this.handlePlay=()=>{this.isPlaying=!0,this.events.onPlay?.()},this.handleFinish=()=>{this.isPlaying=!1,this.events.onFinish?.()},this.handleReady=()=>{this.events.onReady?.()},this.handleError=r=>{const o=r instanceof Error?r:new Error(String(r));this.events.onError?.(o)},this.wavesurfer.on("timeupdate",this.handleTimeUpdate),this.wavesurfer.on("pause",this.handlePause),this.wavesurfer.on("play",this.handlePlay),this.wavesurfer.on("finish",this.handleFinish),this.wavesurfer.on("ready",this.handleReady),this.wavesurfer.on("error",this.handleError))}setEventHandlers(r){this.events=r}async load(r){if(!this.wavesurfer)throw new Error("WaveSurfer not initialized");this.cleanupPreviousUrl();let o,n=null;try{if(r instanceof Blob)n=URL.createObjectURL(r),o=n;else if(r instanceof ArrayBuffer){const s=new Blob([r]);n=URL.createObjectURL(s),o=n}else o=r;this.currentBlobUrl=n,await this.wavesurfer.load(o)}catch(s){throw this.cleanupPreviousUrl(),s}}async play(){if(!this.wavesurfer)throw new Error("WaveSurfer not initialized");await this.wavesurfer.play()}pause(){this.wavesurfer&&this.wavesurfer.pause()}getDuration(){return this.wavesurfer?this.wavesurfer.getDuration()*1e3:0}getCurrentTime(){return this.wavesurfer?this.wavesurfer.getCurrentTime()*1e3:0}getIsPlaying(){return this.isPlaying}seekToStart(){this.wavesurfer&&this.wavesurfer.seekTo(0)}cleanupPreviousUrl(){this.currentBlobUrl&&(URL.revokeObjectURL(this.currentBlobUrl),this.currentBlobUrl=null)}destroy(){this.pause(),this.cleanupPreviousUrl(),this.wavesurfer&&(this.teardownEventListeners(),this.wavesurfer.empty(),this.wavesurfer=null),this.events={},this.isPlaying=!1,this.handleTimeUpdate=void 0,this.handlePause=void 0,this.handlePlay=void 0,this.handleFinish=void 0,this.handleReady=void 0,this.handleError=void 0}teardownEventListeners(){this.wavesurfer&&(this.handleTimeUpdate&&(this.wavesurfer.un("timeupdate",this.handleTimeUpdate),this.handleTimeUpdate=void 0),this.handlePause&&(this.wavesurfer.un("pause",this.handlePause),this.handlePause=void 0),this.handlePlay&&(this.wavesurfer.un("play",this.handlePlay),this.handlePlay=void 0),this.handleFinish&&(this.wavesurfer.un("finish",this.handleFinish),this.handleFinish=void 0),this.handleReady&&(this.wavesurfer.un("ready",this.handleReady),this.handleReady=void 0),this.handleError&&(this.wavesurfer.un("error",this.handleError),this.handleError=void 0))}}class sr{constructor(r={}){this.wavesurfer=null,this.recordPlugin=null,this.isRecording=!1,this.recordEndResolve=null,this.recordEndReject=null,this.events={},this.options=r}initialize(r,o){this.wavesurfer=r;try{const n={renderRecordedAudio:!1,mimeType:"audio/webm"};this.recordPlugin=r.registerPlugin(o.create(n)),this.setupEventListeners()}catch(n){const s=n instanceof Error?n:new Error(String(n));throw s.name==="NotAllowedError"||s.name==="PermissionDeniedError"?(this.events.onPermissionDenied?.(),new Error("Microphone permission denied")):(this.events.onError?.(s),s)}}setupEventListeners(){this.recordPlugin&&(this.recordPlugin.on("record-start",()=>{this.isRecording=!0,this.events.onRecordStart?.()}),this.recordPlugin.on("record-end",r=>{this.isRecording=!1,this.events.onRecordEnd?.(r),this.recordEndResolve&&r&&r.size>0?(this.recordEndResolve(r),this.recordEndResolve=null,this.recordEndReject=null):this.recordEndReject?(this.recordEndReject(new Error("Invalid or empty recording")),this.recordEndResolve=null,this.recordEndReject=null):(this.recordEndResolve=null,this.recordEndReject=null)}),this.recordPlugin.on("record-progress",r=>{this.events.onRecordProgress?.(r)}))}setEventHandlers(r){this.events=r}async startRecording(){if(!this.recordPlugin)throw new Error("Record plugin not initialized");if(this.isRecording)return;const r=typeof this.options.sampleRate=="number"?this.options.sampleRate:void 0,o={};r!==void 0&&(o.sampleRate={ideal:r}),await this.startRecordingWithConstraints(o,r!==void 0)}async startRecordingWithConstraints(r,o){if(!this.recordPlugin)throw new Error("Record plugin not initialized");try{const n=Object.keys(r).length?r:void 0;await this.recordPlugin.startRecording(n)}catch(n){const s=n instanceof Error?n:new Error(String(n));if(s.name==="NotAllowedError"||s.name==="PermissionDeniedError")throw this.events.onPermissionDenied?.(),new Error("Microphone permission denied");if(o&&(s.name==="OverconstrainedError"||s.name==="NotReadableError")){this.options.sampleRate=void 0,await this.startRecordingWithConstraints({},!1);return}throw this.events.onError?.(s),s}}async stopRecording(){if(!this.recordPlugin||!this.isRecording)throw new Error("Not currently recording");try{return new Promise((r,o)=>{this.recordEndResolve=r,this.recordEndReject=o,this.recordPlugin?.stopRecording()})}catch(r){const o=r instanceof Error?r:new Error(String(r));throw this.events.onError?.(o),o}}cancelRecording(){this.recordPlugin&&this.isRecording&&(this.recordPlugin.stopRecording(),this.isRecording=!1,this.recordEndResolve=null,this.recordEndReject=null)}destroy(){this.cancelRecording(),this.recordPlugin&&(this.recordPlugin.destroy(),this.recordPlugin=null),this.wavesurfer=null,this.events={}}}const ir=4,ar=4,lr=8,cr=0,dr=4,ur=16e3;function fr({containerRef:e,sampleRate:r,events:o}){const n=Le(),[s,p]=t.useState("idle"),[l,v]=t.useState(null),[y,u]=t.useState(!1),i=t.useRef(null),a=t.useRef(null),f=t.useRef(null),h=t.useRef(o||{}),x=t.useRef(!1),b=t.useRef(new Set),w=t.useRef(!1),F=r===void 0?ur:r;t.useEffect(()=>{h.current=o||{}},[o]);const _=t.useCallback(()=>{const c=Array.from(b.current);b.current.clear(),c.forEach(m=>{m.resolve()})},[]),D=t.useCallback(c=>{u(!1);const m=Array.from(b.current);b.current.clear(),m.forEach(E=>{E.reject(c)})},[]),T=t.useCallback(c=>{const m={onPlay:()=>{u(!0),h.current.onPlaybackPlay?.()},onPause:()=>{u(!1),h.current.onPlaybackPause?.()},onFinish:()=>{u(!1),h.current.onPlaybackFinish?.()},onReady:()=>{_()},onError:E=>{u(!1),D(E),h.current.onError?.(E)}};c.setEventHandlers(m)},[_,D]),P=t.useCallback(async()=>{if(!(x.current||!e.current))try{const[c,m]=await Promise.all([ae(()=>import("./wavesurfer.esm.vI8Eid4k.js"),[],import.meta.url),ae(()=>import("./record.B-tDciZb.js"),[],import.meta.url)]),E=c.default,A=m.default,U=E.create({container:e.current,waveColor:n.colors.primary,progressColor:n.colors.bodyText,height:ze(n.sizes.largestElementHeight)-2*dr,barWidth:ir,barGap:ar,barRadius:lr,cursorWidth:cr,interact:!0});i.current=U,w.current=!1;const H=new sr({sampleRate:F});H.initialize(U,A),H.setEventHandlers({onRecordProgress:j=>{h.current.onProgressMs?.(j)},onPermissionDenied:()=>{h.current.onPermissionDenied?.(),p("idle")},onError:j=>{h.current.onError?.(j),p("idle")}}),a.current=H;const L=new ue;L.initialize(U),f.current=L,T(L),x.current=!0}catch(c){const m=c instanceof Error?c:new Error(String(c));h.current.onError?.(m)}},[e,n,F,T]);t.useEffect(()=>{P();const c=b.current;return()=>{c.clear(),u(!1),a.current&&(a.current.destroy(),a.current=null),f.current&&(f.current.destroy(),f.current=null),i.current&&(i.current.destroy(),i.current=null),x.current=!1,w.current=!1}},[P]),t.useEffect(()=>{const c=i.current;if(c){if(s==="recording"){c.setOptions({waveColor:n.colors.primary,progressColor:n.colors.primary});return}if(w.current){c.setOptions({interact:!0,waveColor:le(n.colors.fadedText40,n.colors.secondaryBg),progressColor:n.colors.bodyText});return}c.setOptions({waveColor:n.colors.primary,progressColor:n.colors.bodyText})}},[s,n.colors.bodyText,n.colors.fadedText40,n.colors.primary,n.colors.secondaryBg]);const R=t.useCallback(async()=>{if(s!=="recording"){if(x.current||await P(),!a.current)throw new Error("Record backend not initialized");i.current&&i.current.setOptions({waveColor:n.colors.primary,progressColor:n.colors.primary}),w.current=!1,await a.current.startRecording(),p("recording"),v(null),u(!1),h.current.onRecordStart?.()}},[s,P,n.colors.primary]),G=t.useCallback(()=>{f.current&&i.current&&(f.current.destroy(),f.current=new ue,f.current.initialize(i.current),b.current.clear(),u(!1),T(f.current)),w.current=!1},[T]),M=t.useCallback(()=>{f.current?.seekToStart(),u(!1),w.current=!0,i.current&&i.current.setOptions({interact:!0,waveColor:le(n.colors.fadedText40,n.colors.secondaryBg),progressColor:n.colors.bodyText})},[n.colors.bodyText,n.colors.fadedText40,n.colors.secondaryBg]),k=t.useCallback(async()=>{if(s!=="recording")throw new Error("Not currently recording");if(!a.current||!f.current)throw new Error("Backends not initialized");try{const c=await a.current.stopRecording();return v(c),await new Promise((m,E)=>{if(!f.current){E(new Error("Player not initialized"));return}const A={resolve:()=>{b.current.delete(A),m()},reject:U=>{b.current.delete(A),E(U)}};b.current.add(A),f.current.load(c).catch(U=>{b.current.delete(A),E(U instanceof Error?U:new Error(String(U)))})}),p("idle"),u(!1),M(),h.current.onRecordReady?.(c),c}catch(c){const m=c instanceof Error?c:new Error(String(c));throw u(!1),m}},[s,M]),V=t.useCallback(async c=>{const m=c??l;if(!m)throw new Error("No recorded audio to approve");try{const E=await tr(m,F);h.current.onApprove?.(E),v(null),p("idle")}catch(E){const A=E instanceof Error?E:new Error(String(E));throw h.current.onError?.(A),A}},[l,F]),N=t.useCallback(()=>{s==="recording"&&a.current?.cancelRecording(),G(),v(null),p("idle"),u(!1),w.current=!1,h.current.onCancel?.()},[s,G]),z={isPlaying:t.useCallback(()=>f.current?.getIsPlaying()??!1,[]),play:t.useCallback(async()=>{if(!f.current)throw new Error("Player not initialized");await f.current.play()},[]),pause:t.useCallback(()=>{f.current?.pause()},[]),load:t.useCallback(async c=>{if(x.current||await P(),!f.current)throw new Error("Player not initialized");await f.current.load(c),M()},[M,P]),getCurrentTimeMs:t.useCallback(()=>f.current?.getCurrentTime()??0,[]),getDurationMs:t.useCallback(()=>f.current?.getDuration()??0,[])},J=t.useCallback(c=>{h.current=c},[]);return{state:s,isPlaybackPlaying:y,start:R,stop:k,approve:V,cancel:N,playback:z,setEventHandlers:J}}const hr=(e,r)=>{const{libConfig:{enforceDownloadInNewTab:o=!1}}=t.useContext(We);return t.useCallback(()=>{if(!e)return;const s=Ye({enforceDownloadInNewTab:o,url:e,filename:r});s.style.display="none",document.body.appendChild(s),s.click(),document.body.removeChild(s)},[e,o,r])},Y=({widgetMgr:e,id:r,formId:o,key:n,defaultValue:s})=>{t.useEffect(()=>{const i=e.getElementState(r,n);he(i)&&q(s)&&e.setElementState(r,n,s)},[e,r,n,s]);const[p,l]=t.useState(e.getElementState(r,n)??s),v=t.useCallback(i=>{e.setElementState(r,n,i),l(i)},[e,r,n]),y=t.useMemo(()=>({formId:o||""}),[o]),u=t.useCallback(()=>v(s),[s,v]);return Je({element:y,widgetMgr:e,onFormCleared:u}),[p,v]},pr=async({files:e,uploadClient:r,widgetMgr:o,widgetInfo:n,fragmentId:s,signal:p})=>{let l=[];try{l=await r.fetchFileURLs(e)}catch(i){return{successfulUploads:[],failedUploads:e.map(a=>({file:a,error:ce(i)}))}}const v=Me(e,l),y=[],u=[];return await Promise.all(v.map(async([i,a])=>{if(!i||!a?.uploadUrl||!a.fileId)return{file:i,fileUrl:a,error:new Error("No upload URL found")};try{await r.uploadFile({id:a.fileId,formId:n.formId||""},a.uploadUrl,i,void 0,p),y.push({fileUrl:a,file:i})}catch(f){const h=ce(f);u.push({file:i,error:h})}})),o.setFileUploaderStateValue(n,new Oe({uploadedFileInfo:y.map(({file:i,fileUrl:a})=>new _e({fileId:a.fileId,fileUrls:a,name:i.webkitRelativePath||i.name,size:i.size}))}),{fromUi:!0},s),{successfulUploads:y,failedUploads:u}},gr=C("div",{target:"e3q8yfp0"})(),fe=C("div",{target:"e3q8yfp1"})(({theme:e,disabled:r})=>({height:e.sizes.largestElementHeight,width:"100%",background:e.colors.secondaryBg,borderRadius:e.radii.default,marginBottom:e.spacing.twoXS,display:"flex",alignItems:"center",position:"relative",paddingLeft:e.spacing.xs,paddingRight:e.spacing.sm,border:e.colors.widgetBorderColor?`${e.sizes.borderWidth} solid ${e.colors.widgetBorderColor}`:void 0,cursor:r?"not-allowed":"auto",overflow:"hidden"})),yr=C("div",{target:"e3q8yfp2"})({flex:1}),vr=C("div",{target:"e3q8yfp3"})(({show:e,theme:r})=>({display:e?"block":"none",position:"relative",height:r.sizes.largestElementHeight,"& > div":{position:"absolute",top:0,left:0,width:"100%",height:"100%",display:"flex",alignItems:"center"}})),wr=C("span",{target:"e3q8yfp4"})(({theme:e,isPlayingOrRecording:r,disabled:o})=>({margin:e.spacing.sm,fontFamily:e.fonts.monospace,color:o?e.colors.fadedText40:r?e.colors.bodyText:e.colors.fadedText60,backgroundColor:e.colors.secondaryBg,fontSize:e.fontSizes.sm})),me=C("div",{target:"e3q8yfp5"})({width:"100%",textAlign:"center",overflow:"hidden"}),Ee=C("span",{target:"e3q8yfp6"})(({theme:e})=>({color:e.colors.bodyText})),mr=C("a",{target:"e3q8yfp7"})(({theme:e})=>({color:e.colors.link,textDecoration:e.linkUnderline?"underline":"none"})),Er=C("div",{target:"e3q8yfp8"})(({theme:e})=>({flex:1,height:e.sizes.largestElementHeight,display:"flex",justifyContent:"center",alignItems:"center"})),Rr=C("div",{target:"e3q8yfp9"})(({theme:e})=>{const r="0.625em";return{opacity:.2,width:"100%",height:r,backgroundSize:r,backgroundImage:`radial-gradient(${e.colors.fadedText10} 40%, transparent 40%)`,backgroundRepeat:"repeat"}}),br=C("span",{target:"e3q8yfp10"})(({theme:e})=>({"& > button":{color:e.colors.primary,padding:e.spacing.threeXS},"& > button:hover, & > button:focus":{color:e.colors.redColor}})),Cr=C("span",{target:"e3q8yfp11"})(({theme:e})=>({"& > button":{padding:e.spacing.threeXS,color:e.colors.fadedText60},"& > button:hover, & > button:focus":{color:e.colors.bodyText}})),Re=C("span",{target:"e3q8yfp12"})(({theme:e})=>({"& > button":{padding:e.spacing.threeXS,color:e.colors.fadedText60},"& > button:hover, & > button:focus":{color:e.colors.bodyText}})),ee=C("div",{target:"e3q8yfp13"})(({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",flexGrow:0,flexShrink:1,padding:e.spacing.xs,gap:e.spacing.twoXS,marginRight:e.spacing.twoXS})),Pr=C("div",{target:"e3q8yfp14"})(({theme:e})=>({marginLeft:e.spacing.sm})),X=({onClick:e,disabled:r,ariaLabel:o,iconContent:n})=>d(je,{kind:Ne.BORDERLESS_ICON,onClick:e,disabled:r,"aria-label":o,containerWidth:!0,"data-testid":"stAudioInputActionButton",children:d(He,{content:n,size:"lg",color:"inherit"})}),Sr=({disabled:e,stopRecording:r})=>d(br,{children:d(X,{onClick:r,disabled:e,ariaLabel:"Stop recording",iconContent:we})}),kr=({disabled:e,isPlaying:r,onClickPlayPause:o})=>d(Re,{children:r?d(X,{onClick:o,disabled:e,ariaLabel:"Pause",iconContent:ge}):d(X,{onClick:o,disabled:e,ariaLabel:"Play",iconContent:ye})}),Ar=({disabled:e,startRecording:r})=>d(Cr,{children:d(X,{onClick:r,disabled:e,ariaLabel:"Record",iconContent:pe})}),Ur=({onClick:e})=>d(Re,{children:d(X,{disabled:!1,onClick:e,ariaLabel:"Reset",iconContent:ve})}),Tr=({disabled:e,isRecording:r,isPlaying:o,isUploading:n,isError:s,recordingUrlExists:p,startRecording:l,stopRecording:v,onClickPlayPause:y,onClear:u})=>s?d(ee,{children:d(Ur,{onClick:u})}):n?d(ee,{children:d(Ve,{"aria-label":"Uploading",size:"base",margin:"0",padding:"0"})}):$(ee,{children:[r?d(Sr,{disabled:e,stopRecording:v}):d(Ar,{disabled:e,startRecording:l}),p&&d(kr,{disabled:e,isPlaying:o,onClickPlayPause:y})]}),Ir=t.memo(Tr),xr=()=>d(me,{children:d(Ee,{children:"An error has occurred, please try again."})}),Br=t.memo(xr),B="00:00",O=e=>{const r=Math.floor(e/1e3),o=Math.floor(r/60),n=Math.floor(o/60),s=r%60,p=o%60,l=s.toString().padStart(2,"0"),v=p.toString().padStart(2,"0"),y=n.toString().padStart(2,"0");return o<60?`${v}:${l}`:`${y}:${v}:${l}`},Fr=()=>$(me,{children:[d(Ee,{children:"This app would like to use your microphone."})," ",d(mr,{href:qe,rel:"noopener noreferrer",target:"_blank",children:"Learn how to allow access."})]}),Dr=t.memo(Fr),Lr=()=>d(Er,{children:d(Rr,{})}),zr=t.memo(Lr),Wr=({element:e,uploadClient:r,widgetMgr:o,fragmentId:n,disabled:s})=>{const p=t.useRef(null),[l,v]=t.useState(!1),[y,u]=t.useState(!1),[i,a]=t.useState(!1),[f,h]=t.useState(B),[x,b]=Y({widgetMgr:o,id:e.id,key:"deleteFileUrl",defaultValue:null}),[w,F]=Y({widgetMgr:o,id:e.id,key:"recordingUrl",defaultValue:null}),[_,D]=Y({widgetMgr:o,id:e.id,formId:e.formId,key:"recordingTime",defaultValue:B}),T=t.useRef(null),P=t.useRef(null),R=t.useRef(null),G=t.useRef(),M=e.id,k=e.formId,V=fr({containerRef:p,sampleRate:e.sampleRate??void 0,events:{onPermissionDenied:()=>{v(!0)},onError:()=>{a(!0)},onRecordStart:()=>{D(B),h(B)},onRecordReady:()=>{const g=O(V.playback.getDurationMs());D(g),h(g)},onApprove:g=>{G.current?.(g)},onCancel:()=>{D(B),h(B)},onProgressMs:g=>{D(O(g))},onPlaybackPause:()=>{h(O(V.playback.getCurrentTimeMs()))},onPlaybackFinish:()=>{h(O(V.playback.getDurationMs()))}}}),{state:N,isPlaybackPlaying:z,start:J,stop:c,approve:m,cancel:E,playback:{play:A,pause:U,load:H,getCurrentTimeMs:L,getDurationMs:j}}=V,be=t.useCallback(async g=>{T.current&&T.current.abort();const I=new AbortController;T.current=I;try{if(u(!0),q(k)&&o.setFormsWithUploadsInProgress(new Set([k])),I.signal.aborted)return;let S;try{S=URL.createObjectURL(g),P.current&&P.current!==S&&URL.revokeObjectURL(P.current),P.current=S}catch{a(!0),u(!1),q(k)&&o.setFormsWithUploadsInProgress(new Set);return}if(I.signal.aborted){URL.revokeObjectURL(S),P.current=null;return}F(S);const xe=new Date().toISOString().slice(0,16).replace(/:/g,"-"),Be=new File([g],`${xe}_audio.wav`,{type:g.type});try{const{successfulUploads:Fe,failedUploads:De}=await pr({files:[Be],uploadClient:r,widgetMgr:o,widgetInfo:{id:M,formId:k},fragmentId:n,signal:I.signal});if(I.signal.aborted)return;if(De.length>0){a(!0);return}a(!1);const ie=Fe[0];ie?.fileUrl?.deleteUrl&&b(ie.fileUrl.deleteUrl)}catch{I.signal.aborted||a(!0)}finally{q(k)&&o.setFormsWithUploadsInProgress(new Set),I.signal.aborted||u(!1)}}catch{I.signal.aborted||(a(!0),u(!1)),q(k)&&o.setFormsWithUploadsInProgress(new Set)}},[r,o,M,k,n,b,F]);G.current=be;const W=t.useCallback(async({updateWidgetManager:g,deleteFile:I})=>{const S=w;if(S&&P.current===S&&(URL.revokeObjectURL(S),P.current=null),R.current&&(cancelAnimationFrame(R.current),R.current=null),F(null),b(null),h(B),D(B),E(),g&&o.setFileUploaderStateValue(e,{},{fromUi:!0},n),I&&x)try{await r.deleteFile(x)}catch{}q(S)&&URL.revokeObjectURL(S)},[x,w,r,E,e,o,n,D,b,F]);t.useEffect(()=>{const g=()=>{z&&(h(O(L())),R.current=requestAnimationFrame(g))};return z?R.current=requestAnimationFrame(g):R.current&&(cancelAnimationFrame(R.current),R.current=null),()=>{R.current&&(cancelAnimationFrame(R.current),R.current=null)}},[z,L]),t.useEffect(()=>{if(!w)return;let g=!1;return h(_),(async()=>{try{if(await H(w),g)return;const S=j();S>0&&h(O(S))}catch{g||a(!0)}})(),()=>{g=!0}},[w,_,H,j]),t.useEffect(()=>{if(he(k))return;const g=new Qe;return g.manageFormClearListener(o,k,()=>{W({updateWidgetManager:!0,deleteFile:!1})}),()=>g.disconnect()},[k,W,o]),t.useEffect(()=>()=>{T.current&&(T.current.abort(),T.current=null),R.current&&(cancelAnimationFrame(R.current),R.current=null)},[]);const Ce=t.useCallback(async()=>{try{if(z){const g=L();U(),h(O(g))}else N==="idle"&&w&&(L()<=100&&h(B),await A())}catch{a(!0)}},[z,L,U,A,w,N]),re=t.useCallback(async()=>{w&&await W({updateWidgetManager:!1,deleteFile:!0});try{h(B),await J()}catch{}},[W,w,J]),te=t.useCallback(async()=>{try{const g=await c();await m(g)}catch{a(!0)}},[m,c]),ne=hr(w,"recording.wav"),Pe=t.useCallback(()=>{re()},[re]),Se=t.useCallback(()=>{te()},[te]),ke=t.useCallback(()=>{W({updateWidgetManager:!1,deleteFile:!0}),a(!1)},[W]),Ae=t.useCallback(()=>{ne()},[ne]),Ue=t.useCallback(()=>{W({updateWidgetManager:!0,deleteFile:!0})},[W]),Q=N==="recording",oe=z,Te=Q?_:f,se=N==="idle"&&!l&&!w,Ie=l||se||i;return $(gr,{className:"stAudioInput","data-testid":"stAudioInput",children:[d(Ze,{label:e.label,disabled:s,labelVisibility:$e(e.labelVisibility?.value),children:e.help&&d(Pr,{children:d(Ge,{content:e.help,placement:Xe.TOP})})}),$(fe,{disabled:s,children:[$(Ke,{isFullScreen:!1,disableFullscreenMode:!0,target:fe,children:[w&&d(de,{label:"Download as WAV",icon:er,onClick:Ae}),x&&d(de,{label:"Clear recording",icon:rr,onClick:Ue})]}),d(Ir,{isRecording:Q,isPlaying:oe,isUploading:y,isError:i,recordingUrlExists:!!w,startRecording:Pe,stopRecording:Se,onClickPlayPause:()=>void Ce(),onClear:ke,disabled:s||l}),$(yr,{children:[i&&d(Br,{}),se&&d(zr,{}),l&&d(Dr,{}),d(vr,{"data-testid":"stAudioInputWaveSurfer",ref:p,show:!Ie})]}),d(wr,{isPlayingOrRecording:Q||oe,disabled:s,"data-testid":"stAudioInputWaveformTimeCode",children:Te})]})]})},Hr=t.memo(Wr);export{Hr as default};
@@ -1 +1 @@
1
- import{r,E as M,_ as Q,v as E,ax as T,m as h,o as J,x as ft,u as mt,a4 as bt,a5 as gt,ay as X,e as W,j as u,l as ht,Q as yt,T as It,P as Tt,W as Ct,y as wt,am as G}from"./index.6xX1278W.js";import{u as St}from"./uniqueId.RI1LJdtz.js";import{I as vt}from"./InputInstructions.xnSDuYeQ.js";import{u as Vt}from"./FormClearHelper.DTcdrasw.js";import{s as xt}from"./sprintf.D7DtBTRn.js";import{I as kt}from"./input.s6pjQ49A.js";import"./base-input.BQft14La.js";var Y=r.forwardRef(function(t,e){var a={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return r.createElement(M,Q({iconAttrs:a,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},t,{ref:e}),r.createElement("path",{d:"M0 3v2h8V3H0z"}))});Y.displayName="Minus";var Z=r.forwardRef(function(t,e){var a={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return r.createElement(M,Q({iconAttrs:a,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},t,{ref:e}),r.createElement("path",{d:"M3 0v3H0v2h3v3h2V5h3V3H5V0H3z"}))});Z.displayName="Plus";const Dt=E("div",{target:"eaba2yi0"})(({theme:t})=>({display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center",height:t.sizes.minElementHeight,borderWidth:t.sizes.borderWidth,borderStyle:"solid",borderColor:t.colors.widgetBorderColor??t.colors.secondaryBg,transitionDuration:"200ms",transitionProperty:"border",transitionTimingFunction:"cubic-bezier(0.2, 0.8, 0.4, 1)",borderRadius:t.radii.default,overflow:"hidden","&.focused":{borderColor:t.colors.primary},input:{MozAppearance:"textfield","&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{WebkitAppearance:"none",margin:t.spacing.none}}})),Et=E("div",{target:"eaba2yi1"})({display:"flex",flexDirection:"row",alignSelf:"stretch"}),K=E("button",{target:"eaba2yi2"})(({theme:t})=>({margin:t.spacing.none,border:"none",height:t.sizes.full,display:"flex",alignItems:"center",width:t.sizes.numberInputControlsWidth,justifyContent:"center",color:t.colors.bodyText,transition:"color 300ms, backgroundColor 300ms",backgroundColor:t.colors.secondaryBg,"&:hover:enabled, &:focus:enabled":{color:t.colors.white,backgroundColor:t.colors.primary,transition:"none",outline:"none"},"&:active":{outline:"none",border:"none"},"&:disabled":{cursor:"not-allowed",color:t.colors.fadedText40}})),Rt=E("div",{target:"eaba2yi3"})(({theme:t,clearable:e})=>({position:"absolute",marginRight:t.spacing.twoXS,left:0,right:`calc(${t.sizes.numberInputControlsWidth} * 2 + ${e?"1em":"0em"})`})),Nt=ft.getLogger("NumberInput");function Ft(t){return h(t)||t===""?void 0:t}const D=({value:t,format:e,step:a,dataType:m})=>{if(h(t))return null;let o=Ft(e);if(h(o)&&J(a)){const i=a.toString();m===T.DataType.FLOAT&&a!==0&&i.includes(".")&&(o=`%0.${i.split(".")[1].length}f`)}if(h(o))return t.toString();try{return xt.sprintf(o,t)}catch(i){return Nt.warn(`Error in sprintf(${o}, ${t}): ${i}`),String(t)}},zt=(t,e,a)=>h(t)?!1:t-e>=a,Wt=(t,e,a)=>h(t)?!1:t+e<=a,Lt=t=>(t.element.dataType===T.DataType.INT?t.widgetMgr.getIntValue(t.element):t.widgetMgr.getDoubleValue(t.element))??t.element.default??null,q=({step:t,dataType:e})=>t||(e===T.DataType.INT?1:.01),Bt=({disabled:t,element:e,widgetMgr:a,fragmentId:m})=>{const o=mt(),{dataType:i,id:v,formId:f,default:L,format:b,icon:R,min:y,max:I}=e,{width:B,elementRef:tt}=bt(),[s,et]=r.useState(()=>q(e)),P=Lt({element:e,widgetMgr:a}),[g,C]=r.useState(!1),[l,w]=r.useState(P),[U,H]=r.useState(!1),V=r.useRef(null),A=r.useRef(St("number_input_")),[$,S]=r.useState(()=>D({value:P,dataType:i,format:b,step:s})),x=zt(l,s,y),k=Wt(l,s,I),O=gt({formId:f}),ot=O?a.allowFormEnterToSubmit(f):g,rt=U&&B>o.breakpoints.hideWidgetDetails;r.useEffect(()=>{et(q({step:e.step,dataType:e.dataType}))},[e.dataType,e.step]),r.useEffect(()=>{g||S(D({value:l,dataType:i,format:b,step:s}))},[i,b,s]);const d=r.useCallback(({value:n,source:c})=>{if(J(n)&&(y>n||n>I))V.current?.reportValidity();else{const p=n??L??null;switch(i){case T.DataType.INT:a.setIntValue({id:v,formId:f},p,c,m);break;case T.DataType.FLOAT:a.setDoubleValue({id:v,formId:f},p,c,m);break;default:throw new Error("Invalid data type")}C(!1),w(p),S(D({value:p,dataType:i,format:b,step:s}))}},[y,I,V,a,m,s,i,v,f,L,b]),nt=r.useCallback(()=>{g&&d({value:l,source:{fromUi:!0}}),H(!1)},[g,l,d]),at=r.useCallback(()=>{H(!0)},[]),j=r.useCallback(()=>{const{value:n}=e;e.setValue=!1,w(n??null),S(D({value:n??null,dataType:i,format:b,step:s})),d({value:n??null,source:{fromUi:!1}})},[e,s,d,i,b]);r.useEffect(()=>{e.setValue?j():d({value:l,source:{fromUi:!1}});const n=V.current;if(n){const c=p=>{p.preventDefault()};return n.addEventListener("wheel",c),()=>{n.removeEventListener("wheel",c)}}},[]),e.setValue&&j();const N=h(e.default)&&!t,st=r.useCallback(()=>{const n=e.default??null;w(n),d({value:n,source:{fromUi:!0}})},[e]);Vt({element:e,widgetMgr:a,onFormCleared:st});const it=n=>{const{value:c}=n.target;if(c==="")C(!0),w(null),S(null);else{let p;e.dataType===T.DataType.INT?p=parseInt(c,10):p=parseFloat(c),C(!0),w(p),S(c)}},F=r.useCallback(()=>{k&&(C(!0),d({value:(l??y)+s,source:{fromUi:!0}}))},[l,y,s,k]),z=r.useCallback(()=>{x&&(C(!0),d({value:(l??I)-s,source:{fromUi:!0}}))},[l,I,s,x]),lt=r.useCallback(n=>{const{key:c}=n;switch(c){case"ArrowUp":n.preventDefault(),F();break;case"ArrowDown":n.preventDefault(),z();break}},[F,z]),ct=r.useCallback(n=>{n.key==="Enter"&&(g&&d({value:l,source:{fromUi:!0}}),a.allowFormEnterToSubmit(f)&&a.submitForm(f,m))},[g,l,d,a,f,m]),_=R?.startsWith(":material"),ut=_?"lg":"base",dt=X(o.iconSizes.lg)+2*X(o.spacing.twoXS),pt=R?o.breakpoints.hideNumberInputControls+dt:o.breakpoints.hideNumberInputControls;return W("div",{className:"stNumberInput","data-testid":"stNumberInput",ref:tt,children:[u(Ct,{label:e.label,disabled:t,labelVisibility:ht(e.labelVisibility?.value),htmlFor:A.current,children:e.help&&u(yt,{children:u(It,{content:e.help,placement:Tt.TOP_RIGHT})})}),W(Dt,{className:U?"focused":"","data-testid":"stNumberInputContainer",children:[u(kt,{type:"number",inputRef:V,value:$??"",placeholder:e.placeholder,onBlur:nt,onFocus:at,onChange:it,onKeyPress:ct,onKeyDown:lt,clearable:N,clearOnEscape:N,disabled:t,"aria-label":e.label,startEnhancer:e.icon&&u(wt,{"data-testid":"stNumberInputIcon",iconValue:e.icon,size:ut}),id:A.current,overrides:{ClearIconContainer:{style:{padding:0}},ClearIcon:{props:{overrides:{Svg:{style:{color:o.colors.grayTextColor,padding:o.spacing.threeXS,height:o.sizes.clearIconSize,width:o.sizes.clearIconSize,":hover":{fill:o.colors.bodyText}}}}}},Input:{props:{"data-testid":"stNumberInputField",step:s,min:y,max:I,type:"number",inputMode:""},style:{fontWeight:o.fontWeights.normal,lineHeight:o.lineHeights.inputWidget,paddingRight:o.spacing.sm,paddingLeft:o.spacing.md,paddingBottom:o.spacing.sm,paddingTop:o.spacing.sm,"::placeholder":{color:o.colors.fadedText60}}},InputContainer:{style:()=>({borderTopRightRadius:0,borderBottomRightRadius:0})},Root:{style:{borderTopRightRadius:0,borderBottomRightRadius:0,borderTopLeftRadius:0,borderBottomLeftRadius:0,borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0,paddingRight:0,paddingLeft:R?o.spacing.sm:0}},StartEnhancer:{style:{paddingLeft:0,paddingRight:0,minWidth:o.iconSizes.lg,color:_?o.colors.fadedText60:"inherit"}}}}),B>pt&&W(Et,{children:[u(K,{"data-testid":"stNumberInputStepDown",onClick:z,disabled:!x||t,tabIndex:-1,children:u(G,{content:Y,size:"xs",color:x?"inherit":o.colors.fadedText40})}),u(K,{"data-testid":"stNumberInputStepUp",onClick:F,disabled:!k||t,tabIndex:-1,children:u(G,{content:Z,size:"xs",color:k?"inherit":o.colors.fadedText40})})]})]}),rt&&u(Rt,{clearable:N,children:u(vt,{dirty:g,value:$??"",inForm:O,allowEnterToSubmit:ot})})]})},_t=r.memo(Bt);export{_t as default};
1
+ import{r,E as M,_ as J,s as E,aw as T,k as h,n as Q,w as ft,u as mt,a3 as bt,a4 as gt,ax as X,e as W,j as u,l as ht,O as yt,T as It,P as Tt,W as wt,x as Ct,al as G}from"./index.CAj-7vWz.js";import{u as St}from"./uniqueId.oG4Gvj1v.js";import{I as vt}from"./InputInstructions.jhH15PqV.js";import{u as Vt}from"./FormClearHelper.BB1Km6eP.js";import{s as xt}from"./sprintf.D7DtBTRn.js";import{I as kt}from"./input.D4MN_FzN.js";import"./base-input.CJGiNqed.js";var Y=r.forwardRef(function(t,e){var a={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return r.createElement(M,J({iconAttrs:a,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},t,{ref:e}),r.createElement("path",{d:"M0 3v2h8V3H0z"}))});Y.displayName="Minus";var Z=r.forwardRef(function(t,e){var a={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return r.createElement(M,J({iconAttrs:a,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},t,{ref:e}),r.createElement("path",{d:"M3 0v3H0v2h3v3h2V5h3V3H5V0H3z"}))});Z.displayName="Plus";const Dt=E("div",{target:"eaba2yi0"})(({theme:t})=>({display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center",height:t.sizes.minElementHeight,borderWidth:t.sizes.borderWidth,borderStyle:"solid",borderColor:t.colors.widgetBorderColor??t.colors.secondaryBg,transitionDuration:"200ms",transitionProperty:"border",transitionTimingFunction:"cubic-bezier(0.2, 0.8, 0.4, 1)",borderRadius:t.radii.default,overflow:"hidden","&.focused":{borderColor:t.colors.primary},input:{MozAppearance:"textfield","&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{WebkitAppearance:"none",margin:t.spacing.none}}})),Et=E("div",{target:"eaba2yi1"})({display:"flex",flexDirection:"row",alignSelf:"stretch"}),K=E("button",{target:"eaba2yi2"})(({theme:t})=>({margin:t.spacing.none,border:"none",height:t.sizes.full,display:"flex",alignItems:"center",width:t.sizes.numberInputControlsWidth,justifyContent:"center",color:t.colors.bodyText,transition:"color 300ms, backgroundColor 300ms",backgroundColor:t.colors.secondaryBg,"&:hover:enabled, &:focus:enabled":{color:t.colors.white,backgroundColor:t.colors.primary,transition:"none",outline:"none"},"&:active":{outline:"none",border:"none"},"&:disabled":{cursor:"not-allowed",color:t.colors.fadedText40}})),Rt=E("div",{target:"eaba2yi3"})(({theme:t,clearable:e})=>({position:"absolute",marginRight:t.spacing.twoXS,left:0,right:`calc(${t.sizes.numberInputControlsWidth} * 2 + ${e?"1em":"0em"})`})),Nt=ft.getLogger("NumberInput");function Ft(t){return h(t)||t===""?void 0:t}const D=({value:t,format:e,step:a,dataType:m})=>{if(h(t))return null;let o=Ft(e);if(h(o)&&Q(a)){const i=a.toString();m===T.DataType.FLOAT&&a!==0&&i.includes(".")&&(o=`%0.${i.split(".")[1].length}f`)}if(h(o))return t.toString();try{return xt.sprintf(o,t)}catch(i){return Nt.warn(`Error in sprintf(${o}, ${t}): ${i}`),String(t)}},zt=(t,e,a)=>h(t)?!1:t-e>=a,Wt=(t,e,a)=>h(t)?!1:t+e<=a,Lt=t=>(t.element.dataType===T.DataType.INT?t.widgetMgr.getIntValue(t.element):t.widgetMgr.getDoubleValue(t.element))??t.element.default??null,q=({step:t,dataType:e})=>t||(e===T.DataType.INT?1:.01),Bt=({disabled:t,element:e,widgetMgr:a,fragmentId:m})=>{const o=mt(),{dataType:i,id:v,formId:f,default:L,format:b,icon:R,min:y,max:I}=e,{width:B,elementRef:tt}=bt(),[s,et]=r.useState(()=>q(e)),P=Lt({element:e,widgetMgr:a}),[g,w]=r.useState(!1),[l,C]=r.useState(P),[U,H]=r.useState(!1),V=r.useRef(null),A=r.useRef(St("number_input_")),[O,S]=r.useState(()=>D({value:P,dataType:i,format:b,step:s})),x=zt(l,s,y),k=Wt(l,s,I),$=gt({formId:f}),ot=$?a.allowFormEnterToSubmit(f):g,rt=U&&B>o.breakpoints.hideWidgetDetails;r.useEffect(()=>{et(q({step:e.step,dataType:e.dataType}))},[e.dataType,e.step]),r.useEffect(()=>{g||S(D({value:l,dataType:i,format:b,step:s}))},[i,b,s]);const d=r.useCallback(({value:n,source:c})=>{if(Q(n)&&(y>n||n>I))V.current?.reportValidity();else{const p=n??L??null;switch(i){case T.DataType.INT:a.setIntValue({id:v,formId:f},p,c,m);break;case T.DataType.FLOAT:a.setDoubleValue({id:v,formId:f},p,c,m);break;default:throw new Error("Invalid data type")}w(!1),C(p),S(D({value:p,dataType:i,format:b,step:s}))}},[y,I,V,a,m,s,i,v,f,L,b]),nt=r.useCallback(()=>{g&&d({value:l,source:{fromUi:!0}}),H(!1)},[g,l,d]),at=r.useCallback(()=>{H(!0)},[]),j=r.useCallback(()=>{const{value:n}=e;e.setValue=!1,C(n??null),S(D({value:n??null,dataType:i,format:b,step:s})),d({value:n??null,source:{fromUi:!1}})},[e,s,d,i,b]);r.useEffect(()=>{e.setValue?j():d({value:l,source:{fromUi:!1}});const n=V.current;if(n){const c=p=>{p.preventDefault()};return n.addEventListener("wheel",c),()=>{n.removeEventListener("wheel",c)}}},[]),e.setValue&&j();const N=h(e.default)&&!t,st=r.useCallback(()=>{const n=e.default??null;C(n),d({value:n,source:{fromUi:!0}})},[e]);Vt({element:e,widgetMgr:a,onFormCleared:st});const it=n=>{const{value:c}=n.target;if(c==="")w(!0),C(null),S(null);else{let p;e.dataType===T.DataType.INT?p=parseInt(c,10):p=parseFloat(c),w(!0),C(p),S(c)}},F=r.useCallback(()=>{k&&(w(!0),d({value:(l??y)+s,source:{fromUi:!0}}))},[l,y,s,k]),z=r.useCallback(()=>{x&&(w(!0),d({value:(l??I)-s,source:{fromUi:!0}}))},[l,I,s,x]),lt=r.useCallback(n=>{const{key:c}=n;switch(c){case"ArrowUp":n.preventDefault(),F();break;case"ArrowDown":n.preventDefault(),z();break}},[F,z]),ct=r.useCallback(n=>{n.key==="Enter"&&(g&&d({value:l,source:{fromUi:!0}}),a.allowFormEnterToSubmit(f)&&a.submitForm(f,m))},[g,l,d,a,f,m]),_=R?.startsWith(":material"),ut=_?"lg":"base",dt=X(o.iconSizes.lg)+2*X(o.spacing.twoXS),pt=R?o.breakpoints.hideNumberInputControls+dt:o.breakpoints.hideNumberInputControls;return W("div",{className:"stNumberInput","data-testid":"stNumberInput",ref:tt,children:[u(wt,{label:e.label,disabled:t,labelVisibility:ht(e.labelVisibility?.value),htmlFor:A.current,children:e.help&&u(yt,{children:u(It,{content:e.help,placement:Tt.TOP_RIGHT})})}),W(Dt,{className:U?"focused":"","data-testid":"stNumberInputContainer",children:[u(kt,{type:"number",inputRef:V,value:O??"",placeholder:e.placeholder,onBlur:nt,onFocus:at,onChange:it,onKeyPress:ct,onKeyDown:lt,clearable:N,clearOnEscape:N,disabled:t,"aria-label":e.label,startEnhancer:e.icon&&u(Ct,{"data-testid":"stNumberInputIcon",iconValue:e.icon,size:ut}),id:A.current,overrides:{ClearIconContainer:{style:{padding:0}},ClearIcon:{props:{overrides:{Svg:{style:{color:o.colors.grayTextColor,padding:o.spacing.threeXS,height:o.sizes.clearIconSize,width:o.sizes.clearIconSize,":hover":{fill:o.colors.bodyText}}}}}},Input:{props:{"data-testid":"stNumberInputField",step:s,min:y,max:I,type:"number",inputMode:""},style:{fontWeight:o.fontWeights.normal,lineHeight:o.lineHeights.inputWidget,paddingRight:o.spacing.sm,paddingLeft:o.spacing.md,paddingBottom:o.spacing.sm,paddingTop:o.spacing.sm,"::placeholder":{color:o.colors.fadedText60}}},InputContainer:{style:()=>({borderTopRightRadius:0,borderBottomRightRadius:0})},Root:{style:{borderTopRightRadius:0,borderBottomRightRadius:0,borderTopLeftRadius:0,borderBottomLeftRadius:0,borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0,paddingRight:0,paddingLeft:R?o.spacing.sm:0}},StartEnhancer:{style:{paddingLeft:0,paddingRight:0,minWidth:o.iconSizes.lg,color:_?o.colors.fadedText60:"inherit"}}}}),B>pt&&W(Et,{children:[u(K,{"data-testid":"stNumberInputStepDown",onClick:z,disabled:!x||t,tabIndex:-1,children:u(G,{content:Y,size:"xs",color:x?"inherit":o.colors.fadedText40})}),u(K,{"data-testid":"stNumberInputStepUp",onClick:F,disabled:!k||t,tabIndex:-1,children:u(G,{content:Z,size:"xs",color:k?"inherit":o.colors.fadedText40})})]})]}),rt&&u(Rt,{clearable:N,children:u(vt,{dirty:g,value:O??"",inForm:$,allowEnterToSubmit:ot})})]})},_t=r.memo(Bt);export{_t as default};
@@ -1 +1 @@
1
- import{v as e,r as a,e as t,j as r,S as o}from"./index.6xX1278W.js";import{P as i}from"./ProgressBar.DetlP5aY.js";const l=e("div",{target:"e1675qd10"})(({theme:s})=>({paddingBottom:s.spacing.sm,lineHeight:"normal"}));function d({element:s}){return t("div",{className:"stProgress","data-testid":"stProgress",children:[r(l,{children:r(o,{source:s.text,allowHTML:!1,isLabel:!0})}),r(i,{value:s.value})]})}const m=a.memo(d);export{m as default};
1
+ import{s as e,r as a,e as t,j as r,S as o}from"./index.CAj-7vWz.js";import{P as i}from"./ProgressBar.DLY8H6nE.js";const l=e("div",{target:"e1675qd10"})(({theme:s})=>({paddingBottom:s.spacing.sm,lineHeight:"normal"}));function d({element:s}){return t("div",{className:"stProgress","data-testid":"stProgress",children:[r(l,{children:r(o,{source:s.text,allowHTML:!1,isLabel:!0})}),r(i,{value:s.value})]})}const m=a.memo(d);export{m as default};