streamlit-nightly 1.41.2.dev20250119__py2.py3-none-any.whl → 1.41.2.dev20250120__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- streamlit/config.py +14 -0
- streamlit/runtime/runtime.py +8 -3
- streamlit/static/index.html +1 -1
- streamlit/static/static/js/{FileDownload.esm.BUw5ikQY.js → FileDownload.esm.DW9qPsuf.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.Bvmaiutv.js → FormClearHelper.BP4f-wKq.js} +1 -1
- streamlit/static/static/js/{Hooks.DcERo8tB.js → Hooks.DNhdjC_E.js} +1 -1
- streamlit/static/static/js/{InputInstructions.BupGmSrJ.js → InputInstructions.6chqAOMM.js} +1 -1
- streamlit/static/static/js/{ProgressBar.CTBNJVpb.js → ProgressBar.D-DmAAiN.js} +1 -1
- streamlit/static/static/js/{RenderInPortalIfExists.BhbPC-G8.js → RenderInPortalIfExists.cTCR1GXI.js} +1 -1
- streamlit/static/static/js/{Toolbar.Dw79Vekz.js → Toolbar.IB7xmaQ3.js} +1 -1
- streamlit/static/static/js/{base-input.BBtHVXa2.js → base-input.DIQMGXMv.js} +1 -1
- streamlit/static/static/js/{createSuper.BBR-BbJr.js → createSuper.Do1oR0VE.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.DuZabixr.js → data-grid-overlay-editor.0VbWmjRF.js} +1 -1
- streamlit/static/static/js/{downloader.4xvEoIbd.js → downloader.DFiVHqec.js} +1 -1
- streamlit/static/static/js/{es6.DmlLpYMO.js → es6.zKs-XsJ1.js} +2 -2
- streamlit/static/static/js/{getPrototypeOf.M3x98UQ7.js → getPrototypeOf.B4u2uvgs.js} +1 -1
- streamlit/static/static/js/{iframeResizer.contentWindow.CgYHddZ1.js → iframeResizer.contentWindow.Cfik70yz.js} +1 -1
- streamlit/static/static/js/{index.AoUAN-9W.js → index.3XcxQYzA.js} +1 -1
- streamlit/static/static/js/{index.CC_t9mT8.js → index.5idohwqh.js} +1 -1
- streamlit/static/static/js/{index.27TXU2hu.js → index.9Tcn_7uz.js} +1 -1
- streamlit/static/static/js/{index.DZdyNQo1.js → index.B-nmc5wO.js} +1 -1
- streamlit/static/static/js/{index.C8nPrwl-.js → index.B94PZPeI.js} +1 -1
- streamlit/static/static/js/{index.tjVAqGRi.js → index.BBGa9-EC.js} +1 -1
- streamlit/static/static/js/{index.DvfPGXer.js → index.BCrCxn8x.js} +1 -1
- streamlit/static/static/js/{index.61noqmIB.js → index.BMaqPVq6.js} +1 -1
- streamlit/static/static/js/{index.DysCLUsb.js → index.BST23kXB.js} +1 -1
- streamlit/static/static/js/{index.CsdGlifB.js → index.BTG890If.js} +1 -1
- streamlit/static/static/js/{index.PWzpo-hC.js → index.BVS_Npso.js} +1 -1
- streamlit/static/static/js/{index.CeKudMLQ.js → index.Bht8Ku38.js} +1 -1
- streamlit/static/static/js/{index.DH9CvsgQ.js → index.BsLun9mO.js} +1 -1
- streamlit/static/static/js/{index.BtxHQDnZ.js → index.BuQ40cTc.js} +1 -1
- streamlit/static/static/js/{index.DqjAk5qg.js → index.C2x7lWrn.js} +1 -1
- streamlit/static/static/js/{index.CkCtIbw0.js → index.CAOOu98T.js} +1 -1
- streamlit/static/static/js/{index.C4Hwzvpq.js → index.CBzV6LFM.js} +1 -1
- streamlit/static/static/js/{index.DKi-ElEv.js → index.CEyo-K3a.js} +1 -1
- streamlit/static/static/js/{index.B1KjaM9R.js → index.CLEzQJ1l.js} +1 -1
- streamlit/static/static/js/{index.Bq6R9vFh.js → index.CRt7DW67.js} +1 -1
- streamlit/static/static/js/{index.Bu8uxdTh.js → index.CTVIegXx.js} +1 -1
- streamlit/static/static/js/{index.CrcobIb0.js → index.Ca6320CT.js} +5 -5
- streamlit/static/static/js/{index.g24MGpB6.js → index.Cf3IO5h3.js} +1 -1
- streamlit/static/static/js/{index.Dva5NuFG.js → index.Ci9WPusu.js} +1 -1
- streamlit/static/static/js/{index.WSrEkxsE.js → index.CkJysN98.js} +1 -1
- streamlit/static/static/js/{index.BXejhz8S.js → index.CkgGJqBi.js} +5 -5
- streamlit/static/static/js/{index.DeeIZCGU.js → index.D1gCIQ1C.js} +1 -1
- streamlit/static/static/js/{index.STXqYP7Q.js → index.DOO7x26L.js} +1 -1
- streamlit/static/static/js/{index.DcY4XgAF.js → index.DZ31yuLl.js} +1 -1
- streamlit/static/static/js/{index.C21AcM0r.js → index.DfqbHOMy.js} +1 -1
- streamlit/static/static/js/{index.BYyuymTq.js → index.DkCDzK1i.js} +1 -1
- streamlit/static/static/js/{index.CAZxiea2.js → index.DqoGamDV.js} +1 -1
- streamlit/static/static/js/{index.BaskQ92_.js → index.DrXNN7P-.js} +1 -1
- streamlit/static/static/js/{index.CjxOLcYo.js → index.DuwDNwdn.js} +1 -1
- streamlit/static/static/js/{index.rOJcC1R3.js → index.DwhO3jNA.js} +1 -1
- streamlit/static/static/js/{index.CuzQoPgT.js → index.IHJq2nuU.js} +1 -1
- streamlit/static/static/js/{index.C-0rgxAG.js → index.VSTrmYr_.js} +1 -1
- streamlit/static/static/js/{input.BIth4Mda.js → input.hHglMwJu.js} +1 -1
- streamlit/static/static/js/{memory.C0ticMnk.js → memory.BotKhGox.js} +1 -1
- streamlit/static/static/js/{mergeWith.CnJI40Ol.js → mergeWith.dOmek2Nz.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.B4oKK-_Y.js → number-overlay-editor.DIhHlsX3.js} +1 -1
- streamlit/static/static/js/{sandbox.D1ghBIHY.js → sandbox.BlY_yl1S.js} +1 -1
- streamlit/static/static/js/{slicedToArray.C1s2cVDA.js → slicedToArray.xYln54_I.js} +1 -1
- streamlit/static/static/js/{textarea.C1RJDJe0.js → textarea.B9cq_go8.js} +1 -1
- streamlit/static/static/js/{timepicker.CmttWl-Y.js → timepicker.R8Q_Yl7H.js} +1 -1
- streamlit/static/static/js/{uniqueId.BT1SAZF-.js → uniqueId.CKxaEvFc.js} +1 -1
- streamlit/static/static/js/{useBasicWidgetState.BB9oQkjJ.js → useBasicWidgetState.DY0Kwuur.js} +1 -1
- streamlit/static/static/js/{useOnInputChange.DldtvoCQ.js → useOnInputChange.CAEw-Xl5.js} +1 -1
- streamlit/static/static/js/{withFullScreenWrapper.CWPfcXAP.js → withFullScreenWrapper.Def4ZoAl.js} +1 -1
- {streamlit_nightly-1.41.2.dev20250119.dist-info → streamlit_nightly-1.41.2.dev20250120.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.41.2.dev20250119.dist-info → streamlit_nightly-1.41.2.dev20250120.dist-info}/RECORD +72 -72
- {streamlit_nightly-1.41.2.dev20250119.data → streamlit_nightly-1.41.2.dev20250120.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.41.2.dev20250119.dist-info → streamlit_nightly-1.41.2.dev20250120.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.41.2.dev20250119.dist-info → streamlit_nightly-1.41.2.dev20250120.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.41.2.dev20250119.dist-info → streamlit_nightly-1.41.2.dev20250120.dist-info}/top_level.txt +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index.
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index.CBzV6LFM.js","./RenderInPortalIfExists.cTCR1GXI.js","./index.DuwDNwdn.js","./index.CkgGJqBi.js","./FormClearHelper.BP4f-wKq.js","./withFullScreenWrapper.Def4ZoAl.js","./Toolbar.IB7xmaQ3.js","./mergeWith.dOmek2Nz.js","./sprintf.C-r3gIuM.js","./createDownloadLinkElement.DZMwyjvU.js","./slicedToArray.xYln54_I.js","./getPrototypeOf.B4u2uvgs.js","./createSuper.Do1oR0VE.js","./FileDownload.esm.DW9qPsuf.js","../css/index.B26BQfSF.css","./index.BTG890If.js","./threshold.B8r8f5kt.js","./value.iufjd77T.js","./timer.RueuYoQV.js","./index.BsLun9mO.js","./useBasicWidgetState.DY0Kwuur.js","../css/index.CG16XVnL.css","./index.C2x7lWrn.js","./index.CkJysN98.js","./index.DZ31yuLl.js","./index.DwhO3jNA.js","./Hooks.DNhdjC_E.js","./index.CTVIegXx.js","./index.DOO7x26L.js","./index.CLEzQJ1l.js","./UploadFileInfo.C-jY39rj.js","./ProgressBar.D-DmAAiN.js","./index.BBGa9-EC.js","./InputInstructions.6chqAOMM.js","./inputUtils.CQWz5UKz.js","./textarea.B9cq_go8.js","./base-input.DIQMGXMv.js","./index.DqoGamDV.js","./index.CAOOu98T.js","./index.CEyo-K3a.js","./timepicker.R8Q_Yl7H.js","./input.hHglMwJu.js","./index.9Tcn_7uz.js","./index.IHJq2nuU.js","./index.Cf3IO5h3.js","./index.CRt7DW67.js","./index.BVS_Npso.js","./index.DkCDzK1i.js","./index.VSTrmYr_.js","./uniqueId.CKxaEvFc.js","./useOnInputChange.CAEw-Xl5.js","./index.DfqbHOMy.js","./index.D1gCIQ1C.js","./index.BuQ40cTc.js"])))=>i.map(i=>d[i]);
|
2
2
|
var lr=Object.defineProperty;var B1=tt=>{throw TypeError(tt)};var sr=(tt,nt,et)=>nt in tt?lr(tt,nt,{enumerable:!0,configurable:!0,writable:!0,value:et}):tt[nt]=et;var In=(tt,nt,et)=>sr(tt,typeof nt!="symbol"?nt+"":nt,et),$1=(tt,nt,et)=>nt.has(tt)||B1("Cannot "+et);var _0=(tt,nt,et)=>($1(tt,nt,"read from private field"),et?et.call(tt):nt.get(tt)),Q0=(tt,nt,et)=>nt.has(tt)?B1("Cannot add the same private member more than once"):nt instanceof WeakSet?nt.add(tt):nt.set(tt,et),K0=(tt,nt,et,rt)=>($1(tt,nt,"write to private field"),rt?rt.call(tt,et):nt.set(tt,et),et),$0=(tt,nt,et)=>($1(tt,nt,"access private method"),et);function _mergeNamespaces(tt,nt){for(var et=0;et<nt.length;et++){const rt=nt[et];if(typeof rt!="string"&&!Array.isArray(rt)){for(const ot in rt)if(ot!=="default"&&!(ot in tt)){const at=Object.getOwnPropertyDescriptor(rt,ot);at&&Object.defineProperty(tt,ot,at.get?at:{enumerable:!0,get:()=>rt[ot]})}}}return Object.freeze(Object.defineProperty(tt,Symbol.toStringTag,{value:"Module"}))}(function(){const nt=document.createElement("link").relList;if(nt&&nt.supports&&nt.supports("modulepreload"))return;for(const ot of document.querySelectorAll('link[rel="modulepreload"]'))rt(ot);new MutationObserver(ot=>{for(const at of ot)if(at.type==="childList")for(const st of at.addedNodes)st.tagName==="LINK"&&st.rel==="modulepreload"&&rt(st)}).observe(document,{childList:!0,subtree:!0});function et(ot){const at={};return ot.integrity&&(at.integrity=ot.integrity),ot.referrerPolicy&&(at.referrerPolicy=ot.referrerPolicy),ot.crossOrigin==="use-credentials"?at.credentials="include":ot.crossOrigin==="anonymous"?at.credentials="omit":at.credentials="same-origin",at}function rt(ot){if(ot.ep)return;ot.ep=!0;const at=et(ot);fetch(ot.href,at)}})();var commonjsGlobal$1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs$1(tt){return tt&&tt.__esModule&&Object.prototype.hasOwnProperty.call(tt,"default")?tt.default:tt}function getAugmentedNamespace(tt){if(tt.__esModule)return tt;var nt=tt.default;if(typeof nt=="function"){var et=function rt(){return this instanceof rt?Reflect.construct(nt,arguments,this.constructor):nt.apply(this,arguments)};et.prototype=nt.prototype}else et={};return Object.defineProperty(et,"__esModule",{value:!0}),Object.keys(tt).forEach(function(rt){var ot=Object.getOwnPropertyDescriptor(tt,rt);Object.defineProperty(et,rt,ot.get?ot:{enumerable:!0,get:function(){return tt[rt]}})}),et}var jsxRuntime={exports:{}},reactJsxRuntime_production_min={},react={exports:{}},react_production_min={};/**
|
3
3
|
* @license React
|
4
4
|
* react.production.min.js
|
@@ -680,7 +680,7 @@ If this is an installed component that works locally, the app may be having trou
|
|
680
680
|
|
681
681
|
For more troubleshooting help, please see the [Streamlit Component docs](${COMPONENT_DEVELOPER_URL}) or visit our [forums](${COMMUNITY_URL}).`,et}function tryParseArgs(tt,nt,et,rt){if(!rt)try{return parseArgs(tt,nt)}catch(ot){const at=ensureError(ot);et(at)}return[{},[]]}function compareDataframeArgs(tt,nt){return tt===nt||tt.length===nt.length&&tt.every((et,rt)=>{const ot=nt[rt];return et.key===ot.key&&et.value===ot.value})}function ComponentInstance(tt){const[nt,et]=reactExports.useState(),{disabled:rt,element:ot,registry:at,theme:st,widgetMgr:ut,width:ct,fragmentId:pt}=tt,{componentName:dt,jsonArgs:ft,specialArgs:bt,url:ht}=ot,[Mt,mt]=tryParseArgs(ft,bt,et,nt),Ot=reactExports.useRef({args:{},dataframeArgs:[]}),zt=compareDataframeArgs(Ot.current.dataframeArgs,mt);Ot.current.args=Mt,Ot.current.dataframeArgs=mt;const[yt,vt]=reactExports.useState(),[At,St]=reactExports.useState(isNaN(Mt.height)?void 0:Mt.height),Et=reactExports.useRef(!1),Tt=reactExports.useRef(null),Rt=reactExports.useRef(),Ct=useTimeout(()=>logWarning(getWarnMessage(dt,ht)),COMPONENT_READY_WARNING_TIME_MS/4),wt=useTimeout(()=>vt(!0),COMPONENT_READY_WARNING_TIME_MS);if(reactExports.useEffect(()=>{Et.current&&sendRenderMessage(Ot.current.args,Ot.current.dataframeArgs,rt,st,Tt.current??void 0)},[rt,At,zt,ft,st,ct]),reactExports.useEffect(()=>{const jt=Ut=>{Ut!==void 0&&Ut!==At&&(isNullOrUndefined$1(Tt.current)||(Tt.current.height=Ut.toString(),St(Ut)))},s0=()=>{sendRenderMessage(Ot.current.args,Ot.current.dataframeArgs,rt,st,Tt.current??void 0),Ct(),wt(),Et.current=!0,vt(!1)};Rt.current={isReady:()=>Et.current,element:ot,widgetMgr:ut,setComponentError:et,componentReadyCallback:s0,frameHeightCallback:jt,fragmentId:pt}},[dt,rt,ot,At,zt,yt,ft,st,ut,wt,Ct,pt]),reactExports.useEffect(()=>{var s0;const jt=((s0=Tt.current)==null?void 0:s0.contentWindow)??void 0;if(jt)return at.registerListener(jt,createIframeMessageHandler(Rt)),()=>{jt&&at.deregisterListener(jt)}},[at,dt]),nt)return jsx$1(ErrorElement,{name:nt.name,message:nt.message});const Ft=!Et.current&&!yt&&At!==0&&jsx$1(Skeleton,{element:Skeleton$1.create({height:At,style:Skeleton$1.SkeletonStyle.ELEMENT})}),Ht=!Et.current&&yt?jsx$1(AlertElement,{width:ct,body:getWarnMessage(dt,ht),kind:Kind.WARNING}):null;return jsxs(Fragment,{children:[Ft,Ht,jsx$1(StyledComponentIframe,{className:"stCustomComponentV1","data-testid":"stCustomComponentV1",allow:DEFAULT_IFRAME_FEATURE_POLICY,ref:Tt,src:getSrc(dt,at,ht),width:ct,height:At??0,scrolling:"no",sandbox:DEFAULT_IFRAME_SANDBOX_POLICY,title:dt,componentReady:Et.current})]})}const ComponentInstance$1=withTheme(ComponentInstance);class ComponentRegistry{constructor(nt){this.msgListeners=new Map,this.registerListener=(et,rt)=>{this.msgListeners.has(et),this.msgListeners.set(et,rt)},this.deregisterListener=et=>{this.msgListeners.delete(et)},this.getComponentURL=(et,rt)=>this.endpoints.buildComponentURL(et,rt),this.onMessageEvent=et=>{if(isNullOrUndefined$1(et.data)||!et.data.hasOwnProperty("isStreamlitMessage"))return;if(isNullOrUndefined$1(et.source)){logWarning("Received component message with no eventSource!",et.data);return}const rt=this.msgListeners.get(et.source);if(isNullOrUndefined$1(rt)||typeof rt!="function"){logWarning("Received component message for unregistered ComponentInstance!",et.data);return}const{type:ot}=et.data;if(isNullOrUndefined$1(ot)){logWarning("Received Streamlit message with no type!",et.data);return}rt(ot,et.data)},this.endpoints=nt,window.addEventListener("message",this.onMessageEvent)}}const Maybe=reactExports.memo(function tt({children:nt}){return jsx$1(Fragment,{children:nt})},(tt,nt)=>!(tt.enable||nt.enable));function makeMarkdownHeading(tt,nt){switch(tt.toLowerCase()){case Tags.H1:return`# ${nt}`;case Tags.H2:return`## ${nt}`;case Tags.H3:return`### ${nt}`;default:throw new Error(`Unrecognized tag for header: ${tt}`)}}function Heading(tt){const{width:nt,element:et}=tt,{tag:rt,anchor:ot,body:at,help:st,hideAnchor:ut,divider:ct}=et,pt=React$1.useContext(IsSidebarContext),dt=React$1.useContext(IsDialogContext),[ft,...bt]=at.split(`
|
682
682
|
`);return jsxs("div",{style:{width:nt},className:"stHeading","data-testid":"stHeading",children:[jsxs(StyledStreamlitMarkdown,{isCaption:!1,isInSidebarOrDialog:pt||dt,style:{width:nt},"data-testid":"stMarkdownContainer",children:[jsx$1(HeadingWithActionElements,{anchor:ot,help:st,hideAnchor:ut,tag:rt,children:jsx$1(RenderedMarkdown,{allowHTML:!1,source:makeMarkdownHeading(rt,ft),overrideComponents:{p:reactExports.Fragment,h1:reactExports.Fragment,h2:reactExports.Fragment,h3:reactExports.Fragment,h4:reactExports.Fragment,h5:reactExports.Fragment,h6:reactExports.Fragment}})}),bt.length>0&&jsx$1(RenderedMarkdown,{source:bt.join(`
|
683
|
-
`),allowHTML:!1})]}),ct&&jsx$1(StyledHeaderDivider,{"data-testid":"stHeadingDivider",rainbow:ct.includes("linear"),color:ct})]})}const StyledCheckbox$1=newStyled("div",{target:"e1kzzvq90"})(({width:tt,theme:nt})=>({width:tt,display:"flex",alignItems:"center",minHeight:nt.sizes.smallElementHeight})),StyledContent=newStyled("div",{target:"e1kzzvq91"})(({visibility:tt})=>({display:tt===LabelVisibilityOptions.Collapsed?"none":"flex",visibility:tt===LabelVisibilityOptions.Hidden?"hidden":"visible",verticalAlign:"middle",flexDirection:"row",alignItems:"center"}));function translateGapWidth(tt,nt){let et=nt.spacing.lg;return tt==="medium"?et=nt.spacing.threeXL:tt==="large"&&(et=nt.spacing.fourXL),et}const StyledHorizontalBlock=newStyled("div",{target:"e1kefhzc0"})(({theme:tt,gap:nt})=>({display:"flex",flexWrap:"wrap",flexGrow:1,alignItems:"stretch",gap:translateGapWidth(nt,tt)})),GLOBAL_ELEMENTS=["balloons","snow"],StyledElementContainer=newStyled("div",{target:"e1kefhzc1"})(({theme:tt,isStale:nt,width:et,elementType:rt})=>({width:et,position:"relative","@media print":{overflow:"visible"},":is(.stHtml-empty)":{display:"none"},":has(> .stCacheSpinner)":{height:tt.spacing.none,overflow:"visible",visibility:"visible",marginBottom:`-${tt.spacing.lg}`,zIndex:tt.zIndices.cacheSpinner},":has(> .stPageLink)":{marginTop:`-${tt.spacing.xs}`,marginBottom:`-${tt.spacing.xs}`},...nt&&rt!=="skeleton"&&STALE_STYLES,...rt==="empty"?{display:"none"}:{},...GLOBAL_ELEMENTS.includes(rt)?{marginBottom:`-${tt.spacing.lg}`}:{}})),StyledColumn=newStyled("div",{target:"e1kefhzc2"})(({theme:tt,weight:nt,gap:et,showBorder:rt,verticalAlignment:ot})=>{const{VerticalAlignment:at}=Block$2.Column,st=nt*100,ut=translateGapWidth(et,tt),ct=`calc(${st}% - ${ut})`;return{width:ct,flex:`1 1 ${ct}`,[`@media (max-width: ${tt.breakpoints.columns})`]:{minWidth:`calc(100% - ${tt.spacing.twoXL})`},...ot===at.BOTTOM&&{marginTop:"auto",[`& ${StyledElementContainer}:last-of-type > ${StyledCheckbox$1}`]:{marginBottom:tt.spacing.sm}},...ot===at.TOP&&{[`& ${StyledElementContainer}:last-of-type > ${StyledCheckbox$1}`]:{marginTop:tt.spacing.sm}},...ot===at.CENTER&&{marginTop:"auto",marginBottom:"auto"},...rt&&{border:`${tt.sizes.borderWidth} solid ${tt.colors.borderColor}`,borderRadius:tt.radii.default,padding:`calc(${tt.spacing.lg} - ${tt.sizes.borderWidth})`}}}),StyledVerticalBlock=newStyled("div",{target:"e1kefhzc3"})(({width:tt,theme:nt})=>({width:tt,position:"relative",display:"flex",flex:1,flexDirection:"column",gap:nt.spacing.lg})),StyledVerticalBlockWrapper=newStyled("div",{target:"e1kefhzc4"})({display:"flex",flexDirection:"column",flex:1}),StyledVerticalBlockBorderWrapper=newStyled("div",{target:"e1kefhzc5"})(({theme:tt,border:nt,height:et})=>({...nt&&{border:`${tt.sizes.borderWidth} solid ${tt.colors.borderColor}`,borderRadius:tt.radii.default,padding:`calc(${tt.spacing.lg} - ${tt.sizes.borderWidth})`},...et&&{height:`${et}px`,overflow:"auto"}})),Audio=React$1.lazy(()=>__vitePreload(()=>import("./index.CeKudMLQ.js"),[],import.meta.url)),Balloons=React$1.lazy(()=>__vitePreload(()=>import("./index.C4Hwzvpq.js"),__vite__mapDeps([0,1]),import.meta.url)),Snow=React$1.lazy(()=>__vitePreload(()=>import("./index.CjxOLcYo.js"),__vite__mapDeps([2,1]),import.meta.url)),ArrowDataFrame=React$1.lazy(()=>__vitePreload(()=>import("./index.BXejhz8S.js").then(tt=>tt.c),__vite__mapDeps([3,4,5,6,7,8,9,10,11,12,13,14]),import.meta.url)),ArrowVegaLiteChart=React$1.lazy(()=>__vitePreload(()=>import("./index.CsdGlifB.js"),__vite__mapDeps([15,6,5,7,16,17,18,4]),import.meta.url)),Toast=React$1.lazy(()=>__vitePreload(()=>import("./index.DvfPGXer.js"),[],import.meta.url)),BokehChart=React$1.lazy(()=>__vitePreload(()=>import("./index.CC_t9mT8.js"),[],import.meta.url)),DebouncedBokehChart=debounceRender(BokehChart,100),DeckGlJsonChart=React$1.lazy(()=>__vitePreload(()=>import("./index.DH9CvsgQ.js"),__vite__mapDeps([19,10,11,6,5,20,4,16,17,21]),import.meta.url)),GraphVizChart=React$1.lazy(()=>__vitePreload(()=>import("./index.DqjAk5qg.js"),__vite__mapDeps([22,18,17,6,5]),import.meta.url)),IFrame=React$1.lazy(()=>__vitePreload(()=>import("./index.DZdyNQo1.js"),[],import.meta.url)),ImageList=React$1.lazy(()=>__vitePreload(()=>import("./index.WSrEkxsE.js"),__vite__mapDeps([23,6,5]),import.meta.url)),LinkButton=React$1.lazy(()=>__vitePreload(()=>import("./index.DysCLUsb.js"),[],import.meta.url)),PageLink=React$1.lazy(()=>__vitePreload(()=>import("./index.Dva5NuFG.js"),[],import.meta.url)),PlotlyChart=React$1.lazy(()=>__vitePreload(()=>import("./index.DcY4XgAF.js"),__vite__mapDeps([24,4,5]),import.meta.url)),Video=React$1.lazy(()=>__vitePreload(()=>import("./index.C8nPrwl-.js"),[],import.meta.url)),AudioInput=React$1.lazy(()=>__vitePreload(()=>import("./index.rOJcC1R3.js"),__vite__mapDeps([25,4,6,26,9,13]),import.meta.url)),Button=React$1.lazy(()=>__vitePreload(()=>import("./index.BaskQ92_.js"),[],import.meta.url)),ButtonGroup=React$1.lazy(()=>__vitePreload(()=>import("./index.Bu8uxdTh.js"),__vite__mapDeps([27,20,4]),import.meta.url)),DownloadButton=React$1.lazy(()=>__vitePreload(()=>import("./index.STXqYP7Q.js"),__vite__mapDeps([28,9]),import.meta.url)),CameraInput=React$1.lazy(()=>__vitePreload(()=>import("./index.B1KjaM9R.js"),__vite__mapDeps([29,4,30,31]),import.meta.url)),ChatInput=React$1.lazy(()=>__vitePreload(()=>import("./index.tjVAqGRi.js"),__vite__mapDeps([32,33,34,35,36]),import.meta.url)),Checkbox=React$1.lazy(()=>__vitePreload(()=>import("./index.CAZxiea2.js"),__vite__mapDeps([37,20,4]),import.meta.url)),ColorPicker=React$1.lazy(()=>__vitePreload(()=>import("./index.CkCtIbw0.js"),__vite__mapDeps([38,20,4]),import.meta.url)),DateInput=React$1.lazy(()=>__vitePreload(()=>import("./index.DKi-ElEv.js"),__vite__mapDeps([39,20,4,40,11,12,41,36]),import.meta.url)),Html=React$1.lazy(()=>__vitePreload(()=>import("./index.61noqmIB.js"),[],import.meta.url)),Multiselect=React$1.lazy(()=>__vitePreload(()=>import("./index.27TXU2hu.js"),__vite__mapDeps([42,20,4]),import.meta.url)),Progress=React$1.lazy(()=>__vitePreload(()=>import("./index.CuzQoPgT.js"),__vite__mapDeps([43,31]),import.meta.url)),Spinner=React$1.lazy(()=>__vitePreload(()=>import("./index.AoUAN-9W.js"),[],import.meta.url)),Radio=React$1.lazy(()=>__vitePreload(()=>import("./index.g24MGpB6.js"),__vite__mapDeps([44,20,4]),import.meta.url)),Selectbox$1=React$1.lazy(()=>__vitePreload(()=>import("./index.Bq6R9vFh.js"),__vite__mapDeps([45,20,4]),import.meta.url)),Slider$1=React$1.lazy(()=>__vitePreload(()=>import("./index.PWzpo-hC.js"),__vite__mapDeps([46,8,20,4]),import.meta.url)),FileUploader=React$1.lazy(()=>__vitePreload(()=>import("./index.BYyuymTq.js"),__vite__mapDeps([47,4,31,26,30]),import.meta.url)),TextArea=React$1.lazy(()=>__vitePreload(()=>import("./index.C-0rgxAG.js"),__vite__mapDeps([48,49,50,34,33,20,4,35,36]),import.meta.url)),TextInput=React$1.lazy(()=>__vitePreload(()=>import("./index.C21AcM0r.js"),__vite__mapDeps([51,49,50,34,20,4,33,41,36]),import.meta.url)),TimeInput=React$1.lazy(()=>__vitePreload(()=>import("./index.DeeIZCGU.js"),__vite__mapDeps([52,20,4,40,11,12]),import.meta.url)),NumberInput=React$1.lazy(()=>__vitePreload(()=>import("./index.BtxHQDnZ.js"),__vite__mapDeps([53,8,49,4,33,41,36]),import.meta.url)),StreamlitSyntaxHighlighter=React$1.lazy(()=>__vitePreload(()=>Promise.resolve().then(()=>StreamlitSyntaxHighlighter$2),void 0,import.meta.url));function hideIfStale(tt,nt){return tt?jsx$1(Fragment,{}):nt}const RawElementNodeRenderer=tt=>{const{node:nt}=tt;if(!nt)throw new Error("ElementNode not found.");const et={width:tt.width,disableFullscreenMode:tt.disableFullscreenMode},rt={...et,widgetMgr:tt.widgetMgr,disabled:tt.widgetsDisabled,fragmentId:nt.fragmentId};switch(nt.element.type){case"alert":{const at=nt.element.alert;return jsx$1(AlertElement,{icon:at.icon,body:at.body,kind:getAlertElementKind(at.format),...et})}case"arrowTable":return jsx$1(ArrowTable$1,{element:nt.quiverElement,...et});case"audio":return jsx$1(Audio,{element:nt.element.audio,endpoints:tt.endpoints,...et,elementMgr:tt.widgetMgr});case"balloons":return hideIfStale(tt.isStale,jsx$1(Balloons,{scriptRunId:tt.scriptRunId}));case"bokehChart":return jsx$1(DebouncedBokehChart,{element:nt.element.bokehChart,...et});case"code":{const at=nt.element.code;return jsx$1(StreamlitSyntaxHighlighter,{language:at.language,showLineNumbers:at.showLineNumbers,wrapLines:at.wrapLines,height:at.height,children:at.codeText})}case"deckGlJsonChart":return jsx$1(DeckGlJsonChart,{element:nt.element.deckGlJsonChart,...rt});case"docString":return jsx$1(DocString,{element:nt.element.docString,...et});case"empty":return jsx$1("div",{className:"stEmpty","data-testid":"stEmpty"});case"exception":return jsx$1(ExceptionElement,{element:nt.element.exception,...et});case"graphvizChart":return jsx$1(GraphVizChart,{element:nt.element.graphvizChart,...et});case"heading":return jsx$1(Heading,{element:nt.element.heading,...et});case"iframe":return jsx$1(IFrame,{element:nt.element.iframe,...et});case"imgs":return jsx$1(ImageList,{element:nt.element.imgs,endpoints:tt.endpoints,...et});case"json":return jsx$1(Json,{element:nt.element.json,...et});case"markdown":return jsx$1(Markdown,{element:nt.element.markdown,...et});case"metric":return jsx$1(Metric,{element:nt.element.metric});case"html":return jsx$1(Html,{element:nt.element.html,...et});case"pageLink":{const at=nt.element.pageLink,st=rt.disabled||at.disabled;return jsx$1(PageLink,{element:at,disabled:st,...et})}case"progress":return jsx$1(Progress,{element:nt.element.progress,...et});case"skeleton":return jsx$1(Skeleton,{element:nt.element.skeleton});case"snow":return hideIfStale(tt.isStale,jsx$1(Snow,{scriptRunId:tt.scriptRunId}));case"spinner":return jsx$1(Spinner,{element:nt.element.spinner,...et});case"text":return jsx$1(TextElement,{element:nt.element.text,...et});case"video":return jsx$1(Video,{element:nt.element.video,endpoints:tt.endpoints,...et,elementMgr:tt.widgetMgr});case"toast":{const at=nt.element.toast;return jsx$1(Toast,{body:at.body,icon:at.icon,...et},nt.scriptRunId)}case"arrowDataFrame":{const at=nt.element.arrowDataFrame;return rt.disabled=rt.disabled||at.disabled,jsx$1(ArrowDataFrame,{element:at,data:nt.quiverElement,...at.id&&{key:at.id},...rt})}case"arrowVegaLiteChart":const ot=nt.vegaLiteChartElement;return jsx$1(ArrowVegaLiteChart,{element:ot,...rt},ot.id||void 0);case"audioInput":{const at=nt.element.audioInput;return rt.disabled=rt.disabled||at.disabled,jsx$1(AudioInput,{uploadClient:tt.uploadClient,element:at,...rt},at.id)}case"button":{const at=nt.element.button;if(rt.disabled=rt.disabled||at.disabled,at.isFormSubmitter){const{formId:st}=at,ut=tt.formsData.formsWithUploads.has(st);return jsx$1(FormSubmitContent,{element:at,hasInProgressUpload:ut,...rt})}return jsx$1(Button,{element:at,...rt})}case"buttonGroup":{const at=nt.element.buttonGroup;return rt.disabled=rt.disabled||at.disabled,jsx$1(ButtonGroup,{element:at,...rt},at.id)}case"downloadButton":{const at=nt.element.downloadButton;return rt.disabled=rt.disabled||at.disabled,jsx$1(DownloadButton,{endpoints:tt.endpoints,element:at,...rt},at.id)}case"cameraInput":{const at=nt.element.cameraInput;return rt.disabled=rt.disabled||at.disabled,jsx$1(CameraInput,{element:at,uploadClient:tt.uploadClient,...rt},at.id)}case"chatInput":{const at=nt.element.chatInput;return rt.disabled=rt.disabled||at.disabled,jsx$1(ChatInput,{element:at,...rt},at.id)}case"checkbox":{const at=nt.element.checkbox;return rt.disabled=rt.disabled||at.disabled,jsx$1(Checkbox,{element:at,...rt},at.id)}case"colorPicker":{const at=nt.element.colorPicker;return rt.disabled=rt.disabled||at.disabled,jsx$1(ColorPicker,{element:at,...rt},at.id)}case"componentInstance":return jsx$1(ComponentInstance$1,{registry:tt.componentRegistry,element:nt.element.componentInstance,...rt});case"dateInput":{const at=nt.element.dateInput;return rt.disabled=rt.disabled||at.disabled,jsx$1(DateInput,{element:at,...rt},at.id)}case"fileUploader":{const at=nt.element.fileUploader;return rt.disabled=rt.disabled||at.disabled,jsx$1(FileUploader,{element:at,uploadClient:tt.uploadClient,...rt},at.id)}case"linkButton":{const at=nt.element.linkButton;return rt.disabled=rt.disabled||at.disabled,jsx$1(LinkButton,{element:at,...rt})}case"multiselect":{const at=nt.element.multiselect;return rt.disabled=rt.disabled||at.disabled,jsx$1(Multiselect,{element:at,...rt},at.id)}case"numberInput":{const at=nt.element.numberInput;return rt.disabled=rt.disabled||at.disabled,jsx$1(NumberInput,{element:at,...rt},at.id)}case"plotlyChart":{const at=nt.element.plotlyChart;return jsx$1(PlotlyChart,{element:at,...rt},at.id)}case"radio":{const at=nt.element.radio;return rt.disabled=rt.disabled||at.disabled,jsx$1(Radio,{element:at,...rt},at.id)}case"selectbox":{const at=nt.element.selectbox;return rt.disabled=rt.disabled||at.disabled,jsx$1(Selectbox$1,{element:at,...rt},at.id)}case"slider":{const at=nt.element.slider;return rt.disabled=rt.disabled||at.disabled,jsx$1(Slider$1,{element:at,...rt},at.id)}case"textArea":{const at=nt.element.textArea;return rt.disabled=rt.disabled||at.disabled,jsx$1(TextArea,{element:at,...rt},at.id)}case"textInput":{const at=nt.element.textInput;return rt.disabled=rt.disabled||at.disabled,jsx$1(TextInput,{element:at,...rt},at.id)}case"timeInput":{const at=nt.element.timeInput;return rt.disabled=rt.disabled||at.disabled,jsx$1(TimeInput,{element:at,...rt},at.id)}default:throw new Error(`Unrecognized Element type ${nt.element.type}`)}},ElementNodeRenderer=tt=>{const{isFullScreen:nt,fragmentIdsThisRun:et}=React$1.useContext(LibContext),{node:rt,width:ot}=tt,at=rt.element.type||"",st=shouldComponentBeEnabled(at,tt.scriptRunState),ut=isComponentStale(st,rt,tt.scriptRunState,tt.scriptRunId,et),ct=getElementId(rt.element),pt=getKeyFromId(ct);return jsx$1(Maybe,{enable:st,children:jsx$1(StyledElementContainer,{className:classNames("stElementContainer","element-container",convertKeyToClassName(pt)),"data-testid":"stElementContainer","data-stale":ut,isStale:ut&&!nt,width:ot,elementType:at,children:jsx$1(ErrorBoundary,{width:ot,children:jsx$1(reactExports.Suspense,{fallback:jsx$1(Skeleton,{element:Skeleton$1.create({style:Skeleton$1.SkeletonStyle.ELEMENT})}),children:jsx$1(RawElementNodeRenderer,{...tt,isStale:ut})})})})})},BlockNodeRenderer=tt=>{const{node:nt}=tt,{fragmentIdsThisRun:et}=reactExports.useContext(LibContext);if(nt.isEmpty&&!nt.deltaBlock.allowEmpty)return jsx$1(Fragment,{});const rt=shouldComponentBeEnabled("",tt.scriptRunState),ot=isComponentStale(rt,nt,tt.scriptRunState,tt.scriptRunId,et),at={...tt,node:nt},st=tt.disableFullscreenMode||notNullOrUndefined(nt.deltaBlock.dialog)||notNullOrUndefined(nt.deltaBlock.popover),ut=jsx$1(LayoutBlock,{...at,disableFullscreenMode:st});if(nt.deltaBlock.dialog)return jsx$1(DialogWithProvider,{element:nt.deltaBlock.dialog,deltaMsgReceivedAt:nt.deltaMsgReceivedAt,children:ut});if(nt.deltaBlock.expandable)return jsx$1(Expander,{empty:nt.isEmpty,isStale:ot,element:nt.deltaBlock.expandable,children:ut});if(nt.deltaBlock.popover)return jsx$1(Popover,{empty:nt.isEmpty,element:nt.deltaBlock.popover,width:tt.width,children:ut});if(nt.deltaBlock.type==="form"){const{formId:ct,clearOnSubmit:pt,enterToSubmit:dt,border:ft}=nt.deltaBlock.form,bt=tt.formsData.submitButtons.get(ct),ht=bt!==void 0&&bt.length>0;return jsx$1(Form,{formId:ct,clearOnSubmit:pt,enterToSubmit:dt,width:tt.width,hasSubmitButton:ht,scriptRunState:tt.scriptRunState,widgetMgr:tt.widgetMgr,border:ft,children:ut})}if(nt.deltaBlock.chatMessage)return jsx$1(ChatMessage,{element:nt.deltaBlock.chatMessage,endpoints:tt.endpoints,children:ut});if(nt.deltaBlock.column)return jsx$1(StyledColumn,{weight:nt.deltaBlock.column.weight??0,gap:nt.deltaBlock.column.gap??"",verticalAlignment:nt.deltaBlock.column.verticalAlignment??void 0,showBorder:nt.deltaBlock.column.showBorder??!1,className:"stColumn","data-testid":"stColumn",children:ut});if(nt.deltaBlock.tabContainer){const pt={...at,isStale:ot,renderTabContent:dt=>jsx$1(VerticalBlock,{...dt})};return jsx$1(Tabs,{...pt})}return ut},ChildRenderer=tt=>{const{libConfig:nt}=reactExports.useContext(LibContext);assignDividerColor(tt.node,useTheme());const et=new Set;return jsx$1(Fragment,{children:tt.node.children&&tt.node.children.map((rt,ot)=>{const at=nt.disableFullscreenMode||tt.disableFullscreenMode;if(rt instanceof ElementNode){const st={...tt,disableFullscreenMode:at,node:rt},ut=getElementId(rt.element)||ot.toString();return et.has(ut)?null:(et.add(ut),jsx$1(ElementNodeRenderer,{...st},ut))}if(rt instanceof BlockNode){const st={...tt,disableFullscreenMode:at,node:rt};return jsx$1(BlockNodeRenderer,{...st},ot)}throw new Error(`Unrecognized AppNode: ${rt}`)})})};function ScrollToBottomVerticalBlockWrapper(tt){const{border:nt,height:et,children:rt}=tt,ot=useScrollToBottom();return jsx$1(StyledVerticalBlockBorderWrapper,{border:nt,height:et,"data-testid":"stVerticalBlockBorderWrapper","data-test-scroll-behavior":"scroll-to-bottom",ref:ot,children:rt})}const VerticalBlock=tt=>{var ft,bt;const nt=reactExports.useRef(null),[et,rt]=React$1.useState(-1),ot=reactExports.useMemo(()=>new ResizeObserver(([ht])=>{window.requestAnimationFrame(()=>{rt(ht.target.getBoundingClientRect().width||-1)})}),[rt]),at=((ft=tt.node.deltaBlock.vertical)==null?void 0:ft.border)??!1,st=((bt=tt.node.deltaBlock.vertical)==null?void 0:bt.height)||void 0,ut=st&&tt.node.children.find(ht=>ht instanceof BlockNode&&ht.deltaBlock.type==="chatMessage")!==void 0;reactExports.useEffect(()=>(nt.current&&ot.observe(nt.current),()=>{ot.disconnect()}),[ot,ut]);const ct=ut?ScrollToBottomVerticalBlockWrapper:StyledVerticalBlockBorderWrapper,pt={...tt,width:et},dt=getKeyFromId(tt.node.deltaBlock.id);return jsx$1(ct,{border:at,height:st,"data-testid":"stVerticalBlockBorderWrapper","data-test-scroll-behavior":"normal",children:jsx$1(StyledVerticalBlockWrapper,{ref:nt,children:jsx$1(StyledVerticalBlock,{width:et,className:classNames("stVerticalBlock",convertKeyToClassName(dt)),"data-testid":"stVerticalBlock",children:jsx$1(ChildRenderer,{...pt})})})})},HorizontalBlock=tt=>{var et;const nt=((et=tt.node.deltaBlock.horizontal)==null?void 0:et.gap)??"";return jsx$1(StyledHorizontalBlock,{gap:nt,className:"stHorizontalBlock","data-testid":"stHorizontalBlock",children:jsx$1(ChildRenderer,{...tt})})};function LayoutBlock(tt){return tt.node.deltaBlock.horizontal?jsx$1(HorizontalBlock,{...tt}):jsx$1(VerticalBlock,{...tt})}const StyledDataFrameOverlay=newStyled("div",{target:"e19n7mk11"})(({theme:tt})=>({position:"fixed",top:0,left:0,zIndex:tt.zIndices.tablePortal,lineHeight:"100%"})),PortalContext=React$1.createContext(null),PortalProvider=({children:tt})=>{const nt=reactExports.useRef(null),et=reactExports.useCallback(()=>nt.current,[]);return jsxs(PortalContext.Provider,{value:et,children:[tt,jsx$1(StyledDataFrameOverlay,{"data-testid":"portal",id:"portal",ref:nt})]})};function ThemeProvider({theme:tt,baseuiTheme:nt,children:et}){return jsx$1(ThemeProvider$1,{theme:nt||baseuiLightTheme,children:jsx$1(ThemeProvider$2,{theme:tt,children:et})})}function toCodePoint(tt,nt){const et=[];let rt=0,ot=0,at=0;for(;at<tt.length;)rt=tt.charCodeAt(at++),ot?(et.push((65536+(ot-55296<<10)+(rt-56320)).toString(16)),ot=0):55296<=rt&&rt<=56319?ot=rt:et.push(rt.toString(16));return et.join("-")}const UFE0Fg=/\uFE0F/g,U200D="";function grabTheRightIcon(tt){return toCodePoint(tt.indexOf(U200D)<0?tt.replace(UFE0Fg,""):tt)}function iconToUrl(tt){const nt=/^:(.+)\/(.+):$/,et=tt.match(nt);return et===null?"":`https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsrounded/${et[2]}/default/24px.svg`}function handleFavicon(tt,nt,et){const rt=extractEmoji(tt);let ot;rt&&!tt.startsWith(":material")?ot=`https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/72x72/${grabTheRightIcon(rt)}.png`:tt.startsWith(":material")?ot=iconToUrl(tt):ot=et.buildMediaURL(tt),overwriteFavicon(ot),nt({type:"SET_PAGE_FAVICON",favicon:ot})}function overwriteFavicon(tt){const nt=document.querySelector("link[rel='shortcut icon']");nt&&(nt.href=tt)}function extractEmoji(tt){const nt=tt.replace("-","_");return nodeEmoji$1.hasEmoji(nodeEmoji$1.get(nt))?nodeEmoji$1.get(nt):nodeEmoji$1.hasEmoji(tt)?tt:""}var lib$2={},flattenNames$1={},baseFor$1=_baseFor,keys$2=keys_1;function baseForOwn$4(tt,nt){return tt&&baseFor$1(tt,nt,keys$2)}var _baseForOwn=baseForOwn$4,identity$3=identity_1;function castFunction$2(tt){return typeof tt=="function"?tt:identity$3}var _castFunction=castFunction$2,baseForOwn$3=_baseForOwn,castFunction$1=_castFunction;function forOwn(tt,nt){return tt&&baseForOwn$3(tt,castFunction$1(nt))}var forOwn_1=forOwn,HASH_UNDEFINED$3="__lodash_hash_undefined__";function setCacheAdd$2(tt){return this.__data__.set(tt,HASH_UNDEFINED$3),this}var _setCacheAdd=setCacheAdd$2;function setCacheHas$2(tt){return this.__data__.has(tt)}var _setCacheHas=setCacheHas$2,MapCache$1=_MapCache,setCacheAdd$1=_setCacheAdd,setCacheHas$1=_setCacheHas;function SetCache$3(tt){var nt=-1,et=tt==null?0:tt.length;for(this.__data__=new MapCache$1;++nt<et;)this.add(tt[nt])}SetCache$3.prototype.add=SetCache$3.prototype.push=setCacheAdd$1;SetCache$3.prototype.has=setCacheHas$1;var _SetCache=SetCache$3;function arraySome$2(tt,nt){for(var et=-1,rt=tt==null?0:tt.length;++et<rt;)if(nt(tt[et],et,tt))return!0;return!1}var _arraySome=arraySome$2;function cacheHas$3(tt,nt){return tt.has(nt)}var _cacheHas=cacheHas$3,SetCache$2=_SetCache,arraySome$1=_arraySome,cacheHas$2=_cacheHas,COMPARE_PARTIAL_FLAG$b=1,COMPARE_UNORDERED_FLAG$7=2;function equalArrays$3(tt,nt,et,rt,ot,at){var st=et&COMPARE_PARTIAL_FLAG$b,ut=tt.length,ct=nt.length;if(ut!=ct&&!(st&&ct>ut))return!1;var pt=at.get(tt),dt=at.get(nt);if(pt&&dt)return pt==nt&&dt==tt;var ft=-1,bt=!0,ht=et&COMPARE_UNORDERED_FLAG$7?new SetCache$2:void 0;for(at.set(tt,nt),at.set(nt,tt);++ft<ut;){var Mt=tt[ft],mt=nt[ft];if(rt)var Ot=st?rt(mt,Mt,ft,nt,tt,at):rt(Mt,mt,ft,tt,nt,at);if(Ot!==void 0){if(Ot)continue;bt=!1;break}if(ht){if(!arraySome$1(nt,function(zt,yt){if(!cacheHas$2(ht,yt)&&(Mt===zt||ot(Mt,zt,et,rt,at)))return ht.push(yt)})){bt=!1;break}}else if(!(Mt===mt||ot(Mt,mt,et,rt,at))){bt=!1;break}}return at.delete(tt),at.delete(nt),bt}var _equalArrays=equalArrays$3,Symbol$2=_Symbol,Uint8Array$2=_Uint8Array,eq$1=eq_1,equalArrays$2=_equalArrays,mapToArray$1=_mapToArray,setToArray$1=_setToArray,COMPARE_PARTIAL_FLAG$a=1,COMPARE_UNORDERED_FLAG$6=2,boolTag$2="[object Boolean]",dateTag$2="[object Date]",errorTag$2="[object Error]",mapTag$3="[object Map]",numberTag$2="[object Number]",regexpTag$2="[object RegExp]",setTag$3="[object Set]",stringTag$2="[object String]",symbolTag$2="[object Symbol]",arrayBufferTag$2="[object ArrayBuffer]",dataViewTag$3="[object DataView]",symbolProto$2=Symbol$2?Symbol$2.prototype:void 0,symbolValueOf$1=symbolProto$2?symbolProto$2.valueOf:void 0;function equalByTag$2(tt,nt,et,rt,ot,at,st){switch(et){case dataViewTag$3:if(tt.byteLength!=nt.byteLength||tt.byteOffset!=nt.byteOffset)return!1;tt=tt.buffer,nt=nt.buffer;case arrayBufferTag$2:return!(tt.byteLength!=nt.byteLength||!at(new Uint8Array$2(tt),new Uint8Array$2(nt)));case boolTag$2:case dateTag$2:case numberTag$2:return eq$1(+tt,+nt);case errorTag$2:return tt.name==nt.name&&tt.message==nt.message;case regexpTag$2:case stringTag$2:return tt==nt+"";case mapTag$3:var ut=mapToArray$1;case setTag$3:var ct=rt&COMPARE_PARTIAL_FLAG$a;if(ut||(ut=setToArray$1),tt.size!=nt.size&&!ct)return!1;var pt=st.get(tt);if(pt)return pt==nt;rt|=COMPARE_UNORDERED_FLAG$6,st.set(tt,nt);var dt=equalArrays$2(ut(tt),ut(nt),rt,ot,at,st);return st.delete(tt),dt;case symbolTag$2:if(symbolValueOf$1)return symbolValueOf$1.call(tt)==symbolValueOf$1.call(nt)}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(tt,nt,et,rt,ot,at){var st=et&COMPARE_PARTIAL_FLAG$9,ut=getAllKeys$1(tt),ct=ut.length,pt=getAllKeys$1(nt),dt=pt.length;if(ct!=dt&&!st)return!1;for(var ft=ct;ft--;){var bt=ut[ft];if(!(st?bt in nt:hasOwnProperty$f.call(nt,bt)))return!1}var ht=at.get(tt),Mt=at.get(nt);if(ht&&Mt)return ht==nt&&Mt==tt;var mt=!0;at.set(tt,nt),at.set(nt,tt);for(var Ot=st;++ft<ct;){bt=ut[ft];var zt=tt[bt],yt=nt[bt];if(rt)var vt=st?rt(yt,zt,bt,nt,tt,at):rt(zt,yt,bt,tt,nt,at);if(!(vt===void 0?zt===yt||ot(zt,yt,et,rt,at):vt)){mt=!1;break}Ot||(Ot=bt=="constructor")}if(mt&&!Ot){var At=tt.constructor,St=nt.constructor;At!=St&&"constructor"in tt&&"constructor"in nt&&!(typeof At=="function"&&At instanceof At&&typeof St=="function"&&St instanceof St)&&(mt=!1)}return at.delete(tt),at.delete(nt),mt}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(tt,nt,et,rt,ot,at){var st=isArray$7(tt),ut=isArray$7(nt),ct=st?arrayTag$2:getTag$1(tt),pt=ut?arrayTag$2:getTag$1(nt);ct=ct==argsTag$3?objectTag$4:ct,pt=pt==argsTag$3?objectTag$4:pt;var dt=ct==objectTag$4,ft=pt==objectTag$4,bt=ct==pt;if(bt&&isBuffer$2(tt)){if(!isBuffer$2(nt))return!1;st=!0,dt=!1}if(bt&&!dt)return at||(at=new Stack$2),st||isTypedArray$2(tt)?equalArrays$1(tt,nt,et,rt,ot,at):equalByTag$1(tt,nt,ct,et,rt,ot,at);if(!(et&COMPARE_PARTIAL_FLAG$8)){var ht=dt&&hasOwnProperty$e.call(tt,"__wrapped__"),Mt=ft&&hasOwnProperty$e.call(nt,"__wrapped__");if(ht||Mt){var mt=ht?tt.value():tt,Ot=Mt?nt.value():nt;return at||(at=new Stack$2),ot(mt,Ot,et,rt,at)}}return bt?(at||(at=new Stack$2),equalObjects$1(tt,nt,et,rt,ot,at)):!1}var _baseIsEqualDeep=baseIsEqualDeep$2,baseIsEqualDeep$1=_baseIsEqualDeep,isObjectLike$1=isObjectLike_1;function baseIsEqual$4(tt,nt,et,rt,ot){return tt===nt?!0:tt==null||nt==null||!isObjectLike$1(tt)&&!isObjectLike$1(nt)?tt!==tt&&nt!==nt:baseIsEqualDeep$1(tt,nt,et,rt,baseIsEqual$4,ot)}var _baseIsEqual=baseIsEqual$4,Stack$1=_Stack,baseIsEqual$3=_baseIsEqual,COMPARE_PARTIAL_FLAG$7=1,COMPARE_UNORDERED_FLAG$5=2;function baseIsMatch$2(tt,nt,et,rt){var ot=et.length,at=ot,st=!rt;if(tt==null)return!at;for(tt=Object(tt);ot--;){var ut=et[ot];if(st&&ut[2]?ut[1]!==tt[ut[0]]:!(ut[0]in tt))return!1}for(;++ot<at;){ut=et[ot];var ct=ut[0],pt=tt[ct],dt=ut[1];if(st&&ut[2]){if(pt===void 0&&!(ct in tt))return!1}else{var ft=new Stack$1;if(rt)var bt=rt(pt,dt,ct,tt,nt,ft);if(!(bt===void 0?baseIsEqual$3(dt,pt,COMPARE_PARTIAL_FLAG$7|COMPARE_UNORDERED_FLAG$5,rt,ft):bt))return!1}}return!0}var _baseIsMatch=baseIsMatch$2,isObject$3=isObject_1;function isStrictComparable$3(tt){return tt===tt&&!isObject$3(tt)}var _isStrictComparable=isStrictComparable$3,isStrictComparable$2=_isStrictComparable,keys$1=keys_1;function getMatchData$2(tt){for(var nt=keys$1(tt),et=nt.length;et--;){var rt=nt[et],ot=tt[rt];nt[et]=[rt,ot,isStrictComparable$2(ot)]}return nt}var _getMatchData=getMatchData$2;function matchesStrictComparable$3(tt,nt){return function(et){return et==null?!1:et[tt]===nt&&(nt!==void 0||tt in Object(et))}}var _matchesStrictComparable=matchesStrictComparable$3,baseIsMatch$1=_baseIsMatch,getMatchData$1=_getMatchData,matchesStrictComparable$2=_matchesStrictComparable;function baseMatches$2(tt){var nt=getMatchData$1(tt);return nt.length==1&&nt[0][2]?matchesStrictComparable$2(nt[0][0],nt[0][1]):function(et){return et===tt||baseIsMatch$1(et,tt,nt)}}var _baseMatches=baseMatches$2;function baseHasIn$2(tt,nt){return tt!=null&&nt in Object(tt)}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(tt,nt,et){nt=castPath$3(nt,tt);for(var rt=-1,ot=nt.length,at=!1;++rt<ot;){var st=toKey$4(nt[rt]);if(!(at=tt!=null&&et(tt,st)))break;tt=tt[st]}return at||++rt!=ot?at:(ot=tt==null?0:tt.length,!!ot&&isLength$1(ot)&&isIndex$2(st,ot)&&(isArray$6(tt)||isArguments$1(tt)))}var _hasPath=hasPath$2,baseHasIn$1=_baseHasIn,hasPath$1=_hasPath;function hasIn$3(tt,nt){return tt!=null&&hasPath$1(tt,nt,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(tt,nt){return isKey$2(tt)&&isStrictComparable$1(nt)?matchesStrictComparable$1(toKey$3(tt),nt):function(et){var rt=get$2(et,tt);return rt===void 0&&rt===nt?hasIn$2(et,tt):baseIsEqual$2(nt,rt,COMPARE_PARTIAL_FLAG$6|COMPARE_UNORDERED_FLAG$4)}}var _baseMatchesProperty=baseMatchesProperty$2,baseGet$3=_baseGet;function basePropertyDeep$2(tt){return function(nt){return baseGet$3(nt,tt)}}var _basePropertyDeep=basePropertyDeep$2,baseProperty$1=_baseProperty,basePropertyDeep$1=_basePropertyDeep,isKey$1=_isKey,toKey$2=_toKey;function property$2(tt){return isKey$1(tt)?baseProperty$1(toKey$2(tt)):basePropertyDeep$1(tt)}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(tt){return typeof tt=="function"?tt:tt==null?identity$2:typeof tt=="object"?isArray$5(tt)?baseMatchesProperty$1(tt[0],tt[1]):baseMatches$1(tt):property$1(tt)}var _baseIteratee=baseIteratee$5,isArrayLike$2=isArrayLike_1;function createBaseEach$2(tt,nt){return function(et,rt){if(et==null)return et;if(!isArrayLike$2(et))return tt(et,rt);for(var ot=et.length,at=nt?ot:-1,st=Object(et);(nt?at--:++at<ot)&&rt(st[at],at,st)!==!1;);return et}}var _createBaseEach=createBaseEach$2,baseForOwn$2=_baseForOwn,createBaseEach$1=_createBaseEach,baseEach$3=createBaseEach$1(baseForOwn$2),_baseEach=baseEach$3,baseEach$2=_baseEach,isArrayLike$1=isArrayLike_1;function baseMap$3(tt,nt){var et=-1,rt=isArrayLike$1(tt)?Array(tt.length):[];return baseEach$2(tt,function(ot,at,st){rt[++et]=nt(ot,at,st)}),rt}var _baseMap=baseMap$3,arrayMap$3=_arrayMap,baseIteratee$4=_baseIteratee,baseMap$2=_baseMap,isArray$4=isArray_1;function map$1(tt,nt){var et=isArray$4(tt)?arrayMap$3:baseMap$2;return et(tt,baseIteratee$4(nt))}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(tt){return tt&&tt.__esModule?tt:{default:tt}}var flattenNames=flattenNames$1.flattenNames=function tt(){var nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],et=[];return(0,_map3.default)(nt,function(rt){Array.isArray(rt)?tt(rt).map(function(ot){return et.push(ot)}):(0,_isPlainObject3.default)(rt)?(0,_forOwn3$2.default)(rt,function(ot,at){ot===!0&&et.push(at),et.push(at+"-"+ot)}):(0,_isString3.default)(rt)&&et.push(rt)}),et};flattenNames$1.default=flattenNames;var mergeClasses$1={};Object.defineProperty(mergeClasses$1,"__esModule",{value:!0});mergeClasses$1.mergeClasses=void 0;var _forOwn2$1=forOwn_1,_forOwn3$1=_interopRequireDefault$6(_forOwn2$1),_cloneDeep2=cloneDeep_1,_cloneDeep3=_interopRequireDefault$6(_cloneDeep2),_extends$w=Object.assign||function(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt];for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&(tt[rt]=et[rt])}return tt};function _interopRequireDefault$6(tt){return tt&&tt.__esModule?tt:{default:tt}}var mergeClasses=mergeClasses$1.mergeClasses=function tt(nt){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],rt=nt.default&&(0,_cloneDeep3.default)(nt.default)||{};return et.map(function(ot){var at=nt[ot];return at&&(0,_forOwn3$1.default)(at,function(st,ut){rt[ut]||(rt[ut]={}),rt[ut]=_extends$w({},rt[ut],at[ut])}),ot}),rt};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(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt];for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&(tt[rt]=et[rt])}return tt};function _interopRequireDefault$5(tt){return tt&&tt.__esModule?tt:{default:tt}}var transforms={borderRadius:function tt(nt){return{msBorderRadius:nt,MozBorderRadius:nt,OBorderRadius:nt,WebkitBorderRadius:nt,borderRadius:nt}},boxShadow:function tt(nt){return{msBoxShadow:nt,MozBoxShadow:nt,OBoxShadow:nt,WebkitBoxShadow:nt,boxShadow:nt}},userSelect:function tt(nt){return{WebkitTouchCallout:nt,KhtmlUserSelect:nt,MozUserSelect:nt,msUserSelect:nt,WebkitUserSelect:nt,userSelect:nt}},flex:function tt(nt){return{WebkitBoxFlex:nt,MozBoxFlex:nt,WebkitFlex:nt,msFlex:nt,flex:nt}},flexBasis:function tt(nt){return{WebkitFlexBasis:nt,flexBasis:nt}},justifyContent:function tt(nt){return{WebkitJustifyContent:nt,justifyContent:nt}},transition:function tt(nt){return{msTransition:nt,MozTransition:nt,OTransition:nt,WebkitTransition:nt,transition:nt}},transform:function tt(nt){return{msTransform:nt,MozTransform:nt,OTransform:nt,WebkitTransform:nt,transform:nt}},absolute:function tt(nt){var et=nt&&nt.split(" ");return{position:"absolute",top:et&&et[0],right:et&&et[1],bottom:et&&et[2],left:et&&et[3]}},extend:function tt(nt,et){var rt=et[nt];return rt||{extend:nt}}},autoprefix=autoprefix$1.autoprefix=function tt(nt){var et={};return(0,_forOwn3.default)(nt,function(rt,ot){var at={};(0,_forOwn3.default)(rt,function(st,ut){var ct=transforms[ut];ct?at=_extends$v({},at,ct(st)):at[ut]=st}),et[ot]=at}),et};autoprefix$1.default=autoprefix;var hover$1={};Object.defineProperty(hover$1,"__esModule",{value:!0});hover$1.hover=void 0;var _extends$u=Object.assign||function(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt];for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&(tt[rt]=et[rt])}return tt},_react$3=reactExports,_react2$3=_interopRequireDefault$4(_react$3);function _interopRequireDefault$4(tt){return tt&&tt.__esModule?tt:{default:tt}}function _classCallCheck$f(tt,nt){if(!(tt instanceof nt))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$f(tt,nt){if(!tt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return nt&&(typeof nt=="object"||typeof nt=="function")?nt:tt}function _inherits$f(tt,nt){if(typeof nt!="function"&&nt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof nt);tt.prototype=Object.create(nt&&nt.prototype,{constructor:{value:tt,enumerable:!1,writable:!0,configurable:!0}}),nt&&(Object.setPrototypeOf?Object.setPrototypeOf(tt,nt):tt.__proto__=nt)}var hover=hover$1.hover=function tt(nt){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(rt){_inherits$f(ot,rt);function ot(){var at,st,ut,ct;_classCallCheck$f(this,ot);for(var pt=arguments.length,dt=Array(pt),ft=0;ft<pt;ft++)dt[ft]=arguments[ft];return ct=(st=(ut=_possibleConstructorReturn$f(this,(at=ot.__proto__||Object.getPrototypeOf(ot)).call.apply(at,[this].concat(dt))),ut),ut.state={hover:!1},ut.handleMouseOver=function(){return ut.setState({hover:!0})},ut.handleMouseOut=function(){return ut.setState({hover:!1})},ut.render=function(){return _react2$3.default.createElement(et,{onMouseOver:ut.handleMouseOver,onMouseOut:ut.handleMouseOut},_react2$3.default.createElement(nt,_extends$u({},ut.props,ut.state)))},st),_possibleConstructorReturn$f(ut,ct)}return ot}(_react2$3.default.Component)};hover$1.default=hover;var active$1={};Object.defineProperty(active$1,"__esModule",{value:!0});active$1.active=void 0;var _extends$t=Object.assign||function(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt];for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&(tt[rt]=et[rt])}return tt},_react$2=reactExports,_react2$2=_interopRequireDefault$3(_react$2);function _interopRequireDefault$3(tt){return tt&&tt.__esModule?tt:{default:tt}}function _classCallCheck$e(tt,nt){if(!(tt instanceof nt))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$e(tt,nt){if(!tt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return nt&&(typeof nt=="object"||typeof nt=="function")?nt:tt}function _inherits$e(tt,nt){if(typeof nt!="function"&&nt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof nt);tt.prototype=Object.create(nt&&nt.prototype,{constructor:{value:tt,enumerable:!1,writable:!0,configurable:!0}}),nt&&(Object.setPrototypeOf?Object.setPrototypeOf(tt,nt):tt.__proto__=nt)}var active=active$1.active=function tt(nt){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(rt){_inherits$e(ot,rt);function ot(){var at,st,ut,ct;_classCallCheck$e(this,ot);for(var pt=arguments.length,dt=Array(pt),ft=0;ft<pt;ft++)dt[ft]=arguments[ft];return ct=(st=(ut=_possibleConstructorReturn$e(this,(at=ot.__proto__||Object.getPrototypeOf(ot)).call.apply(at,[this].concat(dt))),ut),ut.state={active:!1},ut.handleMouseDown=function(){return ut.setState({active:!0})},ut.handleMouseUp=function(){return ut.setState({active:!1})},ut.render=function(){return _react2$2.default.createElement(et,{onMouseDown:ut.handleMouseDown,onMouseUp:ut.handleMouseUp},_react2$2.default.createElement(nt,_extends$t({},ut.props,ut.state)))},st),_possibleConstructorReturn$e(ut,ct)}return ot}(_react2$2.default.Component)};active$1.default=active;var loop={};Object.defineProperty(loop,"__esModule",{value:!0});var loopable=function tt(nt,et){var rt={},ot=function(st){var ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;rt[st]=ut};return nt===0&&ot("first-child"),nt===et-1&&ot("last-child"),(nt===0||nt%2===0)&&ot("even"),Math.abs(nt%2)===1&&ot("odd"),ot("nth-child",nt),rt};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(tt){return tt&&tt.__esModule?tt:{default:tt}}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 tt(nt){for(var et=arguments.length,rt=Array(et>1?et-1:0),ot=1;ot<et;ot++)rt[ot-1]=arguments[ot];var at=(0,_flattenNames2.default)(rt),st=(0,_mergeClasses2.default)(nt,at);return(0,_autoprefix2.default)(st)},_default$2=lib$2.default=ReactCSS,calculateChange$2=function tt(nt,et,rt,ot,at){var st=at.clientWidth,ut=at.clientHeight,ct=typeof nt.pageX=="number"?nt.pageX:nt.touches[0].pageX,pt=typeof nt.pageY=="number"?nt.pageY:nt.touches[0].pageY,dt=ct-(at.getBoundingClientRect().left+window.pageXOffset),ft=pt-(at.getBoundingClientRect().top+window.pageYOffset);if(rt==="vertical"){var bt=void 0;if(ft<0?bt=0:ft>ut?bt=1:bt=Math.round(ft*100/ut)/100,et.a!==bt)return{h:et.h,s:et.s,l:et.l,a:bt,source:"rgb"}}else{var ht=void 0;if(dt<0?ht=0:dt>st?ht=1:ht=Math.round(dt*100/st)/100,ot!==ht)return{h:et.h,s:et.s,l:et.l,a:ht,source:"rgb"}}return null},checkboardCache={},render=function tt(nt,et,rt,ot){if(typeof document>"u"&&!ot)return null;var at=ot?new ot:document.createElement("canvas");at.width=rt*2,at.height=rt*2;var st=at.getContext("2d");return st?(st.fillStyle=nt,st.fillRect(0,0,at.width,at.height),st.fillStyle=et,st.fillRect(0,0,rt,rt),st.translate(rt,rt),st.fillRect(0,0,rt,rt),at.toDataURL()):null},get$1=function tt(nt,et,rt,ot){var at=nt+"-"+et+"-"+rt+(ot?"-server":"");if(checkboardCache[at])return checkboardCache[at];var st=render(nt,et,rt,ot);return checkboardCache[at]=st,st},_extends$s=Object.assign||function(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt];for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&(tt[rt]=et[rt])}return tt},Checkboard=function tt(nt){var et=nt.white,rt=nt.grey,ot=nt.size,at=nt.renderers,st=nt.borderRadius,ut=nt.boxShadow,ct=nt.children,pt=_default$2({default:{grid:{borderRadius:st,boxShadow:ut,absolute:"0px 0px 0px 0px",background:"url("+get$1(et,rt,ot,at.canvas)+") center left"}}});return reactExports.isValidElement(ct)?React$1.cloneElement(ct,_extends$s({},ct.props,{style:_extends$s({},ct.props.style,pt.grid)})):React$1.createElement("div",{style:pt.grid})};Checkboard.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};var _extends$r=Object.assign||function(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt];for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&(tt[rt]=et[rt])}return tt},_createClass$d=function(){function tt(nt,et){for(var rt=0;rt<et.length;rt++){var ot=et[rt];ot.enumerable=ot.enumerable||!1,ot.configurable=!0,"value"in ot&&(ot.writable=!0),Object.defineProperty(nt,ot.key,ot)}}return function(nt,et,rt){return et&&tt(nt.prototype,et),rt&&tt(nt,rt),nt}}();function _classCallCheck$d(tt,nt){if(!(tt instanceof nt))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$d(tt,nt){if(!tt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return nt&&(typeof nt=="object"||typeof nt=="function")?nt:tt}function _inherits$d(tt,nt){if(typeof nt!="function"&&nt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof nt);tt.prototype=Object.create(nt&&nt.prototype,{constructor:{value:tt,enumerable:!1,writable:!0,configurable:!0}}),nt&&(Object.setPrototypeOf?Object.setPrototypeOf(tt,nt):tt.__proto__=nt)}var Alpha=function(tt){_inherits$d(nt,tt);function nt(){var et,rt,ot,at;_classCallCheck$d(this,nt);for(var st=arguments.length,ut=Array(st),ct=0;ct<st;ct++)ut[ct]=arguments[ct];return at=(rt=(ot=_possibleConstructorReturn$d(this,(et=nt.__proto__||Object.getPrototypeOf(nt)).call.apply(et,[this].concat(ut))),ot),ot.handleChange=function(pt){var dt=calculateChange$2(pt,ot.props.hsl,ot.props.direction,ot.props.a,ot.container);dt&&typeof ot.props.onChange=="function"&&ot.props.onChange(dt,pt)},ot.handleMouseDown=function(pt){ot.handleChange(pt),window.addEventListener("mousemove",ot.handleChange),window.addEventListener("mouseup",ot.handleMouseUp)},ot.handleMouseUp=function(){ot.unbindEventListeners()},ot.unbindEventListeners=function(){window.removeEventListener("mousemove",ot.handleChange),window.removeEventListener("mouseup",ot.handleMouseUp)},rt),_possibleConstructorReturn$d(ot,at)}return _createClass$d(nt,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var rt=this,ot=this.props.rgb,at=_default$2({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+ot.r+","+ot.g+","+ot.b+`, 0) 0%,
|
683
|
+
`),allowHTML:!1})]}),ct&&jsx$1(StyledHeaderDivider,{"data-testid":"stHeadingDivider",rainbow:ct.includes("linear"),color:ct})]})}const StyledCheckbox$1=newStyled("div",{target:"e1kzzvq90"})(({width:tt,theme:nt})=>({width:tt,display:"flex",alignItems:"center",minHeight:nt.sizes.smallElementHeight})),StyledContent=newStyled("div",{target:"e1kzzvq91"})(({visibility:tt})=>({display:tt===LabelVisibilityOptions.Collapsed?"none":"flex",visibility:tt===LabelVisibilityOptions.Hidden?"hidden":"visible",verticalAlign:"middle",flexDirection:"row",alignItems:"center"}));function translateGapWidth(tt,nt){let et=nt.spacing.lg;return tt==="medium"?et=nt.spacing.threeXL:tt==="large"&&(et=nt.spacing.fourXL),et}const StyledHorizontalBlock=newStyled("div",{target:"e1kefhzc0"})(({theme:tt,gap:nt})=>({display:"flex",flexWrap:"wrap",flexGrow:1,alignItems:"stretch",gap:translateGapWidth(nt,tt)})),GLOBAL_ELEMENTS=["balloons","snow"],StyledElementContainer=newStyled("div",{target:"e1kefhzc1"})(({theme:tt,isStale:nt,width:et,elementType:rt})=>({width:et,position:"relative","@media print":{overflow:"visible"},":is(.stHtml-empty)":{display:"none"},":has(> .stCacheSpinner)":{height:tt.spacing.none,overflow:"visible",visibility:"visible",marginBottom:`-${tt.spacing.lg}`,zIndex:tt.zIndices.cacheSpinner},":has(> .stPageLink)":{marginTop:`-${tt.spacing.xs}`,marginBottom:`-${tt.spacing.xs}`},...nt&&rt!=="skeleton"&&STALE_STYLES,...rt==="empty"?{display:"none"}:{},...GLOBAL_ELEMENTS.includes(rt)?{marginBottom:`-${tt.spacing.lg}`}:{}})),StyledColumn=newStyled("div",{target:"e1kefhzc2"})(({theme:tt,weight:nt,gap:et,showBorder:rt,verticalAlignment:ot})=>{const{VerticalAlignment:at}=Block$2.Column,st=nt*100,ut=translateGapWidth(et,tt),ct=`calc(${st}% - ${ut})`;return{width:ct,flex:`1 1 ${ct}`,[`@media (max-width: ${tt.breakpoints.columns})`]:{minWidth:`calc(100% - ${tt.spacing.twoXL})`},...ot===at.BOTTOM&&{marginTop:"auto",[`& ${StyledElementContainer}:last-of-type > ${StyledCheckbox$1}`]:{marginBottom:tt.spacing.sm}},...ot===at.TOP&&{[`& ${StyledElementContainer}:last-of-type > ${StyledCheckbox$1}`]:{marginTop:tt.spacing.sm}},...ot===at.CENTER&&{marginTop:"auto",marginBottom:"auto"},...rt&&{border:`${tt.sizes.borderWidth} solid ${tt.colors.borderColor}`,borderRadius:tt.radii.default,padding:`calc(${tt.spacing.lg} - ${tt.sizes.borderWidth})`}}}),StyledVerticalBlock=newStyled("div",{target:"e1kefhzc3"})(({width:tt,theme:nt})=>({width:tt,position:"relative",display:"flex",flex:1,flexDirection:"column",gap:nt.spacing.lg})),StyledVerticalBlockWrapper=newStyled("div",{target:"e1kefhzc4"})({display:"flex",flexDirection:"column",flex:1}),StyledVerticalBlockBorderWrapper=newStyled("div",{target:"e1kefhzc5"})(({theme:tt,border:nt,height:et})=>({...nt&&{border:`${tt.sizes.borderWidth} solid ${tt.colors.borderColor}`,borderRadius:tt.radii.default,padding:`calc(${tt.spacing.lg} - ${tt.sizes.borderWidth})`},...et&&{height:`${et}px`,overflow:"auto"}})),Audio=React$1.lazy(()=>__vitePreload(()=>import("./index.Bht8Ku38.js"),[],import.meta.url)),Balloons=React$1.lazy(()=>__vitePreload(()=>import("./index.CBzV6LFM.js"),__vite__mapDeps([0,1]),import.meta.url)),Snow=React$1.lazy(()=>__vitePreload(()=>import("./index.DuwDNwdn.js"),__vite__mapDeps([2,1]),import.meta.url)),ArrowDataFrame=React$1.lazy(()=>__vitePreload(()=>import("./index.CkgGJqBi.js").then(tt=>tt.c),__vite__mapDeps([3,4,5,6,7,8,9,10,11,12,13,14]),import.meta.url)),ArrowVegaLiteChart=React$1.lazy(()=>__vitePreload(()=>import("./index.BTG890If.js"),__vite__mapDeps([15,6,5,7,16,17,18,4]),import.meta.url)),Toast=React$1.lazy(()=>__vitePreload(()=>import("./index.BCrCxn8x.js"),[],import.meta.url)),BokehChart=React$1.lazy(()=>__vitePreload(()=>import("./index.5idohwqh.js"),[],import.meta.url)),DebouncedBokehChart=debounceRender(BokehChart,100),DeckGlJsonChart=React$1.lazy(()=>__vitePreload(()=>import("./index.BsLun9mO.js"),__vite__mapDeps([19,10,11,6,5,20,4,16,17,21]),import.meta.url)),GraphVizChart=React$1.lazy(()=>__vitePreload(()=>import("./index.C2x7lWrn.js"),__vite__mapDeps([22,18,17,6,5]),import.meta.url)),IFrame=React$1.lazy(()=>__vitePreload(()=>import("./index.B-nmc5wO.js"),[],import.meta.url)),ImageList=React$1.lazy(()=>__vitePreload(()=>import("./index.CkJysN98.js"),__vite__mapDeps([23,6,5]),import.meta.url)),LinkButton=React$1.lazy(()=>__vitePreload(()=>import("./index.BST23kXB.js"),[],import.meta.url)),PageLink=React$1.lazy(()=>__vitePreload(()=>import("./index.Ci9WPusu.js"),[],import.meta.url)),PlotlyChart=React$1.lazy(()=>__vitePreload(()=>import("./index.DZ31yuLl.js"),__vite__mapDeps([24,4,5]),import.meta.url)),Video=React$1.lazy(()=>__vitePreload(()=>import("./index.B94PZPeI.js"),[],import.meta.url)),AudioInput=React$1.lazy(()=>__vitePreload(()=>import("./index.DwhO3jNA.js"),__vite__mapDeps([25,4,6,26,9,13]),import.meta.url)),Button=React$1.lazy(()=>__vitePreload(()=>import("./index.DrXNN7P-.js"),[],import.meta.url)),ButtonGroup=React$1.lazy(()=>__vitePreload(()=>import("./index.CTVIegXx.js"),__vite__mapDeps([27,20,4]),import.meta.url)),DownloadButton=React$1.lazy(()=>__vitePreload(()=>import("./index.DOO7x26L.js"),__vite__mapDeps([28,9]),import.meta.url)),CameraInput=React$1.lazy(()=>__vitePreload(()=>import("./index.CLEzQJ1l.js"),__vite__mapDeps([29,4,30,31]),import.meta.url)),ChatInput=React$1.lazy(()=>__vitePreload(()=>import("./index.BBGa9-EC.js"),__vite__mapDeps([32,33,34,35,36]),import.meta.url)),Checkbox=React$1.lazy(()=>__vitePreload(()=>import("./index.DqoGamDV.js"),__vite__mapDeps([37,20,4]),import.meta.url)),ColorPicker=React$1.lazy(()=>__vitePreload(()=>import("./index.CAOOu98T.js"),__vite__mapDeps([38,20,4]),import.meta.url)),DateInput=React$1.lazy(()=>__vitePreload(()=>import("./index.CEyo-K3a.js"),__vite__mapDeps([39,20,4,40,11,12,41,36]),import.meta.url)),Html=React$1.lazy(()=>__vitePreload(()=>import("./index.BMaqPVq6.js"),[],import.meta.url)),Multiselect=React$1.lazy(()=>__vitePreload(()=>import("./index.9Tcn_7uz.js"),__vite__mapDeps([42,20,4]),import.meta.url)),Progress=React$1.lazy(()=>__vitePreload(()=>import("./index.IHJq2nuU.js"),__vite__mapDeps([43,31]),import.meta.url)),Spinner=React$1.lazy(()=>__vitePreload(()=>import("./index.3XcxQYzA.js"),[],import.meta.url)),Radio=React$1.lazy(()=>__vitePreload(()=>import("./index.Cf3IO5h3.js"),__vite__mapDeps([44,20,4]),import.meta.url)),Selectbox$1=React$1.lazy(()=>__vitePreload(()=>import("./index.CRt7DW67.js"),__vite__mapDeps([45,20,4]),import.meta.url)),Slider$1=React$1.lazy(()=>__vitePreload(()=>import("./index.BVS_Npso.js"),__vite__mapDeps([46,8,20,4]),import.meta.url)),FileUploader=React$1.lazy(()=>__vitePreload(()=>import("./index.DkCDzK1i.js"),__vite__mapDeps([47,4,31,26,30]),import.meta.url)),TextArea=React$1.lazy(()=>__vitePreload(()=>import("./index.VSTrmYr_.js"),__vite__mapDeps([48,49,50,34,33,20,4,35,36]),import.meta.url)),TextInput=React$1.lazy(()=>__vitePreload(()=>import("./index.DfqbHOMy.js"),__vite__mapDeps([51,49,50,34,20,4,33,41,36]),import.meta.url)),TimeInput=React$1.lazy(()=>__vitePreload(()=>import("./index.D1gCIQ1C.js"),__vite__mapDeps([52,20,4,40,11,12]),import.meta.url)),NumberInput=React$1.lazy(()=>__vitePreload(()=>import("./index.BuQ40cTc.js"),__vite__mapDeps([53,8,49,4,33,41,36]),import.meta.url)),StreamlitSyntaxHighlighter=React$1.lazy(()=>__vitePreload(()=>Promise.resolve().then(()=>StreamlitSyntaxHighlighter$2),void 0,import.meta.url));function hideIfStale(tt,nt){return tt?jsx$1(Fragment,{}):nt}const RawElementNodeRenderer=tt=>{const{node:nt}=tt;if(!nt)throw new Error("ElementNode not found.");const et={width:tt.width,disableFullscreenMode:tt.disableFullscreenMode},rt={...et,widgetMgr:tt.widgetMgr,disabled:tt.widgetsDisabled,fragmentId:nt.fragmentId};switch(nt.element.type){case"alert":{const at=nt.element.alert;return jsx$1(AlertElement,{icon:at.icon,body:at.body,kind:getAlertElementKind(at.format),...et})}case"arrowTable":return jsx$1(ArrowTable$1,{element:nt.quiverElement,...et});case"audio":return jsx$1(Audio,{element:nt.element.audio,endpoints:tt.endpoints,...et,elementMgr:tt.widgetMgr});case"balloons":return hideIfStale(tt.isStale,jsx$1(Balloons,{scriptRunId:tt.scriptRunId}));case"bokehChart":return jsx$1(DebouncedBokehChart,{element:nt.element.bokehChart,...et});case"code":{const at=nt.element.code;return jsx$1(StreamlitSyntaxHighlighter,{language:at.language,showLineNumbers:at.showLineNumbers,wrapLines:at.wrapLines,height:at.height,children:at.codeText})}case"deckGlJsonChart":return jsx$1(DeckGlJsonChart,{element:nt.element.deckGlJsonChart,...rt});case"docString":return jsx$1(DocString,{element:nt.element.docString,...et});case"empty":return jsx$1("div",{className:"stEmpty","data-testid":"stEmpty"});case"exception":return jsx$1(ExceptionElement,{element:nt.element.exception,...et});case"graphvizChart":return jsx$1(GraphVizChart,{element:nt.element.graphvizChart,...et});case"heading":return jsx$1(Heading,{element:nt.element.heading,...et});case"iframe":return jsx$1(IFrame,{element:nt.element.iframe,...et});case"imgs":return jsx$1(ImageList,{element:nt.element.imgs,endpoints:tt.endpoints,...et});case"json":return jsx$1(Json,{element:nt.element.json,...et});case"markdown":return jsx$1(Markdown,{element:nt.element.markdown,...et});case"metric":return jsx$1(Metric,{element:nt.element.metric});case"html":return jsx$1(Html,{element:nt.element.html,...et});case"pageLink":{const at=nt.element.pageLink,st=rt.disabled||at.disabled;return jsx$1(PageLink,{element:at,disabled:st,...et})}case"progress":return jsx$1(Progress,{element:nt.element.progress,...et});case"skeleton":return jsx$1(Skeleton,{element:nt.element.skeleton});case"snow":return hideIfStale(tt.isStale,jsx$1(Snow,{scriptRunId:tt.scriptRunId}));case"spinner":return jsx$1(Spinner,{element:nt.element.spinner,...et});case"text":return jsx$1(TextElement,{element:nt.element.text,...et});case"video":return jsx$1(Video,{element:nt.element.video,endpoints:tt.endpoints,...et,elementMgr:tt.widgetMgr});case"toast":{const at=nt.element.toast;return jsx$1(Toast,{body:at.body,icon:at.icon,...et},nt.scriptRunId)}case"arrowDataFrame":{const at=nt.element.arrowDataFrame;return rt.disabled=rt.disabled||at.disabled,jsx$1(ArrowDataFrame,{element:at,data:nt.quiverElement,...at.id&&{key:at.id},...rt})}case"arrowVegaLiteChart":const ot=nt.vegaLiteChartElement;return jsx$1(ArrowVegaLiteChart,{element:ot,...rt},ot.id||void 0);case"audioInput":{const at=nt.element.audioInput;return rt.disabled=rt.disabled||at.disabled,jsx$1(AudioInput,{uploadClient:tt.uploadClient,element:at,...rt},at.id)}case"button":{const at=nt.element.button;if(rt.disabled=rt.disabled||at.disabled,at.isFormSubmitter){const{formId:st}=at,ut=tt.formsData.formsWithUploads.has(st);return jsx$1(FormSubmitContent,{element:at,hasInProgressUpload:ut,...rt})}return jsx$1(Button,{element:at,...rt})}case"buttonGroup":{const at=nt.element.buttonGroup;return rt.disabled=rt.disabled||at.disabled,jsx$1(ButtonGroup,{element:at,...rt},at.id)}case"downloadButton":{const at=nt.element.downloadButton;return rt.disabled=rt.disabled||at.disabled,jsx$1(DownloadButton,{endpoints:tt.endpoints,element:at,...rt},at.id)}case"cameraInput":{const at=nt.element.cameraInput;return rt.disabled=rt.disabled||at.disabled,jsx$1(CameraInput,{element:at,uploadClient:tt.uploadClient,...rt},at.id)}case"chatInput":{const at=nt.element.chatInput;return rt.disabled=rt.disabled||at.disabled,jsx$1(ChatInput,{element:at,...rt},at.id)}case"checkbox":{const at=nt.element.checkbox;return rt.disabled=rt.disabled||at.disabled,jsx$1(Checkbox,{element:at,...rt},at.id)}case"colorPicker":{const at=nt.element.colorPicker;return rt.disabled=rt.disabled||at.disabled,jsx$1(ColorPicker,{element:at,...rt},at.id)}case"componentInstance":return jsx$1(ComponentInstance$1,{registry:tt.componentRegistry,element:nt.element.componentInstance,...rt});case"dateInput":{const at=nt.element.dateInput;return rt.disabled=rt.disabled||at.disabled,jsx$1(DateInput,{element:at,...rt},at.id)}case"fileUploader":{const at=nt.element.fileUploader;return rt.disabled=rt.disabled||at.disabled,jsx$1(FileUploader,{element:at,uploadClient:tt.uploadClient,...rt},at.id)}case"linkButton":{const at=nt.element.linkButton;return rt.disabled=rt.disabled||at.disabled,jsx$1(LinkButton,{element:at,...rt})}case"multiselect":{const at=nt.element.multiselect;return rt.disabled=rt.disabled||at.disabled,jsx$1(Multiselect,{element:at,...rt},at.id)}case"numberInput":{const at=nt.element.numberInput;return rt.disabled=rt.disabled||at.disabled,jsx$1(NumberInput,{element:at,...rt},at.id)}case"plotlyChart":{const at=nt.element.plotlyChart;return jsx$1(PlotlyChart,{element:at,...rt},at.id)}case"radio":{const at=nt.element.radio;return rt.disabled=rt.disabled||at.disabled,jsx$1(Radio,{element:at,...rt},at.id)}case"selectbox":{const at=nt.element.selectbox;return rt.disabled=rt.disabled||at.disabled,jsx$1(Selectbox$1,{element:at,...rt},at.id)}case"slider":{const at=nt.element.slider;return rt.disabled=rt.disabled||at.disabled,jsx$1(Slider$1,{element:at,...rt},at.id)}case"textArea":{const at=nt.element.textArea;return rt.disabled=rt.disabled||at.disabled,jsx$1(TextArea,{element:at,...rt},at.id)}case"textInput":{const at=nt.element.textInput;return rt.disabled=rt.disabled||at.disabled,jsx$1(TextInput,{element:at,...rt},at.id)}case"timeInput":{const at=nt.element.timeInput;return rt.disabled=rt.disabled||at.disabled,jsx$1(TimeInput,{element:at,...rt},at.id)}default:throw new Error(`Unrecognized Element type ${nt.element.type}`)}},ElementNodeRenderer=tt=>{const{isFullScreen:nt,fragmentIdsThisRun:et}=React$1.useContext(LibContext),{node:rt,width:ot}=tt,at=rt.element.type||"",st=shouldComponentBeEnabled(at,tt.scriptRunState),ut=isComponentStale(st,rt,tt.scriptRunState,tt.scriptRunId,et),ct=getElementId(rt.element),pt=getKeyFromId(ct);return jsx$1(Maybe,{enable:st,children:jsx$1(StyledElementContainer,{className:classNames("stElementContainer","element-container",convertKeyToClassName(pt)),"data-testid":"stElementContainer","data-stale":ut,isStale:ut&&!nt,width:ot,elementType:at,children:jsx$1(ErrorBoundary,{width:ot,children:jsx$1(reactExports.Suspense,{fallback:jsx$1(Skeleton,{element:Skeleton$1.create({style:Skeleton$1.SkeletonStyle.ELEMENT})}),children:jsx$1(RawElementNodeRenderer,{...tt,isStale:ut})})})})})},BlockNodeRenderer=tt=>{const{node:nt}=tt,{fragmentIdsThisRun:et}=reactExports.useContext(LibContext);if(nt.isEmpty&&!nt.deltaBlock.allowEmpty)return jsx$1(Fragment,{});const rt=shouldComponentBeEnabled("",tt.scriptRunState),ot=isComponentStale(rt,nt,tt.scriptRunState,tt.scriptRunId,et),at={...tt,node:nt},st=tt.disableFullscreenMode||notNullOrUndefined(nt.deltaBlock.dialog)||notNullOrUndefined(nt.deltaBlock.popover),ut=jsx$1(LayoutBlock,{...at,disableFullscreenMode:st});if(nt.deltaBlock.dialog)return jsx$1(DialogWithProvider,{element:nt.deltaBlock.dialog,deltaMsgReceivedAt:nt.deltaMsgReceivedAt,children:ut});if(nt.deltaBlock.expandable)return jsx$1(Expander,{empty:nt.isEmpty,isStale:ot,element:nt.deltaBlock.expandable,children:ut});if(nt.deltaBlock.popover)return jsx$1(Popover,{empty:nt.isEmpty,element:nt.deltaBlock.popover,width:tt.width,children:ut});if(nt.deltaBlock.type==="form"){const{formId:ct,clearOnSubmit:pt,enterToSubmit:dt,border:ft}=nt.deltaBlock.form,bt=tt.formsData.submitButtons.get(ct),ht=bt!==void 0&&bt.length>0;return jsx$1(Form,{formId:ct,clearOnSubmit:pt,enterToSubmit:dt,width:tt.width,hasSubmitButton:ht,scriptRunState:tt.scriptRunState,widgetMgr:tt.widgetMgr,border:ft,children:ut})}if(nt.deltaBlock.chatMessage)return jsx$1(ChatMessage,{element:nt.deltaBlock.chatMessage,endpoints:tt.endpoints,children:ut});if(nt.deltaBlock.column)return jsx$1(StyledColumn,{weight:nt.deltaBlock.column.weight??0,gap:nt.deltaBlock.column.gap??"",verticalAlignment:nt.deltaBlock.column.verticalAlignment??void 0,showBorder:nt.deltaBlock.column.showBorder??!1,className:"stColumn","data-testid":"stColumn",children:ut});if(nt.deltaBlock.tabContainer){const pt={...at,isStale:ot,renderTabContent:dt=>jsx$1(VerticalBlock,{...dt})};return jsx$1(Tabs,{...pt})}return ut},ChildRenderer=tt=>{const{libConfig:nt}=reactExports.useContext(LibContext);assignDividerColor(tt.node,useTheme());const et=new Set;return jsx$1(Fragment,{children:tt.node.children&&tt.node.children.map((rt,ot)=>{const at=nt.disableFullscreenMode||tt.disableFullscreenMode;if(rt instanceof ElementNode){const st={...tt,disableFullscreenMode:at,node:rt},ut=getElementId(rt.element)||ot.toString();return et.has(ut)?null:(et.add(ut),jsx$1(ElementNodeRenderer,{...st},ut))}if(rt instanceof BlockNode){const st={...tt,disableFullscreenMode:at,node:rt};return jsx$1(BlockNodeRenderer,{...st},ot)}throw new Error(`Unrecognized AppNode: ${rt}`)})})};function ScrollToBottomVerticalBlockWrapper(tt){const{border:nt,height:et,children:rt}=tt,ot=useScrollToBottom();return jsx$1(StyledVerticalBlockBorderWrapper,{border:nt,height:et,"data-testid":"stVerticalBlockBorderWrapper","data-test-scroll-behavior":"scroll-to-bottom",ref:ot,children:rt})}const VerticalBlock=tt=>{var ft,bt;const nt=reactExports.useRef(null),[et,rt]=React$1.useState(-1),ot=reactExports.useMemo(()=>new ResizeObserver(([ht])=>{window.requestAnimationFrame(()=>{rt(ht.target.getBoundingClientRect().width||-1)})}),[rt]),at=((ft=tt.node.deltaBlock.vertical)==null?void 0:ft.border)??!1,st=((bt=tt.node.deltaBlock.vertical)==null?void 0:bt.height)||void 0,ut=st&&tt.node.children.find(ht=>ht instanceof BlockNode&&ht.deltaBlock.type==="chatMessage")!==void 0;reactExports.useEffect(()=>(nt.current&&ot.observe(nt.current),()=>{ot.disconnect()}),[ot,ut]);const ct=ut?ScrollToBottomVerticalBlockWrapper:StyledVerticalBlockBorderWrapper,pt={...tt,width:et},dt=getKeyFromId(tt.node.deltaBlock.id);return jsx$1(ct,{border:at,height:st,"data-testid":"stVerticalBlockBorderWrapper","data-test-scroll-behavior":"normal",children:jsx$1(StyledVerticalBlockWrapper,{ref:nt,children:jsx$1(StyledVerticalBlock,{width:et,className:classNames("stVerticalBlock",convertKeyToClassName(dt)),"data-testid":"stVerticalBlock",children:jsx$1(ChildRenderer,{...pt})})})})},HorizontalBlock=tt=>{var et;const nt=((et=tt.node.deltaBlock.horizontal)==null?void 0:et.gap)??"";return jsx$1(StyledHorizontalBlock,{gap:nt,className:"stHorizontalBlock","data-testid":"stHorizontalBlock",children:jsx$1(ChildRenderer,{...tt})})};function LayoutBlock(tt){return tt.node.deltaBlock.horizontal?jsx$1(HorizontalBlock,{...tt}):jsx$1(VerticalBlock,{...tt})}const StyledDataFrameOverlay=newStyled("div",{target:"e19n7mk11"})(({theme:tt})=>({position:"fixed",top:0,left:0,zIndex:tt.zIndices.tablePortal,lineHeight:"100%"})),PortalContext=React$1.createContext(null),PortalProvider=({children:tt})=>{const nt=reactExports.useRef(null),et=reactExports.useCallback(()=>nt.current,[]);return jsxs(PortalContext.Provider,{value:et,children:[tt,jsx$1(StyledDataFrameOverlay,{"data-testid":"portal",id:"portal",ref:nt})]})};function ThemeProvider({theme:tt,baseuiTheme:nt,children:et}){return jsx$1(ThemeProvider$1,{theme:nt||baseuiLightTheme,children:jsx$1(ThemeProvider$2,{theme:tt,children:et})})}function toCodePoint(tt,nt){const et=[];let rt=0,ot=0,at=0;for(;at<tt.length;)rt=tt.charCodeAt(at++),ot?(et.push((65536+(ot-55296<<10)+(rt-56320)).toString(16)),ot=0):55296<=rt&&rt<=56319?ot=rt:et.push(rt.toString(16));return et.join("-")}const UFE0Fg=/\uFE0F/g,U200D="";function grabTheRightIcon(tt){return toCodePoint(tt.indexOf(U200D)<0?tt.replace(UFE0Fg,""):tt)}function iconToUrl(tt){const nt=/^:(.+)\/(.+):$/,et=tt.match(nt);return et===null?"":`https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsrounded/${et[2]}/default/24px.svg`}function handleFavicon(tt,nt,et){const rt=extractEmoji(tt);let ot;rt&&!tt.startsWith(":material")?ot=`https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/72x72/${grabTheRightIcon(rt)}.png`:tt.startsWith(":material")?ot=iconToUrl(tt):ot=et.buildMediaURL(tt),overwriteFavicon(ot),nt({type:"SET_PAGE_FAVICON",favicon:ot})}function overwriteFavicon(tt){const nt=document.querySelector("link[rel='shortcut icon']");nt&&(nt.href=tt)}function extractEmoji(tt){const nt=tt.replace("-","_");return nodeEmoji$1.hasEmoji(nodeEmoji$1.get(nt))?nodeEmoji$1.get(nt):nodeEmoji$1.hasEmoji(tt)?tt:""}var lib$2={},flattenNames$1={},baseFor$1=_baseFor,keys$2=keys_1;function baseForOwn$4(tt,nt){return tt&&baseFor$1(tt,nt,keys$2)}var _baseForOwn=baseForOwn$4,identity$3=identity_1;function castFunction$2(tt){return typeof tt=="function"?tt:identity$3}var _castFunction=castFunction$2,baseForOwn$3=_baseForOwn,castFunction$1=_castFunction;function forOwn(tt,nt){return tt&&baseForOwn$3(tt,castFunction$1(nt))}var forOwn_1=forOwn,HASH_UNDEFINED$3="__lodash_hash_undefined__";function setCacheAdd$2(tt){return this.__data__.set(tt,HASH_UNDEFINED$3),this}var _setCacheAdd=setCacheAdd$2;function setCacheHas$2(tt){return this.__data__.has(tt)}var _setCacheHas=setCacheHas$2,MapCache$1=_MapCache,setCacheAdd$1=_setCacheAdd,setCacheHas$1=_setCacheHas;function SetCache$3(tt){var nt=-1,et=tt==null?0:tt.length;for(this.__data__=new MapCache$1;++nt<et;)this.add(tt[nt])}SetCache$3.prototype.add=SetCache$3.prototype.push=setCacheAdd$1;SetCache$3.prototype.has=setCacheHas$1;var _SetCache=SetCache$3;function arraySome$2(tt,nt){for(var et=-1,rt=tt==null?0:tt.length;++et<rt;)if(nt(tt[et],et,tt))return!0;return!1}var _arraySome=arraySome$2;function cacheHas$3(tt,nt){return tt.has(nt)}var _cacheHas=cacheHas$3,SetCache$2=_SetCache,arraySome$1=_arraySome,cacheHas$2=_cacheHas,COMPARE_PARTIAL_FLAG$b=1,COMPARE_UNORDERED_FLAG$7=2;function equalArrays$3(tt,nt,et,rt,ot,at){var st=et&COMPARE_PARTIAL_FLAG$b,ut=tt.length,ct=nt.length;if(ut!=ct&&!(st&&ct>ut))return!1;var pt=at.get(tt),dt=at.get(nt);if(pt&&dt)return pt==nt&&dt==tt;var ft=-1,bt=!0,ht=et&COMPARE_UNORDERED_FLAG$7?new SetCache$2:void 0;for(at.set(tt,nt),at.set(nt,tt);++ft<ut;){var Mt=tt[ft],mt=nt[ft];if(rt)var Ot=st?rt(mt,Mt,ft,nt,tt,at):rt(Mt,mt,ft,tt,nt,at);if(Ot!==void 0){if(Ot)continue;bt=!1;break}if(ht){if(!arraySome$1(nt,function(zt,yt){if(!cacheHas$2(ht,yt)&&(Mt===zt||ot(Mt,zt,et,rt,at)))return ht.push(yt)})){bt=!1;break}}else if(!(Mt===mt||ot(Mt,mt,et,rt,at))){bt=!1;break}}return at.delete(tt),at.delete(nt),bt}var _equalArrays=equalArrays$3,Symbol$2=_Symbol,Uint8Array$2=_Uint8Array,eq$1=eq_1,equalArrays$2=_equalArrays,mapToArray$1=_mapToArray,setToArray$1=_setToArray,COMPARE_PARTIAL_FLAG$a=1,COMPARE_UNORDERED_FLAG$6=2,boolTag$2="[object Boolean]",dateTag$2="[object Date]",errorTag$2="[object Error]",mapTag$3="[object Map]",numberTag$2="[object Number]",regexpTag$2="[object RegExp]",setTag$3="[object Set]",stringTag$2="[object String]",symbolTag$2="[object Symbol]",arrayBufferTag$2="[object ArrayBuffer]",dataViewTag$3="[object DataView]",symbolProto$2=Symbol$2?Symbol$2.prototype:void 0,symbolValueOf$1=symbolProto$2?symbolProto$2.valueOf:void 0;function equalByTag$2(tt,nt,et,rt,ot,at,st){switch(et){case dataViewTag$3:if(tt.byteLength!=nt.byteLength||tt.byteOffset!=nt.byteOffset)return!1;tt=tt.buffer,nt=nt.buffer;case arrayBufferTag$2:return!(tt.byteLength!=nt.byteLength||!at(new Uint8Array$2(tt),new Uint8Array$2(nt)));case boolTag$2:case dateTag$2:case numberTag$2:return eq$1(+tt,+nt);case errorTag$2:return tt.name==nt.name&&tt.message==nt.message;case regexpTag$2:case stringTag$2:return tt==nt+"";case mapTag$3:var ut=mapToArray$1;case setTag$3:var ct=rt&COMPARE_PARTIAL_FLAG$a;if(ut||(ut=setToArray$1),tt.size!=nt.size&&!ct)return!1;var pt=st.get(tt);if(pt)return pt==nt;rt|=COMPARE_UNORDERED_FLAG$6,st.set(tt,nt);var dt=equalArrays$2(ut(tt),ut(nt),rt,ot,at,st);return st.delete(tt),dt;case symbolTag$2:if(symbolValueOf$1)return symbolValueOf$1.call(tt)==symbolValueOf$1.call(nt)}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(tt,nt,et,rt,ot,at){var st=et&COMPARE_PARTIAL_FLAG$9,ut=getAllKeys$1(tt),ct=ut.length,pt=getAllKeys$1(nt),dt=pt.length;if(ct!=dt&&!st)return!1;for(var ft=ct;ft--;){var bt=ut[ft];if(!(st?bt in nt:hasOwnProperty$f.call(nt,bt)))return!1}var ht=at.get(tt),Mt=at.get(nt);if(ht&&Mt)return ht==nt&&Mt==tt;var mt=!0;at.set(tt,nt),at.set(nt,tt);for(var Ot=st;++ft<ct;){bt=ut[ft];var zt=tt[bt],yt=nt[bt];if(rt)var vt=st?rt(yt,zt,bt,nt,tt,at):rt(zt,yt,bt,tt,nt,at);if(!(vt===void 0?zt===yt||ot(zt,yt,et,rt,at):vt)){mt=!1;break}Ot||(Ot=bt=="constructor")}if(mt&&!Ot){var At=tt.constructor,St=nt.constructor;At!=St&&"constructor"in tt&&"constructor"in nt&&!(typeof At=="function"&&At instanceof At&&typeof St=="function"&&St instanceof St)&&(mt=!1)}return at.delete(tt),at.delete(nt),mt}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(tt,nt,et,rt,ot,at){var st=isArray$7(tt),ut=isArray$7(nt),ct=st?arrayTag$2:getTag$1(tt),pt=ut?arrayTag$2:getTag$1(nt);ct=ct==argsTag$3?objectTag$4:ct,pt=pt==argsTag$3?objectTag$4:pt;var dt=ct==objectTag$4,ft=pt==objectTag$4,bt=ct==pt;if(bt&&isBuffer$2(tt)){if(!isBuffer$2(nt))return!1;st=!0,dt=!1}if(bt&&!dt)return at||(at=new Stack$2),st||isTypedArray$2(tt)?equalArrays$1(tt,nt,et,rt,ot,at):equalByTag$1(tt,nt,ct,et,rt,ot,at);if(!(et&COMPARE_PARTIAL_FLAG$8)){var ht=dt&&hasOwnProperty$e.call(tt,"__wrapped__"),Mt=ft&&hasOwnProperty$e.call(nt,"__wrapped__");if(ht||Mt){var mt=ht?tt.value():tt,Ot=Mt?nt.value():nt;return at||(at=new Stack$2),ot(mt,Ot,et,rt,at)}}return bt?(at||(at=new Stack$2),equalObjects$1(tt,nt,et,rt,ot,at)):!1}var _baseIsEqualDeep=baseIsEqualDeep$2,baseIsEqualDeep$1=_baseIsEqualDeep,isObjectLike$1=isObjectLike_1;function baseIsEqual$4(tt,nt,et,rt,ot){return tt===nt?!0:tt==null||nt==null||!isObjectLike$1(tt)&&!isObjectLike$1(nt)?tt!==tt&&nt!==nt:baseIsEqualDeep$1(tt,nt,et,rt,baseIsEqual$4,ot)}var _baseIsEqual=baseIsEqual$4,Stack$1=_Stack,baseIsEqual$3=_baseIsEqual,COMPARE_PARTIAL_FLAG$7=1,COMPARE_UNORDERED_FLAG$5=2;function baseIsMatch$2(tt,nt,et,rt){var ot=et.length,at=ot,st=!rt;if(tt==null)return!at;for(tt=Object(tt);ot--;){var ut=et[ot];if(st&&ut[2]?ut[1]!==tt[ut[0]]:!(ut[0]in tt))return!1}for(;++ot<at;){ut=et[ot];var ct=ut[0],pt=tt[ct],dt=ut[1];if(st&&ut[2]){if(pt===void 0&&!(ct in tt))return!1}else{var ft=new Stack$1;if(rt)var bt=rt(pt,dt,ct,tt,nt,ft);if(!(bt===void 0?baseIsEqual$3(dt,pt,COMPARE_PARTIAL_FLAG$7|COMPARE_UNORDERED_FLAG$5,rt,ft):bt))return!1}}return!0}var _baseIsMatch=baseIsMatch$2,isObject$3=isObject_1;function isStrictComparable$3(tt){return tt===tt&&!isObject$3(tt)}var _isStrictComparable=isStrictComparable$3,isStrictComparable$2=_isStrictComparable,keys$1=keys_1;function getMatchData$2(tt){for(var nt=keys$1(tt),et=nt.length;et--;){var rt=nt[et],ot=tt[rt];nt[et]=[rt,ot,isStrictComparable$2(ot)]}return nt}var _getMatchData=getMatchData$2;function matchesStrictComparable$3(tt,nt){return function(et){return et==null?!1:et[tt]===nt&&(nt!==void 0||tt in Object(et))}}var _matchesStrictComparable=matchesStrictComparable$3,baseIsMatch$1=_baseIsMatch,getMatchData$1=_getMatchData,matchesStrictComparable$2=_matchesStrictComparable;function baseMatches$2(tt){var nt=getMatchData$1(tt);return nt.length==1&&nt[0][2]?matchesStrictComparable$2(nt[0][0],nt[0][1]):function(et){return et===tt||baseIsMatch$1(et,tt,nt)}}var _baseMatches=baseMatches$2;function baseHasIn$2(tt,nt){return tt!=null&&nt in Object(tt)}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(tt,nt,et){nt=castPath$3(nt,tt);for(var rt=-1,ot=nt.length,at=!1;++rt<ot;){var st=toKey$4(nt[rt]);if(!(at=tt!=null&&et(tt,st)))break;tt=tt[st]}return at||++rt!=ot?at:(ot=tt==null?0:tt.length,!!ot&&isLength$1(ot)&&isIndex$2(st,ot)&&(isArray$6(tt)||isArguments$1(tt)))}var _hasPath=hasPath$2,baseHasIn$1=_baseHasIn,hasPath$1=_hasPath;function hasIn$3(tt,nt){return tt!=null&&hasPath$1(tt,nt,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(tt,nt){return isKey$2(tt)&&isStrictComparable$1(nt)?matchesStrictComparable$1(toKey$3(tt),nt):function(et){var rt=get$2(et,tt);return rt===void 0&&rt===nt?hasIn$2(et,tt):baseIsEqual$2(nt,rt,COMPARE_PARTIAL_FLAG$6|COMPARE_UNORDERED_FLAG$4)}}var _baseMatchesProperty=baseMatchesProperty$2,baseGet$3=_baseGet;function basePropertyDeep$2(tt){return function(nt){return baseGet$3(nt,tt)}}var _basePropertyDeep=basePropertyDeep$2,baseProperty$1=_baseProperty,basePropertyDeep$1=_basePropertyDeep,isKey$1=_isKey,toKey$2=_toKey;function property$2(tt){return isKey$1(tt)?baseProperty$1(toKey$2(tt)):basePropertyDeep$1(tt)}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(tt){return typeof tt=="function"?tt:tt==null?identity$2:typeof tt=="object"?isArray$5(tt)?baseMatchesProperty$1(tt[0],tt[1]):baseMatches$1(tt):property$1(tt)}var _baseIteratee=baseIteratee$5,isArrayLike$2=isArrayLike_1;function createBaseEach$2(tt,nt){return function(et,rt){if(et==null)return et;if(!isArrayLike$2(et))return tt(et,rt);for(var ot=et.length,at=nt?ot:-1,st=Object(et);(nt?at--:++at<ot)&&rt(st[at],at,st)!==!1;);return et}}var _createBaseEach=createBaseEach$2,baseForOwn$2=_baseForOwn,createBaseEach$1=_createBaseEach,baseEach$3=createBaseEach$1(baseForOwn$2),_baseEach=baseEach$3,baseEach$2=_baseEach,isArrayLike$1=isArrayLike_1;function baseMap$3(tt,nt){var et=-1,rt=isArrayLike$1(tt)?Array(tt.length):[];return baseEach$2(tt,function(ot,at,st){rt[++et]=nt(ot,at,st)}),rt}var _baseMap=baseMap$3,arrayMap$3=_arrayMap,baseIteratee$4=_baseIteratee,baseMap$2=_baseMap,isArray$4=isArray_1;function map$1(tt,nt){var et=isArray$4(tt)?arrayMap$3:baseMap$2;return et(tt,baseIteratee$4(nt))}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(tt){return tt&&tt.__esModule?tt:{default:tt}}var flattenNames=flattenNames$1.flattenNames=function tt(){var nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],et=[];return(0,_map3.default)(nt,function(rt){Array.isArray(rt)?tt(rt).map(function(ot){return et.push(ot)}):(0,_isPlainObject3.default)(rt)?(0,_forOwn3$2.default)(rt,function(ot,at){ot===!0&&et.push(at),et.push(at+"-"+ot)}):(0,_isString3.default)(rt)&&et.push(rt)}),et};flattenNames$1.default=flattenNames;var mergeClasses$1={};Object.defineProperty(mergeClasses$1,"__esModule",{value:!0});mergeClasses$1.mergeClasses=void 0;var _forOwn2$1=forOwn_1,_forOwn3$1=_interopRequireDefault$6(_forOwn2$1),_cloneDeep2=cloneDeep_1,_cloneDeep3=_interopRequireDefault$6(_cloneDeep2),_extends$w=Object.assign||function(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt];for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&(tt[rt]=et[rt])}return tt};function _interopRequireDefault$6(tt){return tt&&tt.__esModule?tt:{default:tt}}var mergeClasses=mergeClasses$1.mergeClasses=function tt(nt){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],rt=nt.default&&(0,_cloneDeep3.default)(nt.default)||{};return et.map(function(ot){var at=nt[ot];return at&&(0,_forOwn3$1.default)(at,function(st,ut){rt[ut]||(rt[ut]={}),rt[ut]=_extends$w({},rt[ut],at[ut])}),ot}),rt};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(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt];for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&(tt[rt]=et[rt])}return tt};function _interopRequireDefault$5(tt){return tt&&tt.__esModule?tt:{default:tt}}var transforms={borderRadius:function tt(nt){return{msBorderRadius:nt,MozBorderRadius:nt,OBorderRadius:nt,WebkitBorderRadius:nt,borderRadius:nt}},boxShadow:function tt(nt){return{msBoxShadow:nt,MozBoxShadow:nt,OBoxShadow:nt,WebkitBoxShadow:nt,boxShadow:nt}},userSelect:function tt(nt){return{WebkitTouchCallout:nt,KhtmlUserSelect:nt,MozUserSelect:nt,msUserSelect:nt,WebkitUserSelect:nt,userSelect:nt}},flex:function tt(nt){return{WebkitBoxFlex:nt,MozBoxFlex:nt,WebkitFlex:nt,msFlex:nt,flex:nt}},flexBasis:function tt(nt){return{WebkitFlexBasis:nt,flexBasis:nt}},justifyContent:function tt(nt){return{WebkitJustifyContent:nt,justifyContent:nt}},transition:function tt(nt){return{msTransition:nt,MozTransition:nt,OTransition:nt,WebkitTransition:nt,transition:nt}},transform:function tt(nt){return{msTransform:nt,MozTransform:nt,OTransform:nt,WebkitTransform:nt,transform:nt}},absolute:function tt(nt){var et=nt&&nt.split(" ");return{position:"absolute",top:et&&et[0],right:et&&et[1],bottom:et&&et[2],left:et&&et[3]}},extend:function tt(nt,et){var rt=et[nt];return rt||{extend:nt}}},autoprefix=autoprefix$1.autoprefix=function tt(nt){var et={};return(0,_forOwn3.default)(nt,function(rt,ot){var at={};(0,_forOwn3.default)(rt,function(st,ut){var ct=transforms[ut];ct?at=_extends$v({},at,ct(st)):at[ut]=st}),et[ot]=at}),et};autoprefix$1.default=autoprefix;var hover$1={};Object.defineProperty(hover$1,"__esModule",{value:!0});hover$1.hover=void 0;var _extends$u=Object.assign||function(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt];for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&(tt[rt]=et[rt])}return tt},_react$3=reactExports,_react2$3=_interopRequireDefault$4(_react$3);function _interopRequireDefault$4(tt){return tt&&tt.__esModule?tt:{default:tt}}function _classCallCheck$f(tt,nt){if(!(tt instanceof nt))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$f(tt,nt){if(!tt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return nt&&(typeof nt=="object"||typeof nt=="function")?nt:tt}function _inherits$f(tt,nt){if(typeof nt!="function"&&nt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof nt);tt.prototype=Object.create(nt&&nt.prototype,{constructor:{value:tt,enumerable:!1,writable:!0,configurable:!0}}),nt&&(Object.setPrototypeOf?Object.setPrototypeOf(tt,nt):tt.__proto__=nt)}var hover=hover$1.hover=function tt(nt){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(rt){_inherits$f(ot,rt);function ot(){var at,st,ut,ct;_classCallCheck$f(this,ot);for(var pt=arguments.length,dt=Array(pt),ft=0;ft<pt;ft++)dt[ft]=arguments[ft];return ct=(st=(ut=_possibleConstructorReturn$f(this,(at=ot.__proto__||Object.getPrototypeOf(ot)).call.apply(at,[this].concat(dt))),ut),ut.state={hover:!1},ut.handleMouseOver=function(){return ut.setState({hover:!0})},ut.handleMouseOut=function(){return ut.setState({hover:!1})},ut.render=function(){return _react2$3.default.createElement(et,{onMouseOver:ut.handleMouseOver,onMouseOut:ut.handleMouseOut},_react2$3.default.createElement(nt,_extends$u({},ut.props,ut.state)))},st),_possibleConstructorReturn$f(ut,ct)}return ot}(_react2$3.default.Component)};hover$1.default=hover;var active$1={};Object.defineProperty(active$1,"__esModule",{value:!0});active$1.active=void 0;var _extends$t=Object.assign||function(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt];for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&(tt[rt]=et[rt])}return tt},_react$2=reactExports,_react2$2=_interopRequireDefault$3(_react$2);function _interopRequireDefault$3(tt){return tt&&tt.__esModule?tt:{default:tt}}function _classCallCheck$e(tt,nt){if(!(tt instanceof nt))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$e(tt,nt){if(!tt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return nt&&(typeof nt=="object"||typeof nt=="function")?nt:tt}function _inherits$e(tt,nt){if(typeof nt!="function"&&nt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof nt);tt.prototype=Object.create(nt&&nt.prototype,{constructor:{value:tt,enumerable:!1,writable:!0,configurable:!0}}),nt&&(Object.setPrototypeOf?Object.setPrototypeOf(tt,nt):tt.__proto__=nt)}var active=active$1.active=function tt(nt){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(rt){_inherits$e(ot,rt);function ot(){var at,st,ut,ct;_classCallCheck$e(this,ot);for(var pt=arguments.length,dt=Array(pt),ft=0;ft<pt;ft++)dt[ft]=arguments[ft];return ct=(st=(ut=_possibleConstructorReturn$e(this,(at=ot.__proto__||Object.getPrototypeOf(ot)).call.apply(at,[this].concat(dt))),ut),ut.state={active:!1},ut.handleMouseDown=function(){return ut.setState({active:!0})},ut.handleMouseUp=function(){return ut.setState({active:!1})},ut.render=function(){return _react2$2.default.createElement(et,{onMouseDown:ut.handleMouseDown,onMouseUp:ut.handleMouseUp},_react2$2.default.createElement(nt,_extends$t({},ut.props,ut.state)))},st),_possibleConstructorReturn$e(ut,ct)}return ot}(_react2$2.default.Component)};active$1.default=active;var loop={};Object.defineProperty(loop,"__esModule",{value:!0});var loopable=function tt(nt,et){var rt={},ot=function(st){var ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;rt[st]=ut};return nt===0&&ot("first-child"),nt===et-1&&ot("last-child"),(nt===0||nt%2===0)&&ot("even"),Math.abs(nt%2)===1&&ot("odd"),ot("nth-child",nt),rt};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(tt){return tt&&tt.__esModule?tt:{default:tt}}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 tt(nt){for(var et=arguments.length,rt=Array(et>1?et-1:0),ot=1;ot<et;ot++)rt[ot-1]=arguments[ot];var at=(0,_flattenNames2.default)(rt),st=(0,_mergeClasses2.default)(nt,at);return(0,_autoprefix2.default)(st)},_default$2=lib$2.default=ReactCSS,calculateChange$2=function tt(nt,et,rt,ot,at){var st=at.clientWidth,ut=at.clientHeight,ct=typeof nt.pageX=="number"?nt.pageX:nt.touches[0].pageX,pt=typeof nt.pageY=="number"?nt.pageY:nt.touches[0].pageY,dt=ct-(at.getBoundingClientRect().left+window.pageXOffset),ft=pt-(at.getBoundingClientRect().top+window.pageYOffset);if(rt==="vertical"){var bt=void 0;if(ft<0?bt=0:ft>ut?bt=1:bt=Math.round(ft*100/ut)/100,et.a!==bt)return{h:et.h,s:et.s,l:et.l,a:bt,source:"rgb"}}else{var ht=void 0;if(dt<0?ht=0:dt>st?ht=1:ht=Math.round(dt*100/st)/100,ot!==ht)return{h:et.h,s:et.s,l:et.l,a:ht,source:"rgb"}}return null},checkboardCache={},render=function tt(nt,et,rt,ot){if(typeof document>"u"&&!ot)return null;var at=ot?new ot:document.createElement("canvas");at.width=rt*2,at.height=rt*2;var st=at.getContext("2d");return st?(st.fillStyle=nt,st.fillRect(0,0,at.width,at.height),st.fillStyle=et,st.fillRect(0,0,rt,rt),st.translate(rt,rt),st.fillRect(0,0,rt,rt),at.toDataURL()):null},get$1=function tt(nt,et,rt,ot){var at=nt+"-"+et+"-"+rt+(ot?"-server":"");if(checkboardCache[at])return checkboardCache[at];var st=render(nt,et,rt,ot);return checkboardCache[at]=st,st},_extends$s=Object.assign||function(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt];for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&(tt[rt]=et[rt])}return tt},Checkboard=function tt(nt){var et=nt.white,rt=nt.grey,ot=nt.size,at=nt.renderers,st=nt.borderRadius,ut=nt.boxShadow,ct=nt.children,pt=_default$2({default:{grid:{borderRadius:st,boxShadow:ut,absolute:"0px 0px 0px 0px",background:"url("+get$1(et,rt,ot,at.canvas)+") center left"}}});return reactExports.isValidElement(ct)?React$1.cloneElement(ct,_extends$s({},ct.props,{style:_extends$s({},ct.props.style,pt.grid)})):React$1.createElement("div",{style:pt.grid})};Checkboard.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};var _extends$r=Object.assign||function(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt];for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&(tt[rt]=et[rt])}return tt},_createClass$d=function(){function tt(nt,et){for(var rt=0;rt<et.length;rt++){var ot=et[rt];ot.enumerable=ot.enumerable||!1,ot.configurable=!0,"value"in ot&&(ot.writable=!0),Object.defineProperty(nt,ot.key,ot)}}return function(nt,et,rt){return et&&tt(nt.prototype,et),rt&&tt(nt,rt),nt}}();function _classCallCheck$d(tt,nt){if(!(tt instanceof nt))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$d(tt,nt){if(!tt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return nt&&(typeof nt=="object"||typeof nt=="function")?nt:tt}function _inherits$d(tt,nt){if(typeof nt!="function"&&nt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof nt);tt.prototype=Object.create(nt&&nt.prototype,{constructor:{value:tt,enumerable:!1,writable:!0,configurable:!0}}),nt&&(Object.setPrototypeOf?Object.setPrototypeOf(tt,nt):tt.__proto__=nt)}var Alpha=function(tt){_inherits$d(nt,tt);function nt(){var et,rt,ot,at;_classCallCheck$d(this,nt);for(var st=arguments.length,ut=Array(st),ct=0;ct<st;ct++)ut[ct]=arguments[ct];return at=(rt=(ot=_possibleConstructorReturn$d(this,(et=nt.__proto__||Object.getPrototypeOf(nt)).call.apply(et,[this].concat(ut))),ot),ot.handleChange=function(pt){var dt=calculateChange$2(pt,ot.props.hsl,ot.props.direction,ot.props.a,ot.container);dt&&typeof ot.props.onChange=="function"&&ot.props.onChange(dt,pt)},ot.handleMouseDown=function(pt){ot.handleChange(pt),window.addEventListener("mousemove",ot.handleChange),window.addEventListener("mouseup",ot.handleMouseUp)},ot.handleMouseUp=function(){ot.unbindEventListeners()},ot.unbindEventListeners=function(){window.removeEventListener("mousemove",ot.handleChange),window.removeEventListener("mouseup",ot.handleMouseUp)},rt),_possibleConstructorReturn$d(ot,at)}return _createClass$d(nt,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var rt=this,ot=this.props.rgb,at=_default$2({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+ot.r+","+ot.g+","+ot.b+`, 0) 0%,
|
684
684
|
rgba(`+ot.r+","+ot.g+","+ot.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:ot.a*100+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+ot.r+","+ot.g+","+ot.b+`, 0) 0%,
|
685
685
|
rgba(`+ot.r+","+ot.g+","+ot.b+", 1) 100%)"},pointer:{left:0,top:ot.a*100+"%"}},overwrite:_extends$r({},this.props.style)},{vertical:this.props.direction==="vertical",overwrite:!0});return React$1.createElement("div",{style:at.alpha},React$1.createElement("div",{style:at.checkboard},React$1.createElement(Checkboard,{renderers:this.props.renderers})),React$1.createElement("div",{style:at.gradient}),React$1.createElement("div",{style:at.container,ref:function(ut){return rt.container=ut},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},React$1.createElement("div",{style:at.pointer},this.props.pointer?React$1.createElement(this.props.pointer,this.props):React$1.createElement("div",{style:at.slider}))))}}]),nt}(reactExports.PureComponent||reactExports.Component),_createClass$c=function(){function tt(nt,et){for(var rt=0;rt<et.length;rt++){var ot=et[rt];ot.enumerable=ot.enumerable||!1,ot.configurable=!0,"value"in ot&&(ot.writable=!0),Object.defineProperty(nt,ot.key,ot)}}return function(nt,et,rt){return et&&tt(nt.prototype,et),rt&&tt(nt,rt),nt}}();function _defineProperty$d(tt,nt,et){return nt in tt?Object.defineProperty(tt,nt,{value:et,enumerable:!0,configurable:!0,writable:!0}):tt[nt]=et,tt}function _classCallCheck$c(tt,nt){if(!(tt instanceof nt))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$c(tt,nt){if(!tt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return nt&&(typeof nt=="object"||typeof nt=="function")?nt:tt}function _inherits$c(tt,nt){if(typeof nt!="function"&&nt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof nt);tt.prototype=Object.create(nt&&nt.prototype,{constructor:{value:tt,enumerable:!1,writable:!0,configurable:!0}}),nt&&(Object.setPrototypeOf?Object.setPrototypeOf(tt,nt):tt.__proto__=nt)}var DEFAULT_ARROW_OFFSET=1,UP_KEY_CODE=38,DOWN_KEY_CODE=40,VALID_KEY_CODES=[UP_KEY_CODE,DOWN_KEY_CODE],isValidKeyCode=function tt(nt){return VALID_KEY_CODES.indexOf(nt)>-1},getNumberValue=function tt(nt){return Number(String(nt).replace(/%/g,""))},idCounter=1,EditableInput=function(tt){_inherits$c(nt,tt);function nt(et){_classCallCheck$c(this,nt);var rt=_possibleConstructorReturn$c(this,(nt.__proto__||Object.getPrototypeOf(nt)).call(this));return rt.handleBlur=function(){rt.state.blurValue&&rt.setState({value:rt.state.blurValue,blurValue:null})},rt.handleChange=function(ot){rt.setUpdatedValue(ot.target.value,ot)},rt.handleKeyDown=function(ot){var at=getNumberValue(ot.target.value);if(!isNaN(at)&&isValidKeyCode(ot.keyCode)){var st=rt.getArrowOffset(),ut=ot.keyCode===UP_KEY_CODE?at+st:at-st;rt.setUpdatedValue(ut,ot)}},rt.handleDrag=function(ot){if(rt.props.dragLabel){var at=Math.round(rt.props.value+ot.movementX);at>=0&&at<=rt.props.dragMax&&rt.props.onChange&&rt.props.onChange(rt.getValueObjectWithLabel(at),ot)}},rt.handleMouseDown=function(ot){rt.props.dragLabel&&(ot.preventDefault(),rt.handleDrag(ot),window.addEventListener("mousemove",rt.handleDrag),window.addEventListener("mouseup",rt.handleMouseUp))},rt.handleMouseUp=function(){rt.unbindEventListeners()},rt.unbindEventListeners=function(){window.removeEventListener("mousemove",rt.handleDrag),window.removeEventListener("mouseup",rt.handleMouseUp)},rt.state={value:String(et.value).toUpperCase(),blurValue:String(et.value).toUpperCase()},rt.inputId="rc-editable-input-"+idCounter++,rt}return _createClass$c(nt,[{key:"componentDidUpdate",value:function(rt,ot){this.props.value!==this.state.value&&(rt.value!==this.props.value||ot.value!==this.state.value)&&(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(rt){return _defineProperty$d({},this.props.label,rt)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||DEFAULT_ARROW_OFFSET}},{key:"setUpdatedValue",value:function(rt,ot){var at=this.props.label?this.getValueObjectWithLabel(rt):rt;this.props.onChange&&this.props.onChange(at,ot),this.setState({value:rt})}},{key:"render",value:function(){var rt=this,ot=_default$2({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return React$1.createElement("div",{style:ot.wrap},React$1.createElement("input",{id:this.inputId,style:ot.input,ref:function(st){return rt.input=st},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?React$1.createElement("label",{htmlFor:this.inputId,style:ot.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),nt}(reactExports.PureComponent||reactExports.Component),calculateChange$1=function tt(nt,et,rt,ot){var at=ot.clientWidth,st=ot.clientHeight,ut=typeof nt.pageX=="number"?nt.pageX:nt.touches[0].pageX,ct=typeof nt.pageY=="number"?nt.pageY:nt.touches[0].pageY,pt=ut-(ot.getBoundingClientRect().left+window.pageXOffset),dt=ct-(ot.getBoundingClientRect().top+window.pageYOffset);if(et==="vertical"){var ft=void 0;if(dt<0)ft=359;else if(dt>st)ft=0;else{var bt=-(dt*100/st)+100;ft=360*bt/100}if(rt.h!==ft)return{h:ft,s:rt.s,l:rt.l,a:rt.a,source:"hsl"}}else{var ht=void 0;if(pt<0)ht=0;else if(pt>at)ht=359;else{var Mt=pt*100/at;ht=360*Mt/100}if(rt.h!==ht)return{h:ht,s:rt.s,l:rt.l,a:rt.a,source:"hsl"}}return null},_createClass$b=function(){function tt(nt,et){for(var rt=0;rt<et.length;rt++){var ot=et[rt];ot.enumerable=ot.enumerable||!1,ot.configurable=!0,"value"in ot&&(ot.writable=!0),Object.defineProperty(nt,ot.key,ot)}}return function(nt,et,rt){return et&&tt(nt.prototype,et),rt&&tt(nt,rt),nt}}();function _classCallCheck$b(tt,nt){if(!(tt instanceof nt))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn$b(tt,nt){if(!tt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return nt&&(typeof nt=="object"||typeof nt=="function")?nt:tt}function _inherits$b(tt,nt){if(typeof nt!="function"&&nt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof nt);tt.prototype=Object.create(nt&&nt.prototype,{constructor:{value:tt,enumerable:!1,writable:!0,configurable:!0}}),nt&&(Object.setPrototypeOf?Object.setPrototypeOf(tt,nt):tt.__proto__=nt)}var Hue=function(tt){_inherits$b(nt,tt);function nt(){var et,rt,ot,at;_classCallCheck$b(this,nt);for(var st=arguments.length,ut=Array(st),ct=0;ct<st;ct++)ut[ct]=arguments[ct];return at=(rt=(ot=_possibleConstructorReturn$b(this,(et=nt.__proto__||Object.getPrototypeOf(nt)).call.apply(et,[this].concat(ut))),ot),ot.handleChange=function(pt){var dt=calculateChange$1(pt,ot.props.direction,ot.props.hsl,ot.container);dt&&typeof ot.props.onChange=="function"&&ot.props.onChange(dt,pt)},ot.handleMouseDown=function(pt){ot.handleChange(pt),window.addEventListener("mousemove",ot.handleChange),window.addEventListener("mouseup",ot.handleMouseUp)},ot.handleMouseUp=function(){ot.unbindEventListeners()},rt),_possibleConstructorReturn$b(ot,at)}return _createClass$b(nt,[{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 rt=this,ot=this.props.direction,at=ot===void 0?"horizontal":ot,st=_default$2({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:this.props.hsl.h*100/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-(this.props.hsl.h*100/360)+100+"%"}}},{vertical:at==="vertical"});return React$1.createElement("div",{style:st.hue},React$1.createElement("div",{className:"hue-"+at,style:st.container,ref:function(ct){return rt.container=ct},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},React$1.createElement("style",null,`
|
686
686
|
.hue-horizontal {
|
@@ -739,11 +739,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
739
739
|
font-display: swap;
|
740
740
|
src: url(${at}) format("woff2");
|
741
741
|
}
|
742
|
-
`});return jsx$1(Global,{styles:[css$2(nt)]})},isff=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function addEvent(tt,nt,et,rt){tt.addEventListener?tt.addEventListener(nt,et,rt):tt.attachEvent&&tt.attachEvent("on".concat(nt),et)}function removeEvent(tt,nt,et,rt){tt.removeEventListener?tt.removeEventListener(nt,et,rt):tt.detachEvent&&tt.detachEvent("on".concat(nt),et)}function getMods(tt,nt){const et=nt.slice(0,nt.length-1);for(let rt=0;rt<et.length;rt++)et[rt]=tt[et[rt].toLowerCase()];return et}function getKeys(tt){typeof tt!="string"&&(tt=""),tt=tt.replace(/\s/g,"");const nt=tt.split(",");let et=nt.lastIndexOf("");for(;et>=0;)nt[et-1]+=",",nt.splice(et,1),et=nt.lastIndexOf("");return nt}function compareArray(tt,nt){const et=tt.length>=nt.length?tt:nt,rt=tt.length>=nt.length?nt:tt;let ot=!0;for(let at=0;at<et.length;at++)rt.indexOf(et[at])===-1&&(ot=!1);return ot}const _keyMap={backspace:8,"⌫":8,tab:9,clear:12,enter:13,"↩":13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":isff?173:189,"=":isff?61:187,";":isff?59:186,"'":222,"[":219,"]":221,"\\":220},_modifier={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},modifierMap={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},_mods={16:!1,18:!1,17:!1,91:!1},_handlers={};for(let tt=1;tt<20;tt++)_keyMap["f".concat(tt)]=111+tt;let _downKeys=[],winListendFocus=null,_scope="all";const elementEventMap=new Map,code=tt=>_keyMap[tt.toLowerCase()]||_modifier[tt.toLowerCase()]||tt.toUpperCase().charCodeAt(0),getKey=tt=>Object.keys(_keyMap).find(nt=>_keyMap[nt]===tt),getModifier=tt=>Object.keys(_modifier).find(nt=>_modifier[nt]===tt);function setScope(tt){_scope=tt||"all"}function getScope(){return _scope||"all"}function getPressedKeyCodes(){return _downKeys.slice(0)}function getPressedKeyString(){return _downKeys.map(tt=>getKey(tt)||getModifier(tt)||String.fromCharCode(tt))}function getAllKeyCodes(){const tt=[];return Object.keys(_handlers).forEach(nt=>{_handlers[nt].forEach(et=>{let{key:rt,scope:ot,mods:at,shortcut:st}=et;tt.push({scope:ot,shortcut:st,mods:at,keys:rt.split("+").map(ut=>code(ut))})})}),tt}function filter(tt){const nt=tt.target||tt.srcElement,{tagName:et}=nt;let rt=!0;const ot=et==="INPUT"&&!["checkbox","radio","range","button","file","reset","submit","color"].includes(nt.type);return(nt.isContentEditable||(ot||et==="TEXTAREA"||et==="SELECT")&&!nt.readOnly)&&(rt=!1),rt}function isPressed(tt){return typeof tt=="string"&&(tt=code(tt)),_downKeys.indexOf(tt)!==-1}function deleteScope(tt,nt){let et,rt;tt||(tt=getScope());for(const ot in _handlers)if(Object.prototype.hasOwnProperty.call(_handlers,ot))for(et=_handlers[ot],rt=0;rt<et.length;)et[rt].scope===tt?et.splice(rt,1).forEach(st=>{let{element:ut}=st;return removeKeyEvent(ut)}):rt++;getScope()===tt&&setScope(nt||"all")}function clearModifier(tt){let nt=tt.keyCode||tt.which||tt.charCode;const et=_downKeys.indexOf(nt);if(et>=0&&_downKeys.splice(et,1),tt.key&&tt.key.toLowerCase()==="meta"&&_downKeys.splice(0,_downKeys.length),(nt===93||nt===224)&&(nt=91),nt in _mods){_mods[nt]=!1;for(const rt in _modifier)_modifier[rt]===nt&&(hotkeys[rt]=!1)}}function unbind(tt){if(typeof tt>"u")Object.keys(_handlers).forEach(ot=>{Array.isArray(_handlers[ot])&&_handlers[ot].forEach(at=>eachUnbind(at)),delete _handlers[ot]}),removeKeyEvent(null);else if(Array.isArray(tt))tt.forEach(ot=>{ot.key&&eachUnbind(ot)});else if(typeof tt=="object")tt.key&&eachUnbind(tt);else if(typeof tt=="string"){for(var nt=arguments.length,et=new Array(nt>1?nt-1:0),rt=1;rt<nt;rt++)et[rt-1]=arguments[rt];let[ot,at]=et;typeof ot=="function"&&(at=ot,ot=""),eachUnbind({key:tt,scope:ot,method:at,splitKey:"+"})}}const eachUnbind=tt=>{let{key:nt,scope:et,method:rt,splitKey:ot="+"}=tt;getKeys(nt).forEach(st=>{const ut=st.split(ot),ct=ut.length,pt=ut[ct-1],dt=pt==="*"?"*":code(pt);if(!_handlers[dt])return;et||(et=getScope());const ft=ct>1?getMods(_modifier,ut):[],bt=[];_handlers[dt]=_handlers[dt].filter(ht=>{const mt=(rt?ht.method===rt:!0)&&ht.scope===et&&compareArray(ht.mods,ft);return mt&&bt.push(ht.element),!mt}),bt.forEach(ht=>removeKeyEvent(ht))})};function eventHandler(tt,nt,et,rt){if(nt.element!==rt)return;let ot;if(nt.scope===et||nt.scope==="all"){ot=nt.mods.length>0;for(const at in _mods)Object.prototype.hasOwnProperty.call(_mods,at)&&(!_mods[at]&&nt.mods.indexOf(+at)>-1||_mods[at]&&nt.mods.indexOf(+at)===-1)&&(ot=!1);(nt.mods.length===0&&!_mods[16]&&!_mods[18]&&!_mods[17]&&!_mods[91]||ot||nt.shortcut==="*")&&(nt.keys=[],nt.keys=nt.keys.concat(_downKeys),nt.method(tt,nt)===!1&&(tt.preventDefault?tt.preventDefault():tt.returnValue=!1,tt.stopPropagation&&tt.stopPropagation(),tt.cancelBubble&&(tt.cancelBubble=!0)))}}function dispatch(tt,nt){const et=_handlers["*"];let rt=tt.keyCode||tt.which||tt.charCode;if(!hotkeys.filter.call(this,tt))return;if((rt===93||rt===224)&&(rt=91),_downKeys.indexOf(rt)===-1&&rt!==229&&_downKeys.push(rt),["ctrlKey","altKey","shiftKey","metaKey"].forEach(ut=>{const ct=modifierMap[ut];tt[ut]&&_downKeys.indexOf(ct)===-1?_downKeys.push(ct):!tt[ut]&&_downKeys.indexOf(ct)>-1?_downKeys.splice(_downKeys.indexOf(ct),1):ut==="metaKey"&&tt[ut]&&_downKeys.length===3&&(tt.ctrlKey||tt.shiftKey||tt.altKey||(_downKeys=_downKeys.slice(_downKeys.indexOf(ct))))}),rt in _mods){_mods[rt]=!0;for(const ut in _modifier)_modifier[ut]===rt&&(hotkeys[ut]=!0);if(!et)return}for(const ut in _mods)Object.prototype.hasOwnProperty.call(_mods,ut)&&(_mods[ut]=tt[modifierMap[ut]]);tt.getModifierState&&!(tt.altKey&&!tt.ctrlKey)&&tt.getModifierState("AltGraph")&&(_downKeys.indexOf(17)===-1&&_downKeys.push(17),_downKeys.indexOf(18)===-1&&_downKeys.push(18),_mods[17]=!0,_mods[18]=!0);const ot=getScope();if(et)for(let ut=0;ut<et.length;ut++)et[ut].scope===ot&&(tt.type==="keydown"&&et[ut].keydown||tt.type==="keyup"&&et[ut].keyup)&&eventHandler(tt,et[ut],ot,nt);if(!(rt in _handlers))return;const at=_handlers[rt],st=at.length;for(let ut=0;ut<st;ut++)if((tt.type==="keydown"&&at[ut].keydown||tt.type==="keyup"&&at[ut].keyup)&&at[ut].key){const ct=at[ut],{splitKey:pt}=ct,dt=ct.key.split(pt),ft=[];for(let bt=0;bt<dt.length;bt++)ft.push(code(dt[bt]));ft.sort().join("")===_downKeys.sort().join("")&&eventHandler(tt,ct,ot,nt)}}function hotkeys(tt,nt,et){_downKeys=[];const rt=getKeys(tt);let ot=[],at="all",st=document,ut=0,ct=!1,pt=!0,dt="+",ft=!1,bt=!1;for(et===void 0&&typeof nt=="function"&&(et=nt),Object.prototype.toString.call(nt)==="[object Object]"&&(nt.scope&&(at=nt.scope),nt.element&&(st=nt.element),nt.keyup&&(ct=nt.keyup),nt.keydown!==void 0&&(pt=nt.keydown),nt.capture!==void 0&&(ft=nt.capture),typeof nt.splitKey=="string"&&(dt=nt.splitKey),nt.single===!0&&(bt=!0)),typeof nt=="string"&&(at=nt),bt&&unbind(tt,at);ut<rt.length;ut++)tt=rt[ut].split(dt),ot=[],tt.length>1&&(ot=getMods(_modifier,tt)),tt=tt[tt.length-1],tt=tt==="*"?"*":code(tt),tt in _handlers||(_handlers[tt]=[]),_handlers[tt].push({keyup:ct,keydown:pt,scope:at,mods:ot,shortcut:rt[ut],method:et,key:rt[ut],splitKey:dt,element:st});if(typeof st<"u"&&window){if(!elementEventMap.has(st)){const ht=function(){let mt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;return dispatch(mt,st)},Mt=function(){let mt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;dispatch(mt,st),clearModifier(mt)};elementEventMap.set(st,{keydownListener:ht,keyupListenr:Mt,capture:ft}),addEvent(st,"keydown",ht,ft),addEvent(st,"keyup",Mt,ft)}if(!winListendFocus){const ht=()=>{_downKeys=[]};winListendFocus={listener:ht,capture:ft},addEvent(window,"focus",ht,ft)}}}function trigger(tt){let nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(_handlers).forEach(et=>{_handlers[et].filter(ot=>ot.scope===nt&&ot.shortcut===tt).forEach(ot=>{ot&&ot.method&&ot.method()})})}function removeKeyEvent(tt){const nt=Object.values(_handlers).flat();if(nt.findIndex(rt=>{let{element:ot}=rt;return ot===tt})<0){const{keydownListener:rt,keyupListenr:ot,capture:at}=elementEventMap.get(tt)||{};rt&&ot&&(removeEvent(tt,"keyup",ot,at),removeEvent(tt,"keydown",rt,at),elementEventMap.delete(tt))}if((nt.length<=0||elementEventMap.size<=0)&&(Object.keys(elementEventMap).forEach(ot=>{const{keydownListener:at,keyupListenr:st,capture:ut}=elementEventMap.get(ot)||{};at&&st&&(removeEvent(ot,"keyup",st,ut),removeEvent(ot,"keydown",at,ut),elementEventMap.delete(ot))}),elementEventMap.clear(),Object.keys(_handlers).forEach(ot=>delete _handlers[ot]),winListendFocus)){const{listener:ot,capture:at}=winListendFocus;removeEvent(window,"focus",ot,at),winListendFocus=null}}const _api={getPressedKeyString,setScope,getScope,deleteScope,getPressedKeyCodes,getAllKeyCodes,isPressed,filter,trigger,unbind,keyMap:_keyMap,modifier:_modifier,modifierMap};for(const tt in _api)Object.prototype.hasOwnProperty.call(_api,tt)&&(hotkeys[tt]=_api[tt]);if(typeof window<"u"){const tt=window.hotkeys;hotkeys.noConflict=nt=>(nt&&window.hotkeys===hotkeys&&(window.hotkeys=tt),hotkeys),window.hotkeys=hotkeys}class ReactHotkeys extends React$1.Component{constructor(nt){super(nt),this.isKeyDown=!1,this.handle=void 0,this.onKeyDown=this.onKeyDown.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.handleKeyUpEvent=this.handleKeyUpEvent.bind(this),this.handle={}}componentDidMount(){var{filter:nt,splitKey:et}=this.props;nt&&(hotkeys.filter=nt),hotkeys.unbind(this.props.keyName),hotkeys(this.props.keyName,{splitKey:et},this.onKeyDown),document&&document.body.addEventListener("keyup",this.handleKeyUpEvent)}componentWillUnmount(){hotkeys.unbind(this.props.keyName),this.isKeyDown=!0,this.handle={},document&&document.body.removeEventListener("keyup",this.handleKeyUpEvent)}onKeyUp(nt,et){var{onKeyUp:rt,disabled:ot}=this.props;!ot&&rt&&rt(et.shortcut,nt,et)}onKeyDown(nt,et){var{onKeyDown:rt,allowRepeat:ot,disabled:at}=this.props;this.isKeyDown&&!ot||(this.isKeyDown=!0,this.handle=et,!at&&rt&&rt(et.shortcut,nt,et))}handleKeyUpEvent(nt){this.isKeyDown&&(this.isKeyDown=!1,!(this.props.keyName&&this.props.keyName.indexOf(this.handle.shortcut)<0)&&(this.onKeyUp(nt,this.handle),this.handle={}))}render(){return this.props.children||null}}ReactHotkeys.defaultProps={filter(tt){var nt=tt.target||tt.srcElement,et=nt.tagName;return!(nt.isContentEditable||et==="INPUT"||et==="SELECT"||et==="TEXTAREA")}};ReactHotkeys.propTypes={keyName:propTypesExports.string,filter:propTypesExports.func,onKeyDown:propTypesExports.func,onKeyUp:propTypesExports.func,disabled:propTypesExports.bool,splitKey:propTypesExports.string};var baseIndexOf=_baseIndexOf;function arrayIncludes$1(tt,nt){var et=tt==null?0:tt.length;return!!et&&baseIndexOf(tt,nt,0)>-1}var _arrayIncludes=arrayIncludes$1;function arrayIncludesWith$1(tt,nt,et){for(var rt=-1,ot=tt==null?0:tt.length;++rt<ot;)if(et(nt,tt[rt]))return!0;return!1}var _arrayIncludesWith=arrayIncludesWith$1,SetCache=_SetCache,arrayIncludes=_arrayIncludes,arrayIncludesWith=_arrayIncludesWith,arrayMap=_arrayMap,baseUnary=_baseUnary,cacheHas=_cacheHas,LARGE_ARRAY_SIZE=200;function baseDifference$1(tt,nt,et,rt){var ot=-1,at=arrayIncludes,st=!0,ut=tt.length,ct=[],pt=nt.length;if(!ut)return ct;et&&(nt=arrayMap(nt,baseUnary(et))),rt?(at=arrayIncludesWith,st=!1):nt.length>=LARGE_ARRAY_SIZE&&(at=cacheHas,st=!1,nt=new SetCache(nt));e:for(;++ot<ut;){var dt=tt[ot],ft=et==null?dt:et(dt);if(dt=rt||dt!==0?dt:0,st&&ft===ft){for(var bt=pt;bt--;)if(nt[bt]===ft)continue e;ct.push(dt)}else at(nt,ft,rt)||ct.push(dt)}return ct}var _baseDifference=baseDifference$1,baseDifference=_baseDifference,baseRest=_baseRest,isArrayLikeObject=isArrayLikeObject_1,without=baseRest(function(tt,nt){return isArrayLikeObject(tt)?baseDifference(tt,nt):[]}),without_1=without;const without$1=getDefaultExportFromCjs$1(without_1);var uaParser={exports:{}};(function(tt,nt){(function(et,rt){var ot="1.0.39",at="",st="?",ut="function",ct="undefined",pt="object",dt="string",ft="major",bt="model",ht="name",Mt="type",mt="vendor",Ot="version",zt="architecture",yt="console",vt="mobile",At="tablet",St="smarttv",Et="wearable",Tt="embedded",Rt=500,Ct="Amazon",wt="Apple",Ft="ASUS",Ht="BlackBerry",jt="Browser",s0="Chrome",Ut="Edge",Yt="Firefox",O0="Google",a0="Huawei",b0="LG",kt="Microsoft",o0="Motorola",qt="Opera",Dt="Samsung",Bt="Sharp",p0="Sony",r0="Xiaomi",l0="Zebra",f0="Facebook",i0="Chromium OS",$t="Mac OS",It=" Browser",Vt=function(e0,Nt){var Xt={};for(var d0 in e0)Nt[d0]&&Nt[d0].length%2===0?Xt[d0]=Nt[d0].concat(e0[d0]):Xt[d0]=e0[d0];return Xt},xt=function(e0){for(var Nt={},Xt=0;Xt<e0.length;Xt++)Nt[e0[Xt].toUpperCase()]=e0[Xt];return Nt},Lt=function(e0,Nt){return typeof e0===dt?Pt(Nt).indexOf(Pt(e0))!==-1:!1},Pt=function(e0){return e0.toLowerCase()},Zt=function(e0){return typeof e0===dt?e0.replace(/[^\d\.]/g,at).split(".")[0]:rt},Kt=function(e0,Nt){if(typeof e0===dt)return e0=e0.replace(/^\s\s*/,at),typeof Nt===ct?e0:e0.substring(0,Rt)},n0=function(e0,Nt){for(var Xt=0,d0,z0,w0,E0,g0,k0;Xt<Nt.length&&!g0;){var I0=Nt[Xt],N0=Nt[Xt+1];for(d0=z0=0;d0<I0.length&&!g0&&I0[d0];)if(g0=I0[d0++].exec(e0),g0)for(w0=0;w0<N0.length;w0++)k0=g0[++z0],E0=N0[w0],typeof E0===pt&&E0.length>0?E0.length===2?typeof E0[1]==ut?this[E0[0]]=E0[1].call(this,k0):this[E0[0]]=E0[1]:E0.length===3?typeof E0[1]===ut&&!(E0[1].exec&&E0[1].test)?this[E0[0]]=k0?E0[1].call(this,k0,E0[2]):rt:this[E0[0]]=k0?k0.replace(E0[1],E0[2]):rt:E0.length===4&&(this[E0[0]]=k0?E0[3].call(this,k0.replace(E0[1],E0[2])):rt):this[E0]=k0||rt;Xt+=2}},c0=function(e0,Nt){for(var Xt in Nt)if(typeof Nt[Xt]===pt&&Nt[Xt].length>0){for(var d0=0;d0<Nt[Xt].length;d0++)if(Lt(Nt[Xt][d0],e0))return Xt===st?rt:Xt}else if(Lt(Nt[Xt],e0))return Xt===st?rt:Xt;return Nt.hasOwnProperty("*")?Nt["*"]:e0},u0={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},y0={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},D0={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[Ot,[ht,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[Ot,[ht,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[ht,Ot],[/opios[\/ ]+([\w\.]+)/i],[Ot,[ht,qt+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[Ot,[ht,qt+" GX"]],[/\bopr\/([\w\.]+)/i],[Ot,[ht,qt]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[Ot,[ht,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[ht,Ot],[/quark(?:pc)?\/([-\w\.]+)/i],[Ot,[ht,"Quark"]],[/\bddg\/([\w\.]+)/i],[Ot,[ht,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[Ot,[ht,"UC"+jt]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[Ot,[ht,"WeChat"]],[/konqueror\/([\w\.]+)/i],[Ot,[ht,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[Ot,[ht,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[Ot,[ht,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[Ot,[ht,"Smart Lenovo "+jt]],[/(avast|avg)\/([\w\.]+)/i],[[ht,/(.+)/,"$1 Secure "+jt],Ot],[/\bfocus\/([\w\.]+)/i],[Ot,[ht,Yt+" Focus"]],[/\bopt\/([\w\.]+)/i],[Ot,[ht,qt+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[Ot,[ht,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[Ot,[ht,"Dolphin"]],[/coast\/([\w\.]+)/i],[Ot,[ht,qt+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[Ot,[ht,"MIUI "+jt]],[/fxios\/([-\w\.]+)/i],[Ot,[ht,Yt]],[/\bqihu|(qi?ho?o?|360)browser/i],[[ht,"360"+It]],[/\b(qq)\/([\w\.]+)/i],[[ht,/(.+)/,"$1Browser"],Ot],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[ht,/(.+)/,"$1"+It],Ot],[/samsungbrowser\/([\w\.]+)/i],[Ot,[ht,Dt+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[ht,/_/g," "],Ot],[/metasr[\/ ]?([\d\.]+)/i],[Ot,[ht,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[ht,"Sogou Mobile"],Ot],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[ht,Ot],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[ht],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[ht,f0],Ot],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[ht,Ot],[/\bgsa\/([\w\.]+) .*safari\//i],[Ot,[ht,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[Ot,[ht,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[Ot,[ht,s0+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[ht,s0+" WebView"],Ot],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[Ot,[ht,"Android "+jt]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[ht,Ot],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[Ot,[ht,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[Ot,ht],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[ht,[Ot,c0,u0]],[/(webkit|khtml)\/([\w\.]+)/i],[ht,Ot],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[ht,"Netscape"],Ot],[/(wolvic)\/([\w\.]+)/i],[ht,Ot],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[Ot,[ht,Yt+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[ht,[Ot,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[ht,[Ot,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[zt,"amd64"]],[/(ia32(?=;))/i],[[zt,Pt]],[/((?:i[346]|x)86)[;\)]/i],[[zt,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[zt,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[zt,"armhf"]],[/windows (ce|mobile); ppc;/i],[[zt,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[zt,/ower/,at,Pt]],[/(sun4\w)[;\)]/i],[[zt,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[zt,Pt]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[bt,[mt,Dt],[Mt,At]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[bt,[mt,Dt],[Mt,vt]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[bt,[mt,wt],[Mt,vt]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[bt,[mt,wt],[Mt,At]],[/(macintosh);/i],[bt,[mt,wt]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[bt,[mt,Bt],[Mt,vt]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[bt,[mt,a0],[Mt,At]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[bt,[mt,a0],[Mt,vt]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[bt,/_/g," "],[mt,r0],[Mt,vt]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[bt,/_/g," "],[mt,r0],[Mt,At]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[bt,[mt,"OPPO"],[Mt,vt]],[/\b(opd2\d{3}a?) bui/i],[bt,[mt,"OPPO"],[Mt,At]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[bt,[mt,"Vivo"],[Mt,vt]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[bt,[mt,"Realme"],[Mt,vt]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[bt,[mt,o0],[Mt,vt]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[bt,[mt,o0],[Mt,At]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[bt,[mt,b0],[Mt,At]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[bt,[mt,b0],[Mt,vt]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[bt,[mt,"Lenovo"],[Mt,At]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[bt,/_/g," "],[mt,"Nokia"],[Mt,vt]],[/(pixel c)\b/i],[bt,[mt,O0],[Mt,At]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[bt,[mt,O0],[Mt,vt]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[bt,[mt,p0],[Mt,vt]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[bt,"Xperia Tablet"],[mt,p0],[Mt,At]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[bt,[mt,"OnePlus"],[Mt,vt]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[bt,[mt,Ct],[Mt,At]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[bt,/(.+)/g,"Fire Phone $1"],[mt,Ct],[Mt,vt]],[/(playbook);[-\w\),; ]+(rim)/i],[bt,mt,[Mt,At]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[bt,[mt,Ht],[Mt,vt]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[bt,[mt,Ft],[Mt,At]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[bt,[mt,Ft],[Mt,vt]],[/(nexus 9)/i],[bt,[mt,"HTC"],[Mt,At]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[mt,[bt,/_/g," "],[Mt,vt]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[bt,[mt,"TCL"],[Mt,At]],[/(itel) ((\w+))/i],[[mt,Pt],bt,[Mt,c0,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[bt,[mt,"Acer"],[Mt,At]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[bt,[mt,"Meizu"],[Mt,vt]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[bt,[mt,"Ulefone"],[Mt,vt]],[/droid.+; (a(?:015|06[35]|142p?))/i],[bt,[mt,"Nothing"],[Mt,vt]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[mt,bt,[Mt,vt]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[mt,bt,[Mt,At]],[/(surface duo)/i],[bt,[mt,kt],[Mt,At]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[bt,[mt,"Fairphone"],[Mt,vt]],[/(u304aa)/i],[bt,[mt,"AT&T"],[Mt,vt]],[/\bsie-(\w*)/i],[bt,[mt,"Siemens"],[Mt,vt]],[/\b(rct\w+) b/i],[bt,[mt,"RCA"],[Mt,At]],[/\b(venue[\d ]{2,7}) b/i],[bt,[mt,"Dell"],[Mt,At]],[/\b(q(?:mv|ta)\w+) b/i],[bt,[mt,"Verizon"],[Mt,At]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[bt,[mt,"Barnes & Noble"],[Mt,At]],[/\b(tm\d{3}\w+) b/i],[bt,[mt,"NuVision"],[Mt,At]],[/\b(k88) b/i],[bt,[mt,"ZTE"],[Mt,At]],[/\b(nx\d{3}j) b/i],[bt,[mt,"ZTE"],[Mt,vt]],[/\b(gen\d{3}) b.+49h/i],[bt,[mt,"Swiss"],[Mt,vt]],[/\b(zur\d{3}) b/i],[bt,[mt,"Swiss"],[Mt,At]],[/\b((zeki)?tb.*\b) b/i],[bt,[mt,"Zeki"],[Mt,At]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[mt,"Dragon Touch"],bt,[Mt,At]],[/\b(ns-?\w{0,9}) b/i],[bt,[mt,"Insignia"],[Mt,At]],[/\b((nxa|next)-?\w{0,9}) b/i],[bt,[mt,"NextBook"],[Mt,At]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[mt,"Voice"],bt,[Mt,vt]],[/\b(lvtel\-)?(v1[12]) b/i],[[mt,"LvTel"],bt,[Mt,vt]],[/\b(ph-1) /i],[bt,[mt,"Essential"],[Mt,vt]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[bt,[mt,"Envizen"],[Mt,At]],[/\b(trio[-\w\. ]+) b/i],[bt,[mt,"MachSpeed"],[Mt,At]],[/\btu_(1491) b/i],[bt,[mt,"Rotor"],[Mt,At]],[/(shield[\w ]+) b/i],[bt,[mt,"Nvidia"],[Mt,At]],[/(sprint) (\w+)/i],[mt,bt,[Mt,vt]],[/(kin\.[onetw]{3})/i],[[bt,/\./g," "],[mt,kt],[Mt,vt]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[bt,[mt,l0],[Mt,At]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[bt,[mt,l0],[Mt,vt]],[/smart-tv.+(samsung)/i],[mt,[Mt,St]],[/hbbtv.+maple;(\d+)/i],[[bt,/^/,"SmartTV"],[mt,Dt],[Mt,St]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[mt,b0],[Mt,St]],[/(apple) ?tv/i],[mt,[bt,wt+" TV"],[Mt,St]],[/crkey/i],[[bt,s0+"cast"],[mt,O0],[Mt,St]],[/droid.+aft(\w+)( bui|\))/i],[bt,[mt,Ct],[Mt,St]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[bt,[mt,Bt],[Mt,St]],[/(bravia[\w ]+)( bui|\))/i],[bt,[mt,p0],[Mt,St]],[/(mitv-\w{5}) bui/i],[bt,[mt,r0],[Mt,St]],[/Hbbtv.*(technisat) (.*);/i],[mt,bt,[Mt,St]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[mt,Kt],[bt,Kt],[Mt,St]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[Mt,St]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[mt,bt,[Mt,yt]],[/droid.+; (shield) bui/i],[bt,[mt,"Nvidia"],[Mt,yt]],[/(playstation [345portablevi]+)/i],[bt,[mt,p0],[Mt,yt]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[bt,[mt,kt],[Mt,yt]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[bt,[mt,Dt],[Mt,Et]],[/((pebble))app/i],[mt,bt,[Mt,Et]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[bt,[mt,wt],[Mt,Et]],[/droid.+; (glass) \d/i],[bt,[mt,O0],[Mt,Et]],[/droid.+; (wt63?0{2,3})\)/i],[bt,[mt,l0],[Mt,Et]],[/(quest( \d| pro)?)/i],[bt,[mt,f0],[Mt,Et]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[mt,[Mt,Tt]],[/(aeobc)\b/i],[bt,[mt,Ct],[Mt,Tt]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[bt,[Mt,vt]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[bt,[Mt,At]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[Mt,At]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[Mt,vt]],[/(android[-\w\. ]{0,9});.+buil/i],[bt,[mt,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[Ot,[ht,Ut+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[Ot,[ht,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[ht,Ot],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[Ot,ht]],os:[[/microsoft (windows) (vista|xp)/i],[ht,Ot],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[ht,[Ot,c0,y0]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[Ot,c0,y0],[ht,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[Ot,/_/g,"."],[ht,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[ht,$t],[Ot,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[Ot,ht],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[ht,Ot],[/\(bb(10);/i],[Ot,[ht,Ht]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[Ot,[ht,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[Ot,[ht,Yt+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[Ot,[ht,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[Ot,[ht,"watchOS"]],[/crkey\/([\d\.]+)/i],[Ot,[ht,s0+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[ht,i0],Ot],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[ht,Ot],[/(sunos) ?([\w\.\d]*)/i],[[ht,"Solaris"],Ot],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[ht,Ot]]},S0=function(e0,Nt){if(typeof e0===pt&&(Nt=e0,e0=rt),!(this instanceof S0))return new S0(e0,Nt).getResult();var Xt=typeof et!==ct&&et.navigator?et.navigator:rt,d0=e0||(Xt&&Xt.userAgent?Xt.userAgent:at),z0=Xt&&Xt.userAgentData?Xt.userAgentData:rt,w0=Nt?Vt(D0,Nt):D0,E0=Xt&&Xt.userAgent==d0;return this.getBrowser=function(){var g0={};return g0[ht]=rt,g0[Ot]=rt,n0.call(g0,d0,w0.browser),g0[ft]=Zt(g0[Ot]),E0&&Xt&&Xt.brave&&typeof Xt.brave.isBrave==ut&&(g0[ht]="Brave"),g0},this.getCPU=function(){var g0={};return g0[zt]=rt,n0.call(g0,d0,w0.cpu),g0},this.getDevice=function(){var g0={};return g0[mt]=rt,g0[bt]=rt,g0[Mt]=rt,n0.call(g0,d0,w0.device),E0&&!g0[Mt]&&z0&&z0.mobile&&(g0[Mt]=vt),E0&&g0[bt]=="Macintosh"&&Xt&&typeof Xt.standalone!==ct&&Xt.maxTouchPoints&&Xt.maxTouchPoints>2&&(g0[bt]="iPad",g0[Mt]=At),g0},this.getEngine=function(){var g0={};return g0[ht]=rt,g0[Ot]=rt,n0.call(g0,d0,w0.engine),g0},this.getOS=function(){var g0={};return g0[ht]=rt,g0[Ot]=rt,n0.call(g0,d0,w0.os),E0&&!g0[ht]&&z0&&z0.platform&&z0.platform!="Unknown"&&(g0[ht]=z0.platform.replace(/chrome os/i,i0).replace(/macos/i,$t)),g0},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return d0},this.setUA=function(g0){return d0=typeof g0===dt&&g0.length>Rt?Kt(g0,Rt):g0,this},this.setUA(d0),this};S0.VERSION=ot,S0.BROWSER=xt([ht,Ot,ft]),S0.CPU=xt([zt]),S0.DEVICE=xt([bt,mt,Mt,yt,vt,St,At,Et,Tt]),S0.ENGINE=S0.OS=xt([ht,Ot]),tt.exports&&(nt=tt.exports=S0),nt.UAParser=S0;var x0=typeof et!==ct&&(et.jQuery||et.Zepto);if(x0&&!x0.ua){var m0=new S0;x0.ua=m0.getResult(),x0.ua.get=function(){return m0.getUA()},x0.ua.set=function(e0){m0.setUA(e0);var Nt=m0.getResult();for(var Xt in Nt)x0.ua[Xt]=Nt[Xt]}}})(typeof window=="object"?window:commonjsGlobal$1)})(uaParser,uaParser.exports);var uaParserExports=uaParser.exports;const UAParser=getDefaultExportFromCjs$1(uaParserExports);function getBrowserInfo(){const nt=new UAParser().getResult();return{browserName:nt.browser.name||"Unknown",browserVersion:nt.browser.version||"Unknown",deviceType:nt.device.type||"desktop",os:nt.os.name||"Unknown"}}const AppContext=React$1.createContext({wideMode:!1,initialSidebarState:PageConfig.SidebarState.AUTO,embedded:!1,showPadding:!1,disableScrolling:!1,showToolbar:!1,showColoredLine:!1,pageLinkBaseUrl:"",sidebarChevronDownshift:0,gitInfo:null,appConfig:{}});var __extends$1=function(){var tt=function(nt,et){return tt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(rt,ot){rt.__proto__=ot}||function(rt,ot){for(var at in ot)Object.prototype.hasOwnProperty.call(ot,at)&&(rt[at]=ot[at])},tt(nt,et)};return function(nt,et){tt(nt,et);function rt(){this.constructor=nt}nt.prototype=et===null?Object.create(et):(rt.prototype=et.prototype,new rt)}}(),__assign$1=function(){return __assign$1=Object.assign||function(tt){for(var nt,et=1,rt=arguments.length;et<rt;et++){nt=arguments[et];for(var ot in nt)Object.prototype.hasOwnProperty.call(nt,ot)&&(tt[ot]=nt[ot])}return tt},__assign$1.apply(this,arguments)},rowSizeBase={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},colSizeBase={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},edgeBase={width:"20px",height:"20px",position:"absolute"},styles={top:__assign$1(__assign$1({},rowSizeBase),{top:"-5px"}),right:__assign$1(__assign$1({},colSizeBase),{left:void 0,right:"-5px"}),bottom:__assign$1(__assign$1({},rowSizeBase),{top:void 0,bottom:"-5px"}),left:__assign$1(__assign$1({},colSizeBase),{left:"-5px"}),topRight:__assign$1(__assign$1({},edgeBase),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:__assign$1(__assign$1({},edgeBase),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:__assign$1(__assign$1({},edgeBase),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:__assign$1(__assign$1({},edgeBase),{left:"-10px",top:"-10px",cursor:"nw-resize"})},Resizer=function(tt){__extends$1(nt,tt);function nt(){var et=tt!==null&&tt.apply(this,arguments)||this;return et.onMouseDown=function(rt){et.props.onResizeStart(rt,et.props.direction)},et.onTouchStart=function(rt){et.props.onResizeStart(rt,et.props.direction)},et}return nt.prototype.render=function(){return reactExports.createElement("div",{className:this.props.className||"",style:__assign$1(__assign$1({position:"absolute",userSelect:"none"},styles[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},nt}(reactExports.PureComponent),__extends=function(){var tt=function(nt,et){return tt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(rt,ot){rt.__proto__=ot}||function(rt,ot){for(var at in ot)Object.prototype.hasOwnProperty.call(ot,at)&&(rt[at]=ot[at])},tt(nt,et)};return function(nt,et){tt(nt,et);function rt(){this.constructor=nt}nt.prototype=et===null?Object.create(et):(rt.prototype=et.prototype,new rt)}}(),__assign=function(){return __assign=Object.assign||function(tt){for(var nt,et=1,rt=arguments.length;et<rt;et++){nt=arguments[et];for(var ot in nt)Object.prototype.hasOwnProperty.call(nt,ot)&&(tt[ot]=nt[ot])}return tt},__assign.apply(this,arguments)},DEFAULT_SIZE={width:"auto",height:"auto"},clamp=function(tt,nt,et){return Math.max(Math.min(tt,et),nt)},snap=function(tt,nt,et){var rt=Math.round(tt/nt);return rt*nt+et*(rt-1)},hasDirection=function(tt,nt){return new RegExp(tt,"i").test(nt)},isTouchEvent=function(tt){return!!(tt.touches&&tt.touches.length)},isMouseEvent=function(tt){return!!((tt.clientX||tt.clientX===0)&&(tt.clientY||tt.clientY===0))},findClosestSnap=function(tt,nt,et){et===void 0&&(et=0);var rt=nt.reduce(function(at,st,ut){return Math.abs(st-tt)<Math.abs(nt[at]-tt)?ut:at},0),ot=Math.abs(nt[rt]-tt);return et===0||ot<et?nt[rt]:tt},getStringSize=function(tt){return tt=tt.toString(),tt==="auto"||tt.endsWith("px")||tt.endsWith("%")||tt.endsWith("vh")||tt.endsWith("vw")||tt.endsWith("vmax")||tt.endsWith("vmin")?tt:tt+"px"},getPixelSize=function(tt,nt,et,rt){if(tt&&typeof tt=="string"){if(tt.endsWith("px"))return Number(tt.replace("px",""));if(tt.endsWith("%")){var ot=Number(tt.replace("%",""))/100;return nt*ot}if(tt.endsWith("vw")){var ot=Number(tt.replace("vw",""))/100;return et*ot}if(tt.endsWith("vh")){var ot=Number(tt.replace("vh",""))/100;return rt*ot}}return tt},calculateNewMax=function(tt,nt,et,rt,ot,at,st){return rt=getPixelSize(rt,tt.width,nt,et),ot=getPixelSize(ot,tt.height,nt,et),at=getPixelSize(at,tt.width,nt,et),st=getPixelSize(st,tt.height,nt,et),{maxWidth:typeof rt>"u"?void 0:Number(rt),maxHeight:typeof ot>"u"?void 0:Number(ot),minWidth:typeof at>"u"?void 0:Number(at),minHeight:typeof st>"u"?void 0:Number(st)}},normalizeToPair=function(tt){return Array.isArray(tt)?tt:[tt,tt]},definedProps=["as","ref","style","className","grid","gridGap","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],baseClassName="__resizable_base__",Resizable=function(tt){__extends(nt,tt);function nt(et){var rt,ot,at,st,ut=tt.call(this,et)||this;return ut.ratio=1,ut.resizable=null,ut.parentLeft=0,ut.parentTop=0,ut.resizableLeft=0,ut.resizableRight=0,ut.resizableTop=0,ut.resizableBottom=0,ut.targetLeft=0,ut.targetTop=0,ut.appendBase=function(){if(!ut.resizable||!ut.window)return null;var ct=ut.parentNode;if(!ct)return null;var pt=ut.window.document.createElement("div");return pt.style.width="100%",pt.style.height="100%",pt.style.position="absolute",pt.style.transform="scale(0, 0)",pt.style.left="0",pt.style.flex="0 0 100%",pt.classList?pt.classList.add(baseClassName):pt.className+=baseClassName,ct.appendChild(pt),pt},ut.removeBase=function(ct){var pt=ut.parentNode;pt&&pt.removeChild(ct)},ut.state={isResizing:!1,width:(ot=(rt=ut.propsSize)===null||rt===void 0?void 0:rt.width)!==null&&ot!==void 0?ot:"auto",height:(st=(at=ut.propsSize)===null||at===void 0?void 0:at.height)!==null&&st!==void 0?st:"auto",direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},ut.onResizeStart=ut.onResizeStart.bind(ut),ut.onMouseMove=ut.onMouseMove.bind(ut),ut.onMouseUp=ut.onMouseUp.bind(ut),ut}return Object.defineProperty(nt.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(nt.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(nt.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||DEFAULT_SIZE},enumerable:!1,configurable:!0}),Object.defineProperty(nt.prototype,"size",{get:function(){var et=0,rt=0;if(this.resizable&&this.window){var ot=this.resizable.offsetWidth,at=this.resizable.offsetHeight,st=this.resizable.style.position;st!=="relative"&&(this.resizable.style.position="relative"),et=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:ot,rt=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:at,this.resizable.style.position=st}return{width:et,height:rt}},enumerable:!1,configurable:!0}),Object.defineProperty(nt.prototype,"sizeStyle",{get:function(){var et=this,rt=this.props.size,ot=function(ut){var ct;if(typeof et.state[ut]>"u"||et.state[ut]==="auto")return"auto";if(et.propsSize&&et.propsSize[ut]&&(!((ct=et.propsSize[ut])===null||ct===void 0)&&ct.toString().endsWith("%"))){if(et.state[ut].toString().endsWith("%"))return et.state[ut].toString();var pt=et.getParentSize(),dt=Number(et.state[ut].toString().replace("px","")),ft=dt/pt[ut]*100;return ft+"%"}return getStringSize(et.state[ut])},at=rt&&typeof rt.width<"u"&&!this.state.isResizing?getStringSize(rt.width):ot("width"),st=rt&&typeof rt.height<"u"&&!this.state.isResizing?getStringSize(rt.height):ot("height");return{width:at,height:st}},enumerable:!1,configurable:!0}),nt.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var et=this.appendBase();if(!et)return{width:0,height:0};var rt=!1,ot=this.parentNode.style.flexWrap;ot!=="wrap"&&(rt=!0,this.parentNode.style.flexWrap="wrap"),et.style.position="relative",et.style.minWidth="100%",et.style.minHeight="100%";var at={width:et.offsetWidth,height:et.offsetHeight};return rt&&(this.parentNode.style.flexWrap=ot),this.removeBase(et),at},nt.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},nt.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},nt.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var et=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:et.flexBasis!=="auto"?et.flexBasis:void 0})}},nt.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},nt.prototype.createSizeForCssProperty=function(et,rt){var ot=this.propsSize&&this.propsSize[rt];return this.state[rt]==="auto"&&this.state.original[rt]===et&&(typeof ot>"u"||ot==="auto")?"auto":et},nt.prototype.calculateNewMaxFromBoundary=function(et,rt){var ot=this.props.boundsByDirection,at=this.state.direction,st=ot&&hasDirection("left",at),ut=ot&&hasDirection("top",at),ct,pt;if(this.props.bounds==="parent"){var dt=this.parentNode;dt&&(ct=st?this.resizableRight-this.parentLeft:dt.offsetWidth+(this.parentLeft-this.resizableLeft),pt=ut?this.resizableBottom-this.parentTop:dt.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(ct=st?this.resizableRight:this.window.innerWidth-this.resizableLeft,pt=ut?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(ct=st?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),pt=ut?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return ct&&Number.isFinite(ct)&&(et=et&&et<ct?et:ct),pt&&Number.isFinite(pt)&&(rt=rt&&rt<pt?rt:pt),{maxWidth:et,maxHeight:rt}},nt.prototype.calculateNewSizeFromDirection=function(et,rt){var ot=this.props.scale||1,at=normalizeToPair(this.props.resizeRatio||1),st=at[0],ut=at[1],ct=this.state,pt=ct.direction,dt=ct.original,ft=this.props,bt=ft.lockAspectRatio,ht=ft.lockAspectRatioExtraHeight,Mt=ft.lockAspectRatioExtraWidth,mt=dt.width,Ot=dt.height,zt=ht||0,yt=Mt||0;return hasDirection("right",pt)&&(mt=dt.width+(et-dt.x)*st/ot,bt&&(Ot=(mt-yt)/this.ratio+zt)),hasDirection("left",pt)&&(mt=dt.width-(et-dt.x)*st/ot,bt&&(Ot=(mt-yt)/this.ratio+zt)),hasDirection("bottom",pt)&&(Ot=dt.height+(rt-dt.y)*ut/ot,bt&&(mt=(Ot-zt)*this.ratio+yt)),hasDirection("top",pt)&&(Ot=dt.height-(rt-dt.y)*ut/ot,bt&&(mt=(Ot-zt)*this.ratio+yt)),{newWidth:mt,newHeight:Ot}},nt.prototype.calculateNewSizeFromAspectRatio=function(et,rt,ot,at){var st=this.props,ut=st.lockAspectRatio,ct=st.lockAspectRatioExtraHeight,pt=st.lockAspectRatioExtraWidth,dt=typeof at.width>"u"?10:at.width,ft=typeof ot.width>"u"||ot.width<0?et:ot.width,bt=typeof at.height>"u"?10:at.height,ht=typeof ot.height>"u"||ot.height<0?rt:ot.height,Mt=ct||0,mt=pt||0;if(ut){var Ot=(bt-Mt)*this.ratio+mt,zt=(ht-Mt)*this.ratio+mt,yt=(dt-mt)/this.ratio+Mt,vt=(ft-mt)/this.ratio+Mt,At=Math.max(dt,Ot),St=Math.min(ft,zt),Et=Math.max(bt,yt),Tt=Math.min(ht,vt);et=clamp(et,At,St),rt=clamp(rt,Et,Tt)}else et=clamp(et,dt,ft),rt=clamp(rt,bt,ht);return{newWidth:et,newHeight:rt}},nt.prototype.setBoundingClientRect=function(){var et=1/(this.props.scale||1);if(this.props.bounds==="parent"){var rt=this.parentNode;if(rt){var ot=rt.getBoundingClientRect();this.parentLeft=ot.left*et,this.parentTop=ot.top*et}}if(this.props.bounds&&typeof this.props.bounds!="string"){var at=this.props.bounds.getBoundingClientRect();this.targetLeft=at.left*et,this.targetTop=at.top*et}if(this.resizable){var st=this.resizable.getBoundingClientRect(),ut=st.left,ct=st.top,pt=st.right,dt=st.bottom;this.resizableLeft=ut*et,this.resizableRight=pt*et,this.resizableTop=ct*et,this.resizableBottom=dt*et}},nt.prototype.onResizeStart=function(et,rt){if(!(!this.resizable||!this.window)){var ot=0,at=0;if(et.nativeEvent&&isMouseEvent(et.nativeEvent)?(ot=et.nativeEvent.clientX,at=et.nativeEvent.clientY):et.nativeEvent&&isTouchEvent(et.nativeEvent)&&(ot=et.nativeEvent.touches[0].clientX,at=et.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var st=this.props.onResizeStart(et,rt,this.resizable);if(st===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var ut,ct=this.window.getComputedStyle(this.resizable);if(ct.flexBasis!=="auto"){var pt=this.parentNode;if(pt){var dt=this.window.getComputedStyle(pt).flexDirection;this.flexDir=dt.startsWith("row")?"row":"column",ut=ct.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var ft={original:{x:ot,y:at,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:__assign(__assign({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(et.target).cursor||"auto"}),direction:rt,flexBasis:ut};this.setState(ft)}},nt.prototype.onMouseMove=function(et){var rt=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&isTouchEvent(et))try{et.preventDefault(),et.stopPropagation()}catch{}var ot=this.props,at=ot.maxWidth,st=ot.maxHeight,ut=ot.minWidth,ct=ot.minHeight,pt=isTouchEvent(et)?et.touches[0].clientX:et.clientX,dt=isTouchEvent(et)?et.touches[0].clientY:et.clientY,ft=this.state,bt=ft.direction,ht=ft.original,Mt=ft.width,mt=ft.height,Ot=this.getParentSize(),zt=calculateNewMax(Ot,this.window.innerWidth,this.window.innerHeight,at,st,ut,ct);at=zt.maxWidth,st=zt.maxHeight,ut=zt.minWidth,ct=zt.minHeight;var yt=this.calculateNewSizeFromDirection(pt,dt),vt=yt.newHeight,At=yt.newWidth,St=this.calculateNewMaxFromBoundary(at,st);this.props.snap&&this.props.snap.x&&(At=findClosestSnap(At,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(vt=findClosestSnap(vt,this.props.snap.y,this.props.snapGap));var Et=this.calculateNewSizeFromAspectRatio(At,vt,{width:St.maxWidth,height:St.maxHeight},{width:ut,height:ct});if(At=Et.newWidth,vt=Et.newHeight,this.props.grid){var Tt=snap(At,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),Rt=snap(vt,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),Ct=this.props.snapGap||0,wt=Ct===0||Math.abs(Tt-At)<=Ct?Tt:At,Ft=Ct===0||Math.abs(Rt-vt)<=Ct?Rt:vt;At=wt,vt=Ft}var Ht={width:At-ht.width,height:vt-ht.height};if(Mt&&typeof Mt=="string"){if(Mt.endsWith("%")){var jt=At/Ot.width*100;At=jt+"%"}else if(Mt.endsWith("vw")){var s0=At/this.window.innerWidth*100;At=s0+"vw"}else if(Mt.endsWith("vh")){var Ut=At/this.window.innerHeight*100;At=Ut+"vh"}}if(mt&&typeof mt=="string"){if(mt.endsWith("%")){var jt=vt/Ot.height*100;vt=jt+"%"}else if(mt.endsWith("vw")){var s0=vt/this.window.innerWidth*100;vt=s0+"vw"}else if(mt.endsWith("vh")){var Ut=vt/this.window.innerHeight*100;vt=Ut+"vh"}}var Yt={width:this.createSizeForCssProperty(At,"width"),height:this.createSizeForCssProperty(vt,"height")};this.flexDir==="row"?Yt.flexBasis=Yt.width:this.flexDir==="column"&&(Yt.flexBasis=Yt.height);var O0=this.state.width!==Yt.width,a0=this.state.height!==Yt.height,b0=this.state.flexBasis!==Yt.flexBasis,kt=O0||a0||b0;kt&&reactDomExports.flushSync(function(){rt.setState(Yt)}),this.props.onResize&&kt&&this.props.onResize(et,bt,this.resizable,Ht)}},nt.prototype.onMouseUp=function(et){var rt,ot,at=this.state,st=at.isResizing,ut=at.direction,ct=at.original;if(!(!st||!this.resizable)){var pt={width:this.size.width-ct.width,height:this.size.height-ct.height};this.props.onResizeStop&&this.props.onResizeStop(et,ut,this.resizable,pt),this.props.size&&this.setState({width:(rt=this.props.size.width)!==null&&rt!==void 0?rt:"auto",height:(ot=this.props.size.height)!==null&&ot!==void 0?ot:"auto"}),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:__assign(__assign({},this.state.backgroundStyle),{cursor:"auto"})})}},nt.prototype.updateSize=function(et){var rt,ot;this.setState({width:(rt=et.width)!==null&&rt!==void 0?rt:"auto",height:(ot=et.height)!==null&&ot!==void 0?ot:"auto"})},nt.prototype.renderResizer=function(){var et=this,rt=this.props,ot=rt.enable,at=rt.handleStyles,st=rt.handleClasses,ut=rt.handleWrapperStyle,ct=rt.handleWrapperClass,pt=rt.handleComponent;if(!ot)return null;var dt=Object.keys(ot).map(function(ft){return ot[ft]!==!1?reactExports.createElement(Resizer,{key:ft,direction:ft,onResizeStart:et.onResizeStart,replaceStyles:at&&at[ft],className:st&&st[ft]},pt&&pt[ft]?pt[ft]:null):null});return reactExports.createElement("div",{className:ct,style:ut},dt)},nt.prototype.render=function(){var et=this,rt=Object.keys(this.props).reduce(function(st,ut){return definedProps.indexOf(ut)!==-1||(st[ut]=et.props[ut]),st},{}),ot=__assign(__assign(__assign({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(ot.flexBasis=this.state.flexBasis);var at=this.props.as||"div";return reactExports.createElement(at,__assign({style:ot,className:this.props.className},rt,{ref:function(st){st&&(et.resizable=st)}}),this.state.isResizing&&reactExports.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},nt.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],gridGap:[0,0],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},nt}(reactExports.PureComponent);const conditionalCustomColor=(tt,nt,et)=>{let rt=tt.colors.bodyText!==tt.colors.gray10;return hasLightBackgroundColor(tt)&&(rt=tt.colors.bodyText!==tt.colors.gray85),rt?nt:et},StyledSidebar=newStyled("section",{target:"e1c29vlm0"})(({theme:tt,isCollapsed:nt,adjustTop:et,sidebarWidth:rt})=>{const ot=nt?0:Math.min(244,window.innerWidth),at=nt?0:Math.min(550,window.innerWidth*.9);return{position:"relative",top:et?tt.sizes.headerDecorationHeight:tt.spacing.none,backgroundColor:tt.colors.bgColor,zIndex:tt.zIndices.header+1,minWidth:ot,maxWidth:at,transform:nt?`translateX(-${rt}px)`:"none",transition:"transform 300ms, min-width 300ms, max-width 300ms","&:focus":{outline:"none"},[`@media (max-width: ${tt.breakpoints.md})`]:{boxShadow:`-2rem 0 2rem 2rem ${nt?"transparent":"#00000029"}`},"@media print":{display:nt?"none":"initial",height:"auto !important",maxHeight:"99%",boxShadow:"none"}}}),StyledSidebarNavContainer=newStyled("div",{target:"e1c29vlm1"})({position:"relative"}),StyledSidebarNavItems=newStyled("ul",{target:"e1c29vlm2"})(({theme:tt})=>({listStyle:"none",margin:tt.spacing.none,paddingBottom:tt.spacing.threeXS,paddingTop:tt.spacing.none,paddingRight:tt.spacing.none,paddingLeft:tt.spacing.none})),StyledSidebarNavLinkContainer=newStyled("div",{target:"e1c29vlm3"})({display:"flex",flexDirection:"column"}),StyledSidebarNavIcon=newStyled("span",{target:"e1c29vlm4"})(({theme:tt,isActive:nt})=>{const et=conditionalCustomColor(tt,tt.colors.fadedText60,tt.colors.navIconColor),rt=conditionalCustomColor(tt,tt.colors.bodyText,tt.colors.navActiveTextColor);return{display:"inline-flex",span:{color:nt?rt:et,fontWeight:nt?tt.fontWeights.bold:tt.fontWeights.normal}}}),StyledSidebarNavLink=newStyled("a",{target:"e1c29vlm5"})(({theme:tt,isActive:nt})=>{const et=conditionalCustomColor(tt,tt.colors.bodyText,tt.colors.navTextColor),rt={textDecoration:"none",fontWeight:nt?tt.fontWeights.bold:tt.fontWeights.normal};return{...rt,display:"flex",flexDirection:"row",alignItems:"center",gap:tt.spacing.sm,borderRadius:tt.radii.default,paddingLeft:tt.spacing.sm,paddingRight:tt.spacing.sm,marginLeft:tt.spacing.twoXL,marginRight:tt.spacing.twoXL,marginTop:tt.spacing.threeXS,marginBottom:tt.spacing.threeXS,lineHeight:tt.lineHeights.menuItem,color:et,backgroundColor:nt?tt.colors.darkenedBgMix25:"transparent","&:hover":{backgroundColor:transparentize(tt.colors.darkenedBgMix25,.1)},"&:active,&:visited,&:hover":{...rt},"&:focus":{outline:"none"},"&:focus-visible":{backgroundColor:tt.colors.darkenedBgMix15},"@media print":{paddingLeft:tt.spacing.none}}}),StyledSidebarLinkText=newStyled("span",{target:"e1c29vlm6"})(({isActive:tt,theme:nt})=>{const et=conditionalCustomColor(nt,transparentize(nt.colors.bodyText,.2),nt.colors.navTextColor),rt=conditionalCustomColor(nt,nt.colors.bodyText,nt.colors.navActiveTextColor);return{color:tt?rt:et,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",display:"table-cell"}}),StyledSidebarUserContent=newStyled("div",{target:"e1c29vlm7"})(({hasPageNavAbove:tt,theme:nt})=>({paddingTop:tt?nt.spacing.twoXL:0,paddingBottom:nt.sizes.sidebarTopSpace,paddingLeft:nt.spacing.twoXL,paddingRight:nt.spacing.twoXL})),StyledSidebarContent=newStyled("div",{target:"e1c29vlm8"})(({})=>({position:"relative",height:"100%",width:"100%",overflow:["auto","overlay"]})),RESIZE_HANDLE_WIDTH="8px",StyledResizeHandle=newStyled("div",{target:"e1c29vlm9"})(({theme:tt})=>({position:"absolute",width:RESIZE_HANDLE_WIDTH,height:"100%",cursor:"col-resize",zIndex:tt.zIndices.sidebarMobile,"&:hover":{backgroundImage:`linear-gradient(to right, transparent 20%, ${tt.colors.fadedText20} 28%, transparent 36%)`}})),StyledSidebarHeaderContainer=newStyled("div",{target:"e1c29vlm10"})(({theme:tt})=>({display:"flex",justifyContent:"space-between",alignItems:"start",padding:tt.spacing.twoXL,paddingTop:`calc(${tt.spacing.twoXL} - ${tt.sizes.headerDecorationHeight})`})),StyledLogoLink=newStyled("a",{target:"e1c29vlm11"})(({})=>({"&:hover":{opacity:"0.7"}}));function translateLogoHeight(tt,nt){return nt==="small"?tt.sizes.smallLogoHeight:nt==="large"?tt.sizes.largeLogoHeight:tt.sizes.defaultLogoHeight}const StyledLogo=newStyled("img",{target:"e1c29vlm12"})(({theme:tt,size:nt,sidebarWidth:et})=>({height:translateLogoHeight(tt,nt),marginTop:nt=="small"?tt.spacing.xs:tt.spacing.twoXS,marginBottom:nt=="small"?tt.spacing.xs:tt.spacing.twoXS,marginRight:tt.spacing.sm,marginLeft:tt.spacing.none,zIndex:tt.zIndices.header,objectFit:"contain",verticalAlign:"middle",...et&&{maxWidth:`calc(${et}px - 2 * ${tt.spacing.twoXL} - ${tt.spacing.sm} - 2.25rem)`}})),StyledNoLogoSpacer=newStyled("div",{target:"e1c29vlm13"})(({theme:tt})=>({height:tt.sizes.largeLogoHeight})),StyledSidebarOpenContainer=newStyled("div",{target:"e1c29vlm14"})(({theme:tt,chevronDownshift:nt})=>({position:"fixed",top:nt?`${nt}px`:tt.spacing.xl,left:tt.spacing.twoXL,zIndex:tt.zIndices.header,display:"flex",justifyContent:"center",alignItems:"center","@media print":{position:"absolute",left:0,top:0,marginTop:0,[`& > ${StyledLogo}`]:{marginTop:0}}})),StyledOpenSidebarButton=newStyled("div",{target:"e1c29vlm15"})(({theme:tt})=>{const nt=conditionalCustomColor(tt,tt.colors.bodyText,tt.colors.sidebarControlColor);return{zIndex:tt.zIndices.header,color:nt,marginTop:tt.spacing.twoXS,button:{"&:hover":{backgroundColor:tt.colors.darkenedBgMix25}},"@media print":{display:"none"}}}),StyledCollapseSidebarButton=newStyled("div",{target:"e1c29vlm16"})(({showSidebarCollapse:tt,theme:nt})=>{const et=conditionalCustomColor(nt,nt.colors.bodyText,nt.colors.sidebarControlColor);return{display:tt?"inline":"none",transition:"left 300ms",transitionDelay:"left 300ms",color:et,lineHeight:"0","@media print":{display:"none"},[`@media (max-width: ${nt.breakpoints.sm})`]:{display:"inline"}}}),StyledSidebarNavSectionHeader=newStyled("header",{target:"e1c29vlm17"})(({theme:tt})=>{const nt=conditionalCustomColor(tt,transparentize(tt.colors.bodyText,.15),tt.colors.navTextColor);return{fontSize:tt.fontSizes.sm,fontWeight:tt.fontWeights.bold,color:nt,lineHeight:tt.lineHeights.small,paddingRight:tt.spacing.sm,marginLeft:tt.spacing.twoXL,marginRight:tt.spacing.twoXL,marginTop:tt.spacing.sm,marginBottom:tt.spacing.twoXS}}),StyledViewButton=newStyled("button",{target:"e1c29vlm18"})(({theme:tt})=>{const nt=conditionalCustomColor(tt,tt.colors.bodyText,tt.colors.navActiveTextColor);return{fontSize:tt.fontSizes.sm,fontFamily:"inherit",lineHeight:tt.lineHeights.base,color:nt,backgroundColor:tt.colors.transparent,border:"none",borderRadius:tt.radii.default,marginTop:tt.spacing.twoXS,marginLeft:tt.spacing.xl,marginBottom:tt.spacing.none,marginRight:tt.spacing.none,padding:`${tt.spacing.threeXS} ${tt.spacing.sm}`,"&:hover, &:active, &:focus":{border:"none",outline:"none",boxShadow:"none"},"&:hover":{backgroundColor:tt.colors.darkenedBgMix25}}}),StyledSidebarNavSeparator=newStyled("div",{target:"e1c29vlm19"})(({theme:tt})=>({paddingTop:tt.spacing.lg,borderBottom:`${tt.sizes.borderWidth} solid ${tt.colors.borderColor}`}));function arrayAggregator$1(tt,nt,et,rt){for(var ot=-1,at=tt==null?0:tt.length;++ot<at;){var st=tt[ot];nt(rt,st,et(st),tt)}return rt}var _arrayAggregator=arrayAggregator$1,baseEach=_baseEach;function baseAggregator$1(tt,nt,et,rt){return baseEach(tt,function(ot,at,st){nt(rt,ot,et(ot),st)}),rt}var _baseAggregator=baseAggregator$1,arrayAggregator=_arrayAggregator,baseAggregator=_baseAggregator,baseIteratee$1=_baseIteratee,isArray$1=isArray_1;function createAggregator$1(tt,nt){return function(et,rt){var ot=isArray$1(et)?arrayAggregator:baseAggregator,at=nt?nt():{};return ot(et,tt,baseIteratee$1(rt),at)}}var _createAggregator=createAggregator$1,baseAssignValue$1=_baseAssignValue,createAggregator=_createAggregator,objectProto=Object.prototype,hasOwnProperty$1=objectProto.hasOwnProperty,groupBy=createAggregator(function(tt,nt,et){hasOwnProperty$1.call(tt,et)?tt[et].push(nt):baseAssignValue$1(tt,et,[nt])}),groupBy_1=groupBy;const groupBy$1=getDefaultExportFromCjs$1(groupBy_1),NavSection=({header:tt="",children:nt})=>jsxs(Fragment,{children:[tt&&jsx$1(StyledSidebarNavSectionHeader,{"data-testid":"stNavSectionHeader",children:tt}),nt]}),SidebarNavLink=({isActive:tt,pageUrl:nt,icon:et,onClick:rt,children:ot})=>jsx$1(StyledSidebarNavLinkContainer,{children:jsxs(StyledSidebarNavLink,{"data-testid":"stSidebarNavLink",isActive:tt,href:nt,onClick:rt,children:[et&&et.length&&jsx$1(StyledSidebarNavIcon,{isActive:tt,children:jsx$1(DynamicIcon,{size:"md",iconValue:et})}),jsx$1(StyledSidebarLinkText,{isActive:tt,children:ot})]})}),COLLAPSE_THRESHOLD=12,NUM_PAGES_TO_SHOW_WHEN_COLLAPSED=10;function NavLink({pageUrl:tt,page:nt,isActive:et,onClick:rt}){const ot=nt.pageName;return jsx$1("li",{children:jsx$1(SidebarNavLink,{isActive:et,pageUrl:tt,icon:nt.icon,onClick:rt,children:ot})})}function generateNavSections(tt,nt,et,rt){const ot=[],at=groupBy$1(nt,ut=>ut.sectionHeader||"");let st=0;return tt.forEach(ut=>{const ct=at[ut]??[];let pt=ct;if(et){if(st>=NUM_PAGES_TO_SHOW_WHEN_COLLAPSED)return;st+ct.length>NUM_PAGES_TO_SHOW_WHEN_COLLAPSED&&(pt=ct.slice(0,NUM_PAGES_TO_SHOW_WHEN_COLLAPSED-st))}st+=pt.length,ot.push(jsx$1(NavSection,{header:ut,children:pt.map(rt)},ut))}),ot}const SidebarNav=({endpoints:tt,appPages:nt,collapseSidebar:et,expandSidebarNav:rt,currentPageScriptHash:ot,hasSidebarElements:at,navSections:st,onPageChange:ut})=>{const[ct,pt]=reactExports.useState(!1),{pageLinkBaseUrl:dt}=reactExports.useContext(AppContext);reactExports.useEffect(()=>{const zt=localStorageAvailable()&&window.localStorage.getItem("sidebarNavState")==="expanded";!ct&&(rt||zt)&&pt(!0)},[ct,rt]);const ft=reactExports.useCallback(()=>{const zt=!ct;localStorageAvailable()&&(zt?window.localStorage.setItem("sidebarNavState","expanded"):window.localStorage.removeItem("sidebarNavState")),pt(zt)},[ct]),bt=reactExports.useCallback((zt,yt)=>{const vt=tt.buildAppPageURL(dt,zt),At=zt.pageScriptHash===ot;return jsx$1(NavLink,{pageUrl:vt,page:zt,isActive:At,onClick:St=>{St.preventDefault(),ut(zt.pageScriptHash),isMobile_1&&et()}},`${zt.pageName}-${yt}`)},[et,ot,tt,ut,dt]);let ht=[];const Mt=nt.length,mt=at&&Mt>COLLAPSE_THRESHOLD&&!rt,Ot=mt&&!ct;return st.length>0?ht=generateNavSections(st,nt,Ot,bt):ht=(Ot?nt.slice(0,NUM_PAGES_TO_SHOW_WHEN_COLLAPSED):nt).map(bt),jsxs(StyledSidebarNavContainer,{"data-testid":"stSidebarNav",children:[jsx$1(StyledSidebarNavItems,{"data-testid":"stSidebarNavItems",children:ht}),mt&&jsx$1(StyledViewButton,{onClick:ft,"data-testid":"stSidebarNavViewButton",children:ct?"View less":`View ${Mt-NUM_PAGES_TO_SHOW_WHEN_COLLAPSED} more`}),at&&jsx$1(StyledSidebarNavSeparator,{"data-testid":"stSidebarNavSeparator"})]})},Cn=class Cn extends reactExports.PureComponent{constructor(nt){super(nt),this.sidebarRef=React$1.createRef(),this.handleClickOutside=rt=>{if(this.sidebarRef&&window){const{current:ot}=this.sidebarRef,{innerWidth:at}=window;ot&&!ot.contains(rt.target)&&at<=this.mediumBreakpointPx&&this.setState({collapsedSidebar:!0})}},this.setSidebarWidth=rt=>{const ot=rt.toString();this.setState({sidebarWidth:ot}),localStorageAvailable()&&window.localStorage.setItem("sidebarWidth",ot)},this.resetSidebarWidth=rt=>{rt.detail===2&&(this.setState({sidebarWidth:Cn.minWidth}),localStorageAvailable()&&window.localStorage.setItem("sidebarWidth",Cn.minWidth))},this.checkMobileOnResize=()=>{if(!window)return!1;const{innerWidth:rt}=window;return rt<this.state.lastInnerWidth&&rt<=this.mediumBreakpointPx&&this.setState({collapsedSidebar:!0}),this.setState({lastInnerWidth:rt}),!0},this.toggleCollapse=()=>{const{collapsedSidebar:rt}=this.state;this.setState({collapsedSidebar:!rt})},this.onMouseOver=()=>{this.setState({showSidebarCollapse:!0})},this.onMouseOut=()=>{this.setState({showSidebarCollapse:!1})},this.mediumBreakpointPx=Cn.calculateMaxBreakpoint(nt.theme.breakpoints.md);const et=localStorageAvailable()?window.localStorage.getItem("sidebarWidth"):void 0;this.state={collapsedSidebar:Cn.shouldCollapse(nt,this.mediumBreakpointPx),sidebarWidth:et||Cn.minWidth,lastInnerWidth:window?window.innerWidth:1/0,showSidebarCollapse:!1}}static calculateMaxBreakpoint(nt){return parseInt(nt,10)-.02}componentDidUpdate(nt){this.mediumBreakpointPx=Cn.calculateMaxBreakpoint(this.props.theme.breakpoints.md),(this.props.initialSidebarState!==nt.initialSidebarState||this.props.hasElements!==nt.hasElements)&&this.setState({collapsedSidebar:Cn.shouldCollapse(this.props,this.mediumBreakpointPx)})}static shouldCollapse(nt,et){switch(nt.initialSidebarState){case PageConfig.SidebarState.EXPANDED:return!1;case PageConfig.SidebarState.COLLAPSED:return!0;case PageConfig.SidebarState.AUTO:default:{const{innerWidth:rt}=window||{};return rt?rt<=et:!1}}}componentDidMount(){window.addEventListener("resize",this.checkMobileOnResize),document.addEventListener("mousedown",this.handleClickOutside)}componentWillUnmount(){window.removeEventListener("resize",this.checkMobileOnResize),document.removeEventListener("mousedown",this.handleClickOutside)}headerDecorationVisible(){let nt=!1;const et=document.getElementById("stDecoration");if(et){const rt=window.getComputedStyle(et);nt=rt.visibility!=="hidden"&&rt.visibility!=="collapse"&&rt.display!=="none"}return nt}renderLogo(nt){const{appLogo:et,endpoints:rt}=this.props,{sidebarWidth:ot}=this.state;if(!et)return jsx$1(StyledNoLogoSpacer,{"data-testid":"stLogoSpacer"});const at=nt&&et.iconImage?et.iconImage:et.image,st=rt.buildMediaURL(at),ut=jsx$1(StyledLogo,{src:st,size:et.size,sidebarWidth:ot,alt:"Logo",className:"stLogo","data-testid":"stLogo"});return et.link?jsx$1(StyledLogoLink,{href:et.link,target:"_blank",rel:"noreferrer","data-testid":"stLogoLink",children:ut}):ut}render(){const{collapsedSidebar:nt,sidebarWidth:et,showSidebarCollapse:rt}=this.state,{appPages:ot,chevronDownshift:at,children:st,hasElements:ut,onPageChange:ct,currentPageScriptHash:pt,hideSidebarNav:dt,expandSidebarNav:ft,navSections:bt}=this.props,ht=ot.length>1&&!dt,mt=!(isEmbed()&&!isColoredLineDisplayed())&&this.headerDecorationVisible();return jsxs(Fragment,{children:[jsxs(StyledSidebarOpenContainer,{chevronDownshift:at,"data-testid":"stSidebarCollapsedControl",children:[this.renderLogo(!0),jsx$1(StyledOpenSidebarButton,{children:jsx$1(BaseButton,{kind:BaseButtonKind.HEADER_NO_PADDING,onClick:this.toggleCollapse,children:jsx$1(Icon$2,{content:ChevronRight,size:"xl"})})})]}),jsx$1(Resizable,{className:"stSidebar","data-testid":"stSidebar","aria-expanded":!nt,enable:{top:!1,right:!0,bottom:!1,left:!1},handleStyles:{right:{width:RESIZE_HANDLE_WIDTH,right:"-6px"}},handleComponent:{right:jsx$1(StyledResizeHandle,{onClick:this.resetSidebarWidth})},size:{width:et,height:"auto"},as:StyledSidebar,onResizeStop:(Ot,zt,yt,vt)=>{const At=parseInt(et,10)+vt.width;this.setSidebarWidth(At)},isCollapsed:nt,adjustTop:mt,sidebarWidth:et,children:jsxs(StyledSidebarContent,{"data-testid":"stSidebarContent",ref:this.sidebarRef,onMouseOver:this.onMouseOver,onMouseOut:this.onMouseOut,children:[jsxs(StyledSidebarHeaderContainer,{"data-testid":"stSidebarHeader",children:[this.renderLogo(!1),jsx$1(StyledCollapseSidebarButton,{showSidebarCollapse:rt,"data-testid":"stSidebarCollapseButton",children:jsx$1(BaseButton,{kind:BaseButtonKind.HEADER_NO_PADDING,onClick:this.toggleCollapse,children:jsx$1(Icon$2,{content:ChevronLeft,size:"xl"})})})]}),ht&&jsx$1(SidebarNav,{endpoints:this.props.endpoints,appPages:ot,collapseSidebar:this.toggleCollapse,currentPageScriptHash:pt,navSections:bt,hasSidebarElements:ut,expandSidebarNav:ft,onPageChange:ct}),jsx$1(StyledSidebarUserContent,{hasPageNavAbove:ht,"data-testid":"stSidebarUserContent",children:st})]})})]})}};Cn.minWidth="336";let Sidebar=Cn;function SidebarWithProvider(tt){return jsx$1(IsSidebarContext.Provider,{value:!0,children:jsx$1(Sidebar,{...tt})})}const Sidebar$1=withTheme(SidebarWithProvider),createSidebarTheme=tt=>createTheme("Sidebar",{secondaryBackgroundColor:tt.emotion.colors.bgColor,backgroundColor:tt.emotion.colors.secondaryBg,bodyFont:tt.emotion.genericFonts.bodyFont,codeFont:tt.emotion.genericFonts.codeFont},tt,!0),ThemedSidebar=({children:tt,...nt})=>{const{sidebarChevronDownshift:et}=React$1.useContext(AppContext),{activeTheme:rt}=React$1.useContext(LibContext),ot=createSidebarTheme(rt);return jsx$1(ThemeProvider,{theme:ot.emotion,baseuiTheme:ot.basewebTheme,children:jsx$1(Sidebar$1,{...nt,chevronDownshift:et,children:tt})})};function EventContainer({scriptRunId:tt,children:nt}){const et=useTheme();return reactExports.useEffect(()=>{var rt;(rt=toaster.getRef())==null||rt.clearAll()},[tt]),jsxs(Fragment,{children:[jsx$1(ToasterContainer,{placement:PLACEMENT$1.topRight,autoHideDuration:4*1e3,overrides:{Root:{style:{top:et.sizes.headerHeight,zIndex:et.zIndices.toast},props:{"data-testid":"stToastContainer",className:"stToastContainer"}}}}),nt]})}const StyledAppViewContainer=newStyled("div",{target:"eht7o1d0"})({display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"stretch",alignContent:"flex-start",position:"absolute",top:0,left:0,right:0,bottom:0,overflow:"hidden","@media print":{overflow:"visible"}}),StyledAppViewMain=newStyled("section",{target:"eht7o1d1"})(({disableScrolling:tt,theme:nt})=>({display:"flex",flexDirection:"column",width:nt.sizes.full,overflow:tt?"hidden":"auto",alignItems:"center","&:focus":{outline:"none"},"@media not print":{[`@media (max-width: ${nt.breakpoints.md})`]:{position:"absolute",top:0,left:0,right:0,bottom:0}},"@media print":{overflow:"visible"}})),StyledStickyBottomContainer=newStyled("div",{target:"eht7o1d2"})(({theme:tt})=>({position:"sticky",left:0,bottom:0,width:"100%",zIndex:tt.zIndices.bottom,"@media print":{position:"static"}})),StyledInnerBottomContainer=newStyled("div",{target:"eht7o1d3"})(({theme:tt})=>({position:"relative",bottom:0,width:"100%",minWidth:"100%",backgroundColor:tt.colors.bgColor,display:"flex",flexDirection:"column",alignItems:"center"})),applyWideModePadding=tt=>({[`@media (min-width: calc(${tt.sizes.contentMaxWidth} + 2 * (${tt.sizes.wideSidePadding} - ${tt.spacing.lg})))`]:{paddingLeft:tt.sizes.wideSidePadding,paddingRight:tt.sizes.wideSidePadding},minWidth:"auto",maxWidth:"initial"}),StyledAppViewBlockContainer=newStyled("div",{target:"eht7o1d4"})(({hasSidebar:tt,hasBottom:nt,isEmbedded:et,isWideMode:rt,showPadding:ot,addPaddingForHeader:at,theme:st})=>{const ut="2.1rem";let ct=ot?"6rem":ut;(at&&!ot||et&&tt)&&(ct=`${parseFloat(st.sizes.headerHeight)+parseFloat(st.spacing.md)}rem`);const pt=ot&&!nt?"10rem":st.spacing.lg;return{width:st.sizes.full,paddingLeft:st.spacing.lg,paddingRight:st.spacing.lg,paddingTop:ct,paddingBottom:pt,maxWidth:st.sizes.contentMaxWidth,...rt&&applyWideModePadding(st),"@media print":{paddingTop:ut}}}),StyledSidebarBlockContainer=newStyled("div",{target:"eht7o1d5"})(({theme:tt})=>({width:tt.sizes.full})),StyledEventBlockContainer=newStyled("div",{target:"eht7o1d6"})({display:"none"}),StyledBottomBlockContainer=newStyled("div",{target:"eht7o1d7"})(({isWideMode:tt,showPadding:nt,theme:et})=>({width:et.sizes.full,paddingLeft:et.spacing.lg,paddingRight:et.spacing.lg,paddingTop:et.spacing.lg,paddingBottom:nt?et.sizes.appDefaultBottomPadding:et.spacing.threeXL,maxWidth:et.sizes.contentMaxWidth,...tt&&applyWideModePadding(et),"@media print":{paddingTop:et.spacing.none}})),StyledAppViewBlockSpacer=newStyled("div",{target:"eht7o1d8"})(({theme:tt})=>({width:tt.sizes.full,flexGrow:1})),StyledIFrameResizerAnchor=newStyled("div",{target:"eht7o1d9"})(({theme:tt})=>({position:"relative",bottom:tt.spacing.none}));function ScrollToBottomContainer(tt){const{className:nt,tabIndex:et,children:rt,isEmbedded:ot,disableScrolling:at}=tt,st=useScrollToBottom();return jsx$1(StyledAppViewMain,{tabIndex:et,className:nt,isEmbedded:ot,disableScrolling:at,ref:st,"data-testid":"stAppScrollToBottomContainer",children:rt})}function AppView(tt){const{elements:nt,scriptRunId:et,scriptRunState:rt,widgetMgr:ot,widgetsDisabled:at,uploadClient:st,componentRegistry:ut,formsData:ct,appLogo:pt,appPages:dt,navSections:ft,onPageChange:bt,currentPageScriptHash:ht,expandSidebarNav:Mt,hideSidebarNav:mt,sendMessageToHost:Ot,endpoints:zt}=tt;React$1.useEffect(()=>{const Dt=()=>{Ot({type:"UPDATE_HASH",hash:window.location.hash})};return window.addEventListener("hashchange",Dt,!1),()=>window.removeEventListener("hashchange",Dt,!1)},[Ot]);const{wideMode:yt,initialSidebarState:vt,embedded:At,showPadding:St,disableScrolling:Et,showToolbar:Tt,showColoredLine:Rt,sidebarChevronDownshift:Ct}=React$1.useContext(AppContext),{addScriptFinishedHandler:wt,removeScriptFinishedHandler:Ft}=React$1.useContext(LibContext),Ht=yt?"wide":"narrow",jt=!nt.sidebar.isEmpty,s0=!nt.event.isEmpty,Ut=!nt.bottom.isEmpty,[Yt,O0]=React$1.useState(!1),a0=jt||!mt&&dt.length>1||Yt;React$1.useEffect(()=>{a0&&mt&&!Yt&&O0(!0)},[a0,mt,Yt]);const b0=React$1.useCallback(()=>{!jt&&Yt&&O0(!1)},[jt,Yt]);React$1.useEffect(()=>(wt(b0),()=>{Ft(b0)}),[b0,wt,Ft]);const kt=Dt=>{const Bt=Dt.iconImage?Dt.iconImage:Dt.image,p0=zt.buildMediaURL(Bt),r0=jsx$1(StyledLogo,{src:p0,size:Dt.size,alt:"Logo",className:"stLogo","data-testid":"stLogo"});return Dt.link?jsx$1(StyledLogoLink,{href:Dt.link,target:"_blank",rel:"noreferrer","data-testid":"stLogoLink",children:r0}):r0},o0=Ut?ScrollToBottomContainer:StyledAppViewMain,qt=Dt=>jsx$1(VerticalBlock,{node:Dt,endpoints:zt,scriptRunId:et,scriptRunState:rt,widgetMgr:ot,widgetsDisabled:at,uploadClient:st,componentRegistry:ut,formsData:ct});return jsxs(StyledAppViewContainer,{className:"stAppViewContainer appview-container","data-testid":"stAppViewContainer","data-layout":Ht,children:[a0&&jsx$1(Profiler,{id:"Sidebar",children:jsx$1(ThemedSidebar,{endpoints:zt,initialSidebarState:vt,appLogo:pt,appPages:dt,navSections:ft,hasElements:jt,onPageChange:bt,currentPageScriptHash:ht,hideSidebarNav:mt,expandSidebarNav:Mt,children:jsx$1(StyledSidebarBlockContainer,{children:qt(nt.sidebar)})})}),!a0&&pt&&jsx$1(StyledSidebarOpenContainer,{chevronDownshift:Ct,"data-testid":"stSidebarCollapsedControl",children:kt(pt)}),jsxs(o0,{tabIndex:0,isEmbedded:At,disableScrolling:Et,className:"stMain","data-testid":"stMain",children:[jsx$1(Profiler,{id:"Main",children:jsx$1(StyledAppViewBlockContainer,{className:"stMainBlockContainer block-container","data-testid":"stMainBlockContainer",isWideMode:yt,showPadding:St,addPaddingForHeader:Tt||Rt,hasBottom:Ut,isEmbedded:At,hasSidebar:a0,children:qt(nt.main)})}),!Ut&&jsx$1(StyledIFrameResizerAnchor,{"data-testid":"stAppIframeResizerAnchor","data-iframe-height":!0}),Ut&&jsxs(Profiler,{id:"Bottom",children:[jsx$1(StyledAppViewBlockSpacer,{}),jsx$1(StyledStickyBottomContainer,{className:"stBottom","data-testid":"stBottom",children:jsx$1(StyledInnerBottomContainer,{children:jsx$1(StyledBottomBlockContainer,{"data-testid":"stBottomBlockContainer",isWideMode:yt,showPadding:St,children:qt(nt.bottom)})})})]})]}),s0&&jsx$1(Profiler,{id:"Event",children:jsx$1(EventContainer,{scriptRunId:nt.event.scriptRunId,children:jsx$1(StyledEventBlockContainer,{className:"stEvent","data-testid":"stEvent",children:qt(nt.event)})})})]})}var Ellipses=reactExports.forwardRef(function(tt,nt){var et={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return reactExports.createElement(EmotionIconBase,_extends$Q({iconAttrs:et,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},tt,{ref:nt}),reactExports.createElement("path",{d:"M0 3v2h2V3H0zm3 0v2h2V3H3zm3 0v2h2V3H6z"}))});Ellipses.displayName="Ellipses";var Info=reactExports.forwardRef(function(tt,nt){var et={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return reactExports.createElement(EmotionIconBase,_extends$Q({iconAttrs:et,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},tt,{ref:nt}),reactExports.createElement("path",{d:"M5 0c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zM3.5 2.5C2.67 2.5 2 3.17 2 4h1c0-.28.22-.5.5-.5s.5.22.5.5-1 1.64-1 2.5C3 7.36 3.67 8 4.5 8S6 7.33 6 6.5H5c0 .28-.22.5-.5.5S4 6.78 4 6.5C4 6.14 5 4.66 5 4c0-.81-.67-1.5-1.5-1.5z"}))});Info.displayName="Info";var Warning=reactExports.forwardRef(function(tt,nt){var et={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return reactExports.createElement(EmotionIconBase,_extends$Q({iconAttrs:et,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},tt,{ref:nt}),reactExports.createElement("path",{d:"M3.09 0c-.06 0-.1.04-.13.09L.02 6.9c-.02.05-.03.13-.03.19v.81c0 .05.04.09.09.09h6.81c.05 0 .09-.04.09-.09v-.81c0-.05-.01-.14-.03-.19L4.01.09A.142.142 0 003.88 0h-.81zM3 3h1v2H3V3zm0 3h1v1H3V6z"}))});Warning.displayName="Warning";function hasClass(tt,nt){return tt.classList?!!nt&&tt.classList.contains(nt):(" "+(tt.className.baseVal||tt.className)+" ").indexOf(" "+nt+" ")!==-1}function addClass(tt,nt){tt.classList?tt.classList.add(nt):hasClass(tt,nt)||(typeof tt.className=="string"?tt.className=tt.className+" "+nt:tt.setAttribute("class",(tt.className&&tt.className.baseVal||"")+" "+nt))}function replaceClassName(tt,nt){return tt.replace(new RegExp("(^|\\s)"+nt+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function removeClass$1(tt,nt){tt.classList?tt.classList.remove(nt):typeof tt.className=="string"?tt.className=replaceClassName(tt.className,nt):tt.setAttribute("class",replaceClassName(tt.className&&tt.className.baseVal||"",nt))}const config={disabled:!1},TransitionGroupContext=React$1.createContext(null);var forceReflow=function tt(nt){return nt.scrollTop},UNMOUNTED="unmounted",EXITED="exited",ENTERING="entering",ENTERED="entered",EXITING="exiting",Transition=function(tt){_inheritsLoose(nt,tt);function nt(rt,ot){var at;at=tt.call(this,rt,ot)||this;var st=ot,ut=st&&!st.isMounting?rt.enter:rt.appear,ct;return at.appearStatus=null,rt.in?ut?(ct=EXITED,at.appearStatus=ENTERING):ct=ENTERED:rt.unmountOnExit||rt.mountOnEnter?ct=UNMOUNTED:ct=EXITED,at.state={status:ct},at.nextCallback=null,at}nt.getDerivedStateFromProps=function(ot,at){var st=ot.in;return st&&at.status===UNMOUNTED?{status:EXITED}:null};var et=nt.prototype;return et.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},et.componentDidUpdate=function(ot){var at=null;if(ot!==this.props){var st=this.state.status;this.props.in?st!==ENTERING&&st!==ENTERED&&(at=ENTERING):(st===ENTERING||st===ENTERED)&&(at=EXITING)}this.updateStatus(!1,at)},et.componentWillUnmount=function(){this.cancelNextCallback()},et.getTimeouts=function(){var ot=this.props.timeout,at,st,ut;return at=st=ut=ot,ot!=null&&typeof ot!="number"&&(at=ot.exit,st=ot.enter,ut=ot.appear!==void 0?ot.appear:st),{exit:at,enter:st,appear:ut}},et.updateStatus=function(ot,at){if(ot===void 0&&(ot=!1),at!==null)if(this.cancelNextCallback(),at===ENTERING){if(this.props.unmountOnExit||this.props.mountOnEnter){var st=this.props.nodeRef?this.props.nodeRef.current:ReactDOM.findDOMNode(this);st&&forceReflow(st)}this.performEnter(ot)}else this.performExit();else this.props.unmountOnExit&&this.state.status===EXITED&&this.setState({status:UNMOUNTED})},et.performEnter=function(ot){var at=this,st=this.props.enter,ut=this.context?this.context.isMounting:ot,ct=this.props.nodeRef?[ut]:[ReactDOM.findDOMNode(this),ut],pt=ct[0],dt=ct[1],ft=this.getTimeouts(),bt=ut?ft.appear:ft.enter;if(!ot&&!st||config.disabled){this.safeSetState({status:ENTERED},function(){at.props.onEntered(pt)});return}this.props.onEnter(pt,dt),this.safeSetState({status:ENTERING},function(){at.props.onEntering(pt,dt),at.onTransitionEnd(bt,function(){at.safeSetState({status:ENTERED},function(){at.props.onEntered(pt,dt)})})})},et.performExit=function(){var ot=this,at=this.props.exit,st=this.getTimeouts(),ut=this.props.nodeRef?void 0:ReactDOM.findDOMNode(this);if(!at||config.disabled){this.safeSetState({status:EXITED},function(){ot.props.onExited(ut)});return}this.props.onExit(ut),this.safeSetState({status:EXITING},function(){ot.props.onExiting(ut),ot.onTransitionEnd(st.exit,function(){ot.safeSetState({status:EXITED},function(){ot.props.onExited(ut)})})})},et.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},et.safeSetState=function(ot,at){at=this.setNextCallback(at),this.setState(ot,at)},et.setNextCallback=function(ot){var at=this,st=!0;return this.nextCallback=function(ut){st&&(st=!1,at.nextCallback=null,ot(ut))},this.nextCallback.cancel=function(){st=!1},this.nextCallback},et.onTransitionEnd=function(ot,at){this.setNextCallback(at);var st=this.props.nodeRef?this.props.nodeRef.current:ReactDOM.findDOMNode(this),ut=ot==null&&!this.props.addEndListener;if(!st||ut){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var ct=this.props.nodeRef?[this.nextCallback]:[st,this.nextCallback],pt=ct[0],dt=ct[1];this.props.addEndListener(pt,dt)}ot!=null&&setTimeout(this.nextCallback,ot)},et.render=function(){var ot=this.state.status;if(ot===UNMOUNTED)return null;var at=this.props,st=at.children;at.in,at.mountOnEnter,at.unmountOnExit,at.appear,at.enter,at.exit,at.timeout,at.addEndListener,at.onEnter,at.onEntering,at.onEntered,at.onExit,at.onExiting,at.onExited,at.nodeRef;var ut=_objectWithoutPropertiesLoose$m(at,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return React$1.createElement(TransitionGroupContext.Provider,{value:null},typeof st=="function"?st(ot,ut):React$1.cloneElement(React$1.Children.only(st),ut))},nt}(React$1.Component);Transition.contextType=TransitionGroupContext;Transition.propTypes={};function noop$1(){}Transition.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:noop$1,onEntering:noop$1,onEntered:noop$1,onExit:noop$1,onExiting:noop$1,onExited:noop$1};Transition.UNMOUNTED=UNMOUNTED;Transition.EXITED=EXITED;Transition.ENTERING=ENTERING;Transition.ENTERED=ENTERED;Transition.EXITING=EXITING;var _addClass=function tt(nt,et){return nt&&et&&et.split(" ").forEach(function(rt){return addClass(nt,rt)})},removeClass=function tt(nt,et){return nt&&et&&et.split(" ").forEach(function(rt){return removeClass$1(nt,rt)})},CSSTransition=function(tt){_inheritsLoose(nt,tt);function nt(){for(var rt,ot=arguments.length,at=new Array(ot),st=0;st<ot;st++)at[st]=arguments[st];return rt=tt.call.apply(tt,[this].concat(at))||this,rt.appliedClasses={appear:{},enter:{},exit:{}},rt.onEnter=function(ut,ct){var pt=rt.resolveArguments(ut,ct),dt=pt[0],ft=pt[1];rt.removeClasses(dt,"exit"),rt.addClass(dt,ft?"appear":"enter","base"),rt.props.onEnter&&rt.props.onEnter(ut,ct)},rt.onEntering=function(ut,ct){var pt=rt.resolveArguments(ut,ct),dt=pt[0],ft=pt[1],bt=ft?"appear":"enter";rt.addClass(dt,bt,"active"),rt.props.onEntering&&rt.props.onEntering(ut,ct)},rt.onEntered=function(ut,ct){var pt=rt.resolveArguments(ut,ct),dt=pt[0],ft=pt[1],bt=ft?"appear":"enter";rt.removeClasses(dt,bt),rt.addClass(dt,bt,"done"),rt.props.onEntered&&rt.props.onEntered(ut,ct)},rt.onExit=function(ut){var ct=rt.resolveArguments(ut),pt=ct[0];rt.removeClasses(pt,"appear"),rt.removeClasses(pt,"enter"),rt.addClass(pt,"exit","base"),rt.props.onExit&&rt.props.onExit(ut)},rt.onExiting=function(ut){var ct=rt.resolveArguments(ut),pt=ct[0];rt.addClass(pt,"exit","active"),rt.props.onExiting&&rt.props.onExiting(ut)},rt.onExited=function(ut){var ct=rt.resolveArguments(ut),pt=ct[0];rt.removeClasses(pt,"exit"),rt.addClass(pt,"exit","done"),rt.props.onExited&&rt.props.onExited(ut)},rt.resolveArguments=function(ut,ct){return rt.props.nodeRef?[rt.props.nodeRef.current,ut]:[ut,ct]},rt.getClassNames=function(ut){var ct=rt.props.classNames,pt=typeof ct=="string",dt=pt&&ct?ct+"-":"",ft=pt?""+dt+ut:ct[ut],bt=pt?ft+"-active":ct[ut+"Active"],ht=pt?ft+"-done":ct[ut+"Done"];return{baseClassName:ft,activeClassName:bt,doneClassName:ht}},rt}var et=nt.prototype;return et.addClass=function(ot,at,st){var ut=this.getClassNames(at)[st+"ClassName"],ct=this.getClassNames("enter"),pt=ct.doneClassName;at==="appear"&&st==="done"&&pt&&(ut+=" "+pt),st==="active"&&ot&&forceReflow(ot),ut&&(this.appliedClasses[at][st]=ut,_addClass(ot,ut))},et.removeClasses=function(ot,at){var st=this.appliedClasses[at],ut=st.base,ct=st.active,pt=st.done;this.appliedClasses[at]={},ut&&removeClass(ot,ut),ct&&removeClass(ot,ct),pt&&removeClass(ot,pt)},et.render=function(){var ot=this.props;ot.classNames;var at=_objectWithoutPropertiesLoose$m(ot,["classNames"]);return React$1.createElement(Transition,_extends$Q({},at,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},nt}(React$1.Component);CSSTransition.defaultProps={classNames:""};CSSTransition.propTypes={};const iconRunning="data:image/gif;base64,R0lGODlhgACAAPAAAAAAAAAAACH5BAkUAAEAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAAgACAAAAC/oyPqcvtD6OctNqLs968+w+G4kiW5omm6sq27gvH8kzX9o3nKcD3vA5s+Ia9oNFATAKOQKWSiXM6oTbpkzqzTrEx7ZX78ibBYfGYzDKf0So1kZ12/+Ar+Zy+s+Pr7j1f7ffnFRinRegiddg1pNho5OMIKbhGZpXXl6N3YrdlwvlF8ik6SioZWoqaauap2ur6xvoqm4oya1t6easL2Lbra1j2+5sp3ApWjKmI7Bghy1zh/DwRLd38Wi1Bje2gvc3Q7a0AHo4wTo50fb5gfs5O7h4O7y2/TY9tX40vrf/Mz+wfKZ26BAAbFVQmcOCBg4cYEnIYCKIfiXso4rFIByMcnY1sOKLxWCmhwgCWhCQaufDkN5UoS67s1JKlOJkKXa6jOdDmTJgjdRLEqc5nOaDtiJI0Gs+o0KBKkc5ryrMmVFA9p1KqGnVoVqZb0XV9ZxUWyqNflxYt67ReWEZjyVL9+TUp2rhP577NudZUTLtXpfIVu/duSrpq/7Id6zRtYcAvGQfWy60vYsgPDre9jDmz5s2cO3v+DDq06NEnCgAAIfkECRQAAQAsAAAAAIAAgAAAAv6Mj6nL7Q+jnLTai7PevPsPhuJIluaJpurKtu4Lx/JM1/aN5/rO9/4P1AGGxGGwV0wSjzmlE8C0PZ/R2XRahV2vWdcW22V9qeHV2FlWnclp0xrddr+T8dN8WZff8/o5v3/2BzgmOMhVaAiHaAe2qEbnGCk56XBHSLlgaYl5oOmJ6Rk6GUoaSVrqeIpaqLoq2OqaBxtbNyv6eljZyprbAMvL5vuLG8wwTKxofIxcBLGM2Oz8zKm8S/0wfZ0wq62r2i1sDa6QPc49Ti6O3lkObFR9Opq8rc6sBB/v3kj/rb/PXi/Om0wB2/jh10/WQQTtumxCaGsekocMI2758QmixfZiNxbi28ixxpoIIC91NCmtZC+RXyiobCkFpsuX/2TIrEAz5IubOHNK3Hkxg897NIJuGIrHptGjSIuubPLUS9STNaVWpapTzFWsP1tM5UpUadaYW82U1bA05dhHa4V+JXg2RVoPc721RVGXQ96PkMTetbAX7t9EST8EFtzV69sLh9PFlbu4Z2SNff0OVps43GXChd1OphzNaWNsPEl+xotS8umKj9mOdvwadGcrqUnXlhAbciDbt3Gv1j0QoEfVmbUMRfvbtUqmm82+7NDaOEjDYSdaDBEayPV1wmlxz8dd88jwvnOTP48+vfr17Nu7fw8/vnz4BQAAIfkECRQAAQAsAAAAAIAAgAAAAv6Mj6nL7Q+jnLTai7PevPsPhuJIluaJpurKtu4Lx/IG1PaMc/a+537FC9Z+xIfwWEwmjkylkgl1FqFN6Y9atc6wWW2Mi/TKwELxmMwzf9E99YvddrvgQ/kcbofh828yf431FxK2ECjowcVAeKgDxsjC9phCJ2lCV1c5eImZ2bEZ16nxmRaaMRpUenFaljqxutja8NoVqzAbVWt7i5trsJuYOxuAVivsS1xqfBDZqYxAKfkquyko7TDKtxpxasctge3m7foZTq56KUdtCq2G3ojcvofomC4PQpVtr0ma594ryu4fBn8CB+orCOQgwnHMYuH7ppAGLxQRn1WkcFGiuv5p8Axu9GRNUcOE2t450+UH4y6AvwBcSwmx5bmWnFAa2kazJoScoGxOfMnTZUxgPn8uuQkUqUV6RpQmpXXUaFFWOB9yhFoV6zKpS7U+hRUVLEOvw8g6HUt1as+ZadXq7IpKo1ircuMW8srVAt1jYte1hcvP7T1aeT3+5Xu4bGKWacn6tRsWMuAbIrr0BXlYquPH/DZzXqs482WTpEZjDrx17uJ5cU2TXmvUM+MesmdTnnw7NeoRGU/Dhur69V4SYGOv/tCxRHHgx1kTtfTXuGTiMKFPl76bd3Xl0ZlP187U+m7soCtvp37de3bz4bmnX/6dfXvw49WXH1wmuO3ciK/fx0fOin6fvaVZc3VRVhtboBX4n29tJEhSfH1BqBJVFGa1Xn9CiWSgXosUZliGEYoYImoXfnXfiCR62J2AO53IYYcYZgfiUDLOuCKO/OnmoltvHZjjVZed9WKNJTYo5HHPFQmjjin6uONdRPJo5ICmzZckTRQF9WOWK00SlIK33CHTkeK0UOZ+H5FZknMEnWGOfOf5EJB7VeKw5EJ67slnn37+CWiggg5KaKGGMlIAACH5BAkUAAEALAAAAACAAIAAAAL+jI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8cyBNT2jHP2vud+xQvefsSG8AgoKhFI5HLZPD6LUefUV5Vec1nhFtfVfmFh75hc5p3R6do61na/X/HknJ6+s8P6fbUPlwUo8zc4I2aYqLjI2Ehk5rhSGGlSRilSd+lRJ6eZwdnjCQQaJCpBimi6gNqkqsAq6GoAG6tKy2d6aymqi6vZu3sJ7BuZN0sr3JWgSzm5zOwYxTAc3bpKzSh9ja2o/To8ZOj9DB7eN34AGtAGiH6cyXnnvp75Hj82f5+u/pVfz8TviruAAPU9GWiwYJwtCBc6+HfQmkJjD9gJtELOYoTpYFMw7oO40VlHSBMpjiLZL9Q3hxtUZgMpa0LCmCFh0qw48+ZDgjp3kuqJExXQaciGZmRltKTQpPSgGf3DsmcsjVLHUb0p0iTWhsqqSlTq8Y1LCrWOfj0zj+hZs6lSElsZFm5chjBFbpt7sZw5I2vz6rVDo+/Iv4CDtqX795TgwXoV4/XLLfBjyL1kLkbrtObhdj/JXhanVTPKX5/5TvZUGENappI3szY8+nXr2LJ9uq59lzbu3KV2i+7tGzbw4KZvE29qnPjq48h1M19+HLry0sGlV6d+3Tnz5mO3y+3kvWL48eTLmz8PoQAAIfkECRQAAQAsAAAAAIAAgAAAAv6Mj6nL7Q+jnLTai7PevPsPhuJIluaJpurKtu4Lx/JM1/aN5/rO9/4PDAqHQ4DRWDseiQalc8l6PoXSKgBllQKz1RJX2/taRWLwrjz2oM25dbfjdvLibAxdrrvXK3pou49nAeiHM6h0YXiVl4jEZxjG6Dj4EzmRSARo+cgUoCdxydlEFwEa2jn6UGp66gYxuYqA2vAKeyDL0FercLtwp9sb5+D7uxs820oMjHz8lSxs/PzmHL32STjNDI0Nl7vNseltpxquWUluzdh4npp+uJ7drv4eGz81b1u/R56fts6f5e8fwHACm20rKAYbwjLOulFD03BZOYYRDYqzOI3Lt/aB++x98HgvpMiRJEuaPIkypcqKIDVw3NDPBUREMwVRTDEMnUR22khk4ukJKK+P4/AVFQWO28KlP2EyferwItSpPSVRvXqTJtatGjNw/RrTZldltBKYKzZWa1iyQ9EGfdhSbFx4NUm1xSXNZSAK1dRinCjvxlqpc1caPow4seLFjBs7hqTP7169kXFm5VsXc0IVb13dxVs1RFO6oc1GBXGW3lFWZTeCBav0NWzKsl/Trv31Nu6tundf7V2Y9WjVrYkPBhzcaGfQy9kmt1vZbV+d0z1HB0w4rebNVgPbOC73+ePx5MubP48+vfr17Nu7fw8/vvzGBQAAIfkECRQAAQAsAAAAAIAAgAAAAv6Mj6nL7Q+jnLTai7PevPsPhuJIluaJphPAAuoLI+3cxrZJ5+7Ne/q/6wkvQN3wSCn+kEyHEtiMJp5LqZVqtEaxVS2Sm/UewTnxlzwzn9HqNbk9RgfhPTY9jr27n3omv99UBKiVNmh4iJiouMjY6FhX9hijJJnCVVnyhhkit/khx+LJARoqmkFaY0qEOqcqwVrq+gobK+tEW2u7gJuqu8ub62sA3Cs8TBxsi1wovMys7PysGh05TV29eQ1Vqf2H2N35jXyMKg4sw3o4jl5ueK4Aq07bEO+efts+eI9PKp/PUM/eP3j7BPYDWFDcAU0EBzZiyO4gNzC/JE681DBcNvCKGSFi8kgO5MU8HUmaEmnHGsYpHF2hXOmyZURKul7S/JjM5raRrUJSqdjlUZiZ3ohKY7TTqKCSyRTdVJp0ITakRaXCtNrUXFWsWwMUo3qV69OFkjSyNLnRLNShZR36HPsw4NmfQuchROs07Aq9+vjuxdsX8CrBd2RuMFzYLwbEbRiPcutH8WHIQxx/ogyJ7omEeOBmwmxDswrOmaOOBv3C82mLQkzDkNt6amjYpXvOpm1srcjcXnnxZopa1rrfvd8RL47ruNjg0HATd36ceW5Qyh+krE5PMva3Qbfz6+79O43wSdiShyD7PPqv6tsbKgAAOw==",newYearsRunning=""+new URL("../media/fireworks.B4d-_KUe.gif",import.meta.url).href;var ConnectionState;(function(tt){tt.CONNECTED="CONNECTED",tt.DISCONNECTED_FOREVER="DISCONNECTED_FOREVER",tt.INITIAL="INITIAL",tt.PINGING_SERVER="PINGING_SERVER",tt.CONNECTING="CONNECTING"})(ConnectionState||(ConnectionState={}));const StyledConnectionStatus=newStyled("div",{target:"emoooxk0"})(({theme:tt})=>({display:"flex",alignItems:"center",justifyContent:"center",color:tt.colors.gray})),StyledConnectionStatusLabel=newStyled("label",{target:"emoooxk1"})(({isMinimized:tt,theme:nt})=>({fontSize:nt.fontSizes.sm,color:nt.colors.gray,textTransform:"uppercase",marginTop:nt.spacing.none,marginRight:tt?nt.spacing.none:nt.spacing.lg,marginBottom:nt.spacing.none,marginLeft:nt.spacing.sm,whiteSpace:"nowrap",maxWidth:tt?"0":nt.sizes.appStatusMaxWidth,transition:"opacity 500ms 0ms, clip 500ms 0ms, max-width 500ms 0ms, margin 500ms 0ms, visibility 0ms 500ms",opacity:tt?0:1,visibility:tt?"hidden":"visible",lineHeight:nt.lineHeights.none})),StyledAppStatus=newStyled("div",{target:"emoooxk2"})(({theme:tt})=>({display:"flex",alignItems:"center",justifyContent:"center",borderRadius:tt.radii.md,margin:`0 ${tt.spacing.sm} 0 0`,paddingLeft:tt.spacing.sm,height:tt.sizes.appRunningMen})),minimizedStyles=tt=>({opacity:0,padding:tt.spacing.none,margin:tt.spacing.none,maxWidth:0,minWidth:0,border:0}),StyledAppStatusLabel=newStyled("label",{target:"emoooxk3"})(({isPrompt:tt,isMinimized:nt,theme:et})=>({fontSize:et.fontSizes.sm,color:tt?et.colors.bodyText:et.colors.gray,textTransform:tt?"none":"uppercase",margin:`0 0 0 ${et.spacing.lg}`,whiteSpace:"nowrap",maxWidth:et.sizes.appStatusMaxWidth,borderRadius:tt?et.radii.md:void 0,transition:`opacity 200ms ease-out 0s,
|
742
|
+
`});return jsx$1(Global,{styles:[css$2(nt)]})},isff=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function addEvent(tt,nt,et,rt){tt.addEventListener?tt.addEventListener(nt,et,rt):tt.attachEvent&&tt.attachEvent("on".concat(nt),et)}function removeEvent(tt,nt,et,rt){tt.removeEventListener?tt.removeEventListener(nt,et,rt):tt.detachEvent&&tt.detachEvent("on".concat(nt),et)}function getMods(tt,nt){const et=nt.slice(0,nt.length-1);for(let rt=0;rt<et.length;rt++)et[rt]=tt[et[rt].toLowerCase()];return et}function getKeys(tt){typeof tt!="string"&&(tt=""),tt=tt.replace(/\s/g,"");const nt=tt.split(",");let et=nt.lastIndexOf("");for(;et>=0;)nt[et-1]+=",",nt.splice(et,1),et=nt.lastIndexOf("");return nt}function compareArray(tt,nt){const et=tt.length>=nt.length?tt:nt,rt=tt.length>=nt.length?nt:tt;let ot=!0;for(let at=0;at<et.length;at++)rt.indexOf(et[at])===-1&&(ot=!1);return ot}const _keyMap={backspace:8,"⌫":8,tab:9,clear:12,enter:13,"↩":13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":isff?173:189,"=":isff?61:187,";":isff?59:186,"'":222,"[":219,"]":221,"\\":220},_modifier={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},modifierMap={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},_mods={16:!1,18:!1,17:!1,91:!1},_handlers={};for(let tt=1;tt<20;tt++)_keyMap["f".concat(tt)]=111+tt;let _downKeys=[],winListendFocus=null,_scope="all";const elementEventMap=new Map,code=tt=>_keyMap[tt.toLowerCase()]||_modifier[tt.toLowerCase()]||tt.toUpperCase().charCodeAt(0),getKey=tt=>Object.keys(_keyMap).find(nt=>_keyMap[nt]===tt),getModifier=tt=>Object.keys(_modifier).find(nt=>_modifier[nt]===tt);function setScope(tt){_scope=tt||"all"}function getScope(){return _scope||"all"}function getPressedKeyCodes(){return _downKeys.slice(0)}function getPressedKeyString(){return _downKeys.map(tt=>getKey(tt)||getModifier(tt)||String.fromCharCode(tt))}function getAllKeyCodes(){const tt=[];return Object.keys(_handlers).forEach(nt=>{_handlers[nt].forEach(et=>{let{key:rt,scope:ot,mods:at,shortcut:st}=et;tt.push({scope:ot,shortcut:st,mods:at,keys:rt.split("+").map(ut=>code(ut))})})}),tt}function filter(tt){const nt=tt.target||tt.srcElement,{tagName:et}=nt;let rt=!0;const ot=et==="INPUT"&&!["checkbox","radio","range","button","file","reset","submit","color"].includes(nt.type);return(nt.isContentEditable||(ot||et==="TEXTAREA"||et==="SELECT")&&!nt.readOnly)&&(rt=!1),rt}function isPressed(tt){return typeof tt=="string"&&(tt=code(tt)),_downKeys.indexOf(tt)!==-1}function deleteScope(tt,nt){let et,rt;tt||(tt=getScope());for(const ot in _handlers)if(Object.prototype.hasOwnProperty.call(_handlers,ot))for(et=_handlers[ot],rt=0;rt<et.length;)et[rt].scope===tt?et.splice(rt,1).forEach(st=>{let{element:ut}=st;return removeKeyEvent(ut)}):rt++;getScope()===tt&&setScope(nt||"all")}function clearModifier(tt){let nt=tt.keyCode||tt.which||tt.charCode;const et=_downKeys.indexOf(nt);if(et>=0&&_downKeys.splice(et,1),tt.key&&tt.key.toLowerCase()==="meta"&&_downKeys.splice(0,_downKeys.length),(nt===93||nt===224)&&(nt=91),nt in _mods){_mods[nt]=!1;for(const rt in _modifier)_modifier[rt]===nt&&(hotkeys[rt]=!1)}}function unbind(tt){if(typeof tt>"u")Object.keys(_handlers).forEach(ot=>{Array.isArray(_handlers[ot])&&_handlers[ot].forEach(at=>eachUnbind(at)),delete _handlers[ot]}),removeKeyEvent(null);else if(Array.isArray(tt))tt.forEach(ot=>{ot.key&&eachUnbind(ot)});else if(typeof tt=="object")tt.key&&eachUnbind(tt);else if(typeof tt=="string"){for(var nt=arguments.length,et=new Array(nt>1?nt-1:0),rt=1;rt<nt;rt++)et[rt-1]=arguments[rt];let[ot,at]=et;typeof ot=="function"&&(at=ot,ot=""),eachUnbind({key:tt,scope:ot,method:at,splitKey:"+"})}}const eachUnbind=tt=>{let{key:nt,scope:et,method:rt,splitKey:ot="+"}=tt;getKeys(nt).forEach(st=>{const ut=st.split(ot),ct=ut.length,pt=ut[ct-1],dt=pt==="*"?"*":code(pt);if(!_handlers[dt])return;et||(et=getScope());const ft=ct>1?getMods(_modifier,ut):[],bt=[];_handlers[dt]=_handlers[dt].filter(ht=>{const mt=(rt?ht.method===rt:!0)&&ht.scope===et&&compareArray(ht.mods,ft);return mt&&bt.push(ht.element),!mt}),bt.forEach(ht=>removeKeyEvent(ht))})};function eventHandler(tt,nt,et,rt){if(nt.element!==rt)return;let ot;if(nt.scope===et||nt.scope==="all"){ot=nt.mods.length>0;for(const at in _mods)Object.prototype.hasOwnProperty.call(_mods,at)&&(!_mods[at]&&nt.mods.indexOf(+at)>-1||_mods[at]&&nt.mods.indexOf(+at)===-1)&&(ot=!1);(nt.mods.length===0&&!_mods[16]&&!_mods[18]&&!_mods[17]&&!_mods[91]||ot||nt.shortcut==="*")&&(nt.keys=[],nt.keys=nt.keys.concat(_downKeys),nt.method(tt,nt)===!1&&(tt.preventDefault?tt.preventDefault():tt.returnValue=!1,tt.stopPropagation&&tt.stopPropagation(),tt.cancelBubble&&(tt.cancelBubble=!0)))}}function dispatch(tt,nt){const et=_handlers["*"];let rt=tt.keyCode||tt.which||tt.charCode;if(!hotkeys.filter.call(this,tt))return;if((rt===93||rt===224)&&(rt=91),_downKeys.indexOf(rt)===-1&&rt!==229&&_downKeys.push(rt),["ctrlKey","altKey","shiftKey","metaKey"].forEach(ut=>{const ct=modifierMap[ut];tt[ut]&&_downKeys.indexOf(ct)===-1?_downKeys.push(ct):!tt[ut]&&_downKeys.indexOf(ct)>-1?_downKeys.splice(_downKeys.indexOf(ct),1):ut==="metaKey"&&tt[ut]&&_downKeys.length===3&&(tt.ctrlKey||tt.shiftKey||tt.altKey||(_downKeys=_downKeys.slice(_downKeys.indexOf(ct))))}),rt in _mods){_mods[rt]=!0;for(const ut in _modifier)_modifier[ut]===rt&&(hotkeys[ut]=!0);if(!et)return}for(const ut in _mods)Object.prototype.hasOwnProperty.call(_mods,ut)&&(_mods[ut]=tt[modifierMap[ut]]);tt.getModifierState&&!(tt.altKey&&!tt.ctrlKey)&&tt.getModifierState("AltGraph")&&(_downKeys.indexOf(17)===-1&&_downKeys.push(17),_downKeys.indexOf(18)===-1&&_downKeys.push(18),_mods[17]=!0,_mods[18]=!0);const ot=getScope();if(et)for(let ut=0;ut<et.length;ut++)et[ut].scope===ot&&(tt.type==="keydown"&&et[ut].keydown||tt.type==="keyup"&&et[ut].keyup)&&eventHandler(tt,et[ut],ot,nt);if(!(rt in _handlers))return;const at=_handlers[rt],st=at.length;for(let ut=0;ut<st;ut++)if((tt.type==="keydown"&&at[ut].keydown||tt.type==="keyup"&&at[ut].keyup)&&at[ut].key){const ct=at[ut],{splitKey:pt}=ct,dt=ct.key.split(pt),ft=[];for(let bt=0;bt<dt.length;bt++)ft.push(code(dt[bt]));ft.sort().join("")===_downKeys.sort().join("")&&eventHandler(tt,ct,ot,nt)}}function hotkeys(tt,nt,et){_downKeys=[];const rt=getKeys(tt);let ot=[],at="all",st=document,ut=0,ct=!1,pt=!0,dt="+",ft=!1,bt=!1;for(et===void 0&&typeof nt=="function"&&(et=nt),Object.prototype.toString.call(nt)==="[object Object]"&&(nt.scope&&(at=nt.scope),nt.element&&(st=nt.element),nt.keyup&&(ct=nt.keyup),nt.keydown!==void 0&&(pt=nt.keydown),nt.capture!==void 0&&(ft=nt.capture),typeof nt.splitKey=="string"&&(dt=nt.splitKey),nt.single===!0&&(bt=!0)),typeof nt=="string"&&(at=nt),bt&&unbind(tt,at);ut<rt.length;ut++)tt=rt[ut].split(dt),ot=[],tt.length>1&&(ot=getMods(_modifier,tt)),tt=tt[tt.length-1],tt=tt==="*"?"*":code(tt),tt in _handlers||(_handlers[tt]=[]),_handlers[tt].push({keyup:ct,keydown:pt,scope:at,mods:ot,shortcut:rt[ut],method:et,key:rt[ut],splitKey:dt,element:st});if(typeof st<"u"&&window){if(!elementEventMap.has(st)){const ht=function(){let mt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;return dispatch(mt,st)},Mt=function(){let mt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;dispatch(mt,st),clearModifier(mt)};elementEventMap.set(st,{keydownListener:ht,keyupListenr:Mt,capture:ft}),addEvent(st,"keydown",ht,ft),addEvent(st,"keyup",Mt,ft)}if(!winListendFocus){const ht=()=>{_downKeys=[]};winListendFocus={listener:ht,capture:ft},addEvent(window,"focus",ht,ft)}}}function trigger(tt){let nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(_handlers).forEach(et=>{_handlers[et].filter(ot=>ot.scope===nt&&ot.shortcut===tt).forEach(ot=>{ot&&ot.method&&ot.method()})})}function removeKeyEvent(tt){const nt=Object.values(_handlers).flat();if(nt.findIndex(rt=>{let{element:ot}=rt;return ot===tt})<0){const{keydownListener:rt,keyupListenr:ot,capture:at}=elementEventMap.get(tt)||{};rt&&ot&&(removeEvent(tt,"keyup",ot,at),removeEvent(tt,"keydown",rt,at),elementEventMap.delete(tt))}if((nt.length<=0||elementEventMap.size<=0)&&(Object.keys(elementEventMap).forEach(ot=>{const{keydownListener:at,keyupListenr:st,capture:ut}=elementEventMap.get(ot)||{};at&&st&&(removeEvent(ot,"keyup",st,ut),removeEvent(ot,"keydown",at,ut),elementEventMap.delete(ot))}),elementEventMap.clear(),Object.keys(_handlers).forEach(ot=>delete _handlers[ot]),winListendFocus)){const{listener:ot,capture:at}=winListendFocus;removeEvent(window,"focus",ot,at),winListendFocus=null}}const _api={getPressedKeyString,setScope,getScope,deleteScope,getPressedKeyCodes,getAllKeyCodes,isPressed,filter,trigger,unbind,keyMap:_keyMap,modifier:_modifier,modifierMap};for(const tt in _api)Object.prototype.hasOwnProperty.call(_api,tt)&&(hotkeys[tt]=_api[tt]);if(typeof window<"u"){const tt=window.hotkeys;hotkeys.noConflict=nt=>(nt&&window.hotkeys===hotkeys&&(window.hotkeys=tt),hotkeys),window.hotkeys=hotkeys}class ReactHotkeys extends React$1.Component{constructor(nt){super(nt),this.isKeyDown=!1,this.handle=void 0,this.onKeyDown=this.onKeyDown.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.handleKeyUpEvent=this.handleKeyUpEvent.bind(this),this.handle={}}componentDidMount(){var{filter:nt,splitKey:et}=this.props;nt&&(hotkeys.filter=nt),hotkeys.unbind(this.props.keyName),hotkeys(this.props.keyName,{splitKey:et},this.onKeyDown),document&&document.body.addEventListener("keyup",this.handleKeyUpEvent)}componentWillUnmount(){hotkeys.unbind(this.props.keyName),this.isKeyDown=!0,this.handle={},document&&document.body.removeEventListener("keyup",this.handleKeyUpEvent)}onKeyUp(nt,et){var{onKeyUp:rt,disabled:ot}=this.props;!ot&&rt&&rt(et.shortcut,nt,et)}onKeyDown(nt,et){var{onKeyDown:rt,allowRepeat:ot,disabled:at}=this.props;this.isKeyDown&&!ot||(this.isKeyDown=!0,this.handle=et,!at&&rt&&rt(et.shortcut,nt,et))}handleKeyUpEvent(nt){this.isKeyDown&&(this.isKeyDown=!1,!(this.props.keyName&&this.props.keyName.indexOf(this.handle.shortcut)<0)&&(this.onKeyUp(nt,this.handle),this.handle={}))}render(){return this.props.children||null}}ReactHotkeys.defaultProps={filter(tt){var nt=tt.target||tt.srcElement,et=nt.tagName;return!(nt.isContentEditable||et==="INPUT"||et==="SELECT"||et==="TEXTAREA")}};ReactHotkeys.propTypes={keyName:propTypesExports.string,filter:propTypesExports.func,onKeyDown:propTypesExports.func,onKeyUp:propTypesExports.func,disabled:propTypesExports.bool,splitKey:propTypesExports.string};var baseIndexOf=_baseIndexOf;function arrayIncludes$1(tt,nt){var et=tt==null?0:tt.length;return!!et&&baseIndexOf(tt,nt,0)>-1}var _arrayIncludes=arrayIncludes$1;function arrayIncludesWith$1(tt,nt,et){for(var rt=-1,ot=tt==null?0:tt.length;++rt<ot;)if(et(nt,tt[rt]))return!0;return!1}var _arrayIncludesWith=arrayIncludesWith$1,SetCache=_SetCache,arrayIncludes=_arrayIncludes,arrayIncludesWith=_arrayIncludesWith,arrayMap=_arrayMap,baseUnary=_baseUnary,cacheHas=_cacheHas,LARGE_ARRAY_SIZE=200;function baseDifference$1(tt,nt,et,rt){var ot=-1,at=arrayIncludes,st=!0,ut=tt.length,ct=[],pt=nt.length;if(!ut)return ct;et&&(nt=arrayMap(nt,baseUnary(et))),rt?(at=arrayIncludesWith,st=!1):nt.length>=LARGE_ARRAY_SIZE&&(at=cacheHas,st=!1,nt=new SetCache(nt));e:for(;++ot<ut;){var dt=tt[ot],ft=et==null?dt:et(dt);if(dt=rt||dt!==0?dt:0,st&&ft===ft){for(var bt=pt;bt--;)if(nt[bt]===ft)continue e;ct.push(dt)}else at(nt,ft,rt)||ct.push(dt)}return ct}var _baseDifference=baseDifference$1,baseDifference=_baseDifference,baseRest=_baseRest,isArrayLikeObject=isArrayLikeObject_1,without=baseRest(function(tt,nt){return isArrayLikeObject(tt)?baseDifference(tt,nt):[]}),without_1=without;const without$1=getDefaultExportFromCjs$1(without_1);var uaParser={exports:{}};(function(tt,nt){(function(et,rt){var ot="1.0.39",at="",st="?",ut="function",ct="undefined",pt="object",dt="string",ft="major",bt="model",ht="name",Mt="type",mt="vendor",Ot="version",zt="architecture",yt="console",vt="mobile",At="tablet",St="smarttv",Et="wearable",Tt="embedded",Rt=500,Ct="Amazon",wt="Apple",Ft="ASUS",Ht="BlackBerry",jt="Browser",s0="Chrome",Ut="Edge",Yt="Firefox",O0="Google",a0="Huawei",b0="LG",kt="Microsoft",o0="Motorola",qt="Opera",Dt="Samsung",Bt="Sharp",p0="Sony",r0="Xiaomi",l0="Zebra",f0="Facebook",i0="Chromium OS",$t="Mac OS",It=" Browser",Vt=function(e0,Nt){var Xt={};for(var d0 in e0)Nt[d0]&&Nt[d0].length%2===0?Xt[d0]=Nt[d0].concat(e0[d0]):Xt[d0]=e0[d0];return Xt},xt=function(e0){for(var Nt={},Xt=0;Xt<e0.length;Xt++)Nt[e0[Xt].toUpperCase()]=e0[Xt];return Nt},Lt=function(e0,Nt){return typeof e0===dt?Pt(Nt).indexOf(Pt(e0))!==-1:!1},Pt=function(e0){return e0.toLowerCase()},Zt=function(e0){return typeof e0===dt?e0.replace(/[^\d\.]/g,at).split(".")[0]:rt},Kt=function(e0,Nt){if(typeof e0===dt)return e0=e0.replace(/^\s\s*/,at),typeof Nt===ct?e0:e0.substring(0,Rt)},n0=function(e0,Nt){for(var Xt=0,d0,z0,w0,E0,g0,k0;Xt<Nt.length&&!g0;){var I0=Nt[Xt],N0=Nt[Xt+1];for(d0=z0=0;d0<I0.length&&!g0&&I0[d0];)if(g0=I0[d0++].exec(e0),g0)for(w0=0;w0<N0.length;w0++)k0=g0[++z0],E0=N0[w0],typeof E0===pt&&E0.length>0?E0.length===2?typeof E0[1]==ut?this[E0[0]]=E0[1].call(this,k0):this[E0[0]]=E0[1]:E0.length===3?typeof E0[1]===ut&&!(E0[1].exec&&E0[1].test)?this[E0[0]]=k0?E0[1].call(this,k0,E0[2]):rt:this[E0[0]]=k0?k0.replace(E0[1],E0[2]):rt:E0.length===4&&(this[E0[0]]=k0?E0[3].call(this,k0.replace(E0[1],E0[2])):rt):this[E0]=k0||rt;Xt+=2}},c0=function(e0,Nt){for(var Xt in Nt)if(typeof Nt[Xt]===pt&&Nt[Xt].length>0){for(var d0=0;d0<Nt[Xt].length;d0++)if(Lt(Nt[Xt][d0],e0))return Xt===st?rt:Xt}else if(Lt(Nt[Xt],e0))return Xt===st?rt:Xt;return Nt.hasOwnProperty("*")?Nt["*"]:e0},u0={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},y0={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},D0={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[Ot,[ht,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[Ot,[ht,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[ht,Ot],[/opios[\/ ]+([\w\.]+)/i],[Ot,[ht,qt+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[Ot,[ht,qt+" GX"]],[/\bopr\/([\w\.]+)/i],[Ot,[ht,qt]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[Ot,[ht,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[ht,Ot],[/quark(?:pc)?\/([-\w\.]+)/i],[Ot,[ht,"Quark"]],[/\bddg\/([\w\.]+)/i],[Ot,[ht,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[Ot,[ht,"UC"+jt]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[Ot,[ht,"WeChat"]],[/konqueror\/([\w\.]+)/i],[Ot,[ht,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[Ot,[ht,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[Ot,[ht,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[Ot,[ht,"Smart Lenovo "+jt]],[/(avast|avg)\/([\w\.]+)/i],[[ht,/(.+)/,"$1 Secure "+jt],Ot],[/\bfocus\/([\w\.]+)/i],[Ot,[ht,Yt+" Focus"]],[/\bopt\/([\w\.]+)/i],[Ot,[ht,qt+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[Ot,[ht,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[Ot,[ht,"Dolphin"]],[/coast\/([\w\.]+)/i],[Ot,[ht,qt+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[Ot,[ht,"MIUI "+jt]],[/fxios\/([-\w\.]+)/i],[Ot,[ht,Yt]],[/\bqihu|(qi?ho?o?|360)browser/i],[[ht,"360"+It]],[/\b(qq)\/([\w\.]+)/i],[[ht,/(.+)/,"$1Browser"],Ot],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[ht,/(.+)/,"$1"+It],Ot],[/samsungbrowser\/([\w\.]+)/i],[Ot,[ht,Dt+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[ht,/_/g," "],Ot],[/metasr[\/ ]?([\d\.]+)/i],[Ot,[ht,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[ht,"Sogou Mobile"],Ot],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[ht,Ot],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[ht],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[ht,f0],Ot],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[ht,Ot],[/\bgsa\/([\w\.]+) .*safari\//i],[Ot,[ht,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[Ot,[ht,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[Ot,[ht,s0+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[ht,s0+" WebView"],Ot],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[Ot,[ht,"Android "+jt]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[ht,Ot],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[Ot,[ht,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[Ot,ht],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[ht,[Ot,c0,u0]],[/(webkit|khtml)\/([\w\.]+)/i],[ht,Ot],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[ht,"Netscape"],Ot],[/(wolvic)\/([\w\.]+)/i],[ht,Ot],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[Ot,[ht,Yt+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[ht,[Ot,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[ht,[Ot,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[zt,"amd64"]],[/(ia32(?=;))/i],[[zt,Pt]],[/((?:i[346]|x)86)[;\)]/i],[[zt,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[zt,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[zt,"armhf"]],[/windows (ce|mobile); ppc;/i],[[zt,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[zt,/ower/,at,Pt]],[/(sun4\w)[;\)]/i],[[zt,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[zt,Pt]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[bt,[mt,Dt],[Mt,At]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[bt,[mt,Dt],[Mt,vt]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[bt,[mt,wt],[Mt,vt]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[bt,[mt,wt],[Mt,At]],[/(macintosh);/i],[bt,[mt,wt]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[bt,[mt,Bt],[Mt,vt]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[bt,[mt,a0],[Mt,At]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[bt,[mt,a0],[Mt,vt]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[bt,/_/g," "],[mt,r0],[Mt,vt]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[bt,/_/g," "],[mt,r0],[Mt,At]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[bt,[mt,"OPPO"],[Mt,vt]],[/\b(opd2\d{3}a?) bui/i],[bt,[mt,"OPPO"],[Mt,At]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[bt,[mt,"Vivo"],[Mt,vt]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[bt,[mt,"Realme"],[Mt,vt]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[bt,[mt,o0],[Mt,vt]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[bt,[mt,o0],[Mt,At]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[bt,[mt,b0],[Mt,At]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[bt,[mt,b0],[Mt,vt]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[bt,[mt,"Lenovo"],[Mt,At]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[bt,/_/g," "],[mt,"Nokia"],[Mt,vt]],[/(pixel c)\b/i],[bt,[mt,O0],[Mt,At]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[bt,[mt,O0],[Mt,vt]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[bt,[mt,p0],[Mt,vt]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[bt,"Xperia Tablet"],[mt,p0],[Mt,At]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[bt,[mt,"OnePlus"],[Mt,vt]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[bt,[mt,Ct],[Mt,At]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[bt,/(.+)/g,"Fire Phone $1"],[mt,Ct],[Mt,vt]],[/(playbook);[-\w\),; ]+(rim)/i],[bt,mt,[Mt,At]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[bt,[mt,Ht],[Mt,vt]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[bt,[mt,Ft],[Mt,At]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[bt,[mt,Ft],[Mt,vt]],[/(nexus 9)/i],[bt,[mt,"HTC"],[Mt,At]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[mt,[bt,/_/g," "],[Mt,vt]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[bt,[mt,"TCL"],[Mt,At]],[/(itel) ((\w+))/i],[[mt,Pt],bt,[Mt,c0,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[bt,[mt,"Acer"],[Mt,At]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[bt,[mt,"Meizu"],[Mt,vt]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[bt,[mt,"Ulefone"],[Mt,vt]],[/droid.+; (a(?:015|06[35]|142p?))/i],[bt,[mt,"Nothing"],[Mt,vt]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[mt,bt,[Mt,vt]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[mt,bt,[Mt,At]],[/(surface duo)/i],[bt,[mt,kt],[Mt,At]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[bt,[mt,"Fairphone"],[Mt,vt]],[/(u304aa)/i],[bt,[mt,"AT&T"],[Mt,vt]],[/\bsie-(\w*)/i],[bt,[mt,"Siemens"],[Mt,vt]],[/\b(rct\w+) b/i],[bt,[mt,"RCA"],[Mt,At]],[/\b(venue[\d ]{2,7}) b/i],[bt,[mt,"Dell"],[Mt,At]],[/\b(q(?:mv|ta)\w+) b/i],[bt,[mt,"Verizon"],[Mt,At]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[bt,[mt,"Barnes & Noble"],[Mt,At]],[/\b(tm\d{3}\w+) b/i],[bt,[mt,"NuVision"],[Mt,At]],[/\b(k88) b/i],[bt,[mt,"ZTE"],[Mt,At]],[/\b(nx\d{3}j) b/i],[bt,[mt,"ZTE"],[Mt,vt]],[/\b(gen\d{3}) b.+49h/i],[bt,[mt,"Swiss"],[Mt,vt]],[/\b(zur\d{3}) b/i],[bt,[mt,"Swiss"],[Mt,At]],[/\b((zeki)?tb.*\b) b/i],[bt,[mt,"Zeki"],[Mt,At]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[mt,"Dragon Touch"],bt,[Mt,At]],[/\b(ns-?\w{0,9}) b/i],[bt,[mt,"Insignia"],[Mt,At]],[/\b((nxa|next)-?\w{0,9}) b/i],[bt,[mt,"NextBook"],[Mt,At]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[mt,"Voice"],bt,[Mt,vt]],[/\b(lvtel\-)?(v1[12]) b/i],[[mt,"LvTel"],bt,[Mt,vt]],[/\b(ph-1) /i],[bt,[mt,"Essential"],[Mt,vt]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[bt,[mt,"Envizen"],[Mt,At]],[/\b(trio[-\w\. ]+) b/i],[bt,[mt,"MachSpeed"],[Mt,At]],[/\btu_(1491) b/i],[bt,[mt,"Rotor"],[Mt,At]],[/(shield[\w ]+) b/i],[bt,[mt,"Nvidia"],[Mt,At]],[/(sprint) (\w+)/i],[mt,bt,[Mt,vt]],[/(kin\.[onetw]{3})/i],[[bt,/\./g," "],[mt,kt],[Mt,vt]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[bt,[mt,l0],[Mt,At]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[bt,[mt,l0],[Mt,vt]],[/smart-tv.+(samsung)/i],[mt,[Mt,St]],[/hbbtv.+maple;(\d+)/i],[[bt,/^/,"SmartTV"],[mt,Dt],[Mt,St]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[mt,b0],[Mt,St]],[/(apple) ?tv/i],[mt,[bt,wt+" TV"],[Mt,St]],[/crkey/i],[[bt,s0+"cast"],[mt,O0],[Mt,St]],[/droid.+aft(\w+)( bui|\))/i],[bt,[mt,Ct],[Mt,St]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[bt,[mt,Bt],[Mt,St]],[/(bravia[\w ]+)( bui|\))/i],[bt,[mt,p0],[Mt,St]],[/(mitv-\w{5}) bui/i],[bt,[mt,r0],[Mt,St]],[/Hbbtv.*(technisat) (.*);/i],[mt,bt,[Mt,St]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[mt,Kt],[bt,Kt],[Mt,St]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[Mt,St]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[mt,bt,[Mt,yt]],[/droid.+; (shield) bui/i],[bt,[mt,"Nvidia"],[Mt,yt]],[/(playstation [345portablevi]+)/i],[bt,[mt,p0],[Mt,yt]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[bt,[mt,kt],[Mt,yt]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[bt,[mt,Dt],[Mt,Et]],[/((pebble))app/i],[mt,bt,[Mt,Et]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[bt,[mt,wt],[Mt,Et]],[/droid.+; (glass) \d/i],[bt,[mt,O0],[Mt,Et]],[/droid.+; (wt63?0{2,3})\)/i],[bt,[mt,l0],[Mt,Et]],[/(quest( \d| pro)?)/i],[bt,[mt,f0],[Mt,Et]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[mt,[Mt,Tt]],[/(aeobc)\b/i],[bt,[mt,Ct],[Mt,Tt]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[bt,[Mt,vt]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[bt,[Mt,At]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[Mt,At]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[Mt,vt]],[/(android[-\w\. ]{0,9});.+buil/i],[bt,[mt,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[Ot,[ht,Ut+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[Ot,[ht,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[ht,Ot],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[Ot,ht]],os:[[/microsoft (windows) (vista|xp)/i],[ht,Ot],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[ht,[Ot,c0,y0]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[Ot,c0,y0],[ht,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[Ot,/_/g,"."],[ht,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[ht,$t],[Ot,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[Ot,ht],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[ht,Ot],[/\(bb(10);/i],[Ot,[ht,Ht]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[Ot,[ht,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[Ot,[ht,Yt+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[Ot,[ht,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[Ot,[ht,"watchOS"]],[/crkey\/([\d\.]+)/i],[Ot,[ht,s0+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[ht,i0],Ot],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[ht,Ot],[/(sunos) ?([\w\.\d]*)/i],[[ht,"Solaris"],Ot],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[ht,Ot]]},S0=function(e0,Nt){if(typeof e0===pt&&(Nt=e0,e0=rt),!(this instanceof S0))return new S0(e0,Nt).getResult();var Xt=typeof et!==ct&&et.navigator?et.navigator:rt,d0=e0||(Xt&&Xt.userAgent?Xt.userAgent:at),z0=Xt&&Xt.userAgentData?Xt.userAgentData:rt,w0=Nt?Vt(D0,Nt):D0,E0=Xt&&Xt.userAgent==d0;return this.getBrowser=function(){var g0={};return g0[ht]=rt,g0[Ot]=rt,n0.call(g0,d0,w0.browser),g0[ft]=Zt(g0[Ot]),E0&&Xt&&Xt.brave&&typeof Xt.brave.isBrave==ut&&(g0[ht]="Brave"),g0},this.getCPU=function(){var g0={};return g0[zt]=rt,n0.call(g0,d0,w0.cpu),g0},this.getDevice=function(){var g0={};return g0[mt]=rt,g0[bt]=rt,g0[Mt]=rt,n0.call(g0,d0,w0.device),E0&&!g0[Mt]&&z0&&z0.mobile&&(g0[Mt]=vt),E0&&g0[bt]=="Macintosh"&&Xt&&typeof Xt.standalone!==ct&&Xt.maxTouchPoints&&Xt.maxTouchPoints>2&&(g0[bt]="iPad",g0[Mt]=At),g0},this.getEngine=function(){var g0={};return g0[ht]=rt,g0[Ot]=rt,n0.call(g0,d0,w0.engine),g0},this.getOS=function(){var g0={};return g0[ht]=rt,g0[Ot]=rt,n0.call(g0,d0,w0.os),E0&&!g0[ht]&&z0&&z0.platform&&z0.platform!="Unknown"&&(g0[ht]=z0.platform.replace(/chrome os/i,i0).replace(/macos/i,$t)),g0},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return d0},this.setUA=function(g0){return d0=typeof g0===dt&&g0.length>Rt?Kt(g0,Rt):g0,this},this.setUA(d0),this};S0.VERSION=ot,S0.BROWSER=xt([ht,Ot,ft]),S0.CPU=xt([zt]),S0.DEVICE=xt([bt,mt,Mt,yt,vt,St,At,Et,Tt]),S0.ENGINE=S0.OS=xt([ht,Ot]),tt.exports&&(nt=tt.exports=S0),nt.UAParser=S0;var x0=typeof et!==ct&&(et.jQuery||et.Zepto);if(x0&&!x0.ua){var m0=new S0;x0.ua=m0.getResult(),x0.ua.get=function(){return m0.getUA()},x0.ua.set=function(e0){m0.setUA(e0);var Nt=m0.getResult();for(var Xt in Nt)x0.ua[Xt]=Nt[Xt]}}})(typeof window=="object"?window:commonjsGlobal$1)})(uaParser,uaParser.exports);var uaParserExports=uaParser.exports;const UAParser=getDefaultExportFromCjs$1(uaParserExports);function getBrowserInfo(){const nt=new UAParser().getResult();return{browserName:nt.browser.name||"Unknown",browserVersion:nt.browser.version||"Unknown",deviceType:nt.device.type||"desktop",os:nt.os.name||"Unknown"}}const isLocalhost=()=>window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1",AppContext=React$1.createContext({wideMode:!1,initialSidebarState:PageConfig.SidebarState.AUTO,embedded:!1,showPadding:!1,disableScrolling:!1,showToolbar:!1,showColoredLine:!1,pageLinkBaseUrl:"",sidebarChevronDownshift:0,gitInfo:null,appConfig:{}});var __extends$1=function(){var tt=function(nt,et){return tt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(rt,ot){rt.__proto__=ot}||function(rt,ot){for(var at in ot)Object.prototype.hasOwnProperty.call(ot,at)&&(rt[at]=ot[at])},tt(nt,et)};return function(nt,et){tt(nt,et);function rt(){this.constructor=nt}nt.prototype=et===null?Object.create(et):(rt.prototype=et.prototype,new rt)}}(),__assign$1=function(){return __assign$1=Object.assign||function(tt){for(var nt,et=1,rt=arguments.length;et<rt;et++){nt=arguments[et];for(var ot in nt)Object.prototype.hasOwnProperty.call(nt,ot)&&(tt[ot]=nt[ot])}return tt},__assign$1.apply(this,arguments)},rowSizeBase={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},colSizeBase={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},edgeBase={width:"20px",height:"20px",position:"absolute"},styles={top:__assign$1(__assign$1({},rowSizeBase),{top:"-5px"}),right:__assign$1(__assign$1({},colSizeBase),{left:void 0,right:"-5px"}),bottom:__assign$1(__assign$1({},rowSizeBase),{top:void 0,bottom:"-5px"}),left:__assign$1(__assign$1({},colSizeBase),{left:"-5px"}),topRight:__assign$1(__assign$1({},edgeBase),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:__assign$1(__assign$1({},edgeBase),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:__assign$1(__assign$1({},edgeBase),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:__assign$1(__assign$1({},edgeBase),{left:"-10px",top:"-10px",cursor:"nw-resize"})},Resizer=function(tt){__extends$1(nt,tt);function nt(){var et=tt!==null&&tt.apply(this,arguments)||this;return et.onMouseDown=function(rt){et.props.onResizeStart(rt,et.props.direction)},et.onTouchStart=function(rt){et.props.onResizeStart(rt,et.props.direction)},et}return nt.prototype.render=function(){return reactExports.createElement("div",{className:this.props.className||"",style:__assign$1(__assign$1({position:"absolute",userSelect:"none"},styles[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},nt}(reactExports.PureComponent),__extends=function(){var tt=function(nt,et){return tt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(rt,ot){rt.__proto__=ot}||function(rt,ot){for(var at in ot)Object.prototype.hasOwnProperty.call(ot,at)&&(rt[at]=ot[at])},tt(nt,et)};return function(nt,et){tt(nt,et);function rt(){this.constructor=nt}nt.prototype=et===null?Object.create(et):(rt.prototype=et.prototype,new rt)}}(),__assign=function(){return __assign=Object.assign||function(tt){for(var nt,et=1,rt=arguments.length;et<rt;et++){nt=arguments[et];for(var ot in nt)Object.prototype.hasOwnProperty.call(nt,ot)&&(tt[ot]=nt[ot])}return tt},__assign.apply(this,arguments)},DEFAULT_SIZE={width:"auto",height:"auto"},clamp=function(tt,nt,et){return Math.max(Math.min(tt,et),nt)},snap=function(tt,nt,et){var rt=Math.round(tt/nt);return rt*nt+et*(rt-1)},hasDirection=function(tt,nt){return new RegExp(tt,"i").test(nt)},isTouchEvent=function(tt){return!!(tt.touches&&tt.touches.length)},isMouseEvent=function(tt){return!!((tt.clientX||tt.clientX===0)&&(tt.clientY||tt.clientY===0))},findClosestSnap=function(tt,nt,et){et===void 0&&(et=0);var rt=nt.reduce(function(at,st,ut){return Math.abs(st-tt)<Math.abs(nt[at]-tt)?ut:at},0),ot=Math.abs(nt[rt]-tt);return et===0||ot<et?nt[rt]:tt},getStringSize=function(tt){return tt=tt.toString(),tt==="auto"||tt.endsWith("px")||tt.endsWith("%")||tt.endsWith("vh")||tt.endsWith("vw")||tt.endsWith("vmax")||tt.endsWith("vmin")?tt:tt+"px"},getPixelSize=function(tt,nt,et,rt){if(tt&&typeof tt=="string"){if(tt.endsWith("px"))return Number(tt.replace("px",""));if(tt.endsWith("%")){var ot=Number(tt.replace("%",""))/100;return nt*ot}if(tt.endsWith("vw")){var ot=Number(tt.replace("vw",""))/100;return et*ot}if(tt.endsWith("vh")){var ot=Number(tt.replace("vh",""))/100;return rt*ot}}return tt},calculateNewMax=function(tt,nt,et,rt,ot,at,st){return rt=getPixelSize(rt,tt.width,nt,et),ot=getPixelSize(ot,tt.height,nt,et),at=getPixelSize(at,tt.width,nt,et),st=getPixelSize(st,tt.height,nt,et),{maxWidth:typeof rt>"u"?void 0:Number(rt),maxHeight:typeof ot>"u"?void 0:Number(ot),minWidth:typeof at>"u"?void 0:Number(at),minHeight:typeof st>"u"?void 0:Number(st)}},normalizeToPair=function(tt){return Array.isArray(tt)?tt:[tt,tt]},definedProps=["as","ref","style","className","grid","gridGap","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],baseClassName="__resizable_base__",Resizable=function(tt){__extends(nt,tt);function nt(et){var rt,ot,at,st,ut=tt.call(this,et)||this;return ut.ratio=1,ut.resizable=null,ut.parentLeft=0,ut.parentTop=0,ut.resizableLeft=0,ut.resizableRight=0,ut.resizableTop=0,ut.resizableBottom=0,ut.targetLeft=0,ut.targetTop=0,ut.appendBase=function(){if(!ut.resizable||!ut.window)return null;var ct=ut.parentNode;if(!ct)return null;var pt=ut.window.document.createElement("div");return pt.style.width="100%",pt.style.height="100%",pt.style.position="absolute",pt.style.transform="scale(0, 0)",pt.style.left="0",pt.style.flex="0 0 100%",pt.classList?pt.classList.add(baseClassName):pt.className+=baseClassName,ct.appendChild(pt),pt},ut.removeBase=function(ct){var pt=ut.parentNode;pt&&pt.removeChild(ct)},ut.state={isResizing:!1,width:(ot=(rt=ut.propsSize)===null||rt===void 0?void 0:rt.width)!==null&&ot!==void 0?ot:"auto",height:(st=(at=ut.propsSize)===null||at===void 0?void 0:at.height)!==null&&st!==void 0?st:"auto",direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},ut.onResizeStart=ut.onResizeStart.bind(ut),ut.onMouseMove=ut.onMouseMove.bind(ut),ut.onMouseUp=ut.onMouseUp.bind(ut),ut}return Object.defineProperty(nt.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(nt.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(nt.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||DEFAULT_SIZE},enumerable:!1,configurable:!0}),Object.defineProperty(nt.prototype,"size",{get:function(){var et=0,rt=0;if(this.resizable&&this.window){var ot=this.resizable.offsetWidth,at=this.resizable.offsetHeight,st=this.resizable.style.position;st!=="relative"&&(this.resizable.style.position="relative"),et=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:ot,rt=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:at,this.resizable.style.position=st}return{width:et,height:rt}},enumerable:!1,configurable:!0}),Object.defineProperty(nt.prototype,"sizeStyle",{get:function(){var et=this,rt=this.props.size,ot=function(ut){var ct;if(typeof et.state[ut]>"u"||et.state[ut]==="auto")return"auto";if(et.propsSize&&et.propsSize[ut]&&(!((ct=et.propsSize[ut])===null||ct===void 0)&&ct.toString().endsWith("%"))){if(et.state[ut].toString().endsWith("%"))return et.state[ut].toString();var pt=et.getParentSize(),dt=Number(et.state[ut].toString().replace("px","")),ft=dt/pt[ut]*100;return ft+"%"}return getStringSize(et.state[ut])},at=rt&&typeof rt.width<"u"&&!this.state.isResizing?getStringSize(rt.width):ot("width"),st=rt&&typeof rt.height<"u"&&!this.state.isResizing?getStringSize(rt.height):ot("height");return{width:at,height:st}},enumerable:!1,configurable:!0}),nt.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var et=this.appendBase();if(!et)return{width:0,height:0};var rt=!1,ot=this.parentNode.style.flexWrap;ot!=="wrap"&&(rt=!0,this.parentNode.style.flexWrap="wrap"),et.style.position="relative",et.style.minWidth="100%",et.style.minHeight="100%";var at={width:et.offsetWidth,height:et.offsetHeight};return rt&&(this.parentNode.style.flexWrap=ot),this.removeBase(et),at},nt.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},nt.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},nt.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var et=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:et.flexBasis!=="auto"?et.flexBasis:void 0})}},nt.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},nt.prototype.createSizeForCssProperty=function(et,rt){var ot=this.propsSize&&this.propsSize[rt];return this.state[rt]==="auto"&&this.state.original[rt]===et&&(typeof ot>"u"||ot==="auto")?"auto":et},nt.prototype.calculateNewMaxFromBoundary=function(et,rt){var ot=this.props.boundsByDirection,at=this.state.direction,st=ot&&hasDirection("left",at),ut=ot&&hasDirection("top",at),ct,pt;if(this.props.bounds==="parent"){var dt=this.parentNode;dt&&(ct=st?this.resizableRight-this.parentLeft:dt.offsetWidth+(this.parentLeft-this.resizableLeft),pt=ut?this.resizableBottom-this.parentTop:dt.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(ct=st?this.resizableRight:this.window.innerWidth-this.resizableLeft,pt=ut?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(ct=st?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),pt=ut?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return ct&&Number.isFinite(ct)&&(et=et&&et<ct?et:ct),pt&&Number.isFinite(pt)&&(rt=rt&&rt<pt?rt:pt),{maxWidth:et,maxHeight:rt}},nt.prototype.calculateNewSizeFromDirection=function(et,rt){var ot=this.props.scale||1,at=normalizeToPair(this.props.resizeRatio||1),st=at[0],ut=at[1],ct=this.state,pt=ct.direction,dt=ct.original,ft=this.props,bt=ft.lockAspectRatio,ht=ft.lockAspectRatioExtraHeight,Mt=ft.lockAspectRatioExtraWidth,mt=dt.width,Ot=dt.height,zt=ht||0,yt=Mt||0;return hasDirection("right",pt)&&(mt=dt.width+(et-dt.x)*st/ot,bt&&(Ot=(mt-yt)/this.ratio+zt)),hasDirection("left",pt)&&(mt=dt.width-(et-dt.x)*st/ot,bt&&(Ot=(mt-yt)/this.ratio+zt)),hasDirection("bottom",pt)&&(Ot=dt.height+(rt-dt.y)*ut/ot,bt&&(mt=(Ot-zt)*this.ratio+yt)),hasDirection("top",pt)&&(Ot=dt.height-(rt-dt.y)*ut/ot,bt&&(mt=(Ot-zt)*this.ratio+yt)),{newWidth:mt,newHeight:Ot}},nt.prototype.calculateNewSizeFromAspectRatio=function(et,rt,ot,at){var st=this.props,ut=st.lockAspectRatio,ct=st.lockAspectRatioExtraHeight,pt=st.lockAspectRatioExtraWidth,dt=typeof at.width>"u"?10:at.width,ft=typeof ot.width>"u"||ot.width<0?et:ot.width,bt=typeof at.height>"u"?10:at.height,ht=typeof ot.height>"u"||ot.height<0?rt:ot.height,Mt=ct||0,mt=pt||0;if(ut){var Ot=(bt-Mt)*this.ratio+mt,zt=(ht-Mt)*this.ratio+mt,yt=(dt-mt)/this.ratio+Mt,vt=(ft-mt)/this.ratio+Mt,At=Math.max(dt,Ot),St=Math.min(ft,zt),Et=Math.max(bt,yt),Tt=Math.min(ht,vt);et=clamp(et,At,St),rt=clamp(rt,Et,Tt)}else et=clamp(et,dt,ft),rt=clamp(rt,bt,ht);return{newWidth:et,newHeight:rt}},nt.prototype.setBoundingClientRect=function(){var et=1/(this.props.scale||1);if(this.props.bounds==="parent"){var rt=this.parentNode;if(rt){var ot=rt.getBoundingClientRect();this.parentLeft=ot.left*et,this.parentTop=ot.top*et}}if(this.props.bounds&&typeof this.props.bounds!="string"){var at=this.props.bounds.getBoundingClientRect();this.targetLeft=at.left*et,this.targetTop=at.top*et}if(this.resizable){var st=this.resizable.getBoundingClientRect(),ut=st.left,ct=st.top,pt=st.right,dt=st.bottom;this.resizableLeft=ut*et,this.resizableRight=pt*et,this.resizableTop=ct*et,this.resizableBottom=dt*et}},nt.prototype.onResizeStart=function(et,rt){if(!(!this.resizable||!this.window)){var ot=0,at=0;if(et.nativeEvent&&isMouseEvent(et.nativeEvent)?(ot=et.nativeEvent.clientX,at=et.nativeEvent.clientY):et.nativeEvent&&isTouchEvent(et.nativeEvent)&&(ot=et.nativeEvent.touches[0].clientX,at=et.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var st=this.props.onResizeStart(et,rt,this.resizable);if(st===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var ut,ct=this.window.getComputedStyle(this.resizable);if(ct.flexBasis!=="auto"){var pt=this.parentNode;if(pt){var dt=this.window.getComputedStyle(pt).flexDirection;this.flexDir=dt.startsWith("row")?"row":"column",ut=ct.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var ft={original:{x:ot,y:at,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:__assign(__assign({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(et.target).cursor||"auto"}),direction:rt,flexBasis:ut};this.setState(ft)}},nt.prototype.onMouseMove=function(et){var rt=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&isTouchEvent(et))try{et.preventDefault(),et.stopPropagation()}catch{}var ot=this.props,at=ot.maxWidth,st=ot.maxHeight,ut=ot.minWidth,ct=ot.minHeight,pt=isTouchEvent(et)?et.touches[0].clientX:et.clientX,dt=isTouchEvent(et)?et.touches[0].clientY:et.clientY,ft=this.state,bt=ft.direction,ht=ft.original,Mt=ft.width,mt=ft.height,Ot=this.getParentSize(),zt=calculateNewMax(Ot,this.window.innerWidth,this.window.innerHeight,at,st,ut,ct);at=zt.maxWidth,st=zt.maxHeight,ut=zt.minWidth,ct=zt.minHeight;var yt=this.calculateNewSizeFromDirection(pt,dt),vt=yt.newHeight,At=yt.newWidth,St=this.calculateNewMaxFromBoundary(at,st);this.props.snap&&this.props.snap.x&&(At=findClosestSnap(At,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(vt=findClosestSnap(vt,this.props.snap.y,this.props.snapGap));var Et=this.calculateNewSizeFromAspectRatio(At,vt,{width:St.maxWidth,height:St.maxHeight},{width:ut,height:ct});if(At=Et.newWidth,vt=Et.newHeight,this.props.grid){var Tt=snap(At,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),Rt=snap(vt,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),Ct=this.props.snapGap||0,wt=Ct===0||Math.abs(Tt-At)<=Ct?Tt:At,Ft=Ct===0||Math.abs(Rt-vt)<=Ct?Rt:vt;At=wt,vt=Ft}var Ht={width:At-ht.width,height:vt-ht.height};if(Mt&&typeof Mt=="string"){if(Mt.endsWith("%")){var jt=At/Ot.width*100;At=jt+"%"}else if(Mt.endsWith("vw")){var s0=At/this.window.innerWidth*100;At=s0+"vw"}else if(Mt.endsWith("vh")){var Ut=At/this.window.innerHeight*100;At=Ut+"vh"}}if(mt&&typeof mt=="string"){if(mt.endsWith("%")){var jt=vt/Ot.height*100;vt=jt+"%"}else if(mt.endsWith("vw")){var s0=vt/this.window.innerWidth*100;vt=s0+"vw"}else if(mt.endsWith("vh")){var Ut=vt/this.window.innerHeight*100;vt=Ut+"vh"}}var Yt={width:this.createSizeForCssProperty(At,"width"),height:this.createSizeForCssProperty(vt,"height")};this.flexDir==="row"?Yt.flexBasis=Yt.width:this.flexDir==="column"&&(Yt.flexBasis=Yt.height);var O0=this.state.width!==Yt.width,a0=this.state.height!==Yt.height,b0=this.state.flexBasis!==Yt.flexBasis,kt=O0||a0||b0;kt&&reactDomExports.flushSync(function(){rt.setState(Yt)}),this.props.onResize&&kt&&this.props.onResize(et,bt,this.resizable,Ht)}},nt.prototype.onMouseUp=function(et){var rt,ot,at=this.state,st=at.isResizing,ut=at.direction,ct=at.original;if(!(!st||!this.resizable)){var pt={width:this.size.width-ct.width,height:this.size.height-ct.height};this.props.onResizeStop&&this.props.onResizeStop(et,ut,this.resizable,pt),this.props.size&&this.setState({width:(rt=this.props.size.width)!==null&&rt!==void 0?rt:"auto",height:(ot=this.props.size.height)!==null&&ot!==void 0?ot:"auto"}),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:__assign(__assign({},this.state.backgroundStyle),{cursor:"auto"})})}},nt.prototype.updateSize=function(et){var rt,ot;this.setState({width:(rt=et.width)!==null&&rt!==void 0?rt:"auto",height:(ot=et.height)!==null&&ot!==void 0?ot:"auto"})},nt.prototype.renderResizer=function(){var et=this,rt=this.props,ot=rt.enable,at=rt.handleStyles,st=rt.handleClasses,ut=rt.handleWrapperStyle,ct=rt.handleWrapperClass,pt=rt.handleComponent;if(!ot)return null;var dt=Object.keys(ot).map(function(ft){return ot[ft]!==!1?reactExports.createElement(Resizer,{key:ft,direction:ft,onResizeStart:et.onResizeStart,replaceStyles:at&&at[ft],className:st&&st[ft]},pt&&pt[ft]?pt[ft]:null):null});return reactExports.createElement("div",{className:ct,style:ut},dt)},nt.prototype.render=function(){var et=this,rt=Object.keys(this.props).reduce(function(st,ut){return definedProps.indexOf(ut)!==-1||(st[ut]=et.props[ut]),st},{}),ot=__assign(__assign(__assign({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(ot.flexBasis=this.state.flexBasis);var at=this.props.as||"div";return reactExports.createElement(at,__assign({style:ot,className:this.props.className},rt,{ref:function(st){st&&(et.resizable=st)}}),this.state.isResizing&&reactExports.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},nt.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],gridGap:[0,0],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},nt}(reactExports.PureComponent);const conditionalCustomColor=(tt,nt,et)=>{let rt=tt.colors.bodyText!==tt.colors.gray10;return hasLightBackgroundColor(tt)&&(rt=tt.colors.bodyText!==tt.colors.gray85),rt?nt:et},StyledSidebar=newStyled("section",{target:"e1c29vlm0"})(({theme:tt,isCollapsed:nt,adjustTop:et,sidebarWidth:rt})=>{const ot=nt?0:Math.min(244,window.innerWidth),at=nt?0:Math.min(550,window.innerWidth*.9);return{position:"relative",top:et?tt.sizes.headerDecorationHeight:tt.spacing.none,backgroundColor:tt.colors.bgColor,zIndex:tt.zIndices.header+1,minWidth:ot,maxWidth:at,transform:nt?`translateX(-${rt}px)`:"none",transition:"transform 300ms, min-width 300ms, max-width 300ms","&:focus":{outline:"none"},[`@media (max-width: ${tt.breakpoints.md})`]:{boxShadow:`-2rem 0 2rem 2rem ${nt?"transparent":"#00000029"}`},"@media print":{display:nt?"none":"initial",height:"auto !important",maxHeight:"99%",boxShadow:"none"}}}),StyledSidebarNavContainer=newStyled("div",{target:"e1c29vlm1"})({position:"relative"}),StyledSidebarNavItems=newStyled("ul",{target:"e1c29vlm2"})(({theme:tt})=>({listStyle:"none",margin:tt.spacing.none,paddingBottom:tt.spacing.threeXS,paddingTop:tt.spacing.none,paddingRight:tt.spacing.none,paddingLeft:tt.spacing.none})),StyledSidebarNavLinkContainer=newStyled("div",{target:"e1c29vlm3"})({display:"flex",flexDirection:"column"}),StyledSidebarNavIcon=newStyled("span",{target:"e1c29vlm4"})(({theme:tt,isActive:nt})=>{const et=conditionalCustomColor(tt,tt.colors.fadedText60,tt.colors.navIconColor),rt=conditionalCustomColor(tt,tt.colors.bodyText,tt.colors.navActiveTextColor);return{display:"inline-flex",span:{color:nt?rt:et,fontWeight:nt?tt.fontWeights.bold:tt.fontWeights.normal}}}),StyledSidebarNavLink=newStyled("a",{target:"e1c29vlm5"})(({theme:tt,isActive:nt})=>{const et=conditionalCustomColor(tt,tt.colors.bodyText,tt.colors.navTextColor),rt={textDecoration:"none",fontWeight:nt?tt.fontWeights.bold:tt.fontWeights.normal};return{...rt,display:"flex",flexDirection:"row",alignItems:"center",gap:tt.spacing.sm,borderRadius:tt.radii.default,paddingLeft:tt.spacing.sm,paddingRight:tt.spacing.sm,marginLeft:tt.spacing.twoXL,marginRight:tt.spacing.twoXL,marginTop:tt.spacing.threeXS,marginBottom:tt.spacing.threeXS,lineHeight:tt.lineHeights.menuItem,color:et,backgroundColor:nt?tt.colors.darkenedBgMix25:"transparent","&:hover":{backgroundColor:transparentize(tt.colors.darkenedBgMix25,.1)},"&:active,&:visited,&:hover":{...rt},"&:focus":{outline:"none"},"&:focus-visible":{backgroundColor:tt.colors.darkenedBgMix15},"@media print":{paddingLeft:tt.spacing.none}}}),StyledSidebarLinkText=newStyled("span",{target:"e1c29vlm6"})(({isActive:tt,theme:nt})=>{const et=conditionalCustomColor(nt,transparentize(nt.colors.bodyText,.2),nt.colors.navTextColor),rt=conditionalCustomColor(nt,nt.colors.bodyText,nt.colors.navActiveTextColor);return{color:tt?rt:et,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",display:"table-cell"}}),StyledSidebarUserContent=newStyled("div",{target:"e1c29vlm7"})(({hasPageNavAbove:tt,theme:nt})=>({paddingTop:tt?nt.spacing.twoXL:0,paddingBottom:nt.sizes.sidebarTopSpace,paddingLeft:nt.spacing.twoXL,paddingRight:nt.spacing.twoXL})),StyledSidebarContent=newStyled("div",{target:"e1c29vlm8"})(({})=>({position:"relative",height:"100%",width:"100%",overflow:["auto","overlay"]})),RESIZE_HANDLE_WIDTH="8px",StyledResizeHandle=newStyled("div",{target:"e1c29vlm9"})(({theme:tt})=>({position:"absolute",width:RESIZE_HANDLE_WIDTH,height:"100%",cursor:"col-resize",zIndex:tt.zIndices.sidebarMobile,"&:hover":{backgroundImage:`linear-gradient(to right, transparent 20%, ${tt.colors.fadedText20} 28%, transparent 36%)`}})),StyledSidebarHeaderContainer=newStyled("div",{target:"e1c29vlm10"})(({theme:tt})=>({display:"flex",justifyContent:"space-between",alignItems:"start",padding:tt.spacing.twoXL,paddingTop:`calc(${tt.spacing.twoXL} - ${tt.sizes.headerDecorationHeight})`})),StyledLogoLink=newStyled("a",{target:"e1c29vlm11"})(({})=>({"&:hover":{opacity:"0.7"}}));function translateLogoHeight(tt,nt){return nt==="small"?tt.sizes.smallLogoHeight:nt==="large"?tt.sizes.largeLogoHeight:tt.sizes.defaultLogoHeight}const StyledLogo=newStyled("img",{target:"e1c29vlm12"})(({theme:tt,size:nt,sidebarWidth:et})=>({height:translateLogoHeight(tt,nt),marginTop:nt=="small"?tt.spacing.xs:tt.spacing.twoXS,marginBottom:nt=="small"?tt.spacing.xs:tt.spacing.twoXS,marginRight:tt.spacing.sm,marginLeft:tt.spacing.none,zIndex:tt.zIndices.header,objectFit:"contain",verticalAlign:"middle",...et&&{maxWidth:`calc(${et}px - 2 * ${tt.spacing.twoXL} - ${tt.spacing.sm} - 2.25rem)`}})),StyledNoLogoSpacer=newStyled("div",{target:"e1c29vlm13"})(({theme:tt})=>({height:tt.sizes.largeLogoHeight})),StyledSidebarOpenContainer=newStyled("div",{target:"e1c29vlm14"})(({theme:tt,chevronDownshift:nt})=>({position:"fixed",top:nt?`${nt}px`:tt.spacing.xl,left:tt.spacing.twoXL,zIndex:tt.zIndices.header,display:"flex",justifyContent:"center",alignItems:"center","@media print":{position:"absolute",left:0,top:0,marginTop:0,[`& > ${StyledLogo}`]:{marginTop:0}}})),StyledOpenSidebarButton=newStyled("div",{target:"e1c29vlm15"})(({theme:tt})=>{const nt=conditionalCustomColor(tt,tt.colors.bodyText,tt.colors.sidebarControlColor);return{zIndex:tt.zIndices.header,color:nt,marginTop:tt.spacing.twoXS,button:{"&:hover":{backgroundColor:tt.colors.darkenedBgMix25}},"@media print":{display:"none"}}}),StyledCollapseSidebarButton=newStyled("div",{target:"e1c29vlm16"})(({showSidebarCollapse:tt,theme:nt})=>{const et=conditionalCustomColor(nt,nt.colors.bodyText,nt.colors.sidebarControlColor);return{display:tt?"inline":"none",transition:"left 300ms",transitionDelay:"left 300ms",color:et,lineHeight:"0","@media print":{display:"none"},[`@media (max-width: ${nt.breakpoints.sm})`]:{display:"inline"}}}),StyledSidebarNavSectionHeader=newStyled("header",{target:"e1c29vlm17"})(({theme:tt})=>{const nt=conditionalCustomColor(tt,transparentize(tt.colors.bodyText,.15),tt.colors.navTextColor);return{fontSize:tt.fontSizes.sm,fontWeight:tt.fontWeights.bold,color:nt,lineHeight:tt.lineHeights.small,paddingRight:tt.spacing.sm,marginLeft:tt.spacing.twoXL,marginRight:tt.spacing.twoXL,marginTop:tt.spacing.sm,marginBottom:tt.spacing.twoXS}}),StyledViewButton=newStyled("button",{target:"e1c29vlm18"})(({theme:tt})=>{const nt=conditionalCustomColor(tt,tt.colors.bodyText,tt.colors.navActiveTextColor);return{fontSize:tt.fontSizes.sm,fontFamily:"inherit",lineHeight:tt.lineHeights.base,color:nt,backgroundColor:tt.colors.transparent,border:"none",borderRadius:tt.radii.default,marginTop:tt.spacing.twoXS,marginLeft:tt.spacing.xl,marginBottom:tt.spacing.none,marginRight:tt.spacing.none,padding:`${tt.spacing.threeXS} ${tt.spacing.sm}`,"&:hover, &:active, &:focus":{border:"none",outline:"none",boxShadow:"none"},"&:hover":{backgroundColor:tt.colors.darkenedBgMix25}}}),StyledSidebarNavSeparator=newStyled("div",{target:"e1c29vlm19"})(({theme:tt})=>({paddingTop:tt.spacing.lg,borderBottom:`${tt.sizes.borderWidth} solid ${tt.colors.borderColor}`}));function arrayAggregator$1(tt,nt,et,rt){for(var ot=-1,at=tt==null?0:tt.length;++ot<at;){var st=tt[ot];nt(rt,st,et(st),tt)}return rt}var _arrayAggregator=arrayAggregator$1,baseEach=_baseEach;function baseAggregator$1(tt,nt,et,rt){return baseEach(tt,function(ot,at,st){nt(rt,ot,et(ot),st)}),rt}var _baseAggregator=baseAggregator$1,arrayAggregator=_arrayAggregator,baseAggregator=_baseAggregator,baseIteratee$1=_baseIteratee,isArray$1=isArray_1;function createAggregator$1(tt,nt){return function(et,rt){var ot=isArray$1(et)?arrayAggregator:baseAggregator,at=nt?nt():{};return ot(et,tt,baseIteratee$1(rt),at)}}var _createAggregator=createAggregator$1,baseAssignValue$1=_baseAssignValue,createAggregator=_createAggregator,objectProto=Object.prototype,hasOwnProperty$1=objectProto.hasOwnProperty,groupBy=createAggregator(function(tt,nt,et){hasOwnProperty$1.call(tt,et)?tt[et].push(nt):baseAssignValue$1(tt,et,[nt])}),groupBy_1=groupBy;const groupBy$1=getDefaultExportFromCjs$1(groupBy_1),NavSection=({header:tt="",children:nt})=>jsxs(Fragment,{children:[tt&&jsx$1(StyledSidebarNavSectionHeader,{"data-testid":"stNavSectionHeader",children:tt}),nt]}),SidebarNavLink=({isActive:tt,pageUrl:nt,icon:et,onClick:rt,children:ot})=>jsx$1(StyledSidebarNavLinkContainer,{children:jsxs(StyledSidebarNavLink,{"data-testid":"stSidebarNavLink",isActive:tt,href:nt,onClick:rt,children:[et&&et.length&&jsx$1(StyledSidebarNavIcon,{isActive:tt,children:jsx$1(DynamicIcon,{size:"md",iconValue:et})}),jsx$1(StyledSidebarLinkText,{isActive:tt,children:ot})]})}),COLLAPSE_THRESHOLD=12,NUM_PAGES_TO_SHOW_WHEN_COLLAPSED=10;function NavLink({pageUrl:tt,page:nt,isActive:et,onClick:rt}){const ot=nt.pageName;return jsx$1("li",{children:jsx$1(SidebarNavLink,{isActive:et,pageUrl:tt,icon:nt.icon,onClick:rt,children:ot})})}function generateNavSections(tt,nt,et,rt){const ot=[],at=groupBy$1(nt,ut=>ut.sectionHeader||"");let st=0;return tt.forEach(ut=>{const ct=at[ut]??[];let pt=ct;if(et){if(st>=NUM_PAGES_TO_SHOW_WHEN_COLLAPSED)return;st+ct.length>NUM_PAGES_TO_SHOW_WHEN_COLLAPSED&&(pt=ct.slice(0,NUM_PAGES_TO_SHOW_WHEN_COLLAPSED-st))}st+=pt.length,ot.push(jsx$1(NavSection,{header:ut,children:pt.map(rt)},ut))}),ot}const SidebarNav=({endpoints:tt,appPages:nt,collapseSidebar:et,expandSidebarNav:rt,currentPageScriptHash:ot,hasSidebarElements:at,navSections:st,onPageChange:ut})=>{const[ct,pt]=reactExports.useState(!1),{pageLinkBaseUrl:dt}=reactExports.useContext(AppContext);reactExports.useEffect(()=>{const zt=localStorageAvailable()&&window.localStorage.getItem("sidebarNavState")==="expanded";!ct&&(rt||zt)&&pt(!0)},[ct,rt]);const ft=reactExports.useCallback(()=>{const zt=!ct;localStorageAvailable()&&(zt?window.localStorage.setItem("sidebarNavState","expanded"):window.localStorage.removeItem("sidebarNavState")),pt(zt)},[ct]),bt=reactExports.useCallback((zt,yt)=>{const vt=tt.buildAppPageURL(dt,zt),At=zt.pageScriptHash===ot;return jsx$1(NavLink,{pageUrl:vt,page:zt,isActive:At,onClick:St=>{St.preventDefault(),ut(zt.pageScriptHash),isMobile_1&&et()}},`${zt.pageName}-${yt}`)},[et,ot,tt,ut,dt]);let ht=[];const Mt=nt.length,mt=at&&Mt>COLLAPSE_THRESHOLD&&!rt,Ot=mt&&!ct;return st.length>0?ht=generateNavSections(st,nt,Ot,bt):ht=(Ot?nt.slice(0,NUM_PAGES_TO_SHOW_WHEN_COLLAPSED):nt).map(bt),jsxs(StyledSidebarNavContainer,{"data-testid":"stSidebarNav",children:[jsx$1(StyledSidebarNavItems,{"data-testid":"stSidebarNavItems",children:ht}),mt&&jsx$1(StyledViewButton,{onClick:ft,"data-testid":"stSidebarNavViewButton",children:ct?"View less":`View ${Mt-NUM_PAGES_TO_SHOW_WHEN_COLLAPSED} more`}),at&&jsx$1(StyledSidebarNavSeparator,{"data-testid":"stSidebarNavSeparator"})]})},Cn=class Cn extends reactExports.PureComponent{constructor(nt){super(nt),this.sidebarRef=React$1.createRef(),this.handleClickOutside=rt=>{if(this.sidebarRef&&window){const{current:ot}=this.sidebarRef,{innerWidth:at}=window;ot&&!ot.contains(rt.target)&&at<=this.mediumBreakpointPx&&this.setState({collapsedSidebar:!0})}},this.setSidebarWidth=rt=>{const ot=rt.toString();this.setState({sidebarWidth:ot}),localStorageAvailable()&&window.localStorage.setItem("sidebarWidth",ot)},this.resetSidebarWidth=rt=>{rt.detail===2&&(this.setState({sidebarWidth:Cn.minWidth}),localStorageAvailable()&&window.localStorage.setItem("sidebarWidth",Cn.minWidth))},this.checkMobileOnResize=()=>{if(!window)return!1;const{innerWidth:rt}=window;return rt<this.state.lastInnerWidth&&rt<=this.mediumBreakpointPx&&this.setState({collapsedSidebar:!0}),this.setState({lastInnerWidth:rt}),!0},this.toggleCollapse=()=>{const{collapsedSidebar:rt}=this.state;this.setState({collapsedSidebar:!rt})},this.onMouseOver=()=>{this.setState({showSidebarCollapse:!0})},this.onMouseOut=()=>{this.setState({showSidebarCollapse:!1})},this.mediumBreakpointPx=Cn.calculateMaxBreakpoint(nt.theme.breakpoints.md);const et=localStorageAvailable()?window.localStorage.getItem("sidebarWidth"):void 0;this.state={collapsedSidebar:Cn.shouldCollapse(nt,this.mediumBreakpointPx),sidebarWidth:et||Cn.minWidth,lastInnerWidth:window?window.innerWidth:1/0,showSidebarCollapse:!1}}static calculateMaxBreakpoint(nt){return parseInt(nt,10)-.02}componentDidUpdate(nt){this.mediumBreakpointPx=Cn.calculateMaxBreakpoint(this.props.theme.breakpoints.md),(this.props.initialSidebarState!==nt.initialSidebarState||this.props.hasElements!==nt.hasElements)&&this.setState({collapsedSidebar:Cn.shouldCollapse(this.props,this.mediumBreakpointPx)})}static shouldCollapse(nt,et){switch(nt.initialSidebarState){case PageConfig.SidebarState.EXPANDED:return!1;case PageConfig.SidebarState.COLLAPSED:return!0;case PageConfig.SidebarState.AUTO:default:{const{innerWidth:rt}=window||{};return rt?rt<=et:!1}}}componentDidMount(){window.addEventListener("resize",this.checkMobileOnResize),document.addEventListener("mousedown",this.handleClickOutside)}componentWillUnmount(){window.removeEventListener("resize",this.checkMobileOnResize),document.removeEventListener("mousedown",this.handleClickOutside)}headerDecorationVisible(){let nt=!1;const et=document.getElementById("stDecoration");if(et){const rt=window.getComputedStyle(et);nt=rt.visibility!=="hidden"&&rt.visibility!=="collapse"&&rt.display!=="none"}return nt}renderLogo(nt){const{appLogo:et,endpoints:rt}=this.props,{sidebarWidth:ot}=this.state;if(!et)return jsx$1(StyledNoLogoSpacer,{"data-testid":"stLogoSpacer"});const at=nt&&et.iconImage?et.iconImage:et.image,st=rt.buildMediaURL(at),ut=jsx$1(StyledLogo,{src:st,size:et.size,sidebarWidth:ot,alt:"Logo",className:"stLogo","data-testid":"stLogo"});return et.link?jsx$1(StyledLogoLink,{href:et.link,target:"_blank",rel:"noreferrer","data-testid":"stLogoLink",children:ut}):ut}render(){const{collapsedSidebar:nt,sidebarWidth:et,showSidebarCollapse:rt}=this.state,{appPages:ot,chevronDownshift:at,children:st,hasElements:ut,onPageChange:ct,currentPageScriptHash:pt,hideSidebarNav:dt,expandSidebarNav:ft,navSections:bt}=this.props,ht=ot.length>1&&!dt,mt=!(isEmbed()&&!isColoredLineDisplayed())&&this.headerDecorationVisible();return jsxs(Fragment,{children:[jsxs(StyledSidebarOpenContainer,{chevronDownshift:at,"data-testid":"stSidebarCollapsedControl",children:[this.renderLogo(!0),jsx$1(StyledOpenSidebarButton,{children:jsx$1(BaseButton,{kind:BaseButtonKind.HEADER_NO_PADDING,onClick:this.toggleCollapse,children:jsx$1(Icon$2,{content:ChevronRight,size:"xl"})})})]}),jsx$1(Resizable,{className:"stSidebar","data-testid":"stSidebar","aria-expanded":!nt,enable:{top:!1,right:!0,bottom:!1,left:!1},handleStyles:{right:{width:RESIZE_HANDLE_WIDTH,right:"-6px"}},handleComponent:{right:jsx$1(StyledResizeHandle,{onClick:this.resetSidebarWidth})},size:{width:et,height:"auto"},as:StyledSidebar,onResizeStop:(Ot,zt,yt,vt)=>{const At=parseInt(et,10)+vt.width;this.setSidebarWidth(At)},isCollapsed:nt,adjustTop:mt,sidebarWidth:et,children:jsxs(StyledSidebarContent,{"data-testid":"stSidebarContent",ref:this.sidebarRef,onMouseOver:this.onMouseOver,onMouseOut:this.onMouseOut,children:[jsxs(StyledSidebarHeaderContainer,{"data-testid":"stSidebarHeader",children:[this.renderLogo(!1),jsx$1(StyledCollapseSidebarButton,{showSidebarCollapse:rt,"data-testid":"stSidebarCollapseButton",children:jsx$1(BaseButton,{kind:BaseButtonKind.HEADER_NO_PADDING,onClick:this.toggleCollapse,children:jsx$1(Icon$2,{content:ChevronLeft,size:"xl"})})})]}),ht&&jsx$1(SidebarNav,{endpoints:this.props.endpoints,appPages:ot,collapseSidebar:this.toggleCollapse,currentPageScriptHash:pt,navSections:bt,hasSidebarElements:ut,expandSidebarNav:ft,onPageChange:ct}),jsx$1(StyledSidebarUserContent,{hasPageNavAbove:ht,"data-testid":"stSidebarUserContent",children:st})]})})]})}};Cn.minWidth="336";let Sidebar=Cn;function SidebarWithProvider(tt){return jsx$1(IsSidebarContext.Provider,{value:!0,children:jsx$1(Sidebar,{...tt})})}const Sidebar$1=withTheme(SidebarWithProvider),createSidebarTheme=tt=>createTheme("Sidebar",{secondaryBackgroundColor:tt.emotion.colors.bgColor,backgroundColor:tt.emotion.colors.secondaryBg,bodyFont:tt.emotion.genericFonts.bodyFont,codeFont:tt.emotion.genericFonts.codeFont},tt,!0),ThemedSidebar=({children:tt,...nt})=>{const{sidebarChevronDownshift:et}=React$1.useContext(AppContext),{activeTheme:rt}=React$1.useContext(LibContext),ot=createSidebarTheme(rt);return jsx$1(ThemeProvider,{theme:ot.emotion,baseuiTheme:ot.basewebTheme,children:jsx$1(Sidebar$1,{...nt,chevronDownshift:et,children:tt})})};function EventContainer({scriptRunId:tt,children:nt}){const et=useTheme();return reactExports.useEffect(()=>{var rt;(rt=toaster.getRef())==null||rt.clearAll()},[tt]),jsxs(Fragment,{children:[jsx$1(ToasterContainer,{placement:PLACEMENT$1.topRight,autoHideDuration:4*1e3,overrides:{Root:{style:{top:et.sizes.headerHeight,zIndex:et.zIndices.toast},props:{"data-testid":"stToastContainer",className:"stToastContainer"}}}}),nt]})}const StyledAppViewContainer=newStyled("div",{target:"eht7o1d0"})({display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"stretch",alignContent:"flex-start",position:"absolute",top:0,left:0,right:0,bottom:0,overflow:"hidden","@media print":{overflow:"visible"}}),StyledAppViewMain=newStyled("section",{target:"eht7o1d1"})(({disableScrolling:tt,theme:nt})=>({display:"flex",flexDirection:"column",width:nt.sizes.full,overflow:tt?"hidden":"auto",alignItems:"center","&:focus":{outline:"none"},"@media not print":{[`@media (max-width: ${nt.breakpoints.md})`]:{position:"absolute",top:0,left:0,right:0,bottom:0}},"@media print":{overflow:"visible"}})),StyledStickyBottomContainer=newStyled("div",{target:"eht7o1d2"})(({theme:tt})=>({position:"sticky",left:0,bottom:0,width:"100%",zIndex:tt.zIndices.bottom,"@media print":{position:"static"}})),StyledInnerBottomContainer=newStyled("div",{target:"eht7o1d3"})(({theme:tt})=>({position:"relative",bottom:0,width:"100%",minWidth:"100%",backgroundColor:tt.colors.bgColor,display:"flex",flexDirection:"column",alignItems:"center"})),applyWideModePadding=tt=>({[`@media (min-width: calc(${tt.sizes.contentMaxWidth} + 2 * (${tt.sizes.wideSidePadding} - ${tt.spacing.lg})))`]:{paddingLeft:tt.sizes.wideSidePadding,paddingRight:tt.sizes.wideSidePadding},minWidth:"auto",maxWidth:"initial"}),StyledAppViewBlockContainer=newStyled("div",{target:"eht7o1d4"})(({hasSidebar:tt,hasBottom:nt,isEmbedded:et,isWideMode:rt,showPadding:ot,addPaddingForHeader:at,theme:st})=>{const ut="2.1rem";let ct=ot?"6rem":ut;(at&&!ot||et&&tt)&&(ct=`${parseFloat(st.sizes.headerHeight)+parseFloat(st.spacing.md)}rem`);const pt=ot&&!nt?"10rem":st.spacing.lg;return{width:st.sizes.full,paddingLeft:st.spacing.lg,paddingRight:st.spacing.lg,paddingTop:ct,paddingBottom:pt,maxWidth:st.sizes.contentMaxWidth,...rt&&applyWideModePadding(st),"@media print":{paddingTop:ut}}}),StyledSidebarBlockContainer=newStyled("div",{target:"eht7o1d5"})(({theme:tt})=>({width:tt.sizes.full})),StyledEventBlockContainer=newStyled("div",{target:"eht7o1d6"})({display:"none"}),StyledBottomBlockContainer=newStyled("div",{target:"eht7o1d7"})(({isWideMode:tt,showPadding:nt,theme:et})=>({width:et.sizes.full,paddingLeft:et.spacing.lg,paddingRight:et.spacing.lg,paddingTop:et.spacing.lg,paddingBottom:nt?et.sizes.appDefaultBottomPadding:et.spacing.threeXL,maxWidth:et.sizes.contentMaxWidth,...tt&&applyWideModePadding(et),"@media print":{paddingTop:et.spacing.none}})),StyledAppViewBlockSpacer=newStyled("div",{target:"eht7o1d8"})(({theme:tt})=>({width:tt.sizes.full,flexGrow:1})),StyledIFrameResizerAnchor=newStyled("div",{target:"eht7o1d9"})(({theme:tt})=>({position:"relative",bottom:tt.spacing.none}));function ScrollToBottomContainer(tt){const{className:nt,tabIndex:et,children:rt,isEmbedded:ot,disableScrolling:at}=tt,st=useScrollToBottom();return jsx$1(StyledAppViewMain,{tabIndex:et,className:nt,isEmbedded:ot,disableScrolling:at,ref:st,"data-testid":"stAppScrollToBottomContainer",children:rt})}function AppView(tt){const{elements:nt,scriptRunId:et,scriptRunState:rt,widgetMgr:ot,widgetsDisabled:at,uploadClient:st,componentRegistry:ut,formsData:ct,appLogo:pt,appPages:dt,navSections:ft,onPageChange:bt,currentPageScriptHash:ht,expandSidebarNav:Mt,hideSidebarNav:mt,sendMessageToHost:Ot,endpoints:zt}=tt;React$1.useEffect(()=>{const Dt=()=>{Ot({type:"UPDATE_HASH",hash:window.location.hash})};return window.addEventListener("hashchange",Dt,!1),()=>window.removeEventListener("hashchange",Dt,!1)},[Ot]);const{wideMode:yt,initialSidebarState:vt,embedded:At,showPadding:St,disableScrolling:Et,showToolbar:Tt,showColoredLine:Rt,sidebarChevronDownshift:Ct}=React$1.useContext(AppContext),{addScriptFinishedHandler:wt,removeScriptFinishedHandler:Ft}=React$1.useContext(LibContext),Ht=yt?"wide":"narrow",jt=!nt.sidebar.isEmpty,s0=!nt.event.isEmpty,Ut=!nt.bottom.isEmpty,[Yt,O0]=React$1.useState(!1),a0=jt||!mt&&dt.length>1||Yt;React$1.useEffect(()=>{a0&&mt&&!Yt&&O0(!0)},[a0,mt,Yt]);const b0=React$1.useCallback(()=>{!jt&&Yt&&O0(!1)},[jt,Yt]);React$1.useEffect(()=>(wt(b0),()=>{Ft(b0)}),[b0,wt,Ft]);const kt=Dt=>{const Bt=Dt.iconImage?Dt.iconImage:Dt.image,p0=zt.buildMediaURL(Bt),r0=jsx$1(StyledLogo,{src:p0,size:Dt.size,alt:"Logo",className:"stLogo","data-testid":"stLogo"});return Dt.link?jsx$1(StyledLogoLink,{href:Dt.link,target:"_blank",rel:"noreferrer","data-testid":"stLogoLink",children:r0}):r0},o0=Ut?ScrollToBottomContainer:StyledAppViewMain,qt=Dt=>jsx$1(VerticalBlock,{node:Dt,endpoints:zt,scriptRunId:et,scriptRunState:rt,widgetMgr:ot,widgetsDisabled:at,uploadClient:st,componentRegistry:ut,formsData:ct});return jsxs(StyledAppViewContainer,{className:"stAppViewContainer appview-container","data-testid":"stAppViewContainer","data-layout":Ht,children:[a0&&jsx$1(Profiler,{id:"Sidebar",children:jsx$1(ThemedSidebar,{endpoints:zt,initialSidebarState:vt,appLogo:pt,appPages:dt,navSections:ft,hasElements:jt,onPageChange:bt,currentPageScriptHash:ht,hideSidebarNav:mt,expandSidebarNav:Mt,children:jsx$1(StyledSidebarBlockContainer,{children:qt(nt.sidebar)})})}),!a0&&pt&&jsx$1(StyledSidebarOpenContainer,{chevronDownshift:Ct,"data-testid":"stSidebarCollapsedControl",children:kt(pt)}),jsxs(o0,{tabIndex:0,isEmbedded:At,disableScrolling:Et,className:"stMain","data-testid":"stMain",children:[jsx$1(Profiler,{id:"Main",children:jsx$1(StyledAppViewBlockContainer,{className:"stMainBlockContainer block-container","data-testid":"stMainBlockContainer",isWideMode:yt,showPadding:St,addPaddingForHeader:Tt||Rt,hasBottom:Ut,isEmbedded:At,hasSidebar:a0,children:qt(nt.main)})}),!Ut&&jsx$1(StyledIFrameResizerAnchor,{"data-testid":"stAppIframeResizerAnchor","data-iframe-height":!0}),Ut&&jsxs(Profiler,{id:"Bottom",children:[jsx$1(StyledAppViewBlockSpacer,{}),jsx$1(StyledStickyBottomContainer,{className:"stBottom","data-testid":"stBottom",children:jsx$1(StyledInnerBottomContainer,{children:jsx$1(StyledBottomBlockContainer,{"data-testid":"stBottomBlockContainer",isWideMode:yt,showPadding:St,children:qt(nt.bottom)})})})]})]}),s0&&jsx$1(Profiler,{id:"Event",children:jsx$1(EventContainer,{scriptRunId:nt.event.scriptRunId,children:jsx$1(StyledEventBlockContainer,{className:"stEvent","data-testid":"stEvent",children:qt(nt.event)})})})]})}var Ellipses=reactExports.forwardRef(function(tt,nt){var et={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return reactExports.createElement(EmotionIconBase,_extends$Q({iconAttrs:et,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},tt,{ref:nt}),reactExports.createElement("path",{d:"M0 3v2h2V3H0zm3 0v2h2V3H3zm3 0v2h2V3H6z"}))});Ellipses.displayName="Ellipses";var Info=reactExports.forwardRef(function(tt,nt){var et={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return reactExports.createElement(EmotionIconBase,_extends$Q({iconAttrs:et,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},tt,{ref:nt}),reactExports.createElement("path",{d:"M5 0c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zM3.5 2.5C2.67 2.5 2 3.17 2 4h1c0-.28.22-.5.5-.5s.5.22.5.5-1 1.64-1 2.5C3 7.36 3.67 8 4.5 8S6 7.33 6 6.5H5c0 .28-.22.5-.5.5S4 6.78 4 6.5C4 6.14 5 4.66 5 4c0-.81-.67-1.5-1.5-1.5z"}))});Info.displayName="Info";var Warning=reactExports.forwardRef(function(tt,nt){var et={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return reactExports.createElement(EmotionIconBase,_extends$Q({iconAttrs:et,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},tt,{ref:nt}),reactExports.createElement("path",{d:"M3.09 0c-.06 0-.1.04-.13.09L.02 6.9c-.02.05-.03.13-.03.19v.81c0 .05.04.09.09.09h6.81c.05 0 .09-.04.09-.09v-.81c0-.05-.01-.14-.03-.19L4.01.09A.142.142 0 003.88 0h-.81zM3 3h1v2H3V3zm0 3h1v1H3V6z"}))});Warning.displayName="Warning";function hasClass(tt,nt){return tt.classList?!!nt&&tt.classList.contains(nt):(" "+(tt.className.baseVal||tt.className)+" ").indexOf(" "+nt+" ")!==-1}function addClass(tt,nt){tt.classList?tt.classList.add(nt):hasClass(tt,nt)||(typeof tt.className=="string"?tt.className=tt.className+" "+nt:tt.setAttribute("class",(tt.className&&tt.className.baseVal||"")+" "+nt))}function replaceClassName(tt,nt){return tt.replace(new RegExp("(^|\\s)"+nt+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function removeClass$1(tt,nt){tt.classList?tt.classList.remove(nt):typeof tt.className=="string"?tt.className=replaceClassName(tt.className,nt):tt.setAttribute("class",replaceClassName(tt.className&&tt.className.baseVal||"",nt))}const config={disabled:!1},TransitionGroupContext=React$1.createContext(null);var forceReflow=function tt(nt){return nt.scrollTop},UNMOUNTED="unmounted",EXITED="exited",ENTERING="entering",ENTERED="entered",EXITING="exiting",Transition=function(tt){_inheritsLoose(nt,tt);function nt(rt,ot){var at;at=tt.call(this,rt,ot)||this;var st=ot,ut=st&&!st.isMounting?rt.enter:rt.appear,ct;return at.appearStatus=null,rt.in?ut?(ct=EXITED,at.appearStatus=ENTERING):ct=ENTERED:rt.unmountOnExit||rt.mountOnEnter?ct=UNMOUNTED:ct=EXITED,at.state={status:ct},at.nextCallback=null,at}nt.getDerivedStateFromProps=function(ot,at){var st=ot.in;return st&&at.status===UNMOUNTED?{status:EXITED}:null};var et=nt.prototype;return et.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},et.componentDidUpdate=function(ot){var at=null;if(ot!==this.props){var st=this.state.status;this.props.in?st!==ENTERING&&st!==ENTERED&&(at=ENTERING):(st===ENTERING||st===ENTERED)&&(at=EXITING)}this.updateStatus(!1,at)},et.componentWillUnmount=function(){this.cancelNextCallback()},et.getTimeouts=function(){var ot=this.props.timeout,at,st,ut;return at=st=ut=ot,ot!=null&&typeof ot!="number"&&(at=ot.exit,st=ot.enter,ut=ot.appear!==void 0?ot.appear:st),{exit:at,enter:st,appear:ut}},et.updateStatus=function(ot,at){if(ot===void 0&&(ot=!1),at!==null)if(this.cancelNextCallback(),at===ENTERING){if(this.props.unmountOnExit||this.props.mountOnEnter){var st=this.props.nodeRef?this.props.nodeRef.current:ReactDOM.findDOMNode(this);st&&forceReflow(st)}this.performEnter(ot)}else this.performExit();else this.props.unmountOnExit&&this.state.status===EXITED&&this.setState({status:UNMOUNTED})},et.performEnter=function(ot){var at=this,st=this.props.enter,ut=this.context?this.context.isMounting:ot,ct=this.props.nodeRef?[ut]:[ReactDOM.findDOMNode(this),ut],pt=ct[0],dt=ct[1],ft=this.getTimeouts(),bt=ut?ft.appear:ft.enter;if(!ot&&!st||config.disabled){this.safeSetState({status:ENTERED},function(){at.props.onEntered(pt)});return}this.props.onEnter(pt,dt),this.safeSetState({status:ENTERING},function(){at.props.onEntering(pt,dt),at.onTransitionEnd(bt,function(){at.safeSetState({status:ENTERED},function(){at.props.onEntered(pt,dt)})})})},et.performExit=function(){var ot=this,at=this.props.exit,st=this.getTimeouts(),ut=this.props.nodeRef?void 0:ReactDOM.findDOMNode(this);if(!at||config.disabled){this.safeSetState({status:EXITED},function(){ot.props.onExited(ut)});return}this.props.onExit(ut),this.safeSetState({status:EXITING},function(){ot.props.onExiting(ut),ot.onTransitionEnd(st.exit,function(){ot.safeSetState({status:EXITED},function(){ot.props.onExited(ut)})})})},et.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},et.safeSetState=function(ot,at){at=this.setNextCallback(at),this.setState(ot,at)},et.setNextCallback=function(ot){var at=this,st=!0;return this.nextCallback=function(ut){st&&(st=!1,at.nextCallback=null,ot(ut))},this.nextCallback.cancel=function(){st=!1},this.nextCallback},et.onTransitionEnd=function(ot,at){this.setNextCallback(at);var st=this.props.nodeRef?this.props.nodeRef.current:ReactDOM.findDOMNode(this),ut=ot==null&&!this.props.addEndListener;if(!st||ut){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var ct=this.props.nodeRef?[this.nextCallback]:[st,this.nextCallback],pt=ct[0],dt=ct[1];this.props.addEndListener(pt,dt)}ot!=null&&setTimeout(this.nextCallback,ot)},et.render=function(){var ot=this.state.status;if(ot===UNMOUNTED)return null;var at=this.props,st=at.children;at.in,at.mountOnEnter,at.unmountOnExit,at.appear,at.enter,at.exit,at.timeout,at.addEndListener,at.onEnter,at.onEntering,at.onEntered,at.onExit,at.onExiting,at.onExited,at.nodeRef;var ut=_objectWithoutPropertiesLoose$m(at,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return React$1.createElement(TransitionGroupContext.Provider,{value:null},typeof st=="function"?st(ot,ut):React$1.cloneElement(React$1.Children.only(st),ut))},nt}(React$1.Component);Transition.contextType=TransitionGroupContext;Transition.propTypes={};function noop$1(){}Transition.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:noop$1,onEntering:noop$1,onEntered:noop$1,onExit:noop$1,onExiting:noop$1,onExited:noop$1};Transition.UNMOUNTED=UNMOUNTED;Transition.EXITED=EXITED;Transition.ENTERING=ENTERING;Transition.ENTERED=ENTERED;Transition.EXITING=EXITING;var _addClass=function tt(nt,et){return nt&&et&&et.split(" ").forEach(function(rt){return addClass(nt,rt)})},removeClass=function tt(nt,et){return nt&&et&&et.split(" ").forEach(function(rt){return removeClass$1(nt,rt)})},CSSTransition=function(tt){_inheritsLoose(nt,tt);function nt(){for(var rt,ot=arguments.length,at=new Array(ot),st=0;st<ot;st++)at[st]=arguments[st];return rt=tt.call.apply(tt,[this].concat(at))||this,rt.appliedClasses={appear:{},enter:{},exit:{}},rt.onEnter=function(ut,ct){var pt=rt.resolveArguments(ut,ct),dt=pt[0],ft=pt[1];rt.removeClasses(dt,"exit"),rt.addClass(dt,ft?"appear":"enter","base"),rt.props.onEnter&&rt.props.onEnter(ut,ct)},rt.onEntering=function(ut,ct){var pt=rt.resolveArguments(ut,ct),dt=pt[0],ft=pt[1],bt=ft?"appear":"enter";rt.addClass(dt,bt,"active"),rt.props.onEntering&&rt.props.onEntering(ut,ct)},rt.onEntered=function(ut,ct){var pt=rt.resolveArguments(ut,ct),dt=pt[0],ft=pt[1],bt=ft?"appear":"enter";rt.removeClasses(dt,bt),rt.addClass(dt,bt,"done"),rt.props.onEntered&&rt.props.onEntered(ut,ct)},rt.onExit=function(ut){var ct=rt.resolveArguments(ut),pt=ct[0];rt.removeClasses(pt,"appear"),rt.removeClasses(pt,"enter"),rt.addClass(pt,"exit","base"),rt.props.onExit&&rt.props.onExit(ut)},rt.onExiting=function(ut){var ct=rt.resolveArguments(ut),pt=ct[0];rt.addClass(pt,"exit","active"),rt.props.onExiting&&rt.props.onExiting(ut)},rt.onExited=function(ut){var ct=rt.resolveArguments(ut),pt=ct[0];rt.removeClasses(pt,"exit"),rt.addClass(pt,"exit","done"),rt.props.onExited&&rt.props.onExited(ut)},rt.resolveArguments=function(ut,ct){return rt.props.nodeRef?[rt.props.nodeRef.current,ut]:[ut,ct]},rt.getClassNames=function(ut){var ct=rt.props.classNames,pt=typeof ct=="string",dt=pt&&ct?ct+"-":"",ft=pt?""+dt+ut:ct[ut],bt=pt?ft+"-active":ct[ut+"Active"],ht=pt?ft+"-done":ct[ut+"Done"];return{baseClassName:ft,activeClassName:bt,doneClassName:ht}},rt}var et=nt.prototype;return et.addClass=function(ot,at,st){var ut=this.getClassNames(at)[st+"ClassName"],ct=this.getClassNames("enter"),pt=ct.doneClassName;at==="appear"&&st==="done"&&pt&&(ut+=" "+pt),st==="active"&&ot&&forceReflow(ot),ut&&(this.appliedClasses[at][st]=ut,_addClass(ot,ut))},et.removeClasses=function(ot,at){var st=this.appliedClasses[at],ut=st.base,ct=st.active,pt=st.done;this.appliedClasses[at]={},ut&&removeClass(ot,ut),ct&&removeClass(ot,ct),pt&&removeClass(ot,pt)},et.render=function(){var ot=this.props;ot.classNames;var at=_objectWithoutPropertiesLoose$m(ot,["classNames"]);return React$1.createElement(Transition,_extends$Q({},at,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},nt}(React$1.Component);CSSTransition.defaultProps={classNames:""};CSSTransition.propTypes={};const iconRunning="data:image/gif;base64,R0lGODlhgACAAPAAAAAAAAAAACH5BAkUAAEAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAAgACAAAAC/oyPqcvtD6OctNqLs968+w+G4kiW5omm6sq27gvH8kzX9o3nKcD3vA5s+Ia9oNFATAKOQKWSiXM6oTbpkzqzTrEx7ZX78ibBYfGYzDKf0So1kZ12/+Ar+Zy+s+Pr7j1f7ffnFRinRegiddg1pNho5OMIKbhGZpXXl6N3YrdlwvlF8ik6SioZWoqaauap2ur6xvoqm4oya1t6easL2Lbra1j2+5sp3ApWjKmI7Bghy1zh/DwRLd38Wi1Bje2gvc3Q7a0AHo4wTo50fb5gfs5O7h4O7y2/TY9tX40vrf/Mz+wfKZ26BAAbFVQmcOCBg4cYEnIYCKIfiXso4rFIByMcnY1sOKLxWCmhwgCWhCQaufDkN5UoS67s1JKlOJkKXa6jOdDmTJgjdRLEqc5nOaDtiJI0Gs+o0KBKkc5ryrMmVFA9p1KqGnVoVqZb0XV9ZxUWyqNflxYt67ReWEZjyVL9+TUp2rhP577NudZUTLtXpfIVu/duSrpq/7Id6zRtYcAvGQfWy60vYsgPDre9jDmz5s2cO3v+DDq06NEnCgAAIfkECRQAAQAsAAAAAIAAgAAAAv6Mj6nL7Q+jnLTai7PevPsPhuJIluaJpurKtu4Lx/JM1/aN5/rO9/4P1AGGxGGwV0wSjzmlE8C0PZ/R2XRahV2vWdcW22V9qeHV2FlWnclp0xrddr+T8dN8WZff8/o5v3/2BzgmOMhVaAiHaAe2qEbnGCk56XBHSLlgaYl5oOmJ6Rk6GUoaSVrqeIpaqLoq2OqaBxtbNyv6eljZyprbAMvL5vuLG8wwTKxofIxcBLGM2Oz8zKm8S/0wfZ0wq62r2i1sDa6QPc49Ti6O3lkObFR9Opq8rc6sBB/v3kj/rb/PXi/Om0wB2/jh10/WQQTtumxCaGsekocMI2758QmixfZiNxbi28ixxpoIIC91NCmtZC+RXyiobCkFpsuX/2TIrEAz5IubOHNK3Hkxg897NIJuGIrHptGjSIuubPLUS9STNaVWpapTzFWsP1tM5UpUadaYW82U1bA05dhHa4V+JXg2RVoPc721RVGXQ96PkMTetbAX7t9EST8EFtzV69sLh9PFlbu4Z2SNff0OVps43GXChd1OphzNaWNsPEl+xotS8umKj9mOdvwadGcrqUnXlhAbciDbt3Gv1j0QoEfVmbUMRfvbtUqmm82+7NDaOEjDYSdaDBEayPV1wmlxz8dd88jwvnOTP48+vfr17Nu7fw8/vnz4BQAAIfkECRQAAQAsAAAAAIAAgAAAAv6Mj6nL7Q+jnLTai7PevPsPhuJIluaJpurKtu4Lx/IG1PaMc/a+537FC9Z+xIfwWEwmjkylkgl1FqFN6Y9atc6wWW2Mi/TKwELxmMwzf9E99YvddrvgQ/kcbofh828yf431FxK2ECjowcVAeKgDxsjC9phCJ2lCV1c5eImZ2bEZ16nxmRaaMRpUenFaljqxutja8NoVqzAbVWt7i5trsJuYOxuAVivsS1xqfBDZqYxAKfkquyko7TDKtxpxasctge3m7foZTq56KUdtCq2G3ojcvofomC4PQpVtr0ma594ryu4fBn8CB+orCOQgwnHMYuH7ppAGLxQRn1WkcFGiuv5p8Axu9GRNUcOE2t450+UH4y6AvwBcSwmx5bmWnFAa2kazJoScoGxOfMnTZUxgPn8uuQkUqUV6RpQmpXXUaFFWOB9yhFoV6zKpS7U+hRUVLEOvw8g6HUt1as+ZadXq7IpKo1ircuMW8srVAt1jYte1hcvP7T1aeT3+5Xu4bGKWacn6tRsWMuAbIrr0BXlYquPH/DZzXqs482WTpEZjDrx17uJ5cU2TXmvUM+MesmdTnnw7NeoRGU/Dhur69V4SYGOv/tCxRHHgx1kTtfTXuGTiMKFPl76bd3Xl0ZlP187U+m7soCtvp37de3bz4bmnX/6dfXvw49WXH1wmuO3ciK/fx0fOin6fvaVZc3VRVhtboBX4n29tJEhSfH1BqBJVFGa1Xn9CiWSgXosUZliGEYoYImoXfnXfiCR62J2AO53IYYcYZgfiUDLOuCKO/OnmoltvHZjjVZed9WKNJTYo5HHPFQmjjin6uONdRPJo5ICmzZckTRQF9WOWK00SlIK33CHTkeK0UOZ+H5FZknMEnWGOfOf5EJB7VeKw5EJ67slnn37+CWiggg5KaKGGMlIAACH5BAkUAAEALAAAAACAAIAAAAL+jI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8cyBNT2jHP2vud+xQvefsSG8AgoKhFI5HLZPD6LUefUV5Vec1nhFtfVfmFh75hc5p3R6do61na/X/HknJ6+s8P6fbUPlwUo8zc4I2aYqLjI2Ehk5rhSGGlSRilSd+lRJ6eZwdnjCQQaJCpBimi6gNqkqsAq6GoAG6tKy2d6aymqi6vZu3sJ7BuZN0sr3JWgSzm5zOwYxTAc3bpKzSh9ja2o/To8ZOj9DB7eN34AGtAGiH6cyXnnvp75Hj82f5+u/pVfz8TviruAAPU9GWiwYJwtCBc6+HfQmkJjD9gJtELOYoTpYFMw7oO40VlHSBMpjiLZL9Q3hxtUZgMpa0LCmCFh0qw48+ZDgjp3kuqJExXQaciGZmRltKTQpPSgGf3DsmcsjVLHUb0p0iTWhsqqSlTq8Y1LCrWOfj0zj+hZs6lSElsZFm5chjBFbpt7sZw5I2vz6rVDo+/Iv4CDtqX795TgwXoV4/XLLfBjyL1kLkbrtObhdj/JXhanVTPKX5/5TvZUGENappI3szY8+nXr2LJ9uq59lzbu3KV2i+7tGzbw4KZvE29qnPjq48h1M19+HLry0sGlV6d+3Tnz5mO3y+3kvWL48eTLmz8PoQAAIfkECRQAAQAsAAAAAIAAgAAAAv6Mj6nL7Q+jnLTai7PevPsPhuJIluaJpurKtu4Lx/JM1/aN5/rO9/4PDAqHQ4DRWDseiQalc8l6PoXSKgBllQKz1RJX2/taRWLwrjz2oM25dbfjdvLibAxdrrvXK3pou49nAeiHM6h0YXiVl4jEZxjG6Dj4EzmRSARo+cgUoCdxydlEFwEa2jn6UGp66gYxuYqA2vAKeyDL0FercLtwp9sb5+D7uxs820oMjHz8lSxs/PzmHL32STjNDI0Nl7vNseltpxquWUluzdh4npp+uJ7drv4eGz81b1u/R56fts6f5e8fwHACm20rKAYbwjLOulFD03BZOYYRDYqzOI3Lt/aB++x98HgvpMiRJEuaPIkypcqKIDVw3NDPBUREMwVRTDEMnUR22khk4ukJKK+P4/AVFQWO28KlP2EyferwItSpPSVRvXqTJtatGjNw/RrTZldltBKYKzZWa1iyQ9EGfdhSbFx4NUm1xSXNZSAK1dRinCjvxlqpc1caPow4seLFjBs7hqTP7169kXFm5VsXc0IVb13dxVs1RFO6oc1GBXGW3lFWZTeCBav0NWzKsl/Trv31Nu6tundf7V2Y9WjVrYkPBhzcaGfQy9kmt1vZbV+d0z1HB0w4rebNVgPbOC73+ePx5MubP48+vfr17Nu7fw8/vvzGBQAAIfkECRQAAQAsAAAAAIAAgAAAAv6Mj6nL7Q+jnLTai7PevPsPhuJIluaJphPAAuoLI+3cxrZJ5+7Ne/q/6wkvQN3wSCn+kEyHEtiMJp5LqZVqtEaxVS2Sm/UewTnxlzwzn9HqNbk9RgfhPTY9jr27n3omv99UBKiVNmh4iJiouMjY6FhX9hijJJnCVVnyhhkit/khx+LJARoqmkFaY0qEOqcqwVrq+gobK+tEW2u7gJuqu8ub62sA3Cs8TBxsi1wovMys7PysGh05TV29eQ1Vqf2H2N35jXyMKg4sw3o4jl5ueK4Aq07bEO+efts+eI9PKp/PUM/eP3j7BPYDWFDcAU0EBzZiyO4gNzC/JE681DBcNvCKGSFi8kgO5MU8HUmaEmnHGsYpHF2hXOmyZURKul7S/JjM5raRrUJSqdjlUZiZ3ohKY7TTqKCSyRTdVJp0ITakRaXCtNrUXFWsWwMUo3qV69OFkjSyNLnRLNShZR36HPsw4NmfQuchROs07Aq9+vjuxdsX8CrBd2RuMFzYLwbEbRiPcutH8WHIQxx/ogyJ7omEeOBmwmxDswrOmaOOBv3C82mLQkzDkNt6amjYpXvOpm1srcjcXnnxZopa1rrfvd8RL47ruNjg0HATd36ceW5Qyh+krE5PMva3Qbfz6+79O43wSdiShyD7PPqv6tsbKgAAOw==",newYearsRunning=""+new URL("../media/fireworks.B4d-_KUe.gif",import.meta.url).href;var ConnectionState;(function(tt){tt.CONNECTED="CONNECTED",tt.DISCONNECTED_FOREVER="DISCONNECTED_FOREVER",tt.INITIAL="INITIAL",tt.PINGING_SERVER="PINGING_SERVER",tt.CONNECTING="CONNECTING"})(ConnectionState||(ConnectionState={}));const StyledConnectionStatus=newStyled("div",{target:"emoooxk0"})(({theme:tt})=>({display:"flex",alignItems:"center",justifyContent:"center",color:tt.colors.gray})),StyledConnectionStatusLabel=newStyled("label",{target:"emoooxk1"})(({isMinimized:tt,theme:nt})=>({fontSize:nt.fontSizes.sm,color:nt.colors.gray,textTransform:"uppercase",marginTop:nt.spacing.none,marginRight:tt?nt.spacing.none:nt.spacing.lg,marginBottom:nt.spacing.none,marginLeft:nt.spacing.sm,whiteSpace:"nowrap",maxWidth:tt?"0":nt.sizes.appStatusMaxWidth,transition:"opacity 500ms 0ms, clip 500ms 0ms, max-width 500ms 0ms, margin 500ms 0ms, visibility 0ms 500ms",opacity:tt?0:1,visibility:tt?"hidden":"visible",lineHeight:nt.lineHeights.none})),StyledAppStatus=newStyled("div",{target:"emoooxk2"})(({theme:tt})=>({display:"flex",alignItems:"center",justifyContent:"center",borderRadius:tt.radii.md,margin:`0 ${tt.spacing.sm} 0 0`,paddingLeft:tt.spacing.sm,height:tt.sizes.appRunningMen})),minimizedStyles=tt=>({opacity:0,padding:tt.spacing.none,margin:tt.spacing.none,maxWidth:0,minWidth:0,border:0}),StyledAppStatusLabel=newStyled("label",{target:"emoooxk3"})(({isPrompt:tt,isMinimized:nt,theme:et})=>({fontSize:et.fontSizes.sm,color:tt?et.colors.bodyText:et.colors.gray,textTransform:tt?"none":"uppercase",margin:`0 0 0 ${et.spacing.lg}`,whiteSpace:"nowrap",maxWidth:et.sizes.appStatusMaxWidth,borderRadius:tt?et.radii.md:void 0,transition:`opacity 200ms ease-out 0s,
|
743
743
|
clip 200ms ease-out 0s, min-width 200ms ease-out 0s,
|
744
744
|
max-width 200ms ease-out 0s, padding 200ms ease-out 0s`,...nt?minimizedStyles(et):{}})),StyledAppButtonContainer=newStyled("span",{target:"emoooxk4"})(({isMinimized:tt,theme:nt})=>({marginLeft:nt.spacing.sm,whiteSpace:"nowrap",transition:`opacity 200ms ease-out 0s,
|
745
745
|
clip 200ms ease-out 0s, min-width 200ms ease-out 0s,
|
746
|
-
max-width 200ms ease-out 0s, padding 200ms ease-out 0s`,...tt?minimizedStyles(nt):{}})),StyledAppRunningIcon=newStyled("img",{target:"emoooxk5"})(({isNewYears:tt,theme:nt})=>{const et=hasLightBackgroundColor(nt)?"":"invert(1)";return{opacity:tt?1:.4,width:tt?"2.2rem":nt.sizes.appRunningMen,height:tt?"2.2rem":nt.sizes.appRunningMen,marginRight:`-${nt.spacing.sm}`,filter:tt?"":et}}),StyledStatusWidget=newStyled("div",{target:"emoooxk6"})({"&.StatusWidget-appear":{opacity:0},"&.StatusWidget-appear-active":{opacity:1,transition:"opacity 200ms ease-out"},"&.StatusWidget-enter":{opacity:0},"&.StatusWidget-enter-active":{opacity:1,transition:"opacity 200ms ease-out"},"&.StatusWidget-exit":{opacity:1},"&.StatusWidget-exit-active":{opacity:0,transition:"opacity 200ms ease-out"}}),StyledShortcutLabel=newStyled("div",{target:"emoooxk7"})({"&::first-letter":{textDecoration:"underline"}}),PROMPT_DISPLAY_INITIAL_TIMEOUT_MS=15*1e3,PROMPT_DISPLAY_HOVER_TIMEOUT_MS=1*1e3,RUNNING_MAN_DISPLAY_DELAY_TIME_MS=500,PromptButton=tt=>jsx$1(StyledAppButtonContainer,{isMinimized:tt.isMinimized,children:jsx$1(BaseButton,{kind:BaseButtonKind.HEADER_BUTTON,disabled:tt.disabled,fluidWidth:!0,onClick:tt.onClick,children:tt.title})}),StatusWidget=({connectionState:tt,sessionEventDispatcher:nt,scriptRunState:et,rerunScript:rt,stopScript:ot,allowRunOnSave:at})=>{const st=reactExports.useCallback(()=>window.scrollY>32,[]),[ut,ct]=reactExports.useState(st()),[pt,dt]=reactExports.useState(!1),[ft,bt]=reactExports.useState(!1),[ht,Mt]=reactExports.useState(!1),[mt,Ot]=reactExports.useState(!1),zt=reactExports.useRef(null),yt=reactExports.useRef(null),vt=reactExports.useRef(),At=useTheme(),St=()=>{at&&rt(!0)},Et=r0=>{r0==="a"&&St()},Tt=tt===ConnectionState.CONNECTED,Rt=reactExports.useCallback(r0=>{zt.current!==null&&r0>zt.current.remainingTime&&zt.current.setTimeout(()=>{bt(!0)},r0)},[]),Ct=reactExports.useCallback(r0=>{r0.type==="scriptChangedOnDisk"&&(dt(!0),bt(!1),Rt(PROMPT_DISPLAY_INITIAL_TIMEOUT_MS))},[Rt]),wt=reactExports.useCallback(r0=>{yt.current!==null&&yt.current.setTimeout(()=>{Ot(!0)},r0)},[]),Ft=reactExports.useCallback(()=>{ct(st())},[st]),Ht=()=>{Mt(!0)},jt=()=>{Mt(!1),bt(!1),Rt(PROMPT_DISPLAY_HOVER_TIMEOUT_MS)},s0=()=>{ot()},Ut=()=>{rt(!1)},Yt=()=>{const r0=new Date,l0=r0.getMonth(),f0=r0.getDate();return l0===11&&f0===31||l0===0&&f0<=6};function O0(r0){switch(r0){case ConnectionState.INITIAL:case ConnectionState.PINGING_SERVER:case ConnectionState.CONNECTING:return{icon:Ellipses,label:"Connecting",tooltip:"Connecting to Streamlit server"};case ConnectionState.CONNECTED:return;case ConnectionState.DISCONNECTED_FOREVER:default:return{icon:Warning,label:"Error",tooltip:"Unable to connect to Streamlit server"}}}reactExports.useEffect(()=>(vt.current=nt.onSessionEvent.connect(Ct),()=>{vt.current!==void 0&&(vt.current.disconnect(),vt.current=void 0)}),[Ct,nt.onSessionEvent]),reactExports.useEffect(()=>{zt.current===null&&(zt.current=new Timer),yt.current===null&&(yt.current=new Timer);const r0=zt.current,l0=zt.current;return()=>{r0.cancel(),l0.cancel()}},[]),reactExports.useEffect(()=>(window.addEventListener("scroll",Ft),()=>{window.removeEventListener("scroll",Ft)}),[Ft]),reactExports.useEffect(()=>{et===ScriptRunState.RUNNING&&(dt(!1),Mt(!1))},[et]),reactExports.useEffect(()=>{Tt&&(et===ScriptRunState.RUNNING||et===ScriptRunState.RERUN_REQUESTED)&&wt(RUNNING_MAN_DISPLAY_DELAY_TIME_MS),et===ScriptRunState.NOT_RUNNING&&Ot(!1)},[et,wt,Tt]);const a0=()=>{const r0=ut,l0=et===ScriptRunState.STOP_REQUESTED,f0=Yt(),$t=jsx$1(StyledAppRunningIcon,{isNewYears:f0,src:f0?newYearsRunning:iconRunning,alt:"Running..."});return mt?jsxs(StyledAppStatus,{children:[r0?jsx$1(Tooltip,{placement:Placement.BOTTOM,content:"This script is currently running",children:$t}):$t,jsx$1(StyledAppStatusLabel,{isMinimized:ut,isPrompt:!1,children:"Running..."}),jsx$1(PromptButton,{isMinimized:ut,title:l0?"Stopping...":"Stop",disabled:l0,onClick:s0})]}):jsx$1(Fragment,{})},b0=()=>{const r0=et===ScriptRunState.RERUN_REQUESTED,l0=ft&&!ht,{colors:f0}=At;return jsx$1(ReactHotkeys,{keyName:"a",onKeyDown:Et,children:jsx$1("div",{onMouseEnter:Ht,onMouseLeave:jt,children:jsxs(StyledAppStatus,{children:[jsx$1(Icon$2,{content:Info,margin:"0 sm 0 0",color:f0.bodyText}),jsx$1(StyledAppStatusLabel,{isMinimized:l0,isPrompt:!0,children:"Source file changed."}),jsx$1(PromptButton,{isMinimized:l0,title:jsx$1(StyledShortcutLabel,{children:"Rerun"}),disabled:r0,onClick:Ut}),at&&jsx$1(PromptButton,{isMinimized:l0,title:jsx$1(StyledShortcutLabel,{children:"Always rerun"}),disabled:r0,onClick:St})]})})})},kt=()=>{const r0=O0(tt);return r0===void 0?null:jsx$1(Tooltip,{content:r0.tooltip,placement:Placement.BOTTOM,children:jsxs(StyledConnectionStatus,{className:"stConnectionStatus","data-testid":"stConnectionStatus",children:[jsx$1(Icon$2,{size:"sm",content:r0.icon}),jsx$1(StyledConnectionStatusLabel,{isMinimized:ut,children:r0.label})]})})},o0=()=>{if(Tt){if(et===ScriptRunState.RUNNING||et===ScriptRunState.RERUN_REQUESTED)return a0();if(pt)return b0()}return kt()},qt=reactExports.useRef(),Dt=qt.current;if(qt.current=o0(),isNullOrUndefined$1(qt.current)&&isNullOrUndefined$1(Dt))return jsx$1(Fragment,{});let Bt,p0;return notNullOrUndefined(qt.current)?(Bt=!0,p0=qt.current):(Bt=!1,p0=Dt),jsx$1(CSSTransition,{appear:!0,in:Bt,timeout:200,unmountOnExit:!0,classNames:"StatusWidget",children:jsx$1(StyledStatusWidget,{className:"stStatusWidget","data-testid":"stStatusWidget",children:p0},"StatusWidget")})};var MoreVert=reactExports.forwardRef(function(tt,nt){var et={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return reactExports.createElement(EmotionIconBase,_extends$Q({iconAttrs:et,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},tt,{ref:nt}),reactExports.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),reactExports.createElement("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}))});MoreVert.displayName="MoreVert";const BLOB_TYPE="video/webm";class ScreenCastRecorder{static isSupportedBrowser(){try{return notNullOrUndefined(navigator.mediaDevices)&¬NullOrUndefined(navigator.mediaDevices.getUserMedia)&¬NullOrUndefined(navigator.mediaDevices.getDisplayMedia)&&MediaRecorder.isTypeSupported(BLOB_TYPE)}catch{return!1}}constructor({recordAudio:nt,onErrorOrStop:et}){this.recordAudio=nt,this.onErrorOrStopCallback=et,this.inputStream=null,this.recordedChunks=[],this.mediaRecorder=null}async initialize(){let et=(await navigator.mediaDevices.getDisplayMedia({video:!0})).getTracks();if(this.recordAudio){const rt=await navigator.mediaDevices.getUserMedia({video:!1,audio:!0});et=et.concat(rt.getAudioTracks())}this.recordedChunks=[],this.inputStream=new MediaStream(et),this.mediaRecorder=new MediaRecorder(this.inputStream,{mimeType:BLOB_TYPE}),this.mediaRecorder.ondataavailable=rt=>this.recordedChunks.push(rt.data)}getState(){return this.mediaRecorder?this.mediaRecorder.state:"inactive"}start(){if(!this.mediaRecorder)return!1;this.mediaRecorder.onerror=nt=>{this.onErrorOrStopCallback()},this.mediaRecorder.onstop=()=>this.onErrorOrStopCallback();try{this.mediaRecorder.start()}catch{return!1}return!0}stop(){if(!this.mediaRecorder)return;let nt;const et=new Promise(rt=>{nt=rt});return this.mediaRecorder.onstop=()=>nt(),this.mediaRecorder.stop(),this.inputStream&&(this.inputStream.getTracks().forEach(rt=>rt.stop()),this.inputStream=null),et.then(()=>this.buildOutputBlob())}buildOutputBlob(){return new Blob(this.recordedChunks,{type:BLOB_TYPE})}}const recordingIndicatorPulse=tt=>keyframes("0%{box-shadow:0 0 ",tt.spacing.twoXS," ",tt.colors.red,";}50%{box-shadow:0 0 ",tt.spacing.sm," ",tt.spacing.twoXS," ",tt.colors.red,";}100%{box-shadow:0 0 ",tt.spacing.twoXS," ",tt.colors.red,";}"),StyledRecordingIndicator=newStyled("div",{target:"ev04twb0"})(({theme:tt})=>({position:"absolute",bottom:tt.spacing.lg,right:tt.spacing.sm,width:tt.spacing.sm,height:tt.spacing.sm,backgroundColor:tt.colors.red,borderRadius:tt.radii.full,boxShadow:`0 0 ${tt.spacing.twoXS} ${tt.colors.red}`,animation:`${recordingIndicatorPulse(tt)} 2s linear infinite`})),StyledMenuDivider=newStyled("div",{target:"ev04twb1"})(({theme:tt})=>({borderTop:`${tt.sizes.borderWidth} solid ${tt.colors.borderColor}`,margin:`${tt.spacing.sm} ${tt.spacing.none}`})),StyledMenuItemShortcut=newStyled("span",{target:"ev04twb2"})(({isRecording:tt,theme:nt})=>({color:tt?nt.colors.red:nt.colors.fadedText60,fontSize:nt.fontSizes.sm,marginTop:nt.spacing.twoXS,fontVariant:"small-caps",textTransform:"uppercase"})),StyledMenuItem=newStyled("ul",{target:"ev04twb3"})(({isDisabled:tt,isRecording:nt,theme:et})=>{const rt=tt?{backgroundColor:et.colors.transparent,color:et.colors.fadedText60,cursor:"not-allowed"}:{"&:focus":{backgroundColor:et.colors.primary,color:et.colors.white}},ot=nt&&{color:et.colors.red,fontWeight:et.fontWeights.bold};return{display:"block",flexDirection:"row",alignItems:"flex-start",padding:et.spacing.none,cursor:"pointer",...ot||{},...rt,"@media print":{display:"none !important"}}}),StyledCoreItem=newStyled("li",{target:"ev04twb4"})(({isHighlighted:tt,styleProps:nt,theme:et})=>{const rt=tt&&{"&:hover":{backgroundColor:et.colors.secondaryBg}},ot=(nt==null?void 0:nt.margin)||0,at=(nt==null?void 0:nt.padding)||`${et.spacing.twoXS} ${et.spacing.twoXL}`,st=(nt==null?void 0:nt.backgroundColor)||et.colors.primaryBg,ut=(nt==null?void 0:nt.fontSize)||et.fontSizes.md;return{margin:ot,padding:at,backgroundColor:st,fontSize:ut,...rt||{},display:"block"}}),StyledDevItem=newStyled("li",{target:"ev04twb5"})(({isHighlighted:tt,styleProps:nt,theme:et})=>{const rt=tt&&{"&:hover":{backgroundColor:transparentize(et.colors.secondaryBg,1)}},ot=(nt==null?void 0:nt.margin)||0,at=(nt==null?void 0:nt.padding)||`${et.spacing.twoXS} ${et.spacing.twoXL}`,st=(nt==null?void 0:nt.backgroundColor)||et.colors.secondaryBg,ut=(nt==null?void 0:nt.fontSize)||et.fontSizes.md;return{margin:ot,padding:at,backgroundColor:st,fontSize:ut,...rt||{},display:"block"}}),StyledMenuItemLabel=newStyled("span",{target:"ev04twb6"})(({theme:tt})=>({marginRight:tt.spacing.md,flexGrow:1,fontFamily:tt.fonts.sansSerif})),StyledMenuContainer=newStyled("div",{target:"ev04twb7"})(({theme:tt})=>({ul:{borderRadius:tt.radii.default},"& > ul[role=listbox]:not(:last-child)":{borderBottomLeftRadius:0,borderBottomRightRadius:0},"ul[role=listbox] ~ ul[role=listbox]":{borderTopLeftRadius:0,borderTopRightRadius:0,boxShadow:"none",borderTop:"none"},"@media print":{display:"none"}})),StyledMainMenuContainer=newStyled("span",{target:"ev04twb8"})({lineHeight:"initial"}),SCREENCAST_LABEL={COUNTDOWN:"Cancel screencast",RECORDING:"Stop recording"},getOpenInWindowCallback=tt=>()=>{window.open(tt,"_blank")},isLocalhost=()=>window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1";function buildMenuItemComponent(tt,nt){const et=reactExports.forwardRef(({item:rt,"aria-selected":ot,onClick:at,onMouseEnter:st,$disabled:ut,$isHighlighted:ct},pt)=>{const{label:dt,shortcut:ft,hasDividerAbove:bt,styleProps:ht,noHighlight:Mt,interactions:mt}=rt,Ot={isDisabled:ut,isRecording:!!rt.stopRecordingIndicator};return jsxs(Fragment,{children:[bt&&jsx$1(StyledMenuDivider,{"data-testid":"stMainMenuDivider"}),jsx$1(StyledMenuItem,{ref:pt,role:"option","aria-selected":ot,"aria-disabled":ut,...Ot,...mt||(ut?{}:{onClick:vt=>{nt.enqueue("menuClick",{label:dt}),at(vt)},onMouseEnter:st}),children:jsxs(tt,{...{isHighlighted:!Mt&&ct,styleProps:ht},children:[jsx$1(StyledMenuItemLabel,{...Ot,children:dt}),ft&&jsx$1(StyledMenuItemShortcut,{...Ot,children:ft})]})})]})});return et.displayName="MenuItem",et}const SubMenu=tt=>{const{colors:nt,sizes:et,spacing:rt}=useTheme(),ot=tt.isDevMenu?StyledDevItem:StyledCoreItem;return jsx$1(StatefulMenu,{items:tt.menuItems,onItemSelect:({item:at})=>{at.onClick(),tt.closeMenu()},overrides:{Option:buildMenuItemComponent(ot,tt.metricsMgr),List:{props:{"data-testid":"stMainMenuList"},style:{backgroundColor:"inherit",borderBottomRadius:0,borderTopRadius:0,borderLeftRadius:0,borderRightRadius:0,paddingBottom:rt.sm,paddingTop:rt.sm,":focus":{outline:"none"},border:`${et.borderWidth} solid ${nt.borderColor}`}}}})};function getDevMenuItems(tt,nt){const et=[],rt=[nt.developerOptions,nt.clearCache];let ot=null;for(const at of rt)at&&(at!==nt.DIVIDER&&(ot===nt.DIVIDER?et.push({...at,hasDividerAbove:!0}):et.push(at)),ot=at);return notNullOrUndefined(ot)&&(ot.styleProps={margin:`0 0 -${tt.spacing.sm} 0`,padding:`${tt.spacing.twoXS} ${tt.spacing.none} ${tt.spacing.twoXS} ${tt.spacing.twoXL}`}),et}function getPreferredMenuOrder(tt,nt,et){let rt;if(tt.toolbarMode==Config.ToolbarMode.MINIMAL){for(rt=[et.report,et.community,et.DIVIDER,...nt.length>0?nt:[et.DIVIDER],et.about],rt=rt.filter(ot=>ot);rt.length>0&&rt[0]==et.DIVIDER;)rt.shift();for(;rt.length>0&&rt.at(rt.length-1)==et.DIVIDER;)rt.pop();return rt}return[et.rerun,et.settings,et.DIVIDER,et.print,...ScreenCastRecorder.isSupportedBrowser()?[et.recordScreencast]:[],et.DIVIDER,et.report,et.community,...nt.length>0?nt:[et.DIVIDER],et.about]}function MainMenu(tt){var ft,bt,ht,Mt,mt,Ot,zt;const nt=useTheme(),et=!tt.isServerConnected,rt=tt.toolbarMode!=Config.ToolbarMode.MINIMAL||tt.toolbarMode==Config.ToolbarMode.MINIMAL&&((ft=tt.menuItems)==null?void 0:ft.aboutSectionMd),ot={DIVIDER:{isDivider:!0},rerun:{disabled:et,onClick:tt.quickRerunCallback,label:"Rerun",shortcut:"r"},print:{onClick:tt.printCallback,label:"Print"},recordScreencast:{onClick:tt.screencastCallback,label:SCREENCAST_LABEL[tt.screenCastState]||"Record a screencast",shortcut:SCREENCAST_LABEL[tt.screenCastState]?"esc":"",stopRecordingIndicator:!!SCREENCAST_LABEL[tt.screenCastState]},saveSnapshot:{disabled:et,label:"Save a snapshot"},...!((bt=tt.menuItems)!=null&&bt.hideGetHelp)&&((ht=tt.menuItems)==null?void 0:ht.getHelpUrl)&&{community:{onClick:getOpenInWindowCallback((Mt=tt.menuItems)==null?void 0:Mt.getHelpUrl),label:"Get help"}},...!((mt=tt.menuItems)!=null&&mt.hideReportABug)&&((Ot=tt.menuItems)==null?void 0:Ot.reportABugUrl)&&{report:{onClick:getOpenInWindowCallback((zt=tt.menuItems)==null?void 0:zt.reportABugUrl),label:"Report a bug"}},settings:{onClick:tt.settingsCallback,label:"Settings"},...rt&&{about:{onClick:tt.aboutCallback,label:"About"}}},at={DIVIDER:{isDivider:!0},developerOptions:{label:"Developer options",noHighlight:!0,interactions:{},styleProps:{fontSize:nt.fontSizes.twoSmPx,margin:`-${nt.spacing.sm} 0 0 0`,padding:`${nt.spacing.twoXS} ${nt.spacing.none} ${nt.spacing.twoXS} ${nt.spacing.twoXL}`,pointerEvents:"none"}},clearCache:{disabled:et,onClick:tt.clearCacheCallback,label:"Clear cache",shortcut:"c"}},st=tt.hostMenuItems.map(yt=>{var vt,At;return yt.type==="separator"?ot.DIVIDER:yt.key==="reportBug"&&((vt=tt.menuItems)!=null&&vt.hideGetHelp)||yt.key==="about"&&((At=tt.menuItems)==null?void 0:At.aboutSectionMd)!==""?null:{onClick:()=>tt.sendMessageToHost({type:"MENU_ITEM_CALLBACK",key:yt.key}),label:yt.label}},[]),ut=getPreferredMenuOrder(tt,st,ot),ct=[];let pt=null;for(const yt of ut)yt&&(yt!==ot.DIVIDER&&(pt===ot.DIVIDER?ct.push({...yt,hasDividerAbove:!0}):ct.push(yt)),pt=yt);const dt=tt.developmentMode?getDevMenuItems(nt,at):[];return ct.length==0&&dt.length==0?jsx$1(Fragment,{}):jsx$1(StatefulPopover,{focusLock:!0,placement:PLACEMENT.bottomRight,content:({close:yt})=>jsxs(StyledMenuContainer,{children:[ct.length!=0&&jsx$1(SubMenu,{menuItems:ct,closeMenu:yt,isDevMenu:!1,metricsMgr:tt.metricsMgr}),dt.length!=0&&jsx$1(SubMenu,{menuItems:dt,closeMenu:yt,isDevMenu:!0,metricsMgr:tt.metricsMgr})]}),overrides:{Body:{props:{"data-testid":"stMainMenuPopover",className:"stMainMenuPopover"}}},children:jsxs(StyledMainMenuContainer,{id:"MainMenu",className:"stMainMenu","data-testid":"stMainMenu",children:[jsx$1(BaseButton,{kind:BaseButtonKind.HEADER_NO_PADDING,children:jsx$1(Icon$2,{content:MoreVert,size:"lg"})}),tt.screenCastState==="RECORDING"&&jsx$1(StyledRecordingIndicator,{})]})})}const MainMenu$1=reactExports.memo(MainMenu),StyledActionButtonContainer=newStyled("div",{target:"e1i26tt70"})(({theme:tt})=>({display:"flex",gap:tt.spacing.sm,alignItems:"center",lineHeight:tt.iconSizes.md})),StyledActionButtonIcon=newStyled("div",{target:"e1i26tt71"})(({theme:tt,icon:nt})=>({background:`url("${nt}") no-repeat center / contain`,width:tt.iconSizes.base,height:tt.iconSizes.base})),StyledToolbarActions=newStyled("div",{target:"e1i26tt72"})(({})=>({display:"flex",alignItems:"center",flexDirection:"row"}));function ActionButton({label:tt,icon:nt,onClick:et}){return jsx$1("div",{className:"stToolbarActionButton","data-testid":"stToolbarActionButton",children:jsx$1(BaseButton,{onClick:et,kind:BaseButtonKind.HEADER_BUTTON,children:jsxs(StyledActionButtonContainer,{children:[nt&&jsx$1(StyledActionButtonIcon,{"data-testid":"stToolbarActionButtonIcon",icon:nt}),tt&&jsx$1("span",{"data-testid":"stToolbarActionButtonLabel",children:tt})]})})})}function ToolbarActions({sendMessageToHost:tt,hostToolbarItems:nt,metricsMgr:et}){return jsx$1(StyledToolbarActions,{className:"stToolbarActions","data-testid":"stToolbarActions",children:nt.map(({key:rt,label:ot,icon:at})=>jsx$1(ActionButton,{label:ot,icon:at,onClick:()=>{et.enqueue("menuClick",{label:rt}),tt({type:"TOOLBAR_ITEM_CALLBACK",key:rt})}},rt))})}const DeployButtonContainer=newStyled("div",{target:"e17qgqm80"})(({theme:tt})=>({display:"flex",gap:tt.spacing.sm,alignItems:"center",lineHeight:tt.iconSizes.md})),DeployButton=({onClick:tt})=>jsx$1("div",{className:"stAppDeployButton","data-testid":"stAppDeployButton",children:jsx$1(BaseButton,{kind:BaseButtonKind.HEADER_BUTTON,onClick:tt,children:jsx$1(DeployButtonContainer,{children:jsx$1("span",{children:"Deploy"})})})}),StyledHeader$2=newStyled("header",{target:"e4hpqof0"})(({showHeader:tt,theme:nt})=>({position:"fixed",top:nt.spacing.none,left:nt.spacing.none,right:nt.spacing.none,height:nt.sizes.headerHeight,background:nt.colors.bgColor,outline:"none",zIndex:nt.zIndices.header,display:tt?"block":"none","@media print":{display:"none"}})),StyledHeaderDecoration=newStyled("div",{target:"e4hpqof1"})(({theme:tt})=>({position:"absolute",top:tt.spacing.none,right:tt.spacing.none,left:tt.spacing.none,height:tt.sizes.headerDecorationHeight,backgroundImage:`linear-gradient(90deg, ${tt.colors.red70}, #fffd80)`,zIndex:tt.zIndices.header})),StyledHeaderToolbar=newStyled("div",{target:"e4hpqof2"})(({theme:tt})=>({position:"absolute",top:tt.spacing.xl,right:tt.spacing.xl,display:"flex",flexDirection:"row",alignItems:"center"}));function Header({isStale:tt,children:nt}){const{wideMode:et,embedded:rt,showToolbar:ot,showColoredLine:at}=React$1.useContext(AppContext);let st=!0;return rt&&(st=ot||at),jsxs(StyledHeader$2,{showHeader:st,isWideMode:et,tabIndex:-1,isStale:tt,className:"stAppHeader","data-testid":"stHeader",children:[at&&jsx$1(StyledHeaderDecoration,{className:"stDecoration","data-testid":"stDecoration",id:"stDecoration"}),ot&&jsx$1(StyledHeaderToolbar,{className:"stAppToolbar","data-testid":"stToolbar",children:nt})]})}const STREAMLIT_HOME_URL="https://streamlit.io",DEPLOY_URL="https://share.streamlit.io/deploy",STREAMLIT_CLOUD_URL="https://streamlit.io/cloud",STREAMLIT_COMMUNITY_CLOUD_DOCS_URL="https://share.streamlit.io/cloud-getting-started",STREAMLIT_DEPLOY_TUTORIAL_URL="https://share.streamlit.io/deployment-tutorial",SNOWFLAKE_LEARN_MORE_URL="https://share.streamlit.io/sis-about",SNOWFLAKE_TRIAL_URL="https://share.streamlit.io/snowflake-trial",StyledBackButton=newStyled(ChevronLeft$1,{target:"e4y1h9e1"})(({theme:tt})=>({cursor:"pointer",marginRight:tt.spacing.lg})),StyledDialogBody=newStyled("div",{target:"e4y1h9e2"})(({theme:tt})=>({display:"grid",gap:tt.spacing.twoXL,gridTemplateColumns:"1fr 1fr",margin:0,padding:0})),StyledFullRow=newStyled("div",{target:"e4y1h9e3"})(({theme:tt})=>({gridColumnStart:1,gridColumnEnd:-1,display:"grid",gap:tt.spacing.xs})),StyledHeader$1=newStyled("h2",{target:"e4y1h9e4"})(({theme:tt})=>({paddingBottom:0,paddingTop:0,marginBottom:tt.spacing.md,marginTop:"0",fontWeight:tt.fontWeights.bold,fontSize:tt.fontSizes.md,lineHeight:tt.lineHeights.tight,color:tt.colors.bodyText,display:"grid",gridAutoFlow:"row",gap:tt.spacing.xs,"&:first-of-type":{marginTop:0}})),StyledLabel=newStyled("label",{target:"e4y1h9e5"})(({theme:tt})=>({paddingBottom:0,paddingTop:0,marginBottom:0,marginTop:0,lineHeight:tt.lineHeights.tight,fontSize:tt.fontSizes.sm})),StyledButtonContainer=newStyled("div",{target:"e4y1h9e7"})(({theme:tt})=>({marginTop:tt.spacing.md})),StyledCheckbox=newStyled("input",{target:"e4y1h9e8"})(({theme:tt})=>({marginRight:tt.spacing.xs,appearance:"none",border:`${tt.sizes.borderWidth} solid ${tt.colors.borderColor}`,width:tt.fontSizes.md,height:tt.fontSizes.md,borderRadius:tt.radii.md,display:"inline-flex",alignItems:"center",justifyContent:"center",padding:0,verticalAlign:"middle",overflow:"hidden","&:focus-visible":{outline:`2px solid ${tt.colors.primary}`},"&:checked":{backgroundColor:tt.colors.primary,"&:after":{content:'"✓"',fontFamily:tt.fonts.monospace,fontSize:tt.fontSizes.md,color:tt.colors.white,lineHeight:tt.lineHeights.none}},"&:disabled":{backgroundColor:tt.colors.secondaryBg}})),StyledDeployErrorContent=newStyled("div",{target:"e4y1h9e9"})(({theme:tt})=>({"& > ul":{paddingLeft:tt.spacing.twoXL}})),StyledAboutInfo=newStyled("div",{target:"e4y1h9e10"})(({theme:tt})=>({padding:`0 0 ${tt.spacing.lg} 0`,overflowY:"scroll"})),StyledAboutLink=newStyled("a",{target:"e4y1h9e11"})(({theme:tt})=>({color:`${tt.colors.linkText} !important`,"&:hover":{color:`${darken(tt.colors.linkText,.15)} !important`}})),ThemeCreatorButton=({openThemeCreator:tt})=>jsx$1(StyledButtonContainer,{"data-testid":"edit-theme",children:jsx$1(BaseButton,{onClick:tt,kind:BaseButtonKind.SECONDARY,children:"Edit active theme"})}),SettingsDialog=reactExports.memo(function tt({isServerConnected:nt,onClose:et,onSave:rt,settings:ot,allowRunOnSave:at,developerMode:st,openThemeCreator:ut,animateModal:ct,metricsMgr:pt}){const dt=reactExports.useContext(LibContext),ft=reactExports.useRef(ot),bt=reactExports.useRef(!0),[ht,Mt]=React$1.useState({...ot}),mt=reactExports.useCallback((vt,At)=>{Mt(St=>({...St,[vt]:At}))},[]);reactExports.useEffect(()=>{if(bt.current){bt.current=!1;return}ft.current=ht,rt(ft.current)},[rt,ht]);const Ot=reactExports.useCallback(vt=>{mt(vt.target.name,vt.target.checked)},[mt]),zt=reactExports.useCallback(vt=>{const At=dt.availableThemes[vt??0];pt.enqueue("menuClick",{label:"changeTheme"}),dt.setTheme(At)},[dt,pt]),yt=dt.availableThemes.findIndex(vt=>vt.name===dt.activeTheme.name);return jsxs(Modal,{animate:ct,isOpen:!0,onClose:et,children:[jsx$1(ModalHeader,{children:"Settings"}),jsx$1(ModalBody$1,{children:jsxs(StyledDialogBody,{children:[at&&jsx$1(React$1.Fragment,{children:jsxs(StyledFullRow,{children:[jsx$1(StyledHeader$1,{children:"Development"}),jsxs("label",{children:[jsx$1(StyledCheckbox,{disabled:!nt,type:"checkbox",name:"runOnSave",checked:ht.runOnSave&&nt,onChange:Ot})," ","Run on save"]}),jsx$1(StreamlitMarkdown$1,{source:"Automatically updates the app when the underlying code is updated.",allowHTML:!1,isCaption:!0})]})}),jsxs(StyledFullRow,{children:[jsx$1(StyledHeader$1,{children:"Appearance"}),jsxs("label",{children:[jsx$1(StyledCheckbox,{type:"checkbox",name:"wideMode",checked:ht.wideMode,onChange:Ot})," ","Wide mode"]}),jsx$1(StreamlitMarkdown$1,{source:" Turn on to make this app occupy the entire width of the screen.",allowHTML:!1,isCaption:!0})]}),!!dt.availableThemes.length&&jsxs(StyledFullRow,{children:[jsx$1(StyledLabel,{children:"Choose app theme, colors and fonts"}),jsx$1(UISelectbox,{options:dt.availableThemes.map(vt=>vt.name),disabled:!1,onChange:zt,value:yt}),st&&jsx$1(ThemeCreatorButton,{openThemeCreator:ut})]})]})})]})});var humanizeString$2={exports:{}},lib={exports:{}},xregexp={exports:{}};(function(tt,nt){Object.defineProperty(nt,"__esModule",{value:!0});/*!
|
746
|
+
max-width 200ms ease-out 0s, padding 200ms ease-out 0s`,...tt?minimizedStyles(nt):{}})),StyledAppRunningIcon=newStyled("img",{target:"emoooxk5"})(({isNewYears:tt,theme:nt})=>{const et=hasLightBackgroundColor(nt)?"":"invert(1)";return{opacity:tt?1:.4,width:tt?"2.2rem":nt.sizes.appRunningMen,height:tt?"2.2rem":nt.sizes.appRunningMen,marginRight:`-${nt.spacing.sm}`,filter:tt?"":et}}),StyledStatusWidget=newStyled("div",{target:"emoooxk6"})({"&.StatusWidget-appear":{opacity:0},"&.StatusWidget-appear-active":{opacity:1,transition:"opacity 200ms ease-out"},"&.StatusWidget-enter":{opacity:0},"&.StatusWidget-enter-active":{opacity:1,transition:"opacity 200ms ease-out"},"&.StatusWidget-exit":{opacity:1},"&.StatusWidget-exit-active":{opacity:0,transition:"opacity 200ms ease-out"}}),StyledShortcutLabel=newStyled("div",{target:"emoooxk7"})({"&::first-letter":{textDecoration:"underline"}}),PROMPT_DISPLAY_INITIAL_TIMEOUT_MS=15*1e3,PROMPT_DISPLAY_HOVER_TIMEOUT_MS=1*1e3,RUNNING_MAN_DISPLAY_DELAY_TIME_MS=500,PromptButton=tt=>jsx$1(StyledAppButtonContainer,{isMinimized:tt.isMinimized,children:jsx$1(BaseButton,{kind:BaseButtonKind.HEADER_BUTTON,disabled:tt.disabled,fluidWidth:!0,onClick:tt.onClick,children:tt.title})}),StatusWidget=({connectionState:tt,sessionEventDispatcher:nt,scriptRunState:et,rerunScript:rt,stopScript:ot,allowRunOnSave:at})=>{const st=reactExports.useCallback(()=>window.scrollY>32,[]),[ut,ct]=reactExports.useState(st()),[pt,dt]=reactExports.useState(!1),[ft,bt]=reactExports.useState(!1),[ht,Mt]=reactExports.useState(!1),[mt,Ot]=reactExports.useState(!1),zt=reactExports.useRef(null),yt=reactExports.useRef(null),vt=reactExports.useRef(),At=useTheme(),St=()=>{at&&rt(!0)},Et=r0=>{r0==="a"&&St()},Tt=tt===ConnectionState.CONNECTED,Rt=reactExports.useCallback(r0=>{zt.current!==null&&r0>zt.current.remainingTime&&zt.current.setTimeout(()=>{bt(!0)},r0)},[]),Ct=reactExports.useCallback(r0=>{r0.type==="scriptChangedOnDisk"&&(dt(!0),bt(!1),Rt(PROMPT_DISPLAY_INITIAL_TIMEOUT_MS))},[Rt]),wt=reactExports.useCallback(r0=>{yt.current!==null&&yt.current.setTimeout(()=>{Ot(!0)},r0)},[]),Ft=reactExports.useCallback(()=>{ct(st())},[st]),Ht=()=>{Mt(!0)},jt=()=>{Mt(!1),bt(!1),Rt(PROMPT_DISPLAY_HOVER_TIMEOUT_MS)},s0=()=>{ot()},Ut=()=>{rt(!1)},Yt=()=>{const r0=new Date,l0=r0.getMonth(),f0=r0.getDate();return l0===11&&f0===31||l0===0&&f0<=6};function O0(r0){switch(r0){case ConnectionState.INITIAL:case ConnectionState.PINGING_SERVER:case ConnectionState.CONNECTING:return{icon:Ellipses,label:"Connecting",tooltip:"Connecting to Streamlit server"};case ConnectionState.CONNECTED:return;case ConnectionState.DISCONNECTED_FOREVER:default:return{icon:Warning,label:"Error",tooltip:"Unable to connect to Streamlit server"}}}reactExports.useEffect(()=>(vt.current=nt.onSessionEvent.connect(Ct),()=>{vt.current!==void 0&&(vt.current.disconnect(),vt.current=void 0)}),[Ct,nt.onSessionEvent]),reactExports.useEffect(()=>{zt.current===null&&(zt.current=new Timer),yt.current===null&&(yt.current=new Timer);const r0=zt.current,l0=zt.current;return()=>{r0.cancel(),l0.cancel()}},[]),reactExports.useEffect(()=>(window.addEventListener("scroll",Ft),()=>{window.removeEventListener("scroll",Ft)}),[Ft]),reactExports.useEffect(()=>{et===ScriptRunState.RUNNING&&(dt(!1),Mt(!1))},[et]),reactExports.useEffect(()=>{Tt&&(et===ScriptRunState.RUNNING||et===ScriptRunState.RERUN_REQUESTED)&&wt(RUNNING_MAN_DISPLAY_DELAY_TIME_MS),et===ScriptRunState.NOT_RUNNING&&Ot(!1)},[et,wt,Tt]);const a0=()=>{const r0=ut,l0=et===ScriptRunState.STOP_REQUESTED,f0=Yt(),$t=jsx$1(StyledAppRunningIcon,{isNewYears:f0,src:f0?newYearsRunning:iconRunning,alt:"Running..."});return mt?jsxs(StyledAppStatus,{children:[r0?jsx$1(Tooltip,{placement:Placement.BOTTOM,content:"This script is currently running",children:$t}):$t,jsx$1(StyledAppStatusLabel,{isMinimized:ut,isPrompt:!1,children:"Running..."}),jsx$1(PromptButton,{isMinimized:ut,title:l0?"Stopping...":"Stop",disabled:l0,onClick:s0})]}):jsx$1(Fragment,{})},b0=()=>{const r0=et===ScriptRunState.RERUN_REQUESTED,l0=ft&&!ht,{colors:f0}=At;return jsx$1(ReactHotkeys,{keyName:"a",onKeyDown:Et,children:jsx$1("div",{onMouseEnter:Ht,onMouseLeave:jt,children:jsxs(StyledAppStatus,{children:[jsx$1(Icon$2,{content:Info,margin:"0 sm 0 0",color:f0.bodyText}),jsx$1(StyledAppStatusLabel,{isMinimized:l0,isPrompt:!0,children:"Source file changed."}),jsx$1(PromptButton,{isMinimized:l0,title:jsx$1(StyledShortcutLabel,{children:"Rerun"}),disabled:r0,onClick:Ut}),at&&jsx$1(PromptButton,{isMinimized:l0,title:jsx$1(StyledShortcutLabel,{children:"Always rerun"}),disabled:r0,onClick:St})]})})})},kt=()=>{const r0=O0(tt);return r0===void 0?null:jsx$1(Tooltip,{content:r0.tooltip,placement:Placement.BOTTOM,children:jsxs(StyledConnectionStatus,{className:"stConnectionStatus","data-testid":"stConnectionStatus",children:[jsx$1(Icon$2,{size:"sm",content:r0.icon}),jsx$1(StyledConnectionStatusLabel,{isMinimized:ut,children:r0.label})]})})},o0=()=>{if(Tt){if(et===ScriptRunState.RUNNING||et===ScriptRunState.RERUN_REQUESTED)return a0();if(pt)return b0()}return kt()},qt=reactExports.useRef(),Dt=qt.current;if(qt.current=o0(),isNullOrUndefined$1(qt.current)&&isNullOrUndefined$1(Dt))return jsx$1(Fragment,{});let Bt,p0;return notNullOrUndefined(qt.current)?(Bt=!0,p0=qt.current):(Bt=!1,p0=Dt),jsx$1(CSSTransition,{appear:!0,in:Bt,timeout:200,unmountOnExit:!0,classNames:"StatusWidget",children:jsx$1(StyledStatusWidget,{className:"stStatusWidget","data-testid":"stStatusWidget",children:p0},"StatusWidget")})};var MoreVert=reactExports.forwardRef(function(tt,nt){var et={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return reactExports.createElement(EmotionIconBase,_extends$Q({iconAttrs:et,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},tt,{ref:nt}),reactExports.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),reactExports.createElement("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}))});MoreVert.displayName="MoreVert";const BLOB_TYPE="video/webm";class ScreenCastRecorder{static isSupportedBrowser(){try{return notNullOrUndefined(navigator.mediaDevices)&¬NullOrUndefined(navigator.mediaDevices.getUserMedia)&¬NullOrUndefined(navigator.mediaDevices.getDisplayMedia)&&MediaRecorder.isTypeSupported(BLOB_TYPE)}catch{return!1}}constructor({recordAudio:nt,onErrorOrStop:et}){this.recordAudio=nt,this.onErrorOrStopCallback=et,this.inputStream=null,this.recordedChunks=[],this.mediaRecorder=null}async initialize(){let et=(await navigator.mediaDevices.getDisplayMedia({video:!0})).getTracks();if(this.recordAudio){const rt=await navigator.mediaDevices.getUserMedia({video:!1,audio:!0});et=et.concat(rt.getAudioTracks())}this.recordedChunks=[],this.inputStream=new MediaStream(et),this.mediaRecorder=new MediaRecorder(this.inputStream,{mimeType:BLOB_TYPE}),this.mediaRecorder.ondataavailable=rt=>this.recordedChunks.push(rt.data)}getState(){return this.mediaRecorder?this.mediaRecorder.state:"inactive"}start(){if(!this.mediaRecorder)return!1;this.mediaRecorder.onerror=nt=>{this.onErrorOrStopCallback()},this.mediaRecorder.onstop=()=>this.onErrorOrStopCallback();try{this.mediaRecorder.start()}catch{return!1}return!0}stop(){if(!this.mediaRecorder)return;let nt;const et=new Promise(rt=>{nt=rt});return this.mediaRecorder.onstop=()=>nt(),this.mediaRecorder.stop(),this.inputStream&&(this.inputStream.getTracks().forEach(rt=>rt.stop()),this.inputStream=null),et.then(()=>this.buildOutputBlob())}buildOutputBlob(){return new Blob(this.recordedChunks,{type:BLOB_TYPE})}}const recordingIndicatorPulse=tt=>keyframes("0%{box-shadow:0 0 ",tt.spacing.twoXS," ",tt.colors.red,";}50%{box-shadow:0 0 ",tt.spacing.sm," ",tt.spacing.twoXS," ",tt.colors.red,";}100%{box-shadow:0 0 ",tt.spacing.twoXS," ",tt.colors.red,";}"),StyledRecordingIndicator=newStyled("div",{target:"ev04twb0"})(({theme:tt})=>({position:"absolute",bottom:tt.spacing.lg,right:tt.spacing.sm,width:tt.spacing.sm,height:tt.spacing.sm,backgroundColor:tt.colors.red,borderRadius:tt.radii.full,boxShadow:`0 0 ${tt.spacing.twoXS} ${tt.colors.red}`,animation:`${recordingIndicatorPulse(tt)} 2s linear infinite`})),StyledMenuDivider=newStyled("div",{target:"ev04twb1"})(({theme:tt})=>({borderTop:`${tt.sizes.borderWidth} solid ${tt.colors.borderColor}`,margin:`${tt.spacing.sm} ${tt.spacing.none}`})),StyledMenuItemShortcut=newStyled("span",{target:"ev04twb2"})(({isRecording:tt,theme:nt})=>({color:tt?nt.colors.red:nt.colors.fadedText60,fontSize:nt.fontSizes.sm,marginTop:nt.spacing.twoXS,fontVariant:"small-caps",textTransform:"uppercase"})),StyledMenuItem=newStyled("ul",{target:"ev04twb3"})(({isDisabled:tt,isRecording:nt,theme:et})=>{const rt=tt?{backgroundColor:et.colors.transparent,color:et.colors.fadedText60,cursor:"not-allowed"}:{"&:focus":{backgroundColor:et.colors.primary,color:et.colors.white}},ot=nt&&{color:et.colors.red,fontWeight:et.fontWeights.bold};return{display:"block",flexDirection:"row",alignItems:"flex-start",padding:et.spacing.none,cursor:"pointer",...ot||{},...rt,"@media print":{display:"none !important"}}}),StyledCoreItem=newStyled("li",{target:"ev04twb4"})(({isHighlighted:tt,styleProps:nt,theme:et})=>{const rt=tt&&{"&:hover":{backgroundColor:et.colors.secondaryBg}},ot=(nt==null?void 0:nt.margin)||0,at=(nt==null?void 0:nt.padding)||`${et.spacing.twoXS} ${et.spacing.twoXL}`,st=(nt==null?void 0:nt.backgroundColor)||et.colors.primaryBg,ut=(nt==null?void 0:nt.fontSize)||et.fontSizes.md;return{margin:ot,padding:at,backgroundColor:st,fontSize:ut,...rt||{},display:"block"}}),StyledDevItem=newStyled("li",{target:"ev04twb5"})(({isHighlighted:tt,styleProps:nt,theme:et})=>{const rt=tt&&{"&:hover":{backgroundColor:transparentize(et.colors.secondaryBg,1)}},ot=(nt==null?void 0:nt.margin)||0,at=(nt==null?void 0:nt.padding)||`${et.spacing.twoXS} ${et.spacing.twoXL}`,st=(nt==null?void 0:nt.backgroundColor)||et.colors.secondaryBg,ut=(nt==null?void 0:nt.fontSize)||et.fontSizes.md;return{margin:ot,padding:at,backgroundColor:st,fontSize:ut,...rt||{},display:"block"}}),StyledMenuItemLabel=newStyled("span",{target:"ev04twb6"})(({theme:tt})=>({marginRight:tt.spacing.md,flexGrow:1,fontFamily:tt.fonts.sansSerif})),StyledMenuContainer=newStyled("div",{target:"ev04twb7"})(({theme:tt})=>({ul:{borderRadius:tt.radii.default},"& > ul[role=listbox]:not(:last-child)":{borderBottomLeftRadius:0,borderBottomRightRadius:0},"ul[role=listbox] ~ ul[role=listbox]":{borderTopLeftRadius:0,borderTopRightRadius:0,boxShadow:"none",borderTop:"none"},"@media print":{display:"none"}})),StyledMainMenuContainer=newStyled("span",{target:"ev04twb8"})({lineHeight:"initial"}),SCREENCAST_LABEL={COUNTDOWN:"Cancel screencast",RECORDING:"Stop recording"},getOpenInWindowCallback=tt=>()=>{window.open(tt,"_blank")};function buildMenuItemComponent(tt,nt){const et=reactExports.forwardRef(({item:rt,"aria-selected":ot,onClick:at,onMouseEnter:st,$disabled:ut,$isHighlighted:ct},pt)=>{const{label:dt,shortcut:ft,hasDividerAbove:bt,styleProps:ht,noHighlight:Mt,interactions:mt}=rt,Ot={isDisabled:ut,isRecording:!!rt.stopRecordingIndicator};return jsxs(Fragment,{children:[bt&&jsx$1(StyledMenuDivider,{"data-testid":"stMainMenuDivider"}),jsx$1(StyledMenuItem,{ref:pt,role:"option","aria-selected":ot,"aria-disabled":ut,...Ot,...mt||(ut?{}:{onClick:vt=>{nt.enqueue("menuClick",{label:dt}),at(vt)},onMouseEnter:st}),children:jsxs(tt,{...{isHighlighted:!Mt&&ct,styleProps:ht},children:[jsx$1(StyledMenuItemLabel,{...Ot,children:dt}),ft&&jsx$1(StyledMenuItemShortcut,{...Ot,children:ft})]})})]})});return et.displayName="MenuItem",et}const SubMenu=tt=>{const{colors:nt,sizes:et,spacing:rt}=useTheme(),ot=tt.isDevMenu?StyledDevItem:StyledCoreItem;return jsx$1(StatefulMenu,{items:tt.menuItems,onItemSelect:({item:at})=>{at.onClick(),tt.closeMenu()},overrides:{Option:buildMenuItemComponent(ot,tt.metricsMgr),List:{props:{"data-testid":"stMainMenuList"},style:{backgroundColor:"inherit",borderBottomRadius:0,borderTopRadius:0,borderLeftRadius:0,borderRightRadius:0,paddingBottom:rt.sm,paddingTop:rt.sm,":focus":{outline:"none"},border:`${et.borderWidth} solid ${nt.borderColor}`}}}})};function getDevMenuItems(tt,nt){const et=[],rt=[nt.developerOptions,nt.clearCache];let ot=null;for(const at of rt)at&&(at!==nt.DIVIDER&&(ot===nt.DIVIDER?et.push({...at,hasDividerAbove:!0}):et.push(at)),ot=at);return notNullOrUndefined(ot)&&(ot.styleProps={margin:`0 0 -${tt.spacing.sm} 0`,padding:`${tt.spacing.twoXS} ${tt.spacing.none} ${tt.spacing.twoXS} ${tt.spacing.twoXL}`}),et}function getPreferredMenuOrder(tt,nt,et){let rt;if(tt.toolbarMode==Config.ToolbarMode.MINIMAL){for(rt=[et.report,et.community,et.DIVIDER,...nt.length>0?nt:[et.DIVIDER],et.about],rt=rt.filter(ot=>ot);rt.length>0&&rt[0]==et.DIVIDER;)rt.shift();for(;rt.length>0&&rt.at(rt.length-1)==et.DIVIDER;)rt.pop();return rt}return[et.rerun,et.settings,et.DIVIDER,et.print,...ScreenCastRecorder.isSupportedBrowser()?[et.recordScreencast]:[],et.DIVIDER,et.report,et.community,...nt.length>0?nt:[et.DIVIDER],et.about]}function MainMenu(tt){var ft,bt,ht,Mt,mt,Ot,zt;const nt=useTheme(),et=!tt.isServerConnected,rt=tt.toolbarMode!=Config.ToolbarMode.MINIMAL||tt.toolbarMode==Config.ToolbarMode.MINIMAL&&((ft=tt.menuItems)==null?void 0:ft.aboutSectionMd),ot={DIVIDER:{isDivider:!0},rerun:{disabled:et,onClick:tt.quickRerunCallback,label:"Rerun",shortcut:"r"},print:{onClick:tt.printCallback,label:"Print"},recordScreencast:{onClick:tt.screencastCallback,label:SCREENCAST_LABEL[tt.screenCastState]||"Record a screencast",shortcut:SCREENCAST_LABEL[tt.screenCastState]?"esc":"",stopRecordingIndicator:!!SCREENCAST_LABEL[tt.screenCastState]},saveSnapshot:{disabled:et,label:"Save a snapshot"},...!((bt=tt.menuItems)!=null&&bt.hideGetHelp)&&((ht=tt.menuItems)==null?void 0:ht.getHelpUrl)&&{community:{onClick:getOpenInWindowCallback((Mt=tt.menuItems)==null?void 0:Mt.getHelpUrl),label:"Get help"}},...!((mt=tt.menuItems)!=null&&mt.hideReportABug)&&((Ot=tt.menuItems)==null?void 0:Ot.reportABugUrl)&&{report:{onClick:getOpenInWindowCallback((zt=tt.menuItems)==null?void 0:zt.reportABugUrl),label:"Report a bug"}},settings:{onClick:tt.settingsCallback,label:"Settings"},...rt&&{about:{onClick:tt.aboutCallback,label:"About"}}},at={DIVIDER:{isDivider:!0},developerOptions:{label:"Developer options",noHighlight:!0,interactions:{},styleProps:{fontSize:nt.fontSizes.twoSmPx,margin:`-${nt.spacing.sm} 0 0 0`,padding:`${nt.spacing.twoXS} ${nt.spacing.none} ${nt.spacing.twoXS} ${nt.spacing.twoXL}`,pointerEvents:"none"}},clearCache:{disabled:et,onClick:tt.clearCacheCallback,label:"Clear cache",shortcut:"c"}},st=tt.hostMenuItems.map(yt=>{var vt,At;return yt.type==="separator"?ot.DIVIDER:yt.key==="reportBug"&&((vt=tt.menuItems)!=null&&vt.hideGetHelp)||yt.key==="about"&&((At=tt.menuItems)==null?void 0:At.aboutSectionMd)!==""?null:{onClick:()=>tt.sendMessageToHost({type:"MENU_ITEM_CALLBACK",key:yt.key}),label:yt.label}},[]),ut=getPreferredMenuOrder(tt,st,ot),ct=[];let pt=null;for(const yt of ut)yt&&(yt!==ot.DIVIDER&&(pt===ot.DIVIDER?ct.push({...yt,hasDividerAbove:!0}):ct.push(yt)),pt=yt);const dt=tt.developmentMode?getDevMenuItems(nt,at):[];return ct.length==0&&dt.length==0?jsx$1(Fragment,{}):jsx$1(StatefulPopover,{focusLock:!0,placement:PLACEMENT.bottomRight,content:({close:yt})=>jsxs(StyledMenuContainer,{children:[ct.length!=0&&jsx$1(SubMenu,{menuItems:ct,closeMenu:yt,isDevMenu:!1,metricsMgr:tt.metricsMgr}),dt.length!=0&&jsx$1(SubMenu,{menuItems:dt,closeMenu:yt,isDevMenu:!0,metricsMgr:tt.metricsMgr})]}),overrides:{Body:{props:{"data-testid":"stMainMenuPopover",className:"stMainMenuPopover"}}},children:jsxs(StyledMainMenuContainer,{id:"MainMenu",className:"stMainMenu","data-testid":"stMainMenu",children:[jsx$1(BaseButton,{kind:BaseButtonKind.HEADER_NO_PADDING,children:jsx$1(Icon$2,{content:MoreVert,size:"lg"})}),tt.screenCastState==="RECORDING"&&jsx$1(StyledRecordingIndicator,{})]})})}const MainMenu$1=reactExports.memo(MainMenu),StyledActionButtonContainer=newStyled("div",{target:"e1i26tt70"})(({theme:tt})=>({display:"flex",gap:tt.spacing.sm,alignItems:"center",lineHeight:tt.iconSizes.md})),StyledActionButtonIcon=newStyled("div",{target:"e1i26tt71"})(({theme:tt,icon:nt})=>({background:`url("${nt}") no-repeat center / contain`,width:tt.iconSizes.base,height:tt.iconSizes.base})),StyledToolbarActions=newStyled("div",{target:"e1i26tt72"})(({})=>({display:"flex",alignItems:"center",flexDirection:"row"}));function ActionButton({label:tt,icon:nt,onClick:et}){return jsx$1("div",{className:"stToolbarActionButton","data-testid":"stToolbarActionButton",children:jsx$1(BaseButton,{onClick:et,kind:BaseButtonKind.HEADER_BUTTON,children:jsxs(StyledActionButtonContainer,{children:[nt&&jsx$1(StyledActionButtonIcon,{"data-testid":"stToolbarActionButtonIcon",icon:nt}),tt&&jsx$1("span",{"data-testid":"stToolbarActionButtonLabel",children:tt})]})})})}function ToolbarActions({sendMessageToHost:tt,hostToolbarItems:nt,metricsMgr:et}){return jsx$1(StyledToolbarActions,{className:"stToolbarActions","data-testid":"stToolbarActions",children:nt.map(({key:rt,label:ot,icon:at})=>jsx$1(ActionButton,{label:ot,icon:at,onClick:()=>{et.enqueue("menuClick",{label:rt}),tt({type:"TOOLBAR_ITEM_CALLBACK",key:rt})}},rt))})}const DeployButtonContainer=newStyled("div",{target:"e17qgqm80"})(({theme:tt})=>({display:"flex",gap:tt.spacing.sm,alignItems:"center",lineHeight:tt.iconSizes.md})),DeployButton=({onClick:tt})=>jsx$1("div",{className:"stAppDeployButton","data-testid":"stAppDeployButton",children:jsx$1(BaseButton,{kind:BaseButtonKind.HEADER_BUTTON,onClick:tt,children:jsx$1(DeployButtonContainer,{children:jsx$1("span",{children:"Deploy"})})})}),StyledHeader$2=newStyled("header",{target:"e4hpqof0"})(({showHeader:tt,theme:nt})=>({position:"fixed",top:nt.spacing.none,left:nt.spacing.none,right:nt.spacing.none,height:nt.sizes.headerHeight,background:nt.colors.bgColor,outline:"none",zIndex:nt.zIndices.header,display:tt?"block":"none","@media print":{display:"none"}})),StyledHeaderDecoration=newStyled("div",{target:"e4hpqof1"})(({theme:tt})=>({position:"absolute",top:tt.spacing.none,right:tt.spacing.none,left:tt.spacing.none,height:tt.sizes.headerDecorationHeight,backgroundImage:`linear-gradient(90deg, ${tt.colors.red70}, #fffd80)`,zIndex:tt.zIndices.header})),StyledHeaderToolbar=newStyled("div",{target:"e4hpqof2"})(({theme:tt})=>({position:"absolute",top:tt.spacing.xl,right:tt.spacing.xl,display:"flex",flexDirection:"row",alignItems:"center"}));function Header({isStale:tt,children:nt}){const{wideMode:et,embedded:rt,showToolbar:ot,showColoredLine:at}=React$1.useContext(AppContext);let st=!0;return rt&&(st=ot||at),jsxs(StyledHeader$2,{showHeader:st,isWideMode:et,tabIndex:-1,isStale:tt,className:"stAppHeader","data-testid":"stHeader",children:[at&&jsx$1(StyledHeaderDecoration,{className:"stDecoration","data-testid":"stDecoration",id:"stDecoration"}),ot&&jsx$1(StyledHeaderToolbar,{className:"stAppToolbar","data-testid":"stToolbar",children:nt})]})}const STREAMLIT_HOME_URL="https://streamlit.io",DEPLOY_URL="https://share.streamlit.io/deploy",STREAMLIT_CLOUD_URL="https://streamlit.io/cloud",STREAMLIT_COMMUNITY_CLOUD_DOCS_URL="https://share.streamlit.io/cloud-getting-started",STREAMLIT_DEPLOY_TUTORIAL_URL="https://share.streamlit.io/deployment-tutorial",SNOWFLAKE_LEARN_MORE_URL="https://share.streamlit.io/sis-about",SNOWFLAKE_TRIAL_URL="https://share.streamlit.io/snowflake-trial",StyledBackButton=newStyled(ChevronLeft$1,{target:"e4y1h9e1"})(({theme:tt})=>({cursor:"pointer",marginRight:tt.spacing.lg})),StyledDialogBody=newStyled("div",{target:"e4y1h9e2"})(({theme:tt})=>({display:"grid",gap:tt.spacing.twoXL,gridTemplateColumns:"1fr 1fr",margin:0,padding:0})),StyledFullRow=newStyled("div",{target:"e4y1h9e3"})(({theme:tt})=>({gridColumnStart:1,gridColumnEnd:-1,display:"grid",gap:tt.spacing.xs})),StyledHeader$1=newStyled("h2",{target:"e4y1h9e4"})(({theme:tt})=>({paddingBottom:0,paddingTop:0,marginBottom:tt.spacing.md,marginTop:"0",fontWeight:tt.fontWeights.bold,fontSize:tt.fontSizes.md,lineHeight:tt.lineHeights.tight,color:tt.colors.bodyText,display:"grid",gridAutoFlow:"row",gap:tt.spacing.xs,"&:first-of-type":{marginTop:0}})),StyledLabel=newStyled("label",{target:"e4y1h9e5"})(({theme:tt})=>({paddingBottom:0,paddingTop:0,marginBottom:0,marginTop:0,lineHeight:tt.lineHeights.tight,fontSize:tt.fontSizes.sm})),StyledButtonContainer=newStyled("div",{target:"e4y1h9e7"})(({theme:tt})=>({marginTop:tt.spacing.md})),StyledCheckbox=newStyled("input",{target:"e4y1h9e8"})(({theme:tt})=>({marginRight:tt.spacing.xs,appearance:"none",border:`${tt.sizes.borderWidth} solid ${tt.colors.borderColor}`,width:tt.fontSizes.md,height:tt.fontSizes.md,borderRadius:tt.radii.md,display:"inline-flex",alignItems:"center",justifyContent:"center",padding:0,verticalAlign:"middle",overflow:"hidden","&:focus-visible":{outline:`2px solid ${tt.colors.primary}`},"&:checked":{backgroundColor:tt.colors.primary,"&:after":{content:'"✓"',fontFamily:tt.fonts.monospace,fontSize:tt.fontSizes.md,color:tt.colors.white,lineHeight:tt.lineHeights.none}},"&:disabled":{backgroundColor:tt.colors.secondaryBg}})),StyledDeployErrorContent=newStyled("div",{target:"e4y1h9e9"})(({theme:tt})=>({"& > ul":{paddingLeft:tt.spacing.twoXL}})),StyledAboutInfo=newStyled("div",{target:"e4y1h9e10"})(({theme:tt})=>({padding:`0 0 ${tt.spacing.lg} 0`,overflowY:"scroll"})),StyledAboutLink=newStyled("a",{target:"e4y1h9e11"})(({theme:tt})=>({color:`${tt.colors.linkText} !important`,"&:hover":{color:`${darken(tt.colors.linkText,.15)} !important`}})),ThemeCreatorButton=({openThemeCreator:tt})=>jsx$1(StyledButtonContainer,{"data-testid":"edit-theme",children:jsx$1(BaseButton,{onClick:tt,kind:BaseButtonKind.SECONDARY,children:"Edit active theme"})}),SettingsDialog=reactExports.memo(function tt({isServerConnected:nt,onClose:et,onSave:rt,settings:ot,allowRunOnSave:at,developerMode:st,openThemeCreator:ut,animateModal:ct,metricsMgr:pt}){const dt=reactExports.useContext(LibContext),ft=reactExports.useRef(ot),bt=reactExports.useRef(!0),[ht,Mt]=React$1.useState({...ot}),mt=reactExports.useCallback((vt,At)=>{Mt(St=>({...St,[vt]:At}))},[]);reactExports.useEffect(()=>{if(bt.current){bt.current=!1;return}ft.current=ht,rt(ft.current)},[rt,ht]);const Ot=reactExports.useCallback(vt=>{mt(vt.target.name,vt.target.checked)},[mt]),zt=reactExports.useCallback(vt=>{const At=dt.availableThemes[vt??0];pt.enqueue("menuClick",{label:"changeTheme"}),dt.setTheme(At)},[dt,pt]),yt=dt.availableThemes.findIndex(vt=>vt.name===dt.activeTheme.name);return jsxs(Modal,{animate:ct,isOpen:!0,onClose:et,children:[jsx$1(ModalHeader,{children:"Settings"}),jsx$1(ModalBody$1,{children:jsxs(StyledDialogBody,{children:[at&&jsx$1(React$1.Fragment,{children:jsxs(StyledFullRow,{children:[jsx$1(StyledHeader$1,{children:"Development"}),jsxs("label",{children:[jsx$1(StyledCheckbox,{disabled:!nt,type:"checkbox",name:"runOnSave",checked:ht.runOnSave&&nt,onChange:Ot})," ","Run on save"]}),jsx$1(StreamlitMarkdown$1,{source:"Automatically updates the app when the underlying code is updated.",allowHTML:!1,isCaption:!0})]})}),jsxs(StyledFullRow,{children:[jsx$1(StyledHeader$1,{children:"Appearance"}),jsxs("label",{children:[jsx$1(StyledCheckbox,{type:"checkbox",name:"wideMode",checked:ht.wideMode,onChange:Ot})," ","Wide mode"]}),jsx$1(StreamlitMarkdown$1,{source:" Turn on to make this app occupy the entire width of the screen.",allowHTML:!1,isCaption:!0})]}),!!dt.availableThemes.length&&jsxs(StyledFullRow,{children:[jsx$1(StyledLabel,{children:"Choose app theme, colors and fonts"}),jsx$1(UISelectbox,{options:dt.availableThemes.map(vt=>vt.name),disabled:!1,onChange:zt,value:yt}),st&&jsx$1(ThemeCreatorButton,{openThemeCreator:ut})]})]})})]})});var humanizeString$2={exports:{}},lib={exports:{}},xregexp={exports:{}};(function(tt,nt){Object.defineProperty(nt,"__esModule",{value:!0});/*!
|
747
747
|
* XRegExp 4.0.0
|
748
748
|
* <xregexp.com>
|
749
749
|
* Steven Levithan (c) 2007-2017 MIT License
|
@@ -795,4 +795,4 @@ not been pushed to GitHub. Please add it to continue.
|
|
795
795
|
`):" "+renderReason(at[0]):"as no adapter specified";throw new AxiosError("There is no suitable adapter to dispatch the request "+st,"ERR_NOT_SUPPORT")}return rt},adapters:knownAdapters};function throwIfCancellationRequested(tt){if(tt.cancelToken&&tt.cancelToken.throwIfRequested(),tt.signal&&tt.signal.aborted)throw new CanceledError(null,tt)}function dispatchRequest(tt){return throwIfCancellationRequested(tt),tt.headers=AxiosHeaders.from(tt.headers),tt.data=transformData.call(tt,tt.transformRequest),["post","put","patch"].indexOf(tt.method)!==-1&&tt.headers.setContentType("application/x-www-form-urlencoded",!1),adapters.getAdapter(tt.adapter||defaults.adapter)(tt).then(function(rt){return throwIfCancellationRequested(tt),rt.data=transformData.call(tt,tt.transformResponse,rt),rt.headers=AxiosHeaders.from(rt.headers),rt},function(rt){return isCancel(rt)||(throwIfCancellationRequested(tt),rt&&rt.response&&(rt.response.data=transformData.call(tt,tt.transformResponse,rt.response),rt.response.headers=AxiosHeaders.from(rt.response.headers))),Promise.reject(rt)})}const VERSION="1.7.9",validators$1={};["object","boolean","number","function","string","symbol"].forEach((tt,nt)=>{validators$1[tt]=function(rt){return typeof rt===tt||"a"+(nt<1?"n ":" ")+tt}});const deprecatedWarnings={};validators$1.transitional=function tt(nt,et,rt){function ot(at,st){return"[Axios v"+VERSION+"] Transitional option '"+at+"'"+st+(rt?". "+rt:"")}return(at,st,ut)=>{if(nt===!1)throw new AxiosError(ot(st," has been removed"+(et?" in "+et:"")),AxiosError.ERR_DEPRECATED);return et&&!deprecatedWarnings[st]&&(deprecatedWarnings[st]=!0,console.warn(ot(st," has been deprecated since v"+et+" and will be removed in the near future"))),nt?nt(at,st,ut):!0}};validators$1.spelling=function tt(nt){return(et,rt)=>(console.warn(`${rt} is likely a misspelling of ${nt}`),!0)};function assertOptions(tt,nt,et){if(typeof tt!="object")throw new AxiosError("options must be an object",AxiosError.ERR_BAD_OPTION_VALUE);const rt=Object.keys(tt);let ot=rt.length;for(;ot-- >0;){const at=rt[ot],st=nt[at];if(st){const ut=tt[at],ct=ut===void 0||st(ut,at,tt);if(ct!==!0)throw new AxiosError("option "+at+" must be "+ct,AxiosError.ERR_BAD_OPTION_VALUE);continue}if(et!==!0)throw new AxiosError("Unknown option "+at,AxiosError.ERR_BAD_OPTION)}}const validator={assertOptions,validators:validators$1},validators=validator.validators;class Axios{constructor(nt){this.defaults=nt,this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}async request(nt,et){try{return await this._request(nt,et)}catch(rt){if(rt instanceof Error){let ot={};Error.captureStackTrace?Error.captureStackTrace(ot):ot=new Error;const at=ot.stack?ot.stack.replace(/^.+\n/,""):"";try{rt.stack?at&&!String(rt.stack).endsWith(at.replace(/^.+\n.+\n/,""))&&(rt.stack+=`
|
796
796
|
`+at):rt.stack=at}catch{}}throw rt}}_request(nt,et){typeof nt=="string"?(et=et||{},et.url=nt):et=nt||{},et=mergeConfig(this.defaults,et);const{transitional:rt,paramsSerializer:ot,headers:at}=et;rt!==void 0&&validator.assertOptions(rt,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),ot!=null&&(utils$1.isFunction(ot)?et.paramsSerializer={serialize:ot}:validator.assertOptions(ot,{encode:validators.function,serialize:validators.function},!0)),validator.assertOptions(et,{baseUrl:validators.spelling("baseURL"),withXsrfToken:validators.spelling("withXSRFToken")},!0),et.method=(et.method||this.defaults.method||"get").toLowerCase();let st=at&&utils$1.merge(at.common,at[et.method]);at&&utils$1.forEach(["delete","get","head","post","put","patch","common"],Mt=>{delete at[Mt]}),et.headers=AxiosHeaders.concat(st,at);const ut=[];let ct=!0;this.interceptors.request.forEach(function(mt){typeof mt.runWhen=="function"&&mt.runWhen(et)===!1||(ct=ct&&mt.synchronous,ut.unshift(mt.fulfilled,mt.rejected))});const pt=[];this.interceptors.response.forEach(function(mt){pt.push(mt.fulfilled,mt.rejected)});let dt,ft=0,bt;if(!ct){const Mt=[dispatchRequest.bind(this),void 0];for(Mt.unshift.apply(Mt,ut),Mt.push.apply(Mt,pt),bt=Mt.length,dt=Promise.resolve(et);ft<bt;)dt=dt.then(Mt[ft++],Mt[ft++]);return dt}bt=ut.length;let ht=et;for(ft=0;ft<bt;){const Mt=ut[ft++],mt=ut[ft++];try{ht=Mt(ht)}catch(Ot){mt.call(this,Ot);break}}try{dt=dispatchRequest.call(this,ht)}catch(Mt){return Promise.reject(Mt)}for(ft=0,bt=pt.length;ft<bt;)dt=dt.then(pt[ft++],pt[ft++]);return dt}getUri(nt){nt=mergeConfig(this.defaults,nt);const et=buildFullPath(nt.baseURL,nt.url);return buildURL(et,nt.params,nt.paramsSerializer)}}utils$1.forEach(["delete","get","head","options"],function tt(nt){Axios.prototype[nt]=function(et,rt){return this.request(mergeConfig(rt||{},{method:nt,url:et,data:(rt||{}).data}))}});utils$1.forEach(["post","put","patch"],function tt(nt){function et(rt){return function(at,st,ut){return this.request(mergeConfig(ut||{},{method:nt,headers:rt?{"Content-Type":"multipart/form-data"}:{},url:at,data:st}))}}Axios.prototype[nt]=et(),Axios.prototype[nt+"Form"]=et(!0)});class CancelToken{constructor(nt){if(typeof nt!="function")throw new TypeError("executor must be a function.");let et;this.promise=new Promise(function(at){et=at});const rt=this;this.promise.then(ot=>{if(!rt._listeners)return;let at=rt._listeners.length;for(;at-- >0;)rt._listeners[at](ot);rt._listeners=null}),this.promise.then=ot=>{let at;const st=new Promise(ut=>{rt.subscribe(ut),at=ut}).then(ot);return st.cancel=function(){rt.unsubscribe(at)},st},nt(function(at,st,ut){rt.reason||(rt.reason=new CanceledError(at,st,ut),et(rt.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(nt){if(this.reason){nt(this.reason);return}this._listeners?this._listeners.push(nt):this._listeners=[nt]}unsubscribe(nt){if(!this._listeners)return;const et=this._listeners.indexOf(nt);et!==-1&&this._listeners.splice(et,1)}toAbortSignal(){const nt=new AbortController,et=rt=>{nt.abort(rt)};return this.subscribe(et),nt.signal.unsubscribe=()=>this.unsubscribe(et),nt.signal}static source(){let nt;return{token:new CancelToken(function(ot){nt=ot}),cancel:nt}}}function spread(tt){return function(et){return tt.apply(null,et)}}function isAxiosError(tt){return utils$1.isObject(tt)&&tt.isAxiosError===!0}const HttpStatusCode={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(HttpStatusCode).forEach(([tt,nt])=>{HttpStatusCode[nt]=tt});function createInstance(tt){const nt=new Axios(tt),et=bind(Axios.prototype.request,nt);return utils$1.extend(et,Axios.prototype,nt,{allOwnKeys:!0}),utils$1.extend(et,nt,null,{allOwnKeys:!0}),et.create=function(ot){return createInstance(mergeConfig(tt,ot))},et}const axios=createInstance(defaults);axios.Axios=Axios;axios.CanceledError=CanceledError;axios.CancelToken=CancelToken;axios.isCancel=isCancel;axios.VERSION=VERSION;axios.toFormData=toFormData;axios.AxiosError=AxiosError;axios.Cancel=axios.CanceledError;axios.all=function tt(nt){return Promise.all(nt)};axios.spread=spread;axios.isAxiosError=isAxiosError;axios.mergeConfig=mergeConfig;axios.AxiosHeaders=AxiosHeaders;axios.formToJSON=tt=>formDataToJSON(utils$1.isHTMLForm(tt)?new FormData(tt):tt);axios.getAdapter=adapters.getAdapter;axios.HttpStatusCode=HttpStatusCode;axios.default=axios;function doInitPings(tt,nt,et,rt,ot){const at=new Resolver;let st=0,ut=0,ct=()=>{};const pt=()=>{ut++,ut>=tt.length&&(ut=0),ct()},dt=ht=>{const Mt=Math.random()*.4-.2,mt=st===1?nt:nt*2**(st-1)*(1+Mt),Ot=Math.min(et,mt);rt(st,ht,Ot),window.setTimeout(pt,Ot)},ft=()=>{const ht=tt[ut];new URL(buildHttpUri(ht,"")).hostname==="localhost"?dt(jsx$1(StreamlitMarkdown$1,{source:"\nIs Streamlit still running? If you accidentally stopped Streamlit, just restart it in your terminal:\n\n```bash\nstreamlit run yourscript.py\n```\n ",allowHTML:!1})):dt("Connection failed with status 0.")},bt=()=>{dt(jsxs(reactExports.Fragment,{children:[jsx$1("p",{children:"Cannot connect to Streamlit (HTTP status: 403)."}),jsxs("p",{children:["If you are trying to access a Streamlit app running on another server, this could be due to the app's"," ",jsx$1("a",{href:CORS_ERROR_MESSAGE_DOCUMENTATION_LINK,children:"CORS"})," settings."]})]}))};return ct=()=>{const ht=tt[ut],Mt=buildHttpUri(ht,SERVER_PING_PATH),mt=buildHttpUri(ht,HOST_CONFIG_PATH);ut===0&&st++,Promise.all([axios.get(Mt,{timeout:PING_TIMEOUT_MS}),axios.get(mt,{timeout:PING_TIMEOUT_MS})]).then(([Ot,zt])=>{ot(zt.data),at.resolve(ut)}).catch(Ot=>{if(Ot.code==="ECONNABORTED")return dt("Connection timed out.");if(Ot.response){const{data:zt,status:yt}=Ot.response;return yt===0?ft():yt===403?bt():dt(`Connection failed with status ${yt}, and response "${zt}".`)}return Ot.request?ft():dt(Ot.message)})},ct(),at.promise}class WebsocketConnection{constructor(nt){this.uriIndex=0,this.lastDispatchedMessageIndex=-1,this.nextMessageIndex=0,this.messageQueue={},this.state=ConnectionState.INITIAL,this.args=nt,this.cache=new ForwardMsgCache(nt.endpoints),this.stepFsm("INITIALIZED")}getBaseUriParts(){if(this.state===ConnectionState.CONNECTED)return this.args.baseUriPartsList[this.uriIndex]}disconnect(){this.setFsmState(ConnectionState.DISCONNECTED_FOREVER)}setFsmState(nt,et){switch(this.state=nt,this.state){case ConnectionState.PINGING_SERVER:this.pingServer();break}switch(this.args.onConnectionStateChange(nt,et),this.state){case ConnectionState.CONNECTING:this.connectToWebSocket();break;case ConnectionState.DISCONNECTED_FOREVER:this.closeConnection();break}}stepFsm(nt,et){if(logMessage(LOG,`State: ${this.state}; Event: ${nt}`),nt==="FATAL_ERROR"&&this.state!==ConnectionState.DISCONNECTED_FOREVER){this.setFsmState(ConnectionState.DISCONNECTED_FOREVER,et);return}switch(this.state){case ConnectionState.INITIAL:if(nt==="INITIALIZED"){this.setFsmState(ConnectionState.PINGING_SERVER);return}break;case ConnectionState.CONNECTING:if(nt==="CONNECTION_SUCCEEDED"){this.setFsmState(ConnectionState.CONNECTED);return}if(nt==="CONNECTION_TIMED_OUT"||nt==="CONNECTION_ERROR"||nt==="CONNECTION_CLOSED"){this.setFsmState(ConnectionState.PINGING_SERVER);return}break;case ConnectionState.CONNECTED:if(nt==="CONNECTION_CLOSED"||nt==="CONNECTION_ERROR"){this.setFsmState(ConnectionState.PINGING_SERVER);return}break;case ConnectionState.PINGING_SERVER:if(nt==="SERVER_PING_SUCCEEDED"){this.setFsmState(ConnectionState.CONNECTING);return}break;case ConnectionState.DISCONNECTED_FOREVER:logWarning(LOG,`Discarding ${nt} while in ${ConnectionState.DISCONNECTED_FOREVER}`);return}throw new Error(`Unsupported state transition.
|
797
797
|
State: ${this.state}
|
798
|
-
Event: ${nt}`)}async pingServer(){this.uriIndex=await doInitPings(this.args.baseUriPartsList,PING_MINIMUM_RETRY_PERIOD_MS,PING_MAXIMUM_RETRY_PERIOD_MS,this.args.onRetry,this.args.onHostConfigResp),this.stepFsm("SERVER_PING_SUCCEEDED")}async getSessionTokens(){var rt,ot;const nt=await this.args.claimHostAuthToken(),et=getCookie("_streamlit_xsrf");return this.args.resetHostAuthToken(),[nt??et??"PLACEHOLDER_AUTH_TOKEN",...(rt=this.args.sessionInfo.last)!=null&&rt.sessionId?[(ot=this.args.sessionInfo.last)==null?void 0:ot.sessionId]:[]]}async connectToWebSocket(){const nt=buildWsUri(this.args.baseUriPartsList[this.uriIndex],WEBSOCKET_STREAM_PATH);if(notNullOrUndefined(this.websocket))throw new Error("Websocket already exists");const et=await this.getSessionTokens();this.websocket=new WebSocket(nt,["streamlit",...et]),this.websocket.binaryType="arraybuffer",this.setConnectionTimeout(nt);const rt=this.websocket,ot=()=>rt===this.websocket;this.websocket.addEventListener("message",at=>{ot()&&this.handleMessage(at.data).catch(st=>{const ut=`Failed to process a Websocket message (${st})`;logError(LOG,ut),this.stepFsm("FATAL_ERROR",ut)})}),this.websocket.addEventListener("open",()=>{ot()&&this.stepFsm("CONNECTION_SUCCEEDED")}),this.websocket.addEventListener("close",()=>{ot()&&(this.closeConnection(),this.stepFsm("CONNECTION_CLOSED"))}),this.websocket.addEventListener("error",()=>{ot()&&(logError(LOG,"WebSocket onerror"),this.closeConnection(),this.stepFsm("CONNECTION_ERROR"))})}setConnectionTimeout(nt){if(notNullOrUndefined(this.wsConnectionTimeoutId))throw new Error("WS timeout is already set");const et=this.websocket;this.wsConnectionTimeoutId=window.setTimeout(()=>{if(et===this.websocket&&!isNullOrUndefined$1(this.wsConnectionTimeoutId)){if(isNullOrUndefined$1(this.websocket)){this.closeConnection(),this.stepFsm("FATAL_ERROR","Null Websocket in setConnectionTimeout");return}this.websocket.readyState===0&&(this.closeConnection(),this.stepFsm("CONNECTION_TIMED_OUT"))}},WEBSOCKET_TIMEOUT_MS),logMessage(LOG,`Set WS timeout ${this.wsConnectionTimeoutId}`)}closeConnection(){this.websocket&&(this.websocket.close(),this.websocket=void 0),notNullOrUndefined(this.wsConnectionTimeoutId)&&(logMessage(LOG,`Clearing WS timeout ${this.wsConnectionTimeoutId}`),window.clearTimeout(this.wsConnectionTimeoutId),this.wsConnectionTimeoutId=void 0)}sendMessage(nt){if(!this.websocket)return;const et=BackMsg.create(nt),rt=BackMsg.encode(et).finish();this.websocket.send(rt)}incrementMessageCacheRunCount(nt){this.cache.incrementRunCount(nt)}async handleMessage(nt){const et=this.nextMessageIndex;this.nextMessageIndex+=1,PerformanceEvents.record({name:"BeginHandleMessage",messageIndex:et});const rt=new Uint8Array(nt),ot=ForwardMsg.decode(rt);for(PerformanceEvents.record({name:"DecodedMessage",messageIndex:et,messageType:ot.type,len:nt.byteLength}),this.messageQueue[et]=await this.cache.processMessagePayload(ot,rt),PerformanceEvents.record({name:"GotCachedPayload",messageIndex:et});this.lastDispatchedMessageIndex+1 in this.messageQueue;){const at=this.lastDispatchedMessageIndex+1;this.args.onMessage(this.messageQueue[at]),PerformanceEvents.record({name:"DispatchedMessage",messageIndex:at,messageType:this.messageQueue[at].type}),delete this.messageQueue[at],this.lastDispatchedMessageIndex=at}}}const RETRY_COUNT_FOR_WARNING=6;class ConnectionManager{constructor(nt){this.connectionState=ConnectionState.INITIAL,this.setConnectionState=(et,rt)=>{this.connectionState!==et&&(this.connectionState=et,this.props.connectionStateChanged(et)),rt&&this.props.onConnectionError(rt)},this.showRetryError=(et,rt,ot)=>{et===RETRY_COUNT_FOR_WARNING&&this.props.onConnectionError(rt)},this.props=nt,this.connect()}isConnected(){return this.connectionState===ConnectionState.CONNECTED}getBaseUriParts(){if(this.connection instanceof WebsocketConnection)return this.connection.getBaseUriParts()}sendMessage(nt){this.connection instanceof WebsocketConnection&&this.isConnected()?this.connection.sendMessage(nt):logError(`Cannot send message when server is disconnected: ${nt}`)}incrementMessageCacheRunCount(nt){this.connection instanceof WebsocketConnection&&this.connection.incrementMessageCacheRunCount(nt)}async connect(){try{this.connection=await this.connectToRunningServer()}catch(nt){const et=ensureError(nt);logError(et.message),this.setConnectionState(ConnectionState.DISCONNECTED_FOREVER,et.message)}}disconnect(){var nt;(nt=this.connection)==null||nt.disconnect()}connectToRunningServer(){const nt=getPossibleBaseUris();return new WebsocketConnection({sessionInfo:this.props.sessionInfo,endpoints:this.props.endpoints,baseUriPartsList:nt,onMessage:this.props.onMessage,onConnectionStateChange:this.setConnectionState,onRetry:this.showRetryError,claimHostAuthToken:this.props.claimHostAuthToken,resetHostAuthToken:this.props.resetHostAuthToken,onHostConfigResp:this.props.onHostConfigResp})}}class SessionEventDispatcher{constructor(){this.onSessionEvent=new dist.Signal}handleSessionEventMsg(nt){this.onSessionEvent.emit(nt)}}const MEDIA_ENDPOINT="/media",UPLOAD_FILE_ENDPOINT="/_stcore/upload_file",COMPONENT_ENDPOINT_BASE="/component",FORWARD_MSG_CACHE_ENDPOINT="/_stcore/message";class DefaultStreamlitEndpoints{constructor(nt){this.getServerUri=nt.getServerUri,this.csrfEnabled=nt.csrfEnabled}buildComponentURL(nt,et){return buildHttpUri(this.requireServerUri(),`${COMPONENT_ENDPOINT_BASE}/${nt}/${et}`)}setFileUploadClientConfig({prefix:nt,headers:et}){this.fileUploadClientConfig={prefix:nt,headers:et}}buildMediaURL(nt){return nt.startsWith(MEDIA_ENDPOINT)?buildHttpUri(this.requireServerUri(),nt):nt}buildFileUploadURL(nt){return this.fileUploadClientConfig?makePath(this.fileUploadClientConfig.prefix,nt):nt.startsWith(UPLOAD_FILE_ENDPOINT)?buildHttpUri(this.requireServerUri(),nt):nt}buildAppPageURL(nt,et){const rt=et.urlPathname,ot=et.isDefault?"":rt;if(notNullOrUndefined(nt)&&nt.length>0)return`${nt}/${ot}`;const{port:at,protocol:st}=window.location,{basePath:ut,host:ct}=this.requireServerUri(),pt=at?`:${at}`:"",dt=ut?`${ut}/`:"";return`${st}//${ct}${pt}/${dt}${ot}`}async uploadFileUploaderFile(nt,et,rt,ot,at){const st=new FormData;st.append(et.name,et);const ut=this.getAdditionalHeaders();return this.csrfRequest(this.buildFileUploadURL(nt),{cancelToken:at,method:"PUT",data:st,responseType:"text",headers:ut,onUploadProgress:ot}).then(()=>{})}getAdditionalHeaders(){let nt={};return this.fileUploadClientConfig&&(nt={...nt,...this.fileUploadClientConfig.headers}),nt}async deleteFileAtURL(nt,et){const rt=this.getAdditionalHeaders();return this.csrfRequest(this.buildFileUploadURL(nt),{method:"DELETE",data:{sessionId:et},headers:rt}).then(()=>{})}async fetchCachedForwardMsg(nt){const et=this.requireServerUri(),rt=await axios.request({url:buildHttpUri(et,`${FORWARD_MSG_CACHE_ENDPOINT}?hash=${nt}`),method:"GET",responseType:"arraybuffer"});return new Uint8Array(rt.data)}requireServerUri(){const nt=this.getServerUri();if(notNullOrUndefined(nt))return this.cachedServerUri=nt,nt;if(notNullOrUndefined(this.cachedServerUri))return this.cachedServerUri;throw new Error("not connected to a server!")}csrfRequest(nt,et){if(et.url=nt,this.csrfEnabled){const rt=getCookie("_streamlit_xsrf");notNullOrUndefined(rt)&&(et.headers={"X-Xsrftoken":rt,...et.headers||{}},et.withCredentials=!0)}return axios.request(et)}}var assignValue=_assignValue,castPath$1=_castPath,isIndex=_isIndex,isObject=isObject_1,toKey=_toKey;function baseSet$1(tt,nt,et,rt){if(!isObject(tt))return tt;nt=castPath$1(nt,tt);for(var ot=-1,at=nt.length,st=at-1,ut=tt;ut!=null&&++ot<at;){var ct=toKey(nt[ot]),pt=et;if(ct==="__proto__"||ct==="constructor"||ct==="prototype")return tt;if(ot!=st){var dt=ut[ct];pt=rt?rt(dt,ct,ut):void 0,pt===void 0&&(pt=isObject(dt)?dt:isIndex(nt[ot+1])?[]:{})}assignValue(ut,ct,pt),ut=ut[ct]}return tt}var _baseSet=baseSet$1,baseGet=_baseGet,baseSet=_baseSet,castPath=_castPath;function basePickBy$1(tt,nt,et){for(var rt=-1,ot=nt.length,at={};++rt<ot;){var st=nt[rt],ut=baseGet(tt,st);et(ut,st)&&baseSet(at,castPath(st,tt),ut)}return at}var _basePickBy=basePickBy$1,basePickBy=_basePickBy,hasIn=hasIn_1;function basePick$1(tt,nt){return basePickBy(tt,nt,function(et,rt){return hasIn(tt,rt)})}var _basePick=basePick$1,basePick=_basePick,flatRest=_flatRest,pick=flatRest(function(tt,nt){return tt==null?{}:basePick(tt,nt)}),pick_1=pick;const pick$1=getDefaultExportFromCjs$1(pick_1),DEFAULT_METRICS_CONFIG="https://data.streamlit.io/metrics.json";class MetricsManager{constructor(nt){this.initialized=!1,this.actuallySendMetrics=!1,this.metricsUrl=void 0,this.sendMessageToHost=()=>{},this.anonymousId="",this.pendingEvents=[],this.appHash="Not initialized",this.metadata={},this.setAppHash=et=>{this.appHash=et},this.setMetricsConfig=(et="")=>{this.metricsUrl=et},this.sessionInfo=nt}async initialize({gatherUsageStats:nt,sendMessageToHost:et}){this.sendMessageToHost=et,this.actuallySendMetrics=nt&&this.metricsUrl!=="off",this.getAnonymousId(),this.actuallySendMetrics&&!this.metricsUrl&&(await this.requestDefaultMetricsConfig(),this.metricsUrl||(logError("Undefined metrics config - deactivating metrics tracking."),this.actuallySendMetrics=!1)),this.actuallySendMetrics&&this.sendPendingEvents(),logAlways("Gather usage stats: ",this.actuallySendMetrics),this.initialized=!0}enqueue(nt,et={}){if(!this.initialized||!this.sessionInfo.isSet){this.pendingEvents.push([nt,et]);return}this.actuallySendMetrics&&(this.pendingEvents.length&&this.sendPendingEvents(),this.send(nt,et))}setMetadata(nt){this.metadata=nt}async requestDefaultMetricsConfig(){const nt=localStorageAvailable();if(nt){const et=window.localStorage.getItem("stMetricsConfig");if(et){this.metricsUrl=et;return}}try{const et=await fetch(DEFAULT_METRICS_CONFIG,{signal:AbortSignal.timeout(5e3)});if(!et.ok)this.metricsUrl=void 0,logError("Failed to fetch metrics config: ",et.status);else{const rt=await et.json();this.metricsUrl=rt.url??void 0,nt&&this.metricsUrl&&window.localStorage.setItem("stMetricsConfig",this.metricsUrl)}}catch(et){logError("Failed to fetch metrics config:",et)}}send(nt,et={}){const rt=this.buildEventProto(nt,et);this.metricsUrl==="postMessage"?this.postMessageEvent(nt,rt):this.track(rt)}sendPendingEvents(){this.pendingEvents.forEach(([nt,et])=>{this.send(nt,et)}),this.pendingEvents=[]}async track(nt){const et=new Request(this.metricsUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(nt.toJSON())});await fetch(et)}postMessageEvent(nt,et){this.sendMessageToHost({type:"METRICS_EVENT",eventName:nt,data:et})}buildEventProto(nt,et){const rt=new MetricsEvent({event:nt,anonymousId:this.anonymousId,...this.getHostTrackingData(),...this.getInstallationData(),reportHash:this.appHash,dev:IS_DEV_ENV,source:"browser",streamlitVersion:this.sessionInfo.current.streamlitVersion,isHello:this.sessionInfo.isHello,...this.getContextData()});if(nt==="menuClick")rt.label=et.label;else if(nt==="pageProfile")return new MetricsEvent({...rt,...et});return rt}getInstallationData(){return{machineIdV3:this.sessionInfo.current.installationIdV3}}getHostTrackingData(){return this.metadata?pick$1(this.metadata,["hostedAt","owner","repo","branch","mainModule","creatorId"]):{}}getContextData(){return{contextPageUrl:window.location.href,contextPageTitle:document.title,contextPagePath:window.location.pathname,contextPageReferrer:document.referrer,contextPageSearch:window.location.search,contextLocale:window.navigator.language,contextUserAgent:window.navigator.userAgent}}getAnonymousId(){if(!this.actuallySendMetrics)return;const nt="ajs_anonymous_id",et=localStorageAvailable(),rt=getCookie(nt),ot=et?window.localStorage.getItem(nt):null,at=new Date;at.setFullYear(new Date().getFullYear()+1),rt?(this.anonymousId=rt,et&&window.localStorage.setItem(nt,rt)):ot?(this.anonymousId=JSON.parse(ot),setCookie(nt,this.anonymousId,at)):(this.anonymousId=v4(),setCookie(nt,this.anonymousId,at),et&&window.localStorage.setItem(nt,this.anonymousId))}}const StyledApp=newStyled("div",{target:"ee4bbma0"})(({theme:tt})=>{const nt=hasLightBackgroundColor(tt);return{position:"absolute",background:tt.colors.bgColor,color:tt.colors.bodyText,top:tt.spacing.none,left:tt.spacing.none,right:tt.spacing.none,bottom:tt.spacing.none,colorScheme:nt?"light":"dark",overflow:"hidden","@media print":{float:"none",height:tt.sizes.full,position:"static",overflow:"visible"}}}),StyledRecordAudioLabel=newStyled("label",{target:"ej964cx0"})({margin:0}),StyledInstruction=newStyled("p",{target:"ej964cx1"})({margin:0}),ScreencastDialog=({onClose:tt,toggleRecordAudio:nt,recordAudio:et,startRecording:rt})=>{const[ot,at]=reactExports.useState(et),st=reactExports.useCallback(ct=>{const{checked:pt}=ct.target;pt!==ot&&(at(pt),nt())},[ot,nt]),ut=reactExports.useCallback(()=>{rt(),tt()},[rt,tt]);return jsxs(Modal,{isOpen:!0,onClose:tt,children:[jsx$1(ModalHeader,{children:"Record a screencast"}),jsxs(ModalBody$1,{children:[jsx$1("p",{children:"This will record a video with the contents of your screen, so you can easily share what you're seeing with others."}),jsx$1("p",{children:jsxs(StyledRecordAudioLabel,{"data-testid":"stScreencastAudioCheckbox",children:[jsx$1("input",{type:"checkbox",name:"recordAudio",checked:ot,onChange:st})," ","Also record audio"]})}),jsx$1(StyledInstruction,{"data-testid":"stScreencastInstruction",children:jsx$1(StreamlitMarkdown$1,{source:"Press `Esc` any time to stop recording.",allowHTML:!1})})]}),jsx$1(ModalFooter,{children:jsx$1(ModalButton,{kind:BaseButtonKind.SECONDARY,onClick:ut,children:"Start recording!"})})]})},StyledVideo=newStyled("video",{target:"emkt0dj0"})(({theme:tt})=>({width:tt.sizes.full,borderRadius:tt.radii.md})),StyledDialogContainer=newStyled("div",{target:"emkt0dj1"})(({theme:tt})=>({display:"flex",flexDirection:"column",width:tt.sizes.full})),StyledRow=newStyled("div",{target:"emkt0dj2"})(({theme:tt})=>({display:"flex",flexDirection:"row",paddingTop:tt.spacing.md,paddingBottom:tt.spacing.md})),StyledFirstColumn=newStyled("div",{target:"emkt0dj3"})(({theme:tt})=>({paddingRight:tt.spacing.lg,textAlign:"right",color:tt.colors.gray,fontWeight:tt.fontWeights.bold,width:"6em"})),StyledSecondColumn=newStyled("div",{target:"emkt0dj4"})(({theme:tt})=>({flex:1,paddingRight:tt.spacing.lg,marginRight:"6em",[`@media (max-width: ${tt.breakpoints.sm})`]:{marginRight:tt.spacing.none}})),StyledVideoFormatInstructions=newStyled("p",{target:"emkt0dj5"})(({theme:tt})=>({marginTop:tt.spacing.sm,marginBottom:tt.spacing.none,fontSize:tt.fontSizes.sm})),StyledDownloadButtonContainer=newStyled("div",{target:"emkt0dj6"})(({theme:tt})=>({marginTop:tt.spacing.twoXS})),VideoRecordedDialog=({onClose:tt,videoBlob:nt,fileName:et})=>{const rt=URL.createObjectURL(nt),ot=()=>{const at=document.createElement("a");at.setAttribute("href",rt),at.setAttribute("download",`${et}.webm`),at.click(),tt()};return jsxs(Modal,{isOpen:!0,onClose:tt,overrides:{Dialog:{style:{width:"80vw"}}},children:[jsx$1(ModalHeader,{children:"Next steps"}),jsx$1(ModalBody$1,{children:jsxs(StyledDialogContainer,{"data-testid":"stVideoRecordedDialog",children:[jsxs(StyledRow,{children:[jsx$1(StyledFirstColumn,{children:"Step 1"}),jsxs(StyledSecondColumn,{children:[jsx$1("p",{children:"Preview your video below:"}),jsx$1(StyledVideo,{src:rt,controls:!0})]})]}),jsxs(StyledRow,{children:[jsx$1(StyledFirstColumn,{children:"Step 2"}),jsxs(StyledSecondColumn,{children:[jsx$1(StyledDownloadButtonContainer,{children:jsx$1(BaseButton,{kind:BaseButtonKind.SECONDARY,onClick:ot,children:"Save video to disk"})}),jsxs(StyledVideoFormatInstructions,{children:["This video is encoded in the"," ",jsx$1("a",{href:"https://www.webmproject.org/",children:"WebM format"}),", which is only supported by newer video players. You can also play it by dragging the file directly into your browser."]})]})]}),jsxs(StyledRow,{children:[jsx$1(StyledFirstColumn,{children:"Step 3"}),jsxs(StyledSecondColumn,{children:["Share your video with the world on Twitter, LinkedIn, YouTube, or just plain email!"," ",jsx$1("span",{role:"img","aria-label":"Happy",children:"😀"})]})]})]})})]})},StyledScreenCastWarningDialog=newStyled("div",{target:"e1o5y2010"})({display:"flex"}),StyledUnsupportedScreenCastIcon=newStyled("div",{target:"e1o5y2011"})(({theme:tt})=>({display:"flex",alignItems:"center",justifyItems:"center",marginRight:tt.spacing.twoXL,marginLeft:tt.spacing.sm,fontSize:tt.fontSizes.fourXL})),StyledUnsupportedScreenCastExplanation=newStyled("p",{target:"e1o5y2012"})(({theme:tt})=>({margin:tt.spacing.none})),UnsupportedBrowserDialog=({onClose:tt})=>jsxs(Modal,{isOpen:!0,onClose:tt,children:[jsx$1(ModalHeader,{children:"Record a screencast"}),jsx$1(ModalBody$1,{children:jsxs(StyledScreenCastWarningDialog,{"data-testid":"stUnsupportedBrowserDialog",children:[jsx$1(StyledUnsupportedScreenCastIcon,{children:jsx$1("span",{role:"img","aria-label":"Alien Monster",children:"👾"})}),jsx$1(StyledUnsupportedScreenCastExplanation,{children:"Due to limitations with some browsers, this feature is only supported on recent desktop versions of Chrome, Firefox, and Edge."})]})})]}),UnsupportedBrowserDialog$1=reactExports.memo(UnsupportedBrowserDialog),screencastCounterAnimation=keyframes("0%{opacity:0;}25%{opacity:1;}100%{opacity:0;}"),StyledCountdown=newStyled("div",{target:"evez3ra0"})(({theme:tt})=>({position:"fixed",display:"flex",justifyContent:"center",alignItems:"center",top:0,left:0,width:tt.sizes.full,height:tt.sizes.full,fontSize:"40vh",color:tt.colors.red,fontWeight:tt.fontWeights.bold,opacity:"0.8",textShadow:`1px 1px 10px ${tt.colors.darkGray}`,transition:"opacity 0.3s ease-in-out",animation:`${screencastCounterAnimation} 1s`})),Countdown=({countdown:tt,endCallback:nt})=>{const[et,rt]=reactExports.useState(tt);return jsx$1(StyledCountdown,{"data-testid":"stCountdown",onAnimationEnd:()=>{const at=et-1;at>=0&&rt(at),at===0&&nt()},children:jsx$1("span",{children:et})},`frame${et}`)};function withScreencast(tt){const et=class et extends reactExports.PureComponent{constructor(){super(...arguments),this.state={fileName:"streamlit-screencast",recordAudio:!1,currentState:this.props.testOverride||"OFF"},this.toggleRecordAudio=()=>{const{recordAudio:ot}=this.state;this.setState({recordAudio:!ot})},this.showDialog=ot=>{const{currentState:at}=this.state;ScreenCastRecorder.isSupportedBrowser()?at==="OFF"?this.setState({fileName:ot,currentState:"SETUP"}):this.stopRecording().catch(st=>logWarning(`withScreencast.stopRecording threw an error: ${st}`)):this.setState({currentState:"UNSUPPORTED"})},this.startRecording=async()=>{const{recordAudio:ot}=this.state;this.recorder=new ScreenCastRecorder({recordAudio:ot,onErrorOrStop:()=>this.stopRecording()});try{await this.recorder.initialize()}catch{this.setState({currentState:"UNSUPPORTED"});return}this.setState({currentState:"COUNTDOWN"})},this.stopRecording=async()=>{let ot;const{currentState:at}=this.state;at==="OFF"||isNullOrUndefined$1(this.recorder)||(at==="COUNTDOWN"&&this.setState({currentState:"OFF"}),at==="RECORDING"&&(this.recorder.getState()==="inactive"?this.setState({currentState:"OFF"}):(ot=await this.recorder.stop(),this.setState({outputBlob:ot,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(at=>logWarning(`withScreencast.stopRecording threw an error: ${at}`))},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:ot,fileName:at,recordAudio:st,currentState:ut}=this.state;return jsxs("div",{className:"withScreencast","data-testid":"stScreencast",children:[jsx$1(tt,{...this.props,screenCast:this.getScreenCastProps()}),ut==="UNSUPPORTED"&&jsx$1(UnsupportedBrowserDialog$1,{onClose:this.closeDialog}),ut==="SETUP"&&jsx$1(ScreencastDialog,{recordAudio:st,onClose:this.closeDialog,startRecording:this.startRecording,toggleRecordAudio:this.toggleRecordAudio}),ut==="COUNTDOWN"&&jsx$1(Countdown,{countdown:3,endCallback:this.onCountdownEnd}),ut==="PREVIEW_FILE"&&ot&&jsx$1(VideoRecordedDialog,{onClose:this.closeDialog,videoBlob:ot,fileName:at})]})}}};et.displayName=`withScreencast(${tt.displayName||tt.name})`;let nt=et;return hoistNonReactStatics$2(nt,tt)}const showDevelopmentOptions=(tt,nt)=>nt==Config.ToolbarMode.DEVELOPER?!0:Config.ToolbarMode.VIEWER==nt||Config.ToolbarMode.MINIMAL==nt?!1:tt||isLocalhost();function getTitle(tt){return tt||"Streamlit"}class StrategyV1{constructor(nt){this.appNav=nt,this.appPages=[],this.currentPageScriptHash=null,this.hideSidebarNav=null}handleNewSession(nt){var st,ut;this.appPages=nt.appPages,this.currentPageScriptHash=nt.pageScriptHash,this.hideSidebarNav=((st=nt.config)==null?void 0:st.hideSidebarNav)??!1;const et=this.appPages[0],rt=et.urlPathname??"",ot=((ut=this.appPages.find(ct=>ct.pageScriptHash===this.currentPageScriptHash))==null?void 0:ut.urlPathname)??"",at=et.pageScriptHash===this.currentPageScriptHash;return this.appNav.onUpdatePageUrl(rt,ot,at),document.title=getTitle(ot??""),[{hideSidebarNav:this.hideSidebarNav,appPages:this.appPages,currentPageScriptHash:this.currentPageScriptHash},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_APP_PAGES",appPages:this.appPages}),this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:at?"":ot,currentPageScriptHash:this.currentPageScriptHash})}]}handlePagesChanged(nt){const{appPages:et}=nt;return[{appPages:et},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_APP_PAGES",appPages:et})}]}handlePageNotFound(nt){var ot;const{pageName:et}=nt;this.appNav.onPageNotFound(et);const rt=((ot=this.appPages[0])==null?void 0:ot.pageScriptHash)??"";return this.currentPageScriptHash=rt,[{currentPageScriptHash:rt},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:"",currentPageScriptHash:rt})}]}handleNavigation(nt){}findPageByUrlPath(nt){return this.appPages.length===0?null:this.appPages.find(et=>nt.endsWith("/"+et.urlPathname))??this.appPages[0]}clearPageElements(nt,et,rt){return AppRoot.empty(et,!1,rt,nt.logo)}}class StrategyV2{constructor(nt){this.appNav=nt,this.mainScriptHash=null,this.appPages=[],this.mainPage=null,this.hideSidebarNav=null}handleNewSession(nt){var et;return this.mainScriptHash=nt.mainScriptHash,this.hideSidebarNav===null&&(this.hideSidebarNav=((et=nt.config)==null?void 0:et.hideSidebarNav)??null),document.title=getTitle(""),[{hideSidebarNav:this.hideSidebarNav??!1},()=>{}]}handlePagesChanged(nt){}handlePageNotFound(nt){const{pageName:et}=nt;return this.appNav.onPageNotFound(et),[{currentPageScriptHash:this.mainScriptHash??""},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:"",currentPageScriptHash:this.mainScriptHash??""})}]}handleNavigation(nt){const{sections:et,position:rt,appPages:ot}=nt;this.appPages=ot,this.hideSidebarNav=rt===Navigation.Position.HIDDEN;const at=nt.pageScriptHash,st=ot.find(pt=>pt.pageScriptHash===at),ut=ot.find(pt=>pt.isDefault);this.mainPage=ut;const ct=st.urlPathname;if(!this.appNav.isPageTitleSet){const pt=getTitle(st.pageName);document.title=pt,this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_PAGE_TITLE",title:st.pageName??""})}return!this.appNav.isPageIconSet&&st.icon&&this.appNav.onPageIconChange(st.icon),this.appNav.onUpdatePageUrl(ut.urlPathname??"",ct,st.isDefault??!1),[{appPages:ot,navSections:et,hideSidebarNav:this.hideSidebarNav,expandSidebarNav:nt.expanded,currentPageScriptHash:at},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_APP_PAGES",appPages:ot}),this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:st.isDefault?"":ct,currentPageScriptHash:at})}]}findPageByUrlPath(nt){return this.appPages.find(et=>nt.endsWith("/"+et.urlPathname))??this.mainPage}clearPageElements(nt,et,rt){return nt.filterMainScriptElements(et)}}class AppNavigation{constructor(nt,et,rt,ot){this.hostCommunicationMgr=nt,this.onUpdatePageUrl=et,this.onPageNotFound=rt,this.onPageIconChange=ot,this.isPageIconSet=!1,this.isPageTitleSet=!1,this.strategy=new StrategyV1(this)}handleNewSession(nt){return this.isPageTitleSet=!1,this.isPageIconSet=!1,this.strategy.handleNewSession(nt)}handleNavigation(nt){return this.strategy instanceof StrategyV1&&(this.strategy=new StrategyV2(this)),this.strategy.handleNavigation(nt)}handlePagesChanged(nt){return this.strategy.handlePagesChanged(nt)}handlePageNotFound(nt){return this.strategy.handlePageNotFound(nt)}findPageByUrlPath(nt){return this.strategy.findPageByUrlPath(nt)}handlePageConfigChanged(nt){this.isPageIconSet=!!nt.favicon,this.isPageTitleSet=!!nt.title}clearPageElements(nt,et,rt){return this.strategy.clearPageElements(nt,et,rt)}}const ELEMENT_LIST_BUFFER_TIMEOUT_MS=10,INITIAL_SCRIPT_RUN_ID="<null>";class App extends reactExports.PureComponent{constructor(nt){super(nt),this.sessionInfo=new SessionInfo,this.metricsMgr=new MetricsManager(this.sessionInfo),this.sessionEventDispatcher=new SessionEventDispatcher,this.embeddingId=generateUID$2(),this.showDeployError=(rt,ot,at)=>{this.openDialog({type:DialogType.DEPLOY_ERROR,title:rt,msg:ot,onContinue:at,onClose:()=>{},onTryAgain:this.sendLoadGitInfoBackMsg})},this.handleThemeMessage=(rt,ot)=>{const[,at,st]=createPresetThemes(),ut=isPresetTheme(this.props.theme.activeTheme);rt===at.name&&ut?this.props.theme.setTheme(at):rt===st.name&&ut?this.props.theme.setTheme(st):ot&&this.props.theme.setImportedTheme(ot)},this.handleConnectionStateChanged=rt=>{if(logMessage(`Connection state changed from ${this.state.connectionState} to ${rt}`),rt===ConnectionState.CONNECTED){const ot=this.state.scriptRunState===ScriptRunState.RERUN_REQUESTED||this.state.scriptRunState===ScriptRunState.RUNNING;(!this.sessionInfo.last||ot)&&(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:rt!==ConnectionState.DISCONNECTED_FOREVER}),this.sessionInfo.isSet&&this.sessionInfo.clearCurrent();this.setState({connectionState:rt})},this.handleGitInfoChanged=rt=>{this.setState({gitInfo:rt})},this.handleCustomParentMessage=rt=>{this.state.appConfig.enableCustomParentMessages?this.hostCommunicationMgr.sendMessageToHost({type:"CUSTOM_PARENT_MESSAGE",message:rt.message}):logError("Sending messages to the host is disabled in line with the platform policy.")},this.handleMessage=rt=>{const ot=(at,st,ut)=>{const ct=at[st];if(ct in ut)return ut[ct](at[ct]);throw new Error(`Cannot handle ${st} "${ct}".`)};try{ot(rt,"type",{newSession:at=>this.handleNewSession(at),sessionStatusChanged:at=>this.handleSessionStatusChanged(at),sessionEvent:at=>this.handleSessionEvent(at),delta:at=>this.handleDeltaMsg(at,rt.metadata),pageConfigChanged:at=>this.handlePageConfigChanged(at),pageInfoChanged:at=>this.handlePageInfoChanged(at),pagesChanged:at=>this.handlePagesChanged(at),pageNotFound:at=>this.handlePageNotFound(at),gitInfoChanged:at=>this.handleGitInfoChanged(at),scriptFinished:at=>this.handleScriptFinished(at),pageProfile:at=>this.handlePageProfileMsg(at),autoRerun:at=>this.handleAutoRerun(at),fileUrlsResponse:at=>this.uploadClient.onFileURLsResponse(at),parentMessage:at=>this.handleCustomParentMessage(at),logo:at=>this.handleLogo(at,rt.metadata),navigation:at=>this.handleNavigation(at),authRedirect:at=>{isInChildFrame()?this.hostCommunicationMgr.sendMessageToSameOriginHost({type:"REDIRECT_TO_URL",url:at.url}):window.location.href=at.url}})}catch(at){const st=ensureError(at);logError(st),this.showError("Bad message format",st.message)}},this.handleLogo=(rt,ot)=>{const at={activeScriptHash:ot.activeScriptHash,scriptRunId:this.state.scriptRunId};this.setState({elements:this.pendingElementsBuffer.appRootWithLogo(rt,at)},()=>{this.pendingElementsBuffer=this.state.elements})},this.handlePageConfigChanged=rt=>{const{title:ot,favicon:at,layout:st,initialSidebarState:ut,menuItems:ct}=rt;this.appNavigation.handlePageConfigChanged(rt),ot&&(this.hostCommunicationMgr.sendMessageToHost({type:"SET_PAGE_TITLE",title:ot}),document.title=ot),at&&this.onPageIconChanged(at),st!==this.state.layout&&this.setState(pt=>({layout:st,userSettings:{...pt.userSettings,wideMode:st===PageConfig.Layout.WIDE}})),ut!==this.state.initialSidebarState&&this.setState(()=>({initialSidebarState:ut})),this.setState({menuItems:ct})},this.handlePageInfoChanged=rt=>{const{queryString:ot}=rt,at=document.location.pathname+(ot?`?${ot}`:"");window.history.pushState({},"",at),this.hostCommunicationMgr.sendMessageToHost({type:"SET_QUERY_PARAM",queryParams:ot?`?${ot}`:""})},this.onPageNotFound=rt=>{const ot=rt?`You have requested page /${rt}, but no corresponding file was found in the app's pages/ directory`:"The page that you have requested does not seem to exist";this.showError("Page not found",`${ot}. Running the app's main page.`)},this.handlePageNotFound=rt=>{this.maybeSetState(this.appNavigation.handlePageNotFound(rt))},this.onPageIconChanged=rt=>{handleFavicon(rt,this.hostCommunicationMgr.sendMessageToHost,this.endpoints)},this.handlePagesChanged=rt=>{this.maybeSetState(this.appNavigation.handlePagesChanged(rt))},this.handleNavigation=rt=>{this.maybeSetState(this.appNavigation.handleNavigation(rt))},this.handlePageProfileMsg=rt=>{var st,ut,ct;const ot=PageProfile.toObject(rt),at=getBrowserInfo();this.metricsMgr.enqueue("pageProfile",{...ot,isFragmentRun:!!ot.isFragmentRun,appId:this.sessionInfo.current.appId,numPages:(st=this.state.appPages)==null?void 0:st.length,sessionId:this.sessionInfo.current.sessionId,pythonVersion:this.sessionInfo.current.pythonVersion,pageScriptHash:this.state.currentPageScriptHash,activeTheme:(ct=(ut=this.props.theme)==null?void 0:ut.activeTheme)==null?void 0:ct.name,totalLoadTime:Math.round((performance.now()-this.state.latestRunTime)*1e3),browserInfo:at})},this.handleAutoRerun=rt=>{const ot=setInterval(()=>{this.widgetMgr.sendUpdateWidgetsMessage(rt.fragmentId,!0)},rt.interval*1e3);this.setState(at=>({autoReruns:[...at.autoReruns,ot]}))},this.handleSessionStatusChanged=rt=>{this.setState(ot=>{let{scriptRunState:at}=ot,{dialog:st}=ot;return rt.scriptIsRunning&&ot.scriptRunState!==ScriptRunState.STOP_REQUESTED?(at=ScriptRunState.RUNNING,notNullOrUndefined(st)&&st.type===DialogType.SCRIPT_COMPILE_ERROR&&(st=void 0)):!rt.scriptIsRunning&&ot.scriptRunState!==ScriptRunState.RERUN_REQUESTED&&ot.scriptRunState!==ScriptRunState.COMPILATION_ERROR&&(at=ScriptRunState.NOT_RUNNING),{userSettings:{...ot.userSettings,runOnSave:!!rt.runOnSave},dialog:st,scriptRunState:at}})},this.handleSessionEvent=rt=>{if(this.sessionEventDispatcher.handleSessionEventMsg(rt),rt.type==="scriptCompilationException"){this.setState({scriptRunState:ScriptRunState.COMPILATION_ERROR});const ot={type:DialogType.SCRIPT_COMPILE_ERROR,exception:rt.scriptCompilationException,onClose:()=>{}};this.openDialog(ot)}},this.maybeUpdatePageUrl=(rt,ot,at)=>{const st=this.getBaseUriParts();if(st){const{basePath:ut}=st,ct=extractPageNameFromPathName(document.location.pathname,ut);if((ct===""?rt:ct)!==ot){const dt=at?"":ot,ft=preserveEmbedQueryParams(),bt=ft?`?${ft}`:"",Mt=`${ut?`/${ut}`:""}/${dt}${bt}`;window.history.pushState({},"",Mt)}}},this.handleNewSession=rt=>{const ot=rt.initialize;if(this.hasStreamlitVersionChanged(ot)){window.location.reload();return}this.sessionInfo.isSet||this.handleOneTimeInitialization(rt);const{appHash:at,currentPageScriptHash:st}=this.state,{scriptRunId:ut,name:ct,mainScriptPath:pt,fragmentIdsThisRun:dt,pageScriptHash:ft,mainScriptHash:bt}=rt;if(dt.length)this.setState({fragmentIdsThisRun:dt,latestRunTime:performance.now()});else{this.cleanupAutoReruns();const Mt=rt.config,mt=rt.customTheme;this.processThemeInput(mt),this.setState({allowRunOnSave:Mt.allowRunOnSave,hideTopBar:Mt.hideTopBar,toolbarMode:Mt.toolbarMode,latestRunTime:performance.now(),mainScriptHash:bt,fragmentIdsThisRun:dt}),this.maybeSetState(this.appNavigation.handleNewSession(rt)),this.onPageIconChanged("./favicon.png")}const ht=hashString(this.sessionInfo.current.installationId+pt);this.metricsMgr.setMetadata(this.state.deployedAppMetadata),this.metricsMgr.setAppHash(ht),this.metricsMgr.enqueue("updateReport"),at===ht&&st===ft?this.setState({scriptRunId:ut}):this.clearAppState(ht,ut,ct,bt)},this.handleOneTimeInitialization=rt=>{const ot=rt.initialize,at=rt.config;this.sessionInfo.setCurrent(SessionInfo.propsFromNewSessionMessage(rt)),this.metricsMgr.initialize({gatherUsageStats:at.gatherUsageStats,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost}),this.handleSessionStatusChanged(ot.sessionStatus)},this.onHistoryChange=()=>{const{currentPageScriptHash:rt}=this.state,ot=this.appNavigation.findPageByUrlPath(document.location.pathname),at=document.location.toString().includes("#"),st=(ot==null?void 0:ot.pageScriptHash)===rt;isNullOrUndefined$1(ot)||at&&st||this.onPageChange(ot.pageScriptHash)},this.setAndSendTheme=rt=>{this.props.theme.setTheme(rt),this.hostCommunicationMgr.sendMessageToHost({type:"SET_THEME_CONFIG",themeInfo:toExportedTheme(rt.emotion)})},this.createThemeHash=rt=>{if(!rt)return"hash_for_undefined_custom_theme";const ot=Object.entries(rt);return ot.sort(),hashString(ot.join(":"))},this.closeDialog=()=>{this.setState({dialog:void 0})},this.saveSettings=rt=>{const{runOnSave:ot}=this.state.userSettings,{runOnSave:at}=rt;if(this.setState({userSettings:rt}),ot!==at&&this.isServerConnected()){const st=new BackMsg({setRunOnSave:at});st.type="setRunOnSave",this.sendBackMsg(st)}},this.handleDeltaMsg=(rt,ot)=>{if(this.pendingElementsBuffer=this.pendingElementsBuffer.applyDelta(this.state.scriptRunId,rt,ot),!this.pendingElementsTimerRunning){this.pendingElementsTimerRunning=!0;const at=this.state.scriptRunState===ScriptRunState.RUNNING;setTimeout(()=>{this.pendingElementsTimerRunning=!1,at&&this.setState({elements:this.pendingElementsBuffer})},ELEMENT_LIST_BUFFER_TIMEOUT_MS)}},this.debugShutdownRuntime=()=>{if(this.isServerConnected()){const rt=new BackMsg({debugShutdownRuntime:!0});rt.type="debugShutdownRuntime",this.sendBackMsg(rt)}},this.debugDisconnectWebsocket=()=>{if(this.isServerConnected()){const rt=new BackMsg({debugDisconnectWebsocket:!0});rt.type="debugDisconnectWebsocket",this.sendBackMsg(rt)}},this.debugClearForwardMsgCache=()=>{var rt,ot;isLocalhost()&&((ot=(rt=this.connectionManager)==null?void 0:rt.connection)==null||ot.cache.messages.clear())},this.cleanupAutoReruns=()=>{this.state.autoReruns.forEach(rt=>{clearInterval(rt)}),this.setState({autoReruns:[]})},this.rerunScript=(rt=!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}),rt===!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=rt=>{const{elements:ot,mainScriptHash:at}=this.state;this.cleanupAutoReruns();const st=this.appNavigation.clearPageElements(ot,at,void 0),ut=new Set(Array.from(st.getElements()).map(ct=>getElementId(ct)).filter(notUndefined));this.sendRerunBackMsg(this.widgetMgr.getActiveWidgetStates(ut),void 0,rt)},this.isAppInReadyState=rt=>this.state.connectionState===ConnectionState.CONNECTED&&this.state.scriptRunState===ScriptRunState.NOT_RUNNING&&rt.scriptRunState===ScriptRunState.RUNNING&&rt.connectionState===ConnectionState.CONNECTED,this.sendRerunBackMsg=(rt,ot,at,st)=>{const ut=this.getBaseUriParts();if(!ut){logError("Cannot send rerun backMessage when disconnected from server.");return}const{currentPageScriptHash:ct}=this.state,{basePath:pt}=ut;let dt=this.getQueryString(),ft="";at?at!=ct&&(dt=preserveEmbedQueryParams(),this.hostCommunicationMgr.sendMessageToHost({type:"SET_QUERY_PARAM",queryParams:dt})):ct?at=ct:(ft=extractPageNameFromPathName(document.location.pathname,pt),at=""),this.sendBackMsg(new BackMsg({rerunScript:{queryString:dt,widgetStates:rt,pageScriptHash:at,pageName:ft,fragmentId:ot,isAutoRerun:st}})),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 rt=new BackMsg({stopScript:!0});rt.type="stopScript",this.sendBackMsg(rt),this.setState({scriptRunState:ScriptRunState.STOP_REQUESTED})},this.openClearCacheDialog=()=>{if(this.isServerConnected()){const rt={type:DialogType.CLEAR_CACHE,confirmCallback:this.clearCache,defaultAction:this.clearCache,onClose:()=>{}};this.openDialog(rt)}else logError("Cannot clear cache: disconnected from server")},this.openDeployDialog=()=>{var ot;const rt={type:DialogType.DEPLOY_DIALOG,onClose:this.closeDialog,showDeployError:this.showDeployError,isDeployErrorModalOpen:((ot=this.state.dialog)==null?void 0:ot.type)===DialogType.DEPLOY_ERROR,metricsMgr:this.metricsMgr};this.openDialog(rt)},this.openThemeCreatorDialog=()=>{this.metricsMgr.enqueue("menuClick",{label:"editTheme"});const rt={type:DialogType.THEME_CREATOR,backToSettings:this.settingsCallback,onClose:this.closeDialog,metricsMgr:this.metricsMgr};this.openDialog(rt)},this.clearCache=()=>{if(this.closeDialog(),this.isServerConnected()){const rt=new BackMsg({clearCache:!0});rt.type="clearCache",this.sendBackMsg(rt)}else logError("Cannot clear cache: disconnected from server")},this.sendAppHeartbeat=()=>{if(this.isServerConnected()){const rt=new BackMsg({appHeartbeat:!0});rt.type="appHeartbeat",this.sendBackMsg(rt)}else logError("Cannot send app heartbeat: disconnected from server")},this.sendBackMsg=rt=>{this.connectionManager?this.connectionManager.sendMessage(rt):logError(`Not connected. Cannot send back message: ${rt}`)},this.handleConnectionError=rt=>{this.showError("Connection error",rt)},this.isServerConnected=()=>this.connectionManager?this.connectionManager.isConnected():!1,this.settingsCallback=(rt=!0)=>{const ot={type:DialogType.SETTINGS,isServerConnected:this.isServerConnected(),settings:this.state.userSettings,allowRunOnSave:this.state.allowRunOnSave,onSave:this.saveSettings,onClose:()=>{},developerMode:showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode),openThemeCreator:this.openThemeCreatorDialog,animateModal:rt,metricsMgr:this.metricsMgr};this.openDialog(ot)},this.aboutCallback=()=>{const{menuItems:rt}=this.state,ot={type:DialogType.ABOUT,sessionInfo:this.sessionInfo,onClose:this.closeDialog,aboutSectionMd:rt==null?void 0:rt.aboutSectionMd};this.openDialog(ot)},this.printCallback=()=>{const{scriptRunState:rt}=this.state;if(rt!==ScriptRunState.NOT_RUNNING){setTimeout(this.printCallback,500);return}let ot;try{const at=getIFrameEnclosingApp(this.embeddingId);at&&at.contentWindow?ot=at.contentWindow.window:ot=window}catch{ot=window}finally{ot||(ot=window),ot.print()}},this.screencastCallback=()=>{const{scriptName:rt}=this.state,{startRecording:ot}=this.props.screenCast,at=hooks().format("YYYY-MM-DD-HH-MM-SS");ot(`streamlit-${rt}-${at}`)},this.handleFullScreen=rt=>{this.setState({isFullScreen:rt})},this.setLibConfig=rt=>{this.setState({libConfig:rt})},this.setAppConfig=rt=>{this.setState({appConfig:rt})},this.addScriptFinishedHandler=rt=>{this.setState((ot,at)=>({scriptFinishedHandlers:ot.scriptFinishedHandlers.concat(rt)}))},this.removeScriptFinishedHandler=rt=>{this.setState((ot,at)=>({scriptFinishedHandlers:without$1(ot.scriptFinishedHandlers,rt)}))},this.getBaseUriParts=()=>this.connectionManager?this.connectionManager.getBaseUriParts():void 0,this.getQueryString=()=>{const{queryParams:rt}=this.state,ot=rt&&rt.length>0?rt:document.location.search;return ot.startsWith("?")?ot.substring(1):ot},this.isInCloudEnvironment=()=>{const{hostMenuItems:rt}=this.state;return rt&&(rt==null?void 0:rt.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=(rt,ot)=>{if(this.isServerConnected()){const at=new BackMsg({fileUrlsRequest:{requestId:rt,fileNames:ot.map(st=>st.name),sessionId:this.sessionInfo.current.sessionId}});at.type="fileUrlsRequest",this.sendBackMsg(at)}},this.handleKeyDown=rt=>{switch(rt){case"c":showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode)&&this.openClearCacheDialog();break;case"r":this.rerunScript();break}},this.handleKeyUp=rt=>{rt==="esc"&&this.props.screenCast.stopRecording()},J$1();let et=this.createThemeHash();isPresetTheme(nt.theme.activeTheme)||(et=this.createThemeHash(toThemeInput(nt.theme.activeTheme.emotion))),this.state={connectionState:ConnectionState.INITIAL,elements:AppRoot.empty("",!0),isFullScreen:!1,scriptName:"",scriptRunId:INITIAL_SCRIPT_RUN_ID,appHash:null,scriptRunState:ScriptRunState.NOT_RUNNING,userSettings:{wideMode:!1,runOnSave:!1},layout:PageConfig.Layout.CENTERED,initialSidebarState:PageConfig.SidebarState.AUTO,menuItems:void 0,allowRunOnSave:!0,scriptFinishedHandlers:[],themeHash:et,gitInfo:null,formsData:createFormsData(),appPages:[],navSections:[],currentPageScriptHash:"",mainScriptHash:"",hideTopBar:!0,hideSidebarNav:!0,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:rt=>this.setState({formsData:rt})}),this.hostCommunicationMgr=new HostCommunicationManager({streamlitExecutionStartedAt:nt.streamlitExecutionStartedAt,sendRerunBackMsg:this.sendRerunBackMsg,closeModal:this.closeDialog,stopScript:this.stopScript,rerunScript:this.rerunScript,clearCache:this.clearCache,sendAppHeartbeat:this.sendAppHeartbeat,setInputsDisabled:rt=>{this.setState({inputsDisabled:rt})},themeChanged:this.handleThemeMessage,pageChanged:this.onPageChange,isOwnerChanged:rt=>this.setState({isOwner:rt}),fileUploadClientConfigChanged:rt=>{this.endpoints.setFileUploadClientConfig!==void 0&&this.endpoints.setFileUploadClientConfig(rt)},hostMenuItemsChanged:rt=>{this.setState({hostMenuItems:rt})},hostToolbarItemsChanged:rt=>{this.setState({hostToolbarItems:rt})},hostHideSidebarNavChanged:rt=>{this.setState({hostHideSidebarNav:rt})},sidebarChevronDownshiftChanged:rt=>{this.setState({sidebarChevronDownshift:rt})},pageLinkBaseUrlChanged:rt=>{this.setState({pageLinkBaseUrl:rt})},queryParamsChanged:rt=>{this.setState({queryParams:rt})},deployedAppMetadataChanged:rt=>{this.setState({deployedAppMetadata:rt})},restartWebsocketConnection:()=>{this.connectionManager||this.initializeConnectionManager()},terminateWebsocketConnection:()=>{var rt;(rt=this.connectionManager)==null||rt.disconnect(),this.connectionManager=null}}),this.endpoints=new DefaultStreamlitEndpoints({getServerUri:this.getBaseUriParts,csrfEnabled:!0}),this.uploadClient=new FileUploadClient({sessionInfo:this.sessionInfo,endpoints:this.endpoints,formsWithPendingRequestsChanged:rt=>this.widgetMgr.setFormsWithUploadsInProgress(rt),requestFileURLs:this.requestFileURLs}),this.componentRegistry=new ComponentRegistry(this.endpoints),this.pendingElementsTimerRunning=!1,this.pendingElementsBuffer=this.state.elements,this.appNavigation=new AppNavigation(this.hostCommunicationMgr,this.maybeUpdatePageUrl,this.onPageNotFound,this.onPageIconChanged),window.streamlitDebug={clearForwardMsgCache:this.debugClearForwardMsgCache,disconnectWebsocket:this.debugDisconnectWebsocket,shutdownRuntime:this.debugShutdownRuntime}}initializeConnectionManager(){this.connectionManager=new ConnectionManager({sessionInfo:this.sessionInfo,endpoints:this.endpoints,onMessage:this.handleMessage,onConnectionError:this.handleConnectionError,connectionStateChanged:this.handleConnectionStateChanged,claimHostAuthToken:this.hostCommunicationMgr.claimAuthToken,resetHostAuthToken:this.hostCommunicationMgr.resetAuthToken,onHostConfigResp:nt=>{const{allowedOrigins:et,useExternalAuthToken:rt,disableFullscreenMode:ot,enableCustomParentMessages:at,mapboxToken:st,enforceDownloadInNewTab:ut,metricsUrl:ct}=nt,pt={allowedOrigins:et,useExternalAuthToken:rt,enableCustomParentMessages:at},dt={mapboxToken:st,disableFullscreenMode:ot,enforceDownloadInNewTab:ut};this.metricsMgr.setMetricsConfig(ct),this.hostCommunicationMgr.setAllowedOrigins(pt),this.setAppConfig(pt),this.setLibConfig(dt)}})}componentDidMount(){this.initializeConnectionManager(),mark(this.state.scriptRunState),this.hostCommunicationMgr.sendMessageToHost({type:"SCRIPT_RUN_STATE_CHANGED",scriptRunState:this.state.scriptRunState}),isScrollingHidden()&&document.body.classList.add("embedded"),isInChildFrame()&&(window.iFrameResizer={heightCalculationMethod:()=>{const nt=document.querySelectorAll("[data-iframe-height]"),et=Array.from(nt).map(rt=>Math.ceil(rt.getBoundingClientRect().bottom));return Math.max(0,...et)}},__vitePreload(()=>import("./iframeResizer.contentWindow.CgYHddZ1.js").then(nt=>nt.i),[],import.meta.url)),this.hostCommunicationMgr.sendMessageToHost({type:"SET_THEME_CONFIG",themeInfo:toExportedTheme(this.props.theme.activeTheme.emotion)}),this.metricsMgr.enqueue("viewReport"),window.addEventListener("popstate",this.onHistoryChange,!1)}componentDidUpdate(nt,et){window.prerenderReady===!1&&this.isAppInReadyState(et)&&(window.prerenderReady=!0),this.state.scriptRunState!==et.scriptRunState&&(mark(this.state.scriptRunState),this.state.scriptRunState===ScriptRunState.NOT_RUNNING&&measure("script-run-cycle",ScriptRunState.RUNNING,ScriptRunState.NOT_RUNNING),this.hostCommunicationMgr.sendMessageToHost({type:"SCRIPT_RUN_STATE_CHANGED",scriptRunState:this.state.scriptRunState}))}componentWillUnmount(){var nt;(nt=this.connectionManager)==null||nt.disconnect(),this.hostCommunicationMgr.closeHostCommunication(),window.removeEventListener("popstate",this.onHistoryChange,!1)}showError(nt,et){logError(et);const rt={type:DialogType.WARNING,title:nt,msg:et,onClose:()=>{}};this.openDialog(rt)}hasStreamlitVersionChanged(nt){if(this.sessionInfo.isSet){const et=this.sessionInfo.current.streamlitVersion,{environmentInfo:rt}=nt;if(notNullOrUndefined(rt)&¬NullOrUndefined(rt.streamlitVersion))return et!=rt.streamlitVersion}return!1}maybeSetState(nt){if(nt){const[et,rt]=nt;this.setState(et,rt)}}processThemeInput(nt){const et=this.createThemeHash(nt);if(et===this.state.themeHash)return;this.setState({themeHash:et});const rt=!isPresetTheme(this.props.theme.activeTheme);if(nt){const ot=createTheme(CUSTOM_THEME_NAME,nt);this.props.theme.addThemes([ot]),(getCachedTheme()===null||rt)&&this.setAndSendTheme(ot)}else this.props.theme.addThemes([]),rt&&this.setAndSendTheme(getHostSpecifiedTheme())}handleScriptFinished(nt){if(nt===ForwardMsg.ScriptFinishedStatus.FINISHED_SUCCESSFULLY||nt===ForwardMsg.ScriptFinishedStatus.FINISHED_EARLY_FOR_RERUN||nt===ForwardMsg.ScriptFinishedStatus.FINISHED_FRAGMENT_RUN_SUCCESSFULLY){if(window.setTimeout(()=>{this.state.scriptFinishedHandlers.map(et=>et())},0),nt===ForwardMsg.ScriptFinishedStatus.FINISHED_SUCCESSFULLY||nt===ForwardMsg.ScriptFinishedStatus.FINISHED_FRAGMENT_RUN_SUCCESSFULLY){this.setState(({scriptRunId:rt,fragmentIdsThisRun:ot})=>({elements:this.pendingElementsBuffer.clearStaleNodes(rt,ot)}),()=>{this.pendingElementsBuffer=this.state.elements});const et=new Set(Array.from(this.state.elements.getElements()).map(rt=>getElementId(rt)).filter(notUndefined));this.widgetMgr.removeInactive(et)}this.connectionManager!==null&&nt!==ForwardMsg.ScriptFinishedStatus.FINISHED_EARLY_FOR_RERUN&&this.sessionInfo.isSet&&this.connectionManager.incrementMessageCacheRunCount(this.sessionInfo.current.maxCachedMessageAge)}}clearAppState(nt,et,rt,ot){const{hideSidebarNav:at,elements:st}=this.state,ut=at&&st.sidebar||void 0;this.setState({scriptRunId:et,scriptName:rt,appHash:nt,elements:this.appNavigation.clearPageElements(this.pendingElementsBuffer,ot,ut)},()=>{this.pendingElementsBuffer=this.state.elements;const ct=new Set(Array.from(this.state.elements.getElements()).map(pt=>getElementId(pt)).filter(notUndefined));this.widgetMgr.removeInactive(ct)})}openDialog(nt){this.setState({dialog:nt})}render(){const{allowRunOnSave:nt,connectionState:et,dialog:rt,elements:ot,initialSidebarState:at,menuItems:st,isFullScreen:ut,scriptRunId:ct,scriptRunState:pt,userSettings:dt,hideTopBar:ft,hideSidebarNav:bt,expandSidebarNav:ht,currentPageScriptHash:Mt,hostHideSidebarNav:mt,pageLinkBaseUrl:Ot,sidebarChevronDownshift:zt,hostMenuItems:yt,hostToolbarItems:vt,libConfig:At,appConfig:St,inputsDisabled:Et,appPages:Tt,navSections:Rt}=this.state,Ct=showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode),wt=classNames("stApp",getEmbeddingIdClassName(this.embeddingId),{"streamlit-embedded":isEmbed(),"streamlit-wide":dt.wideMode}),Ft=rt?StreamlitDialog({...rt,onClose:this.closeDialog}):null,Ht=Et||et!==ConnectionState.CONNECTED;return jsx$1(AppContext.Provider,{value:{initialSidebarState:at,wideMode:dt.wideMode,embedded:isEmbed(),showPadding:!isEmbed()||isPaddingDisplayed(),disableScrolling:isScrollingHidden(),showToolbar:!isEmbed()||isToolbarDisplayed(),showColoredLine:!isEmbed()||isColoredLineDisplayed(),pageLinkBaseUrl:Ot,sidebarChevronDownshift:zt,gitInfo:this.state.gitInfo,appConfig:St},children:jsx$1(LibContext.Provider,{value:{isFullScreen:ut,setFullScreen:this.handleFullScreen,addScriptFinishedHandler:this.addScriptFinishedHandler,removeScriptFinishedHandler:this.removeScriptFinishedHandler,activeTheme:this.props.theme.activeTheme,setTheme:this.setAndSendTheme,availableThemes:this.props.theme.availableThemes,addThemes:this.props.theme.addThemes,onPageChange:this.onPageChange,currentPageScriptHash:Mt,libConfig:At,fragmentIdsThisRun:this.state.fragmentIdsThisRun,locale:window.navigator.language},children:jsx$1(ReactHotkeys,{keyName:"r,c,esc",onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,children:jsxs(StyledApp,{className:wt,"data-testid":"stApp","data-test-script-state":ct==INITIAL_SCRIPT_RUN_ID?"initial":pt,"data-test-connection-state":et,children:[jsxs(Header,{children:[!ft&&jsxs(Fragment,{children:[jsx$1(StatusWidget,{connectionState:et,sessionEventDispatcher:this.sessionEventDispatcher,scriptRunState:pt,rerunScript:this.rerunScript,stopScript:this.stopScript,allowRunOnSave:nt}),jsx$1(ToolbarActions,{hostToolbarItems:vt,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,metricsMgr:this.metricsMgr})]}),this.showDeployButton()&&jsx$1(DeployButton,{onClick:this.deployButtonClicked.bind(this)}),jsx$1(MainMenu$1,{isServerConnected:this.isServerConnected(),quickRerunCallback:this.rerunScript,clearCacheCallback:this.openClearCacheDialog,settingsCallback:this.settingsCallback,aboutCallback:this.aboutCallback,printCallback:this.printCallback,screencastCallback:this.screencastCallback,screenCastState:this.props.screenCast.currentState,hostMenuItems:yt,developmentMode:Ct,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,menuItems:st,metricsMgr:this.metricsMgr,toolbarMode:this.state.toolbarMode})]}),jsx$1(AppView,{endpoints:this.endpoints,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,elements:ot,scriptRunId:ct,scriptRunState:pt,widgetMgr:this.widgetMgr,widgetsDisabled:Ht,uploadClient:this.uploadClient,componentRegistry:this.componentRegistry,formsData:this.state.formsData,appLogo:ot.logo,appPages:Tt,navSections:Rt,onPageChange:this.onPageChange,currentPageScriptHash:Mt,hideSidebarNav:bt||mt,expandSidebarNav:ht}),Ft]})})})})}}const AppWithScreencast=withScreencast(App);function useThemeManager(){const tt=getDefaultTheme(),[nt,et]=reactExports.useState(tt),[rt,ot]=reactExports.useState([]),[at,st]=reactExports.useState([...createPresetThemes(),...isPresetTheme(tt)?[]:[tt]]),ut=ft=>{st([...createPresetThemes(),...ft])},ct=reactExports.useCallback(ft=>{ft!==nt&&(et(ft),ft.name===AUTO_THEME_NAME?removeCachedTheme():setCachedTheme(ft))},[et,nt]),pt=reactExports.useCallback(()=>{nt.name===AUTO_THEME_NAME&&ct(getHostSpecifiedTheme());const ft=at.filter(bt=>bt.name!==AUTO_THEME_NAME);st([createAutoTheme(),...ft])},[nt.name,at,ct]),dt=reactExports.useCallback(ft=>{ft.fontFaces&&ot(ft.fontFaces);const bt=new CustomThemeConfig(ft),ht=createTheme(CUSTOM_THEME_NAME,bt);ct(ht)},[ot,ct]);return reactExports.useEffect(()=>{const ft=window.matchMedia("(prefers-color-scheme: dark)");return ft.addEventListener("change",pt),window.addEventListener("afterprint",pt),()=>{window.removeEventListener("afterprint",pt),ft.removeEventListener("change",pt)}},[nt,at,pt]),[{setTheme:ct,activeTheme:nt,addThemes:ut,availableThemes:at,setImportedTheme:dt},rt]}const ThemedApp=({streamlitExecutionStartedAt:tt})=>{const[nt,et]=useThemeManager(),{activeTheme:rt}=nt,ot=rt.name===CUSTOM_THEME_NAME&&et.length>0;return jsx$1(RootStyleProvider,{theme:rt,children:jsx$1(WindowDimensionsProvider,{children:jsxs(PortalProvider,{children:[ot&&jsx$1(FontFaceDeclaration,{fontFaces:et}),jsx$1(AppWithScreencast,{theme:nt,streamlitExecutionStartedAt:tt})]})})})},streamlitExecutionStartedAt=Date.now(),engine=new StyletronClient({prefix:"st-"});ReactDOM.render(jsx$1(Provider$1,{value:engine,children:jsx$1(ThemedApp,{streamlitExecutionStartedAt})}),document.getElementById("root"));export{Field$1 as $,isNullOrUndefined$1 as A,merge$6 as B,numbro$1 as C,notNullOrUndefined as D,EmotionIconBase as E,Fragment as F,hooks as G,getTimezone as H,moment$1 as I,isIntegerType as J,isUnsignedIntegerType as K,isDurationType as L,isPeriodType as M,format as N,isBooleanType as O,PortalContext as P,_baseKeys as Q,React$1 as R,_getTag as S,isArguments_1 as T,isArray_1 as U,isArrayLike_1 as V,isBufferExports as W,_isPrototype as X,isTypedArray_1 as Y,DataFrameCellType as Z,_extends$Q as _,range$1 as a,parseToRgba as a$,Null as a0,isTimeType as a1,convertTimeToDate as a2,isDecimalType as a3,isStringType as a4,isEmptyType as a5,isDatetimeType as a6,isDateType as a7,isObjectType as a8,isBytesType as a9,LibContext as aA,jsxs as aB,Resizable as aC,getGray70 as aD,getGray30 as aE,getCategoricalColorsArray as aF,getDivergingColorsArray as aG,getSequentialColorsArray as aH,getBlue80 as aI,debounce$4 as aJ,Global as aK,_baseMerge as aL,_createAssigner as aM,withTheme as aN,DynamicIcon as aO,toaster as aP,Kind as aQ,AlertElement as aR,_assertThisInitialized$e as aS,StyledInlineCode as aT,ErrorElement as aU,axios as aV,Skeleton$1 as aW,Skeleton as aX,hoistNonReactStatics$2 as aY,ensureError as aZ,lib$3 as a_,isNumericType as aa,isCategoricalType as ab,isListType as ac,isRangeIndexType as ad,useTheme as ae,Arrow$2 as af,logError as ag,isArray$k as ah,_defineProperty$u as ai,_objectWithoutProperties$o as aj,_typeof$g as ak,jsx as al,css$2 as am,_toConsumableArray$3 as an,transparentize as ao,convertRemToPx as ap,mix$1 as aq,logWarning as ar,getStyledCell as as,isEqual$1 as at,StyledTooltipContentWrapper as au,StreamlitMarkdown$1 as av,PLACEMENT as aw,ACCESSIBILITY_TYPE as ax,hasLightBackgroundColor as ay,Popover$1 as az,reactDomExports as b,isPresetTheme as b$,DeckGlJsonChart$1 as b0,_unsupportedIterableToArray$l as b1,DEFAULT_IFRAME_FEATURE_POLICY as b2,DEFAULT_IFRAME_SANDBOX_POLICY as b3,darken as b4,BaseButtonSize as b5,BaseButtonKind as b6,BaseButtonTooltip as b7,DynamicButtonLabel as b8,IsSidebarContext as b9,themeColors as bA,isMobile_1 as bB,CAMERA_PERMISSION_URL as bC,StyledWidgetLabelHelp as bD,isFocusVisible as bE,getOverride as bF,getOverrideProps as bG,Checkbox$1 as bH,StyledContent as bI,StyledCheckbox$1 as bJ,BaseColorPicker$1 as bK,useStyletron as bL,mergeOverride as bM,toObjectOverride as bN,Icon$1 as bO,UIDConsumer as bP,StatefulMenu as bQ,mergeOverrides as bR,ChevronDown$1 as bS,ThemeContext as bT,forkFocus as bU,forkBlur as bV,Select as bW,without$1 as bX,fuzzyFilterSelectOptions as bY,TYPE as bZ,VirtualDropdown as b_,Placement as ba,getGray90 as bb,getIncreasingGreen as bc,getDecreasingRed as bd,PlotlyChart$1 as be,keysToSnakeCase as bf,WindowDimensionsContext as bg,Video$1 as bh,zip$1 as bi,FileUploaderState as bj,UploadedFileInfo as bk,StyledSpinner as bl,ENABLE_PERIPHERALS_DOCS_URL as bm,Icon$2 as bn,BaseButton as bo,blend as bp,labelVisibilityProtoValueToEnum as bq,TooltipIcon as br,WidgetLabel as bs,Tooltip as bt,styled as bu,getOverrides as bv,LocaleContext as bw,ButtonGroup$1 as bx,LabelVisibilityMessage as by,StyledWidgetLabelHelpInline as bz,_hasPath as c,classNames as c0,UISelectbox as c1,isValidFormId as c2,toPropertyKey as c3,_setPrototypeOf$e as c4,hexToRgb as c5,withWrapper as c6,StyledWidgetInstructions as c7,isFromMac as c8,CUSTOM_INPUT_TYPE as c9,SIZE$1 as ca,DeleteAlt$1 as cb,ADJOINED as cc,filterOptions as cd,ENHANCER_POSITION as ce,pick$1 as cf,Slider$2 as cg,isFromWindows as ch,__awaiter as ci,__generator as cj,__spread as ck,PropTypes as cl,ChevronLeft as cm,ChevronRight as cn,isInForm as co,toString_1 as cp,TextInput$1 as cq,ThemeProvider$1 as cr,createThemedStyled as cs,createThemedUseStyletron as ct,createThemedWithStyle as cu,expandBorderStyles as cv,withStyle as cw,getAugmentedNamespace as cx,reactIsExports$1 as cy,NumberInput$1 as cz,commonjsGlobal$1 as d,classnamesExports as e,_root as f,getDefaultExportFromCjs$1 as g,isObject_1 as h,isPropValid as i,jsx$1 as j,keyframes as k,_Set as l,_setToArray as m,newStyled as n,_SetCache as o,propTypesExports as p,_arrayIncludes as q,reactExports as r,_arrayIncludesWith as s,toNumber_1 as t,_cacheHas as u,groupBy$1 as v,__vitePreload as w,flatten$2 as x,require$$0 as y,toString$9 as z};
|
798
|
+
Event: ${nt}`)}async pingServer(){this.uriIndex=await doInitPings(this.args.baseUriPartsList,PING_MINIMUM_RETRY_PERIOD_MS,PING_MAXIMUM_RETRY_PERIOD_MS,this.args.onRetry,this.args.onHostConfigResp),this.stepFsm("SERVER_PING_SUCCEEDED")}async getSessionTokens(){var rt,ot;const nt=await this.args.claimHostAuthToken(),et=getCookie("_streamlit_xsrf");return this.args.resetHostAuthToken(),[nt??et??"PLACEHOLDER_AUTH_TOKEN",...(rt=this.args.sessionInfo.last)!=null&&rt.sessionId?[(ot=this.args.sessionInfo.last)==null?void 0:ot.sessionId]:[]]}async connectToWebSocket(){const nt=buildWsUri(this.args.baseUriPartsList[this.uriIndex],WEBSOCKET_STREAM_PATH);if(notNullOrUndefined(this.websocket))throw new Error("Websocket already exists");const et=await this.getSessionTokens();this.websocket=new WebSocket(nt,["streamlit",...et]),this.websocket.binaryType="arraybuffer",this.setConnectionTimeout(nt);const rt=this.websocket,ot=()=>rt===this.websocket;this.websocket.addEventListener("message",at=>{ot()&&this.handleMessage(at.data).catch(st=>{const ut=`Failed to process a Websocket message (${st})`;logError(LOG,ut),this.stepFsm("FATAL_ERROR",ut)})}),this.websocket.addEventListener("open",()=>{ot()&&this.stepFsm("CONNECTION_SUCCEEDED")}),this.websocket.addEventListener("close",()=>{ot()&&(this.closeConnection(),this.stepFsm("CONNECTION_CLOSED"))}),this.websocket.addEventListener("error",()=>{ot()&&(logError(LOG,"WebSocket onerror"),this.closeConnection(),this.stepFsm("CONNECTION_ERROR"))})}setConnectionTimeout(nt){if(notNullOrUndefined(this.wsConnectionTimeoutId))throw new Error("WS timeout is already set");const et=this.websocket;this.wsConnectionTimeoutId=window.setTimeout(()=>{if(et===this.websocket&&!isNullOrUndefined$1(this.wsConnectionTimeoutId)){if(isNullOrUndefined$1(this.websocket)){this.closeConnection(),this.stepFsm("FATAL_ERROR","Null Websocket in setConnectionTimeout");return}this.websocket.readyState===0&&(this.closeConnection(),this.stepFsm("CONNECTION_TIMED_OUT"))}},WEBSOCKET_TIMEOUT_MS),logMessage(LOG,`Set WS timeout ${this.wsConnectionTimeoutId}`)}closeConnection(){this.websocket&&(this.websocket.close(),this.websocket=void 0),notNullOrUndefined(this.wsConnectionTimeoutId)&&(logMessage(LOG,`Clearing WS timeout ${this.wsConnectionTimeoutId}`),window.clearTimeout(this.wsConnectionTimeoutId),this.wsConnectionTimeoutId=void 0)}sendMessage(nt){if(!this.websocket)return;const et=BackMsg.create(nt),rt=BackMsg.encode(et).finish();this.websocket.send(rt)}incrementMessageCacheRunCount(nt){this.cache.incrementRunCount(nt)}async handleMessage(nt){const et=this.nextMessageIndex;this.nextMessageIndex+=1,PerformanceEvents.record({name:"BeginHandleMessage",messageIndex:et});const rt=new Uint8Array(nt),ot=ForwardMsg.decode(rt);for(PerformanceEvents.record({name:"DecodedMessage",messageIndex:et,messageType:ot.type,len:nt.byteLength}),this.messageQueue[et]=await this.cache.processMessagePayload(ot,rt),PerformanceEvents.record({name:"GotCachedPayload",messageIndex:et});this.lastDispatchedMessageIndex+1 in this.messageQueue;){const at=this.lastDispatchedMessageIndex+1;this.args.onMessage(this.messageQueue[at]),PerformanceEvents.record({name:"DispatchedMessage",messageIndex:at,messageType:this.messageQueue[at].type}),delete this.messageQueue[at],this.lastDispatchedMessageIndex=at}}}const RETRY_COUNT_FOR_WARNING=6;class ConnectionManager{constructor(nt){this.connectionState=ConnectionState.INITIAL,this.setConnectionState=(et,rt)=>{this.connectionState!==et&&(this.connectionState=et,this.props.connectionStateChanged(et)),rt&&this.props.onConnectionError(rt)},this.showRetryError=(et,rt,ot)=>{et===RETRY_COUNT_FOR_WARNING&&this.props.onConnectionError(rt)},this.props=nt,this.connect()}isConnected(){return this.connectionState===ConnectionState.CONNECTED}getBaseUriParts(){if(this.connection instanceof WebsocketConnection)return this.connection.getBaseUriParts()}sendMessage(nt){this.connection instanceof WebsocketConnection&&this.isConnected()?this.connection.sendMessage(nt):logError(`Cannot send message when server is disconnected: ${nt}`)}incrementMessageCacheRunCount(nt){this.connection instanceof WebsocketConnection&&this.connection.incrementMessageCacheRunCount(nt)}async connect(){try{this.connection=await this.connectToRunningServer()}catch(nt){const et=ensureError(nt);logError(et.message),this.setConnectionState(ConnectionState.DISCONNECTED_FOREVER,et.message)}}disconnect(){var nt;(nt=this.connection)==null||nt.disconnect()}connectToRunningServer(){const nt=getPossibleBaseUris();return new WebsocketConnection({sessionInfo:this.props.sessionInfo,endpoints:this.props.endpoints,baseUriPartsList:nt,onMessage:this.props.onMessage,onConnectionStateChange:this.setConnectionState,onRetry:this.showRetryError,claimHostAuthToken:this.props.claimHostAuthToken,resetHostAuthToken:this.props.resetHostAuthToken,onHostConfigResp:this.props.onHostConfigResp})}}class SessionEventDispatcher{constructor(){this.onSessionEvent=new dist.Signal}handleSessionEventMsg(nt){this.onSessionEvent.emit(nt)}}const MEDIA_ENDPOINT="/media",UPLOAD_FILE_ENDPOINT="/_stcore/upload_file",COMPONENT_ENDPOINT_BASE="/component",FORWARD_MSG_CACHE_ENDPOINT="/_stcore/message";class DefaultStreamlitEndpoints{constructor(nt){this.getServerUri=nt.getServerUri,this.csrfEnabled=nt.csrfEnabled}buildComponentURL(nt,et){return buildHttpUri(this.requireServerUri(),`${COMPONENT_ENDPOINT_BASE}/${nt}/${et}`)}setFileUploadClientConfig({prefix:nt,headers:et}){this.fileUploadClientConfig={prefix:nt,headers:et}}buildMediaURL(nt){return nt.startsWith(MEDIA_ENDPOINT)?buildHttpUri(this.requireServerUri(),nt):nt}buildFileUploadURL(nt){return this.fileUploadClientConfig?makePath(this.fileUploadClientConfig.prefix,nt):nt.startsWith(UPLOAD_FILE_ENDPOINT)?buildHttpUri(this.requireServerUri(),nt):nt}buildAppPageURL(nt,et){const rt=et.urlPathname,ot=et.isDefault?"":rt;if(notNullOrUndefined(nt)&&nt.length>0)return`${nt}/${ot}`;const{port:at,protocol:st}=window.location,{basePath:ut,host:ct}=this.requireServerUri(),pt=at?`:${at}`:"",dt=ut?`${ut}/`:"";return`${st}//${ct}${pt}/${dt}${ot}`}async uploadFileUploaderFile(nt,et,rt,ot,at){const st=new FormData;st.append(et.name,et);const ut=this.getAdditionalHeaders();return this.csrfRequest(this.buildFileUploadURL(nt),{cancelToken:at,method:"PUT",data:st,responseType:"text",headers:ut,onUploadProgress:ot}).then(()=>{})}getAdditionalHeaders(){let nt={};return this.fileUploadClientConfig&&(nt={...nt,...this.fileUploadClientConfig.headers}),nt}async deleteFileAtURL(nt,et){const rt=this.getAdditionalHeaders();return this.csrfRequest(this.buildFileUploadURL(nt),{method:"DELETE",data:{sessionId:et},headers:rt}).then(()=>{})}async fetchCachedForwardMsg(nt){const et=this.requireServerUri(),rt=await axios.request({url:buildHttpUri(et,`${FORWARD_MSG_CACHE_ENDPOINT}?hash=${nt}`),method:"GET",responseType:"arraybuffer"});return new Uint8Array(rt.data)}requireServerUri(){const nt=this.getServerUri();if(notNullOrUndefined(nt))return this.cachedServerUri=nt,nt;if(notNullOrUndefined(this.cachedServerUri))return this.cachedServerUri;throw new Error("not connected to a server!")}csrfRequest(nt,et){if(et.url=nt,this.csrfEnabled){const rt=getCookie("_streamlit_xsrf");notNullOrUndefined(rt)&&(et.headers={"X-Xsrftoken":rt,...et.headers||{}},et.withCredentials=!0)}return axios.request(et)}}var assignValue=_assignValue,castPath$1=_castPath,isIndex=_isIndex,isObject=isObject_1,toKey=_toKey;function baseSet$1(tt,nt,et,rt){if(!isObject(tt))return tt;nt=castPath$1(nt,tt);for(var ot=-1,at=nt.length,st=at-1,ut=tt;ut!=null&&++ot<at;){var ct=toKey(nt[ot]),pt=et;if(ct==="__proto__"||ct==="constructor"||ct==="prototype")return tt;if(ot!=st){var dt=ut[ct];pt=rt?rt(dt,ct,ut):void 0,pt===void 0&&(pt=isObject(dt)?dt:isIndex(nt[ot+1])?[]:{})}assignValue(ut,ct,pt),ut=ut[ct]}return tt}var _baseSet=baseSet$1,baseGet=_baseGet,baseSet=_baseSet,castPath=_castPath;function basePickBy$1(tt,nt,et){for(var rt=-1,ot=nt.length,at={};++rt<ot;){var st=nt[rt],ut=baseGet(tt,st);et(ut,st)&&baseSet(at,castPath(st,tt),ut)}return at}var _basePickBy=basePickBy$1,basePickBy=_basePickBy,hasIn=hasIn_1;function basePick$1(tt,nt){return basePickBy(tt,nt,function(et,rt){return hasIn(tt,rt)})}var _basePick=basePick$1,basePick=_basePick,flatRest=_flatRest,pick=flatRest(function(tt,nt){return tt==null?{}:basePick(tt,nt)}),pick_1=pick;const pick$1=getDefaultExportFromCjs$1(pick_1),DEFAULT_METRICS_CONFIG="https://data.streamlit.io/metrics.json";class MetricsManager{constructor(nt){this.initialized=!1,this.actuallySendMetrics=!1,this.metricsUrl=void 0,this.sendMessageToHost=()=>{},this.anonymousId="",this.pendingEvents=[],this.appHash="Not initialized",this.metadata={},this.setAppHash=et=>{this.appHash=et},this.setMetricsConfig=(et="")=>{this.metricsUrl=et},this.sessionInfo=nt}async initialize({gatherUsageStats:nt,sendMessageToHost:et}){this.sendMessageToHost=et,this.actuallySendMetrics=nt&&this.metricsUrl!=="off",this.getAnonymousId(),this.actuallySendMetrics&&!this.metricsUrl&&(await this.requestDefaultMetricsConfig(),this.metricsUrl||(logError("Undefined metrics config - deactivating metrics tracking."),this.actuallySendMetrics=!1)),this.actuallySendMetrics&&this.sendPendingEvents(),logAlways("Gather usage stats: ",this.actuallySendMetrics),this.initialized=!0}enqueue(nt,et={}){if(!this.initialized||!this.sessionInfo.isSet){this.pendingEvents.push([nt,et]);return}this.actuallySendMetrics&&(this.pendingEvents.length&&this.sendPendingEvents(),this.send(nt,et))}setMetadata(nt){this.metadata=nt}async requestDefaultMetricsConfig(){const nt=localStorageAvailable();if(nt){const et=window.localStorage.getItem("stMetricsConfig");if(et){this.metricsUrl=et;return}}try{const et=await fetch(DEFAULT_METRICS_CONFIG,{signal:AbortSignal.timeout(5e3)});if(!et.ok)this.metricsUrl=void 0,logError("Failed to fetch metrics config: ",et.status);else{const rt=await et.json();this.metricsUrl=rt.url??void 0,nt&&this.metricsUrl&&window.localStorage.setItem("stMetricsConfig",this.metricsUrl)}}catch(et){logError("Failed to fetch metrics config:",et)}}send(nt,et={}){const rt=this.buildEventProto(nt,et);this.metricsUrl==="postMessage"?this.postMessageEvent(nt,rt):this.track(rt)}sendPendingEvents(){this.pendingEvents.forEach(([nt,et])=>{this.send(nt,et)}),this.pendingEvents=[]}async track(nt){const et=new Request(this.metricsUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(nt.toJSON())});await fetch(et)}postMessageEvent(nt,et){this.sendMessageToHost({type:"METRICS_EVENT",eventName:nt,data:et})}buildEventProto(nt,et){const rt=new MetricsEvent({event:nt,anonymousId:this.anonymousId,...this.getHostTrackingData(),...this.getInstallationData(),reportHash:this.appHash,dev:IS_DEV_ENV,source:"browser",streamlitVersion:this.sessionInfo.current.streamlitVersion,isHello:this.sessionInfo.isHello,...this.getContextData()});if(nt==="menuClick")rt.label=et.label;else if(nt==="pageProfile")return new MetricsEvent({...rt,...et});return rt}getInstallationData(){return{machineIdV3:this.sessionInfo.current.installationIdV3}}getHostTrackingData(){return this.metadata?pick$1(this.metadata,["hostedAt","owner","repo","branch","mainModule","creatorId"]):{}}getContextData(){return{contextPageUrl:window.location.href,contextPageTitle:document.title,contextPagePath:window.location.pathname,contextPageReferrer:document.referrer,contextPageSearch:window.location.search,contextLocale:window.navigator.language,contextUserAgent:window.navigator.userAgent}}getAnonymousId(){if(!this.actuallySendMetrics)return;const nt="ajs_anonymous_id",et=localStorageAvailable(),rt=getCookie(nt),ot=et?window.localStorage.getItem(nt):null,at=new Date;at.setFullYear(new Date().getFullYear()+1),rt?(this.anonymousId=rt,et&&window.localStorage.setItem(nt,rt)):ot?(this.anonymousId=JSON.parse(ot),setCookie(nt,this.anonymousId,at)):(this.anonymousId=v4(),setCookie(nt,this.anonymousId,at),et&&window.localStorage.setItem(nt,this.anonymousId))}}const StyledApp=newStyled("div",{target:"ee4bbma0"})(({theme:tt})=>{const nt=hasLightBackgroundColor(tt);return{position:"absolute",background:tt.colors.bgColor,color:tt.colors.bodyText,top:tt.spacing.none,left:tt.spacing.none,right:tt.spacing.none,bottom:tt.spacing.none,colorScheme:nt?"light":"dark",overflow:"hidden","@media print":{float:"none",height:tt.sizes.full,position:"static",overflow:"visible"}}}),StyledRecordAudioLabel=newStyled("label",{target:"ej964cx0"})({margin:0}),StyledInstruction=newStyled("p",{target:"ej964cx1"})({margin:0}),ScreencastDialog=({onClose:tt,toggleRecordAudio:nt,recordAudio:et,startRecording:rt})=>{const[ot,at]=reactExports.useState(et),st=reactExports.useCallback(ct=>{const{checked:pt}=ct.target;pt!==ot&&(at(pt),nt())},[ot,nt]),ut=reactExports.useCallback(()=>{rt(),tt()},[rt,tt]);return jsxs(Modal,{isOpen:!0,onClose:tt,children:[jsx$1(ModalHeader,{children:"Record a screencast"}),jsxs(ModalBody$1,{children:[jsx$1("p",{children:"This will record a video with the contents of your screen, so you can easily share what you're seeing with others."}),jsx$1("p",{children:jsxs(StyledRecordAudioLabel,{"data-testid":"stScreencastAudioCheckbox",children:[jsx$1("input",{type:"checkbox",name:"recordAudio",checked:ot,onChange:st})," ","Also record audio"]})}),jsx$1(StyledInstruction,{"data-testid":"stScreencastInstruction",children:jsx$1(StreamlitMarkdown$1,{source:"Press `Esc` any time to stop recording.",allowHTML:!1})})]}),jsx$1(ModalFooter,{children:jsx$1(ModalButton,{kind:BaseButtonKind.SECONDARY,onClick:ut,children:"Start recording!"})})]})},StyledVideo=newStyled("video",{target:"emkt0dj0"})(({theme:tt})=>({width:tt.sizes.full,borderRadius:tt.radii.md})),StyledDialogContainer=newStyled("div",{target:"emkt0dj1"})(({theme:tt})=>({display:"flex",flexDirection:"column",width:tt.sizes.full})),StyledRow=newStyled("div",{target:"emkt0dj2"})(({theme:tt})=>({display:"flex",flexDirection:"row",paddingTop:tt.spacing.md,paddingBottom:tt.spacing.md})),StyledFirstColumn=newStyled("div",{target:"emkt0dj3"})(({theme:tt})=>({paddingRight:tt.spacing.lg,textAlign:"right",color:tt.colors.gray,fontWeight:tt.fontWeights.bold,width:"6em"})),StyledSecondColumn=newStyled("div",{target:"emkt0dj4"})(({theme:tt})=>({flex:1,paddingRight:tt.spacing.lg,marginRight:"6em",[`@media (max-width: ${tt.breakpoints.sm})`]:{marginRight:tt.spacing.none}})),StyledVideoFormatInstructions=newStyled("p",{target:"emkt0dj5"})(({theme:tt})=>({marginTop:tt.spacing.sm,marginBottom:tt.spacing.none,fontSize:tt.fontSizes.sm})),StyledDownloadButtonContainer=newStyled("div",{target:"emkt0dj6"})(({theme:tt})=>({marginTop:tt.spacing.twoXS})),VideoRecordedDialog=({onClose:tt,videoBlob:nt,fileName:et})=>{const rt=URL.createObjectURL(nt),ot=()=>{const at=document.createElement("a");at.setAttribute("href",rt),at.setAttribute("download",`${et}.webm`),at.click(),tt()};return jsxs(Modal,{isOpen:!0,onClose:tt,overrides:{Dialog:{style:{width:"80vw"}}},children:[jsx$1(ModalHeader,{children:"Next steps"}),jsx$1(ModalBody$1,{children:jsxs(StyledDialogContainer,{"data-testid":"stVideoRecordedDialog",children:[jsxs(StyledRow,{children:[jsx$1(StyledFirstColumn,{children:"Step 1"}),jsxs(StyledSecondColumn,{children:[jsx$1("p",{children:"Preview your video below:"}),jsx$1(StyledVideo,{src:rt,controls:!0})]})]}),jsxs(StyledRow,{children:[jsx$1(StyledFirstColumn,{children:"Step 2"}),jsxs(StyledSecondColumn,{children:[jsx$1(StyledDownloadButtonContainer,{children:jsx$1(BaseButton,{kind:BaseButtonKind.SECONDARY,onClick:ot,children:"Save video to disk"})}),jsxs(StyledVideoFormatInstructions,{children:["This video is encoded in the"," ",jsx$1("a",{href:"https://www.webmproject.org/",children:"WebM format"}),", which is only supported by newer video players. You can also play it by dragging the file directly into your browser."]})]})]}),jsxs(StyledRow,{children:[jsx$1(StyledFirstColumn,{children:"Step 3"}),jsxs(StyledSecondColumn,{children:["Share your video with the world on Twitter, LinkedIn, YouTube, or just plain email!"," ",jsx$1("span",{role:"img","aria-label":"Happy",children:"😀"})]})]})]})})]})},StyledScreenCastWarningDialog=newStyled("div",{target:"e1o5y2010"})({display:"flex"}),StyledUnsupportedScreenCastIcon=newStyled("div",{target:"e1o5y2011"})(({theme:tt})=>({display:"flex",alignItems:"center",justifyItems:"center",marginRight:tt.spacing.twoXL,marginLeft:tt.spacing.sm,fontSize:tt.fontSizes.fourXL})),StyledUnsupportedScreenCastExplanation=newStyled("p",{target:"e1o5y2012"})(({theme:tt})=>({margin:tt.spacing.none})),UnsupportedBrowserDialog=({onClose:tt})=>jsxs(Modal,{isOpen:!0,onClose:tt,children:[jsx$1(ModalHeader,{children:"Record a screencast"}),jsx$1(ModalBody$1,{children:jsxs(StyledScreenCastWarningDialog,{"data-testid":"stUnsupportedBrowserDialog",children:[jsx$1(StyledUnsupportedScreenCastIcon,{children:jsx$1("span",{role:"img","aria-label":"Alien Monster",children:"👾"})}),jsx$1(StyledUnsupportedScreenCastExplanation,{children:"Due to limitations with some browsers, this feature is only supported on recent desktop versions of Chrome, Firefox, and Edge."})]})})]}),UnsupportedBrowserDialog$1=reactExports.memo(UnsupportedBrowserDialog),screencastCounterAnimation=keyframes("0%{opacity:0;}25%{opacity:1;}100%{opacity:0;}"),StyledCountdown=newStyled("div",{target:"evez3ra0"})(({theme:tt})=>({position:"fixed",display:"flex",justifyContent:"center",alignItems:"center",top:0,left:0,width:tt.sizes.full,height:tt.sizes.full,fontSize:"40vh",color:tt.colors.red,fontWeight:tt.fontWeights.bold,opacity:"0.8",textShadow:`1px 1px 10px ${tt.colors.darkGray}`,transition:"opacity 0.3s ease-in-out",animation:`${screencastCounterAnimation} 1s`})),Countdown=({countdown:tt,endCallback:nt})=>{const[et,rt]=reactExports.useState(tt);return jsx$1(StyledCountdown,{"data-testid":"stCountdown",onAnimationEnd:()=>{const at=et-1;at>=0&&rt(at),at===0&&nt()},children:jsx$1("span",{children:et})},`frame${et}`)};function withScreencast(tt){const et=class et extends reactExports.PureComponent{constructor(){super(...arguments),this.state={fileName:"streamlit-screencast",recordAudio:!1,currentState:this.props.testOverride||"OFF"},this.toggleRecordAudio=()=>{const{recordAudio:ot}=this.state;this.setState({recordAudio:!ot})},this.showDialog=ot=>{const{currentState:at}=this.state;ScreenCastRecorder.isSupportedBrowser()?at==="OFF"?this.setState({fileName:ot,currentState:"SETUP"}):this.stopRecording().catch(st=>logWarning(`withScreencast.stopRecording threw an error: ${st}`)):this.setState({currentState:"UNSUPPORTED"})},this.startRecording=async()=>{const{recordAudio:ot}=this.state;this.recorder=new ScreenCastRecorder({recordAudio:ot,onErrorOrStop:()=>this.stopRecording()});try{await this.recorder.initialize()}catch{this.setState({currentState:"UNSUPPORTED"});return}this.setState({currentState:"COUNTDOWN"})},this.stopRecording=async()=>{let ot;const{currentState:at}=this.state;at==="OFF"||isNullOrUndefined$1(this.recorder)||(at==="COUNTDOWN"&&this.setState({currentState:"OFF"}),at==="RECORDING"&&(this.recorder.getState()==="inactive"?this.setState({currentState:"OFF"}):(ot=await this.recorder.stop(),this.setState({outputBlob:ot,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(at=>logWarning(`withScreencast.stopRecording threw an error: ${at}`))},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:ot,fileName:at,recordAudio:st,currentState:ut}=this.state;return jsxs("div",{className:"withScreencast","data-testid":"stScreencast",children:[jsx$1(tt,{...this.props,screenCast:this.getScreenCastProps()}),ut==="UNSUPPORTED"&&jsx$1(UnsupportedBrowserDialog$1,{onClose:this.closeDialog}),ut==="SETUP"&&jsx$1(ScreencastDialog,{recordAudio:st,onClose:this.closeDialog,startRecording:this.startRecording,toggleRecordAudio:this.toggleRecordAudio}),ut==="COUNTDOWN"&&jsx$1(Countdown,{countdown:3,endCallback:this.onCountdownEnd}),ut==="PREVIEW_FILE"&&ot&&jsx$1(VideoRecordedDialog,{onClose:this.closeDialog,videoBlob:ot,fileName:at})]})}}};et.displayName=`withScreencast(${tt.displayName||tt.name})`;let nt=et;return hoistNonReactStatics$2(nt,tt)}const showDevelopmentOptions=(tt,nt)=>nt==Config.ToolbarMode.DEVELOPER?!0:Config.ToolbarMode.VIEWER==nt||Config.ToolbarMode.MINIMAL==nt?!1:tt||isLocalhost();function getTitle(tt){return tt||"Streamlit"}class StrategyV1{constructor(nt){this.appNav=nt,this.appPages=[],this.currentPageScriptHash=null,this.hideSidebarNav=null}handleNewSession(nt){var st,ut;this.appPages=nt.appPages,this.currentPageScriptHash=nt.pageScriptHash,this.hideSidebarNav=((st=nt.config)==null?void 0:st.hideSidebarNav)??!1;const et=this.appPages[0],rt=et.urlPathname??"",ot=((ut=this.appPages.find(ct=>ct.pageScriptHash===this.currentPageScriptHash))==null?void 0:ut.urlPathname)??"",at=et.pageScriptHash===this.currentPageScriptHash;return this.appNav.onUpdatePageUrl(rt,ot,at),document.title=getTitle(ot??""),[{hideSidebarNav:this.hideSidebarNav,appPages:this.appPages,currentPageScriptHash:this.currentPageScriptHash},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_APP_PAGES",appPages:this.appPages}),this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:at?"":ot,currentPageScriptHash:this.currentPageScriptHash})}]}handlePagesChanged(nt){const{appPages:et}=nt;return[{appPages:et},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_APP_PAGES",appPages:et})}]}handlePageNotFound(nt){var ot;const{pageName:et}=nt;this.appNav.onPageNotFound(et);const rt=((ot=this.appPages[0])==null?void 0:ot.pageScriptHash)??"";return this.currentPageScriptHash=rt,[{currentPageScriptHash:rt},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:"",currentPageScriptHash:rt})}]}handleNavigation(nt){}findPageByUrlPath(nt){return this.appPages.length===0?null:this.appPages.find(et=>nt.endsWith("/"+et.urlPathname))??this.appPages[0]}clearPageElements(nt,et,rt){return AppRoot.empty(et,!1,rt,nt.logo)}}class StrategyV2{constructor(nt){this.appNav=nt,this.mainScriptHash=null,this.appPages=[],this.mainPage=null,this.hideSidebarNav=null}handleNewSession(nt){var et;return this.mainScriptHash=nt.mainScriptHash,this.hideSidebarNav===null&&(this.hideSidebarNav=((et=nt.config)==null?void 0:et.hideSidebarNav)??null),document.title=getTitle(""),[{hideSidebarNav:this.hideSidebarNav??!1},()=>{}]}handlePagesChanged(nt){}handlePageNotFound(nt){const{pageName:et}=nt;return this.appNav.onPageNotFound(et),[{currentPageScriptHash:this.mainScriptHash??""},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:"",currentPageScriptHash:this.mainScriptHash??""})}]}handleNavigation(nt){const{sections:et,position:rt,appPages:ot}=nt;this.appPages=ot,this.hideSidebarNav=rt===Navigation.Position.HIDDEN;const at=nt.pageScriptHash,st=ot.find(pt=>pt.pageScriptHash===at),ut=ot.find(pt=>pt.isDefault);this.mainPage=ut;const ct=st.urlPathname;if(!this.appNav.isPageTitleSet){const pt=getTitle(st.pageName);document.title=pt,this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_PAGE_TITLE",title:st.pageName??""})}return!this.appNav.isPageIconSet&&st.icon&&this.appNav.onPageIconChange(st.icon),this.appNav.onUpdatePageUrl(ut.urlPathname??"",ct,st.isDefault??!1),[{appPages:ot,navSections:et,hideSidebarNav:this.hideSidebarNav,expandSidebarNav:nt.expanded,currentPageScriptHash:at},()=>{this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_APP_PAGES",appPages:ot}),this.appNav.hostCommunicationMgr.sendMessageToHost({type:"SET_CURRENT_PAGE_NAME",currentPageName:st.isDefault?"":ct,currentPageScriptHash:at})}]}findPageByUrlPath(nt){return this.appPages.find(et=>nt.endsWith("/"+et.urlPathname))??this.mainPage}clearPageElements(nt,et,rt){return nt.filterMainScriptElements(et)}}class AppNavigation{constructor(nt,et,rt,ot){this.hostCommunicationMgr=nt,this.onUpdatePageUrl=et,this.onPageNotFound=rt,this.onPageIconChange=ot,this.isPageIconSet=!1,this.isPageTitleSet=!1,this.strategy=new StrategyV1(this)}handleNewSession(nt){return this.isPageTitleSet=!1,this.isPageIconSet=!1,this.strategy.handleNewSession(nt)}handleNavigation(nt){return this.strategy instanceof StrategyV1&&(this.strategy=new StrategyV2(this)),this.strategy.handleNavigation(nt)}handlePagesChanged(nt){return this.strategy.handlePagesChanged(nt)}handlePageNotFound(nt){return this.strategy.handlePageNotFound(nt)}findPageByUrlPath(nt){return this.strategy.findPageByUrlPath(nt)}handlePageConfigChanged(nt){this.isPageIconSet=!!nt.favicon,this.isPageTitleSet=!!nt.title}clearPageElements(nt,et,rt){return this.strategy.clearPageElements(nt,et,rt)}}const ELEMENT_LIST_BUFFER_TIMEOUT_MS=10,INITIAL_SCRIPT_RUN_ID="<null>";class App extends reactExports.PureComponent{constructor(nt){super(nt),this.sessionInfo=new SessionInfo,this.metricsMgr=new MetricsManager(this.sessionInfo),this.sessionEventDispatcher=new SessionEventDispatcher,this.embeddingId=generateUID$2(),this.showDeployError=(rt,ot,at)=>{this.openDialog({type:DialogType.DEPLOY_ERROR,title:rt,msg:ot,onContinue:at,onClose:()=>{},onTryAgain:this.sendLoadGitInfoBackMsg})},this.handleThemeMessage=(rt,ot)=>{const[,at,st]=createPresetThemes(),ut=isPresetTheme(this.props.theme.activeTheme);rt===at.name&&ut?this.props.theme.setTheme(at):rt===st.name&&ut?this.props.theme.setTheme(st):ot&&this.props.theme.setImportedTheme(ot)},this.handleConnectionStateChanged=rt=>{if(logMessage(`Connection state changed from ${this.state.connectionState} to ${rt}`),rt===ConnectionState.CONNECTED){const ot=this.state.scriptRunState===ScriptRunState.RERUN_REQUESTED||this.state.scriptRunState===ScriptRunState.RUNNING;(!this.sessionInfo.last||ot)&&(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:rt!==ConnectionState.DISCONNECTED_FOREVER}),this.sessionInfo.isSet&&this.sessionInfo.clearCurrent();this.setState({connectionState:rt})},this.handleGitInfoChanged=rt=>{this.setState({gitInfo:rt})},this.handleCustomParentMessage=rt=>{this.state.appConfig.enableCustomParentMessages?this.hostCommunicationMgr.sendMessageToHost({type:"CUSTOM_PARENT_MESSAGE",message:rt.message}):logError("Sending messages to the host is disabled in line with the platform policy.")},this.handleMessage=rt=>{const ot=(at,st,ut)=>{const ct=at[st];if(ct in ut)return ut[ct](at[ct]);throw new Error(`Cannot handle ${st} "${ct}".`)};try{ot(rt,"type",{newSession:at=>this.handleNewSession(at),sessionStatusChanged:at=>this.handleSessionStatusChanged(at),sessionEvent:at=>this.handleSessionEvent(at),delta:at=>this.handleDeltaMsg(at,rt.metadata),pageConfigChanged:at=>this.handlePageConfigChanged(at),pageInfoChanged:at=>this.handlePageInfoChanged(at),pagesChanged:at=>this.handlePagesChanged(at),pageNotFound:at=>this.handlePageNotFound(at),gitInfoChanged:at=>this.handleGitInfoChanged(at),scriptFinished:at=>this.handleScriptFinished(at),pageProfile:at=>this.handlePageProfileMsg(at),autoRerun:at=>this.handleAutoRerun(at),fileUrlsResponse:at=>this.uploadClient.onFileURLsResponse(at),parentMessage:at=>this.handleCustomParentMessage(at),logo:at=>this.handleLogo(at,rt.metadata),navigation:at=>this.handleNavigation(at),authRedirect:at=>{isInChildFrame()?this.hostCommunicationMgr.sendMessageToSameOriginHost({type:"REDIRECT_TO_URL",url:at.url}):window.location.href=at.url}})}catch(at){const st=ensureError(at);logError(st),this.showError("Bad message format",st.message)}},this.handleLogo=(rt,ot)=>{const at={activeScriptHash:ot.activeScriptHash,scriptRunId:this.state.scriptRunId};this.setState({elements:this.pendingElementsBuffer.appRootWithLogo(rt,at)},()=>{this.pendingElementsBuffer=this.state.elements})},this.handlePageConfigChanged=rt=>{const{title:ot,favicon:at,layout:st,initialSidebarState:ut,menuItems:ct}=rt;this.appNavigation.handlePageConfigChanged(rt),ot&&(this.hostCommunicationMgr.sendMessageToHost({type:"SET_PAGE_TITLE",title:ot}),document.title=ot),at&&this.onPageIconChanged(at),st!==this.state.layout&&this.setState(pt=>({layout:st,userSettings:{...pt.userSettings,wideMode:st===PageConfig.Layout.WIDE}})),ut!==this.state.initialSidebarState&&this.setState(()=>({initialSidebarState:ut})),this.setState({menuItems:ct})},this.handlePageInfoChanged=rt=>{const{queryString:ot}=rt,at=document.location.pathname+(ot?`?${ot}`:"");window.history.pushState({},"",at),this.hostCommunicationMgr.sendMessageToHost({type:"SET_QUERY_PARAM",queryParams:ot?`?${ot}`:""})},this.onPageNotFound=rt=>{const ot=rt?`You have requested page /${rt}, but no corresponding file was found in the app's pages/ directory`:"The page that you have requested does not seem to exist";this.showError("Page not found",`${ot}. Running the app's main page.`)},this.handlePageNotFound=rt=>{this.maybeSetState(this.appNavigation.handlePageNotFound(rt))},this.onPageIconChanged=rt=>{handleFavicon(rt,this.hostCommunicationMgr.sendMessageToHost,this.endpoints)},this.handlePagesChanged=rt=>{this.maybeSetState(this.appNavigation.handlePagesChanged(rt))},this.handleNavigation=rt=>{this.maybeSetState(this.appNavigation.handleNavigation(rt))},this.handlePageProfileMsg=rt=>{var st,ut,ct;const ot=PageProfile.toObject(rt),at=getBrowserInfo();this.metricsMgr.enqueue("pageProfile",{...ot,isFragmentRun:!!ot.isFragmentRun,appId:this.sessionInfo.current.appId,numPages:(st=this.state.appPages)==null?void 0:st.length,sessionId:this.sessionInfo.current.sessionId,pythonVersion:this.sessionInfo.current.pythonVersion,pageScriptHash:this.state.currentPageScriptHash,activeTheme:(ct=(ut=this.props.theme)==null?void 0:ut.activeTheme)==null?void 0:ct.name,totalLoadTime:Math.round((performance.now()-this.state.latestRunTime)*1e3),browserInfo:at})},this.handleAutoRerun=rt=>{const ot=setInterval(()=>{this.widgetMgr.sendUpdateWidgetsMessage(rt.fragmentId,!0)},rt.interval*1e3);this.setState(at=>({autoReruns:[...at.autoReruns,ot]}))},this.handleSessionStatusChanged=rt=>{this.setState(ot=>{let{scriptRunState:at}=ot,{dialog:st}=ot;return rt.scriptIsRunning&&ot.scriptRunState!==ScriptRunState.STOP_REQUESTED?(at=ScriptRunState.RUNNING,notNullOrUndefined(st)&&st.type===DialogType.SCRIPT_COMPILE_ERROR&&(st=void 0)):!rt.scriptIsRunning&&ot.scriptRunState!==ScriptRunState.RERUN_REQUESTED&&ot.scriptRunState!==ScriptRunState.COMPILATION_ERROR&&(at=ScriptRunState.NOT_RUNNING),{userSettings:{...ot.userSettings,runOnSave:!!rt.runOnSave},dialog:st,scriptRunState:at}})},this.handleSessionEvent=rt=>{if(this.sessionEventDispatcher.handleSessionEventMsg(rt),rt.type==="scriptCompilationException"){this.setState({scriptRunState:ScriptRunState.COMPILATION_ERROR});const ot={type:DialogType.SCRIPT_COMPILE_ERROR,exception:rt.scriptCompilationException,onClose:()=>{}};this.openDialog(ot)}},this.maybeUpdatePageUrl=(rt,ot,at)=>{const st=this.getBaseUriParts();if(st){const{basePath:ut}=st,ct=extractPageNameFromPathName(document.location.pathname,ut);if((ct===""?rt:ct)!==ot){const dt=at?"":ot,ft=preserveEmbedQueryParams(),bt=ft?`?${ft}`:"",Mt=`${ut?`/${ut}`:""}/${dt}${bt}`;window.history.pushState({},"",Mt)}}},this.handleNewSession=rt=>{const ot=rt.initialize;if(this.hasStreamlitVersionChanged(ot)){window.location.reload();return}this.sessionInfo.isSet||this.handleOneTimeInitialization(rt);const{appHash:at,currentPageScriptHash:st}=this.state,{scriptRunId:ut,name:ct,mainScriptPath:pt,fragmentIdsThisRun:dt,pageScriptHash:ft,mainScriptHash:bt}=rt;if(dt.length)this.setState({fragmentIdsThisRun:dt,latestRunTime:performance.now()});else{this.cleanupAutoReruns();const Mt=rt.config,mt=rt.customTheme;this.processThemeInput(mt),this.setState({allowRunOnSave:Mt.allowRunOnSave,hideTopBar:Mt.hideTopBar,toolbarMode:Mt.toolbarMode,latestRunTime:performance.now(),mainScriptHash:bt,fragmentIdsThisRun:dt}),this.maybeSetState(this.appNavigation.handleNewSession(rt)),this.onPageIconChanged("./favicon.png")}const ht=hashString(this.sessionInfo.current.installationId+pt);this.metricsMgr.setMetadata(this.state.deployedAppMetadata),this.metricsMgr.setAppHash(ht),this.metricsMgr.enqueue("updateReport"),at===ht&&st===ft?this.setState({scriptRunId:ut}):this.clearAppState(ht,ut,ct,bt)},this.handleOneTimeInitialization=rt=>{const ot=rt.initialize,at=rt.config;this.sessionInfo.setCurrent(SessionInfo.propsFromNewSessionMessage(rt)),this.metricsMgr.initialize({gatherUsageStats:at.gatherUsageStats,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost}),this.handleSessionStatusChanged(ot.sessionStatus)},this.onHistoryChange=()=>{const{currentPageScriptHash:rt}=this.state,ot=this.appNavigation.findPageByUrlPath(document.location.pathname),at=document.location.toString().includes("#"),st=(ot==null?void 0:ot.pageScriptHash)===rt;isNullOrUndefined$1(ot)||at&&st||this.onPageChange(ot.pageScriptHash)},this.setAndSendTheme=rt=>{this.props.theme.setTheme(rt),this.hostCommunicationMgr.sendMessageToHost({type:"SET_THEME_CONFIG",themeInfo:toExportedTheme(rt.emotion)})},this.createThemeHash=rt=>{if(!rt)return"hash_for_undefined_custom_theme";const ot=Object.entries(rt);return ot.sort(),hashString(ot.join(":"))},this.closeDialog=()=>{this.setState({dialog:void 0})},this.saveSettings=rt=>{const{runOnSave:ot}=this.state.userSettings,{runOnSave:at}=rt;if(this.setState({userSettings:rt}),ot!==at&&this.isServerConnected()){const st=new BackMsg({setRunOnSave:at});st.type="setRunOnSave",this.sendBackMsg(st)}},this.handleDeltaMsg=(rt,ot)=>{if(this.pendingElementsBuffer=this.pendingElementsBuffer.applyDelta(this.state.scriptRunId,rt,ot),!this.pendingElementsTimerRunning){this.pendingElementsTimerRunning=!0;const at=this.state.scriptRunState===ScriptRunState.RUNNING;setTimeout(()=>{this.pendingElementsTimerRunning=!1,at&&this.setState({elements:this.pendingElementsBuffer})},ELEMENT_LIST_BUFFER_TIMEOUT_MS)}},this.debugShutdownRuntime=()=>{if(this.isServerConnected()){const rt=new BackMsg({debugShutdownRuntime:!0});rt.type="debugShutdownRuntime",this.sendBackMsg(rt)}},this.debugDisconnectWebsocket=()=>{if(this.isServerConnected()){const rt=new BackMsg({debugDisconnectWebsocket:!0});rt.type="debugDisconnectWebsocket",this.sendBackMsg(rt)}},this.debugClearForwardMsgCache=()=>{var rt,ot;isLocalhost()&&((ot=(rt=this.connectionManager)==null?void 0:rt.connection)==null||ot.cache.messages.clear())},this.cleanupAutoReruns=()=>{this.state.autoReruns.forEach(rt=>{clearInterval(rt)}),this.setState({autoReruns:[]})},this.rerunScript=(rt=!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}),rt===!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=rt=>{const{elements:ot,mainScriptHash:at}=this.state;this.cleanupAutoReruns();const st=this.appNavigation.clearPageElements(ot,at,void 0),ut=new Set(Array.from(st.getElements()).map(ct=>getElementId(ct)).filter(notUndefined));this.sendRerunBackMsg(this.widgetMgr.getActiveWidgetStates(ut),void 0,rt)},this.isAppInReadyState=rt=>this.state.connectionState===ConnectionState.CONNECTED&&this.state.scriptRunState===ScriptRunState.NOT_RUNNING&&rt.scriptRunState===ScriptRunState.RUNNING&&rt.connectionState===ConnectionState.CONNECTED,this.sendRerunBackMsg=(rt,ot,at,st)=>{const ut=this.getBaseUriParts();if(!ut){logError("Cannot send rerun backMessage when disconnected from server.");return}const{currentPageScriptHash:ct}=this.state,{basePath:pt}=ut;let dt=this.getQueryString(),ft="";at?at!=ct&&(dt=preserveEmbedQueryParams(),this.hostCommunicationMgr.sendMessageToHost({type:"SET_QUERY_PARAM",queryParams:dt})):ct?at=ct:(ft=extractPageNameFromPathName(document.location.pathname,pt),at=""),this.sendBackMsg(new BackMsg({rerunScript:{queryString:dt,widgetStates:rt,pageScriptHash:at,pageName:ft,fragmentId:ot,isAutoRerun:st}})),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 rt=new BackMsg({stopScript:!0});rt.type="stopScript",this.sendBackMsg(rt),this.setState({scriptRunState:ScriptRunState.STOP_REQUESTED})},this.openClearCacheDialog=()=>{if(this.isServerConnected()){const rt={type:DialogType.CLEAR_CACHE,confirmCallback:this.clearCache,defaultAction:this.clearCache,onClose:()=>{}};this.openDialog(rt)}else logError("Cannot clear cache: disconnected from server")},this.openDeployDialog=()=>{var ot;const rt={type:DialogType.DEPLOY_DIALOG,onClose:this.closeDialog,showDeployError:this.showDeployError,isDeployErrorModalOpen:((ot=this.state.dialog)==null?void 0:ot.type)===DialogType.DEPLOY_ERROR,metricsMgr:this.metricsMgr};this.openDialog(rt)},this.openThemeCreatorDialog=()=>{this.metricsMgr.enqueue("menuClick",{label:"editTheme"});const rt={type:DialogType.THEME_CREATOR,backToSettings:this.settingsCallback,onClose:this.closeDialog,metricsMgr:this.metricsMgr};this.openDialog(rt)},this.clearCache=()=>{if(this.closeDialog(),this.isServerConnected()){const rt=new BackMsg({clearCache:!0});rt.type="clearCache",this.sendBackMsg(rt)}else logError("Cannot clear cache: disconnected from server")},this.sendAppHeartbeat=()=>{if(this.isServerConnected()){const rt=new BackMsg({appHeartbeat:!0});rt.type="appHeartbeat",this.sendBackMsg(rt)}else logError("Cannot send app heartbeat: disconnected from server")},this.sendBackMsg=rt=>{this.connectionManager?this.connectionManager.sendMessage(rt):logError(`Not connected. Cannot send back message: ${rt}`)},this.handleConnectionError=rt=>{this.showError("Connection error",rt)},this.isServerConnected=()=>this.connectionManager?this.connectionManager.isConnected():!1,this.settingsCallback=(rt=!0)=>{const ot={type:DialogType.SETTINGS,isServerConnected:this.isServerConnected(),settings:this.state.userSettings,allowRunOnSave:this.state.allowRunOnSave,onSave:this.saveSettings,onClose:()=>{},developerMode:showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode),openThemeCreator:this.openThemeCreatorDialog,animateModal:rt,metricsMgr:this.metricsMgr};this.openDialog(ot)},this.aboutCallback=()=>{const{menuItems:rt}=this.state,ot={type:DialogType.ABOUT,sessionInfo:this.sessionInfo,onClose:this.closeDialog,aboutSectionMd:rt==null?void 0:rt.aboutSectionMd};this.openDialog(ot)},this.printCallback=()=>{const{scriptRunState:rt}=this.state;if(rt!==ScriptRunState.NOT_RUNNING){setTimeout(this.printCallback,500);return}let ot;try{const at=getIFrameEnclosingApp(this.embeddingId);at&&at.contentWindow?ot=at.contentWindow.window:ot=window}catch{ot=window}finally{ot||(ot=window),ot.print()}},this.screencastCallback=()=>{const{scriptName:rt}=this.state,{startRecording:ot}=this.props.screenCast,at=hooks().format("YYYY-MM-DD-HH-MM-SS");ot(`streamlit-${rt}-${at}`)},this.handleFullScreen=rt=>{this.setState({isFullScreen:rt})},this.setLibConfig=rt=>{this.setState({libConfig:rt})},this.setAppConfig=rt=>{this.setState({appConfig:rt})},this.addScriptFinishedHandler=rt=>{this.setState((ot,at)=>({scriptFinishedHandlers:ot.scriptFinishedHandlers.concat(rt)}))},this.removeScriptFinishedHandler=rt=>{this.setState((ot,at)=>({scriptFinishedHandlers:without$1(ot.scriptFinishedHandlers,rt)}))},this.getBaseUriParts=()=>this.connectionManager?this.connectionManager.getBaseUriParts():void 0,this.getQueryString=()=>{const{queryParams:rt}=this.state,ot=rt&&rt.length>0?rt:document.location.search;return ot.startsWith("?")?ot.substring(1):ot},this.isInCloudEnvironment=()=>{const{hostMenuItems:rt}=this.state;return rt&&(rt==null?void 0:rt.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=(rt,ot)=>{if(this.isServerConnected()){const at=new BackMsg({fileUrlsRequest:{requestId:rt,fileNames:ot.map(st=>st.name),sessionId:this.sessionInfo.current.sessionId}});at.type="fileUrlsRequest",this.sendBackMsg(at)}},this.handleKeyDown=rt=>{switch(rt){case"c":showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode)&&this.openClearCacheDialog();break;case"r":this.rerunScript();break}},this.handleKeyUp=rt=>{rt==="esc"&&this.props.screenCast.stopRecording()},J$1();let et=this.createThemeHash();isPresetTheme(nt.theme.activeTheme)||(et=this.createThemeHash(toThemeInput(nt.theme.activeTheme.emotion))),this.state={connectionState:ConnectionState.INITIAL,elements:AppRoot.empty("",!0),isFullScreen:!1,scriptName:"",scriptRunId:INITIAL_SCRIPT_RUN_ID,appHash:null,scriptRunState:ScriptRunState.NOT_RUNNING,userSettings:{wideMode:!1,runOnSave:!1},layout:PageConfig.Layout.CENTERED,initialSidebarState:PageConfig.SidebarState.AUTO,menuItems:void 0,allowRunOnSave:!0,scriptFinishedHandlers:[],themeHash:et,gitInfo:null,formsData:createFormsData(),appPages:[],navSections:[],currentPageScriptHash:"",mainScriptHash:"",hideTopBar:!0,hideSidebarNav:!0,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:rt=>this.setState({formsData:rt})}),this.hostCommunicationMgr=new HostCommunicationManager({streamlitExecutionStartedAt:nt.streamlitExecutionStartedAt,sendRerunBackMsg:this.sendRerunBackMsg,closeModal:this.closeDialog,stopScript:this.stopScript,rerunScript:this.rerunScript,clearCache:this.clearCache,sendAppHeartbeat:this.sendAppHeartbeat,setInputsDisabled:rt=>{this.setState({inputsDisabled:rt})},themeChanged:this.handleThemeMessage,pageChanged:this.onPageChange,isOwnerChanged:rt=>this.setState({isOwner:rt}),fileUploadClientConfigChanged:rt=>{this.endpoints.setFileUploadClientConfig!==void 0&&this.endpoints.setFileUploadClientConfig(rt)},hostMenuItemsChanged:rt=>{this.setState({hostMenuItems:rt})},hostToolbarItemsChanged:rt=>{this.setState({hostToolbarItems:rt})},hostHideSidebarNavChanged:rt=>{this.setState({hostHideSidebarNav:rt})},sidebarChevronDownshiftChanged:rt=>{this.setState({sidebarChevronDownshift:rt})},pageLinkBaseUrlChanged:rt=>{this.setState({pageLinkBaseUrl:rt})},queryParamsChanged:rt=>{this.setState({queryParams:rt})},deployedAppMetadataChanged:rt=>{this.setState({deployedAppMetadata:rt})},restartWebsocketConnection:()=>{this.connectionManager||this.initializeConnectionManager()},terminateWebsocketConnection:()=>{var rt;(rt=this.connectionManager)==null||rt.disconnect(),this.connectionManager=null}}),this.endpoints=new DefaultStreamlitEndpoints({getServerUri:this.getBaseUriParts,csrfEnabled:!0}),this.uploadClient=new FileUploadClient({sessionInfo:this.sessionInfo,endpoints:this.endpoints,formsWithPendingRequestsChanged:rt=>this.widgetMgr.setFormsWithUploadsInProgress(rt),requestFileURLs:this.requestFileURLs}),this.componentRegistry=new ComponentRegistry(this.endpoints),this.pendingElementsTimerRunning=!1,this.pendingElementsBuffer=this.state.elements,this.appNavigation=new AppNavigation(this.hostCommunicationMgr,this.maybeUpdatePageUrl,this.onPageNotFound,this.onPageIconChanged),window.streamlitDebug={clearForwardMsgCache:this.debugClearForwardMsgCache,disconnectWebsocket:this.debugDisconnectWebsocket,shutdownRuntime:this.debugShutdownRuntime}}initializeConnectionManager(){this.connectionManager=new ConnectionManager({sessionInfo:this.sessionInfo,endpoints:this.endpoints,onMessage:this.handleMessage,onConnectionError:this.handleConnectionError,connectionStateChanged:this.handleConnectionStateChanged,claimHostAuthToken:this.hostCommunicationMgr.claimAuthToken,resetHostAuthToken:this.hostCommunicationMgr.resetAuthToken,onHostConfigResp:nt=>{const{allowedOrigins:et,useExternalAuthToken:rt,disableFullscreenMode:ot,enableCustomParentMessages:at,mapboxToken:st,enforceDownloadInNewTab:ut,metricsUrl:ct}=nt,pt={allowedOrigins:et,useExternalAuthToken:rt,enableCustomParentMessages:at},dt={mapboxToken:st,disableFullscreenMode:ot,enforceDownloadInNewTab:ut};this.metricsMgr.setMetricsConfig(ct),this.hostCommunicationMgr.setAllowedOrigins(pt),this.setAppConfig(pt),this.setLibConfig(dt)}})}componentDidMount(){this.initializeConnectionManager(),mark(this.state.scriptRunState),this.hostCommunicationMgr.sendMessageToHost({type:"SCRIPT_RUN_STATE_CHANGED",scriptRunState:this.state.scriptRunState}),isScrollingHidden()&&document.body.classList.add("embedded"),isInChildFrame()&&(window.iFrameResizer={heightCalculationMethod:()=>{const nt=document.querySelectorAll("[data-iframe-height]"),et=Array.from(nt).map(rt=>Math.ceil(rt.getBoundingClientRect().bottom));return Math.max(0,...et)}},__vitePreload(()=>import("./iframeResizer.contentWindow.Cfik70yz.js").then(nt=>nt.i),[],import.meta.url)),this.hostCommunicationMgr.sendMessageToHost({type:"SET_THEME_CONFIG",themeInfo:toExportedTheme(this.props.theme.activeTheme.emotion)}),this.metricsMgr.enqueue("viewReport"),window.addEventListener("popstate",this.onHistoryChange,!1)}componentDidUpdate(nt,et){window.prerenderReady===!1&&this.isAppInReadyState(et)&&(window.prerenderReady=!0),this.state.scriptRunState!==et.scriptRunState&&(mark(this.state.scriptRunState),this.state.scriptRunState===ScriptRunState.NOT_RUNNING&&measure("script-run-cycle",ScriptRunState.RUNNING,ScriptRunState.NOT_RUNNING),this.hostCommunicationMgr.sendMessageToHost({type:"SCRIPT_RUN_STATE_CHANGED",scriptRunState:this.state.scriptRunState}))}componentWillUnmount(){var nt;(nt=this.connectionManager)==null||nt.disconnect(),this.hostCommunicationMgr.closeHostCommunication(),window.removeEventListener("popstate",this.onHistoryChange,!1)}showError(nt,et){logError(et);const rt={type:DialogType.WARNING,title:nt,msg:et,onClose:()=>{}};this.openDialog(rt)}hasStreamlitVersionChanged(nt){if(this.sessionInfo.isSet){const et=this.sessionInfo.current.streamlitVersion,{environmentInfo:rt}=nt;if(notNullOrUndefined(rt)&¬NullOrUndefined(rt.streamlitVersion))return et!=rt.streamlitVersion}return!1}maybeSetState(nt){if(nt){const[et,rt]=nt;this.setState(et,rt)}}processThemeInput(nt){const et=this.createThemeHash(nt);if(et===this.state.themeHash)return;this.setState({themeHash:et});const rt=!isPresetTheme(this.props.theme.activeTheme);if(nt){const ot=createTheme(CUSTOM_THEME_NAME,nt);this.props.theme.addThemes([ot]),(getCachedTheme()===null||rt)&&this.setAndSendTheme(ot)}else this.props.theme.addThemes([]),rt&&this.setAndSendTheme(getHostSpecifiedTheme())}handleScriptFinished(nt){if(nt===ForwardMsg.ScriptFinishedStatus.FINISHED_SUCCESSFULLY||nt===ForwardMsg.ScriptFinishedStatus.FINISHED_EARLY_FOR_RERUN||nt===ForwardMsg.ScriptFinishedStatus.FINISHED_FRAGMENT_RUN_SUCCESSFULLY){if(window.setTimeout(()=>{this.state.scriptFinishedHandlers.map(et=>et())},0),nt===ForwardMsg.ScriptFinishedStatus.FINISHED_SUCCESSFULLY||nt===ForwardMsg.ScriptFinishedStatus.FINISHED_FRAGMENT_RUN_SUCCESSFULLY){this.setState(({scriptRunId:rt,fragmentIdsThisRun:ot})=>({elements:this.pendingElementsBuffer.clearStaleNodes(rt,ot)}),()=>{this.pendingElementsBuffer=this.state.elements});const et=new Set(Array.from(this.state.elements.getElements()).map(rt=>getElementId(rt)).filter(notUndefined));this.widgetMgr.removeInactive(et)}this.connectionManager!==null&&nt!==ForwardMsg.ScriptFinishedStatus.FINISHED_EARLY_FOR_RERUN&&this.sessionInfo.isSet&&this.connectionManager.incrementMessageCacheRunCount(this.sessionInfo.current.maxCachedMessageAge)}}clearAppState(nt,et,rt,ot){const{hideSidebarNav:at,elements:st}=this.state,ut=at&&st.sidebar||void 0;this.setState({scriptRunId:et,scriptName:rt,appHash:nt,elements:this.appNavigation.clearPageElements(this.pendingElementsBuffer,ot,ut)},()=>{this.pendingElementsBuffer=this.state.elements;const ct=new Set(Array.from(this.state.elements.getElements()).map(pt=>getElementId(pt)).filter(notUndefined));this.widgetMgr.removeInactive(ct)})}openDialog(nt){this.setState({dialog:nt})}render(){const{allowRunOnSave:nt,connectionState:et,dialog:rt,elements:ot,initialSidebarState:at,menuItems:st,isFullScreen:ut,scriptRunId:ct,scriptRunState:pt,userSettings:dt,hideTopBar:ft,hideSidebarNav:bt,expandSidebarNav:ht,currentPageScriptHash:Mt,hostHideSidebarNav:mt,pageLinkBaseUrl:Ot,sidebarChevronDownshift:zt,hostMenuItems:yt,hostToolbarItems:vt,libConfig:At,appConfig:St,inputsDisabled:Et,appPages:Tt,navSections:Rt}=this.state,Ct=showDevelopmentOptions(this.state.isOwner,this.state.toolbarMode),wt=classNames("stApp",getEmbeddingIdClassName(this.embeddingId),{"streamlit-embedded":isEmbed(),"streamlit-wide":dt.wideMode}),Ft=rt?StreamlitDialog({...rt,onClose:this.closeDialog}):null,Ht=Et||et!==ConnectionState.CONNECTED;return jsx$1(AppContext.Provider,{value:{initialSidebarState:at,wideMode:dt.wideMode,embedded:isEmbed(),showPadding:!isEmbed()||isPaddingDisplayed(),disableScrolling:isScrollingHidden(),showToolbar:!isEmbed()||isToolbarDisplayed(),showColoredLine:!isEmbed()||isColoredLineDisplayed(),pageLinkBaseUrl:Ot,sidebarChevronDownshift:zt,gitInfo:this.state.gitInfo,appConfig:St},children:jsx$1(LibContext.Provider,{value:{isFullScreen:ut,setFullScreen:this.handleFullScreen,addScriptFinishedHandler:this.addScriptFinishedHandler,removeScriptFinishedHandler:this.removeScriptFinishedHandler,activeTheme:this.props.theme.activeTheme,setTheme:this.setAndSendTheme,availableThemes:this.props.theme.availableThemes,addThemes:this.props.theme.addThemes,onPageChange:this.onPageChange,currentPageScriptHash:Mt,libConfig:At,fragmentIdsThisRun:this.state.fragmentIdsThisRun,locale:window.navigator.language},children:jsx$1(ReactHotkeys,{keyName:"r,c,esc",onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,children:jsxs(StyledApp,{className:wt,"data-testid":"stApp","data-test-script-state":ct==INITIAL_SCRIPT_RUN_ID?"initial":pt,"data-test-connection-state":et,children:[jsxs(Header,{children:[!ft&&jsxs(Fragment,{children:[jsx$1(StatusWidget,{connectionState:et,sessionEventDispatcher:this.sessionEventDispatcher,scriptRunState:pt,rerunScript:this.rerunScript,stopScript:this.stopScript,allowRunOnSave:nt}),jsx$1(ToolbarActions,{hostToolbarItems:vt,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,metricsMgr:this.metricsMgr})]}),this.showDeployButton()&&jsx$1(DeployButton,{onClick:this.deployButtonClicked.bind(this)}),jsx$1(MainMenu$1,{isServerConnected:this.isServerConnected(),quickRerunCallback:this.rerunScript,clearCacheCallback:this.openClearCacheDialog,settingsCallback:this.settingsCallback,aboutCallback:this.aboutCallback,printCallback:this.printCallback,screencastCallback:this.screencastCallback,screenCastState:this.props.screenCast.currentState,hostMenuItems:yt,developmentMode:Ct,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,menuItems:st,metricsMgr:this.metricsMgr,toolbarMode:this.state.toolbarMode})]}),jsx$1(AppView,{endpoints:this.endpoints,sendMessageToHost:this.hostCommunicationMgr.sendMessageToHost,elements:ot,scriptRunId:ct,scriptRunState:pt,widgetMgr:this.widgetMgr,widgetsDisabled:Ht,uploadClient:this.uploadClient,componentRegistry:this.componentRegistry,formsData:this.state.formsData,appLogo:ot.logo,appPages:Tt,navSections:Rt,onPageChange:this.onPageChange,currentPageScriptHash:Mt,hideSidebarNav:bt||mt,expandSidebarNav:ht}),Ft]})})})})}}const AppWithScreencast=withScreencast(App);function useThemeManager(){const tt=getDefaultTheme(),[nt,et]=reactExports.useState(tt),[rt,ot]=reactExports.useState([]),[at,st]=reactExports.useState([...createPresetThemes(),...isPresetTheme(tt)?[]:[tt]]),ut=ft=>{st([...createPresetThemes(),...ft])},ct=reactExports.useCallback(ft=>{ft!==nt&&(et(ft),ft.name===AUTO_THEME_NAME?removeCachedTheme():setCachedTheme(ft))},[et,nt]),pt=reactExports.useCallback(()=>{nt.name===AUTO_THEME_NAME&&ct(getHostSpecifiedTheme());const ft=at.filter(bt=>bt.name!==AUTO_THEME_NAME);st([createAutoTheme(),...ft])},[nt.name,at,ct]),dt=reactExports.useCallback(ft=>{ft.fontFaces&&ot(ft.fontFaces);const bt=new CustomThemeConfig(ft),ht=createTheme(CUSTOM_THEME_NAME,bt);ct(ht)},[ot,ct]);return reactExports.useEffect(()=>{const ft=window.matchMedia("(prefers-color-scheme: dark)");return ft.addEventListener("change",pt),window.addEventListener("afterprint",pt),()=>{window.removeEventListener("afterprint",pt),ft.removeEventListener("change",pt)}},[nt,at,pt]),[{setTheme:ct,activeTheme:nt,addThemes:ut,availableThemes:at,setImportedTheme:dt},rt]}const ThemedApp=({streamlitExecutionStartedAt:tt})=>{const[nt,et]=useThemeManager(),{activeTheme:rt}=nt,ot=rt.name===CUSTOM_THEME_NAME&&et.length>0;return jsx$1(RootStyleProvider,{theme:rt,children:jsx$1(WindowDimensionsProvider,{children:jsxs(PortalProvider,{children:[ot&&jsx$1(FontFaceDeclaration,{fontFaces:et}),jsx$1(AppWithScreencast,{theme:nt,streamlitExecutionStartedAt:tt})]})})})},streamlitExecutionStartedAt=Date.now(),engine=new StyletronClient({prefix:"st-"});ReactDOM.render(jsx$1(Provider$1,{value:engine,children:jsx$1(ThemedApp,{streamlitExecutionStartedAt})}),document.getElementById("root"));export{Field$1 as $,isNullOrUndefined$1 as A,merge$6 as B,numbro$1 as C,notNullOrUndefined as D,EmotionIconBase as E,Fragment as F,hooks as G,getTimezone as H,moment$1 as I,isIntegerType as J,isUnsignedIntegerType as K,isDurationType as L,isPeriodType as M,format as N,isBooleanType as O,PortalContext as P,_baseKeys as Q,React$1 as R,_getTag as S,isArguments_1 as T,isArray_1 as U,isArrayLike_1 as V,isBufferExports as W,_isPrototype as X,isTypedArray_1 as Y,DataFrameCellType as Z,_extends$Q as _,range$1 as a,parseToRgba as a$,Null as a0,isTimeType as a1,convertTimeToDate as a2,isDecimalType as a3,isStringType as a4,isEmptyType as a5,isDatetimeType as a6,isDateType as a7,isObjectType as a8,isBytesType as a9,LibContext as aA,jsxs as aB,Resizable as aC,getGray70 as aD,getGray30 as aE,getCategoricalColorsArray as aF,getDivergingColorsArray as aG,getSequentialColorsArray as aH,getBlue80 as aI,debounce$4 as aJ,Global as aK,_baseMerge as aL,_createAssigner as aM,withTheme as aN,DynamicIcon as aO,toaster as aP,Kind as aQ,AlertElement as aR,_assertThisInitialized$e as aS,StyledInlineCode as aT,ErrorElement as aU,axios as aV,Skeleton$1 as aW,Skeleton as aX,hoistNonReactStatics$2 as aY,ensureError as aZ,lib$3 as a_,isNumericType as aa,isCategoricalType as ab,isListType as ac,isRangeIndexType as ad,useTheme as ae,Arrow$2 as af,logError as ag,isArray$k as ah,_defineProperty$u as ai,_objectWithoutProperties$o as aj,_typeof$g as ak,jsx as al,css$2 as am,_toConsumableArray$3 as an,transparentize as ao,convertRemToPx as ap,mix$1 as aq,logWarning as ar,getStyledCell as as,isEqual$1 as at,StyledTooltipContentWrapper as au,StreamlitMarkdown$1 as av,PLACEMENT as aw,ACCESSIBILITY_TYPE as ax,hasLightBackgroundColor as ay,Popover$1 as az,reactDomExports as b,isPresetTheme as b$,DeckGlJsonChart$1 as b0,_unsupportedIterableToArray$l as b1,DEFAULT_IFRAME_FEATURE_POLICY as b2,DEFAULT_IFRAME_SANDBOX_POLICY as b3,darken as b4,BaseButtonSize as b5,BaseButtonKind as b6,BaseButtonTooltip as b7,DynamicButtonLabel as b8,IsSidebarContext as b9,themeColors as bA,isMobile_1 as bB,CAMERA_PERMISSION_URL as bC,StyledWidgetLabelHelp as bD,isFocusVisible as bE,getOverride as bF,getOverrideProps as bG,Checkbox$1 as bH,StyledContent as bI,StyledCheckbox$1 as bJ,BaseColorPicker$1 as bK,useStyletron as bL,mergeOverride as bM,toObjectOverride as bN,Icon$1 as bO,UIDConsumer as bP,StatefulMenu as bQ,mergeOverrides as bR,ChevronDown$1 as bS,ThemeContext as bT,forkFocus as bU,forkBlur as bV,Select as bW,without$1 as bX,fuzzyFilterSelectOptions as bY,TYPE as bZ,VirtualDropdown as b_,Placement as ba,getGray90 as bb,getIncreasingGreen as bc,getDecreasingRed as bd,PlotlyChart$1 as be,keysToSnakeCase as bf,WindowDimensionsContext as bg,Video$1 as bh,zip$1 as bi,FileUploaderState as bj,UploadedFileInfo as bk,StyledSpinner as bl,ENABLE_PERIPHERALS_DOCS_URL as bm,Icon$2 as bn,BaseButton as bo,blend as bp,labelVisibilityProtoValueToEnum as bq,TooltipIcon as br,WidgetLabel as bs,Tooltip as bt,styled as bu,getOverrides as bv,LocaleContext as bw,ButtonGroup$1 as bx,LabelVisibilityMessage as by,StyledWidgetLabelHelpInline as bz,_hasPath as c,classNames as c0,UISelectbox as c1,isValidFormId as c2,toPropertyKey as c3,_setPrototypeOf$e as c4,hexToRgb as c5,withWrapper as c6,StyledWidgetInstructions as c7,isFromMac as c8,CUSTOM_INPUT_TYPE as c9,SIZE$1 as ca,DeleteAlt$1 as cb,ADJOINED as cc,filterOptions as cd,ENHANCER_POSITION as ce,pick$1 as cf,Slider$2 as cg,isFromWindows as ch,__awaiter as ci,__generator as cj,__spread as ck,PropTypes as cl,ChevronLeft as cm,ChevronRight as cn,isInForm as co,toString_1 as cp,TextInput$1 as cq,ThemeProvider$1 as cr,createThemedStyled as cs,createThemedUseStyletron as ct,createThemedWithStyle as cu,expandBorderStyles as cv,withStyle as cw,getAugmentedNamespace as cx,reactIsExports$1 as cy,NumberInput$1 as cz,commonjsGlobal$1 as d,classnamesExports as e,_root as f,getDefaultExportFromCjs$1 as g,isObject_1 as h,isPropValid as i,jsx$1 as j,keyframes as k,_Set as l,_setToArray as m,newStyled as n,_SetCache as o,propTypesExports as p,_arrayIncludes as q,reactExports as r,_arrayIncludesWith as s,toNumber_1 as t,_cacheHas as u,groupBy$1 as v,__vitePreload as w,flatten$2 as x,require$$0 as y,toString$9 as z};
|