iobroker.javascript 10.4.1 → 10.4.4
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/README.md +6 -4
- package/admin/assets/AiChatPanel-DDMXsfSt.js +27 -0
- package/admin/assets/AiChatService-DwMHP0xt.js +216 -0
- package/admin/assets/AiDiffView-Bk-37CNd.js +1 -0
- package/admin/assets/{AiInlineProvider-R_AVYwFT.js → AiInlineProvider-CXlH1WK8.js} +1 -1
- package/admin/assets/{BlocklyEditor-DPJkoxjP.js → BlocklyEditor-DY4OoiFv.js} +10 -10
- package/admin/assets/Compile-DUNqNndk.js +165 -0
- package/admin/assets/Debugger-B5PuUkp6.js +15 -0
- package/admin/assets/Diff-CumYKon3.js +1 -0
- package/admin/assets/{Documentation-D3E0U4AK.js → Documentation-DDu-zfNv.js} +4 -4
- package/admin/assets/ExpandMore-CivgfFOr.js +1 -0
- package/admin/assets/{FbEditor-A7I5U0hA.js → FbEditor-D1m29HMt.js} +6 -6
- package/admin/assets/History-jUbe5GP0.js +1 -0
- package/admin/assets/Import-iMDY2N5I.js +1 -0
- package/admin/assets/{MonacoDiff-BYvG7IqB.js → MonacoDiff-D24nsTu6.js} +1 -1
- package/admin/assets/{NotificationsActive-CuNfWVJM.js → NotificationsActive-DaZ6l1oz.js} +1 -1
- package/admin/assets/RulesEditor-qd1dXeG0.js +1 -0
- package/admin/assets/{ScriptEditor-CqphehA8.js → ScriptEditor-DfX-VuXG.js} +2 -2
- package/admin/assets/{ScriptEditorVanillaMonaco-CxgNa-3O.js → ScriptEditorVanillaMonaco-DDf9Xgnp.js} +3 -3
- package/admin/assets/Send-BggvRgCd.js +1 -0
- package/admin/assets/_virtual_mf-localSharedImportMap___mfe_internal__iobroker_javascript__mf_owner__1-DCbVrrFZ.js +1 -0
- package/admin/assets/_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__244278364413149__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-Lnn-CkVR.js +1217 -0
- package/admin/assets/{_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__234968779812303__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-DLWT3PGo.js → _virtual_mf___mfe_internal__iobroker_javascript__mf_owner__244278364413149__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-z1D20r27.js} +1 -1
- package/admin/assets/aiPromptBuilder-BlIDJp0X.js +1 -0
- package/admin/assets/{blockly-B0t_IRJQ.js → blockly-C3YM75rJ.js} +48 -44
- package/admin/assets/{blocklyTheme-iZoge1S9.js → blocklyTheme-DT7bwtSS.js} +1 -1
- package/admin/assets/{blocks_action-3CepYoiX.js → blocks_action-DpPxKVI7.js} +1 -1
- package/admin/assets/{blocks_convert-BEpxVx-_.js → blocks_convert-BZem2yRU.js} +1 -1
- package/admin/assets/{blocks_logic-CyIBT53p.js → blocks_logic-vMLrt5md.js} +1 -1
- package/admin/assets/{blocks_number-yqm4qwfh.js → blocks_number-ImO9YZku.js} +1 -1
- package/admin/assets/{blocks_object-CizLkmWp.js → blocks_object-Cfw-t61W.js} +1 -1
- package/admin/assets/{blocks_procedures-pFTThYqz.js → blocks_procedures-Df_jKvkW.js} +1 -1
- package/admin/assets/{blocks_sendto-rEq1xPmO.js → blocks_sendto-BePXoq3l.js} +1 -1
- package/admin/assets/{blocks_switch-D3aybjqu.js → blocks_switch-Cf1Ly48W.js} +1 -1
- package/admin/assets/{blocks_system-BVRsS2OE.js → blocks_system-D_7Ev6nN.js} +1 -1
- package/admin/assets/{blocks_text-D93xQ_03.js → blocks_text-CM4ZTMkn.js} +1 -1
- package/admin/assets/{blocks_time-ChxhjgD7.js → blocks_time-CovNiZ5E.js} +1 -1
- package/admin/assets/{blocks_timeout-CUZ80HaP.js → blocks_timeout-WxihPUYn.js} +1 -1
- package/admin/assets/{blocks_trigger-DivLpAuy.js → blocks_trigger-cu2p03ud.js} +1 -1
- package/admin/assets/{cronHoverProvider-Curcjz4m.js → cronHoverProvider-CeC4ghkd.js} +1 -1
- package/admin/assets/{dist-CzitsFi7.js → dist-CSJEdwl2.js} +1 -1
- package/admin/assets/{field_cron-RgLY53_S.js → field_cron-CTSbO0Sj.js} +1 -1
- package/admin/assets/{field_oid-rBhotXJe.js → field_oid-yf2RKHSk.js} +1 -1
- package/admin/assets/{field_script-CU7g3-oB.js → field_script-WzNnU0JL.js} +1 -1
- package/admin/assets/{helpers-Bt4VKZBw.js → helpers-DLkZXmzA.js} +1 -1
- package/admin/assets/helpers-DT5-3o-l.js +1 -0
- package/admin/assets/{hostInit-CrHjJGJJ.js → hostInit-DHGIvBts.js} +1 -1
- package/admin/assets/index-BAjPlTzo.js +157 -0
- package/admin/assets/{inlineChatWidget-ChchJD9a.js → inlineChatWidget-DvAKhg6g.js} +1 -1
- package/admin/assets/{inlineDiffController-ly6qX4jk.js → inlineDiffController-DOhV-sbU.js} +1 -1
- package/admin/assets/{loadBlocks-DDLPEDa6.js → loadBlocks-zPpF1gDy.js} +23 -23
- package/admin/assets/{mf-entry-bootstrap-0-d055f05d.js → mf-entry-bootstrap-0-757148b7.js} +3 -3
- package/admin/assets/{pendingShares-mBGPbRwZ.js → pendingShares-TGMPCf23.js} +2 -2
- package/admin/assets/reactour.esm-Q4nnZoim.js +137 -0
- package/admin/assets/{stateHoverProvider-wAsP-THx.js → stateHoverProvider-GWaLOu7S.js} +1 -1
- package/admin/assets/{utils-DUKzLJUz.js → utils-BFhwh2EC.js} +1 -1
- package/admin/assets/vite-preload-helper-BbbETgeG.js +1 -0
- package/admin/custom/assets/Components-2p8wiA9W.js +1 -0
- package/admin/custom/assets/_virtual_mf-localSharedImportMap___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1-LoDUiIZH.js +1 -0
- package/admin/custom/assets/{_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__198282747311932__loadShare___mf_0_emotion_mf_1_styled__loadShare__.js-CVvbIPAy.js → _virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__211401881746328__loadShare___mf_0_emotion_mf_1_styled__loadShare__.js-D2tgwrcS.js} +1 -1
- package/admin/custom/assets/{_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__198282747311932__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-BhZYie9-.js → _virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__211401881746328__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-D27wqFWN.js} +95 -95
- package/admin/custom/assets/_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__211401881746328__loadShare___mf_0_mui_mf_1_x_mf_2_date_mf_2_pickers__loadShare__.js-CAjPWACG.js +1 -0
- package/admin/custom/assets/{_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__198282747311932__loadShare__date_mf_2_fns__loadShare__.js-Djg9OMcQ.js → _virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__211401881746328__loadShare__date_mf_2_fns__loadShare__.js-B2r0vvPY.js} +1 -1
- package/admin/custom/assets/_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__211401881746328__loadShare__shared-CdAm7fPH.js +2 -0
- package/admin/custom/assets/_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__211401881746328__prebuild___mf_0_iobroker_mf_1_json_mf_2_config__prebuild__-DAE9qWf5.js +122 -0
- package/admin/custom/assets/{_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__198282747311932__prebuild__leaflet__prebuild__-CHjWtrkp.js → _virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__211401881746328__prebuild__leaflet__prebuild__--WMuxzd-.js} +1 -1
- package/admin/custom/assets/{_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__198282747311932__prebuild__react_mf_2_dom_mf_1_client__prebuild__-DOkC-g0X.js → _virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__211401881746328__prebuild__react_mf_2_dom_mf_1_client__prebuild__-DEIPBEui.js} +1 -1
- package/admin/custom/assets/{dist-CzitsFi7.js → dist-CSJEdwl2.js} +1 -1
- package/admin/custom/assets/helpers-DT5-3o-l.js +1 -0
- package/admin/custom/assets/{hostInit-akwaQLq8.js → hostInit-CgdfLZgR.js} +1 -1
- package/admin/custom/assets/{index-BkItz-nL.js → index-BqWkNbeU.js} +1 -1
- package/admin/custom/assets/{lib-CADOx2YN.js → lib-5TzGpBXO.js} +1 -1
- package/admin/custom/assets/{mf-entry-bootstrap-0-3c4565e0.js → mf-entry-bootstrap-0-3bac0bf3.js} +3 -3
- package/admin/custom/assets/{pendingShares-TCMDgBLn.js → pendingShares-fPzqQeON.js} +2 -2
- package/admin/custom/assets/{utils-DUKzLJUz.js → utils-BFhwh2EC.js} +1 -1
- package/admin/custom/assets/vite-preload-helper-BbbETgeG.js +1 -0
- package/admin/custom/customComponents.js +2 -2
- package/admin/mf-manifest.json +1 -1
- package/admin/mf-stats.json +1 -1
- package/admin/remoteEntry.js +2 -2
- package/admin/tab.html +2 -2
- package/build/lib/sandbox.js +50 -4
- package/build/lib/sandbox.js.map +1 -1
- package/build/main.js +26 -5
- package/build/main.js.map +1 -1
- package/io-package.json +14 -14
- package/package.json +7 -7
- package/admin/assets/AiChatPanel-CfjSsVpE.js +0 -27
- package/admin/assets/AiChatService-rFZwYNPk.js +0 -216
- package/admin/assets/AiDiffView-DeynDw7L.js +0 -1
- package/admin/assets/Compile-BgTrxmPA.js +0 -165
- package/admin/assets/Debugger-CThCzBvP.js +0 -15
- package/admin/assets/Diff--plofAtP.js +0 -1
- package/admin/assets/ExpandMore-Dio4GeHC.js +0 -1
- package/admin/assets/History-Ewi5YEEn.js +0 -1
- package/admin/assets/Import-6Mm2vrM2.js +0 -1
- package/admin/assets/RulesEditor-MDkGXERp.js +0 -1
- package/admin/assets/Send-Pz1eveU5.js +0 -1
- package/admin/assets/_virtual_mf-localSharedImportMap___mfe_internal__iobroker_javascript__mf_owner__1-Ceh8EDcF.js +0 -1
- package/admin/assets/_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__234968779812303__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-BRdHvuuG.js +0 -1217
- package/admin/assets/aiPromptBuilder-CI2ChET0.js +0 -1
- package/admin/assets/helpers-BZgjFQNf.js +0 -1
- package/admin/assets/index-DzAQnPTD.js +0 -157
- package/admin/assets/reactour.esm-Dk3aGxKn.js +0 -137
- package/admin/assets/vite-preload-helper-DjNwdemH.js +0 -1
- package/admin/custom/assets/Components-fDcxCyN4.js +0 -1
- package/admin/custom/assets/_virtual_mf-localSharedImportMap___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1-BraOrMSu.js +0 -1
- package/admin/custom/assets/_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__198282747311932__loadShare___mf_0_mui_mf_1_x_mf_2_date_mf_2_pickers__loadShare__.js-CV50dgj4.js +0 -1
- package/admin/custom/assets/_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__198282747311932__loadShare__shared-Hb6V6BnJ.js +0 -2
- package/admin/custom/assets/_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__198282747311932__prebuild___mf_0_iobroker_mf_1_json_mf_2_config__prebuild__-BrY-nF2a.js +0 -122
- package/admin/custom/assets/helpers-BZgjFQNf.js +0 -1
- package/admin/custom/assets/vite-preload-helper-DjNwdemH.js +0 -1
- /package/admin/custom/assets/{_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__198282747311932__loadShare___mf_0_emotion_mf_1_react__loadShare__.js-DbKT6Hsb.js → _virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__211401881746328__loadShare___mf_0_emotion_mf_1_react__loadShare__.js-DbKT6Hsb.js} +0 -0
- /package/admin/custom/assets/{_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__198282747311932__loadShare__leaflet__loadShare__.js-D9EyCd42.js → _virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__211401881746328__loadShare__leaflet__loadShare__.js-D9EyCd42.js} +0 -0
- /package/admin/custom/assets/{_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__198282747311932__prebuild__react_mf_1_jsx_mf_2_runtime__prebuild__-CXpyx8Vy.js → _virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__211401881746328__prebuild__react_mf_1_jsx_mf_2_runtime__prebuild__-CXpyx8Vy.js} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as e,i as t,o as n,p as r,r as i,s as a,t as o}from"./blockly-
|
|
1
|
+
import{c as e,i as t,o as n,p as r,r as i,s as a,t as o}from"./blockly-C3YM75rJ.js";import{n as s,r as c}from"./BlocklyEditor-DY4OoiFv.js";import{a as l,c as u,f as d,l as f,o as p,p as m,r as h,s as g}from"./helpers-DLkZXmzA.js";import{FieldOID as _}from"./field_oid-yf2RKHSk.js";import{FieldCRON as v}from"./field_cron-CTSbO0Sj.js";function y(e){return c.nameDB_.safeName(e.getFieldValue(`NAME`))}function b(){let b=window.Blockly,x=b.Translate,S=window.getHelp;b.CustomBlocks=b.CustomBlocks||[],b.CustomBlocks.push(`Trigger`);let C=e=>{let t=[];for(let n of e.getAllBlocks())if(n.isSchedule_){let e=n.getFieldValue(`NAME`);t.push([e,e])}if(window.scripts.loading)for(let n of e.getVariableMap().getVariablesOfType(``))t.find(e=>e[0]===n.getName())||t.push([n.getName(),n.getName()]);for(let n of e.getVariableMap().getVariablesOfType(`cron`))t.find(e=>e[0]===n.getName())||t.push([n.getName(),n.getName()]);return t.length||t.push([``,``]),t};b.Trigger={HUE:330,getAllSchedules:C,blocks:{},WARNING_PARENTS:[`on`,`on_ext`,`schedule`,`schedule_by_id`,`schedule_create`,`astro`,`onMessage`,`onFile`,`onLog`,`onEnumMembers`,`timeouts_setinterval`,`timeouts_setinterval_variable`,`controls_repeat_ext`,`controls_repeat_ext`,`controls_for`,`controls_forEach`]};let w=()=>[[x(`on_onchange`),`ne`],[x(`on_any`),`any`],[x(`on_gt`),`gt`],[x(`on_ge`),`ge`],[x(`on_lt`),`lt`],[x(`on_le`),`le`],[x(`on_true`),`true`],[x(`on_false`),`false`]],T=()=>[[x(`on_ack_any`),``],[x(`on_ack_true`),`true`],[x(`on_ack_false`),`false`]],E=e=>e===`true`||e===`false`?`val: ${e}`:`change: '${e}'`,D=()=>`${c.prefixLines(`let value = obj.state.val;`,c.INDENT)}\n${c.prefixLines(`let oldValue = obj.oldState.val;`,c.INDENT)}\n`,O=(e,t,n,r)=>{setTimeout(()=>{var i;if(!((i=t.connection)!=null&&i.isConnected())){let i=e.newBlock(n);i.setShadow(!0),r&&i.setFieldValue(r[1],r[0]),i.outputConnection.connect(t.connection),i.initSvg(),i.render()}},100)},k=(e,n,r,i,a,s,c)=>{o[e]={init:function(){this.appendDummyInput().appendField(n),this.appendDummyInput(`ATTR`).appendField(new t(r),`ATTR`),this.setInputsInline(!0),this.setOutput(!0),this.setColour(s),this.setTooltip(x(`${e}_tooltip`)),c&&this.setHelpUrl(S(c))},onchange:function(){m(this,i,a)},FUNCTION_TYPES:i}};b.Trigger.blocks.on_ext=`<block type="on_ext"> <mutation items="1"></mutation> <field name="CONDITION">ne</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid"> </shadow> </value></block>`,o.on_ext_oid_container={init:function(){this.appendDummyInput().appendField(x(`on_ext_on`)),this.appendStatementInput(`STACK`),this.setColour(b.Trigger.HUE),this.setTooltip(x(`on_ext_on_tooltip`)),this.contextMenu=!1}},o.on_ext_oid={init:function(){this.appendDummyInput(`OID`).appendField(x(`on_ext_oid`)),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setColour(b.Trigger.HUE),this.setTooltip(x(`on_ext_oid_tooltip`)),this.contextMenu=!1}},o.on_ext={init:function(){this.itemCount_=1,this.setMutator(new r.MutatorIcon([`on_ext_oid`],this)),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(b.Trigger.HUE),this.setTooltip(x(`on_ext_tooltip`)),this.setHelpUrl(S(`on_help`))},mutationToDom:function(){let e=document.createElement(`mutation`);return e.setAttribute(`items`,String(this.itemCount_)),e},domToMutation:function(e){this.itemCount_=parseInt(e.getAttribute(`items`),10),this.updateShape_()},decompose:function(e){var t;let n=e.newBlock(`on_ext_oid_container`);n.initSvg();let r=(t=n.getInput(`STACK`))==null?void 0:t.connection;for(let t=0;t<this.itemCount_;t++){let t=e.newBlock(`on_ext_oid`);t.initSvg(),r.connect(t.previousConnection),r=t.nextConnection}return n},compose:function(e){let t=e.getInputTargetBlock(`STACK`),n=[];for(;t;)n.push(t.valueConnection_),t=t.nextConnection&&t.nextConnection.targetBlock();for(let e=0;e<this.itemCount_;e++){var r;let t=(r=this.getInput(`OID${e}`))==null||(r=r.connection)==null?void 0:r.targetConnection;t&&!n.includes(t)&&t.disconnect()}this.itemCount_=n.length,this.itemCount_<1&&(this.itemCount_=1),this.updateShape_();for(let e=0;e<this.itemCount_;e++)f(n[e],this,`OID${e}`)},saveConnections:function(e){let t=e.getInputTargetBlock(`STACK`),n=0;for(;t;){var r,i;t.valueConnection_=(r=this.getInput(`OID${n}`))==null||(r=r.connection)==null?void 0:r.targetConnection,n++,t=(i=t.nextConnection)==null?void 0:i.targetBlock()}},updateShape_:function(){let e;this.getInput(`CONDITION`)&&(e=this.getFieldValue(`CONDITION`),this.removeInput(`CONDITION`));let n;this.getInput(`ACK_CONDITION`)&&(n=this.getFieldValue(`ACK_CONDITION`),this.removeInput(`ACK_CONDITION`));let r;for(let e=0;this.inputList[e];e++)if(this.inputList[e].name===`STATEMENT`){r=this.inputList[e],this.inputList.splice(e,1);break}let i=this.workspace,a=0;for(;a<this.itemCount_;a++){let e=this.getInput(`OID${a}`);e||(e=this.appendValueInput(`OID${a}`),a===0&&e.appendField(x(`on_ext`))),O(i,e,`field_oid`)}for(;this.getInput(`OID${a}`);)this.removeInput(`OID${a}`),a++;this.appendDummyInput(`CONDITION`).appendField(new t(w()),`CONDITION`),e&&this.setFieldValue(e,`CONDITION`),this.appendDummyInput(`ACK_CONDITION`).appendField(x(`on_ack`)).appendField(new t(T()),`ACK_CONDITION`),n&&this.setFieldValue(n,`ACK_CONDITION`),r?this.inputList.push(r):this.appendStatementInput(`STATEMENT`).setCheck(null)},onchange:function(){d(this)}},c.forBlock.on_ext=function(e){let t=e,n=E(e.getFieldValue(`CONDITION`)),r=e.getFieldValue(`ACK_CONDITION`),i=[];for(let n=0;n<t.itemCount_;n++){let t=c.valueToCode(e,`OID${n}`,s.COMMA);t&&(t=t.toString(),t.startsWith(`'`)&&t.endsWith(`'`)&&(t=`[${t}]`),i.includes(t)||i.push(t))}let a=`[].concat(${i.join(`).concat(`)})`,o=c.statementToCode(e,`STATEMENT`);return`on({ id: ${a}, ${n}${r?`, ack: ${r}`:``} }, async (obj) => {\n${i.length===1?D():``}${o}});\n`},b.Trigger.blocks.on=`<sep gap="5"></sep><block type="on"> <field name="CONDITION">ne</field> <field name="ACK_CONDITION"></field></block>`,o.on={init:function(){this.appendDummyInput().appendField(x(`on`)),this.appendDummyInput(`OID`).appendField(new _(x(`select_id`),`state`),`OID`),this.appendDummyInput(`CONDITION`).appendField(new t(w()),`CONDITION`),this.appendDummyInput(`ACK_CONDITION`).appendField(x(`on_ack`)).appendField(new t(T()),`ACK_CONDITION`),this.appendStatementInput(`STATEMENT`).setCheck(null),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(b.Trigger.HUE),this.setTooltip(x(`on_tooltip`)),this.setHelpUrl(S(`on_help`))},onchange:function(){d(this)}},c.forBlock.on=function(e){let t=e.getFieldValue(`OID`),n=E(e.getFieldValue(`CONDITION`)),r=e.getFieldValue(`ACK_CONDITION`);a.VARIABLES_DEFAULT_NAME=`value`;let i=p(t),o=c.statementToCode(e,`STATEMENT`);return`on({ id: '${t}'${i?` /* ${i} */`:``}, ${n}${r?`, ack: ${r}`:``} }, async (obj) => {\n${D()}${o}});\n`},b.Trigger.blocks.on_source=`<sep gap="5"></sep><block type="on_source"> <field name="ATTR">state.val</field></block>`,k(`on_source`,`↪`,[[x(`on_source_state_val`),`state.val`],[x(`on_source_state_ts`),`state.ts`],[x(`on_source_state_q`),`state.q`],[x(`on_source_state_from`),`state.from`],[x(`on_source_state_ack`),`state.ack`],[x(`on_source_state_lc`),`state.lc`],[x(`on_source_state_c`),`state.c`],[x(`on_source_state_user`),`state.user`],[x(`on_source_id`),`id`],[x(`on_source_name`),`common.name`],[x(`on_source_desc`),`common.desc`],[x(`on_source_channel_id`),`channelId`],[x(`on_source_channel_name`),`channelName`],[x(`on_source_device_id`),`deviceId`],[x(`on_source_device_name`),`deviceName`],[x(`on_source_oldstate_val`),`oldState.val`],[x(`on_source_oldstate_ts`),`oldState.ts`],[x(`on_source_oldstate_q`),`oldState.q`],[x(`on_source_oldstate_from`),`oldState.from`],[x(`on_source_oldstate_ack`),`oldState.ack`],[x(`on_source_oldstate_lc`),`oldState.lc`],[x(`on_source_oldstate_c`),`oldState.c`],[x(`on_source_oldstate_user`),`oldState.user`]],[`on`,`on_ext`,`onEnumMembers`],`on_source_warning`,b.Trigger.HUE,`on_help`),c.forBlock.on_source=function(e){let t=e.getFieldValue(`ATTR`),n=t.split(`.`);return[n.length>1?`(obj.${n[0]} ? obj.${t} : '')`:`obj.${t}`,s.ATOMIC]},b.Trigger.blocks.on_ack_value=`<sep gap="5"></sep><block type="on_ack_value"></block>`,o.on_ack_value={init:function(){this.appendDummyInput().appendField(`↪ ${x(`on_ack_value`)}`),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(b.Trigger.HUE),this.setTooltip(x(`on_ack_value_tooltip`)),this.setHelpUrl(S(`on_help`))},onchange:function(){m(this,[`on`,`on_ext`,`onEnumMembers`],`on_ack_value_warning`)},FUNCTION_TYPES:[`on`,`on_ext`,`onEnumMembers`]},c.forBlock.on_ack_value=function(){return`if (obj.id && obj?.state && !obj.state.ack) {
|
|
2
2
|
${c.prefixLines(`await setStateAsync(obj.id, { val: obj.state.val, ack: true });`,c.INDENT)}\n}\n`},b.Trigger.blocks.astro=`<block type="astro"> <field name="TYPE">sunrise</field> <field name="OFFSET">0</field></block>`,o.astro={init:function(){this.appendDummyInput().appendField(x(`astro`)),this.appendDummyInput(`TYPE`).appendField(new t([[x(`astro_sunriseText`),`sunrise`],[x(`astro_sunriseEndText`),`sunriseEnd`],[x(`astro_goldenHourEndText`),`goldenHourEnd`],[x(`astro_solarNoonText`),`solarNoon`],[x(`astro_goldenHourText`),`goldenHour`],[x(`astro_sunsetStartText`),`sunsetStart`],[x(`astro_sunsetText`),`sunset`],[x(`astro_duskText`),`dusk`],[x(`astro_nauticalDuskText`),`nauticalDusk`],[x(`astro_nightText`),`night`],[x(`astro_nightEndText`),`nightEnd`],[x(`astro_nauticalDawnText`),`nauticalDawn`],[x(`astro_dawnText`),`dawn`],[x(`astro_nadirText`),`nadir`]]),`TYPE`),this.appendDummyInput().appendField(x(`astro_offset`)),this.appendDummyInput(`OFFSET`).appendField(new n(`0`),`OFFSET`),this.appendDummyInput().appendField(x(`astro_minutes`)),this.appendStatementInput(`STATEMENT`).setCheck(null),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(b.Trigger.HUE),this.setTooltip(x(`astro_tooltip`)),this.setHelpUrl(S(`astro_help`))},onchange:function(){d(this)}},c.forBlock.astro=function(e){return`schedule({ astro: '${e.getFieldValue(`TYPE`)}', shift: ${parseInt(e.getFieldValue(`OFFSET`),10)} }, async () => {\n${c.statementToCode(e,`STATEMENT`)}});\n`},b.Trigger.blocks.schedule=`<block type="schedule"> <field name="SCHEDULE">* * * * *</field></block>`,o.schedule={init:function(){this.appendDummyInput().appendField(x(`schedule`)),this.appendDummyInput(`SCHEDULE`).appendField(new v(`* * * * *`),`SCHEDULE`),this.appendStatementInput(`STATEMENT`).setCheck(null),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(b.Trigger.HUE),this.setTooltip(x(`schedule_tooltip`)),this.setHelpUrl(S(`schedule_help`))},onchange:function(){d(this)}},c.forBlock.schedule=function(e){let t=e.getFieldValue(`SCHEDULE`),n=c.statementToCode(e,`STATEMENT`);return`schedule(${t.startsWith(`{`)?`'${t}'`:`"${t}"`}, async () => {\n${n}});\n`},b.Trigger.blocks.schedule_by_id=`<block type="schedule_by_id"> <field name="ACK_CONDITION"></field></block>`,o.schedule_by_id={init:function(){this.appendDummyInput().appendField(x(`schedule_by_id`)),this.appendDummyInput(`OID`).appendField(new _(x(`select_id`),`state`),`OID`),this.appendDummyInput(`ACK_CONDITION`).appendField(x(`on_ack`)).appendField(new t(T()),`ACK_CONDITION`),this.appendStatementInput(`STATEMENT`).setCheck(null),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(b.Trigger.HUE),this.setTooltip(x(`schedule_by_id_tooltip`)),this.setHelpUrl(S(`schedule_by_id_help`))}},c.forBlock.schedule_by_id=function(e){let t=e.getFieldValue(`OID`),n=e.getFieldValue(`ACK_CONDITION`),r=c.statementToCode(e,`STATEMENT`),i=p(t);return`scheduleById('${t}'${i?` /* ${i} */`:``}${n?`, ${n}`:``}, async () => {\n${r}});\n`},b.Trigger.blocks.schedule_create=`<block type="schedule_create"> <field name="NAME">schedule</field> <value name="SCHEDULE"> <shadow type="field_cron"> </shadow> </value></block>`;let A=(t,n,r)=>{if(t===`schedule`)return!1;for(let i of n.getAllBlocks())if(i!==r&&i.isSchedule_&&e.equals(i.getFieldValue(`NAME`),t))return!1;return!0},j=(e,t)=>{if(t.isInFlyout)return e;for(;!A(e,t.workspace,t);){let t=e.match(/^(.*?)(\d+)$/);t?e=t[1]+(parseInt(t[2],10)+1):e+=`1`}return e},M=function(e){return j(e.replace(/^[\s\xa0]+|[\s\xa0]+$/g,``),this.getSourceBlock())};o.schedule_create={init:function(){let e=new n(j(`schedule`,this),M);e.setSpellcheck(!1),this.appendDummyInput(`NAME`).appendField(x(`schedule_create`)).appendField(e,`NAME`),this.appendValueInput(`SCHEDULE`).appendField(x(`schedule_text`)),this.appendStatementInput(`STATEMENT`).setCheck(null),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(b.Trigger.HUE),this.setTooltip(x(`schedule_create_tooltip`)),this.setHelpUrl(S(`schedule_create_help`))},isSchedule_:!0,getVars:function(){return[this.getFieldValue(`NAME`)]},getVarModels:function(){return[l(this.getFieldValue(`NAME`),`cron`)]}},c.forBlock.schedule_create=function(e){return`${y(e)} = schedule(${c.valueToCode(e,`SCHEDULE`,s.ATOMIC)}, async () => {\n${c.statementToCode(e,`STATEMENT`)}});\n`},b.Trigger.blocks.schedule_clear=`<sep gap="5"></sep><block type="schedule_clear"> <field name="NAME"></field></block>`,o.schedule_clear={init:function(){this.appendDummyInput(`NAME`).appendField(x(`schedule_clear`)).appendField(new t(()=>{var e;return(e=window.scripts)!=null&&e.blocklyWorkspace?C(window.scripts.blocklyWorkspace):[]}),`NAME`),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(b.Trigger.HUE),this.setTooltip(x(`schedule_clear_tooltip`)),this.setHelpUrl(S(`schedule_clear_help`))}},c.forBlock.schedule_clear=function(e){let t=y(e);return`(() => { if (${t}) { clearSchedule(${t}); ${t} = null; }})();\n`},b.Trigger.blocks.field_cron=`<sep gap="5"></sep><block type="field_cron"> <field name="CRON">* * * * *</field></block>`,o.field_cron={init:function(){this.appendDummyInput().appendField(x(`field_cron_CRON`)),this.appendDummyInput().appendField(new v(`* * * * *`),`CRON`),this.setInputsInline(!0),this.setOutput(!0,`String`),this.setColour(b.Trigger.HUE),this.setTooltip(x(`field_cron_tooltip`))}},c.forBlock.field_cron=function(e){return[`'${e.getFieldValue(`CRON`)}'`,s.ATOMIC]},b.Trigger.blocks.cron_builder=`<sep gap="5"></sep><block type="cron_builder"> <mutation seconds="false" as_line="false"></mutation> <field name="LINE">FALSE</field> <field name="WITH_SECONDS">FALSE</field> <value name="DOW"> <shadow type="text"> <field name="TEXT">*</field> </shadow> </value> <value name="MONTHS"> <shadow type="text"> <field name="TEXT">*</field> </shadow> </value> <value name="DAYS"> <shadow type="text"> <field name="TEXT">*</field> </shadow> </value> <value name="HOURS"> <shadow type="text"> <field name="TEXT">*</field> </shadow> </value> <value name="MINUTES"> <shadow type="text"> <field name="TEXT">*</field> </shadow> </value></block>`,o.cron_builder={init:function(){this.appendDummyInput().appendField(x(`cron_builder_CRON`)),this.appendDummyInput(`LINE`).appendField(x(`cron_builder_line`)).appendField(new i(`FALSE`,function(e){var t;(t=this.getSourceBlock())==null||t.setInputsInline(h(e))}),`LINE`);let e=this.workspace;for(let[t,n]of[[`DOW`,`cron_builder_dow`],[`MONTHS`,`cron_builder_month`],[`DAYS`,`cron_builder_day`],[`HOURS`,`cron_builder_hour`],[`MINUTES`,`cron_builder_minutes`]]){let r=this.appendValueInput(t).appendField(x(n));O(e,r,`text`,[`TEXT`,`*`])}this.appendDummyInput(`WITH_SECONDS`).appendField(x(`cron_builder_with_seconds`)).appendField(new i(`FALSE`,function(e){this.getSourceBlock().updateShape_(h(e))}),`WITH_SECONDS`),this.seconds_=!1,this.as_line_=!1,this.setInputsInline(this.as_line_),this.setOutput(!0,`String`),this.setColour(b.Trigger.HUE),this.setTooltip(x(`field_cron_tooltip`))},mutationToDom:function(){let e=document.createElement(`mutation`);return e.setAttribute(`seconds`,String(this.seconds_)),e.setAttribute(`as_line`,String(this.as_line_)),e},domToMutation:function(e){this.seconds_=e.getAttribute(`seconds`)===`true`,this.as_line_=e.getAttribute(`as_line`)===`true`,this.setInputsInline(this.as_line_),this.updateShape_(this.seconds_)},updateShape_:function(e){if(this.seconds_=e,e){if(!this.getInput(`SECONDS`)){let e=this.appendValueInput(`SECONDS`).appendField(x(`cron_builder_seconds`));O(this.workspace,e,`text`,[`TEXT`,`*`])}}else this.getInput(`SECONDS`)&&this.removeInput(`SECONDS`)}},c.forBlock.cron_builder=function(e){let t=t=>c.valueToCode(e,t,s.ATOMIC),n=e.getFieldValue(`WITH_SECONDS`),r=n&&e.getInput(`SECONDS`)?t(`SECONDS`):`0`;return[(h(n)?`${r}.toString().trim() + ' ' + `:``)+`${t(`MINUTES`)}.toString().trim() + ' ' + ${t(`HOURS`)}.toString().trim() + ' ' + ${t(`DAYS`)}.toString().trim() + ' ' + ${t(`MONTHS`)}.toString().trim() + ' ' + ${t(`DOW`)}.toString().trim()`,s.ATOMIC]},b.Trigger.blocks.onMessage=`<block type="onMessage"> <field name="MESSAGE">customMessage</field></block>`,o.onMessage={init:function(){this.appendDummyInput(`NAME`).appendField(`✉️ ${x(`onMessage`)}`),this.appendDummyInput(`MESSAGE`).appendField(x(`onMessage_message`)).appendField(new n(`customMessage`),`MESSAGE`),this.appendStatementInput(`STATEMENT`).setCheck(null),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(b.Trigger.HUE),this.setTooltip(x(`onMessage_tooltip`)),this.setHelpUrl(S(`onMessage_help`))},onchange:function(){d(this)}},c.forBlock.onMessage=function(e){let t=e.getFieldValue(`MESSAGE`),n=c.statementToCode(e,`STATEMENT`);return`onMessage(${u(t)}, async (data, callback) => {\n${n}${c.prefixLines(`typeof callback === 'function' && callback({ result: true }); // default callback`,c.INDENT)}\n});\n`},b.Trigger.blocks.onMessage_data=`<sep gap="5"></sep><block type="onMessage_data"> <field name="ATTR">data</field></block>`,k(`onMessage_data`,`✉️ `,[[x(`onMessage_data_data`),`data`]],[`onMessage`],`onMessage_data_warning`,b.Action.HUE,`onMessage_data_help`),c.forBlock.onMessage_data=function(e){return[e.getFieldValue(`ATTR`),s.ATOMIC]},b.Trigger.blocks.onFile=`<block type="onFile"> <field name="WITH_FILE">FALSE</field> <value name="OID"> <shadow type="field_oid_meta"> <field name="oid">0_userdata.0</field> </shadow> </value> <value name="FILE"> <shadow type="text"> <field name="TEXT">*</field> </shadow> </value></block>`,o.onFile={init:function(){this.appendValueInput(`OID`).appendField(`📁 ${x(`onFile`)}`).setCheck(null),this.appendValueInput(`FILE`).appendField(x(`onFile_file`)).setCheck(null),this.appendDummyInput(`WITH_FILE_INPUT`).appendField(x(`onFile_withFile`)).appendField(new i(`FALSE`),`WITH_FILE`),this.appendStatementInput(`STATEMENT`).setCheck(null),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(b.Trigger.HUE),this.setTooltip(x(`onFile_tooltip`)),this.setHelpUrl(S(`onFile_help`))},onchange:function(){d(this)}},c.forBlock.onFile=function(e){let t=c.valueToCode(e,`OID`,s.ATOMIC),n=c.valueToCode(e,`FILE`,s.ATOMIC),r=e.getFieldValue(`WITH_FILE`),i=c.statementToCode(e,`STATEMENT`),a=g(t);return`onFile(${t}${a?` /* ${a} */`:``}, ${n}, ${r===`TRUE`?`true`:`false`}, async (id, fileName, size, data, mimeType) => {\n${i}});\n`},b.Trigger.blocks.onFile_data=`<sep gap="5"></sep><block type="onFile_data"> <field name="ATTR">data</field></block>`,k(`onFile_data`,`📁`,[[x(`onFile_data_data`),`data`],[x(`onFile_data_filename`),`fileName`],[x(`onFile_data_size`),`size`],[x(`onFile_data_mimeType`),`mimeType`],[x(`onFile_data_id`),`id`],[x(`onFile_data_tempFile`),`TEMP_FILE_PATH`]],[`onFile`],`onFile_data_warning`,b.Trigger.HUE),c.forBlock.onFile_data=function(e){let t=e.getFieldValue(`ATTR`);return t===`TEMP_FILE_PATH`?[`createTempFile(fileName, data)`,s.ATOMIC]:[t,s.ATOMIC]},b.Trigger.blocks.offFile=`<sep gap="5"></sep><block type="offFile"> <value name="OID"> <shadow type="field_oid_meta"> <field name="oid">0_userdata.0</field> </shadow> </value> <value name="FILE"> <shadow type="text"> <field name="TEXT">*</field> </shadow> </value></block>`,o.offFile={init:function(){this.appendValueInput(`OID`).appendField(`📁 ${x(`offFile`)}`).setCheck(null),this.appendValueInput(`FILE`).appendField(x(`onFile_file`)).setCheck(null),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(b.Trigger.HUE),this.setTooltip(x(`offFile_tooltip`)),this.setHelpUrl(S(`offFile_help`))}},c.forBlock.offFile=function(e){let t=c.valueToCode(e,`OID`,s.ATOMIC),n=c.valueToCode(e,`FILE`,s.ATOMIC),r=g(t);return`offFile(${t}${r?` /* ${r} */`:``}, ${n});\n`},b.Trigger.blocks.onLog=`<block type="onLog"> <field name="Severity">error</field></block>`,o.onLog={init:function(){this.appendDummyInput(`TEXT`).appendField(`💬 ${x(`onLog`)}`),this.appendDummyInput(`Severity`).appendField(x(`loglevel`)).appendField(new t([[x(`loglevel_error`),`error`],[x(`loglevel_warn`),`warn`],[x(`loglevel_info`),`info`],[x(`loglevel_debug`),`debug`],[x(`loglevel_all`),`*`]]),`Severity`),this.appendStatementInput(`STATEMENT`).setCheck(null),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(b.Trigger.HUE),this.setTooltip(x(`onLog_tooltip`)),this.setHelpUrl(S(`onLog_help`))},onchange:function(){d(this)}},c.forBlock.onLog=function(e){let t=c.statementToCode(e,`STATEMENT`);return`onLog('${e.getFieldValue(`Severity`)}', async (data) => {\n${t}});\n`},b.Trigger.blocks.onLog_data=`<sep gap="5"></sep><block type="onLog_data"> <field name="ATTR">data.message</field></block>`,k(`onLog_data`,`💬 `,[[x(`onLog_data_message`),`data.message`],[x(`loglevel`),`data.severity`],[x(`onLog_data_from`),`data.from`],[x(`onLog_data_ts`),`data.ts`]],[`onLog`],`onLog_data_warning`,b.Trigger.HUE),c.forBlock.onLog_data=function(e){return[e.getFieldValue(`ATTR`),s.ATOMIC]},b.Trigger.blocks.onEnumMembers=`<block type="onEnumMembers"></block>`,o.onEnumMembers={init:function(){this.appendDummyInput().appendField(x(`onEnumMembers`)),this.appendDummyInput(`OID`).appendField(new _(x(`select_id`),`enum`),`OID`),this.appendStatementInput(`STATEMENT`).setCheck(null),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(b.Trigger.HUE),this.setTooltip(x(`onEnumMembers_tooltip`)),this.setHelpUrl(S(`onEnumMembers_help`))},onchange:function(){d(this)}},c.forBlock.onEnumMembers=function(e){let t=e.getFieldValue(`OID`),n=c.statementToCode(e,`STATEMENT`),r=p(t);return`onEnumMembers('${t}'${r?` /* ${r} */`:``}, async (obj) => {\n${D()}${n}});\n`}}export{b as install};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{m as e,y as t}from"./
|
|
1
|
+
import{m as e,y as t}from"./_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__244278364413149__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-Lnn-CkVR.js";var n=[`'`,`"`,"`"],r=/^@(annually|yearly|monthly|weekly|daily|midnight|hourly|reboot)$/i,i=/^[0-9A-Za-z*/,?#\-LW]+$/;function a(e){let t=e.trim();if(!t)return!1;if(r.test(t))return!0;let n=t.split(/\s+/);return n.length<5||n.length>7||!n.every(e=>i.test(e))?!1:/[\d*/]/.test(t)}function o(e,t){if(!e)return null;let r=Math.max(1,Math.min(t,e.length+1))-1,i=null,o=-1;for(let t=r-1;t>=0;t--){let r=e[t];if(n.includes(r)&&e[t-1]!==`\\`){let n=0;for(let i=0;i<t;i++)e[i]===r&&e[i-1]!==`\\`&&n++;if(n%2==0){i=r,o=t;break}}}if(i===null||o<0)return null;let s=-1;for(let t=o+1;t<e.length;t++)if(e[t]===i&&e[t-1]!==`\\`){s=t;break}if(s<0||r<o||r>s)return null;let c=e.substring(o+1,s);return a(c)?{expression:c.trim(),startColumn:o+2,endColumn:s+1}:null}function s(n,r){try{return t(n,r||e.getLanguage())||null}catch{return null}}function c(t){let n=e.t(`Second`),r=e.t(`Minute`),i=e.t(`Hour`),a=e.t(`Day of month`),o=e.t(`Month`),s=e.t(`Day of week`),c=e.t(`Year`);return t===7?[n,r,i,a,o,s,c]:t===6?[n,r,i,a,o,s]:[r,i,a,o,s]}function l(t,n){let i=[];i.push(`**⏰ ${e.t(`Cron expression`)}** · \`${t}\``),i.push(``,`**${n}**`);let a=t.split(/\s+/);if(!r.test(t)&&a.length>=5&&a.length<=7){let e=c(a.length);i.push(``),a.forEach((t,n)=>{i.push(`- \`${t}\` — ${e[n]}`)})}return i.join(`
|
|
2
2
|
`)}function u(e){let t=[];for(let n of[`javascript`,`typescript`]){let r=e.languages.registerHoverProvider(n,{provideHover:(t,n)=>{let r=o(t.getLineContent(n.lineNumber),n.column);if(!r)return null;let i=s(r.expression);if(!i)return null;let a=l(r.expression,i);return{range:new e.Range(n.lineNumber,r.startColumn,n.lineNumber,r.endColumn),contents:[{value:a,isTrusted:!1,supportHtml:!1}]}}});t.push(r)}return{dispose(){t.forEach(e=>{try{e.dispose()}catch{}})}}}export{u as registerCronHoverProvider};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,c as t,i as n,l as r,o as i,r as a,s as o,t as s}from"./utils-
|
|
1
|
+
import{a as e,c as t,i as n,l as r,o as i,r as a,s as o,t as s}from"./utils-BFhwh2EC.js";function c(e){let n=new((i())||a)({id:`${e.name}@${e.version||Date.now()}`,...e});return t(n),n}var l=null;function u(e){let t=s(e.name,e.version),n={...e,id:e.id||``};return t?(t.initOptions(n),l||=t,t):(l=c(n),l)}function d(...t){return r(l,e,n),l.loadRemote.apply(l,t)}function f(...t){return r(l,e,n),l.registerRemotes.apply(l,t)}o(a);export{d as n,f as r,u as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{sr as e}from"./_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__244278364413149__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-Lnn-CkVR.js";import{d as t,n}from"./blockly-C3YM75rJ.js";var r=class extends n{constructor(t){super(t),e(this,`FONTSIZE`,void 0),e(this,`CURSOR`,void 0),e(this,`SERIALIZABLE`,void 0),e(this,`spellcheck_`,void 0),this.FONTSIZE=11,this.CURSOR=`pointer`,this.SERIALIZABLE=!0,this.spellcheck_=!1}dispose(){t.hideIfOwner(this),super.dispose()}setValue(e){e!==null&&super.setValue(e)}showEditor_(){window.main.cronDialog(this.getValue(),e=>{e!=null&&this.setValue(e)})}};function i(){window.Blockly.FieldCRON=r}export{r as FieldCRON,i as install};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{sr as e}from"./_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__244278364413149__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-Lnn-CkVR.js";import{d as t,n}from"./blockly-C3YM75rJ.js";var r=`http://www.w3.org/2000/svg`,i=`http://www.w3.org/1999/xlink`,a=16,o=class o extends n{constructor(t,n){super(t),e(this,`FONTSIZE`,void 0),e(this,`CURSOR`,void 0),e(this,`SERIALIZABLE`,void 0),e(this,`spellcheck_`,void 0),e(this,`maxDisplayLength`,void 0),e(this,`_type`,void 0),e(this,`_idName`,null),e(this,`_iconElement`,null),e(this,`_iconUrl`,null),e(this,`_showValue`,!1),e(this,`_stateValueText`,null),e(this,`_valueBadge`,null),e(this,`_hoverHandler`,null),e(this,`_disposed`,!1),this._type=n,this.FONTSIZE=11,this.CURSOR=`pointer`,this.SERIALIZABLE=!0,this.spellcheck_=!1,this.maxDisplayLength=200}dispose(){this._disposed=!0,t.hideIfOwner(this),this.fieldGroup_&&this._hoverHandler&&(this.fieldGroup_.removeEventListener(`mouseenter`,this._hoverHandler),this._hoverHandler=null),this._valueBadge&&=(this._valueBadge.remove(),null),super.dispose()}initView(){super.initView();let e=this.getValue();e&&this.updateIcon_(e),this.fieldGroup_&&!this._hoverHandler&&(this._hoverHandler=()=>this._fetchStateValue(),this.fieldGroup_.addEventListener(`mouseenter`,this._hoverHandler)),this._ensureValueBadge()}static _objects(){var e;return(e=window.main)==null?void 0:e.objects}static _resolveObjectName(e){var t;let n=o._objects();if(!(n!=null&&(t=n[e])!=null&&(t=t.common)!=null&&t.name))return null;let r=n[e].common.name;return typeof r==`object`&&(r=r[window.systemLang]||r.en),r||null}static computeDisplayText(e,t){var r;let i=o.displayMode,a=o._objects(),s;switch(i){case 1:{let t=e.split(`.`),n=[];for(let e=0;e<t.length;e++){let r=t.slice(0,e+1).join(`.`),i=o._resolveObjectName(r);n.push(i||t[e])}s=n.join(`.`);break}case 2:s=e.split(`.`).pop()||e;break;case 3:s=e;break;default:s=o._resolveObjectName(e)||e}return a!=null&&(r=a[e])!=null&&r.type&&![`state`,`meta`,`script`].includes(a[e].type)&&(s+=` (${a[e].type})`),t&&s.length>t&&(s=`${s.substring(0,t-2)}…`),s=s.replace(/\s/g,n.NBSP),s||n.NBSP}refreshDisplay(){let e=this.getValue();e&&(this._idName=o.computeDisplayText(e,this.maxDisplayLength),this.updateIcon_(e),this.forceRerender(),o.displayMode===1&&this._resolvePathNamesAsync(e))}_resolvePathNamesAsync(e){var t;if(typeof((t=window.main)==null?void 0:t.getObject)!=`function`)return;let n=o._objects(),r=e.split(`.`),i=0,a=!1;for(let t=0;t<r.length;t++){let s=r.slice(0,t+1).join(`.`);n[s]||(i++,window.main.getObject(s,(t,r)=>{r&&(n[r._id]=n[r._id]||r,a=!0),i--,i===0&&a&&(this._idName=o.computeDisplayText(e,this.maxDisplayLength),this.forceRerender())}))}}_getIconOffset(){return o.showIcon&&this._iconElement?20:0}updateSize_(e){let t=this.getConstants();if(!t)return;let n=e===void 0?this.isFullBlockField()?0:t.FIELD_BORDER_RECT_X_PADDING:e,r=this._getIconOffset(),i=this._getBadgeOffset(),a=0;this.textElement_&&(a=this.textElement_.getComputedTextLength());let o=2*n+a+r+i,s=t.FIELD_TEXT_HEIGHT;this.isFullBlockField()||(s=Math.max(s,t.FIELD_BORDER_RECT_HEIGHT)),this.size_.height=s,this.size_.width=o,this.positionTextElement_(n+r,a),this.positionBorderRect_(),this._positionValueBadge(o,n,s)}updateIcon_(e){if(!this.fieldGroup_)return;if(!o.showIcon){this._iconElement&&(this._iconElement.remove(),this._iconElement=null,this._iconUrl=null);return}let t=o.resolveIcon(e);t&&this._applyIcon(t),this._resolveIconAsync(e)}_applyIcon(e){this.fieldGroup_&&e&&(this._iconUrl===e&&this._iconElement||(this._iconUrl=e,this._iconElement||(this._iconElement=document.createElementNS(r,`image`),this._iconElement.setAttribute(`width`,String(a)),this._iconElement.setAttribute(`height`,String(a)),this.textElement_?this.fieldGroup_.insertBefore(this._iconElement,this.textElement_):this.fieldGroup_.appendChild(this._iconElement)),this._iconElement.setAttributeNS(i,`xlink:href`,e),this._positionIcon()))}_positionIcon(){if(this._iconElement&&this.textElement_)try{let e=this.getConstants(),t=this.borderRect_&&e?e.FIELD_BORDER_RECT_X_PADDING:0;this._iconElement.setAttribute(`x`,String(t+2));let n=this.textElement_.getBBox();if(n.height>0){let e=n.y+n.height/2;this._iconElement.setAttribute(`y`,String(e-a/2))}}catch{}}_resolveIconAsync(e){var t;if(!o.showIcon||typeof((t=window.main)==null?void 0:t.getObject)!=`function`)return;let n=o._objects(),r=e.split(`.`),i=r[0],a=e=>{if(e<1)return;let t=r.slice(0,e).join(`.`);if(n[t]){var s;if((s=n[t].common)!=null&&s.icon){this._applyIcon(o._buildIconUrl(n[t].common.icon,i));return}a(e-1);return}window.main.getObject(t,(t,r)=>{let s=r;if(s){var c;if(n[s._id]=n[s._id]||s,(c=s.common)!=null&&c.icon){this._applyIcon(o._buildIconUrl(s.common.icon,i));return}}a(e-1)})};a(r.length)}static _formatStateValue(e,t){var n;if((t==null?void 0:t.val)===void 0||(t==null?void 0:t.val)===null)return`null`;let r;if(typeof t.val==`object`)try{r=JSON.stringify(t.val)}catch{r=String(t.val)}else r=String(t.val);r.length>60&&(r=`${r.substring(0,60)}…`);let i=(n=o._objects())==null||(n=n[e])==null?void 0:n.common;return i!=null&&i.unit&&(r+=` ${i.unit}`),t.ack===!1&&(r+=` (?)`),r}_fetchStateValue(e){var t;let n=this.getValue();if(!n||typeof((t=window.main)==null?void 0:t.getState)!=`function`){e==null||e();return}window.main.getState(n,(t,r)=>{this._disposed||(this._stateValueText=r?o._formatStateValue(n,r):null,e==null||e())})}_composeTooltip(){let e=this.getValue();if(!e)return``;let t=o._resolveObjectName(e),n=t?`${t}\n${e}`:e;return this._stateValueText&&(n+=`\n= ${this._stateValueText}`),n}_getBadgeOffset(){return this._valueBadge?18:0}_ensureValueBadge(){var e;if(this._type!==`state`||this._valueBadge||!this.fieldGroup_||!this.getValue())return;let t=document.createElementNS(r,`text`);t.setAttribute(`class`,`blocklyText`),t.setAttribute(`text-anchor`,`middle`),t.style.fill=`#2196f3`,t.style.fontWeight=`bold`,t.style.cursor=`pointer`,t.textContent=`=`;let n=document.createElementNS(r,`title`);n.textContent=`Show/hide current value`,t.appendChild(n);let i=e=>e.stopPropagation();t.addEventListener(`pointerdown`,i),t.addEventListener(`mousedown`,i),t.addEventListener(`click`,e=>{e.stopPropagation(),this._toggleValue()}),this._valueBadge=t,this.fieldGroup_.appendChild(t),(e=this.getSourceBlock())!=null&&e.rendered&&this.forceRerender()}_positionValueBadge(e,t,n){this._valueBadge&&(this._valueBadge.setAttribute(`x`,String(e-t-9)),this._valueBadge.setAttribute(`y`,String(n/2+4)))}_toggleValue(){this._showValue=!this._showValue,this._valueBadge&&(this._valueBadge.textContent=this._showValue?`×`:`=`),this._showValue?(this._stateValueText=this._stateValueText||`…`,this.forceRerender(),this._fetchStateValue(()=>this.forceRerender())):this.forceRerender()}setValue(e){var t;if(e===null)return;let r=o._objects();r&&!r[e]&&typeof((t=window.main)==null?void 0:t.getObject)==`function`?(this._idName=e||n.NBSP,window.main.getObject(e,(t,n)=>{if(n){r[n._id]=r[n._id]||n;let t=o.computeDisplayText(e,this.maxDisplayLength);t&&(this._idName=t,this.forceRerender()),o.displayMode===1&&this._resolvePathNamesAsync(e)}})):(this._idName=o.computeDisplayText(e,this.maxDisplayLength),o.displayMode===1&&this._resolvePathNamesAsync(e)),this.updateIcon_(e),super.setValue(e),super.setTooltip(()=>this._composeTooltip()),this._ensureValueBadge()}getDisplayText_(){var e;let t=this._idName;return this._showValue&&this._stateValueText&&(t=`${t||``} = ${this._stateValueText}`),t?(t.length>this.maxDisplayLength&&(t=`${t.substring(0,this.maxDisplayLength-2)}…`),t=t.replace(/\s/g,n.NBSP),(e=this.getSourceBlock())!=null&&e.RTL&&(t+=``),t):n.NBSP}showEditor_(){var e,t;(e=window.main)==null||(t=e.selectIdDialog)==null||t.call(e,this.getValue(),this._type,e=>{e!==null&&this.setValue(e)})}static _buildIconUrl(e,t){return e?e.startsWith(`data:`)||e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`/`)?e:`/adapter/${t}/${e}`:null}static resolveIcon(e){let t=o._objects();if(!t)return null;let n=e.split(`.`),r=n[0];for(let e=n.length;e>=1;e--){var i;let a=t[n.slice(0,e).join(`.`)];if(a!=null&&(i=a.common)!=null&&i.icon)return o._buildIconUrl(a.common.icon,r)}if(n.length>=2){var a;let e=t[`system.adapter.${n[0]}.${n[1]}`];if(e!=null&&(a=e.common)!=null&&a.icon)return o._buildIconUrl(e.common.icon,r)}return null}static _refreshAll(e){for(let t of e.getAllBlocks(!1))for(let e of t.inputList)for(let t of e.fieldRow)t instanceof o&&t.refreshDisplay()}static setDisplayMode(e,t){o.displayMode=e,localStorage.setItem(`Blockly.FieldOID.displayMode`,String(e)),o._refreshAll(t)}static setShowIcon(e,t){o.showIcon=e,localStorage.setItem(`Blockly.FieldOID.showIcon`,String(e)),o._refreshAll(t)}};e(o,`DISPLAY_MODE_KEYS`,[`oid_display_name`,`oid_display_path`,`oid_display_id`,`oid_display_full_id`]),e(o,`displayMode`,parseInt(localStorage.getItem(`Blockly.FieldOID.displayMode`)||`0`,10)||0),e(o,`showIcon`,localStorage.getItem(`Blockly.FieldOID.showIcon`)===`true`);function s(){window.Blockly.FieldOID=o}export{o as FieldOID,s as install};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{sr as e}from"./_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__244278364413149__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-Lnn-CkVR.js";import{d as t,n}from"./blockly-C3YM75rJ.js";function r(e){return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(e,t)=>String.fromCharCode(parseInt(t,16))))}function i(e){try{return decodeURIComponent(Array.prototype.map.call(atob(e),e=>`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`).join(``))}catch{return atob(e||``)}}var a=class extends n{constructor(t){super(t),e(this,`FONTSIZE`,void 0),e(this,`CURSOR`,void 0),e(this,`SERIALIZABLE`,void 0),e(this,`spellcheck_`,void 0),this.FONTSIZE=11,this.CURSOR=`pointer`,this.SERIALIZABLE=!0,this.spellcheck_=!1}dispose(){t.hideIfOwner(this),super.dispose()}setValue(e){e!==null&&super.setValue(e)}showEditor_(){let e=this.getValue(),t=this.getSourceBlock(),n=null,a=!1;t!=null&&t.arguments_&&(n=t.arguments_),t!=null&&t.getProcedureDef&&(a=t.getProcedureDef()[2]),window.main.showScriptDialog(i(e||``),n,a,e=>{e!=null&&this.setValue(r(e))})}render_(){let e=this.getConstants();if(!e)return;let t=this.borderRect_?e.FIELD_BORDER_RECT_X_PADDING:0,n=t*2+12,r=e.FIELD_TEXT_HEIGHT;this.borderRect_&&(r=Math.max(r,e.FIELD_BORDER_RECT_HEIGHT)),this.size_.height=r,this.size_.width=n,this.positionTextElement_(t,12),this.positionBorderRect_(),this.getTextElement().textContent=`...`}};function o(){window.Blockly.FieldScript=a,window.Blockly.b64EncodeUnicode=r,window.Blockly.b64DecodeUnicode=i}export{a as FieldScript,i as b64DecodeUnicode,r as b64EncodeUnicode,o as install};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as javascriptGenerator}from"./BlocklyEditor-
|
|
1
|
+
import{r as javascriptGenerator}from"./BlocklyEditor-DY4OoiFv.js";function reconnectChild(e,t,n){var r;if(!(e!=null&&e.getSourceBlock().workspace))return!1;let i=(r=t.getInput(n))==null?void 0:r.connection;if(!i)return!1;let a=e.targetBlock();return(!a||a===t)&&i.targetConnection!==e&&(i.isConnected()&&i.disconnect(),i.connect(e),!0)}function quote(e){return javascriptGenerator.quote_(e)}function dateFormat(e){return window.Blockly.Words[e].format}function dateFormatOptions(){let e=window.Blockly.Translate,t=[`object`,`ms`,`s`,`sid`,`m`,`mid`,`h`,`d`,`M`,`Mt`,`Mts`,`y`,`fy`,`wdt`,`wdts`,`wd`,`cw`,`custom`],n=[`time_get_yyyy.mm.dd`,`time_get_yyyy/mm/dd`,`time_get_yy.mm.dd`,`time_get_yy/mm/dd`,`time_get_dd.mm.yyyy`,`time_get_dd/mm/yyyy`,`time_get_dd.mm.yy`,`time_get_dd/mm/yy`,`time_get_mm/dd/yyyy`,`time_get_mm/dd/yy`,`time_get_dd.mm`,`time_get_dd/mm`,`time_get_mm.dd`,`time_get_mm/dd`,`time_get_hh_mm`,`time_get_hh_mm_ss`,`time_get_hh_mm_ss.sss`];return[...t.map(t=>[e(`time_get_${t}`),t]),...n.map(t=>[e(t),dateFormat(t)])]}function dateLanguageOptions(){let e=[`in english`,`en`],t=[`auf deutsch`,`de`],n=[`на русском`,`ru`];return window.systemLang===`de`?[t,e,n]:window.systemLang===`ru`?[n,e,t]:[e,t,n]}function isTrue(e){return e===!0||e===`true`||e===`TRUE`}function logLevelOptions(){let e=window.Blockly.Translate;return[[e(`loglevel_none`),``],[e(`loglevel_debug`),`debug`],[e(`loglevel_info`),`info`],[e(`loglevel_warn`),`warn`],[e(`loglevel_error`),`error`]]}function updateStatementInput(e,t){let n=t===void 0?isTrue(e.getFieldValue(`WITH_STATEMENT`)):t;e.getInput(`STATEMENT`)&&e.removeInput(`STATEMENT`),n&&e.appendStatementInput(`STATEMENT`)}function warnIfNotNestedIn(e,t,n){let r=!1,i=e;do{if(t.includes(i.type)){r=!0;break}i=i.getSurroundParent()}while(i);e.setWarningText(r?null:window.Blockly.Translate(n),e.id)}function objectNameOf(code){try{var _window$main;const objId=eval(code);let name=((_window$main=window.main)==null||(_window$main=_window$main.objects[objId])==null||(_window$main=_window$main.common)==null?void 0:_window$main.name)||``;return typeof name==`object`&&(name=name[window.systemLang]||name.en),name||``}catch{return``}}function toMilliseconds(e,t){let n=parseFloat(e);return t===`min`?n*6e4:t===`sec`?n*1e3:n}function objectNameById(e){var t;let n=((t=window.main)==null||(t=t.objects[e])==null||(t=t.common)==null?void 0:t.name)||``;return typeof n==`object`&&(n=n[window.systemLang]||n.en),n||``}function warnIfInsideTrigger(e){let t=e.getSurroundParent();for(;t;){if(window.Blockly.Trigger.WARNING_PARENTS.includes(t.type)){e.setWarningText(window.Blockly.Translate(`trigger_in_trigger_warning`),e.id);return}t=t.getSurroundParent()}e.setWarningText(null,e.id)}function namedResourceVariableModel(e,t){return{getId:()=>e,getName:()=>e,getType:()=>t,name:e,type:t}}export{namedResourceVariableModel as a,quote as c,updateStatementInput as d,warnIfInsideTrigger as f,logLevelOptions as i,reconnectChild as l,dateLanguageOptions as n,objectNameById as o,warnIfNotNestedIn as p,isTrue as r,objectNameOf as s,dateFormatOptions as t,toMilliseconds as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./utils-BFhwh2EC.js";({...e.global});var t=e.share;e.utils;export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./vite-preload-helper-
|
|
1
|
+
import{t as e}from"./vite-preload-helper-BbbETgeG.js";import{t}from"./helpers-DT5-3o-l.js";var n=`__mf_module_cache__`;globalThis[n]||={share:{},remote:{}},globalThis[n].share||={},globalThis[n].remote||={};var r=globalThis[n];for(let e of Object.keys(r.share))if(e.startsWith(`default:`)){let t=e.slice(8);r.share[t]===void 0&&(r.share[t]=r.share[e])}else if(!e.includes(`:`)){let t=`default:`+e;r.share[t]===void 0&&(r.share[t]=r.share[e])}var i;async function a(){return i||=(async()=>{let n=(e,t,n,r)=>{let i=(Array.isArray(r)?r[0]:r)||`default`,a=t||!n?e:e+`@`+n,o={canonical:i+`:`+a};return i==="default"&&(o.aliases=[a]),o},i=(e,t)=>{let n=e[t.canonical];if(n!==void 0)return n;let r=t.aliases||[];for(let n of r){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let r=e[n];if(r!==void 0)return e[t.canonical]=r,r}},a=Symbol.for(`module-federation.shared-cache-listeners`),o=Symbol.for(`module-federation.shared-cache-owners`),s=e=>{let t=e[o];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,o,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},c=(e,t)=>{var n;return(n=e[o])==null?void 0:n[t.canonical]},l=e=>{let t=[e,e==null?void 0:e.default];for(let e of t)if(e&&typeof e==`object`){for(let t of[`__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE`,`__TEST_INTERNALS`,`__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED`]){let n=e[t];if(n&&typeof n==`object`)return{internals:n}}if(typeof e.useState==`function`)return{hook:e.useState}}},u=(e,t)=>{if(e===t)return!0;let n=l(e),r=l(t);if(!n||!r)return!1;let i=n.internals,a=r.internals;return i!==void 0||a!==void 0?i!==void 0&&i===a:typeof n.hook==`function`&&n.hook===r.hook},d=(e,t,n,r)=>{var c;let l=i(e,t);if(l!==void 0&&u(l,n))return n;e[t.canonical]=n;let d=t.aliases||[];for(let t of d)Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0});let f=e[o];r===void 0?f&&delete f[t.canonical]:s(e)[t.canonical]=r;let p=(c=e[a])==null?void 0:c[t.canonical];if(p)for(let e of p)e(n);return n},f=await(await e(()=>import(`../remoteEntry.js`),[],import.meta.url)).init(),{usedShared:p}=await e(async()=>{let{usedShared:e}=await import(`./_virtual_mf-localSharedImportMap___mfe_internal__iobroker_javascript__mf_owner__1-DCbVrrFZ.js`);return{usedShared:e}},[],import.meta.url),m=e=>{let t=e;for(let e=0;e<5;e++){let e=t==null?void 0:t.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.getPrototypeOf(e);if(n!==null&&n!==Object.prototype)break;let r=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(r.length>0&&r.some(e=>e!==void 0))break;t=e}return t},h=(e,t)=>y(t).some(n=>{var r;return Object.keys(((r=f.shareScopeMap)==null||(r=r[n])==null?void 0:r[e])||{}).some(e=>e!==t.version)}),g=[[`react`,`prop-types`],[`react-dom`],[`@mui/material`],[`@iobroker/gui-components`]],_=Symbol(`mf.originalSharedProvider`),v={emit:e=>e},y=e=>Array.isArray(e.scope)?e.scope:[e.scope||`default`],b=(e,t)=>{if(t!==`version-first`)return e;let n={};for(let[t,r]of Object.entries(e))n[t]=Object.assign({},r,{[_]:r});return n},x=(e,n,r,i)=>{var a;if(!e||!r)return;let o=Object.fromEntries(Object.entries(e).filter(([,e])=>{var t;return(e==null||(t=e.shareConfig)==null?void 0:t.import)!==!1}));if(Object.keys(o).length===0)return;let s=y(r),c=b(o,i),l={};for(let e of s)l[e||`default`]={[n]:c};let u=(a=t.getRegisteredShare(l,n,{...r,scope:s,strategy:i},v))==null?void 0:a.shared;return(u==null?void 0:u[_])||u},S=(e,t,n,r)=>{var i;return(i=n.shareConfig)!=null&&i.singleton?Object.values(e||{}).some(e=>{var t;return(e==null||(t=e.shareConfig)==null?void 0:t.import)!==!1}):!!x(e,t,{...n,scope:[r]},`version-first`)};for(let e of g)await Promise.all(e.map(async e=>{var t,a,o,s;let l=p[e];if(!l||l.materialize===!1&&!l.lazy||l.treeShaking)return;let u=n(e,(t=l.shareConfig)==null?void 0:t.singleton,l.version,l.scope);if(!(i(r.share,u)!==void 0&&(!((a=l.shareConfig)!=null&&a.singleton)&&c(r.share,u)===`iobroker_javascript`||(o=l.shareConfig)!=null&&o.singleton&&!h(e,l)))){if(((s=l.shareConfig)==null?void 0:s.import)===!1){let t=y(l),n=t=>{var n;return!S((n=f.shareScopeMap)==null||(n=n[t])==null?void 0:n[e],e,l,t)};if(t.some(n)){var g;if(!f.__mfKeepAdoptedProviders){var _,v;f.__mfKeepAdoptedProviders=!0,(_=f.sharedHandler)==null||(_=_.hooks)==null||(_=_.lifecycle)==null||(_=_.afterRegisterShare)==null||(v=_.on)==null||v.call(_,e=>{var t,n,r;let{shared:i,previousShared:a,registeredShared:o}=e||{},s=(t=f.shareScopeMap)==null||(t=t[e.scope])==null?void 0:t[e.pkgName];if(i&&s){if(((n=i.shareConfig)==null?void 0:n.import)!==!1){var c;o!==i&&(o==null||(c=o.shareConfig)==null?void 0:c.import)===!1&&!o.loaded&&s[i.version]===o&&(s[i.version]=i);return}o===i&&a&&((r=a.shareConfig)==null?void 0:r.import)!==!1&&s[i.version]===i&&(s[i.version]=a)}})}for(let r of((g=globalThis.__FEDERATION__)==null?void 0:g.__INSTANCES__)||[])for(let i of t){var b;let t=r==null||(b=r.shareScopeMap)==null||(b=b[i])==null?void 0:b[e];if(!S(t,e,l,i)||!n(i))continue;let a=(f.shareScopeMap[i]||={})[e]||={};for(let[e,n]of Object.entries(t)){var x,C;(n==null||(x=n.shareConfig)==null?void 0:x.import)!==!1&&(a[e]&&((C=a[e].shareConfig)==null?void 0:C.import)!==!1||(a[e]=n))}}}if(t.every(n))return}await f.loadShare(e,{customShareInfo:{shareConfig:l.shareConfig}}).then(async e=>{if(e===!1)return;let t=typeof e==`function`?e():e,n=m(await Promise.resolve(t));d(r.share,u,n,`iobroker_javascript`)})}}));for(let[e,t]of Object.entries(p)){var C,w;if(!t.lib||t.treeShaking||((C=t.shareConfig)==null?void 0:C.import)===!1)continue;let i=n(e,(w=t.shareConfig)==null?void 0:w.singleton,t.version,t.scope);if(c(r.share,i)===`iobroker_javascript`)for(let n of Array.isArray(t.scope)?t.scope:[t.scope||`default`]){var T;let r=(T=f.shareScopeMap)==null||(T=T[n])==null?void 0:T[e],i=r==null?void 0:r[t.version];i&&i.get===t.get&&!i.lib&&(Object.values(r).some(e=>e!==i&&((e==null?void 0:e.lib)||(e==null?void 0:e.loaded)))||(i.lib=t.lib,i.loaded=!0))}}return f})(),i}i=a();export{i as hostInitPromise,a as initHost};
|