streamlit-nightly 1.45.1.dev20250507__py3-none-any.whl → 1.45.1.dev20250509__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 (203) hide show
  1. streamlit/auth_util.py +3 -3
  2. streamlit/cli_util.py +3 -2
  3. streamlit/commands/logo.py +2 -2
  4. streamlit/commands/navigation.py +5 -4
  5. streamlit/commands/page_config.py +3 -1
  6. streamlit/components/types/base_custom_component.py +7 -7
  7. streamlit/components/v1/custom_component.py +6 -6
  8. streamlit/config.py +84 -48
  9. streamlit/config_option.py +2 -2
  10. streamlit/config_util.py +20 -12
  11. streamlit/connections/base_connection.py +3 -3
  12. streamlit/connections/snowflake_connection.py +5 -5
  13. streamlit/connections/snowpark_connection.py +3 -3
  14. streamlit/connections/sql_connection.py +9 -10
  15. streamlit/cursor.py +6 -6
  16. streamlit/delta_generator.py +7 -6
  17. streamlit/delta_generator_singletons.py +2 -2
  18. streamlit/deprecation_util.py +1 -1
  19. streamlit/elements/arrow.py +2 -3
  20. streamlit/elements/deck_gl_json_chart.py +30 -17
  21. streamlit/elements/dialog_decorator.py +3 -3
  22. streamlit/elements/doc_string.py +20 -20
  23. streamlit/elements/layouts.py +26 -7
  24. streamlit/elements/lib/built_in_chart_utils.py +37 -39
  25. streamlit/elements/lib/color_util.py +3 -3
  26. streamlit/elements/lib/column_types.py +2 -2
  27. streamlit/elements/lib/dialog.py +2 -2
  28. streamlit/elements/lib/event_utils.py +1 -1
  29. streamlit/elements/lib/mutable_status_container.py +1 -1
  30. streamlit/elements/lib/policies.py +3 -3
  31. streamlit/elements/lib/utils.py +5 -5
  32. streamlit/elements/map.py +20 -15
  33. streamlit/elements/progress.py +9 -12
  34. streamlit/elements/vega_charts.py +2 -2
  35. streamlit/elements/widgets/button_group.py +2 -2
  36. streamlit/elements/widgets/data_editor.py +2 -2
  37. streamlit/elements/widgets/multiselect.py +2 -2
  38. streamlit/elements/widgets/selectbox.py +1 -1
  39. streamlit/elements/widgets/slider.py +16 -14
  40. streamlit/elements/write.py +3 -6
  41. streamlit/errors.py +34 -21
  42. streamlit/external/langchain/streamlit_callback_handler.py +2 -2
  43. streamlit/file_util.py +8 -8
  44. streamlit/git_util.py +1 -1
  45. streamlit/hello/dataframe_demo.py +1 -1
  46. streamlit/hello/mapping_demo.py +1 -1
  47. streamlit/navigation/page.py +1 -1
  48. streamlit/proto/Block_pb2.py +38 -29
  49. streamlit/proto/Block_pb2.pyi +68 -4
  50. streamlit/proto/DeckGlJsonChart_pb2.pyi +1 -1
  51. streamlit/proto/GapSize_pb2.py +29 -0
  52. streamlit/proto/GapSize_pb2.pyi +70 -0
  53. streamlit/proto/HeightConfig_pb2.py +27 -0
  54. streamlit/proto/HeightConfig_pb2.pyi +48 -0
  55. streamlit/proto/WidthConfig_pb2.py +2 -2
  56. streamlit/proto/WidthConfig_pb2.pyi +15 -1
  57. streamlit/runtime/app_session.py +2 -2
  58. streamlit/runtime/caching/cache_data_api.py +9 -5
  59. streamlit/runtime/caching/cache_errors.py +3 -3
  60. streamlit/runtime/caching/cache_resource_api.py +7 -7
  61. streamlit/runtime/caching/cache_utils.py +9 -9
  62. streamlit/runtime/caching/cached_message_replay.py +1 -1
  63. streamlit/runtime/caching/hashing.py +70 -74
  64. streamlit/runtime/caching/legacy_cache_api.py +1 -1
  65. streamlit/runtime/caching/storage/in_memory_cache_storage_wrapper.py +3 -1
  66. streamlit/runtime/caching/storage/local_disk_cache_storage.py +1 -1
  67. streamlit/runtime/connection_factory.py +12 -12
  68. streamlit/runtime/context.py +2 -2
  69. streamlit/runtime/credentials.py +3 -3
  70. streamlit/runtime/fragment.py +3 -4
  71. streamlit/runtime/media_file_manager.py +2 -2
  72. streamlit/runtime/memory_media_file_storage.py +1 -1
  73. streamlit/runtime/memory_uploaded_file_manager.py +1 -1
  74. streamlit/runtime/metrics_util.py +5 -6
  75. streamlit/runtime/pages_manager.py +3 -3
  76. streamlit/runtime/runtime.py +1 -1
  77. streamlit/runtime/runtime_util.py +2 -2
  78. streamlit/runtime/scriptrunner/exec_code.py +10 -3
  79. streamlit/runtime/scriptrunner/magic.py +13 -8
  80. streamlit/runtime/scriptrunner/script_runner.py +2 -2
  81. streamlit/runtime/scriptrunner_utils/exceptions.py +1 -1
  82. streamlit/runtime/scriptrunner_utils/script_run_context.py +6 -5
  83. streamlit/runtime/secrets.py +8 -11
  84. streamlit/runtime/state/query_params.py +2 -2
  85. streamlit/runtime/state/safe_session_state.py +2 -2
  86. streamlit/runtime/state/session_state.py +17 -15
  87. streamlit/runtime/stats.py +1 -1
  88. streamlit/runtime/uploaded_file_manager.py +1 -1
  89. streamlit/source_util.py +3 -4
  90. streamlit/static/index.html +1 -1
  91. streamlit/static/static/js/{ErrorOutline.esm.BgsGCsV4.js → ErrorOutline.esm.C-0hf1-k.js} +1 -1
  92. streamlit/static/static/js/{FileDownload.esm.CCKezPn5.js → FileDownload.esm.B-fFGI-X.js} +1 -1
  93. streamlit/static/static/js/{FileHelper.CprSF_kT.js → FileHelper.ACYo0OZo.js} +1 -1
  94. streamlit/static/static/js/{FormClearHelper.DiwQ0EtT.js → FormClearHelper.CVNTT-bJ.js} +1 -1
  95. streamlit/static/static/js/{Hooks.DDqhyZ1_.js → Hooks.C3thlpd2.js} +1 -1
  96. streamlit/static/static/js/{InputInstructions.BCEZxme4.js → InputInstructions.CwAxousX.js} +1 -1
  97. streamlit/static/static/js/{ProgressBar.CGdY94g_.js → ProgressBar.xh599Rum.js} +2 -2
  98. streamlit/static/static/js/{RenderInPortalIfExists.uGJp_Q0v.js → RenderInPortalIfExists.CQLIsNPE.js} +1 -1
  99. streamlit/static/static/js/{Toolbar.hTlw0-K1.js → Toolbar.LKdyvP0u.js} +1 -1
  100. streamlit/static/static/js/{index.xsH4HHeE.js → UploadFileInfo.0DCkpDDf.js} +5 -5
  101. streamlit/static/static/js/{base-input.mGTY3-qU.js → base-input.D8OdS4WW.js} +4 -4
  102. streamlit/static/static/js/{checkbox.Cg-5cKAh.js → checkbox.DSdYKlOI.js} +2 -2
  103. streamlit/static/static/js/{createSuper.-HPb1oYT.js → createSuper.B2pyCfWw.js} +1 -1
  104. streamlit/static/static/js/{data-grid-overlay-editor.BpNYxiTp.js → data-grid-overlay-editor.DhO2r0ne.js} +1 -1
  105. streamlit/static/static/js/{downloader.DS9891pS.js → downloader.C24skoDM.js} +1 -1
  106. streamlit/static/static/js/{es6.CU1PEL2w.js → es6.DHkvCKPh.js} +2 -2
  107. streamlit/static/static/js/{iframeResizer.contentWindow.CgJE2bJN.js → iframeResizer.contentWindow.2ckQaC2c.js} +1 -1
  108. streamlit/static/static/js/index.0dGwl8CJ.js +1 -0
  109. streamlit/static/static/js/index.B5A28NpR.js +1 -0
  110. streamlit/static/static/js/{index.BC0ueJ8H.js → index.B5EFweZ4.js} +1 -1
  111. streamlit/static/static/js/{index.CyGuL4If.js → index.BAafqHfB.js} +2 -2
  112. streamlit/static/static/js/{index.DWV80Vyw.js → index.BHTbGZPQ.js} +1 -1
  113. streamlit/static/static/js/index.BNXtQAj4.js +1 -0
  114. streamlit/static/static/js/index.BRhKaVdO.js +1 -0
  115. streamlit/static/static/js/index.BSOiJVQd.js +2 -0
  116. streamlit/static/static/js/{index.GSYBrzVp.js → index.BVgTQbOJ.js} +1 -1
  117. streamlit/static/static/js/{index.BTTj6ld4.js → index.BflIniLm.js} +1 -1
  118. streamlit/static/static/js/{index.DLTqo4pp.js → index.BjeNtZIz.js} +3 -3
  119. streamlit/static/static/js/{index.DZ6oX-v9.js → index.By-NmdnB.js} +161 -161
  120. streamlit/static/static/js/{index.DVpzZJNg.js → index.CIoOEhZ2.js} +1 -1
  121. streamlit/static/static/js/{index.CN91oQMB.js → index.CRCdonis.js} +36 -36
  122. streamlit/static/static/js/index.CRxaBCJ7.js +1 -0
  123. streamlit/static/static/js/index.CU-pbYVN.js +1 -0
  124. streamlit/static/static/js/{index.CzGUd4IN.js → index.CUsk52t2.js} +1 -1
  125. streamlit/static/static/js/{index.BHVQ94t4.js → index.CVO14oQG.js} +2 -2
  126. streamlit/static/static/js/index.CXFuA6J-.js +1 -0
  127. streamlit/static/static/js/{index.DJHUlWgy.js → index.C_dd5q7u.js} +1 -1
  128. streamlit/static/static/js/{index.Bph6ZoI5.js → index.CjWUnKIN.js} +1 -1
  129. streamlit/static/static/js/{index.B209tswL.js → index.CkTL9bAR.js} +256 -256
  130. streamlit/static/static/js/{index.ErkF0SoX.js → index.CsbhsAPy.js} +2 -2
  131. streamlit/static/static/js/{index.hPjr68pz.js → index.CtCnBUtk.js} +1 -1
  132. streamlit/static/static/js/{index.BT0p7gAu.js → index.CwuKadAX.js} +1 -1
  133. streamlit/static/static/js/{index.CtoDsUtq.js → index.D0R7Xh4Z.js} +1 -1
  134. streamlit/static/static/js/index.D2D75EDw.js +73 -0
  135. streamlit/static/static/js/index.D4eMiZ1F.js +1 -0
  136. streamlit/static/static/js/{index.Dh4RKl-F.js → index.D7SCC3z9.js} +1 -1
  137. streamlit/static/static/js/index.DZiilxEt.js +1 -0
  138. streamlit/static/static/js/{index.DtqvdV-p.js → index.Dvr1cEJS.js} +1 -1
  139. streamlit/static/static/js/index.JtIlC6Uq.js +1 -0
  140. streamlit/static/static/js/index.fz_c3Xh_.js +1 -0
  141. streamlit/static/static/js/{index.CvFsF3FD.js → index.gFjPlsMT.js} +1 -1
  142. streamlit/static/static/js/{index.DPJBu2uZ.js → index.jCJYMVED.js} +1 -1
  143. streamlit/static/static/js/index.xldt56AE.js +1 -0
  144. streamlit/static/static/js/{index.Bb-Ukg41.js → index.yzoj_DuM.js} +1 -1
  145. streamlit/static/static/js/{input.DY17i94N.js → input.BP6LX_Bg.js} +2 -2
  146. streamlit/static/static/js/{memory.DsIIcbSd.js → memory.E9x2ZYJv.js} +1 -1
  147. streamlit/static/static/js/{mergeWith.cRgGdgvI.js → mergeWith.CZP2AaVS.js} +1 -1
  148. streamlit/static/static/js/{number-overlay-editor.B8Xi2dYq.js → number-overlay-editor.D-Kl79U_.js} +1 -1
  149. streamlit/static/static/js/{possibleConstructorReturn.BgDi5nUm.js → possibleConstructorReturn.P2ILVC_6.js} +1 -1
  150. streamlit/static/static/js/{sandbox.BH9emp13.js → sandbox.DfzJIGMV.js} +1 -1
  151. streamlit/static/static/js/{textarea.DAyShsGG.js → textarea.4PjzfDWF.js} +2 -2
  152. streamlit/static/static/js/{timepicker.CCH2R2Y0.js → timepicker.DMQdaNzO.js} +1 -1
  153. streamlit/static/static/js/{toConsumableArray.CNffSDCu.js → toConsumableArray.BEdkbHYx.js} +1 -1
  154. streamlit/static/static/js/{uniqueId.B49CstkV.js → uniqueId.CAs7ftHC.js} +1 -1
  155. streamlit/static/static/js/{useBasicWidgetState.CkThOkF9.js → useBasicWidgetState.Cedp0V76.js} +1 -1
  156. streamlit/static/static/js/useOnInputChange.CvRKHHKx.js +1 -0
  157. streamlit/static/static/js/{withFullScreenWrapper.UsvF_Jwr.js → withFullScreenWrapper.BbmjZAzW.js} +1 -1
  158. streamlit/string_util.py +6 -7
  159. streamlit/temporary_directory.py +12 -3
  160. streamlit/testing/v1/app_test.py +11 -6
  161. streamlit/testing/v1/element_tree.py +134 -158
  162. streamlit/testing/v1/local_script_runner.py +5 -5
  163. streamlit/testing/v1/util.py +11 -4
  164. streamlit/type_util.py +3 -4
  165. streamlit/user_info.py +3 -2
  166. streamlit/util.py +1 -1
  167. streamlit/watcher/event_based_path_watcher.py +1 -1
  168. streamlit/watcher/folder_black_list.py +1 -1
  169. streamlit/watcher/local_sources_watcher.py +5 -5
  170. streamlit/watcher/path_watcher.py +1 -1
  171. streamlit/web/bootstrap.py +2 -1
  172. streamlit/web/cli.py +12 -11
  173. streamlit/web/server/browser_websocket_handler.py +1 -1
  174. streamlit/web/server/component_request_handler.py +1 -1
  175. streamlit/web/server/media_file_handler.py +2 -1
  176. streamlit/web/server/oauth_authlib_routes.py +9 -2
  177. streamlit/web/server/oidc_mixin.py +13 -6
  178. streamlit/web/server/routes.py +3 -3
  179. streamlit/web/server/server.py +1 -1
  180. streamlit/web/server/server_util.py +7 -6
  181. streamlit/web/server/upload_file_request_handler.py +5 -5
  182. {streamlit_nightly-1.45.1.dev20250507.dist-info → streamlit_nightly-1.45.1.dev20250509.dist-info}/METADATA +1 -1
  183. {streamlit_nightly-1.45.1.dev20250507.dist-info → streamlit_nightly-1.45.1.dev20250509.dist-info}/RECORD +187 -184
  184. {streamlit_nightly-1.45.1.dev20250507.dist-info → streamlit_nightly-1.45.1.dev20250509.dist-info}/WHEEL +1 -1
  185. streamlit/static/static/js/UploadFileInfo.C-jY39rj.js +0 -1
  186. streamlit/static/static/js/index.BVjgrQ4R.js +0 -1
  187. streamlit/static/static/js/index.BXYstdPh.js +0 -2
  188. streamlit/static/static/js/index.BZ9mqzEJ.js +0 -1
  189. streamlit/static/static/js/index.BhTok8vt.js +0 -1
  190. streamlit/static/static/js/index.CJPcdxPe.js +0 -1
  191. streamlit/static/static/js/index.CMOA-8Q2.js +0 -1
  192. streamlit/static/static/js/index.DAxf3_iz.js +0 -1
  193. streamlit/static/static/js/index.Dn76KVNf.js +0 -1
  194. streamlit/static/static/js/index.OngWTN39.js +0 -1
  195. streamlit/static/static/js/index.PSwG8ayC.js +0 -1
  196. streamlit/static/static/js/index.UTlCdasa.js +0 -73
  197. streamlit/static/static/js/index.eR_vQpeg.js +0 -1
  198. streamlit/static/static/js/index.fLsU9uCJ.js +0 -1
  199. streamlit/static/static/js/index.kXOZCC_6.js +0 -1
  200. streamlit/static/static/js/useOnInputChange.BqEq0xFZ.js +0 -1
  201. {streamlit_nightly-1.45.1.dev20250507.data → streamlit_nightly-1.45.1.dev20250509.data}/scripts/streamlit.cmd +0 -0
  202. {streamlit_nightly-1.45.1.dev20250507.dist-info → streamlit_nightly-1.45.1.dev20250509.dist-info}/entry_points.txt +0 -0
  203. {streamlit_nightly-1.45.1.dev20250507.dist-info → streamlit_nightly-1.45.1.dev20250509.dist-info}/top_level.txt +0 -0
@@ -1,3 +1,3 @@
1
- import{bw as _,bN as ye,bx as $,r as u,z as $e,C as ne,j as R,bA as Re,bt as Oe,bb as _e,bu as Se,aC as oe,H as ie,c7 as ae,bs as Pe}from"./index.DZ6oX-v9.js";import{a as we}from"./useBasicWidgetState.CkThOkF9.js";import"./FormClearHelper.DiwQ0EtT.js";var se={vertical:"vertical",horizontal:"horizontal"};function le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function D(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?le(Object(n),!0).forEach(function(r){O(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):le(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var E=0,L=1,T=2;function z(e){return e.$isActive?T:e.$isHovered?L:E}function Me(e){var t=e.$theme.colors,n=e.$disabled,r=e.$checked,o=e.$isFocusVisible,i=e.$error;if(n)return t.tickFillDisabled;if(r)if(i)switch(z(e)){case E:return t.tickFillErrorSelected;case L:return t.tickFillErrorSelectedHover;case T:return t.tickFillErrorSelectedHoverActive}else switch(z(e)){case E:return t.tickFillSelected;case L:return t.tickFillSelectedHover;case T:return t.tickFillSelectedHoverActive}else return o?t.borderSelected:i?t.tickBorderError:t.tickBorder;return null}function ke(e){var t=e.$theme.colors;if(e.$disabled)return t.tickMarkFillDisabled;if(e.$checked)return t.tickMarkFill;if(e.$error)switch(z(e)){case E:return t.tickFillError;case L:return t.tickFillErrorHover;case T:return t.tickFillErrorHoverActive}else switch(z(e)){case E:return t.tickFill;case L:return t.tickFillHover;case T:return t.tickFillActive}}function Fe(e){var t=e.$labelPlacement,n=t===void 0?"":t,r=e.$theme,o;switch(n){case"top":o="Bottom";break;case"bottom":o="Top";break;case"left":o=r.direction==="rtl"?"Left":"Right";break;default:case"right":o=r.direction==="rtl"?"Right":"Left";break}var i=r.sizing,s=i.scale300;return O({},"padding".concat(o),s)}function Ie(e){var t=e.$disabled,n=e.$theme,r=n.colors;return t?r.contentSecondary:r.contentPrimary}var q=_("div",function(e){var t=e.$disabled,n=e.$align;return{display:"flex",flexWrap:"wrap",flexDirection:n==="horizontal"?"row":"column",alignItems:n==="horizontal"?"center":"flex-start",cursor:t?"not-allowed":"pointer","-webkit-tap-highlight-color":"transparent"}});q.displayName="RadioGroupRoot";q.displayName="RadioGroupRoot";var X=_("label",function(e){var t,n=e.$disabled,r=e.$hasDescription,o=e.$labelPlacement,i=e.$theme,s=e.$align,a=i.sizing,c=s==="horizontal",f=i.direction==="rtl"?"Left":"Right";return t={flexDirection:o==="top"||o==="bottom"?"column":"row",display:"flex",alignItems:"center",cursor:n?"not-allowed":"pointer",marginTop:a.scale200},O(t,"margin".concat(f),c?a.scale200:null),O(t,"marginBottom",r&&!c?null:a.scale200),t});X.displayName="Root";X.displayName="Root";var K=_("div",function(e){var t=e.$theme,n=t.animation,r=t.sizing;return{backgroundColor:ke(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",height:e.$checked?r.scale200:r.scale550,transitionDuration:n.timing200,transitionTimingFunction:n.easeOutCurve,width:e.$checked?r.scale200:r.scale550}});K.displayName="RadioMarkInner";K.displayName="RadioMarkInner";var J=_("div",function(e){var t=e.$theme,n=t.animation,r=t.sizing;return{alignItems:"center",backgroundColor:Me(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",boxShadow:e.$isFocusVisible&&e.$checked?"0 0 0 3px ".concat(e.$theme.colors.accent):"none",display:"flex",height:r.scale700,justifyContent:"center",marginTop:r.scale0,marginRight:r.scale0,marginBottom:r.scale0,marginLeft:r.scale0,outline:"none",verticalAlign:"middle",width:r.scale700,flexShrink:0,transitionDuration:n.timing200,transitionTimingFunction:n.easeOutCurve}});J.displayName="RadioMarkOuter";J.displayName="RadioMarkOuter";var Q=_("div",function(e){var t=e.$theme.typography;return D(D({verticalAlign:"middle"},Fe(e)),{},{color:Ie(e)},t.LabelMedium)});Q.displayName="Label";Q.displayName="Label";var Y=_("input",{width:0,height:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,clip:"rect(0 0 0 0)",position:"absolute"});Y.displayName="Input";Y.displayName="Input";var Z=_("div",function(e){var t,n=e.$theme,r=e.$align,o=r==="horizontal",i=n.direction==="rtl"?"Right":"Left",s=n.direction==="rtl"?"Left":"Right";return D(D({},n.typography.ParagraphSmall),{},(t={color:n.colors.contentSecondary,cursor:"auto"},O(t,"margin".concat(i),r==="horizontal"?null:n.sizing.scale900),O(t,"margin".concat(s),o?n.sizing.scale200:null),O(t,"maxWidth","240px"),t))});Z.displayName="Description";Z.displayName="Description";function N(e){"@babel/helpers - typeof";return N=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},N(e)}function V(){return V=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},V.apply(this,arguments)}function Ee(e,t){return Ae(e)||xe(e,t)||Te(e,t)||Le()}function Le(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{bs as _,bJ as ye,bt as $,r as u,z as $e,C as ne,j as R,bw as Re,bp as Oe,b5 as _e,bq as Se,aC as oe,H as ie,c3 as ae,bo as Pe}from"./index.By-NmdnB.js";import{a as we}from"./useBasicWidgetState.Cedp0V76.js";import"./FormClearHelper.CVNTT-bJ.js";var se={vertical:"vertical",horizontal:"horizontal"};function le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function D(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?le(Object(n),!0).forEach(function(r){O(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):le(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var E=0,L=1,T=2;function z(e){return e.$isActive?T:e.$isHovered?L:E}function Me(e){var t=e.$theme.colors,n=e.$disabled,r=e.$checked,o=e.$isFocusVisible,i=e.$error;if(n)return t.tickFillDisabled;if(r)if(i)switch(z(e)){case E:return t.tickFillErrorSelected;case L:return t.tickFillErrorSelectedHover;case T:return t.tickFillErrorSelectedHoverActive}else switch(z(e)){case E:return t.tickFillSelected;case L:return t.tickFillSelectedHover;case T:return t.tickFillSelectedHoverActive}else return o?t.borderSelected:i?t.tickBorderError:t.tickBorder;return null}function ke(e){var t=e.$theme.colors;if(e.$disabled)return t.tickMarkFillDisabled;if(e.$checked)return t.tickMarkFill;if(e.$error)switch(z(e)){case E:return t.tickFillError;case L:return t.tickFillErrorHover;case T:return t.tickFillErrorHoverActive}else switch(z(e)){case E:return t.tickFill;case L:return t.tickFillHover;case T:return t.tickFillActive}}function Fe(e){var t=e.$labelPlacement,n=t===void 0?"":t,r=e.$theme,o;switch(n){case"top":o="Bottom";break;case"bottom":o="Top";break;case"left":o=r.direction==="rtl"?"Left":"Right";break;default:case"right":o=r.direction==="rtl"?"Right":"Left";break}var i=r.sizing,s=i.scale300;return O({},"padding".concat(o),s)}function Ie(e){var t=e.$disabled,n=e.$theme,r=n.colors;return t?r.contentSecondary:r.contentPrimary}var q=_("div",function(e){var t=e.$disabled,n=e.$align;return{display:"flex",flexWrap:"wrap",flexDirection:n==="horizontal"?"row":"column",alignItems:n==="horizontal"?"center":"flex-start",cursor:t?"not-allowed":"pointer","-webkit-tap-highlight-color":"transparent"}});q.displayName="RadioGroupRoot";q.displayName="RadioGroupRoot";var X=_("label",function(e){var t,n=e.$disabled,r=e.$hasDescription,o=e.$labelPlacement,i=e.$theme,s=e.$align,a=i.sizing,c=s==="horizontal",f=i.direction==="rtl"?"Left":"Right";return t={flexDirection:o==="top"||o==="bottom"?"column":"row",display:"flex",alignItems:"center",cursor:n?"not-allowed":"pointer",marginTop:a.scale200},O(t,"margin".concat(f),c?a.scale200:null),O(t,"marginBottom",r&&!c?null:a.scale200),t});X.displayName="Root";X.displayName="Root";var J=_("div",function(e){var t=e.$theme,n=t.animation,r=t.sizing;return{backgroundColor:ke(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",height:e.$checked?r.scale200:r.scale550,transitionDuration:n.timing200,transitionTimingFunction:n.easeOutCurve,width:e.$checked?r.scale200:r.scale550}});J.displayName="RadioMarkInner";J.displayName="RadioMarkInner";var K=_("div",function(e){var t=e.$theme,n=t.animation,r=t.sizing;return{alignItems:"center",backgroundColor:Me(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",boxShadow:e.$isFocusVisible&&e.$checked?"0 0 0 3px ".concat(e.$theme.colors.accent):"none",display:"flex",height:r.scale700,justifyContent:"center",marginTop:r.scale0,marginRight:r.scale0,marginBottom:r.scale0,marginLeft:r.scale0,outline:"none",verticalAlign:"middle",width:r.scale700,flexShrink:0,transitionDuration:n.timing200,transitionTimingFunction:n.easeOutCurve}});K.displayName="RadioMarkOuter";K.displayName="RadioMarkOuter";var Q=_("div",function(e){var t=e.$theme.typography;return D(D({verticalAlign:"middle"},Fe(e)),{},{color:Ie(e)},t.LabelMedium)});Q.displayName="Label";Q.displayName="Label";var Y=_("input",{width:0,height:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,clip:"rect(0 0 0 0)",position:"absolute"});Y.displayName="Input";Y.displayName="Input";var Z=_("div",function(e){var t,n=e.$theme,r=e.$align,o=r==="horizontal",i=n.direction==="rtl"?"Right":"Left",s=n.direction==="rtl"?"Left":"Right";return D(D({},n.typography.ParagraphSmall),{},(t={color:n.colors.contentSecondary,cursor:"auto"},O(t,"margin".concat(i),r==="horizontal"?null:n.sizing.scale900),O(t,"margin".concat(s),o?n.sizing.scale200:null),O(t,"maxWidth","240px"),t))});Z.displayName="Description";Z.displayName="Description";function N(e){"@babel/helpers - typeof";return N=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},N(e)}function V(){return V=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},V.apply(this,arguments)}function Ee(e,t){return Ae(e)||xe(e,t)||Te(e,t)||Le()}function Le(){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 Te(e,t){if(e){if(typeof e=="string")return ue(e,t);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 ue(e,t)}}function ue(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function xe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(c){i=!0,a=c}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function Ae(e){if(Array.isArray(e))return e}function je(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function De(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ze(e,t,n){return t&&De(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Be(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&U(e,t)}function U(e,t){return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},U(e,t)}function Ce(e){var t=Ne();return function(){var r=B(e),o;if(t){var i=B(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return He(this,o)}}function He(e,t){if(t&&(N(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return A(e)}function A(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ne(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function B(e){return B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},B(e)}function j(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pe=function(e){Be(n,e);var t=Ce(n);function n(){var r;je(this,n);for(var o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];return r=t.call.apply(t,[this].concat(i)),j(A(r),"state",{isFocusVisible:!1,focusedRadioIndex:-1}),j(A(r),"handleFocus",function(a,c){ye(a)&&r.setState({isFocusVisible:!0}),r.setState({focusedRadioIndex:c}),r.props.onFocus&&r.props.onFocus(a)}),j(A(r),"handleBlur",function(a,c){r.state.isFocusVisible!==!1&&r.setState({isFocusVisible:!1}),r.setState({focusedRadioIndex:-1}),r.props.onBlur&&r.props.onBlur(a)}),r}return ze(n,[{key:"render",value:function(){var o=this,i=this.props.overrides,s=i===void 0?{}:i,a=$(s.RadioGroupRoot,q),c=Ee(a,2),f=c[0],b=c[1];return u.createElement(f,V({id:this.props.id,role:"radiogroup","aria-describedby":this.props["aria-describedby"],"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props.error||null,"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],$align:this.props.align,$disabled:this.props.disabled,$error:this.props.error,$required:this.props.required},b),u.Children.map(this.props.children,function(p,l){if(!u.isValidElement(p))return null;var d=o.props.value===p.props.value;return u.cloneElement(p,{align:o.props.align,autoFocus:o.props.autoFocus,checked:d,disabled:o.props.disabled||p.props.disabled,error:o.props.error,isFocused:o.state.focusedRadioIndex===l,isFocusVisible:o.state.isFocusVisible,tabIndex:l===0&&!o.props.value||d?"0":"-1",labelPlacement:o.props.labelPlacement,name:o.props.name,onBlur:function(g){return o.handleBlur(g,l)},onFocus:function(g){return o.handleFocus(g,l)},onChange:o.props.onChange,onMouseEnter:o.props.onMouseEnter,onMouseLeave:o.props.onMouseLeave})}))}}]),n}(u.Component);j(pe,"defaultProps",{name:"",value:"",disabled:!1,autoFocus:!1,labelPlacement:"right",align:"vertical",error:!1,required:!1,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onFocus:function(){},onBlur:function(){},overrides:{}});function G(e){"@babel/helpers - typeof";return G=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G(e)}function y(){return y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},y.apply(this,arguments)}function M(e,t){return We(e)||Ge(e,t)||Ue(e,t)||Ve()}function Ve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ue(e,t){if(e){if(typeof e=="string")return ce(e,t);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 ce(e,t)}}function ce(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ge(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(c){i=!0,a=c}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function We(e){if(Array.isArray(e))return e}function qe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ke(e,t,n){return t&&Xe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Je(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W(e,t)}function W(e,t){return W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},W(e,t)}function Qe(e){var t=Ze();return function(){var r=C(e),o;if(t){var i=C(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return Ye(this,o)}}function Ye(e,t){if(t&&(G(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return k(e)}function k(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ze(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function C(e){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},C(e)}function F(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function et(e){return e==="top"||e==="left"}function tt(e){return e==="bottom"||e==="right"}var rt=function(t){return t.stopPropagation()},fe=function(e){Je(n,e);var t=Qe(n);function n(){var r;qe(this,n);for(var o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];return r=t.call.apply(t,[this].concat(i)),F(k(r),"state",{isActive:!1,isHovered:!1}),F(k(r),"onMouseEnter",function(a){r.setState({isHovered:!0}),r.props.onMouseEnter&&r.props.onMouseEnter(a)}),F(k(r),"onMouseLeave",function(a){r.setState({isHovered:!1}),r.props.onMouseLeave&&r.props.onMouseLeave(a)}),F(k(r),"onMouseDown",function(a){r.setState({isActive:!0}),r.props.onMouseDown&&r.props.onMouseDown(a)}),F(k(r),"onMouseUp",function(a){r.setState({isActive:!1}),r.props.onMouseUp&&r.props.onMouseUp(a)}),r}return Ke(n,[{key:"componentDidMount",value:function(){var o;this.props.autoFocus&&(o=this.props.inputRef)!==null&&o!==void 0&&o.current&&this.props.inputRef.current.focus()}},{key:"render",value:function(){var o=this.props.overrides,i=o===void 0?{}:o,s=$(i.Root,X),a=M(s,2),c=a[0],f=a[1],b=$(i.Label,Q),p=M(b,2),l=p[0],d=p[1],S=$(i.Input,Y),g=M(S,2),P=g[0],H=g[1],x=$(i.Description,Z),I=M(x,2),v=I[0],h=I[1],m=$(i.RadioMarkInner,K),ee=M(m,2),de=ee[0],he=ee[1],be=$(i.RadioMarkOuter,J),te=M(be,2),ge=te[0],ve=te[1],w={$align:this.props.align,$checked:this.props.checked,$disabled:this.props.disabled,$hasDescription:!!this.props.description,$isActive:this.state.isActive,$error:this.props.error,$isFocused:this.props.isFocused,$isFocusVisible:this.props.isFocused&&this.props.isFocusVisible,$isHovered:this.state.isHovered,$labelPlacement:this.props.labelPlacement,$required:this.props.required,$value:this.props.value},re=u.createElement(l,y({},w,d),this.props.containsInteractiveElement?u.createElement("div",{onClick:function(me){return me.preventDefault()}},this.props.children):this.props.children);return u.createElement(u.Fragment,null,u.createElement(c,y({"data-baseweb":"radio",onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp},w,f),et(this.props.labelPlacement)&&re,u.createElement(ge,y({},w,ve),u.createElement(de,y({},w,he))),u.createElement(P,y({"aria-invalid":this.props.error||null,checked:this.props.checked,disabled:this.props.disabled,name:this.props.name,onBlur:this.props.onBlur,onFocus:this.props.onFocus,onClick:rt,onChange:this.props.onChange,ref:this.props.inputRef,required:this.props.required,tabIndex:this.props.tabIndex,type:"radio",value:this.props.value},w,H)),tt(this.props.labelPlacement)&&re),!!this.props.description&&u.createElement(v,y({},w,h),this.props.description))}}]),n}(u.Component);F(fe,"defaultProps",{overrides:{},containsInteractiveElement:!1,checked:!1,disabled:!1,autoFocus:!1,inputRef:u.createRef(),align:"vertical",error:!1,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onMouseDown:function(){},onMouseUp:function(){},onFocus:function(){},onBlur:function(){}});function nt(e){const t=parseFloat(e.sizes.checkbox),n=parseFloat(e.spacing.threeXS),r=ie(t.toString()),o=Math.round(r*.375);let i=Math.round(ie((t-n).toString()));return i>=r&&(i-=1),[ae(o,"px"),ae(i,"px")]}function ot({disabled:e,horizontal:t,value:n,onChange:r,options:o,captions:i,label:s,labelVisibility:a,help:c}){const[f,b]=u.useState(n??null);u.useEffect(()=>{n!==f&&b(n??null)},[n]);const p=u.useCallback(v=>{const h=parseInt(v.target.value,10);b(h),r(h)},[r]),l=$e(),d=i.length>0,S=o.length>0,g=S?o:["No options to select."],P=e||!S,H=v=>v==""&&t&&d?"&nbsp;":v,[x,I]=nt(l);return ne("div",{className:"stRadio","data-testid":"stRadio",children:[R(Se,{label:s,disabled:P,labelVisibility:a,children:c&&R(Re,{children:R(Oe,{content:c,placement:_e.TOP_RIGHT})})}),R(pe,{onChange:p,value:f!==null?f.toString():void 0,disabled:P,align:t?se.horizontal:se.vertical,"aria-label":s,"data-testid":"stRadioGroup",overrides:{RadioGroupRoot:{style:{gap:d?l.spacing.sm:l.spacing.none,minHeight:l.sizes.minElementHeight}}},children:g.map((v,h)=>ne(fe,{value:h.toString(),overrides:{Root:{style:({$isFocusVisible:m})=>({marginBottom:l.spacing.none,marginTop:l.spacing.none,marginRight:d?l.spacing.sm:l.spacing.lg,paddingLeft:l.spacing.none,alignItems:"start",paddingRight:l.spacing.threeXS,backgroundColor:m?l.colors.darkenedBgMix25:""})},RadioMarkOuter:{style:({$checked:m})=>({width:l.sizes.checkbox,height:l.sizes.checkbox,marginTop:"0.35rem",marginRight:l.spacing.none,marginLeft:l.spacing.none,backgroundColor:m&&!P?l.colors.primary:l.colors.fadedText40})},RadioMarkInner:{style:({$checked:m})=>({height:m?x:I,width:m?x:I})},Label:{style:{color:P?l.colors.fadedText40:l.colors.bodyText,position:"relative",top:l.spacing.px}}},children:[R(oe,{source:v,allowHTML:!1,isLabel:!0,largerLabel:!0}),d&&R(oe,{source:H(i[h]),allowHTML:!1,isCaption:!0,isLabel:!0})]},h))})]})}const it=u.memo(ot);function at({disabled:e,element:t,widgetMgr:n,fragmentId:r}){const[o,i]=we({getStateFromWidgetMgr:st,getDefaultStateFromProto:lt,getCurrStateFromProto:ut,updateWidgetMgrState:ct,element:t,widgetMgr:n,fragmentId:r}),s=u.useCallback(d=>{i({value:d,fromUi:!0})},[i]),{horizontal:a,options:c,captions:f,label:b,labelVisibility:p,help:l}=t;return R(it,{label:b,onChange:s,options:c,captions:f,disabled:e,horizontal:a,labelVisibility:Pe(p==null?void 0:p.value),value:o??null,help:l})}function st(e,t){return e.getIntValue(t)}function lt(e){return e.default??null}function ut(e){return e.value??null}function ct(e,t,n,r){t.setIntValue(e,n.value??null,{fromUi:n.fromUi},r)}const bt=u.memo(at);export{bt as default};
3
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ue(e,t){if(e){if(typeof e=="string")return ce(e,t);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 ce(e,t)}}function ce(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ge(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(c){i=!0,a=c}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function We(e){if(Array.isArray(e))return e}function qe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Je(e,t,n){return t&&Xe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ke(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W(e,t)}function W(e,t){return W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},W(e,t)}function Qe(e){var t=Ze();return function(){var r=C(e),o;if(t){var i=C(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return Ye(this,o)}}function Ye(e,t){if(t&&(G(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return k(e)}function k(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ze(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function C(e){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},C(e)}function F(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function et(e){return e==="top"||e==="left"}function tt(e){return e==="bottom"||e==="right"}var rt=function(t){return t.stopPropagation()},fe=function(e){Ke(n,e);var t=Qe(n);function n(){var r;qe(this,n);for(var o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];return r=t.call.apply(t,[this].concat(i)),F(k(r),"state",{isActive:!1,isHovered:!1}),F(k(r),"onMouseEnter",function(a){r.setState({isHovered:!0}),r.props.onMouseEnter&&r.props.onMouseEnter(a)}),F(k(r),"onMouseLeave",function(a){r.setState({isHovered:!1}),r.props.onMouseLeave&&r.props.onMouseLeave(a)}),F(k(r),"onMouseDown",function(a){r.setState({isActive:!0}),r.props.onMouseDown&&r.props.onMouseDown(a)}),F(k(r),"onMouseUp",function(a){r.setState({isActive:!1}),r.props.onMouseUp&&r.props.onMouseUp(a)}),r}return Je(n,[{key:"componentDidMount",value:function(){var o;this.props.autoFocus&&(o=this.props.inputRef)!==null&&o!==void 0&&o.current&&this.props.inputRef.current.focus()}},{key:"render",value:function(){var o=this.props.overrides,i=o===void 0?{}:o,s=$(i.Root,X),a=M(s,2),c=a[0],f=a[1],b=$(i.Label,Q),p=M(b,2),l=p[0],d=p[1],S=$(i.Input,Y),g=M(S,2),P=g[0],H=g[1],x=$(i.Description,Z),I=M(x,2),v=I[0],h=I[1],m=$(i.RadioMarkInner,J),ee=M(m,2),de=ee[0],he=ee[1],be=$(i.RadioMarkOuter,K),te=M(be,2),ge=te[0],ve=te[1],w={$align:this.props.align,$checked:this.props.checked,$disabled:this.props.disabled,$hasDescription:!!this.props.description,$isActive:this.state.isActive,$error:this.props.error,$isFocused:this.props.isFocused,$isFocusVisible:this.props.isFocused&&this.props.isFocusVisible,$isHovered:this.state.isHovered,$labelPlacement:this.props.labelPlacement,$required:this.props.required,$value:this.props.value},re=u.createElement(l,y({},w,d),this.props.containsInteractiveElement?u.createElement("div",{onClick:function(me){return me.preventDefault()}},this.props.children):this.props.children);return u.createElement(u.Fragment,null,u.createElement(c,y({"data-baseweb":"radio",onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp},w,f),et(this.props.labelPlacement)&&re,u.createElement(ge,y({},w,ve),u.createElement(de,y({},w,he))),u.createElement(P,y({"aria-invalid":this.props.error||null,checked:this.props.checked,disabled:this.props.disabled,name:this.props.name,onBlur:this.props.onBlur,onFocus:this.props.onFocus,onClick:rt,onChange:this.props.onChange,ref:this.props.inputRef,required:this.props.required,tabIndex:this.props.tabIndex,type:"radio",value:this.props.value},w,H)),tt(this.props.labelPlacement)&&re),!!this.props.description&&u.createElement(v,y({},w,h),this.props.description))}}]),n}(u.Component);F(fe,"defaultProps",{overrides:{},containsInteractiveElement:!1,checked:!1,disabled:!1,autoFocus:!1,inputRef:u.createRef(),align:"vertical",error:!1,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onMouseDown:function(){},onMouseUp:function(){},onFocus:function(){},onBlur:function(){}});function nt(e){const t=parseFloat(e.sizes.checkbox),n=parseFloat(e.spacing.threeXS),r=ie(t.toString()),o=Math.round(r*.375);let i=Math.round(ie((t-n).toString()));return i>=r&&(i-=1),[ae(o,"px"),ae(i,"px")]}function ot({disabled:e,horizontal:t,value:n,onChange:r,options:o,captions:i,label:s,labelVisibility:a,help:c}){const[f,b]=u.useState(n??null);u.useEffect(()=>{n!==f&&b(n??null)},[n]);const p=u.useCallback(v=>{const h=parseInt(v.target.value,10);b(h),r(h)},[r]),l=$e(),d=i.length>0,S=o.length>0,g=S?o:["No options to select."],P=e||!S,H=v=>v==""&&t&&d?"&nbsp;":v,[x,I]=nt(l);return ne("div",{className:"stRadio","data-testid":"stRadio",children:[R(Se,{label:s,disabled:P,labelVisibility:a,children:c&&R(Re,{children:R(Oe,{content:c,placement:_e.TOP_RIGHT})})}),R(pe,{onChange:p,value:f!==null?f.toString():void 0,disabled:P,align:t?se.horizontal:se.vertical,"aria-label":s,"data-testid":"stRadioGroup",overrides:{RadioGroupRoot:{style:{gap:d?l.spacing.sm:l.spacing.none,minHeight:l.sizes.minElementHeight}}},children:g.map((v,h)=>ne(fe,{value:h.toString(),overrides:{Root:{style:({$isFocusVisible:m})=>({marginBottom:l.spacing.none,marginTop:l.spacing.none,marginRight:d?l.spacing.sm:l.spacing.lg,paddingLeft:l.spacing.none,alignItems:"start",paddingRight:l.spacing.threeXS,backgroundColor:m?l.colors.darkenedBgMix25:""})},RadioMarkOuter:{style:({$checked:m})=>({width:l.sizes.checkbox,height:l.sizes.checkbox,marginTop:"0.35rem",marginRight:l.spacing.none,marginLeft:l.spacing.none,backgroundColor:m&&!P?l.colors.primary:l.colors.fadedText40})},RadioMarkInner:{style:({$checked:m})=>({height:m?x:I,width:m?x:I})},Label:{style:{color:P?l.colors.fadedText40:l.colors.bodyText,position:"relative",top:l.spacing.px}}},children:[R(oe,{source:v,allowHTML:!1,isLabel:!0,largerLabel:!0}),d&&R(oe,{source:H(i[h]),allowHTML:!1,isCaption:!0,isLabel:!0})]},h))})]})}const it=u.memo(ot);function at({disabled:e,element:t,widgetMgr:n,fragmentId:r}){const[o,i]=we({getStateFromWidgetMgr:st,getDefaultStateFromProto:lt,getCurrStateFromProto:ut,updateWidgetMgrState:ct,element:t,widgetMgr:n,fragmentId:r}),s=u.useCallback(d=>{i({value:d,fromUi:!0})},[i]),{horizontal:a,options:c,captions:f,label:b,labelVisibility:p,help:l}=t;return R(it,{label:b,onChange:s,options:c,captions:f,disabled:e,horizontal:a,labelVisibility:Pe(p==null?void 0:p.value),value:o??null,help:l})}function st(e,t){return e.getIntValue(t)}function lt(e){return e.default??null}function ut(e){return e.value??null}function ct(e,t,n,r){t.setIntValue(e,n.value??null,{fromUi:n.fromUi},r)}const bt=u.memo(at);export{bt as default};
@@ -1 +1 @@
1
- import{n as l,k as s,r,j as n}from"./index.DZ6oX-v9.js";import{P as i,R as m}from"./RenderInPortalIfExists.uGJp_Q0v.js";const c=""+new URL("../media/balloon-0.Czj7AKwE.png",import.meta.url).href,p=""+new URL("../media/balloon-1.CNvFFrND.png",import.meta.url).href,f=""+new URL("../media/balloon-2.DTvC6B1t.png",import.meta.url).href,d=""+new URL("../media/balloon-3.CgSk4tbL.png",import.meta.url).href,B=""+new URL("../media/balloon-4.mbtFrzxf.png",import.meta.url).href,L=""+new URL("../media/balloon-5.CSwkUfRA.png",import.meta.url).href,a=300,h=121,t=20,g=80,u=1e3,x=s("from{transform:translateY(calc(100vh + ",a,"px));}to{transform:translateY(0);}"),_=l("img",{target:"eosrfo90"})(({theme:o})=>({position:"fixed",top:"-300px",marginLeft:`${-121/2}px`,zIndex:o.zIndices.balloons,left:`${Math.random()*(g-t)+t}vw`,animationDelay:`${Math.random()*u}ms`,height:`${a}px`,width:`${h}px`,pointerEvents:"none",animationDuration:"750ms",animationName:x,animationTimingFunction:"ease-in",animationDirection:"normal",animationIterationCount:1,opacity:1})),w=30,e=[c,p,f,d,B,L],A=e.length,I=({particleType:o})=>n(_,{src:e[o]}),M=({scriptRunId:o})=>n(m,{children:n(i,{className:"stBalloons","data-testid":"stBalloons",scriptRunId:o,numParticleTypes:A,numParticles:w,ParticleComponent:I})}),S=r.memo(M);export{w as NUM_BALLOONS,S as default};
1
+ import{n as l,k as s,r,j as n}from"./index.By-NmdnB.js";import{P as i,R as m}from"./RenderInPortalIfExists.CQLIsNPE.js";const c=""+new URL("../media/balloon-0.Czj7AKwE.png",import.meta.url).href,p=""+new URL("../media/balloon-1.CNvFFrND.png",import.meta.url).href,f=""+new URL("../media/balloon-2.DTvC6B1t.png",import.meta.url).href,d=""+new URL("../media/balloon-3.CgSk4tbL.png",import.meta.url).href,B=""+new URL("../media/balloon-4.mbtFrzxf.png",import.meta.url).href,L=""+new URL("../media/balloon-5.CSwkUfRA.png",import.meta.url).href,a=300,h=121,t=20,g=80,u=1e3,x=s("from{transform:translateY(calc(100vh + ",a,"px));}to{transform:translateY(0);}"),_=l("img",{target:"eosrfo90"})(({theme:o})=>({position:"fixed",top:"-300px",marginLeft:`${-121/2}px`,zIndex:o.zIndices.balloons,left:`${Math.random()*(g-t)+t}vw`,animationDelay:`${Math.random()*u}ms`,height:`${a}px`,width:`${h}px`,pointerEvents:"none",animationDuration:"750ms",animationName:x,animationTimingFunction:"ease-in",animationDirection:"normal",animationIterationCount:1,opacity:1})),w=30,e=[c,p,f,d,B,L],A=e.length,I=({particleType:o})=>n(_,{src:e[o]}),M=({scriptRunId:o})=>n(m,{children:n(i,{className:"stBalloons","data-testid":"stBalloons",scriptRunId:o,numParticleTypes:A,numParticles:w,ParticleComponent:I})}),S=r.memo(M);export{w as NUM_BALLOONS,S as default};
@@ -1 +1 @@
1
- import{n as p,r as s,z as T,C as x,j as i,D as w,aC as h,aQ as r,aR as v,aS as m,F as k,B as z}from"./index.DZ6oX-v9.js";const R=p("button",{target:"e1rpgzpk0"})(({theme:o})=>({fontSize:o.fontSizes.sm,lineHeight:o.lineHeights.base,color:o.colors.fadedText60,backgroundColor:o.colors.transparent,fontFamily:"inherit",margin:o.spacing.none,border:"none",boxShadow:"none",padding:o.spacing.none,"&:hover, &:active, &:focus":{border:"none",outline:"none",boxShadow:"none"},"&:hover":{color:o.colors.primary}})),C=p("div",{target:"e1rpgzpk1"})(({theme:o})=>({display:"flex",flexDirection:"row",gap:o.spacing.lg,"> span":{marginTop:o.spacing.twoXS}})),L=p("div",{target:"e1rpgzpk3"})(({theme:o})=>({display:"flex",flexDirection:"column",gap:o.spacing.sm,alignItems:"start",justifyContent:"center",overflow:"hidden",minHeight:"100%",fontSize:o.fontSizes.sm,lineHeight:o.lineHeights.base,div:{display:"inline-flex"}}));function B(o){const a=z(o);return{Body:{props:{"data-testid":"stToast",className:"stToast"},style:{display:"flex",flexDirection:"row",gap:o.spacing.md,width:o.sizes.toastWidth,marginTop:o.spacing.sm,borderTopLeftRadius:o.radii.default,borderTopRightRadius:o.radii.default,borderBottomLeftRadius:o.radii.default,borderBottomRightRadius:o.radii.default,paddingTop:o.spacing.lg,paddingBottom:o.spacing.lg,paddingLeft:o.spacing.twoXL,paddingRight:o.spacing.twoXL,backgroundColor:a?o.colors.gray10:o.colors.gray90,color:o.colors.bodyText,boxShadow:a?"0px 4px 16px rgba(0, 0, 0, 0.16)":"0px 4px 16px rgba(0, 0, 0, 0.7)"}},CloseIcon:{style:{color:o.colors.fadedText40,width:o.fontSizes.lg,height:o.fontSizes.lg,marginRight:`calc(-1 * ${o.spacing.lg} / 2)`,":hover":{color:o.colors.bodyText}}}}}function E(o){if(o.length>104){let t=o.replace(/^(.{104}[^\s]*).*/,"$1");return t.length>104&&(t=t.substring(0,104).split(" ").slice(0,-1).join(" ")),t.trim()}return o}function D({body:o,icon:a}){const t=T(),n=E(o),d=o!==n,[e,y]=s.useState(!d),[u,b]=s.useState(0),f=s.useCallback(()=>{y(!e)},[e]),c=s.useMemo(()=>B(t),[t]),l=s.useMemo(()=>x(C,{expanded:e,children:[a&&i(w,{iconValue:a,size:"xl",testid:"stToastDynamicIcon"}),x(L,{children:[i(h,{source:e?o:n,allowHTML:!1,isToast:!0}),d&&i(R,{"data-testid":"stToastViewButton",onClick:f,children:e?"view less":"view more"})]})]}),[d,e,o,a,n,f]);s.useEffect(()=>{if(t.inSidebar)return;const g=r.info(l,{overrides:{...c}});return b(g),()=>{r.update(g,{overrides:{Body:{style:{display:"none"}}}}),r.clear(g)}},[]),s.useEffect(()=>{r.update(u,{children:l,overrides:{...c}})},[u,l,c]);const S=i(m,{kind:v.ERROR,body:"Streamlit API Error: `st.toast` cannot be called directly on the sidebar with `st.sidebar.toast`. See our `st.toast` API [docs](https://docs.streamlit.io/develop/api-reference/status/st.toast) for more information."});return i(k,{children:t.inSidebar&&S})}const I=s.memo(D);export{I as default};
1
+ import{n as p,r as s,z as T,C as x,j as i,D as w,aC as h,aQ as r,aR as v,aS as m,F as k,B as z}from"./index.By-NmdnB.js";const R=p("button",{target:"e1rpgzpk0"})(({theme:o})=>({fontSize:o.fontSizes.sm,lineHeight:o.lineHeights.base,color:o.colors.fadedText60,backgroundColor:o.colors.transparent,fontFamily:"inherit",margin:o.spacing.none,border:"none",boxShadow:"none",padding:o.spacing.none,"&:hover, &:active, &:focus":{border:"none",outline:"none",boxShadow:"none"},"&:hover":{color:o.colors.primary}})),C=p("div",{target:"e1rpgzpk1"})(({theme:o})=>({display:"flex",flexDirection:"row",gap:o.spacing.lg,"> span":{marginTop:o.spacing.twoXS}})),L=p("div",{target:"e1rpgzpk3"})(({theme:o})=>({display:"flex",flexDirection:"column",gap:o.spacing.sm,alignItems:"start",justifyContent:"center",overflow:"hidden",minHeight:"100%",fontSize:o.fontSizes.sm,lineHeight:o.lineHeights.base,div:{display:"inline-flex"}}));function B(o){const a=z(o);return{Body:{props:{"data-testid":"stToast",className:"stToast"},style:{display:"flex",flexDirection:"row",gap:o.spacing.md,width:o.sizes.toastWidth,marginTop:o.spacing.sm,borderTopLeftRadius:o.radii.default,borderTopRightRadius:o.radii.default,borderBottomLeftRadius:o.radii.default,borderBottomRightRadius:o.radii.default,paddingTop:o.spacing.lg,paddingBottom:o.spacing.lg,paddingLeft:o.spacing.twoXL,paddingRight:o.spacing.twoXL,backgroundColor:a?o.colors.gray10:o.colors.gray90,color:o.colors.bodyText,boxShadow:a?"0px 4px 16px rgba(0, 0, 0, 0.16)":"0px 4px 16px rgba(0, 0, 0, 0.7)"}},CloseIcon:{style:{color:o.colors.fadedText40,width:o.fontSizes.lg,height:o.fontSizes.lg,marginRight:`calc(-1 * ${o.spacing.lg} / 2)`,":hover":{color:o.colors.bodyText}}}}}function E(o){if(o.length>104){let t=o.replace(/^(.{104}[^\s]*).*/,"$1");return t.length>104&&(t=t.substring(0,104).split(" ").slice(0,-1).join(" ")),t.trim()}return o}function D({body:o,icon:a}){const t=T(),n=E(o),d=o!==n,[e,y]=s.useState(!d),[u,b]=s.useState(0),f=s.useCallback(()=>{y(!e)},[e]),c=s.useMemo(()=>B(t),[t]),l=s.useMemo(()=>x(C,{expanded:e,children:[a&&i(w,{iconValue:a,size:"xl",testid:"stToastDynamicIcon"}),x(L,{children:[i(h,{source:e?o:n,allowHTML:!1,isToast:!0}),d&&i(R,{"data-testid":"stToastViewButton",onClick:f,children:e?"view less":"view more"})]})]}),[d,e,o,a,n,f]);s.useEffect(()=>{if(t.inSidebar)return;const g=r.info(l,{overrides:{...c}});return b(g),()=>{r.update(g,{overrides:{Body:{style:{display:"none"}}}}),r.clear(g)}},[]),s.useEffect(()=>{r.update(u,{children:l,overrides:{...c}})},[u,l,c]);const S=i(m,{kind:v.ERROR,body:"Streamlit API Error: `st.toast` cannot be called directly on the sidebar with `st.sidebar.toast`. See our `st.toast` API [docs](https://docs.streamlit.io/develop/api-reference/status/st.toast) for more information."});return i(k,{children:t.inSidebar&&S})}const I=s.memo(D);export{I as default};