streamlit-nightly 1.39.1.dev20241021__py2.py3-none-any.whl → 1.39.1.dev20241022__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/elements/widgets/button_group.py +18 -18
- streamlit/static/asset-manifest.json +3 -3
- streamlit/static/index.html +1 -1
- streamlit/static/static/js/223.2359dae5.chunk.js +1 -0
- streamlit/static/static/js/main.b154eb39.js +28 -0
- {streamlit_nightly-1.39.1.dev20241021.dist-info → streamlit_nightly-1.39.1.dev20241022.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.39.1.dev20241021.dist-info → streamlit_nightly-1.39.1.dev20241022.dist-info}/RECORD +12 -12
- streamlit/static/static/js/223.ad5699f4.chunk.js +0 -1
- streamlit/static/static/js/main.62a02ffe.js +0 -28
- /streamlit/static/static/js/{main.62a02ffe.js.LICENSE.txt → main.b154eb39.js.LICENSE.txt} +0 -0
- {streamlit_nightly-1.39.1.dev20241021.data → streamlit_nightly-1.39.1.dev20241022.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.39.1.dev20241021.dist-info → streamlit_nightly-1.39.1.dev20241022.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.39.1.dev20241021.dist-info → streamlit_nightly-1.39.1.dev20241022.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.39.1.dev20241021.dist-info → streamlit_nightly-1.39.1.dev20241022.dist-info}/top_level.txt +0 -0
@@ -107,7 +107,7 @@ streamlit/elements/lib/utils.py,sha256=8VVty4Jd99ynSxjKKqVnEaVsFydBX2m2s24fIdkGg
|
|
107
107
|
streamlit/elements/widgets/__init__.py,sha256=Vrf1yVMOcTyhUPnYvsfyeL96Vpd5z8KoSV5ZzTcTQgU,616
|
108
108
|
streamlit/elements/widgets/audio_input.py,sha256=KroApvExRV13-yrJ-C6JrUh-GC2JIWttvsK6nhJXxyE,9757
|
109
109
|
streamlit/elements/widgets/button.py,sha256=jTU7WGHpmZMzc-Gw1DxCfaSIQKtpdN6AHPM7rTirpbg,35986
|
110
|
-
streamlit/elements/widgets/button_group.py,sha256=
|
110
|
+
streamlit/elements/widgets/button_group.py,sha256=You6meqlHA5kbATpzcmglJPhVYvTDPJzeVSY3uL5e8o,35368
|
111
111
|
streamlit/elements/widgets/camera_input.py,sha256=Hw0TyeehVa4LSvUsERoNjh1pYHXuarw19r0gTCVxyBY,8593
|
112
112
|
streamlit/elements/widgets/chat.py,sha256=L7LFirsBih6jFOWIJJMvVh_1xlltD0g-ZsTp8QhxGPk,14326
|
113
113
|
streamlit/elements/widgets/checkbox.py,sha256=Y9kXtleUdGibdpu1MVs2x_Gj-cLRkxVIc8ji0oBeLJs,11188
|
@@ -347,9 +347,9 @@ streamlit/runtime/state/safe_session_state.py,sha256=WLFFyMtP4F19TWWBarKtSP942Ie
|
|
347
347
|
streamlit/runtime/state/session_state.py,sha256=SMBWsSZY29jAgL3QfX4xvJr9aLCNrHHUz9AmosX7FlQ,28850
|
348
348
|
streamlit/runtime/state/session_state_proxy.py,sha256=IWF43f6UWL4KyxNWF3aTv1sbykNI2hI5UsPF2UIfpdE,5524
|
349
349
|
streamlit/runtime/state/widgets.py,sha256=r5XOgHBh9AqS52rgKGgDXFGnkdY6ObUJBSSUBqkzTK8,5319
|
350
|
-
streamlit/static/asset-manifest.json,sha256=
|
350
|
+
streamlit/static/asset-manifest.json,sha256=URiYi5M5hj23DdUCS7tUfIsD4d0kW4b_1XRs4mxs2EY,14713
|
351
351
|
streamlit/static/favicon.png,sha256=if5cVgw7azxKOvV5FpGixga7JLn23rfnHcy1CdWI1-E,1019
|
352
|
-
streamlit/static/index.html,sha256=
|
352
|
+
streamlit/static/index.html,sha256=ME8A3Q87NoU1tOSoVmhutl5Bpq0_9R4ooqYamx5yRc0,891
|
353
353
|
streamlit/static/static/css/4096.8b8f33d6.chunk.css,sha256=4m2lbj1eVFXSaGCRBHZNhqyRz-4Ce9KogjJPxIq6On8,33275
|
354
354
|
streamlit/static/static/css/9943.d452238e.chunk.css,sha256=B69nSRvppH7uO-_kso_XSGce7SJOCm8ZD1GB9g6fttA,12038
|
355
355
|
streamlit/static/static/css/main.5513bd04.css,sha256=9vuriEsFvHDyAwsI3vtBY9PNL8UOjqGwWZ4lZHsdFzw,29356
|
@@ -358,7 +358,7 @@ streamlit/static/static/js/1101.13462bff.chunk.js,sha256=Iu-ECFDUDJJ14X1UQR4KIqt
|
|
358
358
|
streamlit/static/static/js/1260.dc193a5e.chunk.js,sha256=Xm4rj0pmMBuJ81DSUJY8RR4iqteyXF4OavQ6AegsqKk,10999
|
359
359
|
streamlit/static/static/js/1674.86aea8e0.chunk.js,sha256=g2RyDOrwFlJImiNgHT8Yo_LVDjfqRV5DHDhXK_IYdQE,9236
|
360
360
|
streamlit/static/static/js/1674.86aea8e0.chunk.js.LICENSE.txt,sha256=426lVBKMW2FKu5BqnSDpZnhms1QqJZ-nDvqwC62w-Z8,479
|
361
|
-
streamlit/static/static/js/223.
|
361
|
+
streamlit/static/static/js/223.2359dae5.chunk.js,sha256=QSBOzn0nC-VViJW5bSdwAWp_7VI-_JgELrhMQdM-aEM,15452
|
362
362
|
streamlit/static/static/js/245.f99a075b.chunk.js,sha256=Uh-JbxYM-u3OWNz4ic9QpO1-ctFk64sER5Y61FUIYwQ,16029
|
363
363
|
streamlit/static/static/js/2627.2462a014.chunk.js,sha256=PdOFzDOJSqybqqZpNdX3C-QzWLq7SuVcMjhY--a7mJA,21253
|
364
364
|
streamlit/static/static/js/3224.86a6ba35.chunk.js,sha256=Tq56fa46bDoZ739e5G5ubgTYBD0XMMYvOaqbcPiYEoc,15376
|
@@ -419,8 +419,8 @@ streamlit/static/static/js/9528.a58c0ad2.chunk.js,sha256=LCX8VwyKfm9gr9lIAvz5d-8
|
|
419
419
|
streamlit/static/static/js/954.88014372.chunk.js,sha256=iM-oVcorvEnZJzzEem6IrtXG6U63FfXPupeoIxFK92U,8769
|
420
420
|
streamlit/static/static/js/9923.2bb9616f.chunk.js,sha256=EtTxhVpm_jY8E23uFAg-00WCnbvi1zXVRAky8JxbMaI,3579
|
421
421
|
streamlit/static/static/js/9943.54dc52f7.chunk.js,sha256=__dBNdmwDa6eZ3IwppDYRvXWnBWfwKeRHCvHl6imidw,49465
|
422
|
-
streamlit/static/static/js/main.
|
423
|
-
streamlit/static/static/js/main.
|
422
|
+
streamlit/static/static/js/main.b154eb39.js,sha256=1CPk86wbuU5z-A0VQTXSjUGFSJCbEWQU-hxUqEkDjdo,4481314
|
423
|
+
streamlit/static/static/js/main.b154eb39.js.LICENSE.txt,sha256=vcwWCW5VNoALG8YyhU5k8oDUNAwYisMZfiZ8X1cvtWk,4730
|
424
424
|
streamlit/static/static/media/KaTeX_AMS-Regular.73ea273a72f4aca30ca5.woff2,sha256=DN04fJWQoan5eUVgAi27WWVKfYbxh6oMgUla1C06cwg,28076
|
425
425
|
streamlit/static/static/media/KaTeX_AMS-Regular.853be92419a6c3766b9a.ttf,sha256=aFNIQLz90r_7bw6N60hoTdAefwTqKBMmdXevuQbeHRM,63632
|
426
426
|
streamlit/static/static/media/KaTeX_AMS-Regular.d562e886c52f12660a41.woff,sha256=MNqR6EyJP4deJSaJ-uvcWQsocRReitx_mp1NvYzgslE,33516
|
@@ -542,9 +542,9 @@ streamlit/web/server/server_util.py,sha256=ioIHkXNlA_ujj2Q3isziM8r5glKxgK2JZRoCD
|
|
542
542
|
streamlit/web/server/stats_request_handler.py,sha256=e144zIhzLTB1PN4CwTCxElCoWMuo9IsBEPex2exHCQ0,3641
|
543
543
|
streamlit/web/server/upload_file_request_handler.py,sha256=ftyKpARrUjOpRcFETIXuoTyOG_mo-ToOw5NI0y_W4lE,5003
|
544
544
|
streamlit/web/server/websocket_headers.py,sha256=uUxypj04ondEC4ocBiYCndX_N06Zwe1Mt690Vupe08Y,2232
|
545
|
-
streamlit_nightly-1.39.1.
|
546
|
-
streamlit_nightly-1.39.1.
|
547
|
-
streamlit_nightly-1.39.1.
|
548
|
-
streamlit_nightly-1.39.1.
|
549
|
-
streamlit_nightly-1.39.1.
|
550
|
-
streamlit_nightly-1.39.1.
|
545
|
+
streamlit_nightly-1.39.1.dev20241022.data/scripts/streamlit.cmd,sha256=ZEYM3vBJSp-k7vwSJ3ba5NzEk9-qHdSeLvGYAAe1mMw,676
|
546
|
+
streamlit_nightly-1.39.1.dev20241022.dist-info/METADATA,sha256=u1Z1lb78EmjfTEtP3ig_J9B_uQFv3sw_zoYUBE0jowk,8512
|
547
|
+
streamlit_nightly-1.39.1.dev20241022.dist-info/WHEEL,sha256=TJ49d73sNs10F0aze1W_bTW2P_X7-F4YXOlBqoqA-jY,109
|
548
|
+
streamlit_nightly-1.39.1.dev20241022.dist-info/entry_points.txt,sha256=uNJ4DwGNXEhOK0USwSNanjkYyR-Bk7eYQbJFDrWyOgY,53
|
549
|
+
streamlit_nightly-1.39.1.dev20241022.dist-info/top_level.txt,sha256=V3FhKbm7G2LnR0s4SytavrjIPNIhvcsAGXfYHAwtQzw,10
|
550
|
+
streamlit_nightly-1.39.1.dev20241022.dist-info/RECORD,,
|
@@ -1 +0,0 @@
|
|
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(16795),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(4629),s=o(997),a=o(36459),c=o(84720),d=o(64611),h=o(89653),u=o(16795);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]}}}]);
|