streamlit-nightly 1.41.2.dev20250113__py2.py3-none-any.whl → 1.41.2.dev20250115__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/commands/navigation.py +15 -14
- streamlit/connections/snowflake_connection.py +30 -49
- streamlit/elements/widgets/button.py +8 -7
- streamlit/navigation/page.py +6 -3
- streamlit/static/index.html +1 -1
- streamlit/static/static/js/{FileDownload.esm.nDxE1uhe.js → FileDownload.esm.2W3WeZp2.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.CI0WOi1j.js → FormClearHelper.BouJUO4t.js} +1 -1
- streamlit/static/static/js/{Hooks.BJ9wR0AU.js → Hooks.BsCM2VRj.js} +1 -1
- streamlit/static/static/js/{InputInstructions.D3geEFNa.js → InputInstructions.Czb180Te.js} +1 -1
- streamlit/static/static/js/{ProgressBar.COmW3GV1.js → ProgressBar.DiAR_iBM.js} +2 -2
- streamlit/static/static/js/{RenderInPortalIfExists.BThihgkd.js → RenderInPortalIfExists.DrsDyygs.js} +1 -1
- streamlit/static/static/js/{Toolbar.CEvzQ96S.js → Toolbar.Bl4mqr4u.js} +1 -1
- streamlit/static/static/js/{base-input.BP5TsyYO.js → base-input.BHMnVAOr.js} +4 -4
- streamlit/static/static/js/{createSuper.BmuFLMtM.js → createSuper.BftCasOC.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.BI4k6rKR.js → data-grid-overlay-editor.C_AfZV80.js} +1 -1
- streamlit/static/static/js/{downloader.BFBCg3lC.js → downloader.CkXPXM6R.js} +1 -1
- streamlit/static/static/js/{es6.DtixDmn0.js → es6.D2MIDSER.js} +2 -2
- streamlit/static/static/js/{getPrototypeOf.q2WOIOs_.js → getPrototypeOf.8KqRDNXH.js} +1 -1
- streamlit/static/static/js/{iframeResizer.contentWindow.DLr5MCWa.js → iframeResizer.contentWindow.DzzdqD8t.js} +1 -1
- streamlit/static/static/js/{index.BbqzVelh.js → index.2gId-hkY.js} +1 -1
- streamlit/static/static/js/{index.CSU4ah-Z.js → index.B3hBEIu8.js} +1 -1
- streamlit/static/static/js/{index.Bs1A0Yz9.js → index.B56k54Px.js} +2 -2
- streamlit/static/static/js/{index.CdISilgA.js → index.B7TErKDq.js} +1 -1
- streamlit/static/static/js/{index.Bjj8dbrN.js → index.BBMRAwlY.js} +1 -1
- streamlit/static/static/js/{index.D-Axxgw0.js → index.BOaF1pd3.js} +1 -1
- streamlit/static/static/js/{index.DnHxDAnh.js → index.BSBaMBDf.js} +1 -1
- streamlit/static/static/js/{index.Dy-_rPOY.js → index.BWKboqrD.js} +1 -1
- streamlit/static/static/js/{index.PvXferS3.js → index.BZACNIPy.js} +1 -1
- streamlit/static/static/js/{index.DcDlCutW.js → index.Bomzp8ws.js} +9 -9
- streamlit/static/static/js/{index.DGisaPeN.js → index.BpkKw-EE.js} +1 -1
- streamlit/static/static/js/{index.CqdRxVGu.js → index.BvFiU2Cj.js} +1 -1
- streamlit/static/static/js/{index.BFQMhsjo.js → index.C3hZcowl.js} +1 -1
- streamlit/static/static/js/{index.C8GKMyxG.js → index.CGcb6vEw.js} +1 -1
- streamlit/static/static/js/{index.Cm3Q2clw.js → index.CIKFC12n.js} +1 -1
- streamlit/static/static/js/{index.Cm0XvfNt.js → index.CQ7Y6jj1.js} +1 -1
- streamlit/static/static/js/{index.DMUcVhPY.js → index.CWnLDBO4.js} +1 -1
- streamlit/static/static/js/{index.-XYuQlg3.js → index.CbXquzx4.js} +2 -2
- streamlit/static/static/js/{index.BDtzkwhv.js → index.CcAtzCnX.js} +59 -59
- streamlit/static/static/js/{index.CSXsntDd.js → index.CdD4T5ia.js} +1 -1
- streamlit/static/static/js/{index.DyhG13mI.js → index.CxVERd8N.js} +1 -1
- streamlit/static/static/js/{index.BHnfxjsW.js → index.CyixjHVj.js} +1 -1
- streamlit/static/static/js/{index.C5llicCl.js → index.DCPA8CBQ.js} +3 -3
- streamlit/static/static/js/{index.KrDy5y3p.js → index.DHthJf6z.js} +1 -1
- streamlit/static/static/js/{index.CSnqL7FE.js → index.DOp8WWEB.js} +1 -1
- streamlit/static/static/js/{index.Ba_7Au_r.js → index.Dc5AjA6K.js} +1 -1
- streamlit/static/static/js/{index.B5B5DAsT.js → index.DdMp70lp.js} +1 -1
- streamlit/static/static/js/{index.CeOuM3pB.js → index.DoxwX9TA.js} +1 -1
- streamlit/static/static/js/{index.BHNK3GF6.js → index.DqFVIXyV.js} +1 -1
- streamlit/static/static/js/{index.Cn4twLJI.js → index.DqwYtic0.js} +1 -1
- streamlit/static/static/js/{index.BDK4X_d2.js → index.DuBLm9ul.js} +1 -1
- streamlit/static/static/js/{index.BLSTSv7f.js → index.DxAYNSu8.js} +1 -1
- streamlit/static/static/js/{index.BiQBtTGP.js → index.UG0Sy7w3.js} +1 -1
- streamlit/static/static/js/{index.BjNnwU0F.js → index.d8-RPUlf.js} +1 -1
- streamlit/static/static/js/{index.BXIDmZYJ.js → index.qmgXiJ18.js} +1 -1
- streamlit/static/static/js/{index.B_91y3ES.js → index.s016NW7I.js} +3 -3
- streamlit/static/static/js/{index.CqNQZi9B.js → index.xmd7bHOh.js} +2 -2
- streamlit/static/static/js/{input.nXqoMhZv.js → input.D0WJMWBG.js} +1 -1
- streamlit/static/static/js/{memory.gpz43-um.js → memory.BujUvzJS.js} +1 -1
- streamlit/static/static/js/{mergeWith.Bdf-VJ8P.js → mergeWith.D78ew9Q8.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.DaFTPEew.js → number-overlay-editor.p4lzzkCV.js} +1 -1
- streamlit/static/static/js/{sandbox.axae7ePg.js → sandbox.DlA1rBd1.js} +1 -1
- streamlit/static/static/js/{slicedToArray.CkAkmYZy.js → slicedToArray.CJDXlgcX.js} +1 -1
- streamlit/static/static/js/{textarea.BaAknq-y.js → textarea.DfgNwmCV.js} +2 -2
- streamlit/static/static/js/{timepicker.DaL-07Js.js → timepicker.Dk2D15sb.js} +1 -1
- streamlit/static/static/js/{uniqueId.BXhjhO5X.js → uniqueId.BfX7No7I.js} +1 -1
- streamlit/static/static/js/{useBasicWidgetState.BuJZ1h2y.js → useBasicWidgetState.Dg6_MitK.js} +1 -1
- streamlit/static/static/js/{useOnInputChange.BlJ_4Sll.js → useOnInputChange.ZLxV0UFG.js} +1 -1
- streamlit/static/static/js/{withFullScreenWrapper.K9D84vUj.js → withFullScreenWrapper.D8pjpwtz.js} +1 -1
- streamlit/watcher/util.py +86 -20
- {streamlit_nightly-1.41.2.dev20250113.dist-info → streamlit_nightly-1.41.2.dev20250115.dist-info}/METADATA +2 -2
- {streamlit_nightly-1.41.2.dev20250113.dist-info → streamlit_nightly-1.41.2.dev20250115.dist-info}/RECORD +75 -75
- {streamlit_nightly-1.41.2.dev20250113.data → streamlit_nightly-1.41.2.dev20250115.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.41.2.dev20250113.dist-info → streamlit_nightly-1.41.2.dev20250115.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.41.2.dev20250113.dist-info → streamlit_nightly-1.41.2.dev20250115.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.41.2.dev20250113.dist-info → streamlit_nightly-1.41.2.dev20250115.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.DxAYNSu8.js","./RenderInPortalIfExists.DrsDyygs.js","./index.DqwYtic0.js","./index.CcAtzCnX.js","./FormClearHelper.BouJUO4t.js","./withFullScreenWrapper.D8pjpwtz.js","./Toolbar.Bl4mqr4u.js","./mergeWith.D78ew9Q8.js","./sprintf.C-r3gIuM.js","./createDownloadLinkElement.DZMwyjvU.js","./slicedToArray.CJDXlgcX.js","./getPrototypeOf.8KqRDNXH.js","./createSuper.BftCasOC.js","./FileDownload.esm.2W3WeZp2.js","../css/index.B26BQfSF.css","./index.DoxwX9TA.js","./threshold.B8r8f5kt.js","./value.iufjd77T.js","./timer.RueuYoQV.js","./index.CGcb6vEw.js","./useBasicWidgetState.Dg6_MitK.js","../css/index.CG16XVnL.css","./index.BBMRAwlY.js","./index.qmgXiJ18.js","./index.UG0Sy7w3.js","./index.CIKFC12n.js","./Hooks.BsCM2VRj.js","./index.xmd7bHOh.js","./index.DdMp70lp.js","./index.CxVERd8N.js","./UploadFileInfo.C-jY39rj.js","./ProgressBar.DiAR_iBM.js","./index.DuBLm9ul.js","./InputInstructions.Czb180Te.js","./inputUtils.CQWz5UKz.js","./textarea.DfgNwmCV.js","./base-input.BHMnVAOr.js","./index.B56k54Px.js","./index.B7TErKDq.js","./index.CdD4T5ia.js","./timepicker.Dk2D15sb.js","./input.D0WJMWBG.js","./index.B3hBEIu8.js","./index.Dc5AjA6K.js","./index.DCPA8CBQ.js","./index.BpkKw-EE.js","./index.CbXquzx4.js","./index.BSBaMBDf.js","./index.CWnLDBO4.js","./uniqueId.BfX7No7I.js","./useOnInputChange.ZLxV0UFG.js","./index.BWKboqrD.js","./index.s016NW7I.js","./index.2gId-hkY.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
|
@@ -66,7 +66,7 @@ index signature as the original data.
|
|
66
66
|
|
67
67
|
In this case, \`add_rows()\` received \`${JSON.stringify(et)}\`
|
68
68
|
but was expecting \`${JSON.stringify(rt)}\`.
|
69
|
-
`)}return tt.map(et=>{if(et.pandas_type===PandasRangeIndexType){const{stop:rt,step:ot}=et.meta,{start:at,stop:st,step:ut}=nt[0].meta,ct=(st-at)/ut,pt=rt+ct*ot;return{...et,meta:{...et.meta,stop:pt}}}return et})}function concatDataTypes(tt,nt){return tt.length===0?nt:tt}function concat(tt,nt,et,rt,ot,at){const st=concatIndexes(nt,tt.index,ot,rt.index),ut=concatData(et,tt.data,at,rt.data),ct=concatTypes(tt,rt);return{index:st,data:ut,types:ct}}function isPandasRangeIndex(tt){return typeof tt=="object"&&tt.kind==="range"}function parsePandasSchema(tt){const nt=tt.schema.metadata.get("pandas");if(isNullOrUndefined$1(nt))throw new Error("Table schema is missing.");return JSON.parse(nt)}function getRawColumns(tt){return tt.columns.map(nt=>nt.field_name).filter(nt=>!tt.index_columns.includes(nt))}function parseIndexData(tt,nt){return nt.index_columns.map(et=>{if(isPandasRangeIndex(et)){const{start:ot,stop:at,step:st}=et;return range$1(ot,at,st)}const rt=tt.getChild(et);return rt instanceof Vector&&rt.type instanceof Null?null:rt}).filter(et=>et!==null)}function parseIndexNames(tt){return tt.index_columns.map(nt=>{if(isPandasRangeIndex(nt)){const{name:et}=nt;return et||""}return nt.startsWith("__index_level_")?"":nt})}function parseColumnNames(tt){const nt=tt.column_indexes.length>1;return unzip$2(tt.columns.map(et=>et.field_name).filter(et=>!tt.index_columns.includes(et)).map(et=>nt?JSON.parse(et.replace(/\(/g,"[").replace(/\)/g,"]").replace(/'/g,'"')):[et]))}function parseData(tt,nt,et){const rt=tt.numRows,ot=nt.length>0?nt[0].length:0;return rt===0||ot===0?tt.select([]):tt.select(et)}function parseColumnTypes(tt,nt){const et=parseIndexType(nt),rt=parseDataType(nt);return{index:et,data:rt}}function parseDataType(tt){return tt.columns.filter(nt=>!tt.index_columns.includes(nt.field_name)).map(nt=>({pandas_type:nt.pandas_type,numpy_type:nt.numpy_type,meta:nt.metadata}))}function parseIndexType(tt){return tt.index_columns.map(nt=>{if(isPandasRangeIndex(nt))return{pandas_type:PandasRangeIndexType,numpy_type:PandasRangeIndexType,meta:nt};const et=tt.columns.find(rt=>rt.field_name===nt);if(!et)throw new Error(`${nt} index not found.`);return{pandas_type:et.pandas_type,numpy_type:et.numpy_type,meta:et.metadata}})}function parseFields(tt){return Object.fromEntries((tt.fields||[]).map((nt,et)=>[nt.name.startsWith("__index_level_")?nt.name:String(et),nt]))}function parseArrowIpcBytes(tt){const nt=tableFromIPC(tt),et=parseFields(nt.schema),rt=parsePandasSchema(nt),ot=parseColumnNames(rt),at=parseIndexNames(rt),st=getRawColumns(rt),ut=parseData(nt,ot,st),ct=parseIndexData(nt,rt),pt=parseColumnTypes(nt,rt);return{columnNames:ot,fields:et,indexData:ct,indexNames:at,data:ut,columnTypes:pt}}var _a,DataFrameCellType;(function(tt){tt.BLANK="blank",tt.INDEX="index",tt.COLUMNS="columns",tt.DATA="data"})(DataFrameCellType||(DataFrameCellType={}));_a=L;class Quiver{constructor(nt){var pt;this[_a]=!0;const{indexData:et,columnNames:rt,data:ot,columnTypes:at,fields:st,indexNames:ut}=parseArrowIpcBytes(nt.data),ct=nt.styler?parseStyler(nt.styler):void 0;this._indexData=et,this._columnNames=rt,this._data=ot,this._columnTypes=at,this._fields=st,this._styler=ct,this._indexNames=ut,this._num_bytes=((pt=nt.data)==null?void 0:pt.length)??0}get indexData(){return this._indexData}get indexNames(){return this._indexNames}get columnNames(){return this._columnNames}get data(){return this._data}get columnTypes(){return this._columnTypes}get styler(){return this._styler}get dimensions(){var ut,ct;const nt=this._indexData.length||this.columnTypes.index.length||1,et=this._columnNames.length||1,rt=this._data.numRows||0,ot=this._data.numCols||((ct=(ut=this._columnNames)==null?void 0:ut[0])==null?void 0:ct.length)||0,at=et+rt,st=nt+ot;return{numHeaderRows:et,numIndexColumns:nt,numDataRows:rt,numDataColumns:ot,numRows:at,numColumns:st}}get hash(){const nt=[this.dimensions.numColumns,this.dimensions.numDataColumns,this.dimensions.numDataRows,this.dimensions.numIndexColumns,this.dimensions.numHeaderRows,this.dimensions.numRows,this._num_bytes,this._columnNames];return hashString(nt.join("-"))}getCell(nt,et){var yt,vt,At;const{numHeaderRows:rt,numIndexColumns:ot,numRows:at,numColumns:st}=this.dimensions;if(nt<0||nt>=at)throw new Error(`Row index is out of range: ${nt}`);if(et<0||et>=st)throw new Error(`Column index is out of range: ${et}`);const ut=nt<rt&&et<ot,ct=nt>=rt&&et<ot,pt=nt<rt&&et>=ot;if(ut){const St=["blank"];return et>0&&St.push(`level${nt}`),{type:"blank",cssClass:St.join(" "),content:""}}if(ct){const St=nt-rt,Et=(yt=this._styler)!=null&&yt.cssId?`${this._styler.cssId}level${et}_row${St}`:void 0,Tt=["row_heading",`level${et}`,`row${St}`].join(" "),Rt=this._columnTypes.index[et],Ct=this.getIndexValue(St,et);let wt=this._fields[`__index_level_${String(et)}__`];return wt===void 0&&(wt=this._fields[String(st-ot)]),{type:"index",cssId:Et,cssClass:Tt,content:Ct,contentType:Rt,field:wt}}if(pt){const St=et-ot;return{type:"columns",cssClass:["col_heading",`level${nt}`,`col${St}`].join(" "),content:this._columnNames[nt][St],contentType:{pandas_type:"unicode",numpy_type:"object"}}}const dt=nt-rt,ft=et-ot,bt=(vt=this._styler)!=null&&vt.cssId?`${this._styler.cssId}row${dt}_col${ft}`:void 0,ht=["data",`row${dt}`,`col${ft}`].join(" "),Mt=this._columnTypes.data[ft],mt=this._fields[String(ft)],Ot=this.getDataValue(dt,ft),zt=(At=this._styler)!=null&&At.displayValues?this._styler.displayValues.getCell(nt,et).content:void 0;return{type:"data",cssId:bt,cssClass:ht,content:Ot,contentType:Mt,displayContent:zt,field:mt}}getIndexValue(nt,et){const rt=this._indexData[et];return rt instanceof Vector?rt.get(nt):rt[nt]}getDataValue(nt,et){var rt;return(rt=this._data.getChildAt(et))==null?void 0:rt.get(nt)}getCategoricalOptions(nt){var ot,at;const{numDataColumns:et}=this.dimensions;if(nt<0||nt>=et)throw new Error(`Column index is out of range: ${nt}`);if(!(this._fields[String(nt)].type instanceof Dictionary))return;const rt=(at=(ot=this._data.getChildAt(nt))==null?void 0:ot.data[0])==null?void 0:at.dictionary;return notNullOrUndefined(rt)?convertVectorToList(rt):void 0}addRows(nt){if(this._styler||nt._styler)throw new Error("\nUnsupported operation. `add_rows()` does not support Pandas Styler objects.\n\nIf you do not need the Styler's styles, try passing the `.data` attribute of\nthe Styler object instead to concatenate just the underlying dataframe.\n\nFor example:\n```\nst.add_rows(my_styler.data)\n```\n");if(nt.dimensions.numDataRows===0)return fn(this,at=>at);if(this.dimensions.numDataRows===0)return fn(nt,at=>at);const{index:et,data:rt,types:ot}=concat(this._columnTypes,this._indexData,this._data,nt._columnTypes,nt._indexData,nt._data);return fn(this,at=>{at._indexData=et,at._data=rt,at._columnTypes=ot})}}function parseStyler(tt){return{uuid:tt.uuid,caption:tt.caption,cssStyles:tt.styles,cssId:tt.uuid?`T_${tt.uuid}`:void 0,displayValues:new Quiver({data:tt.displayValues})}}function ensureError(tt){return tt instanceof Error?tt:new Error(`${tt}`)}const NO_SCRIPT_RUN_ID="NO_SCRIPT_RUN_ID";class ElementNode{constructor(nt,et,rt,ot,at){this.element=nt,this.metadata=et,this.scriptRunId=rt,this.activeScriptHash=ot,this.fragmentId=at}get quiverElement(){if(this.lazyQuiverElement!==void 0)return this.lazyQuiverElement;if(this.element.type!=="arrowTable"&&this.element.type!=="arrowDataFrame")throw new Error(`elementType '${this.element.type}' is not a valid Quiver element!`);const nt=new Quiver(this.element[this.element.type]);return this.lazyQuiverElement=nt,nt}get vegaLiteChartElement(){if(this.lazyVegaLiteChartElement!==void 0)return this.lazyVegaLiteChartElement;if(this.element.type!=="arrowVegaLiteChart")throw new Error(`elementType '${this.element.type}' is not a valid VegaLiteChartElement!`);const nt=this.element.arrowVegaLiteChart,et=nt.data?new Quiver(nt.data):null,rt=nt.datasets.length>0?wrapDatasets(nt.datasets):[],ot={data:et,spec:nt.spec,datasets:rt,useContainerWidth:nt.useContainerWidth,vegaLiteTheme:nt.theme,id:nt.id,selectionMode:nt.selectionMode,formId:nt.formId};return this.lazyVegaLiteChartElement=ot,ot}getIn(){}setIn(){throw new Error("'setIn' cannot be called on an ElementNode")}filterMainScriptElements(nt){if(this.activeScriptHash===nt)return this}clearStaleNodes(nt,et,rt){return et&&et.length&&(!this.fragmentId||!rt||this.scriptRunId===nt)?this:this.scriptRunId===nt?this:void 0}getElements(nt){return isNullOrUndefined$1(nt)&&(nt=new Set),nt.add(this.element),nt}arrowAddRows(nt,et){const rt=this.element.type,ot=new ElementNode(this.element,this.metadata,et,this.activeScriptHash,this.fragmentId);switch(rt){case"arrowTable":case"arrowDataFrame":{ot.lazyQuiverElement=ElementNode.quiverAddRowsHelper(this.quiverElement,nt);break}case"arrowVegaLiteChart":{ot.lazyVegaLiteChartElement=ElementNode.vegaLiteChartAddRowsHelper(this.vegaLiteChartElement,nt);break}default:throw new Error(`elementType '${this.element.type}' is not a valid arrowAddRows target!`)}return ot}static quiverAddRowsHelper(nt,et){if(et.hasName)throw new Error("Add rows cannot be used with a named dataset for this element.");const rt=new Quiver(et.data);return nt.addRows(rt)}static vegaLiteChartAddRowsHelper(nt,et){const rt=et.hasName?et.name:null,ot=new Quiver(et.data);return fn(nt,at=>{const st=getNamedDataSet(at.datasets,rt);st?st.data=st.data.addRows(ot):at.data=at.data?at.data.addRows(ot):ot})}}function getNamedDataSet(tt,nt){return tt.length===1?tt[0]:tt.find(et=>et.hasName&&et.name===nt)}class BlockNode{constructor(nt,et,rt,ot,at,st){this.activeScriptHash=nt,this.children=et??[],this.deltaBlock=rt??new Block$2({}),this.scriptRunId=ot??NO_SCRIPT_RUN_ID,this.fragmentId=at,this.deltaMsgReceivedAt=st}get isEmpty(){return this.children.length===0}getIn(nt){if(nt.length===0)return;const et=nt[0];if(!(et<0||et>=this.children.length))return nt.length===1?this.children[et]:this.children[et].getIn(nt.slice(1))}setIn(nt,et,rt){if(nt.length===0)throw new Error("empty path!");const ot=nt[0];if(ot<0||ot>this.children.length)throw new Error(`Bad 'setIn' index ${ot} (should be between [0, ${this.children.length}])`);const at=this.children.slice();return nt.length===1?at[ot]=et:at[ot]=at[ot].setIn(nt.slice(1),et,rt),new BlockNode(this.activeScriptHash,at,this.deltaBlock,rt,this.fragmentId,this.deltaMsgReceivedAt)}filterMainScriptElements(nt){if(this.activeScriptHash!==nt)return;const et=this.children.map(rt=>rt.filterMainScriptElements(nt)).filter(notUndefined);return new BlockNode(this.activeScriptHash,et,this.deltaBlock,this.scriptRunId,this.fragmentId,this.deltaMsgReceivedAt)}clearStaleNodes(nt,et,rt){if(!et||!et.length){if(this.scriptRunId!==nt)return}else{if(rt&&this.scriptRunId!==nt)return;this.fragmentId&&et.includes(this.fragmentId)&&this.scriptRunId===nt&&(rt=this.fragmentId)}const ot=this.children.map(at=>at.clearStaleNodes(nt,et,rt)).filter(notUndefined);return new BlockNode(this.activeScriptHash,ot,this.deltaBlock,nt,this.fragmentId,this.deltaMsgReceivedAt)}getElements(nt){isNullOrUndefined$1(nt)&&(nt=new Set);for(const et of this.children)et.getElements(nt);return nt}}class AppRoot{static empty(nt="",et=!0,rt,ot){const at=[];let st;switch(getLoadingScreenType()){case LoadingScreenType.NONE:break;case LoadingScreenType.V1:et&&(st=makeElementWithInfoText("Please wait..."));break;default:st=makeAppSkeletonElement()}st&&at.push(new ElementNode(st,ForwardMsgMetadata.create({}),NO_SCRIPT_RUN_ID,nt));const ut=new BlockNode(nt,at,new Block$2({allowEmpty:!0}),NO_SCRIPT_RUN_ID),ct=rt||new BlockNode(nt,[],new Block$2({allowEmpty:!0}),NO_SCRIPT_RUN_ID),pt=new BlockNode(nt,[],new Block$2({allowEmpty:!0}),NO_SCRIPT_RUN_ID),dt=new BlockNode(nt,[],new Block$2({allowEmpty:!0}),NO_SCRIPT_RUN_ID),ft=ot?{logo:ot,activeScriptHash:nt,scriptRunId:NO_SCRIPT_RUN_ID}:null;return new AppRoot(nt,new BlockNode(nt,[ut,ct,pt,dt]),ft)}constructor(nt,et,rt=null){if(this.mainScriptHash=nt,this.root=et,this.appLogo=rt,this.root.children.length!==4||isNullOrUndefined$1(this.main)||isNullOrUndefined$1(this.sidebar)||isNullOrUndefined$1(this.event)||isNullOrUndefined$1(this.bottom))throw new Error(`Invalid root node children! ${et}`)}get main(){const[nt]=this.root.children;return nt}get sidebar(){const[,nt]=this.root.children;return nt}get event(){const[,,nt]=this.root.children;return nt}get bottom(){const[,,,nt]=this.root.children;return nt}get logo(){var nt;return((nt=this.appLogo)==null?void 0:nt.logo)??null}appRootWithLogo(nt,et){return new AppRoot(this.mainScriptHash,this.root,{logo:nt,...et})}applyDelta(nt,et,rt){const{deltaPath:ot,activeScriptHash:at}=rt;switch(et.type){case"newElement":{const st=et.newElement;return this.addElement(ot,nt,st,rt,at,et.fragmentId)}case"addBlock":{const st=Date.now();return this.addBlock(ot,et.addBlock,nt,at,et.fragmentId,st)}case"arrowAddRows":try{return this.arrowAddRows(ot,et.arrowAddRows,nt)}catch(st){const ut=makeElementWithErrorText(ensureError(st).message);return this.addElement(ot,nt,ut,rt,at)}default:throw new Error(`Unrecognized deltaType: '${et.type}'`)}}filterMainScriptElements(nt){var ct;const et=this.main.scriptRunId,rt=this.main.filterMainScriptElements(nt)||new BlockNode(nt),ot=this.sidebar.filterMainScriptElements(nt)||new BlockNode(nt),at=this.event.filterMainScriptElements(nt)||new BlockNode(nt),st=this.bottom.filterMainScriptElements(nt)||new BlockNode(nt),ut=((ct=this.appLogo)==null?void 0:ct.activeScriptHash)===nt?this.appLogo:null;return new AppRoot(nt,new BlockNode(nt,[rt,ot,at,st],new Block$2({allowEmpty:!0}),et),ut)}clearStaleNodes(nt,et){var ct;const rt=this.main.clearStaleNodes(nt,et)||new BlockNode(this.mainScriptHash),ot=this.sidebar.clearStaleNodes(nt,et)||new BlockNode(this.mainScriptHash),at=this.event.clearStaleNodes(nt,et)||new BlockNode(this.mainScriptHash),st=this.bottom.clearStaleNodes(nt,et)||new BlockNode(this.mainScriptHash),ut=((ct=this.appLogo)==null?void 0:ct.scriptRunId)===nt?this.appLogo:null;return new AppRoot(this.mainScriptHash,new BlockNode(this.mainScriptHash,[rt,ot,at,st],new Block$2({allowEmpty:!0}),nt),ut)}getElements(){const nt=new Set;return this.main.getElements(nt),this.sidebar.getElements(nt),this.event.getElements(nt),this.bottom.getElements(nt),nt}addElement(nt,et,rt,ot,at,st){const ut=new ElementNode(rt,ot,et,at,st);return new AppRoot(this.mainScriptHash,this.root.setIn(nt,ut,et),this.appLogo)}addBlock(nt,et,rt,ot,at,st){const ut=this.root.getIn(nt);let ct=[];ut instanceof BlockNode&&ut.deltaBlock.type===et.type&&(ct=ut.children);const pt=new BlockNode(ot,ct,et,rt,at,st);return new AppRoot(this.mainScriptHash,this.root.setIn(nt,pt,rt),this.appLogo)}arrowAddRows(nt,et,rt){const ot=this.root.getIn(nt);if(isNullOrUndefined$1(ot))throw new Error(`Can't arrowAddRows: invalid deltaPath: ${nt}`);const at=ot.arrowAddRows(et,rt);return new AppRoot(this.mainScriptHash,this.root.setIn(nt,at,rt),this.appLogo)}}function wrapDatasets(tt){return tt.map(nt=>({hasName:nt.hasName,name:nt.name,data:new Quiver(nt.data)}))}const IS_DEV_ENV=!1;var classnames={exports:{}};/*!
|
69
|
+
`)}return tt.map(et=>{if(et.pandas_type===PandasRangeIndexType){const{stop:rt,step:ot}=et.meta,{start:at,stop:st,step:ut}=nt[0].meta,ct=(st-at)/ut,pt=rt+ct*ot;return{...et,meta:{...et.meta,stop:pt}}}return et})}function concatDataTypes(tt,nt){return tt.length===0?nt:tt}function concat(tt,nt,et,rt,ot,at){const st=concatIndexes(nt,tt.index,ot,rt.index),ut=concatData(et,tt.data,at,rt.data),ct=concatTypes(tt,rt);return{index:st,data:ut,types:ct}}function isPandasRangeIndex(tt){return typeof tt=="object"&&tt.kind==="range"}function parsePandasSchema(tt){const nt=tt.schema.metadata.get("pandas");if(isNullOrUndefined$1(nt))throw new Error("Table schema is missing.");return JSON.parse(nt)}function getRawColumns(tt){return tt.columns.map(nt=>nt.field_name).filter(nt=>!tt.index_columns.includes(nt))}function parseIndexData(tt,nt){return nt.index_columns.map(et=>{if(isPandasRangeIndex(et)){const{start:ot,stop:at,step:st}=et;return range$1(ot,at,st)}const rt=tt.getChild(et);return rt instanceof Vector&&rt.type instanceof Null?null:rt}).filter(et=>et!==null)}function parseIndexNames(tt){return tt.index_columns.map(nt=>{if(isPandasRangeIndex(nt)){const{name:et}=nt;return et||""}return nt.startsWith("__index_level_")?"":nt})}function parseColumnNames(tt){const nt=tt.column_indexes.length>1;return unzip$2(tt.columns.map(et=>et.field_name).filter(et=>!tt.index_columns.includes(et)).map(et=>nt?JSON.parse(et.replace(/\(/g,"[").replace(/\)/g,"]").replace(/'/g,'"')):[et]))}function parseData(tt,nt,et){const rt=tt.numRows,ot=nt.length>0?nt[0].length:0;return rt===0||ot===0?tt.select([]):tt.select(et)}function parseColumnTypes(tt){const nt=parseIndexType(tt),et=parseDataType(tt);return{index:nt,data:et}}function parseDataType(tt){return tt.columns.filter(nt=>!tt.index_columns.includes(nt.field_name)).map(nt=>({pandas_type:nt.pandas_type,numpy_type:nt.numpy_type,meta:nt.metadata}))}function parseIndexType(tt){return tt.index_columns.map(nt=>{if(isPandasRangeIndex(nt))return{pandas_type:PandasRangeIndexType,numpy_type:PandasRangeIndexType,meta:nt};const et=tt.columns.find(rt=>rt.field_name===nt);if(!et)throw new Error(`${nt} index not found.`);return{pandas_type:et.pandas_type,numpy_type:et.numpy_type,meta:et.metadata}})}function parseFields(tt){return Object.fromEntries((tt.fields||[]).map((nt,et)=>[nt.name.startsWith("__index_level_")?nt.name:String(et),nt]))}function parseArrowIpcBytes(tt){const nt=tableFromIPC(tt),et=parseFields(nt.schema),rt=parsePandasSchema(nt),ot=parseColumnNames(rt),at=parseIndexNames(rt),st=getRawColumns(rt),ut=parseData(nt,ot,st),ct=parseIndexData(nt,rt),pt=parseColumnTypes(rt);return{columnNames:ot,fields:et,indexData:ct,indexNames:at,data:ut,columnTypes:pt}}var _a,DataFrameCellType;(function(tt){tt.INDEX="index",tt.DATA="data"})(DataFrameCellType||(DataFrameCellType={}));_a=L;class Quiver{constructor(nt){var pt;this[_a]=!0;const{indexData:et,columnNames:rt,data:ot,columnTypes:at,fields:st,indexNames:ut}=parseArrowIpcBytes(nt.data),ct=nt.styler?parseStyler(nt.styler):void 0;this._indexData=et,this._columnNames=rt,this._data=ot,this._columnTypes=at,this._fields=st,this._styler=ct,this._indexNames=ut,this._num_bytes=((pt=nt.data)==null?void 0:pt.length)??0}get indexData(){return this._indexData}get indexNames(){return this._indexNames}get columnNames(){return this._columnNames}get data(){return this._data}get columnTypes(){return this._columnTypes}get styler(){return this._styler}get dimensions(){var ut,ct;const nt=this._indexData.length||this.columnTypes.index.length||1,et=this._columnNames.length||1,rt=this._data.numRows||0,ot=this._data.numCols||((ct=(ut=this._columnNames)==null?void 0:ut[0])==null?void 0:ct.length)||0,at=et+rt,st=nt+ot;return{numHeaderRows:et,numIndexColumns:nt,numDataRows:rt,numDataColumns:ot,numRows:at,numColumns:st}}get hash(){const nt=[this.dimensions.numColumns,this.dimensions.numDataColumns,this.dimensions.numDataRows,this.dimensions.numIndexColumns,this.dimensions.numHeaderRows,this.dimensions.numRows,this._num_bytes,this._columnNames];return hashString(nt.join("-"))}getCell(nt,et){const{numIndexColumns:rt,numDataRows:ot,numColumns:at}=this.dimensions;if(nt<0||nt>=ot)throw new Error(`Row index is out of range: ${nt}`);if(et<0||et>=at)throw new Error(`Column index is out of range: ${et}`);if(et<rt){const ft=this.columnTypes.index[et],bt=this.getIndexValue(nt,et);let ht=this._fields[`__index_level_${String(et)}__`];return ht===void 0&&(ht=this._fields[String(at-rt)]),{type:"index",content:bt,contentType:ft,field:ht}}const ut=et-rt,ct=this.columnTypes.data[ut],pt=this._fields[String(ut)];return{type:"data",content:this.getDataValue(nt,ut),contentType:ct,field:pt}}getIndexValue(nt,et){const rt=this._indexData[et];return rt instanceof Vector?rt.get(nt):rt[nt]}getDataValue(nt,et){var rt;return(rt=this._data.getChildAt(et))==null?void 0:rt.get(nt)}getCategoricalOptions(nt){var ot,at;const{numDataColumns:et}=this.dimensions;if(nt<0||nt>=et)throw new Error(`Column index is out of range: ${nt}`);if(!(this._fields[String(nt)].type instanceof Dictionary))return;const rt=(at=(ot=this._data.getChildAt(nt))==null?void 0:ot.data[0])==null?void 0:at.dictionary;return notNullOrUndefined(rt)?convertVectorToList(rt):void 0}addRows(nt){if(this.styler||nt.styler)throw new Error("\nUnsupported operation. `add_rows()` does not support Pandas Styler objects.\n\nIf you do not need the Styler's styles, try passing the `.data` attribute of\nthe Styler object instead to concatenate just the underlying dataframe.\n\nFor example:\n```\nst.add_rows(my_styler.data)\n```\n");if(nt.dimensions.numDataRows===0)return fn(this,at=>at);if(this.dimensions.numDataRows===0)return fn(nt,at=>at);const{index:et,data:rt,types:ot}=concat(this._columnTypes,this._indexData,this._data,nt._columnTypes,nt._indexData,nt._data);return fn(this,at=>{at._indexData=et,at._data=rt,at._columnTypes=ot})}}function parseStyler(tt){return{uuid:tt.uuid,caption:tt.caption,cssStyles:tt.styles,cssId:tt.uuid?`T_${tt.uuid}`:void 0,displayValues:new Quiver({data:tt.displayValues})}}function ensureError(tt){return tt instanceof Error?tt:new Error(`${tt}`)}const NO_SCRIPT_RUN_ID="NO_SCRIPT_RUN_ID";class ElementNode{constructor(nt,et,rt,ot,at){this.element=nt,this.metadata=et,this.scriptRunId=rt,this.activeScriptHash=ot,this.fragmentId=at}get quiverElement(){if(this.lazyQuiverElement!==void 0)return this.lazyQuiverElement;if(this.element.type!=="arrowTable"&&this.element.type!=="arrowDataFrame")throw new Error(`elementType '${this.element.type}' is not a valid Quiver element!`);const nt=new Quiver(this.element[this.element.type]);return this.lazyQuiverElement=nt,nt}get vegaLiteChartElement(){if(this.lazyVegaLiteChartElement!==void 0)return this.lazyVegaLiteChartElement;if(this.element.type!=="arrowVegaLiteChart")throw new Error(`elementType '${this.element.type}' is not a valid VegaLiteChartElement!`);const nt=this.element.arrowVegaLiteChart,et=nt.data?new Quiver(nt.data):null,rt=nt.datasets.length>0?wrapDatasets(nt.datasets):[],ot={data:et,spec:nt.spec,datasets:rt,useContainerWidth:nt.useContainerWidth,vegaLiteTheme:nt.theme,id:nt.id,selectionMode:nt.selectionMode,formId:nt.formId};return this.lazyVegaLiteChartElement=ot,ot}getIn(){}setIn(){throw new Error("'setIn' cannot be called on an ElementNode")}filterMainScriptElements(nt){if(this.activeScriptHash===nt)return this}clearStaleNodes(nt,et,rt){return et&&et.length&&(!this.fragmentId||!rt||this.scriptRunId===nt)?this:this.scriptRunId===nt?this:void 0}getElements(nt){return isNullOrUndefined$1(nt)&&(nt=new Set),nt.add(this.element),nt}arrowAddRows(nt,et){const rt=this.element.type,ot=new ElementNode(this.element,this.metadata,et,this.activeScriptHash,this.fragmentId);switch(rt){case"arrowTable":case"arrowDataFrame":{ot.lazyQuiverElement=ElementNode.quiverAddRowsHelper(this.quiverElement,nt);break}case"arrowVegaLiteChart":{ot.lazyVegaLiteChartElement=ElementNode.vegaLiteChartAddRowsHelper(this.vegaLiteChartElement,nt);break}default:throw new Error(`elementType '${this.element.type}' is not a valid arrowAddRows target!`)}return ot}static quiverAddRowsHelper(nt,et){if(et.hasName)throw new Error("Add rows cannot be used with a named dataset for this element.");const rt=new Quiver(et.data);return nt.addRows(rt)}static vegaLiteChartAddRowsHelper(nt,et){const rt=et.hasName?et.name:null,ot=new Quiver(et.data);return fn(nt,at=>{const st=getNamedDataSet(at.datasets,rt);st?st.data=st.data.addRows(ot):at.data=at.data?at.data.addRows(ot):ot})}}function getNamedDataSet(tt,nt){return tt.length===1?tt[0]:tt.find(et=>et.hasName&&et.name===nt)}class BlockNode{constructor(nt,et,rt,ot,at,st){this.activeScriptHash=nt,this.children=et??[],this.deltaBlock=rt??new Block$2({}),this.scriptRunId=ot??NO_SCRIPT_RUN_ID,this.fragmentId=at,this.deltaMsgReceivedAt=st}get isEmpty(){return this.children.length===0}getIn(nt){if(nt.length===0)return;const et=nt[0];if(!(et<0||et>=this.children.length))return nt.length===1?this.children[et]:this.children[et].getIn(nt.slice(1))}setIn(nt,et,rt){if(nt.length===0)throw new Error("empty path!");const ot=nt[0];if(ot<0||ot>this.children.length)throw new Error(`Bad 'setIn' index ${ot} (should be between [0, ${this.children.length}])`);const at=this.children.slice();return nt.length===1?at[ot]=et:at[ot]=at[ot].setIn(nt.slice(1),et,rt),new BlockNode(this.activeScriptHash,at,this.deltaBlock,rt,this.fragmentId,this.deltaMsgReceivedAt)}filterMainScriptElements(nt){if(this.activeScriptHash!==nt)return;const et=this.children.map(rt=>rt.filterMainScriptElements(nt)).filter(notUndefined);return new BlockNode(this.activeScriptHash,et,this.deltaBlock,this.scriptRunId,this.fragmentId,this.deltaMsgReceivedAt)}clearStaleNodes(nt,et,rt){if(!et||!et.length){if(this.scriptRunId!==nt)return}else{if(rt&&this.scriptRunId!==nt)return;this.fragmentId&&et.includes(this.fragmentId)&&this.scriptRunId===nt&&(rt=this.fragmentId)}const ot=this.children.map(at=>at.clearStaleNodes(nt,et,rt)).filter(notUndefined);return new BlockNode(this.activeScriptHash,ot,this.deltaBlock,nt,this.fragmentId,this.deltaMsgReceivedAt)}getElements(nt){isNullOrUndefined$1(nt)&&(nt=new Set);for(const et of this.children)et.getElements(nt);return nt}}class AppRoot{static empty(nt="",et=!0,rt,ot){const at=[];let st;switch(getLoadingScreenType()){case LoadingScreenType.NONE:break;case LoadingScreenType.V1:et&&(st=makeElementWithInfoText("Please wait..."));break;default:st=makeAppSkeletonElement()}st&&at.push(new ElementNode(st,ForwardMsgMetadata.create({}),NO_SCRIPT_RUN_ID,nt));const ut=new BlockNode(nt,at,new Block$2({allowEmpty:!0}),NO_SCRIPT_RUN_ID),ct=rt||new BlockNode(nt,[],new Block$2({allowEmpty:!0}),NO_SCRIPT_RUN_ID),pt=new BlockNode(nt,[],new Block$2({allowEmpty:!0}),NO_SCRIPT_RUN_ID),dt=new BlockNode(nt,[],new Block$2({allowEmpty:!0}),NO_SCRIPT_RUN_ID),ft=ot?{logo:ot,activeScriptHash:nt,scriptRunId:NO_SCRIPT_RUN_ID}:null;return new AppRoot(nt,new BlockNode(nt,[ut,ct,pt,dt]),ft)}constructor(nt,et,rt=null){if(this.mainScriptHash=nt,this.root=et,this.appLogo=rt,this.root.children.length!==4||isNullOrUndefined$1(this.main)||isNullOrUndefined$1(this.sidebar)||isNullOrUndefined$1(this.event)||isNullOrUndefined$1(this.bottom))throw new Error(`Invalid root node children! ${et}`)}get main(){const[nt]=this.root.children;return nt}get sidebar(){const[,nt]=this.root.children;return nt}get event(){const[,,nt]=this.root.children;return nt}get bottom(){const[,,,nt]=this.root.children;return nt}get logo(){var nt;return((nt=this.appLogo)==null?void 0:nt.logo)??null}appRootWithLogo(nt,et){return new AppRoot(this.mainScriptHash,this.root,{logo:nt,...et})}applyDelta(nt,et,rt){const{deltaPath:ot,activeScriptHash:at}=rt;switch(et.type){case"newElement":{const st=et.newElement;return this.addElement(ot,nt,st,rt,at,et.fragmentId)}case"addBlock":{const st=Date.now();return this.addBlock(ot,et.addBlock,nt,at,et.fragmentId,st)}case"arrowAddRows":try{return this.arrowAddRows(ot,et.arrowAddRows,nt)}catch(st){const ut=makeElementWithErrorText(ensureError(st).message);return this.addElement(ot,nt,ut,rt,at)}default:throw new Error(`Unrecognized deltaType: '${et.type}'`)}}filterMainScriptElements(nt){var ct;const et=this.main.scriptRunId,rt=this.main.filterMainScriptElements(nt)||new BlockNode(nt),ot=this.sidebar.filterMainScriptElements(nt)||new BlockNode(nt),at=this.event.filterMainScriptElements(nt)||new BlockNode(nt),st=this.bottom.filterMainScriptElements(nt)||new BlockNode(nt),ut=((ct=this.appLogo)==null?void 0:ct.activeScriptHash)===nt?this.appLogo:null;return new AppRoot(nt,new BlockNode(nt,[rt,ot,at,st],new Block$2({allowEmpty:!0}),et),ut)}clearStaleNodes(nt,et){var ct;const rt=this.main.clearStaleNodes(nt,et)||new BlockNode(this.mainScriptHash),ot=this.sidebar.clearStaleNodes(nt,et)||new BlockNode(this.mainScriptHash),at=this.event.clearStaleNodes(nt,et)||new BlockNode(this.mainScriptHash),st=this.bottom.clearStaleNodes(nt,et)||new BlockNode(this.mainScriptHash),ut=((ct=this.appLogo)==null?void 0:ct.scriptRunId)===nt?this.appLogo:null;return new AppRoot(this.mainScriptHash,new BlockNode(this.mainScriptHash,[rt,ot,at,st],new Block$2({allowEmpty:!0}),nt),ut)}getElements(){const nt=new Set;return this.main.getElements(nt),this.sidebar.getElements(nt),this.event.getElements(nt),this.bottom.getElements(nt),nt}addElement(nt,et,rt,ot,at,st){const ut=new ElementNode(rt,ot,et,at,st);return new AppRoot(this.mainScriptHash,this.root.setIn(nt,ut,et),this.appLogo)}addBlock(nt,et,rt,ot,at,st){const ut=this.root.getIn(nt);let ct=[];ut instanceof BlockNode&&ut.deltaBlock.type===et.type&&(ct=ut.children);const pt=new BlockNode(ot,ct,et,rt,at,st);return new AppRoot(this.mainScriptHash,this.root.setIn(nt,pt,rt),this.appLogo)}arrowAddRows(nt,et,rt){const ot=this.root.getIn(nt);if(isNullOrUndefined$1(ot))throw new Error(`Can't arrowAddRows: invalid deltaPath: ${nt}`);const at=ot.arrowAddRows(et,rt);return new AppRoot(this.mainScriptHash,this.root.setIn(nt,at,rt),this.appLogo)}}function wrapDatasets(tt){return tt.map(nt=>({hasName:nt.hasName,name:nt.name,data:new Quiver(nt.data)}))}const IS_DEV_ENV=!1;var classnames={exports:{}};/*!
|
70
70
|
Copyright (c) 2018 Jed Watson.
|
71
71
|
Licensed under the MIT License (MIT), see
|
72
72
|
http://jedwatson.github.io/classnames
|
@@ -448,7 +448,7 @@ To create a submit button, use the \`st.form_submit_button()\` function.
|
|
448
448
|
For more information, refer to the [documentation for forms](https://docs.streamlit.io/develop/api-reference/execution-flow/st.form).`;function Form(tt){const{formId:nt,widgetMgr:et,hasSubmitButton:rt,children:ot,width:at,scriptRunState:st,clearOnSubmit:ut,enterToSubmit:ct,border:pt}=tt;reactExports.useEffect(()=>{et.setFormSubmitBehaviors(nt,ut,ct)},[et,nt,ut,ct]);const[dt,ft]=reactExports.useState(!1);rt&&dt?ft(!1):!rt&&!dt&&st===ScriptRunState.NOT_RUNNING&&ft(!0);let bt;return dt&&(bt=jsx$1(StyledErrorContainer,{children:jsx$1(AlertElement,{body:MISSING_SUBMIT_BUTTON_WARNING,kind:Kind.ERROR,width:at})})),jsxs(StyledForm,{className:"stForm","data-testid":"stForm",border:pt,children:[ot,bt]})}var ORIENTATION={vertical:"vertical",horizontal:"horizontal"},FILL={fixed:"fixed",intrinsic:"intrinsic"},getTabId=function tt(nt,et){return"tabs-".concat(nt,"-tab-").concat(et)},getTabPanelId=function tt(nt,et){return"tabs-".concat(nt,"-tabpanel-").concat(et)},isHorizontal=function tt(nt){return nt===ORIENTATION.horizontal},isVertical=function tt(nt){return nt===ORIENTATION.vertical},isRTL=function tt(nt){return nt==="rtl"},isIntrinsic=function tt(nt){return nt===FILL.intrinsic},isFixed=function tt(nt){return nt===FILL.fixed};function ownKeys$e(tt,nt){var et=Object.keys(tt);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(tt);nt&&(rt=rt.filter(function(ot){return Object.getOwnPropertyDescriptor(tt,ot).enumerable})),et.push.apply(et,rt)}return et}function _objectSpread$d(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt]!=null?arguments[nt]:{};nt%2?ownKeys$e(Object(et),!0).forEach(function(rt){_defineProperty$h(tt,rt,et[rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(tt,Object.getOwnPropertyDescriptors(et)):ownKeys$e(Object(et)).forEach(function(rt){Object.defineProperty(tt,rt,Object.getOwnPropertyDescriptor(et,rt))})}return tt}function _defineProperty$h(tt,nt,et){return nt in tt?Object.defineProperty(tt,nt,{value:et,enumerable:!0,configurable:!0,writable:!0}):tt[nt]=et,tt}var StyledRoot$1=styled("div",function(tt){tt.$theme;var nt=tt.$orientation,et=nt===void 0?ORIENTATION.horizontal:nt,rt={transform:"scale(1)"};return isVertical(et)&&(rt.display="flex"),rt});StyledRoot$1.displayName="StyledRoot";StyledRoot$1.displayName="StyledRoot";var StyledTabBar=styled("div",function(tt){var nt=tt.$hasEndEnhancer,et=tt.$orientation;return nt||!isHorizontal(et)?{display:"flex"}:{}});StyledTabBar.displayName="StyledTabBar";StyledTabBar.displayName="StyledTabBar";var StyledTabList=styled("div",function(tt){var nt=tt.$theme,et=tt.$fill,rt=et===void 0?FILL.intrinsic:et,ot=tt.$orientation,at=ot===void 0?ORIENTATION.horizontal:ot,st={position:"relative",display:"flex",flexWrap:"nowrap",flexGrow:1};return isHorizontal(at)?(st.flexDirection="row",st.paddingBottom="5px",st.marginBottom="-5px"):(st.flexDirection="column",isRTL(nt.direction)?(st.paddingLeft="5px",st.marginLeft="-5px"):(st.paddingRight="5px",st.marginRight="-5px")),isIntrinsic(rt)&&(st["::-webkit-scrollbar"]={display:"none"},st["-ms-overflow-style"]="none",st.scrollbarWidth="none",isHorizontal(at)?st.overflowX="scroll":st.overflowY="scroll"),st});StyledTabList.displayName="StyledTabList";StyledTabList.displayName="StyledTabList";var StyledTab=styled("button",function(tt){var nt=tt.$theme,et=tt.$orientation,rt=et===void 0?ORIENTATION.horizontal:et,ot=tt.$fill,at=ot===void 0?FILL.intrinsic:ot,st=tt.$focusVisible,ut=st===void 0?!1:st;tt.$isActive;var ct=_objectSpread$d({cursor:"pointer",WebkitAppearance:"none",marginLeft:"0",marginRight:"0",marginTop:"0",marginBottom:"0",boxSizing:"border-box",display:"inline-flex",alignItems:"center",paddingLeft:nt.sizing.scale600,paddingTop:nt.sizing.scale600,paddingRight:nt.sizing.scale600,paddingBottom:nt.sizing.scale600,borderLeftWidth:0,borderTopWidth:0,borderRightWidth:0,borderBottomWidth:0,borderLeftStyle:"none",borderTopStyle:"none",borderRightStyle:"none",borderBottomStyle:"none",color:nt.colors.contentPrimary,background:nt.colors.backgroundPrimary,transitionProperty:"background",transitionDuration:nt.animation.timing200,transitionTimingFunction:nt.animation.linearCurve,outline:"none",outlineOffset:"-3px",":disabled":{cursor:"not-allowed",color:nt.colors.contentStateDisabled},":hover":{background:nt.colors.backgroundSecondary},":disabled:hover":{background:"none"}},nt.typography.LabelSmall);return ut&&(ct.outline="3px solid ".concat(nt.colors.accent)),isFixed(at)&&(ct.flexGrow=1,ct.flexBasis=0),isHorizontal(rt)?ct.justifyContent="center":ct.justifyContent="flex-end",ct});StyledTab.displayName="StyledTab";StyledTab.displayName="StyledTab";var StyledEndEnhancerContainer=styled("div",function(tt){var nt=tt.$theme,et=nt.direction==="rtl"?"marginRight":"marginLeft";return _defineProperty$h({display:"flex",alignItems:"center",justifyContent:"flex-end"},et,nt.sizing.scale600)});StyledEndEnhancerContainer.displayName="StyledEndEnhancerContainer";StyledEndEnhancerContainer.displayName="StyledEndEnhancerContainer";var StyledArtworkContainer=styled("div",function(tt){var nt=tt.$theme;tt.$orientation;var et={display:"flex"};return isRTL(nt.direction)?et.marginLeft=nt.sizing.scale300:et.marginRight=nt.sizing.scale300,et});StyledArtworkContainer.displayName="StyledArtworkContainer";StyledArtworkContainer.displayName="StyledArtworkContainer";var StyledTabBorder=styled("div",function(tt){var nt=tt.$theme,et=tt.$orientation,rt=et===void 0?ORIENTATION.horizontal:et,ot={backgroundColor:nt.colors.borderOpaque,position:"relative"};return isHorizontal(rt)?ot.height="5px":ot.width="5px",ot});StyledTabBorder.displayName="StyledTabBorder";StyledTabBorder.displayName="StyledTabBorder";var StyledTabHighlight=styled("div",function(tt){var nt=tt.$theme,et=tt.$orientation,rt=et===void 0?ORIENTATION.horizontal:et,ot=tt.$length,at=ot===void 0?0:ot,st=tt.$distance,ut=st===void 0?0:st,ct=tt.$animate,pt=ct===void 0?!1:ct,dt={backgroundColor:nt.colors.borderSelected,position:"absolute",zIndex:1};return isHorizontal(rt)?(dt.bottom="0px",dt.left="0px",dt.height="5px",dt.width="".concat(at,"px"),dt.transform="translateX(".concat(ut,"px)")):(dt.transform="translateY(".concat(ut,"px)"),dt.width="5px",dt.height="".concat(at,"px"),isRTL(nt.direction)?dt.left="0px":dt.right="0px"),pt&&(dt.transitionProperty="all",dt.transitionDuration=nt.animation.timing400,dt.transitionTimingFunction=nt.animation.easeInOutQuinticCurve),dt});StyledTabHighlight.displayName="StyledTabHighlight";StyledTabHighlight.displayName="StyledTabHighlight";var StyledTabPanel=styled("div",function(tt){var nt=tt.$theme,et=tt.$pad,rt=et===void 0?!0:et,ot={flexGrow:1,outline:"none"};return rt&&(ot.paddingTop=nt.sizing.scale600,ot.paddingRight=nt.sizing.scale600,ot.paddingBottom=nt.sizing.scale600,ot.paddingLeft=nt.sizing.scale600),ot});StyledTabPanel.displayName="StyledTabPanel";StyledTabPanel.displayName="StyledTabPanel";var _excluded$g=["childKey","childIndex","activeKey","orientation","activeTabRef","updateHighlight","parseKeyDown","activateOnFocus","uid","disabled","sharedStylingProps","onChange"],_excluded2$3=["artwork","overrides","tabRef","onClick","title"],_excluded3=["childKey","childIndex","activeKey","uid","sharedStylingProps","renderAll"];function ownKeys$d(tt,nt){var et=Object.keys(tt);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(tt);nt&&(rt=rt.filter(function(ot){return Object.getOwnPropertyDescriptor(tt,ot).enumerable})),et.push.apply(et,rt)}return et}function _objectSpread$c(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt]!=null?arguments[nt]:{};nt%2?ownKeys$d(Object(et),!0).forEach(function(rt){_defineProperty$g(tt,rt,et[rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(tt,Object.getOwnPropertyDescriptors(et)):ownKeys$d(Object(et)).forEach(function(rt){Object.defineProperty(tt,rt,Object.getOwnPropertyDescriptor(et,rt))})}return tt}function _defineProperty$g(tt,nt,et){return nt in tt?Object.defineProperty(tt,nt,{value:et,enumerable:!0,configurable:!0,writable:!0}):tt[nt]=et,tt}function _toConsumableArray$1(tt){return _arrayWithoutHoles$1(tt)||_iterableToArray$1(tt)||_unsupportedIterableToArray$f(tt)||_nonIterableSpread$1()}function _nonIterableSpread$1(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
449
449
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _iterableToArray$1(tt){if(typeof Symbol<"u"&&tt[Symbol.iterator]!=null||tt["@@iterator"]!=null)return Array.from(tt)}function _arrayWithoutHoles$1(tt){if(Array.isArray(tt))return _arrayLikeToArray$f(tt)}function _objectWithoutProperties$i(tt,nt){if(tt==null)return{};var et=_objectWithoutPropertiesLoose$g(tt,nt),rt,ot;if(Object.getOwnPropertySymbols){var at=Object.getOwnPropertySymbols(tt);for(ot=0;ot<at.length;ot++)rt=at[ot],!(nt.indexOf(rt)>=0)&&Object.prototype.propertyIsEnumerable.call(tt,rt)&&(et[rt]=tt[rt])}return et}function _objectWithoutPropertiesLoose$g(tt,nt){if(tt==null)return{};var et={},rt=Object.keys(tt),ot,at;for(at=0;at<rt.length;at++)ot=rt[at],!(nt.indexOf(ot)>=0)&&(et[ot]=tt[ot]);return et}function _extends$y(){return _extends$y=Object.assign?Object.assign.bind():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},_extends$y.apply(this,arguments)}function _slicedToArray$f(tt,nt){return _arrayWithHoles$f(tt)||_iterableToArrayLimit$f(tt,nt)||_unsupportedIterableToArray$f(tt,nt)||_nonIterableRest$f()}function _nonIterableRest$f(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
450
450
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$f(tt,nt){if(tt){if(typeof tt=="string")return _arrayLikeToArray$f(tt,nt);var et=Object.prototype.toString.call(tt).slice(8,-1);if(et==="Object"&&tt.constructor&&(et=tt.constructor.name),et==="Map"||et==="Set")return Array.from(tt);if(et==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(et))return _arrayLikeToArray$f(tt,nt)}}function _arrayLikeToArray$f(tt,nt){(nt==null||nt>tt.length)&&(nt=tt.length);for(var et=0,rt=new Array(nt);et<nt;et++)rt[et]=tt[et];return rt}function _iterableToArrayLimit$f(tt,nt){var et=tt==null?null:typeof Symbol<"u"&&tt[Symbol.iterator]||tt["@@iterator"];if(et!=null){var rt=[],ot=!0,at=!1,st,ut;try{for(et=et.call(tt);!(ot=(st=et.next()).done)&&(rt.push(st.value),!(nt&&rt.length===nt));ot=!0);}catch(ct){at=!0,ut=ct}finally{try{!ot&&et.return!=null&&et.return()}finally{if(at)throw ut}}return rt}}function _arrayWithHoles$f(tt){if(Array.isArray(tt))return tt}var KEYBOARD_ACTION={next:"next",previous:"previous"},getLayoutParams=function tt(nt,et){return nt?isVertical(et)?{length:nt.clientHeight,distance:nt.offsetTop}:{length:nt.clientWidth,distance:nt.offsetLeft}:{length:0,distance:0}},scrollParentToCentreTarget=function tt(nt){var et=nt.parentNode.getBoundingClientRect(),rt=et.x,ot=et.y,at=et.width,st=et.height,ut=nt.getBoundingClientRect(),ct=ut.x,pt=ut.y,dt=ut.width,ft=ut.height,bt={x:ct-rt+dt/2,y:pt-ot+ft/2},ht=nt.parentNode,Mt=ht.scrollLeft,mt=ht.scrollTop,Ot={x:Mt+bt.x-at/2,y:mt+bt.y-st/2};nt.parentNode.scroll(Ot.x,Ot.y)};function RenderEnhancer(tt){var nt=tt.Enhancer;return typeof nt=="string"?nt:reactIsExports$1.isValidElementType(nt)?reactExports.createElement(nt,null):nt}function Tabs$1(tt){var nt=tt.activeKey,et=nt===void 0?"0":nt,rt=tt.disabled,ot=rt===void 0?!1:rt,at=tt.children,st=tt.fill,ut=st===void 0?FILL.intrinsic:st,ct=tt.activateOnFocus,pt=ct===void 0?!0:ct,dt=tt.onChange,ft=tt.orientation,bt=ft===void 0?ORIENTATION.horizontal:ft,ht=tt.overrides,Mt=ht===void 0?{}:ht,mt=tt.renderAll,Ot=mt===void 0?!1:mt,zt=tt.uid,yt=zt===void 0?null:zt,vt=tt.endEnhancer,At=useUID(),St=yt||At,Et=Mt.Root,Tt=Mt.TabList,Rt=Mt.TabHighlight,Ct=Mt.TabBorder,wt=getOverrides(Et,StyledRoot$1),Lt=_slicedToArray$f(wt,2),Ht=Lt[0],jt=Lt[1],s0=getOverrides(Tt,StyledTabList),Ut=_slicedToArray$f(s0,2),Yt=Ut[0],O0=Ut[1],a0=getOverrides(Rt,StyledTabHighlight),b0=_slicedToArray$f(a0,2),kt=b0[0],o0=b0[1],qt=getOverrides(Ct,StyledTabBorder),Dt=_slicedToArray$f(qt,2),Bt=Dt[0],p0=Dt[1],r0=getOverrides(Mt.EndEnhancerContainer,StyledEndEnhancerContainer),l0=_slicedToArray$f(r0,2),f0=l0[0],i0=l0[1],$t=reactExports.useState(0),It=_slicedToArray$f($t,2),Vt=It[0],xt=It[1];reactExports.useEffect(function(){xt(Vt+1)},[et]);var Ft=reactExports.useRef(),Pt=reactExports.useState({length:0,distance:0}),Zt=_slicedToArray$f(Pt,2),Kt=Zt[0],n0=Zt[1],c0=reactExports.useCallback(function(){Ft.current&&n0(getLayoutParams(Ft.current,bt))},[Ft.current,bt]);reactExports.useEffect(c0,[Ft.current,bt]),reactExports.useEffect(function(){Ft.current&&(isHorizontal(bt)?Ft.current.parentNode.scrollWidth>Ft.current.parentNode.clientWidth:Ft.current.parentNode.scrollHeight>Ft.current.parentNode.clientHeight)&&(Vt>1?Ft.current.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"}):scrollParentToCentreTarget(Ft.current))},[Ft.current]);var u0={$orientation:bt,$fill:ut},y0=useStyletron(),D0=_slicedToArray$f(y0,2),S0=D0[1],x0=reactExports.useCallback(function(m0){if(isHorizontal(bt))if(isRTL(S0.direction))switch(m0.keyCode){case 39:return KEYBOARD_ACTION.previous;case 37:return KEYBOARD_ACTION.next;default:return null}else switch(m0.keyCode){case 37:return KEYBOARD_ACTION.previous;case 39:return KEYBOARD_ACTION.next;default:return null}else switch(m0.keyCode){case 38:return KEYBOARD_ACTION.previous;case 40:return KEYBOARD_ACTION.next;default:return null}},[bt,S0.direction]);return reactExports.createElement(Ht,_extends$y({},u0,jt),reactExports.createElement(StyledTabBar,{$hasEndEnhancer:!!vt,$orientation:bt},reactExports.createElement(Yt,_extends$y({"data-baseweb":"tab-list",role:"tablist","aria-orientation":bt},u0,O0),reactExports.Children.map(at,function(m0,e0){if(m0)return reactExports.createElement(InternalTab,_extends$y({childKey:m0.key,childIndex:e0,activeKey:et,orientation:bt,activeTabRef:Ft,updateHighlight:c0,parseKeyDown:x0,activateOnFocus:pt,uid:St,disabled:ot,sharedStylingProps:u0,onChange:dt},m0.props))}),reactExports.createElement(kt,_extends$y({"data-baseweb":"tab-highlight",$length:Kt.length,$distance:Kt.distance,$animate:Vt>1,"aria-hidden":"true",role:"presentation"},u0,o0))),bt===ORIENTATION.horizontal&&vt!==null&&vt!==void 0&&reactExports.createElement(f0,_extends$y({},i0,{$orientation:bt}),reactExports.createElement(RenderEnhancer,{Enhancer:vt}))),reactExports.createElement(Bt,_extends$y({"data-baseweb":"tab-border","aria-hidden":"true",role:"presentation"},u0,p0)),reactExports.Children.map(at,function(m0,e0){if(m0)return reactExports.createElement(InternalTabPanel,_extends$y({childKey:m0.key,childIndex:e0,activeKey:et,uid:St,sharedStylingProps:u0,renderAll:Ot},m0.props))}))}function InternalTab(tt){var nt=tt.childKey,et=tt.childIndex,rt=tt.activeKey,ot=tt.orientation,at=tt.activeTabRef,st=tt.updateHighlight,ut=tt.parseKeyDown,ct=tt.activateOnFocus,pt=tt.uid,dt=tt.disabled,ft=tt.sharedStylingProps,bt=tt.onChange,ht=_objectWithoutProperties$i(tt,_excluded$g),Mt=nt||String(et),mt=Mt==rt,Ot=ht.artwork,zt=ht.overrides,yt=zt===void 0?{}:zt,vt=ht.tabRef,At=ht.onClick,St=ht.title,Et=_objectWithoutProperties$i(ht,_excluded2$3),Tt=reactExports.useRef();reactExports.useImperativeHandle(vt,function(){return mt?at.current:Tt.current});var Rt=reactExports.useRef({length:0,distance:0});reactExports.useEffect(function(){Rt.current=getLayoutParams(mt?at.current:Tt.current,ot)}),reactExports.useEffect(function(){if(window.ResizeObserver){var r0=new window.ResizeObserver(function(l0){if(l0[0]&&l0[0].target){var f0=getLayoutParams(l0[0].target,ot);(f0.length!==Rt.current.length||f0.distance!==Rt.current.distance)&&st()}});return r0.observe(mt?at.current:Tt.current),function(){r0.disconnect()}}},[rt,ot]),reactExports.useEffect(st,[St]);var Ct=yt.Tab,wt=yt.ArtworkContainer,Lt=getOverrides(Ct,StyledTab),Ht=_slicedToArray$f(Lt,2),jt=Ht[0],s0=Ht[1],Ut=getOverrides(wt,StyledArtworkContainer),Yt=_slicedToArray$f(Ut,2),O0=Yt[0],a0=Yt[1],b0=reactExports.useState(!1),kt=_slicedToArray$f(b0,2),o0=kt[0],qt=kt[1],Dt=reactExports.useCallback(function(r0){isFocusVisible(r0)&&qt(!0)},[]),Bt=reactExports.useCallback(function(r0){o0!==!1&&qt(!1)},[o0]),p0=reactExports.useCallback(function(r0){var l0=_toConsumableArray$1(r0.target.parentNode.childNodes).filter(function(It){return!It.disabled&&It.getAttribute("role")==="tab"});if(l0.length!==1){var f0=l0.indexOf(r0.target),i0=ut(r0);if(i0){var $t;i0===KEYBOARD_ACTION.previous?l0[f0-1]?$t=l0[f0-1]:$t=l0[l0.length-1]:i0===KEYBOARD_ACTION.next&&(l0[f0+1]?$t=l0[f0+1]:$t=l0[0]),$t&&($t.focus(),ct&&$t.click()),isVertical(ot)&&r0.preventDefault()}}});return reactExports.createElement(jt,_extends$y({"data-baseweb":"tab",key:Mt,id:getTabId(pt,Mt),role:"tab",onKeyDown:p0,"aria-selected":mt,"aria-controls":getTabPanelId(pt,Mt),tabIndex:mt?"0":"-1",ref:mt?at:Tt,disabled:!mt&&dt,type:"button",$focusVisible:o0,$isActive:mt},ft,Et,s0,{onClick:function(l0){typeof bt=="function"&&bt({activeKey:Mt}),typeof At=="function"&&At(l0)},onFocus:forkFocus(_objectSpread$c(_objectSpread$c({},Et),s0),Dt),onBlur:forkBlur(_objectSpread$c(_objectSpread$c({},Et),s0),Bt)}),Ot?reactExports.createElement(O0,_extends$y({"data-baseweb":"artwork-container"},ft,a0),reactExports.createElement(Ot,{size:20,color:"contentPrimary"})):null,St||Mt)}function InternalTabPanel(tt){var nt=tt.childKey,et=tt.childIndex,rt=tt.activeKey,ot=tt.uid,at=tt.sharedStylingProps,st=tt.renderAll,ut=_objectWithoutProperties$i(tt,_excluded3),ct=nt||String(et),pt=ct==rt,dt=ut.overrides,ft=dt===void 0?{}:dt,bt=ut.children,ht=ft.TabPanel,Mt=getOverrides(ht,StyledTabPanel),mt=_slicedToArray$f(Mt,2),Ot=mt[0],zt=mt[1];return reactExports.createElement(Ot,_extends$y({"data-baseweb":"tab-panel",key:ct,role:"tabpanel",id:getTabPanelId(ot,ct),"aria-labelledby":getTabId(ot,ct),hidden:!pt},at,zt),pt||st?bt:null)}function Tab(tt){return null}function shouldComponentBeEnabled(tt,nt){return tt!=="empty"||nt!==ScriptRunState.RUNNING}function isElementStale(tt,nt,et,rt){return nt===ScriptRunState.RERUN_REQUESTED?!0:nt===ScriptRunState.RUNNING?rt&&rt.length?!!(tt.fragmentId&&rt.includes(tt.fragmentId)&&tt.scriptRunId!==et):tt.scriptRunId!==et:!1}function isComponentStale(tt,nt,et,rt,ot){return!tt||isElementStale(nt,et,rt,ot)}function assignDividerColor(tt,nt){const et=getDividerColors(nt),rt=Object.keys(et),{blue:ot,green:at,orange:st,red:ut,violet:ct}=et,pt={blue:ot,green:at,orange:st,red:ut,violet:ct},dt=Object.keys(pt);let ft=0;Array.from(tt.getElements()).forEach(bt=>{var Mt;const ht=(Mt=bt.heading)==null?void 0:Mt.divider;if(bt.type==="heading"&&ht)if(ht==="auto"){const mt=dt[ft];bt.heading.divider=pt[mt],ft+=1,ft===dt.length&&(ft=0)}else rt.includes(ht)&&(bt.heading.divider=et[ht])})}function convertKeyToClassName(tt){return tt?"st-key-"+tt.trim().replace(/[^a-zA-Z0-9_-]/g,"-"):""}function getKeyFromId(tt){if(!tt||!isValidElementId(tt))return;const et=tt.split("-").slice(2).join("-");return et==="None"?void 0:et}const StyledTabContainer=newStyled("div",{target:"euv9o0k0"})(({theme:tt,isOverflowing:nt,tabHeight:et})=>({...nt?{position:"relative","::after":{content:'" "',position:"absolute",zIndex:tt.zIndices.priority,top:0,right:0,pointerEvents:"none",backgroundImage:`linear-gradient(to right, ${transparentize(tt.colors.bgColor,1)}, ${tt.colors.bgColor})`,width:tt.spacing.lg,height:et}}:{}}));function Tabs(tt){const{widgetsDisabled:nt,node:et,isStale:rt,scriptRunState:ot,scriptRunId:at}=tt,{fragmentIdsThisRun:st}=reactExports.useContext(LibContext);let ut=[];const[ct,pt]=reactExports.useState(0),[dt,ft]=reactExports.useState(et.children[0].deltaBlock.tab.label||"0"),bt=reactExports.useRef(null),ht=useTheme(),[Mt,mt]=reactExports.useState(!1);reactExports.useEffect(()=>{ut.indexOf(dt)===-1&&(pt(0),ft(ut[0]))},[ut]),reactExports.useEffect(()=>{if(bt.current){const{scrollWidth:vt,clientWidth:At}=bt.current;mt(vt>At)}const yt=ut.indexOf(dt);yt!==-1?(pt(yt),ft(ut[yt])):(pt(0),ft(ut[0]))},[et.children.length]);const Ot=ht.sizes.tabHeight,zt=ht.spacing.threeXS;return jsx$1(StyledTabContainer,{className:"stTabs","data-testid":"stTabs",isOverflowing:Mt,tabHeight:Ot,children:jsx$1(Tabs$1,{activateOnFocus:!0,activeKey:ct,onChange:({activeKey:yt})=>{pt(yt),ft(ut[yt])},renderAll:!0,disabled:nt,overrides:{TabHighlight:{style:()=>({backgroundColor:nt?ht.colors.fadedText40:ht.colors.primary,height:zt})},TabBorder:{style:()=>({backgroundColor:ht.colors.borderColorLight,height:zt})},TabList:{props:{ref:bt},style:()=>({gap:ht.spacing.lg,marginBottom:`-${zt}`,paddingBottom:zt,overflowY:"hidden",...rt&&STALE_STYLES})},Root:{style:()=>({transform:"none"})}},children:et.children.map((yt,vt)=>{var Ct,wt;vt===0&&(ut=[]);const At=isElementStale(yt,ot,at,st),St={...tt,isStale:rt||At,widgetsDisabled:nt,node:yt};let Et=vt.toString();(wt=(Ct=St.node.deltaBlock)==null?void 0:Ct.tab)!=null&&wt.label&&(Et=St.node.deltaBlock.tab.label),ut[vt]=Et;const Tt=ct.toString()===vt.toString(),Rt=vt===et.children.length-1;return jsx$1(Tab,{"data-testid":"stTab",title:jsx$1(StreamlitMarkdown$1,{source:Et,allowHTML:!1,isLabel:!0}),disabled:nt,overrides:{TabPanel:{style:()=>({paddingLeft:ht.spacing.none,paddingRight:ht.spacing.none,paddingBottom:ht.spacing.none,paddingTop:ht.spacing.lg})},Tab:{style:()=>({height:Ot,whiteSpace:"nowrap",paddingLeft:ht.spacing.none,paddingRight:ht.spacing.none,paddingTop:ht.spacing.none,paddingBottom:ht.spacing.none,fontSize:ht.fontSizes.sm,background:"transparent",color:nt?ht.colors.fadedText40:ht.colors.bodyText,":focus":{outline:"none",color:nt?ht.colors.fadedText40:ht.colors.primary,background:"none"},":hover":{color:nt?ht.colors.fadedText40:ht.colors.primary,background:"none"},...Tt?{color:nt?ht.colors.fadedText40:ht.colors.primary}:{},...Mt&&Rt?{paddingRight:`calc(${ht.spacing.lg} * 0.6)`}:{},...!rt&&At&&STALE_STYLES})}},children:tt.renderTabContent(St)},vt)})})})}var _excluded$f=["children","iconAttrs","iconVerticalAlign","iconViewBox","size","title"];function ownKeys$c(tt,nt){var et=Object.keys(tt);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(tt);nt&&(rt=rt.filter(function(ot){return Object.getOwnPropertyDescriptor(tt,ot).enumerable})),et.push.apply(et,rt)}return et}function _objectSpread$b(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt]!=null?arguments[nt]:{};nt%2?ownKeys$c(Object(et),!0).forEach(function(rt){_defineProperty$u(tt,rt,et[rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(tt,Object.getOwnPropertyDescriptors(et)):ownKeys$c(Object(et)).forEach(function(rt){Object.defineProperty(tt,rt,Object.getOwnPropertyDescriptor(et,rt))})}return tt}var EmotionIconBaseBase=reactExports.forwardRef(function(tt,nt){var et=tt.children,rt=tt.iconAttrs;tt.iconVerticalAlign;var ot=tt.iconViewBox,at=tt.size,st=tt.title,ut=_objectWithoutProperties$o(tt,_excluded$f),ct=_objectSpread$b(_objectSpread$b({viewBox:ot,height:tt.height!==void 0?tt.height:at,width:tt.width!==void 0?tt.width:at,"aria-hidden":st==null?"true":void 0,focusable:"false",role:st!=null?"img":void 0},rt),ut);return reactExports.createElement("svg",_extends$Q({},ct,{ref:nt}),st&&reactExports.createElement("title",{key:"icon-title"},st),et)}),EmotionIconBase=createStyled(EmotionIconBaseBase,{target:"ex0cdmw0"})("display:inline-block;vertical-align:",function(tt){return tt.iconVerticalAlign},";overflow:hidden;"),ArrowDownward=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:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}))});ArrowDownward.displayName="ArrowDownward";var ArrowUpward=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:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"}))});ArrowUpward.displayName="ArrowUpward";var Check=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:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"}))});Check.displayName="Check";var ChevronLeft=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:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12l4.58-4.59z"}))});ChevronLeft.displayName="ChevronLeft";var ChevronRight=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:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z"}))});ChevronRight.displayName="ChevronRight";var ExpandLess=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 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14l-6-6z"}))});ExpandLess.displayName="ExpandLess";var ExpandMore=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:"M24 24H0V0h24v24z",opacity:.87}),reactExports.createElement("path",{d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z"}))});ExpandMore.displayName="ExpandMore";var Face=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:"M10.25 13a1.25 1.25 0 11-2.5 0 1.25 1.25 0 012.5 0zM15 11.75a1.25 1.25 0 100 2.5 1.25 1.25 0 000-2.5zm7 .25c0 5.52-4.48 10-10 10S2 17.52 2 12 6.48 2 12 2s10 4.48 10 10zM10.66 4.12C12.06 6.44 14.6 8 17.5 8c.46 0 .91-.05 1.34-.12C17.44 5.56 14.9 4 12 4c-.46 0-.91.05-1.34.12zM4.42 9.47a8.046 8.046 0 003.66-4.44 8.046 8.046 0 00-3.66 4.44zM20 12c0-.78-.12-1.53-.33-2.24-.7.15-1.42.24-2.17.24a10 10 0 01-7.76-3.69A10.016 10.016 0 014 11.86c.01.04 0 .09 0 .14 0 4.41 3.59 8 8 8s8-3.59 8-8z"}))});Face.displayName="Face";var SmartToy=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("rect",{width:24,height:24,fill:"none"}),reactExports.createElement("path",{d:"M20 9V7c0-1.1-.9-2-2-2h-3c0-1.66-1.34-3-3-3S9 3.34 9 5H6c-1.1 0-2 .9-2 2v2c-1.66 0-3 1.34-3 3s1.34 3 3 3v4c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-4c1.66 0 3-1.34 3-3s-1.34-3-3-3zm-2 10H6V7h12v12zm-9-6c-.83 0-1.5-.67-1.5-1.5S8.17 10 9 10s1.5.67 1.5 1.5S9.83 13 9 13zm7.5-1.5c0 .83-.67 1.5-1.5 1.5s-1.5-.67-1.5-1.5.67-1.5 1.5-1.5 1.5.67 1.5 1.5zM8 15h8v2H8v-2z"}))});SmartToy.displayName="SmartToy";const StyledPopoverButtonIcon=newStyled("div",{target:"e1cuvrbr0"})(({theme:tt})=>({marginLeft:tt.spacing.threeXS,marginRight:`calc(-${tt.iconSizes.lg} * 0.25)`})),Popover=({element:tt,empty:nt,width:et,children:rt})=>{const[ot,at]=React$1.useState(!1),st=React$1.useContext(IsSidebarContext),ut=useTheme(),ct=hasLightBackgroundColor(ut),pt=tt.help?et:!0;return jsx$1("div",{"data-testid":"stPopover",className:"stPopover",children:jsx$1(Popover$1,{triggerType:TRIGGER_TYPE.click,placement:PLACEMENT.bottomLeft,content:()=>rt,isOpen:ot,onClickOutside:()=>at(!1),onClick:()=>ot?at(!1):void 0,onEsc:()=>at(!1),ignoreBoundary:st,renderAll:!0,overrides:{Body:{props:{"data-testid":"stPopoverBody"},style:()=>({marginRight:ut.spacing.lg,marginBottom:ut.spacing.lg,maxHeight:"70vh",overflow:"auto",maxWidth:`calc(${ut.sizes.contentMaxWidth} - 2*${ut.spacing.lg})`,minWidth:tt.useContainerWidth?`${Math.max(et,160)}px`:ut.sizes.minPopupWidth,[`@media (max-width: ${ut.breakpoints.sm})`]:{maxWidth:`calc(100% - ${ut.spacing.threeXL})`},borderTopLeftRadius:ut.radii.xl,borderTopRightRadius:ut.radii.xl,borderBottomRightRadius:ut.radii.xl,borderBottomLeftRadius:ut.radii.xl,borderLeftWidth:ut.sizes.borderWidth,borderRightWidth:ut.sizes.borderWidth,borderTopWidth:ut.sizes.borderWidth,borderBottomWidth:ut.sizes.borderWidth,paddingRight:`calc(${ut.spacing.twoXL} - ${ut.sizes.borderWidth})`,paddingLeft:`calc(${ut.spacing.twoXL} - ${ut.sizes.borderWidth})`,paddingBottom:`calc(${ut.spacing.twoXL} - ${ut.sizes.borderWidth})`,paddingTop:`calc(${ut.spacing.twoXL} - ${ut.sizes.borderWidth})`,borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",borderLeftColor:ut.colors.borderColor,borderRightColor:ut.colors.borderColor,borderTopColor:ut.colors.borderColor,borderBottomColor:ut.colors.borderColor,boxShadow:ct?"0px 4px 16px rgba(0, 0, 0, 0.16)":"0px 4px 16px rgba(0, 0, 0, 0.7)"})}},children:jsx$1("div",{children:jsx$1(BaseButtonTooltip,{help:tt.help,children:jsxs(BaseButton,{"data-testid":"stPopoverButton",kind:BaseButtonKind.SECONDARY,size:BaseButtonSize.SMALL,disabled:nt||tt.disabled,fluidWidth:tt.useContainerWidth?pt:!1,onClick:()=>at(!ot),children:[jsx$1(DynamicButtonLabel,{icon:tt.icon,label:tt.label}),jsx$1(StyledPopoverButtonIcon,{children:jsx$1(StyledIcon,{as:ot?ExpandLess:ExpandMore,color:"inherit","aria-hidden":"true",size:"lg",margin:ut.spacing.none,padding:ut.spacing.none})})]})})})})})},StyledChatMessageContainer=newStyled("div",{target:"e16gn19s0"})(({theme:tt,background:nt})=>{const et=hasLightBackgroundColor(tt);return{display:"flex",alignItems:"flex-start",gap:tt.spacing.sm,padding:tt.spacing.lg,paddingRight:nt?tt.spacing.lg:0,borderRadius:tt.radii.default,...nt?{backgroundColor:transparentize(et?tt.colors.gray20:tt.colors.gray90,.5)}:{}}}),StyledMessageContent=newStyled("div",{target:"e16gn19s1"})(({theme:tt})=>({color:tt.colors.bodyText,margin:"auto",flexGrow:1,minWidth:0})),StyledAvatarBackground=newStyled("div",{target:"e16gn19s2"})(({theme:tt})=>{const nt=hasLightBackgroundColor(tt);return{display:"flex",border:`${tt.sizes.borderWidth} solid ${nt?tt.colors.gray40:tt.colors.gray85}`,backgroundColor:nt?tt.colors.white:tt.colors.gray100,color:nt?tt.colors.gray90:tt.colors.white,lineHeight:tt.lineHeights.none,fontSize:tt.fontSizes.md,flexShrink:0,width:tt.sizes.chatAvatarSize,height:tt.sizes.chatAvatarSize,borderRadius:tt.radii.default,alignItems:"center",justifyContent:"center"}}),StyledAvatarIcon=newStyled("div",{target:"e16gn19s3"})(({theme:tt,background:nt})=>{const et=hasLightBackgroundColor(tt);return{display:"flex",width:tt.sizes.chatAvatarSize,height:tt.sizes.chatAvatarSize,flexShrink:0,borderRadius:tt.radii.default,alignItems:"center",justifyContent:"center",backgroundColor:nt,color:et?tt.colors.white:tt.colors.gray100}}),StyledAvatarImage=newStyled("img",{target:"e16gn19s4"})(({theme:tt})=>({width:tt.sizes.chatAvatarSize,height:tt.sizes.chatAvatarSize,flexShrink:0,borderRadius:tt.radii.default,objectFit:"cover",display:"flex"}));function ChatMessageAvatar(tt){const{avatar:nt,avatarType:et,name:rt,endpoints:ot}=tt,at=useTheme();if(nt)switch(et){case Block$2.ChatMessage.AvatarType.IMAGE:return jsx$1(StyledAvatarImage,{src:ot.buildMediaURL(nt),alt:`${rt} avatar`});case Block$2.ChatMessage.AvatarType.EMOJI:return jsx$1(StyledAvatarBackground,{children:nt});case Block$2.ChatMessage.AvatarType.ICON:if(nt==="user")return jsx$1(StyledAvatarIcon,{"data-testid":"stChatMessageAvatarUser",background:at.colors.red60,children:jsx$1(Icon$2,{content:Face,size:"lg"})});if(nt==="assistant")return jsx$1(StyledAvatarIcon,{"data-testid":"stChatMessageAvatarAssistant",background:at.colors.orange60,children:jsx$1(Icon$2,{content:SmartToy,size:"lg"})});if(nt.startsWith(":material"))return jsx$1(StyledAvatarBackground,{"data-testid":"stChatMessageAvatarCustom",children:jsx$1(DynamicIcon,{size:"lg",iconValue:nt,color:at.colors.bodyText})})}return jsx$1(StyledAvatarBackground,{children:rt?rt.charAt(0).toUpperCase():"🧑💻"})}const ChatMessage=({endpoints:tt,element:nt,children:et})=>{const{avatar:rt,avatarType:ot,name:at}=nt;return jsxs(StyledChatMessageContainer,{className:"stChatMessage","data-testid":"stChatMessage",background:["user","human"].includes(at.toLowerCase()),children:[jsx$1(ChatMessageAvatar,{name:at,avatar:rt,avatarType:ot,endpoints:tt}),jsx$1(StyledMessageContent,{"data-testid":"stChatMessageContent","aria-label":`Chat message from ${at}`,children:et})]})};var SIZE$2={default:"default",full:"full",auto:"auto"},SIZE_WIDTHS={default:"500px",full:"100%",auto:"auto"},ROLE={dialog:"dialog",alertdialog:"alertdialog"},CLOSE_SOURCE={closeButton:"closeButton",backdrop:"backdrop",escape:"escape"};function ownKeys$b(tt,nt){var et=Object.keys(tt);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(tt);nt&&(rt=rt.filter(function(ot){return Object.getOwnPropertyDescriptor(tt,ot).enumerable})),et.push.apply(et,rt)}return et}function _objectSpread$a(tt){for(var nt=1;nt<arguments.length;nt++){var et=arguments[nt]!=null?arguments[nt]:{};nt%2?ownKeys$b(Object(et),!0).forEach(function(rt){_defineProperty$f(tt,rt,et[rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(tt,Object.getOwnPropertyDescriptors(et)):ownKeys$b(Object(et)).forEach(function(rt){Object.defineProperty(tt,rt,Object.getOwnPropertyDescriptor(et,rt))})}return tt}function _defineProperty$f(tt,nt,et){return nt in tt?Object.defineProperty(tt,nt,{value:et,enumerable:!0,configurable:!0,writable:!0}):tt[nt]=et,tt}function getSizeStyles(tt){var nt={maxWidth:"100%",width:null};return typeof tt=="number"?nt.width="".concat(tt,"px"):SIZE$2[tt]?nt.width=SIZE_WIDTHS[tt]:typeof tt=="string"&&(nt.width=tt),tt===SIZE$2.full&&(nt.alignSelf="stretch"),nt}var Root$3=styled("div",function(tt){var nt=tt.$isOpen;return{position:"fixed",overflow:"auto",right:0,bottom:0,top:0,left:0,pointerEvents:nt?"auto":"none"}});Root$3.displayName="Root";Root$3.displayName="Root";var DialogContainer=styled("div",function(tt){var nt=tt.$animate,et=tt.$isOpen,rt=tt.$isVisible,ot=tt.$theme,at={transitionProperty:"opacity",transitionDuration:ot.animation.timing400,transitionTimingFunction:ot.animation.easeOutCurve};return _objectSpread$a({display:"flex",alignItems:"center",justifyContent:"center",width:"100%",minHeight:"100%",userSelect:"none",pointerEvents:"auto",backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",opacity:rt&&et?1:0},nt?at:null)});DialogContainer.displayName="DialogContainer";DialogContainer.displayName="DialogContainer";var Dialog$1=styled("div",function(tt){var nt=tt.$animate,et=tt.$isOpen,rt=tt.$isVisible,ot=tt.$size,at=tt.$theme;return _objectSpread$a(_objectSpread$a(_objectSpread$a({position:"relative",backgroundColor:at.colors.backgroundPrimary,borderTopLeftRadius:at.borders.radius500,borderTopRightRadius:at.borders.radius500,borderBottomRightRadius:at.borders.radius500,borderBottomLeftRadius:at.borders.radius500,marginLeft:at.sizing.scale600,marginTop:at.sizing.scale600,marginRight:at.sizing.scale600,marginBottom:at.sizing.scale600},getSizeStyles(ot)),{},{opacity:rt&&et?1:0,transform:rt?"translateY(0)":"translateY(20px)"},nt?{transitionProperty:"opacity, transform",transitionDuration:at.animation.timing400,transitionTimingFunction:at.animation.easeOutCurve}:null),{},{userSelect:"text",pointerEvents:et?"all":"none",":focus":{outline:"none"}})});Dialog$1.displayName="Dialog";Dialog$1.displayName="Dialog";var Close=styled("button",function(tt){var nt,et=tt.$theme,rt=tt.$isFocusVisible,ot=et.direction==="rtl"?"left":"right";return nt={background:"transparent",outline:0,paddingLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,color:et.colors.modalCloseColor,transitionProperty:"color, border-color",transitionDuration:et.animation.timing200,borderLeftWidth:"1px",borderRightWidth:"1px",borderTopWidth:"1px",borderBottomWidth:"1px",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",borderLeftColor:"transparent",borderRightColor:"transparent",borderTopColor:"transparent",borderBottomColor:"transparent",":hover":{color:et.colors.modalCloseColorHover},":focus":{outline:rt?"3px solid ".concat(et.colors.accent):"none"},position:"absolute",top:et.sizing.scale500},_defineProperty$f(nt,ot,et.sizing.scale500),_defineProperty$f(nt,"width",et.sizing.scale800),_defineProperty$f(nt,"height",et.sizing.scale800),_defineProperty$f(nt,"display","flex"),_defineProperty$f(nt,"justifyContent","center"),_defineProperty$f(nt,"alignItems","center"),_defineProperty$f(nt,"cursor","pointer"),nt});Close.displayName="Close";Close.displayName="Close";var ModalHeader$1=styled("div",function(tt){var nt,et=tt.$theme,rt=et.direction==="rtl"?"marginRight":"marginLeft",ot=et.direction==="rtl"?"marginLeft":"marginRight";return _objectSpread$a(_objectSpread$a({},et.typography.font550),{},(nt={color:et.colors.contentPrimary,marginTop:et.sizing.scale900,marginBottom:et.sizing.scale600},_defineProperty$f(nt,rt,et.sizing.scale800),_defineProperty$f(nt,ot,et.sizing.scale900),nt))});ModalHeader$1.displayName="ModalHeader";ModalHeader$1.displayName="ModalHeader";var ModalBody$2=styled("div",function(tt){var nt=tt.$theme;return _objectSpread$a(_objectSpread$a({},nt.typography.font200),{},{color:nt.colors.contentSecondary,marginTop:nt.sizing.scale600,marginLeft:nt.sizing.scale800,marginRight:nt.sizing.scale800,marginBottom:nt.sizing.scale700})});ModalBody$2.displayName="ModalBody";ModalBody$2.displayName="ModalBody";var ModalFooter$1=styled("div",function(tt){var nt=tt.$theme;return _objectSpread$a(_objectSpread$a({},nt.typography.font200),{},{marginTop:nt.sizing.scale700,marginLeft:nt.sizing.scale800,marginRight:nt.sizing.scale800,paddingTop:nt.sizing.scale500,paddingBottom:nt.sizing.scale500,textAlign:nt.direction==="rtl"?"left":"right"})});ModalFooter$1.displayName="ModalFooter";ModalFooter$1.displayName="ModalFooter";function CloseIcon(){return reactExports.createElement("svg",{width:"10",height:"10",viewBox:"0 0 10 10",style:{stroke:"currentColor"},xmlns:"http://www.w3.org/2000/svg"},reactExports.createElement("path",{d:"M9 1L5 5M1 9L5 5M5 5L1 1M5 5L9 9",strokeWidth:"2",strokeLinecap:"round"}))}function _typeof$8(tt){"@babel/helpers - typeof";return _typeof$8=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(nt){return typeof nt}:function(nt){return nt&&typeof Symbol=="function"&&nt.constructor===Symbol&&nt!==Symbol.prototype?"symbol":typeof nt},_typeof$8(tt)}function _extends$x(){return _extends$x=Object.assign?Object.assign.bind():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},_extends$x.apply(this,arguments)}function _slicedToArray$e(tt,nt){return _arrayWithHoles$e(tt)||_iterableToArrayLimit$e(tt,nt)||_unsupportedIterableToArray$e(tt,nt)||_nonIterableRest$e()}function _nonIterableRest$e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
451
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$e(tt,nt){if(tt){if(typeof tt=="string")return _arrayLikeToArray$e(tt,nt);var et=Object.prototype.toString.call(tt).slice(8,-1);if(et==="Object"&&tt.constructor&&(et=tt.constructor.name),et==="Map"||et==="Set")return Array.from(tt);if(et==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(et))return _arrayLikeToArray$e(tt,nt)}}function _arrayLikeToArray$e(tt,nt){(nt==null||nt>tt.length)&&(nt=tt.length);for(var et=0,rt=new Array(nt);et<nt;et++)rt[et]=tt[et];return rt}function _iterableToArrayLimit$e(tt,nt){var et=tt==null?null:typeof Symbol<"u"&&tt[Symbol.iterator]||tt["@@iterator"];if(et!=null){var rt=[],ot=!0,at=!1,st,ut;try{for(et=et.call(tt);!(ot=(st=et.next()).done)&&(rt.push(st.value),!(nt&&rt.length===nt));ot=!0);}catch(ct){at=!0,ut=ct}finally{try{!ot&&et.return!=null&&et.return()}finally{if(at)throw ut}}return rt}}function _arrayWithHoles$e(tt){if(Array.isArray(tt))return tt}function _classCallCheck$g(tt,nt){if(!(tt instanceof nt))throw new TypeError("Cannot call a class as a function")}function _defineProperties$6(tt,nt){for(var et=0;et<nt.length;et++){var rt=nt[et];rt.enumerable=rt.enumerable||!1,rt.configurable=!0,"value"in rt&&(rt.writable=!0),Object.defineProperty(tt,rt.key,rt)}}function _createClass$e(tt,nt,et){return nt&&_defineProperties$6(tt.prototype,nt),Object.defineProperty(tt,"prototype",{writable:!1}),tt}function _inherits$g(tt,nt){if(typeof nt!="function"&&nt!==null)throw new TypeError("Super expression must either be null or a function");tt.prototype=Object.create(nt&&nt.prototype,{constructor:{value:tt,writable:!0,configurable:!0}}),Object.defineProperty(tt,"prototype",{writable:!1}),nt&&_setPrototypeOf$6(tt,nt)}function _setPrototypeOf$6(tt,nt){return _setPrototypeOf$6=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(rt,ot){return rt.__proto__=ot,rt},_setPrototypeOf$6(tt,nt)}function _createSuper$5(tt){var nt=_isNativeReflectConstruct$5();return function(){var rt=_getPrototypeOf$6(tt),ot;if(nt){var at=_getPrototypeOf$6(this).constructor;ot=Reflect.construct(rt,arguments,at)}else ot=rt.apply(this,arguments);return _possibleConstructorReturn$g(this,ot)}}function _possibleConstructorReturn$g(tt,nt){if(nt&&(_typeof$8(nt)==="object"||typeof nt=="function"))return nt;if(nt!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$6(tt)}function _assertThisInitialized$6(tt){if(tt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return tt}function _isNativeReflectConstruct$5(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$6(tt){return _getPrototypeOf$6=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(et){return et.__proto__||Object.getPrototypeOf(et)},_getPrototypeOf$6(tt)}function _defineProperty$e(tt,nt,et){return nt in tt?Object.defineProperty(tt,nt,{value:et,enumerable:!0,configurable:!0,writable:!0}):tt[nt]=et,tt}var Modal$1=function(tt){_inherits$g(et,tt);var nt=_createSuper$5(et);function et(){var rt;_classCallCheck$g(this,et);for(var ot=arguments.length,at=new Array(ot),st=0;st<ot;st++)at[st]=arguments[st];return rt=nt.call.apply(nt,[this].concat(at)),_defineProperty$e(_assertThisInitialized$6(rt),"animateOutTimer",void 0),_defineProperty$e(_assertThisInitialized$6(rt),"animateStartTimer",void 0),_defineProperty$e(_assertThisInitialized$6(rt),"dialogContainerRef",reactExports.createRef()),_defineProperty$e(_assertThisInitialized$6(rt),"lastFocus",null),_defineProperty$e(_assertThisInitialized$6(rt),"lastMountNodeOverflowStyle",null),_defineProperty$e(_assertThisInitialized$6(rt),"rootRef",reactExports.createRef()),_defineProperty$e(_assertThisInitialized$6(rt),"state",{isVisible:!1,mounted:!1,isFocusVisible:!1}),_defineProperty$e(_assertThisInitialized$6(rt),"handleFocus",function(ut){isFocusVisible(ut)&&rt.setState({isFocusVisible:!0})}),_defineProperty$e(_assertThisInitialized$6(rt),"handleBlur",function(ut){rt.state.isFocusVisible!==!1&&rt.setState({isFocusVisible:!1})}),_defineProperty$e(_assertThisInitialized$6(rt),"onEscape",function(){rt.props.closeable&&rt.triggerClose(CLOSE_SOURCE.escape)}),_defineProperty$e(_assertThisInitialized$6(rt),"onDocumentClick",function(ut){ut.target&&ut.target instanceof HTMLElement&&ut.target.contains(rt.dialogContainerRef.current)&&rt.onBackdropClick()}),_defineProperty$e(_assertThisInitialized$6(rt),"onBackdropClick",function(){rt.props.closeable&&rt.triggerClose(CLOSE_SOURCE.backdrop)}),_defineProperty$e(_assertThisInitialized$6(rt),"onCloseClick",function(){rt.triggerClose(CLOSE_SOURCE.closeButton)}),_defineProperty$e(_assertThisInitialized$6(rt),"animateOutComplete",function(){rt.setState({isVisible:!1})}),rt}return _createClass$e(et,[{key:"componentDidMount",value:function(){this.setState({mounted:!0})}},{key:"componentWillUnmount",value:function(){this.resetMountNodeScroll(),this.clearTimers()}},{key:"componentDidUpdate",value:function(ot,at){var st=this.props.isOpen;(st!==ot.isOpen||st&&this.state.mounted&&!at.mounted)&&(st?this.didOpen():this.didClose())}},{key:"disableMountNodeScroll",value:function(){var ot=this.getMountNode();this.lastMountNodeOverflowStyle=ot.style.overflow||"",ot.style.overflow="hidden"}},{key:"resetMountNodeScroll",value:function(){var ot=this.getMountNode(),at=this.lastMountNodeOverflowStyle;ot&&at!==null&&(ot.style.overflow==="hidden"&&(ot.style.overflow=at||""),this.lastMountNodeOverflowStyle=null)}},{key:"clearTimers",value:function(){this.animateOutTimer&&clearTimeout(this.animateOutTimer),this.animateStartTimer&&cancelAnimationFrame(this.animateStartTimer)}},{key:"didOpen",value:function(){var ot=this,at=this.rootRef.current;at&&(at.scrollTop=0),this.clearTimers(),this.disableMountNodeScroll(),this.animateStartTimer=requestAnimationFrame(function(){ot.setState({isVisible:!0})})}},{key:"didClose",value:function(){this.resetMountNodeScroll(),this.animateOutTimer=setTimeout(this.animateOutComplete,500)}},{key:"triggerClose",value:function(ot){this.props.onClose&&ot&&this.props.onClose({closeSource:ot})}},{key:"getSharedProps",value:function(){var ot=this.props,at=ot.animate,st=ot.isOpen,ut=ot.size,ct=ot.role,pt=ot.closeable;return{$animate:at,$isVisible:this.state.isVisible,$isOpen:!!st,$size:ut,$role:ct,$closeable:!!pt,$isFocusVisible:this.state.isFocusVisible}}},{key:"getMountNode",value:function(){var ot=this.props.mountNode;return ot||document.body}},{key:"getChildren",value:function(){var ot=this.props.children;return typeof ot=="function"?ot():ot}},{key:"renderModal",value:function(){var ot=this,at=this.props,st=at.overrides,ut=st===void 0?{}:st,ct=at.closeable,pt=at.role,dt=at.autoFocus,ft=at.focusLock,bt=at.returnFocus,ht=ut.Root,Mt=ut.Dialog,mt=ut.DialogContainer,Ot=ut.Close,zt=getOverrides(ht,Root$3),yt=_slicedToArray$e(zt,2),vt=yt[0],At=yt[1],St=getOverrides(mt,DialogContainer),Et=_slicedToArray$e(St,2),Tt=Et[0],Rt=Et[1],Ct=getOverrides(Mt,Dialog$1),wt=_slicedToArray$e(Ct,2),Lt=wt[0],Ht=wt[1],jt=getOverrides(Ot,Close),s0=_slicedToArray$e(jt,2),Ut=s0[0],Yt=s0[1],O0=this.getSharedProps(),a0=this.getChildren();return reactExports.createElement(LocaleContext.Consumer,null,function(b0){return reactExports.createElement(FocusLockCombination,{disabled:!ft,crossFrame:!1,returnFocus:bt,autoFocus:dt},reactExports.createElement(vt,_extends$x({"data-baseweb":"modal",ref:ot.rootRef},O0,At),reactExports.createElement(Tt,_extends$x({ref:ot.dialogContainerRef},O0,Rt),reactExports.createElement(Lt,_extends$x({tabIndex:-1,"aria-modal":!0,"aria-label":"dialog",role:pt},O0,Ht),a0,ct?reactExports.createElement(Ut,_extends$x({"aria-label":b0.modal.close,onClick:ot.onCloseClick},O0,Yt,{onFocus:forkFocus(Yt,ot.handleFocus),onBlur:forkBlur(Yt,ot.handleBlur)}),reactExports.createElement(CloseIcon,null)):null))))})}},{key:"render",value:function(){return!this.state.mounted||!this.props.isOpen&&!this.state.isVisible?null:reactExports.createElement(Layer,{onEscape:this.onEscape,onDocumentClick:this.onDocumentClick,mountNode:this.props.mountNode},this.renderModal())}}]),et}(reactExports.Component);_defineProperty$e(Modal$1,"defaultProps",{animate:!0,autoFocus:!0,focusLock:!0,returnFocus:!0,closeable:!0,name:"dialog",isOpen:!1,overrides:{},role:ROLE.dialog,size:SIZE$2.default});const StyledModalButton=newStyled("span",{target:"egf28ua0"})(({theme:tt})=>({marginRight:tt.spacing.twoXS}));function ModalHeader({children:tt}){const{genericFonts:nt,fontSizes:et,spacing:rt,fontWeights:ot,lineHeights:at}=useTheme();return jsx$1(ModalHeader$1,{style:{marginTop:rt.none,marginLeft:rt.none,marginRight:rt.none,marginBottom:rt.none,paddingTop:rt.twoXL,paddingRight:rt.twoXL,paddingBottom:rt.md,paddingLeft:rt.twoXL,fontFamily:nt.bodyFont,fontSize:et.xl,fontWeight:ot.bold,margin:rt.none,lineHeight:at.small,textTransform:"none",display:"flex",alignItems:"center",maxHeight:"80vh",flexDirection:"row"},children:tt})}function ModalBody$1({children:tt}){const{colors:nt,fontSizes:et,spacing:rt}=useTheme();return jsx$1(ModalBody$2,{style:{marginTop:rt.none,marginLeft:rt.none,marginRight:rt.none,marginBottom:rt.none,paddingTop:rt.md,paddingRight:rt.twoXL,paddingBottom:rt.twoXL,paddingLeft:rt.twoXL,color:nt.bodyText,fontSize:et.md},children:tt})}function ModalFooter({children:tt}){const{spacing:nt}=useTheme();return jsx$1(ModalFooter$1,{style:{marginTop:nt.none,marginLeft:nt.none,marginRight:nt.none,marginBottom:nt.none,paddingTop:nt.md,paddingRight:nt.md,paddingBottom:nt.md,paddingLeft:nt.md},children:jsx$1("div",{children:tt})})}const ModalButton=tt=>jsx$1(StyledModalButton,{children:jsx$1(BaseButton,{...tt})});function calculateModalSize(tt,nt,et){return tt==="full"&&nt&&et?`calc(${nt} + ${et})`:tt==="auto"?SIZE$2.auto:SIZE$2.default}function Modal(tt){const{spacing:nt,radii:et,colors:rt,sizes:ot}=useTheme(),at={Root:{style:{background:rt.darkenedBgMix25},props:{className:"stDialog","data-testid":"stDialog"}},DialogContainer:{style:{alignItems:"start",paddingTop:nt.threeXL}},Dialog:{style:{borderBottomRightRadius:et.xxl,borderBottomLeftRadius:et.xxl,borderTopRightRadius:et.xxl,borderTopLeftRadius:et.xxl,minWidth:ot.minPopupWidth}},Close:{style:{top:`calc(${nt.twoXL} + .375rem)`,right:nt.twoXL}}},st=calculateModalSize(tt.size,ot.contentMaxWidth,nt.lg),ut=merge$6(at,tt.overrides),ct={...tt,size:st};return jsx$1(Modal$1,{...ct,overrides:ut})}const Dialog=({element:tt,deltaMsgReceivedAt:nt,children:et})=>{const{title:rt,dismissible:ot,width:at,isOpen:st}=tt,[ut,ct]=reactExports.useState(!1);return reactExports.useEffect(()=>{notNullOrUndefined(st)&&ct(st)},[st,nt]),ut?jsxs(Modal,{isOpen:!0,closeable:ot,onClose:()=>ct(!1),size:at===Block$2.Dialog.DialogWidth.LARGE?"full":"default",children:[jsx$1(ModalHeader,{children:rt}),jsx$1(ModalBody$1,{children:et})]}):jsx$1(Fragment,{})};function DialogWithProvider(tt){return jsx$1(IsDialogContext.Provider,{value:!0,children:jsx$1(Dialog,{...tt})})}const StyledExpandableContainer=newStyled("div",{target:"e4awi7d0"})({}),BORDER_SIZE=1,StyledDetails=newStyled("details",{target:"e4awi7d1"})(({isStale:tt,theme:nt})=>({marginBottom:0,marginTop:0,width:"100%",borderStyle:"solid",borderWidth:nt.sizes.borderWidth,borderColor:nt.colors.borderColor,borderRadius:nt.radii.default,...tt?{borderColor:nt.colors.borderColorLight,transition:`border ${STALE_TRANSITION_PARAMS}`}:{}})),StyledSummaryHeading=newStyled("span",{target:"e4awi7d2"})(({theme:tt})=>({display:"flex",gap:tt.spacing.sm,alignItems:"center",flexGrow:1})),StyledSummary=newStyled("summary",{target:"e4awi7d3"})(({theme:tt,empty:nt,isStale:et})=>({position:"relative",display:"flex",width:"100%","&:focus-visible":{outline:`${tt.sizes.borderWidth} solid ${tt.colors.primary}`,outlineOffset:`-${tt.sizes.borderWidth}`,borderRadius:tt.radii.default},fontSize:tt.fontSizes.sm,paddingLeft:tt.spacing.lg,paddingRight:tt.spacing.lg,paddingTop:tt.spacing.md,paddingBottom:tt.spacing.md,cursor:"pointer",listStyleType:"none","&::-webkit-details-marker":{display:"none"},"&:hover":{color:nt?void 0:tt.colors.primary},"&:hover svg":{fill:nt?void 0:tt.colors.primary},...nt&&{cursor:"default"},...et&&STALE_STYLES})),StyledDetailsPanel=newStyled("div",{target:"e4awi7d4"})(({theme:tt})=>({paddingBottom:tt.spacing.lg,paddingLeft:tt.spacing.lg,paddingRight:tt.spacing.lg})),ExpanderIcon=tt=>{const{icon:nt}=tt,{activeTheme:et}=React$1.useContext(LibContext),rt={size:"lg",margin:"0",padding:"0"},ot={":material/check:":"stExpanderIconCheck",":material/error:":"stExpanderIconError"};if(nt==="spinner"){const at=!isPresetTheme(et);return jsx$1(StyledSpinnerIcon,{usingCustomTheme:at,"data-testid":"stExpanderIconSpinner",...rt})}return nt?jsx$1(DynamicIcon,{color:"inherit",iconValue:nt,testid:ot[nt]||"stExpanderIcon",...rt}):jsx$1(Fragment,{})},Expander=({element:tt,isStale:nt,empty:et,children:rt})=>{const{label:ot,expanded:at}=tt,[st,ut]=reactExports.useState(at||!1),ct=reactExports.useRef(null),pt=reactExports.useRef(null),dt=reactExports.useRef(null),ft=reactExports.useRef(null),bt=reactExports.useRef(null);reactExports.useEffect(()=>{notNullOrUndefined(at)&&(ut(at),ct.current&&(ct.current.open=at))},[ot,at]);const ht=Ot=>{ct.current&&(ct.current.open=Ot,dt.current=null,ct.current.style.height="",ct.current.style.overflow="")},Mt=(Ot,zt,yt)=>{const vt=yt>zt;dt.current&&(dt.current.cancel(),ft.current&&(clearTimeout(ft.current),ft.current=null));const At=Ot.animate({height:[`${zt}px`,`${yt}px`]},{duration:500,easing:"cubic-bezier(0.23, 1, 0.32, 1)"});At.addEventListener("finish",()=>ht(vt)),dt.current=At};return jsx$1(StyledExpandableContainer,{className:"stExpander","data-testid":"stExpander",children:jsxs(StyledDetails,{isStale:nt,ref:ct,children:[jsxs(StyledSummary,{onClick:Ot=>{if(Ot.preventDefault(),et)return;ut(!st);const zt=ct.current;if(!zt||!pt.current)return;zt.style.overflow="hidden";const yt=zt.getBoundingClientRect().height,vt=pt.current.getBoundingClientRect().height;st?Mt(zt,yt,vt+2*BORDER_SIZE):(zt.style.height=`${yt}px`,zt.open=!0,window.requestAnimationFrame(()=>{Mt(zt,yt,vt+2*BORDER_SIZE+5),ft.current=setTimeout(()=>{if(!bt.current)return;const At=bt.current.getBoundingClientRect().height;Mt(zt,yt,vt+At+2*BORDER_SIZE)},100)}))},empty:et,ref:pt,isStale:nt,children:[jsxs(StyledSummaryHeading,{children:[tt.icon&&jsx$1(ExpanderIcon,{icon:tt.icon}),jsx$1(StreamlitMarkdown$1,{source:ot,allowHTML:!1,isLabel:!0})]}),et?jsx$1(Fragment,{}):jsx$1(StyledIcon,{as:st?ExpandLess:ExpandMore,color:"inherit","aria-hidden":"true","data-testid":"stExpanderToggleIcon",size:"lg",margin:"",padding:""})]}),et?jsx$1(Fragment,{}):jsx$1(StyledDetailsPanel,{"data-testid":"stExpanderDetails",ref:bt,children:rt})]})})};function debounce$2(tt,nt){let et=0,rt=null;return(...ot)=>{const at=Date.now();at-et>nt?(tt(...ot),et=at):(rt&&clearTimeout(rt),rt=setTimeout(()=>{tt(...ot),et=Date.now()},Math.max(0,nt-at+et)))}}const DEFAULT_DEBOUNCE_MS=100;function useScrollSpy(tt,nt){const et=reactExports.useRef(nt),rt=reactExports.useMemo(()=>debounce$2(at=>{et.current(at)},DEFAULT_DEBOUNCE_MS),[et]),ot=reactExports.useCallback(at=>{at.timeStampLow=Date.now(),rt(at)},[rt]);reactExports.useLayoutEffect(()=>tt?(tt.addEventListener("scroll",ot,{passive:!0}),ot({target:tt}),()=>tt.removeEventListener("scroll",ot)):()=>{},[ot,tt])}function squareStepper(tt,nt){const et=Math.sign(nt-tt),rt=Math.sqrt(Math.abs(nt-tt)),ot=tt+rt*et;return et>0?Math.min(nt,ot):Math.max(nt,ot)}function step(tt,nt,et,rt){let ot=tt;for(let at=0;at<rt;at++)ot=et(ot,nt);return ot}function useScrollAnimation(tt,nt,et){const rt=reactExports.useRef(0),ot=reactExports.useCallback((st,ut,ct=Date.now())=>{cancelAnimationFrame(rt.current),rt.current=requestAnimationFrame(()=>{if(tt){const pt=tt.scrollHeight-tt.offsetHeight;let dt=step(st,pt,squareStepper,(Date.now()-ct)/5);Math.abs(pt-dt)<1.5&&(dt=pt),tt.scrollTop=dt,pt===dt?nt():ot(st,ut+1,ct)}})},[rt,nt,tt]),at=reactExports.useCallback(()=>{cancelAnimationFrame(rt.current),nt()},[nt]);reactExports.useLayoutEffect(()=>{if(!(!tt||!et))return ot(tt.scrollTop,1),tt?(tt.addEventListener("pointerdown",at,{passive:!0}),tt.addEventListener("wheel",at,{passive:!0}),()=>{tt.removeEventListener("pointerdown",at),tt.removeEventListener("wheel",at),cancelAnimationFrame(rt.current)}):()=>cancelAnimationFrame(rt.current)},[ot,rt,at,tt,et])}function useStateRef(tt){const[nt,et]=reactExports.useState(tt),rt=reactExports.useRef(tt);return rt.current=nt,[nt,et,rt]}const DEFAULT_BOTTOM_THRESHOLD=1,SCROLL_DECISION_DURATION=34,MIN_CHECK_INTERVAL=17;function setImmediateInterval(tt,nt){return tt(),setInterval(tt,nt)}function isAtBottom({scrollHeight:tt,offsetHeight:nt,scrollTop:et}){return tt-et-nt<DEFAULT_BOTTOM_THRESHOLD}function useScrollToBottom(){const tt=reactExports.useRef(null),[nt,et,rt]=useStateRef(!1),[ot,at,st]=useStateRef(!0),ut=reactExports.useRef(0),ct=reactExports.useRef(0),pt=reactExports.useRef(0),dt=reactExports.useCallback(()=>{ut.current=Date.now(),st.current||et(!1),at(!1)},[ut,st,at,et]),ft=reactExports.useCallback(({timeStampLow:bt})=>{const{current:ht}=tt,Mt=st.current;if(bt<=ut.current||!ht)return;const mt=isAtBottom(ht),{offsetHeight:Ot,scrollHeight:zt}=ht,{current:yt}=ct,{current:vt}=pt,At=Ot!==yt,St=zt!==vt;if(At&&(ct.current=Ot),St&&(pt.current=zt),!At&&!St){const Et=Mt||mt;rt.current!==Et&&et(Et)}else rt.current&&(at(!0),et(!0))},[ut,ct,pt,st,rt,at,et]);return reactExports.useEffect(()=>{if(tt.current){let bt=0;const ht=setImmediateInterval(()=>{const{current:Mt}=tt,mt=st.current;rt.current&&Mt?isAtBottom(Mt)?bt=0:bt?Date.now()-bt>SCROLL_DECISION_DURATION&&(mt||(at(!0),et(!0)),bt=0):bt=Date.now():Mt&&Mt.scrollHeight<=Mt.offsetHeight&&!rt.current&&et(!0)},MIN_CHECK_INTERVAL);return()=>clearInterval(ht)}},[tt,nt,ot,st,rt,et,at]),reactExports.useEffect(()=>{const bt=tt.current;if(bt){const ht=()=>{pt.current=bt.scrollHeight};return bt.addEventListener("focus",ht,{capture:!0,passive:!0}),()=>bt.removeEventListener("focus",ht)}},[tt]),useScrollSpy(tt.current,ft),useScrollAnimation(tt.current,dt,ot),tt}var FUNC_ERROR_TEXT$3="Expected a function",NAN$1=NaN,symbolTag$3="[object Symbol]",reTrim=/^\s+|\s+$/g,reIsBadHex$1=/^[-+]0x[0-9a-f]+$/i,reIsBinary$1=/^0b[01]+$/i,reIsOctal$1=/^0o[0-7]+$/i,freeParseInt$1=parseInt,freeGlobal$1=typeof commonjsGlobal$1=="object"&&commonjsGlobal$1&&commonjsGlobal$1.Object===Object&&commonjsGlobal$1,freeSelf$1=typeof self=="object"&&self&&self.Object===Object&&self,root$3=freeGlobal$1||freeSelf$1||Function("return this")(),objectProto$i=Object.prototype,objectToString$1=objectProto$i.toString,nativeMax$2=Math.max,nativeMin$1=Math.min,now$3=function(){return root$3.Date.now()};function debounce$1(tt,nt,et){var rt,ot,at,st,ut,ct,pt=0,dt=!1,ft=!1,bt=!0;if(typeof tt!="function")throw new TypeError(FUNC_ERROR_TEXT$3);nt=toNumber$1(nt)||0,isObject$5(et)&&(dt=!!et.leading,ft="maxWait"in et,at=ft?nativeMax$2(toNumber$1(et.maxWait)||0,nt):at,bt="trailing"in et?!!et.trailing:bt);function ht(Et){var Tt=rt,Rt=ot;return rt=ot=void 0,pt=Et,st=tt.apply(Rt,Tt),st}function Mt(Et){return pt=Et,ut=setTimeout(zt,nt),dt?ht(Et):st}function mt(Et){var Tt=Et-ct,Rt=Et-pt,Ct=nt-Tt;return ft?nativeMin$1(Ct,at-Rt):Ct}function Ot(Et){var Tt=Et-ct,Rt=Et-pt;return ct===void 0||Tt>=nt||Tt<0||ft&&Rt>=at}function zt(){var Et=now$3();if(Ot(Et))return yt(Et);ut=setTimeout(zt,mt(Et))}function yt(Et){return ut=void 0,bt&&rt?ht(Et):(rt=ot=void 0,st)}function vt(){ut!==void 0&&clearTimeout(ut),pt=0,rt=ct=ot=ut=void 0}function At(){return ut===void 0?st:yt(now$3())}function St(){var Et=now$3(),Tt=Ot(Et);if(rt=arguments,ot=this,ct=Et,Tt){if(ut===void 0)return Mt(ct);if(ft)return ut=setTimeout(zt,nt),ht(ct)}return ut===void 0&&(ut=setTimeout(zt,nt)),st}return St.cancel=vt,St.flush=At,St}function isObject$5(tt){var nt=typeof tt;return!!tt&&(nt=="object"||nt=="function")}function isObjectLike$2(tt){return!!tt&&typeof tt=="object"}function isSymbol$2(tt){return typeof tt=="symbol"||isObjectLike$2(tt)&&objectToString$1.call(tt)==symbolTag$3}function toNumber$1(tt){if(typeof tt=="number")return tt;if(isSymbol$2(tt))return NAN$1;if(isObject$5(tt)){var nt=typeof tt.valueOf=="function"?tt.valueOf():tt;tt=isObject$5(nt)?nt+"":nt}if(typeof tt!="string")return tt===0?tt:+tt;tt=tt.replace(reTrim,"");var et=reIsBinary$1.test(tt);return et||reIsOctal$1.test(tt)?freeParseInt$1(tt.slice(2),et?2:8):reIsBadHex$1.test(tt)?NAN$1:+tt}var lodash_debounce=debounce$1;const _debounce=getDefaultExportFromCjs$1(lodash_debounce);function debounceRender(tt,nt,et){class rt extends reactExports.Component{constructor(){super(...arguments),this.updateDebounced=_debounce(this.forceUpdate,nt,et)}shouldComponentUpdate(){return this.updateDebounced(),!1}componentWillUnmount(){this.updateDebounced.cancel()}render(){return React$1.createElement(tt,Object.assign({},this.props))}}return rt.displayName=`debounceRender(${tt.displayName||tt.name||"Component"})`,hoistNonReactStatics$2(rt,tt)}var baseSlice$1=_baseSlice;function castSlice$1(tt,nt,et){var rt=tt.length;return et=et===void 0?rt:et,!nt&&et>=rt?tt:baseSlice$1(tt,nt,et)}var _castSlice=castSlice$1;function baseFindIndex$1(tt,nt,et,rt){for(var ot=tt.length,at=et+(rt?1:-1);rt?at--:++at<ot;)if(nt(tt[at],at,tt))return at;return-1}var _baseFindIndex=baseFindIndex$1;function baseIsNaN$1(tt){return tt!==tt}var _baseIsNaN=baseIsNaN$1;function strictIndexOf$1(tt,nt,et){for(var rt=et-1,ot=tt.length;++rt<ot;)if(tt[rt]===nt)return rt;return-1}var _strictIndexOf=strictIndexOf$1,baseFindIndex=_baseFindIndex,baseIsNaN=_baseIsNaN,strictIndexOf=_strictIndexOf;function baseIndexOf$2(tt,nt,et){return nt===nt?strictIndexOf(tt,nt,et):baseFindIndex(tt,baseIsNaN,et)}var _baseIndexOf=baseIndexOf$2,baseIndexOf$1=_baseIndexOf;function charsEndIndex$1(tt,nt){for(var et=tt.length;et--&&baseIndexOf$1(nt,tt[et],0)>-1;);return et}var _charsEndIndex=charsEndIndex$1,baseToString$1=_baseToString,castSlice=_castSlice,charsEndIndex=_charsEndIndex,stringToArray=_stringToArray,toString$3=toString_1,trimmedEndIndex$1=_trimmedEndIndex;function trimEnd(tt,nt,et){if(tt=toString$3(tt),tt&&(et||nt===void 0))return tt.slice(0,trimmedEndIndex$1(tt)+1);if(!tt||!(nt=baseToString$1(nt)))return tt;var rt=stringToArray(tt),ot=charsEndIndex(rt,stringToArray(nt))+1;return castSlice(rt,0,ot).join("")}var trimEnd_1=trimEnd;const trimEnd$1=getDefaultExportFromCjs$1(trimEnd_1);var momentTimezone$1={exports:{}},momentTimezone={exports:{}};//! moment.js
|
451
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$e(tt,nt){if(tt){if(typeof tt=="string")return _arrayLikeToArray$e(tt,nt);var et=Object.prototype.toString.call(tt).slice(8,-1);if(et==="Object"&&tt.constructor&&(et=tt.constructor.name),et==="Map"||et==="Set")return Array.from(tt);if(et==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(et))return _arrayLikeToArray$e(tt,nt)}}function _arrayLikeToArray$e(tt,nt){(nt==null||nt>tt.length)&&(nt=tt.length);for(var et=0,rt=new Array(nt);et<nt;et++)rt[et]=tt[et];return rt}function _iterableToArrayLimit$e(tt,nt){var et=tt==null?null:typeof Symbol<"u"&&tt[Symbol.iterator]||tt["@@iterator"];if(et!=null){var rt=[],ot=!0,at=!1,st,ut;try{for(et=et.call(tt);!(ot=(st=et.next()).done)&&(rt.push(st.value),!(nt&&rt.length===nt));ot=!0);}catch(ct){at=!0,ut=ct}finally{try{!ot&&et.return!=null&&et.return()}finally{if(at)throw ut}}return rt}}function _arrayWithHoles$e(tt){if(Array.isArray(tt))return tt}function _classCallCheck$g(tt,nt){if(!(tt instanceof nt))throw new TypeError("Cannot call a class as a function")}function _defineProperties$6(tt,nt){for(var et=0;et<nt.length;et++){var rt=nt[et];rt.enumerable=rt.enumerable||!1,rt.configurable=!0,"value"in rt&&(rt.writable=!0),Object.defineProperty(tt,rt.key,rt)}}function _createClass$e(tt,nt,et){return nt&&_defineProperties$6(tt.prototype,nt),Object.defineProperty(tt,"prototype",{writable:!1}),tt}function _inherits$g(tt,nt){if(typeof nt!="function"&&nt!==null)throw new TypeError("Super expression must either be null or a function");tt.prototype=Object.create(nt&&nt.prototype,{constructor:{value:tt,writable:!0,configurable:!0}}),Object.defineProperty(tt,"prototype",{writable:!1}),nt&&_setPrototypeOf$6(tt,nt)}function _setPrototypeOf$6(tt,nt){return _setPrototypeOf$6=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(rt,ot){return rt.__proto__=ot,rt},_setPrototypeOf$6(tt,nt)}function _createSuper$5(tt){var nt=_isNativeReflectConstruct$5();return function(){var rt=_getPrototypeOf$6(tt),ot;if(nt){var at=_getPrototypeOf$6(this).constructor;ot=Reflect.construct(rt,arguments,at)}else ot=rt.apply(this,arguments);return _possibleConstructorReturn$g(this,ot)}}function _possibleConstructorReturn$g(tt,nt){if(nt&&(_typeof$8(nt)==="object"||typeof nt=="function"))return nt;if(nt!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$6(tt)}function _assertThisInitialized$6(tt){if(tt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return tt}function _isNativeReflectConstruct$5(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$6(tt){return _getPrototypeOf$6=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(et){return et.__proto__||Object.getPrototypeOf(et)},_getPrototypeOf$6(tt)}function _defineProperty$e(tt,nt,et){return nt in tt?Object.defineProperty(tt,nt,{value:et,enumerable:!0,configurable:!0,writable:!0}):tt[nt]=et,tt}var Modal$1=function(tt){_inherits$g(et,tt);var nt=_createSuper$5(et);function et(){var rt;_classCallCheck$g(this,et);for(var ot=arguments.length,at=new Array(ot),st=0;st<ot;st++)at[st]=arguments[st];return rt=nt.call.apply(nt,[this].concat(at)),_defineProperty$e(_assertThisInitialized$6(rt),"animateOutTimer",void 0),_defineProperty$e(_assertThisInitialized$6(rt),"animateStartTimer",void 0),_defineProperty$e(_assertThisInitialized$6(rt),"dialogContainerRef",reactExports.createRef()),_defineProperty$e(_assertThisInitialized$6(rt),"lastFocus",null),_defineProperty$e(_assertThisInitialized$6(rt),"lastMountNodeOverflowStyle",null),_defineProperty$e(_assertThisInitialized$6(rt),"rootRef",reactExports.createRef()),_defineProperty$e(_assertThisInitialized$6(rt),"state",{isVisible:!1,mounted:!1,isFocusVisible:!1}),_defineProperty$e(_assertThisInitialized$6(rt),"handleFocus",function(ut){isFocusVisible(ut)&&rt.setState({isFocusVisible:!0})}),_defineProperty$e(_assertThisInitialized$6(rt),"handleBlur",function(ut){rt.state.isFocusVisible!==!1&&rt.setState({isFocusVisible:!1})}),_defineProperty$e(_assertThisInitialized$6(rt),"onEscape",function(){rt.props.closeable&&rt.triggerClose(CLOSE_SOURCE.escape)}),_defineProperty$e(_assertThisInitialized$6(rt),"onDocumentClick",function(ut){ut.target&&ut.target instanceof HTMLElement&&ut.target.contains(rt.dialogContainerRef.current)&&rt.onBackdropClick()}),_defineProperty$e(_assertThisInitialized$6(rt),"onBackdropClick",function(){rt.props.closeable&&rt.triggerClose(CLOSE_SOURCE.backdrop)}),_defineProperty$e(_assertThisInitialized$6(rt),"onCloseClick",function(){rt.triggerClose(CLOSE_SOURCE.closeButton)}),_defineProperty$e(_assertThisInitialized$6(rt),"animateOutComplete",function(){rt.setState({isVisible:!1})}),rt}return _createClass$e(et,[{key:"componentDidMount",value:function(){this.setState({mounted:!0})}},{key:"componentWillUnmount",value:function(){this.resetMountNodeScroll(),this.clearTimers()}},{key:"componentDidUpdate",value:function(ot,at){var st=this.props.isOpen;(st!==ot.isOpen||st&&this.state.mounted&&!at.mounted)&&(st?this.didOpen():this.didClose())}},{key:"disableMountNodeScroll",value:function(){var ot=this.getMountNode();this.lastMountNodeOverflowStyle=ot.style.overflow||"",ot.style.overflow="hidden"}},{key:"resetMountNodeScroll",value:function(){var ot=this.getMountNode(),at=this.lastMountNodeOverflowStyle;ot&&at!==null&&(ot.style.overflow==="hidden"&&(ot.style.overflow=at||""),this.lastMountNodeOverflowStyle=null)}},{key:"clearTimers",value:function(){this.animateOutTimer&&clearTimeout(this.animateOutTimer),this.animateStartTimer&&cancelAnimationFrame(this.animateStartTimer)}},{key:"didOpen",value:function(){var ot=this,at=this.rootRef.current;at&&(at.scrollTop=0),this.clearTimers(),this.disableMountNodeScroll(),this.animateStartTimer=requestAnimationFrame(function(){ot.setState({isVisible:!0})})}},{key:"didClose",value:function(){this.resetMountNodeScroll(),this.animateOutTimer=setTimeout(this.animateOutComplete,500)}},{key:"triggerClose",value:function(ot){this.props.onClose&&ot&&this.props.onClose({closeSource:ot})}},{key:"getSharedProps",value:function(){var ot=this.props,at=ot.animate,st=ot.isOpen,ut=ot.size,ct=ot.role,pt=ot.closeable;return{$animate:at,$isVisible:this.state.isVisible,$isOpen:!!st,$size:ut,$role:ct,$closeable:!!pt,$isFocusVisible:this.state.isFocusVisible}}},{key:"getMountNode",value:function(){var ot=this.props.mountNode;return ot||document.body}},{key:"getChildren",value:function(){var ot=this.props.children;return typeof ot=="function"?ot():ot}},{key:"renderModal",value:function(){var ot=this,at=this.props,st=at.overrides,ut=st===void 0?{}:st,ct=at.closeable,pt=at.role,dt=at.autoFocus,ft=at.focusLock,bt=at.returnFocus,ht=ut.Root,Mt=ut.Dialog,mt=ut.DialogContainer,Ot=ut.Close,zt=getOverrides(ht,Root$3),yt=_slicedToArray$e(zt,2),vt=yt[0],At=yt[1],St=getOverrides(mt,DialogContainer),Et=_slicedToArray$e(St,2),Tt=Et[0],Rt=Et[1],Ct=getOverrides(Mt,Dialog$1),wt=_slicedToArray$e(Ct,2),Lt=wt[0],Ht=wt[1],jt=getOverrides(Ot,Close),s0=_slicedToArray$e(jt,2),Ut=s0[0],Yt=s0[1],O0=this.getSharedProps(),a0=this.getChildren();return reactExports.createElement(LocaleContext.Consumer,null,function(b0){return reactExports.createElement(FocusLockCombination,{disabled:!ft,crossFrame:!1,returnFocus:bt,autoFocus:dt},reactExports.createElement(vt,_extends$x({"data-baseweb":"modal",ref:ot.rootRef},O0,At),reactExports.createElement(Tt,_extends$x({ref:ot.dialogContainerRef},O0,Rt),reactExports.createElement(Lt,_extends$x({tabIndex:-1,"aria-modal":!0,"aria-label":"dialog",role:pt},O0,Ht),a0,ct?reactExports.createElement(Ut,_extends$x({"aria-label":b0.modal.close,onClick:ot.onCloseClick},O0,Yt,{onFocus:forkFocus(Yt,ot.handleFocus),onBlur:forkBlur(Yt,ot.handleBlur)}),reactExports.createElement(CloseIcon,null)):null))))})}},{key:"render",value:function(){return!this.state.mounted||!this.props.isOpen&&!this.state.isVisible?null:reactExports.createElement(Layer,{onEscape:this.onEscape,onDocumentClick:this.onDocumentClick,mountNode:this.props.mountNode},this.renderModal())}}]),et}(reactExports.Component);_defineProperty$e(Modal$1,"defaultProps",{animate:!0,autoFocus:!0,focusLock:!0,returnFocus:!0,closeable:!0,name:"dialog",isOpen:!1,overrides:{},role:ROLE.dialog,size:SIZE$2.default});const StyledModalButton=newStyled("span",{target:"egf28ua0"})(({theme:tt})=>({marginRight:tt.spacing.twoXS}));function ModalHeader({children:tt}){const{genericFonts:nt,fontSizes:et,spacing:rt,fontWeights:ot,lineHeights:at}=useTheme();return jsx$1(ModalHeader$1,{style:{marginTop:rt.none,marginLeft:rt.none,marginRight:rt.none,marginBottom:rt.none,paddingTop:rt.twoXL,paddingRight:rt.twoXL,paddingBottom:rt.md,paddingLeft:rt.twoXL,fontFamily:nt.bodyFont,fontSize:et.xl,fontWeight:ot.bold,margin:rt.none,lineHeight:at.small,textTransform:"none",display:"flex",alignItems:"center",maxHeight:"80vh",flexDirection:"row"},children:tt})}function ModalBody$1({children:tt}){const{colors:nt,fontSizes:et,spacing:rt}=useTheme();return jsx$1(ModalBody$2,{style:{marginTop:rt.none,marginLeft:rt.none,marginRight:rt.none,marginBottom:rt.none,paddingTop:rt.md,paddingRight:rt.twoXL,paddingBottom:rt.twoXL,paddingLeft:rt.twoXL,color:nt.bodyText,fontSize:et.md},children:tt})}function ModalFooter({children:tt}){const{spacing:nt}=useTheme();return jsx$1(ModalFooter$1,{style:{marginTop:nt.none,marginLeft:nt.none,marginRight:nt.none,marginBottom:nt.none,paddingTop:nt.md,paddingRight:nt.md,paddingBottom:nt.md,paddingLeft:nt.md},children:jsx$1("div",{children:tt})})}const ModalButton=tt=>jsx$1(StyledModalButton,{children:jsx$1(BaseButton,{...tt})});function calculateModalSize(tt,nt,et){return tt==="full"&&nt&&et?`calc(${nt} + ${et})`:tt==="auto"?SIZE$2.auto:SIZE$2.default}function Modal(tt){const{spacing:nt,radii:et,colors:rt,sizes:ot}=useTheme(),at={Root:{style:{background:rt.darkenedBgMix25},props:{className:"stDialog","data-testid":"stDialog"}},DialogContainer:{style:{alignItems:"start",paddingTop:nt.threeXL}},Dialog:{style:{borderBottomRightRadius:et.xxl,borderBottomLeftRadius:et.xxl,borderTopRightRadius:et.xxl,borderTopLeftRadius:et.xxl,minWidth:ot.minPopupWidth}},Close:{style:{top:`calc(${nt.twoXL} + .375rem)`,right:nt.twoXL}}},st=calculateModalSize(tt.size,ot.contentMaxWidth,nt.lg),ut=merge$6(at,tt.overrides),ct={...tt,size:st};return jsx$1(Modal$1,{...ct,overrides:ut})}const Dialog=({element:tt,deltaMsgReceivedAt:nt,children:et})=>{const{title:rt,dismissible:ot,width:at,isOpen:st}=tt,[ut,ct]=reactExports.useState(!1);return reactExports.useEffect(()=>{notNullOrUndefined(st)&&ct(st)},[st,nt]),ut?jsxs(Modal,{isOpen:!0,closeable:ot,onClose:()=>ct(!1),size:at===Block$2.Dialog.DialogWidth.LARGE?"full":"default",children:[jsx$1(ModalHeader,{children:rt}),jsx$1(ModalBody$1,{children:et})]}):jsx$1(Fragment,{})};function DialogWithProvider(tt){return jsx$1(IsDialogContext.Provider,{value:!0,children:jsx$1(Dialog,{...tt})})}const StyledExpandableContainer=newStyled("div",{target:"e4awi7d0"})({}),BORDER_SIZE=1,StyledDetails=newStyled("details",{target:"e4awi7d1"})(({isStale:tt,theme:nt})=>({marginBottom:0,marginTop:0,width:"100%",borderStyle:"solid",borderWidth:nt.sizes.borderWidth,borderColor:nt.colors.borderColor,borderRadius:nt.radii.default,...tt?{borderColor:nt.colors.borderColorLight,transition:`border ${STALE_TRANSITION_PARAMS}`}:{}})),StyledSummaryHeading=newStyled("span",{target:"e4awi7d2"})(({theme:tt})=>({display:"flex",gap:tt.spacing.sm,alignItems:"center",flexGrow:1})),StyledSummary=newStyled("summary",{target:"e4awi7d3"})(({theme:tt,empty:nt,isStale:et})=>({position:"relative",display:"flex",width:"100%","&:focus-visible":{outline:`${tt.sizes.borderWidth} solid ${tt.colors.primary}`,outlineOffset:`-${tt.sizes.borderWidth}`,borderRadius:tt.radii.default},fontSize:tt.fontSizes.sm,paddingLeft:tt.spacing.lg,paddingRight:tt.spacing.lg,paddingTop:tt.spacing.md,paddingBottom:tt.spacing.md,cursor:"pointer",listStyleType:"none","&::-webkit-details-marker":{display:"none"},"&:hover":{color:nt?void 0:tt.colors.primary},"&:hover svg":{fill:nt?void 0:tt.colors.primary},...nt&&{cursor:"default"},...et&&STALE_STYLES})),StyledDetailsPanel=newStyled("div",{target:"e4awi7d4"})(({theme:tt})=>({paddingBottom:tt.spacing.lg,paddingLeft:tt.spacing.lg,paddingRight:tt.spacing.lg})),ExpanderIcon=tt=>{const{icon:nt}=tt,{activeTheme:et}=React$1.useContext(LibContext),rt={size:"lg",margin:"0",padding:"0"},ot={":material/check:":"stExpanderIconCheck",":material/error:":"stExpanderIconError"};if(nt==="spinner"){const at=!isPresetTheme(et);return jsx$1(StyledSpinnerIcon,{usingCustomTheme:at,"data-testid":"stExpanderIconSpinner",...rt})}return nt?jsx$1(DynamicIcon,{color:"inherit",iconValue:nt,testid:ot[nt]||"stExpanderIcon",...rt}):jsx$1(Fragment,{})},Expander=({element:tt,isStale:nt,empty:et,children:rt})=>{const{label:ot,expanded:at}=tt,[st,ut]=reactExports.useState(at||!1),ct=reactExports.useRef(null),pt=reactExports.useRef(null),dt=reactExports.useRef(null),ft=reactExports.useRef(null),bt=reactExports.useRef(null);reactExports.useEffect(()=>{notNullOrUndefined(at)&&(ut(at),ct.current&&(ct.current.open=at))},[ot,at]);const ht=Ot=>{ct.current&&(ct.current.open=Ot,dt.current=null,ct.current.style.height="",ct.current.style.overflow="")},Mt=(Ot,zt,yt)=>{const vt=yt>zt;dt.current&&(dt.current.cancel(),ft.current&&(clearTimeout(ft.current),ft.current=null));const At=Ot.animate({height:[`${zt}px`,`${yt}px`]},{duration:500,easing:"cubic-bezier(0.23, 1, 0.32, 1)"});At.addEventListener("finish",()=>ht(vt)),dt.current=At};return jsx$1(StyledExpandableContainer,{className:"stExpander","data-testid":"stExpander",children:jsxs(StyledDetails,{isStale:nt,ref:ct,children:[jsxs(StyledSummary,{onClick:Ot=>{if(Ot.preventDefault(),et)return;ut(!st);const zt=ct.current;if(!zt||!pt.current)return;zt.style.overflow="hidden";const yt=zt.getBoundingClientRect().height,vt=pt.current.getBoundingClientRect().height;st?Mt(zt,yt,vt+2*BORDER_SIZE):(zt.style.height=`${yt}px`,zt.open=!0,window.requestAnimationFrame(()=>{Mt(zt,yt,vt+2*BORDER_SIZE+5),ft.current=setTimeout(()=>{if(!bt.current)return;const At=bt.current.getBoundingClientRect().height;Mt(zt,yt,vt+At+2*BORDER_SIZE)},100)}))},empty:et,ref:pt,isStale:nt,children:[jsxs(StyledSummaryHeading,{children:[tt.icon&&jsx$1(ExpanderIcon,{icon:tt.icon}),jsx$1(StreamlitMarkdown$1,{source:ot,allowHTML:!1,isLabel:!0})]}),et?jsx$1(Fragment,{}):jsx$1(StyledIcon,{as:st?ExpandLess:ExpandMore,color:"inherit","aria-hidden":"true","data-testid":"stExpanderToggleIcon",size:"lg",margin:"",padding:""})]}),et?jsx$1(Fragment,{}):jsx$1(StyledDetailsPanel,{"data-testid":"stExpanderDetails",ref:bt,children:rt})]})})};function debounce$2(tt,nt){let et=0,rt=null;return(...ot)=>{const at=Date.now();at-et>nt?(tt(...ot),et=at):(rt&&clearTimeout(rt),rt=setTimeout(()=>{tt(...ot),et=Date.now()},Math.max(0,nt-at+et)))}}const DEFAULT_DEBOUNCE_MS=100;function useScrollSpy(tt,nt){const et=reactExports.useRef(nt),rt=reactExports.useMemo(()=>debounce$2(at=>{et.current(at)},DEFAULT_DEBOUNCE_MS),[et]),ot=reactExports.useCallback(at=>{at.timeStampLow=Date.now(),rt(at)},[rt]);reactExports.useLayoutEffect(()=>tt?(tt.addEventListener("scroll",ot,{passive:!0}),ot({target:tt}),()=>tt.removeEventListener("scroll",ot)):()=>{},[ot,tt])}function squareStepper(tt,nt){const et=Math.sign(nt-tt),rt=Math.sqrt(Math.abs(nt-tt)),ot=tt+rt*et;return et>0?Math.min(nt,ot):Math.max(nt,ot)}function step(tt,nt,et,rt){let ot=tt;for(let at=0;at<rt;at++)ot=et(ot,nt);return ot}function useScrollAnimation(tt,nt,et){const rt=reactExports.useRef(0),ot=reactExports.useCallback((st,ut,ct=Date.now())=>{cancelAnimationFrame(rt.current),rt.current=requestAnimationFrame(()=>{if(tt){const pt=tt.scrollHeight-tt.offsetHeight;let dt=step(st,pt,squareStepper,(Date.now()-ct)/5);Math.abs(pt-dt)<1.5&&(dt=pt),tt.scrollTop=dt,pt===dt?nt():ot(st,ut+1,ct)}})},[rt,nt,tt]),at=reactExports.useCallback(()=>{cancelAnimationFrame(rt.current),nt()},[nt]);reactExports.useLayoutEffect(()=>{if(!(!tt||!et))return ot(tt.scrollTop,1),tt?(tt.addEventListener("pointerdown",at,{passive:!0}),tt.addEventListener("wheel",at,{passive:!0}),()=>{tt.removeEventListener("pointerdown",at),tt.removeEventListener("wheel",at),cancelAnimationFrame(rt.current)}):()=>cancelAnimationFrame(rt.current)},[ot,rt,at,tt,et])}function useStateRef(tt){const[nt,et]=reactExports.useState(tt),rt=reactExports.useRef(tt);return rt.current=nt,[nt,et,rt]}const DEFAULT_BOTTOM_THRESHOLD=1,SCROLL_DECISION_DURATION=34,MIN_CHECK_INTERVAL=17;function setImmediateInterval(tt,nt){return tt(),setInterval(tt,nt)}function isAtBottom({scrollHeight:tt,offsetHeight:nt,scrollTop:et}){return tt-et-nt<DEFAULT_BOTTOM_THRESHOLD}function useScrollToBottom(){const tt=reactExports.useRef(null),[nt,et,rt]=useStateRef(!1),[ot,at,st]=useStateRef(!0),ut=reactExports.useRef(0),ct=reactExports.useRef(0),pt=reactExports.useRef(0),dt=reactExports.useCallback(()=>{ut.current=Date.now(),st.current||et(!1),at(!1)},[ut,st,at,et]),ft=reactExports.useCallback(({timeStampLow:bt})=>{const{current:ht}=tt,Mt=st.current;if(bt<=ut.current||!ht)return;const mt=isAtBottom(ht),{offsetHeight:Ot,scrollHeight:zt}=ht,{current:yt}=ct,{current:vt}=pt,At=Ot!==yt,St=zt!==vt;if(At&&(ct.current=Ot),St&&(pt.current=zt),!At&&!St){const Et=Mt||mt;rt.current!==Et&&et(Et)}else rt.current&&(at(!0),et(!0))},[ut,ct,pt,st,rt,at,et]);return reactExports.useEffect(()=>{if(tt.current){let bt=0;const ht=setImmediateInterval(()=>{const{current:Mt}=tt,mt=st.current;rt.current&&Mt?isAtBottom(Mt)?bt=0:bt?Date.now()-bt>SCROLL_DECISION_DURATION&&(mt||(at(!0),et(!0)),bt=0):bt=Date.now():Mt&&Mt.scrollHeight<=Mt.offsetHeight&&!rt.current&&et(!0)},MIN_CHECK_INTERVAL);return()=>clearInterval(ht)}},[tt,nt,ot,st,rt,et,at]),reactExports.useEffect(()=>{const bt=tt.current;if(bt){const ht=()=>{pt.current=bt.scrollHeight};return bt.addEventListener("focus",ht,{capture:!0,passive:!0}),()=>bt.removeEventListener("focus",ht)}},[tt]),useScrollSpy(tt.current,ft),useScrollAnimation(tt.current,dt,ot),tt}var FUNC_ERROR_TEXT$3="Expected a function",NAN$1=NaN,symbolTag$3="[object Symbol]",reTrim=/^\s+|\s+$/g,reIsBadHex$1=/^[-+]0x[0-9a-f]+$/i,reIsBinary$1=/^0b[01]+$/i,reIsOctal$1=/^0o[0-7]+$/i,freeParseInt$1=parseInt,freeGlobal$1=typeof commonjsGlobal$1=="object"&&commonjsGlobal$1&&commonjsGlobal$1.Object===Object&&commonjsGlobal$1,freeSelf$1=typeof self=="object"&&self&&self.Object===Object&&self,root$3=freeGlobal$1||freeSelf$1||Function("return this")(),objectProto$i=Object.prototype,objectToString$1=objectProto$i.toString,nativeMax$2=Math.max,nativeMin$1=Math.min,now$3=function(){return root$3.Date.now()};function debounce$1(tt,nt,et){var rt,ot,at,st,ut,ct,pt=0,dt=!1,ft=!1,bt=!0;if(typeof tt!="function")throw new TypeError(FUNC_ERROR_TEXT$3);nt=toNumber$1(nt)||0,isObject$5(et)&&(dt=!!et.leading,ft="maxWait"in et,at=ft?nativeMax$2(toNumber$1(et.maxWait)||0,nt):at,bt="trailing"in et?!!et.trailing:bt);function ht(Et){var Tt=rt,Rt=ot;return rt=ot=void 0,pt=Et,st=tt.apply(Rt,Tt),st}function Mt(Et){return pt=Et,ut=setTimeout(zt,nt),dt?ht(Et):st}function mt(Et){var Tt=Et-ct,Rt=Et-pt,Ct=nt-Tt;return ft?nativeMin$1(Ct,at-Rt):Ct}function Ot(Et){var Tt=Et-ct,Rt=Et-pt;return ct===void 0||Tt>=nt||Tt<0||ft&&Rt>=at}function zt(){var Et=now$3();if(Ot(Et))return yt(Et);ut=setTimeout(zt,mt(Et))}function yt(Et){return ut=void 0,bt&&rt?ht(Et):(rt=ot=void 0,st)}function vt(){ut!==void 0&&clearTimeout(ut),pt=0,rt=ct=ot=ut=void 0}function At(){return ut===void 0?st:yt(now$3())}function St(){var Et=now$3(),Tt=Ot(Et);if(rt=arguments,ot=this,ct=Et,Tt){if(ut===void 0)return Mt(ct);if(ft)return ut=setTimeout(zt,nt),ht(ct)}return ut===void 0&&(ut=setTimeout(zt,nt)),st}return St.cancel=vt,St.flush=At,St}function isObject$5(tt){var nt=typeof tt;return!!tt&&(nt=="object"||nt=="function")}function isObjectLike$2(tt){return!!tt&&typeof tt=="object"}function isSymbol$2(tt){return typeof tt=="symbol"||isObjectLike$2(tt)&&objectToString$1.call(tt)==symbolTag$3}function toNumber$1(tt){if(typeof tt=="number")return tt;if(isSymbol$2(tt))return NAN$1;if(isObject$5(tt)){var nt=typeof tt.valueOf=="function"?tt.valueOf():tt;tt=isObject$5(nt)?nt+"":nt}if(typeof tt!="string")return tt===0?tt:+tt;tt=tt.replace(reTrim,"");var et=reIsBinary$1.test(tt);return et||reIsOctal$1.test(tt)?freeParseInt$1(tt.slice(2),et?2:8):reIsBadHex$1.test(tt)?NAN$1:+tt}var lodash_debounce=debounce$1;const _debounce=getDefaultExportFromCjs$1(lodash_debounce);function debounceRender(tt,nt,et){class rt extends reactExports.Component{constructor(){super(...arguments),this.updateDebounced=_debounce(this.forceUpdate,nt,et)}shouldComponentUpdate(){return this.updateDebounced(),!1}componentWillUnmount(){this.updateDebounced.cancel()}render(){return React$1.createElement(tt,Object.assign({},this.props))}}return rt.displayName=`debounceRender(${tt.displayName||tt.name||"Component"})`,hoistNonReactStatics$2(rt,tt)}function getStyledHeaders(tt){var ot;const{numHeaderRows:nt,numIndexColumns:et}=tt.dimensions,rt=[];for(let at=0;at<nt;at++){const st=[];for(let ut=0;ut<et;ut++){const ct=["blank","index_name"];ut>0&&ct.push(`level${at}`),st.push({name:"",cssClass:ct.join(" ")})}for(let ut=0;ut<((ot=tt.columnNames[at])==null?void 0:ot.length);ut++)st.push({name:tt.columnNames[at][ut],cssClass:`col_heading level${at} col${ut}`});rt.push(st)}return rt}function getStyledCell(tt,nt,et){var dt;if(!tt.styler||!tt.styler.cssId)return;const{numIndexColumns:rt,numDataRows:ot,numColumns:at}=tt.dimensions;if(nt<0||nt>=ot)throw new Error(`Row index is out of range: ${nt}`);if(et<0||et>=at)throw new Error(`Column index is out of range: ${et}`);if(et<rt){const ft=["row_heading",`level${et}`,`row${nt}`].join(" ");return{cssId:`${tt.styler.cssId}level${et}_row${nt}`,cssClass:ft,displayContent:void 0}}const ut=et-rt,ct=["data",`row${nt}`,`col${ut}`].join(" "),pt=(dt=tt.styler)!=null&&dt.displayValues?tt.styler.displayValues.getCell(nt,et).content:void 0;return{cssId:`${tt.styler.cssId}row${nt}_col${ut}`,cssClass:ct,displayContent:pt}}var baseSlice$1=_baseSlice;function castSlice$1(tt,nt,et){var rt=tt.length;return et=et===void 0?rt:et,!nt&&et>=rt?tt:baseSlice$1(tt,nt,et)}var _castSlice=castSlice$1;function baseFindIndex$1(tt,nt,et,rt){for(var ot=tt.length,at=et+(rt?1:-1);rt?at--:++at<ot;)if(nt(tt[at],at,tt))return at;return-1}var _baseFindIndex=baseFindIndex$1;function baseIsNaN$1(tt){return tt!==tt}var _baseIsNaN=baseIsNaN$1;function strictIndexOf$1(tt,nt,et){for(var rt=et-1,ot=tt.length;++rt<ot;)if(tt[rt]===nt)return rt;return-1}var _strictIndexOf=strictIndexOf$1,baseFindIndex=_baseFindIndex,baseIsNaN=_baseIsNaN,strictIndexOf=_strictIndexOf;function baseIndexOf$2(tt,nt,et){return nt===nt?strictIndexOf(tt,nt,et):baseFindIndex(tt,baseIsNaN,et)}var _baseIndexOf=baseIndexOf$2,baseIndexOf$1=_baseIndexOf;function charsEndIndex$1(tt,nt){for(var et=tt.length;et--&&baseIndexOf$1(nt,tt[et],0)>-1;);return et}var _charsEndIndex=charsEndIndex$1,baseToString$1=_baseToString,castSlice=_castSlice,charsEndIndex=_charsEndIndex,stringToArray=_stringToArray,toString$3=toString_1,trimmedEndIndex$1=_trimmedEndIndex;function trimEnd(tt,nt,et){if(tt=toString$3(tt),tt&&(et||nt===void 0))return tt.slice(0,trimmedEndIndex$1(tt)+1);if(!tt||!(nt=baseToString$1(nt)))return tt;var rt=stringToArray(tt),ot=charsEndIndex(rt,stringToArray(nt))+1;return castSlice(rt,0,ot).join("")}var trimEnd_1=trimEnd;const trimEnd$1=getDefaultExportFromCjs$1(trimEnd_1);var momentTimezone$1={exports:{}},momentTimezone={exports:{}};//! moment.js
|
452
452
|
//! version : 2.30.1
|
453
453
|
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
454
454
|
//! license : MIT
|
@@ -642,7 +642,7 @@ hooks.version="2.30.1";setHookCallback(createLocal);hooks.fn=proto;hooks.min=min
|
|
642
642
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
643
643
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
644
644
|
* SOFTWARE.
|
645
|
-
*/const VERSION$1="2.5.0",globalState=requireGlobalState(),validator$1=requireValidating(),loader=loading(numbro),unformatter=requireUnformatting();let formatter=formatting(numbro),manipulate=manipulating(numbro);const parsing=parsing$2;class Numbro{constructor(nt){this._value=nt}clone(){return numbro(this._value)}format(nt={}){return formatter.format(this,nt)}formatCurrency(nt){return typeof nt=="string"&&(nt=parsing.parseFormat(nt)),nt=formatter.formatOrDefault(nt,globalState.currentCurrencyDefaultFormat()),nt.output="currency",formatter.format(this,nt)}formatTime(nt={}){return nt.output="time",formatter.format(this,nt)}binaryByteUnits(){return formatter.getBinaryByteUnit(this)}decimalByteUnits(){return formatter.getDecimalByteUnit(this)}byteUnits(){return formatter.getByteUnit(this)}difference(nt){return manipulate.difference(this,nt)}add(nt){return manipulate.add(this,nt)}subtract(nt){return manipulate.subtract(this,nt)}multiply(nt){return manipulate.multiply(this,nt)}divide(nt){return manipulate.divide(this,nt)}set(nt){return manipulate.set(this,normalizeInput(nt))}value(){return this._value}valueOf(){return this._value}}function normalizeInput(tt){let nt=tt;return numbro.isNumbro(tt)?nt=tt._value:typeof tt=="string"?nt=numbro.unformat(tt):isNaN(tt)&&(nt=NaN),nt}function numbro(tt){return new Numbro(normalizeInput(tt))}numbro.version=VERSION$1;numbro.isNumbro=function(tt){return tt instanceof Numbro};numbro.language=globalState.currentLanguage;numbro.registerLanguage=globalState.registerLanguage;numbro.setLanguage=globalState.setLanguage;numbro.languages=globalState.languages;numbro.languageData=globalState.languageData;numbro.zeroFormat=globalState.setZeroFormat;numbro.defaultFormat=globalState.currentDefaults;numbro.setDefaults=globalState.setDefaults;numbro.defaultCurrencyFormat=globalState.currentCurrencyDefaultFormat;numbro.validate=validator$1.validate;numbro.loadLanguagesInNode=loader.loadLanguagesInNode;numbro.unformat=unformatter.unformat;numbro.BigNumber=manipulate.BigNumber;var numbro_1=numbro,numbro$1=getDefaultExportFromCjs(numbro_1);const WEEKDAY_SHORT=["SUN","MON","TUE","WED","THU","FRI","SAT"],formatMs=tt=>moment$1("19700101","YYYYMMDD").add(tt,"ms").format("YYYY-MM-DD HH:mm:ss.SSS"),formatSec=tt=>moment$1("19700101","YYYYMMDD").add(tt,"s").format("YYYY-MM-DD HH:mm:ss"),formatMin=tt=>moment$1("19700101","YYYYMMDD").add(tt,"m").format("YYYY-MM-DD HH:mm"),formatHours=tt=>moment$1("19700101","YYYYMMDD").add(tt,"h").format("YYYY-MM-DD HH:mm"),formatDay=tt=>moment$1("19700101","YYYYMMDD").add(tt,"d").format("YYYY-MM-DD"),formatMonth=tt=>moment$1("19700101","YYYYMMDD").add(tt,"M").format("YYYY-MM"),formatYear=tt=>moment$1("19700101","YYYYMMDD").add(tt,"y").format("YYYY"),formatWeeks=(tt,nt)=>{if(!nt)throw new Error('Frequency "W" requires parameter');const et=WEEKDAY_SHORT.indexOf(nt);if(et<0)throw new Error(`Invalid value: ${nt}. Supported values: ${JSON.stringify(WEEKDAY_SHORT)}`);const rt=moment$1("19700101","YYYYMMDD").add(tt,"w").day(et-6).format("YYYY-MM-DD"),ot=moment$1("19700101","YYYYMMDD").add(tt,"w").day(et).format("YYYY-MM-DD");return`${rt}/${ot}`},formatQuarter=tt=>moment$1("19700101","YYYYMMDD").add(tt,"Q").endOf("quarter").format("YYYY[Q]Q"),PERIOD_TYPE_FORMATTERS={L:formatMs,ms:formatMs,S:formatSec,s:formatSec,T:formatMin,min:formatMin,H:formatHours,h:formatHours,D:formatDay,M:formatMonth,W:formatWeeks,Q:formatQuarter,Y:formatYear,A:formatYear};function convertTimestampToSeconds(tt,nt){let et;if(nt===TimeUnit.MILLISECOND)et=1e3;else if(nt===TimeUnit.MICROSECOND)et=1e3*1e3;else if(nt===TimeUnit.NANOSECOND)et=1e3*1e3*1e3;else return Number(tt);return typeof tt=="bigint"&&!Number.isSafeInteger(Number(tt))?Number(tt/BigInt(et)):Number(tt)/et}function convertTimeToDate(tt,nt){var rt;const et=convertTimestampToSeconds(tt,((rt=nt==null?void 0:nt.type)==null?void 0:rt.unit)??TimeUnit.SECOND);return moment$1.unix(et).utc().toDate()}function formatTime(tt,nt){const et=convertTimeToDate(tt,nt);return moment$1(et).utc().format(et.getMilliseconds()===0?"HH:mm:ss":"HH:mm:ss.SSS")}function formatDate(tt){const nt="YYYY-MM-DD";return tt instanceof Date||typeof tt=="number"&&Number.isFinite(tt)?moment$1.utc(tt).format(nt):String(tt)}function formatDatetime(tt,nt){var ot;if(!(tt instanceof Date||typeof tt=="number"&&Number.isFinite(tt)))return String(tt);let et=moment$1.utc(tt);const rt=(ot=nt==null?void 0:nt.type)==null?void 0:ot.timezone;return rt?(moment$1.tz.zone(rt)?et=et.tz(rt):et=et.utcOffset(rt),et.format("YYYY-MM-DD HH:mm:ssZ")):et.format("YYYY-MM-DD HH:mm:ss")}function formatDuration(tt,nt){var et;return moment$1.duration(convertTimestampToSeconds(tt,((et=nt==null?void 0:nt.type)==null?void 0:et.unit)??TimeUnit.NANOSECOND),"seconds").humanize()}function formatDecimal(tt,nt){var ut;const et=((ut=nt==null?void 0:nt.type)==null?void 0:ut.scale)||0;let rt=util$4.bigNumToString(new util$4.BN(tt)).padStart(et,"0");if(et===0)return rt;let ot="";rt.startsWith("-")&&(ot="-",rt=rt.slice(1));const at=rt.slice(0,-et)||"0",st=trimEnd$1(rt.slice(-et),"0")||"";return`${ot}${at}`+(st?`.${st}`:"")}function formatPeriodFromFreq(tt,nt){const[et,rt]=nt.split("-",2),ot=PERIOD_TYPE_FORMATTERS[et];if(!ot)return String(tt);const at=Number(tt);return Number.isSafeInteger(at)?ot(at,rt):String(tt)}function formatPeriod(tt,nt){if(isNullOrUndefined$1(nt))return String(tt);const et=nt.metadata.get("ARROW:extension:name"),rt=nt.metadata.get("ARROW:extension:metadata");if(isNullOrUndefined$1(et)||isNullOrUndefined$1(rt)||et!=="pandas.period")return String(tt);const ot=JSON.parse(rt),{freq:at}=ot;return formatPeriodFromFreq(tt,at)}function formatObject(tt,nt){return(nt==null?void 0:nt.type)instanceof Struct?JSON.stringify(tt,(et,rt)=>{if(notNullOrUndefined(rt))return typeof rt=="bigint"?Number(rt):rt}):JSON.stringify(tt,(et,rt)=>typeof rt=="bigint"?Number(rt):rt)}function formatFloat(tt){return Number.isFinite(tt)?numbro$1(tt).format("0,0.0000"):String(tt)}function formatInterval(tt,nt){var rt,ot,at,st;const et=nt&&nt.metadata.get("ARROW:extension:name");if(et&&et==="pandas.interval"){const ut=JSON.parse(nt.metadata.get("ARROW:extension:metadata")),{subtype:ct,closed:pt}=ut,dt=tt.toJSON(),ft=pt==="both"||pt==="left"?"[":"(",bt=pt==="both"||pt==="right"?"]":")",ht=format(dt.left,{pandas_type:ct,numpy_type:ct},(ot=(rt=nt.type)==null?void 0:rt.children)==null?void 0:ot[0]),Mt=format(dt.right,{pandas_type:ct,numpy_type:ct},(st=(at=nt.type)==null?void 0:at.children)==null?void 0:st[1]);return`${ft+ht}, ${Mt+bt}`}return String(tt)}function format(tt,nt,et){const rt=et&&et.metadata.get("ARROW:extension:name"),ot=et==null?void 0:et.type;if(isNullOrUndefined$1(tt))return"<NA>";const at=tt instanceof Date||Number.isFinite(tt);return at&&isDateType(nt)?formatDate(tt):typeof tt=="bigint"&&isTimeType(nt)?formatTime(Number(tt),et):at&&(isDatetimeType(nt)||ot instanceof Timestamp_)?formatDatetime(tt,et):isPeriodType(nt)||rt==="pandas.period"?formatPeriod(tt,et):isIntervalType(nt)||rt==="pandas.interval"?formatInterval(tt,et):isDurationType(nt)?formatDuration(tt,et):isDecimalType(nt)?formatDecimal(tt,et):(isFloatType(nt)||ot instanceof Float)&&Number.isFinite(tt)?formatFloat(tt):isObjectType(nt)||isListType(nt)?formatObject(tt,et):String(tt)}const StyledTableContainer=newStyled("div",{target:"e1gjw8bx0"})(({theme:tt})=>({fontSize:tt.fontSizes.md,fontFamily:tt.genericFonts.bodyFont,lineHeight:tt.lineHeights.small,captionSide:"bottom","& caption":{fontFamily:tt.genericFonts.bodyFont,fontSize:tt.fontSizes.sm,paddingTop:tt.spacing.sm,paddingBottom:0,color:tt.colors.fadedText60,textAlign:"left",wordWrap:"break-word",display:"inline-block"}})),StyledTableBorder=newStyled("div",{target:"e1gjw8bx1"})(({theme:tt})=>({border:`${tt.sizes.borderWidth} solid ${tt.colors.borderColorLight}`,borderRadius:tt.radii.default,overflow:["auto","overlay"]})),StyledTable=newStyled("table",{target:"e1gjw8bx2"})(({theme:tt})=>({width:tt.sizes.full,color:tt.colors.bodyText,borderSpacing:0})),styleCellFunction=tt=>({borderBottom:`${tt.sizes.borderWidth} solid ${tt.colors.borderColorLight}`,"tbody tr:last-child &":{borderBottom:"none"},borderRight:`${tt.sizes.borderWidth} solid ${tt.colors.borderColorLight}`,"&:last-child":{borderRight:"none"},verticalAlign:"middle",padding:`${tt.spacing.twoXS} ${tt.spacing.xs}`,fontWeight:tt.fontWeights.normal}),StyledTableCell=newStyled("td",{target:"e1gjw8bx3"})(({theme:tt})=>styleCellFunction(tt)),StyledTableCellHeader=newStyled("th",{target:"e1gjw8bx4"})(({theme:tt})=>({...styleCellFunction(tt),textAlign:"inherit",color:tt.colors.fadedText60})),StyledEmptyTableCell=newStyled(StyledTableCell,{target:"e1gjw8bx5"})(({theme:tt})=>({color:tt.colors.darkGray,fontStyle:"italic",fontSize:tt.fontSizes.md,textAlign:"center"}));function ArrowTable(tt){const nt=tt.element,{cssId:et,cssStyles:rt,caption:ot}=nt.styler??{},{numHeaderRows:at,numRows:st,numColumns:ut}=nt.dimensions,ct=range$1(st),pt=ct.slice(0,at),dt=ct.slice(at);return jsxs(StyledTableContainer,{className:"stTable","data-testid":"stTable",children:[rt&&jsx$1("style",{children:rt}),jsx$1(StyledTableBorder,{children:jsxs(StyledTable,{id:et,"data-testid":"stTableStyledTable",children:[pt.length>0&&jsx$1("thead",{children:pt.map(ft=>generateTableRow(nt,ft,ut))}),jsx$1("tbody",{children:dt.length===0?jsx$1("tr",{children:jsx$1(StyledEmptyTableCell,{"data-testid":"stTableStyledEmptyTableCell",colSpan:ut||1,children:"empty"})}):dt.map(ft=>generateTableRow(nt,ft,ut))})]})}),ot&&jsx$1("caption",{children:ot})]})}function generateTableRow(tt,nt,et){return jsx$1("tr",{children:range$1(et).map(rt=>generateTableCell(tt,nt,rt))},nt)}function generateTableCell(tt,nt,et){const{type:rt,cssId:ot,cssClass:at,content:st,contentType:ut,displayContent:ct,field:pt}=tt.getCell(nt,et),dt=ct||format(st,ut,pt),ft={textAlign:isNumericType(ut)?"right":"left"};switch(rt){case"blank":return jsx$1(StyledTableCellHeader,{className:at,children:" "},et);case"index":return jsx$1(StyledTableCellHeader,{scope:"row",id:ot,className:at,children:dt},et);case"columns":return jsx$1(StyledTableCellHeader,{scope:"col",className:at,style:ft,children:dt},et);case"data":return jsx$1(StyledTableCell,{id:ot,style:ft,children:dt},et);default:throw new Error(`Cannot parse type "${rt}".`)}}const StyledDocSummary=newStyled("span",{target:"e1e4p6eq0"})(({theme:tt})=>({"& > *":{marginRight:tt.spacing.sm}})),StyledDocName=newStyled("span",{target:"e1e4p6eq1"})(({theme:tt})=>({fontWeight:tt.fontWeights.bold})),StyledDocType=newStyled("span",{target:"e1e4p6eq2"})(({theme:tt})=>({color:tt.colors.docStringTypeText})),StyledDocValue=newStyled("span",{target:"e1e4p6eq3"})(),StyledDocContainer=newStyled("span",{target:"e1e4p6eq4"})(({theme:tt})=>({display:"flex",flexDirection:"column",borderRadius:tt.radii.default,border:`${tt.sizes.borderWidth} solid ${tt.colors.borderColor}`,fontFamily:tt.genericFonts.codeFont,fontSize:tt.fontSizes.sm})),StyledDocHeader=newStyled("div",{target:"e1e4p6eq5"})(({theme:tt})=>({padding:`${tt.spacing.sm} ${tt.spacing.lg}`,backgroundColor:tt.colors.docStringContainerBackground,borderBottom:`${tt.sizes.borderWidth} solid ${tt.colors.borderColorLight}`,borderTopLeftRadius:tt.radii.default,borderTopRightRadius:tt.radii.default,fontSize:tt.fontSizes.sm,overflow:["auto","overlay"]})),StyledDocString=newStyled("div",{target:"e1e4p6eq6"})(({theme:tt})=>({whiteSpace:"pre",overflow:["auto","overlay"],maxHeight:"30.5rem",padding:`${tt.spacing.sm} ${tt.spacing.lg}`,fontSize:tt.fontSizes.sm,"&:not(:last-child)":{borderBottom:`${tt.sizes.borderWidth} solid ${tt.colors.borderColorLight}`}})),StyledMembersTable=newStyled("table",{target:"e1e4p6eq7"})(({theme:tt})=>({width:"100%",fontSize:tt.fontSizes.twoSm,backgroundColor:tt.colors.docStringContainerBackground,tableLayout:"fixed",borderCollapse:"collapse"})),StyledMembersRow=newStyled("tr",{target:"e1e4p6eq8"})(({theme:tt})=>({"&:not(:last-child)":{borderBottom:`${tt.sizes.borderWidth} dotted ${tt.colors.borderColorLight}`}})),StyledMembersSummaryCell=newStyled("td",{target:"e1e4p6eq9"})(({theme:tt})=>({width:"30%",overflow:["auto","overlay"],padding:`${tt.spacing.sm} ${tt.spacing.lg}`,"& > *":{marginRight:tt.spacing.sm}})),StyledMembersDetailsCell=newStyled("td",{target:"e1e4p6eq10"})(({theme:tt})=>({width:"70%",overflow:["auto","overlay"],padding:`${tt.spacing.sm} ${tt.spacing.lg}`}));function DocString({width:tt,element:nt}){const{name:et,type:rt,value:ot,docString:at,members:st}=nt;return jsxs(StyledDocContainer,{className:"stHelp","data-testid":"stHelp",width:tt,children:[jsx$1(StyledDocHeader,{children:jsxs(StyledDocSummary,{children:[et?jsx$1(StyledDocName,{"data-testid":"stHelpName",children:et}):null,rt?jsx$1(StyledDocType,{"data-testid":"stHelpType",children:rt}):null,ot?jsx$1(StyledDocValue,{"data-testid":"stHelpValue",children:ot}):null]})}),jsx$1(StyledDocString,{"data-testid":"stHelpDoc",children:at||"No docs available"}),st.length>0?jsx$1(StyledMembersTable,{"data-testid":"stHelpMembersTable",children:st.map(ut=>jsx$1(Member,{member:ut},ut.name))}):null]})}function Member({member:tt}){const{name:nt,type:et,value:rt,docString:ot}=tt;return jsxs(StyledMembersRow,{"data-testid":"stHelpMember",children:[jsxs(StyledMembersSummaryCell,{children:[nt?jsx$1(StyledDocName,{"data-testid":"stHelpMemberDocName",children:nt}):null,et?jsx$1(StyledDocType,{"data-testid":"stHelpMemberDocType",children:et}):null]}),jsx$1(StyledMembersDetailsCell,{children:rt?jsx$1(StyledDocValue,{"data-testid":"stHelpMemberDocValue",children:rt}):jsx$1(StyledDocValue,{"data-testid":"stHelpMemberDocString",children:ot||"No docs available"})})]})}const StyledStackTraceRow=newStyled("div",{target:"e1msg78q0"})(({theme:tt})=>({marginTop:tt.spacing.sm,"&:first-of-type":{marginTop:0}})),StyledMessageType=newStyled("span",{target:"e1msg78q1"})(({theme:tt})=>({fontWeight:tt.fontWeights.bold})),StyledStackTraceTitle=newStyled("div",{target:"e1msg78q2"})(({theme:tt})=>({marginTop:`calc(${tt.spacing.sm} + ${tt.spacing.xl})`,marginBottom:tt.spacing.sm})),StyledStackTraceContent=newStyled("div",{target:"e1msg78q3"})({display:"inline-block",minWidth:"100%"}),StyledExceptionMessage=newStyled("div",{target:"e1msg78q4"})({wordWrap:"break-word"});function isNonEmptyString(tt){return notNullOrUndefined(tt)&&tt!==""}function ExceptionMessage({type:tt,message:nt,messageIsMarkdown:et}){if(et){let rt=nt??"";return tt.length!==0&&(rt=`**${tt}**: ${rt}`),jsx$1(StreamlitMarkdown$1,{source:rt,allowHTML:!1})}return jsxs(Fragment,{children:[jsx$1(StyledMessageType,{children:tt}),tt.length!==0&&": ",isNonEmptyString(nt)?nt:null]})}function StackTrace({stackTrace:tt}){return jsxs(Fragment,{children:[jsx$1(StyledStackTraceTitle,{children:"Traceback:"}),jsx$1(StyledStackTrace,{children:jsx$1(StyledStackTraceContent,{children:jsx$1(StyledCode,{children:tt.map((nt,et)=>jsx$1(StyledStackTraceRow,{"data-testid":"stExceptionTraceRow",children:nt},et))})})})]})}function ExceptionElement({element:tt,width:nt}){return jsx$1("div",{className:"stException","data-testid":"stException",children:jsxs(AlertContainer,{kind:tt.isWarning?Kind.WARNING:Kind.ERROR,width:nt,children:[jsx$1(StyledExceptionMessage,{"data-testid":"stExceptionMessage",children:jsx$1(ExceptionMessage,{type:tt.type,message:tt.message,messageIsMarkdown:tt.messageIsMarkdown})}),tt.stackTrace&&tt.stackTrace.length>0?jsx$1(StackTrace,{stackTrace:tt.stackTrace}):null]})})}var Space_Separator=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,ID_Start=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,ID_Continue=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,unicode={Space_Separator,ID_Start,ID_Continue},util$3={isSpaceSeparator(tt){return typeof tt=="string"&&unicode.Space_Separator.test(tt)},isIdStartChar(tt){return typeof tt=="string"&&(tt>="a"&&tt<="z"||tt>="A"&&tt<="Z"||tt==="$"||tt==="_"||unicode.ID_Start.test(tt))},isIdContinueChar(tt){return typeof tt=="string"&&(tt>="a"&&tt<="z"||tt>="A"&&tt<="Z"||tt>="0"&&tt<="9"||tt==="$"||tt==="_"||tt===""||tt===""||unicode.ID_Continue.test(tt))},isDigit(tt){return typeof tt=="string"&&/[0-9]/.test(tt)},isHexDigit(tt){return typeof tt=="string"&&/[0-9A-Fa-f]/.test(tt)}};let source,parseState,stack,pos,line,column,token$1,key,root$2;var parse$2=function tt(nt,et){source=String(nt),parseState="start",stack=[],pos=0,line=1,column=0,token$1=void 0,key=void 0,root$2=void 0;do token$1=lex(),parseStates[parseState]();while(token$1.type!=="eof");return typeof et=="function"?internalize({"":root$2},"",et):root$2};function internalize(tt,nt,et){const rt=tt[nt];if(rt!=null&&typeof rt=="object")if(Array.isArray(rt))for(let ot=0;ot<rt.length;ot++){const at=String(ot),st=internalize(rt,at,et);st===void 0?delete rt[at]:Object.defineProperty(rt,at,{value:st,writable:!0,enumerable:!0,configurable:!0})}else for(const ot in rt){const at=internalize(rt,ot,et);at===void 0?delete rt[ot]:Object.defineProperty(rt,ot,{value:at,writable:!0,enumerable:!0,configurable:!0})}return et.call(tt,nt,rt)}let lexState,buffer,doubleQuote,sign,c;function lex(){for(lexState="default",buffer="",doubleQuote=!1,sign=1;;){c=peek();const tt=lexStates[lexState]();if(tt)return tt}}function peek(){if(source[pos])return String.fromCodePoint(source.codePointAt(pos))}function read(){const tt=peek();return tt===`
|
645
|
+
*/const VERSION$1="2.5.0",globalState=requireGlobalState(),validator$1=requireValidating(),loader=loading(numbro),unformatter=requireUnformatting();let formatter=formatting(numbro),manipulate=manipulating(numbro);const parsing=parsing$2;class Numbro{constructor(nt){this._value=nt}clone(){return numbro(this._value)}format(nt={}){return formatter.format(this,nt)}formatCurrency(nt){return typeof nt=="string"&&(nt=parsing.parseFormat(nt)),nt=formatter.formatOrDefault(nt,globalState.currentCurrencyDefaultFormat()),nt.output="currency",formatter.format(this,nt)}formatTime(nt={}){return nt.output="time",formatter.format(this,nt)}binaryByteUnits(){return formatter.getBinaryByteUnit(this)}decimalByteUnits(){return formatter.getDecimalByteUnit(this)}byteUnits(){return formatter.getByteUnit(this)}difference(nt){return manipulate.difference(this,nt)}add(nt){return manipulate.add(this,nt)}subtract(nt){return manipulate.subtract(this,nt)}multiply(nt){return manipulate.multiply(this,nt)}divide(nt){return manipulate.divide(this,nt)}set(nt){return manipulate.set(this,normalizeInput(nt))}value(){return this._value}valueOf(){return this._value}}function normalizeInput(tt){let nt=tt;return numbro.isNumbro(tt)?nt=tt._value:typeof tt=="string"?nt=numbro.unformat(tt):isNaN(tt)&&(nt=NaN),nt}function numbro(tt){return new Numbro(normalizeInput(tt))}numbro.version=VERSION$1;numbro.isNumbro=function(tt){return tt instanceof Numbro};numbro.language=globalState.currentLanguage;numbro.registerLanguage=globalState.registerLanguage;numbro.setLanguage=globalState.setLanguage;numbro.languages=globalState.languages;numbro.languageData=globalState.languageData;numbro.zeroFormat=globalState.setZeroFormat;numbro.defaultFormat=globalState.currentDefaults;numbro.setDefaults=globalState.setDefaults;numbro.defaultCurrencyFormat=globalState.currentCurrencyDefaultFormat;numbro.validate=validator$1.validate;numbro.loadLanguagesInNode=loader.loadLanguagesInNode;numbro.unformat=unformatter.unformat;numbro.BigNumber=manipulate.BigNumber;var numbro_1=numbro,numbro$1=getDefaultExportFromCjs(numbro_1);const WEEKDAY_SHORT=["SUN","MON","TUE","WED","THU","FRI","SAT"],formatMs=tt=>moment$1("19700101","YYYYMMDD").add(tt,"ms").format("YYYY-MM-DD HH:mm:ss.SSS"),formatSec=tt=>moment$1("19700101","YYYYMMDD").add(tt,"s").format("YYYY-MM-DD HH:mm:ss"),formatMin=tt=>moment$1("19700101","YYYYMMDD").add(tt,"m").format("YYYY-MM-DD HH:mm"),formatHours=tt=>moment$1("19700101","YYYYMMDD").add(tt,"h").format("YYYY-MM-DD HH:mm"),formatDay=tt=>moment$1("19700101","YYYYMMDD").add(tt,"d").format("YYYY-MM-DD"),formatMonth=tt=>moment$1("19700101","YYYYMMDD").add(tt,"M").format("YYYY-MM"),formatYear=tt=>moment$1("19700101","YYYYMMDD").add(tt,"y").format("YYYY"),formatWeeks=(tt,nt)=>{if(!nt)throw new Error('Frequency "W" requires parameter');const et=WEEKDAY_SHORT.indexOf(nt);if(et<0)throw new Error(`Invalid value: ${nt}. Supported values: ${JSON.stringify(WEEKDAY_SHORT)}`);const rt=moment$1("19700101","YYYYMMDD").add(tt,"w").day(et-6).format("YYYY-MM-DD"),ot=moment$1("19700101","YYYYMMDD").add(tt,"w").day(et).format("YYYY-MM-DD");return`${rt}/${ot}`},formatQuarter=tt=>moment$1("19700101","YYYYMMDD").add(tt,"Q").endOf("quarter").format("YYYY[Q]Q"),PERIOD_TYPE_FORMATTERS={L:formatMs,ms:formatMs,S:formatSec,s:formatSec,T:formatMin,min:formatMin,H:formatHours,h:formatHours,D:formatDay,M:formatMonth,W:formatWeeks,Q:formatQuarter,Y:formatYear,A:formatYear};function convertTimestampToSeconds(tt,nt){let et;if(nt===TimeUnit.MILLISECOND)et=1e3;else if(nt===TimeUnit.MICROSECOND)et=1e3*1e3;else if(nt===TimeUnit.NANOSECOND)et=1e3*1e3*1e3;else return Number(tt);return typeof tt=="bigint"&&!Number.isSafeInteger(Number(tt))?Number(tt/BigInt(et)):Number(tt)/et}function convertTimeToDate(tt,nt){var rt;const et=convertTimestampToSeconds(tt,((rt=nt==null?void 0:nt.type)==null?void 0:rt.unit)??TimeUnit.SECOND);return moment$1.unix(et).utc().toDate()}function formatTime(tt,nt){const et=convertTimeToDate(tt,nt);return moment$1(et).utc().format(et.getMilliseconds()===0?"HH:mm:ss":"HH:mm:ss.SSS")}function formatDate(tt){const nt="YYYY-MM-DD";return tt instanceof Date||typeof tt=="number"&&Number.isFinite(tt)?moment$1.utc(tt).format(nt):String(tt)}function formatDatetime(tt,nt){var ot;if(!(tt instanceof Date||typeof tt=="number"&&Number.isFinite(tt)))return String(tt);let et=moment$1.utc(tt);const rt=(ot=nt==null?void 0:nt.type)==null?void 0:ot.timezone;return rt?(moment$1.tz.zone(rt)?et=et.tz(rt):et=et.utcOffset(rt),et.format("YYYY-MM-DD HH:mm:ssZ")):et.format("YYYY-MM-DD HH:mm:ss")}function formatDuration(tt,nt){var et;return moment$1.duration(convertTimestampToSeconds(tt,((et=nt==null?void 0:nt.type)==null?void 0:et.unit)??TimeUnit.NANOSECOND),"seconds").humanize()}function formatDecimal(tt,nt){var ut;const et=((ut=nt==null?void 0:nt.type)==null?void 0:ut.scale)||0;let rt=util$4.bigNumToString(new util$4.BN(tt)).padStart(et,"0");if(et===0)return rt;let ot="";rt.startsWith("-")&&(ot="-",rt=rt.slice(1));const at=rt.slice(0,-et)||"0",st=trimEnd$1(rt.slice(-et),"0")||"";return`${ot}${at}`+(st?`.${st}`:"")}function formatPeriodFromFreq(tt,nt){const[et,rt]=nt.split("-",2),ot=PERIOD_TYPE_FORMATTERS[et];if(!ot)return String(tt);const at=Number(tt);return Number.isSafeInteger(at)?ot(at,rt):String(tt)}function formatPeriod(tt,nt){if(isNullOrUndefined$1(nt))return String(tt);const et=nt.metadata.get("ARROW:extension:name"),rt=nt.metadata.get("ARROW:extension:metadata");if(isNullOrUndefined$1(et)||isNullOrUndefined$1(rt)||et!=="pandas.period")return String(tt);const ot=JSON.parse(rt),{freq:at}=ot;return formatPeriodFromFreq(tt,at)}function formatObject(tt,nt){return(nt==null?void 0:nt.type)instanceof Struct?JSON.stringify(tt,(et,rt)=>{if(notNullOrUndefined(rt))return typeof rt=="bigint"?Number(rt):rt}):JSON.stringify(tt,(et,rt)=>typeof rt=="bigint"?Number(rt):rt)}function formatFloat(tt){return Number.isFinite(tt)?numbro$1(tt).format("0,0.0000"):String(tt)}function formatInterval(tt,nt){var rt,ot,at,st;const et=nt&&nt.metadata.get("ARROW:extension:name");if(et&&et==="pandas.interval"){const ut=JSON.parse(nt.metadata.get("ARROW:extension:metadata")),{subtype:ct,closed:pt}=ut,dt=tt.toJSON(),ft=pt==="both"||pt==="left"?"[":"(",bt=pt==="both"||pt==="right"?"]":")",ht=format(dt.left,{pandas_type:ct,numpy_type:ct},(ot=(rt=nt.type)==null?void 0:rt.children)==null?void 0:ot[0]),Mt=format(dt.right,{pandas_type:ct,numpy_type:ct},(st=(at=nt.type)==null?void 0:at.children)==null?void 0:st[1]);return`${ft+ht}, ${Mt+bt}`}return String(tt)}function format(tt,nt,et){const rt=et&&et.metadata.get("ARROW:extension:name"),ot=et==null?void 0:et.type;if(isNullOrUndefined$1(tt))return"<NA>";const at=tt instanceof Date||Number.isFinite(tt);return at&&isDateType(nt)?formatDate(tt):typeof tt=="bigint"&&isTimeType(nt)?formatTime(Number(tt),et):at&&(isDatetimeType(nt)||ot instanceof Timestamp_)?formatDatetime(tt,et):isPeriodType(nt)||rt==="pandas.period"?formatPeriod(tt,et):isIntervalType(nt)||rt==="pandas.interval"?formatInterval(tt,et):isDurationType(nt)?formatDuration(tt,et):isDecimalType(nt)?formatDecimal(tt,et):(isFloatType(nt)||ot instanceof Float)&&Number.isFinite(tt)?formatFloat(tt):isObjectType(nt)||isListType(nt)?formatObject(tt,et):String(tt)}const StyledTableContainer=newStyled("div",{target:"e1rblae10"})(({theme:tt})=>({fontSize:tt.fontSizes.md,fontFamily:tt.genericFonts.bodyFont,lineHeight:tt.lineHeights.small,captionSide:"bottom"})),StyledTableCaption=newStyled("div",{target:"e1rblae11"})(({theme:tt})=>({fontFamily:tt.genericFonts.bodyFont,fontSize:tt.fontSizes.sm,paddingTop:tt.spacing.sm,paddingBottom:0,color:tt.colors.fadedText60,textAlign:"left",wordWrap:"break-word",display:"inline-block"})),StyledTableBorder=newStyled("div",{target:"e1rblae12"})(({theme:tt})=>({border:`${tt.sizes.borderWidth} solid ${tt.colors.borderColorLight}`,borderRadius:tt.radii.default,overflow:["auto","overlay"]})),StyledTable=newStyled("table",{target:"e1rblae13"})(({theme:tt})=>({width:tt.sizes.full,color:tt.colors.bodyText,borderSpacing:0})),styleCellFunction=tt=>({borderBottom:`${tt.sizes.borderWidth} solid ${tt.colors.borderColorLight}`,"tbody tr:last-child &":{borderBottom:"none"},borderRight:`${tt.sizes.borderWidth} solid ${tt.colors.borderColorLight}`,"&:last-child":{borderRight:"none"},verticalAlign:"middle",padding:`${tt.spacing.twoXS} ${tt.spacing.xs}`,fontWeight:tt.fontWeights.normal}),StyledTableCell=newStyled("td",{target:"e1rblae14"})(({theme:tt})=>styleCellFunction(tt)),StyledTableCellHeader=newStyled("th",{target:"e1rblae15"})(({theme:tt})=>({...styleCellFunction(tt),textAlign:"inherit",color:tt.colors.fadedText60})),StyledEmptyTableCell=newStyled(StyledTableCell,{target:"e1rblae16"})(({theme:tt})=>({color:tt.colors.darkGray,fontStyle:"italic",fontSize:tt.fontSizes.md,textAlign:"center"}));function ArrowTable(tt){const nt=tt.element,{cssId:et,cssStyles:rt,caption:ot}=nt.styler??{},{numHeaderRows:at,numDataRows:st,numColumns:ut}=nt.dimensions,ct=range$1(st);return jsxs(StyledTableContainer,{className:"stTable","data-testid":"stTable",children:[rt&&jsx$1("style",{children:rt}),jsx$1(StyledTableBorder,{children:jsxs(StyledTable,{id:et,"data-testid":"stTableStyledTable",children:[at>0&&generateTableHeader(nt),jsx$1("tbody",{children:ct.length===0?jsx$1("tr",{children:jsx$1(StyledEmptyTableCell,{"data-testid":"stTableStyledEmptyTableCell",colSpan:ut||1,children:"empty"})}):ct.map(pt=>generateTableRow(nt,pt,ut))})]})}),ot&&jsx$1(StyledTableCaption,{children:ot})]})}function generateTableHeader(tt){return jsx$1("thead",{children:getStyledHeaders(tt).map((nt,et)=>jsx$1("tr",{children:nt.map((rt,ot)=>jsx$1(StyledTableCellHeader,{className:rt.cssClass,scope:"col",children:rt.name||" "},ot))},et))})}function generateTableRow(tt,nt,et){return jsx$1("tr",{children:range$1(et).map(rt=>generateTableCell(tt,nt,rt))},nt)}function generateTableCell(tt,nt,et){const{type:rt,content:ot,contentType:at,field:st}=tt.getCell(nt,et),ut=getStyledCell(tt,nt,et),ct=(ut==null?void 0:ut.displayContent)||format(ot,at,st),pt={textAlign:isNumericType(at)?"right":"left"};switch(rt){case DataFrameCellType.INDEX:return jsx$1(StyledTableCellHeader,{scope:"row",id:ut==null?void 0:ut.cssId,className:ut==null?void 0:ut.cssClass,children:ct},et);case DataFrameCellType.DATA:return jsx$1(StyledTableCell,{id:ut==null?void 0:ut.cssId,className:ut==null?void 0:ut.cssClass,style:pt,children:ct},et);default:throw new Error(`Cannot parse type "${rt}".`)}}const ArrowTable$1=reactExports.memo(ArrowTable),StyledDocSummary=newStyled("span",{target:"e1e4p6eq0"})(({theme:tt})=>({"& > *":{marginRight:tt.spacing.sm}})),StyledDocName=newStyled("span",{target:"e1e4p6eq1"})(({theme:tt})=>({fontWeight:tt.fontWeights.bold})),StyledDocType=newStyled("span",{target:"e1e4p6eq2"})(({theme:tt})=>({color:tt.colors.docStringTypeText})),StyledDocValue=newStyled("span",{target:"e1e4p6eq3"})(),StyledDocContainer=newStyled("span",{target:"e1e4p6eq4"})(({theme:tt})=>({display:"flex",flexDirection:"column",borderRadius:tt.radii.default,border:`${tt.sizes.borderWidth} solid ${tt.colors.borderColor}`,fontFamily:tt.genericFonts.codeFont,fontSize:tt.fontSizes.sm})),StyledDocHeader=newStyled("div",{target:"e1e4p6eq5"})(({theme:tt})=>({padding:`${tt.spacing.sm} ${tt.spacing.lg}`,backgroundColor:tt.colors.docStringContainerBackground,borderBottom:`${tt.sizes.borderWidth} solid ${tt.colors.borderColorLight}`,borderTopLeftRadius:tt.radii.default,borderTopRightRadius:tt.radii.default,fontSize:tt.fontSizes.sm,overflow:["auto","overlay"]})),StyledDocString=newStyled("div",{target:"e1e4p6eq6"})(({theme:tt})=>({whiteSpace:"pre",overflow:["auto","overlay"],maxHeight:"30.5rem",padding:`${tt.spacing.sm} ${tt.spacing.lg}`,fontSize:tt.fontSizes.sm,"&:not(:last-child)":{borderBottom:`${tt.sizes.borderWidth} solid ${tt.colors.borderColorLight}`}})),StyledMembersTable=newStyled("table",{target:"e1e4p6eq7"})(({theme:tt})=>({width:"100%",fontSize:tt.fontSizes.twoSm,backgroundColor:tt.colors.docStringContainerBackground,tableLayout:"fixed",borderCollapse:"collapse"})),StyledMembersRow=newStyled("tr",{target:"e1e4p6eq8"})(({theme:tt})=>({"&:not(:last-child)":{borderBottom:`${tt.sizes.borderWidth} dotted ${tt.colors.borderColorLight}`}})),StyledMembersSummaryCell=newStyled("td",{target:"e1e4p6eq9"})(({theme:tt})=>({width:"30%",overflow:["auto","overlay"],padding:`${tt.spacing.sm} ${tt.spacing.lg}`,"& > *":{marginRight:tt.spacing.sm}})),StyledMembersDetailsCell=newStyled("td",{target:"e1e4p6eq10"})(({theme:tt})=>({width:"70%",overflow:["auto","overlay"],padding:`${tt.spacing.sm} ${tt.spacing.lg}`}));function DocString({width:tt,element:nt}){const{name:et,type:rt,value:ot,docString:at,members:st}=nt;return jsxs(StyledDocContainer,{className:"stHelp","data-testid":"stHelp",width:tt,children:[jsx$1(StyledDocHeader,{children:jsxs(StyledDocSummary,{children:[et?jsx$1(StyledDocName,{"data-testid":"stHelpName",children:et}):null,rt?jsx$1(StyledDocType,{"data-testid":"stHelpType",children:rt}):null,ot?jsx$1(StyledDocValue,{"data-testid":"stHelpValue",children:ot}):null]})}),jsx$1(StyledDocString,{"data-testid":"stHelpDoc",children:at||"No docs available"}),st.length>0?jsx$1(StyledMembersTable,{"data-testid":"stHelpMembersTable",children:st.map(ut=>jsx$1(Member,{member:ut},ut.name))}):null]})}function Member({member:tt}){const{name:nt,type:et,value:rt,docString:ot}=tt;return jsxs(StyledMembersRow,{"data-testid":"stHelpMember",children:[jsxs(StyledMembersSummaryCell,{children:[nt?jsx$1(StyledDocName,{"data-testid":"stHelpMemberDocName",children:nt}):null,et?jsx$1(StyledDocType,{"data-testid":"stHelpMemberDocType",children:et}):null]}),jsx$1(StyledMembersDetailsCell,{children:rt?jsx$1(StyledDocValue,{"data-testid":"stHelpMemberDocValue",children:rt}):jsx$1(StyledDocValue,{"data-testid":"stHelpMemberDocString",children:ot||"No docs available"})})]})}const StyledStackTraceRow=newStyled("div",{target:"e1msg78q0"})(({theme:tt})=>({marginTop:tt.spacing.sm,"&:first-of-type":{marginTop:0}})),StyledMessageType=newStyled("span",{target:"e1msg78q1"})(({theme:tt})=>({fontWeight:tt.fontWeights.bold})),StyledStackTraceTitle=newStyled("div",{target:"e1msg78q2"})(({theme:tt})=>({marginTop:`calc(${tt.spacing.sm} + ${tt.spacing.xl})`,marginBottom:tt.spacing.sm})),StyledStackTraceContent=newStyled("div",{target:"e1msg78q3"})({display:"inline-block",minWidth:"100%"}),StyledExceptionMessage=newStyled("div",{target:"e1msg78q4"})({wordWrap:"break-word"});function isNonEmptyString(tt){return notNullOrUndefined(tt)&&tt!==""}function ExceptionMessage({type:tt,message:nt,messageIsMarkdown:et}){if(et){let rt=nt??"";return tt.length!==0&&(rt=`**${tt}**: ${rt}`),jsx$1(StreamlitMarkdown$1,{source:rt,allowHTML:!1})}return jsxs(Fragment,{children:[jsx$1(StyledMessageType,{children:tt}),tt.length!==0&&": ",isNonEmptyString(nt)?nt:null]})}function StackTrace({stackTrace:tt}){return jsxs(Fragment,{children:[jsx$1(StyledStackTraceTitle,{children:"Traceback:"}),jsx$1(StyledStackTrace,{children:jsx$1(StyledStackTraceContent,{children:jsx$1(StyledCode,{children:tt.map((nt,et)=>jsx$1(StyledStackTraceRow,{"data-testid":"stExceptionTraceRow",children:nt},et))})})})]})}function ExceptionElement({element:tt,width:nt}){return jsx$1("div",{className:"stException","data-testid":"stException",children:jsxs(AlertContainer,{kind:tt.isWarning?Kind.WARNING:Kind.ERROR,width:nt,children:[jsx$1(StyledExceptionMessage,{"data-testid":"stExceptionMessage",children:jsx$1(ExceptionMessage,{type:tt.type,message:tt.message,messageIsMarkdown:tt.messageIsMarkdown})}),tt.stackTrace&&tt.stackTrace.length>0?jsx$1(StackTrace,{stackTrace:tt.stackTrace}):null]})})}var Space_Separator=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,ID_Start=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,ID_Continue=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,unicode={Space_Separator,ID_Start,ID_Continue},util$3={isSpaceSeparator(tt){return typeof tt=="string"&&unicode.Space_Separator.test(tt)},isIdStartChar(tt){return typeof tt=="string"&&(tt>="a"&&tt<="z"||tt>="A"&&tt<="Z"||tt==="$"||tt==="_"||unicode.ID_Start.test(tt))},isIdContinueChar(tt){return typeof tt=="string"&&(tt>="a"&&tt<="z"||tt>="A"&&tt<="Z"||tt>="0"&&tt<="9"||tt==="$"||tt==="_"||tt===""||tt===""||unicode.ID_Continue.test(tt))},isDigit(tt){return typeof tt=="string"&&/[0-9]/.test(tt)},isHexDigit(tt){return typeof tt=="string"&&/[0-9A-Fa-f]/.test(tt)}};let source,parseState,stack,pos,line,column,token$1,key,root$2;var parse$2=function tt(nt,et){source=String(nt),parseState="start",stack=[],pos=0,line=1,column=0,token$1=void 0,key=void 0,root$2=void 0;do token$1=lex(),parseStates[parseState]();while(token$1.type!=="eof");return typeof et=="function"?internalize({"":root$2},"",et):root$2};function internalize(tt,nt,et){const rt=tt[nt];if(rt!=null&&typeof rt=="object")if(Array.isArray(rt))for(let ot=0;ot<rt.length;ot++){const at=String(ot),st=internalize(rt,at,et);st===void 0?delete rt[at]:Object.defineProperty(rt,at,{value:st,writable:!0,enumerable:!0,configurable:!0})}else for(const ot in rt){const at=internalize(rt,ot,et);at===void 0?delete rt[ot]:Object.defineProperty(rt,ot,{value:at,writable:!0,enumerable:!0,configurable:!0})}return et.call(tt,nt,rt)}let lexState,buffer,doubleQuote,sign,c;function lex(){for(lexState="default",buffer="",doubleQuote=!1,sign=1;;){c=peek();const tt=lexStates[lexState]();if(tt)return tt}}function peek(){if(source[pos])return String.fromCodePoint(source.codePointAt(pos))}function read(){const tt=peek();return tt===`
|
646
646
|
`?(line++,column=0):tt?column+=tt.length:column++,tt&&(pos+=tt.length),tt}const lexStates={default(){switch(c){case" ":case"\v":case"\f":case" ":case" ":case"\uFEFF":case`
|
647
647
|
`:case"\r":case"\u2028":case"\u2029":read();return;case"/":read(),lexState="comment";return;case void 0:return read(),newToken("eof")}if(util$3.isSpaceSeparator(c)){read();return}return lexStates[parseState]()},comment(){switch(c){case"*":read(),lexState="multiLineComment";return;case"/":read(),lexState="singleLineComment";return}throw invalidChar(read())},multiLineComment(){switch(c){case"*":read(),lexState="multiLineCommentAsterisk";return;case void 0:throw invalidChar(read())}read()},multiLineCommentAsterisk(){switch(c){case"*":read();return;case"/":read(),lexState="default";return;case void 0:throw invalidChar(read())}read(),lexState="multiLineComment"},singleLineComment(){switch(c){case`
|
648
648
|
`:case"\r":case"\u2028":case"\u2029":read(),lexState="default";return;case void 0:return read(),newToken("eof")}read()},value(){switch(c){case"{":case"[":return newToken("punctuator",read());case"n":return read(),literal("ull"),newToken("null",null);case"t":return read(),literal("rue"),newToken("boolean",!0);case"f":return read(),literal("alse"),newToken("boolean",!1);case"-":case"+":read()==="-"&&(sign=-1),lexState="sign";return;case".":buffer=read(),lexState="decimalPointLeading";return;case"0":buffer=read(),lexState="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":buffer=read(),lexState="decimalInteger";return;case"I":return read(),literal("nfinity"),newToken("numeric",1/0);case"N":return read(),literal("aN"),newToken("numeric",NaN);case'"':case"'":doubleQuote=read()==='"',buffer="",lexState="string";return}throw invalidChar(read())},identifierNameStartEscape(){if(c!=="u")throw invalidChar(read());read();const tt=unicodeEscape();switch(tt){case"$":case"_":break;default:if(!util$3.isIdStartChar(tt))throw invalidIdentifier();break}buffer+=tt,lexState="identifierName"},identifierName(){switch(c){case"$":case"_":case"":case"":buffer+=read();return;case"\\":read(),lexState="identifierNameEscape";return}if(util$3.isIdContinueChar(c)){buffer+=read();return}return newToken("identifier",buffer)},identifierNameEscape(){if(c!=="u")throw invalidChar(read());read();const tt=unicodeEscape();switch(tt){case"$":case"_":case"":case"":break;default:if(!util$3.isIdContinueChar(tt))throw invalidIdentifier();break}buffer+=tt,lexState="identifierName"},sign(){switch(c){case".":buffer=read(),lexState="decimalPointLeading";return;case"0":buffer=read(),lexState="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":buffer=read(),lexState="decimalInteger";return;case"I":return read(),literal("nfinity"),newToken("numeric",sign*(1/0));case"N":return read(),literal("aN"),newToken("numeric",NaN)}throw invalidChar(read())},zero(){switch(c){case".":buffer+=read(),lexState="decimalPoint";return;case"e":case"E":buffer+=read(),lexState="decimalExponent";return;case"x":case"X":buffer+=read(),lexState="hexadecimal";return}return newToken("numeric",sign*0)},decimalInteger(){switch(c){case".":buffer+=read(),lexState="decimalPoint";return;case"e":case"E":buffer+=read(),lexState="decimalExponent";return}if(util$3.isDigit(c)){buffer+=read();return}return newToken("numeric",sign*Number(buffer))},decimalPointLeading(){if(util$3.isDigit(c)){buffer+=read(),lexState="decimalFraction";return}throw invalidChar(read())},decimalPoint(){switch(c){case"e":case"E":buffer+=read(),lexState="decimalExponent";return}if(util$3.isDigit(c)){buffer+=read(),lexState="decimalFraction";return}return newToken("numeric",sign*Number(buffer))},decimalFraction(){switch(c){case"e":case"E":buffer+=read(),lexState="decimalExponent";return}if(util$3.isDigit(c)){buffer+=read();return}return newToken("numeric",sign*Number(buffer))},decimalExponent(){switch(c){case"+":case"-":buffer+=read(),lexState="decimalExponentSign";return}if(util$3.isDigit(c)){buffer+=read(),lexState="decimalExponentInteger";return}throw invalidChar(read())},decimalExponentSign(){if(util$3.isDigit(c)){buffer+=read(),lexState="decimalExponentInteger";return}throw invalidChar(read())},decimalExponentInteger(){if(util$3.isDigit(c)){buffer+=read();return}return newToken("numeric",sign*Number(buffer))},hexadecimal(){if(util$3.isHexDigit(c)){buffer+=read(),lexState="hexadecimalInteger";return}throw invalidChar(read())},hexadecimalInteger(){if(util$3.isHexDigit(c)){buffer+=read();return}return newToken("numeric",sign*Number(buffer))},string(){switch(c){case"\\":read(),buffer+=escape();return;case'"':if(doubleQuote)return read(),newToken("string",buffer);buffer+=read();return;case"'":if(!doubleQuote)return read(),newToken("string",buffer);buffer+=read();return;case`
|
@@ -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 Lt=!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:[Lt,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.D-Axxgw0.js"),[],import.meta.url)),Balloons=React$1.lazy(()=>__vitePreload(()=>import("./index.BLSTSv7f.js"),__vite__mapDeps([0,1]),import.meta.url)),Snow=React$1.lazy(()=>__vitePreload(()=>import("./index.Cn4twLJI.js"),__vite__mapDeps([2,1]),import.meta.url)),ArrowDataFrame=React$1.lazy(()=>__vitePreload(()=>import("./index.BDtzkwhv.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.CeOuM3pB.js"),__vite__mapDeps([15,6,5,7,16,17,18,4]),import.meta.url)),Toast=React$1.lazy(()=>__vitePreload(()=>import("./index.BjNnwU0F.js"),[],import.meta.url)),BokehChart=React$1.lazy(()=>__vitePreload(()=>import("./index.PvXferS3.js"),[],import.meta.url)),DebouncedBokehChart=debounceRender(BokehChart,100),DeckGlJsonChart=React$1.lazy(()=>__vitePreload(()=>import("./index.C8GKMyxG.js"),__vite__mapDeps([19,10,11,6,5,20,4,16,17,21]),import.meta.url)),GraphVizChart=React$1.lazy(()=>__vitePreload(()=>import("./index.Bjj8dbrN.js"),__vite__mapDeps([22,18,17,6,5]),import.meta.url)),IFrame=React$1.lazy(()=>__vitePreload(()=>import("./index.CSnqL7FE.js"),[],import.meta.url)),ImageList=React$1.lazy(()=>__vitePreload(()=>import("./index.BXIDmZYJ.js"),__vite__mapDeps([23,6,5]),import.meta.url)),LinkButton=React$1.lazy(()=>__vitePreload(()=>import("./index.KrDy5y3p.js"),[],import.meta.url)),PageLink=React$1.lazy(()=>__vitePreload(()=>import("./index.CqdRxVGu.js"),[],import.meta.url)),PlotlyChart=React$1.lazy(()=>__vitePreload(()=>import("./index.BiQBtTGP.js"),__vite__mapDeps([24,4,5]),import.meta.url)),Video=React$1.lazy(()=>__vitePreload(()=>import("./index.Cm0XvfNt.js"),[],import.meta.url)),AudioInput=React$1.lazy(()=>__vitePreload(()=>import("./index.Cm3Q2clw.js"),__vite__mapDeps([25,4,6,26,9,13]),import.meta.url)),Button=React$1.lazy(()=>__vitePreload(()=>import("./index.BFQMhsjo.js"),[],import.meta.url)),ButtonGroup=React$1.lazy(()=>__vitePreload(()=>import("./index.CqNQZi9B.js"),__vite__mapDeps([27,20,4]),import.meta.url)),DownloadButton=React$1.lazy(()=>__vitePreload(()=>import("./index.B5B5DAsT.js"),__vite__mapDeps([28,9]),import.meta.url)),CameraInput=React$1.lazy(()=>__vitePreload(()=>import("./index.DyhG13mI.js"),__vite__mapDeps([29,4,30,31]),import.meta.url)),ChatInput=React$1.lazy(()=>__vitePreload(()=>import("./index.BDK4X_d2.js"),__vite__mapDeps([32,33,34,35,36]),import.meta.url)),Checkbox=React$1.lazy(()=>__vitePreload(()=>import("./index.Bs1A0Yz9.js"),__vite__mapDeps([37,20,4]),import.meta.url)),ColorPicker=React$1.lazy(()=>__vitePreload(()=>import("./index.CdISilgA.js"),__vite__mapDeps([38,20,4]),import.meta.url)),DateInput=React$1.lazy(()=>__vitePreload(()=>import("./index.CSXsntDd.js"),__vite__mapDeps([39,20,4,40,11,12,41,36]),import.meta.url)),Html=React$1.lazy(()=>__vitePreload(()=>import("./index.BHNK3GF6.js"),[],import.meta.url)),Multiselect=React$1.lazy(()=>__vitePreload(()=>import("./index.CSU4ah-Z.js"),__vite__mapDeps([42,20,4]),import.meta.url)),Progress=React$1.lazy(()=>__vitePreload(()=>import("./index.Ba_7Au_r.js"),__vite__mapDeps([43,31]),import.meta.url)),Spinner=React$1.lazy(()=>__vitePreload(()=>import("./index.BHnfxjsW.js"),[],import.meta.url)),Radio=React$1.lazy(()=>__vitePreload(()=>import("./index.C5llicCl.js"),__vite__mapDeps([44,20,4]),import.meta.url)),Selectbox$1=React$1.lazy(()=>__vitePreload(()=>import("./index.DGisaPeN.js"),__vite__mapDeps([45,20,4]),import.meta.url)),Slider$1=React$1.lazy(()=>__vitePreload(()=>import("./index.-XYuQlg3.js"),__vite__mapDeps([46,8,20,4]),import.meta.url)),FileUploader=React$1.lazy(()=>__vitePreload(()=>import("./index.DnHxDAnh.js"),__vite__mapDeps([47,4,31,26,30]),import.meta.url)),TextArea=React$1.lazy(()=>__vitePreload(()=>import("./index.DMUcVhPY.js"),__vite__mapDeps([48,49,50,34,33,20,4,35,36]),import.meta.url)),TextInput=React$1.lazy(()=>__vitePreload(()=>import("./index.Dy-_rPOY.js"),__vite__mapDeps([51,49,50,34,20,4,33,41,36]),import.meta.url)),TimeInput=React$1.lazy(()=>__vitePreload(()=>import("./index.B_91y3ES.js"),__vite__mapDeps([52,20,4,40,11,12]),import.meta.url)),NumberInput=React$1.lazy(()=>__vitePreload(()=>import("./index.BbqzVelh.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,{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.BOaF1pd3.js"),[],import.meta.url)),Balloons=React$1.lazy(()=>__vitePreload(()=>import("./index.DxAYNSu8.js"),__vite__mapDeps([0,1]),import.meta.url)),Snow=React$1.lazy(()=>__vitePreload(()=>import("./index.DqwYtic0.js"),__vite__mapDeps([2,1]),import.meta.url)),ArrowDataFrame=React$1.lazy(()=>__vitePreload(()=>import("./index.CcAtzCnX.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.DoxwX9TA.js"),__vite__mapDeps([15,6,5,7,16,17,18,4]),import.meta.url)),Toast=React$1.lazy(()=>__vitePreload(()=>import("./index.d8-RPUlf.js"),[],import.meta.url)),BokehChart=React$1.lazy(()=>__vitePreload(()=>import("./index.BZACNIPy.js"),[],import.meta.url)),DebouncedBokehChart=debounceRender(BokehChart,100),DeckGlJsonChart=React$1.lazy(()=>__vitePreload(()=>import("./index.CGcb6vEw.js"),__vite__mapDeps([19,10,11,6,5,20,4,16,17,21]),import.meta.url)),GraphVizChart=React$1.lazy(()=>__vitePreload(()=>import("./index.BBMRAwlY.js"),__vite__mapDeps([22,18,17,6,5]),import.meta.url)),IFrame=React$1.lazy(()=>__vitePreload(()=>import("./index.DOp8WWEB.js"),[],import.meta.url)),ImageList=React$1.lazy(()=>__vitePreload(()=>import("./index.qmgXiJ18.js"),__vite__mapDeps([23,6,5]),import.meta.url)),LinkButton=React$1.lazy(()=>__vitePreload(()=>import("./index.DHthJf6z.js"),[],import.meta.url)),PageLink=React$1.lazy(()=>__vitePreload(()=>import("./index.BvFiU2Cj.js"),[],import.meta.url)),PlotlyChart=React$1.lazy(()=>__vitePreload(()=>import("./index.UG0Sy7w3.js"),__vite__mapDeps([24,4,5]),import.meta.url)),Video=React$1.lazy(()=>__vitePreload(()=>import("./index.CQ7Y6jj1.js"),[],import.meta.url)),AudioInput=React$1.lazy(()=>__vitePreload(()=>import("./index.CIKFC12n.js"),__vite__mapDeps([25,4,6,26,9,13]),import.meta.url)),Button=React$1.lazy(()=>__vitePreload(()=>import("./index.C3hZcowl.js"),[],import.meta.url)),ButtonGroup=React$1.lazy(()=>__vitePreload(()=>import("./index.xmd7bHOh.js"),__vite__mapDeps([27,20,4]),import.meta.url)),DownloadButton=React$1.lazy(()=>__vitePreload(()=>import("./index.DdMp70lp.js"),__vite__mapDeps([28,9]),import.meta.url)),CameraInput=React$1.lazy(()=>__vitePreload(()=>import("./index.CxVERd8N.js"),__vite__mapDeps([29,4,30,31]),import.meta.url)),ChatInput=React$1.lazy(()=>__vitePreload(()=>import("./index.DuBLm9ul.js"),__vite__mapDeps([32,33,34,35,36]),import.meta.url)),Checkbox=React$1.lazy(()=>__vitePreload(()=>import("./index.B56k54Px.js"),__vite__mapDeps([37,20,4]),import.meta.url)),ColorPicker=React$1.lazy(()=>__vitePreload(()=>import("./index.B7TErKDq.js"),__vite__mapDeps([38,20,4]),import.meta.url)),DateInput=React$1.lazy(()=>__vitePreload(()=>import("./index.CdD4T5ia.js"),__vite__mapDeps([39,20,4,40,11,12,41,36]),import.meta.url)),Html=React$1.lazy(()=>__vitePreload(()=>import("./index.DqFVIXyV.js"),[],import.meta.url)),Multiselect=React$1.lazy(()=>__vitePreload(()=>import("./index.B3hBEIu8.js"),__vite__mapDeps([42,20,4]),import.meta.url)),Progress=React$1.lazy(()=>__vitePreload(()=>import("./index.Dc5AjA6K.js"),__vite__mapDeps([43,31]),import.meta.url)),Spinner=React$1.lazy(()=>__vitePreload(()=>import("./index.CyixjHVj.js"),[],import.meta.url)),Radio=React$1.lazy(()=>__vitePreload(()=>import("./index.DCPA8CBQ.js"),__vite__mapDeps([44,20,4]),import.meta.url)),Selectbox$1=React$1.lazy(()=>__vitePreload(()=>import("./index.BpkKw-EE.js"),__vite__mapDeps([45,20,4]),import.meta.url)),Slider$1=React$1.lazy(()=>__vitePreload(()=>import("./index.CbXquzx4.js"),__vite__mapDeps([46,8,20,4]),import.meta.url)),FileUploader=React$1.lazy(()=>__vitePreload(()=>import("./index.BSBaMBDf.js"),__vite__mapDeps([47,4,31,26,30]),import.meta.url)),TextArea=React$1.lazy(()=>__vitePreload(()=>import("./index.CWnLDBO4.js"),__vite__mapDeps([48,49,50,34,33,20,4,35,36]),import.meta.url)),TextInput=React$1.lazy(()=>__vitePreload(()=>import("./index.BWKboqrD.js"),__vite__mapDeps([51,49,50,34,20,4,33,41,36]),import.meta.url)),TimeInput=React$1.lazy(()=>__vitePreload(()=>import("./index.s016NW7I.js"),__vite__mapDeps([52,20,4,40,11,12]),import.meta.url)),NumberInput=React$1.lazy(()=>__vitePreload(()=>import("./index.2gId-hkY.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,7 +739,7 @@ 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",Lt="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},Ft=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(Ft(Nt[Xt][d0],e0))return Xt===st?rt:Xt}else if(Ft(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,Lt],[Mt,At]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[bt,[mt,Lt],[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,Lt=Ct===0||Math.abs(Rt-vt)<=Ct?Rt:vt;At=wt,vt=Lt}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:"e1exy9mp0"})(({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:"e1exy9mp1"})({position:"relative"}),StyledSidebarNavItems=newStyled("ul",{target:"e1exy9mp2"})(({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:"e1exy9mp3"})({display:"flex",flexDirection:"column"}),StyledSidebarNavIcon=newStyled("span",{target:"e1exy9mp4"})(({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:"e1exy9mp5"})(({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:"e1exy9mp6"})(({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:"e1exy9mp7"})(({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:"e1exy9mp8"})(({})=>({position:"relative",height:"100%",width:"100%",overflow:["auto","overlay"]})),RESIZE_HANDLE_WIDTH="8px",StyledResizeHandle=newStyled("div",{target:"e1exy9mp9"})(({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:"e1exy9mp10"})(({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:"e1exy9mp11"})(({})=>({"&: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:"e1exy9mp12"})(({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:"e1exy9mp13"})(({theme:tt})=>({height:tt.sizes.largeLogoHeight})),StyledSidebarOpenContainer=newStyled("div",{target:"e1exy9mp14"})(({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:"static"}})),StyledOpenSidebarButton=newStyled("div",{target:"e1exy9mp15"})(({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:"e1exy9mp16"})(({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:"e1exy9mp17"})(({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:"e1exy9mp18"})(({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:"e1exy9mp19"})(({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:Lt}=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),()=>{Lt(b0)}),[b0,wt,Lt]);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",Lt="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},Ft=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(Ft(Nt[Xt][d0],e0))return Xt===st?rt:Xt}else if(Ft(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,Lt],[Mt,At]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[bt,[mt,Lt],[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,Lt=Ct===0||Math.abs(Rt-vt)<=Ct?Rt:vt;At=wt,vt=Lt}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:Lt}=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),()=>{Lt(b0)}),[b0,wt,Lt]);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,
|
@@ -788,11 +788,11 @@ The app's main file \`${tt}\` has
|
|
788
788
|
not been pushed to GitHub. Please add it to continue.
|
789
789
|
`,allowHTML:!1})}}const StyledParagraph=newStyled("p",{target:"edgwnvj0"})({textAlign:"justify"});function NoRepositoryDetected(){return{title:"Unable to deploy",body:jsxs(StyledParagraph,{children:["The app’s code is not connected to a remote GitHub repository. To deploy on Streamlit Community Cloud, please put your code in a GitHub repository and publish the current branch. Read more in"," ",jsx$1("a",{href:STREAMLIT_COMMUNITY_CLOUD_DOCS_URL,rel:"noopener noreferrer",target:"_blank",children:"our documentation"}),"."]})}}function ModalBody({children:tt}){const{colors:nt,fontSizes:et,spacing:rt}=useTheme();return jsx$1(ModalBody$2,{style:{marginTop:rt.none,marginLeft:rt.none,marginRight:rt.none,marginBottom:rt.none,paddingTop:rt.md,paddingRight:rt.none,paddingBottom:rt.none,paddingLeft:rt.none,color:nt.bodyText,fontSize:et.md,overflowY:"auto"},children:tt})}function DeployModal(tt){const{children:nt,onClose:et}=tt;return jsxs(Modal,{isOpen:!0,closeable:!0,onClose:et,size:"auto",children:[jsx$1(ModalHeader,{children:"Deploy this app using..."}),jsx$1(ModalBody,{children:nt})]})}function DeployCard(tt){const{colors:nt,spacing:et,radii:rt,breakpoints:ot,sizes:at}=useTheme(),{children:st}=tt;return jsx$1(Card,{overrides:{Root:{style:{borderTopWidth:at.borderWidth,borderBottomWidth:at.borderWidth,borderLeftWidth:at.borderWidth,borderRightWidth:at.borderWidth,borderTopStyle:"solid",borderBottomStyle:"none",borderLeftStyle:"none",borderRightStyle:"solid",borderTopColor:nt.borderColor,borderBottomColor:nt.borderColor,borderLeftColor:nt.borderColor,borderRightColor:nt.borderColor,borderTopLeftRadius:"none",borderTopRightRadius:"none",borderBottomLeftRadius:"none",borderBottomRightRadius:"none",":last-child":{borderRightStyle:"none",borderBottomRightRadius:rt.xl},":first-child":{borderBottomLeftRadius:rt.xl},[`@media (max-width: ${ot.md})`]:{":last-child":{borderBottomLeftRadius:rt.xl}}}},Contents:{style:{marginBottom:0,marginTop:0,marginLeft:0,marginRight:0,height:"100%"}},Body:{style:{padding:et.twoXL,marginBottom:0,marginTop:0,marginLeft:0,marginRight:0,height:"100%",display:"flex",flexDirection:"column",[`@media (max-width: ${ot.md})`]:{padding:et.xl}}}},children:st})}const Checkmark="data:image/svg+xml,%3csvg%20width='12'%20height='9'%20viewBox='0%200%2012%209'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4.00009%206.78L1.68676%204.46667C1.42676%204.20667%201.00676%204.20667%200.746758%204.46667C0.486758%204.72667%200.486758%205.14667%200.746758%205.40667L3.53342%208.19334C3.79342%208.45334%204.21342%208.45334%204.47342%208.19334L11.5268%201.14C11.7868%200.880005%2011.7868%200.460005%2011.5268%200.200005C11.2668%20-0.0599951%2010.8468%20-0.0599951%2010.5868%200.200005L4.00009%206.78Z'%20fill='%23808495'/%3e%3c/svg%3e",StyledHeader=newStyled("div",{target:"edlp5wu0"})(({theme:tt})=>({fontFamily:tt.fonts.sansSerif,fontWeight:tt.fontWeights.bold,fontSize:tt.fontSizes.lg,color:tt.colors.grey90,marginTop:tt.spacing.twoXL,marginBottom:tt.spacing.twoXS,[`@media (max-width: ${tt.breakpoints.md})`]:{marginTop:tt.spacing.md}})),StyledSubheader=newStyled("div",{target:"edlp5wu1"})(({theme:tt})=>({fontFamily:tt.fonts.sansSerif,fontWeight:tt.fontWeights.normal,fontSize:tt.fontSizes.md,color:tt.colors.grey90,marginTop:tt.spacing.twoXS,marginBottom:tt.spacing.md,[`@media (max-width: ${tt.breakpoints.md})`]:{marginTop:tt.spacing.md}})),StyledCardContainer=newStyled("div",{target:"edlp5wu2"})(({theme:tt})=>({display:"grid",maxWidth:`calc(1.25 * ${tt.sizes.contentMaxWidth})`,gridTemplateColumns:"1fr 1fr 1fr",gridGap:tt.spacing.none,[`@media (max-width: ${tt.breakpoints.md})`]:{gridTemplateColumns:"1fr"}})),StyledElement=newStyled("div",{target:"edlp5wu3"})(({theme:tt})=>({display:"inline-flex",marginTop:tt.spacing.sm,"& > span":{fontFamily:tt.fonts.sansSerif,fontWeight:tt.fontWeights.normal,fontSize:tt.fontSizes.md,marginLeft:tt.spacing.twoXL,color:tt.colors.gray70},"& > img":{position:"absolute",marginTop:tt.spacing.sm}})),StyledActionsWrapper=newStyled("div",{target:"edlp5wu4"})(({theme:tt})=>({display:"flex",marginTop:tt.spacing.threeXL,"& > button":{marginRight:tt.spacing.twoXL},[`@media (max-width: ${tt.breakpoints.md})`]:{marginTop:tt.spacing.xl}}));function DeployListElement(tt){const{children:nt}=tt;return jsxs(StyledElement,{children:[jsx$1("img",{src:Checkmark,alt:"Checkmark"}),jsx$1("span",{children:nt})]})}const{GitStates}=GitInfo,openUrl=tt=>{window.open(tt,"_blank")},getDeployAppUrl=tt=>{if(tt){const nt=new URL(DEPLOY_URL);return nt.searchParams.set("repository",tt.repository??""),nt.searchParams.set("branch",tt.branch??""),nt.searchParams.set("mainModule",tt.module??""),nt.toString()}return STREAMLIT_CLOUD_URL};function DeployDialog(tt){const{gitInfo:nt}=reactExports.useContext(AppContext),{onClose:et,metricsMgr:rt}=tt,ot=reactExports.useCallback(()=>{const{showDeployError:at,isDeployErrorModalOpen:st,metricsMgr:ut}=tt;if(ut.enqueue("menuClick",{label:"deployButtonInDialog"}),!nt){const Mt=NoRepositoryDetected();at(Mt.title,Mt.body);return}const{repository:ct,branch:pt,module:dt,untrackedFiles:ft,state:bt}=nt;if((!ct||!pt||!dt)&&bt===GitStates.DEFAULT){const Mt=NoRepositoryDetected();at(Mt.title,Mt.body);return}if(bt===GitStates.HEAD_DETACHED){const Mt=DetachedHead();at(Mt.title,Mt.body);return}if(dt&&(ft!=null&&ft.includes(dt))){const Mt=ModuleIsNotAdded(dt);at(Mt.title,Mt.body);return}st&&et(),openUrl(getDeployAppUrl(nt))},[tt,et,nt]);return jsx$1(DeployModal,{onClose:et,children:jsxs(StyledCardContainer,{children:[jsxs(DeployCard,{children:[jsxs(Body,{style:{flexGrow:1},children:[jsx$1("img",{src:StreamlitLogo,alt:"Streamlit Logo","data-testid":"stDeployDialogCommunityCloudIcon"}),jsx$1(StyledHeader,{children:"Streamlit Community Cloud"}),jsx$1(StyledSubheader,{children:"For community, always free"}),jsx$1(DeployListElement,{children:"For personal hobbies and learning"}),jsx$1(DeployListElement,{children:"Deploy unlimited public apps"}),jsx$1(DeployListElement,{children:"Explore and learn from Streamlit’s community and popular apps"})]}),jsx$1(Action,{children:jsxs(StyledActionsWrapper,{children:[jsx$1(BaseButton,{kind:BaseButtonKind.PRIMARY,onClick:ot,children:"Deploy now"}),jsx$1(BaseButton,{onClick:()=>{rt.enqueue("menuClick",{label:"readMoreCommunityCloudInDeployDialog"}),openUrl(STREAMLIT_COMMUNITY_CLOUD_DOCS_URL)},kind:BaseButtonKind.MINIMAL,children:"Learn more"})]})})]}),jsxs(DeployCard,{children:[jsxs(Body,{style:{flexGrow:1},children:[jsx$1("img",{src:Snowflake,alt:"Snowflake","data-testid":"stDeployDialogSnowflakeDeploymentIcon"}),jsx$1(StyledHeader,{children:"Snowflake"}),jsx$1(StyledSubheader,{children:"For enterprise"}),jsx$1(DeployListElement,{children:"Enterprise-level security, support, and fully managed infrastructure"}),jsx$1(DeployListElement,{children:"Deploy unlimited private apps with role-based sharing"}),jsx$1(DeployListElement,{children:"Integrate with Snowflake’s full data stack"})]}),jsx$1(Action,{children:jsxs(StyledActionsWrapper,{children:[jsx$1(BaseButton,{kind:BaseButtonKind.SECONDARY,onClick:()=>{rt.enqueue("menuClick",{label:"startTrialInDeployDialog"}),openUrl(SNOWFLAKE_TRIAL_URL)},children:"Start trial"}),jsx$1(BaseButton,{onClick:()=>{rt.enqueue("menuClick",{label:"learnMoreSnowflakeInDeployDialog"}),openUrl(SNOWFLAKE_LEARN_MORE_URL)},kind:BaseButtonKind.MINIMAL,children:"Learn more"})]})})]}),jsxs(DeployCard,{children:[jsxs(Body,{style:{flexGrow:2},children:[jsx$1("img",{src:Rocket,alt:"Rocket","data-testid":"stDeployDialogCustomDeploymentIcon"}),jsx$1(StyledHeader,{children:"Other platforms"}),jsx$1(StyledSubheader,{children:"For custom deployment "}),jsx$1(DeployListElement,{children:"Deploy on your own hardware or cloud service"}),jsx$1(DeployListElement,{children:"Set up and maintain your own authentication, resources, and costs"})]}),jsx$1(Action,{children:jsx$1(StyledActionsWrapper,{children:jsx$1(BaseButton,{onClick:()=>{rt.enqueue("menuClick",{label:"readMoreDeployTutorialInDeployDialog"}),openUrl(STREAMLIT_DEPLOY_TUTORIAL_URL)},kind:BaseButtonKind.MINIMAL,children:"Learn more"})})})]})]})})}var DialogType;(function(tt){tt.ABOUT="about",tt.CLEAR_CACHE="clearCache",tt.SETTINGS="settings",tt.SCRIPT_COMPILE_ERROR="scriptCompileError",tt.THEME_CREATOR="themeCreator",tt.WARNING="warning",tt.DEPLOY_ERROR="deployError",tt.DEPLOY_DIALOG="deployDialog"})(DialogType||(DialogType={}));function StreamlitDialog(tt){switch(tt.type){case"about":return aboutDialog(tt);case"clearCache":return clearCacheDialog(tt);case"settings":return settingsDialog(tt);case"scriptCompileError":return scriptCompileErrorDialog(tt);case"themeCreator":return jsx$1(ThemeCreatorDialog,{...tt});case"warning":return warningDialog(tt);case"deployDialog":return jsx$1(DeployDialog,{...tt});case"deployError":return deployErrorDialog(tt);case void 0:return noDialog(tt);default:return typeNotRecognizedDialog(tt)}}function aboutDialog(tt){if(tt.aboutSectionMd){const nt={overflowY:"auto",overflowX:"hidden",maxHeight:"35vh"},et=`
|
790
790
|
`,rt=[`Made with Streamlit v${tt.sessionInfo.current.streamlitVersion}`,STREAMLIT_HOME_URL,`Copyright ${new Date().getFullYear()} Snowflake Inc. All rights reserved.`].join(et),ot=`${tt.aboutSectionMd} ${et} ${et} ${rt}`;return jsxs(Modal,{isOpen:!0,onClose:tt.onClose,children:[jsx$1(ModalHeader,{children:"About"}),jsx$1(ModalBody$1,{children:jsx$1(StyledAboutInfo,{children:jsx$1(StreamlitMarkdown$1,{source:ot,allowHTML:!1,style:nt})})})]})}return jsxs(Modal,{isOpen:!0,onClose:tt.onClose,children:[jsx$1(ModalHeader,{children:"Made with"}),jsx$1(ModalBody$1,{children:jsxs("div",{children:[tt.sessionInfo.isSet&&jsxs(Fragment,{children:["Streamlit v",tt.sessionInfo.current.streamlitVersion,jsx$1("br",{})]}),jsx$1(StyledAboutLink,{href:STREAMLIT_HOME_URL,children:STREAMLIT_HOME_URL}),jsx$1("br",{}),"Copyright ",new Date().getFullYear()," Snowflake Inc. All rights reserved."]})})]})}function clearCacheDialog(tt){const et=["**Are you sure you want to clear the app's function caches?**","This will remove all cached entries from functions using","`@st.cache_data` and `@st.cache_resource`."].join(`
|
791
|
-
`);return jsx$1("div",{"data-testid":"stClearCacheDialog",children:jsxs(Modal,{isOpen:!0,onClose:tt.onClose,children:[jsx$1(ModalHeader,{children:"Clear caches"}),jsx$1(ModalBody$1,{children:jsx$1(StreamlitMarkdown$1,{source:et,allowHTML:!1})}),jsxs(ModalFooter,{children:[jsx$1(ModalButton,{kind:BaseButtonKind.GHOST,onClick:tt.onClose,children:"Cancel"}),jsx$1(ModalButton,{autoFocus:!0,kind:BaseButtonKind.SECONDARY,onClick:tt.confirmCallback,children:"Clear caches"})]})]})})}function scriptCompileErrorDialog(tt){var nt;return jsxs(Modal,{isOpen:!0,onClose:tt.onClose,size:"auto",autoFocus:!1,children:[jsx$1(ModalHeader,{children:"Script execution error"}),jsx$1(ModalBody$1,{children:jsx$1(StreamlitSyntaxHighlighter$1,{showLineNumbers:!1,wrapLines:!1,children:(nt=tt.exception)!=null&&nt.message?tt.exception.message:"No message"})}),jsx$1(ModalFooter,{children:jsx$1(ModalButton,{kind:BaseButtonKind.SECONDARY,onClick:tt.onClose,children:"Close"})})]})}function settingsDialog(tt){return jsx$1(SettingsDialog,{...tt})}function warningDialog(tt){return jsxs(Modal,{isOpen:!0,onClose:tt.onClose,children:[jsx$1(ModalHeader,{children:tt.title}),jsx$1(ModalBody$1,{children:tt.msg})]})}function deployErrorDialog({title:tt,msg:nt,onClose:et,onContinue:rt,onTryAgain:ot}){const at=()=>{et(),rt&&rt()};return jsxs(Modal,{isOpen:!0,onClose:et,children:[jsx$1(ModalHeader,{children:tt}),jsx$1(ModalBody$1,{children:jsx$1(StyledDeployErrorContent,{children:nt})}),jsxs(ModalFooter,{children:[jsx$1(ModalButton,{kind:BaseButtonKind.GHOST,onClick:ot,children:"Try again"}),jsx$1(ModalButton,{kind:BaseButtonKind.SECONDARY,onClick:at,children:rt?"Continue anyway":"Close"})]})]})}function noDialog({onClose:tt}){return jsx$1(Modal,{isOpen:!1,onClose:tt})}function typeNotRecognizedDialog(tt){return jsx$1(Modal,{isOpen:!0,onClose:tt.onClose,children:jsx$1(ModalBody$1,{children:`Dialog type "${tt.type}" not recognized.`})})}function bind(tt,nt){return function(){return tt.apply(nt,arguments)}}const{toString}=Object.prototype,{getPrototypeOf}=Object,kindOf=(tt=>nt=>{const et=toString.call(nt);return tt[et]||(tt[et]=et.slice(8,-1).toLowerCase())})(Object.create(null)),kindOfTest=tt=>(tt=tt.toLowerCase(),nt=>kindOf(nt)===tt),typeOfTest=tt=>nt=>typeof nt===tt,{isArray}=Array,isUndefined=typeOfTest("undefined");function isBuffer(tt){return tt!==null&&!isUndefined(tt)&&tt.constructor!==null&&!isUndefined(tt.constructor)&&isFunction(tt.constructor.isBuffer)&&tt.constructor.isBuffer(tt)}const isArrayBuffer=kindOfTest("ArrayBuffer");function isArrayBufferView(tt){let nt;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?nt=ArrayBuffer.isView(tt):nt=tt&&tt.buffer&&isArrayBuffer(tt.buffer),nt}const isString=typeOfTest("string"),isFunction=typeOfTest("function"),isNumber=typeOfTest("number"),isObject$1=tt=>tt!==null&&typeof tt=="object",isBoolean=tt=>tt===!0||tt===!1,isPlainObject=tt=>{if(kindOf(tt)!=="object")return!1;const nt=getPrototypeOf(tt);return(nt===null||nt===Object.prototype||Object.getPrototypeOf(nt)===null)&&!(Symbol.toStringTag in tt)&&!(Symbol.iterator in tt)},isDate=kindOfTest("Date"),isFile=kindOfTest("File"),isBlob=kindOfTest("Blob"),isFileList=kindOfTest("FileList"),isStream=tt=>isObject$1(tt)&&isFunction(tt.pipe),isFormData=tt=>{let nt;return tt&&(typeof FormData=="function"&&tt instanceof FormData||isFunction(tt.append)&&((nt=kindOf(tt))==="formdata"||nt==="object"&&isFunction(tt.toString)&&tt.toString()==="[object FormData]"))},isURLSearchParams=kindOfTest("URLSearchParams"),[isReadableStream,isRequest,isResponse,isHeaders]=["ReadableStream","Request","Response","Headers"].map(kindOfTest),trim=tt=>tt.trim?tt.trim():tt.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function forEach(tt,nt,{allOwnKeys:et=!1}={}){if(tt===null||typeof tt>"u")return;let rt,ot;if(typeof tt!="object"&&(tt=[tt]),isArray(tt))for(rt=0,ot=tt.length;rt<ot;rt++)nt.call(null,tt[rt],rt,tt);else{const at=et?Object.getOwnPropertyNames(tt):Object.keys(tt),st=at.length;let ut;for(rt=0;rt<st;rt++)ut=at[rt],nt.call(null,tt[ut],ut,tt)}}function findKey(tt,nt){nt=nt.toLowerCase();const et=Object.keys(tt);let rt=et.length,ot;for(;rt-- >0;)if(ot=et[rt],nt===ot.toLowerCase())return ot;return null}const _global=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,isContextDefined=tt=>!isUndefined(tt)&&tt!==_global;function merge(){const{caseless:tt}=isContextDefined(this)&&this||{},nt={},et=(rt,ot)=>{const at=tt&&findKey(nt,ot)||ot;isPlainObject(nt[at])&&isPlainObject(rt)?nt[at]=merge(nt[at],rt):isPlainObject(rt)?nt[at]=merge({},rt):isArray(rt)?nt[at]=rt.slice():nt[at]=rt};for(let rt=0,ot=arguments.length;rt<ot;rt++)arguments[rt]&&forEach(arguments[rt],et);return nt}const extend=(tt,nt,et,{allOwnKeys:rt}={})=>(forEach(nt,(ot,at)=>{et&&isFunction(ot)?tt[at]=bind(ot,et):tt[at]=ot},{allOwnKeys:rt}),tt),stripBOM=tt=>(tt.charCodeAt(0)===65279&&(tt=tt.slice(1)),tt),inherits=(tt,nt,et,rt)=>{tt.prototype=Object.create(nt.prototype,rt),tt.prototype.constructor=tt,Object.defineProperty(tt,"super",{value:nt.prototype}),et&&Object.assign(tt.prototype,et)},toFlatObject=(tt,nt,et,rt)=>{let ot,at,st;const ut={};if(nt=nt||{},tt==null)return nt;do{for(ot=Object.getOwnPropertyNames(tt),at=ot.length;at-- >0;)st=ot[at],(!rt||rt(st,tt,nt))&&!ut[st]&&(nt[st]=tt[st],ut[st]=!0);tt=et!==!1&&getPrototypeOf(tt)}while(tt&&(!et||et(tt,nt))&&tt!==Object.prototype);return nt},endsWith=(tt,nt,et)=>{tt=String(tt),(et===void 0||et>tt.length)&&(et=tt.length),et-=nt.length;const rt=tt.indexOf(nt,et);return rt!==-1&&rt===et},toArray=tt=>{if(!tt)return null;if(isArray(tt))return tt;let nt=tt.length;if(!isNumber(nt))return null;const et=new Array(nt);for(;nt-- >0;)et[nt]=tt[nt];return et},isTypedArray=(tt=>nt=>tt&&nt instanceof tt)(typeof Uint8Array<"u"&&getPrototypeOf(Uint8Array)),forEachEntry=(tt,nt)=>{const rt=(tt&&tt[Symbol.iterator]).call(tt);let ot;for(;(ot=rt.next())&&!ot.done;){const at=ot.value;nt.call(tt,at[0],at[1])}},matchAll=(tt,nt)=>{let et;const rt=[];for(;(et=tt.exec(nt))!==null;)rt.push(et);return rt},isHTMLForm=kindOfTest("HTMLFormElement"),toCamelCase=tt=>tt.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(et,rt,ot){return rt.toUpperCase()+ot}),hasOwnProperty=(({hasOwnProperty:tt})=>(nt,et)=>tt.call(nt,et))(Object.prototype),isRegExp=kindOfTest("RegExp"),reduceDescriptors=(tt,nt)=>{const et=Object.getOwnPropertyDescriptors(tt),rt={};forEach(et,(ot,at)=>{let st;(st=nt(ot,at,tt))!==!1&&(rt[at]=st||ot)}),Object.defineProperties(tt,rt)},freezeMethods=tt=>{reduceDescriptors(tt,(nt,et)=>{if(isFunction(tt)&&["arguments","caller","callee"].indexOf(et)!==-1)return!1;const rt=tt[et];if(isFunction(rt)){if(nt.enumerable=!1,"writable"in nt){nt.writable=!1;return}nt.set||(nt.set=()=>{throw Error("Can not rewrite read-only method '"+et+"'")})}})},toObjectSet=(tt,nt)=>{const et={},rt=ot=>{ot.forEach(at=>{et[at]=!0})};return isArray(tt)?rt(tt):rt(String(tt).split(nt)),et},noop=()=>{},toFiniteNumber=(tt,nt)=>tt!=null&&Number.isFinite(tt=+tt)?tt:nt,ALPHA="abcdefghijklmnopqrstuvwxyz",DIGIT="0123456789",ALPHABET={DIGIT,ALPHA,ALPHA_DIGIT:ALPHA+ALPHA.toUpperCase()+DIGIT},generateString=(tt=16,nt=ALPHABET.ALPHA_DIGIT)=>{let et="";const{length:rt}=nt;for(;tt--;)et+=nt[Math.random()*rt|0];return et};function isSpecCompliantForm(tt){return!!(tt&&isFunction(tt.append)&&tt[Symbol.toStringTag]==="FormData"&&tt[Symbol.iterator])}const toJSONObject=tt=>{const nt=new Array(10),et=(rt,ot)=>{if(isObject$1(rt)){if(nt.indexOf(rt)>=0)return;if(!("toJSON"in rt)){nt[ot]=rt;const at=isArray(rt)?[]:{};return forEach(rt,(st,ut)=>{const ct=et(st,ot+1);!isUndefined(ct)&&(at[ut]=ct)}),nt[ot]=void 0,at}}return rt};return et(tt,0)},isAsyncFn=kindOfTest("AsyncFunction"),isThenable=tt=>tt&&(isObject$1(tt)||isFunction(tt))&&isFunction(tt.then)&&isFunction(tt.catch),_setImmediate=((tt,nt)=>tt?setImmediate:nt?((et,rt)=>(_global.addEventListener("message",({source:ot,data:at})=>{ot===_global&&at===et&&rt.length&&rt.shift()()},!1),ot=>{rt.push(ot),_global.postMessage(et,"*")}))(`axios@${Math.random()}`,[]):et=>setTimeout(et))(typeof setImmediate=="function",isFunction(_global.postMessage)),asap=typeof queueMicrotask<"u"?queueMicrotask.bind(_global):typeof process<"u"&&process.nextTick||_setImmediate,utils$1={isArray,isArrayBuffer,isBuffer,isFormData,isArrayBufferView,isString,isNumber,isBoolean,isObject:isObject$1,isPlainObject,isReadableStream,isRequest,isResponse,isHeaders,isUndefined,isDate,isFile,isBlob,isRegExp,isFunction,isStream,isURLSearchParams,isTypedArray,isFileList,forEach,merge,extend,trim,stripBOM,inherits,toFlatObject,kindOf,kindOfTest,endsWith,toArray,forEachEntry,matchAll,isHTMLForm,hasOwnProperty,hasOwnProp:hasOwnProperty,reduceDescriptors,freezeMethods,toObjectSet,toCamelCase,noop,toFiniteNumber,findKey,global:_global,isContextDefined,ALPHABET,generateString,isSpecCompliantForm,toJSONObject,isAsyncFn,isThenable,setImmediate:_setImmediate,asap};function AxiosError(tt,nt,et,rt,ot){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=tt,this.name="AxiosError",nt&&(this.code=nt),et&&(this.config=et),rt&&(this.request=rt),ot&&(this.response=ot,this.status=ot.status?ot.status:null)}utils$1.inherits(AxiosError,Error,{toJSON:function tt(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:utils$1.toJSONObject(this.config),code:this.code,status:this.status}}});const prototype$1=AxiosError.prototype,descriptors={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(tt=>{descriptors[tt]={value:tt}});Object.defineProperties(AxiosError,descriptors);Object.defineProperty(prototype$1,"isAxiosError",{value:!0});AxiosError.from=(tt,nt,et,rt,ot,at)=>{const st=Object.create(prototype$1);return utils$1.toFlatObject(tt,st,function(ct){return ct!==Error.prototype},ut=>ut!=="isAxiosError"),AxiosError.call(st,tt.message,nt,et,rt,ot),st.cause=tt,st.name=tt.name,at&&Object.assign(st,at),st};const httpAdapter=null;function isVisitable(tt){return utils$1.isPlainObject(tt)||utils$1.isArray(tt)}function removeBrackets(tt){return utils$1.endsWith(tt,"[]")?tt.slice(0,-2):tt}function renderKey(tt,nt,et){return tt?tt.concat(nt).map(function(ot,at){return ot=removeBrackets(ot),!et&&at?"["+ot+"]":ot}).join(et?".":""):nt}function isFlatArray(tt){return utils$1.isArray(tt)&&!tt.some(isVisitable)}const predicates=utils$1.toFlatObject(utils$1,{},null,function tt(nt){return/^is[A-Z]/.test(nt)});function toFormData(tt,nt,et){if(!utils$1.isObject(tt))throw new TypeError("target must be an object");nt=nt||new FormData,et=utils$1.toFlatObject(et,{metaTokens:!0,dots:!1,indexes:!1},!1,function(mt,Ot){return!utils$1.isUndefined(Ot[mt])});const rt=et.metaTokens,ot=et.visitor||dt,at=et.dots,st=et.indexes,ct=(et.Blob||typeof Blob<"u"&&Blob)&&utils$1.isSpecCompliantForm(nt);if(!utils$1.isFunction(ot))throw new TypeError("visitor must be a function");function pt(Mt){if(Mt===null)return"";if(utils$1.isDate(Mt))return Mt.toISOString();if(!ct&&utils$1.isBlob(Mt))throw new AxiosError("Blob is not supported. Use a Buffer instead.");return utils$1.isArrayBuffer(Mt)||utils$1.isTypedArray(Mt)?ct&&typeof Blob=="function"?new Blob([Mt]):Buffer.from(Mt):Mt}function dt(Mt,mt,Ot){let zt=Mt;if(Mt&&!Ot&&typeof Mt=="object"){if(utils$1.endsWith(mt,"{}"))mt=rt?mt:mt.slice(0,-2),Mt=JSON.stringify(Mt);else if(utils$1.isArray(Mt)&&isFlatArray(Mt)||(utils$1.isFileList(Mt)||utils$1.endsWith(mt,"[]"))&&(zt=utils$1.toArray(Mt)))return mt=removeBrackets(mt),zt.forEach(function(vt,At){!(utils$1.isUndefined(vt)||vt===null)&&nt.append(st===!0?renderKey([mt],At,at):st===null?mt:mt+"[]",pt(vt))}),!1}return isVisitable(Mt)?!0:(nt.append(renderKey(Ot,mt,at),pt(Mt)),!1)}const ft=[],bt=Object.assign(predicates,{defaultVisitor:dt,convertValue:pt,isVisitable});function ht(Mt,mt){if(!utils$1.isUndefined(Mt)){if(ft.indexOf(Mt)!==-1)throw Error("Circular reference detected in "+mt.join("."));ft.push(Mt),utils$1.forEach(Mt,function(zt,yt){(!(utils$1.isUndefined(zt)||zt===null)&&ot.call(nt,zt,utils$1.isString(yt)?yt.trim():yt,mt,bt))===!0&&ht(zt,mt?mt.concat(yt):[yt])}),ft.pop()}}if(!utils$1.isObject(tt))throw new TypeError("data must be an object");return ht(tt),nt}function encode$1(tt){const nt={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(tt).replace(/[!'()~]|%20|%00/g,function(rt){return nt[rt]})}function AxiosURLSearchParams(tt,nt){this._pairs=[],tt&&toFormData(tt,this,nt)}const prototype=AxiosURLSearchParams.prototype;prototype.append=function tt(nt,et){this._pairs.push([nt,et])};prototype.toString=function tt(nt){const et=nt?function(rt){return nt.call(this,rt,encode$1)}:encode$1;return this._pairs.map(function(ot){return et(ot[0])+"="+et(ot[1])},"").join("&")};function encode(tt){return encodeURIComponent(tt).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function buildURL(tt,nt,et){if(!nt)return tt;const rt=et&&et.encode||encode;utils$1.isFunction(et)&&(et={serialize:et});const ot=et&&et.serialize;let at;if(ot?at=ot(nt,et):at=utils$1.isURLSearchParams(nt)?nt.toString():new AxiosURLSearchParams(nt,et).toString(rt),at){const st=tt.indexOf("#");st!==-1&&(tt=tt.slice(0,st)),tt+=(tt.indexOf("?")===-1?"?":"&")+at}return tt}class InterceptorManager{constructor(){this.handlers=[]}use(nt,et,rt){return this.handlers.push({fulfilled:nt,rejected:et,synchronous:rt?rt.synchronous:!1,runWhen:rt?rt.runWhen:null}),this.handlers.length-1}eject(nt){this.handlers[nt]&&(this.handlers[nt]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(nt){utils$1.forEach(this.handlers,function(rt){rt!==null&&nt(rt)})}}const transitionalDefaults={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},URLSearchParams$1=typeof URLSearchParams<"u"?URLSearchParams:AxiosURLSearchParams,FormData$1=typeof FormData<"u"?FormData:null,Blob$1=typeof Blob<"u"?Blob:null,platform$1={isBrowser:!0,classes:{URLSearchParams:URLSearchParams$1,FormData:FormData$1,Blob:Blob$1},protocols:["http","https","file","blob","url","data"]},hasBrowserEnv=typeof window<"u"&&typeof document<"u",_navigator=typeof navigator=="object"&&navigator||void 0,hasStandardBrowserEnv=hasBrowserEnv&&(!_navigator||["ReactNative","NativeScript","NS"].indexOf(_navigator.product)<0),hasStandardBrowserWebWorkerEnv=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",origin=hasBrowserEnv&&window.location.href||"http://localhost",utils=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv,hasStandardBrowserEnv,hasStandardBrowserWebWorkerEnv,navigator:_navigator,origin},Symbol.toStringTag,{value:"Module"})),platform={...utils,...platform$1};function toURLEncodedForm(tt,nt){return toFormData(tt,new platform.classes.URLSearchParams,Object.assign({visitor:function(et,rt,ot,at){return platform.isNode&&utils$1.isBuffer(et)?(this.append(rt,et.toString("base64")),!1):at.defaultVisitor.apply(this,arguments)}},nt))}function parsePropPath(tt){return utils$1.matchAll(/\w+|\[(\w*)]/g,tt).map(nt=>nt[0]==="[]"?"":nt[1]||nt[0])}function arrayToObject(tt){const nt={},et=Object.keys(tt);let rt;const ot=et.length;let at;for(rt=0;rt<ot;rt++)at=et[rt],nt[at]=tt[at];return nt}function formDataToJSON(tt){function nt(et,rt,ot,at){let st=et[at++];if(st==="__proto__")return!0;const ut=Number.isFinite(+st),ct=at>=et.length;return st=!st&&utils$1.isArray(ot)?ot.length:st,ct?(utils$1.hasOwnProp(ot,st)?ot[st]=[ot[st],rt]:ot[st]=rt,!ut):((!ot[st]||!utils$1.isObject(ot[st]))&&(ot[st]=[]),nt(et,rt,ot[st],at)&&utils$1.isArray(ot[st])&&(ot[st]=arrayToObject(ot[st])),!ut)}if(utils$1.isFormData(tt)&&utils$1.isFunction(tt.entries)){const et={};return utils$1.forEachEntry(tt,(rt,ot)=>{nt(parsePropPath(rt),ot,et,0)}),et}return null}function stringifySafely(tt,nt,et){if(utils$1.isString(tt))try{return(nt||JSON.parse)(tt),utils$1.trim(tt)}catch(rt){if(rt.name!=="SyntaxError")throw rt}return(0,JSON.stringify)(tt)}const defaults={transitional:transitionalDefaults,adapter:["xhr","http","fetch"],transformRequest:[function tt(nt,et){const rt=et.getContentType()||"",ot=rt.indexOf("application/json")>-1,at=utils$1.isObject(nt);if(at&&utils$1.isHTMLForm(nt)&&(nt=new FormData(nt)),utils$1.isFormData(nt))return ot?JSON.stringify(formDataToJSON(nt)):nt;if(utils$1.isArrayBuffer(nt)||utils$1.isBuffer(nt)||utils$1.isStream(nt)||utils$1.isFile(nt)||utils$1.isBlob(nt)||utils$1.isReadableStream(nt))return nt;if(utils$1.isArrayBufferView(nt))return nt.buffer;if(utils$1.isURLSearchParams(nt))return et.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),nt.toString();let ut;if(at){if(rt.indexOf("application/x-www-form-urlencoded")>-1)return toURLEncodedForm(nt,this.formSerializer).toString();if((ut=utils$1.isFileList(nt))||rt.indexOf("multipart/form-data")>-1){const ct=this.env&&this.env.FormData;return toFormData(ut?{"files[]":nt}:nt,ct&&new ct,this.formSerializer)}}return at||ot?(et.setContentType("application/json",!1),stringifySafely(nt)):nt}],transformResponse:[function tt(nt){const et=this.transitional||defaults.transitional,rt=et&&et.forcedJSONParsing,ot=this.responseType==="json";if(utils$1.isResponse(nt)||utils$1.isReadableStream(nt))return nt;if(nt&&utils$1.isString(nt)&&(rt&&!this.responseType||ot)){const st=!(et&&et.silentJSONParsing)&&ot;try{return JSON.parse(nt)}catch(ut){if(st)throw ut.name==="SyntaxError"?AxiosError.from(ut,AxiosError.ERR_BAD_RESPONSE,this,null,this.response):ut}}return nt}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:platform.classes.FormData,Blob:platform.classes.Blob},validateStatus:function tt(nt){return nt>=200&&nt<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};utils$1.forEach(["delete","get","head","post","put","patch"],tt=>{defaults.headers[tt]={}});const ignoreDuplicateOf=utils$1.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),parseHeaders=tt=>{const nt={};let et,rt,ot;return tt&&tt.split(`
|
791
|
+
`);return jsx$1("div",{"data-testid":"stClearCacheDialog",children:jsxs(Modal,{isOpen:!0,onClose:tt.onClose,children:[jsx$1(ModalHeader,{children:"Clear caches"}),jsx$1(ModalBody$1,{children:jsx$1(StreamlitMarkdown$1,{source:et,allowHTML:!1})}),jsxs(ModalFooter,{children:[jsx$1(ModalButton,{kind:BaseButtonKind.GHOST,onClick:tt.onClose,children:"Cancel"}),jsx$1(ModalButton,{autoFocus:!0,kind:BaseButtonKind.SECONDARY,onClick:tt.confirmCallback,children:"Clear caches"})]})]})})}function scriptCompileErrorDialog(tt){var nt;return jsxs(Modal,{isOpen:!0,onClose:tt.onClose,size:"auto",autoFocus:!1,children:[jsx$1(ModalHeader,{children:"Script execution error"}),jsx$1(ModalBody$1,{children:jsx$1(StreamlitSyntaxHighlighter$1,{showLineNumbers:!1,wrapLines:!1,children:(nt=tt.exception)!=null&&nt.message?tt.exception.message:"No message"})}),jsx$1(ModalFooter,{children:jsx$1(ModalButton,{kind:BaseButtonKind.SECONDARY,onClick:tt.onClose,children:"Close"})})]})}function settingsDialog(tt){return jsx$1(SettingsDialog,{...tt})}function warningDialog(tt){return jsxs(Modal,{isOpen:!0,onClose:tt.onClose,children:[jsx$1(ModalHeader,{children:tt.title}),jsx$1(ModalBody$1,{children:tt.msg})]})}function deployErrorDialog({title:tt,msg:nt,onClose:et,onContinue:rt,onTryAgain:ot}){const at=()=>{et(),rt&&rt()};return jsxs(Modal,{isOpen:!0,onClose:et,children:[jsx$1(ModalHeader,{children:tt}),jsx$1(ModalBody$1,{children:jsx$1(StyledDeployErrorContent,{children:nt})}),jsxs(ModalFooter,{children:[jsx$1(ModalButton,{kind:BaseButtonKind.GHOST,onClick:ot,children:"Try again"}),jsx$1(ModalButton,{kind:BaseButtonKind.SECONDARY,onClick:at,children:rt?"Continue anyway":"Close"})]})]})}function noDialog({onClose:tt}){return jsx$1(Modal,{isOpen:!1,onClose:tt})}function typeNotRecognizedDialog(tt){return jsx$1(Modal,{isOpen:!0,onClose:tt.onClose,children:jsx$1(ModalBody$1,{children:`Dialog type "${tt.type}" not recognized.`})})}const CORS_ERROR_MESSAGE_DOCUMENTATION_LINK="https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS",LOG="WebsocketConnection",WEBSOCKET_STREAM_PATH="_stcore/stream",SERVER_PING_PATH="_stcore/health",HOST_CONFIG_PATH="_stcore/host-config",PING_MINIMUM_RETRY_PERIOD_MS=500,PING_MAXIMUM_RETRY_PERIOD_MS=1e3*60,WEBSOCKET_TIMEOUT_MS=15*1e3,PING_TIMEOUT_MS=15*1e3;function bind(tt,nt){return function(){return tt.apply(nt,arguments)}}const{toString}=Object.prototype,{getPrototypeOf}=Object,kindOf=(tt=>nt=>{const et=toString.call(nt);return tt[et]||(tt[et]=et.slice(8,-1).toLowerCase())})(Object.create(null)),kindOfTest=tt=>(tt=tt.toLowerCase(),nt=>kindOf(nt)===tt),typeOfTest=tt=>nt=>typeof nt===tt,{isArray}=Array,isUndefined=typeOfTest("undefined");function isBuffer(tt){return tt!==null&&!isUndefined(tt)&&tt.constructor!==null&&!isUndefined(tt.constructor)&&isFunction(tt.constructor.isBuffer)&&tt.constructor.isBuffer(tt)}const isArrayBuffer=kindOfTest("ArrayBuffer");function isArrayBufferView(tt){let nt;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?nt=ArrayBuffer.isView(tt):nt=tt&&tt.buffer&&isArrayBuffer(tt.buffer),nt}const isString=typeOfTest("string"),isFunction=typeOfTest("function"),isNumber=typeOfTest("number"),isObject$1=tt=>tt!==null&&typeof tt=="object",isBoolean=tt=>tt===!0||tt===!1,isPlainObject=tt=>{if(kindOf(tt)!=="object")return!1;const nt=getPrototypeOf(tt);return(nt===null||nt===Object.prototype||Object.getPrototypeOf(nt)===null)&&!(Symbol.toStringTag in tt)&&!(Symbol.iterator in tt)},isDate=kindOfTest("Date"),isFile=kindOfTest("File"),isBlob=kindOfTest("Blob"),isFileList=kindOfTest("FileList"),isStream=tt=>isObject$1(tt)&&isFunction(tt.pipe),isFormData=tt=>{let nt;return tt&&(typeof FormData=="function"&&tt instanceof FormData||isFunction(tt.append)&&((nt=kindOf(tt))==="formdata"||nt==="object"&&isFunction(tt.toString)&&tt.toString()==="[object FormData]"))},isURLSearchParams=kindOfTest("URLSearchParams"),[isReadableStream,isRequest,isResponse,isHeaders]=["ReadableStream","Request","Response","Headers"].map(kindOfTest),trim=tt=>tt.trim?tt.trim():tt.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function forEach(tt,nt,{allOwnKeys:et=!1}={}){if(tt===null||typeof tt>"u")return;let rt,ot;if(typeof tt!="object"&&(tt=[tt]),isArray(tt))for(rt=0,ot=tt.length;rt<ot;rt++)nt.call(null,tt[rt],rt,tt);else{const at=et?Object.getOwnPropertyNames(tt):Object.keys(tt),st=at.length;let ut;for(rt=0;rt<st;rt++)ut=at[rt],nt.call(null,tt[ut],ut,tt)}}function findKey(tt,nt){nt=nt.toLowerCase();const et=Object.keys(tt);let rt=et.length,ot;for(;rt-- >0;)if(ot=et[rt],nt===ot.toLowerCase())return ot;return null}const _global=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,isContextDefined=tt=>!isUndefined(tt)&&tt!==_global;function merge(){const{caseless:tt}=isContextDefined(this)&&this||{},nt={},et=(rt,ot)=>{const at=tt&&findKey(nt,ot)||ot;isPlainObject(nt[at])&&isPlainObject(rt)?nt[at]=merge(nt[at],rt):isPlainObject(rt)?nt[at]=merge({},rt):isArray(rt)?nt[at]=rt.slice():nt[at]=rt};for(let rt=0,ot=arguments.length;rt<ot;rt++)arguments[rt]&&forEach(arguments[rt],et);return nt}const extend=(tt,nt,et,{allOwnKeys:rt}={})=>(forEach(nt,(ot,at)=>{et&&isFunction(ot)?tt[at]=bind(ot,et):tt[at]=ot},{allOwnKeys:rt}),tt),stripBOM=tt=>(tt.charCodeAt(0)===65279&&(tt=tt.slice(1)),tt),inherits=(tt,nt,et,rt)=>{tt.prototype=Object.create(nt.prototype,rt),tt.prototype.constructor=tt,Object.defineProperty(tt,"super",{value:nt.prototype}),et&&Object.assign(tt.prototype,et)},toFlatObject=(tt,nt,et,rt)=>{let ot,at,st;const ut={};if(nt=nt||{},tt==null)return nt;do{for(ot=Object.getOwnPropertyNames(tt),at=ot.length;at-- >0;)st=ot[at],(!rt||rt(st,tt,nt))&&!ut[st]&&(nt[st]=tt[st],ut[st]=!0);tt=et!==!1&&getPrototypeOf(tt)}while(tt&&(!et||et(tt,nt))&&tt!==Object.prototype);return nt},endsWith=(tt,nt,et)=>{tt=String(tt),(et===void 0||et>tt.length)&&(et=tt.length),et-=nt.length;const rt=tt.indexOf(nt,et);return rt!==-1&&rt===et},toArray=tt=>{if(!tt)return null;if(isArray(tt))return tt;let nt=tt.length;if(!isNumber(nt))return null;const et=new Array(nt);for(;nt-- >0;)et[nt]=tt[nt];return et},isTypedArray=(tt=>nt=>tt&&nt instanceof tt)(typeof Uint8Array<"u"&&getPrototypeOf(Uint8Array)),forEachEntry=(tt,nt)=>{const rt=(tt&&tt[Symbol.iterator]).call(tt);let ot;for(;(ot=rt.next())&&!ot.done;){const at=ot.value;nt.call(tt,at[0],at[1])}},matchAll=(tt,nt)=>{let et;const rt=[];for(;(et=tt.exec(nt))!==null;)rt.push(et);return rt},isHTMLForm=kindOfTest("HTMLFormElement"),toCamelCase=tt=>tt.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(et,rt,ot){return rt.toUpperCase()+ot}),hasOwnProperty=(({hasOwnProperty:tt})=>(nt,et)=>tt.call(nt,et))(Object.prototype),isRegExp=kindOfTest("RegExp"),reduceDescriptors=(tt,nt)=>{const et=Object.getOwnPropertyDescriptors(tt),rt={};forEach(et,(ot,at)=>{let st;(st=nt(ot,at,tt))!==!1&&(rt[at]=st||ot)}),Object.defineProperties(tt,rt)},freezeMethods=tt=>{reduceDescriptors(tt,(nt,et)=>{if(isFunction(tt)&&["arguments","caller","callee"].indexOf(et)!==-1)return!1;const rt=tt[et];if(isFunction(rt)){if(nt.enumerable=!1,"writable"in nt){nt.writable=!1;return}nt.set||(nt.set=()=>{throw Error("Can not rewrite read-only method '"+et+"'")})}})},toObjectSet=(tt,nt)=>{const et={},rt=ot=>{ot.forEach(at=>{et[at]=!0})};return isArray(tt)?rt(tt):rt(String(tt).split(nt)),et},noop=()=>{},toFiniteNumber=(tt,nt)=>tt!=null&&Number.isFinite(tt=+tt)?tt:nt,ALPHA="abcdefghijklmnopqrstuvwxyz",DIGIT="0123456789",ALPHABET={DIGIT,ALPHA,ALPHA_DIGIT:ALPHA+ALPHA.toUpperCase()+DIGIT},generateString=(tt=16,nt=ALPHABET.ALPHA_DIGIT)=>{let et="";const{length:rt}=nt;for(;tt--;)et+=nt[Math.random()*rt|0];return et};function isSpecCompliantForm(tt){return!!(tt&&isFunction(tt.append)&&tt[Symbol.toStringTag]==="FormData"&&tt[Symbol.iterator])}const toJSONObject=tt=>{const nt=new Array(10),et=(rt,ot)=>{if(isObject$1(rt)){if(nt.indexOf(rt)>=0)return;if(!("toJSON"in rt)){nt[ot]=rt;const at=isArray(rt)?[]:{};return forEach(rt,(st,ut)=>{const ct=et(st,ot+1);!isUndefined(ct)&&(at[ut]=ct)}),nt[ot]=void 0,at}}return rt};return et(tt,0)},isAsyncFn=kindOfTest("AsyncFunction"),isThenable=tt=>tt&&(isObject$1(tt)||isFunction(tt))&&isFunction(tt.then)&&isFunction(tt.catch),_setImmediate=((tt,nt)=>tt?setImmediate:nt?((et,rt)=>(_global.addEventListener("message",({source:ot,data:at})=>{ot===_global&&at===et&&rt.length&&rt.shift()()},!1),ot=>{rt.push(ot),_global.postMessage(et,"*")}))(`axios@${Math.random()}`,[]):et=>setTimeout(et))(typeof setImmediate=="function",isFunction(_global.postMessage)),asap=typeof queueMicrotask<"u"?queueMicrotask.bind(_global):typeof process<"u"&&process.nextTick||_setImmediate,utils$1={isArray,isArrayBuffer,isBuffer,isFormData,isArrayBufferView,isString,isNumber,isBoolean,isObject:isObject$1,isPlainObject,isReadableStream,isRequest,isResponse,isHeaders,isUndefined,isDate,isFile,isBlob,isRegExp,isFunction,isStream,isURLSearchParams,isTypedArray,isFileList,forEach,merge,extend,trim,stripBOM,inherits,toFlatObject,kindOf,kindOfTest,endsWith,toArray,forEachEntry,matchAll,isHTMLForm,hasOwnProperty,hasOwnProp:hasOwnProperty,reduceDescriptors,freezeMethods,toObjectSet,toCamelCase,noop,toFiniteNumber,findKey,global:_global,isContextDefined,ALPHABET,generateString,isSpecCompliantForm,toJSONObject,isAsyncFn,isThenable,setImmediate:_setImmediate,asap};function AxiosError(tt,nt,et,rt,ot){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=tt,this.name="AxiosError",nt&&(this.code=nt),et&&(this.config=et),rt&&(this.request=rt),ot&&(this.response=ot,this.status=ot.status?ot.status:null)}utils$1.inherits(AxiosError,Error,{toJSON:function tt(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:utils$1.toJSONObject(this.config),code:this.code,status:this.status}}});const prototype$1=AxiosError.prototype,descriptors={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(tt=>{descriptors[tt]={value:tt}});Object.defineProperties(AxiosError,descriptors);Object.defineProperty(prototype$1,"isAxiosError",{value:!0});AxiosError.from=(tt,nt,et,rt,ot,at)=>{const st=Object.create(prototype$1);return utils$1.toFlatObject(tt,st,function(ct){return ct!==Error.prototype},ut=>ut!=="isAxiosError"),AxiosError.call(st,tt.message,nt,et,rt,ot),st.cause=tt,st.name=tt.name,at&&Object.assign(st,at),st};const httpAdapter=null;function isVisitable(tt){return utils$1.isPlainObject(tt)||utils$1.isArray(tt)}function removeBrackets(tt){return utils$1.endsWith(tt,"[]")?tt.slice(0,-2):tt}function renderKey(tt,nt,et){return tt?tt.concat(nt).map(function(ot,at){return ot=removeBrackets(ot),!et&&at?"["+ot+"]":ot}).join(et?".":""):nt}function isFlatArray(tt){return utils$1.isArray(tt)&&!tt.some(isVisitable)}const predicates=utils$1.toFlatObject(utils$1,{},null,function tt(nt){return/^is[A-Z]/.test(nt)});function toFormData(tt,nt,et){if(!utils$1.isObject(tt))throw new TypeError("target must be an object");nt=nt||new FormData,et=utils$1.toFlatObject(et,{metaTokens:!0,dots:!1,indexes:!1},!1,function(mt,Ot){return!utils$1.isUndefined(Ot[mt])});const rt=et.metaTokens,ot=et.visitor||dt,at=et.dots,st=et.indexes,ct=(et.Blob||typeof Blob<"u"&&Blob)&&utils$1.isSpecCompliantForm(nt);if(!utils$1.isFunction(ot))throw new TypeError("visitor must be a function");function pt(Mt){if(Mt===null)return"";if(utils$1.isDate(Mt))return Mt.toISOString();if(!ct&&utils$1.isBlob(Mt))throw new AxiosError("Blob is not supported. Use a Buffer instead.");return utils$1.isArrayBuffer(Mt)||utils$1.isTypedArray(Mt)?ct&&typeof Blob=="function"?new Blob([Mt]):Buffer.from(Mt):Mt}function dt(Mt,mt,Ot){let zt=Mt;if(Mt&&!Ot&&typeof Mt=="object"){if(utils$1.endsWith(mt,"{}"))mt=rt?mt:mt.slice(0,-2),Mt=JSON.stringify(Mt);else if(utils$1.isArray(Mt)&&isFlatArray(Mt)||(utils$1.isFileList(Mt)||utils$1.endsWith(mt,"[]"))&&(zt=utils$1.toArray(Mt)))return mt=removeBrackets(mt),zt.forEach(function(vt,At){!(utils$1.isUndefined(vt)||vt===null)&&nt.append(st===!0?renderKey([mt],At,at):st===null?mt:mt+"[]",pt(vt))}),!1}return isVisitable(Mt)?!0:(nt.append(renderKey(Ot,mt,at),pt(Mt)),!1)}const ft=[],bt=Object.assign(predicates,{defaultVisitor:dt,convertValue:pt,isVisitable});function ht(Mt,mt){if(!utils$1.isUndefined(Mt)){if(ft.indexOf(Mt)!==-1)throw Error("Circular reference detected in "+mt.join("."));ft.push(Mt),utils$1.forEach(Mt,function(zt,yt){(!(utils$1.isUndefined(zt)||zt===null)&&ot.call(nt,zt,utils$1.isString(yt)?yt.trim():yt,mt,bt))===!0&&ht(zt,mt?mt.concat(yt):[yt])}),ft.pop()}}if(!utils$1.isObject(tt))throw new TypeError("data must be an object");return ht(tt),nt}function encode$1(tt){const nt={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(tt).replace(/[!'()~]|%20|%00/g,function(rt){return nt[rt]})}function AxiosURLSearchParams(tt,nt){this._pairs=[],tt&&toFormData(tt,this,nt)}const prototype=AxiosURLSearchParams.prototype;prototype.append=function tt(nt,et){this._pairs.push([nt,et])};prototype.toString=function tt(nt){const et=nt?function(rt){return nt.call(this,rt,encode$1)}:encode$1;return this._pairs.map(function(ot){return et(ot[0])+"="+et(ot[1])},"").join("&")};function encode(tt){return encodeURIComponent(tt).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function buildURL(tt,nt,et){if(!nt)return tt;const rt=et&&et.encode||encode;utils$1.isFunction(et)&&(et={serialize:et});const ot=et&&et.serialize;let at;if(ot?at=ot(nt,et):at=utils$1.isURLSearchParams(nt)?nt.toString():new AxiosURLSearchParams(nt,et).toString(rt),at){const st=tt.indexOf("#");st!==-1&&(tt=tt.slice(0,st)),tt+=(tt.indexOf("?")===-1?"?":"&")+at}return tt}class InterceptorManager{constructor(){this.handlers=[]}use(nt,et,rt){return this.handlers.push({fulfilled:nt,rejected:et,synchronous:rt?rt.synchronous:!1,runWhen:rt?rt.runWhen:null}),this.handlers.length-1}eject(nt){this.handlers[nt]&&(this.handlers[nt]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(nt){utils$1.forEach(this.handlers,function(rt){rt!==null&&nt(rt)})}}const transitionalDefaults={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},URLSearchParams$1=typeof URLSearchParams<"u"?URLSearchParams:AxiosURLSearchParams,FormData$1=typeof FormData<"u"?FormData:null,Blob$1=typeof Blob<"u"?Blob:null,platform$1={isBrowser:!0,classes:{URLSearchParams:URLSearchParams$1,FormData:FormData$1,Blob:Blob$1},protocols:["http","https","file","blob","url","data"]},hasBrowserEnv=typeof window<"u"&&typeof document<"u",_navigator=typeof navigator=="object"&&navigator||void 0,hasStandardBrowserEnv=hasBrowserEnv&&(!_navigator||["ReactNative","NativeScript","NS"].indexOf(_navigator.product)<0),hasStandardBrowserWebWorkerEnv=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",origin=hasBrowserEnv&&window.location.href||"http://localhost",utils=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv,hasStandardBrowserEnv,hasStandardBrowserWebWorkerEnv,navigator:_navigator,origin},Symbol.toStringTag,{value:"Module"})),platform={...utils,...platform$1};function toURLEncodedForm(tt,nt){return toFormData(tt,new platform.classes.URLSearchParams,Object.assign({visitor:function(et,rt,ot,at){return platform.isNode&&utils$1.isBuffer(et)?(this.append(rt,et.toString("base64")),!1):at.defaultVisitor.apply(this,arguments)}},nt))}function parsePropPath(tt){return utils$1.matchAll(/\w+|\[(\w*)]/g,tt).map(nt=>nt[0]==="[]"?"":nt[1]||nt[0])}function arrayToObject(tt){const nt={},et=Object.keys(tt);let rt;const ot=et.length;let at;for(rt=0;rt<ot;rt++)at=et[rt],nt[at]=tt[at];return nt}function formDataToJSON(tt){function nt(et,rt,ot,at){let st=et[at++];if(st==="__proto__")return!0;const ut=Number.isFinite(+st),ct=at>=et.length;return st=!st&&utils$1.isArray(ot)?ot.length:st,ct?(utils$1.hasOwnProp(ot,st)?ot[st]=[ot[st],rt]:ot[st]=rt,!ut):((!ot[st]||!utils$1.isObject(ot[st]))&&(ot[st]=[]),nt(et,rt,ot[st],at)&&utils$1.isArray(ot[st])&&(ot[st]=arrayToObject(ot[st])),!ut)}if(utils$1.isFormData(tt)&&utils$1.isFunction(tt.entries)){const et={};return utils$1.forEachEntry(tt,(rt,ot)=>{nt(parsePropPath(rt),ot,et,0)}),et}return null}function stringifySafely(tt,nt,et){if(utils$1.isString(tt))try{return(nt||JSON.parse)(tt),utils$1.trim(tt)}catch(rt){if(rt.name!=="SyntaxError")throw rt}return(0,JSON.stringify)(tt)}const defaults={transitional:transitionalDefaults,adapter:["xhr","http","fetch"],transformRequest:[function tt(nt,et){const rt=et.getContentType()||"",ot=rt.indexOf("application/json")>-1,at=utils$1.isObject(nt);if(at&&utils$1.isHTMLForm(nt)&&(nt=new FormData(nt)),utils$1.isFormData(nt))return ot?JSON.stringify(formDataToJSON(nt)):nt;if(utils$1.isArrayBuffer(nt)||utils$1.isBuffer(nt)||utils$1.isStream(nt)||utils$1.isFile(nt)||utils$1.isBlob(nt)||utils$1.isReadableStream(nt))return nt;if(utils$1.isArrayBufferView(nt))return nt.buffer;if(utils$1.isURLSearchParams(nt))return et.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),nt.toString();let ut;if(at){if(rt.indexOf("application/x-www-form-urlencoded")>-1)return toURLEncodedForm(nt,this.formSerializer).toString();if((ut=utils$1.isFileList(nt))||rt.indexOf("multipart/form-data")>-1){const ct=this.env&&this.env.FormData;return toFormData(ut?{"files[]":nt}:nt,ct&&new ct,this.formSerializer)}}return at||ot?(et.setContentType("application/json",!1),stringifySafely(nt)):nt}],transformResponse:[function tt(nt){const et=this.transitional||defaults.transitional,rt=et&&et.forcedJSONParsing,ot=this.responseType==="json";if(utils$1.isResponse(nt)||utils$1.isReadableStream(nt))return nt;if(nt&&utils$1.isString(nt)&&(rt&&!this.responseType||ot)){const st=!(et&&et.silentJSONParsing)&&ot;try{return JSON.parse(nt)}catch(ut){if(st)throw ut.name==="SyntaxError"?AxiosError.from(ut,AxiosError.ERR_BAD_RESPONSE,this,null,this.response):ut}}return nt}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:platform.classes.FormData,Blob:platform.classes.Blob},validateStatus:function tt(nt){return nt>=200&&nt<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};utils$1.forEach(["delete","get","head","post","put","patch"],tt=>{defaults.headers[tt]={}});const ignoreDuplicateOf=utils$1.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),parseHeaders=tt=>{const nt={};let et,rt,ot;return tt&&tt.split(`
|
792
792
|
`).forEach(function(st){ot=st.indexOf(":"),et=st.substring(0,ot).trim().toLowerCase(),rt=st.substring(ot+1).trim(),!(!et||nt[et]&&ignoreDuplicateOf[et])&&(et==="set-cookie"?nt[et]?nt[et].push(rt):nt[et]=[rt]:nt[et]=nt[et]?nt[et]+", "+rt:rt)}),nt},$internals=Symbol("internals");function normalizeHeader(tt){return tt&&String(tt).trim().toLowerCase()}function normalizeValue(tt){return tt===!1||tt==null?tt:utils$1.isArray(tt)?tt.map(normalizeValue):String(tt)}function parseTokens(tt){const nt=Object.create(null),et=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let rt;for(;rt=et.exec(tt);)nt[rt[1]]=rt[2];return nt}const isValidHeaderName=tt=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(tt.trim());function matchHeaderValue(tt,nt,et,rt,ot){if(utils$1.isFunction(rt))return rt.call(this,nt,et);if(ot&&(nt=et),!!utils$1.isString(nt)){if(utils$1.isString(rt))return nt.indexOf(rt)!==-1;if(utils$1.isRegExp(rt))return rt.test(nt)}}function formatHeader(tt){return tt.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(nt,et,rt)=>et.toUpperCase()+rt)}function buildAccessors(tt,nt){const et=utils$1.toCamelCase(" "+nt);["get","set","has"].forEach(rt=>{Object.defineProperty(tt,rt+et,{value:function(ot,at,st){return this[rt].call(this,nt,ot,at,st)},configurable:!0})})}class AxiosHeaders{constructor(nt){nt&&this.set(nt)}set(nt,et,rt){const ot=this;function at(ut,ct,pt){const dt=normalizeHeader(ct);if(!dt)throw new Error("header name must be a non-empty string");const ft=utils$1.findKey(ot,dt);(!ft||ot[ft]===void 0||pt===!0||pt===void 0&&ot[ft]!==!1)&&(ot[ft||ct]=normalizeValue(ut))}const st=(ut,ct)=>utils$1.forEach(ut,(pt,dt)=>at(pt,dt,ct));if(utils$1.isPlainObject(nt)||nt instanceof this.constructor)st(nt,et);else if(utils$1.isString(nt)&&(nt=nt.trim())&&!isValidHeaderName(nt))st(parseHeaders(nt),et);else if(utils$1.isHeaders(nt))for(const[ut,ct]of nt.entries())at(ct,ut,rt);else nt!=null&&at(et,nt,rt);return this}get(nt,et){if(nt=normalizeHeader(nt),nt){const rt=utils$1.findKey(this,nt);if(rt){const ot=this[rt];if(!et)return ot;if(et===!0)return parseTokens(ot);if(utils$1.isFunction(et))return et.call(this,ot,rt);if(utils$1.isRegExp(et))return et.exec(ot);throw new TypeError("parser must be boolean|regexp|function")}}}has(nt,et){if(nt=normalizeHeader(nt),nt){const rt=utils$1.findKey(this,nt);return!!(rt&&this[rt]!==void 0&&(!et||matchHeaderValue(this,this[rt],rt,et)))}return!1}delete(nt,et){const rt=this;let ot=!1;function at(st){if(st=normalizeHeader(st),st){const ut=utils$1.findKey(rt,st);ut&&(!et||matchHeaderValue(rt,rt[ut],ut,et))&&(delete rt[ut],ot=!0)}}return utils$1.isArray(nt)?nt.forEach(at):at(nt),ot}clear(nt){const et=Object.keys(this);let rt=et.length,ot=!1;for(;rt--;){const at=et[rt];(!nt||matchHeaderValue(this,this[at],at,nt,!0))&&(delete this[at],ot=!0)}return ot}normalize(nt){const et=this,rt={};return utils$1.forEach(this,(ot,at)=>{const st=utils$1.findKey(rt,at);if(st){et[st]=normalizeValue(ot),delete et[at];return}const ut=nt?formatHeader(at):String(at).trim();ut!==at&&delete et[at],et[ut]=normalizeValue(ot),rt[ut]=!0}),this}concat(...nt){return this.constructor.concat(this,...nt)}toJSON(nt){const et=Object.create(null);return utils$1.forEach(this,(rt,ot)=>{rt!=null&&rt!==!1&&(et[ot]=nt&&utils$1.isArray(rt)?rt.join(", "):rt)}),et}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([nt,et])=>nt+": "+et).join(`
|
793
793
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(nt){return nt instanceof this?nt:new this(nt)}static concat(nt,...et){const rt=new this(nt);return et.forEach(ot=>rt.set(ot)),rt}static accessor(nt){const rt=(this[$internals]=this[$internals]={accessors:{}}).accessors,ot=this.prototype;function at(st){const ut=normalizeHeader(st);rt[ut]||(buildAccessors(ot,st),rt[ut]=!0)}return utils$1.isArray(nt)?nt.forEach(at):at(nt),this}}AxiosHeaders.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);utils$1.reduceDescriptors(AxiosHeaders.prototype,({value:tt},nt)=>{let et=nt[0].toUpperCase()+nt.slice(1);return{get:()=>tt,set(rt){this[et]=rt}}});utils$1.freezeMethods(AxiosHeaders);function transformData(tt,nt){const et=this||defaults,rt=nt||et,ot=AxiosHeaders.from(rt.headers);let at=rt.data;return utils$1.forEach(tt,function(ut){at=ut.call(et,at,ot.normalize(),nt?nt.status:void 0)}),ot.normalize(),at}function isCancel(tt){return!!(tt&&tt.__CANCEL__)}function CanceledError(tt,nt,et){AxiosError.call(this,tt??"canceled",AxiosError.ERR_CANCELED,nt,et),this.name="CanceledError"}utils$1.inherits(CanceledError,AxiosError,{__CANCEL__:!0});function settle(tt,nt,et){const rt=et.config.validateStatus;!et.status||!rt||rt(et.status)?tt(et):nt(new AxiosError("Request failed with status code "+et.status,[AxiosError.ERR_BAD_REQUEST,AxiosError.ERR_BAD_RESPONSE][Math.floor(et.status/100)-4],et.config,et.request,et))}function parseProtocol(tt){const nt=/^([-+\w]{1,25})(:?\/\/|:)/.exec(tt);return nt&&nt[1]||""}function speedometer(tt,nt){tt=tt||10;const et=new Array(tt),rt=new Array(tt);let ot=0,at=0,st;return nt=nt!==void 0?nt:1e3,function(ct){const pt=Date.now(),dt=rt[at];st||(st=pt),et[ot]=ct,rt[ot]=pt;let ft=at,bt=0;for(;ft!==ot;)bt+=et[ft++],ft=ft%tt;if(ot=(ot+1)%tt,ot===at&&(at=(at+1)%tt),pt-st<nt)return;const ht=dt&&pt-dt;return ht?Math.round(bt*1e3/ht):void 0}}function throttle(tt,nt){let et=0,rt=1e3/nt,ot,at;const st=(pt,dt=Date.now())=>{et=dt,ot=null,at&&(clearTimeout(at),at=null),tt.apply(null,pt)};return[(...pt)=>{const dt=Date.now(),ft=dt-et;ft>=rt?st(pt,dt):(ot=pt,at||(at=setTimeout(()=>{at=null,st(ot)},rt-ft)))},()=>ot&&st(ot)]}const progressEventReducer=(tt,nt,et=3)=>{let rt=0;const ot=speedometer(50,250);return throttle(at=>{const st=at.loaded,ut=at.lengthComputable?at.total:void 0,ct=st-rt,pt=ot(ct),dt=st<=ut;rt=st;const ft={loaded:st,total:ut,progress:ut?st/ut:void 0,bytes:ct,rate:pt||void 0,estimated:pt&&ut&&dt?(ut-st)/pt:void 0,event:at,lengthComputable:ut!=null,[nt?"download":"upload"]:!0};tt(ft)},et)},progressEventDecorator=(tt,nt)=>{const et=tt!=null;return[rt=>nt[0]({lengthComputable:et,total:tt,loaded:rt}),nt[1]]},asyncDecorator=tt=>(...nt)=>utils$1.asap(()=>tt(...nt)),isURLSameOrigin=platform.hasStandardBrowserEnv?((tt,nt)=>et=>(et=new URL(et,platform.origin),tt.protocol===et.protocol&&tt.host===et.host&&(nt||tt.port===et.port)))(new URL(platform.origin),platform.navigator&&/(msie|trident)/i.test(platform.navigator.userAgent)):()=>!0,cookies=platform.hasStandardBrowserEnv?{write(tt,nt,et,rt,ot,at){const st=[tt+"="+encodeURIComponent(nt)];utils$1.isNumber(et)&&st.push("expires="+new Date(et).toGMTString()),utils$1.isString(rt)&&st.push("path="+rt),utils$1.isString(ot)&&st.push("domain="+ot),at===!0&&st.push("secure"),document.cookie=st.join("; ")},read(tt){const nt=document.cookie.match(new RegExp("(^|;\\s*)("+tt+")=([^;]*)"));return nt?decodeURIComponent(nt[3]):null},remove(tt){this.write(tt,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function isAbsoluteURL(tt){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(tt)}function combineURLs(tt,nt){return nt?tt.replace(/\/?\/$/,"")+"/"+nt.replace(/^\/+/,""):tt}function buildFullPath(tt,nt){return tt&&!isAbsoluteURL(nt)?combineURLs(tt,nt):nt}const headersToObject=tt=>tt instanceof AxiosHeaders?{...tt}:tt;function mergeConfig(tt,nt){nt=nt||{};const et={};function rt(pt,dt,ft,bt){return utils$1.isPlainObject(pt)&&utils$1.isPlainObject(dt)?utils$1.merge.call({caseless:bt},pt,dt):utils$1.isPlainObject(dt)?utils$1.merge({},dt):utils$1.isArray(dt)?dt.slice():dt}function ot(pt,dt,ft,bt){if(utils$1.isUndefined(dt)){if(!utils$1.isUndefined(pt))return rt(void 0,pt,ft,bt)}else return rt(pt,dt,ft,bt)}function at(pt,dt){if(!utils$1.isUndefined(dt))return rt(void 0,dt)}function st(pt,dt){if(utils$1.isUndefined(dt)){if(!utils$1.isUndefined(pt))return rt(void 0,pt)}else return rt(void 0,dt)}function ut(pt,dt,ft){if(ft in nt)return rt(pt,dt);if(ft in tt)return rt(void 0,pt)}const ct={url:at,method:at,data:at,baseURL:st,transformRequest:st,transformResponse:st,paramsSerializer:st,timeout:st,timeoutMessage:st,withCredentials:st,withXSRFToken:st,adapter:st,responseType:st,xsrfCookieName:st,xsrfHeaderName:st,onUploadProgress:st,onDownloadProgress:st,decompress:st,maxContentLength:st,maxBodyLength:st,beforeRedirect:st,transport:st,httpAgent:st,httpsAgent:st,cancelToken:st,socketPath:st,responseEncoding:st,validateStatus:ut,headers:(pt,dt,ft)=>ot(headersToObject(pt),headersToObject(dt),ft,!0)};return utils$1.forEach(Object.keys(Object.assign({},tt,nt)),function(dt){const ft=ct[dt]||ot,bt=ft(tt[dt],nt[dt],dt);utils$1.isUndefined(bt)&&ft!==ut||(et[dt]=bt)}),et}const resolveConfig=tt=>{const nt=mergeConfig({},tt);let{data:et,withXSRFToken:rt,xsrfHeaderName:ot,xsrfCookieName:at,headers:st,auth:ut}=nt;nt.headers=st=AxiosHeaders.from(st),nt.url=buildURL(buildFullPath(nt.baseURL,nt.url),tt.params,tt.paramsSerializer),ut&&st.set("Authorization","Basic "+btoa((ut.username||"")+":"+(ut.password?unescape(encodeURIComponent(ut.password)):"")));let ct;if(utils$1.isFormData(et)){if(platform.hasStandardBrowserEnv||platform.hasStandardBrowserWebWorkerEnv)st.setContentType(void 0);else if((ct=st.getContentType())!==!1){const[pt,...dt]=ct?ct.split(";").map(ft=>ft.trim()).filter(Boolean):[];st.setContentType([pt||"multipart/form-data",...dt].join("; "))}}if(platform.hasStandardBrowserEnv&&(rt&&utils$1.isFunction(rt)&&(rt=rt(nt)),rt||rt!==!1&&isURLSameOrigin(nt.url))){const pt=ot&&at&&cookies.read(at);pt&&st.set(ot,pt)}return nt},isXHRAdapterSupported=typeof XMLHttpRequest<"u",xhrAdapter=isXHRAdapterSupported&&function(tt){return new Promise(function(et,rt){const ot=resolveConfig(tt);let at=ot.data;const st=AxiosHeaders.from(ot.headers).normalize();let{responseType:ut,onUploadProgress:ct,onDownloadProgress:pt}=ot,dt,ft,bt,ht,Mt;function mt(){ht&&ht(),Mt&&Mt(),ot.cancelToken&&ot.cancelToken.unsubscribe(dt),ot.signal&&ot.signal.removeEventListener("abort",dt)}let Ot=new XMLHttpRequest;Ot.open(ot.method.toUpperCase(),ot.url,!0),Ot.timeout=ot.timeout;function zt(){if(!Ot)return;const vt=AxiosHeaders.from("getAllResponseHeaders"in Ot&&Ot.getAllResponseHeaders()),St={data:!ut||ut==="text"||ut==="json"?Ot.responseText:Ot.response,status:Ot.status,statusText:Ot.statusText,headers:vt,config:tt,request:Ot};settle(function(Tt){et(Tt),mt()},function(Tt){rt(Tt),mt()},St),Ot=null}"onloadend"in Ot?Ot.onloadend=zt:Ot.onreadystatechange=function(){!Ot||Ot.readyState!==4||Ot.status===0&&!(Ot.responseURL&&Ot.responseURL.indexOf("file:")===0)||setTimeout(zt)},Ot.onabort=function(){Ot&&(rt(new AxiosError("Request aborted",AxiosError.ECONNABORTED,tt,Ot)),Ot=null)},Ot.onerror=function(){rt(new AxiosError("Network Error",AxiosError.ERR_NETWORK,tt,Ot)),Ot=null},Ot.ontimeout=function(){let At=ot.timeout?"timeout of "+ot.timeout+"ms exceeded":"timeout exceeded";const St=ot.transitional||transitionalDefaults;ot.timeoutErrorMessage&&(At=ot.timeoutErrorMessage),rt(new AxiosError(At,St.clarifyTimeoutError?AxiosError.ETIMEDOUT:AxiosError.ECONNABORTED,tt,Ot)),Ot=null},at===void 0&&st.setContentType(null),"setRequestHeader"in Ot&&utils$1.forEach(st.toJSON(),function(At,St){Ot.setRequestHeader(St,At)}),utils$1.isUndefined(ot.withCredentials)||(Ot.withCredentials=!!ot.withCredentials),ut&&ut!=="json"&&(Ot.responseType=ot.responseType),pt&&([bt,Mt]=progressEventReducer(pt,!0),Ot.addEventListener("progress",bt)),ct&&Ot.upload&&([ft,ht]=progressEventReducer(ct),Ot.upload.addEventListener("progress",ft),Ot.upload.addEventListener("loadend",ht)),(ot.cancelToken||ot.signal)&&(dt=vt=>{Ot&&(rt(!vt||vt.type?new CanceledError(null,tt,Ot):vt),Ot.abort(),Ot=null)},ot.cancelToken&&ot.cancelToken.subscribe(dt),ot.signal&&(ot.signal.aborted?dt():ot.signal.addEventListener("abort",dt)));const yt=parseProtocol(ot.url);if(yt&&platform.protocols.indexOf(yt)===-1){rt(new AxiosError("Unsupported protocol "+yt+":",AxiosError.ERR_BAD_REQUEST,tt));return}Ot.send(at||null)})},composeSignals=(tt,nt)=>{const{length:et}=tt=tt?tt.filter(Boolean):[];if(nt||et){let rt=new AbortController,ot;const at=function(pt){if(!ot){ot=!0,ut();const dt=pt instanceof Error?pt:this.reason;rt.abort(dt instanceof AxiosError?dt:new CanceledError(dt instanceof Error?dt.message:dt))}};let st=nt&&setTimeout(()=>{st=null,at(new AxiosError(`timeout ${nt} of ms exceeded`,AxiosError.ETIMEDOUT))},nt);const ut=()=>{tt&&(st&&clearTimeout(st),st=null,tt.forEach(pt=>{pt.unsubscribe?pt.unsubscribe(at):pt.removeEventListener("abort",at)}),tt=null)};tt.forEach(pt=>pt.addEventListener("abort",at));const{signal:ct}=rt;return ct.unsubscribe=()=>utils$1.asap(ut),ct}},streamChunk=function*(tt,nt){let et=tt.byteLength;if(et<nt){yield tt;return}let rt=0,ot;for(;rt<et;)ot=rt+nt,yield tt.slice(rt,ot),rt=ot},readBytes=async function*(tt,nt){for await(const et of readStream(tt))yield*streamChunk(et,nt)},readStream=async function*(tt){if(tt[Symbol.asyncIterator]){yield*tt;return}const nt=tt.getReader();try{for(;;){const{done:et,value:rt}=await nt.read();if(et)break;yield rt}}finally{await nt.cancel()}},trackStream=(tt,nt,et,rt)=>{const ot=readBytes(tt,nt);let at=0,st,ut=ct=>{st||(st=!0,rt&&rt(ct))};return new ReadableStream({async pull(ct){try{const{done:pt,value:dt}=await ot.next();if(pt){ut(),ct.close();return}let ft=dt.byteLength;if(et){let bt=at+=ft;et(bt)}ct.enqueue(new Uint8Array(dt))}catch(pt){throw ut(pt),pt}},cancel(ct){return ut(ct),ot.return()}},{highWaterMark:2})},isFetchSupported=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",isReadableStreamSupported=isFetchSupported&&typeof ReadableStream=="function",encodeText=isFetchSupported&&(typeof TextEncoder=="function"?(tt=>nt=>tt.encode(nt))(new TextEncoder):async tt=>new Uint8Array(await new Response(tt).arrayBuffer())),test=(tt,...nt)=>{try{return!!tt(...nt)}catch{return!1}},supportsRequestStream=isReadableStreamSupported&&test(()=>{let tt=!1;const nt=new Request(platform.origin,{body:new ReadableStream,method:"POST",get duplex(){return tt=!0,"half"}}).headers.has("Content-Type");return tt&&!nt}),DEFAULT_CHUNK_SIZE=64*1024,supportsResponseStream=isReadableStreamSupported&&test(()=>utils$1.isReadableStream(new Response("").body)),resolvers={stream:supportsResponseStream&&(tt=>tt.body)};isFetchSupported&&(tt=>{["text","arrayBuffer","blob","formData","stream"].forEach(nt=>{!resolvers[nt]&&(resolvers[nt]=utils$1.isFunction(tt[nt])?et=>et[nt]():(et,rt)=>{throw new AxiosError(`Response type '${nt}' is not supported`,AxiosError.ERR_NOT_SUPPORT,rt)})})})(new Response);const getBodyLength=async tt=>{if(tt==null)return 0;if(utils$1.isBlob(tt))return tt.size;if(utils$1.isSpecCompliantForm(tt))return(await new Request(platform.origin,{method:"POST",body:tt}).arrayBuffer()).byteLength;if(utils$1.isArrayBufferView(tt)||utils$1.isArrayBuffer(tt))return tt.byteLength;if(utils$1.isURLSearchParams(tt)&&(tt=tt+""),utils$1.isString(tt))return(await encodeText(tt)).byteLength},resolveBodyLength=async(tt,nt)=>{const et=utils$1.toFiniteNumber(tt.getContentLength());return et??getBodyLength(nt)},fetchAdapter=isFetchSupported&&(async tt=>{let{url:nt,method:et,data:rt,signal:ot,cancelToken:at,timeout:st,onDownloadProgress:ut,onUploadProgress:ct,responseType:pt,headers:dt,withCredentials:ft="same-origin",fetchOptions:bt}=resolveConfig(tt);pt=pt?(pt+"").toLowerCase():"text";let ht=composeSignals([ot,at&&at.toAbortSignal()],st),Mt;const mt=ht&&ht.unsubscribe&&(()=>{ht.unsubscribe()});let Ot;try{if(ct&&supportsRequestStream&&et!=="get"&&et!=="head"&&(Ot=await resolveBodyLength(dt,rt))!==0){let St=new Request(nt,{method:"POST",body:rt,duplex:"half"}),Et;if(utils$1.isFormData(rt)&&(Et=St.headers.get("content-type"))&&dt.setContentType(Et),St.body){const[Tt,Rt]=progressEventDecorator(Ot,progressEventReducer(asyncDecorator(ct)));rt=trackStream(St.body,DEFAULT_CHUNK_SIZE,Tt,Rt)}}utils$1.isString(ft)||(ft=ft?"include":"omit");const zt="credentials"in Request.prototype;Mt=new Request(nt,{...bt,signal:ht,method:et.toUpperCase(),headers:dt.normalize().toJSON(),body:rt,duplex:"half",credentials:zt?ft:void 0});let yt=await fetch(Mt);const vt=supportsResponseStream&&(pt==="stream"||pt==="response");if(supportsResponseStream&&(ut||vt&&mt)){const St={};["status","statusText","headers"].forEach(Ct=>{St[Ct]=yt[Ct]});const Et=utils$1.toFiniteNumber(yt.headers.get("content-length")),[Tt,Rt]=ut&&progressEventDecorator(Et,progressEventReducer(asyncDecorator(ut),!0))||[];yt=new Response(trackStream(yt.body,DEFAULT_CHUNK_SIZE,Tt,()=>{Rt&&Rt(),mt&&mt()}),St)}pt=pt||"text";let At=await resolvers[utils$1.findKey(resolvers,pt)||"text"](yt,tt);return!vt&&mt&&mt(),await new Promise((St,Et)=>{settle(St,Et,{data:At,headers:AxiosHeaders.from(yt.headers),status:yt.status,statusText:yt.statusText,config:tt,request:Mt})})}catch(zt){throw mt&&mt(),zt&&zt.name==="TypeError"&&/fetch/i.test(zt.message)?Object.assign(new AxiosError("Network Error",AxiosError.ERR_NETWORK,tt,Mt),{cause:zt.cause||zt}):AxiosError.from(zt,zt&&zt.code,tt,Mt)}}),knownAdapters={http:httpAdapter,xhr:xhrAdapter,fetch:fetchAdapter};utils$1.forEach(knownAdapters,(tt,nt)=>{if(tt){try{Object.defineProperty(tt,"name",{value:nt})}catch{}Object.defineProperty(tt,"adapterName",{value:nt})}});const renderReason=tt=>`- ${tt}`,isResolvedHandle=tt=>utils$1.isFunction(tt)||tt===null||tt===!1,adapters={getAdapter:tt=>{tt=utils$1.isArray(tt)?tt:[tt];const{length:nt}=tt;let et,rt;const ot={};for(let at=0;at<nt;at++){et=tt[at];let st;if(rt=et,!isResolvedHandle(et)&&(rt=knownAdapters[(st=String(et)).toLowerCase()],rt===void 0))throw new AxiosError(`Unknown adapter '${st}'`);if(rt)break;ot[st||"#"+at]=rt}if(!rt){const at=Object.entries(ot).map(([ut,ct])=>`adapter ${ut} `+(ct===!1?"is not supported by the environment":"is not available in the build"));let st=nt?at.length>1?`since :
|
794
794
|
`+at.map(renderReason).join(`
|
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
|
-
`+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;const
|
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}}}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}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.DLr5MCWa.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}),Lt=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}),Lt]})})})})}}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{convertTimeToDate 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,isTimeType as Z,_extends$Q as _,range$1 as a,DEFAULT_IFRAME_SANDBOX_POLICY as a$,isDecimalType as a0,isStringType as a1,isEmptyType as a2,isDatetimeType as a3,isDateType as a4,isObjectType as a5,isBytesType as a6,isNumericType as a7,isCategoricalType as a8,isListType as a9,getGray30 as aA,getCategoricalColorsArray as aB,getDivergingColorsArray as aC,getSequentialColorsArray as aD,getBlue80 as aE,debounce$4 as aF,Global as aG,_baseMerge as aH,_createAssigner as aI,withTheme as aJ,DynamicIcon as aK,toaster as aL,Kind as aM,AlertElement as aN,_assertThisInitialized$e as aO,StyledInlineCode as aP,ErrorElement as aQ,axios as aR,Skeleton$1 as aS,Skeleton as aT,hoistNonReactStatics$2 as aU,ensureError as aV,lib$3 as aW,parseToRgba as aX,DeckGlJsonChart$1 as aY,_unsupportedIterableToArray$l as aZ,DEFAULT_IFRAME_FEATURE_POLICY as a_,isRangeIndexType as aa,useTheme as ab,Arrow$2 as ac,logError as ad,isArray$k as ae,_defineProperty$u as af,_objectWithoutProperties$o as ag,_typeof$g as ah,jsx as ai,css$2 as aj,_toConsumableArray$3 as ak,transparentize as al,convertRemToPx as am,mix$1 as an,logWarning as ao,isEqual$1 as ap,StyledTooltipContentWrapper as aq,StreamlitMarkdown$1 as ar,PLACEMENT as as,ACCESSIBILITY_TYPE as at,hasLightBackgroundColor as au,Popover$1 as av,LibContext as aw,jsxs as ax,Resizable as ay,getGray70 as az,reactDomExports as b,toPropertyKey as b$,darken as b0,BaseButtonSize as b1,BaseButtonKind as b2,BaseButtonTooltip as b3,DynamicButtonLabel as b4,IsSidebarContext as b5,Placement as b6,getGray90 as b7,getIncreasingGreen as b8,getDecreasingRed as b9,isFocusVisible as bA,getOverride as bB,getOverrideProps as bC,Checkbox$1 as bD,StyledContent as bE,StyledCheckbox$1 as bF,BaseColorPicker$1 as bG,useStyletron as bH,mergeOverride as bI,toObjectOverride as bJ,Icon$1 as bK,UIDConsumer as bL,StatefulMenu as bM,mergeOverrides as bN,ChevronDown$1 as bO,ThemeContext as bP,forkFocus as bQ,forkBlur as bR,Select as bS,without$1 as bT,fuzzyFilterSelectOptions as bU,TYPE as bV,VirtualDropdown as bW,isPresetTheme as bX,classNames as bY,UISelectbox as bZ,isValidFormId as b_,PlotlyChart$1 as ba,keysToSnakeCase as bb,WindowDimensionsContext as bc,Video$1 as bd,zip$1 as be,FileUploaderState as bf,UploadedFileInfo as bg,StyledSpinner as bh,ENABLE_PERIPHERALS_DOCS_URL as bi,Icon$2 as bj,BaseButton as bk,blend as bl,labelVisibilityProtoValueToEnum as bm,TooltipIcon as bn,WidgetLabel as bo,Tooltip as bp,styled as bq,getOverrides as br,LocaleContext as bs,ButtonGroup$1 as bt,LabelVisibilityMessage as bu,StyledWidgetLabelHelpInline as bv,themeColors as bw,isMobile_1 as bx,CAMERA_PERMISSION_URL as by,StyledWidgetLabelHelp as bz,_hasPath as c,_setPrototypeOf$e as c0,hexToRgb as c1,withWrapper as c2,StyledWidgetInstructions as c3,isFromMac as c4,CUSTOM_INPUT_TYPE as c5,SIZE$1 as c6,DeleteAlt$1 as c7,ADJOINED as c8,filterOptions as c9,ENHANCER_POSITION as ca,pick$1 as cb,Slider$2 as cc,isFromWindows as cd,__awaiter as ce,__generator as cf,__spread as cg,PropTypes as ch,ChevronLeft as ci,ChevronRight as cj,isInForm as ck,toString_1 as cl,TextInput$1 as cm,ThemeProvider$1 as cn,createThemedStyled as co,createThemedUseStyletron as cp,createThemedWithStyle as cq,expandBorderStyles as cr,withStyle as cs,getAugmentedNamespace as ct,reactIsExports$1 as cu,NumberInput$1 as cv,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.DzzdqD8t.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}),Lt=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}),Lt]})})})})}}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{convertTimeToDate 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,isTimeType as Z,_extends$Q as _,range$1 as a,DEFAULT_IFRAME_FEATURE_POLICY as a$,isDecimalType as a0,isStringType as a1,isEmptyType as a2,isDatetimeType as a3,isDateType as a4,isObjectType as a5,isBytesType as a6,isNumericType as a7,isCategoricalType as a8,isListType as a9,getGray70 as aA,getGray30 as aB,getCategoricalColorsArray as aC,getDivergingColorsArray as aD,getSequentialColorsArray as aE,getBlue80 as aF,debounce$4 as aG,Global as aH,_baseMerge as aI,_createAssigner as aJ,withTheme as aK,DynamicIcon as aL,toaster as aM,Kind as aN,AlertElement as aO,_assertThisInitialized$e as aP,StyledInlineCode as aQ,ErrorElement as aR,axios as aS,Skeleton$1 as aT,Skeleton as aU,hoistNonReactStatics$2 as aV,ensureError as aW,lib$3 as aX,parseToRgba as aY,DeckGlJsonChart$1 as aZ,_unsupportedIterableToArray$l as a_,isRangeIndexType as aa,useTheme as ab,Arrow$2 as ac,logError as ad,isArray$k as ae,_defineProperty$u as af,_objectWithoutProperties$o as ag,_typeof$g as ah,jsx as ai,css$2 as aj,_toConsumableArray$3 as ak,transparentize as al,convertRemToPx as am,mix$1 as an,logWarning as ao,getStyledCell as ap,isEqual$1 as aq,StyledTooltipContentWrapper as ar,StreamlitMarkdown$1 as as,PLACEMENT as at,ACCESSIBILITY_TYPE as au,hasLightBackgroundColor as av,Popover$1 as aw,LibContext as ax,jsxs as ay,Resizable as az,reactDomExports as b,isValidFormId as b$,DEFAULT_IFRAME_SANDBOX_POLICY as b0,darken as b1,BaseButtonSize as b2,BaseButtonKind as b3,BaseButtonTooltip as b4,DynamicButtonLabel as b5,IsSidebarContext as b6,Placement as b7,getGray90 as b8,getIncreasingGreen as b9,StyledWidgetLabelHelp as bA,isFocusVisible as bB,getOverride as bC,getOverrideProps as bD,Checkbox$1 as bE,StyledContent as bF,StyledCheckbox$1 as bG,BaseColorPicker$1 as bH,useStyletron as bI,mergeOverride as bJ,toObjectOverride as bK,Icon$1 as bL,UIDConsumer as bM,StatefulMenu as bN,mergeOverrides as bO,ChevronDown$1 as bP,ThemeContext as bQ,forkFocus as bR,forkBlur as bS,Select as bT,without$1 as bU,fuzzyFilterSelectOptions as bV,TYPE as bW,VirtualDropdown as bX,isPresetTheme as bY,classNames as bZ,UISelectbox as b_,getDecreasingRed as ba,PlotlyChart$1 as bb,keysToSnakeCase as bc,WindowDimensionsContext as bd,Video$1 as be,zip$1 as bf,FileUploaderState as bg,UploadedFileInfo as bh,StyledSpinner as bi,ENABLE_PERIPHERALS_DOCS_URL as bj,Icon$2 as bk,BaseButton as bl,blend as bm,labelVisibilityProtoValueToEnum as bn,TooltipIcon as bo,WidgetLabel as bp,Tooltip as bq,styled as br,getOverrides as bs,LocaleContext as bt,ButtonGroup$1 as bu,LabelVisibilityMessage as bv,StyledWidgetLabelHelpInline as bw,themeColors as bx,isMobile_1 as by,CAMERA_PERMISSION_URL as bz,_hasPath as c,toPropertyKey as c0,_setPrototypeOf$e as c1,hexToRgb as c2,withWrapper as c3,StyledWidgetInstructions as c4,isFromMac as c5,CUSTOM_INPUT_TYPE as c6,SIZE$1 as c7,DeleteAlt$1 as c8,ADJOINED as c9,filterOptions as ca,ENHANCER_POSITION as cb,pick$1 as cc,Slider$2 as cd,isFromWindows as ce,__awaiter as cf,__generator as cg,__spread as ch,PropTypes as ci,ChevronLeft as cj,ChevronRight as ck,isInForm as cl,toString_1 as cm,TextInput$1 as cn,ThemeProvider$1 as co,createThemedStyled as cp,createThemedUseStyletron as cq,createThemedWithStyle as cr,expandBorderStyles as cs,withStyle as ct,getAugmentedNamespace as cu,reactIsExports$1 as cv,NumberInput$1 as cw,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};
|