streamlit-nightly 1.39.1.dev20241013__py2.py3-none-any.whl → 1.39.1.dev20241014__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 +2 -2
- streamlit/static/index.html +1 -1
- streamlit/static/static/js/{main.a74e5808.js → main.555eaf62.js} +2 -2
- {streamlit_nightly-1.39.1.dev20241013.dist-info → streamlit_nightly-1.39.1.dev20241014.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.39.1.dev20241013.dist-info → streamlit_nightly-1.39.1.dev20241014.dist-info}/RECORD +10 -10
- /streamlit/static/static/js/{main.a74e5808.js.LICENSE.txt → main.555eaf62.js.LICENSE.txt} +0 -0
- {streamlit_nightly-1.39.1.dev20241013.data → streamlit_nightly-1.39.1.dev20241014.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.39.1.dev20241013.dist-info → streamlit_nightly-1.39.1.dev20241014.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.39.1.dev20241013.dist-info → streamlit_nightly-1.39.1.dev20241014.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.39.1.dev20241013.dist-info → streamlit_nightly-1.39.1.dev20241014.dist-info}/top_level.txt +0 -0
@@ -1,7 +1,7 @@
|
|
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.555eaf62.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",
|
@@ -153,6 +153,6 @@
|
|
153
153
|
},
|
154
154
|
"entrypoints": [
|
155
155
|
"static/css/main.5513bd04.css",
|
156
|
-
"static/js/main.
|
156
|
+
"static/js/main.555eaf62.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.555eaf62.js"></script><link href="./static/css/main.5513bd04.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! For license information please see main.
|
1
|
+
/*! For license information please see main.555eaf62.js.LICENSE.txt */
|
2
2
|
(()=>{var __webpack_modules__={26724:(e,t,n)=>{"use strict";n.d(t,{GX:()=>r,LD:()=>o});const r=8501,o=3e3===+window.location.port},35911:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(58878).createContext(!1)},42333:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(58878).createContext(!1)},84152:(e,t,n)=>{"use strict";n.d(t,{n:()=>i});var r=n(58878),o=n(19539);const i=r.createContext({isFullScreen:!1,setFullScreen:()=>{},addScriptFinishedHandler:()=>{},removeScriptFinishedHandler:()=>{},activeTheme:o.$7,setTheme:()=>{},availableThemes:[],addThemes:()=>{},onPageChange:()=>{},currentPageScriptHash:"",libConfig:{},fragmentIdsThisRun:[]})},52050:(e,t,n)=>{"use strict";n.d(t,{E:()=>r});const r=n(58878).createContext(null)},75577:(e,t,n)=>{"use strict";n.d(t,{A:()=>f,b:()=>b});n(58878);var r=n(29669),o=n(34914),i=n(94426),a=n(3257),s=n(89653),l=n(46908),c=n(1637),u=n(65828);const p=(0,s.A)("div",{target:"e1eexb540"})((e=>{let{theme:t}=e;return{display:"flex",gap:t.spacing.sm,width:"100%",[`${l.Dz}, ${l.vE}, ${u.q}`]:{position:"relative",top:"2px"},[`${c.c3} code`]:{paddingRight:t.spacing.lg}}}),"");var d=n(90782);function b(e){switch(e){case r.Fc.Format.ERROR:return a.b.ERROR;case r.Fc.Format.INFO:return a.b.INFO;case r.Fc.Format.SUCCESS:return a.b.SUCCESS;case r.Fc.Format.WARNING:return a.b.WARNING;default:throw new Error(`Unexpected alert type: ${e}`)}}function f(e){let{icon:t,body:n,kind:r,width:s}=e;const l={width:t?"calc(100% - 1.75rem)":"100%"};return(0,d.jsx)("div",{className:"stAlert","data-testid":"stAlert",children:(0,d.jsx)(a.A,{width:s,kind:r,children:(0,d.jsxs)(p,{children:[t&&(0,d.jsx)(i.$,{iconValue:t,size:"lg",testid:"stAlertDynamicIcon"}),(0,d.jsx)(o.Ay,{source:n,allowHTML:!1,style:l})]})})})}},6444:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>U});var r=n(58878),o=n(68102),i=n(41705);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){(0,i.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var l={};function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return function(e){if(0===e.length||1===e.length)return e;var t=e.join(".");return l[t]||(l[t]=function(e){var t=e.length;return 0===t||1===t?e:2===t?[e[0],e[1],"".concat(e[0],".").concat(e[1]),"".concat(e[1],".").concat(e[0])]:3===t?[e[0],e[1],e[2],"".concat(e[0],".").concat(e[1]),"".concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[0]),"".concat(e[1],".").concat(e[2]),"".concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[1]),"".concat(e[0],".").concat(e[1],".").concat(e[2]),"".concat(e[0],".").concat(e[2],".").concat(e[1]),"".concat(e[1],".").concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[0],".").concat(e[1]),"".concat(e[2],".").concat(e[1],".").concat(e[0])]:t>=4?[e[0],e[1],e[2],e[3],"".concat(e[0],".").concat(e[1]),"".concat(e[0],".").concat(e[2]),"".concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[0]),"".concat(e[1],".").concat(e[2]),"".concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[1]),"".concat(e[2],".").concat(e[3]),"".concat(e[3],".").concat(e[0]),"".concat(e[3],".").concat(e[1]),"".concat(e[3],".").concat(e[2]),"".concat(e[0],".").concat(e[1],".").concat(e[2]),"".concat(e[0],".").concat(e[1],".").concat(e[3]),"".concat(e[0],".").concat(e[2],".").concat(e[1]),"".concat(e[0],".").concat(e[2],".").concat(e[3]),"".concat(e[0],".").concat(e[3],".").concat(e[1]),"".concat(e[0],".").concat(e[3],".").concat(e[2]),"".concat(e[1],".").concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[2],".").concat(e[0]),"".concat(e[1],".").concat(e[2],".").concat(e[3]),"".concat(e[1],".").concat(e[3],".").concat(e[0]),"".concat(e[1],".").concat(e[3],".").concat(e[2]),"".concat(e[2],".").concat(e[0],".").concat(e[1]),"".concat(e[2],".").concat(e[0],".").concat(e[3]),"".concat(e[2],".").concat(e[1],".").concat(e[0]),"".concat(e[2],".").concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[3],".").concat(e[0]),"".concat(e[2],".").concat(e[3],".").concat(e[1]),"".concat(e[3],".").concat(e[0],".").concat(e[1]),"".concat(e[3],".").concat(e[0],".").concat(e[2]),"".concat(e[3],".").concat(e[1],".").concat(e[0]),"".concat(e[3],".").concat(e[1],".").concat(e[2]),"".concat(e[3],".").concat(e[2],".").concat(e[0]),"".concat(e[3],".").concat(e[2],".").concat(e[1]),"".concat(e[0],".").concat(e[1],".").concat(e[2],".").concat(e[3]),"".concat(e[0],".").concat(e[1],".").concat(e[3],".").concat(e[2]),"".concat(e[0],".").concat(e[2],".").concat(e[1],".").concat(e[3]),"".concat(e[0],".").concat(e[2],".").concat(e[3],".").concat(e[1]),"".concat(e[0],".").concat(e[3],".").concat(e[1],".").concat(e[2]),"".concat(e[0],".").concat(e[3],".").concat(e[2],".").concat(e[1]),"".concat(e[1],".").concat(e[0],".").concat(e[2],".").concat(e[3]),"".concat(e[1],".").concat(e[0],".").concat(e[3],".").concat(e[2]),"".concat(e[1],".").concat(e[2],".").concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[2],".").concat(e[3],".").concat(e[0]),"".concat(e[1],".").concat(e[3],".").concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[3],".").concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[0],".").concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[0],".").concat(e[3],".").concat(e[1]),"".concat(e[2],".").concat(e[1],".").concat(e[0],".").concat(e[3]),"".concat(e[2],".").concat(e[1],".").concat(e[3],".").concat(e[0]),"".concat(e[2],".").concat(e[3],".").concat(e[0],".").concat(e[1]),"".concat(e[2],".").concat(e[3],".").concat(e[1],".").concat(e[0]),"".concat(e[3],".").concat(e[0],".").concat(e[1],".").concat(e[2]),"".concat(e[3],".").concat(e[0],".").concat(e[2],".").concat(e[1]),"".concat(e[3],".").concat(e[1],".").concat(e[0],".").concat(e[2]),"".concat(e[3],".").concat(e[1],".").concat(e[2],".").concat(e[0]),"".concat(e[3],".").concat(e[2],".").concat(e[0],".").concat(e[1]),"".concat(e[3],".").concat(e[2],".").concat(e[1],".").concat(e[0])]:void 0}(e)),l[t]}(e.filter((function(e){return"token"!==e}))).reduce((function(e,t){return s(s({},e),n[t])}),t)}function u(e){return e.join(" ")}function p(e){var t=e.node,n=e.stylesheet,i=e.style,a=void 0===i?{}:i,l=e.useInlineStyles,d=e.key,b=t.properties,f=t.type,h=t.tagName,m=t.value;if("text"===f)return m;if(h){var M,O=function(e,t){var n=0;return function(r){return n+=1,r.map((function(r,o){return p({node:r,stylesheet:e,useInlineStyles:t,key:"code-segment-".concat(n,"-").concat(o)})}))}}(n,l);if(l){var g=Object.keys(n).reduce((function(e,t){return t.split(".").forEach((function(t){e.includes(t)||e.push(t)})),e}),[]),z=b.className&&b.className.includes("token")?["token"]:[],y=b.className&&z.concat(b.className.filter((function(e){return!g.includes(e)})));M=s(s({},b),{},{className:u(y)||void 0,style:c(b.className,Object.assign({},b.style,a),n)})}else M=s(s({},b),{},{className:u(b.className)});var A=O(t.children);return r.createElement(h,(0,o.A)({key:d},M),A)}}var d=n(81515),b=n(94300);const f=function(e,t){return-1!==e.listLanguages().indexOf(t)};var h=["language","children","style","customStyle","codeTagProps","useInlineStyles","showLineNumbers","showInlineLineNumbers","startingLineNumber","lineNumberContainerStyle","lineNumberStyle","wrapLines","wrapLongLines","lineProps","renderer","PreTag","CodeTag","code","astGenerator"];function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){(0,i.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var O=/\n/g;function g(e){var t=e.codeString,n=e.codeStyle,o=e.containerStyle,i=void 0===o?{float:"left",paddingRight:"10px"}:o,a=e.numberStyle,s=void 0===a?{}:a,l=e.startingLineNumber;return r.createElement("code",{style:Object.assign({},n,i)},function(e){var t=e.lines,n=e.startingLineNumber,o=e.style;return t.map((function(e,t){var i=t+n;return r.createElement("span",{key:"line-".concat(t),className:"react-syntax-highlighter-line-number",style:"function"===typeof o?o(i):o},"".concat(i,"\n"))}))}({lines:t.replace(/\n$/,"").split("\n"),style:s,startingLineNumber:l}))}function z(e,t){return{type:"element",tagName:"span",properties:{key:"line-number--".concat(e),className:["comment","linenumber","react-syntax-highlighter-line-number"],style:t},children:[{type:"text",value:e}]}}function y(e,t,n){var r,o={display:"inline-block",minWidth:(r=n,"".concat(r.toString().length,".25em")),paddingRight:"1em",textAlign:"right",userSelect:"none"},i="function"===typeof e?e(t):e;return M(M({},o),i)}function A(e){var t=e.children,n=e.lineNumber,r=e.lineNumberStyle,o=e.largestLineNumber,i=e.showInlineLineNumbers,a=e.lineProps,s=void 0===a?{}:a,l=e.className,c=void 0===l?[]:l,u=e.showLineNumbers,p=e.wrapLongLines,d="function"===typeof s?s(n):s;if(d.className=c,n&&i){var b=y(r,n,o);t.unshift(z(n,b))}return p&u&&(d.style=M(M({},d.style),{},{display:"flex"})),{type:"element",tagName:"span",properties:d,children:t}}function v(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=0;r<e.length;r++){var o=e[r];if("text"===o.type)n.push(A({children:[o],className:(0,b.A)(new Set(t))}));else if(o.children){var i=t.concat(o.properties.className);v(o.children,i).forEach((function(e){return n.push(e)}))}}return n}function w(e,t,n,r,o,i,a,s,l){var c,u=v(e.value),p=[],d=-1,b=0;function f(e,i){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return t||c.length>0?function(e,t){return A({children:e,lineNumber:t,lineNumberStyle:s,largestLineNumber:a,showInlineLineNumbers:o,lineProps:n,className:arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],showLineNumbers:r,wrapLongLines:l})}(e,i,c):function(e,t){if(r&&t&&o){var n=y(s,t,a);e.unshift(z(t,n))}return e}(e,i)}for(var h=function(){var e=u[b],t=e.children[0].value;if(t.match(O)){var n=t.split("\n");n.forEach((function(t,o){var a=r&&p.length+i,s={type:"text",value:"".concat(t,"\n")};if(0===o){var l=f(u.slice(d+1,b).concat(A({children:[s],className:e.properties.className})),a);p.push(l)}else if(o===n.length-1){var c=u[b+1]&&u[b+1].children&&u[b+1].children[0],h={type:"text",value:"".concat(t)};if(c){var m=A({children:[h],className:e.properties.className});u.splice(b+1,0,m)}else{var M=f([h],a,e.properties.className);p.push(M)}}else{var O=f([s],a,e.properties.className);p.push(O)}})),d=b}b++};b<u.length;)h();if(d!==u.length-1){var m=u.slice(d+1,u.length);if(m&&m.length){var M=f(m,r&&p.length+i);p.push(M)}}return t?p:(c=[]).concat.apply(c,p)}function S(e){var t=e.rows,n=e.stylesheet,r=e.useInlineStyles;return t.map((function(e,t){return p({node:e,stylesheet:n,useInlineStyles:r,key:"code-segement".concat(t)})}))}function q(e){return e&&"undefined"!==typeof e.highlightAuto}var E=n(80243);var _,x,T=(_=n.n(E)(),x={'code[class*="language-"]':{color:"black",background:"none",textShadow:"0 1px white",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"black",background:"#f5f2f0",textShadow:"0 1px white",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#b3d4fc"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"]::selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"] ::selection':{textShadow:"none",background:"#b3d4fc"},':not(pre) > code[class*="language-"]':{background:"#f5f2f0",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"slategray"},prolog:{color:"slategray"},doctype:{color:"slategray"},cdata:{color:"slategray"},punctuation:{color:"#999"},namespace:{Opacity:".7"},property:{color:"#905"},tag:{color:"#905"},boolean:{color:"#905"},number:{color:"#905"},constant:{color:"#905"},symbol:{color:"#905"},deleted:{color:"#905"},selector:{color:"#690"},"attr-name":{color:"#690"},string:{color:"#690"},char:{color:"#690"},builtin:{color:"#690"},inserted:{color:"#690"},operator:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},entity:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)",cursor:"help"},url:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},".language-css .token.string":{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},".style .token.string":{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},atrule:{color:"#07a"},"attr-value":{color:"#07a"},keyword:{color:"#07a"},function:{color:"#DD4A68"},"class-name":{color:"#DD4A68"},regex:{color:"#e90"},important:{color:"#e90",fontWeight:"bold"},variable:{color:"#e90"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}},function(e){var t=e.language,n=e.children,o=e.style,i=void 0===o?x:o,a=e.customStyle,s=void 0===a?{}:a,l=e.codeTagProps,c=void 0===l?{className:t?"language-".concat(t):void 0,style:M(M({},i['code[class*="language-"]']),i['code[class*="language-'.concat(t,'"]')])}:l,u=e.useInlineStyles,p=void 0===u||u,b=e.showLineNumbers,m=void 0!==b&&b,O=e.showInlineLineNumbers,z=void 0===O||O,y=e.startingLineNumber,A=void 0===y?1:y,v=e.lineNumberContainerStyle,E=e.lineNumberStyle,T=void 0===E?{}:E,R=e.wrapLines,k=e.wrapLongLines,C=void 0!==k&&k,N=e.lineProps,W=void 0===N?{}:N,L=e.renderer,I=e.PreTag,P=void 0===I?"pre":I,D=e.CodeTag,B=void 0===D?"code":D,j=e.code,F=void 0===j?(Array.isArray(n)?n[0]:n)||"":j,U=e.astGenerator,V=(0,d.A)(e,h);U=U||_;var H=m?r.createElement(g,{containerStyle:v,codeStyle:c.style||{},numberStyle:T,startingLineNumber:A,codeString:F}):null,X=i.hljs||i['pre[class*="language-"]']||{backgroundColor:"#fff"},G=q(U)?"hljs":"prismjs",$=p?Object.assign({},V,{style:Object.assign({},X,s)}):Object.assign({},V,{className:V.className?"".concat(G," ").concat(V.className):G,style:Object.assign({},s)});if(c.style=M(M({},c.style),{},C?{whiteSpace:"pre-wrap"}:{whiteSpace:"pre"}),!U)return r.createElement(P,$,H,r.createElement(B,c,F));(void 0===R&&L||C)&&(R=!0),L=L||S;var K=[{type:"text",value:F}],Y=function(e){var t=e.astGenerator,n=e.language,r=e.code,o=e.defaultCodeValue;if(q(t)){var i=f(t,n);return"text"===n?{value:o,language:"text"}:i?t.highlight(n,r):t.highlightAuto(r)}try{return n&&"text"!==n?{value:t.highlight(r,n)}:{value:o}}catch(a){return{value:o}}}({astGenerator:U,language:t,code:F,defaultCodeValue:K});null===Y.language&&(Y.value=K);var J=w(Y,R,W,m,z,A,Y.value.length+A,T,C);return r.createElement(P,$,r.createElement(B,c,!z&&H,L({rows:J,stylesheet:i,useInlineStyles:p})))});T.supportedLanguages=["abap","abnf","actionscript","ada","agda","al","antlr4","apacheconf","apex","apl","applescript","aql","arduino","arff","asciidoc","asm6502","asmatmel","aspnet","autohotkey","autoit","avisynth","avro-idl","bash","basic","batch","bbcode","bicep","birb","bison","bnf","brainfuck","brightscript","bro","bsl","c","cfscript","chaiscript","cil","clike","clojure","cmake","cobol","coffeescript","concurnas","coq","cpp","crystal","csharp","cshtml","csp","css-extras","css","csv","cypher","d","dart","dataweave","dax","dhall","diff","django","dns-zone-file","docker","dot","ebnf","editorconfig","eiffel","ejs","elixir","elm","erb","erlang","etlua","excel-formula","factor","false","firestore-security-rules","flow","fortran","fsharp","ftl","gap","gcode","gdscript","gedcom","gherkin","git","glsl","gml","gn","go-module","go","graphql","groovy","haml","handlebars","haskell","haxe","hcl","hlsl","hoon","hpkp","hsts","http","ichigojam","icon","icu-message-format","idris","iecst","ignore","inform7","ini","io","j","java","javadoc","javadoclike","javascript","javastacktrace","jexl","jolie","jq","js-extras","js-templates","jsdoc","json","json5","jsonp","jsstacktrace","jsx","julia","keepalived","keyman","kotlin","kumir","kusto","latex","latte","less","lilypond","liquid","lisp","livescript","llvm","log","lolcode","lua","magma","makefile","markdown","markup-templating","markup","matlab","maxscript","mel","mermaid","mizar","mongodb","monkey","moonscript","n1ql","n4js","nand2tetris-hdl","naniscript","nasm","neon","nevod","nginx","nim","nix","nsis","objectivec","ocaml","opencl","openqasm","oz","parigp","parser","pascal","pascaligo","pcaxis","peoplecode","perl","php-extras","php","phpdoc","plsql","powerquery","powershell","processing","prolog","promql","properties","protobuf","psl","pug","puppet","pure","purebasic","purescript","python","q","qml","qore","qsharp","r","racket","reason","regex","rego","renpy","rest","rip","roboconf","robotframework","ruby","rust","sas","sass","scala","scheme","scss","shell-session","smali","smalltalk","smarty","sml","solidity","solution-file","soy","sparql","splunk-spl","sqf","sql","squirrel","stan","stylus","swift","systemd","t4-cs","t4-templating","t4-vb","tap","tcl","textile","toml","tremor","tsx","tt2","turtle","twig","typescript","typoscript","unrealscript","uorazor","uri","v","vala","vbnet","velocity","verilog","vhdl","vim","visual-basic","warpscript","wasm","web-idl","wiki","wolfram","wren","xeora","xml-doc","xojo","xquery","yaml","yang","zig"];const R=T;var k=n(82178),C=n.n(k),N=n(29830),W=n.n(N);function L(){return L=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},L.apply(this,arguments)}function I(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var P=(0,r.forwardRef)((function(e,t){var n=e.color,o=void 0===n?"currentColor":n,i=e.size,a=void 0===i?24:i,s=I(e,["color","size"]);return r.createElement("svg",L({ref:t,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:o,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},s),r.createElement("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),r.createElement("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"}))}));P.propTypes={color:W().string,size:W().oneOfType([W().string,W().number])},P.displayName="Copy";const D=P;var B=n(1637),j=n(90782);const F=e=>{let{text:t}=e;const n=(0,r.useRef)(null),o=(0,r.useRef)(null);return(0,r.useEffect)((()=>{const e=n.current;var t;null!==e&&(o.current=new(C())(e,{container:null!==(t=e.parentElement)&&void 0!==t?t:void 0}));return()=>{null!==o.current&&o.current.destroy()}}),[]),(0,j.jsx)(B.xd,{"data-testid":"stCodeCopyButton",title:"Copy to clipboard",ref:n,"data-clipboard-text":t,style:{top:0,right:0},children:(0,j.jsx)(D,{size:"16"})})};function U(e){let{language:t,showLineNumbers:n,wrapLines:o,children:i}=e;const a=(0,r.useCallback)((e=>{let{rows:t,stylesheet:n,useInlineStyles:r}=e;return t.map(((e,t)=>{const o=e.children;if(o){const t=o.shift();t&&(e.children=[t,{children:o,properties:{className:[]},tagName:"span",type:"element"}])}return p({node:e,stylesheet:n,useInlineStyles:r,key:t})}))}),[]);return(0,j.jsxs)(B.c3,{className:"stCode","data-testid":"stCode",children:[(0,j.jsx)(B.rs,{children:(0,j.jsx)(R,{language:t,PreTag:"div",customStyle:{backgroundColor:"transparent"},style:{},lineNumberStyle:{},showLineNumbers:n,wrapLongLines:o,renderer:n&&o?a:void 0,children:i})}),"string"===typeof i&&""!==i.trim()&&(0,j.jsx)(B.Wh,{children:(0,j.jsx)(F,{text:i})})]})}},1637:(e,t,n)=>{"use strict";n.d(t,{Wh:()=>i,c3:()=>a,rs:()=>o,xd:()=>s});var r=n(89653);const o=(0,r.A)("pre",{target:"e1ycw9pz3"})((e=>{let{theme:t}=e;return{margin:0,paddingRight:t.iconSizes.threeXL,color:t.colors.bodyText,borderRadius:t.radii.default,".comment.linenumber":{color:t.colors.fadedText40,fontSize:t.fontSizes.twoSm,alignSelf:"center",minWidth:`${t.spacing.threeXL} !important`},".token.comment, .token.prolog, .token.doctype, .token.cdata":{color:t.colors.gray70},".token.punctuation":{color:t.colors.gray70},".namespace":{opacity:.7},".token.attr-name, .token.property, .token.variable":{color:t.colors.lightBlue80},".token.boolean, .token.constant, .token.symbol":{color:t.colors.green70},".token.number, .token.regex":{color:t.colors.blueGreen80},".token.string, .token.char, .token.attr-value":{color:t.colors.green80},".token.operator, .token.entity":{color:t.colors.orange90},".token.url":{color:t.colors.purple80},".token.decorator, .token.atrule":{color:t.colors.orange90},".token.keyword, .token.tag":{color:t.colors.blue70},".token.function, .token.class-name, .token.selector":{color:t.colors.blue70,fontWeight:t.fontWeights.extrabold},".token.important":{color:t.colors.red70,fontWeight:t.fontWeights.extrabold},".token.comment":{color:t.colors.gray70,fontStyle:"italic"},".token.italic":{fontStyle:"italic"},".token.entity":{cursor:"help"},".token.deleted.line, .token.deleted.prefix":{color:t.colors.red70},".token.inserted.line, .token.inserted.prefix":{color:t.colors.green70},".token.unchanged.line":{color:t.colors.gray70}}}),""),i=(0,r.A)("div",{target:"e1ycw9pz2"})((e=>{let{theme:t}=e;return{opacity:0,padding:`${t.spacing.sm} ${t.spacing.sm} 0 0`,top:0,right:0,position:"absolute",width:"100%",height:"100%",backgroundColor:t.colors.transparent,zIndex:t.zIndices.sidebar+1,display:"flex",justifyContent:"flex-end",alignItems:"flex-start",transition:"opacity 300ms 150ms",pointerEvents:"none"}}),""),a=(0,r.A)("div",{target:"e1ycw9pz1"})((e=>{let{theme:t}=e;return{position:"relative",marginLeft:t.spacing.none,marginRight:t.spacing.none,marginTop:t.spacing.none,marginBottom:void 0,"&:hover":{[`${i}`]:{opacity:1}}}}),""),s=(0,r.A)("button",{target:"e1ycw9pz0"})((e=>{let{theme:t}=e;return{pointerEvents:"auto",height:t.iconSizes.threeXL,width:t.iconSizes.threeXL,padding:t.spacing.none,border:"none",backgroundColor:t.colors.transparent,color:t.colors.fadedText60,transform:"scale(0)",[`${a}:hover &, &:active, &:focus, &:hover`]:{opacity:1,transform:"scale(1)",outline:"none",transition:"none",color:t.colors.bodyText}}}),"")},1780:(e,t,n)=>{"use strict";n.d(t,{E:()=>m});var r=n(58878),o=n(29669),i=n(89653);const a={animationDuration:"750ms",animationName:n(60667).i7`
|
3
3
|
0%, 100% {
|
4
4
|
opacity: 0.5;
|
@@ -25,4 +25,4 @@
|
|
25
25
|
}
|
26
26
|
100% {
|
27
27
|
opacity: 0;
|
28
|
-
}`,zd=(0,Ne.A)("div",{target:"e7qru6u0"})((e=>{let{theme:t}=e;return{position:"fixed",display:"flex",justifyContent:"center",alignItems:"center",top:0,left:0,width:t.sizes.full,height:t.sizes.full,fontSize:"40vh",color:t.colors.red,fontWeight:t.fontWeights.bold,opacity:"0.8",textShadow:`1px 1px 10px ${t.colors.darkGray}`,transition:"opacity 0.3s ease-in-out",fontFamily:'Helvetica, Calibri, Roboto, "Open Sans", Arial, sans-serif',animation:`${gd} 1s`}}),"");class yd extends n.PureComponent{constructor(){super(...arguments),this.state={countdown:this.props.countdown},this.onAnimationEnd=async()=>{const{countdown:e}=this.state,{endCallback:t}=this.props,n=e-1;n>=0&&this.setState({countdown:n}),0===n&&t()}}render(){const{countdown:e}=this.state;return(0,xe.jsx)(zd,{"data-testid":"stCountdown",onAnimationEnd:this.onAnimationEnd,children:(0,xe.jsx)("span",{children:e})},`frame${e}`)}}yd.defaultProps={endCallback:()=>{}};const Ad=yd;const vd=function(e){class t extends n.PureComponent{constructor(){super(...arguments),this.recorder=void 0,this.state={fileName:"streamlit-screencast",recordAudio:!1,currentState:this.props.testOverride||"OFF"},this.toggleRecordAudio=()=>{const{recordAudio:e}=this.state;this.setState({recordAudio:!e})},this.showDialog=e=>{const{currentState:t}=this.state;Xc.isSupportedBrowser()?"OFF"===t?this.setState({fileName:e,currentState:"SETUP"}):this.stopRecording().catch((e=>(0,vt.FF)(`withScreencast.stopRecording threw an error: ${e}`))):this.setState({currentState:"UNSUPPORTED"})},this.startRecording=async()=>{const{recordAudio:e}=this.state;this.recorder=new Xc({recordAudio:e,onErrorOrStop:()=>this.stopRecording()});try{await this.recorder.initialize()}catch(t){return(0,vt.FF)(`ScreenCastRecorder.initialize error: ${t}`),void this.setState({currentState:"UNSUPPORTED"})}this.setState({currentState:"COUNTDOWN"})},this.stopRecording=async()=>{let e;const{currentState:t}=this.state;"OFF"===t||(0,Pe.hX)(this.recorder)||("COUNTDOWN"===t&&this.setState({currentState:"OFF"}),"RECORDING"===t&&("inactive"===this.recorder.getState()?this.setState({currentState:"OFF"}):(e=await this.recorder.stop(),this.setState({outputBlob:e,currentState:"PREVIEW_FILE"}))))},this.onCountdownEnd=async()=>{if((0,Pe.hX)(this.recorder))throw new Error("Countdown finished but recorder is null");this.recorder.start()?this.setState({currentState:"RECORDING"}):this.stopRecording().catch((e=>(0,vt.FF)(`withScreencast.stopRecording threw an error: ${e}`)))},this.getScreenCastProps=()=>({currentState:this.state.currentState,toggleRecordAudio:this.toggleRecordAudio,startRecording:this.showDialog,stopRecording:this.stopRecording}),this.closeDialog=()=>{this.setState({currentState:"OFF"})},this.render=()=>{const{outputBlob:t,fileName:n,recordAudio:r,currentState:o}=this.state;return(0,xe.jsxs)("div",{className:"withScreencast","data-testid":"stScreencast",children:[(0,xe.jsx)(e,{...this.props,screenCast:this.getScreenCastProps()}),"UNSUPPORTED"===o&&(0,xe.jsx)(Od,{onClose:this.closeDialog}),"SETUP"===o&&(0,xe.jsx)(id,{recordAudio:r,onClose:this.closeDialog,startRecording:this.startRecording,toggleRecordAudio:this.toggleRecordAudio}),"COUNTDOWN"===o&&(0,xe.jsx)(Ad,{countdown:3,endCallback:this.onCountdownEnd}),"PREVIEW_FILE"===o&&t&&(0,xe.jsx)(bd,{onClose:this.closeDialog,videoBlob:t,fileName:n})]})}}}return t.displayName=`withScreencast(${e.displayName||e.name})`,ui()(t,e)};function wd(e){return e||"Streamlit"}class Sd{constructor(e){this.appPages=void 0,this.currentPageScriptHash=void 0,this.hideSidebarNav=void 0,this.appNav=void 0,this.appNav=e,this.appPages=[],this.currentPageScriptHash=null,this.hideSidebarNav=null}handleNewSession(e){var t,n,r,o,i;this.appPages=e.appPages,this.currentPageScriptHash=e.pageScriptHash,this.hideSidebarNav=null!==(t=null===(n=e.config)||void 0===n?void 0:n.hideSidebarNav)&&void 0!==t&&t;const a=this.appPages[0],s=null!==(r=a.urlPathname)&&void 0!==r?r:"",l=null!==(o=null===(i=this.appPages.find((e=>e.pageScriptHash===this.currentPageScriptHash)))||void 0===i?void 0:i.urlPathname)&&void 0!==o?o:"",c=a.pageScriptHash===this.currentPageScriptHash;return this.appNav.onUpdatePageUrl(s,l,c),document.title=wd(null!==l&&void 0!==l?l:""),[{hideSidebarNav:this.hideSidebarNav,appPages:this.appPages,currentPageScriptHash:this.currentPageScriptHash},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_APP_PAGES",appPages:this.appPages}),this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:c?"":l,currentPageScriptHash:this.currentPageScriptHash})}]}handlePagesChanged(e){const{appPages:t}=e;return[{appPages:t},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_APP_PAGES",appPages:t})}]}handlePageNotFound(e){var t,n;const{pageName:r}=e;this.appNav.onPageNotFound(r);const o=null!==(t=null===(n=this.appPages[0])||void 0===n?void 0:n.pageScriptHash)&&void 0!==t?t:"";return this.currentPageScriptHash=o,[{currentPageScriptHash:o},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:"",currentPageScriptHash:o})}]}handleNavigation(e){}findPageByUrlPath(e){var t;return 0===this.appPages.length?null:null!==(t=this.appPages.find((t=>e.endsWith("/"+t.urlPathname))))&&void 0!==t?t:this.appPages[0]}clearPageElements(e,t,n){return Ut.empty(t,!1,n,e.logo)}}class qd{constructor(e){this.appNav=void 0,this.mainScriptHash=void 0,this.appPages=void 0,this.mainPage=void 0,this.hideSidebarNav=void 0,this.appNav=e,this.mainScriptHash=null,this.appPages=[],this.mainPage=null,this.hideSidebarNav=null}handleNewSession(e){var t,n,r;(this.mainScriptHash=e.mainScriptHash,null===this.hideSidebarNav)&&(this.hideSidebarNav=null!==(n=null===(r=e.config)||void 0===r?void 0:r.hideSidebarNav)&&void 0!==n?n:null);return document.title=wd(""),[{hideSidebarNav:null!==(t=this.hideSidebarNav)&&void 0!==t&&t},()=>{}]}handlePagesChanged(e){}handlePageNotFound(e){var t;const{pageName:n}=e;return this.appNav.onPageNotFound(n),[{currentPageScriptHash:null!==(t=this.mainScriptHash)&&void 0!==t?t:""},()=>{var e;this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:"",currentPageScriptHash:null!==(e=this.mainScriptHash)&&void 0!==e?e:""})}]}handleNavigation(e){var t,n;const{sections:r,position:o,appPages:i}=e;this.appPages=i,this.hideSidebarNav=o===yt.Vx.Position.HIDDEN;const a=e.pageScriptHash,s=i.find((e=>e.pageScriptHash===a)),l=i.find((e=>e.isDefault));this.mainPage=l;const c=s.urlPathname;if(!this.appNav.isPageTitleSet){var u;const e=wd(s.pageName);document.title=e,this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_PAGE_TITLE",title:null!==(u=s.pageName)&&void 0!==u?u:""})}return!this.appNav.isPageIconSet&&s.icon&&this.appNav.onPageIconChange(s.icon),this.appNav.onUpdatePageUrl(null!==(t=l.urlPathname)&&void 0!==t?t:"",c,null!==(n=s.isDefault)&&void 0!==n&&n),[{appPages:i,navSections:r,hideSidebarNav:this.hideSidebarNav,expandSidebarNav:e.expanded,currentPageScriptHash:a},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_APP_PAGES",appPages:i}),this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:s.isDefault?"":c,currentPageScriptHash:a})}]}findPageByUrlPath(e){var t;return null!==(t=this.appPages.find((t=>e.endsWith("/"+t.urlPathname))))&&void 0!==t?t:this.mainPage}clearPageElements(e,t,n){return e.filterMainScriptElements(t)}}class Ed{constructor(e,t,n,r){this.hostCommunicationMgr=void 0,this.onUpdatePageUrl=void 0,this.onPageNotFound=void 0,this.onPageIconChange=void 0,this.isPageTitleSet=void 0,this.isPageIconSet=void 0,this.strategy=void 0,this.hostCommunicationMgr=e,this.onUpdatePageUrl=t,this.onPageNotFound=n,this.onPageIconChange=r,this.isPageIconSet=!1,this.isPageTitleSet=!1,this.strategy=new Sd(this)}handleNewSession(e){return this.isPageTitleSet=!1,this.isPageIconSet=!1,this.strategy.handleNewSession(e)}handleNavigation(e){return this.strategy instanceof Sd&&(this.strategy=new qd(this)),this.strategy.handleNavigation(e)}handlePagesChanged(e){return this.strategy.handlePagesChanged(e)}handlePageNotFound(e){return this.strategy.handlePageNotFound(e)}findPageByUrlPath(e){return this.strategy.findPageByUrlPath(e)}handlePageConfigChanged(e){this.isPageIconSet=Boolean(e.favicon),this.isPageTitleSet=Boolean(e.title)}clearPageElements(e,t,n){return this.strategy.clearPageElements(e,t,n)}}const _d="<null>",xd=(e,t)=>t==yt.TS.ToolbarMode.DEVELOPER||yt.TS.ToolbarMode.VIEWER!=t&&yt.TS.ToolbarMode.MINIMAL!=t&&(e||iu());class Td extends n.PureComponent{constructor(e){var t;super(e),t=this,this.endpoints=void 0,this.sessionInfo=new At,this.metricsMgr=new ed(this.sessionInfo),this.sessionEventDispatcher=new Yp,this.connectionManager=void 0,this.widgetMgr=void 0,this.hostCommunicationMgr=void 0,this.uploadClient=void 0,this.pendingElementsBuffer=void 0,this.pendingElementsTimerRunning=void 0,this.componentRegistry=void 0,this.embeddingId=(0,Pe.cv)(),this.appNavigation=void 0,this.showDeployError=(e,t,n)=>{this.openDialog({type:Ip.DEPLOY_ERROR,title:e,msg:t,onContinue:n,onClose:()=>{},onTryAgain:this.sendLoadGitInfoBackMsg})},this.handleThemeMessage=(e,t)=>{const[,n,r]=(0,Oe.Ef)(),o=(0,Oe.tl)(this.props.theme.activeTheme);e===n.name&&o?this.props.theme.setTheme(n):e===r.name&&o?this.props.theme.setTheme(r):t&&this.props.theme.setImportedTheme(t)},this.handleConnectionStateChanged=e=>{if((0,vt.OG)(`Connection state changed from ${this.state.connectionState} to ${e}`),e===xc.CONNECTED){(0,vt.OG)("Reconnected to server.");const e=this.state.scriptRunState===wt.RERUN_REQUESTED||this.state.scriptRunState===wt.RUNNING;this.sessionInfo.last&&!e||((0,vt.OG)("Requesting a script run."),this.widgetMgr.sendUpdateWidgetsMessage(void 0),this.setState({dialog:null})),this.hostCommunicationMgr.sendMessageToHost({type:"WEBSOCKET_CONNECTED"})}else this.state.connectionState===xc.CONNECTED&&this.hostCommunicationMgr.sendMessageToHost({type:"WEBSOCKET_DISCONNECTED",attemptingToReconnect:e!==xc.DISCONNECTED_FOREVER}),this.sessionInfo.isSet&&this.sessionInfo.clearCurrent();this.setState({connectionState:e})},this.handleGitInfoChanged=e=>{this.setState({gitInfo:e})},this.handleCustomParentMessage=e=>{this.state.appConfig.enableCustomParentMessages?this.hostCommunicationMgr.sendMessageToHost({type:"CUSTOM_PARENT_MESSAGE",message:e.message}):(0,vt.vV)("Sending messages to the host is disabled in line with the platform policy.")},this.handleMessage=e=>{try{((e,t,n)=>{const r=e[t];if(r in n)return n[r](e[r]);throw new Error(`Cannot handle ${t} "${r}".`)})(e,"type",{newSession:e=>this.handleNewSession(e),sessionStatusChanged:e=>this.handleSessionStatusChanged(e),sessionEvent:e=>this.handleSessionEvent(e),delta:t=>this.handleDeltaMsg(t,e.metadata),pageConfigChanged:e=>this.handlePageConfigChanged(e),pageInfoChanged:e=>this.handlePageInfoChanged(e),pagesChanged:e=>this.handlePagesChanged(e),pageNotFound:e=>this.handlePageNotFound(e),gitInfoChanged:e=>this.handleGitInfoChanged(e),scriptFinished:e=>this.handleScriptFinished(e),pageProfile:e=>this.handlePageProfileMsg(e),autoRerun:e=>this.handleAutoRerun(e),fileUrlsResponse:e=>this.uploadClient.onFileURLsResponse(e),parentMessage:e=>this.handleCustomParentMessage(e),logo:t=>this.handleLogo(t,e.metadata),navigation:e=>this.handleNavigation(e)})}catch(t){const e=(0,St.$)(t);(0,vt.vV)(e),this.showError("Bad message format",e.message)}},this.handleLogo=(e,t)=>{const n={activeScriptHash:t.activeScriptHash,scriptRunId:this.state.scriptRunId};this.setState({elements:this.pendingElementsBuffer.appRootWithLogo(e,n)},(()=>{this.pendingElementsBuffer=this.state.elements}))},this.handlePageConfigChanged=e=>{const{title:t,favicon:n,layout:r,initialSidebarState:o,menuItems:i}=e;this.appNavigation.handlePageConfigChanged(e),t&&(this.hostCommunicationMgr.sendMessageToHost({type:"SET_PAGE_TITLE",title:t}),document.title=t),n&&this.onPageIconChanged(n),r!==this.state.layout&&this.setState((e=>({layout:r,userSettings:{...e.userSettings,wideMode:r===yt.wF.Layout.WIDE}}))),o!==this.state.initialSidebarState&&this.setState((()=>({initialSidebarState:o}))),this.setState({menuItems:i})},this.handlePageInfoChanged=e=>{const{queryString:t}=e,n=document.location.pathname+(t?`?${t}`:"");window.history.pushState({},"",n),this.hostCommunicationMgr.sendMessageToHost({type:"SET_QUERY_PARAM",queryParams:t?`?${t}`:""})},this.onPageNotFound=e=>{const t=e?`You have requested page /${e}, but no corresponding file was found in the app's pages/ directory`:"The page that you have requested does not seem to exist";this.showError("Page not found",`${t}. Running the app's main page.`)},this.handlePageNotFound=e=>{this.maybeSetState(this.appNavigation.handlePageNotFound(e))},this.onPageIconChanged=e=>{Tt(e,this.hostCommunicationMgr.sendMessageToHost,this.endpoints)},this.handlePagesChanged=e=>{this.maybeSetState(this.appNavigation.handlePagesChanged(e))},this.handleNavigation=e=>{this.maybeSetState(this.appNavigation.handleNavigation(e))},this.handlePageProfileMsg=e=>{var t,n,r;const o=yt.FR.toObject(e),i=vn();this.metricsMgr.enqueue("pageProfile",{...o,isFragmentRun:Boolean(o.isFragmentRun),appId:this.sessionInfo.current.appId,numPages:null===(t=this.state.appPages)||void 0===t?void 0:t.length,sessionId:this.sessionInfo.current.sessionId,pythonVersion:this.sessionInfo.current.pythonVersion,pageScriptHash:this.state.currentPageScriptHash,activeTheme:null===(n=this.props.theme)||void 0===n||null===(r=n.activeTheme)||void 0===r?void 0:r.name,totalLoadTime:Math.round(1e3*(performance.now()-this.state.latestRunTime)),browserInfo:i})},this.handleAutoRerun=e=>{const t=setInterval((()=>{this.widgetMgr.sendUpdateWidgetsMessage(e.fragmentId,!0)}),1e3*e.interval);this.setState((e=>({autoReruns:[...e.autoReruns,t]})))},this.handleSessionStatusChanged=e=>{this.setState((t=>{let{scriptRunState:n}=t,{dialog:r}=t;return e.scriptIsRunning&&t.scriptRunState!==wt.STOP_REQUESTED?(n=wt.RUNNING,(0,Pe.se)(r)&&r.type===Ip.SCRIPT_COMPILE_ERROR&&(r=void 0)):e.scriptIsRunning||t.scriptRunState===wt.RERUN_REQUESTED||t.scriptRunState===wt.COMPILATION_ERROR||(n=wt.NOT_RUNNING),{userSettings:{...t.userSettings,runOnSave:Boolean(e.runOnSave)},dialog:r,scriptRunState:n}}))},this.handleSessionEvent=e=>{if(this.sessionEventDispatcher.handleSessionEventMsg(e),"scriptCompilationException"===e.type){this.setState({scriptRunState:wt.COMPILATION_ERROR});const t={type:Ip.SCRIPT_COMPILE_ERROR,exception:e.scriptCompilationException,onClose:()=>{}};this.openDialog(t)}},this.maybeUpdatePageUrl=(e,t,n)=>{const r=this.getBaseUriParts();if(r){const{basePath:o}=r,i=(0,Pe.gu)(document.location.pathname,o);if((""===i?e:i)!==t){const e=n?"":t,r=(0,Pe.U5)(),i=`${o?`/${o}`:""}/${e}${r?`?${r}`:""}`;window.history.pushState({},"",i)}}},this.handleNewSession=e=>{const t=e.initialize;if(this.hasStreamlitVersionChanged(t))return void window.location.reload();this.sessionInfo.isSet||this.handleOneTimeInitialization(e);const{appHash:n,pageLayouts:r,currentPageScriptHash:o}=this.state,{scriptRunId:i,name:a,mainScriptPath:s,fragmentIdsThisRun:l,pageScriptHash:c,mainScriptHash:u}=e;if(l.length)this.setState({fragmentIdsThisRun:l,latestRunTime:performance.now()});else{this.cleanupAutoReruns();const t=e.config,n=e.customTheme;this.processThemeInput(n),this.setState({allowRunOnSave:t.allowRunOnSave,hideTopBar:t.hideTopBar,toolbarMode:t.toolbarMode,latestRunTime:performance.now(),mainScriptHash:u,fragmentIdsThisRun:l}),this.maybeSetState(this.appNavigation.handleNewSession(e)),this.onPageIconChanged("./favicon.png")}const p=(0,Pe.YZ)(this.sessionInfo.current.installationId+s);this.metricsMgr.setMetadata(this.state.deployedAppMetadata),this.metricsMgr.setAppHash(p),this.metricsMgr.enqueue("updateReport"),n===p&&o===c?this.setState({scriptRunId:i}):this.clearAppState(p,i,a,u),this.setState((e=>{var t;const n=null!==(t=r[c])&&void 0!==t?t:yt.wF.Layout.CENTERED;return{layout:n,userSettings:{...e.userSettings,wideMode:n===yt.wF.Layout.WIDE}}}))},this.handleOneTimeInitialization=e=>{const t=e.initialize,n=e.config;this.sessionInfo.setCurrent(At.propsFromNewSessionMessage(e)),this.metricsMgr.initialize({gatherUsageStats:n.gatherUsageStats}),this.handleSessionStatusChanged(t.sessionStatus)},this.onHistoryChange=()=>{const{currentPageScriptHash:e}=this.state,t=this.appNavigation.findPageByUrlPath(document.location.pathname),n=document.location.toString().includes("#"),r=(null===t||void 0===t?void 0:t.pageScriptHash)===e;(0,Pe.hX)(t)||n&&r||this.onPageChange(t.pageScriptHash)},this.setAndSendTheme=e=>{this.props.theme.setTheme(e),this.hostCommunicationMgr.sendMessageToHost({type:"SET_THEME_CONFIG",themeInfo:(0,Oe.sR)(e.emotion)})},this.createThemeHash=e=>{if(!e)return"hash_for_undefined_custom_theme";const t=Object.entries(e);return t.sort(),(0,Pe.YZ)(t.join(":"))},this.closeDialog=()=>{this.setState({dialog:void 0})},this.saveSettings=e=>{const{runOnSave:t}=this.state.userSettings,{runOnSave:n}=e;if(this.setState({userSettings:e}),t!==n&&this.isServerConnected()){const e=new yt.$4({setRunOnSave:n});e.type="setRunOnSave",this.sendBackMsg(e)}},this.handleDeltaMsg=(e,t)=>{if(this.pendingElementsBuffer=this.pendingElementsBuffer.applyDelta(this.state.scriptRunId,e,t),!this.pendingElementsTimerRunning){this.pendingElementsTimerRunning=!0;const e=this.state.scriptRunState===wt.RUNNING;setTimeout((()=>{this.pendingElementsTimerRunning=!1,e&&this.setState({elements:this.pendingElementsBuffer})}),10)}},this.debugShutdownRuntime=()=>{if(this.isServerConnected()){const e=new yt.$4({debugShutdownRuntime:!0});e.type="debugShutdownRuntime",this.sendBackMsg(e)}},this.debugDisconnectWebsocket=()=>{if(this.isServerConnected()){const e=new yt.$4({debugDisconnectWebsocket:!0});e.type="debugDisconnectWebsocket",this.sendBackMsg(e)}},this.debugClearForwardMsgCache=()=>{var e,t;iu()&&(null===(e=this.connectionManager)||void 0===e||null===(t=e.connection)||void 0===t||t.cache.messages.clear())},this.cleanupAutoReruns=()=>{this.state.autoReruns.forEach((e=>{clearInterval(e)})),this.setState({autoReruns:[]})},this.rerunScript=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];t.closeDialog(),t.isServerConnected()?t.state.scriptRunState!==wt.RUNNING&&t.state.scriptRunState!==wt.RERUN_REQUESTED&&(t.setState({scriptRunState:wt.RERUN_REQUESTED}),!0===e&&t.saveSettings({...t.state.userSettings,runOnSave:!0}),t.widgetMgr.sendUpdateWidgetsMessage(void 0)):(0,vt.vV)("Cannot rerun script when disconnected from server.")},this.sendLoadGitInfoBackMsg=()=>{this.isServerConnected()?this.sendBackMsg(new yt.$4({loadGitInfo:!0})):(0,vt.vV)("Cannot load git information when disconnected from server.")},this.onPageChange=e=>{const{elements:t,mainScriptHash:n}=this.state;this.cleanupAutoReruns();const r=this.appNavigation.clearPageElements(t,n,void 0),o=new Set(Array.from(r.getElements()).map((e=>(0,Pe.Id)(e))).filter(Pe.q3));this.setState((e=>{const t=e.pageLayouts;return t[e.currentPageScriptHash]=e.layout,{pageLayouts:t}})),this.sendRerunBackMsg(this.widgetMgr.getActiveWidgetStates(o),void 0,e)},this.isAppInReadyState=e=>this.state.connectionState===xc.CONNECTED&&this.state.scriptRunState===wt.NOT_RUNNING&&e.scriptRunState===wt.RUNNING&&e.connectionState===xc.CONNECTED,this.sendRerunBackMsg=(e,t,n,r)=>{const o=this.getBaseUriParts();if(!o)return void(0,vt.vV)("Cannot send rerun backMessage when disconnected from server.");const{currentPageScriptHash:i}=this.state,{basePath:a}=o;let s=this.getQueryString(),l="";n?n!=i&&(s=(0,Pe.U5)(),this.hostCommunicationMgr.sendMessageToHost({type:"SET_QUERY_PARAM",queryParams:s})):i?n=i:(l=(0,Pe.gu)(document.location.pathname,a),n=""),this.sendBackMsg(new yt.$4({rerunScript:{queryString:s,widgetStates:e,pageScriptHash:n,pageName:l,fragmentId:t,isAutoRerun:r}})),Pt.record({name:"RequestedRerun",scriptRunState:this.state.scriptRunState})},this.stopScript=()=>{if(!this.isServerConnected())return void(0,vt.vV)("Cannot stop app when disconnected from server.");if(this.state.scriptRunState===wt.NOT_RUNNING||this.state.scriptRunState===wt.STOP_REQUESTED)return;const e=new yt.$4({stopScript:!0});e.type="stopScript",this.sendBackMsg(e),this.setState({scriptRunState:wt.STOP_REQUESTED})},this.openClearCacheDialog=()=>{if(this.isServerConnected()){const e={type:Ip.CLEAR_CACHE,confirmCallback:this.clearCache,defaultAction:this.clearCache,onClose:()=>{}};this.openDialog(e)}else(0,vt.vV)("Cannot clear cache: disconnected from server")},this.openDeployDialog=()=>{var e;const t={type:Ip.DEPLOY_DIALOG,onClose:this.closeDialog,showDeployError:this.showDeployError,isDeployErrorModalOpen:(null===(e=this.state.dialog)||void 0===e?void 0:e.type)===Ip.DEPLOY_ERROR,metricsMgr:this.metricsMgr};this.openDialog(t)},this.openThemeCreatorDialog=()=>{const e={type:Ip.THEME_CREATOR,backToSettings:this.settingsCallback,onClose:this.closeDialog};this.openDialog(e)},this.clearCache=()=>{if(this.closeDialog(),this.isServerConnected()){const e=new yt.$4({clearCache:!0});e.type="clearCache",this.sendBackMsg(e)}else(0,vt.vV)("Cannot clear cache: disconnected from server")},this.sendAppHeartbeat=()=>{if(this.isServerConnected()){const e=new yt.$4({appHeartbeat:!0});e.type="appHeartbeat",this.sendBackMsg(e)}else(0,vt.vV)("Cannot send app heartbeat: disconnected from server")},this.sendBackMsg=e=>{this.connectionManager?((0,vt.OG)(e),this.connectionManager.sendMessage(e)):(0,vt.vV)(`Not connected. Cannot send back message: ${e}`)},this.handleConnectionError=e=>{this.showError("Connection error",e)},this.isServerConnected=()=>!!this.connectionManager&&this.connectionManager.isConnected(),this.settingsCallback=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const n={type:Ip.SETTINGS,isServerConnected:t.isServerConnected(),settings:t.state.userSettings,allowRunOnSave:t.state.allowRunOnSave,onSave:t.saveSettings,onClose:()=>{},developerMode:xd(t.state.isOwner,t.state.toolbarMode),openThemeCreator:t.openThemeCreatorDialog,animateModal:e,metricsMgr:t.metricsMgr};t.openDialog(n)},this.aboutCallback=()=>{const{menuItems:e}=this.state,t={type:Ip.ABOUT,sessionInfo:this.sessionInfo,onClose:this.closeDialog,aboutSectionMd:null===e||void 0===e?void 0:e.aboutSectionMd};this.openDialog(t)},this.printCallback=()=>{const{scriptRunState:e}=this.state;if(e!==wt.NOT_RUNNING)return void setTimeout(this.printCallback,500);let t;try{const e=(0,Pe.ky)(this.embeddingId);t=e&&e.contentWindow?e.contentWindow.window:window}catch(n){t=window}finally{t||(t=window),t.print()}},this.screencastCallback=()=>{const{scriptName:e}=this.state,{startRecording:t}=this.props.screenCast;t(`streamlit-${e}-${Fe()().format("YYYY-MM-DD-HH-MM-SS")}`)},this.handleFullScreen=e=>{this.setState({isFullScreen:e})},this.setLibConfig=e=>{this.setState({libConfig:e})},this.setAppConfig=e=>{this.setState({appConfig:e})},this.addScriptFinishedHandler=e=>{this.setState(((t,n)=>({scriptFinishedHandlers:t.scriptFinishedHandlers.concat(e)})))},this.removeScriptFinishedHandler=e=>{this.setState(((t,n)=>({scriptFinishedHandlers:zt()(t.scriptFinishedHandlers,e)})))},this.getBaseUriParts=()=>this.connectionManager?this.connectionManager.getBaseUriParts():void 0,this.getQueryString=()=>{const{queryParams:e}=this.state,t=e&&e.length>0?e:document.location.search;return t.startsWith("?")?t.substring(1):t},this.isInCloudEnvironment=()=>{const{hostMenuItems:e}=this.state;return e&&(null===e||void 0===e?void 0:e.length)>0},this.showDeployButton=()=>xd(this.state.isOwner,this.state.toolbarMode)&&!this.isInCloudEnvironment()&&this.sessionInfo.isSet&&!this.sessionInfo.isHello,this.deployButtonClicked=()=>{this.metricsMgr.enqueue("menuClick",{label:"deployButtonInApp"}),this.sendLoadGitInfoBackMsg(),this.openDeployDialog()},this.requestFileURLs=(e,t)=>{if(this.isServerConnected()){const n=new yt.$4({fileUrlsRequest:{requestId:e,fileNames:t.map((e=>e.name)),sessionId:this.sessionInfo.current.sessionId}});n.type="fileUrlsRequest",this.sendBackMsg(n)}},this.handleKeyDown=e=>{switch(e){case"c":xd(this.state.isOwner,this.state.toolbarMode)&&this.openClearCacheDialog();break;case"r":this.rerunScript()}},this.handleKeyUp=e=>{"esc"===e&&this.props.screenCast.stopRecording()},(0,mt.Xu)();let n=this.createThemeHash();(0,Oe.tl)(e.theme.activeTheme)||(n=this.createThemeHash((0,Oe.hf)(e.theme.activeTheme.emotion))),this.state={connectionState:xc.INITIAL,elements:Ut.empty("",!0),isFullScreen:!1,scriptName:"",scriptRunId:_d,appHash:null,scriptRunState:wt.NOT_RUNNING,userSettings:{wideMode:!1,runOnSave:!1},layout:yt.wF.Layout.CENTERED,pageLayouts:{},initialSidebarState:yt.wF.SidebarState.AUTO,menuItems:void 0,allowRunOnSave:!0,scriptFinishedHandlers:[],themeHash:n,gitInfo:null,formsData:Xt(),appPages:[],navSections:[],currentPageScriptHash:"",mainScriptHash:"",hideTopBar:!0,hideSidebarNav:!0,expandSidebarNav:!1,toolbarMode:yt.TS.ToolbarMode.MINIMAL,latestRunTime:performance.now(),fragmentIdsThisRun:[],isOwner:!1,hostMenuItems:[],hostToolbarItems:[],hostHideSidebarNav:!1,sidebarChevronDownshift:0,pageLinkBaseUrl:"",queryParams:"",deployedAppMetadata:{},libConfig:{},appConfig:{},autoReruns:[],inputsDisabled:!1},this.connectionManager=null,this.widgetMgr=new Kt({sendRerunBackMsg:this.sendRerunBackMsg,formsDataChanged:e=>this.setState({formsData:e})}),this.hostCommunicationMgr=new ln({sendRerunBackMsg:this.sendRerunBackMsg,closeModal:this.closeDialog,stopScript:this.stopScript,rerunScript:this.rerunScript,clearCache:this.clearCache,sendAppHeartbeat:this.sendAppHeartbeat,setInputsDisabled:e=>{this.setState({inputsDisabled:e})},themeChanged:this.handleThemeMessage,pageChanged:this.onPageChange,isOwnerChanged:e=>this.setState({isOwner:e}),jwtHeaderChanged:e=>{let{jwtHeaderName:t,jwtHeaderValue:n}=e;void 0!==this.endpoints.setJWTHeader&&this.state.appConfig.useExternalAuthToken&&this.endpoints.setJWTHeader({jwtHeaderName:t,jwtHeaderValue:n})},hostMenuItemsChanged:e=>{this.setState({hostMenuItems:e})},hostToolbarItemsChanged:e=>{this.setState({hostToolbarItems:e})},hostHideSidebarNavChanged:e=>{this.setState({hostHideSidebarNav:e})},sidebarChevronDownshiftChanged:e=>{this.setState({sidebarChevronDownshift:e})},pageLinkBaseUrlChanged:e=>{this.setState({pageLinkBaseUrl:e})},queryParamsChanged:e=>{this.setState({queryParams:e})},deployedAppMetadataChanged:e=>{this.setState({deployedAppMetadata:e})},restartWebsocketConnection:()=>{this.connectionManager||this.initializeConnectionManager()},terminateWebsocketConnection:()=>{var e;null===(e=this.connectionManager)||void 0===e||e.disconnect(),this.connectionManager=null}}),this.endpoints=new Jp({getServerUri:this.getBaseUriParts,csrfEnabled:!0}),this.uploadClient=new On({sessionInfo:this.sessionInfo,endpoints:this.endpoints,formsWithPendingRequestsChanged:e=>this.widgetMgr.setFormsWithUploadsInProgress(e),requestFileURLs:this.requestFileURLs}),this.componentRegistry=new gn(this.endpoints),this.pendingElementsTimerRunning=!1,this.pendingElementsBuffer=this.state.elements,this.appNavigation=new Ed(this.hostCommunicationMgr,this.maybeUpdatePageUrl,this.onPageNotFound,this.onPageIconChanged),window.streamlitDebug={clearForwardMsgCache:this.debugClearForwardMsgCache,disconnectWebsocket:this.debugDisconnectWebsocket,shutdownRuntime:this.debugShutdownRuntime}}initializeConnectionManager(){this.connectionManager=new Kp({sessionInfo:this.sessionInfo,endpoints:this.endpoints,onMessage:this.handleMessage,onConnectionError:this.handleConnectionError,connectionStateChanged:this.handleConnectionStateChanged,claimHostAuthToken:this.hostCommunicationMgr.claimAuthToken,resetHostAuthToken:this.hostCommunicationMgr.resetAuthToken,onHostConfigResp:e=>{const{allowedOrigins:t,useExternalAuthToken:n,disableFullscreenMode:r,enableCustomParentMessages:o,mapboxToken:i,enforceDownloadInNewTab:a}=e,s={allowedOrigins:t,useExternalAuthToken:n,enableCustomParentMessages:o},l={mapboxToken:i,disableFullscreenMode:r,enforceDownloadInNewTab:a};this.hostCommunicationMgr.setAllowedOrigins(s),this.setAppConfig(s),this.setLibConfig(l)}})}componentDidMount(){this.initializeConnectionManager(),this.hostCommunicationMgr.sendMessageToHost({type:"SCRIPT_RUN_STATE_CHANGED",scriptRunState:this.state.scriptRunState}),(0,Pe.Az)()&&document.body.classList.add("embedded"),(0,Pe.hU)()&&(window.iFrameResizer={heightCalculationMethod:()=>{const e=document.querySelectorAll("[data-iframe-height]"),t=Array.from(e).map((e=>Math.ceil(e.getBoundingClientRect().bottom)));return Math.max(0,...t)}},__webpack_require__.e(6679).then(__webpack_require__.t.bind(__webpack_require__,56679,23))),this.hostCommunicationMgr.sendMessageToHost({type:"SET_THEME_CONFIG",themeInfo:(0,Oe.sR)(this.props.theme.activeTheme.emotion)}),this.metricsMgr.enqueue("viewReport"),window.addEventListener("popstate",this.onHistoryChange,!1)}componentDidUpdate(e,t){!1===window.prerenderReady&&this.isAppInReadyState(t)&&(window.prerenderReady=!0),this.state.scriptRunState!==t.scriptRunState&&this.hostCommunicationMgr.sendMessageToHost({type:"SCRIPT_RUN_STATE_CHANGED",scriptRunState:this.state.scriptRunState})}componentWillUnmount(){var e;null===(e=this.connectionManager)||void 0===e||e.disconnect(),this.hostCommunicationMgr.closeHostCommunication(),window.removeEventListener("popstate",this.onHistoryChange,!1)}showError(e,t){(0,vt.vV)(t);const n={type:Ip.WARNING,title:e,msg:t,onClose:()=>{}};this.openDialog(n)}hasStreamlitVersionChanged(e){if(this.sessionInfo.isSet){const t=this.sessionInfo.current.streamlitVersion,{environmentInfo:n}=e;if((0,Pe.se)(n)&&(0,Pe.se)(n.streamlitVersion))return t!=n.streamlitVersion}return!1}maybeSetState(e){if(e){const[t,n]=e;this.setState(t,n)}}processThemeInput(e){const t=this.createThemeHash(e);if(t===this.state.themeHash)return;this.setState({themeHash:t});const n=!(0,Oe.tl)(this.props.theme.activeTheme);if(e){const t=(0,Oe.an)(Oe.kQ,e);this.props.theme.addThemes([t]);(null===(0,Oe.YY)()||n)&&this.setAndSendTheme(t)}else this.props.theme.addThemes([]),n&&this.setAndSendTheme((0,Oe.Y_)())}handleScriptFinished(e){if(e===yt.zo.ScriptFinishedStatus.FINISHED_SUCCESSFULLY||e===yt.zo.ScriptFinishedStatus.FINISHED_EARLY_FOR_RERUN||e===yt.zo.ScriptFinishedStatus.FINISHED_FRAGMENT_RUN_SUCCESSFULLY){if(window.setTimeout((()=>{this.state.scriptFinishedHandlers.map((e=>e()))}),0),e===yt.zo.ScriptFinishedStatus.FINISHED_SUCCESSFULLY||e===yt.zo.ScriptFinishedStatus.FINISHED_FRAGMENT_RUN_SUCCESSFULLY){this.setState((e=>{let{scriptRunId:t,fragmentIdsThisRun:n}=e;return{elements:this.pendingElementsBuffer.clearStaleNodes(t,n)}}),(()=>{this.pendingElementsBuffer=this.state.elements}));const e=new Set(Array.from(this.state.elements.getElements()).map((e=>(0,Pe.Id)(e))).filter(Pe.q3));this.widgetMgr.removeInactive(e)}null!==this.connectionManager&&e!==yt.zo.ScriptFinishedStatus.FINISHED_EARLY_FOR_RERUN&&this.sessionInfo.isSet&&this.connectionManager.incrementMessageCacheRunCount(this.sessionInfo.current.maxCachedMessageAge)}}clearAppState(e,t,n,r){const{hideSidebarNav:o,elements:i}=this.state,a=o&&i.sidebar||void 0;this.setState({scriptRunId:t,scriptName:n,appHash:e,elements:this.appNavigation.clearPageElements(this.pendingElementsBuffer,r,a)},(()=>{this.pendingElementsBuffer=this.state.elements;const e=new Set(Array.from(this.state.elements.getElements()).map((e=>(0,Pe.Id)(e))).filter(Pe.q3));this.widgetMgr.removeInactive(e)}))}openDialog(e){this.setState({dialog:e})}render(){const{allowRunOnSave:e,connectionState:t,dialog:n,elements:r,initialSidebarState:o,menuItems:i,isFullScreen:a,scriptRunId:s,scriptRunState:l,userSettings:c,hideTopBar:u,hideSidebarNav:p,expandSidebarNav:d,currentPageScriptHash:b,hostHideSidebarNav:f,pageLinkBaseUrl:h,sidebarChevronDownshift:m,hostMenuItems:M,hostToolbarItems:O,libConfig:g,appConfig:z,inputsDisabled:y,appPages:A,navSections:v}=this.state,w=xd(this.state.isOwner,this.state.toolbarMode),S=Ot()("stApp",(0,Pe.M$)(this.embeddingId),{"streamlit-embedded":(0,Pe.yR)(),"streamlit-wide":c.wideMode}),q=n?Pp({...n,onClose:this.closeDialog}):null,E=y||t!==xc.CONNECTED;return(0,xe.jsx)(wn.Provider,{value:{initialSidebarState:o,wideMode:c.wideMode,embedded:(0,Pe.yR)(),showPadding:!(0,Pe.yR)()||(0,Pe.Rg)(),disableScrolling:(0,Pe.Az)(),showToolbar:!(0,Pe.yR)()||(0,Pe.v4)(),showColoredLine:!(0,Pe.yR)()||(0,Pe._d)(),pageLinkBaseUrl:h,sidebarChevronDownshift:m,gitInfo:this.state.gitInfo,appConfig:z},children:(0,xe.jsx)(zn.n.Provider,{value:{isFullScreen:a,setFullScreen:this.handleFullScreen,addScriptFinishedHandler:this.addScriptFinishedHandler,removeScriptFinishedHandler:this.removeScriptFinishedHandler,activeTheme:this.props.theme.activeTheme,setTheme:this.setAndSendTheme,availableThemes:this.props.theme.availableThemes,addThemes:this.props.theme.addThemes,onPageChange:this.onPageChange,currentPageScriptHash:b,libConfig:g,fragmentIdsThisRun:this.state.fragmentIdsThisRun},children:(0,xe.jsx)(ht,{keyName:"r,c,esc",onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,children:(0,xe.jsxs)(td,{className:S,"data-testid":"stApp","data-test-script-state":s==_d?"initial":l,"data-test-connection-state":t,children:[(0,xe.jsxs)(zu,{children:[!u&&(0,xe.jsxs)(xe.Fragment,{children:[(0,xe.jsx)(jc,{connectionState:t,sessionEventDispatcher:this.sessionEventDispatcher,scriptRunState:l,rerunScript:this.rerunScript,stopScript:this.stopScript,allowRunOnSave:e}),(0,xe.jsx)(fu,{hostToolbarItems:O,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,metricsMgr:this.metricsMgr})]}),this.showDeployButton()&&(0,xe.jsx)(mu,{onClick:this.deployButtonClicked.bind(this)}),(0,xe.jsx)(cu,{isServerConnected:this.isServerConnected(),quickRerunCallback:this.rerunScript,clearCacheCallback:this.openClearCacheDialog,settingsCallback:this.settingsCallback,aboutCallback:this.aboutCallback,printCallback:this.printCallback,screencastCallback:this.screencastCallback,screenCastState:this.props.screenCast.currentState,hostMenuItems:M,developmentMode:w,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,menuItems:i,metricsMgr:this.metricsMgr,toolbarMode:this.state.toolbarMode})]}),(0,xe.jsx)(sc,{endpoints:this.endpoints,sessionInfo:this.sessionInfo,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,elements:r,scriptRunId:s,scriptRunState:l,widgetMgr:this.widgetMgr,widgetsDisabled:E,uploadClient:this.uploadClient,componentRegistry:this.componentRegistry,formsData:this.state.formsData,appLogo:r.logo,appPages:A,navSections:v,onPageChange:this.onPageChange,currentPageScriptHash:b,hideSidebarNav:p||f,expandSidebarNav:d}),q]})})})})}}const Rd=vd(Td);const kd=()=>{const[e,t]=function(){const e=(0,Oe.x0)(),[t,r]=(0,n.useState)(e),[o,i]=(0,n.useState)([]),[a,s]=(0,n.useState)([...(0,Oe.Ef)(),...(0,Oe.tl)(e)?[]:[e]]),l=(0,n.useCallback)((e=>{e!==t&&(r(e),e.name===Oe.QM?(0,Oe.E9)():(0,Oe.Iu)(e))}),[r,t]),c=(0,n.useCallback)((()=>{t.name===Oe.QM&&l((0,Oe.Y_)());const e=a.filter((e=>e.name!==Oe.QM));s([(0,Oe.DK)(),...e])}),[t.name,a,l]),u=(0,n.useCallback)((e=>{e.fontFaces&&i(e.fontFaces);const t=new yt.tc(e),n=(0,Oe.an)(Oe.kQ,t);l(n)}),[i,l]);return(0,n.useEffect)((()=>{const e=window.matchMedia("(prefers-color-scheme: dark)");return e.addEventListener("change",c),window.addEventListener("afterprint",c),()=>{window.removeEventListener("afterprint",c),e.removeEventListener("change",c)}}),[t,a,c]),[{setTheme:l,activeTheme:t,addThemes:e=>{s([...(0,Oe.Ef)(),...e])},availableThemes:a,setImportedTheme:u},o]}(),{activeTheme:r}=e,o=r.name===Oe.kQ&&t.length>0;return(0,xe.jsx)(ke,{theme:r,children:(0,xe.jsx)(Be,{children:(0,xe.jsxs)(Ie,{children:[o&&(0,xe.jsx)(Ce,{fontFaces:t}),(0,xe.jsx)(Rd,{theme:e})]})})})},Cd=new me({prefix:"st-"});r.render((0,xe.jsx)(Me.Kq,{value:Cd,children:(0,xe.jsx)(kd,{})}),document.getElementById("root"))})()})();
|
28
|
+
}`,zd=(0,Ne.A)("div",{target:"e7qru6u0"})((e=>{let{theme:t}=e;return{position:"fixed",display:"flex",justifyContent:"center",alignItems:"center",top:0,left:0,width:t.sizes.full,height:t.sizes.full,fontSize:"40vh",color:t.colors.red,fontWeight:t.fontWeights.bold,opacity:"0.8",textShadow:`1px 1px 10px ${t.colors.darkGray}`,transition:"opacity 0.3s ease-in-out",animation:`${gd} 1s`}}),"");class yd extends n.PureComponent{constructor(){super(...arguments),this.state={countdown:this.props.countdown},this.onAnimationEnd=async()=>{const{countdown:e}=this.state,{endCallback:t}=this.props,n=e-1;n>=0&&this.setState({countdown:n}),0===n&&t()}}render(){const{countdown:e}=this.state;return(0,xe.jsx)(zd,{"data-testid":"stCountdown",onAnimationEnd:this.onAnimationEnd,children:(0,xe.jsx)("span",{children:e})},`frame${e}`)}}yd.defaultProps={endCallback:()=>{}};const Ad=yd;const vd=function(e){class t extends n.PureComponent{constructor(){super(...arguments),this.recorder=void 0,this.state={fileName:"streamlit-screencast",recordAudio:!1,currentState:this.props.testOverride||"OFF"},this.toggleRecordAudio=()=>{const{recordAudio:e}=this.state;this.setState({recordAudio:!e})},this.showDialog=e=>{const{currentState:t}=this.state;Xc.isSupportedBrowser()?"OFF"===t?this.setState({fileName:e,currentState:"SETUP"}):this.stopRecording().catch((e=>(0,vt.FF)(`withScreencast.stopRecording threw an error: ${e}`))):this.setState({currentState:"UNSUPPORTED"})},this.startRecording=async()=>{const{recordAudio:e}=this.state;this.recorder=new Xc({recordAudio:e,onErrorOrStop:()=>this.stopRecording()});try{await this.recorder.initialize()}catch(t){return(0,vt.FF)(`ScreenCastRecorder.initialize error: ${t}`),void this.setState({currentState:"UNSUPPORTED"})}this.setState({currentState:"COUNTDOWN"})},this.stopRecording=async()=>{let e;const{currentState:t}=this.state;"OFF"===t||(0,Pe.hX)(this.recorder)||("COUNTDOWN"===t&&this.setState({currentState:"OFF"}),"RECORDING"===t&&("inactive"===this.recorder.getState()?this.setState({currentState:"OFF"}):(e=await this.recorder.stop(),this.setState({outputBlob:e,currentState:"PREVIEW_FILE"}))))},this.onCountdownEnd=async()=>{if((0,Pe.hX)(this.recorder))throw new Error("Countdown finished but recorder is null");this.recorder.start()?this.setState({currentState:"RECORDING"}):this.stopRecording().catch((e=>(0,vt.FF)(`withScreencast.stopRecording threw an error: ${e}`)))},this.getScreenCastProps=()=>({currentState:this.state.currentState,toggleRecordAudio:this.toggleRecordAudio,startRecording:this.showDialog,stopRecording:this.stopRecording}),this.closeDialog=()=>{this.setState({currentState:"OFF"})},this.render=()=>{const{outputBlob:t,fileName:n,recordAudio:r,currentState:o}=this.state;return(0,xe.jsxs)("div",{className:"withScreencast","data-testid":"stScreencast",children:[(0,xe.jsx)(e,{...this.props,screenCast:this.getScreenCastProps()}),"UNSUPPORTED"===o&&(0,xe.jsx)(Od,{onClose:this.closeDialog}),"SETUP"===o&&(0,xe.jsx)(id,{recordAudio:r,onClose:this.closeDialog,startRecording:this.startRecording,toggleRecordAudio:this.toggleRecordAudio}),"COUNTDOWN"===o&&(0,xe.jsx)(Ad,{countdown:3,endCallback:this.onCountdownEnd}),"PREVIEW_FILE"===o&&t&&(0,xe.jsx)(bd,{onClose:this.closeDialog,videoBlob:t,fileName:n})]})}}}return t.displayName=`withScreencast(${e.displayName||e.name})`,ui()(t,e)};function wd(e){return e||"Streamlit"}class Sd{constructor(e){this.appPages=void 0,this.currentPageScriptHash=void 0,this.hideSidebarNav=void 0,this.appNav=void 0,this.appNav=e,this.appPages=[],this.currentPageScriptHash=null,this.hideSidebarNav=null}handleNewSession(e){var t,n,r,o,i;this.appPages=e.appPages,this.currentPageScriptHash=e.pageScriptHash,this.hideSidebarNav=null!==(t=null===(n=e.config)||void 0===n?void 0:n.hideSidebarNav)&&void 0!==t&&t;const a=this.appPages[0],s=null!==(r=a.urlPathname)&&void 0!==r?r:"",l=null!==(o=null===(i=this.appPages.find((e=>e.pageScriptHash===this.currentPageScriptHash)))||void 0===i?void 0:i.urlPathname)&&void 0!==o?o:"",c=a.pageScriptHash===this.currentPageScriptHash;return this.appNav.onUpdatePageUrl(s,l,c),document.title=wd(null!==l&&void 0!==l?l:""),[{hideSidebarNav:this.hideSidebarNav,appPages:this.appPages,currentPageScriptHash:this.currentPageScriptHash},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_APP_PAGES",appPages:this.appPages}),this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:c?"":l,currentPageScriptHash:this.currentPageScriptHash})}]}handlePagesChanged(e){const{appPages:t}=e;return[{appPages:t},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_APP_PAGES",appPages:t})}]}handlePageNotFound(e){var t,n;const{pageName:r}=e;this.appNav.onPageNotFound(r);const o=null!==(t=null===(n=this.appPages[0])||void 0===n?void 0:n.pageScriptHash)&&void 0!==t?t:"";return this.currentPageScriptHash=o,[{currentPageScriptHash:o},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:"",currentPageScriptHash:o})}]}handleNavigation(e){}findPageByUrlPath(e){var t;return 0===this.appPages.length?null:null!==(t=this.appPages.find((t=>e.endsWith("/"+t.urlPathname))))&&void 0!==t?t:this.appPages[0]}clearPageElements(e,t,n){return Ut.empty(t,!1,n,e.logo)}}class qd{constructor(e){this.appNav=void 0,this.mainScriptHash=void 0,this.appPages=void 0,this.mainPage=void 0,this.hideSidebarNav=void 0,this.appNav=e,this.mainScriptHash=null,this.appPages=[],this.mainPage=null,this.hideSidebarNav=null}handleNewSession(e){var t,n,r;(this.mainScriptHash=e.mainScriptHash,null===this.hideSidebarNav)&&(this.hideSidebarNav=null!==(n=null===(r=e.config)||void 0===r?void 0:r.hideSidebarNav)&&void 0!==n?n:null);return document.title=wd(""),[{hideSidebarNav:null!==(t=this.hideSidebarNav)&&void 0!==t&&t},()=>{}]}handlePagesChanged(e){}handlePageNotFound(e){var t;const{pageName:n}=e;return this.appNav.onPageNotFound(n),[{currentPageScriptHash:null!==(t=this.mainScriptHash)&&void 0!==t?t:""},()=>{var e;this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:"",currentPageScriptHash:null!==(e=this.mainScriptHash)&&void 0!==e?e:""})}]}handleNavigation(e){var t,n;const{sections:r,position:o,appPages:i}=e;this.appPages=i,this.hideSidebarNav=o===yt.Vx.Position.HIDDEN;const a=e.pageScriptHash,s=i.find((e=>e.pageScriptHash===a)),l=i.find((e=>e.isDefault));this.mainPage=l;const c=s.urlPathname;if(!this.appNav.isPageTitleSet){var u;const e=wd(s.pageName);document.title=e,this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_PAGE_TITLE",title:null!==(u=s.pageName)&&void 0!==u?u:""})}return!this.appNav.isPageIconSet&&s.icon&&this.appNav.onPageIconChange(s.icon),this.appNav.onUpdatePageUrl(null!==(t=l.urlPathname)&&void 0!==t?t:"",c,null!==(n=s.isDefault)&&void 0!==n&&n),[{appPages:i,navSections:r,hideSidebarNav:this.hideSidebarNav,expandSidebarNav:e.expanded,currentPageScriptHash:a},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_APP_PAGES",appPages:i}),this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:s.isDefault?"":c,currentPageScriptHash:a})}]}findPageByUrlPath(e){var t;return null!==(t=this.appPages.find((t=>e.endsWith("/"+t.urlPathname))))&&void 0!==t?t:this.mainPage}clearPageElements(e,t,n){return e.filterMainScriptElements(t)}}class Ed{constructor(e,t,n,r){this.hostCommunicationMgr=void 0,this.onUpdatePageUrl=void 0,this.onPageNotFound=void 0,this.onPageIconChange=void 0,this.isPageTitleSet=void 0,this.isPageIconSet=void 0,this.strategy=void 0,this.hostCommunicationMgr=e,this.onUpdatePageUrl=t,this.onPageNotFound=n,this.onPageIconChange=r,this.isPageIconSet=!1,this.isPageTitleSet=!1,this.strategy=new Sd(this)}handleNewSession(e){return this.isPageTitleSet=!1,this.isPageIconSet=!1,this.strategy.handleNewSession(e)}handleNavigation(e){return this.strategy instanceof Sd&&(this.strategy=new qd(this)),this.strategy.handleNavigation(e)}handlePagesChanged(e){return this.strategy.handlePagesChanged(e)}handlePageNotFound(e){return this.strategy.handlePageNotFound(e)}findPageByUrlPath(e){return this.strategy.findPageByUrlPath(e)}handlePageConfigChanged(e){this.isPageIconSet=Boolean(e.favicon),this.isPageTitleSet=Boolean(e.title)}clearPageElements(e,t,n){return this.strategy.clearPageElements(e,t,n)}}const _d="<null>",xd=(e,t)=>t==yt.TS.ToolbarMode.DEVELOPER||yt.TS.ToolbarMode.VIEWER!=t&&yt.TS.ToolbarMode.MINIMAL!=t&&(e||iu());class Td extends n.PureComponent{constructor(e){var t;super(e),t=this,this.endpoints=void 0,this.sessionInfo=new At,this.metricsMgr=new ed(this.sessionInfo),this.sessionEventDispatcher=new Yp,this.connectionManager=void 0,this.widgetMgr=void 0,this.hostCommunicationMgr=void 0,this.uploadClient=void 0,this.pendingElementsBuffer=void 0,this.pendingElementsTimerRunning=void 0,this.componentRegistry=void 0,this.embeddingId=(0,Pe.cv)(),this.appNavigation=void 0,this.showDeployError=(e,t,n)=>{this.openDialog({type:Ip.DEPLOY_ERROR,title:e,msg:t,onContinue:n,onClose:()=>{},onTryAgain:this.sendLoadGitInfoBackMsg})},this.handleThemeMessage=(e,t)=>{const[,n,r]=(0,Oe.Ef)(),o=(0,Oe.tl)(this.props.theme.activeTheme);e===n.name&&o?this.props.theme.setTheme(n):e===r.name&&o?this.props.theme.setTheme(r):t&&this.props.theme.setImportedTheme(t)},this.handleConnectionStateChanged=e=>{if((0,vt.OG)(`Connection state changed from ${this.state.connectionState} to ${e}`),e===xc.CONNECTED){(0,vt.OG)("Reconnected to server.");const e=this.state.scriptRunState===wt.RERUN_REQUESTED||this.state.scriptRunState===wt.RUNNING;this.sessionInfo.last&&!e||((0,vt.OG)("Requesting a script run."),this.widgetMgr.sendUpdateWidgetsMessage(void 0),this.setState({dialog:null})),this.hostCommunicationMgr.sendMessageToHost({type:"WEBSOCKET_CONNECTED"})}else this.state.connectionState===xc.CONNECTED&&this.hostCommunicationMgr.sendMessageToHost({type:"WEBSOCKET_DISCONNECTED",attemptingToReconnect:e!==xc.DISCONNECTED_FOREVER}),this.sessionInfo.isSet&&this.sessionInfo.clearCurrent();this.setState({connectionState:e})},this.handleGitInfoChanged=e=>{this.setState({gitInfo:e})},this.handleCustomParentMessage=e=>{this.state.appConfig.enableCustomParentMessages?this.hostCommunicationMgr.sendMessageToHost({type:"CUSTOM_PARENT_MESSAGE",message:e.message}):(0,vt.vV)("Sending messages to the host is disabled in line with the platform policy.")},this.handleMessage=e=>{try{((e,t,n)=>{const r=e[t];if(r in n)return n[r](e[r]);throw new Error(`Cannot handle ${t} "${r}".`)})(e,"type",{newSession:e=>this.handleNewSession(e),sessionStatusChanged:e=>this.handleSessionStatusChanged(e),sessionEvent:e=>this.handleSessionEvent(e),delta:t=>this.handleDeltaMsg(t,e.metadata),pageConfigChanged:e=>this.handlePageConfigChanged(e),pageInfoChanged:e=>this.handlePageInfoChanged(e),pagesChanged:e=>this.handlePagesChanged(e),pageNotFound:e=>this.handlePageNotFound(e),gitInfoChanged:e=>this.handleGitInfoChanged(e),scriptFinished:e=>this.handleScriptFinished(e),pageProfile:e=>this.handlePageProfileMsg(e),autoRerun:e=>this.handleAutoRerun(e),fileUrlsResponse:e=>this.uploadClient.onFileURLsResponse(e),parentMessage:e=>this.handleCustomParentMessage(e),logo:t=>this.handleLogo(t,e.metadata),navigation:e=>this.handleNavigation(e)})}catch(t){const e=(0,St.$)(t);(0,vt.vV)(e),this.showError("Bad message format",e.message)}},this.handleLogo=(e,t)=>{const n={activeScriptHash:t.activeScriptHash,scriptRunId:this.state.scriptRunId};this.setState({elements:this.pendingElementsBuffer.appRootWithLogo(e,n)},(()=>{this.pendingElementsBuffer=this.state.elements}))},this.handlePageConfigChanged=e=>{const{title:t,favicon:n,layout:r,initialSidebarState:o,menuItems:i}=e;this.appNavigation.handlePageConfigChanged(e),t&&(this.hostCommunicationMgr.sendMessageToHost({type:"SET_PAGE_TITLE",title:t}),document.title=t),n&&this.onPageIconChanged(n),r!==this.state.layout&&this.setState((e=>({layout:r,userSettings:{...e.userSettings,wideMode:r===yt.wF.Layout.WIDE}}))),o!==this.state.initialSidebarState&&this.setState((()=>({initialSidebarState:o}))),this.setState({menuItems:i})},this.handlePageInfoChanged=e=>{const{queryString:t}=e,n=document.location.pathname+(t?`?${t}`:"");window.history.pushState({},"",n),this.hostCommunicationMgr.sendMessageToHost({type:"SET_QUERY_PARAM",queryParams:t?`?${t}`:""})},this.onPageNotFound=e=>{const t=e?`You have requested page /${e}, but no corresponding file was found in the app's pages/ directory`:"The page that you have requested does not seem to exist";this.showError("Page not found",`${t}. Running the app's main page.`)},this.handlePageNotFound=e=>{this.maybeSetState(this.appNavigation.handlePageNotFound(e))},this.onPageIconChanged=e=>{Tt(e,this.hostCommunicationMgr.sendMessageToHost,this.endpoints)},this.handlePagesChanged=e=>{this.maybeSetState(this.appNavigation.handlePagesChanged(e))},this.handleNavigation=e=>{this.maybeSetState(this.appNavigation.handleNavigation(e))},this.handlePageProfileMsg=e=>{var t,n,r;const o=yt.FR.toObject(e),i=vn();this.metricsMgr.enqueue("pageProfile",{...o,isFragmentRun:Boolean(o.isFragmentRun),appId:this.sessionInfo.current.appId,numPages:null===(t=this.state.appPages)||void 0===t?void 0:t.length,sessionId:this.sessionInfo.current.sessionId,pythonVersion:this.sessionInfo.current.pythonVersion,pageScriptHash:this.state.currentPageScriptHash,activeTheme:null===(n=this.props.theme)||void 0===n||null===(r=n.activeTheme)||void 0===r?void 0:r.name,totalLoadTime:Math.round(1e3*(performance.now()-this.state.latestRunTime)),browserInfo:i})},this.handleAutoRerun=e=>{const t=setInterval((()=>{this.widgetMgr.sendUpdateWidgetsMessage(e.fragmentId,!0)}),1e3*e.interval);this.setState((e=>({autoReruns:[...e.autoReruns,t]})))},this.handleSessionStatusChanged=e=>{this.setState((t=>{let{scriptRunState:n}=t,{dialog:r}=t;return e.scriptIsRunning&&t.scriptRunState!==wt.STOP_REQUESTED?(n=wt.RUNNING,(0,Pe.se)(r)&&r.type===Ip.SCRIPT_COMPILE_ERROR&&(r=void 0)):e.scriptIsRunning||t.scriptRunState===wt.RERUN_REQUESTED||t.scriptRunState===wt.COMPILATION_ERROR||(n=wt.NOT_RUNNING),{userSettings:{...t.userSettings,runOnSave:Boolean(e.runOnSave)},dialog:r,scriptRunState:n}}))},this.handleSessionEvent=e=>{if(this.sessionEventDispatcher.handleSessionEventMsg(e),"scriptCompilationException"===e.type){this.setState({scriptRunState:wt.COMPILATION_ERROR});const t={type:Ip.SCRIPT_COMPILE_ERROR,exception:e.scriptCompilationException,onClose:()=>{}};this.openDialog(t)}},this.maybeUpdatePageUrl=(e,t,n)=>{const r=this.getBaseUriParts();if(r){const{basePath:o}=r,i=(0,Pe.gu)(document.location.pathname,o);if((""===i?e:i)!==t){const e=n?"":t,r=(0,Pe.U5)(),i=`${o?`/${o}`:""}/${e}${r?`?${r}`:""}`;window.history.pushState({},"",i)}}},this.handleNewSession=e=>{const t=e.initialize;if(this.hasStreamlitVersionChanged(t))return void window.location.reload();this.sessionInfo.isSet||this.handleOneTimeInitialization(e);const{appHash:n,pageLayouts:r,currentPageScriptHash:o}=this.state,{scriptRunId:i,name:a,mainScriptPath:s,fragmentIdsThisRun:l,pageScriptHash:c,mainScriptHash:u}=e;if(l.length)this.setState({fragmentIdsThisRun:l,latestRunTime:performance.now()});else{this.cleanupAutoReruns();const t=e.config,n=e.customTheme;this.processThemeInput(n),this.setState({allowRunOnSave:t.allowRunOnSave,hideTopBar:t.hideTopBar,toolbarMode:t.toolbarMode,latestRunTime:performance.now(),mainScriptHash:u,fragmentIdsThisRun:l}),this.maybeSetState(this.appNavigation.handleNewSession(e)),this.onPageIconChanged("./favicon.png")}const p=(0,Pe.YZ)(this.sessionInfo.current.installationId+s);this.metricsMgr.setMetadata(this.state.deployedAppMetadata),this.metricsMgr.setAppHash(p),this.metricsMgr.enqueue("updateReport"),n===p&&o===c?this.setState({scriptRunId:i}):this.clearAppState(p,i,a,u),this.setState((e=>{var t;const n=null!==(t=r[c])&&void 0!==t?t:yt.wF.Layout.CENTERED;return{layout:n,userSettings:{...e.userSettings,wideMode:n===yt.wF.Layout.WIDE}}}))},this.handleOneTimeInitialization=e=>{const t=e.initialize,n=e.config;this.sessionInfo.setCurrent(At.propsFromNewSessionMessage(e)),this.metricsMgr.initialize({gatherUsageStats:n.gatherUsageStats}),this.handleSessionStatusChanged(t.sessionStatus)},this.onHistoryChange=()=>{const{currentPageScriptHash:e}=this.state,t=this.appNavigation.findPageByUrlPath(document.location.pathname),n=document.location.toString().includes("#"),r=(null===t||void 0===t?void 0:t.pageScriptHash)===e;(0,Pe.hX)(t)||n&&r||this.onPageChange(t.pageScriptHash)},this.setAndSendTheme=e=>{this.props.theme.setTheme(e),this.hostCommunicationMgr.sendMessageToHost({type:"SET_THEME_CONFIG",themeInfo:(0,Oe.sR)(e.emotion)})},this.createThemeHash=e=>{if(!e)return"hash_for_undefined_custom_theme";const t=Object.entries(e);return t.sort(),(0,Pe.YZ)(t.join(":"))},this.closeDialog=()=>{this.setState({dialog:void 0})},this.saveSettings=e=>{const{runOnSave:t}=this.state.userSettings,{runOnSave:n}=e;if(this.setState({userSettings:e}),t!==n&&this.isServerConnected()){const e=new yt.$4({setRunOnSave:n});e.type="setRunOnSave",this.sendBackMsg(e)}},this.handleDeltaMsg=(e,t)=>{if(this.pendingElementsBuffer=this.pendingElementsBuffer.applyDelta(this.state.scriptRunId,e,t),!this.pendingElementsTimerRunning){this.pendingElementsTimerRunning=!0;const e=this.state.scriptRunState===wt.RUNNING;setTimeout((()=>{this.pendingElementsTimerRunning=!1,e&&this.setState({elements:this.pendingElementsBuffer})}),10)}},this.debugShutdownRuntime=()=>{if(this.isServerConnected()){const e=new yt.$4({debugShutdownRuntime:!0});e.type="debugShutdownRuntime",this.sendBackMsg(e)}},this.debugDisconnectWebsocket=()=>{if(this.isServerConnected()){const e=new yt.$4({debugDisconnectWebsocket:!0});e.type="debugDisconnectWebsocket",this.sendBackMsg(e)}},this.debugClearForwardMsgCache=()=>{var e,t;iu()&&(null===(e=this.connectionManager)||void 0===e||null===(t=e.connection)||void 0===t||t.cache.messages.clear())},this.cleanupAutoReruns=()=>{this.state.autoReruns.forEach((e=>{clearInterval(e)})),this.setState({autoReruns:[]})},this.rerunScript=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];t.closeDialog(),t.isServerConnected()?t.state.scriptRunState!==wt.RUNNING&&t.state.scriptRunState!==wt.RERUN_REQUESTED&&(t.setState({scriptRunState:wt.RERUN_REQUESTED}),!0===e&&t.saveSettings({...t.state.userSettings,runOnSave:!0}),t.widgetMgr.sendUpdateWidgetsMessage(void 0)):(0,vt.vV)("Cannot rerun script when disconnected from server.")},this.sendLoadGitInfoBackMsg=()=>{this.isServerConnected()?this.sendBackMsg(new yt.$4({loadGitInfo:!0})):(0,vt.vV)("Cannot load git information when disconnected from server.")},this.onPageChange=e=>{const{elements:t,mainScriptHash:n}=this.state;this.cleanupAutoReruns();const r=this.appNavigation.clearPageElements(t,n,void 0),o=new Set(Array.from(r.getElements()).map((e=>(0,Pe.Id)(e))).filter(Pe.q3));this.setState((e=>{const t=e.pageLayouts;return t[e.currentPageScriptHash]=e.layout,{pageLayouts:t}})),this.sendRerunBackMsg(this.widgetMgr.getActiveWidgetStates(o),void 0,e)},this.isAppInReadyState=e=>this.state.connectionState===xc.CONNECTED&&this.state.scriptRunState===wt.NOT_RUNNING&&e.scriptRunState===wt.RUNNING&&e.connectionState===xc.CONNECTED,this.sendRerunBackMsg=(e,t,n,r)=>{const o=this.getBaseUriParts();if(!o)return void(0,vt.vV)("Cannot send rerun backMessage when disconnected from server.");const{currentPageScriptHash:i}=this.state,{basePath:a}=o;let s=this.getQueryString(),l="";n?n!=i&&(s=(0,Pe.U5)(),this.hostCommunicationMgr.sendMessageToHost({type:"SET_QUERY_PARAM",queryParams:s})):i?n=i:(l=(0,Pe.gu)(document.location.pathname,a),n=""),this.sendBackMsg(new yt.$4({rerunScript:{queryString:s,widgetStates:e,pageScriptHash:n,pageName:l,fragmentId:t,isAutoRerun:r}})),Pt.record({name:"RequestedRerun",scriptRunState:this.state.scriptRunState})},this.stopScript=()=>{if(!this.isServerConnected())return void(0,vt.vV)("Cannot stop app when disconnected from server.");if(this.state.scriptRunState===wt.NOT_RUNNING||this.state.scriptRunState===wt.STOP_REQUESTED)return;const e=new yt.$4({stopScript:!0});e.type="stopScript",this.sendBackMsg(e),this.setState({scriptRunState:wt.STOP_REQUESTED})},this.openClearCacheDialog=()=>{if(this.isServerConnected()){const e={type:Ip.CLEAR_CACHE,confirmCallback:this.clearCache,defaultAction:this.clearCache,onClose:()=>{}};this.openDialog(e)}else(0,vt.vV)("Cannot clear cache: disconnected from server")},this.openDeployDialog=()=>{var e;const t={type:Ip.DEPLOY_DIALOG,onClose:this.closeDialog,showDeployError:this.showDeployError,isDeployErrorModalOpen:(null===(e=this.state.dialog)||void 0===e?void 0:e.type)===Ip.DEPLOY_ERROR,metricsMgr:this.metricsMgr};this.openDialog(t)},this.openThemeCreatorDialog=()=>{const e={type:Ip.THEME_CREATOR,backToSettings:this.settingsCallback,onClose:this.closeDialog};this.openDialog(e)},this.clearCache=()=>{if(this.closeDialog(),this.isServerConnected()){const e=new yt.$4({clearCache:!0});e.type="clearCache",this.sendBackMsg(e)}else(0,vt.vV)("Cannot clear cache: disconnected from server")},this.sendAppHeartbeat=()=>{if(this.isServerConnected()){const e=new yt.$4({appHeartbeat:!0});e.type="appHeartbeat",this.sendBackMsg(e)}else(0,vt.vV)("Cannot send app heartbeat: disconnected from server")},this.sendBackMsg=e=>{this.connectionManager?((0,vt.OG)(e),this.connectionManager.sendMessage(e)):(0,vt.vV)(`Not connected. Cannot send back message: ${e}`)},this.handleConnectionError=e=>{this.showError("Connection error",e)},this.isServerConnected=()=>!!this.connectionManager&&this.connectionManager.isConnected(),this.settingsCallback=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const n={type:Ip.SETTINGS,isServerConnected:t.isServerConnected(),settings:t.state.userSettings,allowRunOnSave:t.state.allowRunOnSave,onSave:t.saveSettings,onClose:()=>{},developerMode:xd(t.state.isOwner,t.state.toolbarMode),openThemeCreator:t.openThemeCreatorDialog,animateModal:e,metricsMgr:t.metricsMgr};t.openDialog(n)},this.aboutCallback=()=>{const{menuItems:e}=this.state,t={type:Ip.ABOUT,sessionInfo:this.sessionInfo,onClose:this.closeDialog,aboutSectionMd:null===e||void 0===e?void 0:e.aboutSectionMd};this.openDialog(t)},this.printCallback=()=>{const{scriptRunState:e}=this.state;if(e!==wt.NOT_RUNNING)return void setTimeout(this.printCallback,500);let t;try{const e=(0,Pe.ky)(this.embeddingId);t=e&&e.contentWindow?e.contentWindow.window:window}catch(n){t=window}finally{t||(t=window),t.print()}},this.screencastCallback=()=>{const{scriptName:e}=this.state,{startRecording:t}=this.props.screenCast;t(`streamlit-${e}-${Fe()().format("YYYY-MM-DD-HH-MM-SS")}`)},this.handleFullScreen=e=>{this.setState({isFullScreen:e})},this.setLibConfig=e=>{this.setState({libConfig:e})},this.setAppConfig=e=>{this.setState({appConfig:e})},this.addScriptFinishedHandler=e=>{this.setState(((t,n)=>({scriptFinishedHandlers:t.scriptFinishedHandlers.concat(e)})))},this.removeScriptFinishedHandler=e=>{this.setState(((t,n)=>({scriptFinishedHandlers:zt()(t.scriptFinishedHandlers,e)})))},this.getBaseUriParts=()=>this.connectionManager?this.connectionManager.getBaseUriParts():void 0,this.getQueryString=()=>{const{queryParams:e}=this.state,t=e&&e.length>0?e:document.location.search;return t.startsWith("?")?t.substring(1):t},this.isInCloudEnvironment=()=>{const{hostMenuItems:e}=this.state;return e&&(null===e||void 0===e?void 0:e.length)>0},this.showDeployButton=()=>xd(this.state.isOwner,this.state.toolbarMode)&&!this.isInCloudEnvironment()&&this.sessionInfo.isSet&&!this.sessionInfo.isHello,this.deployButtonClicked=()=>{this.metricsMgr.enqueue("menuClick",{label:"deployButtonInApp"}),this.sendLoadGitInfoBackMsg(),this.openDeployDialog()},this.requestFileURLs=(e,t)=>{if(this.isServerConnected()){const n=new yt.$4({fileUrlsRequest:{requestId:e,fileNames:t.map((e=>e.name)),sessionId:this.sessionInfo.current.sessionId}});n.type="fileUrlsRequest",this.sendBackMsg(n)}},this.handleKeyDown=e=>{switch(e){case"c":xd(this.state.isOwner,this.state.toolbarMode)&&this.openClearCacheDialog();break;case"r":this.rerunScript()}},this.handleKeyUp=e=>{"esc"===e&&this.props.screenCast.stopRecording()},(0,mt.Xu)();let n=this.createThemeHash();(0,Oe.tl)(e.theme.activeTheme)||(n=this.createThemeHash((0,Oe.hf)(e.theme.activeTheme.emotion))),this.state={connectionState:xc.INITIAL,elements:Ut.empty("",!0),isFullScreen:!1,scriptName:"",scriptRunId:_d,appHash:null,scriptRunState:wt.NOT_RUNNING,userSettings:{wideMode:!1,runOnSave:!1},layout:yt.wF.Layout.CENTERED,pageLayouts:{},initialSidebarState:yt.wF.SidebarState.AUTO,menuItems:void 0,allowRunOnSave:!0,scriptFinishedHandlers:[],themeHash:n,gitInfo:null,formsData:Xt(),appPages:[],navSections:[],currentPageScriptHash:"",mainScriptHash:"",hideTopBar:!0,hideSidebarNav:!0,expandSidebarNav:!1,toolbarMode:yt.TS.ToolbarMode.MINIMAL,latestRunTime:performance.now(),fragmentIdsThisRun:[],isOwner:!1,hostMenuItems:[],hostToolbarItems:[],hostHideSidebarNav:!1,sidebarChevronDownshift:0,pageLinkBaseUrl:"",queryParams:"",deployedAppMetadata:{},libConfig:{},appConfig:{},autoReruns:[],inputsDisabled:!1},this.connectionManager=null,this.widgetMgr=new Kt({sendRerunBackMsg:this.sendRerunBackMsg,formsDataChanged:e=>this.setState({formsData:e})}),this.hostCommunicationMgr=new ln({sendRerunBackMsg:this.sendRerunBackMsg,closeModal:this.closeDialog,stopScript:this.stopScript,rerunScript:this.rerunScript,clearCache:this.clearCache,sendAppHeartbeat:this.sendAppHeartbeat,setInputsDisabled:e=>{this.setState({inputsDisabled:e})},themeChanged:this.handleThemeMessage,pageChanged:this.onPageChange,isOwnerChanged:e=>this.setState({isOwner:e}),jwtHeaderChanged:e=>{let{jwtHeaderName:t,jwtHeaderValue:n}=e;void 0!==this.endpoints.setJWTHeader&&this.state.appConfig.useExternalAuthToken&&this.endpoints.setJWTHeader({jwtHeaderName:t,jwtHeaderValue:n})},hostMenuItemsChanged:e=>{this.setState({hostMenuItems:e})},hostToolbarItemsChanged:e=>{this.setState({hostToolbarItems:e})},hostHideSidebarNavChanged:e=>{this.setState({hostHideSidebarNav:e})},sidebarChevronDownshiftChanged:e=>{this.setState({sidebarChevronDownshift:e})},pageLinkBaseUrlChanged:e=>{this.setState({pageLinkBaseUrl:e})},queryParamsChanged:e=>{this.setState({queryParams:e})},deployedAppMetadataChanged:e=>{this.setState({deployedAppMetadata:e})},restartWebsocketConnection:()=>{this.connectionManager||this.initializeConnectionManager()},terminateWebsocketConnection:()=>{var e;null===(e=this.connectionManager)||void 0===e||e.disconnect(),this.connectionManager=null}}),this.endpoints=new Jp({getServerUri:this.getBaseUriParts,csrfEnabled:!0}),this.uploadClient=new On({sessionInfo:this.sessionInfo,endpoints:this.endpoints,formsWithPendingRequestsChanged:e=>this.widgetMgr.setFormsWithUploadsInProgress(e),requestFileURLs:this.requestFileURLs}),this.componentRegistry=new gn(this.endpoints),this.pendingElementsTimerRunning=!1,this.pendingElementsBuffer=this.state.elements,this.appNavigation=new Ed(this.hostCommunicationMgr,this.maybeUpdatePageUrl,this.onPageNotFound,this.onPageIconChanged),window.streamlitDebug={clearForwardMsgCache:this.debugClearForwardMsgCache,disconnectWebsocket:this.debugDisconnectWebsocket,shutdownRuntime:this.debugShutdownRuntime}}initializeConnectionManager(){this.connectionManager=new Kp({sessionInfo:this.sessionInfo,endpoints:this.endpoints,onMessage:this.handleMessage,onConnectionError:this.handleConnectionError,connectionStateChanged:this.handleConnectionStateChanged,claimHostAuthToken:this.hostCommunicationMgr.claimAuthToken,resetHostAuthToken:this.hostCommunicationMgr.resetAuthToken,onHostConfigResp:e=>{const{allowedOrigins:t,useExternalAuthToken:n,disableFullscreenMode:r,enableCustomParentMessages:o,mapboxToken:i,enforceDownloadInNewTab:a}=e,s={allowedOrigins:t,useExternalAuthToken:n,enableCustomParentMessages:o},l={mapboxToken:i,disableFullscreenMode:r,enforceDownloadInNewTab:a};this.hostCommunicationMgr.setAllowedOrigins(s),this.setAppConfig(s),this.setLibConfig(l)}})}componentDidMount(){this.initializeConnectionManager(),this.hostCommunicationMgr.sendMessageToHost({type:"SCRIPT_RUN_STATE_CHANGED",scriptRunState:this.state.scriptRunState}),(0,Pe.Az)()&&document.body.classList.add("embedded"),(0,Pe.hU)()&&(window.iFrameResizer={heightCalculationMethod:()=>{const e=document.querySelectorAll("[data-iframe-height]"),t=Array.from(e).map((e=>Math.ceil(e.getBoundingClientRect().bottom)));return Math.max(0,...t)}},__webpack_require__.e(6679).then(__webpack_require__.t.bind(__webpack_require__,56679,23))),this.hostCommunicationMgr.sendMessageToHost({type:"SET_THEME_CONFIG",themeInfo:(0,Oe.sR)(this.props.theme.activeTheme.emotion)}),this.metricsMgr.enqueue("viewReport"),window.addEventListener("popstate",this.onHistoryChange,!1)}componentDidUpdate(e,t){!1===window.prerenderReady&&this.isAppInReadyState(t)&&(window.prerenderReady=!0),this.state.scriptRunState!==t.scriptRunState&&this.hostCommunicationMgr.sendMessageToHost({type:"SCRIPT_RUN_STATE_CHANGED",scriptRunState:this.state.scriptRunState})}componentWillUnmount(){var e;null===(e=this.connectionManager)||void 0===e||e.disconnect(),this.hostCommunicationMgr.closeHostCommunication(),window.removeEventListener("popstate",this.onHistoryChange,!1)}showError(e,t){(0,vt.vV)(t);const n={type:Ip.WARNING,title:e,msg:t,onClose:()=>{}};this.openDialog(n)}hasStreamlitVersionChanged(e){if(this.sessionInfo.isSet){const t=this.sessionInfo.current.streamlitVersion,{environmentInfo:n}=e;if((0,Pe.se)(n)&&(0,Pe.se)(n.streamlitVersion))return t!=n.streamlitVersion}return!1}maybeSetState(e){if(e){const[t,n]=e;this.setState(t,n)}}processThemeInput(e){const t=this.createThemeHash(e);if(t===this.state.themeHash)return;this.setState({themeHash:t});const n=!(0,Oe.tl)(this.props.theme.activeTheme);if(e){const t=(0,Oe.an)(Oe.kQ,e);this.props.theme.addThemes([t]);(null===(0,Oe.YY)()||n)&&this.setAndSendTheme(t)}else this.props.theme.addThemes([]),n&&this.setAndSendTheme((0,Oe.Y_)())}handleScriptFinished(e){if(e===yt.zo.ScriptFinishedStatus.FINISHED_SUCCESSFULLY||e===yt.zo.ScriptFinishedStatus.FINISHED_EARLY_FOR_RERUN||e===yt.zo.ScriptFinishedStatus.FINISHED_FRAGMENT_RUN_SUCCESSFULLY){if(window.setTimeout((()=>{this.state.scriptFinishedHandlers.map((e=>e()))}),0),e===yt.zo.ScriptFinishedStatus.FINISHED_SUCCESSFULLY||e===yt.zo.ScriptFinishedStatus.FINISHED_FRAGMENT_RUN_SUCCESSFULLY){this.setState((e=>{let{scriptRunId:t,fragmentIdsThisRun:n}=e;return{elements:this.pendingElementsBuffer.clearStaleNodes(t,n)}}),(()=>{this.pendingElementsBuffer=this.state.elements}));const e=new Set(Array.from(this.state.elements.getElements()).map((e=>(0,Pe.Id)(e))).filter(Pe.q3));this.widgetMgr.removeInactive(e)}null!==this.connectionManager&&e!==yt.zo.ScriptFinishedStatus.FINISHED_EARLY_FOR_RERUN&&this.sessionInfo.isSet&&this.connectionManager.incrementMessageCacheRunCount(this.sessionInfo.current.maxCachedMessageAge)}}clearAppState(e,t,n,r){const{hideSidebarNav:o,elements:i}=this.state,a=o&&i.sidebar||void 0;this.setState({scriptRunId:t,scriptName:n,appHash:e,elements:this.appNavigation.clearPageElements(this.pendingElementsBuffer,r,a)},(()=>{this.pendingElementsBuffer=this.state.elements;const e=new Set(Array.from(this.state.elements.getElements()).map((e=>(0,Pe.Id)(e))).filter(Pe.q3));this.widgetMgr.removeInactive(e)}))}openDialog(e){this.setState({dialog:e})}render(){const{allowRunOnSave:e,connectionState:t,dialog:n,elements:r,initialSidebarState:o,menuItems:i,isFullScreen:a,scriptRunId:s,scriptRunState:l,userSettings:c,hideTopBar:u,hideSidebarNav:p,expandSidebarNav:d,currentPageScriptHash:b,hostHideSidebarNav:f,pageLinkBaseUrl:h,sidebarChevronDownshift:m,hostMenuItems:M,hostToolbarItems:O,libConfig:g,appConfig:z,inputsDisabled:y,appPages:A,navSections:v}=this.state,w=xd(this.state.isOwner,this.state.toolbarMode),S=Ot()("stApp",(0,Pe.M$)(this.embeddingId),{"streamlit-embedded":(0,Pe.yR)(),"streamlit-wide":c.wideMode}),q=n?Pp({...n,onClose:this.closeDialog}):null,E=y||t!==xc.CONNECTED;return(0,xe.jsx)(wn.Provider,{value:{initialSidebarState:o,wideMode:c.wideMode,embedded:(0,Pe.yR)(),showPadding:!(0,Pe.yR)()||(0,Pe.Rg)(),disableScrolling:(0,Pe.Az)(),showToolbar:!(0,Pe.yR)()||(0,Pe.v4)(),showColoredLine:!(0,Pe.yR)()||(0,Pe._d)(),pageLinkBaseUrl:h,sidebarChevronDownshift:m,gitInfo:this.state.gitInfo,appConfig:z},children:(0,xe.jsx)(zn.n.Provider,{value:{isFullScreen:a,setFullScreen:this.handleFullScreen,addScriptFinishedHandler:this.addScriptFinishedHandler,removeScriptFinishedHandler:this.removeScriptFinishedHandler,activeTheme:this.props.theme.activeTheme,setTheme:this.setAndSendTheme,availableThemes:this.props.theme.availableThemes,addThemes:this.props.theme.addThemes,onPageChange:this.onPageChange,currentPageScriptHash:b,libConfig:g,fragmentIdsThisRun:this.state.fragmentIdsThisRun},children:(0,xe.jsx)(ht,{keyName:"r,c,esc",onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,children:(0,xe.jsxs)(td,{className:S,"data-testid":"stApp","data-test-script-state":s==_d?"initial":l,"data-test-connection-state":t,children:[(0,xe.jsxs)(zu,{children:[!u&&(0,xe.jsxs)(xe.Fragment,{children:[(0,xe.jsx)(jc,{connectionState:t,sessionEventDispatcher:this.sessionEventDispatcher,scriptRunState:l,rerunScript:this.rerunScript,stopScript:this.stopScript,allowRunOnSave:e}),(0,xe.jsx)(fu,{hostToolbarItems:O,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,metricsMgr:this.metricsMgr})]}),this.showDeployButton()&&(0,xe.jsx)(mu,{onClick:this.deployButtonClicked.bind(this)}),(0,xe.jsx)(cu,{isServerConnected:this.isServerConnected(),quickRerunCallback:this.rerunScript,clearCacheCallback:this.openClearCacheDialog,settingsCallback:this.settingsCallback,aboutCallback:this.aboutCallback,printCallback:this.printCallback,screencastCallback:this.screencastCallback,screenCastState:this.props.screenCast.currentState,hostMenuItems:M,developmentMode:w,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,menuItems:i,metricsMgr:this.metricsMgr,toolbarMode:this.state.toolbarMode})]}),(0,xe.jsx)(sc,{endpoints:this.endpoints,sessionInfo:this.sessionInfo,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,elements:r,scriptRunId:s,scriptRunState:l,widgetMgr:this.widgetMgr,widgetsDisabled:E,uploadClient:this.uploadClient,componentRegistry:this.componentRegistry,formsData:this.state.formsData,appLogo:r.logo,appPages:A,navSections:v,onPageChange:this.onPageChange,currentPageScriptHash:b,hideSidebarNav:p||f,expandSidebarNav:d}),q]})})})})}}const Rd=vd(Td);const kd=()=>{const[e,t]=function(){const e=(0,Oe.x0)(),[t,r]=(0,n.useState)(e),[o,i]=(0,n.useState)([]),[a,s]=(0,n.useState)([...(0,Oe.Ef)(),...(0,Oe.tl)(e)?[]:[e]]),l=(0,n.useCallback)((e=>{e!==t&&(r(e),e.name===Oe.QM?(0,Oe.E9)():(0,Oe.Iu)(e))}),[r,t]),c=(0,n.useCallback)((()=>{t.name===Oe.QM&&l((0,Oe.Y_)());const e=a.filter((e=>e.name!==Oe.QM));s([(0,Oe.DK)(),...e])}),[t.name,a,l]),u=(0,n.useCallback)((e=>{e.fontFaces&&i(e.fontFaces);const t=new yt.tc(e),n=(0,Oe.an)(Oe.kQ,t);l(n)}),[i,l]);return(0,n.useEffect)((()=>{const e=window.matchMedia("(prefers-color-scheme: dark)");return e.addEventListener("change",c),window.addEventListener("afterprint",c),()=>{window.removeEventListener("afterprint",c),e.removeEventListener("change",c)}}),[t,a,c]),[{setTheme:l,activeTheme:t,addThemes:e=>{s([...(0,Oe.Ef)(),...e])},availableThemes:a,setImportedTheme:u},o]}(),{activeTheme:r}=e,o=r.name===Oe.kQ&&t.length>0;return(0,xe.jsx)(ke,{theme:r,children:(0,xe.jsx)(Be,{children:(0,xe.jsxs)(Ie,{children:[o&&(0,xe.jsx)(Ce,{fontFaces:t}),(0,xe.jsx)(Rd,{theme:e})]})})})},Cd=new me({prefix:"st-"});r.render((0,xe.jsx)(Me.Kq,{value:Cd,children:(0,xe.jsx)(kd,{})}),document.getElementById("root"))})()})();
|
@@ -347,9 +347,9 @@ streamlit/runtime/state/safe_session_state.py,sha256=WLFFyMtP4F19TWWBarKtSP942Ie
|
|
347
347
|
streamlit/runtime/state/session_state.py,sha256=SMBWsSZY29jAgL3QfX4xvJr9aLCNrHHUz9AmosX7FlQ,28850
|
348
348
|
streamlit/runtime/state/session_state_proxy.py,sha256=IWF43f6UWL4KyxNWF3aTv1sbykNI2hI5UsPF2UIfpdE,5524
|
349
349
|
streamlit/runtime/state/widgets.py,sha256=r5XOgHBh9AqS52rgKGgDXFGnkdY6ObUJBSSUBqkzTK8,5319
|
350
|
-
streamlit/static/asset-manifest.json,sha256=
|
350
|
+
streamlit/static/asset-manifest.json,sha256=NtlGqC5r3LExa66sfptejnpIglMQS8eqVfkvN1Lo89w,14493
|
351
351
|
streamlit/static/favicon.png,sha256=if5cVgw7azxKOvV5FpGixga7JLn23rfnHcy1CdWI1-E,1019
|
352
|
-
streamlit/static/index.html,sha256=
|
352
|
+
streamlit/static/index.html,sha256=Ef4KaJGeIGvvr6WzZzl1kpG-aISQj1LudAZjBnQDNvA,891
|
353
353
|
streamlit/static/static/css/4096.8b8f33d6.chunk.css,sha256=4m2lbj1eVFXSaGCRBHZNhqyRz-4Ce9KogjJPxIq6On8,33275
|
354
354
|
streamlit/static/static/css/9943.d452238e.chunk.css,sha256=B69nSRvppH7uO-_kso_XSGce7SJOCm8ZD1GB9g6fttA,12038
|
355
355
|
streamlit/static/static/css/main.5513bd04.css,sha256=9vuriEsFvHDyAwsI3vtBY9PNL8UOjqGwWZ4lZHsdFzw,29356
|
@@ -419,8 +419,8 @@ streamlit/static/static/js/9528.746f7a0e.chunk.js,sha256=KL6FfepG5LOH0P5pH4ieh5-
|
|
419
419
|
streamlit/static/static/js/954.88014372.chunk.js,sha256=iM-oVcorvEnZJzzEem6IrtXG6U63FfXPupeoIxFK92U,8769
|
420
420
|
streamlit/static/static/js/9923.21b1d895.chunk.js,sha256=rYpmorMKfkrMKc-tw2jcZz69djp5dRG3g42yflZR3fM,4843
|
421
421
|
streamlit/static/static/js/9943.d54fcda3.chunk.js,sha256=_4ZKnPFbLf5RkFS5_N4bZc49sMAHUKsN1fCgywqjz6Q,50668
|
422
|
-
streamlit/static/static/js/main.
|
423
|
-
streamlit/static/static/js/main.
|
422
|
+
streamlit/static/static/js/main.555eaf62.js,sha256=WkfPX17TZyUs8ld4zQuubCyDruFF9zPIZvWAOr2xTAw,4477679
|
423
|
+
streamlit/static/static/js/main.555eaf62.js.LICENSE.txt,sha256=vcwWCW5VNoALG8YyhU5k8oDUNAwYisMZfiZ8X1cvtWk,4730
|
424
424
|
streamlit/static/static/media/KaTeX_AMS-Regular.73ea273a72f4aca30ca5.woff2,sha256=DN04fJWQoan5eUVgAi27WWVKfYbxh6oMgUla1C06cwg,28076
|
425
425
|
streamlit/static/static/media/KaTeX_AMS-Regular.853be92419a6c3766b9a.ttf,sha256=aFNIQLz90r_7bw6N60hoTdAefwTqKBMmdXevuQbeHRM,63632
|
426
426
|
streamlit/static/static/media/KaTeX_AMS-Regular.d562e886c52f12660a41.woff,sha256=MNqR6EyJP4deJSaJ-uvcWQsocRReitx_mp1NvYzgslE,33516
|
@@ -540,9 +540,9 @@ streamlit/web/server/server_util.py,sha256=ioIHkXNlA_ujj2Q3isziM8r5glKxgK2JZRoCD
|
|
540
540
|
streamlit/web/server/stats_request_handler.py,sha256=e144zIhzLTB1PN4CwTCxElCoWMuo9IsBEPex2exHCQ0,3641
|
541
541
|
streamlit/web/server/upload_file_request_handler.py,sha256=ftyKpARrUjOpRcFETIXuoTyOG_mo-ToOw5NI0y_W4lE,5003
|
542
542
|
streamlit/web/server/websocket_headers.py,sha256=uUxypj04ondEC4ocBiYCndX_N06Zwe1Mt690Vupe08Y,2232
|
543
|
-
streamlit_nightly-1.39.1.
|
544
|
-
streamlit_nightly-1.39.1.
|
545
|
-
streamlit_nightly-1.39.1.
|
546
|
-
streamlit_nightly-1.39.1.
|
547
|
-
streamlit_nightly-1.39.1.
|
548
|
-
streamlit_nightly-1.39.1.
|
543
|
+
streamlit_nightly-1.39.1.dev20241014.data/scripts/streamlit.cmd,sha256=ZEYM3vBJSp-k7vwSJ3ba5NzEk9-qHdSeLvGYAAe1mMw,676
|
544
|
+
streamlit_nightly-1.39.1.dev20241014.dist-info/METADATA,sha256=5JZERRNh8lxF70CGUk7g7Mkcv4QVyZzoqr56Pum2weE,8512
|
545
|
+
streamlit_nightly-1.39.1.dev20241014.dist-info/WHEEL,sha256=AHX6tWk3qWuce7vKLrj7lnulVHEdWoltgauo8bgCXgU,109
|
546
|
+
streamlit_nightly-1.39.1.dev20241014.dist-info/entry_points.txt,sha256=uNJ4DwGNXEhOK0USwSNanjkYyR-Bk7eYQbJFDrWyOgY,53
|
547
|
+
streamlit_nightly-1.39.1.dev20241014.dist-info/top_level.txt,sha256=V3FhKbm7G2LnR0s4SytavrjIPNIhvcsAGXfYHAwtQzw,10
|
548
|
+
streamlit_nightly-1.39.1.dev20241014.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|