streamlit-nightly 1.39.1.dev20241016__py2.py3-none-any.whl → 1.39.1.dev20241017__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 +7 -7
- streamlit/static/index.html +1 -1
- streamlit/static/static/js/8148.5521cded.chunk.js +1 -0
- streamlit/static/static/js/8237.72e42692.chunk.js +1 -0
- streamlit/static/static/js/{8460.40cba8ba.chunk.js → 8460.05092ce1.chunk.js} +1 -1
- streamlit/static/static/js/9923.2bb9616f.chunk.js +1 -0
- streamlit/static/static/js/9943.0d8cd50b.chunk.js +1 -0
- streamlit/static/static/js/main.f85d22ce.js +28 -0
- {streamlit_nightly-1.39.1.dev20241016.dist-info → streamlit_nightly-1.39.1.dev20241017.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.39.1.dev20241016.dist-info → streamlit_nightly-1.39.1.dev20241017.dist-info}/RECORD +15 -15
- streamlit/static/static/js/8148.aed4a6f0.chunk.js +0 -1
- streamlit/static/static/js/8237.5de71f48.chunk.js +0 -1
- streamlit/static/static/js/9923.21b1d895.chunk.js +0 -1
- streamlit/static/static/js/9943.d54fcda3.chunk.js +0 -1
- streamlit/static/static/js/main.555eaf62.js +0 -28
- /streamlit/static/static/js/{main.555eaf62.js.LICENSE.txt → main.f85d22ce.js.LICENSE.txt} +0 -0
- {streamlit_nightly-1.39.1.dev20241016.data → streamlit_nightly-1.39.1.dev20241017.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.39.1.dev20241016.dist-info → streamlit_nightly-1.39.1.dev20241017.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.39.1.dev20241016.dist-info → streamlit_nightly-1.39.1.dev20241017.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.39.1.dev20241016.dist-info → streamlit_nightly-1.39.1.dev20241017.dist-info}/top_level.txt +0 -0
@@ -1,23 +1,23 @@
|
|
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.f85d22ce.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.0d8cd50b.chunk.js": "./static/js/9943.0d8cd50b.chunk.js",
|
11
|
+
"static/js/8460.05092ce1.chunk.js": "./static/js/8460.05092ce1.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
14
|
"static/js/223.8bd97055.chunk.js": "./static/js/223.8bd97055.chunk.js",
|
15
|
-
"static/js/8148.
|
15
|
+
"static/js/8148.5521cded.chunk.js": "./static/js/8148.5521cded.chunk.js",
|
16
16
|
"static/js/84.414fa87b.chunk.js": "./static/js/84.414fa87b.chunk.js",
|
17
|
-
"static/js/9923.
|
17
|
+
"static/js/9923.2bb9616f.chunk.js": "./static/js/9923.2bb9616f.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.72e42692.chunk.js": "./static/js/8237.72e42692.chunk.js",
|
21
21
|
"static/js/5828.f8572ba4.chunk.js": "./static/js/5828.f8572ba4.chunk.js",
|
22
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",
|
@@ -153,6 +153,6 @@
|
|
153
153
|
},
|
154
154
|
"entrypoints": [
|
155
155
|
"static/css/main.5513bd04.css",
|
156
|
-
"static/js/main.
|
156
|
+
"static/js/main.f85d22ce.js"
|
157
157
|
]
|
158
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.f85d22ce.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
|
+
(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[8148],{67163:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c});var i=n(58878),l=n(68262),s=n(13170),a=n(84996),r=n(55516);const d=(0,n(89653).A)("div",{target:"e1uym6o70"})((e=>{let{theme:t,isFullScreen:n}=e;return{"& *":{fontFamily:t.genericFonts.bodyFont,fontSize:`calc(${t.fontSizes.twoSm} * 0.8)`},"& svg":{maxWidth:"100%",width:n?"100%":"auto",height:n?"100%":"auto"},width:n?"100%":"auto",height:n?"100%":"auto"}}),"");var h=n(90782);const c=(0,r.A)((function(e){let{element:t,isFullScreen:n}=e;const r=`st-graphviz-chart-${t.elementId}`;return(0,i.useEffect)((()=>{try{if((0,s.graphviz)(`#${r}`).zoom(!1).fit(!0).scale(1).engine(t.engine).renderDot(t.spec),n||t.useContainerWidth){const e=(0,l.Ltv)(`#${r} > svg`).node();e.removeAttribute("width"),e.removeAttribute("height")}}catch(e){(0,a.vV)(e)}}),[r,t.engine,t.spec,t.useContainerWidth,n]),(0,h.jsx)(d,{className:"stGraphVizChart","data-testid":"stGraphVizChart",id:r,isFullScreen:n})}))},55516:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});n(58878);var i=n(53124),l=n.n(i),s=n(41514),a=n(67214),r=n(64611),d=n(98226),h=n(4883),c=n(90782);const o=e=>{let{children:t,width:n,height:i,disableFullscreenMode:l}=e;const{expanded:o,fullHeight:u,fullWidth:p,zoomIn:g,zoomOut:m}=(0,d.H)();let f=s.u,x=g,w="View fullscreen";return o&&(f=a.Q,x=m,w="Exit fullscreen"),(0,c.jsxs)(h.g,{isExpanded:o,"data-testid":"stFullScreenFrame",children:[!l&&(0,c.jsx)(h.j,{"data-testid":"StyledFullScreenButton",onClick:x,title:w,isExpanded:o,children:(0,c.jsx)(r.A,{content:f})}),t({width:o?p:n,height:o?u:i,expanded:o,expand:g,collapse:m})]})};const u=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=n=>{const{width:i,height:l,disableFullscreenMode:s}=n;return(0,c.jsx)(o,{width:i,height:l,disableFullscreenMode:t||s,children:t=>{let{width:i,height:l,expanded:s,expand:a,collapse:r}=t;return(0,c.jsx)(e,{...n,width:i,height:l,isFullScreen:s,expand:a,collapse:r})}})};return n.displayName=`withFullScreenWrapper(${e.displayName||e.name})`,l()(n,e)}},34654:()=>{},7908:()=>{},62292:()=>{}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[8237],{78237:(e,l,o)=>{o.r(l),o.d(l,{default:()=>S});var t=o(58878),r=o(8151),i=o(43978),n=o(29669),c=o(55516),a=o(25571),s=o(34752),d=o(37638),p=o.n(d),u=o(58144),f=o(67253),h=o(84996);function g(e,l,o){return e=function(e,l){return(e=(e=(e=(e=(e=(e=(e=(e=e.replaceAll("#000032",(0,u.$E)(l))).replaceAll("#000033",(0,u.pf)(l))).replaceAll("#000034",(0,u.h7)(l))).replaceAll("#000035",(0,u.V9)(l))).replaceAll("#000036",(0,u.lH)(l))).replaceAll("#000037",(0,u.ZA)(l))).replaceAll("#000038",l.colors.bgColor)).replaceAll("#000039",l.colors.fadedText05)).replaceAll("#000040",l.colors.bgMix)}(e,l),e=function(e,l,o){const t="#000001",r="#000002",i="#000003",n="#000004",c="#000005",a="#000006",s="#000007",d="#000008",p="#000009",f="#000010";if("streamlit"===o){const o=(0,u.c6)(l);e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replaceAll(t,o[0])).replaceAll(r,o[1])).replaceAll(i,o[2])).replaceAll(n,o[3])).replaceAll(c,o[4])).replaceAll(a,o[5])).replaceAll(s,o[6])).replaceAll(d,o[7])).replaceAll(p,o[8])).replaceAll(f,o[9])}else e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replaceAll(t,"#636efa")).replaceAll(r,"#EF553B")).replaceAll(i,"#00cc96")).replaceAll(n,"#ab63fa")).replaceAll(c,"#FFA15A")).replaceAll(a,"#19d3f3")).replaceAll(s,"#FF6692")).replaceAll(d,"#B6E880")).replaceAll(p,"#FF97FF")).replaceAll(f,"#FECB52");return e}(e,l,o),e=function(e,l,o){const t="#000011",r="#000012",i="#000013",n="#000014",c="#000015",a="#000016",s="#000017",d="#000018",p="#000019",f="#000020";if("streamlit"===o){const o=(0,u.rp)(l);e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replaceAll(t,o[0])).replaceAll(r,o[1])).replaceAll(i,o[2])).replaceAll(n,o[3])).replaceAll(c,o[4])).replaceAll(a,o[5])).replaceAll(s,o[6])).replaceAll(d,o[7])).replaceAll(p,o[8])).replaceAll(f,o[9])}else e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replaceAll(t,"#0d0887")).replaceAll(r,"#46039f")).replaceAll(i,"#7201a8")).replaceAll(n,"#9c179e")).replaceAll(c,"#bd3786")).replaceAll(a,"#d8576b")).replaceAll(s,"#ed7953")).replaceAll(d,"#fb9f3a")).replaceAll(p,"#fdca26")).replaceAll(f,"#f0f921");return e}(e,l,o),e=function(e,l,o){const t="#000021",r="#000022",i="#000023",n="#000024",c="#000025",a="#000026",s="#000027",d="#000028",p="#000029",f="#000030",h="#000031";if("streamlit"===o){const o=(0,u.vk)(l);e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replaceAll(t,o[0])).replaceAll(r,o[1])).replaceAll(i,o[2])).replaceAll(n,o[3])).replaceAll(c,o[4])).replaceAll(a,o[5])).replaceAll(s,o[6])).replaceAll(d,o[7])).replaceAll(p,o[8])).replaceAll(f,o[9])).replaceAll(h,o[10])}else e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replaceAll(t,"#8e0152")).replaceAll(r,"#c51b7d")).replaceAll(i,"#de77ae")).replaceAll(n,"#f1b6da")).replaceAll(c,"#fde0ef")).replaceAll(a,"#f7f7f7")).replaceAll(s,"#e6f5d0")).replaceAll(d,"#b8e186")).replaceAll(p,"#7fbc41")).replaceAll(f,"#4d9221")).replaceAll(h,"#276419");return e}(e,l,o),e}function m(e,l){try{!function(e,l){const{genericFonts:o,colors:t,fontSizes:r}=l,i={font:{color:(0,u.lH)(l),family:o.bodyFont,size:r.twoSmPx},title:{color:t.headingColor,subtitleColor:t.bodyText,font:{family:o.headingFont,size:r.mdPx,color:t.headingColor},pad:{l:l.spacing.twoXSPx},xanchor:"left",x:0},legend:{title:{font:{size:r.twoSmPx,color:(0,u.lH)(l)},side:"top"},valign:"top",bordercolor:t.transparent,borderwidth:l.spacing.nonePx,font:{size:r.twoSmPx,color:(0,u.ZA)(l)}},paper_bgcolor:t.bgColor,plot_bgcolor:t.bgColor,yaxis:{ticklabelposition:"outside",zerolinecolor:(0,u.V9)(l),title:{font:{color:(0,u.lH)(l),size:r.smPx},standoff:l.spacing.twoXLPx},tickcolor:(0,u.V9)(l),tickfont:{color:(0,u.lH)(l),size:r.twoSmPx},gridcolor:(0,u.V9)(l),minor:{gridcolor:(0,u.V9)(l)},automargin:!0},xaxis:{zerolinecolor:(0,u.V9)(l),gridcolor:(0,u.V9)(l),showgrid:!1,tickfont:{color:(0,u.lH)(l),size:r.twoSmPx},tickcolor:(0,u.V9)(l),title:{font:{color:(0,u.lH)(l),size:r.smPx},standoff:l.spacing.xlPx},minor:{gridcolor:(0,u.V9)(l)},zeroline:!1,automargin:!0,rangeselector:{bgcolor:t.bgColor,bordercolor:(0,u.V9)(l),borderwidth:1,x:0}},margin:{pad:l.spacing.smPx,r:l.spacing.nonePx,l:l.spacing.nonePx},hoverlabel:{bgcolor:t.bgColor,bordercolor:t.borderColor,font:{color:(0,u.lH)(l),family:o.bodyFont,size:r.twoSmPx}},coloraxis:{colorbar:{thickness:16,xpad:l.spacing.twoXLPx,ticklabelposition:"outside",outlinecolor:t.transparent,outlinewidth:8,len:.75,y:.5745,title:{font:{color:(0,u.lH)(l),size:r.smPx}},tickfont:{color:(0,u.lH)(l),size:r.twoSmPx}}},ternary:{gridcolor:(0,u.lH)(l),bgcolor:t.bgColor,title:{font:{family:o.bodyFont,size:r.smPx}},color:(0,u.lH)(l),aaxis:{gridcolor:(0,u.lH)(l),linecolor:(0,u.lH)(l),tickfont:{family:o.bodyFont,size:r.twoSmPx}},baxis:{linecolor:(0,u.lH)(l),gridcolor:(0,u.lH)(l),tickfont:{family:o.bodyFont,size:r.twoSmPx}},caxis:{linecolor:(0,u.lH)(l),gridcolor:(0,u.lH)(l),tickfont:{family:o.bodyFont,size:r.twoSmPx}}}};p()(e,i)}(e.layout.template.layout,l)}catch(o){const e=(0,f.$)(o);(0,h.vV)(e)}"title"in e.layout&&(e.layout.title=p()(e.layout.title,{text:`<b>${e.layout.title.text}</b>`}))}var y=o(90782);const A={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"},x={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 b(e,l,o){const t=JSON.parse(g(JSON.stringify(e),o,l));return"streamlit"===l?m(t,o):t.layout=function(e,l){const{colors:o,genericFonts:t}=l,r={font:{color:o.bodyText,family:t.bodyFont},paper_bgcolor:o.bgColor,plot_bgcolor:o.secondaryBg};return{...e,font:{...r.font,...e.font},paper_bgcolor:e.paper_bgcolor||r.paper_bgcolor,plot_bgcolor:e.plot_bgcolor||r.plot_bgcolor}}(t.layout,o),t}function v(e,l,o,t){if(!e)return;const r={selection:{points:[],point_indices:[],box:[],lasso:[]}},i=new Set,c=[],s=[],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,a.se)(e.pointIndex)&&i.add(e.pointIndex),(0,a.se)(e.pointIndices)&&e.pointIndices.length>0&&e.pointIndices.forEach((e=>i.add(e)))})),p&&p.forEach((e=>{if("rect"===e.type){const l=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),o={xref:e.xref,yref:e.yref,x:l.x,y:l.y};c.push(o)}if("path"===e.type){const l=function(e){if(""===e)return{x:[],y:[]};const l=e.replace("M","").replace("Z","").split("L"),o=[],t=[];return l.forEach((e=>{const[l,r]=e.split(",").map(Number);o.push(l),t.push(r)})),{x:o,y:t}}(e.path),o={xref:e.xref,yref:e.yref,x:l.x,y:l.y};s.push(o)}})),r.selection.point_indices=Array.from(i),r.selection.points=d.map((e=>(0,a.wJ)(e))),r.selection.box=c,r.selection.lasso=s,r.selection.box.length>0&&!o.selectionMode.includes(n.P_.SelectionMode.BOX))return;if(r.selection.lasso.length>0&&!o.selectionMode.includes(n.P_.SelectionMode.LASSO))return;const f=l.getStringValue(o),h=JSON.stringify(r);f!==h&&l.setStringValue(o,h,{fromUi:!0},t)}const S=(0,c.A)((function(e){var l,o,c,a,d;let{element:p,width:u,height:f,widgetMgr:h,disabled:g,fragmentId:m,isFullScreen:S,expand:w,collapse:F,disableFullscreenMode:M}=e;const C=(0,r.u)(),P=(0,t.useMemo)((()=>p.spec?JSON.parse(p.spec):{layout:{},data:[],frames:void 0}),[p.id,p.spec]),[z,H]=(0,t.useState)((()=>{const e=h.getElementState(p.id,"figure");return e||b(P,p.theme,C)})),k=p.selectionMode.length>0&&!g,V=k&&p.selectionMode.includes(n.P_.SelectionMode.LASSO),_=k&&p.selectionMode.includes(n.P_.SelectionMode.BOX),E=k&&p.selectionMode.includes(n.P_.SelectionMode.POINTS),I=(0,t.useMemo)((()=>{if(!p.config)return{};const e=JSON.parse(p.config);var l;M||(e.modeBarButtonsToAdd=[{name:S?"Close fullscreen":"Fullscreen",icon:S?x:A,click:()=>{S&&F?F():w&&w()}},...null!==(l=e.modeBarButtonsToAdd)&&void 0!==l?l:[]]);if(!e.modeBarButtonsToRemove){e.displaylogo=!1;const l=["sendDataToCloud"];k?(V||l.push("lasso2d"),_||l.push("select2d")):l.push("lasso2d","select2d"),e.modeBarButtonsToRemove=l}return e}),[p.id,p.config,S,M,k,V,_,F,w]);(0,t.useEffect)((()=>{H((e=>b(e,p.theme,C)))}),[p.id,C,p.theme]),(0,t.useEffect)((()=>{let e=P.layout.clickmode,l=P.layout.hovermode,o=P.layout.dragmode;g?(e="none",o="pan"):k&&(P.layout.clickmode||(e=E?"event+select":"none"),P.layout.hovermode||(l="closest"),P.layout.dragmode||(o=E?"pan":_?"select":V?"lasso":"pan")),H((t=>t.layout.clickmode===e&&t.layout.hovermode===l&&t.layout.dragmode===o?t:{...t,layout:{...t.layout,clickmode:e,hovermode:l,dragmode:o}}))}),[p.id,k,E,_,V,g]);let L=-1===u?null===(l=z.layout)||void 0===l?void 0:l.width:Math.max(p.useContainerWidth?u:Math.min(null!==(o=P.layout.width)&&void 0!==o?o:u,u),150),B=P.layout.height;S&&(L=u,B=f),z.layout.height===B&&z.layout.width===L||H((e=>({...e,layout:{...e.layout,height:B,width:L}})));const O=(0,t.useCallback)((e=>{v(e,h,p,m)}),[p.id,h,m]),N=(0,t.useCallback)((function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];!function(e,l,o){const t=e.getStringValue(l),r=JSON.stringify({selection:{points:[],point_indices:[],box:[],lasso:[]}});t!==r&&e.setStringValue(l,r,{fromUi:!0},o)}(h,p,m),e&&setTimeout((()=>{H((e=>({...e,data:e.data.map((e=>({...e,selectedpoints:null}))),layout:{...e.layout,selections:[]}})))}),50)}),[p.id,h,m]);return(0,t.useEffect)((()=>{if(!p.formId||!k)return;const e=new s.o;return e.manageFormClearListener(h,p.formId,N),()=>{e.disconnect()}}),[p.formId,h,k,N]),(0,t.useEffect)((()=>{var e,l,o;if(!k)return;let t;t="select"===(null===(e=z.layout)||void 0===e?void 0:e.dragmode)||"lasso"===(null===(l=z.layout)||void 0===l?void 0:l.dragmode)?"event":E?"event+select":"none",(null===(o=z.layout)||void 0===o?void 0:o.clickmode)!==t&&H((e=>({...e,layout:{...e.layout,clickmode:t}})))}),[null===(c=z.layout)||void 0===c?void 0:c.dragmode]),(0,y.jsx)("div",{className:"stPlotlyChart","data-testid":"stPlotlyChart",children:(0,y.jsx)(i.A,{data:z.data,layout:z.layout,config:I,frames:null!==(a=z.frames)&&void 0!==a?a:void 0,style:{visibility:void 0===(null===(d=z.layout)||void 0===d?void 0:d.width)?"hidden":void 0},onSelected:k?O:()=>{},onDoubleClick:k?()=>N():void 0,onDeselect:k?()=>{N(!1)}:void 0,onInitialized:e=>{h.setElementState(p.id,"figure",e)},onUpdate:e=>{h.setElementState(p.id,"figure",e),H(e)}},S?"fullscreen":"original")})}),!0)},55516:(e,l,o)=>{o.d(l,{A:()=>u});o(58878);var t=o(53124),r=o.n(t),i=o(41514),n=o(67214),c=o(64611),a=o(98226),s=o(4883),d=o(90782);const p=e=>{let{children:l,width:o,height:t,disableFullscreenMode:r}=e;const{expanded:p,fullHeight:u,fullWidth:f,zoomIn:h,zoomOut:g}=(0,a.H)();let m=i.u,y=h,A="View fullscreen";return p&&(m=n.Q,y=g,A="Exit fullscreen"),(0,d.jsxs)(s.g,{isExpanded:p,"data-testid":"stFullScreenFrame",children:[!r&&(0,d.jsx)(s.j,{"data-testid":"StyledFullScreenButton",onClick:y,title:A,isExpanded:p,children:(0,d.jsx)(c.A,{content:m})}),l({width:p?f:o,height:p?u:t,expanded:p,expand:h,collapse:g})]})};const u=function(e){let l=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=o=>{const{width:t,height:r,disableFullscreenMode:i}=o;return(0,d.jsx)(p,{width:t,height:r,disableFullscreenMode:l||i,children:l=>{let{width:t,height:r,expanded:i,expand:n,collapse:c}=l;return(0,d.jsx)(e,{...o,width:t,height:r,isFullScreen:i,expand:n,collapse:c})}})};return o.displayName=`withFullScreenWrapper(${e.displayName||e.name})`,r()(o,e)}},34752:(e,l,o)=>{o.d(l,{X:()=>n,o:()=>i});var t=o(58878),r=o(25571);class i{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(e,l,o){(0,r.se)(this.formClearListener)&&this.lastWidgetMgr===e&&this.lastFormId===l||(this.disconnect(),(0,r._L)(l)&&(this.formClearListener=e.addFormClearedListener(l,o),this.lastWidgetMgr=e,this.lastFormId=l))}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 n(e){let{element:l,widgetMgr:o,onFormCleared:i}=e;(0,t.useEffect)((()=>{if(!(0,r._L)(l.formId))return;const e=o.addFormClearedListener(l.formId,i);return()=>{e.disconnect()}}),[l,o,i])}}}]);
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[8460],{78460:(e,t,i)=>{i.r(t),i.d(t,{default:()=>E});var o=i(58878),n=i(60667),s=i(8151),a=i(72037),r=i(14716),l=i(28430),d=i(71034),c=i.n(d),h=i(25571),g=i(84996),m=i(55516),p=i(67253),u=i(34752),f=i(85729);const b={DATAFRAME_INDEX:"(index)"},w=new Set([f.sj.DatetimeIndex,f.sj.Float64Index,f.sj.Int64Index,f.sj.RangeIndex,f.sj.UInt64Index]);function v(e){var t;if(0===(null===(t=e.datasets)||void 0===t?void 0:t.length))return null;const i={};return e.datasets.forEach((e=>{if(!e)return;const t=e.hasName?e.name:null;i[t]=e.data})),i}function x(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(e.isEmpty())return[];const i=[],{dataRows:o,dataColumns:n}=e.dimensions,s=f.D0.getTypeName(e.types.index[0]),a=w.has(s);for(let r=t;r<o;r++){const t={};if(a){const i=e.getIndexValue(r,0);t[b.DATAFRAME_INDEX]="bigint"===typeof i?Number(i):i}for(let i=0;i<n;i++){const o=e.getDataValue(r,i),n=e.types.data[i],s=f.D0.getTypeName(n);if("datetimetz"!==s&&(o instanceof Date||Number.isFinite(o))&&(s.startsWith("datetime")||"date"===s)){const n=60*new Date(o).getTimezoneOffset()*1e3;t[e.columns[0][i]]=o.valueOf()+n}else t[e.columns[0][i]]="bigint"===typeof o?Number(o):o}i.push(t)}return i}var y=i(37638),S=i.n(y),F=i(42274),z=i.n(F),C=i(58144);function W(e,t){const i={font:t.genericFonts.bodyFont,background:t.colors.bgColor,fieldTitle:"verbal",autosize:{type:"fit",contains:"padding"},title:{align:"left",anchor:"start",color:t.colors.headingColor,titleFontStyle:"normal",fontWeight:t.fontWeights.bold,fontSize:t.fontSizes.smPx+2,orient:"top",offset:26},header:{titleFontWeight:t.fontWeights.normal,titleFontSize:t.fontSizes.mdPx,titleColor:(0,C.lH)(t),titleFontStyle:"normal",labelFontSize:t.fontSizes.twoSmPx,labelFontWeight:t.fontWeights.normal,labelColor:(0,C.lH)(t),labelFontStyle:"normal"},axis:{labelFontSize:t.fontSizes.twoSmPx,labelFontWeight:t.fontWeights.normal,labelColor:(0,C.lH)(t),labelFontStyle:"normal",titleFontWeight:t.fontWeights.normal,titleFontSize:t.fontSizes.smPx,titleColor:(0,C.lH)(t),titleFontStyle:"normal",ticks:!1,gridColor:(0,C.V9)(t),domain:!1,domainWidth:1,domainColor:(0,C.V9)(t),labelFlush:!0,labelFlushOffset:1,labelBound:!1,labelLimit:100,titlePadding:t.spacing.lgPx,labelPadding:t.spacing.lgPx,labelSeparation:t.spacing.twoXSPx,labelOverlap:!0},legend:{labelFontSize:t.fontSizes.smPx,labelFontWeight:t.fontWeights.normal,labelColor:(0,C.lH)(t),titleFontSize:t.fontSizes.smPx,titleFontWeight:t.fontWeights.normal,titleFontStyle:"normal",titleColor:(0,C.lH)(t),titlePadding:5,labelPadding:t.spacing.lgPx,columnPadding:t.spacing.smPx,rowPadding:t.spacing.twoXSPx,padding:7,symbolStrokeWidth:4},range:{category:(0,C.c6)(t),diverging:(0,C.vk)(t),ramp:(0,C.rp)(t),heatmap:(0,C.rp)(t)},view:{columns:1,strokeWidth:0,stroke:"transparent",continuousHeight:350,continuousWidth:400},concat:{columns:1},facet:{columns:1},mark:{tooltip:!0,color:(0,C.h7)(t)},bar:{binSpacing:t.spacing.twoXSPx,discreteBandSize:{band:.85}},axisDiscrete:{grid:!1},axisXPoint:{grid:!1},axisTemporal:{grid:!1},axisXBand:{grid:!1}};return e?z()({},i,e,((e,t)=>Array.isArray(t)?t:void 0)):i}var V=i(89653),D=i(32735);const k=e=>({"#vg-tooltip-element":{visibility:"hidden",position:"fixed",fontFamily:e.genericFonts.bodyFont,color:e.colors.bodyText,border:`${e.sizes.borderWidth} solid ${e.colors.borderColor}`,backgroundColor:(0,D.No)(e.colors.bgColor,.05),fontSize:e.fontSizes.twoSm,boxShadow:"rgb(0 0 0 / 16%) 0px 1px 4px",maxWidth:e.sizes.maxChartTooltipWidth,padding:`${e.spacing.xs} ${e.spacing.md}`,borderRadius:e.radii.default,zIndex:e.zIndices.vegaTooltips,"&.visible":{visibility:"visible"},h2:{marginTop:e.spacing.none,marginBottom:e.spacing.sm,fontSize:e.fontSizes.sm},td:{border:"none"},table:{borderSpacing:0,tr:{border:"none",td:{overflow:"hidden",textOverflow:"ellipsis",paddingTop:e.spacing.threeXS,paddingBottom:e.spacing.threeXS},"td.key":{maxWidth:`calc((${e.sizes.maxChartTooltipWidth} - 2 * ${e.spacing.md}) * 0.4)`,textAlign:"right",color:e.colors.fadedText60,whiteSpace:"nowrap",paddingRight:e.spacing.twoXS},"td.value":{maxWidth:`calc((${e.sizes.maxChartTooltipWidth} - 2 * ${e.spacing.md}) * 0.6)`,textAlign:"left",display:"-webkit-box",WebkitLineClamp:"5",WebkitBoxOrient:"vertical",lineClamp:"5",wordWrap:"break-word"}}}}}),T=(0,V.A)("div",{target:"egd2k5h0"})((e=>{let{theme:t,useContainerWidth:i,isFullScreen:o}=e;return{width:i||o?"100%":"auto",height:o?"100%":"auto","&.vega-embed":{position:"relative",display:"inline-block",boxSizing:"border-box","details:not([open]) > :not(summary)":{display:"none !important"},"details[open] summary":{opacity:.7},"&:hover summary, .vega-embed:focus summary":{background:"transparent"},"&:hover summary, &:focus-within summary":{opacity:"1 !important",transition:"opacity 0.2s ease"},"&.has-actions":{paddingRight:0},".vega-actions":{position:"absolute",display:"flex",flexDirection:"column",paddingBottom:t.spacing.sm,paddingTop:t.spacing.sm,zIndex:t.zIndices.popupMenu,top:`calc(${t.iconSizes.md} + 2 * ${t.spacing.xs} + ${t.spacing.xs})`,right:0,backgroundColor:t.colors.bgColor,boxShadow:"rgb(0 0 0 / 16%) 0px 4px 16px",border:`${t.sizes.borderWidth} solid ${t.colors.fadedText10}`,animationDuration:"0.15s",animationName:"scale-in",animationTimingFunction:"cubic-bezier(0.2, 0, 0.13, 1.5)",textAlign:"left",borderRadius:t.radii.default,a:{fontFamily:t.genericFonts.bodyFont,fontWeight:t.fontWeights.normal,fontSize:t.fontSizes.md,margin:0,padding:`${t.spacing.twoXS} ${t.spacing.twoXL}`,color:t.colors.bodyText,whiteSpace:"nowrap",textDecoration:"none"},"a:hover, a:focus":{backgroundColor:t.colors.secondaryBg,color:t.colors.bodyText},":before":{content:"none"},":after":{content:"none"}},"@keyframes scale-in":{from:{opacity:0,transform:"scale(0.6)"},to:{opacity:1,transform:"scale(1)"}},".chart-wrapper":{"&.fit-x":{width:"100%"},"&.fit-y":{height:"100%"}},summary:{position:"absolute",top:0,right:0,opacity:0,listStyle:"none",padding:t.spacing.xs,height:"auto",zIndex:t.zIndices.menuButton,border:"none",boxShadow:"none",borderRadius:t.radii.default,color:t.colors.fadedText10,backgroundColor:"transparent",transition:"opacity 300ms 150ms,transform 300ms 150ms",cursor:"pointer",lineHeight:0,"&::-webkit-details-marker":{display:"none"},"&:active, &:focus-visible, &:hover":{border:"none",boxShadow:"none",color:t.colors.bodyText,opacity:"1 !important",background:t.colors.darkenedBgMix25},svg:{width:t.iconSizes.md,height:t.iconSizes.md}}}}}),"");var P=i(90782);const I="source";class O extends o.PureComponent{constructor(){super(...arguments),this.vegaView=void 0,this.vegaFinalizer=void 0,this.defaultDataName=I,this.element=null,this.formClearHelper=new u.o,this.state={error:void 0},this.finalizeView=()=>{this.vegaFinalizer&&this.vegaFinalizer(),this.vegaFinalizer=void 0,this.vegaView=void 0},this.generateSpec=()=>{var e,t;const{element:i,theme:o,isFullScreen:n,width:s,height:a}=this.props,r=JSON.parse(i.spec),{useContainerWidth:l}=i;if("streamlit"===i.vegaLiteTheme?r.config=W(r.config,o):"streamlit"===(null===(e=r.usermeta)||void 0===e||null===(t=e.embedOptions)||void 0===t?void 0:t.theme)?(r.config=W(r.config,o),r.usermeta.embedOptions.theme=void 0):r.config=function(e,t){const{colors:i,fontSizes:o,genericFonts:n}=t,s={labelFont:n.bodyFont,titleFont:n.bodyFont,labelFontSize:o.twoSmPx,titleFontSize:o.twoSmPx},a={background:i.bgColor,axis:{labelColor:i.bodyText,titleColor:i.bodyText,gridColor:(0,C.V9)(t),...s},legend:{labelColor:i.bodyText,titleColor:i.bodyText,...s},title:{color:i.bodyText,subtitleColor:i.bodyText,...s},header:{labelColor:i.bodyText,titleColor:i.bodyText,...s},view:{stroke:(0,C.V9)(t),continuousHeight:350,continuousWidth:400},mark:{tooltip:!0}};return e?S()({},a,e):a}(r.config,o),n?(r.width=s,r.height=a,"vconcat"in r&&r.vconcat.forEach((e=>{e.width=s}))):l&&(r.width=s,"vconcat"in r&&r.vconcat.forEach((e=>{e.width=s}))),r.padding||(r.padding={}),(0,h.hX)(r.padding.bottom)&&(r.padding.bottom=20),r.datasets)throw new Error("Datasets should not be passed as part of the spec");return i.selectionMode.length>0&&function(e){"params"in e&&"encoding"in e&&e.params.forEach((t=>{"select"in t&&(["interval","point"].includes(t.select)&&(t.select={type:t.select}),"type"in t.select&&"point"===t.select.type&&!("encodings"in t.select)&&(0,h.hX)(t.select.encodings)&&(t.select.encodings=Object.keys(e.encoding)))}))}(r),r},this.maybeConfigureSelections=()=>{if(void 0===this.vegaView)return;const{widgetMgr:e,element:t}=this.props;if(null===t||void 0===t||!t.id||0===t.selectionMode.length)return;const i=e.getElementState(this.props.element.id,"viewState");if((0,h.se)(i))try{this.vegaView=this.vegaView.setState(i)}catch(n){(0,g.FF)("Failed to restore view state",n)}t.selectionMode.forEach(((i,o)=>{var n;null===(n=this.vegaView)||void 0===n||n.addSignalListener(i,(0,h.sg)(150,((i,o)=>{var n;const s=null===(n=this.vegaView)||void 0===n?void 0:n.getState({data:(e,i)=>t.selectionMode.some((t=>`${t}_store`===e)),recurse:!1});(0,h.se)(s)&&e.setElementState(t.id,"viewState",s);let a=o;"vlPoint"in o&&"or"in o.vlPoint&&(a=o.vlPoint.or);const r=JSON.parse(e.getStringValue(t)||"{}"),l={selection:{...(null===r||void 0===r?void 0:r.selection)||{},[i]:a||{}}};c()(r,l)||e.setStringValue(t,JSON.stringify(l),{fromUi:!0},this.props.fragmentId)})))}));const o=()=>{const i={selection:{}};this.props.element.selectionMode.forEach((e=>{i.selection[e]={}}));const o=e.getStringValue(t),n=o?JSON.parse(o):i;var s;c()(n,i)||(null===(s=this.props.widgetMgr)||void 0===s||s.setStringValue(this.props.element,JSON.stringify(i),{fromUi:!0},this.props.fragmentId))};this.props.element.formId&&this.formClearHelper.manageFormClearListener(this.props.widgetMgr,this.props.element.formId,o)}}async componentDidMount(){try{await this.createView()}catch(e){const t=(0,p.$)(e);this.setState({error:t})}}componentWillUnmount(){this.finalizeView()}async componentDidUpdate(e){const{element:t,theme:i}=e,{element:o,theme:n}=this.props,s=t.spec,{spec:a}=o;if(!this.vegaView||s!==a||i!==n||e.width!==this.props.width||e.height!==this.props.height||e.element.vegaLiteTheme!==this.props.element.vegaLiteTheme||!c()(e.element.selectionMode,this.props.element.selectionMode)){(0,g.OG)("Vega spec changed.");try{await this.createView()}catch(m){const e=(0,p.$)(m);this.setState({error:e})}return}const r=t.data,{data:l}=o;(r||l)&&this.updateData(this.defaultDataName,r,l);const d=v(t)||{},h=v(o)||{};for(const[c,g]of Object.entries(h)){const e=c||this.defaultDataName,t=d[e];this.updateData(e,t,g)}for(const c of Object.keys(d))h.hasOwnProperty(c)||c===this.defaultDataName||this.updateData(c,null,null);this.vegaView.resize().runAsync()}updateData(e,t,i){if(!this.vegaView)throw new Error("Chart has not been drawn yet");if(!i||0===i.data.numRows)try{this.vegaView.remove(e,r.truthy)}finally{return}if(!t||0===t.data.numRows)return void this.vegaView.insert(e,x(i));const{dataRows:o,dataColumns:n}=t.dimensions,{dataRows:s,dataColumns:a}=i.dimensions;!function(e,t,i,o,n,s){if(i!==s)return!1;if(t>=n)return!1;if(0===t)return!1;const a=s-1,r=t-1;return e.getDataValue(0,a)===o.getDataValue(0,a)&&e.getDataValue(r,a)===o.getDataValue(r,a)}(t,o,n,i,s,a)?(this.vegaView.data(e,x(i)),(0,g.OG)(`Had to clear the ${e} dataset before inserting data through Vega view.`)):o<s&&this.vegaView.insert(e,x(i,o))}async createView(){if((0,g.OG)("Creating a new Vega view."),!this.element)throw Error("Element missing.");this.finalizeView();const{element:e}=this.props,t=this.generateSpec(),i={ast:!0,expr:l.P,tooltip:{disableDefaultStyle:!0},defaultStyle:!1,forceActionsMenu:!0},{vgSpec:o,view:n,finalize:s}=await(0,a.Ay)(this.element,t,i);this.vegaView=n,this.maybeConfigureSelections(),this.vegaFinalizer=s;const r=function(e){const t=v(e);if((0,h.hX)(t))return null;const i={};for(const[o,n]of Object.entries(t))i[o]=x(n);return i}(e),d=r?Object.keys(r):[];if(1===d.length){const[e]=d;this.defaultDataName=e}else 0===d.length&&o.data&&(this.defaultDataName=I);const c=function(e){const t=e.data;return t&&0!==t.data.numRows?x(t):null}(e);if(c&&n.insert(this.defaultDataName,c),r)for(const[a,l]of Object.entries(r))n.insert(a,l);await n.runAsync(),this.vegaView.resize().runAsync()}render(){if(this.state.error)throw this.state.error;return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(n.mL,{styles:k}),(0,P.jsx)(T,{"data-testid":"stVegaLiteChart",className:"stVegaLiteChart",useContainerWidth:this.props.element.useContainerWidth,isFullScreen:this.props.isFullScreen,ref:e=>{this.element=e}})]})}}const E=(0,s.b)((0,m.A)(O))},55516:(e,t,i)=>{i.d(t,{A:()=>f});var o=i(58878),n=i(53124),s=i.n(n),a=i(8151),r=i(41514),l=i(67214),d=i(64611),c=i(84152),h=i(25571),g=i(4883),m=i(90782);class p extends o.PureComponent{constructor(e){super(e),this.context=void 0,this.controlKeys=e=>{const{expanded:t}=this.state;27===e.keyCode&&t&&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.getWindowDimensions=()=>{const e=(0,h.NE)(this.props.theme.spacing.md),t=(0,h.NE)(this.props.theme.sizes.fullScreenHeaderHeight);return{fullWidth:window.innerWidth-2*e,fullHeight:window.innerHeight-(e+t)}},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:t,fullHeight:i}=this.state,{children:o,width:n,height:s,disableFullscreenMode:a}=this.props;let c=r.u,h=this.zoomIn,p="View fullscreen";return e&&(c=l.Q,h=this.zoomOut,p="Exit fullscreen"),(0,m.jsxs)(g.g,{isExpanded:e,"data-testid":"stFullScreenFrame",children:[!a&&(0,m.jsx)(g.j,{"data-testid":"StyledFullScreenButton",onClick:h,title:p,isExpanded:e,children:(0,m.jsx)(d.A,{content:c})}),o(e?{width:t,height:i,expanded:e,expand:this.zoomIn,collapse:this.zoomOut}:{width:n,height:s,expanded:e,expand:this.zoomIn,collapse:this.zoomOut})]})}}p.contextType=c.n;const u=(0,a.b)(p);const f=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];class i extends o.PureComponent{constructor(){super(...arguments),this.render=()=>{const{width:i,height:o,disableFullscreenMode:n}=this.props;return(0,m.jsx)(u,{width:i,height:o,disableFullscreenMode:t||n,children:t=>{let{width:i,height:o,expanded:n,expand:s,collapse:a}=t;return(0,m.jsx)(e,{...this.props,width:i,height:o,isFullScreen:n,expand:s,collapse:a})}})}}}return i.displayName=`withFullScreenWrapper(${e.displayName||e.name})`,s()(i,e)}},34752:(e,t,i)=>{i.d(t,{X:()=>a,o:()=>s});var o=i(58878),n=i(25571);class s{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(e,t,i){(0,n.se)(this.formClearListener)&&this.lastWidgetMgr===e&&this.lastFormId===t||(this.disconnect(),(0,n._L)(t)&&(this.formClearListener=e.addFormClearedListener(t,i),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:i,onFormCleared:s}=e;(0,o.useEffect)((()=>{if(!(0,n._L)(t.formId))return;const e=i.addFormClearedListener(t.formId,s);return()=>{e.disconnect()}}),[t,i,s])}}}]);
|
1
|
+
"use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[8460],{78460:(e,t,i)=>{i.r(t),i.d(t,{default:()=>M});var o=i(58878),n=i(60667),a=i(8151),s=i(72037),r=i(14716),l=i(28430),d=i(71034),c=i.n(d),h=i(25571),g=i(84996),m=i(55516),p=i(67253),u=i(34752),f=i(85729);const b={DATAFRAME_INDEX:"(index)"},v=new Set([f.sj.DatetimeIndex,f.sj.Float64Index,f.sj.Int64Index,f.sj.RangeIndex,f.sj.UInt64Index]);function w(e){var t;if(0===(null===(t=e.datasets)||void 0===t?void 0:t.length))return null;const i={};return e.datasets.forEach((e=>{if(!e)return;const t=e.hasName?e.name:null;i[t]=e.data})),i}function x(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(e.isEmpty())return[];const i=[],{dataRows:o,dataColumns:n}=e.dimensions,a=f.D0.getTypeName(e.types.index[0]),s=v.has(a);for(let r=t;r<o;r++){const t={};if(s){const i=e.getIndexValue(r,0);t[b.DATAFRAME_INDEX]="bigint"===typeof i?Number(i):i}for(let i=0;i<n;i++){const o=e.getDataValue(r,i),n=e.types.data[i],a=f.D0.getTypeName(n);if("datetimetz"!==a&&(o instanceof Date||Number.isFinite(o))&&(a.startsWith("datetime")||"date"===a)){const n=60*new Date(o).getTimezoneOffset()*1e3;t[e.columns[0][i]]=o.valueOf()+n}else t[e.columns[0][i]]="bigint"===typeof o?Number(o):o}i.push(t)}return i}var y=i(37638),S=i.n(y),F=i(42274),C=i.n(F),z=i(58144);function W(e,t){const i={font:t.genericFonts.bodyFont,background:t.colors.bgColor,fieldTitle:"verbal",autosize:{type:"fit",contains:"padding"},title:{align:"left",anchor:"start",color:t.colors.headingColor,titleFontStyle:"normal",fontWeight:t.fontWeights.bold,fontSize:t.fontSizes.smPx+2,orient:"top",offset:26},header:{titleFontWeight:t.fontWeights.normal,titleFontSize:t.fontSizes.mdPx,titleColor:(0,z.lH)(t),titleFontStyle:"normal",labelFontSize:t.fontSizes.twoSmPx,labelFontWeight:t.fontWeights.normal,labelColor:(0,z.lH)(t),labelFontStyle:"normal"},axis:{labelFontSize:t.fontSizes.twoSmPx,labelFontWeight:t.fontWeights.normal,labelColor:(0,z.lH)(t),labelFontStyle:"normal",titleFontWeight:t.fontWeights.normal,titleFontSize:t.fontSizes.smPx,titleColor:(0,z.lH)(t),titleFontStyle:"normal",ticks:!1,gridColor:(0,z.V9)(t),domain:!1,domainWidth:1,domainColor:(0,z.V9)(t),labelFlush:!0,labelFlushOffset:1,labelBound:!1,labelLimit:100,titlePadding:t.spacing.lgPx,labelPadding:t.spacing.lgPx,labelSeparation:t.spacing.twoXSPx,labelOverlap:!0},legend:{labelFontSize:t.fontSizes.smPx,labelFontWeight:t.fontWeights.normal,labelColor:(0,z.lH)(t),titleFontSize:t.fontSizes.smPx,titleFontWeight:t.fontWeights.normal,titleFontStyle:"normal",titleColor:(0,z.lH)(t),titlePadding:5,labelPadding:t.spacing.lgPx,columnPadding:t.spacing.smPx,rowPadding:t.spacing.twoXSPx,padding:7,symbolStrokeWidth:4},range:{category:(0,z.c6)(t),diverging:(0,z.vk)(t),ramp:(0,z.rp)(t),heatmap:(0,z.rp)(t)},view:{columns:1,strokeWidth:0,stroke:"transparent",continuousHeight:350,continuousWidth:400},concat:{columns:1},facet:{columns:1},mark:{tooltip:!0,color:(0,z.h7)(t)},bar:{binSpacing:t.spacing.twoXSPx,discreteBandSize:{band:.85}},axisDiscrete:{grid:!1},axisXPoint:{grid:!1},axisTemporal:{grid:!1},axisXBand:{grid:!1}};return e?C()({},i,e,((e,t)=>Array.isArray(t)?t:void 0)):i}var V=i(89653),k=i(32735);const D=e=>({"#vg-tooltip-element":{visibility:"hidden",position:"fixed",fontFamily:e.genericFonts.bodyFont,color:e.colors.bodyText,border:`${e.sizes.borderWidth} solid ${e.colors.borderColor}`,backgroundColor:(0,k.No)(e.colors.bgColor,.05),fontSize:e.fontSizes.twoSm,boxShadow:"rgb(0 0 0 / 16%) 0px 1px 4px",maxWidth:e.sizes.maxChartTooltipWidth,padding:`${e.spacing.xs} ${e.spacing.md}`,borderRadius:e.radii.default,zIndex:e.zIndices.vegaTooltips,"&.visible":{visibility:"visible"},h2:{marginTop:e.spacing.none,marginBottom:e.spacing.sm,fontSize:e.fontSizes.sm},td:{border:"none"},table:{borderSpacing:0,tr:{border:"none",td:{overflow:"hidden",textOverflow:"ellipsis",paddingTop:e.spacing.threeXS,paddingBottom:e.spacing.threeXS},"td.key":{maxWidth:`calc((${e.sizes.maxChartTooltipWidth} - 2 * ${e.spacing.md}) * 0.4)`,textAlign:"right",color:e.colors.fadedText60,whiteSpace:"nowrap",paddingRight:e.spacing.twoXS},"td.value":{maxWidth:`calc((${e.sizes.maxChartTooltipWidth} - 2 * ${e.spacing.md}) * 0.6)`,textAlign:"left",display:"-webkit-box",WebkitLineClamp:"5",WebkitBoxOrient:"vertical",lineClamp:"5",wordWrap:"break-word"}}}}}),T=(0,V.A)("div",{target:"egd2k5h0"})((e=>{let{theme:t,useContainerWidth:i,isFullScreen:o}=e;return{width:i||o?"100%":"auto",height:o?"100%":"auto","&.vega-embed":{position:"relative",display:"inline-block",boxSizing:"border-box","details:not([open]) > :not(summary)":{display:"none !important"},"details[open] summary":{opacity:.7},"&:hover summary, .vega-embed:focus summary":{background:"transparent"},"&:hover summary, &:focus-within summary":{opacity:"1 !important",transition:"opacity 0.2s ease"},"&.has-actions":{paddingRight:0},".vega-actions":{position:"absolute",display:"flex",flexDirection:"column",paddingBottom:t.spacing.sm,paddingTop:t.spacing.sm,zIndex:t.zIndices.popupMenu,top:`calc(${t.iconSizes.md} + 2 * ${t.spacing.xs} + ${t.spacing.xs})`,right:0,backgroundColor:t.colors.bgColor,boxShadow:"rgb(0 0 0 / 16%) 0px 4px 16px",border:`${t.sizes.borderWidth} solid ${t.colors.fadedText10}`,animationDuration:"0.15s",animationName:"scale-in",animationTimingFunction:"cubic-bezier(0.2, 0, 0.13, 1.5)",textAlign:"left",borderRadius:t.radii.default,a:{fontFamily:t.genericFonts.bodyFont,fontWeight:t.fontWeights.normal,fontSize:t.fontSizes.md,margin:0,padding:`${t.spacing.twoXS} ${t.spacing.twoXL}`,color:t.colors.bodyText,whiteSpace:"nowrap",textDecoration:"none"},"a:hover, a:focus":{backgroundColor:t.colors.secondaryBg,color:t.colors.bodyText},":before":{content:"none"},":after":{content:"none"}},"@keyframes scale-in":{from:{opacity:0,transform:"scale(0.6)"},to:{opacity:1,transform:"scale(1)"}},".chart-wrapper":{"&.fit-x":{width:"100%"},"&.fit-y":{height:"100%"}},summary:{position:"absolute",top:0,right:0,opacity:0,listStyle:"none",padding:t.spacing.xs,height:"auto",zIndex:t.zIndices.menuButton,border:"none",boxShadow:"none",borderRadius:t.radii.default,color:t.colors.fadedText10,backgroundColor:"transparent",transition:"opacity 300ms 150ms,transform 300ms 150ms",cursor:"pointer",lineHeight:0,"&::-webkit-details-marker":{display:"none"},"&:active, &:focus-visible, &:hover":{border:"none",boxShadow:"none",color:t.colors.bodyText,opacity:"1 !important",background:t.colors.darkenedBgMix25},svg:{width:t.iconSizes.md,height:t.iconSizes.md}}}}}),"");var P=i(90782);const I="source";class N extends o.PureComponent{constructor(){super(...arguments),this.vegaView=void 0,this.vegaFinalizer=void 0,this.defaultDataName=I,this.element=null,this.formClearHelper=new u.o,this.state={error:void 0},this.finalizeView=()=>{this.vegaFinalizer&&this.vegaFinalizer(),this.vegaFinalizer=void 0,this.vegaView=void 0},this.generateSpec=()=>{var e,t;const{element:i,theme:o,isFullScreen:n,width:a,height:s}=this.props,r=JSON.parse(i.spec),{useContainerWidth:l}=i;if("streamlit"===i.vegaLiteTheme?r.config=W(r.config,o):"streamlit"===(null===(e=r.usermeta)||void 0===e||null===(t=e.embedOptions)||void 0===t?void 0:t.theme)?(r.config=W(r.config,o),r.usermeta.embedOptions.theme=void 0):r.config=function(e,t){const{colors:i,fontSizes:o,genericFonts:n}=t,a={labelFont:n.bodyFont,titleFont:n.bodyFont,labelFontSize:o.twoSmPx,titleFontSize:o.twoSmPx},s={background:i.bgColor,axis:{labelColor:i.bodyText,titleColor:i.bodyText,gridColor:(0,z.V9)(t),...a},legend:{labelColor:i.bodyText,titleColor:i.bodyText,...a},title:{color:i.bodyText,subtitleColor:i.bodyText,...a},header:{labelColor:i.bodyText,titleColor:i.bodyText,...a},view:{stroke:(0,z.V9)(t),continuousHeight:350,continuousWidth:400},mark:{tooltip:!0}};return e?S()({},s,e):s}(r.config,o),n?(r.width=a,r.height=s,"vconcat"in r&&r.vconcat.forEach((e=>{e.width=a}))):l&&(r.width=a,"vconcat"in r&&r.vconcat.forEach((e=>{e.width=a}))),r.padding||(r.padding={}),(0,h.hX)(r.padding.bottom)&&(r.padding.bottom=20),r.datasets)throw new Error("Datasets should not be passed as part of the spec");return i.selectionMode.length>0&&function(e){"params"in e&&"encoding"in e&&e.params.forEach((t=>{"select"in t&&(["interval","point"].includes(t.select)&&(t.select={type:t.select}),"type"in t.select&&"point"===t.select.type&&!("encodings"in t.select)&&(0,h.hX)(t.select.encodings)&&(t.select.encodings=Object.keys(e.encoding)))}))}(r),r},this.maybeConfigureSelections=()=>{if(void 0===this.vegaView)return;const{widgetMgr:e,element:t}=this.props;if(null===t||void 0===t||!t.id||0===t.selectionMode.length)return;const i=e.getElementState(this.props.element.id,"viewState");if((0,h.se)(i))try{this.vegaView=this.vegaView.setState(i)}catch(n){(0,g.FF)("Failed to restore view state",n)}t.selectionMode.forEach(((i,o)=>{var n;null===(n=this.vegaView)||void 0===n||n.addSignalListener(i,(0,h.sg)(150,((i,o)=>{var n;const a=null===(n=this.vegaView)||void 0===n?void 0:n.getState({data:(e,i)=>t.selectionMode.some((t=>`${t}_store`===e)),recurse:!1});(0,h.se)(a)&&e.setElementState(t.id,"viewState",a);let s=o;"vlPoint"in o&&"or"in o.vlPoint&&(s=o.vlPoint.or);const r=JSON.parse(e.getStringValue(t)||"{}"),l={selection:{...(null===r||void 0===r?void 0:r.selection)||{},[i]:s||{}}};c()(r,l)||e.setStringValue(t,JSON.stringify(l),{fromUi:!0},this.props.fragmentId)})))}));const o=()=>{const i={selection:{}};this.props.element.selectionMode.forEach((e=>{i.selection[e]={}}));const o=e.getStringValue(t),n=o?JSON.parse(o):i;var a;c()(n,i)||(null===(a=this.props.widgetMgr)||void 0===a||a.setStringValue(this.props.element,JSON.stringify(i),{fromUi:!0},this.props.fragmentId))};this.props.element.formId&&this.formClearHelper.manageFormClearListener(this.props.widgetMgr,this.props.element.formId,o)}}async componentDidMount(){try{await this.createView()}catch(e){const t=(0,p.$)(e);this.setState({error:t})}}componentWillUnmount(){this.finalizeView()}async componentDidUpdate(e){const{element:t,theme:i}=e,{element:o,theme:n}=this.props,a=t.spec,{spec:s}=o;if(!this.vegaView||a!==s||i!==n||e.width!==this.props.width||e.height!==this.props.height||e.element.vegaLiteTheme!==this.props.element.vegaLiteTheme||!c()(e.element.selectionMode,this.props.element.selectionMode)){(0,g.OG)("Vega spec changed.");try{await this.createView()}catch(m){const e=(0,p.$)(m);this.setState({error:e})}return}const r=t.data,{data:l}=o;(r||l)&&this.updateData(this.defaultDataName,r,l);const d=w(t)||{},h=w(o)||{};for(const[c,g]of Object.entries(h)){const e=c||this.defaultDataName,t=d[e];this.updateData(e,t,g)}for(const c of Object.keys(d))h.hasOwnProperty(c)||c===this.defaultDataName||this.updateData(c,null,null);this.vegaView.resize().runAsync()}updateData(e,t,i){if(!this.vegaView)throw new Error("Chart has not been drawn yet");if(!i||0===i.data.numRows)try{this.vegaView.remove(e,r.truthy)}finally{return}if(!t||0===t.data.numRows)return void this.vegaView.insert(e,x(i));const{dataRows:o,dataColumns:n}=t.dimensions,{dataRows:a,dataColumns:s}=i.dimensions;!function(e,t,i,o,n,a){if(i!==a)return!1;if(t>=n)return!1;if(0===t)return!1;const s=a-1,r=t-1;return e.getDataValue(0,s)===o.getDataValue(0,s)&&e.getDataValue(r,s)===o.getDataValue(r,s)}(t,o,n,i,a,s)?(this.vegaView.data(e,x(i)),(0,g.OG)(`Had to clear the ${e} dataset before inserting data through Vega view.`)):o<a&&this.vegaView.insert(e,x(i,o))}async createView(){if((0,g.OG)("Creating a new Vega view."),!this.element)throw Error("Element missing.");this.finalizeView();const{element:e}=this.props,t=this.generateSpec(),i={ast:!0,expr:l.P,tooltip:{disableDefaultStyle:!0},defaultStyle:!1,forceActionsMenu:!0},{vgSpec:o,view:n,finalize:a}=await(0,s.Ay)(this.element,t,i);this.vegaView=n,this.maybeConfigureSelections(),this.vegaFinalizer=a;const r=function(e){const t=w(e);if((0,h.hX)(t))return null;const i={};for(const[o,n]of Object.entries(t))i[o]=x(n);return i}(e),d=r?Object.keys(r):[];if(1===d.length){const[e]=d;this.defaultDataName=e}else 0===d.length&&o.data&&(this.defaultDataName=I);const c=function(e){const t=e.data;return t&&0!==t.data.numRows?x(t):null}(e);if(c&&n.insert(this.defaultDataName,c),r)for(const[s,l]of Object.entries(r))n.insert(s,l);await n.runAsync(),this.vegaView.resize().runAsync()}render(){if(this.state.error)throw this.state.error;return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(n.mL,{styles:D}),(0,P.jsx)(T,{"data-testid":"stVegaLiteChart",className:"stVegaLiteChart",useContainerWidth:this.props.element.useContainerWidth,isFullScreen:this.props.isFullScreen,ref:e=>{this.element=e}})]})}}const M=(0,a.b)((0,m.A)(N))},55516:(e,t,i)=>{i.d(t,{A:()=>g});i(58878);var o=i(53124),n=i.n(o),a=i(41514),s=i(67214),r=i(64611),l=i(98226),d=i(4883),c=i(90782);const h=e=>{let{children:t,width:i,height:o,disableFullscreenMode:n}=e;const{expanded:h,fullHeight:g,fullWidth:m,zoomIn:p,zoomOut:u}=(0,l.H)();let f=a.u,b=p,v="View fullscreen";return h&&(f=s.Q,b=u,v="Exit fullscreen"),(0,c.jsxs)(d.g,{isExpanded:h,"data-testid":"stFullScreenFrame",children:[!n&&(0,c.jsx)(d.j,{"data-testid":"StyledFullScreenButton",onClick:b,title:v,isExpanded:h,children:(0,c.jsx)(r.A,{content:f})}),t({width:h?m:i,height:h?g:o,expanded:h,expand:p,collapse:u})]})};const g=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i=i=>{const{width:o,height:n,disableFullscreenMode:a}=i;return(0,c.jsx)(h,{width:o,height:n,disableFullscreenMode:t||a,children:t=>{let{width:o,height:n,expanded:a,expand:s,collapse:r}=t;return(0,c.jsx)(e,{...i,width:o,height:n,isFullScreen:a,expand:s,collapse:r})}})};return i.displayName=`withFullScreenWrapper(${e.displayName||e.name})`,n()(i,e)}},34752:(e,t,i)=>{i.d(t,{X:()=>s,o:()=>a});var o=i(58878),n=i(25571);class a{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(e,t,i){(0,n.se)(this.formClearListener)&&this.lastWidgetMgr===e&&this.lastFormId===t||(this.disconnect(),(0,n._L)(t)&&(this.formClearListener=e.addFormClearedListener(t,i),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 s(e){let{element:t,widgetMgr:i,onFormCleared:a}=e;(0,o.useEffect)((()=>{if(!(0,n._L)(t.formId))return;const e=i.addFormClearedListener(t.formId,a);return()=>{e.disconnect()}}),[t,i,a])}}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[9923],{19923:(e,t,i)=>{i.r(t),i.d(t,{default:()=>c});i(58878);var n=i(55516),l=i(89653);const r=(0,l.A)("div",{target:"e115fcil2"})((e=>{let{theme:t}=e;return{display:"flex",flexDirection:"row",flexWrap:"wrap",rowGap:t.spacing.lg}}),""),a=(0,l.A)("div",{target:"e115fcil1"})({name:"1xf0csu",styles:"display:flex;flex-direction:column;align-items:stretch;width:auto;flex-grow:0"}),d=(0,l.A)("div",{target:"e115fcil0"})((e=>{let{theme:t}=e;return{fontFamily:t.genericFonts.bodyFont,fontSize:t.fontSizes.sm,color:t.colors.fadedText60,textAlign:"center",marginTop:t.spacing.xs,wordWrap:"break-word",padding:t.spacing.threeXS}}),"");var s,o=i(90782);!function(e){e[e.OriginalWidth=-1]="OriginalWidth",e[e.ColumnWidth=-2]="ColumnWidth",e[e.AutoWidth=-3]="AutoWidth",e[e.MinImageOrContainer=-4]="MinImageOrContainer",e[e.MaxImageOrContainer=-5]="MaxImageOrContainer"}(s||(s={}));const c=(0,n.A)((function(e){let t,{width:i,isFullScreen:n,element:l,height:c,endpoints:h}=e;const u=l.width;if([s.OriginalWidth,s.AutoWidth,s.MinImageOrContainer].includes(u))t=void 0;else if([s.ColumnWidth,s.MaxImageOrContainer].includes(u))t=i;else{if(!(u>0))throw Error(`Invalid image width: ${u}`);t=u}const m={};return c&&n?(m.maxHeight=c,m.objectFit="contain"):(m.width=t,m.maxWidth="100%"),(0,o.jsx)(r,{className:"stImage","data-testid":"stImage",style:{width:i},children:l.imgs.map(((e,t)=>{const i=e;return(0,o.jsxs)(a,{"data-testid":"stImageContainer",children:[(0,o.jsx)("img",{style:m,src:h.buildMediaURL(i.url),alt:t.toString()}),i.caption&&(0,o.jsx)(d,{"data-testid":"stImageCaption",style:m,children:` ${i.caption} `})]},t)}))})}))},55516:(e,t,i)=>{i.d(t,{A:()=>u});i(58878);var n=i(53124),l=i.n(n),r=i(41514),a=i(67214),d=i(64611),s=i(98226),o=i(4883),c=i(90782);const h=e=>{let{children:t,width:i,height:n,disableFullscreenMode:l}=e;const{expanded:h,fullHeight:u,fullWidth:m,zoomIn:g,zoomOut:p}=(0,s.H)();let x=r.u,f=g,w="View fullscreen";return h&&(x=a.Q,f=p,w="Exit fullscreen"),(0,c.jsxs)(o.g,{isExpanded:h,"data-testid":"stFullScreenFrame",children:[!l&&(0,c.jsx)(o.j,{"data-testid":"StyledFullScreenButton",onClick:f,title:w,isExpanded:h,children:(0,c.jsx)(d.A,{content:x})}),t({width:h?m:i,height:h?u:n,expanded:h,expand:g,collapse:p})]})};const u=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i=i=>{const{width:n,height:l,disableFullscreenMode:r}=i;return(0,c.jsx)(h,{width:n,height:l,disableFullscreenMode:t||r,children:t=>{let{width:n,height:l,expanded:r,expand:a,collapse:d}=t;return(0,c.jsx)(e,{...i,width:n,height:l,isFullScreen:r,expand:a,collapse:d})}})};return i.displayName=`withFullScreenWrapper(${e.displayName||e.name})`,l()(i,e)}},41514:(e,t,i)=>{i.d(t,{u:()=>a});var n=i(68102),l=i(58878),r=i(68622),a=l.forwardRef((function(e,t){return l.createElement(r.I,(0,n.A)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},e,{ref:t}),l.createElement("path",{d:"M0 0v4l1.5-1.5L3 4l1-1-1.5-1.5L4 0H0zm5 4L4 5l1.5 1.5L4 8h4V4L6.5 5.5 5 4z"}))}));a.displayName="FullscreenEnter"},67214:(e,t,i)=>{i.d(t,{Q:()=>a});var n=i(68102),l=i(58878),r=i(68622),a=l.forwardRef((function(e,t){return l.createElement(r.I,(0,n.A)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},e,{ref:t}),l.createElement("path",{d:"M1 0L0 1l1.5 1.5L0 4h4V0L2.5 1.5 1 0zm3 4v4l1.5-1.5L7 8l1-1-1.5-1.5L8 4H4z"}))}));a.displayName="FullscreenExit"}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[9943],{55516:(e,t,n)=>{n.d(t,{A:()=>m});n(58878);var i=n(53124),o=n.n(i),r=n(41514),l=n(67214),a=n(64611),s=n(98226),d=n(4883),u=n(90782);const c=e=>{let{children:t,width:n,height:i,disableFullscreenMode:o}=e;const{expanded:c,fullHeight:m,fullWidth:h,zoomIn:g,zoomOut:f}=(0,s.H)();let p=r.u,v=g,b="View fullscreen";return c&&(p=l.Q,v=f,b="Exit fullscreen"),(0,u.jsxs)(d.g,{isExpanded:c,"data-testid":"stFullScreenFrame",children:[!o&&(0,u.jsx)(d.j,{"data-testid":"StyledFullScreenButton",onClick:v,title:b,isExpanded:c,children:(0,u.jsx)(a.A,{content:p})}),t({width:c?h:n,height:c?m:i,expanded:c,expand:g,collapse:f})]})};const m=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=n=>{const{width:i,height:o,disableFullscreenMode:r}=n;return(0,u.jsx)(c,{width:i,height:o,disableFullscreenMode:t||r,children:t=>{let{width:i,height:o,expanded:r,expand:l,collapse:a}=t;return(0,u.jsx)(e,{...n,width:i,height:o,isFullScreen:r,expand:l,collapse:a})}})};return n.displayName=`withFullScreenWrapper(${e.displayName||e.name})`,o()(n,e)}},85850:(e,t,n)=>{n.d(t,{K:()=>v,A:()=>b});n(58878);var i=n(8151),o=n(12274),r=n(63186),l=n(34914),a=n(997),s=n(36459),d=n(84720),u=n(64611),c=n(89653),m=n(58144);const h="-2.4rem",g=(0,c.A)("div",{target:"e2wxzia1"})((e=>{let{theme:t,locked:n,target:i}=e;return{padding:`${t.spacing.sm} 0 ${t.spacing.sm} ${t.spacing.sm}`,position:"absolute",top:n?h:"-1rem",right:t.spacing.none,transition:"none",...!n&&{opacity:0,"&:active, &:focus-visible, &:hover":{transition:"opacity 150ms 100ms, top 100ms 100ms",opacity:1,top:h},...i&&{[`${i}:hover &, ${i}:active &, ${i}:focus-visible &`]:{transition:"opacity 150ms 100ms, top 100ms 100ms",opacity:1,top:h}}}}}),""),f=(0,c.A)("div",{target:"e2wxzia0"})((e=>{let{theme:t}=e;return{color:(0,m.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 p=n(90782);function v(e){let{label:t,show_label:n,icon:o,onClick:r}=e;const c=(0,i.u)(),m=n?t:"";return(0,p.jsx)("div",{"data-testid":"stElementToolbarButton",children:(0,p.jsx)(a.A,{content:(0,p.jsx)(l.Ay,{source:t,allowHTML:!1,style:{fontSize:c.fontSizes.sm}}),placement:a.W.TOP,onMouseEnterDelay:1e3,inline:!0,children:(0,p.jsxs)(s.Ay,{onClick:e=>{r&&r(),e.stopPropagation()},kind:d.KX.ELEMENT_TOOLBAR,"aria-label":t,children:[o&&(0,p.jsx)(u.A,{content:o,size:"md",testid:"stElementToolbarButtonIcon"}),m&&(0,p.jsx)("span",{children:m})]})})})}const b=e=>{let{onExpand:t,onCollapse:n,isFullScreen:i,locked:l,children:a,target:s,disableFullscreenMode:d}=e;return(0,p.jsx)(g,{className:"stElementToolbar","data-testid":"stElementToolbar",locked:l||i,target:s,children:(0,p.jsxs)(f,{children:[a,t&&!d&&!i&&(0,p.jsx)(v,{label:"Fullscreen",icon:o.g,onClick:()=>t()}),n&&!d&&i&&(0,p.jsx)(v,{label:"Close fullscreen",icon:r.Q,onClick:()=>n()})]})})}},251:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Nt});var i=n(58878),o=n(35753),r=n(79104),l=n(52583),a=n(68994),s=n(95241),d=n(61730),u=n(18364),c=n(2128),m=n(34752),h=n(55516),g=n(29669),f=n(25571),p=n(85850),v=n(84152),b=n(37638),y=n.n(b),w=n(30136),x=n.n(w),C=n(17643),M=n.n(C),S=(n(20641),n(91381)),E=n.n(S),T=n(37904),k=n.n(T),R=n(34694),N=n(85729);const I=["true","t","yes","y","on","1"],_=["false","f","no","n","off","0"];function O(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e=`\u26a0\ufe0f ${e}`,{kind:o.dd.Text,readonly:!0,allowOverlay:!0,data:e+(t?`\n\n${t}\n`:""),displayData:e,isError:!0}}function D(e){return e.hasOwnProperty("isError")&&e.isError}function A(e){return e.hasOwnProperty("isMissingValue")&&e.isMissingValue}function F(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?{kind:o.dd.Loading,allowOverlay:!1,isMissingValue:!0}:{kind:o.dd.Loading,allowOverlay:!1}}function $(e,t){const n=t?"faded":"normal";return{kind:o.dd.Text,data:"",displayData:"",allowOverlay:!0,readonly:e,style:n}}function L(e){return{id:e.id,title:e.title,hasMenu:!1,themeOverride:e.themeOverride,icon:e.icon,group:e.group,...e.isStretched&&{grow:e.isIndex?1:3},...e.width&&{width:e.width}}}function X(e,t){return(0,f.hX)(e)?t||{}:(0,f.hX)(t)?e||{}:y()(e,t)}function H(e){if((0,f.hX)(e))return[];if("number"===typeof e||"boolean"===typeof e)return[e];if("string"===typeof e){if(""===e)return[];if(!e.trim().startsWith("[")||!e.trim().endsWith("]"))return e.split(",");try{return JSON.parse(e)}catch(t){return[e]}}try{const t=JSON.parse(JSON.stringify(e,((e,t)=>"bigint"===typeof t?Number(t):t)));return Array.isArray(t)?t.map((e=>["string","number","boolean","null"].includes(typeof e)?e:V(e))):[V(t)]}catch(t){return[V(e)]}}function V(e){try{try{return x()(e)}catch(t){return JSON.stringify(e,((e,t)=>"bigint"===typeof t?Number(t):t))}}catch(t){return`[${typeof e}]`}}function z(e){if((0,f.hX)(e))return null;if("boolean"===typeof e)return e;const t=V(e).toLowerCase().trim();return""===t?null:!!I.includes(t)||!_.includes(t)&&void 0}function j(e){if((0,f.hX)(e))return null;if(Array.isArray(e))return NaN;if("string"===typeof e){if(0===e.trim().length)return null;try{const t=k().unformat(e.trim());if((0,f.se)(t))return t}catch(t){}}else if(e instanceof Int32Array)return Number(e[0]);return Number(e)}function W(e,t,n){return Number.isNaN(e)||!Number.isFinite(e)?"":(0,f.hX)(t)||""===t?(0===n&&(e=Math.round(e)),k()(e).format((0,f.se)(n)?`0,0.${"0".repeat(n)}`:"0,0.[0000]")):"percent"===t?new Intl.NumberFormat(void 0,{style:"percent",minimumFractionDigits:2,maximumFractionDigits:2}).format(e):["compact","scientific","engineering"].includes(t)?new Intl.NumberFormat(void 0,{notation:t}).format(e):"duration[ns]"===t?M().duration(e/1e6,"milliseconds").humanize():t.startsWith("period[")?N.D0.formatPeriodType(BigInt(e),t):(0,R.sprintf)(t,e)}function B(e,t){return"locale"===t?new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"medium"}).format(e.toDate()):"distance"===t?e.fromNow():"relative"===t?e.calendar():e.format(t)}function Y(e){if((0,f.hX)(e))return null;if(e instanceof Date)return isNaN(e.getTime())?void 0:e;if("string"===typeof e&&0===e.trim().length)return null;try{const t=Number(e);if(!isNaN(t)){let e=t;t>=10**18?e=t/1e3**3:t>=10**15?e=t/1e6:t>=10**12&&(e=t/1e3);const n=M().unix(e).utc();if(n.isValid())return n.toDate()}if("string"===typeof e){const t=M().utc(e);if(t.isValid())return t.toDate();const n=M().utc(e,[M().HTML5_FMT.TIME_MS,M().HTML5_FMT.TIME_SECONDS,M().HTML5_FMT.TIME]);if(n.isValid())return n.toDate()}}catch(t){return}}function P(e){if(e%1===0)return 0;let t=e.toString();return-1!==t.indexOf("e")&&(t=e.toLocaleString("fullwide",{useGrouping:!1,maximumFractionDigits:20})),-1===t.indexOf(".")?0:t.split(".")[1].length}const U=new RegExp(/(\r\n|\n|\r)/gm);function q(e){return-1!==e.indexOf("\n")?e.replace(U," "):e}var J=n(8151),G=n(84996);function K(e){const t={kind:o.dd.Text,data:"",displayData:"",allowOverlay:!0,contentAlignment:e.contentAlignment,readonly:!0,style:e.isIndex?"faded":"normal"};return{...e,kind:"object",sortMode:"default",isEditable:!1,getCell(e){try{const n=(0,f.se)(e)?V(e):null,i=(0,f.se)(n)?q(n):"";return{...t,data:n,displayData:i,isMissingValue:(0,f.hX)(e)}}catch(n){return O(V(e),`The value cannot be interpreted as a string. Error: ${n}`)}},getCellValue:e=>void 0===e.data?null:e.data}}K.isEditableType=!1;const Z=K;function Q(e){const t=e.columnTypeOptions||{};let n;if(t.validate)try{n=new RegExp(t.validate,"us")}catch(l){n=`Invalid validate regex: ${t.validate}.\nError: ${l}`}const i={kind:o.dd.Text,data:"",displayData:"",allowOverlay:!0,contentAlignment:e.contentAlignment,readonly:!e.isEditable,style:e.isIndex?"faded":"normal"},r=i=>{if((0,f.hX)(i))return!e.isRequired;let o=V(i),r=!1;return t.max_chars&&o.length>t.max_chars&&(o=o.slice(0,t.max_chars),r=!0),!(n instanceof RegExp&&!1===n.test(o))&&(!r||o)};return{...e,kind:"text",sortMode:"default",validateInput:r,getCell(e,t){if("string"===typeof n)return O(V(e),n);if(t){const t=r(e);if(!1===t)return O(V(e),"Invalid input.");"string"===typeof t&&(e=t)}try{const t=(0,f.se)(e)?V(e):null,n=(0,f.se)(t)?q(t):"";return{...i,isMissingValue:(0,f.hX)(t),data:t,displayData:n}}catch(l){return O("Incompatible value",`The value cannot be interpreted as string. Error: ${l}`)}},getCellValue:e=>void 0===e.data?null:e.data}}Q.isEditableType=!0;const ee=Q;function te(e,t){return e=t.startsWith("+")||t.startsWith("-")?e.utcOffset(t,!1):e.tz(t)}function ne(e,t,n,i,r,l,a){var s;const d=X({format:n,step:i,timezone:a},t.columnTypeOptions);let u,c,m;if((0,f.se)(d.timezone))try{var h;u=(null===(h=te(E()(),d.timezone))||void 0===h?void 0:h.utcOffset())||void 0}catch(v){}(0,f.se)(d.min_value)&&(c=Y(d.min_value)||void 0),(0,f.se)(d.max_value)&&(m=Y(d.max_value)||void 0);const g={kind:o.dd.Custom,allowOverlay:!0,copyData:"",readonly:!t.isEditable,contentAlign:t.contentAlignment,style:t.isIndex?"faded":"normal",data:{kind:"date-picker-cell",date:void 0,displayDate:"",step:(null===(s=d.step)||void 0===s?void 0:s.toString())||"1",format:r,min:c,max:m}},p=e=>{const n=Y(e);return null===n?!t.isRequired:void 0!==n&&(!((0,f.se)(c)&&l(n)<l(c))&&!((0,f.se)(m)&&l(n)>l(m)))};return{...t,kind:e,sortMode:"default",validateInput:p,getCell(e,t){if(!0===t){const t=p(e);if(!1===t)return O(V(e),"Invalid input.");t instanceof Date&&(e=t)}const i=Y(e);let o="",r="",l=u;if(void 0===i)return O(V(e),"The value cannot be interpreted as a datetime object.");if(null!==i){let e=E().utc(i);if(!e.isValid())return O(V(i),`This should never happen. Please report this bug. \nError: ${e.toString()}`);if(d.timezone){try{e=te(e,d.timezone)}catch(v){return O(e.toISOString(),`Failed to adjust to the provided timezone: ${d.timezone}. \nError: ${v}`)}l=e.utcOffset()}try{r=B(e,d.format||n)}catch(v){return O(e.toISOString(),`Failed to format the date for rendering with: ${d.format}. \nError: ${v}`)}o=B(e,n)}return{...g,copyData:o,isMissingValue:(0,f.hX)(i),data:{...g.data,date:i,displayDate:r,timezoneOffset:l}}},getCellValue(e){var t;return(0,f.hX)(null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.date)?null:l(e.data.date)}}}function ie(e){var t,n,i,o,r;let l="YYYY-MM-DD HH:mm:ss";(null===(t=e.columnTypeOptions)||void 0===t?void 0:t.step)>=60?l="YYYY-MM-DD HH:mm":(null===(n=e.columnTypeOptions)||void 0===n?void 0:n.step)<1&&(l="YYYY-MM-DD HH:mm:ss.SSS");const a=null===(i=e.arrowType)||void 0===i||null===(o=i.meta)||void 0===o?void 0:o.timezone,s=(0,f.se)(a)||(0,f.se)(null===e||void 0===e||null===(r=e.columnTypeOptions)||void 0===r?void 0:r.timezone);return ne("datetime",e,s?l+"Z":l,1,"datetime-local",(e=>s?e.toISOString():e.toISOString().replace("Z","")),a)}function oe(e){var t,n;let i="HH:mm:ss";return(null===(t=e.columnTypeOptions)||void 0===t?void 0:t.step)>=60?i="HH:mm":(null===(n=e.columnTypeOptions)||void 0===n?void 0:n.step)<1&&(i="HH:mm:ss.SSS"),ne("time",e,i,1,"time",(e=>e.toISOString().split("T")[1].replace("Z","")))}function re(e){return ne("date",e,"YYYY-MM-DD",1,"date",(e=>e.toISOString().split("T")[0]))}function le(e){const t={kind:o.dd.Boolean,data:!1,allowOverlay:!1,contentAlign:e.contentAlignment,readonly:!e.isEditable,style:e.isIndex?"faded":"normal"};return{...e,kind:"checkbox",sortMode:"default",getCell(e){let n=null;return n=z(e),void 0===n?O(V(e),"The value cannot be interpreted as boolean."):{...t,data:n,isMissingValue:(0,f.hX)(n)}},getCellValue:e=>void 0===e.data?null:e.data}}ie.isEditableType=!0,oe.isEditableType=!0,re.isEditableType=!0,le.isEditableType=!0;const ae=le;function se(e){return e.startsWith("int")&&!e.startsWith("interval")||"range"===e||e.startsWith("uint")}function de(e){const t=N.D0.getTypeName(e.arrowType);let n;"timedelta64[ns]"===t?n="duration[ns]":t.startsWith("period[")&&(n=t);const i=X({step:se(t)?1:void 0,min_value:t.startsWith("uint")?0:void 0,format:n},e.columnTypeOptions),r=(0,f.hX)(i.min_value)||i.min_value<0,l=(0,f.se)(i.step)&&!Number.isNaN(i.step)?P(i.step):void 0,a={kind:o.dd.Number,data:void 0,displayData:"",readonly:!e.isEditable,allowOverlay:!0,contentAlign:e.contentAlignment||"right",style:e.isIndex?"faded":"normal",allowNegative:r,fixedDecimals:l,thousandSeparator:""},s=t=>{let n=j(t);if((0,f.hX)(n))return!e.isRequired;if(Number.isNaN(n))return!1;let o=!1;return(0,f.se)(i.max_value)&&n>i.max_value&&(n=i.max_value,o=!0),!((0,f.se)(i.min_value)&&n<i.min_value)&&(!o||n)};return{...e,kind:"number",sortMode:"smart",validateInput:s,getCell(e,t){if(!0===t){const t=s(e);if(!1===t)return O(V(e),"Invalid input.");"number"===typeof t&&(e=t)}let n=j(e),o="";if((0,f.se)(n)){if(Number.isNaN(n))return O(V(e),"The value cannot be interpreted as a number.");if((0,f.se)(l)&&(r=n,n=0===(d=l)?Math.trunc(r):Math.trunc(r*10**d)/10**d),Number.isInteger(n)&&!Number.isSafeInteger(n))return O(V(e),"The value is larger than the maximum supported integer values in number columns (2^53).");try{o=W(n,i.format,l)}catch(u){return O(V(n),(0,f.se)(i.format)?`Failed to format the number based on the provided format configuration: (${i.format}). Error: ${u}`:`Failed to format the number. Error: ${u}`)}}var r,d;return{...a,data:n,displayData:o,isMissingValue:(0,f.hX)(n),copyData:(0,f.hX)(n)?"":V(n)}},getCellValue:e=>void 0===e.data?null:e.data}}de.isEditableType=!0;const ue=de;function ce(e){let t="string";const n=X({options:"bool"===N.D0.getTypeName(e.arrowType)?[!0,!1]:[]},e.columnTypeOptions),i=new Set(n.options.map((e=>typeof e)));1===i.size&&(i.has("number")||i.has("bigint")?t="number":i.has("boolean")&&(t="boolean"));const r={kind:o.dd.Custom,allowOverlay:!0,copyData:"",contentAlign:e.contentAlignment,readonly:!e.isEditable,style:e.isIndex?"faded":"normal",data:{kind:"dropdown-cell",allowedValues:[...!0!==e.isRequired?[null]:[],...n.options.filter((e=>null!==e&&""!==e)).map((e=>V(e)))],value:""}};return{...e,kind:"selectbox",sortMode:"default",getCell(e,t){let n=null;return(0,f.se)(e)&&""!==e&&(n=V(e)),t&&!r.data.allowedValues.includes(n)?O(V(n),"The value is not part of the allowed options."):{...r,isMissingValue:null===n,copyData:n||"",data:{...r.data,value:n}}},getCellValue(e){var n,i,o,r,l,a,s;return(0,f.hX)(null===(n=e.data)||void 0===n?void 0:n.value)||""===(null===(i=e.data)||void 0===i?void 0:i.value)?null:"number"===t?null!==(r=j(null===(l=e.data)||void 0===l?void 0:l.value))&&void 0!==r?r:null:"boolean"===t?null!==(a=z(null===(s=e.data)||void 0===s?void 0:s.value))&&void 0!==a?a:null:null===(o=e.data)||void 0===o?void 0:o.value}}}ce.isEditableType=!0;const me=ce;function he(e){const t={kind:o.dd.Bubble,data:[],allowOverlay:!0,contentAlign:e.contentAlignment,style:e.isIndex?"faded":"normal"};return{...e,kind:"list",sortMode:"default",isEditable:!1,getCell(e){const n=(0,f.hX)(e)?[]:H(e);return{...t,data:n,isMissingValue:(0,f.hX)(e),copyData:(0,f.hX)(e)?"":V(n.map((e=>"string"===typeof e&&e.includes(",")?e.replace(/,/g," "):e)))}},getCellValue:e=>(0,f.hX)(e.data)||A(e)?null:e.data}}he.isEditableType=!1;const ge=he;function fe(e,t,n){const i=new RegExp(`${e}[,\\s].*{(?:[^}]*[\\s;]{1})?${t}:\\s*([^;}]+)[;]?.*}`,"gm");n=n.replace(/{/g," {");const o=i.exec(n);if(o)return o[1].trim()}function pe(e,t){const n=e.types.index[t],i=e.indexNames[t];let o=!0;return"range"===N.D0.getTypeName(n)&&(o=!1),{id:`index-${t}`,name:i,title:i,isEditable:o,arrowType:n,isIndex:!0,isHidden:!1}}function ve(e,t){const n=e.columns.map((e=>e[t])),i=n.length>0?n[n.length-1]:"",o=n.length>1?n.filter((e=>""!==e)).slice(0,-1).join(" / "):void 0;let r,l=e.types.data[t];if((0,f.hX)(l)&&(l={meta:null,numpy_type:"object",pandas_type:"object"}),"categorical"===N.D0.getTypeName(l)){const n=e.getCategoricalOptions(t);(0,f.se)(n)&&(r={options:n})}return{id:`column-${i}-${t}`,name:i,title:i,isEditable:!0,arrowType:l,columnTypeOptions:r,isIndex:!1,isHidden:!1,group:o}}function be(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;const i=e.arrowType?N.D0.getTypeName(e.arrowType):null;let r;if("object"===e.kind)r=e.getCell((0,f.se)(t.content)?q(N.D0.format(t.content,t.contentType,t.field)):null);else if(["time","date","datetime"].includes(e.kind)&&(0,f.se)(t.content)&&("number"===typeof t.content||"bigint"===typeof t.content)){var l,a;let n;var s,d,u;if("time"===i&&(0,f.se)(null===(l=t.field)||void 0===l||null===(a=l.type)||void 0===a?void 0:a.unit))n=M().unix(N.D0.convertToSeconds(t.content,null!==(s=null===(d=t.field)||void 0===d||null===(u=d.type)||void 0===u?void 0:u.unit)&&void 0!==s?s:0)).utc().toDate();else n=M().utc(Number(t.content)).toDate();r=e.getCell(n)}else if("decimal"===i){const n=(0,f.hX)(t.content)?null:N.D0.format(t.content,t.contentType,t.field);r=e.getCell(n)}else r=e.getCell(t.content);if(D(r))return r;if(!e.isEditable){if((0,f.se)(t.displayContent)){var c,m,h,g;const n=q(t.displayContent);r.kind===o.dd.Text||r.kind===o.dd.Number&&(0,f.hX)(null===(c=e.columnTypeOptions)||void 0===c?void 0:c.format)||r.kind===o.dd.Uri&&(0,f.hX)(null===(m=e.columnTypeOptions)||void 0===m?void 0:m.display_text)?r={...r,displayData:n}:r.kind===o.dd.Custom&&"date-picker-cell"===(null===(h=r.data)||void 0===h?void 0:h.kind)&&(0,f.hX)(null===(g=e.columnTypeOptions)||void 0===g?void 0:g.format)&&(r={...r,data:{...r.data,displayDate:n}})}n&&t.cssId&&(r=function(e,t,n){const i={},o=fe(t,"color",n);o&&(i.textDark=o);const r=fe(t,"background-color",n);return r&&(i.bgCell=r),"yellow"===r&&void 0===o&&(i.textDark="#31333F"),i?{...e,themeOverride:i}:e}(r,t.cssId,n))}return r}function ye(e,t,n){const i=X({y_min:0,y_max:1},t.columnTypeOptions),r={kind:o.dd.Custom,allowOverlay:!1,copyData:"",contentAlign:t.contentAlignment,data:{kind:"sparkline-cell",values:[],displayValues:[],graphKind:n,yAxis:[i.y_min,i.y_max]}};return{...t,kind:e,sortMode:"default",isEditable:!1,getCell(e){if((0,f.hX)(i.y_min)||(0,f.hX)(i.y_max)||Number.isNaN(i.y_min)||Number.isNaN(i.y_max)||i.y_min>=i.y_max)return O("Invalid min/max y-axis configuration",`The y_min (${i.y_min}) and y_max (${i.y_max}) configuration options must be valid numbers.`);if((0,f.hX)(e))return F();const t=H(e),n=[];let o=[];if(0===t.length)return F();let l=Number.MIN_SAFE_INTEGER,a=Number.MAX_SAFE_INTEGER;for(let i=0;i<t.length;i++){const e=j(t[i]);if(Number.isNaN(e)||(0,f.hX)(e))return O(V(t),`The value cannot be interpreted as a numeric array. ${V(e)} is not a number.`);e>l&&(l=e),e<a&&(a=e),n.push(e)}return o=n.length>0&&(l>i.y_max||a<i.y_min)?n.map((e=>l-a===0?l>(i.y_max||1)?i.y_max||1:i.y_min||0:((i.y_max||1)-(i.y_min||0))*((e-a)/(l-a))+(i.y_min||0))):n,{...r,copyData:n.join(","),data:{...r.data,values:o,displayValues:n.map((e=>W(e)))},isMissingValue:(0,f.hX)(e)}},getCellValue(e){var t,n;return e.kind===o.dd.Loading||void 0===(null===(t=e.data)||void 0===t?void 0:t.values)?null:null===(n=e.data)||void 0===n?void 0:n.values}}}function we(e){return ye("line_chart",e,"line")}function xe(e){return ye("bar_chart",e,"bar")}function Ce(e){return ye("area_chart",e,"area")}function Me(e){const t={kind:o.dd.Image,data:[],displayData:[],readonly:!0,allowOverlay:!0,contentAlign:e.contentAlignment||"center",style:e.isIndex?"faded":"normal"};return{...e,kind:"image",sortMode:"default",isEditable:!1,getCell(e){const n=(0,f.se)(e)?[V(e)]:[];return{...t,data:n,isMissingValue:!(0,f.se)(e),displayData:n}},getCellValue:e=>void 0===e.data||0===e.data.length?null:e.data[0]}}we.isEditableType=!1,xe.isEditableType=!1,Ce.isEditableType=!1,Me.isEditableType=!1;const Se=Me;function Ee(e){const t=e.columnTypeOptions||{};let n,i;if(t.validate)try{n=new RegExp(t.validate,"us")}catch(a){n=`Invalid validate regex: ${t.validate}.\nError: ${a}`}if(!(0,f.hX)(t.display_text)&&t.display_text.includes("(")&&t.display_text.includes(")"))try{i=new RegExp(t.display_text,"us")}catch(a){i=void 0}const r={kind:o.dd.Uri,readonly:!e.isEditable,allowOverlay:!0,contentAlign:e.contentAlignment,style:e.isIndex?"faded":"normal",hoverEffect:!0,data:"",displayData:"",copyData:""},l=i=>{if((0,f.hX)(i))return!e.isRequired;const o=V(i);return!(t.max_chars&&o.length>t.max_chars)&&!(n instanceof RegExp&&!1===n.test(o))};return{...e,kind:"link",sortMode:"default",validateInput:l,getCell(e,o){if((0,f.hX)(e))return{...r,data:null,isMissingValue:!0,onClickUri:()=>{}};const s=e;if("string"===typeof n)return O(V(s),n);if(o){if(!1===l(s))return O(V(s),"Invalid input.")}let d="";return s&&(d=void 0!==i?function(e,t){if((0,f.hX)(t))return"";try{const n=t.match(e);return n&&void 0!==n[1]?decodeURI(n[1]):t}catch(a){return t}}(i,s):t.display_text||s),{...r,data:s,displayData:d,isMissingValue:(0,f.hX)(s),onClickUri:e=>{window.open(s.startsWith("www.")?`https://${s}`:s,"_blank","noopener,noreferrer"),e.preventDefault()},copyData:s}},getCellValue:e=>(0,f.hX)(e.data)?null:e.data}}Ee.isEditableType=!0;const Te=Ee;function ke(e){const t=se(N.D0.getTypeName(e.arrowType)),n=X({min_value:0,max_value:t?100:1,step:t?1:.01,format:t?"%3d%%":"percent"},e.columnTypeOptions);let i;try{i=W(n.max_value,n.format)}catch(a){i=V(n.max_value)}const r=(0,f.hX)(n.step)||Number.isNaN(n.step)?void 0:P(n.step),l={kind:o.dd.Custom,allowOverlay:!1,copyData:"",contentAlign:e.contentAlignment,data:{kind:"range-cell",min:n.min_value,max:n.max_value,step:n.step,value:n.min_value,label:String(n.min_value),measureLabel:i,readonly:!0}};return{...e,kind:"progress",sortMode:"smart",isEditable:!1,getCell(e){if((0,f.hX)(e))return F();if((0,f.hX)(n.min_value)||(0,f.hX)(n.max_value)||Number.isNaN(n.min_value)||Number.isNaN(n.max_value)||n.min_value>=n.max_value)return O("Invalid min/max parameters",`The min_value (${n.min_value}) and max_value (${n.max_value}) parameters must be valid numbers.`);if((0,f.hX)(n.step)||Number.isNaN(n.step))return O("Invalid step parameter",`The step parameter (${n.step}) must be a valid number.`);const t=j(e);if(Number.isNaN(t)||(0,f.hX)(t))return O(V(e),"The value cannot be interpreted as a number.");if(Number.isInteger(t)&&!Number.isSafeInteger(t))return O(V(e),"The value is larger than the maximum supported integer values in number columns (2^53).");let i="";try{i=W(t,n.format,r)}catch(a){return O(V(t),(0,f.se)(n.format)?`Failed to format the number based on the provided format configuration: (${n.format}). Error: ${a}`:`Failed to format the number. Error: ${a}`)}const o=Math.min(n.max_value,Math.max(n.min_value,t));return{...l,isMissingValue:(0,f.hX)(e),copyData:String(t),data:{...l.data,value:o,label:i}}},getCellValue(e){var t,n;return e.kind===o.dd.Loading||void 0===(null===(t=e.data)||void 0===t?void 0:t.value)?null:null===(n=e.data)||void 0===n?void 0:n.value}}}ke.isEditableType=!1;const Re=ke,Ne=new Map(Object.entries({object:Z,text:ee,checkbox:ae,selectbox:me,list:ge,number:ue,link:Te,datetime:ie,date:re,time:oe,line_chart:we,bar_chart:xe,area_chart:Ce,image:Se,progress:Re})),Ie=[],_e="_index",Oe="_pos:",De={small:75,medium:200,large:400};function Ae(e){if(!(0,f.hX)(e))return"number"===typeof e?e:e in De?De[e]:void 0}function Fe(e,t){if(!t)return e;let n;return t.has(e.name)&&e.name!==_e?n=t.get(e.name):t.has(`${Oe}${e.indexNumber}`)?n=t.get(`${Oe}${e.indexNumber}`):e.isIndex&&t.has(_e)&&(n=t.get(_e)),n?y()({...e},{title:n.label,width:Ae(n.width),isEditable:(0,f.se)(n.disabled)?!n.disabled:void 0,isHidden:n.hidden,isRequired:n.required,columnTypeOptions:n.type_config,contentAlignment:n.alignment,defaultValue:n.default,help:n.help}):e}function $e(e){var t;const n=null===(t=e.columnTypeOptions)||void 0===t?void 0:t.type;let i;return(0,f.se)(n)&&(Ne.has(n)?i=Ne.get(n):(0,G.FF)(`Unknown column type configured in column configuration: ${n}`)),(0,f.hX)(i)&&(i=function(e){let t=e?N.D0.getTypeName(e):null;return t?(t=t.toLowerCase().trim(),["unicode","empty","large_string[pyarrow]"].includes(t)?ee:["datetime","datetimetz"].includes(t)?ie:"time"===t?oe:"date"===t?re:["object","bytes"].includes(t)?Z:["bool"].includes(t)?ae:["int8","int16","int32","int64","uint8","uint16","uint32","uint64","float16","float32","float64","float96","float128","range","decimal"].includes(t)?ue:"categorical"===t?me:t.startsWith("list")?ge:Z):Z}(e.arrowType)),i}const Le=function(e,t,n){const o=(0,J.u)(),r=i.useMemo((()=>function(e){if(!e)return new Map;try{return new Map(Object.entries(JSON.parse(e)))}catch(t){return(0,G.vV)(t),new Map}}(e.columns)),[e.columns]),l=e.useContainerWidth||(0,f.se)(e.width)&&e.width>0;return{columns:i.useMemo((()=>{let i=function(e){const t=[],{dimensions:n}=e,i=n.headerColumns,o=n.dataColumns;if(0===i&&0===o)return t.push({id:"empty-index",title:"",indexNumber:0,isEditable:!1,isIndex:!0}),t;for(let r=0;r<i;r++){const n={...pe(e,r),indexNumber:r};t.push(n)}for(let r=0;r<o;r++){const n={...ve(e,r),indexNumber:r+i};t.push(n)}return t}(t).map((t=>{let i={...t,...Fe(t,r),isStretched:l};const a=$e(i);return(e.editingMode===g.i3.EditingMode.READ_ONLY||n||!1===a.isEditableType)&&(i={...i,isEditable:!1}),e.editingMode!==g.i3.EditingMode.READ_ONLY&&1==i.isEditable&&(i={...i,icon:"editable"},i.isRequired&&e.editingMode===g.i3.EditingMode.DYNAMIC&&(i={...i,isHidden:!1})),a(i,o)})).filter((e=>!e.isHidden));if(e.columnOrder&&e.columnOrder.length>0){const t=[];i.forEach((e=>{e.isIndex&&t.push(e)})),e.columnOrder.forEach((e=>{const n=i.find((t=>t.name===e));n&&!n.isIndex&&t.push(n)})),i=t}return i.length>0?i:[Z({id:"empty-index",title:"",indexNumber:0,isEditable:!1,isIndex:!0})]}),[t,r,l,n,e.editingMode,e.columnOrder,o])}};function Xe(e){return e.isIndex?_e:(0,f.hX)(e.name)?"":e.name}const He=class{constructor(e){this.editedCells=new Map,this.addedRows=[],this.deletedRows=[],this.numRows=0,this.numRows=e}toJson(e){const t=new Map;e.forEach((e=>{t.set(e.indexNumber,e)}));const n={edited_rows:{},added_rows:[],deleted_rows:[]};this.editedCells.forEach(((e,i,o)=>{const r={};e.forEach(((e,n,i)=>{const o=t.get(n);o&&(r[Xe(o)]=o.getCellValue(e))})),n.edited_rows[i]=r})),this.addedRows.forEach((e=>{const i={};let o=!1;e.forEach(((e,n,r)=>{const l=t.get(n);if(l){const t=l.getCellValue(e);l.isRequired&&l.isEditable&&A(e)&&(o=!0),(0,f.se)(t)&&(i[Xe(l)]=t)}})),o||n.added_rows.push(i)})),n.deleted_rows=this.deletedRows;return JSON.stringify(n,((e,t)=>void 0===t?null:t))}fromJson(e,t){this.editedCells=new Map,this.addedRows=[],this.deletedRows=[];const n=JSON.parse(e),i=new Map;t.forEach((e=>{i.set(e.indexNumber,e)}));const o=new Map;t.forEach((e=>{o.set(Xe(e),e)})),Object.keys(n.edited_rows).forEach((e=>{const t=Number(e),i=n.edited_rows[e];Object.keys(i).forEach((e=>{const n=i[e],r=o.get(e);if(r){const e=r.getCell(n);var l;if(e)this.editedCells.has(t)||this.editedCells.set(t,new Map),null===(l=this.editedCells.get(t))||void 0===l||l.set(r.indexNumber,e)}}))})),n.added_rows.forEach((e=>{const n=new Map;t.forEach((e=>{n.set(e.indexNumber,e.getCell(null))})),Object.keys(e).forEach((t=>{const i=e[t],r=o.get(t);if(r){const e=r.getCell(i);e&&n.set(r.indexNumber,e)}})),this.addedRows.push(n)})),this.deletedRows=n.deleted_rows}isAddedRow(e){return e>=this.numRows}getCell(e,t){if(this.isAddedRow(t))return this.addedRows[t-this.numRows].get(e);const n=this.editedCells.get(t);return void 0!==n?n.get(e):void 0}setCell(e,t,n){if(this.isAddedRow(t)){if(t-this.numRows>=this.addedRows.length)return;this.addedRows[t-this.numRows].set(e,n)}else{void 0===this.editedCells.get(t)&&this.editedCells.set(t,new Map);this.editedCells.get(t).set(e,n)}}addRow(e){this.addedRows.push(e)}deleteRows(e){e.sort(((e,t)=>t-e)).forEach((e=>{this.deleteRow(e)}))}deleteRow(e){(0,f.hX)(e)||e<0||(this.isAddedRow(e)?this.addedRows.splice(e-this.numRows,1):(this.deletedRows.includes(e)||(this.deletedRows.push(e),this.deletedRows=this.deletedRows.sort(((e,t)=>e-t))),this.editedCells.delete(e)))}getOriginalRowIndex(e){let t=e;for(let n=0;n<this.deletedRows.length&&!(this.deletedRows[n]>t);n++)t+=1;return t}getNumRows(){return this.numRows+this.addedRows.length-this.deletedRows.length}};var Ve=n(32735);const ze=function(){const e=(0,J.u)(),t=i.useMemo((()=>({editable:e=>`<svg xmlns="http://www.w3.org/2000/svg" height="40" viewBox="0 96 960 960" width="40" fill="${e.bgColor}"><path d="m800.641 679.743-64.384-64.384 29-29q7.156-6.948 17.642-6.948 10.485 0 17.742 6.948l29 29q6.948 7.464 6.948 17.95 0 10.486-6.948 17.434l-29 29Zm-310.64 246.256v-64.383l210.82-210.821 64.384 64.384-210.821 210.82h-64.383Zm-360-204.872v-50.254h289.743v50.254H130.001Zm0-162.564v-50.255h454.615v50.255H130.001Zm0-162.307v-50.255h454.615v50.255H130.001Z"/></svg>`})),[]);return{theme:i.useMemo((()=>({accentColor:e.colors.primary,accentFg:e.colors.white,accentLight:(0,Ve.No)(e.colors.primary,.9),borderColor:e.colors.borderColorLight,horizontalBorderColor:e.colors.borderColorLight,fontFamily:e.genericFonts.bodyFont,bgSearchResult:(0,Ve.No)(e.colors.primary,.9),resizeIndicatorColor:e.colors.primary,bgIconHeader:e.colors.fadedText60,fgIconHeader:e.colors.white,bgHeader:e.colors.bgMix,bgHeaderHasFocus:e.colors.secondaryBg,bgHeaderHovered:e.colors.secondaryBg,textHeader:e.colors.fadedText60,textHeaderSelected:e.colors.white,textGroupHeader:e.colors.fadedText60,headerFontStyle:`${e.fontSizes.sm}`,baseFontStyle:e.fontSizes.sm,editorFontSize:e.fontSizes.sm,textDark:e.colors.bodyText,textMedium:(0,Ve.No)(e.colors.bodyText,.2),textLight:e.colors.fadedText40,textBubble:e.colors.fadedText60,bgCell:e.colors.bgColor,bgCellMedium:e.colors.bgColor,cellHorizontalPadding:8,cellVerticalPadding:3,bgBubble:e.colors.secondaryBg,bgBubbleSelected:e.colors.secondaryBg,linkColor:e.colors.linkText,drilldownBorder:e.colors.darkenedBgMix25})),[e]),tableBorderRadius:e.radii.default,headerIcons:t}};const je=function(e,t,n,o){const r=e.columns.length;return{getCellContent:i.useCallback((i=>{let[l,a]=i;if(l>t.length-1)return O("Column index out of bounds.","This should never happen. Please report this bug.");if(a>n-1)return O("Row index out of bounds.","This should never happen. Please report this bug.");const s=t[l],d=s.indexNumber,u=o.current.getOriginalRowIndex(a),c=o.current.isAddedRow(u);if(s.isEditable||c){const e=o.current.getCell(d,u);if((0,f.se)(e))return e;if(c)return O("Error during cell creation.",`This should never happen. Please report this bug. No cell found for an added row: col=${d}; row=${u}`)}try{return be(s,e.getCell(u+r,d),e.cssStyles)}catch(m){return O("Error during cell creation.",`This should never happen. Please report this bug. \nError: ${m}`)}}),[t,n,e,o,r])}};var We=n(53221);const Be=function(e,t,n){const[o,r]=i.useState(),{getCellContent:l,getOriginalIndex:a}=(0,We.uf)({columns:t.map((e=>L(e))),getCellContent:n,rows:e,sort:o}),s=i.useMemo((()=>function(e,t){return void 0===t?e:e.map((e=>e.id===t.column.id?{...e,title:"asc"===t.direction?`\u2191 ${e.title}`:`\u2193 ${e.title}`}:e))}(t,o)),[t,o]),d=i.useCallback((e=>{let t="asc";const n=s[e];if(o&&o.column.id===n.id){if("asc"!==o.direction)return void r(void 0);t="desc"}r({column:L(n),direction:t,mode:n.sortMode})}),[o,s]);return{columns:s,sortColumn:d,getOriginalIndex:a,getCellContent:l}};var Ye=n(71034),Pe=n.n(Ye);const Ue=function(e,t,n,r,l){const[a,s]=i.useState({columns:o.I1.empty(),rows:o.I1.empty(),current:void 0}),d=!t&&!n&&(e.selectionMode.includes(g.i3.SelectionMode.MULTI_ROW)||e.selectionMode.includes(g.i3.SelectionMode.SINGLE_ROW)),u=d&&e.selectionMode.includes(g.i3.SelectionMode.MULTI_ROW),c=!t&&!n&&(e.selectionMode.includes(g.i3.SelectionMode.SINGLE_COLUMN)||e.selectionMode.includes(g.i3.SelectionMode.MULTI_COLUMN)),m=c&&e.selectionMode.includes(g.i3.SelectionMode.MULTI_COLUMN),h=a.rows.length>0,f=a.columns.length>0,p=void 0!==a.current,v=i.useCallback((e=>{const t=!Pe()(e.rows.toArray(),a.rows.toArray()),n=!Pe()(e.columns.toArray(),a.columns.toArray()),i=!Pe()(e.current,a.current);let o=d&&t||c&&n,u=e;if((d||c)&&void 0!==e.current&&i&&(u={...e,rows:a.rows,columns:a.columns},o=!1),t&&e.rows.length>0&&n&&0===e.columns.length&&(u={...u,columns:a.columns},o=!0),n&&e.columns.length>0&&t&&0===e.rows.length&&(u={...u,rows:a.rows},o=!0),n&&u.columns.length>=0){let e=u.columns;r.forEach(((t,n)=>{t.isIndex&&(e=e.remove(n))})),e.length<u.columns.length&&(u={...u,columns:e})}s(u),o&&l(u)}),[a,d,c,l,r]),b=i.useCallback((function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n={columns:t?a.columns:o.I1.empty(),rows:e?a.rows:o.I1.empty(),current:void 0};s(n),(!e&&d||!t&&c)&&l(n)}),[a,d,c,l]);return{gridSelection:a,isRowSelectionActivated:d,isMultiRowSelectionActivated:u,isColumnSelectionActivated:c,isMultiColumnSelectionActivated:m,isRowSelected:h,isColumnSelected:f,isCellSelected:p,clearSelection:b,processSelectionChange:v}};var qe=n(55562);const Je=",",Ge='"',Ke='"',Ze="\n",Qe="\ufeff",et=new RegExp(`[${[Je,Ge,Ze].join("")}]`);function tt(e){return e.map((e=>function(e){if((0,f.hX)(e))return"";const t=V(e);if(et.test(t))return`${Ge}${t.replace(new RegExp(Ge,"g"),Ke+Ge)}${Ge}`;return t}(e))).join(Je)+Ze}async function nt(e,t,n,i){const o=new TextEncoder;await e.write(o.encode(Qe));const r=n.map((e=>e.name));await e.write(o.encode(tt(r)));for(let l=0;l<i;l++){const i=[];n.forEach(((e,n,o)=>{i.push(e.getCellValue(t([n,l])))})),await e.write(o.encode(tt(i)))}await e.close()}const it=function(e,t,o,r){return{exportToCsv:i.useCallback((async()=>{const i=`${(new Date).toISOString().slice(0,16).replace(":","-")}_export.csv`;try{const r=await n.e(3966).then(n.bind(n,93966)),l=await r.showSaveFilePicker({suggestedName:i,types:[{accept:{"text/csv":[".csv"]}}],excludeAcceptAllOption:!1}),a=await l.createWritable();await nt(a,e,t,o)}catch(l){if(l instanceof Error&&"AbortError"===l.name)return;try{(0,G.FF)("Failed to export data as CSV with FileSystem API, trying fallback method",l);let n="";const a=new WritableStream({write:async e=>{n+=new TextDecoder("utf-8").decode(e)},close:async()=>{}});await nt(a.getWriter(),e,t,o);const s=new Blob([n],{type:"text/csv;charset=utf-8;"}),d=URL.createObjectURL(s),u=(0,qe.A)({enforceDownloadInNewTab:r,url:d,filename:i});u.style.display="none",document.body.appendChild(u),u.click(),document.body.removeChild(u),URL.revokeObjectURL(d)}catch(l){(0,G.vV)("Failed to export data as CSV",l)}}}),[t,o,e,r])}};const ot=function(e,t,n,o,r,l,a,s,d){const u=i.useCallback(((t,i)=>{let[l,a]=t;const d=e[l];if(!d.isEditable)return;const u=d.indexNumber,c=n.current.getOriginalRowIndex(r(a)),m=o([l,a]),h=d.getCellValue(m),g=d.getCellValue(i);if(!D(m)&&g===h)return;const f=d.getCell(g,!0);D(f)?(0,G.FF)(`Not applying the cell edit since it causes this error:\n ${f.data}`):(n.current.setCell(u,c,{...f,lastUpdated:performance.now()}),s())}),[e,n,r,o,s]),c=i.useCallback((()=>{if(t)return;const i=new Map;e.forEach((e=>{i.set(e.indexNumber,e.getCell(e.defaultValue))})),n.current.addRow(i),a()}),[e,n,t,a]),m=i.useCallback((()=>{t||(c(),s())}),[c,s,t]),h=i.useCallback((i=>{var o;if(i.rows.length>0){if(t)return!0;const e=i.rows.toArray().map((e=>n.current.getOriginalRowIndex(r(e))));return n.current.deleteRows(e),a(),d(),s(),!1}if(null!==(o=i.current)&&void 0!==o&&o.range){const t=[],n=i.current.range;for(let i=n.y;i<n.y+n.height;i++)for(let o=n.x;o<n.x+n.width;o++){const n=e[o];n.isEditable&&!n.isRequired&&(t.push({cell:[o,i]}),u([o,i],n.getCell(null)))}return t.length>0&&(s(),l(t)),!1}return!0}),[e,n,t,l,r,s,u,d,a]),g=i.useCallback(((i,a)=>{const[d,u]=i,m=[];for(let h=0;h<a.length;h++){const i=a[h];if(h+u>=n.current.getNumRows()){if(t)break;c()}for(let t=0;t<i.length;t++){const l=i[t],a=h+u,s=t+d;if(s>=e.length)break;const c=e[s];if(c.isEditable){const e=c.getCell(l,!0);if((0,f.se)(e)&&!D(e)){const t=c.indexNumber,i=n.current.getOriginalRowIndex(r(a)),l=c.getCellValue(o([s,a]));c.getCellValue(e)!==l&&(n.current.setCell(t,i,{...e,lastUpdated:performance.now()}),m.push({cell:[s,a]}))}}}m.length>0&&(s(),l(m))}return!1}),[e,n,t,r,o,c,s,l]),p=i.useCallback(((t,n)=>{const i=t[0];if(i>=e.length)return!0;const o=e[i];if(o.validateInput){const e=o.validateInput(o.getCellValue(n));return!0===e||!1===e?e:o.getCell(e)}return!0}),[e]);return{onCellEdited:u,onPaste:g,onRowAppended:m,onDelete:h,validateCell:p}};const rt=function(e,t){const[n,o]=i.useState(),r=i.useRef(null),l=i.useCallback((n=>{if(clearTimeout(r.current),r.current=0,o(void 0),("header"===n.kind||"cell"===n.kind)&&n.location){const i=n.location[0],l=n.location[1];let a;if(i<0||i>=e.length)return;const s=e[i];if("header"===n.kind&&(0,f.se)(s))a=s.help;else if("cell"===n.kind){const e=t([i,l]);s.isRequired&&s.isEditable&&A(e)?a="\u26a0\ufe0f Please fill out this cell.":function(e){return e.hasOwnProperty("tooltip")&&""!==e.tooltip}(e)&&(a=e.tooltip)}a&&(r.current=setTimeout((()=>{a&&o({content:a,left:n.bounds.x+n.bounds.width/2,top:n.bounds.y})}),600))}}),[e,t,o,r]);return{tooltip:n,clearTooltip:i.useCallback((()=>{o(void 0)}),[o]),onItemHovered:l}};var lt=n(28873),at=n(70128),st=n(13914),dt=n(43301),ut=n(67338);const ct=function(e){return{drawCell:i.useCallback(((t,n)=>{const{cell:i,theme:o,ctx:r,rect:l}=t,a=t.col;if(A(i)&&a<e.length){const i=e[a];return["checkbox","line_chart","bar_chart","progress"].includes(i.kind)?n():(e=>{const{cell:t,theme:n,ctx:i}=e;(0,lt.lR)({...e,theme:{...n,textDark:n.textLight,headerFontFull:`${n.headerFontStyle} ${n.fontFamily}`,baseFontFull:`${n.baseFontStyle} ${n.fontFamily}`,markerFontFull:`${n.markerFontStyle} ${n.fontFamily}`},spriteManager:{},hyperWrapping:!1},"None",t.contentAlign),i.fillStyle=n.textDark})(t),void(i.isRequired&&i.isEditable&&function(e,t,n){e.save(),e.beginPath(),e.moveTo(t.x+t.width-8,t.y+1),e.lineTo(t.x+t.width,t.y+1),e.lineTo(t.x+t.width,t.y+1+8),e.fillStyle=n.accentColor,e.fill(),e.restore()}(r,l,o))}n()}),[e]),customRenderers:i.useMemo((()=>[at.A,st.A,dt.A,ut.Ay,...Ie]),[])}};const mt=function(e){const[t,n]=(0,i.useState)((()=>new Map)),o=i.useCallback(((e,i,o,r)=>{e.id&&n(new Map(t).set(e.id,r))}),[t]);return{columns:i.useMemo((()=>e.map((e=>e.id&&t.has(e.id)&&void 0!==t.get(e.id)?{...e,width:t.get(e.id),grow:0}:e))),[e,t]),onColumnResize:o}},ht=2,gt=35,ft=50+ht,pt=2*gt+ht;const vt=function(e,t,n,o,r,l){let a=function(e){return Math.max(e*gt+ht,pt)}(t+(n?2:1)+(e.editingMode===g.i3.EditingMode.DYNAMIC?1:0)),s=Math.min(a,400);e.height&&(s=Math.max(e.height,pt),a=Math.max(e.height,a)),r&&(s=Math.min(s,r),a=Math.min(a,r),e.height||(s=a));const d=Math.max(o,ft);let u,c=d;e.useContainerWidth?u=d:e.width&&(u=Math.min(Math.max(e.width,ft),d),c=Math.min(Math.max(e.width,c),d));const[m,h]=i.useState({width:u||"100%",height:s});return i.useLayoutEffect((()=>{e.useContainerWidth&&"100%"===m.width&&h({width:d,height:m.height})}),[d]),i.useLayoutEffect((()=>{h({width:m.width,height:s})}),[t]),i.useLayoutEffect((()=>{h({width:u||"100%",height:m.height})}),[u]),i.useLayoutEffect((()=>{h({width:m.width,height:s})}),[s]),i.useLayoutEffect((()=>{if(l){const t=e.useContainerWidth||(0,f.se)(e.width)&&e.width>0;h({width:t?c:"100%",height:a})}else h({width:u||"100%",height:s})}),[l]),{minHeight:pt,maxHeight:a,minWidth:ft,maxWidth:c,resizableSize:m,setResizableSize:h}};var bt=n(89653),yt=n(90782);const wt=(0,bt.A)("img",{target:"e24uaba0"})({name:"1do33ec",styles:"max-width:100%;max-height:600px;object-fit:scale-down"}),xt=e=>{let{urls:t}=e;const n=t&&t.length>0?t[0]:"";return n.startsWith("http")?(0,yt.jsx)("a",{href:n,target:"_blank",rel:"noreferrer noopener",children:(0,yt.jsx)(wt,{src:n})}):(0,yt.jsx)(wt,{src:n})};var Ct=n(3074),Mt=n(41639),St=n(34914),Et=n(88044),Tt=n(58144);const kt=function(e){let{top:t,left:n,content:o,clearTooltip:r}=e;const[l,a]=i.useState(!0),s=(0,J.u)(),{colors:d,fontSizes:u,radii:c,fontWeights:m}=s,h=i.useCallback((()=>{a(!1),r()}),[r,a]);return(0,yt.jsx)(Ct.A,{content:(0,yt.jsx)(Et.hW,{"data-testid":"stDataFrameTooltipContent",children:(0,yt.jsx)(St.Ay,{style:{fontSize:u.sm},source:o,allowHTML:!1})}),placement:Mt.El.top,accessibilityType:Mt.IP.tooltip,showArrow:!1,popoverMargin:5,onClickOutside:h,onEsc:h,overrides:{Body:{style:{borderTopLeftRadius:c.default,borderTopRightRadius:c.default,borderBottomLeftRadius:c.default,borderBottomRightRadius:c.default,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important",backgroundColor:"transparent"}},Inner:{style:{backgroundColor:(0,Tt.iq)(s)?d.bgColor:d.secondaryBg,color:d.bodyText,fontSize:u.sm,fontWeight:m.normal,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important"}}},isOpen:l,children:(0,yt.jsx)("div",{"data-testid":"stDataFrameTooltipTarget",style:{position:"fixed",top:t,left:n}})})},Rt=(0,bt.A)("div",{target:"e1w7nams0"})((e=>{let{hasCustomizedScrollbars:t,theme:n}=e;return{position:"relative",display:"inline-block","& .stDataFrameGlideDataEditor":{height:"100%",minWidth:"100%",borderRadius:n.radii.default},"& .dvn-scroller":{...!t&&{scrollbarWidth:"thin"},overflowX:"auto !important",overflowY:"auto !important"}}}),"");n(32595),n(1627);const Nt=(0,h.A)((function(e){let{element:t,data:n,width:h,height:b,disabled:y,widgetMgr:w,isFullScreen:x,disableFullscreenMode:C,expand:M,collapse:S,fragmentId:E}=e;const T=i.useRef(null),k=i.useRef(null),R=i.useRef(null),{theme:N,headerIcons:I,tableBorderRadius:_}=ze(),{libConfig:{enforceDownloadInNewTab:O=!1}}=i.useContext(v.n),[D,A]=i.useState(!0),[F,X]=i.useState(!1),[H,V]=i.useState(!1),[z,j]=i.useState(!1),W=i.useMemo((()=>window.matchMedia&&window.matchMedia("(pointer: coarse)").matches),[]),B=i.useMemo((()=>window.navigator.userAgent.includes("Mac OS")&&window.navigator.userAgent.includes("Safari")||window.navigator.userAgent.includes("Chrome")),[]);(0,f.hX)(t.editingMode)&&(t.editingMode=g.i3.EditingMode.READ_ONLY);const{READ_ONLY:Y,DYNAMIC:P}=g.i3.EditingMode,U=n.dimensions,q=Math.max(0,U.dataRows),J=0===q&&!(t.editingMode===P&&U.dataColumns>0),G=q>15e4,K=i.useRef(new He(q)),[Z,Q]=i.useState(K.current.getNumRows());i.useEffect((()=>{K.current=new He(q),Q(K.current.getNumRows())}),[q]);const ee=i.useCallback((()=>{K.current=new He(q),Q(K.current.getNumRows())}),[q]),{columns:te}=Le(t,n,y);i.useEffect((()=>{if(t.editingMode===Y)return;const e=w.getStringValue({id:t.id,formId:t.formId});e&&(K.current.fromJson(e,te),Q(K.current.getNumRows()))}),[]);const{getCellContent:ne}=je(n,te,Z,K),{columns:ie,sortColumn:oe,getOriginalIndex:re,getCellContent:le}=Be(q,te,ne),ae=i.useCallback((0,f.sg)(150,(e=>{const n={selection:{rows:[],columns:[]}};n.selection.rows=e.rows.toArray().map((e=>re(e))),n.selection.columns=e.columns.toArray().map((e=>Xe(ie[e])));const i=JSON.stringify(n),o=w.getStringValue({id:t.id,formId:t.formId});void 0!==o&&o===i||w.setStringValue({id:t.id,formId:t.formId},i,{fromUi:!0},E)})),[t.id,t.formId,w,E,re,Xe]),{gridSelection:se,isRowSelectionActivated:de,isMultiRowSelectionActivated:ue,isColumnSelectionActivated:ce,isMultiColumnSelectionActivated:me,isRowSelected:he,isColumnSelected:ge,isCellSelected:fe,clearSelection:pe,processSelectionChange:ve}=Ue(t,J,y,ie,ae);i.useEffect((()=>{pe(!0,!0)}),[x]);const be=i.useCallback((e=>{var t;null===(t=k.current)||void 0===t||t.updateCells(e)}),[]);i.useEffect((()=>{if(!de&&!ce)return;const e=w.getStringValue({id:t.id,formId:t.formId});if(e){var n,i,r,l;const t=ie.map((e=>Xe(e))),a=JSON.parse(e);let s=o.I1.empty(),d=o.I1.empty();if(null===(n=a.selection)||void 0===n||null===(i=n.rows)||void 0===i||i.forEach((e=>{s=s.add(e)})),null===(r=a.selection)||void 0===r||null===(l=r.columns)||void 0===l||l.forEach((e=>{d=d.add(t.indexOf(e))})),s.length>0||d.length>0){ve({rows:s,columns:d,current:void 0})}}}),[]);const ye=i.useCallback((()=>{Z!==K.current.getNumRows()&&Q(K.current.getNumRows())}),[Z]),we=i.useCallback((0,f.sg)(150,(()=>{const e=K.current.toJson(ie);let n=w.getStringValue({id:t.id,formId:t.formId});void 0===n&&(n=new He(0).toJson([])),e!==n&&w.setStringValue({id:t.id,formId:t.formId},e,{fromUi:!0},E)})),[t.id,t.formId,w,E,ie,K.current]),{exportToCsv:xe}=it(le,ie,Z,O),{onCellEdited:Ce,onPaste:Me,onRowAppended:Se,onDelete:Ee,validateCell:Te}=ot(ie,t.editingMode!==P,K,le,re,be,ye,we,pe),{tooltip:ke,clearTooltip:Re,onItemHovered:Ne}=rt(ie,le),{drawCell:Ie,customRenderers:_e}=ct(ie),Oe=i.useMemo((()=>ie.map((e=>L(e)))),[ie]),{columns:De,onColumnResize:Ae}=mt(Oe),Fe=n.columns.length>1,{minHeight:$e,maxHeight:Ve,minWidth:We,maxWidth:Ye,resizableSize:Pe,setResizableSize:qe}=vt(t,Z,Fe,h,b,x),Je=i.useCallback((e=>{let[t,n]=e;return{...$(!0,!1),displayData:"empty",contentAlign:"center",allowOverlay:!1,themeOverride:{textDark:N.textLight},span:[0,Math.max(ie.length-1,0)]}}),[ie,N.textLight]);i.useEffect((()=>{if(!t.formId)return;const e=new m.o;return e.manageFormClearListener(w,t.formId,(()=>{ee(),pe()})),()=>{e.disconnect()}}),[t.formId,ee,pe,w]);const Ge=!J&&t.editingMode===P&&!y,Ke=J?0:ie.filter((e=>e.isIndex)).length;return i.useEffect((()=>{setTimeout((()=>{if(R.current&&k.current){var e,t;const n=null===(e=R.current)||void 0===e||null===(t=e.querySelector(".dvn-stack"))||void 0===t?void 0:t.getBoundingClientRect();n&&(V(n.height>R.current.clientHeight),j(n.width>R.current.clientWidth))}}),1)}),[Pe,Z,De]),(0,yt.jsxs)(Rt,{className:"stDataFrame","data-testid":"stDataFrame",hasCustomizedScrollbars:B,ref:R,onMouseDown:e=>{if(R.current&&B){const t=R.current.getBoundingClientRect();z&&t.height-7<e.clientY-t.top&&e.stopPropagation(),H&&t.width-7<e.clientX-t.left&&e.stopPropagation()}},onBlur:e=>{D||W||e.currentTarget.contains(e.relatedTarget)||pe(!0,!0)},children:[(0,yt.jsxs)(p.A,{isFullScreen:x,disableFullscreenMode:C,locked:he&&!de||fe||W&&D,onExpand:M,onCollapse:S,target:Rt,children:[(de&&he||ce&&ge)&&(0,yt.jsx)(p.K,{label:"Clear selection",icon:a.b,onClick:()=>{pe(),Re()}}),Ge&&he&&(0,yt.jsx)(p.K,{label:"Delete row(s)",icon:s.e,onClick:()=>{Ee&&(Ee(se),Re())}}),Ge&&!he&&(0,yt.jsx)(p.K,{label:"Add row",icon:d.O,onClick:()=>{Se&&(A(!0),Se(),Re())}}),!G&&!J&&(0,yt.jsx)(p.K,{label:"Download as CSV",icon:u.n,onClick:()=>xe()}),!J&&(0,yt.jsx)(p.K,{label:"Search",icon:c.v,onClick:()=>{F?X(!1):(A(!0),X(!0)),Re()}})]}),(0,yt.jsx)(l.c,{"data-testid":"stDataFrameResizable",ref:T,defaultSize:Pe,style:{border:`1px solid ${N.borderColor}`,borderRadius:`${_}`},minHeight:$e,maxHeight:Ve,minWidth:We,maxWidth:Ye,size:Pe,enable:{top:!1,right:!1,bottom:!1,left:!1,topRight:!1,bottomRight:!0,bottomLeft:!1,topLeft:!1},grid:[1,gt],snapGap:gt/3,onResizeStop:(e,t,n,i)=>{T.current&&qe({width:T.current.size.width,height:Ve-T.current.size.height===ht?T.current.size.height+ht:T.current.size.height})},children:(0,yt.jsx)(r.D,{className:"stDataFrameGlideDataEditor","data-testid":"stDataFrameGlideDataEditor",ref:k,columns:De,rows:J?1:Z,minColumnWidth:50,maxColumnWidth:1e3,maxColumnAutoWidth:500,rowHeight:gt,headerHeight:gt,getCellContent:J?Je:le,onColumnResize:W?void 0:Ae,resizeIndicator:"header",freezeColumns:Ke,smoothScrollX:!0,smoothScrollY:!0,verticalBorder:!0,getCellsForSelection:!0,rowMarkers:"none",rangeSelect:W?"cell":"rect",columnSelect:"none",rowSelect:"none",onItemHovered:Ne,keybindings:{downFill:!0},onKeyDown:e=>{(e.ctrlKey||e.metaKey)&&"f"===e.key&&(X((e=>!e)),e.stopPropagation(),e.preventDefault())},showSearch:F,onSearchClose:()=>{X(!1),Re()},onHeaderClicked:(e,t)=>{J||G||ce||(de&&he&&pe(),oe(e))},gridSelection:se,onGridSelectionChange:e=>{(D||W)&&(ve(e),void 0!==ke&&Re())},theme:N,onMouseMove:e=>{"out-of-bounds"===e.kind&&D?A(!1):"out-of-bounds"===e.kind||D||A(!0)},fixedShadowX:!0,fixedShadowY:!0,experimental:{scrollbarWidthOverride:0,...B&&{paddingBottom:z?-6:void 0,paddingRight:H?-6:void 0}},drawCell:Ie,customRenderers:_e,imageEditorOverride:xt,headerIcons:I,validateCell:Te,onPaste:!1,...de&&{rowMarkers:{kind:"checkbox",checkboxStyle:"square",theme:{bgCell:N.bgHeader,bgCellMedium:N.bgHeader}},rowSelectionMode:ue?"multi":"auto",rowSelect:y?"none":ue?"multi":"single",rowSelectionBlending:"mixed",rangeSelectionBlending:"exclusive"},...ce&&{columnSelect:y?"none":me?"multi":"single",columnSelectionBlending:"mixed",rangeSelectionBlending:"exclusive"},...!J&&t.editingMode!==Y&&!y&&{fillHandle:!W,onCellEdited:Ce,onPaste:Me,onDelete:Ee},...!J&&t.editingMode===P&&{trailingRowOptions:{sticky:!1,tint:!0},rowMarkers:{kind:"checkbox",checkboxStyle:"square",theme:{bgCell:N.bgHeader,bgCellMedium:N.bgHeader}},rowSelectionMode:"multi",rowSelect:y?"none":"multi",onRowAppended:y?void 0:Se,onHeaderClicked:void 0}})}),ke&&ke.content&&(0,yt.jsx)(kt,{top:ke.top,left:ke.left,content:ke.content,clearTooltip:Re})]})}),!0)},34752:(e,t,n)=>{n.d(t,{X:()=>l,o:()=>r});var i=n(58878),o=n(25571);class r{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(e,t,n){(0,o.se)(this.formClearListener)&&this.lastWidgetMgr===e&&this.lastFormId===t||(this.disconnect(),(0,o._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 l(e){let{element:t,widgetMgr:n,onFormCleared:r}=e;(0,i.useEffect)((()=>{if(!(0,o._L)(t.formId))return;const e=n.addFormClearedListener(t.formId,r);return()=>{e.disconnect()}}),[t,n,r])}},55562:(e,t,n)=>{n.d(t,{A:()=>i});const i=e=>{let{enforceDownloadInNewTab:t,url:n,filename:i}=e;const o=document.createElement("a");return o.setAttribute("href",n),t?o.setAttribute("target","_blank"):o.setAttribute("target","_self"),o.setAttribute("download",i),o}}}]);
|