streamlit-nightly 1.37.2.dev20240814__py2.py3-none-any.whl → 1.37.2.dev20240816__py2.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 (85) hide show
  1. streamlit/commands/execution_control.py +1 -4
  2. streamlit/commands/experimental_query_params.py +1 -1
  3. streamlit/commands/logo.py +1 -1
  4. streamlit/commands/navigation.py +1 -1
  5. streamlit/commands/page_config.py +1 -1
  6. streamlit/components/v1/component_arrow.py +2 -2
  7. streamlit/components/v1/component_registry.py +1 -1
  8. streamlit/components/v1/custom_component.py +1 -1
  9. streamlit/cursor.py +1 -1
  10. streamlit/dataframe_util.py +184 -25
  11. streamlit/elements/arrow.py +1 -1
  12. streamlit/elements/json.py +13 -7
  13. streamlit/elements/lib/dialog.py +1 -1
  14. streamlit/elements/lib/mutable_status_container.py +1 -1
  15. streamlit/elements/lib/policies.py +1 -1
  16. streamlit/elements/media.py +3 -5
  17. streamlit/elements/plotly_chart.py +1 -1
  18. streamlit/elements/vega_charts.py +1 -1
  19. streamlit/elements/widgets/button.py +7 -4
  20. streamlit/elements/widgets/button_group.py +28 -9
  21. streamlit/elements/widgets/chat.py +1 -1
  22. streamlit/elements/widgets/data_editor.py +1 -1
  23. streamlit/elements/write.py +18 -3
  24. streamlit/error_util.py +10 -8
  25. streamlit/navigation/page.py +1 -1
  26. streamlit/platform.py +1 -1
  27. streamlit/runtime/caching/cache_data_api.py +1 -1
  28. streamlit/runtime/caching/cache_resource_api.py +1 -1
  29. streamlit/runtime/caching/cached_message_replay.py +1 -1
  30. streamlit/runtime/context.py +6 -5
  31. streamlit/runtime/forward_msg_queue.py +18 -1
  32. streamlit/runtime/fragment.py +7 -5
  33. streamlit/runtime/media_file_manager.py +3 -1
  34. streamlit/runtime/metrics_util.py +2 -7
  35. streamlit/runtime/scriptrunner/__init__.py +7 -4
  36. streamlit/runtime/scriptrunner/exec_code.py +6 -3
  37. streamlit/runtime/scriptrunner/script_runner.py +10 -9
  38. streamlit/runtime/scriptrunner_utils/__init__.py +19 -0
  39. streamlit/runtime/{scriptrunner → scriptrunner_utils}/exceptions.py +1 -1
  40. streamlit/runtime/{scriptrunner → scriptrunner_utils}/script_requests.py +61 -6
  41. streamlit/runtime/{scriptrunner → scriptrunner_utils}/script_run_context.py +1 -1
  42. streamlit/runtime/state/__init__.py +0 -2
  43. streamlit/runtime/state/common.py +1 -1
  44. streamlit/runtime/state/query_params.py +1 -6
  45. streamlit/runtime/state/session_state.py +1 -5
  46. streamlit/runtime/state/session_state_proxy.py +3 -1
  47. streamlit/runtime/state/widgets.py +0 -59
  48. streamlit/static/asset-manifest.json +17 -17
  49. streamlit/static/index.html +1 -1
  50. streamlit/static/static/js/{1168.2a7e18da.chunk.js → 1168.2a9806f0.chunk.js} +1 -1
  51. streamlit/static/static/js/{1451.3d44ca81.chunk.js → 1451.d93e956f.chunk.js} +1 -1
  52. streamlit/static/static/js/{178.7bea8c5d.chunk.js → 178.ddebe26b.chunk.js} +1 -1
  53. streamlit/static/static/js/2469.6217c5c3.chunk.js +1 -0
  54. streamlit/static/static/js/{2634.1249dc7a.chunk.js → 2634.4e2535ee.chunk.js} +1 -1
  55. streamlit/static/static/js/{2736.dcbc9141.chunk.js → 2736.3d50ec7f.chunk.js} +1 -1
  56. streamlit/static/static/js/{3301.45709e64.chunk.js → 3301.7379a9fd.chunk.js} +5 -5
  57. streamlit/static/static/js/4113.786b0142.chunk.js +1 -0
  58. streamlit/static/static/js/4500.d884c792.chunk.js +1 -0
  59. streamlit/static/static/js/6853.a1c4fa00.chunk.js +1 -0
  60. streamlit/static/static/js/{7602.2331daf7.chunk.js → 7602.33571c14.chunk.js} +1 -1
  61. streamlit/static/static/js/7805.ba32ae70.chunk.js +1 -0
  62. streamlit/static/static/js/8148.b905db99.chunk.js +1 -0
  63. streamlit/static/static/js/8427.b1a68937.chunk.js +1 -0
  64. streamlit/static/static/js/{9330.2b4c99e0.chunk.js → 9330.32e8a53a.chunk.js} +1 -1
  65. streamlit/static/static/js/main.90c4efd0.js +28 -0
  66. streamlit/testing/v1/local_script_runner.py +1 -1
  67. streamlit/type_util.py +17 -47
  68. streamlit/user_info.py +4 -2
  69. streamlit/web/server/stats_request_handler.py +1 -3
  70. streamlit/web/server/websocket_headers.py +1 -1
  71. {streamlit_nightly-1.37.2.dev20240814.dist-info → streamlit_nightly-1.37.2.dev20240816.dist-info}/METADATA +1 -1
  72. {streamlit_nightly-1.37.2.dev20240814.dist-info → streamlit_nightly-1.37.2.dev20240816.dist-info}/RECORD +77 -76
  73. streamlit/static/static/js/2469.4bb197dd.chunk.js +0 -1
  74. streamlit/static/static/js/4113.ca4d2d7b.chunk.js +0 -1
  75. streamlit/static/static/js/4500.c007e274.chunk.js +0 -1
  76. streamlit/static/static/js/6853.5d19f25b.chunk.js +0 -1
  77. streamlit/static/static/js/7805.f7c8d475.chunk.js +0 -1
  78. streamlit/static/static/js/8148.7805e73f.chunk.js +0 -1
  79. streamlit/static/static/js/8427.69ce2c45.chunk.js +0 -1
  80. streamlit/static/static/js/main.b519dd78.js +0 -28
  81. /streamlit/static/static/js/{main.b519dd78.js.LICENSE.txt → main.90c4efd0.js.LICENSE.txt} +0 -0
  82. {streamlit_nightly-1.37.2.dev20240814.data → streamlit_nightly-1.37.2.dev20240816.data}/scripts/streamlit.cmd +0 -0
  83. {streamlit_nightly-1.37.2.dev20240814.dist-info → streamlit_nightly-1.37.2.dev20240816.dist-info}/WHEEL +0 -0
  84. {streamlit_nightly-1.37.2.dev20240814.dist-info → streamlit_nightly-1.37.2.dev20240816.dist-info}/entry_points.txt +0 -0
  85. {streamlit_nightly-1.37.2.dev20240814.dist-info → streamlit_nightly-1.37.2.dev20240816.dist-info}/top_level.txt +0 -0
@@ -21,6 +21,7 @@ from urllib import parse
21
21
  from streamlit.constants import EMBED_QUERY_PARAMS_KEYS
22
22
  from streamlit.errors import StreamlitAPIException
23
23
  from streamlit.proto.ForwardMsg_pb2 import ForwardMsg
24
+ from streamlit.runtime.scriptrunner_utils.script_run_context import get_script_run_ctx
24
25
 
25
26
  if TYPE_CHECKING:
26
27
  from _typeshed import SupportsKeysAndGetItem
@@ -134,9 +135,6 @@ class QueryParams(MutableMapping[str, str]):
134
135
  return str(self._query_params)
135
136
 
136
137
  def _send_query_param_msg(self) -> None:
137
- # Avoid circular imports
138
- from streamlit.runtime.scriptrunner import get_script_run_ctx
139
-
140
138
  ctx = get_script_run_ctx()
141
139
  if ctx is None:
142
140
  return
@@ -189,9 +187,6 @@ class QueryParams(MutableMapping[str, str]):
189
187
  }
190
188
 
191
189
  def _ensure_single_query_api_used(self):
192
- # Avoid circular imports
193
- from streamlit.runtime.scriptrunner import get_script_run_ctx
194
-
195
190
  ctx = get_script_run_ctx()
196
191
  if ctx is None:
197
192
  return
@@ -37,6 +37,7 @@ from streamlit import config, util
37
37
  from streamlit.errors import StreamlitAPIException, UnserializableSessionStateError
38
38
  from streamlit.proto.WidgetStates_pb2 import WidgetState as WidgetStateProto
39
39
  from streamlit.proto.WidgetStates_pb2 import WidgetStates as WidgetStatesProto
40
+ from streamlit.runtime.scriptrunner_utils.script_run_context import get_script_run_ctx
40
41
  from streamlit.runtime.state.common import (
41
42
  RegisterWidgetResult,
42
43
  T,
@@ -459,8 +460,6 @@ class SessionState:
459
460
  If the key corresponds to a widget or form that's been instantiated
460
461
  during the current script run, raise a StreamlitAPIException instead.
461
462
  """
462
- from streamlit.runtime.scriptrunner import get_script_run_ctx
463
-
464
463
  ctx = get_script_run_ctx()
465
464
 
466
465
  if ctx is not None:
@@ -572,9 +571,6 @@ class SessionState:
572
571
 
573
572
  def _remove_stale_widgets(self, active_widget_ids: set[str]) -> None:
574
573
  """Remove widget state for widgets whose ids aren't in `active_widget_ids`."""
575
- # Avoid circular imports.
576
- from streamlit.runtime.scriptrunner import get_script_run_ctx
577
-
578
574
  ctx = get_script_run_ctx()
579
575
  if ctx is None:
580
576
  return
@@ -40,7 +40,9 @@ def get_session_state() -> SafeSessionState:
40
40
  st.session_state.
41
41
  """
42
42
  global _state_use_warning_already_displayed
43
- from streamlit.runtime.scriptrunner import get_script_run_ctx
43
+ from streamlit.runtime.scriptrunner_utils.script_run_context import (
44
+ get_script_run_ctx,
45
+ )
44
46
 
45
47
  ctx = get_script_run_ctx()
46
48
 
@@ -21,8 +21,6 @@ from typing import TYPE_CHECKING, Final, Mapping
21
21
  from typing_extensions import TypeAlias
22
22
 
23
23
  from streamlit.errors import DuplicateWidgetID
24
- from streamlit.proto.Common_pb2 import StringTriggerValue as StringTriggerValueProto
25
- from streamlit.proto.WidgetStates_pb2 import WidgetState, WidgetStates
26
24
  from streamlit.runtime.state.common import (
27
25
  RegisterWidgetResult,
28
26
  T,
@@ -222,63 +220,6 @@ def register_widget_from_metadata(
222
220
  return ctx.session_state.register_widget(metadata, user_key)
223
221
 
224
222
 
225
- def coalesce_widget_states(
226
- old_states: WidgetStates | None, new_states: WidgetStates | None
227
- ) -> WidgetStates | None:
228
- """Coalesce an older WidgetStates into a newer one, and return a new
229
- WidgetStates containing the result.
230
-
231
- For most widget values, we just take the latest version.
232
-
233
- However, any trigger_values (which are set by buttons) that are True in
234
- `old_states` will be set to True in the coalesced result, so that button
235
- presses don't go missing.
236
- """
237
- if not old_states and not new_states:
238
- return None
239
- elif not old_states:
240
- return new_states
241
- elif not new_states:
242
- return old_states
243
-
244
- states_by_id: dict[str, WidgetState] = {
245
- wstate.id: wstate for wstate in new_states.widgets
246
- }
247
-
248
- trigger_value_types = [
249
- ("trigger_value", False),
250
- ("string_trigger_value", StringTriggerValueProto(data=None)),
251
- ]
252
- for old_state in old_states.widgets:
253
- for trigger_value_type, unset_value in trigger_value_types:
254
- if (
255
- old_state.WhichOneof("value") == trigger_value_type
256
- and getattr(old_state, trigger_value_type) != unset_value
257
- ):
258
- new_trigger_val = states_by_id.get(old_state.id)
259
- # It should nearly always be the case that new_trigger_val is None
260
- # here as trigger values are deleted from the client's WidgetStateManager
261
- # as soon as a rerun_script BackMsg is sent to the server. Since it's
262
- # impossible to test that the client sends us state in the expected
263
- # format in a unit test, we test for this behavior in
264
- # e2e_playwright/test_fragment_queue_test.py
265
- if not new_trigger_val or (
266
- # Ensure the corresponding new_state is also a trigger;
267
- # otherwise, a widget that was previously a button/chat_input but no
268
- # longer is could get a bad value.
269
- new_trigger_val.WhichOneof("value") == trigger_value_type
270
- # We only want to take the value of old_state if new_trigger_val is
271
- # unset as the old value may be stale if a newer one was entered.
272
- and getattr(new_trigger_val, trigger_value_type) == unset_value
273
- ):
274
- states_by_id[old_state.id] = old_state
275
-
276
- coalesced = WidgetStates()
277
- coalesced.widgets.extend(states_by_id.values())
278
-
279
- return coalesced
280
-
281
-
282
223
  def _build_duplicate_widget_message(
283
224
  widget_func_name: str, user_key: str | None = None
284
225
  ) -> str:
@@ -1,37 +1,37 @@
1
1
  {
2
2
  "files": {
3
3
  "main.css": "./static/css/main.5513bd04.css",
4
- "main.js": "./static/js/main.b519dd78.js",
4
+ "main.js": "./static/js/main.90c4efd0.js",
5
5
  "static/js/9336.3e046ad7.chunk.js": "./static/js/9336.3e046ad7.chunk.js",
6
- "static/js/9330.2b4c99e0.chunk.js": "./static/js/9330.2b4c99e0.chunk.js",
7
- "static/js/2736.dcbc9141.chunk.js": "./static/js/2736.dcbc9141.chunk.js",
8
- "static/js/3301.45709e64.chunk.js": "./static/js/3301.45709e64.chunk.js",
6
+ "static/js/9330.32e8a53a.chunk.js": "./static/js/9330.32e8a53a.chunk.js",
7
+ "static/js/2736.3d50ec7f.chunk.js": "./static/js/2736.3d50ec7f.chunk.js",
8
+ "static/js/3301.7379a9fd.chunk.js": "./static/js/3301.7379a9fd.chunk.js",
9
9
  "static/css/8148.93909c7e.chunk.css": "./static/css/8148.93909c7e.chunk.css",
10
- "static/js/8148.7805e73f.chunk.js": "./static/js/8148.7805e73f.chunk.js",
10
+ "static/js/8148.b905db99.chunk.js": "./static/js/8148.b905db99.chunk.js",
11
11
  "static/css/5441.c24b25fa.chunk.css": "./static/css/5441.c24b25fa.chunk.css",
12
12
  "static/js/5441.4cdb2690.chunk.js": "./static/js/5441.4cdb2690.chunk.js",
13
- "static/js/8427.69ce2c45.chunk.js": "./static/js/8427.69ce2c45.chunk.js",
13
+ "static/js/8427.b1a68937.chunk.js": "./static/js/8427.b1a68937.chunk.js",
14
14
  "static/js/7323.4e64ad2c.chunk.js": "./static/js/7323.4e64ad2c.chunk.js",
15
15
  "static/js/8536.b7b2ef90.chunk.js": "./static/js/8536.b7b2ef90.chunk.js",
16
- "static/js/7805.f7c8d475.chunk.js": "./static/js/7805.f7c8d475.chunk.js",
17
- "static/js/4500.c007e274.chunk.js": "./static/js/4500.c007e274.chunk.js",
16
+ "static/js/7805.ba32ae70.chunk.js": "./static/js/7805.ba32ae70.chunk.js",
17
+ "static/js/4500.d884c792.chunk.js": "./static/js/4500.d884c792.chunk.js",
18
18
  "static/js/1307.5225662c.chunk.js": "./static/js/1307.5225662c.chunk.js",
19
- "static/js/2469.4bb197dd.chunk.js": "./static/js/2469.4bb197dd.chunk.js",
20
- "static/js/4113.ca4d2d7b.chunk.js": "./static/js/4113.ca4d2d7b.chunk.js",
21
- "static/js/1168.2a7e18da.chunk.js": "./static/js/1168.2a7e18da.chunk.js",
22
- "static/js/178.7bea8c5d.chunk.js": "./static/js/178.7bea8c5d.chunk.js",
19
+ "static/js/2469.6217c5c3.chunk.js": "./static/js/2469.6217c5c3.chunk.js",
20
+ "static/js/4113.786b0142.chunk.js": "./static/js/4113.786b0142.chunk.js",
21
+ "static/js/1168.2a9806f0.chunk.js": "./static/js/1168.2a9806f0.chunk.js",
22
+ "static/js/178.ddebe26b.chunk.js": "./static/js/178.ddebe26b.chunk.js",
23
23
  "static/js/1792.eb8a836f.chunk.js": "./static/js/1792.eb8a836f.chunk.js",
24
24
  "static/js/1116.22f8322c.chunk.js": "./static/js/1116.22f8322c.chunk.js",
25
25
  "static/js/3513.577f3dc5.chunk.js": "./static/js/3513.577f3dc5.chunk.js",
26
- "static/js/7602.2331daf7.chunk.js": "./static/js/7602.2331daf7.chunk.js",
26
+ "static/js/7602.33571c14.chunk.js": "./static/js/7602.33571c14.chunk.js",
27
27
  "static/js/6013.fc3867be.chunk.js": "./static/js/6013.fc3867be.chunk.js",
28
28
  "static/js/4335.bc097c4d.chunk.js": "./static/js/4335.bc097c4d.chunk.js",
29
29
  "static/js/4177.e5631c43.chunk.js": "./static/js/4177.e5631c43.chunk.js",
30
- "static/js/1451.3d44ca81.chunk.js": "./static/js/1451.3d44ca81.chunk.js",
31
- "static/js/2634.1249dc7a.chunk.js": "./static/js/2634.1249dc7a.chunk.js",
30
+ "static/js/1451.d93e956f.chunk.js": "./static/js/1451.d93e956f.chunk.js",
31
+ "static/js/2634.4e2535ee.chunk.js": "./static/js/2634.4e2535ee.chunk.js",
32
32
  "static/js/1074.0db34d15.chunk.js": "./static/js/1074.0db34d15.chunk.js",
33
33
  "static/js/8477.90b06bd9.chunk.js": "./static/js/8477.90b06bd9.chunk.js",
34
- "static/js/6853.5d19f25b.chunk.js": "./static/js/6853.5d19f25b.chunk.js",
34
+ "static/js/6853.a1c4fa00.chunk.js": "./static/js/6853.a1c4fa00.chunk.js",
35
35
  "static/js/4477.edb1d80a.chunk.js": "./static/js/4477.edb1d80a.chunk.js",
36
36
  "static/js/4319.00adb829.chunk.js": "./static/js/4319.00adb829.chunk.js",
37
37
  "static/js/5106.4c60cfa4.chunk.js": "./static/js/5106.4c60cfa4.chunk.js",
@@ -153,6 +153,6 @@
153
153
  },
154
154
  "entrypoints": [
155
155
  "static/css/main.5513bd04.css",
156
- "static/js/main.b519dd78.js"
156
+ "static/js/main.90c4efd0.js"
157
157
  ]
158
158
  }
@@ -1 +1 @@
1
- <!doctype html><html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"/><link rel="shortcut icon" href="./favicon.png"/><link rel="preload" href="./static/media/SourceSansPro-Regular.0d69e5ff5e92ac64a0c9.woff2" as="font" type="font/woff2" crossorigin><link rel="preload" href="./static/media/SourceSansPro-SemiBold.abed79cd0df1827e18cf.woff2" as="font" type="font/woff2" crossorigin><link rel="preload" href="./static/media/SourceSansPro-Bold.118dea98980e20a81ced.woff2" as="font" type="font/woff2" crossorigin><title>Streamlit</title><script>window.prerenderReady=!1</script><script defer="defer" src="./static/js/main.b519dd78.js"></script><link href="./static/css/main.5513bd04.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
1
+ <!doctype html><html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"/><link rel="shortcut icon" href="./favicon.png"/><link rel="preload" href="./static/media/SourceSansPro-Regular.0d69e5ff5e92ac64a0c9.woff2" as="font" type="font/woff2" crossorigin><link rel="preload" href="./static/media/SourceSansPro-SemiBold.abed79cd0df1827e18cf.woff2" as="font" type="font/woff2" crossorigin><link rel="preload" href="./static/media/SourceSansPro-Bold.118dea98980e20a81ced.woff2" as="font" type="font/woff2" crossorigin><title>Streamlit</title><script>window.prerenderReady=!1</script><script defer="defer" src="./static/js/main.90c4efd0.js"></script><link href="./static/css/main.5513bd04.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[1168],{71168:(e,o,t)=>{t.r(o),t.d(o,{default:()=>w});var l=t(66845),n=t(25621),i=t(42736),r=t(16295),s=t(23593),c=t(50641),a=t(87814),d=t(96825),p=t.n(d),u=t(27466),h=t(63765),m=t(23849);function f(e,o,t){return e=function(e,o){return(e=(e=(e=(e=(e=(e=(e=(e=e.replaceAll("#000032",(0,u.By)(o))).replaceAll("#000033",(0,u.He)(o))).replaceAll("#000034",(0,u.Iy)(o)?o.colors.blue80:o.colors.blue40)).replaceAll("#000035",(0,u.ny)(o))).replaceAll("#000036",(0,u.Xy)(o))).replaceAll("#000037",(0,u.yq)(o))).replaceAll("#000038",o.colors.bgColor)).replaceAll("#000039",o.colors.fadedText05)).replaceAll("#000040",o.colors.bgMix)}(e,o),e=function(e,o,t){const l="#000001",n="#000002",i="#000003",r="#000004",s="#000005",c="#000006",a="#000007",d="#000008",p="#000009",h="#000010";if("streamlit"===t){const t=(0,u.iY)(o);e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replaceAll(l,t[0])).replaceAll(n,t[1])).replaceAll(i,t[2])).replaceAll(r,t[3])).replaceAll(s,t[4])).replaceAll(c,t[5])).replaceAll(a,t[6])).replaceAll(d,t[7])).replaceAll(p,t[8])).replaceAll(h,t[9])}else e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replaceAll(l,"#636efa")).replaceAll(n,"#EF553B")).replaceAll(i,"#00cc96")).replaceAll(r,"#ab63fa")).replaceAll(s,"#FFA15A")).replaceAll(c,"#19d3f3")).replaceAll(a,"#FF6692")).replaceAll(d,"#B6E880")).replaceAll(p,"#FF97FF")).replaceAll(h,"#FECB52");return e}(e,o,t),e=function(e,o,t){const l="#000011",n="#000012",i="#000013",r="#000014",s="#000015",c="#000016",a="#000017",d="#000018",p="#000019",h="#000020";if("streamlit"===t){const t=(0,u.Gy)(o);e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replaceAll(l,t[0])).replaceAll(n,t[1])).replaceAll(i,t[2])).replaceAll(r,t[3])).replaceAll(s,t[4])).replaceAll(c,t[5])).replaceAll(a,t[6])).replaceAll(d,t[7])).replaceAll(p,t[8])).replaceAll(h,t[9])}else e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replaceAll(l,"#0d0887")).replaceAll(n,"#46039f")).replaceAll(i,"#7201a8")).replaceAll(r,"#9c179e")).replaceAll(s,"#bd3786")).replaceAll(c,"#d8576b")).replaceAll(a,"#ed7953")).replaceAll(d,"#fb9f3a")).replaceAll(p,"#fdca26")).replaceAll(h,"#f0f921");return e}(e,o,t),e=function(e,o,t){const l="#000021",n="#000022",i="#000023",r="#000024",s="#000025",c="#000026",a="#000027",d="#000028",p="#000029",h="#000030",m="#000031";if("streamlit"===t){const t=(0,u.ru)(o);e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replaceAll(l,t[0])).replaceAll(n,t[1])).replaceAll(i,t[2])).replaceAll(r,t[3])).replaceAll(s,t[4])).replaceAll(c,t[5])).replaceAll(a,t[6])).replaceAll(d,t[7])).replaceAll(p,t[8])).replaceAll(h,t[9])).replaceAll(m,t[10])}else e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replaceAll(l,"#8e0152")).replaceAll(n,"#c51b7d")).replaceAll(i,"#de77ae")).replaceAll(r,"#f1b6da")).replaceAll(s,"#fde0ef")).replaceAll(c,"#f7f7f7")).replaceAll(a,"#e6f5d0")).replaceAll(d,"#b8e186")).replaceAll(p,"#7fbc41")).replaceAll(h,"#4d9221")).replaceAll(m,"#276419");return e}(e,o,t),e}function y(e,o){try{!function(e,o){const{genericFonts:t,colors:l,fontSizes:n}=o,i={font:{color:(0,u.Xy)(o),family:t.bodyFont,size:n.twoSmPx},title:{color:l.headingColor,subtitleColor:l.bodyText,font:{family:t.headingFont,size:n.mdPx,color:l.headingColor},pad:{l:o.spacing.twoXSPx},xanchor:"left",x:0},legend:{title:{font:{size:n.twoSmPx,color:(0,u.Xy)(o)},side:"top"},valign:"top",bordercolor:l.transparent,borderwidth:o.spacing.nonePx,font:{size:n.twoSmPx,color:(0,u.yq)(o)}},paper_bgcolor:l.bgColor,plot_bgcolor:l.bgColor,yaxis:{ticklabelposition:"outside",zerolinecolor:(0,u.ny)(o),title:{font:{color:(0,u.Xy)(o),size:n.smPx},standoff:o.spacing.twoXLPx},tickcolor:(0,u.ny)(o),tickfont:{color:(0,u.Xy)(o),size:n.twoSmPx},gridcolor:(0,u.ny)(o),minor:{gridcolor:(0,u.ny)(o)},automargin:!0},xaxis:{zerolinecolor:(0,u.ny)(o),gridcolor:(0,u.ny)(o),showgrid:!1,tickfont:{color:(0,u.Xy)(o),size:n.twoSmPx},tickcolor:(0,u.ny)(o),title:{font:{color:(0,u.Xy)(o),size:n.smPx},standoff:o.spacing.xlPx},minor:{gridcolor:(0,u.ny)(o)},zeroline:!1,automargin:!0,rangeselector:{bgcolor:l.bgColor,bordercolor:(0,u.ny)(o),borderwidth:1,x:0}},margin:{pad:o.spacing.smPx,r:o.spacing.nonePx,l:o.spacing.nonePx},hoverlabel:{bgcolor:l.bgColor,bordercolor:l.fadedText10,font:{color:(0,u.Xy)(o),family:t.bodyFont,size:n.twoSmPx}},coloraxis:{colorbar:{thickness:16,xpad:o.spacing.twoXLPx,ticklabelposition:"outside",outlinecolor:l.transparent,outlinewidth:8,len:.75,y:.5745,title:{font:{color:(0,u.Xy)(o),size:n.smPx}},tickfont:{color:(0,u.Xy)(o),size:n.twoSmPx}}},ternary:{gridcolor:(0,u.Xy)(o),bgcolor:l.bgColor,title:{font:{family:t.bodyFont,size:n.smPx}},color:(0,u.Xy)(o),aaxis:{gridcolor:(0,u.Xy)(o),linecolor:(0,u.Xy)(o),tickfont:{family:t.bodyFont,size:n.twoSmPx}},baxis:{linecolor:(0,u.Xy)(o),gridcolor:(0,u.Xy)(o),tickfont:{family:t.bodyFont,size:n.twoSmPx}},caxis:{linecolor:(0,u.Xy)(o),gridcolor:(0,u.Xy)(o),tickfont:{family:t.bodyFont,size:n.twoSmPx}}}};p()(e,i)}(e.layout.template.layout,o)}catch(t){const e=(0,h.b)(t);(0,m.H)(e)}"title"in e.layout&&(e.layout.title=p()(e.layout.title,{text:`<b>${e.layout.title.text}</b>`}))}var g=t(40864);const x={width:600,height:470,name:"fullscreen-expand",path:"M32 32C14.3 32 0 46.3 0 64v96c0 17.7 14.3 32 32 32s32-14.3 32-32V96h64c17.7 0 32-14.3 32-32s-14.3-32-32-32H32zM64 352c0-17.7-14.3-32-32-32s-32 14.3-32 32v96c0 17.7 14.3 32 32 32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H64V352zM320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32h64v64c0 17.7 14.3 32 32 32s32-14.3 32-32V64c0-17.7-14.3-32-32-32H320zM448 352c0-17.7-14.3-32-32-32s-32 14.3-32 32v64H320c-17.7 0-32 14.3-32 32s14.3 32 32 32h96c17.7 0 32-14.3 32-32V352z"},b={width:600,height:470,name:"fullscreen-collapse",path:"M160 64c0-17.7-14.3-32-32-32s-32 14.3-32 32v64H32c-17.7 0-32 14.3-32 32s14.3 32 32 32h96c17.7 0 32-14.3 32-32V64zM32 320c-17.7 0-32 14.3-32 32s14.3 32 32 32H96v64c0 17.7 14.3 32 32 32s32-14.3 32-32V352c0-17.7-14.3-32-32-32H32zM352 64c0-17.7-14.3-32-32-32s-32 14.3-32 32v96c0 17.7 14.3 32 32 32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H352V64zM320 320c-17.7 0-32 14.3-32 32v96c0 17.7 14.3 32 32 32s32-14.3 32-32V384h64c17.7 0 32-14.3 32-32s-14.3-32-32-32H320z"};function v(e,o,t){const l=JSON.parse(f(JSON.stringify(e),t,o));return"streamlit"===o?y(l,t):l.layout=function(e,o){const{colors:t,genericFonts:l}=o,n={font:{color:t.bodyText,family:l.bodyFont},paper_bgcolor:t.bgColor,plot_bgcolor:t.secondaryBg};return{...e,font:{...n.font,...e.font},paper_bgcolor:e.paper_bgcolor||n.paper_bgcolor,plot_bgcolor:e.plot_bgcolor||n.plot_bgcolor}}(l.layout,t),l}function A(e,o,t,l){if(!e)return;const n={selection:{points:[],point_indices:[],box:[],lasso:[]}},i=new Set,s=[],a=[],d=[],{selections:p,points:u}=e;if(u&&u.forEach((function(e){d.push({...e,legendgroup:e.data.legendgroup||void 0,data:void 0,fullData:void 0}),(0,c.bb)(e.pointIndex)&&i.add(e.pointIndex),(0,c.bb)(e.pointIndices)&&e.pointIndices.length>0&&e.pointIndices.forEach((e=>i.add(e)))})),p&&p.forEach((e=>{if("rect"===e.type){const o=function(e){return"x0"in e&&"x1"in e&&"y0"in e&&"y1"in e?{x:[e.x0,e.x1],y:[e.y0,e.y1]}:{x:[],y:[]}}(e),t={xref:e.xref,yref:e.yref,x:o.x,y:o.y};s.push(t)}if("path"===e.type){const o=function(e){if(""===e)return{x:[],y:[]};const o=e.replace("M","").replace("Z","").split("L"),t=[],l=[];return o.forEach((e=>{const[o,n]=e.split(",").map(Number);t.push(o),l.push(n)})),{x:t,y:l}}(e.path),t={xref:e.xref,yref:e.yref,x:o.x,y:o.y};a.push(t)}})),n.selection.point_indices=Array.from(i),n.selection.points=d.map((e=>(0,c.KI)(e))),n.selection.box=s,n.selection.lasso=a,n.selection.box.length>0&&!t.selectionMode.includes(r.hP.SelectionMode.BOX))return;if(n.selection.lasso.length>0&&!t.selectionMode.includes(r.hP.SelectionMode.LASSO))return;const h=o.getStringValue(t),m=JSON.stringify(n);h!==m&&o.setStringValue(t,m,{fromUi:!0},l)}const w=(0,s.Z)((function(e){var o,t,s,c,d;let{element:p,width:u,height:h,widgetMgr:m,disabled:f,fragmentId:y,isFullScreen:w,expand:S,collapse:z,disableFullscreenMode:F}=e;const C=(0,n.u)(),M=(0,l.useMemo)((()=>p.spec?JSON.parse(p.spec):{layout:{},data:[],frames:void 0}),[p.id,p.spec]),[P,k]=(0,l.useState)((()=>{const e=m.getElementState(p.id,"figure");return e||v(M,p.theme,C)})),I=p.selectionMode.length>0&&!f,E=I&&p.selectionMode.includes(r.hP.SelectionMode.LASSO),X=I&&p.selectionMode.includes(r.hP.SelectionMode.BOX),T=I&&p.selectionMode.includes(r.hP.SelectionMode.POINTS),B=(0,l.useMemo)((()=>{if(!p.config)return{};const e=JSON.parse(p.config);var o;F||(e.modeBarButtonsToAdd=[{name:w?"Close fullscreen":"Fullscreen",icon:w?b:x,click:()=>{w&&z?z():S&&S()}},...null!==(o=e.modeBarButtonsToAdd)&&void 0!==o?o:[]]);if(!e.modeBarButtonsToRemove){e.displaylogo=!1;const o=["sendDataToCloud"];I?(E||o.push("lasso2d"),X||o.push("select2d")):o.push("lasso2d","select2d"),e.modeBarButtonsToRemove=o}return e}),[p.id,p.config,w,F,I,E,X,z,S]);(0,l.useEffect)((()=>{k((e=>v(e,p.theme,C)))}),[p.id,C,p.theme]),(0,l.useEffect)((()=>{let e=M.layout.clickmode,o=M.layout.hovermode,t=M.layout.dragmode;f?(e="none",t="pan"):I&&(M.layout.clickmode||(e=T?"event+select":"none"),M.layout.hovermode||(o="closest"),M.layout.dragmode||(t=T?"pan":X?"select":E?"lasso":"pan")),k((l=>l.layout.clickmode===e&&l.layout.hovermode===o&&l.layout.dragmode===t?l:{...l,layout:{...l.layout,clickmode:e,hovermode:o,dragmode:t}}))}),[p.id,I,T,X,E,f]);let L=-1===u?null===(o=P.layout)||void 0===o?void 0:o.width:Math.max(p.useContainerWidth?u:Math.min(null!==(t=M.layout.width)&&void 0!==t?t:u,u),150),W=M.layout.height;w&&(L=u,W=h),P.layout.height===W&&P.layout.width===L||k((e=>({...e,layout:{...e.layout,height:W,width:L}})));const _=(0,l.useCallback)((e=>{A(e,m,p,y)}),[p.id,m,y]),O=(0,l.useCallback)((function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];!function(e,o,t){const l=e.getStringValue(o),n=JSON.stringify({selection:{points:[],point_indices:[],box:[],lasso:[]}});l!==n&&e.setStringValue(o,n,{fromUi:!0},t)}(m,p,y),e&&setTimeout((()=>{k((e=>({...e,data:e.data.map((e=>({...e,selectedpoints:null}))),layout:{...e.layout,selections:[]}})))}),50)}),[p.id,m,y]);return(0,l.useEffect)((()=>{if(!p.formId||!I)return;const e=new a.K;return e.manageFormClearListener(m,p.formId,O),()=>{e.disconnect()}}),[p.formId,m,I,O]),(0,l.useEffect)((()=>{var e,o,t;if(!I)return;let l;l="select"===(null===(e=P.layout)||void 0===e?void 0:e.dragmode)||"lasso"===(null===(o=P.layout)||void 0===o?void 0:o.dragmode)?"event":T?"event+select":"none",(null===(t=P.layout)||void 0===t?void 0:t.clickmode)!==l&&k((e=>({...e,layout:{...e.layout,clickmode:l}})))}),[null===(s=P.layout)||void 0===s?void 0:s.dragmode]),(0,g.jsx)(i.Z,{className:"stPlotlyChart",data:P.data,layout:P.layout,config:B,frames:null!==(c=P.frames)&&void 0!==c?c:void 0,style:{visibility:void 0===(null===(d=P.layout)||void 0===d?void 0:d.width)?"hidden":void 0},onSelected:I?_:()=>{},onDoubleClick:I?()=>O():void 0,onDeselect:I?()=>{O(!1)}:void 0,onInitialized:e=>{m.setElementState(p.id,"figure",e)},onUpdate:e=>{m.setElementState(p.id,"figure",e),k(e)}},w?"fullscreen":"original")}),!0)},23593:(e,o,t)=>{t.d(o,{Z:()=>g});var l=t(66845),n=t(13005),i=t.n(n),r=t(25621),s=t(82218),c=t(97781),a=t(46927),d=t(66694),p=t(1515);const u=(0,p.Z)("button",{target:"e1vs0wn31"})((e=>{let{isExpanded:o,theme:t}=e;const l=o?{right:"0.4rem",top:"0.5rem",backgroundColor:"transparent"}:{right:"-3.0rem",top:"-0.375rem",opacity:0,transform:"scale(0)",backgroundColor:t.colors.lightenedBg05};return{position:"absolute",display:"flex",alignItems:"center",justifyContent:"center",zIndex:t.zIndices.sidebar+1,height:"2.5rem",width:"2.5rem",transition:"opacity 300ms 150ms, transform 300ms 150ms",border:"none",color:t.colors.fadedText60,borderRadius:"50%",...l,"&:focus":{outline:"none"},"&:active, &:focus-visible, &:hover":{opacity:1,outline:"none",transform:"scale(1)",color:t.colors.bodyText,transition:"none"}}}),""),h=(0,p.Z)("div",{target:"e1vs0wn30"})((e=>{let{theme:o,isExpanded:t}=e;return{"&:hover":{[u]:{opacity:1,transform:"scale(1)",transition:"none"}},...t?{position:"fixed",top:0,left:0,bottom:0,right:0,background:o.colors.bgColor,zIndex:o.zIndices.fullscreenWrapper,padding:o.spacing.md,paddingTop:"2.875rem",overflow:["auto","overlay"],display:"flex",alignItems:"center",justifyContent:"center"}:{}}}),"");var m=t(40864);class f extends l.PureComponent{constructor(e){super(e),this.context=void 0,this.controlKeys=e=>{const{expanded:o}=this.state;27===e.keyCode&&o&&this.zoomOut()},this.zoomIn=()=>{document.body.style.overflow="hidden",this.context.setFullScreen(!0),this.setState({expanded:!0})},this.zoomOut=()=>{document.body.style.overflow="unset",this.context.setFullScreen(!1),this.setState({expanded:!1})},this.convertScssRemValueToPixels=e=>parseFloat(e)*parseFloat(getComputedStyle(document.documentElement).fontSize),this.getWindowDimensions=()=>{const e=this.convertScssRemValueToPixels(this.props.theme.spacing.md),o=this.convertScssRemValueToPixels("2.875rem");return{fullWidth:window.innerWidth-2*e,fullHeight:window.innerHeight-(e+o)}},this.updateWindowDimensions=()=>{this.setState(this.getWindowDimensions())},this.state={expanded:!1,...this.getWindowDimensions()}}componentDidMount(){window.addEventListener("resize",this.updateWindowDimensions),document.addEventListener("keydown",this.controlKeys,!1)}componentWillUnmount(){window.removeEventListener("resize",this.updateWindowDimensions),document.removeEventListener("keydown",this.controlKeys,!1)}render(){const{expanded:e,fullWidth:o,fullHeight:t}=this.state,{children:l,width:n,height:i,disableFullscreenMode:r}=this.props;let d=s.d,p=this.zoomIn,f="View fullscreen";return e&&(d=c.m,p=this.zoomOut,f="Exit fullscreen"),(0,m.jsxs)(h,{isExpanded:e,"data-testid":"stFullScreenFrame",children:[!r&&(0,m.jsx)(u,{"data-testid":"StyledFullScreenButton",onClick:p,title:f,isExpanded:e,children:(0,m.jsx)(a.Z,{content:d})}),l(e?{width:o,height:t,expanded:e,expand:this.zoomIn,collapse:this.zoomOut}:{width:n,height:i,expanded:e,expand:this.zoomIn,collapse:this.zoomOut})]})}}f.contextType=d.E;const y=(0,r.b)(f);const g=function(e){let o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];class t extends l.PureComponent{constructor(){super(...arguments),this.render=()=>{const{width:t,height:l,disableFullscreenMode:n}=this.props;return(0,m.jsx)(y,{width:t,height:l,disableFullscreenMode:o||n,children:o=>{let{width:t,height:l,expanded:n,expand:i,collapse:r}=o;return(0,m.jsx)(e,{...this.props,width:t,height:l,isFullScreen:n,expand:i,collapse:r})}})}}}return t.displayName=`withFullScreenWrapper(${e.displayName||e.name})`,i()(t,e)}},87814:(e,o,t)=>{t.d(o,{K:()=>n});var l=t(50641);class n{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(e,o,t){(0,l.bb)(this.formClearListener)&&this.lastWidgetMgr===e&&this.lastFormId===o||(this.disconnect(),(0,l.bM)(o)&&(this.formClearListener=e.addFormClearedListener(o,t),this.lastWidgetMgr=e,this.lastFormId=o))}disconnect(){var e;null===(e=this.formClearListener)||void 0===e||e.disconnect(),this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}}}}]);
1
+ "use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[1168],{71168:(e,o,t)=>{t.r(o),t.d(o,{default:()=>w});var l=t(66845),n=t(25621),i=t(42736),r=t(16295),s=t(23593),c=t(50641),a=t(87814),d=t(96825),p=t.n(d),u=t(27466),h=t(63765),m=t(23849);function f(e,o,t){return e=function(e,o){return(e=(e=(e=(e=(e=(e=(e=(e=e.replaceAll("#000032",(0,u.By)(o))).replaceAll("#000033",(0,u.He)(o))).replaceAll("#000034",(0,u.Iy)(o)?o.colors.blue80:o.colors.blue40)).replaceAll("#000035",(0,u.ny)(o))).replaceAll("#000036",(0,u.Xy)(o))).replaceAll("#000037",(0,u.yq)(o))).replaceAll("#000038",o.colors.bgColor)).replaceAll("#000039",o.colors.fadedText05)).replaceAll("#000040",o.colors.bgMix)}(e,o),e=function(e,o,t){const l="#000001",n="#000002",i="#000003",r="#000004",s="#000005",c="#000006",a="#000007",d="#000008",p="#000009",h="#000010";if("streamlit"===t){const t=(0,u.iY)(o);e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replaceAll(l,t[0])).replaceAll(n,t[1])).replaceAll(i,t[2])).replaceAll(r,t[3])).replaceAll(s,t[4])).replaceAll(c,t[5])).replaceAll(a,t[6])).replaceAll(d,t[7])).replaceAll(p,t[8])).replaceAll(h,t[9])}else e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replaceAll(l,"#636efa")).replaceAll(n,"#EF553B")).replaceAll(i,"#00cc96")).replaceAll(r,"#ab63fa")).replaceAll(s,"#FFA15A")).replaceAll(c,"#19d3f3")).replaceAll(a,"#FF6692")).replaceAll(d,"#B6E880")).replaceAll(p,"#FF97FF")).replaceAll(h,"#FECB52");return e}(e,o,t),e=function(e,o,t){const l="#000011",n="#000012",i="#000013",r="#000014",s="#000015",c="#000016",a="#000017",d="#000018",p="#000019",h="#000020";if("streamlit"===t){const t=(0,u.Gy)(o);e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replaceAll(l,t[0])).replaceAll(n,t[1])).replaceAll(i,t[2])).replaceAll(r,t[3])).replaceAll(s,t[4])).replaceAll(c,t[5])).replaceAll(a,t[6])).replaceAll(d,t[7])).replaceAll(p,t[8])).replaceAll(h,t[9])}else e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replaceAll(l,"#0d0887")).replaceAll(n,"#46039f")).replaceAll(i,"#7201a8")).replaceAll(r,"#9c179e")).replaceAll(s,"#bd3786")).replaceAll(c,"#d8576b")).replaceAll(a,"#ed7953")).replaceAll(d,"#fb9f3a")).replaceAll(p,"#fdca26")).replaceAll(h,"#f0f921");return e}(e,o,t),e=function(e,o,t){const l="#000021",n="#000022",i="#000023",r="#000024",s="#000025",c="#000026",a="#000027",d="#000028",p="#000029",h="#000030",m="#000031";if("streamlit"===t){const t=(0,u.ru)(o);e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replaceAll(l,t[0])).replaceAll(n,t[1])).replaceAll(i,t[2])).replaceAll(r,t[3])).replaceAll(s,t[4])).replaceAll(c,t[5])).replaceAll(a,t[6])).replaceAll(d,t[7])).replaceAll(p,t[8])).replaceAll(h,t[9])).replaceAll(m,t[10])}else e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replaceAll(l,"#8e0152")).replaceAll(n,"#c51b7d")).replaceAll(i,"#de77ae")).replaceAll(r,"#f1b6da")).replaceAll(s,"#fde0ef")).replaceAll(c,"#f7f7f7")).replaceAll(a,"#e6f5d0")).replaceAll(d,"#b8e186")).replaceAll(p,"#7fbc41")).replaceAll(h,"#4d9221")).replaceAll(m,"#276419");return e}(e,o,t),e}function y(e,o){try{!function(e,o){const{genericFonts:t,colors:l,fontSizes:n}=o,i={font:{color:(0,u.Xy)(o),family:t.bodyFont,size:n.twoSmPx},title:{color:l.headingColor,subtitleColor:l.bodyText,font:{family:t.headingFont,size:n.mdPx,color:l.headingColor},pad:{l:o.spacing.twoXSPx},xanchor:"left",x:0},legend:{title:{font:{size:n.twoSmPx,color:(0,u.Xy)(o)},side:"top"},valign:"top",bordercolor:l.transparent,borderwidth:o.spacing.nonePx,font:{size:n.twoSmPx,color:(0,u.yq)(o)}},paper_bgcolor:l.bgColor,plot_bgcolor:l.bgColor,yaxis:{ticklabelposition:"outside",zerolinecolor:(0,u.ny)(o),title:{font:{color:(0,u.Xy)(o),size:n.smPx},standoff:o.spacing.twoXLPx},tickcolor:(0,u.ny)(o),tickfont:{color:(0,u.Xy)(o),size:n.twoSmPx},gridcolor:(0,u.ny)(o),minor:{gridcolor:(0,u.ny)(o)},automargin:!0},xaxis:{zerolinecolor:(0,u.ny)(o),gridcolor:(0,u.ny)(o),showgrid:!1,tickfont:{color:(0,u.Xy)(o),size:n.twoSmPx},tickcolor:(0,u.ny)(o),title:{font:{color:(0,u.Xy)(o),size:n.smPx},standoff:o.spacing.xlPx},minor:{gridcolor:(0,u.ny)(o)},zeroline:!1,automargin:!0,rangeselector:{bgcolor:l.bgColor,bordercolor:(0,u.ny)(o),borderwidth:1,x:0}},margin:{pad:o.spacing.smPx,r:o.spacing.nonePx,l:o.spacing.nonePx},hoverlabel:{bgcolor:l.bgColor,bordercolor:l.borderColor,font:{color:(0,u.Xy)(o),family:t.bodyFont,size:n.twoSmPx}},coloraxis:{colorbar:{thickness:16,xpad:o.spacing.twoXLPx,ticklabelposition:"outside",outlinecolor:l.transparent,outlinewidth:8,len:.75,y:.5745,title:{font:{color:(0,u.Xy)(o),size:n.smPx}},tickfont:{color:(0,u.Xy)(o),size:n.twoSmPx}}},ternary:{gridcolor:(0,u.Xy)(o),bgcolor:l.bgColor,title:{font:{family:t.bodyFont,size:n.smPx}},color:(0,u.Xy)(o),aaxis:{gridcolor:(0,u.Xy)(o),linecolor:(0,u.Xy)(o),tickfont:{family:t.bodyFont,size:n.twoSmPx}},baxis:{linecolor:(0,u.Xy)(o),gridcolor:(0,u.Xy)(o),tickfont:{family:t.bodyFont,size:n.twoSmPx}},caxis:{linecolor:(0,u.Xy)(o),gridcolor:(0,u.Xy)(o),tickfont:{family:t.bodyFont,size:n.twoSmPx}}}};p()(e,i)}(e.layout.template.layout,o)}catch(t){const e=(0,h.b)(t);(0,m.H)(e)}"title"in e.layout&&(e.layout.title=p()(e.layout.title,{text:`<b>${e.layout.title.text}</b>`}))}var g=t(40864);const x={width:600,height:470,name:"fullscreen-expand",path:"M32 32C14.3 32 0 46.3 0 64v96c0 17.7 14.3 32 32 32s32-14.3 32-32V96h64c17.7 0 32-14.3 32-32s-14.3-32-32-32H32zM64 352c0-17.7-14.3-32-32-32s-32 14.3-32 32v96c0 17.7 14.3 32 32 32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H64V352zM320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32h64v64c0 17.7 14.3 32 32 32s32-14.3 32-32V64c0-17.7-14.3-32-32-32H320zM448 352c0-17.7-14.3-32-32-32s-32 14.3-32 32v64H320c-17.7 0-32 14.3-32 32s14.3 32 32 32h96c17.7 0 32-14.3 32-32V352z"},b={width:600,height:470,name:"fullscreen-collapse",path:"M160 64c0-17.7-14.3-32-32-32s-32 14.3-32 32v64H32c-17.7 0-32 14.3-32 32s14.3 32 32 32h96c17.7 0 32-14.3 32-32V64zM32 320c-17.7 0-32 14.3-32 32s14.3 32 32 32H96v64c0 17.7 14.3 32 32 32s32-14.3 32-32V352c0-17.7-14.3-32-32-32H32zM352 64c0-17.7-14.3-32-32-32s-32 14.3-32 32v96c0 17.7 14.3 32 32 32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H352V64zM320 320c-17.7 0-32 14.3-32 32v96c0 17.7 14.3 32 32 32s32-14.3 32-32V384h64c17.7 0 32-14.3 32-32s-14.3-32-32-32H320z"};function v(e,o,t){const l=JSON.parse(f(JSON.stringify(e),t,o));return"streamlit"===o?y(l,t):l.layout=function(e,o){const{colors:t,genericFonts:l}=o,n={font:{color:t.bodyText,family:l.bodyFont},paper_bgcolor:t.bgColor,plot_bgcolor:t.secondaryBg};return{...e,font:{...n.font,...e.font},paper_bgcolor:e.paper_bgcolor||n.paper_bgcolor,plot_bgcolor:e.plot_bgcolor||n.plot_bgcolor}}(l.layout,t),l}function A(e,o,t,l){if(!e)return;const n={selection:{points:[],point_indices:[],box:[],lasso:[]}},i=new Set,s=[],a=[],d=[],{selections:p,points:u}=e;if(u&&u.forEach((function(e){d.push({...e,legendgroup:e.data.legendgroup||void 0,data:void 0,fullData:void 0}),(0,c.bb)(e.pointIndex)&&i.add(e.pointIndex),(0,c.bb)(e.pointIndices)&&e.pointIndices.length>0&&e.pointIndices.forEach((e=>i.add(e)))})),p&&p.forEach((e=>{if("rect"===e.type){const o=function(e){return"x0"in e&&"x1"in e&&"y0"in e&&"y1"in e?{x:[e.x0,e.x1],y:[e.y0,e.y1]}:{x:[],y:[]}}(e),t={xref:e.xref,yref:e.yref,x:o.x,y:o.y};s.push(t)}if("path"===e.type){const o=function(e){if(""===e)return{x:[],y:[]};const o=e.replace("M","").replace("Z","").split("L"),t=[],l=[];return o.forEach((e=>{const[o,n]=e.split(",").map(Number);t.push(o),l.push(n)})),{x:t,y:l}}(e.path),t={xref:e.xref,yref:e.yref,x:o.x,y:o.y};a.push(t)}})),n.selection.point_indices=Array.from(i),n.selection.points=d.map((e=>(0,c.KI)(e))),n.selection.box=s,n.selection.lasso=a,n.selection.box.length>0&&!t.selectionMode.includes(r.hP.SelectionMode.BOX))return;if(n.selection.lasso.length>0&&!t.selectionMode.includes(r.hP.SelectionMode.LASSO))return;const h=o.getStringValue(t),m=JSON.stringify(n);h!==m&&o.setStringValue(t,m,{fromUi:!0},l)}const w=(0,s.Z)((function(e){var o,t,s,c,d;let{element:p,width:u,height:h,widgetMgr:m,disabled:f,fragmentId:y,isFullScreen:w,expand:S,collapse:z,disableFullscreenMode:F}=e;const C=(0,n.u)(),M=(0,l.useMemo)((()=>p.spec?JSON.parse(p.spec):{layout:{},data:[],frames:void 0}),[p.id,p.spec]),[P,k]=(0,l.useState)((()=>{const e=m.getElementState(p.id,"figure");return e||v(M,p.theme,C)})),I=p.selectionMode.length>0&&!f,E=I&&p.selectionMode.includes(r.hP.SelectionMode.LASSO),X=I&&p.selectionMode.includes(r.hP.SelectionMode.BOX),B=I&&p.selectionMode.includes(r.hP.SelectionMode.POINTS),L=(0,l.useMemo)((()=>{if(!p.config)return{};const e=JSON.parse(p.config);var o;F||(e.modeBarButtonsToAdd=[{name:w?"Close fullscreen":"Fullscreen",icon:w?b:x,click:()=>{w&&z?z():S&&S()}},...null!==(o=e.modeBarButtonsToAdd)&&void 0!==o?o:[]]);if(!e.modeBarButtonsToRemove){e.displaylogo=!1;const o=["sendDataToCloud"];I?(E||o.push("lasso2d"),X||o.push("select2d")):o.push("lasso2d","select2d"),e.modeBarButtonsToRemove=o}return e}),[p.id,p.config,w,F,I,E,X,z,S]);(0,l.useEffect)((()=>{k((e=>v(e,p.theme,C)))}),[p.id,C,p.theme]),(0,l.useEffect)((()=>{let e=M.layout.clickmode,o=M.layout.hovermode,t=M.layout.dragmode;f?(e="none",t="pan"):I&&(M.layout.clickmode||(e=B?"event+select":"none"),M.layout.hovermode||(o="closest"),M.layout.dragmode||(t=B?"pan":X?"select":E?"lasso":"pan")),k((l=>l.layout.clickmode===e&&l.layout.hovermode===o&&l.layout.dragmode===t?l:{...l,layout:{...l.layout,clickmode:e,hovermode:o,dragmode:t}}))}),[p.id,I,B,X,E,f]);let T=-1===u?null===(o=P.layout)||void 0===o?void 0:o.width:Math.max(p.useContainerWidth?u:Math.min(null!==(t=M.layout.width)&&void 0!==t?t:u,u),150),W=M.layout.height;w&&(T=u,W=h),P.layout.height===W&&P.layout.width===T||k((e=>({...e,layout:{...e.layout,height:W,width:T}})));const _=(0,l.useCallback)((e=>{A(e,m,p,y)}),[p.id,m,y]),O=(0,l.useCallback)((function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];!function(e,o,t){const l=e.getStringValue(o),n=JSON.stringify({selection:{points:[],point_indices:[],box:[],lasso:[]}});l!==n&&e.setStringValue(o,n,{fromUi:!0},t)}(m,p,y),e&&setTimeout((()=>{k((e=>({...e,data:e.data.map((e=>({...e,selectedpoints:null}))),layout:{...e.layout,selections:[]}})))}),50)}),[p.id,m,y]);return(0,l.useEffect)((()=>{if(!p.formId||!I)return;const e=new a.K;return e.manageFormClearListener(m,p.formId,O),()=>{e.disconnect()}}),[p.formId,m,I,O]),(0,l.useEffect)((()=>{var e,o,t;if(!I)return;let l;l="select"===(null===(e=P.layout)||void 0===e?void 0:e.dragmode)||"lasso"===(null===(o=P.layout)||void 0===o?void 0:o.dragmode)?"event":B?"event+select":"none",(null===(t=P.layout)||void 0===t?void 0:t.clickmode)!==l&&k((e=>({...e,layout:{...e.layout,clickmode:l}})))}),[null===(s=P.layout)||void 0===s?void 0:s.dragmode]),(0,g.jsx)(i.Z,{className:"stPlotlyChart",data:P.data,layout:P.layout,config:L,frames:null!==(c=P.frames)&&void 0!==c?c:void 0,style:{visibility:void 0===(null===(d=P.layout)||void 0===d?void 0:d.width)?"hidden":void 0},onSelected:I?_:()=>{},onDoubleClick:I?()=>O():void 0,onDeselect:I?()=>{O(!1)}:void 0,onInitialized:e=>{m.setElementState(p.id,"figure",e)},onUpdate:e=>{m.setElementState(p.id,"figure",e),k(e)}},w?"fullscreen":"original")}),!0)},23593:(e,o,t)=>{t.d(o,{Z:()=>g});var l=t(66845),n=t(13005),i=t.n(n),r=t(25621),s=t(82218),c=t(97781),a=t(46927),d=t(66694),p=t(1515);const u=(0,p.Z)("button",{target:"e1vs0wn31"})((e=>{let{isExpanded:o,theme:t}=e;const l=o?{right:"0.4rem",top:"0.5rem",backgroundColor:"transparent"}:{right:"-3.0rem",top:"-0.375rem",opacity:0,transform:"scale(0)",backgroundColor:t.colors.lightenedBg05};return{position:"absolute",display:"flex",alignItems:"center",justifyContent:"center",zIndex:t.zIndices.sidebar+1,height:"2.5rem",width:"2.5rem",transition:"opacity 300ms 150ms, transform 300ms 150ms",border:"none",color:t.colors.fadedText60,borderRadius:"50%",...l,"&:focus":{outline:"none"},"&:active, &:focus-visible, &:hover":{opacity:1,outline:"none",transform:"scale(1)",color:t.colors.bodyText,transition:"none"}}}),""),h=(0,p.Z)("div",{target:"e1vs0wn30"})((e=>{let{theme:o,isExpanded:t}=e;return{"&:hover":{[u]:{opacity:1,transform:"scale(1)",transition:"none"}},...t?{position:"fixed",top:0,left:0,bottom:0,right:0,background:o.colors.bgColor,zIndex:o.zIndices.fullscreenWrapper,padding:o.spacing.md,paddingTop:"2.875rem",overflow:["auto","overlay"],display:"flex",alignItems:"center",justifyContent:"center"}:{}}}),"");var m=t(40864);class f extends l.PureComponent{constructor(e){super(e),this.context=void 0,this.controlKeys=e=>{const{expanded:o}=this.state;27===e.keyCode&&o&&this.zoomOut()},this.zoomIn=()=>{document.body.style.overflow="hidden",this.context.setFullScreen(!0),this.setState({expanded:!0})},this.zoomOut=()=>{document.body.style.overflow="unset",this.context.setFullScreen(!1),this.setState({expanded:!1})},this.convertScssRemValueToPixels=e=>parseFloat(e)*parseFloat(getComputedStyle(document.documentElement).fontSize),this.getWindowDimensions=()=>{const e=this.convertScssRemValueToPixels(this.props.theme.spacing.md),o=this.convertScssRemValueToPixels("2.875rem");return{fullWidth:window.innerWidth-2*e,fullHeight:window.innerHeight-(e+o)}},this.updateWindowDimensions=()=>{this.setState(this.getWindowDimensions())},this.state={expanded:!1,...this.getWindowDimensions()}}componentDidMount(){window.addEventListener("resize",this.updateWindowDimensions),document.addEventListener("keydown",this.controlKeys,!1)}componentWillUnmount(){window.removeEventListener("resize",this.updateWindowDimensions),document.removeEventListener("keydown",this.controlKeys,!1)}render(){const{expanded:e,fullWidth:o,fullHeight:t}=this.state,{children:l,width:n,height:i,disableFullscreenMode:r}=this.props;let d=s.d,p=this.zoomIn,f="View fullscreen";return e&&(d=c.m,p=this.zoomOut,f="Exit fullscreen"),(0,m.jsxs)(h,{isExpanded:e,"data-testid":"stFullScreenFrame",children:[!r&&(0,m.jsx)(u,{"data-testid":"StyledFullScreenButton",onClick:p,title:f,isExpanded:e,children:(0,m.jsx)(a.Z,{content:d})}),l(e?{width:o,height:t,expanded:e,expand:this.zoomIn,collapse:this.zoomOut}:{width:n,height:i,expanded:e,expand:this.zoomIn,collapse:this.zoomOut})]})}}f.contextType=d.E;const y=(0,r.b)(f);const g=function(e){let o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];class t extends l.PureComponent{constructor(){super(...arguments),this.render=()=>{const{width:t,height:l,disableFullscreenMode:n}=this.props;return(0,m.jsx)(y,{width:t,height:l,disableFullscreenMode:o||n,children:o=>{let{width:t,height:l,expanded:n,expand:i,collapse:r}=o;return(0,m.jsx)(e,{...this.props,width:t,height:l,isFullScreen:n,expand:i,collapse:r})}})}}}return t.displayName=`withFullScreenWrapper(${e.displayName||e.name})`,i()(t,e)}},87814:(e,o,t)=>{t.d(o,{K:()=>n});var l=t(50641);class n{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(e,o,t){(0,l.bb)(this.formClearListener)&&this.lastWidgetMgr===e&&this.lastFormId===o||(this.disconnect(),(0,l.bM)(o)&&(this.formClearListener=e.addFormClearedListener(o,t),this.lastWidgetMgr=e,this.lastFormId=o))}disconnect(){var e;null===(e=this.formClearListener)||void 0===e||e.disconnect(),this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[1451],{61451:(e,t,s)=>{s.r(t),s.d(t,{default:()=>C});var i=s(66845),r=s(25267),a=s.n(r),o=s(25621),n=s(15791),l=s(28278),d=s(13553),m=s(87814),p=s(98478),h=s(86659),u=s(8879),c=s(68411),g=s(50641),f=s(40864);const b="YYYY/MM/DD";function v(e){return e.map((e=>new Date(e)))}class y extends i.PureComponent{constructor(){super(...arguments),this.formClearHelper=new m.K,this.state={values:this.initialValue,isRange:this.props.element.isRange,isEmpty:!1},this.commitWidgetValue=e=>{const{widgetMgr:t,element:s,fragmentId:i}=this.props;var r;t.setStringArrayValue(s,(r=this.state.values)?r.map((e=>a()(e).format(b))):[],e,i)},this.onFormCleared=()=>{const e=v(this.props.element.default);this.setState({values:e,isEmpty:!e},(()=>this.commitWidgetValue({fromUi:!0})))},this.handleChange=e=>{let{date:t}=e;if(null===t||void 0===t)return void this.setState({values:[],isEmpty:!0});const s=[];Array.isArray(t)?t.forEach((e=>{e&&s.push(e)})):s.push(t),this.setState({values:s,isEmpty:!s},(()=>{this.state.isEmpty||this.commitWidgetValue({fromUi:!0})}))},this.handleClose=()=>{const{isEmpty:e}=this.state;e&&this.setState(((e,t)=>({values:v(t.element.default),isEmpty:!v(t.element.default)})),(()=>{this.commitWidgetValue({fromUi:!0})}))},this.getMaxDate=()=>{const{element:e}=this.props,t=e.max;return t&&t.length>0?a()(t,b).toDate():void 0}}get initialValue(){const e=this.props.widgetMgr.getStringArrayValue(this.props.element);return v(void 0!==e?e:this.props.element.default||[])}componentDidMount(){this.props.element.setValue?this.updateFromProtobuf():this.commitWidgetValue({fromUi:!1})}componentDidUpdate(){this.maybeUpdateFromProtobuf()}componentWillUnmount(){this.formClearHelper.disconnect()}maybeUpdateFromProtobuf(){const{setValue:e}=this.props.element;e&&this.updateFromProtobuf()}updateFromProtobuf(){const{value:e}=this.props.element;this.props.element.setValue=!1;const t=e.map((e=>new Date(e)));this.setState({values:t,isEmpty:!t},(()=>{this.commitWidgetValue({fromUi:!1})}))}render(){var e;const{width:t,element:s,disabled:i,theme:r,widgetMgr:o}=this.props,{values:m,isRange:v}=this.state,{colors:y,fontSizes:C,lineHeights:W,spacing:D}=r,x={width:t},I=a()(s.min,b).toDate(),F=this.getMaxDate(),V=0===s.default.length&&!i,S=s.format.replaceAll(/[a-zA-Z]/g,"9"),k=s.format.replaceAll("Y","y").replaceAll("D","d");return this.formClearHelper.manageFormClearListener(o,s.formId,this.onFormCleared),(0,f.jsxs)("div",{className:"stDateInput","data-testid":"stDateInput",style:x,children:[(0,f.jsx)(p.O,{label:s.label,disabled:i,labelVisibility:(0,g.iF)(null===(e=s.labelVisibility)||void 0===e?void 0:e.value),children:s.help&&(0,f.jsx)(h.dT,{children:(0,f.jsx)(u.Z,{content:s.help,placement:c.u.TOP_RIGHT})})}),(0,f.jsx)(n.Z,{density:l.pw.high,formatString:k,mask:v?`${S} \u2013 ${S}`:S,placeholder:v?`${s.format} \u2013 ${s.format}`:s.format,disabled:i,onChange:this.handleChange,onClose:this.handleClose,overrides:{Popover:{props:{placement:d.r4.bottomLeft,overrides:{Body:{style:{border:`${r.sizes.borderWidth} solid ${y.fadedText10}`}}}}},CalendarContainer:{style:{fontSize:C.sm,paddingRight:r.spacing.sm,paddingLeft:r.spacing.sm,paddingBottom:r.spacing.sm,paddingTop:r.spacing.sm}},Week:{style:{fontSize:C.sm}},Day:{style:e=>{let{$pseudoHighlighted:t,$pseudoSelected:s,$selected:i,$isHovered:r}=e;return{fontSize:C.sm,lineHeight:W.base,"::before":{backgroundColor:i||s||t||r?`${y.secondaryBg} !important`:y.transparent},"::after":{borderColor:y.transparent}}}},PrevButton:{style:()=>({display:"flex",alignItems:"center",justifyContent:"center",":active":{backgroundColor:y.transparent},":focus":{backgroundColor:y.transparent,outline:0}})},NextButton:{style:{display:"flex",alignItems:"center",justifyContent:"center",":active":{backgroundColor:y.transparent},":focus":{backgroundColor:y.transparent,outline:0}}},Input:{props:{maskChar:null,overrides:{Root:{style:{borderLeftWidth:r.sizes.borderWidth,borderRightWidth:r.sizes.borderWidth,borderTopWidth:r.sizes.borderWidth,borderBottomWidth:r.sizes.borderWidth}},ClearIcon:{props:{overrides:{Svg:{style:{color:r.colors.darkGray,transform:"scale(1.41)",width:r.spacing.twoXL,marginRight:"-8px",":hover":{fill:r.colors.bodyText}}}}}},Input:{style:{paddingRight:D.sm,paddingLeft:D.sm,paddingBottom:D.sm,paddingTop:D.sm,lineHeight:W.inputWidget},props:{"data-testid":"stDateInput-Input"}}}}}},value:m,minDate:I,maxDate:F,range:v,clearable:V})]})}}const C=(0,o.b)(y)},87814:(e,t,s)=>{s.d(t,{K:()=>r});var i=s(50641);class r{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(e,t,s){(0,i.bb)(this.formClearListener)&&this.lastWidgetMgr===e&&this.lastFormId===t||(this.disconnect(),(0,i.bM)(t)&&(this.formClearListener=e.addFormClearedListener(t,s),this.lastWidgetMgr=e,this.lastFormId=t))}disconnect(){var e;null===(e=this.formClearListener)||void 0===e||e.disconnect(),this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}}}}]);
1
+ "use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[1451],{61451:(e,t,s)=>{s.r(t),s.d(t,{default:()=>C});var i=s(66845),r=s(25267),a=s.n(r),o=s(25621),n=s(15791),l=s(28278),d=s(13553),m=s(87814),p=s(98478),h=s(86659),u=s(8879),c=s(68411),g=s(50641),f=s(40864);const b="YYYY/MM/DD";function v(e){return e.map((e=>new Date(e)))}class y extends i.PureComponent{constructor(){super(...arguments),this.formClearHelper=new m.K,this.state={values:this.initialValue,isRange:this.props.element.isRange,isEmpty:!1},this.commitWidgetValue=e=>{const{widgetMgr:t,element:s,fragmentId:i}=this.props;var r;t.setStringArrayValue(s,(r=this.state.values)?r.map((e=>a()(e).format(b))):[],e,i)},this.onFormCleared=()=>{const e=v(this.props.element.default);this.setState({values:e,isEmpty:!e},(()=>this.commitWidgetValue({fromUi:!0})))},this.handleChange=e=>{let{date:t}=e;if(null===t||void 0===t)return void this.setState({values:[],isEmpty:!0});const s=[];Array.isArray(t)?t.forEach((e=>{e&&s.push(e)})):s.push(t),this.setState({values:s,isEmpty:!s},(()=>{this.state.isEmpty||this.commitWidgetValue({fromUi:!0})}))},this.handleClose=()=>{const{isEmpty:e}=this.state;e&&this.setState(((e,t)=>({values:v(t.element.default),isEmpty:!v(t.element.default)})),(()=>{this.commitWidgetValue({fromUi:!0})}))},this.getMaxDate=()=>{const{element:e}=this.props,t=e.max;return t&&t.length>0?a()(t,b).toDate():void 0}}get initialValue(){const e=this.props.widgetMgr.getStringArrayValue(this.props.element);return v(void 0!==e?e:this.props.element.default||[])}componentDidMount(){this.props.element.setValue?this.updateFromProtobuf():this.commitWidgetValue({fromUi:!1})}componentDidUpdate(){this.maybeUpdateFromProtobuf()}componentWillUnmount(){this.formClearHelper.disconnect()}maybeUpdateFromProtobuf(){const{setValue:e}=this.props.element;e&&this.updateFromProtobuf()}updateFromProtobuf(){const{value:e}=this.props.element;this.props.element.setValue=!1;const t=e.map((e=>new Date(e)));this.setState({values:t,isEmpty:!t},(()=>{this.commitWidgetValue({fromUi:!1})}))}render(){var e;const{width:t,element:s,disabled:i,theme:r,widgetMgr:o}=this.props,{values:m,isRange:v}=this.state,{colors:y,fontSizes:C,lineHeights:W,spacing:D}=r,I={width:t},x=a()(s.min,b).toDate(),F=this.getMaxDate(),V=0===s.default.length&&!i,S=s.format.replaceAll(/[a-zA-Z]/g,"9"),k=s.format.replaceAll("Y","y").replaceAll("D","d");return this.formClearHelper.manageFormClearListener(o,s.formId,this.onFormCleared),(0,f.jsxs)("div",{className:"stDateInput","data-testid":"stDateInput",style:I,children:[(0,f.jsx)(p.O,{label:s.label,disabled:i,labelVisibility:(0,g.iF)(null===(e=s.labelVisibility)||void 0===e?void 0:e.value),children:s.help&&(0,f.jsx)(h.dT,{children:(0,f.jsx)(u.Z,{content:s.help,placement:c.u.TOP_RIGHT})})}),(0,f.jsx)(n.Z,{density:l.pw.high,formatString:k,mask:v?`${S} \u2013 ${S}`:S,placeholder:v?`${s.format} \u2013 ${s.format}`:s.format,disabled:i,onChange:this.handleChange,onClose:this.handleClose,overrides:{Popover:{props:{placement:d.r4.bottomLeft,overrides:{Body:{style:{border:`${r.sizes.borderWidth} solid ${y.borderColor}`}}}}},CalendarContainer:{style:{fontSize:C.sm,paddingRight:r.spacing.sm,paddingLeft:r.spacing.sm,paddingBottom:r.spacing.sm,paddingTop:r.spacing.sm}},Week:{style:{fontSize:C.sm}},Day:{style:e=>{let{$pseudoHighlighted:t,$pseudoSelected:s,$selected:i,$isHovered:r}=e;return{fontSize:C.sm,lineHeight:W.base,"::before":{backgroundColor:i||s||t||r?`${y.secondaryBg} !important`:y.transparent},"::after":{borderColor:y.transparent}}}},PrevButton:{style:()=>({display:"flex",alignItems:"center",justifyContent:"center",":active":{backgroundColor:y.transparent},":focus":{backgroundColor:y.transparent,outline:0}})},NextButton:{style:{display:"flex",alignItems:"center",justifyContent:"center",":active":{backgroundColor:y.transparent},":focus":{backgroundColor:y.transparent,outline:0}}},Input:{props:{maskChar:null,overrides:{Root:{style:{borderLeftWidth:r.sizes.borderWidth,borderRightWidth:r.sizes.borderWidth,borderTopWidth:r.sizes.borderWidth,borderBottomWidth:r.sizes.borderWidth}},ClearIcon:{props:{overrides:{Svg:{style:{color:r.colors.darkGray,transform:"scale(1.41)",width:r.spacing.twoXL,marginRight:"-8px",":hover":{fill:r.colors.bodyText}}}}}},Input:{style:{paddingRight:D.sm,paddingLeft:D.sm,paddingBottom:D.sm,paddingTop:D.sm,lineHeight:W.inputWidget},props:{"data-testid":"stDateInput-Input"}}}}}},value:m,minDate:x,maxDate:F,range:v,clearable:V})]})}}const C=(0,o.b)(y)},87814:(e,t,s)=>{s.d(t,{K:()=>r});var i=s(50641);class r{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(e,t,s){(0,i.bb)(this.formClearListener)&&this.lastWidgetMgr===e&&this.lastFormId===t||(this.disconnect(),(0,i.bM)(t)&&(this.formClearListener=e.addFormClearedListener(t,s),this.lastWidgetMgr=e,this.lastFormId=t))}disconnect(){var e;null===(e=this.formClearListener)||void 0===e||e.disconnect(),this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[178],{178:(e,t,r)=>{r.r(t),r.d(t,{default:()=>l});var a=r(66845),n=r(16295),s=r(68785),i=r(40864);const d=528;function l(e){let{element:t,width:r,endpoints:l,elementMgr:o}=e;const u=(0,a.useRef)(null),{type:c,url:p,startTime:m,subtitles:f,endTime:h,loop:v,autoplay:y,muted:E}=t,T=(0,a.useMemo)((()=>{if(!t.id)return!0;const e=o.getElementState(t.id,"preventAutoplay");return e||o.setElementState(t.id,"preventAutoplay",!0),null!==e&&void 0!==e&&e}),[t.id,o]);(0,a.useEffect)((()=>{u.current&&(u.current.currentTime=m)}),[m]),(0,a.useEffect)((()=>{const e=u.current,r=()=>{e&&(e.currentTime=t.startTime)};return e&&e.addEventListener("loadedmetadata",r),()=>{e&&e.removeEventListener("loadedmetadata",r)}}),[t]),(0,a.useEffect)((()=>{const e=u.current;if(!e)return;let t=!1;const r=()=>{h>0&&e.currentTime>=h&&(v?(e.currentTime=m||0,e.play()):t||(t=!0,e.pause()))};return h>0&&e.addEventListener("timeupdate",r),()=>{e&&h>0&&e.removeEventListener("timeupdate",r)}}),[h,v,m]),(0,a.useEffect)((()=>{const e=u.current;if(!e)return;const t=()=>{v&&(e.currentTime=m||0,e.play())};return e.addEventListener("ended",t),()=>{e&&e.removeEventListener("ended",t)}}),[v,m]);const g=e=>{const{startTime:r,endTime:a,loop:n,autoplay:s,muted:i}=t,d=new URL(e);if(r&&!isNaN(r)&&d.searchParams.append("start",r.toString()),a&&!isNaN(a)&&d.searchParams.append("end",a.toString()),n){d.searchParams.append("loop","1");const e=d.pathname.split("/").pop();e&&d.searchParams.append("playlist",e)}return s&&d.searchParams.append("autoplay","1"),i&&d.searchParams.append("mute","1"),d.toString()};if(c===n.nk.Type.YOUTUBE_IFRAME){const e=0!==r?.75*r:d;return(0,i.jsx)("iframe",{"data-testid":"stVideo",title:p,src:g(p),width:r,height:e,style:{colorScheme:"normal"},frameBorder:"0",allow:"autoplay; encrypted-media",allowFullScreen:!0})}return(0,i.jsx)("video",{"data-testid":"stVideo",ref:u,controls:!0,muted:E,autoPlay:y&&!T,src:l.buildMediaURL(p),className:"stVideo",style:{width:r,height:0===r?d:void 0},crossOrigin:s.td&&f.length>0?"anonymous":void 0,children:f&&f.map(((e,t)=>(0,i.jsx)("track",{kind:"captions",src:l.buildMediaURL(e.url),label:e.label,default:0===t},t)))})}}}]);
1
+ "use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[178],{178:(e,t,r)=>{r.r(t),r.d(t,{default:()=>l});var a=r(66845),n=r(16295),s=r(68785),i=r(40864);const d=528;function l(e){let{element:t,width:r,endpoints:l,elementMgr:o}=e;const u=(0,a.useRef)(null),{type:c,url:p,startTime:m,subtitles:f,endTime:h,loop:v,autoplay:y,muted:E}=t,T=(0,a.useMemo)((()=>{if(!t.id)return!0;const e=o.getElementState(t.id,"preventAutoplay");return e||o.setElementState(t.id,"preventAutoplay",!0),null!==e&&void 0!==e&&e}),[t.id,o]);(0,a.useEffect)((()=>{u.current&&(u.current.currentTime=m)}),[m]),(0,a.useEffect)((()=>{const e=u.current,r=()=>{e&&(e.currentTime=t.startTime)};return e&&e.addEventListener("loadedmetadata",r),()=>{e&&e.removeEventListener("loadedmetadata",r)}}),[t]),(0,a.useEffect)((()=>{const e=u.current;if(!e)return;let t=!1;const r=()=>{h>0&&e.currentTime>=h&&(v?(e.currentTime=m||0,e.play()):t||(t=!0,e.pause()))};return h>0&&e.addEventListener("timeupdate",r),()=>{e&&h>0&&e.removeEventListener("timeupdate",r)}}),[h,v,m]),(0,a.useEffect)((()=>{const e=u.current;if(!e)return;const t=()=>{v&&(e.currentTime=m||0,e.play())};return e.addEventListener("ended",t),()=>{e&&e.removeEventListener("ended",t)}}),[v,m]);const g=e=>{const{startTime:r,endTime:a,loop:n,autoplay:s,muted:i}=t,d=new URL(e);if(r&&!isNaN(r)&&d.searchParams.append("start",r.toString()),a&&!isNaN(a)&&d.searchParams.append("end",a.toString()),n){d.searchParams.append("loop","1");const e=d.pathname.split("/").pop();e&&d.searchParams.append("playlist",e)}return s&&d.searchParams.append("autoplay","1"),i&&d.searchParams.append("mute","1"),d.toString()};if(c===n.nk.Type.YOUTUBE_IFRAME){const e=0!==r?.75*r:d;return(0,i.jsx)("iframe",{className:"stVideo","data-testid":"stVideo",title:p,src:g(p),width:r,height:e,style:{colorScheme:"normal"},frameBorder:"0",allow:"autoplay; encrypted-media",allowFullScreen:!0})}return(0,i.jsx)("video",{className:"stVideo","data-testid":"stVideo",ref:u,controls:!0,muted:E,autoPlay:y&&!T,src:l.buildMediaURL(p),style:{width:r,height:0===r?d:void 0},crossOrigin:s.td&&f.length>0?"anonymous":void 0,children:f&&f.map(((e,t)=>(0,i.jsx)("track",{kind:"captions",src:l.buildMediaURL(e.url),label:e.label,default:0===t},t)))})}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[2469],{62469:(o,r,e)=>{e.r(r),e.d(r,{default:()=>h});e(66845);var i=e(81354),t=e(27446),l=e(12596),a=e(1515),s=e(35704);function d(o,r){switch(o){case i.V5.XSMALL:return{padding:`${r.spacing.twoXS} ${r.spacing.sm}`,fontSize:r.fontSizes.sm};case i.V5.SMALL:return{padding:`${r.spacing.twoXS} ${r.spacing.md}`};case i.V5.LARGE:return{padding:`${r.spacing.md} ${r.spacing.md}`};default:return{padding:`${r.spacing.xs} ${r.spacing.md}`}}}const n=(0,a.Z)("a",{target:"e16zdaao2"})((o=>{let{fluidWidth:r,size:e,theme:i}=o;const t="number"==typeof r?`${r}px`:"100%";return{display:"inline-flex",alignItems:"center",justifyContent:"center",fontWeight:i.fontWeights.normal,padding:`${i.spacing.xs} ${i.spacing.md}`,borderRadius:i.radii.default,minHeight:i.sizes.minElementHeight,margin:0,lineHeight:i.lineHeights.base,color:i.colors.primary,textDecoration:"none",width:r?t:"auto",userSelect:"none","&:visited":{color:i.colors.primary},"&:focus":{outline:"none"},"&:focus-visible":{boxShadow:`0 0 0 0.2rem ${(0,s.DZ)(i.colors.primary,.5)}`},"&:hover":{textDecoration:"none"},"&:active":{textDecoration:"none"},...d(e,i)}}),""),c=(0,a.Z)(n,{target:"e16zdaao1"})((o=>{let{theme:r}=o;return{backgroundColor:r.colors.primary,color:r.colors.white,border:`${r.sizes.borderWidth} solid ${r.colors.primary}`,"&:hover":{backgroundColor:(0,s._j)(r.colors.primary,.05),color:r.colors.white},"&:active":{backgroundColor:"transparent",color:r.colors.primary},"&:visited:not(:active)":{color:r.colors.white},"&[disabled], &[disabled]:hover, &[disabled]:active, &[disabled]:visited":{borderColor:r.colors.borderColor,backgroundColor:r.colors.transparent,color:r.colors.fadedText40,cursor:"not-allowed"}}}),""),u=(0,a.Z)(n,{target:"e16zdaao0"})((o=>{let{theme:r}=o;return{backgroundColor:r.colors.lightenedBg05,color:r.colors.bodyText,border:`${r.sizes.borderWidth} solid ${r.colors.borderColor}`,"&:visited":{color:r.colors.bodyText},"&:hover":{borderColor:r.colors.primary,color:r.colors.primary},"&:active":{color:r.colors.white,borderColor:r.colors.primary,backgroundColor:r.colors.primary},"&:focus:not(:active)":{borderColor:r.colors.primary,color:r.colors.primary},"&[disabled], &[disabled]:hover, &[disabled]:active":{borderColor:r.colors.borderColor,backgroundColor:r.colors.transparent,color:r.colors.fadedText40,cursor:"not-allowed"}}}),"");var b=e(40864);const p=function(o){let{kind:r,size:e,disabled:t,fluidWidth:l,children:a,autoFocus:s,href:d,rel:n,target:p,onClick:h}=o,g=c;return r===i.nW.SECONDARY&&(g=u),(0,b.jsx)(g,{kind:r,size:e||i.V5.MEDIUM,fluidWidth:l||!1,disabled:t||!1,autoFocus:s||!1,href:d,target:p,rel:n,onClick:h,tabIndex:t?-1:0,children:a})};const h=function(o){const{disabled:r,element:e,width:a}=o,s={width:a},d="primary"===e.type?i.nW.PRIMARY:i.nW.SECONDARY,n=!e.help||a;return(0,b.jsx)("div",{className:"stLinkButton","data-testid":"stLinkButton",style:s,children:(0,b.jsx)(t.t,{help:e.help,children:(0,b.jsx)(p,{kind:d,size:i.V5.SMALL,disabled:r,onClick:r=>{o.disabled&&r.preventDefault()},fluidWidth:!!e.useContainerWidth&&n,href:e.url,target:"_blank",rel:"noreferrer","aria-disabled":r,children:(0,b.jsx)(l.ZP,{source:e.label,allowHTML:!1,isLabel:!0,largerLabel:!0,disableLinks:!0})})})})}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[2634],{72634:(t,e,l)=>{l.r(e),l.d(e,{default:()=>i});var n=l(66845),s=l(40937),a=l(40864);const r=t=>s.Z.sanitize(t,{USE_PROFILES:{html:!0},FORCE_BODY:!0});function i(t){let{element:e,width:l}=t;const{body:s}=e,[i,u]=(0,n.useState)(r(s)),d=(0,n.useRef)(null);return(0,n.useEffect)((()=>{r(s)!==i&&u(r(s))}),[s]),(0,n.useEffect)((()=>{var t,e;0===(null===(t=d.current)||void 0===t?void 0:t.clientHeight)&&1===(null===(e=d.current.parentElement)||void 0===e?void 0:e.childElementCount)&&d.current.parentElement.classList.add("empty-html")})),(0,a.jsx)(a.Fragment,{children:i&&(0,a.jsx)("div",{className:"stHtml","data-testid":"stHtml",ref:d,style:{width:l},dangerouslySetInnerHTML:{__html:i}})})}}}]);
1
+ "use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[2634],{72634:(t,e,l)=>{l.r(e),l.d(e,{default:()=>i});var n=l(66845),s=l(40937),a=l(40864);const r=t=>s.Z.sanitize(t,{USE_PROFILES:{html:!0},FORCE_BODY:!0});function i(t){let{element:e,width:l}=t;const{body:s}=e,[i,u]=(0,n.useState)(r(s)),d=(0,n.useRef)(null);return(0,n.useEffect)((()=>{r(s)!==i&&u(r(s))}),[s]),(0,n.useEffect)((()=>{var t,e;0===(null===(t=d.current)||void 0===t?void 0:t.clientHeight)&&1===(null===(e=d.current.parentElement)||void 0===e?void 0:e.childElementCount)&&d.current.parentElement.classList.add("stHtml-empty")})),(0,a.jsx)(a.Fragment,{children:i&&(0,a.jsx)("div",{className:"stHtml","data-testid":"stHtml",ref:d,style:{width:l},dangerouslySetInnerHTML:{__html:i}})})}}}]);