streamlit-nightly 1.42.1.dev20250205__py2.py3-none-any.whl → 1.42.1.dev20250208__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. streamlit/auth_util.py +8 -0
  2. streamlit/config.py +18 -1
  3. streamlit/proto/NewSession_pb2.pyi +4 -1
  4. streamlit/runtime/app_session.py +35 -15
  5. streamlit/runtime/caching/cache_utils.py +1 -1
  6. streamlit/static/index.html +1 -1
  7. streamlit/static/static/js/{FileDownload.esm.ShSIWsKj.js → FileDownload.esm.D9415avj.js} +1 -1
  8. streamlit/static/static/js/FileDropzone.Cd515bsy.js +5 -0
  9. streamlit/static/static/js/{FormClearHelper.Bue0QSIn.js → FormClearHelper.BBpErIGP.js} +1 -1
  10. streamlit/static/static/js/{Hooks.kV16_k1-.js → Hooks.CeSTXIj2.js} +1 -1
  11. streamlit/static/static/js/{InputInstructions.DpG38kbY.js → InputInstructions.BU5Td5cJ.js} +1 -1
  12. streamlit/static/static/js/{ProgressBar.B_WJAIyy.js → ProgressBar.J2QhvKtD.js} +1 -1
  13. streamlit/static/static/js/{RenderInPortalIfExists.CGAGPcQq.js → RenderInPortalIfExists.BbbrvJaa.js} +1 -1
  14. streamlit/static/static/js/{Toolbar.DBtrI961.js → Toolbar.D-hUr0RX.js} +1 -1
  15. streamlit/static/static/js/{base-input.P8VGAZdC.js → base-input.CNkkCv4B.js} +1 -1
  16. streamlit/static/static/js/{createSuper.GYQHnroV.js → createSuper.DHhKMTIx.js} +1 -1
  17. streamlit/static/static/js/{data-grid-overlay-editor.B1sLTR3f.js → data-grid-overlay-editor.CRylpesE.js} +1 -1
  18. streamlit/static/static/js/{downloader.y-Ssi2d3.js → downloader.D_08g5mI.js} +1 -1
  19. streamlit/static/static/js/{es6.DpUKmjxe.js → es6.B-Rq6ajt.js} +2 -2
  20. streamlit/static/static/js/{iframeResizer.contentWindow.BBjdpeP0.js → iframeResizer.contentWindow.CFL3MAVr.js} +1 -1
  21. streamlit/static/static/js/{index.C-BkiutF.js → index.-SmXSkUY.js} +1 -1
  22. streamlit/static/static/js/{index.DuqdUleB.js → index.9wBA4A4f.js} +5 -5
  23. streamlit/static/static/js/{index.D-Qsohh0.js → index.B-4MHYvl.js} +1 -1
  24. streamlit/static/static/js/{index.B7AJyWjy.js → index.B0xfT3p4.js} +1 -1
  25. streamlit/static/static/js/{index.BqiT_qyM.js → index.B2evntzQ.js} +1 -1
  26. streamlit/static/static/js/{index.D_CViY1G.js → index.B9q8XlSH.js} +1 -1
  27. streamlit/static/static/js/{index.Cd8_b4vi.js → index.BA5ubsQA.js} +1 -1
  28. streamlit/static/static/js/{index.CC_i5fnL.js → index.BCYuLMdi.js} +1 -1
  29. streamlit/static/static/js/{index.CVIsVMt0.js → index.BNrZwkh1.js} +1 -1
  30. streamlit/static/static/js/{index.DdJR-Re7.js → index.BVbWPXFU.js} +1 -1
  31. streamlit/static/static/js/{index.CZFA90VV.js → index.BevO9CYu.js} +2 -2
  32. streamlit/static/static/js/{index.C73Hi-mL.js → index.BlcNB-sY.js} +1 -1
  33. streamlit/static/static/js/{index.BVkJfCWM.js → index.BpmrfDoR.js} +1 -1
  34. streamlit/static/static/js/{index.OWYUy0bC.js → index.BqePTNWb.js} +1 -1
  35. streamlit/static/static/js/{index.DdaoJ1WZ.js → index.Bw9RDCaH.js} +2 -2
  36. streamlit/static/static/js/{index.B11A7C7I.js → index.C-_AHUSz.js} +1 -1
  37. streamlit/static/static/js/{index.CAQGqUJ5.js → index.CEWcZMdD.js} +1 -1
  38. streamlit/static/static/js/{index.BRsob9Jp.js → index.CEj-S3PF.js} +1 -1
  39. streamlit/static/static/js/{index.Cp60C2LQ.js → index.CFtAnwvU.js} +1 -1
  40. streamlit/static/static/js/{index.C8vyFGOc.js → index.CMcCB4vg.js} +1 -1
  41. streamlit/static/static/js/{index.D7HtU_R4.js → index.CQ_wmqnz.js} +1 -1
  42. streamlit/static/static/js/{index.CUzW8sZB.js → index.CuNiy4LB.js} +1 -1
  43. streamlit/static/static/js/index.CvADzqCD.js +1 -0
  44. streamlit/static/static/js/{index.2bJmI0Ih.js → index.D94jjl7_.js} +1 -1
  45. streamlit/static/static/js/{index.D2i6l9uv.js → index.D9M0iUu5.js} +1 -1
  46. streamlit/static/static/js/{index.DsOZJLyF.js → index.DPs04g4h.js} +1 -1
  47. streamlit/static/static/js/{index.DHOnt3Rd.js → index.DWIf4xZP.js} +1 -1
  48. streamlit/static/static/js/{index.GZ99DH1Q.js → index.DYHaq5Cw.js} +22 -22
  49. streamlit/static/static/js/{index.DNKGONSt.js → index.DfCewjMv.js} +1 -1
  50. streamlit/static/static/js/{index.3k422wEU.js → index.DgwklVRJ.js} +1 -1
  51. streamlit/static/static/js/{index.D3PlNa4T.js → index.DwWMkgFE.js} +1 -1
  52. streamlit/static/static/js/{index.CIkzV9zP.js → index.JSS70wsq.js} +1 -1
  53. streamlit/static/static/js/{index.B7aeIxns.js → index.Yr32ts47.js} +1 -1
  54. streamlit/static/static/js/{index.CoJayF2l.js → index.i2uLxrqv.js} +1 -1
  55. streamlit/static/static/js/{index.BW_6EVtw.js → index.joQNIDux.js} +1 -1
  56. streamlit/static/static/js/{index.USVf5VUT.js → index.pzjWTi64.js} +1 -1
  57. streamlit/static/static/js/{index.Bkk4sBLz.js → index.zzxJWhBg.js} +1 -1
  58. streamlit/static/static/js/{input.BANuQoGH.js → input.Dbc83Str.js} +1 -1
  59. streamlit/static/static/js/{memory.DTxlMbK7.js → memory.BzHgTb9i.js} +1 -1
  60. streamlit/static/static/js/{mergeWith.CfihrnQo.js → mergeWith.BCa1_PWb.js} +1 -1
  61. streamlit/static/static/js/{number-overlay-editor.BHsEp8VL.js → number-overlay-editor.CtUWknLp.js} +1 -1
  62. streamlit/static/static/js/{possibleConstructorReturn.BErM7qST.js → possibleConstructorReturn.DGVrr2j8.js} +1 -1
  63. streamlit/static/static/js/{sandbox.BMuVLu80.js → sandbox.C20zasAf.js} +1 -1
  64. streamlit/static/static/js/{textarea.CmSZv6UE.js → textarea.BeRVLTOp.js} +1 -1
  65. streamlit/static/static/js/{timepicker.DsaAj0da.js → timepicker.DyU-jgSC.js} +1 -1
  66. streamlit/static/static/js/{toConsumableArray.DJs7oxRq.js → toConsumableArray.D4FxxWIg.js} +1 -1
  67. streamlit/static/static/js/{uniqueId.CVe3uxKs.js → uniqueId.CAAlIP1-.js} +1 -1
  68. streamlit/static/static/js/{useBasicWidgetState.D572sX2t.js → useBasicWidgetState.C207Y3_O.js} +1 -1
  69. streamlit/static/static/js/{useOnInputChange.D9rTVyjn.js → useOnInputChange.CsqRc0X0.js} +1 -1
  70. streamlit/static/static/js/{withFullScreenWrapper.4QDrgZxA.js → withFullScreenWrapper.DwHjQb3H.js} +1 -1
  71. {streamlit_nightly-1.42.1.dev20250205.dist-info → streamlit_nightly-1.42.1.dev20250208.dist-info}/METADATA +1 -1
  72. {streamlit_nightly-1.42.1.dev20250205.dist-info → streamlit_nightly-1.42.1.dev20250208.dist-info}/RECORD +76 -76
  73. streamlit/static/static/js/FileDropzone.BFkJKygp.js +0 -5
  74. streamlit/static/static/js/index.CIwUls4J.js +0 -1
  75. {streamlit_nightly-1.42.1.dev20250205.data → streamlit_nightly-1.42.1.dev20250208.data}/scripts/streamlit.cmd +0 -0
  76. {streamlit_nightly-1.42.1.dev20250205.dist-info → streamlit_nightly-1.42.1.dev20250208.dist-info}/WHEEL +0 -0
  77. {streamlit_nightly-1.42.1.dev20250205.dist-info → streamlit_nightly-1.42.1.dev20250208.dist-info}/entry_points.txt +0 -0
  78. {streamlit_nightly-1.42.1.dev20250205.dist-info → streamlit_nightly-1.42.1.dev20250208.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.CUzW8sZB.js","./RenderInPortalIfExists.CGAGPcQq.js","./index.C73Hi-mL.js","./index.GZ99DH1Q.js","./FormClearHelper.Bue0QSIn.js","./withFullScreenWrapper.4QDrgZxA.js","./Toolbar.DBtrI961.js","./mergeWith.CfihrnQo.js","./sprintf.C-r3gIuM.js","./createDownloadLinkElement.DZMwyjvU.js","./toConsumableArray.DJs7oxRq.js","./possibleConstructorReturn.BErM7qST.js","./createSuper.GYQHnroV.js","./FileDownload.esm.ShSIWsKj.js","../css/index.Bmkmz40k.css","./index.C8vyFGOc.js","./threshold.B8r8f5kt.js","./value.iufjd77T.js","./timer.RueuYoQV.js","./index.B11A7C7I.js","./useBasicWidgetState.D572sX2t.js","./axios.upsvKRUO.js","../css/index.DzuxGC_t.css","./index.CAQGqUJ5.js","./index.Cd8_b4vi.js","./index.2bJmI0Ih.js","./index.DdaoJ1WZ.js","./Hooks.kV16_k1-.js","./index.CIkzV9zP.js","./index.BW_6EVtw.js","./index.Bkk4sBLz.js","./UploadFileInfo.C-jY39rj.js","./ProgressBar.B_WJAIyy.js","./index.BRsob9Jp.js","./FileDropzone.BFkJKygp.js","./InputInstructions.DpG38kbY.js","./inputUtils.CQWz5UKz.js","./textarea.CmSZv6UE.js","./base-input.P8VGAZdC.js","./index.CZFA90VV.js","./index.DNKGONSt.js","./index.BqiT_qyM.js","./timepicker.DsaAj0da.js","./input.BANuQoGH.js","./index.D3PlNa4T.js","./index.D-Qsohh0.js","./index.CC_i5fnL.js","./index.C-BkiutF.js","./index.OWYUy0bC.js","./index.D2i6l9uv.js","./index.DdJR-Re7.js","./uniqueId.CVe3uxKs.js","./useOnInputChange.D9rTVyjn.js","./index.USVf5VUT.js","./index.B7AJyWjy.js","./index.CIwUls4J.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index.CuNiy4LB.js","./RenderInPortalIfExists.BbbrvJaa.js","./index.BlcNB-sY.js","./index.DYHaq5Cw.js","./FormClearHelper.BBpErIGP.js","./withFullScreenWrapper.DwHjQb3H.js","./Toolbar.D-hUr0RX.js","./mergeWith.BCa1_PWb.js","./sprintf.C-r3gIuM.js","./createDownloadLinkElement.DZMwyjvU.js","./toConsumableArray.D4FxxWIg.js","./possibleConstructorReturn.DGVrr2j8.js","./createSuper.DHhKMTIx.js","./FileDownload.esm.D9415avj.js","../css/index.Bmkmz40k.css","./index.CMcCB4vg.js","./threshold.B8r8f5kt.js","./value.iufjd77T.js","./timer.RueuYoQV.js","./index.C-_AHUSz.js","./useBasicWidgetState.C207Y3_O.js","./axios.upsvKRUO.js","../css/index.DzuxGC_t.css","./index.CEWcZMdD.js","./index.BA5ubsQA.js","./index.D94jjl7_.js","./index.Bw9RDCaH.js","./Hooks.CeSTXIj2.js","./index.JSS70wsq.js","./index.joQNIDux.js","./index.zzxJWhBg.js","./UploadFileInfo.C-jY39rj.js","./ProgressBar.J2QhvKtD.js","./index.CEj-S3PF.js","./FileDropzone.Cd515bsy.js","./InputInstructions.BU5Td5cJ.js","./inputUtils.CQWz5UKz.js","./textarea.BeRVLTOp.js","./base-input.CNkkCv4B.js","./index.BevO9CYu.js","./index.DfCewjMv.js","./index.B2evntzQ.js","./timepicker.DyU-jgSC.js","./input.Dbc83Str.js","./index.DwWMkgFE.js","./index.B-4MHYvl.js","./index.BCYuLMdi.js","./index.-SmXSkUY.js","./index.BqePTNWb.js","./index.D9M0iUu5.js","./index.BVbWPXFU.js","./uniqueId.CAAlIP1-.js","./useOnInputChange.CsqRc0X0.js","./index.pzjWTi64.js","./index.B0xfT3p4.js","./index.CvADzqCD.js"])))=>i.map(i=>d[i]);
2
2
  var E0=Object.defineProperty;var l0=rt=>{throw TypeError(rt)};var S0=(rt,tt,et)=>tt in rt?E0(rt,tt,{enumerable:!0,configurable:!0,writable:!0,value:et}):rt[tt]=et;var fo=(rt,tt,et)=>S0(rt,typeof tt!="symbol"?tt+"":tt,et),xa=(rt,tt,et)=>tt.has(rt)||l0("Cannot "+et);var xr=(rt,tt,et)=>(xa(rt,tt,"read from private field"),et?et.call(rt):tt.get(rt)),xn=(rt,tt,et)=>tt.has(rt)?l0("Cannot add the same private member more than once"):tt instanceof WeakSet?tt.add(rt):tt.set(rt,et),Cn=(rt,tt,et,nt)=>(xa(rt,tt,"write to private field"),nt?nt.call(rt,et):tt.set(rt,et),et),Wr=(rt,tt,et)=>(xa(rt,tt,"access private method"),et);function _mergeNamespaces(rt,tt){for(var et=0;et<tt.length;et++){const nt=tt[et];if(typeof nt!="string"&&!Array.isArray(nt)){for(const ot in nt)if(ot!=="default"&&!(ot in rt)){const at=Object.getOwnPropertyDescriptor(nt,ot);at&&Object.defineProperty(rt,ot,at.get?at:{enumerable:!0,get:()=>nt[ot]})}}}return Object.freeze(Object.defineProperty(rt,Symbol.toStringTag,{value:"Module"}))}(function(){const tt=document.createElement("link").relList;if(tt&&tt.supports&&tt.supports("modulepreload"))return;for(const ot of document.querySelectorAll('link[rel="modulepreload"]'))nt(ot);new MutationObserver(ot=>{for(const at of ot)if(at.type==="childList")for(const st of at.addedNodes)st.tagName==="LINK"&&st.rel==="modulepreload"&&nt(st)}).observe(document,{childList:!0,subtree:!0});function et(ot){const at={};return ot.integrity&&(at.integrity=ot.integrity),ot.referrerPolicy&&(at.referrerPolicy=ot.referrerPolicy),ot.crossOrigin==="use-credentials"?at.credentials="include":ot.crossOrigin==="anonymous"?at.credentials="omit":at.credentials="same-origin",at}function nt(ot){if(ot.ep)return;ot.ep=!0;const at=et(ot);fetch(ot.href,at)}})();var commonjsGlobal$2=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs$1(rt){return rt&&rt.__esModule&&Object.prototype.hasOwnProperty.call(rt,"default")?rt.default:rt}function getAugmentedNamespace(rt){if(rt.__esModule)return rt;var tt=rt.default;if(typeof tt=="function"){var et=function nt(){return this instanceof nt?Reflect.construct(tt,arguments,this.constructor):tt.apply(this,arguments)};et.prototype=tt.prototype}else et={};return Object.defineProperty(et,"__esModule",{value:!0}),Object.keys(rt).forEach(function(nt){var ot=Object.getOwnPropertyDescriptor(rt,nt);Object.defineProperty(et,nt,ot.get?ot:{enumerable:!0,get:function(){return rt[nt]}})}),et}var jsxRuntime={exports:{}},reactJsxRuntime_production_min={},react={exports:{}},react_production_min={};/**
3
3
  * @license React
4
4
  * react.production.min.js
@@ -96,7 +96,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
96
96
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
97
97
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
98
98
  * SOFTWARE.
99
- */var isBrowser$1=typeof window<"u"&&typeof document<"u"&&typeof navigator<"u",timeoutDuration=function(){for(var rt=["Edge","Trident","Firefox"],tt=0;tt<rt.length;tt+=1)if(isBrowser$1&&navigator.userAgent.indexOf(rt[tt])>=0)return 1;return 0}();function microtaskDebounce(rt){var tt=!1;return function(){tt||(tt=!0,window.Promise.resolve().then(function(){tt=!1,rt()}))}}function taskDebounce(rt){var tt=!1;return function(){tt||(tt=!0,setTimeout(function(){tt=!1,rt()},timeoutDuration))}}var supportsMicroTasks=isBrowser$1&&window.Promise,debounce$3=supportsMicroTasks?microtaskDebounce:taskDebounce;function isFunction$4(rt){var tt={};return rt&&tt.toString.call(rt)==="[object Function]"}function getStyleComputedProperty(rt,tt){if(rt.nodeType!==1)return[];var et=rt.ownerDocument.defaultView,nt=et.getComputedStyle(rt,null);return tt?nt[tt]:nt}function getParentNode$1(rt){return rt.nodeName==="HTML"?rt:rt.parentNode||rt.host}function getScrollParent(rt){if(!rt)return document.body;switch(rt.nodeName){case"HTML":case"BODY":return rt.ownerDocument.body;case"#document":return rt.body}var tt=getStyleComputedProperty(rt),et=tt.overflow,nt=tt.overflowX,ot=tt.overflowY;return/(auto|scroll|overlay)/.test(et+ot+nt)?rt:getScrollParent(getParentNode$1(rt))}function getReferenceNode(rt){return rt&&rt.referenceNode?rt.referenceNode:rt}var isIE11=isBrowser$1&&!!(window.MSInputMethodContext&&document.documentMode),isIE10=isBrowser$1&&/MSIE 10/.test(navigator.userAgent);function isIE$1(rt){return rt===11?isIE11:rt===10?isIE10:isIE11||isIE10}function getOffsetParent(rt){if(!rt)return document.documentElement;for(var tt=isIE$1(10)?document.body:null,et=rt.offsetParent||null;et===tt&&rt.nextElementSibling;)et=(rt=rt.nextElementSibling).offsetParent;var nt=et&&et.nodeName;return!nt||nt==="BODY"||nt==="HTML"?rt?rt.ownerDocument.documentElement:document.documentElement:["TH","TD","TABLE"].indexOf(et.nodeName)!==-1&&getStyleComputedProperty(et,"position")==="static"?getOffsetParent(et):et}function isOffsetContainer(rt){var tt=rt.nodeName;return tt==="BODY"?!1:tt==="HTML"||getOffsetParent(rt.firstElementChild)===rt}function getRoot(rt){return rt.parentNode!==null?getRoot(rt.parentNode):rt}function findCommonOffsetParent(rt,tt){if(!rt||!rt.nodeType||!tt||!tt.nodeType)return document.documentElement;var et=rt.compareDocumentPosition(tt)&Node.DOCUMENT_POSITION_FOLLOWING,nt=et?rt:tt,ot=et?tt:rt,at=document.createRange();at.setStart(nt,0),at.setEnd(ot,0);var st=at.commonAncestorContainer;if(rt!==st&&tt!==st||nt.contains(ot))return isOffsetContainer(st)?st:getOffsetParent(st);var ut=getRoot(rt);return ut.host?findCommonOffsetParent(ut.host,tt):findCommonOffsetParent(rt,getRoot(tt).host)}function getScroll(rt){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"top",et=tt==="top"?"scrollTop":"scrollLeft",nt=rt.nodeName;if(nt==="BODY"||nt==="HTML"){var ot=rt.ownerDocument.documentElement,at=rt.ownerDocument.scrollingElement||ot;return at[et]}return rt[et]}function includeScroll(rt,tt){var et=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,nt=getScroll(tt,"top"),ot=getScroll(tt,"left"),at=et?-1:1;return rt.top+=nt*at,rt.bottom+=nt*at,rt.left+=ot*at,rt.right+=ot*at,rt}function getBordersSize(rt,tt){var et=tt==="x"?"Left":"Top",nt=et==="Left"?"Right":"Bottom";return parseFloat(rt["border"+et+"Width"])+parseFloat(rt["border"+nt+"Width"])}function getSize(rt,tt,et,nt){return Math.max(tt["offset"+rt],tt["scroll"+rt],et["client"+rt],et["offset"+rt],et["scroll"+rt],isIE$1(10)?parseInt(et["offset"+rt])+parseInt(nt["margin"+(rt==="Height"?"Top":"Left")])+parseInt(nt["margin"+(rt==="Height"?"Bottom":"Right")]):0)}function getWindowSizes(rt){var tt=rt.body,et=rt.documentElement,nt=isIE$1(10)&&getComputedStyle(et);return{height:getSize("Height",tt,et,nt),width:getSize("Width",tt,et,nt)}}var classCallCheck$1=function(rt,tt){if(!(rt instanceof tt))throw new TypeError("Cannot call a class as a function")},createClass$2=function(){function rt(tt,et){for(var nt=0;nt<et.length;nt++){var ot=et[nt];ot.enumerable=ot.enumerable||!1,ot.configurable=!0,"value"in ot&&(ot.writable=!0),Object.defineProperty(tt,ot.key,ot)}}return function(tt,et,nt){return et&&rt(tt.prototype,et),nt&&rt(tt,nt),tt}}(),defineProperty$4=function(rt,tt,et){return tt in rt?Object.defineProperty(rt,tt,{value:et,enumerable:!0,configurable:!0,writable:!0}):rt[tt]=et,rt},_extends$K=Object.assign||function(rt){for(var tt=1;tt<arguments.length;tt++){var et=arguments[tt];for(var nt in et)Object.prototype.hasOwnProperty.call(et,nt)&&(rt[nt]=et[nt])}return rt};function getClientRect(rt){return _extends$K({},rt,{right:rt.left+rt.width,bottom:rt.top+rt.height})}function getBoundingClientRect(rt){var tt={};try{if(isIE$1(10)){tt=rt.getBoundingClientRect();var et=getScroll(rt,"top"),nt=getScroll(rt,"left");tt.top+=et,tt.left+=nt,tt.bottom+=et,tt.right+=nt}else tt=rt.getBoundingClientRect()}catch{}var ot={left:tt.left,top:tt.top,width:tt.right-tt.left,height:tt.bottom-tt.top},at=rt.nodeName==="HTML"?getWindowSizes(rt.ownerDocument):{},st=at.width||rt.clientWidth||ot.width,ut=at.height||rt.clientHeight||ot.height,ct=rt.offsetWidth-st,pt=rt.offsetHeight-ut;if(ct||pt){var dt=getStyleComputedProperty(rt);ct-=getBordersSize(dt,"x"),pt-=getBordersSize(dt,"y"),ot.width-=ct,ot.height-=pt}return getClientRect(ot)}function getOffsetRectRelativeToArbitraryNode(rt,tt){var et=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,nt=isIE$1(10),ot=tt.nodeName==="HTML",at=getBoundingClientRect(rt),st=getBoundingClientRect(tt),ut=getScrollParent(rt),ct=getStyleComputedProperty(tt),pt=parseFloat(ct.borderTopWidth),dt=parseFloat(ct.borderLeftWidth);et&&ot&&(st.top=Math.max(st.top,0),st.left=Math.max(st.left,0));var ft=getClientRect({top:at.top-st.top-pt,left:at.left-st.left-dt,width:at.width,height:at.height});if(ft.marginTop=0,ft.marginLeft=0,!nt&&ot){var bt=parseFloat(ct.marginTop),ht=parseFloat(ct.marginLeft);ft.top-=pt-bt,ft.bottom-=pt-bt,ft.left-=dt-ht,ft.right-=dt-ht,ft.marginTop=bt,ft.marginLeft=ht}return(nt&&!et?tt.contains(ut):tt===ut&&ut.nodeName!=="BODY")&&(ft=includeScroll(ft,tt)),ft}function getViewportOffsetRectRelativeToArtbitraryNode(rt){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,et=rt.ownerDocument.documentElement,nt=getOffsetRectRelativeToArbitraryNode(rt,et),ot=Math.max(et.clientWidth,window.innerWidth||0),at=Math.max(et.clientHeight,window.innerHeight||0),st=tt?0:getScroll(et),ut=tt?0:getScroll(et,"left"),ct={top:st-nt.top+nt.marginTop,left:ut-nt.left+nt.marginLeft,width:ot,height:at};return getClientRect(ct)}function isFixed$1(rt){var tt=rt.nodeName;if(tt==="BODY"||tt==="HTML")return!1;if(getStyleComputedProperty(rt,"position")==="fixed")return!0;var et=getParentNode$1(rt);return et?isFixed$1(et):!1}function getFixedPositionOffsetParent(rt){if(!rt||!rt.parentElement||isIE$1())return document.documentElement;for(var tt=rt.parentElement;tt&&getStyleComputedProperty(tt,"transform")==="none";)tt=tt.parentElement;return tt||document.documentElement}function getBoundaries(rt,tt,et,nt){var ot=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,at={top:0,left:0},st=ot?getFixedPositionOffsetParent(rt):findCommonOffsetParent(rt,getReferenceNode(tt));if(nt==="viewport")at=getViewportOffsetRectRelativeToArtbitraryNode(st,ot);else{var ut=void 0;nt==="scrollParent"?(ut=getScrollParent(getParentNode$1(tt)),ut.nodeName==="BODY"&&(ut=rt.ownerDocument.documentElement)):nt==="window"?ut=rt.ownerDocument.documentElement:ut=nt;var ct=getOffsetRectRelativeToArbitraryNode(ut,st,ot);if(ut.nodeName==="HTML"&&!isFixed$1(st)){var pt=getWindowSizes(rt.ownerDocument),dt=pt.height,ft=pt.width;at.top+=ct.top-ct.marginTop,at.bottom=dt+ct.top,at.left+=ct.left-ct.marginLeft,at.right=ft+ct.left}else at=ct}et=et||0;var bt=typeof et=="number";return at.left+=bt?et:et.left||0,at.top+=bt?et:et.top||0,at.right-=bt?et:et.right||0,at.bottom-=bt?et:et.bottom||0,at}function getArea(rt){var tt=rt.width,et=rt.height;return tt*et}function computeAutoPlacement(rt,tt,et,nt,ot){var at=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0;if(rt.indexOf("auto")===-1)return rt;var st=getBoundaries(et,nt,at,ot),ut={top:{width:st.width,height:tt.top-st.top},right:{width:st.right-tt.right,height:st.height},bottom:{width:st.width,height:st.bottom-tt.bottom},left:{width:tt.left-st.left,height:st.height}},ct=Object.keys(ut).map(function(bt){return _extends$K({key:bt},ut[bt],{area:getArea(ut[bt])})}).sort(function(bt,ht){return ht.area-bt.area}),pt=ct.filter(function(bt){var ht=bt.width,mt=bt.height;return ht>=et.clientWidth&&mt>=et.clientHeight}),dt=pt.length>0?pt[0].key:ct[0].key,ft=rt.split("-")[1];return dt+(ft?"-"+ft:"")}function getReferenceOffsets(rt,tt,et){var nt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,ot=nt?getFixedPositionOffsetParent(tt):findCommonOffsetParent(tt,getReferenceNode(et));return getOffsetRectRelativeToArbitraryNode(et,ot,nt)}function getOuterSizes(rt){var tt=rt.ownerDocument.defaultView,et=tt.getComputedStyle(rt),nt=parseFloat(et.marginTop||0)+parseFloat(et.marginBottom||0),ot=parseFloat(et.marginLeft||0)+parseFloat(et.marginRight||0),at={width:rt.offsetWidth+ot,height:rt.offsetHeight+nt};return at}function getOppositePlacement(rt){var tt={left:"right",right:"left",bottom:"top",top:"bottom"};return rt.replace(/left|right|bottom|top/g,function(et){return tt[et]})}function getPopperOffsets(rt,tt,et){et=et.split("-")[0];var nt=getOuterSizes(rt),ot={width:nt.width,height:nt.height},at=["right","left"].indexOf(et)!==-1,st=at?"top":"left",ut=at?"left":"top",ct=at?"height":"width",pt=at?"width":"height";return ot[st]=tt[st]+tt[ct]/2-nt[ct]/2,et===ut?ot[ut]=tt[ut]-nt[pt]:ot[ut]=tt[getOppositePlacement(ut)],ot}function find$1(rt,tt){return Array.prototype.find?rt.find(tt):rt.filter(tt)[0]}function findIndex(rt,tt,et){if(Array.prototype.findIndex)return rt.findIndex(function(ot){return ot[tt]===et});var nt=find$1(rt,function(ot){return ot[tt]===et});return rt.indexOf(nt)}function runModifiers(rt,tt,et){var nt=et===void 0?rt:rt.slice(0,findIndex(rt,"name",et));return nt.forEach(function(ot){ot.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var at=ot.function||ot.fn;ot.enabled&&isFunction$4(at)&&(tt.offsets.popper=getClientRect(tt.offsets.popper),tt.offsets.reference=getClientRect(tt.offsets.reference),tt=at(tt,ot))}),tt}function update(){if(!this.state.isDestroyed){var rt={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};rt.offsets.reference=getReferenceOffsets(this.state,this.popper,this.reference,this.options.positionFixed),rt.placement=computeAutoPlacement(this.options.placement,rt.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),rt.originalPlacement=rt.placement,rt.positionFixed=this.options.positionFixed,rt.offsets.popper=getPopperOffsets(this.popper,rt.offsets.reference,rt.placement),rt.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",rt=runModifiers(this.modifiers,rt),this.state.isCreated?this.options.onUpdate(rt):(this.state.isCreated=!0,this.options.onCreate(rt))}}function isModifierEnabled(rt,tt){return rt.some(function(et){var nt=et.name,ot=et.enabled;return ot&&nt===tt})}function getSupportedPropertyName(rt){for(var tt=[!1,"ms","Webkit","Moz","O"],et=rt.charAt(0).toUpperCase()+rt.slice(1),nt=0;nt<tt.length;nt++){var ot=tt[nt],at=ot?""+ot+et:rt;if(typeof document.body.style[at]<"u")return at}return null}function destroy(){return this.state.isDestroyed=!0,isModifierEnabled(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[getSupportedPropertyName("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function getWindow(rt){var tt=rt.ownerDocument;return tt?tt.defaultView:window}function attachToScrollParents(rt,tt,et,nt){var ot=rt.nodeName==="BODY",at=ot?rt.ownerDocument.defaultView:rt;at.addEventListener(tt,et,{passive:!0}),ot||attachToScrollParents(getScrollParent(at.parentNode),tt,et,nt),nt.push(at)}function setupEventListeners(rt,tt,et,nt){et.updateBound=nt,getWindow(rt).addEventListener("resize",et.updateBound,{passive:!0});var ot=getScrollParent(rt);return attachToScrollParents(ot,"scroll",et.updateBound,et.scrollParents),et.scrollElement=ot,et.eventsEnabled=!0,et}function enableEventListeners(){this.state.eventsEnabled||(this.state=setupEventListeners(this.reference,this.options,this.state,this.scheduleUpdate))}function removeEventListeners(rt,tt){return getWindow(rt).removeEventListener("resize",tt.updateBound),tt.scrollParents.forEach(function(et){et.removeEventListener("scroll",tt.updateBound)}),tt.updateBound=null,tt.scrollParents=[],tt.scrollElement=null,tt.eventsEnabled=!1,tt}function disableEventListeners(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=removeEventListeners(this.reference,this.state))}function isNumeric(rt){return rt!==""&&!isNaN(parseFloat(rt))&&isFinite(rt)}function setStyles(rt,tt){Object.keys(tt).forEach(function(et){var nt="";["width","height","top","right","bottom","left"].indexOf(et)!==-1&&isNumeric(tt[et])&&(nt="px"),rt.style[et]=tt[et]+nt})}function setAttributes(rt,tt){Object.keys(tt).forEach(function(et){var nt=tt[et];nt!==!1?rt.setAttribute(et,tt[et]):rt.removeAttribute(et)})}function applyStyle(rt){return setStyles(rt.instance.popper,rt.styles),setAttributes(rt.instance.popper,rt.attributes),rt.arrowElement&&Object.keys(rt.arrowStyles).length&&setStyles(rt.arrowElement,rt.arrowStyles),rt}function applyStyleOnLoad(rt,tt,et,nt,ot){var at=getReferenceOffsets(ot,tt,rt,et.positionFixed),st=computeAutoPlacement(et.placement,at,tt,rt,et.modifiers.flip.boundariesElement,et.modifiers.flip.padding);return tt.setAttribute("x-placement",st),setStyles(tt,{position:et.positionFixed?"fixed":"absolute"}),et}function getRoundedOffsets(rt,tt){var et=rt.offsets,nt=et.popper,ot=et.reference,at=Math.round,st=Math.floor,ut=function(Mt){return Mt},ct=at(ot.width),pt=at(nt.width),dt=["left","right"].indexOf(rt.placement)!==-1,ft=rt.placement.indexOf("-")!==-1,bt=ct%2===pt%2,ht=ct%2===1&&pt%2===1,mt=tt?dt||ft||bt?at:st:ut,Ot=tt?at:ut;return{left:mt(ht&&!ft&&tt?nt.left-1:nt.left),top:Ot(nt.top),bottom:Ot(nt.bottom),right:mt(nt.right)}}var isFirefox$1=isBrowser$1&&/Firefox/i.test(navigator.userAgent);function computeStyle(rt,tt){var et=tt.x,nt=tt.y,ot=rt.offsets.popper,at=find$1(rt.instance.modifiers,function(St){return St.name==="applyStyle"}).gpuAcceleration;at!==void 0&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var st=at!==void 0?at:tt.gpuAcceleration,ut=getOffsetParent(rt.instance.popper),ct=getBoundingClientRect(ut),pt={position:ot.position},dt=getRoundedOffsets(rt,window.devicePixelRatio<2||!isFirefox$1),ft=et==="bottom"?"top":"bottom",bt=nt==="right"?"left":"right",ht=getSupportedPropertyName("transform"),mt=void 0,Ot=void 0;if(ft==="bottom"?ut.nodeName==="HTML"?Ot=-ut.clientHeight+dt.bottom:Ot=-ct.height+dt.bottom:Ot=dt.top,bt==="right"?ut.nodeName==="HTML"?mt=-ut.clientWidth+dt.right:mt=-ct.width+dt.right:mt=dt.left,st&&ht)pt[ht]="translate3d("+mt+"px, "+Ot+"px, 0)",pt[ft]=0,pt[bt]=0,pt.willChange="transform";else{var yt=ft==="bottom"?-1:1,Mt=bt==="right"?-1:1;pt[ft]=Ot*yt,pt[bt]=mt*Mt,pt.willChange=ft+", "+bt}var At={"x-placement":rt.placement};return rt.attributes=_extends$K({},At,rt.attributes),rt.styles=_extends$K({},pt,rt.styles),rt.arrowStyles=_extends$K({},rt.offsets.arrow,rt.arrowStyles),rt}function isModifierRequired(rt,tt,et){var nt=find$1(rt,function(ut){var ct=ut.name;return ct===tt}),ot=!!nt&&rt.some(function(ut){return ut.name===et&&ut.enabled&&ut.order<nt.order});if(!ot){var at="`"+tt+"`",st="`"+et+"`";console.warn(st+" modifier is required by "+at+" modifier in order to work, be sure to include it before "+at+"!")}return ot}function arrow(rt,tt){var et;if(!isModifierRequired(rt.instance.modifiers,"arrow","keepTogether"))return rt;var nt=tt.element;if(typeof nt=="string"){if(nt=rt.instance.popper.querySelector(nt),!nt)return rt}else if(!rt.instance.popper.contains(nt))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),rt;var ot=rt.placement.split("-")[0],at=rt.offsets,st=at.popper,ut=at.reference,ct=["left","right"].indexOf(ot)!==-1,pt=ct?"height":"width",dt=ct?"Top":"Left",ft=dt.toLowerCase(),bt=ct?"left":"top",ht=ct?"bottom":"right",mt=getOuterSizes(nt)[pt];ut[ht]-mt<st[ft]&&(rt.offsets.popper[ft]-=st[ft]-(ut[ht]-mt)),ut[ft]+mt>st[ht]&&(rt.offsets.popper[ft]+=ut[ft]+mt-st[ht]),rt.offsets.popper=getClientRect(rt.offsets.popper);var Ot=ut[ft]+ut[pt]/2-mt/2,yt=getStyleComputedProperty(rt.instance.popper),Mt=parseFloat(yt["margin"+dt]),At=parseFloat(yt["border"+dt+"Width"]),St=Ot-rt.offsets.popper[ft]-Mt-At;return St=Math.max(Math.min(st[pt]-mt,St),0),rt.arrowElement=nt,rt.offsets.arrow=(et={},defineProperty$4(et,ft,Math.round(St)),defineProperty$4(et,bt,""),et),rt}function getOppositeVariation(rt){return rt==="end"?"start":rt==="start"?"end":rt}var placements=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],validPlacements=placements.slice(3);function clockwise(rt){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,et=validPlacements.indexOf(rt),nt=validPlacements.slice(et+1).concat(validPlacements.slice(0,et));return tt?nt.reverse():nt}var BEHAVIORS={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function flip$1(rt,tt){if(isModifierEnabled(rt.instance.modifiers,"inner")||rt.flipped&&rt.placement===rt.originalPlacement)return rt;var et=getBoundaries(rt.instance.popper,rt.instance.reference,tt.padding,tt.boundariesElement,rt.positionFixed),nt=rt.placement.split("-")[0],ot=getOppositePlacement(nt),at=rt.placement.split("-")[1]||"",st=[];switch(tt.behavior){case BEHAVIORS.FLIP:st=[nt,ot];break;case BEHAVIORS.CLOCKWISE:st=clockwise(nt);break;case BEHAVIORS.COUNTERCLOCKWISE:st=clockwise(nt,!0);break;default:st=tt.behavior}return st.forEach(function(ut,ct){if(nt!==ut||st.length===ct+1)return rt;nt=rt.placement.split("-")[0],ot=getOppositePlacement(nt);var pt=rt.offsets.popper,dt=rt.offsets.reference,ft=Math.floor,bt=nt==="left"&&ft(pt.right)>ft(dt.left)||nt==="right"&&ft(pt.left)<ft(dt.right)||nt==="top"&&ft(pt.bottom)>ft(dt.top)||nt==="bottom"&&ft(pt.top)<ft(dt.bottom),ht=ft(pt.left)<ft(et.left),mt=ft(pt.right)>ft(et.right),Ot=ft(pt.top)<ft(et.top),yt=ft(pt.bottom)>ft(et.bottom),Mt=nt==="left"&&ht||nt==="right"&&mt||nt==="top"&&Ot||nt==="bottom"&&yt,At=["top","bottom"].indexOf(nt)!==-1,St=!!tt.flipVariations&&(At&&at==="start"&&ht||At&&at==="end"&&mt||!At&&at==="start"&&Ot||!At&&at==="end"&&yt),Et=!!tt.flipVariationsByContent&&(At&&at==="start"&&mt||At&&at==="end"&&ht||!At&&at==="start"&&yt||!At&&at==="end"&&Ot),zt=St||Et;(bt||Mt||zt)&&(rt.flipped=!0,(bt||Mt)&&(nt=st[ct+1]),zt&&(at=getOppositeVariation(at)),rt.placement=nt+(at?"-"+at:""),rt.offsets.popper=_extends$K({},rt.offsets.popper,getPopperOffsets(rt.instance.popper,rt.offsets.reference,rt.placement)),rt=runModifiers(rt.instance.modifiers,rt,"flip"))}),rt}function keepTogether(rt){var tt=rt.offsets,et=tt.popper,nt=tt.reference,ot=rt.placement.split("-")[0],at=Math.floor,st=["top","bottom"].indexOf(ot)!==-1,ut=st?"right":"bottom",ct=st?"left":"top",pt=st?"width":"height";return et[ut]<at(nt[ct])&&(rt.offsets.popper[ct]=at(nt[ct])-et[pt]),et[ct]>at(nt[ut])&&(rt.offsets.popper[ct]=at(nt[ut])),rt}function toValue(rt,tt,et,nt){var ot=rt.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),at=+ot[1],st=ot[2];if(!at)return rt;if(st.indexOf("%")===0){var ut=void 0;switch(st){case"%p":ut=et;break;case"%":case"%r":default:ut=nt}var ct=getClientRect(ut);return ct[tt]/100*at}else if(st==="vh"||st==="vw"){var pt=void 0;return st==="vh"?pt=Math.max(document.documentElement.clientHeight,window.innerHeight||0):pt=Math.max(document.documentElement.clientWidth,window.innerWidth||0),pt/100*at}else return at}function parseOffset(rt,tt,et,nt){var ot=[0,0],at=["right","left"].indexOf(nt)!==-1,st=rt.split(/(\+|\-)/).map(function(dt){return dt.trim()}),ut=st.indexOf(find$1(st,function(dt){return dt.search(/,|\s/)!==-1}));st[ut]&&st[ut].indexOf(",")===-1&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var ct=/\s*,\s*|\s+/,pt=ut!==-1?[st.slice(0,ut).concat([st[ut].split(ct)[0]]),[st[ut].split(ct)[1]].concat(st.slice(ut+1))]:[st];return pt=pt.map(function(dt,ft){var bt=(ft===1?!at:at)?"height":"width",ht=!1;return dt.reduce(function(mt,Ot){return mt[mt.length-1]===""&&["+","-"].indexOf(Ot)!==-1?(mt[mt.length-1]=Ot,ht=!0,mt):ht?(mt[mt.length-1]+=Ot,ht=!1,mt):mt.concat(Ot)},[]).map(function(mt){return toValue(mt,bt,tt,et)})}),pt.forEach(function(dt,ft){dt.forEach(function(bt,ht){isNumeric(bt)&&(ot[ft]+=bt*(dt[ht-1]==="-"?-1:1))})}),ot}function offset$1(rt,tt){var et=tt.offset,nt=rt.placement,ot=rt.offsets,at=ot.popper,st=ot.reference,ut=nt.split("-")[0],ct=void 0;return isNumeric(+et)?ct=[+et,0]:ct=parseOffset(et,at,st,ut),ut==="left"?(at.top+=ct[0],at.left-=ct[1]):ut==="right"?(at.top+=ct[0],at.left+=ct[1]):ut==="top"?(at.left+=ct[0],at.top-=ct[1]):ut==="bottom"&&(at.left+=ct[0],at.top+=ct[1]),rt.popper=at,rt}function preventOverflow(rt,tt){var et=tt.boundariesElement||getOffsetParent(rt.instance.popper);rt.instance.reference===et&&(et=getOffsetParent(et));var nt=getSupportedPropertyName("transform"),ot=rt.instance.popper.style,at=ot.top,st=ot.left,ut=ot[nt];ot.top="",ot.left="",ot[nt]="";var ct=getBoundaries(rt.instance.popper,rt.instance.reference,tt.padding,et,rt.positionFixed);ot.top=at,ot.left=st,ot[nt]=ut,tt.boundaries=ct;var pt=tt.priority,dt=rt.offsets.popper,ft={primary:function(ht){var mt=dt[ht];return dt[ht]<ct[ht]&&!tt.escapeWithReference&&(mt=Math.max(dt[ht],ct[ht])),defineProperty$4({},ht,mt)},secondary:function(ht){var mt=ht==="right"?"left":"top",Ot=dt[mt];return dt[ht]>ct[ht]&&!tt.escapeWithReference&&(Ot=Math.min(dt[mt],ct[ht]-(ht==="right"?dt.width:dt.height))),defineProperty$4({},mt,Ot)}};return pt.forEach(function(bt){var ht=["left","top"].indexOf(bt)!==-1?"primary":"secondary";dt=_extends$K({},dt,ft[ht](bt))}),rt.offsets.popper=dt,rt}function shift(rt){var tt=rt.placement,et=tt.split("-")[0],nt=tt.split("-")[1];if(nt){var ot=rt.offsets,at=ot.reference,st=ot.popper,ut=["bottom","top"].indexOf(et)!==-1,ct=ut?"left":"top",pt=ut?"width":"height",dt={start:defineProperty$4({},ct,at[ct]),end:defineProperty$4({},ct,at[ct]+at[pt]-st[pt])};rt.offsets.popper=_extends$K({},st,dt[nt])}return rt}function hide(rt){if(!isModifierRequired(rt.instance.modifiers,"hide","preventOverflow"))return rt;var tt=rt.offsets.reference,et=find$1(rt.instance.modifiers,function(nt){return nt.name==="preventOverflow"}).boundaries;if(tt.bottom<et.top||tt.left>et.right||tt.top>et.bottom||tt.right<et.left){if(rt.hide===!0)return rt;rt.hide=!0,rt.attributes["x-out-of-boundaries"]=""}else{if(rt.hide===!1)return rt;rt.hide=!1,rt.attributes["x-out-of-boundaries"]=!1}return rt}function inner$1(rt){var tt=rt.placement,et=tt.split("-")[0],nt=rt.offsets,ot=nt.popper,at=nt.reference,st=["left","right"].indexOf(et)!==-1,ut=["top","left"].indexOf(et)===-1;return ot[st?"left":"top"]=at[et]-(ut?ot[st?"width":"height"]:0),rt.placement=getOppositePlacement(tt),rt.offsets.popper=getClientRect(ot),rt}var modifiers={shift:{order:100,enabled:!0,fn:shift},offset:{order:200,enabled:!0,fn:offset$1,offset:0},preventOverflow:{order:300,enabled:!0,fn:preventOverflow,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:keepTogether},arrow:{order:500,enabled:!0,fn:arrow,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:flip$1,behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:inner$1},hide:{order:800,enabled:!0,fn:hide},computeStyle:{order:850,enabled:!0,fn:computeStyle,gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:applyStyle,onLoad:applyStyleOnLoad,gpuAcceleration:void 0}},Defaults={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function rt(){},onUpdate:function rt(){},modifiers},Popper=function(){function rt(tt,et){var nt=this,ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};classCallCheck$1(this,rt),this.scheduleUpdate=function(){return requestAnimationFrame(nt.update)},this.update=debounce$3(this.update.bind(this)),this.options=_extends$K({},rt.Defaults,ot),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=tt&&tt.jquery?tt[0]:tt,this.popper=et&&et.jquery?et[0]:et,this.options.modifiers={},Object.keys(_extends$K({},rt.Defaults.modifiers,ot.modifiers)).forEach(function(st){nt.options.modifiers[st]=_extends$K({},rt.Defaults.modifiers[st]||{},ot.modifiers?ot.modifiers[st]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(st){return _extends$K({name:st},nt.options.modifiers[st])}).sort(function(st,ut){return st.order-ut.order}),this.modifiers.forEach(function(st){st.enabled&&isFunction$4(st.onLoad)&&st.onLoad(nt.reference,nt.popper,nt.options,st,nt.state)}),this.update();var at=this.options.eventsEnabled;at&&this.enableEventListeners(),this.state.eventsEnabled=at}return createClass$2(rt,[{key:"update",value:function(){return update.call(this)}},{key:"destroy",value:function(){return destroy.call(this)}},{key:"enableEventListeners",value:function(){return enableEventListeners.call(this)}},{key:"disableEventListeners",value:function(){return disableEventListeners.call(this)}}]),rt}();Popper.Utils=(typeof window<"u"?window:global).PopperUtils;Popper.placements=placements;Popper.Defaults=Defaults;function toPopperPlacement(rt){return rt.replace(/(Top|Left)$/,"-start").replace(/(Right|Bottom)$/,"-end")}function parsePopperOffset(rt){return{top:Math.floor(rt.top||0),left:Math.floor(rt.left||0)}}var TETHER_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"};function _typeof$i(rt){"@babel/helpers - typeof";return _typeof$i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(tt){return typeof tt}:function(tt){return tt&&typeof Symbol=="function"&&tt.constructor===Symbol&&tt!==Symbol.prototype?"symbol":typeof tt},_typeof$i(rt)}var _excluded$m=["modifiers"];function ownKeys$p(rt,tt){var et=Object.keys(rt);if(Object.getOwnPropertySymbols){var nt=Object.getOwnPropertySymbols(rt);tt&&(nt=nt.filter(function(ot){return Object.getOwnPropertyDescriptor(rt,ot).enumerable})),et.push.apply(et,nt)}return et}function _objectSpread$o(rt){for(var tt=1;tt<arguments.length;tt++){var et=arguments[tt]!=null?arguments[tt]:{};tt%2?ownKeys$p(Object(et),!0).forEach(function(nt){_defineProperty$w(rt,nt,et[nt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(rt,Object.getOwnPropertyDescriptors(et)):ownKeys$p(Object(et)).forEach(function(nt){Object.defineProperty(rt,nt,Object.getOwnPropertyDescriptor(et,nt))})}return rt}function _objectWithoutProperties$t(rt,tt){if(rt==null)return{};var et=_objectWithoutPropertiesLoose$r(rt,tt),nt,ot;if(Object.getOwnPropertySymbols){var at=Object.getOwnPropertySymbols(rt);for(ot=0;ot<at.length;ot++)nt=at[ot],!(tt.indexOf(nt)>=0)&&Object.prototype.propertyIsEnumerable.call(rt,nt)&&(et[nt]=rt[nt])}return et}function _objectWithoutPropertiesLoose$r(rt,tt){if(rt==null)return{};var et={},nt=Object.keys(rt),ot,at;for(at=0;at<nt.length;at++)ot=nt[at],!(tt.indexOf(ot)>=0)&&(et[ot]=rt[ot]);return et}function _classCallCheck$o(rt,tt){if(!(rt instanceof tt))throw new TypeError("Cannot call a class as a function")}function _defineProperties$e(rt,tt){for(var et=0;et<tt.length;et++){var nt=tt[et];nt.enumerable=nt.enumerable||!1,nt.configurable=!0,"value"in nt&&(nt.writable=!0),Object.defineProperty(rt,nt.key,nt)}}function _createClass$m(rt,tt,et){return tt&&_defineProperties$e(rt.prototype,tt),Object.defineProperty(rt,"prototype",{writable:!1}),rt}function _inherits$o(rt,tt){if(typeof tt!="function"&&tt!==null)throw new TypeError("Super expression must either be null or a function");rt.prototype=Object.create(tt&&tt.prototype,{constructor:{value:rt,writable:!0,configurable:!0}}),Object.defineProperty(rt,"prototype",{writable:!1}),tt&&_setPrototypeOf$f(rt,tt)}function _setPrototypeOf$f(rt,tt){return _setPrototypeOf$f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(nt,ot){return nt.__proto__=ot,nt},_setPrototypeOf$f(rt,tt)}function _createSuper$d(rt){var tt=_isNativeReflectConstruct$d();return function(){var nt=_getPrototypeOf$e(rt),ot;if(tt){var at=_getPrototypeOf$e(this).constructor;ot=Reflect.construct(nt,arguments,at)}else ot=nt.apply(this,arguments);return _possibleConstructorReturn$o(this,ot)}}function _possibleConstructorReturn$o(rt,tt){if(tt&&(_typeof$i(tt)==="object"||typeof tt=="function"))return tt;if(tt!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$f(rt)}function _assertThisInitialized$f(rt){if(rt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return rt}function _isNativeReflectConstruct$d(){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$e(rt){return _getPrototypeOf$e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(et){return et.__proto__||Object.getPrototypeOf(et)},_getPrototypeOf$e(rt)}function _defineProperty$w(rt,tt,et){return tt in rt?Object.defineProperty(rt,tt,{value:et,enumerable:!0,configurable:!0,writable:!0}):rt[tt]=et,rt}var Tether=function(rt){_inherits$o(et,rt);var tt=_createSuper$d(et);function et(){var nt;_classCallCheck$o(this,et);for(var ot=arguments.length,at=new Array(ot),st=0;st<ot;st++)at[st]=arguments[st];return nt=tt.call.apply(tt,[this].concat(at)),_defineProperty$w(_assertThisInitialized$f(nt),"popper",void 0),_defineProperty$w(_assertThisInitialized$f(nt),"popperHeight",0),_defineProperty$w(_assertThisInitialized$f(nt),"popperWidth",0),_defineProperty$w(_assertThisInitialized$f(nt),"anchorHeight",0),_defineProperty$w(_assertThisInitialized$f(nt),"anchorWidth",0),_defineProperty$w(_assertThisInitialized$f(nt),"state",{isMounted:!1}),_defineProperty$w(_assertThisInitialized$f(nt),"onPopperUpdate",function(ut){var ct={popper:parsePopperOffset(ut.offsets.popper),arrow:ut.offsets.arrow?parsePopperOffset(ut.offsets.arrow):{top:0,left:0}};nt.props.onPopperUpdate(ct,ut)}),nt}return _createClass$m(et,[{key:"componentDidMount",value:function(){this.setState({isMounted:!0})}},{key:"componentDidUpdate",value:function(ot,at){if(this.props.anchorRef){var st=this.props.anchorRef.getBoundingClientRect(),ut=st.height,ct=st.width;(this.anchorHeight!==ut||this.anchorWidth!==ct)&&(this.anchorHeight=ut,this.anchorWidth=ct,this.popper&&this.popper.scheduleUpdate())}if(this.props.popperRef){var pt=this.props.popperRef.getBoundingClientRect(),dt=pt.height,ft=pt.width;(this.popperHeight!==dt||this.popperWidth!==ft)&&(this.popperHeight=dt,this.popperWidth=ft,this.popper&&this.popper.scheduleUpdate()),this.state.isMounted!==at.isMounted&&this.props.anchorRef&&this.initializePopper()}}},{key:"componentWillUnmount",value:function(){this.destroyPopover()}},{key:"initializePopper",value:function(){var ot=this.props,at=ot.placement,st=ot.popperOptions,ut=st.modifiers,ct=_objectWithoutProperties$t(st,_excluded$m);!this.props.anchorRef||!this.props.popperRef||(this.popper=new Popper(this.props.anchorRef,this.props.popperRef,_objectSpread$o({placement:toPopperPlacement(at),modifiers:_objectSpread$o({arrow:{element:this.props.arrowRef,enabled:!!this.props.arrowRef},computeStyle:{gpuAcceleration:!1},applyStyle:{enabled:!1},applyReactStyle:{enabled:!0,fn:this.onPopperUpdate,order:900},preventOverflow:{enabled:!0}},ut)},ct)))}},{key:"destroyPopover",value:function(){this.popper&&(this.popper.destroy(),delete this.popper)}},{key:"render",value:function(){return this.props.children||null}}]),et}(reactExports.Component);_defineProperty$w(Tether,"defaultProps",{anchorRef:null,onPopperUpdate:function rt(){return null},placement:TETHER_PLACEMENT.auto,popperRef:null,popperOptions:{}});var BaseProvider=function rt(tt){var et=tt.children,nt=tt.overrides,ot=tt.theme,at=tt.zIndex;return reactExports.createElement(LayersManager,{zIndex:at,overrides:nt},reactExports.createElement(UIDReset,{prefix:"bui"},reactExports.createElement(ThemeProvider$1,{theme:ot},et)))};function guard(rt,tt,et){return Math.min(Math.max(rt,et),tt)}class ColorError extends Error{constructor(tt){super(`Failed to parse color: "${tt}"`)}}var ColorError$1=ColorError;function parseToRgba(rt){if(typeof rt!="string")throw new ColorError$1(rt);if(rt.trim().toLowerCase()==="transparent")return[0,0,0,0];let tt=rt.trim();tt=namedColorRegex.test(rt)?nameToHex(rt):rt;const et=reducedHexRegex.exec(tt);if(et){const st=Array.from(et).slice(1);return[...st.slice(0,3).map(ut=>parseInt(r(ut,2),16)),parseInt(r(st[3]||"f",2),16)/255]}const nt=hexRegex.exec(tt);if(nt){const st=Array.from(nt).slice(1);return[...st.slice(0,3).map(ut=>parseInt(ut,16)),parseInt(st[3]||"ff",16)/255]}const ot=rgbaRegex.exec(tt);if(ot){const st=Array.from(ot).slice(1);return[...st.slice(0,3).map(ut=>parseInt(ut,10)),parseFloat(st[3]||"1")]}const at=hslaRegex.exec(tt);if(at){const[st,ut,ct,pt]=Array.from(at).slice(1).map(parseFloat);if(guard(0,100,ut)!==ut)throw new ColorError$1(rt);if(guard(0,100,ct)!==ct)throw new ColorError$1(rt);return[...hslToRgb$1(st,ut,ct),Number.isNaN(pt)?1:pt]}throw new ColorError$1(rt)}function hash$1(rt){let tt=5381,et=rt.length;for(;et;)tt=tt*33^rt.charCodeAt(--et);return(tt>>>0)%2341}const colorToInt=rt=>parseInt(rt.replace(/_/g,""),36),compressedColorMap="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((rt,tt)=>{const et=colorToInt(tt.substring(0,3)),nt=colorToInt(tt.substring(3)).toString(16);let ot="";for(let at=0;at<6-nt.length;at++)ot+="0";return rt[et]=`${ot}${nt}`,rt},{});function nameToHex(rt){const tt=rt.toLowerCase().trim(),et=compressedColorMap[hash$1(tt)];if(!et)throw new ColorError$1(rt);return`#${et}`}const r=(rt,tt)=>Array.from(Array(tt)).map(()=>rt).join(""),reducedHexRegex=new RegExp(`^#${r("([a-f0-9])",3)}([a-f0-9])?$`,"i"),hexRegex=new RegExp(`^#${r("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),rgbaRegex=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${r(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),hslaRegex=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,namedColorRegex=/^[a-z]+$/i,roundColor=rt=>Math.round(rt*255),hslToRgb$1=(rt,tt,et)=>{let nt=et/100;if(tt===0)return[nt,nt,nt].map(roundColor);const ot=(rt%360+360)%360/60,at=(1-Math.abs(2*nt-1))*(tt/100),st=at*(1-Math.abs(ot%2-1));let ut=0,ct=0,pt=0;ot>=0&&ot<1?(ut=at,ct=st):ot>=1&&ot<2?(ut=st,ct=at):ot>=2&&ot<3?(ct=at,pt=st):ot>=3&&ot<4?(ct=st,pt=at):ot>=4&&ot<5?(ut=st,pt=at):ot>=5&&ot<6&&(ut=at,pt=st);const dt=nt-at/2,ft=ut+dt,bt=ct+dt,ht=pt+dt;return[ft,bt,ht].map(roundColor)};function parseToHsla(rt){const[tt,et,nt,ot]=parseToRgba(rt).map((ft,bt)=>bt===3?ft:ft/255),at=Math.max(tt,et,nt),st=Math.min(tt,et,nt),ut=(at+st)/2;if(at===st)return[0,0,ut,ot];const ct=at-st,pt=ut>.5?ct/(2-at-st):ct/(at+st);return[60*(tt===at?(et-nt)/ct+(et<nt?6:0):et===at?(nt-tt)/ct+2:(tt-et)/ct+4),pt,ut,ot]}function hsla(rt,tt,et,nt){return`hsla(${(rt%360).toFixed()}, ${guard(0,100,tt*100).toFixed()}%, ${guard(0,100,et*100).toFixed()}%, ${parseFloat(guard(0,1,nt).toFixed(3))})`}function darken(rt,tt){const[et,nt,ot,at]=parseToHsla(rt);return hsla(et,nt,ot-tt,at)}function getLuminance(rt){if(rt==="transparent")return 0;function tt(at){const st=at/255;return st<=.04045?st/12.92:Math.pow((st+.055)/1.055,2.4)}const[et,nt,ot]=parseToRgba(rt);return .2126*tt(et)+.7152*tt(nt)+.0722*tt(ot)}function rgba$1(rt,tt,et,nt){return`rgba(${guard(0,255,rt).toFixed()}, ${guard(0,255,tt).toFixed()}, ${guard(0,255,et).toFixed()}, ${parseFloat(guard(0,1,nt).toFixed(3))})`}function mix$1(rt,tt,et){const nt=(zt,vt)=>vt===3?zt:zt/255,[ot,at,st,ut]=parseToRgba(rt).map(nt),[ct,pt,dt,ft]=parseToRgba(tt).map(nt),bt=ft-ut,ht=et*2-1,Ot=((ht*bt===-1?ht:ht+bt/(1+ht*bt))+1)/2,yt=1-Ot,Mt=(ot*yt+ct*Ot)*255,At=(at*yt+pt*Ot)*255,St=(st*yt+dt*Ot)*255,Et=ft*et+ut*(1-et);return rgba$1(Mt,At,St,Et)}function lighten(rt,tt){return darken(rt,-tt)}function transparentize(rt,tt){const[et,nt,ot,at]=parseToRgba(rt);return rgba$1(et,nt,ot,at-tt)}function toHex(rt){const[tt,et,nt,ot]=parseToRgba(rt);let at=st=>{const ut=guard(0,255,st).toString(16);return ut.length===1?`0${ut}`:ut};return`#${at(tt)}${at(et)}${at(nt)}${ot<1?at(Math.round(ot*255)):""}`}const computeDerivedColors=rt=>{const{bodyText:tt,secondaryBg:et,bgColor:nt}=rt,ot=getLuminance(nt)>.5,at=transparentize(tt,.9),st=transparentize(tt,.8),ut=transparentize(tt,.7),ct=transparentize(tt,.6),pt=transparentize(tt,.4),dt=mix$1(nt,et,.5),ft=ot?darken(dt,.3):lighten(dt,.6),bt=transparentize(ft,.75),ht=transparentize(ft,.85),mt=lighten(nt,.025);return{fadedText05:at,fadedText10:st,fadedText20:ut,fadedText40:ct,fadedText60:pt,bgMix:dt,darkenedBgMix100:ft,darkenedBgMix25:bt,darkenedBgMix15:ht,lightenedBg05:mt}};function hasLightBackgroundColor(rt){return getLuminance(rt.colors.bgColor)>.5}const createEmotionColors=rt=>{const tt=computeDerivedColors(rt);return{...rt,...tt,codeTextColor:rt.green,codeHighlightColor:tt.bgMix,metricPositiveDeltaColor:rt.green,metricNegativeDeltaColor:rt.red,metricNeutralDeltaColor:tt.fadedText60,borderColor:tt.fadedText10,borderColorLight:tt.fadedText05,headingColor:rt.bodyText}};function getDividerColors(rt){const tt=hasLightBackgroundColor(rt),et=tt?rt.colors.blue60:rt.colors.blue90,nt=tt?rt.colors.green60:rt.colors.green90,ot=tt?rt.colors.orange60:rt.colors.orange90,at=tt?rt.colors.red60:rt.colors.red90,st=tt?rt.colors.purple60:rt.colors.purple80,ut=tt?rt.colors.gray40:rt.colors.gray70;return{blue:et,green:nt,orange:ot,red:at,violet:st,gray:ut,grey:ut,rainbow:`linear-gradient(to right, ${at}, ${ot}, ${nt}, ${et}, ${st})`}}function getMarkdownTextColors(rt){const tt=hasLightBackgroundColor(rt),et=tt?rt.colors.red80:rt.colors.red70,nt=tt?rt.colors.orange100:rt.colors.orange60,ot=tt?rt.colors.yellow100:rt.colors.yellow40,at=tt?rt.colors.green90:rt.colors.green60,st=tt?rt.colors.blue80:rt.colors.blue50,ut=tt?rt.colors.purple80:rt.colors.purple50,ct=tt?rt.colors.purple100:rt.colors.purple80,pt=tt?rt.colors.gray80:rt.colors.gray70,dt=rt.colors.primary;return{red:et,orange:nt,yellow:ot,green:at,blue:st,violet:ut,purple:ct,gray:pt,primary:dt}}function getMarkdownBgColors(rt){const tt=hasLightBackgroundColor(rt);return{redbg:transparentize(rt.colors[tt?"red80":"red60"],tt?.9:.7),orangebg:transparentize(rt.colors.yellow70,tt?.9:.7),yellowbg:transparentize(rt.colors[tt?"yellow70":"yellow50"],tt?.9:.7),greenbg:transparentize(rt.colors[tt?"green70":"green60"],tt?.9:.7),bluebg:transparentize(rt.colors[tt?"blue70":"blue60"],tt?.9:.7),violetbg:transparentize(rt.colors[tt?"purple70":"purple60"],tt?.9:.7),purplebg:transparentize(rt.colors[tt?"purple90":"purple80"],tt?.9:.7),graybg:transparentize(rt.colors[tt?"gray70":"gray50"],tt?.9:.7),primarybg:transparentize(rt.colors.primary,tt?.9:.7)}}function getGray70(rt){return hasLightBackgroundColor(rt)?rt.colors.gray70:rt.colors.gray30}function getGray30(rt){return hasLightBackgroundColor(rt)?rt.colors.gray30:rt.colors.gray85}function getGray90(rt){return hasLightBackgroundColor(rt)?rt.colors.gray90:rt.colors.gray10}function getBlue80(rt){return hasLightBackgroundColor(rt)?rt.colors.blue80:rt.colors.blue40}function getBlueArrayAsc(rt){const{colors:tt}=rt;return[tt.blue10,tt.blue20,tt.blue30,tt.blue40,tt.blue50,tt.blue60,tt.blue70,tt.blue80,tt.blue90,tt.blue100]}function getBlueArrayDesc(rt){const{colors:tt}=rt;return[tt.blue100,tt.blue90,tt.blue80,tt.blue70,tt.blue60,tt.blue50,tt.blue40,tt.blue30,tt.blue20,tt.blue10]}function getSequentialColorsArray(rt){return hasLightBackgroundColor(rt)?getBlueArrayAsc(rt):getBlueArrayDesc(rt)}function getDivergingColorsArray(rt){const{colors:tt}=rt;return[tt.red100,tt.red90,tt.red70,tt.red50,tt.red30,tt.blue30,tt.blue50,tt.blue70,tt.blue90,tt.blue100]}function getCategoricalColorsArray(rt){const{colors:tt}=rt;return hasLightBackgroundColor(rt)?[tt.blue80,tt.blue40,tt.red80,tt.red40,tt.blueGreen80,tt.green40,tt.orange80,tt.orange50,tt.purple80,tt.gray40]:[tt.blue40,tt.blue80,tt.red40,tt.red80,tt.green40,tt.blueGreen80,tt.orange50,tt.orange80,tt.purple80,tt.gray40]}function getDecreasingRed(rt){return hasLightBackgroundColor(rt)?rt.colors.red80:rt.colors.red40}function getIncreasingGreen(rt){return hasLightBackgroundColor(rt)?rt.colors.blueGreen80:rt.colors.green40}const breakpoints={hideWidgetDetails:180,hideNumberInputControls:120,sm:"576px",columns:"640px",md:"768px"},colors={transparent:"transparent",black:"#000000",white:"#ffffff",gray10:"#fafafa",gray20:"#f0f2f6",gray30:"#e6eaf1",gray40:"#d5dae5",gray50:"#bfc5d3",gray60:"#a3a8b8",gray70:"#808495",gray80:"#555867",gray85:"#31333F",gray90:"#262730",gray100:"#0e1117",red10:"#fff0f0",red20:"#ffdede",red30:"#ffc7c7",red40:"#ffabab",red50:"#ff8c8c",red60:"#ff6c6c",red70:"#ff4b4b",red80:"#ff2b2b",red90:"#bd4043",red100:"#7d353b",orange10:"#fffae8",orange20:"#fff6d0",orange30:"#ffecb0",orange40:"#ffe08e",orange50:"#ffd16a",orange60:"#ffbd45",orange70:"#ffa421",orange80:"#ff8700",orange90:"#ed6f13",orange100:"#d95a00",yellow10:"#ffffe1",yellow20:"#ffffc2",yellow30:"#ffffa0",yellow40:"#ffff7d",yellow50:"#ffff59",yellow60:"#fff835",yellow70:"#ffe312",yellow80:"#faca2b",yellow90:"#edbb16",yellow100:"#dea816",yellow110:"#916e10",green10:"#dffde9",green20:"#c0fcd3",green30:"#9ef6bb",green40:"#7defa1",green50:"#5ce488",green60:"#3dd56d",green70:"#21c354",green80:"#09ab3b",green90:"#158237",green100:"#177233",blueGreen10:"#dcfffb",blueGreen20:"#bafff7",blueGreen30:"#93ffee",blueGreen40:"#6bfde3",blueGreen50:"#45f4d5",blueGreen60:"#20e7c5",blueGreen70:"#00d4b1",blueGreen80:"#29b09d",blueGreen90:"#2c867c",blueGreen100:"#246e69",lightBlue10:"#e0feff",lightBlue20:"#bffdff",lightBlue30:"#9af8ff",lightBlue40:"#73efff",lightBlue50:"#4be4ff",lightBlue60:"#24d4ff",lightBlue70:"#00c0f2",lightBlue80:"#00a4d4",lightBlue90:"#0d8cb5",lightBlue100:"#15799e",blue10:"#e4f5ff",blue20:"#c7ebff",blue30:"#a6dcff",blue40:"#83c9ff",blue50:"#60b4ff",blue60:"#3d9df3",blue70:"#1c83e1",blue80:"#0068c9",blue90:"#0054a3",blue100:"#004280",purple10:"#f5ebff",purple20:"#ebd6ff",purple30:"#dbbbff",purple40:"#c89dff",purple50:"#b27eff",purple60:"#9a5dff",purple70:"#803df5",purple80:"#6d3fc0",purple90:"#583f84",purple100:"#3f3163"},iconSizes={xs:"0.5rem",sm:"0.75rem",md:"0.9rem",base:"1rem",lg:"1.25rem",xl:"1.5rem",twoXL:"1.8rem",threeXL:"2.3rem"},radii={md:"0.25rem",default:"0.5rem",xl:"0.75rem",xxl:"1rem",chatInput:"1.25rem",full:"9999px",maxCheckbox:"0.35rem"},sizes={full:"100%",headerHeight:"3.75rem",fullScreenHeaderHeight:"2.875rem",sidebarTopSpace:"6rem",toastWidth:"21rem",contentMaxWidth:"736px",maxChartTooltipWidth:"30rem",checkbox:"1rem",borderWidth:"1px",smallElementHeight:"1.5rem",minElementHeight:"2.5rem",largestElementHeight:"4.25rem",smallLogoHeight:"1.25rem",defaultLogoHeight:"1.5rem",largeLogoHeight:"2rem",sliderThumb:"0.75rem",wideSidePadding:"5rem",headerDecorationHeight:"0.125rem",appRunningMen:"1.6rem",appStatusMaxWidth:"20rem",spinnerSize:"1.375rem",spinnerThickness:"0.2rem",tabHeight:"2.5rem",minPopupWidth:"20rem",maxTooltipHeight:"18.75rem",chatAvatarSize:"2rem",clearIconSize:"1.5em",numberInputControlsWidth:"2rem",emptyDropdownHeight:"5.625rem",dropdownItemHeight:"2.5rem",maxDropdownHeight:"18.75rem",appDefaultBottomPadding:"3.5rem",defaultMapHeight:"31.25rem",defaultChartHeight:"21.875rem",defaultChartWidth:"25rem",minMenuWidth:"8rem",minChatInputFileListHeight:"3rem"},spacing$1={px:"1px",none:"0",threeXS:"0.125rem",twoXS:"0.25rem",xs:"0.375rem",sm:"0.5rem",md:"0.75rem",lg:"1rem",xl:"1.25rem",twoXL:"1.5rem",threeXL:"2rem",fourXL:"4rem"},fonts={sansSerif:'"Source Sans Pro", sans-serif',monospace:'"Source Code Pro", monospace',serif:'"Source Serif Pro", serif',materialIcons:"Material Symbols Rounded"},genericFonts={bodyFont:fonts.sansSerif,codeFont:fonts.monospace,headingFont:fonts.sansSerif,iconFont:fonts.materialIcons},fontSizeTwoSmall=12,fontSizeSmall=14,fontSizeMedium=16,fontSizes={twoSm:`${fontSizeTwoSmall}px`,sm:`${fontSizeSmall}px`,md:"1rem",mdLg:"1.125rem",lg:"1.25rem",xl:"1.5rem",twoXL:"1.75rem",threeXL:"2.25rem",fourXL:"2.75rem",twoSmPx:fontSizeTwoSmall,smPx:fontSizeSmall,mdPx:fontSizeMedium},fontWeights={normal:400,bold:600,extrabold:700},lineHeights={none:1,headings:1.2,tight:1.25,inputWidget:1.4,small:1.5,base:1.6,menuItem:2},sidebar=100,menuButton=sidebar+10,balloons=1e6,header=balloons-10,bottom=sidebar-1,sidebarMobile=balloons-5,fullscreenWrapper=balloons+50,popup=fullscreenWrapper+10,tablePortal=fullscreenWrapper+60,cacheSpinner=sidebar+1,toast=bottom+1,zIndices={hide:-1,auto:"auto",base:0,priority:1,sidebar,menuButton,balloons,header,sidebarMobile,popup,fullscreenWrapper,tablePortal,bottom,cacheSpinner,toast},requiredThemeColors={bgColor:colors.white,secondaryBg:colors.gray20,bodyText:colors.gray85,warning:colors.yellow110,warningBg:transparentize(colors.yellow80,.8),success:colors.green100,successBg:transparentize(colors.green80,.8),infoBg:transparentize(colors.blue70,.9),info:colors.blue100,danger:colors.red100,dangerBg:transparentize(colors.red70,.8),link:colors.blue80,primary:colors.red70,secondary:colors.blue70,disabled:colors.gray40,lightestGray:colors.gray20,lightGray:colors.gray30,gray:colors.gray60,darkGray:colors.gray70,red:colors.red80,blue:colors.blue80,green:colors.green80,yellow:colors.yellow80},optionalThemeColors={},themeColors={...colors,...requiredThemeColors,...optionalThemeColors},emotionBaseTheme={inSidebar:!1,breakpoints,colors:createEmotionColors(themeColors),fonts,fontSizes,fontWeights,genericFonts,iconSizes,lineHeights,radii,sizes,spacing:spacing$1,zIndices},genericColors$1={...colors,warning:"#926C05",warningBg:transparentize(colors.yellow70,.9),successBg:transparentize(colors.green70,.9),danger:colors.red100,dangerBg:transparentize(colors.red80,.91)},emotionLightTheme={...emotionBaseTheme,inSidebar:!1,colors:createEmotionColors({...emotionBaseTheme.colors,...genericColors$1})},genericColors={...colors,bgColor:colors.gray100,secondaryBg:colors.gray90,bodyText:colors.gray10,warning:colors.yellow20,warningBg:transparentize(colors.yellow70,.8),success:colors.green10,successBg:transparentize(colors.green60,.8),info:colors.blue20,infoBg:transparentize(colors.blue60,.8),danger:colors.red20,dangerBg:transparentize(colors.red60,.8),primary:colors.red70,disabled:colors.gray70,link:lighten(colors.blue80,.2)},emotionDarkTheme={...emotionBaseTheme,inSidebar:!1,colors:createEmotionColors({...emotionBaseTheme.colors,...genericColors})},createBaseThemePrimitives=(rt,tt)=>{const{colors:et,genericFonts:nt}=tt;return{...rt,primaryFontFamily:nt.bodyFont,primary100:et.primary,primary200:et.primary,primary300:et.primary,primary400:et.primary,primary500:et.primary,primary600:et.primary,primary700:et.primary,mono100:et.bgColor,mono200:et.secondaryBg,mono300:et.lightGray,mono400:et.lightGray,mono500:et.gray,mono600:et.fadedText40,mono700:et.gray,mono800:et.bodyText,mono900:et.bodyText,mono1000:et.black}},createThemeOverrides=rt=>{const{inSidebar:tt,colors:et,genericFonts:nt,fontSizes:ot,lineHeights:at,radii:st}=rt,ut={fontFamily:nt.bodyFont,fontSize:ot.md,fontSizeSm:ot.sm,fontWeight:"normal",lineHeight:at.base,lineHeightTight:at.tight},ct=et.secondaryBg,pt=tt?et.secondaryBg:et.bgColor,dt=tt?et.bgColor:et.secondaryBg;return{borders:{radius100:st.default,radius200:st.default,radius300:st.default,radius400:st.default,radius500:st.default,useRoundedCorners:!0,buttonBorderRadiusMini:st.md,buttonBorderRadius:st.default,checkboxBorderRadius:`min(${st.md}, ${st.maxCheckbox})`,inputBorderRadiusMini:st.md,inputBorderRadius:st.default,popoverBorderRadius:st.default,surfaceBorderRadius:st.default,tagBorderRadius:st.md},typography:{font100:{},font150:{...ut},font200:{},font250:{},font300:{...ut},font350:{...ut},font400:{...ut},font450:{...ut},font460:{...ut},font470:{...ut},font500:{...ut},font600:{},LabelXSmall:{...ut},LabelSmall:{...ut},LabelMedium:{...ut},LabelLarge:{...ut},ParagraphSmall:{...ut}},colors:{white:et.white,black:et.black,primary:et.primary,primaryA:et.primary,backgroundPrimary:et.bgColor,backgroundSecondary:ct,backgroundTertiary:et.bgColor,borderOpaque:et.darkenedBgMix25,accent:transparentize(et.primary,.5),tagPrimarySolidBackground:et.primary,tagPrimaryFontDisabled:et.fadedText40,tagPrimaryOutlinedDisabled:et.transparent,borderSelected:et.primary,contentPrimary:et.bodyText,inputPlaceholder:et.fadedText60,tickFillDisabled:et.fadedText40,tickMarkFill:et.lightestGray,tickFillSelected:et.primary,datepickerBackground:pt,calendarBackground:pt,calendarForeground:et.bodyText,calendarDayForegroundPseudoSelected:et.bodyText,calendarHeaderBackground:dt,calendarHeaderBackgroundActive:dt,calendarHeaderForeground:et.bodyText,calendarHeaderForegroundDisabled:et.gray40,calendarDayBackgroundSelected:et.primary,calendarDayBackgroundSelectedHighlighted:et.primary,calendarDayForegroundSelected:et.white,calendarDayForegroundSelectedHighlighted:et.white,calendarDayForegroundPseudoSelectedHighlighted:et.bodyText,menuFontHighlighted:et.bodyText,menuFontSelected:et.bodyText,modalCloseColor:et.bodyText,notificationInfoBackground:et.infoBg,notificationInfoText:et.info,notificationPositiveBackground:et.successBg,notificationPositiveText:et.success,notificationWarningBackground:et.warningBg,notificationWarningText:et.warning,notificationNegativeBackground:et.dangerBg,notificationNegativeText:et.danger,progressbarTrackFill:ct,tickFill:et.lightenedBg05,tickMarkFillDisabled:et.lightenedBg05,menuFill:pt,buttonDisabledFill:et.lightenedBg05,tickFillHover:ct,inputFillDisabled:ct,inputFillActive:ct,toggleTrackFillDisabled:ct,tickFillActive:ct,sliderTrackFillDisabled:ct,inputBorder:et.widgetBorderColor||ct,inputFill:ct,inputEnhanceFill:ct,inputEnhancerFillDisabled:ct,buttonDisabledSpinnerBackground:et.gray40,toggleTrackFill:et.gray40,sliderTrackFill:et.gray40,sliderHandleInnerFill:et.gray40,sliderHandleInnerFillDisabled:et.gray40}}},createBaseUiTheme=(rt,tt=primitives)=>createLightTheme(createBaseThemePrimitives(tt,rt),createThemeOverrides(rt)),baseuiLightTheme=createBaseUiTheme(emotionLightTheme,primitives),baseuiDarkTheme=createBaseUiTheme(emotionDarkTheme,primitives$1),globalStyles=rt=>css("html{font-size:",rt.fontSizes.mdPx,"px;}@media print{html{height:100%;print-color-adjust:exact;-webkit-print-color-adjust:exact;}}*,*::before,*::after{box-sizing:border-box;}body{margin:0;font-family:",rt.genericFonts.bodyFont,";font-weight:",rt.fontWeights.normal,";line-height:",rt.lineHeights.base,";color:",rt.colors.bodyText,";background-color:",rt.colors.bgColor,";-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:",transparentize(rt.colors.black,1),';-webkit-font-smoothing:auto;}body.embedded{overflow:hidden;}body.embedded:hover{overflow:auto;}[tabindex="-1"]:focus:not(:focus-visible){outline:0 !important;}p,ol,ul,dl{margin:0 0 1rem 0;padding:0;font-size:1rem;font-weight:400;}ol ol,ul ul,ol ul,ul ol{margin-bottom:0;}a:not([href]):not([class]){&,&:hover{color:inherit;text-decoration:none;}}img,svg{vertical-align:middle;}input,button,select,optgroup,textarea{margin:0;font-family:inherit;line-height:inherit;font-size:inherit;}button,input{overflow:visible;}button,[role="button"]{&:not(:disabled){cursor:pointer;}}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button;}[hidden]{display:none !important;}::-webkit-scrollbar{background:transparent;border-radius:100px;height:6px;width:6px;}::-webkit-scrollbar:active{background:',rt.colors.fadedText10,";}:hover::-webkit-scrollbar-thumb:vertical,:hover::-webkit-scrollbar-thumb:horizontal{background:",rt.colors.fadedText40,";border-radius:100px;}"),baseTheme={name:"base",emotion:emotionBaseTheme,basewebTheme:baseuiLightTheme,primitives},darkTheme={name:"Dark",emotion:emotionDarkTheme,basewebTheme:baseuiDarkTheme,primitives:primitives$1},lightTheme={name:"Light",emotion:emotionLightTheme,basewebTheme:baseuiLightTheme,primitives},UPPERCASE=/[\p{Lu}]/u,LOWERCASE=/[\p{Ll}]/u,LEADING_CAPITAL=/^[\p{Lu}](?![\p{Lu}])/gu,IDENTIFIER=/([\p{Alpha}\p{N}_]|$)/u,SEPARATORS=/[_.\- ]+/,LEADING_SEPARATORS=new RegExp("^"+SEPARATORS.source),SEPARATORS_AND_IDENTIFIER=new RegExp(SEPARATORS.source+IDENTIFIER.source,"gu"),NUMBERS_AND_IDENTIFIER=new RegExp("\\d+"+IDENTIFIER.source,"gu"),preserveCamelCase=(rt,tt,et,nt)=>{let ot=!1,at=!1,st=!1,ut=!1;for(let ct=0;ct<rt.length;ct++){const pt=rt[ct];ut=ct>2?rt[ct-3]==="-":!0,ot&&UPPERCASE.test(pt)?(rt=rt.slice(0,ct)+"-"+rt.slice(ct),ot=!1,st=at,at=!0,ct++):at&&st&&LOWERCASE.test(pt)&&(!ut||nt)?(rt=rt.slice(0,ct-1)+"-"+rt.slice(ct-1),st=at,at=!1,ot=!0):(ot=tt(pt)===pt&&et(pt)!==pt,st=at,at=et(pt)===pt&&tt(pt)!==pt)}return rt},preserveConsecutiveUppercase=(rt,tt)=>(LEADING_CAPITAL.lastIndex=0,rt.replace(LEADING_CAPITAL,et=>tt(et))),postProcess=(rt,tt)=>(SEPARATORS_AND_IDENTIFIER.lastIndex=0,NUMBERS_AND_IDENTIFIER.lastIndex=0,rt.replace(SEPARATORS_AND_IDENTIFIER,(et,nt)=>tt(nt)).replace(NUMBERS_AND_IDENTIFIER,et=>tt(et)));function camelCase(rt,tt){if(!(typeof rt=="string"||Array.isArray(rt)))throw new TypeError("Expected the input to be `string | string[]`");if(tt={pascalCase:!1,preserveConsecutiveUppercase:!1,...tt},Array.isArray(rt)?rt=rt.map(at=>at.trim()).filter(at=>at.length).join("-"):rt=rt.trim(),rt.length===0)return"";const et=tt.locale===!1?at=>at.toLowerCase():at=>at.toLocaleLowerCase(tt.locale),nt=tt.locale===!1?at=>at.toUpperCase():at=>at.toLocaleUpperCase(tt.locale);return rt.length===1?SEPARATORS.test(rt)?"":tt.pascalCase?nt(rt):et(rt):(rt!==et(rt)&&(rt=preserveCamelCase(rt,et,nt,tt.preserveConsecutiveUppercase)),rt=rt.replace(LEADING_SEPARATORS,""),rt=tt.preserveConsecutiveUppercase?preserveConsecutiveUppercase(rt,et):et(rt),tt.pascalCase&&(rt=nt(rt.charAt(0))+rt.slice(1)),postProcess(rt,nt))}var ListCache$3=_ListCache;function stackClear$2(){this.__data__=new ListCache$3,this.size=0}var _stackClear=stackClear$2;function stackDelete$2(rt){var tt=this.__data__,et=tt.delete(rt);return this.size=tt.size,et}var _stackDelete=stackDelete$2;function stackGet$2(rt){return this.__data__.get(rt)}var _stackGet=stackGet$2;function stackHas$2(rt){return this.__data__.has(rt)}var _stackHas=stackHas$2,ListCache$2=_ListCache,Map$3=_Map,MapCache$2=_MapCache,LARGE_ARRAY_SIZE$2=200;function stackSet$2(rt,tt){var et=this.__data__;if(et instanceof ListCache$2){var nt=et.__data__;if(!Map$3||nt.length<LARGE_ARRAY_SIZE$2-1)return nt.push([rt,tt]),this.size=++et.size,this;et=this.__data__=new MapCache$2(nt)}return et.set(rt,tt),this.size=et.size,this}var _stackSet=stackSet$2,ListCache$1=_ListCache,stackClear$1=_stackClear,stackDelete$1=_stackDelete,stackGet$1=_stackGet,stackHas$1=_stackHas,stackSet$1=_stackSet;function Stack$5(rt){var tt=this.__data__=new ListCache$1(rt);this.size=tt.size}Stack$5.prototype.clear=stackClear$1;Stack$5.prototype.delete=stackDelete$1;Stack$5.prototype.get=stackGet$1;Stack$5.prototype.has=stackHas$1;Stack$5.prototype.set=stackSet$1;var _Stack=Stack$5;function arrayEach$2(rt,tt){for(var et=-1,nt=rt==null?0:rt.length;++et<nt&&tt(rt[et],et,rt)!==!1;);return rt}var _arrayEach=arrayEach$2,defineProperty$3=_defineProperty$H;function baseAssignValue$6(rt,tt,et){tt=="__proto__"&&defineProperty$3?defineProperty$3(rt,tt,{configurable:!0,enumerable:!0,value:et,writable:!0}):rt[tt]=et}var _baseAssignValue=baseAssignValue$6,baseAssignValue$5=_baseAssignValue,eq$3=eq_1,objectProto$r=Object.prototype,hasOwnProperty$n=objectProto$r.hasOwnProperty;function assignValue$4(rt,tt,et){var nt=rt[tt];(!(hasOwnProperty$n.call(rt,tt)&&eq$3(nt,et))||et===void 0&&!(tt in rt))&&baseAssignValue$5(rt,tt,et)}var _assignValue=assignValue$4,assignValue$3=_assignValue,baseAssignValue$4=_baseAssignValue;function copyObject$7(rt,tt,et,nt){var ot=!et;et||(et={});for(var at=-1,st=tt.length;++at<st;){var ut=tt[at],ct=nt?nt(et[ut],rt[ut],ut,et,rt):void 0;ct===void 0&&(ct=rt[ut]),ot?baseAssignValue$4(et,ut,ct):assignValue$3(et,ut,ct)}return et}var _copyObject=copyObject$7,baseGetTag$5=_baseGetTag,isObjectLike$9=isObjectLike_1,argsTag$6="[object Arguments]";function baseIsArguments$2(rt){return isObjectLike$9(rt)&&baseGetTag$5(rt)==argsTag$6}var _baseIsArguments=baseIsArguments$2,baseIsArguments$1=_baseIsArguments,isObjectLike$8=isObjectLike_1,objectProto$q=Object.prototype,hasOwnProperty$m=objectProto$q.hasOwnProperty,propertyIsEnumerable$3=objectProto$q.propertyIsEnumerable,isArguments$5=baseIsArguments$1(function(){return arguments}())?baseIsArguments$1:function(rt){return isObjectLike$8(rt)&&hasOwnProperty$m.call(rt,"callee")&&!propertyIsEnumerable$3.call(rt,"callee")},isArguments_1=isArguments$5,isBuffer$8={exports:{}};function stubFalse$1(){return!1}var stubFalse_1=stubFalse$1;isBuffer$8.exports;(function(rt,tt){var et=_root,nt=stubFalse_1,ot=tt&&!tt.nodeType&&tt,at=ot&&!0&&rt&&!rt.nodeType&&rt,st=at&&at.exports===ot,ut=st?et.Buffer:void 0,ct=ut?ut.isBuffer:void 0,pt=ct||nt;rt.exports=pt})(isBuffer$8,isBuffer$8.exports);var isBufferExports=isBuffer$8.exports,baseGetTag$4=_baseGetTag,isLength$2=isLength_1,isObjectLike$7=isObjectLike_1,argsTag$5="[object Arguments]",arrayTag$4="[object Array]",boolTag$5="[object Boolean]",dateTag$5="[object Date]",errorTag$4="[object Error]",funcTag$3="[object Function]",mapTag$9="[object Map]",numberTag$5="[object Number]",objectTag$8="[object Object]",regexpTag$5="[object RegExp]",setTag$9="[object Set]",stringTag$6="[object String]",weakMapTag$4="[object WeakMap]",arrayBufferTag$5="[object ArrayBuffer]",dataViewTag$7="[object DataView]",float32Tag$3="[object Float32Array]",float64Tag$3="[object Float64Array]",int8Tag$3="[object Int8Array]",int16Tag$3="[object Int16Array]",int32Tag$3="[object Int32Array]",uint8Tag$3="[object Uint8Array]",uint8ClampedTag$3="[object Uint8ClampedArray]",uint16Tag$3="[object Uint16Array]",uint32Tag$3="[object Uint32Array]",typedArrayTags$1={};typedArrayTags$1[float32Tag$3]=typedArrayTags$1[float64Tag$3]=typedArrayTags$1[int8Tag$3]=typedArrayTags$1[int16Tag$3]=typedArrayTags$1[int32Tag$3]=typedArrayTags$1[uint8Tag$3]=typedArrayTags$1[uint8ClampedTag$3]=typedArrayTags$1[uint16Tag$3]=typedArrayTags$1[uint32Tag$3]=!0;typedArrayTags$1[argsTag$5]=typedArrayTags$1[arrayTag$4]=typedArrayTags$1[arrayBufferTag$5]=typedArrayTags$1[boolTag$5]=typedArrayTags$1[dataViewTag$7]=typedArrayTags$1[dateTag$5]=typedArrayTags$1[errorTag$4]=typedArrayTags$1[funcTag$3]=typedArrayTags$1[mapTag$9]=typedArrayTags$1[numberTag$5]=typedArrayTags$1[objectTag$8]=typedArrayTags$1[regexpTag$5]=typedArrayTags$1[setTag$9]=typedArrayTags$1[stringTag$6]=typedArrayTags$1[weakMapTag$4]=!1;function baseIsTypedArray$2(rt){return isObjectLike$7(rt)&&isLength$2(rt.length)&&!!typedArrayTags$1[baseGetTag$4(rt)]}var _baseIsTypedArray=baseIsTypedArray$2;function baseUnary$6(rt){return function(tt){return rt(tt)}}var _baseUnary=baseUnary$6,_nodeUtil={exports:{}};_nodeUtil.exports;(function(rt,tt){var et=_freeGlobal,nt=tt&&!tt.nodeType&&tt,ot=nt&&!0&&rt&&!rt.nodeType&&rt,at=ot&&ot.exports===nt,st=at&&et.process,ut=function(){try{var ct=ot&&ot.require&&ot.require("util").types;return ct||st&&st.binding&&st.binding("util")}catch{}}();rt.exports=ut})(_nodeUtil,_nodeUtil.exports);var _nodeUtilExports=_nodeUtil.exports,baseIsTypedArray$1=_baseIsTypedArray,baseUnary$5=_baseUnary,nodeUtil$3=_nodeUtilExports,nodeIsTypedArray$1=nodeUtil$3&&nodeUtil$3.isTypedArray,isTypedArray$5=nodeIsTypedArray$1?baseUnary$5(nodeIsTypedArray$1):baseIsTypedArray$1,isTypedArray_1=isTypedArray$5,baseTimes$1=_baseTimes,isArguments$4=isArguments_1,isArray$f=isArray_1,isBuffer$7=isBufferExports,isIndex$3=_isIndex,isTypedArray$4=isTypedArray_1,objectProto$p=Object.prototype,hasOwnProperty$l=objectProto$p.hasOwnProperty;function arrayLikeKeys$3(rt,tt){var et=isArray$f(rt),nt=!et&&isArguments$4(rt),ot=!et&&!nt&&isBuffer$7(rt),at=!et&&!nt&&!ot&&isTypedArray$4(rt),st=et||nt||ot||at,ut=st?baseTimes$1(rt.length,String):[],ct=ut.length;for(var pt in rt)(tt||hasOwnProperty$l.call(rt,pt))&&!(st&&(pt=="length"||ot&&(pt=="offset"||pt=="parent")||at&&(pt=="buffer"||pt=="byteLength"||pt=="byteOffset")||isIndex$3(pt,ct)))&&ut.push(pt);return ut}var _arrayLikeKeys=arrayLikeKeys$3,objectProto$o=Object.prototype;function isPrototype$4(rt){var tt=rt&&rt.constructor,et=typeof tt=="function"&&tt.prototype||objectProto$o;return rt===et}var _isPrototype=isPrototype$4;function overArg$3(rt,tt){return function(et){return rt(tt(et))}}var _overArg=overArg$3,overArg$2=_overArg,nativeKeys$2=overArg$2(Object.keys,Object),_nativeKeys=nativeKeys$2,isPrototype$3=_isPrototype,nativeKeys$1=_nativeKeys,objectProto$n=Object.prototype,hasOwnProperty$k=objectProto$n.hasOwnProperty;function baseKeys$2(rt){if(!isPrototype$3(rt))return nativeKeys$1(rt);var tt=[];for(var et in Object(rt))hasOwnProperty$k.call(rt,et)&&et!="constructor"&&tt.push(et);return tt}var _baseKeys=baseKeys$2,arrayLikeKeys$2=_arrayLikeKeys,baseKeys$1=_baseKeys,isArrayLike$5=isArrayLike_1;function keys$9(rt){return isArrayLike$5(rt)?arrayLikeKeys$2(rt):baseKeys$1(rt)}var keys_1=keys$9,copyObject$6=_copyObject,keys$8=keys_1;function baseAssign$1(rt,tt){return rt&&copyObject$6(tt,keys$8(tt),rt)}var _baseAssign=baseAssign$1;function nativeKeysIn$2(rt){var tt=[];if(rt!=null)for(var et in Object(rt))tt.push(et);return tt}var _nativeKeysIn=nativeKeysIn$2,isObject$a=isObject_1,isPrototype$2=_isPrototype,nativeKeysIn$1=_nativeKeysIn,objectProto$m=Object.prototype,hasOwnProperty$j=objectProto$m.hasOwnProperty;function baseKeysIn$2(rt){if(!isObject$a(rt))return nativeKeysIn$1(rt);var tt=isPrototype$2(rt),et=[];for(var nt in rt)nt=="constructor"&&(tt||!hasOwnProperty$j.call(rt,nt))||et.push(nt);return et}var _baseKeysIn=baseKeysIn$2,arrayLikeKeys$1=_arrayLikeKeys,baseKeysIn$1=_baseKeysIn,isArrayLike$4=isArrayLike_1;function keysIn$6(rt){return isArrayLike$4(rt)?arrayLikeKeys$1(rt,!0):baseKeysIn$1(rt)}var keysIn_1=keysIn$6,copyObject$5=_copyObject,keysIn$5=keysIn_1;function baseAssignIn$1(rt,tt){return rt&&copyObject$5(tt,keysIn$5(tt),rt)}var _baseAssignIn=baseAssignIn$1,_cloneBuffer={exports:{}};_cloneBuffer.exports;(function(rt,tt){var et=_root,nt=tt&&!tt.nodeType&&tt,ot=nt&&!0&&rt&&!rt.nodeType&&rt,at=ot&&ot.exports===nt,st=at?et.Buffer:void 0,ut=st?st.allocUnsafe:void 0;function ct(pt,dt){if(dt)return pt.slice();var ft=pt.length,bt=ut?ut(ft):new pt.constructor(ft);return pt.copy(bt),bt}rt.exports=ct})(_cloneBuffer,_cloneBuffer.exports);var _cloneBufferExports=_cloneBuffer.exports;function copyArray$4(rt,tt){var et=-1,nt=rt.length;for(tt||(tt=Array(nt));++et<nt;)tt[et]=rt[et];return tt}var _copyArray=copyArray$4;function stubArray$3(){return[]}var stubArray_1=stubArray$3,arrayFilter$1=_arrayFilter,stubArray$2=stubArray_1,objectProto$l=Object.prototype,propertyIsEnumerable$2=objectProto$l.propertyIsEnumerable,nativeGetSymbols$2=Object.getOwnPropertySymbols,getSymbols$4=nativeGetSymbols$2?function(rt){return rt==null?[]:(rt=Object(rt),arrayFilter$1(nativeGetSymbols$2(rt),function(tt){return propertyIsEnumerable$2.call(rt,tt)}))}:stubArray$2,_getSymbols=getSymbols$4,copyObject$4=_copyObject,getSymbols$3=_getSymbols;function copySymbols$1(rt,tt){return copyObject$4(rt,getSymbols$3(rt),tt)}var _copySymbols=copySymbols$1;function arrayPush$4(rt,tt){for(var et=-1,nt=tt.length,ot=rt.length;++et<nt;)rt[ot+et]=tt[et];return rt}var _arrayPush=arrayPush$4,overArg$1=_overArg,getPrototype$4=overArg$1(Object.getPrototypeOf,Object),_getPrototype=getPrototype$4,arrayPush$3=_arrayPush,getPrototype$3=_getPrototype,getSymbols$2=_getSymbols,stubArray$1=stubArray_1,nativeGetSymbols$1=Object.getOwnPropertySymbols,getSymbolsIn$2=nativeGetSymbols$1?function(rt){for(var tt=[];rt;)arrayPush$3(tt,getSymbols$2(rt)),rt=getPrototype$3(rt);return tt}:stubArray$1,_getSymbolsIn=getSymbolsIn$2,copyObject$3=_copyObject,getSymbolsIn$1=_getSymbolsIn;function copySymbolsIn$1(rt,tt){return copyObject$3(rt,getSymbolsIn$1(rt),tt)}var _copySymbolsIn=copySymbolsIn$1,arrayPush$2=_arrayPush,isArray$e=isArray_1;function baseGetAllKeys$3(rt,tt,et){var nt=tt(rt);return isArray$e(rt)?nt:arrayPush$2(nt,et(rt))}var _baseGetAllKeys=baseGetAllKeys$3,baseGetAllKeys$2=_baseGetAllKeys,getSymbols$1=_getSymbols,keys$7=keys_1;function getAllKeys$3(rt){return baseGetAllKeys$2(rt,keys$7,getSymbols$1)}var _getAllKeys=getAllKeys$3,baseGetAllKeys$1=_baseGetAllKeys,getSymbolsIn=_getSymbolsIn,keysIn$4=keysIn_1;function getAllKeysIn$2(rt){return baseGetAllKeys$1(rt,keysIn$4,getSymbolsIn)}var _getAllKeysIn=getAllKeysIn$2,getNative$4=_getNative,root$b=_root,DataView$3=getNative$4(root$b,"DataView"),_DataView=DataView$3,getNative$3=_getNative,root$a=_root,Promise$3=getNative$3(root$a,"Promise"),_Promise=Promise$3,getNative$2=_getNative,root$9=_root,Set$3=getNative$2(root$9,"Set"),_Set=Set$3,getNative$1=_getNative,root$8=_root,WeakMap$3=getNative$1(root$8,"WeakMap"),_WeakMap=WeakMap$3,DataView$2=_DataView,Map$2=_Map,Promise$2=_Promise,Set$2=_Set,WeakMap$2=_WeakMap,baseGetTag$3=_baseGetTag,toSource$1=_toSource,mapTag$8="[object Map]",objectTag$7="[object Object]",promiseTag$1="[object Promise]",setTag$8="[object Set]",weakMapTag$3="[object WeakMap]",dataViewTag$6="[object DataView]",dataViewCtorString$1=toSource$1(DataView$2),mapCtorString$1=toSource$1(Map$2),promiseCtorString$1=toSource$1(Promise$2),setCtorString$1=toSource$1(Set$2),weakMapCtorString$1=toSource$1(WeakMap$2),getTag$6=baseGetTag$3;(DataView$2&&getTag$6(new DataView$2(new ArrayBuffer(1)))!=dataViewTag$6||Map$2&&getTag$6(new Map$2)!=mapTag$8||Promise$2&&getTag$6(Promise$2.resolve())!=promiseTag$1||Set$2&&getTag$6(new Set$2)!=setTag$8||WeakMap$2&&getTag$6(new WeakMap$2)!=weakMapTag$3)&&(getTag$6=function(rt){var tt=baseGetTag$3(rt),et=tt==objectTag$7?rt.constructor:void 0,nt=et?toSource$1(et):"";if(nt)switch(nt){case dataViewCtorString$1:return dataViewTag$6;case mapCtorString$1:return mapTag$8;case promiseCtorString$1:return promiseTag$1;case setCtorString$1:return setTag$8;case weakMapCtorString$1:return weakMapTag$3}return tt});var _getTag=getTag$6,objectProto$k=Object.prototype,hasOwnProperty$i=objectProto$k.hasOwnProperty;function initCloneArray$1(rt){var tt=rt.length,et=new rt.constructor(tt);return tt&&typeof rt[0]=="string"&&hasOwnProperty$i.call(rt,"index")&&(et.index=rt.index,et.input=rt.input),et}var _initCloneArray=initCloneArray$1,root$7=_root,Uint8Array$4=root$7.Uint8Array,_Uint8Array=Uint8Array$4,Uint8Array$3=_Uint8Array;function cloneArrayBuffer$4(rt){var tt=new rt.constructor(rt.byteLength);return new Uint8Array$3(tt).set(new Uint8Array$3(rt)),tt}var _cloneArrayBuffer=cloneArrayBuffer$4,cloneArrayBuffer$3=_cloneArrayBuffer;function cloneDataView$1(rt,tt){var et=tt?cloneArrayBuffer$3(rt.buffer):rt.buffer;return new rt.constructor(et,rt.byteOffset,rt.byteLength)}var _cloneDataView=cloneDataView$1,reFlags=/\w*$/;function cloneRegExp$1(rt){var tt=new rt.constructor(rt.source,reFlags.exec(rt));return tt.lastIndex=rt.lastIndex,tt}var _cloneRegExp=cloneRegExp$1,Symbol$5=_Symbol,symbolProto$3=Symbol$5?Symbol$5.prototype:void 0,symbolValueOf$2=symbolProto$3?symbolProto$3.valueOf:void 0;function cloneSymbol$1(rt){return symbolValueOf$2?Object(symbolValueOf$2.call(rt)):{}}var _cloneSymbol=cloneSymbol$1,cloneArrayBuffer$2=_cloneArrayBuffer;function cloneTypedArray$3(rt,tt){var et=tt?cloneArrayBuffer$2(rt.buffer):rt.buffer;return new rt.constructor(et,rt.byteOffset,rt.length)}var _cloneTypedArray=cloneTypedArray$3,cloneArrayBuffer$1=_cloneArrayBuffer,cloneDataView=_cloneDataView,cloneRegExp=_cloneRegExp,cloneSymbol=_cloneSymbol,cloneTypedArray$2=_cloneTypedArray,boolTag$4="[object Boolean]",dateTag$4="[object Date]",mapTag$7="[object Map]",numberTag$4="[object Number]",regexpTag$4="[object RegExp]",setTag$7="[object Set]",stringTag$5="[object String]",symbolTag$5="[object Symbol]",arrayBufferTag$4="[object ArrayBuffer]",dataViewTag$5="[object DataView]",float32Tag$2="[object Float32Array]",float64Tag$2="[object Float64Array]",int8Tag$2="[object Int8Array]",int16Tag$2="[object Int16Array]",int32Tag$2="[object Int32Array]",uint8Tag$2="[object Uint8Array]",uint8ClampedTag$2="[object Uint8ClampedArray]",uint16Tag$2="[object Uint16Array]",uint32Tag$2="[object Uint32Array]";function initCloneByTag$1(rt,tt,et){var nt=rt.constructor;switch(tt){case arrayBufferTag$4:return cloneArrayBuffer$1(rt);case boolTag$4:case dateTag$4:return new nt(+rt);case dataViewTag$5:return cloneDataView(rt,et);case float32Tag$2:case float64Tag$2:case int8Tag$2:case int16Tag$2:case int32Tag$2:case uint8Tag$2:case uint8ClampedTag$2:case uint16Tag$2:case uint32Tag$2:return cloneTypedArray$2(rt,et);case mapTag$7:return new nt;case numberTag$4:case stringTag$5:return new nt(rt);case regexpTag$4:return cloneRegExp(rt);case setTag$7:return new nt;case symbolTag$5:return cloneSymbol(rt)}}var _initCloneByTag=initCloneByTag$1,isObject$9=isObject_1,objectCreate$1=Object.create,baseCreate$2=function(){function rt(){}return function(tt){if(!isObject$9(tt))return{};if(objectCreate$1)return objectCreate$1(tt);rt.prototype=tt;var et=new rt;return rt.prototype=void 0,et}}(),_baseCreate=baseCreate$2,baseCreate$1=_baseCreate,getPrototype$2=_getPrototype,isPrototype$1=_isPrototype;function initCloneObject$3(rt){return typeof rt.constructor=="function"&&!isPrototype$1(rt)?baseCreate$1(getPrototype$2(rt)):{}}var _initCloneObject=initCloneObject$3,getTag$5=_getTag,isObjectLike$6=isObjectLike_1,mapTag$6="[object Map]";function baseIsMap$1(rt){return isObjectLike$6(rt)&&getTag$5(rt)==mapTag$6}var _baseIsMap=baseIsMap$1,baseIsMap=_baseIsMap,baseUnary$4=_baseUnary,nodeUtil$2=_nodeUtilExports,nodeIsMap=nodeUtil$2&&nodeUtil$2.isMap,isMap$1=nodeIsMap?baseUnary$4(nodeIsMap):baseIsMap,isMap_1=isMap$1,getTag$4=_getTag,isObjectLike$5=isObjectLike_1,setTag$6="[object Set]";function baseIsSet$1(rt){return isObjectLike$5(rt)&&getTag$4(rt)==setTag$6}var _baseIsSet=baseIsSet$1,baseIsSet=_baseIsSet,baseUnary$3=_baseUnary,nodeUtil$1=_nodeUtilExports,nodeIsSet=nodeUtil$1&&nodeUtil$1.isSet,isSet$1=nodeIsSet?baseUnary$3(nodeIsSet):baseIsSet,isSet_1=isSet$1,Stack$4=_Stack,arrayEach$1=_arrayEach,assignValue$2=_assignValue,baseAssign=_baseAssign,baseAssignIn=_baseAssignIn,cloneBuffer$2=_cloneBufferExports,copyArray$3=_copyArray,copySymbols=_copySymbols,copySymbolsIn=_copySymbolsIn,getAllKeys$2=_getAllKeys,getAllKeysIn$1=_getAllKeysIn,getTag$3=_getTag,initCloneArray=_initCloneArray,initCloneByTag=_initCloneByTag,initCloneObject$2=_initCloneObject,isArray$d=isArray_1,isBuffer$6=isBufferExports,isMap=isMap_1,isObject$8=isObject_1,isSet=isSet_1,keys$6=keys_1,keysIn$3=keysIn_1,CLONE_DEEP_FLAG$2=1,CLONE_FLAT_FLAG$1=2,CLONE_SYMBOLS_FLAG$2=4,argsTag$4="[object Arguments]",arrayTag$3="[object Array]",boolTag$3="[object Boolean]",dateTag$3="[object Date]",errorTag$3="[object Error]",funcTag$2="[object Function]",genTag$1="[object GeneratorFunction]",mapTag$5="[object Map]",numberTag$3="[object Number]",objectTag$6="[object Object]",regexpTag$3="[object RegExp]",setTag$5="[object Set]",stringTag$4="[object String]",symbolTag$4="[object Symbol]",weakMapTag$2="[object WeakMap]",arrayBufferTag$3="[object ArrayBuffer]",dataViewTag$4="[object DataView]",float32Tag$1="[object Float32Array]",float64Tag$1="[object Float64Array]",int8Tag$1="[object Int8Array]",int16Tag$1="[object Int16Array]",int32Tag$1="[object Int32Array]",uint8Tag$1="[object Uint8Array]",uint8ClampedTag$1="[object Uint8ClampedArray]",uint16Tag$1="[object Uint16Array]",uint32Tag$1="[object Uint32Array]",cloneableTags={};cloneableTags[argsTag$4]=cloneableTags[arrayTag$3]=cloneableTags[arrayBufferTag$3]=cloneableTags[dataViewTag$4]=cloneableTags[boolTag$3]=cloneableTags[dateTag$3]=cloneableTags[float32Tag$1]=cloneableTags[float64Tag$1]=cloneableTags[int8Tag$1]=cloneableTags[int16Tag$1]=cloneableTags[int32Tag$1]=cloneableTags[mapTag$5]=cloneableTags[numberTag$3]=cloneableTags[objectTag$6]=cloneableTags[regexpTag$3]=cloneableTags[setTag$5]=cloneableTags[stringTag$4]=cloneableTags[symbolTag$4]=cloneableTags[uint8Tag$1]=cloneableTags[uint8ClampedTag$1]=cloneableTags[uint16Tag$1]=cloneableTags[uint32Tag$1]=!0;cloneableTags[errorTag$3]=cloneableTags[funcTag$2]=cloneableTags[weakMapTag$2]=!1;function baseClone$2(rt,tt,et,nt,ot,at){var st,ut=tt&CLONE_DEEP_FLAG$2,ct=tt&CLONE_FLAT_FLAG$1,pt=tt&CLONE_SYMBOLS_FLAG$2;if(et&&(st=ot?et(rt,nt,ot,at):et(rt)),st!==void 0)return st;if(!isObject$8(rt))return rt;var dt=isArray$d(rt);if(dt){if(st=initCloneArray(rt),!ut)return copyArray$3(rt,st)}else{var ft=getTag$3(rt),bt=ft==funcTag$2||ft==genTag$1;if(isBuffer$6(rt))return cloneBuffer$2(rt,ut);if(ft==objectTag$6||ft==argsTag$4||bt&&!ot){if(st=ct||bt?{}:initCloneObject$2(rt),!ut)return ct?copySymbolsIn(rt,baseAssignIn(st,rt)):copySymbols(rt,baseAssign(st,rt))}else{if(!cloneableTags[ft])return ot?rt:{};st=initCloneByTag(rt,ft,ut)}}at||(at=new Stack$4);var ht=at.get(rt);if(ht)return ht;at.set(rt,st),isSet(rt)?rt.forEach(function(yt){st.add(baseClone$2(yt,tt,et,yt,rt,at))}):isMap(rt)&&rt.forEach(function(yt,Mt){st.set(Mt,baseClone$2(yt,tt,et,Mt,rt,at))});var mt=pt?ct?getAllKeysIn$1:getAllKeys$2:ct?keysIn$3:keys$6,Ot=dt?void 0:mt(rt);return arrayEach$1(Ot||rt,function(yt,Mt){Ot&&(Mt=yt,yt=rt[Mt]),assignValue$2(st,Mt,baseClone$2(yt,tt,et,Mt,rt,at))}),st}var _baseClone=baseClone$2,baseClone$1=_baseClone,CLONE_DEEP_FLAG$1=1,CLONE_SYMBOLS_FLAG$1=4;function cloneDeep(rt){return baseClone$1(rt,CLONE_DEEP_FLAG$1|CLONE_SYMBOLS_FLAG$1)}var cloneDeep_1=cloneDeep;const cloneDeep$1=getDefaultExportFromCjs$1(cloneDeep_1);var baseAssignValue$3=_baseAssignValue,eq$2=eq_1;function assignMergeValue$3(rt,tt,et){(et!==void 0&&!eq$2(rt[tt],et)||et===void 0&&!(tt in rt))&&baseAssignValue$3(rt,tt,et)}var _assignMergeValue=assignMergeValue$3;function createBaseFor$2(rt){return function(tt,et,nt){for(var ot=-1,at=Object(tt),st=nt(tt),ut=st.length;ut--;){var ct=st[rt?ut:++ot];if(et(at[ct],ct,at)===!1)break}return tt}}var _createBaseFor=createBaseFor$2,createBaseFor$1=_createBaseFor,baseFor$3=createBaseFor$1(),_baseFor=baseFor$3,baseGetTag$2=_baseGetTag,getPrototype$1=_getPrototype,isObjectLike$4=isObjectLike_1,objectTag$5="[object Object]",funcProto$3=Function.prototype,objectProto$j=Object.prototype,funcToString$3=funcProto$3.toString,hasOwnProperty$h=objectProto$j.hasOwnProperty,objectCtorString$1=funcToString$3.call(Object);function isPlainObject$6(rt){if(!isObjectLike$4(rt)||baseGetTag$2(rt)!=objectTag$5)return!1;var tt=getPrototype$1(rt);if(tt===null)return!0;var et=hasOwnProperty$h.call(tt,"constructor")&&tt.constructor;return typeof et=="function"&&et instanceof et&&funcToString$3.call(et)==objectCtorString$1}var isPlainObject_1=isPlainObject$6;function safeGet$3(rt,tt){if(!(tt==="constructor"&&typeof rt[tt]=="function")&&tt!="__proto__")return rt[tt]}var _safeGet=safeGet$3,copyObject$2=_copyObject,keysIn$2=keysIn_1;function toPlainObject$2(rt){return copyObject$2(rt,keysIn$2(rt))}var toPlainObject_1=toPlainObject$2,assignMergeValue$2=_assignMergeValue,cloneBuffer$1=_cloneBufferExports,cloneTypedArray$1=_cloneTypedArray,copyArray$2=_copyArray,initCloneObject$1=_initCloneObject,isArguments$3=isArguments_1,isArray$c=isArray_1,isArrayLikeObject$2=isArrayLikeObject_1,isBuffer$5=isBufferExports,isFunction$3=isFunction_1,isObject$7=isObject_1,isPlainObject$5=isPlainObject_1,isTypedArray$3=isTypedArray_1,safeGet$2=_safeGet,toPlainObject$1=toPlainObject_1;function baseMergeDeep$2(rt,tt,et,nt,ot,at,st){var ut=safeGet$2(rt,et),ct=safeGet$2(tt,et),pt=st.get(ct);if(pt){assignMergeValue$2(rt,et,pt);return}var dt=at?at(ut,ct,et+"",rt,tt,st):void 0,ft=dt===void 0;if(ft){var bt=isArray$c(ct),ht=!bt&&isBuffer$5(ct),mt=!bt&&!ht&&isTypedArray$3(ct);dt=ct,bt||ht||mt?isArray$c(ut)?dt=ut:isArrayLikeObject$2(ut)?dt=copyArray$2(ut):ht?(ft=!1,dt=cloneBuffer$1(ct,!0)):mt?(ft=!1,dt=cloneTypedArray$1(ct,!0)):dt=[]:isPlainObject$5(ct)||isArguments$3(ct)?(dt=ut,isArguments$3(ut)?dt=toPlainObject$1(ut):(!isObject$7(ut)||isFunction$3(ut))&&(dt=initCloneObject$1(ct))):ft=!1}ft&&(st.set(ct,dt),ot(dt,ct,nt,at,st),st.delete(ct)),assignMergeValue$2(rt,et,dt)}var _baseMergeDeep=baseMergeDeep$2,Stack$3=_Stack,assignMergeValue$1=_assignMergeValue,baseFor$2=_baseFor,baseMergeDeep$1=_baseMergeDeep,isObject$6=isObject_1,keysIn$1=keysIn_1,safeGet$1=_safeGet;function baseMerge$2(rt,tt,et,nt,ot){rt!==tt&&baseFor$2(tt,function(at,st){if(ot||(ot=new Stack$3),isObject$6(at))baseMergeDeep$1(rt,tt,st,et,baseMerge$2,nt,ot);else{var ut=nt?nt(safeGet$1(rt,st),at,st+"",rt,tt,ot):void 0;ut===void 0&&(ut=at),assignMergeValue$1(rt,st,ut)}},keysIn$1)}var _baseMerge=baseMerge$2,baseRest$3=_baseRest,isIterateeCall$2=_isIterateeCall;function createAssigner$2(rt){return baseRest$3(function(tt,et){var nt=-1,ot=et.length,at=ot>1?et[ot-1]:void 0,st=ot>2?et[2]:void 0;for(at=rt.length>3&&typeof at=="function"?(ot--,at):void 0,st&&isIterateeCall$2(et[0],et[1],st)&&(at=ot<3?void 0:at,ot=1),tt=Object(tt);++nt<ot;){var ut=et[nt];ut&&rt(tt,ut,nt,at)}return tt})}var _createAssigner=createAssigner$2,baseMerge$1=_baseMerge,createAssigner$1=_createAssigner,merge$3=createAssigner$1(function(rt,tt,et){baseMerge$1(rt,tt,et)}),merge_1$1=merge$3;const merge$4=getDefaultExportFromCjs$1(merge_1$1);var toFinite=toFinite_1;function toInteger$1(rt){var tt=toFinite(rt),et=tt%1;return tt===tt?et?tt-et:tt:0}var toInteger_1=toInteger$1,toInteger=toInteger_1,FUNC_ERROR_TEXT$4="Expected a function";function before$1(rt,tt){var et;if(typeof tt!="function")throw new TypeError(FUNC_ERROR_TEXT$4);return rt=toInteger(rt),function(){return--rt>0&&(et=tt.apply(this,arguments)),rt<=1&&(tt=void 0),et}}var before_1=before$1,before=before_1;function once(rt){return before(2,rt)}var once_1=once;const once$1=getDefaultExportFromCjs$1(once_1),CACHED_THEME_VERSION=1,CACHED_THEME_BASE_KEY=`stActiveTheme-${window.location.pathname}`,LocalStore={CACHED_THEME_VERSION,CACHED_THEME_BASE_KEY,ACTIVE_THEME:`${CACHED_THEME_BASE_KEY}-v${CACHED_THEME_VERSION}`},AUTO_THEME_NAME="Use system setting",CUSTOM_THEME_NAME="Custom Theme",log$c=loglevelExports$1.getLogger("theme:utils");function mergeTheme(rt,tt){if(tt&&isObject$h(tt)){const et=new CustomThemeConfig(tt);return createTheme(rt.name,et,rt)}return rt}const getMergedLightTheme=once$1(()=>{var rt;return mergeTheme(lightTheme,(rt=window.__streamlit)==null?void 0:rt.LIGHT_THEME)}),getMergedDarkTheme=once$1(()=>{var rt;return mergeTheme(darkTheme,(rt=window.__streamlit)==null?void 0:rt.DARK_THEME)}),getSystemTheme=()=>window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?getMergedDarkTheme():getMergedLightTheme(),createAutoTheme=()=>({...getSystemTheme(),name:AUTO_THEME_NAME}),createPresetThemes=()=>[createAutoTheme(),getMergedLightTheme(),getMergedDarkTheme()],isPresetTheme=rt=>createPresetThemes().map(et=>et.name).includes(rt.name),fontToEnum=rt=>{const tt=Object.keys(fonts).find(nt=>fonts[nt]===rt),et=CustomThemeConfig.FontFamily.SANS_SERIF;if(tt){const nt=decamelize$2(tt).toUpperCase();return nt in CustomThemeConfig.FontFamily?CustomThemeConfig.FontFamily[nt]:et}return et},fontEnumToString=rt=>rt!=null&&rt in CustomThemeConfig.FontFamily?fonts[camelCase(CustomThemeConfig.FontFamily[rt].toString())]:void 0,bgColorToBaseString=rt=>rt===void 0||getLuminance(rt)>.5?"light":"dark",isColor=rt=>{const tt=new Option().style;return tt.color=rt,tt.color!==""},createEmotionTheme=(rt,tt=baseTheme)=>{const{colors:et,genericFonts:nt}=tt.emotion,{font:ot,fontSizes:at,roundness:st,showBorderAroundInputs:ut,...ct}=rt,pt=fontEnumToString(ot),dt=Object.entries(ct).reduce((Et,[zt,vt])=>(isColor(vt)?Et[zt]=vt:isColor(`#${vt}`)&&(Et[zt]=`#${vt}`),Et),{}),{secondaryBackgroundColor:ft,backgroundColor:bt,primaryColor:ht,textColor:mt,widgetBorderColor:Ot,borderColor:yt,linkColor:Mt}=dt,At={...et};ht&&(At.primary=ht),mt&&(At.bodyText=mt),ft&&(At.secondaryBg=ft),bt&&(At.bgColor=bt),Mt&&(At.link=Mt),At.secondary=At.primary;const St={};if(St.colors=createEmotionColors(At),d$3(yt)&&(St.colors.borderColor=yt,St.colors.borderColorLight=transparentize(yt,.55)),(ut||Ot)&&(St.colors.widgetBorderColor=Ot||St.colors.borderColor),d$3(st)){St.radii={...tt.emotion.radii};const Et=roundToTwoDecimals(Math.max(0,Math.min(st,1))*1.6);St.radii.default=addRemUnit(Et),St.radii.md=addRemUnit(roundToTwoDecimals(Et*.5)),St.radii.xl=addRemUnit(roundToTwoDecimals(Et*1.5)),St.radii.xxl=addRemUnit(roundToTwoDecimals(Et*2))}return at&&(St.fontSizes={...tt.emotion.fontSizes},at.tinyFontSize&&(St.fontSizes.twoSm=addPxUnit(at.tinyFontSize),St.fontSizes.twoSmPx=at.tinyFontSize),at.smallFontSize&&(St.fontSizes.sm=addPxUnit(at.smallFontSize),St.fontSizes.smPx=at.smallFontSize),at.baseFontSize&&(St.fontSizes.md=addPxUnit(at.baseFontSize),St.fontSizes.mdPx=at.baseFontSize)),{...tt.emotion,colors:createEmotionColors(At),genericFonts:{...nt,...pt&&{bodyFont:rt.bodyFont?rt.bodyFont:pt,headingFont:rt.bodyFont?rt.bodyFont:pt,codeFont:rt.codeFont?rt.codeFont:nt.codeFont}},...St}},toThemeInput=rt=>{const{colors:tt,genericFonts:et}=rt;return{primaryColor:tt.primary,backgroundColor:tt.bgColor,secondaryBackgroundColor:tt.secondaryBg,textColor:tt.bodyText,font:fontToEnum(et.bodyFont)}},toExportedTheme=rt=>{const{colors:tt}=rt,et=toThemeInput(rt);return{primaryColor:et.primaryColor,backgroundColor:et.backgroundColor,secondaryBackgroundColor:et.secondaryBackgroundColor,textColor:et.textColor,base:bgColorToBaseString(et.backgroundColor),font:fontEnumToString(et.font),...computeDerivedColors(tt)}},completeThemeInput=(rt,tt)=>new CustomThemeConfig({...toThemeInput(tt.emotion),...rt}),createTheme=(rt,tt,et,nt=!1)=>{let ot;et?ot=completeThemeInput(tt,et):tt.base===CustomThemeConfig.BaseTheme.DARK?ot=completeThemeInput(tt,darkTheme):ot=completeThemeInput(tt,lightTheme);const at=ot.backgroundColor,st=merge$4(cloneDeep$1(et||(getLuminance(at)>.5?lightTheme:darkTheme)),{emotion:{inSidebar:nt}}),ut=createEmotionTheme(ot,st);return{...st,name:rt,emotion:ut,basewebTheme:createBaseUiTheme(ut,st.primitives),themeInput:tt}},getCachedTheme=()=>{if(!p$4())return null;const rt=window.localStorage.getItem(LocalStore.ACTIVE_THEME);if(!rt)return null;const{name:tt,themeInput:et}=JSON.parse(rt);switch(tt){case lightTheme.name:return getMergedLightTheme();case darkTheme.name:return getMergedDarkTheme();default:return createTheme(tt,et)}},deleteOldCachedThemes=()=>{const{CACHED_THEME_VERSION:rt,CACHED_THEME_BASE_KEY:tt}=LocalStore,{localStorage:et}=window;et.removeItem("stActiveTheme"),et.removeItem(tt);for(let nt=1;nt<=rt;nt++)et.removeItem(`${tt}-v${nt}`)},setCachedTheme=rt=>{if(!p$4()||(deleteOldCachedThemes(),isLightThemeInQueryParams()||isDarkThemeInQueryParams()))return;const tt={name:rt.name,...!isPresetTheme(rt)&&{themeInput:toThemeInput(rt.emotion)}};window.localStorage.setItem(LocalStore.ACTIVE_THEME,JSON.stringify(tt))},removeCachedTheme=()=>{p$4()&&window.localStorage.removeItem(LocalStore.ACTIVE_THEME)},getHostSpecifiedTheme=()=>isLightThemeInQueryParams()?getMergedLightTheme():isDarkThemeInQueryParams()?getMergedDarkTheme():createAutoTheme(),getDefaultTheme=()=>{const rt=getCachedTheme();return rt&&rt.name!==AUTO_THEME_NAME?rt:getHostSpecifiedTheme()},whiteSpace=/\s+/;function computeSpacingStyle(rt,tt){return rt===""?"":rt.split(whiteSpace).map(et=>et==="0"?tt.spacing.none:et in tt.spacing?tt.spacing[et]:(log$c.error(`Invalid spacing value: ${et}`),tt.spacing.none)).join(" ")}function addPxUnit(rt){return`${rt}px`}function addRemUnit(rt){return`${rt}rem`}function roundToTwoDecimals(rt){return parseFloat(rt.toFixed(2))}function blend(rt,tt){if(tt===void 0)return rt;const[et,nt,ot,at]=parseToRgba(rt);if(at===1)return rt;const[st,ut,ct,pt]=parseToRgba(tt),dt=at+pt*(1-at),ft=Math.round((at*et+pt*st*(1-at))/dt),bt=Math.round((at*nt+pt*ut*(1-at))/dt),ht=Math.round((at*ot+pt*ct*(1-at))/dt);return toHex(`rgba(${ft}, ${bt}, ${ht}, ${dt})`)}const convertRemToPx=rt=>parseFloat(rt.replace(/rem$/,""))*(parseFloat(getComputedStyle(document.documentElement).fontSize)||16),STALE_TRANSITION_PARAMS="1s ease-in 0.5s",STALE_STYLES={opacity:.33,transition:`opacity ${STALE_TRANSITION_PARAMS}`},LibContext=React$1.createContext({isFullScreen:!1,setFullScreen:()=>{},addScriptFinishedHandler:()=>{},removeScriptFinishedHandler:()=>{},activeTheme:baseTheme,setTheme:()=>{},availableThemes:[],addThemes:()=>{},onPageChange:()=>{},currentPageScriptHash:"",libConfig:{},fragmentIdsThisRun:[],locale:window.navigator.language});var reactPropsRegex=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,isPropValid=memoize$3(function(rt){return reactPropsRegex.test(rt)||rt.charCodeAt(0)===111&&rt.charCodeAt(1)===110&&rt.charCodeAt(2)<91}),isDevelopment=!1,testOmitPropsOnStringTag=isPropValid,testOmitPropsOnComponent=function rt(tt){return tt!=="theme"},getDefaultShouldForwardProp=function rt(tt){return typeof tt=="string"&&tt.charCodeAt(0)>96?testOmitPropsOnStringTag:testOmitPropsOnComponent},composeShouldForwardProps=function rt(tt,et,nt){var ot;if(et){var at=et.shouldForwardProp;ot=tt.__emotion_forwardProp&&at?function(st){return tt.__emotion_forwardProp(st)&&at(st)}:at}return typeof ot!="function"&&nt&&(ot=tt.__emotion_forwardProp),ot},Insertion=function rt(tt){var et=tt.cache,nt=tt.serialized,ot=tt.isStringTag;return registerStyles(et,nt,ot),useInsertionEffectAlwaysWithSyncFallback(function(){return insertStyles(et,nt,ot)}),null},createStyled=function rt(tt,et){var nt=tt.__emotion_real===tt,ot=nt&&tt.__emotion_base||tt,at,st;et!==void 0&&(at=et.label,st=et.target);var ut=composeShouldForwardProps(tt,et,nt),ct=ut||getDefaultShouldForwardProp(ot),pt=!ct("as");return function(){var dt=arguments,ft=nt&&tt.__emotion_styles!==void 0?tt.__emotion_styles.slice(0):[];if(at!==void 0&&ft.push("label:"+at+";"),dt[0]==null||dt[0].raw===void 0)ft.push.apply(ft,dt);else{var bt=dt[0];ft.push(bt[0]);for(var ht=dt.length,mt=1;mt<ht;mt++)ft.push(dt[mt],bt[mt])}var Ot=withEmotionCache(function(yt,Mt,At){var St=pt&&yt.as||ot,Et="",zt=[],vt=yt;if(yt.theme==null){vt={};for(var Tt in yt)vt[Tt]=yt[Tt];vt.theme=reactExports.useContext(ThemeContext$1)}typeof yt.className=="string"?Et=getRegisteredStyles(Mt.registered,zt,yt.className):yt.className!=null&&(Et=yt.className+" ");var $t=serializeStyles(ft.concat(zt),Mt.registered,vt);Et+=Mt.key+"-"+$t.name,st!==void 0&&(Et+=" "+st);var Rt=pt&&ut===void 0?getDefaultShouldForwardProp(St):ct,wt={};for(var It in yt)pt&&It==="as"||Rt(It)&&(wt[It]=yt[It]);return wt.className=Et,At&&(wt.ref=At),reactExports.createElement(reactExports.Fragment,null,reactExports.createElement(Insertion,{cache:Mt,serialized:$t,isStringTag:typeof St=="string"}),reactExports.createElement(St,wt))});return Ot.displayName=at!==void 0?at:"Styled("+(typeof ot=="string"?ot:ot.displayName||ot.name||"Component")+")",Ot.defaultProps=tt.defaultProps,Ot.__emotion_real=Ot,Ot.__emotion_base=ot,Ot.__emotion_styles=ft,Ot.__emotion_forwardProp=ut,Object.defineProperty(Ot,"toString",{value:function(){return st===void 0&&isDevelopment?"NO_COMPONENT_SELECTOR":"."+st}}),Ot.withComponent=function(yt,Mt){var At=rt(yt,_extends$Q({},et,Mt,{shouldForwardProp:composeShouldForwardProps(Ot,Mt,!0)}));return At.apply(void 0,ft)},Ot}},tags=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],newStyled=createStyled.bind(null);tags.forEach(function(rt){newStyled[rt]=newStyled(rt)});var SIZE$3={small:"small",medium:"medium",large:"large"},spin={from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}},StyledSpinner=styled("i",function(rt){var tt=rt.$theme,et=rt.$color,nt=et===void 0?tt.colors.contentAccent:et,ot=rt.$borderWidth,at=rt.$size,st=at===void 0?SIZE$3.medium:at,ut={large:tt.sizing.scale300,medium:tt.sizing.scale100,small:tt.sizing.scale0}[ot||st],ct={large:tt.sizing.scale1000,medium:tt.sizing.scale900,small:tt.sizing.scale800}[st];return ut||(ut=tt.sizing[ot],ut||(ut="".concat(parseInt(ot),"px"))),ct||(ct=tt.sizing[st],ct||(ct="".concat(parseInt(st),"px"))),{display:"block",animationName:spin,animationDuration:tt.animation.timing1000,animationIterationCount:"infinite",animationTimingFunction:"linear",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",borderRadius:"50%",borderTopColor:nt,borderRightColor:tt.colors.backgroundTertiary,borderBottomColor:tt.colors.backgroundTertiary,borderLeftColor:tt.colors.backgroundTertiary,borderLeftWidth:ut,borderRightWidth:ut,borderTopWidth:ut,borderBottomWidth:ut,width:ct,height:ct,cursor:"wait"}});StyledSpinner.displayName="StyledSpinner";StyledSpinner.displayName="StyledSpinner";const StyledSpinnerIcon=newStyled(StyledSpinner,{shouldForwardProp:rt=>isPropValid(rt)&&!["size"].includes(rt),target:"e144pc0f0"})(({size:rt,margin:tt,padding:et,theme:nt})=>({width:nt.iconSizes[rt],height:nt.iconSizes[rt],fontSize:nt.iconSizes[rt],justifyContents:"center",margin:computeSpacingStyle(tt,nt),padding:computeSpacingStyle(et,nt),borderColor:nt.colors.borderColor,borderTopColor:nt.colors.secondary,borderWidth:nt.sizes.spinnerThickness,flexGrow:0,flexShrink:0})),StyledIcon=newStyled("span",{shouldForwardProp:rt=>isPropValid(rt)&&!["size","as"].includes(rt),target:"e144pc0f1"})(({color:rt,size:tt,margin:et,padding:nt,theme:ot})=>({color:rt||"inherit",fill:"currentColor",display:"inline-flex",alignItems:"center",justifyContents:"center",fontSize:ot.iconSizes[tt],width:ot.iconSizes[tt],height:ot.iconSizes[tt],margin:computeSpacingStyle(et,ot),padding:computeSpacingStyle(nt,ot),flexShrink:0})),StyledDynamicIcon=newStyled("span",{target:"e144pc0f2"})(({size:rt="lg",margin:tt="",padding:et="",theme:nt})=>({fill:"currentColor",display:"inline-flex",alignItems:"center",justifyContents:"center",fontSize:nt.iconSizes[rt],width:nt.iconSizes[rt],height:nt.iconSizes[rt],margin:computeSpacingStyle(tt,nt),padding:computeSpacingStyle(et,nt),flexShrink:0})),StyledImageIcon=newStyled("img",{target:"e144pc0f3"})(({})=>({width:"100%",height:"100%"})),StyledEmojiIcon=newStyled("span",{target:"e144pc0f4"})(({size:rt,margin:tt,padding:et,theme:nt,color:ot})=>({display:"inline-flex",alignItems:"center",justifyContents:"center",fontSize:nt.iconSizes[rt],width:nt.iconSizes[rt],height:nt.iconSizes[rt],margin:computeSpacingStyle(tt,nt),padding:computeSpacingStyle(et,nt),color:ot})),getDefaultProps$1=({size:rt,margin:tt,padding:et,color:nt})=>({size:rt||"md",margin:tt||"",padding:et||"",color:nt||void 0}),Icon$2=({content:rt,color:tt,size:et,margin:nt,padding:ot,testid:at})=>jsx$1(StyledIcon,{as:rt,"aria-hidden":"true","data-testid":at,...getDefaultProps$1({size:et,margin:nt,padding:ot,color:tt})}),EmojiIcon=({size:rt,margin:tt,padding:et,children:nt,color:ot,testid:at})=>jsx$1(StyledEmojiIcon,{"data-testid":at||"stIconEmoji","aria-hidden":"true",...getDefaultProps$1({size:rt,margin:tt,padding:et,color:ot}),children:nt}),StyledMaterialIcon=newStyled("span",{target:"ejhh0er0"})(({size:rt,margin:tt,padding:et,theme:nt,color:ot})=>({display:"inline-flex",alignItems:"center",justifyContents:"center",color:ot,fontSize:nt.iconSizes[rt],width:nt.iconSizes[rt],height:nt.iconSizes[rt],margin:computeSpacingStyle(tt,nt),padding:computeSpacingStyle(et,nt),userSelect:"none",fontFamily:nt.genericFonts.iconFont,fontWeight:nt.fontWeights.normal,fontStyle:"normal",lineHeight:nt.lineHeights.none,letterSpacing:"normal",textTransform:"none",whiteSpace:"nowrap",wordWrap:"normal",direction:"ltr",fontFeatureSettings:"liga",MozFontFeatureSettings:"liga",WebkitFontFeatureSettings:"liga",WebkitFontSmoothing:"antialiased"})),getDefaultProps=({size:rt,margin:tt,padding:et,color:nt})=>({size:rt||"md",margin:tt||"",padding:et||"",color:nt||"inherit"}),MaterialFontIcon=({iconName:rt,...tt})=>jsx$1(StyledMaterialIcon,{...getDefaultProps(tt),"data-testid":tt.testid||"stIconMaterial",translate:"no",children:rt});function parseIconPackEntry(rt){const tt=rt.match(/^:(.+)\/(.+):$/);if(tt===null)return{pack:"emoji",icon:rt};const et=tt[1],nt=tt[2];return{pack:et,icon:nt}}function isMaterialIcon(rt){return parseIconPackEntry(rt).pack==="material"}function getFilledStarIconSrc(){return"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBjbGlwLXBhdGg9InVybCgjY2xpcDBfMTg2MF84NDMpIj48cGF0aCBkPSJNOS45OTk5NCAxNC4zOTE2TDEzLjQ1ODMgMTYuNDgzM0MxNC4wOTE2IDE2Ljg2NjYgMTQuODY2NiAxNi4zIDE0LjY5OTkgMTUuNTgzM0wxMy43ODMzIDExLjY1TDE2Ljg0MTYgOC45OTk5N0MxNy4zOTk5IDguNTE2NjMgMTcuMDk5OSA3LjU5OTk3IDE2LjM2NjYgNy41NDE2M0wxMi4zNDE2IDcuMTk5OTdMMTAuNzY2NiAzLjQ4MzNDMTAuNDgzMyAyLjgwODMgOS41MTY2MSAyLjgwODMgOS4yMzMyNyAzLjQ4MzNMNy42NTgyNyA3LjE5MTYzTDMuNjMzMjcgNy41MzMzQzIuODk5OTQgNy41OTE2MyAyLjU5OTk0IDguNTA4MyAzLjE1ODI3IDguOTkxNjNMNi4yMTY2MSAxMS42NDE2TDUuMjk5OTQgMTUuNTc1QzUuMTMzMjcgMTYuMjkxNiA1LjkwODI3IDE2Ljg1ODMgNi41NDE2MSAxNi40NzVMOS45OTk5NCAxNC4zOTE2WiIgZmlsbD0iI0ZBQ0EyQiIvPjwvZz48ZGVmcz48Y2xpcFBhdGggaWQ9ImNsaXAwXzE4NjBfODQzIj48cmVjdCB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIGZpbGw9IndoaXRlIi8+PC9jbGlwUGF0aD48L2RlZnM+PC9zdmc+"}const DynamicIconDispatcher=({iconValue:rt,...tt})=>{const{pack:et,icon:nt}=parseIconPackEntry(rt);switch(et){case"material":switch(nt){case"star_filled":return jsx$1(StyledDynamicIcon,{...tt,children:jsx$1(StyledImageIcon,{src:getFilledStarIconSrc(),"data-testid":tt.testid||"stImageIcon"})});default:return jsx$1(StyledDynamicIcon,{...tt,children:jsx$1(MaterialFontIcon,{pack:et,iconName:nt,...tt})})}case"emoji":default:return jsx$1(StyledDynamicIcon,{...tt,children:jsx$1(EmojiIcon,{...tt,children:nt})})}},DynamicIcon=rt=>jsx$1(reactExports.Suspense,{fallback:jsx$1(StyledDynamicIcon,{...rt,children:jsx$1(EmojiIcon,{...rt,children:" "})}),children:jsx$1(DynamicIconDispatcher,{...rt})},rt.iconValue),convert=function(rt){if(rt==null)return ok$1;if(typeof rt=="string")return typeFactory(rt);if(typeof rt=="object")return Array.isArray(rt)?anyFactory$1(rt):propsFactory(rt);if(typeof rt=="function")return castFactory$1(rt);throw new Error("Expected function, string, or object as test")};function anyFactory$1(rt){const tt=[];let et=-1;for(;++et<rt.length;)tt[et]=convert(rt[et]);return castFactory$1(nt);function nt(...ot){let at=-1;for(;++at<tt.length;)if(tt[at].call(this,...ot))return!0;return!1}}function propsFactory(rt){return castFactory$1(tt);function tt(et){let nt;for(nt in rt)if(et[nt]!==rt[nt])return!1;return!0}}function typeFactory(rt){return castFactory$1(tt);function tt(et){return et&&et.type===rt}}function castFactory$1(rt){return tt;function tt(et,...nt){return!!(et&&typeof et=="object"&&"type"in et&&rt.call(this,et,...nt))}}function ok$1(){return!0}function color(rt){return rt}const CONTINUE=!0,EXIT=!1,SKIP="skip",visitParents=function(rt,tt,et,nt){typeof tt=="function"&&typeof et!="function"&&(nt=et,et=tt,tt=null);const ot=convert(tt),at=nt?-1:1;st(rt,void 0,[])();function st(ut,ct,pt){const dt=ut&&typeof ut=="object"?ut:{};if(typeof dt.type=="string"){const bt=typeof dt.tagName=="string"?dt.tagName:typeof dt.name=="string"?dt.name:void 0;Object.defineProperty(ft,"name",{value:"node ("+(ut.type+(bt?"<"+bt+">":""))+")"})}return ft;function ft(){let bt=[],ht,mt,Ot;if((!tt||ot(ut,ct,pt[pt.length-1]||null))&&(bt=toResult(et(ut,pt)),bt[0]===EXIT))return bt;if(ut.children&&bt[0]!==SKIP)for(mt=(nt?ut.children.length:-1)+at,Ot=pt.concat(ut);mt>-1&&mt<ut.children.length;){if(ht=st(ut.children[mt],mt,Ot)(),ht[0]===EXIT)return ht;mt=typeof ht[1]=="number"?ht[1]:mt+at}return bt}}};function toResult(rt){return Array.isArray(rt)?rt:typeof rt=="number"?[CONTINUE,rt]:[rt]}const visit=function(rt,tt,et,nt){typeof tt=="function"&&typeof et!="function"&&(nt=et,et=tt,tt=null),visitParents(rt,tt,ot,nt);function ot(at,st){const ut=st[st.length-1];return et(at,ut?ut.children.indexOf(at):null,ut)}},protocols=["http","https","mailto","tel"];function uriTransformer(rt){const tt=(rt||"").trim(),et=tt.charAt(0);if(et==="#"||et==="/")return tt;const nt=tt.indexOf(":");if(nt===-1)return tt;let ot=-1;for(;++ot<protocols.length;){const at=protocols[ot];if(nt===at.length&&tt.slice(0,at.length).toLowerCase()===at)return tt}return ot=tt.indexOf("?"),ot!==-1&&nt>ot||(ot=tt.indexOf("#"),ot!==-1&&nt>ot)?tt:"javascript:void(0)"}/*!
99
+ */var isBrowser$1=typeof window<"u"&&typeof document<"u"&&typeof navigator<"u",timeoutDuration=function(){for(var rt=["Edge","Trident","Firefox"],tt=0;tt<rt.length;tt+=1)if(isBrowser$1&&navigator.userAgent.indexOf(rt[tt])>=0)return 1;return 0}();function microtaskDebounce(rt){var tt=!1;return function(){tt||(tt=!0,window.Promise.resolve().then(function(){tt=!1,rt()}))}}function taskDebounce(rt){var tt=!1;return function(){tt||(tt=!0,setTimeout(function(){tt=!1,rt()},timeoutDuration))}}var supportsMicroTasks=isBrowser$1&&window.Promise,debounce$3=supportsMicroTasks?microtaskDebounce:taskDebounce;function isFunction$4(rt){var tt={};return rt&&tt.toString.call(rt)==="[object Function]"}function getStyleComputedProperty(rt,tt){if(rt.nodeType!==1)return[];var et=rt.ownerDocument.defaultView,nt=et.getComputedStyle(rt,null);return tt?nt[tt]:nt}function getParentNode$1(rt){return rt.nodeName==="HTML"?rt:rt.parentNode||rt.host}function getScrollParent(rt){if(!rt)return document.body;switch(rt.nodeName){case"HTML":case"BODY":return rt.ownerDocument.body;case"#document":return rt.body}var tt=getStyleComputedProperty(rt),et=tt.overflow,nt=tt.overflowX,ot=tt.overflowY;return/(auto|scroll|overlay)/.test(et+ot+nt)?rt:getScrollParent(getParentNode$1(rt))}function getReferenceNode(rt){return rt&&rt.referenceNode?rt.referenceNode:rt}var isIE11=isBrowser$1&&!!(window.MSInputMethodContext&&document.documentMode),isIE10=isBrowser$1&&/MSIE 10/.test(navigator.userAgent);function isIE$1(rt){return rt===11?isIE11:rt===10?isIE10:isIE11||isIE10}function getOffsetParent(rt){if(!rt)return document.documentElement;for(var tt=isIE$1(10)?document.body:null,et=rt.offsetParent||null;et===tt&&rt.nextElementSibling;)et=(rt=rt.nextElementSibling).offsetParent;var nt=et&&et.nodeName;return!nt||nt==="BODY"||nt==="HTML"?rt?rt.ownerDocument.documentElement:document.documentElement:["TH","TD","TABLE"].indexOf(et.nodeName)!==-1&&getStyleComputedProperty(et,"position")==="static"?getOffsetParent(et):et}function isOffsetContainer(rt){var tt=rt.nodeName;return tt==="BODY"?!1:tt==="HTML"||getOffsetParent(rt.firstElementChild)===rt}function getRoot(rt){return rt.parentNode!==null?getRoot(rt.parentNode):rt}function findCommonOffsetParent(rt,tt){if(!rt||!rt.nodeType||!tt||!tt.nodeType)return document.documentElement;var et=rt.compareDocumentPosition(tt)&Node.DOCUMENT_POSITION_FOLLOWING,nt=et?rt:tt,ot=et?tt:rt,at=document.createRange();at.setStart(nt,0),at.setEnd(ot,0);var st=at.commonAncestorContainer;if(rt!==st&&tt!==st||nt.contains(ot))return isOffsetContainer(st)?st:getOffsetParent(st);var ut=getRoot(rt);return ut.host?findCommonOffsetParent(ut.host,tt):findCommonOffsetParent(rt,getRoot(tt).host)}function getScroll(rt){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"top",et=tt==="top"?"scrollTop":"scrollLeft",nt=rt.nodeName;if(nt==="BODY"||nt==="HTML"){var ot=rt.ownerDocument.documentElement,at=rt.ownerDocument.scrollingElement||ot;return at[et]}return rt[et]}function includeScroll(rt,tt){var et=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,nt=getScroll(tt,"top"),ot=getScroll(tt,"left"),at=et?-1:1;return rt.top+=nt*at,rt.bottom+=nt*at,rt.left+=ot*at,rt.right+=ot*at,rt}function getBordersSize(rt,tt){var et=tt==="x"?"Left":"Top",nt=et==="Left"?"Right":"Bottom";return parseFloat(rt["border"+et+"Width"])+parseFloat(rt["border"+nt+"Width"])}function getSize(rt,tt,et,nt){return Math.max(tt["offset"+rt],tt["scroll"+rt],et["client"+rt],et["offset"+rt],et["scroll"+rt],isIE$1(10)?parseInt(et["offset"+rt])+parseInt(nt["margin"+(rt==="Height"?"Top":"Left")])+parseInt(nt["margin"+(rt==="Height"?"Bottom":"Right")]):0)}function getWindowSizes(rt){var tt=rt.body,et=rt.documentElement,nt=isIE$1(10)&&getComputedStyle(et);return{height:getSize("Height",tt,et,nt),width:getSize("Width",tt,et,nt)}}var classCallCheck$1=function(rt,tt){if(!(rt instanceof tt))throw new TypeError("Cannot call a class as a function")},createClass$2=function(){function rt(tt,et){for(var nt=0;nt<et.length;nt++){var ot=et[nt];ot.enumerable=ot.enumerable||!1,ot.configurable=!0,"value"in ot&&(ot.writable=!0),Object.defineProperty(tt,ot.key,ot)}}return function(tt,et,nt){return et&&rt(tt.prototype,et),nt&&rt(tt,nt),tt}}(),defineProperty$4=function(rt,tt,et){return tt in rt?Object.defineProperty(rt,tt,{value:et,enumerable:!0,configurable:!0,writable:!0}):rt[tt]=et,rt},_extends$K=Object.assign||function(rt){for(var tt=1;tt<arguments.length;tt++){var et=arguments[tt];for(var nt in et)Object.prototype.hasOwnProperty.call(et,nt)&&(rt[nt]=et[nt])}return rt};function getClientRect(rt){return _extends$K({},rt,{right:rt.left+rt.width,bottom:rt.top+rt.height})}function getBoundingClientRect(rt){var tt={};try{if(isIE$1(10)){tt=rt.getBoundingClientRect();var et=getScroll(rt,"top"),nt=getScroll(rt,"left");tt.top+=et,tt.left+=nt,tt.bottom+=et,tt.right+=nt}else tt=rt.getBoundingClientRect()}catch{}var ot={left:tt.left,top:tt.top,width:tt.right-tt.left,height:tt.bottom-tt.top},at=rt.nodeName==="HTML"?getWindowSizes(rt.ownerDocument):{},st=at.width||rt.clientWidth||ot.width,ut=at.height||rt.clientHeight||ot.height,ct=rt.offsetWidth-st,pt=rt.offsetHeight-ut;if(ct||pt){var dt=getStyleComputedProperty(rt);ct-=getBordersSize(dt,"x"),pt-=getBordersSize(dt,"y"),ot.width-=ct,ot.height-=pt}return getClientRect(ot)}function getOffsetRectRelativeToArbitraryNode(rt,tt){var et=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,nt=isIE$1(10),ot=tt.nodeName==="HTML",at=getBoundingClientRect(rt),st=getBoundingClientRect(tt),ut=getScrollParent(rt),ct=getStyleComputedProperty(tt),pt=parseFloat(ct.borderTopWidth),dt=parseFloat(ct.borderLeftWidth);et&&ot&&(st.top=Math.max(st.top,0),st.left=Math.max(st.left,0));var ft=getClientRect({top:at.top-st.top-pt,left:at.left-st.left-dt,width:at.width,height:at.height});if(ft.marginTop=0,ft.marginLeft=0,!nt&&ot){var bt=parseFloat(ct.marginTop),ht=parseFloat(ct.marginLeft);ft.top-=pt-bt,ft.bottom-=pt-bt,ft.left-=dt-ht,ft.right-=dt-ht,ft.marginTop=bt,ft.marginLeft=ht}return(nt&&!et?tt.contains(ut):tt===ut&&ut.nodeName!=="BODY")&&(ft=includeScroll(ft,tt)),ft}function getViewportOffsetRectRelativeToArtbitraryNode(rt){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,et=rt.ownerDocument.documentElement,nt=getOffsetRectRelativeToArbitraryNode(rt,et),ot=Math.max(et.clientWidth,window.innerWidth||0),at=Math.max(et.clientHeight,window.innerHeight||0),st=tt?0:getScroll(et),ut=tt?0:getScroll(et,"left"),ct={top:st-nt.top+nt.marginTop,left:ut-nt.left+nt.marginLeft,width:ot,height:at};return getClientRect(ct)}function isFixed$1(rt){var tt=rt.nodeName;if(tt==="BODY"||tt==="HTML")return!1;if(getStyleComputedProperty(rt,"position")==="fixed")return!0;var et=getParentNode$1(rt);return et?isFixed$1(et):!1}function getFixedPositionOffsetParent(rt){if(!rt||!rt.parentElement||isIE$1())return document.documentElement;for(var tt=rt.parentElement;tt&&getStyleComputedProperty(tt,"transform")==="none";)tt=tt.parentElement;return tt||document.documentElement}function getBoundaries(rt,tt,et,nt){var ot=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,at={top:0,left:0},st=ot?getFixedPositionOffsetParent(rt):findCommonOffsetParent(rt,getReferenceNode(tt));if(nt==="viewport")at=getViewportOffsetRectRelativeToArtbitraryNode(st,ot);else{var ut=void 0;nt==="scrollParent"?(ut=getScrollParent(getParentNode$1(tt)),ut.nodeName==="BODY"&&(ut=rt.ownerDocument.documentElement)):nt==="window"?ut=rt.ownerDocument.documentElement:ut=nt;var ct=getOffsetRectRelativeToArbitraryNode(ut,st,ot);if(ut.nodeName==="HTML"&&!isFixed$1(st)){var pt=getWindowSizes(rt.ownerDocument),dt=pt.height,ft=pt.width;at.top+=ct.top-ct.marginTop,at.bottom=dt+ct.top,at.left+=ct.left-ct.marginLeft,at.right=ft+ct.left}else at=ct}et=et||0;var bt=typeof et=="number";return at.left+=bt?et:et.left||0,at.top+=bt?et:et.top||0,at.right-=bt?et:et.right||0,at.bottom-=bt?et:et.bottom||0,at}function getArea(rt){var tt=rt.width,et=rt.height;return tt*et}function computeAutoPlacement(rt,tt,et,nt,ot){var at=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0;if(rt.indexOf("auto")===-1)return rt;var st=getBoundaries(et,nt,at,ot),ut={top:{width:st.width,height:tt.top-st.top},right:{width:st.right-tt.right,height:st.height},bottom:{width:st.width,height:st.bottom-tt.bottom},left:{width:tt.left-st.left,height:st.height}},ct=Object.keys(ut).map(function(bt){return _extends$K({key:bt},ut[bt],{area:getArea(ut[bt])})}).sort(function(bt,ht){return ht.area-bt.area}),pt=ct.filter(function(bt){var ht=bt.width,mt=bt.height;return ht>=et.clientWidth&&mt>=et.clientHeight}),dt=pt.length>0?pt[0].key:ct[0].key,ft=rt.split("-")[1];return dt+(ft?"-"+ft:"")}function getReferenceOffsets(rt,tt,et){var nt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,ot=nt?getFixedPositionOffsetParent(tt):findCommonOffsetParent(tt,getReferenceNode(et));return getOffsetRectRelativeToArbitraryNode(et,ot,nt)}function getOuterSizes(rt){var tt=rt.ownerDocument.defaultView,et=tt.getComputedStyle(rt),nt=parseFloat(et.marginTop||0)+parseFloat(et.marginBottom||0),ot=parseFloat(et.marginLeft||0)+parseFloat(et.marginRight||0),at={width:rt.offsetWidth+ot,height:rt.offsetHeight+nt};return at}function getOppositePlacement(rt){var tt={left:"right",right:"left",bottom:"top",top:"bottom"};return rt.replace(/left|right|bottom|top/g,function(et){return tt[et]})}function getPopperOffsets(rt,tt,et){et=et.split("-")[0];var nt=getOuterSizes(rt),ot={width:nt.width,height:nt.height},at=["right","left"].indexOf(et)!==-1,st=at?"top":"left",ut=at?"left":"top",ct=at?"height":"width",pt=at?"width":"height";return ot[st]=tt[st]+tt[ct]/2-nt[ct]/2,et===ut?ot[ut]=tt[ut]-nt[pt]:ot[ut]=tt[getOppositePlacement(ut)],ot}function find$1(rt,tt){return Array.prototype.find?rt.find(tt):rt.filter(tt)[0]}function findIndex(rt,tt,et){if(Array.prototype.findIndex)return rt.findIndex(function(ot){return ot[tt]===et});var nt=find$1(rt,function(ot){return ot[tt]===et});return rt.indexOf(nt)}function runModifiers(rt,tt,et){var nt=et===void 0?rt:rt.slice(0,findIndex(rt,"name",et));return nt.forEach(function(ot){ot.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var at=ot.function||ot.fn;ot.enabled&&isFunction$4(at)&&(tt.offsets.popper=getClientRect(tt.offsets.popper),tt.offsets.reference=getClientRect(tt.offsets.reference),tt=at(tt,ot))}),tt}function update(){if(!this.state.isDestroyed){var rt={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};rt.offsets.reference=getReferenceOffsets(this.state,this.popper,this.reference,this.options.positionFixed),rt.placement=computeAutoPlacement(this.options.placement,rt.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),rt.originalPlacement=rt.placement,rt.positionFixed=this.options.positionFixed,rt.offsets.popper=getPopperOffsets(this.popper,rt.offsets.reference,rt.placement),rt.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",rt=runModifiers(this.modifiers,rt),this.state.isCreated?this.options.onUpdate(rt):(this.state.isCreated=!0,this.options.onCreate(rt))}}function isModifierEnabled(rt,tt){return rt.some(function(et){var nt=et.name,ot=et.enabled;return ot&&nt===tt})}function getSupportedPropertyName(rt){for(var tt=[!1,"ms","Webkit","Moz","O"],et=rt.charAt(0).toUpperCase()+rt.slice(1),nt=0;nt<tt.length;nt++){var ot=tt[nt],at=ot?""+ot+et:rt;if(typeof document.body.style[at]<"u")return at}return null}function destroy(){return this.state.isDestroyed=!0,isModifierEnabled(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[getSupportedPropertyName("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function getWindow(rt){var tt=rt.ownerDocument;return tt?tt.defaultView:window}function attachToScrollParents(rt,tt,et,nt){var ot=rt.nodeName==="BODY",at=ot?rt.ownerDocument.defaultView:rt;at.addEventListener(tt,et,{passive:!0}),ot||attachToScrollParents(getScrollParent(at.parentNode),tt,et,nt),nt.push(at)}function setupEventListeners(rt,tt,et,nt){et.updateBound=nt,getWindow(rt).addEventListener("resize",et.updateBound,{passive:!0});var ot=getScrollParent(rt);return attachToScrollParents(ot,"scroll",et.updateBound,et.scrollParents),et.scrollElement=ot,et.eventsEnabled=!0,et}function enableEventListeners(){this.state.eventsEnabled||(this.state=setupEventListeners(this.reference,this.options,this.state,this.scheduleUpdate))}function removeEventListeners(rt,tt){return getWindow(rt).removeEventListener("resize",tt.updateBound),tt.scrollParents.forEach(function(et){et.removeEventListener("scroll",tt.updateBound)}),tt.updateBound=null,tt.scrollParents=[],tt.scrollElement=null,tt.eventsEnabled=!1,tt}function disableEventListeners(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=removeEventListeners(this.reference,this.state))}function isNumeric(rt){return rt!==""&&!isNaN(parseFloat(rt))&&isFinite(rt)}function setStyles(rt,tt){Object.keys(tt).forEach(function(et){var nt="";["width","height","top","right","bottom","left"].indexOf(et)!==-1&&isNumeric(tt[et])&&(nt="px"),rt.style[et]=tt[et]+nt})}function setAttributes(rt,tt){Object.keys(tt).forEach(function(et){var nt=tt[et];nt!==!1?rt.setAttribute(et,tt[et]):rt.removeAttribute(et)})}function applyStyle(rt){return setStyles(rt.instance.popper,rt.styles),setAttributes(rt.instance.popper,rt.attributes),rt.arrowElement&&Object.keys(rt.arrowStyles).length&&setStyles(rt.arrowElement,rt.arrowStyles),rt}function applyStyleOnLoad(rt,tt,et,nt,ot){var at=getReferenceOffsets(ot,tt,rt,et.positionFixed),st=computeAutoPlacement(et.placement,at,tt,rt,et.modifiers.flip.boundariesElement,et.modifiers.flip.padding);return tt.setAttribute("x-placement",st),setStyles(tt,{position:et.positionFixed?"fixed":"absolute"}),et}function getRoundedOffsets(rt,tt){var et=rt.offsets,nt=et.popper,ot=et.reference,at=Math.round,st=Math.floor,ut=function(Mt){return Mt},ct=at(ot.width),pt=at(nt.width),dt=["left","right"].indexOf(rt.placement)!==-1,ft=rt.placement.indexOf("-")!==-1,bt=ct%2===pt%2,ht=ct%2===1&&pt%2===1,mt=tt?dt||ft||bt?at:st:ut,Ot=tt?at:ut;return{left:mt(ht&&!ft&&tt?nt.left-1:nt.left),top:Ot(nt.top),bottom:Ot(nt.bottom),right:mt(nt.right)}}var isFirefox$1=isBrowser$1&&/Firefox/i.test(navigator.userAgent);function computeStyle(rt,tt){var et=tt.x,nt=tt.y,ot=rt.offsets.popper,at=find$1(rt.instance.modifiers,function(St){return St.name==="applyStyle"}).gpuAcceleration;at!==void 0&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var st=at!==void 0?at:tt.gpuAcceleration,ut=getOffsetParent(rt.instance.popper),ct=getBoundingClientRect(ut),pt={position:ot.position},dt=getRoundedOffsets(rt,window.devicePixelRatio<2||!isFirefox$1),ft=et==="bottom"?"top":"bottom",bt=nt==="right"?"left":"right",ht=getSupportedPropertyName("transform"),mt=void 0,Ot=void 0;if(ft==="bottom"?ut.nodeName==="HTML"?Ot=-ut.clientHeight+dt.bottom:Ot=-ct.height+dt.bottom:Ot=dt.top,bt==="right"?ut.nodeName==="HTML"?mt=-ut.clientWidth+dt.right:mt=-ct.width+dt.right:mt=dt.left,st&&ht)pt[ht]="translate3d("+mt+"px, "+Ot+"px, 0)",pt[ft]=0,pt[bt]=0,pt.willChange="transform";else{var yt=ft==="bottom"?-1:1,Mt=bt==="right"?-1:1;pt[ft]=Ot*yt,pt[bt]=mt*Mt,pt.willChange=ft+", "+bt}var At={"x-placement":rt.placement};return rt.attributes=_extends$K({},At,rt.attributes),rt.styles=_extends$K({},pt,rt.styles),rt.arrowStyles=_extends$K({},rt.offsets.arrow,rt.arrowStyles),rt}function isModifierRequired(rt,tt,et){var nt=find$1(rt,function(ut){var ct=ut.name;return ct===tt}),ot=!!nt&&rt.some(function(ut){return ut.name===et&&ut.enabled&&ut.order<nt.order});if(!ot){var at="`"+tt+"`",st="`"+et+"`";console.warn(st+" modifier is required by "+at+" modifier in order to work, be sure to include it before "+at+"!")}return ot}function arrow(rt,tt){var et;if(!isModifierRequired(rt.instance.modifiers,"arrow","keepTogether"))return rt;var nt=tt.element;if(typeof nt=="string"){if(nt=rt.instance.popper.querySelector(nt),!nt)return rt}else if(!rt.instance.popper.contains(nt))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),rt;var ot=rt.placement.split("-")[0],at=rt.offsets,st=at.popper,ut=at.reference,ct=["left","right"].indexOf(ot)!==-1,pt=ct?"height":"width",dt=ct?"Top":"Left",ft=dt.toLowerCase(),bt=ct?"left":"top",ht=ct?"bottom":"right",mt=getOuterSizes(nt)[pt];ut[ht]-mt<st[ft]&&(rt.offsets.popper[ft]-=st[ft]-(ut[ht]-mt)),ut[ft]+mt>st[ht]&&(rt.offsets.popper[ft]+=ut[ft]+mt-st[ht]),rt.offsets.popper=getClientRect(rt.offsets.popper);var Ot=ut[ft]+ut[pt]/2-mt/2,yt=getStyleComputedProperty(rt.instance.popper),Mt=parseFloat(yt["margin"+dt]),At=parseFloat(yt["border"+dt+"Width"]),St=Ot-rt.offsets.popper[ft]-Mt-At;return St=Math.max(Math.min(st[pt]-mt,St),0),rt.arrowElement=nt,rt.offsets.arrow=(et={},defineProperty$4(et,ft,Math.round(St)),defineProperty$4(et,bt,""),et),rt}function getOppositeVariation(rt){return rt==="end"?"start":rt==="start"?"end":rt}var placements=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],validPlacements=placements.slice(3);function clockwise(rt){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,et=validPlacements.indexOf(rt),nt=validPlacements.slice(et+1).concat(validPlacements.slice(0,et));return tt?nt.reverse():nt}var BEHAVIORS={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function flip$1(rt,tt){if(isModifierEnabled(rt.instance.modifiers,"inner")||rt.flipped&&rt.placement===rt.originalPlacement)return rt;var et=getBoundaries(rt.instance.popper,rt.instance.reference,tt.padding,tt.boundariesElement,rt.positionFixed),nt=rt.placement.split("-")[0],ot=getOppositePlacement(nt),at=rt.placement.split("-")[1]||"",st=[];switch(tt.behavior){case BEHAVIORS.FLIP:st=[nt,ot];break;case BEHAVIORS.CLOCKWISE:st=clockwise(nt);break;case BEHAVIORS.COUNTERCLOCKWISE:st=clockwise(nt,!0);break;default:st=tt.behavior}return st.forEach(function(ut,ct){if(nt!==ut||st.length===ct+1)return rt;nt=rt.placement.split("-")[0],ot=getOppositePlacement(nt);var pt=rt.offsets.popper,dt=rt.offsets.reference,ft=Math.floor,bt=nt==="left"&&ft(pt.right)>ft(dt.left)||nt==="right"&&ft(pt.left)<ft(dt.right)||nt==="top"&&ft(pt.bottom)>ft(dt.top)||nt==="bottom"&&ft(pt.top)<ft(dt.bottom),ht=ft(pt.left)<ft(et.left),mt=ft(pt.right)>ft(et.right),Ot=ft(pt.top)<ft(et.top),yt=ft(pt.bottom)>ft(et.bottom),Mt=nt==="left"&&ht||nt==="right"&&mt||nt==="top"&&Ot||nt==="bottom"&&yt,At=["top","bottom"].indexOf(nt)!==-1,St=!!tt.flipVariations&&(At&&at==="start"&&ht||At&&at==="end"&&mt||!At&&at==="start"&&Ot||!At&&at==="end"&&yt),Et=!!tt.flipVariationsByContent&&(At&&at==="start"&&mt||At&&at==="end"&&ht||!At&&at==="start"&&yt||!At&&at==="end"&&Ot),zt=St||Et;(bt||Mt||zt)&&(rt.flipped=!0,(bt||Mt)&&(nt=st[ct+1]),zt&&(at=getOppositeVariation(at)),rt.placement=nt+(at?"-"+at:""),rt.offsets.popper=_extends$K({},rt.offsets.popper,getPopperOffsets(rt.instance.popper,rt.offsets.reference,rt.placement)),rt=runModifiers(rt.instance.modifiers,rt,"flip"))}),rt}function keepTogether(rt){var tt=rt.offsets,et=tt.popper,nt=tt.reference,ot=rt.placement.split("-")[0],at=Math.floor,st=["top","bottom"].indexOf(ot)!==-1,ut=st?"right":"bottom",ct=st?"left":"top",pt=st?"width":"height";return et[ut]<at(nt[ct])&&(rt.offsets.popper[ct]=at(nt[ct])-et[pt]),et[ct]>at(nt[ut])&&(rt.offsets.popper[ct]=at(nt[ut])),rt}function toValue(rt,tt,et,nt){var ot=rt.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),at=+ot[1],st=ot[2];if(!at)return rt;if(st.indexOf("%")===0){var ut=void 0;switch(st){case"%p":ut=et;break;case"%":case"%r":default:ut=nt}var ct=getClientRect(ut);return ct[tt]/100*at}else if(st==="vh"||st==="vw"){var pt=void 0;return st==="vh"?pt=Math.max(document.documentElement.clientHeight,window.innerHeight||0):pt=Math.max(document.documentElement.clientWidth,window.innerWidth||0),pt/100*at}else return at}function parseOffset(rt,tt,et,nt){var ot=[0,0],at=["right","left"].indexOf(nt)!==-1,st=rt.split(/(\+|\-)/).map(function(dt){return dt.trim()}),ut=st.indexOf(find$1(st,function(dt){return dt.search(/,|\s/)!==-1}));st[ut]&&st[ut].indexOf(",")===-1&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var ct=/\s*,\s*|\s+/,pt=ut!==-1?[st.slice(0,ut).concat([st[ut].split(ct)[0]]),[st[ut].split(ct)[1]].concat(st.slice(ut+1))]:[st];return pt=pt.map(function(dt,ft){var bt=(ft===1?!at:at)?"height":"width",ht=!1;return dt.reduce(function(mt,Ot){return mt[mt.length-1]===""&&["+","-"].indexOf(Ot)!==-1?(mt[mt.length-1]=Ot,ht=!0,mt):ht?(mt[mt.length-1]+=Ot,ht=!1,mt):mt.concat(Ot)},[]).map(function(mt){return toValue(mt,bt,tt,et)})}),pt.forEach(function(dt,ft){dt.forEach(function(bt,ht){isNumeric(bt)&&(ot[ft]+=bt*(dt[ht-1]==="-"?-1:1))})}),ot}function offset$1(rt,tt){var et=tt.offset,nt=rt.placement,ot=rt.offsets,at=ot.popper,st=ot.reference,ut=nt.split("-")[0],ct=void 0;return isNumeric(+et)?ct=[+et,0]:ct=parseOffset(et,at,st,ut),ut==="left"?(at.top+=ct[0],at.left-=ct[1]):ut==="right"?(at.top+=ct[0],at.left+=ct[1]):ut==="top"?(at.left+=ct[0],at.top-=ct[1]):ut==="bottom"&&(at.left+=ct[0],at.top+=ct[1]),rt.popper=at,rt}function preventOverflow(rt,tt){var et=tt.boundariesElement||getOffsetParent(rt.instance.popper);rt.instance.reference===et&&(et=getOffsetParent(et));var nt=getSupportedPropertyName("transform"),ot=rt.instance.popper.style,at=ot.top,st=ot.left,ut=ot[nt];ot.top="",ot.left="",ot[nt]="";var ct=getBoundaries(rt.instance.popper,rt.instance.reference,tt.padding,et,rt.positionFixed);ot.top=at,ot.left=st,ot[nt]=ut,tt.boundaries=ct;var pt=tt.priority,dt=rt.offsets.popper,ft={primary:function(ht){var mt=dt[ht];return dt[ht]<ct[ht]&&!tt.escapeWithReference&&(mt=Math.max(dt[ht],ct[ht])),defineProperty$4({},ht,mt)},secondary:function(ht){var mt=ht==="right"?"left":"top",Ot=dt[mt];return dt[ht]>ct[ht]&&!tt.escapeWithReference&&(Ot=Math.min(dt[mt],ct[ht]-(ht==="right"?dt.width:dt.height))),defineProperty$4({},mt,Ot)}};return pt.forEach(function(bt){var ht=["left","top"].indexOf(bt)!==-1?"primary":"secondary";dt=_extends$K({},dt,ft[ht](bt))}),rt.offsets.popper=dt,rt}function shift(rt){var tt=rt.placement,et=tt.split("-")[0],nt=tt.split("-")[1];if(nt){var ot=rt.offsets,at=ot.reference,st=ot.popper,ut=["bottom","top"].indexOf(et)!==-1,ct=ut?"left":"top",pt=ut?"width":"height",dt={start:defineProperty$4({},ct,at[ct]),end:defineProperty$4({},ct,at[ct]+at[pt]-st[pt])};rt.offsets.popper=_extends$K({},st,dt[nt])}return rt}function hide(rt){if(!isModifierRequired(rt.instance.modifiers,"hide","preventOverflow"))return rt;var tt=rt.offsets.reference,et=find$1(rt.instance.modifiers,function(nt){return nt.name==="preventOverflow"}).boundaries;if(tt.bottom<et.top||tt.left>et.right||tt.top>et.bottom||tt.right<et.left){if(rt.hide===!0)return rt;rt.hide=!0,rt.attributes["x-out-of-boundaries"]=""}else{if(rt.hide===!1)return rt;rt.hide=!1,rt.attributes["x-out-of-boundaries"]=!1}return rt}function inner$1(rt){var tt=rt.placement,et=tt.split("-")[0],nt=rt.offsets,ot=nt.popper,at=nt.reference,st=["left","right"].indexOf(et)!==-1,ut=["top","left"].indexOf(et)===-1;return ot[st?"left":"top"]=at[et]-(ut?ot[st?"width":"height"]:0),rt.placement=getOppositePlacement(tt),rt.offsets.popper=getClientRect(ot),rt}var modifiers={shift:{order:100,enabled:!0,fn:shift},offset:{order:200,enabled:!0,fn:offset$1,offset:0},preventOverflow:{order:300,enabled:!0,fn:preventOverflow,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:keepTogether},arrow:{order:500,enabled:!0,fn:arrow,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:flip$1,behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:inner$1},hide:{order:800,enabled:!0,fn:hide},computeStyle:{order:850,enabled:!0,fn:computeStyle,gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:applyStyle,onLoad:applyStyleOnLoad,gpuAcceleration:void 0}},Defaults={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function rt(){},onUpdate:function rt(){},modifiers},Popper=function(){function rt(tt,et){var nt=this,ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};classCallCheck$1(this,rt),this.scheduleUpdate=function(){return requestAnimationFrame(nt.update)},this.update=debounce$3(this.update.bind(this)),this.options=_extends$K({},rt.Defaults,ot),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=tt&&tt.jquery?tt[0]:tt,this.popper=et&&et.jquery?et[0]:et,this.options.modifiers={},Object.keys(_extends$K({},rt.Defaults.modifiers,ot.modifiers)).forEach(function(st){nt.options.modifiers[st]=_extends$K({},rt.Defaults.modifiers[st]||{},ot.modifiers?ot.modifiers[st]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(st){return _extends$K({name:st},nt.options.modifiers[st])}).sort(function(st,ut){return st.order-ut.order}),this.modifiers.forEach(function(st){st.enabled&&isFunction$4(st.onLoad)&&st.onLoad(nt.reference,nt.popper,nt.options,st,nt.state)}),this.update();var at=this.options.eventsEnabled;at&&this.enableEventListeners(),this.state.eventsEnabled=at}return createClass$2(rt,[{key:"update",value:function(){return update.call(this)}},{key:"destroy",value:function(){return destroy.call(this)}},{key:"enableEventListeners",value:function(){return enableEventListeners.call(this)}},{key:"disableEventListeners",value:function(){return disableEventListeners.call(this)}}]),rt}();Popper.Utils=(typeof window<"u"?window:global).PopperUtils;Popper.placements=placements;Popper.Defaults=Defaults;function toPopperPlacement(rt){return rt.replace(/(Top|Left)$/,"-start").replace(/(Right|Bottom)$/,"-end")}function parsePopperOffset(rt){return{top:Math.floor(rt.top||0),left:Math.floor(rt.left||0)}}var TETHER_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"};function _typeof$i(rt){"@babel/helpers - typeof";return _typeof$i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(tt){return typeof tt}:function(tt){return tt&&typeof Symbol=="function"&&tt.constructor===Symbol&&tt!==Symbol.prototype?"symbol":typeof tt},_typeof$i(rt)}var _excluded$m=["modifiers"];function ownKeys$p(rt,tt){var et=Object.keys(rt);if(Object.getOwnPropertySymbols){var nt=Object.getOwnPropertySymbols(rt);tt&&(nt=nt.filter(function(ot){return Object.getOwnPropertyDescriptor(rt,ot).enumerable})),et.push.apply(et,nt)}return et}function _objectSpread$o(rt){for(var tt=1;tt<arguments.length;tt++){var et=arguments[tt]!=null?arguments[tt]:{};tt%2?ownKeys$p(Object(et),!0).forEach(function(nt){_defineProperty$w(rt,nt,et[nt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(rt,Object.getOwnPropertyDescriptors(et)):ownKeys$p(Object(et)).forEach(function(nt){Object.defineProperty(rt,nt,Object.getOwnPropertyDescriptor(et,nt))})}return rt}function _objectWithoutProperties$t(rt,tt){if(rt==null)return{};var et=_objectWithoutPropertiesLoose$r(rt,tt),nt,ot;if(Object.getOwnPropertySymbols){var at=Object.getOwnPropertySymbols(rt);for(ot=0;ot<at.length;ot++)nt=at[ot],!(tt.indexOf(nt)>=0)&&Object.prototype.propertyIsEnumerable.call(rt,nt)&&(et[nt]=rt[nt])}return et}function _objectWithoutPropertiesLoose$r(rt,tt){if(rt==null)return{};var et={},nt=Object.keys(rt),ot,at;for(at=0;at<nt.length;at++)ot=nt[at],!(tt.indexOf(ot)>=0)&&(et[ot]=rt[ot]);return et}function _classCallCheck$o(rt,tt){if(!(rt instanceof tt))throw new TypeError("Cannot call a class as a function")}function _defineProperties$e(rt,tt){for(var et=0;et<tt.length;et++){var nt=tt[et];nt.enumerable=nt.enumerable||!1,nt.configurable=!0,"value"in nt&&(nt.writable=!0),Object.defineProperty(rt,nt.key,nt)}}function _createClass$m(rt,tt,et){return tt&&_defineProperties$e(rt.prototype,tt),Object.defineProperty(rt,"prototype",{writable:!1}),rt}function _inherits$o(rt,tt){if(typeof tt!="function"&&tt!==null)throw new TypeError("Super expression must either be null or a function");rt.prototype=Object.create(tt&&tt.prototype,{constructor:{value:rt,writable:!0,configurable:!0}}),Object.defineProperty(rt,"prototype",{writable:!1}),tt&&_setPrototypeOf$f(rt,tt)}function _setPrototypeOf$f(rt,tt){return _setPrototypeOf$f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(nt,ot){return nt.__proto__=ot,nt},_setPrototypeOf$f(rt,tt)}function _createSuper$d(rt){var tt=_isNativeReflectConstruct$d();return function(){var nt=_getPrototypeOf$e(rt),ot;if(tt){var at=_getPrototypeOf$e(this).constructor;ot=Reflect.construct(nt,arguments,at)}else ot=nt.apply(this,arguments);return _possibleConstructorReturn$o(this,ot)}}function _possibleConstructorReturn$o(rt,tt){if(tt&&(_typeof$i(tt)==="object"||typeof tt=="function"))return tt;if(tt!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$f(rt)}function _assertThisInitialized$f(rt){if(rt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return rt}function _isNativeReflectConstruct$d(){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$e(rt){return _getPrototypeOf$e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(et){return et.__proto__||Object.getPrototypeOf(et)},_getPrototypeOf$e(rt)}function _defineProperty$w(rt,tt,et){return tt in rt?Object.defineProperty(rt,tt,{value:et,enumerable:!0,configurable:!0,writable:!0}):rt[tt]=et,rt}var Tether=function(rt){_inherits$o(et,rt);var tt=_createSuper$d(et);function et(){var nt;_classCallCheck$o(this,et);for(var ot=arguments.length,at=new Array(ot),st=0;st<ot;st++)at[st]=arguments[st];return nt=tt.call.apply(tt,[this].concat(at)),_defineProperty$w(_assertThisInitialized$f(nt),"popper",void 0),_defineProperty$w(_assertThisInitialized$f(nt),"popperHeight",0),_defineProperty$w(_assertThisInitialized$f(nt),"popperWidth",0),_defineProperty$w(_assertThisInitialized$f(nt),"anchorHeight",0),_defineProperty$w(_assertThisInitialized$f(nt),"anchorWidth",0),_defineProperty$w(_assertThisInitialized$f(nt),"state",{isMounted:!1}),_defineProperty$w(_assertThisInitialized$f(nt),"onPopperUpdate",function(ut){var ct={popper:parsePopperOffset(ut.offsets.popper),arrow:ut.offsets.arrow?parsePopperOffset(ut.offsets.arrow):{top:0,left:0}};nt.props.onPopperUpdate(ct,ut)}),nt}return _createClass$m(et,[{key:"componentDidMount",value:function(){this.setState({isMounted:!0})}},{key:"componentDidUpdate",value:function(ot,at){if(this.props.anchorRef){var st=this.props.anchorRef.getBoundingClientRect(),ut=st.height,ct=st.width;(this.anchorHeight!==ut||this.anchorWidth!==ct)&&(this.anchorHeight=ut,this.anchorWidth=ct,this.popper&&this.popper.scheduleUpdate())}if(this.props.popperRef){var pt=this.props.popperRef.getBoundingClientRect(),dt=pt.height,ft=pt.width;(this.popperHeight!==dt||this.popperWidth!==ft)&&(this.popperHeight=dt,this.popperWidth=ft,this.popper&&this.popper.scheduleUpdate()),this.state.isMounted!==at.isMounted&&this.props.anchorRef&&this.initializePopper()}}},{key:"componentWillUnmount",value:function(){this.destroyPopover()}},{key:"initializePopper",value:function(){var ot=this.props,at=ot.placement,st=ot.popperOptions,ut=st.modifiers,ct=_objectWithoutProperties$t(st,_excluded$m);!this.props.anchorRef||!this.props.popperRef||(this.popper=new Popper(this.props.anchorRef,this.props.popperRef,_objectSpread$o({placement:toPopperPlacement(at),modifiers:_objectSpread$o({arrow:{element:this.props.arrowRef,enabled:!!this.props.arrowRef},computeStyle:{gpuAcceleration:!1},applyStyle:{enabled:!1},applyReactStyle:{enabled:!0,fn:this.onPopperUpdate,order:900},preventOverflow:{enabled:!0}},ut)},ct)))}},{key:"destroyPopover",value:function(){this.popper&&(this.popper.destroy(),delete this.popper)}},{key:"render",value:function(){return this.props.children||null}}]),et}(reactExports.Component);_defineProperty$w(Tether,"defaultProps",{anchorRef:null,onPopperUpdate:function rt(){return null},placement:TETHER_PLACEMENT.auto,popperRef:null,popperOptions:{}});var BaseProvider=function rt(tt){var et=tt.children,nt=tt.overrides,ot=tt.theme,at=tt.zIndex;return reactExports.createElement(LayersManager,{zIndex:at,overrides:nt},reactExports.createElement(UIDReset,{prefix:"bui"},reactExports.createElement(ThemeProvider$1,{theme:ot},et)))};function guard(rt,tt,et){return Math.min(Math.max(rt,et),tt)}class ColorError extends Error{constructor(tt){super(`Failed to parse color: "${tt}"`)}}var ColorError$1=ColorError;function parseToRgba(rt){if(typeof rt!="string")throw new ColorError$1(rt);if(rt.trim().toLowerCase()==="transparent")return[0,0,0,0];let tt=rt.trim();tt=namedColorRegex.test(rt)?nameToHex(rt):rt;const et=reducedHexRegex.exec(tt);if(et){const st=Array.from(et).slice(1);return[...st.slice(0,3).map(ut=>parseInt(r(ut,2),16)),parseInt(r(st[3]||"f",2),16)/255]}const nt=hexRegex.exec(tt);if(nt){const st=Array.from(nt).slice(1);return[...st.slice(0,3).map(ut=>parseInt(ut,16)),parseInt(st[3]||"ff",16)/255]}const ot=rgbaRegex.exec(tt);if(ot){const st=Array.from(ot).slice(1);return[...st.slice(0,3).map(ut=>parseInt(ut,10)),parseFloat(st[3]||"1")]}const at=hslaRegex.exec(tt);if(at){const[st,ut,ct,pt]=Array.from(at).slice(1).map(parseFloat);if(guard(0,100,ut)!==ut)throw new ColorError$1(rt);if(guard(0,100,ct)!==ct)throw new ColorError$1(rt);return[...hslToRgb$1(st,ut,ct),Number.isNaN(pt)?1:pt]}throw new ColorError$1(rt)}function hash$1(rt){let tt=5381,et=rt.length;for(;et;)tt=tt*33^rt.charCodeAt(--et);return(tt>>>0)%2341}const colorToInt=rt=>parseInt(rt.replace(/_/g,""),36),compressedColorMap="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((rt,tt)=>{const et=colorToInt(tt.substring(0,3)),nt=colorToInt(tt.substring(3)).toString(16);let ot="";for(let at=0;at<6-nt.length;at++)ot+="0";return rt[et]=`${ot}${nt}`,rt},{});function nameToHex(rt){const tt=rt.toLowerCase().trim(),et=compressedColorMap[hash$1(tt)];if(!et)throw new ColorError$1(rt);return`#${et}`}const r=(rt,tt)=>Array.from(Array(tt)).map(()=>rt).join(""),reducedHexRegex=new RegExp(`^#${r("([a-f0-9])",3)}([a-f0-9])?$`,"i"),hexRegex=new RegExp(`^#${r("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),rgbaRegex=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${r(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),hslaRegex=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,namedColorRegex=/^[a-z]+$/i,roundColor=rt=>Math.round(rt*255),hslToRgb$1=(rt,tt,et)=>{let nt=et/100;if(tt===0)return[nt,nt,nt].map(roundColor);const ot=(rt%360+360)%360/60,at=(1-Math.abs(2*nt-1))*(tt/100),st=at*(1-Math.abs(ot%2-1));let ut=0,ct=0,pt=0;ot>=0&&ot<1?(ut=at,ct=st):ot>=1&&ot<2?(ut=st,ct=at):ot>=2&&ot<3?(ct=at,pt=st):ot>=3&&ot<4?(ct=st,pt=at):ot>=4&&ot<5?(ut=st,pt=at):ot>=5&&ot<6&&(ut=at,pt=st);const dt=nt-at/2,ft=ut+dt,bt=ct+dt,ht=pt+dt;return[ft,bt,ht].map(roundColor)};function parseToHsla(rt){const[tt,et,nt,ot]=parseToRgba(rt).map((ft,bt)=>bt===3?ft:ft/255),at=Math.max(tt,et,nt),st=Math.min(tt,et,nt),ut=(at+st)/2;if(at===st)return[0,0,ut,ot];const ct=at-st,pt=ut>.5?ct/(2-at-st):ct/(at+st);return[60*(tt===at?(et-nt)/ct+(et<nt?6:0):et===at?(nt-tt)/ct+2:(tt-et)/ct+4),pt,ut,ot]}function hsla(rt,tt,et,nt){return`hsla(${(rt%360).toFixed()}, ${guard(0,100,tt*100).toFixed()}%, ${guard(0,100,et*100).toFixed()}%, ${parseFloat(guard(0,1,nt).toFixed(3))})`}function darken(rt,tt){const[et,nt,ot,at]=parseToHsla(rt);return hsla(et,nt,ot-tt,at)}function getLuminance(rt){if(rt==="transparent")return 0;function tt(at){const st=at/255;return st<=.04045?st/12.92:Math.pow((st+.055)/1.055,2.4)}const[et,nt,ot]=parseToRgba(rt);return .2126*tt(et)+.7152*tt(nt)+.0722*tt(ot)}function rgba$1(rt,tt,et,nt){return`rgba(${guard(0,255,rt).toFixed()}, ${guard(0,255,tt).toFixed()}, ${guard(0,255,et).toFixed()}, ${parseFloat(guard(0,1,nt).toFixed(3))})`}function mix$1(rt,tt,et){const nt=(zt,vt)=>vt===3?zt:zt/255,[ot,at,st,ut]=parseToRgba(rt).map(nt),[ct,pt,dt,ft]=parseToRgba(tt).map(nt),bt=ft-ut,ht=et*2-1,Ot=((ht*bt===-1?ht:ht+bt/(1+ht*bt))+1)/2,yt=1-Ot,Mt=(ot*yt+ct*Ot)*255,At=(at*yt+pt*Ot)*255,St=(st*yt+dt*Ot)*255,Et=ft*et+ut*(1-et);return rgba$1(Mt,At,St,Et)}function lighten(rt,tt){return darken(rt,-tt)}function transparentize(rt,tt){const[et,nt,ot,at]=parseToRgba(rt);return rgba$1(et,nt,ot,at-tt)}function toHex(rt){const[tt,et,nt,ot]=parseToRgba(rt);let at=st=>{const ut=guard(0,255,st).toString(16);return ut.length===1?`0${ut}`:ut};return`#${at(tt)}${at(et)}${at(nt)}${ot<1?at(Math.round(ot*255)):""}`}const createBaseUiThemePrimitives=(rt,tt)=>{const{colors:et,genericFonts:nt}=tt;return{...rt,primaryFontFamily:nt.bodyFont,primary100:et.primary,primary200:et.primary,primary300:et.primary,primary400:et.primary,primary500:et.primary,primary600:et.primary,primary700:et.primary,mono100:et.bgColor,mono200:et.secondaryBg,mono300:et.lightGray,mono400:et.lightGray,mono500:et.gray,mono600:et.fadedText40,mono700:et.gray,mono800:et.bodyText,mono900:et.bodyText,mono1000:et.black}},createBaseUiThemeOverrides=rt=>{const{inSidebar:tt,colors:et,genericFonts:nt,fontSizes:ot,lineHeights:at,radii:st}=rt,ut={fontFamily:nt.bodyFont,fontSize:ot.md,fontSizeSm:ot.sm,fontWeight:"normal",lineHeight:at.base,lineHeightTight:at.tight},ct=et.secondaryBg,pt=tt?et.secondaryBg:et.bgColor,dt=tt?et.bgColor:et.secondaryBg;return{borders:{radius100:st.default,radius200:st.default,radius300:st.default,radius400:st.default,radius500:st.default,useRoundedCorners:!0,buttonBorderRadiusMini:st.md,buttonBorderRadius:st.default,checkboxBorderRadius:`min(${st.md}, ${st.maxCheckbox})`,inputBorderRadiusMini:st.md,inputBorderRadius:st.default,popoverBorderRadius:st.default,surfaceBorderRadius:st.default,tagBorderRadius:st.md},typography:{font100:{},font150:{...ut},font200:{},font250:{},font300:{...ut},font350:{...ut},font400:{...ut},font450:{...ut},font460:{...ut},font470:{...ut},font500:{...ut},font600:{},LabelXSmall:{...ut},LabelSmall:{...ut},LabelMedium:{...ut},LabelLarge:{...ut},ParagraphSmall:{...ut}},colors:{white:et.white,black:et.black,primary:et.primary,primaryA:et.primary,backgroundPrimary:et.bgColor,backgroundSecondary:ct,backgroundTertiary:et.bgColor,borderOpaque:et.darkenedBgMix25,accent:transparentize(et.primary,.5),tagPrimarySolidBackground:et.primary,tagPrimaryFontDisabled:et.fadedText40,tagPrimaryOutlinedDisabled:et.transparent,borderSelected:et.primary,contentPrimary:et.bodyText,inputPlaceholder:et.fadedText60,tickFillDisabled:et.fadedText40,tickMarkFill:et.lightestGray,tickFillSelected:et.primary,datepickerBackground:pt,calendarBackground:pt,calendarForeground:et.bodyText,calendarDayForegroundPseudoSelected:et.bodyText,calendarHeaderBackground:dt,calendarHeaderBackgroundActive:dt,calendarHeaderForeground:et.bodyText,calendarHeaderForegroundDisabled:et.gray40,calendarDayBackgroundSelected:et.primary,calendarDayBackgroundSelectedHighlighted:et.primary,calendarDayForegroundSelected:et.white,calendarDayForegroundSelectedHighlighted:et.white,calendarDayForegroundPseudoSelectedHighlighted:et.bodyText,menuFontHighlighted:et.bodyText,menuFontSelected:et.bodyText,modalCloseColor:et.bodyText,notificationInfoBackground:et.infoBg,notificationInfoText:et.info,notificationPositiveBackground:et.successBg,notificationPositiveText:et.success,notificationWarningBackground:et.warningBg,notificationWarningText:et.warning,notificationNegativeBackground:et.dangerBg,notificationNegativeText:et.danger,progressbarTrackFill:ct,tickFill:et.lightenedBg05,tickMarkFillDisabled:et.lightenedBg05,menuFill:pt,buttonDisabledFill:et.lightenedBg05,tickFillHover:ct,inputFillDisabled:ct,inputFillActive:ct,toggleTrackFillDisabled:ct,tickFillActive:ct,sliderTrackFillDisabled:ct,inputBorder:et.widgetBorderColor||ct,inputFill:ct,inputEnhanceFill:ct,inputEnhancerFillDisabled:ct,buttonDisabledSpinnerBackground:et.gray40,toggleTrackFill:et.gray40,sliderTrackFill:et.gray40,sliderHandleInnerFill:et.gray40,sliderHandleInnerFillDisabled:et.gray40}}},createBaseUiTheme=(rt,tt=primitives)=>createLightTheme(createBaseUiThemePrimitives(tt,rt),createBaseUiThemeOverrides(rt)),computeDerivedColors=rt=>{const{bodyText:tt,secondaryBg:et,bgColor:nt}=rt,ot=getLuminance(nt)>.5,at=transparentize(tt,.9),st=transparentize(tt,.8),ut=transparentize(tt,.7),ct=transparentize(tt,.6),pt=transparentize(tt,.4),dt=mix$1(nt,et,.5),ft=ot?darken(dt,.3):lighten(dt,.6),bt=transparentize(ft,.75),ht=transparentize(ft,.85),mt=lighten(nt,.025);return{fadedText05:at,fadedText10:st,fadedText20:ut,fadedText40:ct,fadedText60:pt,bgMix:dt,darkenedBgMix100:ft,darkenedBgMix25:bt,darkenedBgMix15:ht,lightenedBg05:mt}};function hasLightBackgroundColor(rt){return getLuminance(rt.colors.bgColor)>.5}const createEmotionColors=rt=>{const tt=computeDerivedColors(rt);return{...rt,...tt,codeTextColor:rt.green,codeHighlightColor:tt.bgMix,metricPositiveDeltaColor:rt.green,metricNegativeDeltaColor:rt.red,metricNeutralDeltaColor:tt.fadedText60,borderColor:tt.fadedText10,borderColorLight:tt.fadedText05,headingColor:rt.bodyText}};function getDividerColors(rt){const tt=hasLightBackgroundColor(rt),et=tt?rt.colors.blue60:rt.colors.blue90,nt=tt?rt.colors.green60:rt.colors.green90,ot=tt?rt.colors.orange60:rt.colors.orange90,at=tt?rt.colors.red60:rt.colors.red90,st=tt?rt.colors.purple60:rt.colors.purple80,ut=tt?rt.colors.gray40:rt.colors.gray70;return{blue:et,green:nt,orange:ot,red:at,violet:st,gray:ut,grey:ut,rainbow:`linear-gradient(to right, ${at}, ${ot}, ${nt}, ${et}, ${st})`}}function getMarkdownTextColors(rt){const tt=hasLightBackgroundColor(rt),et=tt?rt.colors.red80:rt.colors.red70,nt=tt?rt.colors.orange100:rt.colors.orange60,ot=tt?rt.colors.yellow100:rt.colors.yellow40,at=tt?rt.colors.green90:rt.colors.green60,st=tt?rt.colors.blue80:rt.colors.blue50,ut=tt?rt.colors.purple80:rt.colors.purple50,ct=tt?rt.colors.purple100:rt.colors.purple80,pt=tt?rt.colors.gray80:rt.colors.gray70,dt=rt.colors.primary;return{red:et,orange:nt,yellow:ot,green:at,blue:st,violet:ut,purple:ct,gray:pt,primary:dt}}function getMarkdownBgColors(rt){const tt=hasLightBackgroundColor(rt);return{redbg:transparentize(rt.colors[tt?"red80":"red60"],tt?.9:.7),orangebg:transparentize(rt.colors.yellow70,tt?.9:.7),yellowbg:transparentize(rt.colors[tt?"yellow70":"yellow50"],tt?.9:.7),greenbg:transparentize(rt.colors[tt?"green70":"green60"],tt?.9:.7),bluebg:transparentize(rt.colors[tt?"blue70":"blue60"],tt?.9:.7),violetbg:transparentize(rt.colors[tt?"purple70":"purple60"],tt?.9:.7),purplebg:transparentize(rt.colors[tt?"purple90":"purple80"],tt?.9:.7),graybg:transparentize(rt.colors[tt?"gray70":"gray50"],tt?.9:.7),primarybg:transparentize(rt.colors.primary,tt?.9:.7)}}function getGray70(rt){return hasLightBackgroundColor(rt)?rt.colors.gray70:rt.colors.gray30}function getGray30(rt){return hasLightBackgroundColor(rt)?rt.colors.gray30:rt.colors.gray85}function getGray90(rt){return hasLightBackgroundColor(rt)?rt.colors.gray90:rt.colors.gray10}function getBlue80(rt){return hasLightBackgroundColor(rt)?rt.colors.blue80:rt.colors.blue40}function getBlueArrayAsc(rt){const{colors:tt}=rt;return[tt.blue10,tt.blue20,tt.blue30,tt.blue40,tt.blue50,tt.blue60,tt.blue70,tt.blue80,tt.blue90,tt.blue100]}function getBlueArrayDesc(rt){const{colors:tt}=rt;return[tt.blue100,tt.blue90,tt.blue80,tt.blue70,tt.blue60,tt.blue50,tt.blue40,tt.blue30,tt.blue20,tt.blue10]}function getSequentialColorsArray(rt){return hasLightBackgroundColor(rt)?getBlueArrayAsc(rt):getBlueArrayDesc(rt)}function getDivergingColorsArray(rt){const{colors:tt}=rt;return[tt.red100,tt.red90,tt.red70,tt.red50,tt.red30,tt.blue30,tt.blue50,tt.blue70,tt.blue90,tt.blue100]}function getCategoricalColorsArray(rt){const{colors:tt}=rt;return hasLightBackgroundColor(rt)?[tt.blue80,tt.blue40,tt.red80,tt.red40,tt.blueGreen80,tt.green40,tt.orange80,tt.orange50,tt.purple80,tt.gray40]:[tt.blue40,tt.blue80,tt.red40,tt.red80,tt.green40,tt.blueGreen80,tt.orange50,tt.orange80,tt.purple80,tt.gray40]}function getDecreasingRed(rt){return hasLightBackgroundColor(rt)?rt.colors.red80:rt.colors.red40}function getIncreasingGreen(rt){return hasLightBackgroundColor(rt)?rt.colors.blueGreen80:rt.colors.green40}const breakpoints={hideWidgetDetails:180,hideNumberInputControls:120,sm:"576px",columns:"640px",md:"768px"},colors={transparent:"transparent",black:"#000000",white:"#ffffff",gray10:"#fafafa",gray20:"#f0f2f6",gray30:"#e6eaf1",gray40:"#d5dae5",gray50:"#bfc5d3",gray60:"#a3a8b8",gray70:"#808495",gray80:"#555867",gray85:"#31333F",gray90:"#262730",gray100:"#0e1117",red10:"#fff0f0",red20:"#ffdede",red30:"#ffc7c7",red40:"#ffabab",red50:"#ff8c8c",red60:"#ff6c6c",red70:"#ff4b4b",red80:"#ff2b2b",red90:"#bd4043",red100:"#7d353b",orange10:"#fffae8",orange20:"#fff6d0",orange30:"#ffecb0",orange40:"#ffe08e",orange50:"#ffd16a",orange60:"#ffbd45",orange70:"#ffa421",orange80:"#ff8700",orange90:"#ed6f13",orange100:"#d95a00",yellow10:"#ffffe1",yellow20:"#ffffc2",yellow30:"#ffffa0",yellow40:"#ffff7d",yellow50:"#ffff59",yellow60:"#fff835",yellow70:"#ffe312",yellow80:"#faca2b",yellow90:"#edbb16",yellow100:"#dea816",yellow110:"#916e10",green10:"#dffde9",green20:"#c0fcd3",green30:"#9ef6bb",green40:"#7defa1",green50:"#5ce488",green60:"#3dd56d",green70:"#21c354",green80:"#09ab3b",green90:"#158237",green100:"#177233",blueGreen10:"#dcfffb",blueGreen20:"#bafff7",blueGreen30:"#93ffee",blueGreen40:"#6bfde3",blueGreen50:"#45f4d5",blueGreen60:"#20e7c5",blueGreen70:"#00d4b1",blueGreen80:"#29b09d",blueGreen90:"#2c867c",blueGreen100:"#246e69",lightBlue10:"#e0feff",lightBlue20:"#bffdff",lightBlue30:"#9af8ff",lightBlue40:"#73efff",lightBlue50:"#4be4ff",lightBlue60:"#24d4ff",lightBlue70:"#00c0f2",lightBlue80:"#00a4d4",lightBlue90:"#0d8cb5",lightBlue100:"#15799e",blue10:"#e4f5ff",blue20:"#c7ebff",blue30:"#a6dcff",blue40:"#83c9ff",blue50:"#60b4ff",blue60:"#3d9df3",blue70:"#1c83e1",blue80:"#0068c9",blue90:"#0054a3",blue100:"#004280",purple10:"#f5ebff",purple20:"#ebd6ff",purple30:"#dbbbff",purple40:"#c89dff",purple50:"#b27eff",purple60:"#9a5dff",purple70:"#803df5",purple80:"#6d3fc0",purple90:"#583f84",purple100:"#3f3163"},iconSizes={xs:"0.5rem",sm:"0.75rem",md:"0.9rem",base:"1rem",lg:"1.25rem",xl:"1.5rem",twoXL:"1.8rem",threeXL:"2.3rem"},radii={md:"0.25rem",default:"0.5rem",xl:"0.75rem",xxl:"1rem",chatInput:"1.25rem",full:"9999px",maxCheckbox:"0.35rem"},sizes={full:"100%",headerHeight:"3.75rem",fullScreenHeaderHeight:"2.875rem",sidebarTopSpace:"6rem",toastWidth:"21rem",contentMaxWidth:"736px",maxChartTooltipWidth:"30rem",checkbox:"1rem",borderWidth:"1px",smallElementHeight:"1.5rem",minElementHeight:"2.5rem",largestElementHeight:"4.25rem",smallLogoHeight:"1.25rem",defaultLogoHeight:"1.5rem",largeLogoHeight:"2rem",sliderThumb:"0.75rem",wideSidePadding:"5rem",headerDecorationHeight:"0.125rem",appRunningMen:"1.6rem",appStatusMaxWidth:"20rem",spinnerSize:"1.375rem",spinnerThickness:"0.2rem",tabHeight:"2.5rem",minPopupWidth:"20rem",maxTooltipHeight:"18.75rem",chatAvatarSize:"2rem",clearIconSize:"1.5em",numberInputControlsWidth:"2rem",emptyDropdownHeight:"5.625rem",dropdownItemHeight:"2.5rem",maxDropdownHeight:"18.75rem",appDefaultBottomPadding:"3.5rem",defaultMapHeight:"31.25rem",defaultChartHeight:"21.875rem",defaultChartWidth:"25rem",minMenuWidth:"8rem",minChatInputFileListHeight:"3rem"},spacing$1={px:"1px",none:"0",threeXS:"0.125rem",twoXS:"0.25rem",xs:"0.375rem",sm:"0.5rem",md:"0.75rem",lg:"1rem",xl:"1.25rem",twoXL:"1.5rem",threeXL:"2rem",fourXL:"4rem"},fonts={sansSerif:'"Source Sans Pro", sans-serif',monospace:'"Source Code Pro", monospace',serif:'"Source Serif Pro", serif',materialIcons:"Material Symbols Rounded"},genericFonts={bodyFont:fonts.sansSerif,codeFont:fonts.monospace,headingFont:fonts.sansSerif,iconFont:fonts.materialIcons},fontSizeTwoSmall=12,fontSizeSmall=14,fontSizeMedium=16,fontSizes={twoSm:`${fontSizeTwoSmall}px`,sm:`${fontSizeSmall}px`,md:"1rem",mdLg:"1.125rem",lg:"1.25rem",xl:"1.5rem",twoXL:"1.75rem",threeXL:"2.25rem",fourXL:"2.75rem",twoSmPx:fontSizeTwoSmall,smPx:fontSizeSmall,mdPx:fontSizeMedium},fontWeights={normal:400,bold:600,extrabold:700},lineHeights={none:1,headings:1.2,tight:1.25,inputWidget:1.4,small:1.5,base:1.6,menuItem:2},sidebar=100,menuButton=sidebar+10,balloons=1e6,header=balloons-10,bottom=sidebar-1,sidebarMobile=balloons-5,fullscreenWrapper=balloons+50,popup=fullscreenWrapper+10,tablePortal=fullscreenWrapper+60,cacheSpinner=sidebar+1,toast=bottom+1,zIndices={hide:-1,auto:"auto",base:0,priority:1,sidebar,menuButton,balloons,header,sidebarMobile,popup,fullscreenWrapper,tablePortal,bottom,cacheSpinner,toast},requiredThemeColors={bgColor:colors.white,secondaryBg:colors.gray20,bodyText:colors.gray85,warning:colors.yellow110,warningBg:transparentize(colors.yellow80,.8),success:colors.green100,successBg:transparentize(colors.green80,.8),infoBg:transparentize(colors.blue70,.9),info:colors.blue100,danger:colors.red100,dangerBg:transparentize(colors.red70,.8),link:colors.blue80,primary:colors.red70,secondary:colors.blue70,disabled:colors.gray40,lightestGray:colors.gray20,lightGray:colors.gray30,gray:colors.gray60,darkGray:colors.gray70,red:colors.red80,blue:colors.blue80,green:colors.green80,yellow:colors.yellow80},optionalThemeColors={},themeColors={...colors,...requiredThemeColors,...optionalThemeColors},emotionBaseTheme={inSidebar:!1,breakpoints,colors:createEmotionColors(themeColors),fonts,fontSizes,fontWeights,genericFonts,iconSizes,lineHeights,radii,sizes,spacing:spacing$1,zIndices},genericColors$1={...colors,bgColor:colors.gray100,secondaryBg:colors.gray90,bodyText:colors.gray10,warning:colors.yellow20,warningBg:transparentize(colors.yellow70,.8),success:colors.green10,successBg:transparentize(colors.green60,.8),info:colors.blue20,infoBg:transparentize(colors.blue60,.8),danger:colors.red20,dangerBg:transparentize(colors.red60,.8),primary:colors.red70,disabled:colors.gray70,link:lighten(colors.blue80,.2)},emotionDarkTheme={...emotionBaseTheme,inSidebar:!1,colors:createEmotionColors({...emotionBaseTheme.colors,...genericColors$1})},genericColors={...colors,warning:"#926C05",warningBg:transparentize(colors.yellow70,.9),successBg:transparentize(colors.green70,.9),danger:colors.red100,dangerBg:transparentize(colors.red80,.91)},emotionLightTheme={...emotionBaseTheme,inSidebar:!1,colors:createEmotionColors({...emotionBaseTheme.colors,...genericColors})},baseuiLightTheme=createBaseUiTheme(emotionLightTheme,primitives),baseuiDarkTheme=createBaseUiTheme(emotionDarkTheme,primitives$1),globalStyles=rt=>css("html{font-size:",rt.fontSizes.mdPx,"px;}@media print{html{height:100%;print-color-adjust:exact;-webkit-print-color-adjust:exact;}}*,*::before,*::after{box-sizing:border-box;}body{margin:0;font-family:",rt.genericFonts.bodyFont,";font-weight:",rt.fontWeights.normal,";line-height:",rt.lineHeights.base,";color:",rt.colors.bodyText,";background-color:",rt.colors.bgColor,";-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:",transparentize(rt.colors.black,1),';-webkit-font-smoothing:auto;}body.embedded{overflow:hidden;}body.embedded:hover{overflow:auto;}[tabindex="-1"]:focus:not(:focus-visible){outline:0 !important;}p,ol,ul,dl{margin:0 0 1rem 0;padding:0;font-size:1rem;font-weight:400;}ol ol,ul ul,ol ul,ul ol{margin-bottom:0;}a:not([href]):not([class]){&,&:hover{color:inherit;text-decoration:none;}}img,svg{vertical-align:middle;}input,button,select,optgroup,textarea{margin:0;font-family:inherit;line-height:inherit;font-size:inherit;}button,input{overflow:visible;}button,[role="button"]{&:not(:disabled){cursor:pointer;}}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button;}[hidden]{display:none !important;}::-webkit-scrollbar{background:transparent;border-radius:100px;height:6px;width:6px;}::-webkit-scrollbar:active{background:',rt.colors.fadedText10,";}:hover::-webkit-scrollbar-thumb:vertical,:hover::-webkit-scrollbar-thumb:horizontal{background:",rt.colors.fadedText40,";border-radius:100px;}"),baseTheme={name:"base",emotion:emotionBaseTheme,basewebTheme:baseuiLightTheme,primitives},darkTheme={name:"Dark",emotion:emotionDarkTheme,basewebTheme:baseuiDarkTheme,primitives:primitives$1},lightTheme={name:"Light",emotion:emotionLightTheme,basewebTheme:baseuiLightTheme,primitives};var ListCache$3=_ListCache;function stackClear$2(){this.__data__=new ListCache$3,this.size=0}var _stackClear=stackClear$2;function stackDelete$2(rt){var tt=this.__data__,et=tt.delete(rt);return this.size=tt.size,et}var _stackDelete=stackDelete$2;function stackGet$2(rt){return this.__data__.get(rt)}var _stackGet=stackGet$2;function stackHas$2(rt){return this.__data__.has(rt)}var _stackHas=stackHas$2,ListCache$2=_ListCache,Map$3=_Map,MapCache$2=_MapCache,LARGE_ARRAY_SIZE$2=200;function stackSet$2(rt,tt){var et=this.__data__;if(et instanceof ListCache$2){var nt=et.__data__;if(!Map$3||nt.length<LARGE_ARRAY_SIZE$2-1)return nt.push([rt,tt]),this.size=++et.size,this;et=this.__data__=new MapCache$2(nt)}return et.set(rt,tt),this.size=et.size,this}var _stackSet=stackSet$2,ListCache$1=_ListCache,stackClear$1=_stackClear,stackDelete$1=_stackDelete,stackGet$1=_stackGet,stackHas$1=_stackHas,stackSet$1=_stackSet;function Stack$5(rt){var tt=this.__data__=new ListCache$1(rt);this.size=tt.size}Stack$5.prototype.clear=stackClear$1;Stack$5.prototype.delete=stackDelete$1;Stack$5.prototype.get=stackGet$1;Stack$5.prototype.has=stackHas$1;Stack$5.prototype.set=stackSet$1;var _Stack=Stack$5;function arrayEach$2(rt,tt){for(var et=-1,nt=rt==null?0:rt.length;++et<nt&&tt(rt[et],et,rt)!==!1;);return rt}var _arrayEach=arrayEach$2,defineProperty$3=_defineProperty$H;function baseAssignValue$6(rt,tt,et){tt=="__proto__"&&defineProperty$3?defineProperty$3(rt,tt,{configurable:!0,enumerable:!0,value:et,writable:!0}):rt[tt]=et}var _baseAssignValue=baseAssignValue$6,baseAssignValue$5=_baseAssignValue,eq$3=eq_1,objectProto$r=Object.prototype,hasOwnProperty$n=objectProto$r.hasOwnProperty;function assignValue$4(rt,tt,et){var nt=rt[tt];(!(hasOwnProperty$n.call(rt,tt)&&eq$3(nt,et))||et===void 0&&!(tt in rt))&&baseAssignValue$5(rt,tt,et)}var _assignValue=assignValue$4,assignValue$3=_assignValue,baseAssignValue$4=_baseAssignValue;function copyObject$7(rt,tt,et,nt){var ot=!et;et||(et={});for(var at=-1,st=tt.length;++at<st;){var ut=tt[at],ct=nt?nt(et[ut],rt[ut],ut,et,rt):void 0;ct===void 0&&(ct=rt[ut]),ot?baseAssignValue$4(et,ut,ct):assignValue$3(et,ut,ct)}return et}var _copyObject=copyObject$7,baseGetTag$5=_baseGetTag,isObjectLike$9=isObjectLike_1,argsTag$6="[object Arguments]";function baseIsArguments$2(rt){return isObjectLike$9(rt)&&baseGetTag$5(rt)==argsTag$6}var _baseIsArguments=baseIsArguments$2,baseIsArguments$1=_baseIsArguments,isObjectLike$8=isObjectLike_1,objectProto$q=Object.prototype,hasOwnProperty$m=objectProto$q.hasOwnProperty,propertyIsEnumerable$3=objectProto$q.propertyIsEnumerable,isArguments$5=baseIsArguments$1(function(){return arguments}())?baseIsArguments$1:function(rt){return isObjectLike$8(rt)&&hasOwnProperty$m.call(rt,"callee")&&!propertyIsEnumerable$3.call(rt,"callee")},isArguments_1=isArguments$5,isBuffer$8={exports:{}};function stubFalse$1(){return!1}var stubFalse_1=stubFalse$1;isBuffer$8.exports;(function(rt,tt){var et=_root,nt=stubFalse_1,ot=tt&&!tt.nodeType&&tt,at=ot&&!0&&rt&&!rt.nodeType&&rt,st=at&&at.exports===ot,ut=st?et.Buffer:void 0,ct=ut?ut.isBuffer:void 0,pt=ct||nt;rt.exports=pt})(isBuffer$8,isBuffer$8.exports);var isBufferExports=isBuffer$8.exports,baseGetTag$4=_baseGetTag,isLength$2=isLength_1,isObjectLike$7=isObjectLike_1,argsTag$5="[object Arguments]",arrayTag$4="[object Array]",boolTag$5="[object Boolean]",dateTag$5="[object Date]",errorTag$4="[object Error]",funcTag$3="[object Function]",mapTag$9="[object Map]",numberTag$5="[object Number]",objectTag$8="[object Object]",regexpTag$5="[object RegExp]",setTag$9="[object Set]",stringTag$6="[object String]",weakMapTag$4="[object WeakMap]",arrayBufferTag$5="[object ArrayBuffer]",dataViewTag$7="[object DataView]",float32Tag$3="[object Float32Array]",float64Tag$3="[object Float64Array]",int8Tag$3="[object Int8Array]",int16Tag$3="[object Int16Array]",int32Tag$3="[object Int32Array]",uint8Tag$3="[object Uint8Array]",uint8ClampedTag$3="[object Uint8ClampedArray]",uint16Tag$3="[object Uint16Array]",uint32Tag$3="[object Uint32Array]",typedArrayTags$1={};typedArrayTags$1[float32Tag$3]=typedArrayTags$1[float64Tag$3]=typedArrayTags$1[int8Tag$3]=typedArrayTags$1[int16Tag$3]=typedArrayTags$1[int32Tag$3]=typedArrayTags$1[uint8Tag$3]=typedArrayTags$1[uint8ClampedTag$3]=typedArrayTags$1[uint16Tag$3]=typedArrayTags$1[uint32Tag$3]=!0;typedArrayTags$1[argsTag$5]=typedArrayTags$1[arrayTag$4]=typedArrayTags$1[arrayBufferTag$5]=typedArrayTags$1[boolTag$5]=typedArrayTags$1[dataViewTag$7]=typedArrayTags$1[dateTag$5]=typedArrayTags$1[errorTag$4]=typedArrayTags$1[funcTag$3]=typedArrayTags$1[mapTag$9]=typedArrayTags$1[numberTag$5]=typedArrayTags$1[objectTag$8]=typedArrayTags$1[regexpTag$5]=typedArrayTags$1[setTag$9]=typedArrayTags$1[stringTag$6]=typedArrayTags$1[weakMapTag$4]=!1;function baseIsTypedArray$2(rt){return isObjectLike$7(rt)&&isLength$2(rt.length)&&!!typedArrayTags$1[baseGetTag$4(rt)]}var _baseIsTypedArray=baseIsTypedArray$2;function baseUnary$6(rt){return function(tt){return rt(tt)}}var _baseUnary=baseUnary$6,_nodeUtil={exports:{}};_nodeUtil.exports;(function(rt,tt){var et=_freeGlobal,nt=tt&&!tt.nodeType&&tt,ot=nt&&!0&&rt&&!rt.nodeType&&rt,at=ot&&ot.exports===nt,st=at&&et.process,ut=function(){try{var ct=ot&&ot.require&&ot.require("util").types;return ct||st&&st.binding&&st.binding("util")}catch{}}();rt.exports=ut})(_nodeUtil,_nodeUtil.exports);var _nodeUtilExports=_nodeUtil.exports,baseIsTypedArray$1=_baseIsTypedArray,baseUnary$5=_baseUnary,nodeUtil$3=_nodeUtilExports,nodeIsTypedArray$1=nodeUtil$3&&nodeUtil$3.isTypedArray,isTypedArray$5=nodeIsTypedArray$1?baseUnary$5(nodeIsTypedArray$1):baseIsTypedArray$1,isTypedArray_1=isTypedArray$5,baseTimes$1=_baseTimes,isArguments$4=isArguments_1,isArray$f=isArray_1,isBuffer$7=isBufferExports,isIndex$3=_isIndex,isTypedArray$4=isTypedArray_1,objectProto$p=Object.prototype,hasOwnProperty$l=objectProto$p.hasOwnProperty;function arrayLikeKeys$3(rt,tt){var et=isArray$f(rt),nt=!et&&isArguments$4(rt),ot=!et&&!nt&&isBuffer$7(rt),at=!et&&!nt&&!ot&&isTypedArray$4(rt),st=et||nt||ot||at,ut=st?baseTimes$1(rt.length,String):[],ct=ut.length;for(var pt in rt)(tt||hasOwnProperty$l.call(rt,pt))&&!(st&&(pt=="length"||ot&&(pt=="offset"||pt=="parent")||at&&(pt=="buffer"||pt=="byteLength"||pt=="byteOffset")||isIndex$3(pt,ct)))&&ut.push(pt);return ut}var _arrayLikeKeys=arrayLikeKeys$3,objectProto$o=Object.prototype;function isPrototype$4(rt){var tt=rt&&rt.constructor,et=typeof tt=="function"&&tt.prototype||objectProto$o;return rt===et}var _isPrototype=isPrototype$4;function overArg$3(rt,tt){return function(et){return rt(tt(et))}}var _overArg=overArg$3,overArg$2=_overArg,nativeKeys$2=overArg$2(Object.keys,Object),_nativeKeys=nativeKeys$2,isPrototype$3=_isPrototype,nativeKeys$1=_nativeKeys,objectProto$n=Object.prototype,hasOwnProperty$k=objectProto$n.hasOwnProperty;function baseKeys$2(rt){if(!isPrototype$3(rt))return nativeKeys$1(rt);var tt=[];for(var et in Object(rt))hasOwnProperty$k.call(rt,et)&&et!="constructor"&&tt.push(et);return tt}var _baseKeys=baseKeys$2,arrayLikeKeys$2=_arrayLikeKeys,baseKeys$1=_baseKeys,isArrayLike$5=isArrayLike_1;function keys$9(rt){return isArrayLike$5(rt)?arrayLikeKeys$2(rt):baseKeys$1(rt)}var keys_1=keys$9,copyObject$6=_copyObject,keys$8=keys_1;function baseAssign$1(rt,tt){return rt&&copyObject$6(tt,keys$8(tt),rt)}var _baseAssign=baseAssign$1;function nativeKeysIn$2(rt){var tt=[];if(rt!=null)for(var et in Object(rt))tt.push(et);return tt}var _nativeKeysIn=nativeKeysIn$2,isObject$a=isObject_1,isPrototype$2=_isPrototype,nativeKeysIn$1=_nativeKeysIn,objectProto$m=Object.prototype,hasOwnProperty$j=objectProto$m.hasOwnProperty;function baseKeysIn$2(rt){if(!isObject$a(rt))return nativeKeysIn$1(rt);var tt=isPrototype$2(rt),et=[];for(var nt in rt)nt=="constructor"&&(tt||!hasOwnProperty$j.call(rt,nt))||et.push(nt);return et}var _baseKeysIn=baseKeysIn$2,arrayLikeKeys$1=_arrayLikeKeys,baseKeysIn$1=_baseKeysIn,isArrayLike$4=isArrayLike_1;function keysIn$6(rt){return isArrayLike$4(rt)?arrayLikeKeys$1(rt,!0):baseKeysIn$1(rt)}var keysIn_1=keysIn$6,copyObject$5=_copyObject,keysIn$5=keysIn_1;function baseAssignIn$1(rt,tt){return rt&&copyObject$5(tt,keysIn$5(tt),rt)}var _baseAssignIn=baseAssignIn$1,_cloneBuffer={exports:{}};_cloneBuffer.exports;(function(rt,tt){var et=_root,nt=tt&&!tt.nodeType&&tt,ot=nt&&!0&&rt&&!rt.nodeType&&rt,at=ot&&ot.exports===nt,st=at?et.Buffer:void 0,ut=st?st.allocUnsafe:void 0;function ct(pt,dt){if(dt)return pt.slice();var ft=pt.length,bt=ut?ut(ft):new pt.constructor(ft);return pt.copy(bt),bt}rt.exports=ct})(_cloneBuffer,_cloneBuffer.exports);var _cloneBufferExports=_cloneBuffer.exports;function copyArray$4(rt,tt){var et=-1,nt=rt.length;for(tt||(tt=Array(nt));++et<nt;)tt[et]=rt[et];return tt}var _copyArray=copyArray$4;function stubArray$3(){return[]}var stubArray_1=stubArray$3,arrayFilter$1=_arrayFilter,stubArray$2=stubArray_1,objectProto$l=Object.prototype,propertyIsEnumerable$2=objectProto$l.propertyIsEnumerable,nativeGetSymbols$2=Object.getOwnPropertySymbols,getSymbols$4=nativeGetSymbols$2?function(rt){return rt==null?[]:(rt=Object(rt),arrayFilter$1(nativeGetSymbols$2(rt),function(tt){return propertyIsEnumerable$2.call(rt,tt)}))}:stubArray$2,_getSymbols=getSymbols$4,copyObject$4=_copyObject,getSymbols$3=_getSymbols;function copySymbols$1(rt,tt){return copyObject$4(rt,getSymbols$3(rt),tt)}var _copySymbols=copySymbols$1;function arrayPush$4(rt,tt){for(var et=-1,nt=tt.length,ot=rt.length;++et<nt;)rt[ot+et]=tt[et];return rt}var _arrayPush=arrayPush$4,overArg$1=_overArg,getPrototype$4=overArg$1(Object.getPrototypeOf,Object),_getPrototype=getPrototype$4,arrayPush$3=_arrayPush,getPrototype$3=_getPrototype,getSymbols$2=_getSymbols,stubArray$1=stubArray_1,nativeGetSymbols$1=Object.getOwnPropertySymbols,getSymbolsIn$2=nativeGetSymbols$1?function(rt){for(var tt=[];rt;)arrayPush$3(tt,getSymbols$2(rt)),rt=getPrototype$3(rt);return tt}:stubArray$1,_getSymbolsIn=getSymbolsIn$2,copyObject$3=_copyObject,getSymbolsIn$1=_getSymbolsIn;function copySymbolsIn$1(rt,tt){return copyObject$3(rt,getSymbolsIn$1(rt),tt)}var _copySymbolsIn=copySymbolsIn$1,arrayPush$2=_arrayPush,isArray$e=isArray_1;function baseGetAllKeys$3(rt,tt,et){var nt=tt(rt);return isArray$e(rt)?nt:arrayPush$2(nt,et(rt))}var _baseGetAllKeys=baseGetAllKeys$3,baseGetAllKeys$2=_baseGetAllKeys,getSymbols$1=_getSymbols,keys$7=keys_1;function getAllKeys$3(rt){return baseGetAllKeys$2(rt,keys$7,getSymbols$1)}var _getAllKeys=getAllKeys$3,baseGetAllKeys$1=_baseGetAllKeys,getSymbolsIn=_getSymbolsIn,keysIn$4=keysIn_1;function getAllKeysIn$2(rt){return baseGetAllKeys$1(rt,keysIn$4,getSymbolsIn)}var _getAllKeysIn=getAllKeysIn$2,getNative$4=_getNative,root$b=_root,DataView$3=getNative$4(root$b,"DataView"),_DataView=DataView$3,getNative$3=_getNative,root$a=_root,Promise$3=getNative$3(root$a,"Promise"),_Promise=Promise$3,getNative$2=_getNative,root$9=_root,Set$3=getNative$2(root$9,"Set"),_Set=Set$3,getNative$1=_getNative,root$8=_root,WeakMap$3=getNative$1(root$8,"WeakMap"),_WeakMap=WeakMap$3,DataView$2=_DataView,Map$2=_Map,Promise$2=_Promise,Set$2=_Set,WeakMap$2=_WeakMap,baseGetTag$3=_baseGetTag,toSource$1=_toSource,mapTag$8="[object Map]",objectTag$7="[object Object]",promiseTag$1="[object Promise]",setTag$8="[object Set]",weakMapTag$3="[object WeakMap]",dataViewTag$6="[object DataView]",dataViewCtorString$1=toSource$1(DataView$2),mapCtorString$1=toSource$1(Map$2),promiseCtorString$1=toSource$1(Promise$2),setCtorString$1=toSource$1(Set$2),weakMapCtorString$1=toSource$1(WeakMap$2),getTag$6=baseGetTag$3;(DataView$2&&getTag$6(new DataView$2(new ArrayBuffer(1)))!=dataViewTag$6||Map$2&&getTag$6(new Map$2)!=mapTag$8||Promise$2&&getTag$6(Promise$2.resolve())!=promiseTag$1||Set$2&&getTag$6(new Set$2)!=setTag$8||WeakMap$2&&getTag$6(new WeakMap$2)!=weakMapTag$3)&&(getTag$6=function(rt){var tt=baseGetTag$3(rt),et=tt==objectTag$7?rt.constructor:void 0,nt=et?toSource$1(et):"";if(nt)switch(nt){case dataViewCtorString$1:return dataViewTag$6;case mapCtorString$1:return mapTag$8;case promiseCtorString$1:return promiseTag$1;case setCtorString$1:return setTag$8;case weakMapCtorString$1:return weakMapTag$3}return tt});var _getTag=getTag$6,objectProto$k=Object.prototype,hasOwnProperty$i=objectProto$k.hasOwnProperty;function initCloneArray$1(rt){var tt=rt.length,et=new rt.constructor(tt);return tt&&typeof rt[0]=="string"&&hasOwnProperty$i.call(rt,"index")&&(et.index=rt.index,et.input=rt.input),et}var _initCloneArray=initCloneArray$1,root$7=_root,Uint8Array$4=root$7.Uint8Array,_Uint8Array=Uint8Array$4,Uint8Array$3=_Uint8Array;function cloneArrayBuffer$4(rt){var tt=new rt.constructor(rt.byteLength);return new Uint8Array$3(tt).set(new Uint8Array$3(rt)),tt}var _cloneArrayBuffer=cloneArrayBuffer$4,cloneArrayBuffer$3=_cloneArrayBuffer;function cloneDataView$1(rt,tt){var et=tt?cloneArrayBuffer$3(rt.buffer):rt.buffer;return new rt.constructor(et,rt.byteOffset,rt.byteLength)}var _cloneDataView=cloneDataView$1,reFlags=/\w*$/;function cloneRegExp$1(rt){var tt=new rt.constructor(rt.source,reFlags.exec(rt));return tt.lastIndex=rt.lastIndex,tt}var _cloneRegExp=cloneRegExp$1,Symbol$5=_Symbol,symbolProto$3=Symbol$5?Symbol$5.prototype:void 0,symbolValueOf$2=symbolProto$3?symbolProto$3.valueOf:void 0;function cloneSymbol$1(rt){return symbolValueOf$2?Object(symbolValueOf$2.call(rt)):{}}var _cloneSymbol=cloneSymbol$1,cloneArrayBuffer$2=_cloneArrayBuffer;function cloneTypedArray$3(rt,tt){var et=tt?cloneArrayBuffer$2(rt.buffer):rt.buffer;return new rt.constructor(et,rt.byteOffset,rt.length)}var _cloneTypedArray=cloneTypedArray$3,cloneArrayBuffer$1=_cloneArrayBuffer,cloneDataView=_cloneDataView,cloneRegExp=_cloneRegExp,cloneSymbol=_cloneSymbol,cloneTypedArray$2=_cloneTypedArray,boolTag$4="[object Boolean]",dateTag$4="[object Date]",mapTag$7="[object Map]",numberTag$4="[object Number]",regexpTag$4="[object RegExp]",setTag$7="[object Set]",stringTag$5="[object String]",symbolTag$5="[object Symbol]",arrayBufferTag$4="[object ArrayBuffer]",dataViewTag$5="[object DataView]",float32Tag$2="[object Float32Array]",float64Tag$2="[object Float64Array]",int8Tag$2="[object Int8Array]",int16Tag$2="[object Int16Array]",int32Tag$2="[object Int32Array]",uint8Tag$2="[object Uint8Array]",uint8ClampedTag$2="[object Uint8ClampedArray]",uint16Tag$2="[object Uint16Array]",uint32Tag$2="[object Uint32Array]";function initCloneByTag$1(rt,tt,et){var nt=rt.constructor;switch(tt){case arrayBufferTag$4:return cloneArrayBuffer$1(rt);case boolTag$4:case dateTag$4:return new nt(+rt);case dataViewTag$5:return cloneDataView(rt,et);case float32Tag$2:case float64Tag$2:case int8Tag$2:case int16Tag$2:case int32Tag$2:case uint8Tag$2:case uint8ClampedTag$2:case uint16Tag$2:case uint32Tag$2:return cloneTypedArray$2(rt,et);case mapTag$7:return new nt;case numberTag$4:case stringTag$5:return new nt(rt);case regexpTag$4:return cloneRegExp(rt);case setTag$7:return new nt;case symbolTag$5:return cloneSymbol(rt)}}var _initCloneByTag=initCloneByTag$1,isObject$9=isObject_1,objectCreate$1=Object.create,baseCreate$2=function(){function rt(){}return function(tt){if(!isObject$9(tt))return{};if(objectCreate$1)return objectCreate$1(tt);rt.prototype=tt;var et=new rt;return rt.prototype=void 0,et}}(),_baseCreate=baseCreate$2,baseCreate$1=_baseCreate,getPrototype$2=_getPrototype,isPrototype$1=_isPrototype;function initCloneObject$3(rt){return typeof rt.constructor=="function"&&!isPrototype$1(rt)?baseCreate$1(getPrototype$2(rt)):{}}var _initCloneObject=initCloneObject$3,getTag$5=_getTag,isObjectLike$6=isObjectLike_1,mapTag$6="[object Map]";function baseIsMap$1(rt){return isObjectLike$6(rt)&&getTag$5(rt)==mapTag$6}var _baseIsMap=baseIsMap$1,baseIsMap=_baseIsMap,baseUnary$4=_baseUnary,nodeUtil$2=_nodeUtilExports,nodeIsMap=nodeUtil$2&&nodeUtil$2.isMap,isMap$1=nodeIsMap?baseUnary$4(nodeIsMap):baseIsMap,isMap_1=isMap$1,getTag$4=_getTag,isObjectLike$5=isObjectLike_1,setTag$6="[object Set]";function baseIsSet$1(rt){return isObjectLike$5(rt)&&getTag$4(rt)==setTag$6}var _baseIsSet=baseIsSet$1,baseIsSet=_baseIsSet,baseUnary$3=_baseUnary,nodeUtil$1=_nodeUtilExports,nodeIsSet=nodeUtil$1&&nodeUtil$1.isSet,isSet$1=nodeIsSet?baseUnary$3(nodeIsSet):baseIsSet,isSet_1=isSet$1,Stack$4=_Stack,arrayEach$1=_arrayEach,assignValue$2=_assignValue,baseAssign=_baseAssign,baseAssignIn=_baseAssignIn,cloneBuffer$2=_cloneBufferExports,copyArray$3=_copyArray,copySymbols=_copySymbols,copySymbolsIn=_copySymbolsIn,getAllKeys$2=_getAllKeys,getAllKeysIn$1=_getAllKeysIn,getTag$3=_getTag,initCloneArray=_initCloneArray,initCloneByTag=_initCloneByTag,initCloneObject$2=_initCloneObject,isArray$d=isArray_1,isBuffer$6=isBufferExports,isMap=isMap_1,isObject$8=isObject_1,isSet=isSet_1,keys$6=keys_1,keysIn$3=keysIn_1,CLONE_DEEP_FLAG$2=1,CLONE_FLAT_FLAG$1=2,CLONE_SYMBOLS_FLAG$2=4,argsTag$4="[object Arguments]",arrayTag$3="[object Array]",boolTag$3="[object Boolean]",dateTag$3="[object Date]",errorTag$3="[object Error]",funcTag$2="[object Function]",genTag$1="[object GeneratorFunction]",mapTag$5="[object Map]",numberTag$3="[object Number]",objectTag$6="[object Object]",regexpTag$3="[object RegExp]",setTag$5="[object Set]",stringTag$4="[object String]",symbolTag$4="[object Symbol]",weakMapTag$2="[object WeakMap]",arrayBufferTag$3="[object ArrayBuffer]",dataViewTag$4="[object DataView]",float32Tag$1="[object Float32Array]",float64Tag$1="[object Float64Array]",int8Tag$1="[object Int8Array]",int16Tag$1="[object Int16Array]",int32Tag$1="[object Int32Array]",uint8Tag$1="[object Uint8Array]",uint8ClampedTag$1="[object Uint8ClampedArray]",uint16Tag$1="[object Uint16Array]",uint32Tag$1="[object Uint32Array]",cloneableTags={};cloneableTags[argsTag$4]=cloneableTags[arrayTag$3]=cloneableTags[arrayBufferTag$3]=cloneableTags[dataViewTag$4]=cloneableTags[boolTag$3]=cloneableTags[dateTag$3]=cloneableTags[float32Tag$1]=cloneableTags[float64Tag$1]=cloneableTags[int8Tag$1]=cloneableTags[int16Tag$1]=cloneableTags[int32Tag$1]=cloneableTags[mapTag$5]=cloneableTags[numberTag$3]=cloneableTags[objectTag$6]=cloneableTags[regexpTag$3]=cloneableTags[setTag$5]=cloneableTags[stringTag$4]=cloneableTags[symbolTag$4]=cloneableTags[uint8Tag$1]=cloneableTags[uint8ClampedTag$1]=cloneableTags[uint16Tag$1]=cloneableTags[uint32Tag$1]=!0;cloneableTags[errorTag$3]=cloneableTags[funcTag$2]=cloneableTags[weakMapTag$2]=!1;function baseClone$2(rt,tt,et,nt,ot,at){var st,ut=tt&CLONE_DEEP_FLAG$2,ct=tt&CLONE_FLAT_FLAG$1,pt=tt&CLONE_SYMBOLS_FLAG$2;if(et&&(st=ot?et(rt,nt,ot,at):et(rt)),st!==void 0)return st;if(!isObject$8(rt))return rt;var dt=isArray$d(rt);if(dt){if(st=initCloneArray(rt),!ut)return copyArray$3(rt,st)}else{var ft=getTag$3(rt),bt=ft==funcTag$2||ft==genTag$1;if(isBuffer$6(rt))return cloneBuffer$2(rt,ut);if(ft==objectTag$6||ft==argsTag$4||bt&&!ot){if(st=ct||bt?{}:initCloneObject$2(rt),!ut)return ct?copySymbolsIn(rt,baseAssignIn(st,rt)):copySymbols(rt,baseAssign(st,rt))}else{if(!cloneableTags[ft])return ot?rt:{};st=initCloneByTag(rt,ft,ut)}}at||(at=new Stack$4);var ht=at.get(rt);if(ht)return ht;at.set(rt,st),isSet(rt)?rt.forEach(function(yt){st.add(baseClone$2(yt,tt,et,yt,rt,at))}):isMap(rt)&&rt.forEach(function(yt,Mt){st.set(Mt,baseClone$2(yt,tt,et,Mt,rt,at))});var mt=pt?ct?getAllKeysIn$1:getAllKeys$2:ct?keysIn$3:keys$6,Ot=dt?void 0:mt(rt);return arrayEach$1(Ot||rt,function(yt,Mt){Ot&&(Mt=yt,yt=rt[Mt]),assignValue$2(st,Mt,baseClone$2(yt,tt,et,Mt,rt,at))}),st}var _baseClone=baseClone$2,baseClone$1=_baseClone,CLONE_DEEP_FLAG$1=1,CLONE_SYMBOLS_FLAG$1=4;function cloneDeep(rt){return baseClone$1(rt,CLONE_DEEP_FLAG$1|CLONE_SYMBOLS_FLAG$1)}var cloneDeep_1=cloneDeep;const cloneDeep$1=getDefaultExportFromCjs$1(cloneDeep_1);var baseAssignValue$3=_baseAssignValue,eq$2=eq_1;function assignMergeValue$3(rt,tt,et){(et!==void 0&&!eq$2(rt[tt],et)||et===void 0&&!(tt in rt))&&baseAssignValue$3(rt,tt,et)}var _assignMergeValue=assignMergeValue$3;function createBaseFor$2(rt){return function(tt,et,nt){for(var ot=-1,at=Object(tt),st=nt(tt),ut=st.length;ut--;){var ct=st[rt?ut:++ot];if(et(at[ct],ct,at)===!1)break}return tt}}var _createBaseFor=createBaseFor$2,createBaseFor$1=_createBaseFor,baseFor$3=createBaseFor$1(),_baseFor=baseFor$3,baseGetTag$2=_baseGetTag,getPrototype$1=_getPrototype,isObjectLike$4=isObjectLike_1,objectTag$5="[object Object]",funcProto$3=Function.prototype,objectProto$j=Object.prototype,funcToString$3=funcProto$3.toString,hasOwnProperty$h=objectProto$j.hasOwnProperty,objectCtorString$1=funcToString$3.call(Object);function isPlainObject$6(rt){if(!isObjectLike$4(rt)||baseGetTag$2(rt)!=objectTag$5)return!1;var tt=getPrototype$1(rt);if(tt===null)return!0;var et=hasOwnProperty$h.call(tt,"constructor")&&tt.constructor;return typeof et=="function"&&et instanceof et&&funcToString$3.call(et)==objectCtorString$1}var isPlainObject_1=isPlainObject$6;function safeGet$3(rt,tt){if(!(tt==="constructor"&&typeof rt[tt]=="function")&&tt!="__proto__")return rt[tt]}var _safeGet=safeGet$3,copyObject$2=_copyObject,keysIn$2=keysIn_1;function toPlainObject$2(rt){return copyObject$2(rt,keysIn$2(rt))}var toPlainObject_1=toPlainObject$2,assignMergeValue$2=_assignMergeValue,cloneBuffer$1=_cloneBufferExports,cloneTypedArray$1=_cloneTypedArray,copyArray$2=_copyArray,initCloneObject$1=_initCloneObject,isArguments$3=isArguments_1,isArray$c=isArray_1,isArrayLikeObject$2=isArrayLikeObject_1,isBuffer$5=isBufferExports,isFunction$3=isFunction_1,isObject$7=isObject_1,isPlainObject$5=isPlainObject_1,isTypedArray$3=isTypedArray_1,safeGet$2=_safeGet,toPlainObject$1=toPlainObject_1;function baseMergeDeep$2(rt,tt,et,nt,ot,at,st){var ut=safeGet$2(rt,et),ct=safeGet$2(tt,et),pt=st.get(ct);if(pt){assignMergeValue$2(rt,et,pt);return}var dt=at?at(ut,ct,et+"",rt,tt,st):void 0,ft=dt===void 0;if(ft){var bt=isArray$c(ct),ht=!bt&&isBuffer$5(ct),mt=!bt&&!ht&&isTypedArray$3(ct);dt=ct,bt||ht||mt?isArray$c(ut)?dt=ut:isArrayLikeObject$2(ut)?dt=copyArray$2(ut):ht?(ft=!1,dt=cloneBuffer$1(ct,!0)):mt?(ft=!1,dt=cloneTypedArray$1(ct,!0)):dt=[]:isPlainObject$5(ct)||isArguments$3(ct)?(dt=ut,isArguments$3(ut)?dt=toPlainObject$1(ut):(!isObject$7(ut)||isFunction$3(ut))&&(dt=initCloneObject$1(ct))):ft=!1}ft&&(st.set(ct,dt),ot(dt,ct,nt,at,st),st.delete(ct)),assignMergeValue$2(rt,et,dt)}var _baseMergeDeep=baseMergeDeep$2,Stack$3=_Stack,assignMergeValue$1=_assignMergeValue,baseFor$2=_baseFor,baseMergeDeep$1=_baseMergeDeep,isObject$6=isObject_1,keysIn$1=keysIn_1,safeGet$1=_safeGet;function baseMerge$2(rt,tt,et,nt,ot){rt!==tt&&baseFor$2(tt,function(at,st){if(ot||(ot=new Stack$3),isObject$6(at))baseMergeDeep$1(rt,tt,st,et,baseMerge$2,nt,ot);else{var ut=nt?nt(safeGet$1(rt,st),at,st+"",rt,tt,ot):void 0;ut===void 0&&(ut=at),assignMergeValue$1(rt,st,ut)}},keysIn$1)}var _baseMerge=baseMerge$2,baseRest$3=_baseRest,isIterateeCall$2=_isIterateeCall;function createAssigner$2(rt){return baseRest$3(function(tt,et){var nt=-1,ot=et.length,at=ot>1?et[ot-1]:void 0,st=ot>2?et[2]:void 0;for(at=rt.length>3&&typeof at=="function"?(ot--,at):void 0,st&&isIterateeCall$2(et[0],et[1],st)&&(at=ot<3?void 0:at,ot=1),tt=Object(tt);++nt<ot;){var ut=et[nt];ut&&rt(tt,ut,nt,at)}return tt})}var _createAssigner=createAssigner$2,baseMerge$1=_baseMerge,createAssigner$1=_createAssigner,merge$3=createAssigner$1(function(rt,tt,et){baseMerge$1(rt,tt,et)}),merge_1$1=merge$3;const merge$4=getDefaultExportFromCjs$1(merge_1$1);var toFinite=toFinite_1;function toInteger$1(rt){var tt=toFinite(rt),et=tt%1;return tt===tt?et?tt-et:tt:0}var toInteger_1=toInteger$1,toInteger=toInteger_1,FUNC_ERROR_TEXT$4="Expected a function";function before$1(rt,tt){var et;if(typeof tt!="function")throw new TypeError(FUNC_ERROR_TEXT$4);return rt=toInteger(rt),function(){return--rt>0&&(et=tt.apply(this,arguments)),rt<=1&&(tt=void 0),et}}var before_1=before$1,before=before_1;function once(rt){return before(2,rt)}var once_1=once;const once$1=getDefaultExportFromCjs$1(once_1),CACHED_THEME_VERSION=1,CACHED_THEME_BASE_KEY=`stActiveTheme-${window.location.pathname}`,LocalStore={CACHED_THEME_VERSION,CACHED_THEME_BASE_KEY,ACTIVE_THEME:`${CACHED_THEME_BASE_KEY}-v${CACHED_THEME_VERSION}`},AUTO_THEME_NAME="Use system setting",CUSTOM_THEME_NAME="Custom Theme",log$c=loglevelExports$1.getLogger("theme:utils");function mergeTheme(rt,tt){if(tt&&isObject$h(tt)){const et=new CustomThemeConfig(tt);return createTheme(rt.name,et,rt)}return rt}const getMergedLightTheme=once$1(()=>{var rt;return mergeTheme(lightTheme,(rt=window.__streamlit)==null?void 0:rt.LIGHT_THEME)}),getMergedDarkTheme=once$1(()=>{var rt;return mergeTheme(darkTheme,(rt=window.__streamlit)==null?void 0:rt.DARK_THEME)}),getSystemTheme=()=>window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?getMergedDarkTheme():getMergedLightTheme(),createAutoTheme=()=>({...getSystemTheme(),name:AUTO_THEME_NAME}),createPresetThemes=()=>[createAutoTheme(),getMergedLightTheme(),getMergedDarkTheme()],isPresetTheme=rt=>createPresetThemes().map(et=>et.name).includes(rt.name),bgColorToBaseString=rt=>rt===void 0||getLuminance(rt)>.5?"light":"dark",isColor=rt=>{const tt=new Option().style;return tt.color=rt,tt.color!==""},parseFont=rt=>{const tt={"sans-serif":fonts.sansSerif,serif:fonts.serif,monospace:fonts.monospace};return rt.toLowerCase().replaceAll(" ","-")in tt?tt[rt]:rt},createEmotionTheme=(rt,tt=baseTheme)=>{const{colors:et,genericFonts:nt}=tt.emotion,{fontSizes:ot,roundness:at,showBorderAroundInputs:st,bodyFont:ut,codeFont:ct,...pt}=rt,dt=Object.entries(pt).reduce((Et,[zt,vt])=>(isColor(vt)?Et[zt]=vt:isColor(`#${vt}`)&&(Et[zt]=`#${vt}`),Et),{}),{secondaryBackgroundColor:ft,backgroundColor:bt,primaryColor:ht,textColor:mt,widgetBorderColor:Ot,borderColor:yt,linkColor:Mt}=dt,At={...et};ht&&(At.primary=ht),mt&&(At.bodyText=mt),ft&&(At.secondaryBg=ft),bt&&(At.bgColor=bt),Mt&&(At.link=Mt),At.secondary=At.primary;const St={};if(St.colors=createEmotionColors(At),d$3(yt)&&(St.colors.borderColor=yt,St.colors.borderColorLight=transparentize(yt,.55)),(st||Ot)&&(St.colors.widgetBorderColor=Ot||St.colors.borderColor),d$3(at)){St.radii={...tt.emotion.radii};const Et=roundToTwoDecimals(Math.max(0,Math.min(at,1))*1.6);St.radii.default=addRemUnit(Et),St.radii.md=addRemUnit(roundToTwoDecimals(Et*.5)),St.radii.xl=addRemUnit(roundToTwoDecimals(Et*1.5)),St.radii.xxl=addRemUnit(roundToTwoDecimals(Et*2))}return ot&&(St.fontSizes={...tt.emotion.fontSizes},ot.tinyFontSize&&(St.fontSizes.twoSm=addPxUnit(ot.tinyFontSize),St.fontSizes.twoSmPx=ot.tinyFontSize),ot.smallFontSize&&(St.fontSizes.sm=addPxUnit(ot.smallFontSize),St.fontSizes.smPx=ot.smallFontSize),ot.baseFontSize&&(St.fontSizes.md=addPxUnit(ot.baseFontSize),St.fontSizes.mdPx=ot.baseFontSize)),{...tt.emotion,colors:createEmotionColors(At),genericFonts:{...nt,...ut&&{bodyFont:parseFont(ut),headingFont:parseFont(ut)},...ct&&{codeFont:parseFont(ct)}},...St}},toThemeInput=rt=>{const{colors:tt}=rt;return{primaryColor:tt.primary,backgroundColor:tt.bgColor,secondaryBackgroundColor:tt.secondaryBg,textColor:tt.bodyText}},toExportedTheme=rt=>{const{colors:tt}=rt,et=toThemeInput(rt);return{primaryColor:et.primaryColor,backgroundColor:et.backgroundColor,secondaryBackgroundColor:et.secondaryBackgroundColor,textColor:et.textColor,base:bgColorToBaseString(et.backgroundColor),...computeDerivedColors(tt)}},completeThemeInput=(rt,tt)=>new CustomThemeConfig({...toThemeInput(tt.emotion),...rt}),createTheme=(rt,tt,et,nt=!1)=>{let ot;et?ot=completeThemeInput(tt,et):tt.base===CustomThemeConfig.BaseTheme.DARK?ot=completeThemeInput(tt,darkTheme):ot=completeThemeInput(tt,lightTheme);const at=ot.backgroundColor,st=merge$4(cloneDeep$1(et||(getLuminance(at)>.5?lightTheme:darkTheme)),{emotion:{inSidebar:nt}}),ut=createEmotionTheme(ot,st);return{...st,name:rt,emotion:ut,basewebTheme:createBaseUiTheme(ut,st.primitives),themeInput:tt}},getCachedTheme=()=>{if(!p$4())return null;const rt=window.localStorage.getItem(LocalStore.ACTIVE_THEME);if(!rt)return null;const{name:tt,themeInput:et}=JSON.parse(rt);switch(tt){case lightTheme.name:return getMergedLightTheme();case darkTheme.name:return getMergedDarkTheme();default:return createTheme(tt,et)}},deleteOldCachedThemes=()=>{const{CACHED_THEME_VERSION:rt,CACHED_THEME_BASE_KEY:tt}=LocalStore,{localStorage:et}=window;et.removeItem("stActiveTheme"),et.removeItem(tt);for(let nt=1;nt<=rt;nt++)et.removeItem(`${tt}-v${nt}`)},setCachedTheme=rt=>{if(!p$4()||(deleteOldCachedThemes(),isLightThemeInQueryParams()||isDarkThemeInQueryParams()))return;const tt={name:rt.name,...!isPresetTheme(rt)&&{themeInput:toThemeInput(rt.emotion)}};window.localStorage.setItem(LocalStore.ACTIVE_THEME,JSON.stringify(tt))},removeCachedTheme=()=>{p$4()&&window.localStorage.removeItem(LocalStore.ACTIVE_THEME)},getHostSpecifiedTheme=()=>isLightThemeInQueryParams()?getMergedLightTheme():isDarkThemeInQueryParams()?getMergedDarkTheme():createAutoTheme(),getDefaultTheme=()=>{const rt=getCachedTheme();return rt&&rt.name!==AUTO_THEME_NAME?rt:getHostSpecifiedTheme()},whiteSpace=/\s+/;function computeSpacingStyle(rt,tt){return rt===""?"":rt.split(whiteSpace).map(et=>et==="0"?tt.spacing.none:et in tt.spacing?tt.spacing[et]:(log$c.error(`Invalid spacing value: ${et}`),tt.spacing.none)).join(" ")}function addPxUnit(rt){return`${rt}px`}function addRemUnit(rt){return`${rt}rem`}function roundToTwoDecimals(rt){return parseFloat(rt.toFixed(2))}function blend(rt,tt){if(tt===void 0)return rt;const[et,nt,ot,at]=parseToRgba(rt);if(at===1)return rt;const[st,ut,ct,pt]=parseToRgba(tt),dt=at+pt*(1-at),ft=Math.round((at*et+pt*st*(1-at))/dt),bt=Math.round((at*nt+pt*ut*(1-at))/dt),ht=Math.round((at*ot+pt*ct*(1-at))/dt);return toHex(`rgba(${ft}, ${bt}, ${ht}, ${dt})`)}const convertRemToPx=rt=>parseFloat(rt.replace(/rem$/,""))*(parseFloat(getComputedStyle(document.documentElement).fontSize)||16),STALE_TRANSITION_PARAMS="1s ease-in 0.5s",STALE_STYLES={opacity:.33,transition:`opacity ${STALE_TRANSITION_PARAMS}`},LibContext=React$1.createContext({isFullScreen:!1,setFullScreen:()=>{},addScriptFinishedHandler:()=>{},removeScriptFinishedHandler:()=>{},activeTheme:baseTheme,setTheme:()=>{},availableThemes:[],addThemes:()=>{},onPageChange:()=>{},currentPageScriptHash:"",libConfig:{},fragmentIdsThisRun:[],locale:window.navigator.language});var reactPropsRegex=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,isPropValid=memoize$3(function(rt){return reactPropsRegex.test(rt)||rt.charCodeAt(0)===111&&rt.charCodeAt(1)===110&&rt.charCodeAt(2)<91}),isDevelopment=!1,testOmitPropsOnStringTag=isPropValid,testOmitPropsOnComponent=function rt(tt){return tt!=="theme"},getDefaultShouldForwardProp=function rt(tt){return typeof tt=="string"&&tt.charCodeAt(0)>96?testOmitPropsOnStringTag:testOmitPropsOnComponent},composeShouldForwardProps=function rt(tt,et,nt){var ot;if(et){var at=et.shouldForwardProp;ot=tt.__emotion_forwardProp&&at?function(st){return tt.__emotion_forwardProp(st)&&at(st)}:at}return typeof ot!="function"&&nt&&(ot=tt.__emotion_forwardProp),ot},Insertion=function rt(tt){var et=tt.cache,nt=tt.serialized,ot=tt.isStringTag;return registerStyles(et,nt,ot),useInsertionEffectAlwaysWithSyncFallback(function(){return insertStyles(et,nt,ot)}),null},createStyled=function rt(tt,et){var nt=tt.__emotion_real===tt,ot=nt&&tt.__emotion_base||tt,at,st;et!==void 0&&(at=et.label,st=et.target);var ut=composeShouldForwardProps(tt,et,nt),ct=ut||getDefaultShouldForwardProp(ot),pt=!ct("as");return function(){var dt=arguments,ft=nt&&tt.__emotion_styles!==void 0?tt.__emotion_styles.slice(0):[];if(at!==void 0&&ft.push("label:"+at+";"),dt[0]==null||dt[0].raw===void 0)ft.push.apply(ft,dt);else{var bt=dt[0];ft.push(bt[0]);for(var ht=dt.length,mt=1;mt<ht;mt++)ft.push(dt[mt],bt[mt])}var Ot=withEmotionCache(function(yt,Mt,At){var St=pt&&yt.as||ot,Et="",zt=[],vt=yt;if(yt.theme==null){vt={};for(var Tt in yt)vt[Tt]=yt[Tt];vt.theme=reactExports.useContext(ThemeContext$1)}typeof yt.className=="string"?Et=getRegisteredStyles(Mt.registered,zt,yt.className):yt.className!=null&&(Et=yt.className+" ");var $t=serializeStyles(ft.concat(zt),Mt.registered,vt);Et+=Mt.key+"-"+$t.name,st!==void 0&&(Et+=" "+st);var Rt=pt&&ut===void 0?getDefaultShouldForwardProp(St):ct,wt={};for(var It in yt)pt&&It==="as"||Rt(It)&&(wt[It]=yt[It]);return wt.className=Et,At&&(wt.ref=At),reactExports.createElement(reactExports.Fragment,null,reactExports.createElement(Insertion,{cache:Mt,serialized:$t,isStringTag:typeof St=="string"}),reactExports.createElement(St,wt))});return Ot.displayName=at!==void 0?at:"Styled("+(typeof ot=="string"?ot:ot.displayName||ot.name||"Component")+")",Ot.defaultProps=tt.defaultProps,Ot.__emotion_real=Ot,Ot.__emotion_base=ot,Ot.__emotion_styles=ft,Ot.__emotion_forwardProp=ut,Object.defineProperty(Ot,"toString",{value:function(){return st===void 0&&isDevelopment?"NO_COMPONENT_SELECTOR":"."+st}}),Ot.withComponent=function(yt,Mt){var At=rt(yt,_extends$Q({},et,Mt,{shouldForwardProp:composeShouldForwardProps(Ot,Mt,!0)}));return At.apply(void 0,ft)},Ot}},tags=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],newStyled=createStyled.bind(null);tags.forEach(function(rt){newStyled[rt]=newStyled(rt)});var SIZE$3={small:"small",medium:"medium",large:"large"},spin={from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}},StyledSpinner=styled("i",function(rt){var tt=rt.$theme,et=rt.$color,nt=et===void 0?tt.colors.contentAccent:et,ot=rt.$borderWidth,at=rt.$size,st=at===void 0?SIZE$3.medium:at,ut={large:tt.sizing.scale300,medium:tt.sizing.scale100,small:tt.sizing.scale0}[ot||st],ct={large:tt.sizing.scale1000,medium:tt.sizing.scale900,small:tt.sizing.scale800}[st];return ut||(ut=tt.sizing[ot],ut||(ut="".concat(parseInt(ot),"px"))),ct||(ct=tt.sizing[st],ct||(ct="".concat(parseInt(st),"px"))),{display:"block",animationName:spin,animationDuration:tt.animation.timing1000,animationIterationCount:"infinite",animationTimingFunction:"linear",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",borderRadius:"50%",borderTopColor:nt,borderRightColor:tt.colors.backgroundTertiary,borderBottomColor:tt.colors.backgroundTertiary,borderLeftColor:tt.colors.backgroundTertiary,borderLeftWidth:ut,borderRightWidth:ut,borderTopWidth:ut,borderBottomWidth:ut,width:ct,height:ct,cursor:"wait"}});StyledSpinner.displayName="StyledSpinner";StyledSpinner.displayName="StyledSpinner";const StyledSpinnerIcon=newStyled(StyledSpinner,{shouldForwardProp:rt=>isPropValid(rt)&&!["size"].includes(rt),target:"e144pc0f0"})(({size:rt,margin:tt,padding:et,theme:nt})=>({width:nt.iconSizes[rt],height:nt.iconSizes[rt],fontSize:nt.iconSizes[rt],justifyContents:"center",margin:computeSpacingStyle(tt,nt),padding:computeSpacingStyle(et,nt),borderColor:nt.colors.borderColor,borderTopColor:nt.colors.secondary,borderWidth:nt.sizes.spinnerThickness,flexGrow:0,flexShrink:0})),StyledIcon=newStyled("span",{shouldForwardProp:rt=>isPropValid(rt)&&!["size","as"].includes(rt),target:"e144pc0f1"})(({color:rt,size:tt,margin:et,padding:nt,theme:ot})=>({color:rt||"inherit",fill:"currentColor",display:"inline-flex",alignItems:"center",justifyContents:"center",fontSize:ot.iconSizes[tt],width:ot.iconSizes[tt],height:ot.iconSizes[tt],margin:computeSpacingStyle(et,ot),padding:computeSpacingStyle(nt,ot),flexShrink:0})),StyledDynamicIcon=newStyled("span",{target:"e144pc0f2"})(({size:rt="lg",margin:tt="",padding:et="",theme:nt})=>({fill:"currentColor",display:"inline-flex",alignItems:"center",justifyContents:"center",fontSize:nt.iconSizes[rt],width:nt.iconSizes[rt],height:nt.iconSizes[rt],margin:computeSpacingStyle(tt,nt),padding:computeSpacingStyle(et,nt),flexShrink:0})),StyledImageIcon=newStyled("img",{target:"e144pc0f3"})(({})=>({width:"100%",height:"100%"})),StyledEmojiIcon=newStyled("span",{target:"e144pc0f4"})(({size:rt,margin:tt,padding:et,theme:nt,color:ot})=>({display:"inline-flex",alignItems:"center",justifyContents:"center",fontSize:nt.iconSizes[rt],width:nt.iconSizes[rt],height:nt.iconSizes[rt],margin:computeSpacingStyle(tt,nt),padding:computeSpacingStyle(et,nt),color:ot})),getDefaultProps$1=({size:rt,margin:tt,padding:et,color:nt})=>({size:rt||"md",margin:tt||"",padding:et||"",color:nt||void 0}),Icon$2=({content:rt,color:tt,size:et,margin:nt,padding:ot,testid:at})=>jsx$1(StyledIcon,{as:rt,"aria-hidden":"true","data-testid":at,...getDefaultProps$1({size:et,margin:nt,padding:ot,color:tt})}),EmojiIcon=({size:rt,margin:tt,padding:et,children:nt,color:ot,testid:at})=>jsx$1(StyledEmojiIcon,{"data-testid":at||"stIconEmoji","aria-hidden":"true",...getDefaultProps$1({size:rt,margin:tt,padding:et,color:ot}),children:nt}),StyledMaterialIcon=newStyled("span",{target:"ejhh0er0"})(({size:rt,margin:tt,padding:et,theme:nt,color:ot})=>({display:"inline-flex",alignItems:"center",justifyContents:"center",color:ot,fontSize:nt.iconSizes[rt],width:nt.iconSizes[rt],height:nt.iconSizes[rt],margin:computeSpacingStyle(tt,nt),padding:computeSpacingStyle(et,nt),userSelect:"none",fontFamily:nt.genericFonts.iconFont,fontWeight:nt.fontWeights.normal,fontStyle:"normal",lineHeight:nt.lineHeights.none,letterSpacing:"normal",textTransform:"none",whiteSpace:"nowrap",wordWrap:"normal",direction:"ltr",fontFeatureSettings:"liga",MozFontFeatureSettings:"liga",WebkitFontFeatureSettings:"liga",WebkitFontSmoothing:"antialiased"})),getDefaultProps=({size:rt,margin:tt,padding:et,color:nt})=>({size:rt||"md",margin:tt||"",padding:et||"",color:nt||"inherit"}),MaterialFontIcon=({iconName:rt,...tt})=>jsx$1(StyledMaterialIcon,{...getDefaultProps(tt),"data-testid":tt.testid||"stIconMaterial",translate:"no",children:rt});function parseIconPackEntry(rt){const tt=rt.match(/^:(.+)\/(.+):$/);if(tt===null)return{pack:"emoji",icon:rt};const et=tt[1],nt=tt[2];return{pack:et,icon:nt}}function isMaterialIcon(rt){return parseIconPackEntry(rt).pack==="material"}function getFilledStarIconSrc(){return"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBjbGlwLXBhdGg9InVybCgjY2xpcDBfMTg2MF84NDMpIj48cGF0aCBkPSJNOS45OTk5NCAxNC4zOTE2TDEzLjQ1ODMgMTYuNDgzM0MxNC4wOTE2IDE2Ljg2NjYgMTQuODY2NiAxNi4zIDE0LjY5OTkgMTUuNTgzM0wxMy43ODMzIDExLjY1TDE2Ljg0MTYgOC45OTk5N0MxNy4zOTk5IDguNTE2NjMgMTcuMDk5OSA3LjU5OTk3IDE2LjM2NjYgNy41NDE2M0wxMi4zNDE2IDcuMTk5OTdMMTAuNzY2NiAzLjQ4MzNDMTAuNDgzMyAyLjgwODMgOS41MTY2MSAyLjgwODMgOS4yMzMyNyAzLjQ4MzNMNy42NTgyNyA3LjE5MTYzTDMuNjMzMjcgNy41MzMzQzIuODk5OTQgNy41OTE2MyAyLjU5OTk0IDguNTA4MyAzLjE1ODI3IDguOTkxNjNMNi4yMTY2MSAxMS42NDE2TDUuMjk5OTQgMTUuNTc1QzUuMTMzMjcgMTYuMjkxNiA1LjkwODI3IDE2Ljg1ODMgNi41NDE2MSAxNi40NzVMOS45OTk5NCAxNC4zOTE2WiIgZmlsbD0iI0ZBQ0EyQiIvPjwvZz48ZGVmcz48Y2xpcFBhdGggaWQ9ImNsaXAwXzE4NjBfODQzIj48cmVjdCB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIGZpbGw9IndoaXRlIi8+PC9jbGlwUGF0aD48L2RlZnM+PC9zdmc+"}const DynamicIconDispatcher=({iconValue:rt,...tt})=>{const{pack:et,icon:nt}=parseIconPackEntry(rt);switch(et){case"material":switch(nt){case"star_filled":return jsx$1(StyledDynamicIcon,{...tt,children:jsx$1(StyledImageIcon,{src:getFilledStarIconSrc(),"data-testid":tt.testid||"stImageIcon"})});default:return jsx$1(StyledDynamicIcon,{...tt,children:jsx$1(MaterialFontIcon,{pack:et,iconName:nt,...tt})})}case"emoji":default:return jsx$1(StyledDynamicIcon,{...tt,children:jsx$1(EmojiIcon,{...tt,children:nt})})}},DynamicIcon=rt=>jsx$1(reactExports.Suspense,{fallback:jsx$1(StyledDynamicIcon,{...rt,children:jsx$1(EmojiIcon,{...rt,children:" "})}),children:jsx$1(DynamicIconDispatcher,{...rt})},rt.iconValue),convert=function(rt){if(rt==null)return ok$1;if(typeof rt=="string")return typeFactory(rt);if(typeof rt=="object")return Array.isArray(rt)?anyFactory$1(rt):propsFactory(rt);if(typeof rt=="function")return castFactory$1(rt);throw new Error("Expected function, string, or object as test")};function anyFactory$1(rt){const tt=[];let et=-1;for(;++et<rt.length;)tt[et]=convert(rt[et]);return castFactory$1(nt);function nt(...ot){let at=-1;for(;++at<tt.length;)if(tt[at].call(this,...ot))return!0;return!1}}function propsFactory(rt){return castFactory$1(tt);function tt(et){let nt;for(nt in rt)if(et[nt]!==rt[nt])return!1;return!0}}function typeFactory(rt){return castFactory$1(tt);function tt(et){return et&&et.type===rt}}function castFactory$1(rt){return tt;function tt(et,...nt){return!!(et&&typeof et=="object"&&"type"in et&&rt.call(this,et,...nt))}}function ok$1(){return!0}function color(rt){return rt}const CONTINUE=!0,EXIT=!1,SKIP="skip",visitParents=function(rt,tt,et,nt){typeof tt=="function"&&typeof et!="function"&&(nt=et,et=tt,tt=null);const ot=convert(tt),at=nt?-1:1;st(rt,void 0,[])();function st(ut,ct,pt){const dt=ut&&typeof ut=="object"?ut:{};if(typeof dt.type=="string"){const bt=typeof dt.tagName=="string"?dt.tagName:typeof dt.name=="string"?dt.name:void 0;Object.defineProperty(ft,"name",{value:"node ("+(ut.type+(bt?"<"+bt+">":""))+")"})}return ft;function ft(){let bt=[],ht,mt,Ot;if((!tt||ot(ut,ct,pt[pt.length-1]||null))&&(bt=toResult(et(ut,pt)),bt[0]===EXIT))return bt;if(ut.children&&bt[0]!==SKIP)for(mt=(nt?ut.children.length:-1)+at,Ot=pt.concat(ut);mt>-1&&mt<ut.children.length;){if(ht=st(ut.children[mt],mt,Ot)(),ht[0]===EXIT)return ht;mt=typeof ht[1]=="number"?ht[1]:mt+at}return bt}}};function toResult(rt){return Array.isArray(rt)?rt:typeof rt=="number"?[CONTINUE,rt]:[rt]}const visit=function(rt,tt,et,nt){typeof tt=="function"&&typeof et!="function"&&(nt=et,et=tt,tt=null),visitParents(rt,tt,ot,nt);function ot(at,st){const ut=st[st.length-1];return et(at,ut?ut.children.indexOf(at):null,ut)}},protocols=["http","https","mailto","tel"];function uriTransformer(rt){const tt=(rt||"").trim(),et=tt.charAt(0);if(et==="#"||et==="/")return tt;const nt=tt.indexOf(":");if(nt===-1)return tt;let ot=-1;for(;++ot<protocols.length;){const at=protocols[ot];if(nt===at.length&&tt.slice(0,at.length).toLowerCase()===at)return tt}return ot=tt.indexOf("?"),ot!==-1&&nt>ot||(ot=tt.indexOf("#"),ot!==-1&&nt>ot)?tt:"javascript:void(0)"}/*!
100
100
  * Determine if an object is a Buffer
101
101
  *
102
102
  * @author Feross Aboukhadijeh <https://feross.org>
@@ -691,7 +691,7 @@ If this is an installed component that works locally, the app may be having trou
691
691
 
692
692
  For more troubleshooting help, please see the [Streamlit Component docs](${COMPONENT_DEVELOPER_URL}) or visit our [forums](${COMMUNITY_URL}).`,et}function tryParseArgs(rt,tt,et,nt){if(!nt)try{return parseArgs(rt,tt)}catch(ot){const at=ensureError(ot);et(at)}return[{},[]]}function compareDataframeArgs(rt,tt){return rt===tt||rt.length===tt.length&&rt.every((et,nt)=>{const ot=tt[nt];return et.key===ot.key&&et.value===ot.value})}function ComponentInstance(rt){const[tt,et]=reactExports.useState(),{disabled:nt,element:ot,registry:at,theme:st,widgetMgr:ut,width:ct,fragmentId:pt}=rt,{componentName:dt,jsonArgs:ft,specialArgs:bt,url:ht}=ot,[mt,Ot]=tryParseArgs(ft,bt,et,tt),yt=reactExports.useRef({args:{},dataframeArgs:[]}),Mt=compareDataframeArgs(yt.current.dataframeArgs,Ot);yt.current.args=mt,yt.current.dataframeArgs=Ot;const[At,St]=reactExports.useState(),[Et,zt]=reactExports.useState(isNaN(mt.height)?void 0:mt.height),vt=reactExports.useRef(!1),Tt=reactExports.useRef(null),$t=reactExports.useRef(),Rt=useTimeout(()=>log$8.warn(getWarnMessage(dt,ht)),COMPONENT_READY_WARNING_TIME_MS/4),wt=useTimeout(()=>St(!0),COMPONENT_READY_WARNING_TIME_MS);if(reactExports.useEffect(()=>{vt.current&&sendRenderMessage(yt.current.args,yt.current.dataframeArgs,nt,st,Tt.current??void 0)},[nt,Et,Mt,ft,st,ct]),reactExports.useEffect(()=>{const Ft=Ut=>{if(Ut===void 0){log$8.warn("handleSetFrameHeight: missing 'height' prop");return}if(Ut!==Et){if(m$4(Tt.current)){log$8.warn("handleSetFrameHeight: missing our iframeRef!");return}Tt.current.height=Ut.toString(),zt(Ut)}},nr=()=>{sendRenderMessage(yt.current.args,yt.current.dataframeArgs,nt,st,Tt.current??void 0),Rt(),wt(),vt.current=!0,St(!1)};$t.current={isReady:()=>vt.current,element:ot,widgetMgr:ut,setComponentError:et,componentReadyCallback:nr,frameHeightCallback:Ft,fragmentId:pt}},[dt,nt,ot,Et,Mt,At,ft,st,ut,wt,Rt,pt]),reactExports.useEffect(()=>{var nr;const Ft=((nr=Tt.current)==null?void 0:nr.contentWindow)??void 0;if(Ft)return at.registerListener(Ft,createIframeMessageHandler($t)),()=>{Ft&&at.deregisterListener(Ft)}},[at,dt]),tt)return jsx$1(ErrorElement,{name:tt.name,message:tt.message});const It=!vt.current&&!At&&Et!==0&&jsx$1(Skeleton,{element:Skeleton$1.create({height:Et,style:Skeleton$1.SkeletonStyle.ELEMENT})}),kt=!vt.current&&At?jsx$1(AlertElement,{width:ct,body:getWarnMessage(dt,ht),kind:Kind.WARNING}):null;return jsxs(Fragment,{children:[It,kt,jsx$1(StyledComponentIframe,{className:"stCustomComponentV1","data-testid":"stCustomComponentV1",allow:DEFAULT_IFRAME_FEATURE_POLICY,ref:Tt,src:getSrc(dt,at,ht),width:ct,height:Et??0,scrolling:"no",sandbox:DEFAULT_IFRAME_SANDBOX_POLICY,title:dt,componentReady:vt.current})]})}const ComponentInstance$1=withTheme(ComponentInstance),log$7=loglevelExports$1.getLogger("ComponentRegistry");class ComponentRegistry{constructor(tt){this.msgListeners=new Map,this.registerListener=(et,nt)=>{this.msgListeners.has(et)&&log$7.warn("MessageEventSource registered multiple times!",et),this.msgListeners.set(et,nt)},this.deregisterListener=et=>{this.msgListeners.delete(et)||log$7.warn("Could not deregister unregistered MessageEventSource!")},this.getComponentURL=(et,nt)=>this.endpoints.buildComponentURL(et,nt),this.onMessageEvent=et=>{if(m$4(et.data)||!et.data.hasOwnProperty("isStreamlitMessage"))return;if(m$4(et.source)){log$7.warn("Received component message with no eventSource!",et.data);return}const nt=this.msgListeners.get(et.source);if(m$4(nt)||typeof nt!="function"){log$7.warn("Received component message for unregistered ComponentInstance!",et.data);return}const{type:ot}=et.data;if(m$4(ot)){log$7.warn("Received Streamlit message with no type!",et.data);return}nt(ot,et.data)},this.endpoints=tt,window.addEventListener("message",this.onMessageEvent)}}const Maybe=reactExports.memo(function rt({children:tt}){return jsx$1(Fragment,{children:tt})},(rt,tt)=>!(rt.enable||tt.enable));function makeMarkdownHeading(rt,tt){switch(rt.toLowerCase()){case Tags.H1:return`# ${tt}`;case Tags.H2:return`## ${tt}`;case Tags.H3:return`### ${tt}`;default:throw new Error(`Unrecognized tag for header: ${rt}`)}}function Heading(rt){const{width:tt,element:et}=rt,{tag:nt,anchor:ot,body:at,help:st,hideAnchor:ut,divider:ct}=et,pt=React$1.useContext(IsSidebarContext),dt=React$1.useContext(IsDialogContext),[ft,...bt]=at.split(`
693
693
  `);return jsxs("div",{style:{width:tt},className:"stHeading","data-testid":"stHeading",children:[jsxs(StyledStreamlitMarkdown,{isCaption:!1,isInSidebarOrDialog:pt||dt,style:{width:tt},"data-testid":"stMarkdownContainer",children:[jsx$1(HeadingWithActionElements,{anchor:ot,help:st,hideAnchor:ut,tag:nt,children:jsx$1(RenderedMarkdown,{allowHTML:!1,source:makeMarkdownHeading(nt,ft),overrideComponents:{p:reactExports.Fragment,h1:reactExports.Fragment,h2:reactExports.Fragment,h3:reactExports.Fragment,h4:reactExports.Fragment,h5:reactExports.Fragment,h6:reactExports.Fragment}})}),bt.length>0&&jsx$1(RenderedMarkdown,{source:bt.join(`
694
- `),allowHTML:!1})]}),ct&&jsx$1(StyledHeaderDivider,{"data-testid":"stHeadingDivider",rainbow:ct.includes("linear"),color:ct})]})}const StyledCheckbox$1=newStyled("div",{target:"e6x5rwu0"})(({width:rt,theme:tt})=>({width:rt,display:"flex",alignItems:"center",minHeight:tt.sizes.smallElementHeight})),StyledContent=newStyled("div",{target:"e6x5rwu1"})(({visibility:rt})=>({display:rt===LabelVisibilityOptions.Collapsed?"none":"flex",visibility:rt===LabelVisibilityOptions.Hidden?"hidden":"visible",verticalAlign:"middle",flexDirection:"row",alignItems:"center"}));function translateGapWidth(rt,tt){let et=tt.spacing.lg;return rt==="medium"?et=tt.spacing.threeXL:rt==="large"&&(et=tt.spacing.fourXL),et}const StyledHorizontalBlock=newStyled("div",{target:"e6rk8up0"})(({theme:rt,gap:tt})=>({display:"flex",flexWrap:"wrap",flexGrow:1,alignItems:"stretch",gap:translateGapWidth(tt,rt)})),GLOBAL_ELEMENTS=["balloons","snow"],StyledElementContainer=newStyled("div",{target:"e6rk8up1"})(({theme:rt,isStale:tt,width:et,elementType:nt})=>({width:et,position:"relative","@media print":{overflow:"visible"},":is(.stHtml-empty)":{display:"none"},":has(> .stCacheSpinner)":{height:rt.spacing.none,overflow:"visible",visibility:"visible",marginBottom:`-${rt.spacing.lg}`,zIndex:rt.zIndices.cacheSpinner},":has(> .stPageLink)":{marginTop:`-${rt.spacing.xs}`,marginBottom:`-${rt.spacing.xs}`},...tt&&nt!=="skeleton"&&STALE_STYLES,...nt==="empty"?{display:"none"}:{},...GLOBAL_ELEMENTS.includes(nt)?{marginBottom:`-${rt.spacing.lg}`}:{}})),StyledColumn=newStyled("div",{target:"e6rk8up2"})(({theme:rt,weight:tt,gap:et,showBorder:nt,verticalAlignment:ot})=>{const{VerticalAlignment:at}=Block$2.Column,st=tt*100,ut=translateGapWidth(et,rt),ct=`calc(${st}% - ${ut})`;return{width:ct,flex:`1 1 ${ct}`,[`@media (max-width: ${rt.breakpoints.columns})`]:{minWidth:`calc(100% - ${rt.spacing.twoXL})`},...ot===at.BOTTOM&&{marginTop:"auto",[`& ${StyledElementContainer}:last-of-type > ${StyledCheckbox$1}`]:{marginBottom:rt.spacing.sm}},...ot===at.TOP&&{[`& ${StyledElementContainer}:first-of-type > ${StyledCheckbox$1}`]:{marginTop:rt.spacing.sm}},...ot===at.CENTER&&{marginTop:"auto",marginBottom:"auto"},...nt&&{border:`${rt.sizes.borderWidth} solid ${rt.colors.borderColor}`,borderRadius:rt.radii.default,padding:`calc(${rt.spacing.lg} - ${rt.sizes.borderWidth})`}}}),StyledVerticalBlock=newStyled("div",{target:"e6rk8up3"})(({width:rt,theme:tt})=>({width:rt,position:"relative",display:"flex",flex:1,flexDirection:"column",gap:tt.spacing.lg})),StyledVerticalBlockWrapper=newStyled("div",{target:"e6rk8up4"})({display:"flex",flexDirection:"column",flex:1}),StyledVerticalBlockBorderWrapper=newStyled("div",{target:"e6rk8up5"})(({theme:rt,border:tt,height:et})=>({...tt&&{border:`${rt.sizes.borderWidth} solid ${rt.colors.borderColor}`,borderRadius:rt.radii.default,padding:`calc(${rt.spacing.lg} - ${rt.sizes.borderWidth})`},...et&&{height:`${et}px`,overflow:"auto"}})),Audio=React$1.lazy(()=>__vitePreload(()=>import("./index.Cp60C2LQ.js"),[],import.meta.url)),Balloons=React$1.lazy(()=>__vitePreload(()=>import("./index.CUzW8sZB.js"),__vite__mapDeps([0,1]),import.meta.url)),Snow=React$1.lazy(()=>__vitePreload(()=>import("./index.C73Hi-mL.js"),__vite__mapDeps([2,1]),import.meta.url)),ArrowDataFrame=React$1.lazy(()=>__vitePreload(()=>import("./index.GZ99DH1Q.js").then(rt=>rt.c),__vite__mapDeps([3,4,5,6,7,8,9,10,11,12,13,14]),import.meta.url)),ArrowVegaLiteChart=React$1.lazy(()=>__vitePreload(()=>import("./index.C8vyFGOc.js"),__vite__mapDeps([15,6,5,7,16,17,18,4]),import.meta.url)),Toast=React$1.lazy(()=>__vitePreload(()=>import("./index.CoJayF2l.js"),[],import.meta.url)),BokehChart=React$1.lazy(()=>__vitePreload(()=>import("./index.D_CViY1G.js"),[],import.meta.url)),DebouncedBokehChart=debounceRender(BokehChart,100),DeckGlJsonChart=React$1.lazy(()=>__vitePreload(()=>import("./index.B11A7C7I.js"),__vite__mapDeps([19,10,11,6,5,20,4,16,17,21,22]),import.meta.url)),GraphVizChart=React$1.lazy(()=>__vitePreload(()=>import("./index.CAQGqUJ5.js"),__vite__mapDeps([23,18,17,6,5]),import.meta.url)),IFrame=React$1.lazy(()=>__vitePreload(()=>import("./index.B7aeIxns.js"),[],import.meta.url)),ImageList=React$1.lazy(()=>__vitePreload(()=>import("./index.Cd8_b4vi.js"),__vite__mapDeps([24,6,5]),import.meta.url)),LinkButton=React$1.lazy(()=>__vitePreload(()=>import("./index.D7HtU_R4.js"),[],import.meta.url)),PageLink=React$1.lazy(()=>__vitePreload(()=>import("./index.DsOZJLyF.js"),[],import.meta.url)),PlotlyChart=React$1.lazy(()=>__vitePreload(()=>import("./index.2bJmI0Ih.js"),__vite__mapDeps([25,4,5]),import.meta.url)),Video=React$1.lazy(()=>__vitePreload(()=>import("./index.DHOnt3Rd.js"),[],import.meta.url)),AudioInput=React$1.lazy(()=>__vitePreload(()=>import("./index.DdaoJ1WZ.js"),__vite__mapDeps([26,4,6,27,9,13]),import.meta.url)),Button=React$1.lazy(()=>__vitePreload(()=>import("./index.3k422wEU.js"),[],import.meta.url)),ButtonGroup=React$1.lazy(()=>__vitePreload(()=>import("./index.CIkzV9zP.js"),__vite__mapDeps([28,20,4]),import.meta.url)),DownloadButton=React$1.lazy(()=>__vitePreload(()=>import("./index.BW_6EVtw.js"),__vite__mapDeps([29,9]),import.meta.url)),CameraInput=React$1.lazy(()=>__vitePreload(()=>import("./index.Bkk4sBLz.js"),__vite__mapDeps([30,21,4,31,32]),import.meta.url)),ChatInput=React$1.lazy(()=>__vitePreload(()=>import("./index.BRsob9Jp.js"),__vite__mapDeps([33,34,35,36,21,31,37,38]),import.meta.url)),Checkbox=React$1.lazy(()=>__vitePreload(()=>import("./index.CZFA90VV.js"),__vite__mapDeps([39,20,4]),import.meta.url)),ColorPicker=React$1.lazy(()=>__vitePreload(()=>import("./index.DNKGONSt.js"),__vite__mapDeps([40,20,4]),import.meta.url)),DateInput=React$1.lazy(()=>__vitePreload(()=>import("./index.BqiT_qyM.js"),__vite__mapDeps([41,20,4,42,11,12,43,38]),import.meta.url)),Html=React$1.lazy(()=>__vitePreload(()=>import("./index.BVkJfCWM.js"),[],import.meta.url)),Multiselect=React$1.lazy(()=>__vitePreload(()=>import("./index.D3PlNa4T.js"),__vite__mapDeps([44,20,4]),import.meta.url)),Progress=React$1.lazy(()=>__vitePreload(()=>import("./index.D-Qsohh0.js"),__vite__mapDeps([45,32]),import.meta.url)),Spinner=React$1.lazy(()=>__vitePreload(()=>import("./index.CVIsVMt0.js"),[],import.meta.url)),Radio=React$1.lazy(()=>__vitePreload(()=>import("./index.CC_i5fnL.js"),__vite__mapDeps([46,20,4]),import.meta.url)),Selectbox$1=React$1.lazy(()=>__vitePreload(()=>import("./index.C-BkiutF.js"),__vite__mapDeps([47,20,4]),import.meta.url)),Slider$1=React$1.lazy(()=>__vitePreload(()=>import("./index.OWYUy0bC.js"),__vite__mapDeps([48,8,20,4]),import.meta.url)),FileUploader=React$1.lazy(()=>__vitePreload(()=>import("./index.D2i6l9uv.js"),__vite__mapDeps([49,21,4,34,32,27,31]),import.meta.url)),TextArea=React$1.lazy(()=>__vitePreload(()=>import("./index.DdJR-Re7.js"),__vite__mapDeps([50,51,52,36,35,20,4,37,38]),import.meta.url)),TextInput=React$1.lazy(()=>__vitePreload(()=>import("./index.USVf5VUT.js"),__vite__mapDeps([53,51,52,36,20,4,35,43,38]),import.meta.url)),TimeInput=React$1.lazy(()=>__vitePreload(()=>import("./index.B7AJyWjy.js"),__vite__mapDeps([54,20,4,42,11,12]),import.meta.url)),NumberInput=React$1.lazy(()=>__vitePreload(()=>import("./index.CIwUls4J.js"),__vite__mapDeps([55,8,51,4,35,43,38]),import.meta.url)),StreamlitSyntaxHighlighter=React$1.lazy(()=>__vitePreload(()=>Promise.resolve().then(()=>StreamlitSyntaxHighlighter$2),void 0,import.meta.url));function hideIfStale(rt,tt){return rt?jsx$1(Fragment,{}):tt}const RawElementNodeRenderer=rt=>{const{node:tt}=rt;if(!tt)throw new Error("ElementNode not found.");const et={width:rt.width,disableFullscreenMode:rt.disableFullscreenMode},nt={...et,widgetMgr:rt.widgetMgr,disabled:rt.widgetsDisabled,fragmentId:tt.fragmentId};switch(tt.element.type){case"alert":{const at=tt.element.alert;return jsx$1(AlertElement,{icon:at.icon,body:at.body,kind:getAlertElementKind(at.format),...et})}case"arrowTable":return jsx$1(ArrowTable$1,{element:tt.quiverElement,...et});case"audio":return jsx$1(Audio,{element:tt.element.audio,endpoints:rt.endpoints,...et,elementMgr:rt.widgetMgr});case"balloons":return hideIfStale(rt.isStale,jsx$1(Balloons,{scriptRunId:rt.scriptRunId}));case"bokehChart":return jsx$1(DebouncedBokehChart,{element:tt.element.bokehChart,...et});case"code":{const at=tt.element.code;return jsx$1(StreamlitSyntaxHighlighter,{language:at.language,showLineNumbers:at.showLineNumbers,wrapLines:at.wrapLines,height:at.height,children:at.codeText})}case"deckGlJsonChart":return jsx$1(DeckGlJsonChart,{element:tt.element.deckGlJsonChart,...nt});case"docString":return jsx$1(DocString,{element:tt.element.docString,...et});case"empty":return jsx$1("div",{className:"stEmpty","data-testid":"stEmpty"});case"exception":return jsx$1(ExceptionElement,{element:tt.element.exception,...et});case"graphvizChart":return jsx$1(GraphVizChart,{element:tt.element.graphvizChart,...et});case"heading":return jsx$1(Heading,{element:tt.element.heading,...et});case"iframe":return jsx$1(IFrame,{element:tt.element.iframe,...et});case"imgs":return jsx$1(ImageList,{element:tt.element.imgs,endpoints:rt.endpoints,...et});case"json":return jsx$1(Json,{element:tt.element.json,...et});case"markdown":return jsx$1(Markdown,{element:tt.element.markdown,...et});case"metric":return jsx$1(Metric,{element:tt.element.metric});case"html":return jsx$1(Html,{element:tt.element.html,...et});case"pageLink":{const at=tt.element.pageLink,st=nt.disabled||at.disabled;return jsx$1(PageLink,{element:at,disabled:st,...et})}case"progress":return jsx$1(Progress,{element:tt.element.progress,...et});case"skeleton":return jsx$1(Skeleton,{element:tt.element.skeleton});case"snow":return hideIfStale(rt.isStale,jsx$1(Snow,{scriptRunId:rt.scriptRunId}));case"spinner":return jsx$1(Spinner,{element:tt.element.spinner,...et});case"text":return jsx$1(TextElement,{element:tt.element.text,...et});case"video":return jsx$1(Video,{element:tt.element.video,endpoints:rt.endpoints,...et,elementMgr:rt.widgetMgr});case"toast":{const at=tt.element.toast;return jsx$1(Toast,{body:at.body,icon:at.icon,...et},tt.scriptRunId)}case"arrowDataFrame":{const at=tt.element.arrowDataFrame;return nt.disabled=nt.disabled||at.disabled,jsx$1(ArrowDataFrame,{element:at,data:tt.quiverElement,...at.id&&{key:at.id},...nt})}case"arrowVegaLiteChart":const ot=tt.vegaLiteChartElement;return jsx$1(ArrowVegaLiteChart,{element:ot,...nt},ot.id||void 0);case"audioInput":{const at=tt.element.audioInput;return nt.disabled=nt.disabled||at.disabled,jsx$1(AudioInput,{uploadClient:rt.uploadClient,element:at,...nt},at.id)}case"button":{const at=tt.element.button;if(nt.disabled=nt.disabled||at.disabled,at.isFormSubmitter){const{formId:st}=at,ut=rt.formsData.formsWithUploads.has(st);return jsx$1(FormSubmitContent,{element:at,hasInProgressUpload:ut,...nt})}return jsx$1(Button,{element:at,...nt})}case"buttonGroup":{const at=tt.element.buttonGroup;return nt.disabled=nt.disabled||at.disabled,jsx$1(ButtonGroup,{element:at,...nt},at.id)}case"downloadButton":{const at=tt.element.downloadButton;return nt.disabled=nt.disabled||at.disabled,jsx$1(DownloadButton,{endpoints:rt.endpoints,element:at,...nt},at.id)}case"cameraInput":{const at=tt.element.cameraInput;return nt.disabled=nt.disabled||at.disabled,jsx$1(CameraInput,{element:at,uploadClient:rt.uploadClient,...nt},at.id)}case"chatInput":{const at=tt.element.chatInput;return nt.disabled=nt.disabled||at.disabled,jsx$1(ChatInput,{element:at,uploadClient:rt.uploadClient,...nt},at.id)}case"checkbox":{const at=tt.element.checkbox;return nt.disabled=nt.disabled||at.disabled,jsx$1(Checkbox,{element:at,...nt},at.id)}case"colorPicker":{const at=tt.element.colorPicker;return nt.disabled=nt.disabled||at.disabled,jsx$1(ColorPicker,{element:at,...nt},at.id)}case"componentInstance":return jsx$1(ComponentInstance$1,{registry:rt.componentRegistry,element:tt.element.componentInstance,...nt});case"dateInput":{const at=tt.element.dateInput;return nt.disabled=nt.disabled||at.disabled,jsx$1(DateInput,{element:at,...nt},at.id)}case"fileUploader":{const at=tt.element.fileUploader;return nt.disabled=nt.disabled||at.disabled,jsx$1(FileUploader,{element:at,uploadClient:rt.uploadClient,...nt},at.id)}case"linkButton":{const at=tt.element.linkButton;return nt.disabled=nt.disabled||at.disabled,jsx$1(LinkButton,{element:at,...nt})}case"multiselect":{const at=tt.element.multiselect;return nt.disabled=nt.disabled||at.disabled,jsx$1(Multiselect,{element:at,...nt},at.id)}case"numberInput":{const at=tt.element.numberInput;return nt.disabled=nt.disabled||at.disabled,jsx$1(NumberInput,{element:at,...nt},at.id)}case"plotlyChart":{const at=tt.element.plotlyChart;return jsx$1(PlotlyChart,{element:at,...nt},at.id)}case"radio":{const at=tt.element.radio;return nt.disabled=nt.disabled||at.disabled,jsx$1(Radio,{element:at,...nt},at.id)}case"selectbox":{const at=tt.element.selectbox;return nt.disabled=nt.disabled||at.disabled,jsx$1(Selectbox$1,{element:at,...nt},at.id)}case"slider":{const at=tt.element.slider;return nt.disabled=nt.disabled||at.disabled,jsx$1(Slider$1,{element:at,...nt},at.id)}case"textArea":{const at=tt.element.textArea;return nt.disabled=nt.disabled||at.disabled,jsx$1(TextArea,{element:at,...nt},at.id)}case"textInput":{const at=tt.element.textInput;return nt.disabled=nt.disabled||at.disabled,jsx$1(TextInput,{element:at,...nt},at.id)}case"timeInput":{const at=tt.element.timeInput;return nt.disabled=nt.disabled||at.disabled,jsx$1(TimeInput,{element:at,...nt},at.id)}default:throw new Error(`Unrecognized Element type ${tt.element.type}`)}},ElementNodeRenderer=rt=>{const{isFullScreen:tt,fragmentIdsThisRun:et}=React$1.useContext(LibContext),{node:nt,width:ot}=rt,at=nt.element.type||"",st=shouldComponentBeEnabled(at,rt.scriptRunState),ut=isComponentStale(st,nt,rt.scriptRunState,rt.scriptRunId,et),ct=getElementId(nt.element),pt=getKeyFromId(ct);return jsx$1(Maybe,{enable:st,children:jsx$1(StyledElementContainer,{className:classNames("stElementContainer","element-container",convertKeyToClassName(pt)),"data-testid":"stElementContainer","data-stale":ut,isStale:ut&&!tt,width:ot,elementType:at,children:jsx$1(ErrorBoundary,{width:ot,children:jsx$1(reactExports.Suspense,{fallback:jsx$1(Skeleton,{element:Skeleton$1.create({style:Skeleton$1.SkeletonStyle.ELEMENT})}),children:jsx$1(RawElementNodeRenderer,{...rt,isStale:ut})})})})})},BlockNodeRenderer=rt=>{const{node:tt}=rt,{fragmentIdsThisRun:et}=reactExports.useContext(LibContext);if(tt.isEmpty&&!tt.deltaBlock.allowEmpty)return jsx$1(Fragment,{});const nt=shouldComponentBeEnabled("",rt.scriptRunState),ot=isComponentStale(nt,tt,rt.scriptRunState,rt.scriptRunId,et),at={...rt,node:tt},st=rt.disableFullscreenMode||d$3(tt.deltaBlock.dialog)||d$3(tt.deltaBlock.popover),ut=jsx$1(LayoutBlock,{...at,disableFullscreenMode:st});if(tt.deltaBlock.dialog)return jsx$1(DialogWithProvider,{element:tt.deltaBlock.dialog,deltaMsgReceivedAt:tt.deltaMsgReceivedAt,children:ut});if(tt.deltaBlock.expandable)return jsx$1(Expander,{empty:tt.isEmpty,isStale:ot,element:tt.deltaBlock.expandable,children:ut});if(tt.deltaBlock.popover)return jsx$1(Popover,{empty:tt.isEmpty,element:tt.deltaBlock.popover,width:rt.width,children:ut});if(tt.deltaBlock.type==="form"){const{formId:ct,clearOnSubmit:pt,enterToSubmit:dt,border:ft}=tt.deltaBlock.form,bt=rt.formsData.submitButtons.get(ct),ht=bt!==void 0&&bt.length>0;return jsx$1(Form,{formId:ct,clearOnSubmit:pt,enterToSubmit:dt,width:rt.width,hasSubmitButton:ht,scriptRunState:rt.scriptRunState,widgetMgr:rt.widgetMgr,border:ft,children:ut})}if(tt.deltaBlock.chatMessage)return jsx$1(ChatMessage,{element:tt.deltaBlock.chatMessage,endpoints:rt.endpoints,children:ut});if(tt.deltaBlock.column)return jsx$1(StyledColumn,{weight:tt.deltaBlock.column.weight??0,gap:tt.deltaBlock.column.gap??"",verticalAlignment:tt.deltaBlock.column.verticalAlignment??void 0,showBorder:tt.deltaBlock.column.showBorder??!1,className:"stColumn","data-testid":"stColumn",children:ut});if(tt.deltaBlock.tabContainer){const pt={...at,isStale:ot,renderTabContent:dt=>jsx$1(VerticalBlock,{...dt})};return jsx$1(Tabs,{...pt})}return ut},ChildRenderer=rt=>{const{libConfig:tt}=reactExports.useContext(LibContext);assignDividerColor(rt.node,useTheme());const et=new Set;return jsx$1(Fragment,{children:rt.node.children&&rt.node.children.map((nt,ot)=>{const at=tt.disableFullscreenMode||rt.disableFullscreenMode;if(nt instanceof ElementNode){const st={...rt,disableFullscreenMode:at,node:nt},ut=getElementId(nt.element)||ot.toString();return et.has(ut)?null:(et.add(ut),jsx$1(ElementNodeRenderer,{...st},ut))}if(nt instanceof BlockNode){const st={...rt,disableFullscreenMode:at,node:nt};return jsx$1(BlockNodeRenderer,{...st},ot)}throw new Error(`Unrecognized AppNode: ${nt}`)})})};function ScrollToBottomVerticalBlockWrapper(rt){const{border:tt,height:et,children:nt}=rt,ot=useScrollToBottom();return jsx$1(StyledVerticalBlockBorderWrapper,{border:tt,height:et,"data-testid":"stVerticalBlockBorderWrapper","data-test-scroll-behavior":"scroll-to-bottom",ref:ot,children:nt})}const VerticalBlock=rt=>{var ft,bt;const tt=reactExports.useRef(null),[et,nt]=React$1.useState(-1),ot=reactExports.useMemo(()=>new ResizeObserver(([ht])=>{window.requestAnimationFrame(()=>{nt(ht.target.getBoundingClientRect().width||-1)})}),[nt]),at=((ft=rt.node.deltaBlock.vertical)==null?void 0:ft.border)??!1,st=((bt=rt.node.deltaBlock.vertical)==null?void 0:bt.height)||void 0,ut=st&&rt.node.children.find(ht=>ht instanceof BlockNode&&ht.deltaBlock.type==="chatMessage")!==void 0;reactExports.useEffect(()=>(tt.current&&ot.observe(tt.current),()=>{ot.disconnect()}),[ot,ut]);const ct=ut?ScrollToBottomVerticalBlockWrapper:StyledVerticalBlockBorderWrapper,pt={...rt,width:et},dt=getKeyFromId(rt.node.deltaBlock.id);return jsx$1(ct,{border:at,height:st,"data-testid":"stVerticalBlockBorderWrapper","data-test-scroll-behavior":"normal",children:jsx$1(StyledVerticalBlockWrapper,{ref:tt,children:jsx$1(StyledVerticalBlock,{width:et,className:classNames("stVerticalBlock",convertKeyToClassName(dt)),"data-testid":"stVerticalBlock",children:jsx$1(ChildRenderer,{...pt})})})})},HorizontalBlock=rt=>{var et;const tt=((et=rt.node.deltaBlock.horizontal)==null?void 0:et.gap)??"";return jsx$1(StyledHorizontalBlock,{gap:tt,className:"stHorizontalBlock","data-testid":"stHorizontalBlock",children:jsx$1(ChildRenderer,{...rt})})};function LayoutBlock(rt){return rt.node.deltaBlock.horizontal?jsx$1(HorizontalBlock,{...rt}):jsx$1(VerticalBlock,{...rt})}const StyledDataFrameOverlay=newStyled("div",{target:"e19n7mk11"})(({theme:rt})=>({position:"fixed",top:0,left:0,zIndex:rt.zIndices.tablePortal,lineHeight:"100%"})),PortalContext=React$1.createContext(null),PortalProvider=({children:rt})=>{const tt=reactExports.useRef(null),et=reactExports.useCallback(()=>tt.current,[]);return jsxs(PortalContext.Provider,{value:et,children:[rt,jsx$1(StyledDataFrameOverlay,{"data-testid":"portal",id:"portal",ref:tt})]})};function ThemeProvider({theme:rt,baseuiTheme:tt,children:et}){return jsx$1(ThemeProvider$1,{theme:tt||baseuiLightTheme,children:jsx$1(ThemeProvider$2,{theme:rt,children:et})})}function toCodePoint(rt,tt){const et=[];let nt=0,ot=0,at=0;for(;at<rt.length;)nt=rt.charCodeAt(at++),ot?(et.push((65536+(ot-55296<<10)+(nt-56320)).toString(16)),ot=0):55296<=nt&&nt<=56319?ot=nt:et.push(nt.toString(16));return et.join("-")}const UFE0Fg=/\uFE0F/g,U200D="‍";function grabTheRightIcon(rt){return toCodePoint(rt.indexOf(U200D)<0?rt.replace(UFE0Fg,""):rt)}function iconToUrl(rt){const tt=/^:(.+)\/(.+):$/,et=rt.match(tt);return et===null?"":`https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsrounded/${et[2]}/default/24px.svg`}function handleFavicon(rt,tt,et){const nt=extractEmoji(rt);let ot;nt&&!rt.startsWith(":material")?ot=`https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/72x72/${grabTheRightIcon(nt)}.png`:rt.startsWith(":material")?ot=iconToUrl(rt):ot=et.buildMediaURL(rt),overwriteFavicon(ot),tt({type:"SET_PAGE_FAVICON",favicon:ot})}function overwriteFavicon(rt){const tt=document.querySelector("link[rel='shortcut icon']");tt&&(tt.href=rt)}function extractEmoji(rt){const tt=rt.replace("-","_");return nodeEmoji$1.hasEmoji(nodeEmoji$1.get(tt))?nodeEmoji$1.get(tt):nodeEmoji$1.hasEmoji(rt)?rt:""}var lib$2={},flattenNames$1={},baseFor$1=_baseFor,keys$2=keys_1;function baseForOwn$4(rt,tt){return rt&&baseFor$1(rt,tt,keys$2)}var _baseForOwn=baseForOwn$4,identity$3=identity_1;function castFunction$2(rt){return typeof rt=="function"?rt:identity$3}var _castFunction=castFunction$2,baseForOwn$3=_baseForOwn,castFunction$1=_castFunction;function forOwn(rt,tt){return rt&&baseForOwn$3(rt,castFunction$1(tt))}var forOwn_1=forOwn,HASH_UNDEFINED$3="__lodash_hash_undefined__";function setCacheAdd$2(rt){return this.__data__.set(rt,HASH_UNDEFINED$3),this}var _setCacheAdd=setCacheAdd$2;function setCacheHas$2(rt){return this.__data__.has(rt)}var _setCacheHas=setCacheHas$2,MapCache$1=_MapCache,setCacheAdd$1=_setCacheAdd,setCacheHas$1=_setCacheHas;function SetCache$3(rt){var tt=-1,et=rt==null?0:rt.length;for(this.__data__=new MapCache$1;++tt<et;)this.add(rt[tt])}SetCache$3.prototype.add=SetCache$3.prototype.push=setCacheAdd$1;SetCache$3.prototype.has=setCacheHas$1;var _SetCache=SetCache$3;function arraySome$2(rt,tt){for(var et=-1,nt=rt==null?0:rt.length;++et<nt;)if(tt(rt[et],et,rt))return!0;return!1}var _arraySome=arraySome$2;function cacheHas$3(rt,tt){return rt.has(tt)}var _cacheHas=cacheHas$3,SetCache$2=_SetCache,arraySome$1=_arraySome,cacheHas$2=_cacheHas,COMPARE_PARTIAL_FLAG$b=1,COMPARE_UNORDERED_FLAG$7=2;function equalArrays$3(rt,tt,et,nt,ot,at){var st=et&COMPARE_PARTIAL_FLAG$b,ut=rt.length,ct=tt.length;if(ut!=ct&&!(st&&ct>ut))return!1;var pt=at.get(rt),dt=at.get(tt);if(pt&&dt)return pt==tt&&dt==rt;var ft=-1,bt=!0,ht=et&COMPARE_UNORDERED_FLAG$7?new SetCache$2:void 0;for(at.set(rt,tt),at.set(tt,rt);++ft<ut;){var mt=rt[ft],Ot=tt[ft];if(nt)var yt=st?nt(Ot,mt,ft,tt,rt,at):nt(mt,Ot,ft,rt,tt,at);if(yt!==void 0){if(yt)continue;bt=!1;break}if(ht){if(!arraySome$1(tt,function(Mt,At){if(!cacheHas$2(ht,At)&&(mt===Mt||ot(mt,Mt,et,nt,at)))return ht.push(At)})){bt=!1;break}}else if(!(mt===Ot||ot(mt,Ot,et,nt,at))){bt=!1;break}}return at.delete(rt),at.delete(tt),bt}var _equalArrays=equalArrays$3,Symbol$2=_Symbol,Uint8Array$2=_Uint8Array,eq$1=eq_1,equalArrays$2=_equalArrays,mapToArray$1=_mapToArray,setToArray$1=_setToArray,COMPARE_PARTIAL_FLAG$a=1,COMPARE_UNORDERED_FLAG$6=2,boolTag$2="[object Boolean]",dateTag$2="[object Date]",errorTag$2="[object Error]",mapTag$3="[object Map]",numberTag$2="[object Number]",regexpTag$2="[object RegExp]",setTag$3="[object Set]",stringTag$2="[object String]",symbolTag$2="[object Symbol]",arrayBufferTag$2="[object ArrayBuffer]",dataViewTag$3="[object DataView]",symbolProto$2=Symbol$2?Symbol$2.prototype:void 0,symbolValueOf$1=symbolProto$2?symbolProto$2.valueOf:void 0;function equalByTag$2(rt,tt,et,nt,ot,at,st){switch(et){case dataViewTag$3:if(rt.byteLength!=tt.byteLength||rt.byteOffset!=tt.byteOffset)return!1;rt=rt.buffer,tt=tt.buffer;case arrayBufferTag$2:return!(rt.byteLength!=tt.byteLength||!at(new Uint8Array$2(rt),new Uint8Array$2(tt)));case boolTag$2:case dateTag$2:case numberTag$2:return eq$1(+rt,+tt);case errorTag$2:return rt.name==tt.name&&rt.message==tt.message;case regexpTag$2:case stringTag$2:return rt==tt+"";case mapTag$3:var ut=mapToArray$1;case setTag$3:var ct=nt&COMPARE_PARTIAL_FLAG$a;if(ut||(ut=setToArray$1),rt.size!=tt.size&&!ct)return!1;var pt=st.get(rt);if(pt)return pt==tt;nt|=COMPARE_UNORDERED_FLAG$6,st.set(rt,tt);var dt=equalArrays$2(ut(rt),ut(tt),nt,ot,at,st);return st.delete(rt),dt;case symbolTag$2:if(symbolValueOf$1)return symbolValueOf$1.call(rt)==symbolValueOf$1.call(tt)}return!1}var _equalByTag=equalByTag$2,getAllKeys$1=_getAllKeys,COMPARE_PARTIAL_FLAG$9=1,objectProto$h=Object.prototype,hasOwnProperty$f=objectProto$h.hasOwnProperty;function equalObjects$2(rt,tt,et,nt,ot,at){var st=et&COMPARE_PARTIAL_FLAG$9,ut=getAllKeys$1(rt),ct=ut.length,pt=getAllKeys$1(tt),dt=pt.length;if(ct!=dt&&!st)return!1;for(var ft=ct;ft--;){var bt=ut[ft];if(!(st?bt in tt:hasOwnProperty$f.call(tt,bt)))return!1}var ht=at.get(rt),mt=at.get(tt);if(ht&&mt)return ht==tt&&mt==rt;var Ot=!0;at.set(rt,tt),at.set(tt,rt);for(var yt=st;++ft<ct;){bt=ut[ft];var Mt=rt[bt],At=tt[bt];if(nt)var St=st?nt(At,Mt,bt,tt,rt,at):nt(Mt,At,bt,rt,tt,at);if(!(St===void 0?Mt===At||ot(Mt,At,et,nt,at):St)){Ot=!1;break}yt||(yt=bt=="constructor")}if(Ot&&!yt){var Et=rt.constructor,zt=tt.constructor;Et!=zt&&"constructor"in rt&&"constructor"in tt&&!(typeof Et=="function"&&Et instanceof Et&&typeof zt=="function"&&zt instanceof zt)&&(Ot=!1)}return at.delete(rt),at.delete(tt),Ot}var _equalObjects=equalObjects$2,Stack$2=_Stack,equalArrays$1=_equalArrays,equalByTag$1=_equalByTag,equalObjects$1=_equalObjects,getTag$1=_getTag,isArray$7=isArray_1,isBuffer$2=isBufferExports,isTypedArray$2=isTypedArray_1,COMPARE_PARTIAL_FLAG$8=1,argsTag$3="[object Arguments]",arrayTag$2="[object Array]",objectTag$4="[object Object]",objectProto$g=Object.prototype,hasOwnProperty$e=objectProto$g.hasOwnProperty;function baseIsEqualDeep$2(rt,tt,et,nt,ot,at){var st=isArray$7(rt),ut=isArray$7(tt),ct=st?arrayTag$2:getTag$1(rt),pt=ut?arrayTag$2:getTag$1(tt);ct=ct==argsTag$3?objectTag$4:ct,pt=pt==argsTag$3?objectTag$4:pt;var dt=ct==objectTag$4,ft=pt==objectTag$4,bt=ct==pt;if(bt&&isBuffer$2(rt)){if(!isBuffer$2(tt))return!1;st=!0,dt=!1}if(bt&&!dt)return at||(at=new Stack$2),st||isTypedArray$2(rt)?equalArrays$1(rt,tt,et,nt,ot,at):equalByTag$1(rt,tt,ct,et,nt,ot,at);if(!(et&COMPARE_PARTIAL_FLAG$8)){var ht=dt&&hasOwnProperty$e.call(rt,"__wrapped__"),mt=ft&&hasOwnProperty$e.call(tt,"__wrapped__");if(ht||mt){var Ot=ht?rt.value():rt,yt=mt?tt.value():tt;return at||(at=new Stack$2),ot(Ot,yt,et,nt,at)}}return bt?(at||(at=new Stack$2),equalObjects$1(rt,tt,et,nt,ot,at)):!1}var _baseIsEqualDeep=baseIsEqualDeep$2,baseIsEqualDeep$1=_baseIsEqualDeep,isObjectLike$1=isObjectLike_1;function baseIsEqual$4(rt,tt,et,nt,ot){return rt===tt?!0:rt==null||tt==null||!isObjectLike$1(rt)&&!isObjectLike$1(tt)?rt!==rt&&tt!==tt:baseIsEqualDeep$1(rt,tt,et,nt,baseIsEqual$4,ot)}var _baseIsEqual=baseIsEqual$4,Stack$1=_Stack,baseIsEqual$3=_baseIsEqual,COMPARE_PARTIAL_FLAG$7=1,COMPARE_UNORDERED_FLAG$5=2;function baseIsMatch$2(rt,tt,et,nt){var ot=et.length,at=ot,st=!nt;if(rt==null)return!at;for(rt=Object(rt);ot--;){var ut=et[ot];if(st&&ut[2]?ut[1]!==rt[ut[0]]:!(ut[0]in rt))return!1}for(;++ot<at;){ut=et[ot];var ct=ut[0],pt=rt[ct],dt=ut[1];if(st&&ut[2]){if(pt===void 0&&!(ct in rt))return!1}else{var ft=new Stack$1;if(nt)var bt=nt(pt,dt,ct,rt,tt,ft);if(!(bt===void 0?baseIsEqual$3(dt,pt,COMPARE_PARTIAL_FLAG$7|COMPARE_UNORDERED_FLAG$5,nt,ft):bt))return!1}}return!0}var _baseIsMatch=baseIsMatch$2,isObject$3=isObject_1;function isStrictComparable$3(rt){return rt===rt&&!isObject$3(rt)}var _isStrictComparable=isStrictComparable$3,isStrictComparable$2=_isStrictComparable,keys$1=keys_1;function getMatchData$2(rt){for(var tt=keys$1(rt),et=tt.length;et--;){var nt=tt[et],ot=rt[nt];tt[et]=[nt,ot,isStrictComparable$2(ot)]}return tt}var _getMatchData=getMatchData$2;function matchesStrictComparable$3(rt,tt){return function(et){return et==null?!1:et[rt]===tt&&(tt!==void 0||rt in Object(et))}}var _matchesStrictComparable=matchesStrictComparable$3,baseIsMatch$1=_baseIsMatch,getMatchData$1=_getMatchData,matchesStrictComparable$2=_matchesStrictComparable;function baseMatches$2(rt){var tt=getMatchData$1(rt);return tt.length==1&&tt[0][2]?matchesStrictComparable$2(tt[0][0],tt[0][1]):function(et){return et===rt||baseIsMatch$1(et,rt,tt)}}var _baseMatches=baseMatches$2;function baseHasIn$2(rt,tt){return rt!=null&&tt in Object(rt)}var _baseHasIn=baseHasIn$2,castPath$3=_castPath,isArguments$1=isArguments_1,isArray$6=isArray_1,isIndex$2=_isIndex,isLength$1=isLength_1,toKey$4=_toKey;function hasPath$2(rt,tt,et){tt=castPath$3(tt,rt);for(var nt=-1,ot=tt.length,at=!1;++nt<ot;){var st=toKey$4(tt[nt]);if(!(at=rt!=null&&et(rt,st)))break;rt=rt[st]}return at||++nt!=ot?at:(ot=rt==null?0:rt.length,!!ot&&isLength$1(ot)&&isIndex$2(st,ot)&&(isArray$6(rt)||isArguments$1(rt)))}var _hasPath=hasPath$2,baseHasIn$1=_baseHasIn,hasPath$1=_hasPath;function hasIn$3(rt,tt){return rt!=null&&hasPath$1(rt,tt,baseHasIn$1)}var hasIn_1=hasIn$3,baseIsEqual$2=_baseIsEqual,get$2=get_1,hasIn$2=hasIn_1,isKey$2=_isKey,isStrictComparable$1=_isStrictComparable,matchesStrictComparable$1=_matchesStrictComparable,toKey$3=_toKey,COMPARE_PARTIAL_FLAG$6=1,COMPARE_UNORDERED_FLAG$4=2;function baseMatchesProperty$2(rt,tt){return isKey$2(rt)&&isStrictComparable$1(tt)?matchesStrictComparable$1(toKey$3(rt),tt):function(et){var nt=get$2(et,rt);return nt===void 0&&nt===tt?hasIn$2(et,rt):baseIsEqual$2(tt,nt,COMPARE_PARTIAL_FLAG$6|COMPARE_UNORDERED_FLAG$4)}}var _baseMatchesProperty=baseMatchesProperty$2,baseGet$3=_baseGet;function basePropertyDeep$2(rt){return function(tt){return baseGet$3(tt,rt)}}var _basePropertyDeep=basePropertyDeep$2,baseProperty$1=_baseProperty,basePropertyDeep$1=_basePropertyDeep,isKey$1=_isKey,toKey$2=_toKey;function property$2(rt){return isKey$1(rt)?baseProperty$1(toKey$2(rt)):basePropertyDeep$1(rt)}var property_1=property$2,baseMatches$1=_baseMatches,baseMatchesProperty$1=_baseMatchesProperty,identity$2=identity_1,isArray$5=isArray_1,property$1=property_1;function baseIteratee$5(rt){return typeof rt=="function"?rt:rt==null?identity$2:typeof rt=="object"?isArray$5(rt)?baseMatchesProperty$1(rt[0],rt[1]):baseMatches$1(rt):property$1(rt)}var _baseIteratee=baseIteratee$5,isArrayLike$2=isArrayLike_1;function createBaseEach$2(rt,tt){return function(et,nt){if(et==null)return et;if(!isArrayLike$2(et))return rt(et,nt);for(var ot=et.length,at=tt?ot:-1,st=Object(et);(tt?at--:++at<ot)&&nt(st[at],at,st)!==!1;);return et}}var _createBaseEach=createBaseEach$2,baseForOwn$2=_baseForOwn,createBaseEach$1=_createBaseEach,baseEach$3=createBaseEach$1(baseForOwn$2),_baseEach=baseEach$3,baseEach$2=_baseEach,isArrayLike$1=isArrayLike_1;function baseMap$3(rt,tt){var et=-1,nt=isArrayLike$1(rt)?Array(rt.length):[];return baseEach$2(rt,function(ot,at,st){nt[++et]=tt(ot,at,st)}),nt}var _baseMap=baseMap$3,arrayMap$3=_arrayMap,baseIteratee$4=_baseIteratee,baseMap$2=_baseMap,isArray$4=isArray_1;function map$1(rt,tt){var et=isArray$4(rt)?arrayMap$3:baseMap$2;return et(rt,baseIteratee$4(tt))}var map_1=map$1;Object.defineProperty(flattenNames$1,"__esModule",{value:!0});flattenNames$1.flattenNames=void 0;var _isString2=isString_1,_isString3=_interopRequireDefault$7(_isString2),_forOwn2$2=forOwn_1,_forOwn3$2=_interopRequireDefault$7(_forOwn2$2),_isPlainObject2=isPlainObject_1,_isPlainObject3=_interopRequireDefault$7(_isPlainObject2),_map2=map_1,_map3=_interopRequireDefault$7(_map2);function _interopRequireDefault$7(rt){return rt&&rt.__esModule?rt:{default:rt}}var flattenNames=flattenNames$1.flattenNames=function rt(){var tt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],et=[];return(0,_map3.default)(tt,function(nt){Array.isArray(nt)?rt(nt).map(function(ot){return et.push(ot)}):(0,_isPlainObject3.default)(nt)?(0,_forOwn3$2.default)(nt,function(ot,at){ot===!0&&et.push(at),et.push(at+"-"+ot)}):(0,_isString3.default)(nt)&&et.push(nt)}),et};flattenNames$1.default=flattenNames;var mergeClasses$1={};Object.defineProperty(mergeClasses$1,"__esModule",{value:!0});mergeClasses$1.mergeClasses=void 0;var _forOwn2$1=forOwn_1,_forOwn3$1=_interopRequireDefault$6(_forOwn2$1),_cloneDeep2=cloneDeep_1,_cloneDeep3=_interopRequireDefault$6(_cloneDeep2),_extends$w=Object.assign||function(rt){for(var tt=1;tt<arguments.length;tt++){var et=arguments[tt];for(var nt in et)Object.prototype.hasOwnProperty.call(et,nt)&&(rt[nt]=et[nt])}return rt};function _interopRequireDefault$6(rt){return rt&&rt.__esModule?rt:{default:rt}}var mergeClasses=mergeClasses$1.mergeClasses=function rt(tt){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],nt=tt.default&&(0,_cloneDeep3.default)(tt.default)||{};return et.map(function(ot){var at=tt[ot];return at&&(0,_forOwn3$1.default)(at,function(st,ut){nt[ut]||(nt[ut]={}),nt[ut]=_extends$w({},nt[ut],at[ut])}),ot}),nt};mergeClasses$1.default=mergeClasses;var autoprefix$1={};Object.defineProperty(autoprefix$1,"__esModule",{value:!0});autoprefix$1.autoprefix=void 0;var _forOwn2=forOwn_1,_forOwn3=_interopRequireDefault$5(_forOwn2),_extends$v=Object.assign||function(rt){for(var tt=1;tt<arguments.length;tt++){var et=arguments[tt];for(var nt in et)Object.prototype.hasOwnProperty.call(et,nt)&&(rt[nt]=et[nt])}return rt};function _interopRequireDefault$5(rt){return rt&&rt.__esModule?rt:{default:rt}}var transforms={borderRadius:function rt(tt){return{msBorderRadius:tt,MozBorderRadius:tt,OBorderRadius:tt,WebkitBorderRadius:tt,borderRadius:tt}},boxShadow:function rt(tt){return{msBoxShadow:tt,MozBoxShadow:tt,OBoxShadow:tt,WebkitBoxShadow:tt,boxShadow:tt}},userSelect:function rt(tt){return{WebkitTouchCallout:tt,KhtmlUserSelect:tt,MozUserSelect:tt,msUserSelect:tt,WebkitUserSelect:tt,userSelect:tt}},flex:function rt(tt){return{WebkitBoxFlex:tt,MozBoxFlex:tt,WebkitFlex:tt,msFlex:tt,flex:tt}},flexBasis:function rt(tt){return{WebkitFlexBasis:tt,flexBasis:tt}},justifyContent:function rt(tt){return{WebkitJustifyContent:tt,justifyContent:tt}},transition:function rt(tt){return{msTransition:tt,MozTransition:tt,OTransition:tt,WebkitTransition:tt,transition:tt}},transform:function rt(tt){return{msTransform:tt,MozTransform:tt,OTransform:tt,WebkitTransform:tt,transform:tt}},absolute:function rt(tt){var et=tt&&tt.split(" ");return{position:"absolute",top:et&&et[0],right:et&&et[1],bottom:et&&et[2],left:et&&et[3]}},extend:function rt(tt,et){var nt=et[tt];return nt||{extend:tt}}},autoprefix=autoprefix$1.autoprefix=function rt(tt){var et={};return(0,_forOwn3.default)(tt,function(nt,ot){var at={};(0,_forOwn3.default)(nt,function(st,ut){var ct=transforms[ut];ct?at=_extends$v({},at,ct(st)):at[ut]=st}),et[ot]=at}),et};autoprefix$1.default=autoprefix;var hover$1={};Object.defineProperty(hover$1,"__esModule",{value:!0});hover$1.hover=void 0;var _extends$u=Object.assign||function(rt){for(var tt=1;tt<arguments.length;tt++){var et=arguments[tt];for(var nt in et)Object.prototype.hasOwnProperty.call(et,nt)&&(rt[nt]=et[nt])}return rt},_react$3=reactExports,_react2$3=_interopRequireDefault$4(_react$3);function _interopRequireDefault$4(rt){return rt&&rt.__esModule?rt:{default:rt}}function _classCallCheck$f(rt,tt){if(!(rt instanceof tt))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$f(rt,tt){if(!rt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return tt&&(typeof tt=="object"||typeof tt=="function")?tt:rt}function _inherits$f(rt,tt){if(typeof tt!="function"&&tt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof tt);rt.prototype=Object.create(tt&&tt.prototype,{constructor:{value:rt,enumerable:!1,writable:!0,configurable:!0}}),tt&&(Object.setPrototypeOf?Object.setPrototypeOf(rt,tt):rt.__proto__=tt)}var hover=hover$1.hover=function rt(tt){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(nt){_inherits$f(ot,nt);function ot(){var at,st,ut,ct;_classCallCheck$f(this,ot);for(var pt=arguments.length,dt=Array(pt),ft=0;ft<pt;ft++)dt[ft]=arguments[ft];return ct=(st=(ut=_possibleConstructorReturn$f(this,(at=ot.__proto__||Object.getPrototypeOf(ot)).call.apply(at,[this].concat(dt))),ut),ut.state={hover:!1},ut.handleMouseOver=function(){return ut.setState({hover:!0})},ut.handleMouseOut=function(){return ut.setState({hover:!1})},ut.render=function(){return _react2$3.default.createElement(et,{onMouseOver:ut.handleMouseOver,onMouseOut:ut.handleMouseOut},_react2$3.default.createElement(tt,_extends$u({},ut.props,ut.state)))},st),_possibleConstructorReturn$f(ut,ct)}return ot}(_react2$3.default.Component)};hover$1.default=hover;var active$1={};Object.defineProperty(active$1,"__esModule",{value:!0});active$1.active=void 0;var _extends$t=Object.assign||function(rt){for(var tt=1;tt<arguments.length;tt++){var et=arguments[tt];for(var nt in et)Object.prototype.hasOwnProperty.call(et,nt)&&(rt[nt]=et[nt])}return rt},_react$2=reactExports,_react2$2=_interopRequireDefault$3(_react$2);function _interopRequireDefault$3(rt){return rt&&rt.__esModule?rt:{default:rt}}function _classCallCheck$e(rt,tt){if(!(rt instanceof tt))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$e(rt,tt){if(!rt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return tt&&(typeof tt=="object"||typeof tt=="function")?tt:rt}function _inherits$e(rt,tt){if(typeof tt!="function"&&tt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof tt);rt.prototype=Object.create(tt&&tt.prototype,{constructor:{value:rt,enumerable:!1,writable:!0,configurable:!0}}),tt&&(Object.setPrototypeOf?Object.setPrototypeOf(rt,tt):rt.__proto__=tt)}var active=active$1.active=function rt(tt){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(nt){_inherits$e(ot,nt);function ot(){var at,st,ut,ct;_classCallCheck$e(this,ot);for(var pt=arguments.length,dt=Array(pt),ft=0;ft<pt;ft++)dt[ft]=arguments[ft];return ct=(st=(ut=_possibleConstructorReturn$e(this,(at=ot.__proto__||Object.getPrototypeOf(ot)).call.apply(at,[this].concat(dt))),ut),ut.state={active:!1},ut.handleMouseDown=function(){return ut.setState({active:!0})},ut.handleMouseUp=function(){return ut.setState({active:!1})},ut.render=function(){return _react2$2.default.createElement(et,{onMouseDown:ut.handleMouseDown,onMouseUp:ut.handleMouseUp},_react2$2.default.createElement(tt,_extends$t({},ut.props,ut.state)))},st),_possibleConstructorReturn$e(ut,ct)}return ot}(_react2$2.default.Component)};active$1.default=active;var loop={};Object.defineProperty(loop,"__esModule",{value:!0});var loopable=function rt(tt,et){var nt={},ot=function(st){var ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;nt[st]=ut};return tt===0&&ot("first-child"),tt===et-1&&ot("last-child"),(tt===0||tt%2===0)&&ot("even"),Math.abs(tt%2)===1&&ot("odd"),ot("nth-child",tt),nt};loop.default=loopable;Object.defineProperty(lib$2,"__esModule",{value:!0});lib$2.ReactCSS=lib$2.loop=lib$2.handleActive=handleHover=lib$2.handleHover=lib$2.hover=void 0;var _flattenNames=flattenNames$1,_flattenNames2=_interopRequireDefault$2(_flattenNames),_mergeClasses=mergeClasses$1,_mergeClasses2=_interopRequireDefault$2(_mergeClasses),_autoprefix=autoprefix$1,_autoprefix2=_interopRequireDefault$2(_autoprefix),_hover2=hover$1,_hover3=_interopRequireDefault$2(_hover2),_active=active$1,_active2=_interopRequireDefault$2(_active),_loop2=loop,_loop3=_interopRequireDefault$2(_loop2);function _interopRequireDefault$2(rt){return rt&&rt.__esModule?rt:{default:rt}}lib$2.hover=_hover3.default;var handleHover=lib$2.handleHover=_hover3.default;lib$2.handleActive=_active2.default;lib$2.loop=_loop3.default;var ReactCSS=lib$2.ReactCSS=function rt(tt){for(var et=arguments.length,nt=Array(et>1?et-1:0),ot=1;ot<et;ot++)nt[ot-1]=arguments[ot];var at=(0,_flattenNames2.default)(nt),st=(0,_mergeClasses2.default)(tt,at);return(0,_autoprefix2.default)(st)},_default$2=lib$2.default=ReactCSS,calculateChange$2=function rt(tt,et,nt,ot,at){var st=at.clientWidth,ut=at.clientHeight,ct=typeof tt.pageX=="number"?tt.pageX:tt.touches[0].pageX,pt=typeof tt.pageY=="number"?tt.pageY:tt.touches[0].pageY,dt=ct-(at.getBoundingClientRect().left+window.pageXOffset),ft=pt-(at.getBoundingClientRect().top+window.pageYOffset);if(nt==="vertical"){var bt=void 0;if(ft<0?bt=0:ft>ut?bt=1:bt=Math.round(ft*100/ut)/100,et.a!==bt)return{h:et.h,s:et.s,l:et.l,a:bt,source:"rgb"}}else{var ht=void 0;if(dt<0?ht=0:dt>st?ht=1:ht=Math.round(dt*100/st)/100,ot!==ht)return{h:et.h,s:et.s,l:et.l,a:ht,source:"rgb"}}return null},checkboardCache={},render=function rt(tt,et,nt,ot){if(typeof document>"u"&&!ot)return null;var at=ot?new ot:document.createElement("canvas");at.width=nt*2,at.height=nt*2;var st=at.getContext("2d");return st?(st.fillStyle=tt,st.fillRect(0,0,at.width,at.height),st.fillStyle=et,st.fillRect(0,0,nt,nt),st.translate(nt,nt),st.fillRect(0,0,nt,nt),at.toDataURL()):null},get$1=function rt(tt,et,nt,ot){var at=tt+"-"+et+"-"+nt+(ot?"-server":"");if(checkboardCache[at])return checkboardCache[at];var st=render(tt,et,nt,ot);return checkboardCache[at]=st,st},_extends$s=Object.assign||function(rt){for(var tt=1;tt<arguments.length;tt++){var et=arguments[tt];for(var nt in et)Object.prototype.hasOwnProperty.call(et,nt)&&(rt[nt]=et[nt])}return rt},Checkboard=function rt(tt){var et=tt.white,nt=tt.grey,ot=tt.size,at=tt.renderers,st=tt.borderRadius,ut=tt.boxShadow,ct=tt.children,pt=_default$2({default:{grid:{borderRadius:st,boxShadow:ut,absolute:"0px 0px 0px 0px",background:"url("+get$1(et,nt,ot,at.canvas)+") center left"}}});return reactExports.isValidElement(ct)?React$1.cloneElement(ct,_extends$s({},ct.props,{style:_extends$s({},ct.props.style,pt.grid)})):React$1.createElement("div",{style:pt.grid})};Checkboard.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};var _extends$r=Object.assign||function(rt){for(var tt=1;tt<arguments.length;tt++){var et=arguments[tt];for(var nt in et)Object.prototype.hasOwnProperty.call(et,nt)&&(rt[nt]=et[nt])}return rt},_createClass$d=function(){function rt(tt,et){for(var nt=0;nt<et.length;nt++){var ot=et[nt];ot.enumerable=ot.enumerable||!1,ot.configurable=!0,"value"in ot&&(ot.writable=!0),Object.defineProperty(tt,ot.key,ot)}}return function(tt,et,nt){return et&&rt(tt.prototype,et),nt&&rt(tt,nt),tt}}();function _classCallCheck$d(rt,tt){if(!(rt instanceof tt))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$d(rt,tt){if(!rt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return tt&&(typeof tt=="object"||typeof tt=="function")?tt:rt}function _inherits$d(rt,tt){if(typeof tt!="function"&&tt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof tt);rt.prototype=Object.create(tt&&tt.prototype,{constructor:{value:rt,enumerable:!1,writable:!0,configurable:!0}}),tt&&(Object.setPrototypeOf?Object.setPrototypeOf(rt,tt):rt.__proto__=tt)}var Alpha=function(rt){_inherits$d(tt,rt);function tt(){var et,nt,ot,at;_classCallCheck$d(this,tt);for(var st=arguments.length,ut=Array(st),ct=0;ct<st;ct++)ut[ct]=arguments[ct];return at=(nt=(ot=_possibleConstructorReturn$d(this,(et=tt.__proto__||Object.getPrototypeOf(tt)).call.apply(et,[this].concat(ut))),ot),ot.handleChange=function(pt){var dt=calculateChange$2(pt,ot.props.hsl,ot.props.direction,ot.props.a,ot.container);dt&&typeof ot.props.onChange=="function"&&ot.props.onChange(dt,pt)},ot.handleMouseDown=function(pt){ot.handleChange(pt),window.addEventListener("mousemove",ot.handleChange),window.addEventListener("mouseup",ot.handleMouseUp)},ot.handleMouseUp=function(){ot.unbindEventListeners()},ot.unbindEventListeners=function(){window.removeEventListener("mousemove",ot.handleChange),window.removeEventListener("mouseup",ot.handleMouseUp)},nt),_possibleConstructorReturn$d(ot,at)}return _createClass$d(tt,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var nt=this,ot=this.props.rgb,at=_default$2({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+ot.r+","+ot.g+","+ot.b+`, 0) 0%,
694
+ `),allowHTML:!1})]}),ct&&jsx$1(StyledHeaderDivider,{"data-testid":"stHeadingDivider",rainbow:ct.includes("linear"),color:ct})]})}const StyledCheckbox$1=newStyled("div",{target:"e6x5rwu0"})(({width:rt,theme:tt})=>({width:rt,display:"flex",alignItems:"center",minHeight:tt.sizes.smallElementHeight})),StyledContent=newStyled("div",{target:"e6x5rwu1"})(({visibility:rt})=>({display:rt===LabelVisibilityOptions.Collapsed?"none":"flex",visibility:rt===LabelVisibilityOptions.Hidden?"hidden":"visible",verticalAlign:"middle",flexDirection:"row",alignItems:"center"}));function translateGapWidth(rt,tt){let et=tt.spacing.lg;return rt==="medium"?et=tt.spacing.threeXL:rt==="large"&&(et=tt.spacing.fourXL),et}const StyledHorizontalBlock=newStyled("div",{target:"e6rk8up0"})(({theme:rt,gap:tt})=>({display:"flex",flexWrap:"wrap",flexGrow:1,alignItems:"stretch",gap:translateGapWidth(tt,rt)})),GLOBAL_ELEMENTS=["balloons","snow"],StyledElementContainer=newStyled("div",{target:"e6rk8up1"})(({theme:rt,isStale:tt,width:et,elementType:nt})=>({width:et,position:"relative","@media print":{overflow:"visible"},":is(.stHtml-empty)":{display:"none"},":has(> .stCacheSpinner)":{height:rt.spacing.none,overflow:"visible",visibility:"visible",marginBottom:`-${rt.spacing.lg}`,zIndex:rt.zIndices.cacheSpinner},":has(> .stPageLink)":{marginTop:`-${rt.spacing.xs}`,marginBottom:`-${rt.spacing.xs}`},...tt&&nt!=="skeleton"&&STALE_STYLES,...nt==="empty"?{display:"none"}:{},...GLOBAL_ELEMENTS.includes(nt)?{marginBottom:`-${rt.spacing.lg}`}:{}})),StyledColumn=newStyled("div",{target:"e6rk8up2"})(({theme:rt,weight:tt,gap:et,showBorder:nt,verticalAlignment:ot})=>{const{VerticalAlignment:at}=Block$2.Column,st=tt*100,ut=translateGapWidth(et,rt),ct=`calc(${st}% - ${ut})`;return{width:ct,flex:`1 1 ${ct}`,[`@media (max-width: ${rt.breakpoints.columns})`]:{minWidth:`calc(100% - ${rt.spacing.twoXL})`},...ot===at.BOTTOM&&{marginTop:"auto",[`& ${StyledElementContainer}:last-of-type > ${StyledCheckbox$1}`]:{marginBottom:rt.spacing.sm}},...ot===at.TOP&&{[`& ${StyledElementContainer}:first-of-type > ${StyledCheckbox$1}`]:{marginTop:rt.spacing.sm}},...ot===at.CENTER&&{marginTop:"auto",marginBottom:"auto"},...nt&&{border:`${rt.sizes.borderWidth} solid ${rt.colors.borderColor}`,borderRadius:rt.radii.default,padding:`calc(${rt.spacing.lg} - ${rt.sizes.borderWidth})`}}}),StyledVerticalBlock=newStyled("div",{target:"e6rk8up3"})(({width:rt,theme:tt})=>({width:rt,position:"relative",display:"flex",flex:1,flexDirection:"column",gap:tt.spacing.lg})),StyledVerticalBlockWrapper=newStyled("div",{target:"e6rk8up4"})({display:"flex",flexDirection:"column",flex:1}),StyledVerticalBlockBorderWrapper=newStyled("div",{target:"e6rk8up5"})(({theme:rt,border:tt,height:et})=>({...tt&&{border:`${rt.sizes.borderWidth} solid ${rt.colors.borderColor}`,borderRadius:rt.radii.default,padding:`calc(${rt.spacing.lg} - ${rt.sizes.borderWidth})`},...et&&{height:`${et}px`,overflow:"auto"}})),Audio=React$1.lazy(()=>__vitePreload(()=>import("./index.CFtAnwvU.js"),[],import.meta.url)),Balloons=React$1.lazy(()=>__vitePreload(()=>import("./index.CuNiy4LB.js"),__vite__mapDeps([0,1]),import.meta.url)),Snow=React$1.lazy(()=>__vitePreload(()=>import("./index.BlcNB-sY.js"),__vite__mapDeps([2,1]),import.meta.url)),ArrowDataFrame=React$1.lazy(()=>__vitePreload(()=>import("./index.DYHaq5Cw.js").then(rt=>rt.c),__vite__mapDeps([3,4,5,6,7,8,9,10,11,12,13,14]),import.meta.url)),ArrowVegaLiteChart=React$1.lazy(()=>__vitePreload(()=>import("./index.CMcCB4vg.js"),__vite__mapDeps([15,6,5,7,16,17,18,4]),import.meta.url)),Toast=React$1.lazy(()=>__vitePreload(()=>import("./index.i2uLxrqv.js"),[],import.meta.url)),BokehChart=React$1.lazy(()=>__vitePreload(()=>import("./index.B9q8XlSH.js"),[],import.meta.url)),DebouncedBokehChart=debounceRender(BokehChart,100),DeckGlJsonChart=React$1.lazy(()=>__vitePreload(()=>import("./index.C-_AHUSz.js"),__vite__mapDeps([19,10,11,6,5,20,4,16,17,21,22]),import.meta.url)),GraphVizChart=React$1.lazy(()=>__vitePreload(()=>import("./index.CEWcZMdD.js"),__vite__mapDeps([23,18,17,6,5]),import.meta.url)),IFrame=React$1.lazy(()=>__vitePreload(()=>import("./index.Yr32ts47.js"),[],import.meta.url)),ImageList=React$1.lazy(()=>__vitePreload(()=>import("./index.BA5ubsQA.js"),__vite__mapDeps([24,6,5]),import.meta.url)),LinkButton=React$1.lazy(()=>__vitePreload(()=>import("./index.CQ_wmqnz.js"),[],import.meta.url)),PageLink=React$1.lazy(()=>__vitePreload(()=>import("./index.DPs04g4h.js"),[],import.meta.url)),PlotlyChart=React$1.lazy(()=>__vitePreload(()=>import("./index.D94jjl7_.js"),__vite__mapDeps([25,4,5]),import.meta.url)),Video=React$1.lazy(()=>__vitePreload(()=>import("./index.DWIf4xZP.js"),[],import.meta.url)),AudioInput=React$1.lazy(()=>__vitePreload(()=>import("./index.Bw9RDCaH.js"),__vite__mapDeps([26,4,6,27,9,13]),import.meta.url)),Button=React$1.lazy(()=>__vitePreload(()=>import("./index.DgwklVRJ.js"),[],import.meta.url)),ButtonGroup=React$1.lazy(()=>__vitePreload(()=>import("./index.JSS70wsq.js"),__vite__mapDeps([28,20,4]),import.meta.url)),DownloadButton=React$1.lazy(()=>__vitePreload(()=>import("./index.joQNIDux.js"),__vite__mapDeps([29,9]),import.meta.url)),CameraInput=React$1.lazy(()=>__vitePreload(()=>import("./index.zzxJWhBg.js"),__vite__mapDeps([30,21,4,31,32]),import.meta.url)),ChatInput=React$1.lazy(()=>__vitePreload(()=>import("./index.CEj-S3PF.js"),__vite__mapDeps([33,34,35,36,21,31,37,38]),import.meta.url)),Checkbox=React$1.lazy(()=>__vitePreload(()=>import("./index.BevO9CYu.js"),__vite__mapDeps([39,20,4]),import.meta.url)),ColorPicker=React$1.lazy(()=>__vitePreload(()=>import("./index.DfCewjMv.js"),__vite__mapDeps([40,20,4]),import.meta.url)),DateInput=React$1.lazy(()=>__vitePreload(()=>import("./index.B2evntzQ.js"),__vite__mapDeps([41,20,4,42,11,12,43,38]),import.meta.url)),Html=React$1.lazy(()=>__vitePreload(()=>import("./index.BpmrfDoR.js"),[],import.meta.url)),Multiselect=React$1.lazy(()=>__vitePreload(()=>import("./index.DwWMkgFE.js"),__vite__mapDeps([44,20,4]),import.meta.url)),Progress=React$1.lazy(()=>__vitePreload(()=>import("./index.B-4MHYvl.js"),__vite__mapDeps([45,32]),import.meta.url)),Spinner=React$1.lazy(()=>__vitePreload(()=>import("./index.BNrZwkh1.js"),[],import.meta.url)),Radio=React$1.lazy(()=>__vitePreload(()=>import("./index.BCYuLMdi.js"),__vite__mapDeps([46,20,4]),import.meta.url)),Selectbox$1=React$1.lazy(()=>__vitePreload(()=>import("./index.-SmXSkUY.js"),__vite__mapDeps([47,20,4]),import.meta.url)),Slider$1=React$1.lazy(()=>__vitePreload(()=>import("./index.BqePTNWb.js"),__vite__mapDeps([48,8,20,4]),import.meta.url)),FileUploader=React$1.lazy(()=>__vitePreload(()=>import("./index.D9M0iUu5.js"),__vite__mapDeps([49,21,4,34,32,27,31]),import.meta.url)),TextArea=React$1.lazy(()=>__vitePreload(()=>import("./index.BVbWPXFU.js"),__vite__mapDeps([50,51,52,36,35,20,4,37,38]),import.meta.url)),TextInput=React$1.lazy(()=>__vitePreload(()=>import("./index.pzjWTi64.js"),__vite__mapDeps([53,51,52,36,20,4,35,43,38]),import.meta.url)),TimeInput=React$1.lazy(()=>__vitePreload(()=>import("./index.B0xfT3p4.js"),__vite__mapDeps([54,20,4,42,11,12]),import.meta.url)),NumberInput=React$1.lazy(()=>__vitePreload(()=>import("./index.CvADzqCD.js"),__vite__mapDeps([55,8,51,4,35,43,38]),import.meta.url)),StreamlitSyntaxHighlighter=React$1.lazy(()=>__vitePreload(()=>Promise.resolve().then(()=>StreamlitSyntaxHighlighter$2),void 0,import.meta.url));function hideIfStale(rt,tt){return rt?jsx$1(Fragment,{}):tt}const RawElementNodeRenderer=rt=>{const{node:tt}=rt;if(!tt)throw new Error("ElementNode not found.");const et={width:rt.width,disableFullscreenMode:rt.disableFullscreenMode},nt={...et,widgetMgr:rt.widgetMgr,disabled:rt.widgetsDisabled,fragmentId:tt.fragmentId};switch(tt.element.type){case"alert":{const at=tt.element.alert;return jsx$1(AlertElement,{icon:at.icon,body:at.body,kind:getAlertElementKind(at.format),...et})}case"arrowTable":return jsx$1(ArrowTable$1,{element:tt.quiverElement,...et});case"audio":return jsx$1(Audio,{element:tt.element.audio,endpoints:rt.endpoints,...et,elementMgr:rt.widgetMgr});case"balloons":return hideIfStale(rt.isStale,jsx$1(Balloons,{scriptRunId:rt.scriptRunId}));case"bokehChart":return jsx$1(DebouncedBokehChart,{element:tt.element.bokehChart,...et});case"code":{const at=tt.element.code;return jsx$1(StreamlitSyntaxHighlighter,{language:at.language,showLineNumbers:at.showLineNumbers,wrapLines:at.wrapLines,height:at.height,children:at.codeText})}case"deckGlJsonChart":return jsx$1(DeckGlJsonChart,{element:tt.element.deckGlJsonChart,...nt});case"docString":return jsx$1(DocString,{element:tt.element.docString,...et});case"empty":return jsx$1("div",{className:"stEmpty","data-testid":"stEmpty"});case"exception":return jsx$1(ExceptionElement,{element:tt.element.exception,...et});case"graphvizChart":return jsx$1(GraphVizChart,{element:tt.element.graphvizChart,...et});case"heading":return jsx$1(Heading,{element:tt.element.heading,...et});case"iframe":return jsx$1(IFrame,{element:tt.element.iframe,...et});case"imgs":return jsx$1(ImageList,{element:tt.element.imgs,endpoints:rt.endpoints,...et});case"json":return jsx$1(Json,{element:tt.element.json,...et});case"markdown":return jsx$1(Markdown,{element:tt.element.markdown,...et});case"metric":return jsx$1(Metric,{element:tt.element.metric});case"html":return jsx$1(Html,{element:tt.element.html,...et});case"pageLink":{const at=tt.element.pageLink,st=nt.disabled||at.disabled;return jsx$1(PageLink,{element:at,disabled:st,...et})}case"progress":return jsx$1(Progress,{element:tt.element.progress,...et});case"skeleton":return jsx$1(Skeleton,{element:tt.element.skeleton});case"snow":return hideIfStale(rt.isStale,jsx$1(Snow,{scriptRunId:rt.scriptRunId}));case"spinner":return jsx$1(Spinner,{element:tt.element.spinner,...et});case"text":return jsx$1(TextElement,{element:tt.element.text,...et});case"video":return jsx$1(Video,{element:tt.element.video,endpoints:rt.endpoints,...et,elementMgr:rt.widgetMgr});case"toast":{const at=tt.element.toast;return jsx$1(Toast,{body:at.body,icon:at.icon,...et},tt.scriptRunId)}case"arrowDataFrame":{const at=tt.element.arrowDataFrame;return nt.disabled=nt.disabled||at.disabled,jsx$1(ArrowDataFrame,{element:at,data:tt.quiverElement,...at.id&&{key:at.id},...nt})}case"arrowVegaLiteChart":const ot=tt.vegaLiteChartElement;return jsx$1(ArrowVegaLiteChart,{element:ot,...nt},ot.id||void 0);case"audioInput":{const at=tt.element.audioInput;return nt.disabled=nt.disabled||at.disabled,jsx$1(AudioInput,{uploadClient:rt.uploadClient,element:at,...nt},at.id)}case"button":{const at=tt.element.button;if(nt.disabled=nt.disabled||at.disabled,at.isFormSubmitter){const{formId:st}=at,ut=rt.formsData.formsWithUploads.has(st);return jsx$1(FormSubmitContent,{element:at,hasInProgressUpload:ut,...nt})}return jsx$1(Button,{element:at,...nt})}case"buttonGroup":{const at=tt.element.buttonGroup;return nt.disabled=nt.disabled||at.disabled,jsx$1(ButtonGroup,{element:at,...nt},at.id)}case"downloadButton":{const at=tt.element.downloadButton;return nt.disabled=nt.disabled||at.disabled,jsx$1(DownloadButton,{endpoints:rt.endpoints,element:at,...nt},at.id)}case"cameraInput":{const at=tt.element.cameraInput;return nt.disabled=nt.disabled||at.disabled,jsx$1(CameraInput,{element:at,uploadClient:rt.uploadClient,...nt},at.id)}case"chatInput":{const at=tt.element.chatInput;return nt.disabled=nt.disabled||at.disabled,jsx$1(ChatInput,{element:at,uploadClient:rt.uploadClient,...nt},at.id)}case"checkbox":{const at=tt.element.checkbox;return nt.disabled=nt.disabled||at.disabled,jsx$1(Checkbox,{element:at,...nt},at.id)}case"colorPicker":{const at=tt.element.colorPicker;return nt.disabled=nt.disabled||at.disabled,jsx$1(ColorPicker,{element:at,...nt},at.id)}case"componentInstance":return jsx$1(ComponentInstance$1,{registry:rt.componentRegistry,element:tt.element.componentInstance,...nt});case"dateInput":{const at=tt.element.dateInput;return nt.disabled=nt.disabled||at.disabled,jsx$1(DateInput,{element:at,...nt},at.id)}case"fileUploader":{const at=tt.element.fileUploader;return nt.disabled=nt.disabled||at.disabled,jsx$1(FileUploader,{element:at,uploadClient:rt.uploadClient,...nt},at.id)}case"linkButton":{const at=tt.element.linkButton;return nt.disabled=nt.disabled||at.disabled,jsx$1(LinkButton,{element:at,...nt})}case"multiselect":{const at=tt.element.multiselect;return nt.disabled=nt.disabled||at.disabled,jsx$1(Multiselect,{element:at,...nt},at.id)}case"numberInput":{const at=tt.element.numberInput;return nt.disabled=nt.disabled||at.disabled,jsx$1(NumberInput,{element:at,...nt},at.id)}case"plotlyChart":{const at=tt.element.plotlyChart;return jsx$1(PlotlyChart,{element:at,...nt},at.id)}case"radio":{const at=tt.element.radio;return nt.disabled=nt.disabled||at.disabled,jsx$1(Radio,{element:at,...nt},at.id)}case"selectbox":{const at=tt.element.selectbox;return nt.disabled=nt.disabled||at.disabled,jsx$1(Selectbox$1,{element:at,...nt},at.id)}case"slider":{const at=tt.element.slider;return nt.disabled=nt.disabled||at.disabled,jsx$1(Slider$1,{element:at,...nt},at.id)}case"textArea":{const at=tt.element.textArea;return nt.disabled=nt.disabled||at.disabled,jsx$1(TextArea,{element:at,...nt},at.id)}case"textInput":{const at=tt.element.textInput;return nt.disabled=nt.disabled||at.disabled,jsx$1(TextInput,{element:at,...nt},at.id)}case"timeInput":{const at=tt.element.timeInput;return nt.disabled=nt.disabled||at.disabled,jsx$1(TimeInput,{element:at,...nt},at.id)}default:throw new Error(`Unrecognized Element type ${tt.element.type}`)}},ElementNodeRenderer=rt=>{const{isFullScreen:tt,fragmentIdsThisRun:et}=React$1.useContext(LibContext),{node:nt,width:ot}=rt,at=nt.element.type||"",st=shouldComponentBeEnabled(at,rt.scriptRunState),ut=isComponentStale(st,nt,rt.scriptRunState,rt.scriptRunId,et),ct=getElementId(nt.element),pt=getKeyFromId(ct);return jsx$1(Maybe,{enable:st,children:jsx$1(StyledElementContainer,{className:classNames("stElementContainer","element-container",convertKeyToClassName(pt)),"data-testid":"stElementContainer","data-stale":ut,isStale:ut&&!tt,width:ot,elementType:at,children:jsx$1(ErrorBoundary,{width:ot,children:jsx$1(reactExports.Suspense,{fallback:jsx$1(Skeleton,{element:Skeleton$1.create({style:Skeleton$1.SkeletonStyle.ELEMENT})}),children:jsx$1(RawElementNodeRenderer,{...rt,isStale:ut})})})})})},BlockNodeRenderer=rt=>{const{node:tt}=rt,{fragmentIdsThisRun:et}=reactExports.useContext(LibContext);if(tt.isEmpty&&!tt.deltaBlock.allowEmpty)return jsx$1(Fragment,{});const nt=shouldComponentBeEnabled("",rt.scriptRunState),ot=isComponentStale(nt,tt,rt.scriptRunState,rt.scriptRunId,et),at={...rt,node:tt},st=rt.disableFullscreenMode||d$3(tt.deltaBlock.dialog)||d$3(tt.deltaBlock.popover),ut=jsx$1(LayoutBlock,{...at,disableFullscreenMode:st});if(tt.deltaBlock.dialog)return jsx$1(DialogWithProvider,{element:tt.deltaBlock.dialog,deltaMsgReceivedAt:tt.deltaMsgReceivedAt,children:ut});if(tt.deltaBlock.expandable)return jsx$1(Expander,{empty:tt.isEmpty,isStale:ot,element:tt.deltaBlock.expandable,children:ut});if(tt.deltaBlock.popover)return jsx$1(Popover,{empty:tt.isEmpty,element:tt.deltaBlock.popover,width:rt.width,children:ut});if(tt.deltaBlock.type==="form"){const{formId:ct,clearOnSubmit:pt,enterToSubmit:dt,border:ft}=tt.deltaBlock.form,bt=rt.formsData.submitButtons.get(ct),ht=bt!==void 0&&bt.length>0;return jsx$1(Form,{formId:ct,clearOnSubmit:pt,enterToSubmit:dt,width:rt.width,hasSubmitButton:ht,scriptRunState:rt.scriptRunState,widgetMgr:rt.widgetMgr,border:ft,children:ut})}if(tt.deltaBlock.chatMessage)return jsx$1(ChatMessage,{element:tt.deltaBlock.chatMessage,endpoints:rt.endpoints,children:ut});if(tt.deltaBlock.column)return jsx$1(StyledColumn,{weight:tt.deltaBlock.column.weight??0,gap:tt.deltaBlock.column.gap??"",verticalAlignment:tt.deltaBlock.column.verticalAlignment??void 0,showBorder:tt.deltaBlock.column.showBorder??!1,className:"stColumn","data-testid":"stColumn",children:ut});if(tt.deltaBlock.tabContainer){const pt={...at,isStale:ot,renderTabContent:dt=>jsx$1(VerticalBlock,{...dt})};return jsx$1(Tabs,{...pt})}return ut},ChildRenderer=rt=>{const{libConfig:tt}=reactExports.useContext(LibContext);assignDividerColor(rt.node,useTheme());const et=new Set;return jsx$1(Fragment,{children:rt.node.children&&rt.node.children.map((nt,ot)=>{const at=tt.disableFullscreenMode||rt.disableFullscreenMode;if(nt instanceof ElementNode){const st={...rt,disableFullscreenMode:at,node:nt},ut=getElementId(nt.element)||ot.toString();return et.has(ut)?null:(et.add(ut),jsx$1(ElementNodeRenderer,{...st},ut))}if(nt instanceof BlockNode){const st={...rt,disableFullscreenMode:at,node:nt};return jsx$1(BlockNodeRenderer,{...st},ot)}throw new Error(`Unrecognized AppNode: ${nt}`)})})};function ScrollToBottomVerticalBlockWrapper(rt){const{border:tt,height:et,children:nt}=rt,ot=useScrollToBottom();return jsx$1(StyledVerticalBlockBorderWrapper,{border:tt,height:et,"data-testid":"stVerticalBlockBorderWrapper","data-test-scroll-behavior":"scroll-to-bottom",ref:ot,children:nt})}const VerticalBlock=rt=>{var ft,bt;const tt=reactExports.useRef(null),[et,nt]=React$1.useState(-1),ot=reactExports.useMemo(()=>new ResizeObserver(([ht])=>{window.requestAnimationFrame(()=>{nt(ht.target.getBoundingClientRect().width||-1)})}),[nt]),at=((ft=rt.node.deltaBlock.vertical)==null?void 0:ft.border)??!1,st=((bt=rt.node.deltaBlock.vertical)==null?void 0:bt.height)||void 0,ut=st&&rt.node.children.find(ht=>ht instanceof BlockNode&&ht.deltaBlock.type==="chatMessage")!==void 0;reactExports.useEffect(()=>(tt.current&&ot.observe(tt.current),()=>{ot.disconnect()}),[ot,ut]);const ct=ut?ScrollToBottomVerticalBlockWrapper:StyledVerticalBlockBorderWrapper,pt={...rt,width:et},dt=getKeyFromId(rt.node.deltaBlock.id);return jsx$1(ct,{border:at,height:st,"data-testid":"stVerticalBlockBorderWrapper","data-test-scroll-behavior":"normal",children:jsx$1(StyledVerticalBlockWrapper,{ref:tt,children:jsx$1(StyledVerticalBlock,{width:et,className:classNames("stVerticalBlock",convertKeyToClassName(dt)),"data-testid":"stVerticalBlock",children:jsx$1(ChildRenderer,{...pt})})})})},HorizontalBlock=rt=>{var et;const tt=((et=rt.node.deltaBlock.horizontal)==null?void 0:et.gap)??"";return jsx$1(StyledHorizontalBlock,{gap:tt,className:"stHorizontalBlock","data-testid":"stHorizontalBlock",children:jsx$1(ChildRenderer,{...rt})})};function LayoutBlock(rt){return rt.node.deltaBlock.horizontal?jsx$1(HorizontalBlock,{...rt}):jsx$1(VerticalBlock,{...rt})}const StyledDataFrameOverlay=newStyled("div",{target:"e19n7mk11"})(({theme:rt})=>({position:"fixed",top:0,left:0,zIndex:rt.zIndices.tablePortal,lineHeight:"100%"})),PortalContext=React$1.createContext(null),PortalProvider=({children:rt})=>{const tt=reactExports.useRef(null),et=reactExports.useCallback(()=>tt.current,[]);return jsxs(PortalContext.Provider,{value:et,children:[rt,jsx$1(StyledDataFrameOverlay,{"data-testid":"portal",id:"portal",ref:tt})]})};function ThemeProvider({theme:rt,baseuiTheme:tt,children:et}){return jsx$1(ThemeProvider$1,{theme:tt||baseuiLightTheme,children:jsx$1(ThemeProvider$2,{theme:rt,children:et})})}function toCodePoint(rt,tt){const et=[];let nt=0,ot=0,at=0;for(;at<rt.length;)nt=rt.charCodeAt(at++),ot?(et.push((65536+(ot-55296<<10)+(nt-56320)).toString(16)),ot=0):55296<=nt&&nt<=56319?ot=nt:et.push(nt.toString(16));return et.join("-")}const UFE0Fg=/\uFE0F/g,U200D="‍";function grabTheRightIcon(rt){return toCodePoint(rt.indexOf(U200D)<0?rt.replace(UFE0Fg,""):rt)}function iconToUrl(rt){const tt=/^:(.+)\/(.+):$/,et=rt.match(tt);return et===null?"":`https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsrounded/${et[2]}/default/24px.svg`}function handleFavicon(rt,tt,et){const nt=extractEmoji(rt);let ot;nt&&!rt.startsWith(":material")?ot=`https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/72x72/${grabTheRightIcon(nt)}.png`:rt.startsWith(":material")?ot=iconToUrl(rt):ot=et.buildMediaURL(rt),overwriteFavicon(ot),tt({type:"SET_PAGE_FAVICON",favicon:ot})}function overwriteFavicon(rt){const tt=document.querySelector("link[rel='shortcut icon']");tt&&(tt.href=rt)}function extractEmoji(rt){const tt=rt.replace("-","_");return nodeEmoji$1.hasEmoji(nodeEmoji$1.get(tt))?nodeEmoji$1.get(tt):nodeEmoji$1.hasEmoji(rt)?rt:""}var lib$2={},flattenNames$1={},baseFor$1=_baseFor,keys$2=keys_1;function baseForOwn$4(rt,tt){return rt&&baseFor$1(rt,tt,keys$2)}var _baseForOwn=baseForOwn$4,identity$3=identity_1;function castFunction$2(rt){return typeof rt=="function"?rt:identity$3}var _castFunction=castFunction$2,baseForOwn$3=_baseForOwn,castFunction$1=_castFunction;function forOwn(rt,tt){return rt&&baseForOwn$3(rt,castFunction$1(tt))}var forOwn_1=forOwn,HASH_UNDEFINED$3="__lodash_hash_undefined__";function setCacheAdd$2(rt){return this.__data__.set(rt,HASH_UNDEFINED$3),this}var _setCacheAdd=setCacheAdd$2;function setCacheHas$2(rt){return this.__data__.has(rt)}var _setCacheHas=setCacheHas$2,MapCache$1=_MapCache,setCacheAdd$1=_setCacheAdd,setCacheHas$1=_setCacheHas;function SetCache$3(rt){var tt=-1,et=rt==null?0:rt.length;for(this.__data__=new MapCache$1;++tt<et;)this.add(rt[tt])}SetCache$3.prototype.add=SetCache$3.prototype.push=setCacheAdd$1;SetCache$3.prototype.has=setCacheHas$1;var _SetCache=SetCache$3;function arraySome$2(rt,tt){for(var et=-1,nt=rt==null?0:rt.length;++et<nt;)if(tt(rt[et],et,rt))return!0;return!1}var _arraySome=arraySome$2;function cacheHas$3(rt,tt){return rt.has(tt)}var _cacheHas=cacheHas$3,SetCache$2=_SetCache,arraySome$1=_arraySome,cacheHas$2=_cacheHas,COMPARE_PARTIAL_FLAG$b=1,COMPARE_UNORDERED_FLAG$7=2;function equalArrays$3(rt,tt,et,nt,ot,at){var st=et&COMPARE_PARTIAL_FLAG$b,ut=rt.length,ct=tt.length;if(ut!=ct&&!(st&&ct>ut))return!1;var pt=at.get(rt),dt=at.get(tt);if(pt&&dt)return pt==tt&&dt==rt;var ft=-1,bt=!0,ht=et&COMPARE_UNORDERED_FLAG$7?new SetCache$2:void 0;for(at.set(rt,tt),at.set(tt,rt);++ft<ut;){var mt=rt[ft],Ot=tt[ft];if(nt)var yt=st?nt(Ot,mt,ft,tt,rt,at):nt(mt,Ot,ft,rt,tt,at);if(yt!==void 0){if(yt)continue;bt=!1;break}if(ht){if(!arraySome$1(tt,function(Mt,At){if(!cacheHas$2(ht,At)&&(mt===Mt||ot(mt,Mt,et,nt,at)))return ht.push(At)})){bt=!1;break}}else if(!(mt===Ot||ot(mt,Ot,et,nt,at))){bt=!1;break}}return at.delete(rt),at.delete(tt),bt}var _equalArrays=equalArrays$3,Symbol$2=_Symbol,Uint8Array$2=_Uint8Array,eq$1=eq_1,equalArrays$2=_equalArrays,mapToArray$1=_mapToArray,setToArray$1=_setToArray,COMPARE_PARTIAL_FLAG$a=1,COMPARE_UNORDERED_FLAG$6=2,boolTag$2="[object Boolean]",dateTag$2="[object Date]",errorTag$2="[object Error]",mapTag$3="[object Map]",numberTag$2="[object Number]",regexpTag$2="[object RegExp]",setTag$3="[object Set]",stringTag$2="[object String]",symbolTag$2="[object Symbol]",arrayBufferTag$2="[object ArrayBuffer]",dataViewTag$3="[object DataView]",symbolProto$2=Symbol$2?Symbol$2.prototype:void 0,symbolValueOf$1=symbolProto$2?symbolProto$2.valueOf:void 0;function equalByTag$2(rt,tt,et,nt,ot,at,st){switch(et){case dataViewTag$3:if(rt.byteLength!=tt.byteLength||rt.byteOffset!=tt.byteOffset)return!1;rt=rt.buffer,tt=tt.buffer;case arrayBufferTag$2:return!(rt.byteLength!=tt.byteLength||!at(new Uint8Array$2(rt),new Uint8Array$2(tt)));case boolTag$2:case dateTag$2:case numberTag$2:return eq$1(+rt,+tt);case errorTag$2:return rt.name==tt.name&&rt.message==tt.message;case regexpTag$2:case stringTag$2:return rt==tt+"";case mapTag$3:var ut=mapToArray$1;case setTag$3:var ct=nt&COMPARE_PARTIAL_FLAG$a;if(ut||(ut=setToArray$1),rt.size!=tt.size&&!ct)return!1;var pt=st.get(rt);if(pt)return pt==tt;nt|=COMPARE_UNORDERED_FLAG$6,st.set(rt,tt);var dt=equalArrays$2(ut(rt),ut(tt),nt,ot,at,st);return st.delete(rt),dt;case symbolTag$2:if(symbolValueOf$1)return symbolValueOf$1.call(rt)==symbolValueOf$1.call(tt)}return!1}var _equalByTag=equalByTag$2,getAllKeys$1=_getAllKeys,COMPARE_PARTIAL_FLAG$9=1,objectProto$h=Object.prototype,hasOwnProperty$f=objectProto$h.hasOwnProperty;function equalObjects$2(rt,tt,et,nt,ot,at){var st=et&COMPARE_PARTIAL_FLAG$9,ut=getAllKeys$1(rt),ct=ut.length,pt=getAllKeys$1(tt),dt=pt.length;if(ct!=dt&&!st)return!1;for(var ft=ct;ft--;){var bt=ut[ft];if(!(st?bt in tt:hasOwnProperty$f.call(tt,bt)))return!1}var ht=at.get(rt),mt=at.get(tt);if(ht&&mt)return ht==tt&&mt==rt;var Ot=!0;at.set(rt,tt),at.set(tt,rt);for(var yt=st;++ft<ct;){bt=ut[ft];var Mt=rt[bt],At=tt[bt];if(nt)var St=st?nt(At,Mt,bt,tt,rt,at):nt(Mt,At,bt,rt,tt,at);if(!(St===void 0?Mt===At||ot(Mt,At,et,nt,at):St)){Ot=!1;break}yt||(yt=bt=="constructor")}if(Ot&&!yt){var Et=rt.constructor,zt=tt.constructor;Et!=zt&&"constructor"in rt&&"constructor"in tt&&!(typeof Et=="function"&&Et instanceof Et&&typeof zt=="function"&&zt instanceof zt)&&(Ot=!1)}return at.delete(rt),at.delete(tt),Ot}var _equalObjects=equalObjects$2,Stack$2=_Stack,equalArrays$1=_equalArrays,equalByTag$1=_equalByTag,equalObjects$1=_equalObjects,getTag$1=_getTag,isArray$7=isArray_1,isBuffer$2=isBufferExports,isTypedArray$2=isTypedArray_1,COMPARE_PARTIAL_FLAG$8=1,argsTag$3="[object Arguments]",arrayTag$2="[object Array]",objectTag$4="[object Object]",objectProto$g=Object.prototype,hasOwnProperty$e=objectProto$g.hasOwnProperty;function baseIsEqualDeep$2(rt,tt,et,nt,ot,at){var st=isArray$7(rt),ut=isArray$7(tt),ct=st?arrayTag$2:getTag$1(rt),pt=ut?arrayTag$2:getTag$1(tt);ct=ct==argsTag$3?objectTag$4:ct,pt=pt==argsTag$3?objectTag$4:pt;var dt=ct==objectTag$4,ft=pt==objectTag$4,bt=ct==pt;if(bt&&isBuffer$2(rt)){if(!isBuffer$2(tt))return!1;st=!0,dt=!1}if(bt&&!dt)return at||(at=new Stack$2),st||isTypedArray$2(rt)?equalArrays$1(rt,tt,et,nt,ot,at):equalByTag$1(rt,tt,ct,et,nt,ot,at);if(!(et&COMPARE_PARTIAL_FLAG$8)){var ht=dt&&hasOwnProperty$e.call(rt,"__wrapped__"),mt=ft&&hasOwnProperty$e.call(tt,"__wrapped__");if(ht||mt){var Ot=ht?rt.value():rt,yt=mt?tt.value():tt;return at||(at=new Stack$2),ot(Ot,yt,et,nt,at)}}return bt?(at||(at=new Stack$2),equalObjects$1(rt,tt,et,nt,ot,at)):!1}var _baseIsEqualDeep=baseIsEqualDeep$2,baseIsEqualDeep$1=_baseIsEqualDeep,isObjectLike$1=isObjectLike_1;function baseIsEqual$4(rt,tt,et,nt,ot){return rt===tt?!0:rt==null||tt==null||!isObjectLike$1(rt)&&!isObjectLike$1(tt)?rt!==rt&&tt!==tt:baseIsEqualDeep$1(rt,tt,et,nt,baseIsEqual$4,ot)}var _baseIsEqual=baseIsEqual$4,Stack$1=_Stack,baseIsEqual$3=_baseIsEqual,COMPARE_PARTIAL_FLAG$7=1,COMPARE_UNORDERED_FLAG$5=2;function baseIsMatch$2(rt,tt,et,nt){var ot=et.length,at=ot,st=!nt;if(rt==null)return!at;for(rt=Object(rt);ot--;){var ut=et[ot];if(st&&ut[2]?ut[1]!==rt[ut[0]]:!(ut[0]in rt))return!1}for(;++ot<at;){ut=et[ot];var ct=ut[0],pt=rt[ct],dt=ut[1];if(st&&ut[2]){if(pt===void 0&&!(ct in rt))return!1}else{var ft=new Stack$1;if(nt)var bt=nt(pt,dt,ct,rt,tt,ft);if(!(bt===void 0?baseIsEqual$3(dt,pt,COMPARE_PARTIAL_FLAG$7|COMPARE_UNORDERED_FLAG$5,nt,ft):bt))return!1}}return!0}var _baseIsMatch=baseIsMatch$2,isObject$3=isObject_1;function isStrictComparable$3(rt){return rt===rt&&!isObject$3(rt)}var _isStrictComparable=isStrictComparable$3,isStrictComparable$2=_isStrictComparable,keys$1=keys_1;function getMatchData$2(rt){for(var tt=keys$1(rt),et=tt.length;et--;){var nt=tt[et],ot=rt[nt];tt[et]=[nt,ot,isStrictComparable$2(ot)]}return tt}var _getMatchData=getMatchData$2;function matchesStrictComparable$3(rt,tt){return function(et){return et==null?!1:et[rt]===tt&&(tt!==void 0||rt in Object(et))}}var _matchesStrictComparable=matchesStrictComparable$3,baseIsMatch$1=_baseIsMatch,getMatchData$1=_getMatchData,matchesStrictComparable$2=_matchesStrictComparable;function baseMatches$2(rt){var tt=getMatchData$1(rt);return tt.length==1&&tt[0][2]?matchesStrictComparable$2(tt[0][0],tt[0][1]):function(et){return et===rt||baseIsMatch$1(et,rt,tt)}}var _baseMatches=baseMatches$2;function baseHasIn$2(rt,tt){return rt!=null&&tt in Object(rt)}var _baseHasIn=baseHasIn$2,castPath$3=_castPath,isArguments$1=isArguments_1,isArray$6=isArray_1,isIndex$2=_isIndex,isLength$1=isLength_1,toKey$4=_toKey;function hasPath$2(rt,tt,et){tt=castPath$3(tt,rt);for(var nt=-1,ot=tt.length,at=!1;++nt<ot;){var st=toKey$4(tt[nt]);if(!(at=rt!=null&&et(rt,st)))break;rt=rt[st]}return at||++nt!=ot?at:(ot=rt==null?0:rt.length,!!ot&&isLength$1(ot)&&isIndex$2(st,ot)&&(isArray$6(rt)||isArguments$1(rt)))}var _hasPath=hasPath$2,baseHasIn$1=_baseHasIn,hasPath$1=_hasPath;function hasIn$3(rt,tt){return rt!=null&&hasPath$1(rt,tt,baseHasIn$1)}var hasIn_1=hasIn$3,baseIsEqual$2=_baseIsEqual,get$2=get_1,hasIn$2=hasIn_1,isKey$2=_isKey,isStrictComparable$1=_isStrictComparable,matchesStrictComparable$1=_matchesStrictComparable,toKey$3=_toKey,COMPARE_PARTIAL_FLAG$6=1,COMPARE_UNORDERED_FLAG$4=2;function baseMatchesProperty$2(rt,tt){return isKey$2(rt)&&isStrictComparable$1(tt)?matchesStrictComparable$1(toKey$3(rt),tt):function(et){var nt=get$2(et,rt);return nt===void 0&&nt===tt?hasIn$2(et,rt):baseIsEqual$2(tt,nt,COMPARE_PARTIAL_FLAG$6|COMPARE_UNORDERED_FLAG$4)}}var _baseMatchesProperty=baseMatchesProperty$2,baseGet$3=_baseGet;function basePropertyDeep$2(rt){return function(tt){return baseGet$3(tt,rt)}}var _basePropertyDeep=basePropertyDeep$2,baseProperty$1=_baseProperty,basePropertyDeep$1=_basePropertyDeep,isKey$1=_isKey,toKey$2=_toKey;function property$2(rt){return isKey$1(rt)?baseProperty$1(toKey$2(rt)):basePropertyDeep$1(rt)}var property_1=property$2,baseMatches$1=_baseMatches,baseMatchesProperty$1=_baseMatchesProperty,identity$2=identity_1,isArray$5=isArray_1,property$1=property_1;function baseIteratee$5(rt){return typeof rt=="function"?rt:rt==null?identity$2:typeof rt=="object"?isArray$5(rt)?baseMatchesProperty$1(rt[0],rt[1]):baseMatches$1(rt):property$1(rt)}var _baseIteratee=baseIteratee$5,isArrayLike$2=isArrayLike_1;function createBaseEach$2(rt,tt){return function(et,nt){if(et==null)return et;if(!isArrayLike$2(et))return rt(et,nt);for(var ot=et.length,at=tt?ot:-1,st=Object(et);(tt?at--:++at<ot)&&nt(st[at],at,st)!==!1;);return et}}var _createBaseEach=createBaseEach$2,baseForOwn$2=_baseForOwn,createBaseEach$1=_createBaseEach,baseEach$3=createBaseEach$1(baseForOwn$2),_baseEach=baseEach$3,baseEach$2=_baseEach,isArrayLike$1=isArrayLike_1;function baseMap$3(rt,tt){var et=-1,nt=isArrayLike$1(rt)?Array(rt.length):[];return baseEach$2(rt,function(ot,at,st){nt[++et]=tt(ot,at,st)}),nt}var _baseMap=baseMap$3,arrayMap$3=_arrayMap,baseIteratee$4=_baseIteratee,baseMap$2=_baseMap,isArray$4=isArray_1;function map$1(rt,tt){var et=isArray$4(rt)?arrayMap$3:baseMap$2;return et(rt,baseIteratee$4(tt))}var map_1=map$1;Object.defineProperty(flattenNames$1,"__esModule",{value:!0});flattenNames$1.flattenNames=void 0;var _isString2=isString_1,_isString3=_interopRequireDefault$7(_isString2),_forOwn2$2=forOwn_1,_forOwn3$2=_interopRequireDefault$7(_forOwn2$2),_isPlainObject2=isPlainObject_1,_isPlainObject3=_interopRequireDefault$7(_isPlainObject2),_map2=map_1,_map3=_interopRequireDefault$7(_map2);function _interopRequireDefault$7(rt){return rt&&rt.__esModule?rt:{default:rt}}var flattenNames=flattenNames$1.flattenNames=function rt(){var tt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],et=[];return(0,_map3.default)(tt,function(nt){Array.isArray(nt)?rt(nt).map(function(ot){return et.push(ot)}):(0,_isPlainObject3.default)(nt)?(0,_forOwn3$2.default)(nt,function(ot,at){ot===!0&&et.push(at),et.push(at+"-"+ot)}):(0,_isString3.default)(nt)&&et.push(nt)}),et};flattenNames$1.default=flattenNames;var mergeClasses$1={};Object.defineProperty(mergeClasses$1,"__esModule",{value:!0});mergeClasses$1.mergeClasses=void 0;var _forOwn2$1=forOwn_1,_forOwn3$1=_interopRequireDefault$6(_forOwn2$1),_cloneDeep2=cloneDeep_1,_cloneDeep3=_interopRequireDefault$6(_cloneDeep2),_extends$w=Object.assign||function(rt){for(var tt=1;tt<arguments.length;tt++){var et=arguments[tt];for(var nt in et)Object.prototype.hasOwnProperty.call(et,nt)&&(rt[nt]=et[nt])}return rt};function _interopRequireDefault$6(rt){return rt&&rt.__esModule?rt:{default:rt}}var mergeClasses=mergeClasses$1.mergeClasses=function rt(tt){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],nt=tt.default&&(0,_cloneDeep3.default)(tt.default)||{};return et.map(function(ot){var at=tt[ot];return at&&(0,_forOwn3$1.default)(at,function(st,ut){nt[ut]||(nt[ut]={}),nt[ut]=_extends$w({},nt[ut],at[ut])}),ot}),nt};mergeClasses$1.default=mergeClasses;var autoprefix$1={};Object.defineProperty(autoprefix$1,"__esModule",{value:!0});autoprefix$1.autoprefix=void 0;var _forOwn2=forOwn_1,_forOwn3=_interopRequireDefault$5(_forOwn2),_extends$v=Object.assign||function(rt){for(var tt=1;tt<arguments.length;tt++){var et=arguments[tt];for(var nt in et)Object.prototype.hasOwnProperty.call(et,nt)&&(rt[nt]=et[nt])}return rt};function _interopRequireDefault$5(rt){return rt&&rt.__esModule?rt:{default:rt}}var transforms={borderRadius:function rt(tt){return{msBorderRadius:tt,MozBorderRadius:tt,OBorderRadius:tt,WebkitBorderRadius:tt,borderRadius:tt}},boxShadow:function rt(tt){return{msBoxShadow:tt,MozBoxShadow:tt,OBoxShadow:tt,WebkitBoxShadow:tt,boxShadow:tt}},userSelect:function rt(tt){return{WebkitTouchCallout:tt,KhtmlUserSelect:tt,MozUserSelect:tt,msUserSelect:tt,WebkitUserSelect:tt,userSelect:tt}},flex:function rt(tt){return{WebkitBoxFlex:tt,MozBoxFlex:tt,WebkitFlex:tt,msFlex:tt,flex:tt}},flexBasis:function rt(tt){return{WebkitFlexBasis:tt,flexBasis:tt}},justifyContent:function rt(tt){return{WebkitJustifyContent:tt,justifyContent:tt}},transition:function rt(tt){return{msTransition:tt,MozTransition:tt,OTransition:tt,WebkitTransition:tt,transition:tt}},transform:function rt(tt){return{msTransform:tt,MozTransform:tt,OTransform:tt,WebkitTransform:tt,transform:tt}},absolute:function rt(tt){var et=tt&&tt.split(" ");return{position:"absolute",top:et&&et[0],right:et&&et[1],bottom:et&&et[2],left:et&&et[3]}},extend:function rt(tt,et){var nt=et[tt];return nt||{extend:tt}}},autoprefix=autoprefix$1.autoprefix=function rt(tt){var et={};return(0,_forOwn3.default)(tt,function(nt,ot){var at={};(0,_forOwn3.default)(nt,function(st,ut){var ct=transforms[ut];ct?at=_extends$v({},at,ct(st)):at[ut]=st}),et[ot]=at}),et};autoprefix$1.default=autoprefix;var hover$1={};Object.defineProperty(hover$1,"__esModule",{value:!0});hover$1.hover=void 0;var _extends$u=Object.assign||function(rt){for(var tt=1;tt<arguments.length;tt++){var et=arguments[tt];for(var nt in et)Object.prototype.hasOwnProperty.call(et,nt)&&(rt[nt]=et[nt])}return rt},_react$3=reactExports,_react2$3=_interopRequireDefault$4(_react$3);function _interopRequireDefault$4(rt){return rt&&rt.__esModule?rt:{default:rt}}function _classCallCheck$f(rt,tt){if(!(rt instanceof tt))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$f(rt,tt){if(!rt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return tt&&(typeof tt=="object"||typeof tt=="function")?tt:rt}function _inherits$f(rt,tt){if(typeof tt!="function"&&tt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof tt);rt.prototype=Object.create(tt&&tt.prototype,{constructor:{value:rt,enumerable:!1,writable:!0,configurable:!0}}),tt&&(Object.setPrototypeOf?Object.setPrototypeOf(rt,tt):rt.__proto__=tt)}var hover=hover$1.hover=function rt(tt){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(nt){_inherits$f(ot,nt);function ot(){var at,st,ut,ct;_classCallCheck$f(this,ot);for(var pt=arguments.length,dt=Array(pt),ft=0;ft<pt;ft++)dt[ft]=arguments[ft];return ct=(st=(ut=_possibleConstructorReturn$f(this,(at=ot.__proto__||Object.getPrototypeOf(ot)).call.apply(at,[this].concat(dt))),ut),ut.state={hover:!1},ut.handleMouseOver=function(){return ut.setState({hover:!0})},ut.handleMouseOut=function(){return ut.setState({hover:!1})},ut.render=function(){return _react2$3.default.createElement(et,{onMouseOver:ut.handleMouseOver,onMouseOut:ut.handleMouseOut},_react2$3.default.createElement(tt,_extends$u({},ut.props,ut.state)))},st),_possibleConstructorReturn$f(ut,ct)}return ot}(_react2$3.default.Component)};hover$1.default=hover;var active$1={};Object.defineProperty(active$1,"__esModule",{value:!0});active$1.active=void 0;var _extends$t=Object.assign||function(rt){for(var tt=1;tt<arguments.length;tt++){var et=arguments[tt];for(var nt in et)Object.prototype.hasOwnProperty.call(et,nt)&&(rt[nt]=et[nt])}return rt},_react$2=reactExports,_react2$2=_interopRequireDefault$3(_react$2);function _interopRequireDefault$3(rt){return rt&&rt.__esModule?rt:{default:rt}}function _classCallCheck$e(rt,tt){if(!(rt instanceof tt))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$e(rt,tt){if(!rt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return tt&&(typeof tt=="object"||typeof tt=="function")?tt:rt}function _inherits$e(rt,tt){if(typeof tt!="function"&&tt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof tt);rt.prototype=Object.create(tt&&tt.prototype,{constructor:{value:rt,enumerable:!1,writable:!0,configurable:!0}}),tt&&(Object.setPrototypeOf?Object.setPrototypeOf(rt,tt):rt.__proto__=tt)}var active=active$1.active=function rt(tt){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(nt){_inherits$e(ot,nt);function ot(){var at,st,ut,ct;_classCallCheck$e(this,ot);for(var pt=arguments.length,dt=Array(pt),ft=0;ft<pt;ft++)dt[ft]=arguments[ft];return ct=(st=(ut=_possibleConstructorReturn$e(this,(at=ot.__proto__||Object.getPrototypeOf(ot)).call.apply(at,[this].concat(dt))),ut),ut.state={active:!1},ut.handleMouseDown=function(){return ut.setState({active:!0})},ut.handleMouseUp=function(){return ut.setState({active:!1})},ut.render=function(){return _react2$2.default.createElement(et,{onMouseDown:ut.handleMouseDown,onMouseUp:ut.handleMouseUp},_react2$2.default.createElement(tt,_extends$t({},ut.props,ut.state)))},st),_possibleConstructorReturn$e(ut,ct)}return ot}(_react2$2.default.Component)};active$1.default=active;var loop={};Object.defineProperty(loop,"__esModule",{value:!0});var loopable=function rt(tt,et){var nt={},ot=function(st){var ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;nt[st]=ut};return tt===0&&ot("first-child"),tt===et-1&&ot("last-child"),(tt===0||tt%2===0)&&ot("even"),Math.abs(tt%2)===1&&ot("odd"),ot("nth-child",tt),nt};loop.default=loopable;Object.defineProperty(lib$2,"__esModule",{value:!0});lib$2.ReactCSS=lib$2.loop=lib$2.handleActive=handleHover=lib$2.handleHover=lib$2.hover=void 0;var _flattenNames=flattenNames$1,_flattenNames2=_interopRequireDefault$2(_flattenNames),_mergeClasses=mergeClasses$1,_mergeClasses2=_interopRequireDefault$2(_mergeClasses),_autoprefix=autoprefix$1,_autoprefix2=_interopRequireDefault$2(_autoprefix),_hover2=hover$1,_hover3=_interopRequireDefault$2(_hover2),_active=active$1,_active2=_interopRequireDefault$2(_active),_loop2=loop,_loop3=_interopRequireDefault$2(_loop2);function _interopRequireDefault$2(rt){return rt&&rt.__esModule?rt:{default:rt}}lib$2.hover=_hover3.default;var handleHover=lib$2.handleHover=_hover3.default;lib$2.handleActive=_active2.default;lib$2.loop=_loop3.default;var ReactCSS=lib$2.ReactCSS=function rt(tt){for(var et=arguments.length,nt=Array(et>1?et-1:0),ot=1;ot<et;ot++)nt[ot-1]=arguments[ot];var at=(0,_flattenNames2.default)(nt),st=(0,_mergeClasses2.default)(tt,at);return(0,_autoprefix2.default)(st)},_default$2=lib$2.default=ReactCSS,calculateChange$2=function rt(tt,et,nt,ot,at){var st=at.clientWidth,ut=at.clientHeight,ct=typeof tt.pageX=="number"?tt.pageX:tt.touches[0].pageX,pt=typeof tt.pageY=="number"?tt.pageY:tt.touches[0].pageY,dt=ct-(at.getBoundingClientRect().left+window.pageXOffset),ft=pt-(at.getBoundingClientRect().top+window.pageYOffset);if(nt==="vertical"){var bt=void 0;if(ft<0?bt=0:ft>ut?bt=1:bt=Math.round(ft*100/ut)/100,et.a!==bt)return{h:et.h,s:et.s,l:et.l,a:bt,source:"rgb"}}else{var ht=void 0;if(dt<0?ht=0:dt>st?ht=1:ht=Math.round(dt*100/st)/100,ot!==ht)return{h:et.h,s:et.s,l:et.l,a:ht,source:"rgb"}}return null},checkboardCache={},render=function rt(tt,et,nt,ot){if(typeof document>"u"&&!ot)return null;var at=ot?new ot:document.createElement("canvas");at.width=nt*2,at.height=nt*2;var st=at.getContext("2d");return st?(st.fillStyle=tt,st.fillRect(0,0,at.width,at.height),st.fillStyle=et,st.fillRect(0,0,nt,nt),st.translate(nt,nt),st.fillRect(0,0,nt,nt),at.toDataURL()):null},get$1=function rt(tt,et,nt,ot){var at=tt+"-"+et+"-"+nt+(ot?"-server":"");if(checkboardCache[at])return checkboardCache[at];var st=render(tt,et,nt,ot);return checkboardCache[at]=st,st},_extends$s=Object.assign||function(rt){for(var tt=1;tt<arguments.length;tt++){var et=arguments[tt];for(var nt in et)Object.prototype.hasOwnProperty.call(et,nt)&&(rt[nt]=et[nt])}return rt},Checkboard=function rt(tt){var et=tt.white,nt=tt.grey,ot=tt.size,at=tt.renderers,st=tt.borderRadius,ut=tt.boxShadow,ct=tt.children,pt=_default$2({default:{grid:{borderRadius:st,boxShadow:ut,absolute:"0px 0px 0px 0px",background:"url("+get$1(et,nt,ot,at.canvas)+") center left"}}});return reactExports.isValidElement(ct)?React$1.cloneElement(ct,_extends$s({},ct.props,{style:_extends$s({},ct.props.style,pt.grid)})):React$1.createElement("div",{style:pt.grid})};Checkboard.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};var _extends$r=Object.assign||function(rt){for(var tt=1;tt<arguments.length;tt++){var et=arguments[tt];for(var nt in et)Object.prototype.hasOwnProperty.call(et,nt)&&(rt[nt]=et[nt])}return rt},_createClass$d=function(){function rt(tt,et){for(var nt=0;nt<et.length;nt++){var ot=et[nt];ot.enumerable=ot.enumerable||!1,ot.configurable=!0,"value"in ot&&(ot.writable=!0),Object.defineProperty(tt,ot.key,ot)}}return function(tt,et,nt){return et&&rt(tt.prototype,et),nt&&rt(tt,nt),tt}}();function _classCallCheck$d(rt,tt){if(!(rt instanceof tt))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$d(rt,tt){if(!rt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return tt&&(typeof tt=="object"||typeof tt=="function")?tt:rt}function _inherits$d(rt,tt){if(typeof tt!="function"&&tt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof tt);rt.prototype=Object.create(tt&&tt.prototype,{constructor:{value:rt,enumerable:!1,writable:!0,configurable:!0}}),tt&&(Object.setPrototypeOf?Object.setPrototypeOf(rt,tt):rt.__proto__=tt)}var Alpha=function(rt){_inherits$d(tt,rt);function tt(){var et,nt,ot,at;_classCallCheck$d(this,tt);for(var st=arguments.length,ut=Array(st),ct=0;ct<st;ct++)ut[ct]=arguments[ct];return at=(nt=(ot=_possibleConstructorReturn$d(this,(et=tt.__proto__||Object.getPrototypeOf(tt)).call.apply(et,[this].concat(ut))),ot),ot.handleChange=function(pt){var dt=calculateChange$2(pt,ot.props.hsl,ot.props.direction,ot.props.a,ot.container);dt&&typeof ot.props.onChange=="function"&&ot.props.onChange(dt,pt)},ot.handleMouseDown=function(pt){ot.handleChange(pt),window.addEventListener("mousemove",ot.handleChange),window.addEventListener("mouseup",ot.handleMouseUp)},ot.handleMouseUp=function(){ot.unbindEventListeners()},ot.unbindEventListeners=function(){window.removeEventListener("mousemove",ot.handleChange),window.removeEventListener("mouseup",ot.handleMouseUp)},nt),_possibleConstructorReturn$d(ot,at)}return _createClass$d(tt,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var nt=this,ot=this.props.rgb,at=_default$2({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+ot.r+","+ot.g+","+ot.b+`, 0) 0%,
695
695
  rgba(`+ot.r+","+ot.g+","+ot.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:ot.a*100+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+ot.r+","+ot.g+","+ot.b+`, 0) 0%,
696
696
  rgba(`+ot.r+","+ot.g+","+ot.b+", 1) 100%)"},pointer:{left:0,top:ot.a*100+"%"}},overwrite:_extends$r({},this.props.style)},{vertical:this.props.direction==="vertical",overwrite:!0});return React$1.createElement("div",{style:at.alpha},React$1.createElement("div",{style:at.checkboard},React$1.createElement(Checkboard,{renderers:this.props.renderers})),React$1.createElement("div",{style:at.gradient}),React$1.createElement("div",{style:at.container,ref:function(ut){return nt.container=ut},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},React$1.createElement("div",{style:at.pointer},this.props.pointer?React$1.createElement(this.props.pointer,this.props):React$1.createElement("div",{style:at.slider}))))}}]),tt}(reactExports.PureComponent||reactExports.Component),_createClass$c=function(){function rt(tt,et){for(var nt=0;nt<et.length;nt++){var ot=et[nt];ot.enumerable=ot.enumerable||!1,ot.configurable=!0,"value"in ot&&(ot.writable=!0),Object.defineProperty(tt,ot.key,ot)}}return function(tt,et,nt){return et&&rt(tt.prototype,et),nt&&rt(tt,nt),tt}}();function _defineProperty$d(rt,tt,et){return tt in rt?Object.defineProperty(rt,tt,{value:et,enumerable:!0,configurable:!0,writable:!0}):rt[tt]=et,rt}function _classCallCheck$c(rt,tt){if(!(rt instanceof tt))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$c(rt,tt){if(!rt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return tt&&(typeof tt=="object"||typeof tt=="function")?tt:rt}function _inherits$c(rt,tt){if(typeof tt!="function"&&tt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof tt);rt.prototype=Object.create(tt&&tt.prototype,{constructor:{value:rt,enumerable:!1,writable:!0,configurable:!0}}),tt&&(Object.setPrototypeOf?Object.setPrototypeOf(rt,tt):rt.__proto__=tt)}var DEFAULT_ARROW_OFFSET=1,UP_KEY_CODE=38,DOWN_KEY_CODE=40,VALID_KEY_CODES=[UP_KEY_CODE,DOWN_KEY_CODE],isValidKeyCode=function rt(tt){return VALID_KEY_CODES.indexOf(tt)>-1},getNumberValue=function rt(tt){return Number(String(tt).replace(/%/g,""))},idCounter=1,EditableInput=function(rt){_inherits$c(tt,rt);function tt(et){_classCallCheck$c(this,tt);var nt=_possibleConstructorReturn$c(this,(tt.__proto__||Object.getPrototypeOf(tt)).call(this));return nt.handleBlur=function(){nt.state.blurValue&&nt.setState({value:nt.state.blurValue,blurValue:null})},nt.handleChange=function(ot){nt.setUpdatedValue(ot.target.value,ot)},nt.handleKeyDown=function(ot){var at=getNumberValue(ot.target.value);if(!isNaN(at)&&isValidKeyCode(ot.keyCode)){var st=nt.getArrowOffset(),ut=ot.keyCode===UP_KEY_CODE?at+st:at-st;nt.setUpdatedValue(ut,ot)}},nt.handleDrag=function(ot){if(nt.props.dragLabel){var at=Math.round(nt.props.value+ot.movementX);at>=0&&at<=nt.props.dragMax&&nt.props.onChange&&nt.props.onChange(nt.getValueObjectWithLabel(at),ot)}},nt.handleMouseDown=function(ot){nt.props.dragLabel&&(ot.preventDefault(),nt.handleDrag(ot),window.addEventListener("mousemove",nt.handleDrag),window.addEventListener("mouseup",nt.handleMouseUp))},nt.handleMouseUp=function(){nt.unbindEventListeners()},nt.unbindEventListeners=function(){window.removeEventListener("mousemove",nt.handleDrag),window.removeEventListener("mouseup",nt.handleMouseUp)},nt.state={value:String(et.value).toUpperCase(),blurValue:String(et.value).toUpperCase()},nt.inputId="rc-editable-input-"+idCounter++,nt}return _createClass$c(tt,[{key:"componentDidUpdate",value:function(nt,ot){this.props.value!==this.state.value&&(nt.value!==this.props.value||ot.value!==this.state.value)&&(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(nt){return _defineProperty$d({},this.props.label,nt)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||DEFAULT_ARROW_OFFSET}},{key:"setUpdatedValue",value:function(nt,ot){var at=this.props.label?this.getValueObjectWithLabel(nt):nt;this.props.onChange&&this.props.onChange(at,ot),this.setState({value:nt})}},{key:"render",value:function(){var nt=this,ot=_default$2({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return React$1.createElement("div",{style:ot.wrap},React$1.createElement("input",{id:this.inputId,style:ot.input,ref:function(st){return nt.input=st},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?React$1.createElement("label",{htmlFor:this.inputId,style:ot.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),tt}(reactExports.PureComponent||reactExports.Component),calculateChange$1=function rt(tt,et,nt,ot){var at=ot.clientWidth,st=ot.clientHeight,ut=typeof tt.pageX=="number"?tt.pageX:tt.touches[0].pageX,ct=typeof tt.pageY=="number"?tt.pageY:tt.touches[0].pageY,pt=ut-(ot.getBoundingClientRect().left+window.pageXOffset),dt=ct-(ot.getBoundingClientRect().top+window.pageYOffset);if(et==="vertical"){var ft=void 0;if(dt<0)ft=359;else if(dt>st)ft=0;else{var bt=-(dt*100/st)+100;ft=360*bt/100}if(nt.h!==ft)return{h:ft,s:nt.s,l:nt.l,a:nt.a,source:"hsl"}}else{var ht=void 0;if(pt<0)ht=0;else if(pt>at)ht=359;else{var mt=pt*100/at;ht=360*mt/100}if(nt.h!==ht)return{h:ht,s:nt.s,l:nt.l,a:nt.a,source:"hsl"}}return null},_createClass$b=function(){function rt(tt,et){for(var nt=0;nt<et.length;nt++){var ot=et[nt];ot.enumerable=ot.enumerable||!1,ot.configurable=!0,"value"in ot&&(ot.writable=!0),Object.defineProperty(tt,ot.key,ot)}}return function(tt,et,nt){return et&&rt(tt.prototype,et),nt&&rt(tt,nt),tt}}();function _classCallCheck$b(rt,tt){if(!(rt instanceof tt))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$b(rt,tt){if(!rt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return tt&&(typeof tt=="object"||typeof tt=="function")?tt:rt}function _inherits$b(rt,tt){if(typeof tt!="function"&&tt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof tt);rt.prototype=Object.create(tt&&tt.prototype,{constructor:{value:rt,enumerable:!1,writable:!0,configurable:!0}}),tt&&(Object.setPrototypeOf?Object.setPrototypeOf(rt,tt):rt.__proto__=tt)}var Hue=function(rt){_inherits$b(tt,rt);function tt(){var et,nt,ot,at;_classCallCheck$b(this,tt);for(var st=arguments.length,ut=Array(st),ct=0;ct<st;ct++)ut[ct]=arguments[ct];return at=(nt=(ot=_possibleConstructorReturn$b(this,(et=tt.__proto__||Object.getPrototypeOf(tt)).call.apply(et,[this].concat(ut))),ot),ot.handleChange=function(pt){var dt=calculateChange$1(pt,ot.props.direction,ot.props.hsl,ot.container);dt&&typeof ot.props.onChange=="function"&&ot.props.onChange(dt,pt)},ot.handleMouseDown=function(pt){ot.handleChange(pt),window.addEventListener("mousemove",ot.handleChange),window.addEventListener("mouseup",ot.handleMouseUp)},ot.handleMouseUp=function(){ot.unbindEventListeners()},nt),_possibleConstructorReturn$b(ot,at)}return _createClass$b(tt,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var nt=this,ot=this.props.direction,at=ot===void 0?"horizontal":ot,st=_default$2({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:this.props.hsl.h*100/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-(this.props.hsl.h*100/360)+100+"%"}}},{vertical:at==="vertical"});return React$1.createElement("div",{style:st.hue},React$1.createElement("div",{className:"hue-"+at,style:st.container,ref:function(ct){return nt.container=ct},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},React$1.createElement("style",null,`
697
697
  .hue-horizontal {
@@ -803,9 +803,9 @@ Event: ${tt}`)}async pingServer(){this.uriIndex=await doInitPings(this.args.base
803
803
  `)},ThemeCreatorDialog=rt=>{const[tt,et]=React$1.useState(!1),{activeTheme:nt,addThemes:ot,setTheme:at}=React$1.useContext(LibContext),st=toThemeInput(nt.emotion),ut=Mt=>{ot([Mt]),at(Mt)},ct=(Mt,At)=>{const St=createTheme(CUSTOM_THEME_NAME,{...st,[Mt]:At});ut(St),et(!1)},pt=toMinimalToml(st),dt=()=>{rt.metricsMgr.enqueue("menuClick",{label:"copyThemeToClipboard"}),navigator.clipboard.writeText(pt),et(!0)},ft=({name:Mt,value:At})=>{const St=themeBuilder[Mt],Et=St.component===BaseColorPicker$1,zt={options:St.options||void 0,showValue:Et,value:St.getValue(At,St)};return jsx$1(React$1.Fragment,{children:jsx$1(St.component,{disabled:!1,label:St.title,help:St.help,onChange:vt=>{ct(Mt,vt)},...zt})},Mt)},bt=()=>{rt.backToSettings(!1)},{primaryColor:ht,textColor:mt,backgroundColor:Ot,secondaryBackgroundColor:yt}=st;return jsxs(Modal,{animate:!1,isOpen:!0,onClose:rt.onClose,children:[jsxs(ModalHeader,{children:[jsx$1(StyledBackButton,{onClick:bt,"data-testid":"stThemeCreatorBack"}),"Edit active theme"]}),jsx$1(ModalBody$1,{children:jsxs(StyledDialogBody,{"data-testid":"stThemeCreatorDialog",children:[jsx$1(StyledFullRow,{children:jsx$1(StreamlitMarkdown$1,{source:`
804
804
  Changes made to the active theme will exist for the duration of a
805
805
  session. To discard changes and recover the original theme,
806
- refresh the page.`,allowHTML:!1,isCaption:!0})}),jsx$1(ft,{name:"primaryColor",value:ht}),jsx$1(ft,{name:"backgroundColor",value:Ot}),jsx$1(ft,{name:"textColor",value:mt}),jsx$1(ft,{name:"secondaryBackgroundColor",value:yt}),jsx$1(StyledFullRow,{children:jsx$1(ft,{name:"font",value:String(st.font)})}),jsx$1(StyledFullRow,{children:jsx$1(StyledFullRow,{children:jsx$1(StreamlitMarkdown$1,{source:"\nTo save your changes, copy your custom theme into the clipboard and paste it into the\n`[theme]` section of your `.streamlit/config.toml` file.\n",allowHTML:!1,isCaption:!0})})}),jsx$1(StyledFullRow,{children:jsx$1("div",{children:jsx$1(BaseButton,{onClick:dt,kind:BaseButtonKind.SECONDARY,children:tt?jsxs(React$1.Fragment,{children:["Copied to clipboard ",jsx$1(Icon$2,{content:Check,size:"lg",color:nt.emotion.colors.success})]}):"Copy theme to clipboard"})})})]})})]})};var LevelContext=reactExports.createContext(0);function ownKeys(rt,tt){var et=Object.keys(rt);if(Object.getOwnPropertySymbols){var nt=Object.getOwnPropertySymbols(rt);tt&&(nt=nt.filter(function(ot){return Object.getOwnPropertyDescriptor(rt,ot).enumerable})),et.push.apply(et,nt)}return et}function _objectSpread(rt){for(var tt=1;tt<arguments.length;tt++){var et=arguments[tt]!=null?arguments[tt]:{};tt%2?ownKeys(Object(et),!0).forEach(function(nt){_defineProperty(rt,nt,et[nt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(rt,Object.getOwnPropertyDescriptors(et)):ownKeys(Object(et)).forEach(function(nt){Object.defineProperty(rt,nt,Object.getOwnPropertyDescriptor(et,nt))})}return rt}function _defineProperty(rt,tt,et){return tt in rt?Object.defineProperty(rt,tt,{value:et,enumerable:!0,configurable:!0,writable:!0}):rt[tt]=et,rt}var Action=styled("div",function(rt){var tt=rt.$theme;return _objectSpread({},tt.typography.LabelMedium)});Action.displayName="Action";Action.displayName="Action";var Body=styled("div",function(rt){var tt=rt.$theme;return _objectSpread({marginBottom:tt.sizing.scale600,color:tt.colors.contentPrimary},tt.typography.ParagraphMedium)});Body.displayName="Body";Body.displayName="Body";var Contents=styled("div",function(rt){var tt=rt.$theme;return{marginLeft:tt.sizing.scale600,marginTop:tt.sizing.scale600,marginRight:tt.sizing.scale600,marginBottom:tt.sizing.scale600}});Contents.displayName="Contents";Contents.displayName="Contents";var HeaderImage=styled("img",function(rt){var tt=rt.$theme;return{borderTopLeftRadius:tt.borders.surfaceBorderRadius,borderTopRightRadius:tt.borders.surfaceBorderRadius,objectFit:"contain",maxWidth:"100%"}});HeaderImage.displayName="HeaderImage";HeaderImage.displayName="HeaderImage";var Root=styled("section",function(rt){var tt=rt.$theme;return{borderLeftWidth:"2px",borderTopWidth:"2px",borderRightWidth:"2px",borderBottomWidth:"2px",borderLeftStyle:"solid",borderTopStyle:"solid",borderRightStyle:"solid",borderBottomStyle:"solid",borderLeftColor:tt.colors.borderOpaque,borderRightColor:tt.colors.borderOpaque,borderTopColor:tt.colors.borderOpaque,borderBottomColor:tt.colors.borderOpaque,borderTopLeftRadius:tt.borders.radius400,borderTopRightRadius:tt.borders.radius400,borderBottomLeftRadius:tt.borders.radius400,borderBottomRightRadius:tt.borders.radius400,backgroundColor:tt.colors.backgroundPrimary,overflow:"hidden"}});Root.displayName="Root";Root.displayName="Root";var Thumbnail=styled("img",function(rt){var tt=rt.$theme;return _objectSpread(_objectSpread({float:"right",height:tt.sizing.scale2400,width:tt.sizing.scale2400,objectFit:"cover",borderTopLeftRadius:tt.borders.surfaceBorderRadius,borderTopRightRadius:tt.borders.surfaceBorderRadius,borderBottomLeftRadius:tt.borders.surfaceBorderRadius,borderBottomRightRadius:tt.borders.surfaceBorderRadius},expandBorderStyles(tt.borders.border200)),{},{margin:"0 0 ".concat(tt.sizing.scale500," ").concat(tt.sizing.scale500)})});Thumbnail.displayName="Thumbnail";Thumbnail.displayName="Thumbnail";var Title=styled("h1",function(rt){var tt=rt.$theme;return _objectSpread(_objectSpread({},tt.typography.HeadingSmall),{},{color:tt.colors.contentPrimary,marginLeft:0,marginTop:0,marginRight:0,marginBottom:tt.sizing.scale500,paddingLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0})});Title.displayName="Title";Title.displayName="Title";var _excluded=["children"],_excluded2=["action","children","hasThumbnail","headerImage","thumbnail","title","overrides"];function _extends(){return _extends=Object.assign?Object.assign.bind():function(rt){for(var tt=1;tt<arguments.length;tt++){var et=arguments[tt];for(var nt in et)Object.prototype.hasOwnProperty.call(et,nt)&&(rt[nt]=et[nt])}return rt},_extends.apply(this,arguments)}function _objectWithoutProperties(rt,tt){if(rt==null)return{};var et=_objectWithoutPropertiesLoose(rt,tt),nt,ot;if(Object.getOwnPropertySymbols){var at=Object.getOwnPropertySymbols(rt);for(ot=0;ot<at.length;ot++)nt=at[ot],!(tt.indexOf(nt)>=0)&&Object.prototype.propertyIsEnumerable.call(rt,nt)&&(et[nt]=rt[nt])}return et}function _objectWithoutPropertiesLoose(rt,tt){if(rt==null)return{};var et={},nt=Object.keys(rt),ot,at;for(at=0;at<nt.length;at++)ot=nt[at],!(tt.indexOf(ot)>=0)&&(et[ot]=rt[ot]);return et}function hasThumbnail(rt){return!!rt.thumbnail}var SemanticTitle=function rt(tt){var et=tt.children,nt=_objectWithoutProperties(tt,_excluded),ot=["","h1","h2","h3","h4","h5","h6"];return reactExports.createElement(LevelContext.Consumer,null,function(at){return reactExports.createElement(Title,_extends({$as:ot[at]},nt),et)})};function Card(rt){var tt=rt.action,et=rt.children,nt=rt.hasThumbnail,ot=rt.headerImage,at=rt.thumbnail,st=rt.title,ut=rt.overrides,ct=_objectWithoutProperties(rt,_excluded2),pt=ut.Action,dt=ut.Body,ft=ut.Contents,bt=ut.HeaderImage,ht=ut.Root,mt=ut.Thumbnail,Ot=ut.Title,yt=getOverride(pt)||Action,Mt=getOverride(dt)||Body,At=getOverride(ft)||Contents,St=getOverride(bt)||HeaderImage,Et=getOverride(ht)||Root,zt=getOverride(mt)||Thumbnail,vt=getOverride(Ot)||SemanticTitle,Tt=typeof ot=="string"?{src:ot}:ot,$t=nt(rt);return reactExports.createElement(Et,_extends({"data-baseweb":"card"},ct,getOverrideProps(ht)),ot&&reactExports.createElement(St,_extends({},Tt,getOverrideProps(bt))),reactExports.createElement(At,getOverrideProps(ft),at&&reactExports.createElement(zt,_extends({src:at},getOverrideProps(mt))),st&&reactExports.createElement(vt,_extends({$hasThumbnail:$t},getOverrideProps(Ot)),st),reactExports.createElement(Mt,getOverrideProps(dt),et),tt&&reactExports.createElement(yt,getOverrideProps(pt),tt)))}Card.defaultProps={action:null,children:null,hasThumbnail,overrides:{}};const StreamlitLogo="data:image/svg+xml,%3csvg%20width='32'%20height='19'%20viewBox='0%200%2032%2019'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%202'%3e%3cpath%20id='path3858'%20d='M15.998%2011.078L10.3882%208.04522L0.650371%202.78157C0.641482%202.77247%200.623705%202.77248%200.614816%202.77248C0.259259%202.59975%20-0.105186%202.96338%200.0281476%203.32702L4.98994%2016.2698L4.99083%2016.2725C4.99616%2016.2852%205.00061%2016.298%205.00594%2016.3107C5.2095%2016.7934%205.65394%2017.0916%206.1375%2017.2089C6.17839%2017.218%206.20764%2017.2262%206.25673%2017.2362C6.30559%2017.2473%206.37394%2017.2625%206.43261%2017.2671C6.44239%2017.268%206.45128%2017.268%206.46106%2017.2689H6.46817C6.47528%2017.2698%206.48239%2017.2698%206.4895%2017.2707H6.49928C6.5055%2017.2716%206.51261%2017.2716%206.51883%2017.2716H6.53039C6.5375%2017.2725%206.54461%2017.2725%206.55172%2017.2725C12.8348%2017.9731%2019.1763%2017.9731%2025.4593%2017.2725C25.5349%2017.2725%2025.6087%2017.2689%2025.6798%2017.2616C25.7029%2017.2589%2025.7251%2017.2562%2025.7473%2017.2534C25.75%2017.2525%2025.7536%2017.2525%2025.7562%2017.2516C25.7713%2017.2498%2025.7864%2017.2471%2025.8016%2017.2443C25.8238%2017.2416%2025.846%2017.2371%2025.8682%2017.2325C25.9127%2017.2225%2025.9329%2017.2152%2025.9932%2017.194C26.0535%2017.1729%2026.1536%2017.1358%2026.2163%2017.1049C26.279%2017.074%2026.3224%2017.0443%2026.3749%2017.0107C26.4398%2016.9689%2026.5015%2016.9261%2026.5641%2016.8781C26.5911%2016.8569%2026.6096%2016.8434%2026.6291%2016.8243L26.6184%2016.818L15.998%2011.078Z'%20fill='%23FF2B2B'/%3e%3cpath%20id='path5063'%20d='M31.3616%202.78158H31.3527L21.6113%208.04524L27.0265%2016.2935L31.9758%203.32704V3.30886C32.1003%202.92704%2031.7181%202.58158%2031.3616%202.78158Z'%20fill='%237D353B'/%3e%3cpath%20id='path5101'%20d='M16.5171%200.278788C16.2682%20-0.0930318%2015.726%20-0.0930318%2015.486%200.278788L10.3882%208.04518L15.998%2011.0779L26.6291%2016.8242C26.6959%2016.7574%2026.7494%2016.6922%2026.806%2016.6234C26.886%2016.5225%2026.9607%2016.4143%2027.0265%2016.2934L21.6113%208.04518L16.5171%200.278788Z'%20fill='%23BD4043'/%3e%3c/g%3e%3c/svg%3e",Rocket="data:image/svg+xml,%3csvg%20width='25'%20height='24'%20viewBox='0%200%2025%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Frame'%3e%3cpath%20id='Vector'%20d='M5.95077%2010.7642L8.09076%2011.6685C8.34683%2011.157%208.61204%2010.6637%208.8864%2010.1887C9.16076%209.71374%209.46256%209.23875%209.79179%208.76376L8.25538%208.46232L5.95077%2010.7642ZM9.84666%2013.0387L12.9743%2016.1352C13.7426%2015.8429%2014.5656%2015.3954%2015.4436%2014.7925C16.3215%2014.1896%2017.1446%2013.5045%2017.9128%2012.7372C19.1931%2011.4584%2020.1946%2010.038%2020.917%208.47602C21.6395%206.91403%2021.955%205.47536%2021.8636%204.16C20.5466%204.06866%2019.1017%204.38379%2017.5287%205.10541C15.9557%205.82703%2014.529%206.82726%2013.2487%208.10608C12.4805%208.87337%2011.7946%209.69547%2011.191%2010.5724C10.5874%2011.4493%2010.1393%2012.2714%209.84666%2013.0387ZM14.7302%2011.2575C14.3096%2010.8373%2014.0992%2010.3212%2014.0992%209.70917C14.0992%209.09716%2014.3096%208.58107%2014.7302%208.16088C15.1509%207.7407%2015.6722%207.53061%2016.2941%207.53061C16.916%207.53061%2017.4373%207.7407%2017.8579%208.16088C18.2786%208.58107%2018.489%209.09716%2018.489%209.70917C18.489%2010.3212%2018.2786%2010.8373%2017.8579%2011.2575C17.4373%2011.6776%2016.916%2011.8877%2016.2941%2011.8877C15.6722%2011.8877%2015.1509%2011.6776%2014.7302%2011.2575ZM15.2515%2020.0539L17.5561%2017.752L17.2543%2016.2175C16.7788%2016.5463%2016.3032%2016.8432%2015.8277%2017.1081C15.3521%2017.373%2014.8583%2017.6333%2014.3461%2017.8891L15.2515%2020.0539ZM23.839%202.15956C24.1865%204.37009%2023.9716%206.52125%2023.1942%208.61304C22.4169%2010.7048%2021.0771%2012.7007%2019.1749%2014.6007L19.7236%2017.3136C19.7967%2017.679%2019.7784%2018.0352%2019.6687%2018.3823C19.559%2018.7294%2019.3761%2019.0309%2019.12%2019.2866L14.5108%2023.8904L12.2061%2018.4919L7.51461%2013.806L2.10974%2011.5041L6.69153%206.90033C6.9476%206.64457%207.25397%206.46188%207.61064%206.35227C7.9673%206.24265%208.32854%206.22438%208.69435%206.29746L11.4105%206.84553C13.3127%204.94556%2015.3064%203.6028%2017.3915%202.81724C19.4767%202.03168%2021.6258%201.81245%2023.839%202.15956ZM4.05769%2017.2862C4.69786%2016.6468%205.47978%2016.3225%206.40346%2016.3134C7.32713%2016.3042%208.10905%2016.6194%208.74922%2017.2588C9.38939%2017.8982%209.70491%2018.6792%209.69576%2019.6018C9.68662%2020.5243%209.36196%2021.3053%208.72179%2021.9448C8.26452%2022.4015%207.50089%2022.7943%206.43089%2023.1231C5.36089%2023.4519%203.88393%2023.7442%202%2024C2.25607%2022.1183%202.54872%2020.6431%202.87795%2019.5744C3.20718%2018.5056%203.60043%2017.7429%204.05769%2017.2862ZM5.62154%2018.8208C5.43863%2019.0035%205.25572%2019.3369%205.07282%2019.821C4.88991%2020.3051%204.76188%2020.7938%204.68872%2021.2871C5.18256%2021.214%205.67183%2021.0907%206.15653%2020.9171C6.64123%2020.7436%206.97504%2020.5655%207.15794%2020.3828C7.37743%2020.1635%207.49632%2019.8986%207.51461%2019.5881C7.5329%2019.2775%207.4323%2019.0126%207.21282%2018.7934C6.99333%2018.5741%206.72812%2018.4691%206.41718%2018.4782C6.10624%2018.4874%205.84102%2018.6015%205.62154%2018.8208Z'%20fill='%23A3A8B8'/%3e%3c/g%3e%3c/svg%3e",Snowflake=""+new URL("../media/snowflake.JU2jBHL8.svg",import.meta.url).href;function DetachedHead(){return{title:"Unable to deploy",body:jsxs(Fragment,{children:[jsx$1("p",{children:"This Git tree is in a detached HEAD state."}),jsx$1("p",{children:"Please commit the latest changes and push to GitHub to continue."})]})}}function ModuleIsNotAdded(rt){return{title:"Unable to deploy",body:jsx$1(StreamlitMarkdown$1,{source:`
806
+ refresh the page.`,allowHTML:!1,isCaption:!0})}),jsx$1(ft,{name:"primaryColor",value:ht}),jsx$1(ft,{name:"backgroundColor",value:Ot}),jsx$1(ft,{name:"textColor",value:mt}),jsx$1(ft,{name:"secondaryBackgroundColor",value:yt}),jsx$1(StyledFullRow,{children:jsx$1(StyledFullRow,{children:jsx$1(StreamlitMarkdown$1,{source:"\nTo save your changes, copy your custom theme into the clipboard and paste it into the\n`[theme]` section of your `.streamlit/config.toml` file.\n",allowHTML:!1,isCaption:!0})})}),jsx$1(StyledFullRow,{children:jsx$1("div",{children:jsx$1(BaseButton,{onClick:dt,kind:BaseButtonKind.SECONDARY,children:tt?jsxs(React$1.Fragment,{children:["Copied to clipboard ",jsx$1(Icon$2,{content:Check,size:"lg",color:nt.emotion.colors.success})]}):"Copy theme to clipboard"})})})]})})]})};var LevelContext=reactExports.createContext(0);function ownKeys(rt,tt){var et=Object.keys(rt);if(Object.getOwnPropertySymbols){var nt=Object.getOwnPropertySymbols(rt);tt&&(nt=nt.filter(function(ot){return Object.getOwnPropertyDescriptor(rt,ot).enumerable})),et.push.apply(et,nt)}return et}function _objectSpread(rt){for(var tt=1;tt<arguments.length;tt++){var et=arguments[tt]!=null?arguments[tt]:{};tt%2?ownKeys(Object(et),!0).forEach(function(nt){_defineProperty(rt,nt,et[nt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(rt,Object.getOwnPropertyDescriptors(et)):ownKeys(Object(et)).forEach(function(nt){Object.defineProperty(rt,nt,Object.getOwnPropertyDescriptor(et,nt))})}return rt}function _defineProperty(rt,tt,et){return tt in rt?Object.defineProperty(rt,tt,{value:et,enumerable:!0,configurable:!0,writable:!0}):rt[tt]=et,rt}var Action=styled("div",function(rt){var tt=rt.$theme;return _objectSpread({},tt.typography.LabelMedium)});Action.displayName="Action";Action.displayName="Action";var Body=styled("div",function(rt){var tt=rt.$theme;return _objectSpread({marginBottom:tt.sizing.scale600,color:tt.colors.contentPrimary},tt.typography.ParagraphMedium)});Body.displayName="Body";Body.displayName="Body";var Contents=styled("div",function(rt){var tt=rt.$theme;return{marginLeft:tt.sizing.scale600,marginTop:tt.sizing.scale600,marginRight:tt.sizing.scale600,marginBottom:tt.sizing.scale600}});Contents.displayName="Contents";Contents.displayName="Contents";var HeaderImage=styled("img",function(rt){var tt=rt.$theme;return{borderTopLeftRadius:tt.borders.surfaceBorderRadius,borderTopRightRadius:tt.borders.surfaceBorderRadius,objectFit:"contain",maxWidth:"100%"}});HeaderImage.displayName="HeaderImage";HeaderImage.displayName="HeaderImage";var Root=styled("section",function(rt){var tt=rt.$theme;return{borderLeftWidth:"2px",borderTopWidth:"2px",borderRightWidth:"2px",borderBottomWidth:"2px",borderLeftStyle:"solid",borderTopStyle:"solid",borderRightStyle:"solid",borderBottomStyle:"solid",borderLeftColor:tt.colors.borderOpaque,borderRightColor:tt.colors.borderOpaque,borderTopColor:tt.colors.borderOpaque,borderBottomColor:tt.colors.borderOpaque,borderTopLeftRadius:tt.borders.radius400,borderTopRightRadius:tt.borders.radius400,borderBottomLeftRadius:tt.borders.radius400,borderBottomRightRadius:tt.borders.radius400,backgroundColor:tt.colors.backgroundPrimary,overflow:"hidden"}});Root.displayName="Root";Root.displayName="Root";var Thumbnail=styled("img",function(rt){var tt=rt.$theme;return _objectSpread(_objectSpread({float:"right",height:tt.sizing.scale2400,width:tt.sizing.scale2400,objectFit:"cover",borderTopLeftRadius:tt.borders.surfaceBorderRadius,borderTopRightRadius:tt.borders.surfaceBorderRadius,borderBottomLeftRadius:tt.borders.surfaceBorderRadius,borderBottomRightRadius:tt.borders.surfaceBorderRadius},expandBorderStyles(tt.borders.border200)),{},{margin:"0 0 ".concat(tt.sizing.scale500," ").concat(tt.sizing.scale500)})});Thumbnail.displayName="Thumbnail";Thumbnail.displayName="Thumbnail";var Title=styled("h1",function(rt){var tt=rt.$theme;return _objectSpread(_objectSpread({},tt.typography.HeadingSmall),{},{color:tt.colors.contentPrimary,marginLeft:0,marginTop:0,marginRight:0,marginBottom:tt.sizing.scale500,paddingLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0})});Title.displayName="Title";Title.displayName="Title";var _excluded=["children"],_excluded2=["action","children","hasThumbnail","headerImage","thumbnail","title","overrides"];function _extends(){return _extends=Object.assign?Object.assign.bind():function(rt){for(var tt=1;tt<arguments.length;tt++){var et=arguments[tt];for(var nt in et)Object.prototype.hasOwnProperty.call(et,nt)&&(rt[nt]=et[nt])}return rt},_extends.apply(this,arguments)}function _objectWithoutProperties(rt,tt){if(rt==null)return{};var et=_objectWithoutPropertiesLoose(rt,tt),nt,ot;if(Object.getOwnPropertySymbols){var at=Object.getOwnPropertySymbols(rt);for(ot=0;ot<at.length;ot++)nt=at[ot],!(tt.indexOf(nt)>=0)&&Object.prototype.propertyIsEnumerable.call(rt,nt)&&(et[nt]=rt[nt])}return et}function _objectWithoutPropertiesLoose(rt,tt){if(rt==null)return{};var et={},nt=Object.keys(rt),ot,at;for(at=0;at<nt.length;at++)ot=nt[at],!(tt.indexOf(ot)>=0)&&(et[ot]=rt[ot]);return et}function hasThumbnail(rt){return!!rt.thumbnail}var SemanticTitle=function rt(tt){var et=tt.children,nt=_objectWithoutProperties(tt,_excluded),ot=["","h1","h2","h3","h4","h5","h6"];return reactExports.createElement(LevelContext.Consumer,null,function(at){return reactExports.createElement(Title,_extends({$as:ot[at]},nt),et)})};function Card(rt){var tt=rt.action,et=rt.children,nt=rt.hasThumbnail,ot=rt.headerImage,at=rt.thumbnail,st=rt.title,ut=rt.overrides,ct=_objectWithoutProperties(rt,_excluded2),pt=ut.Action,dt=ut.Body,ft=ut.Contents,bt=ut.HeaderImage,ht=ut.Root,mt=ut.Thumbnail,Ot=ut.Title,yt=getOverride(pt)||Action,Mt=getOverride(dt)||Body,At=getOverride(ft)||Contents,St=getOverride(bt)||HeaderImage,Et=getOverride(ht)||Root,zt=getOverride(mt)||Thumbnail,vt=getOverride(Ot)||SemanticTitle,Tt=typeof ot=="string"?{src:ot}:ot,$t=nt(rt);return reactExports.createElement(Et,_extends({"data-baseweb":"card"},ct,getOverrideProps(ht)),ot&&reactExports.createElement(St,_extends({},Tt,getOverrideProps(bt))),reactExports.createElement(At,getOverrideProps(ft),at&&reactExports.createElement(zt,_extends({src:at},getOverrideProps(mt))),st&&reactExports.createElement(vt,_extends({$hasThumbnail:$t},getOverrideProps(Ot)),st),reactExports.createElement(Mt,getOverrideProps(dt),et),tt&&reactExports.createElement(yt,getOverrideProps(pt),tt)))}Card.defaultProps={action:null,children:null,hasThumbnail,overrides:{}};const StreamlitLogo="data:image/svg+xml,%3csvg%20width='32'%20height='19'%20viewBox='0%200%2032%2019'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%202'%3e%3cpath%20id='path3858'%20d='M15.998%2011.078L10.3882%208.04522L0.650371%202.78157C0.641482%202.77247%200.623705%202.77248%200.614816%202.77248C0.259259%202.59975%20-0.105186%202.96338%200.0281476%203.32702L4.98994%2016.2698L4.99083%2016.2725C4.99616%2016.2852%205.00061%2016.298%205.00594%2016.3107C5.2095%2016.7934%205.65394%2017.0916%206.1375%2017.2089C6.17839%2017.218%206.20764%2017.2262%206.25673%2017.2362C6.30559%2017.2473%206.37394%2017.2625%206.43261%2017.2671C6.44239%2017.268%206.45128%2017.268%206.46106%2017.2689H6.46817C6.47528%2017.2698%206.48239%2017.2698%206.4895%2017.2707H6.49928C6.5055%2017.2716%206.51261%2017.2716%206.51883%2017.2716H6.53039C6.5375%2017.2725%206.54461%2017.2725%206.55172%2017.2725C12.8348%2017.9731%2019.1763%2017.9731%2025.4593%2017.2725C25.5349%2017.2725%2025.6087%2017.2689%2025.6798%2017.2616C25.7029%2017.2589%2025.7251%2017.2562%2025.7473%2017.2534C25.75%2017.2525%2025.7536%2017.2525%2025.7562%2017.2516C25.7713%2017.2498%2025.7864%2017.2471%2025.8016%2017.2443C25.8238%2017.2416%2025.846%2017.2371%2025.8682%2017.2325C25.9127%2017.2225%2025.9329%2017.2152%2025.9932%2017.194C26.0535%2017.1729%2026.1536%2017.1358%2026.2163%2017.1049C26.279%2017.074%2026.3224%2017.0443%2026.3749%2017.0107C26.4398%2016.9689%2026.5015%2016.9261%2026.5641%2016.8781C26.5911%2016.8569%2026.6096%2016.8434%2026.6291%2016.8243L26.6184%2016.818L15.998%2011.078Z'%20fill='%23FF2B2B'/%3e%3cpath%20id='path5063'%20d='M31.3616%202.78158H31.3527L21.6113%208.04524L27.0265%2016.2935L31.9758%203.32704V3.30886C32.1003%202.92704%2031.7181%202.58158%2031.3616%202.78158Z'%20fill='%237D353B'/%3e%3cpath%20id='path5101'%20d='M16.5171%200.278788C16.2682%20-0.0930318%2015.726%20-0.0930318%2015.486%200.278788L10.3882%208.04518L15.998%2011.0779L26.6291%2016.8242C26.6959%2016.7574%2026.7494%2016.6922%2026.806%2016.6234C26.886%2016.5225%2026.9607%2016.4143%2027.0265%2016.2934L21.6113%208.04518L16.5171%200.278788Z'%20fill='%23BD4043'/%3e%3c/g%3e%3c/svg%3e",Rocket="data:image/svg+xml,%3csvg%20width='25'%20height='24'%20viewBox='0%200%2025%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Frame'%3e%3cpath%20id='Vector'%20d='M5.95077%2010.7642L8.09076%2011.6685C8.34683%2011.157%208.61204%2010.6637%208.8864%2010.1887C9.16076%209.71374%209.46256%209.23875%209.79179%208.76376L8.25538%208.46232L5.95077%2010.7642ZM9.84666%2013.0387L12.9743%2016.1352C13.7426%2015.8429%2014.5656%2015.3954%2015.4436%2014.7925C16.3215%2014.1896%2017.1446%2013.5045%2017.9128%2012.7372C19.1931%2011.4584%2020.1946%2010.038%2020.917%208.47602C21.6395%206.91403%2021.955%205.47536%2021.8636%204.16C20.5466%204.06866%2019.1017%204.38379%2017.5287%205.10541C15.9557%205.82703%2014.529%206.82726%2013.2487%208.10608C12.4805%208.87337%2011.7946%209.69547%2011.191%2010.5724C10.5874%2011.4493%2010.1393%2012.2714%209.84666%2013.0387ZM14.7302%2011.2575C14.3096%2010.8373%2014.0992%2010.3212%2014.0992%209.70917C14.0992%209.09716%2014.3096%208.58107%2014.7302%208.16088C15.1509%207.7407%2015.6722%207.53061%2016.2941%207.53061C16.916%207.53061%2017.4373%207.7407%2017.8579%208.16088C18.2786%208.58107%2018.489%209.09716%2018.489%209.70917C18.489%2010.3212%2018.2786%2010.8373%2017.8579%2011.2575C17.4373%2011.6776%2016.916%2011.8877%2016.2941%2011.8877C15.6722%2011.8877%2015.1509%2011.6776%2014.7302%2011.2575ZM15.2515%2020.0539L17.5561%2017.752L17.2543%2016.2175C16.7788%2016.5463%2016.3032%2016.8432%2015.8277%2017.1081C15.3521%2017.373%2014.8583%2017.6333%2014.3461%2017.8891L15.2515%2020.0539ZM23.839%202.15956C24.1865%204.37009%2023.9716%206.52125%2023.1942%208.61304C22.4169%2010.7048%2021.0771%2012.7007%2019.1749%2014.6007L19.7236%2017.3136C19.7967%2017.679%2019.7784%2018.0352%2019.6687%2018.3823C19.559%2018.7294%2019.3761%2019.0309%2019.12%2019.2866L14.5108%2023.8904L12.2061%2018.4919L7.51461%2013.806L2.10974%2011.5041L6.69153%206.90033C6.9476%206.64457%207.25397%206.46188%207.61064%206.35227C7.9673%206.24265%208.32854%206.22438%208.69435%206.29746L11.4105%206.84553C13.3127%204.94556%2015.3064%203.6028%2017.3915%202.81724C19.4767%202.03168%2021.6258%201.81245%2023.839%202.15956ZM4.05769%2017.2862C4.69786%2016.6468%205.47978%2016.3225%206.40346%2016.3134C7.32713%2016.3042%208.10905%2016.6194%208.74922%2017.2588C9.38939%2017.8982%209.70491%2018.6792%209.69576%2019.6018C9.68662%2020.5243%209.36196%2021.3053%208.72179%2021.9448C8.26452%2022.4015%207.50089%2022.7943%206.43089%2023.1231C5.36089%2023.4519%203.88393%2023.7442%202%2024C2.25607%2022.1183%202.54872%2020.6431%202.87795%2019.5744C3.20718%2018.5056%203.60043%2017.7429%204.05769%2017.2862ZM5.62154%2018.8208C5.43863%2019.0035%205.25572%2019.3369%205.07282%2019.821C4.88991%2020.3051%204.76188%2020.7938%204.68872%2021.2871C5.18256%2021.214%205.67183%2021.0907%206.15653%2020.9171C6.64123%2020.7436%206.97504%2020.5655%207.15794%2020.3828C7.37743%2020.1635%207.49632%2019.8986%207.51461%2019.5881C7.5329%2019.2775%207.4323%2019.0126%207.21282%2018.7934C6.99333%2018.5741%206.72812%2018.4691%206.41718%2018.4782C6.10624%2018.4874%205.84102%2018.6015%205.62154%2018.8208Z'%20fill='%23A3A8B8'/%3e%3c/g%3e%3c/svg%3e",Snowflake=""+new URL("../media/snowflake.JU2jBHL8.svg",import.meta.url).href;function DetachedHead(){return{title:"Unable to deploy",body:jsxs(Fragment,{children:[jsx$1("p",{children:"This Git tree is in a detached HEAD state."}),jsx$1("p",{children:"Please commit the latest changes and push to GitHub to continue."})]})}}function ModuleIsNotAdded(rt){return{title:"Unable to deploy",body:jsx$1(StreamlitMarkdown$1,{source:`
807
807
  The app's main file \`${rt}\` has
808
808
  not been pushed to GitHub. Please add it to continue.
809
809
  `,allowHTML:!1})}}const StyledParagraph=newStyled("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 ModalBody({children:rt}){const{colors:tt,fontSizes:et,spacing:nt}=useTheme();return jsx$1(ModalBody$2,{style:{marginTop:nt.none,marginLeft:nt.none,marginRight:nt.none,marginBottom:nt.none,paddingTop:nt.md,paddingRight:nt.none,paddingBottom:nt.none,paddingLeft:nt.none,color:tt.bodyText,fontSize:et.md,overflowY:"auto"},children:rt})}function DeployModal(rt){const{children:tt,onClose:et}=rt;return jsxs(Modal,{isOpen:!0,closeable:!0,onClose:et,size:"auto",children:[jsx$1(ModalHeader,{children:"Deploy this app using..."}),jsx$1(ModalBody,{children:tt})]})}function DeployCard(rt){const{colors:tt,spacing:et,radii:nt,breakpoints:ot,sizes:at}=useTheme(),{children:st}=rt;return jsx$1(Card,{overrides:{Root:{style:{borderTopWidth:at.borderWidth,borderBottomWidth:at.borderWidth,borderLeftWidth:at.borderWidth,borderRightWidth:at.borderWidth,borderTopStyle:"solid",borderBottomStyle:"none",borderLeftStyle:"none",borderRightStyle:"solid",borderTopColor:tt.borderColor,borderBottomColor:tt.borderColor,borderLeftColor:tt.borderColor,borderRightColor:tt.borderColor,borderTopLeftRadius:"none",borderTopRightRadius:"none",borderBottomLeftRadius:"none",borderBottomRightRadius:"none",":last-child":{borderRightStyle:"none",borderBottomRightRadius:nt.xl},":first-child":{borderBottomLeftRadius:nt.xl},[`@media (max-width: ${ot.md})`]:{":last-child":{borderBottomLeftRadius:nt.xl}}}},Contents:{style:{marginBottom:0,marginTop:0,marginLeft:0,marginRight:0,height:"100%"}},Body:{style:{padding:et.twoXL,marginBottom:0,marginTop:0,marginLeft:0,marginRight:0,height:"100%",display:"flex",flexDirection:"column",[`@media (max-width: ${ot.md})`]:{padding:et.xl}}}},children:st})}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=newStyled("div",{target:"edlp5wu0"})(({theme:rt})=>({fontFamily:rt.fonts.sansSerif,fontWeight:rt.fontWeights.bold,fontSize:rt.fontSizes.lg,color:rt.colors.grey90,marginTop:rt.spacing.twoXL,marginBottom:rt.spacing.twoXS,[`@media (max-width: ${rt.breakpoints.md})`]:{marginTop:rt.spacing.md}})),StyledSubheader=newStyled("div",{target:"edlp5wu1"})(({theme:rt})=>({fontFamily:rt.fonts.sansSerif,fontWeight:rt.fontWeights.normal,fontSize:rt.fontSizes.md,color:rt.colors.grey90,marginTop:rt.spacing.twoXS,marginBottom:rt.spacing.md,[`@media (max-width: ${rt.breakpoints.md})`]:{marginTop:rt.spacing.md}})),StyledCardContainer=newStyled("div",{target:"edlp5wu2"})(({theme:rt})=>({display:"grid",maxWidth:`calc(1.25 * ${rt.sizes.contentMaxWidth})`,gridTemplateColumns:"1fr 1fr 1fr",gridGap:rt.spacing.none,[`@media (max-width: ${rt.breakpoints.md})`]:{gridTemplateColumns:"1fr"}})),StyledElement=newStyled("div",{target:"edlp5wu3"})(({theme:rt})=>({display:"inline-flex",marginTop:rt.spacing.sm,"& > span":{fontFamily:rt.fonts.sansSerif,fontWeight:rt.fontWeights.normal,fontSize:rt.fontSizes.md,marginLeft:rt.spacing.twoXL,color:rt.colors.gray70},"& > img":{position:"absolute",marginTop:rt.spacing.sm}})),StyledActionsWrapper=newStyled("div",{target:"edlp5wu4"})(({theme:rt})=>({display:"flex",marginTop:rt.spacing.threeXL,"& > button":{marginRight:rt.spacing.twoXL},[`@media (max-width: ${rt.breakpoints.md})`]:{marginTop:rt.spacing.xl}}));function DeployListElement(rt){const{children:tt}=rt;return jsxs(StyledElement,{children:[jsx$1("img",{src:Checkmark,alt:"Checkmark"}),jsx$1("span",{children:tt})]})}const{GitStates}=GitInfo,openUrl=rt=>{window.open(rt,"_blank")},getDeployAppUrl=rt=>{if(rt){const tt=new URL(DEPLOY_URL);return tt.searchParams.set("repository",rt.repository??""),tt.searchParams.set("branch",rt.branch??""),tt.searchParams.set("mainModule",rt.module??""),tt.toString()}return STREAMLIT_CLOUD_URL};function DeployDialog(rt){const{gitInfo:tt}=reactExports.useContext(AppContext),{onClose:et,metricsMgr:nt}=rt,ot=reactExports.useCallback(()=>{const{showDeployError:at,isDeployErrorModalOpen:st,metricsMgr:ut}=rt;if(ut.enqueue("menuClick",{label:"deployButtonInDialog"}),!tt){const mt=NoRepositoryDetected();at(mt.title,mt.body);return}const{repository:ct,branch:pt,module:dt,untrackedFiles:ft,state:bt}=tt;if((!ct||!pt||!dt)&&bt===GitStates.DEFAULT){const mt=NoRepositoryDetected();at(mt.title,mt.body);return}if(bt===GitStates.HEAD_DETACHED){const mt=DetachedHead();at(mt.title,mt.body);return}if(dt&&(ft!=null&&ft.includes(dt))){const mt=ModuleIsNotAdded(dt);at(mt.title,mt.body);return}st&&et(),openUrl(getDeployAppUrl(tt))},[rt,et,tt]);return jsx$1(DeployModal,{onClose:et,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,{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:ot,children:"Deploy now"}),jsx$1(BaseButton,{onClick:()=>{nt.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,{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:()=>{nt.enqueue("menuClick",{label:"startTrialInDeployDialog"}),openUrl(SNOWFLAKE_TRIAL_URL)},children:"Start trial"}),jsx$1(BaseButton,{onClick:()=>{nt.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,{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:()=>{nt.enqueue("menuClick",{label:"readMoreDeployTutorialInDeployDialog"}),openUrl(STREAMLIT_DEPLOY_TUTORIAL_URL)},kind:BaseButtonKind.MINIMAL,children:"Learn more"})})})]})]})})}function StreamlitDialog(rt){switch(rt.type){case DialogType.ABOUT:return aboutDialog(rt);case DialogType.CLEAR_CACHE:return clearCacheDialog(rt);case DialogType.SETTINGS:return settingsDialog(rt);case DialogType.SCRIPT_COMPILE_ERROR:return scriptCompileErrorDialog(rt);case DialogType.THEME_CREATOR:return jsx$1(ThemeCreatorDialog,{...rt});case DialogType.WARNING:return warningDialog(rt);case DialogType.DEPLOY_DIALOG:return jsx$1(DeployDialog,{...rt});case DialogType.DEPLOY_ERROR:return deployErrorDialog(rt);case void 0:return noDialog(rt);default:return typeNotRecognizedDialog(rt)}}function aboutDialog(rt){if(rt.aboutSectionMd){const tt={overflowY:"auto",overflowX:"hidden",maxHeight:"35vh"},et=`
810
810
  `,nt=[`Made with Streamlit v${rt.sessionInfo.current.streamlitVersion}`,STREAMLIT_HOME_URL,`Copyright ${new Date().getFullYear()} Snowflake Inc. All rights reserved.`].join(et),ot=`${rt.aboutSectionMd} ${et} ${et} ${nt}`;return jsxs(Modal,{isOpen:!0,onClose:rt.onClose,children:[jsx$1(ModalHeader,{children:"About"}),jsx$1(ModalBody$1,{children:jsx$1(StyledAboutInfo,{children:jsx$1(StreamlitMarkdown$1,{source:ot,allowHTML:!1,style:tt})})})]})}return jsxs(Modal,{isOpen:!0,onClose:rt.onClose,children:[jsx$1(ModalHeader,{children:"Made with"}),jsx$1(ModalBody$1,{children:jsxs("div",{children:[rt.sessionInfo.isSet&&jsxs(Fragment,{children:["Streamlit v",rt.sessionInfo.current.streamlitVersion,jsx$1("br",{})]}),jsx$1(StyledAboutLink,{href:STREAMLIT_HOME_URL,children:STREAMLIT_HOME_URL}),jsx$1("br",{}),"Copyright ",new Date().getFullYear()," Snowflake Inc. All rights reserved."]})})]})}function clearCacheDialog(rt){const et=["**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(`
811
- `);return jsx$1("div",{"data-testid":"stClearCacheDialog",children:jsxs(Modal,{isOpen:!0,onClose:rt.onClose,children:[jsx$1(ModalHeader,{children:"Clear caches"}),jsx$1(ModalBody$1,{children:jsx$1(StreamlitMarkdown$1,{source:et,allowHTML:!1})}),jsxs(ModalFooter,{children:[jsx$1(ModalButton,{kind:BaseButtonKind.GHOST,onClick:rt.onClose,children:"Cancel"}),jsx$1(ModalButton,{autoFocus:!0,kind:BaseButtonKind.SECONDARY,onClick:rt.confirmCallback,children:"Clear caches"})]})]})})}function scriptCompileErrorDialog(rt){var tt;return jsxs(Modal,{isOpen:!0,onClose:rt.onClose,size:"auto",autoFocus:!1,children:[jsx$1(ModalHeader,{children:"Script execution error"}),jsx$1(ModalBody$1,{children:jsx$1(StreamlitSyntaxHighlighter$1,{showLineNumbers:!1,wrapLines:!1,children:(tt=rt.exception)!=null&&tt.message?rt.exception.message:"No message"})}),jsx$1(ModalFooter,{children:jsx$1(ModalButton,{kind:BaseButtonKind.SECONDARY,onClick:rt.onClose,children:"Close"})})]})}function settingsDialog(rt){return jsx$1(SettingsDialog,{...rt})}function warningDialog(rt){return jsxs(Modal,{isOpen:!0,onClose:rt.onClose,children:[jsx$1(ModalHeader,{children:rt.title}),jsx$1(ModalBody$1,{children:rt.msg})]})}function deployErrorDialog({title:rt,msg:tt,onClose:et,onContinue:nt,onTryAgain:ot}){const at=()=>{et(),nt&&nt()};return jsxs(Modal,{isOpen:!0,onClose:et,children:[jsx$1(ModalHeader,{children:rt}),jsx$1(ModalBody$1,{children:jsx$1(StyledDeployErrorContent,{children:tt})}),jsxs(ModalFooter,{children:[jsx$1(ModalButton,{kind:BaseButtonKind.GHOST,onClick:ot,children:"Try again"}),jsx$1(ModalButton,{kind:BaseButtonKind.SECONDARY,onClick:at,children:nt?"Continue anyway":"Close"})]})]})}function noDialog({onClose:rt}){return jsx$1(Modal,{isOpen:!1,onClose:rt})}function typeNotRecognizedDialog(rt){return jsx$1(Modal,{isOpen:!0,onClose:rt.onClose,children:jsx$1(ModalBody$1,{children:`Dialog type "${rt.type}" not recognized.`})})}class SessionEventDispatcher{constructor(){this.onSessionEvent=new dist.Signal}handleSessionEventMsg(tt){this.onSessionEvent.emit(tt)}}var assignValue=_assignValue,castPath$1=_castPath,isIndex=_isIndex,isObject=isObject_1,toKey=_toKey;function baseSet$1(rt,tt,et,nt){if(!isObject(rt))return rt;tt=castPath$1(tt,rt);for(var ot=-1,at=tt.length,st=at-1,ut=rt;ut!=null&&++ot<at;){var ct=toKey(tt[ot]),pt=et;if(ct==="__proto__"||ct==="constructor"||ct==="prototype")return rt;if(ot!=st){var dt=ut[ct];pt=nt?nt(dt,ct,ut):void 0,pt===void 0&&(pt=isObject(dt)?dt:isIndex(tt[ot+1])?[]:{})}assignValue(ut,ct,pt),ut=ut[ct]}return rt}var _baseSet=baseSet$1,baseGet=_baseGet,baseSet=_baseSet,castPath=_castPath;function basePickBy$1(rt,tt,et){for(var nt=-1,ot=tt.length,at={};++nt<ot;){var st=tt[nt],ut=baseGet(rt,st);et(ut,st)&&baseSet(at,castPath(st,rt),ut)}return at}var _basePickBy=basePickBy$1,basePickBy=_basePickBy,hasIn=hasIn_1;function basePick$1(rt,tt){return basePickBy(rt,tt,function(et,nt){return hasIn(rt,nt)})}var _basePick=basePick$1,basePick=_basePick,flatRest=_flatRest,pick=flatRest(function(rt,tt){return rt==null?{}:basePick(rt,tt)}),pick_1=pick;const pick$1=getDefaultExportFromCjs$1(pick_1),DEFAULT_METRICS_CONFIG="https://data.streamlit.io/metrics.json",log$2=loglevelExports$1.getLogger("MetricsManager");class MetricsManager{constructor(tt){this.initialized=!1,this.actuallySendMetrics=!1,this.metricsUrl=void 0,this.sendMessageToHost=()=>{},this.anonymousId="",this.pendingEvents=[],this.appHash="Not initialized",this.metadata={},this.setAppHash=et=>{this.appHash=et},this.setMetricsConfig=(et="")=>{this.metricsUrl=et},this.sessionInfo=tt}async initialize({gatherUsageStats:tt,sendMessageToHost:et}){this.sendMessageToHost=et,this.actuallySendMetrics=tt&&this.metricsUrl!=="off",this.getAnonymousId(),this.actuallySendMetrics&&!this.metricsUrl&&(await this.requestDefaultMetricsConfig(),this.metricsUrl||(log$2.error("Undefined metrics config - deactivating metrics tracking."),this.actuallySendMetrics=!1)),this.actuallySendMetrics&&this.sendPendingEvents(),log$2.info("Gather usage stats: ",this.actuallySendMetrics),this.initialized=!0}enqueue(tt,et={}){if(!this.initialized||!this.sessionInfo.isSet){this.pendingEvents.push([tt,et]);return}this.actuallySendMetrics&&(this.pendingEvents.length&&this.sendPendingEvents(),this.send(tt,et))}setMetadata(tt){this.metadata=tt}async requestDefaultMetricsConfig(){const tt=p$4();if(tt){const et=window.localStorage.getItem("stMetricsConfig");if(et){this.metricsUrl=et;return}}try{const et=await fetch(DEFAULT_METRICS_CONFIG,{signal:AbortSignal.timeout(5e3)});if(!et.ok)this.metricsUrl=void 0,log$2.error("Failed to fetch metrics config: ",et.status);else{const nt=await et.json();this.metricsUrl=nt.url??void 0,tt&&this.metricsUrl&&window.localStorage.setItem("stMetricsConfig",this.metricsUrl)}}catch(et){log$2.error("Failed to fetch metrics config:",et)}}send(tt,et={}){const nt=this.buildEventProto(tt,et);this.metricsUrl==="postMessage"?this.postMessageEvent(tt,nt):this.track(nt)}sendPendingEvents(){this.pendingEvents.forEach(([tt,et])=>{this.send(tt,et)}),this.pendingEvents=[]}async track(tt){const et=new Request(this.metricsUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(tt.toJSON())});await fetch(et)}postMessageEvent(tt,et){this.sendMessageToHost({type:"METRICS_EVENT",eventName:tt,data:et})}buildEventProto(tt,et){const nt=new MetricsEvent({event:tt,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,...this.getContextData()});if(tt==="menuClick")nt.label=et.label;else if(tt==="pageProfile")return new MetricsEvent({...nt,...et});return nt}getInstallationData(){return{machineIdV3:this.sessionInfo.current.installationIdV3}}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 tt="ajs_anonymous_id",et=p$4(),nt=f$3(tt),ot=et?window.localStorage.getItem(tt):null,at=new Date;if(at.setFullYear(new Date().getFullYear()+1),nt)this.anonymousId=nt,et&&window.localStorage.setItem(tt,nt);else if(ot){try{this.anonymousId=JSON.parse(ot)}catch{this.anonymousId=ot}setCookie(tt,this.anonymousId,at)}else this.anonymousId=v4(),setCookie(tt,this.anonymousId,at),et&&window.localStorage.setItem(tt,this.anonymousId)}}const StyledApp=newStyled("div",{target:"ee4bbma0"})(({theme:rt})=>{const tt=hasLightBackgroundColor(rt);return{position:"absolute",background:rt.colors.bgColor,color:rt.colors.bodyText,top:rt.spacing.none,left:rt.spacing.none,right:rt.spacing.none,bottom:rt.spacing.none,colorScheme:tt?"light":"dark",overflow:"hidden","@media print":{float:"none",height:rt.sizes.full,position:"static",overflow:"visible"}}}),StyledRecordAudioLabel=newStyled("label",{target:"ej964cx0"})({margin:0}),StyledInstruction=newStyled("p",{target:"ej964cx1"})({margin:0}),ScreencastDialog=({onClose:rt,toggleRecordAudio:tt,recordAudio:et,startRecording:nt})=>{const[ot,at]=reactExports.useState(et),st=reactExports.useCallback(ct=>{const{checked:pt}=ct.target;pt!==ot&&(at(pt),tt())},[ot,tt]),ut=reactExports.useCallback(()=>{nt(),rt()},[nt,rt]);return jsxs(Modal,{isOpen:!0,onClose:rt,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",checked:ot,onChange:st})," ","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:ut,children:"Start recording!"})})]})},StyledVideo=newStyled("video",{target:"emkt0dj0"})(({theme:rt})=>({width:rt.sizes.full,borderRadius:rt.radii.md})),StyledDialogContainer=newStyled("div",{target:"emkt0dj1"})(({theme:rt})=>({display:"flex",flexDirection:"column",width:rt.sizes.full})),StyledRow=newStyled("div",{target:"emkt0dj2"})(({theme:rt})=>({display:"flex",flexDirection:"row",paddingTop:rt.spacing.md,paddingBottom:rt.spacing.md})),StyledFirstColumn=newStyled("div",{target:"emkt0dj3"})(({theme:rt})=>({paddingRight:rt.spacing.lg,textAlign:"right",color:rt.colors.gray,fontWeight:rt.fontWeights.bold,width:"6em"})),StyledSecondColumn=newStyled("div",{target:"emkt0dj4"})(({theme:rt})=>({flex:1,paddingRight:rt.spacing.lg,marginRight:"6em",[`@media (max-width: ${rt.breakpoints.sm})`]:{marginRight:rt.spacing.none}})),StyledVideoFormatInstructions=newStyled("p",{target:"emkt0dj5"})(({theme:rt})=>({marginTop:rt.spacing.sm,marginBottom:rt.spacing.none,fontSize:rt.fontSizes.sm})),StyledDownloadButtonContainer=newStyled("div",{target:"emkt0dj6"})(({theme:rt})=>({marginTop:rt.spacing.twoXS})),VideoRecordedDialog=({onClose:rt,videoBlob:tt,fileName:et})=>{const nt=URL.createObjectURL(tt),ot=()=>{const at=document.createElement("a");at.setAttribute("href",nt),at.setAttribute("download",`${et}.webm`),at.click(),rt()};return jsxs(Modal,{isOpen:!0,onClose:rt,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:nt,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:ot,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=newStyled("div",{target:"e1o5y2010"})({display:"flex"}),StyledUnsupportedScreenCastIcon=newStyled("div",{target:"e1o5y2011"})(({theme:rt})=>({display:"flex",alignItems:"center",justifyItems:"center",marginRight:rt.spacing.twoXL,marginLeft:rt.spacing.sm,fontSize:rt.fontSizes.fourXL})),StyledUnsupportedScreenCastExplanation=newStyled("p",{target:"e1o5y2012"})(({theme:rt})=>({margin:rt.spacing.none})),UnsupportedBrowserDialog=({onClose:rt})=>jsxs(Modal,{isOpen:!0,onClose:rt,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),screencastCounterAnimation=keyframes("0%{opacity:0;}25%{opacity:1;}100%{opacity:0;}"),StyledCountdown=newStyled("div",{target:"evez3ra0"})(({theme:rt})=>({position:"fixed",display:"flex",justifyContent:"center",alignItems:"center",top:0,left:0,width:rt.sizes.full,height:rt.sizes.full,fontSize:"40vh",color:rt.colors.red,fontWeight:rt.fontWeights.bold,opacity:"0.8",textShadow:`1px 1px 10px ${rt.colors.darkGray}`,transition:"opacity 0.3s ease-in-out",animation:`${screencastCounterAnimation} 1s`})),Countdown=({countdown:rt,endCallback:tt})=>{const[et,nt]=reactExports.useState(rt);return jsx$1(StyledCountdown,{"data-testid":"stCountdown",onAnimationEnd:()=>{const at=et-1;at>=0&&nt(at),at===0&&tt()},children:jsx$1("span",{children:et})},`frame${et}`)},log$1=loglevelExports$1.getLogger("withScreencast");function withScreencast(rt){const tt=et=>{const{testOverride:nt}=et,ot=reactExports.useRef(null),[at,st]=reactExports.useState("streamlit-screencast"),[ut,ct]=reactExports.useState(!1),[pt,dt]=reactExports.useState(void 0),[ft,bt]=reactExports.useState(nt||"OFF"),ht=reactExports.useCallback(()=>{ct(Et=>!Et)},[]),mt=reactExports.useCallback(async()=>{if(!(ft==="OFF"||m$4(ot.current))){if(ft==="COUNTDOWN"){bt("OFF");return}if(ft==="RECORDING"){const Et=ot.current;if(!Et||Et.getState()==="inactive")bt("OFF");else{const zt=await Et.stop();dt(zt),bt("PREVIEW_FILE")}}}},[ft]),Ot=reactExports.useCallback(async()=>{if(!ScreenCastRecorder.isSupportedBrowser()){bt("UNSUPPORTED");return}ot.current=new ScreenCastRecorder({recordAudio:ut,onErrorOrStop:()=>{mt().catch(Et=>log$1.warn(`withScreencast.stopRecording threw an error: ${Et}`))}});try{await ot.current.initialize()}catch(Et){log$1.warn(`ScreenCastRecorder.initialize error: ${Et}`),bt("UNSUPPORTED");return}bt("COUNTDOWN")},[ut,mt]),yt=reactExports.useCallback(Et=>{if(!ScreenCastRecorder.isSupportedBrowser()){bt("UNSUPPORTED");return}if(ft==="OFF"){st(Et),bt("SETUP");return}mt().catch(zt=>log$1.warn(`withScreencast.stopRecording threw an error: ${zt}`))},[ft,mt]),Mt=reactExports.useCallback(async()=>{if(m$4(ot.current))throw new Error("Countdown finished but recorder is null");ot.current.start()?bt("RECORDING"):mt().catch(zt=>log$1.warn(`withScreencast.stopRecording threw an error: ${zt}`))},[mt]),At=reactExports.useCallback(()=>{bt("OFF")},[]);return jsxs("div",{className:"withScreencast","data-testid":"stScreencast",children:[jsx$1(rt,{...et,screenCast:{currentState:ft,toggleRecordAudio:ht,startRecording:yt,stopRecording:mt}}),ft==="UNSUPPORTED"&&jsx$1(UnsupportedBrowserDialog$1,{onClose:At}),ft==="SETUP"&&jsx$1(ScreencastDialog,{recordAudio:ut,onClose:At,startRecording:Ot,toggleRecordAudio:ht}),ft==="COUNTDOWN"&&jsx$1(Countdown,{countdown:3,endCallback:Mt}),ft==="PREVIEW_FILE"&&pt&&jsx$1(VideoRecordedDialog,{onClose:At,videoBlob:pt,fileName:at})]})};return tt.displayName=`withScreencast(${rt.displayName||rt.name||"Component"})`,hoistNonReactStatics$2(tt,rt)}const showDevelopmentOptions=(rt,tt)=>tt==Config.ToolbarMode.DEVELOPER?!0:Config.ToolbarMode.VIEWER==tt||Config.ToolbarMode.MINIMAL==tt?!1:rt||isLocalhost();function getTitle(rt){return rt||"Streamlit"}class StrategyV1{constructor(tt){this.appNav=tt,this.appPages=[],this.currentPageScriptHash=null,this.hideSidebarNav=null}handleNewSession(tt){var st,ut;this.appPages=tt.appPages,this.currentPageScriptHash=tt.pageScriptHash,this.hideSidebarNav=((st=tt.config)==null?void 0:st.hideSidebarNav)??!1;const et=this.appPages[0],nt=et.urlPathname??"",ot=((ut=this.appPages.find(ct=>ct.pageScriptHash===this.currentPageScriptHash))==null?void 0:ut.urlPathname)??"",at=et.pageScriptHash===this.currentPageScriptHash;return this.appNav.onUpdatePageUrl(nt,ot,at),document.title=getTitle(ot??""),[{hideSidebarNav:this.hideSidebarNav,appPages:this.appPages,currentPageScriptHash:this.currentPageScriptHash},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_APP_PAGES",appPages:this.appPages}),this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:at?"":ot,currentPageScriptHash:this.currentPageScriptHash})}]}handlePagesChanged(tt){const{appPages:et}=tt;return[{appPages:et},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_APP_PAGES",appPages:et})}]}handlePageNotFound(tt){var ot;const{pageName:et}=tt;this.appNav.onPageNotFound(et);const nt=((ot=this.appPages[0])==null?void 0:ot.pageScriptHash)??"";return this.currentPageScriptHash=nt,[{currentPageScriptHash:nt},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:"",currentPageScriptHash:nt})}]}handleNavigation(tt){}findPageByUrlPath(tt){return this.appPages.length===0?null:this.appPages.find(et=>tt.endsWith("/"+et.urlPathname))??this.appPages[0]}clearPageElements(tt,et,nt){return AppRoot.empty(et,!1,nt,tt.logo)}}class StrategyV2{constructor(tt){this.appNav=tt,this.mainScriptHash=null,this.appPages=[],this.mainPage=null,this.hideSidebarNav=null}handleNewSession(tt){var et;return this.mainScriptHash=tt.mainScriptHash,this.hideSidebarNav===null&&(this.hideSidebarNav=((et=tt.config)==null?void 0:et.hideSidebarNav)??null),document.title=getTitle(""),[{hideSidebarNav:this.hideSidebarNav??!1},()=>{}]}handlePagesChanged(tt){}handlePageNotFound(tt){const{pageName:et}=tt;return this.appNav.onPageNotFound(et),[{currentPageScriptHash:this.mainScriptHash??""},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:"",currentPageScriptHash:this.mainScriptHash??""})}]}handleNavigation(tt){const{sections:et,position:nt,appPages:ot}=tt;this.appPages=ot,this.hideSidebarNav=nt===Navigation.Position.HIDDEN;const at=tt.pageScriptHash,st=ot.find(pt=>pt.pageScriptHash===at),ut=ot.find(pt=>pt.isDefault);this.mainPage=ut;const ct=st.urlPathname;if(!this.appNav.isPageTitleSet){const pt=getTitle(st.pageName);document.title=pt,this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_PAGE_TITLE",title:st.pageName??""})}return!this.appNav.isPageIconSet&&st.icon&&this.appNav.onPageIconChange(st.icon),this.appNav.onUpdatePageUrl(ut.urlPathname??"",ct,st.isDefault??!1),[{appPages:ot,navSections:et,hideSidebarNav:this.hideSidebarNav,expandSidebarNav:tt.expanded,currentPageScriptHash:at},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_APP_PAGES",appPages:ot}),this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:st.isDefault?"":ct,currentPageScriptHash:at})}]}findPageByUrlPath(tt){return this.appPages.find(et=>tt.endsWith("/"+et.urlPathname))??this.mainPage}clearPageElements(tt,et,nt){return tt.filterMainScriptElements(et)}}class AppNavigation{constructor(tt,et,nt,ot){this.hostCommunicationMgr=tt,this.onUpdatePageUrl=et,this.onPageNotFound=nt,this.onPageIconChange=ot,this.isPageIconSet=!1,this.isPageTitleSet=!1,this.strategy=new StrategyV1(this)}handleNewSession(tt){return this.isPageTitleSet=!1,this.isPageIconSet=!1,this.strategy.handleNewSession(tt)}handleNavigation(tt){return this.strategy instanceof StrategyV1&&(this.strategy=new StrategyV2(this)),this.strategy.handleNavigation(tt)}handlePagesChanged(tt){return this.strategy.handlePagesChanged(tt)}handlePageNotFound(tt){return this.strategy.handlePageNotFound(tt)}findPageByUrlPath(tt){return this.strategy.findPageByUrlPath(tt)}handlePageConfigChanged(tt){this.isPageIconSet=!!tt.favicon,this.isPageTitleSet=!!tt.title}clearPageElements(tt,et,nt){return this.strategy.clearPageElements(tt,et,nt)}}var define_PACKAGE_METADATA_default={version:"1.42.0"};const ELEMENT_LIST_BUFFER_TIMEOUT_MS=10,INITIAL_SCRIPT_RUN_ID="<null>",log=loglevelExports$1.getLogger("App");class App extends reactExports.PureComponent{constructor(tt){super(tt),this.sessionInfo=new SessionInfo,this.metricsMgr=new MetricsManager(this.sessionInfo),this.sessionEventDispatcher=new SessionEventDispatcher,this.embeddingId=generateUID$2(),this.showDeployError=(nt,ot,at)=>{this.openDialog({type:DialogType.DEPLOY_ERROR,title:nt,msg:ot,onContinue:at,onClose:()=>{},onTryAgain:this.sendLoadGitInfoBackMsg})},this.handleThemeMessage=(nt,ot)=>{const[,at,st]=createPresetThemes(),ut=isPresetTheme(this.props.theme.activeTheme);nt===at.name&&ut?this.props.theme.setTheme(at):nt===st.name&&ut?this.props.theme.setTheme(st):ot&&this.props.theme.setImportedTheme(ot)},this.handleConnectionStateChanged=nt=>{if(log.info(`Connection state changed from ${this.state.connectionState} to ${nt}`),nt===ConnectionState.CONNECTED){log.info("Reconnected to server.");const ot=this.state.scriptRunState===ScriptRunState.RERUN_REQUESTED||this.state.scriptRunState===ScriptRunState.RUNNING;(!this.sessionInfo.last||ot)&&(log.info("Requesting a script run."),this.widgetMgr.sendUpdateWidgetsMessage(void 0),this.setState({dialog:null})),this.hostCommunicationMgr.sendMessageToHost({type:"WEBSOCKET_CONNECTED"})}else this.state.connectionState===ConnectionState.CONNECTED&&this.hostCommunicationMgr.sendMessageToHost({type:"WEBSOCKET_DISCONNECTED",attemptingToReconnect:nt!==ConnectionState.DISCONNECTED_FOREVER}),this.sessionInfo.isSet&&this.sessionInfo.clearCurrent();this.setState({connectionState:nt})},this.handleGitInfoChanged=nt=>{this.setState({gitInfo:nt})},this.handleCustomParentMessage=nt=>{this.state.appConfig.enableCustomParentMessages?this.hostCommunicationMgr.sendMessageToHost({type:"CUSTOM_PARENT_MESSAGE",message:nt.message}):log.error("Sending messages to the host is disabled in line with the platform policy.")},this.handleMessage=nt=>{const ot=(at,st,ut)=>{const ct=at[st];if(ct in ut)return ut[ct](at[ct]);throw new Error(`Cannot handle ${st} "${ct}".`)};try{ot(nt,"type",{newSession:at=>this.handleNewSession(at),sessionStatusChanged:at=>this.handleSessionStatusChanged(at),sessionEvent:at=>this.handleSessionEvent(at),delta:at=>this.handleDeltaMsg(at,nt.metadata),pageConfigChanged:at=>this.handlePageConfigChanged(at),pageInfoChanged:at=>this.handlePageInfoChanged(at),pagesChanged:at=>this.handlePagesChanged(at),pageNotFound:at=>this.handlePageNotFound(at),gitInfoChanged:at=>this.handleGitInfoChanged(at),scriptFinished:at=>this.handleScriptFinished(at),pageProfile:at=>this.handlePageProfileMsg(at),autoRerun:at=>this.handleAutoRerun(at),fileUrlsResponse:at=>this.uploadClient.onFileURLsResponse(at),parentMessage:at=>this.handleCustomParentMessage(at),logo:at=>this.handleLogo(at,nt.metadata),navigation:at=>this.handleNavigation(at),authRedirect:at=>{isInChildFrame()?this.hostCommunicationMgr.sendMessageToSameOriginHost({type:"REDIRECT_TO_URL",url:at.url}):window.location.href=at.url}})}catch(at){const st=ensureError(at);log.error(st),this.showError("Bad message format",st.message)}},this.handleLogo=(nt,ot)=>{const at={activeScriptHash:ot.activeScriptHash,scriptRunId:this.state.scriptRunId};this.setState({elements:this.pendingElementsBuffer.appRootWithLogo(nt,at)},()=>{this.pendingElementsBuffer=this.state.elements})},this.handlePageConfigChanged=nt=>{const{title:ot,favicon:at,layout:st,initialSidebarState:ut,menuItems:ct}=nt;this.appNavigation.handlePageConfigChanged(nt),ot&&(this.hostCommunicationMgr.sendMessageToHost({type:"SET_PAGE_TITLE",title:ot}),document.title=ot),at&&this.onPageIconChanged(at),st!==this.state.layout&&this.setState(pt=>({layout:st,userSettings:{...pt.userSettings,wideMode:st===PageConfig.Layout.WIDE}})),ut!==this.state.initialSidebarState&&this.setState(()=>({initialSidebarState:ut})),this.setState({menuItems:ct})},this.handlePageInfoChanged=nt=>{const{queryString:ot}=nt,at=document.location.pathname+(ot?`?${ot}`:"");window.history.pushState({},"",at),this.hostCommunicationMgr.sendMessageToHost({type:"SET_QUERY_PARAM",queryParams:ot?`?${ot}`:""})},this.onPageNotFound=nt=>{const ot=nt?`You have requested page /${nt}, 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",`${ot}. Running the app's main page.`)},this.handlePageNotFound=nt=>{this.maybeSetState(this.appNavigation.handlePageNotFound(nt))},this.onPageIconChanged=nt=>{handleFavicon(nt,this.hostCommunicationMgr.sendMessageToHost,this.endpoints)},this.handlePagesChanged=nt=>{this.maybeSetState(this.appNavigation.handlePagesChanged(nt))},this.handleNavigation=nt=>{this.maybeSetState(this.appNavigation.handleNavigation(nt))},this.handlePageProfileMsg=nt=>{var st,ut,ct;const ot=PageProfile.toObject(nt),at=getBrowserInfo();this.metricsMgr.enqueue("pageProfile",{...ot,isFragmentRun:!!ot.isFragmentRun,appId:this.sessionInfo.current.appId,numPages:(st=this.state.appPages)==null?void 0:st.length,sessionId:this.sessionInfo.current.sessionId,pythonVersion:this.sessionInfo.current.pythonVersion,pageScriptHash:this.state.currentPageScriptHash,activeTheme:(ct=(ut=this.props.theme)==null?void 0:ut.activeTheme)==null?void 0:ct.name,totalLoadTime:Math.round((performance.now()-this.state.latestRunTime)*1e3),browserInfo:at})},this.handleAutoRerun=nt=>{const ot=setInterval(()=>{this.widgetMgr.sendUpdateWidgetsMessage(nt.fragmentId,!0)},nt.interval*1e3);this.setState(at=>({autoReruns:[...at.autoReruns,ot]}))},this.handleSessionStatusChanged=nt=>{this.setState(ot=>{let{scriptRunState:at}=ot,{dialog:st}=ot;return nt.scriptIsRunning&&ot.scriptRunState!==ScriptRunState.STOP_REQUESTED?(at=ScriptRunState.RUNNING,d$3(st)&&st.type===DialogType.SCRIPT_COMPILE_ERROR&&(st=void 0)):!nt.scriptIsRunning&&ot.scriptRunState!==ScriptRunState.RERUN_REQUESTED&&ot.scriptRunState!==ScriptRunState.COMPILATION_ERROR&&(at=ScriptRunState.NOT_RUNNING),{userSettings:{...ot.userSettings,runOnSave:!!nt.runOnSave},dialog:st,scriptRunState:at}})},this.handleSessionEvent=nt=>{if(this.sessionEventDispatcher.handleSessionEventMsg(nt),nt.type==="scriptCompilationException"){this.setState({scriptRunState:ScriptRunState.COMPILATION_ERROR});const ot={type:DialogType.SCRIPT_COMPILE_ERROR,exception:nt.scriptCompilationException,onClose:()=>{}};this.openDialog(ot)}},this.maybeUpdatePageUrl=(nt,ot,at)=>{const st=this.getBaseUriParts();if(st){const{pathname:ut}=st,ct=extractPageNameFromPathName(document.location.pathname,ut);if((ct===""?nt:ct)!==ot){const dt=at?"":ot,ft=preserveEmbedQueryParams(),bt=ft?`?${ft}`:"",mt=`${ut==="/"?"":ut}/${dt}${bt}`;window.history.pushState({},"",mt)}}},this.handleNewSession=nt=>{const ot=nt.initialize;if(this.hasStreamlitVersionChanged(ot)){window.location.reload();return}this.sessionInfo.isSet||this.handleOneTimeInitialization(nt);const{appHash:at,currentPageScriptHash:st}=this.state,{scriptRunId:ut,name:ct,mainScriptPath:pt,fragmentIdsThisRun:dt,pageScriptHash:ft,mainScriptHash:bt}=nt;if(dt.length)this.setState({fragmentIdsThisRun:dt,latestRunTime:performance.now()});else{this.cleanupAutoReruns();const mt=nt.config,Ot=nt.customTheme;this.processThemeInput(Ot),this.setState({allowRunOnSave:mt.allowRunOnSave,hideTopBar:mt.hideTopBar,toolbarMode:mt.toolbarMode,latestRunTime:performance.now(),mainScriptHash:bt,fragmentIdsThisRun:dt}),this.maybeSetState(this.appNavigation.handleNewSession(nt)),this.onPageIconChanged("./favicon.png")}const ht=hashString(this.sessionInfo.current.installationId+pt);this.metricsMgr.setMetadata(this.state.deployedAppMetadata),this.metricsMgr.setAppHash(ht),this.metricsMgr.enqueue("updateReport"),at===ht&&st===ft?this.setState({scriptRunId:ut}):this.clearAppState(ht,ut,ct,bt)},this.handleOneTimeInitialization=nt=>{const ot=nt.initialize,at=nt.config;this.sessionInfo.setCurrent(SessionInfo.propsFromNewSessionMessage(nt)),this.metricsMgr.initialize({gatherUsageStats:at.gatherUsageStats,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost}),this.handleSessionStatusChanged(ot.sessionStatus)},this.onHistoryChange=()=>{const{currentPageScriptHash:nt}=this.state,ot=this.appNavigation.findPageByUrlPath(document.location.pathname),at=document.location.toString().includes("#"),st=(ot==null?void 0:ot.pageScriptHash)===nt;m$4(ot)||at&&st||this.onPageChange(ot.pageScriptHash)},this.setAndSendTheme=nt=>{this.props.theme.setTheme(nt),this.setState({hideColoredLine:!isPresetTheme(nt)}),this.hostCommunicationMgr.sendMessageToHost({type:"SET_THEME_CONFIG",themeInfo:toExportedTheme(nt.emotion)})},this.createThemeHash=nt=>{if(!nt)return"hash_for_undefined_custom_theme";const ot=Object.entries(nt);return ot.sort(),hashString(ot.join(":"))},this.closeDialog=()=>{this.setState({dialog:void 0})},this.saveSettings=nt=>{const{runOnSave:ot}=this.state.userSettings,{runOnSave:at}=nt;if(this.setState({userSettings:nt}),ot!==at&&this.isServerConnected()){const st=new BackMsg$1({setRunOnSave:at});st.type="setRunOnSave",this.sendBackMsg(st)}},this.handleDeltaMsg=(nt,ot)=>{if(this.pendingElementsBuffer=this.pendingElementsBuffer.applyDelta(this.state.scriptRunId,nt,ot),!this.pendingElementsTimerRunning){this.pendingElementsTimerRunning=!0;const at=this.state.scriptRunState===ScriptRunState.RUNNING;setTimeout(()=>{this.pendingElementsTimerRunning=!1,at&&this.setState({elements:this.pendingElementsBuffer})},ELEMENT_LIST_BUFFER_TIMEOUT_MS)}},this.debugShutdownRuntime=()=>{if(this.isServerConnected()){const nt=new BackMsg$1({debugShutdownRuntime:!0});nt.type="debugShutdownRuntime",this.sendBackMsg(nt)}},this.debugDisconnectWebsocket=()=>{if(this.isServerConnected()){const nt=new BackMsg$1({debugDisconnectWebsocket:!0});nt.type="debugDisconnectWebsocket",this.sendBackMsg(nt)}},this.debugClearForwardMsgCache=()=>{var nt,ot;isLocalhost()&&((ot=(nt=this.connectionManager)==null?void 0:nt.websocketConnection)==null||ot.cache.messages.clear())},this.cleanupAutoReruns=()=>{this.state.autoReruns.forEach(nt=>{clearInterval(nt)}),this.setState({autoReruns:[]})},this.rerunScript=(nt=!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}),nt===!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$1({loadGitInfo:!0}))},this.onPageChange=nt=>{const{elements:ot,mainScriptHash:at}=this.state;this.cleanupAutoReruns();const st=this.appNavigation.clearPageElements(ot,at,void 0),ut=new Set(Array.from(st.getElements()).map(ct=>getElementId(ct)).filter(notUndefined));this.sendRerunBackMsg(this.widgetMgr.getActiveWidgetStates(ut),void 0,nt)},this.isAppInReadyState=nt=>this.state.connectionState===ConnectionState.CONNECTED&&this.state.scriptRunState===ScriptRunState.NOT_RUNNING&&nt.scriptRunState===ScriptRunState.RUNNING&&nt.connectionState===ConnectionState.CONNECTED,this.sendRerunBackMsg=(nt,ot,at,st)=>{const ut=this.getBaseUriParts();if(!ut){log.error("Cannot send rerun backMessage when disconnected from server.");return}const{currentPageScriptHash:ct}=this.state,{pathname:pt}=ut;let dt=this.getQueryString(),ft="";at?at!=ct&&(dt=preserveEmbedQueryParams(),this.hostCommunicationMgr.sendMessageToHost({type:"SET_QUERY_PARAM",queryParams:dt})):ct?at=ct:(ft=extractPageNameFromPathName(document.location.pathname,pt),at=""),this.sendBackMsg(new BackMsg$1({rerunScript:{queryString:dt,widgetStates:nt,pageScriptHash:at,pageName:ft,fragmentId:ot,isAutoRerun:st}}))},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 nt=new BackMsg$1({stopScript:!0});nt.type="stopScript",this.sendBackMsg(nt),this.setState({scriptRunState:ScriptRunState.STOP_REQUESTED})},this.openClearCacheDialog=()=>{if(this.isServerConnected()){const nt={type:DialogType.CLEAR_CACHE,confirmCallback:this.clearCache,defaultAction:this.clearCache,onClose:()=>{}};this.openDialog(nt)}else log.error("Cannot clear cache: disconnected from server")},this.openDeployDialog=()=>{var ot;const nt={type:DialogType.DEPLOY_DIALOG,onClose:this.closeDialog,showDeployError:this.showDeployError,isDeployErrorModalOpen:((ot=this.state.dialog)==null?void 0:ot.type)===DialogType.DEPLOY_ERROR,metricsMgr:this.metricsMgr};this.openDialog(nt)},this.openThemeCreatorDialog=()=>{this.metricsMgr.enqueue("menuClick",{label:"editTheme"});const nt={type:DialogType.THEME_CREATOR,backToSettings:this.settingsCallback,onClose:this.closeDialog,metricsMgr:this.metricsMgr};this.openDialog(nt)},this.clearCache=()=>{if(this.closeDialog(),this.isServerConnected()){const nt=new BackMsg$1({clearCache:!0});nt.type="clearCache",this.sendBackMsg(nt)}else log.error("Cannot clear cache: disconnected from server")},this.sendAppHeartbeat=()=>{if(this.isServerConnected()){const nt=new BackMsg$1({appHeartbeat:!0});nt.type="appHeartbeat",this.sendBackMsg(nt)}else log.error("Cannot send app heartbeat: disconnected from server")},this.sendBackMsg=nt=>{this.connectionManager?(log.info(nt),this.connectionManager.sendMessage(nt)):log.error(`Not connected. Cannot send back message: ${nt}`)},this.handleConnectionError=nt=>{this.showError("Connection error",nt)},this.isServerConnected=()=>this.connectionManager?this.connectionManager.isConnected():!1,this.settingsCallback=(nt=!0)=>{const ot={type:DialogType.SETTINGS,isServerConnected:this.isServerConnected(),settings:this.state.userSettings,allowRunOnSave:this.state.allowRunOnSave,onSave:this.saveSettings,onClose:()=>{},developerMode:showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode),openThemeCreator:this.openThemeCreatorDialog,animateModal:nt,metricsMgr:this.metricsMgr};this.openDialog(ot)},this.aboutCallback=()=>{const{menuItems:nt}=this.state,ot={type:DialogType.ABOUT,sessionInfo:this.sessionInfo,onClose:this.closeDialog,aboutSectionMd:nt==null?void 0:nt.aboutSectionMd};this.openDialog(ot)},this.printCallback=()=>{const{scriptRunState:nt}=this.state;if(nt!==ScriptRunState.NOT_RUNNING){setTimeout(this.printCallback,500);return}let ot;try{const at=getIFrameEnclosingApp(this.embeddingId);at&&at.contentWindow?ot=at.contentWindow.window:ot=window}catch{ot=window}finally{ot||(ot=window),ot.print()}},this.screencastCallback=()=>{const{scriptName:nt}=this.state,{startRecording:ot}=this.props.screenCast,at=hooks().format("YYYY-MM-DD-HH-MM-SS");ot(`streamlit-${nt}-${at}`)},this.handleFullScreen=nt=>{this.setState({isFullScreen:nt})},this.setLibConfig=nt=>{this.setState({libConfig:nt})},this.setAppConfig=nt=>{this.setState({appConfig:nt})},this.addScriptFinishedHandler=nt=>{this.setState((ot,at)=>({scriptFinishedHandlers:ot.scriptFinishedHandlers.concat(nt)}))},this.removeScriptFinishedHandler=nt=>{this.setState((ot,at)=>({scriptFinishedHandlers:without$1(ot.scriptFinishedHandlers,nt)}))},this.getBaseUriParts=()=>this.connectionManager?this.connectionManager.getBaseUriParts():void 0,this.getQueryString=()=>{const{queryParams:nt}=this.state,ot=nt&&nt.length>0?nt:document.location.search;return ot.startsWith("?")?ot.substring(1):ot},this.isInCloudEnvironment=()=>{const{hostMenuItems:nt}=this.state;return nt&&(nt==null?void 0:nt.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=(nt,ot)=>{if(this.isServerConnected()){const at=new BackMsg$1({fileUrlsRequest:{requestId:nt,fileNames:ot.map(st=>st.name),sessionId:this.sessionInfo.current.sessionId}});at.type="fileUrlsRequest",this.sendBackMsg(at)}},this.handleKeyDown=nt=>{switch(nt){case"c":showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode)&&this.openClearCacheDialog();break;case"r":this.rerunScript();break}},this.handleKeyUp=nt=>{nt==="esc"&&this.props.screenCast.stopRecording()},J$1();let et=this.createThemeHash();isPresetTheme(tt.theme.activeTheme)||(et=this.createThemeHash(toThemeInput(tt.theme.activeTheme.emotion))),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},layout:PageConfig.Layout.CENTERED,initialSidebarState:PageConfig.SidebarState.AUTO,menuItems:void 0,allowRunOnSave:!0,scriptFinishedHandlers:[],themeHash:et,gitInfo:null,formsData:createFormsData(),appPages:[],navSections:[],currentPageScriptHash:"",mainScriptHash:"",hideTopBar:!0,hideSidebarNav:!0,hideColoredLine:!1,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},this.connectionManager=null,this.widgetMgr=new WidgetStateManager({sendRerunBackMsg:this.sendRerunBackMsg,formsDataChanged:nt=>this.setState({formsData:nt})}),this.hostCommunicationMgr=new HostCommunicationManager({streamlitExecutionStartedAt:tt.streamlitExecutionStartedAt,sendRerunBackMsg:this.sendRerunBackMsg,closeModal:this.closeDialog,stopScript:this.stopScript,rerunScript:this.rerunScript,clearCache:this.clearCache,sendAppHeartbeat:this.sendAppHeartbeat,setInputsDisabled:nt=>{this.setState({inputsDisabled:nt})},themeChanged:this.handleThemeMessage,pageChanged:this.onPageChange,isOwnerChanged:nt=>this.setState({isOwner:nt}),fileUploadClientConfigChanged:nt=>{this.endpoints.setFileUploadClientConfig!==void 0&&this.endpoints.setFileUploadClientConfig(nt)},hostMenuItemsChanged:nt=>{this.setState({hostMenuItems:nt})},hostToolbarItemsChanged:nt=>{this.setState({hostToolbarItems:nt})},hostHideSidebarNavChanged:nt=>{this.setState({hostHideSidebarNav:nt})},sidebarChevronDownshiftChanged:nt=>{this.setState({sidebarChevronDownshift:nt})},pageLinkBaseUrlChanged:nt=>{this.setState({pageLinkBaseUrl:nt})},queryParamsChanged:nt=>{this.setState({queryParams:nt})},deployedAppMetadataChanged:nt=>{this.setState({deployedAppMetadata:nt})},restartWebsocketConnection:()=>{this.connectionManager||this.initializeConnectionManager()},terminateWebsocketConnection:()=>{var nt;(nt=this.connectionManager)==null||nt.disconnect(),this.connectionManager=null}}),this.endpoints=new DefaultStreamlitEndpoints({getServerUri:this.getBaseUriParts,csrfEnabled:!0}),this.uploadClient=new FileUploadClient({sessionInfo:this.sessionInfo,endpoints:this.endpoints,formsWithPendingRequestsChanged:nt=>this.widgetMgr.setFormsWithUploadsInProgress(nt),requestFileURLs:this.requestFileURLs}),this.componentRegistry=new ComponentRegistry(this.endpoints),this.pendingElementsTimerRunning=!1,this.pendingElementsBuffer=this.state.elements,this.appNavigation=new AppNavigation(this.hostCommunicationMgr,this.maybeUpdatePageUrl,this.onPageNotFound,this.onPageIconChanged),window.streamlitDebug={clearForwardMsgCache:this.debugClearForwardMsgCache,disconnectWebsocket:this.debugDisconnectWebsocket,shutdownRuntime:this.debugShutdownRuntime}}initializeConnectionManager(){this.connectionManager=new ConnectionManager({getLastSessionId:()=>{var tt;return(tt=this.sessionInfo.last)==null?void 0:tt.sessionId},endpoints:this.endpoints,onMessage:this.handleMessage,onConnectionError:this.handleConnectionError,connectionStateChanged:this.handleConnectionStateChanged,claimHostAuthToken:this.hostCommunicationMgr.claimAuthToken,resetHostAuthToken:this.hostCommunicationMgr.resetAuthToken,onHostConfigResp:tt=>{const{allowedOrigins:et,useExternalAuthToken:nt,disableFullscreenMode:ot,enableCustomParentMessages:at,mapboxToken:st,enforceDownloadInNewTab:ut,metricsUrl:ct}=tt,pt={allowedOrigins:et,useExternalAuthToken:nt,enableCustomParentMessages:at},dt={mapboxToken:st,disableFullscreenMode:ot,enforceDownloadInNewTab:ut};this.metricsMgr.setMetricsConfig(ct),this.hostCommunicationMgr.setAllowedOrigins(pt),this.setAppConfig(pt),this.setLibConfig(dt)}})}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 tt=document.querySelectorAll("[data-iframe-height]"),et=Array.from(tt).map(nt=>Math.ceil(nt.getBoundingClientRect().bottom));return Math.max(0,...et)}},__vitePreload(()=>import("./iframeResizer.contentWindow.BBjdpeP0.js").then(tt=>tt.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(tt,et){window.prerenderReady===!1&&this.isAppInReadyState(et)&&(window.prerenderReady=!0),this.state.scriptRunState!==et.scriptRunState&&(mark(this.state.scriptRunState),this.state.scriptRunState===ScriptRunState.NOT_RUNNING&&measure("script-run-cycle",ScriptRunState.RUNNING,ScriptRunState.NOT_RUNNING),this.hostCommunicationMgr.sendMessageToHost({type:"SCRIPT_RUN_STATE_CHANGED",scriptRunState:this.state.scriptRunState}))}componentWillUnmount(){var tt;(tt=this.connectionManager)==null||tt.disconnect(),this.hostCommunicationMgr.closeHostCommunication(),window.removeEventListener("popstate",this.onHistoryChange,!1)}showError(tt,et){log.error(et);const nt={type:DialogType.WARNING,title:tt,msg:jsx$1(StreamlitMarkdown$1,{source:et,allowHTML:!1}),onClose:()=>{}};this.openDialog(nt)}hasStreamlitVersionChanged(tt){var nt;let et;if(((nt=window.__streamlit)==null?void 0:nt.ENABLE_RELOAD_BASED_ON_HARDCODED_STREAMLIT_VERSION)===!0?et=define_PACKAGE_METADATA_default.version:this.sessionInfo.isSet&&(et=this.sessionInfo.current.streamlitVersion),et){const{environmentInfo:ot}=tt;if(d$3(ot)&&d$3(ot.streamlitVersion))return et!=ot.streamlitVersion}return!1}maybeSetState(tt){if(tt){const[et,nt]=tt;this.setState(et,nt)}}processThemeInput(tt){const et=this.createThemeHash(tt);if(et===this.state.themeHash)return;this.setState({themeHash:et});const nt=!isPresetTheme(this.props.theme.activeTheme);if(tt){const ot=createTheme(CUSTOM_THEME_NAME,tt);this.props.theme.addThemes([ot]),(getCachedTheme()===null||nt)&&this.setAndSendTheme(ot)}else this.props.theme.addThemes([]),nt&&this.setAndSendTheme(getHostSpecifiedTheme())}handleScriptFinished(tt){if(tt===ForwardMsg$1.ScriptFinishedStatus.FINISHED_SUCCESSFULLY||tt===ForwardMsg$1.ScriptFinishedStatus.FINISHED_EARLY_FOR_RERUN||tt===ForwardMsg$1.ScriptFinishedStatus.FINISHED_FRAGMENT_RUN_SUCCESSFULLY){if(window.setTimeout(()=>{this.state.scriptFinishedHandlers.map(et=>et())},0),tt===ForwardMsg$1.ScriptFinishedStatus.FINISHED_SUCCESSFULLY||tt===ForwardMsg$1.ScriptFinishedStatus.FINISHED_FRAGMENT_RUN_SUCCESSFULLY){this.setState(({scriptRunId:nt,fragmentIdsThisRun:ot})=>({elements:this.pendingElementsBuffer.clearStaleNodes(nt,ot)}),()=>{this.pendingElementsBuffer=this.state.elements});const et=new Set(Array.from(this.state.elements.getElements()).map(nt=>getElementId(nt)).filter(notUndefined));this.widgetMgr.removeInactive(et)}this.connectionManager!==null&&tt!==ForwardMsg$1.ScriptFinishedStatus.FINISHED_EARLY_FOR_RERUN&&this.sessionInfo.isSet&&this.connectionManager.incrementMessageCacheRunCount(this.sessionInfo.current.maxCachedMessageAge)}}clearAppState(tt,et,nt,ot){const{hideSidebarNav:at,elements:st}=this.state,ut=at&&st.sidebar||void 0;this.setState({scriptRunId:et,scriptName:nt,appHash:tt,elements:this.appNavigation.clearPageElements(this.pendingElementsBuffer,ot,ut)},()=>{this.pendingElementsBuffer=this.state.elements;const ct=new Set(Array.from(this.state.elements.getElements()).map(pt=>getElementId(pt)).filter(notUndefined));this.widgetMgr.removeInactive(ct)})}openDialog(tt){this.setState({dialog:tt})}render(){const{allowRunOnSave:tt,connectionState:et,dialog:nt,elements:ot,initialSidebarState:at,menuItems:st,isFullScreen:ut,scriptRunId:ct,scriptRunState:pt,userSettings:dt,hideTopBar:ft,hideSidebarNav:bt,hideColoredLine:ht,expandSidebarNav:mt,currentPageScriptHash:Ot,hostHideSidebarNav:yt,pageLinkBaseUrl:Mt,sidebarChevronDownshift:At,hostMenuItems:St,hostToolbarItems:Et,libConfig:zt,appConfig:vt,inputsDisabled:Tt,appPages:$t,navSections:Rt}=this.state,wt=showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode),It=classNames("stApp",getEmbeddingIdClassName(this.embeddingId),{"streamlit-embedded":isEmbed(),"streamlit-wide":dt.wideMode}),kt=nt?StreamlitDialog({...nt,onClose:this.closeDialog}):null,Ft=Tt||et!==ConnectionState.CONNECTED;return jsx$1(AppContext.Provider,{value:{initialSidebarState:at,wideMode:dt.wideMode,embedded:isEmbed(),showPadding:!isEmbed()||isPaddingDisplayed(),disableScrolling:isScrollingHidden(),showToolbar:!isEmbed()||isToolbarDisplayed(),showColoredLine:!ht&&!isEmbed()||isColoredLineDisplayed(),pageLinkBaseUrl:Mt,sidebarChevronDownshift:At,gitInfo:this.state.gitInfo,appConfig:vt},children:jsx$1(LibContext.Provider,{value:{isFullScreen:ut,setFullScreen:this.handleFullScreen,addScriptFinishedHandler:this.addScriptFinishedHandler,removeScriptFinishedHandler:this.removeScriptFinishedHandler,activeTheme:this.props.theme.activeTheme,setTheme:this.setAndSendTheme,availableThemes:this.props.theme.availableThemes,addThemes:this.props.theme.addThemes,onPageChange:this.onPageChange,currentPageScriptHash:Ot,libConfig:zt,fragmentIdsThisRun:this.state.fragmentIdsThisRun,locale:window.navigator.language},children:jsx$1(ReactHotkeys,{keyName:"r,c,esc",onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,children:jsxs(StyledApp,{className:It,"data-testid":"stApp","data-test-script-state":ct==INITIAL_SCRIPT_RUN_ID?"initial":pt,"data-test-connection-state":et,children:[jsxs(Header,{children:[!ft&&jsxs(Fragment,{children:[jsx$1(StatusWidget,{connectionState:et,sessionEventDispatcher:this.sessionEventDispatcher,scriptRunState:pt,rerunScript:this.rerunScript,stopScript:this.stopScript,allowRunOnSave:tt}),jsx$1(ToolbarActions,{hostToolbarItems:Et,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,metricsMgr:this.metricsMgr})]}),this.showDeployButton()&&jsx$1(DeployButton,{onClick:this.deployButtonClicked.bind(this)}),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:St,developmentMode:wt,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,menuItems:st,metricsMgr:this.metricsMgr,toolbarMode:this.state.toolbarMode})]}),jsx$1(AppView,{endpoints:this.endpoints,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,elements:ot,scriptRunId:ct,scriptRunState:pt,widgetMgr:this.widgetMgr,widgetsDisabled:Ft,uploadClient:this.uploadClient,componentRegistry:this.componentRegistry,formsData:this.state.formsData,appLogo:ot.logo,appPages:$t,navSections:Rt,onPageChange:this.onPageChange,currentPageScriptHash:Ot,hideSidebarNav:bt||yt,expandSidebarNav:mt}),kt]})})})})}}const AppWithScreencast=withScreencast(App);function useThemeManager(){const rt=getDefaultTheme(),[tt,et]=reactExports.useState(rt),[nt,ot]=reactExports.useState([]),[at,st]=reactExports.useState([...createPresetThemes(),...isPresetTheme(rt)?[]:[rt]]),ut=ft=>{st([...createPresetThemes(),...ft])},ct=reactExports.useCallback(ft=>{ft!==tt&&(et(ft),ft.name===AUTO_THEME_NAME?removeCachedTheme():setCachedTheme(ft))},[et,tt]),pt=reactExports.useCallback(()=>{tt.name===AUTO_THEME_NAME&&ct(getHostSpecifiedTheme());const ft=at.filter(bt=>bt.name!==AUTO_THEME_NAME);st([createAutoTheme(),...ft])},[tt.name,at,ct]),dt=reactExports.useCallback(ft=>{ft.fontFaces&&ot(ft.fontFaces);const bt=new CustomThemeConfig(ft),ht=createTheme(CUSTOM_THEME_NAME,bt);ct(ht)},[ot,ct]);return reactExports.useEffect(()=>{const ft=window.matchMedia("(prefers-color-scheme: dark)");return ft.addEventListener("change",pt),window.addEventListener("afterprint",pt),()=>{window.removeEventListener("afterprint",pt),ft.removeEventListener("change",pt)}},[tt,at,pt]),[{setTheme:ct,activeTheme:tt,addThemes:ut,availableThemes:at,setImportedTheme:dt},nt]}const ThemedApp=({streamlitExecutionStartedAt:rt})=>{const[tt,et]=useThemeManager(),{activeTheme:nt}=tt,ot=nt.name===CUSTOM_THEME_NAME&&et.length>0;return jsx$1(RootStyleProvider,{theme:nt,children:jsx$1(WindowDimensionsProvider,{children:jsxs(PortalProvider,{children:[ot&&jsx$1(FontFaceDeclaration,{fontFaces:et}),jsx$1(AppWithScreencast,{theme:tt,streamlitExecutionStartedAt:rt})]})})})},streamlitExecutionStartedAt=Date.now(),engine=new StyletronClient({prefix:"st-"});ReactDOM.render(jsx$1(Provider$1,{value:engine,children:jsx$1(ThemedApp,{streamlitExecutionStartedAt})}),document.getElementById("root"));export{isArguments_1 as $,PLACEMENT as A,ACCESSIBILITY_TYPE as B,hasLightBackgroundColor as C,DynamicIcon as D,EmotionIconBase as E,Fragment as F,Popover$1 as G,require$$0 as H,toString$7 as I,m$4 as J,merge$4 as K,numbro$1 as L,d$3 as M,hooks as N,getTimezone as O,PortalContext as P,moment$1 as Q,React$1 as R,isIntegerType as S,isUnsignedIntegerType as T,isDurationType as U,isPeriodType as V,format as W,isBooleanType as X,_baseKeys as Y,_getTag as Z,_extends$Q as _,range$1 as a,ensureError as a$,isArray_1 as a0,isArrayLike_1 as a1,isBufferExports as a2,_isPrototype as a3,isTypedArray_1 as a4,DataFrameCellType as a5,Field$1 as a6,Null as a7,isTimeType as a8,convertTimeToDate as a9,mix$1 as aA,getStyledCell as aB,isEqual$1 as aC,StyledTooltipContentWrapper as aD,StreamlitMarkdown$1 as aE,LibContext as aF,Resizable as aG,getGray70 as aH,getGray30 as aI,getCategoricalColorsArray as aJ,getDivergingColorsArray as aK,getSequentialColorsArray as aL,getBlue80 as aM,debounce$4 as aN,Global as aO,_baseMerge as aP,_createAssigner as aQ,withTheme as aR,toaster as aS,Kind as aT,AlertElement as aU,_assertThisInitialized as aV,StyledInlineCode as aW,ErrorElement as aX,Skeleton$1 as aY,Skeleton as aZ,hoistNonReactStatics$2 as a_,isDecimalType as aa,isStringType as ab,isEmptyType as ac,isDatetimeType as ad,isDateType as ae,isObjectType as af,isBytesType as ag,isNumericType as ah,isCategoricalType as ai,isListType as aj,isRangeIndexType as ak,loglevelExports$1 as al,Arrow$2 as am,isArray$k as an,_defineProperty$p as ao,_objectWithoutPropertiesLoose$j as ap,_typeof$c as aq,jsx as ar,css as as,requireClassCallCheck as at,requireCreateClass as au,requireInherits as av,requireToConsumableArray as aw,require_typeof as ax,transparentize as ay,convertRemToPx as az,reactDomExports as b,Select as b$,lib$3 as b0,parseToRgba as b1,assertNever as b2,DeckGlJsonChart$1 as b3,DEFAULT_IFRAME_FEATURE_POLICY as b4,DEFAULT_IFRAME_SANDBOX_POLICY as b5,darken as b6,BaseButtonSize as b7,BaseButtonKind as b8,BaseButtonTooltip as b9,LabelVisibilityMessage as bA,StyledWidgetLabelHelpInline as bB,themeColors as bC,isMobile_1 as bD,CAMERA_PERMISSION_URL as bE,StyledWidgetLabelHelp as bF,StyledSpinnerIcon as bG,AcceptFileValue as bH,chatInputAcceptFileProtoValueToEnum as bI,isFocusVisible as bJ,getOverride as bK,getOverrideProps as bL,Checkbox$1 as bM,StyledContent as bN,StyledCheckbox$1 as bO,BaseColorPicker$1 as bP,useStyletron as bQ,mergeOverride as bR,toObjectOverride as bS,Icon$1 as bT,UIDConsumer as bU,StatefulMenu as bV,mergeOverrides as bW,ChevronDown$1 as bX,ThemeContext as bY,forkFocus as bZ,forkBlur as b_,DynamicButtonLabel as ba,IsSidebarContext as bb,Placement as bc,getGray90 as bd,getIncreasingGreen as be,getDecreasingRed as bf,PlotlyChart$1 as bg,keysToSnakeCase as bh,WindowDimensionsContext as bi,Video$1 as bj,zip$1 as bk,FileUploaderState as bl,UploadedFileInfo as bm,StyledSpinner as bn,ENABLE_PERIPHERALS_DOCS_URL as bo,Icon$2 as bp,BaseButton as bq,blend as br,labelVisibilityProtoValueToEnum as bs,TooltipIcon as bt,WidgetLabel as bu,Tooltip as bv,styled as bw,getOverrides as bx,LocaleContext as by,ButtonGroup$1 as bz,_hasPath as c,without$1 as c0,fuzzyFilterSelectOptions as c1,TYPE as c2,VirtualDropdown as c3,classNames as c4,UISelectbox as c5,isValidFormId as c6,toPropertyKey as c7,_setPrototypeOf$a as c8,hexToRgb as c9,reactIsExports$1 as cA,NumberInput$1 as cB,withWrapper as ca,__awaiter as cb,PropTypes as cc,isFromWindows as cd,StyledWidgetInstructions as ce,isFromMac as cf,CUSTOM_INPUT_TYPE as cg,SIZE$1 as ch,DeleteAlt$1 as ci,ADJOINED as cj,filterOptions as ck,ENHANCER_POSITION as cl,pick$1 as cm,Slider$2 as cn,ChevronLeft as co,ChevronRight as cp,isInForm as cq,toString_1 as cr,TextInput$1 as cs,ThemeProvider$1 as ct,createThemedStyled as cu,createThemedUseStyletron as cv,createThemedWithStyle as cw,expandBorderStyles as cx,withStyle as cy,getAugmentedNamespace as cz,commonjsGlobal$2 as d,classnamesExports as e,_root as f,getDefaultExportFromCjs$1 as g,isObject_1 as h,isPropValid as i,jsx$1 as j,keyframes as k,_Set as l,_setToArray as m,newStyled as n,_SetCache as o,propTypesExports as p,_arrayIncludes as q,reactExports as r,_arrayIncludesWith as s,toNumber_1 as t,_cacheHas as u,groupBy$1 as v,__vitePreload as w,flatten$2 as x,useTheme as y,jsxs as z};
811
+ `);return jsx$1("div",{"data-testid":"stClearCacheDialog",children:jsxs(Modal,{isOpen:!0,onClose:rt.onClose,children:[jsx$1(ModalHeader,{children:"Clear caches"}),jsx$1(ModalBody$1,{children:jsx$1(StreamlitMarkdown$1,{source:et,allowHTML:!1})}),jsxs(ModalFooter,{children:[jsx$1(ModalButton,{kind:BaseButtonKind.GHOST,onClick:rt.onClose,children:"Cancel"}),jsx$1(ModalButton,{autoFocus:!0,kind:BaseButtonKind.SECONDARY,onClick:rt.confirmCallback,children:"Clear caches"})]})]})})}function scriptCompileErrorDialog(rt){var tt;return jsxs(Modal,{isOpen:!0,onClose:rt.onClose,size:"auto",autoFocus:!1,children:[jsx$1(ModalHeader,{children:"Script execution error"}),jsx$1(ModalBody$1,{children:jsx$1(StreamlitSyntaxHighlighter$1,{showLineNumbers:!1,wrapLines:!1,children:(tt=rt.exception)!=null&&tt.message?rt.exception.message:"No message"})}),jsx$1(ModalFooter,{children:jsx$1(ModalButton,{kind:BaseButtonKind.SECONDARY,onClick:rt.onClose,children:"Close"})})]})}function settingsDialog(rt){return jsx$1(SettingsDialog,{...rt})}function warningDialog(rt){return jsxs(Modal,{isOpen:!0,onClose:rt.onClose,children:[jsx$1(ModalHeader,{children:rt.title}),jsx$1(ModalBody$1,{children:rt.msg})]})}function deployErrorDialog({title:rt,msg:tt,onClose:et,onContinue:nt,onTryAgain:ot}){const at=()=>{et(),nt&&nt()};return jsxs(Modal,{isOpen:!0,onClose:et,children:[jsx$1(ModalHeader,{children:rt}),jsx$1(ModalBody$1,{children:jsx$1(StyledDeployErrorContent,{children:tt})}),jsxs(ModalFooter,{children:[jsx$1(ModalButton,{kind:BaseButtonKind.GHOST,onClick:ot,children:"Try again"}),jsx$1(ModalButton,{kind:BaseButtonKind.SECONDARY,onClick:at,children:nt?"Continue anyway":"Close"})]})]})}function noDialog({onClose:rt}){return jsx$1(Modal,{isOpen:!1,onClose:rt})}function typeNotRecognizedDialog(rt){return jsx$1(Modal,{isOpen:!0,onClose:rt.onClose,children:jsx$1(ModalBody$1,{children:`Dialog type "${rt.type}" not recognized.`})})}class SessionEventDispatcher{constructor(){this.onSessionEvent=new dist.Signal}handleSessionEventMsg(tt){this.onSessionEvent.emit(tt)}}var assignValue=_assignValue,castPath$1=_castPath,isIndex=_isIndex,isObject=isObject_1,toKey=_toKey;function baseSet$1(rt,tt,et,nt){if(!isObject(rt))return rt;tt=castPath$1(tt,rt);for(var ot=-1,at=tt.length,st=at-1,ut=rt;ut!=null&&++ot<at;){var ct=toKey(tt[ot]),pt=et;if(ct==="__proto__"||ct==="constructor"||ct==="prototype")return rt;if(ot!=st){var dt=ut[ct];pt=nt?nt(dt,ct,ut):void 0,pt===void 0&&(pt=isObject(dt)?dt:isIndex(tt[ot+1])?[]:{})}assignValue(ut,ct,pt),ut=ut[ct]}return rt}var _baseSet=baseSet$1,baseGet=_baseGet,baseSet=_baseSet,castPath=_castPath;function basePickBy$1(rt,tt,et){for(var nt=-1,ot=tt.length,at={};++nt<ot;){var st=tt[nt],ut=baseGet(rt,st);et(ut,st)&&baseSet(at,castPath(st,rt),ut)}return at}var _basePickBy=basePickBy$1,basePickBy=_basePickBy,hasIn=hasIn_1;function basePick$1(rt,tt){return basePickBy(rt,tt,function(et,nt){return hasIn(rt,nt)})}var _basePick=basePick$1,basePick=_basePick,flatRest=_flatRest,pick=flatRest(function(rt,tt){return rt==null?{}:basePick(rt,tt)}),pick_1=pick;const pick$1=getDefaultExportFromCjs$1(pick_1),DEFAULT_METRICS_CONFIG="https://data.streamlit.io/metrics.json",log$2=loglevelExports$1.getLogger("MetricsManager");class MetricsManager{constructor(tt){this.initialized=!1,this.actuallySendMetrics=!1,this.metricsUrl=void 0,this.sendMessageToHost=()=>{},this.anonymousId="",this.pendingEvents=[],this.appHash="Not initialized",this.metadata={},this.setAppHash=et=>{this.appHash=et},this.setMetricsConfig=(et="")=>{this.metricsUrl=et},this.sessionInfo=tt}async initialize({gatherUsageStats:tt,sendMessageToHost:et}){this.sendMessageToHost=et,this.actuallySendMetrics=tt&&this.metricsUrl!=="off",this.getAnonymousId(),this.actuallySendMetrics&&!this.metricsUrl&&(await this.requestDefaultMetricsConfig(),this.metricsUrl||(log$2.error("Undefined metrics config - deactivating metrics tracking."),this.actuallySendMetrics=!1)),this.actuallySendMetrics&&this.sendPendingEvents(),log$2.info("Gather usage stats: ",this.actuallySendMetrics),this.initialized=!0}enqueue(tt,et={}){if(!this.initialized||!this.sessionInfo.isSet){this.pendingEvents.push([tt,et]);return}this.actuallySendMetrics&&(this.pendingEvents.length&&this.sendPendingEvents(),this.send(tt,et))}setMetadata(tt){this.metadata=tt}async requestDefaultMetricsConfig(){const tt=p$4();if(tt){const et=window.localStorage.getItem("stMetricsConfig");if(et){this.metricsUrl=et;return}}try{const et=await fetch(DEFAULT_METRICS_CONFIG,{signal:AbortSignal.timeout(5e3)});if(!et.ok)this.metricsUrl=void 0,log$2.error("Failed to fetch metrics config: ",et.status);else{const nt=await et.json();this.metricsUrl=nt.url??void 0,tt&&this.metricsUrl&&window.localStorage.setItem("stMetricsConfig",this.metricsUrl)}}catch(et){log$2.error("Failed to fetch metrics config:",et)}}send(tt,et={}){const nt=this.buildEventProto(tt,et);this.metricsUrl==="postMessage"?this.postMessageEvent(tt,nt):this.track(nt)}sendPendingEvents(){this.pendingEvents.forEach(([tt,et])=>{this.send(tt,et)}),this.pendingEvents=[]}async track(tt){const et=new Request(this.metricsUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(tt.toJSON())});await fetch(et)}postMessageEvent(tt,et){this.sendMessageToHost({type:"METRICS_EVENT",eventName:tt,data:et})}buildEventProto(tt,et){const nt=new MetricsEvent({event:tt,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,...this.getContextData()});if(tt==="menuClick")nt.label=et.label;else if(tt==="pageProfile")return new MetricsEvent({...nt,...et});return nt}getInstallationData(){return{machineIdV3:this.sessionInfo.current.installationIdV3}}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 tt="ajs_anonymous_id",et=p$4(),nt=f$3(tt),ot=et?window.localStorage.getItem(tt):null,at=new Date;if(at.setFullYear(new Date().getFullYear()+1),nt)this.anonymousId=nt,et&&window.localStorage.setItem(tt,nt);else if(ot){try{this.anonymousId=JSON.parse(ot)}catch{this.anonymousId=ot}setCookie(tt,this.anonymousId,at)}else this.anonymousId=v4(),setCookie(tt,this.anonymousId,at),et&&window.localStorage.setItem(tt,this.anonymousId)}}const StyledApp=newStyled("div",{target:"ee4bbma0"})(({theme:rt})=>{const tt=hasLightBackgroundColor(rt);return{position:"absolute",background:rt.colors.bgColor,color:rt.colors.bodyText,top:rt.spacing.none,left:rt.spacing.none,right:rt.spacing.none,bottom:rt.spacing.none,colorScheme:tt?"light":"dark",overflow:"hidden","@media print":{float:"none",height:rt.sizes.full,position:"static",overflow:"visible"}}}),StyledRecordAudioLabel=newStyled("label",{target:"ej964cx0"})({margin:0}),StyledInstruction=newStyled("p",{target:"ej964cx1"})({margin:0}),ScreencastDialog=({onClose:rt,toggleRecordAudio:tt,recordAudio:et,startRecording:nt})=>{const[ot,at]=reactExports.useState(et),st=reactExports.useCallback(ct=>{const{checked:pt}=ct.target;pt!==ot&&(at(pt),tt())},[ot,tt]),ut=reactExports.useCallback(()=>{nt(),rt()},[nt,rt]);return jsxs(Modal,{isOpen:!0,onClose:rt,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",checked:ot,onChange:st})," ","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:ut,children:"Start recording!"})})]})},StyledVideo=newStyled("video",{target:"emkt0dj0"})(({theme:rt})=>({width:rt.sizes.full,borderRadius:rt.radii.md})),StyledDialogContainer=newStyled("div",{target:"emkt0dj1"})(({theme:rt})=>({display:"flex",flexDirection:"column",width:rt.sizes.full})),StyledRow=newStyled("div",{target:"emkt0dj2"})(({theme:rt})=>({display:"flex",flexDirection:"row",paddingTop:rt.spacing.md,paddingBottom:rt.spacing.md})),StyledFirstColumn=newStyled("div",{target:"emkt0dj3"})(({theme:rt})=>({paddingRight:rt.spacing.lg,textAlign:"right",color:rt.colors.gray,fontWeight:rt.fontWeights.bold,width:"6em"})),StyledSecondColumn=newStyled("div",{target:"emkt0dj4"})(({theme:rt})=>({flex:1,paddingRight:rt.spacing.lg,marginRight:"6em",[`@media (max-width: ${rt.breakpoints.sm})`]:{marginRight:rt.spacing.none}})),StyledVideoFormatInstructions=newStyled("p",{target:"emkt0dj5"})(({theme:rt})=>({marginTop:rt.spacing.sm,marginBottom:rt.spacing.none,fontSize:rt.fontSizes.sm})),StyledDownloadButtonContainer=newStyled("div",{target:"emkt0dj6"})(({theme:rt})=>({marginTop:rt.spacing.twoXS})),VideoRecordedDialog=({onClose:rt,videoBlob:tt,fileName:et})=>{const nt=URL.createObjectURL(tt),ot=()=>{const at=document.createElement("a");at.setAttribute("href",nt),at.setAttribute("download",`${et}.webm`),at.click(),rt()};return jsxs(Modal,{isOpen:!0,onClose:rt,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:nt,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:ot,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=newStyled("div",{target:"e1o5y2010"})({display:"flex"}),StyledUnsupportedScreenCastIcon=newStyled("div",{target:"e1o5y2011"})(({theme:rt})=>({display:"flex",alignItems:"center",justifyItems:"center",marginRight:rt.spacing.twoXL,marginLeft:rt.spacing.sm,fontSize:rt.fontSizes.fourXL})),StyledUnsupportedScreenCastExplanation=newStyled("p",{target:"e1o5y2012"})(({theme:rt})=>({margin:rt.spacing.none})),UnsupportedBrowserDialog=({onClose:rt})=>jsxs(Modal,{isOpen:!0,onClose:rt,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),screencastCounterAnimation=keyframes("0%{opacity:0;}25%{opacity:1;}100%{opacity:0;}"),StyledCountdown=newStyled("div",{target:"evez3ra0"})(({theme:rt})=>({position:"fixed",display:"flex",justifyContent:"center",alignItems:"center",top:0,left:0,width:rt.sizes.full,height:rt.sizes.full,fontSize:"40vh",color:rt.colors.red,fontWeight:rt.fontWeights.bold,opacity:"0.8",textShadow:`1px 1px 10px ${rt.colors.darkGray}`,transition:"opacity 0.3s ease-in-out",animation:`${screencastCounterAnimation} 1s`})),Countdown=({countdown:rt,endCallback:tt})=>{const[et,nt]=reactExports.useState(rt);return jsx$1(StyledCountdown,{"data-testid":"stCountdown",onAnimationEnd:()=>{const at=et-1;at>=0&&nt(at),at===0&&tt()},children:jsx$1("span",{children:et})},`frame${et}`)},log$1=loglevelExports$1.getLogger("withScreencast");function withScreencast(rt){const tt=et=>{const{testOverride:nt}=et,ot=reactExports.useRef(null),[at,st]=reactExports.useState("streamlit-screencast"),[ut,ct]=reactExports.useState(!1),[pt,dt]=reactExports.useState(void 0),[ft,bt]=reactExports.useState(nt||"OFF"),ht=reactExports.useCallback(()=>{ct(Et=>!Et)},[]),mt=reactExports.useCallback(async()=>{if(!(ft==="OFF"||m$4(ot.current))){if(ft==="COUNTDOWN"){bt("OFF");return}if(ft==="RECORDING"){const Et=ot.current;if(!Et||Et.getState()==="inactive")bt("OFF");else{const zt=await Et.stop();dt(zt),bt("PREVIEW_FILE")}}}},[ft]),Ot=reactExports.useCallback(async()=>{if(!ScreenCastRecorder.isSupportedBrowser()){bt("UNSUPPORTED");return}ot.current=new ScreenCastRecorder({recordAudio:ut,onErrorOrStop:()=>{mt().catch(Et=>log$1.warn(`withScreencast.stopRecording threw an error: ${Et}`))}});try{await ot.current.initialize()}catch(Et){log$1.warn(`ScreenCastRecorder.initialize error: ${Et}`),bt("UNSUPPORTED");return}bt("COUNTDOWN")},[ut,mt]),yt=reactExports.useCallback(Et=>{if(!ScreenCastRecorder.isSupportedBrowser()){bt("UNSUPPORTED");return}if(ft==="OFF"){st(Et),bt("SETUP");return}mt().catch(zt=>log$1.warn(`withScreencast.stopRecording threw an error: ${zt}`))},[ft,mt]),Mt=reactExports.useCallback(async()=>{if(m$4(ot.current))throw new Error("Countdown finished but recorder is null");ot.current.start()?bt("RECORDING"):mt().catch(zt=>log$1.warn(`withScreencast.stopRecording threw an error: ${zt}`))},[mt]),At=reactExports.useCallback(()=>{bt("OFF")},[]);return jsxs("div",{className:"withScreencast","data-testid":"stScreencast",children:[jsx$1(rt,{...et,screenCast:{currentState:ft,toggleRecordAudio:ht,startRecording:yt,stopRecording:mt}}),ft==="UNSUPPORTED"&&jsx$1(UnsupportedBrowserDialog$1,{onClose:At}),ft==="SETUP"&&jsx$1(ScreencastDialog,{recordAudio:ut,onClose:At,startRecording:Ot,toggleRecordAudio:ht}),ft==="COUNTDOWN"&&jsx$1(Countdown,{countdown:3,endCallback:Mt}),ft==="PREVIEW_FILE"&&pt&&jsx$1(VideoRecordedDialog,{onClose:At,videoBlob:pt,fileName:at})]})};return tt.displayName=`withScreencast(${rt.displayName||rt.name||"Component"})`,hoistNonReactStatics$2(tt,rt)}const showDevelopmentOptions=(rt,tt)=>tt==Config.ToolbarMode.DEVELOPER?!0:Config.ToolbarMode.VIEWER==tt||Config.ToolbarMode.MINIMAL==tt?!1:rt||isLocalhost();function getTitle(rt){return rt||"Streamlit"}class StrategyV1{constructor(tt){this.appNav=tt,this.appPages=[],this.currentPageScriptHash=null,this.hideSidebarNav=null}handleNewSession(tt){var st,ut;this.appPages=tt.appPages,this.currentPageScriptHash=tt.pageScriptHash,this.hideSidebarNav=((st=tt.config)==null?void 0:st.hideSidebarNav)??!1;const et=this.appPages[0],nt=et.urlPathname??"",ot=((ut=this.appPages.find(ct=>ct.pageScriptHash===this.currentPageScriptHash))==null?void 0:ut.urlPathname)??"",at=et.pageScriptHash===this.currentPageScriptHash;return this.appNav.onUpdatePageUrl(nt,ot,at),document.title=getTitle(ot??""),[{hideSidebarNav:this.hideSidebarNav,appPages:this.appPages,currentPageScriptHash:this.currentPageScriptHash},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_APP_PAGES",appPages:this.appPages}),this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:at?"":ot,currentPageScriptHash:this.currentPageScriptHash})}]}handlePagesChanged(tt){const{appPages:et}=tt;return[{appPages:et},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_APP_PAGES",appPages:et})}]}handlePageNotFound(tt){var ot;const{pageName:et}=tt;this.appNav.onPageNotFound(et);const nt=((ot=this.appPages[0])==null?void 0:ot.pageScriptHash)??"";return this.currentPageScriptHash=nt,[{currentPageScriptHash:nt},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:"",currentPageScriptHash:nt})}]}handleNavigation(tt){}findPageByUrlPath(tt){return this.appPages.length===0?null:this.appPages.find(et=>tt.endsWith("/"+et.urlPathname))??this.appPages[0]}clearPageElements(tt,et,nt){return AppRoot.empty(et,!1,nt,tt.logo)}}class StrategyV2{constructor(tt){this.appNav=tt,this.mainScriptHash=null,this.appPages=[],this.mainPage=null,this.hideSidebarNav=null}handleNewSession(tt){var et;return this.mainScriptHash=tt.mainScriptHash,this.hideSidebarNav===null&&(this.hideSidebarNav=((et=tt.config)==null?void 0:et.hideSidebarNav)??null),document.title=getTitle(""),[{hideSidebarNav:this.hideSidebarNav??!1},()=>{}]}handlePagesChanged(tt){}handlePageNotFound(tt){const{pageName:et}=tt;return this.appNav.onPageNotFound(et),[{currentPageScriptHash:this.mainScriptHash??""},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:"",currentPageScriptHash:this.mainScriptHash??""})}]}handleNavigation(tt){const{sections:et,position:nt,appPages:ot}=tt;this.appPages=ot,this.hideSidebarNav=nt===Navigation.Position.HIDDEN;const at=tt.pageScriptHash,st=ot.find(pt=>pt.pageScriptHash===at),ut=ot.find(pt=>pt.isDefault);this.mainPage=ut;const ct=st.urlPathname;if(!this.appNav.isPageTitleSet){const pt=getTitle(st.pageName);document.title=pt,this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_PAGE_TITLE",title:st.pageName??""})}return!this.appNav.isPageIconSet&&st.icon&&this.appNav.onPageIconChange(st.icon),this.appNav.onUpdatePageUrl(ut.urlPathname??"",ct,st.isDefault??!1),[{appPages:ot,navSections:et,hideSidebarNav:this.hideSidebarNav,expandSidebarNav:tt.expanded,currentPageScriptHash:at},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_APP_PAGES",appPages:ot}),this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:st.isDefault?"":ct,currentPageScriptHash:at})}]}findPageByUrlPath(tt){return this.appPages.find(et=>tt.endsWith("/"+et.urlPathname))??this.mainPage}clearPageElements(tt,et,nt){return tt.filterMainScriptElements(et)}}class AppNavigation{constructor(tt,et,nt,ot){this.hostCommunicationMgr=tt,this.onUpdatePageUrl=et,this.onPageNotFound=nt,this.onPageIconChange=ot,this.isPageIconSet=!1,this.isPageTitleSet=!1,this.strategy=new StrategyV1(this)}handleNewSession(tt){return this.isPageTitleSet=!1,this.isPageIconSet=!1,this.strategy.handleNewSession(tt)}handleNavigation(tt){return this.strategy instanceof StrategyV1&&(this.strategy=new StrategyV2(this)),this.strategy.handleNavigation(tt)}handlePagesChanged(tt){return this.strategy.handlePagesChanged(tt)}handlePageNotFound(tt){return this.strategy.handlePageNotFound(tt)}findPageByUrlPath(tt){return this.strategy.findPageByUrlPath(tt)}handlePageConfigChanged(tt){this.isPageIconSet=!!tt.favicon,this.isPageTitleSet=!!tt.title}clearPageElements(tt,et,nt){return this.strategy.clearPageElements(tt,et,nt)}}var define_PACKAGE_METADATA_default={version:"1.42.0"};const ELEMENT_LIST_BUFFER_TIMEOUT_MS=10,INITIAL_SCRIPT_RUN_ID="<null>",log=loglevelExports$1.getLogger("App");class App extends reactExports.PureComponent{constructor(tt){super(tt),this.sessionInfo=new SessionInfo,this.metricsMgr=new MetricsManager(this.sessionInfo),this.sessionEventDispatcher=new SessionEventDispatcher,this.embeddingId=generateUID$2(),this.showDeployError=(nt,ot,at)=>{this.openDialog({type:DialogType.DEPLOY_ERROR,title:nt,msg:ot,onContinue:at,onClose:()=>{},onTryAgain:this.sendLoadGitInfoBackMsg})},this.handleThemeMessage=(nt,ot)=>{const[,at,st]=createPresetThemes(),ut=isPresetTheme(this.props.theme.activeTheme);nt===at.name&&ut?this.props.theme.setTheme(at):nt===st.name&&ut?this.props.theme.setTheme(st):ot&&this.props.theme.setImportedTheme(ot)},this.handleConnectionStateChanged=nt=>{if(log.info(`Connection state changed from ${this.state.connectionState} to ${nt}`),nt===ConnectionState.CONNECTED){log.info("Reconnected to server.");const ot=this.state.scriptRunState===ScriptRunState.RERUN_REQUESTED||this.state.scriptRunState===ScriptRunState.RUNNING;(!this.sessionInfo.last||ot)&&(log.info("Requesting a script run."),this.widgetMgr.sendUpdateWidgetsMessage(void 0),this.setState({dialog:null})),this.hostCommunicationMgr.sendMessageToHost({type:"WEBSOCKET_CONNECTED"})}else this.state.connectionState===ConnectionState.CONNECTED&&this.hostCommunicationMgr.sendMessageToHost({type:"WEBSOCKET_DISCONNECTED",attemptingToReconnect:nt!==ConnectionState.DISCONNECTED_FOREVER}),this.sessionInfo.isSet&&this.sessionInfo.clearCurrent();this.setState({connectionState:nt})},this.handleGitInfoChanged=nt=>{this.setState({gitInfo:nt})},this.handleCustomParentMessage=nt=>{this.state.appConfig.enableCustomParentMessages?this.hostCommunicationMgr.sendMessageToHost({type:"CUSTOM_PARENT_MESSAGE",message:nt.message}):log.error("Sending messages to the host is disabled in line with the platform policy.")},this.handleMessage=nt=>{const ot=(at,st,ut)=>{const ct=at[st];if(ct in ut)return ut[ct](at[ct]);throw new Error(`Cannot handle ${st} "${ct}".`)};try{ot(nt,"type",{newSession:at=>this.handleNewSession(at),sessionStatusChanged:at=>this.handleSessionStatusChanged(at),sessionEvent:at=>this.handleSessionEvent(at),delta:at=>this.handleDeltaMsg(at,nt.metadata),pageConfigChanged:at=>this.handlePageConfigChanged(at),pageInfoChanged:at=>this.handlePageInfoChanged(at),pagesChanged:at=>this.handlePagesChanged(at),pageNotFound:at=>this.handlePageNotFound(at),gitInfoChanged:at=>this.handleGitInfoChanged(at),scriptFinished:at=>this.handleScriptFinished(at),pageProfile:at=>this.handlePageProfileMsg(at),autoRerun:at=>this.handleAutoRerun(at),fileUrlsResponse:at=>this.uploadClient.onFileURLsResponse(at),parentMessage:at=>this.handleCustomParentMessage(at),logo:at=>this.handleLogo(at,nt.metadata),navigation:at=>this.handleNavigation(at),authRedirect:at=>{isInChildFrame()?this.hostCommunicationMgr.sendMessageToSameOriginHost({type:"REDIRECT_TO_URL",url:at.url}):window.location.href=at.url}})}catch(at){const st=ensureError(at);log.error(st),this.showError("Bad message format",st.message)}},this.handleLogo=(nt,ot)=>{const at={activeScriptHash:ot.activeScriptHash,scriptRunId:this.state.scriptRunId};this.setState({elements:this.pendingElementsBuffer.appRootWithLogo(nt,at)},()=>{this.pendingElementsBuffer=this.state.elements})},this.handlePageConfigChanged=nt=>{const{title:ot,favicon:at,layout:st,initialSidebarState:ut,menuItems:ct}=nt;this.appNavigation.handlePageConfigChanged(nt),ot&&(this.hostCommunicationMgr.sendMessageToHost({type:"SET_PAGE_TITLE",title:ot}),document.title=ot),at&&this.onPageIconChanged(at),st!==this.state.layout&&this.setState(pt=>({layout:st,userSettings:{...pt.userSettings,wideMode:st===PageConfig.Layout.WIDE}})),ut!==this.state.initialSidebarState&&this.setState(()=>({initialSidebarState:ut})),this.setState({menuItems:ct})},this.handlePageInfoChanged=nt=>{const{queryString:ot}=nt,at=document.location.pathname+(ot?`?${ot}`:"");window.history.pushState({},"",at),this.hostCommunicationMgr.sendMessageToHost({type:"SET_QUERY_PARAM",queryParams:ot?`?${ot}`:""})},this.onPageNotFound=nt=>{const ot=nt?`You have requested page /${nt}, 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",`${ot}. Running the app's main page.`)},this.handlePageNotFound=nt=>{this.maybeSetState(this.appNavigation.handlePageNotFound(nt))},this.onPageIconChanged=nt=>{handleFavicon(nt,this.hostCommunicationMgr.sendMessageToHost,this.endpoints)},this.handlePagesChanged=nt=>{this.maybeSetState(this.appNavigation.handlePagesChanged(nt))},this.handleNavigation=nt=>{this.maybeSetState(this.appNavigation.handleNavigation(nt))},this.handlePageProfileMsg=nt=>{var st,ut,ct;const ot=PageProfile.toObject(nt),at=getBrowserInfo();this.metricsMgr.enqueue("pageProfile",{...ot,isFragmentRun:!!ot.isFragmentRun,appId:this.sessionInfo.current.appId,numPages:(st=this.state.appPages)==null?void 0:st.length,sessionId:this.sessionInfo.current.sessionId,pythonVersion:this.sessionInfo.current.pythonVersion,pageScriptHash:this.state.currentPageScriptHash,activeTheme:(ct=(ut=this.props.theme)==null?void 0:ut.activeTheme)==null?void 0:ct.name,totalLoadTime:Math.round((performance.now()-this.state.latestRunTime)*1e3),browserInfo:at})},this.handleAutoRerun=nt=>{const ot=setInterval(()=>{this.widgetMgr.sendUpdateWidgetsMessage(nt.fragmentId,!0)},nt.interval*1e3);this.setState(at=>({autoReruns:[...at.autoReruns,ot]}))},this.handleSessionStatusChanged=nt=>{this.setState(ot=>{let{scriptRunState:at}=ot,{dialog:st}=ot;return nt.scriptIsRunning&&ot.scriptRunState!==ScriptRunState.STOP_REQUESTED?(at=ScriptRunState.RUNNING,d$3(st)&&st.type===DialogType.SCRIPT_COMPILE_ERROR&&(st=void 0)):!nt.scriptIsRunning&&ot.scriptRunState!==ScriptRunState.RERUN_REQUESTED&&ot.scriptRunState!==ScriptRunState.COMPILATION_ERROR&&(at=ScriptRunState.NOT_RUNNING),{userSettings:{...ot.userSettings,runOnSave:!!nt.runOnSave},dialog:st,scriptRunState:at}})},this.handleSessionEvent=nt=>{if(this.sessionEventDispatcher.handleSessionEventMsg(nt),nt.type==="scriptCompilationException"){this.setState({scriptRunState:ScriptRunState.COMPILATION_ERROR});const ot={type:DialogType.SCRIPT_COMPILE_ERROR,exception:nt.scriptCompilationException,onClose:()=>{}};this.openDialog(ot)}},this.maybeUpdatePageUrl=(nt,ot,at)=>{const st=this.getBaseUriParts();if(st){const{pathname:ut}=st,ct=extractPageNameFromPathName(document.location.pathname,ut);if((ct===""?nt:ct)!==ot){const dt=at?"":ot,ft=preserveEmbedQueryParams(),bt=ft?`?${ft}`:"",mt=`${ut==="/"?"":ut}/${dt}${bt}`;window.history.pushState({},"",mt)}}},this.handleNewSession=nt=>{const ot=nt.initialize;if(this.hasStreamlitVersionChanged(ot)){window.location.reload();return}this.sessionInfo.isSet||this.handleOneTimeInitialization(nt);const{appHash:at,currentPageScriptHash:st}=this.state,{scriptRunId:ut,name:ct,mainScriptPath:pt,fragmentIdsThisRun:dt,pageScriptHash:ft,mainScriptHash:bt}=nt;if(dt.length)this.setState({fragmentIdsThisRun:dt,latestRunTime:performance.now()});else{this.cleanupAutoReruns();const mt=nt.config,Ot=nt.customTheme;this.processThemeInput(Ot),this.setState({allowRunOnSave:mt.allowRunOnSave,hideTopBar:mt.hideTopBar,toolbarMode:mt.toolbarMode,latestRunTime:performance.now(),mainScriptHash:bt,fragmentIdsThisRun:dt}),this.maybeSetState(this.appNavigation.handleNewSession(nt)),this.onPageIconChanged("./favicon.png")}const ht=hashString(this.sessionInfo.current.installationId+pt);this.metricsMgr.setMetadata(this.state.deployedAppMetadata),this.metricsMgr.setAppHash(ht),this.metricsMgr.enqueue("updateReport"),at===ht&&st===ft?this.setState({scriptRunId:ut}):this.clearAppState(ht,ut,ct,bt)},this.handleOneTimeInitialization=nt=>{const ot=nt.initialize,at=nt.config;this.sessionInfo.setCurrent(SessionInfo.propsFromNewSessionMessage(nt)),this.metricsMgr.initialize({gatherUsageStats:at.gatherUsageStats,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost}),this.handleSessionStatusChanged(ot.sessionStatus)},this.onHistoryChange=()=>{const{currentPageScriptHash:nt}=this.state,ot=this.appNavigation.findPageByUrlPath(document.location.pathname),at=document.location.toString().includes("#"),st=(ot==null?void 0:ot.pageScriptHash)===nt;m$4(ot)||at&&st||this.onPageChange(ot.pageScriptHash)},this.setAndSendTheme=nt=>{this.props.theme.setTheme(nt),this.setState({hideColoredLine:!isPresetTheme(nt)}),this.hostCommunicationMgr.sendMessageToHost({type:"SET_THEME_CONFIG",themeInfo:toExportedTheme(nt.emotion)})},this.createThemeHash=nt=>{if(!nt)return"hash_for_undefined_custom_theme";const ot=Object.entries(nt);return ot.sort(),hashString(ot.join(":"))},this.closeDialog=()=>{this.setState({dialog:void 0})},this.saveSettings=nt=>{const{runOnSave:ot}=this.state.userSettings,{runOnSave:at}=nt;if(this.setState({userSettings:nt}),ot!==at&&this.isServerConnected()){const st=new BackMsg$1({setRunOnSave:at});st.type="setRunOnSave",this.sendBackMsg(st)}},this.handleDeltaMsg=(nt,ot)=>{if(this.pendingElementsBuffer=this.pendingElementsBuffer.applyDelta(this.state.scriptRunId,nt,ot),!this.pendingElementsTimerRunning){this.pendingElementsTimerRunning=!0;const at=this.state.scriptRunState===ScriptRunState.RUNNING;setTimeout(()=>{this.pendingElementsTimerRunning=!1,at&&this.setState({elements:this.pendingElementsBuffer})},ELEMENT_LIST_BUFFER_TIMEOUT_MS)}},this.debugShutdownRuntime=()=>{if(this.isServerConnected()){const nt=new BackMsg$1({debugShutdownRuntime:!0});nt.type="debugShutdownRuntime",this.sendBackMsg(nt)}},this.debugDisconnectWebsocket=()=>{if(this.isServerConnected()){const nt=new BackMsg$1({debugDisconnectWebsocket:!0});nt.type="debugDisconnectWebsocket",this.sendBackMsg(nt)}},this.debugClearForwardMsgCache=()=>{var nt,ot;isLocalhost()&&((ot=(nt=this.connectionManager)==null?void 0:nt.websocketConnection)==null||ot.cache.messages.clear())},this.cleanupAutoReruns=()=>{this.state.autoReruns.forEach(nt=>{clearInterval(nt)}),this.setState({autoReruns:[]})},this.rerunScript=(nt=!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}),nt===!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$1({loadGitInfo:!0}))},this.onPageChange=nt=>{const{elements:ot,mainScriptHash:at}=this.state;this.cleanupAutoReruns();const st=this.appNavigation.clearPageElements(ot,at,void 0),ut=new Set(Array.from(st.getElements()).map(ct=>getElementId(ct)).filter(notUndefined));this.sendRerunBackMsg(this.widgetMgr.getActiveWidgetStates(ut),void 0,nt)},this.isAppInReadyState=nt=>this.state.connectionState===ConnectionState.CONNECTED&&this.state.scriptRunState===ScriptRunState.NOT_RUNNING&&nt.scriptRunState===ScriptRunState.RUNNING&&nt.connectionState===ConnectionState.CONNECTED,this.sendRerunBackMsg=(nt,ot,at,st)=>{const ut=this.getBaseUriParts();if(!ut){log.error("Cannot send rerun backMessage when disconnected from server.");return}const{currentPageScriptHash:ct}=this.state,{pathname:pt}=ut;let dt=this.getQueryString(),ft="";at?at!=ct&&(dt=preserveEmbedQueryParams(),this.hostCommunicationMgr.sendMessageToHost({type:"SET_QUERY_PARAM",queryParams:dt})):ct?at=ct:(ft=extractPageNameFromPathName(document.location.pathname,pt),at=""),this.sendBackMsg(new BackMsg$1({rerunScript:{queryString:dt,widgetStates:nt,pageScriptHash:at,pageName:ft,fragmentId:ot,isAutoRerun:st}}))},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 nt=new BackMsg$1({stopScript:!0});nt.type="stopScript",this.sendBackMsg(nt),this.setState({scriptRunState:ScriptRunState.STOP_REQUESTED})},this.openClearCacheDialog=()=>{if(this.isServerConnected()){const nt={type:DialogType.CLEAR_CACHE,confirmCallback:this.clearCache,defaultAction:this.clearCache,onClose:()=>{}};this.openDialog(nt)}else log.error("Cannot clear cache: disconnected from server")},this.openDeployDialog=()=>{var ot;const nt={type:DialogType.DEPLOY_DIALOG,onClose:this.closeDialog,showDeployError:this.showDeployError,isDeployErrorModalOpen:((ot=this.state.dialog)==null?void 0:ot.type)===DialogType.DEPLOY_ERROR,metricsMgr:this.metricsMgr};this.openDialog(nt)},this.openThemeCreatorDialog=()=>{this.metricsMgr.enqueue("menuClick",{label:"editTheme"});const nt={type:DialogType.THEME_CREATOR,backToSettings:this.settingsCallback,onClose:this.closeDialog,metricsMgr:this.metricsMgr};this.openDialog(nt)},this.clearCache=()=>{if(this.closeDialog(),this.isServerConnected()){const nt=new BackMsg$1({clearCache:!0});nt.type="clearCache",this.sendBackMsg(nt)}else log.error("Cannot clear cache: disconnected from server")},this.sendAppHeartbeat=()=>{if(this.isServerConnected()){const nt=new BackMsg$1({appHeartbeat:!0});nt.type="appHeartbeat",this.sendBackMsg(nt)}else log.error("Cannot send app heartbeat: disconnected from server")},this.sendBackMsg=nt=>{this.connectionManager?(log.info(nt),this.connectionManager.sendMessage(nt)):log.error(`Not connected. Cannot send back message: ${nt}`)},this.handleConnectionError=nt=>{this.showError("Connection error",nt)},this.isServerConnected=()=>this.connectionManager?this.connectionManager.isConnected():!1,this.settingsCallback=(nt=!0)=>{const ot={type:DialogType.SETTINGS,isServerConnected:this.isServerConnected(),settings:this.state.userSettings,allowRunOnSave:this.state.allowRunOnSave,onSave:this.saveSettings,onClose:()=>{},developerMode:showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode),openThemeCreator:this.openThemeCreatorDialog,animateModal:nt,metricsMgr:this.metricsMgr};this.openDialog(ot)},this.aboutCallback=()=>{const{menuItems:nt}=this.state,ot={type:DialogType.ABOUT,sessionInfo:this.sessionInfo,onClose:this.closeDialog,aboutSectionMd:nt==null?void 0:nt.aboutSectionMd};this.openDialog(ot)},this.printCallback=()=>{const{scriptRunState:nt}=this.state;if(nt!==ScriptRunState.NOT_RUNNING){setTimeout(this.printCallback,500);return}let ot;try{const at=getIFrameEnclosingApp(this.embeddingId);at&&at.contentWindow?ot=at.contentWindow.window:ot=window}catch{ot=window}finally{ot||(ot=window),ot.print()}},this.screencastCallback=()=>{const{scriptName:nt}=this.state,{startRecording:ot}=this.props.screenCast,at=hooks().format("YYYY-MM-DD-HH-MM-SS");ot(`streamlit-${nt}-${at}`)},this.handleFullScreen=nt=>{this.setState({isFullScreen:nt})},this.setLibConfig=nt=>{this.setState({libConfig:nt})},this.setAppConfig=nt=>{this.setState({appConfig:nt})},this.addScriptFinishedHandler=nt=>{this.setState((ot,at)=>({scriptFinishedHandlers:ot.scriptFinishedHandlers.concat(nt)}))},this.removeScriptFinishedHandler=nt=>{this.setState((ot,at)=>({scriptFinishedHandlers:without$1(ot.scriptFinishedHandlers,nt)}))},this.getBaseUriParts=()=>this.connectionManager?this.connectionManager.getBaseUriParts():void 0,this.getQueryString=()=>{const{queryParams:nt}=this.state,ot=nt&&nt.length>0?nt:document.location.search;return ot.startsWith("?")?ot.substring(1):ot},this.isInCloudEnvironment=()=>{const{hostMenuItems:nt}=this.state;return nt&&(nt==null?void 0:nt.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=(nt,ot)=>{if(this.isServerConnected()){const at=new BackMsg$1({fileUrlsRequest:{requestId:nt,fileNames:ot.map(st=>st.name),sessionId:this.sessionInfo.current.sessionId}});at.type="fileUrlsRequest",this.sendBackMsg(at)}},this.handleKeyDown=nt=>{switch(nt){case"c":showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode)&&this.openClearCacheDialog();break;case"r":this.rerunScript();break}},this.handleKeyUp=nt=>{nt==="esc"&&this.props.screenCast.stopRecording()},J$1();let et=this.createThemeHash();isPresetTheme(tt.theme.activeTheme)||(et=this.createThemeHash(toThemeInput(tt.theme.activeTheme.emotion))),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},layout:PageConfig.Layout.CENTERED,initialSidebarState:PageConfig.SidebarState.AUTO,menuItems:void 0,allowRunOnSave:!0,scriptFinishedHandlers:[],themeHash:et,gitInfo:null,formsData:createFormsData(),appPages:[],navSections:[],currentPageScriptHash:"",mainScriptHash:"",hideTopBar:!0,hideSidebarNav:!0,hideColoredLine:!1,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},this.connectionManager=null,this.widgetMgr=new WidgetStateManager({sendRerunBackMsg:this.sendRerunBackMsg,formsDataChanged:nt=>this.setState({formsData:nt})}),this.hostCommunicationMgr=new HostCommunicationManager({streamlitExecutionStartedAt:tt.streamlitExecutionStartedAt,sendRerunBackMsg:this.sendRerunBackMsg,closeModal:this.closeDialog,stopScript:this.stopScript,rerunScript:this.rerunScript,clearCache:this.clearCache,sendAppHeartbeat:this.sendAppHeartbeat,setInputsDisabled:nt=>{this.setState({inputsDisabled:nt})},themeChanged:this.handleThemeMessage,pageChanged:this.onPageChange,isOwnerChanged:nt=>this.setState({isOwner:nt}),fileUploadClientConfigChanged:nt=>{this.endpoints.setFileUploadClientConfig!==void 0&&this.endpoints.setFileUploadClientConfig(nt)},hostMenuItemsChanged:nt=>{this.setState({hostMenuItems:nt})},hostToolbarItemsChanged:nt=>{this.setState({hostToolbarItems:nt})},hostHideSidebarNavChanged:nt=>{this.setState({hostHideSidebarNav:nt})},sidebarChevronDownshiftChanged:nt=>{this.setState({sidebarChevronDownshift:nt})},pageLinkBaseUrlChanged:nt=>{this.setState({pageLinkBaseUrl:nt})},queryParamsChanged:nt=>{this.setState({queryParams:nt})},deployedAppMetadataChanged:nt=>{this.setState({deployedAppMetadata:nt})},restartWebsocketConnection:()=>{this.connectionManager||this.initializeConnectionManager()},terminateWebsocketConnection:()=>{var nt;(nt=this.connectionManager)==null||nt.disconnect(),this.connectionManager=null}}),this.endpoints=new DefaultStreamlitEndpoints({getServerUri:this.getBaseUriParts,csrfEnabled:!0}),this.uploadClient=new FileUploadClient({sessionInfo:this.sessionInfo,endpoints:this.endpoints,formsWithPendingRequestsChanged:nt=>this.widgetMgr.setFormsWithUploadsInProgress(nt),requestFileURLs:this.requestFileURLs}),this.componentRegistry=new ComponentRegistry(this.endpoints),this.pendingElementsTimerRunning=!1,this.pendingElementsBuffer=this.state.elements,this.appNavigation=new AppNavigation(this.hostCommunicationMgr,this.maybeUpdatePageUrl,this.onPageNotFound,this.onPageIconChanged),window.streamlitDebug={clearForwardMsgCache:this.debugClearForwardMsgCache,disconnectWebsocket:this.debugDisconnectWebsocket,shutdownRuntime:this.debugShutdownRuntime}}initializeConnectionManager(){this.connectionManager=new ConnectionManager({getLastSessionId:()=>{var tt;return(tt=this.sessionInfo.last)==null?void 0:tt.sessionId},endpoints:this.endpoints,onMessage:this.handleMessage,onConnectionError:this.handleConnectionError,connectionStateChanged:this.handleConnectionStateChanged,claimHostAuthToken:this.hostCommunicationMgr.claimAuthToken,resetHostAuthToken:this.hostCommunicationMgr.resetAuthToken,onHostConfigResp:tt=>{const{allowedOrigins:et,useExternalAuthToken:nt,disableFullscreenMode:ot,enableCustomParentMessages:at,mapboxToken:st,enforceDownloadInNewTab:ut,metricsUrl:ct}=tt,pt={allowedOrigins:et,useExternalAuthToken:nt,enableCustomParentMessages:at},dt={mapboxToken:st,disableFullscreenMode:ot,enforceDownloadInNewTab:ut};this.metricsMgr.setMetricsConfig(ct),this.hostCommunicationMgr.setAllowedOrigins(pt),this.setAppConfig(pt),this.setLibConfig(dt)}})}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 tt=document.querySelectorAll("[data-iframe-height]"),et=Array.from(tt).map(nt=>Math.ceil(nt.getBoundingClientRect().bottom));return Math.max(0,...et)}},__vitePreload(()=>import("./iframeResizer.contentWindow.CFL3MAVr.js").then(tt=>tt.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(tt,et){window.prerenderReady===!1&&this.isAppInReadyState(et)&&(window.prerenderReady=!0),this.state.scriptRunState!==et.scriptRunState&&(mark(this.state.scriptRunState),this.state.scriptRunState===ScriptRunState.NOT_RUNNING&&measure("script-run-cycle",ScriptRunState.RUNNING,ScriptRunState.NOT_RUNNING),this.hostCommunicationMgr.sendMessageToHost({type:"SCRIPT_RUN_STATE_CHANGED",scriptRunState:this.state.scriptRunState}))}componentWillUnmount(){var tt;(tt=this.connectionManager)==null||tt.disconnect(),this.hostCommunicationMgr.closeHostCommunication(),window.removeEventListener("popstate",this.onHistoryChange,!1)}showError(tt,et){log.error(et);const nt={type:DialogType.WARNING,title:tt,msg:jsx$1(StreamlitMarkdown$1,{source:et,allowHTML:!1}),onClose:()=>{}};this.openDialog(nt)}hasStreamlitVersionChanged(tt){var nt;let et;if(((nt=window.__streamlit)==null?void 0:nt.ENABLE_RELOAD_BASED_ON_HARDCODED_STREAMLIT_VERSION)===!0?et=define_PACKAGE_METADATA_default.version:this.sessionInfo.isSet&&(et=this.sessionInfo.current.streamlitVersion),et){const{environmentInfo:ot}=tt;if(d$3(ot)&&d$3(ot.streamlitVersion))return et!=ot.streamlitVersion}return!1}maybeSetState(tt){if(tt){const[et,nt]=tt;this.setState(et,nt)}}processThemeInput(tt){const et=this.createThemeHash(tt);if(et===this.state.themeHash)return;this.setState({themeHash:et});const nt=!isPresetTheme(this.props.theme.activeTheme);if(tt){const ot=createTheme(CUSTOM_THEME_NAME,tt);this.props.theme.addThemes([ot]),(getCachedTheme()===null||nt)&&this.setAndSendTheme(ot)}else this.props.theme.addThemes([]),nt&&this.setAndSendTheme(getHostSpecifiedTheme());tt!=null&&tt.fontFaces&&this.props.theme.setImportedTheme(tt)}handleScriptFinished(tt){if(tt===ForwardMsg$1.ScriptFinishedStatus.FINISHED_SUCCESSFULLY||tt===ForwardMsg$1.ScriptFinishedStatus.FINISHED_EARLY_FOR_RERUN||tt===ForwardMsg$1.ScriptFinishedStatus.FINISHED_FRAGMENT_RUN_SUCCESSFULLY){if(window.setTimeout(()=>{this.state.scriptFinishedHandlers.map(et=>et())},0),tt===ForwardMsg$1.ScriptFinishedStatus.FINISHED_SUCCESSFULLY||tt===ForwardMsg$1.ScriptFinishedStatus.FINISHED_FRAGMENT_RUN_SUCCESSFULLY){this.setState(({scriptRunId:nt,fragmentIdsThisRun:ot})=>({elements:this.pendingElementsBuffer.clearStaleNodes(nt,ot)}),()=>{this.pendingElementsBuffer=this.state.elements});const et=new Set(Array.from(this.state.elements.getElements()).map(nt=>getElementId(nt)).filter(notUndefined));this.widgetMgr.removeInactive(et)}this.connectionManager!==null&&tt!==ForwardMsg$1.ScriptFinishedStatus.FINISHED_EARLY_FOR_RERUN&&this.sessionInfo.isSet&&this.connectionManager.incrementMessageCacheRunCount(this.sessionInfo.current.maxCachedMessageAge)}}clearAppState(tt,et,nt,ot){const{hideSidebarNav:at,elements:st}=this.state,ut=at&&st.sidebar||void 0;this.setState({scriptRunId:et,scriptName:nt,appHash:tt,elements:this.appNavigation.clearPageElements(this.pendingElementsBuffer,ot,ut)},()=>{this.pendingElementsBuffer=this.state.elements;const ct=new Set(Array.from(this.state.elements.getElements()).map(pt=>getElementId(pt)).filter(notUndefined));this.widgetMgr.removeInactive(ct)})}openDialog(tt){this.setState({dialog:tt})}render(){const{allowRunOnSave:tt,connectionState:et,dialog:nt,elements:ot,initialSidebarState:at,menuItems:st,isFullScreen:ut,scriptRunId:ct,scriptRunState:pt,userSettings:dt,hideTopBar:ft,hideSidebarNav:bt,hideColoredLine:ht,expandSidebarNav:mt,currentPageScriptHash:Ot,hostHideSidebarNav:yt,pageLinkBaseUrl:Mt,sidebarChevronDownshift:At,hostMenuItems:St,hostToolbarItems:Et,libConfig:zt,appConfig:vt,inputsDisabled:Tt,appPages:$t,navSections:Rt}=this.state,wt=showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode),It=classNames("stApp",getEmbeddingIdClassName(this.embeddingId),{"streamlit-embedded":isEmbed(),"streamlit-wide":dt.wideMode}),kt=nt?StreamlitDialog({...nt,onClose:this.closeDialog}):null,Ft=Tt||et!==ConnectionState.CONNECTED;return jsx$1(AppContext.Provider,{value:{initialSidebarState:at,wideMode:dt.wideMode,embedded:isEmbed(),showPadding:!isEmbed()||isPaddingDisplayed(),disableScrolling:isScrollingHidden(),showToolbar:!isEmbed()||isToolbarDisplayed(),showColoredLine:!ht&&!isEmbed()||isColoredLineDisplayed(),pageLinkBaseUrl:Mt,sidebarChevronDownshift:At,gitInfo:this.state.gitInfo,appConfig:vt},children:jsx$1(LibContext.Provider,{value:{isFullScreen:ut,setFullScreen:this.handleFullScreen,addScriptFinishedHandler:this.addScriptFinishedHandler,removeScriptFinishedHandler:this.removeScriptFinishedHandler,activeTheme:this.props.theme.activeTheme,setTheme:this.setAndSendTheme,availableThemes:this.props.theme.availableThemes,addThemes:this.props.theme.addThemes,onPageChange:this.onPageChange,currentPageScriptHash:Ot,libConfig:zt,fragmentIdsThisRun:this.state.fragmentIdsThisRun,locale:window.navigator.language},children:jsx$1(ReactHotkeys,{keyName:"r,c,esc",onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,children:jsxs(StyledApp,{className:It,"data-testid":"stApp","data-test-script-state":ct==INITIAL_SCRIPT_RUN_ID?"initial":pt,"data-test-connection-state":et,children:[jsxs(Header,{children:[!ft&&jsxs(Fragment,{children:[jsx$1(StatusWidget,{connectionState:et,sessionEventDispatcher:this.sessionEventDispatcher,scriptRunState:pt,rerunScript:this.rerunScript,stopScript:this.stopScript,allowRunOnSave:tt}),jsx$1(ToolbarActions,{hostToolbarItems:Et,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,metricsMgr:this.metricsMgr})]}),this.showDeployButton()&&jsx$1(DeployButton,{onClick:this.deployButtonClicked.bind(this)}),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:St,developmentMode:wt,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,menuItems:st,metricsMgr:this.metricsMgr,toolbarMode:this.state.toolbarMode})]}),jsx$1(AppView,{endpoints:this.endpoints,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,elements:ot,scriptRunId:ct,scriptRunState:pt,widgetMgr:this.widgetMgr,widgetsDisabled:Ft,uploadClient:this.uploadClient,componentRegistry:this.componentRegistry,formsData:this.state.formsData,appLogo:ot.logo,appPages:$t,navSections:Rt,onPageChange:this.onPageChange,currentPageScriptHash:Ot,hideSidebarNav:bt||yt,expandSidebarNav:mt}),kt]})})})})}}const AppWithScreencast=withScreencast(App);function useThemeManager(){const rt=getDefaultTheme(),[tt,et]=reactExports.useState(rt),[nt,ot]=reactExports.useState([]),[at,st]=reactExports.useState([...createPresetThemes(),...isPresetTheme(rt)?[]:[rt]]),ut=ft=>{st([...createPresetThemes(),...ft])},ct=reactExports.useCallback(ft=>{ft!==tt&&(et(ft),ft.name===AUTO_THEME_NAME?removeCachedTheme():setCachedTheme(ft))},[et,tt]),pt=reactExports.useCallback(()=>{tt.name===AUTO_THEME_NAME&&ct(getHostSpecifiedTheme());const ft=at.filter(bt=>bt.name!==AUTO_THEME_NAME);st([createAutoTheme(),...ft])},[tt.name,at,ct]),dt=reactExports.useCallback(ft=>{ft.fontFaces&&ot(ft.fontFaces);const bt=new CustomThemeConfig(ft),ht=createTheme(CUSTOM_THEME_NAME,bt);ct(ht)},[ot,ct]);return reactExports.useEffect(()=>{const ft=window.matchMedia("(prefers-color-scheme: dark)");return ft.addEventListener("change",pt),window.addEventListener("afterprint",pt),()=>{window.removeEventListener("afterprint",pt),ft.removeEventListener("change",pt)}},[tt,at,pt]),[{setTheme:ct,activeTheme:tt,addThemes:ut,availableThemes:at,setImportedTheme:dt},nt]}const ThemedApp=({streamlitExecutionStartedAt:rt})=>{const[tt,et]=useThemeManager(),{activeTheme:nt}=tt,ot=nt.name===CUSTOM_THEME_NAME&&et.length>0;return jsx$1(RootStyleProvider,{theme:nt,children:jsx$1(WindowDimensionsProvider,{children:jsxs(PortalProvider,{children:[ot&&jsx$1(FontFaceDeclaration,{fontFaces:et}),jsx$1(AppWithScreencast,{theme:tt,streamlitExecutionStartedAt:rt})]})})})},streamlitExecutionStartedAt=Date.now(),engine=new StyletronClient({prefix:"st-"});ReactDOM.render(jsx$1(Provider$1,{value:engine,children:jsx$1(ThemedApp,{streamlitExecutionStartedAt})}),document.getElementById("root"));export{_getTag as $,PLACEMENT as A,ACCESSIBILITY_TYPE as B,convertRemToPx as C,DynamicIcon as D,EmotionIconBase as E,Fragment as F,hasLightBackgroundColor as G,Popover$1 as H,require$$0 as I,toString$7 as J,m$4 as K,merge$4 as L,numbro$1 as M,d$3 as N,hooks as O,PortalContext as P,getTimezone as Q,React$1 as R,moment$1 as S,isIntegerType as T,isUnsignedIntegerType as U,isDurationType as V,isPeriodType as W,format as X,isBooleanType as Y,_baseKeys as Z,_extends$Q as _,range$1 as a,ensureError as a$,isArguments_1 as a0,isArray_1 as a1,isArrayLike_1 as a2,isBufferExports as a3,_isPrototype as a4,isTypedArray_1 as a5,DataFrameCellType as a6,Field$1 as a7,Null as a8,isTimeType as a9,mix$1 as aA,getStyledCell as aB,isEqual$1 as aC,StyledTooltipContentWrapper as aD,StreamlitMarkdown$1 as aE,LibContext as aF,Resizable as aG,getGray70 as aH,getGray30 as aI,getCategoricalColorsArray as aJ,getDivergingColorsArray as aK,getSequentialColorsArray as aL,getBlue80 as aM,debounce$4 as aN,Global as aO,_baseMerge as aP,_createAssigner as aQ,withTheme as aR,toaster as aS,Kind as aT,AlertElement as aU,_assertThisInitialized as aV,StyledInlineCode as aW,ErrorElement as aX,Skeleton$1 as aY,Skeleton as aZ,hoistNonReactStatics$2 as a_,convertTimeToDate as aa,isDecimalType as ab,isStringType as ac,isEmptyType as ad,isDatetimeType as ae,isDateType as af,isObjectType as ag,isBytesType as ah,isNumericType as ai,isCategoricalType as aj,isListType as ak,isRangeIndexType as al,loglevelExports$1 as am,Arrow$2 as an,isArray$k as ao,_defineProperty$p as ap,_objectWithoutPropertiesLoose$j as aq,_typeof$c as ar,jsx as as,css as at,requireClassCallCheck as au,requireCreateClass as av,requireInherits as aw,requireToConsumableArray as ax,require_typeof as ay,transparentize as az,reactDomExports as b,Select as b$,lib$3 as b0,parseToRgba as b1,assertNever as b2,DeckGlJsonChart$1 as b3,DEFAULT_IFRAME_FEATURE_POLICY as b4,DEFAULT_IFRAME_SANDBOX_POLICY as b5,darken as b6,BaseButtonSize as b7,BaseButtonKind as b8,BaseButtonTooltip as b9,LabelVisibilityMessage as bA,StyledWidgetLabelHelpInline as bB,themeColors as bC,isMobile_1 as bD,CAMERA_PERMISSION_URL as bE,StyledWidgetLabelHelp as bF,StyledSpinnerIcon as bG,AcceptFileValue as bH,chatInputAcceptFileProtoValueToEnum as bI,isFocusVisible as bJ,getOverride as bK,getOverrideProps as bL,Checkbox$1 as bM,StyledContent as bN,StyledCheckbox$1 as bO,BaseColorPicker$1 as bP,useStyletron as bQ,mergeOverride as bR,toObjectOverride as bS,Icon$1 as bT,UIDConsumer as bU,StatefulMenu as bV,mergeOverrides as bW,ChevronDown$1 as bX,ThemeContext as bY,forkFocus as bZ,forkBlur as b_,DynamicButtonLabel as ba,IsSidebarContext as bb,Placement as bc,getGray90 as bd,getIncreasingGreen as be,getDecreasingRed as bf,PlotlyChart$1 as bg,keysToSnakeCase as bh,WindowDimensionsContext as bi,Video$1 as bj,zip$1 as bk,FileUploaderState as bl,UploadedFileInfo as bm,StyledSpinner as bn,ENABLE_PERIPHERALS_DOCS_URL as bo,Icon$2 as bp,BaseButton as bq,blend as br,labelVisibilityProtoValueToEnum as bs,TooltipIcon as bt,WidgetLabel as bu,Tooltip as bv,styled as bw,getOverrides as bx,LocaleContext as by,ButtonGroup$1 as bz,_hasPath as c,without$1 as c0,fuzzyFilterSelectOptions as c1,TYPE as c2,VirtualDropdown as c3,classNames as c4,UISelectbox as c5,isValidFormId as c6,toPropertyKey as c7,_setPrototypeOf$a as c8,hexToRgb as c9,reactIsExports$1 as cA,NumberInput$1 as cB,withWrapper as ca,__awaiter as cb,PropTypes as cc,isFromWindows as cd,StyledWidgetInstructions as ce,isFromMac as cf,CUSTOM_INPUT_TYPE as cg,SIZE$1 as ch,DeleteAlt$1 as ci,ADJOINED as cj,filterOptions as ck,ENHANCER_POSITION as cl,pick$1 as cm,Slider$2 as cn,ChevronLeft as co,ChevronRight as cp,isInForm as cq,toString_1 as cr,TextInput$1 as cs,ThemeProvider$1 as ct,createThemedStyled as cu,createThemedUseStyletron as cv,createThemedWithStyle as cw,expandBorderStyles as cx,withStyle as cy,getAugmentedNamespace as cz,commonjsGlobal$2 as d,classnamesExports as e,_root as f,getDefaultExportFromCjs$1 as g,isObject_1 as h,isPropValid as i,jsx$1 as j,keyframes as k,_Set as l,_setToArray as m,newStyled as n,_SetCache as o,propTypesExports as p,_arrayIncludes as q,reactExports as r,_arrayIncludesWith as s,toNumber_1 as t,_cacheHas as u,groupBy$1 as v,__vitePreload as w,flatten$2 as x,useTheme as y,jsxs as z};