iobroker.mywebui 1.76.0 → 1.78.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/default-controls/controls/gauges/setpoint-gauge.control +1 -0
- package/dist/backend/3d-editor-integration.js +1 -1
- package/dist/backend/ImportmapCreator.js +1 -1
- package/dist/backend/UploadHelper.js +1 -1
- package/dist/backend/main.js +1 -1
- package/io-package.json +1 -1
- package/package.json +1 -1
- package/www/3d-editor/js/Animation.js +1 -1
- package/www/3d-editor/js/AnimationResizer.js +1 -1
- package/www/3d-editor/js/Command.js +1 -1
- package/www/3d-editor/js/Config.js +1 -1
- package/www/3d-editor/js/Editor.js +1 -1
- package/www/3d-editor/js/EditorControls.js +1 -1
- package/www/3d-editor/js/GLTFImportDialog.js +1 -1
- package/www/3d-editor/js/History.js +1 -1
- package/www/3d-editor/js/Loader.js +1 -1
- package/www/3d-editor/js/LoaderUtils.js +1 -1
- package/www/3d-editor/js/Menubar.Add.js +1 -1
- package/www/3d-editor/js/Menubar.Edit.js +1 -1
- package/www/3d-editor/js/Menubar.File.js +1 -1
- package/www/3d-editor/js/Menubar.Help.js +1 -1
- package/www/3d-editor/js/Menubar.Render.js +1 -1
- package/www/3d-editor/js/Menubar.Status.js +1 -1
- package/www/3d-editor/js/Menubar.View.js +1 -1
- package/www/3d-editor/js/Menubar.js +1 -1
- package/www/3d-editor/js/Player.js +1 -1
- package/www/3d-editor/js/Resizer.js +1 -1
- package/www/3d-editor/js/Script.js +1 -1
- package/www/3d-editor/js/Selector.js +1 -1
- package/www/3d-editor/js/Sidebar.Geometry.BoxGeometry.js +1 -1
- package/www/3d-editor/js/Sidebar.Geometry.BufferGeometry.js +1 -1
- package/www/3d-editor/js/Sidebar.Geometry.CapsuleGeometry.js +1 -1
- package/www/3d-editor/js/Sidebar.Geometry.CircleGeometry.js +1 -1
- package/www/3d-editor/js/Sidebar.Geometry.CylinderGeometry.js +1 -1
- package/www/3d-editor/js/Sidebar.Geometry.DodecahedronGeometry.js +1 -1
- package/www/3d-editor/js/Sidebar.Geometry.ExtrudeGeometry.js +1 -1
- package/www/3d-editor/js/Sidebar.Geometry.IcosahedronGeometry.js +1 -1
- package/www/3d-editor/js/Sidebar.Geometry.LatheGeometry.js +1 -1
- package/www/3d-editor/js/Sidebar.Geometry.Modifiers.js +1 -1
- package/www/3d-editor/js/Sidebar.Geometry.OctahedronGeometry.js +1 -1
- package/www/3d-editor/js/Sidebar.Geometry.PlaneGeometry.js +1 -1
- package/www/3d-editor/js/Sidebar.Geometry.RingGeometry.js +1 -1
- package/www/3d-editor/js/Sidebar.Geometry.ShapeGeometry.js +1 -1
- package/www/3d-editor/js/Sidebar.Geometry.SphereGeometry.js +1 -1
- package/www/3d-editor/js/Sidebar.Geometry.TetrahedronGeometry.js +1 -1
- package/www/3d-editor/js/Sidebar.Geometry.TextGeometry.js +1 -1
- package/www/3d-editor/js/Sidebar.Geometry.TorusGeometry.js +1 -1
- package/www/3d-editor/js/Sidebar.Geometry.TorusKnotGeometry.js +1 -1
- package/www/3d-editor/js/Sidebar.Geometry.TubeGeometry.js +1 -1
- package/www/3d-editor/js/Sidebar.Geometry.js +1 -1
- package/www/3d-editor/js/Sidebar.Material.BooleanProperty.js +1 -1
- package/www/3d-editor/js/Sidebar.Material.ColorProperty.js +1 -1
- package/www/3d-editor/js/Sidebar.Material.ConstantProperty.js +1 -1
- package/www/3d-editor/js/Sidebar.Material.MapProperty.js +1 -1
- package/www/3d-editor/js/Sidebar.Material.NumberProperty.js +1 -1
- package/www/3d-editor/js/Sidebar.Material.Program.js +1 -1
- package/www/3d-editor/js/Sidebar.Material.RangeValueProperty.js +1 -1
- package/www/3d-editor/js/Sidebar.Material.js +1 -1
- package/www/3d-editor/js/Sidebar.Object.js +1 -1
- package/www/3d-editor/js/Sidebar.Project.App.js +1 -1
- package/www/3d-editor/js/Sidebar.Project.Materials.js +1 -1
- package/www/3d-editor/js/Sidebar.Project.Renderer.js +1 -1
- package/www/3d-editor/js/Sidebar.Project.Resources.js +1 -1
- package/www/3d-editor/js/Sidebar.Project.js +1 -1
- package/www/3d-editor/js/Sidebar.Properties.js +1 -1
- package/www/3d-editor/js/Sidebar.Scene.js +1 -1
- package/www/3d-editor/js/Sidebar.Script.js +1 -1
- package/www/3d-editor/js/Sidebar.Settings.History.js +1 -1
- package/www/3d-editor/js/Sidebar.Settings.Shortcuts.js +1 -1
- package/www/3d-editor/js/Sidebar.Settings.js +1 -1
- package/www/3d-editor/js/Sidebar.js +1 -1
- package/www/3d-editor/js/Storage.js +1 -1
- package/www/3d-editor/js/Strings.js +1 -1
- package/www/3d-editor/js/TextureParametersDialog.js +1 -1
- package/www/3d-editor/js/Toolbar.js +1 -1
- package/www/3d-editor/js/Viewport.Controls.js +1 -1
- package/www/3d-editor/js/Viewport.Info.js +1 -1
- package/www/3d-editor/js/Viewport.Pathtracer.js +1 -1
- package/www/3d-editor/js/Viewport.ViewHelper.js +1 -1
- package/www/3d-editor/js/Viewport.XR.js +1 -1
- package/www/3d-editor/js/Viewport.js +1 -1
- package/www/3d-editor/js/commands/AddObjectCommand.js +1 -1
- package/www/3d-editor/js/commands/AddScriptCommand.js +1 -1
- package/www/3d-editor/js/commands/Commands.js +1 -1
- package/www/3d-editor/js/commands/MoveObjectCommand.js +1 -1
- package/www/3d-editor/js/commands/MultiCmdsCommand.js +1 -1
- package/www/3d-editor/js/commands/RemoveObjectCommand.js +1 -1
- package/www/3d-editor/js/commands/RemoveScriptCommand.js +1 -1
- package/www/3d-editor/js/commands/SetColorCommand.js +1 -1
- package/www/3d-editor/js/commands/SetGeometryCommand.js +1 -1
- package/www/3d-editor/js/commands/SetGeometryValueCommand.js +1 -1
- package/www/3d-editor/js/commands/SetMaterialColorCommand.js +1 -1
- package/www/3d-editor/js/commands/SetMaterialCommand.js +1 -1
- package/www/3d-editor/js/commands/SetMaterialMapCommand.js +1 -1
- package/www/3d-editor/js/commands/SetMaterialRangeCommand.js +1 -1
- package/www/3d-editor/js/commands/SetMaterialValueCommand.js +1 -1
- package/www/3d-editor/js/commands/SetMaterialVectorCommand.js +1 -1
- package/www/3d-editor/js/commands/SetPositionCommand.js +1 -1
- package/www/3d-editor/js/commands/SetRotationCommand.js +1 -1
- package/www/3d-editor/js/commands/SetScaleCommand.js +1 -1
- package/www/3d-editor/js/commands/SetSceneCommand.js +1 -1
- package/www/3d-editor/js/commands/SetScriptValueCommand.js +1 -1
- package/www/3d-editor/js/commands/SetShadowValueCommand.js +1 -1
- package/www/3d-editor/js/commands/SetTextureParametersCommand.js +1 -1
- package/www/3d-editor/js/commands/SetUuidCommand.js +1 -1
- package/www/3d-editor/js/commands/SetValueCommand.js +1 -1
- package/www/dist/frontend/bundle/chunk-3C6XC7RW.js +1 -1
- package/www/dist/frontend/bundle/chunk-3WGNLIWJ.js +3 -3
- package/www/dist/frontend/bundle/chunk-3YK3Y2SJ.js +1 -1
- package/www/dist/frontend/bundle/chunk-43HEBO5G.js +2 -2
- package/www/dist/frontend/bundle/chunk-5MUGMRXU.js +1 -1
- package/www/dist/frontend/bundle/chunk-5UBRCTRX.js +3 -3
- package/www/dist/frontend/bundle/chunk-65A3PNMG.js +1 -1
- package/www/dist/frontend/bundle/chunk-7CWDQGAG.js +3 -3
- package/www/dist/frontend/bundle/chunk-7PT7IGUJ.js +3 -3
- package/www/dist/frontend/bundle/chunk-AI5PDLDE.js +2 -2
- package/www/dist/frontend/bundle/chunk-AWKVUUKN.js +3 -3
- package/www/dist/frontend/bundle/chunk-B6NXWGSB.js +1 -1
- package/www/dist/frontend/bundle/chunk-BHSHNRXW.js +1 -1
- package/www/dist/frontend/bundle/chunk-BVONDEOL.js +3 -3
- package/www/dist/frontend/bundle/chunk-CHDKROX5.js +3 -3
- package/www/dist/frontend/bundle/chunk-DNCD2F6X.js +3 -3
- package/www/dist/frontend/bundle/chunk-FHF6DL5U.js +1 -1
- package/www/dist/frontend/bundle/chunk-FO56TEZH.js +3 -3
- package/www/dist/frontend/bundle/chunk-FSRRPQMX.js +3 -3
- package/www/dist/frontend/bundle/chunk-GLQNGCFL.js +1 -1
- package/www/dist/frontend/bundle/chunk-JBDSDK2C.js +3 -3
- package/www/dist/frontend/bundle/chunk-JSC66ZLQ.js +1 -1
- package/www/dist/frontend/bundle/chunk-K6IV7LKW.js +1 -1
- package/www/dist/frontend/bundle/chunk-KY73TL6O.js +2 -2
- package/www/dist/frontend/bundle/chunk-M6VVTDVX.js +3 -3
- package/www/dist/frontend/bundle/chunk-MECWXZRN.js +1 -1
- package/www/dist/frontend/bundle/chunk-N2YIZTB2.js +1 -1
- package/www/dist/frontend/bundle/chunk-NQ7L7KNT.js +3 -3
- package/www/dist/frontend/bundle/chunk-P7EOR36H.js +1 -1
- package/www/dist/frontend/bundle/chunk-PJYK24KZ.js +1 -1
- package/www/dist/frontend/bundle/chunk-PYLAW6UA.js +3 -3
- package/www/dist/frontend/bundle/chunk-QJJGP23I.js +1 -1
- package/www/dist/frontend/bundle/chunk-QV4IBWXA.js +1 -1
- package/www/dist/frontend/bundle/chunk-R6IQDPAP.js +3 -3
- package/www/dist/frontend/bundle/chunk-RTTBZOQU.js +3 -3
- package/www/dist/frontend/bundle/chunk-S4TLNW5D.js +1 -1
- package/www/dist/frontend/bundle/chunk-SE6N4ZEN.js +1 -1
- package/www/dist/frontend/bundle/chunk-SQHXO2IT.js +3 -3
- package/www/dist/frontend/bundle/chunk-T4AIQBBH.js +3 -3
- package/www/dist/frontend/bundle/chunk-U5Q332OH.js +1 -1
- package/www/dist/frontend/bundle/chunk-UIP324PP.js +1 -1
- package/www/dist/frontend/bundle/chunk-V27IRYSL.js +1 -1
- package/www/dist/frontend/bundle/chunk-V4C5FGJL.js +2 -2
- package/www/dist/frontend/bundle/chunk-WED7CGWA.js +2 -2
- package/www/dist/frontend/bundle/chunk-WQ5H5LTG.js +3 -3
- package/www/dist/frontend/bundle/chunk-WU54NCEU.js +1 -1
- package/www/dist/frontend/bundle/chunk-XFO5FUCN.js +1 -1
- package/www/dist/frontend/bundle/chunk-XWAQ2BWM.js +3 -3
- package/www/dist/frontend/bundle/chunk-YTQCHNRQ.js +3 -3
- package/www/dist/frontend/bundle/chunk-YUSK4FN3.js +3 -3
- package/www/dist/frontend/bundle/chunk-Z34BSG5O.js +3 -3
- package/www/dist/frontend/bundle/common/IobrokerHandler.js +1 -1
- package/www/dist/frontend/bundle/runtime/CustomControls.js +1 -1
- package/www/dist/frontend/bundle/runtime/ScreenViewer.js +1 -1
- package/www/dist/frontend/bundle/runtime/controls.js +4 -4
- package/www/dist/frontend/bundle/runtime/init.js +2 -2
- package/www/dist/frontend/common/Common.globals.js +1 -1
- package/www/dist/frontend/common/IobrokerHandler.js +1 -1
- package/www/dist/frontend/common/Runtime.js +1 -1
- package/www/dist/frontend/config/CommandHandling.js +1 -1
- package/www/dist/frontend/config/ConfigureWebcomponentDesigner.js +1 -1
- package/www/dist/frontend/config/DockHelper.js +1 -1
- package/www/dist/frontend/config/IobrokerWebui3DDriveEngine.js +1 -1
- package/www/dist/frontend/config/IobrokerWebui3DScreenEditor.js +3 -3
- package/www/dist/frontend/config/IobrokerWebui3DScreenPropertiesPanel.js +3 -3
- package/www/dist/frontend/config/IobrokerWebui3DScreenViewer.js +2 -2
- package/www/dist/frontend/config/IobrokerWebuiAppShell.js +3 -3
- package/www/dist/frontend/config/IobrokerWebuiBindingsEditor.js +1 -1
- package/www/dist/frontend/config/IobrokerWebuiConfirmationWrapper.js +3 -3
- package/www/dist/frontend/config/IobrokerWebuiControlPropertiesEditor.js +3 -3
- package/www/dist/frontend/config/IobrokerWebuiDynamicPropsEditor.js +1 -1
- package/www/dist/frontend/config/IobrokerWebuiEventAssignment.js +1 -1
- package/www/dist/frontend/config/IobrokerWebuiIconsView.js +2 -2
- package/www/dist/frontend/config/IobrokerWebuiMonacoEditor.js +2 -2
- package/www/dist/frontend/config/IobrokerWebuiPropertyGrid.js +1 -1
- package/www/dist/frontend/config/IobrokerWebuiScreenEditor.js +1 -1
- package/www/dist/frontend/config/IobrokerWebuiScreensView.js +3 -3
- package/www/dist/frontend/config/IobrokerWebuiSignalPropertyEditor.js +1 -1
- package/www/dist/frontend/config/IobrokerWebuiSolutionExplorer.js +3 -3
- package/www/dist/frontend/config/IobrokerWebuiTranslationEditor.js +1 -1
- package/www/dist/frontend/config/IobrokerWebuiWidgetGallery.js +3 -3
- package/www/dist/frontend/helper/DialogHelper.js +2 -2
- package/www/dist/frontend/helper/EsprimaHelper.js +1 -1
- package/www/dist/frontend/helper/Helper.js +1 -1
- package/www/dist/frontend/helper/LayoutHelper.js +1 -1
- package/www/dist/frontend/helper/XmlHelper.js +1 -1
- package/www/dist/frontend/helper/ZipHelper.js +1 -1
- package/www/dist/frontend/runtime/AnimationService.js +1 -1
- package/www/dist/frontend/runtime/CustomControls.js +1 -1
- package/www/dist/frontend/runtime/DynamicElementProperties.js +1 -1
- package/www/dist/frontend/runtime/HabPanelLikeMenu.js +3 -3
- package/www/dist/frontend/runtime/NavigationShell.js +1 -1
- package/www/dist/frontend/runtime/ScreenViewer.js +3 -3
- package/www/dist/frontend/runtime/TranslateableText.js +2 -2
- package/www/dist/frontend/runtime/VisibilityService.js +1 -1
- package/www/dist/frontend/runtime/controls.js +1 -1
- package/www/dist/frontend/runtime/init.js +1 -1
- package/www/dist/frontend/scripting/IobrokerWebuiScriptSystem.js +1 -1
- package/www/dist/frontend/scripting/blockly/OpenScreen.js +1 -1
- package/www/dist/frontend/scripting/blockly/webuiBlocklyToolbox.js +1 -1
- package/www/dist/frontend/services/DynamicPropertiesHelper.js +1 -1
- package/www/dist/frontend/services/IobrokerWebuiBindableLocalObjectsService.js +1 -1
- package/www/dist/frontend/services/IobrokerWebuiBindableObjectDragDropService.js +1 -1
- package/www/dist/frontend/services/IobrokerWebuiBindableObjectsForPropertiesService.js +1 -1
- package/www/dist/frontend/services/IobrokerWebuiBindableObjectsService.js +1 -1
- package/www/dist/frontend/services/IobrokerWebuiConfigButtonProvider.js +1 -1
- package/www/dist/frontend/services/IobrokerWebuiCopyPasteService.js +1 -1
- package/www/dist/frontend/services/IobrokerWebuiCustomControlEventsService.js +1 -1
- package/www/dist/frontend/services/IobrokerWebuiCustomElementContextMenu.js +1 -1
- package/www/dist/frontend/services/IobrokerWebuiDemoProviderService.js +1 -1
- package/www/dist/frontend/services/IobrokerWebuiDynamicPropertiesService.js +1 -1
- package/www/dist/frontend/services/IobrokerWebuiEventsService.js +1 -1
- package/www/dist/frontend/services/IobrokerWebuiExternalDragDropService.js +1 -1
- package/www/dist/frontend/services/IobrokerWebuiLitPropertiesService.js +1 -1
- package/www/dist/frontend/services/IobrokerWebuiPropertiesService.js +1 -1
- package/www/dist/frontend/services/IobrokerWebuiPropertyGroupsService.js +1 -1
- package/www/dist/frontend/services/IobrokerWebuiRefactorService.js +1 -1
- package/www/dist/frontend/services/IobrokerWebuiScreenContextMenu.js +1 -1
- package/www/dist/frontend/services/IobrokerWebuiSpecialPropertiesService.js +1 -1
- package/www/dist/frontend/services/IobrokerWebuiSpectrumEditorService.js +1 -1
- package/www/dist/frontend/services/IobrokerWebuiVisibilityPropertiesService.js +1 -1
- package/www/dist/frontend/services/LayoutComponentsPropertiesService.js +1 -1
- package/www/dist/frontend/widgets/OrthoFlowLineTool.js +1 -1
- package/www/dist/frontend/widgets/customElementsObserver.js +1 -1
- package/www/dist/frontend/widgets/importWidgetFiles.js +1 -1
- package/www/dist/frontend/widgets/importWidgetFilesRuntime.js +1 -1
- package/www/dist/frontend/widgets/layout-components.js +1 -1
- package/www/dist/frontend/widgets/layout-placement-services.js +1 -1
- package/www/dist/frontend/widgets/testElement.js +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const bN=b;(function(c,d){const bJ=b,e=c();while(!![]){try{const f=parseInt(bJ(0x127))/0x1*(-parseInt(bJ(0x1d2))/0x2)+-parseInt(bJ(0x1ca))/0x3+-parseInt(bJ(0x165))/0x4+-parseInt(bJ(0x16a))/0x5*(parseInt(bJ(0x1be))/0x6)+parseInt(bJ(0x1a2))/0x7*(-parseInt(bJ(0x176))/0x8)+-parseInt(bJ(0x1c9))/0x9*(parseInt(bJ(0x130))/0xa)+parseInt(bJ(0x1a3))/0xb;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x5409f));import{BaseCustomWebComponentConstructorAppend,css,html}from'@gokturk413/base-custom-webcomponent';import{iobrokerHandler}from'../common/IobrokerHandler.js';const CSS3D_SCALE_RT=0.01;function b(c,d){c=c-0x125;const e=a();let f=e[c];return f;}function a(){const cA=['uuid','setFromObject','<span\x20style=\x22color:#e6ecf2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;\x22>','stateId','aspect','<span\x20style=\x22color:#8aa0b6;font-size:10px;\x22>','push','padding:8px\x2010px;pointer-events:none;backdrop-filter:blur(2px);','updateMatrixWorld','Scene','appendChild','toneMapping','update','Vector3','</span>','</span></div>','saved','left','_onResize','setAttribute','environment','name','getState','_popupTarget','iobroker-webui-3dscreen-viewer','setPixelRatio','_css3dRenderer','isPerspectiveCamera','enabled','dispose','add','cursor','matrixWorld','THREE','border-box','max','background:rgba(30,38,52,0.92);border:1px\x20solid\x20#3a4a5a;border-radius:20px;padding:4px\x206px\x204px\x2012px;','split','onFrame','3dscreen','entries','3729607RrmnUk','33080531ogyywv','width','height','lerpVectors','pointermove','onchange','clientY','background:rgba(30,38,52,0.96);border:1px\x20solid\x20#3a4a5a;border-radius:8px;padding:10px;','<div\x20style=\x22font-weight:700;margin-bottom:6px;\x22>Search\x20Settings</div>','Click:\x20recall\x20view\x20·\x20Hold:\x20save\x20current\x20view','userData','fov','decompose','clientHeight','isMesh','three/addons/helpers/ViewHelper.js','<div\x20style=\x22font-weight:700;color:#ffb060;\x22>','dur','checkbox','none','_popup','quaternion','click','location','3D\x20Viewer\x20error:','tan','offsetWidth','6kexpXc','flex:1;background:transparent;border:none;outline:none;color:#e6ecf2;font-size:12px;','camera','min','NeutralToneMapping','active','Ortho','search\x20overlay\x20error:','auto','val','GridHelper','9TLmpIo','1957953mpBgWO','getGlobalObject','needsUpdate','has','</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20style=\x22color:#fff;font-variant-numeric:tabular-nums;\x22>','right','input','hash','2026KOxsLy','onClick','All\x20Objects','cssText','material','PerspectiveCamera','shadow','background','position','onPointerEnter','SRGBColorSpace','render','[3D]','createElement','clientWidth','querySelectorAll','three/addons/environments/RoomEnvironment.js','style','global','updateProjectionMatrix','embeddedAttrs','animating','setHex','_getDomElement','embeddedType','getWebuiObject','traverse','viewport','type','getAttribute','warn','far','scale','emissive','isEmpty','setFromCamera','HOME','camButtons','includes','props','offsetHeight','button','getHex','textContent','clientX','_init','return\x20(','forEach','fromArray','Quaternion','HemisphereLight','_camTween','embeddedTag','<div\x20style=\x22color:#8aa0b6;font-size:11px;margin-bottom:2px;\x22>','parse','script','DirectionalLight','get3DScreen','shadowMap','addEventListener','toLowerCase','set','delete','box-shadow:0\x206px\x2018px\x20rgba(0,0,0,0.5);font-family:Segoe\x20UI,Arial,sans-serif;','101Iaffrv','project','signal','autoClear','_updatePopup','classList','isCamera','length','children','4129030WfHTNx','position:absolute;bottom:12px;left:12px;z-index:35;display:flex;align-items:center;gap:6px;','three/addons/renderers/CSS3DRenderer.js','clear','map','display:flex;align-items:center;gap:8px;padding:4px\x202px;cursor:pointer;','pointerleave','div','cssObject','keys','visible','copy','threeScene','domElement','formula','npm','pointerup','near','Object','color','getCenter','isOrthographicCamera','shadows','anchor','display','../runtime/CustomControls.js','placeholder','subscribeState','toneMappingExposure','object','controls','boolean','isPoints','top','webui3dcam:','_animating','screen','setSize','container','getItem','block','target','true','assets','embeddedControl','Persp','trim','from','onSelect','parent','navigate','resize','error','1543604tCaaFT','remove','clone','scene','replace','2882645gYTuee','_renderer','</div>','enableDamping','value','bindings','innerHTML','texture','camLabel','3D\x20scene\x20not\x20found:','three','emissiveIntensity','8EdJROJ','background:#2c3748;color:#cfe;border:none;border-radius:14px;width:26px;height:24px;cursor:pointer;font-size:14px;','Meshes'];a=function(){return cA;};return a();}export class IobrokerWebui3DScreenViewer extends BaseCustomWebComponentConstructorAppend{static ['template']=html`
|
|
2
2
|
<div id="container" style="width:100%;height:100%;position:relative;overflow:hidden;background:linear-gradient(#f0f9ff 0%,#cbebff 47%,#a1dbff 100%);">
|
|
3
3
|
<div id="viewport" style="width:100%;height:100%;"></div>
|
|
4
4
|
|
|
@@ -25,4 +25,4 @@ const cy=b;function b(c,d){c=c-0x1b2;const e=a();let f=e[c];return f;}function a
|
|
|
25
25
|
#camButtons button:hover { background:rgba(80,80,80,0.9);color:#fff; }
|
|
26
26
|
#camButtons button.active { background:rgba(0,120,200,0.85);border-color:#1177bb;color:#fff; }
|
|
27
27
|
#camButtons button.saved { border-color:#3cba54;color:#9fe6ad; }
|
|
28
|
-
`;constructor(){const bK=b;super(),this[bK(0x265)]=![],this['_renderer']=null;}async['connectedCallback'](){const bL=b,c=this[bL(0x26a)](bL(0x1e4)),d=this[bL(0x26a)](bL(0x267))||'3dscreen',e=this[bL(0x26a)]('scene-scope')||null;if(!c)return;await this[bL(0x1ec)](c,d,e);}['disconnectedCallback'](){const bM=b;this['_animating']=![];this[bM(0x239)]&&(this[bM(0x239)](),this[bM(0x239)]=null);this['_renderer']&&(this['_renderer']['dispose'](),this['_renderer']['domElement']['remove'](),this[bM(0x266)]=null);if(this[bM(0x26c)]){try{this[bM(0x26c)][bM(0x235)][bM(0x20d)]();}catch(c){}this['_css3dRenderer']=null;}window['removeEventListener']('resize',this[bM(0x288)]);}async['_init'](d,f,g){const bN=b;try{const j=await import('three'),{OrbitControls:l}=await import('three/addons/controls/OrbitControls.js'),m=f==='3dcontrol'?g==='global'?await iobrokerHandler['getGlobalObject'](bN(0x1f1),d):await iobrokerHandler['getWebuiObject'](bN(0x1f1),d):await iobrokerHandler[bN(0x248)](d);if(!m){console['warn']('3D\x20scene\x20not\x20found:',d);return;}const n=this[bN(0x230)](bN(0x1fe)),o=n[bN(0x206)]||0x320,p=n[bN(0x231)]||0x258,q=new j['WebGLRenderer']({'antialias':!![],'alpha':!![]});q['setPixelRatio'](window[bN(0x214)]),q[bN(0x1fa)](o,p),q[bN(0x24f)][bN(0x1b6)]=!![],q[bN(0x24f)]['type']=j[bN(0x1bc)],q[bN(0x1cf)]=j['SRGBColorSpace'],q['toneMapping']=j['NeutralToneMapping'],q['toneMappingExposure']=0x1,q['autoClear']=![],n[bN(0x221)](q[bN(0x235)]),this['_renderer']=q;let r,s;if(m['threeScene']&&m['threeScene'][bN(0x215)]){const ak=new j[(bN(0x1f3))]();r=ak[bN(0x1d7)](m['threeScene'][bN(0x215)]);if(m['threeScene'][bN(0x217)])try{s=ak[bN(0x1d7)](m['threeScene']['camera']);}catch(am){}(!s||!s[bN(0x282)])&&(s=new j[(bN(0x1b5))](0x32,o/p,0.1,0x2710),s['position'][bN(0x204)](0x0,0x0,0x32));const al=m['threeScene'][bN(0x22b)]||{};if(al['shadows']!==undefined)q['shadowMap'][bN(0x1b6)]=al['shadows'];if(al['toneMapping']!==undefined)q[bN(0x1fb)]=parseFloat(al[bN(0x1fb)]);if(al['toneMappingExposure']!==undefined)q[bN(0x25c)]=al[bN(0x25c)];}else{r=new j['Scene'](),s=new j['PerspectiveCamera'](0x4b,o/p,0.1,0x3e8),s['position'][bN(0x204)](0xa,0xa,0xa);if(m[bN(0x208)]){const {GLTFLoader:an}=await import(bN(0x207)),ao=new an();for(const ap of m[bN(0x208)]){ap[bN(0x1ca)]===bN(0x1dd)&&ap['glbPath']&&await new Promise(aq=>ao[bN(0x28a)](ap[bN(0x26b)],ar=>{const bO=bN,as=ar[bO(0x215)];if(ap[bO(0x22f)])as[bO(0x22f)][bO(0x204)](ap['position']['x'],ap[bO(0x22f)]['y'],ap['position']['z']);if(ap[bO(0x1cb)])as[bO(0x1cb)][bO(0x204)](ap[bO(0x1cb)]['x'],ap['scale']['y'],ap['scale']['z']);r[bO(0x1e7)](as),aq();},undefined,aq));}}}r['background']&&r[bN(0x27c)][bN(0x23d)]&&r[bN(0x27c)]['r']===0x0&&r['background']['g']===0x0&&r[bN(0x27c)]['b']===0x0&&(r['background']=null);if(!r[bN(0x289)])try{const {RoomEnvironment:aq}=await import('three/addons/environments/RoomEnvironment.js'),ar=new j[(bN(0x1ea))](q);ar[bN(0x242)](),r[bN(0x289)]=ar[bN(0x283)](new aq(),0.04)[bN(0x1cc)],ar[bN(0x1d8)]();}catch(as){}const t=[];r[bN(0x1ef)](at=>{const bP=bN;if(at['isLight'])t[bP(0x1f8)](at);});if(t['length']===0x0){const at=new j['HemisphereLight'](0xb0d4ff,0x404040,0.9);at['position'][bN(0x204)](0x0,0x14,0x0),r[bN(0x1e7)](at);const au=new j['DirectionalLight'](0xffffff,1.4);au['position']['set'](0x5,0xa,7.5),au['castShadow']=!![],au[bN(0x27b)]['mapSize']['set'](0x400,0x400),au[bN(0x27b)]['camera']['near']=0.5,au['shadow'][bN(0x217)][bN(0x1c3)]=0x1f4,r[bN(0x1e7)](au);const av=new j['DirectionalLight'](0xffffff,0.3);av[bN(0x22f)]['set'](-0x5,0x3,-0x5),r['add'](av);}s[bN(0x244)]=o/p,s['updateProjectionMatrix']();const u=new l(s,q['domElement']);u[bN(0x1fc)]=!![];{const aw=new j[(bN(0x220))]();r['traverse'](ax=>{const bQ=bN;if(ax[bQ(0x224)]||ax['isPoints']||ax['isLine'])aw['expandByObject'](ax);});if(!aw['isEmpty']()){const ax=new j['Vector3'](),ay=new j['Vector3']();aw[bN(0x1ce)](ax),aw[bN(0x21c)](ay);const az=Math['max'](ay['x'],ay['y'],ay['z']),aA=az/(0x2*Math[bN(0x1c6)](s['fov']*Math['PI']/0xb4/0x2))*1.5;s['position']['set'](ax['x']+aA*0.6,ax['y']+aA*0.4,ax['z']+aA),s['near']=aA/0x64,s[bN(0x1c3)]=aA*0x64,s[bN(0x1c2)](),u['target'][bN(0x22e)](ax),u['update']();}}const v=this[bN(0x230)]('camLabel'),x=aB=>{const bR=bN;if(!v)return;v['textContent']=aB[bR(0x284)]?'Ortho':'Persp';};x(s);let y=s;const z=[];r[bN(0x1ef)](aB=>{const bS=bN;if(aB[bS(0x282)]&&aB!==s)z[bS(0x1f8)](aB);});const A=(aB,aC)=>{const bT=bN;y=aB,y[bT(0x244)]=n[bT(0x206)]/n[bT(0x231)],y[bT(0x1c2)]?.(),u['object']=y,u['update'](),x(y),this[bT(0x230)](bT(0x250))?.[bT(0x205)](bT(0x26d))['forEach'](aD=>aD['classList']['remove'](bT(0x274)));if(aC)aC['classList']['add'](bT(0x274));},B=this['_getDomElement'](bN(0x250));if(B){const aB=document['createElement'](bN(0x26d));aB[bN(0x25f)]='HOME',aB[bN(0x236)]['add']('active'),aB['addEventListener']('click',()=>A(s,aB)),B['appendChild'](aB),z['forEach']((aG,aH)=>{const bU=bN,aI=document[bU(0x1d3)]('button');aI[bU(0x25f)]=aG[bU(0x21a)]||'CAM\x20'+(aH+0x1),aI['addEventListener'](bU(0x258),()=>A(aG,aI)),B['appendChild'](aI);});const aC=aG=>'webui3dcam:'+d+':'+aG,aD=aG=>{const bV=bN;try{return JSON[bV(0x1d7)](localStorage['getItem'](aC(aG)));}catch(aH){return null;}},aE=aG=>{const bW=bN;localStorage[bW(0x249)](aC(aG),JSON['stringify']({'p':y['position']['toArray'](),'t':u['target'][bW(0x26f)]()}));},aF=aG=>{const bX=bN,aH=aD(aG);if(!aH)return![];return this[bX(0x1fd)]={'fp':y['position']['clone'](),'tp':new j['Vector3']()[bX(0x27d)](aH['p']),'ft':u['target']['clone'](),'tt':new j['Vector3']()[bX(0x27d)](aH['t']),'t':0x0,'dur':0.6},!![];};for(let aG=0x1;aG<=0x3;aG++){const aH=document[bN(0x1d3)]('button');aH[bN(0x25f)]='C'+aG,aH['title']=bN(0x223);if(aD(aG))aH['classList']['add']('saved');let aI=null,aJ=![];const aK=aM=>{aM['preventDefault'](),aJ=![],aI=setTimeout(()=>{const bY=b;aJ=!![],aE(aG),aH[bY(0x236)]['add'](bY(0x1ba));const aN=aH[bY(0x25f)];aH['textContent']='✓',setTimeout(()=>{aH['textContent']=aN;},0x2bc);},0x226);},aL=()=>{aI&&(clearTimeout(aI),aI=null);};aH['addEventListener']('pointerdown',aK),aH['addEventListener'](bN(0x219),()=>{aL();if(!aJ)aF(aG);}),aH[bN(0x287)]('pointerleave',aL),B[bN(0x221)](aH);}}let C=null;try{const {ViewHelper:aM}=await import(bN(0x200));C=new aM(y,q[bN(0x235)]),C[bN(0x1f9)]=u[bN(0x251)],C[bN(0x232)][bN(0x211)]=0x8,C['location'][bN(0x20a)]=0x8,C[bN(0x232)][bN(0x259)]=null,C['location'][bN(0x25d)]=null,q['domElement'][bN(0x287)]('pointerup',aN=>{const bZ=bN;if(C[bZ(0x1e2)])C[bZ(0x1d1)](aN);});}catch(aN){}const D=[],E=[],F=aO=>D[bN(0x1f8)](aO),G=aO=>{},H=(...aO)=>console[bN(0x28e)](bN(0x1e1),...aO),I=(aO,aP)=>{const c0=bN;try{iobrokerHandler[c0(0x1c0)](aO,aP);}catch(aQ){}},J=async aO=>{const c1=bN;try{return await iobrokerHandler[c1(0x278)](aO);}catch(aP){return null;}},K=(aO,aP)=>{const c2=bN;try{const aQ=iobrokerHandler[c2(0x254)](aO,aP);return E['push'](aQ),aQ;}catch(aR){return()=>{};}},L=new Map(),M=new Map();let N=null,O=null;const P=[],Q={},R=new j['Vector3'](),S=new j['Quaternion'](),T=new j[(bN(0x203))](),U=(aO,aP,aQ)=>{const c3=bN;if(!aO)return;if(aP===c3(0x24e)||aP==='height'){aO['style'][aP]=(parseFloat(aQ)||0x0)+'px';return;}if(aP==='textContent'){aO[c3(0x25f)]=aQ??'';return;}if(aP===c3(0x1b2)){aO['innerHTML']=aQ??'';return;}const aR=aP['replace'](/[A-Z]/g,aS=>'-'+aS['toLowerCase']());if(typeof aQ===c3(0x27f)){try{aO[aP]=aQ;}catch(aS){}try{if(aQ)aO['setAttribute'](aR,'');else aO['removeAttribute'](aR);}catch(aT){}return;}try{aO[aP]=aQ;}catch(aU){}try{if(aQ!==null&&aQ!==undefined&&typeof aQ!==c3(0x216))aO[c3(0x247)](aR,aQ);}catch(aV){}};try{const aO=[];r[bN(0x1ef)](aP=>{const c4=bN,aQ=aP[c4(0x20e)]?.['embeddedType'];if(aP['isMesh']&&(aQ===c4(0x24b)||aQ===c4(0x1e8)))aO['push'](aP);});if(aO['length']){const {CSS3DRenderer:aP,CSS3DObject:aQ}=await import(bN(0x260));let aR=null;try{({generateCustomControl:aR}=await import('../runtime/CustomControls.js'));}catch(aS){}O=new j['Scene'](),N=new aP(),N['setSize'](o,p),N['domElement'][bN(0x25a)]['cssText']='position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;overflow:hidden;',this[bN(0x230)]('container')[bN(0x221)](N[bN(0x235)]),this['_css3dRenderer']=N;for(const aT of aO){aT[bN(0x1ee)]&&(aT['material']['transparent']=!![],aT['material'][bN(0x271)]=0x0,aT['material'][bN(0x238)]=![]);const aU=aT['userData']['embeddedTag'],aV=aT['userData'][bN(0x225)]||0x12c,aW=aT['userData'][bN(0x23e)]||0xc8;if(aT[bN(0x20e)]['embeddedType']==='control'&&aR)try{const b0=await iobrokerHandler[bN(0x1e3)]('control',aT[bN(0x20e)][bN(0x222)]);if(b0)aR(aT['userData']['embeddedControl'],b0);}catch(b1){}let aX;try{aX=document[bN(0x1d3)](aU);}catch(b2){aX=document['createElement']('div');}aX[bN(0x25a)]['width']=aV+'px',aX['style']['height']=aW+'px',aX['style'][bN(0x1f4)]='border-box',aX['style'][bN(0x1e5)]='auto';if(aT[bN(0x20e)][bN(0x23f)])for(const b3 in aT[bN(0x20e)]['embeddedAttrs']){try{aX['setAttribute'](b3,aT['userData'][bN(0x23f)][b3]);}catch(b4){}}const aY=aT['userData'][bN(0x240)]||{};for(const b5 in aY)U(aX,b5,aY[b5]);const aZ=new aQ(aX);O[bN(0x1e7)](aZ),P[bN(0x1f8)]({'anchor':aT,'cssObject':aZ}),Q[aT['uuid']]=aX;}}}catch(b6){console[bN(0x262)](bN(0x20b),b6);}const V={};if(m[bN(0x276)]&&Object['keys'](m[bN(0x276)])[bN(0x1bf)]>0x0){const b7={};r[bN(0x1ef)](ba=>{b7[ba['uuid']]=ba;});const b8=(ba,bb,bc)=>{const c5=bN;try{V[ba[c5(0x245)]+'|'+bb]=bc;const bd=Q[ba[c5(0x245)]];if(bd&&!bb['includes']('.')&&bb!==c5(0x1d4)){U(bd,bb,bc);return;}const be=bb['split']('.');if(be['length']===0x2){const [bf,bg]=be;if(ba[bf]==null)return;if(bf===c5(0x227))ba[bf][bg]=parseFloat(bc)*b9;else{if(bf==='material'&&bg===c5(0x1c1)){ba[bf]?.['color']?.[c5(0x204)]?.(bc);if(ba[bf])ba[bf][c5(0x1f2)]=!![];}else bf===c5(0x1ee)?ba[bf]!=null&&(ba[bf][bg]=parseFloat(bc),ba[bf][c5(0x1f2)]=!![]):ba[bf][bg]=parseFloat(bc);}ba[c5(0x1de)]?.(!![]);}else{if(be[c5(0x1bf)]===0x1){if(bb===c5(0x1d4))ba['visible']=!!bc;}}}catch(bh){}},b9=Math['PI']/0xb4;for(const [ba,bb]of Object['entries'](m[bN(0x276)])){const bc=b7[ba];if(!bc)continue;for(const [bd,be]of Object[bN(0x1bd)](bb)){if(!be?.['signal'])continue;((async()=>{const c6=bN;try{const bg=await iobrokerHandler['getState'](be['signal']);if(bg?.[c6(0x28b)]!=null){const bh=be[c6(0x201)]&&be[c6(0x201)]!=='val'?new Function(c6(0x28b),c6(0x1dc)+be['formula']+')')(bg[c6(0x28b)]):bg[c6(0x28b)];b8(bc,bd,bh);}}catch(bi){}const bf=K(be['signal'],(bj,bk)=>{const c7=c6;if(bk?.[c7(0x28b)]==null)return;const bl=be['formula']&&be['formula']!=='val'?new Function(c7(0x28b),'return\x20('+be[c7(0x201)]+')')(bk['val']):bk[c7(0x28b)];b8(bc,bd,bl);});E[c6(0x1f8)](bf);})());}}}const W=new j[(bN(0x268))](),X=new j['Vector2'](),Y=new Map();let Z=null,a0=null;const a1=new j[(bN(0x203))](),a2=document['createElement']('div');a2['style']['cssText']=bN(0x286)+bN(0x1bb)+bN(0x1d0)+bN(0x1f7),this['_getDomElement']('container')[bN(0x221)](a2);const a3=bf=>bf&&bf['parent']===r&&!bf[bN(0x21f)]&&!bf['isCamera']&&bf['type']!=='GridHelper'&&bf['name']!==bN(0x213),a4=bf=>{const c8=bN;let bg=bf;while(bg&&bg['parent']&&bg['parent']!==r)bg=bg[c8(0x1e6)];return bg&&bg['parent']===r?bg:bf;},a5=bf=>{const c9=bN,bg=[];return bf[c9(0x1ef)](bh=>{const ca=c9;if(bh['isMesh'])bg[ca(0x1f8)](bh);}),bg;},a6=(bf,bg)=>{const cb=bN;for(const bh of a5(bf)){const bi=bh['material'];if(!bi||!bi['emissive'])continue;if(!Y[cb(0x28f)](bh))Y['set'](bh,{'c':bi['emissive']['getHex'](),'i':bi['emissiveIntensity']??0x1});bi['emissive']['setHex'](bg),bi[cb(0x1c4)]=0.6,bi[cb(0x1f2)]=!![];}},a7=bf=>{const cc=bN;for(const bg of a5(bf)){const bh=Y[cc(0x269)](bg);bh&&bg[cc(0x1ee)]?.['emissive']&&(bg['material']['emissive']['setHex'](bh['c']),bg[cc(0x1ee)][cc(0x1c4)]=bh['i'],bg[cc(0x1ee)][cc(0x1f2)]=!![]),Y[cc(0x1b7)](bg);}},a8=(bf,bg)=>{const cd=bN,bh=m[cd(0x23a)]?.[bf?.['uuid']]?.[bg];if(!bh||bh['type']==='none')return;try{if(bh[cd(0x1ca)]===cd(0x1c0)&&bh['stateId']){let bi=bh[cd(0x233)];if(bi===cd(0x24c))bi=!![];else{if(bi==='false')bi=![];else{if(bi!==''&&bi!=null&&!isNaN(Number(bi)))bi=Number(bi);}}iobrokerHandler['setState'](bh['stateId'],bi);}else{if(bh['type']==='navigate'&&bh['screen'])window['location'][cd(0x256)]=cd(0x1f6)+encodeURIComponent('/'+bh['screen'][cd(0x253)](/^\//,''));else bh['type']==='script'&&bh[cd(0x1ff)]&&new Function('object',cd(0x215),'THREE',cd(0x28d),bh[cd(0x1ff)])(bf,r,j,iobrokerHandler);}}catch(bj){console[cd(0x262)]('3D\x20event\x20error',bj);}},a9=bf=>{const ce=bN;if(bf===Z)return;if(Z){if(Z!==a0)a7(Z);a8(Z,'onPointerLeave');}Z=bf;if(Z){if(Z!==a0)a6(Z,0x66aaff);a8(Z,ce(0x290));}},aa=bf=>{if(a0)a7(a0);a0=bf;if(a0)a6(a0,0xff8800);},ab=bf=>{const cf=bN,bg=bf['name']||bf['userData']?.['embeddedControl']||cf(0x1db),bh=bf['userData']?.[cf(0x202)]||bf['type']||'';let bi='';const bj=new Set();bf[cf(0x1ef)](bk=>bj[cf(0x1e7)](bk['uuid']));for(const [bk,bl]of Object['entries'](m['bindings']||{})){if(!bj[cf(0x28f)](bk))continue;for(const bm of Object[cf(0x1d2)](bl)){const bn=V[bk+'|'+bm];bi+='<div\x20style=\x22display:flex;justify-content:space-between;gap:12px;margin-top:3px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20style=\x22color:#9fb3c8;\x22>'+bm+'</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20style=\x22color:#fff;font-variant-numeric:tabular-nums;\x22>'+(bn!=null?bn:'—')+'</span></div>';}}a2[cf(0x1b2)]='<div\x20style=\x22font-weight:700;color:#ffb060;\x22>'+bg+cf(0x270)+(bh?'<div\x20style=\x22color:#8aa0b6;font-size:11px;margin-bottom:2px;\x22>'+bh+cf(0x270):'')+bi;},ac=bf=>{const cg=bN;this['_popupTarget']=bf,ab(bf),a2['style']['display']=cg(0x28c);},ad=()=>{const ch=bN;this[ch(0x22c)]=null,a2['style']['display']=ch(0x243);};this['_popup']=a2;const ae=bf=>{const ci=bN,bg=q['domElement'][ci(0x261)]();X['x']=(bf[ci(0x1da)]-bg['left'])/bg[ci(0x24e)]*0x2-0x1,X['y']=-((bf['clientY']-bg[ci(0x211)])/bg['height'])*0x2+0x1,W[ci(0x27a)](X,y);const bh=W['intersectObjects'](r[ci(0x1e9)],!![]);for(const bi of bh){const bj=a4(bi['object']);if(a3(bj))return bj;}return null;};let af=0x0,ag=0x0;q[bN(0x235)]['addEventListener'](bN(0x279),bf=>{const cj=bN;af=bf['clientX'],ag=bf[cj(0x27e)];}),q[bN(0x235)][bN(0x287)](bN(0x21d),bf=>{const ck=bN,bg=ae(bf);a9(bg),q[ck(0x235)][ck(0x25a)][ck(0x1d6)]=bg?'pointer':'';if(bg)ac(bg);else{if(!a0)ad();else ac(a0);}}),q['domElement'][bN(0x287)]('click',bf=>{const cl=bN;if(Math['abs'](bf['clientX']-af)>0x4||Math[cl(0x1d9)](bf[cl(0x27e)]-ag)>0x4)return;const bg=ae(bf);aa(bg);if(bg)ac(bg),a8(bg,'onClick');else ad();}),this[bN(0x281)]=()=>{const cm=bN;if(!this[cm(0x22c)])return;ah??=new j[(cm(0x220))](),ah[cm(0x21b)](this['_popupTarget']);if(ah[cm(0x1d5)]())return;ah[cm(0x1ce)](a1),a1[cm(0x22b)](y);const bf=this[cm(0x230)]('container')[cm(0x261)](),bg=(a1['x']*0.5+0.5)*bf[cm(0x24e)],bh=(-a1['y']*0.5+0.5)*bf['height'];a2['style'][cm(0x259)]=Math[cm(0x21e)](0x4,Math['min'](bg+0xc,bf['width']-a2['offsetWidth']-0x4))+'px',a2['style']['top']=Math['max'](0x4,Math['min'](bh+0xc,bf[cm(0x1b8)]-a2['offsetHeight']-0x4))+'px',ab(this[cm(0x22c)]);};let ah=null;try{const bf=[];r[bN(0x1ef)](bx=>{const cn=bN;if(bx['name']&&!bx[cn(0x1cd)])bf['push'](bx);});const bg=bx=>bx[bN(0x20e)]?.['embeddedType']?bN(0x1f5):bx['isLight']?'Lights':bx[bN(0x282)]?'Cameras':bx[bN(0x224)]?'Meshes':'Groups',bh=['All\x20Objects',...Array['from'](new Set(bf[bN(0x20f)](bg)))],bi=new Set(bh);let bj=![];const bk=this[bN(0x230)]('container'),bl=document[bN(0x1d3)]('div');bl[bN(0x25a)][bN(0x246)]='position:absolute;bottom:12px;left:12px;z-index:35;display:flex;align-items:center;gap:6px;'+bN(0x24d)+'width:300px;box-shadow:0\x204px\x2014px\x20rgba(0,0,0,0.4);font-family:Segoe\x20UI,Arial,sans-serif;';const bm=document[bN(0x1d3)]('input');bm[bN(0x1ca)]=bN(0x1c8),bm[bN(0x1eb)]='Search\x20drives,\x20sensors,\x20objects…',bm['style'][bN(0x246)]='flex:1;background:transparent;border:none;outline:none;color:#e6ecf2;font-size:12px;';const bn=document[bN(0x1d3)]('button');bn[bN(0x25f)]='⋯',bn[bN(0x241)]=bN(0x1ed),bn[bN(0x25a)][bN(0x246)]=bN(0x228),bl['appendChild'](bm),bl['appendChild'](bn),bk['appendChild'](bl);const bo=document['createElement']('div');bo[bN(0x25a)]['cssText']='position:absolute;bottom:48px;left:12px;z-index:35;width:300px;max-height:240px;overflow-y:auto;'+'background:rgba(30,38,52,0.96);border:1px\x20solid\x20#3a4a5a;border-radius:8px;display:none;'+bN(0x1c9),bk['appendChild'](bo);const bp=document['createElement']('div');bp[bN(0x25a)]['cssText']='position:absolute;bottom:48px;left:320px;z-index:36;width:200px;display:none;'+'background:rgba(30,38,52,0.96);border:1px\x20solid\x20#3a4a5a;border-radius:8px;padding:10px;'+bN(0x25e);const bq=(bx,by,bz)=>{const co=bN,bA=document[co(0x1d3)]('label');bA['style']['cssText']='display:flex;align-items:center;gap:8px;padding:4px\x202px;cursor:pointer;';const bB=document['createElement']('input');bB['type']='checkbox',bB['checked']=by,bB[co(0x237)]=()=>bz(bB['checked']);const bC=document['createElement'](co(0x1be));return bC[co(0x25f)]=bx,bA[co(0x221)](bB),bA[co(0x221)](bC),bA;};bp[bN(0x1b2)]=bN(0x273),bp[bN(0x221)](bq(bN(0x277),![],bx=>{const cp=bN;bj=bx,bw(bm[cp(0x233)]);}));const br=document[bN(0x1d3)]('div');br[bN(0x25f)]='Include:',br['style']['cssText']='color:#8aa0b6;margin:6px\x200\x202px;',bp['appendChild'](br);for(const bx of bh){bp[bN(0x221)](bq(bx,!![],by=>{const cq=bN;if(by)bi['add'](bx);else bi['delete'](bx);if(bx===cq(0x1df)&&by){for(const bz of bh)bi['add'](bx===bz?bx:bz);}bw(bm['value']);}));}bk[bN(0x221)](bp),bn['onclick']=()=>{const cr=bN;bp[cr(0x25a)][cr(0x1b9)]=bp[cr(0x25a)][cr(0x1b9)]==='none'?'block':'none';};const bs=new Set(),bt=()=>{for(const by of bs)if(by!==a0&&by!==Z)a7(by);bs['clear']();},bu=by=>{const cs=bN,bz=new j[(cs(0x220))]()['setFromObject'](by);if(bz[cs(0x1d5)]())return;const bA=bz[cs(0x1ce)](new j['Vector3']()),bB=bz[cs(0x21c)](new j['Vector3']()),bC=Math['max'](bB['x'],bB['y'],bB['z'])||0x1,bD=bC/(0x2*Math[cs(0x1c6)](y['fov']*Math['PI']/0xb4/0x2))*1.8;u[cs(0x251)][cs(0x22e)](bA),y[cs(0x22f)]['set'](bA['x']+bD*0.5,bA['y']+bD*0.4,bA['z']+bD),y['updateProjectionMatrix']?.(),u[cs(0x23c)]();},bv=by=>bi[bN(0x28f)](bN(0x1df))||bi[bN(0x28f)](bg(by));function bw(by){const ct=bN;by=(by||'')['trim']()[ct(0x1c7)](),bt(),bo[ct(0x1b2)]='';if(!by){bo['style']['display']='none';return;}const bz=bf[ct(0x291)](bA=>bA['name'][ct(0x1c7)]()['includes'](by)&&bv(bA))['slice'](0x0,0x32);if(!bz[ct(0x1bf)]){bo['style']['display']=ct(0x243);return;}for(const bA of bz){const bB=a4(bA);bj&&(a6(bB,0x44dd66),bs[ct(0x1e7)](bB));const bC=document['createElement']('div');bC['style']['cssText']='padding:6px\x2010px;cursor:pointer;display:flex;justify-content:space-between;gap:10px;border-bottom:1px\x20solid\x20#2a3442;',bC[ct(0x1b2)]='<span\x20style=\x22color:#e6ecf2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;\x22>'+bA['name']+ct(0x1b4)+('<span\x20style=\x22color:#8aa0b6;font-size:10px;\x22>'+bg(bA)+'</span>'),bC[ct(0x275)]=()=>bC[ct(0x25a)]['background']='#3a6ea8',bC['onmouseleave']=()=>bC['style']['background']='',bC['onclick']=()=>{const cu=ct;aa(bB),ac(bB),bu(bA),bo['style']['display']=cu(0x243);},bo[ct(0x221)](bC);}bo[ct(0x25a)][ct(0x1b9)]='block';}bm['addEventListener']('input',()=>bw(bm[bN(0x233)])),bm[bN(0x287)]('focus',()=>{const cv=bN;if(bm[cv(0x233)])bw(bm['value']);});}catch(by){console['warn']('search\x20overlay\x20error:',by);}if(m[bN(0x1ff)])try{const bz=new Function('THREE','scene',bN(0x217),bN(0x272),'controls','onFrame',bN(0x285),bN(0x1c0),'getState','subscribe',bN(0x208),bN(0x264),bN(0x28e),m['script']);bz(j,r,y,q,u,F,G,I,J,K,L,M,H);}catch(bA){console[bN(0x262)]('3D\x20scene\x20script\x20error:',bA);}this[bN(0x265)]=!![],this[bN(0x239)]=()=>{E['forEach'](bB=>{try{bB();}catch(bC){}});},this['_onResize']=()=>{const cw=bN,bB=n[cw(0x206)],bC=n['clientHeight'];y[cw(0x263)]&&(y[cw(0x244)]=bB/bC,y['updateProjectionMatrix']());q['setSize'](bB,bC);if(N)N['setSize'](bB,bC);if(C)C['camera']=y;},window['addEventListener'](bN(0x23b),this[bN(0x288)]);let ai=0x0;const aj=bB=>{const cx=bN;if(!this['_animating'])return;requestAnimationFrame(aj);const bC=ai?(bB-ai)/0x3e8:0x0;ai=bB;if(this[cx(0x1fd)]){const bD=this[cx(0x1fd)];bD['t']+=bC/bD['dur'];const bE=Math[cx(0x24a)](0x1,bD['t']),bF=bE<0.5?0x2*bE*bE:0x1-Math['pow'](-0x2*bE+0x2,0x2)/0x2;y['position']['lerpVectors'](bD['fp'],bD['tp'],bF),u[cx(0x251)]['lerpVectors'](bD['ft'],bD['tt'],bF);if(bE>=0x1)this['_camTween']=null;}u[cx(0x216)]=y,u[cx(0x23c)](bC);for(const bG of D){try{bG(bC,bB/0x3e8);}catch(bH){}}q[cx(0x212)](),q['render'](r,y);if(N){for(const bI of P){bI[cx(0x26e)][cx(0x252)](!![],![]),bI[cx(0x26e)][cx(0x1e0)]['decompose'](R,S,T),bI['cssObject']['position'][cx(0x22e)](R),bI[cx(0x234)][cx(0x1f0)]['copy'](y[cx(0x1f0)]),bI[cx(0x234)]['scale'][cx(0x204)](T['x']*CSS3D_SCALE_RT,T['y']*CSS3D_SCALE_RT,T['z']*CSS3D_SCALE_RT),bI[cx(0x234)][cx(0x1d4)]=bI[cx(0x26e)][cx(0x1d4)];}N[cx(0x20c)](O,y);}if(this[cx(0x281)])this['_updatePopup']();if(C){C['camera']=y,C['center']=u['target'];if(C['animating'])C[cx(0x23c)](bC);q['autoClear']=![],C['render'](q),q[cx(0x1b3)]=![];}};aj(0x0);}catch(bB){console['error']('3D\x20Viewer\x20error:',bB);}}}customElements[cy(0x229)]('iobroker-webui-3dscreen-viewer',IobrokerWebui3DScreenViewer);
|
|
28
|
+
`;constructor(){const bK=b;super(),this['_animating']=![],this[bK(0x16b)]=null;}async['connectedCallback'](){const bL=b,c=this['getAttribute']('scene-name'),d=this['getAttribute']('scene-type')||bL(0x1a0),e=this[bL(0x1ef)]('scene-scope')||null;if(!c)return;await this[bL(0x1ff)](c,d,e);}['disconnectedCallback'](){const bM=b;this['_animating']=![];this['_cleanup']&&(this['_cleanup'](),this['_cleanup']=null);this['_renderer']&&(this['_renderer']['dispose'](),this[bM(0x16b)]['domElement'][bM(0x166)](),this[bM(0x16b)]=null);if(this['_css3dRenderer']){try{this[bM(0x193)]['domElement']['remove']();}catch(c){}this['_css3dRenderer']=null;}window['removeEventListener'](bM(0x163),this['_onResize']);}async[bN(0x1ff)](d,f,g){const bO=bN;try{const j=await import(bO(0x174)),{OrbitControls:l}=await import('three/addons/controls/OrbitControls.js'),m=f==='3dcontrol'?g===bO(0x1e4)?await iobrokerHandler[bO(0x1cb)]('3dcontrol',d):await iobrokerHandler[bO(0x1eb)]('3dcontrol',d):await iobrokerHandler[bO(0x20b)](d);if(!m){console['warn'](bO(0x173),d);return;}const n=this[bO(0x1e9)](bO(0x1ed)),o=n['clientWidth']||0x320,p=n['clientHeight']||0x258,q=new j['WebGLRenderer']({'antialias':!![],'alpha':!![]});q[bO(0x192)](window['devicePixelRatio']),q['setSize'](o,p),q[bO(0x20c)][bO(0x195)]=!![],q[bO(0x20c)][bO(0x1ee)]=j['PCFSoftShadowMap'],q['outputColorSpace']=j[bO(0x1dc)],q['toneMapping']=j[bO(0x1c2)],q['toneMappingExposure']=0x1,q[bO(0x12a)]=![],n['appendChild'](q['domElement']),this[bO(0x16b)]=q;let r,s;if(m[bO(0x13c)]&&m['threeScene']['scene']){const ak=new j['ObjectLoader']();r=ak['parse'](m['threeScene'][bO(0x168)]);if(m['threeScene'][bO(0x1c0)])try{s=ak[bO(0x208)](m['threeScene'][bO(0x1c0)]);}catch(am){}(!s||!s['isCamera'])&&(s=new j[(bO(0x1d7))](0x32,o/p,0.1,0x2710),s[bO(0x1da)]['set'](0x0,0x0,0x32));const al=m[bO(0x13c)]['project']||{};if(al[bO(0x146)]!==undefined)q['shadowMap'][bO(0x195)]=al['shadows'];if(al['toneMapping']!==undefined)q[bO(0x184)]=parseFloat(al['toneMapping']);if(al['toneMappingExposure']!==undefined)q[bO(0x14c)]=al[bO(0x14c)];}else{r=new j['Scene'](),s=new j['PerspectiveCamera'](0x4b,o/p,0.1,0x3e8),s[bO(0x1da)]['set'](0xa,0xa,0xa);if(m[bO(0x15b)]){const {GLTFLoader:an}=await import('three/addons/loaders/GLTFLoader.js'),ao=new an();for(const ap of m['assets']){ap['type']==='model'&&ap['glbPath']&&await new Promise(aq=>ao['load'](ap['glbPath'],ar=>{const bP=bO,as=ar[bP(0x168)];if(ap[bP(0x1da)])as['position']['set'](ap['position']['x'],ap['position']['y'],ap[bP(0x1da)]['z']);if(ap['scale'])as['scale']['set'](ap['scale']['x'],ap[bP(0x1f2)]['y'],ap[bP(0x1f2)]['z']);r['add'](as),aq();},undefined,aq));}}}r['background']&&r['background']['isColor']&&r['background']['r']===0x0&&r['background']['g']===0x0&&r['background']['b']===0x0&&(r['background']=null);if(!r['environment'])try{const {RoomEnvironment:aq}=await import(bO(0x1e2)),ar=new j['PMREMGenerator'](q);ar['compileEquirectangularShader'](),r[bO(0x18d)]=ar['fromScene'](new aq(),0.04)[bO(0x171)],ar[bO(0x196)]();}catch(as){}const t=[];r['traverse'](at=>{if(at['isLight'])t['push'](at);});if(t[bO(0x12e)]===0x0){const at=new j[(bO(0x204))](0xb0d4ff,0x404040,0.9);at[bO(0x1da)][bO(0x20f)](0x0,0x14,0x0),r['add'](at);const au=new j['DirectionalLight'](0xffffff,1.4);au[bO(0x1da)][bO(0x20f)](0x5,0xa,7.5),au['castShadow']=!![],au['shadow']['mapSize']['set'](0x400,0x400),au[bO(0x1d8)][bO(0x1c0)]['near']=0.5,au[bO(0x1d8)]['camera'][bO(0x1f1)]=0x1f4,r['add'](au);const av=new j[(bO(0x20a))](0xffffff,0.3);av['position']['set'](-0x5,0x3,-0x5),r['add'](av);}s[bO(0x17d)]=o/p,s[bO(0x1e5)]();const u=new l(s,q[bO(0x13d)]);u[bO(0x16d)]=!![];{const aw=new j['Box3']();r[bO(0x1ec)](ax=>{const bQ=bO;if(ax['isMesh']||ax[bQ(0x150)]||ax['isLine'])aw['expandByObject'](ax);});if(!aw[bO(0x1f4)]()){const ax=new j[(bO(0x186))](),ay=new j[(bO(0x186))]();aw['getCenter'](ax),aw['getSize'](ay);const az=Math[bO(0x19c)](ay['x'],ay['y'],ay['z']),aA=az/(0x2*Math['tan'](s[bO(0x1ae)]*Math['PI']/0xb4/0x2))*1.5;s['position']['set'](ax['x']+aA*0.6,ax['y']+aA*0.4,ax['z']+aA),s[bO(0x141)]=aA/0x64,s['far']=aA*0x64,s[bO(0x1e5)](),u['target'][bO(0x13b)](ax),u[bO(0x185)]();}}const v=this['_getDomElement'](bO(0x172)),x=aB=>{const bR=bO;if(!v)return;v[bR(0x1fd)]=aB[bR(0x145)]?bR(0x1c4):bR(0x15d);};x(s);let y=s;const z=[];r[bO(0x1ec)](aB=>{const bS=bO;if(aB['isCamera']&&aB!==s)z[bS(0x17f)](aB);});const A=(aB,aC)=>{const bT=bO;y=aB,y['aspect']=n['clientWidth']/n[bT(0x1b0)],y['updateProjectionMatrix']?.(),u['object']=y,u[bT(0x185)](),x(y),this[bT(0x1e9)](bT(0x1f7))?.[bT(0x1e1)](bT(0x1fb))['forEach'](aD=>aD[bT(0x12c)]['remove']('active'));if(aC)aC[bT(0x12c)]['add'](bT(0x1c3));},B=this[bO(0x1e9)]('camButtons');if(B){const aB=document['createElement'](bO(0x1fb));aB['textContent']=bO(0x1f6),aB[bO(0x12c)]['add'](bO(0x1c3)),aB['addEventListener']('click',()=>A(s,aB)),B['appendChild'](aB),z['forEach']((aG,aH)=>{const bU=bO,aI=document['createElement'](bU(0x1fb));aI['textContent']=aG['name']||'CAM\x20'+(aH+0x1),aI[bU(0x20d)]('click',()=>A(aG,aI)),B['appendChild'](aI);});const aC=aG=>bO(0x152)+d+':'+aG,aD=aG=>{const bV=bO;try{return JSON['parse'](localStorage[bV(0x157)](aC(aG)));}catch(aH){return null;}},aE=aG=>{const bW=bO;localStorage['setItem'](aC(aG),JSON['stringify']({'p':y[bW(0x1da)]['toArray'](),'t':u[bW(0x159)]['toArray']()}));},aF=aG=>{const bX=bO,aH=aD(aG);if(!aH)return![];return this[bX(0x205)]={'fp':y[bX(0x1da)]['clone'](),'tp':new j['Vector3']()[bX(0x202)](aH['p']),'ft':u[bX(0x159)][bX(0x167)](),'tt':new j['Vector3']()['fromArray'](aH['t']),'t':0x0,'dur':0.6},!![];};for(let aG=0x1;aG<=0x3;aG++){const aH=document[bO(0x1df)]('button');aH['textContent']='C'+aG,aH['title']=bO(0x1ac);if(aD(aG))aH['classList'][bO(0x197)]('saved');let aI=null,aJ=![];const aK=aM=>{aM['preventDefault'](),aJ=![],aI=setTimeout(()=>{const bY=b;aJ=!![],aE(aG),aH['classList']['add'](bY(0x189));const aN=aH['textContent'];aH['textContent']='✓',setTimeout(()=>{const bZ=bY;aH[bZ(0x1fd)]=aN;},0x2bc);},0x226);},aL=()=>{aI&&(clearTimeout(aI),aI=null);};aH[bO(0x20d)]('pointerdown',aK),aH['addEventListener'](bO(0x140),()=>{aL();if(!aJ)aF(aG);}),aH[bO(0x20d)](bO(0x136),aL),B[bO(0x183)](aH);}}let C=null;try{const {ViewHelper:aM}=await import(bO(0x1b2));C=new aM(y,q['domElement']),C['center']=u[bO(0x159)],C[bO(0x1ba)][bO(0x151)]=0x8,C[bO(0x1ba)][bO(0x1cf)]=0x8,C['location']['left']=null,C[bO(0x1ba)]['bottom']=null,q[bO(0x13d)]['addEventListener'](bO(0x140),aN=>{const c0=bO;if(C[c0(0x1e7)])C['handleClick'](aN);});}catch(aN){}const D=[],E=[],F=aO=>D['push'](aO),G=aO=>{},H=(...aO)=>console['log'](bO(0x1de),...aO),I=(aO,aP)=>{try{iobrokerHandler['setState'](aO,aP);}catch(aQ){}},J=async aO=>{const c1=bO;try{return await iobrokerHandler[c1(0x18f)](aO);}catch(aP){return null;}},K=(aO,aP)=>{const c2=bO;try{const aQ=iobrokerHandler[c2(0x14b)](aO,aP);return E[c2(0x17f)](aQ),aQ;}catch(aR){return()=>{};}},L=new Map(),M=new Map();let N=null,O=null;const P=[],Q={},R=new j['Vector3'](),S=new j[(bO(0x203))](),T=new j['Vector3'](),U=(aO,aP,aQ)=>{const c3=bO;if(!aO)return;if(aP==='width'||aP==='height'){aO[c3(0x1e3)][aP]=(parseFloat(aQ)||0x0)+'px';return;}if(aP===c3(0x1fd)){aO['textContent']=aQ??'';return;}if(aP==='innerHTML'){aO[c3(0x170)]=aQ??'';return;}const aR=aP[c3(0x169)](/[A-Z]/g,aS=>'-'+aS['toLowerCase']());if(typeof aQ===c3(0x14f)){try{aO[aP]=aQ;}catch(aS){}try{if(aQ)aO['setAttribute'](aR,'');else aO['removeAttribute'](aR);}catch(aT){}return;}try{aO[aP]=aQ;}catch(aU){}try{if(aQ!==null&&aQ!==undefined&&typeof aQ!==c3(0x14d))aO[c3(0x18c)](aR,aQ);}catch(aV){}};try{const aO=[];r[bO(0x1ec)](aP=>{const c4=bO,aQ=aP[c4(0x1ad)]?.[c4(0x1ea)];if(aP[c4(0x1b1)]&&(aQ==='control'||aQ===c4(0x13f)))aO['push'](aP);});if(aO[bO(0x12e)]){const {CSS3DRenderer:aP,CSS3DObject:aQ}=await import(bO(0x132));let aR=null;try{({generateCustomControl:aR}=await import(bO(0x149)));}catch(aS){}O=new j[(bO(0x182))](),N=new aP(),N['setSize'](o,p),N['domElement']['style'][bO(0x1d5)]='position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;overflow:hidden;',this[bO(0x1e9)]('container')[bO(0x183)](N[bO(0x13d)]),this['_css3dRenderer']=N;for(const aT of aO){aT['material']&&(aT['material']['transparent']=!![],aT[bO(0x1d6)]['opacity']=0x0,aT[bO(0x1d6)]['depthWrite']=![]);const aU=aT[bO(0x1ad)][bO(0x206)],aV=aT['userData']['cssWidth']||0x12c,aW=aT['userData']['cssHeight']||0xc8;if(aT[bO(0x1ad)][bO(0x1ea)]==='control'&&aR)try{const b0=await iobrokerHandler['getWebuiObject']('control',aT[bO(0x1ad)]['embeddedControl']);if(b0)aR(aT[bO(0x1ad)][bO(0x15c)],b0);}catch(b1){}let aX;try{aX=document['createElement'](aU);}catch(b2){aX=document['createElement']('div');}aX[bO(0x1e3)]['width']=aV+'px',aX['style'][bO(0x1a5)]=aW+'px',aX[bO(0x1e3)]['boxSizing']=bO(0x19b),aX['style']['pointerEvents']=bO(0x1c6);if(aT[bO(0x1ad)]['embeddedAttrs'])for(const b3 in aT['userData'][bO(0x1e6)]){try{aX['setAttribute'](b3,aT[bO(0x1ad)][bO(0x1e6)][b3]);}catch(b4){}}const aY=aT['userData'][bO(0x1f9)]||{};for(const b5 in aY)U(aX,b5,aY[b5]);const aZ=new aQ(aX);O[bO(0x197)](aZ),P['push']({'anchor':aT,'cssObject':aZ}),Q[aT['uuid']]=aX;}}}catch(b6){console['warn']('CSS3D\x20runtime\x20setup\x20error:',b6);}const V={};if(m['bindings']&&Object['keys'](m[bO(0x16f)])[bO(0x12e)]>0x0){const b7={};r[bO(0x1ec)](ba=>{const c5=bO;b7[ba[c5(0x179)]]=ba;});const b8=(ba,bb,bc)=>{const c6=bO;try{V[ba[c6(0x179)]+'|'+bb]=bc;const bd=Q[ba['uuid']];if(bd&&!bb[c6(0x1f8)]('.')&&bb!==c6(0x13a)){U(bd,bb,bc);return;}const be=bb[c6(0x19e)]('.');if(be[c6(0x12e)]===0x2){const [bf,bg]=be;if(ba[bf]==null)return;if(bf==='rotation')ba[bf][bg]=parseFloat(bc)*b9;else{if(bf==='material'&&bg===c6(0x143)){ba[bf]?.[c6(0x143)]?.[c6(0x20f)]?.(bc);if(ba[bf])ba[bf]['needsUpdate']=!![];}else bf==='material'?ba[bf]!=null&&(ba[bf][bg]=parseFloat(bc),ba[bf][c6(0x1cc)]=!![]):ba[bf][bg]=parseFloat(bc);}ba[c6(0x181)]?.(!![]);}else{if(be['length']===0x1){if(bb===c6(0x13a))ba[c6(0x13a)]=!!bc;}}}catch(bh){}},b9=Math['PI']/0xb4;for(const [ba,bb]of Object['entries'](m[bO(0x16f)])){const bc=b7[ba];if(!bc)continue;for(const [bd,be]of Object[bO(0x1a1)](bb)){if(!be?.[bO(0x129)])continue;((async()=>{const c7=bO;try{const bg=await iobrokerHandler[c7(0x18f)](be['signal']);if(bg?.['val']!=null){const bh=be['formula']&&be['formula']!=='val'?new Function(c7(0x1c7),c7(0x200)+be[c7(0x13e)]+')')(bg['val']):bg[c7(0x1c7)];b8(bc,bd,bh);}}catch(bi){}const bf=K(be[c7(0x129)],(bj,bk)=>{const c8=c7;if(bk?.[c8(0x1c7)]==null)return;const bl=be[c8(0x13e)]&&be[c8(0x13e)]!=='val'?new Function('val','return\x20('+be[c8(0x13e)]+')')(bk[c8(0x1c7)]):bk[c8(0x1c7)];b8(bc,bd,bl);});E['push'](bf);})());}}}const W=new j['Raycaster'](),X=new j['Vector2'](),Y=new Map();let Z=null,a0=null;const a1=new j[(bO(0x186))](),a2=document['createElement']('div');a2['style'][bO(0x1d5)]='position:absolute;display:none;z-index:30;min-width:150px;max-width:260px;'+'background:rgba(30,38,52,0.95);color:#e6ecf2;border:1px\x20solid\x20#3a4a5a;border-radius:6px;'+'box-shadow:0\x206px\x2020px\x20rgba(0,0,0,0.5);font-family:Segoe\x20UI,Arial,sans-serif;font-size:12px;'+bO(0x180),this[bO(0x1e9)](bO(0x156))['appendChild'](a2);const a3=bf=>bf&&bf[bO(0x161)]===r&&!bf['isLight']&&!bf['isCamera']&&bf[bO(0x1ee)]!==bO(0x1c8)&&bf['name']!=='grid',a4=bf=>{const c9=bO;let bg=bf;while(bg&&bg['parent']&&bg[c9(0x161)]!==r)bg=bg['parent'];return bg&&bg['parent']===r?bg:bf;},a5=bf=>{const ca=bO,bg=[];return bf[ca(0x1ec)](bh=>{const cb=ca;if(bh['isMesh'])bg[cb(0x17f)](bh);}),bg;},a6=(bf,bg)=>{const cc=bO;for(const bh of a5(bf)){const bi=bh['material'];if(!bi||!bi['emissive'])continue;if(!Y['has'](bh))Y['set'](bh,{'c':bi[cc(0x1f3)][cc(0x1fc)](),'i':bi['emissiveIntensity']??0x1});bi[cc(0x1f3)][cc(0x1e8)](bg),bi['emissiveIntensity']=0.6,bi['needsUpdate']=!![];}},a7=bf=>{const cd=bO;for(const bg of a5(bf)){const bh=Y['get'](bg);bh&&bg['material']?.['emissive']&&(bg['material'][cd(0x1f3)]['setHex'](bh['c']),bg['material'][cd(0x175)]=bh['i'],bg['material'][cd(0x1cc)]=!![]),Y[cd(0x125)](bg);}},a8=(bf,bg)=>{const ce=bO,bh=m['events']?.[bf?.['uuid']]?.[bg];if(!bh||bh[ce(0x1ee)]==='none')return;try{if(bh['type']==='setState'&&bh[ce(0x17c)]){let bi=bh['value'];if(bi===ce(0x15a))bi=!![];else{if(bi==='false')bi=![];else{if(bi!==''&&bi!=null&&!isNaN(Number(bi)))bi=Number(bi);}}iobrokerHandler['setState'](bh['stateId'],bi);}else{if(bh['type']===ce(0x162)&&bh['screen'])window['location'][ce(0x1d1)]='#3dscreen='+encodeURIComponent('/'+bh[ce(0x154)]['replace'](/^\//,''));else bh[ce(0x1ee)]===ce(0x209)&&bh[ce(0x209)]&&new Function(ce(0x14d),'scene',ce(0x19a),'iob',bh[ce(0x209)])(bf,r,j,iobrokerHandler);}}catch(bj){console[ce(0x1f0)]('3D\x20event\x20error',bj);}},a9=bf=>{const cf=bO;if(bf===Z)return;if(Z){if(Z!==a0)a7(Z);a8(Z,'onPointerLeave');}Z=bf;if(Z){if(Z!==a0)a6(Z,0x66aaff);a8(Z,cf(0x1db));}},aa=bf=>{if(a0)a7(a0);a0=bf;if(a0)a6(a0,0xff8800);},ab=bf=>{const cg=bO,bg=bf[cg(0x18e)]||bf['userData']?.[cg(0x15c)]||cg(0x142),bh=bf['userData']?.[cg(0x1ea)]||bf[cg(0x1ee)]||'';let bi='';const bj=new Set();bf[cg(0x1ec)](bk=>bj[cg(0x197)](bk[cg(0x179)]));for(const [bk,bl]of Object[cg(0x1a1)](m['bindings']||{})){if(!bj[cg(0x1cd)](bk))continue;for(const bm of Object[cg(0x139)](bl)){const bn=V[bk+'|'+bm];bi+='<div\x20style=\x22display:flex;justify-content:space-between;gap:12px;margin-top:3px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20style=\x22color:#9fb3c8;\x22>'+bm+cg(0x1ce)+(bn!=null?bn:'—')+cg(0x188);}}a2[cg(0x170)]=cg(0x1b3)+bg+'</div>'+(bh?cg(0x207)+bh+cg(0x16c):'')+bi;},ac=bf=>{const ch=bO;this['_popupTarget']=bf,ab(bf),a2['style'][ch(0x148)]='block';},ad=()=>{const ci=bO;this[ci(0x190)]=null,a2['style']['display']=ci(0x1b6);};this[bO(0x1b7)]=a2;const ae=bf=>{const cj=bO,bg=q['domElement']['getBoundingClientRect']();X['x']=(bf[cj(0x1fe)]-bg[cj(0x18a)])/bg[cj(0x1a4)]*0x2-0x1,X['y']=-((bf[cj(0x1a9)]-bg['top'])/bg['height'])*0x2+0x1,W[cj(0x1f5)](X,y);const bh=W['intersectObjects'](r[cj(0x12f)],!![]);for(const bi of bh){const bj=a4(bi[cj(0x14d)]);if(a3(bj))return bj;}return null;};let af=0x0,ag=0x0;q[bO(0x13d)][bO(0x20d)]('pointerdown',bf=>{const ck=bO;af=bf['clientX'],ag=bf[ck(0x1a9)];}),q['domElement'][bO(0x20d)](bO(0x1a7),bf=>{const cl=bO,bg=ae(bf);a9(bg),q[cl(0x13d)][cl(0x1e3)][cl(0x198)]=bg?'pointer':'';if(bg)ac(bg);else{if(!a0)ad();else ac(a0);}}),q[bO(0x13d)][bO(0x20d)](bO(0x1b9),bf=>{const cm=bO;if(Math['abs'](bf[cm(0x1fe)]-af)>0x4||Math['abs'](bf['clientY']-ag)>0x4)return;const bg=ae(bf);aa(bg);if(bg)ac(bg),a8(bg,cm(0x1d3));else ad();}),this[bO(0x12b)]=()=>{const cn=bO;if(!this[cn(0x190)])return;ah??=new j['Box3'](),ah['setFromObject'](this['_popupTarget']);if(ah[cn(0x1f4)]())return;ah[cn(0x144)](a1),a1[cn(0x128)](y);const bf=this['_getDomElement'](cn(0x156))['getBoundingClientRect'](),bg=(a1['x']*0.5+0.5)*bf[cn(0x1a4)],bh=(-a1['y']*0.5+0.5)*bf['height'];a2['style']['left']=Math['max'](0x4,Math[cn(0x1c1)](bg+0xc,bf[cn(0x1a4)]-a2[cn(0x1bd)]-0x4))+'px',a2['style']['top']=Math['max'](0x4,Math['min'](bh+0xc,bf['height']-a2[cn(0x1fa)]-0x4))+'px',ab(this['_popupTarget']);};let ah=null;try{const bf=[];r[bO(0x1ec)](bx=>{const co=bO;if(bx[co(0x18e)]&&!bx['isScene'])bf['push'](bx);});const bg=bx=>bx['userData']?.['embeddedType']?'Embedded\x20Controls':bx['isLight']?'Lights':bx[bO(0x12d)]?'Cameras':bx['isMesh']?bO(0x178):'Groups',bh=['All\x20Objects',...Array[bO(0x15f)](new Set(bf[bO(0x134)](bg)))],bi=new Set(bh);let bj=![];const bk=this[bO(0x1e9)]('container'),bl=document[bO(0x1df)]('div');bl[bO(0x1e3)]['cssText']=bO(0x131)+bO(0x19d)+'width:300px;box-shadow:0\x204px\x2014px\x20rgba(0,0,0,0.4);font-family:Segoe\x20UI,Arial,sans-serif;';const bm=document[bO(0x1df)]('input');bm[bO(0x1ee)]='text',bm[bO(0x14a)]='Search\x20drives,\x20sensors,\x20objects…',bm[bO(0x1e3)][bO(0x1d5)]=bO(0x1bf);const bn=document['createElement']('button');bn['textContent']='⋯',bn['title']='Search\x20settings',bn[bO(0x1e3)][bO(0x1d5)]=bO(0x177),bl['appendChild'](bm),bl[bO(0x183)](bn),bk[bO(0x183)](bl);const bo=document[bO(0x1df)](bO(0x137));bo[bO(0x1e3)][bO(0x1d5)]='position:absolute;bottom:48px;left:12px;z-index:35;width:300px;max-height:240px;overflow-y:auto;'+'background:rgba(30,38,52,0.96);border:1px\x20solid\x20#3a4a5a;border-radius:8px;display:none;'+bO(0x126),bk[bO(0x183)](bo);const bp=document[bO(0x1df)](bO(0x137));bp['style'][bO(0x1d5)]='position:absolute;bottom:48px;left:320px;z-index:36;width:200px;display:none;'+bO(0x1aa)+'box-shadow:0\x206px\x2018px\x20rgba(0,0,0,0.5);font-family:Segoe\x20UI,Arial,sans-serif;color:#e6ecf2;font-size:12px;';const bq=(bx,by,bz)=>{const cp=bO,bA=document[cp(0x1df)]('label');bA[cp(0x1e3)]['cssText']=cp(0x135);const bB=document[cp(0x1df)](cp(0x1d0));bB[cp(0x1ee)]=cp(0x1b5),bB['checked']=by,bB[cp(0x1a8)]=()=>bz(bB['checked']);const bC=document[cp(0x1df)]('span');return bC[cp(0x1fd)]=bx,bA['appendChild'](bB),bA[cp(0x183)](bC),bA;};bp[bO(0x170)]=bO(0x1ab),bp['appendChild'](bq('Highlight\x20in\x203D',![],bx=>{const cq=bO;bj=bx,bw(bm[cq(0x16e)]);}));const br=document['createElement']('div');br[bO(0x1fd)]='Include:',br[bO(0x1e3)]['cssText']='color:#8aa0b6;margin:6px\x200\x202px;',bp[bO(0x183)](br);for(const bx of bh){bp[bO(0x183)](bq(bx,!![],by=>{const cr=bO;if(by)bi['add'](bx);else bi[cr(0x125)](bx);if(bx===cr(0x1d4)&&by){for(const bz of bh)bi['add'](bx===bz?bx:bz);}bw(bm[cr(0x16e)]);}));}bk[bO(0x183)](bp),bn['onclick']=()=>{const cs=bO;bp['style'][cs(0x148)]=bp['style']['display']===cs(0x1b6)?cs(0x158):cs(0x1b6);};const bs=new Set(),bt=()=>{const ct=bO;for(const by of bs)if(by!==a0&&by!==Z)a7(by);bs[ct(0x133)]();},bu=by=>{const cu=bO,bz=new j['Box3']()[cu(0x17a)](by);if(bz[cu(0x1f4)]())return;const bA=bz['getCenter'](new j['Vector3']()),bB=bz['getSize'](new j[(cu(0x186))]()),bC=Math['max'](bB['x'],bB['y'],bB['z'])||0x1,bD=bC/(0x2*Math[cu(0x1bc)](y[cu(0x1ae)]*Math['PI']/0xb4/0x2))*1.8;u['target']['copy'](bA),y['position'][cu(0x20f)](bA['x']+bD*0.5,bA['y']+bD*0.4,bA['z']+bD),y[cu(0x1e5)]?.(),u[cu(0x185)]();},bv=by=>bi['has'](bO(0x1d4))||bi[bO(0x1cd)](bg(by));function bw(by){const cv=bO;by=(by||'')[cv(0x15e)]()['toLowerCase'](),bt(),bo['innerHTML']='';if(!by){bo[cv(0x1e3)]['display']='none';return;}const bz=bf['filter'](bA=>bA[cv(0x18e)][cv(0x20e)]()[cv(0x1f8)](by)&&bv(bA))['slice'](0x0,0x32);if(!bz[cv(0x12e)]){bo['style'][cv(0x148)]='none';return;}for(const bA of bz){const bB=a4(bA);bj&&(a6(bB,0x44dd66),bs['add'](bB));const bC=document['createElement'](cv(0x137));bC['style']['cssText']='padding:6px\x2010px;cursor:pointer;display:flex;justify-content:space-between;gap:10px;border-bottom:1px\x20solid\x20#2a3442;',bC[cv(0x170)]=cv(0x17b)+bA[cv(0x18e)]+cv(0x187)+(cv(0x17e)+bg(bA)+cv(0x187)),bC['onmouseenter']=()=>bC[cv(0x1e3)]['background']='#3a6ea8',bC['onmouseleave']=()=>bC[cv(0x1e3)][cv(0x1d9)]='',bC['onclick']=()=>{aa(bB),ac(bB),bu(bA),bo['style']['display']='none';},bo[cv(0x183)](bC);}bo[cv(0x1e3)][cv(0x148)]=cv(0x158);}bm[bO(0x20d)]('input',()=>bw(bm['value'])),bm['addEventListener']('focus',()=>{const cw=bO;if(bm[cw(0x16e)])bw(bm[cw(0x16e)]);});}catch(by){console[bO(0x1f0)](bO(0x1c5),by);}if(m['script'])try{const bz=new Function('THREE','scene',bO(0x1c0),'renderer',bO(0x14e),bO(0x19f),bO(0x160),'setState',bO(0x18f),'subscribe','assets','mixers','log',m['script']);bz(j,r,y,q,u,F,G,I,J,K,L,M,H);}catch(bA){console['warn']('3D\x20scene\x20script\x20error:',bA);}this['_animating']=!![],this['_cleanup']=()=>{const cx=bO;E[cx(0x201)](bB=>{try{bB();}catch(bC){}});},this[bO(0x18b)]=()=>{const cy=bO,bB=n[cy(0x1e0)],bC=n[cy(0x1b0)];y[cy(0x194)]&&(y[cy(0x17d)]=bB/bC,y[cy(0x1e5)]());q[cy(0x155)](bB,bC);if(N)N['setSize'](bB,bC);if(C)C[cy(0x1c0)]=y;},window[bO(0x20d)](bO(0x163),this[bO(0x18b)]);let ai=0x0;const aj=bB=>{const cz=bO;if(!this[cz(0x153)])return;requestAnimationFrame(aj);const bC=ai?(bB-ai)/0x3e8:0x0;ai=bB;if(this[cz(0x205)]){const bD=this[cz(0x205)];bD['t']+=bC/bD[cz(0x1b4)];const bE=Math[cz(0x1c1)](0x1,bD['t']),bF=bE<0.5?0x2*bE*bE:0x1-Math['pow'](-0x2*bE+0x2,0x2)/0x2;y['position']['lerpVectors'](bD['fp'],bD['tp'],bF),u[cz(0x159)][cz(0x1a6)](bD['ft'],bD['tt'],bF);if(bE>=0x1)this['_camTween']=null;}u['object']=y,u[cz(0x185)](bC);for(const bG of D){try{bG(bC,bB/0x3e8);}catch(bH){}}q[cz(0x133)](),q[cz(0x1dd)](r,y);if(N){for(const bI of P){bI[cz(0x147)]['updateWorldMatrix'](!![],![]),bI[cz(0x147)][cz(0x199)][cz(0x1af)](R,S,T),bI['cssObject']['position'][cz(0x13b)](R),bI[cz(0x138)][cz(0x1b8)][cz(0x13b)](y[cz(0x1b8)]),bI[cz(0x138)][cz(0x1f2)]['set'](T['x']*CSS3D_SCALE_RT,T['y']*CSS3D_SCALE_RT,T['z']*CSS3D_SCALE_RT),bI[cz(0x138)]['visible']=bI[cz(0x147)]['visible'];}N['render'](O,y);}if(this[cz(0x12b)])this['_updatePopup']();if(C){C[cz(0x1c0)]=y,C['center']=u[cz(0x159)];if(C[cz(0x1e7)])C[cz(0x185)](bC);q[cz(0x12a)]=![],C[cz(0x1dd)](q),q[cz(0x12a)]=![];}};aj(0x0);}catch(bB){console[bO(0x164)](bO(0x1bb),bB);}}}customElements['define'](bN(0x191),IobrokerWebui3DScreenViewer);
|