@stlite/desktop 0.43.1 → 0.44.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/bin/dump_artifacts.js +1 -1
  2. package/build/asset-manifest.json +40 -38
  3. package/build/index.html +1 -1
  4. package/build/static/js/1122.422f58fc.chunk.js +1 -0
  5. package/build/static/js/{144.2477d27a.chunk.js → 144.046792d9.chunk.js} +1 -1
  6. package/build/static/js/{1729.528431ca.chunk.js → 1729.d59ed152.chunk.js} +1 -1
  7. package/build/static/js/{1740.32a0c10e.chunk.js → 1740.2c71a97a.chunk.js} +1 -1
  8. package/build/static/js/{1839.a1fce0e6.chunk.js → 1839.0d0dcac8.chunk.js} +1 -1
  9. package/build/static/js/2372.844b5190.chunk.js +2 -0
  10. package/build/static/js/2372.844b5190.chunk.js.LICENSE.txt +10 -0
  11. package/build/static/js/2753.c27b6faa.chunk.js +1 -0
  12. package/build/static/js/2873.f5c04f3b.chunk.js +1 -0
  13. package/build/static/js/3208.55e0b2fa.chunk.js +1 -0
  14. package/build/static/js/{4021.16f5498a.chunk.js → 4021.ec2e87b0.chunk.js} +1 -1
  15. package/build/static/js/4482.a9238ad0.chunk.js +1 -0
  16. package/build/static/js/4494.6bb6fb20.chunk.js +1 -0
  17. package/build/static/js/4694.aa16aaee.chunk.js +1 -0
  18. package/build/static/js/4721.2185bda3.chunk.js +1 -0
  19. package/build/static/js/{4724.366489f9.chunk.js → 4724.374578aa.chunk.js} +1 -1
  20. package/build/static/js/4785.76a05d79.chunk.js +1 -0
  21. package/build/static/js/4831.391fe620.chunk.js +1 -0
  22. package/build/static/js/5299.beb80829.chunk.js +1 -0
  23. package/build/static/js/6093.209cd165.chunk.js +1 -0
  24. package/build/static/js/6134.b9e5b2db.chunk.js +1 -0
  25. package/build/static/js/6802.df955c77.chunk.js +1 -0
  26. package/build/static/js/698.116a166b.chunk.js +1 -0
  27. package/build/static/js/7125.afecc159.chunk.js +1 -0
  28. package/build/static/js/7579.ea965a43.chunk.js +1 -0
  29. package/build/static/js/7696.c9589682.chunk.js +1 -0
  30. package/build/static/js/8050.029f3dc8.chunk.js +1 -0
  31. package/build/static/js/8097.4837946f.chunk.js +2 -0
  32. package/build/static/js/8186.2f2e42e5.chunk.js +2 -0
  33. package/build/static/js/8186.2f2e42e5.chunk.js.LICENSE.txt +135 -0
  34. package/build/static/js/8850.6abc7336.chunk.js +1 -0
  35. package/build/static/js/{9166.d35e76c1.chunk.js → 9166.f234f6b4.chunk.js} +2 -2
  36. package/build/static/js/9311.7c7348b0.chunk.js +1 -0
  37. package/build/static/js/{5703.a68ecfdc.chunk.js → 9449.a2c361bb.chunk.js} +2 -2
  38. package/build/static/js/9699.df050cd6.chunk.js +1 -0
  39. package/build/static/js/9813.1821ef79.chunk.js +1 -0
  40. package/build/static/js/main.ca9c9d66.js +28 -0
  41. package/build/static/js/{main.94addb49.js.LICENSE.txt → main.ca9c9d66.js.LICENSE.txt} +0 -20
  42. package/package.json +5 -5
  43. package/build/static/css/7895.c24b25fa.chunk.css +0 -1
  44. package/build/static/js/1619.c039c65c.chunk.js +0 -1
  45. package/build/static/js/1687.a144d952.chunk.js +0 -1
  46. package/build/static/js/2873.cf145dcb.chunk.js +0 -1
  47. package/build/static/js/3185.d317b162.chunk.js +0 -1
  48. package/build/static/js/4232.b0bbe2e6.chunk.js +0 -2
  49. package/build/static/js/4232.b0bbe2e6.chunk.js.LICENSE.txt +0 -52
  50. package/build/static/js/4482.2f210b65.chunk.js +0 -1
  51. package/build/static/js/4494.c6ab91c6.chunk.js +0 -1
  52. package/build/static/js/4694.7e63f0ef.chunk.js +0 -1
  53. package/build/static/js/4785.3ac653c2.chunk.js +0 -1
  54. package/build/static/js/4831.3170175f.chunk.js +0 -1
  55. package/build/static/js/5037.03a99abb.chunk.js +0 -1
  56. package/build/static/js/5299.ad735cb8.chunk.js +0 -1
  57. package/build/static/js/5361.bc476229.chunk.js +0 -2
  58. package/build/static/js/6134.5e3e3f58.chunk.js +0 -1
  59. package/build/static/js/6802.ffb6887c.chunk.js +0 -1
  60. package/build/static/js/698.7dce549b.chunk.js +0 -1
  61. package/build/static/js/7125.21833215.chunk.js +0 -1
  62. package/build/static/js/7579.7b9cc9ee.chunk.js +0 -1
  63. package/build/static/js/7652.f436cbbf.chunk.js +0 -1
  64. package/build/static/js/7696.406d4ef7.chunk.js +0 -1
  65. package/build/static/js/7895.198c568c.chunk.js +0 -1
  66. package/build/static/js/9311.f444417e.chunk.js +0 -1
  67. package/build/static/js/9813.c894655a.chunk.js +0 -1
  68. package/build/static/js/main.94addb49.js +0 -28
  69. /package/build/static/css/{7652.c24b25fa.chunk.css → 8050.c24b25fa.chunk.css} +0 -0
  70. /package/build/static/css/{5703.1edfa457.chunk.css → 9449.1edfa457.chunk.css} +0 -0
  71. /package/build/static/css/{1619.7ce51b75.chunk.css → 9699.7ce51b75.chunk.css} +0 -0
  72. /package/build/static/js/{5361.bc476229.chunk.js.LICENSE.txt → 8097.4837946f.chunk.js.LICENSE.txt} +0 -0
  73. /package/build/static/js/{9166.d35e76c1.chunk.js.LICENSE.txt → 9166.f234f6b4.chunk.js.LICENSE.txt} +0 -0
  74. /package/build/static/js/{5703.a68ecfdc.chunk.js.LICENSE.txt → 9449.a2c361bb.chunk.js.LICENSE.txt} +0 -0
@@ -98,26 +98,6 @@ object-assign
98
98
  * Licensed MIT © Zeno Rocha
99
99
  */
100
100
 
101
- /*! Moment Duration Format v2.2.2
102
- * https://github.com/jsmreese/moment-duration-format
103
- * Date: 2018-02-16
104
- *
105
- * Duration format plugin function for the Moment.js library
106
- * http://momentjs.com/
107
- *
108
- * Copyright 2018 John Madhavan-Reese
109
- * Released under the MIT license
110
- */
111
-
112
- /**
113
- * @license
114
- * Lodash <https://lodash.com/>
115
- * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
116
- * Released under MIT license <https://lodash.com/license>
117
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
118
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
119
- */
120
-
121
101
  /**
122
102
  * @license React
123
103
  * react-is.production.min.js
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stlite/desktop",
3
- "version": "0.43.1",
3
+ "version": "0.44.0",
4
4
  "license": "Apache-2.0",
5
5
  "homepage": "/",
6
6
  "main": "./build/electron/main.js",
@@ -58,10 +58,10 @@
58
58
  },
59
59
  "devDependencies": {
60
60
  "@craco/craco": "^7.0.0",
61
- "@stlite/common": "^0.43.1",
62
- "@stlite/common-react": "^0.43.1",
63
- "@stlite/kernel": "^0.43.1",
64
- "@streamlit/app": "1.27.0",
61
+ "@stlite/common": "^0.44.0",
62
+ "@stlite/common-react": "^0.44.0",
63
+ "@stlite/kernel": "^0.44.0",
64
+ "@streamlit/app": "1.30.0",
65
65
  "@testing-library/react": "^12.1.4",
66
66
  "@testing-library/user-event": "^14.0.0",
67
67
  "@types/jest": "^27.4.3",
@@ -1 +0,0 @@
1
- .vega-embed{box-sizing:border-box;display:inline-block;position:relative}.vega-embed.has-actions{padding-right:38px}.vega-embed details:not([open])>:not(summary){display:none!important}.vega-embed summary{background:#fff;border:1px solid #aaa;border-radius:999px;box-shadow:1px 1px 3px rgba(0,0,0,.1);color:#1b1e23;cursor:pointer;line-height:0px;list-style:none;opacity:.2;padding:6px;position:absolute;right:0;top:0;transition:opacity .4s ease-in;z-index:1000}.vega-embed summary::-webkit-details-marker{display:none}.vega-embed summary:active{box-shadow:inset 0 0 0 1px #aaa}.vega-embed summary svg{height:14px;width:14px}.vega-embed details[open] summary{opacity:.7}.vega-embed:focus-within summary,.vega-embed:hover summary{opacity:1!important;transition:opacity .2s ease}.vega-embed .vega-actions{animation-duration:.15s;animation-name:scale-in;animation-timing-function:cubic-bezier(.2,0,.13,1.5);background:#fff;border:1px solid #d9d9d9;border-radius:4px;box-shadow:0 2px 8px 0 rgba(0,0,0,.2);display:flex;flex-direction:column;padding-bottom:8px;padding-top:8px;position:absolute;right:-9px;text-align:left;top:35px;z-index:1001}.vega-embed .vega-actions a{color:#434a56;font-family:sans-serif;font-size:14px;font-weight:600;padding:8px 16px;text-decoration:none;white-space:nowrap}.vega-embed .vega-actions a:focus,.vega-embed .vega-actions a:hover{background-color:#f7f7f9;color:#000}.vega-embed .vega-actions:after,.vega-embed .vega-actions:before{content:"";display:inline-block;position:absolute}.vega-embed .vega-actions:before{border:8px solid transparent;border-bottom-color:#d9d9d9;left:auto;right:14px;top:-16px}.vega-embed .vega-actions:after{border:7px solid transparent;border-bottom-color:#fff;left:auto;right:15px;top:-14px}.vega-embed .chart-wrapper.fit-x{width:100%}.vega-embed .chart-wrapper.fit-y{height:100%}.vega-embed-wrapper{max-width:100%;overflow:auto;padding-right:14px}@keyframes scale-in{0%{opacity:0;transform:scale(.6)}to{opacity:1;transform:scale(1)}}#vg-tooltip-element{border-radius:3px;box-shadow:2px 2px 4px rgba(0,0,0,.1);font-family:sans-serif;font-size:11px;padding:8px;position:fixed;visibility:hidden;z-index:1000}#vg-tooltip-element.visible{visibility:visible}#vg-tooltip-element h2{font-size:13px;margin-bottom:10px;margin-top:0}#vg-tooltip-element table{border-spacing:0}#vg-tooltip-element table tr{border:none}#vg-tooltip-element table tr td{overflow:hidden;padding-bottom:2px;padding-top:2px;text-overflow:ellipsis}#vg-tooltip-element table tr td.key{color:grey;max-width:150px;padding-right:4px;text-align:right}#vg-tooltip-element table tr td.value{display:block;max-height:7em;max-width:300px;text-align:left}
@@ -1 +0,0 @@
1
- "use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[1619],{72728:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Ke});var i=n(5057),o=n(66751),a=n(27179),l=n(52955),r=n(70800),s=n(60913),d=n(50120),u=n(65873),c=n(61918),m=n.n(c),h=n(59500),g=n(88084),f=n.n(g);n(56719),n(21763);const p=["true","t","yes","y","on","1"],b=["false","f","no","n","off","0"];function v(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e="\u26a0\ufe0f ".concat(e),{kind:o.p6.Text,readonly:!0,allowOverlay:!0,data:e+(t?"\n\n".concat(t,"\n"):""),displayData:e,isError:!0}}function y(e){return e.hasOwnProperty("isError")&&e.isError}function w(e){return e.hasOwnProperty("isMissingValue")&&e.isMissingValue}function x(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?{kind:o.p6.Loading,allowOverlay:!1,isMissingValue:!0}:{kind:o.p6.Loading,allowOverlay:!1}}function C(e,t){const n=t?"faded":"normal";return{kind:o.p6.Text,data:"",displayData:"",allowOverlay:!0,readonly:e,style:n}}function E(e){return{id:e.id,title:e.title,hasMenu:!1,themeOverride:e.themeOverride,icon:e.icon,...e.isStretched&&{grow:e.isIndex?1:3},...e.width&&{width:e.width}}}function M(e,t){return(0,d.le)(e)?t||{}:(0,d.le)(t)?e||{}:(0,u.merge)(e,t)}function T(e){if((0,d.le)(e))return[];if("number"===typeof e||"boolean"===typeof e)return[e];if(e instanceof Uint8Array&&(e=new TextDecoder("utf-8").decode(e)),"string"===typeof e){if(""===e)return[];if(!e.trim().startsWith("[")||!e.trim().endsWith("]"))return e.split(",");try{return JSON.parse(e)}catch(t){return[e]}}try{const t=JSON.parse(JSON.stringify(e,((e,t)=>"bigint"===typeof t?Number(t):t)));return(0,u.isArray)(t)?t.map((e=>["string","number","boolean","null"].includes(typeof e)?e:N(e))):[N(t)]}catch(t){return[N(e)]}}function N(e){try{try{return(0,u.toString)(e)}catch(t){return JSON.stringify(e,((e,t)=>"bigint"===typeof t?Number(t):t))}}catch(t){return"[".concat(typeof e,"]")}}function R(e){if((0,d.le)(e))return null;if("boolean"===typeof e)return e;const t=N(e).toLowerCase().trim();return""===t?null:!!p.includes(t)||!b.includes(t)&&void 0}function k(e){if((0,d.le)(e))return null;if((0,u.isArray)(e))return NaN;if("string"===typeof e){if(0===e.trim().length)return null;try{const t=m().unformat(e.trim());if((0,d.bb)(t))return t}catch(t){}}else if(e instanceof Int32Array)return Number(e[0]);return Number(e)}function _(e,t,n){return Number.isNaN(e)||!Number.isFinite(e)?"":(0,d.le)(t)||""===t?(0===n&&(e=Math.round(e)),m()(e).format((0,d.bb)(n)?"0,0.".concat("0".repeat(n)):"0,0.[0000]")):"percent"===t?new Intl.NumberFormat(void 0,{style:"percent",minimumFractionDigits:2,maximumFractionDigits:2}).format(e):["compact","scientific","engineering"].includes(t)?new Intl.NumberFormat(void 0,{notation:t}).format(e):(0,h.sprintf)(t,e)}function S(e,t){return"locale"===t?new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"medium"}).format(e.toDate()):"distance"===t?e.fromNow():"relative"===t?e.calendar():e.format(t)}function O(e){if((0,d.le)(e))return null;if(e instanceof Date)return isNaN(e.getTime())?void 0:e;if("string"===typeof e&&0===e.trim().length)return null;try{const t=Number(e);if(!isNaN(t)){let e=t;t>=10**18?e=t/1e3**3:t>=10**15?e=t/1e6:t>=10**12&&(e=t/1e3);const n=f().unix(e).utc();if(n.isValid())return n.toDate()}if("string"===typeof e){const t=f().utc(e);if(t.isValid())return t.toDate();const n=f().utc(e,[f().HTML5_FMT.TIME_MS,f().HTML5_FMT.TIME_SECONDS,f().HTML5_FMT.TIME]);if(n.isValid())return n.toDate()}}catch(t){return}}function I(e){if(e%1===0)return 0;let t=e.toString();return-1!==t.indexOf("e")&&(t=e.toLocaleString("fullwide",{useGrouping:!1,maximumFractionDigits:20})),-1===t.indexOf(".")?0:t.split(".")[1].length}const D=new RegExp(/(\r\n|\n|\r)/gm);function H(e){return-1!==e.indexOf("\n")?e.replace(D," "):e}var A=n(70714),V=n(28048);function z(e){const t={kind:o.p6.Text,data:"",displayData:"",allowOverlay:!0,contentAlignment:e.contentAlignment,readonly:!0,style:e.isIndex?"faded":"normal"};return{...e,kind:"object",sortMode:"default",isEditable:!1,getCell(e){try{const n=(0,d.bb)(e)?N(e):null,i=(0,d.bb)(n)?H(n):"";return{...t,data:n,displayData:i,isMissingValue:(0,d.le)(e)}}catch(n){return v(N(e),"The value cannot be interpreted as a string. Error: ".concat(n))}},getCellValue:e=>void 0===e.data?null:e.data}}z.isEditableType=!1;const F=z;function L(e){const t=e.columnTypeOptions||{};let n;if(t.validate)try{n=new RegExp(t.validate,"us")}catch(l){n="Invalid validate regex: ".concat(t.validate,".\nError: ").concat(l)}const i={kind:o.p6.Text,data:"",displayData:"",allowOverlay:!0,contentAlignment:e.contentAlignment,readonly:!e.isEditable,style:e.isIndex?"faded":"normal"},a=i=>{if((0,d.le)(i))return!e.isRequired;let o=N(i),a=!1;return t.max_chars&&o.length>t.max_chars&&(o=o.slice(0,t.max_chars),a=!0),!(n instanceof RegExp&&!1===n.test(o))&&(!a||o)};return{...e,kind:"text",sortMode:"default",validateInput:a,getCell(e,t){if("string"===typeof n)return v(N(e),n);if(t){const t=a(e);if(!1===t)return v(N(e),"Invalid input.");"string"===typeof t&&(e=t)}try{const t=(0,d.bb)(e)?N(e):null,n=(0,d.bb)(t)?H(t):"";return{...i,isMissingValue:(0,d.le)(t),data:t,displayData:n}}catch(l){return v("Incompatible value","The value cannot be interpreted as string. Error: ".concat(l))}},getCellValue:e=>void 0===e.data?null:e.data}}L.isEditableType=!0;const W=L;function j(e,t){return e=t.startsWith("+")||t.startsWith("-")?e.utcOffset(t,!1):e.tz(t)}function Y(e,t,n,i,a,l,r){var s;const u=M({format:n,step:i,timezone:r},t.columnTypeOptions);let c,m,h;if((0,d.bb)(u.timezone))try{var g;c=(null===(g=j(f()(),u.timezone))||void 0===g?void 0:g.utcOffset())||void 0}catch(y){}(0,d.bb)(u.min_value)&&(m=O(u.min_value)||void 0),(0,d.bb)(u.max_value)&&(h=O(u.max_value)||void 0);const p={kind:o.p6.Custom,allowOverlay:!0,copyData:"",readonly:!t.isEditable,contentAlign:t.contentAlignment,style:t.isIndex?"faded":"normal",data:{kind:"date-picker-cell",date:void 0,displayDate:"",step:(null===(s=u.step)||void 0===s?void 0:s.toString())||"1",format:a,min:m,max:h}},b=e=>{const n=O(e);return null===n?!t.isRequired:void 0!==n&&(!((0,d.bb)(m)&&l(n)<l(m))&&!((0,d.bb)(h)&&l(n)>l(h)))};return{...t,kind:e,sortMode:"default",validateInput:b,getCell(e,t){if(!0===t){const t=b(e);if(!1===t)return v(N(e),"Invalid input.");t instanceof Date&&(e=t)}const i=O(e);let o="",a="",l=c;if(void 0===i)return v(N(e),"The value cannot be interpreted as a datetime object.");if(null!==i){let e=f().utc(i);if(!e.isValid())return v(N(i),"This should never happen. Please report this bug. \nError: ".concat(e.toString()));if(u.timezone){try{e=j(e,u.timezone)}catch(y){return v(e.toISOString(),"Failed to adjust to the provided timezone: ".concat(u.timezone,". \nError: ").concat(y))}l=e.utcOffset()}try{a=S(e,u.format||n)}catch(y){return v(e.toISOString(),"Failed to format the date for rendering with: ".concat(u.format,". \nError: ").concat(y))}o=S(e,n)}return{...p,copyData:o,isMissingValue:(0,d.le)(i),data:{...p.data,date:i,displayDate:a,timezoneOffset:l}}},getCellValue(e){var t;return(0,d.le)(null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.date)?null:l(e.data.date)}}}function B(e){var t,n,i,o;let a="YYYY-MM-DD HH:mm:ss";(null===(t=e.columnTypeOptions)||void 0===t?void 0:t.step)>=60?a="YYYY-MM-DD HH:mm":(null===(n=e.columnTypeOptions)||void 0===n?void 0:n.step)<1&&(a="YYYY-MM-DD HH:mm:ss.SSS");const l=null===(i=e.arrowType)||void 0===i||null===(i=i.meta)||void 0===i?void 0:i.timezone,r=(0,d.bb)(l)||(0,d.bb)(null===e||void 0===e||null===(o=e.columnTypeOptions)||void 0===o?void 0:o.timezone);return Y("datetime",e,r?a+"Z":a,1,"datetime-local",(e=>r?e.toISOString():e.toISOString().replace("Z","")),l)}function P(e){var t,n;let i="HH:mm:ss";return(null===(t=e.columnTypeOptions)||void 0===t?void 0:t.step)>=60?i="HH:mm":(null===(n=e.columnTypeOptions)||void 0===n?void 0:n.step)<1&&(i="HH:mm:ss.SSS"),Y("time",e,i,1,"time",(e=>e.toISOString().split("T")[1].replace("Z","")))}function Z(e){return Y("date",e,"YYYY-MM-DD",1,"date",(e=>e.toISOString().split("T")[0]))}function q(e){const t={kind:o.p6.Boolean,data:!1,allowOverlay:!1,contentAlign:e.contentAlignment,readonly:!e.isEditable,style:e.isIndex?"faded":"normal"};return{...e,kind:"checkbox",sortMode:"default",getCell(e){let n=null;return n=R(e),void 0===n?v(N(e),"The value cannot be interpreted as boolean."):{...t,data:n,isMissingValue:(0,d.le)(n)}},getCellValue:e=>void 0===e.data?null:e.data}}B.isEditableType=!0,P.isEditableType=!0,Z.isEditableType=!0,q.isEditableType=!0;const J=q;function U(e){return e.startsWith("int")&&!e.startsWith("interval")||"range"===e||e.startsWith("uint")}function G(e){const t=V.fu.getTypeName(e.arrowType),n=M({step:U(t)?1:void 0,min_value:t.startsWith("uint")?0:void 0},e.columnTypeOptions),i=(0,d.le)(n.min_value)||n.min_value<0,a=(0,d.bb)(n.step)&&!Number.isNaN(n.step)?I(n.step):void 0,l={kind:o.p6.Number,data:void 0,displayData:"",readonly:!e.isEditable,allowOverlay:!0,contentAlign:e.contentAlignment||"right",style:e.isIndex?"faded":"normal",allowNegative:i,fixedDecimals:a},r=t=>{let i=k(t);if((0,d.le)(i))return!e.isRequired;if(Number.isNaN(i))return!1;let o=!1;return(0,d.bb)(n.max_value)&&i>n.max_value&&(i=n.max_value,o=!0),!((0,d.bb)(n.min_value)&&i<n.min_value)&&(!o||i)};return{...e,kind:"number",sortMode:"smart",validateInput:r,getCell(e,t){if(!0===t){const t=r(e);if(!1===t)return v(N(e),"Invalid input.");"number"===typeof t&&(e=t)}let i=k(e),o="";if((0,d.bb)(i)){if(Number.isNaN(i))return v(N(e),"The value cannot be interpreted as a number.");if((0,d.bb)(a)&&(s=i,i=0===(u=a)?Math.trunc(s):Math.trunc(s*10**u)/10**u),Number.isInteger(i)&&!Number.isSafeInteger(i))return v(N(e),"The value is larger than the maximum supported integer values in number columns (2^53).");try{o=_(i,n.format,a)}catch(c){return v(N(i),(0,d.bb)(n.format)?"Failed to format the number based on the provided format configuration: (".concat(n.format,"). Error: ").concat(c):"Failed to format the number. Error: ".concat(c))}}var s,u;return{...l,data:i,displayData:o,isMissingValue:(0,d.le)(i)}},getCellValue:e=>void 0===e.data?null:e.data}}G.isEditableType=!0;const K=G;function X(e){let t="string";const n=M({options:"bool"===V.fu.getTypeName(e.arrowType)?[!0,!1]:[]},e.columnTypeOptions),i=new Set(n.options.map((e=>typeof e)));1===i.size&&(i.has("number")||i.has("bigint")?t="number":i.has("boolean")&&(t="boolean"));const a={kind:o.p6.Custom,allowOverlay:!0,copyData:"",contentAlign:e.contentAlignment,readonly:!e.isEditable,data:{kind:"dropdown-cell",allowedValues:[...!0!==e.isRequired?[null]:[],...n.options.filter((e=>null!==e&&""!==e)).map((e=>N(e)))],value:"",readonly:!e.isEditable}};return{...e,kind:"selectbox",sortMode:"default",getCell(e,t){let n=null;return(0,d.bb)(e)&&""!==e&&(n=N(e)),t&&!a.data.allowedValues.includes(n)?v(N(n),"The value is not part of the allowed options."):{...a,isMissingValue:null===n,copyData:n||"",data:{...a.data,value:n}}},getCellValue(e){var n,i,o,a,l,r,s;return(0,d.le)(null===(n=e.data)||void 0===n?void 0:n.value)||""===(null===(i=e.data)||void 0===i?void 0:i.value)?null:"number"===t?null!==(a=k(null===(l=e.data)||void 0===l?void 0:l.value))&&void 0!==a?a:null:"boolean"===t?null!==(r=R(null===(s=e.data)||void 0===s?void 0:s.value))&&void 0!==r?r:null:null===(o=e.data)||void 0===o?void 0:o.value}}}X.isEditableType=!0;const Q=X;function $(e){const t={kind:o.p6.Bubble,data:[],allowOverlay:!0,contentAlign:e.contentAlignment,style:e.isIndex?"faded":"normal"};return{...e,kind:"list",sortMode:"default",isEditable:!1,getCell(e){const n=(0,d.le)(e)?[]:T(e);return{...t,data:n,isMissingValue:(0,d.le)(e),copyData:(0,d.le)(e)?"":N(n.map((e=>(0,u.isString)(e)&&e.includes(",")?e.replace(/,/g," "):e)))}},getCellValue:e=>(0,d.le)(e.data)||w(e)?null:e.data}}$.isEditableType=!1;const ee=$;function te(e,t,n){const i=new RegExp("".concat(e,"[,\\s].*{(?:[^}]*[\\s;]{1})?").concat(t,":\\s*([^;}]+)[;]?.*}"),"gm");n=n.replace(/{/g," {");const o=i.exec(n);if(o)return o[1].trim()}function ne(e,t){const n=e.types.index[t],i=e.indexNames[t];let o=!0;return"range"===V.fu.getTypeName(n)&&(o=!1),{id:"index-".concat(t),name:i,title:i,isEditable:o,arrowType:n,isIndex:!0,isHidden:!1}}function ie(e,t){const n=e.columns[0][t];let i,o=e.types.data[t];if((0,d.le)(o)&&(o={meta:null,numpy_type:"object",pandas_type:"object"}),"categorical"===V.fu.getTypeName(o)){const n=e.getCategoricalOptions(t);(0,d.bb)(n)&&(i={options:n})}return{id:"column-".concat(n,"-").concat(t),name:n,title:n,isEditable:!0,arrowType:o,columnTypeOptions:i,isIndex:!1,isHidden:!1}}function oe(e,t){let n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;if("object"===e.kind)n=e.getCell((0,d.bb)(t.content)?H(V.fu.format(t.content,t.contentType,t.field)):null);else if(["time","date","datetime"].includes(e.kind)&&(0,d.bb)(t.content)&&("number"===typeof t.content||"bigint"===typeof t.content)){var a;let i;i="time"===V.fu.getTypeName(e.arrowType)&&(0,d.bb)(null===(a=t.field)||void 0===a||null===(a=a.type)||void 0===a?void 0:a.unit)?f().unix(V.fu.adjustTimestamp(t.content,t.field)).utc().toDate():f().utc(Number(t.content)).toDate(),n=e.getCell(i)}else n=e.getCell(t.content);if(y(n))return n;if(!e.isEditable){if((0,d.bb)(t.displayContent)){var l;const e=H(t.displayContent);n.kind===o.p6.Text||n.kind===o.p6.Number?n={...n,displayData:e}:n.kind===o.p6.Custom&&"date-picker-cell"===(null===(l=n.data)||void 0===l?void 0:l.kind)&&(n={...n,data:{...n.data,displayDate:e}})}i&&t.cssId&&(n=function(e,t,n){const i={},o=te(t,"color",n);o&&(i.textDark=o);const a=te(t,"background-color",n);return a&&(i.bgCell=a),"yellow"===a&&void 0===o&&(i.textDark="#31333F"),i?{...e,themeOverride:i}:e}(n,t.cssId,i))}return n}function ae(e){const t=e.columnTypeOptions||{};let n;if(t.validate)try{n=new RegExp(t.validate,"us")}catch(l){n="Invalid validate regex: ".concat(t.validate,".\nError: ").concat(l)}const i={kind:o.p6.Uri,data:"",readonly:!e.isEditable,allowOverlay:!0,contentAlign:e.contentAlignment,style:e.isIndex?"faded":"normal"},a=i=>{if((0,d.le)(i))return!e.isRequired;let o=N(i),a=!1;return t.max_chars&&o.length>t.max_chars&&(o=o.slice(0,t.max_chars),a=!0),!(n instanceof RegExp&&!1===n.test(o))&&(!a||o)};return{...e,kind:"link",sortMode:"default",validateInput:a,getCell(e,t){if("string"===typeof n)return v(N(e),n);if(t){const t=a(e);if(!1===t)return v(N(e),"Invalid input.");"string"===typeof t&&(e=t)}return{...i,data:(0,d.bb)(e)?N(e):null,isMissingValue:(0,d.le)(e)}},getCellValue:e=>void 0===e.data?null:e.data}}ae.isEditableType=!0;const le=ae;function re(e){const t={kind:o.p6.Image,data:[],displayData:[],allowAdd:!1,allowOverlay:!0,contentAlign:e.contentAlignment||"center",style:e.isIndex?"faded":"normal"};return{...e,kind:"image",sortMode:"default",isEditable:!1,getCell(e){const n=(0,d.bb)(e)?[N(e)]:[];return{...t,data:n,isMissingValue:!(0,d.bb)(e),displayData:n}},getCellValue:e=>void 0===e.data||0===e.data.length?null:e.data[0]}}re.isEditableType=!1;const se=re;function de(e){const t=U(V.fu.getTypeName(e.arrowType)),n=M({min_value:0,max_value:t?100:1,step:t?1:.01,format:t?"%3d%%":"percent"},e.columnTypeOptions);let i;try{i=_(n.max_value,n.format)}catch(r){i=N(n.max_value)}const a=(0,d.le)(n.step)||Number.isNaN(n.step)?void 0:I(n.step),l={kind:o.p6.Custom,allowOverlay:!1,copyData:"",contentAlign:e.contentAlignment,data:{kind:"range-cell",min:n.min_value,max:n.max_value,step:n.step,value:n.min_value,label:String(n.min_value),measureLabel:i,readonly:!0}};return{...e,kind:"progress",sortMode:"smart",isEditable:!1,getCell(e){if((0,d.le)(e))return x();if((0,d.le)(n.min_value)||(0,d.le)(n.max_value)||Number.isNaN(n.min_value)||Number.isNaN(n.max_value)||n.min_value>=n.max_value)return v("Invalid min/max parameters","The min_value (".concat(n.min_value,") and max_value (").concat(n.max_value,") parameters must be valid numbers."));if((0,d.le)(n.step)||Number.isNaN(n.step))return v("Invalid step parameter","The step parameter (".concat(n.step,") must be a valid number."));const t=k(e);if(Number.isNaN(t)||(0,d.le)(t))return v(N(e),"The value cannot be interpreted as a number.");if(Number.isInteger(t)&&!Number.isSafeInteger(t))return v(N(e),"The value is larger than the maximum supported integer values in number columns (2^53).");let i="";try{i=_(t,n.format,a)}catch(r){return v(N(t),(0,d.bb)(n.format)?"Failed to format the number based on the provided format configuration: (".concat(n.format,"). Error: ").concat(r):"Failed to format the number. Error: ".concat(r))}const o=Math.min(n.max_value,Math.max(n.min_value,t));return{...l,isMissingValue:(0,d.le)(e),copyData:String(t),data:{...l.data,value:o,label:i}}},getCellValue(e){var t,n;return e.kind===o.p6.Loading||void 0===(null===(t=e.data)||void 0===t?void 0:t.value)?null:null===(n=e.data)||void 0===n?void 0:n.value}}}de.isEditableType=!1;const ue=de;function ce(e,t,n){const i=M({y_min:0,y_max:1},t.columnTypeOptions),a={kind:o.p6.Custom,allowOverlay:!1,copyData:"",contentAlign:t.contentAlignment,data:{kind:"sparkline-cell",values:[],displayValues:[],graphKind:n,yAxis:[i.y_min,i.y_max]}};return{...t,kind:e,sortMode:"default",isEditable:!1,getCell(e){if((0,d.le)(i.y_min)||(0,d.le)(i.y_max)||Number.isNaN(i.y_min)||Number.isNaN(i.y_max)||i.y_min>=i.y_max)return v("Invalid min/max y-axis configuration","The y_min (".concat(i.y_min,") and y_max (").concat(i.y_max,") configuration options must be valid numbers."));if((0,d.le)(e))return x();const t=T(e),o=[];let l=[];if(0===t.length)return x();let r=Number.MIN_SAFE_INTEGER,s=Number.MAX_SAFE_INTEGER;for(let n=0;n<t.length;n++){const e=k(t[n]);if(Number.isNaN(e)||(0,d.le)(e))return v(N(t),"The value cannot be interpreted as a numeric array. ".concat(N(e)," is not a number."));e>r&&(r=e),e<s&&(s=e),o.push(e)}return"line"===n&&o.length<=2?x():(l=o.length>0&&(r>i.y_max||s<i.y_min)?o.map((e=>r-s===0?r>(i.y_max||1)?i.y_max||1:i.y_min||0:((i.y_max||1)-(i.y_min||0))*((e-s)/(r-s))+(i.y_min||0))):o,{...a,copyData:o.join(","),data:{...a.data,values:l,displayValues:o.map((e=>_(e)))},isMissingValue:(0,d.le)(e)})},getCellValue(e){var t,n;return e.kind===o.p6.Loading||void 0===(null===(t=e.data)||void 0===t?void 0:t.values)?null:null===(n=e.data)||void 0===n?void 0:n.values}}}function me(e){return ce("line_chart",e,"line")}function he(e){return ce("bar_chart",e,"bar")}me.isEditableType=!1,he.isEditableType=!1;const ge=new Map(Object.entries({object:F,text:W,checkbox:J,selectbox:Q,list:ee,number:K,link:le,datetime:B,date:Z,time:P,line_chart:me,bar_chart:he,image:se,progress:ue})),fe=[],pe="_index",be="_pos:",ve={small:75,medium:200,large:400};function ye(e){if(!(0,d.le)(e))return"number"===typeof e?e:e in ve?ve[e]:void 0}function we(e,t){if(!t)return e;let n;return t.has(e.name)&&e.name!==pe?n=t.get(e.name):t.has("".concat(be).concat(e.indexNumber))?n=t.get("".concat(be).concat(e.indexNumber)):e.isIndex&&t.has(pe)&&(n=t.get(pe)),n?(0,u.merge)({...e},{title:n.label,width:ye(n.width),isEditable:(0,d.bb)(n.disabled)?!n.disabled:void 0,isHidden:n.hidden,isRequired:n.required,columnTypeOptions:n.type_config,contentAlignment:n.alignment,defaultValue:n.default,help:n.help}):e}function xe(e){var t;const n=null===(t=e.columnTypeOptions)||void 0===t?void 0:t.type;let i;return(0,d.bb)(n)&&(ge.has(n)?i=ge.get(n):(0,A.KE)("Unknown column type configured in column configuration: ".concat(n))),(0,d.le)(i)&&(i=function(e){let t=e?V.fu.getTypeName(e):null;return t?(t=t.toLowerCase().trim(),["unicode","empty"].includes(t)?W:["datetime","datetimetz"].includes(t)?B:"time"===t?P:"date"===t?Z:["object","decimal","bytes"].includes(t)?F:["bool"].includes(t)?J:["int8","int16","int32","int64","uint8","uint16","uint32","uint64","float16","float32","float64","float96","float128","range"].includes(t)?K:"categorical"===t?Q:t.startsWith("list")?ee:F):F}(e.arrowType)),i}const Ce=function(e,t,n){const i=function(e){if(!e.columns)return new Map;try{return new Map(Object.entries(JSON.parse(e.columns)))}catch(t){return(0,A.H)(t),new Map}}(e),o=e.useContainerWidth||(0,d.bb)(e.width)&&e.width>0;let a=function(e){var t,n,i,o;const a=[],l=null!==(t=null===(n=e.types)||void 0===n||null===(n=n.index)||void 0===n?void 0:n.length)&&void 0!==t?t:0,r=null!==(i=null===(o=e.columns)||void 0===o||null===(o=o[0])||void 0===o?void 0:o.length)&&void 0!==i?i:0;if(0===l&&0===r)return a.push({id:"empty-index",title:"",indexNumber:0,isEditable:!1,isIndex:!0}),a;for(let s=0;s<l;s++){const t={...ne(e,s),indexNumber:s};a.push(t)}for(let s=0;s<r;s++){const t={...ie(e,s),indexNumber:s+l};a.push(t)}return a}(t).map((t=>{let a={...t,...we(t,i),isStretched:o};const l=xe(a);return(e.editingMode===s.Eh.EditingMode.READ_ONLY||n||!1===l.isEditableType)&&(a={...a,isEditable:!1}),e.editingMode!==s.Eh.EditingMode.READ_ONLY&&1==a.isEditable&&(a={...a,icon:"editable"}),l(a)})).filter((e=>!e.isHidden));if(e.columnOrder&&e.columnOrder.length>0){const t=[];a.forEach((e=>{e.isIndex&&t.push(e)})),e.columnOrder.forEach((e=>{const n=a.find((t=>t.name===e));n&&!n.isIndex&&t.push(n)})),a=t}return{columns:a.length>0?a:[F({id:"empty-index",title:"",indexNumber:0,isEditable:!1,isIndex:!0})]}};function Ee(e){return e.isIndex?pe:(0,d.le)(e.name)?"":e.name}const Me=class{constructor(e){this.editedCells=new Map,this.addedRows=[],this.deletedRows=[],this.numRows=0,this.numRows=e}toJson(e){const t=new Map;e.forEach((e=>{t.set(e.indexNumber,e)}));const n={edited_rows:{},added_rows:[],deleted_rows:[]};this.editedCells.forEach(((e,i,o)=>{const a={};e.forEach(((e,n,i)=>{const o=t.get(n);o&&(a[Ee(o)]=o.getCellValue(e))})),n.edited_rows[i]=a})),this.addedRows.forEach((e=>{const i={};let o=!1;e.forEach(((e,n,a)=>{const l=t.get(n);if(l){const t=l.getCellValue(e);l.isRequired&&l.isEditable&&w(e)&&(o=!0),(0,d.bb)(t)&&(i[Ee(l)]=t)}})),o||n.added_rows.push(i)})),n.deleted_rows=this.deletedRows;return JSON.stringify(n,((e,t)=>void 0===t?null:t))}fromJson(e,t){this.editedCells=new Map,this.addedRows=[],this.deletedRows=[];const n=JSON.parse(e),i=new Map;t.forEach((e=>{i.set(e.indexNumber,e)}));const o=new Map;t.forEach((e=>{o.set(Ee(e),e)})),Object.keys(n.edited_rows).forEach((e=>{const t=Number(e),i=n.edited_rows[e];Object.keys(i).forEach((e=>{const n=i[e],a=o.get(e);if(a){const e=a.getCell(n);var l;if(e)this.editedCells.has(t)||this.editedCells.set(t,new Map),null===(l=this.editedCells.get(t))||void 0===l||l.set(a.indexNumber,e)}}))})),n.added_rows.forEach((e=>{const t=new Map;Object.keys(e).forEach((n=>{const i=e[n],a=o.get(n);if(a){const e=a.getCell(i);e&&t.set(a.indexNumber,e)}})),this.addedRows.push(t)})),this.deletedRows=n.deleted_rows}isAddedRow(e){return e>=this.numRows}getCell(e,t){if(this.isAddedRow(t))return this.addedRows[t-this.numRows].get(e);const n=this.editedCells.get(t);return void 0!==n?n.get(e):void 0}setCell(e,t,n){if(this.isAddedRow(t)){if(t-this.numRows>=this.addedRows.length)return;this.addedRows[t-this.numRows].set(e,n)}else{void 0===this.editedCells.get(t)&&this.editedCells.set(t,new Map);this.editedCells.get(t).set(e,n)}}addRow(e){this.addedRows.push(e)}deleteRows(e){e.sort(((e,t)=>t-e)).forEach((e=>{this.deleteRow(e)}))}deleteRow(e){(0,d.le)(e)||e<0||(this.isAddedRow(e)?this.addedRows.splice(e-this.numRows,1):(this.deletedRows.includes(e)||(this.deletedRows.push(e),this.deletedRows=this.deletedRows.sort(((e,t)=>e-t))),this.editedCells.delete(e)))}getOriginalRowIndex(e){let t=e;for(let n=0;n<this.deletedRows.length&&!(this.deletedRows[n]>t);n++)t+=1;return t}getNumRows(){return this.numRows+this.addedRows.length-this.deletedRows.length}};var Te=n(59990),Ne=n(47206);const Re=function(){const e=(0,Ne.u)(),t=i.useMemo((()=>({editable:e=>'<svg xmlns="http://www.w3.org/2000/svg" height="40" viewBox="0 96 960 960" width="40" fill="'.concat(e.bgColor,'"><path d="m800.641 679.743-64.384-64.384 29-29q7.156-6.948 17.642-6.948 10.485 0 17.742 6.948l29 29q6.948 7.464 6.948 17.95 0 10.486-6.948 17.434l-29 29Zm-310.64 246.256v-64.383l210.82-210.821 64.384 64.384-210.821 210.82h-64.383Zm-360-204.872v-50.254h289.743v50.254H130.001Zm0-162.564v-50.255h454.615v50.255H130.001Zm0-162.307v-50.255h454.615v50.255H130.001Z"/></svg>')})),[]);return{accentColor:e.colors.primary,accentFg:e.colors.white,accentLight:(0,Te.DZ)(e.colors.primary,.9),borderColor:e.colors.fadedText05,horizontalBorderColor:e.colors.fadedText05,fontFamily:e.genericFonts.bodyFont,bgSearchResult:(0,Te.DZ)(e.colors.primary,.9),bgIconHeader:e.colors.fadedText60,fgIconHeader:e.colors.white,bgHeader:e.colors.bgMix,bgHeaderHasFocus:e.colors.secondaryBg,bgHeaderHovered:e.colors.bgMix,textHeader:e.colors.fadedText60,textHeaderSelected:e.colors.white,textGroupHeader:e.colors.fadedText60,headerFontStyle:"".concat(e.fontSizes.sm),baseFontStyle:e.fontSizes.sm,editorFontSize:e.fontSizes.sm,textDark:e.colors.bodyText,textMedium:(0,Te.DZ)(e.colors.bodyText,.2),textLight:e.colors.fadedText40,textBubble:e.colors.fadedText60,bgCell:e.colors.bgColor,bgCellMedium:e.colors.bgColor,cellHorizontalPadding:8,cellVerticalPadding:3,bgBubble:e.colors.secondaryBg,bgBubbleSelected:e.colors.secondaryBg,linkColor:e.colors.linkText,drilldownBorder:e.colors.darkenedBgMix25,tableBorderRadius:e.radii.lg,headerIcons:t}};const ke=function(e,t,n,o){return{getCellContent:i.useCallback((i=>{let[a,l]=i;if(a>t.length-1)return v("Column index out of bounds.","This should never happen. Please report this bug.");if(l>n-1)return v("Row index out of bounds.","This should never happen. Please report this bug.");const r=t[a],s=r.indexNumber,d=o.current.getOriginalRowIndex(l);if(r.isEditable||o.current.isAddedRow(d)){const e=o.current.getCell(s,d);if(void 0!==e)return e}try{return oe(r,e.getCell(d+1,s),e.cssStyles)}catch(u){return(0,A.H)(u),v("Error during cell creation.","This should never happen. Please report this bug. \nError: ".concat(u))}}),[t,n,e,o])}};var _e=n(33256);const Se=function(e,t,n){const[o,a]=i.useState(),{getCellContent:l,getOriginalIndex:r}=(0,_e.fF)({columns:t.map((e=>E(e))),getCellContent:n,rows:e,sort:o}),s=function(e,t){return void 0===t?e:e.map((e=>e.id===t.column.id?{...e,title:"asc"===t.direction?"\u2191 ".concat(e.title):"\u2193 ".concat(e.title)}:e))}(t,o),d=i.useCallback((e=>{let t="asc";const n=s[e];if(o&&o.column.id===n.id){if("asc"!==o.direction)return void a(void 0);t="desc"}a({column:E(n),direction:t,mode:n.sortMode})}),[o,s]);return{columns:s,sortColumn:d,getOriginalIndex:r,getCellContent:l}};const Oe=function(e,t,n,o,a,l,r){const s=i.useCallback(((t,i)=>{let[l,s]=t;const d=e[l];if(!d.isEditable)return;const u=d.indexNumber,c=n.current.getOriginalRowIndex(a(s)),m=o([l,s]),h=d.getCellValue(m),g=d.getCellValue(i);if(!y(m)&&g===h)return;const f=d.getCell(g,!0);y(f)?(0,A.KE)("Not applying the cell edit since it causes this error:\n ".concat(f.data)):(n.current.setCell(u,c,{...f,lastUpdated:performance.now()}),r())}),[e,n,a,o,r]),u=i.useCallback((()=>{if(t)return;const i=new Map;e.forEach((e=>{i.set(e.indexNumber,e.getCell(e.defaultValue))})),n.current.addRow(i)}),[e,n,t]),c=i.useCallback((()=>{t||(u(),r())}),[u,r,t]),m=i.useCallback((i=>{var o;if(i.rows.length>0){if(t)return!0;const e=i.rows.toArray().map((e=>n.current.getOriginalRowIndex(a(e))));return n.current.deleteRows(e),r(!0),!1}if(null!==(o=i.current)&&void 0!==o&&o.range){const t=[],n=i.current.range;for(let i=n.y;i<n.y+n.height;i++)for(let o=n.x;o<n.x+n.width;o++){const n=e[o];n.isEditable&&!n.isRequired&&(t.push({cell:[o,i]}),s([o,i],n.getCell(null)))}return t.length>0&&(r(),l(t)),!1}return!0}),[e,n,t,l,a,r,s]),h=i.useCallback(((i,s)=>{const[c,m]=i,h=[];for(let g=0;g<s.length;g++){const i=s[g];if(g+m>=n.current.getNumRows()){if(t)break;u()}for(let t=0;t<i.length;t++){const l=i[t],r=g+m,s=t+c;if(s>=e.length)break;const u=e[s];if(u.isEditable){const e=u.getCell(l,!0);if((0,d.bb)(e)&&!y(e)){const t=u.indexNumber,i=n.current.getOriginalRowIndex(a(r)),l=u.getCellValue(o([s,r]));u.getCellValue(e)!==l&&(n.current.setCell(t,i,{...e,lastUpdated:performance.now()}),h.push({cell:[s,r]}))}}}h.length>0&&(r(),l(h))}return!1}),[e,n,t,a,o,u,r,l]),g=i.useCallback(((t,n)=>{const i=t[0];if(i>=e.length)return!0;const o=e[i];if(o.validateInput){const e=o.validateInput(o.getCellValue(n));return!0===e||!1===e?e:o.getCell(e)}return!0}),[e]);return{onCellEdited:s,onPaste:h,onRowAppended:c,onDelete:m,validateCell:g}};const Ie=function(e,t){const[n,o]=i.useState(),a=i.useRef(null),l=i.useCallback((n=>{if(clearTimeout(a.current),a.current=0,o(void 0),("header"===n.kind||"cell"===n.kind)&&n.location){const i=n.location[0],l=n.location[1];let r;if(i<0||i>=e.length)return;const s=e[i];if("header"===n.kind&&(0,d.bb)(s))r=s.help;else if("cell"===n.kind){const e=t([i,l]);s.isRequired&&s.isEditable&&w(e)?r="\u26a0\ufe0f Please fill out this cell.":function(e){return e.hasOwnProperty("tooltip")&&""!==e.tooltip}(e)&&(r=e.tooltip)}r&&(a.current=setTimeout((()=>{r&&o({content:r,left:n.bounds.x+n.bounds.width/2,top:n.bounds.y})}),600))}}),[e,t,o,a]);return{tooltip:n,clearTooltip:i.useCallback((()=>{o(void 0)}),[o]),onItemHovered:l}};var De=n(8751);const He=function(e,t){return{drawCell:i.useCallback((n=>{const{cell:i,theme:a,ctx:l,rect:r}=n,s=t?n.col-1:n.col;if(w(i)&&s<e.length){let t=!1;const i=e[s];return["checkbox","line_chart","bar_chart","progress"].includes(i.kind)||((e=>{const{cell:t,theme:n}=e;(0,o.uN)({...e,theme:{...n,textDark:n.textLight,textMedium:n.textLight},spriteManager:{},hyperWrapping:!1},"None",t.contentAlign)})(n),t=!0),i.isRequired&&i.isEditable&&function(e,t,n){e.save(),e.beginPath(),e.moveTo(t.x+t.width-8,t.y+1),e.lineTo(t.x+t.width,t.y+1),e.lineTo(t.x+t.width,t.y+1+8),e.fillStyle=n.accentColor,e.fill(),e.restore()}(l,r,a),t}return!1}),[e,t]),customRenderers:[...(0,De.Bn)().customRenderers,...fe]}};const Ae=function(e){const[t,n]=(0,i.useState)((()=>new Map)),o=i.useCallback(((e,i,o,a)=>{e.id&&n(new Map(t).set(e.id,a))}),[t]);return{columns:e.map((e=>e.id&&t.has(e.id)&&void 0!==t.get(e.id)?{...e,width:t.get(e.id),grow:0}:e)),onColumnResize:o}},Ve=35,ze=2*Ve+3;const Fe=function(e,t,n,o,a){let l,r=function(e){return Math.max(e*Ve+1+2,ze)}(t+1+(e.editingMode===s.Eh.EditingMode.DYNAMIC?1:0)),u=Math.min(r,400);e.height&&(u=Math.max(e.height,ze),r=Math.max(e.height,r)),o&&(u=Math.min(u,o),r=Math.min(r,o),e.height||(u=r));let c=n;e.useContainerWidth?l=n:e.width&&(l=Math.min(Math.max(e.width,52),n),c=Math.min(Math.max(e.width,c),n));const[m,h]=i.useState({width:l||"100%",height:u});return i.useLayoutEffect((()=>{e.useContainerWidth&&"100%"===m.width&&h({width:n,height:m.height})}),[n]),i.useLayoutEffect((()=>{h({width:m.width,height:u})}),[t]),i.useLayoutEffect((()=>{h({width:l||"100%",height:m.height})}),[l]),i.useLayoutEffect((()=>{h({width:m.width,height:u})}),[u]),i.useLayoutEffect((()=>{if(a){const t=e.useContainerWidth||(0,d.bb)(e.width)&&e.width>0;h({width:t?c:"100%",height:r})}else h({width:l||"100%",height:u})}),[a]),{rowHeight:Ve,minHeight:ze,maxHeight:r,minWidth:52,maxWidth:c,resizableSize:m,setResizableSize:h}};var Le=n(82160),We=n(96266);const je=(0,Le.Z)("img",{target:"e24uaba0"})((()=>({maxWidth:"100%",maxHeight:"600px",objectFit:"scale-down"})),""),Ye=e=>{let{urls:t}=e;const n=t&&t.length>0?t[0]:"";return n.startsWith("http")?(0,We.jsx)("a",{href:n,target:"_blank",rel:"noreferrer noopener",children:(0,We.jsx)(je,{src:n})}):(0,We.jsx)(je,{src:n})},Be=(0,Le.Z)("div",{target:"e1w7nams0"})((e=>{let{theme:t}=e;return{position:"relative",display:"inline-block","& .glideDataEditor":{height:"100%",minWidth:"100%",borderRadius:t.radii.lg},"& .dvn-scroller":{scrollbarWidth:"thin",overflowX:"overlay !important",overflowY:"overlay !important"}}}),"");var Pe=n(98399),Ze=n(73830),qe=n(46403),Je=n(37661),Ue=n(17966);const Ge=function(e){let{top:t,left:n,content:o,clearTooltip:a}=e;const[l,r]=i.useState(!0),s=(0,Ne.u)(),{colors:d,fontSizes:u,radii:c}=s,m=i.useCallback((()=>{r(!1),a()}),[a,r]);return(0,We.jsx)(Pe.Z,{content:(0,We.jsx)(Je.Uo,{className:"stTooltipContent",children:(0,We.jsx)(qe.ZP,{style:{fontSize:u.sm},source:o,allowHTML:!1})}),placement:Ze.r4.top,accessibilityType:Ze.SI.tooltip,showArrow:!1,popoverMargin:5,onClickOutside:m,onEsc:m,overrides:{Body:{style:{borderTopLeftRadius:c.md,borderTopRightRadius:c.md,borderBottomLeftRadius:c.md,borderBottomRightRadius:c.md,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important",backgroundColor:"transparent"}},Inner:{style:{backgroundColor:(0,Ue.Iy)(s)?d.bgColor:d.secondaryBg,color:d.bodyText,fontSize:u.sm,fontWeight:"normal",paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important"}}},isOpen:l,children:(0,We.jsx)("div",{className:"stTooltipTarget","data-testid":"stTooltipTarget",style:{position:"fixed",top:t,left:n}})})};n(27235),n(33091);const Ke=(0,r.Z)((function(e){let{element:t,data:n,width:r,height:u,disabled:c,widgetMgr:m,isFullScreen:h}=e;const g=i.useRef(null),f=i.useRef(null),p=Re(),[b,v]=i.useState(!0),y=i.useMemo((()=>window.matchMedia&&window.matchMedia("(pointer: coarse)").matches),[]),[w,x]=i.useState({columns:o.EV.empty(),rows:o.EV.empty(),current:void 0}),M=i.useCallback((()=>{x({columns:o.EV.empty(),rows:o.EV.empty(),current:void 0})}),[]),T=i.useCallback((e=>{var t;null===(t=f.current)||void 0===t||t.updateCells(e)}),[]);(0,d.le)(t.editingMode)&&(t.editingMode=s.Eh.EditingMode.READ_ONLY);const{READ_ONLY:N,DYNAMIC:R}=s.Eh.EditingMode,k=n.dimensions,_=Math.max(0,k.rows-1),S=0===_&&!(t.editingMode===R&&k.dataColumns>0),O=_>15e4,I=i.useRef(new Me(_)),[D,H]=i.useState(I.current.getNumRows());i.useEffect((()=>{I.current=new Me(_),H(I.current.getNumRows())}),[_]);const A=i.useCallback((()=>{I.current=new Me(_),H(I.current.getNumRows())}),[_]),{columns:V}=Ce(t,n,c);i.useEffect((()=>{if(t.editingMode!==N){const e=m.getStringValue(t);e&&(I.current.fromJson(e,V),H(I.current.getNumRows()))}}),[]);const{getCellContent:z}=ke(n,V,D,I),{columns:F,sortColumn:L,getOriginalIndex:W,getCellContent:j}=Se(_,V,z),Y=i.useCallback((function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];D!==I.current.getNumRows()&&H(I.current.getNumRows()),e&&M(),(0,d.Ds)(100,(()=>{const e=I.current.toJson(F);let i=m.getStringValue(t);void 0===i&&(i=new Me(0).toJson([])),e!==i&&m.setStringValue(t,e,{fromUi:n})}))()}),[m,t,D,M,F]),{onCellEdited:B,onPaste:P,onRowAppended:Z,onDelete:q,validateCell:J}=Oe(F,t.editingMode!==R,I,j,W,T,Y),{tooltip:U,clearTooltip:G,onItemHovered:K}=Ie(F,j),{drawCell:X,customRenderers:Q}=He(F,t.editingMode===R),{columns:$,onColumnResize:ee}=Ae(F.map((e=>E(e)))),{rowHeight:te,minHeight:ne,maxHeight:ie,minWidth:oe,maxWidth:ae,resizableSize:le,setResizableSize:re}=Fe(t,D,r,u,h),se=i.useCallback((e=>{let[t,n]=e;return{...C(!0,!1),displayData:"empty",contentAlign:"center",allowOverlay:!1,themeOverride:{textDark:p.textLight},span:[0,Math.max(F.length-1,0)]}}),[F,p.textLight]);return i.useEffect((()=>{const e=new l.K;return e.manageFormClearListener(m,t.formId,A),()=>{e.disconnect()}}),[t.formId,A,m]),(0,We.jsxs)(Be,{"data-testid":"stDataFrame",className:"stDataFrame",onBlur:()=>{b||y||M()},children:[(0,We.jsx)(a.e,{"data-testid":"stDataFrameResizable",ref:g,defaultSize:le,style:{border:"1px solid ".concat(p.borderColor),borderRadius:"".concat(p.tableBorderRadius)},minHeight:ne,maxHeight:ie,minWidth:oe,maxWidth:ae,size:le,enable:{top:!1,right:!1,bottom:!1,left:!1,topRight:!1,bottomRight:!0,bottomLeft:!1,topLeft:!1},grid:[1,te],snapGap:te/3,onResizeStop:(e,t,n,i)=>{g.current&&re({width:g.current.size.width,height:ie-g.current.size.height===3?g.current.size.height+3:g.current.size.height})},children:(0,We.jsx)(o.Nd,{className:"glideDataEditor",ref:f,columns:$,rows:S?1:D,minColumnWidth:50,maxColumnWidth:1e3,maxColumnAutoWidth:500,rowHeight:te,headerHeight:te,getCellContent:S?se:j,onColumnResize:ee,freezeColumns:S?0:F.filter((e=>e.isIndex)).length,smoothScrollX:!0,smoothScrollY:!0,verticalBorder:e=>!(e>=F.length&&(t.useContainerWidth||"100%"===le.width)),getCellsForSelection:!0,rowMarkers:"none",rangeSelect:y?"none":"rect",columnSelect:"none",rowSelect:"none",onItemHovered:K,keybindings:{search:!0,downFill:!0},onHeaderClicked:S||O?void 0:L,gridSelection:w,onGridSelectionChange:e=>{(b||y)&&(x(e),void 0!==U&&G())},theme:p,onMouseMove:e=>{"out-of-bounds"===e.kind&&b?v(!1):"out-of-bounds"===e.kind||b||v(!0)},fixedShadowX:!0,fixedShadowY:!0,experimental:{scrollbarWidthOverride:1},drawCell:X,customRenderers:Q,imageEditorOverride:Ye,headerIcons:p.headerIcons,validateCell:J,onPaste:!1,...!S&&t.editingMode!==N&&!c&&{fillHandle:!y,onCellEdited:B,onPaste:P,onDelete:q},...!S&&t.editingMode===R&&{trailingRowOptions:{sticky:!1,tint:!0},rowMarkerTheme:{bgCell:p.bgHeader,bgCellMedium:p.bgHeader},rowMarkers:"checkbox",rowSelectionMode:"auto",rowSelect:c?"none":"multi",onRowAppended:c?void 0:Z,onHeaderClicked:void 0}})}),U&&U.content&&(0,We.jsx)(Ge,{top:U.top,left:U.left,content:U.content,clearTooltip:G})]})}))},52955:(e,t,n)=>{n.d(t,{K:()=>o});var i=n(50120);class o{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(e,t,n){null!=this.formClearListener&&this.lastWidgetMgr===e&&this.lastFormId===t||(this.disconnect(),(0,i.bM)(t)&&(this.formClearListener=e.addFormClearedListener(t,n),this.lastWidgetMgr=e,this.lastFormId=t))}disconnect(){var e;null===(e=this.formClearListener)||void 0===e||e.disconnect(),this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[1687],{11687:(e,t,o)=>{o.r(t),o.d(t,{default:()=>j});var n=o(5057),r=o(92627),l=o(70800),i=o(22335);let d=function(e){return e.ASCENDING="ascending",e.DESCENDING="descending",e}({});var a=o(82160);const s=(0,a.Z)("div",{target:"epzu5vs8"})((e=>{let{width:t,theme:o}=e;return{width:t,border:"1px solid ".concat(o.colors.fadedText05),boxSizing:"content-box","& .table-top-right":{overflow:"hidden !important",paddingRight:"6px"},"& .table-bottom-left":{overflow:"hidden !important",paddingBottom:"6px"},"& .table-bottom-right":{overflow:"overlay !important"},"& .table-bottom-right:focus-visible":{outline:"none"},"& .table-bottom-right:focus":{outline:"none"}}}),""),c=(0,a.Z)("div",{target:"epzu5vs7"})((e=>{let{theme:t}=e;return{padding:"".concat(t.spacing.twoXS," ").concat(t.spacing.xs),borderBottom:"1px solid ".concat(t.colors.fadedText05),borderRight:"1px solid ".concat(t.colors.fadedText05),fontSize:t.fontSizes.md,fontFamily:t.genericFonts.bodyFont,lineHeight:t.lineHeights.table,display:"flex",alignItems:"center",justifyContent:"flex-start"}}),""),h=e=>({color:e.colors.fadedText60,borderBottom:"1px solid ".concat(e.colors.fadedText05),borderRight:"1px solid ".concat(e.colors.fadedText05),zIndex:1}),u=e=>({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",lineHeight:e.lineHeights.table}),m=(0,a.Z)(c,{target:"epzu5vs6"})((e=>{let{theme:t}=e;return h(t)}),""),f=(0,a.Z)(c,{target:"epzu5vs5"})((e=>{let{theme:t}=e;return{userSelect:"none",...h(t),...u(t)}}),""),g=(0,a.Z)(c,{target:"epzu5vs4"})((e=>{let{theme:t}=e;return{userSelect:"none",...h(t),...u(t)}}),""),p=(0,a.Z)(c,{target:"epzu5vs3"})((e=>{let{theme:t}=e;return u(t)}),""),w=(0,a.Z)("div",{target:"epzu5vs2"})((e=>{let{verticalLocator:t,horizontalLocator:o,width:n,height:r}=e;return{position:"absolute",[t]:"0px",[o]:"0px",width:n,height:r}}),""),x=(0,a.Z)("div",{target:"epzu5vs1"})((e=>{let{theme:t}=e;return{fontFamily:t.genericFonts.codeFont,color:t.colors.fadedText60,fontStyle:"italic",fontSize:t.fontSizes.md,textAlign:"center"}}),""),b=(0,a.Z)("span",{target:"epzu5vs0"})((e=>{let{theme:t}=e;return{color:t.colors.fadedText05,verticalAlign:"top"}}),"");var v=o(56864),C=o(70714);const y=!("undefined"===typeof window||!window.document||!window.document.createElement);let S;function N(e){if((!S&&0!==S||e)&&y){const e=document.createElement("div");e.style.position="absolute",e.style.top="-9999px",e.style.width="50px",e.style.height="50px",e.style.overflow="scroll",document.body.appendChild(e),S=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return S}var I=o(27417);const D=2*I.CH.smPx,E=(e,t,o,n)=>{const{headerRows:r,headerCols:l,dataRows:d,cols:a,rows:s}=(0,i.kG)(o),c=D*r,h=t-2-N(),u=function(e,t,o,n,r,l){const i=25,d=e>2?200:400,a=e=>{let{index:o}=e;const r=o,d=8*10/10,a=24,s=100;let c=i;for(let i=0;i<Math.min(t,s);i++){let e=-1;e=i<n?i:t>s?Math.floor(Math.random()*t):i;const{contents:o}=l(r,e),h=(o?o.length:0)*d+a;h>c&&(c=h)}return c};let s=[];const c=Array.from(Array(e),((e,t)=>a({index:t}))),h=c.reduce(((e,t)=>e+t),0),u=r-h,m=e=>e.filter((e=>e>d));if(u<0)s=c.map((e=>e>d?d:e));else{const e=m(c),t=u/e.length;s=c.map(((o,n)=>n in e.keys()?o+t:o))}let f=s.reduce(((e,t)=>e+t),0);if(f>r*(2/3)&&f<r){const t=(r-f)/e;s=s.map((e=>e+t)),f=s.reduce(((e,t)=>e+t),0)}const g=Math.min(f,r),p=e=>{let{index:t}=e;return s[t]},w=s.slice(0,o).reduce(((e,t)=>e+t));return{elementWidth:g,columnWidth:p,headerWidth:w}}(a,s,l,r,h,n);let{elementWidth:m,columnWidth:f,headerWidth:g}=u;if(0===d&&m<60){m=60,g=60;let e=0;for(let t=0;t<a;t++)e+=f({index:t});e<60&&(f=()=>60/a)}const p=s*D,w=(e||300)-2;e=Math.min(p,w);return m+=p>w?N():0,{rowHeight:D,headerHeight:c,border:2,columnWidth:f,headerWidth:g,elementWidth:m,height:e}},R={corner:m,"col-header":f,"row-header":g,data:p};var z=o(7896),G=o(63947),k=n.forwardRef((function(e,t){return n.createElement(G.D,(0,z.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},e,{ref:t}),n.createElement("path",{d:"M4 1L0 5l1.5 1.5L4 4l2.5 2.5L8 5 4 1z"}))}));k.displayName="ChevronTop";var A=n.forwardRef((function(e,t){return n.createElement(G.D,(0,z.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},e,{ref:t}),n.createElement("path",{d:"M1.5 1L0 2.5l4 4 4-4L6.5 1 4 3.5 1.5 1z"}))}));A.displayName="ChevronBottom";var T=o(73401),W=o(96266);function Z(e){let t,o,n,{CellType:r,columnIndex:l,contents:i,rowIndex:a,sortedByUser:s,style:c,columnSortDirection:h,headerClickedCallback:u}=e,m=i;const f=h===d.DESCENDING;null!=u&&0===a&&(t=()=>u(l),o="button",n=0,m=null==h?'Sort by column "'.concat(i,'"'):'Sorted by column "'.concat(i,'" (').concat(f?"descending":"ascending",")"));const g=0===a?function(e){switch(e){case d.ASCENDING:return(0,W.jsx)(b,{"data-testid":"sortIcon",children:(0,W.jsx)(T.Z,{content:k,size:"xs",margin:"0 0 0 twoXS"})});case d.DESCENDING:return(0,W.jsx)(b,{"data-testid":"sortIcon",children:(0,W.jsx)(T.Z,{content:A,size:"xs",margin:"0 0 0 twoXS"})});default:return null}}(h):void 0;return(0,W.jsxs)(r,{style:c,onClick:t,role:o,tabIndex:n,title:m,"data-testid":r.displayName,"data-test-sort-direction":h,children:[i,s?g:""]})}const j=(0,l.Z)((function(e){let{element:t,height:o,width:l}=e;const a=n.useRef(null),[c,h]=(0,n.useState)(!1),[u,m]=(0,n.useState)(0),[f,g]=(0,n.useState)(d.ASCENDING),[,p]=(0,i.oo)(t.get("data")),{headerRows:b,headerCols:y,dataRows:S,cols:N,rows:I}=(0,i.kG)(t),D=e=>{let t=d.ASCENDING;u===e&&(t=f===d.ASCENDING?d.DESCENDING:d.ASCENDING),m(e),g(t),h(!0)},z=(e=>{const{headerCols:o,dataRows:n}=(0,i.kG)(t),r=f!==d.DESCENDING;if(u<o||u-o>=e){const e=new Array(n);for(let t=0;t<n;t+=1)e[t]=r?t:n-(t+1);return e}return(0,i.X_)(t,u-o,r)})(p),G=function(e){let{element:t,headerRows:o,sortedDataRowIndices:n}=e;return(e,r)=>{if(null!=n&&r>=o){const e=r-o;e>=0&&e<n.length?(r=n[e],r+=o):(0,C.KE)("Bad sortedDataRowIndices ("+"rowIndex=".concat(r,", ")+"headerRows=".concat(o,", ")+"sortedDataRowIndices.length=".concat(n.length))}const{contents:l,styles:d,type:a}=(0,i.me)(t,e,r);return{Component:R[a],styles:d,contents:(0,v.H7)(l)}}}({element:t,headerRows:b,sortedDataRowIndices:z}),k=function(e){return t=>{let{columnIndex:o,key:n,rowIndex:r,style:l}=t;const{Component:i,styles:d,contents:a}=e(o,r),s=0===r?D:void 0,h=o===u?f:void 0,m={...l,...d,borderBottom:r===S?"none":void 0,borderRight:o===N-y?"none":void 0};return(0,W.jsx)(Z,{CellType:i,columnIndex:o,rowIndex:r,style:m,contents:a,sortedByUser:c,columnSortDirection:h,headerClickedCallback:s},n)}}(G),{rowHeight:A,headerHeight:T,border:j,height:B,elementWidth:L,columnWidth:H,headerWidth:F}=E(o,l,t,G);return setTimeout((()=>{null!=a.current&&a.current.recomputeGridSize()}),0),(0,n.useEffect)((()=>{u-y>=p&&(m(0),g(d.ASCENDING),h(!1))}),[u,y,p]),(0,W.jsxs)(s,{width:L,className:"stDataFrame",children:[(0,W.jsx)(r.yR,{cellRenderer:k,fixedColumnCount:y,fixedRowCount:b,columnWidth:H,columnCount:N,enableFixedColumnScroll:!1,enableFixedRowScroll:!1,height:B,rowHeight:A,rowCount:I,width:L,classNameBottomLeftGrid:"table-bottom-left",classNameBottomRightGrid:"table-bottom-right",classNameTopRightGrid:"table-top-right",ref:a}),(0,W.jsx)(w,{verticalLocator:"top",horizontalLocator:"right",width:j,height:T}),(0,W.jsx)(w,{verticalLocator:"bottom",horizontalLocator:"left",width:F,height:j}),0===S?(0,W.jsx)(x,{children:"empty"}):null]})}))}}]);
@@ -1 +0,0 @@
1
- "use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[2873],{32873:(l,e,o)=>{o.r(e),o.d(e,{default:()=>b});var r=o(5057),t=o(47206),c=o(70800),a=o(66679),i=o(65873),n=o(17966),p=o(64327),s=o(70714);function f(l,e,o){return l=function(l,e){return(l=(l=(l=(l=(l=(l=(l=(l=l.replaceAll("#000032",(0,n.By)(e))).replaceAll("#000033",(0,n.He)(e))).replaceAll("#000034",(0,n.Iy)(e)?e.colors.blue80:e.colors.blue40)).replaceAll("#000035",(0,n.ny)(e))).replaceAll("#000036",(0,n.Xy)(e))).replaceAll("#000037",(0,n.yq)(e))).replaceAll("#000038",e.colors.bgColor)).replaceAll("#000039",e.colors.fadedText05)).replaceAll("#000040",e.colors.bgMix)}(l,e),l=function(l,e,o){const r="#000001",t="#000002",c="#000003",a="#000004",i="#000005",p="#000006",s="#000007",f="#000008",y="#000009",d="#000010";if("streamlit"===o){const o=(0,n.iY)(e);l=(l=(l=(l=(l=(l=(l=(l=(l=(l=l.replaceAll(r,o[0])).replaceAll(t,o[1])).replaceAll(c,o[2])).replaceAll(a,o[3])).replaceAll(i,o[4])).replaceAll(p,o[5])).replaceAll(s,o[6])).replaceAll(f,o[7])).replaceAll(y,o[8])).replaceAll(d,o[9])}else l=(l=(l=(l=(l=(l=(l=(l=(l=(l=l.replaceAll(r,"#636efa")).replaceAll(t,"#EF553B")).replaceAll(c,"#00cc96")).replaceAll(a,"#ab63fa")).replaceAll(i,"#FFA15A")).replaceAll(p,"#19d3f3")).replaceAll(s,"#FF6692")).replaceAll(f,"#B6E880")).replaceAll(y,"#FF97FF")).replaceAll(d,"#FECB52");return l}(l,e,o),l=function(l,e,o){const r="#000011",t="#000012",c="#000013",a="#000014",i="#000015",p="#000016",s="#000017",f="#000018",y="#000019",d="#000020";if("streamlit"===o){const o=(0,n.Gy)(e);l=(l=(l=(l=(l=(l=(l=(l=(l=(l=l.replaceAll(r,o[0])).replaceAll(t,o[1])).replaceAll(c,o[2])).replaceAll(a,o[3])).replaceAll(i,o[4])).replaceAll(p,o[5])).replaceAll(s,o[6])).replaceAll(f,o[7])).replaceAll(y,o[8])).replaceAll(d,o[9])}else l=(l=(l=(l=(l=(l=(l=(l=(l=(l=l.replaceAll(r,"#0d0887")).replaceAll(t,"#46039f")).replaceAll(c,"#7201a8")).replaceAll(a,"#9c179e")).replaceAll(i,"#bd3786")).replaceAll(p,"#d8576b")).replaceAll(s,"#ed7953")).replaceAll(f,"#fb9f3a")).replaceAll(y,"#fdca26")).replaceAll(d,"#f0f921");return l}(l,e,o),l=function(l,e,o){const r="#000021",t="#000022",c="#000023",a="#000024",i="#000025",p="#000026",s="#000027",f="#000028",y="#000029",d="#000030",A="#000031";if("streamlit"===o){const o=(0,n.ru)(e);l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=l.replaceAll(r,o[0])).replaceAll(t,o[1])).replaceAll(c,o[2])).replaceAll(a,o[3])).replaceAll(i,o[4])).replaceAll(p,o[5])).replaceAll(s,o[6])).replaceAll(f,o[7])).replaceAll(y,o[8])).replaceAll(d,o[9])).replaceAll(A,o[10])}else l=(l=(l=(l=(l=(l=(l=(l=(l=(l=(l=l.replaceAll(r,"#8e0152")).replaceAll(t,"#c51b7d")).replaceAll(c,"#de77ae")).replaceAll(a,"#f1b6da")).replaceAll(i,"#fde0ef")).replaceAll(p,"#f7f7f7")).replaceAll(s,"#e6f5d0")).replaceAll(f,"#b8e186")).replaceAll(y,"#7fbc41")).replaceAll(d,"#4d9221")).replaceAll(A,"#276419");return l}(l,e,o),l}function y(l,e){try{!function(l,e){const{genericFonts:o,colors:r,fontSizes:t}=e,c={font:{color:(0,n.Xy)(e),family:o.bodyFont,size:t.twoSmPx},title:{color:r.headingColor,subtitleColor:r.bodyText,font:{family:o.headingFont,size:t.mdPx,color:r.headingColor},pad:{l:e.spacing.twoXSPx},xanchor:"left",x:0},legend:{title:{font:{size:t.twoSmPx,color:(0,n.Xy)(e)},side:"top"},valign:"top",bordercolor:r.transparent,borderwidth:e.spacing.nonePx,font:{size:t.twoSmPx,color:(0,n.yq)(e)}},paper_bgcolor:r.bgColor,plot_bgcolor:r.bgColor,yaxis:{ticklabelposition:"outside",zerolinecolor:(0,n.ny)(e),title:{font:{color:(0,n.Xy)(e),size:t.smPx},standoff:e.spacing.twoXLPx},tickcolor:(0,n.ny)(e),tickfont:{color:(0,n.Xy)(e),size:t.twoSmPx},gridcolor:(0,n.ny)(e),minor:{gridcolor:(0,n.ny)(e)},automargin:!0},xaxis:{zerolinecolor:(0,n.ny)(e),gridcolor:(0,n.ny)(e),showgrid:!1,tickfont:{color:(0,n.Xy)(e),size:t.twoSmPx},tickcolor:(0,n.ny)(e),title:{font:{color:(0,n.Xy)(e),size:t.smPx},standoff:e.spacing.xlPx},minor:{gridcolor:(0,n.ny)(e)},zeroline:!1,automargin:!0,rangeselector:{bgcolor:r.bgColor,bordercolor:(0,n.ny)(e),borderwidth:1,x:0}},margin:{pad:e.spacing.smPx,r:e.spacing.nonePx,l:e.spacing.nonePx},hoverlabel:{bgcolor:r.bgColor,bordercolor:r.fadedText10,font:{color:(0,n.Xy)(e),family:o.bodyFont,size:t.twoSmPx}},coloraxis:{colorbar:{thickness:16,xpad:e.spacing.twoXLPx,ticklabelposition:"outside",outlinecolor:r.transparent,outlinewidth:8,len:.75,y:.5745,title:{font:{color:(0,n.Xy)(e),size:t.smPx}},tickfont:{color:(0,n.Xy)(e),size:t.twoSmPx}}},ternary:{gridcolor:(0,n.Xy)(e),bgcolor:r.bgColor,title:{font:{family:o.bodyFont,size:t.smPx}},color:(0,n.Xy)(e),aaxis:{gridcolor:(0,n.Xy)(e),linecolor:(0,n.Xy)(e),tickfont:{family:o.bodyFont,size:t.twoSmPx}},baxis:{linecolor:(0,n.Xy)(e),gridcolor:(0,n.Xy)(e),tickfont:{family:o.bodyFont,size:t.twoSmPx}},caxis:{linecolor:(0,n.Xy)(e),gridcolor:(0,n.Xy)(e),tickfont:{family:o.bodyFont,size:t.twoSmPx}}}};(0,i.merge)(l,c)}(l.layout.template.layout,e)}catch(o){const l=(0,p.b)(o);(0,s.H)(l)}"title"in l.layout&&(l.layout.title=(0,i.merge)(l.layout.title,{text:"<b>".concat(l.layout.title.text,"</b>")}))}var d=o(96266);const A=450;function u(l){return!!l}function g(l){let{element:e,width:o,height:c}=l;const i=e.figure,n=(0,t.u)(),p=(0,r.useCallback)((()=>{const l=JSON.parse(f(i.spec,n,e.theme)),r=l.layout.height,t=l.layout.width;return u(c)?(l.layout.width=o,l.layout.height=c):e.useContainerWidth?l.layout.width=o:(l.layout.width=t,l.layout.height=r),"streamlit"===e.theme?y(l,n):l.layout=function(l,e){const{colors:o,genericFonts:r}=e,t={font:{color:o.bodyText,family:r.bodyFont},paper_bgcolor:o.bgColor,plot_bgcolor:o.secondaryBg};return{...l,font:{...t.font,...l.font},paper_bgcolor:l.paper_bgcolor||t.paper_bgcolor,plot_bgcolor:l.plot_bgcolor||t.plot_bgcolor}}(l.layout,n),l}),[e.theme,e.useContainerWidth,i.spec,c,n,o]),[s,A]=(0,r.useState)(JSON.parse(i.config)),[g,b]=(0,r.useState)(p());(0,r.useLayoutEffect)((()=>{A(JSON.parse(i.config)),b(p())}),[e,n,c,o,i.config,p]);const{data:h,layout:m,frames:x}=g;return(0,d.jsx)(a.Z,{className:"stPlotlyChart",data:h,layout:m,config:s,frames:x},u(c)?"fullscreen":"original")}const b=(0,c.Z)((function(l){let{width:e,element:o,height:r}=l;switch(o.chart){case"url":return function(l){let{url:e,width:o,height:r}=l;const t=r||A;return(0,d.jsx)("iframe",{title:"Plotly",src:e,style:{width:o,height:t}})}({url:o.url,height:r,width:e});case"figure":return(0,d.jsx)(g,{width:e,element:o,height:r});default:throw new Error("Unrecognized PlotlyChart type: ".concat(o.chart))}}))}}]);