streamlit-nightly 1.39.1.dev20241010__py2.py3-none-any.whl → 1.39.1.dev20241012__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.
- streamlit/static/asset-manifest.json +17 -18
- streamlit/static/index.html +1 -1
- streamlit/static/static/js/223.8bd97055.chunk.js +1 -0
- streamlit/static/static/js/3224.fb4ce2a4.chunk.js +1 -0
- streamlit/static/static/js/3560.50f03f0f.chunk.js +1 -0
- streamlit/static/static/js/4856.03868952.chunk.js +2 -0
- streamlit/static/static/js/5849.e92568db.chunk.js +1 -0
- streamlit/static/static/js/6073.192808c1.chunk.js +1 -0
- streamlit/static/static/js/6141.d2879825.chunk.js +1 -0
- streamlit/static/static/js/{6360.7f51dec0.chunk.js → 6360.172f2b06.chunk.js} +1 -1
- streamlit/static/static/js/8148.aed4a6f0.chunk.js +1 -0
- streamlit/static/static/js/8237.5de71f48.chunk.js +1 -0
- streamlit/static/static/js/{8460.3529d92b.chunk.js → 8460.40cba8ba.chunk.js} +1 -1
- streamlit/static/static/js/8815.92ce1b4a.chunk.js +1 -0
- streamlit/static/static/js/954.88014372.chunk.js +5 -0
- streamlit/static/static/js/9923.21b1d895.chunk.js +1 -0
- streamlit/static/static/js/9943.d54fcda3.chunk.js +1 -0
- streamlit/static/static/js/main.a74e5808.js +28 -0
- {streamlit_nightly-1.39.1.dev20241010.dist-info → streamlit_nightly-1.39.1.dev20241012.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.39.1.dev20241010.dist-info → streamlit_nightly-1.39.1.dev20241012.dist-info}/RECORD +26 -27
- streamlit/static/static/js/1780.3f47c955.chunk.js +0 -1
- streamlit/static/static/js/2133.68768c00.chunk.js +0 -1
- streamlit/static/static/js/223.7f001ddb.chunk.js +0 -1
- streamlit/static/static/js/238.8d3a7d25.chunk.js +0 -1
- streamlit/static/static/js/3560.e1f19895.chunk.js +0 -1
- streamlit/static/static/js/6141.43a8fda3.chunk.js +0 -1
- streamlit/static/static/js/7612.3f409b56.chunk.js +0 -2
- streamlit/static/static/js/8148.0afeecaa.chunk.js +0 -1
- streamlit/static/static/js/8237.b58252d4.chunk.js +0 -1
- streamlit/static/static/js/8776.4a234e13.chunk.js +0 -1
- streamlit/static/static/js/8815.edfbec45.chunk.js +0 -1
- streamlit/static/static/js/954.ce49a8cf.chunk.js +0 -5
- streamlit/static/static/js/9923.50362c7d.chunk.js +0 -1
- streamlit/static/static/js/9943.29cd4b6c.chunk.js +0 -1
- streamlit/static/static/js/main.d13622b4.js +0 -28
- /streamlit/static/static/js/{7612.3f409b56.chunk.js.LICENSE.txt → 4856.03868952.chunk.js.LICENSE.txt} +0 -0
- /streamlit/static/static/js/{main.d13622b4.js.LICENSE.txt → main.a74e5808.js.LICENSE.txt} +0 -0
- {streamlit_nightly-1.39.1.dev20241010.data → streamlit_nightly-1.39.1.dev20241012.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.39.1.dev20241010.dist-info → streamlit_nightly-1.39.1.dev20241012.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.39.1.dev20241010.dist-info → streamlit_nightly-1.39.1.dev20241012.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.39.1.dev20241010.dist-info → streamlit_nightly-1.39.1.dev20241012.dist-info}/top_level.txt +0 -0
@@ -1,35 +1,35 @@
|
|
1
1
|
{
|
2
2
|
"files": {
|
3
3
|
"main.css": "./static/css/main.5513bd04.css",
|
4
|
-
"main.js": "./static/js/main.
|
4
|
+
"main.js": "./static/js/main.a74e5808.js",
|
5
5
|
"static/js/6679.265ca09c.chunk.js": "./static/js/6679.265ca09c.chunk.js",
|
6
6
|
"static/js/9464.7e9a3c0a.chunk.js": "./static/js/9464.7e9a3c0a.chunk.js",
|
7
7
|
"static/js/9077.721329d6.chunk.js": "./static/js/9077.721329d6.chunk.js",
|
8
8
|
"static/js/3391.7aba08a0.chunk.js": "./static/js/3391.7aba08a0.chunk.js",
|
9
9
|
"static/css/9943.d452238e.chunk.css": "./static/css/9943.d452238e.chunk.css",
|
10
|
-
"static/js/9943.
|
11
|
-
"static/js/8460.
|
10
|
+
"static/js/9943.d54fcda3.chunk.js": "./static/js/9943.d54fcda3.chunk.js",
|
11
|
+
"static/js/8460.40cba8ba.chunk.js": "./static/js/8460.40cba8ba.chunk.js",
|
12
12
|
"static/js/3861.5aea56b8.chunk.js": "./static/js/3861.5aea56b8.chunk.js",
|
13
13
|
"static/js/8642.58110d15.chunk.js": "./static/js/8642.58110d15.chunk.js",
|
14
|
-
"static/js/223.
|
15
|
-
"static/js/8148.
|
14
|
+
"static/js/223.8bd97055.chunk.js": "./static/js/223.8bd97055.chunk.js",
|
15
|
+
"static/js/8148.aed4a6f0.chunk.js": "./static/js/8148.aed4a6f0.chunk.js",
|
16
16
|
"static/js/84.414fa87b.chunk.js": "./static/js/84.414fa87b.chunk.js",
|
17
|
-
"static/js/9923.
|
17
|
+
"static/js/9923.21b1d895.chunk.js": "./static/js/9923.21b1d895.chunk.js",
|
18
18
|
"static/js/583.61ac7fde.chunk.js": "./static/js/583.61ac7fde.chunk.js",
|
19
19
|
"static/js/4827.70332470.chunk.js": "./static/js/4827.70332470.chunk.js",
|
20
|
-
"static/js/8237.
|
20
|
+
"static/js/8237.5de71f48.chunk.js": "./static/js/8237.5de71f48.chunk.js",
|
21
21
|
"static/js/5828.f8572ba4.chunk.js": "./static/js/5828.f8572ba4.chunk.js",
|
22
|
-
"static/js/
|
22
|
+
"static/js/3224.fb4ce2a4.chunk.js": "./static/js/3224.fb4ce2a4.chunk.js",
|
23
23
|
"static/js/9060.1ec8dc2b.chunk.js": "./static/js/9060.1ec8dc2b.chunk.js",
|
24
24
|
"static/js/5625.c56e64cd.chunk.js": "./static/js/5625.c56e64cd.chunk.js",
|
25
|
-
"static/js/6141.
|
25
|
+
"static/js/6141.d2879825.chunk.js": "./static/js/6141.d2879825.chunk.js",
|
26
26
|
"static/js/4103.a5610a9d.chunk.js": "./static/js/4103.a5610a9d.chunk.js",
|
27
27
|
"static/js/1086.fba3f8f8.chunk.js": "./static/js/1086.fba3f8f8.chunk.js",
|
28
28
|
"static/js/245.1eea9c21.chunk.js": "./static/js/245.1eea9c21.chunk.js",
|
29
29
|
"static/js/7193.629fc6fe.chunk.js": "./static/js/7193.629fc6fe.chunk.js",
|
30
|
-
"static/js/6360.
|
30
|
+
"static/js/6360.172f2b06.chunk.js": "./static/js/6360.172f2b06.chunk.js",
|
31
31
|
"static/js/8790.0b98f286.chunk.js": "./static/js/8790.0b98f286.chunk.js",
|
32
|
-
"static/js/8815.
|
32
|
+
"static/js/8815.92ce1b4a.chunk.js": "./static/js/8815.92ce1b4a.chunk.js",
|
33
33
|
"static/js/9528.746f7a0e.chunk.js": "./static/js/9528.746f7a0e.chunk.js",
|
34
34
|
"static/js/7809.304e2c99.chunk.js": "./static/js/7809.304e2c99.chunk.js",
|
35
35
|
"static/js/6088.125b23a1.chunk.js": "./static/js/6088.125b23a1.chunk.js",
|
@@ -38,8 +38,8 @@
|
|
38
38
|
"static/js/5281.5e3aa7c6.chunk.js": "./static/js/5281.5e3aa7c6.chunk.js",
|
39
39
|
"static/js/5618.2d933cb5.chunk.js": "./static/js/5618.2d933cb5.chunk.js",
|
40
40
|
"static/js/1260.dc193a5e.chunk.js": "./static/js/1260.dc193a5e.chunk.js",
|
41
|
-
"static/js/3560.
|
42
|
-
"static/js/954.
|
41
|
+
"static/js/3560.50f03f0f.chunk.js": "./static/js/3560.50f03f0f.chunk.js",
|
42
|
+
"static/js/954.88014372.chunk.js": "./static/js/954.88014372.chunk.js",
|
43
43
|
"static/js/3966.e0686958.chunk.js": "./static/js/3966.e0686958.chunk.js",
|
44
44
|
"static/js/8161.9b75f98a.chunk.js": "./static/js/8161.9b75f98a.chunk.js",
|
45
45
|
"static/js/6817.6adfea98.chunk.js": "./static/js/6817.6adfea98.chunk.js",
|
@@ -49,21 +49,20 @@
|
|
49
49
|
"static/js/8648.92079acf.chunk.js": "./static/js/8648.92079acf.chunk.js",
|
50
50
|
"static/js/766.e3700e32.chunk.js": "./static/js/766.e3700e32.chunk.js",
|
51
51
|
"static/js/783.788bb3ab.chunk.js": "./static/js/783.788bb3ab.chunk.js",
|
52
|
-
"static/js/
|
52
|
+
"static/js/5849.e92568db.chunk.js": "./static/js/5849.e92568db.chunk.js",
|
53
53
|
"static/css/4096.8b8f33d6.chunk.css": "./static/css/4096.8b8f33d6.chunk.css",
|
54
54
|
"static/js/4096.178414b7.chunk.js": "./static/js/4096.178414b7.chunk.js",
|
55
|
-
"static/js/
|
55
|
+
"static/js/4856.03868952.chunk.js": "./static/js/4856.03868952.chunk.js",
|
56
56
|
"static/js/3389.71902a75.chunk.js": "./static/js/3389.71902a75.chunk.js",
|
57
57
|
"static/js/4297.3afbdd03.chunk.js": "./static/js/4297.3afbdd03.chunk.js",
|
58
58
|
"static/js/4942.e4db7877.chunk.js": "./static/js/4942.e4db7877.chunk.js",
|
59
|
-
"static/js/
|
59
|
+
"static/js/6073.192808c1.chunk.js": "./static/js/6073.192808c1.chunk.js",
|
60
60
|
"static/js/2627.2462a014.chunk.js": "./static/js/2627.2462a014.chunk.js",
|
61
61
|
"static/js/5764.5a55e5be.chunk.js": "./static/js/5764.5a55e5be.chunk.js",
|
62
62
|
"static/js/797.36f1bf7d.chunk.js": "./static/js/797.36f1bf7d.chunk.js",
|
63
63
|
"static/js/6198.956025ac.chunk.js": "./static/js/6198.956025ac.chunk.js",
|
64
64
|
"static/js/1674.86aea8e0.chunk.js": "./static/js/1674.86aea8e0.chunk.js",
|
65
65
|
"static/js/7591.b3928443.chunk.js": "./static/js/7591.b3928443.chunk.js",
|
66
|
-
"static/js/238.8d3a7d25.chunk.js": "./static/js/238.8d3a7d25.chunk.js",
|
67
66
|
"static/media/MaterialSymbols-Rounded.woff2": "./static/media/MaterialSymbols-Rounded.ec07649f7a20048d5730.woff2",
|
68
67
|
"static/media/fireworks.gif": "./static/media/fireworks.0906f02ea43f1018a6d2.gif",
|
69
68
|
"static/media/flake-2.png": "./static/media/flake-2.e3f07d06933dd0e84c24.png",
|
@@ -154,6 +153,6 @@
|
|
154
153
|
},
|
155
154
|
"entrypoints": [
|
156
155
|
"static/css/main.5513bd04.css",
|
157
|
-
"static/js/main.
|
156
|
+
"static/js/main.a74e5808.js"
|
158
157
|
]
|
159
158
|
}
|
streamlit/static/index.html
CHANGED
@@ -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.
|
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.a74e5808.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>
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[223],{40223:(e,t,o)=>{o.r(t),o.d(t,{default:()=>Se});var i=o(58878),n=o(86411),r=o(83614),l=o(34679),s=o(93594),a=o(78477),c=o(8151),d=o(68994),h=o(58144),u=o(29669);var g=o(85850),m=o(59323),p=o(4494),f=o(53124),b=o.n(f),v=o(32782),x=o(67253),y=o(1780),C=o(84152),w=o(6240),S=o(90782);const j=e=>{let{error:t,width:o,deltaType:i}=e;return t instanceof k?(0,S.jsx)(w.A,{width:o,name:"No Mapbox token provided",message:(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)("p",{children:["To use ",(0,S.jsxs)("code",{children:["st.",i]})," or ",(0,S.jsx)("code",{children:"st.map"})," you need to set up a Mapbox access token."]}),(0,S.jsxs)("p",{children:["To get a token, create an account at"," ",(0,S.jsx)("a",{href:"https://mapbox.com",children:"https://mapbox.com"}),". It's free for moderate usage levels!"]}),(0,S.jsxs)("p",{children:["Once you have a token, just set it using the Streamlit config option ",(0,S.jsx)("code",{children:"mapbox.token"})," and don't forget to restart your Streamlit server at this point if it's still running, then reload this tab."]}),(0,S.jsxs)("p",{children:["See"," ",(0,S.jsx)("a",{href:"https://docs.streamlit.io/develop/api-reference/configuration/config.toml",children:"our documentation"})," ","for more info on how to set config options."]})]})}):t instanceof F?(0,S.jsx)(w.A,{width:o,name:"Error fetching Streamlit Mapbox token",message:(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)("p",{children:"This app requires an internet connection."}),(0,S.jsx)("p",{children:"Please check your connection and try again."}),(0,S.jsxs)("p",{children:["If you think this is a bug, please file bug report"," ",(0,S.jsx)("a",{href:"https://github.com/streamlit/streamlit/issues/new/choose",children:"here"}),"."]})]})}):(0,S.jsx)(w.A,{width:o,name:"Error fetching Streamlit Mapbox token",message:t.message})};class k extends Error{}class F extends Error{}const A="https://data.streamlit.io/tokens.json",M="mapbox",T=e=>t=>{class o extends i.PureComponent{constructor(o){super(o),this.context=void 0,this.initMapboxToken=async()=>{try{const e=await v.A.get(A),{[M]:t}=e.data;if(!t)throw new Error(`Missing token ${M}`);this.setState({mapboxToken:t,isFetching:!1})}catch(e){const t=(0,x.$)(e);throw this.setState({mapboxTokenError:t,isFetching:!1}),new F(`${t.message} (${A})`)}},this.render=()=>{const{mapboxToken:o,mapboxTokenError:i,isFetching:n}=this.state,{width:r}=this.props;return i?(0,S.jsx)(j,{width:r,error:i,deltaType:e}):n?(0,S.jsx)(y.E,{element:u.EA.create({style:u.EA.SkeletonStyle.ELEMENT})}):(0,S.jsx)(t,{...this.props,mapboxToken:o,width:r})},this.state={isFetching:!0,mapboxToken:void 0,mapboxTokenError:void 0}}componentDidMount(){const e=this.props.element.mapboxToken||this.context.libConfig.mapboxToken;e?this.setState({mapboxToken:e,isFetching:!1}):this.initMapboxToken()}}return o.displayName=`withMapboxToken(${t.displayName||t.name})`,o.contextType=C.n,b()(o,t)};var E=o(89653);const I=(0,E.A)("div",{target:"e1az0zs51"})((e=>{let{width:t,height:o}=e;return{position:"relative",height:o,width:t}}),""),N=(0,E.A)("div",{target:"e1az0zs50"})((e=>{let{theme:t}=e;return{position:"absolute",right:"2.625rem",top:t.spacing.md,zIndex:t.zIndices.priority,".mapboxgl-ctrl.mapboxgl-ctrl-group":{overflow:"hidden",background:t.colors.bgColor},"button:not(:disabled)":{background:t.colors.bgColor,"& + button":{borderTopColor:t.colors.secondaryBg},"&.mapboxgl-ctrl-icon:hover":{backgroundColor:t.colors.darkenedBgMix25},"& span":{filter:(0,h.iq)(t)?"":"invert(100%)"}}}}),"");var O=o(21640),L=o(71034),$=o.n(L),W=o(32735);var z=o(3101),V=o(71279),_=o(95237),D=o(19507),B=o(89428),P=o(28246),U=o(54340),J=o(66643);const X={classes:{...P,...o(43539),...J,...o(41260),...V.bE},functions:{colorBins:_.A,colorCategories:D.A,colorContinuous:B.A}},q=new U.A({configuration:X});var G=o(39017),K=o(86044),R=o(94514),Z=o(10623),H=o(55296),Q=o(97091),Y=o(25479),ee=o(16249),te=o(46909),oe=o(56605),ie=o(48754),ne=o(16389),re=o(57741),le=o(82111),se=o(40973),ae=o(34632),ce=o(34895),de=o(77277),he=o(39481),ue=o(47605);const ge={[ne.A.layerName]:["getFillColor"],[re.A.layerName]:["getFillColor"],[le.A.layerName]:["getFillColor"],[se.A.layerName]:["getFillColor"],[ae.A.layerName]:["getFillColor"],[ce.A.layerName]:["getFillColor"],[de.A.layerName]:["getColor"],[G.A.layerName]:["getTargetColor","getSourceColor"],[K.A.layerName]:["getFillColor"],[R.A.layerName]:["getFillColor"],[Z.A.layerName]:["getColor"],[H.A.layerName]:["getColor"],[Q.A.layerName]:["getColor"],[Y.A.layerName]:["getColor"],[ee.A.layerName]:["getFillColor"],[te.A.layerName]:["getFillColor","getColor","getLineColor"],[oe.A.layerName]:["getFillColor"],[ie.A.layerName]:["getColor"],[he.A.layerName]:["getColor"],[ue.A.layerName]:["getColor"]},me=e=>{let{isSelected:t,object:o,objectInfo:i,opacity:n,originalFillFunction:r}=e;const l=(e=>{let{object:t,objectInfo:o,originalFillFunction:i}=e;const n="function"===typeof i?i(t,o):i;if(Array.isArray(n))return[n[0]||0,n[1]||0,n[2]||0,n[3]||255];if("string"===typeof n&&n.startsWith("@@=")){const e=q.convert({originalColor:n}).originalColor(t);return[e[0]||0,e[1]||0,e[2]||0,e[3]||255]}return null})({object:o,objectInfo:i,originalFillFunction:r});if(!l)return null;let s=0;return s=t?Math.max("number"===typeof l[3]?l[3]:n,n):Math.min("number"===typeof l[3]?l[3]:n,n),[l[0]||0,l[1]||0,l[2]||0,s]},pe={selection:{indices:{},objects:{}}},fe=(e,t)=>{const o=t.match(/{(.*?)}/g);return o&&o.forEach((o=>{const i=o.substring(1,o.length-1);e.object.hasOwnProperty(i)?t=t.replace(o,e.object[i]):e.object.hasOwnProperty("properties")&&e.object.properties.hasOwnProperty(i)&&(t=t.replace(o,e.object.properties[i]))})),t};function be(e,t){if(!t.id)return pe;const o=e.getElementState(t.id,"selection");return null!==o&&void 0!==o?o:pe}function ve(e,t){if(!t.id)return pe;const o=e.getStringValue(t),i=o?O.A.parse(o):null;return null!==i&&void 0!==i?i:pe}function xe(e,t,o,i){e.id&&t.setStringValue(e,JSON.stringify(o.value),{fromUi:o.fromUi},i)}const ye=e=>{var t;const{height:o,width:n,expanded:r}=(0,m.i)(p.T),{element:l,fragmentId:s,isLightTheme:a,theme:c,widgetMgr:d}=e,{selectionMode:h,tooltip:u,useContainerWidth:g}=l,f=null!==r&&void 0!==r&&r,[b,v]=(0,z._)({element:l,getDefaultState:be,getStateFromWidgetMgr:ve,updateWidgetMgrState:xe,widgetMgr:d,fragmentId:s}),[x,y]=(0,i.useState)({bearing:0,pitch:0,zoom:11}),{height:C,width:w}=(e=>{let{container:t,element:o,heightFallback:n="auto",isFullScreen:r,shouldUseContainerWidth:l,widthFallback:s="auto"}=e;return{width:(0,i.useMemo)((()=>l||r?"100%":o.width||t.width||s),[t.width,o.width,r,l,s]),height:(0,i.useMemo)((()=>r&&t.height?t.height:o.height||t.height||n),[r,o.height,t.height,n])}})({element:l,isFullScreen:f,shouldUseContainerWidth:g,container:{height:o,width:n},heightFallback:(null===(t=x.initialViewState)||void 0===t?void 0:t.height)||500}),[S,j]=(0,i.useState)({}),k=h[0],F=void 0!==k,A=F&&Object.keys(b.selection.indices).length>0,M=(0,i.useMemo)((()=>Object.freeze(O.A.parse(l.json))),[f,a,l.json]),T=(0,i.useMemo)((()=>{const e={...M};if(e.mapStyle||(e.mapStyle=`mapbox://styles/mapbox/${a?"light":"dark"}-v9`),e.layers){const t=Object.values(b.selection.indices).some((e=>null===e||void 0===e?void 0:e.length)),o=e.layers.some((e=>Object.hasOwn(e,"pickable")));e.layers=e.layers.map((e=>{var i,n;if(!e||Array.isArray(e)||!F)return e;o||(e.pickable=!0);const r=`${e.id||null}`,l=(null===b||void 0===b||null===(i=b.selection)||void 0===i||null===(n=i.indices)||void 0===n?void 0:n[r])||[],s=ge[e["@@type"]];if(!s)return e;const a={...e};return s.forEach((o=>{var i;a.updateTriggers={[o]:[...(null===(i=a.updateTriggers)||void 0===i?void 0:i[o])||[],l,t]};const n=!t,r=e[o];if(n||!r)return a;const s=Math.floor(102),d=(0,W.Du)(c.colors.primary),h=[d[0],d[1],d[2],255],u=(0,W.Du)(c.colors.gray20),g=[u[0],u[1],u[2],s];a[o]=(e,t)=>(e=>{let{isSelected:t,object:o,objectInfo:i,originalFillFunction:n,selectedColor:r,selectedOpacity:l=255,unselectedColor:s,unselectedOpacity:a=Math.floor(102)}=e;return t?me({opacity:l,isSelected:!0,object:o,objectInfo:i,originalFillFunction:n})||r:me({opacity:a,isSelected:!1,object:o,objectInfo:i,originalFillFunction:n})||s})({isSelected:l.includes(t.index),object:e,objectInfo:t,originalFillFunction:r,selectedColor:h,unselectedColor:g,selectedOpacity:255,unselectedOpacity:s})})),a}))}return null===e||void 0===e||delete e.views,q.convert(e)}),[b.selection.indices,a,F,M,c.colors.gray20,c.colors.primary]);(0,i.useEffect)((()=>{if(!$()(T.initialViewState,S)){const e=Object.keys(T.initialViewState).reduce(((e,t)=>T.initialViewState[t]===S[t]?e:{...e,[t]:T.initialViewState[t]}),{});y({...x,...e}),j(T.initialViewState)}}),[T.initialViewState,S,x]);const E=(0,i.useCallback)((e=>{if(!e||!e.object||!u)return null;const t=O.A.parse(u);return t.html?t.html=fe(e,t.html):t.text=fe(e,t.text),t}),[u]),I=(0,i.useCallback)((e=>{let{viewState:t}=e;y(t)}),[y]);return{createTooltip:E,data:b,deck:T,hasActiveSelection:A,height:C,isSelectionModeActivated:F,onViewStateChange:I,selectionMode:k,setSelection:v,viewState:x,width:w}};o(93298);(0,a.mk)([l.y,s.B]);const Ce=pe.selection,we=[],Se=T("st.pydeck_chart")((e=>{const{disabled:t,disableFullscreenMode:o,element:l,fragmentId:s,mapboxToken:a,widgetMgr:f}=e,{mapboxToken:b}=l,v=(0,c.u)(),{expanded:x,expand:y,collapse:C}=(0,m.i)(p.T),{createTooltip:w,data:j,deck:k,hasActiveSelection:F,height:A,isSelectionModeActivated:M,onViewStateChange:T,selectionMode:E,setSelection:O,viewState:L,width:$}=ye({element:l,fragmentId:s,isLightTheme:(0,h.iq)(v),theme:v,widgetMgr:f}),[W,z]=(0,i.useState)(!1);(0,i.useEffect)((()=>{z(!0)}),[]);const V=(0,i.useCallback)((e=>{var t;if(void 0===E)return;const{index:o,object:i}=e,n=`${(null===(t=e.layer)||void 0===t?void 0:t.id)||null}`,r=j,l=-1===o,s=(()=>{if(l)return Ce;switch(E){case u.Xw.SelectionMode.SINGLE_OBJECT:var e;return(null===(e=r.selection.indices[n])||void 0===e?void 0:e[0])===o?Ce:{indices:{[`${n}`]:[o]},objects:{[`${n}`]:[i]}};case u.Xw.SelectionMode.MULTI_OBJECT:{const e=new Map(((null===r||void 0===r||null===(t=r.selection)||void 0===t||null===(s=t.indices)||void 0===s?void 0:s[n])||[]).map(((e,t)=>{var o,i,l;return[e,null===(o=r.selection)||void 0===o||null===(i=o.objects)||void 0===i||null===(l=i[n])||void 0===l?void 0:l[t]]})));if(e.has(o)?e.delete(o):e.set(o,i),0===e.size){const{[n]:e,...t}=r.selection.indices,{[n]:o,...i}=r.selection.objects;return{indices:t,objects:i}}return{indices:{...r.selection.indices,[`${n}`]:Array.from(e.keys())},objects:{...r.selection.objects,[`${n}`]:Array.from(e.values())}}}default:throw(e=>{throw new Error(`Reached a branch with non-exhaustive item: ${e}`)})(E),new Error("Invalid selection mode")}var t,s})();JSON.stringify(s)!==JSON.stringify(r.selection)&&O({fromUi:!0,value:{selection:s}})}),[E,j,O]),_=(0,i.useCallback)((()=>{O({value:{selection:Ce},fromUi:!0})}),[O]);return(0,S.jsxs)(I,{className:"stDeckGlJsonChart","data-testid":"stDeckGlJsonChart",width:$,height:A,children:[(0,S.jsx)(g.A,{isFullScreen:x,disableFullscreenMode:o,onExpand:y,onCollapse:C,target:I,locked:!(!F||t)||void 0,children:F&&!t&&(0,S.jsx)(g.K,{label:"Clear selection",onClick:_,icon:d.b})}),(0,S.jsxs)(n.A,{viewState:L,onViewStateChange:T,height:A,width:$,layers:W?k.layers:we,getTooltip:w,ContextProvider:r.wZ.Provider,controller:!0,onClick:M&&!t?V:void 0,children:[(0,S.jsx)(r.b,{height:A,width:$,mapStyle:k.mapStyle&&("string"===typeof k.mapStyle?k.mapStyle:k.mapStyle[0]),mapboxApiAccessToken:b||a}),(0,S.jsx)(N,{children:(0,S.jsx)(r.ov,{"data-testid":"stDeckGlJsonChartZoomButton",showCompass:!1})})]})]})}))},85850:(e,t,o)=>{o.d(t,{K:()=>b,A:()=>v});o(58878);var i=o(8151),n=o(12274),r=o(63186),l=o(34914),s=o(997),a=o(36459),c=o(84720),d=o(64611),h=o(89653),u=o(58144);const g="-2.4rem",m=(0,h.A)("div",{target:"e2wxzia1"})((e=>{let{theme:t,locked:o,target:i}=e;return{padding:`${t.spacing.sm} 0 ${t.spacing.sm} ${t.spacing.sm}`,position:"absolute",top:o?g:"-1rem",right:t.spacing.none,transition:"none",...!o&&{opacity:0,"&:active, &:focus-visible, &:hover":{transition:"opacity 150ms 100ms, top 100ms 100ms",opacity:1,top:g},...i&&{[`${i}:hover &, ${i}:active &, ${i}:focus-visible &`]:{transition:"opacity 150ms 100ms, top 100ms 100ms",opacity:1,top:g}}}}}),""),p=(0,h.A)("div",{target:"e2wxzia0"})((e=>{let{theme:t}=e;return{color:(0,u.iq)(t)?t.colors.fadedText60:t.colors.bodyText,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-end",boxShadow:"1px 2px 8px rgba(0, 0, 0, 0.08)",borderRadius:t.radii.default,backgroundColor:t.colors.lightenedBg05,width:"fit-content",zIndex:t.zIndices.sidebar+1}}),"");var f=o(90782);function b(e){let{label:t,show_label:o,icon:n,onClick:r}=e;const h=(0,i.u)(),u=o?t:"";return(0,f.jsx)("div",{"data-testid":"stElementToolbarButton",children:(0,f.jsx)(s.A,{content:(0,f.jsx)(l.Ay,{source:t,allowHTML:!1,style:{fontSize:h.fontSizes.sm}}),placement:s.W.TOP,onMouseEnterDelay:1e3,inline:!0,children:(0,f.jsxs)(a.Ay,{onClick:e=>{r&&r(),e.stopPropagation()},kind:c.KX.ELEMENT_TOOLBAR,"aria-label":t,children:[n&&(0,f.jsx)(d.A,{content:n,size:"md",testid:"stElementToolbarButtonIcon"}),u&&(0,f.jsx)("span",{children:u})]})})})}const v=e=>{let{onExpand:t,onCollapse:o,isFullScreen:i,locked:l,children:s,target:a,disableFullscreenMode:c}=e;return(0,f.jsx)(m,{className:"stElementToolbar","data-testid":"stElementToolbar",locked:l||i,target:a,children:(0,f.jsxs)(p,{children:[s,t&&!c&&!i&&(0,f.jsx)(b,{label:"Fullscreen",icon:n.g,onClick:()=>t()}),o&&!c&&i&&(0,f.jsx)(b,{label:"Close fullscreen",icon:r.Q,onClick:()=>o()})]})})}},34752:(e,t,o)=>{o.d(t,{X:()=>l,o:()=>r});var i=o(58878),n=o(25571);class r{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(e,t,o){(0,n.se)(this.formClearListener)&&this.lastWidgetMgr===e&&this.lastFormId===t||(this.disconnect(),(0,n._L)(t)&&(this.formClearListener=e.addFormClearedListener(t,o),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}}function l(e){let{element:t,widgetMgr:o,onFormCleared:r}=e;(0,i.useEffect)((()=>{if(!(0,n._L)(t.formId))return;const e=o.addFormClearedListener(t.formId,r);return()=>{e.disconnect()}}),[t,o,r])}},3101:(e,t,o)=>{o.d(t,{_:()=>l,t:()=>s});var i=o(58878),n=o(34752),r=o(25571);function l(e){let{getStateFromWidgetMgr:t,getDefaultState:o,updateWidgetMgrState:l,element:s,widgetMgr:a,fragmentId:c,onFormCleared:d}=e;const[h,u]=(0,i.useState)((()=>{var e;return null!==(e=t(a,s))&&void 0!==e?e:o(a,s)})),[g,m]=(0,i.useState)({value:h,fromUi:!1});(0,i.useEffect)((()=>{(0,r.hX)(g)||(m(null),u(g.value),l(s,a,g,c))}),[g,l,s,a,c]);const p=(0,i.useCallback)((()=>{m({value:o(a,s),fromUi:!0}),null===d||void 0===d||d()}),[m,s,o,a,d]);return(0,n.X)({widgetMgr:a,element:s,onFormCleared:p}),[h,m]}function s(e){let{getStateFromWidgetMgr:t,getDefaultStateFromProto:o,getCurrStateFromProto:n,updateWidgetMgrState:r,element:s,widgetMgr:a,fragmentId:c,onFormCleared:d}=e;const h=(0,i.useCallback)(((e,t)=>o(t)),[o]),[u,g]=l({getStateFromWidgetMgr:t,getDefaultState:h,updateWidgetMgrState:r,element:s,widgetMgr:a,fragmentId:c,onFormCleared:d});return(0,i.useEffect)((()=>{s.setValue&&(s.setValue=!1,g({value:n(s),fromUi:!1}))}),[s,n,g]),[u,g]}}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[3224],{85850:(e,t,n)=>{n.d(t,{K:()=>b,A:()=>y});n(58878);var r=n(8151),i=n(12274),o=n(63186),a=n(34914),l=n(997),s=n(36459),d=n(84720),c=n(64611),u=n(89653),g=n(58144);const p="-2.4rem",f=(0,u.A)("div",{target:"e2wxzia1"})((e=>{let{theme:t,locked:n,target:r}=e;return{padding:`${t.spacing.sm} 0 ${t.spacing.sm} ${t.spacing.sm}`,position:"absolute",top:n?p:"-1rem",right:t.spacing.none,transition:"none",...!n&&{opacity:0,"&:active, &:focus-visible, &:hover":{transition:"opacity 150ms 100ms, top 100ms 100ms",opacity:1,top:p},...r&&{[`${r}:hover &, ${r}:active &, ${r}:focus-visible &`]:{transition:"opacity 150ms 100ms, top 100ms 100ms",opacity:1,top:p}}}}}),""),h=(0,u.A)("div",{target:"e2wxzia0"})((e=>{let{theme:t}=e;return{color:(0,g.iq)(t)?t.colors.fadedText60:t.colors.bodyText,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-end",boxShadow:"1px 2px 8px rgba(0, 0, 0, 0.08)",borderRadius:t.radii.default,backgroundColor:t.colors.lightenedBg05,width:"fit-content",zIndex:t.zIndices.sidebar+1}}),"");var m=n(90782);function b(e){let{label:t,show_label:n,icon:i,onClick:o}=e;const u=(0,r.u)(),g=n?t:"";return(0,m.jsx)("div",{"data-testid":"stElementToolbarButton",children:(0,m.jsx)(l.A,{content:(0,m.jsx)(a.Ay,{source:t,allowHTML:!1,style:{fontSize:u.fontSizes.sm}}),placement:l.W.TOP,onMouseEnterDelay:1e3,inline:!0,children:(0,m.jsxs)(s.Ay,{onClick:e=>{o&&o(),e.stopPropagation()},kind:d.KX.ELEMENT_TOOLBAR,"aria-label":t,children:[i&&(0,m.jsx)(c.A,{content:i,size:"md",testid:"stElementToolbarButtonIcon"}),g&&(0,m.jsx)("span",{children:g})]})})})}const y=e=>{let{onExpand:t,onCollapse:n,isFullScreen:r,locked:a,children:l,target:s,disableFullscreenMode:d}=e;return(0,m.jsx)(f,{className:"stElementToolbar","data-testid":"stElementToolbar",locked:a||r,target:s,children:(0,m.jsxs)(h,{children:[l,t&&!d&&!r&&(0,m.jsx)(b,{label:"Fullscreen",icon:i.g,onClick:()=>t()}),n&&!d&&r&&(0,m.jsx)(b,{label:"Close fullscreen",icon:o.Q,onClick:()=>n()})]})})}},53224:(e,t,n)=>{n.r(t),n.d(t,{default:()=>be});var r=n(58878),i=n(8151),o=n(19613),a=n(56146),l=n(50248),s=n(95241),d=n(71034),c=n.n(d),u=n(34752),g=n(85850),p=n(25571),f=n(58144),h=n(50609),m=n.n(h),b=n(29669),y=n(67253);var v=n(93480),x=n(997),w=n(70474),C=n(35526);const j=e=>{var t;let{widgetMgr:n,id:i,formId:o,key:a,defaultValue:l}=e;(0,r.useEffect)((()=>{const e=n.getElementState(i,a);(0,p.hX)(e)&&(0,p.se)(l)&&n.setElementState(i,a,l)}),[n,i,a,l]);const[s,d]=(0,r.useState)(null!==(t=n.getElementState(i,a))&&void 0!==t?t:l),c=(0,r.useCallback)((e=>{n.setElementState(i,a,e),d(e)}),[n,i,a]),g=(0,r.useMemo)((()=>({formId:o||""})),[o]),f=(0,r.useCallback)((()=>c(l)),[l,c]);return(0,u.X)({element:g,widgetMgr:n,onFormCleared:f}),[s,c]};var k=n(84152),A=n(55562);const I=(e,t)=>{const{libConfig:{enforceDownloadInNewTab:n=!1}}=r.useContext(k.n);return(0,r.useCallback)((()=>{if(!e)return;const r=(0,A.A)({enforceDownloadInNewTab:n,url:e,filename:t});r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r)}),[e,n,t])};var S=n(89653),U=n(37888);const R=(0,S.A)("div",{target:"e12wn80j15"})(""),E=(0,S.A)("div",{target:"e12wn80j14"})((e=>{let{theme:t}=e;return{height:t.sizes.largestElementHeight,width:"100%",background:t.genericColors.secondaryBg,borderRadius:t.radii.default,marginBottom:t.spacing.twoXS,display:"flex",alignItems:"center",position:"relative",paddingLeft:t.spacing.xs,paddingRight:t.spacing.sm}}),""),L=(0,S.A)("div",{target:"e12wn80j13"})({name:"82a6rk",styles:"flex:1"}),T=(0,S.A)("div",{target:"e12wn80j12"})((e=>{let{show:t}=e;return{display:t?"block":"none"}}),""),F=(0,S.A)("span",{target:"e12wn80j11"})((e=>{let{theme:t,isPlayingOrRecording:n}=e;return{margin:t.spacing.sm,fontFamily:t.fonts.monospace,color:n?t.genericColors.bodyText:t.colors.fadedText60,backgroundColor:t.genericColors.secondaryBg,fontSize:t.fontSizes.sm}}),""),M=(0,S.A)("div",{target:"e12wn80j10"})({name:"1kyw74z",styles:"width:100%;text-align:center;overflow:hidden"}),P=(0,S.A)("span",{target:"e12wn80j9"})((e=>{let{theme:t}=e;return{color:t.colors.bodyText}}),""),z=(0,S.A)("a",{target:"e12wn80j8"})(""),W=(0,S.A)("div",{target:"e12wn80j7"})((e=>{let{theme:t}=e;return{height:t.sizes.largestElementHeight,display:"flex",justifyContent:"center",alignItems:"center"}}),""),B=(0,S.A)("div",{target:"e12wn80j6"})((e=>{let{theme:t}=e;return{height:10,opacity:.2,width:"100%",backgroundImage:`radial-gradient(${t.colors.fadedText10} 40%, transparent 40%)`,backgroundSize:"10px 10px",backgroundRepeat:"repeat"}}),""),X=(0,S.A)("span",{target:"e12wn80j5"})((e=>{let{theme:t}=e;return{"& > button":{color:t.colors.primary,padding:t.spacing.threeXS},"& > button:hover, & > button:focus":{color:t.colors.red}}}),""),O=(0,S.A)("span",{target:"e12wn80j4"})((e=>{let{theme:t}=e;return{"& > button":{padding:t.spacing.threeXS,color:t.colors.fadedText40},"& > button:hover, & > button:focus":{color:t.colors.primary}}}),""),D=(0,S.A)("span",{target:"e12wn80j3"})((e=>{let{theme:t}=e;return{"& > button":{padding:t.spacing.threeXS,color:t.colors.fadedText60},"& > button:hover, & > button:focus":{color:t.colors.bodyText}}}),""),V=(0,S.A)("div",{target:"e12wn80j2"})((e=>{let{theme:t}=e;return{display:"flex",justifyContent:"center",alignItems:"center",flexGrow:0,flexShrink:1,padding:t.spacing.xs,gap:t.spacing.twoXS,marginRight:t.spacing.twoXS}}),""),_=(0,S.A)("div",{target:"e12wn80j1"})((e=>{let{theme:t}=e;return{marginLeft:t.spacing.sm}}),""),N=(0,S.A)(U.x,{target:"e12wn80j0"})((e=>{let{theme:t}=e;return{fontSize:t.fontSizes.sm,width:t.sizes.spinnerSize,height:t.sizes.spinnerSize,borderWidth:t.sizes.spinnerThickness,radius:t.radii.md,justifyContents:"center",padding:t.spacing.none,margin:t.spacing.none,borderColor:t.colors.borderColor,borderTopColor:t.colors.primary,flexGrow:0,flexShrink:0}}),"");var $=n(39095),H=n(90782);const K=()=>(0,H.jsxs)(M,{children:[(0,H.jsx)(P,{children:"This app would like to use your microphone."})," ",(0,H.jsx)(z,{href:$.ML,children:"Learn how to allow access."})]}),G=()=>(0,H.jsx)(W,{children:(0,H.jsx)(B,{})}),q="00:00",Z=e=>new Date(e).toLocaleTimeString(void 0,{minute:"2-digit",second:"2-digit"});var Q=n(96626),Y=n(34783),J=n(37789),ee=n(14757),te=n(88685),ne=n(36459),re=n(84720),ie=n(64611);const oe=e=>{let{onClick:t,disabled:n,ariaLabel:r,iconContent:i}=e;return(0,H.jsx)(ne.Ay,{kind:re.KX.BORDERLESS_ICON,onClick:t,disabled:n,"aria-label":r,fluidWidth:!0,"data-testid":"stAudioInputActionButton",children:(0,H.jsx)(ie.A,{content:i,size:"lg",color:"inherit"})})},ae=e=>{let{disabled:t,stopRecording:n}=e;return(0,H.jsx)(X,{children:(0,H.jsx)(oe,{onClick:n,disabled:t,ariaLabel:"Stop recording",iconContent:Y.X})})},le=e=>{let{disabled:t,isPlaying:n,onClickPlayPause:r}=e;return(0,H.jsx)(D,{children:n?(0,H.jsx)(oe,{onClick:r,disabled:t,ariaLabel:"Pause",iconContent:J.v}):(0,H.jsx)(oe,{onClick:r,disabled:t,ariaLabel:"Play",iconContent:ee.S})})},se=e=>{let{disabled:t,startRecording:n}=e;return(0,H.jsx)(O,{children:(0,H.jsx)(oe,{onClick:n,disabled:t,ariaLabel:"Record",iconContent:Q.G})})},de=e=>{let{onClick:t}=e;return(0,H.jsx)(D,{children:(0,H.jsx)(oe,{disabled:!1,onClick:t,ariaLabel:"Reset",iconContent:te.C})})},ce=e=>{let{disabled:t,isRecording:n,isPlaying:r,isUploading:i,isError:o,recordingUrlExists:a,startRecording:l,stopRecording:s,onClickPlayPause:d,onClear:c}=e;return o?(0,H.jsx)(V,{children:(0,H.jsx)(de,{onClick:c})}):i?(0,H.jsx)(V,{children:(0,H.jsx)(N,{"aria-label":"Uploading"})}):(0,H.jsxs)(V,{children:[n?(0,H.jsx)(ae,{disabled:t,stopRecording:s}):(0,H.jsx)(se,{disabled:t,startRecording:l}),a&&(0,H.jsx)(le,{disabled:t,isPlaying:r,onClickPlayPause:d})]})},ue=(0,r.memo)(ce);var ge=n(84996);function pe(e,t,n){for(let r=0;r<n.length;r++,t+=2){const i=Math.max(-1,Math.min(1,n[r]));e.setInt16(t,i<0?32768*i:32767*i,!0)}}const fe=async function(e){const t=new window.AudioContext,n=await e.arrayBuffer();let r;try{r=await t.decodeAudioData(n)}catch(u){return void(0,ge.vV)(u)}const i=r.numberOfChannels,o=r.sampleRate,a=r.length*i*2+44,l=new ArrayBuffer(a),s=new DataView(l),d={0:{type:"string",value:"RIFF"},4:{type:"uint32",value:36+2*r.length*i},8:{type:"string",value:"WAVE"},12:{type:"string",value:"fmt "},16:{type:"uint32",value:16},20:{type:"uint16",value:1},22:{type:"uint16",value:i},24:{type:"uint32",value:o},28:{type:"uint32",value:o*i*2},32:{type:"uint16",value:2*i},34:{type:"uint16",value:16},36:{type:"string",value:"data"},40:{type:"uint32",value:r.length*i*2}};Object.entries(d).forEach((e=>{let[t,{type:n,value:r}]=e;const i=parseInt(t,10);"string"===n?function(e,t,n){for(let r=0;r<n.length;r++)e.setUint8(t+r,n.charCodeAt(r))}(s,i,r):"uint32"===n?s.setUint32(i,r,!0):"uint16"===n&&s.setUint16(i,r,!0)}));for(let g=0;g<i;g++)pe(s,44+g*r.length*2,r.getChannelData(g));const c=new Uint8Array(l);return new Blob([c],{type:"audio/wav"})},he=()=>(0,H.jsx)(M,{children:(0,H.jsx)(P,{children:"An error has occurred, please try again."})}),me=e=>{var t;let{element:n,uploadClient:d,widgetMgr:h,fragmentId:k,disabled:A}=e;const S=(0,i.u)(),U=(0,C.Z)(S),[M,P]=(0,r.useState)(null),z=r.useRef(null),[W,B]=j({widgetMgr:h,id:n.id,key:"deleteFileUrl",defaultValue:null}),[X,O]=(0,r.useState)(null),[D,V]=(0,r.useState)([]),[N,$]=(0,r.useState)(null),[Q,Y]=j({widgetMgr:h,id:n.id,key:"recordingUrl",defaultValue:null}),[,J]=(0,r.useState)(0),ee=()=>{J((e=>e+1))},[te,ne]=(0,r.useState)(q),[re,ie]=j({widgetMgr:h,id:n.id,formId:n.formId,key:"recordingTime",defaultValue:q}),[oe,ae]=(0,r.useState)(!1),[le,se]=(0,r.useState)(!1),[de,ce]=(0,r.useState)(!1),[ge,pe]=(0,r.useState)(!1),[me,be]=(0,r.useState)(!1),ye=n.id,ve=n.formId,xe=(0,r.useCallback)((async e=>{let t;if(pe(!0),(0,p.se)(ve)&&h.setFormsWithUploadsInProgress(new Set([ve])),t="audio/wav"===e.type?e:await fe(e),!t)return void be(!0);const n=URL.createObjectURL(t),r=new File([t],"audio.wav",{type:t.type});Y(n),(async e=>{let{files:t,uploadClient:n,widgetMgr:r,widgetInfo:i,fragmentId:o}=e,a=[];try{a=await n.fetchFileURLs(t)}catch(c){return{successfulUploads:[],failedUploads:t.map((e=>({file:e,error:(0,y.$)(c)})))}}const l=m()(t,a),s=[],d=[];return await Promise.all(l.map((async e=>{let[t,r]=e;if(!t||!r||!r.uploadUrl||!r.fileId)return{file:t,fileUrl:r,error:new Error("No upload URL found")};try{await n.uploadFile({id:r.fileId,formId:i.formId||""},r.uploadUrl,t),s.push({fileUrl:r,file:t})}catch(c){const n=(0,y.$)(c);d.push({file:t,error:n})}}))),r.setFileUploaderStateValue(i,new b.qX({uploadedFileInfo:s.map((e=>{let{file:t,fileUrl:n}=e;return new b.HY({fileId:n.fileId,fileUrls:n,name:t.name,size:t.size})}))}),{fromUi:!0},o),{successfulUploads:s,failedUploads:d}})({files:[r],uploadClient:d,widgetMgr:h,widgetInfo:{id:ye,formId:ve},fragmentId:k}).then((e=>{let{successfulUploads:t,failedUploads:n}=e;if(n.length>0)return void be(!0);const r=t[0];r&&r.fileUrl.deleteUrl&&B(r.fileUrl.deleteUrl)})).finally((()=>{(0,p.se)(ve)&&h.setFormsWithUploadsInProgress(new Set),pe(!1)}))}),[Y,d,h,ye,ve,k,B]),we=(0,r.useCallback)((e=>{let{updateWidgetManager:t}=e;(0,p.hX)(M)||(0,p.hX)(W)||(Y(null),M.empty(),d.deleteFile(W),ne(q),ie(q),B(null),t&&h.setFileUploaderStateValue(n,{},{fromUi:!0},k),ae(!1),(0,p.se)(Q)&&URL.revokeObjectURL(Q))}),[W,Q,d,M,n,h,k,ie,Y,B]);(0,r.useEffect)((()=>{if((0,p.hX)(ve))return;const e=new u.o;return e.manageFormClearListener(h,ve,(()=>{we({updateWidgetManager:!0})})),()=>e.disconnect()}),[ve,we,h]);const Ce=(0,r.useCallback)((()=>{if(null===z.current)return;const e=o.A.create({container:z.current,waveColor:Q?(0,f.au)(S.colors.fadedText40,S.genericColors.secondaryBg):S.colors.primary,progressColor:S.colors.bodyText,height:(0,p.NE)(S.sizes.largestElementHeight)-8,barWidth:4,barGap:4,barRadius:8,cursorWidth:0,url:null!==Q&&void 0!==Q?Q:void 0});e.on("timeupdate",(e=>{ne(Z(1e3*e))})),e.on("pause",(()=>{ee()}));const t=e.registerPlugin(a.A.create({scrollingWaveform:!1,renderRecordedAudio:!0}));return t.on("record-end",(async e=>{xe(e)})),t.on("record-progress",(e=>{ie(Z(e))})),P(e),O(t),()=>{e&&e.destroy(),t&&t.destroy()}}),[xe]);(0,r.useEffect)((()=>Ce()),[Ce]),(0,r.useEffect)((()=>{c()(U,S)||null===M||void 0===M||M.setOptions({waveColor:Q?(0,f.au)(S.colors.fadedText40,S.genericColors.secondaryBg):S.colors.primary,progressColor:S.colors.bodyText})}),[S,U,Q,M]);const je=(0,r.useCallback)((()=>{M&&(M.playPause(),ae(!0),ee())}),[M]),ke=(0,r.useCallback)((async()=>{let e=N;de||(await navigator.mediaDevices.getUserMedia({audio:!0}).then((()=>a.A.getAvailableAudioDevices().then((t=>{if(V(t),t.length>0){const{deviceId:n}=t[0];$(n),e=n}})))).catch((e=>{se(!0)})),ce(!0)),X&&e&&M&&(M.setOptions({waveColor:S.colors.primary}),Q&&we({updateWidgetManager:!1}),X.startRecording({deviceId:e}).then((()=>{ee()})))}),[N,X,S,M,Q,we,de]),Ae=(0,r.useCallback)((()=>{X&&(X.stopRecording(),null===M||void 0===M||M.setOptions({waveColor:(0,f.au)(S.colors.fadedText40,S.genericColors.secondaryBg)}))}),[X,M,S]),Ie=I(Q,"recording.wav"),Se=Boolean(null===X||void 0===X?void 0:X.isRecording()),Ue=Boolean(null===M||void 0===M?void 0:M.isPlaying()),Re=Se||Ue,Ee=!Se&&!Q&&!le,Le=le||Ee||me,Te=A||le;return(0,H.jsxs)(R,{className:"stAudioInput","data-testid":"stAudioInput",children:[(0,H.jsx)(w.L,{label:n.label,disabled:Te,labelVisibility:(0,p.yv)(null===(t=n.labelVisibility)||void 0===t?void 0:t.value),children:n.help&&(0,H.jsx)(_,{children:(0,H.jsx)(v.A,{content:n.help,placement:x.W.TOP})})}),(0,H.jsxs)(E,{children:[(0,H.jsxs)(g.A,{isFullScreen:!1,disableFullscreenMode:!0,target:E,children:[Q&&(0,H.jsx)(g.K,{label:"Download recording",icon:l.f,onClick:()=>Ie()}),W&&(0,H.jsx)(g.K,{label:"Clear recording",icon:s.e,onClick:()=>we({updateWidgetManager:!0})})]}),(0,H.jsx)(ue,{isRecording:Se,isPlaying:Ue,isUploading:ge,isError:me,recordingUrlExists:Boolean(Q),startRecording:ke,stopRecording:Ae,onClickPlayPause:je,onClear:()=>{we({updateWidgetManager:!1}),be(!1)},disabled:Te}),(0,H.jsxs)(L,{children:[me&&(0,H.jsx)(he,{}),Ee&&(0,H.jsx)(G,{}),le&&(0,H.jsx)(K,{}),(0,H.jsx)(T,{"data-testid":"stAudioInputWaveSurfer",ref:z,show:!Le})]}),(0,H.jsx)(F,{isPlayingOrRecording:Re,"data-testid":"stAudioInputWaveformTimeCode",children:oe?te:re})]})]})},be=(0,r.memo)(me)},34752:(e,t,n)=>{n.d(t,{X:()=>a,o:()=>o});var r=n(58878),i=n(25571);class o{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(e,t,n){(0,i.se)(this.formClearListener)&&this.lastWidgetMgr===e&&this.lastFormId===t||(this.disconnect(),(0,i._L)(t)&&(this.formClearListener=e.addFormClearedListener(t,n),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}}function a(e){let{element:t,widgetMgr:n,onFormCleared:o}=e;(0,r.useEffect)((()=>{if(!(0,i._L)(t.formId))return;const e=n.addFormClearedListener(t.formId,o);return()=>{e.disconnect()}}),[t,n,o])}},35526:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(58878);const i=e=>{const t=(0,r.useRef)();return(0,r.useEffect)((()=>{t.current=e}),[e]),t.current}},55562:(e,t,n)=>{n.d(t,{A:()=>r});const r=e=>{let{enforceDownloadInNewTab:t,url:n,filename:r}=e;const i=document.createElement("a");return i.setAttribute("href",n),t?i.setAttribute("target","_blank"):i.setAttribute("target","_self"),i.setAttribute("download",r),i}}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[3560],{34752:(e,t,r)=>{r.d(t,{X:()=>l,o:()=>i});var o=r(58878),n=r(25571);class i{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(e,t,r){(0,n.se)(this.formClearListener)&&this.lastWidgetMgr===e&&this.lastFormId===t||(this.disconnect(),(0,n._L)(t)&&(this.formClearListener=e.addFormClearedListener(t,r),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}}function l(e){let{element:t,widgetMgr:r,onFormCleared:i}=e;(0,o.useEffect)((()=>{if(!(0,n._L)(t.formId))return;const e=r.addFormClearedListener(t.formId,i);return()=>{e.disconnect()}}),[t,r,i])}},33560:(e,t,r)=>{r.r(t),r.d(t,{default:()=>m});var o=r(58878),n=r(10783),i=r(38065),l=r(3680),a=r(8151),s=r(34752),d=r(70474),u=r(78286),c=r(93480),p=r(997),f=r(25571);const b=(0,r(89653).A)("div",{target:"e1ipygm10"})({name:"1ucqwki",styles:"position:absolute;top:50%;right:2.05em"});var y=r(90782);class g extends o.PureComponent{constructor(){super(...arguments),this.formClearHelper=new s.o,this.state={value:this.initialValue},this.commitWidgetValue=e=>{const{widgetMgr:t,element:r,fragmentId:o}=this.props;t.setStringValue(r,this.state.value,e,o)},this.onFormCleared=()=>{this.setState(((e,t)=>{var r;return{value:null!==(r=t.element.default)&&void 0!==r?r:null}}),(()=>this.commitWidgetValue({fromUi:!0})))},this.handleChange=e=>{let t;t=null===e?null:this.dateToString(e),this.setState({value:t},(()=>this.commitWidgetValue({fromUi:!0})))},this.stringToDate=e=>{if(null===e)return null;const[t,r]=e.split(":").map(Number),o=new Date;return o.setHours(t),o.setMinutes(r),o},this.dateToString=e=>`${e.getHours().toString().padStart(2,"0")}:${e.getMinutes().toString().padStart(2,"0")}`}get initialValue(){var e;const t=this.props.widgetMgr.getStringValue(this.props.element);return null!==(e=null!==t&&void 0!==t?t:this.props.element.default)&&void 0!==e?e:null}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,this.setState({value:null!==e&&void 0!==e?e:null},(()=>{this.commitWidgetValue({fromUi:!1})}))}render(){var e;const{disabled:t,width:r,element:o,widgetMgr:a,theme:s}=this.props,g=(0,f.hX)(o.default)&&!t,m={width:r},h={Select:{props:{disabled:t,overrides:{ControlContainer:{style:{height:s.sizes.minElementHeight,borderLeftWidth:s.sizes.borderWidth,borderRightWidth:s.sizes.borderWidth,borderTopWidth:s.sizes.borderWidth,borderBottomWidth:s.sizes.borderWidth}},IconsContainer:{style:()=>({paddingRight:s.spacing.sm})},ValueContainer:{style:()=>({lineHeight:s.lineHeights.inputWidget,paddingRight:s.spacing.sm,paddingLeft:s.spacing.sm,paddingBottom:s.spacing.sm,paddingTop:s.spacing.sm})},SingleValue:{props:{"data-testid":"stTimeInputTimeDisplay"}},Dropdown:{style:()=>({paddingTop:s.spacing.none,paddingBottom:s.spacing.none})},Popover:{props:{overrides:{Body:{style:()=>({marginTop:s.spacing.px})}}}},SelectArrow:{component:l.A,props:{overrides:{Svg:{style:()=>({width:s.iconSizes.xl,height:s.iconSizes.xl})}}}}}}}};return this.formClearHelper.manageFormClearListener(a,o.formId,this.onFormCleared),(0,y.jsxs)("div",{className:"stTimeInput","data-testid":"stTimeInput",style:m,children:[(0,y.jsx)(d.L,{label:o.label,disabled:t,labelVisibility:(0,f.yv)(null===(e=o.labelVisibility)||void 0===e?void 0:e.value),children:o.help&&(0,y.jsx)(u.j,{children:(0,y.jsx)(c.A,{content:o.help,placement:p.W.TOP_RIGHT})})}),(0,y.jsx)(n.A,{format:"24",step:o.step?Number(o.step):900,value:(0,f.hX)(this.state.value)?void 0:this.stringToDate(this.state.value),onChange:this.handleChange,overrides:h,nullable:g,creatable:!0,"aria-label":o.label}),g&&!(0,f.hX)(this.state.value)&&(0,y.jsx)(b,{onClick:()=>{this.handleChange(null)},"data-testid":"stTimeInputClearButton",children:(0,y.jsx)(i.GZ,{overrides:{Svg:{style:{color:s.colors.darkGray,padding:s.spacing.threeXS,height:s.sizes.clearIconSize,width:s.sizes.clearIconSize,":hover":{fill:s.colors.bodyText}}}},$isFocusVisible:!1})})]})}}const m=(0,a.b)(g)},14051:(e,t,r)=>{r.r(t),r.d(t,{ThemeConsumer:()=>l,ThemeProvider:()=>o.A,createThemedStyled:()=>n.Fo,createThemedUseStyletron:()=>n.jT,createThemedWithStyle:()=>n.NN,expandBorderStyles:()=>i.d2,hexToRgb:()=>i.E2,styled:()=>n.I4,useStyletron:()=>n.c6,withStyle:()=>n._F,withWrapper:()=>n.K6});var o=r(93200),n=r(57224),i=r(76939),l=o.D.Consumer},91367:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getOverride=f,t.getOverrideProps=b,t.getOverrides=g,t.mergeConfigurationOverrides=h,t.mergeOverride=m,t.mergeOverrides=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Object.assign({},e,t);return Object.keys(r).reduce((function(r,o){return r[o]=m(y(e[o]),y(t[o])),r}),{})},t.toObjectOverride=y,t.useOverrides=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n.useMemo((function(){return Object.keys(e).reduce((function(r,o){return r[o]=g(t[o],e[o]),r}),{})}),[t])};var o,n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==p(e)&&"function"!==typeof e)return{default:e};var r=a(t);if(r&&r.has(e))return r.get(e);var o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=n?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,r&&r.set(e,o);return o}(r(58878)),i=r(64157),l=(o=r(48095))&&o.__esModule?o:{default:o};function a(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},s.apply(this,arguments)}function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){c(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function f(e){return(0,i.isValidElementType)(e)?e:e&&"object"===p(e)?e.component:e}function b(e){return e&&"object"===p(e)?"object"===p(e.props)?u(u({},e.props),{},{$style:e.style}):{$style:e.style}:{}}function y(e){return(0,i.isValidElementType)(e)?{component:e}:e||{}}function g(e,t){var r=f(e)||t;if(e&&"object"===p(e)&&"function"===typeof e.props){0;var o=n.forwardRef((function(t,o){var i=e.props(t),l=b(u(u({},e),{},{props:i}));return n.createElement(r,s({ref:o},l))}));return o.displayName=r.displayName,[o,{}]}var i=b(e);return[r,i]}function m(e,t){var r=u(u({},e),t);return e.props&&t.props&&(r.props=h(e.props,t.props)),e.style&&t.style&&(r.style=h(e.style,t.style)),r}function h(e,t){return"object"===p(e)&&"object"===p(t)?(0,l.default)({},e,t):function(){return(0,l.default)({},"function"===typeof e?e.apply(void 0,arguments):e,"function"===typeof t?t.apply(void 0,arguments):t)}}},311:(e,t,r)=>{function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!==typeof e)return{default:e};var r=u(t);if(r&&r.has(e))return r.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&Object.prototype.hasOwnProperty.call(e,l)){var a=i?Object.getOwnPropertyDescriptor(e,l):null;a&&(a.get||a.set)?Object.defineProperty(n,l,a):n[l]=e[l]}n.default=e,r&&r.set(e,n);return n}(r(58878)),l=r(14051),a=r(91367),s=(n=r(71123))&&n.__esModule?n:{default:n},d=["title","size","color","overrides"];function u(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(u=function(e){return e?r:t})(e)}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},c.apply(this,arguments)}function p(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var o,n,i=[],l=!0,a=!1;try{for(r=r.call(e);!(l=(o=r.next()).done)&&(i.push(o.value),!t||i.length!==t);l=!0);}catch(s){a=!0,n=s}finally{try{l||null==r.return||r.return()}finally{if(a)throw n}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return b(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return b(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function y(e,t){var r=f((0,l.useStyletron)(),2)[1],o=e.title,n=void 0===o?"Delete Alt":o,u=e.size,b=e.color,y=e.overrides,g=void 0===y?{}:y,m=p(e,d),h=(0,a.mergeOverride)({component:r.icons&&r.icons.DeleteAlt?r.icons.DeleteAlt:null},g&&g.Svg?(0,a.toObjectOverride)(g.Svg):{});return i.createElement(s.default,c({viewBox:"0 0 24 24",ref:t,title:n,size:u,color:b,overrides:{Svg:h}},m),i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 20C16.4183 20 20 16.4183 20 12C20 7.58173 16.4183 4 12 4C7.58173 4 4 7.58173 4 12C4 16.4183 7.58173 20 12 20ZM10.0303 8.96967C9.73743 8.67679 9.26257 8.67679 8.96967 8.96967C8.67676 9.26257 8.67676 9.73743 8.96967 10.0303L10.9393 12L8.96967 13.9697C8.67676 14.2626 8.67676 14.7374 8.96967 15.0303C9.26257 15.3232 9.73743 15.3232 10.0303 15.0303L12 13.0607L13.9697 15.0303C14.2626 15.3232 14.7374 15.3232 15.0303 15.0303C15.3232 14.7374 15.3232 14.2626 15.0303 13.9697L13.0607 12L15.0303 10.0303C15.3232 9.73743 15.3232 9.26257 15.0303 8.96967C14.7374 8.67679 14.2626 8.67679 13.9697 8.96967L12 10.9393L10.0303 8.96967Z"}))}var g=i.forwardRef(y);t.default=g},71123:(e,t,r)=>{function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!==typeof e)return{default:e};var r=u(t);if(r&&r.has(e))return r.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&Object.prototype.hasOwnProperty.call(e,l)){var a=i?Object.getOwnPropertyDescriptor(e,l):null;a&&(a.get||a.set)?Object.defineProperty(n,l,a):n[l]=e[l]}n.default=e,r&&r.set(e,n);return n}(r(58878)),l=r(91367),a=r(20658),s=(n=r(5087))&&n.__esModule?n:{default:n},d=["children","title","size","color","overrides"];function u(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(u=function(e){return e?r:t})(e)}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},c.apply(this,arguments)}function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?p(Object(r),!0).forEach((function(t){b(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function b(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var o,n,i=[],l=!0,a=!1;try{for(r=r.call(e);!(l=(o=r.next()).done)&&(i.push(o.value),!t||i.length!==t);l=!0);}catch(s){a=!0,n=s}finally{try{l||null==r.return||r.return()}finally{if(a)throw n}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return g(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return g(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function m(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var h=function(e,t){var r=e.children,o=e.title,n=e.size,u=e.color,p=e.overrides,b=void 0===p?{}:p,g=m(e,d),h=y((0,l.getOverrides)(b.Svg,a.Svg),2),v=h[0],O=h[1],S=v.__STYLETRON__?f(f({title:o,$color:u,$size:n},g),O):f(f({title:o,color:u,size:n},(0,s.default)(g)),(0,s.default)(O));return i.createElement(v,c({"data-baseweb":"icon",ref:t},S),o?i.createElement("title",null,o):null,r)},v=i.forwardRef(h);t.default=v},5087:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t={};for(var r in e)"$"!==r[0]&&(t[r]=e[r]);return t}},20658:(e,t,r)=>{function o(e){var t=e.$theme,r=e.$size,o=e.$color,n=t.sizing.scale600;r&&(n=t.sizing[r]?t.sizing[r]:"number"===typeof r?"".concat(r,"px"):r);var i="currentColor";return o&&(i=t.colors[o]?t.colors[o]:o),{display:"inline-block",fill:i,color:i,height:n,width:n}}Object.defineProperty(t,"__esModule",{value:!0}),t.Svg=void 0,t.getSvgStyles=o;var n=(0,r(14051).styled)("svg",o);t.Svg=n,n.displayName="Svg",n.displayName="Svg"},96902:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.STATE_CHANGE_TYPE=t.SIZE=t.ENHANCER_POSITION=t.CUSTOM_INPUT_TYPE=t.ADJOINED=void 0;t.STATE_CHANGE_TYPE={change:"change"};t.CUSTOM_INPUT_TYPE={textarea:"textarea"};t.ADJOINED={none:"none",left:"left",right:"right",both:"both"};t.SIZE={mini:"mini",default:"default",compact:"compact",large:"large"};t.ENHANCER_POSITION={start:"start",end:"end"}},38065:(e,t,r)=>{t.GZ=void 0;var o,n=r(14051),i=r(96902),l=(o=r(311))&&o.__esModule?o:{default:o};function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){d(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function d(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var u=(0,n.styled)("button",(function(e){var t,r=e.$theme,o=e.$size,n=e.$isFocusVisible,l=(t={},d(t,i.SIZE.mini,r.sizing.scale400),d(t,i.SIZE.compact,r.sizing.scale400),d(t,i.SIZE.default,r.sizing.scale300),d(t,i.SIZE.large,r.sizing.scale200),t)[o];return{display:"flex",alignItems:"center",borderTopStyle:"none",borderBottomStyle:"none",borderLeftStyle:"none",borderRightStyle:"none",background:"none",paddingLeft:l,paddingRight:l,outline:n?"solid 3px ".concat(r.colors.accent):"none",color:r.colors.contentPrimary}}));u.displayName="StyledMaskToggleButton",u.displayName="StyledMaskToggleButton";var c=(0,n.styled)("div",(function(e){var t,r=e.$alignTop,o=void 0!==r&&r,n=e.$size,l=e.$theme,a=(t={},d(t,i.SIZE.mini,l.sizing.scale200),d(t,i.SIZE.compact,l.sizing.scale200),d(t,i.SIZE.default,l.sizing.scale100),d(t,i.SIZE.large,l.sizing.scale0),t)[n];return{display:"flex",alignItems:o?"flex-start":"center",paddingLeft:a,paddingRight:a,paddingTop:o?l.sizing.scale500:"0px",color:l.colors.contentPrimary}}));c.displayName="StyledClearIconContainer",c.displayName="StyledClearIconContainer";var p=(0,n.styled)(l.default,(function(e){var t=e.$theme;return{cursor:"pointer",outline:e.$isFocusVisible?"solid 3px ".concat(t.colors.accent):"none"}}));function f(e,t){var r;return(r={},d(r,i.SIZE.mini,t.font100),d(r,i.SIZE.compact,t.font200),d(r,i.SIZE.default,t.font300),d(r,i.SIZE.large,t.font400),r)[e]}t.GZ=p,p.displayName="StyledClearIcon",p.displayName="StyledClearIcon";var b=function(e){var t=e.$isFocused,r=e.$adjoined,o=e.$error,n=e.$disabled,l=e.$positive,a=e.$size,d=e.$theme,u=e.$theme,c=u.borders,p=u.colors,b=u.sizing,y=u.typography,g=u.animation,m=e.$hasIconTrailing;return s(s(s(s({boxSizing:"border-box",display:"flex",overflow:"hidden",width:"100%",borderLeftWidth:"2px",borderRightWidth:"2px",borderTopWidth:"2px",borderBottomWidth:"2px",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",transitionProperty:"border",transitionDuration:g.timing200,transitionTimingFunction:g.easeOutCurve},function(e,t){var r=t.inputBorderRadius;return e===i.SIZE.mini&&(r=t.inputBorderRadiusMini),{borderTopLeftRadius:r,borderBottomLeftRadius:r,borderTopRightRadius:r,borderBottomRightRadius:r}}(a,c)),f(a,y)),function(e,t,r){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],n=arguments.length>4?arguments[4]:void 0;return e?{borderLeftColor:n.inputFillDisabled,borderRightColor:n.inputFillDisabled,borderTopColor:n.inputFillDisabled,borderBottomColor:n.inputFillDisabled,backgroundColor:n.inputFillDisabled}:t?{borderLeftColor:n.borderSelected,borderRightColor:n.borderSelected,borderTopColor:n.borderSelected,borderBottomColor:n.borderSelected,backgroundColor:n.inputFillActive}:r?{borderLeftColor:n.inputBorderError,borderRightColor:n.inputBorderError,borderTopColor:n.inputBorderError,borderBottomColor:n.inputBorderError,backgroundColor:n.inputFillError}:o?{borderLeftColor:n.inputBorderPositive,borderRightColor:n.inputBorderPositive,borderTopColor:n.inputBorderPositive,borderBottomColor:n.inputBorderPositive,backgroundColor:n.inputFillPositive}:{borderLeftColor:n.inputBorder,borderRightColor:n.inputBorder,borderTopColor:n.inputBorder,borderBottomColor:n.inputBorder,backgroundColor:n.inputFill}}(n,t,o,l,p)),function(e,t,r,o,n){var l=e===i.ADJOINED.both||e===i.ADJOINED.left&&"rtl"!==o||e===i.ADJOINED.right&&"rtl"===o||n&&"rtl"===o,a=e===i.ADJOINED.both||e===i.ADJOINED.right&&"rtl"!==o||e===i.ADJOINED.left&&"rtl"===o||n&&"rtl"!==o;return{paddingLeft:l?r.scale550:"0px",paddingRight:a?r.scale550:"0px"}}(r,0,b,d.direction,m))};var y=(0,n.styled)("div",b);y.displayName="Root",y.displayName="Root";var g=(0,n.styled)("div",(function(e){var t=e.$size,r=e.$disabled,o=e.$isFocused,n=e.$error,l=e.$positive,a=e.$theme,u=a.colors,c=a.sizing,p=a.typography,b=a.animation;return s(s(s({display:"flex",alignItems:"center",justifyContent:"center",transitionProperty:"color, background-color",transitionDuration:b.timing200,transitionTimingFunction:b.easeOutCurve},f(t,p)),function(e,t){var r;return(r={},d(r,i.SIZE.mini,{paddingRight:t.scale400,paddingLeft:t.scale400}),d(r,i.SIZE.compact,{paddingRight:t.scale400,paddingLeft:t.scale400}),d(r,i.SIZE.default,{paddingRight:t.scale300,paddingLeft:t.scale300}),d(r,i.SIZE.large,{paddingRight:t.scale200,paddingLeft:t.scale200}),r)[e]}(t,c)),function(e,t,r,o,n){return e?{color:n.inputEnhancerTextDisabled,backgroundColor:n.inputFillDisabled}:t?{color:n.contentPrimary,backgroundColor:n.inputFillActive}:r?{color:n.contentPrimary,backgroundColor:n.inputFillError}:o?{color:n.contentPrimary,backgroundColor:n.inputFillPositive}:{color:n.contentPrimary,backgroundColor:n.inputFill}}(r,o,n,l,u))}));g.displayName="InputEnhancer",g.displayName="InputEnhancer";var m=function(e){var t=e.$isFocused,r=e.$error,o=e.$disabled,n=e.$positive,i=e.$size,l=e.$theme,a=l.colors,d=l.typography,u=l.animation;return s(s({display:"flex",width:"100%",transitionProperty:"background-color",transitionDuration:u.timing200,transitionTimingFunction:u.easeOutCurve},f(i,d)),function(e,t,r,o,n){return e?{color:n.inputTextDisabled,backgroundColor:n.inputFillDisabled}:t?{color:n.contentPrimary,backgroundColor:n.inputFillActive}:r?{color:n.contentPrimary,backgroundColor:n.inputFillError}:o?{color:n.contentPrimary,backgroundColor:n.inputFillPositive}:{color:n.contentPrimary,backgroundColor:n.inputFill}}(o,t,r,n,a))};var h=(0,n.styled)("div",m);h.displayName="InputContainer",h.displayName="InputContainer";var v=function(e){var t=e.$disabled,r=(e.$isFocused,e.$error,e.$size),o=e.$theme,n=o.colors,l=o.sizing;return s(s(s({boxSizing:"border-box",backgroundColor:"transparent",borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0,borderLeftStyle:"none",borderRightStyle:"none",borderTopStyle:"none",borderBottomStyle:"none",outline:"none",width:"100%",minWidth:0,maxWidth:"100%",cursor:t?"not-allowed":"text",margin:"0",paddingTop:"0",paddingBottom:"0",paddingLeft:"0",paddingRight:"0"},f(r,o.typography)),function(e,t){var r;return(r={},d(r,i.SIZE.mini,{paddingTop:t.scale100,paddingBottom:t.scale100,paddingLeft:t.scale550,paddingRight:t.scale550}),d(r,i.SIZE.compact,{paddingTop:t.scale200,paddingBottom:t.scale200,paddingLeft:t.scale550,paddingRight:t.scale550}),d(r,i.SIZE.default,{paddingTop:t.scale400,paddingBottom:t.scale400,paddingLeft:t.scale550,paddingRight:t.scale550}),d(r,i.SIZE.large,{paddingTop:t.scale550,paddingBottom:t.scale550,paddingLeft:t.scale550,paddingRight:t.scale550}),r)[e]}(r,l)),function(e,t,r,o){return e?{color:o.inputTextDisabled,"-webkit-text-fill-color":o.inputTextDisabled,caretColor:o.contentPrimary,"::placeholder":{color:o.inputPlaceholderDisabled}}:{color:o.contentPrimary,caretColor:o.contentPrimary,"::placeholder":{color:o.inputPlaceholder}}}(t,0,0,n))};var O=(0,n.styled)("input",v);O.displayName="Input",O.displayName="Input"},48095:(e,t)=>{function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e){return Array.isArray(e)||"[object Object]"=={}.toString.call(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){t=t||{};for(var n,i,l=arguments.length<=1?0:arguments.length-1,a=0;a<l;a++)for(var s in n=(a+1<1||arguments.length<=a+1?void 0:arguments[a+1])||{})void 0!==r(n[s])&&(o(i=n[s])?t[s]=e(t[s]||Array.isArray(i)&&[]||{},i):t[s]=i);return t}}}]);
|