@stlite/desktop 0.76.1 → 0.76.2

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 (66) hide show
  1. package/bin/dump_artifacts.js +16 -16
  2. package/build/assets/{FileDownload.esm--KUF2yhQ.js → FileDownload.esm-BP72wB_u.js} +1 -1
  3. package/build/assets/{FormClearHelper-D3yotkXf.js → FormClearHelper-BIZNCxvb.js} +1 -1
  4. package/build/assets/{Hooks-rnMPF1_I.js → Hooks-C30HoPXz.js} +1 -1
  5. package/build/assets/{InputInstructions-D1xaOoA_.js → InputInstructions-B9wXy3U4.js} +1 -1
  6. package/build/assets/{ProgressBar-TrtX1yYk.js → ProgressBar-BlPlcnwu.js} +1 -1
  7. package/build/assets/{RenderInPortalIfExists-F44RH20T.js → RenderInPortalIfExists-DSHuT3NO.js} +1 -1
  8. package/build/assets/{Toolbar-CfaA32cH.js → Toolbar-B1zMj-jg.js} +1 -1
  9. package/build/assets/{base-input-Bvc5b-2K.js → base-input-CMN1_Ew_.js} +1 -1
  10. package/build/assets/{createSuper-CxJ5Qet3.js → createSuper-D4gvBB5j.js} +1 -1
  11. package/build/assets/{data-grid-overlay-editor-Bhwq6yq9.js → data-grid-overlay-editor-CgsMGcDx.js} +1 -1
  12. package/build/assets/{downloader-Lbha8Mka.js → downloader-Dv4W7rem.js} +1 -1
  13. package/build/assets/{es6-CJjM6kbP.js → es6-R_bosjbV.js} +2 -2
  14. package/build/assets/{getPrototypeOf-Do3gT2Di.js → getPrototypeOf-CHt6AZp_.js} +1 -1
  15. package/build/assets/{iframeResizer.contentWindow-DknzVf8U.js → iframeResizer.contentWindow-9-Xlr32c.js} +1 -1
  16. package/build/assets/{index-pzpBn5Mj.js → index-8qq2hPcx.js} +1 -1
  17. package/build/assets/{index-j0a753Nr.js → index-B0CwOTPz.js} +1 -1
  18. package/build/assets/{index-Dtz56C3X.js → index-B1L1envm.js} +1 -1
  19. package/build/assets/{index-3jxc0CXG.js → index-B3bELqRU.js} +1 -1
  20. package/build/assets/{index-VISX5Zc0.js → index-B3quCHCi.js} +1 -1
  21. package/build/assets/{index-hQJE4Hk3.js → index-BB6FwCEX.js} +1 -1
  22. package/build/assets/{index-KMQVOp6a.js → index-BDNxxQ4v.js} +1 -1
  23. package/build/assets/{index-CKt_OoH9.js → index-BEeaeEPl.js} +1 -1
  24. package/build/assets/{index-BZtVxUC0.js → index-BKKZmTqZ.js} +1 -1
  25. package/build/assets/{index-VlvN4Fc-.js → index-BL2qQWaL.js} +1 -1
  26. package/build/assets/{index-DQW8WX8T.js → index-BLvsCvkf.js} +1 -1
  27. package/build/assets/{index-BHhK2I00.js → index-BZMvJ6Yf.js} +1 -1
  28. package/build/assets/{index-ohl-VCS7.js → index-Be0wHUx-.js} +1 -1
  29. package/build/assets/{index-DP9d5w-p.js → index-BkBgJKWs.js} +1 -1
  30. package/build/assets/{index-BJ35Ra3B.js → index-Bu07mO_x.js} +1 -1
  31. package/build/assets/{index-Bf-WIrdq.js → index-C9-3Tvo1.js} +1 -1
  32. package/build/assets/{index-C7BdVmrL.js → index-CMQsen11.js} +1 -1
  33. package/build/assets/{index-0dVGR9fp.js → index-CRKAbc7H.js} +1 -1
  34. package/build/assets/{index-DEVPgMwx.js → index-Cjn3IAUe.js} +1 -1
  35. package/build/assets/{index-CKkCIAau.js → index-CoumX680.js} +1 -1
  36. package/build/assets/{index-CQKm6Iu1.js → index-CxiUGvN5.js} +1 -1
  37. package/build/assets/{index-CXJQYh7L.js → index-D2caMYlF.js} +1 -1
  38. package/build/assets/{index-CMbTUrxn.js → index-D7beHGbk.js} +5 -5
  39. package/build/assets/{index-BewMEcPF.js → index-DBeV5cvz.js} +1 -1
  40. package/build/assets/{index-B_-cqmHC.js → index-DP9siobZ.js} +1 -1
  41. package/build/assets/{index-TNhAYJaK.js → index-D_ZpMtCx.js} +1 -1
  42. package/build/assets/{index-DBwYfcOH.js → index-DfPuZgVe.js} +1 -1
  43. package/build/assets/{index-B9g0kqq9.js → index-DgKoCzGM.js} +1 -1
  44. package/build/assets/{index-D_z1Z4Yp.js → index-DjNlghsG.js} +1 -1
  45. package/build/assets/{index-Dv0Prv3W.js → index-DmCDp6tz.js} +1 -1
  46. package/build/assets/{index-DUrta3it.js → index-DqEaj7EU.js} +1 -1
  47. package/build/assets/{index-EOIuoj4I.js → index-DuoBWGu3.js} +4 -4
  48. package/build/assets/{index-bFKuAFZe.js → index-DxHnoro7.js} +1 -1
  49. package/build/assets/{index-Dr_f2tyR.js → index-UQryvozB.js} +1 -1
  50. package/build/assets/{index-Dzngiwb-.js → index-W-TZSd1E.js} +1 -1
  51. package/build/assets/{index-BABCx9XF.js → index-bnfkOWdV.js} +1 -1
  52. package/build/assets/{index-DGh7Hb6h.js → index-dkm5JtmN.js} +1 -1
  53. package/build/assets/{input-5A8NzOK5.js → input-OLwqq6dJ.js} +1 -1
  54. package/build/assets/{memory-B_asHZdO.js → memory-K1u1sl9P.js} +1 -1
  55. package/build/assets/{number-overlay-editor-DH7XBeu0.js → number-overlay-editor-BPRtr2ZH.js} +1 -1
  56. package/build/assets/{sandbox-D_C1UB9w.js → sandbox-CuSVz6A0.js} +1 -1
  57. package/build/assets/{slicedToArray-DPmPM4Il.js → slicedToArray-CFP8r_hv.js} +1 -1
  58. package/build/assets/{textarea-D5BngIZU.js → textarea-BgOZDoS8.js} +1 -1
  59. package/build/assets/{timepicker-DDIjFLFG.js → timepicker-BD9p-9JQ.js} +1 -1
  60. package/build/assets/{uniqueId-CI1tp1qG.js → uniqueId-D81S8Chc.js} +1 -1
  61. package/build/assets/{useBasicWidgetState-C9ZYeVU1.js → useBasicWidgetState-DgnZoFWi.js} +1 -1
  62. package/build/assets/{useOnInputChange-7prOUvRG.js → useOnInputChange-DTjT_cKQ.js} +1 -1
  63. package/build/assets/{withFullScreenWrapper-B9gGgkei.js → withFullScreenWrapper-BzdPuFtI.js} +1 -1
  64. package/build/index.html +1 -1
  65. package/package.json +4 -4
  66. package/wheels/streamlit-1.41.0-cp312-none-any.whl +0 -0
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-TNhAYJaK.js","assets/RenderInPortalIfExists-F44RH20T.js","assets/index-D_z1Z4Yp.js","assets/index-CMbTUrxn.js","assets/FormClearHelper-D3yotkXf.js","assets/withFullScreenWrapper-B9gGgkei.js","assets/Toolbar-CfaA32cH.js","assets/sprintf-C-r3gIuM.js","assets/createDownloadLinkElement-DZMwyjvU.js","assets/slicedToArray-DPmPM4Il.js","assets/getPrototypeOf-Do3gT2Di.js","assets/createSuper-CxJ5Qet3.js","assets/FileDownload.esm--KUF2yhQ.js","assets/index.B26BQfSF.css","assets/index-DEVPgMwx.js","assets/threshold-C19zgWBv.js","assets/string-Bl9OLDCw.js","assets/timer-C68DGyYc.js","assets/index-VISX5Zc0.js","assets/useBasicWidgetState-C9ZYeVU1.js","assets/_commonjs-dynamic-modules-TDtrdbi3.js","assets/index.CG16XVnL.css","assets/index-Dzngiwb-.js","assets/index-bFKuAFZe.js","assets/index-B9g0kqq9.js","assets/index-C7BdVmrL.js","assets/Hooks-rnMPF1_I.js","assets/index-Bf-WIrdq.js","assets/index-Dv0Prv3W.js","assets/index-VlvN4Fc-.js","assets/UploadFileInfo-C-jY39rj.js","assets/ProgressBar-TrtX1yYk.js","assets/index-j0a753Nr.js","assets/InputInstructions-D1xaOoA_.js","assets/inputUtils-CptNuJwn.js","assets/textarea-D5BngIZU.js","assets/base-input-Bvc5b-2K.js","assets/index-CQKm6Iu1.js","assets/index-DUrta3it.js","assets/index-ohl-VCS7.js","assets/timepicker-DDIjFLFG.js","assets/input-5A8NzOK5.js","assets/index-CKt_OoH9.js","assets/index-BewMEcPF.js","assets/index-KMQVOp6a.js","assets/index-B_-cqmHC.js","assets/index-Dtz56C3X.js","assets/index-CXJQYh7L.js","assets/index-hQJE4Hk3.js","assets/uniqueId-CI1tp1qG.js","assets/useOnInputChange-7prOUvRG.js","assets/index-BZtVxUC0.js","assets/index-DQW8WX8T.js","assets/index-0dVGR9fp.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-D_ZpMtCx.js","assets/RenderInPortalIfExists-DSHuT3NO.js","assets/index-DjNlghsG.js","assets/index-D7beHGbk.js","assets/FormClearHelper-BIZNCxvb.js","assets/withFullScreenWrapper-BzdPuFtI.js","assets/Toolbar-B1zMj-jg.js","assets/sprintf-C-r3gIuM.js","assets/createDownloadLinkElement-DZMwyjvU.js","assets/slicedToArray-CFP8r_hv.js","assets/getPrototypeOf-CHt6AZp_.js","assets/createSuper-D4gvBB5j.js","assets/FileDownload.esm-BP72wB_u.js","assets/index.B26BQfSF.css","assets/index-Cjn3IAUe.js","assets/threshold-C19zgWBv.js","assets/string-Bl9OLDCw.js","assets/timer-C68DGyYc.js","assets/index-B3quCHCi.js","assets/useBasicWidgetState-DgnZoFWi.js","assets/_commonjs-dynamic-modules-TDtrdbi3.js","assets/index.CG16XVnL.css","assets/index-W-TZSd1E.js","assets/index-DxHnoro7.js","assets/index-DgKoCzGM.js","assets/index-CMQsen11.js","assets/Hooks-C30HoPXz.js","assets/index-C9-3Tvo1.js","assets/index-DmCDp6tz.js","assets/index-BL2qQWaL.js","assets/UploadFileInfo-C-jY39rj.js","assets/ProgressBar-BlPlcnwu.js","assets/index-B0CwOTPz.js","assets/InputInstructions-B9wXy3U4.js","assets/inputUtils-CptNuJwn.js","assets/textarea-BgOZDoS8.js","assets/base-input-CMN1_Ew_.js","assets/index-CxiUGvN5.js","assets/index-DqEaj7EU.js","assets/index-Be0wHUx-.js","assets/timepicker-BD9p-9JQ.js","assets/input-OLwqq6dJ.js","assets/index-BEeaeEPl.js","assets/index-DBeV5cvz.js","assets/index-BDNxxQ4v.js","assets/index-DP9siobZ.js","assets/index-B1L1envm.js","assets/index-D2caMYlF.js","assets/index-BB6FwCEX.js","assets/uniqueId-D81S8Chc.js","assets/useOnInputChange-DTjT_cKQ.js","assets/index-BKKZmTqZ.js","assets/index-BLvsCvkf.js","assets/index-CRKAbc7H.js"])))=>i.map(i=>d[i]);
2
2
  var Bn=Object.defineProperty;var Dn=Er=>{throw TypeError(Er)};var Fn=(Er,yr,Mr)=>yr in Er?Bn(Er,yr,{enumerable:!0,configurable:!0,writable:!0,value:Mr}):Er[yr]=Mr;var vr=(Er,yr,Mr)=>Fn(Er,typeof yr!="symbol"?yr+"":yr,Mr),pn=(Er,yr,Mr)=>yr.has(Er)||Dn("Cannot "+Mr);var Z0=(Er,yr,Mr)=>(pn(Er,yr,"read from private field"),Mr?Mr.call(Er):yr.get(Er)),Nr=(Er,yr,Mr)=>yr.has(Er)?Dn("Cannot add the same private member more than once"):yr instanceof WeakSet?yr.add(Er):yr.set(Er,Mr),Rr=(Er,yr,Mr,Tr)=>(pn(Er,yr,"write to private field"),Tr?Tr.call(Er,Mr):yr.set(Er,Mr),Mr),ar=(Er,yr,Mr)=>(pn(Er,yr,"access private method"),Mr);let isEqual$1,toString$8,isNullOrUndefined$1,merge$6,numbro$1,EmotionIconBase,notNullOrUndefined,hooks,formatPeriodType,moment$1,getTypeName,format,convertToSeconds,useTheme,Arrow$2,logError,PortalContext,transparentize,React$1,convertRemToPx,logWarning,_defineProperty$u,_objectWithoutProperties$o,_typeof$g,jsx,css$2,_toConsumableArray$3,_extends$Q,range$1,labelVisibilityProtoValueToEnum,Popover$1,StyledTooltipContentWrapper,StreamlitMarkdown$1,PLACEMENT,ACCESSIBILITY_TYPE,hasLightBackgroundColor,LibContext,debounce$4,Resizable,IndexTypeName,getAugmentedNamespace,DEFAULT_IFRAME_FEATURE_POLICY,DEFAULT_IFRAME_SANDBOX_POLICY,useStliteMediaObjects,darken,BaseButtonSize,BaseButtonKind,BaseButtonTooltip,DynamicButtonLabel,IsSidebarContext,Placement,getGray90,getIncreasingGreen,getDecreasingRed,PlotlyChart$1,keysToSnakeCase,WindowDimensionsContext,Video$1,zip$1,FileUploaderState,UploadedFileInfo,StyledSpinner,ENABLE_PERIPHERALS_DOCS_URL,BaseButton,Icon$2,blend,WidgetLabel,_baseMerge,_createAssigner,getGray70,getGray30,getCategoricalColorsArray,getDivergingColorsArray,getSequentialColorsArray,getBlue80,Global,ensureError,withTheme,DynamicIcon,toaster,AlertElement,Kind,_assertThisInitialized$e,ErrorElement,StyledInlineCode,axios,Skeleton,Skeleton$1,hoistNonReactStatics$2,lib$3,parseToRgba,DeckGlJsonChart$1,_unsupportedIterableToArray$l,reactDomExports,TextInput$1,TooltipIcon,Tooltip,styled,getOverrides,LocaleContext,ButtonGroup$1,LabelVisibilityMessage,StyledWidgetLabelHelpInline,useStliteKernel,themeColors,isPresetTheme,classNames,isValidFormId,toPropertyKey,_setPrototypeOf$e,hexToRgb,withWrapper,StyledWidgetInstructions,isFromMac,SIZE$1,CUSTOM_INPUT_TYPE,DeleteAlt$1,ADJOINED,filterOptions,ENHANCER_POSITION,UISelectbox,pick$1,Slider$2,isFromWindows,__awaiter,__generator,__spread,PropTypes,ChevronLeft,ChevronRight,isInForm,toString_1,isMobile_1,CAMERA_PERMISSION_URL,StyledWidgetLabelHelp,isFocusVisible,getOverride,getOverrideProps,StyledCheckbox$1,Checkbox$1,StyledContent,BaseColorPicker,useStyletron,mergeOverride,toObjectOverride,Icon$1,UIDConsumer,StatefulMenu,mergeOverrides,ChevronDown$1,ThemeContext,forkFocus,forkBlur,Select,without$1,fuzzyFilterSelectOptions,TYPE,VirtualDropdown,createStyled,ThemeProvider$1,createThemedStyled,createThemedUseStyletron,createThemedWithStyle,expandBorderStyles,withStyle,reactIsExports$1,NumberInput$1,_hasPath,commonjsGlobal$1,classnamesExports,getDefaultExportFromCjs$1,_root,isPropValid,jsxRuntimeExports,keyframes,isObject_1,_Set,_setToArray,_SetCache,propTypesExports,_arrayIncludes,reactExports,_arrayIncludesWith,toNumber_1,useStliteMediaObjectUrl,_cacheHas,groupBy$1,__vitePreload,flatten$2,require$$0$2,__tla=(async()=>{var yr,Mr,Tr,Dr,l1,d1,Fr,b1,f1,h1,nr,$r,_n,gn,B1,K1,Xr,Mn,Tn,Y1,wn,Cn,J1,C1,p1,Rn,$n,xn,qn,r1,kn,On,Qr,c1,m1,xr,Gr,g1,yn,zn,M1;function _mergeNamespaces(ot,et){for(var ct=0;ct<et.length;ct++){const ut=et[ct];if(typeof ut!="string"&&!Array.isArray(ut)){for(const dt in ut)if(dt!=="default"&&!(dt in ot)){const ft=Object.getOwnPropertyDescriptor(ut,dt);ft&&Object.defineProperty(ot,dt,ft.get?ft:{enumerable:!0,get:()=>ut[dt]})}}}return Object.freeze(Object.defineProperty(ot,Symbol.toStringTag,{value:"Module"}))}(function(){const ot=document.createElement("link").relList;if(ot&&ot.supports&&ot.supports("modulepreload"))return;for(const ut of document.querySelectorAll('link[rel="modulepreload"]'))ct(ut);new MutationObserver(ut=>{for(const dt of ut)if(dt.type==="childList")for(const ft of dt.addedNodes)ft.tagName==="LINK"&&ft.rel==="modulepreload"&&ct(ft)}).observe(document,{childList:!0,subtree:!0});function et(ut){const dt={};return ut.integrity&&(dt.integrity=ut.integrity),ut.referrerPolicy&&(dt.referrerPolicy=ut.referrerPolicy),ut.crossOrigin==="use-credentials"?dt.credentials="include":ut.crossOrigin==="anonymous"?dt.credentials="omit":dt.credentials="same-origin",dt}function ct(ut){if(ut.ep)return;ut.ep=!0;const dt=et(ut);fetch(ut.href,dt)}})(),commonjsGlobal$1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},getDefaultExportFromCjs$1=function(ot){return ot&&ot.__esModule&&Object.prototype.hasOwnProperty.call(ot,"default")?ot.default:ot},getAugmentedNamespace=function(ot){if(ot.__esModule)return ot;var et=ot.default;if(typeof et=="function"){var ct=function ut(){return this instanceof ut?Reflect.construct(et,arguments,this.constructor):et.apply(this,arguments)};ct.prototype=et.prototype}else ct={};return Object.defineProperty(ct,"__esModule",{value:!0}),Object.keys(ot).forEach(function(ut){var dt=Object.getOwnPropertyDescriptor(ot,ut);Object.defineProperty(ct,ut,dt.get?dt:{enumerable:!0,get:function(){return ot[ut]}})}),ct};var jsxRuntime={exports:{}},reactJsxRuntime_production_min={},react={exports:{}},react_production_min={},l$4=Symbol.for("react.element"),n$4=Symbol.for("react.portal"),p$6=Symbol.for("react.fragment"),q$5=Symbol.for("react.strict_mode"),r$4=Symbol.for("react.profiler"),t$3=Symbol.for("react.provider"),u$2=Symbol.for("react.context"),v$6=Symbol.for("react.forward_ref"),w$4=Symbol.for("react.suspense"),x$4=Symbol.for("react.memo"),y$4=Symbol.for("react.lazy"),z$5=Symbol.iterator;function A$3(ot){return ot===null||typeof ot!="object"?null:(ot=z$5&&ot[z$5]||ot["@@iterator"],typeof ot=="function"?ot:null)}var B$4={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C$3=Object.assign,D$4={};function E$3(ot,et,ct){this.props=ot,this.context=et,this.refs=D$4,this.updater=ct||B$4}E$3.prototype.isReactComponent={},E$3.prototype.setState=function(ot,et){if(typeof ot!="object"&&typeof ot!="function"&&ot!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,ot,et,"setState")},E$3.prototype.forceUpdate=function(ot){this.updater.enqueueForceUpdate(this,ot,"forceUpdate")};function F$3(){}F$3.prototype=E$3.prototype;function G$4(ot,et,ct){this.props=ot,this.context=et,this.refs=D$4,this.updater=ct||B$4}var H$3=G$4.prototype=new F$3;H$3.constructor=G$4,C$3(H$3,E$3.prototype),H$3.isPureReactComponent=!0;var I$3=Array.isArray,J$3=Object.prototype.hasOwnProperty,K$3={current:null},L$3={key:!0,ref:!0,__self:!0,__source:!0};function M$3(ot,et,ct){var ut,dt={},ft=null,zt=null;if(et!=null)for(ut in et.ref!==void 0&&(zt=et.ref),et.key!==void 0&&(ft=""+et.key),et)J$3.call(et,ut)&&!L$3.hasOwnProperty(ut)&&(dt[ut]=et[ut]);var Dt=arguments.length-2;if(Dt===1)dt.children=ct;else if(1<Dt){for(var St=Array(Dt),Tt=0;Tt<Dt;Tt++)St[Tt]=arguments[Tt+2];dt.children=St}if(ot&&ot.defaultProps)for(ut in Dt=ot.defaultProps,Dt)dt[ut]===void 0&&(dt[ut]=Dt[ut]);return{$$typeof:l$4,type:ot,key:ft,ref:zt,props:dt,_owner:K$3.current}}function N$4(ot,et){return{$$typeof:l$4,type:ot.type,key:et,ref:ot.ref,props:ot.props,_owner:ot._owner}}function O$2(ot){return typeof ot=="object"&&ot!==null&&ot.$$typeof===l$4}function escape$2(ot){var et={"=":"=0",":":"=2"};return"$"+ot.replace(/[=:]/g,function(ct){return et[ct]})}var P$3=/\/+/g;function Q$4(ot,et){return typeof ot=="object"&&ot!==null&&ot.key!=null?escape$2(""+ot.key):et.toString(36)}function R$3(ot,et,ct,ut,dt){var ft=typeof ot;(ft==="undefined"||ft==="boolean")&&(ot=null);var zt=!1;if(ot===null)zt=!0;else switch(ft){case"string":case"number":zt=!0;break;case"object":switch(ot.$$typeof){case l$4:case n$4:zt=!0}}if(zt)return zt=ot,dt=dt(zt),ot=ut===""?"."+Q$4(zt,0):ut,I$3(dt)?(ct="",ot!=null&&(ct=ot.replace(P$3,"$&/")+"/"),R$3(dt,et,ct,"",function(Tt){return Tt})):dt!=null&&(O$2(dt)&&(dt=N$4(dt,ct+(!dt.key||zt&&zt.key===dt.key?"":(""+dt.key).replace(P$3,"$&/")+"/")+ot)),et.push(dt)),1;if(zt=0,ut=ut===""?".":ut+":",I$3(ot))for(var Dt=0;Dt<ot.length;Dt++){ft=ot[Dt];var St=ut+Q$4(ft,Dt);zt+=R$3(ft,et,ct,St,dt)}else if(St=A$3(ot),typeof St=="function")for(ot=St.call(ot),Dt=0;!(ft=ot.next()).done;)ft=ft.value,St=ut+Q$4(ft,Dt++),zt+=R$3(ft,et,ct,St,dt);else if(ft==="object")throw et=String(ot),Error("Objects are not valid as a React child (found: "+(et==="[object Object]"?"object with keys {"+Object.keys(ot).join(", ")+"}":et)+"). If you meant to render a collection of children, use an array instead.");return zt}function S$4(ot,et,ct){if(ot==null)return ot;var ut=[],dt=0;return R$3(ot,ut,"","",function(ft){return et.call(ct,ft,dt++)}),ut}function T$3(ot){if(ot._status===-1){var et=ot._result;et=et(),et.then(function(ct){(ot._status===0||ot._status===-1)&&(ot._status=1,ot._result=ct)},function(ct){(ot._status===0||ot._status===-1)&&(ot._status=2,ot._result=ct)}),ot._status===-1&&(ot._status=0,ot._result=et)}if(ot._status===1)return ot._result.default;throw ot._result}var U$3={current:null},V$3={transition:null},W$4={ReactCurrentDispatcher:U$3,ReactCurrentBatchConfig:V$3,ReactCurrentOwner:K$3};react_production_min.Children={map:S$4,forEach:function(ot,et,ct){S$4(ot,function(){et.apply(this,arguments)},ct)},count:function(ot){var et=0;return S$4(ot,function(){et++}),et},toArray:function(ot){return S$4(ot,function(et){return et})||[]},only:function(ot){if(!O$2(ot))throw Error("React.Children.only expected to receive a single React element child.");return ot}},react_production_min.Component=E$3,react_production_min.Fragment=p$6,react_production_min.Profiler=r$4,react_production_min.PureComponent=G$4,react_production_min.StrictMode=q$5,react_production_min.Suspense=w$4,react_production_min.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=W$4,react_production_min.cloneElement=function(ot,et,ct){if(ot==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+ot+".");var ut=C$3({},ot.props),dt=ot.key,ft=ot.ref,zt=ot._owner;if(et!=null){if(et.ref!==void 0&&(ft=et.ref,zt=K$3.current),et.key!==void 0&&(dt=""+et.key),ot.type&&ot.type.defaultProps)var Dt=ot.type.defaultProps;for(St in et)J$3.call(et,St)&&!L$3.hasOwnProperty(St)&&(ut[St]=et[St]===void 0&&Dt!==void 0?Dt[St]:et[St])}var St=arguments.length-2;if(St===1)ut.children=ct;else if(1<St){Dt=Array(St);for(var Tt=0;Tt<St;Tt++)Dt[Tt]=arguments[Tt+2];ut.children=Dt}return{$$typeof:l$4,type:ot.type,key:dt,ref:ft,props:ut,_owner:zt}},react_production_min.createContext=function(ot){return ot={$$typeof:u$2,_currentValue:ot,_currentValue2:ot,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},ot.Provider={$$typeof:t$3,_context:ot},ot.Consumer=ot},react_production_min.createElement=M$3,react_production_min.createFactory=function(ot){var et=M$3.bind(null,ot);return et.type=ot,et},react_production_min.createRef=function(){return{current:null}},react_production_min.forwardRef=function(ot){return{$$typeof:v$6,render:ot}},react_production_min.isValidElement=O$2,react_production_min.lazy=function(ot){return{$$typeof:y$4,_payload:{_status:-1,_result:ot},_init:T$3}},react_production_min.memo=function(ot,et){return{$$typeof:x$4,type:ot,compare:et===void 0?null:et}},react_production_min.startTransition=function(ot){var et=V$3.transition;V$3.transition={};try{ot()}finally{V$3.transition=et}},react_production_min.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},react_production_min.useCallback=function(ot,et){return U$3.current.useCallback(ot,et)},react_production_min.useContext=function(ot){return U$3.current.useContext(ot)},react_production_min.useDebugValue=function(){},react_production_min.useDeferredValue=function(ot){return U$3.current.useDeferredValue(ot)},react_production_min.useEffect=function(ot,et){return U$3.current.useEffect(ot,et)},react_production_min.useId=function(){return U$3.current.useId()},react_production_min.useImperativeHandle=function(ot,et,ct){return U$3.current.useImperativeHandle(ot,et,ct)},react_production_min.useInsertionEffect=function(ot,et){return U$3.current.useInsertionEffect(ot,et)},react_production_min.useLayoutEffect=function(ot,et){return U$3.current.useLayoutEffect(ot,et)},react_production_min.useMemo=function(ot,et){return U$3.current.useMemo(ot,et)},react_production_min.useReducer=function(ot,et,ct){return U$3.current.useReducer(ot,et,ct)},react_production_min.useRef=function(ot){return U$3.current.useRef(ot)},react_production_min.useState=function(ot){return U$3.current.useState(ot)},react_production_min.useSyncExternalStore=function(ot,et,ct){return U$3.current.useSyncExternalStore(ot,et,ct)},react_production_min.useTransition=function(){return U$3.current.useTransition()},react_production_min.version="18.2.0",react.exports=react_production_min,reactExports=react.exports;let React$2;React$1=getDefaultExportFromCjs$1(reactExports),React$2=_mergeNamespaces({__proto__:null,default:React$1},[reactExports]);var f$3=reactExports,k$4=Symbol.for("react.element"),l$3=Symbol.for("react.fragment"),m$5=Object.prototype.hasOwnProperty,n$3=f$3.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p$5={key:!0,ref:!0,__self:!0,__source:!0};function q$4(ot,et,ct){var ut,dt={},ft=null,zt=null;ct!==void 0&&(ft=""+ct),et.key!==void 0&&(ft=""+et.key),et.ref!==void 0&&(zt=et.ref);for(ut in et)m$5.call(et,ut)&&!p$5.hasOwnProperty(ut)&&(dt[ut]=et[ut]);if(ot&&ot.defaultProps)for(ut in et=ot.defaultProps,et)dt[ut]===void 0&&(dt[ut]=et[ut]);return{$$typeof:k$4,type:ot,key:ft,ref:zt,props:dt,_owner:n$3.current}}reactJsxRuntime_production_min.Fragment=l$3,reactJsxRuntime_production_min.jsx=q$4,reactJsxRuntime_production_min.jsxs=q$4,jsxRuntime.exports=reactJsxRuntime_production_min;let reactDom,reactDom_production_min,scheduler,scheduler_production_min;jsxRuntimeExports=jsxRuntime.exports,reactDom={exports:{}},reactDom_production_min={},scheduler={exports:{}},scheduler_production_min={},function(ot){function et(I0,F0){var p0=I0.length;I0.push(F0);e:for(;0<p0;){var x0=p0-1>>>1,c0=I0[x0];if(0<dt(c0,F0))I0[x0]=F0,I0[p0]=c0,p0=x0;else break e}}function ct(I0){return I0.length===0?null:I0[0]}function ut(I0){if(I0.length===0)return null;var F0=I0[0],p0=I0.pop();if(p0!==F0){I0[0]=p0;e:for(var x0=0,c0=I0.length,i0=c0>>>1;x0<i0;){var M0=2*(x0+1)-1,k0=I0[M0],q0=M0+1,N0=I0[q0];if(0>dt(k0,p0))q0<c0&&0>dt(N0,k0)?(I0[x0]=N0,I0[q0]=p0,x0=q0):(I0[x0]=k0,I0[M0]=p0,x0=M0);else if(q0<c0&&0>dt(N0,p0))I0[x0]=N0,I0[q0]=p0,x0=q0;else break e}}return F0}function dt(I0,F0){var p0=I0.sortIndex-F0.sortIndex;return p0!==0?p0:I0.id-F0.id}if(typeof performance=="object"&&typeof performance.now=="function"){var ft=performance;ot.unstable_now=function(){return ft.now()}}else{var zt=Date,Dt=zt.now();ot.unstable_now=function(){return zt.now()-Dt}}var St=[],Tt=[],Rt=1,$t=null,kt=3,Bt=!1,Ft=!1,jt=!1,Kt=typeof setTimeout=="function"?setTimeout:null,Yt=typeof clearTimeout=="function"?clearTimeout:null,Ut=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Jt(I0){for(var F0=ct(Tt);F0!==null;){if(F0.callback===null)ut(Tt);else if(F0.startTime<=I0)ut(Tt),F0.sortIndex=F0.expirationTime,et(St,F0);else break;F0=ct(Tt)}}function Ht(I0){if(jt=!1,Jt(I0),!Ft)if(ct(St)!==null)Ft=!0,E0(e0);else{var F0=ct(Tt);F0!==null&&H0(Ht,F0.startTime-I0)}}function e0(I0,F0){Ft=!1,jt&&(jt=!1,Yt(o0),o0=-1),Bt=!0;var p0=kt;try{for(Jt(F0),$t=ct(St);$t!==null&&(!($t.expirationTime>F0)||I0&&!a0());){var x0=$t.callback;if(typeof x0=="function"){$t.callback=null,kt=$t.priorityLevel;var c0=x0($t.expirationTime<=F0);F0=ot.unstable_now(),typeof c0=="function"?$t.callback=c0:$t===ct(St)&&ut(St),Jt(F0)}else ut(St);$t=ct(St)}if($t!==null)var i0=!0;else{var M0=ct(Tt);M0!==null&&H0(Ht,M0.startTime-F0),i0=!1}return i0}finally{$t=null,kt=p0,Bt=!1}}var t0=!1,Zt=null,o0=-1,n0=5,r0=-1;function a0(){return!(ot.unstable_now()-r0<n0)}function u0(){if(Zt!==null){var I0=ot.unstable_now();r0=I0;var F0=!0;try{F0=Zt(!0,I0)}finally{F0?b0():(t0=!1,Zt=null)}}else t0=!1}var b0;if(typeof Ut=="function")b0=function(){Ut(u0)};else if(typeof MessageChannel<"u"){var T0=new MessageChannel,O0=T0.port2;T0.port1.onmessage=u0,b0=function(){O0.postMessage(null)}}else b0=function(){Kt(u0,0)};function E0(I0){Zt=I0,t0||(t0=!0,b0())}function H0(I0,F0){o0=Kt(function(){I0(ot.unstable_now())},F0)}ot.unstable_IdlePriority=5,ot.unstable_ImmediatePriority=1,ot.unstable_LowPriority=4,ot.unstable_NormalPriority=3,ot.unstable_Profiling=null,ot.unstable_UserBlockingPriority=2,ot.unstable_cancelCallback=function(I0){I0.callback=null},ot.unstable_continueExecution=function(){Ft||Bt||(Ft=!0,E0(e0))},ot.unstable_forceFrameRate=function(I0){0>I0||125<I0?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):n0=0<I0?Math.floor(1e3/I0):5},ot.unstable_getCurrentPriorityLevel=function(){return kt},ot.unstable_getFirstCallbackNode=function(){return ct(St)},ot.unstable_next=function(I0){switch(kt){case 1:case 2:case 3:var F0=3;break;default:F0=kt}var p0=kt;kt=F0;try{return I0()}finally{kt=p0}},ot.unstable_pauseExecution=function(){},ot.unstable_requestPaint=function(){},ot.unstable_runWithPriority=function(I0,F0){switch(I0){case 1:case 2:case 3:case 4:case 5:break;default:I0=3}var p0=kt;kt=I0;try{return F0()}finally{kt=p0}},ot.unstable_scheduleCallback=function(I0,F0,p0){var x0=ot.unstable_now();switch(typeof p0=="object"&&p0!==null?(p0=p0.delay,p0=typeof p0=="number"&&0<p0?x0+p0:x0):p0=x0,I0){case 1:var c0=-1;break;case 2:c0=250;break;case 5:c0=1073741823;break;case 4:c0=1e4;break;default:c0=5e3}return c0=p0+c0,I0={id:Rt++,callback:F0,priorityLevel:I0,startTime:p0,expirationTime:c0,sortIndex:-1},p0>x0?(I0.sortIndex=p0,et(Tt,I0),ct(St)===null&&I0===ct(Tt)&&(jt?(Yt(o0),o0=-1):jt=!0,H0(Ht,p0-x0))):(I0.sortIndex=c0,et(St,I0),Ft||Bt||(Ft=!0,E0(e0))),I0},ot.unstable_shouldYield=a0,ot.unstable_wrapCallback=function(I0){var F0=kt;return function(){var p0=kt;kt=F0;try{return I0.apply(this,arguments)}finally{kt=p0}}}}(scheduler_production_min),scheduler.exports=scheduler_production_min;var schedulerExports=scheduler.exports,aa=reactExports,ca=schedulerExports;function p$4(ot){for(var et="https://reactjs.org/docs/error-decoder.html?invariant="+ot,ct=1;ct<arguments.length;ct++)et+="&args[]="+encodeURIComponent(arguments[ct]);return"Minified React error #"+ot+"; visit "+et+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var da=new Set,ea={};function fa(ot,et){ha(ot,et),ha(ot+"Capture",et)}function ha(ot,et){for(ea[ot]=et,ot=0;ot<et.length;ot++)da.add(et[ot])}var ia=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ja=Object.prototype.hasOwnProperty,ka=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,la={},ma={};function oa(ot){return ja.call(ma,ot)?!0:ja.call(la,ot)?!1:ka.test(ot)?ma[ot]=!0:(la[ot]=!0,!1)}function pa(ot,et,ct,ut){if(ct!==null&&ct.type===0)return!1;switch(typeof et){case"function":case"symbol":return!0;case"boolean":return ut?!1:ct!==null?!ct.acceptsBooleans:(ot=ot.toLowerCase().slice(0,5),ot!=="data-"&&ot!=="aria-");default:return!1}}function qa(ot,et,ct,ut){if(et===null||typeof et>"u"||pa(ot,et,ct,ut))return!0;if(ut)return!1;if(ct!==null)switch(ct.type){case 3:return!et;case 4:return et===!1;case 5:return isNaN(et);case 6:return isNaN(et)||1>et}return!1}function v$5(ot,et,ct,ut,dt,ft,zt){this.acceptsBooleans=et===2||et===3||et===4,this.attributeName=ut,this.attributeNamespace=dt,this.mustUseProperty=ct,this.propertyName=ot,this.type=et,this.sanitizeURL=ft,this.removeEmptyString=zt}var z$4={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(ot){z$4[ot]=new v$5(ot,0,!1,ot,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(ot){var et=ot[0];z$4[et]=new v$5(et,1,!1,ot[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(ot){z$4[ot]=new v$5(ot,2,!1,ot.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(ot){z$4[ot]=new v$5(ot,2,!1,ot,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(ot){z$4[ot]=new v$5(ot,3,!1,ot.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(ot){z$4[ot]=new v$5(ot,3,!0,ot,null,!1,!1)}),["capture","download"].forEach(function(ot){z$4[ot]=new v$5(ot,4,!1,ot,null,!1,!1)}),["cols","rows","size","span"].forEach(function(ot){z$4[ot]=new v$5(ot,6,!1,ot,null,!1,!1)}),["rowSpan","start"].forEach(function(ot){z$4[ot]=new v$5(ot,5,!1,ot.toLowerCase(),null,!1,!1)});var ra=/[\-:]([a-z])/g;function sa$1(ot){return ot[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(ot){var et=ot.replace(ra,sa$1);z$4[et]=new v$5(et,1,!1,ot,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(ot){var et=ot.replace(ra,sa$1);z$4[et]=new v$5(et,1,!1,ot,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(ot){var et=ot.replace(ra,sa$1);z$4[et]=new v$5(et,1,!1,ot,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(ot){z$4[ot]=new v$5(ot,1,!1,ot.toLowerCase(),null,!1,!1)}),z$4.xlinkHref=new v$5("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(ot){z$4[ot]=new v$5(ot,1,!1,ot.toLowerCase(),null,!0,!0)});function ta(ot,et,ct,ut){var dt=z$4.hasOwnProperty(et)?z$4[et]:null;(dt!==null?dt.type!==0:ut||!(2<et.length)||et[0]!=="o"&&et[0]!=="O"||et[1]!=="n"&&et[1]!=="N")&&(qa(et,ct,dt,ut)&&(ct=null),ut||dt===null?oa(et)&&(ct===null?ot.removeAttribute(et):ot.setAttribute(et,""+ct)):dt.mustUseProperty?ot[dt.propertyName]=ct===null?dt.type===3?!1:"":ct:(et=dt.attributeName,ut=dt.attributeNamespace,ct===null?ot.removeAttribute(et):(dt=dt.type,ct=dt===3||dt===4&&ct===!0?"":""+ct,ut?ot.setAttributeNS(ut,et,ct):ot.setAttribute(et,ct))))}var ua$1=aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,va=Symbol.for("react.element"),wa=Symbol.for("react.portal"),ya=Symbol.for("react.fragment"),za=Symbol.for("react.strict_mode"),Aa=Symbol.for("react.profiler"),Ba=Symbol.for("react.provider"),Ca=Symbol.for("react.context"),Da=Symbol.for("react.forward_ref"),Ea=Symbol.for("react.suspense"),Fa=Symbol.for("react.suspense_list"),Ga=Symbol.for("react.memo"),Ha=Symbol.for("react.lazy"),Ia=Symbol.for("react.offscreen"),Ja=Symbol.iterator;function Ka(ot){return ot===null||typeof ot!="object"?null:(ot=Ja&&ot[Ja]||ot["@@iterator"],typeof ot=="function"?ot:null)}var A$2=Object.assign,La;function Ma(ot){if(La===void 0)try{throw Error()}catch(ct){var et=ct.stack.trim().match(/\n( *(at )?)/);La=et&&et[1]||""}return`
3
3
  `+La+ot}var Na=!1;function Oa(ot,et){if(!ot||Na)return"";Na=!0;var ct=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(et)if(et=function(){throw Error()},Object.defineProperty(et.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(et,[])}catch(Tt){var ut=Tt}Reflect.construct(ot,[],et)}else{try{et.call()}catch(Tt){ut=Tt}ot.call(et.prototype)}else{try{throw Error()}catch(Tt){ut=Tt}ot()}}catch(Tt){if(Tt&&ut&&typeof Tt.stack=="string"){for(var dt=Tt.stack.split(`
4
4
  `),ft=ut.stack.split(`
@@ -408,7 +408,7 @@ If this is an installed component that works locally, the app may be having trou
408
408
 
409
409
  For more troubleshooting help, please see the [Streamlit Component docs](${COMPONENT_DEVELOPER_URL}) or visit our [forums](${COMMUNITY_URL}).`,ct}function tryParseArgs(ot,et,ct,ut){if(!ut)try{return parseArgs(ot,et)}catch(dt){const ft=ensureError(dt);ct(ft)}return[{},[]]}function compareDataframeArgs(ot,et){return ot===et||ot.length===et.length&&ot.every((ct,ut)=>{const dt=et[ut];return ct.key===dt.key&&ct.value===dt.value})}function ComponentInstance(ot){const[et,ct]=reactExports.useState(),{disabled:ut,element:dt,registry:ft,theme:zt,widgetMgr:Dt,width:St,fragmentId:Tt}=ot,{componentName:Rt,jsonArgs:$t,specialArgs:kt,url:Bt}=dt,[Ft,jt]=tryParseArgs($t,kt,ct,et),Kt=reactExports.useRef({args:{},dataframeArgs:[]}),Yt=compareDataframeArgs(Kt.current.dataframeArgs,jt);Kt.current.args=Ft,Kt.current.dataframeArgs=jt;const[Ut,Jt]=reactExports.useState(),[Ht,e0]=reactExports.useState(isNaN(Ft.height)?void 0:Ft.height),t0=reactExports.useRef(!1),Zt=reactExports.useRef(null),o0=reactExports.useRef(),n0=useTimeout(()=>logWarning(getWarnMessage(Rt,Bt)),COMPONENT_READY_WARNING_TIME_MS/4),r0=useTimeout(()=>Jt(!0),COMPONENT_READY_WARNING_TIME_MS);if(reactExports.useEffect(()=>{t0.current&&sendRenderMessage(Kt.current.args,Kt.current.dataframeArgs,ut,zt,Zt.current??void 0)},[ut,Ht,Yt,$t,zt,St]),reactExports.useEffect(()=>{const b0=O0=>{O0!==void 0&&O0!==Ht&&(isNullOrUndefined$1(Zt.current)||(Zt.current.height=O0.toString(),e0(O0)))},T0=()=>{sendRenderMessage(Kt.current.args,Kt.current.dataframeArgs,ut,zt,Zt.current??void 0),n0(),r0(),t0.current=!0,Jt(!1)};o0.current={isReady:()=>t0.current,element:dt,widgetMgr:Dt,setComponentError:ct,componentReadyCallback:T0,frameHeightCallback:b0,fragmentId:Tt}},[Rt,ut,dt,Ht,Yt,Ut,$t,zt,Dt,r0,n0,Tt]),reactExports.useEffect(()=>{var T0;const b0=((T0=Zt.current)==null?void 0:T0.contentWindow)??void 0;if(b0)return ft.registerListener(b0,createIframeMessageHandler(o0)),()=>{b0&&ft.deregisterListener(b0)}},[ft,Rt]),et)return jsxRuntimeExports.jsx(ErrorElement,{name:et.name,message:et.message});const a0=!t0.current&&!Ut&&Ht!==0&&jsxRuntimeExports.jsx(Skeleton,{element:Skeleton$1.create({height:Ht,style:Skeleton$1.SkeletonStyle.ELEMENT})}),u0=!t0.current&&Ut?jsxRuntimeExports.jsx(AlertElement,{width:St,body:getWarnMessage(Rt,Bt),kind:Kind.WARNING}):null;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[a0,u0,jsxRuntimeExports.jsx(CustomComponentIFrame,{IframeComponent:StyledComponentIframe,className:"stCustomComponentV1","data-testid":"stCustomComponentV1",allow:DEFAULT_IFRAME_FEATURE_POLICY,ref:Zt,src:getSrc(Rt,ft,Bt),width:St,height:Ht??0,scrolling:"no",sandbox:DEFAULT_IFRAME_SANDBOX_POLICY,title:Rt,componentReady:t0.current})]})}const ComponentInstance$1=withTheme(ComponentInstance);class ComponentRegistry{constructor(et){this.msgListeners=new Map,this.registerListener=(ct,ut)=>{this.msgListeners.has(ct),this.msgListeners.set(ct,ut)},this.deregisterListener=ct=>{this.msgListeners.delete(ct)},this.getComponentURL=(ct,ut)=>this.endpoints.buildComponentURL(ct,ut),this.onMessageEvent=ct=>{if(isNullOrUndefined$1(ct.data)||!ct.data.hasOwnProperty("isStreamlitMessage"))return;if(isNullOrUndefined$1(ct.source)){logWarning("Received component message with no eventSource!",ct.data);return}const ut=this.msgListeners.get(ct.source);if(isNullOrUndefined$1(ut)||typeof ut!="function"){logWarning("Received component message for unregistered ComponentInstance!",ct.data);return}const{type:dt}=ct.data;if(isNullOrUndefined$1(dt)){logWarning("Received Streamlit message with no type!",ct.data);return}ut(dt,ct.data)},this.endpoints=et,window.addEventListener("message",this.onMessageEvent)}}const Maybe=reactExports.memo(function ot({children:et}){return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:et})},(ot,et)=>!(ot.enable||et.enable));function makeMarkdownHeading(ot,et){switch(ot.toLowerCase()){case Tags.H1:return`# ${et}`;case Tags.H2:return`## ${et}`;case Tags.H3:return`### ${et}`;default:throw new Error(`Unrecognized tag for header: ${ot}`)}}function Heading(ot){const{width:et,element:ct}=ot,{tag:ut,anchor:dt,body:ft,help:zt,hideAnchor:Dt,divider:St}=ct,Tt=React$1.useContext(IsSidebarContext),Rt=React$1.useContext(IsDialogContext),[$t,...kt]=ft.split(`
410
410
  `);return jsxRuntimeExports.jsxs("div",{style:{width:et},className:"stHeading","data-testid":"stHeading",children:[jsxRuntimeExports.jsxs(StyledStreamlitMarkdown,{isCaption:!1,isInSidebarOrDialog:Tt||Rt,style:{width:et},"data-testid":"stMarkdownContainer",children:[jsxRuntimeExports.jsx(HeadingWithActionElements,{anchor:dt,help:zt,hideAnchor:Dt,tag:ut,children:jsxRuntimeExports.jsx(RenderedMarkdown,{allowHTML:!1,source:makeMarkdownHeading(ut,$t),overrideComponents:{p:reactExports.Fragment,h1:reactExports.Fragment,h2:reactExports.Fragment,h3:reactExports.Fragment,h4:reactExports.Fragment,h5:reactExports.Fragment,h6:reactExports.Fragment}})}),kt.length>0&&jsxRuntimeExports.jsx(RenderedMarkdown,{source:kt.join(`
411
- `),allowHTML:!1})]}),St&&jsxRuntimeExports.jsx(StyledHeaderDivider,{"data-testid":"stHeadingDivider",rainbow:St.includes("linear"),color:St})]})}StyledCheckbox$1=createStyled("div",{target:"edwcd611"})(({width:ot,theme:et})=>({width:ot,display:"flex",alignItems:"center",minHeight:et.sizes.smallElementHeight}),""),StyledContent=createStyled("div",{target:"edwcd610"})(({visibility:ot})=>({display:ot===LabelVisibilityOptions.Collapsed?"none":"flex",visibility:ot===LabelVisibilityOptions.Hidden?"hidden":"visible",verticalAlign:"middle",flexDirection:"row",alignItems:"center"}),"");function translateGapWidth(ot,et){let ct=et.spacing.lg;return ot==="medium"?ct=et.spacing.threeXL:ot==="large"&&(ct=et.spacing.fourXL),ct}const StyledHorizontalBlock=createStyled("div",{target:"e1f1d6gn5"})(({theme:ot,gap:et})=>({display:"flex",flexWrap:"wrap",flexGrow:1,alignItems:"stretch",gap:translateGapWidth(et,ot)}),""),GLOBAL_ELEMENTS=["balloons","snow"],StyledElementContainer=createStyled("div",{target:"e1f1d6gn4"})(({theme:ot,isStale:et,width:ct,elementType:ut})=>({width:ct,position:"relative","@media print":{"@-moz-document url-prefix()":{display:"block"},overflow:"visible"},":is(.stHtml-empty)":{display:"none"},":has(> .stCacheSpinner)":{height:ot.spacing.none,overflow:"visible",visibility:"visible",marginBottom:`-${ot.spacing.lg}`,zIndex:ot.zIndices.cacheSpinner},":has(> .stPageLink)":{marginTop:`-${ot.spacing.xs}`,marginBottom:`-${ot.spacing.xs}`},...et&&ut!=="skeleton"?{opacity:.33,transition:"opacity 1s ease-in 0.5s"}:{},...ut==="empty"?{display:"none"}:{},...GLOBAL_ELEMENTS.includes(ut)?{marginBottom:`-${ot.spacing.lg}`}:{}}),""),StyledColumn=createStyled("div",{target:"e1f1d6gn3"})(({theme:ot,weight:et,gap:ct,showBorder:ut,verticalAlignment:dt})=>{const{VerticalAlignment:ft}=Block$2.Column,zt=et*100,Dt=translateGapWidth(ct,ot),St=`calc(${zt}% - ${Dt})`;return{width:St,flex:`1 1 ${St}`,[`@media (max-width: ${ot.breakpoints.columns})`]:{minWidth:`calc(100% - ${ot.spacing.twoXL})`},...dt===ft.BOTTOM&&{marginTop:"auto",[`& ${StyledElementContainer}:last-of-type > ${StyledCheckbox$1}`]:{marginBottom:ot.spacing.sm}},...dt===ft.TOP&&{[`& ${StyledElementContainer}:last-of-type > ${StyledCheckbox$1}`]:{marginTop:ot.spacing.sm}},...dt===ft.CENTER&&{marginTop:"auto",marginBottom:"auto"},...ut&&{border:`${ot.sizes.borderWidth} solid ${ot.colors.borderColor}`,borderRadius:ot.radii.default,padding:`calc(${ot.spacing.lg} - ${ot.sizes.borderWidth})`}}},""),StyledVerticalBlock=createStyled("div",{target:"e1f1d6gn2"})(({width:ot,theme:et})=>({width:ot,position:"relative",display:"flex",flex:1,flexDirection:"column",gap:et.spacing.lg}),""),StyledVerticalBlockWrapper=createStyled("div",{target:"e1f1d6gn1"})({name:"1wmy9hl",styles:"display:flex;flex-direction:column;flex:1"}),StyledVerticalBlockBorderWrapper=createStyled("div",{target:"e1f1d6gn0"})(({theme:ot,border:et,height:ct})=>({...et&&{border:`${ot.sizes.borderWidth} solid ${ot.colors.borderColor}`,borderRadius:ot.radii.default,padding:`calc(${ot.spacing.lg} - ${ot.sizes.borderWidth})`},...ct&&{height:`${ct}px`,overflow:"auto"}}),""),Audio=React$1.lazy(()=>__vitePreload(()=>import("./index-DBwYfcOH.js"),[])),Balloons=React$1.lazy(()=>__vitePreload(()=>import("./index-TNhAYJaK.js"),__vite__mapDeps([0,1]))),Snow=React$1.lazy(()=>__vitePreload(()=>import("./index-D_z1Z4Yp.js"),__vite__mapDeps([2,1]))),ArrowDataFrame=React$1.lazy(()=>__vitePreload(()=>import("./index-CMbTUrxn.js").then(async ot=>(await ot.__tla,ot)).then(ot=>ot.c),__vite__mapDeps([3,4,5,6,7,8,9,10,11,12,13]))),ArrowVegaLiteChart=React$1.lazy(()=>__vitePreload(()=>import("./index-DEVPgMwx.js"),__vite__mapDeps([14,15,16,17,4,6,5]))),Toast=React$1.lazy(()=>__vitePreload(()=>import("./index-BABCx9XF.js"),[])),BokehChart=React$1.lazy(()=>__vitePreload(()=>import("./index-BHhK2I00.js"),[])),DebouncedBokehChart=debounceRender(BokehChart,100),DeckGlJsonChart=React$1.lazy(()=>__vitePreload(()=>import("./index-VISX5Zc0.js"),__vite__mapDeps([18,9,10,6,5,19,4,20,15,16,21]))),GraphVizChart=React$1.lazy(()=>__vitePreload(()=>import("./index-Dzngiwb-.js"),__vite__mapDeps([22,17,16,20,6,5]))),IFrame=React$1.lazy(()=>__vitePreload(()=>import("./index-CKkCIAau.js"),[])),ImageList=React$1.lazy(()=>__vitePreload(()=>import("./index-bFKuAFZe.js"),__vite__mapDeps([23,6,5]))),LinkButton=React$1.lazy(()=>__vitePreload(()=>import("./index-DGh7Hb6h.js"),[])),PageLink=React$1.lazy(()=>__vitePreload(()=>import("./index-DP9d5w-p.js"),[])),PlotlyChart=React$1.lazy(()=>__vitePreload(()=>import("./index-B9g0kqq9.js"),__vite__mapDeps([24,4,5]))),Video=React$1.lazy(()=>__vitePreload(()=>import("./index-pzpBn5Mj.js"),[])),AudioInput=React$1.lazy(()=>__vitePreload(()=>import("./index-C7BdVmrL.js"),__vite__mapDeps([25,4,6,26,8,12]))),Button=React$1.lazy(()=>__vitePreload(()=>import("./index-BJ35Ra3B.js"),[])),ButtonGroup=React$1.lazy(()=>__vitePreload(()=>import("./index-Bf-WIrdq.js"),__vite__mapDeps([27,19,4]))),DownloadButton=React$1.lazy(()=>__vitePreload(()=>import("./index-Dv0Prv3W.js"),__vite__mapDeps([28,8]))),CameraInput=React$1.lazy(()=>__vitePreload(()=>import("./index-VlvN4Fc-.js"),__vite__mapDeps([29,4,30,31]))),ChatInput=React$1.lazy(()=>__vitePreload(()=>import("./index-j0a753Nr.js"),__vite__mapDeps([32,33,34,35,36]))),Checkbox=React$1.lazy(()=>__vitePreload(()=>import("./index-CQKm6Iu1.js"),__vite__mapDeps([37,19,4]))),ColorPicker=React$1.lazy(()=>__vitePreload(()=>import("./index-DUrta3it.js"),__vite__mapDeps([38,19,4]))),DateInput=React$1.lazy(()=>__vitePreload(()=>import("./index-ohl-VCS7.js"),__vite__mapDeps([39,19,4,40,10,11,41,36]))),Html=React$1.lazy(()=>__vitePreload(()=>import("./index-Dr_f2tyR.js"),[])),Multiselect=React$1.lazy(()=>__vitePreload(()=>import("./index-CKt_OoH9.js"),__vite__mapDeps([42,19,4]))),Progress=React$1.lazy(()=>__vitePreload(()=>import("./index-BewMEcPF.js"),__vite__mapDeps([43,31]))),Spinner=React$1.lazy(()=>__vitePreload(()=>import("./index-3jxc0CXG.js"),[])),Radio=React$1.lazy(()=>__vitePreload(()=>import("./index-KMQVOp6a.js"),__vite__mapDeps([44,19,4]))),Selectbox$1=React$1.lazy(()=>__vitePreload(()=>import("./index-B_-cqmHC.js"),__vite__mapDeps([45,19,4]))),Slider$1=React$1.lazy(()=>__vitePreload(()=>import("./index-Dtz56C3X.js"),__vite__mapDeps([46,7,19,4]))),FileUploader=React$1.lazy(()=>__vitePreload(()=>import("./index-CXJQYh7L.js"),__vite__mapDeps([47,4,31,26,30]))),TextArea=React$1.lazy(()=>__vitePreload(()=>import("./index-hQJE4Hk3.js"),__vite__mapDeps([48,49,50,34,33,19,4,35,36]))),TextInput=React$1.lazy(()=>__vitePreload(()=>import("./index-BZtVxUC0.js"),__vite__mapDeps([51,49,50,34,19,4,33,41,36]))),TimeInput=React$1.lazy(()=>__vitePreload(()=>import("./index-DQW8WX8T.js"),__vite__mapDeps([52,19,4,40,10,11]))),NumberInput=React$1.lazy(()=>__vitePreload(()=>import("./index-0dVGR9fp.js"),__vite__mapDeps([53,7,49,4,33,41,36]))),StreamlitSyntaxHighlighter=React$1.lazy(()=>__vitePreload(()=>Promise.resolve().then(()=>StreamlitSyntaxHighlighter$2),void 0));function hideIfStale(ot,et){return ot?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{}):et}const RawElementNodeRenderer=ot=>{const{node:et}=ot;if(!et)throw new Error("ElementNode not found.");const ct={width:ot.width,disableFullscreenMode:ot.disableFullscreenMode},ut={...ct,widgetMgr:ot.widgetMgr,disabled:ot.widgetsDisabled,fragmentId:et.fragmentId};switch(et.element.type){case"alert":{const ft=et.element.alert;return jsxRuntimeExports.jsx(AlertElement,{icon:ft.icon,body:ft.body,kind:getAlertElementKind(ft.format),...ct})}case"arrowTable":return jsxRuntimeExports.jsx(ArrowTable,{element:et.quiverElement,...ct});case"audio":return jsxRuntimeExports.jsx(Audio,{element:et.element.audio,endpoints:ot.endpoints,...ct,elementMgr:ot.widgetMgr});case"balloons":return hideIfStale(ot.isStale,jsxRuntimeExports.jsx(Balloons,{scriptRunId:ot.scriptRunId}));case"bokehChart":return jsxRuntimeExports.jsx(DebouncedBokehChart,{element:et.element.bokehChart,...ct});case"code":{const ft=et.element.code;return jsxRuntimeExports.jsx(StreamlitSyntaxHighlighter,{language:ft.language,showLineNumbers:ft.showLineNumbers,wrapLines:ft.wrapLines,children:ft.codeText})}case"deckGlJsonChart":return jsxRuntimeExports.jsx(DeckGlJsonChart,{element:et.element.deckGlJsonChart,...ut});case"docString":return jsxRuntimeExports.jsx(DocString,{element:et.element.docString,...ct});case"empty":return jsxRuntimeExports.jsx("div",{className:"stEmpty","data-testid":"stEmpty"});case"exception":return jsxRuntimeExports.jsx(ExceptionElement,{element:et.element.exception,...ct});case"graphvizChart":return jsxRuntimeExports.jsx(GraphVizChart,{element:et.element.graphvizChart,...ct});case"heading":return jsxRuntimeExports.jsx(Heading,{element:et.element.heading,...ct});case"iframe":return jsxRuntimeExports.jsx(IFrame,{element:et.element.iframe,...ct});case"imgs":return jsxRuntimeExports.jsx(ImageList,{element:et.element.imgs,endpoints:ot.endpoints,...ct});case"json":return jsxRuntimeExports.jsx(Json,{element:et.element.json,...ct});case"markdown":return jsxRuntimeExports.jsx(Markdown,{element:et.element.markdown,...ct});case"metric":return jsxRuntimeExports.jsx(Metric,{element:et.element.metric});case"html":return jsxRuntimeExports.jsx(Html,{element:et.element.html,...ct});case"pageLink":{const ft=et.element.pageLink,zt=ut.disabled||ft.disabled;return jsxRuntimeExports.jsx(PageLink,{element:ft,disabled:zt,...ct})}case"progress":return jsxRuntimeExports.jsx(Progress,{element:et.element.progress,...ct});case"skeleton":return jsxRuntimeExports.jsx(Skeleton,{element:et.element.skeleton});case"snow":return hideIfStale(ot.isStale,jsxRuntimeExports.jsx(Snow,{scriptRunId:ot.scriptRunId}));case"spinner":return jsxRuntimeExports.jsx(Spinner,{element:et.element.spinner,...ct});case"text":return jsxRuntimeExports.jsx(TextElement,{element:et.element.text,...ct});case"video":return jsxRuntimeExports.jsx(Video,{element:et.element.video,endpoints:ot.endpoints,...ct,elementMgr:ot.widgetMgr});case"toast":{const ft=et.element.toast;return jsxRuntimeExports.jsx(Toast,{body:ft.body,icon:ft.icon,...ct},et.scriptRunId)}case"arrowDataFrame":{const ft=et.element.arrowDataFrame;return ut.disabled=ut.disabled||ft.disabled,jsxRuntimeExports.jsx(ArrowDataFrame,{element:ft,data:et.quiverElement,...ft.id&&{key:ft.id},...ut})}case"arrowVegaLiteChart":const dt=et.vegaLiteChartElement;return jsxRuntimeExports.jsx(ArrowVegaLiteChart,{element:dt,...ut},dt.id||void 0);case"audioInput":{const ft=et.element.audioInput;return ut.disabled=ut.disabled||ft.disabled,jsxRuntimeExports.jsx(AudioInput,{uploadClient:ot.uploadClient,element:ft,...ut},ft.id)}case"button":{const ft=et.element.button;if(ut.disabled=ut.disabled||ft.disabled,ft.isFormSubmitter){const{formId:zt}=ft,Dt=ot.formsData.formsWithUploads.has(zt);return jsxRuntimeExports.jsx(FormSubmitContent,{element:ft,hasInProgressUpload:Dt,...ut})}return jsxRuntimeExports.jsx(Button,{element:ft,...ut})}case"buttonGroup":{const ft=et.element.buttonGroup;return ut.disabled=ut.disabled||ft.disabled,jsxRuntimeExports.jsx(ButtonGroup,{element:ft,...ut},ft.id)}case"downloadButton":{const ft=et.element.downloadButton;return ut.disabled=ut.disabled||ft.disabled,jsxRuntimeExports.jsx(DownloadButton,{endpoints:ot.endpoints,element:ft,...ut},ft.id)}case"cameraInput":{const ft=et.element.cameraInput;return ut.disabled=ut.disabled||ft.disabled,jsxRuntimeExports.jsx(CameraInput,{element:ft,uploadClient:ot.uploadClient,...ut},ft.id)}case"chatInput":{const ft=et.element.chatInput;return ut.disabled=ut.disabled||ft.disabled,jsxRuntimeExports.jsx(ChatInput,{element:ft,...ut},ft.id)}case"checkbox":{const ft=et.element.checkbox;return ut.disabled=ut.disabled||ft.disabled,jsxRuntimeExports.jsx(Checkbox,{element:ft,...ut},ft.id)}case"colorPicker":{const ft=et.element.colorPicker;return ut.disabled=ut.disabled||ft.disabled,jsxRuntimeExports.jsx(ColorPicker,{element:ft,...ut},ft.id)}case"componentInstance":return jsxRuntimeExports.jsx(ComponentInstance$1,{registry:ot.componentRegistry,element:et.element.componentInstance,...ut});case"dateInput":{const ft=et.element.dateInput;return ut.disabled=ut.disabled||ft.disabled,jsxRuntimeExports.jsx(DateInput,{element:ft,...ut},ft.id)}case"fileUploader":{const ft=et.element.fileUploader;return ut.disabled=ut.disabled||ft.disabled,jsxRuntimeExports.jsx(FileUploader,{element:ft,uploadClient:ot.uploadClient,...ut},ft.id)}case"linkButton":{const ft=et.element.linkButton;return ut.disabled=ut.disabled||ft.disabled,jsxRuntimeExports.jsx(LinkButton,{element:ft,...ut})}case"multiselect":{const ft=et.element.multiselect;return ut.disabled=ut.disabled||ft.disabled,jsxRuntimeExports.jsx(Multiselect,{element:ft,...ut},ft.id)}case"numberInput":{const ft=et.element.numberInput;return ut.disabled=ut.disabled||ft.disabled,jsxRuntimeExports.jsx(NumberInput,{element:ft,...ut},ft.id)}case"plotlyChart":{const ft=et.element.plotlyChart;return jsxRuntimeExports.jsx(PlotlyChart,{element:ft,...ut},ft.id)}case"radio":{const ft=et.element.radio;return ut.disabled=ut.disabled||ft.disabled,jsxRuntimeExports.jsx(Radio,{element:ft,...ut},ft.id)}case"selectbox":{const ft=et.element.selectbox;return ut.disabled=ut.disabled||ft.disabled,jsxRuntimeExports.jsx(Selectbox$1,{element:ft,...ut},ft.id)}case"slider":{const ft=et.element.slider;return ut.disabled=ut.disabled||ft.disabled,jsxRuntimeExports.jsx(Slider$1,{element:ft,...ut},ft.id)}case"textArea":{const ft=et.element.textArea;return ut.disabled=ut.disabled||ft.disabled,jsxRuntimeExports.jsx(TextArea,{element:ft,...ut},ft.id)}case"textInput":{const ft=et.element.textInput;return ut.disabled=ut.disabled||ft.disabled,jsxRuntimeExports.jsx(TextInput,{element:ft,...ut},ft.id)}case"timeInput":{const ft=et.element.timeInput;return ut.disabled=ut.disabled||ft.disabled,jsxRuntimeExports.jsx(TimeInput,{element:ft,...ut},ft.id)}default:throw new Error(`Unrecognized Element type ${et.element.type}`)}},ElementNodeRenderer=ot=>{const{isFullScreen:et,fragmentIdsThisRun:ct}=React$1.useContext(LibContext),{node:ut,width:dt}=ot,ft=ut.element.type||"",zt=shouldComponentBeEnabled(ft,ot.scriptRunState),Dt=isComponentStale(zt,ut,ot.scriptRunState,ot.scriptRunId,ct),St=getElementId(ut.element),Tt=getKeyFromId(St);return jsxRuntimeExports.jsx(Maybe,{enable:zt,children:jsxRuntimeExports.jsx(StyledElementContainer,{className:classNames("stElementContainer","element-container",convertKeyToClassName(Tt)),"data-testid":"stElementContainer","data-stale":Dt,isStale:Dt&&!et,width:dt,elementType:ft,children:jsxRuntimeExports.jsx(ErrorBoundary,{width:dt,children:jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:jsxRuntimeExports.jsx(Skeleton,{element:Skeleton$1.create({style:Skeleton$1.SkeletonStyle.ELEMENT})}),children:jsxRuntimeExports.jsx(RawElementNodeRenderer,{...ot,isStale:Dt})})})})})},BlockNodeRenderer=ot=>{const{node:et}=ot,{fragmentIdsThisRun:ct}=reactExports.useContext(LibContext);if(et.isEmpty&&!et.deltaBlock.allowEmpty)return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{});const ut=shouldComponentBeEnabled("",ot.scriptRunState),dt=isComponentStale(ut,et,ot.scriptRunState,ot.scriptRunId,ct),ft={...ot,node:et},zt=ot.disableFullscreenMode||notNullOrUndefined(et.deltaBlock.dialog)||notNullOrUndefined(et.deltaBlock.popover),Dt=jsxRuntimeExports.jsx(LayoutBlock,{...ft,disableFullscreenMode:zt});if(et.deltaBlock.dialog)return jsxRuntimeExports.jsx(DialogWithProvider,{element:et.deltaBlock.dialog,deltaMsgReceivedAt:et.deltaMsgReceivedAt,children:Dt});if(et.deltaBlock.expandable)return jsxRuntimeExports.jsx(Expander,{empty:et.isEmpty,isStale:dt,element:et.deltaBlock.expandable,children:Dt});if(et.deltaBlock.popover)return jsxRuntimeExports.jsx(Popover,{empty:et.isEmpty,element:et.deltaBlock.popover,width:ot.width,children:Dt});if(et.deltaBlock.type==="form"){const{formId:St,clearOnSubmit:Tt,enterToSubmit:Rt,border:$t}=et.deltaBlock.form,kt=ot.formsData.submitButtons.get(St),Bt=kt!==void 0&&kt.length>0;return jsxRuntimeExports.jsx(Form,{formId:St,clearOnSubmit:Tt,enterToSubmit:Rt,width:ot.width,hasSubmitButton:Bt,scriptRunState:ot.scriptRunState,widgetMgr:ot.widgetMgr,border:$t,children:Dt})}if(et.deltaBlock.chatMessage)return jsxRuntimeExports.jsx(ChatMessage,{element:et.deltaBlock.chatMessage,endpoints:ot.endpoints,children:Dt});if(et.deltaBlock.column)return jsxRuntimeExports.jsx(StyledColumn,{weight:et.deltaBlock.column.weight??0,gap:et.deltaBlock.column.gap??"",verticalAlignment:et.deltaBlock.column.verticalAlignment??void 0,showBorder:et.deltaBlock.column.showBorder??!1,className:"stColumn","data-testid":"stColumn",children:Dt});if(et.deltaBlock.tabContainer){const St={...ft,isStale:dt,renderTabContent:Tt=>jsxRuntimeExports.jsx(VerticalBlock,{...Tt})};return jsxRuntimeExports.jsx(Tabs,{...St})}return Dt},ChildRenderer=ot=>{const{libConfig:et}=reactExports.useContext(LibContext);assignDividerColor(ot.node,useTheme());const ct=new Set;return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:ot.node.children&&ot.node.children.map((ut,dt)=>{const ft=et.disableFullscreenMode||ot.disableFullscreenMode;if(ut instanceof ElementNode){const zt={...ot,disableFullscreenMode:ft,node:ut},Dt=getElementId(ut.element)||dt.toString();return ct.has(Dt)?null:(ct.add(Dt),jsxRuntimeExports.jsx(ElementNodeRenderer,{...zt},Dt))}if(ut instanceof BlockNode){const zt={...ot,disableFullscreenMode:ft,node:ut};return jsxRuntimeExports.jsx(BlockNodeRenderer,{...zt},dt)}throw new Error(`Unrecognized AppNode: ${ut}`)})})};function ScrollToBottomVerticalBlockWrapper(ot){const{border:et,height:ct,children:ut}=ot,dt=useScrollToBottom();return jsxRuntimeExports.jsx(StyledVerticalBlockBorderWrapper,{border:et,height:ct,"data-testid":"stVerticalBlockBorderWrapper","data-test-scroll-behavior":"scroll-to-bottom",ref:dt,children:ut})}const VerticalBlock=ot=>{var $t,kt;const et=reactExports.useRef(null),[ct,ut]=React$1.useState(-1),dt=reactExports.useMemo(()=>new ResizeObserver(([Bt])=>{window.requestAnimationFrame(()=>{ut(Bt.target.getBoundingClientRect().width||-1)})}),[ut]),ft=(($t=ot.node.deltaBlock.vertical)==null?void 0:$t.border)??!1,zt=((kt=ot.node.deltaBlock.vertical)==null?void 0:kt.height)||void 0,Dt=zt&&ot.node.children.find(Bt=>Bt instanceof BlockNode&&Bt.deltaBlock.type==="chatMessage")!==void 0;reactExports.useEffect(()=>(et.current&&dt.observe(et.current),()=>{dt.disconnect()}),[dt,Dt]);const St=Dt?ScrollToBottomVerticalBlockWrapper:StyledVerticalBlockBorderWrapper,Tt={...ot,width:ct},Rt=getKeyFromId(ot.node.deltaBlock.id);return jsxRuntimeExports.jsx(St,{border:ft,height:zt,"data-testid":"stVerticalBlockBorderWrapper","data-test-scroll-behavior":"normal",children:jsxRuntimeExports.jsx(StyledVerticalBlockWrapper,{ref:et,children:jsxRuntimeExports.jsx(StyledVerticalBlock,{width:ct,className:classNames("stVerticalBlock",convertKeyToClassName(Rt)),"data-testid":"stVerticalBlock",children:jsxRuntimeExports.jsx(ChildRenderer,{...Tt})})})})},HorizontalBlock=ot=>{var ct;const et=((ct=ot.node.deltaBlock.horizontal)==null?void 0:ct.gap)??"";return jsxRuntimeExports.jsx(StyledHorizontalBlock,{gap:et,className:"stHorizontalBlock","data-testid":"stHorizontalBlock",children:jsxRuntimeExports.jsx(ChildRenderer,{...ot})})};function LayoutBlock(ot){return ot.node.deltaBlock.horizontal?jsxRuntimeExports.jsx(HorizontalBlock,{...ot}):jsxRuntimeExports.jsx(VerticalBlock,{...ot})}let StyledDataFrameOverlay,PortalProvider;StyledDataFrameOverlay=createStyled("div",{target:"e1v116lc0"})(({theme:ot})=>({position:"fixed",top:0,left:0,zIndex:ot.zIndices.tablePortal,lineHeight:"100%"}),""),PortalContext=React$1.createContext(null),PortalProvider=({children:ot})=>{const et=reactExports.useRef(null),ct=reactExports.useCallback(()=>et.current,[]);return jsxRuntimeExports.jsxs(PortalContext.Provider,{value:ct,children:[ot,jsxRuntimeExports.jsx(StyledDataFrameOverlay,{"data-testid":"portal",id:"portal",ref:et})]})};function ThemeProvider({theme:ot,baseuiTheme:et,children:ct}){return jsxRuntimeExports.jsx(ThemeProvider$1,{theme:et||baseuiLightTheme,children:jsxRuntimeExports.jsx(ThemeProvider$2,{theme:ot,children:ct})})}function toCodePoint(ot,et){const ct=[];let ut=0,dt=0,ft=0;for(;ft<ot.length;)ut=ot.charCodeAt(ft++),dt?(ct.push((65536+(dt-55296<<10)+(ut-56320)).toString(16)),dt=0):55296<=ut&&ut<=56319?dt=ut:ct.push(ut.toString(16));return ct.join("-")}const UFE0Fg=/\uFE0F/g,U200D="\u200D";function grabTheRightIcon(ot){return toCodePoint(ot.indexOf(U200D)<0?ot.replace(UFE0Fg,""):ot)}function iconToUrl(ot){const et=/^:(.+)\/(.+):$/,ct=ot.match(et);return ct===null?"":`https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsrounded/${ct[2]}/default/24px.svg`}function handleFavicon(ot,et,ct){const ut=extractEmoji(ot);let dt;ut&&!ot.startsWith(":material")?dt=`https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/72x72/${grabTheRightIcon(ut)}.png`:ot.startsWith(":material")?dt=iconToUrl(ot):dt=ct.buildMediaURL(ot),overwriteFavicon(dt),et({type:"SET_PAGE_FAVICON",favicon:dt})}function overwriteFavicon(ot){const et=document.querySelector("link[rel='shortcut icon']");et&&(et.href=ot)}function extractEmoji(ot){const et=ot.replace("-","_");return nodeEmoji$1.hasEmoji(nodeEmoji$1.get(et))?nodeEmoji$1.get(et):nodeEmoji$1.hasEmoji(ot)?ot:""}var lib$2={},flattenNames$1={},baseFor$1=_baseFor,keys$2=keys_1;function baseForOwn$4(ot,et){return ot&&baseFor$1(ot,et,keys$2)}var _baseForOwn=baseForOwn$4,identity$3=identity_1;function castFunction$2(ot){return typeof ot=="function"?ot:identity$3}var _castFunction=castFunction$2,baseForOwn$3=_baseForOwn,castFunction$1=_castFunction;function forOwn(ot,et){return ot&&baseForOwn$3(ot,castFunction$1(et))}var forOwn_1=forOwn,HASH_UNDEFINED$3="__lodash_hash_undefined__";function setCacheAdd$2(ot){return this.__data__.set(ot,HASH_UNDEFINED$3),this}var _setCacheAdd=setCacheAdd$2;function setCacheHas$2(ot){return this.__data__.has(ot)}var _setCacheHas=setCacheHas$2,MapCache$1=_MapCache,setCacheAdd$1=_setCacheAdd,setCacheHas$1=_setCacheHas;function SetCache$3(ot){var et=-1,ct=ot==null?0:ot.length;for(this.__data__=new MapCache$1;++et<ct;)this.add(ot[et])}SetCache$3.prototype.add=SetCache$3.prototype.push=setCacheAdd$1,SetCache$3.prototype.has=setCacheHas$1,_SetCache=SetCache$3;function arraySome$2(ot,et){for(var ct=-1,ut=ot==null?0:ot.length;++ct<ut;)if(et(ot[ct],ct,ot))return!0;return!1}var _arraySome=arraySome$2;function cacheHas$3(ot,et){return ot.has(et)}let SetCache$2,arraySome$1,cacheHas$2,COMPARE_PARTIAL_FLAG$b,COMPARE_UNORDERED_FLAG$7;_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(ot,et,ct,ut,dt,ft){var zt=ct&COMPARE_PARTIAL_FLAG$b,Dt=ot.length,St=et.length;if(Dt!=St&&!(zt&&St>Dt))return!1;var Tt=ft.get(ot),Rt=ft.get(et);if(Tt&&Rt)return Tt==et&&Rt==ot;var $t=-1,kt=!0,Bt=ct&COMPARE_UNORDERED_FLAG$7?new SetCache$2:void 0;for(ft.set(ot,et),ft.set(et,ot);++$t<Dt;){var Ft=ot[$t],jt=et[$t];if(ut)var Kt=zt?ut(jt,Ft,$t,et,ot,ft):ut(Ft,jt,$t,ot,et,ft);if(Kt!==void 0){if(Kt)continue;kt=!1;break}if(Bt){if(!arraySome$1(et,function(Yt,Ut){if(!cacheHas$2(Bt,Ut)&&(Ft===Yt||dt(Ft,Yt,ct,ut,ft)))return Bt.push(Ut)})){kt=!1;break}}else if(!(Ft===jt||dt(Ft,jt,ct,ut,ft))){kt=!1;break}}return ft.delete(ot),ft.delete(et),kt}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(ot,et,ct,ut,dt,ft,zt){switch(ct){case dataViewTag$3:if(ot.byteLength!=et.byteLength||ot.byteOffset!=et.byteOffset)return!1;ot=ot.buffer,et=et.buffer;case arrayBufferTag$2:return!(ot.byteLength!=et.byteLength||!ft(new Uint8Array$2(ot),new Uint8Array$2(et)));case boolTag$2:case dateTag$2:case numberTag$2:return eq$1(+ot,+et);case errorTag$2:return ot.name==et.name&&ot.message==et.message;case regexpTag$2:case stringTag$2:return ot==et+"";case mapTag$3:var Dt=mapToArray$1;case setTag$3:var St=ut&COMPARE_PARTIAL_FLAG$a;if(Dt||(Dt=setToArray$1),ot.size!=et.size&&!St)return!1;var Tt=zt.get(ot);if(Tt)return Tt==et;ut|=COMPARE_UNORDERED_FLAG$6,zt.set(ot,et);var Rt=equalArrays$2(Dt(ot),Dt(et),ut,dt,ft,zt);return zt.delete(ot),Rt;case symbolTag$2:if(symbolValueOf$1)return symbolValueOf$1.call(ot)==symbolValueOf$1.call(et)}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(ot,et,ct,ut,dt,ft){var zt=ct&COMPARE_PARTIAL_FLAG$9,Dt=getAllKeys$1(ot),St=Dt.length,Tt=getAllKeys$1(et),Rt=Tt.length;if(St!=Rt&&!zt)return!1;for(var $t=St;$t--;){var kt=Dt[$t];if(!(zt?kt in et:hasOwnProperty$f.call(et,kt)))return!1}var Bt=ft.get(ot),Ft=ft.get(et);if(Bt&&Ft)return Bt==et&&Ft==ot;var jt=!0;ft.set(ot,et),ft.set(et,ot);for(var Kt=zt;++$t<St;){kt=Dt[$t];var Yt=ot[kt],Ut=et[kt];if(ut)var Jt=zt?ut(Ut,Yt,kt,et,ot,ft):ut(Yt,Ut,kt,ot,et,ft);if(!(Jt===void 0?Yt===Ut||dt(Yt,Ut,ct,ut,ft):Jt)){jt=!1;break}Kt||(Kt=kt=="constructor")}if(jt&&!Kt){var Ht=ot.constructor,e0=et.constructor;Ht!=e0&&"constructor"in ot&&"constructor"in et&&!(typeof Ht=="function"&&Ht instanceof Ht&&typeof e0=="function"&&e0 instanceof e0)&&(jt=!1)}return ft.delete(ot),ft.delete(et),jt}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(ot,et,ct,ut,dt,ft){var zt=isArray$7(ot),Dt=isArray$7(et),St=zt?arrayTag$2:getTag$1(ot),Tt=Dt?arrayTag$2:getTag$1(et);St=St==argsTag$3?objectTag$4:St,Tt=Tt==argsTag$3?objectTag$4:Tt;var Rt=St==objectTag$4,$t=Tt==objectTag$4,kt=St==Tt;if(kt&&isBuffer$2(ot)){if(!isBuffer$2(et))return!1;zt=!0,Rt=!1}if(kt&&!Rt)return ft||(ft=new Stack$2),zt||isTypedArray$2(ot)?equalArrays$1(ot,et,ct,ut,dt,ft):equalByTag$1(ot,et,St,ct,ut,dt,ft);if(!(ct&COMPARE_PARTIAL_FLAG$8)){var Bt=Rt&&hasOwnProperty$e.call(ot,"__wrapped__"),Ft=$t&&hasOwnProperty$e.call(et,"__wrapped__");if(Bt||Ft){var jt=Bt?ot.value():ot,Kt=Ft?et.value():et;return ft||(ft=new Stack$2),dt(jt,Kt,ct,ut,ft)}}return kt?(ft||(ft=new Stack$2),equalObjects$1(ot,et,ct,ut,dt,ft)):!1}var _baseIsEqualDeep=baseIsEqualDeep$2,baseIsEqualDeep$1=_baseIsEqualDeep,isObjectLike$1=isObjectLike_1;function baseIsEqual$4(ot,et,ct,ut,dt){return ot===et?!0:ot==null||et==null||!isObjectLike$1(ot)&&!isObjectLike$1(et)?ot!==ot&&et!==et:baseIsEqualDeep$1(ot,et,ct,ut,baseIsEqual$4,dt)}var _baseIsEqual=baseIsEqual$4,Stack$1=_Stack,baseIsEqual$3=_baseIsEqual,COMPARE_PARTIAL_FLAG$7=1,COMPARE_UNORDERED_FLAG$5=2;function baseIsMatch$2(ot,et,ct,ut){var dt=ct.length,ft=dt,zt=!ut;if(ot==null)return!ft;for(ot=Object(ot);dt--;){var Dt=ct[dt];if(zt&&Dt[2]?Dt[1]!==ot[Dt[0]]:!(Dt[0]in ot))return!1}for(;++dt<ft;){Dt=ct[dt];var St=Dt[0],Tt=ot[St],Rt=Dt[1];if(zt&&Dt[2]){if(Tt===void 0&&!(St in ot))return!1}else{var $t=new Stack$1;if(ut)var kt=ut(Tt,Rt,St,ot,et,$t);if(!(kt===void 0?baseIsEqual$3(Rt,Tt,COMPARE_PARTIAL_FLAG$7|COMPARE_UNORDERED_FLAG$5,ut,$t):kt))return!1}}return!0}var _baseIsMatch=baseIsMatch$2,isObject$4=isObject_1;function isStrictComparable$3(ot){return ot===ot&&!isObject$4(ot)}var _isStrictComparable=isStrictComparable$3,isStrictComparable$2=_isStrictComparable,keys$1=keys_1;function getMatchData$2(ot){for(var et=keys$1(ot),ct=et.length;ct--;){var ut=et[ct],dt=ot[ut];et[ct]=[ut,dt,isStrictComparable$2(dt)]}return et}var _getMatchData=getMatchData$2;function matchesStrictComparable$3(ot,et){return function(ct){return ct==null?!1:ct[ot]===et&&(et!==void 0||ot in Object(ct))}}var _matchesStrictComparable=matchesStrictComparable$3,baseIsMatch$1=_baseIsMatch,getMatchData$1=_getMatchData,matchesStrictComparable$2=_matchesStrictComparable;function baseMatches$2(ot){var et=getMatchData$1(ot);return et.length==1&&et[0][2]?matchesStrictComparable$2(et[0][0],et[0][1]):function(ct){return ct===ot||baseIsMatch$1(ct,ot,et)}}var _baseMatches=baseMatches$2;function baseHasIn$2(ot,et){return ot!=null&&et in Object(ot)}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(ot,et,ct){et=castPath$3(et,ot);for(var ut=-1,dt=et.length,ft=!1;++ut<dt;){var zt=toKey$4(et[ut]);if(!(ft=ot!=null&&ct(ot,zt)))break;ot=ot[zt]}return ft||++ut!=dt?ft:(dt=ot==null?0:ot.length,!!dt&&isLength$1(dt)&&isIndex$2(zt,dt)&&(isArray$6(ot)||isArguments$1(ot)))}let baseHasIn$1,hasPath$1;_hasPath=hasPath$2,baseHasIn$1=_baseHasIn,hasPath$1=_hasPath;function hasIn$3(ot,et){return ot!=null&&hasPath$1(ot,et,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(ot,et){return isKey$2(ot)&&isStrictComparable$1(et)?matchesStrictComparable$1(toKey$3(ot),et):function(ct){var ut=get$2(ct,ot);return ut===void 0&&ut===et?hasIn$2(ct,ot):baseIsEqual$2(et,ut,COMPARE_PARTIAL_FLAG$6|COMPARE_UNORDERED_FLAG$4)}}var _baseMatchesProperty=baseMatchesProperty$2,baseGet$3=_baseGet;function basePropertyDeep$2(ot){return function(et){return baseGet$3(et,ot)}}var _basePropertyDeep=basePropertyDeep$2,baseProperty$1=_baseProperty,basePropertyDeep$1=_basePropertyDeep,isKey$1=_isKey,toKey$2=_toKey;function property$2(ot){return isKey$1(ot)?baseProperty$1(toKey$2(ot)):basePropertyDeep$1(ot)}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(ot){return typeof ot=="function"?ot:ot==null?identity$2:typeof ot=="object"?isArray$5(ot)?baseMatchesProperty$1(ot[0],ot[1]):baseMatches$1(ot):property$1(ot)}var _baseIteratee=baseIteratee$5,isArrayLike$2=isArrayLike_1;function createBaseEach$2(ot,et){return function(ct,ut){if(ct==null)return ct;if(!isArrayLike$2(ct))return ot(ct,ut);for(var dt=ct.length,ft=et?dt:-1,zt=Object(ct);(et?ft--:++ft<dt)&&ut(zt[ft],ft,zt)!==!1;);return ct}}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(ot,et){var ct=-1,ut=isArrayLike$1(ot)?Array(ot.length):[];return baseEach$2(ot,function(dt,ft,zt){ut[++ct]=et(dt,ft,zt)}),ut}var _baseMap=baseMap$3,arrayMap$3=_arrayMap,baseIteratee$4=_baseIteratee,baseMap$2=_baseMap,isArray$4=isArray_1;function map$1(ot,et){var ct=isArray$4(ot)?arrayMap$3:baseMap$2;return ct(ot,baseIteratee$4(et))}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(ot){return ot&&ot.__esModule?ot:{default:ot}}var flattenNames=flattenNames$1.flattenNames=function ot(){var et=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],ct=[];return(0,_map3.default)(et,function(ut){Array.isArray(ut)?ot(ut).map(function(dt){return ct.push(dt)}):(0,_isPlainObject3.default)(ut)?(0,_forOwn3$2.default)(ut,function(dt,ft){dt===!0&&ct.push(ft),ct.push(ft+"-"+dt)}):(0,_isString3.default)(ut)&&ct.push(ut)}),ct};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(ot){for(var et=1;et<arguments.length;et++){var ct=arguments[et];for(var ut in ct)Object.prototype.hasOwnProperty.call(ct,ut)&&(ot[ut]=ct[ut])}return ot};function _interopRequireDefault$6(ot){return ot&&ot.__esModule?ot:{default:ot}}var mergeClasses=mergeClasses$1.mergeClasses=function ot(et){var ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],ut=et.default&&(0,_cloneDeep3.default)(et.default)||{};return ct.map(function(dt){var ft=et[dt];return ft&&(0,_forOwn3$1.default)(ft,function(zt,Dt){ut[Dt]||(ut[Dt]={}),ut[Dt]=_extends$w({},ut[Dt],ft[Dt])}),dt}),ut};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(ot){for(var et=1;et<arguments.length;et++){var ct=arguments[et];for(var ut in ct)Object.prototype.hasOwnProperty.call(ct,ut)&&(ot[ut]=ct[ut])}return ot};function _interopRequireDefault$5(ot){return ot.__esModule?ot:{default:ot}}var transforms={borderRadius:function ot(et){return{msBorderRadius:et,MozBorderRadius:et,OBorderRadius:et,WebkitBorderRadius:et,borderRadius:et}},boxShadow:function ot(et){return{msBoxShadow:et,MozBoxShadow:et,OBoxShadow:et,WebkitBoxShadow:et,boxShadow:et}},userSelect:function ot(et){return{WebkitTouchCallout:et,KhtmlUserSelect:et,MozUserSelect:et,msUserSelect:et,WebkitUserSelect:et,userSelect:et}},flex:function ot(et){return{WebkitBoxFlex:et,MozBoxFlex:et,WebkitFlex:et,msFlex:et,flex:et}},flexBasis:function ot(et){return{WebkitFlexBasis:et,flexBasis:et}},justifyContent:function ot(et){return{WebkitJustifyContent:et,justifyContent:et}},transition:function ot(et){return{msTransition:et,MozTransition:et,OTransition:et,WebkitTransition:et,transition:et}},transform:function ot(et){return{msTransform:et,MozTransform:et,OTransform:et,WebkitTransform:et,transform:et}},absolute:function ot(et){var ct=et&&et.split(" ");return{position:"absolute",top:ct&&ct[0],right:ct&&ct[1],bottom:ct&&ct[2],left:ct&&ct[3]}},extend:function ot(et,ct){var ut=ct[et];return ut||{extend:et}}},autoprefix=autoprefix$1.autoprefix=function ot(et){var ct={};return(0,_forOwn3.default)(et,function(ut,dt){var ft={};(0,_forOwn3.default)(ut,function(zt,Dt){var St=transforms[Dt];St?ft=_extends$v({},ft,St(zt)):ft[Dt]=zt}),ct[dt]=ft}),ct};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(ot){for(var et=1;et<arguments.length;et++){var ct=arguments[et];for(var ut in ct)Object.prototype.hasOwnProperty.call(ct,ut)&&(ot[ut]=ct[ut])}return ot},_react$3=reactExports,_react2$3=_interopRequireDefault$4(_react$3);function _interopRequireDefault$4(ot){return ot&&ot.__esModule?ot:{default:ot}}function _classCallCheck$f(ot,et){if(!(ot instanceof et))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$f(ot,et){if(!ot)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return et&&(typeof et=="object"||typeof et=="function")?et:ot}function _inherits$f(ot,et){if(typeof et!="function"&&et!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof et);ot.prototype=Object.create(et&&et.prototype,{constructor:{value:ot,enumerable:!1,writable:!0,configurable:!0}}),et&&(Object.setPrototypeOf?Object.setPrototypeOf(ot,et):ot.__proto__=et)}var hover=hover$1.hover=function ot(et){var ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(ut){_inherits$f(dt,ut);function dt(){var ft,zt,Dt,St;_classCallCheck$f(this,dt);for(var Tt=arguments.length,Rt=Array(Tt),$t=0;$t<Tt;$t++)Rt[$t]=arguments[$t];return St=(zt=(Dt=_possibleConstructorReturn$f(this,(ft=dt.__proto__||Object.getPrototypeOf(dt)).call.apply(ft,[this].concat(Rt))),Dt),Dt.state={hover:!1},Dt.handleMouseOver=function(){return Dt.setState({hover:!0})},Dt.handleMouseOut=function(){return Dt.setState({hover:!1})},Dt.render=function(){return _react2$3.default.createElement(ct,{onMouseOver:Dt.handleMouseOver,onMouseOut:Dt.handleMouseOut},_react2$3.default.createElement(et,_extends$u({},Dt.props,Dt.state)))},zt),_possibleConstructorReturn$f(Dt,St)}return dt}(_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(ot){for(var et=1;et<arguments.length;et++){var ct=arguments[et];for(var ut in ct)Object.prototype.hasOwnProperty.call(ct,ut)&&(ot[ut]=ct[ut])}return ot},_react$2=reactExports,_react2$2=_interopRequireDefault$3(_react$2);function _interopRequireDefault$3(ot){return ot&&ot.__esModule?ot:{default:ot}}function _classCallCheck$e(ot,et){if(!(ot instanceof et))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$e(ot,et){if(!ot)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return et&&(typeof et=="object"||typeof et=="function")?et:ot}function _inherits$e(ot,et){if(typeof et!="function"&&et!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof et);ot.prototype=Object.create(et&&et.prototype,{constructor:{value:ot,enumerable:!1,writable:!0,configurable:!0}}),et&&(Object.setPrototypeOf?Object.setPrototypeOf(ot,et):ot.__proto__=et)}var active=active$1.active=function ot(et){var ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(ut){_inherits$e(dt,ut);function dt(){var ft,zt,Dt,St;_classCallCheck$e(this,dt);for(var Tt=arguments.length,Rt=Array(Tt),$t=0;$t<Tt;$t++)Rt[$t]=arguments[$t];return St=(zt=(Dt=_possibleConstructorReturn$e(this,(ft=dt.__proto__||Object.getPrototypeOf(dt)).call.apply(ft,[this].concat(Rt))),Dt),Dt.state={active:!1},Dt.handleMouseDown=function(){return Dt.setState({active:!0})},Dt.handleMouseUp=function(){return Dt.setState({active:!1})},Dt.render=function(){return _react2$2.default.createElement(ct,{onMouseDown:Dt.handleMouseDown,onMouseUp:Dt.handleMouseUp},_react2$2.default.createElement(et,_extends$t({},Dt.props,Dt.state)))},zt),_possibleConstructorReturn$e(Dt,St)}return dt}(_react2$2.default.Component)};active$1.default=active;var loop={};Object.defineProperty(loop,"__esModule",{value:!0});var loopable=function ot(et,ct){var ut={},dt=function(ft){var zt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;ut[ft]=zt};return et===0&&dt("first-child"),et===ct-1&&dt("last-child"),(et===0||et%2===0)&&dt("even"),Math.abs(et%2)===1&&dt("odd"),dt("nth-child",et),ut};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(ot){return ot&&ot.__esModule?ot:{default:ot}}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 ot(et){for(var ct=arguments.length,ut=Array(ct>1?ct-1:0),dt=1;dt<ct;dt++)ut[dt-1]=arguments[dt];var ft=(0,_flattenNames2.default)(ut),zt=(0,_mergeClasses2.default)(et,ft);return(0,_autoprefix2.default)(zt)},_default$2=lib$2.default=ReactCSS,calculateChange$2=function ot(et,ct,ut,dt,ft){var zt=ft.clientWidth,Dt=ft.clientHeight,St=typeof et.pageX=="number"?et.pageX:et.touches[0].pageX,Tt=typeof et.pageY=="number"?et.pageY:et.touches[0].pageY,Rt=St-(ft.getBoundingClientRect().left+window.pageXOffset),$t=Tt-(ft.getBoundingClientRect().top+window.pageYOffset);if(ut==="vertical"){var kt=void 0;if($t<0?kt=0:$t>Dt?kt=1:kt=Math.round($t*100/Dt)/100,ct.a!==kt)return{h:ct.h,s:ct.s,l:ct.l,a:kt,source:"rgb"}}else{var Bt=void 0;if(Rt<0?Bt=0:Rt>zt?Bt=1:Bt=Math.round(Rt*100/zt)/100,dt!==Bt)return{h:ct.h,s:ct.s,l:ct.l,a:Bt,source:"rgb"}}return null},checkboardCache={},render=function ot(et,ct,ut,dt){if(typeof document>"u"&&!dt)return null;var ft=dt?new dt:document.createElement("canvas");ft.width=ut*2,ft.height=ut*2;var zt=ft.getContext("2d");return zt?(zt.fillStyle=et,zt.fillRect(0,0,ft.width,ft.height),zt.fillStyle=ct,zt.fillRect(0,0,ut,ut),zt.translate(ut,ut),zt.fillRect(0,0,ut,ut),ft.toDataURL()):null},get$1=function ot(et,ct,ut,dt){var ft=et+"-"+ct+"-"+ut+(dt?"-server":"");if(checkboardCache[ft])return checkboardCache[ft];var zt=render(et,ct,ut,dt);return checkboardCache[ft]=zt,zt},_extends$s=Object.assign||function(ot){for(var et=1;et<arguments.length;et++){var ct=arguments[et];for(var ut in ct)Object.prototype.hasOwnProperty.call(ct,ut)&&(ot[ut]=ct[ut])}return ot},Checkboard=function ot(et){var ct=et.white,ut=et.grey,dt=et.size,ft=et.renderers,zt=et.borderRadius,Dt=et.boxShadow,St=et.children,Tt=_default$2({default:{grid:{borderRadius:zt,boxShadow:Dt,absolute:"0px 0px 0px 0px",background:"url("+get$1(ct,ut,dt,ft.canvas)+") center left"}}});return reactExports.isValidElement(St)?React$1.cloneElement(St,_extends$s({},St.props,{style:_extends$s({},St.props.style,Tt.grid)})):React$1.createElement("div",{style:Tt.grid})};Checkboard.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};var _extends$r=Object.assign||function(ot){for(var et=1;et<arguments.length;et++){var ct=arguments[et];for(var ut in ct)Object.prototype.hasOwnProperty.call(ct,ut)&&(ot[ut]=ct[ut])}return ot},_createClass$d=function(){function ot(et,ct){for(var ut=0;ut<ct.length;ut++){var dt=ct[ut];dt.enumerable=dt.enumerable||!1,dt.configurable=!0,"value"in dt&&(dt.writable=!0),Object.defineProperty(et,dt.key,dt)}}return function(et,ct,ut){return ct&&ot(et.prototype,ct),ut&&ot(et,ut),et}}();function _classCallCheck$d(ot,et){if(!(ot instanceof et))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$d(ot,et){if(!ot)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return et&&(typeof et=="object"||typeof et=="function")?et:ot}function _inherits$d(ot,et){if(typeof et!="function"&&et!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof et);ot.prototype=Object.create(et&&et.prototype,{constructor:{value:ot,enumerable:!1,writable:!0,configurable:!0}}),et&&(Object.setPrototypeOf?Object.setPrototypeOf(ot,et):ot.__proto__=et)}var Alpha=function(ot){_inherits$d(et,ot);function et(){var ct,ut,dt,ft;_classCallCheck$d(this,et);for(var zt=arguments.length,Dt=Array(zt),St=0;St<zt;St++)Dt[St]=arguments[St];return ft=(ut=(dt=_possibleConstructorReturn$d(this,(ct=et.__proto__||Object.getPrototypeOf(et)).call.apply(ct,[this].concat(Dt))),dt),dt.handleChange=function(Tt){var Rt=calculateChange$2(Tt,dt.props.hsl,dt.props.direction,dt.props.a,dt.container);Rt&&typeof dt.props.onChange=="function"&&dt.props.onChange(Rt,Tt)},dt.handleMouseDown=function(Tt){dt.handleChange(Tt),window.addEventListener("mousemove",dt.handleChange),window.addEventListener("mouseup",dt.handleMouseUp)},dt.handleMouseUp=function(){dt.unbindEventListeners()},dt.unbindEventListeners=function(){window.removeEventListener("mousemove",dt.handleChange),window.removeEventListener("mouseup",dt.handleMouseUp)},ut),_possibleConstructorReturn$d(dt,ft)}return _createClass$d(et,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var ct=this,ut=this.props.rgb,dt=_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("+ut.r+","+ut.g+","+ut.b+`, 0) 0%,
411
+ `),allowHTML:!1})]}),St&&jsxRuntimeExports.jsx(StyledHeaderDivider,{"data-testid":"stHeadingDivider",rainbow:St.includes("linear"),color:St})]})}StyledCheckbox$1=createStyled("div",{target:"edwcd611"})(({width:ot,theme:et})=>({width:ot,display:"flex",alignItems:"center",minHeight:et.sizes.smallElementHeight}),""),StyledContent=createStyled("div",{target:"edwcd610"})(({visibility:ot})=>({display:ot===LabelVisibilityOptions.Collapsed?"none":"flex",visibility:ot===LabelVisibilityOptions.Hidden?"hidden":"visible",verticalAlign:"middle",flexDirection:"row",alignItems:"center"}),"");function translateGapWidth(ot,et){let ct=et.spacing.lg;return ot==="medium"?ct=et.spacing.threeXL:ot==="large"&&(ct=et.spacing.fourXL),ct}const StyledHorizontalBlock=createStyled("div",{target:"e1f1d6gn5"})(({theme:ot,gap:et})=>({display:"flex",flexWrap:"wrap",flexGrow:1,alignItems:"stretch",gap:translateGapWidth(et,ot)}),""),GLOBAL_ELEMENTS=["balloons","snow"],StyledElementContainer=createStyled("div",{target:"e1f1d6gn4"})(({theme:ot,isStale:et,width:ct,elementType:ut})=>({width:ct,position:"relative","@media print":{"@-moz-document url-prefix()":{display:"block"},overflow:"visible"},":is(.stHtml-empty)":{display:"none"},":has(> .stCacheSpinner)":{height:ot.spacing.none,overflow:"visible",visibility:"visible",marginBottom:`-${ot.spacing.lg}`,zIndex:ot.zIndices.cacheSpinner},":has(> .stPageLink)":{marginTop:`-${ot.spacing.xs}`,marginBottom:`-${ot.spacing.xs}`},...et&&ut!=="skeleton"?{opacity:.33,transition:"opacity 1s ease-in 0.5s"}:{},...ut==="empty"?{display:"none"}:{},...GLOBAL_ELEMENTS.includes(ut)?{marginBottom:`-${ot.spacing.lg}`}:{}}),""),StyledColumn=createStyled("div",{target:"e1f1d6gn3"})(({theme:ot,weight:et,gap:ct,showBorder:ut,verticalAlignment:dt})=>{const{VerticalAlignment:ft}=Block$2.Column,zt=et*100,Dt=translateGapWidth(ct,ot),St=`calc(${zt}% - ${Dt})`;return{width:St,flex:`1 1 ${St}`,[`@media (max-width: ${ot.breakpoints.columns})`]:{minWidth:`calc(100% - ${ot.spacing.twoXL})`},...dt===ft.BOTTOM&&{marginTop:"auto",[`& ${StyledElementContainer}:last-of-type > ${StyledCheckbox$1}`]:{marginBottom:ot.spacing.sm}},...dt===ft.TOP&&{[`& ${StyledElementContainer}:last-of-type > ${StyledCheckbox$1}`]:{marginTop:ot.spacing.sm}},...dt===ft.CENTER&&{marginTop:"auto",marginBottom:"auto"},...ut&&{border:`${ot.sizes.borderWidth} solid ${ot.colors.borderColor}`,borderRadius:ot.radii.default,padding:`calc(${ot.spacing.lg} - ${ot.sizes.borderWidth})`}}},""),StyledVerticalBlock=createStyled("div",{target:"e1f1d6gn2"})(({width:ot,theme:et})=>({width:ot,position:"relative",display:"flex",flex:1,flexDirection:"column",gap:et.spacing.lg}),""),StyledVerticalBlockWrapper=createStyled("div",{target:"e1f1d6gn1"})({name:"1wmy9hl",styles:"display:flex;flex-direction:column;flex:1"}),StyledVerticalBlockBorderWrapper=createStyled("div",{target:"e1f1d6gn0"})(({theme:ot,border:et,height:ct})=>({...et&&{border:`${ot.sizes.borderWidth} solid ${ot.colors.borderColor}`,borderRadius:ot.radii.default,padding:`calc(${ot.spacing.lg} - ${ot.sizes.borderWidth})`},...ct&&{height:`${ct}px`,overflow:"auto"}}),""),Audio=React$1.lazy(()=>__vitePreload(()=>import("./index-DfPuZgVe.js"),[])),Balloons=React$1.lazy(()=>__vitePreload(()=>import("./index-D_ZpMtCx.js"),__vite__mapDeps([0,1]))),Snow=React$1.lazy(()=>__vitePreload(()=>import("./index-DjNlghsG.js"),__vite__mapDeps([2,1]))),ArrowDataFrame=React$1.lazy(()=>__vitePreload(()=>import("./index-D7beHGbk.js").then(async ot=>(await ot.__tla,ot)).then(ot=>ot.c),__vite__mapDeps([3,4,5,6,7,8,9,10,11,12,13]))),ArrowVegaLiteChart=React$1.lazy(()=>__vitePreload(()=>import("./index-Cjn3IAUe.js"),__vite__mapDeps([14,15,16,17,4,6,5]))),Toast=React$1.lazy(()=>__vitePreload(()=>import("./index-bnfkOWdV.js"),[])),BokehChart=React$1.lazy(()=>__vitePreload(()=>import("./index-BZMvJ6Yf.js"),[])),DebouncedBokehChart=debounceRender(BokehChart,100),DeckGlJsonChart=React$1.lazy(()=>__vitePreload(()=>import("./index-B3quCHCi.js"),__vite__mapDeps([18,9,10,6,5,19,4,20,15,16,21]))),GraphVizChart=React$1.lazy(()=>__vitePreload(()=>import("./index-W-TZSd1E.js"),__vite__mapDeps([22,17,16,20,6,5]))),IFrame=React$1.lazy(()=>__vitePreload(()=>import("./index-CoumX680.js"),[])),ImageList=React$1.lazy(()=>__vitePreload(()=>import("./index-DxHnoro7.js"),__vite__mapDeps([23,6,5]))),LinkButton=React$1.lazy(()=>__vitePreload(()=>import("./index-dkm5JtmN.js"),[])),PageLink=React$1.lazy(()=>__vitePreload(()=>import("./index-BkBgJKWs.js"),[])),PlotlyChart=React$1.lazy(()=>__vitePreload(()=>import("./index-DgKoCzGM.js"),__vite__mapDeps([24,4,5]))),Video=React$1.lazy(()=>__vitePreload(()=>import("./index-8qq2hPcx.js"),[])),AudioInput=React$1.lazy(()=>__vitePreload(()=>import("./index-CMQsen11.js"),__vite__mapDeps([25,4,6,26,8,12]))),Button=React$1.lazy(()=>__vitePreload(()=>import("./index-Bu07mO_x.js"),[])),ButtonGroup=React$1.lazy(()=>__vitePreload(()=>import("./index-C9-3Tvo1.js"),__vite__mapDeps([27,19,4]))),DownloadButton=React$1.lazy(()=>__vitePreload(()=>import("./index-DmCDp6tz.js"),__vite__mapDeps([28,8]))),CameraInput=React$1.lazy(()=>__vitePreload(()=>import("./index-BL2qQWaL.js"),__vite__mapDeps([29,4,30,31]))),ChatInput=React$1.lazy(()=>__vitePreload(()=>import("./index-B0CwOTPz.js"),__vite__mapDeps([32,33,34,35,36]))),Checkbox=React$1.lazy(()=>__vitePreload(()=>import("./index-CxiUGvN5.js"),__vite__mapDeps([37,19,4]))),ColorPicker=React$1.lazy(()=>__vitePreload(()=>import("./index-DqEaj7EU.js"),__vite__mapDeps([38,19,4]))),DateInput=React$1.lazy(()=>__vitePreload(()=>import("./index-Be0wHUx-.js"),__vite__mapDeps([39,19,4,40,10,11,41,36]))),Html=React$1.lazy(()=>__vitePreload(()=>import("./index-UQryvozB.js"),[])),Multiselect=React$1.lazy(()=>__vitePreload(()=>import("./index-BEeaeEPl.js"),__vite__mapDeps([42,19,4]))),Progress=React$1.lazy(()=>__vitePreload(()=>import("./index-DBeV5cvz.js"),__vite__mapDeps([43,31]))),Spinner=React$1.lazy(()=>__vitePreload(()=>import("./index-B3bELqRU.js"),[])),Radio=React$1.lazy(()=>__vitePreload(()=>import("./index-BDNxxQ4v.js"),__vite__mapDeps([44,19,4]))),Selectbox$1=React$1.lazy(()=>__vitePreload(()=>import("./index-DP9siobZ.js"),__vite__mapDeps([45,19,4]))),Slider$1=React$1.lazy(()=>__vitePreload(()=>import("./index-B1L1envm.js"),__vite__mapDeps([46,7,19,4]))),FileUploader=React$1.lazy(()=>__vitePreload(()=>import("./index-D2caMYlF.js"),__vite__mapDeps([47,4,31,26,30]))),TextArea=React$1.lazy(()=>__vitePreload(()=>import("./index-BB6FwCEX.js"),__vite__mapDeps([48,49,50,34,33,19,4,35,36]))),TextInput=React$1.lazy(()=>__vitePreload(()=>import("./index-BKKZmTqZ.js"),__vite__mapDeps([51,49,50,34,19,4,33,41,36]))),TimeInput=React$1.lazy(()=>__vitePreload(()=>import("./index-BLvsCvkf.js"),__vite__mapDeps([52,19,4,40,10,11]))),NumberInput=React$1.lazy(()=>__vitePreload(()=>import("./index-CRKAbc7H.js"),__vite__mapDeps([53,7,49,4,33,41,36]))),StreamlitSyntaxHighlighter=React$1.lazy(()=>__vitePreload(()=>Promise.resolve().then(()=>StreamlitSyntaxHighlighter$2),void 0));function hideIfStale(ot,et){return ot?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{}):et}const RawElementNodeRenderer=ot=>{const{node:et}=ot;if(!et)throw new Error("ElementNode not found.");const ct={width:ot.width,disableFullscreenMode:ot.disableFullscreenMode},ut={...ct,widgetMgr:ot.widgetMgr,disabled:ot.widgetsDisabled,fragmentId:et.fragmentId};switch(et.element.type){case"alert":{const ft=et.element.alert;return jsxRuntimeExports.jsx(AlertElement,{icon:ft.icon,body:ft.body,kind:getAlertElementKind(ft.format),...ct})}case"arrowTable":return jsxRuntimeExports.jsx(ArrowTable,{element:et.quiverElement,...ct});case"audio":return jsxRuntimeExports.jsx(Audio,{element:et.element.audio,endpoints:ot.endpoints,...ct,elementMgr:ot.widgetMgr});case"balloons":return hideIfStale(ot.isStale,jsxRuntimeExports.jsx(Balloons,{scriptRunId:ot.scriptRunId}));case"bokehChart":return jsxRuntimeExports.jsx(DebouncedBokehChart,{element:et.element.bokehChart,...ct});case"code":{const ft=et.element.code;return jsxRuntimeExports.jsx(StreamlitSyntaxHighlighter,{language:ft.language,showLineNumbers:ft.showLineNumbers,wrapLines:ft.wrapLines,children:ft.codeText})}case"deckGlJsonChart":return jsxRuntimeExports.jsx(DeckGlJsonChart,{element:et.element.deckGlJsonChart,...ut});case"docString":return jsxRuntimeExports.jsx(DocString,{element:et.element.docString,...ct});case"empty":return jsxRuntimeExports.jsx("div",{className:"stEmpty","data-testid":"stEmpty"});case"exception":return jsxRuntimeExports.jsx(ExceptionElement,{element:et.element.exception,...ct});case"graphvizChart":return jsxRuntimeExports.jsx(GraphVizChart,{element:et.element.graphvizChart,...ct});case"heading":return jsxRuntimeExports.jsx(Heading,{element:et.element.heading,...ct});case"iframe":return jsxRuntimeExports.jsx(IFrame,{element:et.element.iframe,...ct});case"imgs":return jsxRuntimeExports.jsx(ImageList,{element:et.element.imgs,endpoints:ot.endpoints,...ct});case"json":return jsxRuntimeExports.jsx(Json,{element:et.element.json,...ct});case"markdown":return jsxRuntimeExports.jsx(Markdown,{element:et.element.markdown,...ct});case"metric":return jsxRuntimeExports.jsx(Metric,{element:et.element.metric});case"html":return jsxRuntimeExports.jsx(Html,{element:et.element.html,...ct});case"pageLink":{const ft=et.element.pageLink,zt=ut.disabled||ft.disabled;return jsxRuntimeExports.jsx(PageLink,{element:ft,disabled:zt,...ct})}case"progress":return jsxRuntimeExports.jsx(Progress,{element:et.element.progress,...ct});case"skeleton":return jsxRuntimeExports.jsx(Skeleton,{element:et.element.skeleton});case"snow":return hideIfStale(ot.isStale,jsxRuntimeExports.jsx(Snow,{scriptRunId:ot.scriptRunId}));case"spinner":return jsxRuntimeExports.jsx(Spinner,{element:et.element.spinner,...ct});case"text":return jsxRuntimeExports.jsx(TextElement,{element:et.element.text,...ct});case"video":return jsxRuntimeExports.jsx(Video,{element:et.element.video,endpoints:ot.endpoints,...ct,elementMgr:ot.widgetMgr});case"toast":{const ft=et.element.toast;return jsxRuntimeExports.jsx(Toast,{body:ft.body,icon:ft.icon,...ct},et.scriptRunId)}case"arrowDataFrame":{const ft=et.element.arrowDataFrame;return ut.disabled=ut.disabled||ft.disabled,jsxRuntimeExports.jsx(ArrowDataFrame,{element:ft,data:et.quiverElement,...ft.id&&{key:ft.id},...ut})}case"arrowVegaLiteChart":const dt=et.vegaLiteChartElement;return jsxRuntimeExports.jsx(ArrowVegaLiteChart,{element:dt,...ut},dt.id||void 0);case"audioInput":{const ft=et.element.audioInput;return ut.disabled=ut.disabled||ft.disabled,jsxRuntimeExports.jsx(AudioInput,{uploadClient:ot.uploadClient,element:ft,...ut},ft.id)}case"button":{const ft=et.element.button;if(ut.disabled=ut.disabled||ft.disabled,ft.isFormSubmitter){const{formId:zt}=ft,Dt=ot.formsData.formsWithUploads.has(zt);return jsxRuntimeExports.jsx(FormSubmitContent,{element:ft,hasInProgressUpload:Dt,...ut})}return jsxRuntimeExports.jsx(Button,{element:ft,...ut})}case"buttonGroup":{const ft=et.element.buttonGroup;return ut.disabled=ut.disabled||ft.disabled,jsxRuntimeExports.jsx(ButtonGroup,{element:ft,...ut},ft.id)}case"downloadButton":{const ft=et.element.downloadButton;return ut.disabled=ut.disabled||ft.disabled,jsxRuntimeExports.jsx(DownloadButton,{endpoints:ot.endpoints,element:ft,...ut},ft.id)}case"cameraInput":{const ft=et.element.cameraInput;return ut.disabled=ut.disabled||ft.disabled,jsxRuntimeExports.jsx(CameraInput,{element:ft,uploadClient:ot.uploadClient,...ut},ft.id)}case"chatInput":{const ft=et.element.chatInput;return ut.disabled=ut.disabled||ft.disabled,jsxRuntimeExports.jsx(ChatInput,{element:ft,...ut},ft.id)}case"checkbox":{const ft=et.element.checkbox;return ut.disabled=ut.disabled||ft.disabled,jsxRuntimeExports.jsx(Checkbox,{element:ft,...ut},ft.id)}case"colorPicker":{const ft=et.element.colorPicker;return ut.disabled=ut.disabled||ft.disabled,jsxRuntimeExports.jsx(ColorPicker,{element:ft,...ut},ft.id)}case"componentInstance":return jsxRuntimeExports.jsx(ComponentInstance$1,{registry:ot.componentRegistry,element:et.element.componentInstance,...ut});case"dateInput":{const ft=et.element.dateInput;return ut.disabled=ut.disabled||ft.disabled,jsxRuntimeExports.jsx(DateInput,{element:ft,...ut},ft.id)}case"fileUploader":{const ft=et.element.fileUploader;return ut.disabled=ut.disabled||ft.disabled,jsxRuntimeExports.jsx(FileUploader,{element:ft,uploadClient:ot.uploadClient,...ut},ft.id)}case"linkButton":{const ft=et.element.linkButton;return ut.disabled=ut.disabled||ft.disabled,jsxRuntimeExports.jsx(LinkButton,{element:ft,...ut})}case"multiselect":{const ft=et.element.multiselect;return ut.disabled=ut.disabled||ft.disabled,jsxRuntimeExports.jsx(Multiselect,{element:ft,...ut},ft.id)}case"numberInput":{const ft=et.element.numberInput;return ut.disabled=ut.disabled||ft.disabled,jsxRuntimeExports.jsx(NumberInput,{element:ft,...ut},ft.id)}case"plotlyChart":{const ft=et.element.plotlyChart;return jsxRuntimeExports.jsx(PlotlyChart,{element:ft,...ut},ft.id)}case"radio":{const ft=et.element.radio;return ut.disabled=ut.disabled||ft.disabled,jsxRuntimeExports.jsx(Radio,{element:ft,...ut},ft.id)}case"selectbox":{const ft=et.element.selectbox;return ut.disabled=ut.disabled||ft.disabled,jsxRuntimeExports.jsx(Selectbox$1,{element:ft,...ut},ft.id)}case"slider":{const ft=et.element.slider;return ut.disabled=ut.disabled||ft.disabled,jsxRuntimeExports.jsx(Slider$1,{element:ft,...ut},ft.id)}case"textArea":{const ft=et.element.textArea;return ut.disabled=ut.disabled||ft.disabled,jsxRuntimeExports.jsx(TextArea,{element:ft,...ut},ft.id)}case"textInput":{const ft=et.element.textInput;return ut.disabled=ut.disabled||ft.disabled,jsxRuntimeExports.jsx(TextInput,{element:ft,...ut},ft.id)}case"timeInput":{const ft=et.element.timeInput;return ut.disabled=ut.disabled||ft.disabled,jsxRuntimeExports.jsx(TimeInput,{element:ft,...ut},ft.id)}default:throw new Error(`Unrecognized Element type ${et.element.type}`)}},ElementNodeRenderer=ot=>{const{isFullScreen:et,fragmentIdsThisRun:ct}=React$1.useContext(LibContext),{node:ut,width:dt}=ot,ft=ut.element.type||"",zt=shouldComponentBeEnabled(ft,ot.scriptRunState),Dt=isComponentStale(zt,ut,ot.scriptRunState,ot.scriptRunId,ct),St=getElementId(ut.element),Tt=getKeyFromId(St);return jsxRuntimeExports.jsx(Maybe,{enable:zt,children:jsxRuntimeExports.jsx(StyledElementContainer,{className:classNames("stElementContainer","element-container",convertKeyToClassName(Tt)),"data-testid":"stElementContainer","data-stale":Dt,isStale:Dt&&!et,width:dt,elementType:ft,children:jsxRuntimeExports.jsx(ErrorBoundary,{width:dt,children:jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:jsxRuntimeExports.jsx(Skeleton,{element:Skeleton$1.create({style:Skeleton$1.SkeletonStyle.ELEMENT})}),children:jsxRuntimeExports.jsx(RawElementNodeRenderer,{...ot,isStale:Dt})})})})})},BlockNodeRenderer=ot=>{const{node:et}=ot,{fragmentIdsThisRun:ct}=reactExports.useContext(LibContext);if(et.isEmpty&&!et.deltaBlock.allowEmpty)return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{});const ut=shouldComponentBeEnabled("",ot.scriptRunState),dt=isComponentStale(ut,et,ot.scriptRunState,ot.scriptRunId,ct),ft={...ot,node:et},zt=ot.disableFullscreenMode||notNullOrUndefined(et.deltaBlock.dialog)||notNullOrUndefined(et.deltaBlock.popover),Dt=jsxRuntimeExports.jsx(LayoutBlock,{...ft,disableFullscreenMode:zt});if(et.deltaBlock.dialog)return jsxRuntimeExports.jsx(DialogWithProvider,{element:et.deltaBlock.dialog,deltaMsgReceivedAt:et.deltaMsgReceivedAt,children:Dt});if(et.deltaBlock.expandable)return jsxRuntimeExports.jsx(Expander,{empty:et.isEmpty,isStale:dt,element:et.deltaBlock.expandable,children:Dt});if(et.deltaBlock.popover)return jsxRuntimeExports.jsx(Popover,{empty:et.isEmpty,element:et.deltaBlock.popover,width:ot.width,children:Dt});if(et.deltaBlock.type==="form"){const{formId:St,clearOnSubmit:Tt,enterToSubmit:Rt,border:$t}=et.deltaBlock.form,kt=ot.formsData.submitButtons.get(St),Bt=kt!==void 0&&kt.length>0;return jsxRuntimeExports.jsx(Form,{formId:St,clearOnSubmit:Tt,enterToSubmit:Rt,width:ot.width,hasSubmitButton:Bt,scriptRunState:ot.scriptRunState,widgetMgr:ot.widgetMgr,border:$t,children:Dt})}if(et.deltaBlock.chatMessage)return jsxRuntimeExports.jsx(ChatMessage,{element:et.deltaBlock.chatMessage,endpoints:ot.endpoints,children:Dt});if(et.deltaBlock.column)return jsxRuntimeExports.jsx(StyledColumn,{weight:et.deltaBlock.column.weight??0,gap:et.deltaBlock.column.gap??"",verticalAlignment:et.deltaBlock.column.verticalAlignment??void 0,showBorder:et.deltaBlock.column.showBorder??!1,className:"stColumn","data-testid":"stColumn",children:Dt});if(et.deltaBlock.tabContainer){const St={...ft,isStale:dt,renderTabContent:Tt=>jsxRuntimeExports.jsx(VerticalBlock,{...Tt})};return jsxRuntimeExports.jsx(Tabs,{...St})}return Dt},ChildRenderer=ot=>{const{libConfig:et}=reactExports.useContext(LibContext);assignDividerColor(ot.node,useTheme());const ct=new Set;return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:ot.node.children&&ot.node.children.map((ut,dt)=>{const ft=et.disableFullscreenMode||ot.disableFullscreenMode;if(ut instanceof ElementNode){const zt={...ot,disableFullscreenMode:ft,node:ut},Dt=getElementId(ut.element)||dt.toString();return ct.has(Dt)?null:(ct.add(Dt),jsxRuntimeExports.jsx(ElementNodeRenderer,{...zt},Dt))}if(ut instanceof BlockNode){const zt={...ot,disableFullscreenMode:ft,node:ut};return jsxRuntimeExports.jsx(BlockNodeRenderer,{...zt},dt)}throw new Error(`Unrecognized AppNode: ${ut}`)})})};function ScrollToBottomVerticalBlockWrapper(ot){const{border:et,height:ct,children:ut}=ot,dt=useScrollToBottom();return jsxRuntimeExports.jsx(StyledVerticalBlockBorderWrapper,{border:et,height:ct,"data-testid":"stVerticalBlockBorderWrapper","data-test-scroll-behavior":"scroll-to-bottom",ref:dt,children:ut})}const VerticalBlock=ot=>{var $t,kt;const et=reactExports.useRef(null),[ct,ut]=React$1.useState(-1),dt=reactExports.useMemo(()=>new ResizeObserver(([Bt])=>{window.requestAnimationFrame(()=>{ut(Bt.target.getBoundingClientRect().width||-1)})}),[ut]),ft=(($t=ot.node.deltaBlock.vertical)==null?void 0:$t.border)??!1,zt=((kt=ot.node.deltaBlock.vertical)==null?void 0:kt.height)||void 0,Dt=zt&&ot.node.children.find(Bt=>Bt instanceof BlockNode&&Bt.deltaBlock.type==="chatMessage")!==void 0;reactExports.useEffect(()=>(et.current&&dt.observe(et.current),()=>{dt.disconnect()}),[dt,Dt]);const St=Dt?ScrollToBottomVerticalBlockWrapper:StyledVerticalBlockBorderWrapper,Tt={...ot,width:ct},Rt=getKeyFromId(ot.node.deltaBlock.id);return jsxRuntimeExports.jsx(St,{border:ft,height:zt,"data-testid":"stVerticalBlockBorderWrapper","data-test-scroll-behavior":"normal",children:jsxRuntimeExports.jsx(StyledVerticalBlockWrapper,{ref:et,children:jsxRuntimeExports.jsx(StyledVerticalBlock,{width:ct,className:classNames("stVerticalBlock",convertKeyToClassName(Rt)),"data-testid":"stVerticalBlock",children:jsxRuntimeExports.jsx(ChildRenderer,{...Tt})})})})},HorizontalBlock=ot=>{var ct;const et=((ct=ot.node.deltaBlock.horizontal)==null?void 0:ct.gap)??"";return jsxRuntimeExports.jsx(StyledHorizontalBlock,{gap:et,className:"stHorizontalBlock","data-testid":"stHorizontalBlock",children:jsxRuntimeExports.jsx(ChildRenderer,{...ot})})};function LayoutBlock(ot){return ot.node.deltaBlock.horizontal?jsxRuntimeExports.jsx(HorizontalBlock,{...ot}):jsxRuntimeExports.jsx(VerticalBlock,{...ot})}let StyledDataFrameOverlay,PortalProvider;StyledDataFrameOverlay=createStyled("div",{target:"e1v116lc0"})(({theme:ot})=>({position:"fixed",top:0,left:0,zIndex:ot.zIndices.tablePortal,lineHeight:"100%"}),""),PortalContext=React$1.createContext(null),PortalProvider=({children:ot})=>{const et=reactExports.useRef(null),ct=reactExports.useCallback(()=>et.current,[]);return jsxRuntimeExports.jsxs(PortalContext.Provider,{value:ct,children:[ot,jsxRuntimeExports.jsx(StyledDataFrameOverlay,{"data-testid":"portal",id:"portal",ref:et})]})};function ThemeProvider({theme:ot,baseuiTheme:et,children:ct}){return jsxRuntimeExports.jsx(ThemeProvider$1,{theme:et||baseuiLightTheme,children:jsxRuntimeExports.jsx(ThemeProvider$2,{theme:ot,children:ct})})}function toCodePoint(ot,et){const ct=[];let ut=0,dt=0,ft=0;for(;ft<ot.length;)ut=ot.charCodeAt(ft++),dt?(ct.push((65536+(dt-55296<<10)+(ut-56320)).toString(16)),dt=0):55296<=ut&&ut<=56319?dt=ut:ct.push(ut.toString(16));return ct.join("-")}const UFE0Fg=/\uFE0F/g,U200D="\u200D";function grabTheRightIcon(ot){return toCodePoint(ot.indexOf(U200D)<0?ot.replace(UFE0Fg,""):ot)}function iconToUrl(ot){const et=/^:(.+)\/(.+):$/,ct=ot.match(et);return ct===null?"":`https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsrounded/${ct[2]}/default/24px.svg`}function handleFavicon(ot,et,ct){const ut=extractEmoji(ot);let dt;ut&&!ot.startsWith(":material")?dt=`https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/72x72/${grabTheRightIcon(ut)}.png`:ot.startsWith(":material")?dt=iconToUrl(ot):dt=ct.buildMediaURL(ot),overwriteFavicon(dt),et({type:"SET_PAGE_FAVICON",favicon:dt})}function overwriteFavicon(ot){const et=document.querySelector("link[rel='shortcut icon']");et&&(et.href=ot)}function extractEmoji(ot){const et=ot.replace("-","_");return nodeEmoji$1.hasEmoji(nodeEmoji$1.get(et))?nodeEmoji$1.get(et):nodeEmoji$1.hasEmoji(ot)?ot:""}var lib$2={},flattenNames$1={},baseFor$1=_baseFor,keys$2=keys_1;function baseForOwn$4(ot,et){return ot&&baseFor$1(ot,et,keys$2)}var _baseForOwn=baseForOwn$4,identity$3=identity_1;function castFunction$2(ot){return typeof ot=="function"?ot:identity$3}var _castFunction=castFunction$2,baseForOwn$3=_baseForOwn,castFunction$1=_castFunction;function forOwn(ot,et){return ot&&baseForOwn$3(ot,castFunction$1(et))}var forOwn_1=forOwn,HASH_UNDEFINED$3="__lodash_hash_undefined__";function setCacheAdd$2(ot){return this.__data__.set(ot,HASH_UNDEFINED$3),this}var _setCacheAdd=setCacheAdd$2;function setCacheHas$2(ot){return this.__data__.has(ot)}var _setCacheHas=setCacheHas$2,MapCache$1=_MapCache,setCacheAdd$1=_setCacheAdd,setCacheHas$1=_setCacheHas;function SetCache$3(ot){var et=-1,ct=ot==null?0:ot.length;for(this.__data__=new MapCache$1;++et<ct;)this.add(ot[et])}SetCache$3.prototype.add=SetCache$3.prototype.push=setCacheAdd$1,SetCache$3.prototype.has=setCacheHas$1,_SetCache=SetCache$3;function arraySome$2(ot,et){for(var ct=-1,ut=ot==null?0:ot.length;++ct<ut;)if(et(ot[ct],ct,ot))return!0;return!1}var _arraySome=arraySome$2;function cacheHas$3(ot,et){return ot.has(et)}let SetCache$2,arraySome$1,cacheHas$2,COMPARE_PARTIAL_FLAG$b,COMPARE_UNORDERED_FLAG$7;_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(ot,et,ct,ut,dt,ft){var zt=ct&COMPARE_PARTIAL_FLAG$b,Dt=ot.length,St=et.length;if(Dt!=St&&!(zt&&St>Dt))return!1;var Tt=ft.get(ot),Rt=ft.get(et);if(Tt&&Rt)return Tt==et&&Rt==ot;var $t=-1,kt=!0,Bt=ct&COMPARE_UNORDERED_FLAG$7?new SetCache$2:void 0;for(ft.set(ot,et),ft.set(et,ot);++$t<Dt;){var Ft=ot[$t],jt=et[$t];if(ut)var Kt=zt?ut(jt,Ft,$t,et,ot,ft):ut(Ft,jt,$t,ot,et,ft);if(Kt!==void 0){if(Kt)continue;kt=!1;break}if(Bt){if(!arraySome$1(et,function(Yt,Ut){if(!cacheHas$2(Bt,Ut)&&(Ft===Yt||dt(Ft,Yt,ct,ut,ft)))return Bt.push(Ut)})){kt=!1;break}}else if(!(Ft===jt||dt(Ft,jt,ct,ut,ft))){kt=!1;break}}return ft.delete(ot),ft.delete(et),kt}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(ot,et,ct,ut,dt,ft,zt){switch(ct){case dataViewTag$3:if(ot.byteLength!=et.byteLength||ot.byteOffset!=et.byteOffset)return!1;ot=ot.buffer,et=et.buffer;case arrayBufferTag$2:return!(ot.byteLength!=et.byteLength||!ft(new Uint8Array$2(ot),new Uint8Array$2(et)));case boolTag$2:case dateTag$2:case numberTag$2:return eq$1(+ot,+et);case errorTag$2:return ot.name==et.name&&ot.message==et.message;case regexpTag$2:case stringTag$2:return ot==et+"";case mapTag$3:var Dt=mapToArray$1;case setTag$3:var St=ut&COMPARE_PARTIAL_FLAG$a;if(Dt||(Dt=setToArray$1),ot.size!=et.size&&!St)return!1;var Tt=zt.get(ot);if(Tt)return Tt==et;ut|=COMPARE_UNORDERED_FLAG$6,zt.set(ot,et);var Rt=equalArrays$2(Dt(ot),Dt(et),ut,dt,ft,zt);return zt.delete(ot),Rt;case symbolTag$2:if(symbolValueOf$1)return symbolValueOf$1.call(ot)==symbolValueOf$1.call(et)}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(ot,et,ct,ut,dt,ft){var zt=ct&COMPARE_PARTIAL_FLAG$9,Dt=getAllKeys$1(ot),St=Dt.length,Tt=getAllKeys$1(et),Rt=Tt.length;if(St!=Rt&&!zt)return!1;for(var $t=St;$t--;){var kt=Dt[$t];if(!(zt?kt in et:hasOwnProperty$f.call(et,kt)))return!1}var Bt=ft.get(ot),Ft=ft.get(et);if(Bt&&Ft)return Bt==et&&Ft==ot;var jt=!0;ft.set(ot,et),ft.set(et,ot);for(var Kt=zt;++$t<St;){kt=Dt[$t];var Yt=ot[kt],Ut=et[kt];if(ut)var Jt=zt?ut(Ut,Yt,kt,et,ot,ft):ut(Yt,Ut,kt,ot,et,ft);if(!(Jt===void 0?Yt===Ut||dt(Yt,Ut,ct,ut,ft):Jt)){jt=!1;break}Kt||(Kt=kt=="constructor")}if(jt&&!Kt){var Ht=ot.constructor,e0=et.constructor;Ht!=e0&&"constructor"in ot&&"constructor"in et&&!(typeof Ht=="function"&&Ht instanceof Ht&&typeof e0=="function"&&e0 instanceof e0)&&(jt=!1)}return ft.delete(ot),ft.delete(et),jt}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(ot,et,ct,ut,dt,ft){var zt=isArray$7(ot),Dt=isArray$7(et),St=zt?arrayTag$2:getTag$1(ot),Tt=Dt?arrayTag$2:getTag$1(et);St=St==argsTag$3?objectTag$4:St,Tt=Tt==argsTag$3?objectTag$4:Tt;var Rt=St==objectTag$4,$t=Tt==objectTag$4,kt=St==Tt;if(kt&&isBuffer$2(ot)){if(!isBuffer$2(et))return!1;zt=!0,Rt=!1}if(kt&&!Rt)return ft||(ft=new Stack$2),zt||isTypedArray$2(ot)?equalArrays$1(ot,et,ct,ut,dt,ft):equalByTag$1(ot,et,St,ct,ut,dt,ft);if(!(ct&COMPARE_PARTIAL_FLAG$8)){var Bt=Rt&&hasOwnProperty$e.call(ot,"__wrapped__"),Ft=$t&&hasOwnProperty$e.call(et,"__wrapped__");if(Bt||Ft){var jt=Bt?ot.value():ot,Kt=Ft?et.value():et;return ft||(ft=new Stack$2),dt(jt,Kt,ct,ut,ft)}}return kt?(ft||(ft=new Stack$2),equalObjects$1(ot,et,ct,ut,dt,ft)):!1}var _baseIsEqualDeep=baseIsEqualDeep$2,baseIsEqualDeep$1=_baseIsEqualDeep,isObjectLike$1=isObjectLike_1;function baseIsEqual$4(ot,et,ct,ut,dt){return ot===et?!0:ot==null||et==null||!isObjectLike$1(ot)&&!isObjectLike$1(et)?ot!==ot&&et!==et:baseIsEqualDeep$1(ot,et,ct,ut,baseIsEqual$4,dt)}var _baseIsEqual=baseIsEqual$4,Stack$1=_Stack,baseIsEqual$3=_baseIsEqual,COMPARE_PARTIAL_FLAG$7=1,COMPARE_UNORDERED_FLAG$5=2;function baseIsMatch$2(ot,et,ct,ut){var dt=ct.length,ft=dt,zt=!ut;if(ot==null)return!ft;for(ot=Object(ot);dt--;){var Dt=ct[dt];if(zt&&Dt[2]?Dt[1]!==ot[Dt[0]]:!(Dt[0]in ot))return!1}for(;++dt<ft;){Dt=ct[dt];var St=Dt[0],Tt=ot[St],Rt=Dt[1];if(zt&&Dt[2]){if(Tt===void 0&&!(St in ot))return!1}else{var $t=new Stack$1;if(ut)var kt=ut(Tt,Rt,St,ot,et,$t);if(!(kt===void 0?baseIsEqual$3(Rt,Tt,COMPARE_PARTIAL_FLAG$7|COMPARE_UNORDERED_FLAG$5,ut,$t):kt))return!1}}return!0}var _baseIsMatch=baseIsMatch$2,isObject$4=isObject_1;function isStrictComparable$3(ot){return ot===ot&&!isObject$4(ot)}var _isStrictComparable=isStrictComparable$3,isStrictComparable$2=_isStrictComparable,keys$1=keys_1;function getMatchData$2(ot){for(var et=keys$1(ot),ct=et.length;ct--;){var ut=et[ct],dt=ot[ut];et[ct]=[ut,dt,isStrictComparable$2(dt)]}return et}var _getMatchData=getMatchData$2;function matchesStrictComparable$3(ot,et){return function(ct){return ct==null?!1:ct[ot]===et&&(et!==void 0||ot in Object(ct))}}var _matchesStrictComparable=matchesStrictComparable$3,baseIsMatch$1=_baseIsMatch,getMatchData$1=_getMatchData,matchesStrictComparable$2=_matchesStrictComparable;function baseMatches$2(ot){var et=getMatchData$1(ot);return et.length==1&&et[0][2]?matchesStrictComparable$2(et[0][0],et[0][1]):function(ct){return ct===ot||baseIsMatch$1(ct,ot,et)}}var _baseMatches=baseMatches$2;function baseHasIn$2(ot,et){return ot!=null&&et in Object(ot)}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(ot,et,ct){et=castPath$3(et,ot);for(var ut=-1,dt=et.length,ft=!1;++ut<dt;){var zt=toKey$4(et[ut]);if(!(ft=ot!=null&&ct(ot,zt)))break;ot=ot[zt]}return ft||++ut!=dt?ft:(dt=ot==null?0:ot.length,!!dt&&isLength$1(dt)&&isIndex$2(zt,dt)&&(isArray$6(ot)||isArguments$1(ot)))}let baseHasIn$1,hasPath$1;_hasPath=hasPath$2,baseHasIn$1=_baseHasIn,hasPath$1=_hasPath;function hasIn$3(ot,et){return ot!=null&&hasPath$1(ot,et,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(ot,et){return isKey$2(ot)&&isStrictComparable$1(et)?matchesStrictComparable$1(toKey$3(ot),et):function(ct){var ut=get$2(ct,ot);return ut===void 0&&ut===et?hasIn$2(ct,ot):baseIsEqual$2(et,ut,COMPARE_PARTIAL_FLAG$6|COMPARE_UNORDERED_FLAG$4)}}var _baseMatchesProperty=baseMatchesProperty$2,baseGet$3=_baseGet;function basePropertyDeep$2(ot){return function(et){return baseGet$3(et,ot)}}var _basePropertyDeep=basePropertyDeep$2,baseProperty$1=_baseProperty,basePropertyDeep$1=_basePropertyDeep,isKey$1=_isKey,toKey$2=_toKey;function property$2(ot){return isKey$1(ot)?baseProperty$1(toKey$2(ot)):basePropertyDeep$1(ot)}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(ot){return typeof ot=="function"?ot:ot==null?identity$2:typeof ot=="object"?isArray$5(ot)?baseMatchesProperty$1(ot[0],ot[1]):baseMatches$1(ot):property$1(ot)}var _baseIteratee=baseIteratee$5,isArrayLike$2=isArrayLike_1;function createBaseEach$2(ot,et){return function(ct,ut){if(ct==null)return ct;if(!isArrayLike$2(ct))return ot(ct,ut);for(var dt=ct.length,ft=et?dt:-1,zt=Object(ct);(et?ft--:++ft<dt)&&ut(zt[ft],ft,zt)!==!1;);return ct}}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(ot,et){var ct=-1,ut=isArrayLike$1(ot)?Array(ot.length):[];return baseEach$2(ot,function(dt,ft,zt){ut[++ct]=et(dt,ft,zt)}),ut}var _baseMap=baseMap$3,arrayMap$3=_arrayMap,baseIteratee$4=_baseIteratee,baseMap$2=_baseMap,isArray$4=isArray_1;function map$1(ot,et){var ct=isArray$4(ot)?arrayMap$3:baseMap$2;return ct(ot,baseIteratee$4(et))}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(ot){return ot&&ot.__esModule?ot:{default:ot}}var flattenNames=flattenNames$1.flattenNames=function ot(){var et=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],ct=[];return(0,_map3.default)(et,function(ut){Array.isArray(ut)?ot(ut).map(function(dt){return ct.push(dt)}):(0,_isPlainObject3.default)(ut)?(0,_forOwn3$2.default)(ut,function(dt,ft){dt===!0&&ct.push(ft),ct.push(ft+"-"+dt)}):(0,_isString3.default)(ut)&&ct.push(ut)}),ct};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(ot){for(var et=1;et<arguments.length;et++){var ct=arguments[et];for(var ut in ct)Object.prototype.hasOwnProperty.call(ct,ut)&&(ot[ut]=ct[ut])}return ot};function _interopRequireDefault$6(ot){return ot&&ot.__esModule?ot:{default:ot}}var mergeClasses=mergeClasses$1.mergeClasses=function ot(et){var ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],ut=et.default&&(0,_cloneDeep3.default)(et.default)||{};return ct.map(function(dt){var ft=et[dt];return ft&&(0,_forOwn3$1.default)(ft,function(zt,Dt){ut[Dt]||(ut[Dt]={}),ut[Dt]=_extends$w({},ut[Dt],ft[Dt])}),dt}),ut};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(ot){for(var et=1;et<arguments.length;et++){var ct=arguments[et];for(var ut in ct)Object.prototype.hasOwnProperty.call(ct,ut)&&(ot[ut]=ct[ut])}return ot};function _interopRequireDefault$5(ot){return ot.__esModule?ot:{default:ot}}var transforms={borderRadius:function ot(et){return{msBorderRadius:et,MozBorderRadius:et,OBorderRadius:et,WebkitBorderRadius:et,borderRadius:et}},boxShadow:function ot(et){return{msBoxShadow:et,MozBoxShadow:et,OBoxShadow:et,WebkitBoxShadow:et,boxShadow:et}},userSelect:function ot(et){return{WebkitTouchCallout:et,KhtmlUserSelect:et,MozUserSelect:et,msUserSelect:et,WebkitUserSelect:et,userSelect:et}},flex:function ot(et){return{WebkitBoxFlex:et,MozBoxFlex:et,WebkitFlex:et,msFlex:et,flex:et}},flexBasis:function ot(et){return{WebkitFlexBasis:et,flexBasis:et}},justifyContent:function ot(et){return{WebkitJustifyContent:et,justifyContent:et}},transition:function ot(et){return{msTransition:et,MozTransition:et,OTransition:et,WebkitTransition:et,transition:et}},transform:function ot(et){return{msTransform:et,MozTransform:et,OTransform:et,WebkitTransform:et,transform:et}},absolute:function ot(et){var ct=et&&et.split(" ");return{position:"absolute",top:ct&&ct[0],right:ct&&ct[1],bottom:ct&&ct[2],left:ct&&ct[3]}},extend:function ot(et,ct){var ut=ct[et];return ut||{extend:et}}},autoprefix=autoprefix$1.autoprefix=function ot(et){var ct={};return(0,_forOwn3.default)(et,function(ut,dt){var ft={};(0,_forOwn3.default)(ut,function(zt,Dt){var St=transforms[Dt];St?ft=_extends$v({},ft,St(zt)):ft[Dt]=zt}),ct[dt]=ft}),ct};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(ot){for(var et=1;et<arguments.length;et++){var ct=arguments[et];for(var ut in ct)Object.prototype.hasOwnProperty.call(ct,ut)&&(ot[ut]=ct[ut])}return ot},_react$3=reactExports,_react2$3=_interopRequireDefault$4(_react$3);function _interopRequireDefault$4(ot){return ot&&ot.__esModule?ot:{default:ot}}function _classCallCheck$f(ot,et){if(!(ot instanceof et))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$f(ot,et){if(!ot)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return et&&(typeof et=="object"||typeof et=="function")?et:ot}function _inherits$f(ot,et){if(typeof et!="function"&&et!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof et);ot.prototype=Object.create(et&&et.prototype,{constructor:{value:ot,enumerable:!1,writable:!0,configurable:!0}}),et&&(Object.setPrototypeOf?Object.setPrototypeOf(ot,et):ot.__proto__=et)}var hover=hover$1.hover=function ot(et){var ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(ut){_inherits$f(dt,ut);function dt(){var ft,zt,Dt,St;_classCallCheck$f(this,dt);for(var Tt=arguments.length,Rt=Array(Tt),$t=0;$t<Tt;$t++)Rt[$t]=arguments[$t];return St=(zt=(Dt=_possibleConstructorReturn$f(this,(ft=dt.__proto__||Object.getPrototypeOf(dt)).call.apply(ft,[this].concat(Rt))),Dt),Dt.state={hover:!1},Dt.handleMouseOver=function(){return Dt.setState({hover:!0})},Dt.handleMouseOut=function(){return Dt.setState({hover:!1})},Dt.render=function(){return _react2$3.default.createElement(ct,{onMouseOver:Dt.handleMouseOver,onMouseOut:Dt.handleMouseOut},_react2$3.default.createElement(et,_extends$u({},Dt.props,Dt.state)))},zt),_possibleConstructorReturn$f(Dt,St)}return dt}(_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(ot){for(var et=1;et<arguments.length;et++){var ct=arguments[et];for(var ut in ct)Object.prototype.hasOwnProperty.call(ct,ut)&&(ot[ut]=ct[ut])}return ot},_react$2=reactExports,_react2$2=_interopRequireDefault$3(_react$2);function _interopRequireDefault$3(ot){return ot&&ot.__esModule?ot:{default:ot}}function _classCallCheck$e(ot,et){if(!(ot instanceof et))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$e(ot,et){if(!ot)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return et&&(typeof et=="object"||typeof et=="function")?et:ot}function _inherits$e(ot,et){if(typeof et!="function"&&et!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof et);ot.prototype=Object.create(et&&et.prototype,{constructor:{value:ot,enumerable:!1,writable:!0,configurable:!0}}),et&&(Object.setPrototypeOf?Object.setPrototypeOf(ot,et):ot.__proto__=et)}var active=active$1.active=function ot(et){var ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(ut){_inherits$e(dt,ut);function dt(){var ft,zt,Dt,St;_classCallCheck$e(this,dt);for(var Tt=arguments.length,Rt=Array(Tt),$t=0;$t<Tt;$t++)Rt[$t]=arguments[$t];return St=(zt=(Dt=_possibleConstructorReturn$e(this,(ft=dt.__proto__||Object.getPrototypeOf(dt)).call.apply(ft,[this].concat(Rt))),Dt),Dt.state={active:!1},Dt.handleMouseDown=function(){return Dt.setState({active:!0})},Dt.handleMouseUp=function(){return Dt.setState({active:!1})},Dt.render=function(){return _react2$2.default.createElement(ct,{onMouseDown:Dt.handleMouseDown,onMouseUp:Dt.handleMouseUp},_react2$2.default.createElement(et,_extends$t({},Dt.props,Dt.state)))},zt),_possibleConstructorReturn$e(Dt,St)}return dt}(_react2$2.default.Component)};active$1.default=active;var loop={};Object.defineProperty(loop,"__esModule",{value:!0});var loopable=function ot(et,ct){var ut={},dt=function(ft){var zt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;ut[ft]=zt};return et===0&&dt("first-child"),et===ct-1&&dt("last-child"),(et===0||et%2===0)&&dt("even"),Math.abs(et%2)===1&&dt("odd"),dt("nth-child",et),ut};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(ot){return ot&&ot.__esModule?ot:{default:ot}}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 ot(et){for(var ct=arguments.length,ut=Array(ct>1?ct-1:0),dt=1;dt<ct;dt++)ut[dt-1]=arguments[dt];var ft=(0,_flattenNames2.default)(ut),zt=(0,_mergeClasses2.default)(et,ft);return(0,_autoprefix2.default)(zt)},_default$2=lib$2.default=ReactCSS,calculateChange$2=function ot(et,ct,ut,dt,ft){var zt=ft.clientWidth,Dt=ft.clientHeight,St=typeof et.pageX=="number"?et.pageX:et.touches[0].pageX,Tt=typeof et.pageY=="number"?et.pageY:et.touches[0].pageY,Rt=St-(ft.getBoundingClientRect().left+window.pageXOffset),$t=Tt-(ft.getBoundingClientRect().top+window.pageYOffset);if(ut==="vertical"){var kt=void 0;if($t<0?kt=0:$t>Dt?kt=1:kt=Math.round($t*100/Dt)/100,ct.a!==kt)return{h:ct.h,s:ct.s,l:ct.l,a:kt,source:"rgb"}}else{var Bt=void 0;if(Rt<0?Bt=0:Rt>zt?Bt=1:Bt=Math.round(Rt*100/zt)/100,dt!==Bt)return{h:ct.h,s:ct.s,l:ct.l,a:Bt,source:"rgb"}}return null},checkboardCache={},render=function ot(et,ct,ut,dt){if(typeof document>"u"&&!dt)return null;var ft=dt?new dt:document.createElement("canvas");ft.width=ut*2,ft.height=ut*2;var zt=ft.getContext("2d");return zt?(zt.fillStyle=et,zt.fillRect(0,0,ft.width,ft.height),zt.fillStyle=ct,zt.fillRect(0,0,ut,ut),zt.translate(ut,ut),zt.fillRect(0,0,ut,ut),ft.toDataURL()):null},get$1=function ot(et,ct,ut,dt){var ft=et+"-"+ct+"-"+ut+(dt?"-server":"");if(checkboardCache[ft])return checkboardCache[ft];var zt=render(et,ct,ut,dt);return checkboardCache[ft]=zt,zt},_extends$s=Object.assign||function(ot){for(var et=1;et<arguments.length;et++){var ct=arguments[et];for(var ut in ct)Object.prototype.hasOwnProperty.call(ct,ut)&&(ot[ut]=ct[ut])}return ot},Checkboard=function ot(et){var ct=et.white,ut=et.grey,dt=et.size,ft=et.renderers,zt=et.borderRadius,Dt=et.boxShadow,St=et.children,Tt=_default$2({default:{grid:{borderRadius:zt,boxShadow:Dt,absolute:"0px 0px 0px 0px",background:"url("+get$1(ct,ut,dt,ft.canvas)+") center left"}}});return reactExports.isValidElement(St)?React$1.cloneElement(St,_extends$s({},St.props,{style:_extends$s({},St.props.style,Tt.grid)})):React$1.createElement("div",{style:Tt.grid})};Checkboard.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};var _extends$r=Object.assign||function(ot){for(var et=1;et<arguments.length;et++){var ct=arguments[et];for(var ut in ct)Object.prototype.hasOwnProperty.call(ct,ut)&&(ot[ut]=ct[ut])}return ot},_createClass$d=function(){function ot(et,ct){for(var ut=0;ut<ct.length;ut++){var dt=ct[ut];dt.enumerable=dt.enumerable||!1,dt.configurable=!0,"value"in dt&&(dt.writable=!0),Object.defineProperty(et,dt.key,dt)}}return function(et,ct,ut){return ct&&ot(et.prototype,ct),ut&&ot(et,ut),et}}();function _classCallCheck$d(ot,et){if(!(ot instanceof et))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$d(ot,et){if(!ot)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return et&&(typeof et=="object"||typeof et=="function")?et:ot}function _inherits$d(ot,et){if(typeof et!="function"&&et!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof et);ot.prototype=Object.create(et&&et.prototype,{constructor:{value:ot,enumerable:!1,writable:!0,configurable:!0}}),et&&(Object.setPrototypeOf?Object.setPrototypeOf(ot,et):ot.__proto__=et)}var Alpha=function(ot){_inherits$d(et,ot);function et(){var ct,ut,dt,ft;_classCallCheck$d(this,et);for(var zt=arguments.length,Dt=Array(zt),St=0;St<zt;St++)Dt[St]=arguments[St];return ft=(ut=(dt=_possibleConstructorReturn$d(this,(ct=et.__proto__||Object.getPrototypeOf(et)).call.apply(ct,[this].concat(Dt))),dt),dt.handleChange=function(Tt){var Rt=calculateChange$2(Tt,dt.props.hsl,dt.props.direction,dt.props.a,dt.container);Rt&&typeof dt.props.onChange=="function"&&dt.props.onChange(Rt,Tt)},dt.handleMouseDown=function(Tt){dt.handleChange(Tt),window.addEventListener("mousemove",dt.handleChange),window.addEventListener("mouseup",dt.handleMouseUp)},dt.handleMouseUp=function(){dt.unbindEventListeners()},dt.unbindEventListeners=function(){window.removeEventListener("mousemove",dt.handleChange),window.removeEventListener("mouseup",dt.handleMouseUp)},ut),_possibleConstructorReturn$d(dt,ft)}return _createClass$d(et,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var ct=this,ut=this.props.rgb,dt=_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("+ut.r+","+ut.g+","+ut.b+`, 0) 0%,
412
412
  rgba(`+ut.r+","+ut.g+","+ut.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:ut.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("+ut.r+","+ut.g+","+ut.b+`, 0) 0%,
413
413
  rgba(`+ut.r+","+ut.g+","+ut.b+", 1) 100%)"},pointer:{left:0,top:ut.a*100+"%"}},overwrite:_extends$r({},this.props.style)},{vertical:this.props.direction==="vertical",overwrite:!0});return React$1.createElement("div",{style:dt.alpha},React$1.createElement("div",{style:dt.checkboard},React$1.createElement(Checkboard,{renderers:this.props.renderers})),React$1.createElement("div",{style:dt.gradient}),React$1.createElement("div",{style:dt.container,ref:function(ft){return ct.container=ft},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},React$1.createElement("div",{style:dt.pointer},this.props.pointer?React$1.createElement(this.props.pointer,this.props):React$1.createElement("div",{style:dt.slider}))))}}]),et}(reactExports.PureComponent||reactExports.Component),_createClass$c=function(){function ot(et,ct){for(var ut=0;ut<ct.length;ut++){var dt=ct[ut];dt.enumerable=dt.enumerable||!1,dt.configurable=!0,"value"in dt&&(dt.writable=!0),Object.defineProperty(et,dt.key,dt)}}return function(et,ct,ut){return ct&&ot(et.prototype,ct),ut&&ot(et,ut),et}}();function _defineProperty$d(ot,et,ct){return et in ot?Object.defineProperty(ot,et,{value:ct,enumerable:!0,configurable:!0,writable:!0}):ot[et]=ct,ot}function _classCallCheck$c(ot,et){if(!(ot instanceof et))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$c(ot,et){if(!ot)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return et&&(typeof et=="object"||typeof et=="function")?et:ot}function _inherits$c(ot,et){if(typeof et!="function"&&et!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof et);ot.prototype=Object.create(et&&et.prototype,{constructor:{value:ot,enumerable:!1,writable:!0,configurable:!0}}),et&&(Object.setPrototypeOf?Object.setPrototypeOf(ot,et):ot.__proto__=et)}var DEFAULT_ARROW_OFFSET=1,UP_KEY_CODE=38,DOWN_KEY_CODE=40,VALID_KEY_CODES=[UP_KEY_CODE,DOWN_KEY_CODE],isValidKeyCode=function ot(et){return VALID_KEY_CODES.indexOf(et)>-1},getNumberValue=function ot(et){return Number(String(et).replace(/%/g,""))},idCounter=1,EditableInput=function(ot){_inherits$c(et,ot);function et(ct){_classCallCheck$c(this,et);var ut=_possibleConstructorReturn$c(this,(et.__proto__||Object.getPrototypeOf(et)).call(this));return ut.handleBlur=function(){ut.state.blurValue&&ut.setState({value:ut.state.blurValue,blurValue:null})},ut.handleChange=function(dt){ut.setUpdatedValue(dt.target.value,dt)},ut.handleKeyDown=function(dt){var ft=getNumberValue(dt.target.value);if(!isNaN(ft)&&isValidKeyCode(dt.keyCode)){var zt=ut.getArrowOffset(),Dt=dt.keyCode===UP_KEY_CODE?ft+zt:ft-zt;ut.setUpdatedValue(Dt,dt)}},ut.handleDrag=function(dt){if(ut.props.dragLabel){var ft=Math.round(ut.props.value+dt.movementX);ft>=0&&ft<=ut.props.dragMax&&ut.props.onChange&&ut.props.onChange(ut.getValueObjectWithLabel(ft),dt)}},ut.handleMouseDown=function(dt){ut.props.dragLabel&&(dt.preventDefault(),ut.handleDrag(dt),window.addEventListener("mousemove",ut.handleDrag),window.addEventListener("mouseup",ut.handleMouseUp))},ut.handleMouseUp=function(){ut.unbindEventListeners()},ut.unbindEventListeners=function(){window.removeEventListener("mousemove",ut.handleDrag),window.removeEventListener("mouseup",ut.handleMouseUp)},ut.state={value:String(ct.value).toUpperCase(),blurValue:String(ct.value).toUpperCase()},ut.inputId="rc-editable-input-"+idCounter++,ut}return _createClass$c(et,[{key:"componentDidUpdate",value:function(ct,ut){this.props.value!==this.state.value&&(ct.value!==this.props.value||ut.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(ct){return _defineProperty$d({},this.props.label,ct)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||DEFAULT_ARROW_OFFSET}},{key:"setUpdatedValue",value:function(ct,ut){var dt=this.props.label?this.getValueObjectWithLabel(ct):ct;this.props.onChange&&this.props.onChange(dt,ut),this.setState({value:ct})}},{key:"render",value:function(){var ct=this,ut=_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:ut.wrap},React$1.createElement("input",{id:this.inputId,style:ut.input,ref:function(dt){return ct.input=dt},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:ut.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),et}(reactExports.PureComponent||reactExports.Component),calculateChange$1=function ot(et,ct,ut,dt){var ft=dt.clientWidth,zt=dt.clientHeight,Dt=typeof et.pageX=="number"?et.pageX:et.touches[0].pageX,St=typeof et.pageY=="number"?et.pageY:et.touches[0].pageY,Tt=Dt-(dt.getBoundingClientRect().left+window.pageXOffset),Rt=St-(dt.getBoundingClientRect().top+window.pageYOffset);if(ct==="vertical"){var $t=void 0;if(Rt<0)$t=359;else if(Rt>zt)$t=0;else{var kt=-(Rt*100/zt)+100;$t=360*kt/100}if(ut.h!==$t)return{h:$t,s:ut.s,l:ut.l,a:ut.a,source:"hsl"}}else{var Bt=void 0;if(Tt<0)Bt=0;else if(Tt>ft)Bt=359;else{var Ft=Tt*100/ft;Bt=360*Ft/100}if(ut.h!==Bt)return{h:Bt,s:ut.s,l:ut.l,a:ut.a,source:"hsl"}}return null},_createClass$b=function(){function ot(et,ct){for(var ut=0;ut<ct.length;ut++){var dt=ct[ut];dt.enumerable=dt.enumerable||!1,dt.configurable=!0,"value"in dt&&(dt.writable=!0),Object.defineProperty(et,dt.key,dt)}}return function(et,ct,ut){return ct&&ot(et.prototype,ct),ut&&ot(et,ut),et}}();function _classCallCheck$b(ot,et){if(!(ot instanceof et))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$b(ot,et){if(!ot)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return et&&(typeof et=="object"||typeof et=="function")?et:ot}function _inherits$b(ot,et){if(typeof et!="function"&&et!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof et);ot.prototype=Object.create(et&&et.prototype,{constructor:{value:ot,enumerable:!1,writable:!0,configurable:!0}}),et&&(Object.setPrototypeOf?Object.setPrototypeOf(ot,et):ot.__proto__=et)}var Hue=function(ot){_inherits$b(et,ot);function et(){var ct,ut,dt,ft;_classCallCheck$b(this,et);for(var zt=arguments.length,Dt=Array(zt),St=0;St<zt;St++)Dt[St]=arguments[St];return ft=(ut=(dt=_possibleConstructorReturn$b(this,(ct=et.__proto__||Object.getPrototypeOf(et)).call.apply(ct,[this].concat(Dt))),dt),dt.handleChange=function(Tt){var Rt=calculateChange$1(Tt,dt.props.direction,dt.props.hsl,dt.container);Rt&&typeof dt.props.onChange=="function"&&dt.props.onChange(Rt,Tt)},dt.handleMouseDown=function(Tt){dt.handleChange(Tt),window.addEventListener("mousemove",dt.handleChange),window.addEventListener("mouseup",dt.handleMouseUp)},dt.handleMouseUp=function(){dt.unbindEventListeners()},ut),_possibleConstructorReturn$b(dt,ft)}return _createClass$b(et,[{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 ct=this,ut=this.props.direction,dt=ut===void 0?"horizontal":ut,ft=_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:dt==="vertical"});return React$1.createElement("div",{style:ft.hue},React$1.createElement("div",{className:"hue-"+dt,style:ft.container,ref:function(zt){return ct.container=zt},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},React$1.createElement("style",null,`
414
414
  .hue-horizontal {
@@ -507,5 +507,5 @@ not been pushed to GitHub. Please add it to continue.
507
507
  }
508
508
  100% {
509
509
  opacity: 0;
510
- }`,StyledCountdown=createStyled("div",{target:"e7qru6u0"})(({theme:ot})=>({position:"fixed",display:"flex",justifyContent:"center",alignItems:"center",top:0,left:0,width:ot.sizes.full,height:ot.sizes.full,fontSize:"40vh",color:ot.colors.red,fontWeight:ot.fontWeights.bold,opacity:"0.8",textShadow:`1px 1px 10px ${ot.colors.darkGray}`,transition:"opacity 0.3s ease-in-out",animation:`${screencastCounterAnimation} 1s`}),""),Countdown=({countdown:ot,endCallback:et})=>{const[ct,ut]=reactExports.useState(ot),dt=()=>{const ft=ct-1;ft>=0&&ut(ft),ft===0&&et()};return jsxRuntimeExports.jsx(StyledCountdown,{"data-testid":"stCountdown",onAnimationEnd:dt,children:jsxRuntimeExports.jsx("span",{children:ct})},`frame${ct}`)};function withScreencast(ot){const ct=class ct extends reactExports.PureComponent{constructor(){super(...arguments),this.state={fileName:"streamlit-screencast",recordAudio:!1,currentState:this.props.testOverride||"OFF"},this.toggleRecordAudio=()=>{const{recordAudio:dt}=this.state;this.setState({recordAudio:!dt})},this.showDialog=dt=>{const{currentState:ft}=this.state;ScreenCastRecorder.isSupportedBrowser()?ft==="OFF"?this.setState({fileName:dt,currentState:"SETUP"}):this.stopRecording().catch(zt=>logWarning(`withScreencast.stopRecording threw an error: ${zt}`)):this.setState({currentState:"UNSUPPORTED"})},this.startRecording=async()=>{const{recordAudio:dt}=this.state;this.recorder=new ScreenCastRecorder({recordAudio:dt,onErrorOrStop:()=>this.stopRecording()});try{await this.recorder.initialize()}catch{this.setState({currentState:"UNSUPPORTED"});return}this.setState({currentState:"COUNTDOWN"})},this.stopRecording=async()=>{let dt;const{currentState:ft}=this.state;ft==="OFF"||isNullOrUndefined$1(this.recorder)||(ft==="COUNTDOWN"&&this.setState({currentState:"OFF"}),ft==="RECORDING"&&(this.recorder.getState()==="inactive"?this.setState({currentState:"OFF"}):(dt=await this.recorder.stop(),this.setState({outputBlob:dt,currentState:"PREVIEW_FILE"}))))},this.onCountdownEnd=async()=>{if(isNullOrUndefined$1(this.recorder))throw new Error("Countdown finished but recorder is null");this.recorder.start()?this.setState({currentState:"RECORDING"}):this.stopRecording().catch(dt=>logWarning(`withScreencast.stopRecording threw an error: ${dt}`))},this.getScreenCastProps=()=>({currentState:this.state.currentState,toggleRecordAudio:this.toggleRecordAudio,startRecording:this.showDialog,stopRecording:this.stopRecording}),this.closeDialog=()=>{this.setState({currentState:"OFF"})},this.render=()=>{const{outputBlob:dt,fileName:ft,recordAudio:zt,currentState:Dt}=this.state;return jsxRuntimeExports.jsxs("div",{className:"withScreencast","data-testid":"stScreencast",children:[jsxRuntimeExports.jsx(ot,{...this.props,screenCast:this.getScreenCastProps()}),Dt==="UNSUPPORTED"&&jsxRuntimeExports.jsx(UnsupportedBrowserDialog$1,{onClose:this.closeDialog}),Dt==="SETUP"&&jsxRuntimeExports.jsx(ScreencastDialog,{recordAudio:zt,onClose:this.closeDialog,startRecording:this.startRecording,toggleRecordAudio:this.toggleRecordAudio}),Dt==="COUNTDOWN"&&jsxRuntimeExports.jsx(Countdown,{countdown:3,endCallback:this.onCountdownEnd}),Dt==="PREVIEW_FILE"&&dt&&jsxRuntimeExports.jsx(VideoRecordedDialog,{onClose:this.closeDialog,videoBlob:dt,fileName:ft})]})}}};ct.displayName=`withScreencast(${ot.displayName||ot.name})`;let et=ct;return hoistNonReactStatics$2(et,ot)}function getTitle(ot){return ot||"Streamlit"}class StrategyV1{constructor(et){this.appNav=et,this.appPages=[],this.currentPageScriptHash=null,this.hideSidebarNav=null}handleNewSession(et){var zt,Dt;this.appPages=et.appPages,this.currentPageScriptHash=et.pageScriptHash,this.hideSidebarNav=((zt=et.config)==null?void 0:zt.hideSidebarNav)??!1;const ct=this.appPages[0],ut=ct.urlPathname??"",dt=((Dt=this.appPages.find(St=>St.pageScriptHash===this.currentPageScriptHash))==null?void 0:Dt.urlPathname)??"",ft=ct.pageScriptHash===this.currentPageScriptHash;return this.appNav.onUpdatePageUrl(ut,dt,ft),document.title=getTitle(dt??""),[{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:ft?"":dt,currentPageScriptHash:this.currentPageScriptHash})}]}handlePagesChanged(et){const{appPages:ct}=et;return[{appPages:ct},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_APP_PAGES",appPages:ct})}]}handlePageNotFound(et){var dt;const{pageName:ct}=et;this.appNav.onPageNotFound(ct);const ut=((dt=this.appPages[0])==null?void 0:dt.pageScriptHash)??"";return this.currentPageScriptHash=ut,[{currentPageScriptHash:ut},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:"",currentPageScriptHash:ut})}]}handleNavigation(et){}findPageByUrlPath(et){return this.appPages.length===0?null:this.appPages.find(ct=>et.endsWith("/"+ct.urlPathname))??this.appPages[0]}clearPageElements(et,ct,ut){return AppRoot.empty(ct,!1,ut,et.logo)}}class StrategyV2{constructor(et){this.appNav=et,this.mainScriptHash=null,this.appPages=[],this.mainPage=null,this.hideSidebarNav=null}handleNewSession(et){var ct;return this.mainScriptHash=et.mainScriptHash,this.hideSidebarNav===null&&(this.hideSidebarNav=((ct=et.config)==null?void 0:ct.hideSidebarNav)??null),document.title=getTitle(""),[{hideSidebarNav:this.hideSidebarNav??!1},()=>{}]}handlePagesChanged(et){}handlePageNotFound(et){const{pageName:ct}=et;return this.appNav.onPageNotFound(ct),[{currentPageScriptHash:this.mainScriptHash??""},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:"",currentPageScriptHash:this.mainScriptHash??""})}]}handleNavigation(et){const{sections:ct,position:ut,appPages:dt}=et;this.appPages=dt,this.hideSidebarNav=ut===Navigation.Position.HIDDEN;const ft=et.pageScriptHash,zt=dt.find(Tt=>Tt.pageScriptHash===ft),Dt=dt.find(Tt=>Tt.isDefault);this.mainPage=Dt;const St=zt.urlPathname;if(!this.appNav.isPageTitleSet){const Tt=getTitle(zt.pageName);document.title=Tt,this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_PAGE_TITLE",title:zt.pageName??""})}return!this.appNav.isPageIconSet&&zt.icon&&this.appNav.onPageIconChange(zt.icon),this.appNav.onUpdatePageUrl(Dt.urlPathname??"",St,zt.isDefault??!1),[{appPages:dt,navSections:ct,hideSidebarNav:this.hideSidebarNav,expandSidebarNav:et.expanded,currentPageScriptHash:ft},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_APP_PAGES",appPages:dt}),this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:zt.isDefault?"":St,currentPageScriptHash:ft})}]}findPageByUrlPath(et){return this.appPages.find(ct=>et.endsWith("/"+ct.urlPathname))??this.mainPage}clearPageElements(et,ct,ut){return et.filterMainScriptElements(ct)}}class AppNavigation{constructor(et,ct,ut,dt){this.hostCommunicationMgr=et,this.onUpdatePageUrl=ct,this.onPageNotFound=ut,this.onPageIconChange=dt,this.isPageIconSet=!1,this.isPageTitleSet=!1,this.strategy=new StrategyV1(this)}handleNewSession(et){return this.isPageTitleSet=!1,this.isPageIconSet=!1,this.strategy.handleNewSession(et)}handleNavigation(et){return this.strategy instanceof StrategyV1&&(this.strategy=new StrategyV2(this)),this.strategy.handleNavigation(et)}handlePagesChanged(et){return this.strategy.handlePagesChanged(et)}handlePageNotFound(et){return this.strategy.handlePageNotFound(et)}findPageByUrlPath(et){return this.strategy.findPageByUrlPath(et)}handlePageConfigChanged(et){this.isPageIconSet=!!et.favicon,this.isPageTitleSet=!!et.title}clearPageElements(et,ct,ut){return this.strategy.clearPageElements(et,ct,ut)}}const ELEMENT_LIST_BUFFER_TIMEOUT_MS=10,INITIAL_SCRIPT_RUN_ID="<null>",showDevelopmentOptions=(ot,et)=>et==Config.ToolbarMode.DEVELOPER?!0:Config.ToolbarMode.VIEWER==et||Config.ToolbarMode.MINIMAL==et?!1:ot||isLocalhost();let App$1=(M1=class extends reactExports.PureComponent{constructor(et){super(et),this.sessionInfo=new SessionInfo,this.metricsMgr=new MetricsManager(this.sessionInfo),this.sessionEventDispatcher=new SessionEventDispatcher,this.embeddingId=generateUID$2(),this.showDeployError=(ut,dt,ft)=>{this.openDialog({type:DialogType.DEPLOY_ERROR,title:ut,msg:dt,onContinue:ft,onClose:()=>{},onTryAgain:this.sendLoadGitInfoBackMsg})},this.handleThemeMessage=(ut,dt)=>{const[,ft,zt]=createPresetThemes(),Dt=isPresetTheme(this.props.theme.activeTheme);ut===ft.name&&Dt?this.props.theme.setTheme(ft):ut===zt.name&&Dt?this.props.theme.setTheme(zt):dt&&this.props.theme.setImportedTheme(dt)},this.handleConnectionStateChanged=ut=>{if(logMessage(`Connection state changed from ${this.state.connectionState} to ${ut}`),ut===ConnectionState.CONNECTED){const dt=this.state.scriptRunState===ScriptRunState.RERUN_REQUESTED||this.state.scriptRunState===ScriptRunState.RUNNING;(!this.sessionInfo.last||dt)&&(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:ut!==ConnectionState.DISCONNECTED_FOREVER}),this.sessionInfo.isSet&&this.sessionInfo.clearCurrent();this.setState({connectionState:ut})},this.handleGitInfoChanged=ut=>{this.setState({gitInfo:ut})},this.handleCustomParentMessage=ut=>{this.state.appConfig.enableCustomParentMessages?this.hostCommunicationMgr.sendMessageToHost({type:"CUSTOM_PARENT_MESSAGE",message:ut.message}):logError("Sending messages to the host is disabled in line with the platform policy.")},this.handleMessage=ut=>{const dt=(ft,zt,Dt)=>{const St=ft[zt];if(St in Dt)return Dt[St](ft[St]);throw new Error(`Cannot handle ${zt} "${St}".`)};try{dt(ut,"type",{newSession:ft=>this.handleNewSession(ft),sessionStatusChanged:ft=>this.handleSessionStatusChanged(ft),sessionEvent:ft=>this.handleSessionEvent(ft),delta:ft=>this.handleDeltaMsg(ft,ut.metadata),pageConfigChanged:ft=>this.handlePageConfigChanged(ft),pageInfoChanged:ft=>this.handlePageInfoChanged(ft),pagesChanged:ft=>this.handlePagesChanged(ft),pageNotFound:ft=>this.handlePageNotFound(ft),gitInfoChanged:ft=>this.handleGitInfoChanged(ft),scriptFinished:ft=>this.handleScriptFinished(ft),pageProfile:ft=>this.handlePageProfileMsg(ft),autoRerun:ft=>this.handleAutoRerun(ft),fileUrlsResponse:ft=>this.uploadClient.onFileURLsResponse(ft),parentMessage:ft=>this.handleCustomParentMessage(ft),logo:ft=>this.handleLogo(ft,ut.metadata),navigation:ft=>this.handleNavigation(ft)})}catch(ft){const zt=ensureError(ft);logError(zt),this.showError("Bad message format",zt.message)}},this.handleLogo=(ut,dt)=>{const ft={activeScriptHash:dt.activeScriptHash,scriptRunId:this.state.scriptRunId};this.setState({elements:this.pendingElementsBuffer.appRootWithLogo(ut,ft)},()=>{this.pendingElementsBuffer=this.state.elements})},this.handlePageConfigChanged=ut=>{const{title:dt,favicon:ft,layout:zt,initialSidebarState:Dt,menuItems:St}=ut;this.appNavigation.handlePageConfigChanged(ut),dt&&(this.hostCommunicationMgr.sendMessageToHost({type:"SET_PAGE_TITLE",title:dt}),document.title=dt),ft&&this.onPageIconChanged(ft),zt!==this.state.layout&&this.setState(Tt=>({layout:zt,userSettings:{...Tt.userSettings,wideMode:zt===PageConfig.Layout.WIDE}})),Dt!==this.state.initialSidebarState&&this.setState(()=>({initialSidebarState:Dt})),this.setState({menuItems:St})},this.handlePageInfoChanged=ut=>{const{queryString:dt}=ut,ft=document.location.pathname+(dt?`?${dt}`:"");window.history.pushState({},"",ft),this.hostCommunicationMgr.sendMessageToHost({type:"SET_QUERY_PARAM",queryParams:dt?`?${dt}`:""})},this.onPageNotFound=ut=>{const dt=ut?`You have requested page /${ut}, 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",`${dt}. Running the app's main page.`)},this.handlePageNotFound=ut=>{this.maybeSetState(this.appNavigation.handlePageNotFound(ut))},this.onPageIconChanged=ut=>{handleFavicon(ut,this.hostCommunicationMgr.sendMessageToHost,this.endpoints)},this.handlePagesChanged=ut=>{this.maybeSetState(this.appNavigation.handlePagesChanged(ut))},this.handleNavigation=ut=>{this.maybeSetState(this.appNavigation.handleNavigation(ut))},this.handlePageProfileMsg=ut=>{var zt,Dt,St;const dt=PageProfile.toObject(ut),ft=getBrowserInfo();this.metricsMgr.enqueue("pageProfile",{...dt,isFragmentRun:!!dt.isFragmentRun,appId:this.sessionInfo.current.appId,numPages:(zt=this.state.appPages)==null?void 0:zt.length,sessionId:this.sessionInfo.current.sessionId,pythonVersion:this.sessionInfo.current.pythonVersion,pageScriptHash:this.state.currentPageScriptHash,activeTheme:(St=(Dt=this.props.theme)==null?void 0:Dt.activeTheme)==null?void 0:St.name,totalLoadTime:Math.round((performance.now()-this.state.latestRunTime)*1e3),browserInfo:ft})},this.handleAutoRerun=ut=>{const dt=setInterval(()=>{this.widgetMgr.sendUpdateWidgetsMessage(ut.fragmentId,!0)},ut.interval*1e3);this.setState(ft=>({autoReruns:[...ft.autoReruns,dt]}))},this.handleSessionStatusChanged=ut=>{this.setState(dt=>{let{scriptRunState:ft}=dt,{dialog:zt}=dt;return ut.scriptIsRunning&&dt.scriptRunState!==ScriptRunState.STOP_REQUESTED?(ft=ScriptRunState.RUNNING,notNullOrUndefined(zt)&&zt.type===DialogType.SCRIPT_COMPILE_ERROR&&(zt=void 0)):!ut.scriptIsRunning&&dt.scriptRunState!==ScriptRunState.RERUN_REQUESTED&&dt.scriptRunState!==ScriptRunState.COMPILATION_ERROR&&(ft=ScriptRunState.NOT_RUNNING),{userSettings:{...dt.userSettings,runOnSave:!!ut.runOnSave},dialog:zt,scriptRunState:ft}})},this.handleSessionEvent=ut=>{if(this.sessionEventDispatcher.handleSessionEventMsg(ut),ut.type==="scriptCompilationException"){this.setState({scriptRunState:ScriptRunState.COMPILATION_ERROR});const dt={type:DialogType.SCRIPT_COMPILE_ERROR,exception:ut.scriptCompilationException,onClose:()=>{}};this.openDialog(dt)}},this.maybeUpdatePageUrl=(ut,dt,ft)=>{const zt=this.getBaseUriParts();if(zt){const{basePath:Dt}=zt,St=extractPageNameFromPathName(document.location.pathname,Dt);if((St===""?ut:St)!==dt){const Tt=ft?"":dt,Rt=preserveEmbedQueryParams(),$t=Rt?`?${Rt}`:"",kt=`${Dt?`/${Dt}`:""}/${Tt}${$t}`,Bt=kt.endsWith("/")&&kt!=="/"?kt.slice(0,-1):kt;window.history.pushState({},"",Bt)}}},this.handleNewSession=ut=>{const dt=ut.initialize;if(this.hasStreamlitVersionChanged(dt)){window.location.reload();return}this.sessionInfo.isSet||this.handleOneTimeInitialization(ut);const{appHash:ft,currentPageScriptHash:zt}=this.state,{scriptRunId:Dt,name:St,mainScriptPath:Tt,fragmentIdsThisRun:Rt,pageScriptHash:$t,mainScriptHash:kt}=ut;if(Rt.length)this.setState({fragmentIdsThisRun:Rt,latestRunTime:performance.now()});else{this.cleanupAutoReruns();const Ft=ut.config,jt=ut.customTheme;this.processThemeInput(jt),this.setState({allowRunOnSave:Ft.allowRunOnSave,hideTopBar:Ft.hideTopBar,toolbarMode:Ft.toolbarMode,latestRunTime:performance.now(),mainScriptHash:kt,fragmentIdsThisRun:Rt}),this.maybeSetState(this.appNavigation.handleNewSession(ut)),this.onPageIconChanged("/favicon.png")}const Bt=hashString(this.sessionInfo.current.installationId+Tt);this.metricsMgr.setMetadata(this.state.deployedAppMetadata),this.metricsMgr.setAppHash(Bt),this.metricsMgr.enqueue("updateReport"),ft===Bt&&zt===$t?this.setState({scriptRunId:Dt}):this.clearAppState(Bt,Dt,St,kt)},this.handleOneTimeInitialization=ut=>{const dt=ut.initialize,ft=ut.config;this.sessionInfo.setCurrent(SessionInfo.propsFromNewSessionMessage(ut)),this.metricsMgr.initialize({gatherUsageStats:ft.gatherUsageStats,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost}),this.handleSessionStatusChanged(dt.sessionStatus)},this.onHistoryChange=()=>{const{currentPageScriptHash:ut}=this.state,dt=this.appNavigation.findPageByUrlPath(document.location.pathname),ft=document.location.toString().includes("#"),zt=(dt==null?void 0:dt.pageScriptHash)===ut;isNullOrUndefined$1(dt)||ft&&zt||this.onPageChange(dt.pageScriptHash)},this.setAndSendTheme=ut=>{this.props.theme.setTheme(ut),this.hostCommunicationMgr.sendMessageToHost({type:"SET_THEME_CONFIG",themeInfo:toExportedTheme(ut.emotion)})},this.createThemeHash=ut=>{if(!ut)return"hash_for_undefined_custom_theme";const dt=Object.entries(ut);return dt.sort(),hashString(dt.join(":"))},this.closeDialog=()=>{this.setState({dialog:void 0})},this.saveSettings=ut=>{const{runOnSave:dt}=this.state.userSettings,{runOnSave:ft}=ut;if(this.setState({userSettings:ut}),dt!==ft&&this.isServerConnected()){const zt=new BackMsg({setRunOnSave:ft});zt.type="setRunOnSave",this.sendBackMsg(zt)}},this.handleDeltaMsg=(ut,dt)=>{if(this.pendingElementsBuffer=this.pendingElementsBuffer.applyDelta(this.state.scriptRunId,ut,dt),!this.pendingElementsTimerRunning){this.pendingElementsTimerRunning=!0;const ft=this.state.scriptRunState===ScriptRunState.RUNNING;setTimeout(()=>{this.pendingElementsTimerRunning=!1,ft&&this.setState({elements:this.pendingElementsBuffer})},ELEMENT_LIST_BUFFER_TIMEOUT_MS)}},this.debugShutdownRuntime=()=>{if(this.isServerConnected()){const ut=new BackMsg({debugShutdownRuntime:!0});ut.type="debugShutdownRuntime",this.sendBackMsg(ut)}},this.debugDisconnectWebsocket=()=>{if(this.isServerConnected()){const ut=new BackMsg({debugDisconnectWebsocket:!0});ut.type="debugDisconnectWebsocket",this.sendBackMsg(ut)}},this.debugClearForwardMsgCache=()=>{var ut,dt;isLocalhost()&&((dt=(ut=this.connectionManager)==null?void 0:ut.connection)==null||dt.cache.messages.clear())},this.cleanupAutoReruns=()=>{this.state.autoReruns.forEach(ut=>{clearInterval(ut)}),this.setState({autoReruns:[]})},this.rerunScript=(ut=!1)=>{if(this.closeDialog(),!this.isServerConnected()){logError("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}),ut===!0&&this.saveSettings({...this.state.userSettings,runOnSave:!0}),this.widgetMgr.sendUpdateWidgetsMessage(void 0))},this.sendLoadGitInfoBackMsg=()=>{if(!this.isServerConnected()){logError("Cannot load git information when disconnected from server.");return}this.sendBackMsg(new BackMsg({loadGitInfo:!0}))},this.onPageChange=ut=>{const{elements:dt,mainScriptHash:ft}=this.state;this.cleanupAutoReruns();const zt=this.appNavigation.clearPageElements(dt,ft,void 0),Dt=new Set(Array.from(zt.getElements()).map(St=>getElementId(St)).filter(notUndefined));this.sendRerunBackMsg(this.widgetMgr.getActiveWidgetStates(Dt),void 0,ut)},this.isAppInReadyState=ut=>this.state.connectionState===ConnectionState.CONNECTED&&this.state.scriptRunState===ScriptRunState.NOT_RUNNING&&ut.scriptRunState===ScriptRunState.RUNNING&&ut.connectionState===ConnectionState.CONNECTED,this.sendRerunBackMsg=(ut,dt,ft,zt)=>{const Dt=this.getBaseUriParts();if(!Dt){logError("Cannot send rerun backMessage when disconnected from server.");return}const{currentPageScriptHash:St}=this.state,{basePath:Tt}=Dt;let Rt=this.getQueryString(),$t="";ft?ft!=St&&(Rt=preserveEmbedQueryParams(),this.hostCommunicationMgr.sendMessageToHost({type:"SET_QUERY_PARAM",queryParams:Rt})):St?ft=St:($t=extractPageNameFromPathName(document.location.pathname,Tt),ft=""),this.sendBackMsg(new BackMsg({rerunScript:{queryString:Rt,widgetStates:ut,pageScriptHash:ft,pageName:$t,fragmentId:dt,isAutoRerun:zt}})),PerformanceEvents.record({name:"RequestedRerun",scriptRunState:this.state.scriptRunState})},this.stopScript=()=>{if(!this.isServerConnected()){logError("Cannot stop app when disconnected from server.");return}if(this.state.scriptRunState===ScriptRunState.NOT_RUNNING||this.state.scriptRunState===ScriptRunState.STOP_REQUESTED)return;const ut=new BackMsg({stopScript:!0});ut.type="stopScript",this.sendBackMsg(ut),this.setState({scriptRunState:ScriptRunState.STOP_REQUESTED})},this.openClearCacheDialog=()=>{if(this.isServerConnected()){const ut={type:DialogType.CLEAR_CACHE,confirmCallback:this.clearCache,defaultAction:this.clearCache,onClose:()=>{}};this.openDialog(ut)}else logError("Cannot clear cache: disconnected from server")},this.openDeployDialog=()=>{var dt;const ut={type:DialogType.DEPLOY_DIALOG,onClose:this.closeDialog,showDeployError:this.showDeployError,isDeployErrorModalOpen:((dt=this.state.dialog)==null?void 0:dt.type)===DialogType.DEPLOY_ERROR,metricsMgr:this.metricsMgr};this.openDialog(ut)},this.openThemeCreatorDialog=()=>{this.metricsMgr.enqueue("menuClick",{label:"editTheme"});const ut={type:DialogType.THEME_CREATOR,backToSettings:this.settingsCallback,onClose:this.closeDialog,metricsMgr:this.metricsMgr};this.openDialog(ut)},this.clearCache=()=>{if(this.closeDialog(),this.isServerConnected()){const ut=new BackMsg({clearCache:!0});ut.type="clearCache",this.sendBackMsg(ut)}else logError("Cannot clear cache: disconnected from server")},this.sendAppHeartbeat=()=>{if(this.isServerConnected()){const ut=new BackMsg({appHeartbeat:!0});ut.type="appHeartbeat",this.sendBackMsg(ut)}else logError("Cannot send app heartbeat: disconnected from server")},this.sendBackMsg=ut=>{this.connectionManager?this.connectionManager.sendMessage(ut):logError(`Not connected. Cannot send back message: ${ut}`)},this.handleConnectionError=ut=>{this.showError("Connection error",ut)},this.isServerConnected=()=>this.connectionManager?this.connectionManager.isConnected():!1,this.settingsCallback=(ut=!0)=>{const dt={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:ut,metricsMgr:this.metricsMgr};this.openDialog(dt)},this.aboutCallback=()=>{const{menuItems:ut}=this.state,dt={type:DialogType.ABOUT,sessionInfo:this.sessionInfo,onClose:this.closeDialog,aboutSectionMd:ut==null?void 0:ut.aboutSectionMd};this.openDialog(dt)},this.printCallback=()=>{const{scriptRunState:ut}=this.state;if(ut!==ScriptRunState.NOT_RUNNING){setTimeout(this.printCallback,500);return}let dt;try{const ft=getIFrameEnclosingApp(this.embeddingId);ft&&ft.contentWindow?dt=ft.contentWindow.window:dt=window}catch{dt=window}finally{dt||(dt=window),dt.print()}},this.screencastCallback=()=>{const{scriptName:ut}=this.state,{startRecording:dt}=this.props.screenCast,ft=hooks().format("YYYY-MM-DD-HH-MM-SS");dt(`streamlit-${ut}-${ft}`)},this.handleFullScreen=ut=>{this.setState({isFullScreen:ut})},this.setLibConfig=ut=>{this.setState({libConfig:ut})},this.setAppConfig=ut=>{this.setState({appConfig:ut})},this.addScriptFinishedHandler=ut=>{this.setState((dt,ft)=>({scriptFinishedHandlers:dt.scriptFinishedHandlers.concat(ut)}))},this.removeScriptFinishedHandler=ut=>{this.setState((dt,ft)=>({scriptFinishedHandlers:without$1(dt.scriptFinishedHandlers,ut)}))},this.getBaseUriParts=()=>this.connectionManager?this.connectionManager.getBaseUriParts():void 0,this.getQueryString=()=>{const{queryParams:ut}=this.state,dt=ut&&ut.length>0?ut:document.location.search;return dt.startsWith("?")?dt.substring(1):dt},this.isInCloudEnvironment=()=>{const{hostMenuItems:ut}=this.state;return ut&&(ut==null?void 0:ut.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=(ut,dt)=>{if(this.isServerConnected()){const ft=new BackMsg({fileUrlsRequest:{requestId:ut,fileNames:dt.map(zt=>zt.name),sessionId:this.sessionInfo.current.sessionId}});ft.type="fileUrlsRequest",this.sendBackMsg(ft)}},this.handleKeyDown=ut=>{switch(ut){case"c":showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode)&&this.openClearCacheDialog();break;case"r":this.rerunScript();break}},this.handleKeyUp=ut=>{ut==="esc"&&this.props.screenCast.stopRecording()},J$2();let ct=this.createThemeHash();isPresetTheme(et.theme.activeTheme)||(ct=this.createThemeHash(toThemeInput(et.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:ct,gitInfo:null,formsData:createFormsData(),appPages:[],navSections:[],currentPageScriptHash:"",mainScriptHash:"",hideTopBar:!0,hideSidebarNav:!0,expandSidebarNav:!1,toolbarMode:Config.ToolbarMode.MINIMAL,latestRunTime:performance.now(),fragmentIdsThisRun:[],isOwner:!1,hostMenuItems:[],hostToolbarItems:[],hostHideSidebarNav:!1,sidebarChevronDownshift:0,pageLinkBaseUrl:"",queryParams:"",deployedAppMetadata:{},libConfig:{},appConfig:{},autoReruns:[],inputsDisabled:!1},this.connectionManager=null,this.widgetMgr=new WidgetStateManager({sendRerunBackMsg:this.sendRerunBackMsg,formsDataChanged:ut=>this.setState({formsData:ut})}),this.hostCommunicationMgr=new HostCommunicationManager({streamlitExecutionStartedAt:et.streamlitExecutionStartedAt,sendRerunBackMsg:this.sendRerunBackMsg,closeModal:this.closeDialog,stopScript:this.stopScript,rerunScript:this.rerunScript,clearCache:this.clearCache,sendAppHeartbeat:this.sendAppHeartbeat,setInputsDisabled:ut=>{this.setState({inputsDisabled:ut})},themeChanged:this.handleThemeMessage,pageChanged:this.onPageChange,isOwnerChanged:ut=>this.setState({isOwner:ut}),jwtHeaderChanged:({jwtHeaderName:ut,jwtHeaderValue:dt})=>{this.endpoints.setJWTHeader!==void 0&&this.state.appConfig.useExternalAuthToken&&this.endpoints.setJWTHeader({jwtHeaderName:ut,jwtHeaderValue:dt})},fileUploadClientConfigChanged:ut=>{this.endpoints.setFileUploadClientConfig!==void 0&&this.endpoints.setFileUploadClientConfig(ut)},hostMenuItemsChanged:ut=>{this.setState({hostMenuItems:ut})},hostToolbarItemsChanged:ut=>{this.setState({hostToolbarItems:ut})},hostHideSidebarNavChanged:ut=>{this.setState({hostHideSidebarNav:ut})},sidebarChevronDownshiftChanged:ut=>{this.setState({sidebarChevronDownshift:ut})},pageLinkBaseUrlChanged:ut=>{this.setState({pageLinkBaseUrl:ut})},queryParamsChanged:ut=>{this.setState({queryParams:ut})},deployedAppMetadataChanged:ut=>{this.setState({deployedAppMetadata:ut})},restartWebsocketConnection:()=>{this.connectionManager||this.initializeConnectionManager()},terminateWebsocketConnection:()=>{var ut;(ut=this.connectionManager)==null||ut.disconnect(),this.connectionManager=null}}),this.endpoints=new DefaultStreamlitEndpoints({getServerUri:this.getBaseUriParts,csrfEnabled:!0}),this.uploadClient=new FileUploadClient({sessionInfo:this.sessionInfo,endpoints:this.endpoints,formsWithPendingRequestsChanged:ut=>this.widgetMgr.setFormsWithUploadsInProgress(ut),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(){var ct;const et=(ct=this.context)==null?void 0:ct.kernel;if(et==null)throw new Error("Kernel is not set in the context.");this.connectionManager=new ConnectionManager({kernel:et,sessionInfo:this.sessionInfo,endpoints:this.endpoints,onMessage:this.handleMessage,onConnectionError:this.handleConnectionError,connectionStateChanged:this.handleConnectionStateChanged,claimHostAuthToken:this.hostCommunicationMgr.claimAuthToken,resetHostAuthToken:this.hostCommunicationMgr.resetAuthToken,onHostConfigResp:ut=>{const{allowedOrigins:dt,useExternalAuthToken:ft,disableFullscreenMode:zt,enableCustomParentMessages:Dt,mapboxToken:St,enforceDownloadInNewTab:Tt,metricsUrl:Rt}=ut,$t={allowedOrigins:dt,useExternalAuthToken:ft,enableCustomParentMessages:Dt},kt={mapboxToken:St,disableFullscreenMode:zt,enforceDownloadInNewTab:Tt};this.metricsMgr.setMetricsConfig(Rt),this.hostCommunicationMgr.setAllowedOrigins($t),this.setAppConfig($t),this.setLibConfig(kt)}})}componentDidMount(){var ct;const et=(ct=this.context)==null?void 0:ct.kernel;if(et==null)throw new Error("Kernel is not set in the context.");this.initializeConnectionManager(),this.hostCommunicationMgr.sendMessageToHost({type:"SCRIPT_RUN_STATE_CHANGED",scriptRunState:this.state.scriptRunState}),this.uploadClient.setKernel(et),isScrollingHidden()&&document.body.classList.add("embedded"),isInChildFrame()&&(window.iFrameResizer={heightCalculationMethod:()=>{const ut=document.querySelectorAll("[data-iframe-height]"),dt=Array.from(ut).map(ft=>Math.ceil(ft.getBoundingClientRect().bottom));return Math.max(0,...dt)}},__vitePreload(()=>import("./iframeResizer.contentWindow-DknzVf8U.js").then(ut=>ut.i),[])),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(et,ct){window.prerenderReady===!1&&this.isAppInReadyState(ct)&&(window.prerenderReady=!0),this.state.scriptRunState!==ct.scriptRunState&&this.hostCommunicationMgr.sendMessageToHost({type:"SCRIPT_RUN_STATE_CHANGED",scriptRunState:this.state.scriptRunState})}componentWillUnmount(){var et;(et=this.connectionManager)==null||et.disconnect(),this.hostCommunicationMgr.closeHostCommunication(),window.removeEventListener("popstate",this.onHistoryChange,!1)}showError(et,ct){logError(ct);const ut={type:DialogType.WARNING,title:et,msg:ct,onClose:()=>{}};this.openDialog(ut)}hasStreamlitVersionChanged(et){if(this.sessionInfo.isSet){const ct=this.sessionInfo.current.streamlitVersion,{environmentInfo:ut}=et;if(notNullOrUndefined(ut)&&notNullOrUndefined(ut.streamlitVersion))return ct!=ut.streamlitVersion}return!1}maybeSetState(et){if(et){const[ct,ut]=et;this.setState(ct,ut)}}processThemeInput(et){const ct=this.createThemeHash(et);if(ct===this.state.themeHash)return;this.setState({themeHash:ct});const ut=!isPresetTheme(this.props.theme.activeTheme);if(et){const dt=createTheme(CUSTOM_THEME_NAME,et);this.props.theme.addThemes([dt]),(getCachedTheme()===null||ut)&&this.setAndSendTheme(dt)}else this.props.theme.addThemes([]),ut&&this.setAndSendTheme(getHostSpecifiedTheme())}handleScriptFinished(et){if(et===ForwardMsg.ScriptFinishedStatus.FINISHED_SUCCESSFULLY||et===ForwardMsg.ScriptFinishedStatus.FINISHED_EARLY_FOR_RERUN||et===ForwardMsg.ScriptFinishedStatus.FINISHED_FRAGMENT_RUN_SUCCESSFULLY){if(window.setTimeout(()=>{this.state.scriptFinishedHandlers.map(ct=>ct())},0),et===ForwardMsg.ScriptFinishedStatus.FINISHED_SUCCESSFULLY||et===ForwardMsg.ScriptFinishedStatus.FINISHED_FRAGMENT_RUN_SUCCESSFULLY){this.setState(({scriptRunId:ut,fragmentIdsThisRun:dt})=>({elements:this.pendingElementsBuffer.clearStaleNodes(ut,dt)}),()=>{this.pendingElementsBuffer=this.state.elements});const ct=new Set(Array.from(this.state.elements.getElements()).map(ut=>getElementId(ut)).filter(notUndefined));this.widgetMgr.removeInactive(ct)}this.connectionManager!==null&&et!==ForwardMsg.ScriptFinishedStatus.FINISHED_EARLY_FOR_RERUN&&this.sessionInfo.isSet&&this.connectionManager.incrementMessageCacheRunCount(this.sessionInfo.current.maxCachedMessageAge)}}clearAppState(et,ct,ut,dt){const{hideSidebarNav:ft,elements:zt}=this.state,Dt=ft&&zt.sidebar||void 0;this.setState({scriptRunId:ct,scriptName:ut,appHash:et,elements:this.appNavigation.clearPageElements(this.pendingElementsBuffer,dt,Dt)},()=>{this.pendingElementsBuffer=this.state.elements;const St=new Set(Array.from(this.state.elements.getElements()).map(Tt=>getElementId(Tt)).filter(notUndefined));this.widgetMgr.removeInactive(St)})}openDialog(et){this.setState({dialog:et})}render(){const{allowRunOnSave:et,connectionState:ct,dialog:ut,elements:dt,initialSidebarState:ft,menuItems:zt,isFullScreen:Dt,scriptRunId:St,scriptRunState:Tt,userSettings:Rt,hideTopBar:$t,hideSidebarNav:kt,expandSidebarNav:Bt,currentPageScriptHash:Ft,hostHideSidebarNav:jt,pageLinkBaseUrl:Kt,sidebarChevronDownshift:Yt,hostMenuItems:Ut,hostToolbarItems:Jt,libConfig:Ht,appConfig:e0,inputsDisabled:t0,appPages:Zt,navSections:o0}=this.state,n0=showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode),r0=classNames("stApp",getEmbeddingIdClassName(this.embeddingId),{"streamlit-embedded":isEmbed(),"streamlit-wide":Rt.wideMode}),a0=ut?StreamlitDialog({...ut,onClose:this.closeDialog}):null,u0=t0||ct!==ConnectionState.CONNECTED;return jsxRuntimeExports.jsx(AppContext.Provider,{value:{initialSidebarState:ft,wideMode:Rt.wideMode,embedded:isEmbed(),showPadding:!isEmbed()||isPaddingDisplayed(),disableScrolling:isScrollingHidden(),showToolbar:!isEmbed()||isToolbarDisplayed(),showColoredLine:!isEmbed()||isColoredLineDisplayed(),pageLinkBaseUrl:Kt,sidebarChevronDownshift:Yt,gitInfo:this.state.gitInfo,appConfig:e0},children:jsxRuntimeExports.jsx(LibContext.Provider,{value:{isFullScreen:Dt,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:Ft,libConfig:Ht,fragmentIdsThisRun:this.state.fragmentIdsThisRun,locale:window.navigator.language},children:jsxRuntimeExports.jsx(ReactHotkeys,{keyName:"r,c,esc",onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,children:jsxRuntimeExports.jsxs(StyledApp,{className:r0,"data-testid":"stApp","data-test-script-state":St==INITIAL_SCRIPT_RUN_ID?"initial":Tt,"data-test-connection-state":ct,children:[jsxRuntimeExports.jsxs(Header,{children:[!$t&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(StatusWidget,{connectionState:ct,sessionEventDispatcher:this.sessionEventDispatcher,scriptRunState:Tt,rerunScript:this.rerunScript,stopScript:this.stopScript,allowRunOnSave:et}),jsxRuntimeExports.jsx(ToolbarActions,{hostToolbarItems:Jt,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,metricsMgr:this.metricsMgr})]}),this.showDeployButton()&&jsxRuntimeExports.jsx(DeployButton,{onClick:this.deployButtonClicked.bind(this)}),jsxRuntimeExports.jsx(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:Ut,developmentMode:n0,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,menuItems:zt,metricsMgr:this.metricsMgr,toolbarMode:this.state.toolbarMode})]}),jsxRuntimeExports.jsx(AppView,{endpoints:this.endpoints,sessionInfo:this.sessionInfo,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,elements:dt,scriptRunId:St,scriptRunState:Tt,widgetMgr:this.widgetMgr,widgetsDisabled:u0,uploadClient:this.uploadClient,componentRegistry:this.componentRegistry,formsData:this.state.formsData,appLogo:dt.logo,appPages:Zt,navSections:o0,onPageChange:this.onPageChange,currentPageScriptHash:Ft,hideSidebarNav:kt||jt,expandSidebarNav:Bt}),a0]})})})})}},M1.contextType=StliteKernelContext,M1);const AppWithScreencast=withScreencast(App$1);function useThemeManager(){const ot=getDefaultTheme(),[et,ct]=reactExports.useState(ot),[ut,dt]=reactExports.useState([]),[ft,zt]=reactExports.useState([...createPresetThemes(),...isPresetTheme(ot)?[]:[ot]]),Dt=$t=>{zt([...createPresetThemes(),...$t])},St=reactExports.useCallback($t=>{$t!==et&&(ct($t),$t.name===AUTO_THEME_NAME?removeCachedTheme():setCachedTheme($t))},[ct,et]),Tt=reactExports.useCallback(()=>{et.name===AUTO_THEME_NAME&&St(getHostSpecifiedTheme());const $t=ft.filter(kt=>kt.name!==AUTO_THEME_NAME);zt([createAutoTheme(),...$t])},[et.name,ft,St]),Rt=reactExports.useCallback($t=>{$t.fontFaces&&dt($t.fontFaces);const kt=new CustomThemeConfig($t),Bt=createTheme(CUSTOM_THEME_NAME,kt);St(Bt)},[dt,St]);return reactExports.useEffect(()=>{const $t=window.matchMedia("(prefers-color-scheme: dark)");return $t.addEventListener("change",Tt),window.addEventListener("afterprint",Tt),()=>{window.removeEventListener("afterprint",Tt),$t.removeEventListener("change",Tt)}},[et,ft,Tt]),[{setTheme:St,activeTheme:et,addThemes:Dt,availableThemes:ft,setImportedTheme:Rt},ut]}const ThemedApp=({streamlitExecutionStartedAt:ot})=>{const[et,ct]=useThemeManager(),{activeTheme:ut}=et,dt=ut.name===CUSTOM_THEME_NAME&&ct.length>0;return jsxRuntimeExports.jsx(RootStyleProvider,{theme:ut,children:jsxRuntimeExports.jsx(WindowDimensionsProvider,{children:jsxRuntimeExports.jsxs(PortalProvider,{children:[dt&&jsxRuntimeExports.jsx(FontFaceDeclaration,{fontFaces:ct}),jsxRuntimeExports.jsx(AppWithScreencast,{theme:et,streamlitExecutionStartedAt:ot})]})})})};class SequentialIDGenerator{constructor(et=""){this.prefix=et,this.count=0,this.offset=374,this.msb=1295,this.power=2}next(){const et=this.increment().toString(36);return this.prefix?`${this.prefix}${et}`:et}increment(){const et=this.count+this.offset;return et===this.msb&&(this.offset+=(this.msb+1)*9,this.msb=Math.pow(36,++this.power)-1),this.count++,et}}const minMaxWidth=/(!?\(\s*min(-device-)?-width).+\(\s*max(-device)?-width/i,minWidth=/\(\s*min(-device)?-width/i,maxMinWidth=/(!?\(\s*max(-device)?-width).+\(\s*min(-device)?-width/i,maxWidth=/\(\s*max(-device)?-width/i,isMinWidth=_testQuery(minMaxWidth,maxMinWidth,minWidth),isMaxWidth=_testQuery(maxMinWidth,minMaxWidth,maxWidth),minMaxHeight=/(!?\(\s*min(-device)?-height).+\(\s*max(-device)?-height/i,minHeight=/\(\s*min(-device)?-height/i,maxMinHeight=/(!?\(\s*max(-device)?-height).+\(\s*min(-device)?-height/i,maxHeight=/\(\s*max(-device)?-height/i,isMinHeight=_testQuery(minMaxHeight,maxMinHeight,minHeight),isMaxHeight=_testQuery(maxMinHeight,minMaxHeight,maxHeight),isPrint=/print/i,isPrintOnly=/^print$/i,maxValue=Number.MAX_VALUE;function _getQueryLength(ot){const et=/(-?\d*\.?\d+)(ch|em|ex|px|rem)/.exec(ot);if(et===null)return maxValue;let ct=et[1];switch(et[2]){case"ch":ct=parseFloat(ct)*8.8984375;break;case"em":case"rem":ct=parseFloat(ct)*16;break;case"ex":ct=parseFloat(ct)*8.296875;break;case"px":ct=parseFloat(ct);break}return+ct}function _testQuery(ot,et,ct){return function(ut){return ot.test(ut)?!0:et.test(ut)?!1:ct.test(ut)}}function _testIsPrint(ot,et){const ct=isPrint.test(ot),ut=isPrintOnly.test(ot),dt=isPrint.test(et),ft=isPrintOnly.test(et);return ct&&dt?!ut&&ft?1:ut&&!ft?-1:ot.localeCompare(et):ct?1:dt?-1:null}function sortCSSmq(ot,et){if(ot==="")return-1;if(et==="")return 1;const ct=_testIsPrint(ot,et);if(ct!==null)return ct;const ut=isMinWidth(ot)||isMinHeight(ot),dt=isMaxWidth(ot)||isMaxHeight(ot),ft=isMinWidth(et)||isMinHeight(et),zt=isMaxWidth(et)||isMaxHeight(et);if(ut&&zt)return-1;if(dt&&ft)return 1;const Dt=_getQueryLength(ot),St=_getQueryLength(et);return Dt===maxValue&&St===maxValue?ot.localeCompare(et):Dt===maxValue?1:St===maxValue?-1:Dt>St?dt?-1:1:Dt<St?dt?1:-1:ot.localeCompare(et)}class MultiCache{constructor(et,ct,ut){this.idGenerator=et,this.onNewCache=ct,this.onNewValue=ut,this.sortedCacheKeys=[],this.caches={}}getCache(et){if(!this.caches[et]){const ct=new Cache(this.idGenerator,this.onNewValue);ct.key=et,this.sortedCacheKeys.push(et),this.sortedCacheKeys.sort(sortCSSmq);const ut=this.sortedCacheKeys.indexOf(et),dt=ut<this.sortedCacheKeys.length-1?this.sortedCacheKeys[ut+1]:void 0;this.caches[et]=ct,this.onNewCache(et,ct,dt)}return this.caches[et]}getSortedCacheKeys(){return this.sortedCacheKeys}}class Cache{constructor(et,ct){this.cache={},this.idGenerator=et,this.onNewValue=ct}addValue(et,ct){const ut=this.cache[et];if(ut)return ut;const dt=this.idGenerator.next();return this.cache[et]=dt,this.onNewValue(this,dt,ct),dt}}const uppercasePattern$1=/[A-Z]/g,msPattern$1=/^ms-/,cache$1={};function hyphenateStyleName$2(ot){return ot in cache$1?cache$1[ot]:cache$1[ot]=ot.replace(uppercasePattern$1,"-$&").toLowerCase().replace(msPattern$1,"-ms-")}function capitalizeString(ot){return ot.charAt(0).toUpperCase()+ot.slice(1)}function prefixProperty(ot,et,ct){if(ot.hasOwnProperty(et)){for(var ut={},dt=ot[et],ft=capitalizeString(et),zt=Object.keys(ct),Dt=0;Dt<zt.length;Dt++){var St=zt[Dt];if(St===et)for(var Tt=0;Tt<dt.length;Tt++)ut[dt[Tt]+ft]=ct[et];ut[St]=ct[St]}return ut}return ct}function prefixValue$1(ot,et,ct,ut,dt){for(var ft=0,zt=ot.length;ft<zt;++ft){var Dt=ot[ft](et,ct,ut,dt);if(Dt)return Dt}}function addIfNew(ot,et){ot.indexOf(et)===-1&&ot.push(et)}function addNewValuesOnly(ot,et){if(Array.isArray(et))for(var ct=0,ut=et.length;ct<ut;++ct)addIfNew(ot,et[ct]);else addIfNew(ot,et)}function isObject(ot){return ot instanceof Object&&!Array.isArray(ot)}function createPrefixer(ot){var et=ot.prefixMap,ct=ot.plugins;return function ut(dt){for(var ft in dt){var zt=dt[ft];if(isObject(zt))dt[ft]=ut(zt);else if(Array.isArray(zt)){for(var Dt=[],St=0,Tt=zt.length;St<Tt;++St){var Rt=prefixValue$1(ct,ft,zt[St],dt,et);addNewValuesOnly(Dt,Rt||zt[St])}Dt.length>0&&(dt[ft]=Dt)}else{var $t=prefixValue$1(ct,ft,zt,dt,et);$t&&(dt[ft]=$t),dt=prefixProperty(et,ft,dt)}}return dt}}var w=["Webkit"],m=["Moz"],ms=["ms"],wm=["Webkit","Moz"],wms=["Webkit","ms"],wmms=["Webkit","Moz","ms"];const data={plugins:[],prefixMap:{appearance:wm,textEmphasisPosition:w,textEmphasis:w,textEmphasisStyle:w,textEmphasisColor:w,boxDecorationBreak:w,maskImage:w,maskMode:w,maskRepeat:w,maskPosition:w,maskClip:w,maskOrigin:w,maskSize:w,maskComposite:w,mask:w,maskBorderSource:w,maskBorderMode:w,maskBorderSlice:w,maskBorderWidth:w,maskBorderOutset:w,maskBorderRepeat:w,maskBorder:w,maskType:w,textDecorationStyle:w,textDecorationSkip:w,textDecorationLine:w,textDecorationColor:w,userSelect:wmms,backdropFilter:w,fontKerning:w,scrollSnapType:wms,scrollSnapPointsX:wms,scrollSnapPointsY:wms,scrollSnapDestination:wms,scrollSnapCoordinate:wms,clipPath:w,shapeImageThreshold:w,shapeImageMargin:w,shapeImageOutside:w,filter:w,hyphens:wms,flowInto:wms,flowFrom:wms,breakBefore:wms,breakAfter:wms,breakInside:wms,regionFragment:wms,writingMode:wms,textOrientation:w,tabSize:m,fontFeatureSettings:w,columnCount:w,columnFill:w,columnGap:w,columnRule:w,columnRuleColor:w,columnRuleStyle:w,columnRuleWidth:w,columns:w,columnSpan:w,columnWidth:w,wrapFlow:ms,wrapThrough:ms,wrapMargin:ms,textSizeAdjust:wms}};function backgroundClip(ot,et){if(typeof et=="string"&&et==="text")return["-webkit-text","text"]}var prefixes$5=["-webkit-","-moz-",""],values$3={"zoom-in":!0,"zoom-out":!0,grab:!0,grabbing:!0};function cursor(ot,et){if(ot==="cursor"&&values$3.hasOwnProperty(et))return prefixes$5.map(function(ct){return ct+et})}var isPrefixedValue$1={exports:{}};(function(ot,et){Object.defineProperty(et,"__esModule",{value:!0}),et.default=ut;var ct=/-webkit-|-moz-|-ms-/;function ut(dt){return typeof dt=="string"&&ct.test(dt)}ot.exports=et.default})(isPrefixedValue$1,isPrefixedValue$1.exports);var isPrefixedValueExports=isPrefixedValue$1.exports;const isPrefixedValue=getDefaultExportFromCjs$1(isPrefixedValueExports);var prefixes$4=["-webkit-",""];function crossFade(ot,et){if(typeof et=="string"&&!isPrefixedValue(et)&&et.indexOf("cross-fade(")>-1)return prefixes$4.map(function(ct){return et.replace(/cross-fade\(/g,ct+"cross-fade(")})}var prefixes$3=["-webkit-",""];function filter(ot,et){if(typeof et=="string"&&!isPrefixedValue(et)&&et.indexOf("filter(")>-1)return prefixes$3.map(function(ct){return et.replace(/filter\(/g,ct+"filter(")})}var values$2={flex:["-webkit-box","-moz-box","-ms-flexbox","-webkit-flex","flex"],"inline-flex":["-webkit-inline-box","-moz-inline-box","-ms-inline-flexbox","-webkit-inline-flex","inline-flex"]};function flex(ot,et){if(ot==="display"&&values$2.hasOwnProperty(et))return values$2[et]}var alternativeValues={"space-around":"justify","space-between":"justify","flex-start":"start","flex-end":"end","wrap-reverse":"multiple",wrap:"multiple"},alternativeProps$1={alignItems:"WebkitBoxAlign",justifyContent:"WebkitBoxPack",flexWrap:"WebkitBoxLines",flexGrow:"WebkitBoxFlex"};function flexboxOld(ot,et,ct){ot==="flexDirection"&&typeof et=="string"&&(et.indexOf("column")>-1?ct.WebkitBoxOrient="vertical":ct.WebkitBoxOrient="horizontal",et.indexOf("reverse")>-1?ct.WebkitBoxDirection="reverse":ct.WebkitBoxDirection="normal"),alternativeProps$1.hasOwnProperty(ot)&&(ct[alternativeProps$1[ot]]=alternativeValues[et]||et)}var prefixes$2=["-webkit-","-moz-",""],values$1=/linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/gi;function gradient(ot,et){if(typeof et=="string"&&!isPrefixedValue(et)&&values$1.test(et))return prefixes$2.map(function(ct){return et.replace(values$1,function(ut){return ct+ut})})}var _slicedToArray=function(){function ot(et,ct){var ut=[],dt=!0,ft=!1,zt=void 0;try{for(var Dt=et[Symbol.iterator](),St;!(dt=(St=Dt.next()).done)&&(ut.push(St.value),!(ct&&ut.length===ct));dt=!0);}catch(Tt){ft=!0,zt=Tt}finally{try{!dt&&Dt.return&&Dt.return()}finally{if(ft)throw zt}}return ut}return function(et,ct){if(Array.isArray(et))return et;if(Symbol.iterator in Object(et))return ot(et,ct);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();function isSimplePositionValue(ot){return typeof ot=="number"&&!isNaN(ot)}function isComplexSpanValue(ot){return typeof ot=="string"&&ot.includes("/")}var alignmentValues=["center","end","start","stretch"],displayValues={"inline-grid":["-ms-inline-grid","inline-grid"],grid:["-ms-grid","grid"]},propertyConverters={alignSelf:function ot(et,ct){alignmentValues.indexOf(et)>-1&&(ct.msGridRowAlign=et)},gridColumn:function ot(et,ct){if(isSimplePositionValue(et))ct.msGridColumn=et;else if(isComplexSpanValue(et)){var ut=et.split("/"),dt=_slicedToArray(ut,2),ft=dt[0],zt=dt[1];propertyConverters.gridColumnStart(+ft,ct);var Dt=zt.split(/ ?span /),St=_slicedToArray(Dt,2),Tt=St[0],Rt=St[1];Tt===""?propertyConverters.gridColumnEnd(+ft+ +Rt,ct):propertyConverters.gridColumnEnd(+zt,ct)}else propertyConverters.gridColumnStart(et,ct)},gridColumnEnd:function ot(et,ct){var ut=ct.msGridColumn;isSimplePositionValue(et)&&isSimplePositionValue(ut)&&(ct.msGridColumnSpan=et-ut)},gridColumnStart:function ot(et,ct){isSimplePositionValue(et)&&(ct.msGridColumn=et)},gridRow:function ot(et,ct){if(isSimplePositionValue(et))ct.msGridRow=et;else if(isComplexSpanValue(et)){var ut=et.split("/"),dt=_slicedToArray(ut,2),ft=dt[0],zt=dt[1];propertyConverters.gridRowStart(+ft,ct);var Dt=zt.split(/ ?span /),St=_slicedToArray(Dt,2),Tt=St[0],Rt=St[1];Tt===""?propertyConverters.gridRowEnd(+ft+ +Rt,ct):propertyConverters.gridRowEnd(+zt,ct)}else propertyConverters.gridRowStart(et,ct)},gridRowEnd:function ot(et,ct){var ut=ct.msGridRow;isSimplePositionValue(et)&&isSimplePositionValue(ut)&&(ct.msGridRowSpan=et-ut)},gridRowStart:function ot(et,ct){isSimplePositionValue(et)&&(ct.msGridRow=et)},gridTemplateColumns:function ot(et,ct){ct.msGridColumns=et},gridTemplateRows:function ot(et,ct){ct.msGridRows=et},justifySelf:function ot(et,ct){alignmentValues.indexOf(et)>-1&&(ct.msGridColumnAlign=et)}};function grid(ot,et,ct){if(ot==="display"&&et in displayValues)return displayValues[et];if(ot in propertyConverters){var ut=propertyConverters[ot];ut(et,ct)}}var prefixes$1=["-webkit-",""];function imageSet(ot,et){if(typeof et=="string"&&!isPrefixedValue(et)&&et.indexOf("image-set(")>-1)return prefixes$1.map(function(ct){return et.replace(/image-set\(/g,ct+"image-set(")})}var alternativeProps={marginBlockStart:["WebkitMarginBefore"],marginBlockEnd:["WebkitMarginAfter"],marginInlineStart:["WebkitMarginStart","MozMarginStart"],marginInlineEnd:["WebkitMarginEnd","MozMarginEnd"],paddingBlockStart:["WebkitPaddingBefore"],paddingBlockEnd:["WebkitPaddingAfter"],paddingInlineStart:["WebkitPaddingStart","MozPaddingStart"],paddingInlineEnd:["WebkitPaddingEnd","MozPaddingEnd"],borderBlockStart:["WebkitBorderBefore"],borderBlockStartColor:["WebkitBorderBeforeColor"],borderBlockStartStyle:["WebkitBorderBeforeStyle"],borderBlockStartWidth:["WebkitBorderBeforeWidth"],borderBlockEnd:["WebkitBorderAfter"],borderBlockEndColor:["WebkitBorderAfterColor"],borderBlockEndStyle:["WebkitBorderAfterStyle"],borderBlockEndWidth:["WebkitBorderAfterWidth"],borderInlineStart:["WebkitBorderStart","MozBorderStart"],borderInlineStartColor:["WebkitBorderStartColor","MozBorderStartColor"],borderInlineStartStyle:["WebkitBorderStartStyle","MozBorderStartStyle"],borderInlineStartWidth:["WebkitBorderStartWidth","MozBorderStartWidth"],borderInlineEnd:["WebkitBorderEnd","MozBorderEnd"],borderInlineEndColor:["WebkitBorderEndColor","MozBorderEndColor"],borderInlineEndStyle:["WebkitBorderEndStyle","MozBorderEndStyle"],borderInlineEndWidth:["WebkitBorderEndWidth","MozBorderEndWidth"]};function logical(ot,et,ct){if(Object.prototype.hasOwnProperty.call(alternativeProps,ot))for(var ut=alternativeProps[ot],dt=0,ft=ut.length;dt<ft;++dt)ct[ut[dt]]=et}function position(ot,et){if(ot==="position"&&et==="sticky")return["-webkit-sticky","sticky"]}var prefixes=["-webkit-","-moz-",""],properties$1={maxHeight:!0,maxWidth:!0,width:!0,height:!0,columnWidth:!0,minWidth:!0,minHeight:!0},values={"min-content":!0,"max-content":!0,"fill-available":!0,"fit-content":!0,"contain-floats":!0};function sizing(ot,et){if(properties$1.hasOwnProperty(ot)&&values.hasOwnProperty(et))return prefixes.map(function(ct){return ct+et})}var hyphenateProperty$1={exports:{}},uppercasePattern=/[A-Z]/g,msPattern=/^ms-/,cache={};function toHyphenLower(ot){return"-"+ot.toLowerCase()}function hyphenateStyleName(ot){if(cache.hasOwnProperty(ot))return cache[ot];var et=ot.replace(uppercasePattern,toHyphenLower);return cache[ot]=msPattern.test(et)?"-"+et:et}const hyphenateStyleName$1=Object.freeze(Object.defineProperty({__proto__:null,default:hyphenateStyleName},Symbol.toStringTag,{value:"Module"})),require$$0=getAugmentedNamespace(hyphenateStyleName$1);(function(ot,et){Object.defineProperty(et,"__esModule",{value:!0}),et.default=ft;var ct=require$$0,ut=dt(ct);function dt(zt){return zt&&zt.__esModule?zt:{default:zt}}function ft(zt){return(0,ut.default)(zt)}ot.exports=et.default})(hyphenateProperty$1,hyphenateProperty$1.exports);var hyphenatePropertyExports=hyphenateProperty$1.exports;const hyphenateProperty=getDefaultExportFromCjs$1(hyphenatePropertyExports);var properties={transition:!0,transitionProperty:!0,WebkitTransition:!0,WebkitTransitionProperty:!0,MozTransition:!0,MozTransitionProperty:!0},prefixMapping={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-"};function prefixValue(ot,et){if(isPrefixedValue(ot))return ot;for(var ct=ot.split(/,(?![^()]*(?:\([^()]*\))?\))/g),ut=0,dt=ct.length;ut<dt;++ut){var ft=ct[ut],zt=[ft];for(var Dt in et){var St=hyphenateProperty(Dt);if(ft.indexOf(St)>-1&&St!=="order")for(var Tt=et[Dt],Rt=0,$t=Tt.length;Rt<$t;++Rt)zt.unshift(ft.replace(St,prefixMapping[Tt[Rt]]+St))}ct[ut]=zt.join(",")}return ct.join(",")}function transition(ot,et,ct,ut){if(typeof et=="string"&&properties.hasOwnProperty(ot)){var dt=prefixValue(et,ut),ft=dt.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter(function(Dt){return!/-moz-|-ms-/.test(Dt)}).join(",");if(ot.indexOf("Webkit")>-1)return ft;var zt=dt.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter(function(Dt){return!/-webkit-|-ms-/.test(Dt)}).join(",");return ot.indexOf("Moz")>-1?zt:(ct["Webkit"+capitalizeString(ot)]=ft,ct["Moz"+capitalizeString(ot)]=zt,dt)}}var plugins=[backgroundClip,crossFade,cursor,filter,flexboxOld,gradient,grid,imageSet,logical,position,sizing,transition,flex],prefix=createPrefixer({prefixMap:data.prefixMap,plugins});function injectStylePrefixed(ot,et,ct,ut){const dt=ot.getCache(ct);let ft="";for(const zt in et){const Dt=et[zt];if(Dt!=null)if(typeof Dt!="object"){const St=`${hyphenateStyleName$2(zt)}:${Dt}`,Tt=`${ut}${St}`,Rt=dt.cache[Tt];if(Rt!==void 0){ft+=" "+Rt;continue}else{let $t="";const kt=prefix({[zt]:Dt});for(const Ft in kt){const jt=kt[Ft],Kt=typeof jt;if(Kt==="string"||Kt==="number"){const Yt=`${hyphenateStyleName$2(Ft)}:${jt}`;Yt!==St&&($t+=`${Yt};`)}else if(Array.isArray(jt)){const Yt=hyphenateStyleName$2(Ft);for(let Ut=0;Ut<jt.length;Ut++){const Jt=`${Yt}:${jt[Ut]}`;Jt!==St&&($t+=`${Jt};`)}}}$t+=St;const Bt=dt.addValue(Tt,{pseudo:ut,block:$t});ft+=" "+Bt}}else zt[0]===":"?ft+=" "+injectStylePrefixed(ot,Dt,ct,ut+zt):zt.substring(0,6)==="@media"&&(ft+=" "+injectStylePrefixed(ot,Dt,zt.substr(7),ut))}return ft.slice(1)}function atomicSelector(ot,et){let ct=`.${ot}`;return et&&(ct+=et),ct}function keyframesToBlock(ot){let et="";for(const ct in ot)et+=`${ct}{${declarationsToBlock(ot[ct])}}`;return et}function declarationsToBlock(ot){let et="";for(const ct in ot){const ut=ot[ct];(typeof ut=="string"||typeof ut=="number")&&(et+=`${hyphenateStyleName$2(ct)}:${ut};`)}return et.slice(0,-1)}function keyframesBlockToRule(ot,et){return`@keyframes ${ot}{${et}}`}function fontFaceBlockToRule(ot,et){return`@font-face{font-family:${ot};${et}}`}function styleBlockToRule(ot,et){return`${ot}{${et}}`}const insertRuleIntoDevtools=(ot,et)=>{const ct=ot.substring(1,ot.indexOf(":")!==-1?ot.indexOf(":"):ot.length),ut={};for(const dt of et.split(";"))dt.trim()!==""&&!window.__STYLETRON_DEVTOOLS__.atomicMap[ct]&&(ut[dt.substring(0,dt.indexOf(":"))]=dt.substring(dt.indexOf(":")+1,dt.length));window.__STYLETRON_DEVTOOLS__.atomicMap[ct]=ut},STYLES_HYDRATOR=/\.([^{:]+)(:[^{]+)?{(?:[^}]*;)?([^}]*?)}/g,KEYFRAMES_HYRDATOR=/@keyframes ([^{]+){((?:(?:from|to|(?:\d+\.?\d*%))\{(?:[^}])*})*)}/g,FONT_FACE_HYDRATOR=/@font-face\{font-family:([^;]+);([^}]*)\}/g;function hydrateStyles(ot,et,ct){let ut;for(;ut=et.exec(ct);){const[,dt,ft,zt]=ut,Dt=ft?`${ft}${zt}`:zt;ot.cache[Dt]=dt,ot.idGenerator.increment()}}function hydrate(ot,et,ct){let ut;for(;ut=et.exec(ct);){const[,dt,ft]=ut;ot.cache[ft]=dt,ot.idGenerator.increment()}}class StyletronClient{constructor(et={}){this.styleElements={};const ct=new SequentialIDGenerator(et.prefix),ut=(dt,ft,zt)=>{const{pseudo:Dt,block:St}=zt,Tt=this.styleElements[dt.key].sheet,Rt=atomicSelector(ft,Dt),$t=styleBlockToRule(Rt,St);try{Tt.insertRule($t,Tt.cssRules.length)}catch{}};if(this.styleCache=new MultiCache(ct,(dt,ft,zt)=>{const Dt=document.createElement("style");if(Dt.media=dt,zt===void 0)this.container.appendChild(Dt);else{const St=findSheetIndexWithMedia(this.container.children,zt);this.container.insertBefore(Dt,this.container.children[St])}this.styleElements[dt]=Dt},ut),this.keyframesCache=new Cache(new SequentialIDGenerator(et.prefix),(dt,ft,zt)=>{this.styleCache.getCache("");const Dt=this.styleElements[""].sheet,St=keyframesBlockToRule(ft,keyframesToBlock(zt));try{Dt.insertRule(St,Dt.cssRules.length)}catch{}}),this.fontFaceCache=new Cache(new SequentialIDGenerator(et.prefix),(dt,ft,zt)=>{this.styleCache.getCache("");const Dt=this.styleElements[""].sheet,St=fontFaceBlockToRule(ft,declarationsToBlock(zt));try{Dt.insertRule(St,Dt.cssRules.length)}catch{}}),et.container&&(this.container=et.container),et.hydrate&&et.hydrate.length>0){if(!this.container){const dt=et.hydrate[0].parentElement;dt!=null&&(this.container=dt)}for(let dt=0;dt<et.hydrate.length;dt++){const ft=et.hydrate[dt],zt=ft.getAttribute("data-hydrate");if(zt==="font-face"){hydrate(this.fontFaceCache,FONT_FACE_HYDRATOR,ft.textContent);continue}if(zt==="keyframes"){hydrate(this.keyframesCache,KEYFRAMES_HYRDATOR,ft.textContent);continue}const Dt=ft.media?ft.media:"";this.styleElements[Dt]=ft;const St=new Cache(ct,ut);St.key=Dt,hydrateStyles(St,STYLES_HYDRATOR,ft.textContent),this.styleCache.sortedCacheKeys.push(Dt),this.styleCache.caches[Dt]=St}}if(!this.container){if(document.head===null)throw new Error("No container provided and `document.head` was null");this.container=document.head}}renderStyle(et){return injectStylePrefixed(this.styleCache,et,"","")}renderFontFace(et){const ct=declarationsToBlock(et);return this.fontFaceCache.addValue(ct,et)}renderKeyframes(et){const ct=keyframesToBlock(et);return this.keyframesCache.addValue(ct,et)}}function findSheetIndexWithMedia(ot,et){let ct=0;for(;ct<ot.length;ct++){const ut=ot[ct];if(ut.tagName==="STYLE"&&ut.media===et)return ct}return-1}const engine=new StyletronClient({prefix:"st-"}),streamlitExecutionStartedAt=Date.now();function StreamlitApp(ot){return jsxRuntimeExports.jsx(StliteKernelProvider,{kernel:ot.kernel,children:jsxRuntimeExports.jsx(Provider$1,{value:engine,children:jsxRuntimeExports.jsx(ThemedApp,{streamlitExecutionStartedAt})})})}function r(ot){var et,ct,ut="";if(typeof ot=="string"||typeof ot=="number")ut+=ot;else if(typeof ot=="object")if(Array.isArray(ot)){var dt=ot.length;for(et=0;et<dt;et++)ot[et]&&(ct=r(ot[et]))&&(ut&&(ut+=" "),ut+=ct)}else for(ct in ot)ot[ct]&&(ut&&(ut+=" "),ut+=ct);return ut}function clsx(){for(var ot,et,ct=0,ut="",dt=arguments.length;ct<dt;ct++)(ot=arguments[ct])&&(et=r(ot))&&(ut&&(ut+=" "),ut+=et);return ut}function Mt(ot){if(typeof document>"u")return;let et=document.head||document.getElementsByTagName("head")[0],ct=document.createElement("style");ct.type="text/css",et.firstChild?et.insertBefore(ct,et.firstChild):et.appendChild(ct),ct.styleSheet?ct.styleSheet.cssText=ot:ct.appendChild(document.createTextNode(ot))}Mt(`:root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: hsl(6, 78%, 57%);--toastify-color-transparent: rgba(255, 255, 255, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-container-width: fit-content;--toastify-toast-width: 320px;--toastify-toast-offset: 16px;--toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));--toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));--toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));--toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));--toastify-toast-background: #fff;--toastify-toast-padding: 14px;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-toast-bd-radius: 6px;--toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, .1);--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error);--toastify-color-progress-bgo: .2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index));position:fixed;width:var(--toastify-container-width);box-sizing:border-box;color:#fff;display:flex;flex-direction:column}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right);align-items:end}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right);align-items:end}@media only screen and (max-width: 480px){.Toastify__toast-container{width:100vw;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translate(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:initial}.Toastify__toast{--toastify-toast-width: 100%;margin-bottom:0;border-radius:0}}.Toastify__toast{--y: 0;position:relative;touch-action:none;width:var(--toastify-toast-width);min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:var(--toastify-toast-padding);border-radius:var(--toastify-toast-bd-radius);box-shadow:var(--toastify-toast-shadow);max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);z-index:0;display:flex;flex:1 auto;align-items:center;word-break:break-word}.Toastify__toast-container[data-stacked=true]{width:var(--toastify-toast-width)}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,.Toastify__toast--stacked[data-collapsed] .Toastify__close-button{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-icon{margin-inline-end:10px;width:22px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;position:absolute;top:6px;right:6px;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;z-index:1}.Toastify__toast--rtl .Toastify__close-button{left:6px;right:unset}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:1;opacity:.7;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right;border-bottom-left-radius:initial}.Toastify__progress-bar--wrp{position:absolute;overflow:hidden;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius);border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
511
- `);var L=ot=>typeof ot=="number"&&!isNaN(ot),N=ot=>typeof ot=="string",P=ot=>typeof ot=="function",mt=ot=>N(ot)||L(ot),B=ot=>N(ot)||P(ot)?ot:null,pt=(ot,et)=>ot===!1||L(ot)&&ot>0?ot:et,z=ot=>reactExports.isValidElement(ot)||N(ot)||P(ot)||L(ot);function Z(ot,et,ct=300){let{scrollHeight:ut,style:dt}=ot;requestAnimationFrame(()=>{dt.minHeight="initial",dt.height=ut+"px",dt.transition=`all ${ct}ms`,requestAnimationFrame(()=>{dt.height="0",dt.padding="0",dt.margin="0",setTimeout(et,ct)})})}function $({enter:ot,exit:et,appendPosition:ct=!1,collapse:ut=!0,collapseDuration:dt=300}){return function({children:ft,position:zt,preventExitTransition:Dt,done:St,nodeRef:Tt,isIn:Rt,playToast:$t}){let kt=ct?`${ot}--${zt}`:ot,Bt=ct?`${et}--${zt}`:et,Ft=reactExports.useRef(0);return reactExports.useLayoutEffect(()=>{let jt=Tt.current,Kt=kt.split(" "),Yt=Ut=>{Ut.target===Tt.current&&($t(),jt.removeEventListener("animationend",Yt),jt.removeEventListener("animationcancel",Yt),Ft.current===0&&Ut.type!=="animationcancel"&&jt.classList.remove(...Kt))};jt.classList.add(...Kt),jt.addEventListener("animationend",Yt),jt.addEventListener("animationcancel",Yt)},[]),reactExports.useEffect(()=>{let jt=Tt.current,Kt=()=>{jt.removeEventListener("animationend",Kt),ut?Z(jt,St,dt):St()};Rt||(Dt?Kt():(Ft.current=1,jt.className+=` ${Bt}`,jt.addEventListener("animationend",Kt)))},[Rt]),React$1.createElement(React$1.Fragment,null,ft)}}function J(ot,et){return{content:tt(ot.content,ot.props),containerId:ot.props.containerId,id:ot.props.toastId,theme:ot.props.theme,type:ot.props.type,data:ot.props.data||{},isLoading:ot.props.isLoading,icon:ot.props.icon,reason:ot.removalReason,status:et}}function tt(ot,et,ct=!1){return reactExports.isValidElement(ot)&&!N(ot.type)?reactExports.cloneElement(ot,{closeToast:et.closeToast,toastProps:et,data:et.data,isPaused:ct}):P(ot)?ot({closeToast:et.closeToast,toastProps:et,data:et.data,isPaused:ct}):ot}function yt({closeToast:ot,theme:et,ariaLabel:ct="close"}){return React$1.createElement("button",{className:`Toastify__close-button Toastify__close-button--${et}`,type:"button",onClick:ut=>{ut.stopPropagation(),ot(!0)},"aria-label":ct},React$1.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},React$1.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function gt({delay:ot,isRunning:et,closeToast:ct,type:ut="default",hide:dt,className:ft,controlledProgress:zt,progress:Dt,rtl:St,isIn:Tt,theme:Rt}){let $t=dt||zt&&Dt===0,kt={animationDuration:`${ot}ms`,animationPlayState:et?"running":"paused"};zt&&(kt.transform=`scaleX(${Dt})`);let Bt=clsx("Toastify__progress-bar",zt?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${Rt}`,`Toastify__progress-bar--${ut}`,{"Toastify__progress-bar--rtl":St}),Ft=P(ft)?ft({rtl:St,type:ut,defaultClassName:Bt}):clsx(Bt,ft),jt={[zt&&Dt>=1?"onTransitionEnd":"onAnimationEnd"]:zt&&Dt<1?null:()=>{Tt&&ct()}};return React$1.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":$t},React$1.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${Rt} Toastify__progress-bar--${ut}`}),React$1.createElement("div",{role:"progressbar","aria-hidden":$t?"true":"false","aria-label":"notification timer",className:Ft,style:kt,...jt}))}var Xt=1,at=()=>`${Xt++}`;function _t(ot,et,ct){let ut=1,dt=0,ft=[],zt=[],Dt=et,St=new Map,Tt=new Set,Rt=Ut=>(Tt.add(Ut),()=>Tt.delete(Ut)),$t=()=>{zt=Array.from(St.values()),Tt.forEach(Ut=>Ut())},kt=({containerId:Ut,toastId:Jt,updateId:Ht})=>{let e0=Ut?Ut!==ot:ot!==1,t0=St.has(Jt)&&Ht==null;return e0||t0},Bt=(Ut,Jt)=>{St.forEach(Ht=>{var e0;(Jt==null||Jt===Ht.props.toastId)&&((e0=Ht.toggle)==null||e0.call(Ht,Ut))})},Ft=Ut=>{var Jt,Ht;(Ht=(Jt=Ut.props)==null?void 0:Jt.onClose)==null||Ht.call(Jt,Ut.removalReason),Ut.isActive=!1},jt=Ut=>{if(Ut==null)St.forEach(Ft);else{let Jt=St.get(Ut);Jt&&Ft(Jt)}$t()},Kt=()=>{dt-=ft.length,ft=[]},Yt=Ut=>{var Jt,Ht;let{toastId:e0,updateId:t0}=Ut.props,Zt=t0==null;Ut.staleId&&St.delete(Ut.staleId),Ut.isActive=!0,St.set(e0,Ut),$t(),ct(J(Ut,Zt?"added":"updated")),Zt&&((Ht=(Jt=Ut.props).onOpen)==null||Ht.call(Jt))};return{id:ot,props:Dt,observe:Rt,toggle:Bt,removeToast:jt,toasts:St,clearQueue:Kt,buildToast:(Ut,Jt)=>{if(kt(Jt))return;let{toastId:Ht,updateId:e0,data:t0,staleId:Zt,delay:o0}=Jt,n0=e0==null;n0&&dt++;let r0={...Dt,style:Dt.toastStyle,key:ut++,...Object.fromEntries(Object.entries(Jt).filter(([u0,b0])=>b0!=null)),toastId:Ht,updateId:e0,data:t0,isIn:!1,className:B(Jt.className||Dt.toastClassName),progressClassName:B(Jt.progressClassName||Dt.progressClassName),autoClose:Jt.isLoading?!1:pt(Jt.autoClose,Dt.autoClose),closeToast(u0){St.get(Ht).removalReason=u0,jt(Ht)},deleteToast(){let u0=St.get(Ht);if(u0!=null){if(ct(J(u0,"removed")),St.delete(Ht),dt--,dt<0&&(dt=0),ft.length>0){Yt(ft.shift());return}$t()}}};r0.closeButton=Dt.closeButton,Jt.closeButton===!1||z(Jt.closeButton)?r0.closeButton=Jt.closeButton:Jt.closeButton===!0&&(r0.closeButton=z(Dt.closeButton)?Dt.closeButton:!0);let a0={content:Ut,props:r0,staleId:Zt};Dt.limit&&Dt.limit>0&&dt>Dt.limit&&n0?ft.push(a0):L(o0)?setTimeout(()=>{Yt(a0)},o0):Yt(a0)},setProps(Ut){Dt=Ut},setToggle:(Ut,Jt)=>{let Ht=St.get(Ut);Ht&&(Ht.toggle=Jt)},isToastActive:Ut=>{var Jt;return(Jt=St.get(Ut))==null?void 0:Jt.isActive},getSnapshot:()=>zt}}var I=new Map,F=[],st=new Set,Vt=ot=>st.forEach(et=>et(ot)),bt=()=>I.size>0;function Qt(){F.forEach(ot=>nt(ot.content,ot.options)),F=[]}var vt=(ot,{containerId:et})=>{var ct;return(ct=I.get(et||1))==null?void 0:ct.toasts.get(ot)};function X(ot,et){var ct;if(et)return!!((ct=I.get(et))!=null&&ct.isToastActive(ot));let ut=!1;return I.forEach(dt=>{dt.isToastActive(ot)&&(ut=!0)}),ut}function ht(ot){if(!bt()){F=F.filter(et=>ot!=null&&et.options.toastId!==ot);return}if(ot==null||mt(ot))I.forEach(et=>{et.removeToast(ot)});else if(ot&&("containerId"in ot||"id"in ot)){let et=I.get(ot.containerId);et?et.removeToast(ot.id):I.forEach(ct=>{ct.removeToast(ot.id)})}}var Ct=(ot={})=>{I.forEach(et=>{et.props.limit&&(!ot.containerId||et.id===ot.containerId)&&et.clearQueue()})};function nt(ot,et){z(ot)&&(bt()||F.push({content:ot,options:et}),I.forEach(ct=>{ct.buildToast(ot,et)}))}function xt(ot){var et;(et=I.get(ot.containerId||1))==null||et.setToggle(ot.id,ot.fn)}function rt(ot,et){I.forEach(ct=>{(et==null||!(et!=null&&et.containerId)||(et==null?void 0:et.containerId)===ct.id)&&ct.toggle(ot,et==null?void 0:et.id)})}function Et(ot){let et=ot.containerId||1;return{subscribe(ct){let ut=_t(et,ot,Vt);I.set(et,ut);let dt=ut.observe(ct);return Qt(),()=>{dt(),I.delete(et)}},setProps(ct){var ut;(ut=I.get(et))==null||ut.setProps(ct)},getSnapshot(){var ct;return(ct=I.get(et))==null?void 0:ct.getSnapshot()}}}function Pt(ot){return st.add(ot),()=>{st.delete(ot)}}function Wt(ot){return ot&&(N(ot.toastId)||L(ot.toastId))?ot.toastId:at()}function U(ot,et){return nt(ot,et),et.toastId}function V(ot,et){return{...et,type:et&&et.type||ot,toastId:Wt(et)}}function Q(ot){return(et,ct)=>U(et,V(ot,ct))}function y(ot,et){return U(ot,V("default",et))}y.loading=(ot,et)=>U(ot,V("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...et}));function Gt(ot,{pending:et,error:ct,success:ut},dt){let ft;et&&(ft=N(et)?y.loading(et,dt):y.loading(et.render,{...dt,...et}));let zt={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},Dt=(Tt,Rt,$t)=>{if(Rt==null){y.dismiss(ft);return}let kt={type:Tt,...zt,...dt,data:$t},Bt=N(Rt)?{render:Rt}:Rt;return ft?y.update(ft,{...kt,...Bt}):y(Bt.render,{...kt,...Bt}),$t},St=P(ot)?ot():ot;return St.then(Tt=>Dt("success",ut,Tt)).catch(Tt=>Dt("error",ct,Tt)),St}y.promise=Gt,y.success=Q("success"),y.info=Q("info"),y.error=Q("error"),y.warning=Q("warning"),y.warn=y.warning,y.dark=(ot,et)=>U(ot,V("default",{theme:"dark",...et}));function qt(ot){ht(ot)}y.dismiss=qt,y.clearWaitingQueue=Ct,y.isActive=X,y.update=(ot,et={})=>{let ct=vt(ot,et);if(ct){let{props:ut,content:dt}=ct,ft={delay:100,...ut,...et,toastId:et.toastId||ot,updateId:at()};ft.toastId!==ot&&(ft.staleId=ot);let zt=ft.render||dt;delete ft.render,U(zt,ft)}},y.done=ot=>{y.update(ot,{progress:1})},y.onChange=Pt,y.play=ot=>rt(!0,ot),y.pause=ot=>rt(!1,ot);function It(ot){var et;let{subscribe:ct,getSnapshot:ut,setProps:dt}=reactExports.useRef(Et(ot)).current;dt(ot);let ft=(et=reactExports.useSyncExternalStore(ct,ut,ut))==null?void 0:et.slice();function zt(Dt){if(!ft)return[];let St=new Map;return ot.newestOnTop&&ft.reverse(),ft.forEach(Tt=>{let{position:Rt}=Tt.props;St.has(Rt)||St.set(Rt,[]),St.get(Rt).push(Tt)}),Array.from(St,Tt=>Dt(Tt[0],Tt[1]))}return{getToastToRender:zt,isToastActive:X,count:ft==null?void 0:ft.length}}function At(ot){let[et,ct]=reactExports.useState(!1),[ut,dt]=reactExports.useState(!1),ft=reactExports.useRef(null),zt=reactExports.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:Dt,pauseOnHover:St,closeToast:Tt,onClick:Rt,closeOnClick:$t}=ot;xt({id:ot.toastId,containerId:ot.containerId,fn:ct}),reactExports.useEffect(()=>{if(ot.pauseOnFocusLoss)return kt(),()=>{Bt()}},[ot.pauseOnFocusLoss]);function kt(){document.hasFocus()||Yt(),window.addEventListener("focus",Kt),window.addEventListener("blur",Yt)}function Bt(){window.removeEventListener("focus",Kt),window.removeEventListener("blur",Yt)}function Ft(Zt){if(ot.draggable===!0||ot.draggable===Zt.pointerType){Ut();let o0=ft.current;zt.canCloseOnClick=!0,zt.canDrag=!0,o0.style.transition="none",ot.draggableDirection==="x"?(zt.start=Zt.clientX,zt.removalDistance=o0.offsetWidth*(ot.draggablePercent/100)):(zt.start=Zt.clientY,zt.removalDistance=o0.offsetHeight*(ot.draggablePercent===80?ot.draggablePercent*1.5:ot.draggablePercent)/100)}}function jt(Zt){let{top:o0,bottom:n0,left:r0,right:a0}=ft.current.getBoundingClientRect();Zt.nativeEvent.type!=="touchend"&&ot.pauseOnHover&&Zt.clientX>=r0&&Zt.clientX<=a0&&Zt.clientY>=o0&&Zt.clientY<=n0?Yt():Kt()}function Kt(){ct(!0)}function Yt(){ct(!1)}function Ut(){zt.didMove=!1,document.addEventListener("pointermove",Ht),document.addEventListener("pointerup",e0)}function Jt(){document.removeEventListener("pointermove",Ht),document.removeEventListener("pointerup",e0)}function Ht(Zt){let o0=ft.current;if(zt.canDrag&&o0){zt.didMove=!0,et&&Yt(),ot.draggableDirection==="x"?zt.delta=Zt.clientX-zt.start:zt.delta=Zt.clientY-zt.start,zt.start!==Zt.clientX&&(zt.canCloseOnClick=!1);let n0=ot.draggableDirection==="x"?`${zt.delta}px, var(--y)`:`0, calc(${zt.delta}px + var(--y))`;o0.style.transform=`translate3d(${n0},0)`,o0.style.opacity=`${1-Math.abs(zt.delta/zt.removalDistance)}`}}function e0(){Jt();let Zt=ft.current;if(zt.canDrag&&zt.didMove&&Zt){if(zt.canDrag=!1,Math.abs(zt.delta)>zt.removalDistance){dt(!0),ot.closeToast(!0),ot.collapseAll();return}Zt.style.transition="transform 0.2s, opacity 0.2s",Zt.style.removeProperty("transform"),Zt.style.removeProperty("opacity")}}let t0={onPointerDown:Ft,onPointerUp:jt};return Dt&&St&&(t0.onMouseEnter=Yt,ot.stacked||(t0.onMouseLeave=Kt)),$t&&(t0.onClick=Zt=>{Rt&&Rt(Zt),zt.canCloseOnClick&&Tt(!0)}),{playToast:Kt,pauseToast:Yt,isRunning:et,preventExitTransition:ut,toastRef:ft,eventHandlers:t0}}var Ot=typeof window<"u"?reactExports.useLayoutEffect:reactExports.useEffect,G=({theme:ot,type:et,isLoading:ct,...ut})=>React$1.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:ot==="colored"?"currentColor":`var(--toastify-icon-color-${et})`,...ut});function ao(ot){return React$1.createElement(G,{...ot},React$1.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))}function so(ot){return React$1.createElement(G,{...ot},React$1.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))}function no(ot){return React$1.createElement(G,{...ot},React$1.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))}function ro(ot){return React$1.createElement(G,{...ot},React$1.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))}function io(){return React$1.createElement("div",{className:"Toastify__spinner"})}var W={info:so,warning:ao,success:no,error:ro,spinner:io},lo=ot=>ot in W;function Nt({theme:ot,type:et,isLoading:ct,icon:ut}){let dt=null,ft={theme:ot,type:et};return ut===!1||(P(ut)?dt=ut({...ft,isLoading:ct}):reactExports.isValidElement(ut)?dt=reactExports.cloneElement(ut,ft):ct?dt=W.spinner():lo(et)&&(dt=W[et](ft))),dt}var wt=ot=>{let{isRunning:et,preventExitTransition:ct,toastRef:ut,eventHandlers:dt,playToast:ft}=At(ot),{closeButton:zt,children:Dt,autoClose:St,onClick:Tt,type:Rt,hideProgressBar:$t,closeToast:kt,transition:Bt,position:Ft,className:jt,style:Kt,progressClassName:Yt,updateId:Ut,role:Jt,progress:Ht,rtl:e0,toastId:t0,deleteToast:Zt,isIn:o0,isLoading:n0,closeOnClick:r0,theme:a0,ariaLabel:u0}=ot,b0=clsx("Toastify__toast",`Toastify__toast-theme--${a0}`,`Toastify__toast--${Rt}`,{"Toastify__toast--rtl":e0},{"Toastify__toast--close-on-click":r0}),T0=P(jt)?jt({rtl:e0,position:Ft,type:Rt,defaultClassName:b0}):clsx(b0,jt),O0=Nt(ot),E0=!!Ht||!St,H0={closeToast:kt,type:Rt,theme:a0},I0=null;return zt===!1||(P(zt)?I0=zt(H0):reactExports.isValidElement(zt)?I0=reactExports.cloneElement(zt,H0):I0=yt(H0)),React$1.createElement(Bt,{isIn:o0,done:Zt,position:Ft,preventExitTransition:ct,nodeRef:ut,playToast:ft},React$1.createElement("div",{id:t0,tabIndex:0,onClick:Tt,"data-in":o0,className:T0,...dt,style:Kt,ref:ut,...o0&&{role:Jt,"aria-label":u0}},O0!=null&&React$1.createElement("div",{className:clsx("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!n0})},O0),tt(Dt,ot,!et),I0,!ot.customProgressBar&&React$1.createElement(gt,{...Ut&&!E0?{key:`p-${Ut}`}:{},rtl:e0,theme:a0,delay:St,isRunning:et,isIn:o0,closeToast:kt,hide:$t,type:Rt,className:Yt,controlledProgress:E0,progress:Ht||0})))},K=(ot,et=!1)=>({enter:`Toastify--animate Toastify__${ot}-enter`,exit:`Toastify--animate Toastify__${ot}-exit`,appendPosition:et}),lt=$(K("bounce",!0)),mo=$(K("slide",!0)),_o={position:"top-right",transition:lt,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light","aria-label":"Notifications Alt+T",hotKeys:ot=>ot.altKey&&ot.code==="KeyT"};function Lt(ot){let et={..._o,...ot},ct=ot.stacked,[ut,dt]=reactExports.useState(!0),ft=reactExports.useRef(null),{getToastToRender:zt,isToastActive:Dt,count:St}=It(et),{className:Tt,style:Rt,rtl:$t,containerId:kt,hotKeys:Bt}=et;function Ft(Kt){let Yt=clsx("Toastify__toast-container",`Toastify__toast-container--${Kt}`,{"Toastify__toast-container--rtl":$t});return P(Tt)?Tt({position:Kt,rtl:$t,defaultClassName:Yt}):clsx(Yt,B(Tt))}function jt(){ct&&(dt(!0),y.play())}return Ot(()=>{var Kt;if(ct){let Yt=ft.current.querySelectorAll('[data-in="true"]'),Ut=12,Jt=(Kt=et.position)==null?void 0:Kt.includes("top"),Ht=0,e0=0;Array.from(Yt).reverse().forEach((t0,Zt)=>{let o0=t0;o0.classList.add("Toastify__toast--stacked"),Zt>0&&(o0.dataset.collapsed=`${ut}`),o0.dataset.pos||(o0.dataset.pos=Jt?"top":"bot");let n0=Ht*(ut?.2:1)+(ut?0:Ut*Zt);o0.style.setProperty("--y",`${Jt?n0:n0*-1}px`),o0.style.setProperty("--g",`${Ut}`),o0.style.setProperty("--s",`${1-(ut?e0:0)}`),Ht+=o0.offsetHeight,e0+=.025})}},[ut,St,ct]),reactExports.useEffect(()=>{function Kt(Yt){var Ut;let Jt=ft.current;Bt(Yt)&&((Ut=Jt.querySelector('[tabIndex="0"]'))==null||Ut.focus(),dt(!1),y.pause()),Yt.key==="Escape"&&(document.activeElement===Jt||Jt!=null&&Jt.contains(document.activeElement))&&(dt(!0),y.play())}return document.addEventListener("keydown",Kt),()=>{document.removeEventListener("keydown",Kt)}},[Bt]),React$1.createElement("section",{ref:ft,className:"Toastify",id:kt,onMouseEnter:()=>{ct&&(dt(!1),y.pause())},onMouseLeave:jt,"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions text","aria-label":et["aria-label"]},zt((Kt,Yt)=>{let Ut=Yt.length?{...Rt}:{...Rt,pointerEvents:"none"};return React$1.createElement("div",{tabIndex:-1,className:Ft(Kt),"data-stacked":ct,style:Ut,key:`c-${Kt}`},Yt.map(({content:Jt,props:Ht})=>React$1.createElement(wt,{...Ht,stacked:ct,collapseAll:jt,isIn:Dt(Ht.toastId,Ht.containerId),key:`t-${Ht.key}`},Jt)))}))}function ErrorToastContent(ot){const et=ot;return jsxRuntimeExports.jsxs("div",{style:{width:"100%",padding:0},children:[jsxRuntimeExports.jsx("p",{children:et.message}),et.error&&jsxRuntimeExports.jsx("pre",{style:{width:"100%",padding:0,overflow:"scroll",maxHeight:300},children:jsxRuntimeExports.jsx("code",{style:{padding:"16px"},children:et.error.message})})]})}function makeToastKernelCallbacks(ot){const{disableProgressToasts:et=!1,disableErrorToasts:ct=!1}={};let ut=null;const dt=[];return{onProgress:ft=>{if(et)return;const zt=y(ft,{position:"bottom-right",transition:mo,isLoading:!0,hideProgressBar:!0,closeButton:!1});dt.push(zt),ut&&y.update(ut,{isLoading:!1,autoClose:3e3}),ut=zt},onLoad:()=>{dt.forEach(ft=>y.dismiss(ft))},onError:ft=>{ct||y(jsxRuntimeExports.jsx(ErrorToastContent,{message:"Error during booting up",error:ft}),{position:"bottom-right",type:"error",autoClose:!1,closeOnClick:!1})}}}function isDarkTheme(){const ot=getDefaultTheme().name;return ot===AUTO_THEME_NAME?window.matchMedia("(prefers-color-scheme: dark)").matches:ot===darkTheme.name}function ToastContainer(){return jsxRuntimeExports.jsx(Lt,{style:{zIndex:999999},theme:isDarkTheme()?"dark":"light"})}const USE_NODEJS_WORKER=window.nodeJsWorkerAPI.USE_NODEJS_WORKER;class NodeJsWorkerMock{constructor(){this.onmessage=null,this.initializePromise=window.nodeJsWorkerAPI.initialize(),window.nodeJsWorkerAPI.onMessage(et=>{this.onmessage&&this.onmessage({data:et,ports:[]})})}postMessage(et,ct){this.initializePromise.then(()=>{const ut=ct?ct[0]:null,dt=ut&&(ft=>{ut.postMessage(ft)});window.nodeJsWorkerAPI.postMessage({data:et,onPortMessage:dt})})}terminate(){window.nodeJsWorkerAPI.terminate()}}let pyodideUrl;USE_NODEJS_WORKER||(pyodideUrl=window.location.href.split("/").slice(0,-1).join("/")+"/pyodide/pyodide.mjs");function App(){const[ot,et]=reactExports.useState();return reactExports.useEffect(()=>{let ct=!1,ut=null;return Promise.all([window.archivesAPI.readSitePackagesSnapshot(),window.archivesAPI.readPrebuiltPackageNames(),window.archivesAPI.readStreamlitAppDirectory()]).then(([dt,ft,zt])=>{if(ct)return;const Dt={};Object.keys(zt).forEach(St=>{const Tt=zt[St];Dt[St]={data:Tt}}),ut=new StliteKernel({entrypoint:window.appConfig.entrypoint,files:Dt,archives:[{buffer:dt,format:"gztar",options:{extractDir:"/"}}],requirements:[],prebuiltPackageNames:ft,pyodideUrl,wheelUrls:void 0,idbfsMountpoints:window.appConfig.idbfsMountpoints,worker:USE_NODEJS_WORKER?new NodeJsWorkerMock:void 0,...makeToastKernelCallbacks()}),et(ut)}),()=>{ct=!0,ut&&ut.dispose()}},[]),ot?jsxRuntimeExports.jsx(StreamlitApp,{kernel:ot}):null}ReactDOM.render(jsxRuntimeExports.jsxs(React$1.StrictMode,{children:[jsxRuntimeExports.jsx(App,{}),jsxRuntimeExports.jsx(ToastContainer,{})]}),document.getElementById("root"))})();export{isEqual$1 as $,toString$8 as A,isNullOrUndefined$1 as B,merge$6 as C,numbro$1 as D,EmotionIconBase as E,notNullOrUndefined as F,hooks as G,formatPeriodType as H,moment$1 as I,getTypeName as J,format as K,convertToSeconds as L,useTheme as M,Arrow$2 as N,logError as O,PortalContext as P,transparentize as Q,React$1 as R,convertRemToPx as S,logWarning as T,_defineProperty$u as U,_objectWithoutProperties$o as V,_typeof$g as W,jsx as X,css$2 as Y,_toConsumableArray$3 as Z,_extends$Q as _,__tla,range$1 as a,labelVisibilityProtoValueToEnum as a$,Popover$1 as a0,StyledTooltipContentWrapper as a1,StreamlitMarkdown$1 as a2,PLACEMENT as a3,ACCESSIBILITY_TYPE as a4,hasLightBackgroundColor as a5,LibContext as a6,debounce$4 as a7,Resizable as a8,IndexTypeName as a9,getAugmentedNamespace as aA,DEFAULT_IFRAME_FEATURE_POLICY as aB,DEFAULT_IFRAME_SANDBOX_POLICY as aC,useStliteMediaObjects as aD,darken as aE,BaseButtonSize as aF,BaseButtonKind as aG,BaseButtonTooltip as aH,DynamicButtonLabel as aI,IsSidebarContext as aJ,Placement as aK,getGray90 as aL,getIncreasingGreen as aM,getDecreasingRed as aN,PlotlyChart$1 as aO,keysToSnakeCase as aP,WindowDimensionsContext as aQ,Video$1 as aR,zip$1 as aS,FileUploaderState as aT,UploadedFileInfo as aU,StyledSpinner as aV,ENABLE_PERIPHERALS_DOCS_URL as aW,BaseButton as aX,Icon$2 as aY,blend as aZ,WidgetLabel as a_,_baseMerge as aa,_createAssigner as ab,getGray70 as ac,getGray30 as ad,getCategoricalColorsArray as ae,getDivergingColorsArray as af,getSequentialColorsArray as ag,getBlue80 as ah,Global as ai,ensureError as aj,withTheme as ak,DynamicIcon as al,toaster as am,AlertElement as an,Kind as ao,_assertThisInitialized$e as ap,ErrorElement as aq,StyledInlineCode as ar,axios as as,Skeleton as at,Skeleton$1 as au,hoistNonReactStatics$2 as av,lib$3 as aw,parseToRgba as ax,DeckGlJsonChart$1 as ay,_unsupportedIterableToArray$l as az,reactDomExports as b,TextInput$1 as b$,TooltipIcon as b0,Tooltip as b1,styled as b2,getOverrides as b3,LocaleContext as b4,ButtonGroup$1 as b5,LabelVisibilityMessage as b6,StyledWidgetLabelHelpInline as b7,useStliteKernel as b8,themeColors as b9,isPresetTheme as bA,classNames as bB,isValidFormId as bC,toPropertyKey as bD,_setPrototypeOf$e as bE,hexToRgb as bF,withWrapper as bG,StyledWidgetInstructions as bH,isFromMac as bI,SIZE$1 as bJ,CUSTOM_INPUT_TYPE as bK,DeleteAlt$1 as bL,ADJOINED as bM,filterOptions as bN,ENHANCER_POSITION as bO,UISelectbox as bP,pick$1 as bQ,Slider$2 as bR,isFromWindows as bS,__awaiter as bT,__generator as bU,__spread as bV,PropTypes as bW,ChevronLeft as bX,ChevronRight as bY,isInForm as bZ,toString_1 as b_,isMobile_1 as ba,CAMERA_PERMISSION_URL as bb,StyledWidgetLabelHelp as bc,isFocusVisible as bd,getOverride as be,getOverrideProps as bf,StyledCheckbox$1 as bg,Checkbox$1 as bh,StyledContent as bi,BaseColorPicker as bj,useStyletron as bk,mergeOverride as bl,toObjectOverride as bm,Icon$1 as bn,UIDConsumer as bo,StatefulMenu as bp,mergeOverrides as bq,ChevronDown$1 as br,ThemeContext as bs,forkFocus as bt,forkBlur as bu,Select as bv,without$1 as bw,fuzzyFilterSelectOptions as bx,TYPE as by,VirtualDropdown as bz,createStyled as c,ThemeProvider$1 as c0,createThemedStyled as c1,createThemedUseStyletron as c2,createThemedWithStyle as c3,expandBorderStyles as c4,withStyle as c5,reactIsExports$1 as c6,NumberInput$1 as c7,_hasPath as d,commonjsGlobal$1 as e,classnamesExports as f,getDefaultExportFromCjs$1 as g,_root as h,isPropValid as i,jsxRuntimeExports as j,keyframes as k,isObject_1 as l,_Set as m,_setToArray as n,_SetCache as o,propTypesExports as p,_arrayIncludes as q,reactExports as r,_arrayIncludesWith as s,toNumber_1 as t,useStliteMediaObjectUrl as u,_cacheHas as v,groupBy$1 as w,__vitePreload as x,flatten$2 as y,require$$0$2 as z};
510
+ }`,StyledCountdown=createStyled("div",{target:"e7qru6u0"})(({theme:ot})=>({position:"fixed",display:"flex",justifyContent:"center",alignItems:"center",top:0,left:0,width:ot.sizes.full,height:ot.sizes.full,fontSize:"40vh",color:ot.colors.red,fontWeight:ot.fontWeights.bold,opacity:"0.8",textShadow:`1px 1px 10px ${ot.colors.darkGray}`,transition:"opacity 0.3s ease-in-out",animation:`${screencastCounterAnimation} 1s`}),""),Countdown=({countdown:ot,endCallback:et})=>{const[ct,ut]=reactExports.useState(ot),dt=()=>{const ft=ct-1;ft>=0&&ut(ft),ft===0&&et()};return jsxRuntimeExports.jsx(StyledCountdown,{"data-testid":"stCountdown",onAnimationEnd:dt,children:jsxRuntimeExports.jsx("span",{children:ct})},`frame${ct}`)};function withScreencast(ot){const ct=class ct extends reactExports.PureComponent{constructor(){super(...arguments),this.state={fileName:"streamlit-screencast",recordAudio:!1,currentState:this.props.testOverride||"OFF"},this.toggleRecordAudio=()=>{const{recordAudio:dt}=this.state;this.setState({recordAudio:!dt})},this.showDialog=dt=>{const{currentState:ft}=this.state;ScreenCastRecorder.isSupportedBrowser()?ft==="OFF"?this.setState({fileName:dt,currentState:"SETUP"}):this.stopRecording().catch(zt=>logWarning(`withScreencast.stopRecording threw an error: ${zt}`)):this.setState({currentState:"UNSUPPORTED"})},this.startRecording=async()=>{const{recordAudio:dt}=this.state;this.recorder=new ScreenCastRecorder({recordAudio:dt,onErrorOrStop:()=>this.stopRecording()});try{await this.recorder.initialize()}catch{this.setState({currentState:"UNSUPPORTED"});return}this.setState({currentState:"COUNTDOWN"})},this.stopRecording=async()=>{let dt;const{currentState:ft}=this.state;ft==="OFF"||isNullOrUndefined$1(this.recorder)||(ft==="COUNTDOWN"&&this.setState({currentState:"OFF"}),ft==="RECORDING"&&(this.recorder.getState()==="inactive"?this.setState({currentState:"OFF"}):(dt=await this.recorder.stop(),this.setState({outputBlob:dt,currentState:"PREVIEW_FILE"}))))},this.onCountdownEnd=async()=>{if(isNullOrUndefined$1(this.recorder))throw new Error("Countdown finished but recorder is null");this.recorder.start()?this.setState({currentState:"RECORDING"}):this.stopRecording().catch(dt=>logWarning(`withScreencast.stopRecording threw an error: ${dt}`))},this.getScreenCastProps=()=>({currentState:this.state.currentState,toggleRecordAudio:this.toggleRecordAudio,startRecording:this.showDialog,stopRecording:this.stopRecording}),this.closeDialog=()=>{this.setState({currentState:"OFF"})},this.render=()=>{const{outputBlob:dt,fileName:ft,recordAudio:zt,currentState:Dt}=this.state;return jsxRuntimeExports.jsxs("div",{className:"withScreencast","data-testid":"stScreencast",children:[jsxRuntimeExports.jsx(ot,{...this.props,screenCast:this.getScreenCastProps()}),Dt==="UNSUPPORTED"&&jsxRuntimeExports.jsx(UnsupportedBrowserDialog$1,{onClose:this.closeDialog}),Dt==="SETUP"&&jsxRuntimeExports.jsx(ScreencastDialog,{recordAudio:zt,onClose:this.closeDialog,startRecording:this.startRecording,toggleRecordAudio:this.toggleRecordAudio}),Dt==="COUNTDOWN"&&jsxRuntimeExports.jsx(Countdown,{countdown:3,endCallback:this.onCountdownEnd}),Dt==="PREVIEW_FILE"&&dt&&jsxRuntimeExports.jsx(VideoRecordedDialog,{onClose:this.closeDialog,videoBlob:dt,fileName:ft})]})}}};ct.displayName=`withScreencast(${ot.displayName||ot.name})`;let et=ct;return hoistNonReactStatics$2(et,ot)}function getTitle(ot){return ot||"Streamlit"}class StrategyV1{constructor(et){this.appNav=et,this.appPages=[],this.currentPageScriptHash=null,this.hideSidebarNav=null}handleNewSession(et){var zt,Dt;this.appPages=et.appPages,this.currentPageScriptHash=et.pageScriptHash,this.hideSidebarNav=((zt=et.config)==null?void 0:zt.hideSidebarNav)??!1;const ct=this.appPages[0],ut=ct.urlPathname??"",dt=((Dt=this.appPages.find(St=>St.pageScriptHash===this.currentPageScriptHash))==null?void 0:Dt.urlPathname)??"",ft=ct.pageScriptHash===this.currentPageScriptHash;return this.appNav.onUpdatePageUrl(ut,dt,ft),document.title=getTitle(dt??""),[{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:ft?"":dt,currentPageScriptHash:this.currentPageScriptHash})}]}handlePagesChanged(et){const{appPages:ct}=et;return[{appPages:ct},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_APP_PAGES",appPages:ct})}]}handlePageNotFound(et){var dt;const{pageName:ct}=et;this.appNav.onPageNotFound(ct);const ut=((dt=this.appPages[0])==null?void 0:dt.pageScriptHash)??"";return this.currentPageScriptHash=ut,[{currentPageScriptHash:ut},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:"",currentPageScriptHash:ut})}]}handleNavigation(et){}findPageByUrlPath(et){return this.appPages.length===0?null:this.appPages.find(ct=>et.endsWith("/"+ct.urlPathname))??this.appPages[0]}clearPageElements(et,ct,ut){return AppRoot.empty(ct,!1,ut,et.logo)}}class StrategyV2{constructor(et){this.appNav=et,this.mainScriptHash=null,this.appPages=[],this.mainPage=null,this.hideSidebarNav=null}handleNewSession(et){var ct;return this.mainScriptHash=et.mainScriptHash,this.hideSidebarNav===null&&(this.hideSidebarNav=((ct=et.config)==null?void 0:ct.hideSidebarNav)??null),document.title=getTitle(""),[{hideSidebarNav:this.hideSidebarNav??!1},()=>{}]}handlePagesChanged(et){}handlePageNotFound(et){const{pageName:ct}=et;return this.appNav.onPageNotFound(ct),[{currentPageScriptHash:this.mainScriptHash??""},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:"",currentPageScriptHash:this.mainScriptHash??""})}]}handleNavigation(et){const{sections:ct,position:ut,appPages:dt}=et;this.appPages=dt,this.hideSidebarNav=ut===Navigation.Position.HIDDEN;const ft=et.pageScriptHash,zt=dt.find(Tt=>Tt.pageScriptHash===ft),Dt=dt.find(Tt=>Tt.isDefault);this.mainPage=Dt;const St=zt.urlPathname;if(!this.appNav.isPageTitleSet){const Tt=getTitle(zt.pageName);document.title=Tt,this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_PAGE_TITLE",title:zt.pageName??""})}return!this.appNav.isPageIconSet&&zt.icon&&this.appNav.onPageIconChange(zt.icon),this.appNav.onUpdatePageUrl(Dt.urlPathname??"",St,zt.isDefault??!1),[{appPages:dt,navSections:ct,hideSidebarNav:this.hideSidebarNav,expandSidebarNav:et.expanded,currentPageScriptHash:ft},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_APP_PAGES",appPages:dt}),this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:zt.isDefault?"":St,currentPageScriptHash:ft})}]}findPageByUrlPath(et){return this.appPages.find(ct=>et.endsWith("/"+ct.urlPathname))??this.mainPage}clearPageElements(et,ct,ut){return et.filterMainScriptElements(ct)}}class AppNavigation{constructor(et,ct,ut,dt){this.hostCommunicationMgr=et,this.onUpdatePageUrl=ct,this.onPageNotFound=ut,this.onPageIconChange=dt,this.isPageIconSet=!1,this.isPageTitleSet=!1,this.strategy=new StrategyV1(this)}handleNewSession(et){return this.isPageTitleSet=!1,this.isPageIconSet=!1,this.strategy.handleNewSession(et)}handleNavigation(et){return this.strategy instanceof StrategyV1&&(this.strategy=new StrategyV2(this)),this.strategy.handleNavigation(et)}handlePagesChanged(et){return this.strategy.handlePagesChanged(et)}handlePageNotFound(et){return this.strategy.handlePageNotFound(et)}findPageByUrlPath(et){return this.strategy.findPageByUrlPath(et)}handlePageConfigChanged(et){this.isPageIconSet=!!et.favicon,this.isPageTitleSet=!!et.title}clearPageElements(et,ct,ut){return this.strategy.clearPageElements(et,ct,ut)}}const ELEMENT_LIST_BUFFER_TIMEOUT_MS=10,INITIAL_SCRIPT_RUN_ID="<null>",showDevelopmentOptions=(ot,et)=>et==Config.ToolbarMode.DEVELOPER?!0:Config.ToolbarMode.VIEWER==et||Config.ToolbarMode.MINIMAL==et?!1:ot||isLocalhost();let App$1=(M1=class extends reactExports.PureComponent{constructor(et){super(et),this.sessionInfo=new SessionInfo,this.metricsMgr=new MetricsManager(this.sessionInfo),this.sessionEventDispatcher=new SessionEventDispatcher,this.embeddingId=generateUID$2(),this.showDeployError=(ut,dt,ft)=>{this.openDialog({type:DialogType.DEPLOY_ERROR,title:ut,msg:dt,onContinue:ft,onClose:()=>{},onTryAgain:this.sendLoadGitInfoBackMsg})},this.handleThemeMessage=(ut,dt)=>{const[,ft,zt]=createPresetThemes(),Dt=isPresetTheme(this.props.theme.activeTheme);ut===ft.name&&Dt?this.props.theme.setTheme(ft):ut===zt.name&&Dt?this.props.theme.setTheme(zt):dt&&this.props.theme.setImportedTheme(dt)},this.handleConnectionStateChanged=ut=>{if(logMessage(`Connection state changed from ${this.state.connectionState} to ${ut}`),ut===ConnectionState.CONNECTED){const dt=this.state.scriptRunState===ScriptRunState.RERUN_REQUESTED||this.state.scriptRunState===ScriptRunState.RUNNING;(!this.sessionInfo.last||dt)&&(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:ut!==ConnectionState.DISCONNECTED_FOREVER}),this.sessionInfo.isSet&&this.sessionInfo.clearCurrent();this.setState({connectionState:ut})},this.handleGitInfoChanged=ut=>{this.setState({gitInfo:ut})},this.handleCustomParentMessage=ut=>{this.state.appConfig.enableCustomParentMessages?this.hostCommunicationMgr.sendMessageToHost({type:"CUSTOM_PARENT_MESSAGE",message:ut.message}):logError("Sending messages to the host is disabled in line with the platform policy.")},this.handleMessage=ut=>{const dt=(ft,zt,Dt)=>{const St=ft[zt];if(St in Dt)return Dt[St](ft[St]);throw new Error(`Cannot handle ${zt} "${St}".`)};try{dt(ut,"type",{newSession:ft=>this.handleNewSession(ft),sessionStatusChanged:ft=>this.handleSessionStatusChanged(ft),sessionEvent:ft=>this.handleSessionEvent(ft),delta:ft=>this.handleDeltaMsg(ft,ut.metadata),pageConfigChanged:ft=>this.handlePageConfigChanged(ft),pageInfoChanged:ft=>this.handlePageInfoChanged(ft),pagesChanged:ft=>this.handlePagesChanged(ft),pageNotFound:ft=>this.handlePageNotFound(ft),gitInfoChanged:ft=>this.handleGitInfoChanged(ft),scriptFinished:ft=>this.handleScriptFinished(ft),pageProfile:ft=>this.handlePageProfileMsg(ft),autoRerun:ft=>this.handleAutoRerun(ft),fileUrlsResponse:ft=>this.uploadClient.onFileURLsResponse(ft),parentMessage:ft=>this.handleCustomParentMessage(ft),logo:ft=>this.handleLogo(ft,ut.metadata),navigation:ft=>this.handleNavigation(ft)})}catch(ft){const zt=ensureError(ft);logError(zt),this.showError("Bad message format",zt.message)}},this.handleLogo=(ut,dt)=>{const ft={activeScriptHash:dt.activeScriptHash,scriptRunId:this.state.scriptRunId};this.setState({elements:this.pendingElementsBuffer.appRootWithLogo(ut,ft)},()=>{this.pendingElementsBuffer=this.state.elements})},this.handlePageConfigChanged=ut=>{const{title:dt,favicon:ft,layout:zt,initialSidebarState:Dt,menuItems:St}=ut;this.appNavigation.handlePageConfigChanged(ut),dt&&(this.hostCommunicationMgr.sendMessageToHost({type:"SET_PAGE_TITLE",title:dt}),document.title=dt),ft&&this.onPageIconChanged(ft),zt!==this.state.layout&&this.setState(Tt=>({layout:zt,userSettings:{...Tt.userSettings,wideMode:zt===PageConfig.Layout.WIDE}})),Dt!==this.state.initialSidebarState&&this.setState(()=>({initialSidebarState:Dt})),this.setState({menuItems:St})},this.handlePageInfoChanged=ut=>{const{queryString:dt}=ut,ft=document.location.pathname+(dt?`?${dt}`:"");window.history.pushState({},"",ft),this.hostCommunicationMgr.sendMessageToHost({type:"SET_QUERY_PARAM",queryParams:dt?`?${dt}`:""})},this.onPageNotFound=ut=>{const dt=ut?`You have requested page /${ut}, 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",`${dt}. Running the app's main page.`)},this.handlePageNotFound=ut=>{this.maybeSetState(this.appNavigation.handlePageNotFound(ut))},this.onPageIconChanged=ut=>{handleFavicon(ut,this.hostCommunicationMgr.sendMessageToHost,this.endpoints)},this.handlePagesChanged=ut=>{this.maybeSetState(this.appNavigation.handlePagesChanged(ut))},this.handleNavigation=ut=>{this.maybeSetState(this.appNavigation.handleNavigation(ut))},this.handlePageProfileMsg=ut=>{var zt,Dt,St;const dt=PageProfile.toObject(ut),ft=getBrowserInfo();this.metricsMgr.enqueue("pageProfile",{...dt,isFragmentRun:!!dt.isFragmentRun,appId:this.sessionInfo.current.appId,numPages:(zt=this.state.appPages)==null?void 0:zt.length,sessionId:this.sessionInfo.current.sessionId,pythonVersion:this.sessionInfo.current.pythonVersion,pageScriptHash:this.state.currentPageScriptHash,activeTheme:(St=(Dt=this.props.theme)==null?void 0:Dt.activeTheme)==null?void 0:St.name,totalLoadTime:Math.round((performance.now()-this.state.latestRunTime)*1e3),browserInfo:ft})},this.handleAutoRerun=ut=>{const dt=setInterval(()=>{this.widgetMgr.sendUpdateWidgetsMessage(ut.fragmentId,!0)},ut.interval*1e3);this.setState(ft=>({autoReruns:[...ft.autoReruns,dt]}))},this.handleSessionStatusChanged=ut=>{this.setState(dt=>{let{scriptRunState:ft}=dt,{dialog:zt}=dt;return ut.scriptIsRunning&&dt.scriptRunState!==ScriptRunState.STOP_REQUESTED?(ft=ScriptRunState.RUNNING,notNullOrUndefined(zt)&&zt.type===DialogType.SCRIPT_COMPILE_ERROR&&(zt=void 0)):!ut.scriptIsRunning&&dt.scriptRunState!==ScriptRunState.RERUN_REQUESTED&&dt.scriptRunState!==ScriptRunState.COMPILATION_ERROR&&(ft=ScriptRunState.NOT_RUNNING),{userSettings:{...dt.userSettings,runOnSave:!!ut.runOnSave},dialog:zt,scriptRunState:ft}})},this.handleSessionEvent=ut=>{if(this.sessionEventDispatcher.handleSessionEventMsg(ut),ut.type==="scriptCompilationException"){this.setState({scriptRunState:ScriptRunState.COMPILATION_ERROR});const dt={type:DialogType.SCRIPT_COMPILE_ERROR,exception:ut.scriptCompilationException,onClose:()=>{}};this.openDialog(dt)}},this.maybeUpdatePageUrl=(ut,dt,ft)=>{const zt=this.getBaseUriParts();if(zt){const{basePath:Dt}=zt,St=extractPageNameFromPathName(document.location.pathname,Dt);if((St===""?ut:St)!==dt){const Tt=ft?"":dt,Rt=preserveEmbedQueryParams(),$t=Rt?`?${Rt}`:"",kt=`${Dt?`/${Dt}`:""}/${Tt}${$t}`,Bt=kt.endsWith("/")&&kt!=="/"?kt.slice(0,-1):kt;window.history.pushState({},"",Bt)}}},this.handleNewSession=ut=>{const dt=ut.initialize;if(this.hasStreamlitVersionChanged(dt)){window.location.reload();return}this.sessionInfo.isSet||this.handleOneTimeInitialization(ut);const{appHash:ft,currentPageScriptHash:zt}=this.state,{scriptRunId:Dt,name:St,mainScriptPath:Tt,fragmentIdsThisRun:Rt,pageScriptHash:$t,mainScriptHash:kt}=ut;if(Rt.length)this.setState({fragmentIdsThisRun:Rt,latestRunTime:performance.now()});else{this.cleanupAutoReruns();const Ft=ut.config,jt=ut.customTheme;this.processThemeInput(jt),this.setState({allowRunOnSave:Ft.allowRunOnSave,hideTopBar:Ft.hideTopBar,toolbarMode:Ft.toolbarMode,latestRunTime:performance.now(),mainScriptHash:kt,fragmentIdsThisRun:Rt}),this.maybeSetState(this.appNavigation.handleNewSession(ut)),this.onPageIconChanged("/favicon.png")}const Bt=hashString(this.sessionInfo.current.installationId+Tt);this.metricsMgr.setMetadata(this.state.deployedAppMetadata),this.metricsMgr.setAppHash(Bt),this.metricsMgr.enqueue("updateReport"),ft===Bt&&zt===$t?this.setState({scriptRunId:Dt}):this.clearAppState(Bt,Dt,St,kt)},this.handleOneTimeInitialization=ut=>{const dt=ut.initialize,ft=ut.config;this.sessionInfo.setCurrent(SessionInfo.propsFromNewSessionMessage(ut)),this.metricsMgr.initialize({gatherUsageStats:ft.gatherUsageStats,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost}),this.handleSessionStatusChanged(dt.sessionStatus)},this.onHistoryChange=()=>{const{currentPageScriptHash:ut}=this.state,dt=this.appNavigation.findPageByUrlPath(document.location.pathname),ft=document.location.toString().includes("#"),zt=(dt==null?void 0:dt.pageScriptHash)===ut;isNullOrUndefined$1(dt)||ft&&zt||this.onPageChange(dt.pageScriptHash)},this.setAndSendTheme=ut=>{this.props.theme.setTheme(ut),this.hostCommunicationMgr.sendMessageToHost({type:"SET_THEME_CONFIG",themeInfo:toExportedTheme(ut.emotion)})},this.createThemeHash=ut=>{if(!ut)return"hash_for_undefined_custom_theme";const dt=Object.entries(ut);return dt.sort(),hashString(dt.join(":"))},this.closeDialog=()=>{this.setState({dialog:void 0})},this.saveSettings=ut=>{const{runOnSave:dt}=this.state.userSettings,{runOnSave:ft}=ut;if(this.setState({userSettings:ut}),dt!==ft&&this.isServerConnected()){const zt=new BackMsg({setRunOnSave:ft});zt.type="setRunOnSave",this.sendBackMsg(zt)}},this.handleDeltaMsg=(ut,dt)=>{if(this.pendingElementsBuffer=this.pendingElementsBuffer.applyDelta(this.state.scriptRunId,ut,dt),!this.pendingElementsTimerRunning){this.pendingElementsTimerRunning=!0;const ft=this.state.scriptRunState===ScriptRunState.RUNNING;setTimeout(()=>{this.pendingElementsTimerRunning=!1,ft&&this.setState({elements:this.pendingElementsBuffer})},ELEMENT_LIST_BUFFER_TIMEOUT_MS)}},this.debugShutdownRuntime=()=>{if(this.isServerConnected()){const ut=new BackMsg({debugShutdownRuntime:!0});ut.type="debugShutdownRuntime",this.sendBackMsg(ut)}},this.debugDisconnectWebsocket=()=>{if(this.isServerConnected()){const ut=new BackMsg({debugDisconnectWebsocket:!0});ut.type="debugDisconnectWebsocket",this.sendBackMsg(ut)}},this.debugClearForwardMsgCache=()=>{var ut,dt;isLocalhost()&&((dt=(ut=this.connectionManager)==null?void 0:ut.connection)==null||dt.cache.messages.clear())},this.cleanupAutoReruns=()=>{this.state.autoReruns.forEach(ut=>{clearInterval(ut)}),this.setState({autoReruns:[]})},this.rerunScript=(ut=!1)=>{if(this.closeDialog(),!this.isServerConnected()){logError("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}),ut===!0&&this.saveSettings({...this.state.userSettings,runOnSave:!0}),this.widgetMgr.sendUpdateWidgetsMessage(void 0))},this.sendLoadGitInfoBackMsg=()=>{if(!this.isServerConnected()){logError("Cannot load git information when disconnected from server.");return}this.sendBackMsg(new BackMsg({loadGitInfo:!0}))},this.onPageChange=ut=>{const{elements:dt,mainScriptHash:ft}=this.state;this.cleanupAutoReruns();const zt=this.appNavigation.clearPageElements(dt,ft,void 0),Dt=new Set(Array.from(zt.getElements()).map(St=>getElementId(St)).filter(notUndefined));this.sendRerunBackMsg(this.widgetMgr.getActiveWidgetStates(Dt),void 0,ut)},this.isAppInReadyState=ut=>this.state.connectionState===ConnectionState.CONNECTED&&this.state.scriptRunState===ScriptRunState.NOT_RUNNING&&ut.scriptRunState===ScriptRunState.RUNNING&&ut.connectionState===ConnectionState.CONNECTED,this.sendRerunBackMsg=(ut,dt,ft,zt)=>{const Dt=this.getBaseUriParts();if(!Dt){logError("Cannot send rerun backMessage when disconnected from server.");return}const{currentPageScriptHash:St}=this.state,{basePath:Tt}=Dt;let Rt=this.getQueryString(),$t="";ft?ft!=St&&(Rt=preserveEmbedQueryParams(),this.hostCommunicationMgr.sendMessageToHost({type:"SET_QUERY_PARAM",queryParams:Rt})):St?ft=St:($t=extractPageNameFromPathName(document.location.pathname,Tt),ft=""),this.sendBackMsg(new BackMsg({rerunScript:{queryString:Rt,widgetStates:ut,pageScriptHash:ft,pageName:$t,fragmentId:dt,isAutoRerun:zt}})),PerformanceEvents.record({name:"RequestedRerun",scriptRunState:this.state.scriptRunState})},this.stopScript=()=>{if(!this.isServerConnected()){logError("Cannot stop app when disconnected from server.");return}if(this.state.scriptRunState===ScriptRunState.NOT_RUNNING||this.state.scriptRunState===ScriptRunState.STOP_REQUESTED)return;const ut=new BackMsg({stopScript:!0});ut.type="stopScript",this.sendBackMsg(ut),this.setState({scriptRunState:ScriptRunState.STOP_REQUESTED})},this.openClearCacheDialog=()=>{if(this.isServerConnected()){const ut={type:DialogType.CLEAR_CACHE,confirmCallback:this.clearCache,defaultAction:this.clearCache,onClose:()=>{}};this.openDialog(ut)}else logError("Cannot clear cache: disconnected from server")},this.openDeployDialog=()=>{var dt;const ut={type:DialogType.DEPLOY_DIALOG,onClose:this.closeDialog,showDeployError:this.showDeployError,isDeployErrorModalOpen:((dt=this.state.dialog)==null?void 0:dt.type)===DialogType.DEPLOY_ERROR,metricsMgr:this.metricsMgr};this.openDialog(ut)},this.openThemeCreatorDialog=()=>{this.metricsMgr.enqueue("menuClick",{label:"editTheme"});const ut={type:DialogType.THEME_CREATOR,backToSettings:this.settingsCallback,onClose:this.closeDialog,metricsMgr:this.metricsMgr};this.openDialog(ut)},this.clearCache=()=>{if(this.closeDialog(),this.isServerConnected()){const ut=new BackMsg({clearCache:!0});ut.type="clearCache",this.sendBackMsg(ut)}else logError("Cannot clear cache: disconnected from server")},this.sendAppHeartbeat=()=>{if(this.isServerConnected()){const ut=new BackMsg({appHeartbeat:!0});ut.type="appHeartbeat",this.sendBackMsg(ut)}else logError("Cannot send app heartbeat: disconnected from server")},this.sendBackMsg=ut=>{this.connectionManager?this.connectionManager.sendMessage(ut):logError(`Not connected. Cannot send back message: ${ut}`)},this.handleConnectionError=ut=>{this.showError("Connection error",ut)},this.isServerConnected=()=>this.connectionManager?this.connectionManager.isConnected():!1,this.settingsCallback=(ut=!0)=>{const dt={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:ut,metricsMgr:this.metricsMgr};this.openDialog(dt)},this.aboutCallback=()=>{const{menuItems:ut}=this.state,dt={type:DialogType.ABOUT,sessionInfo:this.sessionInfo,onClose:this.closeDialog,aboutSectionMd:ut==null?void 0:ut.aboutSectionMd};this.openDialog(dt)},this.printCallback=()=>{const{scriptRunState:ut}=this.state;if(ut!==ScriptRunState.NOT_RUNNING){setTimeout(this.printCallback,500);return}let dt;try{const ft=getIFrameEnclosingApp(this.embeddingId);ft&&ft.contentWindow?dt=ft.contentWindow.window:dt=window}catch{dt=window}finally{dt||(dt=window),dt.print()}},this.screencastCallback=()=>{const{scriptName:ut}=this.state,{startRecording:dt}=this.props.screenCast,ft=hooks().format("YYYY-MM-DD-HH-MM-SS");dt(`streamlit-${ut}-${ft}`)},this.handleFullScreen=ut=>{this.setState({isFullScreen:ut})},this.setLibConfig=ut=>{this.setState({libConfig:ut})},this.setAppConfig=ut=>{this.setState({appConfig:ut})},this.addScriptFinishedHandler=ut=>{this.setState((dt,ft)=>({scriptFinishedHandlers:dt.scriptFinishedHandlers.concat(ut)}))},this.removeScriptFinishedHandler=ut=>{this.setState((dt,ft)=>({scriptFinishedHandlers:without$1(dt.scriptFinishedHandlers,ut)}))},this.getBaseUriParts=()=>this.connectionManager?this.connectionManager.getBaseUriParts():void 0,this.getQueryString=()=>{const{queryParams:ut}=this.state,dt=ut&&ut.length>0?ut:document.location.search;return dt.startsWith("?")?dt.substring(1):dt},this.isInCloudEnvironment=()=>{const{hostMenuItems:ut}=this.state;return ut&&(ut==null?void 0:ut.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=(ut,dt)=>{if(this.isServerConnected()){const ft=new BackMsg({fileUrlsRequest:{requestId:ut,fileNames:dt.map(zt=>zt.name),sessionId:this.sessionInfo.current.sessionId}});ft.type="fileUrlsRequest",this.sendBackMsg(ft)}},this.handleKeyDown=ut=>{switch(ut){case"c":showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode)&&this.openClearCacheDialog();break;case"r":this.rerunScript();break}},this.handleKeyUp=ut=>{ut==="esc"&&this.props.screenCast.stopRecording()},J$2();let ct=this.createThemeHash();isPresetTheme(et.theme.activeTheme)||(ct=this.createThemeHash(toThemeInput(et.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:ct,gitInfo:null,formsData:createFormsData(),appPages:[],navSections:[],currentPageScriptHash:"",mainScriptHash:"",hideTopBar:!0,hideSidebarNav:!0,expandSidebarNav:!1,toolbarMode:Config.ToolbarMode.MINIMAL,latestRunTime:performance.now(),fragmentIdsThisRun:[],isOwner:!1,hostMenuItems:[],hostToolbarItems:[],hostHideSidebarNav:!1,sidebarChevronDownshift:0,pageLinkBaseUrl:"",queryParams:"",deployedAppMetadata:{},libConfig:{},appConfig:{},autoReruns:[],inputsDisabled:!1},this.connectionManager=null,this.widgetMgr=new WidgetStateManager({sendRerunBackMsg:this.sendRerunBackMsg,formsDataChanged:ut=>this.setState({formsData:ut})}),this.hostCommunicationMgr=new HostCommunicationManager({streamlitExecutionStartedAt:et.streamlitExecutionStartedAt,sendRerunBackMsg:this.sendRerunBackMsg,closeModal:this.closeDialog,stopScript:this.stopScript,rerunScript:this.rerunScript,clearCache:this.clearCache,sendAppHeartbeat:this.sendAppHeartbeat,setInputsDisabled:ut=>{this.setState({inputsDisabled:ut})},themeChanged:this.handleThemeMessage,pageChanged:this.onPageChange,isOwnerChanged:ut=>this.setState({isOwner:ut}),jwtHeaderChanged:({jwtHeaderName:ut,jwtHeaderValue:dt})=>{this.endpoints.setJWTHeader!==void 0&&this.state.appConfig.useExternalAuthToken&&this.endpoints.setJWTHeader({jwtHeaderName:ut,jwtHeaderValue:dt})},fileUploadClientConfigChanged:ut=>{this.endpoints.setFileUploadClientConfig!==void 0&&this.endpoints.setFileUploadClientConfig(ut)},hostMenuItemsChanged:ut=>{this.setState({hostMenuItems:ut})},hostToolbarItemsChanged:ut=>{this.setState({hostToolbarItems:ut})},hostHideSidebarNavChanged:ut=>{this.setState({hostHideSidebarNav:ut})},sidebarChevronDownshiftChanged:ut=>{this.setState({sidebarChevronDownshift:ut})},pageLinkBaseUrlChanged:ut=>{this.setState({pageLinkBaseUrl:ut})},queryParamsChanged:ut=>{this.setState({queryParams:ut})},deployedAppMetadataChanged:ut=>{this.setState({deployedAppMetadata:ut})},restartWebsocketConnection:()=>{this.connectionManager||this.initializeConnectionManager()},terminateWebsocketConnection:()=>{var ut;(ut=this.connectionManager)==null||ut.disconnect(),this.connectionManager=null}}),this.endpoints=new DefaultStreamlitEndpoints({getServerUri:this.getBaseUriParts,csrfEnabled:!0}),this.uploadClient=new FileUploadClient({sessionInfo:this.sessionInfo,endpoints:this.endpoints,formsWithPendingRequestsChanged:ut=>this.widgetMgr.setFormsWithUploadsInProgress(ut),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(){var ct;const et=(ct=this.context)==null?void 0:ct.kernel;if(et==null)throw new Error("Kernel is not set in the context.");this.connectionManager=new ConnectionManager({kernel:et,sessionInfo:this.sessionInfo,endpoints:this.endpoints,onMessage:this.handleMessage,onConnectionError:this.handleConnectionError,connectionStateChanged:this.handleConnectionStateChanged,claimHostAuthToken:this.hostCommunicationMgr.claimAuthToken,resetHostAuthToken:this.hostCommunicationMgr.resetAuthToken,onHostConfigResp:ut=>{const{allowedOrigins:dt,useExternalAuthToken:ft,disableFullscreenMode:zt,enableCustomParentMessages:Dt,mapboxToken:St,enforceDownloadInNewTab:Tt,metricsUrl:Rt}=ut,$t={allowedOrigins:dt,useExternalAuthToken:ft,enableCustomParentMessages:Dt},kt={mapboxToken:St,disableFullscreenMode:zt,enforceDownloadInNewTab:Tt};this.metricsMgr.setMetricsConfig(Rt),this.hostCommunicationMgr.setAllowedOrigins($t),this.setAppConfig($t),this.setLibConfig(kt)}})}componentDidMount(){var ct;const et=(ct=this.context)==null?void 0:ct.kernel;if(et==null)throw new Error("Kernel is not set in the context.");this.initializeConnectionManager(),this.hostCommunicationMgr.sendMessageToHost({type:"SCRIPT_RUN_STATE_CHANGED",scriptRunState:this.state.scriptRunState}),this.uploadClient.setKernel(et),isScrollingHidden()&&document.body.classList.add("embedded"),isInChildFrame()&&(window.iFrameResizer={heightCalculationMethod:()=>{const ut=document.querySelectorAll("[data-iframe-height]"),dt=Array.from(ut).map(ft=>Math.ceil(ft.getBoundingClientRect().bottom));return Math.max(0,...dt)}},__vitePreload(()=>import("./iframeResizer.contentWindow-9-Xlr32c.js").then(ut=>ut.i),[])),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(et,ct){window.prerenderReady===!1&&this.isAppInReadyState(ct)&&(window.prerenderReady=!0),this.state.scriptRunState!==ct.scriptRunState&&this.hostCommunicationMgr.sendMessageToHost({type:"SCRIPT_RUN_STATE_CHANGED",scriptRunState:this.state.scriptRunState})}componentWillUnmount(){var et;(et=this.connectionManager)==null||et.disconnect(),this.hostCommunicationMgr.closeHostCommunication(),window.removeEventListener("popstate",this.onHistoryChange,!1)}showError(et,ct){logError(ct);const ut={type:DialogType.WARNING,title:et,msg:ct,onClose:()=>{}};this.openDialog(ut)}hasStreamlitVersionChanged(et){if(this.sessionInfo.isSet){const ct=this.sessionInfo.current.streamlitVersion,{environmentInfo:ut}=et;if(notNullOrUndefined(ut)&&notNullOrUndefined(ut.streamlitVersion))return ct!=ut.streamlitVersion}return!1}maybeSetState(et){if(et){const[ct,ut]=et;this.setState(ct,ut)}}processThemeInput(et){const ct=this.createThemeHash(et);if(ct===this.state.themeHash)return;this.setState({themeHash:ct});const ut=!isPresetTheme(this.props.theme.activeTheme);if(et){const dt=createTheme(CUSTOM_THEME_NAME,et);this.props.theme.addThemes([dt]),(getCachedTheme()===null||ut)&&this.setAndSendTheme(dt)}else this.props.theme.addThemes([]),ut&&this.setAndSendTheme(getHostSpecifiedTheme())}handleScriptFinished(et){if(et===ForwardMsg.ScriptFinishedStatus.FINISHED_SUCCESSFULLY||et===ForwardMsg.ScriptFinishedStatus.FINISHED_EARLY_FOR_RERUN||et===ForwardMsg.ScriptFinishedStatus.FINISHED_FRAGMENT_RUN_SUCCESSFULLY){if(window.setTimeout(()=>{this.state.scriptFinishedHandlers.map(ct=>ct())},0),et===ForwardMsg.ScriptFinishedStatus.FINISHED_SUCCESSFULLY||et===ForwardMsg.ScriptFinishedStatus.FINISHED_FRAGMENT_RUN_SUCCESSFULLY){this.setState(({scriptRunId:ut,fragmentIdsThisRun:dt})=>({elements:this.pendingElementsBuffer.clearStaleNodes(ut,dt)}),()=>{this.pendingElementsBuffer=this.state.elements});const ct=new Set(Array.from(this.state.elements.getElements()).map(ut=>getElementId(ut)).filter(notUndefined));this.widgetMgr.removeInactive(ct)}this.connectionManager!==null&&et!==ForwardMsg.ScriptFinishedStatus.FINISHED_EARLY_FOR_RERUN&&this.sessionInfo.isSet&&this.connectionManager.incrementMessageCacheRunCount(this.sessionInfo.current.maxCachedMessageAge)}}clearAppState(et,ct,ut,dt){const{hideSidebarNav:ft,elements:zt}=this.state,Dt=ft&&zt.sidebar||void 0;this.setState({scriptRunId:ct,scriptName:ut,appHash:et,elements:this.appNavigation.clearPageElements(this.pendingElementsBuffer,dt,Dt)},()=>{this.pendingElementsBuffer=this.state.elements;const St=new Set(Array.from(this.state.elements.getElements()).map(Tt=>getElementId(Tt)).filter(notUndefined));this.widgetMgr.removeInactive(St)})}openDialog(et){this.setState({dialog:et})}render(){const{allowRunOnSave:et,connectionState:ct,dialog:ut,elements:dt,initialSidebarState:ft,menuItems:zt,isFullScreen:Dt,scriptRunId:St,scriptRunState:Tt,userSettings:Rt,hideTopBar:$t,hideSidebarNav:kt,expandSidebarNav:Bt,currentPageScriptHash:Ft,hostHideSidebarNav:jt,pageLinkBaseUrl:Kt,sidebarChevronDownshift:Yt,hostMenuItems:Ut,hostToolbarItems:Jt,libConfig:Ht,appConfig:e0,inputsDisabled:t0,appPages:Zt,navSections:o0}=this.state,n0=showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode),r0=classNames("stApp",getEmbeddingIdClassName(this.embeddingId),{"streamlit-embedded":isEmbed(),"streamlit-wide":Rt.wideMode}),a0=ut?StreamlitDialog({...ut,onClose:this.closeDialog}):null,u0=t0||ct!==ConnectionState.CONNECTED;return jsxRuntimeExports.jsx(AppContext.Provider,{value:{initialSidebarState:ft,wideMode:Rt.wideMode,embedded:isEmbed(),showPadding:!isEmbed()||isPaddingDisplayed(),disableScrolling:isScrollingHidden(),showToolbar:!isEmbed()||isToolbarDisplayed(),showColoredLine:!isEmbed()||isColoredLineDisplayed(),pageLinkBaseUrl:Kt,sidebarChevronDownshift:Yt,gitInfo:this.state.gitInfo,appConfig:e0},children:jsxRuntimeExports.jsx(LibContext.Provider,{value:{isFullScreen:Dt,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:Ft,libConfig:Ht,fragmentIdsThisRun:this.state.fragmentIdsThisRun,locale:window.navigator.language},children:jsxRuntimeExports.jsx(ReactHotkeys,{keyName:"r,c,esc",onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,children:jsxRuntimeExports.jsxs(StyledApp,{className:r0,"data-testid":"stApp","data-test-script-state":St==INITIAL_SCRIPT_RUN_ID?"initial":Tt,"data-test-connection-state":ct,children:[jsxRuntimeExports.jsxs(Header,{children:[!$t&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(StatusWidget,{connectionState:ct,sessionEventDispatcher:this.sessionEventDispatcher,scriptRunState:Tt,rerunScript:this.rerunScript,stopScript:this.stopScript,allowRunOnSave:et}),jsxRuntimeExports.jsx(ToolbarActions,{hostToolbarItems:Jt,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,metricsMgr:this.metricsMgr})]}),this.showDeployButton()&&jsxRuntimeExports.jsx(DeployButton,{onClick:this.deployButtonClicked.bind(this)}),jsxRuntimeExports.jsx(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:Ut,developmentMode:n0,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,menuItems:zt,metricsMgr:this.metricsMgr,toolbarMode:this.state.toolbarMode})]}),jsxRuntimeExports.jsx(AppView,{endpoints:this.endpoints,sessionInfo:this.sessionInfo,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,elements:dt,scriptRunId:St,scriptRunState:Tt,widgetMgr:this.widgetMgr,widgetsDisabled:u0,uploadClient:this.uploadClient,componentRegistry:this.componentRegistry,formsData:this.state.formsData,appLogo:dt.logo,appPages:Zt,navSections:o0,onPageChange:this.onPageChange,currentPageScriptHash:Ft,hideSidebarNav:kt||jt,expandSidebarNav:Bt}),a0]})})})})}},M1.contextType=StliteKernelContext,M1);const AppWithScreencast=withScreencast(App$1);function useThemeManager(){const ot=getDefaultTheme(),[et,ct]=reactExports.useState(ot),[ut,dt]=reactExports.useState([]),[ft,zt]=reactExports.useState([...createPresetThemes(),...isPresetTheme(ot)?[]:[ot]]),Dt=$t=>{zt([...createPresetThemes(),...$t])},St=reactExports.useCallback($t=>{$t!==et&&(ct($t),$t.name===AUTO_THEME_NAME?removeCachedTheme():setCachedTheme($t))},[ct,et]),Tt=reactExports.useCallback(()=>{et.name===AUTO_THEME_NAME&&St(getHostSpecifiedTheme());const $t=ft.filter(kt=>kt.name!==AUTO_THEME_NAME);zt([createAutoTheme(),...$t])},[et.name,ft,St]),Rt=reactExports.useCallback($t=>{$t.fontFaces&&dt($t.fontFaces);const kt=new CustomThemeConfig($t),Bt=createTheme(CUSTOM_THEME_NAME,kt);St(Bt)},[dt,St]);return reactExports.useEffect(()=>{const $t=window.matchMedia("(prefers-color-scheme: dark)");return $t.addEventListener("change",Tt),window.addEventListener("afterprint",Tt),()=>{window.removeEventListener("afterprint",Tt),$t.removeEventListener("change",Tt)}},[et,ft,Tt]),[{setTheme:St,activeTheme:et,addThemes:Dt,availableThemes:ft,setImportedTheme:Rt},ut]}const ThemedApp=({streamlitExecutionStartedAt:ot})=>{const[et,ct]=useThemeManager(),{activeTheme:ut}=et,dt=ut.name===CUSTOM_THEME_NAME&&ct.length>0;return jsxRuntimeExports.jsx(RootStyleProvider,{theme:ut,children:jsxRuntimeExports.jsx(WindowDimensionsProvider,{children:jsxRuntimeExports.jsxs(PortalProvider,{children:[dt&&jsxRuntimeExports.jsx(FontFaceDeclaration,{fontFaces:ct}),jsxRuntimeExports.jsx(AppWithScreencast,{theme:et,streamlitExecutionStartedAt:ot})]})})})};class SequentialIDGenerator{constructor(et=""){this.prefix=et,this.count=0,this.offset=374,this.msb=1295,this.power=2}next(){const et=this.increment().toString(36);return this.prefix?`${this.prefix}${et}`:et}increment(){const et=this.count+this.offset;return et===this.msb&&(this.offset+=(this.msb+1)*9,this.msb=Math.pow(36,++this.power)-1),this.count++,et}}const minMaxWidth=/(!?\(\s*min(-device-)?-width).+\(\s*max(-device)?-width/i,minWidth=/\(\s*min(-device)?-width/i,maxMinWidth=/(!?\(\s*max(-device)?-width).+\(\s*min(-device)?-width/i,maxWidth=/\(\s*max(-device)?-width/i,isMinWidth=_testQuery(minMaxWidth,maxMinWidth,minWidth),isMaxWidth=_testQuery(maxMinWidth,minMaxWidth,maxWidth),minMaxHeight=/(!?\(\s*min(-device)?-height).+\(\s*max(-device)?-height/i,minHeight=/\(\s*min(-device)?-height/i,maxMinHeight=/(!?\(\s*max(-device)?-height).+\(\s*min(-device)?-height/i,maxHeight=/\(\s*max(-device)?-height/i,isMinHeight=_testQuery(minMaxHeight,maxMinHeight,minHeight),isMaxHeight=_testQuery(maxMinHeight,minMaxHeight,maxHeight),isPrint=/print/i,isPrintOnly=/^print$/i,maxValue=Number.MAX_VALUE;function _getQueryLength(ot){const et=/(-?\d*\.?\d+)(ch|em|ex|px|rem)/.exec(ot);if(et===null)return maxValue;let ct=et[1];switch(et[2]){case"ch":ct=parseFloat(ct)*8.8984375;break;case"em":case"rem":ct=parseFloat(ct)*16;break;case"ex":ct=parseFloat(ct)*8.296875;break;case"px":ct=parseFloat(ct);break}return+ct}function _testQuery(ot,et,ct){return function(ut){return ot.test(ut)?!0:et.test(ut)?!1:ct.test(ut)}}function _testIsPrint(ot,et){const ct=isPrint.test(ot),ut=isPrintOnly.test(ot),dt=isPrint.test(et),ft=isPrintOnly.test(et);return ct&&dt?!ut&&ft?1:ut&&!ft?-1:ot.localeCompare(et):ct?1:dt?-1:null}function sortCSSmq(ot,et){if(ot==="")return-1;if(et==="")return 1;const ct=_testIsPrint(ot,et);if(ct!==null)return ct;const ut=isMinWidth(ot)||isMinHeight(ot),dt=isMaxWidth(ot)||isMaxHeight(ot),ft=isMinWidth(et)||isMinHeight(et),zt=isMaxWidth(et)||isMaxHeight(et);if(ut&&zt)return-1;if(dt&&ft)return 1;const Dt=_getQueryLength(ot),St=_getQueryLength(et);return Dt===maxValue&&St===maxValue?ot.localeCompare(et):Dt===maxValue?1:St===maxValue?-1:Dt>St?dt?-1:1:Dt<St?dt?1:-1:ot.localeCompare(et)}class MultiCache{constructor(et,ct,ut){this.idGenerator=et,this.onNewCache=ct,this.onNewValue=ut,this.sortedCacheKeys=[],this.caches={}}getCache(et){if(!this.caches[et]){const ct=new Cache(this.idGenerator,this.onNewValue);ct.key=et,this.sortedCacheKeys.push(et),this.sortedCacheKeys.sort(sortCSSmq);const ut=this.sortedCacheKeys.indexOf(et),dt=ut<this.sortedCacheKeys.length-1?this.sortedCacheKeys[ut+1]:void 0;this.caches[et]=ct,this.onNewCache(et,ct,dt)}return this.caches[et]}getSortedCacheKeys(){return this.sortedCacheKeys}}class Cache{constructor(et,ct){this.cache={},this.idGenerator=et,this.onNewValue=ct}addValue(et,ct){const ut=this.cache[et];if(ut)return ut;const dt=this.idGenerator.next();return this.cache[et]=dt,this.onNewValue(this,dt,ct),dt}}const uppercasePattern$1=/[A-Z]/g,msPattern$1=/^ms-/,cache$1={};function hyphenateStyleName$2(ot){return ot in cache$1?cache$1[ot]:cache$1[ot]=ot.replace(uppercasePattern$1,"-$&").toLowerCase().replace(msPattern$1,"-ms-")}function capitalizeString(ot){return ot.charAt(0).toUpperCase()+ot.slice(1)}function prefixProperty(ot,et,ct){if(ot.hasOwnProperty(et)){for(var ut={},dt=ot[et],ft=capitalizeString(et),zt=Object.keys(ct),Dt=0;Dt<zt.length;Dt++){var St=zt[Dt];if(St===et)for(var Tt=0;Tt<dt.length;Tt++)ut[dt[Tt]+ft]=ct[et];ut[St]=ct[St]}return ut}return ct}function prefixValue$1(ot,et,ct,ut,dt){for(var ft=0,zt=ot.length;ft<zt;++ft){var Dt=ot[ft](et,ct,ut,dt);if(Dt)return Dt}}function addIfNew(ot,et){ot.indexOf(et)===-1&&ot.push(et)}function addNewValuesOnly(ot,et){if(Array.isArray(et))for(var ct=0,ut=et.length;ct<ut;++ct)addIfNew(ot,et[ct]);else addIfNew(ot,et)}function isObject(ot){return ot instanceof Object&&!Array.isArray(ot)}function createPrefixer(ot){var et=ot.prefixMap,ct=ot.plugins;return function ut(dt){for(var ft in dt){var zt=dt[ft];if(isObject(zt))dt[ft]=ut(zt);else if(Array.isArray(zt)){for(var Dt=[],St=0,Tt=zt.length;St<Tt;++St){var Rt=prefixValue$1(ct,ft,zt[St],dt,et);addNewValuesOnly(Dt,Rt||zt[St])}Dt.length>0&&(dt[ft]=Dt)}else{var $t=prefixValue$1(ct,ft,zt,dt,et);$t&&(dt[ft]=$t),dt=prefixProperty(et,ft,dt)}}return dt}}var w=["Webkit"],m=["Moz"],ms=["ms"],wm=["Webkit","Moz"],wms=["Webkit","ms"],wmms=["Webkit","Moz","ms"];const data={plugins:[],prefixMap:{appearance:wm,textEmphasisPosition:w,textEmphasis:w,textEmphasisStyle:w,textEmphasisColor:w,boxDecorationBreak:w,maskImage:w,maskMode:w,maskRepeat:w,maskPosition:w,maskClip:w,maskOrigin:w,maskSize:w,maskComposite:w,mask:w,maskBorderSource:w,maskBorderMode:w,maskBorderSlice:w,maskBorderWidth:w,maskBorderOutset:w,maskBorderRepeat:w,maskBorder:w,maskType:w,textDecorationStyle:w,textDecorationSkip:w,textDecorationLine:w,textDecorationColor:w,userSelect:wmms,backdropFilter:w,fontKerning:w,scrollSnapType:wms,scrollSnapPointsX:wms,scrollSnapPointsY:wms,scrollSnapDestination:wms,scrollSnapCoordinate:wms,clipPath:w,shapeImageThreshold:w,shapeImageMargin:w,shapeImageOutside:w,filter:w,hyphens:wms,flowInto:wms,flowFrom:wms,breakBefore:wms,breakAfter:wms,breakInside:wms,regionFragment:wms,writingMode:wms,textOrientation:w,tabSize:m,fontFeatureSettings:w,columnCount:w,columnFill:w,columnGap:w,columnRule:w,columnRuleColor:w,columnRuleStyle:w,columnRuleWidth:w,columns:w,columnSpan:w,columnWidth:w,wrapFlow:ms,wrapThrough:ms,wrapMargin:ms,textSizeAdjust:wms}};function backgroundClip(ot,et){if(typeof et=="string"&&et==="text")return["-webkit-text","text"]}var prefixes$5=["-webkit-","-moz-",""],values$3={"zoom-in":!0,"zoom-out":!0,grab:!0,grabbing:!0};function cursor(ot,et){if(ot==="cursor"&&values$3.hasOwnProperty(et))return prefixes$5.map(function(ct){return ct+et})}var isPrefixedValue$1={exports:{}};(function(ot,et){Object.defineProperty(et,"__esModule",{value:!0}),et.default=ut;var ct=/-webkit-|-moz-|-ms-/;function ut(dt){return typeof dt=="string"&&ct.test(dt)}ot.exports=et.default})(isPrefixedValue$1,isPrefixedValue$1.exports);var isPrefixedValueExports=isPrefixedValue$1.exports;const isPrefixedValue=getDefaultExportFromCjs$1(isPrefixedValueExports);var prefixes$4=["-webkit-",""];function crossFade(ot,et){if(typeof et=="string"&&!isPrefixedValue(et)&&et.indexOf("cross-fade(")>-1)return prefixes$4.map(function(ct){return et.replace(/cross-fade\(/g,ct+"cross-fade(")})}var prefixes$3=["-webkit-",""];function filter(ot,et){if(typeof et=="string"&&!isPrefixedValue(et)&&et.indexOf("filter(")>-1)return prefixes$3.map(function(ct){return et.replace(/filter\(/g,ct+"filter(")})}var values$2={flex:["-webkit-box","-moz-box","-ms-flexbox","-webkit-flex","flex"],"inline-flex":["-webkit-inline-box","-moz-inline-box","-ms-inline-flexbox","-webkit-inline-flex","inline-flex"]};function flex(ot,et){if(ot==="display"&&values$2.hasOwnProperty(et))return values$2[et]}var alternativeValues={"space-around":"justify","space-between":"justify","flex-start":"start","flex-end":"end","wrap-reverse":"multiple",wrap:"multiple"},alternativeProps$1={alignItems:"WebkitBoxAlign",justifyContent:"WebkitBoxPack",flexWrap:"WebkitBoxLines",flexGrow:"WebkitBoxFlex"};function flexboxOld(ot,et,ct){ot==="flexDirection"&&typeof et=="string"&&(et.indexOf("column")>-1?ct.WebkitBoxOrient="vertical":ct.WebkitBoxOrient="horizontal",et.indexOf("reverse")>-1?ct.WebkitBoxDirection="reverse":ct.WebkitBoxDirection="normal"),alternativeProps$1.hasOwnProperty(ot)&&(ct[alternativeProps$1[ot]]=alternativeValues[et]||et)}var prefixes$2=["-webkit-","-moz-",""],values$1=/linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/gi;function gradient(ot,et){if(typeof et=="string"&&!isPrefixedValue(et)&&values$1.test(et))return prefixes$2.map(function(ct){return et.replace(values$1,function(ut){return ct+ut})})}var _slicedToArray=function(){function ot(et,ct){var ut=[],dt=!0,ft=!1,zt=void 0;try{for(var Dt=et[Symbol.iterator](),St;!(dt=(St=Dt.next()).done)&&(ut.push(St.value),!(ct&&ut.length===ct));dt=!0);}catch(Tt){ft=!0,zt=Tt}finally{try{!dt&&Dt.return&&Dt.return()}finally{if(ft)throw zt}}return ut}return function(et,ct){if(Array.isArray(et))return et;if(Symbol.iterator in Object(et))return ot(et,ct);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();function isSimplePositionValue(ot){return typeof ot=="number"&&!isNaN(ot)}function isComplexSpanValue(ot){return typeof ot=="string"&&ot.includes("/")}var alignmentValues=["center","end","start","stretch"],displayValues={"inline-grid":["-ms-inline-grid","inline-grid"],grid:["-ms-grid","grid"]},propertyConverters={alignSelf:function ot(et,ct){alignmentValues.indexOf(et)>-1&&(ct.msGridRowAlign=et)},gridColumn:function ot(et,ct){if(isSimplePositionValue(et))ct.msGridColumn=et;else if(isComplexSpanValue(et)){var ut=et.split("/"),dt=_slicedToArray(ut,2),ft=dt[0],zt=dt[1];propertyConverters.gridColumnStart(+ft,ct);var Dt=zt.split(/ ?span /),St=_slicedToArray(Dt,2),Tt=St[0],Rt=St[1];Tt===""?propertyConverters.gridColumnEnd(+ft+ +Rt,ct):propertyConverters.gridColumnEnd(+zt,ct)}else propertyConverters.gridColumnStart(et,ct)},gridColumnEnd:function ot(et,ct){var ut=ct.msGridColumn;isSimplePositionValue(et)&&isSimplePositionValue(ut)&&(ct.msGridColumnSpan=et-ut)},gridColumnStart:function ot(et,ct){isSimplePositionValue(et)&&(ct.msGridColumn=et)},gridRow:function ot(et,ct){if(isSimplePositionValue(et))ct.msGridRow=et;else if(isComplexSpanValue(et)){var ut=et.split("/"),dt=_slicedToArray(ut,2),ft=dt[0],zt=dt[1];propertyConverters.gridRowStart(+ft,ct);var Dt=zt.split(/ ?span /),St=_slicedToArray(Dt,2),Tt=St[0],Rt=St[1];Tt===""?propertyConverters.gridRowEnd(+ft+ +Rt,ct):propertyConverters.gridRowEnd(+zt,ct)}else propertyConverters.gridRowStart(et,ct)},gridRowEnd:function ot(et,ct){var ut=ct.msGridRow;isSimplePositionValue(et)&&isSimplePositionValue(ut)&&(ct.msGridRowSpan=et-ut)},gridRowStart:function ot(et,ct){isSimplePositionValue(et)&&(ct.msGridRow=et)},gridTemplateColumns:function ot(et,ct){ct.msGridColumns=et},gridTemplateRows:function ot(et,ct){ct.msGridRows=et},justifySelf:function ot(et,ct){alignmentValues.indexOf(et)>-1&&(ct.msGridColumnAlign=et)}};function grid(ot,et,ct){if(ot==="display"&&et in displayValues)return displayValues[et];if(ot in propertyConverters){var ut=propertyConverters[ot];ut(et,ct)}}var prefixes$1=["-webkit-",""];function imageSet(ot,et){if(typeof et=="string"&&!isPrefixedValue(et)&&et.indexOf("image-set(")>-1)return prefixes$1.map(function(ct){return et.replace(/image-set\(/g,ct+"image-set(")})}var alternativeProps={marginBlockStart:["WebkitMarginBefore"],marginBlockEnd:["WebkitMarginAfter"],marginInlineStart:["WebkitMarginStart","MozMarginStart"],marginInlineEnd:["WebkitMarginEnd","MozMarginEnd"],paddingBlockStart:["WebkitPaddingBefore"],paddingBlockEnd:["WebkitPaddingAfter"],paddingInlineStart:["WebkitPaddingStart","MozPaddingStart"],paddingInlineEnd:["WebkitPaddingEnd","MozPaddingEnd"],borderBlockStart:["WebkitBorderBefore"],borderBlockStartColor:["WebkitBorderBeforeColor"],borderBlockStartStyle:["WebkitBorderBeforeStyle"],borderBlockStartWidth:["WebkitBorderBeforeWidth"],borderBlockEnd:["WebkitBorderAfter"],borderBlockEndColor:["WebkitBorderAfterColor"],borderBlockEndStyle:["WebkitBorderAfterStyle"],borderBlockEndWidth:["WebkitBorderAfterWidth"],borderInlineStart:["WebkitBorderStart","MozBorderStart"],borderInlineStartColor:["WebkitBorderStartColor","MozBorderStartColor"],borderInlineStartStyle:["WebkitBorderStartStyle","MozBorderStartStyle"],borderInlineStartWidth:["WebkitBorderStartWidth","MozBorderStartWidth"],borderInlineEnd:["WebkitBorderEnd","MozBorderEnd"],borderInlineEndColor:["WebkitBorderEndColor","MozBorderEndColor"],borderInlineEndStyle:["WebkitBorderEndStyle","MozBorderEndStyle"],borderInlineEndWidth:["WebkitBorderEndWidth","MozBorderEndWidth"]};function logical(ot,et,ct){if(Object.prototype.hasOwnProperty.call(alternativeProps,ot))for(var ut=alternativeProps[ot],dt=0,ft=ut.length;dt<ft;++dt)ct[ut[dt]]=et}function position(ot,et){if(ot==="position"&&et==="sticky")return["-webkit-sticky","sticky"]}var prefixes=["-webkit-","-moz-",""],properties$1={maxHeight:!0,maxWidth:!0,width:!0,height:!0,columnWidth:!0,minWidth:!0,minHeight:!0},values={"min-content":!0,"max-content":!0,"fill-available":!0,"fit-content":!0,"contain-floats":!0};function sizing(ot,et){if(properties$1.hasOwnProperty(ot)&&values.hasOwnProperty(et))return prefixes.map(function(ct){return ct+et})}var hyphenateProperty$1={exports:{}},uppercasePattern=/[A-Z]/g,msPattern=/^ms-/,cache={};function toHyphenLower(ot){return"-"+ot.toLowerCase()}function hyphenateStyleName(ot){if(cache.hasOwnProperty(ot))return cache[ot];var et=ot.replace(uppercasePattern,toHyphenLower);return cache[ot]=msPattern.test(et)?"-"+et:et}const hyphenateStyleName$1=Object.freeze(Object.defineProperty({__proto__:null,default:hyphenateStyleName},Symbol.toStringTag,{value:"Module"})),require$$0=getAugmentedNamespace(hyphenateStyleName$1);(function(ot,et){Object.defineProperty(et,"__esModule",{value:!0}),et.default=ft;var ct=require$$0,ut=dt(ct);function dt(zt){return zt&&zt.__esModule?zt:{default:zt}}function ft(zt){return(0,ut.default)(zt)}ot.exports=et.default})(hyphenateProperty$1,hyphenateProperty$1.exports);var hyphenatePropertyExports=hyphenateProperty$1.exports;const hyphenateProperty=getDefaultExportFromCjs$1(hyphenatePropertyExports);var properties={transition:!0,transitionProperty:!0,WebkitTransition:!0,WebkitTransitionProperty:!0,MozTransition:!0,MozTransitionProperty:!0},prefixMapping={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-"};function prefixValue(ot,et){if(isPrefixedValue(ot))return ot;for(var ct=ot.split(/,(?![^()]*(?:\([^()]*\))?\))/g),ut=0,dt=ct.length;ut<dt;++ut){var ft=ct[ut],zt=[ft];for(var Dt in et){var St=hyphenateProperty(Dt);if(ft.indexOf(St)>-1&&St!=="order")for(var Tt=et[Dt],Rt=0,$t=Tt.length;Rt<$t;++Rt)zt.unshift(ft.replace(St,prefixMapping[Tt[Rt]]+St))}ct[ut]=zt.join(",")}return ct.join(",")}function transition(ot,et,ct,ut){if(typeof et=="string"&&properties.hasOwnProperty(ot)){var dt=prefixValue(et,ut),ft=dt.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter(function(Dt){return!/-moz-|-ms-/.test(Dt)}).join(",");if(ot.indexOf("Webkit")>-1)return ft;var zt=dt.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter(function(Dt){return!/-webkit-|-ms-/.test(Dt)}).join(",");return ot.indexOf("Moz")>-1?zt:(ct["Webkit"+capitalizeString(ot)]=ft,ct["Moz"+capitalizeString(ot)]=zt,dt)}}var plugins=[backgroundClip,crossFade,cursor,filter,flexboxOld,gradient,grid,imageSet,logical,position,sizing,transition,flex],prefix=createPrefixer({prefixMap:data.prefixMap,plugins});function injectStylePrefixed(ot,et,ct,ut){const dt=ot.getCache(ct);let ft="";for(const zt in et){const Dt=et[zt];if(Dt!=null)if(typeof Dt!="object"){const St=`${hyphenateStyleName$2(zt)}:${Dt}`,Tt=`${ut}${St}`,Rt=dt.cache[Tt];if(Rt!==void 0){ft+=" "+Rt;continue}else{let $t="";const kt=prefix({[zt]:Dt});for(const Ft in kt){const jt=kt[Ft],Kt=typeof jt;if(Kt==="string"||Kt==="number"){const Yt=`${hyphenateStyleName$2(Ft)}:${jt}`;Yt!==St&&($t+=`${Yt};`)}else if(Array.isArray(jt)){const Yt=hyphenateStyleName$2(Ft);for(let Ut=0;Ut<jt.length;Ut++){const Jt=`${Yt}:${jt[Ut]}`;Jt!==St&&($t+=`${Jt};`)}}}$t+=St;const Bt=dt.addValue(Tt,{pseudo:ut,block:$t});ft+=" "+Bt}}else zt[0]===":"?ft+=" "+injectStylePrefixed(ot,Dt,ct,ut+zt):zt.substring(0,6)==="@media"&&(ft+=" "+injectStylePrefixed(ot,Dt,zt.substr(7),ut))}return ft.slice(1)}function atomicSelector(ot,et){let ct=`.${ot}`;return et&&(ct+=et),ct}function keyframesToBlock(ot){let et="";for(const ct in ot)et+=`${ct}{${declarationsToBlock(ot[ct])}}`;return et}function declarationsToBlock(ot){let et="";for(const ct in ot){const ut=ot[ct];(typeof ut=="string"||typeof ut=="number")&&(et+=`${hyphenateStyleName$2(ct)}:${ut};`)}return et.slice(0,-1)}function keyframesBlockToRule(ot,et){return`@keyframes ${ot}{${et}}`}function fontFaceBlockToRule(ot,et){return`@font-face{font-family:${ot};${et}}`}function styleBlockToRule(ot,et){return`${ot}{${et}}`}const insertRuleIntoDevtools=(ot,et)=>{const ct=ot.substring(1,ot.indexOf(":")!==-1?ot.indexOf(":"):ot.length),ut={};for(const dt of et.split(";"))dt.trim()!==""&&!window.__STYLETRON_DEVTOOLS__.atomicMap[ct]&&(ut[dt.substring(0,dt.indexOf(":"))]=dt.substring(dt.indexOf(":")+1,dt.length));window.__STYLETRON_DEVTOOLS__.atomicMap[ct]=ut},STYLES_HYDRATOR=/\.([^{:]+)(:[^{]+)?{(?:[^}]*;)?([^}]*?)}/g,KEYFRAMES_HYRDATOR=/@keyframes ([^{]+){((?:(?:from|to|(?:\d+\.?\d*%))\{(?:[^}])*})*)}/g,FONT_FACE_HYDRATOR=/@font-face\{font-family:([^;]+);([^}]*)\}/g;function hydrateStyles(ot,et,ct){let ut;for(;ut=et.exec(ct);){const[,dt,ft,zt]=ut,Dt=ft?`${ft}${zt}`:zt;ot.cache[Dt]=dt,ot.idGenerator.increment()}}function hydrate(ot,et,ct){let ut;for(;ut=et.exec(ct);){const[,dt,ft]=ut;ot.cache[ft]=dt,ot.idGenerator.increment()}}class StyletronClient{constructor(et={}){this.styleElements={};const ct=new SequentialIDGenerator(et.prefix),ut=(dt,ft,zt)=>{const{pseudo:Dt,block:St}=zt,Tt=this.styleElements[dt.key].sheet,Rt=atomicSelector(ft,Dt),$t=styleBlockToRule(Rt,St);try{Tt.insertRule($t,Tt.cssRules.length)}catch{}};if(this.styleCache=new MultiCache(ct,(dt,ft,zt)=>{const Dt=document.createElement("style");if(Dt.media=dt,zt===void 0)this.container.appendChild(Dt);else{const St=findSheetIndexWithMedia(this.container.children,zt);this.container.insertBefore(Dt,this.container.children[St])}this.styleElements[dt]=Dt},ut),this.keyframesCache=new Cache(new SequentialIDGenerator(et.prefix),(dt,ft,zt)=>{this.styleCache.getCache("");const Dt=this.styleElements[""].sheet,St=keyframesBlockToRule(ft,keyframesToBlock(zt));try{Dt.insertRule(St,Dt.cssRules.length)}catch{}}),this.fontFaceCache=new Cache(new SequentialIDGenerator(et.prefix),(dt,ft,zt)=>{this.styleCache.getCache("");const Dt=this.styleElements[""].sheet,St=fontFaceBlockToRule(ft,declarationsToBlock(zt));try{Dt.insertRule(St,Dt.cssRules.length)}catch{}}),et.container&&(this.container=et.container),et.hydrate&&et.hydrate.length>0){if(!this.container){const dt=et.hydrate[0].parentElement;dt!=null&&(this.container=dt)}for(let dt=0;dt<et.hydrate.length;dt++){const ft=et.hydrate[dt],zt=ft.getAttribute("data-hydrate");if(zt==="font-face"){hydrate(this.fontFaceCache,FONT_FACE_HYDRATOR,ft.textContent);continue}if(zt==="keyframes"){hydrate(this.keyframesCache,KEYFRAMES_HYRDATOR,ft.textContent);continue}const Dt=ft.media?ft.media:"";this.styleElements[Dt]=ft;const St=new Cache(ct,ut);St.key=Dt,hydrateStyles(St,STYLES_HYDRATOR,ft.textContent),this.styleCache.sortedCacheKeys.push(Dt),this.styleCache.caches[Dt]=St}}if(!this.container){if(document.head===null)throw new Error("No container provided and `document.head` was null");this.container=document.head}}renderStyle(et){return injectStylePrefixed(this.styleCache,et,"","")}renderFontFace(et){const ct=declarationsToBlock(et);return this.fontFaceCache.addValue(ct,et)}renderKeyframes(et){const ct=keyframesToBlock(et);return this.keyframesCache.addValue(ct,et)}}function findSheetIndexWithMedia(ot,et){let ct=0;for(;ct<ot.length;ct++){const ut=ot[ct];if(ut.tagName==="STYLE"&&ut.media===et)return ct}return-1}const engine=new StyletronClient({prefix:"st-"}),streamlitExecutionStartedAt=Date.now();function StreamlitApp(ot){return jsxRuntimeExports.jsx(StliteKernelProvider,{kernel:ot.kernel,children:jsxRuntimeExports.jsx(Provider$1,{value:engine,children:jsxRuntimeExports.jsx(ThemedApp,{streamlitExecutionStartedAt})})})}function r(ot){var et,ct,ut="";if(typeof ot=="string"||typeof ot=="number")ut+=ot;else if(typeof ot=="object")if(Array.isArray(ot)){var dt=ot.length;for(et=0;et<dt;et++)ot[et]&&(ct=r(ot[et]))&&(ut&&(ut+=" "),ut+=ct)}else for(ct in ot)ot[ct]&&(ut&&(ut+=" "),ut+=ct);return ut}function clsx(){for(var ot,et,ct=0,ut="",dt=arguments.length;ct<dt;ct++)(ot=arguments[ct])&&(et=r(ot))&&(ut&&(ut+=" "),ut+=et);return ut}function Mt(ot){if(typeof document>"u")return;let et=document.head||document.getElementsByTagName("head")[0],ct=document.createElement("style");ct.type="text/css",et.firstChild?et.insertBefore(ct,et.firstChild):et.appendChild(ct),ct.styleSheet?ct.styleSheet.cssText=ot:ct.appendChild(document.createTextNode(ot))}Mt(`:root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: hsl(6, 78%, 57%);--toastify-color-transparent: rgba(255, 255, 255, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-container-width: fit-content;--toastify-toast-width: 320px;--toastify-toast-offset: 16px;--toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));--toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));--toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));--toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));--toastify-toast-background: #fff;--toastify-toast-padding: 14px;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-toast-bd-radius: 6px;--toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, .1);--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error);--toastify-color-progress-bgo: .2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index));position:fixed;width:var(--toastify-container-width);box-sizing:border-box;color:#fff;display:flex;flex-direction:column}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right);align-items:end}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right);align-items:end}@media only screen and (max-width: 480px){.Toastify__toast-container{width:100vw;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translate(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:initial}.Toastify__toast{--toastify-toast-width: 100%;margin-bottom:0;border-radius:0}}.Toastify__toast{--y: 0;position:relative;touch-action:none;width:var(--toastify-toast-width);min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:var(--toastify-toast-padding);border-radius:var(--toastify-toast-bd-radius);box-shadow:var(--toastify-toast-shadow);max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);z-index:0;display:flex;flex:1 auto;align-items:center;word-break:break-word}.Toastify__toast-container[data-stacked=true]{width:var(--toastify-toast-width)}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,.Toastify__toast--stacked[data-collapsed] .Toastify__close-button{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-icon{margin-inline-end:10px;width:22px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;position:absolute;top:6px;right:6px;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;z-index:1}.Toastify__toast--rtl .Toastify__close-button{left:6px;right:unset}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:1;opacity:.7;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right;border-bottom-left-radius:initial}.Toastify__progress-bar--wrp{position:absolute;overflow:hidden;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius);border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
511
+ `);var L=ot=>typeof ot=="number"&&!isNaN(ot),N=ot=>typeof ot=="string",P=ot=>typeof ot=="function",mt=ot=>N(ot)||L(ot),B=ot=>N(ot)||P(ot)?ot:null,pt=(ot,et)=>ot===!1||L(ot)&&ot>0?ot:et,z=ot=>reactExports.isValidElement(ot)||N(ot)||P(ot)||L(ot);function Z(ot,et,ct=300){let{scrollHeight:ut,style:dt}=ot;requestAnimationFrame(()=>{dt.minHeight="initial",dt.height=ut+"px",dt.transition=`all ${ct}ms`,requestAnimationFrame(()=>{dt.height="0",dt.padding="0",dt.margin="0",setTimeout(et,ct)})})}function $({enter:ot,exit:et,appendPosition:ct=!1,collapse:ut=!0,collapseDuration:dt=300}){return function({children:ft,position:zt,preventExitTransition:Dt,done:St,nodeRef:Tt,isIn:Rt,playToast:$t}){let kt=ct?`${ot}--${zt}`:ot,Bt=ct?`${et}--${zt}`:et,Ft=reactExports.useRef(0);return reactExports.useLayoutEffect(()=>{let jt=Tt.current,Kt=kt.split(" "),Yt=Ut=>{Ut.target===Tt.current&&($t(),jt.removeEventListener("animationend",Yt),jt.removeEventListener("animationcancel",Yt),Ft.current===0&&Ut.type!=="animationcancel"&&jt.classList.remove(...Kt))};jt.classList.add(...Kt),jt.addEventListener("animationend",Yt),jt.addEventListener("animationcancel",Yt)},[]),reactExports.useEffect(()=>{let jt=Tt.current,Kt=()=>{jt.removeEventListener("animationend",Kt),ut?Z(jt,St,dt):St()};Rt||(Dt?Kt():(Ft.current=1,jt.className+=` ${Bt}`,jt.addEventListener("animationend",Kt)))},[Rt]),React$1.createElement(React$1.Fragment,null,ft)}}function J(ot,et){return{content:tt(ot.content,ot.props),containerId:ot.props.containerId,id:ot.props.toastId,theme:ot.props.theme,type:ot.props.type,data:ot.props.data||{},isLoading:ot.props.isLoading,icon:ot.props.icon,reason:ot.removalReason,status:et}}function tt(ot,et,ct=!1){return reactExports.isValidElement(ot)&&!N(ot.type)?reactExports.cloneElement(ot,{closeToast:et.closeToast,toastProps:et,data:et.data,isPaused:ct}):P(ot)?ot({closeToast:et.closeToast,toastProps:et,data:et.data,isPaused:ct}):ot}function yt({closeToast:ot,theme:et,ariaLabel:ct="close"}){return React$1.createElement("button",{className:`Toastify__close-button Toastify__close-button--${et}`,type:"button",onClick:ut=>{ut.stopPropagation(),ot(!0)},"aria-label":ct},React$1.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},React$1.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function gt({delay:ot,isRunning:et,closeToast:ct,type:ut="default",hide:dt,className:ft,controlledProgress:zt,progress:Dt,rtl:St,isIn:Tt,theme:Rt}){let $t=dt||zt&&Dt===0,kt={animationDuration:`${ot}ms`,animationPlayState:et?"running":"paused"};zt&&(kt.transform=`scaleX(${Dt})`);let Bt=clsx("Toastify__progress-bar",zt?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${Rt}`,`Toastify__progress-bar--${ut}`,{"Toastify__progress-bar--rtl":St}),Ft=P(ft)?ft({rtl:St,type:ut,defaultClassName:Bt}):clsx(Bt,ft),jt={[zt&&Dt>=1?"onTransitionEnd":"onAnimationEnd"]:zt&&Dt<1?null:()=>{Tt&&ct()}};return React$1.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":$t},React$1.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${Rt} Toastify__progress-bar--${ut}`}),React$1.createElement("div",{role:"progressbar","aria-hidden":$t?"true":"false","aria-label":"notification timer",className:Ft,style:kt,...jt}))}var Xt=1,at=()=>`${Xt++}`;function _t(ot,et,ct){let ut=1,dt=0,ft=[],zt=[],Dt=et,St=new Map,Tt=new Set,Rt=Ut=>(Tt.add(Ut),()=>Tt.delete(Ut)),$t=()=>{zt=Array.from(St.values()),Tt.forEach(Ut=>Ut())},kt=({containerId:Ut,toastId:Jt,updateId:Ht})=>{let e0=Ut?Ut!==ot:ot!==1,t0=St.has(Jt)&&Ht==null;return e0||t0},Bt=(Ut,Jt)=>{St.forEach(Ht=>{var e0;(Jt==null||Jt===Ht.props.toastId)&&((e0=Ht.toggle)==null||e0.call(Ht,Ut))})},Ft=Ut=>{var Jt,Ht;(Ht=(Jt=Ut.props)==null?void 0:Jt.onClose)==null||Ht.call(Jt,Ut.removalReason),Ut.isActive=!1},jt=Ut=>{if(Ut==null)St.forEach(Ft);else{let Jt=St.get(Ut);Jt&&Ft(Jt)}$t()},Kt=()=>{dt-=ft.length,ft=[]},Yt=Ut=>{var Jt,Ht;let{toastId:e0,updateId:t0}=Ut.props,Zt=t0==null;Ut.staleId&&St.delete(Ut.staleId),Ut.isActive=!0,St.set(e0,Ut),$t(),ct(J(Ut,Zt?"added":"updated")),Zt&&((Ht=(Jt=Ut.props).onOpen)==null||Ht.call(Jt))};return{id:ot,props:Dt,observe:Rt,toggle:Bt,removeToast:jt,toasts:St,clearQueue:Kt,buildToast:(Ut,Jt)=>{if(kt(Jt))return;let{toastId:Ht,updateId:e0,data:t0,staleId:Zt,delay:o0}=Jt,n0=e0==null;n0&&dt++;let r0={...Dt,style:Dt.toastStyle,key:ut++,...Object.fromEntries(Object.entries(Jt).filter(([u0,b0])=>b0!=null)),toastId:Ht,updateId:e0,data:t0,isIn:!1,className:B(Jt.className||Dt.toastClassName),progressClassName:B(Jt.progressClassName||Dt.progressClassName),autoClose:Jt.isLoading?!1:pt(Jt.autoClose,Dt.autoClose),closeToast(u0){St.get(Ht).removalReason=u0,jt(Ht)},deleteToast(){let u0=St.get(Ht);if(u0!=null){if(ct(J(u0,"removed")),St.delete(Ht),dt--,dt<0&&(dt=0),ft.length>0){Yt(ft.shift());return}$t()}}};r0.closeButton=Dt.closeButton,Jt.closeButton===!1||z(Jt.closeButton)?r0.closeButton=Jt.closeButton:Jt.closeButton===!0&&(r0.closeButton=z(Dt.closeButton)?Dt.closeButton:!0);let a0={content:Ut,props:r0,staleId:Zt};Dt.limit&&Dt.limit>0&&dt>Dt.limit&&n0?ft.push(a0):L(o0)?setTimeout(()=>{Yt(a0)},o0):Yt(a0)},setProps(Ut){Dt=Ut},setToggle:(Ut,Jt)=>{let Ht=St.get(Ut);Ht&&(Ht.toggle=Jt)},isToastActive:Ut=>{var Jt;return(Jt=St.get(Ut))==null?void 0:Jt.isActive},getSnapshot:()=>zt}}var I=new Map,F=[],st=new Set,Vt=ot=>st.forEach(et=>et(ot)),bt=()=>I.size>0;function Qt(){F.forEach(ot=>nt(ot.content,ot.options)),F=[]}var vt=(ot,{containerId:et})=>{var ct;return(ct=I.get(et||1))==null?void 0:ct.toasts.get(ot)};function X(ot,et){var ct;if(et)return!!((ct=I.get(et))!=null&&ct.isToastActive(ot));let ut=!1;return I.forEach(dt=>{dt.isToastActive(ot)&&(ut=!0)}),ut}function ht(ot){if(!bt()){F=F.filter(et=>ot!=null&&et.options.toastId!==ot);return}if(ot==null||mt(ot))I.forEach(et=>{et.removeToast(ot)});else if(ot&&("containerId"in ot||"id"in ot)){let et=I.get(ot.containerId);et?et.removeToast(ot.id):I.forEach(ct=>{ct.removeToast(ot.id)})}}var Ct=(ot={})=>{I.forEach(et=>{et.props.limit&&(!ot.containerId||et.id===ot.containerId)&&et.clearQueue()})};function nt(ot,et){z(ot)&&(bt()||F.push({content:ot,options:et}),I.forEach(ct=>{ct.buildToast(ot,et)}))}function xt(ot){var et;(et=I.get(ot.containerId||1))==null||et.setToggle(ot.id,ot.fn)}function rt(ot,et){I.forEach(ct=>{(et==null||!(et!=null&&et.containerId)||(et==null?void 0:et.containerId)===ct.id)&&ct.toggle(ot,et==null?void 0:et.id)})}function Et(ot){let et=ot.containerId||1;return{subscribe(ct){let ut=_t(et,ot,Vt);I.set(et,ut);let dt=ut.observe(ct);return Qt(),()=>{dt(),I.delete(et)}},setProps(ct){var ut;(ut=I.get(et))==null||ut.setProps(ct)},getSnapshot(){var ct;return(ct=I.get(et))==null?void 0:ct.getSnapshot()}}}function Pt(ot){return st.add(ot),()=>{st.delete(ot)}}function Wt(ot){return ot&&(N(ot.toastId)||L(ot.toastId))?ot.toastId:at()}function U(ot,et){return nt(ot,et),et.toastId}function V(ot,et){return{...et,type:et&&et.type||ot,toastId:Wt(et)}}function Q(ot){return(et,ct)=>U(et,V(ot,ct))}function y(ot,et){return U(ot,V("default",et))}y.loading=(ot,et)=>U(ot,V("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...et}));function Gt(ot,{pending:et,error:ct,success:ut},dt){let ft;et&&(ft=N(et)?y.loading(et,dt):y.loading(et.render,{...dt,...et}));let zt={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},Dt=(Tt,Rt,$t)=>{if(Rt==null){y.dismiss(ft);return}let kt={type:Tt,...zt,...dt,data:$t},Bt=N(Rt)?{render:Rt}:Rt;return ft?y.update(ft,{...kt,...Bt}):y(Bt.render,{...kt,...Bt}),$t},St=P(ot)?ot():ot;return St.then(Tt=>Dt("success",ut,Tt)).catch(Tt=>Dt("error",ct,Tt)),St}y.promise=Gt,y.success=Q("success"),y.info=Q("info"),y.error=Q("error"),y.warning=Q("warning"),y.warn=y.warning,y.dark=(ot,et)=>U(ot,V("default",{theme:"dark",...et}));function qt(ot){ht(ot)}y.dismiss=qt,y.clearWaitingQueue=Ct,y.isActive=X,y.update=(ot,et={})=>{let ct=vt(ot,et);if(ct){let{props:ut,content:dt}=ct,ft={delay:100,...ut,...et,toastId:et.toastId||ot,updateId:at()};ft.toastId!==ot&&(ft.staleId=ot);let zt=ft.render||dt;delete ft.render,U(zt,ft)}},y.done=ot=>{y.update(ot,{progress:1})},y.onChange=Pt,y.play=ot=>rt(!0,ot),y.pause=ot=>rt(!1,ot);function It(ot){var et;let{subscribe:ct,getSnapshot:ut,setProps:dt}=reactExports.useRef(Et(ot)).current;dt(ot);let ft=(et=reactExports.useSyncExternalStore(ct,ut,ut))==null?void 0:et.slice();function zt(Dt){if(!ft)return[];let St=new Map;return ot.newestOnTop&&ft.reverse(),ft.forEach(Tt=>{let{position:Rt}=Tt.props;St.has(Rt)||St.set(Rt,[]),St.get(Rt).push(Tt)}),Array.from(St,Tt=>Dt(Tt[0],Tt[1]))}return{getToastToRender:zt,isToastActive:X,count:ft==null?void 0:ft.length}}function At(ot){let[et,ct]=reactExports.useState(!1),[ut,dt]=reactExports.useState(!1),ft=reactExports.useRef(null),zt=reactExports.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:Dt,pauseOnHover:St,closeToast:Tt,onClick:Rt,closeOnClick:$t}=ot;xt({id:ot.toastId,containerId:ot.containerId,fn:ct}),reactExports.useEffect(()=>{if(ot.pauseOnFocusLoss)return kt(),()=>{Bt()}},[ot.pauseOnFocusLoss]);function kt(){document.hasFocus()||Yt(),window.addEventListener("focus",Kt),window.addEventListener("blur",Yt)}function Bt(){window.removeEventListener("focus",Kt),window.removeEventListener("blur",Yt)}function Ft(Zt){if(ot.draggable===!0||ot.draggable===Zt.pointerType){Ut();let o0=ft.current;zt.canCloseOnClick=!0,zt.canDrag=!0,o0.style.transition="none",ot.draggableDirection==="x"?(zt.start=Zt.clientX,zt.removalDistance=o0.offsetWidth*(ot.draggablePercent/100)):(zt.start=Zt.clientY,zt.removalDistance=o0.offsetHeight*(ot.draggablePercent===80?ot.draggablePercent*1.5:ot.draggablePercent)/100)}}function jt(Zt){let{top:o0,bottom:n0,left:r0,right:a0}=ft.current.getBoundingClientRect();Zt.nativeEvent.type!=="touchend"&&ot.pauseOnHover&&Zt.clientX>=r0&&Zt.clientX<=a0&&Zt.clientY>=o0&&Zt.clientY<=n0?Yt():Kt()}function Kt(){ct(!0)}function Yt(){ct(!1)}function Ut(){zt.didMove=!1,document.addEventListener("pointermove",Ht),document.addEventListener("pointerup",e0)}function Jt(){document.removeEventListener("pointermove",Ht),document.removeEventListener("pointerup",e0)}function Ht(Zt){let o0=ft.current;if(zt.canDrag&&o0){zt.didMove=!0,et&&Yt(),ot.draggableDirection==="x"?zt.delta=Zt.clientX-zt.start:zt.delta=Zt.clientY-zt.start,zt.start!==Zt.clientX&&(zt.canCloseOnClick=!1);let n0=ot.draggableDirection==="x"?`${zt.delta}px, var(--y)`:`0, calc(${zt.delta}px + var(--y))`;o0.style.transform=`translate3d(${n0},0)`,o0.style.opacity=`${1-Math.abs(zt.delta/zt.removalDistance)}`}}function e0(){Jt();let Zt=ft.current;if(zt.canDrag&&zt.didMove&&Zt){if(zt.canDrag=!1,Math.abs(zt.delta)>zt.removalDistance){dt(!0),ot.closeToast(!0),ot.collapseAll();return}Zt.style.transition="transform 0.2s, opacity 0.2s",Zt.style.removeProperty("transform"),Zt.style.removeProperty("opacity")}}let t0={onPointerDown:Ft,onPointerUp:jt};return Dt&&St&&(t0.onMouseEnter=Yt,ot.stacked||(t0.onMouseLeave=Kt)),$t&&(t0.onClick=Zt=>{Rt&&Rt(Zt),zt.canCloseOnClick&&Tt(!0)}),{playToast:Kt,pauseToast:Yt,isRunning:et,preventExitTransition:ut,toastRef:ft,eventHandlers:t0}}var Ot=typeof window<"u"?reactExports.useLayoutEffect:reactExports.useEffect,G=({theme:ot,type:et,isLoading:ct,...ut})=>React$1.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:ot==="colored"?"currentColor":`var(--toastify-icon-color-${et})`,...ut});function ao(ot){return React$1.createElement(G,{...ot},React$1.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))}function so(ot){return React$1.createElement(G,{...ot},React$1.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))}function no(ot){return React$1.createElement(G,{...ot},React$1.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))}function ro(ot){return React$1.createElement(G,{...ot},React$1.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))}function io(){return React$1.createElement("div",{className:"Toastify__spinner"})}var W={info:so,warning:ao,success:no,error:ro,spinner:io},lo=ot=>ot in W;function Nt({theme:ot,type:et,isLoading:ct,icon:ut}){let dt=null,ft={theme:ot,type:et};return ut===!1||(P(ut)?dt=ut({...ft,isLoading:ct}):reactExports.isValidElement(ut)?dt=reactExports.cloneElement(ut,ft):ct?dt=W.spinner():lo(et)&&(dt=W[et](ft))),dt}var wt=ot=>{let{isRunning:et,preventExitTransition:ct,toastRef:ut,eventHandlers:dt,playToast:ft}=At(ot),{closeButton:zt,children:Dt,autoClose:St,onClick:Tt,type:Rt,hideProgressBar:$t,closeToast:kt,transition:Bt,position:Ft,className:jt,style:Kt,progressClassName:Yt,updateId:Ut,role:Jt,progress:Ht,rtl:e0,toastId:t0,deleteToast:Zt,isIn:o0,isLoading:n0,closeOnClick:r0,theme:a0,ariaLabel:u0}=ot,b0=clsx("Toastify__toast",`Toastify__toast-theme--${a0}`,`Toastify__toast--${Rt}`,{"Toastify__toast--rtl":e0},{"Toastify__toast--close-on-click":r0}),T0=P(jt)?jt({rtl:e0,position:Ft,type:Rt,defaultClassName:b0}):clsx(b0,jt),O0=Nt(ot),E0=!!Ht||!St,H0={closeToast:kt,type:Rt,theme:a0},I0=null;return zt===!1||(P(zt)?I0=zt(H0):reactExports.isValidElement(zt)?I0=reactExports.cloneElement(zt,H0):I0=yt(H0)),React$1.createElement(Bt,{isIn:o0,done:Zt,position:Ft,preventExitTransition:ct,nodeRef:ut,playToast:ft},React$1.createElement("div",{id:t0,tabIndex:0,onClick:Tt,"data-in":o0,className:T0,...dt,style:Kt,ref:ut,...o0&&{role:Jt,"aria-label":u0}},O0!=null&&React$1.createElement("div",{className:clsx("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!n0})},O0),tt(Dt,ot,!et),I0,!ot.customProgressBar&&React$1.createElement(gt,{...Ut&&!E0?{key:`p-${Ut}`}:{},rtl:e0,theme:a0,delay:St,isRunning:et,isIn:o0,closeToast:kt,hide:$t,type:Rt,className:Yt,controlledProgress:E0,progress:Ht||0})))},K=(ot,et=!1)=>({enter:`Toastify--animate Toastify__${ot}-enter`,exit:`Toastify--animate Toastify__${ot}-exit`,appendPosition:et}),lt=$(K("bounce",!0)),mo=$(K("slide",!0)),_o={position:"top-right",transition:lt,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light","aria-label":"Notifications Alt+T",hotKeys:ot=>ot.altKey&&ot.code==="KeyT"};function Lt(ot){let et={..._o,...ot},ct=ot.stacked,[ut,dt]=reactExports.useState(!0),ft=reactExports.useRef(null),{getToastToRender:zt,isToastActive:Dt,count:St}=It(et),{className:Tt,style:Rt,rtl:$t,containerId:kt,hotKeys:Bt}=et;function Ft(Kt){let Yt=clsx("Toastify__toast-container",`Toastify__toast-container--${Kt}`,{"Toastify__toast-container--rtl":$t});return P(Tt)?Tt({position:Kt,rtl:$t,defaultClassName:Yt}):clsx(Yt,B(Tt))}function jt(){ct&&(dt(!0),y.play())}return Ot(()=>{var Kt;if(ct){let Yt=ft.current.querySelectorAll('[data-in="true"]'),Ut=12,Jt=(Kt=et.position)==null?void 0:Kt.includes("top"),Ht=0,e0=0;Array.from(Yt).reverse().forEach((t0,Zt)=>{let o0=t0;o0.classList.add("Toastify__toast--stacked"),Zt>0&&(o0.dataset.collapsed=`${ut}`),o0.dataset.pos||(o0.dataset.pos=Jt?"top":"bot");let n0=Ht*(ut?.2:1)+(ut?0:Ut*Zt);o0.style.setProperty("--y",`${Jt?n0:n0*-1}px`),o0.style.setProperty("--g",`${Ut}`),o0.style.setProperty("--s",`${1-(ut?e0:0)}`),Ht+=o0.offsetHeight,e0+=.025})}},[ut,St,ct]),reactExports.useEffect(()=>{function Kt(Yt){var Ut;let Jt=ft.current;Bt(Yt)&&((Ut=Jt.querySelector('[tabIndex="0"]'))==null||Ut.focus(),dt(!1),y.pause()),Yt.key==="Escape"&&(document.activeElement===Jt||Jt!=null&&Jt.contains(document.activeElement))&&(dt(!0),y.play())}return document.addEventListener("keydown",Kt),()=>{document.removeEventListener("keydown",Kt)}},[Bt]),React$1.createElement("section",{ref:ft,className:"Toastify",id:kt,onMouseEnter:()=>{ct&&(dt(!1),y.pause())},onMouseLeave:jt,"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions text","aria-label":et["aria-label"]},zt((Kt,Yt)=>{let Ut=Yt.length?{...Rt}:{...Rt,pointerEvents:"none"};return React$1.createElement("div",{tabIndex:-1,className:Ft(Kt),"data-stacked":ct,style:Ut,key:`c-${Kt}`},Yt.map(({content:Jt,props:Ht})=>React$1.createElement(wt,{...Ht,stacked:ct,collapseAll:jt,isIn:Dt(Ht.toastId,Ht.containerId),key:`t-${Ht.key}`},Jt)))}))}function ErrorToastContent(ot){const et=ot;return jsxRuntimeExports.jsxs("div",{style:{width:"100%",padding:0},children:[jsxRuntimeExports.jsx("p",{children:et.message}),et.error&&jsxRuntimeExports.jsx("pre",{style:{width:"100%",padding:0,overflow:"scroll",maxHeight:300},children:jsxRuntimeExports.jsx("code",{style:{padding:"16px"},children:et.error.message})})]})}function makeToastKernelCallbacks(ot){const{disableProgressToasts:et=!1,disableErrorToasts:ct=!1}={};let ut=null;const dt=[];return{onProgress:ft=>{if(et)return;const zt=y(ft,{position:"bottom-right",transition:mo,isLoading:!0,hideProgressBar:!0,closeButton:!1});dt.push(zt),ut&&y.update(ut,{isLoading:!1,autoClose:3e3}),ut=zt},onLoad:()=>{dt.forEach(ft=>y.dismiss(ft))},onError:ft=>{ct||y(jsxRuntimeExports.jsx(ErrorToastContent,{message:"Error during booting up",error:ft}),{position:"bottom-right",type:"error",autoClose:!1,closeOnClick:!1})}}}function isDarkTheme(){const ot=getDefaultTheme().name;return ot===AUTO_THEME_NAME?window.matchMedia("(prefers-color-scheme: dark)").matches:ot===darkTheme.name}function ToastContainer(){return jsxRuntimeExports.jsx(Lt,{style:{zIndex:999999},theme:isDarkTheme()?"dark":"light"})}const USE_NODEJS_WORKER=window.nodeJsWorkerAPI.USE_NODEJS_WORKER;class NodeJsWorkerMock{constructor(){this.onmessage=null,this.initializePromise=window.nodeJsWorkerAPI.initialize(),window.nodeJsWorkerAPI.onMessage(et=>{this.onmessage&&this.onmessage({data:et,ports:[]})})}postMessage(et,ct){this.initializePromise.then(()=>{const ut=ct?ct[0]:null,dt=ut&&(ft=>{ut.postMessage(ft)});window.nodeJsWorkerAPI.postMessage({data:et,onPortMessage:dt})})}terminate(){window.nodeJsWorkerAPI.terminate()}}let pyodideUrl;USE_NODEJS_WORKER||(pyodideUrl=window.location.href.split("/").slice(0,-1).join("/")+"/pyodide/pyodide.mjs");function App(){const[ot,et]=reactExports.useState();return reactExports.useEffect(()=>{let ct=!1,ut=null;return Promise.all([window.archivesAPI.readSitePackagesSnapshot(),window.archivesAPI.readPrebuiltPackageNames(),window.archivesAPI.readStreamlitAppDirectory()]).then(([dt,ft,zt])=>{if(ct)return;const Dt={};Object.keys(zt).forEach(St=>{const Tt=zt[St];Dt[St]={data:Tt}}),ut=new StliteKernel({entrypoint:window.appConfig.entrypoint,files:Dt,archives:[{buffer:dt,format:"gztar",options:{extractDir:"/"}}],requirements:[],prebuiltPackageNames:ft,pyodideUrl,wheelUrls:void 0,idbfsMountpoints:window.appConfig.idbfsMountpoints,worker:USE_NODEJS_WORKER?new NodeJsWorkerMock:void 0,workerType:"module",...makeToastKernelCallbacks()}),et(ut)}),()=>{ct=!0,ut&&ut.dispose()}},[]),ot?jsxRuntimeExports.jsx(StreamlitApp,{kernel:ot}):null}ReactDOM.render(jsxRuntimeExports.jsxs(React$1.StrictMode,{children:[jsxRuntimeExports.jsx(App,{}),jsxRuntimeExports.jsx(ToastContainer,{})]}),document.getElementById("root"))})();export{isEqual$1 as $,toString$8 as A,isNullOrUndefined$1 as B,merge$6 as C,numbro$1 as D,EmotionIconBase as E,notNullOrUndefined as F,hooks as G,formatPeriodType as H,moment$1 as I,getTypeName as J,format as K,convertToSeconds as L,useTheme as M,Arrow$2 as N,logError as O,PortalContext as P,transparentize as Q,React$1 as R,convertRemToPx as S,logWarning as T,_defineProperty$u as U,_objectWithoutProperties$o as V,_typeof$g as W,jsx as X,css$2 as Y,_toConsumableArray$3 as Z,_extends$Q as _,__tla,range$1 as a,labelVisibilityProtoValueToEnum as a$,Popover$1 as a0,StyledTooltipContentWrapper as a1,StreamlitMarkdown$1 as a2,PLACEMENT as a3,ACCESSIBILITY_TYPE as a4,hasLightBackgroundColor as a5,LibContext as a6,debounce$4 as a7,Resizable as a8,IndexTypeName as a9,getAugmentedNamespace as aA,DEFAULT_IFRAME_FEATURE_POLICY as aB,DEFAULT_IFRAME_SANDBOX_POLICY as aC,useStliteMediaObjects as aD,darken as aE,BaseButtonSize as aF,BaseButtonKind as aG,BaseButtonTooltip as aH,DynamicButtonLabel as aI,IsSidebarContext as aJ,Placement as aK,getGray90 as aL,getIncreasingGreen as aM,getDecreasingRed as aN,PlotlyChart$1 as aO,keysToSnakeCase as aP,WindowDimensionsContext as aQ,Video$1 as aR,zip$1 as aS,FileUploaderState as aT,UploadedFileInfo as aU,StyledSpinner as aV,ENABLE_PERIPHERALS_DOCS_URL as aW,BaseButton as aX,Icon$2 as aY,blend as aZ,WidgetLabel as a_,_baseMerge as aa,_createAssigner as ab,getGray70 as ac,getGray30 as ad,getCategoricalColorsArray as ae,getDivergingColorsArray as af,getSequentialColorsArray as ag,getBlue80 as ah,Global as ai,ensureError as aj,withTheme as ak,DynamicIcon as al,toaster as am,AlertElement as an,Kind as ao,_assertThisInitialized$e as ap,ErrorElement as aq,StyledInlineCode as ar,axios as as,Skeleton as at,Skeleton$1 as au,hoistNonReactStatics$2 as av,lib$3 as aw,parseToRgba as ax,DeckGlJsonChart$1 as ay,_unsupportedIterableToArray$l as az,reactDomExports as b,TextInput$1 as b$,TooltipIcon as b0,Tooltip as b1,styled as b2,getOverrides as b3,LocaleContext as b4,ButtonGroup$1 as b5,LabelVisibilityMessage as b6,StyledWidgetLabelHelpInline as b7,useStliteKernel as b8,themeColors as b9,isPresetTheme as bA,classNames as bB,isValidFormId as bC,toPropertyKey as bD,_setPrototypeOf$e as bE,hexToRgb as bF,withWrapper as bG,StyledWidgetInstructions as bH,isFromMac as bI,SIZE$1 as bJ,CUSTOM_INPUT_TYPE as bK,DeleteAlt$1 as bL,ADJOINED as bM,filterOptions as bN,ENHANCER_POSITION as bO,UISelectbox as bP,pick$1 as bQ,Slider$2 as bR,isFromWindows as bS,__awaiter as bT,__generator as bU,__spread as bV,PropTypes as bW,ChevronLeft as bX,ChevronRight as bY,isInForm as bZ,toString_1 as b_,isMobile_1 as ba,CAMERA_PERMISSION_URL as bb,StyledWidgetLabelHelp as bc,isFocusVisible as bd,getOverride as be,getOverrideProps as bf,StyledCheckbox$1 as bg,Checkbox$1 as bh,StyledContent as bi,BaseColorPicker as bj,useStyletron as bk,mergeOverride as bl,toObjectOverride as bm,Icon$1 as bn,UIDConsumer as bo,StatefulMenu as bp,mergeOverrides as bq,ChevronDown$1 as br,ThemeContext as bs,forkFocus as bt,forkBlur as bu,Select as bv,without$1 as bw,fuzzyFilterSelectOptions as bx,TYPE as by,VirtualDropdown as bz,createStyled as c,ThemeProvider$1 as c0,createThemedStyled as c1,createThemedUseStyletron as c2,createThemedWithStyle as c3,expandBorderStyles as c4,withStyle as c5,reactIsExports$1 as c6,NumberInput$1 as c7,_hasPath as d,commonjsGlobal$1 as e,classnamesExports as f,getDefaultExportFromCjs$1 as g,_root as h,isPropValid as i,jsxRuntimeExports as j,keyframes as k,isObject_1 as l,_Set as m,_setToArray as n,_SetCache as o,propTypesExports as p,_arrayIncludes as q,reactExports as r,_arrayIncludesWith as s,toNumber_1 as t,useStliteMediaObjectUrl as u,_cacheHas as v,groupBy$1 as w,__vitePreload as x,flatten$2 as y,require$$0$2 as z};