streamlit-nightly 1.52.3.dev20251228__py3-none-any.whl → 1.52.3.dev20251231__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/index.html +1 -1
- streamlit/static/manifest.json +304 -303
- streamlit/static/static/js/{ErrorOutline.esm.DcfXgWUn.js → ErrorOutline.esm.bKqSjdNS.js} +1 -1
- streamlit/static/static/js/{FileDownload.esm.mv0ER-NN.js → FileDownload.esm.DYcl0HsS.js} +1 -1
- streamlit/static/static/js/{FileHelper.DrrhFRar.js → FileHelper.BG4elCiu.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.DyKNX1aO.js → FormClearHelper.CcrsaZUN.js} +1 -1
- streamlit/static/static/js/{InputInstructions.DNVNePDU.js → InputInstructions.B-hrhnKS.js} +1 -1
- streamlit/static/static/js/{Particles.DfQRmRqL.js → Particles.C1lQDBme.js} +1 -1
- streamlit/static/static/js/{ProgressBar.D7gjwuV4.js → ProgressBar.D54tj-jr.js} +1 -1
- streamlit/static/static/js/{StreamlitSyntaxHighlighter.C4EfgCCA.js → StreamlitSyntaxHighlighter.D6tqIUNe.js} +1 -1
- streamlit/static/static/js/{TableChart.esm.BRwgdYlO.js → TableChart.esm.BsEqAKaW.js} +1 -1
- streamlit/static/static/js/{Toolbar.BwjOKIoX.js → Toolbar.COFccaTT.js} +1 -1
- streamlit/static/static/js/{WidgetLabelHelpIconInline.B31eEkR7.js → WidgetLabelHelpIconInline.tetiwgyt.js} +1 -1
- streamlit/static/static/js/{base-input.DfcQke7n.js → base-input.bCQ8S-FY.js} +1 -1
- streamlit/static/static/js/{checkbox.D1dO0sd2.js → checkbox.SvhUmEPl.js} +1 -1
- streamlit/static/static/js/{createDownloadLinkElement.COnF97s_.js → createDownloadLinkElement.mdzy2wqu.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.sTgLsMeV.js → data-grid-overlay-editor.BRpG6UuQ.js} +1 -1
- streamlit/static/static/js/{downloader.DICSpWsQ.js → downloader.BFho_Alx.js} +1 -1
- streamlit/static/static/js/{embed.CdnV1dx9.js → embed.CjSf3HQ8.js} +1 -1
- streamlit/static/static/js/{es6.deJoFr5d.js → es6.DnRofDlD.js} +2 -2
- streamlit/static/static/js/{formatNumber.DK7aeI7k.js → formatNumber.CtWVEKkt.js} +1 -1
- streamlit/static/static/js/{iconPosition.D8Yv5FiE.js → iconPosition.Docx9KVT.js} +1 -1
- streamlit/static/static/js/{iframeResizer.contentWindow.BU-dAwT1.js → iframeResizer.contentWindow.DPJjr14X.js} +1 -1
- streamlit/static/static/js/{index.mVwG03J8.js → index.-Uw_gjRk.js} +1 -1
- streamlit/static/static/js/{index.pF_JNVHJ.js → index.2hZ1_TTv.js} +1 -1
- streamlit/static/static/js/{index.Ml__cfHd.js → index.3BdSdx9Q.js} +1 -1
- streamlit/static/static/js/{index.B5uiXC5d.js → index.8C-cS-O4.js} +1 -1
- streamlit/static/static/js/{index.BSpyyZms.js → index.8I6SAQDm.js} +1 -1
- streamlit/static/static/js/{index.Bwox_wj7.js → index.B-2OnxuC.js} +1 -1
- streamlit/static/static/js/{index.Bnp4oXTj.js → index.B-k1aQD6.js} +1 -1
- streamlit/static/static/js/{index.AowxKR47.js → index.B4jgy50K.js} +1 -1
- streamlit/static/static/js/{index.CHxfXEQs.js → index.BE-_bdmf.js} +1 -1
- streamlit/static/static/js/{index.DJxfjWh8.js → index.BPDinT9W.js} +1 -1
- streamlit/static/static/js/{index.BO68LeZH.js → index.BWYs56td.js} +1 -1
- streamlit/static/static/js/{index.SS0fb-z0.js → index.BWwP9fh8.js} +1 -1
- streamlit/static/static/js/{index.DQQMDt36.js → index.BZFLbiyp.js} +1 -1
- streamlit/static/static/js/{index.8qTg2RM9.js → index.BakUx9hH.js} +1 -1
- streamlit/static/static/js/{index.CxeI_OXa.js → index.Bd9Ju7cE.js} +1 -1
- streamlit/static/static/js/{index.C93OpKAy.js → index.BkQCUqLQ.js} +1 -1
- streamlit/static/static/js/{index.CsrQPO4k.js → index.Bt-J_LLo.js} +1 -1
- streamlit/static/static/js/{index.DYHH1mfr.js → index.BukrvZZ2.js} +1 -1
- streamlit/static/static/js/index.C3MpZoqE.js +1 -0
- streamlit/static/static/js/{index.Dj7zOkQg.js → index.C40Nq5m8.js} +1 -1
- streamlit/static/static/js/{index.IavvuC7m.js → index.C8fg6FO8.js} +1 -1
- streamlit/static/static/js/{index.BAmLrdtI.js → index.CFRlw_Q4.js} +1 -1
- streamlit/static/static/js/{index.Dhp14dRq.js → index.CNXi20U2.js} +1 -1
- streamlit/static/static/js/{index.D14DFzgI.js → index.CTdvJfB7.js} +1 -1
- streamlit/static/static/js/{index.DryfJqoc.js → index.CggOKbv5.js} +1 -1
- streamlit/static/static/js/{index.DaMZ1GDB.js → index.CoOQHuCm.js} +1 -1
- streamlit/static/static/js/{index.DWULc3YI.js → index.CqMzbjp5.js} +1 -1
- streamlit/static/static/js/{index.MwqhcWcl.js → index.D3xfIqy_.js} +1 -1
- streamlit/static/static/js/{index.DgfqdWkR.js → index.D5m5f2G-.js} +1 -1
- streamlit/static/static/js/{index.mykhZq0V.js → index.D67NXgZL.js} +1 -1
- streamlit/static/static/js/{index.ZSnCX0Ea.js → index.D9DEa36h.js} +1 -1
- streamlit/static/static/js/{index.DvTvKaqe.js → index.DEUimtV1.js} +1 -1
- streamlit/static/static/js/{index.DzIOW22k.js → index.DF31ixLt.js} +1 -1
- streamlit/static/static/js/{index.BKpNjc6p.js → index.DK27W5ov.js} +1 -1
- streamlit/static/static/js/{index.CS3tpmQq.js → index.DQm9mE0T.js} +4 -4
- streamlit/static/static/js/{index.LEwNBspG.js → index.DWUM7LrZ.js} +1 -1
- streamlit/static/static/js/{index.DieTLIPJ.js → index.DYR3j5ZF.js} +1 -1
- streamlit/static/static/js/{index.D_ifDEh-.js → index.DaxZAmvz.js} +1 -1
- streamlit/static/static/js/{index.DaVDJgbA.js → index.Dodgg4y_.js} +1 -1
- streamlit/static/static/js/{index.CoNSg7Jn.js → index.Dq9InAZx.js} +1 -1
- streamlit/static/static/js/{index.CjByu9X-.js → index.DtZbhbEr.js} +1 -1
- streamlit/static/static/js/{index.wNqPEQUk.js → index.DzWfLgsQ.js} +1 -1
- streamlit/static/static/js/{index.12y0V79l.js → index.HrvNEmn1.js} +1 -1
- streamlit/static/static/js/{index.CPwKghBv.js → index.Zx7pc4Ib.js} +1 -1
- streamlit/static/static/js/{index.CQhTluFq.js → index.f-UZuoZE.js} +1 -1
- streamlit/static/static/js/{index.DfbB_5Z-.js → index.qg9M6uCh.js} +1 -1
- streamlit/static/static/js/{index.B-4FZ0nj.js → index.s88CwlpG.js} +5 -5
- streamlit/static/static/js/{index.DRnQbU3d.js → index.zN5Ficl0.js} +1 -1
- streamlit/static/static/js/{input.C1Qtlpog.js → input.DnsJ8I9O.js} +1 -1
- streamlit/static/static/js/{main.Bmkh5wwK.js → main.Cs9yv8mP.js} +1 -1
- streamlit/static/static/js/{memory.sbgNT5rv.js → memory.CnMAyKwP.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.enfKgE8B.js → number-overlay-editor.CMfbFJmW.js} +1 -1
- streamlit/static/static/js/{pandasStylerUtils.CTK2ZjDI.js → pandasStylerUtils.pLaEIPZw.js} +1 -1
- streamlit/static/static/js/{sandbox.DgbnlVWB.js → sandbox.BcdOGz3D.js} +1 -1
- streamlit/static/static/js/{styled-components.CUUmYQ6I.js → styled-components.571s8DEN.js} +1 -1
- streamlit/static/static/js/{throttle.BMPv1eQF.js → throttle.DM63_0Ui.js} +1 -1
- streamlit/static/static/js/{timepicker.A5q0vGni.js → timepicker.pd9YKJun.js} +1 -1
- streamlit/static/static/js/{toConsumableArray.BQcscadC.js → toConsumableArray.C-vxP4eC.js} +1 -1
- streamlit/static/static/js/uniqueId.Cx7-DRlG.js +1 -0
- streamlit/static/static/js/{useBasicWidgetState.DxPSDiCY.js → useBasicWidgetState.S1_DeDAF.js} +1 -1
- streamlit/static/static/js/{useIntlLocale.BZEYz-Gh.js → useIntlLocale.BwbkZTj-.js} +1 -1
- streamlit/static/static/js/{useTextInputAutoExpand.BcX0HWJh.js → useTextInputAutoExpand.DJy7lTuU.js} +1 -1
- streamlit/static/static/js/{useUpdateUiValue.BIOar76Q.js → useUpdateUiValue.KsXqwLCs.js} +1 -1
- streamlit/static/static/js/{useWaveformController.Bk9pA3uJ.js → useWaveformController.DQSftrKy.js} +1 -1
- streamlit/static/static/js/{withCalculatedWidth.Coni8MnB.js → withCalculatedWidth.Cf1aBuuB.js} +1 -1
- streamlit/static/static/js/{withFullScreenWrapper.CxRdMHFu.js → withFullScreenWrapper.BBQ6--wm.js} +1 -1
- streamlit/user_info.py +10 -0
- {streamlit_nightly-1.52.3.dev20251228.dist-info → streamlit_nightly-1.52.3.dev20251231.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.52.3.dev20251228.dist-info → streamlit_nightly-1.52.3.dev20251231.dist-info}/RECORD +96 -96
- streamlit/static/static/js/index.DMWRX2hh.js +0 -1
- streamlit/static/static/js/uniqueId.C-ekQlC4.js +0 -1
- {streamlit_nightly-1.52.3.dev20251228.data → streamlit_nightly-1.52.3.dev20251231.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.52.3.dev20251228.dist-info → streamlit_nightly-1.52.3.dev20251231.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.52.3.dev20251228.dist-info → streamlit_nightly-1.52.3.dev20251231.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.52.3.dev20251228.dist-info → streamlit_nightly-1.52.3.dev20251231.dist-info}/top_level.txt +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index.
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index.HrvNEmn1.js","./index.bsVAaBS1.js","./index.CqMzbjp5.js","./index.CNXi20U2.js","./index.Bd9Ju7cE.js","./index.D5m5f2G-.js","./StreamlitSyntaxHighlighter.D6tqIUNe.js","./index.f-UZuoZE.js","./pandasStylerUtils.pLaEIPZw.js","./moment.C7qA8nIE.js","./numbro.B9_PXfzp.js","./_baseIndexOf.BTknn6Gb.js","./index.qg9M6uCh.js","./withFullScreenWrapper.BBQ6--wm.js","./Toolbar.COFccaTT.js","./index.s88CwlpG.js","./FormClearHelper.CcrsaZUN.js","./index.8HslT92O.js","./main.Cs9yv8mP.js","./throttle.DM63_0Ui.js","./formatNumber.CtWVEKkt.js","./sprintf.DpPCfzXw.js","./formatMoment.C6Hwn6X5.js","./checkbox.SvhUmEPl.js","./createDownloadLinkElement.mdzy2wqu.js","./toConsumableArray.C-vxP4eC.js","./FileDownload.esm.DYcl0HsS.js","./_arrayIncludes.B19Iyn2B.js","../css/index.DgR7E2CV.css","./embed.CjSf3HQ8.js","./threshold.CUNQbqMA.js","./value.DaKxGC7O.js","./timer.BZio6gjG.js","./TableChart.esm.BsEqAKaW.js","./index.BPDinT9W.js","./Particles.C1lQDBme.js","./index.DF31ixLt.js","./useBasicWidgetState.S1_DeDAF.js","../css/index.BuwrT-ty.css","./index.BE-_bdmf.js","./index.8I6SAQDm.js","./IFrameUtil.DefezniK.js","./index.DK27W5ov.js","./index.DaxZAmvz.js","./index.BWYs56td.js","./iconPosition.Docx9KVT.js","./index.CFRlw_Q4.js","./WidgetLabelHelpIconInline.tetiwgyt.js","./index.BakUx9hH.js","./index.8C-cS-O4.js","./index.BukrvZZ2.js","./ProgressBar.D54tj-jr.js","./index.DtZbhbEr.js","./index.Dq9InAZx.js","./useWaveformController.DQSftrKy.js","./urls.BwSlolu9.js","./index.BWwP9fh8.js","./index.-Uw_gjRk.js","./index.3BdSdx9Q.js","./withCalculatedWidth.Cf1aBuuB.js","./index.DWUM7LrZ.js","./UploadFileInfo.Dr-zDST7.js","./index.D67NXgZL.js","./FileHelper.BG4elCiu.js","./InputInstructions.B-hrhnKS.js","./useTextInputAutoExpand.DJy7lTuU.js","./base-input.bCQ8S-FY.js","./inputUtils.CptNuJwn.js","./ErrorOutline.esm.bKqSjdNS.js","./index.BZFLbiyp.js","./index.BkQCUqLQ.js","./index.CggOKbv5.js","./useIntlLocale.BwbkZTj-.js","./timepicker.pd9YKJun.js","./input.DnsJ8I9O.js","./index.2hZ1_TTv.js","./styled-components.571s8DEN.js","./index.Dodgg4y_.js","./index.D3xfIqy_.js","./index.B-k1aQD6.js","./index.Zx7pc4Ib.js","./index.C3MpZoqE.js","./uniqueId.Cx7-DRlG.js","./index.DzWfLgsQ.js","./index.DYR3j5ZF.js","./index.CTdvJfB7.js","./index.C40Nq5m8.js","./useUpdateUiValue.KsXqwLCs.js","./index.B-2OnxuC.js","./index.B4jgy50K.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
function _mergeNamespaces(n,i){for(var e=0;e<i.length;e++){const t=i[e];if(typeof t!="string"&&!Array.isArray(t)){for(const o in t)if(o!=="default"&&!(o in n)){const d=Object.getOwnPropertyDescriptor(t,o);d&&Object.defineProperty(n,o,d.get?d:{enumerable:!0,get:()=>t[o]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))t(o);new MutationObserver(o=>{for(const d of o)if(d.type==="childList")for(const p of d.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&t(p)}).observe(document,{childList:!0,subtree:!0});function e(o){const d={};return o.integrity&&(d.integrity=o.integrity),o.referrerPolicy&&(d.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?d.credentials="include":o.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function t(o){if(o.ep)return;o.ep=!0;const d=e(o);fetch(o.href,d)}})();var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function getAugmentedNamespace(n){if(Object.prototype.hasOwnProperty.call(n,"__esModule"))return n;var i=n.default;if(typeof i=="function"){var e=function t(){var o=!1;try{o=this instanceof t}catch{}return o?Reflect.construct(i,arguments,this.constructor):i.apply(this,arguments)};e.prototype=i.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(n).forEach(function(t){var o=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,o.get?o:{enumerable:!0,get:function(){return n[t]}})}),e}var jsxRuntime={exports:{}},reactJsxRuntime_production_min={},react={exports:{}},react_production_min={};var hasRequiredReact_production_min;function requireReact_production_min(){if(hasRequiredReact_production_min)return react_production_min;hasRequiredReact_production_min=1;var n=Symbol.for("react.element"),i=Symbol.for("react.portal"),e=Symbol.for("react.fragment"),t=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),d=Symbol.for("react.provider"),p=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),$=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),M=Symbol.iterator;function H(qe){return qe===null||typeof qe!="object"?null:(qe=M&&qe[M]||qe["@@iterator"],typeof qe=="function"?qe:null)}var Z={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},be=Object.assign,ye={};function we(qe,rt,He){this.props=qe,this.context=rt,this.refs=ye,this.updater=He||Z}we.prototype.isReactComponent={},we.prototype.setState=function(qe,rt){if(typeof qe!="object"&&typeof qe!="function"&&qe!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,qe,rt,"setState")},we.prototype.forceUpdate=function(qe){this.updater.enqueueForceUpdate(this,qe,"forceUpdate")};function xe(){}xe.prototype=we.prototype;function Ce(qe,rt,He){this.props=qe,this.context=rt,this.refs=ye,this.updater=He||Z}var Ne=Ce.prototype=new xe;Ne.constructor=Ce,be(Ne,we.prototype),Ne.isPureReactComponent=!0;var Fe=Array.isArray,Me=Object.prototype.hasOwnProperty,Le={current:null},ze={key:!0,ref:!0,__self:!0,__source:!0};function Ke(qe,rt,He){var Ot,Ct={},tt=null,wt=null;if(rt!=null)for(Ot in rt.ref!==void 0&&(wt=rt.ref),rt.key!==void 0&&(tt=""+rt.key),rt)Me.call(rt,Ot)&&!ze.hasOwnProperty(Ot)&&(Ct[Ot]=rt[Ot]);var gt=arguments.length-2;if(gt===1)Ct.children=He;else if(1<gt){for(var $t=Array(gt),Mt=0;Mt<gt;Mt++)$t[Mt]=arguments[Mt+2];Ct.children=$t}if(qe&&qe.defaultProps)for(Ot in gt=qe.defaultProps,gt)Ct[Ot]===void 0&&(Ct[Ot]=gt[Ot]);return{$$typeof:n,type:qe,key:tt,ref:wt,props:Ct,_owner:Le.current}}function Ve(qe,rt){return{$$typeof:n,type:qe.type,key:rt,ref:qe.ref,props:qe.props,_owner:qe._owner}}function je(qe){return typeof qe=="object"&&qe!==null&&qe.$$typeof===n}function We(qe){var rt={"=":"=0",":":"=2"};return"$"+qe.replace(/[=:]/g,function(He){return rt[He]})}var Xe=/\/+/g;function Qe(qe,rt){return typeof qe=="object"&&qe!==null&&qe.key!=null?We(""+qe.key):rt.toString(36)}function Ye(qe,rt,He,Ot,Ct){var tt=typeof qe;(tt==="undefined"||tt==="boolean")&&(qe=null);var wt=!1;if(qe===null)wt=!0;else switch(tt){case"string":case"number":wt=!0;break;case"object":switch(qe.$$typeof){case n:case i:wt=!0}}if(wt)return wt=qe,Ct=Ct(wt),qe=Ot===""?"."+Qe(wt,0):Ot,Fe(Ct)?(He="",qe!=null&&(He=qe.replace(Xe,"$&/")+"/"),Ye(Ct,rt,He,"",function(Mt){return Mt})):Ct!=null&&(je(Ct)&&(Ct=Ve(Ct,He+(!Ct.key||wt&&wt.key===Ct.key?"":(""+Ct.key).replace(Xe,"$&/")+"/")+qe)),rt.push(Ct)),1;if(wt=0,Ot=Ot===""?".":Ot+":",Fe(qe))for(var gt=0;gt<qe.length;gt++){tt=qe[gt];var $t=Ot+Qe(tt,gt);wt+=Ye(tt,rt,He,$t,Ct)}else if($t=H(qe),typeof $t=="function")for(qe=$t.call(qe),gt=0;!(tt=qe.next()).done;)tt=tt.value,$t=Ot+Qe(tt,gt++),wt+=Ye(tt,rt,He,$t,Ct);else if(tt==="object")throw rt=String(qe),Error("Objects are not valid as a React child (found: "+(rt==="[object Object]"?"object with keys {"+Object.keys(qe).join(", ")+"}":rt)+"). If you meant to render a collection of children, use an array instead.");return wt}function Ue(qe,rt,He){if(qe==null)return qe;var Ot=[],Ct=0;return Ye(qe,Ot,"","",function(tt){return rt.call(He,tt,Ct++)}),Ot}function ot(qe){if(qe._status===-1){var rt=qe._result;rt=rt(),rt.then(function(He){(qe._status===0||qe._status===-1)&&(qe._status=1,qe._result=He)},function(He){(qe._status===0||qe._status===-1)&&(qe._status=2,qe._result=He)}),qe._status===-1&&(qe._status=0,qe._result=rt)}if(qe._status===1)return qe._result.default;throw qe._result}var dt={current:null},st={transition:null},pt={ReactCurrentDispatcher:dt,ReactCurrentBatchConfig:st,ReactCurrentOwner:Le};function Be(){throw Error("act(...) is not supported in production builds of React.")}return react_production_min.Children={map:Ue,forEach:function(qe,rt,He){Ue(qe,function(){rt.apply(this,arguments)},He)},count:function(qe){var rt=0;return Ue(qe,function(){rt++}),rt},toArray:function(qe){return Ue(qe,function(rt){return rt})||[]},only:function(qe){if(!je(qe))throw Error("React.Children.only expected to receive a single React element child.");return qe}},react_production_min.Component=we,react_production_min.Fragment=e,react_production_min.Profiler=o,react_production_min.PureComponent=Ce,react_production_min.StrictMode=t,react_production_min.Suspense=y,react_production_min.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=pt,react_production_min.act=Be,react_production_min.cloneElement=function(qe,rt,He){if(qe==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+qe+".");var Ot=be({},qe.props),Ct=qe.key,tt=qe.ref,wt=qe._owner;if(rt!=null){if(rt.ref!==void 0&&(tt=rt.ref,wt=Le.current),rt.key!==void 0&&(Ct=""+rt.key),qe.type&&qe.type.defaultProps)var gt=qe.type.defaultProps;for($t in rt)Me.call(rt,$t)&&!ze.hasOwnProperty($t)&&(Ot[$t]=rt[$t]===void 0&>!==void 0?gt[$t]:rt[$t])}var $t=arguments.length-2;if($t===1)Ot.children=He;else if(1<$t){gt=Array($t);for(var Mt=0;Mt<$t;Mt++)gt[Mt]=arguments[Mt+2];Ot.children=gt}return{$$typeof:n,type:qe.type,key:Ct,ref:tt,props:Ot,_owner:wt}},react_production_min.createContext=function(qe){return qe={$$typeof:p,_currentValue:qe,_currentValue2:qe,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},qe.Provider={$$typeof:d,_context:qe},qe.Consumer=qe},react_production_min.createElement=Ke,react_production_min.createFactory=function(qe){var rt=Ke.bind(null,qe);return rt.type=qe,rt},react_production_min.createRef=function(){return{current:null}},react_production_min.forwardRef=function(qe){return{$$typeof:h,render:qe}},react_production_min.isValidElement=je,react_production_min.lazy=function(qe){return{$$typeof:E,_payload:{_status:-1,_result:qe},_init:ot}},react_production_min.memo=function(qe,rt){return{$$typeof:$,type:qe,compare:rt===void 0?null:rt}},react_production_min.startTransition=function(qe){var rt=st.transition;st.transition={};try{qe()}finally{st.transition=rt}},react_production_min.unstable_act=Be,react_production_min.useCallback=function(qe,rt){return dt.current.useCallback(qe,rt)},react_production_min.useContext=function(qe){return dt.current.useContext(qe)},react_production_min.useDebugValue=function(){},react_production_min.useDeferredValue=function(qe){return dt.current.useDeferredValue(qe)},react_production_min.useEffect=function(qe,rt){return dt.current.useEffect(qe,rt)},react_production_min.useId=function(){return dt.current.useId()},react_production_min.useImperativeHandle=function(qe,rt,He){return dt.current.useImperativeHandle(qe,rt,He)},react_production_min.useInsertionEffect=function(qe,rt){return dt.current.useInsertionEffect(qe,rt)},react_production_min.useLayoutEffect=function(qe,rt){return dt.current.useLayoutEffect(qe,rt)},react_production_min.useMemo=function(qe,rt){return dt.current.useMemo(qe,rt)},react_production_min.useReducer=function(qe,rt,He){return dt.current.useReducer(qe,rt,He)},react_production_min.useRef=function(qe){return dt.current.useRef(qe)},react_production_min.useState=function(qe){return dt.current.useState(qe)},react_production_min.useSyncExternalStore=function(qe,rt,He){return dt.current.useSyncExternalStore(qe,rt,He)},react_production_min.useTransition=function(){return dt.current.useTransition()},react_production_min.version="18.3.1",react_production_min}var hasRequiredReact;function requireReact(){return hasRequiredReact||(hasRequiredReact=1,react.exports=requireReact_production_min()),react.exports}var hasRequiredReactJsxRuntime_production_min;function requireReactJsxRuntime_production_min(){if(hasRequiredReactJsxRuntime_production_min)return reactJsxRuntime_production_min;hasRequiredReactJsxRuntime_production_min=1;var n=requireReact(),i=Symbol.for("react.element"),e=Symbol.for("react.fragment"),t=Object.prototype.hasOwnProperty,o=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,d={key:!0,ref:!0,__self:!0,__source:!0};function p(h,y,$){var E,M={},H=null,Z=null;$!==void 0&&(H=""+$),y.key!==void 0&&(H=""+y.key),y.ref!==void 0&&(Z=y.ref);for(E in y)t.call(y,E)&&!d.hasOwnProperty(E)&&(M[E]=y[E]);if(h&&h.defaultProps)for(E in y=h.defaultProps,y)M[E]===void 0&&(M[E]=y[E]);return{$$typeof:i,type:h,key:H,ref:Z,props:M,_owner:o.current}}return reactJsxRuntime_production_min.Fragment=e,reactJsxRuntime_production_min.jsx=p,reactJsxRuntime_production_min.jsxs=p,reactJsxRuntime_production_min}var hasRequiredJsxRuntime;function requireJsxRuntime(){return hasRequiredJsxRuntime||(hasRequiredJsxRuntime=1,jsxRuntime.exports=requireReactJsxRuntime_production_min()),jsxRuntime.exports}var jsxRuntimeExports=requireJsxRuntime(),reactExports=requireReact();const React=getDefaultExportFromCjs(reactExports),React$1=_mergeNamespaces({__proto__:null,default:React},[reactExports]);function sheetForTag(n){if(n.sheet)return n.sheet;for(var i=0;i<document.styleSheets.length;i++)if(document.styleSheets[i].ownerNode===n)return document.styleSheets[i]}function createStyleElement(n){var i=document.createElement("style");return i.setAttribute("data-emotion",n.key),n.nonce!==void 0&&i.setAttribute("nonce",n.nonce),i.appendChild(document.createTextNode("")),i.setAttribute("data-s",""),i}var StyleSheet=(function(){function n(e){var t=this;this._insertTag=function(o){var d;t.tags.length===0?t.insertionPoint?d=t.insertionPoint.nextSibling:t.prepend?d=t.container.firstChild:d=t.before:d=t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(o,d),t.tags.push(o)},this.isSpeedy=e.speedy===void 0?!0:e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var i=n.prototype;return i.hydrate=function(t){t.forEach(this._insertTag)},i.insert=function(t){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(createStyleElement(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var d=sheetForTag(o);try{d.insertRule(t,d.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(t));this.ctr++},i.flush=function(){this.tags.forEach(function(t){var o;return(o=t.parentNode)==null?void 0:o.removeChild(t)}),this.tags=[],this.ctr=0},n})(),MS="-ms-",MOZ="-moz-",WEBKIT="-webkit-",COMMENT="comm",RULESET="rule",DECLARATION="decl",IMPORT="@import",KEYFRAMES="@keyframes",LAYER="@layer",abs=Math.abs,from=String.fromCharCode,assign$1=Object.assign;function hash$1(n,i){return charat(n,0)^45?(((i<<2^charat(n,0))<<2^charat(n,1))<<2^charat(n,2))<<2^charat(n,3):0}function trim(n){return n.trim()}function match(n,i){return(n=i.exec(n))?n[0]:n}function replace$1(n,i,e){return n.replace(i,e)}function indexof(n,i){return n.indexOf(i)}function charat(n,i){return n.charCodeAt(i)|0}function substr(n,i,e){return n.slice(i,e)}function strlen(n){return n.length}function sizeof(n){return n.length}function append(n,i){return i.push(n),n}function combine(n,i){return n.map(i).join("")}var line=1,column=1,length=0,position$3=0,character=0,characters="";function node$1(n,i,e,t,o,d,p){return{value:n,root:i,parent:e,type:t,props:o,children:d,line,column,length:p,return:""}}function copy(n,i){return assign$1(node$1("",null,null,"",null,null,0),n,{length:-n.length},i)}function char(){return character}function prev(){return character=position$3>0?charat(characters,--position$3):0,column--,character===10&&(column=1,line--),character}function next(){return character=position$3<length?charat(characters,position$3++):0,column++,character===10&&(column=1,line++),character}function peek$1(){return charat(characters,position$3)}function caret(){return position$3}function slice(n,i){return substr(characters,n,i)}function token(n){switch(n){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function alloc(n){return line=column=1,length=strlen(characters=n),position$3=0,[]}function dealloc(n){return characters="",n}function delimit(n){return trim(slice(position$3-1,delimiter(n===91?n+2:n===40?n+1:n)))}function whitespace$1(n){for(;(character=peek$1())&&character<33;)next();return token(n)>2||token(character)>3?"":" "}function escaping(n,i){for(;--i&&next()&&!(character<48||character>102||character>57&&character<65||character>70&&character<97););return slice(n,caret()+(i<6&&peek$1()==32&&next()==32))}function delimiter(n){for(;next();)switch(character){case n:return position$3;case 34:case 39:n!==34&&n!==39&&delimiter(character);break;case 40:n===41&&delimiter(n);break;case 92:next();break}return position$3}function commenter(n,i){for(;next()&&n+character!==57;)if(n+character===84&&peek$1()===47)break;return"/*"+slice(i,position$3-1)+"*"+from(n===47?n:next())}function identifier(n){for(;!token(peek$1());)next();return slice(n,position$3)}function compile(n){return dealloc(parse$3("",null,null,null,[""],n=alloc(n),0,[0],n))}function parse$3(n,i,e,t,o,d,p,h,y){for(var $=0,E=0,M=p,H=0,Z=0,be=0,ye=1,we=1,xe=1,Ce=0,Ne="",Fe=o,Me=d,Le=t,ze=Ne;we;)switch(be=Ce,Ce=next()){case 40:if(be!=108&&charat(ze,M-1)==58){indexof(ze+=replace$1(delimit(Ce),"&","&\f"),"&\f")!=-1&&(xe=-1);break}case 34:case 39:case 91:ze+=delimit(Ce);break;case 9:case 10:case 13:case 32:ze+=whitespace$1(be);break;case 92:ze+=escaping(caret()-1,7);continue;case 47:switch(peek$1()){case 42:case 47:append(comment(commenter(next(),caret()),i,e),y);break;default:ze+="/"}break;case 123*ye:h[$++]=strlen(ze)*xe;case 125*ye:case 59:case 0:switch(Ce){case 0:case 125:we=0;case 59+E:xe==-1&&(ze=replace$1(ze,/\f/g,"")),Z>0&&strlen(ze)-M&&append(Z>32?declaration(ze+";",t,e,M-1):declaration(replace$1(ze," ","")+";",t,e,M-2),y);break;case 59:ze+=";";default:if(append(Le=ruleset(ze,i,e,$,E,o,h,Ne,Fe=[],Me=[],M),d),Ce===123)if(E===0)parse$3(ze,i,Le,Le,Fe,d,M,h,Me);else switch(H===99&&charat(ze,3)===110?100:H){case 100:case 108:case 109:case 115:parse$3(n,Le,Le,t&&append(ruleset(n,Le,Le,0,0,o,h,Ne,o,Fe=[],M),Me),o,Me,M,h,t?Fe:Me);break;default:parse$3(ze,Le,Le,Le,[""],Me,0,h,Me)}}$=E=Z=0,ye=xe=1,Ne=ze="",M=p;break;case 58:M=1+strlen(ze),Z=be;default:if(ye<1){if(Ce==123)--ye;else if(Ce==125&&ye++==0&&prev()==125)continue}switch(ze+=from(Ce),Ce*ye){case 38:xe=E>0?1:(ze+="\f",-1);break;case 44:h[$++]=(strlen(ze)-1)*xe,xe=1;break;case 64:peek$1()===45&&(ze+=delimit(next())),H=peek$1(),E=M=strlen(Ne=ze+=identifier(caret())),Ce++;break;case 45:be===45&&strlen(ze)==2&&(ye=0)}}return d}function ruleset(n,i,e,t,o,d,p,h,y,$,E){for(var M=o-1,H=o===0?d:[""],Z=sizeof(H),be=0,ye=0,we=0;be<t;++be)for(var xe=0,Ce=substr(n,M+1,M=abs(ye=p[be])),Ne=n;xe<Z;++xe)(Ne=trim(ye>0?H[xe]+" "+Ce:replace$1(Ce,/&\f/g,H[xe])))&&(y[we++]=Ne);return node$1(n,i,e,o===0?RULESET:h,y,$,E)}function comment(n,i,e){return node$1(n,i,e,COMMENT,from(char()),substr(n,2,-2),0)}function declaration(n,i,e,t){return node$1(n,i,e,DECLARATION,substr(n,0,t),substr(n,t+1,-1),t)}function serialize$2(n,i){for(var e="",t=sizeof(n),o=0;o<t;o++)e+=i(n[o],o,n,i)||"";return e}function stringify$2(n,i,e,t){switch(n.type){case LAYER:if(n.children.length)break;case IMPORT:case DECLARATION:return n.return=n.return||n.value;case COMMENT:return"";case KEYFRAMES:return n.return=n.value+"{"+serialize$2(n.children,t)+"}";case RULESET:n.value=n.props.join(",")}return strlen(e=serialize$2(n.children,t))?n.return=n.value+"{"+e+"}":""}function middleware(n){var i=sizeof(n);return function(e,t,o,d){for(var p="",h=0;h<i;h++)p+=n[h](e,t,o,d)||"";return p}}function rulesheet(n){return function(i){i.root||(i=i.return)&&n(i)}}var weakMemoize=function(i){var e=new WeakMap;return function(t){if(e.has(t))return e.get(t);var o=i(t);return e.set(t,o),o}};function memoize$1(n){var i=Object.create(null);return function(e){return i[e]===void 0&&(i[e]=n(e)),i[e]}}var identifierWithPointTracking=function(i,e,t){for(var o=0,d=0;o=d,d=peek$1(),o===38&&d===12&&(e[t]=1),!token(d);)next();return slice(i,position$3)},toRules=function(i,e){var t=-1,o=44;do switch(token(o)){case 0:o===38&&peek$1()===12&&(e[t]=1),i[t]+=identifierWithPointTracking(position$3-1,e,t);break;case 2:i[t]+=delimit(o);break;case 4:if(o===44){i[++t]=peek$1()===58?"&\f":"",e[t]=i[t].length;break}default:i[t]+=from(o)}while(o=next());return i},getRules=function(i,e){return dealloc(toRules(alloc(i),e))},fixedElements=new WeakMap,compat=function(i){if(!(i.type!=="rule"||!i.parent||i.length<1)){for(var e=i.value,t=i.parent,o=i.column===t.column&&i.line===t.line;t.type!=="rule";)if(t=t.parent,!t)return;if(!(i.props.length===1&&e.charCodeAt(0)!==58&&!fixedElements.get(t))&&!o){fixedElements.set(i,!0);for(var d=[],p=getRules(e,d),h=t.props,y=0,$=0;y<p.length;y++)for(var E=0;E<h.length;E++,$++)i.props[$]=d[y]?p[y].replace(/&\f/g,h[E]):h[E]+" "+p[y]}}},removeLabel=function(i){if(i.type==="decl"){var e=i.value;e.charCodeAt(0)===108&&e.charCodeAt(2)===98&&(i.return="",i.value="")}};function prefix$1(n,i){switch(hash$1(n,i)){case 5103:return WEBKIT+"print-"+n+n;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return WEBKIT+n+n;case 5349:case 4246:case 4810:case 6968:case 2756:return WEBKIT+n+MOZ+n+MS+n+n;case 6828:case 4268:return WEBKIT+n+MS+n+n;case 6165:return WEBKIT+n+MS+"flex-"+n+n;case 5187:return WEBKIT+n+replace$1(n,/(\w+).+(:[^]+)/,WEBKIT+"box-$1$2"+MS+"flex-$1$2")+n;case 5443:return WEBKIT+n+MS+"flex-item-"+replace$1(n,/flex-|-self/,"")+n;case 4675:return WEBKIT+n+MS+"flex-line-pack"+replace$1(n,/align-content|flex-|-self/,"")+n;case 5548:return WEBKIT+n+MS+replace$1(n,"shrink","negative")+n;case 5292:return WEBKIT+n+MS+replace$1(n,"basis","preferred-size")+n;case 6060:return WEBKIT+"box-"+replace$1(n,"-grow","")+WEBKIT+n+MS+replace$1(n,"grow","positive")+n;case 4554:return WEBKIT+replace$1(n,/([^-])(transform)/g,"$1"+WEBKIT+"$2")+n;case 6187:return replace$1(replace$1(replace$1(n,/(zoom-|grab)/,WEBKIT+"$1"),/(image-set)/,WEBKIT+"$1"),n,"")+n;case 5495:case 3959:return replace$1(n,/(image-set\([^]*)/,WEBKIT+"$1$`$1");case 4968:return replace$1(replace$1(n,/(.+:)(flex-)?(.*)/,WEBKIT+"box-pack:$3"+MS+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+WEBKIT+n+n;case 4095:case 3583:case 4068:case 2532:return replace$1(n,/(.+)-inline(.+)/,WEBKIT+"$1$2")+n;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(strlen(n)-1-i>6)switch(charat(n,i+1)){case 109:if(charat(n,i+4)!==45)break;case 102:return replace$1(n,/(.+:)(.+)-([^]+)/,"$1"+WEBKIT+"$2-$3$1"+MOZ+(charat(n,i+3)==108?"$3":"$2-$3"))+n;case 115:return~indexof(n,"stretch")?prefix$1(replace$1(n,"stretch","fill-available"),i)+n:n}break;case 4949:if(charat(n,i+1)!==115)break;case 6444:switch(charat(n,strlen(n)-3-(~indexof(n,"!important")&&10))){case 107:return replace$1(n,":",":"+WEBKIT)+n;case 101:return replace$1(n,/(.+:)([^;!]+)(;|!.+)?/,"$1"+WEBKIT+(charat(n,14)===45?"inline-":"")+"box$3$1"+WEBKIT+"$2$3$1"+MS+"$2box$3")+n}break;case 5936:switch(charat(n,i+11)){case 114:return WEBKIT+n+MS+replace$1(n,/[svh]\w+-[tblr]{2}/,"tb")+n;case 108:return WEBKIT+n+MS+replace$1(n,/[svh]\w+-[tblr]{2}/,"tb-rl")+n;case 45:return WEBKIT+n+MS+replace$1(n,/[svh]\w+-[tblr]{2}/,"lr")+n}return WEBKIT+n+MS+n+n}return n}var prefixer=function(i,e,t,o){if(i.length>-1&&!i.return)switch(i.type){case DECLARATION:i.return=prefix$1(i.value,i.length);break;case KEYFRAMES:return serialize$2([copy(i,{value:replace$1(i.value,"@","@"+WEBKIT)})],o);case RULESET:if(i.length)return combine(i.props,function(d){switch(match(d,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return serialize$2([copy(i,{props:[replace$1(d,/:(read-\w+)/,":"+MOZ+"$1")]})],o);case"::placeholder":return serialize$2([copy(i,{props:[replace$1(d,/:(plac\w+)/,":"+WEBKIT+"input-$1")]}),copy(i,{props:[replace$1(d,/:(plac\w+)/,":"+MOZ+"$1")]}),copy(i,{props:[replace$1(d,/:(plac\w+)/,MS+"input-$1")]})],o)}return""})}},defaultStylisPlugins=[prefixer],createCache=function(i){var e=i.key;if(e==="css"){var t=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(t,function(ye){var we=ye.getAttribute("data-emotion");we.indexOf(" ")!==-1&&(document.head.appendChild(ye),ye.setAttribute("data-s",""))})}var o=i.stylisPlugins||defaultStylisPlugins,d={},p,h=[];p=i.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+e+' "]'),function(ye){for(var we=ye.getAttribute("data-emotion").split(" "),xe=1;xe<we.length;xe++)d[we[xe]]=!0;h.push(ye)});var y,$=[compat,removeLabel];{var E,M=[stringify$2,rulesheet(function(ye){E.insert(ye)})],H=middleware($.concat(o,M)),Z=function(we){return serialize$2(compile(we),H)};y=function(we,xe,Ce,Ne){E=Ce,Z(we?we+"{"+xe.styles+"}":xe.styles),Ne&&(be.inserted[xe.name]=!0)}}var be={key:e,sheet:new StyleSheet({key:e,container:p,nonce:i.nonce,speedy:i.speedy,prepend:i.prepend,insertionPoint:i.insertionPoint}),nonce:i.nonce,inserted:d,registered:{},insert:y};return be.sheet.hydrate(h),be};function _extends$A(){return _extends$A=Object.assign?Object.assign.bind():function(n){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var t in e)({}).hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n},_extends$A.apply(null,arguments)}var reactIs$1={exports:{}},reactIs_production_min$1={};var hasRequiredReactIs_production_min$1;function requireReactIs_production_min$1(){if(hasRequiredReactIs_production_min$1)return reactIs_production_min$1;hasRequiredReactIs_production_min$1=1;var n=typeof Symbol=="function"&&Symbol.for,i=n?Symbol.for("react.element"):60103,e=n?Symbol.for("react.portal"):60106,t=n?Symbol.for("react.fragment"):60107,o=n?Symbol.for("react.strict_mode"):60108,d=n?Symbol.for("react.profiler"):60114,p=n?Symbol.for("react.provider"):60109,h=n?Symbol.for("react.context"):60110,y=n?Symbol.for("react.async_mode"):60111,$=n?Symbol.for("react.concurrent_mode"):60111,E=n?Symbol.for("react.forward_ref"):60112,M=n?Symbol.for("react.suspense"):60113,H=n?Symbol.for("react.suspense_list"):60120,Z=n?Symbol.for("react.memo"):60115,be=n?Symbol.for("react.lazy"):60116,ye=n?Symbol.for("react.block"):60121,we=n?Symbol.for("react.fundamental"):60117,xe=n?Symbol.for("react.responder"):60118,Ce=n?Symbol.for("react.scope"):60119;function Ne(Me){if(typeof Me=="object"&&Me!==null){var Le=Me.$$typeof;switch(Le){case i:switch(Me=Me.type,Me){case y:case $:case t:case d:case o:case M:return Me;default:switch(Me=Me&&Me.$$typeof,Me){case h:case E:case be:case Z:case p:return Me;default:return Le}}case e:return Le}}}function Fe(Me){return Ne(Me)===$}return reactIs_production_min$1.AsyncMode=y,reactIs_production_min$1.ConcurrentMode=$,reactIs_production_min$1.ContextConsumer=h,reactIs_production_min$1.ContextProvider=p,reactIs_production_min$1.Element=i,reactIs_production_min$1.ForwardRef=E,reactIs_production_min$1.Fragment=t,reactIs_production_min$1.Lazy=be,reactIs_production_min$1.Memo=Z,reactIs_production_min$1.Portal=e,reactIs_production_min$1.Profiler=d,reactIs_production_min$1.StrictMode=o,reactIs_production_min$1.Suspense=M,reactIs_production_min$1.isAsyncMode=function(Me){return Fe(Me)||Ne(Me)===y},reactIs_production_min$1.isConcurrentMode=Fe,reactIs_production_min$1.isContextConsumer=function(Me){return Ne(Me)===h},reactIs_production_min$1.isContextProvider=function(Me){return Ne(Me)===p},reactIs_production_min$1.isElement=function(Me){return typeof Me=="object"&&Me!==null&&Me.$$typeof===i},reactIs_production_min$1.isForwardRef=function(Me){return Ne(Me)===E},reactIs_production_min$1.isFragment=function(Me){return Ne(Me)===t},reactIs_production_min$1.isLazy=function(Me){return Ne(Me)===be},reactIs_production_min$1.isMemo=function(Me){return Ne(Me)===Z},reactIs_production_min$1.isPortal=function(Me){return Ne(Me)===e},reactIs_production_min$1.isProfiler=function(Me){return Ne(Me)===d},reactIs_production_min$1.isStrictMode=function(Me){return Ne(Me)===o},reactIs_production_min$1.isSuspense=function(Me){return Ne(Me)===M},reactIs_production_min$1.isValidElementType=function(Me){return typeof Me=="string"||typeof Me=="function"||Me===t||Me===$||Me===d||Me===o||Me===M||Me===H||typeof Me=="object"&&Me!==null&&(Me.$$typeof===be||Me.$$typeof===Z||Me.$$typeof===p||Me.$$typeof===h||Me.$$typeof===E||Me.$$typeof===we||Me.$$typeof===xe||Me.$$typeof===Ce||Me.$$typeof===ye)},reactIs_production_min$1.typeOf=Ne,reactIs_production_min$1}var hasRequiredReactIs$1;function requireReactIs$1(){return hasRequiredReactIs$1||(hasRequiredReactIs$1=1,reactIs$1.exports=requireReactIs_production_min$1()),reactIs$1.exports}var hoistNonReactStatics_cjs,hasRequiredHoistNonReactStatics_cjs;function requireHoistNonReactStatics_cjs(){if(hasRequiredHoistNonReactStatics_cjs)return hoistNonReactStatics_cjs;hasRequiredHoistNonReactStatics_cjs=1;var n=requireReactIs$1(),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},e={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},t={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},d={};d[n.ForwardRef]=t,d[n.Memo]=o;function p(be){return n.isMemo(be)?o:d[be.$$typeof]||i}var h=Object.defineProperty,y=Object.getOwnPropertyNames,$=Object.getOwnPropertySymbols,E=Object.getOwnPropertyDescriptor,M=Object.getPrototypeOf,H=Object.prototype;function Z(be,ye,we){if(typeof ye!="string"){if(H){var xe=M(ye);xe&&xe!==H&&Z(be,xe,we)}var Ce=y(ye);$&&(Ce=Ce.concat($(ye)));for(var Ne=p(be),Fe=p(ye),Me=0;Me<Ce.length;++Me){var Le=Ce[Me];if(!e[Le]&&!(we&&we[Le])&&!(Fe&&Fe[Le])&&!(Ne&&Ne[Le])){var ze=E(ye,Le);try{h(be,Le,ze)}catch{}}}}return be}return hoistNonReactStatics_cjs=Z,hoistNonReactStatics_cjs}var hoistNonReactStatics_cjsExports=requireHoistNonReactStatics_cjs();const hoistNonReactStatics=getDefaultExportFromCjs(hoistNonReactStatics_cjsExports);var isBrowser$2=!0;function getRegisteredStyles(n,i,e){var t="";return e.split(" ").forEach(function(o){n[o]!==void 0?i.push(n[o]+";"):o&&(t+=o+" ")}),t}var registerStyles=function(i,e,t){var o=i.key+"-"+e.name;(t===!1||isBrowser$2===!1)&&i.registered[o]===void 0&&(i.registered[o]=e.styles)},insertStyles=function(i,e,t){registerStyles(i,e,t);var o=i.key+"-"+e.name;if(i.inserted[e.name]===void 0){var d=e;do i.insert(e===d?"."+o:"",d,i.sheet,!0),d=d.next;while(d!==void 0)}};function murmur2(n){for(var i=0,e,t=0,o=n.length;o>=4;++t,o-=4)e=n.charCodeAt(t)&255|(n.charCodeAt(++t)&255)<<8|(n.charCodeAt(++t)&255)<<16|(n.charCodeAt(++t)&255)<<24,e=(e&65535)*1540483477+((e>>>16)*59797<<16),e^=e>>>24,i=(e&65535)*1540483477+((e>>>16)*59797<<16)^(i&65535)*1540483477+((i>>>16)*59797<<16);switch(o){case 3:i^=(n.charCodeAt(t+2)&255)<<16;case 2:i^=(n.charCodeAt(t+1)&255)<<8;case 1:i^=n.charCodeAt(t)&255,i=(i&65535)*1540483477+((i>>>16)*59797<<16)}return i^=i>>>13,i=(i&65535)*1540483477+((i>>>16)*59797<<16),((i^i>>>15)>>>0).toString(36)}var unitlessKeys={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},hyphenateRegex=/[A-Z]|^ms/g,animationRegex=/_EMO_([^_]+?)_([^]*?)_EMO_/g,isCustomProperty=function(i){return i.charCodeAt(1)===45},isProcessableValue=function(i){return i!=null&&typeof i!="boolean"},processStyleName=memoize$1(function(n){return isCustomProperty(n)?n:n.replace(hyphenateRegex,"-$&").toLowerCase()}),processStyleValue=function(i,e){switch(i){case"animation":case"animationName":if(typeof e=="string")return e.replace(animationRegex,function(t,o,d){return cursor$1={name:o,styles:d,next:cursor$1},o})}return unitlessKeys[i]!==1&&!isCustomProperty(i)&&typeof e=="number"&&e!==0?e+"px":e};function handleInterpolation(n,i,e){if(e==null)return"";var t=e;if(t.__emotion_styles!==void 0)return t;switch(typeof e){case"boolean":return"";case"object":{var o=e;if(o.anim===1)return cursor$1={name:o.name,styles:o.styles,next:cursor$1},o.name;var d=e;if(d.styles!==void 0){var p=d.next;if(p!==void 0)for(;p!==void 0;)cursor$1={name:p.name,styles:p.styles,next:cursor$1},p=p.next;var h=d.styles+";";return h}return createStringFromObject(n,i,e)}case"function":{if(n!==void 0){var y=cursor$1,$=e(n);return cursor$1=y,handleInterpolation(n,i,$)}break}}var E=e;if(i==null)return E;var M=i[E];return M!==void 0?M:E}function createStringFromObject(n,i,e){var t="";if(Array.isArray(e))for(var o=0;o<e.length;o++)t+=handleInterpolation(n,i,e[o])+";";else for(var d in e){var p=e[d];if(typeof p!="object"){var h=p;i!=null&&i[h]!==void 0?t+=d+"{"+i[h]+"}":isProcessableValue(h)&&(t+=processStyleName(d)+":"+processStyleValue(d,h)+";")}else if(Array.isArray(p)&&typeof p[0]=="string"&&(i==null||i[p[0]]===void 0))for(var y=0;y<p.length;y++)isProcessableValue(p[y])&&(t+=processStyleName(d)+":"+processStyleValue(d,p[y])+";");else{var $=handleInterpolation(n,i,p);switch(d){case"animation":case"animationName":{t+=processStyleName(d)+":"+$+";";break}default:t+=d+"{"+$+"}"}}}return t}var labelPattern=/label:\s*([^\s;{]+)\s*(;|$)/g,cursor$1;function serializeStyles(n,i,e){if(n.length===1&&typeof n[0]=="object"&&n[0]!==null&&n[0].styles!==void 0)return n[0];var t=!0,o="";cursor$1=void 0;var d=n[0];if(d==null||d.raw===void 0)t=!1,o+=handleInterpolation(e,i,d);else{var p=d;o+=p[0]}for(var h=1;h<n.length;h++)if(o+=handleInterpolation(e,i,n[h]),t){var y=d;o+=y[h]}labelPattern.lastIndex=0;for(var $="",E;(E=labelPattern.exec(o))!==null;)$+="-"+E[1];var M=murmur2(o)+$;return{name:M,styles:o,next:cursor$1}}var syncFallback=function(i){return i()},useInsertionEffect=React$1.useInsertionEffect?React$1.useInsertionEffect:!1,useInsertionEffectAlwaysWithSyncFallback=useInsertionEffect||syncFallback,useInsertionEffectWithLayoutFallback=useInsertionEffect||reactExports.useLayoutEffect,EmotionCacheContext=reactExports.createContext(typeof HTMLElement<"u"?createCache({key:"css"}):null),CacheProvider=EmotionCacheContext.Provider,withEmotionCache=function(i){return reactExports.forwardRef(function(e,t){var o=reactExports.useContext(EmotionCacheContext);return i(e,o,t)})},ThemeContext$2=reactExports.createContext({}),useTheme=function(){return reactExports.useContext(ThemeContext$2)},getTheme=function(i,e){if(typeof e=="function"){var t=e(i);return t}return _extends$A({},i,e)},createCacheWithTheme=weakMemoize(function(n){return weakMemoize(function(i){return getTheme(n,i)})}),ThemeProvider$2=function(i){var e=reactExports.useContext(ThemeContext$2);return i.theme!==e&&(e=createCacheWithTheme(e)(i.theme)),reactExports.createElement(ThemeContext$2.Provider,{value:e},i.children)},hasOwn={}.hasOwnProperty,typePropName="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",createEmotionProps=function(i,e){var t={};for(var o in e)hasOwn.call(e,o)&&(t[o]=e[o]);return t[typePropName]=i,t},Insertion$1=function(i){var e=i.cache,t=i.serialized,o=i.isStringTag;return registerStyles(e,t,o),useInsertionEffectAlwaysWithSyncFallback(function(){return insertStyles(e,t,o)}),null},Emotion=withEmotionCache(function(n,i,e){var t=n.css;typeof t=="string"&&i.registered[t]!==void 0&&(t=i.registered[t]);var o=n[typePropName],d=[t],p="";typeof n.className=="string"?p=getRegisteredStyles(i.registered,d,n.className):n.className!=null&&(p=n.className+" ");var h=serializeStyles(d,void 0,reactExports.useContext(ThemeContext$2));p+=i.key+"-"+h.name;var y={};for(var $ in n)hasOwn.call(n,$)&&$!=="css"&&$!==typePropName&&(y[$]=n[$]);return y.className=p,e&&(y.ref=e),reactExports.createElement(reactExports.Fragment,null,reactExports.createElement(Insertion$1,{cache:i,serialized:h,isStringTag:typeof o=="string"}),reactExports.createElement(o,y))}),Emotion$1=Emotion,Fragment=jsxRuntimeExports.Fragment,jsx$1=function(i,e,t){return hasOwn.call(e,"css")?jsxRuntimeExports.jsx(Emotion$1,createEmotionProps(i,e),t):jsxRuntimeExports.jsx(i,e,t)},jsxs=function(i,e,t){return hasOwn.call(e,"css")?jsxRuntimeExports.jsxs(Emotion$1,createEmotionProps(i,e),t):jsxRuntimeExports.jsxs(i,e,t)},loglevel$1={exports:{}},loglevel=loglevel$1.exports,hasRequiredLoglevel;function requireLoglevel(){return hasRequiredLoglevel||(hasRequiredLoglevel=1,(function(n){(function(i,e){n.exports?n.exports=e():i.log=e()})(loglevel,function(){var i=function(){},e="undefined",t=typeof window!==e&&typeof window.navigator!==e&&/Trident\/|MSIE /.test(window.navigator.userAgent),o=["trace","debug","info","warn","error"],d={},p=null;function h(ye,we){var xe=ye[we];if(typeof xe.bind=="function")return xe.bind(ye);try{return Function.prototype.bind.call(xe,ye)}catch{return function(){return Function.prototype.apply.apply(xe,[ye,arguments])}}}function y(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function $(ye){return ye==="debug"&&(ye="log"),typeof console===e?!1:ye==="trace"&&t?y:console[ye]!==void 0?h(console,ye):console.log!==void 0?h(console,"log"):i}function E(){for(var ye=this.getLevel(),we=0;we<o.length;we++){var xe=o[we];this[xe]=we<ye?i:this.methodFactory(xe,ye,this.name)}if(this.log=this.debug,typeof console===e&&ye<this.levels.SILENT)return"No console available for logging"}function M(ye){return function(){typeof console!==e&&(E.call(this),this[ye].apply(this,arguments))}}function H(ye,we,xe){return $(ye)||M.apply(this,arguments)}function Z(ye,we){var xe=this,Ce,Ne,Fe,Me="loglevel";typeof ye=="string"?Me+=":"+ye:typeof ye=="symbol"&&(Me=void 0);function Le(We){var Xe=(o[We]||"silent").toUpperCase();if(!(typeof window===e||!Me)){try{window.localStorage[Me]=Xe;return}catch{}try{window.document.cookie=encodeURIComponent(Me)+"="+Xe+";"}catch{}}}function ze(){var We;if(!(typeof window===e||!Me)){try{We=window.localStorage[Me]}catch{}if(typeof We===e)try{var Xe=window.document.cookie,Qe=encodeURIComponent(Me),Ye=Xe.indexOf(Qe+"=");Ye!==-1&&(We=/^([^;]+)/.exec(Xe.slice(Ye+Qe.length+1))[1])}catch{}return xe.levels[We]===void 0&&(We=void 0),We}}function Ke(){if(!(typeof window===e||!Me)){try{window.localStorage.removeItem(Me)}catch{}try{window.document.cookie=encodeURIComponent(Me)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function Ve(We){var Xe=We;if(typeof Xe=="string"&&xe.levels[Xe.toUpperCase()]!==void 0&&(Xe=xe.levels[Xe.toUpperCase()]),typeof Xe=="number"&&Xe>=0&&Xe<=xe.levels.SILENT)return Xe;throw new TypeError("log.setLevel() called with invalid level: "+We)}xe.name=ye,xe.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},xe.methodFactory=we||H,xe.getLevel=function(){return Fe??Ne??Ce},xe.setLevel=function(We,Xe){return Fe=Ve(We),Xe!==!1&&Le(Fe),E.call(xe)},xe.setDefaultLevel=function(We){Ne=Ve(We),ze()||xe.setLevel(We,!1)},xe.resetLevel=function(){Fe=null,Ke(),E.call(xe)},xe.enableAll=function(We){xe.setLevel(xe.levels.TRACE,We)},xe.disableAll=function(We){xe.setLevel(xe.levels.SILENT,We)},xe.rebuild=function(){if(p!==xe&&(Ce=Ve(p.getLevel())),E.call(xe),p===xe)for(var We in d)d[We].rebuild()},Ce=Ve(p?p.getLevel():"WARN");var je=ze();je!=null&&(Fe=Ve(je)),E.call(xe)}p=new Z,p.getLogger=function(we){if(typeof we!="symbol"&&typeof we!="string"||we==="")throw new TypeError("You must supply a name when creating a logger.");var xe=d[we];return xe||(xe=d[we]=new Z(we,p.methodFactory)),xe};var be=typeof window!==e?window.log:void 0;return p.noConflict=function(){return typeof window!==e&&window.log===p&&(window.log=be),p},p.getLoggers=function(){return d},p.default=p,p})})(loglevel$1)),loglevel$1.exports}var loglevelExports=requireLoglevel(),client={},reactDom={exports:{}},reactDom_production_min={},scheduler={exports:{}},scheduler_production_min={};var hasRequiredScheduler_production_min;function requireScheduler_production_min(){return hasRequiredScheduler_production_min||(hasRequiredScheduler_production_min=1,(function(n){function i(st,pt){var Be=st.length;st.push(pt);e:for(;0<Be;){var qe=Be-1>>>1,rt=st[qe];if(0<o(rt,pt))st[qe]=pt,st[Be]=rt,Be=qe;else break e}}function e(st){return st.length===0?null:st[0]}function t(st){if(st.length===0)return null;var pt=st[0],Be=st.pop();if(Be!==pt){st[0]=Be;e:for(var qe=0,rt=st.length,He=rt>>>1;qe<He;){var Ot=2*(qe+1)-1,Ct=st[Ot],tt=Ot+1,wt=st[tt];if(0>o(Ct,Be))tt<rt&&0>o(wt,Ct)?(st[qe]=wt,st[tt]=Be,qe=tt):(st[qe]=Ct,st[Ot]=Be,qe=Ot);else if(tt<rt&&0>o(wt,Be))st[qe]=wt,st[tt]=Be,qe=tt;else break e}}return pt}function o(st,pt){var Be=st.sortIndex-pt.sortIndex;return Be!==0?Be:st.id-pt.id}if(typeof performance=="object"&&typeof performance.now=="function"){var d=performance;n.unstable_now=function(){return d.now()}}else{var p=Date,h=p.now();n.unstable_now=function(){return p.now()-h}}var y=[],$=[],E=1,M=null,H=3,Z=!1,be=!1,ye=!1,we=typeof setTimeout=="function"?setTimeout:null,xe=typeof clearTimeout=="function"?clearTimeout:null,Ce=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Ne(st){for(var pt=e($);pt!==null;){if(pt.callback===null)t($);else if(pt.startTime<=st)t($),pt.sortIndex=pt.expirationTime,i(y,pt);else break;pt=e($)}}function Fe(st){if(ye=!1,Ne(st),!be)if(e(y)!==null)be=!0,ot(Me);else{var pt=e($);pt!==null&&dt(Fe,pt.startTime-st)}}function Me(st,pt){be=!1,ye&&(ye=!1,xe(Ke),Ke=-1),Z=!0;var Be=H;try{for(Ne(pt),M=e(y);M!==null&&(!(M.expirationTime>pt)||st&&!We());){var qe=M.callback;if(typeof qe=="function"){M.callback=null,H=M.priorityLevel;var rt=qe(M.expirationTime<=pt);pt=n.unstable_now(),typeof rt=="function"?M.callback=rt:M===e(y)&&t(y),Ne(pt)}else t(y);M=e(y)}if(M!==null)var He=!0;else{var Ot=e($);Ot!==null&&dt(Fe,Ot.startTime-pt),He=!1}return He}finally{M=null,H=Be,Z=!1}}var Le=!1,ze=null,Ke=-1,Ve=5,je=-1;function We(){return!(n.unstable_now()-je<Ve)}function Xe(){if(ze!==null){var st=n.unstable_now();je=st;var pt=!0;try{pt=ze(!0,st)}finally{pt?Qe():(Le=!1,ze=null)}}else Le=!1}var Qe;if(typeof Ce=="function")Qe=function(){Ce(Xe)};else if(typeof MessageChannel<"u"){var Ye=new MessageChannel,Ue=Ye.port2;Ye.port1.onmessage=Xe,Qe=function(){Ue.postMessage(null)}}else Qe=function(){we(Xe,0)};function ot(st){ze=st,Le||(Le=!0,Qe())}function dt(st,pt){Ke=we(function(){st(n.unstable_now())},pt)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(st){st.callback=null},n.unstable_continueExecution=function(){be||Z||(be=!0,ot(Me))},n.unstable_forceFrameRate=function(st){0>st||125<st?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Ve=0<st?Math.floor(1e3/st):5},n.unstable_getCurrentPriorityLevel=function(){return H},n.unstable_getFirstCallbackNode=function(){return e(y)},n.unstable_next=function(st){switch(H){case 1:case 2:case 3:var pt=3;break;default:pt=H}var Be=H;H=pt;try{return st()}finally{H=Be}},n.unstable_pauseExecution=function(){},n.unstable_requestPaint=function(){},n.unstable_runWithPriority=function(st,pt){switch(st){case 1:case 2:case 3:case 4:case 5:break;default:st=3}var Be=H;H=st;try{return pt()}finally{H=Be}},n.unstable_scheduleCallback=function(st,pt,Be){var qe=n.unstable_now();switch(typeof Be=="object"&&Be!==null?(Be=Be.delay,Be=typeof Be=="number"&&0<Be?qe+Be:qe):Be=qe,st){case 1:var rt=-1;break;case 2:rt=250;break;case 5:rt=1073741823;break;case 4:rt=1e4;break;default:rt=5e3}return rt=Be+rt,st={id:E++,callback:pt,priorityLevel:st,startTime:Be,expirationTime:rt,sortIndex:-1},Be>qe?(st.sortIndex=Be,i($,st),e(y)===null&&st===e($)&&(ye?(xe(Ke),Ke=-1):ye=!0,dt(Fe,Be-qe))):(st.sortIndex=rt,i(y,st),be||Z||(be=!0,ot(Me))),st},n.unstable_shouldYield=We,n.unstable_wrapCallback=function(st){var pt=H;return function(){var Be=H;H=pt;try{return st.apply(this,arguments)}finally{H=Be}}}})(scheduler_production_min)),scheduler_production_min}var hasRequiredScheduler;function requireScheduler(){return hasRequiredScheduler||(hasRequiredScheduler=1,scheduler.exports=requireScheduler_production_min()),scheduler.exports}var hasRequiredReactDom_production_min;function requireReactDom_production_min(){if(hasRequiredReactDom_production_min)return reactDom_production_min;hasRequiredReactDom_production_min=1;var n=requireReact(),i=requireScheduler();function e(g){for(var k="https://reactjs.org/docs/error-decoder.html?invariant="+g,X=1;X<arguments.length;X++)k+="&args[]="+encodeURIComponent(arguments[X]);return"Minified React error #"+g+"; visit "+k+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var t=new Set,o={};function d(g,k){p(g,k),p(g+"Capture",k)}function p(g,k){for(o[g]=k,g=0;g<k.length;g++)t.add(k[g])}var h=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),y=Object.prototype.hasOwnProperty,$=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,E={},M={};function H(g){return y.call(M,g)?!0:y.call(E,g)?!1:$.test(g)?M[g]=!0:(E[g]=!0,!1)}function Z(g,k,X,ve){if(X!==null&&X.type===0)return!1;switch(typeof k){case"function":case"symbol":return!0;case"boolean":return ve?!1:X!==null?!X.acceptsBooleans:(g=g.toLowerCase().slice(0,5),g!=="data-"&&g!=="aria-");default:return!1}}function be(g,k,X,ve){if(k===null||typeof k>"u"||Z(g,k,X,ve))return!0;if(ve)return!1;if(X!==null)switch(X.type){case 3:return!k;case 4:return k===!1;case 5:return isNaN(k);case 6:return isNaN(k)||1>k}return!1}function ye(g,k,X,ve,$e,Ie,De){this.acceptsBooleans=k===2||k===3||k===4,this.attributeName=ve,this.attributeNamespace=$e,this.mustUseProperty=X,this.propertyName=g,this.type=k,this.sanitizeURL=Ie,this.removeEmptyString=De}var we={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(g){we[g]=new ye(g,0,!1,g,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(g){var k=g[0];we[k]=new ye(k,1,!1,g[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(g){we[g]=new ye(g,2,!1,g.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(g){we[g]=new ye(g,2,!1,g,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(g){we[g]=new ye(g,3,!1,g.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(g){we[g]=new ye(g,3,!0,g,null,!1,!1)}),["capture","download"].forEach(function(g){we[g]=new ye(g,4,!1,g,null,!1,!1)}),["cols","rows","size","span"].forEach(function(g){we[g]=new ye(g,6,!1,g,null,!1,!1)}),["rowSpan","start"].forEach(function(g){we[g]=new ye(g,5,!1,g.toLowerCase(),null,!1,!1)});var xe=/[\-:]([a-z])/g;function Ce(g){return g[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(g){var k=g.replace(xe,Ce);we[k]=new ye(k,1,!1,g,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(g){var k=g.replace(xe,Ce);we[k]=new ye(k,1,!1,g,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(g){var k=g.replace(xe,Ce);we[k]=new ye(k,1,!1,g,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(g){we[g]=new ye(g,1,!1,g.toLowerCase(),null,!1,!1)}),we.xlinkHref=new ye("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(g){we[g]=new ye(g,1,!1,g.toLowerCase(),null,!0,!0)});function Ne(g,k,X,ve){var $e=we.hasOwnProperty(k)?we[k]:null;($e!==null?$e.type!==0:ve||!(2<k.length)||k[0]!=="o"&&k[0]!=="O"||k[1]!=="n"&&k[1]!=="N")&&(be(k,X,$e,ve)&&(X=null),ve||$e===null?H(k)&&(X===null?g.removeAttribute(k):g.setAttribute(k,""+X)):$e.mustUseProperty?g[$e.propertyName]=X===null?$e.type===3?!1:"":X:(k=$e.attributeName,ve=$e.attributeNamespace,X===null?g.removeAttribute(k):($e=$e.type,X=$e===3||$e===4&&X===!0?"":""+X,ve?g.setAttributeNS(ve,k,X):g.setAttribute(k,X))))}var Fe=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Me=Symbol.for("react.element"),Le=Symbol.for("react.portal"),ze=Symbol.for("react.fragment"),Ke=Symbol.for("react.strict_mode"),Ve=Symbol.for("react.profiler"),je=Symbol.for("react.provider"),We=Symbol.for("react.context"),Xe=Symbol.for("react.forward_ref"),Qe=Symbol.for("react.suspense"),Ye=Symbol.for("react.suspense_list"),Ue=Symbol.for("react.memo"),ot=Symbol.for("react.lazy"),dt=Symbol.for("react.offscreen"),st=Symbol.iterator;function pt(g){return g===null||typeof g!="object"?null:(g=st&&g[st]||g["@@iterator"],typeof g=="function"?g:null)}var Be=Object.assign,qe;function rt(g){if(qe===void 0)try{throw Error()}catch(X){var k=X.stack.trim().match(/\n( *(at )?)/);qe=k&&k[1]||""}return`
|
|
3
3
|
`+qe+g}var He=!1;function Ot(g,k){if(!g||He)return"";He=!0;var X=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(k)if(k=function(){throw Error()},Object.defineProperty(k.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(k,[])}catch(at){var ve=at}Reflect.construct(g,[],k)}else{try{k.call()}catch(at){ve=at}g.call(k.prototype)}else{try{throw Error()}catch(at){ve=at}g()}}catch(at){if(at&&ve&&typeof at.stack=="string"){for(var $e=at.stack.split(`
|
|
4
4
|
`),Ie=ve.stack.split(`
|
|
@@ -93,7 +93,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
93
93
|
`):[];d.shift();const p=d.map(h=>h.trim()).join(`
|
|
94
94
|
`);return jsxs(AlertContainer,{kind:Kind.ERROR,width:o,children:[jsxs(StyledErrorName,{children:[i,": "]}),e,t?jsx$1(StyledStackTrace,{"data-testid":"stErrorElementStack",children:jsx$1(StyledCode,{wrapLines:!1,children:p})}):null]})}const LOG$g=loglevelExports.getLogger("ErrorBoundary"),Ss=class Ss extends reactExports.PureComponent{constructor(){super(...arguments),this.state={error:null},this.componentDidCatch=i=>{LOG$g.error(`${i.name}: ${i.message}
|
|
95
95
|
${i.stack}`)}}render(){const{error:i}=this.state;return i?i.name==="ChunkLoadError"?jsx$1(ErrorElement,{width:this.props.width,name:"Network issue",message:jsxs("p",{children:["Cannot load Streamlit frontend code. This can happen when you update Streamlit while a Streamlit app is running.",jsx$1("br",{}),"To fix this, simply reload this app by pressing"," ",jsx$1(StyledInlineCode,{children:"F5"}),","," ",jsx$1(StyledInlineCode,{children:"Ctrl+R"}),", or"," ",jsx$1(StyledInlineCode,{children:"Cmd+R"}),".",jsx$1("br",{}),"If the error persists, try force-clearing your browser's cache as described"," ",jsx$1("a",{href:"https://en.wikipedia.org/wiki/Wikipedia:Bypass_your_cache#Cache_clearing_and_disabling",rel:"noopener noreferrer",target:"_blank",children:"here"})]})}):jsx$1(ErrorElement,{width:this.props.width,name:i.name,message:i.message,stack:i.stack}):this.props.children}};Ss.getDerivedStateFromError=i=>({error:i});let ErrorBoundary=Ss;const StyledTooltipTriggerButton=styled("button",{target:"e1mr473r0"})(({theme:n})=>({background:"none",border:"none",padding:0,margin:0,color:"inherit",display:"flex",alignItems:"center",justifyContent:"center",lineHeight:0,cursor:"help","&:focus":{outline:"none"},"&:focus-visible":{boxShadow:getPrimaryFocusBoxShadow(n),borderRadius:n.radii.default}})),StyledTooltipIconWrapper=styled("div",{target:"e1mr473r1"})(({isLatex:n,theme:i})=>({display:"flex",alignItems:"center",marginTop:n?i.spacing.md:"0","& .stTooltipHoverTarget svg.icon":{stroke:i.colors.fadedText60,strokeWidth:2.25}})),StyledLabelHelpWrapper=styled("div",{target:"e1mr473r2"})(({isLatex:n})=>({display:"flex",flexDirection:"row",alignItems:"center",visibility:"visible",width:n?"fit-content":"100%",...n?{maxWidth:"100%",marginInline:"auto"}:{}})),StyledLabelHelpInline=styled("label",{target:"e1mr473r3"})(({theme:n})=>({marginLeft:n.spacing.xs,position:"relative",display:"flex",flexDirection:"row"}));var PLACEMENT={auto:"auto",topLeft:"topLeft",top:"top",topRight:"topRight",rightTop:"rightTop",right:"right",rightBottom:"rightBottom",bottomRight:"bottomRight",bottom:"bottom",bottomLeft:"bottomLeft",leftBottom:"leftBottom",left:"left",leftTop:"leftTop"},TRIGGER_TYPE={click:"click",hover:"hover"},STATE_CHANGE_TYPE$1={open:"open",close:"close"},ACCESSIBILITY_TYPE={none:"none",menu:"menu",tooltip:"tooltip"},POPOVER_MARGIN=8,ARROW_SIZE=6,ANIMATE_OUT_TIME=0,ANIMATE_IN_TIME=20,ARROW_WIDTH=Math.ceil(Math.sqrt(Math.pow(ARROW_SIZE*2,2)/2));function _typeof$9(n){"@babel/helpers - typeof";return _typeof$9=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},_typeof$9(n)}function ownKeys$k(n,i){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);i&&(t=t.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),e.push.apply(e,t)}return e}function _objectSpread$j(n){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?ownKeys$k(Object(e),!0).forEach(function(t){_defineProperty$k(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$k(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _classCallCheck$9(n,i){if(!(n instanceof i))throw new TypeError("Cannot call a class as a function")}function _defineProperties$9(n,i){for(var e=0;e<i.length;e++){var t=i[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(n,t.key,t)}}function _createClass$9(n,i,e){return i&&_defineProperties$9(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n}function _inherits$9(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(i&&i.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),i&&_setPrototypeOf$8(n,i)}function _setPrototypeOf$8(n,i){return _setPrototypeOf$8=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},_setPrototypeOf$8(n,i)}function _createSuper$9(n){var i=_isNativeReflectConstruct$9();return function(){var t=_getPrototypeOf$9(n),o;if(i){var d=_getPrototypeOf$9(this).constructor;o=Reflect.construct(t,arguments,d)}else o=t.apply(this,arguments);return _possibleConstructorReturn$9(this,o)}}function _possibleConstructorReturn$9(n,i){if(i&&(_typeof$9(i)==="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$9(n)}function _assertThisInitialized$9(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function _isNativeReflectConstruct$9(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$9(n){return _getPrototypeOf$9=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf$9(n)}function _defineProperty$k(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}var defaultStateReducer=function n(i,e){return e},StatefulContainer$1=(function(n){_inherits$9(e,n);var i=_createSuper$9(e);function e(){var t;_classCallCheck$9(this,e);for(var o=arguments.length,d=new Array(o),p=0;p<o;p++)d[p]=arguments[p];return t=i.call.apply(i,[this].concat(d)),_defineProperty$k(_assertThisInitialized$9(t),"state",_objectSpread$j({isOpen:!1},t.props.initialState)),_defineProperty$k(_assertThisInitialized$9(t),"onBlur",function(h){t.props.onBlur&&t.props.onBlur(h),!(t.props.focusLock||t.props.autoFocus)&&t.close()}),_defineProperty$k(_assertThisInitialized$9(t),"onClick",function(h){t.props.onClick&&t.props.onClick(h),t.state.isOpen?t.close():t.open()}),_defineProperty$k(_assertThisInitialized$9(t),"onClickOutside",function(){t.close()}),_defineProperty$k(_assertThisInitialized$9(t),"onEsc",function(){t.close()}),_defineProperty$k(_assertThisInitialized$9(t),"onFocus",function(h){t.props.onFocus&&t.props.onFocus(h),isFocusVisible(h)&&t.open()}),_defineProperty$k(_assertThisInitialized$9(t),"onMouseEnter",function(h){t.props.onMouseEnter&&t.props.onMouseEnter(h),t.open()}),_defineProperty$k(_assertThisInitialized$9(t),"onMouseLeave",function(h){t.props.onMouseLeave&&t.props.onMouseLeave(h),t.close()}),_defineProperty$k(_assertThisInitialized$9(t),"onContentClose",function(){t.close()}),_defineProperty$k(_assertThisInitialized$9(t),"renderContent",function(){var h=t.props.content;return typeof h=="function"?h({close:t.onContentClose}):h}),t}return _createClass$9(e,[{key:"open",value:function(){this.internalSetState(STATE_CHANGE_TYPE$1.open,{isOpen:!0}),this.props.onOpen&&this.props.onOpen()}},{key:"close",value:function(){this.internalSetState(STATE_CHANGE_TYPE$1.close,{isOpen:!1}),this.props.onClose&&this.props.onClose()}},{key:"internalSetState",value:function(o,d){var p=this.props.stateReducer;if(typeof p!="function"){this.setState(d);return}this.setState(function(h){return p(o,d,h)})}},{key:"render",value:function(){var o=this.props,d=o.accessibilityType,p=o.autoFocus,h=o.animateOutTime,y=o.dismissOnClickOutside,$=o.dismissOnEsc,E=o.focusLock,M=o.ignoreBoundary,H=o.mountNode,Z=o.onBlur,be=o.onClick,ye=o.onFocus,we=o.onMouseEnter,xe=o.onMouseLeave,Ce=o.onMouseEnterDelay,Ne=o.onMouseLeaveDelay,Fe=o.overrides,Me=o.placement,Le=o.popperOptions,ze=o.renderAll,Ke=o.returnFocus,Ve=o.showArrow,je=o.triggerType,We=o.popoverMargin,Xe=o.focusOptions,Qe={accessibilityType:d,animateOutTime:h,autoFocus:p,content:this.renderContent,focusLock:E,ignoreBoundary:M,isOpen:this.state.isOpen,mountNode:H,onBlur:Z,onClick:be,onFocus:ye,onMouseEnter:we,onMouseLeave:xe,onMouseEnterDelay:Ce,onMouseLeaveDelay:Ne,overrides:Fe,placement:Me,popperOptions:Le,renderAll:ze,returnFocus:Ke,showArrow:Ve,triggerType:je,popoverMargin:We,focusOptions:Xe};return y&&(Qe.onClickOutside=this.onClickOutside),$&&(Qe.onEsc=this.onEsc),je===TRIGGER_TYPE.hover?(Qe.onBlur=this.onBlur,Qe.onFocus=this.onFocus,Qe.onMouseEnter=this.onMouseEnter,Qe.onMouseLeave=this.onMouseLeave):Qe.onClick=this.onClick,this.props.children(Qe)}}]),e})(reactExports.Component);_defineProperty$k(StatefulContainer$1,"defaultProps",{accessibilityType:ACCESSIBILITY_TYPE.menu,ignoreBoundary:!1,overrides:{},onMouseEnterDelay:200,onMouseLeaveDelay:200,placement:PLACEMENT.auto,popperOptions:{},showArrow:!1,triggerType:TRIGGER_TYPE.click,dismissOnClickOutside:!0,dismissOnEsc:!0,stateReducer:defaultStateReducer,popoverMargin:POPOVER_MARGIN});function ownKeys$j(n,i){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);i&&(t=t.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),e.push.apply(e,t)}return e}function _objectSpread$i(n){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?ownKeys$j(Object(e),!0).forEach(function(t){_defineProperty$j(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$j(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _defineProperty$j(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}function _slicedToArray$f(n,i){return _arrayWithHoles$f(n)||_iterableToArrayLimit$f(n,i)||_unsupportedIterableToArray$f(n,i)||_nonIterableRest$f()}function _nonIterableRest$f(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
96
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$f(n,i){if(n){if(typeof n=="string")return _arrayLikeToArray$f(n,i);var e=Object.prototype.toString.call(n).slice(8,-1);if(e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set")return Array.from(n);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return _arrayLikeToArray$f(n,i)}}function _arrayLikeToArray$f(n,i){(i==null||i>n.length)&&(i=n.length);for(var e=0,t=new Array(i);e<i;e++)t[e]=n[e];return t}function _iterableToArrayLimit$f(n,i){var e=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(e!=null){var t=[],o=!0,d=!1,p,h;try{for(e=e.call(n);!(o=(p=e.next()).done)&&(t.push(p.value),!(i&&t.length===i));o=!0);}catch(y){d=!0,h=y}finally{try{!o&&e.return!=null&&e.return()}finally{if(d)throw h}}return t}}function _arrayWithHoles$f(n){if(Array.isArray(n))return n}var OPPOSITE_POSITIONS={top:"bottom",bottom:"top",right:"left",left:"right"};function getOppositePosition(n){return OPPOSITE_POSITIONS[n]}function isVerticalPosition(n){return n==="top"||n==="bottom"}function capitalize(n){return n.charAt(0).toUpperCase()+n.slice(1)}function fromPopperPlacement(n){var i=n.replace(/(top|bottom)-start$/,"$1Left").replace(/(top|bottom)-end$/,"$1Right").replace(/(left|right)-start$/,"$1Top").replace(/(left|right)-end$/,"$1Bottom");return PLACEMENT[i]||null}function splitPlacement(n){var i=n.match(/^([a-z]+)([A-Z][a-z]+)?/)||[];return i.slice(1,3).filter(Boolean).map(function(e){return e.toLowerCase()})}function getPopoverMarginStyles(n,i,e){var t=splitPlacement(i),o=_slicedToArray$f(t,1),d=o[0],p=getOppositePosition(d);if(!p)return null;var h="margin".concat(capitalize(p));return _defineProperty$j({},h,"".concat(n+e,"px"))}function getStartPosition(n,i,e,t){n=_objectSpread$i({},n);var o=splitPlacement(i),d=_slicedToArray$f(o,1),p=d[0],h=(e>0?e:t)*2;return isVerticalPosition(p)?n.top+=p==="top"?h:-h:n.left+=p==="left"?h:-h,"translate3d(".concat(n.left,"px, ").concat(n.top,"px, 0)")}function getEndPosition(n){return"translate3d(".concat(n.left,"px, ").concat(n.top,"px, 0)")}function getArrowPositionStyles(n,i){var e,t=splitPlacement(i),o=_slicedToArray$f(t,1),d=o[0],p=getOppositePosition(d);if(!p)return null;var h=isVerticalPosition(d)?"left":"top";return e={},_defineProperty$j(e,h,"".concat(n[h],"px")),_defineProperty$j(e,p,"-".concat(ARROW_SIZE-2,"px")),e}function ownKeys$i(n,i){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);i&&(t=t.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),e.push.apply(e,t)}return e}function _objectSpread$h(n){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?ownKeys$i(Object(e),!0).forEach(function(t){_defineProperty$i(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$i(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _defineProperty$i(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}function getBodyStyles(n){var i=n.$animationDuration,e=n.$isOpen,t=n.$isAnimating,o=n.$placement,d=n.$popoverOffset,p=n.$showArrow,h=n.$theme,y=n.$popoverMargin,$=n.$isHoverTrigger;return _objectSpread$h(_objectSpread$h({position:"absolute",top:0,left:0,backgroundColor:h.colors.backgroundTertiary,borderTopLeftRadius:h.borders.popoverBorderRadius,borderTopRightRadius:h.borders.popoverBorderRadius,borderBottomRightRadius:h.borders.popoverBorderRadius,borderBottomLeftRadius:h.borders.popoverBorderRadius,boxShadow:h.lighting.shadow600,transitionProperty:"opacity,transform",transitionDuration:t?e?"0.1s":"".concat(i,"ms"):"0s",transitionTimingFunction:e?h.animation.easeOutCurve:h.animation.easeInCurve,opacity:t&&e?1:0,transform:t&&e?getEndPosition(d):getStartPosition(d,o,p?ARROW_SIZE:0,y)},getPopoverMarginStyles(p?ARROW_SIZE:0,o,y)),$?{animationDuration:".1s",animationName:{"0%":{pointerEvents:"none"},"99%":{pointerEvents:"none"},"100%":{pointerEvents:"auto"}}}:{})}var Body$2=styled$1("div",getBodyStyles);Body$2.displayName="Body";Body$2.displayName="Body";function getArrowStyles(n){var i=n.$arrowOffset,e=n.$placement,t=n.$theme;return _objectSpread$h({backgroundColor:t.colors.backgroundTertiary,boxShadow:t.lighting.shadow600,width:"".concat(ARROW_WIDTH,"px"),height:"".concat(ARROW_WIDTH,"px"),transform:"rotate(45deg)",position:"absolute"},getArrowPositionStyles(i,e))}var Arrow$1=styled$1("div",getArrowStyles);Arrow$1.displayName="Arrow";Arrow$1.displayName="Arrow";function getInnerStyles(n){var i=n.$theme;return{backgroundColor:i.colors.backgroundTertiary,borderTopLeftRadius:i.borders.popoverBorderRadius,borderTopRightRadius:i.borders.popoverBorderRadius,borderBottomRightRadius:i.borders.popoverBorderRadius,borderBottomLeftRadius:i.borders.popoverBorderRadius,color:i.colors.contentPrimary,position:"relative"}}var Inner$1=styled$1("div",getInnerStyles);Inner$1.displayName="Inner";Inner$1.displayName="Inner";var Padding=styled$1("div",{paddingLeft:"12px",paddingTop:"12px",paddingRight:"12px",paddingBottom:"12px"});Padding.displayName="Padding";Padding.displayName="Padding";var Hidden=styled$1("div",{display:"none"});Hidden.displayName="Hidden";Hidden.displayName="Hidden";var baseDefaultProps$1={accessibilityType:ACCESSIBILITY_TYPE.menu,focusLock:!1,autoFocus:!0,returnFocus:!0,ignoreBoundary:!1,overrides:{},onMouseEnterDelay:200,onMouseLeaveDelay:200,placement:PLACEMENT.auto,showArrow:!1,triggerType:TRIGGER_TYPE.click,renderAll:!1};function ownKeys$h(n,i){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);i&&(t=t.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),e.push.apply(e,t)}return e}function _objectSpread$g(n){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?ownKeys$h(Object(e),!0).forEach(function(t){_defineProperty$h(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$h(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _extends$j(){return _extends$j=Object.assign?Object.assign.bind():function(n){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n},_extends$j.apply(this,arguments)}function _typeof$8(n){"@babel/helpers - typeof";return _typeof$8=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},_typeof$8(n)}function _classCallCheck$8(n,i){if(!(n instanceof i))throw new TypeError("Cannot call a class as a function")}function _defineProperties$8(n,i){for(var e=0;e<i.length;e++){var t=i[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(n,t.key,t)}}function _createClass$8(n,i,e){return i&&_defineProperties$8(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n}function _inherits$8(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(i&&i.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),i&&_setPrototypeOf$7(n,i)}function _setPrototypeOf$7(n,i){return _setPrototypeOf$7=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},_setPrototypeOf$7(n,i)}function _createSuper$8(n){var i=_isNativeReflectConstruct$8();return function(){var t=_getPrototypeOf$8(n),o;if(i){var d=_getPrototypeOf$8(this).constructor;o=Reflect.construct(t,arguments,d)}else o=t.apply(this,arguments);return _possibleConstructorReturn$8(this,o)}}function _possibleConstructorReturn$8(n,i){if(i&&(_typeof$8(i)==="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$8(n)}function _assertThisInitialized$8(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function _isNativeReflectConstruct$8(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$8(n){return _getPrototypeOf$8=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf$8(n)}function _defineProperty$h(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}var PopoverInner=(function(n){_inherits$8(e,n);var i=_createSuper$8(e);function e(){var t;_classCallCheck$8(this,e);for(var o=arguments.length,d=new Array(o),p=0;p<o;p++)d[p]=arguments[p];return t=i.call.apply(i,[this].concat(d)),_defineProperty$h(_assertThisInitialized$8(t),"animateInTimer",void 0),_defineProperty$h(_assertThisInitialized$8(t),"animateOutTimer",void 0),_defineProperty$h(_assertThisInitialized$8(t),"animateOutCompleteTimer",void 0),_defineProperty$h(_assertThisInitialized$8(t),"onMouseEnterTimer",void 0),_defineProperty$h(_assertThisInitialized$8(t),"onMouseLeaveTimer",void 0),_defineProperty$h(_assertThisInitialized$8(t),"anchorRef",reactExports.createRef()),_defineProperty$h(_assertThisInitialized$8(t),"popperRef",reactExports.createRef()),_defineProperty$h(_assertThisInitialized$8(t),"arrowRef",reactExports.createRef()),_defineProperty$h(_assertThisInitialized$8(t),"state",t.getDefaultState(t.props)),_defineProperty$h(_assertThisInitialized$8(t),"animateIn",function(){t.props.isOpen&&t.setState({isAnimating:!0})}),_defineProperty$h(_assertThisInitialized$8(t),"animateOut",function(){t.props.isOpen||(t.setState({isAnimating:!0}),t.animateOutCompleteTimer=setTimeout(function(){t.setState({isAnimating:!1,placement:t.props.placement})},t.props.animateOutTime||ANIMATE_OUT_TIME))}),_defineProperty$h(_assertThisInitialized$8(t),"onAnchorClick",function(h){t.props.onClick&&t.props.onClick(h)}),_defineProperty$h(_assertThisInitialized$8(t),"onAnchorMouseEnter",function(h){t.onMouseLeaveTimer&&clearTimeout(t.onMouseLeaveTimer),t.triggerOnMouseEnterWithDelay(h)}),_defineProperty$h(_assertThisInitialized$8(t),"onAnchorMouseLeave",function(h){t.onMouseEnterTimer&&clearTimeout(t.onMouseEnterTimer),t.triggerOnMouseLeaveWithDelay(h)}),_defineProperty$h(_assertThisInitialized$8(t),"onPopoverMouseEnter",function(){t.onMouseLeaveTimer&&clearTimeout(t.onMouseLeaveTimer)}),_defineProperty$h(_assertThisInitialized$8(t),"onPopoverMouseLeave",function(h){t.triggerOnMouseLeaveWithDelay(h)}),_defineProperty$h(_assertThisInitialized$8(t),"onPopperUpdate",function(h,y){var $=fromPopperPlacement(y.placement)||PLACEMENT.top;return t.setState({arrowOffset:h.arrow,popoverOffset:h.popper,placement:$}),t.animateInTimer=setTimeout(t.animateIn,ANIMATE_IN_TIME),y}),_defineProperty$h(_assertThisInitialized$8(t),"triggerOnMouseLeave",function(h){t.props.onMouseLeave&&t.props.onMouseLeave(h)}),_defineProperty$h(_assertThisInitialized$8(t),"triggerOnMouseEnter",function(h){t.props.onMouseEnter&&t.props.onMouseEnter(h)}),_defineProperty$h(_assertThisInitialized$8(t),"onDocumentClick",function(h){var y=h.composedPath?h.composedPath()[0]:h.target,$=t.popperRef.current,E=t.anchorRef.current;!$||$===y||y instanceof Node&&$.contains(y)||!E||E===y||y instanceof Node&&E.contains(y)||t.props.onClickOutside&&t.props.onClickOutside(h)}),t}return _createClass$8(e,[{key:"componentDidMount",value:function(){this.setState({isMounted:!0})}},{key:"componentDidUpdate",value:function(o,d){this.init(o,d),this.props.accessibilityType!==ACCESSIBILITY_TYPE.tooltip&&this.props.autoFocus&&!this.state.autoFocusAfterPositioning&&this.popperRef.current!==null&&this.popperRef.current.getBoundingClientRect().top>0&&this.setState({autoFocusAfterPositioning:!0})}},{key:"init",value:function(o,d){if(this.props.isOpen!==o.isOpen||this.state.isMounted!==d.isMounted||this.state.isLayerMounted!==d.isLayerMounted){if(this.props.isOpen&&this.state.isLayerMounted){this.clearTimers();return}if(!this.props.isOpen&&o.isOpen){this.animateOutTimer=setTimeout(this.animateOut,20);return}}}},{key:"componentWillUnmount",value:function(){this.clearTimers()}},{key:"getDefaultState",value:function(o){return{isAnimating:!1,arrowOffset:{left:0,top:0},popoverOffset:{left:0,top:0},placement:o.placement,isMounted:!1,isLayerMounted:!1,autoFocusAfterPositioning:!1}}},{key:"clearTimers",value:function(){[this.animateInTimer,this.animateOutTimer,this.animateOutCompleteTimer,this.onMouseEnterTimer,this.onMouseLeaveTimer].forEach(function(o){o&&clearTimeout(o)})}},{key:"triggerOnMouseLeaveWithDelay",value:function(o){var d=this,p=this.props.onMouseLeaveDelay;if(p){this.onMouseLeaveTimer=setTimeout(function(){return d.triggerOnMouseLeave(o)},p);return}this.triggerOnMouseLeave(o)}},{key:"triggerOnMouseEnterWithDelay",value:function(o){var d=this,p=this.props.onMouseEnterDelay;if(p){this.onMouseEnterTimer=setTimeout(function(){return d.triggerOnMouseEnter(o)},p);return}this.triggerOnMouseEnter(o)}},{key:"isClickTrigger",value:function(){return this.props.triggerType===TRIGGER_TYPE.click}},{key:"isHoverTrigger",value:function(){return this.props.triggerType===TRIGGER_TYPE.hover}},{key:"isAccessibilityTypeMenu",value:function(){return this.props.accessibilityType===ACCESSIBILITY_TYPE.menu}},{key:"isAccessibilityTypeTooltip",value:function(){return this.props.accessibilityType===ACCESSIBILITY_TYPE.tooltip}},{key:"getAnchorIdAttr",value:function(){var o=this.getPopoverIdAttr();return o?"".concat(o,"__anchor"):null}},{key:"getPopoverIdAttr",value:function(){return this.props.id||null}},{key:"getAnchorProps",value:function(){var o=this.props.isOpen,d={ref:this.anchorRef},p=this.getPopoverIdAttr();if(this.isAccessibilityTypeMenu()){var h=this.isClickTrigger()?"aria-controls":"aria-owns";d[h]=o?p:null,d["aria-haspopup"]=!0,d["aria-expanded"]=!!o}else this.isAccessibilityTypeTooltip()&&(d.id=this.getAnchorIdAttr(),d["aria-describedby"]=o?p:null);return this.isHoverTrigger()?(d.onMouseEnter=this.onAnchorMouseEnter,d.onMouseLeave=this.onAnchorMouseLeave,d.onBlur=this.props.onBlur,d.onFocus=this.props.onFocus):d.onClick=this.onAnchorClick,d}},{key:"getPopoverBodyProps",value:function(){var o={},d=this.getPopoverIdAttr();return this.isAccessibilityTypeMenu()?o.id=d:this.isAccessibilityTypeTooltip()&&(o.id=d,o.role="tooltip"),this.isHoverTrigger()&&(o.onMouseEnter=this.onPopoverMouseEnter,o.onMouseLeave=this.onPopoverMouseLeave),o}},{key:"getSharedProps",value:function(){var o=this.props,d=o.isOpen,p=o.showArrow,h=o.popoverMargin,y=h===void 0?POPOVER_MARGIN:h,$=this.state,E=$.isAnimating,M=$.arrowOffset,H=$.popoverOffset,Z=$.placement;return{$showArrow:!!p,$arrowOffset:M,$popoverOffset:H,$placement:Z,$isAnimating:E,$animationDuration:this.props.animateOutTime||ANIMATE_OUT_TIME,$isOpen:d,$popoverMargin:y,$isHoverTrigger:this.isHoverTrigger()}}},{key:"getAnchorFromChildren",value:function(){var o=this.props.children,d=reactExports.Children.toArray(o);return d.length!==1&&console.error("[baseui] Exactly 1 child must be passed to Popover/Tooltip, found ".concat(d.length," children")),d[0]}},{key:"renderAnchor",value:function(){var o=this.getAnchorFromChildren();if(!o)return null;var d=reactExports.isValidElement(o),p=this.getAnchorProps();return _typeof$8(o)==="object"&&d?reactExports.cloneElement(o,p):reactExports.createElement("span",_extends$j({key:"popover-anchor"},p),o)}},{key:"renderPopover",value:function(o){var d=this.props,p=d.showArrow,h=d.overrides,y=h===void 0?{}:h,$=y.Arrow,E=y.Body,M=y.Inner,H=getOverride($)||Arrow$1,Z=getOverride(E)||Body$2,be=getOverride(M)||Inner$1,ye=this.getSharedProps(),we=this.getPopoverBodyProps();return reactExports.createElement(Z,_extends$j({key:"popover-body",ref:this.popperRef,"data-baseweb":this.props["data-baseweb"]||"popover"},we,ye,getOverrideProps(E)),p?reactExports.createElement(H,_extends$j({key:"popover-arrow",ref:this.arrowRef},ye,getOverrideProps($))):null,reactExports.createElement(be,_extends$j({},ye,getOverrideProps(M)),o))}},{key:"renderContent",value:function(){var o=this.props.content;return typeof o=="function"?o():o}},{key:"render",value:function(){var o=this,d=this.state.isMounted&&(this.props.isOpen||this.state.isAnimating),p=[this.renderAnchor()],h=d||this.props.renderAll?this.renderContent():null,y={modifiers:{preventOverflow:{enabled:!this.props.ignoreBoundary,padding:0}}};return h&&(d?p.push(reactExports.createElement(Layer,{key:"new-layer",mountNode:this.props.mountNode,onEscape:this.props.onEsc,onDocumentClick:this.isHoverTrigger()?void 0:this.onDocumentClick,isHoverLayer:this.isHoverTrigger(),onMount:function(){return o.setState({isLayerMounted:!0})},onUnmount:function(){return o.setState({isLayerMounted:!1})}},reactExports.createElement(Tether,{anchorRef:this.anchorRef.current,arrowRef:this.arrowRef.current,popperRef:this.popperRef.current,popperOptions:_objectSpread$g(_objectSpread$g({},y),this.props.popperOptions),onPopperUpdate:this.onPopperUpdate,placement:this.state.placement},this.props.focusLock&&this.props.accessibilityType!==ACCESSIBILITY_TYPE.tooltip?reactExports.createElement(FocusLockCombination,{disabled:!this.props.focusLock,noFocusGuards:!1,returnFocus:!this.isHoverTrigger()&&this.props.returnFocus,autoFocus:this.state.autoFocusAfterPositioning,crossFrame:!1,focusOptions:this.props.focusOptions},this.renderPopover(h)):reactExports.createElement(MoveFocusInside,{disabled:!this.props.autoFocus||!this.state.autoFocusAfterPositioning},this.renderPopover(h))))):p.push(reactExports.createElement(Hidden,{key:"hidden-layer"},h))),p}}]),e})(reactExports.Component);_defineProperty$h(PopoverInner,"defaultProps",baseDefaultProps$1);var Popover$2=function n(i){var e=i.innerRef,t=useUID();return reactExports.createElement(PopoverInner,_extends$j({id:i.id||t,ref:e},i))};Popover$2.defaultProps=baseDefaultProps$1;var _excluded$l=["children"];function _objectWithoutProperties$i(n,i){if(n==null)return{};var e=_objectWithoutPropertiesLoose$h(n,i),t,o;if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(n);for(o=0;o<d.length;o++)t=d[o],!(i.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(n,t)&&(e[t]=n[t])}return e}function _objectWithoutPropertiesLoose$h(n,i){if(n==null)return{};var e={},t=Object.keys(n),o,d;for(d=0;d<t.length;d++)o=t[d],!(i.indexOf(o)>=0)&&(e[o]=n[o]);return e}function StatefulPopover(n){var i=n.children,e=_objectWithoutProperties$i(n,_excluded$l);return reactExports.createElement(StatefulContainer$1,e,function(t){return reactExports.createElement(Popover$2,t,i)})}StatefulPopover.defaultProps={accessibilityType:ACCESSIBILITY_TYPE.menu,ignoreBoundary:!1,overrides:{},onMouseEnterDelay:200,onMouseLeaveDelay:200,placement:PLACEMENT.auto,showArrow:!1,triggerType:TRIGGER_TYPE.click,dismissOnClickOutside:!0,dismissOnEsc:!0,stateReducer:function n(i,e){return e},popoverMargin:POPOVER_MARGIN};var baseDefaultProps={accessibilityType:ACCESSIBILITY_TYPE.tooltip,focusLock:!1,autoFocus:!1,returnFocus:!1,onMouseEnterDelay:200,onMouseLeaveDelay:200,overrides:{},placement:PLACEMENT.auto,popoverMargin:0,showArrow:!1,triggerType:TRIGGER_TYPE.hover,renderAll:!1};function _typeof$7(n){"@babel/helpers - typeof";return _typeof$7=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},_typeof$7(n)}function ownKeys$g(n,i){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);i&&(t=t.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),e.push.apply(e,t)}return e}function _objectSpread$f(n){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?ownKeys$g(Object(e),!0).forEach(function(t){_defineProperty$g(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$g(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _classCallCheck$7(n,i){if(!(n instanceof i))throw new TypeError("Cannot call a class as a function")}function _defineProperties$7(n,i){for(var e=0;e<i.length;e++){var t=i[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(n,t.key,t)}}function _createClass$7(n,i,e){return i&&_defineProperties$7(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n}function _inherits$7(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(i&&i.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),i&&_setPrototypeOf$6(n,i)}function _setPrototypeOf$6(n,i){return _setPrototypeOf$6=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},_setPrototypeOf$6(n,i)}function _createSuper$7(n){var i=_isNativeReflectConstruct$7();return function(){var t=_getPrototypeOf$7(n),o;if(i){var d=_getPrototypeOf$7(this).constructor;o=Reflect.construct(t,arguments,d)}else o=t.apply(this,arguments);return _possibleConstructorReturn$7(this,o)}}function _possibleConstructorReturn$7(n,i){if(i&&(_typeof$7(i)==="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$7(n)}function _assertThisInitialized$7(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function _isNativeReflectConstruct$7(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$7(n){return _getPrototypeOf$7=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf$7(n)}function _defineProperty$g(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}var StatefulContainer=(function(n){_inherits$7(e,n);var i=_createSuper$7(e);function e(){return _classCallCheck$7(this,e),i.apply(this,arguments)}return _createClass$7(e,[{key:"render",value:function(){return reactExports.createElement(StatefulContainer$1,this.props)}}]),e})(reactExports.Component);_defineProperty$g(StatefulContainer,"defaultProps",_objectSpread$f({},baseDefaultProps));function ownKeys$f(n,i){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);i&&(t=t.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),e.push.apply(e,t)}return e}function _objectSpread$e(n){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?ownKeys$f(Object(e),!0).forEach(function(t){_defineProperty$f(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$f(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _defineProperty$f(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}var Body$1=styled$1("div",function(n){return _objectSpread$e(_objectSpread$e({},getBodyStyles(n)),{},{backgroundColor:n.$theme.colors.tooltipBackground,borderTopLeftRadius:n.$theme.borders.radius300,borderTopRightRadius:n.$theme.borders.radius300,borderBottomRightRadius:n.$theme.borders.radius300,borderBottomLeftRadius:n.$theme.borders.radius300,boxShadow:n.$theme.lighting.shadow400,color:n.$theme.colors.tooltipText,transitionProperty:"opacity",transform:getEndPosition(n.$popoverOffset)})});Body$1.displayName="Body";Body$1.displayName="Body";var Inner=styled$1("div",function(n){return _objectSpread$e(_objectSpread$e(_objectSpread$e({},getInnerStyles(n)),{},{backgroundColor:n.$theme.colors.tooltipBackground,borderTopLeftRadius:n.$theme.borders.radius300,borderTopRightRadius:n.$theme.borders.radius300,borderBottomRightRadius:n.$theme.borders.radius300,borderBottomLeftRadius:n.$theme.borders.radius300,paddingTop:n.$theme.sizing.scale300,paddingBottom:n.$theme.sizing.scale300,paddingLeft:n.$theme.sizing.scale600,paddingRight:n.$theme.sizing.scale600},n.$theme.typography.font150),{},{color:n.$theme.colors.tooltipText})});Inner.displayName="Inner";Inner.displayName="Inner";var Arrow=styled$1("div",function(n){return _objectSpread$e(_objectSpread$e({},getArrowStyles(n)),{},{backgroundColor:n.$theme.colors.tooltipBackground})});Arrow.displayName="Arrow";Arrow.displayName="Arrow";function _typeof$6(n){"@babel/helpers - typeof";return _typeof$6=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},_typeof$6(n)}function ownKeys$e(n,i){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);i&&(t=t.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),e.push.apply(e,t)}return e}function _objectSpread$d(n){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?ownKeys$e(Object(e),!0).forEach(function(t){_defineProperty$e(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$e(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _extends$i(){return _extends$i=Object.assign?Object.assign.bind():function(n){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n},_extends$i.apply(this,arguments)}function _classCallCheck$6(n,i){if(!(n instanceof i))throw new TypeError("Cannot call a class as a function")}function _defineProperties$6(n,i){for(var e=0;e<i.length;e++){var t=i[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(n,t.key,t)}}function _createClass$6(n,i,e){return i&&_defineProperties$6(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n}function _inherits$6(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(i&&i.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),i&&_setPrototypeOf$5(n,i)}function _setPrototypeOf$5(n,i){return _setPrototypeOf$5=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},_setPrototypeOf$5(n,i)}function _createSuper$6(n){var i=_isNativeReflectConstruct$6();return function(){var t=_getPrototypeOf$6(n),o;if(i){var d=_getPrototypeOf$6(this).constructor;o=Reflect.construct(t,arguments,d)}else o=t.apply(this,arguments);return _possibleConstructorReturn$6(this,o)}}function _possibleConstructorReturn$6(n,i){if(i&&(_typeof$6(i)==="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$6(n)}function _assertThisInitialized$6(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function _isNativeReflectConstruct$6(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$6(n){return _getPrototypeOf$6=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf$6(n)}function _defineProperty$e(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}var Tooltip$2=(function(n){_inherits$6(e,n);var i=_createSuper$6(e);function e(){return _classCallCheck$6(this,e),i.apply(this,arguments)}return _createClass$6(e,[{key:"render",value:function(){var o=mergeOverrides({Arrow,Body:Body$1,Inner},this.props.overrides);return reactExports.createElement(Popover$2,_extends$i({autoFocus:!1,"data-baseweb":"tooltip"},this.props,{overrides:o}))}}]),e})(reactExports.Component);_defineProperty$e(Tooltip$2,"defaultProps",_objectSpread$d({},baseDefaultProps));var _excluded$k=["children"];function _objectWithoutProperties$h(n,i){if(n==null)return{};var e=_objectWithoutPropertiesLoose$g(n,i),t,o;if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(n);for(o=0;o<d.length;o++)t=d[o],!(i.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(n,t)&&(e[t]=n[t])}return e}function _objectWithoutPropertiesLoose$g(n,i){if(n==null)return{};var e={},t=Object.keys(n),o,d;for(d=0;d<t.length;d++)o=t[d],!(i.indexOf(o)>=0)&&(e[o]=n[o]);return e}function StatefulTooltip(n){var i=n.children,e=_objectWithoutProperties$h(n,_excluded$k);return reactExports.createElement(StatefulContainer,e,function(t){return reactExports.createElement(Tooltip$2,t,i)})}StatefulTooltip.defaultProps=StatefulContainer.defaultProps;const StyledWrapper=styled("div",{target:"etx0m6x0"})({display:"table",tableLayout:"fixed",width:"100%"}),StyledEllipsizedDiv=styled("div",{target:"etx0m6x1"})({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",display:"table-cell"}),StyledTooltipContentWrapper=styled("div",{target:"etx0m6x2"})(({theme:n})=>({boxSizing:"border-box",fontSize:`${n.fontSizes.sm}`,maxWidth:`calc(${n.sizes.contentMaxWidth} - 2 * ${n.spacing.threeXL})`,maxHeight:n.sizes.maxTooltipHeight,overflow:"auto",padding:`${n.spacing.xs} ${n.spacing.md}`,[`@media (max-width: ${n.breakpoints.sm})`]:{maxWidth:`calc(100% - ${n.spacing.threeXL})`},img:{maxWidth:"100%"},"*":{fontSize:n.fontSizes.sm}}));function useTooltipMeasurementSideEffect(n,i){const{innerWidth:e}=useWindowDimensionsContext();reactExports.useEffect(()=>{const t=n?.parentElement;if(!t)return;(async()=>{const d=()=>{const H=t.getBoundingClientRect();return H.x!==0||H.y!==0?H:null};let p=null,h=0;const y=5;for(;!p&&h<y;)p=d(),p||(h++,await new Promise(H=>requestAnimationFrame(H)));p||(p=t.getBoundingClientRect());const $=p.x,E=$+p.width-e,M=t.parentElement;if(E>0&&M){const H=new DOMMatrix(window.getComputedStyle(M)?.transform);M.style.transform=`translate3d(${H.e-E}px, ${H.f}px, 0px)`}$<0&&(t.style.left=`${-$}px`)})()},[n,i,e])}var Placement=(function(n){return n.AUTO="auto",n.TOP_LEFT="topLeft",n.TOP="top",n.TOP_RIGHT="topRight",n.RIGHT_TOP="rightTop",n.RIGHT="right",n.RIGHT_BOTTOM="rightBottom",n.BOTTOM_RIGHT="bottomRight",n.BOTTOM="bottom",n.BOTTOM_LEFT="bottomLeft",n.LEFT_BOTTOM="leftBottom",n.LEFT="left",n.LEFT_TOP="leftTop",n})({});const generateDefaultTooltipOverrides=(n,i)=>{const{colors:e,fontSizes:t,radii:o,fontWeights:d}=n;return{Body:{style:{borderTopLeftRadius:o.default,borderTopRightRadius:o.default,borderBottomLeftRadius:o.default,borderBottomRightRadius:o.default,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important",backgroundColor:"transparent"}},Inner:{style:{backgroundColor:hasLightBackgroundColor(n)?e.bgColor:e.secondaryBg,color:e.bodyText,fontSize:t.sm,fontWeight:d.normal,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important"},...i}}};function Tooltip({content:n,placement:i,children:e,inline:t,style:o,onMouseEnterDelay:d,overrides:p,containerWidth:h,error:y}){const $=useEmotionTheme(),[E,M]=reactExports.useState(null),[H,Z]=reactExports.useState(!1),be=reactExports.useRef(null),ye=reactExports.useCallback(()=>{Z(!0)},[]),we=reactExports.useCallback(()=>{Z(!1),be.current=null},[]);reactExports.useEffect(()=>()=>{be.current=null},[]);const xe=reactExports.useCallback(Fe=>{if(Fe.key!=="Escape"||!H)return;const Me=Fe.currentTarget,Le=Me.ownerDocument?.activeElement;Le instanceof HTMLElement&&Me.contains(Le)&&(be.current?.(),Fe.preventDefault(),Fe.stopPropagation())},[H]);useTooltipMeasurementSideEffect(E,H);const Ce=generateDefaultTooltipOverrides($,p),Ne=reactExports.useCallback(({close:Fe})=>(be.current=Fe,jsx$1(StyledTooltipContentWrapper,{className:y?"stTooltipErrorContent":"stTooltipContent","data-testid":y?"stTooltipErrorContent":"stTooltipContent",ref:M,children:n})),[n,y,M]);return jsx$1(StatefulTooltip,{onOpen:ye,onClose:we,content:n?Ne:null,placement:PLACEMENT[i],accessibilityType:ACCESSIBILITY_TYPE.tooltip,showArrow:!1,popoverMargin:10,onMouseEnterDelay:d,overrides:Ce,children:jsx$1("div",{style:{display:"flex",flexDirection:"row",justifyContent:t?"flex-end":"",width:h?"100%":"auto",...o},onKeyDownCapture:xe,"data-testid":y?"stTooltipErrorHoverTarget":"stTooltipHoverTarget",className:y?"stTooltipErrorHoverTarget":"stTooltipHoverTarget",children:e})})}const Tooltip$1=reactExports.memo(Tooltip);function OverflowTooltip({content:n,placement:i,children:e,inline:t,style:o}){const d=reactExports.useRef(null),[p,h]=reactExports.useState(!1);return reactExports.useEffect(()=>{const y=d?.current?d.current.offsetWidth<d.current.scrollWidth:!1;y!==p&&h(y)},[e,p]),jsx$1(Tooltip$1,{content:p?n:"",placement:i,inline:t,children:jsx$1(StyledWrapper,{children:jsx$1(StyledEllipsizedDiv,{ref:d,style:o,children:e})})})}function TooltipIcon(n){const{placement:i=Placement.AUTO,isLatex:e=!1,content:t,markdownProps:o,onMouseEnterDelay:d,containerWidth:p=!1}=n,h=useEmotionTheme(),y=E=>jsx$1(StyledTooltipTriggerButton,{type:"button","aria-label":E,children:jsx$1(HelpCircle,{className:"icon","aria-hidden":"true",focusable:"false",size:convertRemToPx(h.iconSizes.base)})}),$=()=>{if("children"in n)return reactExports.isValidElement(n.children)?n.children:y("Help");const E=n.ariaLabel.trim();return E.length?y(E):y("Help")};return jsx$1(StyledTooltipIconWrapper,{className:"stTooltipIcon","data-testid":"stTooltipIcon",isLatex:e,children:jsx$1(Tooltip$1,{content:jsx$1(StreamlitMarkdown$1,{style:{fontSize:h.fontSizes.sm},source:t,allowHTML:!1,...o||{}}),placement:i,onMouseEnterDelay:d,inline:!0,containerWidth:p,children:$()})})}function getHelpTooltipAriaLabel(n){const i=n?.trim(),e=i?i.replace(/\s+/g," "):null;return e?`Help for ${e}`:"Help"}const InlineTooltipIcon=({placement:n=Placement.TOP_RIGHT,isLatex:i=!1,content:e,markdownProps:t,onMouseEnterDelay:o,containerWidth:d,ariaLabel:p="Help"})=>jsx$1(StyledLabelHelpInline,{children:jsx$1(TooltipIcon,{placement:n,isLatex:i,content:e,markdownProps:t,onMouseEnterDelay:o,containerWidth:d,ariaLabel:p})});function convertRemToEm(n){return n.replace(/rem$/,"em")}function sharedMarkdownStyle(n){return{a:{color:n.colors.link,textDecoration:n.linkUnderline?"underline":"none","&:focus":{outline:"none",boxShadow:getPrimaryFocusBoxShadow(n),borderRadius:n.radii.default},"&:focus:not(:focus-visible)":{boxShadow:"none"},"&:focus-visible":{boxShadow:getPrimaryFocusBoxShadow(n),borderRadius:n.radii.default}}}}function convertFontSizes(n,i,e){if(i){const t=roundFontSizeToNearestEighth(parseFloat(n)*.65),o=`${Math.max(t,.75)}rem`;return e?convertRemToEm(o):o}return e?convertRemToEm(n):n}function getMarkdownHeadingDefinitions(n,i,e){return{"h1, h2, h3, h4, h5, h6":{fontFamily:n.genericFonts.headingFont,lineHeight:n.lineHeights.headings,margin:0,color:"inherit"},h1:{fontSize:convertFontSizes(n.fontSizes.h1FontSize,i,e),fontWeight:n.fontWeights.h1FontWeight,padding:`${n.spacing.xl} 0 ${n.spacing.lg} 0`},"h1 b, h1 strong":{fontWeight:n.fontWeights.h1FontWeight},"h2, h3":{letterSpacing:"-0.005em"},h2:{fontSize:convertFontSizes(n.fontSizes.h2FontSize,i,e),fontWeight:n.fontWeights.h2FontWeight,padding:`${n.spacing.lg} 0 ${n.spacing.lg} 0`},h3:{fontSize:convertFontSizes(n.fontSizes.h3FontSize,i,e),fontWeight:n.fontWeights.h3FontWeight,padding:`${n.spacing.md} 0 ${n.spacing.lg} 0`},h4:{fontSize:convertFontSizes(n.fontSizes.h4FontSize,i,e),fontWeight:n.fontWeights.h4FontWeight,padding:`${n.spacing.sm} 0 ${n.spacing.lg} 0`},h5:{fontSize:convertFontSizes(n.fontSizes.h5FontSize,i,e),fontWeight:n.fontWeights.h5FontWeight,padding:`${n.spacing.xs} 0 ${n.spacing.lg} 0`},h6:{fontSize:convertFontSizes(n.fontSizes.h6FontSize,i,e),fontWeight:n.fontWeights.h6FontWeight,padding:`${n.spacing.twoXS} 0 ${n.spacing.lg} 0`}}}const StyledStreamlitMarkdown=styled("div",{target:"e7eh38l0"})(({theme:n,isCaption:i,isInDialog:e,isLabel:t,inheritFont:o,boldLabel:d,largerLabel:p,isToast:h})=>{const y=t&&!p||h||i;return{fontFamily:o?"inherit":n.genericFonts.bodyFont,fontSize:o?"inherit":y?n.fontSizes.sm:n.fontSizes.md,marginBottom:t?"":`-${n.spacing.lg}`,opacity:i?.6:void 0,color:"inherit",maxWidth:"100%",width:t?"":"100%",overflowWrap:"break-word",...sharedMarkdownStyle(n),...getMarkdownHeadingDefinitions(n,e,i),"&:has(.katex-display)":{overflowX:"hidden"},p:{wordBreak:"break-word",marginBottom:t?n.spacing.none:"",fontWeight:o?"inherit":d?n.fontWeights.bold:"",marginTop:n.spacing.none,marginLeft:n.spacing.none,marginRight:n.spacing.none},img:{maxWidth:"100%",maxHeight:t?"1em":void 0,verticalAlign:"middle",objectFit:"scale-down"},li:{margin:"0.2em 0 0.2em 1.15em",padding:"0 0 0 0.3em"},"li.task-list-item":{listStyleType:"none",padding:"0",marginLeft:"0","input[type='checkbox']":{verticalAlign:"middle",margin:"0 0.35em 0.1em 0"}},blockquote:{margin:"1em 0 1em 0",padding:"0 0 0 0.75em",borderLeft:`0.15em solid ${n.colors.borderColor}`,opacity:.6},"b, strong":{fontWeight:n.fontWeights.bold},"b code, strong code":{fontWeight:n.fontWeights.codeBold},hr:{margin:"2em 0",padding:0,color:"inherit",backgroundColor:"transparent",border:"none",borderBottom:`${n.sizes.borderWidth} solid ${n.colors.borderColor}`,"&:not([size])":{height:n.sizes.borderWidth}},table:{display:"table",borderCollapse:"collapse",marginBottom:n.spacing.lg},tr:{borderTop:`${n.sizes.borderWidth} solid ${n.colors.dataframeBorderColor}`},th:{textAlign:"inherit"},"th, td":{padding:`${n.spacing.xs} ${n.spacing.md}`,border:`${n.sizes.borderWidth} solid ${n.colors.dataframeBorderColor}`},"span.stMarkdownColoredBackground":{borderRadius:n.radii.md,padding:`${n.spacing.threeXS} ${n.spacing.twoXS}`,margin:n.spacing.none,boxDecorationBreak:"clone"},"span.stMarkdownBadge":{borderRadius:n.radii.md,padding:`0 ${n.spacing.twoXS}`,margin:`0 ${n.spacing.px}`,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",display:"inline-block",verticalAlign:"middle"},"p, ol, ul, dl, li":{fontSize:"inherit"},"& > ul, & > ol":{display:"block",width:"fit-content",textAlign:"left"},"li > ul, li > ol":{display:"block"},".katex-display":{overflowX:"auto",overflowY:"hidden"},".katex":{fontWeight:n.fontWeights.normal}}}),StyledLinkIcon=styled("a",{target:"e7eh38l1"})(({theme:n})=>({lineHeight:0,display:"inline-flex",alignItems:"center",justifyContent:"center",opacity:0,pointerEvents:"none",transition:"opacity 150ms ease-in-out",svg:{stroke:n.colors.fadedText60,strokeWidth:2.25},"&:hover svg":{stroke:n.colors.bodyText},"&:focus-visible":{opacity:1,pointerEvents:"auto"}})),StyledHeadingWithActionElements=styled("div",{target:"e7eh38l2"})(({theme:n})=>({"h1, h2, h3, h4, h5, h6, span":{scrollMarginTop:n.sizes.headerHeight},...sharedMarkdownStyle(n),wordBreak:"break-word",textWrap:"pretty","&:hover, &:focus-within":{[StyledLinkIcon]:{opacity:1,pointerEvents:"auto"}}})),StyledHeadingActionElements=styled("span",{target:"e7eh38l3"})(({theme:n})=>({marginLeft:n.spacing.sm,display:"inline-flex",gap:n.spacing.sm,verticalAlign:"middle","& > *":{marginLeft:"0 !important"}})),StyledHeaderDivider=styled("hr",{target:"e7eh38l4"})(({theme:n,rainbow:i,color:e})=>({height:`${n.spacing.threeXS} !important`,marginTop:n.spacing.sm,marginBottom:n.spacing.none,border:"none",borderRadius:n.radii.full,...i?{background:e}:{backgroundColor:e}})),StyledPreWrapper=styled("div",{target:"e7eh38l5"})(({theme:n})=>({marginBottom:n.spacing.lg})),StyledHelpIconWrapper=styled("span",{target:"e7eh38l6"})({display:"inline-block",verticalAlign:"middle",transform:"translateY(-0.1em)"}),LOAD_FAILED=Symbol("plugin_load_failed"),pluginCache={katex:null,raw:null,emoji:null},loadingPromises={katex:null,raw:null,emoji:null},loadKatexPlugin=()=>__vitePreload(()=>import("./index.12y0V79l.js"),__vite__mapDeps([0,1,2]),import.meta.url),loadKatexStyles=once(()=>{__vitePreload(()=>Promise.resolve().then(()=>katex_min),void 0,import.meta.url)}),loadRehypeRaw=()=>__vitePreload(()=>import("./index.Dhp14dRq.js"),__vite__mapDeps([3,1,2]),import.meta.url),loadRemarkEmoji=()=>__vitePreload(()=>import("./index.CxeI_OXa.js"),__vite__mapDeps([4,5]),import.meta.url);function isLoadedPlugin(n){return n!==null&&n!==LOAD_FAILED}function extractPlugin(n,i){const e=[];let t=n,o=0;for(;t&&typeof t=="object"&&"default"in t&&o<5;){const d=t.default;if(e.push(d),d===t)break;t=d,o+=1}e.push(n);for(const d of e)if(typeof d=="function")return d;return console.warn(`[StreamlitMarkdown] Failed to load ${i} plugin`),LOAD_FAILED}function wrapRehypePlugin(n,i){return e=>{const t=n(e);return(o,d)=>{if(!o)return o;try{return t(o,d)}catch(p){return console.error(`[StreamlitMarkdown] ${i} crashed while transforming`,p),o}}}}function wrapRemarkPlugin(n,i){return e=>{const t=n(e);return(o,d)=>{if(!o)return o;try{return t(o,d)}catch(p){return console.error(`[StreamlitMarkdown] ${i} crashed while transforming`,p),o}}}}function useLazyPlugin(n){const{key:i,needed:e,load:t,pluginName:o,onBeforeLoad:d}=n,p=e?pluginCache[i]:null,[h,y]=reactExports.useState(null);return reactExports.useEffect(()=>{if(!e||p||h)return;const $=loadingPromises[i];if($){let H=!1;return $.then(Z=>{H||y(()=>Z)}),()=>{H=!0}}d?.();let E=!1;const M=t().then(H=>extractPlugin(H,o)).then(H=>(pluginCache[i]=H,E||y(()=>H),H)).catch(()=>{const H=LOAD_FAILED;return pluginCache[i]=H,E||y(()=>H),H}).finally(()=>{loadingPromises[i]=null});return loadingPromises[i]=M,()=>{E=!0}},[e,p,h,i,t,o,d]),e?p??h:null}const StreamlitSyntaxHighlighter$1=reactExports.lazy(()=>__vitePreload(()=>import("./StreamlitSyntaxHighlighter.C4EfgCCA.js"),__vite__mapDeps([6,2]),import.meta.url));function containsEmojiShortcodes(n){return/:(?!material\/|streamlit:)[\w+-][\w_+-]*:/.test(n)}function containsMathSyntax(n){return new RegExp("\\$\\$[\\s\\S]+?\\$\\$|\\$(?!\\s)[^$\\n]+?(?<!\\s)\\$").test(n)}var Tags=(function(n){return n.H1="h1",n.H2="h2",n.H3="h3",n})({});function rehypeSetCodeInlineProperty(){return n=>{visit(n,"element",(i,e,t)=>{i.tagName==="code"&&(t?.type==="element"&&t.tagName==="pre"?i.properties={...i.properties,inline:!1}:i.properties={...i.properties,inline:!0})})}}function createAnchorFromText(n){if(!n)return"";const i=slugify(n);return i.length>0?i:xxhash.h32(n,43981).toString(16)}function transformLinkUri(n){return n}const scrollNodeIntoView=once(n=>{n.scrollIntoView(!0)}),HeaderActionElements=({elementId:n,help:i,hideAnchor:e})=>{const t=useEmotionTheme();return!i&&e?jsx$1(Fragment,{}):jsxs(StyledHeadingActionElements,{"data-testid":"stHeaderActionElements",children:[i&&jsx$1(InlineTooltipIcon,{content:i}),n&&!e&&jsx$1(StyledLinkIcon,{href:`#${n}`,"aria-label":"Link to heading",children:jsx$1(Link2,{size:convertRemToPx(t.iconSizes.base),"aria-hidden":"true"})})]})},HeadingWithActionElements=({tag:n,anchor:i,help:e,hideAnchor:t,children:o,tagProps:d})=>{const p=reactExports.useContext(IsSidebarContext),h=reactExports.useContext(IsDialogContext),[y,$]=reactExports.useState(i),E=reactExports.useCallback(Fe=>{if(Fe===null)return;const Me=i||createAnchorFromText(Fe.textContent);$(Me);const Le=window.location.hash.slice(1);Le&&Le===Me&&scrollNodeIntoView(Fe)},[i]),M=p||h,H=jsx$1(HeaderActionElements,{elementId:y,help:e,hideAnchor:t||M}),Z=reactExports.useId(),be=e||y&&!t&&!M?Z:void 0,ye=y?{id:y}:{},we=be?{"aria-labelledby":be}:{},xe={...M?{}:{ref:E,...ye},...we},Ne=jsxs(n,{...d,...xe,children:[be?jsx$1("span",{id:be,children:o}):o,H]});return M?Ne:jsx$1(StyledHeadingWithActionElements,{"data-testid":"stHeadingWithActionElements",children:Ne})},CustomHeading=({node:n,children:i,...e})=>{const t=e["data-anchor"];return jsx$1(HeadingWithActionElements,{tag:n.tagName,anchor:t,tagProps:e,children:i})},CustomCodeTag=({inline:n,className:i,children:e,...t})=>{const o=/language-(\w+)/.exec(i||""),d=String(e??"").replace(/^\n/,"").replace(/\n$/,""),p=o?.[1]||"";return n?jsx$1(StyledInlineCode,{className:i,...omit(t,"node"),children:e}):jsx$1(ErrorBoundary,{children:jsx$1(reactExports.Suspense,{fallback:jsx$1(Skeleton,{element:Skeleton$1.create({style:Skeleton$1.SkeletonStyle.ELEMENT})}),children:jsx$1(StreamlitSyntaxHighlighter$1,{language:p,showLineNumbers:!1,children:d})})})},CustomPreTag=({children:n})=>jsx$1(StyledPreWrapper,{"data-testid":"stMarkdownPre",children:n}),CustomMediaTag=({node:n,...i})=>{const e=useCrossOriginAttribute(i.src),t=n.tagName,o={...i,crossOrigin:e};return jsx$1(t,{...o})},HelpTextContext=reactExports.createContext(void 0);HelpTextContext.displayName="HelpTextContext";const CustomHelpIcon=({children:n})=>{const e=reactExports.useContext(HelpTextContext)||(typeof n=="string"?n:"");return jsx$1(StyledHelpIconWrapper,{children:jsx$1(InlineTooltipIcon,{content:e})})},BASE_RENDERERS={pre:CustomPreTag,code:CustomCodeTag,h1:CustomHeading,h2:CustomHeading,h3:CustomHeading,h4:CustomHeading,h5:CustomHeading,h6:CustomHeading,img:CustomMediaTag,video:CustomMediaTag,audio:CustomMediaTag,"streamlit-help-icon":CustomHelpIcon};function createColorMapping(n){const{red:i,orange:e,yellow:t,green:o,blue:d,violet:p,purple:h,gray:y,primary:$}=getMarkdownTextColors(n),{redbg:E,orangebg:M,yellowbg:H,greenbg:Z,bluebg:be,violetbg:ye,purplebg:we,graybg:xe,primarybg:Ce}=getMarkdownBgColors(n);return new Map(Object.entries({red:`color: ${i}`,orange:`color: ${e}`,yellow:`color: ${t}`,blue:`color: ${d}`,green:`color: ${o}`,violet:`color: ${p}`,gray:`color: ${y}`,grey:`color: ${y}`,primary:`color: ${$}`,rainbow:`color: transparent; background-clip: text; -webkit-background-clip: text; background-image: linear-gradient(to right,
|
|
96
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$f(n,i){if(n){if(typeof n=="string")return _arrayLikeToArray$f(n,i);var e=Object.prototype.toString.call(n).slice(8,-1);if(e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set")return Array.from(n);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return _arrayLikeToArray$f(n,i)}}function _arrayLikeToArray$f(n,i){(i==null||i>n.length)&&(i=n.length);for(var e=0,t=new Array(i);e<i;e++)t[e]=n[e];return t}function _iterableToArrayLimit$f(n,i){var e=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(e!=null){var t=[],o=!0,d=!1,p,h;try{for(e=e.call(n);!(o=(p=e.next()).done)&&(t.push(p.value),!(i&&t.length===i));o=!0);}catch(y){d=!0,h=y}finally{try{!o&&e.return!=null&&e.return()}finally{if(d)throw h}}return t}}function _arrayWithHoles$f(n){if(Array.isArray(n))return n}var OPPOSITE_POSITIONS={top:"bottom",bottom:"top",right:"left",left:"right"};function getOppositePosition(n){return OPPOSITE_POSITIONS[n]}function isVerticalPosition(n){return n==="top"||n==="bottom"}function capitalize(n){return n.charAt(0).toUpperCase()+n.slice(1)}function fromPopperPlacement(n){var i=n.replace(/(top|bottom)-start$/,"$1Left").replace(/(top|bottom)-end$/,"$1Right").replace(/(left|right)-start$/,"$1Top").replace(/(left|right)-end$/,"$1Bottom");return PLACEMENT[i]||null}function splitPlacement(n){var i=n.match(/^([a-z]+)([A-Z][a-z]+)?/)||[];return i.slice(1,3).filter(Boolean).map(function(e){return e.toLowerCase()})}function getPopoverMarginStyles(n,i,e){var t=splitPlacement(i),o=_slicedToArray$f(t,1),d=o[0],p=getOppositePosition(d);if(!p)return null;var h="margin".concat(capitalize(p));return _defineProperty$j({},h,"".concat(n+e,"px"))}function getStartPosition(n,i,e,t){n=_objectSpread$i({},n);var o=splitPlacement(i),d=_slicedToArray$f(o,1),p=d[0],h=(e>0?e:t)*2;return isVerticalPosition(p)?n.top+=p==="top"?h:-h:n.left+=p==="left"?h:-h,"translate3d(".concat(n.left,"px, ").concat(n.top,"px, 0)")}function getEndPosition(n){return"translate3d(".concat(n.left,"px, ").concat(n.top,"px, 0)")}function getArrowPositionStyles(n,i){var e,t=splitPlacement(i),o=_slicedToArray$f(t,1),d=o[0],p=getOppositePosition(d);if(!p)return null;var h=isVerticalPosition(d)?"left":"top";return e={},_defineProperty$j(e,h,"".concat(n[h],"px")),_defineProperty$j(e,p,"-".concat(ARROW_SIZE-2,"px")),e}function ownKeys$i(n,i){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);i&&(t=t.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),e.push.apply(e,t)}return e}function _objectSpread$h(n){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?ownKeys$i(Object(e),!0).forEach(function(t){_defineProperty$i(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$i(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _defineProperty$i(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}function getBodyStyles(n){var i=n.$animationDuration,e=n.$isOpen,t=n.$isAnimating,o=n.$placement,d=n.$popoverOffset,p=n.$showArrow,h=n.$theme,y=n.$popoverMargin,$=n.$isHoverTrigger;return _objectSpread$h(_objectSpread$h({position:"absolute",top:0,left:0,backgroundColor:h.colors.backgroundTertiary,borderTopLeftRadius:h.borders.popoverBorderRadius,borderTopRightRadius:h.borders.popoverBorderRadius,borderBottomRightRadius:h.borders.popoverBorderRadius,borderBottomLeftRadius:h.borders.popoverBorderRadius,boxShadow:h.lighting.shadow600,transitionProperty:"opacity,transform",transitionDuration:t?e?"0.1s":"".concat(i,"ms"):"0s",transitionTimingFunction:e?h.animation.easeOutCurve:h.animation.easeInCurve,opacity:t&&e?1:0,transform:t&&e?getEndPosition(d):getStartPosition(d,o,p?ARROW_SIZE:0,y)},getPopoverMarginStyles(p?ARROW_SIZE:0,o,y)),$?{animationDuration:".1s",animationName:{"0%":{pointerEvents:"none"},"99%":{pointerEvents:"none"},"100%":{pointerEvents:"auto"}}}:{})}var Body$2=styled$1("div",getBodyStyles);Body$2.displayName="Body";Body$2.displayName="Body";function getArrowStyles(n){var i=n.$arrowOffset,e=n.$placement,t=n.$theme;return _objectSpread$h({backgroundColor:t.colors.backgroundTertiary,boxShadow:t.lighting.shadow600,width:"".concat(ARROW_WIDTH,"px"),height:"".concat(ARROW_WIDTH,"px"),transform:"rotate(45deg)",position:"absolute"},getArrowPositionStyles(i,e))}var Arrow$1=styled$1("div",getArrowStyles);Arrow$1.displayName="Arrow";Arrow$1.displayName="Arrow";function getInnerStyles(n){var i=n.$theme;return{backgroundColor:i.colors.backgroundTertiary,borderTopLeftRadius:i.borders.popoverBorderRadius,borderTopRightRadius:i.borders.popoverBorderRadius,borderBottomRightRadius:i.borders.popoverBorderRadius,borderBottomLeftRadius:i.borders.popoverBorderRadius,color:i.colors.contentPrimary,position:"relative"}}var Inner$1=styled$1("div",getInnerStyles);Inner$1.displayName="Inner";Inner$1.displayName="Inner";var Padding=styled$1("div",{paddingLeft:"12px",paddingTop:"12px",paddingRight:"12px",paddingBottom:"12px"});Padding.displayName="Padding";Padding.displayName="Padding";var Hidden=styled$1("div",{display:"none"});Hidden.displayName="Hidden";Hidden.displayName="Hidden";var baseDefaultProps$1={accessibilityType:ACCESSIBILITY_TYPE.menu,focusLock:!1,autoFocus:!0,returnFocus:!0,ignoreBoundary:!1,overrides:{},onMouseEnterDelay:200,onMouseLeaveDelay:200,placement:PLACEMENT.auto,showArrow:!1,triggerType:TRIGGER_TYPE.click,renderAll:!1};function ownKeys$h(n,i){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);i&&(t=t.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),e.push.apply(e,t)}return e}function _objectSpread$g(n){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?ownKeys$h(Object(e),!0).forEach(function(t){_defineProperty$h(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$h(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _extends$j(){return _extends$j=Object.assign?Object.assign.bind():function(n){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n},_extends$j.apply(this,arguments)}function _typeof$8(n){"@babel/helpers - typeof";return _typeof$8=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},_typeof$8(n)}function _classCallCheck$8(n,i){if(!(n instanceof i))throw new TypeError("Cannot call a class as a function")}function _defineProperties$8(n,i){for(var e=0;e<i.length;e++){var t=i[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(n,t.key,t)}}function _createClass$8(n,i,e){return i&&_defineProperties$8(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n}function _inherits$8(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(i&&i.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),i&&_setPrototypeOf$7(n,i)}function _setPrototypeOf$7(n,i){return _setPrototypeOf$7=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},_setPrototypeOf$7(n,i)}function _createSuper$8(n){var i=_isNativeReflectConstruct$8();return function(){var t=_getPrototypeOf$8(n),o;if(i){var d=_getPrototypeOf$8(this).constructor;o=Reflect.construct(t,arguments,d)}else o=t.apply(this,arguments);return _possibleConstructorReturn$8(this,o)}}function _possibleConstructorReturn$8(n,i){if(i&&(_typeof$8(i)==="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$8(n)}function _assertThisInitialized$8(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function _isNativeReflectConstruct$8(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$8(n){return _getPrototypeOf$8=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf$8(n)}function _defineProperty$h(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}var PopoverInner=(function(n){_inherits$8(e,n);var i=_createSuper$8(e);function e(){var t;_classCallCheck$8(this,e);for(var o=arguments.length,d=new Array(o),p=0;p<o;p++)d[p]=arguments[p];return t=i.call.apply(i,[this].concat(d)),_defineProperty$h(_assertThisInitialized$8(t),"animateInTimer",void 0),_defineProperty$h(_assertThisInitialized$8(t),"animateOutTimer",void 0),_defineProperty$h(_assertThisInitialized$8(t),"animateOutCompleteTimer",void 0),_defineProperty$h(_assertThisInitialized$8(t),"onMouseEnterTimer",void 0),_defineProperty$h(_assertThisInitialized$8(t),"onMouseLeaveTimer",void 0),_defineProperty$h(_assertThisInitialized$8(t),"anchorRef",reactExports.createRef()),_defineProperty$h(_assertThisInitialized$8(t),"popperRef",reactExports.createRef()),_defineProperty$h(_assertThisInitialized$8(t),"arrowRef",reactExports.createRef()),_defineProperty$h(_assertThisInitialized$8(t),"state",t.getDefaultState(t.props)),_defineProperty$h(_assertThisInitialized$8(t),"animateIn",function(){t.props.isOpen&&t.setState({isAnimating:!0})}),_defineProperty$h(_assertThisInitialized$8(t),"animateOut",function(){t.props.isOpen||(t.setState({isAnimating:!0}),t.animateOutCompleteTimer=setTimeout(function(){t.setState({isAnimating:!1,placement:t.props.placement})},t.props.animateOutTime||ANIMATE_OUT_TIME))}),_defineProperty$h(_assertThisInitialized$8(t),"onAnchorClick",function(h){t.props.onClick&&t.props.onClick(h)}),_defineProperty$h(_assertThisInitialized$8(t),"onAnchorMouseEnter",function(h){t.onMouseLeaveTimer&&clearTimeout(t.onMouseLeaveTimer),t.triggerOnMouseEnterWithDelay(h)}),_defineProperty$h(_assertThisInitialized$8(t),"onAnchorMouseLeave",function(h){t.onMouseEnterTimer&&clearTimeout(t.onMouseEnterTimer),t.triggerOnMouseLeaveWithDelay(h)}),_defineProperty$h(_assertThisInitialized$8(t),"onPopoverMouseEnter",function(){t.onMouseLeaveTimer&&clearTimeout(t.onMouseLeaveTimer)}),_defineProperty$h(_assertThisInitialized$8(t),"onPopoverMouseLeave",function(h){t.triggerOnMouseLeaveWithDelay(h)}),_defineProperty$h(_assertThisInitialized$8(t),"onPopperUpdate",function(h,y){var $=fromPopperPlacement(y.placement)||PLACEMENT.top;return t.setState({arrowOffset:h.arrow,popoverOffset:h.popper,placement:$}),t.animateInTimer=setTimeout(t.animateIn,ANIMATE_IN_TIME),y}),_defineProperty$h(_assertThisInitialized$8(t),"triggerOnMouseLeave",function(h){t.props.onMouseLeave&&t.props.onMouseLeave(h)}),_defineProperty$h(_assertThisInitialized$8(t),"triggerOnMouseEnter",function(h){t.props.onMouseEnter&&t.props.onMouseEnter(h)}),_defineProperty$h(_assertThisInitialized$8(t),"onDocumentClick",function(h){var y=h.composedPath?h.composedPath()[0]:h.target,$=t.popperRef.current,E=t.anchorRef.current;!$||$===y||y instanceof Node&&$.contains(y)||!E||E===y||y instanceof Node&&E.contains(y)||t.props.onClickOutside&&t.props.onClickOutside(h)}),t}return _createClass$8(e,[{key:"componentDidMount",value:function(){this.setState({isMounted:!0})}},{key:"componentDidUpdate",value:function(o,d){this.init(o,d),this.props.accessibilityType!==ACCESSIBILITY_TYPE.tooltip&&this.props.autoFocus&&!this.state.autoFocusAfterPositioning&&this.popperRef.current!==null&&this.popperRef.current.getBoundingClientRect().top>0&&this.setState({autoFocusAfterPositioning:!0})}},{key:"init",value:function(o,d){if(this.props.isOpen!==o.isOpen||this.state.isMounted!==d.isMounted||this.state.isLayerMounted!==d.isLayerMounted){if(this.props.isOpen&&this.state.isLayerMounted){this.clearTimers();return}if(!this.props.isOpen&&o.isOpen){this.animateOutTimer=setTimeout(this.animateOut,20);return}}}},{key:"componentWillUnmount",value:function(){this.clearTimers()}},{key:"getDefaultState",value:function(o){return{isAnimating:!1,arrowOffset:{left:0,top:0},popoverOffset:{left:0,top:0},placement:o.placement,isMounted:!1,isLayerMounted:!1,autoFocusAfterPositioning:!1}}},{key:"clearTimers",value:function(){[this.animateInTimer,this.animateOutTimer,this.animateOutCompleteTimer,this.onMouseEnterTimer,this.onMouseLeaveTimer].forEach(function(o){o&&clearTimeout(o)})}},{key:"triggerOnMouseLeaveWithDelay",value:function(o){var d=this,p=this.props.onMouseLeaveDelay;if(p){this.onMouseLeaveTimer=setTimeout(function(){return d.triggerOnMouseLeave(o)},p);return}this.triggerOnMouseLeave(o)}},{key:"triggerOnMouseEnterWithDelay",value:function(o){var d=this,p=this.props.onMouseEnterDelay;if(p){this.onMouseEnterTimer=setTimeout(function(){return d.triggerOnMouseEnter(o)},p);return}this.triggerOnMouseEnter(o)}},{key:"isClickTrigger",value:function(){return this.props.triggerType===TRIGGER_TYPE.click}},{key:"isHoverTrigger",value:function(){return this.props.triggerType===TRIGGER_TYPE.hover}},{key:"isAccessibilityTypeMenu",value:function(){return this.props.accessibilityType===ACCESSIBILITY_TYPE.menu}},{key:"isAccessibilityTypeTooltip",value:function(){return this.props.accessibilityType===ACCESSIBILITY_TYPE.tooltip}},{key:"getAnchorIdAttr",value:function(){var o=this.getPopoverIdAttr();return o?"".concat(o,"__anchor"):null}},{key:"getPopoverIdAttr",value:function(){return this.props.id||null}},{key:"getAnchorProps",value:function(){var o=this.props.isOpen,d={ref:this.anchorRef},p=this.getPopoverIdAttr();if(this.isAccessibilityTypeMenu()){var h=this.isClickTrigger()?"aria-controls":"aria-owns";d[h]=o?p:null,d["aria-haspopup"]=!0,d["aria-expanded"]=!!o}else this.isAccessibilityTypeTooltip()&&(d.id=this.getAnchorIdAttr(),d["aria-describedby"]=o?p:null);return this.isHoverTrigger()?(d.onMouseEnter=this.onAnchorMouseEnter,d.onMouseLeave=this.onAnchorMouseLeave,d.onBlur=this.props.onBlur,d.onFocus=this.props.onFocus):d.onClick=this.onAnchorClick,d}},{key:"getPopoverBodyProps",value:function(){var o={},d=this.getPopoverIdAttr();return this.isAccessibilityTypeMenu()?o.id=d:this.isAccessibilityTypeTooltip()&&(o.id=d,o.role="tooltip"),this.isHoverTrigger()&&(o.onMouseEnter=this.onPopoverMouseEnter,o.onMouseLeave=this.onPopoverMouseLeave),o}},{key:"getSharedProps",value:function(){var o=this.props,d=o.isOpen,p=o.showArrow,h=o.popoverMargin,y=h===void 0?POPOVER_MARGIN:h,$=this.state,E=$.isAnimating,M=$.arrowOffset,H=$.popoverOffset,Z=$.placement;return{$showArrow:!!p,$arrowOffset:M,$popoverOffset:H,$placement:Z,$isAnimating:E,$animationDuration:this.props.animateOutTime||ANIMATE_OUT_TIME,$isOpen:d,$popoverMargin:y,$isHoverTrigger:this.isHoverTrigger()}}},{key:"getAnchorFromChildren",value:function(){var o=this.props.children,d=reactExports.Children.toArray(o);return d.length!==1&&console.error("[baseui] Exactly 1 child must be passed to Popover/Tooltip, found ".concat(d.length," children")),d[0]}},{key:"renderAnchor",value:function(){var o=this.getAnchorFromChildren();if(!o)return null;var d=reactExports.isValidElement(o),p=this.getAnchorProps();return _typeof$8(o)==="object"&&d?reactExports.cloneElement(o,p):reactExports.createElement("span",_extends$j({key:"popover-anchor"},p),o)}},{key:"renderPopover",value:function(o){var d=this.props,p=d.showArrow,h=d.overrides,y=h===void 0?{}:h,$=y.Arrow,E=y.Body,M=y.Inner,H=getOverride($)||Arrow$1,Z=getOverride(E)||Body$2,be=getOverride(M)||Inner$1,ye=this.getSharedProps(),we=this.getPopoverBodyProps();return reactExports.createElement(Z,_extends$j({key:"popover-body",ref:this.popperRef,"data-baseweb":this.props["data-baseweb"]||"popover"},we,ye,getOverrideProps(E)),p?reactExports.createElement(H,_extends$j({key:"popover-arrow",ref:this.arrowRef},ye,getOverrideProps($))):null,reactExports.createElement(be,_extends$j({},ye,getOverrideProps(M)),o))}},{key:"renderContent",value:function(){var o=this.props.content;return typeof o=="function"?o():o}},{key:"render",value:function(){var o=this,d=this.state.isMounted&&(this.props.isOpen||this.state.isAnimating),p=[this.renderAnchor()],h=d||this.props.renderAll?this.renderContent():null,y={modifiers:{preventOverflow:{enabled:!this.props.ignoreBoundary,padding:0}}};return h&&(d?p.push(reactExports.createElement(Layer,{key:"new-layer",mountNode:this.props.mountNode,onEscape:this.props.onEsc,onDocumentClick:this.isHoverTrigger()?void 0:this.onDocumentClick,isHoverLayer:this.isHoverTrigger(),onMount:function(){return o.setState({isLayerMounted:!0})},onUnmount:function(){return o.setState({isLayerMounted:!1})}},reactExports.createElement(Tether,{anchorRef:this.anchorRef.current,arrowRef:this.arrowRef.current,popperRef:this.popperRef.current,popperOptions:_objectSpread$g(_objectSpread$g({},y),this.props.popperOptions),onPopperUpdate:this.onPopperUpdate,placement:this.state.placement},this.props.focusLock&&this.props.accessibilityType!==ACCESSIBILITY_TYPE.tooltip?reactExports.createElement(FocusLockCombination,{disabled:!this.props.focusLock,noFocusGuards:!1,returnFocus:!this.isHoverTrigger()&&this.props.returnFocus,autoFocus:this.state.autoFocusAfterPositioning,crossFrame:!1,focusOptions:this.props.focusOptions},this.renderPopover(h)):reactExports.createElement(MoveFocusInside,{disabled:!this.props.autoFocus||!this.state.autoFocusAfterPositioning},this.renderPopover(h))))):p.push(reactExports.createElement(Hidden,{key:"hidden-layer"},h))),p}}]),e})(reactExports.Component);_defineProperty$h(PopoverInner,"defaultProps",baseDefaultProps$1);var Popover$2=function n(i){var e=i.innerRef,t=useUID();return reactExports.createElement(PopoverInner,_extends$j({id:i.id||t,ref:e},i))};Popover$2.defaultProps=baseDefaultProps$1;var _excluded$l=["children"];function _objectWithoutProperties$i(n,i){if(n==null)return{};var e=_objectWithoutPropertiesLoose$h(n,i),t,o;if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(n);for(o=0;o<d.length;o++)t=d[o],!(i.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(n,t)&&(e[t]=n[t])}return e}function _objectWithoutPropertiesLoose$h(n,i){if(n==null)return{};var e={},t=Object.keys(n),o,d;for(d=0;d<t.length;d++)o=t[d],!(i.indexOf(o)>=0)&&(e[o]=n[o]);return e}function StatefulPopover(n){var i=n.children,e=_objectWithoutProperties$i(n,_excluded$l);return reactExports.createElement(StatefulContainer$1,e,function(t){return reactExports.createElement(Popover$2,t,i)})}StatefulPopover.defaultProps={accessibilityType:ACCESSIBILITY_TYPE.menu,ignoreBoundary:!1,overrides:{},onMouseEnterDelay:200,onMouseLeaveDelay:200,placement:PLACEMENT.auto,showArrow:!1,triggerType:TRIGGER_TYPE.click,dismissOnClickOutside:!0,dismissOnEsc:!0,stateReducer:function n(i,e){return e},popoverMargin:POPOVER_MARGIN};var baseDefaultProps={accessibilityType:ACCESSIBILITY_TYPE.tooltip,focusLock:!1,autoFocus:!1,returnFocus:!1,onMouseEnterDelay:200,onMouseLeaveDelay:200,overrides:{},placement:PLACEMENT.auto,popoverMargin:0,showArrow:!1,triggerType:TRIGGER_TYPE.hover,renderAll:!1};function _typeof$7(n){"@babel/helpers - typeof";return _typeof$7=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},_typeof$7(n)}function ownKeys$g(n,i){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);i&&(t=t.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),e.push.apply(e,t)}return e}function _objectSpread$f(n){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?ownKeys$g(Object(e),!0).forEach(function(t){_defineProperty$g(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$g(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _classCallCheck$7(n,i){if(!(n instanceof i))throw new TypeError("Cannot call a class as a function")}function _defineProperties$7(n,i){for(var e=0;e<i.length;e++){var t=i[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(n,t.key,t)}}function _createClass$7(n,i,e){return i&&_defineProperties$7(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n}function _inherits$7(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(i&&i.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),i&&_setPrototypeOf$6(n,i)}function _setPrototypeOf$6(n,i){return _setPrototypeOf$6=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},_setPrototypeOf$6(n,i)}function _createSuper$7(n){var i=_isNativeReflectConstruct$7();return function(){var t=_getPrototypeOf$7(n),o;if(i){var d=_getPrototypeOf$7(this).constructor;o=Reflect.construct(t,arguments,d)}else o=t.apply(this,arguments);return _possibleConstructorReturn$7(this,o)}}function _possibleConstructorReturn$7(n,i){if(i&&(_typeof$7(i)==="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$7(n)}function _assertThisInitialized$7(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function _isNativeReflectConstruct$7(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$7(n){return _getPrototypeOf$7=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf$7(n)}function _defineProperty$g(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}var StatefulContainer=(function(n){_inherits$7(e,n);var i=_createSuper$7(e);function e(){return _classCallCheck$7(this,e),i.apply(this,arguments)}return _createClass$7(e,[{key:"render",value:function(){return reactExports.createElement(StatefulContainer$1,this.props)}}]),e})(reactExports.Component);_defineProperty$g(StatefulContainer,"defaultProps",_objectSpread$f({},baseDefaultProps));function ownKeys$f(n,i){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);i&&(t=t.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),e.push.apply(e,t)}return e}function _objectSpread$e(n){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?ownKeys$f(Object(e),!0).forEach(function(t){_defineProperty$f(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$f(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _defineProperty$f(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}var Body$1=styled$1("div",function(n){return _objectSpread$e(_objectSpread$e({},getBodyStyles(n)),{},{backgroundColor:n.$theme.colors.tooltipBackground,borderTopLeftRadius:n.$theme.borders.radius300,borderTopRightRadius:n.$theme.borders.radius300,borderBottomRightRadius:n.$theme.borders.radius300,borderBottomLeftRadius:n.$theme.borders.radius300,boxShadow:n.$theme.lighting.shadow400,color:n.$theme.colors.tooltipText,transitionProperty:"opacity",transform:getEndPosition(n.$popoverOffset)})});Body$1.displayName="Body";Body$1.displayName="Body";var Inner=styled$1("div",function(n){return _objectSpread$e(_objectSpread$e(_objectSpread$e({},getInnerStyles(n)),{},{backgroundColor:n.$theme.colors.tooltipBackground,borderTopLeftRadius:n.$theme.borders.radius300,borderTopRightRadius:n.$theme.borders.radius300,borderBottomRightRadius:n.$theme.borders.radius300,borderBottomLeftRadius:n.$theme.borders.radius300,paddingTop:n.$theme.sizing.scale300,paddingBottom:n.$theme.sizing.scale300,paddingLeft:n.$theme.sizing.scale600,paddingRight:n.$theme.sizing.scale600},n.$theme.typography.font150),{},{color:n.$theme.colors.tooltipText})});Inner.displayName="Inner";Inner.displayName="Inner";var Arrow=styled$1("div",function(n){return _objectSpread$e(_objectSpread$e({},getArrowStyles(n)),{},{backgroundColor:n.$theme.colors.tooltipBackground})});Arrow.displayName="Arrow";Arrow.displayName="Arrow";function _typeof$6(n){"@babel/helpers - typeof";return _typeof$6=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},_typeof$6(n)}function ownKeys$e(n,i){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);i&&(t=t.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),e.push.apply(e,t)}return e}function _objectSpread$d(n){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?ownKeys$e(Object(e),!0).forEach(function(t){_defineProperty$e(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ownKeys$e(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function _extends$i(){return _extends$i=Object.assign?Object.assign.bind():function(n){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n},_extends$i.apply(this,arguments)}function _classCallCheck$6(n,i){if(!(n instanceof i))throw new TypeError("Cannot call a class as a function")}function _defineProperties$6(n,i){for(var e=0;e<i.length;e++){var t=i[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(n,t.key,t)}}function _createClass$6(n,i,e){return i&&_defineProperties$6(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n}function _inherits$6(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(i&&i.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),i&&_setPrototypeOf$5(n,i)}function _setPrototypeOf$5(n,i){return _setPrototypeOf$5=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},_setPrototypeOf$5(n,i)}function _createSuper$6(n){var i=_isNativeReflectConstruct$6();return function(){var t=_getPrototypeOf$6(n),o;if(i){var d=_getPrototypeOf$6(this).constructor;o=Reflect.construct(t,arguments,d)}else o=t.apply(this,arguments);return _possibleConstructorReturn$6(this,o)}}function _possibleConstructorReturn$6(n,i){if(i&&(_typeof$6(i)==="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$6(n)}function _assertThisInitialized$6(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function _isNativeReflectConstruct$6(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$6(n){return _getPrototypeOf$6=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf$6(n)}function _defineProperty$e(n,i,e){return i in n?Object.defineProperty(n,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[i]=e,n}var Tooltip$2=(function(n){_inherits$6(e,n);var i=_createSuper$6(e);function e(){return _classCallCheck$6(this,e),i.apply(this,arguments)}return _createClass$6(e,[{key:"render",value:function(){var o=mergeOverrides({Arrow,Body:Body$1,Inner},this.props.overrides);return reactExports.createElement(Popover$2,_extends$i({autoFocus:!1,"data-baseweb":"tooltip"},this.props,{overrides:o}))}}]),e})(reactExports.Component);_defineProperty$e(Tooltip$2,"defaultProps",_objectSpread$d({},baseDefaultProps));var _excluded$k=["children"];function _objectWithoutProperties$h(n,i){if(n==null)return{};var e=_objectWithoutPropertiesLoose$g(n,i),t,o;if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(n);for(o=0;o<d.length;o++)t=d[o],!(i.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(n,t)&&(e[t]=n[t])}return e}function _objectWithoutPropertiesLoose$g(n,i){if(n==null)return{};var e={},t=Object.keys(n),o,d;for(d=0;d<t.length;d++)o=t[d],!(i.indexOf(o)>=0)&&(e[o]=n[o]);return e}function StatefulTooltip(n){var i=n.children,e=_objectWithoutProperties$h(n,_excluded$k);return reactExports.createElement(StatefulContainer,e,function(t){return reactExports.createElement(Tooltip$2,t,i)})}StatefulTooltip.defaultProps=StatefulContainer.defaultProps;const StyledWrapper=styled("div",{target:"etx0m6x0"})({display:"table",tableLayout:"fixed",width:"100%"}),StyledEllipsizedDiv=styled("div",{target:"etx0m6x1"})({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",display:"table-cell"}),StyledTooltipContentWrapper=styled("div",{target:"etx0m6x2"})(({theme:n})=>({boxSizing:"border-box",fontSize:`${n.fontSizes.sm}`,maxWidth:`calc(${n.sizes.contentMaxWidth} - 2 * ${n.spacing.threeXL})`,maxHeight:n.sizes.maxTooltipHeight,overflow:"auto",padding:`${n.spacing.xs} ${n.spacing.md}`,[`@media (max-width: ${n.breakpoints.sm})`]:{maxWidth:`calc(100% - ${n.spacing.threeXL})`},img:{maxWidth:"100%"},"*":{fontSize:n.fontSizes.sm}}));function useTooltipMeasurementSideEffect(n,i){const{innerWidth:e}=useWindowDimensionsContext();reactExports.useEffect(()=>{const t=n?.parentElement;if(!t)return;(async()=>{const d=()=>{const H=t.getBoundingClientRect();return H.x!==0||H.y!==0?H:null};let p=null,h=0;const y=5;for(;!p&&h<y;)p=d(),p||(h++,await new Promise(H=>requestAnimationFrame(H)));p||(p=t.getBoundingClientRect());const $=p.x,E=$+p.width-e,M=t.parentElement;if(E>0&&M){const H=new DOMMatrix(window.getComputedStyle(M)?.transform);M.style.transform=`translate3d(${H.e-E}px, ${H.f}px, 0px)`}$<0&&(t.style.left=`${-$}px`)})()},[n,i,e])}var Placement=(function(n){return n.AUTO="auto",n.TOP_LEFT="topLeft",n.TOP="top",n.TOP_RIGHT="topRight",n.RIGHT_TOP="rightTop",n.RIGHT="right",n.RIGHT_BOTTOM="rightBottom",n.BOTTOM_RIGHT="bottomRight",n.BOTTOM="bottom",n.BOTTOM_LEFT="bottomLeft",n.LEFT_BOTTOM="leftBottom",n.LEFT="left",n.LEFT_TOP="leftTop",n})({});const generateDefaultTooltipOverrides=(n,i)=>{const{colors:e,fontSizes:t,radii:o,fontWeights:d}=n;return{Body:{style:{borderTopLeftRadius:o.default,borderTopRightRadius:o.default,borderBottomLeftRadius:o.default,borderBottomRightRadius:o.default,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important",backgroundColor:"transparent"}},Inner:{style:{backgroundColor:hasLightBackgroundColor(n)?e.bgColor:e.secondaryBg,color:e.bodyText,fontSize:t.sm,fontWeight:d.normal,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important"},...i}}};function Tooltip({content:n,placement:i,children:e,inline:t,style:o,onMouseEnterDelay:d,overrides:p,containerWidth:h,error:y}){const $=useEmotionTheme(),[E,M]=reactExports.useState(null),[H,Z]=reactExports.useState(!1),be=reactExports.useRef(null),ye=reactExports.useCallback(()=>{Z(!0)},[]),we=reactExports.useCallback(()=>{Z(!1),be.current=null},[]);reactExports.useEffect(()=>()=>{be.current=null},[]);const xe=reactExports.useCallback(Fe=>{if(Fe.key!=="Escape"||!H)return;const Me=Fe.currentTarget,Le=Me.ownerDocument?.activeElement;Le instanceof HTMLElement&&Me.contains(Le)&&(be.current?.(),Fe.preventDefault(),Fe.stopPropagation())},[H]);useTooltipMeasurementSideEffect(E,H);const Ce=generateDefaultTooltipOverrides($,p),Ne=reactExports.useCallback(({close:Fe})=>(be.current=Fe,jsx$1(StyledTooltipContentWrapper,{className:y?"stTooltipErrorContent":"stTooltipContent","data-testid":y?"stTooltipErrorContent":"stTooltipContent",ref:M,children:n})),[n,y,M]);return jsx$1(StatefulTooltip,{onOpen:ye,onClose:we,content:n?Ne:null,placement:PLACEMENT[i],accessibilityType:ACCESSIBILITY_TYPE.tooltip,showArrow:!1,popoverMargin:10,onMouseEnterDelay:d,overrides:Ce,children:jsx$1("div",{style:{display:"flex",flexDirection:"row",justifyContent:t?"flex-end":"",width:h?"100%":"auto",...o},onKeyDownCapture:xe,"data-testid":y?"stTooltipErrorHoverTarget":"stTooltipHoverTarget",className:y?"stTooltipErrorHoverTarget":"stTooltipHoverTarget",children:e})})}const Tooltip$1=reactExports.memo(Tooltip);function OverflowTooltip({content:n,placement:i,children:e,inline:t,style:o}){const d=reactExports.useRef(null),[p,h]=reactExports.useState(!1);return reactExports.useEffect(()=>{const y=d?.current?d.current.offsetWidth<d.current.scrollWidth:!1;y!==p&&h(y)},[e,p]),jsx$1(Tooltip$1,{content:p?n:"",placement:i,inline:t,children:jsx$1(StyledWrapper,{children:jsx$1(StyledEllipsizedDiv,{ref:d,style:o,children:e})})})}function TooltipIcon(n){const{placement:i=Placement.AUTO,isLatex:e=!1,content:t,markdownProps:o,onMouseEnterDelay:d,containerWidth:p=!1}=n,h=useEmotionTheme(),y=E=>jsx$1(StyledTooltipTriggerButton,{type:"button","aria-label":E,children:jsx$1(HelpCircle,{className:"icon","aria-hidden":"true",focusable:"false",size:convertRemToPx(h.iconSizes.base)})}),$=()=>{if("children"in n)return reactExports.isValidElement(n.children)?n.children:y("Help");const E=n.ariaLabel.trim();return E.length?y(E):y("Help")};return jsx$1(StyledTooltipIconWrapper,{className:"stTooltipIcon","data-testid":"stTooltipIcon",isLatex:e,children:jsx$1(Tooltip$1,{content:jsx$1(StreamlitMarkdown$1,{style:{fontSize:h.fontSizes.sm},source:t,allowHTML:!1,...o||{}}),placement:i,onMouseEnterDelay:d,inline:!0,containerWidth:p,children:$()})})}function getHelpTooltipAriaLabel(n){const i=n?.trim(),e=i?i.replace(/\s+/g," "):null;return e?`Help for ${e}`:"Help"}const InlineTooltipIcon=({placement:n=Placement.TOP_RIGHT,isLatex:i=!1,content:e,markdownProps:t,onMouseEnterDelay:o,containerWidth:d,ariaLabel:p="Help"})=>jsx$1(StyledLabelHelpInline,{children:jsx$1(TooltipIcon,{placement:n,isLatex:i,content:e,markdownProps:t,onMouseEnterDelay:o,containerWidth:d,ariaLabel:p})});function convertRemToEm(n){return n.replace(/rem$/,"em")}function sharedMarkdownStyle(n){return{a:{color:n.colors.link,textDecoration:n.linkUnderline?"underline":"none","&:focus":{outline:"none",boxShadow:getPrimaryFocusBoxShadow(n),borderRadius:n.radii.default},"&:focus:not(:focus-visible)":{boxShadow:"none"},"&:focus-visible":{boxShadow:getPrimaryFocusBoxShadow(n),borderRadius:n.radii.default}}}}function convertFontSizes(n,i,e){if(i){const t=roundFontSizeToNearestEighth(parseFloat(n)*.65),o=`${Math.max(t,.75)}rem`;return e?convertRemToEm(o):o}return e?convertRemToEm(n):n}function getMarkdownHeadingDefinitions(n,i,e){return{"h1, h2, h3, h4, h5, h6":{fontFamily:n.genericFonts.headingFont,lineHeight:n.lineHeights.headings,margin:0,color:"inherit"},h1:{fontSize:convertFontSizes(n.fontSizes.h1FontSize,i,e),fontWeight:n.fontWeights.h1FontWeight,padding:`${n.spacing.xl} 0 ${n.spacing.lg} 0`},"h1 b, h1 strong":{fontWeight:n.fontWeights.h1FontWeight},"h2, h3":{letterSpacing:"-0.005em"},h2:{fontSize:convertFontSizes(n.fontSizes.h2FontSize,i,e),fontWeight:n.fontWeights.h2FontWeight,padding:`${n.spacing.lg} 0 ${n.spacing.lg} 0`},h3:{fontSize:convertFontSizes(n.fontSizes.h3FontSize,i,e),fontWeight:n.fontWeights.h3FontWeight,padding:`${n.spacing.md} 0 ${n.spacing.lg} 0`},h4:{fontSize:convertFontSizes(n.fontSizes.h4FontSize,i,e),fontWeight:n.fontWeights.h4FontWeight,padding:`${n.spacing.sm} 0 ${n.spacing.lg} 0`},h5:{fontSize:convertFontSizes(n.fontSizes.h5FontSize,i,e),fontWeight:n.fontWeights.h5FontWeight,padding:`${n.spacing.xs} 0 ${n.spacing.lg} 0`},h6:{fontSize:convertFontSizes(n.fontSizes.h6FontSize,i,e),fontWeight:n.fontWeights.h6FontWeight,padding:`${n.spacing.twoXS} 0 ${n.spacing.lg} 0`}}}const StyledStreamlitMarkdown=styled("div",{target:"e7eh38l0"})(({theme:n,isCaption:i,isInDialog:e,isLabel:t,inheritFont:o,boldLabel:d,largerLabel:p,isToast:h})=>{const y=t&&!p||h||i;return{fontFamily:o?"inherit":n.genericFonts.bodyFont,fontSize:o?"inherit":y?n.fontSizes.sm:n.fontSizes.md,marginBottom:t?"":`-${n.spacing.lg}`,opacity:i?.6:void 0,color:"inherit",maxWidth:"100%",width:t?"":"100%",overflowWrap:"break-word",...sharedMarkdownStyle(n),...getMarkdownHeadingDefinitions(n,e,i),"&:has(.katex-display)":{overflowX:"hidden"},p:{wordBreak:"break-word",marginBottom:t?n.spacing.none:"",fontWeight:o?"inherit":d?n.fontWeights.bold:"",marginTop:n.spacing.none,marginLeft:n.spacing.none,marginRight:n.spacing.none},img:{maxWidth:"100%",maxHeight:t?"1em":void 0,verticalAlign:"middle",objectFit:"scale-down"},li:{margin:"0.2em 0 0.2em 1.15em",padding:"0 0 0 0.3em"},"li.task-list-item":{listStyleType:"none",padding:"0",marginLeft:"0","input[type='checkbox']":{verticalAlign:"middle",margin:"0 0.35em 0.1em 0"}},blockquote:{margin:"1em 0 1em 0",padding:"0 0 0 0.75em",borderLeft:`0.15em solid ${n.colors.borderColor}`,opacity:.6},"b, strong":{fontWeight:n.fontWeights.bold},"b code, strong code":{fontWeight:n.fontWeights.codeBold},hr:{margin:"2em 0",padding:0,color:"inherit",backgroundColor:"transparent",border:"none",borderBottom:`${n.sizes.borderWidth} solid ${n.colors.borderColor}`,"&:not([size])":{height:n.sizes.borderWidth}},table:{display:"table",borderCollapse:"collapse",marginBottom:n.spacing.lg},tr:{borderTop:`${n.sizes.borderWidth} solid ${n.colors.dataframeBorderColor}`},th:{textAlign:"inherit"},"th, td":{padding:`${n.spacing.xs} ${n.spacing.md}`,border:`${n.sizes.borderWidth} solid ${n.colors.dataframeBorderColor}`},"span.stMarkdownColoredBackground":{borderRadius:n.radii.md,padding:`${n.spacing.threeXS} ${n.spacing.twoXS}`,margin:n.spacing.none,boxDecorationBreak:"clone"},"span.stMarkdownBadge":{borderRadius:n.radii.md,padding:`0 ${n.spacing.twoXS}`,margin:`0 ${n.spacing.px}`,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",display:"inline-block",verticalAlign:"middle"},"p, ol, ul, dl, li":{fontSize:"inherit"},"& > ul, & > ol":{display:"block",width:"fit-content",textAlign:"left"},"li > ul, li > ol":{display:"block"},".katex-display":{overflowX:"auto",overflowY:"hidden"},".katex":{fontWeight:n.fontWeights.normal}}}),StyledLinkIcon=styled("a",{target:"e7eh38l1"})(({theme:n})=>({lineHeight:0,display:"inline-flex",alignItems:"center",justifyContent:"center",opacity:0,pointerEvents:"none",transition:"opacity 150ms ease-in-out",svg:{stroke:n.colors.fadedText60,strokeWidth:2.25},"&:hover svg":{stroke:n.colors.bodyText},"&:focus-visible":{opacity:1,pointerEvents:"auto"}})),StyledHeadingWithActionElements=styled("div",{target:"e7eh38l2"})(({theme:n})=>({"h1, h2, h3, h4, h5, h6, span":{scrollMarginTop:n.sizes.headerHeight},...sharedMarkdownStyle(n),wordBreak:"break-word",textWrap:"pretty","&:hover, &:focus-within":{[StyledLinkIcon]:{opacity:1,pointerEvents:"auto"}}})),StyledHeadingActionElements=styled("span",{target:"e7eh38l3"})(({theme:n})=>({marginLeft:n.spacing.sm,display:"inline-flex",gap:n.spacing.sm,verticalAlign:"middle","& > *":{marginLeft:"0 !important"}})),StyledHeaderDivider=styled("hr",{target:"e7eh38l4"})(({theme:n,rainbow:i,color:e})=>({height:`${n.spacing.threeXS} !important`,marginTop:n.spacing.sm,marginBottom:n.spacing.none,border:"none",borderRadius:n.radii.full,...i?{background:e}:{backgroundColor:e}})),StyledPreWrapper=styled("div",{target:"e7eh38l5"})(({theme:n})=>({marginBottom:n.spacing.lg})),StyledHelpIconWrapper=styled("span",{target:"e7eh38l6"})({display:"inline-block",verticalAlign:"middle",transform:"translateY(-0.1em)"}),LOAD_FAILED=Symbol("plugin_load_failed"),pluginCache={katex:null,raw:null,emoji:null},loadingPromises={katex:null,raw:null,emoji:null},loadKatexPlugin=()=>__vitePreload(()=>import("./index.HrvNEmn1.js"),__vite__mapDeps([0,1,2]),import.meta.url),loadKatexStyles=once(()=>{__vitePreload(()=>Promise.resolve().then(()=>katex_min),void 0,import.meta.url)}),loadRehypeRaw=()=>__vitePreload(()=>import("./index.CNXi20U2.js"),__vite__mapDeps([3,1,2]),import.meta.url),loadRemarkEmoji=()=>__vitePreload(()=>import("./index.Bd9Ju7cE.js"),__vite__mapDeps([4,5]),import.meta.url);function isLoadedPlugin(n){return n!==null&&n!==LOAD_FAILED}function extractPlugin(n,i){const e=[];let t=n,o=0;for(;t&&typeof t=="object"&&"default"in t&&o<5;){const d=t.default;if(e.push(d),d===t)break;t=d,o+=1}e.push(n);for(const d of e)if(typeof d=="function")return d;return console.warn(`[StreamlitMarkdown] Failed to load ${i} plugin`),LOAD_FAILED}function wrapRehypePlugin(n,i){return e=>{const t=n(e);return(o,d)=>{if(!o)return o;try{return t(o,d)}catch(p){return console.error(`[StreamlitMarkdown] ${i} crashed while transforming`,p),o}}}}function wrapRemarkPlugin(n,i){return e=>{const t=n(e);return(o,d)=>{if(!o)return o;try{return t(o,d)}catch(p){return console.error(`[StreamlitMarkdown] ${i} crashed while transforming`,p),o}}}}function useLazyPlugin(n){const{key:i,needed:e,load:t,pluginName:o,onBeforeLoad:d}=n,p=e?pluginCache[i]:null,[h,y]=reactExports.useState(null);return reactExports.useEffect(()=>{if(!e||p||h)return;const $=loadingPromises[i];if($){let H=!1;return $.then(Z=>{H||y(()=>Z)}),()=>{H=!0}}d?.();let E=!1;const M=t().then(H=>extractPlugin(H,o)).then(H=>(pluginCache[i]=H,E||y(()=>H),H)).catch(()=>{const H=LOAD_FAILED;return pluginCache[i]=H,E||y(()=>H),H}).finally(()=>{loadingPromises[i]=null});return loadingPromises[i]=M,()=>{E=!0}},[e,p,h,i,t,o,d]),e?p??h:null}const StreamlitSyntaxHighlighter$1=reactExports.lazy(()=>__vitePreload(()=>import("./StreamlitSyntaxHighlighter.D6tqIUNe.js"),__vite__mapDeps([6,2]),import.meta.url));function containsEmojiShortcodes(n){return/:(?!material\/|streamlit:)[\w+-][\w_+-]*:/.test(n)}function containsMathSyntax(n){return new RegExp("\\$\\$[\\s\\S]+?\\$\\$|\\$(?!\\s)[^$\\n]+?(?<!\\s)\\$").test(n)}var Tags=(function(n){return n.H1="h1",n.H2="h2",n.H3="h3",n})({});function rehypeSetCodeInlineProperty(){return n=>{visit(n,"element",(i,e,t)=>{i.tagName==="code"&&(t?.type==="element"&&t.tagName==="pre"?i.properties={...i.properties,inline:!1}:i.properties={...i.properties,inline:!0})})}}function createAnchorFromText(n){if(!n)return"";const i=slugify(n);return i.length>0?i:xxhash.h32(n,43981).toString(16)}function transformLinkUri(n){return n}const scrollNodeIntoView=once(n=>{n.scrollIntoView(!0)}),HeaderActionElements=({elementId:n,help:i,hideAnchor:e})=>{const t=useEmotionTheme();return!i&&e?jsx$1(Fragment,{}):jsxs(StyledHeadingActionElements,{"data-testid":"stHeaderActionElements",children:[i&&jsx$1(InlineTooltipIcon,{content:i}),n&&!e&&jsx$1(StyledLinkIcon,{href:`#${n}`,"aria-label":"Link to heading",children:jsx$1(Link2,{size:convertRemToPx(t.iconSizes.base),"aria-hidden":"true"})})]})},HeadingWithActionElements=({tag:n,anchor:i,help:e,hideAnchor:t,children:o,tagProps:d})=>{const p=reactExports.useContext(IsSidebarContext),h=reactExports.useContext(IsDialogContext),[y,$]=reactExports.useState(i),E=reactExports.useCallback(Fe=>{if(Fe===null)return;const Me=i||createAnchorFromText(Fe.textContent);$(Me);const Le=window.location.hash.slice(1);Le&&Le===Me&&scrollNodeIntoView(Fe)},[i]),M=p||h,H=jsx$1(HeaderActionElements,{elementId:y,help:e,hideAnchor:t||M}),Z=reactExports.useId(),be=e||y&&!t&&!M?Z:void 0,ye=y?{id:y}:{},we=be?{"aria-labelledby":be}:{},xe={...M?{}:{ref:E,...ye},...we},Ne=jsxs(n,{...d,...xe,children:[be?jsx$1("span",{id:be,children:o}):o,H]});return M?Ne:jsx$1(StyledHeadingWithActionElements,{"data-testid":"stHeadingWithActionElements",children:Ne})},CustomHeading=({node:n,children:i,...e})=>{const t=e["data-anchor"];return jsx$1(HeadingWithActionElements,{tag:n.tagName,anchor:t,tagProps:e,children:i})},CustomCodeTag=({inline:n,className:i,children:e,...t})=>{const o=/language-(\w+)/.exec(i||""),d=String(e??"").replace(/^\n/,"").replace(/\n$/,""),p=o?.[1]||"";return n?jsx$1(StyledInlineCode,{className:i,...omit(t,"node"),children:e}):jsx$1(ErrorBoundary,{children:jsx$1(reactExports.Suspense,{fallback:jsx$1(Skeleton,{element:Skeleton$1.create({style:Skeleton$1.SkeletonStyle.ELEMENT})}),children:jsx$1(StreamlitSyntaxHighlighter$1,{language:p,showLineNumbers:!1,children:d})})})},CustomPreTag=({children:n})=>jsx$1(StyledPreWrapper,{"data-testid":"stMarkdownPre",children:n}),CustomMediaTag=({node:n,...i})=>{const e=useCrossOriginAttribute(i.src),t=n.tagName,o={...i,crossOrigin:e};return jsx$1(t,{...o})},HelpTextContext=reactExports.createContext(void 0);HelpTextContext.displayName="HelpTextContext";const CustomHelpIcon=({children:n})=>{const e=reactExports.useContext(HelpTextContext)||(typeof n=="string"?n:"");return jsx$1(StyledHelpIconWrapper,{children:jsx$1(InlineTooltipIcon,{content:e})})},BASE_RENDERERS={pre:CustomPreTag,code:CustomCodeTag,h1:CustomHeading,h2:CustomHeading,h3:CustomHeading,h4:CustomHeading,h5:CustomHeading,h6:CustomHeading,img:CustomMediaTag,video:CustomMediaTag,audio:CustomMediaTag,"streamlit-help-icon":CustomHelpIcon};function createColorMapping(n){const{red:i,orange:e,yellow:t,green:o,blue:d,violet:p,purple:h,gray:y,primary:$}=getMarkdownTextColors(n),{redbg:E,orangebg:M,yellowbg:H,greenbg:Z,bluebg:be,violetbg:ye,purplebg:we,graybg:xe,primarybg:Ce}=getMarkdownBgColors(n);return new Map(Object.entries({red:`color: ${i}`,orange:`color: ${e}`,yellow:`color: ${t}`,blue:`color: ${d}`,green:`color: ${o}`,violet:`color: ${p}`,gray:`color: ${y}`,grey:`color: ${y}`,primary:`color: ${$}`,rainbow:`color: transparent; background-clip: text; -webkit-background-clip: text; background-image: linear-gradient(to right,
|
|
97
97
|
${i}, ${e}, ${t}, ${o}, ${d}, ${p}, ${h});`,"red-background":`background-color: ${E}`,"orange-background":`background-color: ${M}`,"yellow-background":`background-color: ${H}`,"blue-background":`background-color: ${be}`,"green-background":`background-color: ${Z}`,"violet-background":`background-color: ${ye}`,"gray-background":`background-color: ${xe}`,"grey-background":`background-color: ${xe}`,"primary-background":`background-color: ${Ce}`,"rainbow-background":`background: linear-gradient(to right,
|
|
98
98
|
${E}, ${M}, ${H}, ${Z}, ${be}, ${ye}, ${we});`}))}function createRemarkHelpIcon(){return()=>n=>(visit(n,"textDirective",(i,e,t)=>{if(String(i.name)==="help"){const d=i.data||(i.data={});d.hName="streamlit-help-icon",d.hProperties=d.hProperties||{};return}}),n)}function createRemarkColoringAndSmall(n,i){return()=>e=>(visit(e,"textDirective",(t,o,d)=>{const p=String(t.name);if(p==="small"){const y=t.data||(t.data={});y.hName="span",y.hProperties=y.hProperties||{},y.hProperties.style=`font-size: ${n.fontSizes.sm};`;return}const h=p.match(/^(.+)-badge$/);if(h&&i.has(h[1])){const y=h[1];if(y==="rainbow")return;const $=i.get(y),E=i.get(`${y}-background`);if($&&E){const M=t.data||(t.data={});M.hName="span",M.hProperties=M.hProperties||{},M.hProperties.className="stMarkdownBadge",M.hProperties.style=`${E}; ${$}; font-size: ${n.fontSizes.sm};`;return}}if(i.has(p)){const y=t.data||(t.data={}),$=i.get(p);y.hName="span",y.hProperties=y.hProperties||{},y.hProperties.style=$,y.hProperties.className="stMarkdownColoredText",$&&(/background-color:/.test($)||/background:/.test($))&&(y.hProperties.className="stMarkdownColoredBackground");return}}),e)}function createRemarkUnsupportedDirectivesCleanup(){return()=>n=>(visit(n,"textDirective",(i,e,t)=>{if(!i.data?.hName&&t&&e!==void 0){const o={type:"text",value:`:${i.name}`};t.children[e]=o}}),n)}function createRemarkMaterialIcons(n){return()=>i=>{function e(t,o){return{type:"text",value:t,data:{hName:"span",hProperties:{role:"img",ariaLabel:o+" icon",translate:"no",style:`
|
|
99
99
|
display: inline-block;
|
|
@@ -116,7 +116,7 @@ For more information, refer to the [documentation for forms](https://docs.stream
|
|
|
116
116
|
${n.stackTrace?.join(`
|
|
117
117
|
`)}`,t=`https://www.google.com/search?q=${encodeURIComponent(i)}`,o=`https://chatgpt.com/?q=${encodeURIComponent(e)}`,{copyToClipboard:d}=useCopyToClipboard(),p=reactExports.useCallback(()=>{d(e)},[d,e]);return jsx$1("div",{className:"stException","data-testid":"stException",children:jsx$1(AlertContainer,{kind:n.isWarning?Kind.WARNING:Kind.ERROR,children:jsxs(StyledExceptionWrapper,{children:[jsx$1(StyledExceptionMessage,{"data-testid":"stExceptionMessage",children:jsx$1(ExceptionMessage,{type:n.type,message:n.message,messageIsMarkdown:n.messageIsMarkdown})}),n.stackTrace&&n.stackTrace.length>0?jsx$1(StackTrace,{stackTrace:n.stackTrace}):null,isLocalhost()&&jsxs(StyledExceptionLinks,{children:[jsx$1(StyledExceptionCopyButton,{onClick:p,children:"Copy"}),jsx$1("a",{href:t,target:"_blank",rel:"noopener noreferrer",children:"Ask Google"}),jsx$1("a",{href:o,target:"_blank",rel:"noopener noreferrer",children:"Ask ChatGPT"})]})]})})})}const ExceptionElement$1=reactExports.memo(ExceptionElement),SINGLE_BADGE_REGEX=/^:\w+-badge\[((?:\\.|[^\]\\])*)\]$/;function Markdown({element:n}){const{allowHtml:i,body:e,elementType:t,help:o,isCaption:d}=n,p=t===Markdown$3.Type.LATEX,h=t===Markdown$3.Type.NATIVE&&SINGLE_BADGE_REGEX.test(e.trim());let y;if(o&&h)y=jsx$1(BaseButtonTooltip,{help:o,containerWidth:!1,children:jsx$1(StreamlitMarkdown$1,{isCaption:d,source:e,allowHTML:i})});else if(o&&p)y=jsxs(StyledLabelHelpWrapper,{isLatex:p,children:[jsx$1(StreamlitMarkdown$1,{isCaption:d,source:e,allowHTML:i}),jsx$1(InlineTooltipIcon,{content:o,isLatex:p})]});else{const $=o?`${e} :help[]`:e;y=jsx$1(StyledLabelHelpWrapper,{isLatex:p,children:jsx$1(StreamlitMarkdown$1,{isCaption:d,source:$,allowHTML:i,helpText:o})})}return jsx$1("div",{className:"stMarkdown","data-testid":"stMarkdown",children:y})}const Markdown$1=reactExports.memo(Markdown),StyledText=styled("span",{target:"edwxmgj0"})(({theme:n})=>({fontFamily:n.genericFonts.bodyFont,color:n.colors.bodyText,whiteSpace:"pre-line",whiteSpaceCollapse:"preserve",wordBreak:"break-word",display:"inline-block",verticalAlign:"middle",width:"100%"})),StyledInlineHelpIcon=styled("span",{target:"edwxmgj1"})(({theme:n})=>({display:"inline-block",verticalAlign:"middle",marginLeft:n.spacing.twoXS,transform:"translateY(-0.05em)"}));function TextElement({element:n}){return jsx$1(StyledLabelHelpWrapper,{className:"stText","data-testid":"stText",children:jsxs(StyledText,{children:[n.body,n.help&&jsx$1(StyledInlineHelpIcon,{children:jsx$1(InlineTooltipIcon,{content:n.help})})]})})}const TextElement$1=reactExports.memo(TextElement),katex_min=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function makeMarkdownHeading(n,i){switch(n.toLowerCase()){case Tags.H1:return`# ${i}`;case Tags.H2:return`## ${i}`;case Tags.H3:return`### ${i}`;default:throw new Error(`Unrecognized tag for header: ${n}`)}}const OVERRIDE_COMPONENTS={p:reactExports.Fragment,h1:reactExports.Fragment,h2:reactExports.Fragment,h3:reactExports.Fragment,h4:reactExports.Fragment,h5:reactExports.Fragment,h6:reactExports.Fragment};function Heading(n){const{element:i}=n,{tag:e,anchor:t,body:o,help:d,hideAnchor:p,divider:h}=i,y=reactExports.useContext(IsDialogContext),[$,...E]=o.split(`
|
|
118
118
|
`);return jsxs("div",{className:"stHeading","data-testid":"stHeading",children:[jsxs(StyledStreamlitMarkdown,{isCaption:!1,isInDialog:y,"data-testid":"stMarkdownContainer",children:[jsx$1(HeadingWithActionElements,{anchor:t,help:d,hideAnchor:p,tag:e,children:jsx$1(RenderedMarkdown,{allowHTML:!1,source:makeMarkdownHeading(e,$),overrideComponents:OVERRIDE_COMPONENTS})}),E.length>0&&jsx$1(RenderedMarkdown,{source:E.join(`
|
|
119
|
-
`),allowHTML:!1})]}),h&&jsx$1(StyledHeaderDivider,{"data-testid":"stHeadingDivider",rainbow:h.includes("linear"),color:h})]})}const StyledCheckbox$1=styled("div",{target:"eg2gxky0"})(({theme:n})=>({display:"flex",alignItems:"center",minHeight:n.sizes.smallElementHeight})),StyledContent=styled("div",{target:"eg2gxky1"})(({visibility:n})=>({display:n===LabelVisibilityOptions.Collapsed?"none":"flex",visibility:n===LabelVisibilityOptions.Hidden?"hidden":"visible",verticalAlign:"middle",flexDirection:"row",alignItems:"center"}));function translateGapWidth(n,i){let e=i.spacing.lg;return n===streamlit.GapSize.MEDIUM?e=i.spacing.threeXL:n===streamlit.GapSize.LARGE?e=i.spacing.fourXL:n===streamlit.GapSize.NONE&&(e=i.spacing.none),e}const StyledSpace=styled("div",{target:"e1wleg6g0"})({width:"100%",height:"100%"}),GLOBAL_ELEMENTS=["balloons","snow"],StyledElementContainer=styled("div",{target:"e1wleg6g1"})(({theme:n,isStale:i,width:e,height:t,elementType:o,overflow:d,flex:p,minWidth:h,textAlign:y})=>({width:e,height:t,textAlign:y,maxWidth:"100%",minWidth:e==="0px"?0:h??"1rem",position:"relative",overflow:d,flex:p,"@media print":{overflow:"visible"},":has(> .stCacheSpinner)":{height:n.spacing.none,overflow:"visible",visibility:"visible",marginBottom:`-${n.spacing.lg}`,zIndex:n.zIndices.cacheSpinner},":has(> .stPageLink)":{marginTop:`-${n.spacing.xs}`,marginBottom:`-${n.spacing.xs}`},...i&&o!=="skeleton"&&STALE_STYLES,...o==="empty"?{display:"none"}:{},...o==="space"?{minWidth:0,minHeight:0}:{},...GLOBAL_ELEMENTS.includes(o)?{marginBottom:`-${n.spacing.lg}`}:{}})),StyledColumn=styled("div",{target:"e1wleg6g2"})(({theme:n,weight:i,gap:e,showBorder:t,verticalAlignment:o})=>{const{VerticalAlignment:d}=Block$1.Column,p=i*100,h=translateGapWidth(e,n),y=h===n.spacing.none?`${p}%`:`calc(${p}% - ${h})`;return{width:y,flex:`1 1 ${y}`,[`@media (max-width: ${n.breakpoints.columns})`]:{minWidth:`calc(100% - ${n.spacing.twoXL})`},...o===d.BOTTOM&&{marginTop:"auto",[`& ${StyledElementContainer}:last-of-type > ${StyledCheckbox$1}`]:{marginBottom:n.spacing.sm}},...o===d.TOP&&{[`& ${StyledElementContainer}:first-of-type > ${StyledCheckbox$1}`]:{marginTop:n.spacing.sm}},...o===d.CENTER&&{marginTop:"auto",marginBottom:"auto"},...t&&{border:`${n.sizes.borderWidth} solid ${n.colors.borderColor}`,borderRadius:n.radii.default,padding:`calc(${n.spacing.lg} - ${n.sizes.borderWidth})`}}}),getAlignItems=n=>{switch(n){case Block$1.FlexContainer.Align.ALIGN_START:return"start";case Block$1.FlexContainer.Align.ALIGN_CENTER:return"center";case Block$1.FlexContainer.Align.ALIGN_END:return"end";case Block$1.FlexContainer.Align.STRETCH:return"stretch";case Block$1.FlexContainer.Align.ALIGN_UNDEFINED:case void 0:case null:return"stretch";default:assertNever(n)}},getJustifyContent=n=>{switch(n){case Block$1.FlexContainer.Justify.JUSTIFY_START:return"start";case Block$1.FlexContainer.Justify.JUSTIFY_CENTER:return"center";case Block$1.FlexContainer.Justify.JUSTIFY_END:return"end";case Block$1.FlexContainer.Justify.SPACE_BETWEEN:return"space-between";case Block$1.FlexContainer.Justify.JUSTIFY_UNDEFINED:case void 0:case null:return"start";default:assertNever(n)}},StyledFlexContainerBlock=styled("div",{target:"e1wleg6g3"})(({theme:n,direction:i,gap:e,flex:t,$wrap:o,height:d,border:p,align:h,justify:y,overflow:$})=>{let E;return e!==void 0&&(E=translateGapWidth(e,n)),{display:"flex",gap:E,width:"100%",maxWidth:"100%",height:d??"auto",minWidth:"1rem",flexDirection:i,flex:t,alignItems:getAlignItems(h),justifyContent:getJustifyContent(y),flexWrap:o?"wrap":"nowrap",...p&&{border:`${n.sizes.borderWidth} solid ${n.colors.borderColor}`,borderRadius:n.radii.default,padding:`calc(${n.spacing.lg} - ${n.sizes.borderWidth})`},overflow:$}}),StyledLayoutWrapper=styled("div",{target:"e1wleg6g4"})(({width:n,height:i,flex:e})=>({display:"flex",flexDirection:"column",width:n,maxWidth:"100%",minWidth:"1rem",height:i,flex:e})),LARGE_STRETCH_BEHAVIOR$1=["graphvizChart","arrowVegaLiteChart","deckGlJsonChart","plotlyChart","docString","arrowDataFrame","json","audioInput","fileUploader","cameraInput","audio","video","code","buttonGroup","iframe"],MEDIUM_STRETCH_BEHAVIOR$1=["dateInput","radio","slider","textArea","progress","multiselect","selectbox","timeInput","numberInput","textInput"],WIDTH_STRETCH_OVERRIDE=["componentInstance","skeleton"],VISIBLE_OVERFLOW_OVERRIDE=["iframe","arrowDataFrame","deckGlJsonChart","arrowVegaLiteChart","graphvizChart"],StyledElementContainerLayoutWrapper=({node:n,...i})=>{const{isInHorizontalLayout:e,isInRoot:t}=useRequiredContext(FlexContext);let o;LARGE_STRETCH_BEHAVIOR$1.includes(n.element.type??"")?o="14rem":MEDIUM_STRETCH_BEHAVIOR$1.includes(n.element.type??"")&&(o="8rem"),n.element.type==="buttonGroup"&&n.element.buttonGroup?.style===ButtonGroup$1.Style.BORDERLESS&&(o="fit-content");const d=reactExports.useMemo(()=>{const h={};if(WIDTH_STRETCH_OVERRIDE.includes(n.element.type??"")&&(h.width="100%"),VISIBLE_OVERFLOW_OVERRIDE.includes(n.element.type??"")&&(h.overflow="visible"),n.element.type==="textArea")return n.element.heightConfig?.useStretch?{height:"100%",flex:"1 1 8rem"}:e?{height:"auto"}:{height:"auto",flex:""};if(n.element.type==="arrowVegaLiteChart")return n.element.widthConfig?.useContent&&t&&(h.width="100%"),e&&!n.element.widthConfig&&(h.flex="1 1 14rem"),h;if(n.element.type==="arrowDataFrame")return n.element.widthConfig?.useContent&&t&&(h.width="100%"),h;if(n.element.type==="imgs"){const y=!n.element.widthConfig||n.element.widthConfig.useStretch;h.width=y?"100%":"auto"}return h},[n.element.type,n.element.heightConfig?.useStretch,e,t,n.element.widthConfig]);let p=useLayoutStyles({element:n.element,subElement:n.element?.type&&n.element[n.element.type]||void 0,styleOverrides:d,minStretchBehavior:o});return n.element.type==="space"&&(e?p={...p,height:"auto"}:p={...p,width:"auto"}),jsx$1(StyledElementContainer,{...i,...p})},ArrowTable=reactExports.lazy(()=>__vitePreload(()=>import("./index.CQhTluFq.js"),__vite__mapDeps([7,8,9,10,11]),import.meta.url)),ArrowVegaLiteChart=reactExports.lazy(()=>__vitePreload(()=>import("./index.DfbB_5Z-.js"),__vite__mapDeps([12,13,14,15,16,9,8,10,11,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33]),import.meta.url)),Audio=reactExports.lazy(()=>__vitePreload(()=>import("./index.CsrQPO4k.js"),[],import.meta.url)),Balloons=reactExports.lazy(()=>__vitePreload(()=>import("./index.DJxfjWh8.js"),__vite__mapDeps([34,35]),import.meta.url)),DeckGlJsonChart=reactExports.lazy(()=>__vitePreload(()=>import("./index.DzIOW22k.js"),__vite__mapDeps([36,25,13,14,17,37,16,30,31,38]),import.meta.url)),GraphVizChart=reactExports.lazy(()=>__vitePreload(()=>import("./index.CHxfXEQs.js"),__vite__mapDeps([39,32,31,13,14]),import.meta.url)),Html=reactExports.lazy(()=>__vitePreload(()=>import("./index.DRnQbU3d.js"),[],import.meta.url)),IFrame=reactExports.lazy(()=>__vitePreload(()=>import("./index.BSpyyZms.js"),__vite__mapDeps([40,41]),import.meta.url)),ImageList=reactExports.lazy(()=>__vitePreload(()=>import("./index.BKpNjc6p.js"),__vite__mapDeps([42,13,14]),import.meta.url)),Json=reactExports.lazy(()=>__vitePreload(()=>import("./index.D_ifDEh-.js"),__vite__mapDeps([43,17,18]),import.meta.url)),LinkButton=reactExports.lazy(()=>__vitePreload(()=>import("./index.BO68LeZH.js"),__vite__mapDeps([44,45]),import.meta.url)),Metric=reactExports.lazy(()=>__vitePreload(()=>import("./index.BAmLrdtI.js"),__vite__mapDeps([46,29,30,31,32,47,20,10,21]),import.meta.url)),PageLink=reactExports.lazy(()=>__vitePreload(()=>import("./index.8qTg2RM9.js"),__vite__mapDeps([48,45]),import.meta.url)),PlotlyChart=reactExports.lazy(()=>__vitePreload(()=>import("./index.B5uiXC5d.js"),__vite__mapDeps([49,13,16]),import.meta.url)),Progress=reactExports.lazy(()=>__vitePreload(()=>import("./index.DYHH1mfr.js"),__vite__mapDeps([50,51]),import.meta.url)),Snow=reactExports.lazy(()=>__vitePreload(()=>import("./index.CjByu9X-.js"),__vite__mapDeps([52,35]),import.meta.url)),Spinner=reactExports.lazy(()=>__vitePreload(()=>import("./index.DvTvKaqe.js"),[],import.meta.url)),StreamlitSyntaxHighlighter=reactExports.lazy(()=>__vitePreload(()=>import("./StreamlitSyntaxHighlighter.C4EfgCCA.js"),__vite__mapDeps([6,2]),import.meta.url)),Toast=reactExports.lazy(()=>__vitePreload(()=>import("./index.DaMZ1GDB.js"),[],import.meta.url)),Video=reactExports.lazy(()=>__vitePreload(()=>import("./index.ZSnCX0Ea.js"),[],import.meta.url)),AudioInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.CoNSg7Jn.js"),__vite__mapDeps([53,54,14,16,24,55,26]),import.meta.url)),ArrowDataFrame=reactExports.lazy(()=>__vitePreload(()=>import("./index.B-4FZ0nj.js").then(n=>n.c),__vite__mapDeps([15,13,14,16,9,8,10,11,17,18,19,20,21,22,23,24,25,26,27,28]),import.meta.url)),Button=reactExports.lazy(()=>__vitePreload(()=>import("./index.SS0fb-z0.js"),__vite__mapDeps([56,45]),import.meta.url)),ButtonGroup=reactExports.lazy(()=>__vitePreload(()=>import("./index.mVwG03J8.js"),__vite__mapDeps([57,47,37,16]),import.meta.url)),ComponentInstance=reactExports.lazy(()=>__vitePreload(()=>import("./index.Ml__cfHd.js"),__vite__mapDeps([58,59,55,41]),import.meta.url).then(n=>({default:n.ComponentInstance}))),CameraInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.LEwNBspG.js"),__vite__mapDeps([60,61,16,51,55]),import.meta.url)),ChatInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.mykhZq0V.js"),__vite__mapDeps([62,63,61,54,64,65,66,67,33,68]),import.meta.url)),Checkbox=reactExports.lazy(()=>__vitePreload(()=>import("./index.DQQMDt36.js"),__vite__mapDeps([69,47,37,16,23]),import.meta.url)),ColorPicker=reactExports.lazy(()=>__vitePreload(()=>import("./index.C93OpKAy.js"),__vite__mapDeps([70,37,16,19,47]),import.meta.url)),DateInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.DryfJqoc.js"),__vite__mapDeps([71,9,37,16,72,73,74,66,68]),import.meta.url)),DateTimeInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.pF_JNVHJ.js"),__vite__mapDeps([75,9,72,73,74,66,37,16,76,68]),import.meta.url)),DownloadButton=reactExports.lazy(()=>__vitePreload(()=>import("./index.DaVDJgbA.js"),__vite__mapDeps([77,45,24]),import.meta.url)),FileUploader=reactExports.lazy(()=>__vitePreload(()=>import("./index.MwqhcWcl.js"),__vite__mapDeps([78,16,63,61,51]),import.meta.url)),FormSubmitContent=reactExports.lazy(()=>__vitePreload(()=>import("./index.Bnp4oXTj.js"),__vite__mapDeps([79,45,16]),import.meta.url).then(n=>({default:n.FormSubmitContent}))),Multiselect=reactExports.lazy(()=>__vitePreload(()=>import("./index.CPwKghBv.js"),__vite__mapDeps([80,37,16,27,11]),import.meta.url)),NumberInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.DMWRX2hh.js"),__vite__mapDeps([81,64,16,21,82,74,66]),import.meta.url)),Radio=reactExports.lazy(()=>__vitePreload(()=>import("./index.wNqPEQUk.js"),__vite__mapDeps([83,47,37,16]),import.meta.url)),Selectbox$1=reactExports.lazy(()=>__vitePreload(()=>import("./index.DieTLIPJ.js"),__vite__mapDeps([84,37,16]),import.meta.url)),Slider=reactExports.lazy(()=>__vitePreload(()=>import("./index.D14DFzgI.js"),__vite__mapDeps([85,9,59,37,16,22,20,10,21]),import.meta.url)),TextArea=reactExports.lazy(()=>__vitePreload(()=>import("./index.Dj7zOkQg.js"),__vite__mapDeps([86,64,37,16,87,67,65,66,82]),import.meta.url)),TextInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.Bwox_wj7.js"),__vite__mapDeps([88,64,37,16,87,67,82,74,66]),import.meta.url)),TimeInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.AowxKR47.js"),__vite__mapDeps([89,37,16,76,73]),import.meta.url)),BidiComponent=reactExports.lazy(()=>__vitePreload(()=>import("./index.IavvuC7m.js"),[],import.meta.url));function hideIfStale(n,i){return n?jsx$1(Fragment,{}):i}const RawElementNodeRenderer=n=>{const{node:i}=n;if(!i)throw new Error("ElementNode not found.");const e={disableFullscreenMode:n.disableFullscreenMode,widthConfig:i.element.widthConfig,heightConfig:i.element.heightConfig},t={...e,widgetMgr:n.widgetMgr,disabled:n.widgetsDisabled,fragmentId:i.fragmentId,componentRegistry:n.componentRegistry};switch(i.element.type){case"alert":{const o=i.element.alert;return jsx$1(AlertElement$1,{icon:o.icon,body:o.body,kind:getAlertElementKind(o.format),...e})}case"arrowTable":{const o=i.element.arrowTable;return jsx$1(ArrowTable,{element:o,data:i.quiverElement,...e})}case"audio":return jsx$1(Audio,{element:i.element.audio,endpoints:n.endpoints,...e,elementMgr:n.widgetMgr});case"balloons":return hideIfStale(n.isStale,jsx$1(Balloons,{scriptRunId:i.scriptRunId}));case"code":{const o=i.element.code;return jsx$1(StreamlitSyntaxHighlighter,{language:o.language,showLineNumbers:o.showLineNumbers,wrapLines:o.wrapLines,children:o.codeText})}case"deckGlJsonChart":return jsx$1(DeckGlJsonChart,{element:i.element.deckGlJsonChart,...t});case"docString":return jsx$1(DocString$1,{element:i.element.docString,...e});case"empty":return jsx$1("div",{className:"stEmpty","data-testid":"stEmpty"});case"exception":return jsx$1(ExceptionElement$1,{element:i.element.exception,...e});case"graphvizChart":return jsx$1(GraphVizChart,{element:i.element.graphvizChart,...e});case"heading":return jsx$1(Heading,{element:i.element.heading,...e});case"iframe":return jsx$1(IFrame,{element:i.element.iframe,...e});case"imgs":return jsx$1(ImageList,{element:i.element.imgs,endpoints:n.endpoints,...e});case"json":return jsx$1(Json,{element:i.element.json,...e});case"markdown":return jsx$1(Markdown$1,{element:i.element.markdown,...e});case"metric":return jsx$1(Metric,{element:i.element.metric,...e});case"html":return jsx$1(Html,{element:i.element.html,...e});case"pageLink":{const o=i.element.pageLink,d=t.disabled||o.disabled;return jsx$1(PageLink,{element:o,disabled:d,...e})}case"progress":return jsx$1(Progress,{element:i.element.progress,...e});case"skeleton":return jsx$1(Skeleton,{element:i.element.skeleton});case"snow":return hideIfStale(n.isStale,jsx$1(Snow,{scriptRunId:i.scriptRunId}));case"space":return jsx$1(StyledSpace,{className:"stSpace","data-testid":"stSpace"});case"spinner":return jsx$1(Spinner,{element:i.element.spinner,...e});case"text":return jsx$1(TextElement$1,{element:i.element.text,...e});case"video":return jsx$1(Video,{element:i.element.video,endpoints:n.endpoints,...e,elementMgr:n.widgetMgr});case"toast":{const o=i.element.toast;return jsx$1(Toast,{element:o,...e},i.scriptRunId)}case"arrowDataFrame":{const o=i.element.arrowDataFrame;return t.disabled=t.disabled||o.disabled,jsx$1(ArrowDataFrame,{element:o,data:i.quiverElement,...t},o.id||void 0)}case"arrowVegaLiteChart":{const o=i.vegaLiteChartElement;return jsx$1(ArrowVegaLiteChart,{element:o,...t},o.id||void 0)}case"audioInput":{const o=i.element.audioInput;return t.disabled=t.disabled||o.disabled,jsx$1(AudioInput,{uploadClient:n.uploadClient,element:o,...t},o.id)}case"button":{const o=i.element.button;return t.disabled=t.disabled||o.disabled,o.isFormSubmitter?jsx$1(FormSubmitContent,{element:o,...t}):jsx$1(Button,{element:o,...t})}case"buttonGroup":{const o=i.element.buttonGroup;return t.disabled=t.disabled||o.disabled,jsx$1(ButtonGroup,{element:o,...t},o.id)}case"downloadButton":{const o=i.element.downloadButton;return t.disabled=t.disabled||o.disabled,jsx$1(DownloadButton,{endpoints:n.endpoints,element:o,...t},o.id)}case"cameraInput":{const o=i.element.cameraInput;return t.disabled=t.disabled||o.disabled,jsx$1(CameraInput,{element:o,uploadClient:n.uploadClient,...t},o.id)}case"chatInput":{const o=i.element.chatInput;return t.disabled=t.disabled||o.disabled,jsx$1(ChatInput,{element:o,uploadClient:n.uploadClient,...t},o.id)}case"checkbox":{const o=i.element.checkbox;return t.disabled=t.disabled||o.disabled,jsx$1(Checkbox,{element:o,...t},o.id)}case"colorPicker":{const o=i.element.colorPicker;return t.disabled=t.disabled||o.disabled,jsx$1(ColorPicker,{element:o,...t},o.id)}case"componentInstance":return jsx$1(ComponentInstance,{element:i.element.componentInstance,...t});case"dateInput":{const o=i.element.dateInput;return t.disabled=t.disabled||o.disabled,jsx$1(DateInput,{element:o,...t},o.id)}case"fileUploader":{const o=i.element.fileUploader;return t.disabled=t.disabled||o.disabled,jsx$1(FileUploader,{element:o,uploadClient:n.uploadClient,...t},o.id)}case"linkButton":{const o=i.element.linkButton;return jsx$1(LinkButton,{element:o,...e})}case"multiselect":{const o=i.element.multiselect;return t.disabled=t.disabled||o.disabled,jsx$1(Multiselect,{element:o,...t},o.id)}case"numberInput":{const o=i.element.numberInput;return t.disabled=t.disabled||o.disabled,jsx$1(NumberInput,{element:o,...t},o.id)}case"plotlyChart":{const o=i.element.plotlyChart;return jsx$1(PlotlyChart,{element:o,...t},o.id)}case"radio":{const o=i.element.radio;return t.disabled=t.disabled||o.disabled,jsx$1(Radio,{element:o,...t},o.id)}case"selectbox":{const o=i.element.selectbox;return t.disabled=t.disabled||o.disabled,jsx$1(Selectbox$1,{element:o,...t},o.id)}case"slider":{const o=i.element.slider;return t.disabled=t.disabled||o.disabled,jsx$1(Slider,{element:o,...t},o.id)}case"textArea":{const o=i.element.textArea;return t.disabled=t.disabled||o.disabled,jsx$1(TextArea,{element:o,outerElement:i.element,...t},o.id)}case"textInput":{const o=i.element.textInput;return t.disabled=t.disabled||o.disabled,jsx$1(TextInput,{element:o,...t},o.id)}case"dateTimeInput":{const o=i.element.dateTimeInput;return t.disabled=t.disabled||o.disabled,jsx$1(DateTimeInput,{element:o,...t},o.id)}case"timeInput":{const o=i.element.timeInput;return t.disabled=t.disabled||o.disabled,jsx$1(TimeInput,{element:o,...t},o.id)}case"bidiComponent":{const o=i.element.bidiComponent;return jsx$1(BidiComponent,{element:o,...t},o.id)}default:throw new Error(`Unrecognized Element type ${i.element.type}`)}},ElementNodeRenderer=n=>{const{isFullScreen:i}=reactExports.useContext(ViewStateContext),{scriptRunState:e,scriptRunId:t,fragmentIdsThisRun:o}=reactExports.useContext(ScriptRunContext),{node:d}=n,p=d.element.type||"",h=shouldComponentBeEnabled(p,e),y=isComponentStale(h,d,e,t,o),$=getElementId(d.element),E=getKeyFromId($);return jsx$1(Maybe,{enable:h,children:jsx$1(StyledElementContainerLayoutWrapper,{className:classNames("stElementContainer","element-container",convertKeyToClassName(E)),"data-testid":"stElementContainer","data-stale":y,isStale:y&&!i,elementType:p,node:d,children:jsx$1(ErrorBoundary,{children:jsx$1(reactExports.Suspense,{fallback:jsx$1(Skeleton,{element:Skeleton$1.create({style:Skeleton$1.SkeletonStyle.ELEMENT})}),children:jsx$1(RawElementNodeRenderer,{...n,isStale:y})})})})})};class RenderNodeVisitor{constructor(i,e){this.props=i,this.elementKeyOverride=e,this.elementKeySet=new Set,this.reactElements=[],this.index=0,this.transientElementCount=0}getCurrentKey(i){return this.elementKeyOverride||i||this.index.toString()}conformToArray(i){return i?Array.isArray(i)?i:[i]:[]}visitBlockNode(i){const e={...this.props,node:i},t=this.getCurrentKey();this.index+=1;const o=jsx$1(BlockNodeRenderer,{...e},t);return this.reactElements.push(o),o}visitTransientNode(i){const e=[];i.transientNodes.forEach(o=>{const d=this.getCurrentKey(`transient-${this.transientElementCount}`);this.transientElementCount+=1;const p=o.accept(new RenderNodeVisitor(this.props,d));e.push(...this.conformToArray(p))}),this.reactElements.push(...e);const t=i.anchor?.accept(this);return e.push(...this.conformToArray(t)),e}visitElementNode(i){const e={...this.props,node:i},t=this.getCurrentKey(getElementId(i.element));if(this.index+=1,this.elementKeySet.has(t))return null;this.elementKeySet.add(t);const o=jsx$1(ElementNodeRenderer,{...e},t);return this.reactElements.push(o),o}static collectReactElements(i){if(!i.node.children)return[];const e=new RenderNodeVisitor(i);return i.node.children.forEach(t=>t.accept(e)),e.reactElements}}const ChildRenderer=n=>(assignDividerColor(n.node,useEmotionTheme()),jsx$1(Fragment,{children:RenderNodeVisitor.collectReactElements(n)})),getLayoutSubElement=n=>{const i=n.type,e=i?n[i]:void 0;if(!e||typeof e!="object")return;const t=e,o={useContainerWidth:t.useContainerWidth,height:t.height,width:t.width,widthConfig:t.widthConfig};if(!(o.useContainerWidth===void 0&&o.height===void 0&&o.width===void 0&&o.widthConfig===void 0))return o},ContainerContentsWrapper=n=>{const i=reactExports.useContext(FlexContext),e={direction:Direction.VERTICAL,flex:1,gap:streamlit.GapSize.SMALL,height:n.height,border:!1},t=getKeyFromId(n.node.deltaBlock.id);return jsx$1(FlexContextProvider,{direction:Direction.VERTICAL,isRoot:n.isRoot,parentContext:i,children:jsx$1(StyledFlexContainerBlock,{...e,className:classNames(getClassnamePrefix(Direction.VERTICAL),convertKeyToClassName(t)),"data-testid":getClassnamePrefix(Direction.VERTICAL),children:jsx$1(ChildRenderer,{...n})})})},FlexBoxContainer=n=>{const i=getDirectionOfBlock(n.node.deltaBlock),e=reactExports.useContext(FlexContext),t=getActivateScrollToBottomBackwardsCompatible(n.node),o=useScrollToBottom(t),d=useLayoutStyles({element:n.node.deltaBlock,subElement:getLayoutSubElement(n.node.deltaBlock)}),p={gap:n.node.deltaBlock.flexContainer?.gapConfig?.gapSize??streamlit.GapSize.SMALL,direction:i,$wrap:n.node.deltaBlock.flexContainer?.wrap??!1,overflow:d.overflow,border:getBorderBackwardsCompatible(n.node.deltaBlock),height:d.height,flex:"1",align:n.node.deltaBlock.flexContainer?.align,justify:n.node.deltaBlock.flexContainer?.justify},h=getKeyFromId(n.node.deltaBlock.id),y=n.node.deltaBlock.widthConfig?.pixelWidth??void 0,$=n.node.deltaBlock.widthConfig?.useContent??!1,E=(n.node.deltaBlock.widthConfig?.pixelWidth??0)>0||(n.node.deltaBlock.widthConfig?.remWidth??0)>0;return jsx$1(FlexContextProvider,{direction:i,parentWidth:y,hasContentWidth:$,hasFixedWidth:E,parentContext:e,children:jsx$1(StyledFlexContainerBlock,{...p,className:classNames(getClassnamePrefix(i),convertKeyToClassName(h)),"data-testid":getClassnamePrefix(i),ref:o,"data-test-scroll-behavior":t?"scroll-to-bottom":"normal",children:jsx$1(ChildRenderer,{...n})})})},LARGE_STRETCH_BEHAVIOR=["tabContainer"],MEDIUM_STRETCH_BEHAVIOR=["chatInput"],BlockNodeRenderer=n=>{const{node:i}=n,{scriptRunState:e,scriptRunId:t,fragmentIdsThisRun:o}=reactExports.useContext(ScriptRunContext);let d;LARGE_STRETCH_BEHAVIOR.includes(i.deltaBlock.type??"")?d="14rem":MEDIUM_STRETCH_BEHAVIOR.includes(i.deltaBlock.type??"")?d="8rem":i.deltaBlock.type==="chatMessage"?i.isEmpty&&(d="8rem"):(i.deltaBlock.type==="flexContainer"||i.deltaBlock.column||i.deltaBlock.expandable)&&(i.isEmpty||(d="8rem"));const p=useLayoutStyles({element:i.deltaBlock,subElement:getLayoutSubElement(i.deltaBlock),minStretchBehavior:d});if(i.isEmpty&&!i.deltaBlock.allowEmpty)return jsx$1(Fragment,{});const h=shouldComponentBeEnabled("",e),y=isComponentStale(h,i,e,t,o),$={...n,node:i},E=n.disableFullscreenMode||notNullOrUndefined(i.deltaBlock.dialog)||notNullOrUndefined(i.deltaBlock.popover);let M;const H=jsx$1(ContainerContentsWrapper,{...$,disableFullscreenMode:E,height:"100%"});if(checkFlexContainerBackwardsCompatibile(i.deltaBlock)&&(M=jsx$1(FlexBoxContainer,{...$})),i.deltaBlock.dialog)return jsx$1(Dialog$1,{element:i.deltaBlock.dialog,deltaMsgReceivedAt:i.deltaMsgReceivedAt,widgetMgr:n.widgetMgr,fragmentId:i.fragmentId,children:H});if(i.deltaBlock.expandable&&(M=jsx$1(Expander$1,{isStale:y,element:i.deltaBlock.expandable,children:H})),i.deltaBlock.popover&&(M=jsx$1(Popover$1,{empty:i.isEmpty,element:i.deltaBlock.popover,stretchWidth:shouldWidthStretch(i.deltaBlock.widthConfig),children:H})),i.deltaBlock.type==="form"){const{formId:Z,clearOnSubmit:be,enterToSubmit:ye,border:we}=i.deltaBlock.form;M=jsx$1(Form$1,{formId:Z,clearOnSubmit:be,enterToSubmit:ye,widgetMgr:n.widgetMgr,border:we,overflow:p.overflow,children:H})}if(i.deltaBlock.chatMessage&&(M=jsx$1(ChatMessage$1,{element:i.deltaBlock.chatMessage,endpoints:n.endpoints,children:H})),i.deltaBlock.column)return jsx$1(StyledColumn,{weight:i.deltaBlock.column.weight??0,gap:backwardsCompatibleColumnGapSize(i.deltaBlock.column),verticalAlignment:i.deltaBlock.column.verticalAlignment??void 0,showBorder:i.deltaBlock.column.showBorder??!1,className:"stColumn","data-testid":"stColumn",children:H});if(i.deltaBlock.tabContainer){const be={...$,isStale:y,renderTabContent:ye=>jsx$1(ContainerContentsWrapper,{...ye,height:"auto"}),width:p.width,flex:p.flex};return jsx$1(Tabs$1,{...be})}return M?jsx$1(StyledLayoutWrapper,{"data-testid":"stLayoutWrapper",...p,children:M}):H},DownloadContext=reactExports.createContext({requestDeferredFile:void 0});DownloadContext.displayName="DownloadContext";const NavigationContext=reactExports.createContext({pageLinkBaseUrl:"",currentPageScriptHash:"",onPageChange:()=>{},navSections:[],appPages:[]});NavigationContext.displayName="NavigationContext";const StyledDataFrameOverlay=styled("div",{target:"e1hos2sk1"})(({theme:n})=>({position:"fixed",top:0,left:0,zIndex:n.zIndices.tablePortal,lineHeight:"100%",...!hasLightBackgroundColor(n)&&{"& input[type='date'], & input[type='time'], & input[type='datetime-local']":{"&::-webkit-calendar-picker-indicator":{filter:"brightness(0) invert(1)",opacity:1}}}})),StyledErrorMessage=styled("small",{target:"e1hos2sk2"})(({theme:n})=>({color:n.colors.redTextColor,fontSize:n.fontSizes.sm,marginTop:n.spacing.twoXS,display:"block"})),PortalContext=reactExports.createContext(null);PortalContext.displayName="PortalContext";const PortalProvider=({children:n})=>{const i=reactExports.useRef(null),e=reactExports.useCallback(()=>i.current,[]);return jsxs(PortalContext.Provider,{value:e,children:[n,jsx$1(StyledDataFrameOverlay,{"data-testid":"portal",id:"portal",ref:i})]})},SidebarConfigContext=reactExports.createContext({initialSidebarState:PageConfig.SidebarState.AUTO,appLogo:null,sidebarChevronDownshift:0,expandSidebarNav:!1,hideSidebarNav:!1});SidebarConfigContext.displayName="SidebarConfigContext";const ThemeContext=reactExports.createContext({activeTheme:getDefaultTheme(),setTheme:()=>{},availableThemes:[]});ThemeContext.displayName="ThemeContext";function ThemeProvider({theme:n,baseuiTheme:i,children:e}){return jsx$1(ThemeProvider$1,{theme:i||baseuiLightTheme,children:jsx$1(ThemeProvider$2,{theme:n,children:e})})}const CopyButton=({text:n})=>{const i=useEmotionTheme(),e=reactExports.useRef(null),{isCopied:t,copyToClipboard:o,label:d}=useCopyToClipboard(),p=reactExports.useCallback(()=>{o(n)},[o,n]);return jsx$1(StyledCopyButton,{"data-testid":"stCodeCopyButton",title:d,"aria-label":d,type:"button",ref:e,onClick:p,children:t?jsx$1(Check,{size:convertRemToPx(i.iconSizes.base)}):jsx$1(Copy,{size:convertRemToPx(i.iconSizes.base)})})},CopyButton$1=reactExports.memo(CopyButton);function StreamlitErrorCodeBlock({children:n}){const i=typeof n=="string"&&n.trim().length>0;return jsxs(StyledCodeBlock,{className:"stErrorCodeBlock","data-testid":"stErrorCodeBlock",children:[jsx$1(StyledPre,{wrapLines:!1,children:jsx$1(StyledCode,{wrapLines:!1,children:n})}),i&&jsx$1(StyledCopyButtonContainer,{children:jsx$1(CopyButton$1,{text:n})})]})}const StreamlitErrorCodeBlock$1=reactExports.memo(StreamlitErrorCodeBlock);function iconToUrl(n){const i=/^:(.+)\/(.+):$/,e=n.match(i);return e===null?"":`https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsrounded/${e[2]}/default/24px.svg`}function handleFavicon(n,i,e){const t=p=>{overwriteFavicon(p),i({type:"SET_PAGE_FAVICON",favicon:p})};if(n.startsWith(":material")){t(iconToUrl(n));return}const o="emoji:";if(n.startsWith(o)){const p=n.substring(o.length),h=createEmojiDataUrl(p);t(h);return}/^:[a-zA-Z0-9_+-]+:$/.test(n)?convertShortcodeToEmoji(n).then(p=>{t(p?createEmojiDataUrl(p):e.buildMediaURL(n))}).catch(()=>{t(e.buildMediaURL(n))}):t(e.buildMediaURL(n))}function createEmojiDataUrl(n){return`data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>${n}</text></svg>`}function overwriteFavicon(n){const i=document.querySelector("link[rel='shortcut icon']");i&&(i.href=n)}async function convertShortcodeToEmoji(n){const i=await __vitePreload(()=>import("./index.DgfqdWkR.js"),[],import.meta.url),e=n.replace(/-/g,"_"),t=i.get(e);return t&&t!==e&&i.has(t)?t:""}const StyledWidgetLabel=styled("label",{target:"e1a116dh0"})(({disabled:n,labelVisibility:i,theme:e})=>({fontSize:e.fontSizes.sm,color:n?e.colors.fadedText40:e.colors.bodyText,display:i===LabelVisibilityOptions.Collapsed?"none":"flex",visibility:i===LabelVisibilityOptions.Hidden?"hidden":"visible",marginBottom:e.spacing.twoXS,height:"auto",minHeight:e.fontSizes.xl,verticalAlign:"middle",flexDirection:"row",alignItems:"center"})),StyledWidgetLabelHelp=styled("div",{target:"e1a116dh1"})({display:"flex",flexDirection:"row",justifyContent:"flex-end",flex:1}),StyledWidgetInstructions=styled("div",{target:"e1a116dh2"})(({theme:n})=>({fontSize:n.fontSizes.twoSm,color:n.colors.fadedText60,margin:n.spacing.none,textAlign:"right",position:"absolute",bottom:n.spacing.threeXS,right:`calc(${n.fontSizes.mdLg} * 0.5)`})),StyledWidgetLabelHelpInline=styled("span",{target:"e1a116dh3"})(({theme:n})=>({marginLeft:n.spacing.xs,position:"relative",display:"flex",flexDirection:"row"}));function WidgetLabel({label:n,children:i,disabled:e,labelVisibility:t,htmlFor:o}){return isNullOrUndefined(n)?jsx$1(Fragment,{}):jsxs(StyledWidgetLabel,{"data-testid":"stWidgetLabel",disabled:e,labelVisibility:t,htmlFor:o,children:[jsx$1("span",{"aria-hidden":"true",children:jsx$1(StreamlitMarkdown$1,{source:n,allowHTML:!1,isLabel:!0})}),i]})}function WidgetLabelHelpIcon({content:n,label:i,ariaLabel:e,placement:t=Placement.TOP_RIGHT,isLatex:o,markdownProps:d,onMouseEnterDelay:p,containerWidth:h}){return jsx$1(StyledWidgetLabelHelp,{children:jsx$1(TooltipIcon,{content:n,placement:t,isLatex:o,markdownProps:d,onMouseEnterDelay:p,containerWidth:h,ariaLabel:e??getHelpTooltipAriaLabel(i)})})}const arrayComparator=(n,i)=>n.length!==i.length?!1:n.every((e,t)=>Object.is(e,i[t])),useExecuteWhenChanged=(n,i,e=arrayComparator)=>{const[t,o]=reactExports.useState(i);e(t,i)||(o(i),n())};var _excluded$i=["title","size","color","overrides"];function _extends$g(){return _extends$g=Object.assign?Object.assign.bind():function(n){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n},_extends$g.apply(this,arguments)}function _objectWithoutProperties$f(n,i){if(n==null)return{};var e=_objectWithoutPropertiesLoose$e(n,i),t,o;if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(n);for(o=0;o<d.length;o++)t=d[o],!(i.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(n,t)&&(e[t]=n[t])}return e}function _objectWithoutPropertiesLoose$e(n,i){if(n==null)return{};var e={},t=Object.keys(n),o,d;for(d=0;d<t.length;d++)o=t[d],!(i.indexOf(o)>=0)&&(e[o]=n[o]);return e}function _slicedToArray$d(n,i){return _arrayWithHoles$d(n)||_iterableToArrayLimit$d(n,i)||_unsupportedIterableToArray$d(n,i)||_nonIterableRest$d()}function _nonIterableRest$d(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
119
|
+
`),allowHTML:!1})]}),h&&jsx$1(StyledHeaderDivider,{"data-testid":"stHeadingDivider",rainbow:h.includes("linear"),color:h})]})}const StyledCheckbox$1=styled("div",{target:"eg2gxky0"})(({theme:n})=>({display:"flex",alignItems:"center",minHeight:n.sizes.smallElementHeight})),StyledContent=styled("div",{target:"eg2gxky1"})(({visibility:n})=>({display:n===LabelVisibilityOptions.Collapsed?"none":"flex",visibility:n===LabelVisibilityOptions.Hidden?"hidden":"visible",verticalAlign:"middle",flexDirection:"row",alignItems:"center"}));function translateGapWidth(n,i){let e=i.spacing.lg;return n===streamlit.GapSize.MEDIUM?e=i.spacing.threeXL:n===streamlit.GapSize.LARGE?e=i.spacing.fourXL:n===streamlit.GapSize.NONE&&(e=i.spacing.none),e}const StyledSpace=styled("div",{target:"e1wleg6g0"})({width:"100%",height:"100%"}),GLOBAL_ELEMENTS=["balloons","snow"],StyledElementContainer=styled("div",{target:"e1wleg6g1"})(({theme:n,isStale:i,width:e,height:t,elementType:o,overflow:d,flex:p,minWidth:h,textAlign:y})=>({width:e,height:t,textAlign:y,maxWidth:"100%",minWidth:e==="0px"?0:h??"1rem",position:"relative",overflow:d,flex:p,"@media print":{overflow:"visible"},":has(> .stCacheSpinner)":{height:n.spacing.none,overflow:"visible",visibility:"visible",marginBottom:`-${n.spacing.lg}`,zIndex:n.zIndices.cacheSpinner},":has(> .stPageLink)":{marginTop:`-${n.spacing.xs}`,marginBottom:`-${n.spacing.xs}`},...i&&o!=="skeleton"&&STALE_STYLES,...o==="empty"?{display:"none"}:{},...o==="space"?{minWidth:0,minHeight:0}:{},...GLOBAL_ELEMENTS.includes(o)?{marginBottom:`-${n.spacing.lg}`}:{}})),StyledColumn=styled("div",{target:"e1wleg6g2"})(({theme:n,weight:i,gap:e,showBorder:t,verticalAlignment:o})=>{const{VerticalAlignment:d}=Block$1.Column,p=i*100,h=translateGapWidth(e,n),y=h===n.spacing.none?`${p}%`:`calc(${p}% - ${h})`;return{width:y,flex:`1 1 ${y}`,[`@media (max-width: ${n.breakpoints.columns})`]:{minWidth:`calc(100% - ${n.spacing.twoXL})`},...o===d.BOTTOM&&{marginTop:"auto",[`& ${StyledElementContainer}:last-of-type > ${StyledCheckbox$1}`]:{marginBottom:n.spacing.sm}},...o===d.TOP&&{[`& ${StyledElementContainer}:first-of-type > ${StyledCheckbox$1}`]:{marginTop:n.spacing.sm}},...o===d.CENTER&&{marginTop:"auto",marginBottom:"auto"},...t&&{border:`${n.sizes.borderWidth} solid ${n.colors.borderColor}`,borderRadius:n.radii.default,padding:`calc(${n.spacing.lg} - ${n.sizes.borderWidth})`}}}),getAlignItems=n=>{switch(n){case Block$1.FlexContainer.Align.ALIGN_START:return"start";case Block$1.FlexContainer.Align.ALIGN_CENTER:return"center";case Block$1.FlexContainer.Align.ALIGN_END:return"end";case Block$1.FlexContainer.Align.STRETCH:return"stretch";case Block$1.FlexContainer.Align.ALIGN_UNDEFINED:case void 0:case null:return"stretch";default:assertNever(n)}},getJustifyContent=n=>{switch(n){case Block$1.FlexContainer.Justify.JUSTIFY_START:return"start";case Block$1.FlexContainer.Justify.JUSTIFY_CENTER:return"center";case Block$1.FlexContainer.Justify.JUSTIFY_END:return"end";case Block$1.FlexContainer.Justify.SPACE_BETWEEN:return"space-between";case Block$1.FlexContainer.Justify.JUSTIFY_UNDEFINED:case void 0:case null:return"start";default:assertNever(n)}},StyledFlexContainerBlock=styled("div",{target:"e1wleg6g3"})(({theme:n,direction:i,gap:e,flex:t,$wrap:o,height:d,border:p,align:h,justify:y,overflow:$})=>{let E;return e!==void 0&&(E=translateGapWidth(e,n)),{display:"flex",gap:E,width:"100%",maxWidth:"100%",height:d??"auto",minWidth:"1rem",flexDirection:i,flex:t,alignItems:getAlignItems(h),justifyContent:getJustifyContent(y),flexWrap:o?"wrap":"nowrap",...p&&{border:`${n.sizes.borderWidth} solid ${n.colors.borderColor}`,borderRadius:n.radii.default,padding:`calc(${n.spacing.lg} - ${n.sizes.borderWidth})`},overflow:$}}),StyledLayoutWrapper=styled("div",{target:"e1wleg6g4"})(({width:n,height:i,flex:e})=>({display:"flex",flexDirection:"column",width:n,maxWidth:"100%",minWidth:"1rem",height:i,flex:e})),LARGE_STRETCH_BEHAVIOR$1=["graphvizChart","arrowVegaLiteChart","deckGlJsonChart","plotlyChart","docString","arrowDataFrame","json","audioInput","fileUploader","cameraInput","audio","video","code","buttonGroup","iframe"],MEDIUM_STRETCH_BEHAVIOR$1=["dateInput","radio","slider","textArea","progress","multiselect","selectbox","timeInput","numberInput","textInput"],WIDTH_STRETCH_OVERRIDE=["componentInstance","skeleton"],VISIBLE_OVERFLOW_OVERRIDE=["iframe","arrowDataFrame","deckGlJsonChart","arrowVegaLiteChart","graphvizChart"],StyledElementContainerLayoutWrapper=({node:n,...i})=>{const{isInHorizontalLayout:e,isInRoot:t}=useRequiredContext(FlexContext);let o;LARGE_STRETCH_BEHAVIOR$1.includes(n.element.type??"")?o="14rem":MEDIUM_STRETCH_BEHAVIOR$1.includes(n.element.type??"")&&(o="8rem"),n.element.type==="buttonGroup"&&n.element.buttonGroup?.style===ButtonGroup$1.Style.BORDERLESS&&(o="fit-content");const d=reactExports.useMemo(()=>{const h={};if(WIDTH_STRETCH_OVERRIDE.includes(n.element.type??"")&&(h.width="100%"),VISIBLE_OVERFLOW_OVERRIDE.includes(n.element.type??"")&&(h.overflow="visible"),n.element.type==="textArea")return n.element.heightConfig?.useStretch?{height:"100%",flex:"1 1 8rem"}:e?{height:"auto"}:{height:"auto",flex:""};if(n.element.type==="arrowVegaLiteChart")return n.element.widthConfig?.useContent&&t&&(h.width="100%"),e&&!n.element.widthConfig&&(h.flex="1 1 14rem"),h;if(n.element.type==="arrowDataFrame")return n.element.widthConfig?.useContent&&t&&(h.width="100%"),h;if(n.element.type==="imgs"){const y=!n.element.widthConfig||n.element.widthConfig.useStretch;h.width=y?"100%":"auto"}return h},[n.element.type,n.element.heightConfig?.useStretch,e,t,n.element.widthConfig]);let p=useLayoutStyles({element:n.element,subElement:n.element?.type&&n.element[n.element.type]||void 0,styleOverrides:d,minStretchBehavior:o});return n.element.type==="space"&&(e?p={...p,height:"auto"}:p={...p,width:"auto"}),jsx$1(StyledElementContainer,{...i,...p})},ArrowTable=reactExports.lazy(()=>__vitePreload(()=>import("./index.f-UZuoZE.js"),__vite__mapDeps([7,8,9,10,11]),import.meta.url)),ArrowVegaLiteChart=reactExports.lazy(()=>__vitePreload(()=>import("./index.qg9M6uCh.js"),__vite__mapDeps([12,13,14,15,16,9,8,10,11,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33]),import.meta.url)),Audio=reactExports.lazy(()=>__vitePreload(()=>import("./index.Bt-J_LLo.js"),[],import.meta.url)),Balloons=reactExports.lazy(()=>__vitePreload(()=>import("./index.BPDinT9W.js"),__vite__mapDeps([34,35]),import.meta.url)),DeckGlJsonChart=reactExports.lazy(()=>__vitePreload(()=>import("./index.DF31ixLt.js"),__vite__mapDeps([36,25,13,14,17,37,16,30,31,38]),import.meta.url)),GraphVizChart=reactExports.lazy(()=>__vitePreload(()=>import("./index.BE-_bdmf.js"),__vite__mapDeps([39,32,31,13,14]),import.meta.url)),Html=reactExports.lazy(()=>__vitePreload(()=>import("./index.zN5Ficl0.js"),[],import.meta.url)),IFrame=reactExports.lazy(()=>__vitePreload(()=>import("./index.8I6SAQDm.js"),__vite__mapDeps([40,41]),import.meta.url)),ImageList=reactExports.lazy(()=>__vitePreload(()=>import("./index.DK27W5ov.js"),__vite__mapDeps([42,13,14]),import.meta.url)),Json=reactExports.lazy(()=>__vitePreload(()=>import("./index.DaxZAmvz.js"),__vite__mapDeps([43,17,18]),import.meta.url)),LinkButton=reactExports.lazy(()=>__vitePreload(()=>import("./index.BWYs56td.js"),__vite__mapDeps([44,45]),import.meta.url)),Metric=reactExports.lazy(()=>__vitePreload(()=>import("./index.CFRlw_Q4.js"),__vite__mapDeps([46,29,30,31,32,47,20,10,21]),import.meta.url)),PageLink=reactExports.lazy(()=>__vitePreload(()=>import("./index.BakUx9hH.js"),__vite__mapDeps([48,45]),import.meta.url)),PlotlyChart=reactExports.lazy(()=>__vitePreload(()=>import("./index.8C-cS-O4.js"),__vite__mapDeps([49,13,16]),import.meta.url)),Progress=reactExports.lazy(()=>__vitePreload(()=>import("./index.BukrvZZ2.js"),__vite__mapDeps([50,51]),import.meta.url)),Snow=reactExports.lazy(()=>__vitePreload(()=>import("./index.DtZbhbEr.js"),__vite__mapDeps([52,35]),import.meta.url)),Spinner=reactExports.lazy(()=>__vitePreload(()=>import("./index.DEUimtV1.js"),[],import.meta.url)),StreamlitSyntaxHighlighter=reactExports.lazy(()=>__vitePreload(()=>import("./StreamlitSyntaxHighlighter.D6tqIUNe.js"),__vite__mapDeps([6,2]),import.meta.url)),Toast=reactExports.lazy(()=>__vitePreload(()=>import("./index.CoOQHuCm.js"),[],import.meta.url)),Video=reactExports.lazy(()=>__vitePreload(()=>import("./index.D9DEa36h.js"),[],import.meta.url)),AudioInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.Dq9InAZx.js"),__vite__mapDeps([53,54,14,16,24,55,26]),import.meta.url)),ArrowDataFrame=reactExports.lazy(()=>__vitePreload(()=>import("./index.s88CwlpG.js").then(n=>n.c),__vite__mapDeps([15,13,14,16,9,8,10,11,17,18,19,20,21,22,23,24,25,26,27,28]),import.meta.url)),Button=reactExports.lazy(()=>__vitePreload(()=>import("./index.BWwP9fh8.js"),__vite__mapDeps([56,45]),import.meta.url)),ButtonGroup=reactExports.lazy(()=>__vitePreload(()=>import("./index.-Uw_gjRk.js"),__vite__mapDeps([57,47,37,16]),import.meta.url)),ComponentInstance=reactExports.lazy(()=>__vitePreload(()=>import("./index.3BdSdx9Q.js"),__vite__mapDeps([58,59,55,41]),import.meta.url).then(n=>({default:n.ComponentInstance}))),CameraInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.DWUM7LrZ.js"),__vite__mapDeps([60,61,16,51,55]),import.meta.url)),ChatInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.D67NXgZL.js"),__vite__mapDeps([62,63,61,54,64,65,66,67,33,68]),import.meta.url)),Checkbox=reactExports.lazy(()=>__vitePreload(()=>import("./index.BZFLbiyp.js"),__vite__mapDeps([69,47,37,16,23]),import.meta.url)),ColorPicker=reactExports.lazy(()=>__vitePreload(()=>import("./index.BkQCUqLQ.js"),__vite__mapDeps([70,37,16,19,47]),import.meta.url)),DateInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.CggOKbv5.js"),__vite__mapDeps([71,9,37,16,72,73,74,66,68]),import.meta.url)),DateTimeInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.2hZ1_TTv.js"),__vite__mapDeps([75,9,72,73,74,66,37,16,76,68]),import.meta.url)),DownloadButton=reactExports.lazy(()=>__vitePreload(()=>import("./index.Dodgg4y_.js"),__vite__mapDeps([77,45,24]),import.meta.url)),FileUploader=reactExports.lazy(()=>__vitePreload(()=>import("./index.D3xfIqy_.js"),__vite__mapDeps([78,16,63,61,51]),import.meta.url)),FormSubmitContent=reactExports.lazy(()=>__vitePreload(()=>import("./index.B-k1aQD6.js"),__vite__mapDeps([79,45,16]),import.meta.url).then(n=>({default:n.FormSubmitContent}))),Multiselect=reactExports.lazy(()=>__vitePreload(()=>import("./index.Zx7pc4Ib.js"),__vite__mapDeps([80,37,16,27,11]),import.meta.url)),NumberInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.C3MpZoqE.js"),__vite__mapDeps([81,64,37,16,21,82,74,66]),import.meta.url)),Radio=reactExports.lazy(()=>__vitePreload(()=>import("./index.DzWfLgsQ.js"),__vite__mapDeps([83,47,37,16]),import.meta.url)),Selectbox$1=reactExports.lazy(()=>__vitePreload(()=>import("./index.DYR3j5ZF.js"),__vite__mapDeps([84,37,16]),import.meta.url)),Slider=reactExports.lazy(()=>__vitePreload(()=>import("./index.CTdvJfB7.js"),__vite__mapDeps([85,9,59,37,16,22,20,10,21]),import.meta.url)),TextArea=reactExports.lazy(()=>__vitePreload(()=>import("./index.C40Nq5m8.js"),__vite__mapDeps([86,64,37,16,87,67,65,66,82]),import.meta.url)),TextInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.B-2OnxuC.js"),__vite__mapDeps([88,64,37,16,87,67,82,74,66]),import.meta.url)),TimeInput=reactExports.lazy(()=>__vitePreload(()=>import("./index.B4jgy50K.js"),__vite__mapDeps([89,37,16,76,73]),import.meta.url)),BidiComponent=reactExports.lazy(()=>__vitePreload(()=>import("./index.C8fg6FO8.js"),[],import.meta.url));function hideIfStale(n,i){return n?jsx$1(Fragment,{}):i}const RawElementNodeRenderer=n=>{const{node:i}=n;if(!i)throw new Error("ElementNode not found.");const e={disableFullscreenMode:n.disableFullscreenMode,widthConfig:i.element.widthConfig,heightConfig:i.element.heightConfig},t={...e,widgetMgr:n.widgetMgr,disabled:n.widgetsDisabled,fragmentId:i.fragmentId,componentRegistry:n.componentRegistry};switch(i.element.type){case"alert":{const o=i.element.alert;return jsx$1(AlertElement$1,{icon:o.icon,body:o.body,kind:getAlertElementKind(o.format),...e})}case"arrowTable":{const o=i.element.arrowTable;return jsx$1(ArrowTable,{element:o,data:i.quiverElement,...e})}case"audio":return jsx$1(Audio,{element:i.element.audio,endpoints:n.endpoints,...e,elementMgr:n.widgetMgr});case"balloons":return hideIfStale(n.isStale,jsx$1(Balloons,{scriptRunId:i.scriptRunId}));case"code":{const o=i.element.code;return jsx$1(StreamlitSyntaxHighlighter,{language:o.language,showLineNumbers:o.showLineNumbers,wrapLines:o.wrapLines,children:o.codeText})}case"deckGlJsonChart":return jsx$1(DeckGlJsonChart,{element:i.element.deckGlJsonChart,...t});case"docString":return jsx$1(DocString$1,{element:i.element.docString,...e});case"empty":return jsx$1("div",{className:"stEmpty","data-testid":"stEmpty"});case"exception":return jsx$1(ExceptionElement$1,{element:i.element.exception,...e});case"graphvizChart":return jsx$1(GraphVizChart,{element:i.element.graphvizChart,...e});case"heading":return jsx$1(Heading,{element:i.element.heading,...e});case"iframe":return jsx$1(IFrame,{element:i.element.iframe,...e});case"imgs":return jsx$1(ImageList,{element:i.element.imgs,endpoints:n.endpoints,...e});case"json":return jsx$1(Json,{element:i.element.json,...e});case"markdown":return jsx$1(Markdown$1,{element:i.element.markdown,...e});case"metric":return jsx$1(Metric,{element:i.element.metric,...e});case"html":return jsx$1(Html,{element:i.element.html,...e});case"pageLink":{const o=i.element.pageLink,d=t.disabled||o.disabled;return jsx$1(PageLink,{element:o,disabled:d,...e})}case"progress":return jsx$1(Progress,{element:i.element.progress,...e});case"skeleton":return jsx$1(Skeleton,{element:i.element.skeleton});case"snow":return hideIfStale(n.isStale,jsx$1(Snow,{scriptRunId:i.scriptRunId}));case"space":return jsx$1(StyledSpace,{className:"stSpace","data-testid":"stSpace"});case"spinner":return jsx$1(Spinner,{element:i.element.spinner,...e});case"text":return jsx$1(TextElement$1,{element:i.element.text,...e});case"video":return jsx$1(Video,{element:i.element.video,endpoints:n.endpoints,...e,elementMgr:n.widgetMgr});case"toast":{const o=i.element.toast;return jsx$1(Toast,{element:o,...e},i.scriptRunId)}case"arrowDataFrame":{const o=i.element.arrowDataFrame;return t.disabled=t.disabled||o.disabled,jsx$1(ArrowDataFrame,{element:o,data:i.quiverElement,...t},o.id||void 0)}case"arrowVegaLiteChart":{const o=i.vegaLiteChartElement;return jsx$1(ArrowVegaLiteChart,{element:o,...t},o.id||void 0)}case"audioInput":{const o=i.element.audioInput;return t.disabled=t.disabled||o.disabled,jsx$1(AudioInput,{uploadClient:n.uploadClient,element:o,...t},o.id)}case"button":{const o=i.element.button;return t.disabled=t.disabled||o.disabled,o.isFormSubmitter?jsx$1(FormSubmitContent,{element:o,...t}):jsx$1(Button,{element:o,...t})}case"buttonGroup":{const o=i.element.buttonGroup;return t.disabled=t.disabled||o.disabled,jsx$1(ButtonGroup,{element:o,...t},o.id)}case"downloadButton":{const o=i.element.downloadButton;return t.disabled=t.disabled||o.disabled,jsx$1(DownloadButton,{endpoints:n.endpoints,element:o,...t},o.id)}case"cameraInput":{const o=i.element.cameraInput;return t.disabled=t.disabled||o.disabled,jsx$1(CameraInput,{element:o,uploadClient:n.uploadClient,...t},o.id)}case"chatInput":{const o=i.element.chatInput;return t.disabled=t.disabled||o.disabled,jsx$1(ChatInput,{element:o,uploadClient:n.uploadClient,...t},o.id)}case"checkbox":{const o=i.element.checkbox;return t.disabled=t.disabled||o.disabled,jsx$1(Checkbox,{element:o,...t},o.id)}case"colorPicker":{const o=i.element.colorPicker;return t.disabled=t.disabled||o.disabled,jsx$1(ColorPicker,{element:o,...t},o.id)}case"componentInstance":return jsx$1(ComponentInstance,{element:i.element.componentInstance,...t});case"dateInput":{const o=i.element.dateInput;return t.disabled=t.disabled||o.disabled,jsx$1(DateInput,{element:o,...t},o.id)}case"fileUploader":{const o=i.element.fileUploader;return t.disabled=t.disabled||o.disabled,jsx$1(FileUploader,{element:o,uploadClient:n.uploadClient,...t},o.id)}case"linkButton":{const o=i.element.linkButton;return jsx$1(LinkButton,{element:o,...e})}case"multiselect":{const o=i.element.multiselect;return t.disabled=t.disabled||o.disabled,jsx$1(Multiselect,{element:o,...t},o.id)}case"numberInput":{const o=i.element.numberInput;return t.disabled=t.disabled||o.disabled,jsx$1(NumberInput,{element:o,...t},o.id)}case"plotlyChart":{const o=i.element.plotlyChart;return jsx$1(PlotlyChart,{element:o,...t},o.id)}case"radio":{const o=i.element.radio;return t.disabled=t.disabled||o.disabled,jsx$1(Radio,{element:o,...t},o.id)}case"selectbox":{const o=i.element.selectbox;return t.disabled=t.disabled||o.disabled,jsx$1(Selectbox$1,{element:o,...t},o.id)}case"slider":{const o=i.element.slider;return t.disabled=t.disabled||o.disabled,jsx$1(Slider,{element:o,...t},o.id)}case"textArea":{const o=i.element.textArea;return t.disabled=t.disabled||o.disabled,jsx$1(TextArea,{element:o,outerElement:i.element,...t},o.id)}case"textInput":{const o=i.element.textInput;return t.disabled=t.disabled||o.disabled,jsx$1(TextInput,{element:o,...t},o.id)}case"dateTimeInput":{const o=i.element.dateTimeInput;return t.disabled=t.disabled||o.disabled,jsx$1(DateTimeInput,{element:o,...t},o.id)}case"timeInput":{const o=i.element.timeInput;return t.disabled=t.disabled||o.disabled,jsx$1(TimeInput,{element:o,...t},o.id)}case"bidiComponent":{const o=i.element.bidiComponent;return jsx$1(BidiComponent,{element:o,...t},o.id)}default:throw new Error(`Unrecognized Element type ${i.element.type}`)}},ElementNodeRenderer=n=>{const{isFullScreen:i}=reactExports.useContext(ViewStateContext),{scriptRunState:e,scriptRunId:t,fragmentIdsThisRun:o}=reactExports.useContext(ScriptRunContext),{node:d}=n,p=d.element.type||"",h=shouldComponentBeEnabled(p,e),y=isComponentStale(h,d,e,t,o),$=getElementId(d.element),E=getKeyFromId($);return jsx$1(Maybe,{enable:h,children:jsx$1(StyledElementContainerLayoutWrapper,{className:classNames("stElementContainer","element-container",convertKeyToClassName(E)),"data-testid":"stElementContainer","data-stale":y,isStale:y&&!i,elementType:p,node:d,children:jsx$1(ErrorBoundary,{children:jsx$1(reactExports.Suspense,{fallback:jsx$1(Skeleton,{element:Skeleton$1.create({style:Skeleton$1.SkeletonStyle.ELEMENT})}),children:jsx$1(RawElementNodeRenderer,{...n,isStale:y})})})})})};class RenderNodeVisitor{constructor(i,e){this.props=i,this.elementKeyOverride=e,this.elementKeySet=new Set,this.reactElements=[],this.index=0,this.transientElementCount=0}getCurrentKey(i){return this.elementKeyOverride||i||this.index.toString()}conformToArray(i){return i?Array.isArray(i)?i:[i]:[]}visitBlockNode(i){const e={...this.props,node:i},t=this.getCurrentKey();this.index+=1;const o=jsx$1(BlockNodeRenderer,{...e},t);return this.reactElements.push(o),o}visitTransientNode(i){const e=[];i.transientNodes.forEach(o=>{const d=this.getCurrentKey(`transient-${this.transientElementCount}`);this.transientElementCount+=1;const p=o.accept(new RenderNodeVisitor(this.props,d));e.push(...this.conformToArray(p))}),this.reactElements.push(...e);const t=i.anchor?.accept(this);return e.push(...this.conformToArray(t)),e}visitElementNode(i){const e={...this.props,node:i},t=this.getCurrentKey(getElementId(i.element));if(this.index+=1,this.elementKeySet.has(t))return null;this.elementKeySet.add(t);const o=jsx$1(ElementNodeRenderer,{...e},t);return this.reactElements.push(o),o}static collectReactElements(i){if(!i.node.children)return[];const e=new RenderNodeVisitor(i);return i.node.children.forEach(t=>t.accept(e)),e.reactElements}}const ChildRenderer=n=>(assignDividerColor(n.node,useEmotionTheme()),jsx$1(Fragment,{children:RenderNodeVisitor.collectReactElements(n)})),getLayoutSubElement=n=>{const i=n.type,e=i?n[i]:void 0;if(!e||typeof e!="object")return;const t=e,o={useContainerWidth:t.useContainerWidth,height:t.height,width:t.width,widthConfig:t.widthConfig};if(!(o.useContainerWidth===void 0&&o.height===void 0&&o.width===void 0&&o.widthConfig===void 0))return o},ContainerContentsWrapper=n=>{const i=reactExports.useContext(FlexContext),e={direction:Direction.VERTICAL,flex:1,gap:streamlit.GapSize.SMALL,height:n.height,border:!1},t=getKeyFromId(n.node.deltaBlock.id);return jsx$1(FlexContextProvider,{direction:Direction.VERTICAL,isRoot:n.isRoot,parentContext:i,children:jsx$1(StyledFlexContainerBlock,{...e,className:classNames(getClassnamePrefix(Direction.VERTICAL),convertKeyToClassName(t)),"data-testid":getClassnamePrefix(Direction.VERTICAL),children:jsx$1(ChildRenderer,{...n})})})},FlexBoxContainer=n=>{const i=getDirectionOfBlock(n.node.deltaBlock),e=reactExports.useContext(FlexContext),t=getActivateScrollToBottomBackwardsCompatible(n.node),o=useScrollToBottom(t),d=useLayoutStyles({element:n.node.deltaBlock,subElement:getLayoutSubElement(n.node.deltaBlock)}),p={gap:n.node.deltaBlock.flexContainer?.gapConfig?.gapSize??streamlit.GapSize.SMALL,direction:i,$wrap:n.node.deltaBlock.flexContainer?.wrap??!1,overflow:d.overflow,border:getBorderBackwardsCompatible(n.node.deltaBlock),height:d.height,flex:"1",align:n.node.deltaBlock.flexContainer?.align,justify:n.node.deltaBlock.flexContainer?.justify},h=getKeyFromId(n.node.deltaBlock.id),y=n.node.deltaBlock.widthConfig?.pixelWidth??void 0,$=n.node.deltaBlock.widthConfig?.useContent??!1,E=(n.node.deltaBlock.widthConfig?.pixelWidth??0)>0||(n.node.deltaBlock.widthConfig?.remWidth??0)>0;return jsx$1(FlexContextProvider,{direction:i,parentWidth:y,hasContentWidth:$,hasFixedWidth:E,parentContext:e,children:jsx$1(StyledFlexContainerBlock,{...p,className:classNames(getClassnamePrefix(i),convertKeyToClassName(h)),"data-testid":getClassnamePrefix(i),ref:o,"data-test-scroll-behavior":t?"scroll-to-bottom":"normal",children:jsx$1(ChildRenderer,{...n})})})},LARGE_STRETCH_BEHAVIOR=["tabContainer"],MEDIUM_STRETCH_BEHAVIOR=["chatInput"],BlockNodeRenderer=n=>{const{node:i}=n,{scriptRunState:e,scriptRunId:t,fragmentIdsThisRun:o}=reactExports.useContext(ScriptRunContext);let d;LARGE_STRETCH_BEHAVIOR.includes(i.deltaBlock.type??"")?d="14rem":MEDIUM_STRETCH_BEHAVIOR.includes(i.deltaBlock.type??"")?d="8rem":i.deltaBlock.type==="chatMessage"?i.isEmpty&&(d="8rem"):(i.deltaBlock.type==="flexContainer"||i.deltaBlock.column||i.deltaBlock.expandable)&&(i.isEmpty||(d="8rem"));const p=useLayoutStyles({element:i.deltaBlock,subElement:getLayoutSubElement(i.deltaBlock),minStretchBehavior:d});if(i.isEmpty&&!i.deltaBlock.allowEmpty)return jsx$1(Fragment,{});const h=shouldComponentBeEnabled("",e),y=isComponentStale(h,i,e,t,o),$={...n,node:i},E=n.disableFullscreenMode||notNullOrUndefined(i.deltaBlock.dialog)||notNullOrUndefined(i.deltaBlock.popover);let M;const H=jsx$1(ContainerContentsWrapper,{...$,disableFullscreenMode:E,height:"100%"});if(checkFlexContainerBackwardsCompatibile(i.deltaBlock)&&(M=jsx$1(FlexBoxContainer,{...$})),i.deltaBlock.dialog)return jsx$1(Dialog$1,{element:i.deltaBlock.dialog,deltaMsgReceivedAt:i.deltaMsgReceivedAt,widgetMgr:n.widgetMgr,fragmentId:i.fragmentId,children:H});if(i.deltaBlock.expandable&&(M=jsx$1(Expander$1,{isStale:y,element:i.deltaBlock.expandable,children:H})),i.deltaBlock.popover&&(M=jsx$1(Popover$1,{empty:i.isEmpty,element:i.deltaBlock.popover,stretchWidth:shouldWidthStretch(i.deltaBlock.widthConfig),children:H})),i.deltaBlock.type==="form"){const{formId:Z,clearOnSubmit:be,enterToSubmit:ye,border:we}=i.deltaBlock.form;M=jsx$1(Form$1,{formId:Z,clearOnSubmit:be,enterToSubmit:ye,widgetMgr:n.widgetMgr,border:we,overflow:p.overflow,children:H})}if(i.deltaBlock.chatMessage&&(M=jsx$1(ChatMessage$1,{element:i.deltaBlock.chatMessage,endpoints:n.endpoints,children:H})),i.deltaBlock.column)return jsx$1(StyledColumn,{weight:i.deltaBlock.column.weight??0,gap:backwardsCompatibleColumnGapSize(i.deltaBlock.column),verticalAlignment:i.deltaBlock.column.verticalAlignment??void 0,showBorder:i.deltaBlock.column.showBorder??!1,className:"stColumn","data-testid":"stColumn",children:H});if(i.deltaBlock.tabContainer){const be={...$,isStale:y,renderTabContent:ye=>jsx$1(ContainerContentsWrapper,{...ye,height:"auto"}),width:p.width,flex:p.flex};return jsx$1(Tabs$1,{...be})}return M?jsx$1(StyledLayoutWrapper,{"data-testid":"stLayoutWrapper",...p,children:M}):H},DownloadContext=reactExports.createContext({requestDeferredFile:void 0});DownloadContext.displayName="DownloadContext";const NavigationContext=reactExports.createContext({pageLinkBaseUrl:"",currentPageScriptHash:"",onPageChange:()=>{},navSections:[],appPages:[]});NavigationContext.displayName="NavigationContext";const StyledDataFrameOverlay=styled("div",{target:"e1hos2sk1"})(({theme:n})=>({position:"fixed",top:0,left:0,zIndex:n.zIndices.tablePortal,lineHeight:"100%",...!hasLightBackgroundColor(n)&&{"& input[type='date'], & input[type='time'], & input[type='datetime-local']":{"&::-webkit-calendar-picker-indicator":{filter:"brightness(0) invert(1)",opacity:1}}}})),StyledErrorMessage=styled("small",{target:"e1hos2sk2"})(({theme:n})=>({color:n.colors.redTextColor,fontSize:n.fontSizes.sm,marginTop:n.spacing.twoXS,display:"block"})),PortalContext=reactExports.createContext(null);PortalContext.displayName="PortalContext";const PortalProvider=({children:n})=>{const i=reactExports.useRef(null),e=reactExports.useCallback(()=>i.current,[]);return jsxs(PortalContext.Provider,{value:e,children:[n,jsx$1(StyledDataFrameOverlay,{"data-testid":"portal",id:"portal",ref:i})]})},SidebarConfigContext=reactExports.createContext({initialSidebarState:PageConfig.SidebarState.AUTO,appLogo:null,sidebarChevronDownshift:0,expandSidebarNav:!1,hideSidebarNav:!1});SidebarConfigContext.displayName="SidebarConfigContext";const ThemeContext=reactExports.createContext({activeTheme:getDefaultTheme(),setTheme:()=>{},availableThemes:[]});ThemeContext.displayName="ThemeContext";function ThemeProvider({theme:n,baseuiTheme:i,children:e}){return jsx$1(ThemeProvider$1,{theme:i||baseuiLightTheme,children:jsx$1(ThemeProvider$2,{theme:n,children:e})})}const CopyButton=({text:n})=>{const i=useEmotionTheme(),e=reactExports.useRef(null),{isCopied:t,copyToClipboard:o,label:d}=useCopyToClipboard(),p=reactExports.useCallback(()=>{o(n)},[o,n]);return jsx$1(StyledCopyButton,{"data-testid":"stCodeCopyButton",title:d,"aria-label":d,type:"button",ref:e,onClick:p,children:t?jsx$1(Check,{size:convertRemToPx(i.iconSizes.base)}):jsx$1(Copy,{size:convertRemToPx(i.iconSizes.base)})})},CopyButton$1=reactExports.memo(CopyButton);function StreamlitErrorCodeBlock({children:n}){const i=typeof n=="string"&&n.trim().length>0;return jsxs(StyledCodeBlock,{className:"stErrorCodeBlock","data-testid":"stErrorCodeBlock",children:[jsx$1(StyledPre,{wrapLines:!1,children:jsx$1(StyledCode,{wrapLines:!1,children:n})}),i&&jsx$1(StyledCopyButtonContainer,{children:jsx$1(CopyButton$1,{text:n})})]})}const StreamlitErrorCodeBlock$1=reactExports.memo(StreamlitErrorCodeBlock);function iconToUrl(n){const i=/^:(.+)\/(.+):$/,e=n.match(i);return e===null?"":`https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsrounded/${e[2]}/default/24px.svg`}function handleFavicon(n,i,e){const t=p=>{overwriteFavicon(p),i({type:"SET_PAGE_FAVICON",favicon:p})};if(n.startsWith(":material")){t(iconToUrl(n));return}const o="emoji:";if(n.startsWith(o)){const p=n.substring(o.length),h=createEmojiDataUrl(p);t(h);return}/^:[a-zA-Z0-9_+-]+:$/.test(n)?convertShortcodeToEmoji(n).then(p=>{t(p?createEmojiDataUrl(p):e.buildMediaURL(n))}).catch(()=>{t(e.buildMediaURL(n))}):t(e.buildMediaURL(n))}function createEmojiDataUrl(n){return`data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>${n}</text></svg>`}function overwriteFavicon(n){const i=document.querySelector("link[rel='shortcut icon']");i&&(i.href=n)}async function convertShortcodeToEmoji(n){const i=await __vitePreload(()=>import("./index.D5m5f2G-.js"),[],import.meta.url),e=n.replace(/-/g,"_"),t=i.get(e);return t&&t!==e&&i.has(t)?t:""}const StyledWidgetLabel=styled("label",{target:"e1a116dh0"})(({disabled:n,labelVisibility:i,theme:e})=>({fontSize:e.fontSizes.sm,color:n?e.colors.fadedText40:e.colors.bodyText,display:i===LabelVisibilityOptions.Collapsed?"none":"flex",visibility:i===LabelVisibilityOptions.Hidden?"hidden":"visible",marginBottom:e.spacing.twoXS,height:"auto",minHeight:e.fontSizes.xl,verticalAlign:"middle",flexDirection:"row",alignItems:"center"})),StyledWidgetLabelHelp=styled("div",{target:"e1a116dh1"})({display:"flex",flexDirection:"row",justifyContent:"flex-end",flex:1}),StyledWidgetInstructions=styled("div",{target:"e1a116dh2"})(({theme:n})=>({fontSize:n.fontSizes.twoSm,color:n.colors.fadedText60,margin:n.spacing.none,textAlign:"right",position:"absolute",bottom:n.spacing.threeXS,right:`calc(${n.fontSizes.mdLg} * 0.5)`})),StyledWidgetLabelHelpInline=styled("span",{target:"e1a116dh3"})(({theme:n})=>({marginLeft:n.spacing.xs,position:"relative",display:"flex",flexDirection:"row"}));function WidgetLabel({label:n,children:i,disabled:e,labelVisibility:t,htmlFor:o}){return isNullOrUndefined(n)?jsx$1(Fragment,{}):jsxs(StyledWidgetLabel,{"data-testid":"stWidgetLabel",disabled:e,labelVisibility:t,htmlFor:o,children:[jsx$1("span",{"aria-hidden":"true",children:jsx$1(StreamlitMarkdown$1,{source:n,allowHTML:!1,isLabel:!0})}),i]})}function WidgetLabelHelpIcon({content:n,label:i,ariaLabel:e,placement:t=Placement.TOP_RIGHT,isLatex:o,markdownProps:d,onMouseEnterDelay:p,containerWidth:h}){return jsx$1(StyledWidgetLabelHelp,{children:jsx$1(TooltipIcon,{content:n,placement:t,isLatex:o,markdownProps:d,onMouseEnterDelay:p,containerWidth:h,ariaLabel:e??getHelpTooltipAriaLabel(i)})})}const arrayComparator=(n,i)=>n.length!==i.length?!1:n.every((e,t)=>Object.is(e,i[t])),useExecuteWhenChanged=(n,i,e=arrayComparator)=>{const[t,o]=reactExports.useState(i);e(t,i)||(o(i),n())};var _excluded$i=["title","size","color","overrides"];function _extends$g(){return _extends$g=Object.assign?Object.assign.bind():function(n){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n},_extends$g.apply(this,arguments)}function _objectWithoutProperties$f(n,i){if(n==null)return{};var e=_objectWithoutPropertiesLoose$e(n,i),t,o;if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(n);for(o=0;o<d.length;o++)t=d[o],!(i.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(n,t)&&(e[t]=n[t])}return e}function _objectWithoutPropertiesLoose$e(n,i){if(n==null)return{};var e={},t=Object.keys(n),o,d;for(d=0;d<t.length;d++)o=t[d],!(i.indexOf(o)>=0)&&(e[o]=n[o]);return e}function _slicedToArray$d(n,i){return _arrayWithHoles$d(n)||_iterableToArrayLimit$d(n,i)||_unsupportedIterableToArray$d(n,i)||_nonIterableRest$d()}function _nonIterableRest$d(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
120
120
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$d(n,i){if(n){if(typeof n=="string")return _arrayLikeToArray$d(n,i);var e=Object.prototype.toString.call(n).slice(8,-1);if(e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set")return Array.from(n);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return _arrayLikeToArray$d(n,i)}}function _arrayLikeToArray$d(n,i){(i==null||i>n.length)&&(i=n.length);for(var e=0,t=new Array(i);e<i;e++)t[e]=n[e];return t}function _iterableToArrayLimit$d(n,i){var e=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(e!=null){var t=[],o=!0,d=!1,p,h;try{for(e=e.call(n);!(o=(p=e.next()).done)&&(t.push(p.value),!(i&&t.length===i));o=!0);}catch(y){d=!0,h=y}finally{try{!o&&e.return!=null&&e.return()}finally{if(d)throw h}}return t}}function _arrayWithHoles$d(n){if(Array.isArray(n))return n}function ChevronDown(n,i){var e=useStyletron(),t=_slicedToArray$d(e,2),o=t[1],d=n.title,p=d===void 0?"Down":d,h=n.size,y=n.color,$=n.overrides,E=$===void 0?{}:$,M=_objectWithoutProperties$f(n,_excluded$i),H=mergeOverride({component:o.icons&&o.icons.ChevronDown?o.icons.ChevronDown:null},E&&E.Svg?toObjectOverride(E.Svg):{});return reactExports.createElement(Icon$1,_extends$g({viewBox:"0 0 24 24",ref:i,title:p,size:h,color:y,overrides:{Svg:H}},M),reactExports.createElement("path",{transform:"rotate(270, 12, 12)",fillRule:"evenodd",clipRule:"evenodd",d:"M9 12C9 12.2652 9.10536 12.5196 9.29289 12.7071L13.2929 16.7071C13.6834 17.0976 14.3166 17.0976 14.7071 16.7071C15.0976 16.3166 15.0976 15.6834 14.7071 15.2929L11.4142 12L14.7071 8.70711C15.0976 8.31658 15.0976 7.68342 14.7071 7.29289C14.3166 6.90237 13.6834 6.90237 13.2929 7.29289L9.29289 11.2929C9.10536 11.4804 9 11.7348 9 12Z"}))}const ChevronDown$1=reactExports.forwardRef(ChevronDown);var _excluded$h=["title","size","color","overrides"];function _extends$f(){return _extends$f=Object.assign?Object.assign.bind():function(n){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n},_extends$f.apply(this,arguments)}function _objectWithoutProperties$e(n,i){if(n==null)return{};var e=_objectWithoutPropertiesLoose$d(n,i),t,o;if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(n);for(o=0;o<d.length;o++)t=d[o],!(i.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(n,t)&&(e[t]=n[t])}return e}function _objectWithoutPropertiesLoose$d(n,i){if(n==null)return{};var e={},t=Object.keys(n),o,d;for(d=0;d<t.length;d++)o=t[d],!(i.indexOf(o)>=0)&&(e[o]=n[o]);return e}function _slicedToArray$c(n,i){return _arrayWithHoles$c(n)||_iterableToArrayLimit$c(n,i)||_unsupportedIterableToArray$c(n,i)||_nonIterableRest$c()}function _nonIterableRest$c(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
121
121
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$c(n,i){if(n){if(typeof n=="string")return _arrayLikeToArray$c(n,i);var e=Object.prototype.toString.call(n).slice(8,-1);if(e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set")return Array.from(n);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return _arrayLikeToArray$c(n,i)}}function _arrayLikeToArray$c(n,i){(i==null||i>n.length)&&(i=n.length);for(var e=0,t=new Array(i);e<i;e++)t[e]=n[e];return t}function _iterableToArrayLimit$c(n,i){var e=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(e!=null){var t=[],o=!0,d=!1,p,h;try{for(e=e.call(n);!(o=(p=e.next()).done)&&(t.push(p.value),!(i&&t.length===i));o=!0);}catch(y){d=!0,h=y}finally{try{!o&&e.return!=null&&e.return()}finally{if(d)throw h}}return t}}function _arrayWithHoles$c(n){if(Array.isArray(n))return n}function DeleteAlt(n,i){var e=useStyletron(),t=_slicedToArray$c(e,2),o=t[1],d=n.title,p=d===void 0?"Delete Alt":d,h=n.size,y=n.color,$=n.overrides,E=$===void 0?{}:$,M=_objectWithoutProperties$e(n,_excluded$h),H=mergeOverride({component:o.icons&&o.icons.DeleteAlt?o.icons.DeleteAlt:null},E&&E.Svg?toObjectOverride(E.Svg):{});return reactExports.createElement(Icon$1,_extends$f({viewBox:"0 0 24 24",ref:i,title:p,size:h,color:y,overrides:{Svg:H}},M),reactExports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 20C16.4183 20 20 16.4183 20 12C20 7.58173 16.4183 4 12 4C7.58173 4 4 7.58173 4 12C4 16.4183 7.58173 20 12 20ZM10.0303 8.96967C9.73743 8.67679 9.26257 8.67679 8.96967 8.96967C8.67676 9.26257 8.67676 9.73743 8.96967 10.0303L10.9393 12L8.96967 13.9697C8.67676 14.2626 8.67676 14.7374 8.96967 15.0303C9.26257 15.3232 9.73743 15.3232 10.0303 15.0303L12 13.0607L13.9697 15.0303C14.2626 15.3232 14.7374 15.3232 15.0303 15.0303C15.3232 14.7374 15.3232 14.2626 15.0303 13.9697L13.0607 12L15.0303 10.0303C15.3232 9.73743 15.3232 9.26257 15.0303 8.96967C14.7374 8.67679 14.2626 8.67679 13.9697 8.96967L12 10.9393L10.0303 8.96967Z"}))}const DeleteAlt$1=reactExports.forwardRef(DeleteAlt);var _excluded$g=["title","size","color","overrides"];function _extends$e(){return _extends$e=Object.assign?Object.assign.bind():function(n){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n},_extends$e.apply(this,arguments)}function _objectWithoutProperties$d(n,i){if(n==null)return{};var e=_objectWithoutPropertiesLoose$c(n,i),t,o;if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(n);for(o=0;o<d.length;o++)t=d[o],!(i.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(n,t)&&(e[t]=n[t])}return e}function _objectWithoutPropertiesLoose$c(n,i){if(n==null)return{};var e={},t=Object.keys(n),o,d;for(d=0;d<t.length;d++)o=t[d],!(i.indexOf(o)>=0)&&(e[o]=n[o]);return e}function _slicedToArray$b(n,i){return _arrayWithHoles$b(n)||_iterableToArrayLimit$b(n,i)||_unsupportedIterableToArray$b(n,i)||_nonIterableRest$b()}function _nonIterableRest$b(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
122
122
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$b(n,i){if(n){if(typeof n=="string")return _arrayLikeToArray$b(n,i);var e=Object.prototype.toString.call(n).slice(8,-1);if(e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set")return Array.from(n);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return _arrayLikeToArray$b(n,i)}}function _arrayLikeToArray$b(n,i){(i==null||i>n.length)&&(i=n.length);for(var e=0,t=new Array(i);e<i;e++)t[e]=n[e];return t}function _iterableToArrayLimit$b(n,i){var e=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(e!=null){var t=[],o=!0,d=!1,p,h;try{for(e=e.call(n);!(o=(p=e.next()).done)&&(t.push(p.value),!(i&&t.length===i));o=!0);}catch(y){d=!0,h=y}finally{try{!o&&e.return!=null&&e.return()}finally{if(d)throw h}}return t}}function _arrayWithHoles$b(n){if(Array.isArray(n))return n}function Search(n,i){var e=useStyletron(),t=_slicedToArray$b(e,2),o=t[1],d=n.title,p=d===void 0?"Search":d,h=n.size,y=n.color,$=n.overrides,E=$===void 0?{}:$,M=_objectWithoutProperties$d(n,_excluded$g),H=mergeOverride({component:o.icons&&o.icons.Search?o.icons.Search:null},E&&E.Svg?toObjectOverride(E.Svg):{});return reactExports.createElement(Icon$1,_extends$e({viewBox:"0 0 24 24",ref:i,title:p,size:h,color:y,overrides:{Svg:H}},M),reactExports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 6C8.79086 6 7 7.79086 7 10C7 12.2091 8.79086 14 11 14C13.2091 14 15 12.2091 15 10C15 7.79086 13.2091 6 11 6ZM5 10C5 6.68629 7.68629 4 11 4C14.3137 4 17 6.68629 17 10C17 11.2958 16.5892 12.4957 15.8907 13.4765L19.7071 17.2929C20.0976 17.6834 20.0976 18.3166 19.7071 18.7071C19.3166 19.0976 18.6834 19.0976 18.2929 18.7071L14.4765 14.8907C13.4957 15.5892 12.2958 16 11 16C7.68629 16 5 13.3137 5 10Z"}))}const SearchIconComponent=reactExports.forwardRef(Search);var _excluded$f=["title","size","color","overrides"];function _extends$d(){return _extends$d=Object.assign?Object.assign.bind():function(n){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n},_extends$d.apply(this,arguments)}function _objectWithoutProperties$c(n,i){if(n==null)return{};var e=_objectWithoutPropertiesLoose$b(n,i),t,o;if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(n);for(o=0;o<d.length;o++)t=d[o],!(i.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(n,t)&&(e[t]=n[t])}return e}function _objectWithoutPropertiesLoose$b(n,i){if(n==null)return{};var e={},t=Object.keys(n),o,d;for(d=0;d<t.length;d++)o=t[d],!(i.indexOf(o)>=0)&&(e[o]=n[o]);return e}function _slicedToArray$a(n,i){return _arrayWithHoles$a(n)||_iterableToArrayLimit$a(n,i)||_unsupportedIterableToArray$a(n,i)||_nonIterableRest$a()}function _nonIterableRest$a(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
@@ -152,4 +152,4 @@ Event: ${i}`)}async pingServer(){const i=doInitPings(this.args.baseUriPartsList,
|
|
|
152
152
|
The app's main file \`${n}\` has
|
|
153
153
|
not been pushed to GitHub. Please add it to continue.
|
|
154
154
|
`,allowHTML:!1})}}const DEPLOY_URL="https://share.streamlit.io/deploy",STREAMLIT_CLOUD_URL="https://streamlit.io/cloud",STREAMLIT_COMMUNITY_CLOUD_DOCS_URL="https://share.streamlit.io/cloud-getting-started",STREAMLIT_DEPLOY_TUTORIAL_URL="https://share.streamlit.io/deployment-tutorial",SNOWFLAKE_LEARN_MORE_URL="https://share.streamlit.io/sis-about",SNOWFLAKE_TRIAL_URL="https://share.streamlit.io/snowflake-trial",StyledParagraph=styled("p",{target:"edgwnvj0"})({textAlign:"justify"});function NoRepositoryDetected(){return{title:"Unable to deploy",body:jsxs(StyledParagraph,{children:["The app’s code is not connected to a remote GitHub repository. To deploy on Streamlit Community Cloud, please put your code in a GitHub repository and publish the current branch. Read more in"," ",jsx$1("a",{href:STREAMLIT_COMMUNITY_CLOUD_DOCS_URL,rel:"noopener noreferrer",target:"_blank",children:"our documentation"}),"."]})}}function DeployCard(n){const{colors:i,spacing:e,radii:t,breakpoints:o,sizes:d}=useEmotionTheme(),{children:p}=n;return jsx$1(Card,{overrides:{Root:{style:{borderTopWidth:d.borderWidth,borderBottomWidth:d.borderWidth,borderLeftWidth:d.borderWidth,borderRightWidth:d.borderWidth,borderTopStyle:"solid",borderBottomStyle:"none",borderLeftStyle:"none",borderRightStyle:"solid",borderTopColor:i.borderColor,borderBottomColor:i.borderColor,borderLeftColor:i.borderColor,borderRightColor:i.borderColor,borderTopLeftRadius:"none",borderTopRightRadius:"none",borderBottomLeftRadius:"none",borderBottomRightRadius:"none",":last-child":{borderRightStyle:"none",borderBottomRightRadius:t.xl},":first-child":{borderBottomLeftRadius:t.xl},[`@media (max-width: ${o.md})`]:{":last-child":{borderBottomLeftRadius:t.xl}}}},Contents:{style:{marginBottom:0,marginTop:0,marginLeft:0,marginRight:0,height:"100%"}},Body:{style:{padding:e.twoXL,marginBottom:0,marginTop:0,marginLeft:0,marginRight:0,height:"100%",display:"flex",flexDirection:"column",[`@media (max-width: ${o.md})`]:{padding:e.xl}}}},children:p})}const Checkmark="data:image/svg+xml,%3csvg%20width='12'%20height='9'%20viewBox='0%200%2012%209'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4.00009%206.78L1.68676%204.46667C1.42676%204.20667%201.00676%204.20667%200.746758%204.46667C0.486758%204.72667%200.486758%205.14667%200.746758%205.40667L3.53342%208.19334C3.79342%208.45334%204.21342%208.45334%204.47342%208.19334L11.5268%201.14C11.7868%200.880005%2011.7868%200.460005%2011.5268%200.200005C11.2668%20-0.0599951%2010.8468%20-0.0599951%2010.5868%200.200005L4.00009%206.78Z'%20fill='%23808495'/%3e%3c/svg%3e",StyledHeader$1=styled("div",{target:"e7qwnp70"})(({theme:n})=>({fontFamily:n.fonts.sansSerif,fontWeight:n.fontWeights.bold,fontSize:n.fontSizes.lg,marginTop:n.spacing.twoXL,marginBottom:n.spacing.twoXS,[`@media (max-width: ${n.breakpoints.md})`]:{marginTop:n.spacing.md}})),StyledSubheader=styled("div",{target:"e7qwnp71"})(({theme:n})=>({fontFamily:n.fonts.sansSerif,fontWeight:n.fontWeights.normal,fontSize:n.fontSizes.md,marginTop:n.spacing.twoXS,marginBottom:n.spacing.md,[`@media (max-width: ${n.breakpoints.md})`]:{marginTop:n.spacing.md}})),StyledCardContainer=styled("div",{target:"e7qwnp72"})(({theme:n})=>({display:"grid",maxWidth:`calc(1.25 * ${n.sizes.contentMaxWidth})`,gridTemplateColumns:"1fr 1fr 1fr",gridGap:n.spacing.none,[`@media (max-width: ${n.breakpoints.md})`]:{gridTemplateColumns:"1fr"}})),StyledElement=styled("div",{target:"e7qwnp73"})(({theme:n})=>({display:"inline-flex",marginTop:n.spacing.sm,"& > span":{fontFamily:n.fonts.sansSerif,fontWeight:n.fontWeights.normal,fontSize:n.fontSizes.md,marginLeft:n.spacing.twoXL,color:n.colors.gray70},"& > img":{position:"absolute",marginTop:n.spacing.sm}})),StyledActionsWrapper=styled("div",{target:"e7qwnp74"})(({theme:n})=>({display:"flex",marginTop:n.spacing.threeXL,"& > button":{marginRight:n.spacing.twoXL},[`@media (max-width: ${n.breakpoints.md})`]:{marginTop:n.spacing.xl}}));function DeployListElement(n){const{children:i}=n;return jsxs(StyledElement,{children:[jsx$1("img",{src:Checkmark,alt:"Checkmark"}),jsx$1("span",{children:i})]})}function ModalBody({children:n}){const{colors:i,fontSizes:e,spacing:t}=useEmotionTheme();return jsx$1(ModalBody$2,{style:{marginTop:t.none,marginLeft:t.none,marginRight:t.none,marginBottom:t.none,paddingTop:t.md,paddingRight:t.none,paddingBottom:t.none,paddingLeft:t.none,color:i.bodyText,fontSize:e.md,overflowY:"auto"},children:n})}function DeployModal(n){const{children:i,onClose:e}=n;return jsxs(Modal,{isOpen:!0,closeable:!0,onClose:e,size:"auto",children:[jsx$1(ModalHeader,{children:"Deploy this app using..."}),jsx$1(ModalBody,{children:i})]})}const{GitStates}=GitInfo,openUrl=n=>{window.open(n,"_blank")},getDeployAppUrl=n=>{if(n){const i=new URL(DEPLOY_URL);return i.searchParams.set("repository",n.repository??""),i.searchParams.set("branch",n.branch??""),i.searchParams.set("mainModule",n.module??""),i.toString()}return STREAMLIT_CLOUD_URL};function DeployDialog(n){const{gitInfo:i,onClose:e,metricsMgr:t,showDeployError:o,isDeployErrorModalOpen:d}=n,p=reactExports.useCallback(()=>{if(t.enqueue("menuClick",{label:"deployButtonInDialog"}),!i){const Z=NoRepositoryDetected();o(Z.title,Z.body);return}const{repository:h,branch:y,module:$,untrackedFiles:E,state:M}=i;if((!h||!y||!$)&&M===GitStates.DEFAULT){const Z=NoRepositoryDetected();o(Z.title,Z.body);return}if(M===GitStates.HEAD_DETACHED){const Z=DetachedHead();o(Z.title,Z.body);return}if($&&E?.includes($)){const Z=ModuleIsNotAdded($);o(Z.title,Z.body);return}d&&e(),openUrl(getDeployAppUrl(i))},[t,i,d,o,e]);return jsx$1(DeployModal,{onClose:e,children:jsxs(StyledCardContainer,{children:[jsxs(DeployCard,{children:[jsxs(Body,{style:{flexGrow:1},children:[jsx$1("img",{src:StreamlitLogo,alt:"Streamlit Logo","data-testid":"stDeployDialogCommunityCloudIcon"}),jsx$1(StyledHeader$1,{children:"Streamlit Community Cloud"}),jsx$1(StyledSubheader,{children:"For community, always free"}),jsx$1(DeployListElement,{children:"For personal hobbies and learning"}),jsx$1(DeployListElement,{children:"Deploy unlimited public apps"}),jsx$1(DeployListElement,{children:"Explore and learn from Streamlit’s community and popular apps"})]}),jsx$1(Action,{children:jsxs(StyledActionsWrapper,{children:[jsx$1(BaseButton,{kind:BaseButtonKind.PRIMARY,onClick:p,children:"Deploy now"}),jsx$1(BaseButton,{onClick:()=>{t.enqueue("menuClick",{label:"readMoreCommunityCloudInDeployDialog"}),openUrl(STREAMLIT_COMMUNITY_CLOUD_DOCS_URL)},kind:BaseButtonKind.MINIMAL,children:"Learn more"})]})})]}),jsxs(DeployCard,{children:[jsxs(Body,{style:{flexGrow:1},children:[jsx$1("img",{src:Snowflake,alt:"Snowflake","data-testid":"stDeployDialogSnowflakeDeploymentIcon"}),jsx$1(StyledHeader$1,{children:"Snowflake"}),jsx$1(StyledSubheader,{children:"For enterprise"}),jsx$1(DeployListElement,{children:"Enterprise-level security, support, and fully managed infrastructure"}),jsx$1(DeployListElement,{children:"Deploy unlimited private apps with role-based sharing"}),jsx$1(DeployListElement,{children:"Integrate with Snowflake’s full data stack"})]}),jsx$1(Action,{children:jsxs(StyledActionsWrapper,{children:[jsx$1(BaseButton,{kind:BaseButtonKind.SECONDARY,onClick:()=>{t.enqueue("menuClick",{label:"startTrialInDeployDialog"}),openUrl(SNOWFLAKE_TRIAL_URL)},children:"Start trial"}),jsx$1(BaseButton,{onClick:()=>{t.enqueue("menuClick",{label:"learnMoreSnowflakeInDeployDialog"}),openUrl(SNOWFLAKE_LEARN_MORE_URL)},kind:BaseButtonKind.MINIMAL,children:"Learn more"})]})})]}),jsxs(DeployCard,{children:[jsxs(Body,{style:{flexGrow:2},children:[jsx$1("img",{src:Rocket,alt:"Rocket","data-testid":"stDeployDialogCustomDeploymentIcon"}),jsx$1(StyledHeader$1,{children:"Other platforms"}),jsx$1(StyledSubheader,{children:"For custom deployment "}),jsx$1(DeployListElement,{children:"Deploy on your own hardware or cloud service"}),jsx$1(DeployListElement,{children:"Set up and maintain your own authentication, resources, and costs"})]}),jsx$1(Action,{children:jsx$1(StyledActionsWrapper,{children:jsx$1(BaseButton,{onClick:()=>{t.enqueue("menuClick",{label:"readMoreDeployTutorialInDeployDialog"}),openUrl(STREAMLIT_DEPLOY_TUTORIAL_URL)},kind:BaseButtonKind.MINIMAL,children:"Learn more"})})})]})]})})}const StyledDialogBody=styled("div",{target:"e1gfztv20"})(({theme:n})=>({display:"grid",gap:n.spacing.twoXL,gridTemplateColumns:"1fr 1fr",margin:0,padding:0})),StyledFullRow=styled("div",{target:"e1gfztv21"})(({theme:n})=>({gridColumnStart:1,gridColumnEnd:-1,display:"grid",gap:n.spacing.xs})),StyledHeader=styled("h2",{target:"e1gfztv22"})(({theme:n})=>({paddingBottom:0,paddingTop:0,marginBottom:n.spacing.md,marginTop:"0",fontWeight:n.fontWeights.bold,fontSize:n.fontSizes.md,lineHeight:n.lineHeights.tight,color:n.colors.bodyText,display:"grid",gridAutoFlow:"row",gap:n.spacing.xs,"&:first-of-type":{marginTop:0}})),StyledLabel=styled("label",{target:"e1gfztv23"})(({theme:n})=>({paddingBottom:0,paddingTop:0,marginBottom:0,marginTop:0,lineHeight:n.lineHeights.tight,fontSize:n.fontSizes.sm})),StyledCheckbox=styled("input",{target:"e1gfztv26"})(({theme:n})=>({marginRight:n.spacing.xs,appearance:"none",border:`${n.sizes.borderWidth} solid ${n.colors.borderColor}`,width:n.fontSizes.md,height:n.fontSizes.md,borderRadius:`min(${n.radii.md}, ${n.radii.maxCheckbox})`,display:"inline-flex",alignItems:"center",justifyContent:"center",padding:0,verticalAlign:"middle",overflow:"hidden","&:focus-visible":{outline:`2px solid ${n.colors.primary}`},"&:checked":{backgroundColor:n.colors.primary,"&:after":{content:'"✓"',fontFamily:n.fonts.monospace,fontSize:n.fontSizes.md,color:n.colors.white,lineHeight:n.lineHeights.none}},"&:disabled":{backgroundColor:n.colors.darkenedBgMix15}})),StyledDeployErrorContent=styled("div",{target:"e1gfztv27"})(({theme:n})=>({"& > ul":{paddingLeft:n.spacing.twoXL}})),StyledErrorText=styled("div",{target:"e1gfztv28"})(({theme:n,hasCodeBelow:i})=>({...i&&{marginBottom:n.spacing.lg}})),SettingsDialog=reactExports.memo(function n({isServerConnected:i,onClose:e,onSave:t,settings:o,allowRunOnSave:d,animateModal:p,metricsMgr:h,sessionInfo:y}){const{activeTheme:$,availableThemes:E,setTheme:M}=reactExports.useContext(ThemeContext),H=reactExports.useRef(o),Z=reactExports.useRef(!0),[be,ye]=reactExports.useState({...o}),we=reactExports.useCallback((Fe,Me)=>{ye(Le=>({...Le,[Fe]:Me}))},[]);reactExports.useEffect(()=>{if(Z.current){Z.current=!1;return}H.current=be,t(H.current)},[t,be]);const xe=reactExports.useCallback(Fe=>{we(Fe.target.name,Fe.target.checked)},[we]),Ce=reactExports.useCallback(Fe=>{let Me;Fe&&(Me=E.find(Le=>Le.name.startsWith("Custom Theme")?Le.displayName===Fe:Le.name===Fe)),Me===void 0&&(Me=E[0]),h.enqueue("menuClick",{label:"changeTheme"}),M(Me)},[M,h,E]),Ne=reactExports.useCallback(()=>E.map(Fe=>Fe.displayName??Fe.name),[E]);return jsxs(Modal,{animate:p,isOpen:!0,onClose:e,children:[jsx$1(ModalHeader,{children:"Settings"}),jsx$1(ModalBody$1,{children:jsxs(StyledDialogBody,{children:[d&&jsxs(StyledFullRow,{children:[jsx$1(StyledHeader,{children:"Development"}),jsxs("label",{children:[jsx$1(StyledCheckbox,{disabled:!i,type:"checkbox",name:"runOnSave",checked:be.runOnSave&&i,onChange:xe})," ","Run on save"]}),jsx$1(StreamlitMarkdown$1,{source:"Automatically updates the app when the underlying code is updated.",allowHTML:!1,isCaption:!0})]}),jsxs(StyledFullRow,{children:[jsx$1(StyledHeader,{children:"Appearance"}),jsxs("label",{children:[jsx$1(StyledCheckbox,{type:"checkbox",name:"wideMode",checked:be.wideMode,onChange:xe})," ","Wide mode"]}),jsx$1(StreamlitMarkdown$1,{source:" Turn on to make this app occupy the entire width of the screen.",allowHTML:!1,isCaption:!0})]}),!!E.length&&jsxs(StyledFullRow,{children:[jsx$1(StyledLabel,{children:"Choose app theme"}),jsx$1(UISelectbox,{options:Ne(),disabled:$.name===CUSTOM_THEME_NAME,onChange:Ce,value:$.displayName??$.name,placeholder:"",acceptNewOptions:!1})]}),y.isSet&&jsx$1("div",{"data-testid":"stVersionInfo",children:jsx$1(StreamlitMarkdown$1,{source:`Made with Streamlit ${y.current.streamlitVersion}`,allowHTML:!1,isCaption:!0})})]})})]})});function StreamlitDialog(n){switch(n.type){case DialogType.ABOUT:return jsx$1(AboutDialog,{...n});case DialogType.CLEAR_CACHE:return jsx$1(ClearCacheDialog,{...n});case DialogType.SETTINGS:return jsx$1(SettingsDialog,{...n});case DialogType.SCRIPT_COMPILE_ERROR:return jsx$1(ScriptCompileErrorDialog,{...n});case DialogType.WARNING:case DialogType.CONNECTION_ERROR:return jsx$1(WarningDialog,{...n});case DialogType.DEPLOY_DIALOG:return jsx$1(DeployDialog,{...n});case DialogType.DEPLOY_ERROR:return jsx$1(DeployErrorDialog,{...n});case void 0:return noDialog(n);default:return typeNotRecognizedDialog(n)}}function AboutDialog(n){return jsxs(Modal,{isOpen:!0,onClose:n.onClose,children:[jsx$1(ModalHeader,{children:"About"}),jsx$1(ModalBody$1,{children:n.aboutSectionMd&&jsx$1(StreamlitMarkdown$1,{source:n.aboutSectionMd,allowHTML:!1})})]})}function ClearCacheDialog(n){const e=["**Are you sure you want to clear the app's function caches?**","This will remove all cached entries from functions using","`@st.cache_data` and `@st.cache_resource`."].join(`
|
|
155
|
-
`);return jsx$1("div",{"data-testid":"stClearCacheDialog",children:jsxs(Modal,{isOpen:!0,onClose:n.onClose,children:[jsx$1(ModalHeader,{children:"Clear caches"}),jsx$1(ModalBody$1,{children:jsx$1(StreamlitMarkdown$1,{source:e,allowHTML:!1})}),jsxs(ModalFooter,{children:[jsx$1(ModalButton,{kind:BaseButtonKind.GHOST,onClick:n.onClose,children:"Cancel"}),jsx$1(ModalButton,{autoFocus:!0,kind:BaseButtonKind.SECONDARY,onClick:n.confirmCallback,children:"Clear caches"})]})]})})}function ScriptCompileErrorDialog(n){return jsxs(Modal,{isOpen:!0,onClose:n.onClose,size:"auto",autoFocus:!1,children:[jsx$1(ModalHeader,{children:"Script execution error"}),jsx$1(ModalBody$1,{children:jsx$1(StreamlitErrorCodeBlock$1,{children:n.exception?.message?n.exception.message:"No message"})}),jsx$1(ModalFooter,{children:jsx$1(ModalButton,{kind:BaseButtonKind.SECONDARY,onClick:n.onClose,children:"Close"})})]})}function WarningDialog(n){return jsxs(Modal,{isOpen:!0,onClose:n.onClose,children:[jsx$1(ModalHeader,{children:n.title}),jsx$1(ModalBody$1,{children:n.msg})]})}function DeployErrorDialog({title:n,msg:i,onClose:e,onContinue:t,onTryAgain:o}){const d=()=>{e(),t&&t()};return jsxs(Modal,{isOpen:!0,onClose:e,children:[jsx$1(ModalHeader,{children:n}),jsx$1(ModalBody$1,{children:jsx$1(StyledDeployErrorContent,{children:i})}),jsxs(ModalFooter,{children:[jsx$1(ModalButton,{kind:BaseButtonKind.GHOST,onClick:o,children:"Try again"}),jsx$1(ModalButton,{kind:BaseButtonKind.SECONDARY,onClick:d,children:t?"Continue anyway":"Close"})]})]})}function noDialog({onClose:n}){return jsx$1(Modal,{isOpen:!1,onClose:n})}function typeNotRecognizedDialog(n){return jsx$1(Modal,{isOpen:!0,onClose:n.onClose,children:jsx$1(ModalBody$1,{children:`Dialog type "${n.type}" not recognized.`})})}function parseLinks(n){const i=[];let e=0,t=0;const o=/\[([^\]]+)\]\(([^)]+)\)/g;let d;for(;(d=o.exec(n))!==null;)d.index>e&&i.push(jsx$1(reactExports.Fragment,{children:n.substring(e,d.index)},t++)),i.push(jsx$1("a",{href:d[2],target:"_blank",rel:"noopener noreferrer",children:d[1]},t++)),e=d.index+d[0].length;return e<n.length&&i.push(jsx$1(reactExports.Fragment,{children:n.substring(e)},t++)),i}function DialogErrorMessage({message:n,codeBlock:i}){return jsxs(Fragment,{children:[jsx$1(StyledErrorText,{hasCodeBelow:!!i,children:parseLinks(n)}),i&&jsx$1(StreamlitErrorCodeBlock$1,{children:i})]})}const DialogErrorMessage$1=reactExports.memo(DialogErrorMessage),StyledActionButtonContainer=styled("div",{target:"ekuhni80"})(({theme:n})=>({display:"flex",gap:n.spacing.sm,alignItems:"center",lineHeight:n.iconSizes.md})),StyledActionButtonIcon=styled("div",{target:"ekuhni81"})(({theme:n,icon:i})=>({background:`url("${i}") no-repeat center / contain`,width:n.iconSizes.base,height:n.iconSizes.base})),StyledToolbarActions=styled("div",{target:"ekuhni82"})({display:"flex",alignItems:"center",flexDirection:"row"});function ActionButton({label:n,icon:i,onClick:e}){return jsx$1("div",{className:"stToolbarActionButton","data-testid":"stToolbarActionButton",children:jsx$1(BaseButton,{onClick:e,kind:BaseButtonKind.HEADER_BUTTON,children:jsxs(StyledActionButtonContainer,{children:[i&&jsx$1(StyledActionButtonIcon,{"data-testid":"stToolbarActionButtonIcon",icon:i}),n&&jsx$1("span",{"data-testid":"stToolbarActionButtonLabel",children:n})]})})})}function ToolbarActions({sendMessageToHost:n,hostToolbarItems:i,metricsMgr:e}){return jsx$1(StyledToolbarActions,{className:"stToolbarActions","data-testid":"stToolbarActions",children:i.map(({key:t,label:o,icon:d})=>jsx$1(ActionButton,{label:o,icon:d,onClick:()=>{e.enqueue("menuClick",{label:t}),n({type:"TOOLBAR_ITEM_CALLBACK",key:t})}},t))})}const screencastCounterAnimation=keyframes("0%{opacity:0;}25%{opacity:1;}100%{opacity:0;}"),StyledCountdown=styled("div",{target:"e1ejanx90"})(({theme:n})=>({position:"fixed",display:"flex",justifyContent:"center",alignItems:"center",top:0,left:0,width:n.sizes.full,height:n.sizes.full,fontSize:"40vh",color:n.colors.redTextColor,fontWeight:n.fontWeights.bold,opacity:"0.8",textShadow:`1px 1px 10px ${n.colors.grayTextColor}`,transition:"opacity 0.3s ease-in-out",animation:`${screencastCounterAnimation} 1s`})),Countdown=({countdown:n,endCallback:i})=>{const[e,t]=reactExports.useState(n);return jsx$1(StyledCountdown,{"data-testid":"stCountdown",onAnimationEnd:()=>{const d=e-1;d>=0&&t(d),d===0&&i()},children:jsx$1("span",{children:e})},`frame${e}`)},StyledRecordAudioLabel=styled("label",{target:"ej964cx0"})({margin:0}),StyledInstruction=styled("p",{target:"ej964cx1"})({margin:0}),ScreencastDialog=({onClose:n,toggleRecordAudio:i,recordAudio:e,startRecording:t})=>{const[o,d]=reactExports.useState(e),p=reactExports.useCallback(y=>{const{checked:$}=y.target;$!==o&&(d($),i())},[o,i]),h=reactExports.useCallback(()=>{t(),n()},[t,n]);return jsxs(Modal,{isOpen:!0,onClose:n,children:[jsx$1(ModalHeader,{children:"Record a screencast"}),jsxs(ModalBody$1,{children:[jsx$1("p",{children:"This will record a video with the contents of your screen, so you can easily share what you're seeing with others."}),jsx$1("p",{children:jsxs(StyledRecordAudioLabel,{"data-testid":"stScreencastAudioCheckbox",children:[jsx$1("input",{type:"checkbox",name:"recordAudio","aria-label":"Also record audio",checked:o,onChange:p})," ","Also record audio"]})}),jsx$1(StyledInstruction,{"data-testid":"stScreencastInstruction",children:jsx$1(StreamlitMarkdown$1,{source:"Press `Esc` any time to stop recording.",allowHTML:!1})})]}),jsx$1(ModalFooter,{children:jsx$1(ModalButton,{kind:BaseButtonKind.SECONDARY,onClick:h,children:"Start recording!"})})]})},StyledVideo=styled("video",{target:"e1hp04x70"})(({theme:n})=>({width:n.sizes.full,borderRadius:n.radii.md})),StyledDialogContainer=styled("div",{target:"e1hp04x71"})(({theme:n})=>({display:"flex",flexDirection:"column",width:n.sizes.full})),StyledRow=styled("div",{target:"e1hp04x72"})(({theme:n})=>({display:"flex",flexDirection:"row",paddingTop:n.spacing.md,paddingBottom:n.spacing.md})),StyledFirstColumn=styled("div",{target:"e1hp04x73"})(({theme:n})=>({paddingRight:n.spacing.lg,textAlign:"right",color:n.colors.grayTextColor,fontWeight:n.fontWeights.bold,width:"6em"})),StyledSecondColumn=styled("div",{target:"e1hp04x74"})(({theme:n})=>({flex:1,paddingRight:n.spacing.lg,marginRight:"6em",[`@media (max-width: ${n.breakpoints.sm})`]:{marginRight:n.spacing.none}})),StyledVideoFormatInstructions=styled("p",{target:"e1hp04x75"})(({theme:n})=>({marginTop:n.spacing.sm,marginBottom:n.spacing.none,fontSize:n.fontSizes.sm})),StyledDownloadButtonContainer=styled("div",{target:"e1hp04x76"})(({theme:n})=>({marginTop:n.spacing.twoXS})),VideoRecordedDialog=({onClose:n,videoBlob:i,fileName:e})=>{const t=URL.createObjectURL(i),o=()=>{const d=document.createElement("a");d.setAttribute("href",t),d.setAttribute("download",`${e}.webm`),d.click(),n()};return jsxs(Modal,{isOpen:!0,onClose:n,overrides:{Dialog:{style:{width:"80vw"}}},children:[jsx$1(ModalHeader,{children:"Next steps"}),jsx$1(ModalBody$1,{children:jsxs(StyledDialogContainer,{"data-testid":"stVideoRecordedDialog",children:[jsxs(StyledRow,{children:[jsx$1(StyledFirstColumn,{children:"Step 1"}),jsxs(StyledSecondColumn,{children:[jsx$1("p",{children:"Preview your video below:"}),jsx$1(StyledVideo,{src:t,controls:!0})]})]}),jsxs(StyledRow,{children:[jsx$1(StyledFirstColumn,{children:"Step 2"}),jsxs(StyledSecondColumn,{children:[jsx$1(StyledDownloadButtonContainer,{children:jsx$1(BaseButton,{kind:BaseButtonKind.SECONDARY,onClick:o,children:"Save video to disk"})}),jsxs(StyledVideoFormatInstructions,{children:["This video is encoded in the"," ",jsx$1("a",{href:"https://www.webmproject.org/",children:"WebM format"}),", which is only supported by newer video players. You can also play it by dragging the file directly into your browser."]})]})]}),jsxs(StyledRow,{children:[jsx$1(StyledFirstColumn,{children:"Step 3"}),jsxs(StyledSecondColumn,{children:["Share your video with the world on Twitter, LinkedIn, YouTube, or just plain email!"," ",jsx$1("span",{role:"img","aria-label":"Happy",children:"😀"})]})]})]})})]})},StyledScreenCastWarningDialog=styled("div",{target:"e1o5y2010"})({display:"flex"}),StyledUnsupportedScreenCastIcon=styled("div",{target:"e1o5y2011"})(({theme:n})=>({display:"flex",alignItems:"center",justifyItems:"center",marginRight:n.spacing.twoXL,marginLeft:n.spacing.sm,fontSize:n.fontSizes.fourXL})),StyledUnsupportedScreenCastExplanation=styled("p",{target:"e1o5y2012"})(({theme:n})=>({margin:n.spacing.none})),UnsupportedBrowserDialog=({onClose:n})=>jsxs(Modal,{isOpen:!0,onClose:n,children:[jsx$1(ModalHeader,{children:"Record a screencast"}),jsx$1(ModalBody$1,{children:jsxs(StyledScreenCastWarningDialog,{"data-testid":"stUnsupportedBrowserDialog",children:[jsx$1(StyledUnsupportedScreenCastIcon,{children:jsx$1("span",{role:"img","aria-label":"Alien Monster",children:"👾"})}),jsx$1(StyledUnsupportedScreenCastExplanation,{children:"Due to limitations with some browsers, this feature is only supported on recent desktop versions of Chrome, Firefox, and Edge."})]})})]}),UnsupportedBrowserDialog$1=reactExports.memo(UnsupportedBrowserDialog),LOG$2=loglevelExports.getLogger("withScreencast");function withScreencast(n){const i=e=>{const{testOverride:t}=e,o=reactExports.useRef(null),[d,p]=reactExports.useState("streamlit-screencast"),[h,y]=reactExports.useState(!1),[$,E]=reactExports.useState(void 0),[M,H]=reactExports.useState(t||"OFF"),Z=reactExports.useCallback(()=>{y(Fe=>!Fe)},[]),be=reactExports.useCallback(async()=>{if(!(M==="OFF"||isNullOrUndefined(o.current))){if(M==="COUNTDOWN"){H("OFF");return}if(M==="RECORDING"){const Fe=o.current;if(!Fe||Fe.getState()==="inactive")H("OFF");else{const Me=await Fe.stop();E(Me),H("PREVIEW_FILE")}}}},[M]),ye=reactExports.useCallback(async()=>{if(!ScreenCastRecorder.isSupportedBrowser()){H("UNSUPPORTED");return}o.current=new ScreenCastRecorder({recordAudio:h,onErrorOrStop:()=>{be().catch(Fe=>LOG$2.warn(`withScreencast.stopRecording threw an error: ${Fe}`))}});try{await o.current.initialize()}catch(Fe){LOG$2.warn(`ScreenCastRecorder.initialize error: ${Fe}`),H("UNSUPPORTED");return}H("COUNTDOWN")},[h,be]),we=reactExports.useCallback(Fe=>{if(!ScreenCastRecorder.isSupportedBrowser()){H("UNSUPPORTED");return}if(M==="OFF"){p(Fe),H("SETUP");return}be().catch(Me=>LOG$2.warn(`withScreencast.stopRecording threw an error: ${Me}`))},[M,be]),xe=reactExports.useCallback(()=>{if(isNullOrUndefined(o.current))throw new Error("Countdown finished but recorder is null");o.current.start()?H("RECORDING"):be().catch(Me=>LOG$2.warn(`withScreencast.stopRecording threw an error: ${Me}`))},[be]),Ce=reactExports.useCallback(()=>{H("OFF")},[]);return jsxs("div",{className:"withScreencast","data-testid":"stScreencast",children:[jsx$1(n,{...e,screenCast:{currentState:M,toggleRecordAudio:Z,startRecording:we,stopRecording:be}}),M==="UNSUPPORTED"&&jsx$1(UnsupportedBrowserDialog$1,{onClose:Ce}),M==="SETUP"&&jsx$1(ScreencastDialog,{recordAudio:h,onClose:Ce,startRecording:ye,toggleRecordAudio:Z}),M==="COUNTDOWN"&&jsx$1(Countdown,{countdown:3,endCallback:xe}),M==="PREVIEW_FILE"&&$&&jsx$1(VideoRecordedDialog,{onClose:Ce,videoBlob:$,fileName:d})]})};return i.displayName=`withScreencast(${n.displayName||n.name||"Component"})`,hoistNonReactStatics(i,n)}const useViewportSize=()=>{const{activeTheme:n}=reactExports.useContext(ThemeContext),{innerWidth:i}=useWindowDimensionsContext(),e=parseInt(n.emotion.breakpoints.md,10);return{isMobile:i<e}},DEFAULT_METRICS_CONFIG="https://data.streamlit.io/metrics.json",LOG$1=loglevelExports.getLogger("MetricsManager");class MetricsManager{constructor(i){this.initialized=!1,this.actuallySendMetrics=!1,this.metricsUrl=void 0,this.sendMessageToHost=()=>{},this.anonymousId="",this.pendingEvents=[],this.appHash="Not initialized",this.metadata={},this.setAppHash=e=>{this.appHash=e},this.setMetricsConfig=(e="")=>{this.metricsUrl=e},this.sessionInfo=i}async initialize({gatherUsageStats:i,sendMessageToHost:e}){this.sendMessageToHost=e,this.actuallySendMetrics=i&&this.metricsUrl!=="off",this.getAnonymousId(),this.actuallySendMetrics&&!this.metricsUrl&&(await this.requestDefaultMetricsConfig(),this.metricsUrl||(LOG$1.error("Undefined metrics config - deactivating metrics tracking."),this.actuallySendMetrics=!1)),this.actuallySendMetrics&&this.sendPendingEvents(),LOG$1.info("Gather usage stats: ",this.actuallySendMetrics),this.initialized=!0}enqueue(i,e={}){if(!this.initialized||!this.sessionInfo.isSet){this.pendingEvents.push([i,e]);return}this.actuallySendMetrics&&(this.pendingEvents.length&&this.sendPendingEvents(),this.send(i,e))}setMetadata(i){this.metadata=i}async requestDefaultMetricsConfig(){const i=localStorageAvailable();if(i){const e=window.localStorage.getItem("stMetricsConfig");if(e){this.metricsUrl=e;return}}try{const e=await fetch(DEFAULT_METRICS_CONFIG,{signal:AbortSignal.timeout(5e3)});if(!e.ok)this.metricsUrl=void 0,LOG$1.error("Failed to fetch metrics config: ",e.status);else{const t=await e.json();this.metricsUrl=t.url??void 0,i&&this.metricsUrl&&window.localStorage.setItem("stMetricsConfig",this.metricsUrl)}}catch(e){LOG$1.error("Failed to fetch metrics config:",e)}}send(i,e={}){const t=this.buildEventProto(i,e);this.metricsUrl==="postMessage"?this.postMessageEvent(i,t):this.track(t)}sendPendingEvents(){this.pendingEvents.forEach(([i,e])=>{this.send(i,e)}),this.pendingEvents=[]}async track(i){const e=new Request(this.metricsUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i.toJSON())});await fetch(e)}postMessageEvent(i,e){this.sendMessageToHost({type:"METRICS_EVENT",eventName:i,data:e})}buildEventProto(i,e){const t=new MetricsEvent({event:i,anonymousId:this.anonymousId,...this.getHostTrackingData(),...this.getInstallationData(),reportHash:this.appHash,dev:IS_DEV_ENV,source:"browser",streamlitVersion:this.sessionInfo.current.streamlitVersion,isHello:this.sessionInfo.isHello,appId:this.sessionInfo.current.appId,sessionId:this.sessionInfo.current.sessionId,pythonVersion:this.sessionInfo.current.pythonVersion,serverOs:this.sessionInfo.current.serverOS,hasDisplay:this.sessionInfo.current.hasDisplay,isWebdriver:isWebdriver(),...this.getContextData()});if(i==="menuClick")t.label=e.label;else if(i==="pageProfile")return new MetricsEvent({...t,...e});return t}getInstallationData(){return{machineIdV3:this.sessionInfo.current.installationIdV3,machineIdV4:this.sessionInfo.current.installationIdV4}}getHostTrackingData(){return this.metadata?pick$1(this.metadata,["hostedAt","owner","repo","branch","mainModule","creatorId"]):{}}getContextData(){return{contextPageUrl:window.location.href,contextPageTitle:document.title,contextPagePath:window.location.pathname,contextPageReferrer:document.referrer,contextPageSearch:window.location.search,contextLocale:window.navigator.language,contextUserAgent:window.navigator.userAgent}}getAnonymousId(){if(!this.actuallySendMetrics)return;const i="ajs_anonymous_id",e=localStorageAvailable(),t=getCookie(i),o=e?window.localStorage.getItem(i):null,d=new Date;if(d.setFullYear(new Date().getFullYear()+1),t)this.anonymousId=t,e&&window.localStorage.setItem(i,t);else if(o){try{this.anonymousId=JSON.parse(o)}catch{this.anonymousId=o}setCookie(i,this.anonymousId,d)}else this.anonymousId=v4(),setCookie(i,this.anonymousId,d),e&&window.localStorage.setItem(i,this.anonymousId)}}function isWebdriver(){return window.navigator?.webdriver??!1}class SessionEventDispatcher{constructor(){this.onSessionEvent=new distExports.Signal}handleSessionEventMsg(i){this.onSessionEvent.emit(i)}}const StyledApp=styled("div",{target:"ee4bbma0"})(({theme:n})=>{const i=hasLightBackgroundColor(n);return{position:"absolute",background:n.colors.bgColor,color:n.colors.bodyText,top:n.spacing.none,left:n.spacing.none,right:n.spacing.none,bottom:n.spacing.none,colorScheme:i?"light":"dark",overflow:"hidden","@media print":{float:"none",height:n.sizes.full,position:"static",overflow:"visible"}}});function getBrowserInfo(){const i=new UAParser().getResult();return{browserName:i.browser.name||"Unknown",browserVersion:i.browser.version||"Unknown",deviceType:i.device.type||"desktop",os:i.os.name||"Unknown"}}const showDevelopmentOptions=(n,i)=>i==Config.ToolbarMode.DEVELOPER?!0:Config.ToolbarMode.VIEWER==i||Config.ToolbarMode.MINIMAL==i?!1:n||isLocalhost();function getTitle(n){return n||"Streamlit"}class AppNavigation{constructor(i,e,t,o){this.hostCommunicationMgr=i,this.onUpdatePageUrl=e,this.onPageNotFound=t,this.onPageIconChange=o,this.isPageIconSet=!1,this.isPageTitleSet=!1,this.hasSetDefaultFavicon=!1,this.mainScriptHash=null,this.appPages=[],this.mainPage=null,this.hideSidebarNav=null}handleNewSession(i){return this.mainScriptHash!==i.mainScriptHash&&(this.isPageTitleSet=!1,this.isPageIconSet=!1,this.hasSetDefaultFavicon=!1),this.mainScriptHash=i.mainScriptHash,this.hideSidebarNav===null&&(this.hideSidebarNav=i.config?.hideSidebarNav??null),document.title=getTitle(""),[{currentPageScriptHash:i.pageScriptHash,hideSidebarNav:this.hideSidebarNav??!1},()=>{}]}handleNavigation(i){const{sections:e,position:t,appPages:o}=i;this.appPages=o,this.hideSidebarNav=t===Navigation.Position.HIDDEN;const d=i.pageScriptHash,p=o.find($=>$.pageScriptHash===d),h=o.find($=>$.isDefault);this.mainPage=h;const y=p.urlPathname;if(!this.isPageTitleSet){const $=getTitle(p.pageName);document.title=$,this.hostCommunicationMgr.sendMessageToHost({type:"SET_PAGE_TITLE",title:p.pageName??""})}return!this.isPageIconSet&&p.icon&&this.onPageIconChange(p.icon),this.onUpdatePageUrl(h.urlPathname??"",y,p.isDefault??!1),[{appPages:o,navSections:e,hideSidebarNav:this.hideSidebarNav,expandSidebarNav:i.expanded,currentPageScriptHash:d},()=>{this.hostCommunicationMgr.sendMessageToHost({type:"SET_APP_PAGES",appPages:o}),this.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:p.isDefault?"":y,currentPageScriptHash:d})}]}handlePageNotFound(i){return this.onPageNotFound(i),[{currentPageScriptHash:this.mainScriptHash??""},()=>{this.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:"",currentPageScriptHash:this.mainScriptHash??""})}]}findPageByUrlPath(i){return this.appPages.find(e=>i.endsWith("/"+e.urlPathname))??this.mainPage}handlePageConfigChanged(i){i.favicon&&(this.isPageIconSet=!0),i.title&&(this.isPageTitleSet=!0)}clearPageElements(i,e){return i.filterMainScriptElements(e)}}function includeIfDefined(n){return Object.entries(n).reduce((i,[e,t])=>(t!==void 0&&(i[e]=t),i),{})}function preferWindowValue(n,i){return n??i}function reconcileHostConfigValues(n,i){if(!n)return i;const e=isValidAllowedOrigins(n.allowedOrigins)?n.allowedOrigins:void 0;return{...i,allowedOrigins:preferWindowValue(e,i.allowedOrigins),useExternalAuthToken:preferWindowValue(n.useExternalAuthToken,i.useExternalAuthToken),enableCustomParentMessages:preferWindowValue(n.enableCustomParentMessages,i.enableCustomParentMessages),blockErrorDialogs:preferWindowValue(n.blockErrorDialogs,i.blockErrorDialogs),mapboxToken:preferWindowValue(n.mapboxToken,i.mapboxToken),disableFullscreenMode:preferWindowValue(n.disableFullscreenMode,i.disableFullscreenMode),enforceDownloadInNewTab:preferWindowValue(n.enforceDownloadInNewTab,i.enforceDownloadInNewTab),resourceCrossOriginMode:preferWindowValue(n.resourceCrossOriginMode,i.resourceCrossOriginMode),setAnonymousCrossOriginPropertyOnMediaElements:i.setAnonymousCrossOriginPropertyOnMediaElements,metricsUrl:preferWindowValue(n.metricsUrl,i.metricsUrl)}}var define_PACKAGE_METADATA_default={version:"1.52.2"};const INITIAL_SCRIPT_RUN_ID="<null>",LOG=loglevelExports.getLogger("App");class App extends reactExports.PureComponent{constructor(i){super(i),this.sessionInfo=new SessionInfo,this.metricsMgr=new MetricsManager(this.sessionInfo),this.sessionEventDispatcher=new SessionEventDispatcher,this.embeddingId=generateUID$2(),this.deferredFileListeners=new Map,this.isInitializingConnectionManager=!0,this.hasReceivedNewSession=!1,this.showDeployError=(e,t,o)=>{const d={type:DialogType.DEPLOY_ERROR,title:e,msg:t,onContinue:o,onClose:()=>{},onTryAgain:this.sendLoadGitInfoBackMsg};this.openDialog(d)},this.handleThemeMessage=(e,t)=>{const[,o,d]=createPresetThemes(),p=isPresetTheme(this.props.theme.activeTheme);e===o.name&&p?this.props.theme.setTheme(o):e===d.name&&p?this.props.theme.setTheme(d):t&&this.props.theme.setImportedTheme(t)},this.handleConnectionStateChanged=e=>{if(LOG.info(`Connection state changed from ${this.state.connectionState} to ${e}`),e===ConnectionState.CONNECTED){LOG.info("Reconnected to server."),this.state.connectionErrorDismissed&&this.setState({connectionErrorDismissed:!1});const t=this.state.scriptRunState===ScriptRunState.RUNNING,o=this.state.scriptRunState===ScriptRunState.RERUN_REQUESTED;!this.sessionInfo.last||t||o||this.state.fragmentIdsThisRun.length>0||this.state.autoReruns.length>0?(LOG.info("Requesting a script run."),this.widgetMgr.sendUpdateWidgetsMessage(void 0),this.setState({dialog:null})):this.state.dialog?.type===DialogType.CONNECTION_ERROR&&this.setState({dialog:null}),this.hostCommunicationMgr.sendMessageToHost({type:"WEBSOCKET_CONNECTED"})}else this.state.connectionState===ConnectionState.CONNECTED&&this.hostCommunicationMgr.sendMessageToHost({type:"WEBSOCKET_DISCONNECTED",attemptingToReconnect:e!==ConnectionState.DISCONNECTED_FOREVER}),this.sessionInfo.isSet&&this.sessionInfo.disconnect();this.isInitializingConnectionManager?this.setState({connectionState:e}):reactDomExports.flushSync(()=>{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}):LOG.error("Sending messages to the host is disabled in line with the platform policy.")},this.handleMessage=e=>{const t=(o,d,p)=>{const h=o[d];if(h in p)return p[h](o[h]);throw new Error(`Cannot handle ${d} "${h}".`)};try{t(e,"type",{newSession:o=>this.handleNewSession(o),sessionStatusChanged:o=>this.handleSessionStatusChanged(o),sessionEvent:o=>this.handleSessionEvent(o),delta:o=>this.handleDeltaMsg(o,e.metadata),pageConfigChanged:o=>this.handlePageConfigChanged(o),pageInfoChanged:o=>this.handlePageInfoChanged(o),pagesChanged:o=>{},pageNotFound:o=>this.handlePageNotFound(o),gitInfoChanged:o=>this.handleGitInfoChanged(o),scriptFinished:o=>this.handleScriptFinished(o),pageProfile:o=>this.handlePageProfileMsg(o),autoRerun:o=>this.handleAutoRerun(o),fileUrlsResponse:o=>this.uploadClient.onFileURLsResponse(o),deferredFileResponse:o=>this.handleDeferredFileResponse(o),parentMessage:o=>this.handleCustomParentMessage(o),logo:o=>this.handleLogo(o,e.metadata),navigation:o=>this.handleNavigation(o),authRedirect:o=>{isInChildFrame()?this.hostCommunicationMgr.sendMessageToSameOriginHost({type:"REDIRECT_TO_URL",url:o.url}):window.location.href=o.url}})}catch(o){const d=ensureError(o);LOG.error(d),this.showError("Bad message format",{message:d.message})}},this.handleLogo=(e,t)=>{this.setState(o=>({elements:o.elements.appRootWithLogo(e,{activeScriptHash:t.activeScriptHash,scriptRunId:o.scriptRunId})}))},this.handlePageConfigChanged=e=>{const{title:t,favicon:o,layout:d,initialSidebarState:p,initialSidebarWidth:h,menuItems:y}=e;this.appNavigation.handlePageConfigChanged(e),t&&(this.hostCommunicationMgr.sendMessageToHost({type:"SET_PAGE_TITLE",title:t}),document.title=t),o&&this.onPageIconChanged(o),d!==this.state.layout&&d!==PageConfig.Layout.LAYOUT_UNSET&&this.setState(E=>({layout:d,userSettings:{...E.userSettings,wideMode:d===PageConfig.Layout.WIDE}})),p!==this.state.initialSidebarState&&p!==PageConfig.SidebarState.SIDEBAR_UNSET&&this.setState(()=>({initialSidebarState:p}));const $=h?.pixelWidth!==void 0?h.pixelWidth:void 0;notNullOrUndefined($)&&$!==this.state.initialSidebarWidth&&this.setState(()=>({initialSidebarWidth:$})),y&&this.setState(E=>(y.clearAboutMd&&(y.aboutSectionMd=""),{menuItems:{...E.menuItems,...y}}))},this.handlePageInfoChanged=e=>{const{queryString:t}=e,o=document.location.pathname+(t?`?${t}`:"");window.history.pushState({},"",o),this.setState({queryParams:t}),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",{message:`${t}. Running the app's main page.`})},this.handlePageNotFound=e=>{const{pageName:t}=e;this.maybeSetState(this.appNavigation.handlePageNotFound(t))},this.onPageIconChanged=e=>{handleFavicon(e,this.hostCommunicationMgr.sendMessageToHost,this.endpoints)},this.handleNavigation=e=>{this.setState({navigationPosition:e.position}),this.maybeSetState(this.appNavigation.handleNavigation(e))},this.handlePageProfileMsg=e=>{const t=PageProfile.toObject(e),o=getBrowserInfo();this.metricsMgr.enqueue("pageProfile",{...t,isFragmentRun:!!t.isFragmentRun,numPages:this.state.appPages?.length,pageScriptHash:this.state.currentPageScriptHash,activeTheme:this.props.theme?.activeTheme?.name,totalLoadTime:Math.round((performance.now()-this.state.latestRunTime)*1e3),browserInfo:o})},this.handleAutoRerun=e=>{const t=setInterval(()=>{this.widgetMgr.sendUpdateWidgetsMessage(e.fragmentId,!0)},e.interval*1e3);this.setState(o=>({autoReruns:[...o.autoReruns,t]}))},this.handleSessionStatusChanged=e=>{this.setState(t=>{let{scriptRunState:o}=t,{dialog:d}=t;return e.scriptIsRunning&&t.scriptRunState!==ScriptRunState.STOP_REQUESTED?(o=ScriptRunState.RUNNING,notNullOrUndefined(d)&&d.type===DialogType.SCRIPT_COMPILE_ERROR&&(d=void 0)):!e.scriptIsRunning&&t.scriptRunState!==ScriptRunState.RERUN_REQUESTED&&t.scriptRunState!==ScriptRunState.COMPILATION_ERROR&&(o=ScriptRunState.NOT_RUNNING),{userSettings:{...t.userSettings,runOnSave:!!e.runOnSave},dialog:d,scriptRunState:o,scriptChangedOnDisk:e.scriptIsRunning?!1:t.scriptChangedOnDisk}})},this.handleSessionEvent=e=>{if(this.sessionEventDispatcher.handleSessionEventMsg(e),e.type==="scriptCompilationException"){this.setState({scriptRunState:ScriptRunState.COMPILATION_ERROR});const t={type:DialogType.SCRIPT_COMPILE_ERROR,exception:e.scriptCompilationException,onClose:()=>{}};this.maybeShowErrorDialog(t,e.scriptCompilationException?.message??"No message")}else e.type==="scriptChangedOnDisk"&&this.setState({scriptChangedOnDisk:!0})},this.maybeUpdatePageUrl=(e,t,o)=>{const d=this.getBaseUriParts();if(d){let p;StreamlitConfig.MAIN_PAGE_BASE_URL?p=parseUriIntoBaseParts(StreamlitConfig.MAIN_PAGE_BASE_URL).pathname:p=d.pathname;const h=extractPageNameFromPathName(document.location.pathname,p);if((h===""?e:h)!==t){const $=o?"":t,E=this.state.queryParams||preserveEmbedQueryParams(),M=E?`?${E}`:"",Z=`${p==="/"?"":p}/${$}${M}`;window.history.pushState({},"",Z)}}},this.handleNewSession=e=>{const t=e.initialize;if(this.hasStreamlitVersionChanged(t)){window.location.reload();return}this.hasReceivedNewSession=!0,(!this.sessionInfo.isSet||!this.sessionInfo.current.isConnected)&&this.handleInitialization(e);const{appHash:o,currentPageScriptHash:d}=this.state,{scriptRunId:p,name:h,mainScriptPath:y,fragmentIdsThisRun:$,pageScriptHash:E,mainScriptHash:M}=e;if($.length)this.setState({fragmentIdsThisRun:$,latestRunTime:performance.now()});else{this.cleanupAutoReruns();const Z=e.config,be=e.customTheme;this.processThemeInput(be),this.setState({allowRunOnSave:Z.allowRunOnSave,hideTopBar:Z.hideTopBar,toolbarMode:Z.toolbarMode,latestRunTime:performance.now(),mainScriptHash:M,fragmentIdsThisRun:$}),this.maybeSetState(this.appNavigation.handleNewSession(e)),!this.appNavigation.hasSetDefaultFavicon&&!this.appNavigation.isPageIconSet&&(this.appNavigation.hasSetDefaultFavicon=!0,this.onPageIconChanged("./favicon.png"))}const H=hashString(this.sessionInfo.current.installationId+y);this.metricsMgr.setMetadata(this.state.deployedAppMetadata),this.metricsMgr.setAppHash(H),this.metricsMgr.enqueue("updateReport"),o===H&&d===E?this.setState({scriptRunId:p}):this.clearAppState(H,p,h,M)},this.handleInitialization=e=>{const t=e.initialize,o=e.config;this.sessionInfo.setCurrent(SessionInfo.propsFromNewSessionMessage(e)),this.metricsMgr.initialize({gatherUsageStats:o.gatherUsageStats,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost}),this.handleSessionStatusChanged(t.sessionStatus)},this.onHistoryChange=()=>{const{currentPageScriptHash:e}=this.state,t=this.appNavigation.findPageByUrlPath(document.location.pathname),o=document.location.toString().includes("#"),d=t?.pageScriptHash===e;isNullOrUndefined(t)||o&&d||this.onPageChange(t.pageScriptHash,void 0,!0)},this.setAndSendTheme=e=>{this.props.theme.setTheme(e),this.hostCommunicationMgr.sendMessageToHost({type:"SET_THEME_CONFIG",themeInfo:toExportedTheme(e.emotion)})},this.createThemeHash=e=>{if(!e)return"hash_for_undefined_custom_theme";const t=JSON.parse(JSON.stringify(e)),o=sortThemeInputKeys(t);return hashString(JSON.stringify(o))},this.closeDialog=()=>{this.state.dialog?.type===DialogType.CONNECTION_ERROR?this.setState({dialog:void 0,connectionErrorDismissed:!0}):this.setState({dialog:void 0})},this.saveSettings=e=>{const{runOnSave:t}=this.state.userSettings,{runOnSave:o}=e;if(this.setState({userSettings:e}),t!==o&&this.isServerConnected()){const d=new BackMsg({setRunOnSave:o});d.type="setRunOnSave",this.sendBackMsg(d)}},this.handleDeltaMsg=(e,t)=>{this.setState(o=>({elements:o.elements.applyDelta(o.scriptRunId,e,t)}))},this.debugShutdownRuntime=()=>{if(this.isServerConnected()){const e=new BackMsg({debugShutdownRuntime:!0});e.type="debugShutdownRuntime",this.sendBackMsg(e)}},this.debugDisconnectWebsocket=()=>{if(this.isServerConnected()){const e=new BackMsg({debugDisconnectWebsocket:!0});e.type="debugDisconnectWebsocket",this.sendBackMsg(e)}},this.debugClearForwardMsgCache=()=>{isLocalhost()&&this.connectionManager?.websocketConnection?.cache.messages.clear()},this.cleanupAutoReruns=()=>{this.state.autoReruns.forEach(e=>{clearInterval(e)}),this.setState({autoReruns:[]})},this.rerunScript=(e=!1)=>{if(this.closeDialog(),!this.isServerConnected()){LOG.error("Cannot rerun script when disconnected from server.");return}this.state.scriptRunState===ScriptRunState.RUNNING||this.state.scriptRunState===ScriptRunState.RERUN_REQUESTED||(this.setState({scriptRunState:ScriptRunState.RERUN_REQUESTED}),e===!0&&this.saveSettings({...this.state.userSettings,runOnSave:!0}),this.widgetMgr.sendUpdateWidgetsMessage(void 0))},this.sendLoadGitInfoBackMsg=()=>{if(!this.isServerConnected()){LOG.error("Cannot load git information when disconnected from server.");return}this.sendBackMsg(new BackMsg({loadGitInfo:!0}))},this.onPageChange=(e,t,o)=>{const{elements:d,mainScriptHash:p}=this.state;this.cleanupAutoReruns();const h=this.appNavigation.clearPageElements(d,p),y=new Set(Array.from(h.getElements()).map($=>getElementId($)).filter(notUndefined));this.sendRerunBackMsg(this.widgetMgr.getActiveWidgetStates(y),void 0,e,void 0,t,o)},this.isAppInReadyState=e=>this.state.connectionState===ConnectionState.CONNECTED&&this.state.scriptRunState===ScriptRunState.NOT_RUNNING&&e.scriptRunState===ScriptRunState.RUNNING&&e.connectionState===ConnectionState.CONNECTED,this.sendRerunBackMsg=(e,t,o,d,p,h)=>{const y=this.getBaseUriParts();if(!y){LOG.error("Cannot send rerun backMessage when disconnected from server.");return}const{currentPageScriptHash:$}=this.state;let E=p??this.getQueryString(),M="";const H={timezone:getTimezone$1(),timezoneOffset:getTimezoneOffset(),locale:getLocaleLanguage(),url:getUrl(),isEmbedded:isEmbed(),colorScheme:this.getThemeColorScheme()};if(o){if(o!==$&&!h){const be=preserveEmbedQueryParams();E=getQueryString(p,be),this.setState({queryParams:E}),this.hostCommunicationMgr.sendMessageToHost({type:"SET_QUERY_PARAM",queryParams:E})}}else if($)o=$;else{let be;StreamlitConfig.MAIN_PAGE_BASE_URL?be=parseUriIntoBaseParts(StreamlitConfig.MAIN_PAGE_BASE_URL).pathname:be=y.pathname,M=extractPageNameFromPathName(document.location.pathname,be),o=""}const Z=this.connectionManager?.getCachedMessageHashes()??[];this.sendBackMsg(new BackMsg({rerunScript:{queryString:E,widgetStates:e,pageScriptHash:o,pageName:M,fragmentId:t,isAutoRerun:d,cachedMessageHashes:Z,contextInfo:H}})),this.hasReceivedNewSession=!1},this.stopScript=()=>{if(!this.isServerConnected()){LOG.error("Cannot stop app when disconnected from server.");return}if(this.state.scriptRunState===ScriptRunState.NOT_RUNNING||this.state.scriptRunState===ScriptRunState.STOP_REQUESTED)return;const e=new BackMsg({stopScript:!0});e.type="stopScript",this.sendBackMsg(e),this.setState({scriptRunState:ScriptRunState.STOP_REQUESTED})},this.openClearCacheDialog=()=>{if(this.isServerConnected()){const e={type:DialogType.CLEAR_CACHE,confirmCallback:this.clearCache,defaultAction:this.clearCache,onClose:()=>{}};this.openDialog(e)}else LOG.error("Cannot clear cache: disconnected from server")},this.openDeployDialog=()=>{const e={type:DialogType.DEPLOY_DIALOG,onClose:this.closeDialog,showDeployError:this.showDeployError,isDeployErrorModalOpen:this.state.dialog?.type===DialogType.DEPLOY_ERROR,metricsMgr:this.metricsMgr,gitInfo:this.state.gitInfo};this.openDialog(e)},this.clearCache=()=>{if(this.closeDialog(),this.isServerConnected()){const e=new BackMsg({clearCache:!0});e.type="clearCache",this.sendBackMsg(e)}else LOG.error("Cannot clear cache: disconnected from server")},this.sendAppHeartbeat=()=>{if(this.isServerConnected()){const e=new BackMsg({appHeartbeat:!0});e.type="appHeartbeat",this.sendBackMsg(e)}else LOG.error("Cannot send app heartbeat: disconnected from server")},this.sendBackMsg=e=>{this.connectionManager?(LOG.info(e),this.connectionManager.sendMessage(e)):LOG.error(`Not connected. Cannot send back message: ${e}`)},this.handleConnectionError=e=>{this.state.connectionErrorDismissed||this.showError("Connection error",e,DialogType.CONNECTION_ERROR)},this.isServerConnected=()=>this.connectionManager?this.connectionManager.isConnected():!1,this.settingsCallback=(e=!0)=>{const t={type:DialogType.SETTINGS,sessionInfo:this.sessionInfo,isServerConnected:this.isServerConnected(),settings:this.state.userSettings,allowRunOnSave:this.state.allowRunOnSave,onSave:this.saveSettings,onClose:()=>{},animateModal:e,metricsMgr:this.metricsMgr};this.openDialog(t)},this.aboutCallback=()=>{const{menuItems:e}=this.state,t={type:DialogType.ABOUT,onClose:this.closeDialog,aboutSectionMd:e?.aboutSectionMd};this.openDialog(t)},this.printCallback=()=>{const{scriptRunState:e}=this.state;if(e!==ScriptRunState.NOT_RUNNING){setTimeout(this.printCallback,500);return}let t;try{const o=getIFrameEnclosingApp(this.embeddingId);o?.contentWindow?t=o.contentWindow.window:t=window}catch{t=window}finally{t||(t=window),t.print()}},this.screencastCallback=()=>{const{scriptName:e}=this.state,{startRecording:t}=this.props.screenCast,o=getScreencastTimestamp();t(`streamlit-${e}-${o}`)},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,o)=>({scriptFinishedHandlers:t.scriptFinishedHandlers.concat(e)}))},this.removeScriptFinishedHandler=e=>{this.setState((t,o)=>({scriptFinishedHandlers:t.scriptFinishedHandlers.filter(d=>d!==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.getThemeColorScheme=()=>{const{activeTheme:e}=this.props.theme;return hasLightBackgroundColor(e.emotion)?"light":"dark"},this.isInCloudEnvironment=()=>{const{hostMenuItems:e}=this.state;return e&&e?.length>0},this.showDeployButton=()=>showDevelopmentOptions(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)=>{const o=this.isServerConnected(),d=this.sessionInfo.isSet;if(o&&d){const p=new BackMsg({fileUrlsRequest:{requestId:e,fileNames:t.map(h=>h.name),sessionId:this.sessionInfo.current.sessionId}});p.type="fileUrlsRequest",this.sendBackMsg(p)}else LOG.warn(`Cannot request file URLs (isServerConnected: ${o}, isSessionInfoSet: ${d})`),this.uploadClient.onFileURLsResponse({responseId:e,errorMsg:"Connection lost. Please wait for the app to reconnect, then try again."})},this.requestDeferredFile=e=>{const t=this.isServerConnected(),o=this.sessionInfo.isSet;if(!t||!o)return Promise.reject(new Error("Not connected to server or session not initialized"));const d=Promise.withResolvers(),p=this.deferredFileListeners.get(e)??new Set,h=$=>{p.delete(h),d.resolve($)};p.add(h),this.deferredFileListeners.set(e,p);const y=new BackMsg({deferredFileRequest:{fileId:e,sessionId:this.sessionInfo.current.sessionId}});return y.type="deferredFileRequest",this.sendBackMsg(y),d.promise},this.handleDeferredFileResponse=e=>{const t=this.deferredFileListeners.get(e.fileId);if(!(!t||t.size===0)){for(const o of Array.from(t))try{o(e)}catch{}this.deferredFileListeners.delete(e.fileId)}},this.handleKeyDown=(e,t)=>{if(!((e==="c"||e==="r")&&isKeyboardEventFromEditableTarget(t)))switch(e){case"c":showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode)&&this.openClearCacheDialog();break;case"r":this.rerunScript();break}},this.handleKeyUp=e=>{e==="esc"&&this.props.screenCast.stopRecording()},this.hasAppDefinedMenuItems=()=>{const{menuItems:e}=this.state;return!!(e?.aboutSectionMd||e?.getHelpUrl&&!e?.hideGetHelp||e?.reportABugUrl&&!e?.hideReportABug)},this.shouldShowToolbar=(e,t)=>{const o=!isEmbed()||isToolbarDisplayed();let d;return this.state.toolbarMode===Config.ToolbarMode.MINIMAL?d=e.length>0||t.length>0||this.hasAppDefinedMenuItems():d=!0,o&&d},ensureHotkeysFilterConfigured(),enablePatches(),enableMapSet(),this.state={connectionState:ConnectionState.INITIAL,elements:AppRoot.empty("",!0),isFullScreen:!1,scriptName:"",scriptRunId:INITIAL_SCRIPT_RUN_ID,appHash:null,scriptRunState:ScriptRunState.NOT_RUNNING,userSettings:{wideMode:!1,runOnSave:!1},connectionErrorDismissed:!1,layout:PageConfig.Layout.CENTERED,initialSidebarState:PageConfig.SidebarState.AUTO,initialSidebarWidth:void 0,menuItems:void 0,allowRunOnSave:!0,scriptFinishedHandlers:[],themeHash:"",gitInfo:null,formsData:createFormsData(),appPages:[],navSections:[],currentPageScriptHash:"",mainScriptHash:"",hideTopBar:!0,hideSidebarNav:!0,expandSidebarNav:!1,toolbarMode:Config.ToolbarMode.MINIMAL,latestRunTime:performance.now(),fragmentIdsThisRun:[],isOwner:!1,hostMenuItems:[],hostToolbarItems:[],hostHideSidebarNav:!1,sidebarChevronDownshift:0,pageLinkBaseUrl:"",queryParams:"",deployedAppMetadata:{},libConfig:{},appConfig:{},autoReruns:[],inputsDisabled:!1,navigationPosition:Navigation.Position.SIDEBAR,scriptChangedOnDisk:!1},this.connectionManager=null,this.widgetMgr=new WidgetStateManager({sendRerunBackMsg:this.sendRerunBackMsg,formsDataChanged:e=>this.setState({formsData:e})}),this.hostCommunicationMgr=new HostCommunicationManager({streamlitExecutionStartedAt:i.streamlitExecutionStartedAt,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:e=>this.onPageChange(e),isOwnerChanged:e=>this.setState({isOwner:e}),fileUploadClientConfigChanged:e=>{this.endpoints.setFileUploadClientConfig!==void 0&&this.endpoints.setFileUploadClientConfig(e)},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.setState({scriptRunState:ScriptRunState.RERUN_REQUESTED}),this.initializeConnectionManager())},terminateWebsocketConnection:()=>{this.connectionManager?.disconnect(),this.connectionManager=null}}),this.endpoints=new DefaultStreamlitEndpoints({getServerUri:this.getBaseUriParts,csrfEnabled:!0,sendClientError:(e,t,o,d,p)=>{this.hostCommunicationMgr.sendMessageToHost({type:"CLIENT_ERROR",component:e,error:t,message:o,source:d,customComponentName:p})}}),this.uploadClient=new FileUploadClient({sessionInfo:this.sessionInfo,endpoints:this.endpoints,formsWithPendingRequestsChanged:e=>this.widgetMgr.setFormsWithUploadsInProgress(e),requestFileURLs:this.requestFileURLs}),this.componentRegistry=new ComponentRegistry(this.endpoints),this.appNavigation=new AppNavigation(this.hostCommunicationMgr,this.maybeUpdatePageUrl,this.onPageNotFound,this.onPageIconChanged),window.streamlitDebug={clearForwardMsgCache:this.debugClearForwardMsgCache,disconnectWebsocket:this.debugDisconnectWebsocket,shutdownRuntime:this.debugShutdownRuntime}}applyInitialHostConfig(){if(!isHostConfigBypassEnabled())return;const i=StreamlitConfig.HOST_CONFIG,e=includeIfDefined({allowedOrigins:i.allowedOrigins,useExternalAuthToken:i.useExternalAuthToken,enableCustomParentMessages:i.enableCustomParentMessages,blockErrorDialogs:i.blockErrorDialogs});this.hostCommunicationMgr.setAllowedOrigins(e),this.setAppConfig(e);const t=includeIfDefined({mapboxToken:i.mapboxToken,disableFullscreenMode:i.disableFullscreenMode,enforceDownloadInNewTab:i.enforceDownloadInNewTab,resourceCrossOriginMode:i.resourceCrossOriginMode});Object.keys(t).length>0&&this.setLibConfig(t),i.metricsUrl!==void 0&&this.metricsMgr.setMetricsConfig(i.metricsUrl)}initializeConnectionManager(){this.isInitializingConnectionManager=!0,this.applyInitialHostConfig(),this.connectionManager=new ConnectionManager({getLastSessionId:()=>this.sessionInfo.last?.sessionId,endpoints:this.endpoints,onMessage:this.handleMessage,onConnectionError:this.handleConnectionError,connectionStateChanged:this.handleConnectionStateChanged,claimHostAuthToken:this.hostCommunicationMgr.claimAuthToken,resetHostAuthToken:this.hostCommunicationMgr.resetAuthToken,sendClientError:(i,e,t)=>{this.hostCommunicationMgr.sendMessageToHost({type:"CLIENT_ERROR",component:"Websocket Connection",error:i,message:e,source:t})},onHostConfigResp:i=>{const e=reconcileHostConfigValues(StreamlitConfig.HOST_CONFIG,i),{allowedOrigins:t,useExternalAuthToken:o,disableFullscreenMode:d,enableCustomParentMessages:p,mapboxToken:h,enforceDownloadInNewTab:y,metricsUrl:$,blockErrorDialogs:E,setAnonymousCrossOriginPropertyOnMediaElements:M,resourceCrossOriginMode:H}=e,Z={allowedOrigins:t,useExternalAuthToken:o,enableCustomParentMessages:p,blockErrorDialogs:E},be={mapboxToken:h,disableFullscreenMode:d,enforceDownloadInNewTab:y,resourceCrossOriginMode:H??(M?"anonymous":void 0)};this.metricsMgr.setMetricsConfig($),this.hostCommunicationMgr.setAllowedOrigins(Z),this.setAppConfig(Z),this.setLibConfig(be)}}),this.isInitializingConnectionManager=!1}componentDidMount(){this.initializeConnectionManager(),mark(this.state.scriptRunState),this.hostCommunicationMgr.sendMessageToHost({type:"SCRIPT_RUN_STATE_CHANGED",scriptRunState:this.state.scriptRunState}),isScrollingHidden()&&document.body.classList.add("embedded"),isInChildFrame()&&(window.iFrameResizer={heightCalculationMethod:()=>{const i=document.querySelectorAll("[data-iframe-height]"),e=Array.from(i).map(t=>Math.ceil(t.getBoundingClientRect().bottom));return Math.max(0,...e)}},__vitePreload(()=>import("./iframeResizer.contentWindow.BU-dAwT1.js").then(i=>i.i),[],import.meta.url)),this.hostCommunicationMgr.sendMessageToHost({type:"SET_THEME_CONFIG",themeInfo:toExportedTheme(this.props.theme.activeTheme.emotion)}),this.metricsMgr.enqueue("viewReport"),window.addEventListener("popstate",this.onHistoryChange,!1)}componentDidUpdate(i,e){if(window.prerenderReady===!1&&this.isAppInReadyState(e)&&(window.prerenderReady=!0),this.state.scriptRunState!==e.scriptRunState){if(mark(this.state.scriptRunState),this.state.scriptRunState===ScriptRunState.NOT_RUNNING)try{measure("script-run-cycle",ScriptRunState.RUNNING,ScriptRunState.NOT_RUNNING)}catch{}this.hostCommunicationMgr.sendMessageToHost({type:"SCRIPT_RUN_STATE_CHANGED",scriptRunState:this.state.scriptRunState})}}componentWillUnmount(){this.connectionManager?.disconnect(),this.hostCommunicationMgr.closeHostCommunication(),window.removeEventListener("popstate",this.onHistoryChange,!1)}maybeShowErrorDialog(i,e){const{blockErrorDialogs:t}=this.state.appConfig;t||this.openDialog(i);const d=i.type===DialogType.SCRIPT_COMPILE_ERROR?i.type:i.title;this.hostCommunicationMgr.sendMessageToHost({type:"CLIENT_ERROR_DIALOG",error:d,message:e})}showError(i,e,t=DialogType.WARNING){LOG.error(e.message);const o={type:t,title:i,msg:jsx$1(DialogErrorMessage$1,{message:e.message,codeBlock:e.codeBlock}),onClose:()=>{}};this.maybeShowErrorDialog(o,e.message)}hasStreamlitVersionChanged(i){let e;if(StreamlitConfig.ENABLE_RELOAD_BASED_ON_HARDCODED_STREAMLIT_VERSION===!0?e=define_PACKAGE_METADATA_default.version:this.sessionInfo.isSet&&(e=this.sessionInfo.current.streamlitVersion),e){const{environmentInfo:t}=i;if(notNullOrUndefined(t)&¬NullOrUndefined(t.streamlitVersion))return e!=t.streamlitVersion}return!1}maybeSetState(i){if(i){const[e,t]=i;this.setState(e,t)}}processThemeInput(i){const e=this.createThemeHash(i);if(e===this.state.themeHash)return;this.setState({themeHash:e});const t=!isPresetTheme(this.props.theme.activeTheme);if(i){const o=createCustomThemes(i);this.props.theme.addThemes(o,{keepPresetThemes:!1});const d=getCachedTheme(),p=mapCachedThemeToAvailableTheme(d,o);if(p)this.setAndSendTheme(p);else if(o.length>1){const h=o.findIndex(y=>y.name===CUSTOM_THEME_AUTO_NAME);this.setAndSendTheme(o[h])}else this.setAndSendTheme(o[0])}else if(this.props.theme.addThemes([]),t){const o=getCachedTheme(),p=mapCachedThemeToAvailableTheme(o,[lightTheme,darkTheme]);p?this.setAndSendTheme(p):this.setAndSendTheme(getHostSpecifiedTheme())}(i?.fontFaces&&i.fontFaces.length>0||i?.fontSources&&i.fontSources.length>0)&&this.props.theme.setFonts(i)}handleScriptFinished(i){(i===ForwardMsg.ScriptFinishedStatus.FINISHED_SUCCESSFULLY||i===ForwardMsg.ScriptFinishedStatus.FINISHED_EARLY_FOR_RERUN||i===ForwardMsg.ScriptFinishedStatus.FINISHED_FRAGMENT_RUN_SUCCESSFULLY)&&(Promise.resolve().then(()=>{this.state.scriptFinishedHandlers.forEach(e=>e())}),(i===ForwardMsg.ScriptFinishedStatus.FINISHED_SUCCESSFULLY||i===ForwardMsg.ScriptFinishedStatus.FINISHED_FRAGMENT_RUN_SUCCESSFULLY)&&this.setState(({scriptRunId:e,fragmentIdsThisRun:t,elements:o})=>({elements:o.clearStaleNodes(e,t)}),()=>{const e=new Set(Array.from(this.state.elements.getElements()).map(t=>getElementId(t)).filter(notUndefined));this.widgetMgr.removeInactive(e)}),this.connectionManager!==null&&i!==ForwardMsg.ScriptFinishedStatus.FINISHED_EARLY_FOR_RERUN&&this.sessionInfo.isSet&&this.hasReceivedNewSession&&this.connectionManager.incrementMessageCacheRunCount(this.sessionInfo.current.maxCachedMessageAge,this.state.fragmentIdsThisRun))}clearAppState(i,e,t,o){this.setState(d=>{const p=this.appNavigation.clearPageElements(d.elements,o);return{scriptRunId:e,scriptName:t,appHash:i,elements:p}},()=>{const d=new Set(Array.from(this.state.elements.getElements()).map(p=>getElementId(p)).filter(notUndefined));this.widgetMgr.removeInactive(d)})}openDialog(i){this.setState({dialog:i})}render(){const{allowRunOnSave:i,connectionState:e,dialog:t,elements:o,initialSidebarState:d,menuItems:p,isFullScreen:h,scriptRunId:y,scriptRunState:$,userSettings:E,hideTopBar:M,hideSidebarNav:H,expandSidebarNav:Z,currentPageScriptHash:be,hostHideSidebarNav:ye,pageLinkBaseUrl:we,sidebarChevronDownshift:xe,hostMenuItems:Ce,hostToolbarItems:Ne,libConfig:Fe,inputsDisabled:Me,appPages:Le,navSections:ze,navigationPosition:Ke,scriptChangedOnDisk:Ve}=this.state,je=this.props.isMobileViewport?Navigation.Position.SIDEBAR:Ke,We=showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode),Xe=classNames("stApp",getEmbeddingIdClassName(this.embeddingId),{"streamlit-embedded":isEmbed(),"streamlit-wide":E.wideMode}),Qe=t?StreamlitDialog({...t,onClose:this.closeDialog}):null,Ye=this.shouldShowToolbar(Ce,Ne),Ue=!isEmbed()||isPaddingDisplayed(),ot=isScrollingHidden();return jsx$1(StreamlitContextProvider$1,{initialSidebarState:d,initialSidebarWidth:this.state.initialSidebarWidth,pageLinkBaseUrl:we,currentPageScriptHash:be,onPageChange:this.onPageChange,navSections:ze,appPages:Le,appLogo:o.logo,sidebarChevronDownshift:xe,expandSidebarNav:Z,hideSidebarNav:H||ye||je===Navigation.Position.TOP,isFullScreen:h,setFullScreen:this.handleFullScreen,activeTheme:this.props.theme.activeTheme,setTheme:this.setAndSendTheme,availableThemes:this.props.theme.availableThemes,fragmentIdsThisRun:this.state.fragmentIdsThisRun,locale:window.navigator.language,formsData:this.state.formsData,scriptRunState:$,scriptRunId:y,mapboxToken:Fe.mapboxToken,enforceDownloadInNewTab:Fe.enforceDownloadInNewTab,resourceCrossOriginMode:Fe.resourceCrossOriginMode,requestDeferredFile:this.requestDeferredFile,children:jsx$1(ReactHotkeys,{keyName:"r,c,esc",onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,children:jsxs(StyledApp,{className:Xe,"data-testid":"stApp","data-test-script-state":y==INITIAL_SCRIPT_RUN_ID?"initial":$,"data-test-connection-state":e,children:[jsx$1(AppView,{endpoints:this.endpoints,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,elements:o,widgetMgr:this.widgetMgr,uploadClient:this.uploadClient,navigationPosition:je,wideMode:E.wideMode,embedded:isEmbed(),showPadding:Ue,disableScrolling:ot,addScriptFinishedHandler:this.addScriptFinishedHandler,removeScriptFinishedHandler:this.removeScriptFinishedHandler,widgetsDisabled:Me||e!==ConnectionState.CONNECTED,showToolbar:Ye,disableFullscreenMode:Fe.disableFullscreenMode,componentRegistry:this.componentRegistry,topRightContent:jsxs(Fragment,{children:[!M&&jsx$1(StatusWidget,{connectionState:e,scriptRunState:$,rerunScript:this.rerunScript,stopScript:this.stopScript,allowRunOnSave:i,showScriptChangedActions:Ve}),!M&&jsx$1(ToolbarActions,{hostToolbarItems:Ne,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,metricsMgr:this.metricsMgr}),this.showDeployButton()&&!Ve&&jsx$1(DeployButton,{onClick:this.deployButtonClicked}),!M&&jsx$1(MainMenu$1,{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:Ce,developmentMode:We,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,menuItems:p,metricsMgr:this.metricsMgr,toolbarMode:this.state.toolbarMode})]})}),Qe]})})})}}const AppWithScreenCast=withScreencast(App),AppWrapper=n=>{const{isMobile:i}=useViewportSize();return jsx$1(AppWithScreenCast,{...n,isMobileViewport:i})};function useThemeManager(){const n=getDefaultTheme(),[i,e]=reactExports.useState(n),[t,o]=reactExports.useState(n.themeInput?.fontFaces??[]),[d,p]=reactExports.useState(null),[h,y]=reactExports.useState(()=>[...createPresetThemes(),...isPresetTheme(n)?[]:[n]]),$=(be,ye={})=>{const{keepPresetThemes:we=!0}=ye;y([...we?createPresetThemes():[],...be])},E=reactExports.useCallback(be=>{e(ye=>be!==ye?(be.name===AUTO_THEME_NAME?removeCachedTheme():setCachedTheme(be),be):ye)},[e]),M=reactExports.useCallback(()=>{i.name===AUTO_THEME_NAME&&E(getHostSpecifiedTheme());const be=h.filter(ye=>ye.name!==AUTO_THEME_NAME);y([createAutoTheme(),...be])},[i.name,h,E]),H=reactExports.useCallback(be=>{be.fontFaces&&o(be.fontFaces);const ye=[...be.fontSources||[],...be.sidebar?.fontSources||[]],we={};ye.forEach(xe=>{xe.sourceUrl&&xe.configName&&(we[xe.configName]=xe.sourceUrl)}),p(Object.keys(we).length>0?we:null)},[o,p]),Z=reactExports.useCallback(be=>{H(be);const ye=new CustomThemeConfig(be),we=createTheme(CUSTOM_THEME_NAME,ye);E(we)},[H,E]);return reactExports.useEffect(()=>{const be=window.matchMedia("(prefers-color-scheme: dark)");return be.addEventListener("change",M),window.addEventListener("afterprint",M),()=>{window.removeEventListener("afterprint",M),be.removeEventListener("change",M)}},[i,h,M]),[{setTheme:E,activeTheme:i,addThemes:$,availableThemes:h,setFonts:H,setImportedTheme:Z},t,d]}const ThemedApp=({streamlitExecutionStartedAt:n})=>{const[i,e,t]=useThemeManager(),{activeTheme:o}=i;return jsx$1(RootStyleProvider,{theme:o,children:jsx$1(WindowDimensionsProvider,{children:jsxs(PortalProvider,{children:[e.length>0&&jsx$1(FontFaceDeclaration,{fontFaces:e}),t&&jsx$1(FontSources,{fontSources:t}),jsx$1(AppWrapper,{theme:i,streamlitExecutionStartedAt:n})]})})})},streamlitExecutionStartedAt=Date.now(),engine=new StyletronClient({prefix:"st-"}),rootDomNode=document.getElementById("root");if(!rootDomNode)throw new Error("#root DOM element not found");const reactRoot=clientExports.createRoot(rootDomNode);reactRoot.render(jsx$1(reactExports.StrictMode,{children:jsx$1(HelmetProvider,{children:jsx$1(Provider$1,{value:engine,children:jsx$1(ThemedApp,{streamlitExecutionStartedAt})})})}));export{toaster as $,ADJOINED as A,BaseButtonKind as B,Checkbox$1 as C,DynamicButtonLabel as D,EmotionIconBase as E,styled as F,StyledDropdownListItem as G,isPropValid as H,DownloadContext as I,StyledErrorMessage as J,toString$2 as K,LibConfigContext as L,findAndReplace as M,Arrow$2 as N,range as O,Placement as P,isNumericType as Q,DataFrameCellType as R,StreamlitConfig as S,TooltipIcon as T,UISelectbox as U,useCrossOriginAttribute as V,loglevelExports as W,useRequiredContext as X,NavigationContext as Y,DynamicIcon as Z,_extends$A as _,BaseButtonTooltip as a,Metric$1 as a$,Fragment as a0,Kind as a1,AlertElement$1 as a2,Video$1 as a3,keyframes as a4,StyledWidgetInstructions as a5,isFromMac as a6,FormsContext as a7,StyledFormSubmitContent as a8,Form$1 as a9,IsSidebarContext as aA,LabelVisibilityOptions as aB,React as aC,find as aD,parse$1 as aE,parse$2 as aF,normalize$1 as aG,html$2 as aH,svg as aI,useCopyToClipboard as aJ,ACCESSIBILITY_TYPE as aK,Popover$2 as aL,ensureError as aM,ErrorElement as aN,hexToRgb as aO,withWrapper as aP,__vitePreload as aQ,convertRemToPx as aR,blend as aS,SetCache as aT,cacheHas as aU,baseRest as aV,isArrayLikeObject as aW,useSelectCommon as aX,Select as aY,VirtualDropdown as aZ,TYPE as a_,isInForm as aa,WidgetLabelHelpIcon as ab,WidgetLabel as ac,isMaterialIcon as ad,getBorderColor as ae,TextInput$1 as af,getDefaultExportFromCjs as ag,darken as ah,getPrimaryFocusBoxShadow as ai,PortalContext as aj,reactDomExports as ak,classNames as al,requireReact as am,styled$1 as an,isFocusVisible as ao,getOverride as ap,getOverrideProps as aq,root$4 as ar,toNumber as as,isObject$1 as at,mergeOverrides as au,CUSTOM_INPUT_TYPE as av,ChevronDown$1 as aw,PLACEMENT as ax,Icon$2 as ay,Tooltip$1 as az,BaseButton as b,util_int_ as b$,transparentize as b0,StyledWidgetLabel as b1,Global as b2,getCrossOriginAttribute as b3,_arrayLikeToArray as b4,_unsupportedIterableToArray as b5,ViewStateContext as b6,useWindowDimensionsContext as b7,LocaleContext as b8,shouldWidthStretch as b9,ComponentRegistry as bA,__awaiter as bB,PropTypes as bC,isFromWindows as bD,requirePropTypes as bE,merge$1 as bF,getIncreasingGreen as bG,getDecreasingRed as bH,getBlue80 as bI,getGray30 as bJ,getGray70 as bK,getGray90 as bL,getDivergingColorsArray as bM,keysToSnakeCase as bN,PlotlyChart$1 as bO,themeColors as bP,isMobile as bQ,UploadedFileInfo as bR,FileUploaderState as bS,ThemeContext$1 as bT,pick$1 as bU,Slider$1 as bV,zip as bW,baseSlice as bX,baseToString as bY,trimmedEndIndex as bZ,util_bn_ as b_,ButtonGroup$1 as ba,LabelVisibilityMessage as bb,StyledButtonGroup as bc,NumberInput$1 as bd,isDatetimeType as be,isDateType as bf,getTimezone as bg,debounce$2 as bh,isEqual$1 as bi,shouldHeightStretch as bj,useStyletron as bk,mergeOverride as bl,toObjectOverride as bm,Icon$1 as bn,DeleteAlt$1 as bo,forkBlur as bp,forkFocus as bq,addCssUnit as br,convert as bs,visitParents as bt,SKIP as bu,toExportedTheme as bv,ArrowDataframe as bw,useTimeout as bx,Skeleton$1 as by,Skeleton as bz,BaseButtonSize as c,_createClass as c$,util_bit_ as c0,util_math_ as c1,util_buffer_ as c2,util_vector_ as c3,util_pretty_ as c4,util_interval_ as c5,compareTypes as c6,compareFields as c7,compareSchemas as c8,getAugmentedNamespace as c9,ok as cA,stringify$1 as cB,stringify as cC,pointStart as cD,visit as cE,pointEnd as cF,structuredClone$1 as cG,identity as cH,arrayEach as cI,baseEach as cJ,isArray$1 as cK,arrayMap as cL,baseMap as cM,baseIteratee as cN,baseForOwn as cO,isObjectLike as cP,baseGetTag as cQ,isPlainObject$3 as cR,cloneDeep$1 as cS,useExecuteWhenChanged as cT,StatefulPopover as cU,_typeof$e as cV,_inherits as cW,_createSuper as cX,_classCallCheck as cY,_defineProperty$s as cZ,_assertThisInitialized as c_,isStringType as ca,isTimeType as cb,isPeriodType as cc,isIntervalType as cd,isDurationType as ce,isDecimalType as cf,isFloatType as cg,isObjectType as ch,isListType as ci,TimeUnit as cj,Struct as ck,ThemeProvider$1 as cl,createThemedStyled as cm,createThemedUseStyletron as cn,createThemedWithStyle as co,expandBorderStyles as cp,withStyle as cq,requireReactIs$1 as cr,AcceptFileValue as cs,assertNever as ct,chatInputAcceptFileProtoValueToEnum as cu,tableFromIPC as cv,v4 as cw,requireReactDom as cx,UIDConsumer as cy,StatefulMenu as cz,Box as d,filterOptions as d0,mergeWith as d1,parseEntities as d2,StyledPre as d3,CopyButton$1 as d4,StyledCopyButtonContainer as d5,StyledCodeBlock as d6,propTypesExports as d7,_slicedToArray as d8,index as d9,Field as dA,Null as dB,isRangeIndexType as dC,isEmptyType as dD,isBytesType as dE,isCategoricalType as dF,fontSizes as dG,_objectWithoutProperties$1 as dH,_objectSpread2 as dI,jsx as dJ,css as dK,lighten as dL,mix$1 as dM,TRIGGER_TYPE as dN,StyledTooltipContentWrapper as dO,FlexContext as dP,useScrollbarGutterSize as dQ,Resizable as dR,_getPrototypeOf as da,_possibleConstructorReturn as db,parseToRgba as dc,DeckGlJsonChart$1 as dd,hasPath as de,isArrayLike as df,isBuffer as dg,isTypedArray as dh,isArguments as di,getTag as dj,isPrototype as dk,baseKeys as dl,Set$1 as dm,setToArray as dn,requireClassnames as dp,groupBy as dq,flatten as dr,Vector as ds,getLuminance as dt,parseIconPackEntry as du,genericFonts as dv,getMarkdownBgColors as dw,isUnsignedIntegerType as dx,isIntegerType as dy,isBooleanType as dz,isNullOrUndefined as e,StyledWidgetLabelHelpInline as f,getHelpTooltipAriaLabel as g,hoistNonReactStatics as h,isValidFormId as i,jsx$1 as j,useCalculatedDimensions as k,useEmotionTheme as l,hasLightBackgroundColor as m,notNullOrUndefined as n,jsxs as o,labelVisibilityProtoValueToEnum as p,StreamlitMarkdown$1 as q,reactExports as r,streamlit as s,StyledContent as t,useRegisterShortcut as u,getFocusBoxShadow as v,StyledCheckbox$1 as w,getOverrides as x,SIZE$1 as y,ENHANCER_POSITION as z};
|
|
155
|
+
`);return jsx$1("div",{"data-testid":"stClearCacheDialog",children:jsxs(Modal,{isOpen:!0,onClose:n.onClose,children:[jsx$1(ModalHeader,{children:"Clear caches"}),jsx$1(ModalBody$1,{children:jsx$1(StreamlitMarkdown$1,{source:e,allowHTML:!1})}),jsxs(ModalFooter,{children:[jsx$1(ModalButton,{kind:BaseButtonKind.GHOST,onClick:n.onClose,children:"Cancel"}),jsx$1(ModalButton,{autoFocus:!0,kind:BaseButtonKind.SECONDARY,onClick:n.confirmCallback,children:"Clear caches"})]})]})})}function ScriptCompileErrorDialog(n){return jsxs(Modal,{isOpen:!0,onClose:n.onClose,size:"auto",autoFocus:!1,children:[jsx$1(ModalHeader,{children:"Script execution error"}),jsx$1(ModalBody$1,{children:jsx$1(StreamlitErrorCodeBlock$1,{children:n.exception?.message?n.exception.message:"No message"})}),jsx$1(ModalFooter,{children:jsx$1(ModalButton,{kind:BaseButtonKind.SECONDARY,onClick:n.onClose,children:"Close"})})]})}function WarningDialog(n){return jsxs(Modal,{isOpen:!0,onClose:n.onClose,children:[jsx$1(ModalHeader,{children:n.title}),jsx$1(ModalBody$1,{children:n.msg})]})}function DeployErrorDialog({title:n,msg:i,onClose:e,onContinue:t,onTryAgain:o}){const d=()=>{e(),t&&t()};return jsxs(Modal,{isOpen:!0,onClose:e,children:[jsx$1(ModalHeader,{children:n}),jsx$1(ModalBody$1,{children:jsx$1(StyledDeployErrorContent,{children:i})}),jsxs(ModalFooter,{children:[jsx$1(ModalButton,{kind:BaseButtonKind.GHOST,onClick:o,children:"Try again"}),jsx$1(ModalButton,{kind:BaseButtonKind.SECONDARY,onClick:d,children:t?"Continue anyway":"Close"})]})]})}function noDialog({onClose:n}){return jsx$1(Modal,{isOpen:!1,onClose:n})}function typeNotRecognizedDialog(n){return jsx$1(Modal,{isOpen:!0,onClose:n.onClose,children:jsx$1(ModalBody$1,{children:`Dialog type "${n.type}" not recognized.`})})}function parseLinks(n){const i=[];let e=0,t=0;const o=/\[([^\]]+)\]\(([^)]+)\)/g;let d;for(;(d=o.exec(n))!==null;)d.index>e&&i.push(jsx$1(reactExports.Fragment,{children:n.substring(e,d.index)},t++)),i.push(jsx$1("a",{href:d[2],target:"_blank",rel:"noopener noreferrer",children:d[1]},t++)),e=d.index+d[0].length;return e<n.length&&i.push(jsx$1(reactExports.Fragment,{children:n.substring(e)},t++)),i}function DialogErrorMessage({message:n,codeBlock:i}){return jsxs(Fragment,{children:[jsx$1(StyledErrorText,{hasCodeBelow:!!i,children:parseLinks(n)}),i&&jsx$1(StreamlitErrorCodeBlock$1,{children:i})]})}const DialogErrorMessage$1=reactExports.memo(DialogErrorMessage),StyledActionButtonContainer=styled("div",{target:"ekuhni80"})(({theme:n})=>({display:"flex",gap:n.spacing.sm,alignItems:"center",lineHeight:n.iconSizes.md})),StyledActionButtonIcon=styled("div",{target:"ekuhni81"})(({theme:n,icon:i})=>({background:`url("${i}") no-repeat center / contain`,width:n.iconSizes.base,height:n.iconSizes.base})),StyledToolbarActions=styled("div",{target:"ekuhni82"})({display:"flex",alignItems:"center",flexDirection:"row"});function ActionButton({label:n,icon:i,onClick:e}){return jsx$1("div",{className:"stToolbarActionButton","data-testid":"stToolbarActionButton",children:jsx$1(BaseButton,{onClick:e,kind:BaseButtonKind.HEADER_BUTTON,children:jsxs(StyledActionButtonContainer,{children:[i&&jsx$1(StyledActionButtonIcon,{"data-testid":"stToolbarActionButtonIcon",icon:i}),n&&jsx$1("span",{"data-testid":"stToolbarActionButtonLabel",children:n})]})})})}function ToolbarActions({sendMessageToHost:n,hostToolbarItems:i,metricsMgr:e}){return jsx$1(StyledToolbarActions,{className:"stToolbarActions","data-testid":"stToolbarActions",children:i.map(({key:t,label:o,icon:d})=>jsx$1(ActionButton,{label:o,icon:d,onClick:()=>{e.enqueue("menuClick",{label:t}),n({type:"TOOLBAR_ITEM_CALLBACK",key:t})}},t))})}const screencastCounterAnimation=keyframes("0%{opacity:0;}25%{opacity:1;}100%{opacity:0;}"),StyledCountdown=styled("div",{target:"e1ejanx90"})(({theme:n})=>({position:"fixed",display:"flex",justifyContent:"center",alignItems:"center",top:0,left:0,width:n.sizes.full,height:n.sizes.full,fontSize:"40vh",color:n.colors.redTextColor,fontWeight:n.fontWeights.bold,opacity:"0.8",textShadow:`1px 1px 10px ${n.colors.grayTextColor}`,transition:"opacity 0.3s ease-in-out",animation:`${screencastCounterAnimation} 1s`})),Countdown=({countdown:n,endCallback:i})=>{const[e,t]=reactExports.useState(n);return jsx$1(StyledCountdown,{"data-testid":"stCountdown",onAnimationEnd:()=>{const d=e-1;d>=0&&t(d),d===0&&i()},children:jsx$1("span",{children:e})},`frame${e}`)},StyledRecordAudioLabel=styled("label",{target:"ej964cx0"})({margin:0}),StyledInstruction=styled("p",{target:"ej964cx1"})({margin:0}),ScreencastDialog=({onClose:n,toggleRecordAudio:i,recordAudio:e,startRecording:t})=>{const[o,d]=reactExports.useState(e),p=reactExports.useCallback(y=>{const{checked:$}=y.target;$!==o&&(d($),i())},[o,i]),h=reactExports.useCallback(()=>{t(),n()},[t,n]);return jsxs(Modal,{isOpen:!0,onClose:n,children:[jsx$1(ModalHeader,{children:"Record a screencast"}),jsxs(ModalBody$1,{children:[jsx$1("p",{children:"This will record a video with the contents of your screen, so you can easily share what you're seeing with others."}),jsx$1("p",{children:jsxs(StyledRecordAudioLabel,{"data-testid":"stScreencastAudioCheckbox",children:[jsx$1("input",{type:"checkbox",name:"recordAudio","aria-label":"Also record audio",checked:o,onChange:p})," ","Also record audio"]})}),jsx$1(StyledInstruction,{"data-testid":"stScreencastInstruction",children:jsx$1(StreamlitMarkdown$1,{source:"Press `Esc` any time to stop recording.",allowHTML:!1})})]}),jsx$1(ModalFooter,{children:jsx$1(ModalButton,{kind:BaseButtonKind.SECONDARY,onClick:h,children:"Start recording!"})})]})},StyledVideo=styled("video",{target:"e1hp04x70"})(({theme:n})=>({width:n.sizes.full,borderRadius:n.radii.md})),StyledDialogContainer=styled("div",{target:"e1hp04x71"})(({theme:n})=>({display:"flex",flexDirection:"column",width:n.sizes.full})),StyledRow=styled("div",{target:"e1hp04x72"})(({theme:n})=>({display:"flex",flexDirection:"row",paddingTop:n.spacing.md,paddingBottom:n.spacing.md})),StyledFirstColumn=styled("div",{target:"e1hp04x73"})(({theme:n})=>({paddingRight:n.spacing.lg,textAlign:"right",color:n.colors.grayTextColor,fontWeight:n.fontWeights.bold,width:"6em"})),StyledSecondColumn=styled("div",{target:"e1hp04x74"})(({theme:n})=>({flex:1,paddingRight:n.spacing.lg,marginRight:"6em",[`@media (max-width: ${n.breakpoints.sm})`]:{marginRight:n.spacing.none}})),StyledVideoFormatInstructions=styled("p",{target:"e1hp04x75"})(({theme:n})=>({marginTop:n.spacing.sm,marginBottom:n.spacing.none,fontSize:n.fontSizes.sm})),StyledDownloadButtonContainer=styled("div",{target:"e1hp04x76"})(({theme:n})=>({marginTop:n.spacing.twoXS})),VideoRecordedDialog=({onClose:n,videoBlob:i,fileName:e})=>{const t=URL.createObjectURL(i),o=()=>{const d=document.createElement("a");d.setAttribute("href",t),d.setAttribute("download",`${e}.webm`),d.click(),n()};return jsxs(Modal,{isOpen:!0,onClose:n,overrides:{Dialog:{style:{width:"80vw"}}},children:[jsx$1(ModalHeader,{children:"Next steps"}),jsx$1(ModalBody$1,{children:jsxs(StyledDialogContainer,{"data-testid":"stVideoRecordedDialog",children:[jsxs(StyledRow,{children:[jsx$1(StyledFirstColumn,{children:"Step 1"}),jsxs(StyledSecondColumn,{children:[jsx$1("p",{children:"Preview your video below:"}),jsx$1(StyledVideo,{src:t,controls:!0})]})]}),jsxs(StyledRow,{children:[jsx$1(StyledFirstColumn,{children:"Step 2"}),jsxs(StyledSecondColumn,{children:[jsx$1(StyledDownloadButtonContainer,{children:jsx$1(BaseButton,{kind:BaseButtonKind.SECONDARY,onClick:o,children:"Save video to disk"})}),jsxs(StyledVideoFormatInstructions,{children:["This video is encoded in the"," ",jsx$1("a",{href:"https://www.webmproject.org/",children:"WebM format"}),", which is only supported by newer video players. You can also play it by dragging the file directly into your browser."]})]})]}),jsxs(StyledRow,{children:[jsx$1(StyledFirstColumn,{children:"Step 3"}),jsxs(StyledSecondColumn,{children:["Share your video with the world on Twitter, LinkedIn, YouTube, or just plain email!"," ",jsx$1("span",{role:"img","aria-label":"Happy",children:"😀"})]})]})]})})]})},StyledScreenCastWarningDialog=styled("div",{target:"e1o5y2010"})({display:"flex"}),StyledUnsupportedScreenCastIcon=styled("div",{target:"e1o5y2011"})(({theme:n})=>({display:"flex",alignItems:"center",justifyItems:"center",marginRight:n.spacing.twoXL,marginLeft:n.spacing.sm,fontSize:n.fontSizes.fourXL})),StyledUnsupportedScreenCastExplanation=styled("p",{target:"e1o5y2012"})(({theme:n})=>({margin:n.spacing.none})),UnsupportedBrowserDialog=({onClose:n})=>jsxs(Modal,{isOpen:!0,onClose:n,children:[jsx$1(ModalHeader,{children:"Record a screencast"}),jsx$1(ModalBody$1,{children:jsxs(StyledScreenCastWarningDialog,{"data-testid":"stUnsupportedBrowserDialog",children:[jsx$1(StyledUnsupportedScreenCastIcon,{children:jsx$1("span",{role:"img","aria-label":"Alien Monster",children:"👾"})}),jsx$1(StyledUnsupportedScreenCastExplanation,{children:"Due to limitations with some browsers, this feature is only supported on recent desktop versions of Chrome, Firefox, and Edge."})]})})]}),UnsupportedBrowserDialog$1=reactExports.memo(UnsupportedBrowserDialog),LOG$2=loglevelExports.getLogger("withScreencast");function withScreencast(n){const i=e=>{const{testOverride:t}=e,o=reactExports.useRef(null),[d,p]=reactExports.useState("streamlit-screencast"),[h,y]=reactExports.useState(!1),[$,E]=reactExports.useState(void 0),[M,H]=reactExports.useState(t||"OFF"),Z=reactExports.useCallback(()=>{y(Fe=>!Fe)},[]),be=reactExports.useCallback(async()=>{if(!(M==="OFF"||isNullOrUndefined(o.current))){if(M==="COUNTDOWN"){H("OFF");return}if(M==="RECORDING"){const Fe=o.current;if(!Fe||Fe.getState()==="inactive")H("OFF");else{const Me=await Fe.stop();E(Me),H("PREVIEW_FILE")}}}},[M]),ye=reactExports.useCallback(async()=>{if(!ScreenCastRecorder.isSupportedBrowser()){H("UNSUPPORTED");return}o.current=new ScreenCastRecorder({recordAudio:h,onErrorOrStop:()=>{be().catch(Fe=>LOG$2.warn(`withScreencast.stopRecording threw an error: ${Fe}`))}});try{await o.current.initialize()}catch(Fe){LOG$2.warn(`ScreenCastRecorder.initialize error: ${Fe}`),H("UNSUPPORTED");return}H("COUNTDOWN")},[h,be]),we=reactExports.useCallback(Fe=>{if(!ScreenCastRecorder.isSupportedBrowser()){H("UNSUPPORTED");return}if(M==="OFF"){p(Fe),H("SETUP");return}be().catch(Me=>LOG$2.warn(`withScreencast.stopRecording threw an error: ${Me}`))},[M,be]),xe=reactExports.useCallback(()=>{if(isNullOrUndefined(o.current))throw new Error("Countdown finished but recorder is null");o.current.start()?H("RECORDING"):be().catch(Me=>LOG$2.warn(`withScreencast.stopRecording threw an error: ${Me}`))},[be]),Ce=reactExports.useCallback(()=>{H("OFF")},[]);return jsxs("div",{className:"withScreencast","data-testid":"stScreencast",children:[jsx$1(n,{...e,screenCast:{currentState:M,toggleRecordAudio:Z,startRecording:we,stopRecording:be}}),M==="UNSUPPORTED"&&jsx$1(UnsupportedBrowserDialog$1,{onClose:Ce}),M==="SETUP"&&jsx$1(ScreencastDialog,{recordAudio:h,onClose:Ce,startRecording:ye,toggleRecordAudio:Z}),M==="COUNTDOWN"&&jsx$1(Countdown,{countdown:3,endCallback:xe}),M==="PREVIEW_FILE"&&$&&jsx$1(VideoRecordedDialog,{onClose:Ce,videoBlob:$,fileName:d})]})};return i.displayName=`withScreencast(${n.displayName||n.name||"Component"})`,hoistNonReactStatics(i,n)}const useViewportSize=()=>{const{activeTheme:n}=reactExports.useContext(ThemeContext),{innerWidth:i}=useWindowDimensionsContext(),e=parseInt(n.emotion.breakpoints.md,10);return{isMobile:i<e}},DEFAULT_METRICS_CONFIG="https://data.streamlit.io/metrics.json",LOG$1=loglevelExports.getLogger("MetricsManager");class MetricsManager{constructor(i){this.initialized=!1,this.actuallySendMetrics=!1,this.metricsUrl=void 0,this.sendMessageToHost=()=>{},this.anonymousId="",this.pendingEvents=[],this.appHash="Not initialized",this.metadata={},this.setAppHash=e=>{this.appHash=e},this.setMetricsConfig=(e="")=>{this.metricsUrl=e},this.sessionInfo=i}async initialize({gatherUsageStats:i,sendMessageToHost:e}){this.sendMessageToHost=e,this.actuallySendMetrics=i&&this.metricsUrl!=="off",this.getAnonymousId(),this.actuallySendMetrics&&!this.metricsUrl&&(await this.requestDefaultMetricsConfig(),this.metricsUrl||(LOG$1.error("Undefined metrics config - deactivating metrics tracking."),this.actuallySendMetrics=!1)),this.actuallySendMetrics&&this.sendPendingEvents(),LOG$1.info("Gather usage stats: ",this.actuallySendMetrics),this.initialized=!0}enqueue(i,e={}){if(!this.initialized||!this.sessionInfo.isSet){this.pendingEvents.push([i,e]);return}this.actuallySendMetrics&&(this.pendingEvents.length&&this.sendPendingEvents(),this.send(i,e))}setMetadata(i){this.metadata=i}async requestDefaultMetricsConfig(){const i=localStorageAvailable();if(i){const e=window.localStorage.getItem("stMetricsConfig");if(e){this.metricsUrl=e;return}}try{const e=await fetch(DEFAULT_METRICS_CONFIG,{signal:AbortSignal.timeout(5e3)});if(!e.ok)this.metricsUrl=void 0,LOG$1.error("Failed to fetch metrics config: ",e.status);else{const t=await e.json();this.metricsUrl=t.url??void 0,i&&this.metricsUrl&&window.localStorage.setItem("stMetricsConfig",this.metricsUrl)}}catch(e){LOG$1.error("Failed to fetch metrics config:",e)}}send(i,e={}){const t=this.buildEventProto(i,e);this.metricsUrl==="postMessage"?this.postMessageEvent(i,t):this.track(t)}sendPendingEvents(){this.pendingEvents.forEach(([i,e])=>{this.send(i,e)}),this.pendingEvents=[]}async track(i){const e=new Request(this.metricsUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i.toJSON())});await fetch(e)}postMessageEvent(i,e){this.sendMessageToHost({type:"METRICS_EVENT",eventName:i,data:e})}buildEventProto(i,e){const t=new MetricsEvent({event:i,anonymousId:this.anonymousId,...this.getHostTrackingData(),...this.getInstallationData(),reportHash:this.appHash,dev:IS_DEV_ENV,source:"browser",streamlitVersion:this.sessionInfo.current.streamlitVersion,isHello:this.sessionInfo.isHello,appId:this.sessionInfo.current.appId,sessionId:this.sessionInfo.current.sessionId,pythonVersion:this.sessionInfo.current.pythonVersion,serverOs:this.sessionInfo.current.serverOS,hasDisplay:this.sessionInfo.current.hasDisplay,isWebdriver:isWebdriver(),...this.getContextData()});if(i==="menuClick")t.label=e.label;else if(i==="pageProfile")return new MetricsEvent({...t,...e});return t}getInstallationData(){return{machineIdV3:this.sessionInfo.current.installationIdV3,machineIdV4:this.sessionInfo.current.installationIdV4}}getHostTrackingData(){return this.metadata?pick$1(this.metadata,["hostedAt","owner","repo","branch","mainModule","creatorId"]):{}}getContextData(){return{contextPageUrl:window.location.href,contextPageTitle:document.title,contextPagePath:window.location.pathname,contextPageReferrer:document.referrer,contextPageSearch:window.location.search,contextLocale:window.navigator.language,contextUserAgent:window.navigator.userAgent}}getAnonymousId(){if(!this.actuallySendMetrics)return;const i="ajs_anonymous_id",e=localStorageAvailable(),t=getCookie(i),o=e?window.localStorage.getItem(i):null,d=new Date;if(d.setFullYear(new Date().getFullYear()+1),t)this.anonymousId=t,e&&window.localStorage.setItem(i,t);else if(o){try{this.anonymousId=JSON.parse(o)}catch{this.anonymousId=o}setCookie(i,this.anonymousId,d)}else this.anonymousId=v4(),setCookie(i,this.anonymousId,d),e&&window.localStorage.setItem(i,this.anonymousId)}}function isWebdriver(){return window.navigator?.webdriver??!1}class SessionEventDispatcher{constructor(){this.onSessionEvent=new distExports.Signal}handleSessionEventMsg(i){this.onSessionEvent.emit(i)}}const StyledApp=styled("div",{target:"ee4bbma0"})(({theme:n})=>{const i=hasLightBackgroundColor(n);return{position:"absolute",background:n.colors.bgColor,color:n.colors.bodyText,top:n.spacing.none,left:n.spacing.none,right:n.spacing.none,bottom:n.spacing.none,colorScheme:i?"light":"dark",overflow:"hidden","@media print":{float:"none",height:n.sizes.full,position:"static",overflow:"visible"}}});function getBrowserInfo(){const i=new UAParser().getResult();return{browserName:i.browser.name||"Unknown",browserVersion:i.browser.version||"Unknown",deviceType:i.device.type||"desktop",os:i.os.name||"Unknown"}}const showDevelopmentOptions=(n,i)=>i==Config.ToolbarMode.DEVELOPER?!0:Config.ToolbarMode.VIEWER==i||Config.ToolbarMode.MINIMAL==i?!1:n||isLocalhost();function getTitle(n){return n||"Streamlit"}class AppNavigation{constructor(i,e,t,o){this.hostCommunicationMgr=i,this.onUpdatePageUrl=e,this.onPageNotFound=t,this.onPageIconChange=o,this.isPageIconSet=!1,this.isPageTitleSet=!1,this.hasSetDefaultFavicon=!1,this.mainScriptHash=null,this.appPages=[],this.mainPage=null,this.hideSidebarNav=null}handleNewSession(i){return this.mainScriptHash!==i.mainScriptHash&&(this.isPageTitleSet=!1,this.isPageIconSet=!1,this.hasSetDefaultFavicon=!1),this.mainScriptHash=i.mainScriptHash,this.hideSidebarNav===null&&(this.hideSidebarNav=i.config?.hideSidebarNav??null),document.title=getTitle(""),[{currentPageScriptHash:i.pageScriptHash,hideSidebarNav:this.hideSidebarNav??!1},()=>{}]}handleNavigation(i){const{sections:e,position:t,appPages:o}=i;this.appPages=o,this.hideSidebarNav=t===Navigation.Position.HIDDEN;const d=i.pageScriptHash,p=o.find($=>$.pageScriptHash===d),h=o.find($=>$.isDefault);this.mainPage=h;const y=p.urlPathname;if(!this.isPageTitleSet){const $=getTitle(p.pageName);document.title=$,this.hostCommunicationMgr.sendMessageToHost({type:"SET_PAGE_TITLE",title:p.pageName??""})}return!this.isPageIconSet&&p.icon&&this.onPageIconChange(p.icon),this.onUpdatePageUrl(h.urlPathname??"",y,p.isDefault??!1),[{appPages:o,navSections:e,hideSidebarNav:this.hideSidebarNav,expandSidebarNav:i.expanded,currentPageScriptHash:d},()=>{this.hostCommunicationMgr.sendMessageToHost({type:"SET_APP_PAGES",appPages:o}),this.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:p.isDefault?"":y,currentPageScriptHash:d})}]}handlePageNotFound(i){return this.onPageNotFound(i),[{currentPageScriptHash:this.mainScriptHash??""},()=>{this.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:"",currentPageScriptHash:this.mainScriptHash??""})}]}findPageByUrlPath(i){return this.appPages.find(e=>i.endsWith("/"+e.urlPathname))??this.mainPage}handlePageConfigChanged(i){i.favicon&&(this.isPageIconSet=!0),i.title&&(this.isPageTitleSet=!0)}clearPageElements(i,e){return i.filterMainScriptElements(e)}}function includeIfDefined(n){return Object.entries(n).reduce((i,[e,t])=>(t!==void 0&&(i[e]=t),i),{})}function preferWindowValue(n,i){return n??i}function reconcileHostConfigValues(n,i){if(!n)return i;const e=isValidAllowedOrigins(n.allowedOrigins)?n.allowedOrigins:void 0;return{...i,allowedOrigins:preferWindowValue(e,i.allowedOrigins),useExternalAuthToken:preferWindowValue(n.useExternalAuthToken,i.useExternalAuthToken),enableCustomParentMessages:preferWindowValue(n.enableCustomParentMessages,i.enableCustomParentMessages),blockErrorDialogs:preferWindowValue(n.blockErrorDialogs,i.blockErrorDialogs),mapboxToken:preferWindowValue(n.mapboxToken,i.mapboxToken),disableFullscreenMode:preferWindowValue(n.disableFullscreenMode,i.disableFullscreenMode),enforceDownloadInNewTab:preferWindowValue(n.enforceDownloadInNewTab,i.enforceDownloadInNewTab),resourceCrossOriginMode:preferWindowValue(n.resourceCrossOriginMode,i.resourceCrossOriginMode),setAnonymousCrossOriginPropertyOnMediaElements:i.setAnonymousCrossOriginPropertyOnMediaElements,metricsUrl:preferWindowValue(n.metricsUrl,i.metricsUrl)}}var define_PACKAGE_METADATA_default={version:"1.52.2"};const INITIAL_SCRIPT_RUN_ID="<null>",LOG=loglevelExports.getLogger("App");class App extends reactExports.PureComponent{constructor(i){super(i),this.sessionInfo=new SessionInfo,this.metricsMgr=new MetricsManager(this.sessionInfo),this.sessionEventDispatcher=new SessionEventDispatcher,this.embeddingId=generateUID$2(),this.deferredFileListeners=new Map,this.isInitializingConnectionManager=!0,this.hasReceivedNewSession=!1,this.showDeployError=(e,t,o)=>{const d={type:DialogType.DEPLOY_ERROR,title:e,msg:t,onContinue:o,onClose:()=>{},onTryAgain:this.sendLoadGitInfoBackMsg};this.openDialog(d)},this.handleThemeMessage=(e,t)=>{const[,o,d]=createPresetThemes(),p=isPresetTheme(this.props.theme.activeTheme);e===o.name&&p?this.props.theme.setTheme(o):e===d.name&&p?this.props.theme.setTheme(d):t&&this.props.theme.setImportedTheme(t)},this.handleConnectionStateChanged=e=>{if(LOG.info(`Connection state changed from ${this.state.connectionState} to ${e}`),e===ConnectionState.CONNECTED){LOG.info("Reconnected to server."),this.state.connectionErrorDismissed&&this.setState({connectionErrorDismissed:!1});const t=this.state.scriptRunState===ScriptRunState.RUNNING,o=this.state.scriptRunState===ScriptRunState.RERUN_REQUESTED;!this.sessionInfo.last||t||o||this.state.fragmentIdsThisRun.length>0||this.state.autoReruns.length>0?(LOG.info("Requesting a script run."),this.widgetMgr.sendUpdateWidgetsMessage(void 0),this.setState({dialog:null})):this.state.dialog?.type===DialogType.CONNECTION_ERROR&&this.setState({dialog:null}),this.hostCommunicationMgr.sendMessageToHost({type:"WEBSOCKET_CONNECTED"})}else this.state.connectionState===ConnectionState.CONNECTED&&this.hostCommunicationMgr.sendMessageToHost({type:"WEBSOCKET_DISCONNECTED",attemptingToReconnect:e!==ConnectionState.DISCONNECTED_FOREVER}),this.sessionInfo.isSet&&this.sessionInfo.disconnect();this.isInitializingConnectionManager?this.setState({connectionState:e}):reactDomExports.flushSync(()=>{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}):LOG.error("Sending messages to the host is disabled in line with the platform policy.")},this.handleMessage=e=>{const t=(o,d,p)=>{const h=o[d];if(h in p)return p[h](o[h]);throw new Error(`Cannot handle ${d} "${h}".`)};try{t(e,"type",{newSession:o=>this.handleNewSession(o),sessionStatusChanged:o=>this.handleSessionStatusChanged(o),sessionEvent:o=>this.handleSessionEvent(o),delta:o=>this.handleDeltaMsg(o,e.metadata),pageConfigChanged:o=>this.handlePageConfigChanged(o),pageInfoChanged:o=>this.handlePageInfoChanged(o),pagesChanged:o=>{},pageNotFound:o=>this.handlePageNotFound(o),gitInfoChanged:o=>this.handleGitInfoChanged(o),scriptFinished:o=>this.handleScriptFinished(o),pageProfile:o=>this.handlePageProfileMsg(o),autoRerun:o=>this.handleAutoRerun(o),fileUrlsResponse:o=>this.uploadClient.onFileURLsResponse(o),deferredFileResponse:o=>this.handleDeferredFileResponse(o),parentMessage:o=>this.handleCustomParentMessage(o),logo:o=>this.handleLogo(o,e.metadata),navigation:o=>this.handleNavigation(o),authRedirect:o=>{isInChildFrame()?this.hostCommunicationMgr.sendMessageToSameOriginHost({type:"REDIRECT_TO_URL",url:o.url}):window.location.href=o.url}})}catch(o){const d=ensureError(o);LOG.error(d),this.showError("Bad message format",{message:d.message})}},this.handleLogo=(e,t)=>{this.setState(o=>({elements:o.elements.appRootWithLogo(e,{activeScriptHash:t.activeScriptHash,scriptRunId:o.scriptRunId})}))},this.handlePageConfigChanged=e=>{const{title:t,favicon:o,layout:d,initialSidebarState:p,initialSidebarWidth:h,menuItems:y}=e;this.appNavigation.handlePageConfigChanged(e),t&&(this.hostCommunicationMgr.sendMessageToHost({type:"SET_PAGE_TITLE",title:t}),document.title=t),o&&this.onPageIconChanged(o),d!==this.state.layout&&d!==PageConfig.Layout.LAYOUT_UNSET&&this.setState(E=>({layout:d,userSettings:{...E.userSettings,wideMode:d===PageConfig.Layout.WIDE}})),p!==this.state.initialSidebarState&&p!==PageConfig.SidebarState.SIDEBAR_UNSET&&this.setState(()=>({initialSidebarState:p}));const $=h?.pixelWidth!==void 0?h.pixelWidth:void 0;notNullOrUndefined($)&&$!==this.state.initialSidebarWidth&&this.setState(()=>({initialSidebarWidth:$})),y&&this.setState(E=>(y.clearAboutMd&&(y.aboutSectionMd=""),{menuItems:{...E.menuItems,...y}}))},this.handlePageInfoChanged=e=>{const{queryString:t}=e,o=document.location.pathname+(t?`?${t}`:"");window.history.pushState({},"",o),this.setState({queryParams:t}),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",{message:`${t}. Running the app's main page.`})},this.handlePageNotFound=e=>{const{pageName:t}=e;this.maybeSetState(this.appNavigation.handlePageNotFound(t))},this.onPageIconChanged=e=>{handleFavicon(e,this.hostCommunicationMgr.sendMessageToHost,this.endpoints)},this.handleNavigation=e=>{this.setState({navigationPosition:e.position}),this.maybeSetState(this.appNavigation.handleNavigation(e))},this.handlePageProfileMsg=e=>{const t=PageProfile.toObject(e),o=getBrowserInfo();this.metricsMgr.enqueue("pageProfile",{...t,isFragmentRun:!!t.isFragmentRun,numPages:this.state.appPages?.length,pageScriptHash:this.state.currentPageScriptHash,activeTheme:this.props.theme?.activeTheme?.name,totalLoadTime:Math.round((performance.now()-this.state.latestRunTime)*1e3),browserInfo:o})},this.handleAutoRerun=e=>{const t=setInterval(()=>{this.widgetMgr.sendUpdateWidgetsMessage(e.fragmentId,!0)},e.interval*1e3);this.setState(o=>({autoReruns:[...o.autoReruns,t]}))},this.handleSessionStatusChanged=e=>{this.setState(t=>{let{scriptRunState:o}=t,{dialog:d}=t;return e.scriptIsRunning&&t.scriptRunState!==ScriptRunState.STOP_REQUESTED?(o=ScriptRunState.RUNNING,notNullOrUndefined(d)&&d.type===DialogType.SCRIPT_COMPILE_ERROR&&(d=void 0)):!e.scriptIsRunning&&t.scriptRunState!==ScriptRunState.RERUN_REQUESTED&&t.scriptRunState!==ScriptRunState.COMPILATION_ERROR&&(o=ScriptRunState.NOT_RUNNING),{userSettings:{...t.userSettings,runOnSave:!!e.runOnSave},dialog:d,scriptRunState:o,scriptChangedOnDisk:e.scriptIsRunning?!1:t.scriptChangedOnDisk}})},this.handleSessionEvent=e=>{if(this.sessionEventDispatcher.handleSessionEventMsg(e),e.type==="scriptCompilationException"){this.setState({scriptRunState:ScriptRunState.COMPILATION_ERROR});const t={type:DialogType.SCRIPT_COMPILE_ERROR,exception:e.scriptCompilationException,onClose:()=>{}};this.maybeShowErrorDialog(t,e.scriptCompilationException?.message??"No message")}else e.type==="scriptChangedOnDisk"&&this.setState({scriptChangedOnDisk:!0})},this.maybeUpdatePageUrl=(e,t,o)=>{const d=this.getBaseUriParts();if(d){let p;StreamlitConfig.MAIN_PAGE_BASE_URL?p=parseUriIntoBaseParts(StreamlitConfig.MAIN_PAGE_BASE_URL).pathname:p=d.pathname;const h=extractPageNameFromPathName(document.location.pathname,p);if((h===""?e:h)!==t){const $=o?"":t,E=this.state.queryParams||preserveEmbedQueryParams(),M=E?`?${E}`:"",Z=`${p==="/"?"":p}/${$}${M}`;window.history.pushState({},"",Z)}}},this.handleNewSession=e=>{const t=e.initialize;if(this.hasStreamlitVersionChanged(t)){window.location.reload();return}this.hasReceivedNewSession=!0,(!this.sessionInfo.isSet||!this.sessionInfo.current.isConnected)&&this.handleInitialization(e);const{appHash:o,currentPageScriptHash:d}=this.state,{scriptRunId:p,name:h,mainScriptPath:y,fragmentIdsThisRun:$,pageScriptHash:E,mainScriptHash:M}=e;if($.length)this.setState({fragmentIdsThisRun:$,latestRunTime:performance.now()});else{this.cleanupAutoReruns();const Z=e.config,be=e.customTheme;this.processThemeInput(be),this.setState({allowRunOnSave:Z.allowRunOnSave,hideTopBar:Z.hideTopBar,toolbarMode:Z.toolbarMode,latestRunTime:performance.now(),mainScriptHash:M,fragmentIdsThisRun:$}),this.maybeSetState(this.appNavigation.handleNewSession(e)),!this.appNavigation.hasSetDefaultFavicon&&!this.appNavigation.isPageIconSet&&(this.appNavigation.hasSetDefaultFavicon=!0,this.onPageIconChanged("./favicon.png"))}const H=hashString(this.sessionInfo.current.installationId+y);this.metricsMgr.setMetadata(this.state.deployedAppMetadata),this.metricsMgr.setAppHash(H),this.metricsMgr.enqueue("updateReport"),o===H&&d===E?this.setState({scriptRunId:p}):this.clearAppState(H,p,h,M)},this.handleInitialization=e=>{const t=e.initialize,o=e.config;this.sessionInfo.setCurrent(SessionInfo.propsFromNewSessionMessage(e)),this.metricsMgr.initialize({gatherUsageStats:o.gatherUsageStats,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost}),this.handleSessionStatusChanged(t.sessionStatus)},this.onHistoryChange=()=>{const{currentPageScriptHash:e}=this.state,t=this.appNavigation.findPageByUrlPath(document.location.pathname),o=document.location.toString().includes("#"),d=t?.pageScriptHash===e;isNullOrUndefined(t)||o&&d||this.onPageChange(t.pageScriptHash,void 0,!0)},this.setAndSendTheme=e=>{this.props.theme.setTheme(e),this.hostCommunicationMgr.sendMessageToHost({type:"SET_THEME_CONFIG",themeInfo:toExportedTheme(e.emotion)})},this.createThemeHash=e=>{if(!e)return"hash_for_undefined_custom_theme";const t=JSON.parse(JSON.stringify(e)),o=sortThemeInputKeys(t);return hashString(JSON.stringify(o))},this.closeDialog=()=>{this.state.dialog?.type===DialogType.CONNECTION_ERROR?this.setState({dialog:void 0,connectionErrorDismissed:!0}):this.setState({dialog:void 0})},this.saveSettings=e=>{const{runOnSave:t}=this.state.userSettings,{runOnSave:o}=e;if(this.setState({userSettings:e}),t!==o&&this.isServerConnected()){const d=new BackMsg({setRunOnSave:o});d.type="setRunOnSave",this.sendBackMsg(d)}},this.handleDeltaMsg=(e,t)=>{this.setState(o=>({elements:o.elements.applyDelta(o.scriptRunId,e,t)}))},this.debugShutdownRuntime=()=>{if(this.isServerConnected()){const e=new BackMsg({debugShutdownRuntime:!0});e.type="debugShutdownRuntime",this.sendBackMsg(e)}},this.debugDisconnectWebsocket=()=>{if(this.isServerConnected()){const e=new BackMsg({debugDisconnectWebsocket:!0});e.type="debugDisconnectWebsocket",this.sendBackMsg(e)}},this.debugClearForwardMsgCache=()=>{isLocalhost()&&this.connectionManager?.websocketConnection?.cache.messages.clear()},this.cleanupAutoReruns=()=>{this.state.autoReruns.forEach(e=>{clearInterval(e)}),this.setState({autoReruns:[]})},this.rerunScript=(e=!1)=>{if(this.closeDialog(),!this.isServerConnected()){LOG.error("Cannot rerun script when disconnected from server.");return}this.state.scriptRunState===ScriptRunState.RUNNING||this.state.scriptRunState===ScriptRunState.RERUN_REQUESTED||(this.setState({scriptRunState:ScriptRunState.RERUN_REQUESTED}),e===!0&&this.saveSettings({...this.state.userSettings,runOnSave:!0}),this.widgetMgr.sendUpdateWidgetsMessage(void 0))},this.sendLoadGitInfoBackMsg=()=>{if(!this.isServerConnected()){LOG.error("Cannot load git information when disconnected from server.");return}this.sendBackMsg(new BackMsg({loadGitInfo:!0}))},this.onPageChange=(e,t,o)=>{const{elements:d,mainScriptHash:p}=this.state;this.cleanupAutoReruns();const h=this.appNavigation.clearPageElements(d,p),y=new Set(Array.from(h.getElements()).map($=>getElementId($)).filter(notUndefined));this.sendRerunBackMsg(this.widgetMgr.getActiveWidgetStates(y),void 0,e,void 0,t,o)},this.isAppInReadyState=e=>this.state.connectionState===ConnectionState.CONNECTED&&this.state.scriptRunState===ScriptRunState.NOT_RUNNING&&e.scriptRunState===ScriptRunState.RUNNING&&e.connectionState===ConnectionState.CONNECTED,this.sendRerunBackMsg=(e,t,o,d,p,h)=>{const y=this.getBaseUriParts();if(!y){LOG.error("Cannot send rerun backMessage when disconnected from server.");return}const{currentPageScriptHash:$}=this.state;let E=p??this.getQueryString(),M="";const H={timezone:getTimezone$1(),timezoneOffset:getTimezoneOffset(),locale:getLocaleLanguage(),url:getUrl(),isEmbedded:isEmbed(),colorScheme:this.getThemeColorScheme()};if(o){if(o!==$&&!h){const be=preserveEmbedQueryParams();E=getQueryString(p,be),this.setState({queryParams:E}),this.hostCommunicationMgr.sendMessageToHost({type:"SET_QUERY_PARAM",queryParams:E})}}else if($)o=$;else{let be;StreamlitConfig.MAIN_PAGE_BASE_URL?be=parseUriIntoBaseParts(StreamlitConfig.MAIN_PAGE_BASE_URL).pathname:be=y.pathname,M=extractPageNameFromPathName(document.location.pathname,be),o=""}const Z=this.connectionManager?.getCachedMessageHashes()??[];this.sendBackMsg(new BackMsg({rerunScript:{queryString:E,widgetStates:e,pageScriptHash:o,pageName:M,fragmentId:t,isAutoRerun:d,cachedMessageHashes:Z,contextInfo:H}})),this.hasReceivedNewSession=!1},this.stopScript=()=>{if(!this.isServerConnected()){LOG.error("Cannot stop app when disconnected from server.");return}if(this.state.scriptRunState===ScriptRunState.NOT_RUNNING||this.state.scriptRunState===ScriptRunState.STOP_REQUESTED)return;const e=new BackMsg({stopScript:!0});e.type="stopScript",this.sendBackMsg(e),this.setState({scriptRunState:ScriptRunState.STOP_REQUESTED})},this.openClearCacheDialog=()=>{if(this.isServerConnected()){const e={type:DialogType.CLEAR_CACHE,confirmCallback:this.clearCache,defaultAction:this.clearCache,onClose:()=>{}};this.openDialog(e)}else LOG.error("Cannot clear cache: disconnected from server")},this.openDeployDialog=()=>{const e={type:DialogType.DEPLOY_DIALOG,onClose:this.closeDialog,showDeployError:this.showDeployError,isDeployErrorModalOpen:this.state.dialog?.type===DialogType.DEPLOY_ERROR,metricsMgr:this.metricsMgr,gitInfo:this.state.gitInfo};this.openDialog(e)},this.clearCache=()=>{if(this.closeDialog(),this.isServerConnected()){const e=new BackMsg({clearCache:!0});e.type="clearCache",this.sendBackMsg(e)}else LOG.error("Cannot clear cache: disconnected from server")},this.sendAppHeartbeat=()=>{if(this.isServerConnected()){const e=new BackMsg({appHeartbeat:!0});e.type="appHeartbeat",this.sendBackMsg(e)}else LOG.error("Cannot send app heartbeat: disconnected from server")},this.sendBackMsg=e=>{this.connectionManager?(LOG.info(e),this.connectionManager.sendMessage(e)):LOG.error(`Not connected. Cannot send back message: ${e}`)},this.handleConnectionError=e=>{this.state.connectionErrorDismissed||this.showError("Connection error",e,DialogType.CONNECTION_ERROR)},this.isServerConnected=()=>this.connectionManager?this.connectionManager.isConnected():!1,this.settingsCallback=(e=!0)=>{const t={type:DialogType.SETTINGS,sessionInfo:this.sessionInfo,isServerConnected:this.isServerConnected(),settings:this.state.userSettings,allowRunOnSave:this.state.allowRunOnSave,onSave:this.saveSettings,onClose:()=>{},animateModal:e,metricsMgr:this.metricsMgr};this.openDialog(t)},this.aboutCallback=()=>{const{menuItems:e}=this.state,t={type:DialogType.ABOUT,onClose:this.closeDialog,aboutSectionMd:e?.aboutSectionMd};this.openDialog(t)},this.printCallback=()=>{const{scriptRunState:e}=this.state;if(e!==ScriptRunState.NOT_RUNNING){setTimeout(this.printCallback,500);return}let t;try{const o=getIFrameEnclosingApp(this.embeddingId);o?.contentWindow?t=o.contentWindow.window:t=window}catch{t=window}finally{t||(t=window),t.print()}},this.screencastCallback=()=>{const{scriptName:e}=this.state,{startRecording:t}=this.props.screenCast,o=getScreencastTimestamp();t(`streamlit-${e}-${o}`)},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,o)=>({scriptFinishedHandlers:t.scriptFinishedHandlers.concat(e)}))},this.removeScriptFinishedHandler=e=>{this.setState((t,o)=>({scriptFinishedHandlers:t.scriptFinishedHandlers.filter(d=>d!==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.getThemeColorScheme=()=>{const{activeTheme:e}=this.props.theme;return hasLightBackgroundColor(e.emotion)?"light":"dark"},this.isInCloudEnvironment=()=>{const{hostMenuItems:e}=this.state;return e&&e?.length>0},this.showDeployButton=()=>showDevelopmentOptions(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)=>{const o=this.isServerConnected(),d=this.sessionInfo.isSet;if(o&&d){const p=new BackMsg({fileUrlsRequest:{requestId:e,fileNames:t.map(h=>h.name),sessionId:this.sessionInfo.current.sessionId}});p.type="fileUrlsRequest",this.sendBackMsg(p)}else LOG.warn(`Cannot request file URLs (isServerConnected: ${o}, isSessionInfoSet: ${d})`),this.uploadClient.onFileURLsResponse({responseId:e,errorMsg:"Connection lost. Please wait for the app to reconnect, then try again."})},this.requestDeferredFile=e=>{const t=this.isServerConnected(),o=this.sessionInfo.isSet;if(!t||!o)return Promise.reject(new Error("Not connected to server or session not initialized"));const d=Promise.withResolvers(),p=this.deferredFileListeners.get(e)??new Set,h=$=>{p.delete(h),d.resolve($)};p.add(h),this.deferredFileListeners.set(e,p);const y=new BackMsg({deferredFileRequest:{fileId:e,sessionId:this.sessionInfo.current.sessionId}});return y.type="deferredFileRequest",this.sendBackMsg(y),d.promise},this.handleDeferredFileResponse=e=>{const t=this.deferredFileListeners.get(e.fileId);if(!(!t||t.size===0)){for(const o of Array.from(t))try{o(e)}catch{}this.deferredFileListeners.delete(e.fileId)}},this.handleKeyDown=(e,t)=>{if(!((e==="c"||e==="r")&&isKeyboardEventFromEditableTarget(t)))switch(e){case"c":showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode)&&this.openClearCacheDialog();break;case"r":this.rerunScript();break}},this.handleKeyUp=e=>{e==="esc"&&this.props.screenCast.stopRecording()},this.hasAppDefinedMenuItems=()=>{const{menuItems:e}=this.state;return!!(e?.aboutSectionMd||e?.getHelpUrl&&!e?.hideGetHelp||e?.reportABugUrl&&!e?.hideReportABug)},this.shouldShowToolbar=(e,t)=>{const o=!isEmbed()||isToolbarDisplayed();let d;return this.state.toolbarMode===Config.ToolbarMode.MINIMAL?d=e.length>0||t.length>0||this.hasAppDefinedMenuItems():d=!0,o&&d},ensureHotkeysFilterConfigured(),enablePatches(),enableMapSet(),this.state={connectionState:ConnectionState.INITIAL,elements:AppRoot.empty("",!0),isFullScreen:!1,scriptName:"",scriptRunId:INITIAL_SCRIPT_RUN_ID,appHash:null,scriptRunState:ScriptRunState.NOT_RUNNING,userSettings:{wideMode:!1,runOnSave:!1},connectionErrorDismissed:!1,layout:PageConfig.Layout.CENTERED,initialSidebarState:PageConfig.SidebarState.AUTO,initialSidebarWidth:void 0,menuItems:void 0,allowRunOnSave:!0,scriptFinishedHandlers:[],themeHash:"",gitInfo:null,formsData:createFormsData(),appPages:[],navSections:[],currentPageScriptHash:"",mainScriptHash:"",hideTopBar:!0,hideSidebarNav:!0,expandSidebarNav:!1,toolbarMode:Config.ToolbarMode.MINIMAL,latestRunTime:performance.now(),fragmentIdsThisRun:[],isOwner:!1,hostMenuItems:[],hostToolbarItems:[],hostHideSidebarNav:!1,sidebarChevronDownshift:0,pageLinkBaseUrl:"",queryParams:"",deployedAppMetadata:{},libConfig:{},appConfig:{},autoReruns:[],inputsDisabled:!1,navigationPosition:Navigation.Position.SIDEBAR,scriptChangedOnDisk:!1},this.connectionManager=null,this.widgetMgr=new WidgetStateManager({sendRerunBackMsg:this.sendRerunBackMsg,formsDataChanged:e=>this.setState({formsData:e})}),this.hostCommunicationMgr=new HostCommunicationManager({streamlitExecutionStartedAt:i.streamlitExecutionStartedAt,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:e=>this.onPageChange(e),isOwnerChanged:e=>this.setState({isOwner:e}),fileUploadClientConfigChanged:e=>{this.endpoints.setFileUploadClientConfig!==void 0&&this.endpoints.setFileUploadClientConfig(e)},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.setState({scriptRunState:ScriptRunState.RERUN_REQUESTED}),this.initializeConnectionManager())},terminateWebsocketConnection:()=>{this.connectionManager?.disconnect(),this.connectionManager=null}}),this.endpoints=new DefaultStreamlitEndpoints({getServerUri:this.getBaseUriParts,csrfEnabled:!0,sendClientError:(e,t,o,d,p)=>{this.hostCommunicationMgr.sendMessageToHost({type:"CLIENT_ERROR",component:e,error:t,message:o,source:d,customComponentName:p})}}),this.uploadClient=new FileUploadClient({sessionInfo:this.sessionInfo,endpoints:this.endpoints,formsWithPendingRequestsChanged:e=>this.widgetMgr.setFormsWithUploadsInProgress(e),requestFileURLs:this.requestFileURLs}),this.componentRegistry=new ComponentRegistry(this.endpoints),this.appNavigation=new AppNavigation(this.hostCommunicationMgr,this.maybeUpdatePageUrl,this.onPageNotFound,this.onPageIconChanged),window.streamlitDebug={clearForwardMsgCache:this.debugClearForwardMsgCache,disconnectWebsocket:this.debugDisconnectWebsocket,shutdownRuntime:this.debugShutdownRuntime}}applyInitialHostConfig(){if(!isHostConfigBypassEnabled())return;const i=StreamlitConfig.HOST_CONFIG,e=includeIfDefined({allowedOrigins:i.allowedOrigins,useExternalAuthToken:i.useExternalAuthToken,enableCustomParentMessages:i.enableCustomParentMessages,blockErrorDialogs:i.blockErrorDialogs});this.hostCommunicationMgr.setAllowedOrigins(e),this.setAppConfig(e);const t=includeIfDefined({mapboxToken:i.mapboxToken,disableFullscreenMode:i.disableFullscreenMode,enforceDownloadInNewTab:i.enforceDownloadInNewTab,resourceCrossOriginMode:i.resourceCrossOriginMode});Object.keys(t).length>0&&this.setLibConfig(t),i.metricsUrl!==void 0&&this.metricsMgr.setMetricsConfig(i.metricsUrl)}initializeConnectionManager(){this.isInitializingConnectionManager=!0,this.applyInitialHostConfig(),this.connectionManager=new ConnectionManager({getLastSessionId:()=>this.sessionInfo.last?.sessionId,endpoints:this.endpoints,onMessage:this.handleMessage,onConnectionError:this.handleConnectionError,connectionStateChanged:this.handleConnectionStateChanged,claimHostAuthToken:this.hostCommunicationMgr.claimAuthToken,resetHostAuthToken:this.hostCommunicationMgr.resetAuthToken,sendClientError:(i,e,t)=>{this.hostCommunicationMgr.sendMessageToHost({type:"CLIENT_ERROR",component:"Websocket Connection",error:i,message:e,source:t})},onHostConfigResp:i=>{const e=reconcileHostConfigValues(StreamlitConfig.HOST_CONFIG,i),{allowedOrigins:t,useExternalAuthToken:o,disableFullscreenMode:d,enableCustomParentMessages:p,mapboxToken:h,enforceDownloadInNewTab:y,metricsUrl:$,blockErrorDialogs:E,setAnonymousCrossOriginPropertyOnMediaElements:M,resourceCrossOriginMode:H}=e,Z={allowedOrigins:t,useExternalAuthToken:o,enableCustomParentMessages:p,blockErrorDialogs:E},be={mapboxToken:h,disableFullscreenMode:d,enforceDownloadInNewTab:y,resourceCrossOriginMode:H??(M?"anonymous":void 0)};this.metricsMgr.setMetricsConfig($),this.hostCommunicationMgr.setAllowedOrigins(Z),this.setAppConfig(Z),this.setLibConfig(be)}}),this.isInitializingConnectionManager=!1}componentDidMount(){this.initializeConnectionManager(),mark(this.state.scriptRunState),this.hostCommunicationMgr.sendMessageToHost({type:"SCRIPT_RUN_STATE_CHANGED",scriptRunState:this.state.scriptRunState}),isScrollingHidden()&&document.body.classList.add("embedded"),isInChildFrame()&&(window.iFrameResizer={heightCalculationMethod:()=>{const i=document.querySelectorAll("[data-iframe-height]"),e=Array.from(i).map(t=>Math.ceil(t.getBoundingClientRect().bottom));return Math.max(0,...e)}},__vitePreload(()=>import("./iframeResizer.contentWindow.DPJjr14X.js").then(i=>i.i),[],import.meta.url)),this.hostCommunicationMgr.sendMessageToHost({type:"SET_THEME_CONFIG",themeInfo:toExportedTheme(this.props.theme.activeTheme.emotion)}),this.metricsMgr.enqueue("viewReport"),window.addEventListener("popstate",this.onHistoryChange,!1)}componentDidUpdate(i,e){if(window.prerenderReady===!1&&this.isAppInReadyState(e)&&(window.prerenderReady=!0),this.state.scriptRunState!==e.scriptRunState){if(mark(this.state.scriptRunState),this.state.scriptRunState===ScriptRunState.NOT_RUNNING)try{measure("script-run-cycle",ScriptRunState.RUNNING,ScriptRunState.NOT_RUNNING)}catch{}this.hostCommunicationMgr.sendMessageToHost({type:"SCRIPT_RUN_STATE_CHANGED",scriptRunState:this.state.scriptRunState})}}componentWillUnmount(){this.connectionManager?.disconnect(),this.hostCommunicationMgr.closeHostCommunication(),window.removeEventListener("popstate",this.onHistoryChange,!1)}maybeShowErrorDialog(i,e){const{blockErrorDialogs:t}=this.state.appConfig;t||this.openDialog(i);const d=i.type===DialogType.SCRIPT_COMPILE_ERROR?i.type:i.title;this.hostCommunicationMgr.sendMessageToHost({type:"CLIENT_ERROR_DIALOG",error:d,message:e})}showError(i,e,t=DialogType.WARNING){LOG.error(e.message);const o={type:t,title:i,msg:jsx$1(DialogErrorMessage$1,{message:e.message,codeBlock:e.codeBlock}),onClose:()=>{}};this.maybeShowErrorDialog(o,e.message)}hasStreamlitVersionChanged(i){let e;if(StreamlitConfig.ENABLE_RELOAD_BASED_ON_HARDCODED_STREAMLIT_VERSION===!0?e=define_PACKAGE_METADATA_default.version:this.sessionInfo.isSet&&(e=this.sessionInfo.current.streamlitVersion),e){const{environmentInfo:t}=i;if(notNullOrUndefined(t)&¬NullOrUndefined(t.streamlitVersion))return e!=t.streamlitVersion}return!1}maybeSetState(i){if(i){const[e,t]=i;this.setState(e,t)}}processThemeInput(i){const e=this.createThemeHash(i);if(e===this.state.themeHash)return;this.setState({themeHash:e});const t=!isPresetTheme(this.props.theme.activeTheme);if(i){const o=createCustomThemes(i);this.props.theme.addThemes(o,{keepPresetThemes:!1});const d=getCachedTheme(),p=mapCachedThemeToAvailableTheme(d,o);if(p)this.setAndSendTheme(p);else if(o.length>1){const h=o.findIndex(y=>y.name===CUSTOM_THEME_AUTO_NAME);this.setAndSendTheme(o[h])}else this.setAndSendTheme(o[0])}else if(this.props.theme.addThemes([]),t){const o=getCachedTheme(),p=mapCachedThemeToAvailableTheme(o,[lightTheme,darkTheme]);p?this.setAndSendTheme(p):this.setAndSendTheme(getHostSpecifiedTheme())}(i?.fontFaces&&i.fontFaces.length>0||i?.fontSources&&i.fontSources.length>0)&&this.props.theme.setFonts(i)}handleScriptFinished(i){(i===ForwardMsg.ScriptFinishedStatus.FINISHED_SUCCESSFULLY||i===ForwardMsg.ScriptFinishedStatus.FINISHED_EARLY_FOR_RERUN||i===ForwardMsg.ScriptFinishedStatus.FINISHED_FRAGMENT_RUN_SUCCESSFULLY)&&(Promise.resolve().then(()=>{this.state.scriptFinishedHandlers.forEach(e=>e())}),(i===ForwardMsg.ScriptFinishedStatus.FINISHED_SUCCESSFULLY||i===ForwardMsg.ScriptFinishedStatus.FINISHED_FRAGMENT_RUN_SUCCESSFULLY)&&this.setState(({scriptRunId:e,fragmentIdsThisRun:t,elements:o})=>({elements:o.clearStaleNodes(e,t)}),()=>{const e=new Set(Array.from(this.state.elements.getElements()).map(t=>getElementId(t)).filter(notUndefined));this.widgetMgr.removeInactive(e)}),this.connectionManager!==null&&i!==ForwardMsg.ScriptFinishedStatus.FINISHED_EARLY_FOR_RERUN&&this.sessionInfo.isSet&&this.hasReceivedNewSession&&this.connectionManager.incrementMessageCacheRunCount(this.sessionInfo.current.maxCachedMessageAge,this.state.fragmentIdsThisRun))}clearAppState(i,e,t,o){this.setState(d=>{const p=this.appNavigation.clearPageElements(d.elements,o);return{scriptRunId:e,scriptName:t,appHash:i,elements:p}},()=>{const d=new Set(Array.from(this.state.elements.getElements()).map(p=>getElementId(p)).filter(notUndefined));this.widgetMgr.removeInactive(d)})}openDialog(i){this.setState({dialog:i})}render(){const{allowRunOnSave:i,connectionState:e,dialog:t,elements:o,initialSidebarState:d,menuItems:p,isFullScreen:h,scriptRunId:y,scriptRunState:$,userSettings:E,hideTopBar:M,hideSidebarNav:H,expandSidebarNav:Z,currentPageScriptHash:be,hostHideSidebarNav:ye,pageLinkBaseUrl:we,sidebarChevronDownshift:xe,hostMenuItems:Ce,hostToolbarItems:Ne,libConfig:Fe,inputsDisabled:Me,appPages:Le,navSections:ze,navigationPosition:Ke,scriptChangedOnDisk:Ve}=this.state,je=this.props.isMobileViewport?Navigation.Position.SIDEBAR:Ke,We=showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode),Xe=classNames("stApp",getEmbeddingIdClassName(this.embeddingId),{"streamlit-embedded":isEmbed(),"streamlit-wide":E.wideMode}),Qe=t?StreamlitDialog({...t,onClose:this.closeDialog}):null,Ye=this.shouldShowToolbar(Ce,Ne),Ue=!isEmbed()||isPaddingDisplayed(),ot=isScrollingHidden();return jsx$1(StreamlitContextProvider$1,{initialSidebarState:d,initialSidebarWidth:this.state.initialSidebarWidth,pageLinkBaseUrl:we,currentPageScriptHash:be,onPageChange:this.onPageChange,navSections:ze,appPages:Le,appLogo:o.logo,sidebarChevronDownshift:xe,expandSidebarNav:Z,hideSidebarNav:H||ye||je===Navigation.Position.TOP,isFullScreen:h,setFullScreen:this.handleFullScreen,activeTheme:this.props.theme.activeTheme,setTheme:this.setAndSendTheme,availableThemes:this.props.theme.availableThemes,fragmentIdsThisRun:this.state.fragmentIdsThisRun,locale:window.navigator.language,formsData:this.state.formsData,scriptRunState:$,scriptRunId:y,mapboxToken:Fe.mapboxToken,enforceDownloadInNewTab:Fe.enforceDownloadInNewTab,resourceCrossOriginMode:Fe.resourceCrossOriginMode,requestDeferredFile:this.requestDeferredFile,children:jsx$1(ReactHotkeys,{keyName:"r,c,esc",onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,children:jsxs(StyledApp,{className:Xe,"data-testid":"stApp","data-test-script-state":y==INITIAL_SCRIPT_RUN_ID?"initial":$,"data-test-connection-state":e,children:[jsx$1(AppView,{endpoints:this.endpoints,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,elements:o,widgetMgr:this.widgetMgr,uploadClient:this.uploadClient,navigationPosition:je,wideMode:E.wideMode,embedded:isEmbed(),showPadding:Ue,disableScrolling:ot,addScriptFinishedHandler:this.addScriptFinishedHandler,removeScriptFinishedHandler:this.removeScriptFinishedHandler,widgetsDisabled:Me||e!==ConnectionState.CONNECTED,showToolbar:Ye,disableFullscreenMode:Fe.disableFullscreenMode,componentRegistry:this.componentRegistry,topRightContent:jsxs(Fragment,{children:[!M&&jsx$1(StatusWidget,{connectionState:e,scriptRunState:$,rerunScript:this.rerunScript,stopScript:this.stopScript,allowRunOnSave:i,showScriptChangedActions:Ve}),!M&&jsx$1(ToolbarActions,{hostToolbarItems:Ne,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,metricsMgr:this.metricsMgr}),this.showDeployButton()&&!Ve&&jsx$1(DeployButton,{onClick:this.deployButtonClicked}),!M&&jsx$1(MainMenu$1,{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:Ce,developmentMode:We,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,menuItems:p,metricsMgr:this.metricsMgr,toolbarMode:this.state.toolbarMode})]})}),Qe]})})})}}const AppWithScreenCast=withScreencast(App),AppWrapper=n=>{const{isMobile:i}=useViewportSize();return jsx$1(AppWithScreenCast,{...n,isMobileViewport:i})};function useThemeManager(){const n=getDefaultTheme(),[i,e]=reactExports.useState(n),[t,o]=reactExports.useState(n.themeInput?.fontFaces??[]),[d,p]=reactExports.useState(null),[h,y]=reactExports.useState(()=>[...createPresetThemes(),...isPresetTheme(n)?[]:[n]]),$=(be,ye={})=>{const{keepPresetThemes:we=!0}=ye;y([...we?createPresetThemes():[],...be])},E=reactExports.useCallback(be=>{e(ye=>be!==ye?(be.name===AUTO_THEME_NAME?removeCachedTheme():setCachedTheme(be),be):ye)},[e]),M=reactExports.useCallback(()=>{i.name===AUTO_THEME_NAME&&E(getHostSpecifiedTheme());const be=h.filter(ye=>ye.name!==AUTO_THEME_NAME);y([createAutoTheme(),...be])},[i.name,h,E]),H=reactExports.useCallback(be=>{be.fontFaces&&o(be.fontFaces);const ye=[...be.fontSources||[],...be.sidebar?.fontSources||[]],we={};ye.forEach(xe=>{xe.sourceUrl&&xe.configName&&(we[xe.configName]=xe.sourceUrl)}),p(Object.keys(we).length>0?we:null)},[o,p]),Z=reactExports.useCallback(be=>{H(be);const ye=new CustomThemeConfig(be),we=createTheme(CUSTOM_THEME_NAME,ye);E(we)},[H,E]);return reactExports.useEffect(()=>{const be=window.matchMedia("(prefers-color-scheme: dark)");return be.addEventListener("change",M),window.addEventListener("afterprint",M),()=>{window.removeEventListener("afterprint",M),be.removeEventListener("change",M)}},[i,h,M]),[{setTheme:E,activeTheme:i,addThemes:$,availableThemes:h,setFonts:H,setImportedTheme:Z},t,d]}const ThemedApp=({streamlitExecutionStartedAt:n})=>{const[i,e,t]=useThemeManager(),{activeTheme:o}=i;return jsx$1(RootStyleProvider,{theme:o,children:jsx$1(WindowDimensionsProvider,{children:jsxs(PortalProvider,{children:[e.length>0&&jsx$1(FontFaceDeclaration,{fontFaces:e}),t&&jsx$1(FontSources,{fontSources:t}),jsx$1(AppWrapper,{theme:i,streamlitExecutionStartedAt:n})]})})})},streamlitExecutionStartedAt=Date.now(),engine=new StyletronClient({prefix:"st-"}),rootDomNode=document.getElementById("root");if(!rootDomNode)throw new Error("#root DOM element not found");const reactRoot=clientExports.createRoot(rootDomNode);reactRoot.render(jsx$1(reactExports.StrictMode,{children:jsx$1(HelmetProvider,{children:jsx$1(Provider$1,{value:engine,children:jsx$1(ThemedApp,{streamlitExecutionStartedAt})})})}));export{toaster as $,ADJOINED as A,BaseButtonKind as B,Checkbox$1 as C,DynamicButtonLabel as D,EmotionIconBase as E,styled as F,StyledDropdownListItem as G,isPropValid as H,DownloadContext as I,StyledErrorMessage as J,toString$2 as K,LibConfigContext as L,findAndReplace as M,Arrow$2 as N,range as O,Placement as P,isNumericType as Q,DataFrameCellType as R,StreamlitConfig as S,TooltipIcon as T,UISelectbox as U,useCrossOriginAttribute as V,loglevelExports as W,useRequiredContext as X,NavigationContext as Y,DynamicIcon as Z,_extends$A as _,BaseButtonTooltip as a,Metric$1 as a$,Fragment as a0,Kind as a1,AlertElement$1 as a2,Video$1 as a3,keyframes as a4,StyledWidgetInstructions as a5,isFromMac as a6,FormsContext as a7,StyledFormSubmitContent as a8,Form$1 as a9,IsSidebarContext as aA,LabelVisibilityOptions as aB,React as aC,find as aD,parse$1 as aE,parse$2 as aF,normalize$1 as aG,html$2 as aH,svg as aI,useCopyToClipboard as aJ,ACCESSIBILITY_TYPE as aK,Popover$2 as aL,ensureError as aM,ErrorElement as aN,hexToRgb as aO,withWrapper as aP,__vitePreload as aQ,convertRemToPx as aR,blend as aS,SetCache as aT,cacheHas as aU,baseRest as aV,isArrayLikeObject as aW,useSelectCommon as aX,Select as aY,VirtualDropdown as aZ,TYPE as a_,isInForm as aa,WidgetLabelHelpIcon as ab,WidgetLabel as ac,isMaterialIcon as ad,getBorderColor as ae,TextInput$1 as af,getDefaultExportFromCjs as ag,darken as ah,getPrimaryFocusBoxShadow as ai,PortalContext as aj,reactDomExports as ak,classNames as al,requireReact as am,styled$1 as an,isFocusVisible as ao,getOverride as ap,getOverrideProps as aq,root$4 as ar,toNumber as as,isObject$1 as at,mergeOverrides as au,CUSTOM_INPUT_TYPE as av,ChevronDown$1 as aw,PLACEMENT as ax,Icon$2 as ay,Tooltip$1 as az,BaseButton as b,util_int_ as b$,transparentize as b0,StyledWidgetLabel as b1,Global as b2,getCrossOriginAttribute as b3,_arrayLikeToArray as b4,_unsupportedIterableToArray as b5,ViewStateContext as b6,useWindowDimensionsContext as b7,LocaleContext as b8,shouldWidthStretch as b9,ComponentRegistry as bA,__awaiter as bB,PropTypes as bC,isFromWindows as bD,requirePropTypes as bE,merge$1 as bF,getIncreasingGreen as bG,getDecreasingRed as bH,getBlue80 as bI,getGray30 as bJ,getGray70 as bK,getGray90 as bL,getDivergingColorsArray as bM,keysToSnakeCase as bN,PlotlyChart$1 as bO,themeColors as bP,isMobile as bQ,UploadedFileInfo as bR,FileUploaderState as bS,ThemeContext$1 as bT,pick$1 as bU,Slider$1 as bV,zip as bW,baseSlice as bX,baseToString as bY,trimmedEndIndex as bZ,util_bn_ as b_,ButtonGroup$1 as ba,LabelVisibilityMessage as bb,StyledButtonGroup as bc,NumberInput$1 as bd,isDatetimeType as be,isDateType as bf,getTimezone as bg,debounce$2 as bh,isEqual$1 as bi,shouldHeightStretch as bj,useStyletron as bk,mergeOverride as bl,toObjectOverride as bm,Icon$1 as bn,DeleteAlt$1 as bo,forkBlur as bp,forkFocus as bq,addCssUnit as br,convert as bs,visitParents as bt,SKIP as bu,toExportedTheme as bv,ArrowDataframe as bw,useTimeout as bx,Skeleton$1 as by,Skeleton as bz,BaseButtonSize as c,_createClass as c$,util_bit_ as c0,util_math_ as c1,util_buffer_ as c2,util_vector_ as c3,util_pretty_ as c4,util_interval_ as c5,compareTypes as c6,compareFields as c7,compareSchemas as c8,getAugmentedNamespace as c9,ok as cA,stringify$1 as cB,stringify as cC,pointStart as cD,visit as cE,pointEnd as cF,structuredClone$1 as cG,identity as cH,arrayEach as cI,baseEach as cJ,isArray$1 as cK,arrayMap as cL,baseMap as cM,baseIteratee as cN,baseForOwn as cO,isObjectLike as cP,baseGetTag as cQ,isPlainObject$3 as cR,cloneDeep$1 as cS,useExecuteWhenChanged as cT,StatefulPopover as cU,_typeof$e as cV,_inherits as cW,_createSuper as cX,_classCallCheck as cY,_defineProperty$s as cZ,_assertThisInitialized as c_,isStringType as ca,isTimeType as cb,isPeriodType as cc,isIntervalType as cd,isDurationType as ce,isDecimalType as cf,isFloatType as cg,isObjectType as ch,isListType as ci,TimeUnit as cj,Struct as ck,ThemeProvider$1 as cl,createThemedStyled as cm,createThemedUseStyletron as cn,createThemedWithStyle as co,expandBorderStyles as cp,withStyle as cq,requireReactIs$1 as cr,AcceptFileValue as cs,assertNever as ct,chatInputAcceptFileProtoValueToEnum as cu,tableFromIPC as cv,v4 as cw,requireReactDom as cx,UIDConsumer as cy,StatefulMenu as cz,Box as d,filterOptions as d0,mergeWith as d1,parseEntities as d2,StyledPre as d3,CopyButton$1 as d4,StyledCopyButtonContainer as d5,StyledCodeBlock as d6,propTypesExports as d7,_slicedToArray as d8,index as d9,Field as dA,Null as dB,isRangeIndexType as dC,isEmptyType as dD,isBytesType as dE,isCategoricalType as dF,fontSizes as dG,_objectWithoutProperties$1 as dH,_objectSpread2 as dI,jsx as dJ,css as dK,lighten as dL,mix$1 as dM,TRIGGER_TYPE as dN,StyledTooltipContentWrapper as dO,FlexContext as dP,useScrollbarGutterSize as dQ,Resizable as dR,_getPrototypeOf as da,_possibleConstructorReturn as db,parseToRgba as dc,DeckGlJsonChart$1 as dd,hasPath as de,isArrayLike as df,isBuffer as dg,isTypedArray as dh,isArguments as di,getTag as dj,isPrototype as dk,baseKeys as dl,Set$1 as dm,setToArray as dn,requireClassnames as dp,groupBy as dq,flatten as dr,Vector as ds,getLuminance as dt,parseIconPackEntry as du,genericFonts as dv,getMarkdownBgColors as dw,isUnsignedIntegerType as dx,isIntegerType as dy,isBooleanType as dz,isNullOrUndefined as e,StyledWidgetLabelHelpInline as f,getHelpTooltipAriaLabel as g,hoistNonReactStatics as h,isValidFormId as i,jsx$1 as j,useCalculatedDimensions as k,useEmotionTheme as l,hasLightBackgroundColor as m,notNullOrUndefined as n,jsxs as o,labelVisibilityProtoValueToEnum as p,StreamlitMarkdown$1 as q,reactExports as r,streamlit as s,StyledContent as t,useRegisterShortcut as u,getFocusBoxShadow as v,StyledCheckbox$1 as w,getOverrides as x,SIZE$1 as y,ENHANCER_POSITION as z};
|