@stlite/desktop 0.61.0 → 0.62.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/asset-manifest.json +29 -29
- package/build/electron/worker.js +11 -18
- package/build/index.html +1 -1
- package/build/static/css/main.fc8432ac.css +1 -0
- package/build/static/js/1046.ac5578f7.chunk.js +1 -0
- package/build/static/js/1122.6e3ebec6.chunk.js +1 -0
- package/build/static/js/144.9af66e13.chunk.js +1 -0
- package/build/static/js/188.b2d8398c.chunk.js +1 -0
- package/build/static/js/2664.eabe48f2.chunk.js +1 -0
- package/build/static/js/2873.fef955fd.chunk.js +1 -0
- package/build/static/js/2940.d2fb8fd8.chunk.js +1 -0
- package/build/static/js/{4021.50e4fad7.chunk.js → 4021.8fb78041.chunk.js} +1 -1
- package/build/static/js/4482.98a18a0a.chunk.js +17 -0
- package/build/static/js/4494.322ddf1c.chunk.js +1 -0
- package/build/static/js/4724.db036438.chunk.js +5 -0
- package/build/static/js/4831.1e1e6a8e.chunk.js +5 -0
- package/build/static/js/5299.37cca9f0.chunk.js +9 -0
- package/build/static/js/6802.07e6658b.chunk.js +1 -0
- package/build/static/js/698.f3d5f888.chunk.js +1 -0
- package/build/static/js/7125.44ce1822.chunk.js +1 -0
- package/build/static/js/7579.36786736.chunk.js +1 -0
- package/build/static/js/7696.21dc1df4.chunk.js +1 -0
- package/build/static/js/{8186.383ded78.chunk.js → 8186.a240968d.chunk.js} +2 -2
- package/build/static/js/8798.21c608b2.chunk.js +1 -0
- package/build/static/js/8853.aba4297d.chunk.js +5 -0
- package/build/static/js/9001.10d51d69.chunk.js +1 -0
- package/build/static/js/9005.95d4ec49.chunk.js +5 -0
- package/build/static/js/9813.a1d01534.chunk.js +1 -0
- package/build/static/js/{9846.e3403599.chunk.js → 9846.7f2d71be.chunk.js} +1 -1
- package/build/static/js/main.802bd251.js +28 -0
- package/package.json +4 -4
- package/wheels/streamlit-1.36.0-cp312-none-any.whl +0 -0
- package/build/static/css/main.6fb7674e.css +0 -1
- package/build/static/js/1046.3bed3c50.chunk.js +0 -1
- package/build/static/js/1122.1fd3187d.chunk.js +0 -1
- package/build/static/js/144.546cefc4.chunk.js +0 -1
- package/build/static/js/188.d9018bc1.chunk.js +0 -1
- package/build/static/js/2664.219ef364.chunk.js +0 -1
- package/build/static/js/2873.86ab0f7f.chunk.js +0 -1
- package/build/static/js/2940.a8dfa8f6.chunk.js +0 -1
- package/build/static/js/4482.6da0ecb0.chunk.js +0 -1
- package/build/static/js/4494.280a2293.chunk.js +0 -1
- package/build/static/js/4724.85ca8f57.chunk.js +0 -1
- package/build/static/js/4831.a2c2c8ad.chunk.js +0 -1
- package/build/static/js/5299.478bd9da.chunk.js +0 -1
- package/build/static/js/6802.e50f982c.chunk.js +0 -1
- package/build/static/js/698.e345ddd0.chunk.js +0 -1
- package/build/static/js/7125.b89dc54f.chunk.js +0 -1
- package/build/static/js/7579.0cee4fc7.chunk.js +0 -1
- package/build/static/js/7696.82915710.chunk.js +0 -1
- package/build/static/js/8798.108f543f.chunk.js +0 -1
- package/build/static/js/8853.7b55e9e4.chunk.js +0 -1
- package/build/static/js/9001.18ff903a.chunk.js +0 -1
- package/build/static/js/9005.36ad4e5c.chunk.js +0 -1
- package/build/static/js/9813.151e8692.chunk.js +0 -1
- package/build/static/js/main.eea22731.js +0 -20
- /package/build/static/js/{8186.383ded78.chunk.js.LICENSE.txt → 8186.a240968d.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{main.eea22731.js.LICENSE.txt → main.802bd251.js.LICENSE.txt} +0 -0
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
{
|
|
2
2
|
"files": {
|
|
3
|
-
"main.css": "/static/css/main.
|
|
4
|
-
"main.js": "/static/js/main.
|
|
5
|
-
"static/js/8798.
|
|
3
|
+
"main.css": "/static/css/main.fc8432ac.css",
|
|
4
|
+
"main.js": "/static/js/main.802bd251.js",
|
|
5
|
+
"static/js/8798.21c608b2.chunk.js": "/static/js/8798.21c608b2.chunk.js",
|
|
6
6
|
"static/js/4994.2d981099.chunk.js": "/static/js/4994.2d981099.chunk.js",
|
|
7
7
|
"static/js/3685.39209b63.chunk.js": "/static/js/3685.39209b63.chunk.js",
|
|
8
8
|
"static/js/4785.23c48fdd.chunk.js": "/static/js/4785.23c48fdd.chunk.js",
|
|
9
|
-
"static/js/5299.
|
|
10
|
-
"static/js/4482.
|
|
9
|
+
"static/js/5299.37cca9f0.chunk.js": "/static/js/5299.37cca9f0.chunk.js",
|
|
10
|
+
"static/js/4482.98a18a0a.chunk.js": "/static/js/4482.98a18a0a.chunk.js",
|
|
11
11
|
"static/css/188.da3ff442.chunk.css": "/static/css/188.da3ff442.chunk.css",
|
|
12
|
-
"static/js/188.
|
|
12
|
+
"static/js/188.b2d8398c.chunk.js": "/static/js/188.b2d8398c.chunk.js",
|
|
13
13
|
"static/css/2664.c24b25fa.chunk.css": "/static/css/2664.c24b25fa.chunk.css",
|
|
14
|
-
"static/js/2664.
|
|
15
|
-
"static/js/4021.
|
|
16
|
-
"static/js/8186.
|
|
17
|
-
"static/js/1122.
|
|
18
|
-
"static/js/6802.
|
|
14
|
+
"static/js/2664.eabe48f2.chunk.js": "/static/js/2664.eabe48f2.chunk.js",
|
|
15
|
+
"static/js/4021.8fb78041.chunk.js": "/static/js/4021.8fb78041.chunk.js",
|
|
16
|
+
"static/js/8186.a240968d.chunk.js": "/static/js/8186.a240968d.chunk.js",
|
|
17
|
+
"static/js/1122.6e3ebec6.chunk.js": "/static/js/1122.6e3ebec6.chunk.js",
|
|
18
|
+
"static/js/6802.07e6658b.chunk.js": "/static/js/6802.07e6658b.chunk.js",
|
|
19
19
|
"static/js/9311.313a112a.chunk.js": "/static/js/9311.313a112a.chunk.js",
|
|
20
|
-
"static/js/144.
|
|
21
|
-
"static/js/2940.
|
|
22
|
-
"static/js/9001.
|
|
23
|
-
"static/js/2873.
|
|
20
|
+
"static/js/144.9af66e13.chunk.js": "/static/js/144.9af66e13.chunk.js",
|
|
21
|
+
"static/js/2940.d2fb8fd8.chunk.js": "/static/js/2940.d2fb8fd8.chunk.js",
|
|
22
|
+
"static/js/9001.10d51d69.chunk.js": "/static/js/9001.10d51d69.chunk.js",
|
|
23
|
+
"static/js/2873.fef955fd.chunk.js": "/static/js/2873.fef955fd.chunk.js",
|
|
24
24
|
"static/js/6134.d4057528.chunk.js": "/static/js/6134.d4057528.chunk.js",
|
|
25
25
|
"static/js/1189.4d3c558f.chunk.js": "/static/js/1189.4d3c558f.chunk.js",
|
|
26
26
|
"static/js/1740.760a8d99.chunk.js": "/static/js/1740.760a8d99.chunk.js",
|
|
27
|
-
"static/js/698.
|
|
28
|
-
"static/js/4724.
|
|
29
|
-
"static/js/9846.
|
|
27
|
+
"static/js/698.f3d5f888.chunk.js": "/static/js/698.f3d5f888.chunk.js",
|
|
28
|
+
"static/js/4724.db036438.chunk.js": "/static/js/4724.db036438.chunk.js",
|
|
29
|
+
"static/js/9846.7f2d71be.chunk.js": "/static/js/9846.7f2d71be.chunk.js",
|
|
30
30
|
"static/js/1261.55fcf8e4.chunk.js": "/static/js/1261.55fcf8e4.chunk.js",
|
|
31
|
-
"static/js/4494.
|
|
31
|
+
"static/js/4494.322ddf1c.chunk.js": "/static/js/4494.322ddf1c.chunk.js",
|
|
32
32
|
"static/js/1612.2c8886f8.chunk.js": "/static/js/1612.2c8886f8.chunk.js",
|
|
33
|
-
"static/js/9813.
|
|
33
|
+
"static/js/9813.a1d01534.chunk.js": "/static/js/9813.a1d01534.chunk.js",
|
|
34
34
|
"static/js/4694.153a454c.chunk.js": "/static/js/4694.153a454c.chunk.js",
|
|
35
|
-
"static/js/7579.
|
|
35
|
+
"static/js/7579.36786736.chunk.js": "/static/js/7579.36786736.chunk.js",
|
|
36
36
|
"static/js/2448.d1709ca6.chunk.js": "/static/js/2448.d1709ca6.chunk.js",
|
|
37
37
|
"static/js/8801.76a4052c.chunk.js": "/static/js/8801.76a4052c.chunk.js",
|
|
38
|
-
"static/js/7696.
|
|
39
|
-
"static/js/7125.
|
|
40
|
-
"static/js/8853.
|
|
41
|
-
"static/js/9005.
|
|
42
|
-
"static/js/1046.
|
|
43
|
-
"static/js/4831.
|
|
38
|
+
"static/js/7696.21dc1df4.chunk.js": "/static/js/7696.21dc1df4.chunk.js",
|
|
39
|
+
"static/js/7125.44ce1822.chunk.js": "/static/js/7125.44ce1822.chunk.js",
|
|
40
|
+
"static/js/8853.aba4297d.chunk.js": "/static/js/8853.aba4297d.chunk.js",
|
|
41
|
+
"static/js/9005.95d4ec49.chunk.js": "/static/js/9005.95d4ec49.chunk.js",
|
|
42
|
+
"static/js/1046.ac5578f7.chunk.js": "/static/js/1046.ac5578f7.chunk.js",
|
|
43
|
+
"static/js/4831.1e1e6a8e.chunk.js": "/static/js/4831.1e1e6a8e.chunk.js",
|
|
44
44
|
"static/js/5599.47501794.chunk.js": "/static/js/5599.47501794.chunk.js",
|
|
45
45
|
"static/js/4004.05e297fd.chunk.js": "/static/js/4004.05e297fd.chunk.js",
|
|
46
46
|
"static/js/5783.1caefe8d.chunk.js": "/static/js/5783.1caefe8d.chunk.js",
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
"index.html": "/index.html"
|
|
163
163
|
},
|
|
164
164
|
"entrypoints": [
|
|
165
|
-
"static/css/main.
|
|
166
|
-
"static/js/main.
|
|
165
|
+
"static/css/main.fc8432ac.css",
|
|
166
|
+
"static/js/main.802bd251.js"
|
|
167
167
|
]
|
|
168
168
|
}
|
package/build/electron/worker.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var
|
|
2
|
-
`).filter(e=>!e.startsWith("#")).map(e=>e.replace(
|
|
1
|
+
var me=Object.create;var K=Object.defineProperty;var pe=Object.getOwnPropertyDescriptor;var _e=Object.getOwnPropertyNames;var ye=Object.getPrototypeOf,he=Object.prototype.hasOwnProperty;var I=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var ve=(r,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of _e(e))!he.call(r,o)&&o!==t&&K(r,o,{get:()=>e[o],enumerable:!(s=pe(e,o))||s.enumerable});return r};var M=(r,e,t)=>(t=r!=null?me(ye(r)):{},ve(e||!r||!r.__esModule?K(t,"default",{value:r,enumerable:!0}):t,r));var V=I(C=>{"use strict";Object.defineProperty(C,"__esModule",{value:!0});C.validateRequirements=void 0;var Pe="[",be="(<=>!~",Se=";",we="@",ke=new RegExp(`[${Pe+be+Se+we}]`);function Ae(r){return r.split(ke)[0].trim()}function Re(r){return r.forEach(t=>{let s;try{s=new URL(t)}catch{return}if(s.protocol==="emfs:"||s.protocol==="file:")throw new Error(`"emfs:" and "file:" protocols are not allowed for the requirement (${t})`)}),r.filter(t=>Ae(t)==="streamlit"?(console.warn(`Streamlit is specified in the requirements ("${t}"), but it will be ignored. A built-in version of Streamlit will be used.`),!1):!0)}C.validateRequirements=Re});var X=I(T=>{"use strict";Object.defineProperty(T,"__esModule",{value:!0});T.parseRequirementsTxt=void 0;var Fe=/\s#.*$/;function Ie(r){return r.split(`
|
|
2
|
+
`).filter(e=>!e.startsWith("#")).map(e=>e.replace(Fe,"")).map(e=>e.trim()).filter(e=>e!=="")}T.parseRequirementsTxt=Ie});var G=I(N=>{"use strict";Object.defineProperty(N,"__esModule",{value:!0});N.PromiseDelegate=void 0;var U=class{constructor(){this.promise=new Promise((e,t)=>{this.resolveInternal=e,this.rejectInternal=t})}resolve(e){this.resolveInternal(e)}reject(e){this.rejectInternal(e)}};N.PromiseDelegate=U});var Q=I(b=>{"use strict";var Me=b&&b.__createBinding||(Object.create?function(r,e,t,s){s===void 0&&(s=t);var o=Object.getOwnPropertyDescriptor(e,t);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,s,o)}:function(r,e,t,s){s===void 0&&(s=t),r[s]=e[t]}),x=b&&b.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Me(e,r,t)};Object.defineProperty(b,"__esModule",{value:!0});x(V(),b);x(X(),b);x(G(),b)});var ee=I((Ve,Z)=>{"use strict";function v(r){if(typeof r!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(r))}function Y(r,e){for(var t="",s=0,o=-1,i=0,n,a=0;a<=r.length;++a){if(a<r.length)n=r.charCodeAt(a);else{if(n===47)break;n=47}if(n===47){if(!(o===a-1||i===1))if(o!==a-1&&i===2){if(t.length<2||s!==2||t.charCodeAt(t.length-1)!==46||t.charCodeAt(t.length-2)!==46){if(t.length>2){var d=t.lastIndexOf("/");if(d!==t.length-1){d===-1?(t="",s=0):(t=t.slice(0,d),s=t.length-1-t.lastIndexOf("/")),o=a,i=0;continue}}else if(t.length===2||t.length===1){t="",s=0,o=a,i=0;continue}}e&&(t.length>0?t+="/..":t="..",s=2)}else t.length>0?t+="/"+r.slice(o+1,a):t=r.slice(o+1,a),s=a-o-1;o=a,i=0}else n===46&&i!==-1?++i:i=-1}return t}function Oe(r,e){var t=e.dir||e.root,s=e.base||(e.name||"")+(e.ext||"");return t?t===e.root?t+s:t+r+s:s}var A={resolve:function(){for(var e="",t=!1,s,o=arguments.length-1;o>=-1&&!t;o--){var i;o>=0?i=arguments[o]:(s===void 0&&(s=process.cwd()),i=s),v(i),i.length!==0&&(e=i+"/"+e,t=i.charCodeAt(0)===47)}return e=Y(e,!t),t?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(e){if(v(e),e.length===0)return".";var t=e.charCodeAt(0)===47,s=e.charCodeAt(e.length-1)===47;return e=Y(e,!t),e.length===0&&!t&&(e="."),e.length>0&&s&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return v(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var e,t=0;t<arguments.length;++t){var s=arguments[t];v(s),s.length>0&&(e===void 0?e=s:e+="/"+s)}return e===void 0?".":A.normalize(e)},relative:function(e,t){if(v(e),v(t),e===t||(e=A.resolve(e),t=A.resolve(t),e===t))return"";for(var s=1;s<e.length&&e.charCodeAt(s)===47;++s);for(var o=e.length,i=o-s,n=1;n<t.length&&t.charCodeAt(n)===47;++n);for(var a=t.length,d=a-n,f=i<d?i:d,g=-1,l=0;l<=f;++l){if(l===f){if(d>f){if(t.charCodeAt(n+l)===47)return t.slice(n+l+1);if(l===0)return t.slice(n+l)}else i>f&&(e.charCodeAt(s+l)===47?g=l:l===0&&(g=0));break}var k=e.charCodeAt(s+l),_=t.charCodeAt(n+l);if(k!==_)break;k===47&&(g=l)}var c="";for(l=s+g+1;l<=o;++l)(l===o||e.charCodeAt(l)===47)&&(c.length===0?c+="..":c+="/..");return c.length>0?c+t.slice(n+g):(n+=g,t.charCodeAt(n)===47&&++n,t.slice(n))},_makeLong:function(e){return e},dirname:function(e){if(v(e),e.length===0)return".";for(var t=e.charCodeAt(0),s=t===47,o=-1,i=!0,n=e.length-1;n>=1;--n)if(t=e.charCodeAt(n),t===47){if(!i){o=n;break}}else i=!1;return o===-1?s?"/":".":s&&o===1?"//":e.slice(0,o)},basename:function(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');v(e);var s=0,o=-1,i=!0,n;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var a=t.length-1,d=-1;for(n=e.length-1;n>=0;--n){var f=e.charCodeAt(n);if(f===47){if(!i){s=n+1;break}}else d===-1&&(i=!1,d=n+1),a>=0&&(f===t.charCodeAt(a)?--a===-1&&(o=n):(a=-1,o=d))}return s===o?o=d:o===-1&&(o=e.length),e.slice(s,o)}else{for(n=e.length-1;n>=0;--n)if(e.charCodeAt(n)===47){if(!i){s=n+1;break}}else o===-1&&(i=!1,o=n+1);return o===-1?"":e.slice(s,o)}},extname:function(e){v(e);for(var t=-1,s=0,o=-1,i=!0,n=0,a=e.length-1;a>=0;--a){var d=e.charCodeAt(a);if(d===47){if(!i){s=a+1;break}continue}o===-1&&(i=!1,o=a+1),d===46?t===-1?t=a:n!==1&&(n=1):t!==-1&&(n=-1)}return t===-1||o===-1||n===0||n===1&&t===o-1&&t===s+1?"":e.slice(t,o)},format:function(e){if(e===null||typeof e!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return Oe("/",e)},parse:function(e){v(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;var s=e.charCodeAt(0),o=s===47,i;o?(t.root="/",i=1):i=0;for(var n=-1,a=0,d=-1,f=!0,g=e.length-1,l=0;g>=i;--g){if(s=e.charCodeAt(g),s===47){if(!f){a=g+1;break}continue}d===-1&&(f=!1,d=g+1),s===46?n===-1?n=g:l!==1&&(l=1):n!==-1&&(l=-1)}return n===-1||d===-1||l===0||l===1&&n===d-1&&n===a+1?d!==-1&&(a===0&&o?t.base=t.name=e.slice(1,d):t.base=t.name=e.slice(a,d)):(a===0&&o?(t.name=e.slice(1,n),t.base=e.slice(1,d)):(t.name=e.slice(a,n),t.base=e.slice(a,d)),t.ext=e.slice(n,d)),a>0?t.dir=e.slice(0,a-1):o&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};A.posix=A;Z.exports=A});var W=require("node:worker_threads");var ae=M(Q());var q=M(ee());function te(r,e){let t=q.default.normalize(e),o=q.default.dirname(t).split("/"),i=[];for(let n of o){i.push(n);let a=i.join("/");if(r.FS.analyzePath(a).exists){if(r.FS.isDir(a))throw new Error(`"${a}" already exists and is not a directory.`);continue}try{r.FS.mkdir(a)}catch(d){throw console.error(`Failed to create a directory "${a}"`),d}}}function H(r,e,t,s){te(r,e),r.FS.writeFile(e,t,s)}function re(r,e,t){te(r,t),r.FS.rename(e,t)}var Le="[",Ee="(<=>!~",Ce=";",Te="@",Ne=new RegExp(`[${Le+Ee+Ce+Te}]`);function De(r){return r.split(Ne)[0].trim()}function $(r){return r.forEach(t=>{let s;try{s=new URL(t)}catch{return}if(s.protocol==="emfs:"||s.protocol==="file:")throw new Error(`"emfs:" and "file:" protocols are not allowed for the requirement (${t})`)}),r.filter(t=>De(t)==="streamlit"?(console.warn(`Streamlit is specified in the requirements ("${t}"), but it will be ignored. A built-in version of Streamlit will be used.`),!1):!0)}async function Ue(r){let e=typeof process<"u"&&process.versions?.node,t;e?t=(await import("node:path")).sep:t="/";let s=r.slice(0,r.lastIndexOf(t)+1);if(r.endsWith(".mjs")){if(e){let o=await import("node:path"),i=await import("node:url");!r.includes("://")&&o.isAbsolute(r)&&(r=i.pathToFileURL(r).href)}return{scriptURL:r,pyodideIndexURL:s,isESModule:!0}}else return{scriptURL:r,pyodideIndexURL:s,isESModule:!1}}async function oe(r,e){let{scriptURL:t,pyodideIndexURL:s,isESModule:o}=await Ue(r),i;return o?i=(await import(t)).loadPyodide:(importScripts(t),i=self.loadPyodide),i({...e,indexURL:s})}function se(r){r.runPython(`
|
|
3
3
|
import micropip
|
|
4
4
|
micropip.add_mock_package(
|
|
5
5
|
"pyarrow", "0.0.1",
|
|
@@ -25,7 +25,7 @@ class ChunkedArray:
|
|
|
25
25
|
"""
|
|
26
26
|
}
|
|
27
27
|
)
|
|
28
|
-
`)}var
|
|
28
|
+
`)}var j;function xe(r,e){return j||(r.runPython(`
|
|
29
29
|
import ast
|
|
30
30
|
from textwrap import dedent
|
|
31
31
|
|
|
@@ -48,19 +48,12 @@ def find_imports(source: str) -> list[str]:
|
|
|
48
48
|
continue
|
|
49
49
|
imports.add(module_name.split(".")[0])
|
|
50
50
|
return imports
|
|
51
|
-
`),
|
|
51
|
+
`),j=r.globals.get("find_imports")),j(e).toJs()}function qe(r){let e=new Set;for(let t of r)for(let s of t)e.add(s);return e}async function ne(r,e,t){let s=t.map(f=>xe(r,f)),o=qe(s),a=Array.from(o).filter(f=>!r.runPython(`__import__('importlib').util.find_spec('${f}')`)).map(f=>r._api._import_name_to_package_name.get(f)).filter(f=>f);if(a.length===0)return;let d=new MessageChannel;e({type:"event:moduleAutoLoad",data:{packagesToLoad:a}},d.port2);try{let f=await r.loadPackage(a);d.port1.postMessage({type:"moduleAutoLoad:success",data:{loadedPackages:f}}),d.port1.close();return}catch(f){throw d.port1.postMessage({type:"moduleAutoLoad:error",error:f}),d.port1.close(),f}}var D=global;function ie(r,e,t){let s=ne(r,e,t);D.__moduleAutoLoadPromise__=s,r.runPythonAsync(`
|
|
52
52
|
from streamlit.runtime.scriptrunner import script_runner
|
|
53
53
|
from js import __moduleAutoLoadPromise__
|
|
54
54
|
|
|
55
55
|
script_runner.moduleAutoLoadPromise = __moduleAutoLoadPromise__
|
|
56
|
-
`)}function
|
|
57
|
-
site_packages_dirs = site.getsitepackages()
|
|
58
|
-
for site_packages in site_packages_dirs:
|
|
59
|
-
shutil.rmtree(site_packages)
|
|
60
|
-
`),console.debug(`Unarchive ${v}`),await o.runPythonAsync(`
|
|
61
|
-
with tarfile.open("${v}", "r") as tar_gz_file:
|
|
62
|
-
tar_gz_file.extractall("/")
|
|
63
|
-
`),console.debug("Restored the snapshot"),s("Mocking some packages."),console.debug("Mock pyarrow"),j(o),console.debug("Mocked pyarrow")),s("Installing packages."),console.debug("Installing the prebuilt packages:",y),await o.loadPackage(y),console.debug("Installed the prebuilt packages"),await o.loadPackage("micropip");let V=o.pyimport("micropip");if(h?(console.debug("Installing the wheels:",h,"and the requirements:",E),await V.install.callKwargs([h.stliteServer,h.streamlit,...E],{keep_going:!0}),console.debug("Installed the wheels and the requirements"),s("Mocking some packages."),console.debug("Mock pyarrow"),j(o),console.debug("Mocked pyarrow")):(console.debug("Installing the requirements:",E),await V.install.callKwargs(E,{keep_going:!0}),console.debug("Installed the requirements")),ue){let u=K.map(m=>o.FS.readFile(m,{encoding:"utf8"}));ae(o,e,u)}await o.runPythonAsync(`
|
|
56
|
+
`)}function le(r,e,t){function s(g){e({type:"event:progress",data:{message:g}})}let o,i,n=new ae.PromiseDelegate;async function a(){let g=await n.promise,l={...t,...g};console.debug("Initial data",l);let{entrypoint:k,files:_,archives:c,requirements:p,prebuiltPackageNames:y,wheels:h,pyodideUrl:w=r,streamlitConfig:S,idbfsMountpoints:R,nodefsMountpoints:O,moduleAutoLoad:ce}=l,L=$(p);s("Loading Pyodide."),console.debug("Loading Pyodide"),o=await oe(w,{stdout:console.log,stderr:console.error}),console.debug("Loaded Pyodide");let B=!1;R&&(B=!0,R.forEach(u=>{o.FS.mkdir(u),o.FS.mount(o.FS.filesystems.IDBFS,{},u)}),await new Promise((u,m)=>{o.FS.syncfs(!0,P=>{P?m(P):u()})})),O&&Object.entries(O).forEach(([u,m])=>{o.FS.mkdir(u),o.FS.mount(o.FS.filesystems.NODEFS,{root:m},u)}),s("Mounting files.");let z=[];await Promise.all(Object.keys(_).map(async u=>{let m=_[u],P;"url"in m?(console.debug(`Fetch a file from ${m.url}`),P=await fetch(m.url).then(F=>F.arrayBuffer()).then(F=>new Uint8Array(F))):P=m.data;let{opts:E}=_[u];console.debug(`Write a file "${u}"`),H(o,u,P,E),u.endsWith(".py")&&z.push(u)})),s("Unpacking archives."),await Promise.all(c.map(async u=>{let m;"url"in u?(console.debug(`Fetch an archive from ${u.url}`),m=await fetch(u.url).then(F=>F.arrayBuffer())):m=u.buffer;let{format:P,options:E}=u;console.debug("Unpack an archive",{format:P,options:E}),o.unpackArchive(m,P,E)})),await o.loadPackage("micropip");let J=o.pyimport("micropip");if(s("Mocking some packages."),console.debug("Mock pyarrow"),se(o),console.debug("Mocked pyarrow"),s("Installing packages."),console.debug("Installing the prebuilt packages:",y),await o.loadPackage(y),console.debug("Installed the prebuilt packages"),h?(console.debug("Installing the wheels:",h,"and the requirements:",L),await J.install.callKwargs([h.stliteServer,h.streamlit,...L],{keep_going:!0}),console.debug("Installed the wheels and the requirements")):(console.debug("Installing the requirements:",L),await J.install.callKwargs(L,{keep_going:!0}),console.debug("Installed the requirements")),ce){let u=z.map(m=>o.FS.readFile(m,{encoding:"utf8"}));ie(o,e,u)}await o.runPythonAsync(`
|
|
64
57
|
import importlib
|
|
65
58
|
importlib.invalidate_caches()
|
|
66
59
|
`),s("Loading streamlit package."),console.debug("Loading the Streamlit package"),await o.runPythonAsync(`
|
|
@@ -83,7 +76,7 @@ for name in streamlit.logger._loggers.keys():
|
|
|
83
76
|
logger.setLevel(logging.NOTSET)
|
|
84
77
|
|
|
85
78
|
streamlit.logger._loggers = {}
|
|
86
|
-
`);let
|
|
79
|
+
`);let ue=(u,m)=>{u>=40?console.error(m):u>=30?console.warn(m):u>=20?console.info(m):console.debug(m)};D.__logCallback__=ue,await o.runPythonAsync(`
|
|
87
80
|
def setup_loggers(streamlit_level, streamlit_message_format):
|
|
88
81
|
from js import __logCallback__
|
|
89
82
|
|
|
@@ -112,14 +105,14 @@ def setup_loggers(streamlit_level, streamlit_message_format):
|
|
|
112
105
|
streamlit_handler.setFormatter(streamlit_formatter)
|
|
113
106
|
streamlit_logger.addHandler(streamlit_handler)
|
|
114
107
|
streamlit_logger.setLevel(streamlit_level.upper())
|
|
115
|
-
`);let fe=(
|
|
108
|
+
`);let fe=(S?.["logger.level"]??"INFO").toString(),ge=S?.["logger.messageFormat"]??"%(asctime)s %(message)s";if(o.globals.get("setup_loggers")(fe,ge),console.debug("Set the loggers"),s("Mocking some Streamlit functions for the browser environment."),console.debug("Mocking some Streamlit functions"),await o.runPythonAsync(`
|
|
116
109
|
import streamlit
|
|
117
110
|
|
|
118
111
|
def is_cacheable_msg(msg):
|
|
119
112
|
return False
|
|
120
113
|
|
|
121
114
|
streamlit.runtime.runtime.is_cacheable_msg = is_cacheable_msg
|
|
122
|
-
`),console.debug("Mocked some Streamlit functions"),
|
|
115
|
+
`),console.debug("Mocked some Streamlit functions"),B){s("Setting up the IndexedDB filesystem synchronizer."),console.debug("Setting up the IndexedDB filesystem synchronizer");let u=!1;D.__scriptFinishedCallback__=()=>{console.debug("The script has finished. Syncing the filesystem."),u||(u=!0,o.FS.syncfs(!1,m=>{u=!1,m&&console.error(m)}))},await o.runPythonAsync(`
|
|
123
116
|
from streamlit.runtime.app_session import AppSession
|
|
124
117
|
from streamlit.runtime.scriptrunner import ScriptRunnerEvent
|
|
125
118
|
from js import __scriptFinishedCallback__
|
|
@@ -134,7 +127,7 @@ def wrap_app_session_on_scriptrunner_event(original_method):
|
|
|
134
127
|
return wrapped
|
|
135
128
|
|
|
136
129
|
AppSession._on_scriptrunner_event = wrap_app_session_on_scriptrunner_event(AppSession._on_scriptrunner_event)
|
|
137
|
-
`),console.debug("Set up the IndexedDB filesystem synchronizer")}return s("Booting up the Streamlit server."),console.debug("Booting up the Streamlit server"),D.__streamlitFlagOptions__={"browser.gatherUsageStats":!1,...
|
|
130
|
+
`),console.debug("Set up the IndexedDB filesystem synchronizer")}return s("Booting up the Streamlit server."),console.debug("Booting up the Streamlit server"),D.__streamlitFlagOptions__={"browser.gatherUsageStats":!1,...S,"runner.fastReruns":!1},await o.runPythonAsync(`
|
|
138
131
|
from stlite_server.bootstrap import load_config_options, prepare
|
|
139
132
|
from stlite_server.server import Server
|
|
140
133
|
from js import __streamlitFlagOptions__
|
|
@@ -142,11 +135,11 @@ from js import __streamlitFlagOptions__
|
|
|
142
135
|
flag_options = __streamlitFlagOptions__.to_py()
|
|
143
136
|
load_config_options(flag_options)
|
|
144
137
|
|
|
145
|
-
main_script_path = "${
|
|
138
|
+
main_script_path = "${k}"
|
|
146
139
|
args = []
|
|
147
140
|
|
|
148
141
|
prepare(main_script_path, args)
|
|
149
142
|
|
|
150
143
|
server = Server(main_script_path)
|
|
151
144
|
server.start()
|
|
152
|
-
`),console.debug("Booted up the Streamlit server"),console.debug("Setting up the HTTP server"),i=o.globals.get("server").copy(),console.debug("Set up the HTTP server"),e({type:"event:loaded"}),l}let
|
|
145
|
+
`),console.debug("Booted up the Streamlit server"),console.debug("Setting up the HTTP server"),i=o.globals.get("server").copy(),console.debug("Set up the HTTP server"),e({type:"event:loaded"}),l}let d=a().catch(g=>{throw e({type:"event:error",data:{error:g}}),g}),f=async g=>{let l=g.data;if(l.type==="initData"){n.resolve(l.data);return}let{moduleAutoLoad:k}=await d,_=g.ports[0];try{switch(l.type){case"websocket:connect":{console.debug("websocket:connect",l.data);let{path:c}=l.data;i.start_websocket(c,(p,y)=>{if(y){let h=p,w=h.getBuffer("u8");h.destroy();let S=new Uint8ClampedArray(w.data.buffer,w.data.byteOffset,w.data.byteLength);e({type:"websocket:message",data:{payload:new Uint8Array(S)}})}else e({type:"websocket:message",data:{payload:p}})}),_.postMessage({type:"reply"});break}case"websocket:send":{console.debug("websocket:send",l.data);let{payload:c}=l.data;i.receive_websocket_from_js(c);break}case"http:request":{console.debug("http:request",l.data);let{request:c}=l.data,p=(y,h,w)=>{let S=new Map(h.toJs()),R=w.toJs();console.debug({statusCode:y,headers:S,body:R});let O={type:"http:response",data:{response:{statusCode:y,headers:S,body:R}}};_.postMessage(O)};i.receive_http_from_js(c.method,decodeURIComponent(c.path),c.headers,c.body,p);break}case"file:write":{let{path:c,data:p,opts:y}=l.data;k&&typeof p=="string"&&c.endsWith(".py")&&(console.debug(`Auto install the requirements in ${c}`),ie(o,e,[p])),console.debug(`Write a file "${c}"`),H(o,c,p,y),_.postMessage({type:"reply"});break}case"file:rename":{let{oldPath:c,newPath:p}=l.data;console.debug(`Rename "${c}" to ${p}`),re(o,c,p),_.postMessage({type:"reply"});break}case"file:unlink":{let{path:c}=l.data;console.debug(`Remove "${c}`),o.FS.unlink(c),_.postMessage({type:"reply"});break}case"install":{let{requirements:c}=l.data,p=o.pyimport("micropip"),y=$(c);console.debug("Install the requirements:",y),await p.install.callKwargs(y,{keep_going:!0}).then(()=>{console.debug("Successfully installed"),_.postMessage({type:"reply"})})}}}catch(c){if(console.error(c),!(c instanceof Error))throw c;let p=new Error(c.message);p.name=c.name,p.stack=c.stack,_.postMessage({type:"reply",error:p})}};return e({type:"event:start"}),f}function de(){let r=process.env.NODEFS_MOUNTPOINTS;if(!r)return;let e;try{e=JSON.parse(r)}catch{console.error(`Failed to parse NODEFS_MOUNTPOINTS as JSON: ${r}`);return}if(typeof e!="object"){console.error(`NODEFS_MOUNTPOINTS is not an object: ${r}`);return}if(Array.isArray(e)){console.error(`NODEFS_MOUNTPOINTS is an array: ${r}`);return}if(Object.keys(e).some(t=>typeof t!="string")){console.error(`NODEFS_MOUNTPOINTS has non-string keys: ${r}`);return}if(Object.values(e).some(t=>typeof t!="string")){console.error(`NODEFS_MOUNTPOINTS has non-string values: ${r}`);return}return e}var He=r=>{console.debug("[worker thread] postMessage from worker",r),W.parentPort?.postMessage(r)},$e=le(process.env.PYODIDE_URL,He,{nodefsMountpoints:de()});W.parentPort?.on("message",({data:r,port:e})=>{console.debug("[worker thread] parentPort.onMessage",{data:r,port:e}),$e({data:r,ports:[e]})});
|
package/build/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>stlite</title><script defer="defer" src="/static/js/main.
|
|
1
|
+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>stlite</title><script defer="defer" src="/static/js/main.802bd251.js"></script><link href="/static/css/main.fc8432ac.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@font-face{font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(/static/media/KaTeX_AMS-Regular.73ea273a72f4aca30ca5.woff2) format("woff2"),url(/static/media/KaTeX_AMS-Regular.d562e886c52f12660a41.woff) format("woff"),url(/static/media/KaTeX_AMS-Regular.853be92419a6c3766b9a.ttf) format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(/static/media/KaTeX_Caligraphic-Bold.a1abf90dfd72792a577a.woff2) format("woff2"),url(/static/media/KaTeX_Caligraphic-Bold.d757c535a2e5902f1325.woff) format("woff"),url(/static/media/KaTeX_Caligraphic-Bold.7489a2fbfb9bfe704420.ttf) format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(/static/media/KaTeX_Caligraphic-Regular.d6484fce1ef428d5bd94.woff2) format("woff2"),url(/static/media/KaTeX_Caligraphic-Regular.db074fa22cf224af93d7.woff) format("woff"),url(/static/media/KaTeX_Caligraphic-Regular.7e873d3833eb108a0758.ttf) format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(/static/media/KaTeX_Fraktur-Bold.931d67ea207ab37ee693.woff2) format("woff2"),url(/static/media/KaTeX_Fraktur-Bold.354501bac435c3264834.woff) format("woff"),url(/static/media/KaTeX_Fraktur-Bold.4c761b3711973ab04edf.ttf) format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(/static/media/KaTeX_Fraktur-Regular.172d3529b26f8cedef6b.woff2) format("woff2"),url(/static/media/KaTeX_Fraktur-Regular.6fdf0ac577be0ba82a4c.woff) format("woff"),url(/static/media/KaTeX_Fraktur-Regular.ed305b5434865e06ffde.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(/static/media/KaTeX_Main-Bold.39890742bc957b368704.woff2) format("woff2"),url(/static/media/KaTeX_Main-Bold.0c3b8929d377c0e9b2f3.woff) format("woff"),url(/static/media/KaTeX_Main-Bold.8169508bf58f8bd92ad8.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(/static/media/KaTeX_Main-BoldItalic.20f389c4120be058d80a.woff2) format("woff2"),url(/static/media/KaTeX_Main-BoldItalic.428978dc7837d46de091.woff) format("woff"),url(/static/media/KaTeX_Main-BoldItalic.828abcb200061cffbaae.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(/static/media/KaTeX_Main-Italic.fe2176f79edaa716e621.woff2) format("woff2"),url(/static/media/KaTeX_Main-Italic.fd947498bc16392e76c2.woff) format("woff"),url(/static/media/KaTeX_Main-Italic.fa675e5e4bec9eb250b6.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(/static/media/KaTeX_Main-Regular.f650f111a3b890d116f1.woff2) format("woff2"),url(/static/media/KaTeX_Main-Regular.4f35fbcc9ee8614c2bcc.woff) format("woff"),url(/static/media/KaTeX_Main-Regular.9eba1d77abcf2aa6e94e.ttf) format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(/static/media/KaTeX_Math-BoldItalic.dcbcbd93bac0470b462d.woff2) format("woff2"),url(/static/media/KaTeX_Math-BoldItalic.3f07ed67f06c720120ce.woff) format("woff"),url(/static/media/KaTeX_Math-BoldItalic.bf2d440b3a42ea78a998.ttf) format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(/static/media/KaTeX_Math-Italic.6d3d25f4820d0da8f01f.woff2) format("woff2"),url(/static/media/KaTeX_Math-Italic.96759856b4e70f3a8338.woff) format("woff"),url(/static/media/KaTeX_Math-Italic.8a5f936332e8028c7278.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:normal;font-weight:700;src:url(/static/media/KaTeX_SansSerif-Bold.95591a929f0d32aa282a.woff2) format("woff2"),url(/static/media/KaTeX_SansSerif-Bold.b9cd458ac6d5889ff9c3.woff) format("woff"),url(/static/media/KaTeX_SansSerif-Bold.5b49f4993ae22d7975b4.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:italic;font-weight:400;src:url(/static/media/KaTeX_SansSerif-Italic.7d393d382f3e7fb1c637.woff2) format("woff2"),url(/static/media/KaTeX_SansSerif-Italic.8d593cfaa96238d5e2f8.woff) format("woff"),url(/static/media/KaTeX_SansSerif-Italic.b257a18c016f37ee4543.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:normal;font-weight:400;src:url(/static/media/KaTeX_SansSerif-Regular.cd5e231e0cc53b2cb2c0.woff2) format("woff2"),url(/static/media/KaTeX_SansSerif-Regular.02271ec5cb9f5b4588ac.woff) format("woff"),url(/static/media/KaTeX_SansSerif-Regular.2f7bc363fc5424ebda59.ttf) format("truetype")}@font-face{font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(/static/media/KaTeX_Script-Regular.c81d1b2a4b75d3eded60.woff2) format("woff2"),url(/static/media/KaTeX_Script-Regular.073b3402d036714b4370.woff) format("woff"),url(/static/media/KaTeX_Script-Regular.fc9ba5249878cd8f8d88.ttf) format("truetype")}@font-face{font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(/static/media/KaTeX_Size1-Regular.6eec866c69313624be60.woff2) format("woff2"),url(/static/media/KaTeX_Size1-Regular.0108e89c9003e8c14ea3.woff) format("woff"),url(/static/media/KaTeX_Size1-Regular.6de7d4b539221a49e9e2.ttf) format("truetype")}@font-face{font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(/static/media/KaTeX_Size2-Regular.2960900c4f271311eb36.woff2) format("woff2"),url(/static/media/KaTeX_Size2-Regular.3a99e70aee4076660d38.woff) format("woff"),url(/static/media/KaTeX_Size2-Regular.57f5c1837853986ea1db.ttf) format("truetype")}@font-face{font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(/static/media/KaTeX_Size3-Regular.e1951519f6f0596f7356.woff2) format("woff2"),url(/static/media/KaTeX_Size3-Regular.7947224e8a9914fa332b.woff) format("woff"),url(/static/media/KaTeX_Size3-Regular.8d6b6822586eea3d3b20.ttf) format("truetype")}@font-face{font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(/static/media/KaTeX_Size4-Regular.e418bf257af1052628d8.woff2) format("woff2"),url(/static/media/KaTeX_Size4-Regular.aeffd8025cba3647f1a6.woff) format("woff"),url(/static/media/KaTeX_Size4-Regular.4ad7c7e8bb8d10a34bb7.ttf) format("truetype")}@font-face{font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(/static/media/KaTeX_Typewriter-Regular.c295e7f71970f03c0549.woff2) format("woff2"),url(/static/media/KaTeX_Typewriter-Regular.4c6b94fd1d07f8beff7c.woff) format("woff"),url(/static/media/KaTeX_Typewriter-Regular.c5c02d763c89380dcb4e.ttf) format("truetype")}.katex{font:normal 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;text-indent:0;text-rendering:auto}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.16.10"}.katex .katex-mathml{clip:rect(1px,1px,1px,1px);border:0;height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{display:inline-flex;flex-direction:row}.katex .thinbox{max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.root{margin-left:.27777778em;margin-right:-.55555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.83333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.16666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.33333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.66666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.45666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.14666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.71428571em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.85714286em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.14285714em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.28571429em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.42857143em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.71428571em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.05714286em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.46857143em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.96285714em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.55428571em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.55555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.66666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.77777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.88888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.11111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.33333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.30444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.76444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.41666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.58333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.66666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.83333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.72833333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.07333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.34722222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.41666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.48611111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.55555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.69444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.83333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.44027778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.72777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.28935185em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.34722222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.40509259em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.46296296em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.52083333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.69444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.83333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.20023148em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.43981481em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.24108004em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.28929605em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.33751205em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.38572806em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.43394407em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.48216008em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.57859209em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.69431051em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.83317261em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.19961427em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.20096463em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.24115756em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.28135048em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.32154341em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.36173633em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.40192926em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.48231511em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.57877814em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.69453376em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.83360129em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo}@font-face{font-family:Source Code Pro;font-style:regular;font-weight:400;src:url(/static/media/SourceCodePro-Regular.84b900b88d09398d86b0.woff2) format("woff2")}@font-face{font-family:Source Code Pro;font-style:regular;font-weight:600;src:url(/static/media/SourceCodePro-SemiBold.17291d1c493cb25eb2c3.woff2) format("woff2")}@font-face{font-family:Source Code Pro;font-style:regular;font-weight:700;src:url(/static/media/SourceCodePro-Bold.17a68a0751a813474a0e.woff2) format("woff2")}@font-face{font-family:Source Code Pro;font-style:italic;font-weight:400;src:url(/static/media/SourceCodePro-Italic.ec122a420df4175e74f2.woff2) format("woff2")}@font-face{font-family:Source Code Pro;font-style:italic;font-weight:600;src:url(/static/media/SourceCodePro-SemiBoldItalic.f879ae27307c3926522b.woff2) format("woff2")}@font-face{font-family:Source Code Pro;font-style:italic;font-weight:700;src:url(/static/media/SourceCodePro-BoldItalic.d45b7a3df103d441d78b.woff2) format("woff2")}@font-face{font-family:Source Sans Pro;font-style:regular;font-weight:400;src:url(/static/media/SourceSansPro-Regular.0d69e5ff5e92ac64a0c9.woff2) format("woff2")}@font-face{font-family:Source Sans Pro;font-style:regular;font-weight:600;src:url(/static/media/SourceSansPro-SemiBold.abed79cd0df1827e18cf.woff2) format("woff2")}@font-face{font-family:Source Sans Pro;font-style:regular;font-weight:700;src:url(/static/media/SourceSansPro-Bold.118dea98980e20a81ced.woff2) format("woff2")}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:400;src:url(/static/media/SourceSansPro-Italic.8a9bfea74d43927d6eec.woff2) format("woff2")}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:600;src:url(/static/media/SourceSansPro-SemiBoldItalic.befb0a2824eabc5ce36b.woff2) format("woff2")}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:700;src:url(/static/media/SourceSansPro-BoldItalic.1d664be59d2eb5fef029.woff2) format("woff2")}@font-face{font-family:"Source Serif Pro";font-style:regular;font-weight:400;src:url(/static/media/SourceSerifPro-Regular.e6c37aa3926474cc93e1.woff2) format("woff2")}@font-face{font-family:"Source Serif Pro";font-style:regular;font-weight:600;src:url(/static/media/SourceSerifPro-SemiBold.5c1d378dd5990ef334ca.woff2) format("woff2")}@font-face{font-family:"Source Serif Pro";font-style:regular;font-weight:700;src:url(/static/media/SourceSerifPro-Bold.d7975b56594770699ae0.woff2) format("woff2")}@font-face{font-family:"Source Serif Pro";font-style:italic;font-weight:400;src:url(/static/media/SourceSerifPro-Italic.d3529cb5797663ac5d88.woff2) format("woff2")}@font-face{font-family:"Source Serif Pro";font-style:italic;font-weight:600;src:url(/static/media/SourceSerifPro-SemiBoldItalic.249e948b885d0c7d30a8.woff2) format("woff2")}@font-face{font-family:"Source Serif Pro";font-style:italic;font-weight:700;src:url(/static/media/SourceSerifPro-BoldItalic.913697a7178b128caa4c.woff2) format("woff2")}html{font-size:1rem}h1{font-size:calc(1.4rem + 1.8vw)}@media(min-width:1200px){h1{font-size:2.75rem}}h2{font-size:calc(1.35rem + 1.2vw)}@media(min-width:1200px){h2{font-size:2.25rem}}h3{font-size:calc(1.3rem + .6vw)}@media(min-width:1200px){h3{font-size:1.75rem}}h4{font-size:calc(1.275rem + .3vw)}@media(min-width:1200px){h4{font-size:1.5rem}}h5{font-size:1.25rem}h6{font-size:1rem}small{font-size:.875rem}sub,sup{font-size:.75rem}code,kbd,pre{font-size:1em}pre{font-size:.75em}pre code{font-size:inherit}code{font-size:.75em}kbd{border-radius:.25rem;font-size:.875rem}kbd kbd{font-size:1em}button,input,optgroup,select,textarea{font-size:inherit}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}legend{font-size:1rem}@font-face{font-display:block;font-family:Material Symbols Outlined;font-style:normal;font-weight:400;src:url(/static/media/MaterialSymbols-Outlined.909d2dce4aba724ad02f.woff2) format("woff2")}.Toastify__toast-body{width:0}.Toastify__toast-body>div:not(.Toastify__toast-icon){width:100%}:root{--toastify-color-light:#fff;--toastify-color-dark:#121212;--toastify-color-info:#3498db;--toastify-color-success:#07bc0c;--toastify-color-warning:#f1c40f;--toastify-color-error:#e74c3c;--toastify-color-transparent:hsla(0,0%,100%,.7);--toastify-icon-color-info:var(--toastify-color-info);--toastify-icon-color-success:var(--toastify-color-success);--toastify-icon-color-warning:var(--toastify-color-warning);--toastify-icon-color-error:var(--toastify-color-error);--toastify-toast-width:320px;--toastify-toast-background:#fff;--toastify-toast-min-height:64px;--toastify-toast-max-height:800px;--toastify-font-family:sans-serif;--toastify-z-index:9999;--toastify-text-color-light:#757575;--toastify-text-color-dark:#fff;--toastify-text-color-info:#fff;--toastify-text-color-success:#fff;--toastify-text-color-warning:#fff;--toastify-text-color-error:#fff;--toastify-spinner-color:#616161;--toastify-spinner-color-empty-area:#e0e0e0;--toastify-color-progress-light:linear-gradient(90deg,#4cd964,#5ac8fa,#007aff,#34aadc,#5856d6,#ff2d55);--toastify-color-progress-dark:#bb86fc;--toastify-color-progress-info:var(--toastify-color-info);--toastify-color-progress-success:var(--toastify-color-success);--toastify-color-progress-warning:var(--toastify-color-warning);--toastify-color-progress-error:var(--toastify-color-error)}.Toastify__toast-container{box-sizing:border-box;color:#fff;padding:4px;position:fixed;-webkit-transform:translateZ(var(--toastify-z-index));width:var(--toastify-toast-width);z-index:var(--toastify-z-index)}.Toastify__toast-container--top-left{left:1em;top:1em}.Toastify__toast-container--top-center{left:50%;top:1em;transform:translateX(-50%)}.Toastify__toast-container--top-right{right:1em;top:1em}.Toastify__toast-container--bottom-left{bottom:1em;left:1em}.Toastify__toast-container--bottom-center{bottom:1em;left:50%;transform:translateX(-50%)}.Toastify__toast-container--bottom-right{bottom:1em;right:1em}@media only screen and (max-width:480px){.Toastify__toast-container{left:0;margin:0;padding:0;width:100vw}.Toastify__toast-container--top-center,.Toastify__toast-container--top-left,.Toastify__toast-container--top-right{top:0;transform:translateX(0)}.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-right{bottom:0;transform:translateX(0)}.Toastify__toast-container--rtl{left:auto;right:0}}.Toastify__toast{border-radius:4px;box-shadow:0 1px 10px 0 rgba(0,0,0,.1),0 2px 15px 0 rgba(0,0,0,.05);box-sizing:border-box;cursor:default;direction:ltr;display:flex;font-family:var(--toastify-font-family);justify-content:space-between;margin-bottom:1rem;max-height:var(--toastify-toast-max-height);min-height:var(--toastify-toast-min-height);overflow:hidden;padding:8px;position:relative;z-index:0}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-body{align-items:center;display:flex;flex:1 1 auto;margin:auto 0;padding:6px}.Toastify__toast-body>div:last-child{flex:1 1;word-break:break-word}.Toastify__toast-icon{display:flex;flex-shrink:0;margin-inline-end:10px;width:20px}.Toastify--animate{animation-duration:.7s;animation-fill-mode:both}.Toastify--animate-icon{animation-duration:.3s;animation-fill-mode:both}@media only screen and (max-width:480px){.Toastify__toast{border-radius:0;margin-bottom:0}}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--colored.Toastify__toast--default,.Toastify__toast-theme--light{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{background:var(--toastify-color-info);color:var(--toastify-text-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{background:var(--toastify-color-success);color:var(--toastify-text-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{background:var(--toastify-color-warning);color:var(--toastify-text-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{background:var(--toastify-color-error);color:var(--toastify-text-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning{background:var(--toastify-color-transparent)}.Toastify__close-button{align-self:flex-start;background:transparent;border:none;color:#fff;cursor:pointer;opacity:.7;outline:none;padding:0;transition:.3s ease}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:focus,.Toastify__close-button:hover{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{bottom:0;height:5px;left:0;opacity:.7;position:absolute;transform-origin:left;width:100%;z-index:var(--toastify-z-index)}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{left:auto;right:0;transform-origin:right}.Toastify__spinner{animation:Toastify__spin .65s linear infinite;border:2px solid;border-color:var(--toastify-spinner-color-empty-area);border-radius:100%;border-right-color:var(--toastify-spinner-color);box-sizing:border-box;height:20px;width:20px}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,0,0)}to{opacity:0;transform:translate3d(2000px,0,0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,0,0)}to{opacity:0;transform:translate3d(-2000px,0,0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,-10px,0)}40%,45%{opacity:1;transform:translate3d(0,20px,0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,10px,0)}40%,45%{opacity:1;transform:translate3d(0,-20px,0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--bottom-left,.Toastify__bounce-enter--top-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--bottom-right,.Toastify__bounce-enter--top-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--bottom-left,.Toastify__bounce-exit--top-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--bottom-right,.Toastify__bounce-exit--top-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{animation-timing-function:ease-in;opacity:0;transform:perspective(400px) rotateX(90deg)}40%{animation-timing-function:ease-in;transform:perspective(400px) rotateX(-20deg)}60%{opacity:1;transform:perspective(400px) rotateX(10deg)}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:perspective(400px)}30%{opacity:1;transform:perspective(400px) rotateX(-20deg)}to{opacity:0;transform:perspective(400px) rotateX(90deg)}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translateZ(0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translateZ(0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translateZ(0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translateZ(0)}}@keyframes Toastify__slideOutRight{0%{transform:translateZ(0)}to{transform:translate3d(110%,0,0);visibility:hidden}}@keyframes Toastify__slideOutLeft{0%{transform:translateZ(0)}to{transform:translate3d(-110%,0,0);visibility:hidden}}@keyframes Toastify__slideOutDown{0%{transform:translateZ(0)}to{transform:translate3d(0,500px,0);visibility:hidden}}@keyframes Toastify__slideOutUp{0%{transform:translateZ(0)}to{transform:translate3d(0,-500px,0);visibility:hidden}}.Toastify__slide-enter--bottom-left,.Toastify__slide-enter--top-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--bottom-right,.Toastify__slide-enter--top-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--bottom-left,.Toastify__slide-exit--top-left{animation-name:Toastify__slideOutLeft}.Toastify__slide-exit--bottom-right,.Toastify__slide-exit--top-right{animation-name:Toastify__slideOutRight}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown}@keyframes Toastify__spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_stlite_desktop=self.webpackChunk_stlite_desktop||[]).push([[1046],{52955:(e,t,r)=>{r.d(t,{K:()=>n});var o=r(50120);class n{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(e,t,r){null!=this.formClearListener&&this.lastWidgetMgr===e&&this.lastFormId===t||(this.disconnect(),(0,o.bM)(t)&&(this.formClearListener=e.addFormClearedListener(t,r),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}}},31046:(e,t,r)=>{r.r(t),r.d(t,{default:()=>m});var o=r(5057),n=r(61839),i=r(97296),l=r(81607),a=r(47206),s=r(52955),u=r(38944),d=r(93905),c=r(21034),p=r(98790),f=r(50120);const b=(0,r(82160).Z)("div",{target:"e1ipygm10"})((()=>({position:"absolute",top:"50%",right:"2.05em"})),"");var y=r(96266);class g extends o.PureComponent{constructor(){super(...arguments),this.formClearHelper=new s.K,this.state={value:this.initialValue},this.commitWidgetValue=e=>{const{widgetMgr:t,element:r,fragmentId:o}=this.props;t.setStringValue(r,this.state.value,e,o)},this.onFormCleared=()=>{this.setState(((e,t)=>{var r;return{value:null!==(r=t.element.default)&&void 0!==r?r:null}}),(()=>this.commitWidgetValue({fromUi:!0})))},this.handleChange=e=>{let t;t=null===e?null:this.dateToString(e),this.setState({value:t},(()=>this.commitWidgetValue({fromUi:!0})))},this.stringToDate=e=>{if(null===e)return null;const[t,r]=e.split(":").map(Number),o=new Date;return o.setHours(t),o.setMinutes(r),o},this.dateToString=e=>`${e.getHours().toString().padStart(2,"0")}:${e.getMinutes().toString().padStart(2,"0")}`}get initialValue(){var e;const t=this.props.widgetMgr.getStringValue(this.props.element);return null!==(e=null!==t&&void 0!==t?t:this.props.element.default)&&void 0!==e?e:null}componentDidMount(){this.props.element.setValue?this.updateFromProtobuf():this.commitWidgetValue({fromUi:!1})}componentDidUpdate(){this.maybeUpdateFromProtobuf()}componentWillUnmount(){this.formClearHelper.disconnect()}maybeUpdateFromProtobuf(){const{setValue:e}=this.props.element;e&&this.updateFromProtobuf()}updateFromProtobuf(){const{value:e}=this.props.element;this.props.element.setValue=!1,this.setState({value:null!==e&&void 0!==e?e:null},(()=>{this.commitWidgetValue({fromUi:!1})}))}render(){var e;const{disabled:t,width:r,element:o,widgetMgr:a,theme:s}=this.props,g=(0,f.le)(o.default)&&!t,m={width:r},h={Select:{props:{disabled:t,overrides:{ControlContainer:{style:{height:s.sizes.minElementHeight,borderLeftWidth:s.sizes.borderWidth,borderRightWidth:s.sizes.borderWidth,borderTopWidth:s.sizes.borderWidth,borderBottomWidth:s.sizes.borderWidth}},IconsContainer:{style:()=>({paddingRight:s.spacing.sm})},ValueContainer:{style:()=>({lineHeight:1.4,paddingRight:s.spacing.sm,paddingLeft:s.spacing.sm,paddingBottom:s.spacing.sm,paddingTop:s.spacing.sm})},SingleValue:{props:{"data-testid":"stTimeInput-timeDisplay"}},Dropdown:{style:()=>({paddingTop:0,paddingBottom:0})},Popover:{props:{overrides:{Body:{style:()=>({marginTop:"1px"})}}}},SelectArrow:{component:l.Z,props:{overrides:{Svg:{style:()=>({width:s.iconSizes.xl,height:s.iconSizes.xl})}}}}}}}};return this.formClearHelper.manageFormClearListener(a,o.formId,this.onFormCleared),(0,y.jsxs)("div",{className:"stTimeInput","data-testid":"stTimeInput",style:m,children:[(0,y.jsx)(u.O,{label:o.label,disabled:t,labelVisibility:(0,f.iF)(null===(e=o.labelVisibility)||void 0===e?void 0:e.value),children:o.help&&(0,y.jsx)(d.dT,{children:(0,y.jsx)(c.Z,{content:o.help,placement:p.u.TOP_RIGHT})})}),(0,y.jsx)(n.Z,{format:"24",step:o.step?Number(o.step):900,value:(0,f.le)(this.state.value)?void 0:this.stringToDate(this.state.value),onChange:this.handleChange,overrides:h,nullable:g,creatable:!0,"aria-label":o.label}),g&&!(0,f.le)(this.state.value)&&(0,y.jsx)(b,{onClick:()=>{this.handleChange(null)},"data-testid":"stTimeInputClearButton",children:(0,y.jsx)(i.i,{overrides:{Svg:{style:{color:s.colors.darkGray,transform:"scale(1.41)",width:s.spacing.twoXL,":hover":{fill:s.colors.bodyText}}}},$isFocusVisible:!1})})]})}}const m=(0,a.b)(g)},51347:(e,t,r)=>{r.r(t),r.d(t,{ThemeConsumer:()=>l,ThemeProvider:()=>o.Z,createThemedStyled:()=>n.Tp,createThemedUseStyletron:()=>n.fj,createThemedWithStyle:()=>n.o4,expandBorderStyles:()=>i.Qj,hexToRgb:()=>i.oo,styled:()=>n.zo,useStyletron:()=>n.hQ,withStyle:()=>n.w1,withWrapper:()=>n.Le});var o=r(6532),n=r(53381),i=r(97012),l=o.N.Consumer},56653:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getOverride=f,t.getOverrideProps=b,t.getOverrides=g,t.mergeConfigurationOverrides=h,t.mergeOverride=m,t.mergeOverrides=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Object.assign({},e,t);return Object.keys(r).reduce((function(r,o){return r[o]=m(y(e[o]),y(t[o])),r}),{})},t.toObjectOverride=y,t.useOverrides=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n.useMemo((function(){return Object.keys(e).reduce((function(r,o){return r[o]=g(t[o],e[o]),r}),{})}),[t])};var o,n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==p(e)&&"function"!==typeof e)return{default:e};var r=a(t);if(r&&r.has(e))return r.get(e);var o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=n?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,r&&r.set(e,o);return o}(r(5057)),i=r(97408),l=(o=r(85794))&&o.__esModule?o:{default:o};function a(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},s.apply(this,arguments)}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){c(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function f(e){return(0,i.isValidElementType)(e)?e:e&&"object"===p(e)?e.component:e}function b(e){return e&&"object"===p(e)?"object"===p(e.props)?d(d({},e.props),{},{$style:e.style}):{$style:e.style}:{}}function y(e){return(0,i.isValidElementType)(e)?{component:e}:e||{}}function g(e,t){var r=f(e)||t;if(e&&"object"===p(e)&&"function"===typeof e.props){0;var o=n.forwardRef((function(t,o){var i=e.props(t),l=b(d(d({},e),{},{props:i}));return n.createElement(r,s({ref:o},l))}));return o.displayName=r.displayName,[o,{}]}var i=b(e);return[r,i]}function m(e,t){var r=d(d({},e),t);return e.props&&t.props&&(r.props=h(e.props,t.props)),e.style&&t.style&&(r.style=h(e.style,t.style)),r}function h(e,t){return"object"===p(e)&&"object"===p(t)?(0,l.default)({},e,t):function(){return(0,l.default)({},"function"===typeof e?e.apply(void 0,arguments):e,"function"===typeof t?t.apply(void 0,arguments):t)}}},85669:(e,t,r)=>{function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!==typeof e)return{default:e};var r=d(t);if(r&&r.has(e))return r.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&Object.prototype.hasOwnProperty.call(e,l)){var a=i?Object.getOwnPropertyDescriptor(e,l):null;a&&(a.get||a.set)?Object.defineProperty(n,l,a):n[l]=e[l]}n.default=e,r&&r.set(e,n);return n}(r(5057)),l=r(51347),a=r(56653),s=(n=r(79746))&&n.__esModule?n:{default:n},u=["title","size","color","overrides"];function d(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(d=function(e){return e?r:t})(e)}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},c.apply(this,arguments)}function p(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var o,n,i=[],l=!0,a=!1;try{for(r=r.call(e);!(l=(o=r.next()).done)&&(i.push(o.value),!t||i.length!==t);l=!0);}catch(s){a=!0,n=s}finally{try{l||null==r.return||r.return()}finally{if(a)throw n}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return b(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return b(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function y(e,t){var r=f((0,l.useStyletron)(),2)[1],o=e.title,n=void 0===o?"Delete Alt":o,d=e.size,b=e.color,y=e.overrides,g=void 0===y?{}:y,m=p(e,u),h=(0,a.mergeOverride)({component:r.icons&&r.icons.DeleteAlt?r.icons.DeleteAlt:null},g&&g.Svg?(0,a.toObjectOverride)(g.Svg):{});return i.createElement(s.default,c({viewBox:"0 0 24 24",ref:t,title:n,size:d,color:b,overrides:{Svg:h}},m),i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 20C16.4183 20 20 16.4183 20 12C20 7.58173 16.4183 4 12 4C7.58173 4 4 7.58173 4 12C4 16.4183 7.58173 20 12 20ZM10.0303 8.96967C9.73743 8.67679 9.26257 8.67679 8.96967 8.96967C8.67676 9.26257 8.67676 9.73743 8.96967 10.0303L10.9393 12L8.96967 13.9697C8.67676 14.2626 8.67676 14.7374 8.96967 15.0303C9.26257 15.3232 9.73743 15.3232 10.0303 15.0303L12 13.0607L13.9697 15.0303C14.2626 15.3232 14.7374 15.3232 15.0303 15.0303C15.3232 14.7374 15.3232 14.2626 15.0303 13.9697L13.0607 12L15.0303 10.0303C15.3232 9.73743 15.3232 9.26257 15.0303 8.96967C14.7374 8.67679 14.2626 8.67679 13.9697 8.96967L12 10.9393L10.0303 8.96967Z"}))}var g=i.forwardRef(y);t.default=g},79746:(e,t,r)=>{function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!==typeof e)return{default:e};var r=d(t);if(r&&r.has(e))return r.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&Object.prototype.hasOwnProperty.call(e,l)){var a=i?Object.getOwnPropertyDescriptor(e,l):null;a&&(a.get||a.set)?Object.defineProperty(n,l,a):n[l]=e[l]}n.default=e,r&&r.set(e,n);return n}(r(5057)),l=r(56653),a=r(53413),s=(n=r(74155))&&n.__esModule?n:{default:n},u=["children","title","size","color","overrides"];function d(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(d=function(e){return e?r:t})(e)}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},c.apply(this,arguments)}function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?p(Object(r),!0).forEach((function(t){b(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function b(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var o,n,i=[],l=!0,a=!1;try{for(r=r.call(e);!(l=(o=r.next()).done)&&(i.push(o.value),!t||i.length!==t);l=!0);}catch(s){a=!0,n=s}finally{try{l||null==r.return||r.return()}finally{if(a)throw n}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return g(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return g(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function m(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var h=function(e,t){var r=e.children,o=e.title,n=e.size,d=e.color,p=e.overrides,b=void 0===p?{}:p,g=m(e,u),h=y((0,l.getOverrides)(b.Svg,a.Svg),2),v=h[0],O=h[1],S=v.__STYLETRON__?f(f({title:o,$color:d,$size:n},g),O):f(f({title:o,color:d,size:n},(0,s.default)(g)),(0,s.default)(O));return i.createElement(v,c({"data-baseweb":"icon",ref:t},S),o?i.createElement("title",null,o):null,r)},v=i.forwardRef(h);t.default=v},74155:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t={};for(var r in e)"$"!==r[0]&&(t[r]=e[r]);return t}},53413:(e,t,r)=>{function o(e){var t=e.$theme,r=e.$size,o=e.$color,n=t.sizing.scale600;r&&(n=t.sizing[r]?t.sizing[r]:"number"===typeof r?"".concat(r,"px"):r);var i="currentColor";return o&&(i=t.colors[o]?t.colors[o]:o),{display:"inline-block",fill:i,color:i,height:n,width:n}}Object.defineProperty(t,"__esModule",{value:!0}),t.Svg=void 0,t.getSvgStyles=o;var n=(0,r(51347).styled)("svg",o);t.Svg=n,n.displayName="Svg",n.displayName="Svg"},85384:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.STATE_CHANGE_TYPE=t.SIZE=t.ENHANCER_POSITION=t.CUSTOM_INPUT_TYPE=t.ADJOINED=void 0;t.STATE_CHANGE_TYPE={change:"change"};t.CUSTOM_INPUT_TYPE={textarea:"textarea"};t.ADJOINED={none:"none",left:"left",right:"right",both:"both"};t.SIZE={mini:"mini",default:"default",compact:"compact",large:"large"};t.ENHANCER_POSITION={start:"start",end:"end"}},97296:(e,t,r)=>{t.i=void 0;var o,n=r(51347),i=r(85384),l=(o=r(85669))&&o.__esModule?o:{default:o};function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){u(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function u(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var d=(0,n.styled)("button",(function(e){var t,r=e.$theme,o=e.$size,n=e.$isFocusVisible,l=(t={},u(t,i.SIZE.mini,r.sizing.scale400),u(t,i.SIZE.compact,r.sizing.scale400),u(t,i.SIZE.default,r.sizing.scale300),u(t,i.SIZE.large,r.sizing.scale200),t)[o];return{display:"flex",alignItems:"center",borderTopStyle:"none",borderBottomStyle:"none",borderLeftStyle:"none",borderRightStyle:"none",background:"none",paddingLeft:l,paddingRight:l,outline:n?"solid 3px ".concat(r.colors.accent):"none",color:r.colors.contentPrimary}}));d.displayName="StyledMaskToggleButton",d.displayName="StyledMaskToggleButton";var c=(0,n.styled)("div",(function(e){var t,r=e.$alignTop,o=void 0!==r&&r,n=e.$size,l=e.$theme,a=(t={},u(t,i.SIZE.mini,l.sizing.scale200),u(t,i.SIZE.compact,l.sizing.scale200),u(t,i.SIZE.default,l.sizing.scale100),u(t,i.SIZE.large,l.sizing.scale0),t)[n];return{display:"flex",alignItems:o?"flex-start":"center",paddingLeft:a,paddingRight:a,paddingTop:o?l.sizing.scale500:"0px",color:l.colors.contentPrimary}}));c.displayName="StyledClearIconContainer",c.displayName="StyledClearIconContainer";var p=(0,n.styled)(l.default,(function(e){var t=e.$theme;return{cursor:"pointer",outline:e.$isFocusVisible?"solid 3px ".concat(t.colors.accent):"none"}}));function f(e,t){var r;return(r={},u(r,i.SIZE.mini,t.font100),u(r,i.SIZE.compact,t.font200),u(r,i.SIZE.default,t.font300),u(r,i.SIZE.large,t.font400),r)[e]}t.i=p,p.displayName="StyledClearIcon",p.displayName="StyledClearIcon";var b=function(e){var t=e.$isFocused,r=e.$adjoined,o=e.$error,n=e.$disabled,l=e.$positive,a=e.$size,u=e.$theme,d=e.$theme,c=d.borders,p=d.colors,b=d.sizing,y=d.typography,g=d.animation,m=e.$hasIconTrailing;return s(s(s(s({boxSizing:"border-box",display:"flex",overflow:"hidden",width:"100%",borderLeftWidth:"2px",borderRightWidth:"2px",borderTopWidth:"2px",borderBottomWidth:"2px",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",transitionProperty:"border",transitionDuration:g.timing200,transitionTimingFunction:g.easeOutCurve},function(e,t){var r=t.inputBorderRadius;return e===i.SIZE.mini&&(r=t.inputBorderRadiusMini),{borderTopLeftRadius:r,borderBottomLeftRadius:r,borderTopRightRadius:r,borderBottomRightRadius:r}}(a,c)),f(a,y)),function(e,t,r){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],n=arguments.length>4?arguments[4]:void 0;return e?{borderLeftColor:n.inputFillDisabled,borderRightColor:n.inputFillDisabled,borderTopColor:n.inputFillDisabled,borderBottomColor:n.inputFillDisabled,backgroundColor:n.inputFillDisabled}:t?{borderLeftColor:n.borderSelected,borderRightColor:n.borderSelected,borderTopColor:n.borderSelected,borderBottomColor:n.borderSelected,backgroundColor:n.inputFillActive}:r?{borderLeftColor:n.inputBorderError,borderRightColor:n.inputBorderError,borderTopColor:n.inputBorderError,borderBottomColor:n.inputBorderError,backgroundColor:n.inputFillError}:o?{borderLeftColor:n.inputBorderPositive,borderRightColor:n.inputBorderPositive,borderTopColor:n.inputBorderPositive,borderBottomColor:n.inputBorderPositive,backgroundColor:n.inputFillPositive}:{borderLeftColor:n.inputBorder,borderRightColor:n.inputBorder,borderTopColor:n.inputBorder,borderBottomColor:n.inputBorder,backgroundColor:n.inputFill}}(n,t,o,l,p)),function(e,t,r,o,n){var l=e===i.ADJOINED.both||e===i.ADJOINED.left&&"rtl"!==o||e===i.ADJOINED.right&&"rtl"===o||n&&"rtl"===o,a=e===i.ADJOINED.both||e===i.ADJOINED.right&&"rtl"!==o||e===i.ADJOINED.left&&"rtl"===o||n&&"rtl"!==o;return{paddingLeft:l?r.scale550:"0px",paddingRight:a?r.scale550:"0px"}}(r,0,b,u.direction,m))};var y=(0,n.styled)("div",b);y.displayName="Root",y.displayName="Root";var g=(0,n.styled)("div",(function(e){var t=e.$size,r=e.$disabled,o=e.$isFocused,n=e.$error,l=e.$positive,a=e.$theme,d=a.colors,c=a.sizing,p=a.typography,b=a.animation;return s(s(s({display:"flex",alignItems:"center",justifyContent:"center",transitionProperty:"color, background-color",transitionDuration:b.timing200,transitionTimingFunction:b.easeOutCurve},f(t,p)),function(e,t){var r;return(r={},u(r,i.SIZE.mini,{paddingRight:t.scale400,paddingLeft:t.scale400}),u(r,i.SIZE.compact,{paddingRight:t.scale400,paddingLeft:t.scale400}),u(r,i.SIZE.default,{paddingRight:t.scale300,paddingLeft:t.scale300}),u(r,i.SIZE.large,{paddingRight:t.scale200,paddingLeft:t.scale200}),r)[e]}(t,c)),function(e,t,r,o,n){return e?{color:n.inputEnhancerTextDisabled,backgroundColor:n.inputFillDisabled}:t?{color:n.contentPrimary,backgroundColor:n.inputFillActive}:r?{color:n.contentPrimary,backgroundColor:n.inputFillError}:o?{color:n.contentPrimary,backgroundColor:n.inputFillPositive}:{color:n.contentPrimary,backgroundColor:n.inputFill}}(r,o,n,l,d))}));g.displayName="InputEnhancer",g.displayName="InputEnhancer";var m=function(e){var t=e.$isFocused,r=e.$error,o=e.$disabled,n=e.$positive,i=e.$size,l=e.$theme,a=l.colors,u=l.typography,d=l.animation;return s(s({display:"flex",width:"100%",transitionProperty:"background-color",transitionDuration:d.timing200,transitionTimingFunction:d.easeOutCurve},f(i,u)),function(e,t,r,o,n){return e?{color:n.inputTextDisabled,backgroundColor:n.inputFillDisabled}:t?{color:n.contentPrimary,backgroundColor:n.inputFillActive}:r?{color:n.contentPrimary,backgroundColor:n.inputFillError}:o?{color:n.contentPrimary,backgroundColor:n.inputFillPositive}:{color:n.contentPrimary,backgroundColor:n.inputFill}}(o,t,r,n,a))};var h=(0,n.styled)("div",m);h.displayName="InputContainer",h.displayName="InputContainer";var v=function(e){var t=e.$disabled,r=(e.$isFocused,e.$error,e.$size),o=e.$theme,n=o.colors,l=o.sizing;return s(s(s({boxSizing:"border-box",backgroundColor:"transparent",borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0,borderLeftStyle:"none",borderRightStyle:"none",borderTopStyle:"none",borderBottomStyle:"none",outline:"none",width:"100%",minWidth:0,maxWidth:"100%",cursor:t?"not-allowed":"text",margin:"0",paddingTop:"0",paddingBottom:"0",paddingLeft:"0",paddingRight:"0"},f(r,o.typography)),function(e,t){var r;return(r={},u(r,i.SIZE.mini,{paddingTop:t.scale100,paddingBottom:t.scale100,paddingLeft:t.scale550,paddingRight:t.scale550}),u(r,i.SIZE.compact,{paddingTop:t.scale200,paddingBottom:t.scale200,paddingLeft:t.scale550,paddingRight:t.scale550}),u(r,i.SIZE.default,{paddingTop:t.scale400,paddingBottom:t.scale400,paddingLeft:t.scale550,paddingRight:t.scale550}),u(r,i.SIZE.large,{paddingTop:t.scale550,paddingBottom:t.scale550,paddingLeft:t.scale550,paddingRight:t.scale550}),r)[e]}(r,l)),function(e,t,r,o){return e?{color:o.inputTextDisabled,"-webkit-text-fill-color":o.inputTextDisabled,caretColor:o.contentPrimary,"::placeholder":{color:o.inputPlaceholderDisabled}}:{color:o.contentPrimary,caretColor:o.contentPrimary,"::placeholder":{color:o.inputPlaceholder}}}(t,0,0,n))};var O=(0,n.styled)("input",v);O.displayName="Input",O.displayName="Input"},85794:(e,t)=>{function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e){return Array.isArray(e)||"[object Object]"=={}.toString.call(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){t=t||{};for(var n,i,l=arguments.length<=1?0:arguments.length-1,a=0;a<l;a++)for(var s in n=(a+1<1||arguments.length<=a+1?void 0:arguments[a+1])||{})void 0!==r(n[s])&&(o(i=n[s])?t[s]=e(t[s]||Array.isArray(i)&&[]||{},i):t[s]=i);return t}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_stlite_desktop=self.webpackChunk_stlite_desktop||[]).push([[1122],{21122:(e,t,i)=>{i.r(t),i.d(t,{default:()=>H});var o=i(5057),n=i(59663),s=i(41656),r=i(50482),a=i.n(r),l=i(87333),d=i(47206),h=i(17966),c=i(12136),p=i(34971),m=i(57440),u=i(5156),g=i(72212),x=i(80552),w=i(69301),b=i(65815),y=i(50256),S=i(98899),v=i(31324),k=i(719),f=i(10266),j=i(64327),T=i(56129),C=i.n(T),z=i(87672),V=i(96266);const E=e=>{let{error:t,width:i,deltaType:o}=e;return t instanceof D?(0,V.jsx)(z.Z,{width:i,name:"No Mapbox token provided",message:(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)("p",{children:["To use ",(0,V.jsxs)("code",{children:["st.",o]})," or ",(0,V.jsx)("code",{children:"st.map"})," you need to set up a Mapbox access token."]}),(0,V.jsxs)("p",{children:["To get a token, create an account at"," ",(0,V.jsx)("a",{href:"https://mapbox.com",children:"https://mapbox.com"}),". It's free for moderate usage levels!"]}),(0,V.jsxs)("p",{children:["Once you have a token, just set it using the Streamlit config option ",(0,V.jsx)("code",{children:"mapbox.token"})," and don't forget to restart your Streamlit server at this point if it's still running, then reload this tab."]}),(0,V.jsxs)("p",{children:["See"," ",(0,V.jsx)("a",{href:"https://docs.streamlit.io/develop/api-reference/configuration/config.toml",children:"our documentation"})," ","for more info on how to set config options."]})]})}):t instanceof M?(0,V.jsx)(z.Z,{width:i,name:"Error fetching Streamlit Mapbox token",message:(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)("p",{children:"This app requires an internet connection."}),(0,V.jsx)("p",{children:"Please check your connection and try again."}),(0,V.jsxs)("p",{children:["If you think this is a bug, please file bug report"," ",(0,V.jsx)("a",{href:"https://github.com/streamlit/streamlit/issues/new/choose",children:"here"}),"."]})]})}):(0,V.jsx)(z.Z,{width:i,name:"Error fetching Streamlit Mapbox token",message:t.message})};var F=i(51673),Z=i(60913),I=i(24589),O=i(31808);class D extends Error{}class M extends Error{}const P="https://data.streamlit.io/tokens.json",W="mapbox",J=e=>t=>{class i extends o.PureComponent{constructor(i){super(i),this.context=void 0,this.initMapboxToken=async()=>{try{const e=await F.Z.get(P),{[W]:t}=e.data;if(!t)throw new Error(`Missing token ${W}`);this.setState({mapboxToken:t,isFetching:!1})}catch(e){const t=(0,j.b)(e);throw this.setState({mapboxTokenError:t,isFetching:!1}),new M(`${t.message} (${P})`)}},this.render=()=>{const{mapboxToken:i,mapboxTokenError:o,isFetching:n}=this.state,{width:s}=this.props;return o?(0,V.jsx)(E,{width:s,error:o,deltaType:e}):n?(0,V.jsx)(I.O,{element:Z.Od.create({style:Z.Od.SkeletonStyle.ELEMENT})}):(0,V.jsx)(t,{...this.props,mapboxToken:i,width:s})},this.state={isFetching:!0,mapboxToken:void 0,mapboxTokenError:void 0}}componentDidMount(){const e=this.props.element.mapboxToken||this.context.libConfig.mapboxToken;e?this.setState({mapboxToken:e,isFetching:!1}):this.initMapboxToken()}}return i.displayName=`withMapboxToken(${t.displayName||t.name})`,i.contextType=O.E,C()(i,t)};var L=i(82160);const N=(0,L.Z)("div",{target:"e1az0zs51"})((e=>{let{width:t,height:i,theme:o}=e;return{marginTop:o.spacing.sm,position:"relative",height:i,width:t}}),""),$=(0,L.Z)("div",{target:"e1az0zs50"})((e=>{let{theme:t}=e;return{position:"absolute",right:"2.625rem",top:t.spacing.md,zIndex:1,"button:not(:disabled)":{background:t.colors.bgColor,"& + button":{borderTopColor:t.colors.secondaryBg},"& span":{filter:(0,h.Iy)(t)?"":"invert(100%)"}}}}),"");i(20512);const B={classes:{...g,...b,...w,...y,CartoLayer:c.Z},functions:{colorBins:p.Z,colorCategories:m.Z,colorContinuous:u.Z}};(0,k.fh)([S.w,v.E]);const _=new x.Z({configuration:B});class R extends o.PureComponent{constructor(){super(...arguments),this.state={viewState:{bearing:0,pitch:0,zoom:11},initialized:!1,initialViewState:{},id:void 0,pydeckJson:void 0,isFullScreen:!1,isLightTheme:(0,h.Iy)(this.props.theme)},this.componentDidMount=()=>{this.setState({initialized:!0})},this.createTooltip=e=>{const{element:t}=this.props;if(!e||!e.object||!t.tooltip)return!1;const i=s.Z.parse(t.tooltip);return i.html?i.html=this.interpolate(e,i.html):i.text=this.interpolate(e,i.text),i},this.interpolate=(e,t)=>{const i=t.match(/{(.*?)}/g);return i&&i.forEach((i=>{const o=i.substring(1,i.length-1);e.object.hasOwnProperty(o)?t=t.replace(i,e.object[o]):e.object.hasOwnProperty("properties")&&e.object.properties.hasOwnProperty(o)&&(t=t.replace(i,e.object.properties[o]))})),t},this.onViewStateChange=e=>{let{viewState:t}=e;this.setState({viewState:t})}}static getDerivedStateFromProps(e,t){const i=R.getDeckObject(e,t);if(!a()(i.initialViewState,t.initialViewState)){const e=Object.keys(i.initialViewState).reduce(((e,o)=>i.initialViewState[o]===t.initialViewState[o]?e:{...e,[o]:i.initialViewState[o]}),{});return{viewState:{...t.viewState,...e},initialViewState:i.initialViewState}}return null}render(){const e=R.getDeckObject(this.props,this.state),{viewState:t}=this.state;return(0,V.jsx)(N,{className:"stDeckGlJsonChart",width:e.initialViewState.width,height:e.initialViewState.height,"data-testid":"stDeckGlJsonChart",children:(0,V.jsxs)(n.Z,{viewState:t,onViewStateChange:this.onViewStateChange,height:e.initialViewState.height,width:e.initialViewState.width,layers:this.state.initialized?e.layers:[],getTooltip:this.createTooltip,ContextProvider:l.X$.Provider,controller:!0,children:[(0,V.jsx)(l.Z3,{height:e.initialViewState.height,width:e.initialViewState.width,mapStyle:e.mapStyle&&("string"===typeof e.mapStyle?e.mapStyle:e.mapStyle[0]),mapboxApiAccessToken:this.props.element.mapboxToken||this.props.mapboxToken}),(0,V.jsx)($,{children:(0,V.jsx)(l.Pv,{className:"zoomButton",showCompass:!1})})]})})}}R.getDeckObject=(e,t)=>{var i,o;const{element:n,width:r,height:a,theme:l,isFullScreen:d}=e,c=null!==d&&void 0!==d&&d;var p,m,u;(n.id===t.id&&t.isFullScreen===c&&t.isLightTheme===(0,h.Iy)(l)||(t.pydeckJson=s.Z.parse(n.json),t.id=n.id),null!==(i=t.pydeckJson)&&void 0!==i&&i.mapStyle||(t.pydeckJson.mapStyle=`mapbox://styles/mapbox/${(0,h.Iy)(l)?"light":"dark"}-v9`),d)?Object.assign(null===(p=t.pydeckJson)||void 0===p?void 0:p.initialViewState,{width:r,height:a}):(null!==(m=t.pydeckJson)&&void 0!==m&&null!==(u=m.initialViewState)&&void 0!==u&&u.height||(t.pydeckJson.initialViewState.height=500),n.useContainerWidth&&(t.pydeckJson.initialViewState.width=r));return t.isFullScreen=d,t.isLightTheme=(0,h.Iy)(l),null===(o=t.pydeckJson)||void 0===o||delete o.views,_.convert(t.pydeckJson)};const H=(0,d.b)(J("st.pydeck_chart")((0,f.Z)(R)))},10266:(e,t,i)=>{i.d(t,{Z:()=>w});var o=i(5057),n=i(56129),s=i.n(n),r=i(47206),a=i(53136),l=i(88916),d=i(73401),h=i(31808),c=i(82160);const p=(0,c.Z)("button",{target:"e1vs0wn31"})((e=>{let{isExpanded:t,theme:i}=e;const o=t?{right:"0.4rem",top:"0.5rem",backgroundColor:"transparent"}:{right:"-3.0rem",top:"-0.375rem",opacity:0,transform:"scale(0)",backgroundColor:i.colors.lightenedBg05};return{position:"absolute",display:"flex",alignItems:"center",justifyContent:"center",zIndex:i.zIndices.sidebar+1,height:"2.5rem",width:"2.5rem",transition:"opacity 300ms 150ms, transform 300ms 150ms",border:"none",color:i.colors.fadedText60,borderRadius:"50%",...o,"&:focus":{outline:"none"},"&:active, &:focus-visible, &:hover":{opacity:1,outline:"none",transform:"scale(1)",color:i.colors.bodyText,transition:"none"}}}),""),m=(0,c.Z)("div",{target:"e1vs0wn30"})((e=>{let{theme:t,isExpanded:i}=e;return{"&:hover":{[p]:{opacity:1,transform:"scale(1)",transition:"none"}},...i?{position:"fixed",top:0,left:0,bottom:0,right:0,background:t.colors.bgColor,zIndex:t.zIndices.fullscreenWrapper,padding:t.spacing.md,paddingTop:"2.875rem",overflow:["auto","overlay"],display:"flex",alignItems:"center",justifyContent:"center"}:{}}}),"");var u=i(96266);class g extends o.PureComponent{constructor(e){super(e),this.context=void 0,this.controlKeys=e=>{const{expanded:t}=this.state;27===e.keyCode&&t&&this.zoomOut()},this.zoomIn=()=>{document.body.style.overflow="hidden",this.context.setFullScreen(!0),this.setState({expanded:!0})},this.zoomOut=()=>{document.body.style.overflow="unset",this.context.setFullScreen(!1),this.setState({expanded:!1})},this.convertScssRemValueToPixels=e=>parseFloat(e)*parseFloat(getComputedStyle(document.documentElement).fontSize),this.getWindowDimensions=()=>{const e=this.convertScssRemValueToPixels(this.props.theme.spacing.md),t=this.convertScssRemValueToPixels("2.875rem");return{fullWidth:window.innerWidth-2*e,fullHeight:window.innerHeight-(e+t)}},this.updateWindowDimensions=()=>{this.setState(this.getWindowDimensions())},this.state={expanded:!1,...this.getWindowDimensions()}}componentDidMount(){window.addEventListener("resize",this.updateWindowDimensions),document.addEventListener("keydown",this.controlKeys,!1)}componentWillUnmount(){window.removeEventListener("resize",this.updateWindowDimensions),document.removeEventListener("keydown",this.controlKeys,!1)}render(){const{expanded:e,fullWidth:t,fullHeight:i}=this.state,{children:o,width:n,height:s,disableFullscreenMode:r}=this.props;let h=a.d,c=this.zoomIn,g="View fullscreen";return e&&(h=l.m,c=this.zoomOut,g="Exit fullscreen"),(0,u.jsxs)(m,{isExpanded:e,"data-testid":"stFullScreenFrame",children:[!r&&(0,u.jsx)(p,{"data-testid":"StyledFullScreenButton",onClick:c,title:g,isExpanded:e,children:(0,u.jsx)(d.Z,{content:h})}),o(e?{width:t,height:i,expanded:e,expand:this.zoomIn,collapse:this.zoomOut}:{width:n,height:s,expanded:e,expand:this.zoomIn,collapse:this.zoomOut})]})}}g.contextType=h.E;const x=(0,r.b)(g);const w=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];class i extends o.PureComponent{constructor(){super(...arguments),this.render=()=>{const{width:i,height:o,disableFullscreenMode:n}=this.props;return(0,u.jsx)(x,{width:i,height:o,disableFullscreenMode:t||n,children:t=>{let{width:i,height:o,expanded:n,expand:s,collapse:r}=t;return(0,u.jsx)(e,{...this.props,width:i,height:o,isFullScreen:n,expand:s,collapse:r})}})}}}return i.displayName=`withFullScreenWrapper(${e.displayName||e.name})`,s()(i,e)}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_stlite_desktop=self.webpackChunk_stlite_desktop||[]).push([[144],{10144:(e,t,n)=>{n.r(t),n.d(t,{default:()=>h});n(5057);var i=n(10266),o=n(30992),s=n(82160);const r=(0,s.Z)("div",{target:"e115fcil2"})((e=>{let{theme:t}=e;return{display:"flex",flexDirection:"row",flexWrap:"wrap",rowGap:t.spacing.lg}}),""),l=(0,s.Z)("div",{target:"e115fcil1"})((()=>({display:"flex",flexDirection:"column",alignItems:"stretch",width:"auto",flexGrow:0})),""),d=(0,s.Z)("div",{target:"e115fcil0"})((e=>{let{theme:t}=e;return{fontFamily:t.genericFonts.bodyFont,fontSize:t.fontSizes.sm,color:t.colors.fadedText60,textAlign:"center",marginTop:t.spacing.xs,wordWrap:"break-word",padding:t.spacing.threeXS}}),"");var a=n(96266),c=function(e){return e[e.OriginalWidth=-1]="OriginalWidth",e[e.ColumnWidth=-2]="ColumnWidth",e[e.AutoWidth=-3]="AutoWidth",e}(c||{});const h=(0,i.Z)((function(e){let{width:t,isFullScreen:n,element:i,height:s,endpoints:h}=e;const u=(0,o.KA)(i.imgs);let m;const p=i.width;if(p===c.OriginalWidth||p===c.AutoWidth)m=void 0;else if(p===c.ColumnWidth)m=t;else{if(!(p>0))throw Error(`Invalid image width: ${p}`);m=p}const g={};return s&&n?(g.maxHeight=s,g["object-fit"]="contain"):(g.width=m,p===c.AutoWidth&&(g.maxWidth="100%")),(0,a.jsx)(r,{style:{width:t},children:u.map(((e,t)=>{const n=e;return(0,a.jsxs)(l,{"data-testid":"stImage",children:[(0,a.jsx)("img",{style:g,src:h.buildMediaURL(n.url),alt:t.toString()}),n.caption&&(0,a.jsx)(d,{"data-testid":"stImageCaption",style:g,children:` ${n.caption} `})]},t)}))})}))},10266:(e,t,n)=>{n.d(t,{Z:()=>x});var i=n(5057),o=n(56129),s=n.n(o),r=n(47206),l=n(53136),d=n(88916),a=n(73401),c=n(31808),h=n(82160);const u=(0,h.Z)("button",{target:"e1vs0wn31"})((e=>{let{isExpanded:t,theme:n}=e;const i=t?{right:"0.4rem",top:"0.5rem",backgroundColor:"transparent"}:{right:"-3.0rem",top:"-0.375rem",opacity:0,transform:"scale(0)",backgroundColor:n.colors.lightenedBg05};return{position:"absolute",display:"flex",alignItems:"center",justifyContent:"center",zIndex:n.zIndices.sidebar+1,height:"2.5rem",width:"2.5rem",transition:"opacity 300ms 150ms, transform 300ms 150ms",border:"none",color:n.colors.fadedText60,borderRadius:"50%",...i,"&:focus":{outline:"none"},"&:active, &:focus-visible, &:hover":{opacity:1,outline:"none",transform:"scale(1)",color:n.colors.bodyText,transition:"none"}}}),""),m=(0,h.Z)("div",{target:"e1vs0wn30"})((e=>{let{theme:t,isExpanded:n}=e;return{"&:hover":{[u]:{opacity:1,transform:"scale(1)",transition:"none"}},...n?{position:"fixed",top:0,left:0,bottom:0,right:0,background:t.colors.bgColor,zIndex:t.zIndices.fullscreenWrapper,padding:t.spacing.md,paddingTop:"2.875rem",overflow:["auto","overlay"],display:"flex",alignItems:"center",justifyContent:"center"}:{}}}),"");var p=n(96266);class g extends i.PureComponent{constructor(e){super(e),this.context=void 0,this.controlKeys=e=>{const{expanded:t}=this.state;27===e.keyCode&&t&&this.zoomOut()},this.zoomIn=()=>{document.body.style.overflow="hidden",this.context.setFullScreen(!0),this.setState({expanded:!0})},this.zoomOut=()=>{document.body.style.overflow="unset",this.context.setFullScreen(!1),this.setState({expanded:!1})},this.convertScssRemValueToPixels=e=>parseFloat(e)*parseFloat(getComputedStyle(document.documentElement).fontSize),this.getWindowDimensions=()=>{const e=this.convertScssRemValueToPixels(this.props.theme.spacing.md),t=this.convertScssRemValueToPixels("2.875rem");return{fullWidth:window.innerWidth-2*e,fullHeight:window.innerHeight-(e+t)}},this.updateWindowDimensions=()=>{this.setState(this.getWindowDimensions())},this.state={expanded:!1,...this.getWindowDimensions()}}componentDidMount(){window.addEventListener("resize",this.updateWindowDimensions),document.addEventListener("keydown",this.controlKeys,!1)}componentWillUnmount(){window.removeEventListener("resize",this.updateWindowDimensions),document.removeEventListener("keydown",this.controlKeys,!1)}render(){const{expanded:e,fullWidth:t,fullHeight:n}=this.state,{children:i,width:o,height:s,disableFullscreenMode:r}=this.props;let c=l.d,h=this.zoomIn,g="View fullscreen";return e&&(c=d.m,h=this.zoomOut,g="Exit fullscreen"),(0,p.jsxs)(m,{isExpanded:e,"data-testid":"stFullScreenFrame",children:[!r&&(0,p.jsx)(u,{"data-testid":"StyledFullScreenButton",onClick:h,title:g,isExpanded:e,children:(0,p.jsx)(a.Z,{content:c})}),i(e?{width:t,height:n,expanded:e,expand:this.zoomIn,collapse:this.zoomOut}:{width:o,height:s,expanded:e,expand:this.zoomIn,collapse:this.zoomOut})]})}}g.contextType=c.E;const w=(0,r.b)(g);const x=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];class n extends i.PureComponent{constructor(){super(...arguments),this.render=()=>{const{width:n,height:i,disableFullscreenMode:o}=this.props;return(0,p.jsx)(w,{width:n,height:i,disableFullscreenMode:t||o,children:t=>{let{width:n,height:i,expanded:o,expand:s,collapse:r}=t;return(0,p.jsx)(e,{...this.props,width:n,height:i,isFullScreen:o,expand:s,collapse:r})}})}}}return n.displayName=`withFullScreenWrapper(${e.displayName||e.name})`,s()(n,e)}},53136:(e,t,n)=>{n.d(t,{d:()=>r});var i=n(7896),o=n(5057),s=n(63947),r=o.forwardRef((function(e,t){return o.createElement(s.D,(0,i.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},e,{ref:t}),o.createElement("path",{d:"M0 0v4l1.5-1.5L3 4l1-1-1.5-1.5L4 0H0zm5 4L4 5l1.5 1.5L4 8h4V4L6.5 5.5 5 4z"}))}));r.displayName="FullscreenEnter"},88916:(e,t,n)=>{n.d(t,{m:()=>r});var i=n(7896),o=n(5057),s=n(63947),r=o.forwardRef((function(e,t){return o.createElement(s.D,(0,i.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},e,{ref:t}),o.createElement("path",{d:"M1 0L0 1l1.5 1.5L0 4h4V0L2.5 1.5 1 0zm3 4v4l1.5-1.5L7 8l1-1-1.5-1.5L8 4H4z"}))}));r.displayName="FullscreenExit"}}]);
|