iobroker.javascript 9.0.7 → 9.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/README.md +4 -7
  2. package/admin/assets/OpenAiDialog-CDDsvlCe.js +36 -0
  3. package/admin/assets/{Save-DgI3b32B.js → Save-D3ZQadHC.js} +1 -1
  4. package/admin/assets/{ScriptEditor-CXV4FkqA.js → ScriptEditor-Ciz-_SvX.js} +1 -1
  5. package/admin/assets/{ScriptEditorVanillaMonaco-D-2WOvcn.js → ScriptEditorVanillaMonaco-Cs6PL8eZ.js} +1 -1
  6. package/admin/assets/createSvgIcon-BDXN8whp.js +30 -0
  7. package/admin/assets/hostInit-fzxL8JAx.js +1 -1
  8. package/admin/assets/index-BZGWELt0.js +930 -0
  9. package/admin/assets/index-BompUVvy.js +1 -0
  10. package/admin/assets/{index-Del0XJb9.js → index-BxkzUxCi.js} +1 -1
  11. package/admin/assets/index-DOeHpve2.js +193 -0
  12. package/admin/assets/{index-x0m5vR1T.js → index-DmpUKunr.js} +1 -1
  13. package/admin/assets/{index-C5V5CZI4.js → index-DsS-er0h.js} +1 -1
  14. package/admin/assets/{index-D_7ZHRw9.js → index-PhbDiVdG.js} +1 -1
  15. package/admin/assets/{index-DLBeMhRC.js → index-quKi7QsD.js} +80 -80
  16. package/admin/assets/inheritsLoose-BLb-YnoJ.js +36 -0
  17. package/admin/assets/{iobroker_javascript__loadShare__react__loadShare__-BiJPUKBK.js → iobroker_javascript__loadShare__react__loadShare__-B-pIv4x_.js} +1 -1
  18. package/admin/assets/iobroker_javascript__mf_v__runtimeInit__mf_v__-CmuPLb0X.js +5 -0
  19. package/admin/assets/useTheme-BbFVG4-1.js +1 -0
  20. package/admin/custom/assets/Components-za_0yG9W.js +1 -0
  21. package/admin/custom/assets/ConfigCustomJavascriptSet__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__-BHJt30My.js +1 -0
  22. package/admin/custom/assets/ConfigCustomJavascriptSet__loadShare___mf_0_mui_mf_1_material__loadShare__-WrqdT1Hz.js +1 -0
  23. package/admin/custom/assets/{ConfigCustomJavascriptSet__loadShare__react__loadShare__-CzzIM-HW.js → ConfigCustomJavascriptSet__loadShare__react__loadShare__-B_YWmFeG.js} +1 -1
  24. package/admin/custom/assets/{ConfigCustomJavascriptSet__loadShare__react_mf_2_dom__loadShare__-DibxNPKw.js → ConfigCustomJavascriptSet__loadShare__react_mf_2_dom__loadShare__-DYzjQQsF.js} +1 -1
  25. package/admin/custom/assets/ConfigCustomJavascriptSet__mf_v__runtimeInit__mf_v__-Cib3-eWa.js +5 -0
  26. package/admin/custom/assets/DefaultPropsProvider-B41fRCEO.js +1 -0
  27. package/admin/custom/assets/DefaultPropsProvider-CfXkmG16.js +7 -0
  28. package/admin/custom/assets/FilledInput-BGGUNS4j.js +2 -0
  29. package/admin/custom/assets/Tabs-DjdFNknI.js +138 -0
  30. package/admin/custom/assets/ThemeProvider-Uan4kCQd.js +29 -0
  31. package/admin/custom/assets/{createSvgIcon-BQThUM-f.js → createSvgIcon-BxCMHFh5.js} +1 -1
  32. package/admin/custom/assets/createTheme-Ajie0adn.js +16 -0
  33. package/admin/custom/assets/defaultTheme-C_aSR-NR.js +1 -0
  34. package/admin/custom/assets/hostInit-CrAs5YZS.js +1 -1
  35. package/admin/custom/assets/index-7YkEnLQM.js +1 -0
  36. package/admin/custom/assets/index-B2rBO0oC.js +1 -0
  37. package/admin/custom/assets/{index-B8sZ2j0S.js → index-BkKMt4bp.js} +1 -1
  38. package/admin/custom/assets/{index-CoMexdpH.js → index-Bw5ZKbIF.js} +59 -59
  39. package/admin/custom/assets/index-ClFSKKDu.js +7 -0
  40. package/admin/custom/assets/index-DOnIDI_a.js +1 -0
  41. package/admin/custom/assets/{index-DIWNdd4a.js → index-DXg_kRe6.js} +1 -1
  42. package/admin/custom/assets/index-FOcWxrRT.js +904 -0
  43. package/admin/custom/assets/index-UhQfKbTz.js +55 -0
  44. package/admin/custom/assets/{index-CWXHfC2L.js → index-bxilEzdP.js} +1 -1
  45. package/admin/custom/assets/{index-CUcoXT75.js → index-yiPj_-Rb.js} +1 -1
  46. package/admin/custom/assets/{jsx-runtime-o-xyxrOj.js → jsx-runtime-lE4rOet2.js} +1 -1
  47. package/admin/custom/assets/useEnhancedEffect-DSK35Rma.js +8 -0
  48. package/admin/custom/assets/useTheme-CpiJlUE9.js +1 -0
  49. package/admin/custom/assets/useTheme-DWmRkwMP.js +1 -0
  50. package/admin/custom/assets/virtualExposes-4pgHXHfp.js +2 -0
  51. package/admin/custom/customComponents.js +2 -2
  52. package/admin/google-blockly/own/blocks_action.js +12 -2
  53. package/admin/google-blockly/own/blocks_convert.js +17 -3
  54. package/admin/google-blockly/own/blocks_logic.js +48 -15
  55. package/admin/google-blockly/own/blocks_object.js +20 -7
  56. package/admin/google-blockly/own/blocks_sendto.js +48 -11
  57. package/admin/google-blockly/own/blocks_switch.js +18 -8
  58. package/admin/google-blockly/own/blocks_system.js +33 -6
  59. package/admin/google-blockly/own/blocks_text.js +43 -0
  60. package/admin/google-blockly/own/blocks_time.js +33 -6
  61. package/admin/google-blockly/own/blocks_trigger.js +60 -22
  62. package/admin/google-blockly/own/blocks_words.js +4 -0
  63. package/admin/i18n/pl.json +60 -60
  64. package/admin/mf-manifest.json +1 -1
  65. package/admin/remoteEntry.js +2 -2
  66. package/admin/tab.html +19 -6
  67. package/io-package.json +14 -14
  68. package/package.json +2 -2
  69. package/admin/assets/OpenAiDialog-CVjeP8wR.js +0 -34
  70. package/admin/assets/createSvgIcon-Dtl7HhPO.js +0 -30
  71. package/admin/assets/index-BwNmFzfy.js +0 -193
  72. package/admin/assets/index-C8bcOa64.js +0 -930
  73. package/admin/assets/index-Dm1jc4t6.js +0 -1
  74. package/admin/assets/inheritsLoose-C9MZGDit.js +0 -36
  75. package/admin/assets/iobroker_javascript__mf_v__runtimeInit__mf_v__-CBQgOKij.js +0 -10
  76. package/admin/assets/useTheme-g_P2Itm2.js +0 -1
  77. package/admin/custom/assets/Components-D9kRsHNY.js +0 -1
  78. package/admin/custom/assets/ConfigCustomJavascriptSet__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__-DAwHgdl6.js +0 -1
  79. package/admin/custom/assets/ConfigCustomJavascriptSet__loadShare___mf_0_mui_mf_1_material__loadShare__-BlV79j8y.js +0 -1
  80. package/admin/custom/assets/ConfigCustomJavascriptSet__mf_v__runtimeInit__mf_v__-BaLGCXMi.js +0 -10
  81. package/admin/custom/assets/DefaultPropsProvider-9qubdy-V.js +0 -7
  82. package/admin/custom/assets/DefaultPropsProvider-DbEA5uR6.js +0 -1
  83. package/admin/custom/assets/FilledInput-BpuM_GyB.js +0 -2
  84. package/admin/custom/assets/Tabs-CvEv0KOT.js +0 -138
  85. package/admin/custom/assets/ThemeProvider-DZTpMR8n.js +0 -29
  86. package/admin/custom/assets/createTheme-BwMO3rTt.js +0 -16
  87. package/admin/custom/assets/defaultTheme-avbtL0lf.js +0 -1
  88. package/admin/custom/assets/index-B6ima1M5.js +0 -904
  89. package/admin/custom/assets/index-B7G6Jpdl.js +0 -1
  90. package/admin/custom/assets/index-BzS6q3oS.js +0 -55
  91. package/admin/custom/assets/index-CttBOMyq.js +0 -1
  92. package/admin/custom/assets/index-Dbe-II7_.js +0 -7
  93. package/admin/custom/assets/useEnhancedEffect-CdLBzwyA.js +0 -8
  94. package/admin/custom/assets/useTheme-CDtRWagv.js +0 -1
  95. package/admin/custom/assets/useTheme-MELayQMj.js +0 -1
  96. package/admin/custom/assets/useThemeWithoutDefault-C-hl_s0Z.js +0 -1
  97. package/admin/custom/assets/virtualExposes-BMKIjWrE.js +0 -2
@@ -1,4 +1,4 @@
1
- import{g as Na}from"./_commonjsHelpers-D6-XlEtG.js";import{C as Pa}from"./ConfigCustomJavascriptSet__loadShare__react__loadShare__-CzzIM-HW.js";function za(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const l in r)if(l!=="default"&&!(l in e)){const u=Object.getOwnPropertyDescriptor(r,l);u&&Object.defineProperty(e,l,u.get?u:{enumerable:!0,get:()=>r[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var Co={exports:{}},ve={},xo={exports:{}},_o={};/**
1
+ import{g as Na}from"./_commonjsHelpers-D6-XlEtG.js";import{C as Pa}from"./ConfigCustomJavascriptSet__loadShare__react__loadShare__-B_YWmFeG.js";function za(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const l in r)if(l!=="default"&&!(l in e)){const u=Object.getOwnPropertyDescriptor(r,l);u&&Object.defineProperty(e,l,u.get?u:{enumerable:!0,get:()=>r[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var Co={exports:{}},ve={},xo={exports:{}},_o={};/**
2
2
  * @license React
3
3
  * scheduler.production.min.js
4
4
  *
@@ -1 +1 @@
1
- import"./ConfigCustomJavascriptSet__mf_v__runtimeInit__mf_v__-BaLGCXMi.js";import{j as s}from"./jsx-runtime-o-xyxrOj.js";import{R as d}from"./ConfigCustomJavascriptSet__loadShare__react__loadShare__-CzzIM-HW.js";import{C as f}from"./ConfigCustomJavascriptSet__loadShare__react_mf_2_dom__loadShare__-DibxNPKw.js";import"./_commonjsHelpers-D6-XlEtG.js";(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))i(e);new MutationObserver(e=>{for(const t of e)if(t.type==="childList")for(const o of t.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function a(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?t.credentials="include":e.crossOrigin==="anonymous"?t.credentials="omit":t.credentials="same-origin",t}function i(e){if(e.ep)return;e.ep=!0;const t=a(e);fetch(e.href,t)}})();var c,n=f;c=n.createRoot,n.hydrateRoot;window.adapterName="adapter-component-template";const l=document.getElementById("root"),m=c(l);m.render(s.jsx(d.StrictMode,{children:s.jsx("div",{})}));
1
+ import"./ConfigCustomJavascriptSet__mf_v__runtimeInit__mf_v__-Cib3-eWa.js";import{j as s}from"./jsx-runtime-lE4rOet2.js";import{R as d}from"./ConfigCustomJavascriptSet__loadShare__react__loadShare__-B_YWmFeG.js";import{C as f}from"./ConfigCustomJavascriptSet__loadShare__react_mf_2_dom__loadShare__-DYzjQQsF.js";import"./_commonjsHelpers-D6-XlEtG.js";(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))i(e);new MutationObserver(e=>{for(const t of e)if(t.type==="childList")for(const o of t.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function a(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?t.credentials="include":e.crossOrigin==="anonymous"?t.credentials="omit":t.credentials="same-origin",t}function i(e){if(e.ep)return;e.ep=!0;const t=a(e);fetch(e.href,t)}})();var c,n=f;c=n.createRoot,n.hydrateRoot;window.adapterName="adapter-component-template";const l=document.getElementById("root"),m=c(l);m.render(s.jsx(d.StrictMode,{children:s.jsx("div",{})}));
@@ -1,4 +1,4 @@
1
- import{C as a}from"./ConfigCustomJavascriptSet__loadShare__react__loadShare__-CzzIM-HW.js";var f={exports:{}},_={};/**
1
+ import{C as a}from"./ConfigCustomJavascriptSet__loadShare__react__loadShare__-B_YWmFeG.js";var f={exports:{}},_={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -0,0 +1,8 @@
1
+ import{C as l}from"./ConfigCustomJavascriptSet__loadShare__react__loadShare__-B_YWmFeG.js";import{i as k}from"./DefaultPropsProvider-CfXkmG16.js";import{j as A}from"./jsx-runtime-lE4rOet2.js";import{u as L}from"./useTheme-DWmRkwMP.js";import{$ as P,a0 as O,Y as I,a1 as T,a2 as G,a3 as J,a4 as X,a5 as q}from"./createTheme-Ajie0adn.js";var R={exports:{}},r={};/** @license React v16.13.1
2
+ * react-is.production.min.js
3
+ *
4
+ * Copyright (c) Facebook, Inc. and its affiliates.
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */var s=typeof Symbol=="function"&&Symbol.for,_=s?Symbol.for("react.element"):60103,C=s?Symbol.for("react.portal"):60106,m=s?Symbol.for("react.fragment"):60107,p=s?Symbol.for("react.strict_mode"):60108,d=s?Symbol.for("react.profiler"):60114,S=s?Symbol.for("react.provider"):60109,b=s?Symbol.for("react.context"):60110,w=s?Symbol.for("react.async_mode"):60111,v=s?Symbol.for("react.concurrent_mode"):60111,$=s?Symbol.for("react.forward_ref"):60112,g=s?Symbol.for("react.suspense"):60113,N=s?Symbol.for("react.suspense_list"):60120,h=s?Symbol.for("react.memo"):60115,E=s?Symbol.for("react.lazy"):60116,W=s?Symbol.for("react.block"):60121,Y=s?Symbol.for("react.fundamental"):60117,D=s?Symbol.for("react.responder"):60118,V=s?Symbol.for("react.scope"):60119;function u(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case _:switch(e=e.type,e){case w:case v:case m:case d:case p:case g:return e;default:switch(e=e&&e.$$typeof,e){case b:case $:case E:case h:case S:return e;default:return t}}case C:return t}}}function z(e){return u(e)===v}r.AsyncMode=w;r.ConcurrentMode=v;r.ContextConsumer=b;r.ContextProvider=S;r.Element=_;r.ForwardRef=$;r.Fragment=m;r.Lazy=E;r.Memo=h;r.Portal=C;r.Profiler=d;r.StrictMode=p;r.Suspense=g;r.isAsyncMode=function(e){return z(e)||u(e)===w};r.isConcurrentMode=z;r.isContextConsumer=function(e){return u(e)===b};r.isContextProvider=function(e){return u(e)===S};r.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===_};r.isForwardRef=function(e){return u(e)===$};r.isFragment=function(e){return u(e)===m};r.isLazy=function(e){return u(e)===E};r.isMemo=function(e){return u(e)===h};r.isPortal=function(e){return u(e)===C};r.isProfiler=function(e){return u(e)===d};r.isStrictMode=function(e){return u(e)===p};r.isSuspense=function(e){return u(e)===g};r.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===m||e===v||e===d||e===p||e===g||e===N||typeof e=="object"&&e!==null&&(e.$$typeof===E||e.$$typeof===h||e.$$typeof===S||e.$$typeof===b||e.$$typeof===$||e.$$typeof===Y||e.$$typeof===D||e.$$typeof===V||e.$$typeof===W)};r.typeOf=u;R.exports=r;var B=R.exports,F=B,H={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},K={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},j={};j[F.ForwardRef]=H;j[F.Memo]=K;var M=function(t,a){var f=arguments;if(a==null||!J.call(a,"css"))return l.createElement.apply(void 0,f);var i=f.length,o=new Array(i);o[0]=X,o[1]=q(t,a);for(var n=2;n<i;n++)o[n]=f[n];return l.createElement.apply(null,o)};(function(e){var t;t||(t=e.JSX||(e.JSX={}))})(M||(M={}));var Q=O(function(e,t){var a=e.styles,f=P([a],void 0,l.useContext(I)),i=l.useRef();return T(function(){var o=t.key+"-global",n=new t.sheet.constructor({key:o,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),y=!1,c=document.querySelector('style[data-emotion="'+o+" "+f.name+'"]');return t.sheet.tags.length&&(n.before=t.sheet.tags[0]),c!==null&&(y=!0,c.setAttribute("data-emotion",o),n.hydrate([c])),i.current=[n,y],function(){n.flush()}},[t]),T(function(){var o=i.current,n=o[0],y=o[1];if(y){o[1]=!1;return}if(f.next!==void 0&&G(t,f.next,!0),n.tags.length){var c=n.tags[n.tags.length-1].nextElementSibling;n.before=c,n.flush()}t.insert("",f,n,!1)},[t,f.name]),null});function U(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return P(t)}function ae(){var e=U.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}function Z(e){return e==null||Object.keys(e).length===0}function ee(e){const{styles:t,defaultTheme:a={}}=e,f=typeof t=="function"?i=>t(Z(i)?a:i):t;return A.jsx(Q,{styles:f})}function x(e){const t=k(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles=`@layer global{${t.styles}}`),t):e}function fe({styles:e,themeId:t,defaultTheme:a={}}){const f=L(a),i=t&&f[t]||f;let o=typeof e=="function"?e(i):e;return i.modularCssLayers&&(Array.isArray(o)?o=o.map(n=>x(typeof n=="function"?n(i):n)):o=x(o)),A.jsx(ee,{styles:o})}const ue=typeof window<"u"?l.useLayoutEffect:l.useEffect;export{fe as G,ee as a,U as c,ae as k,ue as u};
@@ -0,0 +1 @@
1
+ import"./ConfigCustomJavascriptSet__loadShare__react__loadShare__-B_YWmFeG.js";import{d as m}from"./defaultTheme-C_aSR-NR.js";import{T as o}from"./createTheme-Ajie0adn.js";import{u as r}from"./useTheme-DWmRkwMP.js";function f(){const e=r(m);return e[o]||e}export{f as u};
@@ -0,0 +1 @@
1
+ import{Y as n,d as o}from"./createTheme-Ajie0adn.js";import{C as r}from"./ConfigCustomJavascriptSet__loadShare__react__loadShare__-B_YWmFeG.js";function s(e){return Object.keys(e).length===0}function a(e=null){const t=r.useContext(n);return!t||s(t)?e:t}const m=o();function h(e=m){return a(e)}export{a,h as u};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./Components-za_0yG9W.js","./jsx-runtime-lE4rOet2.js","./ConfigCustomJavascriptSet__loadShare__react__loadShare__-B_YWmFeG.js","./_commonjsHelpers-D6-XlEtG.js","./ConfigCustomJavascriptSet__mf_v__runtimeInit__mf_v__-Cib3-eWa.js","./ConfigCustomJavascriptSet__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__-BHJt30My.js","./ConfigCustomJavascriptSet__loadShare___mf_0_mui_mf_1_material__loadShare__-WrqdT1Hz.js","./ConfigCustomJavascriptSet__loadShare__react_mf_2_dom__loadShare__-DYzjQQsF.js","./ThemeProvider-Uan4kCQd.js","./createTheme-Ajie0adn.js","./index-7YkEnLQM.js","./useTheme-DWmRkwMP.js","./useEnhancedEffect-DSK35Rma.js","./DefaultPropsProvider-CfXkmG16.js","./Components-BOms95_F.css"])))=>i.map(i=>d[i]);
2
+ import{_ as o}from"./preload-helper-Dp1pzeXC.js";const a={"./Components":async()=>{const t=await o(()=>import("./Components-za_0yG9W.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]),import.meta.url),e={};return Object.assign(e,t),Object.defineProperty(e,"__esModule",{value:!0,enumerable:!1}),e}};export{a as default};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./assets/index-Co3YA5NW.js","./assets/_commonjsHelpers-D6-XlEtG.js","./assets/index-Dbe-II7_.js","./assets/ConfigCustomJavascriptSet__loadShare__react__loadShare__-CzzIM-HW.js","./assets/ConfigCustomJavascriptSet__mf_v__runtimeInit__mf_v__-BaLGCXMi.js","./assets/jsx-runtime-o-xyxrOj.js","./assets/createSvgIcon-BQThUM-f.js","./assets/DefaultPropsProvider-9qubdy-V.js","./assets/defaultTheme-avbtL0lf.js","./assets/createTheme-BwMO3rTt.js","./assets/DefaultPropsProvider-DbEA5uR6.js","./assets/Tabs-CvEv0KOT.js","./assets/useTheme-MELayQMj.js","./assets/useThemeWithoutDefault-C-hl_s0Z.js","./assets/FilledInput-BpuM_GyB.js","./assets/useEnhancedEffect-CdLBzwyA.js","./assets/index-B7G6Jpdl.js","./assets/useTheme-CDtRWagv.js","./assets/ConfigCustomJavascriptSet__loadShare__react_mf_2_dom__loadShare__-DibxNPKw.js","./assets/index-BzS6q3oS.js","./assets/ThemeProvider-DZTpMR8n.js","./assets/index-B6ima1M5.js","./assets/ConfigCustomJavascriptSet__loadShare___mf_0_mui_mf_1_material__loadShare__-BlV79j8y.js","./assets/index-B8sZ2j0S.js","./assets/index-CoMexdpH.js","./assets/ConfigCustomJavascriptSet__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__-DAwHgdl6.js","./assets/preload-helper-Dp1pzeXC.js","./assets/index-CWXHfC2L.js","./assets/leaflet-src-A2ZHl6nF.js","./assets/index-DIWNdd4a.js"])))=>i.map(i=>d[i]);
2
- import{i as d,C as p}from"./assets/ConfigCustomJavascriptSet__mf_v__runtimeInit__mf_v__-BaLGCXMi.js";import s from"./assets/virtualExposes-BMKIjWrE.js";import{_ as a}from"./assets/preload-helper-Dp1pzeXC.js";const n={react:async()=>await a(()=>import("./assets/index-Co3YA5NW.js").then(t=>t.i),__vite__mapDeps([0,1]),import.meta.url),"@mui/x-date-pickers":async()=>await a(()=>import("./assets/index-Dbe-II7_.js"),__vite__mapDeps([2,3,1,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]),import.meta.url),"@mui/material":async()=>await a(()=>import("./assets/index-BzS6q3oS.js"),__vite__mapDeps([19,9,3,1,4,7,8,10,5,11,12,13,14,15,16,17,6,18,20]),import.meta.url),"@iobroker/adapter-react-v5":async()=>await a(()=>import("./assets/index-B6ima1M5.js"),__vite__mapDeps([21,9,3,1,4,22,23,12,13,17,8]),import.meta.url),"@iobroker/json-config":async()=>await a(()=>import("./assets/index-CoMexdpH.js"),__vite__mapDeps([24,3,1,4,22,23,12,9,13,25,18,14,7,8,10,5,15,26]),import.meta.url),"react-dom":async()=>await a(()=>import("./assets/index-CWXHfC2L.js").then(t=>t.i),__vite__mapDeps([27,1,3,4]),import.meta.url),leaflet:async()=>await a(()=>import("./assets/leaflet-src-A2ZHl6nF.js").then(t=>t.l),__vite__mapDeps([28,1]),import.meta.url),"@mui/icons-material":async()=>await a(()=>import("./assets/index-DIWNdd4a.js"),__vite__mapDeps([29,5,3,1,4,6,7,8,9,10]),import.meta.url)},o={react:{name:"react",version:"18.3.1",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){o.react.loaded=!0;const{react:e}=n,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@mui/x-date-pickers":{name:"@mui/x-date-pickers",version:"7.29.4",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){o["@mui/x-date-pickers"].loaded=!0;const{"@mui/x-date-pickers":e}=n,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@mui/material":{name:"@mui/material",version:"6.4.12",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){o["@mui/material"].loaded=!0;const{"@mui/material":e}=n,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@iobroker/adapter-react-v5":{name:"@iobroker/adapter-react-v5",version:"7.6.20",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){o["@iobroker/adapter-react-v5"].loaded=!0;const{"@iobroker/adapter-react-v5":e}=n,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@iobroker/json-config":{name:"@iobroker/json-config",version:"7.6.20",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){o["@iobroker/json-config"].loaded=!0;const{"@iobroker/json-config":e}=n,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"react-dom":{name:"react-dom",version:"18.3.1",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){o["react-dom"].loaded=!0;const{"react-dom":e}=n,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},leaflet:{name:"leaflet",version:"1.9.4",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){o.leaflet.loaded=!0;const{leaflet:e}=n,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@mui/icons-material":{name:"@mui/icons-material",version:"6.4.12",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){o["@mui/icons-material"].loaded=!0;const{"@mui/icons-material":e}=n,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}}},f=[],u={},c="default",l="ConfigCustomJavascriptSet";async function k(e={},t=[]){const r=d.init({name:l,remotes:f,shared:o,plugins:[],shareStrategy:"version-first"});var i=u[c];if(i||(i=u[c]={from:l}),!(t.indexOf(i)>=0)){t.push(i),r.initShareScopeMap("default",e);try{await Promise.all(await r.initializeSharing("default",{strategy:"version-first",from:"build",initScope:t}))}catch(m){console.error(m)}return p.initResolve(r),r}}function y(e){if(!(e in s))throw new Error(`Module ${e} does not exist in container.`);return s[e]().then(t=>()=>t)}export{y as get,k as init};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./assets/index-Co3YA5NW.js","./assets/_commonjsHelpers-D6-XlEtG.js","./assets/index-ClFSKKDu.js","./assets/ConfigCustomJavascriptSet__loadShare__react__loadShare__-B_YWmFeG.js","./assets/ConfigCustomJavascriptSet__mf_v__runtimeInit__mf_v__-Cib3-eWa.js","./assets/jsx-runtime-lE4rOet2.js","./assets/createSvgIcon-BxCMHFh5.js","./assets/DefaultPropsProvider-B41fRCEO.js","./assets/defaultTheme-C_aSR-NR.js","./assets/createTheme-Ajie0adn.js","./assets/DefaultPropsProvider-CfXkmG16.js","./assets/Tabs-DjdFNknI.js","./assets/useTheme-DWmRkwMP.js","./assets/FilledInput-BGGUNS4j.js","./assets/useEnhancedEffect-DSK35Rma.js","./assets/index-7YkEnLQM.js","./assets/useTheme-CpiJlUE9.js","./assets/ConfigCustomJavascriptSet__loadShare__react_mf_2_dom__loadShare__-DYzjQQsF.js","./assets/index-B2rBO0oC.js","./assets/index-UhQfKbTz.js","./assets/ThemeProvider-Uan4kCQd.js","./assets/index-FOcWxrRT.js","./assets/ConfigCustomJavascriptSet__loadShare___mf_0_mui_mf_1_material__loadShare__-WrqdT1Hz.js","./assets/index-BkKMt4bp.js","./assets/index-Bw5ZKbIF.js","./assets/ConfigCustomJavascriptSet__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__-BHJt30My.js","./assets/preload-helper-Dp1pzeXC.js","./assets/index-bxilEzdP.js","./assets/leaflet-src-A2ZHl6nF.js","./assets/index-DXg_kRe6.js"])))=>i.map(i=>d[i]);
2
+ import{i as d,C as p}from"./assets/ConfigCustomJavascriptSet__mf_v__runtimeInit__mf_v__-Cib3-eWa.js";import s from"./assets/virtualExposes-4pgHXHfp.js";import{_ as a}from"./assets/preload-helper-Dp1pzeXC.js";const n={react:async()=>await a(()=>import("./assets/index-Co3YA5NW.js").then(t=>t.i),__vite__mapDeps([0,1]),import.meta.url),"@mui/x-date-pickers":async()=>await a(()=>import("./assets/index-ClFSKKDu.js"),__vite__mapDeps([2,3,1,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]),import.meta.url),"@mui/material":async()=>await a(()=>import("./assets/index-UhQfKbTz.js"),__vite__mapDeps([19,9,3,1,4,7,8,10,5,11,12,13,14,15,16,6,17,18,20]),import.meta.url),"@iobroker/adapter-react-v5":async()=>await a(()=>import("./assets/index-FOcWxrRT.js"),__vite__mapDeps([21,9,3,1,4,22,23,18,16,8,12]),import.meta.url),"@iobroker/json-config":async()=>await a(()=>import("./assets/index-Bw5ZKbIF.js"),__vite__mapDeps([24,3,1,4,22,23,18,25,17,13,7,8,9,10,5,14,12,26]),import.meta.url),"react-dom":async()=>await a(()=>import("./assets/index-bxilEzdP.js").then(t=>t.i),__vite__mapDeps([27,1,3,4]),import.meta.url),leaflet:async()=>await a(()=>import("./assets/leaflet-src-A2ZHl6nF.js").then(t=>t.l),__vite__mapDeps([28,1]),import.meta.url),"@mui/icons-material":async()=>await a(()=>import("./assets/index-DXg_kRe6.js"),__vite__mapDeps([29,5,3,1,4,6,7,8,9,10]),import.meta.url)},o={react:{name:"react",version:"18.3.1",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){o.react.loaded=!0;const{react:e}=n,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@mui/x-date-pickers":{name:"@mui/x-date-pickers",version:"7.29.4",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){o["@mui/x-date-pickers"].loaded=!0;const{"@mui/x-date-pickers":e}=n,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@mui/material":{name:"@mui/material",version:"6.5.0",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){o["@mui/material"].loaded=!0;const{"@mui/material":e}=n,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@iobroker/adapter-react-v5":{name:"@iobroker/adapter-react-v5",version:"7.6.20",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){o["@iobroker/adapter-react-v5"].loaded=!0;const{"@iobroker/adapter-react-v5":e}=n,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@iobroker/json-config":{name:"@iobroker/json-config",version:"7.6.20",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){o["@iobroker/json-config"].loaded=!0;const{"@iobroker/json-config":e}=n,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"react-dom":{name:"react-dom",version:"18.3.1",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){o["react-dom"].loaded=!0;const{"react-dom":e}=n,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},leaflet:{name:"leaflet",version:"1.9.4",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){o.leaflet.loaded=!0;const{leaflet:e}=n,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@mui/icons-material":{name:"@mui/icons-material",version:"6.5.0",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){o["@mui/icons-material"].loaded=!0;const{"@mui/icons-material":e}=n,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}}},f=[],u={},l="default",c="ConfigCustomJavascriptSet";async function k(e={},t=[]){const r=d({name:c,remotes:f,shared:o,plugins:[],shareStrategy:"version-first"});var i=u[l];if(i||(i=u[l]={from:c}),!(t.indexOf(i)>=0)){t.push(i),r.initShareScopeMap("default",e);try{await Promise.all(await r.initializeSharing("default",{strategy:"version-first",from:"build",initScope:t}))}catch(m){console.error(m)}return p.initResolve(r),r}}function y(e){if(!(e in s))throw new Error(`Module ${e} does not exist in container.`);return s[e]().then(t=>()=>t)}export{y as get,k as init};
@@ -75,7 +75,12 @@ Blockly.Blocks['exec'] = {
75
75
  },
76
76
  updateShape_: function (withStatement) {
77
77
  // Add or remove a statement Input.
78
- const inputExists = this.getInput('STATEMENT');
78
+ let inputExists;
79
+ try {
80
+ inputExists = this.getInput('STATEMENT');
81
+ } catch (e) {
82
+ // Input does not exist
83
+ }
79
84
 
80
85
  if (withStatement) {
81
86
  if (!inputExists) {
@@ -721,7 +726,12 @@ Blockly.Blocks['request'] = {
721
726
  },
722
727
  updateShape_: function (withStatement) {
723
728
  // Add or remove a statement Input.
724
- const inputExists = this.getInput('STATEMENT');
729
+ let inputExists;
730
+ try {
731
+ inputExists = this.getInput('STATEMENT');
732
+ } catch (e) {
733
+ // Input does not exist
734
+ }
725
735
 
726
736
  if (withStatement) {
727
737
  if (!inputExists) {
@@ -217,7 +217,12 @@ Blockly.Blocks.convert_from_date = {
217
217
  },
218
218
  updateShape_: function (isFormat, isLanguage) {
219
219
  // Add or remove a delay Input.
220
- let inputExists = this.getInput('FORMAT');
220
+ let inputExists;
221
+ try {
222
+ inputExists = this.getInput('FORMAT');
223
+ } catch (e) {
224
+ inputExists = null;
225
+ }
221
226
 
222
227
  if (isFormat) {
223
228
  if (!inputExists) {
@@ -229,7 +234,11 @@ Blockly.Blocks.convert_from_date = {
229
234
  this.removeInput('FORMAT');
230
235
  }
231
236
 
232
- inputExists = this.getInput('LANGUAGE');
237
+ try {
238
+ inputExists = this.getInput('LANGUAGE');
239
+ } catch (e) {
240
+ inputExists = null;
241
+ }
233
242
 
234
243
  if (isLanguage) {
235
244
  if (!inputExists) {
@@ -349,7 +358,12 @@ Blockly.Blocks.convert_time_difference = {
349
358
  this.updateShape_(format === true || format === 'true' || format === 'TRUE');
350
359
  },
351
360
  updateShape_: function (isFormat, isLanguage) {
352
- let inputExists = this.getInput('FORMAT');
361
+ let inputExists;
362
+ try {
363
+ inputExists = this.getInput('FORMAT');
364
+ } catch (e) {
365
+ inputExists = null;
366
+ }
353
367
 
354
368
  if (isFormat) {
355
369
  if (!inputExists) {
@@ -115,7 +115,7 @@ Blockly.Blocks['logic_multi_and'] = {
115
115
 
116
116
  // Disconnect any children that don't belong.
117
117
  for (let k = 0; k < this.itemCount_; k++) {
118
- const connection = this.getInput('AND' + k).connection.targetConnection;
118
+ const connection = this.getInput(`AND${k}`).connection.targetConnection;
119
119
  if (connection && !connections.includes(connection)) {
120
120
  connection.disconnect();
121
121
  }
@@ -142,11 +142,16 @@ Blockly.Blocks['logic_multi_and'] = {
142
142
  let i = 0;
143
143
 
144
144
  while (itemBlock) {
145
- const input = this.getInput('AND' + i);
146
- itemBlock.valueConnection_ = input && input.connection.targetConnection;
145
+ let input;
146
+ try {
147
+ input = this.getInput('AND' + i);
148
+ } catch (e) {
149
+ // If the input does not exist, it means that the block has been removed.
150
+ input = null;
151
+ }
152
+ itemBlock.valueConnection_ = input?.connection.targetConnection;
147
153
  i++;
148
- itemBlock = itemBlock.nextConnection &&
149
- itemBlock.nextConnection.targetBlock();
154
+ itemBlock = itemBlock.nextConnection?.targetBlock();
150
155
  }
151
156
  },
152
157
  /**
@@ -157,7 +162,14 @@ Blockly.Blocks['logic_multi_and'] = {
157
162
  updateShape_: function () {
158
163
  // Add new inputs.
159
164
  for (let i = 0; i < this.itemCount_; i++) {
160
- if (!this.getInput('AND' + i)) {
165
+ let input;
166
+ try {
167
+ input = this.getInput('AND' + i);
168
+ } catch (e) {
169
+ // If the input does not exist, it means that the block has been removed.
170
+ input = null;
171
+ }
172
+ if (!input) {
161
173
  const input = this.appendValueInput('AND' + i).setAlign(Blockly.ALIGN_RIGHT);
162
174
  if (i > 0) {
163
175
  input.appendField(Blockly.Translate('logic_multi_and_and'));
@@ -165,8 +177,13 @@ Blockly.Blocks['logic_multi_and'] = {
165
177
  }
166
178
  }
167
179
  // Remove deleted inputs.
168
- for (let i = this.itemCount_; this.getInput('AND' + i); i++) {
169
- this.removeInput('AND' + i);
180
+ try {
181
+ for (let i = this.itemCount_; this.getInput('AND' + i); i++) {
182
+ this.removeInput('AND' + i);
183
+ }
184
+ } catch (e) {
185
+ // If the input does not exist, it means that the block has been removed.
186
+ // Do nothing.
170
187
  }
171
188
  },
172
189
  };
@@ -321,11 +338,16 @@ Blockly.Blocks['logic_multi_or'] = {
321
338
  let i = 0;
322
339
 
323
340
  while (itemBlock) {
324
- const input = this.getInput('OR' + i);
325
- itemBlock.valueConnection_ = input && input.connection.targetConnection;
341
+ let input;
342
+ try {
343
+ input = this.getInput('OR' + i);
344
+ } catch (e) {
345
+ // If the input does not exist, it means that the block has been removed.
346
+ input = null;
347
+ }
348
+ itemBlock.valueConnection_ = input?.connection.targetConnection;
326
349
  i++;
327
- itemBlock = itemBlock.nextConnection &&
328
- itemBlock.nextConnection.targetBlock();
350
+ itemBlock = itemBlock.nextConnection?.targetBlock();
329
351
  }
330
352
  },
331
353
  /**
@@ -336,7 +358,13 @@ Blockly.Blocks['logic_multi_or'] = {
336
358
  updateShape_: function () {
337
359
  // Add new inputs.
338
360
  for (let i = 0; i < this.itemCount_; i++) {
339
- if (!this.getInput('OR' + i)) {
361
+ let input;
362
+ try {
363
+ input = this.getInput('OR' + i);
364
+ } catch (e) {
365
+ input = null;
366
+ }
367
+ if (!input) {
340
368
  const input = this.appendValueInput('OR' + i).setAlign(Blockly.ALIGN_RIGHT);
341
369
  if (i > 0) {
342
370
  input.appendField(Blockly.Translate('logic_multi_or_or'));
@@ -344,8 +372,13 @@ Blockly.Blocks['logic_multi_or'] = {
344
372
  }
345
373
  }
346
374
  // Remove deleted inputs.
347
- for (let i = this.itemCount_; this.getInput('OR' + i); i++) {
348
- this.removeInput('OR' + i);
375
+ try {
376
+ for (let i = this.itemCount_; this.getInput('OR' + i); i++) {
377
+ this.removeInput('OR' + i);
378
+ }
379
+ } catch (e) {
380
+ // If the input does not exist, it means that the block has been removed.
381
+ // Do nothing.
349
382
  }
350
383
  },
351
384
  };
@@ -178,11 +178,15 @@ Blockly.Blocks['object_new'] = {
178
178
  let i = 0;
179
179
 
180
180
  while (itemBlock) {
181
- const input = this.getInput('ATTR_' + i);
182
- itemBlock.valueConnection_ = input && input.connection.targetConnection;
181
+ let input;
182
+ try {
183
+ input = this.getInput('ATTR_' + i);
184
+ } catch (e) {
185
+ input = null;
186
+ }
187
+ itemBlock.valueConnection_ = input?.connection.targetConnection;
183
188
  i++;
184
- itemBlock = itemBlock.nextConnection &&
185
- itemBlock.nextConnection.targetBlock();
189
+ itemBlock = itemBlock.nextConnection?.targetBlock();
186
190
  }
187
191
  },
188
192
  /**
@@ -195,7 +199,12 @@ Blockly.Blocks['object_new'] = {
195
199
 
196
200
  // Add new inputs.
197
201
  for (let i = 0; i < this.itemCount_; i++) {
198
- let input = this.getInput('ATTR_' + i);
202
+ let input;
203
+ try {
204
+ input = this.getInput(`ATTR_${i}`);
205
+ } catch (e) {
206
+ input = null;
207
+ }
199
208
 
200
209
  if (!input) {
201
210
  input = this.appendValueInput('ATTR_' + i).setAlign(Blockly.ALIGN_RIGHT);
@@ -215,8 +224,12 @@ Blockly.Blocks['object_new'] = {
215
224
  }, 100, input);
216
225
  }
217
226
  // Remove deleted inputs.
218
- for (let i = this.itemCount_; this.getInput('ATTR_' + i); i++) {
219
- this.removeInput('ATTR_' + i);
227
+ try {
228
+ for (let i = this.itemCount_; this.getInput('ATTR_' + i); i++) {
229
+ this.removeInput('ATTR_' + i);
230
+ }
231
+ } catch (e) {
232
+ // Ignore error if input does not exist
220
233
  }
221
234
  },
222
235
  };
@@ -228,9 +228,14 @@ Blockly.Blocks['sendto_custom'] = {
228
228
  let itemBlock = containerBlock.getInputTargetBlock('STACK');
229
229
  let i = 0;
230
230
  while (itemBlock) {
231
- const input = this.getInput('ARG' + i);
232
- itemBlock.valueConnection_ = input && input.connection.targetConnection;
233
- itemBlock = itemBlock.nextConnection && itemBlock.nextConnection.targetBlock();
231
+ let input;
232
+ try {
233
+ input = this.getInput('ARG' + i);
234
+ } catch (e) {
235
+ // if the input does not exist, it means that the block was deleted
236
+ }
237
+ itemBlock.valueConnection_ = input?.connection.targetConnection;
238
+ itemBlock = itemBlock.nextConnection?.targetBlock();
234
239
  i++;
235
240
  }
236
241
  },
@@ -244,7 +249,12 @@ Blockly.Blocks['sendto_custom'] = {
244
249
 
245
250
  // Add new inputs.
246
251
  for (let i = 0; i < this.itemCount_; i++) {
247
- let input = this.getInput('ARG' + i);
252
+ let input;
253
+ try {
254
+ input = this.getInput('ARG' + i);
255
+ } catch (e) {
256
+ input = null;
257
+ }
248
258
 
249
259
  if (!input) {
250
260
  input = this.appendValueInput('ARG' + i).setAlign(Blockly.ALIGN_RIGHT);
@@ -264,16 +274,27 @@ Blockly.Blocks['sendto_custom'] = {
264
274
  }, 100, input);
265
275
  }
266
276
  // Remove deleted inputs.
267
- for (let i = this.itemCount_; this.getInput('ARG' + i); i++) {
268
- this.removeInput('ARG' + i);
277
+ try {
278
+ for (let i = this.itemCount_; this.getInput('ARG' + i); i++) {
279
+ this.removeInput('ARG' + i);
280
+ }
281
+ } catch (e) {
282
+ // if the input does not exist, it means that the block was deleted
269
283
  }
270
284
 
285
+
271
286
  if (withStatement === undefined) {
272
287
  withStatement = this.getFieldValue('WITH_STATEMENT');
273
288
  withStatement = withStatement === true || withStatement === 'true' || withStatement === 'TRUE';
274
289
  }
275
290
 
276
- this.getInput('STATEMENT') && this.removeInput('STATEMENT');
291
+ try {
292
+ if (this.getInput('STATEMENT')) {
293
+ this.removeInput('STATEMENT');
294
+ }
295
+ } catch (e) {
296
+ // if the input does not exist, it means that the block was deleted
297
+ }
277
298
 
278
299
  // Add or remove a statement Input.
279
300
  if (withStatement) {
@@ -429,7 +450,12 @@ Blockly.Blocks['sendto_otherscript'] = {
429
450
 
430
451
  // Add new inputs.
431
452
  for (let i = 0; i < this.itemCount_; i++) {
432
- let input = this.getInput('ARG' + i);
453
+ let input;
454
+ try {
455
+ input = this.getInput('ARG' + i);
456
+ } catch (e) {
457
+ input = null;
458
+ }
433
459
 
434
460
  if (!input) {
435
461
  input = this.appendValueInput('ARG' + i).setAlign(Blockly.ALIGN_RIGHT);
@@ -449,16 +475,27 @@ Blockly.Blocks['sendto_otherscript'] = {
449
475
  }, 100, input);
450
476
  }
451
477
  // Remove deleted inputs.
452
- for (let i = this.itemCount_; this.getInput('ARG' + i); i++) {
453
- this.removeInput('ARG' + i);
478
+ try {
479
+ for (let i = this.itemCount_; this.getInput('ARG' + i); i++) {
480
+ this.removeInput('ARG' + i);
481
+ }
482
+ } catch (e) {
483
+ // if the input does not exist, it means that the block was deleted
454
484
  }
455
485
 
486
+
456
487
  if (withStatement === undefined) {
457
488
  withStatement = this.getFieldValue('WITH_STATEMENT');
458
489
  withStatement = withStatement === true || withStatement === 'true' || withStatement === 'TRUE';
459
490
  }
460
491
 
461
- this.getInput('STATEMENT') && this.removeInput('STATEMENT');
492
+ try {
493
+ if (this.getInput('STATEMENT')) {
494
+ this.removeInput('STATEMENT');
495
+ }
496
+ } catch (e) {
497
+ // if the input does not exist, it means that the block was deleted
498
+ }
462
499
 
463
500
  // Add or remove a statement Input.
464
501
  if (withStatement) {
@@ -142,21 +142,31 @@ Blockly.Blocks['logic_switch_case'] = {
142
142
  while (caseBlock) {
143
143
  switch (caseBlock.type) {
144
144
  case'case_incaseof':
145
- const caseconditionInput = this.getInput('CASECONDITION' + x);
146
- const caseInput = this.getInput('CASE' + x);
147
- caseBlock.valueConnection_ = caseconditionInput && caseconditionInput.connection.targetConnection;
148
- caseBlock.statementConnection_ = caseInput && caseInput.connection.targetConnection;
145
+ let caseconditionInput;
146
+ let caseInput;
147
+ try {
148
+ caseconditionInput = this.getInput('CASECONDITION' + x);
149
+ caseInput = this.getInput('CASE' + x);
150
+ } catch (e) {
151
+ // ignore
152
+ }
153
+ caseBlock.valueConnection_ = caseconditionInput?.connection.targetConnection;
154
+ caseBlock.statementConnection_ = caseInput?.connection.targetConnection;
149
155
  x++;
150
156
  break;
151
157
  case'case_default':
152
- const defaultInput = this.getInput('ONDEFAULT');
153
- caseBlock.satementConnection_ = defaultInput && defaultInput.connection.targetConnection;
158
+ let defaultInput;
159
+ try {
160
+ defaultInput = this.getInput('ONDEFAULT');
161
+ } catch (e) {
162
+ // ignore
163
+ }
164
+ caseBlock.statementConnection_ = defaultInput?.connection.targetConnection;
154
165
  break;
155
166
  default:
156
167
  throw 'Unknown block type';
157
168
  }
158
- caseBlock = caseBlock.nextConnection &&
159
- caseBlock.nextConnection.targetBlock();
169
+ caseBlock = caseBlock.nextConnection?.targetBlock();
160
170
  }
161
171
  },
162
172
  };
@@ -167,7 +167,12 @@ Blockly.Blocks['control'] = {
167
167
  },
168
168
  updateShape_: function (delayInput) {
169
169
  // Add or remove a delay Input.
170
- let inputExists = this.getInput('DELAY');
170
+ let inputExists;
171
+ try {
172
+ inputExists = this.getInput('DELAY');
173
+ } catch (e) {
174
+ // ignore
175
+ }
171
176
 
172
177
  if (delayInput) {
173
178
  if (!inputExists) {
@@ -184,7 +189,11 @@ Blockly.Blocks['control'] = {
184
189
  this.removeInput('DELAY');
185
190
  }
186
191
 
187
- inputExists = this.getInput('CLEAR_RUNNING_INPUT');
192
+ try {
193
+ inputExists = this.getInput('CLEAR_RUNNING_INPUT');
194
+ } catch (e) {
195
+ inputExists = null;
196
+ }
188
197
 
189
198
  if (delayInput) {
190
199
  if (!inputExists) {
@@ -277,7 +286,12 @@ Blockly.Blocks['toggle'] = {
277
286
  },
278
287
  updateShape_: function (delayInput) {
279
288
  // Add or remove a delay Input.
280
- let inputExists = this.getInput('DELAY');
289
+ let inputExists;
290
+ try {
291
+ inputExists = this.getInput('DELAY');
292
+ } catch (e) {
293
+ inputExists = null;
294
+ }
281
295
 
282
296
  if (delayInput) {
283
297
  if (!inputExists) {
@@ -295,7 +309,11 @@ Blockly.Blocks['toggle'] = {
295
309
  this.removeInput('DELAY');
296
310
  }
297
311
 
298
- inputExists = this.getInput('CLEAR_RUNNING_INPUT');
312
+ try {
313
+ inputExists = this.getInput('CLEAR_RUNNING_INPUT');
314
+ } catch (e) {
315
+ inputExists = null;
316
+ }
299
317
 
300
318
  if (delayInput) {
301
319
  if (!inputExists) {
@@ -413,7 +431,12 @@ Blockly.Blocks['update'] = {
413
431
  },
414
432
  updateShape_: function (delayInput) {
415
433
  // Add or remove a delay Input.
416
- let inputExists = this.getInput('DELAY');
434
+ let inputExists;
435
+ try {
436
+ inputExists = this.getInput('DELAY');
437
+ } catch (e){
438
+ inputExists = null;
439
+ }
417
440
 
418
441
  if (delayInput) {
419
442
  if (!inputExists) {
@@ -431,7 +454,11 @@ Blockly.Blocks['update'] = {
431
454
  this.removeInput('DELAY');
432
455
  }
433
456
 
434
- inputExists = this.getInput('CLEAR_RUNNING_INPUT');
457
+ try {
458
+ inputExists = this.getInput('CLEAR_RUNNING_INPUT');
459
+ } catch (e) {
460
+ inputExists = null;
461
+ }
435
462
 
436
463
  if (delayInput) {
437
464
  if (!inputExists) {
@@ -59,3 +59,46 @@ Blockly.JavaScript.forBlock['text_contains'] = function (block) {
59
59
 
60
60
  return [`String(${vValue}).includes(${vFind})`, Blockly.JavaScript.ORDER_ATOMIC];
61
61
  };
62
+
63
+ // --- Text formatValue --------------------------------------------------
64
+
65
+ Blockly.Blocks['text_format_value'] = {
66
+ // Checkbox.
67
+ init: function () {
68
+ this.appendValueInput('VALUE')
69
+ .appendField(Blockly.Translate('text_format_value'))
70
+ .setCheck(null);
71
+
72
+ this.appendDummyInput()
73
+ .appendField(Blockly.Translate('text_format_value_format'))
74
+ .appendField(new Blockly.FieldDropdown([
75
+ ['System', 'system'],
76
+ ['.,', '.,'],
77
+ [',.', ',.'],
78
+ [' .', ' .'],
79
+ ]), 'FORMAT');
80
+
81
+ this.appendValueInput('DECIMALS')
82
+ .appendField(Blockly.Translate('text_format_value_decimals'));
83
+
84
+
85
+ this.setInputsInline(true);
86
+ this.setOutput(true, 'String');
87
+
88
+ this.setColour('%{BKY_TEXTS_HUE}');
89
+
90
+ //this.setTooltip(Blockly.Translate('text_format_value_tooltip'));
91
+ },
92
+ };
93
+
94
+ Blockly.JavaScript.forBlock['text_format_value'] = function (block) {
95
+ const vValue = Blockly.JavaScript.valueToCode(block, 'VALUE', Blockly.JavaScript.ORDER_ATOMIC);
96
+ const vDecimals = Blockly.JavaScript.valueToCode(block, 'DECIMALS', Blockly.JavaScript.ORDER_ATOMIC);
97
+ const fFormat = block.getFieldValue('FORMAT');
98
+
99
+ if (fFormat !== 'system') {
100
+ return [`formatValue(parseFloat(${vValue}), ${vDecimals}, '${fFormat}')`, Blockly.JavaScript.ORDER_ATOMIC];
101
+ }
102
+
103
+ return [`formatValue(parseFloat(${vValue}), ${vDecimals})`, Blockly.JavaScript.ORDER_ATOMIC];
104
+ };