iobroker.devices 2.0.2 → 2.0.3
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 +1 -1
- package/admin/assets/{index-Csa94g2Q.js → index-BaeInhLO.js} +2 -2
- package/admin/index_m.html +1 -1
- package/admin/tab.html +1 -1
- package/io-package.json +2 -2
- package/package.json +1 -1
- package/www/assets/{index-DHISOGRL.js → index-lrSafi0L.js} +1 -1
- package/www/index.html +1 -1
|
@@ -745,4 +745,4 @@ Arguments: `+Array.prototype.slice.call(I).join("")+`
|
|
|
745
745
|
To pick up a draggable item, press the space bar.
|
|
746
746
|
While dragging, use the arrow keys to move the item.
|
|
747
747
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
748
|
-
`},wIt={onDragStart(t){let{active:e}=t;return"Picked up draggable item "+e.id+"."},onDragOver(t){let{active:e,over:n}=t;return n?"Draggable item "+e.id+" was moved over droppable area "+n.id+".":"Draggable item "+e.id+" is no longer over a droppable area."},onDragEnd(t){let{active:e,over:n}=t;return n?"Draggable item "+e.id+" was dropped over droppable area "+n.id:"Draggable item "+e.id+" was dropped."},onDragCancel(t){let{active:e}=t;return"Dragging was cancelled. Draggable item "+e.id+" was dropped."}};function vIt(t){let{announcements:e=wIt,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=yIt}=t;const{announce:s,announcement:i}=fIt(),a=R1("DndLiveRegion"),[d,m]=E.useState(!1);if(E.useEffect(()=>{m(!0)},[]),_It(E.useMemo(()=>({onDragStart(h){let{active:w}=h;s(e.onDragStart({active:w}))},onDragMove(h){let{active:w,over:x}=h;e.onDragMove&&s(e.onDragMove({active:w,over:x}))},onDragOver(h){let{active:w,over:x}=h;s(e.onDragOver({active:w,over:x}))},onDragEnd(h){let{active:w,over:x}=h;s(e.onDragEnd({active:w,over:x}))},onDragCancel(h){let{active:w,over:x}=h;s(e.onDragCancel({active:w,over:x}))}}),[s,e])),!d)return null;const _=v.createElement(v.Fragment,null,v.createElement(hIt,{id:r,value:o.draggable}),v.createElement(mIt,{id:a,announcement:i}));return n?Rp.createPortal(_,n):_}var mo;(function(t){t.DragStart="dragStart",t.DragMove="dragMove",t.DragEnd="dragEnd",t.DragCancel="dragCancel",t.DragOver="dragOver",t.RegisterDroppable="registerDroppable",t.SetDroppableDisabled="setDroppableDisabled",t.UnregisterDroppable="unregisterDroppable"})(mo||(mo={}));function Hw(){}function Fw(t,e){return E.useMemo(()=>({sensor:t,options:e??{}}),[t,e])}function MA(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return E.useMemo(()=>[...e].filter(r=>r!=null),[...e])}const hl=Object.freeze({x:0,y:0});function bIt(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function xIt(t,e){const n=zw(t);if(!n)return"0 0";const r={x:(n.x-e.left)/e.width*100,y:(n.y-e.top)/e.height*100};return r.x+"% "+r.y+"%"}function SIt(t,e){let{data:{value:n}}=t,{data:{value:r}}=e;return n-r}function CIt(t,e){let{data:{value:n}}=t,{data:{value:r}}=e;return r-n}function kIt(t,e){if(!t||t.length===0)return null;const[n]=t;return n[e]}function _L(t,e,n){return e===void 0&&(e=t.left),n===void 0&&(n=t.top),{x:e+t.width*.5,y:n+t.height*.5}}const $A=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=t;const o=_L(e,e.left,e.top),s=[];for(const i of r){const{id:a}=i,d=n.get(a);if(d){const m=bIt(_L(d),o);s.push({id:a,data:{droppableContainer:i,value:m}})}}return s.sort(SIt)};function TIt(t,e){const n=Math.max(e.top,t.top),r=Math.max(e.left,t.left),o=Math.min(e.left+e.width,t.left+t.width),s=Math.min(e.top+e.height,t.top+t.height),i=o-r,a=s-n;if(r<o&&n<s){const d=e.width*e.height,m=t.width*t.height,_=i*a,h=_/(d+m-_);return Number(h.toFixed(4))}return 0}const MIt=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=t;const o=[];for(const s of r){const{id:i}=s,a=n.get(i);if(a){const d=TIt(a,e);d>0&&o.push({id:i,data:{droppableContainer:s,value:d}})}}return o.sort(CIt)};function $It(t,e,n){return{...t,scaleX:e&&n?e.width/n.width:1,scaleY:e&&n?e.height/n.height:1}}function EA(t,e){return t&&e?{x:t.left-e.left,y:t.top-e.top}:hl}function EIt(t){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),s=1;s<r;s++)o[s-1]=arguments[s];return o.reduce((i,a)=>({...i,top:i.top+t*a.y,bottom:i.bottom+t*a.y,left:i.left+t*a.x,right:i.right+t*a.x}),{...n})}}const DIt=EIt(1);function DA(t){if(t.startsWith("matrix3d(")){const e=t.slice(9,-1).split(/, /);return{x:+e[12],y:+e[13],scaleX:+e[0],scaleY:+e[5]}}else if(t.startsWith("matrix(")){const e=t.slice(7,-1).split(/, /);return{x:+e[4],y:+e[5],scaleX:+e[0],scaleY:+e[3]}}return null}function LIt(t,e,n){const r=DA(e);if(!r)return t;const{scaleX:o,scaleY:s,x:i,y:a}=r,d=t.left-i-(1-o)*parseFloat(n),m=t.top-a-(1-s)*parseFloat(n.slice(n.indexOf(" ")+1)),_=o?t.width/o:t.width,h=s?t.height/s:t.height;return{width:_,height:h,top:m,right:d+_,bottom:m+h,left:d}}const IIt={ignoreTransform:!1};function Hf(t,e){e===void 0&&(e=IIt);let n=t.getBoundingClientRect();if(e.ignoreTransform){const{transform:m,transformOrigin:_}=Fs(t).getComputedStyle(t);m&&(n=LIt(n,m,_))}const{top:r,left:o,width:s,height:i,bottom:a,right:d}=n;return{top:r,left:o,width:s,height:i,bottom:a,right:d}}function gL(t){return Hf(t,{ignoreTransform:!0})}function OIt(t){const e=t.innerWidth,n=t.innerHeight;return{top:0,left:0,right:e,bottom:n,width:e,height:n}}function jIt(t,e){return e===void 0&&(e=Fs(t).getComputedStyle(t)),e.position==="fixed"}function AIt(t,e){e===void 0&&(e=Fs(t).getComputedStyle(t));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const s=e[o];return typeof s=="string"?n.test(s):!1})}function bk(t,e){const n=[];function r(o){if(e!=null&&n.length>=e||!o)return n;if(vk(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!A1(o)||CA(o)||n.includes(o))return n;const s=Fs(t).getComputedStyle(o);return o!==t&&AIt(o,s)&&n.push(o),jIt(o,s)?n:r(o.parentNode)}return t?r(t):n}function LA(t){const[e]=bk(t,1);return e??null}function L5(t){return!Yv||!t?null:Nf(t)?t:wk(t)?vk(t)||t===zf(t).scrollingElement?window:A1(t)?t:null:null}function IA(t){return Nf(t)?t.scrollX:t.scrollLeft}function OA(t){return Nf(t)?t.scrollY:t.scrollTop}function a4(t){return{x:IA(t),y:OA(t)}}var Eo;(function(t){t[t.Forward=1]="Forward",t[t.Backward=-1]="Backward"})(Eo||(Eo={}));function jA(t){return!Yv||!t?!1:t===document.scrollingElement}function AA(t){const e={x:0,y:0},n=jA(t)?{height:window.innerHeight,width:window.innerWidth}:{height:t.clientHeight,width:t.clientWidth},r={x:t.scrollWidth-n.width,y:t.scrollHeight-n.height},o=t.scrollTop<=e.y,s=t.scrollLeft<=e.x,i=t.scrollTop>=r.y,a=t.scrollLeft>=r.x;return{isTop:o,isLeft:s,isBottom:i,isRight:a,maxScroll:r,minScroll:e}}const PIt={x:.2,y:.2};function RIt(t,e,n,r,o){let{top:s,left:i,right:a,bottom:d}=n;r===void 0&&(r=10),o===void 0&&(o=PIt);const{isTop:m,isBottom:_,isLeft:h,isRight:w}=AA(t),x={x:0,y:0},S={x:0,y:0},C={height:e.height*o.y,width:e.width*o.x};return!m&&s<=e.top+C.height?(x.y=Eo.Backward,S.y=r*Math.abs((e.top+C.height-s)/C.height)):!_&&d>=e.bottom-C.height&&(x.y=Eo.Forward,S.y=r*Math.abs((e.bottom-C.height-d)/C.height)),!w&&a>=e.right-C.width?(x.x=Eo.Forward,S.x=r*Math.abs((e.right-C.width-a)/C.width)):!h&&i<=e.left+C.width&&(x.x=Eo.Backward,S.x=r*Math.abs((e.left+C.width-i)/C.width)),{direction:x,speed:S}}function NIt(t){if(t===document.scrollingElement){const{innerWidth:s,innerHeight:i}=window;return{top:0,left:0,right:s,bottom:i,width:s,height:i}}const{top:e,left:n,right:r,bottom:o}=t.getBoundingClientRect();return{top:e,left:n,right:r,bottom:o,width:t.clientWidth,height:t.clientHeight}}function PA(t){return t.reduce((e,n)=>uf(e,a4(n)),hl)}function zIt(t){return t.reduce((e,n)=>e+IA(n),0)}function HIt(t){return t.reduce((e,n)=>e+OA(n),0)}function RA(t,e){if(e===void 0&&(e=Hf),!t)return;const{top:n,left:r,bottom:o,right:s}=e(t);LA(t)&&(o<=0||s<=0||n>=window.innerHeight||r>=window.innerWidth)&&t.scrollIntoView({block:"center",inline:"center"})}const FIt=[["x",["left","right"],zIt],["y",["top","bottom"],HIt]];class xk{constructor(e,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=bk(n),o=PA(r);this.rect={...e},this.width=e.width,this.height=e.height;for(const[s,i,a]of FIt)for(const d of i)Object.defineProperty(this,d,{get:()=>{const m=a(r),_=o[s]-m;return this.rect[d]+_},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Bg{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=e}add(e,n,r){var o;(o=this.target)==null||o.addEventListener(e,n,r),this.listeners.push([e,n,r])}}function WIt(t){const{EventTarget:e}=Fs(t);return t instanceof e?t:zf(t)}function I5(t,e){const n=Math.abs(t.x),r=Math.abs(t.y);return typeof e=="number"?Math.sqrt(n**2+r**2)>e:"x"in e&&"y"in e?n>e.x&&r>e.y:"x"in e?n>e.x:"y"in e?r>e.y:!1}var _a;(function(t){t.Click="click",t.DragStart="dragstart",t.Keydown="keydown",t.ContextMenu="contextmenu",t.Resize="resize",t.SelectionChange="selectionchange",t.VisibilityChange="visibilitychange"})(_a||(_a={}));function yL(t){t.preventDefault()}function YIt(t){t.stopPropagation()}var zn;(function(t){t.Space="Space",t.Down="ArrowDown",t.Right="ArrowRight",t.Left="ArrowLeft",t.Up="ArrowUp",t.Esc="Escape",t.Enter="Enter",t.Tab="Tab"})(zn||(zn={}));const NA={start:[zn.Space,zn.Enter],cancel:[zn.Esc],end:[zn.Space,zn.Enter,zn.Tab]},BIt=(t,e)=>{let{currentCoordinates:n}=e;switch(t.code){case zn.Right:return{...n,x:n.x+25};case zn.Left:return{...n,x:n.x-25};case zn.Down:return{...n,y:n.y+25};case zn.Up:return{...n,y:n.y-25}}};class zA{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:n}}=e;this.props=e,this.listeners=new Bg(zf(n)),this.windowListeners=new Bg(Fs(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(_a.Resize,this.handleCancel),this.windowListeners.add(_a.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(_a.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:n}=this.props,r=e.node.current;r&&RA(r),n(hl)}handleKeyDown(e){if(Vv(e)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:s=NA,coordinateGetter:i=BIt,scrollBehavior:a="smooth"}=o,{code:d}=e;if(s.end.includes(d)){this.handleEnd(e);return}if(s.cancel.includes(d)){this.handleCancel(e);return}const{collisionRect:m}=r.current,_=m?{x:m.left,y:m.top}:hl;this.referenceCoordinates||(this.referenceCoordinates=_);const h=i(e,{active:n,context:r.current,currentCoordinates:_});if(h){const w=Nw(h,_),x={x:0,y:0},{scrollableAncestors:S}=r.current;for(const C of S){const M=e.code,{isTop:D,isRight:P,isLeft:R,isBottom:W,maxScroll:A,minScroll:N}=AA(C),H=NIt(C),q={x:Math.min(M===zn.Right?H.right-H.width/2:H.right,Math.max(M===zn.Right?H.left:H.left+H.width/2,h.x)),y:Math.min(M===zn.Down?H.bottom-H.height/2:H.bottom,Math.max(M===zn.Down?H.top:H.top+H.height/2,h.y))},J=M===zn.Right&&!P||M===zn.Left&&!R,z=M===zn.Down&&!W||M===zn.Up&&!D;if(J&&q.x!==h.x){const K=C.scrollLeft+w.x,X=M===zn.Right&&K<=A.x||M===zn.Left&&K>=N.x;if(X&&!w.y){C.scrollTo({left:K,behavior:a});return}X?x.x=C.scrollLeft-K:x.x=M===zn.Right?C.scrollLeft-A.x:C.scrollLeft-N.x,x.x&&C.scrollBy({left:-x.x,behavior:a});break}else if(z&&q.y!==h.y){const K=C.scrollTop+w.y,X=M===zn.Down&&K<=A.y||M===zn.Up&&K>=N.y;if(X&&!w.x){C.scrollTo({top:K,behavior:a});return}X?x.y=C.scrollTop-K:x.y=M===zn.Down?C.scrollTop-A.y:C.scrollTop-N.y,x.y&&C.scrollBy({top:-x.y,behavior:a});break}}this.handleMove(e,uf(Nw(h,this.referenceCoordinates),x))}}}handleMove(e,n){const{onMove:r}=this.props;e.preventDefault(),r(n)}handleEnd(e){const{onEnd:n}=this.props;e.preventDefault(),this.detach(),n()}handleCancel(e){const{onCancel:n}=this.props;e.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}zA.activators=[{eventName:"onKeyDown",handler:(t,e,n)=>{let{keyboardCodes:r=NA,onActivation:o}=e,{active:s}=n;const{code:i}=t.nativeEvent;if(r.start.includes(i)){const a=s.activatorNode.current;return a&&t.target!==a?!1:(t.preventDefault(),o?.({event:t.nativeEvent}),!0)}return!1}}];function wL(t){return!!(t&&"distance"in t)}function vL(t){return!!(t&&"delay"in t)}class Sk{constructor(e,n,r){var o;r===void 0&&(r=WIt(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=n;const{event:s}=e,{target:i}=s;this.props=e,this.events=n,this.document=zf(i),this.documentListeners=new Bg(this.document),this.listeners=new Bg(r),this.windowListeners=new Bg(Fs(i)),this.initialCoordinates=(o=zw(s))!=null?o:hl,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(_a.Resize,this.handleCancel),this.windowListeners.add(_a.DragStart,yL),this.windowListeners.add(_a.VisibilityChange,this.handleCancel),this.windowListeners.add(_a.ContextMenu,yL),this.documentListeners.add(_a.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(vL(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(wL(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,n){const{active:r,onPending:o}=this.props;o(r,e,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:e}=this,{onStart:n}=this.props;e&&(this.activated=!0,this.documentListeners.add(_a.Click,YIt,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(_a.SelectionChange,this.removeTextSelection),n(e))}handleMove(e){var n;const{activated:r,initialCoordinates:o,props:s}=this,{onMove:i,options:{activationConstraint:a}}=s;if(!o)return;const d=(n=zw(e))!=null?n:hl,m=Nw(o,d);if(!r&&a){if(wL(a)){if(a.tolerance!=null&&I5(m,a.tolerance))return this.handleCancel();if(I5(m,a.distance))return this.handleStart()}if(vL(a)&&I5(m,a.tolerance))return this.handleCancel();this.handlePending(a,m);return}e.cancelable&&e.preventDefault(),i(d)}handleEnd(){const{onAbort:e,onEnd:n}=this.props;this.detach(),this.activated||e(this.props.active),n()}handleCancel(){const{onAbort:e,onCancel:n}=this.props;this.detach(),this.activated||e(this.props.active),n()}handleKeydown(e){e.code===zn.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}}const VIt={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Uv extends Sk{constructor(e){const{event:n}=e,r=zf(n.target);super(e,VIt,r)}}Uv.activators=[{eventName:"onPointerDown",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:r}=e;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];const UIt={move:{name:"mousemove"},end:{name:"mouseup"}};var l4;(function(t){t[t.RightClick=2]="RightClick"})(l4||(l4={}));class qIt extends Sk{constructor(e){super(e,UIt,zf(e.event.target))}}qIt.activators=[{eventName:"onMouseDown",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:r}=e;return n.button===l4.RightClick?!1:(r?.({event:n}),!0)}}];const O5={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Ck extends Sk{constructor(e){super(e,O5)}static setup(){return window.addEventListener(O5.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(O5.move.name,e)};function e(){}}}Ck.activators=[{eventName:"onTouchStart",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:r}=e;const{touches:o}=n;return o.length>1?!1:(r?.({event:n}),!0)}}];var Vg;(function(t){t[t.Pointer=0]="Pointer",t[t.DraggableRect=1]="DraggableRect"})(Vg||(Vg={}));var Ww;(function(t){t[t.TreeOrder=0]="TreeOrder",t[t.ReversedTreeOrder=1]="ReversedTreeOrder"})(Ww||(Ww={}));function GIt(t){let{acceleration:e,activator:n=Vg.Pointer,canScroll:r,draggingRect:o,enabled:s,interval:i=5,order:a=Ww.TreeOrder,pointerCoordinates:d,scrollableAncestors:m,scrollableAncestorRects:_,delta:h,threshold:w}=t;const x=KIt({delta:h,disabled:!s}),[S,C]=lIt(),M=E.useRef({x:0,y:0}),D=E.useRef({x:0,y:0}),P=E.useMemo(()=>{switch(n){case Vg.Pointer:return d?{top:d.y,bottom:d.y,left:d.x,right:d.x}:null;case Vg.DraggableRect:return o}},[n,o,d]),R=E.useRef(null),W=E.useCallback(()=>{const N=R.current;if(!N)return;const H=M.current.x*D.current.x,q=M.current.y*D.current.y;N.scrollBy(H,q)},[]),A=E.useMemo(()=>a===Ww.TreeOrder?[...m].reverse():m,[a,m]);E.useEffect(()=>{if(!s||!m.length||!P){C();return}for(const N of A){if(r?.(N)===!1)continue;const H=m.indexOf(N),q=_[H];if(!q)continue;const{direction:J,speed:z}=RIt(N,q,P,e,w);for(const K of["x","y"])x[K][J[K]]||(z[K]=0,J[K]=0);if(z.x>0||z.y>0){C(),R.current=N,S(W,i),M.current=z,D.current=J;return}}M.current={x:0,y:0},D.current={x:0,y:0},C()},[e,W,r,C,s,i,JSON.stringify(P),JSON.stringify(x),S,m,A,_,JSON.stringify(w)])}const JIt={x:{[Eo.Backward]:!1,[Eo.Forward]:!1},y:{[Eo.Backward]:!1,[Eo.Forward]:!1}};function KIt(t){let{delta:e,disabled:n}=t;const r=Rw(e);return P1(o=>{if(n||!r||!o)return JIt;const s={x:Math.sign(e.x-r.x),y:Math.sign(e.y-r.y)};return{x:{[Eo.Backward]:o.x[Eo.Backward]||s.x===-1,[Eo.Forward]:o.x[Eo.Forward]||s.x===1},y:{[Eo.Backward]:o.y[Eo.Backward]||s.y===-1,[Eo.Forward]:o.y[Eo.Forward]||s.y===1}}},[n,e,r])}function XIt(t,e){const n=e!=null?t.get(e):void 0,r=n?n.node.current:null;return P1(o=>{var s;return e==null?null:(s=r??o)!=null?s:null},[r,e])}function ZIt(t,e){return E.useMemo(()=>t.reduce((n,r)=>{const{sensor:o}=r,s=o.activators.map(i=>({eventName:i.eventName,handler:e(i.handler,r)}));return[...n,...s]},[]),[t,e])}var f1;(function(t){t[t.Always=0]="Always",t[t.BeforeDragging=1]="BeforeDragging",t[t.WhileDragging=2]="WhileDragging"})(f1||(f1={}));var c4;(function(t){t.Optimized="optimized"})(c4||(c4={}));const bL=new Map;function QIt(t,e){let{dragging:n,dependencies:r,config:o}=e;const[s,i]=E.useState(null),{frequency:a,measure:d,strategy:m}=o,_=E.useRef(t),h=M(),w=m1(h),x=E.useCallback(function(D){D===void 0&&(D=[]),!w.current&&i(P=>P===null?D:P.concat(D.filter(R=>!P.includes(R))))},[w]),S=E.useRef(null),C=P1(D=>{if(h&&!n)return bL;if(!D||D===bL||_.current!==t||s!=null){const P=new Map;for(let R of t){if(!R)continue;if(s&&s.length>0&&!s.includes(R.id)&&R.rect.current){P.set(R.id,R.rect.current);continue}const W=R.node.current,A=W?new xk(d(W),W):null;R.rect.current=A,A&&P.set(R.id,A)}return P}return D},[t,s,n,h,d]);return E.useEffect(()=>{_.current=t},[t]),E.useEffect(()=>{h||x()},[n,h]),E.useEffect(()=>{s&&s.length>0&&i(null)},[JSON.stringify(s)]),E.useEffect(()=>{h||typeof a!="number"||S.current!==null||(S.current=setTimeout(()=>{x(),S.current=null},a))},[a,h,x,...r]),{droppableRects:C,measureDroppableContainers:x,measuringScheduled:s!=null};function M(){switch(m){case f1.Always:return!1;case f1.BeforeDragging:return n;default:return!n}}}function kk(t,e){return P1(n=>t?n||(typeof e=="function"?e(t):t):null,[e,t])}function eOt(t,e){return kk(t,e)}function tOt(t){let{callback:e,disabled:n}=t;const r=Bv(e),o=E.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:s}=window;return new s(r)},[r,n]);return E.useEffect(()=>()=>o?.disconnect(),[o]),o}function qv(t){let{callback:e,disabled:n}=t;const r=Bv(e),o=E.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:s}=window;return new s(r)},[n]);return E.useEffect(()=>()=>o?.disconnect(),[o]),o}function nOt(t){return new xk(Hf(t),t)}function xL(t,e,n){e===void 0&&(e=nOt);const[r,o]=E.useState(null);function s(){o(d=>{if(!t)return null;if(t.isConnected===!1){var m;return(m=d??n)!=null?m:null}const _=e(t);return JSON.stringify(d)===JSON.stringify(_)?d:_})}const i=tOt({callback(d){if(t)for(const m of d){const{type:_,target:h}=m;if(_==="childList"&&h instanceof HTMLElement&&h.contains(t)){s();break}}}}),a=qv({callback:s});return pl(()=>{s(),t?(a?.observe(t),i?.observe(document.body,{childList:!0,subtree:!0})):(a?.disconnect(),i?.disconnect())},[t]),r}function rOt(t){const e=kk(t);return EA(t,e)}const SL=[];function oOt(t){const e=E.useRef(t),n=P1(r=>t?r&&r!==SL&&t&&e.current&&t.parentNode===e.current.parentNode?r:bk(t):SL,[t]);return E.useEffect(()=>{e.current=t},[t]),n}function sOt(t){const[e,n]=E.useState(null),r=E.useRef(t),o=E.useCallback(s=>{const i=L5(s.target);i&&n(a=>a?(a.set(i,a4(i)),new Map(a)):null)},[]);return E.useEffect(()=>{const s=r.current;if(t!==s){i(s);const a=t.map(d=>{const m=L5(d);return m?(m.addEventListener("scroll",o,{passive:!0}),[m,a4(m)]):null}).filter(d=>d!=null);n(a.length?new Map(a):null),r.current=t}return()=>{i(t),i(s)};function i(a){a.forEach(d=>{const m=L5(d);m?.removeEventListener("scroll",o)})}},[o,t]),E.useMemo(()=>t.length?e?Array.from(e.values()).reduce((s,i)=>uf(s,i),hl):PA(t):hl,[t,e])}function CL(t,e){e===void 0&&(e=[]);const n=E.useRef(null);return E.useEffect(()=>{n.current=null},e),E.useEffect(()=>{const r=t!==hl;r&&!n.current&&(n.current=t),!r&&n.current&&(n.current=null)},[t]),n.current?Nw(t,n.current):hl}function iOt(t){E.useEffect(()=>{if(!Yv)return;const e=t.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of e)n?.()}},t.map(e=>{let{sensor:n}=e;return n}))}function aOt(t,e){return E.useMemo(()=>t.reduce((n,r)=>{let{eventName:o,handler:s}=r;return n[o]=i=>{s(i,e)},n},{}),[t,e])}function HA(t){return E.useMemo(()=>t?OIt(t):null,[t])}const kL=[];function lOt(t,e){e===void 0&&(e=Hf);const[n]=t,r=HA(n?Fs(n):null),[o,s]=E.useState(kL);function i(){s(()=>t.length?t.map(d=>jA(d)?r:new xk(e(d),d)):kL)}const a=qv({callback:i});return pl(()=>{a?.disconnect(),i(),t.forEach(d=>a?.observe(d))},[t]),o}function FA(t){if(!t)return null;if(t.children.length>1)return t;const e=t.children[0];return A1(e)?e:t}function cOt(t){let{measure:e}=t;const[n,r]=E.useState(null),o=E.useCallback(m=>{for(const{target:_}of m)if(A1(_)){r(h=>{const w=e(_);return h?{...h,width:w.width,height:w.height}:w});break}},[e]),s=qv({callback:o}),i=E.useCallback(m=>{const _=FA(m);s?.disconnect(),_&&s?.observe(_),r(_?e(_):null)},[e,s]),[a,d]=Pw(i);return E.useMemo(()=>({nodeRef:a,rect:n,setRef:d}),[n,a,d])}const dOt=[{sensor:Uv,options:{}},{sensor:zA,options:{}}],uOt={current:{}},J0={draggable:{measure:gL},droppable:{measure:gL,strategy:f1.WhileDragging,frequency:c4.Optimized},dragOverlay:{measure:Hf}};class Ug extends Map{get(e){var n;return e!=null&&(n=super.get(e))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:n}=e;return!n})}getNodeFor(e){var n,r;return(n=(r=this.get(e))==null?void 0:r.node.current)!=null?n:void 0}}const pOt={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Ug,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Hw},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:J0,measureDroppableContainers:Hw,windowRect:null,measuringScheduled:!1},WA={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Hw,draggableNodes:new Map,over:null,measureDroppableContainers:Hw},N1=E.createContext(WA),YA=E.createContext(pOt);function hOt(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Ug}}}function mOt(t,e){switch(e.type){case mo.DragStart:return{...t,draggable:{...t.draggable,initialCoordinates:e.initialCoordinates,active:e.active}};case mo.DragMove:return t.draggable.active==null?t:{...t,draggable:{...t.draggable,translate:{x:e.coordinates.x-t.draggable.initialCoordinates.x,y:e.coordinates.y-t.draggable.initialCoordinates.y}}};case mo.DragEnd:case mo.DragCancel:return{...t,draggable:{...t.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case mo.RegisterDroppable:{const{element:n}=e,{id:r}=n,o=new Ug(t.droppable.containers);return o.set(r,n),{...t,droppable:{...t.droppable,containers:o}}}case mo.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=e,s=t.droppable.containers.get(n);if(!s||r!==s.key)return t;const i=new Ug(t.droppable.containers);return i.set(n,{...s,disabled:o}),{...t,droppable:{...t.droppable,containers:i}}}case mo.UnregisterDroppable:{const{id:n,key:r}=e,o=t.droppable.containers.get(n);if(!o||r!==o.key)return t;const s=new Ug(t.droppable.containers);return s.delete(n),{...t,droppable:{...t.droppable,containers:s}}}default:return t}}function fOt(t){let{disabled:e}=t;const{active:n,activatorEvent:r,draggableNodes:o}=E.useContext(N1),s=Rw(r),i=Rw(n?.id);return E.useEffect(()=>{if(!e&&!r&&s&&i!=null){if(!Vv(s)||document.activeElement===s.target)return;const a=o.get(i);if(!a)return;const{activatorNode:d,node:m}=a;if(!d.current&&!m.current)return;requestAnimationFrame(()=>{for(const _ of[d.current,m.current]){if(!_)continue;const h=uIt(_);if(h){h.focus();break}}})}},[r,e,o,i,s]),null}function BA(t,e){let{transform:n,...r}=e;return t!=null&&t.length?t.reduce((o,s)=>s({transform:o,...r}),n):n}function _Ot(t){return E.useMemo(()=>({draggable:{...J0.draggable,...t?.draggable},droppable:{...J0.droppable,...t?.droppable},dragOverlay:{...J0.dragOverlay,...t?.dragOverlay}}),[t?.draggable,t?.droppable,t?.dragOverlay])}function gOt(t){let{activeNode:e,measure:n,initialRect:r,config:o=!0}=t;const s=E.useRef(!1),{x:i,y:a}=typeof o=="boolean"?{x:o,y:o}:o;pl(()=>{if(!i&&!a||!e){s.current=!1;return}if(s.current||!r)return;const m=e?.node.current;if(!m||m.isConnected===!1)return;const _=n(m),h=EA(_,r);if(i||(h.x=0),a||(h.y=0),s.current=!0,Math.abs(h.x)>0||Math.abs(h.y)>0){const w=LA(m);w&&w.scrollBy({top:h.y,left:h.x})}},[e,i,a,r,n])}const Gv=E.createContext({...hl,scaleX:1,scaleY:1});var lu;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Initializing=1]="Initializing",t[t.Initialized=2]="Initialized"})(lu||(lu={}));const VA=E.memo(function(e){var n,r,o,s;let{id:i,accessibility:a,autoScroll:d=!0,children:m,sensors:_=dOt,collisionDetection:h=MIt,measuring:w,modifiers:x,...S}=e;const C=E.useReducer(mOt,void 0,hOt),[M,D]=C,[P,R]=gIt(),[W,A]=E.useState(lu.Uninitialized),N=W===lu.Initialized,{draggable:{active:H,nodes:q,translate:J},droppable:{containers:z}}=M,K=H!=null?q.get(H):null,X=E.useRef({initial:null,translated:null}),te=E.useMemo(()=>{var Ot;return H!=null?{id:H,data:(Ot=K?.data)!=null?Ot:uOt,rect:X}:null},[H,K]),ee=E.useRef(null),[le,ae]=E.useState(null),[me,ie]=E.useState(null),se=m1(S,Object.values(S)),re=R1("DndDescribedBy",i),G=E.useMemo(()=>z.getEnabled(),[z]),ne=_Ot(w),{droppableRects:ge,measureDroppableContainers:_e,measuringScheduled:ue}=QIt(G,{dragging:N,dependencies:[J.x,J.y],config:ne.droppable}),de=XIt(q,H),Te=E.useMemo(()=>me?zw(me):null,[me]),je=Er(),Pe=eOt(de,ne.draggable.measure);gOt({activeNode:H!=null?q.get(H):null,config:je.layoutShiftCompensation,initialRect:Pe,measure:ne.draggable.measure});const Oe=xL(de,ne.draggable.measure,Pe),Ye=xL(de?de.parentElement:null),Re=E.useRef({activatorEvent:null,active:null,activeNode:de,collisionRect:null,collisions:null,droppableRects:ge,draggableNodes:q,draggingNode:null,draggingNodeRect:null,droppableContainers:z,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Xe=z.getNodeFor((n=Re.current.over)==null?void 0:n.id),ze=cOt({measure:ne.dragOverlay.measure}),Ue=(r=ze.nodeRef.current)!=null?r:de,Ee=N?(o=ze.rect)!=null?o:Oe:null,Ce=!!(ze.nodeRef.current&&ze.rect),Be=rOt(Ce?null:Oe),ft=HA(Ue?Fs(Ue):null),rt=oOt(N?Xe??de:null),qe=lOt(rt),Je=BA(x,{transform:{x:J.x-Be.x,y:J.y-Be.y,scaleX:1,scaleY:1},activatorEvent:me,active:te,activeNodeRect:Oe,containerNodeRect:Ye,draggingNodeRect:Ee,over:Re.current.over,overlayNodeRect:ze.rect,scrollableAncestors:rt,scrollableAncestorRects:qe,windowRect:ft}),Dt=Te?uf(Te,J):null,kt=sOt(rt),we=CL(kt),ve=CL(kt,[Oe]),Fe=uf(Je,we),Ge=Ee?DIt(Ee,Je):null,pt=te&&Ge?h({active:te,collisionRect:Ge,droppableRects:ge,droppableContainers:G,pointerCoordinates:Dt}):null,Qe=kIt(pt,"id"),[mt,en]=E.useState(null),Lt=Ce?Je:uf(Je,ve),at=$It(Lt,(s=mt?.rect)!=null?s:null,Oe),Ht=E.useRef(null),tn=E.useCallback((Ot,rn)=>{let{sensor:An,options:ct}=rn;if(ee.current==null)return;const $n=q.get(ee.current);if(!$n)return;const $t=Ot.nativeEvent,yn=new An({active:ee.current,activeNode:$n,event:$t,options:ct,context:Re,onAbort(We){if(!q.get(We))return;const{onDragAbort:gt}=se.current,pn={id:We};gt?.(pn),P({type:"onDragAbort",event:pn})},onPending(We,qt,gt,pn){if(!q.get(We))return;const{onDragPending:_t}=se.current,mn={id:We,constraint:qt,initialCoordinates:gt,offset:pn};_t?.(mn),P({type:"onDragPending",event:mn})},onStart(We){const qt=ee.current;if(qt==null)return;const gt=q.get(qt);if(!gt)return;const{onDragStart:pn}=se.current,kn={activatorEvent:$t,active:{id:qt,data:gt.data,rect:X}};Rp.unstable_batchedUpdates(()=>{pn?.(kn),A(lu.Initializing),D({type:mo.DragStart,initialCoordinates:We,active:qt}),P({type:"onDragStart",event:kn}),ae(Ht.current),ie($t)})},onMove(We){D({type:mo.DragMove,coordinates:We})},onEnd:dt(mo.DragEnd),onCancel:dt(mo.DragCancel)});Ht.current=yn;function dt(We){return async function(){const{active:gt,collisions:pn,over:kn,scrollAdjustedTranslate:_t}=Re.current;let mn=null;if(gt&&_t){const{cancelDrop:mr}=se.current;mn={activatorEvent:$t,active:gt,collisions:pn,delta:_t,over:kn},We===mo.DragEnd&&typeof mr=="function"&&await Promise.resolve(mr(mn))&&(We=mo.DragCancel)}ee.current=null,Rp.unstable_batchedUpdates(()=>{D({type:We}),A(lu.Uninitialized),en(null),ae(null),ie(null),Ht.current=null;const mr=We===mo.DragEnd?"onDragEnd":"onDragCancel";if(mn){const Dr=se.current[mr];Dr?.(mn),P({type:mr,event:mn})}})}}},[q]),Cn=E.useCallback((Ot,rn)=>(An,ct)=>{const $n=An.nativeEvent,$t=q.get(ct);if(ee.current!==null||!$t||$n.dndKit||$n.defaultPrevented)return;const yn={active:$t};Ot(An,rn.options,yn)===!0&&($n.dndKit={capturedBy:rn.sensor},ee.current=ct,tn(An,rn))},[q,tn]),nr=ZIt(_,Cn);iOt(_),pl(()=>{Oe&&W===lu.Initializing&&A(lu.Initialized)},[Oe,W]),E.useEffect(()=>{const{onDragMove:Ot}=se.current,{active:rn,activatorEvent:An,collisions:ct,over:$n}=Re.current;if(!rn||!An)return;const $t={active:rn,activatorEvent:An,collisions:ct,delta:{x:Fe.x,y:Fe.y},over:$n};Rp.unstable_batchedUpdates(()=>{Ot?.($t),P({type:"onDragMove",event:$t})})},[Fe.x,Fe.y]),E.useEffect(()=>{const{active:Ot,activatorEvent:rn,collisions:An,droppableContainers:ct,scrollAdjustedTranslate:$n}=Re.current;if(!Ot||ee.current==null||!rn||!$n)return;const{onDragOver:$t}=se.current,yn=ct.get(Qe),dt=yn&&yn.rect.current?{id:yn.id,rect:yn.rect.current,data:yn.data,disabled:yn.disabled}:null,We={active:Ot,activatorEvent:rn,collisions:An,delta:{x:$n.x,y:$n.y},over:dt};Rp.unstable_batchedUpdates(()=>{en(dt),$t?.(We),P({type:"onDragOver",event:We})})},[Qe]),pl(()=>{Re.current={activatorEvent:me,active:te,activeNode:de,collisionRect:Ge,collisions:pt,droppableRects:ge,draggableNodes:q,draggingNode:Ue,draggingNodeRect:Ee,droppableContainers:z,over:mt,scrollableAncestors:rt,scrollAdjustedTranslate:Fe},X.current={initial:Ee,translated:Ge}},[te,de,pt,Ge,q,Ue,Ee,ge,z,mt,rt,Fe]),GIt({...je,delta:J,draggingRect:Ge,pointerCoordinates:Dt,scrollableAncestors:rt,scrollableAncestorRects:qe});const rr=E.useMemo(()=>({active:te,activeNode:de,activeNodeRect:Oe,activatorEvent:me,collisions:pt,containerNodeRect:Ye,dragOverlay:ze,draggableNodes:q,droppableContainers:z,droppableRects:ge,over:mt,measureDroppableContainers:_e,scrollableAncestors:rt,scrollableAncestorRects:qe,measuringConfiguration:ne,measuringScheduled:ue,windowRect:ft}),[te,de,Oe,me,pt,Ye,ze,q,z,ge,mt,_e,rt,qe,ne,ue,ft]),Qr=E.useMemo(()=>({activatorEvent:me,activators:nr,active:te,activeNodeRect:Oe,ariaDescribedById:{draggable:re},dispatch:D,draggableNodes:q,over:mt,measureDroppableContainers:_e}),[me,nr,te,Oe,D,re,q,mt,_e]);return v.createElement(TA.Provider,{value:R},v.createElement(N1.Provider,{value:Qr},v.createElement(YA.Provider,{value:rr},v.createElement(Gv.Provider,{value:at},m)),v.createElement(fOt,{disabled:a?.restoreFocus===!1})),v.createElement(vIt,{...a,hiddenTextDescribedById:re}));function Er(){const Ot=le?.autoScrollEnabled===!1,rn=typeof d=="object"?d.enabled===!1:d===!1,An=N&&!Ot&&!rn;return typeof d=="object"?{...d,enabled:An}:{enabled:An}}}),yOt=E.createContext(null),TL="button",wOt="Draggable";function vOt(t){let{id:e,data:n,disabled:r=!1,attributes:o}=t;const s=R1(wOt),{activators:i,activatorEvent:a,active:d,activeNodeRect:m,ariaDescribedById:_,draggableNodes:h,over:w}=E.useContext(N1),{role:x=TL,roleDescription:S="draggable",tabIndex:C=0}=o??{},M=d?.id===e,D=E.useContext(M?Gv:yOt),[P,R]=Pw(),[W,A]=Pw(),N=aOt(i,e),H=m1(n);pl(()=>(h.set(e,{id:e,key:s,node:P,activatorNode:W,data:H}),()=>{const J=h.get(e);J&&J.key===s&&h.delete(e)}),[h,e]);const q=E.useMemo(()=>({role:x,tabIndex:C,"aria-disabled":r,"aria-pressed":M&&x===TL?!0:void 0,"aria-roledescription":S,"aria-describedby":_.draggable}),[r,x,C,M,S,_.draggable]);return{active:d,activatorEvent:a,activeNodeRect:m,attributes:q,isDragging:M,listeners:r?void 0:N,node:P,over:w,setNodeRef:R,setActivatorNodeRef:A,transform:D}}function UA(){return E.useContext(YA)}const bOt="Droppable",xOt={timeout:25};function qA(t){let{data:e,disabled:n=!1,id:r,resizeObserverConfig:o}=t;const s=R1(bOt),{active:i,dispatch:a,over:d,measureDroppableContainers:m}=E.useContext(N1),_=E.useRef({disabled:n}),h=E.useRef(!1),w=E.useRef(null),x=E.useRef(null),{disabled:S,updateMeasurementsFor:C,timeout:M}={...xOt,...o},D=m1(C??r),P=E.useCallback(()=>{if(!h.current){h.current=!0;return}x.current!=null&&clearTimeout(x.current),x.current=setTimeout(()=>{m(Array.isArray(D.current)?D.current:[D.current]),x.current=null},M)},[M]),R=qv({callback:P,disabled:S||!i}),W=E.useCallback((q,J)=>{R&&(J&&(R.unobserve(J),h.current=!1),q&&R.observe(q))},[R]),[A,N]=Pw(W),H=m1(e);return E.useEffect(()=>{!R||!A.current||(R.disconnect(),h.current=!1,R.observe(A.current))},[A,R]),E.useEffect(()=>(a({type:mo.RegisterDroppable,element:{id:r,key:s,disabled:n,node:A,rect:w,data:H}}),()=>a({type:mo.UnregisterDroppable,key:s,id:r})),[r]),E.useEffect(()=>{n!==_.current.disabled&&(a({type:mo.SetDroppableDisabled,id:r,key:s,disabled:n}),_.current.disabled=n)},[r,s,n,a]),{active:i,rect:w,isOver:d?.id===r,node:A,over:d,setNodeRef:N}}function SOt(t){let{animation:e,children:n}=t;const[r,o]=E.useState(null),[s,i]=E.useState(null),a=Rw(n);return!n&&!r&&a&&o(a),pl(()=>{if(!s)return;const d=r?.key,m=r?.props.id;if(d==null||m==null){o(null);return}Promise.resolve(e(m,s)).then(()=>{o(null)})},[e,r,s]),v.createElement(v.Fragment,null,n,r?E.cloneElement(r,{ref:i}):null)}const COt={x:0,y:0,scaleX:1,scaleY:1};function kOt(t){let{children:e}=t;return v.createElement(N1.Provider,{value:WA},v.createElement(Gv.Provider,{value:COt},e))}const TOt={position:"fixed",touchAction:"none"},MOt=t=>Vv(t)?"transform 250ms ease":void 0,$Ot=E.forwardRef((t,e)=>{let{as:n,activatorEvent:r,adjustScale:o,children:s,className:i,rect:a,style:d,transform:m,transition:_=MOt}=t;if(!a)return null;const h=o?m:{...m,scaleX:1,scaleY:1},w={...TOt,width:a.width,height:a.height,top:a.top,left:a.left,transform:Mu.Transform.toString(h),transformOrigin:o&&r?xIt(r,a):void 0,transition:typeof _=="function"?_(r):_,...d};return v.createElement(n,{className:i,style:w,ref:e},s)}),EOt=t=>e=>{let{active:n,dragOverlay:r}=e;const o={},{styles:s,className:i}=t;if(s!=null&&s.active)for(const[a,d]of Object.entries(s.active))d!==void 0&&(o[a]=n.node.style.getPropertyValue(a),n.node.style.setProperty(a,d));if(s!=null&&s.dragOverlay)for(const[a,d]of Object.entries(s.dragOverlay))d!==void 0&&r.node.style.setProperty(a,d);return i!=null&&i.active&&n.node.classList.add(i.active),i!=null&&i.dragOverlay&&r.node.classList.add(i.dragOverlay),function(){for(const[d,m]of Object.entries(o))n.node.style.setProperty(d,m);i!=null&&i.active&&n.node.classList.remove(i.active)}},DOt=t=>{let{transform:{initial:e,final:n}}=t;return[{transform:Mu.Transform.toString(e)},{transform:Mu.Transform.toString(n)}]},LOt={duration:250,easing:"ease",keyframes:DOt,sideEffects:EOt({styles:{active:{opacity:"0"}}})};function IOt(t){let{config:e,draggableNodes:n,droppableContainers:r,measuringConfiguration:o}=t;return Bv((s,i)=>{if(e===null)return;const a=n.get(s);if(!a)return;const d=a.node.current;if(!d)return;const m=FA(i);if(!m)return;const{transform:_}=Fs(i).getComputedStyle(i),h=DA(_);if(!h)return;const w=typeof e=="function"?e:OOt(e);return RA(d,o.draggable.measure),w({active:{id:s,data:a.data,node:d,rect:o.draggable.measure(d)},draggableNodes:n,dragOverlay:{node:i,rect:o.dragOverlay.measure(m)},droppableContainers:r,measuringConfiguration:o,transform:h})})}function OOt(t){const{duration:e,easing:n,sideEffects:r,keyframes:o}={...LOt,...t};return s=>{let{active:i,dragOverlay:a,transform:d,...m}=s;if(!e)return;const _={x:a.rect.left-i.rect.left,y:a.rect.top-i.rect.top},h={scaleX:d.scaleX!==1?i.rect.width*d.scaleX/a.rect.width:1,scaleY:d.scaleY!==1?i.rect.height*d.scaleY/a.rect.height:1},w={x:d.x-_.x,y:d.y-_.y,...h},x=o({...m,active:i,dragOverlay:a,transform:{initial:d,final:w}}),[S]=x,C=x[x.length-1];if(JSON.stringify(S)===JSON.stringify(C))return;const M=r?.({active:i,dragOverlay:a,...m}),D=a.node.animate(x,{duration:e,easing:n,fill:"forwards"});return new Promise(P=>{D.onfinish=()=>{M?.(),P()}})}}let ML=0;function jOt(t){return E.useMemo(()=>{if(t!=null)return ML++,ML},[t])}const GA=v.memo(t=>{let{adjustScale:e=!1,children:n,dropAnimation:r,style:o,transition:s,modifiers:i,wrapperElement:a="div",className:d,zIndex:m=999}=t;const{activatorEvent:_,active:h,activeNodeRect:w,containerNodeRect:x,draggableNodes:S,droppableContainers:C,dragOverlay:M,over:D,measuringConfiguration:P,scrollableAncestors:R,scrollableAncestorRects:W,windowRect:A}=UA(),N=E.useContext(Gv),H=jOt(h?.id),q=BA(i,{activatorEvent:_,active:h,activeNodeRect:w,containerNodeRect:x,draggingNodeRect:M.rect,over:D,overlayNodeRect:M.rect,scrollableAncestors:R,scrollableAncestorRects:W,transform:N,windowRect:A}),J=kk(w),z=IOt({config:r,draggableNodes:S,droppableContainers:C,measuringConfiguration:P}),K=J?M.setRef:void 0;return v.createElement(kOt,null,v.createElement(SOt,{animation:z},h&&H?v.createElement($Ot,{key:H,id:h.id,ref:K,as:a,activatorEvent:_,adjustScale:e,className:d,transition:s,rect:J,style:{zIndex:m,...o},transform:q},n):null))});function Jv(t,e,n){const r=t.slice();return r.splice(n<0?r.length+n:n,0,r.splice(e,1)[0]),r}function AOt(t,e){return t.reduce((n,r,o)=>{const s=e.get(r);return s&&(n[o]=s),n},Array(t.length))}function k0(t){return t!==null&&t>=0}function POt(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function ROt(t){return typeof t=="boolean"?{draggable:t,droppable:t}:t}const Kv=t=>{let{rects:e,activeIndex:n,overIndex:r,index:o}=t;const s=Jv(e,r,n),i=e[o],a=s[o];return!a||!i?null:{x:a.left-i.left,y:a.top-i.top,scaleX:a.width/i.width,scaleY:a.height/i.height}},JA="Sortable",KA=v.createContext({activeIndex:-1,containerId:JA,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Kv,disabled:{draggable:!1,droppable:!1}});function XA(t){let{children:e,id:n,items:r,strategy:o=Kv,disabled:s=!1}=t;const{active:i,dragOverlay:a,droppableRects:d,over:m,measureDroppableContainers:_}=UA(),h=R1(JA,n),w=a.rect!==null,x=E.useMemo(()=>r.map(N=>typeof N=="object"&&"id"in N?N.id:N),[r]),S=i!=null,C=i?x.indexOf(i.id):-1,M=m?x.indexOf(m.id):-1,D=E.useRef(x),P=!POt(x,D.current),R=M!==-1&&C===-1||P,W=ROt(s);pl(()=>{P&&S&&_(x)},[P,x,S,_]),E.useEffect(()=>{D.current=x},[x]);const A=E.useMemo(()=>({activeIndex:C,containerId:h,disabled:W,disableTransforms:R,items:x,overIndex:M,useDragOverlay:w,sortedRects:AOt(x,d),strategy:o}),[C,h,W.draggable,W.droppable,R,x,M,d,w,o]);return v.createElement(KA.Provider,{value:A},e)}const NOt=t=>{let{id:e,items:n,activeIndex:r,overIndex:o}=t;return Jv(n,r,o).indexOf(e)},zOt=t=>{let{containerId:e,isSorting:n,wasDragging:r,index:o,items:s,newIndex:i,previousItems:a,previousContainerId:d,transition:m}=t;return!m||!r||a!==s&&o===i?!1:n?!0:i!==o&&e===d},HOt={duration:200,easing:"ease"},ZA="transform",FOt=Mu.Transition.toString({property:ZA,duration:0,easing:"linear"}),WOt={roleDescription:"sortable"};function YOt(t){let{disabled:e,index:n,node:r,rect:o}=t;const[s,i]=E.useState(null),a=E.useRef(n);return pl(()=>{if(!e&&n!==a.current&&r.current){const d=o.current;if(d){const m=Hf(r.current,{ignoreTransform:!0}),_={x:d.left-m.left,y:d.top-m.top,scaleX:d.width/m.width,scaleY:d.height/m.height};(_.x||_.y)&&i(_)}}n!==a.current&&(a.current=n)},[e,n,r,o]),E.useEffect(()=>{s&&i(null)},[s]),s}function BOt(t){let{animateLayoutChanges:e=zOt,attributes:n,disabled:r,data:o,getNewIndex:s=NOt,id:i,strategy:a,resizeObserverConfig:d,transition:m=HOt}=t;const{items:_,containerId:h,activeIndex:w,disabled:x,disableTransforms:S,sortedRects:C,overIndex:M,useDragOverlay:D,strategy:P}=E.useContext(KA),R=VOt(r,x),W=_.indexOf(i),A=E.useMemo(()=>({sortable:{containerId:h,index:W,items:_},...o}),[h,o,W,_]),N=E.useMemo(()=>_.slice(_.indexOf(i)),[_,i]),{rect:H,node:q,isOver:J,setNodeRef:z}=qA({id:i,data:A,disabled:R.droppable,resizeObserverConfig:{updateMeasurementsFor:N,...d}}),{active:K,activatorEvent:X,activeNodeRect:te,attributes:ee,setNodeRef:le,listeners:ae,isDragging:me,over:ie,setActivatorNodeRef:se,transform:re}=vOt({id:i,data:A,attributes:{...WOt,...n},disabled:R.draggable}),G=aIt(z,le),ne=!!K,ge=ne&&!S&&k0(w)&&k0(M),_e=!D&&me,ue=_e&&ge?re:null,Te=ge?ue??(a??P)({rects:C,activeNodeRect:te,activeIndex:w,overIndex:M,index:W}):null,je=k0(w)&&k0(M)?s({id:i,items:_,activeIndex:w,overIndex:M}):W,Pe=K?.id,Oe=E.useRef({activeId:Pe,items:_,newIndex:je,containerId:h}),Ye=_!==Oe.current.items,Re=e({active:K,containerId:h,isDragging:me,isSorting:ne,id:i,index:W,items:_,newIndex:Oe.current.newIndex,previousItems:Oe.current.items,previousContainerId:Oe.current.containerId,transition:m,wasDragging:Oe.current.activeId!=null}),Xe=YOt({disabled:!Re,index:W,node:q,rect:H});return E.useEffect(()=>{ne&&Oe.current.newIndex!==je&&(Oe.current.newIndex=je),h!==Oe.current.containerId&&(Oe.current.containerId=h),_!==Oe.current.items&&(Oe.current.items=_)},[ne,je,h,_]),E.useEffect(()=>{if(Pe===Oe.current.activeId)return;if(Pe!=null&&Oe.current.activeId==null){Oe.current.activeId=Pe;return}const Ue=setTimeout(()=>{Oe.current.activeId=Pe},50);return()=>clearTimeout(Ue)},[Pe]),{active:K,activeIndex:w,attributes:ee,data:A,rect:H,index:W,newIndex:je,items:_,isOver:J,isSorting:ne,isDragging:me,listeners:ae,node:q,overIndex:M,over:ie,setNodeRef:G,setActivatorNodeRef:se,setDroppableNodeRef:z,setDraggableNodeRef:le,transform:Xe??Te,transition:ze()};function ze(){if(Xe||Ye&&Oe.current.newIndex===W)return FOt;if(!(_e&&!Vv(X)||!m)&&(ne||Re))return Mu.Transition.toString({...m,property:ZA})}}function VOt(t,e){var n,r;return typeof t=="boolean"?{draggable:t,droppable:!1}:{draggable:(n=t?.draggable)!=null?n:e.draggable,droppable:(r=t?.droppable)!=null?r:e.droppable}}zn.Down,zn.Right,zn.Up,zn.Left;const Tk={fill:"none",stroke:"currentColor",strokeWidth:2};function UOt(){return p.jsx(Y,{component:"svg",width:18,height:18,viewBox:"0 0 18 18",sx:{display:"block"},children:p.jsx("rect",{x:1,y:1,width:16,height:16,rx:3,style:Tk})})}function qOt(){return p.jsx(Y,{component:"svg",width:32,height:18,viewBox:"0 0 32 18",sx:{display:"block"},children:p.jsx("rect",{x:1,y:1,width:30,height:16,rx:3,style:Tk})})}function GOt(){return p.jsx(Y,{component:"svg",width:32,height:12,viewBox:"0 0 32 12",sx:{display:"block"},children:p.jsx("rect",{x:1,y:1,width:30,height:10,rx:3,style:Tk})})}function qg(t){switch(t.type){case"select":return t.default??t.options[0]?.value??"";case"checkbox":return t.default??!0;case"color":return"";case"instanceSelect":return"";case"citySearch":return"";case"text":return t.default??"";case"stateId":return""}}const Ig=[{value:"1x1",label:"1×1",icon:p.jsx(UOt,{})},{value:"2x1",label:"2×1",icon:p.jsx(qOt,{})},{value:"2x0.5",label:"2×½",icon:p.jsx(GOt,{})}],Yw={clock:{name:"wm_Clock",items:{size:{type:"select",label:"wm_Size",options:Ig,default:"1x1",format:"radio"},color:{type:"color",label:"wm_Color"},style:{type:"select",label:"wm_Style",options:[{value:"digital",label:"wm_Digital"},{value:"analog",label:"wm_Analog"}],default:"digital",format:"radio"},showDate:{type:"checkbox",label:"wm_Show date",default:!0},showDow:{type:"checkbox",label:"wm_Show DOW",default:!0},showSeconds:{type:"checkbox",label:"wm_Show seconds",default:!0}}},weather:{name:"wm_Weather",items:{weatherSource:{type:"select",label:"wm_Weather source",options:[{value:"adapter",label:"wm_Adapter"},{value:"openmeteo",label:"Open-Meteo"},{value:"yrno",label:"yr.no"}],default:"adapter",format:"radio"},adapterInstance:{type:"instanceSelect",label:"wm_Adapter instance",adapterNames:["openweathermap","yr","daswetter","weatherunderground"],visibleWhen:{weatherSource:"adapter"}},cityName:{type:"citySearch",label:"wm_City",visibleWhen:{weatherSource:["openmeteo","yrno"]}},size:{type:"select",label:"wm_Size",options:Ig,default:"2x1",format:"radio"},color:{type:"color",label:"wm_Color"}}},iframe:{name:"wm_Iframe",items:{url:{type:"text",label:"URL",placeholder:"wm_URL placeholder"},refreshInterval:{type:"text",label:"wm_Refresh interval",default:"0",helperText:"wm_Refresh interval help",inputType:"number"},appendTimestamp:{type:"checkbox",label:"wm_Append timestamp",default:!1},clickAction:{type:"select",label:"wm_Click action",options:[{value:"dialog",label:"wm_Open in dialog"},{value:"newTab",label:"wm_Open in new tab"},{value:"sameTab",label:"wm_Open in same tab"}],default:"dialog"},size:{type:"select",label:"wm_Size",options:Ig,default:"2x1",format:"radio"},color:{type:"color",label:"wm_Color"}}},wind:{name:"wm_Wind",items:{directionStateId:{type:"stateId",label:"wm_Wind direction"},speedStateId:{type:"stateId",label:"wm_Wind speed"},gustsStateId:{type:"stateId",label:"wm_Wind gusts"},size:{type:"select",label:"wm_Size",options:Ig,default:"1x1",format:"radio"},color:{type:"color",label:"wm_Color"}}}},JOt={lights:p.jsx(pk,{sx:{fontSize:18}}),climate:p.jsx(ul,{sx:{fontSize:18}}),blinds:p.jsx(qDt,{sx:{fontSize:18}}),openings:p.jsx(cf,{sx:{fontSize:18}}),security:p.jsx(SLt,{sx:{fontSize:18}}),info:p.jsx(dLt,{sx:{fontSize:18}}),widgets:p.jsx(BLt,{sx:{fontSize:18}}),other:p.jsx(_Lt,{sx:{fontSize:18}})};function d4(t){return JOt[t]||null}const KOt={temperature:null,humidity:null,motionActive:!1,openings:[],lowBatteryDevices:[]};function Bw(t,e){if(t.type==="category")return"1 / -1";let n;if(t.type==="widget")n=e[t.id]?.size||"1x1";else{const r=t.data,o=Yw[r.type]?.items.size;n=r.size||(o?String(qg(o)):"1x1")}if(n==="2x0.5"||n==="2x1")return"span 2"}function QA(t){const{id:e,gridColumn:n,isDragging:r,favorite:o,onToggleFavorite:s,children:i}=t,{attributes:a,listeners:d,setNodeRef:m,setActivatorNodeRef:_,transform:h,transition:w}=BOt({id:e}),x={position:"relative",gridColumn:n||void 0,opacity:r?.25:1,transform:Mu.Transform.toString(h),transition:w||void 0};return p.jsxs("div",{ref:m,style:x,...a,children:[p.jsx(Y,{ref:_,...d,sx:S=>({position:"absolute",top:4,left:4,p:"2px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",cursor:"grab",zIndex:3,color:S.palette.text.secondary,opacity:.5,transition:"opacity 0.2s, background-color 0.2s","&:hover":{opacity:1,backgroundColor:S.palette.action.hover}}),children:p.jsx(eLt,{sx:{fontSize:16}})}),s?p.jsx(Y,{component:"span",role:"button",tabIndex:0,onClick:S=>{S.stopPropagation(),s(e)},onKeyDown:S=>{(S.key==="Enter"||S.key===" ")&&(S.stopPropagation(),s(e))},sx:S=>({position:"absolute",top:4,left:24,p:"2px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",zIndex:3,color:o?"#ffc107":S.palette.text.secondary,opacity:o?.9:.4,transition:"opacity 0.2s, color 0.2s","&:hover":{opacity:1}}),children:o?p.jsx(kLt,{sx:{fontSize:16}}):p.jsx(TLt,{sx:{fontSize:16}})}):null,i]})}function XOt(t){const{id:e,children:n}=t,{setNodeRef:r,isOver:o}=qA({id:`drop-cat:${e}`});return p.jsx("div",{ref:r,style:{borderRadius:16,outline:o?"2px dashed #4dabf5":"none",outlineOffset:-2,backgroundColor:o?"rgba(77, 171, 245, 0.08)":void 0,transition:"outline 0.15s ease, background-color 0.15s ease"},children:n})}function ZOt(t){const{category:e,canDrag:n,categoryId:r,onOrderChange:o,onMoveWidgetToCategory:s,widgetSettings:i,onToggleFavorite:a}=t,d=e.getOrderedItems(),m=E.useMemo(()=>d.map(X=>X.id),[d]),[_,h]=E.useState(m),[w,x]=E.useState(null),S=E.useRef(_);S.current=_;const C=E.useRef(m);if(C.current!==m){C.current=m;const X=new Set(_),te=new Set(m);(_.length!==m.length||m.some(ee=>!X.has(ee))||_.some(ee=>!te.has(ee)))&&h(m)}const M=MA(Fw(Uv,{activationConstraint:{distance:5}}),Fw(Ck,{activationConstraint:{delay:200,tolerance:5}})),D=E.useMemo(()=>{const X=new Map;for(const te of d)X.set(te.id,te);return X},[d]),[P,R]=E.useState(null),W=E.useRef(null);W.current=P;const A=E.useCallback(X=>{x(String(X.active.id)),R(null)},[]),N=E.useCallback(X=>{const{active:te,over:ee}=X;if(!ee||te.id===ee.id)return;const le=String(ee.id),ae=D.get(String(te.id)),me=D.get(le);if(ae&&ae.type!=="category"&&me?.type==="category"&&s){R(le);return}if(le.startsWith("drop-cat:")&&ae&&ae.type!=="category"&&s){R(le.replace("drop-cat:",""));return}R(null),h(ie=>{const se=ie.indexOf(String(te.id)),re=ie.indexOf(le);return se<0||re<0?ie:Jv(ie,se,re)})},[D,s]),H=E.useCallback(X=>{x(null);const te=W.current;if(R(null),te&&s){s(String(X.active.id),te);return}const ee=S.current;ee.some((le,ae)=>le!==C.current[ae])&&o?.(r,ee)},[r,o,s]),q=E.useCallback(()=>{x(null),R(null),h(m)},[m]),J=_.map(X=>D.get(X)).filter(Boolean),z=w?D.get(w):null,K=(X,te)=>{if(X.type==="category"){const ee=e.renderCategoryTile(X.data);return te?p.jsx("div",{style:{borderRadius:16,outline:"2px dashed #4dabf5",outlineOffset:-2,backgroundColor:"rgba(77, 171, 245, 0.08)",transition:"outline 0.15s ease, background-color 0.15s ease"},children:ee}):ee}return X.type==="widget"?e.renderWidget(X.data):e.renderCustomWidget(X.data)};return n?p.jsxs(VA,{sensors:M,collisionDetection:$A,onDragStart:A,onDragOver:N,onDragEnd:H,onDragCancel:q,children:[p.jsx(XA,{items:_,strategy:Kv,children:p.jsx(Y,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(135px, 1fr))",gap:1.5},children:J.map(X=>p.jsx(QA,{id:X.id,gridColumn:Bw(X,i),isDragging:X.id===w,favorite:X.type!=="category"?i[X.id]?.favorite:void 0,onToggleFavorite:X.type!=="category"?a:void 0,children:K(X,X.type==="category"&&X.id===P)},X.id))})}),p.jsx(GA,{dropAnimation:null,children:z?p.jsx(Y,{sx:{opacity:.85,pointerEvents:"none"},children:K(z)}):null})]}):p.jsx(Y,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(135px, 1fr))",gap:1.5},children:J.map(X=>{const te=Bw(X,i);return te?p.jsx("div",{style:{gridColumn:te},children:K(X)},X.id):p.jsx(v.Fragment,{children:K(X)},X.id)})})}function $L(t){const{category:e,items:n,canDrag:r,groupId:o,onOrderChange:s,onMoveWidgetToCategory:i,categoryItems:a,widgetSettings:d,onToggleFavorite:m}=t,_=E.useMemo(()=>n.map(ee=>ee.id),[n]),[h,w]=E.useState(_),[x,S]=E.useState(null),[C,M]=E.useState(null),D=E.useRef(null);D.current=C;const P=E.useRef(h);P.current=h;const R=E.useRef(_);if(R.current!==_){R.current=_;const ee=new Set(h),le=new Set(_);(h.length!==_.length||_.some(ae=>!ee.has(ae))||h.some(ae=>!le.has(ae)))&&w(_)}const W=MA(Fw(Uv,{activationConstraint:{distance:5}}),Fw(Ck,{activationConstraint:{delay:200,tolerance:5}})),A=E.useCallback(ee=>{S(String(ee.active.id)),M(null)},[]),N=E.useCallback(ee=>{const{active:le,over:ae}=ee;if(!ae||le.id===ae.id)return;const me=String(ae.id);if(me.startsWith("drop-cat:")&&i){M(me.replace("drop-cat:",""));return}M(null),w(ie=>{const se=ie.indexOf(String(le.id)),re=ie.indexOf(me);return se<0||re<0?ie:Jv(ie,se,re)})},[i]),H=E.useCallback(ee=>{S(null);const le=D.current;if(M(null),le&&i){i(String(ee.active.id),le);return}const ae=P.current;ae.some((me,ie)=>me!==R.current[ie])&&s?.(o,ae)},[o,s,i]),q=E.useCallback(()=>{S(null),M(null),w(_)},[_]),J=E.useMemo(()=>{const ee=new Map;for(const le of n)ee.set(le.id,le);return ee},[n]),z=h.map(ee=>J.get(ee)).filter(Boolean),K=x?J.get(x):null,X=ee=>ee.type==="category"?e.renderCategoryTile(ee.data):ee.type==="widget"?e.renderWidget(ee.data):e.renderCustomWidget(ee.data);if(!r)return p.jsx(Y,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(135px, 1fr))",gap:1.5},children:z.map(ee=>{const le=Bw(ee,d);return le?p.jsx("div",{style:{gridColumn:le},children:X(ee)},ee.id):p.jsx(v.Fragment,{children:X(ee)},ee.id)})});const te=!!x&&!!i&&!!a?.length;return p.jsxs(VA,{sensors:W,collisionDetection:$A,onDragStart:A,onDragOver:N,onDragEnd:H,onDragCancel:q,children:[te?p.jsx(Y,{sx:{mb:1,display:"flex",flexDirection:"column",gap:1},children:a.map(ee=>p.jsx(XOt,{id:ee.id,children:e.renderCategoryTile(ee.data)},`drop-${ee.id}`))}):null,p.jsx(XA,{items:h,strategy:Kv,children:p.jsx(Y,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(135px, 1fr))",gap:1.5},children:z.map(ee=>p.jsx(QA,{id:ee.id,gridColumn:Bw(ee,d),isDragging:ee.id===x,favorite:ee.type!=="category"?d[ee.id]?.favorite:void 0,onToggleFavorite:ee.type!=="category"?m:void 0,children:X(ee)},ee.id))})}),p.jsx(GA,{dropAnimation:null,children:K?p.jsx(Y,{sx:{opacity:.85,pointerEvents:"none"},children:X(K)}):null})]})}function QOt(t){const{widgetIds:e,widgets:n,stateContext:r}=t,o=E.useMemo(()=>{const _=[];for(const h of e){const w=n.find(A=>String(A.id)===h);if(!w?.control?.states)continue;const x=w.control.states,S=x.find(A=>A.name==="ON_SET"),C=x.find(A=>A.name==="ON"),M=x.find(A=>A.name==="SET"),D=x.find(A=>A.name==="ON_ACTUAL"),P=x.find(A=>A.name==="ACTUAL"),R=S?.id??C?.id??M?.id,W=D?.id??S?.id??C?.id??P?.id??R;R&&W&&_.push({widgetId:h,setId:R,listenId:W})}return _},[e,n]),[s,i]=E.useState(0),a=E.useRef({});if(E.useEffect(()=>{if(!o.length)return;const _=[];a.current={};for(const h of o){const w=(x,S)=>{const C=!!S.val;if(a.current[h.widgetId]!==C){a.current[h.widgetId]=C;const M=Object.values(a.current).filter(D=>D).length;i(M)}};r.getState(h.listenId,w),_.push({id:h.listenId,handler:w})}return()=>{for(const h of _)r.removeState(h.id,h.handler);a.current={}}},[o,r]),o.length===0)return null;const d=s>0,m=_=>{_.stopPropagation();const h=!d,w=r.getSocket();for(const x of o)w.setState(x.setId,h)};return p.jsx(ht,{title:d?B.t("wm_Turn all off"):B.t("wm_Turn all on"),children:p.jsx(st,{onClick:m,size:"small",sx:{ml:"auto",p:.5},children:d?p.jsx(pk,{sx:{fontSize:20,color:"warning.main"}}):p.jsx(hk,{sx:{fontSize:20,color:"text.disabled"}})})})}function ejt(t){const{category:e,groups:n,canDrag:r,categoryId:o,onGroupsChange:s,onMoveWidgetToCategory:i,widgetSettings:a,configMode:d,onToggleFavorite:m}=t,_=e.getOrderedItems(),h=E.useMemo(()=>{const D=new Map;for(const P of _)D.set(P.id,P);return D},[_]),w=_.filter(D=>D.type==="category"),x=D=>{if(!s)return;const P=n.map(R=>R.id===D?{...R,collapsed:!R.collapsed}:R);s(o,P)},S=(D,P)=>{if(!s)return;const R=n.map(W=>W.id===D?{...W,widgetIds:P}:W);s(o,R)},C=new Set(n.flatMap(D=>D.widgetIds)),M=_.filter(D=>D.type!=="category"&&!C.has(D.id));return p.jsxs(p.Fragment,{children:[w.length>0?p.jsx(Y,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(135px, 1fr))",gap:1.5,mb:2},children:w.map(D=>p.jsx("div",{style:{gridColumn:"1 / -1"},children:e.renderCategoryTile(D.data)},D.id))}):null,n.map(D=>{const P=D.widgetIds.map(R=>h.get(R)).filter(Boolean);return P.length===0?null:p.jsxs(Y,{sx:{mb:1.5,...!d&&!D.collapsed&&{'&:not(:has([class^="widget-"]))':{display:"none"}}},children:[p.jsxs(Y,{sx:{display:"flex",alignItems:"center",mb:D.collapsed?0:.5},children:[p.jsxs(vr,{onClick:()=>x(D.id),sx:{display:"flex",alignItems:"center",gap:.5,flex:1,justifyContent:"flex-start",py:.5,px:1,borderRadius:1},children:[p.jsx(oLt,{sx:{fontSize:18,color:"text.secondary",transform:D.collapsed?"rotate(-90deg)":"rotate(0)",transition:"transform 0.2s"}}),(()=>{const R=d4(D.id);return R?v.cloneElement(R,{sx:{fontSize:18,color:"text.secondary"}}):null})(),p.jsx(oe,{variant:"subtitle2",sx:{fontWeight:600,color:"text.secondary"},children:B.t(D.name)}),p.jsxs(oe,{variant:"caption",sx:{ml:.5,opacity:.5,color:"text.secondary"},children:["(",P.length,")"]})]}),D.id==="lights"?p.jsx(QOt,{widgetIds:D.widgetIds,widgets:e.props.widgets,stateContext:e.props.stateContext}):null]}),D.collapsed?null:p.jsx($L,{category:e,items:P,canDrag:r,groupId:D.id,onOrderChange:s?S:void 0,onMoveWidgetToCategory:i,categoryItems:w,widgetSettings:a,onToggleFavorite:m})]},D.id)}),M.length>0?p.jsxs(Y,{sx:{mb:1.5},children:[p.jsx(oe,{variant:"subtitle2",sx:{fontWeight:600,color:"text.secondary",px:1,py:.5},children:B.t("wm_group_Other")}),p.jsx($L,{category:e,items:M,canDrag:r,groupId:"__ungrouped__",onMoveWidgetToCategory:i,categoryItems:w,widgetSettings:a,onToggleFavorite:m})]}):null]})}class ma extends E.Component{internalValues={names:{},icons:{},colors:{}};statusSubs=[];statusValues={};scrollRef=v.createRef();parallaxRef=v.createRef();scrollSaveTimer=null;constructor(e){super(e),this.state={names:{},icons:{},colors:{},categoryStatus:{...KOt},subCategoryStatuses:{}}}get widgets(){return this.props.widgets.filter(e=>e.parent===this.props.category.id)}get subCategories(){return this.props.categories.filter(e=>e.parent===this.props.category.id)}readCategorySettings(e,n){e.name&&typeof e.name=="object"?e.name.objectId?this.props.stateContext.getObjectProperty(e.name.objectId,e.name.property,this.onNameChange):n.names[e.id]=this.getText(e.name):typeof typeof e.name=="string"&&(n.names[e.id]=e.name),n.names[e.id]||=e.id==="__root__"?"ioBroker":e.id.toString().split(".").pop()||"",e.icon&&typeof e.icon=="object"?e.icon.stateId&&this.props.stateContext.getState(e.icon.stateId,this.onIconChange):typeof e.icon=="string"&&(n.icons[e.id]=e.icon),e.color&&typeof e.color=="object"?e.color.stateId&&this.props.stateContext.getState(e.color.stateId,this.onColorChange):typeof e.color=="string"&&(n.colors[e.id]=e.color)}componentDidMount(){this.internalValues={names:{},icons:{},colors:{}},this.readCategorySettings(this.props.category,this.internalValues),this.subCategories.forEach(e=>this.readCategorySettings(e,this.internalValues)),this.setState({...this.internalValues}),this.subscribeCategoryStatus(),requestAnimationFrame(()=>this.restoreScrollPosition())}componentWillUnmount(){this.saveScrollPosition(),this.scrollSaveTimer&&clearTimeout(this.scrollSaveTimer);for(const e of this.statusSubs)this.props.stateContext.removeState(e.stateId,this.onStatusChange)}get scrollStorageKey(){return`wm_scroll_${String(this.props.category.id)}`}static getOrientation(){return window.innerHeight>=window.innerWidth?"portrait":"landscape"}saveScrollPosition(){const e=this.scrollRef.current;if(e)try{localStorage.setItem(this.scrollStorageKey,JSON.stringify({top:e.scrollTop,orientation:ma.getOrientation()}))}catch{}}restoreScrollPosition(){const e=this.scrollRef.current;if(e)try{const n=localStorage.getItem(this.scrollStorageKey);if(n){const{top:r,orientation:o}=JSON.parse(n);o===ma.getOrientation()&&typeof r=="number"&&(e.scrollTop=r)}}catch{}}onScroll=()=>{if(this.scrollSaveTimer&&clearTimeout(this.scrollSaveTimer),this.scrollSaveTimer=setTimeout(()=>{this.scrollSaveTimer=null,this.saveScrollPosition()},300),this.parallaxRef.current&&this.scrollRef.current){const e=this.scrollRef.current.scrollTop;this.parallaxRef.current.style.transform=`translateY(${e*-.25}px) scale(1.15)`}};getWidgetName(e){return typeof e.name=="string"?e.name||"":e.name&&typeof e.name=="object"&&e.name.en?this.getText(e.name):""}subscribeWidgetsForStatus(e,n){for(const r of e){const o=r.control?.type;if(!o)continue;let s=null;if(o===Ae.Types.temperature?s="temperature":o===Ae.Types.humidity?s="humidity":o===Ae.Types.motion?s="motion":o===Ae.Types.window?s="window":o===Ae.Types.door&&(s="door"),s){const m=r.control.states.find(_=>_.name==="ACTUAL");if(m?.id&&!this.statusSubs.some(_=>_.stateId===m.id&&_.categoryId===n)){const _=s==="window"||s==="door";this.statusSubs.push({stateId:m.id,role:s,widgetName:_?this.getWidgetName(r):void 0,widgetIcon:_&&typeof r.icon=="string"?r.icon:void 0,widgetId:_?String(r.id):void 0,categoryId:n}),this.props.stateContext.getState(m.id,this.onStatusChange)}if(o===Ae.Types.temperature){const _=r.control.states.find(h=>h.name==="SECOND");_?.id&&!this.statusSubs.some(h=>h.stateId===_.id&&h.categoryId===n)&&(this.statusSubs.push({stateId:_.id,role:"humidity",categoryId:n}),this.props.stateContext.getState(_.id,this.onStatusChange))}}else{const m=r.control.states.find(_=>_.name==="ACTUAL")||r.control.states.find(_=>_.name==="SET")||r.control.states.find(_=>_.name==="ON");m?.id&&!this.statusSubs.some(_=>_.stateId===m.id&&_.categoryId===n)&&(this.statusSubs.push({stateId:m.id,role:"sensor",widgetId:String(r.id),categoryId:n}),this.props.stateContext.getState(m.id,this.onStatusChange))}const i=this.getWidgetName(r),a=r.control.states.find(m=>m.name==="LOWBAT");a?.id&&!this.statusSubs.some(m=>m.stateId===a.id&&m.categoryId===n)&&(this.statusSubs.push({stateId:a.id,role:"lowbat",widgetName:i,categoryId:n}),this.props.stateContext.getState(a.id,this.onStatusChange));const d=r.control.states.find(m=>m.name==="BATTERY");d?.id&&!this.statusSubs.some(m=>m.stateId===d.id&&m.categoryId===n)&&(this.statusSubs.push({stateId:d.id,role:"battery",widgetName:i,categoryId:n}),this.props.stateContext.getState(d.id,this.onStatusChange))}}subscribeCategoryStatus(){this.statusSubs=[],this.statusValues={};const e=this.props.widgets.filter(n=>n.parent===this.props.category.id);this.subscribeWidgetsForStatus(e);for(const n of this.subCategories){const r=this.props.widgets.filter(o=>o.parent===n.id);this.subscribeWidgetsForStatus(r,String(n.id))}}onStatusChange=(e,n)=>{this.statusValues[e]=n.val,this.recalcCategoryStatus()};static toOpeningState(e){return typeof e=="number"&&e===2?2:e?1:0}static computeStatus(e,n){let r=null,o=null,s=!1;const i=[],a=[],d=new Set;for(const m of e){const _=n[m.stateId];switch(m.role){case"temperature":if(r===null&&_!=null){const h=Number(_);isNaN(h)||(r=h)}break;case"humidity":if(o===null&&_!=null){const h=Number(_);isNaN(h)||(o=h)}break;case"motion":_&&(s=!0);break;case"window":case"door":i.push({stateId:m.stateId,kind:m.role==="door"?"door":"window",name:m.widgetName||"",state:_!=null?ma.toOpeningState(_):0,icon:m.widgetIcon,widgetId:m.widgetId});break;case"lowbat":_&&m.widgetName&&!d.has(m.widgetName)&&(d.add(m.widgetName),a.push({name:m.widgetName,level:null}));break;case"battery":{const h=_!=null?Number(_):null;h!=null&&!isNaN(h)&&h<30&&m.widgetName&&!d.has(m.widgetName)&&(d.add(m.widgetName),a.push({name:m.widgetName,level:Math.round(h)}));break}}}return{temperature:r,humidity:o,motionActive:s,openings:i,lowBatteryDevices:a}}recalcCategoryStatus(){const e=this.statusSubs.filter(s=>!s.categoryId),n=ma.computeStatus(e,this.statusValues),r={},o=new Set(this.statusSubs.map(s=>s.categoryId).filter(Boolean));for(const s of o){const i=this.statusSubs.filter(a=>a.categoryId===s);r[s]=ma.computeStatus(i,this.statusValues)}this.setState({categoryStatus:n,subCategoryStatuses:r})}onNameChange=(e,n,r)=>{const o=this.getText(r),s=this.props.category.name;let i=!1;this.props.category.name&&typeof this.props.category.name=="object"&&s.objectId&&s.objectId===e&&s.property===n&&o!==this.internalValues.names[this.props.category.id]&&(this.internalValues.names[this.props.category.id]=o,i=!0),this.subCategories.forEach(a=>{if(a.name&&typeof a.name=="object"){const d=a.name;d.objectId===e&&d.property===n&&o!==this.internalValues.names[a.id]&&(this.internalValues.names[a.id]=o,i=!0)}}),i&&this.setState({names:this.internalValues.names})};onColorChange=(e,n)=>{let r=!1;if(this.props.category.color&&typeof this.props.category.color=="object"){const o=this.props.category.color;if(o.stateId===e){let s="";o.mapping&&o.mapping[n.val]?s=o.mapping[n.val]:n.val!==void 0&&n.val!==null&&(s=n.val||""),s!==this.internalValues.colors[this.props.category.id]&&(this.internalValues.colors[this.props.category.id]=s,r=!0)}}this.subCategories.forEach(o=>{if(o.color&&typeof o.color=="object"){const s=o.color;if(s.stateId===e){let i="";s.mapping&&s.mapping[n.val]?i=s.mapping[n.val]:n.val!==void 0&&n.val!==null&&(i=n.val||""),i!==this.internalValues.colors[o.id]&&(this.internalValues.colors[o.id]=i,r=!0)}}}),r&&this.setState({colors:this.internalValues.colors})};onIconChange=(e,n)=>{let r=!1;if(this.props.category.icon&&typeof this.props.category.icon=="object"){const o=this.props.category.icon;if(o.stateId===e){let s="";o.mapping&&o.mapping[n.val]?s=o.mapping[n.val]:n.val!==void 0&&n.val!==null&&(s=n.val||""),s!==this.internalValues.icons[this.props.category.id]&&(this.internalValues.icons[this.props.category.id]=s,r=!0)}}this.subCategories.forEach(o=>{if(o.icon&&typeof o.icon=="object"){const s=o.icon;if(s.stateId===e){let i="";s.mapping&&s.mapping[n.val]?i=s.mapping[n.val]:n.val!==void 0&&n.val!==null&&(i=n.val||""),i!==this.internalValues.icons[o.id]&&(this.internalValues.icons[o.id]=i,r=!0)}}}),r&&this.setState({icons:this.internalValues.icons})};getOrderedItems(){const e=String(this.props.category.id),n=this.props.categorySettings[e],r=n?.customWidgets||[],o=n?.widgetOrder,s=[...this.subCategories.map(m=>({type:"category",id:String(m.id),data:m})),...this.widgets.map(m=>({type:"widget",id:String(m.id),data:m})),...r.map(m=>({type:"custom",id:m.id,data:m}))];if(!o?.length)return s;const i=new Map(o.map((m,_)=>[m,_])),a=s.filter(m=>i.has(m.id)).sort((m,_)=>i.get(m.id)-i.get(_.id)),d=s.filter(m=>!i.has(m.id));return[...a,...d]}getText(e){return typeof e=="object"?e[this.props.language]||e.en:e}renderWidget(e){let n;if(e.control&&e.control.type===Ae.Types.socket?n=gA:e.control&&e.control.type===Ae.Types.light?n=s7t:e.control&&e.control.type===Ae.Types.dimmer?n=i7t:e.control&&e.control.type===Ae.Types.temperature?n=jw:e.control&&e.control.type===Ae.Types.motion?n=u7t:e.control&&e.control.type===Ae.Types.window?n=yA:e.control&&e.control.type===Ae.Types.blind?n=m7t:e.control&&e.control.type===Ae.Types.blindButtons?n=f7t:e.control&&e.control.type===Ae.Types.lock?n=g7t:e.control&&e.control.type===Ae.Types.door?n=y7t:e.control&&e.control.type===Ae.Types.floodAlarm?n=w7t:e.control&&e.control.type===Ae.Types.fireAlarm?n=v7t:e.control&&e.control.type===Ae.Types.humidity?n=_k:e.control&&e.control.type===Ae.Types.illuminance?n=gk:e.control&&e.control.type===Ae.Types.thermostat?n=Un:e.control&&e.control.type===Ae.Types.airCondition?n=gn:e.control&&e.control.type===Ae.Types.warning?n=_7t:e.control&&(e.control.type===Ae.Types.volume||e.control.type===Ae.Types.volumeGroup)?n=k7t:e.control&&(e.control.type===Ae.Types.slider||e.control.type===Ae.Types.percentage)?n=H7t:e.control?.type===Ae.Types.info&&e.control.states.some(o=>o.name==="ACTUAL"&&/value\.fill|level\.tank|tank/i.test(o.stateRole||""))?n=F7t:e.control&&e.control.type===Ae.Types.image?n=W7t:e.control&&e.control.type===Ae.Types.info?n=ha:e.control&&(e.control.type===Ae.Types.location||e.control.type===Ae.Types.locationOne)?n=Aw:e.control&&e.control.type===Ae.Types.weatherCurrent?n=B7t:e.control&&e.control.type===Ae.Types.weatherForecast?n=jp:e.control&&(e.control.type===Ae.Types.rgbSingle||e.control.type===Ae.Types.rgbwSingle||e.control.type===Ae.Types.rgb||e.control.type===Ae.Types.hue||e.control.type===Ae.Types.cie||e.control.type===Ae.Types.ct)&&(n=D7t),!n){const s=this.props.widgetSettings[String(e.id)]?.size||"1x1",i=e.control?.type||"?";return p.jsxs(Y,{id:String(e.id),sx:a=>({position:"relative",...s==="2x0.5"?{gridColumn:"span 2",height:80}:s==="2x1"?{gridColumn:"span 2",aspectRatio:"2"}:{aspectRatio:"1"},display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:1,p:2,borderRadius:3,border:"2px dashed",borderColor:"error.main",backgroundColor:Tt(a.palette.error.main,.08),textAlign:"center",overflow:"hidden"}),children:[p.jsx(rLt,{sx:{fontSize:32,color:"error.main",opacity:.7}}),p.jsx(oe,{variant:"caption",sx:{color:"error.main",fontWeight:500,lineHeight:1.3},children:B.t("wm_Widget type not supported").replace("%s",i)}),this.props.onDeleteWidgetById?p.jsx(ht,{title:B.t("wm_Delete"),children:p.jsx(st,{size:"small",color:"error",onClick:()=>this.props.onDeleteWidgetById(e.id),children:p.jsx(Do,{fontSize:"small"})})}):null]},e.id)}const r=this.props.widgetSettings[String(e.id)];return p.jsx(n,{stateContext:this.props.stateContext,widget:e,language:this.props.language,settings:r,onOpenSettings:this.props.onOpenSettings,defaultHistory:this.props.defaultHistory,instanceId:this.props.instanceId},e.id)}renderCustomWidget(e){const n=String(this.props.category.id),r=this.props.onOpenCustomWidgetSettings?()=>this.props.onOpenCustomWidgetSettings(n,e.id):void 0,o=this.props.onRemoveCustomWidget?()=>this.props.onRemoveCustomWidget(n,e.id):void 0;switch(e.type){case"clock":return p.jsx(C7t,{id:e.id,language:this.props.language,size:e.size,color:e.color,style:e.style,showDate:e.showDate,showDow:e.showDow,showSeconds:e.showSeconds,onOpenSettings:r,onRemove:o,latitude:this.props.latitude,longitude:this.props.longitude},e.id);case"weather":return p.jsx(rd,{id:e.id,weatherSource:e.weatherSource,adapterInstance:e.adapterInstance,latitude:e.latitude,longitude:e.longitude,cityName:e.cityName,language:this.props.language,size:e.size,color:e.color,stateContext:this.props.stateContext,onOpenSettings:r,onRemove:o},e.id);case"iframe":return p.jsx(tf,{id:e.id,url:e.url,refreshInterval:e.refreshInterval,appendTimestamp:e.appendTimestamp,clickAction:e.clickAction,size:e.size,color:e.color,onOpenSettings:r,onRemove:o},e.id);case"wind":return p.jsx(od,{id:e.id,language:this.props.language,directionStateId:e.directionStateId,speedStateId:e.speedStateId,gustsStateId:e.gustsStateId,size:e.size,color:e.color,stateContext:this.props.stateContext,onOpenSettings:r,onRemove:o},e.id);default:return null}}renderWidgetIconPreviews(e){const n=new Set([Ae.Types.floodAlarm,Ae.Types.fireAlarm,Ae.Types.warning]),r=this.props.widgets.filter(s=>s.parent===e.id&&s.control?.type&&n.has(s.control.type));if(!r.length)return null;const o=[];for(const s of r){if(o.length>=8)break;const i=s.control.states.find(h=>h.name==="ACTUAL")||s.control.states.find(h=>h.name==="SET")||s.control.states.find(h=>h.name==="ON");if(i?.id){if(!this.statusValues[i.id])continue}else continue;const a=typeof s.name=="object"?s.name[B.getLanguage()]||s.name.en||"":String(s.name||""),d=this.props.widgetSettings[String(s.id)],m=d?.iconActive||d?.iconInactive||d?.icon||(typeof s.icon=="string"?s.icon:void 0),_=d?.color;o.push({id:s.id,src:m,name:a,type:s.control.type,color:_})}return o.length?p.jsx(Y,{sx:{display:"flex",alignItems:"center",gap:.5,mt:.25},children:o.map(s=>p.jsx(ht,{title:s.name,children:p.jsx(Y,{sx:{display:"flex"},children:s.src?p.jsx(Gn,{src:s.src,style:{width:16,height:16,color:s.color||void 0}}):ma.renderDefaultTypeIcon(s.type,16)})},s.id))}):null}renderSubCategoryStatus(e,n){const r=this.state.subCategoryStatuses[String(e.id)],o=r?r.openings.filter(a=>a.state!==0):[],s=r&&(r.temperature!==null||r.humidity!==null||r.motionActive||o.length>0||r.lowBatteryDevices.length>0),i=this.renderWidgetIconPreviews(e);return s?p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:1,flexWrap:"wrap",mt:.25},children:[r.temperature!==null?p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:"2px"},children:[p.jsx(ul,{sx:{fontSize:14,color:"text.secondary"}}),p.jsxs(oe,{variant:"caption",sx:{color:"text.secondary",fontWeight:500},children:[r.temperature.toFixed(1),"°"]})]}):null,r.humidity!==null?p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:"2px"},children:[p.jsx(Hs,{sx:{fontSize:14,color:"text.secondary"}}),p.jsxs(oe,{variant:"caption",sx:{color:"text.secondary",fontWeight:500},children:[Math.round(r.humidity),"%"]})]}):null,r.motionActive?p.jsx(ht,{title:B.t("wm_Motion"),children:p.jsx(B0,{sx:{fontSize:16,color:"warning.main"}})}):null,o.length>0?p.jsx(Y,{sx:{display:"flex",alignItems:"center",gap:"3px"},children:o.map(a=>{const d=a.widgetId?this.props.widgetSettings[a.widgetId]:void 0,_=(d?d.iconActive||d.iconInactive||d.icon:void 0)||a.icon,h=d?.color,w=ma.getOpeningColor(a),x=h||w,S=d?.textActive,C=S?`${a.name}: ${S}`:ma.getOpeningTooltip(a);return p.jsx(ht,{title:C,children:_?p.jsx(Y,{sx:{display:"flex"},children:p.jsx(Gn,{src:_,style:{width:16,height:16,color:x}})}):a.kind==="door"?p.jsx(Bp,{sx:{fontSize:16,color:x,transition:"color 0.25s ease"}}):p.jsx(cf,{sx:{fontSize:16,color:x,transform:a.state===2?"rotate(15deg)":void 0,transition:"color 0.25s ease"}})},a.stateId)})}):null,r.lowBatteryDevices.length>0?p.jsx(ht,{title:r.lowBatteryDevices.map(a=>`${a.name}${a.level!=null?`: ${a.level}%`:""}`).join(", "),children:p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:"2px"},children:[p.jsx(Lw,{sx:{fontSize:16,color:"error.main"}}),r.lowBatteryDevices.length>1?p.jsx(oe,{variant:"caption",sx:{color:"error.main",fontWeight:600},children:r.lowBatteryDevices.length}):null]})}):null,i]}):i||(n>0?p.jsx(oe,{variant:"caption",sx:{color:"text.secondary"},children:n===1?B.t("wm_one_device"):B.t("wm_n_devices",n.toString())}):p.jsx(p.Fragment,{}))}renderCategoryTile(e){const n=this.state.icons[e.id],r=this.state.names[e.id]??"...",o=this.props.categorySettings[String(e.id)],s=this.state.colors[e.id]||o?.color,i=o?.image,a=i?`/${this.props.admin?"files/":""}${i.replace(/^\//,"")}`:"",d=this.props.widgets.filter(m=>m.parent===e.id).length;return p.jsxs(vr,{id:String(e.id),component:"div",onClick:()=>this.props.onNavigate(e),sx:m=>({display:"flex",alignItems:"center",gap:2,width:"100%",gridColumn:"1 / -1",textAlign:"left",overflow:"hidden",borderRadius:"16px",p:2,position:"relative",transition:"all 0.25s cubic-bezier(0.4, 0, 0.2, 1)",backgroundColor:m.palette.mode==="dark"?"rgba(255,255,255,0.04)":"rgba(0,0,0,0.02)",borderLeft:`3px solid ${s||m.palette.primary.main}`,...a?{backgroundImage:`url(${a})`,backgroundSize:"cover",backgroundPosition:"center"}:{},"&:hover":{backgroundColor:m.palette.mode==="dark"?"rgba(255,255,255,0.07)":"rgba(0,0,0,0.04)"},"&:active":{transform:"scale(0.99)"},...a?{"&::before":{content:'""',position:"absolute",inset:0,backgroundColor:Tt(m.palette.background.default,.75),borderRadius:"inherit"}}:{}}),children:[n?p.jsx(Gn,{src:n,style:{width:28,height:28,flexShrink:0,color:s||void 0,position:"relative",zIndex:1}}):p.jsx(Ow,{sx:m=>({fontSize:28,color:s||m.palette.primary.main,flexShrink:0,position:"relative",zIndex:1})}),p.jsxs(Y,{sx:{flex:1,minWidth:0,position:"relative",zIndex:1},children:[p.jsx(oe,{variant:"body1",sx:{fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:s||void 0},children:r}),this.renderSubCategoryStatus(e,d)]}),p.jsx(JDt,{sx:{color:"text.secondary",flexShrink:0,position:"relative",zIndex:1}})]},e.id)}static getOpeningTooltip(e){const n=e.name||(e.kind==="door"?B.t("wm_Door"):B.t("wm_Window"));return e.state===0?`${n}: ${B.t("wm_Closed")}`:e.state===2?`${n}: ${B.t("wm_Tilted")}`:`${n}: ${B.t("wm_Open")}`}static renderDefaultTypeIcon(e,n){const r={fontSize:n,color:"grey"};switch(e){case Ae.Types.window:return p.jsx(cf,{sx:r});case Ae.Types.door:return p.jsx(Bp,{sx:r});case Ae.Types.fireAlarm:return p.jsx(Ps,{sx:r});case Ae.Types.floodAlarm:return p.jsx(FLt,{sx:r});case Ae.Types.motion:return p.jsx(B0,{sx:r});case Ae.Types.warning:return p.jsx(mA,{sx:r});default:return p.jsx(Y0,{sx:r})}}static getOpeningColor(e){return e.state===0?"text.disabled":e.state===2?"info.main":"warning.main"}renderCategoryStatus(){const{temperature:e,humidity:n,motionActive:r,openings:o,lowBatteryDevices:s}=this.state.categoryStatus,i=o.filter(d=>d.state!==0);return e!==null||n!==null||r||i.length>0||s.length>0?p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:2,mb:1.5,px:.5,flexWrap:"wrap"},children:[e!==null?p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:.5},children:[p.jsx(ul,{sx:{fontSize:18,color:"text.secondary"}}),p.jsxs(oe,{variant:"body2",sx:{fontWeight:500,color:"text.secondary"},children:[e.toFixed(1),"°"]})]}):null,n!==null?p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:.5},children:[p.jsx(Hs,{sx:{fontSize:18,color:"text.secondary"}}),p.jsxs(oe,{variant:"body2",sx:{fontWeight:500,color:"text.secondary"},children:[Math.round(n),"%"]})]}):null,r?p.jsx(ht,{title:B.t("wm_Motion"),children:p.jsx(B0,{sx:{fontSize:20,color:"warning.main"}})}):null,i.length>0?p.jsx(Y,{sx:{display:"flex",alignItems:"center",gap:.5},children:i.map(d=>{const m=d.widgetId?this.props.widgetSettings[d.widgetId]:void 0,h=(m?m.iconActive||m.iconInactive||m.icon:void 0)||d.icon,w=m?.color,x=ma.getOpeningColor(d),S=w||x,C=m?.textActive,M=C?`${d.name}: ${C}`:ma.getOpeningTooltip(d);return p.jsx(ht,{title:M,children:h?p.jsx(Y,{sx:{display:"flex"},children:p.jsx(Gn,{src:h,style:{width:20,height:20,color:S}})}):d.kind==="door"?p.jsx(Bp,{sx:{fontSize:20,color:S,transition:"color 0.25s ease"}}):p.jsx(cf,{sx:{fontSize:20,color:S,transform:d.state===2?"rotate(15deg)":void 0,transition:"color 0.25s ease, transform 0.25s ease"}})},d.stateId)})}):null,s.length>0?p.jsx(Y,{sx:{display:"flex",alignItems:"center",gap:.5},children:s.map(d=>p.jsx(ht,{title:`${d.name}${d.level!=null?`: ${d.level}%`:""}`,children:p.jsx(Lw,{sx:{fontSize:20,color:"error.main"}})},d.name))}):null]}):null}render(){const e=this.props.category.parent?this.props.categories.find(D=>String(D.id)===String(this.props.category.parent)):void 0,n=!this.props.category.parent,r=n&&!!SA(),o=this.props.categorySettings[String(this.props.category.id)]?.customWidgets||[],s=this.subCategories.length>0||this.widgets.length>0||o.length>0,i=String(this.props.category.id),a=this.props.categorySettings[i],d=a?.widgetGroups,m=!!(e||this.state.names[this.props.category.id]||a?.name||this.props.onOpenCategorySettings),_=a?.image,h=_?`/${this.props.admin?"files/":""}${_.replace(/^\//,"")}`:"",w=a?.imageScope||"header",x=a?.color,S=a?.backgroundColor,C=a?.name||this.state.names[this.props.category.id]||(n?"":"..."),M=h?{backgroundImage:`url(${h})`,backgroundSize:"cover",backgroundPosition:"center"}:{};return p.jsxs(Y,{id:String(this.props.category.id),sx:{display:"flex",flexDirection:"column",height:"100%",overflow:"hidden",...S?{backgroundColor:S}:{},position:"relative"},children:[h&&w==="page"?p.jsxs(p.Fragment,{children:[p.jsx(Y,{ref:this.parallaxRef,sx:{position:"absolute",inset:0,backgroundImage:`url(${h})`,backgroundSize:"cover",backgroundPosition:"center",transform:"scale(1.15)",willChange:"transform",zIndex:0}}),p.jsx(Y,{sx:D=>({position:"absolute",inset:0,backgroundColor:Tt(S||D.palette.background.default,.75),zIndex:0})})]}):null,!m&&this.props.onToggleConfigMode?p.jsxs(Y,{sx:{position:"absolute",top:8,right:8,zIndex:2,display:"flex",gap:.5},children:[r&&this.props.configMode&&this.props.onInstallSidePanel?p.jsx(ht,{title:B.t("wm_Install as Side Panel"),children:p.jsx(st,{size:"small",onClick:this.props.onInstallSidePanel,sx:{opacity:.35,"&:hover":{opacity:1}},children:p.jsx(UD,{fontSize:"small",sx:{fontSize:18}})})}):null,p.jsx(ht,{title:B.t(this.props.configMode?"wm_Play mode":"wm_Config mode"),children:p.jsx(st,{size:"small",onClick:this.props.onToggleConfigMode,sx:{opacity:this.props.configMode?.5:.35,"&:hover":{opacity:1}},children:this.props.configMode?p.jsx(VD,{fontSize:"small"}):p.jsx(Y0,{fontSize:"small",sx:{fontSize:18}})})})]}):null,m?p.jsxs(Y,{sx:D=>({flexShrink:0,p:1,pb:0,position:"relative",zIndex:1,...h&&w==="header"?{...M,borderRadius:"0 0 16px 16px","&::before":{content:'""',position:"absolute",inset:0,backgroundColor:Tt(S||D.palette.background.default,.7),borderRadius:"inherit"}}:{}}),children:[p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:1,mb:1,px:.5,position:"relative"},children:[e?p.jsxs(Y,{onClick:()=>this.props.onNavigate(e),sx:{display:"flex",alignItems:"center",gap:1,flex:1,minWidth:0,cursor:"pointer",ml:-.5},children:[p.jsx(FDt,{sx:{color:x||void 0,fontSize:24}}),(()=>{const D=this.state.icons[this.props.category.id];return D?p.jsx(Gn,{src:D,style:{width:28,height:28,color:x||void 0}}):null})(),p.jsx(oe,{variant:"h5",sx:{fontWeight:700,flex:1,color:x||void 0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:C})]}):p.jsxs(p.Fragment,{children:[(()=>{const P=a?.rootIcon||this.state.icons[this.props.category.id];return P?p.jsx(Gn,{src:P,style:{width:28,height:28,color:x||void 0}}):null})(),p.jsx(oe,{variant:"h5",sx:{fontWeight:700,flex:1,color:x||void 0},children:C})]}),this.props.onAddCustomWidget?p.jsx(ht,{title:B.t("wm_Add widget"),children:p.jsx(st,{size:"small",onClick:()=>this.props.onAddCustomWidget(i),sx:{opacity:.5,"&:hover":{opacity:1}},children:p.jsx(dk,{fontSize:"small"})})}):null,this.props.onToggleGrouping?p.jsx(ht,{title:B.t(d?.length?"wm_Ungroup widgets":"wm_Group by type"),children:p.jsx(st,{size:"small",onClick:()=>this.props.onToggleGrouping(i,this.getOrderedItems()),sx:{opacity:d?.length?.7:.5,"&:hover":{opacity:1}},children:d?.length?p.jsx(ALt,{fontSize:"small"}):p.jsx(ULt,{sx:{fontSize:18}})})}):null,this.props.onOpenCategorySettings?p.jsx(ht,{title:B.t("wm_Category settings"),children:p.jsx(st,{size:"small",onClick:()=>this.props.onOpenCategorySettings(i),sx:{opacity:.5,"&:hover":{opacity:1}},children:p.jsx(fh,{fontSize:"small"})})}):null,r&&this.props.configMode&&this.props.onInstallSidePanel?p.jsx(ht,{title:B.t("wm_Install as Side Panel"),children:p.jsx(st,{size:"small",onClick:this.props.onInstallSidePanel,sx:{opacity:.35,"&:hover":{opacity:1}},children:p.jsx(UD,{fontSize:"small",sx:{fontSize:18}})})}):null,this.props.onToggleConfigMode?p.jsx(ht,{title:B.t(this.props.configMode?"wm_Play mode":"wm_Config mode"),children:p.jsx(st,{size:"small",onClick:this.props.onToggleConfigMode,sx:{opacity:this.props.configMode?.5:.35,"&:hover":{opacity:1}},children:this.props.configMode?p.jsx(VD,{fontSize:"small"}):p.jsx(Y0,{fontSize:"small",sx:{fontSize:18}})})}):null]}),p.jsxs(Y,{sx:{position:"relative",display:"flex",alignItems:"center"},children:[p.jsx(Y,{sx:{flex:1},children:this.renderCategoryStatus()}),d?.length&&this.props.onWidgetGroupsChange?p.jsxs(Y,{sx:{display:"flex",ml:"auto"},children:[p.jsx(ht,{title:B.t("wm_Expand all"),children:p.jsx(st,{size:"small",onClick:()=>{const D=d.map(P=>({...P,collapsed:!1}));this.props.onWidgetGroupsChange(i,D)},sx:{opacity:.5,"&:hover":{opacity:1}},children:p.jsx(jLt,{sx:{fontSize:18}})})}),p.jsx(ht,{title:B.t("wm_Collapse all"),children:p.jsx(st,{size:"small",onClick:()=>{const D=d.map(P=>({...P,collapsed:!0}));this.props.onWidgetGroupsChange(i,D)},sx:{opacity:.5,"&:hover":{opacity:1}},children:p.jsx(OLt,{sx:{fontSize:18}})})})]}):null]})]}):null,s?p.jsx(Y,{ref:this.scrollRef,onScroll:this.onScroll,sx:{flex:1,overflow:"auto",p:1,pt:m?.5:2,position:"relative",zIndex:1},children:d?.length?p.jsx(ejt,{category:this,groups:d,canDrag:!!this.props.onWidgetOrderChange,categoryId:String(this.props.category.id),onGroupsChange:this.props.onWidgetGroupsChange,onMoveWidgetToCategory:this.props.onMoveWidgetToCategory,widgetSettings:this.props.widgetSettings,configMode:this.props.configMode,onToggleFavorite:this.props.onToggleFavorite}):p.jsx(ZOt,{category:this,canDrag:!!this.props.onWidgetOrderChange,categoryId:String(this.props.category.id),onOrderChange:this.props.onWidgetOrderChange,onMoveWidgetToCategory:this.props.onMoveWidgetToCategory,widgetSettings:this.props.widgetSettings,onToggleFavorite:this.props.onToggleFavorite})}):null]},this.props.category.id)}}function EL(t){const e=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="${t}"/></svg>`;return`data:image/svg+xml,${encodeURIComponent(e)}`}const tjt=[{id:"lightbulb",label:"Lightbulb",category:"lights",path:"M12,6C15.31,6 18,8.69 18,12C18,14.22 16.79,16.16 15,17.2V19C15,19.55 14.55,20 14,20H10C9.45,20 9,19.55 9,19V17.2C7.21,16.16 6,14.22 6,12C6,8.69 8.69,6 12,6M14,21V22C14,22.55 13.55,23 13,23H11C10.45,23 10,22.55 10,22V21H14M20,11H23V13H20V11M1,11H4V13H1V11M13,1V4H11V1H13M4.92,3.5L7.05,5.64L5.63,7.05L3.5,4.93L4.92,3.5M16.95,5.63L19.07,3.5L20.5,4.93L18.37,7.05L16.95,5.63Z"},{id:"ceiling_light",label:"Ceiling light",category:"lights",path:"M8,9H11V4H13V9H16L20,17H4L8,9M14,18C14,19.1 13.1,20 12,20C10.9,20 10,19.1 10,18H14Z"},{id:"lamp",label:"Lamp",category:"lights",path:"M8,2H16L20,14H4L8,2M11,15H13V20H18V22H6V20H11V15Z"},{id:"led_strip",label:"LED strip",category:"lights",path:"M2.81,8.46L14.83,20.5L15.54,19.78L16.95,21.19L18.36,19.78L16.95,18.36L18.36,16.95L19.78,18.36L21.19,16.95L19.78,15.54L20.5,14.83L8.46,2.81L2.81,8.46M5.64,8.46L8.46,5.64L17.66,14.83L14.83,17.66L5.64,8.46M7.05,8.46L8.46,9.88L9.88,8.46L8.46,7.05L7.05,8.46M9.17,10.59L10.59,12L12,10.59L10.59,9.17L9.17,10.59M11.29,12.71L12.71,14.12L14.12,12.71L12.71,11.29L11.29,12.71M13.41,14.83L14.83,16.24L16.24,14.83L14.83,13.41L13.41,14.83Z"},{id:"spotlight",label:"Spotlight",category:"lights",path:"M9,16.5L9.91,15.59L15.13,20.8L14.21,21.71L9,16.5M15.5,10L16.41,9.09L21.63,14.3L20.71,15.21L15.5,10M6.72,2.72L10.15,6.15L6.15,10.15L2.72,6.72C1.94,5.94 1.94,4.67 2.72,3.89L3.89,2.72C4.67,1.94 5.94,1.94 6.72,2.72M14.57,7.5L15.28,8.21L8.21,15.28L7.5,14.57L6.64,11.07L11.07,6.64L14.57,7.5Z"},{id:"power",label:"Power",category:"power",path:"M13,3h-2v10h2V3zm4.83,2.17l-1.42,1.42C17.99,7.86 19,9.81 19,12c0,3.87-3.13,7-7,7s-7-3.13-7-7c0-2.19 1.01-4.14 2.58-5.42L6.17,5.17C4.23,6.82 3,9.26 3,12c0,4.97 4.03,9 9,9s9-4.03 9-9c0-2.74-1.23-5.18-3.17-6.83z"},{id:"power_plug",label:"Plug",category:"power",path:"M16,7V3H14V7H10V3H8V7H8C7,7 6,8 6,9V14.5L9.5,18V21H14.5V18L18,14.5V9C18,8 17,7 16,7Z"},{id:"socket_eu",label:"Socket",category:"power",path:"M7.5,10.5C8.33,10.5 9,11.17 9,12C9,12.83 8.33,13.5 7.5,13.5C6.66,13.5 6,12.83 6,12C6,11.17 6.67,10.5 7.5,10.5M16.5,10.5C17.33,10.5 18,11.17 18,12C18,12.83 17.33,13.5 16.5,13.5C15.67,13.5 15,12.83 15,12C15,11.17 15.67,10.5 16.5,10.5M4.22,2H19.78C21,2 22,3 22,4.22V19.78C22,21.01 21.01,22 19.78,22H4.22C3,22 2,21 2,19.78V4.22C2,2.99 2.99,2 4.22,2M12,4C7.58,4 4,7.58 4,12C4,16.42 7.58,20 12,20C16.42,20 20,16.42 20,12C20,7.58 16.42,4 12,4Z"},{id:"flash",label:"Flash",category:"power",path:"M7,2V13H10V22L17,10H13L17,2H7Z"},{id:"thermostat",label:"Thermostat",category:"climate",path:"M17,17C17,19.76 14.76,22 12,22C9.24,22 7,19.76 7,17C7,15.36 7.79,13.91 9,13V5C9,3.34 10.34,2 12,2C13.66,2 15,3.34 15,5V13C16.21,13.91 17,15.36 17,17M11,8V14.17C9.83,14.58 9,15.69 9,17C9,18.66 10.34,20 12,20C13.66,20 15,18.66 15,17C15,15.69 14.17,14.58 13,14.17V8H11Z"},{id:"ac_unit",label:"AC / Cooling",category:"climate",path:"M22,11h-4.17l3.24-3.24-1.41-1.42L15,11h-2V9l4.66-4.66-1.42-1.41L13,6.17V2h-2v4.17L7.76,2.93 6.34,4.34 11,9v2H9L4.34,6.34 2.93,7.76 6.17,11H2v2h4.17l-3.24,3.24 1.41,1.42L9,13h2v2l-4.66,4.66 1.42,1.41L11,17.83V22h2v-4.17l3.24,3.24 1.42-1.41L13,15v-2h2l4.66,4.66 1.41-1.42L17.83,13H22z"},{id:"heating",label:"Heating",category:"climate",path:"M11.71,19C9.93,19 8.5,17.59 8.5,15.86C8.5,14.24 9.53,13.1 11.3,12.74C13.07,12.38 14.9,11.53 15.92,10.16C16.31,11.45 16.5,12.81 16.5,14.2C16.5,16.84 14.36,19 11.71,19M13.5,0.67C13.5,0.67 14.24,3.32 14.24,5.47C14.24,7.53 12.89,9.2 10.83,9.2C8.76,9.2 7.2,7.53 7.2,5.47L7.23,5.1C5.21,7.5 4,10.61 4,14C4,18.42 7.58,22 12,22C16.42,22 20,18.42 20,14C20,8.6 17.41,3.8 13.5,0.67Z"},{id:"water_drop",label:"Humidity",category:"climate",path:"M12,3.25C12,3.25 6,10 6,14C6,17.32 8.69,20 12,20C15.31,20 18,17.31 18,14C18,10 12,3.25 12,3.25M14.47,9.97L15.53,11.03L9.53,17.03L8.47,15.97M9.75,10C10.44,10 11,10.56 11,11.25C11,11.94 10.44,12.5 9.75,12.5C9.06,12.5 8.5,11.94 8.5,11.25C8.5,10.56 9.06,10 9.75,10M14.25,14.5C14.94,14.5 15.5,15.06 15.5,15.75C15.5,16.44 14.94,17 14.25,17C13.56,17 13,16.44 13,15.75C13,15.06 13.56,14.5 14.25,14.5Z"},{id:"fan",label:"Fan",category:"climate",path:"M12,11C11.45,11 11,11.45 11,12C11,12.55 11.45,13 12,13C12.55,13 13,12.55 13,12C13,11.45 12.55,11 12,11M12.5,2C17,2 17.11,5.57 14.75,6.75C13.76,7.24 13.32,8.29 13.13,9.22C13.61,9.42 14.03,9.73 14.35,10.13C18.05,8.13 22.03,8.92 22.03,12.5C22.03,17 18.46,17.1 17.28,14.73C16.78,13.74 15.72,13.3 14.79,13.11C14.59,13.59 14.28,14 13.88,14.34C15.87,18.03 15.08,22 11.5,22C7,22 6.91,18.42 9.27,17.24C10.25,16.75 10.69,15.71 10.89,14.79C10.4,14.59 9.97,14.27 9.65,13.87C5.96,15.85 2,15.07 2,11.5C2,7 5.56,6.89 6.74,9.26C7.24,10.25 8.29,10.68 9.22,10.87C9.41,10.39 9.73,9.97 10.14,9.65C8.15,5.96 8.94,2 12.5,2Z"},{id:"door",label:"Door",category:"openings",path:"M8,3C6.89,3 6,3.89 6,5V21H18V5C18,3.89 17.11,3 16,3H8M8,5H16V19H8V5M13,11V13H15V11H13Z"},{id:"door_open",label:"Door open",category:"openings",path:"M12,3C10.89,3 10,3.89 10,5H3V19H2V21H22V19H21V5C21,3.89 20.11,3 19,3H12M12,5H19V19H12V5M5,11H7V13H5V11Z"},{id:"window_closed",label:"Window closed",category:"openings",path:"M6,11H10V9H14V11H18V4H6V11M18,13H6V20H18V13M6,2H18C19.1,2 20,2.9 20,4V20C20,21.1 19.1,22 18,22H6C4.9,22 4,21.1 4,20V4C4,2.9 4.9,2 6,2Z"},{id:"window_open",label:"Window open",category:"openings",path:"M6,8H10V6H14V8H18V4H6V8M18,10H6V15H18V10M6,20H18V17H6V20M6,2H18C19.1,2 20,2.9 20,4V20C20,21.1 19.1,22 18,22H6C4.9,22 4,21.1 4,20V4C4,2.9 4.9,2 6,2Z"},{id:"blinds",label:"Blinds",category:"openings",path:"M3,2H21C21.55,2 22,2.45 22,3V5C22,5.55 21.55,6 21,6H20V13C20,13.55 19.55,14 19,14H13V16.17C14.17,16.58 15,17.69 15,19C15,20.66 13.66,22 12,22C10.34,22 9,20.66 9,19C9,17.69 9.83,16.58 11,16.17V14H5C4.45,14 4,13.55 4,13V6H3C2.45,6 2,5.55 2,5V3C2,2.45 2.45,2 3,2M12,18C11.45,18 11,18.45 11,19C11,19.55 11.45,20 12,20C12.55,20 13,19.55 13,19C13,18.45 12.55,18 12,18Z"},{id:"garage",label:"Garage",category:"openings",path:"M19,20H17V11H7V20H5V9L12,5L19,9V20M8,12H16V14H8V12M8,15H16V17H8V15M16,18V20H8V18H16Z"},{id:"door_wall_closed",label:"Door closed (wall)",category:"openings",path:"M16,11H18V13H16V11M12,3H19C20.11,3 21,3.89 21,5V19H22V21H2V19H10V5C10,3.89 10.89,3 12,3M12,5V19H19V5H12Z"},{id:"skylight_closed",label:"Skylight closed",category:"openings",path:"M12,2L21,9V22H3V9L12,2Z M5,10V20H19V10L12,4L5,10Z M5,15H19V16H5Z"},{id:"skylight_open",label:"Skylight open",category:"openings",path:"M12,2L21,9V22H3V9L12,2Z M5,10V20H19V10L12,4L5,10Z M6,11L12,5L18,11L16,18H8Z"},{id:"window_4pane_closed",label:"Window 4-pane closed",category:"openings",path:"M21,20V2H3V20H1V23H23V20M19,4V11H13V4M5,4H11V11H5M5,20V13H11V20M13,20V13H19V20Z"},{id:"window_4pane_open",label:"Window 4-pane open",category:"openings",path:"M21,20V2H3V20H1V23H23V20M19,4V11H17V4M5,4H7V11H5M5,20V13H7V20M9,20V4H15V20M17,20V13H19V20Z"},{id:"tilt_closed",label:"Tilt window closed",category:"openings",path:"M4,2H20V22H4Z M6,4V20H18V4H6Z M11,14H13V17H11Z"},{id:"tilt_tilted",label:"Tilt window tilted",category:"openings",path:"M4,2H20V22H4Z M6,4V20H18V4H6Z M6,20L9,5H15L18,20Z"},{id:"tilt_open_left",label:"Tilt window open left",category:"openings",path:"M4,2H20V22H4Z M6,4V20H18V4H6Z M18,4V20L8,17V7Z"},{id:"tilt_open_right",label:"Tilt window open right",category:"openings",path:"M4,2H20V22H4Z M6,4V20H18V4H6Z M6,4L16,7V17L6,20Z"},{id:"lock",label:"Lock",category:"security",path:"M12,17C13.1,17 14,16.1 14,15C14,13.89 13.1,13 12,13C10.9,13 10,13.9 10,15C10,16.1 10.9,17 12,17M18,8C19.1,8 20,8.9 20,10V20C20,21.1 19.1,22 18,22H6C4.9,22 4,21.1 4,20V10C4,8.89 4.9,8 6,8H7V6C7,3.24 9.24,1 12,1C14.76,1 17,3.24 17,6V8H18M12,3C10.34,3 9,4.34 9,6V8H15V6C15,4.34 13.66,3 12,3Z"},{id:"lock_open",label:"Lock open",category:"security",path:"M18,8C19.1,8 20,8.9 20,10V20C20,21.1 19.1,22 18,22H6C4.89,22 4,21.1 4,20V10C4,8.9 4.9,8 6,8H15V6C15,4.34 13.66,3 12,3C10.34,3 9,4.34 9,6H7C7,3.24 9.24,1 12,1C14.76,1 17,3.24 17,6V8H18M12,17C13.1,17 14,16.1 14,15C14,13.9 13.1,13 12,13C10.9,13 10,13.9 10,15C10,16.1 10.9,17 12,17Z"},{id:"shield",label:"Shield",category:"security",path:"M12,1L3,5V11C3,16.55 6.84,21.74 12,23C17.16,21.74 21,16.55 21,11V5L12,1Z"},{id:"camera",label:"Camera",category:"security",path:"M18.15,4.94C17.77,4.91 17.37,5 17,5.2L8.35,10.2C7.39,10.76 7.07,12 7.62,12.94L9.12,15.53C9.67,16.5 10.89,16.82 11.85,16.27L13.65,15.23C13.92,15.69 14.32,16.06 14.81,16.27V18.04C14.81,19.13 15.7,20 16.81,20H22V18.04H16.81V16.27C17.72,15.87 18.31,14.97 18.31,14C18.31,13.54 18.19,13.11 17.97,12.73L20.5,11.27C21.47,10.71 21.8,9.5 21.24,8.53L19.74,5.94C19.4,5.34 18.79,5 18.15,4.94M6.22,13.17L2,13.87L2.75,15.17L4.75,18.63L5.5,19.93L8.22,16.63L6.22,13.17Z"},{id:"bell",label:"Alarm bell",category:"security",path:"M11.5,22C11.64,22 11.77,22 11.9,21.96C12.55,21.82 13.09,21.38 13.34,20.78C13.44,20.54 13.5,20.27 13.5,20H9.5C9.5,21.1 10.4,22 11.5,22M18,10.5C18,7.43 15.86,4.86 13,4.18V3.5C13,2.67 12.33,2 11.5,2C10.67,2 10,2.67 10,3.5V4.18C7.13,4.86 5,7.43 5,10.5V16L3,18V19H20V18L18,16M19.97,10H21.97C21.82,6.79 20.24,3.97 17.85,2.15L16.42,3.58C18.46,5 19.82,7.35 19.97,10M6.58,3.58L5.15,2.15C2.76,3.97 1.18,6.79 1,10H3C3.18,7.35 4.54,5 6.58,3.58Z"},{id:"motion",label:"Motion",category:"sensors",path:"M16.5,5.5C17.6,5.5 18.5,4.6 18.5,3.5C18.5,2.4 17.6,1.5 16.5,1.5C15.4,1.5 14.5,2.4 14.5,3.5C14.5,4.6 15.4,5.5 16.5,5.5M12.9,19.4L13.9,15L16,17V23H18V15.5L15.9,13.5L16.5,10.5C17.89,12.09 19.89,13 22,13V11C20.24,11.03 18.6,10.11 17.7,8.6L16.7,7C16.34,6.4 15.7,6 15,6C14.7,6 14.5,6.1 14.2,6.1L9,8.3V13H11V9.6L12.8,8.9L11.2,17L6.3,16L5.9,18L12.9,19.4Z"},{id:"fire",label:"Fire",category:"sensors",path:"M11.71,19C9.93,19 8.5,17.59 8.5,15.86C8.5,14.24 9.53,13.1 11.3,12.74C13.07,12.38 14.9,11.53 15.92,10.16C16.31,11.45 16.5,12.81 16.5,14.2C16.5,16.84 14.36,19 11.71,19M13.5,0.67C13.5,0.67 14.24,3.32 14.24,5.47C14.24,7.53 12.89,9.2 10.83,9.2C8.76,9.2 7.2,7.53 7.2,5.47L7.23,5.1C5.21,7.5 4,10.61 4,14C4,18.42 7.58,22 12,22C16.42,22 20,18.42 20,14C20,8.6 17.41,3.8 13.5,0.67Z"},{id:"flood",label:"Flood",category:"sensors",path:"M12,3.25C12,3.25 6,10 6,14C6,17.32 8.69,20 12,20C15.31,20 18,17.31 18,14C18,10 12,3.25 12,3.25Z"},{id:"warning",label:"Warning",category:"sensors",path:"M13,13H11V7H13M13,17H11V15H13M12,2C6.48,2 2,6.48 2,12C2,17.52 6.48,22 12,22C17.52,22 22,17.52 22,12C22,6.48 17.52,2 12,2Z"},{id:"smoke",label:"Smoke detector",category:"sensors",path:"M12,18C13.1,18 14,17.1 14,16C14,14.9 13.1,14 12,14C10.9,14 10,14.9 10,16C10,17.1 10.9,18 12,18M12,2C6.48,2 2,6.48 2,12C2,17.52 6.48,22 12,22C17.52,22 22,17.52 22,12C22,6.48 17.52,2 12,2M12,20C7.58,20 4,16.42 4,12C4,7.58 7.58,4 12,4C16.42,4 20,7.58 20,12C20,16.42 16.42,20 12,20Z"},{id:"rain",label:"Rain",category:"sensors",path:"M6,14.03A1,1 0 0,1 7,15.03C7,15.58 6.55,16.03 6,16.03C3.24,16.03 1,13.79 1,11.03C1,8.27 3.24,6.03 6,6.03C7,3.68 9.3,2.03 12,2.03C15.43,2.03 18.24,4.69 18.5,8.06L19,8.03A4,4 0 0,1 23,12.03C23,14.23 21.21,16.03 19,16.03H18C17.45,16.03 17,15.58 17,15.03C17,14.47 17.45,14.03 18,14.03H19A2,2 0 0,0 21,12.03A2,2 0 0,0 19,10.03H17V9.03C17,6.27 14.76,4.03 12,4.03C9.5,4.03 7.45,5.84 7.06,8.21C6.73,8.09 6.37,8.03 6,8.03A3,3 0 0,0 3,11.03A3,3 0 0,0 6,14.03M12,14.15C12.18,14.39 12.37,14.66 12.56,14.94C13,15.56 14,17.03 14,18C14,19.11 13.1,20 12,20A2,2 0 0,1 10,18C10,17.03 11,15.56 11.44,14.94C11.63,14.66 11.82,14.4 12,14.15M12,11.03L11.5,11.59C11.5,11.59 10.65,12.55 9.79,13.81C8.93,15.06 8,16.56 8,18A4,4 0 0,0 12,22A4,4 0 0,0 16,18C16,16.56 15.07,15.06 14.21,13.81C13.35,12.55 12.5,11.59 12.5,11.59"},{id:"wind",label:"Wind",category:"sensors",path:"M4,10A1,1 0 0,1 3,9A1,1 0 0,1 4,8H12A2,2 0 0,0 14,6A2,2 0 0,0 12,4C11.45,4 10.95,4.22 10.59,4.59C10.2,5 9.56,5 9.17,4.59C8.78,4.2 8.78,3.56 9.17,3.17C9.9,2.45 10.9,2 12,2A4,4 0 0,1 16,6A4,4 0 0,1 12,10H4M19,12A1,1 0 0,0 20,11A1,1 0 0,0 19,10C18.72,10 18.47,10.11 18.29,10.29C17.9,10.68 17.27,10.68 16.88,10.29C16.5,9.9 16.5,9.27 16.88,8.88C17.42,8.34 18.17,8 19,8A3,3 0 0,1 22,11A3,3 0 0,1 19,14H5A1,1 0 0,1 4,13A1,1 0 0,1 5,12H19M18,18H4A1,1 0 0,1 3,17A1,1 0 0,1 4,16H18A3,3 0 0,1 21,19A3,3 0 0,1 18,22C17.17,22 16.42,21.66 15.88,21.12C15.5,20.73 15.5,20.1 15.88,19.71C16.27,19.32 16.9,19.32 17.29,19.71C17.47,19.89 17.72,20 18,20A1,1 0 0,0 19,19A1,1 0 0,0 18,18Z"},{id:"wind_direction",label:"Wind direction",category:"sensors",path:"M7,17L10.2,10.2L17,7L13.8,13.8L7,17M12,11.1A0.9,0.9 0 0,0 11.1,12A0.9,0.9 0 0,0 12,12.9A0.9,0.9 0 0,0 12.9,12A0.9,0.9 0 0,0 12,11.1M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z"},{id:"sun",label:"Sun",category:"sensors",path:"M3.55 19.09L4.96 20.5L6.76 18.71L5.34 17.29M12 6C8.69 6 6 8.69 6 12S8.69 18 12 18 18 15.31 18 12C18 8.68 15.31 6 12 6M20 13H23V11H20M17.24 18.71L19.04 20.5L20.45 19.09L18.66 17.29M20.45 5L19.04 3.6L17.24 5.39L18.66 6.81M13 1H11V4H13M6.76 5.39L4.96 3.6L3.55 5L5.34 6.81L6.76 5.39M1 13H4V11H1M13 20H11V23H13"},{id:"moon",label:"Moon",category:"sensors",path:"M2 12A10 10 0 0 0 15 21.54A10 10 0 0 1 15 2.46A10 10 0 0 0 2 12Z"},{id:"volume",label:"Volume",category:"media",path:"M14,3.23V5.29C16.89,6.15 19,8.83 19,12C19,15.17 16.89,17.84 14,18.7V20.77C18,19.86 21,16.28 21,12C21,7.72 18,4.14 14,3.23M16.5,12C16.5,10.23 15.5,8.71 14,7.97V16C15.5,15.29 16.5,13.76 16.5,12M3,9V15H7L12,20V4L7,9H3Z"},{id:"tv",label:"Television",category:"media",path:"M21,17H3V5H21M21,3H3C1.9,3 1,3.9 1,5V17C1,18.1 1.9,19 3,19H8V21H16V19H21C22.1,19 23,18.1 23,17V5C23,3.9 22.1,3 21,3Z"},{id:"nas",label:"NAS",category:"computers",path:"M4,5C2.89,5 2,5.89 2,7V17C2,18.11 2.89,19 4,19H20C21.11,19 22,18.11 22,17V7C22,5.89 21.11,5 20,5H4M4.5,7A1,1 0 0,1 5.5,8A1,1 0 0,1 4.5,9A1,1 0 0,1 3.5,8A1,1 0 0,1 4.5,7M7,7H20V17H7V7M8,8V16H11V8H8M12,8V16H15V8H12M16,8V16H19V8H16M9,9H10V10H9V9M13,9H14V10H13V9M17,9H18V10H17V9Z"},{id:"network_switch",label:"Network switch",category:"computers",path:"M4,1C2.89,1 2,1.89 2,3V7C2,8.11 2.89,9 4,9H1V11H13V9H10C11.11,9 12,8.11 12,7V3C12,1.89 11.11,1 10,1H4M4,3H10V7H4V3M3,13V18L3,20H10V18H5V13H3M14,13C12.89,13 12,13.89 12,15V19C12,20.11 12.89,21 14,21H11V23H23V21H20C21.11,21 22,20.11 22,19V15C22,13.89 21.11,13 20,13H14M14,15H20V19H14V15Z"},{id:"pc_monitor",label:"PC / Monitor",category:"computers",path:"M21,16H3V4H21M21,2H3C1.89,2 1,2.89 1,4V16A2,2 0 0,0 3,18H10V20H8V22H16V20H14V18H21A2,2 0 0,0 23,16V4C23,2.89 22.1,2 21,2Z"},{id:"laptop",label:"Laptop",category:"computers",path:"M4,6H20V16H4M20,18A2,2 0 0,0 22,16V6C22,4.89 21.1,4 20,4H4C2.89,4 2,4.89 2,6V16A2,2 0 0,0 4,18H0V20H24V18H20Z"},{id:"tablet_device",label:"Tablet",category:"computers",path:"M19,18H5V6H19M21,4H3C1.89,4 1,4.89 1,6V18A2,2 0 0,0 3,20H21A2,2 0 0,0 23,18V6C23,4.89 22.1,4 21,4Z"},{id:"cellphone",label:"Mobile phone",category:"computers",path:"M17,19H7V5H17M17,1H7C5.89,1 5,1.89 5,3V21A2,2 0 0,0 7,23H17A2,2 0 0,0 19,21V3C19,1.89 18.1,1 17,1Z"},{id:"wifi_router",label:"WiFi router",category:"computers",path:"M20.2,5.9L21,5.1C19.6,3.7 17.8,3 16,3C14.2,3 12.4,3.7 11,5.1L11.8,5.9C13,4.8 14.5,4.2 16,4.2C17.5,4.2 19,4.8 20.2,5.9M19.3,6.7C18.4,5.8 17.2,5.3 16,5.3C14.8,5.3 13.6,5.8 12.7,6.7L13.5,7.5C14.2,6.8 15.1,6.5 16,6.5C16.9,6.5 17.8,6.8 18.5,7.5L19.3,6.7M19,13H17V9H15V13H5A2,2 0 0,0 3,15V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V15A2,2 0 0,0 19,13M8,18H6V16H8V18M11.5,18H9.5V16H11.5V18M15,18H13V16H15V18Z"},{id:"starlink",label:"Starlink / Satellite",category:"computers",path:"M11.86,2L11.34,3.93C15.75,4.78 19.2,8.23 20.05,12.65L22,12.13C20.95,7.03 16.96,3.04 11.86,2M10.82,5.86L10.3,7.81C13.34,8.27 15.72,10.65 16.18,13.68L18.12,13.16C17.46,9.44 14.55,6.5 10.82,5.86M3.72,9.69C3.25,10.73 3,11.86 3,13C3,14.95 3.71,16.82 5,18.28V22H8V20.41C8.95,20.8 9.97,21 11,21C12.14,21 13.27,20.75 14.3,20.28L3.72,9.69M9.79,9.76L9.26,11.72A3,3 0 0,1 12.26,14.72L14.23,14.2C14,11.86 12.13,10 9.79,9.76Z"},{id:"access_point",label:"Access point",category:"computers",path:"M4.93,4.93C3.12,6.74 2,9.24 2,12C2,14.76 3.12,17.26 4.93,19.07L6.34,17.66C4.89,16.22 4,14.22 4,12C4,9.79 4.89,7.78 6.34,6.34L4.93,4.93M19.07,4.93L17.66,6.34C19.11,7.78 20,9.79 20,12C20,14.22 19.11,16.22 17.66,17.66L19.07,19.07C20.88,17.26 22,14.76 22,12C22,9.24 20.88,6.74 19.07,4.93M7.76,7.76C6.67,8.85 6,10.35 6,12C6,13.65 6.67,15.15 7.76,16.24L9.17,14.83C8.45,14.11 8,13.11 8,12C8,10.89 8.45,9.89 9.17,9.17L7.76,7.76M16.24,7.76L14.83,9.17C15.55,9.89 16,10.89 16,12C16,13.11 15.55,14.11 14.83,14.83L16.24,16.24C17.33,15.15 18,13.65 18,12C18,10.35 17.33,8.85 16.24,7.76M12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12A2,2 0 0,0 12,10Z"},{id:"man",label:"Man",category:"people",path:"M12,2A2,2 0 0,1 14,4A2,2 0 0,1 12,6A2,2 0 0,1 10,4A2,2 0 0,1 12,2M10.5,7H13.5A2,2 0 0,1 15.5,9V14.5H14V22H10V14.5H8.5V9A2,2 0 0,1 10.5,7Z"},{id:"woman",label:"Woman",category:"people",path:"M12,2A2,2 0 0,1 14,4A2,2 0 0,1 12,6A2,2 0 0,1 10,4A2,2 0 0,1 12,2M10.5,22V16H7.5L10.09,8.41C10.34,7.59 11.1,7 12,7C12.9,7 13.66,7.59 13.91,8.41L16.5,16H13.5V22H10.5Z"},{id:"family",label:"Family",category:"people",path:"M7.5,2A2,2 0 0,1 9.5,4A2,2 0 0,1 7.5,6A2,2 0 0,1 5.5,4A2,2 0 0,1 7.5,2M6,7H9A2,2 0 0,1 11,9V14.5H9.5V22H5.5V14.5H4V9A2,2 0 0,1 6,7M16.5,2A2,2 0 0,1 18.5,4A2,2 0 0,1 16.5,6A2,2 0 0,1 14.5,4A2,2 0 0,1 16.5,2M15,22V16H12L14.59,8.41C14.84,7.59 15.6,7 16.5,7C17.4,7 18.16,7.59 18.41,8.41L21,16H18V22H15Z"},{id:"girl",label:"Girl",category:"people",path:"M7.5,2A2,2 0 0,1 9.5,4A2,2 0 0,1 7.5,6A2,2 0 0,1 5.5,4A2,2 0 0,1 7.5,2M6,22V16H3L5.6,8.4C5.9,7.6 6.6,7 7.5,7C8.4,7 9.2,7.6 9.4,8.4L12,16H9V22H6M14.5,12A2,2 0 0,1 16.5,10A2,2 0 0,1 18.5,12A2,2 0 0,1 16.5,14A2,2 0 0,1 14.5,12M15,15H18L19.5,19H18V22H15V19H13.5L15,15Z"},{id:"baby",label:"Baby",category:"people",path:"M14.5,9.25A1.25,1.25 0 0,1 15.75,10.5A1.25,1.25 0 0,1 14.5,11.75A1.25,1.25 0 0,1 13.25,10.5A1.25,1.25 0 0,1 14.5,9.25M9.5,9.25A1.25,1.25 0 0,1 10.75,10.5A1.25,1.25 0 0,1 9.5,11.75A1.25,1.25 0 0,1 8.25,10.5A1.25,1.25 0 0,1 9.5,9.25M7.5,14H16.5C15.74,15.77 14,17 12,17C10,17 8.26,15.77 7.5,14M1,12C1,10.19 2.2,8.66 3.86,8.17C5.29,5.11 8.4,3 12,3C15.6,3 18.71,5.11 20.15,8.17C21.8,8.66 23,10.19 23,12C23,13.81 21.8,15.34 20.15,15.83C18.71,18.89 15.6,21 12,21C8.4,21 5.29,18.89 3.86,15.83C2.2,15.34 1,13.81 1,12M12,5C8.82,5 6.14,7.12 5.28,10H5A2,2 0 0,0 3,12A2,2 0 0,0 5,14H5.28C6.14,16.88 8.82,19 12,19C15.18,19 17.86,16.88 18.72,14H19A2,2 0 0,0 21,12A2,2 0 0,0 19,10H18.72C17.86,7.12 15.18,5 12,5Z"},{id:"cat",label:"Cat",category:"people",path:"M12,8L10.67,8.09C9.81,7.07 7.4,4.5 5,4.5C5,4.5 3.03,7.46 4.96,11.41C4.41,12.24 4.07,12.67 4,13.66L2.07,13.95L2.28,14.93L4.04,14.67L4.18,15.38L2.61,16.32L3.08,17.21L4.53,16.32C5.68,18.76 8.59,20 12,20C15.41,20 18.32,18.76 19.47,16.32L20.92,17.21L21.39,16.32L19.82,15.38L19.96,14.67L21.72,14.93L21.93,13.95L20,13.66C19.93,12.67 19.59,12.24 19.04,11.41C20.97,7.46 19,4.5 19,4.5C16.6,4.5 14.19,7.07 13.33,8.09L12,8M9,11A1,1 0 0,1 10,12A1,1 0 0,1 9,13A1,1 0 0,1 8,12A1,1 0 0,1 9,11M15,11A1,1 0 0,1 16,12A1,1 0 0,1 15,13A1,1 0 0,1 14,12A1,1 0 0,1 15,11M11,14H13L12.3,15.39C12.5,16.03 13.06,16.5 13.75,16.5A1.5,1.5 0 0,0 15.25,15H15.75A2,2 0 0,1 13.75,17C13,17 12.35,16.59 12,16V16H12C11.65,16.59 11,17 10.25,17A2,2 0 0,1 8.25,15H8.75A1.5,1.5 0 0,0 10.25,16.5C10.94,16.5 11.5,16.03 11.7,15.39L11,14Z"},{id:"dog",label:"Dog",category:"people",path:"M18,4C16.29,4 15.25,4.33 14.65,4.61C13.88,4.23 13,4 12,4C11,4 10.12,4.23 9.35,4.61C8.75,4.33 7.71,4 6,4C3,4 1,12 1,14C1,14.83 2.32,15.59 4.14,15.9C4.78,18.14 7.8,19.85 11.5,20V15.72C10.91,15.35 10,14.68 10,14C10,13 12,13 12,13C12,13 14,13 14,14C14,14.68 13.09,15.35 12.5,15.72V20C16.2,19.85 19.22,18.14 19.86,15.9C21.68,15.59 23,14.83 23,14C23,12 21,4 18,4M4.15,13.87C3.65,13.75 3.26,13.61 3,13.5C3.25,10.73 5.2,6.4 6.05,6C6.59,6 7,6.06 7.37,6.11C5.27,8.42 4.44,12.04 4.15,13.87M9,12A1,1 0 0,1 8,11C8,10.46 8.45,10 9,10A1,1 0 0,1 10,11C10,11.56 9.55,12 9,12M15,12A1,1 0 0,1 14,11C14,10.46 14.45,10 15,10A1,1 0 0,1 16,11C16,11.56 15.55,12 15,12M19.85,13.87C19.56,12.04 18.73,8.42 16.63,6.11C17,6.06 17.41,6 17.95,6C18.8,6.4 20.75,10.73 21,13.5C20.75,13.61 20.36,13.75 19.85,13.87Z"},{id:"home",label:"Home",category:"other",path:"M10,20V14H14V20H19V12H22L12,3L2,12H5V20H10Z"},{id:"battery",label:"Battery",category:"other",path:"M16.67,4H15V2H9V4H7.33C6.6,4 6,4.6 6,5.33V20.67C6,21.4 6.6,22 7.33,22H16.67C17.4,22 18,21.4 18,20.67V5.33C18,4.6 17.4,4 16.67,4Z"},{id:"wifi",label:"WiFi",category:"other",path:"M12,21L15.6,16.2C14.6,15.45 13.35,15 12,15C10.65,15 9.4,15.45 8.4,16.2L12,21M12,3C7.95,3 4.21,4.34 1.2,6.6L3,9C5.5,7.12 8.62,6 12,6C15.38,6 18.5,7.12 21,9L22.8,6.6C19.79,4.34 16.05,3 12,3M12,9C9.3,9 6.81,9.89 4.8,11.4L6.6,13.8C8.1,12.67 9.97,12 12,12C14.03,12 15.9,12.67 17.4,13.8L19.2,11.4C17.19,9.89 14.7,9 12,9Z"},{id:"gauge",label:"Gauge",category:"other",path:"M12,16C10.34,16 9,14.66 9,13C9,11.88 9.61,10.9 10.5,10.39L20.21,4.77L14.68,14.35C14.18,15.33 13.17,16 12,16M12,3C13.81,3 15.5,3.5 16.97,4.32L14.87,5.53C14,5.19 13,5 12,5C7.58,5 4,8.58 4,13C4,15.21 4.89,17.21 6.34,18.65H6.35C6.74,19.04 6.74,19.67 6.35,20.06C5.96,20.45 5.32,20.45 4.93,20.07V20.07C3.12,18.26 2,15.76 2,13C2,7.48 6.48,3 12,3M22,13C22,15.76 20.88,18.26 19.07,20.07V20.07C18.68,20.45 18.05,20.45 17.66,20.06C17.27,19.67 17.27,19.04 17.66,18.65V18.65C19.11,17.2 20,15.21 20,13C20,12 19.81,11 19.46,10.1L20.67,8C21.5,9.5 22,11.18 22,13Z"},{id:"ev_station",label:"EV station",category:"other",path:"M19.77,7.23L19.78,7.22L16.06,3.5L15,4.56L17.11,6.67C16.17,7.03 15.5,7.93 15.5,9C15.5,10.38 16.62,11.5 18,11.5C18.36,11.5 18.69,11.42 19,11.29V18.5C19,19.05 18.55,19.5 18,19.5C17.45,19.5 17,19.05 17,18.5V14C17,12.9 16.1,12 15,12H14V5C14,3.9 13.1,3 12,3H6C4.9,3 4,3.9 4,5V21H14V13.5H15.5V18.5C15.5,19.88 16.62,21 18,21C19.38,21 20.5,19.88 20.5,18.5V9C20.5,8.31 20.22,7.68 19.77,7.23M18,10C17.45,10 17,9.55 17,9C17,8.45 17.45,8 18,8C18.55,8 19,8.45 19,9C19,9.55 18.55,10 18,10M8,18V13.5H6L10,6V11H12L8,18Z"},{id:"washing",label:"Washing machine",category:"appliances",path:"M14.83,11.17C16.39,12.73 16.39,15.27 14.83,16.83C13.27,18.39 10.73,18.39 9.17,16.83L14.83,11.17M6,2H18C19.1,2 20,2.9 20,4V20C20,21.1 19.1,22 18,22H6C4.9,22 4,21.1 4,20V4C4,2.9 4.9,2 6,2M7,4C6.45,4 6,4.45 6,5C6,5.55 6.45,6 7,6C7.55,6 8,5.55 8,5C8,4.45 7.55,4 7,4M10,4C9.45,4 9,4.45 9,5C9,5.55 9.45,6 10,6C10.55,6 11,5.55 11,5C11,4.45 10.55,4 10,4M12,8C8.69,8 6,10.69 6,14C6,17.31 8.69,20 12,20C15.31,20 18,17.31 18,14C18,10.69 15.31,8 12,8Z"},{id:"tumble_dryer",label:"Dryer",category:"appliances",path:"M6,2H18A2,2 0 0,1 20,4V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V4A2,2 0 0,1 6,2M7,4A1,1 0 0,0 6,5A1,1 0 0,0 7,6A1,1 0 0,0 8,5A1,1 0 0,0 7,4M10,4A1,1 0 0,0 9,5A1,1 0 0,0 10,6A1,1 0 0,0 11,5A1,1 0 0,0 10,4M12,8A6,6 0 0,0 6,14A6,6 0 0,0 12,20A6,6 0 0,0 18,14A6,6 0 0,0 12,8M8.11,10.5H10C9.76,11.88 10,12.67 10.58,13.29C11.68,14.36 12.16,15.71 11.89,17.5H10C10.24,16.12 10,15.33 9.42,14.71C8.32,13.64 7.85,12.29 8.11,10.5M12.11,10.5H14C13.76,11.88 14,12.67 14.58,13.29C15.68,14.36 16.16,15.71 15.89,17.5H14C14.24,16.12 14,15.33 13.42,14.71C12.32,13.64 11.85,12.29 12.11,10.5Z"},{id:"stove",label:"Stove",category:"appliances",path:"M6,14H8L11,17H9L6,14M4,4H5V3A1,1 0 0,1 6,2H10A1,1 0 0,1 11,3V4H13V3A1,1 0 0,1 14,2H18A1,1 0 0,1 19,3V4H20A2,2 0 0,1 22,6V19A2,2 0 0,1 20,21V22H17V21H7V22H4V21A2,2 0 0,1 2,19V6A2,2 0 0,1 4,4M18,7A1,1 0 0,1 19,8A1,1 0 0,1 18,9A1,1 0 0,1 17,8A1,1 0 0,1 18,7M14,7A1,1 0 0,1 15,8A1,1 0 0,1 14,9A1,1 0 0,1 13,8A1,1 0 0,1 14,7M20,6H4V10H20V6M4,19H20V12H4V19M6,7A1,1 0 0,1 7,8A1,1 0 0,1 6,9A1,1 0 0,1 5,8A1,1 0 0,1 6,7M13,14H15L18,17H16L13,14Z"},{id:"microwave",label:"Microwave",category:"appliances",path:"M4,5A2,2 0 0,0 2,7V17A2,2 0 0,0 4,19H20A2,2 0 0,0 22,17V7A2,2 0 0,0 20,5H4M4,7H16V17H4V7M19,7A1,1 0 0,1 20,8A1,1 0 0,1 19,9A1,1 0 0,1 18,8A1,1 0 0,1 19,7M13,9V15H15V9H13M19,11A1,1 0 0,1 20,12A1,1 0 0,1 19,13A1,1 0 0,1 18,12A1,1 0 0,1 19,11Z"},{id:"fridge",label:"Fridge",category:"appliances",path:"M7,2H17A2,2 0 0,1 19,4V9H5V4A2,2 0 0,1 7,2M19,19A2,2 0 0,1 17,21V22H15V21H9V22H7V21A2,2 0 0,1 5,19V10H19V19M8,5V7H10V5H8M8,12V15H10V12H8Z"},{id:"freezer",label:"Freezer",category:"appliances",path:"M9,21V22H7V21A2,2 0 0,1 5,19V4A2,2 0 0,1 7,2H17A2,2 0 0,1 19,4V19A2,2 0 0,1 17,21V22H15V21H9M7,4V9H17V4H7M7,19H17V11H7V19M8,6H10V8H8V6 M12,12.5L13,13.1L14.2,13.8L13.7,15L14.2,16.2L13,16.9L12,17.5L11,16.9L9.8,16.2L10.3,15L9.8,13.8L11,13.1Z"},{id:"dishwasher",label:"Dishwasher",category:"appliances",path:"M18,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V4A2,2 0 0,0 18,2M10,4A1,1 0 0,1 11,5A1,1 0 0,1 10,6A1,1 0 0,1 9,5A1,1 0 0,1 10,4M7,4A1,1 0 0,1 8,5A1,1 0 0,1 7,6A1,1 0 0,1 6,5A1,1 0 0,1 7,4M18,20H6V8H18V20M14.67,15.33C14.69,16.03 14.41,16.71 13.91,17.21C12.86,18.26 11.15,18.27 10.09,17.21C9.59,16.71 9.31,16.03 9.33,15.33C9.4,14.62 9.63,13.94 10,13.33C10.37,12.5 10.81,11.73 11.33,11L12,10C13.79,12.59 14.67,14.36 14.67,15.33"},{id:"coffee_maker",label:"Coffee maker",category:"appliances",path:"M18 6V4H20V2H6C4.9 2 4 2.9 4 4V20C4 21.1 4.9 22 6 22H20V20H15.97C17.2 19.09 18 17.64 18 16V11H8V16C8 17.64 8.81 19.09 10.03 20H6V4H8V6C8 6.55 8.45 7 9 7H17C17.55 7 18 6.55 18 6M13 8C13.55 8 14 8.45 14 9S13.55 10 13 10 12 9.55 12 9 12.45 8 13 8Z"},{id:"vacuum",label:"Vacuum cleaner",category:"appliances",path:"M23 20V22H16L16 20H18.46L12 4.61C11.81 4.14 11.5 3.76 11.06 3.46S10.14 3 9.61 3C8.9 3 8.28 3.27 7.76 3.79S7 4.92 7 5.64L7 9H8C10.21 9 12 10.79 12 13V22H8C8.61 21.16 9 20.13 9 19C9 16.24 6.76 14 4 14C3.29 14 2.61 14.15 2 14.42V9H5V5.64C5 4.8 5.23 4 5.63 3.32C6.04 2.62 6.59 2.06 7.3 1.63C8 1.21 8.77 1 9.61 1C10.55 1 11.4 1.26 12.16 1.77S13.5 2.97 13.87 3.81L20.66 20H23M7 19C7 20.66 5.66 22 4 22S1 20.66 1 19 2.34 16 4 16 7 17.34 7 19M5 19C5 18.45 4.55 18 4 18S3 18.45 3 19 3.45 20 4 20 5 19.55 5 19Z"},{id:"robot_vacuum",label:"Robot vacuum",category:"appliances",path:"M12,2C14.65,2 17.19,3.06 19.07,4.93L17.65,6.35C16.15,4.85 14.12,4 12,4C9.88,4 7.84,4.84 6.35,6.35L4.93,4.93C6.81,3.06 9.35,2 12,2M3.66,6.5L5.11,7.94C4.39,9.17 4,10.57 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12C20,10.57 19.61,9.17 18.88,7.94L20.34,6.5C21.42,8.12 22,10.04 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12C2,10.04 2.58,8.12 3.66,6.5M12,6A6,6 0 0,1 18,12C18,13.59 17.37,15.12 16.24,16.24L14.83,14.83C14.08,15.58 13.06,16 12,16C10.94,16 9.92,15.58 9.17,14.83L7.76,16.24C6.63,15.12 6,13.59 6,12A6,6 0 0,1 12,6M12,8A1,1 0 0,0 11,9A1,1 0 0,0 12,10A1,1 0 0,0 13,9A1,1 0 0,0 12,8Z"},{id:"iron",label:"Iron",category:"appliances",path:"M21 6C19.34 6 18 7.34 18 9V13C13 13.55 17.55 14 17 14V10C17 8.34 15.66 7 14 7H10C8.34 7 7 8.34 7 10H9C9 9.45 9.45 9 10 9H14C14.55 9 15 9.45 15 10V11H6C3.79 11 2 12.79 2 15V18H17V16C18.66 16 20 14.66 20 13V9C20 8.45 20.45 8 21 8H22V6H21Z"},{id:"air_purifier",label:"Air purifier",category:"appliances",path:"M11,9A4,4 0 0,1 15,13A4,4 0 0,1 11,17A4,4 0 0,1 7,13A4,4 0 0,1 11,9M11,11A2,2 0 0,0 9,13A2,2 0 0,0 11,15A2,2 0 0,0 13,13A2,2 0 0,0 11,11M7,4H14A4,4 0 0,1 18,8V9H16V8A2,2 0 0,0 14,6H7A2,2 0 0,0 5,8V20H16V18H18V22H3V8A4,4 0 0,1 7,4M16,11C18.5,11 18.5,9 21,9V11C18.5,11 18.5,13 16,13V11M16,15C18.5,15 18.5,13 21,13V15C18.5,15 18.5,17 16,17V15Z"},{id:"heater",label:"Heater",category:"appliances",path:"M8.5 4.5L5.4 9.5L8.5 14.7L5.2 20.5L3.4 19.6L6.1 14.7L3 9.5L6.7 3.6L8.5 4.5M14.7 4.4L11.6 9.5L14.7 14.5L11.4 20.3L9.6 19.4L12.3 14.5L9.2 9.5L12.9 3.5L14.7 4.4M21 4.4L17.9 9.5L21 14.5L17.7 20.3L15.9 19.4L18.6 14.5L15.5 9.5L19.2 3.5L21 4.4"},{id:"car_auto",label:"Car",category:"appliances",path:"M5,11L6.5,6.5H17.5L19,11M17.5,16A1.5,1.5 0 0,1 16,14.5A1.5,1.5 0 0,1 17.5,13A1.5,1.5 0 0,1 19,14.5A1.5,1.5 0 0,1 17.5,16M6.5,16A1.5,1.5 0 0,1 5,14.5A1.5,1.5 0 0,1 6.5,13A1.5,1.5 0 0,1 8,14.5A1.5,1.5 0 0,1 6.5,16M18.92,6C18.72,5.42 18.16,5 17.5,5H6.5C5.84,5 5.28,5.42 5.08,6L3,12V20A1,1 0 0,0 4,21H5A1,1 0 0,0 6,20V19H18V20A1,1 0 0,0 19,21H20A1,1 0 0,0 21,20V12L18.92,6Z"},{id:"sprinkler",label:"Sprinkler",category:"garden",path:"M10 10H14V22H10V10M7 9H9V7H7V9M4 8H6V6H4V8M4 11H6V9H4V11M1 13H3V11H1V13M1 7H3V5H1V7M1 10H3V8H1V10M18 11H20V9H18V11M21 10H23V8H21V10M21 5V7H23V5H21M21 13H23V11H21V13M15 9H17V7H15V9M18 8H20V6H18V8M10 7H10.33L11 9H13L13.67 7H14V6H10V7Z"},{id:"robot_mower",label:"Robot mower",category:"garden",path:"M1 14C1 16.76 3.24 19 6 19C7.64 19 9.09 18.21 10 17H15.17C15.58 18.17 16.7 19 18 19C19.31 19 20.42 18.17 20.83 17H23V15C23 9.5 18.5 5 13 5H1V14M21 15H10.9C10.97 14.68 11 14.34 11 14C11 11.24 8.76 9 6 9C4.87 9 3.84 9.37 3 10V7H12.5C15.1 7 17.42 8.16 19 10H15V12H20.25C20.67 12.92 20.92 13.94 21 15M6 11C7.66 11 9 12.34 9 14C9 15.66 7.66 17 6 17C4.34 17 3 15.66 3 14C3 12.34 4.34 11 6 11Z"},{id:"flower",label:"Flower",category:"garden",path:"M3,13A9,9 0 0,0 12,22C12,17 7.97,13 3,13M12,5.5A2.5,2.5 0 0,1 14.5,8A2.5,2.5 0 0,1 12,10.5A2.5,2.5 0 0,1 9.5,8A2.5,2.5 0 0,1 12,5.5M5.6,10.25A2.5,2.5 0 0,0 8.1,12.75C8.63,12.75 9.12,12.58 9.5,12.31C9.5,12.37 9.5,12.43 9.5,12.5A2.5,2.5 0 0,0 12,15A2.5,2.5 0 0,0 14.5,12.5C14.5,12.43 14.5,12.37 14.5,12.31C14.88,12.58 15.37,12.75 15.9,12.75C17.28,12.75 18.4,11.63 18.4,10.25C18.4,9.25 17.81,8.4 16.97,8C17.81,7.6 18.4,6.74 18.4,5.75C18.4,4.37 17.28,3.25 15.9,3.25C15.37,3.25 14.88,3.41 14.5,3.69C14.5,3.63 14.5,3.56 14.5,3.5A2.5,2.5 0 0,0 12,1A2.5,2.5 0 0,0 9.5,3.5C9.5,3.56 9.5,3.63 9.5,3.69C9.12,3.41 8.63,3.25 8.1,3.25A2.5,2.5 0 0,0 5.6,5.75C5.6,6.74 6.19,7.6 7.03,8C6.19,8.4 5.6,9.25 5.6,10.25M12,22A9,9 0 0,0 21,13C16,13 12,17 12,22Z"},{id:"tree",label:"Tree",category:"garden",path:"M11,21V16.74C10.53,16.91 10.03,17 9.5,17C7,17 5,15 5,12.5C5,11.23 5.5,10.09 6.36,9.27C6.13,8.73 6,8.13 6,7.5C6,5 8,3 10.5,3C12.06,3 13.44,3.8 14.25,5C14.33,5 14.41,5 14.5,5A5.5,5.5 0 0,1 20,10.5A5.5,5.5 0 0,1 14.5,16C14,16 13.5,15.93 13,15.79V21H11Z"},{id:"grass",label:"Grass",category:"garden",path:"M12 20H2V18H7.75C7 15.19 4.81 13 2 12.26C2.64 12.1 3.31 12 4 12C8.42 12 12 15.58 12 20M22 12.26C21.36 12.1 20.69 12 20 12C17.07 12 14.5 13.58 13.12 15.93C13.41 16.59 13.65 17.28 13.79 18C13.92 18.65 14 19.32 14 20H22V18H16.24C17 15.19 19.19 13 22 12.26M15.64 11C16.42 8.93 17.87 7.18 19.73 6C15.44 6.16 12 9.67 12 14V14C12.95 12.75 14.2 11.72 15.64 11M11.42 8.85C10.58 6.66 8.88 4.89 6.7 4C8.14 5.86 9 8.18 9 10.71C9 10.92 8.97 11.12 8.96 11.32C9.39 11.56 9.79 11.84 10.18 12.14C10.39 10.96 10.83 9.85 11.42 8.85Z"},{id:"watering_can",label:"Watering can",category:"garden",path:"M18.5 7.47C17.76 8.2 17.57 9.25 17.92 10.15L15 13.07V11C15 10.45 14.55 10 14 10H12.97C13 9.83 13 9.67 13 9.5C13 6.46 10.54 4 7.5 4S2 6.46 2 9.5C2 11.21 2.78 12.73 4 13.74V20C4 20.55 4.45 21 5 21H14C14.55 21 15 20.55 15 20V15.89L19.33 11.56C20.23 11.91 21.28 11.73 22 11L18.5 7.47M4.05 10C4.03 9.83 4 9.67 4 9.5C4 7.57 5.57 6 7.5 6S11 7.57 11 9.5C11 9.67 10.97 9.83 10.95 10H4.05Z"},{id:"fence",label:"Fence",category:"garden",path:"M9 9V11H7V9H5V11H3V9H1V21H3V19H5V21H7V19H9V21H11V19H13V21H15V19H17V21H19V19H21V21H23V9H21V11H19V9H17V11H15V9H13V11H11V9H9M3 13H5V17H3V13M7 13H9V17H7V13M11 13H13V17H11V13M15 13H17V17H15V13M19 13H21V17H19V13Z"},{id:"shovel",label:"Shovel",category:"garden",path:"M15.1,1.81L12.27,4.64C11.5,5.42 11.5,6.69 12.27,7.47L13.68,8.88L9.13,13.43L6.31,10.6L4.89,12C-0.06,17 3.5,20.5 3.5,20.5C3.5,20.5 7,24 12,19.09L13.41,17.68L10.61,14.88L15.15,10.34L16.54,11.73C17.32,12.5 18.59,12.5 19.37,11.73L22.2,8.9L15.1,1.81M17.93,10.28L16.55,8.9L15.11,7.46L13.71,6.06L15.12,4.65L19.35,8.88L17.93,10.28Z"},{id:"pool",label:"Pool",category:"garden",path:"M2,15C3.67,14.25 5.33,13.5 7,13.17V5A3,3 0 0,1 10,2C11.31,2 12.42,2.83 12.83,4H10A1,1 0 0,0 9,5V6H14V5A3,3 0 0,1 17,2C18.31,2 19.42,2.83 19.83,4H17A1,1 0 0,0 16,5V14.94C18,14.62 20,13 22,13V15C19.78,15 17.56,17 15.33,17C13.11,17 10.89,15 8.67,15C6.44,15 4.22,16 2,17V15M14,8H9V10H14V8M14,12H9V13C10.67,13.16 12.33,14.31 14,14.79V12M2,19C4.22,18 6.44,17 8.67,17C10.89,17 13.11,19 15.33,19C17.56,19 19.78,17 22,17V19C19.78,19 17.56,21 15.33,21C13.11,21 10.89,19 8.67,19C6.44,19 4.22,20 2,21V19Z"},{id:"grill",label:"Grill",category:"garden",path:"M8.06,2C7.88,3.17 8.17,4.16 8.95,4.97C9.45,5.47 9.61,6.14 9.42,7H10.41C10.53,6.45 10.55,6 10.45,5.55C10.36,5.13 10.05,4.63 9.5,4.03C9.05,3.47 8.89,2.8 9.05,2H8.06M10.55,2C10.36,3.17 10.66,4.16 11.44,4.97C11.94,5.47 12.09,6.14 11.91,7H12.89C13,6.45 13.03,6 12.94,5.55C12.84,5.13 12.53,4.63 12,4.03C11.53,3.47 11.38,2.8 11.53,2H10.55M13.08,2C12.89,3.17 13.19,4.16 13.97,4.97C14.47,5.47 14.61,6.14 14.39,7H15.42C15.55,6.45 15.56,6 15.47,5.55C15.38,5.13 15.06,4.63 14.53,4.03C14.06,3.47 13.91,2.8 14.06,2H13.08M5,8C5,9.42 5.39,10.7 6.14,11.84C6.87,12.96 7.91,13.85 9.14,14.39L5.16,20.44C5.06,20.56 5,20.75 5,21C5,21.41 5.16,21.69 5.44,21.84C5.56,21.94 5.75,22 6,22C6.41,22 6.69,21.84 6.84,21.56L7.83,19.97H14.2C14.41,20.55 14.79,21.05 15.28,21.42C15.78,21.8 16.36,22 17,22C17.83,22 18.53,21.69 19.13,21.09C19.72,20.5 20,19.8 20,19C20,18.17 19.72,17.47 19.13,16.88C18.53,16.28 17.83,16 17,16C16.36,16 15.78,16.17 15.28,16.55C14.78,16.92 14.42,17.41 14.2,18H9.14L11.11,14.95C11.27,15 11.56,15 12,15C12.44,15 12.73,15 12.89,14.95L13.88,16.5C14.29,15.96 14.84,15.54 15.47,15.28L14.91,14.39C16.03,13.89 17,13 17.79,11.77C18.59,10.5 19,9.27 19,8H5M17,18C17.3,18 17.53,18.09 17.72,18.28C17.91,18.47 18,18.72 18,19C18,19.27 17.91,19.5 17.72,19.71C17.54,19.91 17.28,20 17,20C16.74,20 16.5,19.91 16.29,19.71C16.09,19.5 16,19.26 16,19C16,18.7 16.09,18.47 16.29,18.28C16.5,18.09 16.73,18 17,18Z"},{id:"valve",label:"Valve",category:"technical",path:"M4 22H2V2H4M22 2H20V22H22M17.24 5.34L13.24 9.34A3 3 0 0 0 9.24 13.34L5.24 17.34L6.66 18.76L10.66 14.76A3 3 0 0 0 14.66 10.76L18.66 6.76Z"},{id:"tank",label:"Tank",category:"technical",path:"M4 15V18C4 20.21 5.79 22 8 22H16C18.21 22 20 20.21 20 18V15H4M20 13V10C20 8.14 18.72 6.59 17 6.14V4C17 2.9 16.1 2 15 2H9C7.9 2 7 2.9 7 4V6.14C5.28 6.59 4 8.14 4 10V13H20M9 4H15V6H13C13 5.45 12.55 5 12 5S11 5.45 11 6H9V4Z"},{id:"pump",label:"Pump",category:"technical",path:"M2 21V15H3.5C3.18 14.06 3 13.05 3 12C3 7.03 7.03 3 12 3H22V9H20.5C20.82 9.94 21 10.95 21 12C21 16.97 16.97 21 12 21H2M5 12C5 13.28 5.34 14.47 5.94 15.5L9.4 13.5C9.15 13.06 9 12.55 9 12C9 11.35 9.21 10.75 9.56 10.26L6.3 7.93C5.5 9.08 5 10.5 5 12M12 19C14.59 19 16.85 17.59 18.06 15.5L14.6 13.5C14.08 14.4 13.11 15 12 15L11.71 15L11.33 18.97L12 19M12 9C13.21 9 14.26 9.72 14.73 10.76L18.37 9.1C17.27 6.68 14.83 5 12 5V9M12 11C11.45 11 11 11.45 11 12C11 12.55 11.45 13 12 13C12.55 13 13 12.55 13 12C13 11.45 12.55 11 12 11Z"},{id:"water_pump",label:"Water pump",category:"technical",path:"M19,14.5C19,14.5 21,16.67 21,18A2,2 0 0,1 19,20A2,2 0 0,1 17,18C17,16.67 19,14.5 19,14.5M5,18V9A2,2 0 0,1 3,7A2,2 0 0,1 5,5V4A2,2 0 0,1 7,2H9A2,2 0 0,1 11,4V5H19A2,2 0 0,1 21,7V9L21,11A1,1 0 0,1 22,12A1,1 0 0,1 21,13H17A1,1 0 0,1 16,12A1,1 0 0,1 17,11V9H11V18H12A2,2 0 0,1 14,20V22H2V20A2,2 0 0,1 4,18H5Z"},{id:"pipe",label:"Pipe",category:"technical",path:"M22,14H20V16H14V13H16V11H14V6A2,2 0 0,0 12,4H4V2H2V10H4V8H10V11H8V13H10V18A2,2 0 0,0 12,20H20V22H22"},{id:"solar_panel",label:"Solar panel",category:"technical",path:"M4,2H20A2,2 0 0,1 22,4V14A2,2 0 0,1 20,16H15V20H18V22H13V16H11V22H6V20H9V16H4A2,2 0 0,1 2,14V4A2,2 0 0,1 4,2M4,4V8H11V4H4M4,14H11V10H4V14M20,14V10H13V14H20M20,4H13V8H20V4Z"},{id:"lightning_bolt",label:"Lightning bolt",category:"technical",path:"M11 15H6L13 1V9H18L11 23V15Z"},{id:"radiator",label:"Radiator",category:"technical",path:"M7.95,3L6.53,5.19L7.95,7.4H7.94L5.95,10.5L4.22,9.6L5.64,7.39L4.22,5.19L6.22,2.09L7.95,3M13.95,2.89L12.53,5.1L13.95,7.3L13.94,7.31L11.95,10.4L10.22,9.5L11.64,7.3L10.22,5.1L12.22,2L13.95,2.89M20,2.89L18.56,5.1L20,7.3V7.31L18,10.4L16.25,9.5L17.67,7.3L16.25,5.1L18.25,2L20,2.89M2,22V14A2,2 0 0,1 4,12H20A2,2 0 0,1 22,14V22H20V20H4V22H2M6,14A1,1 0 0,0 5,15V17A1,1 0 0,0 6,18A1,1 0 0,0 7,17V15A1,1 0 0,0 6,14M10,14A1,1 0 0,0 9,15V17A1,1 0 0,0 10,18A1,1 0 0,0 11,17V15A1,1 0 0,0 10,14M14,14A1,1 0 0,0 13,15V17A1,1 0 0,0 14,18A1,1 0 0,0 15,17V15A1,1 0 0,0 14,14M18,14A1,1 0 0,0 17,15V17A1,1 0 0,0 18,18A1,1 0 0,0 19,17V15A1,1 0 0,0 18,14Z"},{id:"cog",label:"Gear",category:"technical",path:"M12,15.5A3.5,3.5 0 0,1 8.5,12A3.5,3.5 0 0,1 12,8.5A3.5,3.5 0 0,1 15.5,12A3.5,3.5 0 0,1 12,15.5M19.43,12.97C19.47,12.65 19.5,12.33 19.5,12C19.5,11.67 19.47,11.34 19.43,11L21.54,9.37C21.73,9.22 21.78,8.95 21.66,8.73L19.66,5.27C19.54,5.05 19.27,4.96 19.05,5.05L16.56,6.05C16.04,5.66 15.5,5.32 14.87,5.07L14.5,2.42C14.46,2.18 14.25,2 14,2H10C9.75,2 9.54,2.18 9.5,2.42L9.13,5.07C8.5,5.32 7.96,5.66 7.44,6.05L4.95,5.05C4.73,4.96 4.46,5.05 4.34,5.27L2.34,8.73C2.21,8.95 2.27,9.22 2.46,9.37L4.57,11C4.53,11.34 4.5,11.67 4.5,12C4.5,12.33 4.53,12.65 4.57,12.97L2.46,14.63C2.27,14.78 2.21,15.05 2.34,15.27L4.34,18.73C4.46,18.95 4.73,19.03 4.95,18.95L7.44,17.94C7.96,18.34 8.5,18.68 9.13,18.93L9.5,21.58C9.54,21.82 9.75,22 10,22H14C14.25,22 14.46,21.82 14.5,21.58L14.87,18.93C15.5,18.67 16.04,18.34 16.56,17.94L19.05,18.95C19.27,19.03 19.54,18.95 19.66,18.73L21.66,15.27C21.78,15.05 21.73,14.78 21.54,14.63L19.43,12.97Z"},{id:"wrench",label:"Wrench",category:"technical",path:"M22.7,19L13.6,9.9C14.5,7.6 14,4.9 12.1,3C10.1,1 7.1,0.6 4.7,1.7L9,6L6,9L1.6,4.7C0.4,7.1 0.9,10.1 2.9,12.1C4.8,14 7.5,14.5 9.8,13.6L18.9,22.7C19.3,23.1 19.9,23.1 20.3,22.7L22.6,20.4C23.1,20 23.1,19.3 22.7,19Z"},{id:"filter",label:"Filter",category:"technical",path:"M14,12V19.88C14.04,20.18 13.94,20.5 13.71,20.71C13.32,21.1 12.69,21.1 12.3,20.71L10.29,18.7C10.06,18.47 9.96,18.16 10,17.87V12H9.97L4.21,4.62C3.87,4.19 3.95,3.56 4.38,3.22C4.57,3.08 4.78,3 5,3V3H19V3C19.22,3 19.43,3.08 19.62,3.22C20.05,3.56 20.13,4.19 19.79,4.62L14.03,12H14Z"},{id:"boiler",label:"Boiler",category:"technical",path:"M8 2C6.89 2 6 2.89 6 4V16C6 17.11 6.89 18 8 18H9V20H6V22H9C10.11 22 11 21.11 11 20V18H13V20C13 21.11 13.89 22 15 22H18V20H15V18H16C17.11 18 18 17.11 18 16V4C18 2.89 17.11 2 16 2H8M12 4.97A2 2 0 0 1 14 6.97A2 2 0 0 1 12 8.97A2 2 0 0 1 10 6.97A2 2 0 0 1 12 4.97M10 14.5H14V16H10V14.5Z"},{id:"gas_station",label:"Gas station",category:"technical",path:"M18,10A1,1 0 0,1 17,9A1,1 0 0,1 18,8A1,1 0 0,1 19,9A1,1 0 0,1 18,10M12,10H6V5H12M19.77,7.23L19.78,7.22L16.06,3.5L15,4.56L17.11,6.67C16.17,7 15.5,7.93 15.5,9A2.5,2.5 0 0,0 18,11.5C18.36,11.5 18.69,11.42 19,11.29V18.5A1,1 0 0,1 18,19.5A1,1 0 0,1 17,18.5V14C17,12.89 16.1,12 15,12H14V5C14,3.89 13.1,3 12,3H6C4.89,3 4,3.89 4,5V21H14V13.5H15.5V18.5A2.5,2.5 0 0,0 18,21A2.5,2.5 0 0,0 20.5,18.5V9C20.5,8.31 20.22,7.68 19.77,7.23Z"},{id:"motor",label:"Motor",category:"technical",path:"M17,2H7A2,2 0 0,0 5,4V6H3V10H5V20A2,2 0 0,0 7,22H17A2,2 0 0,0 19,20V10H21V6H19V4A2,2 0 0,0 17,2M17,20H7V4H17V20M12,6A4,4 0 0,0 8,10V18H16V10A4,4 0 0,0 12,6M12,8A2,2 0 0,1 14,10H10A2,2 0 0,1 12,8Z"}],njt=[{id:"lights",label:"wm_group_Lights"},{id:"power",label:"wm_group_Power"},{id:"climate",label:"wm_group_Climate"},{id:"openings",label:"wm_group_Openings"},{id:"security",label:"wm_group_Security"},{id:"sensors",label:"wm_group_Sensors"},{id:"media",label:"wm_group_Media"},{id:"garden",label:"wm_group_Garden"},{id:"technical",label:"wm_group_Technical"},{id:"appliances",label:"wm_group_Appliances"},{id:"computers",label:"wm_group_Computers"},{id:"people",label:"wm_group_People"},{id:"other",label:"wm_group_Other"}];function rjt({d:t,size:e=24}){return p.jsx(Cu,{sx:{fontSize:e},viewBox:"0 0 24 24",children:p.jsx("path",{d:t})})}function u4(t){const{open:e,title:n,value:r,onClose:o,onSelect:s,socket:i,theme:a,admin:d}=t,[m,_]=E.useState("predefined"),[h,w]=E.useState(!1),x=E.useRef(null),S=D=>{const P=D.target.files?.[0];if(!P)return;const R=new FileReader;R.onload=()=>{s(R.result)},R.readAsDataURL(P),D.target.value=""},C=D=>{if(w(!1),!D)return;const P=Array.isArray(D)?D[0]:D;if(P){const R=P.startsWith("/")?P.substring(1):P;s(`${d?"./files/":"../"}${R}`)}},M=D=>{s(EL(D.path))};return p.jsxs(p.Fragment,{children:[p.jsxs(Mn,{open:e,onClose:o,maxWidth:"xs",fullWidth:!0,children:[p.jsx(tr,{children:n}),p.jsxs(Dn,{children:[r?p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:1,mb:2,p:1,borderRadius:1,bgcolor:"action.hover"},children:[p.jsx(Gn,{src:r,style:{width:32,height:32}}),p.jsx(oe,{variant:"body2",sx:{flex:1,color:"text.secondary"},children:B.t("wm_Current icon")}),p.jsx(st,{size:"small",onClick:()=>s(""),children:p.jsx(Do,{fontSize:"small"})})]}):null,p.jsxs(nc,{value:m,exclusive:!0,onChange:(D,P)=>{P&&_(P)},size:"small",fullWidth:!0,sx:{mb:2},children:[p.jsxs(pr,{value:"predefined",children:[p.jsx(lLt,{sx:{fontSize:16,mr:.5}}),B.t("wm_Predefined")]}),p.jsxs(pr,{value:"upload",children:[p.jsx(id,{sx:{fontSize:16,mr:.5}}),B.t("wm_Upload")]}),p.jsxs(pr,{value:"iobroker",children:[p.jsx(Wg,{sx:{fontSize:16,mr:.5}}),"ioBroker"]})]}),m==="predefined"?p.jsx(Y,{sx:{maxHeight:300,overflowY:"auto"},children:njt.map(D=>{const P=tjt.filter(R=>R.category===D.id);return P.length?p.jsxs(Y,{sx:{mb:1.5},children:[p.jsx(oe,{variant:"caption",sx:{color:"text.secondary",fontWeight:500,display:"block",mb:.5},children:B.t(D.label)}),p.jsx(Y,{sx:{display:"flex",flexWrap:"wrap",gap:.5},children:P.map(R=>{const W=EL(R.path),A=r===W;return p.jsx(ht,{title:R.label,children:p.jsx(Y,{onClick:()=>M(R),sx:N=>({width:36,height:36,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:1,cursor:"pointer",border:`2px solid ${A?N.palette.primary.main:"transparent"}`,bgcolor:A?"action.selected":"action.hover","&:hover":{bgcolor:"action.focus"}}),children:p.jsx(rjt,{d:R.path,size:22})})},R.id)})})]},D.id):null})}):null,m==="upload"?p.jsxs(Y,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:2,py:3},children:[p.jsx(bt,{variant:"outlined",startIcon:p.jsx(id,{}),onClick:()=>x.current?.click(),children:B.t("wm_Upload")}),p.jsx(oe,{variant:"caption",sx:{color:"text.secondary"},children:"SVG, PNG, JPG"}),p.jsx("input",{ref:x,type:"file",accept:"image/*,.svg",style:{display:"none"},onChange:S})]}):null,m==="iobroker"?p.jsxs(Y,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:2,py:3},children:[p.jsx(bt,{variant:"outlined",startIcon:p.jsx(Wg,{}),onClick:()=>w(!0),children:B.t("wm_Browse")}),p.jsx(oe,{variant:"caption",sx:{color:"text.secondary"},children:B.t("wm_Browse ioBroker")})]}):null]}),p.jsx(Fr,{children:p.jsx(bt,{color:"grey",startIcon:p.jsx(ms,{}),onClick:o,children:B.t("wm_Cancel")})})]}),h?p.jsx(o4,{socket:i,theme:a,imagePrefix:d?"./files/":"../",filterByType:"images",onClose:()=>w(!1),onOk:C,allowNonRestricted:!0,allowUpload:!0,allowDownload:!0,allowCreateFolder:!0,allowDelete:!0,allowView:!0,showToolbar:!0,restrictToFolder:`${this.adapterName}.${this.instance}`}):null]})}const Gg={name:"",color:"",backgroundColor:"",image:"",imageScope:"header"};function ojt(t){const{open:e,categoryName:n,categoryId:r,settings:o,onClose:s,onSave:i,socket:a,instance:d,theme:m,admin:_,categoryOptions:h}=t,w=_?"files/":"",[x,S]=E.useState(o),[C,M]=E.useState(""),[D,P]=E.useState(""),[R,W]=E.useState(""),[A,N]=E.useState(!1),[H,q]=E.useState(!1),[J,z]=E.useState(!1),[K,X]=E.useState(!1),[te,ee]=E.useState(!1),[le,ae]=E.useState(!1),me=E.useRef(null),ie=E.useRef(null),se=E.useRef(null),re=E.useRef(null);E.useEffect(()=>{if(e){S({...o,name:o.name||n});const Ee=o.image||"";M(Ee?`/${w}${Ee.replace(/^\//,"")}`:"");const Ce=o.icon||"";P(Ce?`/${w}${Ce.replace(/^\//,"")}`:"");const Be=o.rootIcon||"";W(Be?`/${w}${Be.replace(/^\//,"")}`:"")}},[o,e,n,w]);const G=E.useCallback(async Ee=>{const Ce=new Image;Ce.src=Ee,await new Promise(ve=>{Ce.onload=()=>ve()});const Be=800;let ft=Ce.width,rt=Ce.height;ft>Be&&(rt=Math.round(rt*(Be/ft)),ft=Be);const qe=document.createElement("canvas");qe.width=ft,qe.height=rt,qe.getContext("2d").drawImage(Ce,0,0,ft,rt);const kt=qe.toDataURL("image/webp",.8).replace(/^data:image\/webp;base64,/,""),we=`category_${String(r).replace(/[^a-zA-Z0-9_-]/g,"_")}.webp`;try{await a.writeFile64(d,we,kt);const ve=`/${d}/${we}`;M(`/${w}${d}/${we}?t=${Date.now()}`),S(Fe=>({...Fe,image:ve}))}catch(ve){console.error("Failed to upload category image:",ve)}},[r,a,d,w]),ne=Ee=>{const Ce=Ee.target.files?.[0];if(!Ce)return;const Be=new FileReader;Be.onload=ft=>{G(ft.target?.result)},Be.readAsDataURL(Ce),Ee.target.value=""},ge=()=>{M(""),S(Ee=>({...Ee,image:""}))},_e=E.useCallback(async Ee=>{const Ce=new Image;Ce.src=Ee,await new Promise(Fe=>{Ce.onload=()=>Fe()});const Be=512,ft=document.createElement("canvas");ft.width=Be,ft.height=Be;const rt=ft.getContext("2d"),qe=Math.min(Ce.width,Ce.height),Je=(Ce.width-qe)/2,Dt=(Ce.height-qe)/2;rt.drawImage(Ce,Je,Dt,qe,qe,0,0,Be,Be);const we=ft.toDataURL("image/png").replace(/^data:image\/png;base64,/,""),ve="pwa_icon.png";try{await a.writeFile64(d,ve,we);const Fe=`/${d}/${ve}`;P(`/${w}${d}/${ve}?t=${Date.now()}`),S(Ge=>({...Ge,icon:Fe}))}catch(Fe){console.error("Failed to upload icon:",Fe)}},[a,d,w]),ue=Ee=>{const Ce=Ee.target.files?.[0];if(!Ce)return;const Be=new FileReader;Be.onload=ft=>{_e(ft.target?.result)},Be.readAsDataURL(Ce),Ee.target.value=""},de=Ee=>{if(z(!1),!Ee)return;const Ce=Array.isArray(Ee)?Ee[0]:Ee;if(Ce){const Be=Ce.startsWith("/")?Ce.substring(1):Ce,ft=`/${Be}`;P(`/${w}${Be}`),S(rt=>({...rt,icon:ft}))}},Te=()=>{P(""),S(Ee=>({...Ee,icon:""}))},je=typeof navigator<"u"&&!!navigator.mediaDevices?.getUserMedia&&window.isSecureContext!==!1,Pe=E.useCallback(()=>{if(re.current){for(const Ee of re.current.getTracks())Ee.stop();re.current=null}},[]),Oe=async()=>{try{const Ee=await navigator.mediaDevices.getUserMedia({video:{facingMode:"environment",width:{ideal:1280}}});re.current=Ee,N(!0),requestAnimationFrame(()=>{se.current&&(se.current.srcObject=Ee)})}catch(Ee){console.error("Camera access denied:",Ee)}},Ye=()=>{const Ee=se.current;if(!Ee)return;const Ce=document.createElement("canvas");Ce.width=Ee.videoWidth,Ce.height=Ee.videoHeight,Ce.getContext("2d").drawImage(Ee,0,0);const ft=Ce.toDataURL("image/png");Pe(),N(!1),G(ft)},Re=()=>{Pe(),N(!1)},Xe=Ee=>{if(q(!1),!Ee)return;const Ce=Array.isArray(Ee)?Ee[0]:Ee;if(Ce){const Be=Ce.startsWith("/")?Ce.substring(1):Ce,ft=`/${Be}`;M(`/${w}${Be}`),S(rt=>({...rt,image:ft}))}};E.useEffect(()=>{e||(Pe(),N(!1),q(!1))},[e,Pe]);const ze=r==="__root__",Ue=x.name!==(o.name||n)||x.color!==(o.color||"")||x.backgroundColor!==(o.backgroundColor||"")||x.image!==(o.image||"")||x.imageScope!==(o.imageScope||"header")||ze&&!!x.hideConfigButton!=!!o.hideConfigButton||ze&&(x.wmTheme||"auto")!==(o.wmTheme||"auto")||ze&&(x.defaultCategory||"")!==(o.defaultCategory||"")||(x.icon||"")!==(o.icon||"")||(x.rootIcon||"")!==(o.rootIcon||"");return p.jsxs(p.Fragment,{children:[p.jsxs(Mn,{open:e,onClose:s,maxWidth:"xs",fullWidth:!0,children:[p.jsx(tr,{children:n}),p.jsxs(Dn,{children:[p.jsx(En,{fullWidth:!0,variant:"filled",label:B.t("wm_Name"),value:x.name,onChange:Ee=>S({...x,name:Ee.target.value}),placeholder:n,size:"small",sx:{mt:1,mb:2}}),p.jsxs(Y,{sx:{mb:2},children:[p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t("wm_Color")}),p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:1},children:[p.jsx(Y,{component:"input",type:"color",value:x.color||"#1976d2",onChange:Ee=>S({...x,color:Ee.target.value}),sx:{width:40,height:40,border:"1px solid",borderColor:"divider",borderRadius:1,cursor:"pointer",p:"2px",backgroundColor:"transparent"}}),x.color?p.jsx(st,{size:"small",onClick:()=>S({...x,color:""}),children:p.jsx(Do,{fontSize:"small"})}):null]})]}),p.jsxs(Y,{sx:{mb:2},children:[p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t("wm_Background color")}),p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:1},children:[p.jsx(Y,{component:"input",type:"color",value:x.backgroundColor||"#121212",onChange:Ee=>S({...x,backgroundColor:Ee.target.value}),sx:{width:40,height:40,border:"1px solid",borderColor:"divider",borderRadius:1,cursor:"pointer",p:"2px",backgroundColor:"transparent"}}),x.backgroundColor?p.jsx(st,{size:"small",onClick:()=>S({...x,backgroundColor:""}),children:p.jsx(Do,{fontSize:"small"})}):null]})]}),p.jsxs(Y,{sx:{mb:2},children:[p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t("wm_Background image")}),p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:1},children:[p.jsx(bt,{variant:"outlined",size:"small",startIcon:p.jsx(id,{}),onClick:()=>me.current?.click(),sx:{textTransform:"none",flex:1},children:B.t("wm_Upload")}),p.jsx(ht,{title:je?"":B.t("wm_Camera requires HTTPS"),arrow:!0,children:p.jsx("span",{style:{flex:1},children:p.jsx(bt,{variant:"outlined",size:"small",startIcon:p.jsx(YD,{}),onClick:()=>{Oe()},disabled:!je,sx:{textTransform:"none",width:"100%"},children:B.t("wm_Take photo")})})}),p.jsx(bt,{variant:"outlined",size:"small",startIcon:p.jsx(Wg,{}),onClick:()=>q(!0),sx:{textTransform:"none",flex:1},children:B.t("wm_Browse")}),p.jsx("input",{ref:me,type:"file",accept:"image/*",style:{display:"none"},onChange:ne}),C?p.jsx(st,{size:"small",onClick:ge,children:p.jsx(Do,{fontSize:"small"})}):null]}),C?p.jsx(Y,{component:"img",src:C,sx:{mt:1,width:"100%",maxHeight:120,objectFit:"cover",borderRadius:1,border:"1px solid",borderColor:"divider"}}):null]}),C?p.jsxs(Y,{children:[p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t("wm_Image scope")}),p.jsxs(nc,{value:x.imageScope,exclusive:!0,onChange:(Ee,Ce)=>{Ce&&S({...x,imageScope:Ce})},size:"small",children:[p.jsx(pr,{value:"header",children:B.t("wm_Header only")}),p.jsx(pr,{value:"page",children:B.t("wm_Whole page")})]})]}):null,ze?null:p.jsxs(Y,{sx:{mt:2},children:[p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t("wm_Icons")}),p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:1},children:[p.jsx(Y,{onClick:()=>X(!0),sx:{width:48,height:48,borderRadius:1,border:"2px dashed",borderColor:"divider",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer","&:hover":{borderColor:"primary.main"}},children:x.icon?p.jsx(Gn,{src:x.icon,style:{width:32,height:32}}):p.jsx(id,{sx:{fontSize:24,color:"text.disabled"}})}),x.icon?p.jsx(st,{size:"small",onClick:()=>S(Ee=>({...Ee,icon:""})),children:p.jsx(Do,{fontSize:"small"})}):null]})]}),ze?p.jsxs(En,{select:!0,fullWidth:!0,variant:"filled",size:"small",label:B.t("wm_Theme"),value:x.wmTheme||"auto",onChange:Ee=>S({...x,wmTheme:Ee.target.value}),sx:{mt:2},children:[p.jsx(ln,{value:"auto",children:B.t("wm_theme_auto")}),p.jsx(ln,{value:"dark",children:B.t("wm_theme_dark")}),p.jsx(ln,{value:"light",children:B.t("wm_theme_light")}),p.jsx(ln,{value:"orangeDark",children:B.t("wm_theme_orangeDark")}),p.jsx(ln,{value:"blueDark",children:B.t("wm_theme_blueDark")}),p.jsx(ln,{value:"styling-grey",children:B.t("wm_theme_styling-grey")})]}):null,ze&&h?p.jsxs(En,{select:!0,fullWidth:!0,variant:"filled",size:"small",label:B.t("wm_Default category"),value:x.defaultCategory||"",onChange:Ee=>S({...x,defaultCategory:Ee.target.value||""}),sx:{mt:2},children:[p.jsx(ln,{value:"",children:B.t("wm_None (root)")}),h.map(Ee=>p.jsx(ln,{value:Ee.id,children:p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:1},children:[Ee.icon?p.jsx(Gn,{src:Ee.icon,style:{width:20,height:20,flexShrink:0}}):null,p.jsx("span",{children:Ee.label})]})},Ee.id))]}):null,ze?p.jsx(Wt,{control:p.jsx(hr,{checked:!!x.hideConfigButton,onChange:(Ee,Ce)=>{Ce&&!_?ae(!0):S({...x,hideConfigButton:Ce})},size:"small"}),label:B.t("wm_Hide config button"),sx:{mt:1}}):null,ze?p.jsxs(Y,{sx:{mt:2},children:[p.jsx(ht,{title:B.t("wm_App icon tooltip"),children:p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t("wm_App icon")})}),p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:1},children:[D?p.jsx(Y,{component:"img",src:D,sx:{width:48,height:48,borderRadius:1,border:"1px solid",borderColor:"divider",objectFit:"cover"}}):null,p.jsx(bt,{variant:"outlined",size:"small",startIcon:p.jsx(id,{}),onClick:()=>ie.current?.click(),sx:{textTransform:"none"},children:B.t("wm_Upload")}),p.jsx(bt,{variant:"outlined",size:"small",startIcon:p.jsx(Wg,{}),onClick:()=>z(!0),sx:{textTransform:"none"},children:B.t("wm_Browse")}),p.jsx("input",{ref:ie,type:"file",accept:"image/*",style:{display:"none"},onChange:ue}),D?p.jsx(st,{size:"small",onClick:Te,children:p.jsx(Do,{fontSize:"small"})}):null]})]}):null,ze?p.jsxs(Y,{sx:{mt:2},children:[p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t("wm_Root icon")}),p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:1},children:[R?p.jsx(Gn,{src:R,style:{width:36,height:36}}):null,p.jsx(bt,{variant:"outlined",size:"small",startIcon:p.jsx(Wg,{}),onClick:()=>ee(!0),sx:{textTransform:"none"},children:B.t("wm_Browse")}),R?p.jsx(st,{size:"small",onClick:()=>{W(""),S(Ee=>({...Ee,rootIcon:""}))},children:p.jsx(Do,{fontSize:"small"})}):null]})]}):null]}),p.jsxs(Fr,{children:[p.jsx(bt,{variant:"contained",disabled:!Ue,startIcon:p.jsx(mk,{}),onClick:()=>i(x),children:B.t("wm_Save")}),p.jsx(bt,{color:"grey",startIcon:p.jsx(ms,{}),onClick:s,children:B.t("wm_Cancel")})]})]}),H?p.jsx(o4,{socket:a,theme:m,imagePrefix:_?"./files/":"../",filterByType:"images",onClose:()=>q(!1),onOk:Xe,allowNonRestricted:!0,allowUpload:!0,allowDownload:!0,allowCreateFolder:!0,allowDelete:!0,allowView:!0,showToolbar:!0,restrictToFolder:`${this.adapterName}.${this.instance}`}):null,K?p.jsx(u4,{open:!0,title:B.t("wm_Icons"),value:x.icon||"",onClose:()=>X(!1),onSelect:Ee=>{S(Ce=>({...Ce,icon:Ee})),Ee&&X(!1)},socket:a,theme:m,admin:_}):null,te?p.jsx(u4,{open:!0,title:B.t("wm_Root icon"),value:x.rootIcon||"",onClose:()=>ee(!1),onSelect:Ee=>{S(Be=>({...Be,rootIcon:Ee}));const Ce=Ee?`/${w}${Ee.replace(/^\//,"")}`:"";W(Ce),Ee&&ee(!1)},socket:a,theme:m,admin:_}):null,J?p.jsx(o4,{socket:a,theme:m,imagePrefix:_?"./files/":"../",filterByType:"images",onClose:()=>z(!1),onOk:de}):null,p.jsxs(Mn,{open:A,onClose:Re,maxWidth:"sm",fullWidth:!0,children:[p.jsx(tr,{children:B.t("wm_Take photo")}),p.jsx(Dn,{sx:{p:0,display:"flex",justifyContent:"center",backgroundColor:"black"},children:p.jsx(Y,{component:"video",ref:se,autoPlay:!0,playsInline:!0,muted:!0,sx:{width:"100%",maxHeight:"60vh",objectFit:"contain"}})}),p.jsxs(Fr,{children:[p.jsx(bt,{variant:"contained",startIcon:p.jsx(YD,{}),onClick:Ye,children:B.t("wm_Capture")}),p.jsx(bt,{color:"grey",startIcon:p.jsx(ms,{}),onClick:Re,children:B.t("wm_Cancel")})]})]}),p.jsxs(Mn,{open:le,onClose:()=>ae(!1),maxWidth:"xs",children:[p.jsx(tr,{children:B.t("wm_Warning")}),p.jsx(Dn,{children:p.jsx(oe,{children:B.t("wm_Hide config warning")})}),p.jsxs(Fr,{children:[p.jsx(bt,{onClick:()=>{S(Ee=>({...Ee,hideConfigButton:!0})),ae(!1)},color:"warning",children:B.t("wm_OK")}),p.jsx(bt,{onClick:()=>ae(!1),children:B.t("wm_Cancel")})]})]})]})}const sjt={[Ae.Types.socket]:"lights",[Ae.Types.light]:"lights",[Ae.Types.dimmer]:"lights",[Ae.Types.rgbSingle]:"lights",[Ae.Types.rgbwSingle]:"lights",[Ae.Types.rgb]:"lights",[Ae.Types.ct]:"lights",[Ae.Types.hue]:"lights",[Ae.Types.cie]:"lights",[Ae.Types.thermostat]:"climate",[Ae.Types.airCondition]:"climate",[Ae.Types.blind]:"blinds",[Ae.Types.blindButtons]:"blinds",[Ae.Types.window]:"openings",[Ae.Types.door]:"openings",[Ae.Types.lock]:"security",[Ae.Types.motion]:"security",[Ae.Types.floodAlarm]:"security",[Ae.Types.fireAlarm]:"security",[Ae.Types.temperature]:"info",[Ae.Types.humidity]:"info",[Ae.Types.illuminance]:"info",[Ae.Types.info]:"info",[Ae.Types.slider]:"info",[Ae.Types.volume]:"info",[Ae.Types.volumeGroup]:"info",[Ae.Types.location]:"info",[Ae.Types.locationOne]:"info",[Ae.Types.warning]:"info",[Ae.Types.image]:"info",[Ae.Types.weatherCurrent]:"info",[Ae.Types.weatherForecast]:"info"},pf=[{id:"lights",name:"wm_group_Lights"},{id:"climate",name:"wm_group_Climate"},{id:"blinds",name:"wm_group_Blinds"},{id:"openings",name:"wm_group_Openings"},{id:"security",name:"wm_group_Security"},{id:"info",name:"wm_group_Info"},{id:"widgets",name:"wm_group_Widgets"},{id:"other",name:"wm_group_Other"}];function ijt(t){const e={};for(const n of t){if(n.type==="category")continue;let r;if(n.type==="custom")r="widgets";else{const o=n.data;r=o.control?.type&&sjt[o.control.type]||"other"}e[r]||(e[r]=[]),e[r].push(n.id)}return pf.filter(n=>e[n.id]?.length).map(n=>({id:n.id,name:n.name,widgetIds:e[n.id]}))}function ajt(t){return t.flatMap(e=>e.widgetIds)}function ljt(t,e,n){const r=t.some(s=>s.id===n);let o=t.map(s=>{const i=s.widgetIds.filter(a=>a!==e);return s.id===n?{...s,widgetIds:i.includes(e)?i:[...i,e]}:i.length!==s.widgetIds.length?{...s,widgetIds:i}:s});if(!r){const s=pf.find(d=>d.id===n),i={id:n,name:s?.name||n,widgetIds:[e]},a=pf.findIndex(d=>d.id===n);if(a>=0){let d=o.length;for(let m=0;m<o.length;m++)if(pf.findIndex(h=>h.id===o[m].id)>a){d=m;break}o=[...o.slice(0,d),i,...o.slice(d)]}else o.push(i)}return o}function DL(t,e){return t.find(n=>n.widgetIds.includes(e))?.id}function eP(t){const{availableGroups:e,currentGroupId:n,onGroupChange:r}=t,o=E.useMemo(()=>{const s=new Set(e.map(a=>a.id)),i=[];for(const a of pf)s.has(a.id)?i.push(e.find(d=>d.id===a.id)):i.push({id:a.id,name:a.name,widgetIds:[]});for(const a of e)pf.some(d=>d.id===a.id)||i.push(a);return i},[e]);return p.jsxs(Y,{sx:{mb:2},children:[p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t("wm_Group")}),p.jsx(li,{value:n||"",variant:"filled",onChange:s=>r(s.target.value),size:"small",fullWidth:!0,renderValue:s=>{const i=o.find(d=>d.id===s);if(!i)return"";const a=d4(i.id);return p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:1},children:[a?v.cloneElement(a,{sx:{fontSize:18,color:"text.secondary"}}):null,B.t(i.name)]})},children:o.map(s=>{const i=d4(s.id);return p.jsxs(ln,{value:s.id,children:[i?p.jsx(Zl,{sx:{minWidth:32},children:v.cloneElement(i,{sx:{fontSize:20,color:"text.secondary"}})}):null,p.jsx(Ei,{children:B.t(s.name)})]},s.id)})})]})}function cjt(t){return p.jsxs(Cu,{...t,viewBox:"0 0 24 24",children:[p.jsx("rect",{x:"7",y:"2",width:"10",height:"2.5",rx:"1.25"}),p.jsx("rect",{x:"11",y:"4.5",width:"2",height:"4"}),p.jsx("path",{d:"M3,8.5 L21,8.5 L12,14 Z"}),p.jsx("path",{d:"M3,15.5 L21,15.5 L12,10 Z"}),p.jsx("rect",{x:"10",y:"15.5",width:"4",height:"6.5"})]})}function djt(t){return p.jsx(Cu,{...t,children:p.jsx("path",{d:"M12,11A1,1 0 0,0 11,12A1,1 0 0,0 12,13A1,1 0 0,0 13,12A1,1 0 0,0 12,11M12.5,2C17,2 17.11,5.57 14.75,6.75C13.76,7.24 13.32,8.29 13.13,9.22C13.61,9.42 14.03,9.73 14.35,10.13C18.05,8.13 22.03,8.92 22.03,12.5C22.03,17 18.46,17.1 17.28,14.73C16.78,13.74 15.72,13.3 14.79,13.11C14.59,13.59 14.28,14 13.88,14.34C15.87,18.03 15.08,22 11.5,22C7,22 6.91,18.42 9.27,17.24C10.25,16.75 10.69,15.71 10.89,14.79C10.4,14.59 9.97,14.27 9.65,13.87C5.96,15.85 2,15.07 2,11.5C2,7 5.56,6.89 6.74,9.26C7.24,10.25 8.29,10.68 9.22,10.87C9.41,10.39 9.73,9.97 10.14,9.65C8.15,5.96 8.94,2 12.5,2Z"})})}const ujt=[{value:"",label:"wm_Default",icon:p.jsx(iLt,{sx:{fontSize:20}})},{value:"person",label:"wm_Person",icon:p.jsx(bLt,{sx:{fontSize:20}})},{value:"car",label:"wm_Car",icon:p.jsx(ZDt,{sx:{fontSize:20}})},{value:"boat",label:"wm_Boat",icon:p.jsx(XDt,{sx:{fontSize:20}})},{value:"yacht",label:"wm_Yacht",icon:p.jsx(xLt,{sx:{fontSize:20}})},{value:"moped",label:"wm_Moped",icon:p.jsx(ILt,{sx:{fontSize:20}})},{value:"bicycle",label:"wm_Bicycle",icon:p.jsx(vLt,{sx:{fontSize:20}})}];function pjt(t){const{open:e,widgetName:n,settings:r,onClose:o,onSave:s,showChart:i,showBlindType:a,showPin:d,showHideWhenOk:m,showOnBrightness:_,showCoordinates:h,showMarkerIcon:w,showMapTheme:x,showSliderType:S,showWideSliderStyle:C,showAnimation:M,showRefreshInterval:D,objectName:P,objectColor:R,onDelete:W}=t,[A,N]=E.useState(r),[H,q]=E.useState(null),J=E.useRef(null);E.useEffect(()=>{e&&N({...r,name:r.name||P||n,color:r.color||R||""})},[r,e,n,P,R]);const z=A.markerIcon?.startsWith("data:"),K=X=>{const te=X.target.files?.[0];if(!te)return;const ee=new FileReader;ee.onload=()=>{N({...A,markerIcon:ee.result})},ee.readAsDataURL(te),X.target.value=""};return p.jsxs(p.Fragment,{children:[p.jsxs(Mn,{open:e,onClose:o,maxWidth:"xs",fullWidth:!0,children:[p.jsx(tr,{children:n}),p.jsxs(Dn,{children:[p.jsx(En,{fullWidth:!0,variant:"filled",label:B.t("wm_Name"),value:A.name,onChange:X=>N({...A,name:X.target.value}),placeholder:n,size:"small",sx:{mt:1,mb:2}}),p.jsxs(Y,{sx:{mb:2,display:"flex",gap:3},children:[p.jsxs(Y,{sx:{flex:1},children:[p.jsx(oe,{variant:"body2",sx:{mb:.5,fontWeight:500},children:B.t("wm_Color")}),p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:.5},children:[p.jsx(Y,{component:"input",type:"color",value:A.color||"#1976d2",onChange:X=>N({...A,color:X.target.value}),sx:{width:36,height:36,border:"1px solid",borderColor:"divider",borderRadius:1,cursor:"pointer",p:"2px",backgroundColor:"transparent"}}),A.color?p.jsx(st,{size:"small",onClick:()=>N({...A,color:""}),children:p.jsx(Do,{fontSize:"small"})}):null]})]}),p.jsxs(Y,{sx:{flex:1},children:[p.jsx(oe,{variant:"body2",sx:{mb:.5,fontWeight:500},children:B.t("wm_Color inactive")}),p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:.5},children:[p.jsx(Y,{component:"input",type:"color",value:A.colorInactive||"#9e9e9e",onChange:X=>N({...A,colorInactive:X.target.value}),sx:{width:36,height:36,border:"1px solid",borderColor:"divider",borderRadius:1,cursor:"pointer",p:"2px",backgroundColor:"transparent"}}),A.colorInactive?p.jsx(st,{size:"small",onClick:()=>N({...A,colorInactive:""}),children:p.jsx(Do,{fontSize:"small"})}):null]})]})]}),p.jsxs(Y,{children:[p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t("wm_Size")}),p.jsx(nc,{value:A.size,exclusive:!0,onChange:(X,te)=>{te&&N({...A,size:te})},size:"small",children:Ig.map(X=>p.jsx(pr,{value:X.value,children:p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:.75,px:.5},children:[X.icon,p.jsx("span",{children:X.label})]})},X.value))})]}),a?p.jsxs(Y,{sx:{mt:2},children:[p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t("wm_BlindType")}),p.jsxs(nc,{value:A.blindType||"shutter",exclusive:!0,onChange:(X,te)=>{te&&N({...A,blindType:te})},size:"small",children:[p.jsx(pr,{value:"shutter",children:B.t("wm_Shutter")}),p.jsx(pr,{value:"curtain",children:B.t("wm_Curtain")})]})]}):null,d?p.jsx(En,{fullWidth:!0,variant:"filled",label:B.t("wm_PIN Code"),value:A.pin||"",onChange:X=>{const te=X.target.value.replace(/\D/g,"");N({...A,pin:te})},placeholder:"1234",size:"small",slotProps:{htmlInput:{inputMode:"numeric",maxLength:8}},helperText:B.t("wm_PIN help"),sx:{mt:2}}):null,m?p.jsx(Wt,{control:p.jsx(Ii,{checked:!!A.hideWhenOk,onChange:(X,te)=>N({...A,hideWhenOk:te}),color:"primary"}),label:B.t("wm_Hide when OK"),sx:{mt:1,display:"flex"}}):null,t.showAlarmTexts?p.jsxs(Y,{sx:{mt:2,display:"flex",gap:1},children:[p.jsx(En,{variant:"filled",label:B.t("wm_Text active"),value:A.textActive||"",onChange:X=>N({...A,textActive:X.target.value}),placeholder:t.showAlarmTexts.activeDefault,size:"small",sx:{flex:1}}),p.jsx(En,{variant:"filled",label:B.t("wm_Text inactive"),value:A.textInactive||"",onChange:X=>N({...A,textInactive:X.target.value}),placeholder:t.showAlarmTexts.inactiveDefault,size:"small",sx:{flex:1}})]}):null,t.showAlarmIcons?p.jsxs(Y,{sx:{mt:2},children:[p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t("wm_Icons")}),p.jsxs(Y,{sx:{display:"flex",gap:2},children:[p.jsxs(Y,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",gap:.5},children:[p.jsx(oe,{variant:"caption",sx:{color:"text.secondary"},children:B.t("wm_Icon active")}),p.jsx(Y,{onClick:()=>q("iconActive"),sx:{width:48,height:48,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:1,cursor:"pointer",border:"1px dashed",borderColor:"divider","&:hover":{bgcolor:"action.hover"}},children:A.iconActive?p.jsx(Gn,{src:A.iconActive,style:{width:32,height:32,color:A.color||void 0}}):p.jsx(id,{sx:{fontSize:24,color:"text.disabled"}})}),A.iconActive?p.jsx(st,{size:"small",onClick:X=>{X.stopPropagation(),N({...A,iconActive:""})},children:p.jsx(Do,{fontSize:"small"})}):null]}),p.jsxs(Y,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",gap:.5},children:[p.jsx(oe,{variant:"caption",sx:{color:"text.secondary"},children:B.t("wm_Icon inactive")}),p.jsx(Y,{onClick:()=>q("iconInactive"),sx:{width:48,height:48,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:1,cursor:"pointer",border:"1px dashed",borderColor:"divider","&:hover":{bgcolor:"action.hover"}},children:A.iconInactive?p.jsx(Gn,{src:A.iconInactive,style:{width:32,height:32,color:A.colorInactive||"grey"}}):p.jsx(id,{sx:{fontSize:24,color:"text.disabled"}})}),A.iconInactive?p.jsx(st,{size:"small",onClick:X=>{X.stopPropagation(),N({...A,iconInactive:""})},children:p.jsx(Do,{fontSize:"small"})}):null]})]})]}):null,t.showIcon?p.jsxs(Y,{sx:{mt:2},children:[p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t("wm_Icons")}),p.jsxs(Y,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:.5,width:"fit-content"},children:[p.jsx(Y,{onClick:()=>q("icon"),sx:{width:48,height:48,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:1,cursor:"pointer",border:"1px dashed",borderColor:"divider","&:hover":{bgcolor:"action.hover"}},children:A.icon?p.jsx(Gn,{src:A.icon,style:{width:32,height:32,color:A.color||"#1976d2"}}):p.jsx(id,{sx:{fontSize:24,color:"text.disabled"}})}),A.icon?p.jsx(st,{size:"small",onClick:X=>{X.stopPropagation(),N({...A,icon:""})},children:p.jsx(Do,{fontSize:"small"})}):null]})]}):null,_?p.jsx(En,{fullWidth:!0,variant:"filled",label:B.t("wm_On brightness"),type:"number",value:A.onBrightness??100,onChange:X=>{const te=Math.max(1,Math.min(100,Number(X.target.value)||100));N({...A,onBrightness:te})},size:"small",slotProps:{htmlInput:{min:1,max:100}},helperText:"%",sx:{mt:2}}):null,h?p.jsx(Wt,{control:p.jsx(Ii,{checked:!!A.showCoordinates,onChange:(X,te)=>N({...A,showCoordinates:te}),color:"primary"}),label:B.t("wm_Show coordinates"),sx:{mt:1,display:"flex"}}):null,S?p.jsxs(Y,{sx:{mt:2},children:[p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t("wm_Slider type")}),p.jsxs(nc,{value:A.sliderType||"normal",exclusive:!0,onChange:(X,te)=>{te&&N({...A,sliderType:te})},size:"small",children:[p.jsxs(pr,{value:"normal",children:[p.jsx(ht,{title:B.t("wm_slider_normal"),children:p.jsx(Tf,{sx:{fontSize:18,mr:.5}})}),B.t("wm_slider_normal")]}),p.jsxs(pr,{value:"valve",children:[p.jsx(ht,{title:B.t("wm_slider_valve"),children:p.jsx(cjt,{sx:{fontSize:18,mr:.5}})}),B.t("wm_slider_valve")]}),p.jsxs(pr,{value:"fan",children:[p.jsx(ht,{title:B.t("wm_slider_fan"),children:p.jsx(djt,{sx:{fontSize:18,mr:.5}})}),B.t("wm_slider_fan")]}),p.jsxs(pr,{value:"gauge",children:[p.jsx(ht,{title:B.t("wm_slider_gauge"),children:p.jsx(yu,{sx:{fontSize:18,mr:.5}})}),B.t("wm_slider_gauge")]})]})]}):null,C&&(A.size==="2x0.5"||A.size==="2x1")?p.jsxs(Y,{sx:{mt:2},children:[p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t("wm_Wide slider style")}),p.jsxs(nc,{value:A.wideSliderStyle||"horizontal",exclusive:!0,onChange:(X,te)=>{te&&N({...A,wideSliderStyle:te})},size:"small",children:[p.jsx(pr,{value:"horizontal",children:B.t("wm_slider_horizontal")}),p.jsx(pr,{value:"round",children:B.t("wm_slider_round")})]})]}):null,M?p.jsx(Wt,{control:p.jsx(Ii,{checked:A.showAnimation!==!1,onChange:(X,te)=>N({...A,showAnimation:te}),color:"primary"}),label:B.t("wm_Show animation"),sx:{mt:1,display:"flex"}}):null,D?p.jsxs(Y,{sx:{mt:2},children:[p.jsx(En,{fullWidth:!0,variant:"filled",label:B.t("wm_Refresh interval"),type:"number",value:A.refreshInterval??0,onChange:X=>{const te=Math.max(0,Number(X.target.value)||0);N({...A,refreshInterval:te})},size:"small",slotProps:{htmlInput:{min:0}},helperText:B.t("wm_Refresh interval help")}),p.jsx(Wt,{control:p.jsx(Ii,{checked:!!A.appendTimestamp,onChange:(X,te)=>N({...A,appendTimestamp:te}),color:"primary"}),label:B.t("wm_Append timestamp"),sx:{mt:1,display:"flex"}})]}):null,w?p.jsxs(Y,{sx:{mt:2},children:[p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t("wm_Marker icon")}),p.jsxs(Y,{sx:{display:"flex",flexWrap:"wrap",gap:.5,alignItems:"center"},children:[ujt.map(X=>{const te=!z&&(A.markerIcon||"")===X.value;return p.jsx(ht,{title:B.t(X.label),children:p.jsx(Y,{onClick:()=>N({...A,markerIcon:X.value}),sx:ee=>({width:36,height:36,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:1,cursor:"pointer",border:`2px solid ${te?ee.palette.primary.main:"transparent"}`,bgcolor:te?"action.selected":"action.hover","&:hover":{bgcolor:"action.focus"}}),children:X.icon})},X.value||"__default")}),p.jsx(ht,{title:B.t("wm_Custom"),children:p.jsx(Y,{onClick:()=>J.current?.click(),sx:X=>({width:36,height:36,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:1,cursor:"pointer",border:`2px solid ${z?X.palette.primary.main:"transparent"}`,bgcolor:z?"action.selected":"action.hover","&:hover":{bgcolor:"action.focus"}}),children:z?p.jsx(Gn,{src:A.markerIcon,style:{width:20,height:20}}):p.jsx(id,{sx:{fontSize:20}})})}),z?p.jsx(st,{size:"small",onClick:()=>N({...A,markerIcon:""}),children:p.jsx(Do,{fontSize:"small"})}):null]}),p.jsx("input",{ref:J,type:"file",accept:"image/*,.svg",style:{display:"none"},onChange:K})]}):null,x?p.jsxs(Y,{sx:{mt:2},children:[p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t("wm_Map theme")}),p.jsxs(nc,{value:A.mapTheme||"standard",exclusive:!0,onChange:(X,te)=>{te&&N({...A,mapTheme:te})},size:"small",children:[p.jsx(pr,{value:"standard",children:B.t("wm_map_standard")}),p.jsx(pr,{value:"dark",children:B.t("wm_map_dark")}),p.jsx(pr,{value:"satellite",children:B.t("wm_map_satellite")})]})]}):null,i?p.jsxs(Y,{sx:{mt:2},children:[p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t("wm_Chart")}),p.jsxs(nc,{value:A.chartHours,exclusive:!0,onChange:(X,te)=>{te!=null&&N({...A,chartHours:te})},size:"small",sx:{width:"100%","& .MuiToggleButton-root":{flex:1}},children:[p.jsx(pr,{value:0,children:B.t("wm_Off")}),p.jsx(pr,{value:1,children:"1h"}),p.jsx(pr,{value:3,children:"3h"}),p.jsx(pr,{value:6,children:"6h"}),p.jsx(pr,{value:12,children:"12h"}),p.jsx(pr,{value:24,children:"24h"})]}),p.jsx(Wt,{control:p.jsx(Ii,{checked:A.showTrendArrow,onChange:X=>N({...A,showTrendArrow:X.target.checked}),size:"small"}),label:B.t("wm_Trend arrow"),sx:{mt:1}}),A.showTrendArrow?p.jsx(En,{label:B.t("wm_Trend period (min)"),type:"number",size:"small",value:A.trendMinutes||30,onChange:X=>{const te=Math.max(5,Math.min(1440,parseInt(X.target.value,10)||30));N({...A,trendMinutes:te})},slotProps:{htmlInput:{min:5,max:1440,step:5}},sx:{mt:1,width:180}}):null]}):null,t.availableGroups?.length?p.jsx(Y,{sx:{mt:2},children:p.jsx(eP,{availableGroups:t.availableGroups,currentGroupId:t.currentGroupId,onGroupChange:X=>t.onGroupChange?.(X)})}):null,W?p.jsx(bt,{variant:"outlined",color:"error",startIcon:p.jsx(Do,{}),onClick:()=>{W(),o()},fullWidth:!0,sx:{mt:3},children:B.t("wm_Delete")}):null]}),p.jsxs(Fr,{children:[p.jsx(bt,{variant:"contained",disabled:A.size===r.size&&A.chartHours===r.chartHours&&A.name===(r.name||P||n)&&A.color===(r.color||R||"")&&A.blindType===r.blindType&&(A.pin||"")===(r.pin||"")&&!!A.hideWhenOk==!!r.hideWhenOk&&(A.onBrightness??100)===(r.onBrightness??100)&&!!A.showCoordinates==!!r.showCoordinates&&(A.markerIcon||"")===(r.markerIcon||"")&&(A.mapTheme||"standard")===(r.mapTheme||"standard")&&(A.sliderType||"normal")===(r.sliderType||"normal")&&(A.wideSliderStyle||"horizontal")===(r.wideSliderStyle||"horizontal")&&A.showAnimation!==!1==(r.showAnimation!==!1)&&(A.refreshInterval??0)===(r.refreshInterval??0)&&!!A.appendTimestamp==!!r.appendTimestamp&&(A.textActive||"")===(r.textActive||"")&&(A.textInactive||"")===(r.textInactive||"")&&(A.colorInactive||"")===(r.colorInactive||"")&&(A.iconActive||"")===(r.iconActive||"")&&(A.iconInactive||"")===(r.iconInactive||"")&&(A.icon||"")===(r.icon||"")&&!!A.showTrendArrow==!!r.showTrendArrow&&(A.trendMinutes||30)===(r.trendMinutes||30),startIcon:p.jsx(mk,{}),onClick:()=>s(A),children:B.t("wm_Save")}),p.jsx(bt,{color:"grey",startIcon:p.jsx(ms,{}),onClick:o,children:B.t("wm_Cancel")})]})]}),H?p.jsx(u4,{open:!0,title:B.t(H==="iconActive"?"wm_Icon active":H==="iconInactive"?"wm_Icon inactive":"wm_Icons"),value:A[H]||"",onClose:()=>q(null),onSelect:X=>{N({...A,[H]:X}),X&&q(null)},socket:t.socket,theme:t.theme,admin:t.admin}):null]})}const hjt=[{type:"clock",icon:p.jsx(HDt,{}),i18nKey:"wm_Clock",descriptionKey:"wm_Clock_desc"},{type:"weather",icon:p.jsx(Hv,{}),i18nKey:"wm_Weather",descriptionKey:"wm_Weather_desc"},{type:"iframe",icon:p.jsx(pLt,{}),i18nKey:"wm_Iframe",descriptionKey:"wm_Iframe_desc"},{type:"wind",icon:p.jsx(us,{}),i18nKey:"wm_Wind",descriptionKey:"wm_Wind_desc"}];function mjt(t){const{open:e,onClose:n,onAdd:r}=t;return p.jsxs(Mn,{open:e,onClose:n,maxWidth:"xs",fullWidth:!0,slotProps:{paper:{sx:{borderRadius:"16px"}}},children:[p.jsxs(tr,{sx:{display:"flex",alignItems:"center",pr:6},children:[B.t("wm_Add widget"),p.jsx(st,{size:"small",onClick:n,sx:{position:"absolute",top:8,right:8},children:p.jsx(ms,{fontSize:"small"})})]}),p.jsx(Dn,{sx:{p:0},children:p.jsx(i1,{children:hjt.map(o=>p.jsxs(dw,{onClick:()=>{r(o.type),n()},children:[p.jsx(Zl,{children:o.icon}),p.jsx(Ei,{primary:B.t(o.i18nKey),secondary:B.t(o.descriptionKey)})]},o.type))})})]})}const j5={},A5=["latitude","longitude"];function fjt(t,e,n,r){return e.format==="radio"?p.jsxs(Y,{sx:{mb:2},children:[p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t(e.label)}),p.jsx(nc,{value:n,exclusive:!0,onChange:(o,s)=>{s&&r(s)},size:"small",children:e.options.map(o=>p.jsx(pr,{value:o.value,children:o.icon?p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:.75,px:.5},children:[o.icon,p.jsx("span",{children:B.t(o.label)})]}):B.t(o.label)},o.value))})]},t):p.jsxs(Y,{sx:{mb:2},children:[p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t(e.label)}),p.jsx(li,{value:n,variant:"filled",onChange:o=>r(o.target.value),size:"small",fullWidth:!0,children:e.options.map(o=>p.jsx(ln,{value:o.value,children:B.t(o.label)},o.value))})]},t)}function _jt(t,e,n,r){return p.jsxs(Y,{sx:{mb:2},children:[p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t(e.label)}),p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:1},children:[p.jsx(Y,{component:"input",type:"color",value:n||"#1976d2",onChange:o=>r(o.target.value),sx:{width:40,height:40,border:"1px solid",borderColor:"divider",borderRadius:1,cursor:"pointer",p:"2px",backgroundColor:"transparent"}}),n?p.jsx(st,{size:"small",onClick:()=>r(""),children:p.jsx(Do,{fontSize:"small"})}):null]})]},t)}function gjt(t,e,n,r){return p.jsxs(Y,{sx:{mb:2},children:[p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t(e.label)}),p.jsx(En,{value:n,variant:"filled",onChange:o=>r((e.inputType==="number",o.target.value)),placeholder:e.placeholder?B.t(e.placeholder):void 0,helperText:e.helperText?B.t(e.helperText):void 0,type:e.inputType||"text",size:"small",fullWidth:!0})]},t)}function yjt(t){const{configKey:e,item:n,value:r,onChange:o,socket:s}=t,[i,a]=E.useState([]),[d,m]=E.useState(!0);return E.useEffect(()=>{if(!s){m(!1);return}let _=!1;const h=[...n.adapterNames].sort().join(",");if(j5[h]){const w=j5[h];a(w),m(!1),!r&&w.length===1&&o(w[0].id);return}return(async()=>{const w=[];for(const x of n.adapterNames)try{const S=await s.getAdapterInstances(x);if(_)return;if(Array.isArray(S))for(const C of S){const M=C._id.replace("system.adapter.",""),D=C.common?.name,P=D&&typeof D=="object"?D.en||M:D||M;w.push({id:M,label:`${P} (${M})`})}}catch{}_||(j5[h]=w,a(w),m(!1),!r&&w.length===1&&o(w[0].id))})(),()=>{_=!0}},[s,n.adapterNames.join(",")]),p.jsxs(Y,{sx:{mb:2},children:[p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t(n.label)}),d?p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:1,py:1},children:[p.jsx(_d,{size:18}),p.jsxs(oe,{variant:"caption",sx:{color:"text.secondary"},children:[B.t("wm_Loading instances"),"..."]})]}):i.length===0?p.jsx(oe,{variant:"caption",sx:{color:"text.secondary"},children:B.t("wm_No weather adapters")}):p.jsxs(li,{value:r,variant:"filled",onChange:_=>o(_.target.value),size:"small",fullWidth:!0,displayEmpty:!0,children:[p.jsx(ln,{value:"",disabled:!0,children:B.t("wm_Select instance")}),i.map(_=>p.jsx(ln,{value:_.id,children:_.label},_.id))]})]},e)}function wjt(t){const{configKey:e,item:n,value:r,latitude:o,longitude:s,onChange:i}=t,[a,d]=E.useState(r||""),[m,_]=E.useState([]),[h,w]=E.useState(!1),[x,S]=E.useState(!1),C=E.useRef(null);E.useEffect(()=>{r&&r!==a&&d(r)},[r]);const M=E.useCallback(P=>{if(C.current&&clearTimeout(C.current),!P||P.length<2){_([]),S(!1);return}C.current=setTimeout(()=>{w(!0);const R=B.getLanguage()||"en";fetch(`https://geocoding-api.open-meteo.com/v1/search?name=${encodeURIComponent(P)}&count=5&language=${R}`).then(W=>W.json()).then(W=>{_(W.results||[]),S(!0),w(!1)}).catch(()=>{w(!1),S(!1)})},400)},[]);E.useEffect(()=>()=>{C.current&&clearTimeout(C.current)},[]);const D=P=>{const R=P.admin1?`${P.name}, ${P.admin1}, ${P.country||""}`:`${P.name}, ${P.country||""}`;d(R),_([]),S(!1),i(R,P.latitude,P.longitude)};return p.jsxs(Y,{sx:{mb:2},children:[p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t(n.label)}),p.jsx(En,{value:a,variant:"filled",onChange:P=>{d(P.target.value),M(P.target.value)},placeholder:B.t("wm_Search city"),size:"small",fullWidth:!0,slotProps:{input:{endAdornment:h?p.jsx(_d,{size:16}):p.jsx(gLt,{sx:{fontSize:18,color:"text.secondary"}})}}}),x&&m.length>0?p.jsx(i1,{dense:!0,sx:{border:"1px solid",borderColor:"divider",borderRadius:1,mt:.5,maxHeight:200,overflow:"auto"},children:m.map((P,R)=>p.jsxs(dw,{onClick:()=>D(P),children:[p.jsx(Ei,{primary:P.name,secondary:[P.admin1,P.country].filter(Boolean).join(", ")}),p.jsxs(oe,{variant:"caption",sx:{color:"text.secondary",ml:1,whiteSpace:"nowrap"},children:[P.latitude.toFixed(2),", ",P.longitude.toFixed(2)]})]},`${P.latitude}-${P.longitude}-${R}`))}):null,x&&m.length===0&&!h?p.jsx(oe,{variant:"caption",sx:{color:"text.secondary",mt:.5,display:"block"},children:B.t("wm_No results")}):null,o!=null&&s!=null?p.jsxs(oe,{variant:"caption",sx:{color:"text.secondary",mt:.5,display:"block"},children:[o.toFixed(4),"°, ",s.toFixed(4),"°"]}):null]},e)}function vjt(t){const{configKey:e,item:n,value:r,onChange:o,socket:s,theme:i}=t,[a,d]=E.useState(!1);return p.jsxs(Y,{sx:{mb:2},children:[p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t(n.label)}),p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:1},children:[p.jsx(En,{value:r||"",variant:"filled",onChange:m=>o(m.target.value),placeholder:B.t("wm_State ID"),size:"small",fullWidth:!0}),p.jsx(bt,{variant:"outlined",size:"small",onClick:()=>d(!0),sx:{minWidth:40,px:1},children:"..."}),r?p.jsx(st,{size:"small",onClick:()=>o(""),children:p.jsx(Do,{fontSize:"small"})}):null]}),a&&s?p.jsx(mot,{theme:i,socket:s,dialogName:"windStateSelect",title:B.t(n.label),selected:r||"",onOk:m=>{const _=Array.isArray(m)?m[0]:m;_&&o(_),d(!1)},onClose:()=>d(!1)}):null]},e)}function bjt(t,e,n,r,o,s,i,a){if(e.visibleWhen&&s){for(const[d,m]of Object.entries(e.visibleWhen))if(Array.isArray(m)){if(!m.includes(s[d]))return null}else if(s[d]!==m)return null}switch(e.type){case"select":return fjt(t,e,n,r);case"color":return _jt(t,e,n,r);case"checkbox":return p.jsx(Wt,{control:p.jsx(hr,{checked:n,onChange:(d,m)=>r(m),size:"small"}),label:B.t(e.label)},t);case"instanceSelect":return p.jsx(yjt,{configKey:t,item:e,value:n,onChange:r,socket:o},t);case"text":return gjt(t,e,n,r);case"citySearch":return p.jsx(wjt,{configKey:t,item:e,value:n,latitude:s?.latitude,longitude:s?.longitude,onChange:(d,m,_)=>{if(i){const h={[t]:d};m!=null&&(h.latitude=m),_!=null&&(h.longitude=_),i(h)}else r(d)}},t);case"stateId":return p.jsx(vjt,{configKey:t,item:e,value:n,onChange:r,socket:o,theme:a},t)}}function xjt(t){const{open:e,widgetDef:n,onClose:r,onSave:o,onDelete:s,socket:i}=t,[a,d]=E.useState({}),m=n?Yw[n.type]:null;if(E.useEffect(()=>{if(e&&n){const S=Yw[n.type];if(S){const C={};for(const[M,D]of Object.entries(S.items)){const P=n[M];C[M]=P!==void 0?P:qg(D)}for(const M of A5){const D=n[M];D!==void 0&&(C[M]=D)}d(C)}}},[e,n]),!n||!m)return null;const _=(S,C)=>{d(M=>({...M,[S]:C}))},h=S=>{d(C=>({...C,...S}))},w=Object.entries(m.items).some(([S,C])=>{const M=n[S],D=M!==void 0?M:qg(C);return a[S]!==D})||A5.some(S=>{const C=n[S];return a[S]!==void 0&&a[S]!==C}),x=()=>{const S={id:n.id,type:n.type};for(const[C,M]of Object.entries(m.items)){const D=a[C],P=qg(M);D!==P&&(S[C]=D)}for(const C of A5)a[C]!=null&&(S[C]=a[C]);o(S)};return p.jsxs(Mn,{open:e,onClose:r,maxWidth:"xs",fullWidth:!0,children:[p.jsx(tr,{children:B.t(m.name)}),p.jsxs(Dn,{children:[p.jsx(Y,{sx:{mt:1},children:Object.entries(m.items).map(([S,C])=>bjt(S,C,a[S],M=>_(S,M),i,a,h,t.theme))}),t.availableGroups?.length?p.jsx(Y,{sx:{mb:2},children:p.jsx(eP,{availableGroups:t.availableGroups,currentGroupId:t.currentGroupId,onGroupChange:S=>t.onGroupChange?.(S)})}):null,p.jsx(bt,{variant:"outlined",color:"error",startIcon:p.jsx(Do,{}),onClick:()=>{s(),r()},fullWidth:!0,children:B.t("wm_Delete")})]}),p.jsxs(Fr,{children:[p.jsx(bt,{variant:"contained",disabled:!w,startIcon:p.jsx(mk,{}),onClick:x,children:B.t("wm_Save")}),p.jsx(bt,{color:"grey",startIcon:p.jsx(ms,{}),onClick:r,children:B.t("wm_Cancel")})]})]})}const Sjt=new Set([Ae.Types.floodAlarm,Ae.Types.fireAlarm,Ae.Types.motion,Ae.Types.window,Ae.Types.door,Ae.Types.warning]);function Cjt(t){const{settingsWidget:e,settingsWidgetName:n,widgetSettings:r,chartAvailable:o,settingsObjectName:s,settingsObjectColor:i,onCloseSettings:a,onSaveSettings:d,onDeleteWidget:m,categorySettingsCategoryId:_,categories:h,currentCategory:w,categorySettings:x,rootCategory:S,onCloseCategorySettings:C,onSaveCategorySettings:M,selectedInstance:D,customWidgetDialogCategoryId:P,onCloseCustomWidgetDialog:R,onAddCustomWidget:W,customWidgetSettingsCategoryId:A,customWidgetSettingsWidgetId:N,onCloseCustomWidgetSettings:H,onSaveCustomWidgetSettings:q,onDeleteCustomWidgetFromSettings:J,sidePanelDialogOpen:z,onCloseSidePanel:K,admin:X,socket:te,theme:ee,settingsWidgetId:le,onWidgetGroupMove:ae,getCategoryName:me}=t,ie=v.useMemo(()=>{const se=[];se.push({id:"__favorites__",label:B.t("wm_Favorites"),icon:"⭐"});for(const re of h){if(String(re.id)===S)continue;const G=typeof re.icon=="string"?re.icon:void 0;se.push({id:String(re.id),label:me(re),icon:G})}return se},[h,S,me]);return p.jsxs(p.Fragment,{children:[p.jsx(pjt,{open:e!=null,widgetName:n,settings:e&&r[String(e.id)]||Op,onClose:a,onSave:d,onDelete:m,showChart:o,showBlindType:e?.control?.type===Ae.Types.blind,showPin:e?.control?.type===Ae.Types.lock,showHideWhenOk:e?.control?.type===Ae.Types.floodAlarm||e?.control?.type===Ae.Types.fireAlarm||e?.control?.type===Ae.Types.warning,showCoordinates:e?.control?.type===Ae.Types.location||e?.control?.type===Ae.Types.locationOne,showMarkerIcon:e?.control?.type===Ae.Types.location||e?.control?.type===Ae.Types.locationOne,showMapTheme:e?.control?.type===Ae.Types.location||e?.control?.type===Ae.Types.locationOne,showSliderType:e?.control?.type===Ae.Types.slider||e?.control?.type===Ae.Types.percentage,showWideSliderStyle:e?.control?.type===Ae.Types.dimmer||e?.control?.type===Ae.Types.volume||e?.control?.type===Ae.Types.slider||e?.control?.type===Ae.Types.percentage,showAnimation:e?.control?.type===Ae.Types.info&&!!e?.control?.states.some(se=>se.name==="ACTUAL"&&/value\.fill|level\.tank|tank/i.test(se.stateRole||"")),showOnBrightness:e!=null&&[Ae.Types.rgbSingle,Ae.Types.rgbwSingle,Ae.Types.rgb,Ae.Types.hue,Ae.Types.cie,Ae.Types.ct].includes(e.control?.type)&&e.control.states.some(se=>se.name==="SET"||se.name==="ACTUAL"||se.name==="DIMMER"||se.name==="BRIGHTNESS")&&!e.control.states.some(se=>se.name==="ON_SET"||se.name==="ON"),showAlarmTexts:e?.control?.type===Ae.Types.floodAlarm?{activeDefault:B.t("wm_Flood"),inactiveDefault:B.t("wm_Dry")}:e?.control?.type===Ae.Types.fireAlarm?{activeDefault:B.t("wm_Fire"),inactiveDefault:B.t("wm_OK")}:e?.control?.type===Ae.Types.motion?{activeDefault:B.t("wm_Motion"),inactiveDefault:B.t("wm_Clear")}:e?.control?.type===Ae.Types.window?{activeDefault:B.t("wm_Open"),inactiveDefault:B.t("wm_Closed")}:e?.control?.type===Ae.Types.door?{activeDefault:B.t("wm_Open"),inactiveDefault:B.t("wm_Closed")}:e?.control?.type===Ae.Types.warning?{activeDefault:B.t("wm_Warning"),inactiveDefault:B.t("wm_OK")}:void 0,showAlarmIcons:e?.control?.type===Ae.Types.floodAlarm||e?.control?.type===Ae.Types.fireAlarm||e?.control?.type===Ae.Types.motion||e?.control?.type===Ae.Types.window||e?.control?.type===Ae.Types.door||e?.control?.type===Ae.Types.warning,showIcon:!!e?.control?.type&&!Sjt.has(e.control.type),showRefreshInterval:e?.control?.type===Ae.Types.image,socket:te,theme:ee,admin:X,objectName:s,objectColor:i,availableGroups:x[String(w.id)]?.widgetGroups,currentGroupId:le!=null&&x[String(w.id)]?.widgetGroups?DL(x[String(w.id)].widgetGroups,String(le)):void 0,onGroupChange:le!=null?se=>ae(String(w.id),String(le),se):void 0}),p.jsx(ojt,{open:_!=null,categoryName:_===S?x[S]?.name||B.t("wm_Settings"):_?me(h.find(se=>String(se.id)===_)||w):"",categoryId:_||"",settings:_&&x[_]||Gg,onClose:C,onSave:M,socket:te,instance:D,theme:ee,admin:X,categoryOptions:ie}),p.jsx(mjt,{open:P!=null,onClose:R,onAdd:W}),p.jsx(xjt,{open:A!=null,widgetDef:A&&N&&x[A]?.customWidgets?.find(se=>se.id===N)||null,onClose:H,onSave:q,onDelete:J,socket:te,theme:ee,availableGroups:A?x[A]?.widgetGroups:void 0,currentGroupId:A&&N&&x[A]?.widgetGroups?DL(x[A].widgetGroups,N):void 0,onGroupChange:A&&N?se=>ae(A,N,se):void 0}),p.jsx(iIt,{open:z,onClose:K,admin:X,socket:te})]})}const so="__root__",P5="__favorites__",T0=new Set([Ae.Types.floodAlarm,Ae.Types.fireAlarm,Ae.Types.motion,Ae.Types.window,Ae.Types.door,Ae.Types.warning]),LL='"Inter", "Roboto", "Helvetica Neue", Arial, sans-serif',kjt={dark:{mode:"dark",primary:"#90caf9",secondary:"#ce93d8",bgDefault:"#121212",bgPaper:"#1e1e1e",textPrimary:"#ffffff",textSecondary:"rgba(255,255,255,0.7)",textDisabled:"rgba(255,255,255,0.5)"},light:{mode:"light",primary:"#1976d2",secondary:"#9c27b0",bgDefault:"#f5f5f5",bgPaper:"#ffffff",textPrimary:"rgba(0,0,0,0.87)",textSecondary:"rgba(0,0,0,0.6)",textDisabled:"rgba(0,0,0,0.38)"},orangeDark:{mode:"dark",primary:"#f5a623",secondary:"#ff7043",bgDefault:"#1a1a1a",bgPaper:"#2c2c2e",textPrimary:"#f5f5f5",textSecondary:"rgba(245,245,245,0.65)",textDisabled:"rgba(245,245,245,0.4)"},blueDark:{mode:"dark",primary:"#5eb8ff",secondary:"#82b1ff",bgDefault:"#0d1b2a",bgPaper:"#1b2838",textPrimary:"#e0e6ed",textSecondary:"rgba(224,230,237,0.65)",textDisabled:"rgba(224,230,237,0.4)"},"styling-grey":{mode:"dark",primary:"#a0a0a0",secondary:"#78909c",bgDefault:"#111113",bgPaper:"#1c1c1e",textPrimary:"#e8e8e8",textSecondary:"rgba(232,232,232,0.55)",textDisabled:"rgba(232,232,232,0.35)"}};class $i extends zDt{static i18nInitialized=!1;static fontLoaded=!1;static loadConfigMode(e){try{const n=localStorage.getItem("wm_configMode");if(n!==null)return JSON.parse(n)===!0}catch{}return!!e}stateContext=new yk(this.props.socket);defaultHistory;lastAliveSubscribe="";lastTriggerLoad=0;filterTimeout=null;language=B.getLanguage();widgetTheme=null;widgetThemeType="";communicationStateId="";rootSettingsStateId="";guiConfigCache;constructor(e){super(e),$i.i18nInitialized||($i.i18nInitialized=!0,B.extendTranslations({en:Mut,de:vlt,ru:jmt,pt:Fgt,nl:G0t,fr:tbt,it:l5t,es:f3t,pl:xMt,uk:E8t,"zh-cn":PDt})),this.state={...this.state,categories:[],widgets:[],filter:"",loading:null,alive:null,widgetSettings:{},settingsWidgetId:null,chartAvailable:!1,settingsObjectName:"",settingsObjectColor:"",categorySettings:{},categorySettingsCategoryId:null,customWidgetDialogCategoryId:null,customWidgetSettingsCategoryId:null,customWidgetSettingsWidgetId:null,configMode:!!this.props.showSettingsButton&&$i.loadConfigMode(this.props.admin),sidePanelDialogOpen:!1,latitude:null,longitude:null},this.lastTriggerLoad=this.props.triggerLoad||0}getCategoryName=e=>{if(e.name&&typeof e.name=="string")return e.name;if(e.name&&typeof e.name=="object"&&!e.name.objectId){const n=e.name;return n[this.language]||n.en||String(e.id)}return String(e.id).split(".").pop()||""};buildHashPath(e){if(String(e.id)===so)return"";const n=[];let r=e;for(;r&&String(r.id)!==so;)n.unshift(encodeURIComponent(this.getCategoryName(r))),r=this.state.categories.find(o=>String(o.id)===String(r.parent));return n.join("/")}buildFavoritesCategory(e){const n=e||this.state.widgetSettings;return Object.values(n).some(o=>o.favorite)?{id:P5,type:"category",parent:so,name:{en:"Favorites",de:"Favoriten",ru:"Избранное",pt:"Favoritos",nl:"Favorieten",fr:"Favoris",it:"Preferiti",es:"Favoritos",pl:"Ulubione",uk:"Обрані","zh-cn":"收藏夹"},icon:"⭐"}:null}resolveCategoryFromHash(e,n,r){const o=e.startsWith("#")?e.substring(1):e;if(!o)return n.find(d=>String(d.id)===so);const s=o.split("/").map(d=>decodeURIComponent(d));let i=so,a;for(const d of s){if(a=n.find(m=>String(m.parent)===String(i)&&this.getCategoryName(m)===d),!a){if(i===so){const m=this.buildFavoritesCategory(r);m&&this.getCategoryName(m)===d&&(a=m)}if(!a)return}i=String(a.id)}return a}updateHash(e){const n=this.buildHashPath(e),r=n?`#${n}`:"";window.location.hash!==r&&(window.location.hash=r)}onHashChange=()=>{if(!this.state.categories.length)return;const e=this.resolveCategoryFromHash(window.location.hash,this.state.categories);e&&String(e.id)!==String(this.state.currentCategory?.id)&&this.setState({currentCategory:e})};async componentDidMount(){this.rootSettingsStateId=`${this.state.selectedInstance}.${this.props.rootSettingsStateId||"config"}`;const e=await this.props.socket.getObject(this.rootSettingsStateId);if(e){const r=e.native;this.guiConfigCache=r,this.setState({guiConfig:r}),r?.root?.icon&&$i.applyPwaIcon(r.root.icon,this.props.admin)}if(await this.props.socket.subscribeObject(this.rootSettingsStateId,this.onConfigChanged),this.props.communicationStateId&&(this.props.communicationStateId===!0?this.communicationStateId=`${this.state.selectedInstance}.info.widgetManager`:this.communicationStateId=`${this.state.selectedInstance}.${this.communicationStateId}`,await this.props.socket.getObject(this.communicationStateId)?await this.props.socket.subscribeState(this.communicationStateId,this.onBackendCommand):window.alert(`Updates from backend is not available, because state ${this.props.communicationStateId} does not exist`)),!$i.fontLoaded){$i.fontLoaded=!0;const r=document.createElement("link");r.rel="stylesheet",r.href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap",document.head.appendChild(r)}window.addEventListener("hashchange",this.onHashChange);let n=!1;if(this.state.alive===null&&this.state.selectedInstance){try{(await this.props.socket.getState(`system.adapter.${this.state.selectedInstance}.alive`))?.val&&(n=!0)}catch(r){console.error(r)}this.lastAliveSubscribe=this.state.selectedInstance,this.setState({alive:n},()=>this.props.socket.subscribeState(`system.adapter.${this.state.selectedInstance}.alive`,this.aliveHandler))}else this.state.alive!==null&&(n=this.state.alive);n&&this.loadItemsList();try{const r=await this.stateContext.getObject("system.config"),o=r?.common?.latitude,s=r?.common?.longitude;o!=null&&s!=null&&this.setState({latitude:o,longitude:s})}catch{}}async componentWillUnmount(){window.removeEventListener("hashchange",this.onHashChange),this.state.selectedInstance&&this.props.socket.unsubscribeState(`system.adapter.${this.state.selectedInstance}.alive`,this.aliveHandler),this.communicationStateId&&this.props.socket.unsubscribeState(this.communicationStateId,this.onBackendCommand),await this.props.socket.unsubscribeObject(this.rootSettingsStateId,this.onConfigChanged)}onBackendCommand=(e,n)=>{if(e===this.communicationStateId&&n?.val)try{JSON.parse(n.val).command==="all"&&this.loadItemsList()}catch(r){console.error(`Cannot parse command "${n.val}": ${r}`)}};onConfigChanged=(e,n)=>{if(e===this.rootSettingsStateId&&n?.native){const r=n.native;this.guiConfigCache=r,JSON.stringify(this.state.guiConfig)!==JSON.stringify(r)&&(this.setState(o=>{const s={...o.categorySettings};return r.root&&(s[so]={name:r.root.title||"",color:r.root.color||"",backgroundColor:r.root.backgroundColor||"",image:r.root.image||"",imageScope:r.root.imageScope||"header",icon:r.root.icon||"",rootIcon:r.root.rootIcon||"",wmTheme:r.root.wmTheme,defaultCategory:r.root.defaultCategory||"",customWidgets:r.root.customWidgets,widgetOrder:r.root.widgetOrder,widgetGroups:r.root.widgetGroups}),{guiConfig:r,categorySettings:s}}),r.root?.icon&&$i.applyPwaIcon(r.root.icon,this.props.admin))}};aliveHandler=(e,n)=>{if(this.state.selectedInstance&&e===`system.adapter.${this.state.selectedInstance}.alive`){const r=!!n?.val;r!==this.state.alive&&this.setState({alive:r},()=>{r&&this.componentDidMount().catch(console.error)})}};loadItemsList(){this.setState({loading:!0},async()=>{console.log(`Loading items for ${this.state.selectedInstance}...`);let e=this.state.alive;if(this.state.selectedInstance!==this.lastAliveSubscribe)if(this.lastAliveSubscribe&&this.props.socket.unsubscribeState(`system.adapter.${this.lastAliveSubscribe}.alive`,this.aliveHandler),this.lastAliveSubscribe=this.state.selectedInstance,this.state.selectedInstance){try{(await this.props.socket.getState(`system.adapter.${this.state.selectedInstance}.alive`))?.val&&(e=!0)}catch(n){console.error(n)}await this.props.socket.subscribeState(`system.adapter.${this.state.selectedInstance}.alive`,this.aliveHandler)}else e=!1;try{this.setState({loading:!!e,alive:e}),e&&await this.loadItems(n=>{const r=$i.extractWidgetSettingsFromWidgets(n.widgets),o=!!window.location.hash&&window.location.hash!=="#";let s;if(o&&(s=this.resolveCategoryFromHash(window.location.hash,n.categories,r)),!s){const i=this.guiConfigCache?.root?.defaultCategory;!o&&i&&(i===P5?s=this.buildFavoritesCategory(r)||void 0:s=n.categories.find(a=>String(a.id)===i))}s||(s=n.categories.find(i=>i.id===so)||n.categories[0]),this.setState({categories:n.categories,widgets:n.widgets,loading:!1,currentCategory:s,widgetSettings:r}),this.updateHash(s),console.log(`Loaded ${n.categories.length} categories and ${n.widgets.length} widgets...`),this.extractCategorySettings(n.categories)})}catch(n){console.error(n)}})}updateItem(e){if(e.type==="category"){const n=e,s={categories:this.state.categories.some(i=>String(i.id)===String(n.id))?this.state.categories.map(i=>String(i.id)===String(n.id)?n:i):[...this.state.categories,n]};this.state.currentCategory&&String(this.state.currentCategory.id)===String(n.id)&&(s.currentCategory=n),this.setState(s)}else{const n=e,o=this.state.widgets.some(a=>String(a.id)===String(n.id))?this.state.widgets.map(a=>String(a.id)===String(n.id)?n:a):[...this.state.widgets,n],s={...this.state.widgetSettings},i=$i.extractSingleWidgetSettings(n);i?s[String(n.id)]=i:delete s[String(n.id)],this.setState({widgets:o,widgetSettings:s})}}deleteItem(e){if(this.state.categories.findIndex(r=>String(r.id)===e)!==-1){const r=this.state.categories.filter(s=>String(s.id)!==e),o={categories:r};if(this.state.currentCategory&&String(this.state.currentCategory.id)===e){const s=this.state.currentCategory.parent;o.currentCategory=r.find(i=>String(i.id)===String(s))||r.find(i=>String(i.id)===so)||r[0]}this.setState(o)}else{const r=this.state.widgets.filter(o=>String(o.id)!==e);this.setState({widgets:r})}}onOpenSettings=e=>{this.setState({settingsWidgetId:e,chartAvailable:!1,settingsObjectName:"",settingsObjectColor:""}),this.checkChartAvailable(e),this.loadObjectSettings(e)};async loadObjectSettings(e){try{const n=await this.stateContext.getObject(String(e));if(n?.common){const r=typeof n.common.name=="object"?n.common.name[this.language]||n.common.name.en||"":n.common.name||"",o=n.common.color||"";this.setState({settingsObjectName:r,settingsObjectColor:o})}}catch{}}async checkChartAvailable(e){const n=this.state.widgets.find(r=>r.id===e);if(n?.control?.states?.length){if(this.defaultHistory===void 0)try{const r=await this.stateContext.getObject("system.config");this.defaultHistory=r?.common?.defaultHistory||""}catch{this.defaultHistory=""}if(this.defaultHistory){for(const r of n.control.states)if(r.id)try{if(await this.hasHistoryEnabled(r.id)){this.setState({chartAvailable:!0});return}}catch{}}}}async hasHistoryEnabled(e){let n;try{n=await this.stateContext.getObject(e)}catch{return!1}if(!n)return!1;if(n.common?.custom?.[this.defaultHistory]?.enabled)return!0;const r=n.common?.alias?.id;if(r){const o=typeof r=="object"?r.read:r;if(o&&o!==e)try{if((await this.stateContext.getObject(o))?.common?.custom?.[this.defaultHistory]?.enabled)return!0}catch{}}return!1}onSaveSettings=e=>{const{settingsWidgetId:n}=this.state;if(n!=null){const r={...this.state.widgetSettings,[String(n)]:e},o=this.state.widgets.find(i=>String(i.id)===String(n));let s=this.state.widgets;if(o){const a=(o.control?.type?T0.has(o.control.type):!1)?e.iconInactive||"":e.icon||"";a!==(o.icon||"")&&(s=s.map(d=>String(d.id)===String(n)?{...d,icon:a||void 0}:d))}this.setState({widgetSettings:r,widgets:s,settingsWidgetId:null}),this.saveWidgetSettingsToObject(String(n),e)}};onToggleFavorite=e=>{const n=this.state.widgetSettings[e]||{...Op},r={...n,favorite:!n.favorite},o={...this.state.widgetSettings,[e]:r};this.setState({widgetSettings:o}),this.saveWidgetSettingsToObject(e,r)};static extractSingleWidgetSettings(e){const n=e.custom;if(!n)return null;const r={};for(const o of Object.keys(Op))o==="name"||(o==="iconInactive"&&T0.has(e.control?.type)?e.icon&&(r.iconInactive=e.icon):o==="icon"&&!T0.has(e.control?.type)?e.icon&&(r.icon=e.icon):o in n&&(r[o]=n[o]));return Object.keys(r).length===0?null:{...Op,...r}}static extractWidgetSettingsFromWidgets(e){const n={};for(const r of e){const o=$i.extractSingleWidgetSettings(r);o&&(n[String(r.id)]=o)}return n}async saveWidgetSettingsToObject(e,n){const r=this.state.selectedInstance,o=this.state.widgets.find(i=>String(i.id)===e),s=o?.control?.type?T0.has(o.control.type):!1;try{const i=await this.props.socket.getObject(e);if(!i)return;const a=i.common;a.custom||={};const d={...a.custom[r]||{}};for(const m of Object.keys(Op)){if(m==="name"){n.name&&(a.name=n.name);continue}if(m==="iconInactive"&&s){n.iconInactive?a.icon=n.iconInactive:delete a.icon;continue}if(m==="icon"&&!s){n.icon?a.icon=n.icon:delete a.icon;continue}const _=n[m];_!==Op[m]?d[m]=_:delete d[m]}a.custom[r]=d,await this.props.socket.setObject(i._id,i)}catch(i){console.error("Failed to save widget settings:",i)}}onCloseSettings=()=>{this.setState({settingsWidgetId:null})};onDeleteWidget=async()=>{const e=this.state.settingsWidgetId;if(e==null)return;const n=this.state.selectedInstance;try{const o=await this.props.socket.getObject(String(e));if(o){const s=o.common;s.custom||={},s.custom[n]=null,await this.props.socket.setObject(o._id,o)}}catch(o){console.error("Failed to delete widget custom data:",o)}const r={...this.state.widgetSettings};delete r[String(e)],this.setState({widgetSettings:r,settingsWidgetId:null})};onDeleteWidgetById=async e=>{const n=this.state.selectedInstance;try{const o=await this.props.socket.getObject(String(e));if(o){const s=o.common;s.custom||={},s.custom[n]=null,await this.props.socket.setObject(o._id,o)}}catch(o){console.error("Failed to delete widget custom data:",o)}const r={...this.state.widgetSettings};delete r[String(e)],this.setState({widgetSettings:r})};extractCategorySettings(e){const n={},r=this.state.guiConfig?.root;r&&(n[so]={name:r.title||"",color:r.color||"",backgroundColor:r.backgroundColor||"",image:r.image||"",imageScope:r.imageScope||"header",icon:r.icon||"",rootIcon:r.rootIcon||"",wmTheme:r.wmTheme,defaultCategory:r.defaultCategory||"",customWidgets:r.customWidgets,widgetOrder:r.widgetOrder,widgetGroups:r.widgetGroups});for(const o of e){const s=String(o.id);if(s===so)continue;const i=this.getCategoryName(o),a=typeof o.color=="string"?o.color:"",d=o.custom?.backgroundColor||"",m=o.custom?.image||"",_=o.custom?.imageScope||"header",h=o.custom?.customWidgets,w=o.custom?.widgetOrder,x=o.custom?.widgetGroups,S=typeof o.icon=="string"?o.icon:"";n[s]={name:i,color:a,backgroundColor:d,image:m,imageScope:_,customWidgets:h,widgetOrder:w,widgetGroups:x,icon:S}}this.setState({categorySettings:n})}onOpenCategorySettings=e=>{this.setState({categorySettingsCategoryId:e})};onSaveCategorySettings=e=>{const{categorySettingsCategoryId:n}=this.state;if(n!=null){const r={...this.state.categorySettings,[n]:e};if(n===so){const o={...this.state.guiConfig,root:{...this.state.guiConfig?.root,title:e.name||"",color:e.color||"",backgroundColor:e.backgroundColor||"",image:e.image||"",imageScope:e.imageScope||"header",icon:e.icon||"",rootIcon:e.rootIcon||"",wmTheme:e.wmTheme||void 0,defaultCategory:e.defaultCategory||void 0}};this.setState({categorySettings:r,categorySettingsCategoryId:null,guiConfig:o}),this.saveRootSettings(o),e.icon&&$i.applyPwaIcon(e.icon,this.props.admin)}else{const o=this.state.categories.map(s=>String(s.id)===n?{...s,name:e.name||s.name,color:e.color||void 0,icon:e.icon||void 0,custom:{enabled:!0,...s.custom,backgroundColor:e.backgroundColor||"",image:e.image||"",imageScope:e.imageScope||"header"}}:s);this.setState({categorySettings:r,categories:o,categorySettingsCategoryId:null}),this.saveCategorySettingsToObject(n,e)}}};async saveCategorySettingsToObject(e,n){const r=this.state.selectedInstance;try{const o=await this.props.socket.getObject(e);if(o){const s=o.common||{};n.name&&(s.name=n.name),s.color=n.color||"",n.icon?s.icon=n.icon:delete s.icon,s.custom||={},s.custom[r]={enabled:!0,...s.custom[r],backgroundColor:n.backgroundColor||"",image:n.image||"",imageScope:n.imageScope||"header",...n.widgetOrder?{widgetOrder:n.widgetOrder}:{}},await this.props.socket.setObject(e,o)}}catch(o){console.error("Failed to save category settings:",o)}}async saveRootSettings(e){try{const n=await this.props.socket.getObject(this.rootSettingsStateId);n&&(n.native=e,await this.props.socket.setObject(this.rootSettingsStateId,n))}catch(n){console.error("Failed to save root settings:",n)}}static applyPwaIcon(e,n){const o=`${n?"/files/":"/"}${e.replace(/^\//,"")}`;let s=document.querySelector('link[rel="shortcut icon"]');s||(s=document.createElement("link"),s.rel="shortcut icon",document.head.appendChild(s)),s.href=o;let i=document.querySelector('link[rel="apple-touch-icon"]');i||(i=document.createElement("link"),i.rel="apple-touch-icon",document.head.appendChild(i)),i.href=o;const a={short_name:document.title||"Smart Home",name:document.title||"Smart Home",icons:[{src:o,sizes:"192x192",type:"image/png"},{src:o,sizes:"512x512",type:"image/png"}],start_url:".",display:"standalone",theme_color:"#000000",background_color:"#121212"},d=new Blob([JSON.stringify(a)],{type:"application/json"}),m=URL.createObjectURL(d);let _=document.querySelector('link[rel="manifest"]');_||(_=document.createElement("link"),_.rel="manifest",document.head.appendChild(_)),_.href=m}onCloseCategorySettings=()=>{this.setState({categorySettingsCategoryId:null})};onWidgetOrderChange=(e,n)=>{const o={...this.state.categorySettings[e]||{name:"",color:"",backgroundColor:"",image:"",imageScope:"header"},widgetOrder:n},s={...this.state.categorySettings,[e]:o};if(e===so){const i={...this.state.guiConfig,root:{...this.state.guiConfig?.root,widgetOrder:n}};this.setState({categorySettings:s,guiConfig:i}),this.saveRootSettings(i)}else{const i=this.state.categories.map(a=>String(a.id)===e?{...a,custom:{...a.custom,widgetOrder:n}}:a);this.setState({categorySettings:s,categories:i}),this.saveWidgetOrderToObject(e,n)}};async saveWidgetOrderToObject(e,n){const r=this.state.selectedInstance;try{const o=await this.props.socket.getObject(e);if(o){const s=o.common||{};s.custom||={},s.custom[r]={...s.custom[r],widgetOrder:n},await this.props.socket.setObject(e,o)}}catch(o){console.error("Failed to save widget order:",o)}}onWidgetGroupsChange=(e,n)=>{const o={...this.state.categorySettings[e]||{...Gg},widgetGroups:n},s={...this.state.categorySettings,[e]:o};if(e===so){const i={...this.state.guiConfig,root:{...this.state.guiConfig?.root,widgetGroups:n}};this.setState({categorySettings:s,guiConfig:i}),this.saveRootSettings(i)}else{const i=this.state.categories.map(a=>String(a.id)===e?{...a,custom:{...a.custom,widgetGroups:n}}:a);this.setState({categorySettings:s,categories:i}),this.saveWidgetGroupsToObject(e,n)}};onToggleGrouping=(e,n)=>{const r=this.state.categorySettings[e]||{...Gg};if(r.widgetGroups?.length){const o=ajt(r.widgetGroups),s={...r,widgetGroups:void 0,widgetOrder:o};this.onWidgetOrderChange(e,o);const i={...this.state.categorySettings,[e]:s};if(this.setState({categorySettings:i}),e===so){const a={...this.state.guiConfig,root:{...this.state.guiConfig?.root,widgetGroups:void 0,widgetOrder:o}};this.setState({guiConfig:a}),this.saveRootSettings(a)}else{const a=this.state.categories.map(d=>String(d.id)===e?{...d,custom:{...d.custom,widgetGroups:void 0,widgetOrder:o}}:d);this.setState({categories:a}),this.saveWidgetGroupsToObject(e,void 0)}}else{const o=ijt(n);this.onWidgetGroupsChange(e,o)}};onWidgetGroupMove=(e,n,r)=>{const o=this.state.categorySettings[e];if(!o?.widgetGroups?.length)return;const s=ljt(o.widgetGroups,n,r);this.onWidgetGroupsChange(e,s)};onMoveWidgetToCategory=(e,n)=>{const r=this.state.widgets.map(o=>String(o.id)===e?{...o,parent:n}:o);this.setState({widgets:r}),this.saveWidgetParentOverride(e,n)};async saveWidgetParentOverride(e,n){const r=this.state.selectedInstance;try{const o=await this.props.socket.getObject(e);if(o){const s=o.common||{};s.custom||={},s.custom[r]={...s.custom[r],parent:n},await this.props.socket.setObject(o._id,o)}}catch(o){console.error("Failed to save widget parent override:",o)}}async saveWidgetGroupsToObject(e,n){const r=this.state.selectedInstance;try{const o=await this.props.socket.getObject(e);if(o){const s=o.common||{};s.custom||={},s.custom[r]={...s.custom[r],widgetGroups:n||null},await this.props.socket.setObject(e,o)}}catch(o){console.error("Failed to save widget groups:",o)}}onOpenCustomWidgetDialog=e=>{this.setState({customWidgetDialogCategoryId:e})};onCloseCustomWidgetDialog=()=>{this.setState({customWidgetDialogCategoryId:null})};onAddCustomWidget=e=>{const{customWidgetDialogCategoryId:n}=this.state;if(!n)return;const r=`custom_${e}_${Date.now().toString(36)}`,o={},s=Yw[e];if(s)for(const[_,h]of Object.entries(s.items))o[_]=qg(h);const i={id:r,type:e,...o},a=this.state.categorySettings[n]||{...Gg},d=[...a.customWidgets||[],i],m={...this.state.categorySettings,[n]:{...a,customWidgets:d}};this.setState({categorySettings:m,customWidgetDialogCategoryId:null}),this.persistCustomWidgets(n,d)};onRemoveCustomWidget=(e,n)=>{const r=this.state.categorySettings[e];if(!r?.customWidgets)return;const o=r.customWidgets.filter(i=>i.id!==n),s={...this.state.categorySettings,[e]:{...r,customWidgets:o}};this.setState({categorySettings:s}),this.persistCustomWidgets(e,o)};onOpenCustomWidgetSettings=(e,n)=>{this.setState({customWidgetSettingsCategoryId:e,customWidgetSettingsWidgetId:n})};onCloseCustomWidgetSettings=()=>{this.setState({customWidgetSettingsCategoryId:null,customWidgetSettingsWidgetId:null})};onSaveCustomWidgetSettings=e=>{const{customWidgetSettingsCategoryId:n}=this.state;if(!n)return;const r=this.state.categorySettings[n];if(!r?.customWidgets)return;const o=r.customWidgets.map(i=>i.id===e.id?e:i),s={...this.state.categorySettings,[n]:{...r,customWidgets:o}};this.setState({categorySettings:s,customWidgetSettingsCategoryId:null,customWidgetSettingsWidgetId:null}),this.persistCustomWidgets(n,o)};onDeleteCustomWidgetFromSettings=()=>{const{customWidgetSettingsCategoryId:e,customWidgetSettingsWidgetId:n}=this.state;e&&n&&this.onRemoveCustomWidget(e,n),this.setState({customWidgetSettingsCategoryId:null,customWidgetSettingsWidgetId:null})};persistCustomWidgets(e,n){if(e===so){const r={...this.state.guiConfig,root:{...this.state.guiConfig?.root,customWidgets:n}};this.setState({guiConfig:r}),this.saveRootSettings(r)}else{const r=this.state.categories.map(o=>String(o.id)===e?{...o,custom:{...o.custom,customWidgets:n}}:o);this.setState({categories:r}),this.saveCustomWidgetsToObject(e,n)}}async saveCustomWidgetsToObject(e,n){const r=this.state.selectedInstance;try{const o=await this.props.socket.getObject(e);o&&(o.common.custom||={},o.common.custom[r]={...o.common.custom[r],customWidgets:n},await this.props.socket.setObject(e,o))}catch(o){console.error("Failed to save custom widgets:",o)}}getWidgetName(e){if(typeof e.name=="string")return e.name||String(e.id);if(typeof e.name=="object"&&"en"in e.name){const n=e.name;return n[this.language]||n.en||String(e.id)}return String(e.id)}cachedWmThemeId;getWidgetTheme(){const e=this.state.categorySettings[so]?.wmTheme||"auto";if(this.widgetTheme&&this.widgetThemeType===this.props.themeType&&this.cachedWmThemeId===e)return this.widgetTheme;this.widgetThemeType=this.props.themeType,this.cachedWmThemeId=e;const n=e==="auto"?this.props.themeType:e,r=kjt[n];return r?(this.widgetTheme=qp({palette:{mode:r.mode,primary:{main:r.primary},secondary:{main:r.secondary},background:{default:r.bgDefault,paper:r.bgPaper},text:{primary:r.textPrimary,secondary:r.textSecondary,disabled:r.textDisabled}},typography:{fontFamily:LL},...n==="styling-grey"?{components:{MuiDialog:{styleOverrides:{paper:{borderRadius:"28px",background:"linear-gradient(145deg, #222224, #1a1a1c)",border:"1px solid rgba(255,255,255,0.04)",boxShadow:"0 24px 48px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.03)"}}},MuiDialogTitle:{styleOverrides:{root:{fontSize:"1rem",fontWeight:600}}},MuiDialogContent:{styleOverrides:{root:{"&::-webkit-scrollbar":{width:6},"&::-webkit-scrollbar-thumb":{background:"rgba(255,255,255,0.1)",borderRadius:3}}}},MuiButton:{styleOverrides:{outlined:{borderColor:"rgba(255,255,255,0.1)",borderRadius:"14px","&:hover":{borderColor:"rgba(255,255,255,0.2)",background:"rgba(255,255,255,0.04)"}},contained:{borderRadius:"14px",boxShadow:"0 4px 12px rgba(0,0,0,0.4)"}}},MuiIconButton:{styleOverrides:{root:{"&:hover":{background:"rgba(255,255,255,0.06)"}}}},MuiSlider:{styleOverrides:{root:{"& .MuiSlider-track":{boxShadow:"0 0 8px currentColor"},"& .MuiSlider-thumb":{boxShadow:"0 0 10px rgba(0,0,0,0.5)"}}}}}}:{}}),this.widgetTheme.wmPreset=n):this.widgetTheme=qp(this.props.theme,{typography:{fontFamily:LL}}),this.widgetTheme}render(){if(this.state.alive===!1)return p.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",opacity:.5},children:B.t("wm_Instance not active")});const e=this.state.currentCategory||this.state.categories.find(h=>h.id===so),n=this.state.settingsWidgetId!=null?this.state.widgets.find(h=>h.id===this.state.settingsWidgetId):null,r=!!this.props.showSettingsButton&&this.state.configMode,o=this.state.categorySettings[so]?.hideConfigButton,s=Object.entries(this.state.widgetSettings).filter(([,h])=>h.favorite).map(([h])=>h),i=s.length>0,a=this.buildFavoritesCategory(),d=i?this.state.widgets.filter(h=>s.includes(String(h.id))).map(h=>({...h,parent:P5})):[],m=a?[...this.state.categories,a]:this.state.categories,_=d.length?[...this.state.widgets,...d]:this.state.widgets;return e?p.jsx(q5,{theme:this.getWidgetTheme(),children:p.jsxs("div",{style:{width:"100%",height:"100%"},children:[p.jsx(ma,{category:e,categories:m,widgets:_,stateContext:this.stateContext,language:this.language,onNavigate:h=>{this.setState({currentCategory:h}),this.updateHash(h)},widgetSettings:this.state.widgetSettings,onOpenSettings:r?this.onOpenSettings:void 0,categorySettings:this.state.categorySettings,onOpenCategorySettings:r?this.onOpenCategorySettings:void 0,onAddCustomWidget:r?this.onOpenCustomWidgetDialog:void 0,onRemoveCustomWidget:r?this.onRemoveCustomWidget:void 0,onOpenCustomWidgetSettings:r?this.onOpenCustomWidgetSettings:void 0,onWidgetOrderChange:r?this.onWidgetOrderChange:void 0,onWidgetGroupsChange:this.onWidgetGroupsChange,onToggleGrouping:r?this.onToggleGrouping:void 0,onMoveWidgetToCategory:r?this.onMoveWidgetToCategory:void 0,configMode:this.state.configMode,onToggleConfigMode:this.props.showSettingsButton&&!o?()=>this.setState(h=>{const w=!h.configMode;try{localStorage.setItem("wm_configMode",JSON.stringify(w))}catch{}return{configMode:w}}):void 0,admin:this.props.admin,defaultHistory:this.defaultHistory||void 0,instanceId:this.state.selectedInstance||void 0,onInstallSidePanel:()=>this.setState({sidePanelDialogOpen:!0}),onDeleteWidgetById:r?this.onDeleteWidgetById:void 0,onToggleFavorite:r?this.onToggleFavorite:void 0,latitude:this.state.latitude,longitude:this.state.longitude},e.id),p.jsx(Cjt,{settingsWidget:n||null,settingsWidgetName:n?this.getWidgetName(n):"",widgetSettings:this.state.widgetSettings,chartAvailable:this.state.chartAvailable,settingsObjectName:this.state.settingsObjectName,settingsObjectColor:this.state.settingsObjectColor,onCloseSettings:this.onCloseSettings,onSaveSettings:this.onSaveSettings,onDeleteWidget:this.onDeleteWidget,categorySettingsCategoryId:this.state.categorySettingsCategoryId,categories:this.state.categories,currentCategory:e,categorySettings:this.state.categorySettings,rootCategory:so,onCloseCategorySettings:this.onCloseCategorySettings,onSaveCategorySettings:this.onSaveCategorySettings,selectedInstance:this.state.selectedInstance,customWidgetDialogCategoryId:this.state.customWidgetDialogCategoryId,onCloseCustomWidgetDialog:this.onCloseCustomWidgetDialog,onAddCustomWidget:this.onAddCustomWidget,customWidgetSettingsCategoryId:this.state.customWidgetSettingsCategoryId,customWidgetSettingsWidgetId:this.state.customWidgetSettingsWidgetId,onCloseCustomWidgetSettings:this.onCloseCustomWidgetSettings,onSaveCustomWidgetSettings:this.onSaveCustomWidgetSettings,onDeleteCustomWidgetFromSettings:this.onDeleteCustomWidgetFromSettings,sidePanelDialogOpen:this.state.sidePanelDialogOpen,onCloseSidePanel:()=>this.setState({sidePanelDialogOpen:!1}),admin:this.props.admin,socket:this.props.socket,theme:this.props.theme,settingsWidgetId:this.state.settingsWidgetId,onWidgetGroupMove:this.onWidgetGroupMove,getCategoryName:this.getCategoryName})]})}):p.jsx("div",{children:B.t("wm_Nothing defined")})}}const Tjt="Add",Mjt="Apply",$jt="Cancel",Ejt="Close",Djt="Color",Ljt="Create",Ijt="Delete",Ojt="Device",jjt="Devices",Ajt="Edit",Pjt="Enabled",Rjt="Execution",Njt="Filter",zjt="Functions",Hjt="General",Fjt="IDs",Wjt="Icon",Yjt="ID",Bjt="Import",Vjt="Importer",Ujt="Indicators",qjt="Name",Gjt="Names",Jjt="OK",Kjt="Off",Xjt="Ok",Zjt="On",Qjt="Readable",eAt="Refresh",tAt="Required",nAt="Role",rAt="Room",oAt="Rooms",sAt="Root",iAt="Save",aAt="Selected",lAt="States",cAt="Step",dAt="Title",uAt="Type",pAt="Types",hAt="Unit",mAt="Value",fAt="Writable",_At="Write",gAt="read",yAt="write",wAt="alive",vAt="You must add the devices to room or function categories to let the devices be detected automatically",bAt="boolean",xAt="file",SAt="Settings",CAt="Function",kAt="ID",TAt="Name",MAt="Role",$At="Room",EAt="Type",DAt="no structure",LAt="functions",IAt="No group",OAt="number",jAt="rooms",AAt="string",PAt="Acknowledged",RAt="Copy state value into clipboard",NAt="Settings",zAt="Delete object",HAt="Edit object",FAt="Modify state value",WAt="Source",YAt="Last change time",BAt="Quality",VAt="Time stamp",UAt="User",qAt="Value",GAt={Add:Tjt,'Add new folder to "%s"':'Add new folder to "%s"',"Add state":"Add state","Add to root":"Add to root",Apply:Mjt,"Automatically detected":"Native devices",Cancel:$jt,Close:Ejt,"Collapse all nodes":"Collapse all folders",Color:Djt,"Copy device":"Copy device","Copy device into aliases":"Copy device into aliases",Create:Ljt,"Create new device":"Create new device","Create new device with Aliases":"Create new device with Aliases","Create new device with LinkedDevices":"Create new device with LinkedDevices","Create new folder":"Create new folder","Create new folder in root":"Create new folder in root directory","Decrement color temperature":"Decrement color temperature","Decrement percentage":"Decrement percentage","Decrement target temperature":"Decrement target temperature",Delete:Ijt,"Delete device with all states":"Delete device with all states","Delete folder":"Delete folder","Delete state":"Delete state",Device:Ojt,"Device and all states will be deleted. Are you sure?":"Device and all states will be deleted. Are you sure?","Device name":"Device name","Device type":"Device type","Drag to resize":"Drag to resize","Drop or select a device to configure":"Drop or select a device to configure",Devices:jjt,"Disable smart":'Disable "smart" functionality',"Do not show dialog for 5 minutes":"Do not show dialog for 5 minutes",Edit:Ajt,"Edit convert functions":"Edit convert functions","Edit device":"Edit device","Edit folder":"Edit folder properties","Edit folder %s":'Edit folder "%s"','Edit name "%s"':'Edit name "%s"',"Edit name and other properties":"Edit name and other properties","Edit read/write functions":"Edit read/write functions","Edit state":"Edit state","Edit state %s":"Edit state %s","Edit states":"Edit states","Enable or disable device":"Enable or disable device",Enabled:Pjt,Execution:Rjt,"Expand all nodes":"Expand all folders",Filter:Njt,"Folder name":"Folder name","Folder will be deleted. Are you sure?":"Folder will be deleted. Are you sure?",Function:"Function",Functions:zjt,General:Hjt,"Get actual temperature":"Get actual temperature","Get target temperature":"Get target temperature","Hide info devices":"Hide info devices","Hide this name from smart assistance":"Hide this name from smart assistance",IDs:Fjt,Icon:Wjt,Id:Yjt,Import:Bjt,"Import state":"Import state",Importer:Vjt,"Increment color temperature":"Increment color temperature","Increment percentage":"Increment percentage","Increment target temperature":"Increment target temperature",Indicators:Ujt,"JS function like":"JS function like","Linked devices":"Linked devices",Name:qjt,Names:Gjt,"New folder":"New folder",OK:Jjt,Off:Kjt,Ok:Xjt,On:Zjt,"Please confirm...":"Please confirm...","Read function":"Read","Read lock state":"Read lock state",Readable:Qjt,Refresh:eAt,Required:tAt,Role:nAt,Room:rAt,Rooms:oAt,Root:sAt,Save:iAt,"Select ID":"Select ID",'Select for "%s"':'Select for "%s"',"Select predefined icon":"Select predefined icon",Selected:aAt,"Set color":"Set color","Set color temperature":"Set color temperature","Set lock state":"Set lock state","Set percentage":"Set percentage","Set target temperature":"Set target temperature","Show expert settings":"Show expert settings","Show hide indicators":"Show/hide indicators","Show only aliases":"Show only aliases","Smart name":"Smart name",States:lAt,Step:cAt,'Supported by "%s"':'Supported by "%s"',"Supported by %s":"Supported by %s","The list of devices to copy is empty":"The list of devices to copy is empty","This name will use be in smart assistance. (optional)":"This name will be used in smart assistance. (optional)",Title:dAt,"Turn off":"Turn off","Turn on":"Turn on",Type:uAt,Types:pAt,Unit:hAt,"Use different states for read and write":"Use different states for read and write","Use one state for read and write":"Use one state for read and write",Value:mAt,"Value=>String":"Mapping of the value to string",Writable:fAt,Write:_At,"Write function":"Write","You can drag & drop device":"You can drag & drop device",alias_read:gAt,alias_write:yAt,alive:wAt,auto_detected_empty_info:vAt,boolean:bAt,"cloning method":"Structure on","do not import devices without category":"do not import devices without category",file:xAt,filter_customs:SAt,filter_func:CAt,filter_id:kAt,filter_name:TAt,filter_role:MAt,filter_room:$At,filter_type:EAt,flat:DAt,functions:LAt,no_group:IAt,number:OAt,rooms:jAt,string:AAt,"Toggle split screen":"Toggle split screen",tooltip_ack:PAt,tooltip_copyState:RAt,tooltip_customConfig:NAt,tooltip_deleteObject:zAt,tooltip_editObject:HAt,tooltip_editState:FAt,tooltip_from:WAt,tooltip_lc:YAt,tooltip_quality:BAt,tooltip_ts:VAt,tooltip_user:UAt,tooltip_value:qAt},JAt="Hinzufügen",KAt="Anwenden",XAt="Abbrechen",ZAt="Schließen",QAt="Farbe",ePt="Erstellen",tPt="Löschen",nPt="Gerät",rPt="Geräte",oPt="Bearbeiten",sPt="Aktiviert",iPt="Ausführung",aPt="Filter",lPt="Funktionen",cPt="Allgemein",dPt="IDs",uPt="Icon",pPt="ID",hPt="Importieren",mPt="Importeur",fPt="Indikatoren",_Pt="Name",gPt="Namen",yPt="OK",wPt="Aus",vPt="Ok",bPt="Ein",xPt="Lesbar",SPt="Aktualisieren",CPt="Erforderlich",kPt="Rolle",TPt="Raum",MPt="Räume",$Pt="Root",EPt="Speichern",DPt="Ausgewählt",LPt="Zustände",IPt="Schritt",OPt="Titel",jPt="Typ",APt="Typen",PPt="Einheit",RPt="Wert",NPt="Schreibbar",zPt="Schreiben",HPt="lesen",FPt="schreiben",WPt="erreichbar",YPt="Die Geräte müssen zu Raum- oder Funktionskategorien hinzufügen werden, damit die Geräte automatisch erkannt werden",BPt="Boolescher Wert",VPt="Datei",UPt="Einstellungen",qPt="Funktion",GPt="ID",JPt="Name",KPt="Rolle",XPt="Raum",ZPt="Typ",QPt="ohne Struktur",eRt="Funktionen",tRt="Keine Gruppe",nRt="Nummer",rRt="Räume",oRt="Zeichenfolge",sRt="Bestätigt",iRt="Den Zustandswert in die Zwischenablage kopieren",aRt="Einstellungen",lRt="Objekt löschen",cRt="Objekt bearbeiten",dRt="Zustandswert ändern",uRt="Quelle",pRt="Zeit der letzten Änderung",hRt="Qualität",mRt="Zeitstempel",fRt="Benutzer",_Rt="Wert",gRt={Add:JAt,'Add new folder to "%s"':'Neuen Ordner zu "%s" hinzufügen',"Add state":"Zustand hinzufügen","Add to root":"Zu root hinzufügen",Apply:KAt,"Automatically detected":"Native Geräte",Cancel:XAt,Close:ZAt,"Collapse all nodes":"Alle Ordner ausblenden",Color:QAt,"Copy device":"Gerät kopieren","Copy device into aliases":"Gerät in Alias kopieren",Create:ePt,"Create new device":"Neues Gerät erstellen","Create new device with Aliases":"Neues Gerät mit Alias erstellen","Create new device with LinkedDevices":"Neues Gerät mit LinkedDevices erstellen","Create new folder":"Neuen Ordner erstellen","Create new folder in root":"Neuen Ordner im Root-Verzeichnis erstellen","Decrement color temperature":"Verringern der Farbtemperatur","Decrement percentage":"Prozentsatz der Verringerung","Decrement target temperature":"Solltemperatur verringern",Delete:tPt,"Delete device with all states":"Gerät mit allen Zuständen löschen","Delete folder":"Ordner löschen","Delete state":"Zustand löschen",Device:nPt,"Device and all states will be deleted. Are you sure?":"Das Gerät und alle Zustände werden gelöscht. Bist du sicher?","Device name":"Gerätename","Device type":"Gerätetyp",Devices:rPt,"Drag to resize":"Ziehen zum Ändern der Größe","Drop or select a device to configure":"Gerät hierher ziehen oder auswählen, um es zu konfigurieren","Disable smart":'Die "intelligente" Funktionalität deaktivieren',"Do not show dialog for 5 minutes":"Dialog 5 Minuten lang nicht anzeigen",Edit:oPt,"Edit convert functions":"Konvertierungsfunktionen bearbeiten","Edit device":"Gerät bearbeiten","Edit folder":"Ordnereigenschaften bearbeiten","Edit folder %s":'Ordner "%s" bearbeiten','Edit name "%s"':'Namen "%s" bearbeiten',"Edit name and other properties":"Namen und andere Eigenschaften bearbeiten","Edit read/write functions":"Lese-/Schreibfunktionen bearbeiten","Edit state":"Zustand editieren","Edit state %s":"Zustand %s bearbeiten","Edit states":"Zustände bearbeiten","Enable or disable device":"Gerät aktivieren oder deaktivieren",Enabled:sPt,Execution:iPt,"Expand all nodes":"Alle Ordner aufklappen",Filter:aPt,"Folder name":"Ordnername","Folder will be deleted. Are you sure?":"Der Ordner wird gelöscht. Bist du sicher?",Function:"Funktion",Functions:lPt,General:cPt,"Get actual temperature":"Aktuelle Temperatur abrufen","Get target temperature":"Solltemperatur abrufen","Hide info devices":"Info-Geräte ausblenden","Hide this name from smart assistance":"Diesen Namen vor Smart Assistance ausblenden",IDs:dPt,Icon:uPt,Id:pPt,Import:hPt,"Import state":"Zustand importieren",Importer:mPt,"Increment color temperature":"Erhöhung der Farbtemperatur","Increment percentage":"Prozentsatz erhöhen","Increment target temperature":"Solltemperatur erhöhen",Indicators:fPt,"JS function like":"JS-Funktion wie","Linked devices":"Verknüpfte Geräte",Name:_Pt,Names:gPt,"New folder":"Neuer Ordner",OK:yPt,Off:wPt,Ok:vPt,On:bPt,"Please confirm...":"Bitte bestätigen...","Read function":"Lesen","Read lock state":"Verschlusszustand lesen",Readable:xPt,Refresh:SPt,Required:CPt,Role:kPt,Room:TPt,Rooms:MPt,Root:$Pt,Save:EPt,"Select ID":"ID auswählen",'Select for "%s"':'Auswählen für "%s"',"Select predefined icon":"Wählen Sie ein vordefiniertes Symbol aus",Selected:DPt,"Set color":"Farbe einstellen","Set color temperature":"Farbtemperatur einstellen","Set lock state":"Verschlussstatus einstellen","Set percentage":"Prozent einstellen","Set target temperature":"Solltemperatur einstellen","Show expert settings":"Experteneinstellungen anzeigen","Show hide indicators":"Indikatoren ein- / ausblenden","Show only aliases":"Nur Aliase anzeigen","Smart name":"Smart-Name",States:LPt,Step:IPt,'Supported by "%s"':'Unterstützt von "%s"',"Supported by %s":"Unterstützt von %s","The list of devices to copy is empty":"Die Liste der zu kopierenden Geräte ist leer","This name will use be in smart assistance. (optional)":"Dieser Name wird in der intelligenten Unterstützung verwendet. (Optional)",Title:OPt,"Turn off":"Ausschalten","Turn on":"Einschalten",Type:jPt,Types:APt,Unit:PPt,"Use different states for read and write":"Unterschiedliche Zustände zum Lesen und Schreiben verwenden","Use one state for read and write":"Einen Zustand zum Lesen und Schreiben verwenden ",Value:RPt,"Value=>String":"Abbildung des Wertes auf den String",Writable:NPt,Write:zPt,"Write function":"Schreiben","You can drag & drop device":"Sie können das Gerät per Drag & Drop verschieben",alias_read:HPt,alias_write:FPt,alive:WPt,auto_detected_empty_info:YPt,boolean:BPt,"cloning method":"Strukturieren nach","do not import devices without category":"keine Geräte ohne Kategorie importieren",file:VPt,filter_customs:UPt,filter_func:qPt,filter_id:GPt,filter_name:JPt,filter_role:KPt,filter_room:XPt,filter_type:ZPt,flat:QPt,functions:eRt,no_group:tRt,number:nRt,rooms:rRt,string:oRt,"Toggle split screen":"Geteilte Ansicht umschalten",tooltip_ack:sRt,tooltip_copyState:iRt,tooltip_customConfig:aRt,tooltip_deleteObject:lRt,tooltip_editObject:cRt,tooltip_editState:dRt,tooltip_from:uRt,tooltip_lc:pRt,tooltip_quality:hRt,tooltip_ts:mRt,tooltip_user:fRt,tooltip_value:_Rt},yRt="Добавить",wRt="Применить",vRt="Отмена",bRt="Закрыть",xRt="Цвет",SRt="Создать",CRt="Удалить",kRt="Устройство",TRt="Устройства",MRt="Редактировать",$Rt="Включено",ERt="Выполнение",DRt="Фильтр",LRt="Функции",IRt="Общее",ORt="Идентификаторы",jRt="Икона",ARt="ID",PRt="Импортировать",RRt="Импортер",NRt="Индикаторы",zRt="Имя",HRt="Имена",FRt="Ок",WRt="Выкл.",YRt="Ok",BRt="Вкл.",VRt="Возможность чтения",URt="Обновить",qRt="Обязательно",GRt="Роль",JRt="Комната",KRt="Комнаты",XRt="Root",ZRt="Сохранить",QRt="Выбранный",eNt="Состояния",tNt="Шаг",nNt="Название",rNt="Тип",oNt="Типы",sNt="Единица",iNt="Значение",aNt="Возможность записи",lNt="Писать",cNt="читать",dNt="писать",uNt="живой",pNt="Вам необходимо добавить устройства в категории комнат или функций, чтобы устройства обнаруживались автоматически.",hNt="логический",mNt="файл",fNt="Настройки",_Nt="Функция",gNt="ID",yNt="Название",wNt="Роль",vNt="Комната",bNt="Тип",xNt="без структуры",SNt="функции",CNt="Нет группы",kNt="номер",TNt="комнаты",MNt="нить",$Nt="Подтвержденный",ENt="Скопировать значение состояния в буфер обмена",DNt="Настройки",LNt="Удалить объект",INt="Редактировать объект",ONt="Изменить значение состояния",jNt="Источник",ANt="Время последнего изменения",PNt="Качественный",RNt="Время",NNt="Пользователь",zNt="Значение",HNt={Add:yRt,'Add new folder to "%s"':'Добавить новую папку в "%s"',"Add state":"Добавить состояние","Add to root":"Добавить в корень",Apply:wRt,"Automatically detected":"Реальные устройства",Cancel:vRt,Close:bRt,"Collapse all nodes":"Свернуть все папки",Color:xRt,"Copy device":"Копировать устройство","Copy device into aliases":"Копировать устройство в псевдонимы",Create:SRt,"Create new device":"Создать новое устройство","Create new device with Aliases":"Создать новое устройство с псевдонимами (aliases)","Create new device with LinkedDevices":"Создать новое устройство с помощью LinkedDevices","Create new folder":"Создать новую папку","Create new folder in root":"Создать новую папку в корневом каталоге","Decrement color temperature":"Уменьшение цветовой температуры","Decrement percentage":"Снижение процента","Decrement target temperature":"Уменьшение желаемой температуры",Delete:CRt,"Delete device with all states":"Удалить устройство со всеми состояниями","Delete folder":"Удалить папку","Delete state":"Удалить состояние",Device:kRt,"Device and all states will be deleted. Are you sure?":"Устройство и все состояния будут удалены. Подтвердить?","Device name":"Имя устройства","Device type":"Тип устройства",Devices:TRt,"Drag to resize":"Перетащите для изменения размера","Drop or select a device to configure":"Перетащите или выберите устройство для настройки","Disable smart":"Отключить «умный» функционал","Do not show dialog for 5 minutes":"Не показывать диалог в течение 5 минут",Edit:MRt,"Edit convert functions":"Редактировать функции преобразования","Edit device":"Редактировать параметры устройства","Edit folder":"Изменить свойства папки","Edit folder %s":'Изменить папку "%s"','Edit name "%s"':'Изменить имя "%s"',"Edit name and other properties":"Изменить имя и другие свойства","Edit read/write functions":"Редактировать функции чтения / записи","Edit state":"Редактировать состояние","Edit state %s":"Изменить состояние %s","Edit states":"Редактировать состояния","Enable or disable device":"Включить или отключить устройство",Enabled:$Rt,Execution:ERt,"Expand all nodes":"Развернуть все папки",Filter:DRt,"Folder name":"Имя папки","Folder will be deleted. Are you sure?":"Папка будет удалена. Подтвердить?",Function:"Функция",Functions:LRt,General:IRt,"Get actual temperature":"Запросить текущую температуру","Get target temperature":"Запросить желаемую температуру","Hide info devices":"Скрыть информационные устройства","Hide this name from smart assistance":"Скрыть это имя от умной помощи",IDs:ORt,Icon:jRt,Id:ARt,Import:PRt,"Import state":"Импортировать состояние",Importer:RRt,"Increment color temperature":"Увеличение цветовой температуры","Increment percentage":"Увеличение процентного значения","Increment target temperature":"Повышение целевой температуры",Indicators:NRt,"JS function like":"JS функционирует как","Linked devices":"Linked devices",Name:zRt,Names:HRt,"New folder":"Новая папка",OK:FRt,Off:WRt,Ok:YRt,On:BRt,"Please confirm...":"Пожалуйста подтвердите...","Read function":"Читать","Read lock state":"Чтение состояния замка",Readable:VRt,Refresh:URt,Required:qRt,Role:GRt,Room:JRt,Rooms:KRt,Root:XRt,Save:ZRt,"Select ID":"Выбор ID",'Select for "%s"':'Выбрать для "%s"',"Select predefined icon":"Выберите предопределенный значок",Selected:QRt,"Set color":"Установить цвет","Set color temperature":"Установить цветовую температуру","Set lock state":"Установить состояние замка","Set percentage":"Установить процент","Set target temperature":"Установить целевую температуру","Show expert settings":"Показать экспертные настройки","Show hide indicators":"Показать / скрыть индикаторы","Show only aliases":"Показывать только псевдонимы","Smart name":"Smart имя",States:eNt,Step:tNt,'Supported by "%s"':'Поддерживается "%s"',"Supported by %s":"Поддерживается %s","The list of devices to copy is empty":"Список копируемых устройств пуст","This name will use be in smart assistance. (optional)":"Это имя будет использоваться в умных помощниках. (по желанию)",Title:nNt,"Turn off":"Выкл","Turn on":"Вкл",Type:rNt,Types:oNt,Unit:sNt,"Use different states for read and write":"Использовать разные состояния для чтения и записи","Use one state for read and write":"Использовать одно состояние для чтения и записи",Value:iNt,"Value=>String":"Отображение значения в строку",Writable:aNt,Write:lNt,"Write function":"Писать","You can drag & drop device":"Вы можете перетащить устройство",alias_read:cNt,alias_write:dNt,alive:uNt,auto_detected_empty_info:pNt,boolean:hNt,"cloning method":"Структура папок","do not import devices without category":"не импортировать устройства без категории",file:mNt,filter_customs:fNt,filter_func:_Nt,filter_id:gNt,filter_name:yNt,filter_role:wNt,filter_room:vNt,filter_type:bNt,flat:xNt,functions:SNt,no_group:CNt,number:kNt,rooms:TNt,string:MNt,"Toggle split screen":"Переключить разделённый экран",tooltip_ack:$Nt,tooltip_copyState:ENt,tooltip_customConfig:DNt,tooltip_deleteObject:LNt,tooltip_editObject:INt,tooltip_editState:ONt,tooltip_from:jNt,tooltip_lc:ANt,tooltip_quality:PNt,tooltip_ts:RNt,tooltip_user:NNt,tooltip_value:zNt},FNt="Adicionar",WNt="Aplicar",YNt="Cancelar",BNt="Perto",VNt="Cor",UNt="Crio",qNt="Excluir",GNt="Dispositivo",JNt="Dispositivos",KNt="Editar",XNt="Ativado",ZNt="Execução",QNt="Filtro",ezt="Funções",tzt="Em geral",nzt="IDs",rzt="Ícone",ozt="ID",szt="Importar",izt="Importador",azt="Indicadores",lzt="Nome",czt="Nomes",dzt="OK",uzt="Fora",pzt="Ok",hzt="Em",mzt="Legível",fzt="Atualizar",_zt="Obrigatório",gzt="Função",yzt="Sala",wzt="quartos",vzt="Raiz",bzt="Salve ",xzt="Selecionado",Szt="Estados",Czt="Etapa",kzt="Título",Tzt="Modelo",Mzt="Tipos",$zt="Unidade",Ezt="Valor",Dzt="Gravável",Lzt="Escreva",Izt="ler",Ozt="escrever",jzt="vivo",Azt="Você deve adicionar os dispositivos às categorias de sala ou função para que eles sejam detectados automaticamente",Pzt="boleano",Rzt="Arquivo",Nzt="Definições",zzt="Função",Hzt="ID",Fzt="Nome",Wzt="Função",Yzt="Sala",Bzt="Tipo",Vzt="nenhuma estrutura",Uzt="funções",qzt="Nenhum grupo",Gzt="número",Jzt="quartos",Kzt="fragmento",Xzt="Reconhecido",Zzt="Copiar valor do estado para a área de transferência",Qzt="Definições",eHt="Excluir objeto",tHt="Editar objeto",nHt="Modificar valor do estado",rHt="Fonte",oHt="Hora da última alteração",sHt="Qualidade",iHt="Carimbo de hora",aHt="Do utilizador",lHt="Valor",cHt={Add:FNt,'Add new folder to "%s"':'Adicione nova pasta a "%s"',"Add state":"Adicionar estado","Add to root":"Adicionar à raiz",Apply:WNt,"Automatically detected":"Dispositivos nativos",Cancel:YNt,Close:BNt,"Collapse all nodes":"Recolher todas as pastas",Color:VNt,"Copy device":"Copiar dispositivo","Copy device into aliases":"Copiar dispositivo para aliases",Create:UNt,"Create new device":"Criar novo dispositivo","Create new device with Aliases":"Crie um novo dispositivo com aliases","Create new device with LinkedDevices":"Crie um novo dispositivo com o LinkedDevices","Create new folder":"Criar nova pasta","Create new folder in root":"Crie uma nova pasta no diretório raiz","Decrement color temperature":"Temperatura de cor decrescente","Decrement percentage":"Percentual de decréscimo","Decrement target temperature":"Temperatura alvo de descida",Delete:qNt,"Delete device with all states":"Excluir dispositivo com todos os estados","Delete folder":"Apagar pasta","Delete state":"Apagar estado",Device:GNt,"Device and all states will be deleted. Are you sure?":"O dispositivo e todos os estados serão excluídos. Tem certeza?","Device name":"Nome do dispositivo","Device type":"Tipo de dispositivo",Devices:JNt,"Drag to resize":"Arraste para redimensionar","Drop or select a device to configure":"Arraste ou selecione um dispositivo para configurar","Disable smart":'Desative a funcionalidade "inteligente"',"Do not show dialog for 5 minutes":"Não mostra a caixa de diálogo por 5 minutos",Edit:KNt,"Edit convert functions":"Editar funções de conversão","Edit device":"Editar dispositivo","Edit folder":"Editar propriedades da pasta","Edit folder %s":'Editar pasta "%s"','Edit name "%s"':'Editar o nome "%s"',"Edit name and other properties":"Editar nome e outras propriedades","Edit read/write functions":"Editar funções de leitura / gravação","Edit state":"Editar estado","Edit state %s":"Editar estado %s","Edit states":"Editar estados","Enable or disable device":"Ativar ou desativar dispositivo",Enabled:XNt,Execution:ZNt,"Expand all nodes":"Expanda todas as pastas",Filter:QNt,"Folder name":"Nome da pasta","Folder will be deleted. Are you sure?":"A pasta será excluída. Tem certeza?",Function:"Função",Functions:ezt,General:tzt,"Get actual temperature":"Obter temperatura real","Get target temperature":"Obter temperatura alvo","Hide info devices":"Ocultar dispositivos de informação","Hide this name from smart assistance":"Ocultar este nome da assistência inteligente",IDs:nzt,Icon:rzt,Id:ozt,Import:szt,"Import state":"Estado de importação",Importer:izt,"Increment color temperature":"Incremento da temperatura de cor","Increment percentage":"Percentual de incremento","Increment target temperature":"Temperatura alvo de incremento",Indicators:azt,"JS function like":"Função JS como","Linked devices":"Linked devices",Name:lzt,Names:czt,"New folder":"Nova pasta",OK:dzt,Off:uzt,Ok:pzt,On:hzt,"Please confirm...":"Por favor confirme...","Read function":"Leitura","Read lock state":"Estado de bloqueio de leitura",Readable:mzt,Refresh:fzt,Required:_zt,Role:gzt,Room:yzt,Rooms:wzt,Root:vzt,Save:bzt,"Select ID":"Selecionar ID",'Select for "%s"':'Selecione para "%s"',"Select predefined icon":"Selecione o ícone predefinido",Selected:xzt,"Set color":"Definir cor","Set color temperature":"Definir temperatura de cor","Set lock state":"Definir estado de bloqueio","Set percentage":"Definir porcentagem","Set target temperature":"Definir temperatura alvo","Show expert settings":"Mostrar configurações de especialistas","Show hide indicators":"Mostrar / ocultar indicadores","Show only aliases":"Mostrar apenas aliases","Smart name":"Nome inteligente",States:Szt,Step:Czt,'Supported by "%s"':'Suportado por "%s"',"Supported by %s":"Suportado por %s","The list of devices to copy is empty":"A lista de dispositivos para copiar está vazia","This name will use be in smart assistance. (optional)":"Este nome será usado na assistência inteligente. (opcional)",Title:kzt,"Turn off":"Desligar","Turn on":"Ligar",Type:Tzt,Types:Mzt,Unit:$zt,"Use different states for read and write":"Use estados diferentes para ler e escrever","Use one state for read and write":"Use um estado para leitura e gravação",Value:Ezt,"Value=>String":"Mapeamento do valor para string",Writable:Dzt,Write:Lzt,"Write function":"Escreva","You can drag & drop device":"Você pode arrastar e soltar o dispositivo",alias_read:Izt,alias_write:Ozt,alive:jzt,auto_detected_empty_info:Azt,boolean:Pzt,"cloning method":"Estrutura em","do not import devices without category":"não importe dispositivos sem categoria",file:Rzt,filter_customs:Nzt,filter_func:zzt,filter_id:Hzt,filter_name:Fzt,filter_role:Wzt,filter_room:Yzt,filter_type:Bzt,flat:Vzt,functions:Uzt,no_group:qzt,number:Gzt,rooms:Jzt,string:Kzt,"Toggle split screen":"Alternar tela dividida",tooltip_ack:Xzt,tooltip_copyState:Zzt,tooltip_customConfig:Qzt,tooltip_deleteObject:eHt,tooltip_editObject:tHt,tooltip_editState:nHt,tooltip_from:rHt,tooltip_lc:oHt,tooltip_quality:sHt,tooltip_ts:iHt,tooltip_user:aHt,tooltip_value:lHt},dHt="Toevoegen",uHt="Van toepassing zijn",pHt="annuleren",hHt="Dichtbij",mHt="Kleur",fHt="Aanmaken",_Ht="Verwijderen",gHt="Apparaat",yHt="Apparaten",wHt="Bewerk",vHt="Ingeschakeld",bHt="Uitvoering",xHt="Filter",SHt="functies",CHt="Algemeen",kHt="IDs",THt="Icoon",MHt="ID",$Ht="Importeren",EHt="Importeur",DHt="Indicatoren",LHt="Naam",IHt="namen",OHt="OK",jHt="Uit",AHt="OK",PHt="Op",RHt="Leesbaar",NHt="Vernieuwen",zHt="Verplicht",HHt="Rol",FHt="Kamer",WHt="kamers",YHt="Wortel",BHt="Sparen",VHt="Geselecteerd",UHt="Staten",qHt="Stap",GHt="Titel",JHt="Type",KHt="Types",XHt="Eenheid",ZHt="Waarde",QHt="Beschrijfbaar",eFt="Schrijven",tFt="lezen",nFt="schrijven",rFt="levend",oFt="U moet de apparaten toevoegen aan kamer- of functiecategorieën om de apparaten automatisch te laten detecteren",sFt="booleaans",iFt="het dossier",aFt="Instellingen",lFt="Functie",cFt="ID",dFt="Naam",uFt="Rol",pFt="Kamer",hFt="Type",mFt="geen structuur",fFt="functies",_Ft="Geen groep",gFt="aantal",yFt="kamers",wFt="draad",vFt="Erkend",bFt="Kopieer de statuswaarde naar het klembord",xFt="Instellingen",SFt="Object verwijderen",CFt="Object bewerken",kFt="Wijzig de statuswaarde",TFt="Bron",MFt="Tijdstip laatste wijziging",$Ft="Kwaliteit",EFt="Tijdstempel",DFt="Gebruiker",LFt="Waarde",IFt={Add:dHt,'Add new folder to "%s"':'Nieuwe map toevoegen aan "%s"',"Add state":"Staat toevoegen","Add to root":"Toevoegen aan root",Apply:uHt,"Automatically detected":"Native apparaten",Cancel:pHt,Close:hHt,"Collapse all nodes":"Alle mappen samenvouwen",Color:mHt,"Copy device":"Kopieer apparaat","Copy device into aliases":"Kopieer het apparaat naar aliassen",Create:fHt,"Create new device":"Maak een nieuw apparaat","Create new device with Aliases":"Maak een nieuw apparaat met aliassen","Create new device with LinkedDevices":"Maak een nieuw apparaat met LinkedDevices","Create new folder":"Nieuwe map maken","Create new folder in root":"Maak een nieuwe map in de hoofdmap","Decrement color temperature":"Verlaging kleurtemperatuur","Decrement percentage":"Verlagingspercentage","Decrement target temperature":"Doeltemperatuur verlagen",Delete:_Ht,"Delete device with all states":"Verwijder apparaat met alle statussen","Delete folder":"Verwijder map","Delete state":"Status verwijderen",Device:gHt,"Device and all states will be deleted. Are you sure?":"Apparaat en alle statussen worden verwijderd. Weet je het zeker?","Device name":"Toestelnaam","Device type":"Soort apparaat",Devices:yHt,"Drag to resize":"Sleep om de grootte te wijzigen","Drop or select a device to configure":"Sleep of selecteer een apparaat om te configureren","Disable smart":'Schakel "slimme" functionaliteit uit',"Do not show dialog for 5 minutes":"Dialoogvenster gedurende 5 minuten niet weergeven",Edit:wHt,"Edit convert functions":"Bewerk conversiefuncties","Edit device":"Apparaat bewerken","Edit folder":"Mapeigenschappen bewerken","Edit folder %s":'Map bewerken "%s"','Edit name "%s"':"Naam '%s' bewerken","Edit name and other properties":"Naam en andere eigenschappen bewerken","Edit read/write functions":"Lees-/schrijffuncties bewerken","Edit state":"Bewerkingsstatus","Edit state %s":"Bewerk staat %s","Edit states":"Bewerk staten","Enable or disable device":"Apparaat in- of uitschakelen",Enabled:vHt,Execution:bHt,"Expand all nodes":"Vouw alle mappen uit",Filter:xHt,"Folder name":"Naam van de map","Folder will be deleted. Are you sure?":"Map wordt verwijderd. Weet je het zeker?",Function:"Functie",Functions:SHt,General:CHt,"Get actual temperature":"Krijg de werkelijke temperatuur","Get target temperature":"Krijg doeltemperatuur","Hide info devices":"Info-apparaten verbergen","Hide this name from smart assistance":"Deze naam verbergen voor slimme assistentie",IDs:kHt,Icon:THt,Id:MHt,Import:$Ht,"Import state":"Importstatus",Importer:EHt,"Increment color temperature":"Verhoog de kleurtemperatuur","Increment percentage":"Verhogen percentage","Increment target temperature":"Verhoog de doeltemperatuur",Indicators:DHt,"JS function like":"JS-functie zoals","Linked devices":"Linked devices",Name:LHt,Names:IHt,"New folder":"Nieuwe map",OK:OHt,Off:jHt,Ok:AHt,On:PHt,"Please confirm...":"Bevestig alstublieft...","Read function":"Lezen","Read lock state":"Lees vergrendelde status",Readable:RHt,Refresh:NHt,Required:zHt,Role:HHt,Room:FHt,Rooms:WHt,Root:YHt,Save:BHt,"Select ID":"Selecteer ID",'Select for "%s"':'Selecteer voor "%s"',"Select predefined icon":"Selecteer voorgedefinieerd pictogram",Selected:VHt,"Set color":"Kleur instellen","Set color temperature":"Stel de kleurtemperatuur in","Set lock state":"Stel de vergrendelingsstatus in","Set percentage":"Percentage instellen","Set target temperature":"Stel de doeltemperatuur in","Show expert settings":"Toon expertinstellingen","Show hide indicators":"Toon / verberg indicatoren","Show only aliases":"Toon alleen aliassen","Smart name":"Slimme naam",States:UHt,Step:qHt,'Supported by "%s"':'Ondersteund door "%s"',"Supported by %s":"Ondersteund door %s","The list of devices to copy is empty":"De lijst met te kopiëren apparaten is leeg","This name will use be in smart assistance. (optional)":"Deze naam wordt gebruikt in slimme assistentie. (optioneel)",Title:GHt,"Turn off":"Uitschakelen","Turn on":"Aanzetten",Type:JHt,Types:KHt,Unit:XHt,"Use different states for read and write":"Gebruik verschillende statussen voor lezen en schrijven","Use one state for read and write":"Gebruik één staat voor lezen en schrijven",Value:ZHt,"Value=>String":"Toewijzing van de waarde aan een tekenreeks",Writable:QHt,Write:eFt,"Write function":"Schrijven","You can drag & drop device":"U kunt het apparaat slepen en neerzetten",alias_read:tFt,alias_write:nFt,alive:rFt,auto_detected_empty_info:oFt,boolean:sFt,"cloning method":"Structuur aan","do not import devices without category":"importeer geen apparaten zonder categorie",file:iFt,filter_customs:aFt,filter_func:lFt,filter_id:cFt,filter_name:dFt,filter_role:uFt,filter_room:pFt,filter_type:hFt,flat:mFt,functions:fFt,no_group:_Ft,number:gFt,rooms:yFt,string:wFt,"Toggle split screen":"Gesplitst scherm wisselen",tooltip_ack:vFt,tooltip_copyState:bFt,tooltip_customConfig:xFt,tooltip_deleteObject:SFt,tooltip_editObject:CFt,tooltip_editState:kFt,tooltip_from:TFt,tooltip_lc:MFt,tooltip_quality:$Ft,tooltip_ts:EFt,tooltip_user:DFt,tooltip_value:LFt},OFt="Ajouter",jFt="Appliquer",AFt="Annuler",PFt="Fermer",RFt="Couleur",NFt="Créer",zFt="Effacer",HFt="Dispositif",FFt="Dispositifs",WFt="Éditer",YFt="Activé",BFt="Exécution",VFt="Filtre",UFt="Les fonctions",qFt="Général",GFt="Identifiants",JFt="Icône",KFt="ID",XFt="Importer",ZFt="Importateur",QFt="Indicateurs",eWt="Nom",tWt="Noms",nWt="OK",rWt="De",oWt="D'accord",sWt="Sur",iWt="Lisible",aWt="Rafraîchir",lWt="Obligatoire",cWt="Rôle",dWt="Pièce",uWt="Pièces",pWt="Racine",hWt="Sauvegarder",mWt="Choisi",fWt="États",_Wt="Étape",gWt="Titre",yWt="Taper",wWt="Les types",vWt="Unité",bWt="Valeur",xWt="Écriture",SWt="Écrivez",CWt="lire",kWt="écrire",TWt="vivant",MWt="Vous devez ajouter les appareils aux catégories de pièces ou de fonctions pour permettre la détection automatique des appareils.",$Wt="booléen",EWt="déposer",DWt="Réglages",LWt="Une fonction",IWt="ID",OWt="Nom",jWt="Rôle",AWt="Chambre",PWt="Type",RWt="pas de structure",NWt="les fonctions",zWt="Pas de groupe",HWt="numéro",FWt="pièces",WWt="chaîne",YWt="Reconnu",BWt="Copier la valeur de l'état dans le presse-papiers",VWt="Réglages",UWt="Supprimer un objet",qWt="Modifier l'objet",GWt="Modifier la valeur de l'état",JWt="La source",KWt="Heure du dernier changement",XWt="Qualité",ZWt="Horodatage",QWt="Utilisateur",eYt="Valeur",tYt={Add:OFt,'Add new folder to "%s"':'Ajouter un nouveau dossier à "%s"',"Add state":"Ajouter un état","Add to root":"Ajouter à la racine",Apply:jFt,"Automatically detected":"Appareils natifs",Cancel:AFt,Close:PFt,"Collapse all nodes":"Réduire tous les dossiers",Color:RFt,"Copy device":"Copier l'appareil","Copy device into aliases":"Copier l'appareil dans des alias",Create:NFt,"Create new device":"Créer un nouveau périphérique","Create new device with Aliases":"Créer un nouvel appareil avec des alias","Create new device with LinkedDevices":"Créer un nouveau périphérique avec LinkedDevices","Create new folder":"Créer un nouveau dossier","Create new folder in root":"Créer un nouveau dossier dans le répertoire racine","Decrement color temperature":"Décrémenter la température de couleur","Decrement percentage":"Pourcentage de décrémentation","Decrement target temperature":"Décrémenter la température cible",Delete:zFt,"Delete device with all states":"Supprimer le périphérique avec tous les états","Delete folder":"Supprimer le dossier","Delete state":"Supprimer l'état",Device:HFt,"Device and all states will be deleted. Are you sure?":"L'appareil et tous les états seront supprimés. Êtes-vous sûr?","Device name":"Nom de l'appareil","Device type":"Type d'appareil",Devices:FFt,"Drag to resize":"Glisser pour redimensionner","Drop or select a device to configure":"Glissez ou sélectionnez un appareil à configurer","Disable smart":'Désactiver la fonctionnalité "intelligente"',"Do not show dialog for 5 minutes":"Ne pas afficher la boîte de dialogue pendant 5 minutes",Edit:WFt,"Edit convert functions":"Modifier les fonctions de conversion","Edit device":"Editer l'appareil","Edit folder":"Modifier les propriétés du dossier","Edit folder %s":'Modifier le dossier "%s"','Edit name "%s"':'Modifier le nom "%s"',"Edit name and other properties":"Editer le nom et autres propriétés","Edit read/write functions":"Modifier les fonctions de lecture/écriture","Edit state":"Modifier l'état","Edit state %s":"Modifier l'état %s","Edit states":"Editer les états","Enable or disable device":"Activer ou désactiver l'appareil",Enabled:YFt,Execution:BFt,"Expand all nodes":"Développer tous les dossiers",Filter:VFt,"Folder name":"Nom de dossier","Folder will be deleted. Are you sure?":"Le dossier sera supprimé. Êtes-vous sûr?",Function:"Une fonction",Functions:UFt,General:qFt,"Get actual temperature":"Obtenir la température réelle","Get target temperature":"Obtenir la température cible","Hide info devices":"Masquer les dispositifs d'information","Hide this name from smart assistance":"Masquer ce nom de l'assistance intelligente",IDs:GFt,Icon:JFt,Id:KFt,Import:XFt,"Import state":"État d'importation",Importer:ZFt,"Increment color temperature":"Incrément de température de couleur","Increment percentage":"Pourcentage d'incrément","Increment target temperature":"Augmenter la température cible",Indicators:QFt,"JS function like":"Fonction JS comme","Linked devices":"Linked devices",Name:eWt,Names:tWt,"New folder":"Nouveau dossier",OK:nWt,Off:rWt,Ok:oWt,On:sWt,"Please confirm...":"Veuillez confirmer...","Read function":"Lis","Read lock state":"État verrouillé",Readable:iWt,Refresh:aWt,Required:lWt,Role:cWt,Room:dWt,Rooms:uWt,Root:pWt,Save:hWt,"Select ID":"Sélectionnez ID",'Select for "%s"':'Sélectionnez pour "%s"',"Select predefined icon":"Sélectionnez l'icône prédéfinie",Selected:mWt,"Set color":"Définir la couleur","Set color temperature":"Régler la température de couleur","Set lock state":"Définir l'état de verrouillage","Set percentage":"Définir le pourcentage","Set target temperature":"Définir la température cible","Show expert settings":"Afficher les paramètres experts","Show hide indicators":"Afficher / masquer les indicateurs","Show only aliases":"Afficher uniquement les alias","Smart name":"Nom intelligent",States:fWt,Step:_Wt,'Supported by "%s"':'Pris en charge par "%s"',"Supported by %s":"Soutenu par %s","The list of devices to copy is empty":"La liste des appareils à copier est vide","This name will use be in smart assistance. (optional)":"Ce nom sera utilisé dans l'assistance intelligente. (optionnel)",Title:gWt,"Turn off":"Éteindre","Turn on":"Allumer",Type:yWt,Types:wWt,Unit:vWt,"Use different states for read and write":"Utiliser des états différents pour la lecture et l'écriture","Use one state for read and write":"Utiliser un état pour la lecture et l'écriture",Value:bWt,"Value=>String":"Mappage de la valeur à la chaîne",Writable:xWt,Write:SWt,"Write function":"Écrivez","You can drag & drop device":"Vous pouvez glisser-déposer l'appareil",alias_read:CWt,alias_write:kWt,alive:TWt,auto_detected_empty_info:MWt,boolean:$Wt,"cloning method":"Structurer sur","do not import devices without category":"n'importez pas d'appareils sans catégorie",file:EWt,filter_customs:DWt,filter_func:LWt,filter_id:IWt,filter_name:OWt,filter_role:jWt,filter_room:AWt,filter_type:PWt,flat:RWt,functions:NWt,no_group:zWt,number:HWt,rooms:FWt,string:WWt,"Toggle split screen":"Basculer l'écran partagé",tooltip_ack:YWt,tooltip_copyState:BWt,tooltip_customConfig:VWt,tooltip_deleteObject:UWt,tooltip_editObject:qWt,tooltip_editState:GWt,tooltip_from:JWt,tooltip_lc:KWt,tooltip_quality:XWt,tooltip_ts:ZWt,tooltip_user:QWt,tooltip_value:eYt},nYt="Inserisci",rYt="Applicare",oYt="Annulla",sYt="Vicino",iYt="Colore",aYt="Creare",lYt="Elimina",cYt="Dispositivo",dYt="dispositivi",uYt="modificare",pYt="Abilitato",hYt="Esecuzione",mYt="Filtro",fYt="funzioni",_Yt="Generale",gYt="ID",yYt="Icona",wYt="ID",vYt="Importare",bYt="Importatore",xYt="Indicatori",SYt="Nome",CYt="nomi",kYt="OK",TYt="via",MYt="Ok",$Yt="Sopra",EYt="Leggibile",DYt="ricaricare",LYt="necessario",IYt="Ruolo",OYt="Camera",jYt="Camere",AYt="Radice",PYt="Salva",RYt="Selezionato",NYt="stati",zYt="Fare un passo",HYt="Titolo",FYt="genere",WYt="tipi",YYt="Unità",BYt="Valore",VYt="scrivibile",UYt="Scrivi",qYt="Leggere",GYt="scrivere",JYt="vivo",KYt="È necessario aggiungere i dispositivi alle categorie di stanza o funzione per consentire il rilevamento automatico dei dispositivi",XYt="booleano",ZYt="file",QYt="impostazioni",eBt="Funzione",tBt="ID",nBt="Nome",rBt="Ruolo",oBt="Camera",sBt="genere",iBt="nessuna struttura",aBt="funzioni",lBt="Nessun gruppo",cBt="numero",dBt="camere",uBt="corda",pBt="Riconosciuto",hBt="Copia il valore dello stato negli appunti",mBt="impostazioni",fBt="Elimina oggetto",_Bt="Modifica oggetto",gBt="Modifica il valore dello stato",yBt="fonte",wBt="Ora dell'ultimo cambio",vBt="Qualità",bBt="Timestamp",xBt="Utente",SBt="Valore",CBt={Add:nYt,'Add new folder to "%s"':'Aggiungi nuova cartella a "%s"',"Add state":"Aggiungi stato","Add to root":"Aggiungi alla radice",Apply:rYt,"Automatically detected":"Dispositivi nativi",Cancel:oYt,Close:sYt,"Collapse all nodes":"Comprimi tutte le cartelle",Color:iYt,"Copy device":"Dispositivo di copia","Copy device into aliases":"Copia il dispositivo negli alias",Create:aYt,"Create new device":"Crea un nuovo dispositivo","Create new device with Aliases":"Crea un nuovo dispositivo con gli alias","Create new device with LinkedDevices":"Crea un nuovo dispositivo con LinkedDevices","Create new folder":"Crea una nuova cartella","Create new folder in root":"Crea una nuova cartella nella directory principale","Decrement color temperature":"Ridurre la temperatura del colore","Decrement percentage":"Percentuale di decremento","Decrement target temperature":"Ridurre la temperatura target",Delete:lYt,"Delete device with all states":"Elimina dispositivo con tutti gli stati","Delete folder":"Elimina cartella","Delete state":"Elimina stato",Device:cYt,"Device and all states will be deleted. Are you sure?":"Il dispositivo e tutti gli stati verranno eliminati. Sei sicuro?","Device name":"Nome del dispositivo","Device type":"Tipo di dispositivo",Devices:dYt,"Drag to resize":"Trascina per ridimensionare","Drop or select a device to configure":"Trascina o seleziona un dispositivo da configurare","Disable smart":'Disabilita la funzionalità "intelligente"',"Do not show dialog for 5 minutes":"Non mostrare la finestra di dialogo per 5 minuti",Edit:uYt,"Edit convert functions":"Modifica funzioni di conversione","Edit device":"Modifica dispositivo","Edit folder":"Modifica le proprietà della cartella","Edit folder %s":'Modifica cartella "%s"','Edit name "%s"':'Modifica nome "%s"',"Edit name and other properties":"Modifica nome e altre proprietà","Edit read/write functions":"Modifica funzioni di lettura/scrittura","Edit state":"Modifica stato","Edit state %s":"Modifica stato %s","Edit states":"Modifica stati","Enable or disable device":"Attiva o disattiva il dispositivo",Enabled:pYt,Execution:hYt,"Expand all nodes":"Espandi tutte le cartelle",Filter:mYt,"Folder name":"Nome della cartella","Folder will be deleted. Are you sure?":"La cartella verrà eliminata. Sei sicuro?",Function:"Funzione",Functions:fYt,General:_Yt,"Get actual temperature":"Ottieni la temperatura effettiva","Get target temperature":"Ottieni la temperatura target","Hide info devices":"Nascondi i dispositivi informativi","Hide this name from smart assistance":"Nascondi questo nome dall'assistenza intelligente",IDs:gYt,Icon:yYt,Id:wYt,Import:vYt,"Import state":"Stato di importazione",Importer:bYt,"Increment color temperature":"Aumenta la temperatura del colore","Increment percentage":"Percentuale di incremento","Increment target temperature":"Aumentare la temperatura target",Indicators:xYt,"JS function like":"Funzione JS come","Linked devices":"Linked devices",Name:SYt,Names:CYt,"New folder":"Nuova cartella",OK:kYt,Off:TYt,Ok:MYt,On:$Yt,"Please confirm...":"Si prega di confermare...","Read function":"Leggere","Read lock state":"Leggi lo stato di blocco",Readable:EYt,Refresh:DYt,Required:LYt,Role:IYt,Room:OYt,Rooms:jYt,Root:AYt,Save:PYt,"Select ID":"Seleziona ID",'Select for "%s"':'Seleziona per "%s"',"Select predefined icon":"Seleziona l'icona predefinita",Selected:RYt,"Set color":"Imposta il colore","Set color temperature":"Imposta la temperatura del colore","Set lock state":"Imposta lo stato di blocco","Set percentage":"Imposta percentuale","Set target temperature":"Imposta la temperatura target","Show expert settings":"Mostra impostazioni avanzate","Show hide indicators":"Mostra / nascondi indicatori","Show only aliases":"Mostra solo alias","Smart name":"Nome intelligente",States:NYt,Step:zYt,'Supported by "%s"':'Supportato da "%s"',"Supported by %s":"Supportato da %s","The list of devices to copy is empty":"L'elenco dei dispositivi da copiare è vuoto","This name will use be in smart assistance. (optional)":"Questo nome verrà utilizzato nell'assistenza intelligente. (opzionale)",Title:HYt,"Turn off":"Spegni","Turn on":"Accendere",Type:FYt,Types:WYt,Unit:YYt,"Use different states for read and write":"Usa stati differenti per la lettura e la scrittura","Use one state for read and write":"Utilizzare uno stato per la lettura e la scrittura",Value:BYt,"Value=>String":"Mappatura del valore in stringa",Writable:VYt,Write:UYt,"Write function":"Scrivi","You can drag & drop device":"Puoi trascinare e rilasciare il dispositivo",alias_read:qYt,alias_write:GYt,alive:JYt,auto_detected_empty_info:KYt,boolean:XYt,"cloning method":"Struttura attiva","do not import devices without category":"non importare dispositivi senza categoria",file:ZYt,filter_customs:QYt,filter_func:eBt,filter_id:tBt,filter_name:nBt,filter_role:rBt,filter_room:oBt,filter_type:sBt,flat:iBt,functions:aBt,no_group:lBt,number:cBt,rooms:dBt,string:uBt,"Toggle split screen":"Attiva/disattiva schermo diviso",tooltip_ack:pBt,tooltip_copyState:hBt,tooltip_customConfig:mBt,tooltip_deleteObject:fBt,tooltip_editObject:_Bt,tooltip_editState:gBt,tooltip_from:yBt,tooltip_lc:wBt,tooltip_quality:vBt,tooltip_ts:bBt,tooltip_user:xBt,tooltip_value:SBt},kBt="Agregar",TBt="Solicitar",MBt="Cancelar",$Bt="Cerca",EBt="Color",DBt="Crear",LBt="Borrar",IBt="Dispositivo",OBt="Dispositivos",jBt="Editar",ABt="Habilitado",PBt="Ejecución",RBt="Filtrar",NBt="Las funciones",zBt="General",HBt="IDs",FBt="Icono",WBt="ID",YBt="Importar",BBt="Importador",VBt="Indicadores",UBt="Nombre",qBt="Nombres",GBt="Okay",JBt="Apagado",KBt="Okay",XBt="En",ZBt="Legible",QBt="Actualizar",eVt="Requerido",tVt="Papel",nVt="Habitación",rVt="Habitaciones",oVt="Raíz",sVt="Ahorrar",iVt="Seleccionado",aVt="Estados",lVt="Paso",cVt="Título",dVt="Tipo",uVt="Tipos",pVt="Unidad",hVt="Valor",mVt="Escribible",fVt="Escribir",_Vt="leer",gVt="escribir",yVt="viva",wVt="Debe agregar los dispositivos a categorías de sala o función para permitir que se detecten automáticamente",vVt="booleano",bVt="expediente",xVt="Configuraciones",SVt="Función",CVt="ID",kVt="Nombre",TVt="Papel",MVt="Habitación",$Vt="Tipo",EVt="sin estructura",DVt="funciones",LVt="No grupo",IVt="número",OVt="habitaciones",jVt="cuerda",AVt="Admitido",PVt="Copiar el valor del estado en el portapapeles",RVt="Configuraciones",NVt="Eliminar objeto",zVt="Editar objeto",HVt="Modificar valor de estado",FVt="Fuente",WVt="Última hora de cambio",YVt="Calidad",BVt="Sello de tiempo",VVt="Usuario",UVt="Valor",qVt={Add:kBt,'Add new folder to "%s"':'Agregar nueva carpeta a "%s"',"Add state":"Agregar estado","Add to root":"Agregar a la raíz",Apply:TBt,"Automatically detected":"Dispositivos nativos",Cancel:MBt,Close:$Bt,"Collapse all nodes":"Contraer todas las carpetas",Color:EBt,"Copy device":"Copiar dispositivo","Copy device into aliases":"Copiar dispositivo en alias",Create:DBt,"Create new device":"Crear nuevo dispositivo","Create new device with Aliases":"Crear nuevo dispositivo con alias","Create new device with LinkedDevices":"Crea un nuevo dispositivo con LinkedDevices","Create new folder":"Crear nueva carpeta","Create new folder in root":"Crear nueva carpeta en el directorio raíz","Decrement color temperature":"Disminuya la temperatura de color","Decrement percentage":"Porcentaje de disminución","Decrement target temperature":"Disminuya la temperatura objetivo",Delete:LBt,"Delete device with all states":"Eliminar dispositivo con todos los estados","Delete folder":"Eliminar carpeta","Delete state":"Eliminar estado",Device:IBt,"Device and all states will be deleted. Are you sure?":"Se eliminarán el dispositivo y todos los estados. ¿Está seguro?","Device name":"Nombre del dispositivo","Device type":"Tipo de dispositivo",Devices:OBt,"Drag to resize":"Arrastrar para redimensionar","Drop or select a device to configure":"Arrastra o selecciona un dispositivo para configurar","Disable smart":'Deshabilitar la funcionalidad "inteligente"',"Do not show dialog for 5 minutes":"No mostrar el diálogo durante 5 minutos",Edit:jBt,"Edit convert functions":"Editar funciones de conversión","Edit device":"Editar dispositivo","Edit folder":"Editar propiedades de carpeta","Edit folder %s":'Editar carpeta "%s"','Edit name "%s"':'Editar el nombre "%s"',"Edit name and other properties":"Editar nombre y otras propiedades","Edit read/write functions":"Editar funciones de lectura / escritura","Edit state":"Editar estado","Edit state %s":"Editar estado %s","Edit states":"Editar estados","Enable or disable device":"Activar o desactivar dispositivo",Enabled:ABt,Execution:PBt,"Expand all nodes":"Expandir todas las carpetas",Filter:RBt,"Folder name":"Nombre de la carpeta","Folder will be deleted. Are you sure?":"Se eliminará la carpeta. ¿Está seguro?",Function:"Función",Functions:NBt,General:zBt,"Get actual temperature":"Obtener temperatura actual","Get target temperature":"Obtener temperatura objetivo","Hide info devices":"Ocultar dispositivos de información","Hide this name from smart assistance":"Ocultar este nombre de la asistencia inteligente",IDs:HBt,Icon:FBt,Id:WBt,Import:YBt,"Import state":"Estado de importación",Importer:BBt,"Increment color temperature":"Incremento de temperatura de color","Increment percentage":"Porcentaje de incremento","Increment target temperature":"Incremento de temperatura objetivo",Indicators:VBt,"JS function like":"JS funciona como","Linked devices":"Linked devices",Name:UBt,Names:qBt,"New folder":"Nueva carpeta",OK:GBt,Off:JBt,Ok:KBt,On:XBt,"Please confirm...":"Por favor confirmar...","Read function":"Leer","Read lock state":"Leer estado de bloqueo",Readable:ZBt,Refresh:QBt,Required:eVt,Role:tVt,Room:nVt,Rooms:rVt,Root:oVt,Save:sVt,"Select ID":"Seleccionar ID",'Select for "%s"':'Seleccionar para "%s"',"Select predefined icon":"Seleccionar icono predefinido",Selected:iVt,"Set color":"Establecer color","Set color temperature":"Establecer temperatura de color","Set lock state":"Establecer estado de bloqueo","Set percentage":"Establecer porcentaje","Set target temperature":"Establecer temperatura objetivo","Show expert settings":"Mostrar configuración de experto","Show hide indicators":"Mostrar / ocultar indicadores","Show only aliases":"Mostrar solo alias","Smart name":"Nombre inteligente",States:aVt,Step:lVt,'Supported by "%s"':'Compatible con "%s"',"Supported by %s":"Con el apoyo de %s","The list of devices to copy is empty":"La lista de dispositivos para copiar está vacía","This name will use be in smart assistance. (optional)":"Este nombre se utilizará en la asistencia inteligente. (Opcional)",Title:cVt,"Turn off":"Apagar","Turn on":"Encender",Type:dVt,Types:uVt,Unit:pVt,"Use different states for read and write":"Utilice diferentes estados para lectura y escritura","Use one state for read and write":"Utilice un estado para leer y escribir",Value:hVt,"Value=>String":"Asignación del valor a la cadena",Writable:mVt,Write:fVt,"Write function":"Escribir","You can drag & drop device":"Puede arrastrar y soltar dispositivo",alias_read:_Vt,alias_write:gVt,alive:yVt,auto_detected_empty_info:wVt,boolean:vVt,"cloning method":"Estructura en","do not import devices without category":"No importar dispositivos sin categoría",file:bVt,filter_customs:xVt,filter_func:SVt,filter_id:CVt,filter_name:kVt,filter_role:TVt,filter_room:MVt,filter_type:$Vt,flat:EVt,functions:DVt,no_group:LVt,number:IVt,rooms:OVt,string:jVt,"Toggle split screen":"Alternar pantalla dividida",tooltip_ack:AVt,tooltip_copyState:PVt,tooltip_customConfig:RVt,tooltip_deleteObject:NVt,tooltip_editObject:zVt,tooltip_editState:HVt,tooltip_from:FVt,tooltip_lc:WVt,tooltip_quality:YVt,tooltip_ts:BVt,tooltip_user:VVt,tooltip_value:UVt},GVt="Dodaj",JVt="Zastosować",KVt="Odwołaj",XVt="Blisko",ZVt="Kolor",QVt="Stwórz",eUt="Kasować",tUt="Urządzenie",nUt="Urządzenia",rUt="Edytować",oUt="Włączone",sUt="Wykonanie",iUt="Filtr",aUt="Funkcje",lUt="Główne",cUt="ID",dUt="Ikona",uUt="ID",pUt="Import",hUt="Importer",mUt="Wskaźniki",fUt="Nazwa",_Ut="Nazwy",gUt="OK",yUt="Poza",wUt="Ok",vUt="Na",bUt="Czytelny",xUt="Odświeżać",SUt="wymagany",CUt="Rola",kUt="Pokój",TUt="Pokoje",MUt="Korzeń",$Ut="Zapisz",EUt="Wybrany",DUt="Stany",LUt="Krok",IUt="Tytuł",OUt="Typ",jUt="Rodzaje",AUt="Jednostka",PUt="Wartość",RUt="Zapisywalny",NUt="Pisać",zUt="Czytać",HUt="pisać",FUt="żywy",WUt="Aby umożliwić automatyczne wykrywanie urządzeń, należy dodać je do kategorii pomieszczeń lub funkcji",YUt="logiczne",BUt="plik",VUt="Ustawienia",UUt="Funkcja",qUt="ID",GUt="Nazwa",JUt="Rola",KUt="Pokój",XUt="Rodzaj",ZUt="brak struktury",QUt="Funkcje",eqt="Brak grupy",tqt="numer",nqt="pokoje",rqt="strunowy",oqt="Potwierdzono",sqt="Skopiuj wartość stanu do schowka",iqt="Ustawienia",aqt="Usuń obiekt",lqt="Edytuj obiekt",cqt="Zmodyfikuj wartość stanu",dqt="Źródło",uqt="Czas ostatniej zmiany",pqt="Jakość",hqt="Znak czasu",mqt="Użytkownik",fqt="Wartość",_qt={Add:GVt,'Add new folder to "%s"':"Dodaj nowy folder do „%s”","Add state":"Dodaj stan","Add to root":"Dodaj do katalogu głównego",Apply:JVt,"Automatically detected":"Urządzenia natywne",Cancel:KVt,Close:XVt,"Collapse all nodes":"Zwiń wszystkie foldery",Color:ZVt,"Copy device":"Kopiuj urządzenie","Copy device into aliases":"Skopiuj urządzenie do aliasów",Create:QVt,"Create new device":"Utwórz nowe urządzenie","Create new device with Aliases":"Utwórz nowe urządzenie za pomocą aliasów","Create new device with LinkedDevices":"Utwórz nowe urządzenie za pomocą LinkedDevices","Create new folder":"Stwórz nowy folder","Create new folder in root":"Utwórz nowy folder w katalogu głównym","Decrement color temperature":"Zmniejszenie temperatury barwowej","Decrement percentage":"Procent zmniejszenia","Decrement target temperature":"Zmniejszenie docelowej temperatury",Delete:eUt,"Delete device with all states":"Usuń urządzenie ze wszystkimi stanami","Delete folder":"Usunięty folder","Delete state":"Usuń stan",Device:tUt,"Device and all states will be deleted. Are you sure?":"Urządzenie i wszystkie stany zostaną usunięte. Jesteś pewny?","Device name":"Nazwa urządzenia","Device type":"Rodzaj urządzenia",Devices:nUt,"Drag to resize":"Przeciągnij, aby zmienić rozmiar","Drop or select a device to configure":"Przeciągnij lub wybierz urządzenie do skonfigurowania","Disable smart":'Wyłącz "inteligentną" funkcjonalność',"Do not show dialog for 5 minutes":"Nie pokazuj okna dialogowego przez 5 minut",Edit:rUt,"Edit convert functions":"Edytuj funkcje konwersji","Edit device":"Edytuj urządzenie","Edit folder":"Edytuj właściwości folderu","Edit folder %s":'Edytuj folder "%s"','Edit name "%s"':"Edytuj nazwę „%s”","Edit name and other properties":"Edytuj nazwę i inne właściwości","Edit read/write functions":"Edytuj funkcje odczytu/zapisu","Edit state":"Edytuj stan","Edit state %s":"Edytuj stan %s","Edit states":"Edytuj stany","Enable or disable device":"Włącz lub wyłącz urządzenie",Enabled:oUt,Execution:sUt,"Expand all nodes":"Rozwiń wszystkie foldery",Filter:iUt,"Folder name":"Nazwa folderu","Folder will be deleted. Are you sure?":"Folder zostanie usunięty. Jesteś pewny?",Function:"Funkcja",Functions:aUt,General:lUt,"Get actual temperature":"Uzyskaj rzeczywistą temperaturę","Get target temperature":"Uzyskaj docelową temperaturę","Hide info devices":"Ukryj urządzenia informacyjne","Hide this name from smart assistance":"Ukryj tę nazwę przed inteligentną pomocą",IDs:cUt,Icon:dUt,Id:uUt,Import:pUt,"Import state":"Stan importu",Importer:hUt,"Increment color temperature":"Zwiększ temperaturę barwową","Increment percentage":"Procent przyrostu","Increment target temperature":"Przyrostowa temperatura docelowa",Indicators:mUt,"JS function like":"Funkcja JS jak","Linked devices":"Linked devices",Name:fUt,Names:_Ut,"New folder":"Nowy folder",OK:gUt,Off:yUt,Ok:wUt,On:vUt,"Please confirm...":"Proszę potwierdzić...","Read function":"Czytać","Read lock state":"Odczyt stanu blokady",Readable:bUt,Refresh:xUt,Required:SUt,Role:CUt,Room:kUt,Rooms:TUt,Root:MUt,Save:$Ut,"Select ID":"Wybierz identyfikator",'Select for "%s"':"Wybierz dla „%s”","Select predefined icon":"Wybierz predefiniowaną ikonę",Selected:EUt,"Set color":"Ustaw kolor","Set color temperature":"Ustaw temperaturę barwową","Set lock state":"Ustaw stan blokady","Set percentage":"Ustaw procent","Set target temperature":"Ustaw temperaturę docelową","Show expert settings":"Pokaż ustawienia eksperckie","Show hide indicators":"Pokaż / ukryj wskaźniki","Show only aliases":"Pokaż tylko aliasy","Smart name":"Inteligentna nazwa",States:DUt,Step:LUt,'Supported by "%s"':"Obsługiwane przez „%s”","Supported by %s":"Obsługiwane przez %s","The list of devices to copy is empty":"Lista urządzeń do skopiowania jest pusta","This name will use be in smart assistance. (optional)":"Ta nazwa będzie używana w inteligentnej pomocy. (opcjonalny)",Title:IUt,"Turn off":"Wyłączyć","Turn on":"Włączyć",Type:OUt,Types:jUt,Unit:AUt,"Use different states for read and write":"Użyj różnych stanów do odczytu i zapisu","Use one state for read and write":"Użyj jednego stanu do odczytu i zapisu",Value:PUt,"Value=>String":"Mapowanie wartości na ciąg",Writable:RUt,Write:NUt,"Write function":"pisać","You can drag & drop device":"Możesz przeciągnąć i upuścić urządzenie",alias_read:zUt,alias_write:HUt,alive:FUt,auto_detected_empty_info:WUt,boolean:YUt,"cloning method":"Struktura włączona","do not import devices without category":"nie importuj urządzeń bez kategorii",file:BUt,filter_customs:VUt,filter_func:UUt,filter_id:qUt,filter_name:GUt,filter_role:JUt,filter_room:KUt,filter_type:XUt,flat:ZUt,functions:QUt,no_group:eqt,number:tqt,rooms:nqt,string:rqt,"Toggle split screen":"Przełącz podzielony ekran",tooltip_ack:oqt,tooltip_copyState:sqt,tooltip_customConfig:iqt,tooltip_deleteObject:aqt,tooltip_editObject:lqt,tooltip_editState:cqt,tooltip_from:dqt,tooltip_lc:uqt,tooltip_quality:pqt,tooltip_ts:hqt,tooltip_user:mqt,tooltip_value:fqt},gqt="додати",yqt="Застосувати",wqt="Скасувати",vqt="Закрити",bqt="колір",xqt="Створити",Sqt="Видалити",Cqt="пристрій",kqt="Пристрої",Tqt="Редагувати",Mqt="Увімкнено",$qt="Виконання",Eqt="фільтр",Dqt="Функції",Lqt="Загальний",Iqt="ідентифікатори",Oqt="значок",jqt="ID",Aqt="Імпорт",Pqt="Імпортер",Rqt="Індикатори",Nqt="Ім'я",zqt="імена",Hqt="в порядку",Fqt="Вимкнено",Wqt="В порядку",Yqt="Увімкнено",Bqt="Читабельний",Vqt="Оновити",Uqt="вимагається",qqt="Роль",Gqt="Кімната",Jqt="Кімнати",Kqt="Корінь",Xqt="зберегти",Zqt="Вибране",Qqt="держави",eGt="Крок",tGt="Назва",nGt="Тип",rGt="Типи",oGt="Одиниця",sGt="Значення",iGt="Можливість запису",aGt="Напишіть",lGt="читати",cGt="писати",dGt="живий",uGt="Ви повинні додати пристрої до категорій кімнат або функцій, щоб дозволити автоматичне виявлення пристроїв",pGt="логічний",hGt="файл",mGt="Налаштування",fGt="функція",_Gt="ID",gGt="Ім'я",yGt="Роль",wGt="Кімната",vGt="Тип",bGt="немає структури",xGt="функції",SGt="Жодної групи",CGt="номер",kGt="кімнати",TGt="рядок",MGt="Визнано",$Gt="Скопіюйте значення стану в буфер обміну",EGt="Налаштування",DGt="Видалити об'єкт",LGt="Редагувати об'єкт",IGt="Змінити значення стану",OGt="Джерело",jGt="Час останньої зміни",AGt="якість",PGt="Позначка часу",RGt="Користувач",NGt="Значення",zGt={Add:gqt,'Add new folder to "%s"':'Додати нову папку до "%s"',"Add state":"Додати стан","Add to root":"Додайте в корінь",Apply:yqt,"Automatically detected":"Рідні пристрої",Cancel:wqt,Close:vqt,"Collapse all nodes":"Згорнути всі папки",Color:bqt,"Copy device":"Копіювальний пристрій","Copy device into aliases":"Копіювати пристрій у псевдоніми",Create:xqt,"Create new device":"Створіть новий пристрій","Create new device with Aliases":"Створіть новий пристрій із псевдонімами","Create new device with LinkedDevices":"Створіть новий пристрій за допомогою LinkedDevices","Create new folder":"Створити нову папку","Create new folder in root":"Створіть нову папку в кореневому каталозі","Decrement color temperature":"Зменшити колірну температуру","Decrement percentage":"Відсоток зменшення","Decrement target temperature":"Зменшити цільову температуру",Delete:Sqt,"Delete device with all states":"Видалити пристрій з усіма станами","Delete folder":"Видалити папку","Delete state":"Видалити стан",Device:Cqt,"Device and all states will be deleted. Are you sure?":"Пристрій і всі стани буде видалено. Ти впевнений?","Device name":"Ім'я пристрою","Device type":"Тип пристрою",Devices:kqt,"Drag to resize":"Перетягніть для зміни розміру","Drop or select a device to configure":"Перетягніть або виберіть пристрій для налаштування","Disable smart":"Вимкніть «розумний» функціонал","Do not show dialog for 5 minutes":"Не показувати діалог протягом 5 хвилин",Edit:Tqt,"Edit convert functions":"Редагувати функції перетворення","Edit device":"Редагувати пристрій","Edit folder":"Редагувати властивості папки","Edit folder %s":'Редагувати папку "%s"','Edit name "%s"':'Редагувати назву "%s"',"Edit name and other properties":"Редагувати назву та інші властивості","Edit read/write functions":"Редагувати функції читання/запису","Edit state":"Редагувати стан","Edit state %s":"Редагувати стан %s","Edit states":"Редагувати стани","Enable or disable device":"Увімкнути або вимкнути пристрій",Enabled:Mqt,Execution:$qt,"Expand all nodes":"Розгорнути всі папки",Filter:Eqt,"Folder name":"Назва папки","Folder will be deleted. Are you sure?":"Папку буде видалено. Ти впевнений?",Function:"функція",Functions:Dqt,General:Lqt,"Get actual temperature":"Отримайте фактичну температуру","Get target temperature":"Отримайте цільову температуру","Hide info devices":"Приховати інформаційні пристрої","Hide this name from smart assistance":"Приховати це ім'я від розумної допомоги",IDs:Iqt,Icon:Oqt,Id:jqt,Import:Aqt,"Import state":"Стан імпорту",Importer:Pqt,"Increment color temperature":"Збільшити колірну температуру","Increment percentage":"Відсоток приросту","Increment target temperature":"Збільшити цільову температуру",Indicators:Rqt,"JS function like":"Функція JS схожа на","Linked devices":"Підключені пристрої",Name:Nqt,Names:zqt,"New folder":"Нова папка",OK:Hqt,Off:Fqt,Ok:Wqt,On:Yqt,"Please confirm...":"Будь-ласка підтвердіть...","Read function":"Прочитайте","Read lock state":"Читати стан блокування",Readable:Bqt,Refresh:Vqt,Required:Uqt,Role:qqt,Room:Gqt,Rooms:Jqt,Root:Kqt,Save:Xqt,"Select ID":"Виберіть ID",'Select for "%s"':'Виберіть для "%s"',"Select predefined icon":"Виберіть попередньо визначений значок",Selected:Zqt,"Set color":"Встановити колір","Set color temperature":"Встановити колірну температуру","Set lock state":"Встановити стан блокування","Set percentage":"Встановити відсоток","Set target temperature":"Встановити цільову температуру","Show expert settings":"Показати експертні налаштування","Show hide indicators":"Показати/приховати індикатори","Show only aliases":"Показувати лише псевдоніми","Smart name":"Розумне ім'я",States:Qqt,Step:eGt,'Supported by "%s"':'Підтримується "%s"',"Supported by %s":"Підтримується %s","The list of devices to copy is empty":"Список пристроїв для копіювання порожній","This name will use be in smart assistance. (optional)":"Це ім’я використовуватиметься в розумній допомозі. (необов'язково)",Title:tGt,"Turn off":"Вимкнути","Turn on":"Ввімкнути",Type:nGt,Types:rGt,Unit:oGt,"Use different states for read and write":"Використовуйте різні стани для читання та запису","Use one state for read and write":"Використовуйте один стан для читання та запису",Value:sGt,"Value=>String":"Відображення значення в рядок",Writable:iGt,Write:aGt,"Write function":"Напишіть","You can drag & drop device":"Ви можете перетягнути пристрій",alias_read:lGt,alias_write:cGt,alive:dGt,auto_detected_empty_info:uGt,boolean:pGt,"cloning method":"Структура на","do not import devices without category":"не імпортувати пристрої без категорії",file:hGt,filter_customs:mGt,filter_func:fGt,filter_id:_Gt,filter_name:gGt,filter_role:yGt,filter_room:wGt,filter_type:vGt,flat:bGt,functions:xGt,no_group:SGt,number:CGt,rooms:kGt,string:TGt,"Toggle split screen":"Перемкнути розділений екран",tooltip_ack:MGt,tooltip_copyState:$Gt,tooltip_customConfig:EGt,tooltip_deleteObject:DGt,tooltip_editObject:LGt,tooltip_editState:IGt,tooltip_from:OGt,tooltip_lc:jGt,tooltip_quality:AGt,tooltip_ts:PGt,tooltip_user:RGt,tooltip_value:NGt},HGt="添加",FGt="申请",WGt="取消",YGt="关闭",BGt="颜色",VGt="创造",UGt="删除",qGt="设备",GGt="设备",JGt="编辑",KGt="已启用",XGt="执行",ZGt="过滤",QGt="功能",eJt="一般的",tJt="标识",nJt="图标",rJt="ID",oJt="进口",sJt="进口商",iJt="指标",aJt="名称",lJt="名称",cJt="好",dJt="关",uJt="确定",pJt="开",hJt="可读",mJt="刷新",fJt="必需的",_Jt="角色",gJt="房间",yJt="房间",wJt="根",vJt="保存",bJt="已选",xJt="状态",SJt="步",CJt="标题",kJt="类型",TJt="类型",MJt="单元",$Jt="值",EJt="可写",DJt="写",LJt="读",IJt="写",OJt="可连接",jJt="您必须将设备添加到房间或功能类别才能让设备被自动检测",AJt="布尔值",PJt="文件",RJt="设定值",NJt="功能",zJt="ID",HJt="名称",FJt="角色",WJt="房间",YJt="类型",BJt="没有结构",VJt="职能",UJt="未分组",qJt="数字",GJt="房间",JJt="细绳",KJt="已确认",XJt="将状态值复制到剪贴板",ZJt="设定值",QJt="删除物件",eKt="编辑物件",tKt="修改状态值",nKt="资源",rKt="最后更改时间",oKt="质量",sKt="时间戳记",iKt="用户",aKt="值",lKt={Add:HGt,'Add new folder to "%s"':"将新文件夹添加到“%s”","Add state":"添加状态","Add to root":"添加到根",Apply:FGt,"Automatically detected":"本机设备",Cancel:WGt,Close:YGt,"Collapse all nodes":"折叠所有文件夹",Color:BGt,"Copy device":"复制设备","Copy device into aliases":"将设备复制到别名",Create:VGt,"Create new device":"创建新设备","Create new device with Aliases":"使用别名创建新设备","Create new device with LinkedDevices":"使用LinkedDevices创建新设备","Create new folder":"创建新文件夹","Create new folder in root":"在根目录新建文件夹","Decrement color temperature":"降低色温","Decrement percentage":"减少百分比","Decrement target temperature":"降低目标温度",Delete:UGt,"Delete device with all states":"删除所有状态的设备","Delete folder":"删除文件夹","Delete state":"删除状态",Device:qGt,"Device and all states will be deleted. Are you sure?":"设备和所有状态将被删除。你确定吗?","Device name":"设备名称","Device type":"设备类型",Devices:GGt,"Drag to resize":"拖动以调整大小","Drop or select a device to configure":"拖放或选择要配置的设备","Disable smart":"禁用“智能”功能","Do not show dialog for 5 minutes":"5 分钟内不显示对话框",Edit:JGt,"Edit convert functions":"编辑转换函数","Edit device":"编辑设备","Edit folder":"编辑文件夹属性","Edit folder %s":"编辑文件夹名称",'Edit name "%s"':"修改名称“%s”","Edit name and other properties":"编辑名称和其他属性","Edit read/write functions":"编辑读/写功能","Edit state":"编辑状态","Edit state %s":"编辑状态 %s","Edit states":"编辑状态","Enable or disable device":"启用或禁用设备",Enabled:KGt,Execution:XGt,"Expand all nodes":"展开所有文件夹",Filter:ZGt,"Folder name":"文件夹名称","Folder will be deleted. Are you sure?":"文件夹将被删除。你确定吗?",Function:"功能",Functions:QGt,General:eJt,"Get actual temperature":"获得实际温度","Get target temperature":"获得目标温度","Hide info devices":"隐藏信息设备","Hide this name from smart assistance":"在智能协助中隐藏此名称",IDs:tJt,Icon:nJt,Id:rJt,Import:oJt,"Import state":"导入状态",Importer:sJt,"Increment color temperature":"增加色温","Increment percentage":"增量百分比","Increment target temperature":"增加目标温度",Indicators:iJt,"JS function like":"JS函数之类的","Linked devices":"Linked devices",Name:aJt,Names:lJt,"New folder":"新建文件夹",OK:cJt,Off:dJt,Ok:uJt,On:pJt,"Please confirm...":"请确认...","Read function":"读","Read lock state":"读门锁状态",Readable:hJt,Refresh:mJt,Required:fJt,Role:_Jt,Room:gJt,Rooms:yJt,Root:wJt,Save:vJt,"Select ID":"选择ID",'Select for "%s"':"选择“%s”","Select predefined icon":"选择预定义图标",Selected:bJt,"Set color":"设置颜色","Set color temperature":"设置色温","Set lock state":"设置门锁状态","Set percentage":"设定百分比","Set target temperature":"设定目标温度","Show expert settings":"显示专家设置","Show hide indicators":"显示/隐藏指示器","Show only aliases":"仅显示别名","Smart name":"聪明的名字",States:xJt,Step:SJt,'Supported by "%s"':"由“%s”支持","Supported by %s":"由 %s 支持","The list of devices to copy is empty":"要复制的设备列表为空","This name will use be in smart assistance. (optional)":"此名称将用于智能协助。 (可选的)",Title:CJt,"Turn off":"关闭","Turn on":"打开",Type:kJt,Types:TJt,Unit:MJt,"Use different states for read and write":"使用不同的状态进行读写","Use one state for read and write":"使用一个状态进行读取和写入",Value:$Jt,"Value=>String":"将值映射到字符串",Writable:EJt,Write:DJt,"Write function":"写","You can drag & drop device":"您可以拖放设备",alias_read:LJt,alias_write:IJt,alive:OJt,auto_detected_empty_info:jJt,boolean:AJt,"cloning method":"结构上","do not import devices without category":"不导入无类别的设备",file:PJt,filter_customs:RJt,filter_func:NJt,filter_id:zJt,filter_name:HJt,filter_role:FJt,filter_room:WJt,filter_type:YJt,flat:BJt,functions:VJt,no_group:UJt,number:qJt,rooms:GJt,string:JJt,"Toggle split screen":"切换分屏",tooltip_ack:KJt,tooltip_copyState:XJt,tooltip_customConfig:ZJt,tooltip_deleteObject:QJt,tooltip_editObject:eKt,tooltip_editState:tKt,tooltip_from:nKt,tooltip_lc:rKt,tooltip_quality:oKt,tooltip_ts:sKt,tooltip_user:iKt,tooltip_value:aKt},R5=new URLSearchParams(window.location.search).get("theme");R5&&["dark","light"].includes(R5)&&window.localStorage.setItem("App.themeName",R5);class cKt extends iu{constructor(e){const n={...e};n.bottomButtons=!1,n.Connection=MH,n.adapterName="devices",n.sentryDSN=window.sentryDSN,n.translations={en:GAt,de:gRt,ru:HNt,pt:cHt,nl:IFt,fr:tYt,it:CBt,es:qVt,pl:_qt,uk:zGt,"zh-cn":lKt},window.location.port==="3000"&&(n.socket={host:"192.168.1.129"}),super(e,n),Urt();const r=this.createTheme();this.state={...this.state,theme:r,themeName:this.getThemeName(r),themeType:this.getThemeType(r)}}onConnectionReady(){super.onConnectionReady();const e=this.socket.systemConfig;this.setState({systemConfig:e})}render(){return this.state.systemConfig?p.jsx(iT,{injectFirst:!0,children:p.jsxs(q5,{theme:this.state.theme,children:[p.jsx(IT,{}),p.jsx($i,{socket:this.socket,selectedInstance:`${this.adapterName}.${this.instance}`,style:{justifyContent:"start"},themeName:this.state.themeName,themeType:this.state.themeType,theme:this.state.theme,isFloatComma:this.state.systemConfig.common.isFloatComma,dateFormat:this.state.systemConfig.common.dateFormat,communicationStateId:!0,admin:!1,showSettingsButton:!0}),this.renderError()]})}):p.jsx(iT,{injectFirst:!0,children:p.jsxs(q5,{theme:this.state.theme,children:[p.jsx(IT,{}),p.jsx(uO,{themeType:this.state.themeType})]})})}}window.adapterName="devices";console.log(`iobroker.${window.adapterName}@${xP.version}`);const IL=document.getElementById("root");IL&&vP.createRoot(IL).render(p.jsx(cKt,{}));SP();
|
|
748
|
+
`},wIt={onDragStart(t){let{active:e}=t;return"Picked up draggable item "+e.id+"."},onDragOver(t){let{active:e,over:n}=t;return n?"Draggable item "+e.id+" was moved over droppable area "+n.id+".":"Draggable item "+e.id+" is no longer over a droppable area."},onDragEnd(t){let{active:e,over:n}=t;return n?"Draggable item "+e.id+" was dropped over droppable area "+n.id:"Draggable item "+e.id+" was dropped."},onDragCancel(t){let{active:e}=t;return"Dragging was cancelled. Draggable item "+e.id+" was dropped."}};function vIt(t){let{announcements:e=wIt,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=yIt}=t;const{announce:s,announcement:i}=fIt(),a=R1("DndLiveRegion"),[d,m]=E.useState(!1);if(E.useEffect(()=>{m(!0)},[]),_It(E.useMemo(()=>({onDragStart(h){let{active:w}=h;s(e.onDragStart({active:w}))},onDragMove(h){let{active:w,over:x}=h;e.onDragMove&&s(e.onDragMove({active:w,over:x}))},onDragOver(h){let{active:w,over:x}=h;s(e.onDragOver({active:w,over:x}))},onDragEnd(h){let{active:w,over:x}=h;s(e.onDragEnd({active:w,over:x}))},onDragCancel(h){let{active:w,over:x}=h;s(e.onDragCancel({active:w,over:x}))}}),[s,e])),!d)return null;const _=v.createElement(v.Fragment,null,v.createElement(hIt,{id:r,value:o.draggable}),v.createElement(mIt,{id:a,announcement:i}));return n?Rp.createPortal(_,n):_}var mo;(function(t){t.DragStart="dragStart",t.DragMove="dragMove",t.DragEnd="dragEnd",t.DragCancel="dragCancel",t.DragOver="dragOver",t.RegisterDroppable="registerDroppable",t.SetDroppableDisabled="setDroppableDisabled",t.UnregisterDroppable="unregisterDroppable"})(mo||(mo={}));function Hw(){}function Fw(t,e){return E.useMemo(()=>({sensor:t,options:e??{}}),[t,e])}function MA(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return E.useMemo(()=>[...e].filter(r=>r!=null),[...e])}const hl=Object.freeze({x:0,y:0});function bIt(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function xIt(t,e){const n=zw(t);if(!n)return"0 0";const r={x:(n.x-e.left)/e.width*100,y:(n.y-e.top)/e.height*100};return r.x+"% "+r.y+"%"}function SIt(t,e){let{data:{value:n}}=t,{data:{value:r}}=e;return n-r}function CIt(t,e){let{data:{value:n}}=t,{data:{value:r}}=e;return r-n}function kIt(t,e){if(!t||t.length===0)return null;const[n]=t;return n[e]}function _L(t,e,n){return e===void 0&&(e=t.left),n===void 0&&(n=t.top),{x:e+t.width*.5,y:n+t.height*.5}}const $A=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=t;const o=_L(e,e.left,e.top),s=[];for(const i of r){const{id:a}=i,d=n.get(a);if(d){const m=bIt(_L(d),o);s.push({id:a,data:{droppableContainer:i,value:m}})}}return s.sort(SIt)};function TIt(t,e){const n=Math.max(e.top,t.top),r=Math.max(e.left,t.left),o=Math.min(e.left+e.width,t.left+t.width),s=Math.min(e.top+e.height,t.top+t.height),i=o-r,a=s-n;if(r<o&&n<s){const d=e.width*e.height,m=t.width*t.height,_=i*a,h=_/(d+m-_);return Number(h.toFixed(4))}return 0}const MIt=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=t;const o=[];for(const s of r){const{id:i}=s,a=n.get(i);if(a){const d=TIt(a,e);d>0&&o.push({id:i,data:{droppableContainer:s,value:d}})}}return o.sort(CIt)};function $It(t,e,n){return{...t,scaleX:e&&n?e.width/n.width:1,scaleY:e&&n?e.height/n.height:1}}function EA(t,e){return t&&e?{x:t.left-e.left,y:t.top-e.top}:hl}function EIt(t){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),s=1;s<r;s++)o[s-1]=arguments[s];return o.reduce((i,a)=>({...i,top:i.top+t*a.y,bottom:i.bottom+t*a.y,left:i.left+t*a.x,right:i.right+t*a.x}),{...n})}}const DIt=EIt(1);function DA(t){if(t.startsWith("matrix3d(")){const e=t.slice(9,-1).split(/, /);return{x:+e[12],y:+e[13],scaleX:+e[0],scaleY:+e[5]}}else if(t.startsWith("matrix(")){const e=t.slice(7,-1).split(/, /);return{x:+e[4],y:+e[5],scaleX:+e[0],scaleY:+e[3]}}return null}function LIt(t,e,n){const r=DA(e);if(!r)return t;const{scaleX:o,scaleY:s,x:i,y:a}=r,d=t.left-i-(1-o)*parseFloat(n),m=t.top-a-(1-s)*parseFloat(n.slice(n.indexOf(" ")+1)),_=o?t.width/o:t.width,h=s?t.height/s:t.height;return{width:_,height:h,top:m,right:d+_,bottom:m+h,left:d}}const IIt={ignoreTransform:!1};function Hf(t,e){e===void 0&&(e=IIt);let n=t.getBoundingClientRect();if(e.ignoreTransform){const{transform:m,transformOrigin:_}=Fs(t).getComputedStyle(t);m&&(n=LIt(n,m,_))}const{top:r,left:o,width:s,height:i,bottom:a,right:d}=n;return{top:r,left:o,width:s,height:i,bottom:a,right:d}}function gL(t){return Hf(t,{ignoreTransform:!0})}function OIt(t){const e=t.innerWidth,n=t.innerHeight;return{top:0,left:0,right:e,bottom:n,width:e,height:n}}function jIt(t,e){return e===void 0&&(e=Fs(t).getComputedStyle(t)),e.position==="fixed"}function AIt(t,e){e===void 0&&(e=Fs(t).getComputedStyle(t));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const s=e[o];return typeof s=="string"?n.test(s):!1})}function bk(t,e){const n=[];function r(o){if(e!=null&&n.length>=e||!o)return n;if(vk(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!A1(o)||CA(o)||n.includes(o))return n;const s=Fs(t).getComputedStyle(o);return o!==t&&AIt(o,s)&&n.push(o),jIt(o,s)?n:r(o.parentNode)}return t?r(t):n}function LA(t){const[e]=bk(t,1);return e??null}function L5(t){return!Yv||!t?null:Nf(t)?t:wk(t)?vk(t)||t===zf(t).scrollingElement?window:A1(t)?t:null:null}function IA(t){return Nf(t)?t.scrollX:t.scrollLeft}function OA(t){return Nf(t)?t.scrollY:t.scrollTop}function a4(t){return{x:IA(t),y:OA(t)}}var Eo;(function(t){t[t.Forward=1]="Forward",t[t.Backward=-1]="Backward"})(Eo||(Eo={}));function jA(t){return!Yv||!t?!1:t===document.scrollingElement}function AA(t){const e={x:0,y:0},n=jA(t)?{height:window.innerHeight,width:window.innerWidth}:{height:t.clientHeight,width:t.clientWidth},r={x:t.scrollWidth-n.width,y:t.scrollHeight-n.height},o=t.scrollTop<=e.y,s=t.scrollLeft<=e.x,i=t.scrollTop>=r.y,a=t.scrollLeft>=r.x;return{isTop:o,isLeft:s,isBottom:i,isRight:a,maxScroll:r,minScroll:e}}const PIt={x:.2,y:.2};function RIt(t,e,n,r,o){let{top:s,left:i,right:a,bottom:d}=n;r===void 0&&(r=10),o===void 0&&(o=PIt);const{isTop:m,isBottom:_,isLeft:h,isRight:w}=AA(t),x={x:0,y:0},S={x:0,y:0},C={height:e.height*o.y,width:e.width*o.x};return!m&&s<=e.top+C.height?(x.y=Eo.Backward,S.y=r*Math.abs((e.top+C.height-s)/C.height)):!_&&d>=e.bottom-C.height&&(x.y=Eo.Forward,S.y=r*Math.abs((e.bottom-C.height-d)/C.height)),!w&&a>=e.right-C.width?(x.x=Eo.Forward,S.x=r*Math.abs((e.right-C.width-a)/C.width)):!h&&i<=e.left+C.width&&(x.x=Eo.Backward,S.x=r*Math.abs((e.left+C.width-i)/C.width)),{direction:x,speed:S}}function NIt(t){if(t===document.scrollingElement){const{innerWidth:s,innerHeight:i}=window;return{top:0,left:0,right:s,bottom:i,width:s,height:i}}const{top:e,left:n,right:r,bottom:o}=t.getBoundingClientRect();return{top:e,left:n,right:r,bottom:o,width:t.clientWidth,height:t.clientHeight}}function PA(t){return t.reduce((e,n)=>uf(e,a4(n)),hl)}function zIt(t){return t.reduce((e,n)=>e+IA(n),0)}function HIt(t){return t.reduce((e,n)=>e+OA(n),0)}function RA(t,e){if(e===void 0&&(e=Hf),!t)return;const{top:n,left:r,bottom:o,right:s}=e(t);LA(t)&&(o<=0||s<=0||n>=window.innerHeight||r>=window.innerWidth)&&t.scrollIntoView({block:"center",inline:"center"})}const FIt=[["x",["left","right"],zIt],["y",["top","bottom"],HIt]];class xk{constructor(e,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=bk(n),o=PA(r);this.rect={...e},this.width=e.width,this.height=e.height;for(const[s,i,a]of FIt)for(const d of i)Object.defineProperty(this,d,{get:()=>{const m=a(r),_=o[s]-m;return this.rect[d]+_},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Bg{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=e}add(e,n,r){var o;(o=this.target)==null||o.addEventListener(e,n,r),this.listeners.push([e,n,r])}}function WIt(t){const{EventTarget:e}=Fs(t);return t instanceof e?t:zf(t)}function I5(t,e){const n=Math.abs(t.x),r=Math.abs(t.y);return typeof e=="number"?Math.sqrt(n**2+r**2)>e:"x"in e&&"y"in e?n>e.x&&r>e.y:"x"in e?n>e.x:"y"in e?r>e.y:!1}var _a;(function(t){t.Click="click",t.DragStart="dragstart",t.Keydown="keydown",t.ContextMenu="contextmenu",t.Resize="resize",t.SelectionChange="selectionchange",t.VisibilityChange="visibilitychange"})(_a||(_a={}));function yL(t){t.preventDefault()}function YIt(t){t.stopPropagation()}var zn;(function(t){t.Space="Space",t.Down="ArrowDown",t.Right="ArrowRight",t.Left="ArrowLeft",t.Up="ArrowUp",t.Esc="Escape",t.Enter="Enter",t.Tab="Tab"})(zn||(zn={}));const NA={start:[zn.Space,zn.Enter],cancel:[zn.Esc],end:[zn.Space,zn.Enter,zn.Tab]},BIt=(t,e)=>{let{currentCoordinates:n}=e;switch(t.code){case zn.Right:return{...n,x:n.x+25};case zn.Left:return{...n,x:n.x-25};case zn.Down:return{...n,y:n.y+25};case zn.Up:return{...n,y:n.y-25}}};class zA{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:n}}=e;this.props=e,this.listeners=new Bg(zf(n)),this.windowListeners=new Bg(Fs(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(_a.Resize,this.handleCancel),this.windowListeners.add(_a.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(_a.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:n}=this.props,r=e.node.current;r&&RA(r),n(hl)}handleKeyDown(e){if(Vv(e)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:s=NA,coordinateGetter:i=BIt,scrollBehavior:a="smooth"}=o,{code:d}=e;if(s.end.includes(d)){this.handleEnd(e);return}if(s.cancel.includes(d)){this.handleCancel(e);return}const{collisionRect:m}=r.current,_=m?{x:m.left,y:m.top}:hl;this.referenceCoordinates||(this.referenceCoordinates=_);const h=i(e,{active:n,context:r.current,currentCoordinates:_});if(h){const w=Nw(h,_),x={x:0,y:0},{scrollableAncestors:S}=r.current;for(const C of S){const M=e.code,{isTop:D,isRight:P,isLeft:R,isBottom:W,maxScroll:A,minScroll:N}=AA(C),H=NIt(C),q={x:Math.min(M===zn.Right?H.right-H.width/2:H.right,Math.max(M===zn.Right?H.left:H.left+H.width/2,h.x)),y:Math.min(M===zn.Down?H.bottom-H.height/2:H.bottom,Math.max(M===zn.Down?H.top:H.top+H.height/2,h.y))},J=M===zn.Right&&!P||M===zn.Left&&!R,z=M===zn.Down&&!W||M===zn.Up&&!D;if(J&&q.x!==h.x){const K=C.scrollLeft+w.x,X=M===zn.Right&&K<=A.x||M===zn.Left&&K>=N.x;if(X&&!w.y){C.scrollTo({left:K,behavior:a});return}X?x.x=C.scrollLeft-K:x.x=M===zn.Right?C.scrollLeft-A.x:C.scrollLeft-N.x,x.x&&C.scrollBy({left:-x.x,behavior:a});break}else if(z&&q.y!==h.y){const K=C.scrollTop+w.y,X=M===zn.Down&&K<=A.y||M===zn.Up&&K>=N.y;if(X&&!w.x){C.scrollTo({top:K,behavior:a});return}X?x.y=C.scrollTop-K:x.y=M===zn.Down?C.scrollTop-A.y:C.scrollTop-N.y,x.y&&C.scrollBy({top:-x.y,behavior:a});break}}this.handleMove(e,uf(Nw(h,this.referenceCoordinates),x))}}}handleMove(e,n){const{onMove:r}=this.props;e.preventDefault(),r(n)}handleEnd(e){const{onEnd:n}=this.props;e.preventDefault(),this.detach(),n()}handleCancel(e){const{onCancel:n}=this.props;e.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}zA.activators=[{eventName:"onKeyDown",handler:(t,e,n)=>{let{keyboardCodes:r=NA,onActivation:o}=e,{active:s}=n;const{code:i}=t.nativeEvent;if(r.start.includes(i)){const a=s.activatorNode.current;return a&&t.target!==a?!1:(t.preventDefault(),o?.({event:t.nativeEvent}),!0)}return!1}}];function wL(t){return!!(t&&"distance"in t)}function vL(t){return!!(t&&"delay"in t)}class Sk{constructor(e,n,r){var o;r===void 0&&(r=WIt(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=n;const{event:s}=e,{target:i}=s;this.props=e,this.events=n,this.document=zf(i),this.documentListeners=new Bg(this.document),this.listeners=new Bg(r),this.windowListeners=new Bg(Fs(i)),this.initialCoordinates=(o=zw(s))!=null?o:hl,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(_a.Resize,this.handleCancel),this.windowListeners.add(_a.DragStart,yL),this.windowListeners.add(_a.VisibilityChange,this.handleCancel),this.windowListeners.add(_a.ContextMenu,yL),this.documentListeners.add(_a.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(vL(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(wL(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,n){const{active:r,onPending:o}=this.props;o(r,e,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:e}=this,{onStart:n}=this.props;e&&(this.activated=!0,this.documentListeners.add(_a.Click,YIt,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(_a.SelectionChange,this.removeTextSelection),n(e))}handleMove(e){var n;const{activated:r,initialCoordinates:o,props:s}=this,{onMove:i,options:{activationConstraint:a}}=s;if(!o)return;const d=(n=zw(e))!=null?n:hl,m=Nw(o,d);if(!r&&a){if(wL(a)){if(a.tolerance!=null&&I5(m,a.tolerance))return this.handleCancel();if(I5(m,a.distance))return this.handleStart()}if(vL(a)&&I5(m,a.tolerance))return this.handleCancel();this.handlePending(a,m);return}e.cancelable&&e.preventDefault(),i(d)}handleEnd(){const{onAbort:e,onEnd:n}=this.props;this.detach(),this.activated||e(this.props.active),n()}handleCancel(){const{onAbort:e,onCancel:n}=this.props;this.detach(),this.activated||e(this.props.active),n()}handleKeydown(e){e.code===zn.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}}const VIt={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Uv extends Sk{constructor(e){const{event:n}=e,r=zf(n.target);super(e,VIt,r)}}Uv.activators=[{eventName:"onPointerDown",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:r}=e;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];const UIt={move:{name:"mousemove"},end:{name:"mouseup"}};var l4;(function(t){t[t.RightClick=2]="RightClick"})(l4||(l4={}));class qIt extends Sk{constructor(e){super(e,UIt,zf(e.event.target))}}qIt.activators=[{eventName:"onMouseDown",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:r}=e;return n.button===l4.RightClick?!1:(r?.({event:n}),!0)}}];const O5={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Ck extends Sk{constructor(e){super(e,O5)}static setup(){return window.addEventListener(O5.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(O5.move.name,e)};function e(){}}}Ck.activators=[{eventName:"onTouchStart",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:r}=e;const{touches:o}=n;return o.length>1?!1:(r?.({event:n}),!0)}}];var Vg;(function(t){t[t.Pointer=0]="Pointer",t[t.DraggableRect=1]="DraggableRect"})(Vg||(Vg={}));var Ww;(function(t){t[t.TreeOrder=0]="TreeOrder",t[t.ReversedTreeOrder=1]="ReversedTreeOrder"})(Ww||(Ww={}));function GIt(t){let{acceleration:e,activator:n=Vg.Pointer,canScroll:r,draggingRect:o,enabled:s,interval:i=5,order:a=Ww.TreeOrder,pointerCoordinates:d,scrollableAncestors:m,scrollableAncestorRects:_,delta:h,threshold:w}=t;const x=KIt({delta:h,disabled:!s}),[S,C]=lIt(),M=E.useRef({x:0,y:0}),D=E.useRef({x:0,y:0}),P=E.useMemo(()=>{switch(n){case Vg.Pointer:return d?{top:d.y,bottom:d.y,left:d.x,right:d.x}:null;case Vg.DraggableRect:return o}},[n,o,d]),R=E.useRef(null),W=E.useCallback(()=>{const N=R.current;if(!N)return;const H=M.current.x*D.current.x,q=M.current.y*D.current.y;N.scrollBy(H,q)},[]),A=E.useMemo(()=>a===Ww.TreeOrder?[...m].reverse():m,[a,m]);E.useEffect(()=>{if(!s||!m.length||!P){C();return}for(const N of A){if(r?.(N)===!1)continue;const H=m.indexOf(N),q=_[H];if(!q)continue;const{direction:J,speed:z}=RIt(N,q,P,e,w);for(const K of["x","y"])x[K][J[K]]||(z[K]=0,J[K]=0);if(z.x>0||z.y>0){C(),R.current=N,S(W,i),M.current=z,D.current=J;return}}M.current={x:0,y:0},D.current={x:0,y:0},C()},[e,W,r,C,s,i,JSON.stringify(P),JSON.stringify(x),S,m,A,_,JSON.stringify(w)])}const JIt={x:{[Eo.Backward]:!1,[Eo.Forward]:!1},y:{[Eo.Backward]:!1,[Eo.Forward]:!1}};function KIt(t){let{delta:e,disabled:n}=t;const r=Rw(e);return P1(o=>{if(n||!r||!o)return JIt;const s={x:Math.sign(e.x-r.x),y:Math.sign(e.y-r.y)};return{x:{[Eo.Backward]:o.x[Eo.Backward]||s.x===-1,[Eo.Forward]:o.x[Eo.Forward]||s.x===1},y:{[Eo.Backward]:o.y[Eo.Backward]||s.y===-1,[Eo.Forward]:o.y[Eo.Forward]||s.y===1}}},[n,e,r])}function XIt(t,e){const n=e!=null?t.get(e):void 0,r=n?n.node.current:null;return P1(o=>{var s;return e==null?null:(s=r??o)!=null?s:null},[r,e])}function ZIt(t,e){return E.useMemo(()=>t.reduce((n,r)=>{const{sensor:o}=r,s=o.activators.map(i=>({eventName:i.eventName,handler:e(i.handler,r)}));return[...n,...s]},[]),[t,e])}var f1;(function(t){t[t.Always=0]="Always",t[t.BeforeDragging=1]="BeforeDragging",t[t.WhileDragging=2]="WhileDragging"})(f1||(f1={}));var c4;(function(t){t.Optimized="optimized"})(c4||(c4={}));const bL=new Map;function QIt(t,e){let{dragging:n,dependencies:r,config:o}=e;const[s,i]=E.useState(null),{frequency:a,measure:d,strategy:m}=o,_=E.useRef(t),h=M(),w=m1(h),x=E.useCallback(function(D){D===void 0&&(D=[]),!w.current&&i(P=>P===null?D:P.concat(D.filter(R=>!P.includes(R))))},[w]),S=E.useRef(null),C=P1(D=>{if(h&&!n)return bL;if(!D||D===bL||_.current!==t||s!=null){const P=new Map;for(let R of t){if(!R)continue;if(s&&s.length>0&&!s.includes(R.id)&&R.rect.current){P.set(R.id,R.rect.current);continue}const W=R.node.current,A=W?new xk(d(W),W):null;R.rect.current=A,A&&P.set(R.id,A)}return P}return D},[t,s,n,h,d]);return E.useEffect(()=>{_.current=t},[t]),E.useEffect(()=>{h||x()},[n,h]),E.useEffect(()=>{s&&s.length>0&&i(null)},[JSON.stringify(s)]),E.useEffect(()=>{h||typeof a!="number"||S.current!==null||(S.current=setTimeout(()=>{x(),S.current=null},a))},[a,h,x,...r]),{droppableRects:C,measureDroppableContainers:x,measuringScheduled:s!=null};function M(){switch(m){case f1.Always:return!1;case f1.BeforeDragging:return n;default:return!n}}}function kk(t,e){return P1(n=>t?n||(typeof e=="function"?e(t):t):null,[e,t])}function eOt(t,e){return kk(t,e)}function tOt(t){let{callback:e,disabled:n}=t;const r=Bv(e),o=E.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:s}=window;return new s(r)},[r,n]);return E.useEffect(()=>()=>o?.disconnect(),[o]),o}function qv(t){let{callback:e,disabled:n}=t;const r=Bv(e),o=E.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:s}=window;return new s(r)},[n]);return E.useEffect(()=>()=>o?.disconnect(),[o]),o}function nOt(t){return new xk(Hf(t),t)}function xL(t,e,n){e===void 0&&(e=nOt);const[r,o]=E.useState(null);function s(){o(d=>{if(!t)return null;if(t.isConnected===!1){var m;return(m=d??n)!=null?m:null}const _=e(t);return JSON.stringify(d)===JSON.stringify(_)?d:_})}const i=tOt({callback(d){if(t)for(const m of d){const{type:_,target:h}=m;if(_==="childList"&&h instanceof HTMLElement&&h.contains(t)){s();break}}}}),a=qv({callback:s});return pl(()=>{s(),t?(a?.observe(t),i?.observe(document.body,{childList:!0,subtree:!0})):(a?.disconnect(),i?.disconnect())},[t]),r}function rOt(t){const e=kk(t);return EA(t,e)}const SL=[];function oOt(t){const e=E.useRef(t),n=P1(r=>t?r&&r!==SL&&t&&e.current&&t.parentNode===e.current.parentNode?r:bk(t):SL,[t]);return E.useEffect(()=>{e.current=t},[t]),n}function sOt(t){const[e,n]=E.useState(null),r=E.useRef(t),o=E.useCallback(s=>{const i=L5(s.target);i&&n(a=>a?(a.set(i,a4(i)),new Map(a)):null)},[]);return E.useEffect(()=>{const s=r.current;if(t!==s){i(s);const a=t.map(d=>{const m=L5(d);return m?(m.addEventListener("scroll",o,{passive:!0}),[m,a4(m)]):null}).filter(d=>d!=null);n(a.length?new Map(a):null),r.current=t}return()=>{i(t),i(s)};function i(a){a.forEach(d=>{const m=L5(d);m?.removeEventListener("scroll",o)})}},[o,t]),E.useMemo(()=>t.length?e?Array.from(e.values()).reduce((s,i)=>uf(s,i),hl):PA(t):hl,[t,e])}function CL(t,e){e===void 0&&(e=[]);const n=E.useRef(null);return E.useEffect(()=>{n.current=null},e),E.useEffect(()=>{const r=t!==hl;r&&!n.current&&(n.current=t),!r&&n.current&&(n.current=null)},[t]),n.current?Nw(t,n.current):hl}function iOt(t){E.useEffect(()=>{if(!Yv)return;const e=t.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of e)n?.()}},t.map(e=>{let{sensor:n}=e;return n}))}function aOt(t,e){return E.useMemo(()=>t.reduce((n,r)=>{let{eventName:o,handler:s}=r;return n[o]=i=>{s(i,e)},n},{}),[t,e])}function HA(t){return E.useMemo(()=>t?OIt(t):null,[t])}const kL=[];function lOt(t,e){e===void 0&&(e=Hf);const[n]=t,r=HA(n?Fs(n):null),[o,s]=E.useState(kL);function i(){s(()=>t.length?t.map(d=>jA(d)?r:new xk(e(d),d)):kL)}const a=qv({callback:i});return pl(()=>{a?.disconnect(),i(),t.forEach(d=>a?.observe(d))},[t]),o}function FA(t){if(!t)return null;if(t.children.length>1)return t;const e=t.children[0];return A1(e)?e:t}function cOt(t){let{measure:e}=t;const[n,r]=E.useState(null),o=E.useCallback(m=>{for(const{target:_}of m)if(A1(_)){r(h=>{const w=e(_);return h?{...h,width:w.width,height:w.height}:w});break}},[e]),s=qv({callback:o}),i=E.useCallback(m=>{const _=FA(m);s?.disconnect(),_&&s?.observe(_),r(_?e(_):null)},[e,s]),[a,d]=Pw(i);return E.useMemo(()=>({nodeRef:a,rect:n,setRef:d}),[n,a,d])}const dOt=[{sensor:Uv,options:{}},{sensor:zA,options:{}}],uOt={current:{}},J0={draggable:{measure:gL},droppable:{measure:gL,strategy:f1.WhileDragging,frequency:c4.Optimized},dragOverlay:{measure:Hf}};class Ug extends Map{get(e){var n;return e!=null&&(n=super.get(e))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:n}=e;return!n})}getNodeFor(e){var n,r;return(n=(r=this.get(e))==null?void 0:r.node.current)!=null?n:void 0}}const pOt={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Ug,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Hw},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:J0,measureDroppableContainers:Hw,windowRect:null,measuringScheduled:!1},WA={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Hw,draggableNodes:new Map,over:null,measureDroppableContainers:Hw},N1=E.createContext(WA),YA=E.createContext(pOt);function hOt(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Ug}}}function mOt(t,e){switch(e.type){case mo.DragStart:return{...t,draggable:{...t.draggable,initialCoordinates:e.initialCoordinates,active:e.active}};case mo.DragMove:return t.draggable.active==null?t:{...t,draggable:{...t.draggable,translate:{x:e.coordinates.x-t.draggable.initialCoordinates.x,y:e.coordinates.y-t.draggable.initialCoordinates.y}}};case mo.DragEnd:case mo.DragCancel:return{...t,draggable:{...t.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case mo.RegisterDroppable:{const{element:n}=e,{id:r}=n,o=new Ug(t.droppable.containers);return o.set(r,n),{...t,droppable:{...t.droppable,containers:o}}}case mo.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=e,s=t.droppable.containers.get(n);if(!s||r!==s.key)return t;const i=new Ug(t.droppable.containers);return i.set(n,{...s,disabled:o}),{...t,droppable:{...t.droppable,containers:i}}}case mo.UnregisterDroppable:{const{id:n,key:r}=e,o=t.droppable.containers.get(n);if(!o||r!==o.key)return t;const s=new Ug(t.droppable.containers);return s.delete(n),{...t,droppable:{...t.droppable,containers:s}}}default:return t}}function fOt(t){let{disabled:e}=t;const{active:n,activatorEvent:r,draggableNodes:o}=E.useContext(N1),s=Rw(r),i=Rw(n?.id);return E.useEffect(()=>{if(!e&&!r&&s&&i!=null){if(!Vv(s)||document.activeElement===s.target)return;const a=o.get(i);if(!a)return;const{activatorNode:d,node:m}=a;if(!d.current&&!m.current)return;requestAnimationFrame(()=>{for(const _ of[d.current,m.current]){if(!_)continue;const h=uIt(_);if(h){h.focus();break}}})}},[r,e,o,i,s]),null}function BA(t,e){let{transform:n,...r}=e;return t!=null&&t.length?t.reduce((o,s)=>s({transform:o,...r}),n):n}function _Ot(t){return E.useMemo(()=>({draggable:{...J0.draggable,...t?.draggable},droppable:{...J0.droppable,...t?.droppable},dragOverlay:{...J0.dragOverlay,...t?.dragOverlay}}),[t?.draggable,t?.droppable,t?.dragOverlay])}function gOt(t){let{activeNode:e,measure:n,initialRect:r,config:o=!0}=t;const s=E.useRef(!1),{x:i,y:a}=typeof o=="boolean"?{x:o,y:o}:o;pl(()=>{if(!i&&!a||!e){s.current=!1;return}if(s.current||!r)return;const m=e?.node.current;if(!m||m.isConnected===!1)return;const _=n(m),h=EA(_,r);if(i||(h.x=0),a||(h.y=0),s.current=!0,Math.abs(h.x)>0||Math.abs(h.y)>0){const w=LA(m);w&&w.scrollBy({top:h.y,left:h.x})}},[e,i,a,r,n])}const Gv=E.createContext({...hl,scaleX:1,scaleY:1});var lu;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Initializing=1]="Initializing",t[t.Initialized=2]="Initialized"})(lu||(lu={}));const VA=E.memo(function(e){var n,r,o,s;let{id:i,accessibility:a,autoScroll:d=!0,children:m,sensors:_=dOt,collisionDetection:h=MIt,measuring:w,modifiers:x,...S}=e;const C=E.useReducer(mOt,void 0,hOt),[M,D]=C,[P,R]=gIt(),[W,A]=E.useState(lu.Uninitialized),N=W===lu.Initialized,{draggable:{active:H,nodes:q,translate:J},droppable:{containers:z}}=M,K=H!=null?q.get(H):null,X=E.useRef({initial:null,translated:null}),te=E.useMemo(()=>{var Ot;return H!=null?{id:H,data:(Ot=K?.data)!=null?Ot:uOt,rect:X}:null},[H,K]),ee=E.useRef(null),[le,ae]=E.useState(null),[me,ie]=E.useState(null),se=m1(S,Object.values(S)),re=R1("DndDescribedBy",i),G=E.useMemo(()=>z.getEnabled(),[z]),ne=_Ot(w),{droppableRects:ge,measureDroppableContainers:_e,measuringScheduled:ue}=QIt(G,{dragging:N,dependencies:[J.x,J.y],config:ne.droppable}),de=XIt(q,H),Te=E.useMemo(()=>me?zw(me):null,[me]),je=Er(),Pe=eOt(de,ne.draggable.measure);gOt({activeNode:H!=null?q.get(H):null,config:je.layoutShiftCompensation,initialRect:Pe,measure:ne.draggable.measure});const Oe=xL(de,ne.draggable.measure,Pe),Ye=xL(de?de.parentElement:null),Re=E.useRef({activatorEvent:null,active:null,activeNode:de,collisionRect:null,collisions:null,droppableRects:ge,draggableNodes:q,draggingNode:null,draggingNodeRect:null,droppableContainers:z,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Xe=z.getNodeFor((n=Re.current.over)==null?void 0:n.id),ze=cOt({measure:ne.dragOverlay.measure}),Ue=(r=ze.nodeRef.current)!=null?r:de,Ee=N?(o=ze.rect)!=null?o:Oe:null,Ce=!!(ze.nodeRef.current&&ze.rect),Be=rOt(Ce?null:Oe),ft=HA(Ue?Fs(Ue):null),rt=oOt(N?Xe??de:null),qe=lOt(rt),Je=BA(x,{transform:{x:J.x-Be.x,y:J.y-Be.y,scaleX:1,scaleY:1},activatorEvent:me,active:te,activeNodeRect:Oe,containerNodeRect:Ye,draggingNodeRect:Ee,over:Re.current.over,overlayNodeRect:ze.rect,scrollableAncestors:rt,scrollableAncestorRects:qe,windowRect:ft}),Dt=Te?uf(Te,J):null,kt=sOt(rt),we=CL(kt),ve=CL(kt,[Oe]),Fe=uf(Je,we),Ge=Ee?DIt(Ee,Je):null,pt=te&&Ge?h({active:te,collisionRect:Ge,droppableRects:ge,droppableContainers:G,pointerCoordinates:Dt}):null,Qe=kIt(pt,"id"),[mt,en]=E.useState(null),Lt=Ce?Je:uf(Je,ve),at=$It(Lt,(s=mt?.rect)!=null?s:null,Oe),Ht=E.useRef(null),tn=E.useCallback((Ot,rn)=>{let{sensor:An,options:ct}=rn;if(ee.current==null)return;const $n=q.get(ee.current);if(!$n)return;const $t=Ot.nativeEvent,yn=new An({active:ee.current,activeNode:$n,event:$t,options:ct,context:Re,onAbort(We){if(!q.get(We))return;const{onDragAbort:gt}=se.current,pn={id:We};gt?.(pn),P({type:"onDragAbort",event:pn})},onPending(We,qt,gt,pn){if(!q.get(We))return;const{onDragPending:_t}=se.current,mn={id:We,constraint:qt,initialCoordinates:gt,offset:pn};_t?.(mn),P({type:"onDragPending",event:mn})},onStart(We){const qt=ee.current;if(qt==null)return;const gt=q.get(qt);if(!gt)return;const{onDragStart:pn}=se.current,kn={activatorEvent:$t,active:{id:qt,data:gt.data,rect:X}};Rp.unstable_batchedUpdates(()=>{pn?.(kn),A(lu.Initializing),D({type:mo.DragStart,initialCoordinates:We,active:qt}),P({type:"onDragStart",event:kn}),ae(Ht.current),ie($t)})},onMove(We){D({type:mo.DragMove,coordinates:We})},onEnd:dt(mo.DragEnd),onCancel:dt(mo.DragCancel)});Ht.current=yn;function dt(We){return async function(){const{active:gt,collisions:pn,over:kn,scrollAdjustedTranslate:_t}=Re.current;let mn=null;if(gt&&_t){const{cancelDrop:mr}=se.current;mn={activatorEvent:$t,active:gt,collisions:pn,delta:_t,over:kn},We===mo.DragEnd&&typeof mr=="function"&&await Promise.resolve(mr(mn))&&(We=mo.DragCancel)}ee.current=null,Rp.unstable_batchedUpdates(()=>{D({type:We}),A(lu.Uninitialized),en(null),ae(null),ie(null),Ht.current=null;const mr=We===mo.DragEnd?"onDragEnd":"onDragCancel";if(mn){const Dr=se.current[mr];Dr?.(mn),P({type:mr,event:mn})}})}}},[q]),Cn=E.useCallback((Ot,rn)=>(An,ct)=>{const $n=An.nativeEvent,$t=q.get(ct);if(ee.current!==null||!$t||$n.dndKit||$n.defaultPrevented)return;const yn={active:$t};Ot(An,rn.options,yn)===!0&&($n.dndKit={capturedBy:rn.sensor},ee.current=ct,tn(An,rn))},[q,tn]),nr=ZIt(_,Cn);iOt(_),pl(()=>{Oe&&W===lu.Initializing&&A(lu.Initialized)},[Oe,W]),E.useEffect(()=>{const{onDragMove:Ot}=se.current,{active:rn,activatorEvent:An,collisions:ct,over:$n}=Re.current;if(!rn||!An)return;const $t={active:rn,activatorEvent:An,collisions:ct,delta:{x:Fe.x,y:Fe.y},over:$n};Rp.unstable_batchedUpdates(()=>{Ot?.($t),P({type:"onDragMove",event:$t})})},[Fe.x,Fe.y]),E.useEffect(()=>{const{active:Ot,activatorEvent:rn,collisions:An,droppableContainers:ct,scrollAdjustedTranslate:$n}=Re.current;if(!Ot||ee.current==null||!rn||!$n)return;const{onDragOver:$t}=se.current,yn=ct.get(Qe),dt=yn&&yn.rect.current?{id:yn.id,rect:yn.rect.current,data:yn.data,disabled:yn.disabled}:null,We={active:Ot,activatorEvent:rn,collisions:An,delta:{x:$n.x,y:$n.y},over:dt};Rp.unstable_batchedUpdates(()=>{en(dt),$t?.(We),P({type:"onDragOver",event:We})})},[Qe]),pl(()=>{Re.current={activatorEvent:me,active:te,activeNode:de,collisionRect:Ge,collisions:pt,droppableRects:ge,draggableNodes:q,draggingNode:Ue,draggingNodeRect:Ee,droppableContainers:z,over:mt,scrollableAncestors:rt,scrollAdjustedTranslate:Fe},X.current={initial:Ee,translated:Ge}},[te,de,pt,Ge,q,Ue,Ee,ge,z,mt,rt,Fe]),GIt({...je,delta:J,draggingRect:Ge,pointerCoordinates:Dt,scrollableAncestors:rt,scrollableAncestorRects:qe});const rr=E.useMemo(()=>({active:te,activeNode:de,activeNodeRect:Oe,activatorEvent:me,collisions:pt,containerNodeRect:Ye,dragOverlay:ze,draggableNodes:q,droppableContainers:z,droppableRects:ge,over:mt,measureDroppableContainers:_e,scrollableAncestors:rt,scrollableAncestorRects:qe,measuringConfiguration:ne,measuringScheduled:ue,windowRect:ft}),[te,de,Oe,me,pt,Ye,ze,q,z,ge,mt,_e,rt,qe,ne,ue,ft]),Qr=E.useMemo(()=>({activatorEvent:me,activators:nr,active:te,activeNodeRect:Oe,ariaDescribedById:{draggable:re},dispatch:D,draggableNodes:q,over:mt,measureDroppableContainers:_e}),[me,nr,te,Oe,D,re,q,mt,_e]);return v.createElement(TA.Provider,{value:R},v.createElement(N1.Provider,{value:Qr},v.createElement(YA.Provider,{value:rr},v.createElement(Gv.Provider,{value:at},m)),v.createElement(fOt,{disabled:a?.restoreFocus===!1})),v.createElement(vIt,{...a,hiddenTextDescribedById:re}));function Er(){const Ot=le?.autoScrollEnabled===!1,rn=typeof d=="object"?d.enabled===!1:d===!1,An=N&&!Ot&&!rn;return typeof d=="object"?{...d,enabled:An}:{enabled:An}}}),yOt=E.createContext(null),TL="button",wOt="Draggable";function vOt(t){let{id:e,data:n,disabled:r=!1,attributes:o}=t;const s=R1(wOt),{activators:i,activatorEvent:a,active:d,activeNodeRect:m,ariaDescribedById:_,draggableNodes:h,over:w}=E.useContext(N1),{role:x=TL,roleDescription:S="draggable",tabIndex:C=0}=o??{},M=d?.id===e,D=E.useContext(M?Gv:yOt),[P,R]=Pw(),[W,A]=Pw(),N=aOt(i,e),H=m1(n);pl(()=>(h.set(e,{id:e,key:s,node:P,activatorNode:W,data:H}),()=>{const J=h.get(e);J&&J.key===s&&h.delete(e)}),[h,e]);const q=E.useMemo(()=>({role:x,tabIndex:C,"aria-disabled":r,"aria-pressed":M&&x===TL?!0:void 0,"aria-roledescription":S,"aria-describedby":_.draggable}),[r,x,C,M,S,_.draggable]);return{active:d,activatorEvent:a,activeNodeRect:m,attributes:q,isDragging:M,listeners:r?void 0:N,node:P,over:w,setNodeRef:R,setActivatorNodeRef:A,transform:D}}function UA(){return E.useContext(YA)}const bOt="Droppable",xOt={timeout:25};function qA(t){let{data:e,disabled:n=!1,id:r,resizeObserverConfig:o}=t;const s=R1(bOt),{active:i,dispatch:a,over:d,measureDroppableContainers:m}=E.useContext(N1),_=E.useRef({disabled:n}),h=E.useRef(!1),w=E.useRef(null),x=E.useRef(null),{disabled:S,updateMeasurementsFor:C,timeout:M}={...xOt,...o},D=m1(C??r),P=E.useCallback(()=>{if(!h.current){h.current=!0;return}x.current!=null&&clearTimeout(x.current),x.current=setTimeout(()=>{m(Array.isArray(D.current)?D.current:[D.current]),x.current=null},M)},[M]),R=qv({callback:P,disabled:S||!i}),W=E.useCallback((q,J)=>{R&&(J&&(R.unobserve(J),h.current=!1),q&&R.observe(q))},[R]),[A,N]=Pw(W),H=m1(e);return E.useEffect(()=>{!R||!A.current||(R.disconnect(),h.current=!1,R.observe(A.current))},[A,R]),E.useEffect(()=>(a({type:mo.RegisterDroppable,element:{id:r,key:s,disabled:n,node:A,rect:w,data:H}}),()=>a({type:mo.UnregisterDroppable,key:s,id:r})),[r]),E.useEffect(()=>{n!==_.current.disabled&&(a({type:mo.SetDroppableDisabled,id:r,key:s,disabled:n}),_.current.disabled=n)},[r,s,n,a]),{active:i,rect:w,isOver:d?.id===r,node:A,over:d,setNodeRef:N}}function SOt(t){let{animation:e,children:n}=t;const[r,o]=E.useState(null),[s,i]=E.useState(null),a=Rw(n);return!n&&!r&&a&&o(a),pl(()=>{if(!s)return;const d=r?.key,m=r?.props.id;if(d==null||m==null){o(null);return}Promise.resolve(e(m,s)).then(()=>{o(null)})},[e,r,s]),v.createElement(v.Fragment,null,n,r?E.cloneElement(r,{ref:i}):null)}const COt={x:0,y:0,scaleX:1,scaleY:1};function kOt(t){let{children:e}=t;return v.createElement(N1.Provider,{value:WA},v.createElement(Gv.Provider,{value:COt},e))}const TOt={position:"fixed",touchAction:"none"},MOt=t=>Vv(t)?"transform 250ms ease":void 0,$Ot=E.forwardRef((t,e)=>{let{as:n,activatorEvent:r,adjustScale:o,children:s,className:i,rect:a,style:d,transform:m,transition:_=MOt}=t;if(!a)return null;const h=o?m:{...m,scaleX:1,scaleY:1},w={...TOt,width:a.width,height:a.height,top:a.top,left:a.left,transform:Mu.Transform.toString(h),transformOrigin:o&&r?xIt(r,a):void 0,transition:typeof _=="function"?_(r):_,...d};return v.createElement(n,{className:i,style:w,ref:e},s)}),EOt=t=>e=>{let{active:n,dragOverlay:r}=e;const o={},{styles:s,className:i}=t;if(s!=null&&s.active)for(const[a,d]of Object.entries(s.active))d!==void 0&&(o[a]=n.node.style.getPropertyValue(a),n.node.style.setProperty(a,d));if(s!=null&&s.dragOverlay)for(const[a,d]of Object.entries(s.dragOverlay))d!==void 0&&r.node.style.setProperty(a,d);return i!=null&&i.active&&n.node.classList.add(i.active),i!=null&&i.dragOverlay&&r.node.classList.add(i.dragOverlay),function(){for(const[d,m]of Object.entries(o))n.node.style.setProperty(d,m);i!=null&&i.active&&n.node.classList.remove(i.active)}},DOt=t=>{let{transform:{initial:e,final:n}}=t;return[{transform:Mu.Transform.toString(e)},{transform:Mu.Transform.toString(n)}]},LOt={duration:250,easing:"ease",keyframes:DOt,sideEffects:EOt({styles:{active:{opacity:"0"}}})};function IOt(t){let{config:e,draggableNodes:n,droppableContainers:r,measuringConfiguration:o}=t;return Bv((s,i)=>{if(e===null)return;const a=n.get(s);if(!a)return;const d=a.node.current;if(!d)return;const m=FA(i);if(!m)return;const{transform:_}=Fs(i).getComputedStyle(i),h=DA(_);if(!h)return;const w=typeof e=="function"?e:OOt(e);return RA(d,o.draggable.measure),w({active:{id:s,data:a.data,node:d,rect:o.draggable.measure(d)},draggableNodes:n,dragOverlay:{node:i,rect:o.dragOverlay.measure(m)},droppableContainers:r,measuringConfiguration:o,transform:h})})}function OOt(t){const{duration:e,easing:n,sideEffects:r,keyframes:o}={...LOt,...t};return s=>{let{active:i,dragOverlay:a,transform:d,...m}=s;if(!e)return;const _={x:a.rect.left-i.rect.left,y:a.rect.top-i.rect.top},h={scaleX:d.scaleX!==1?i.rect.width*d.scaleX/a.rect.width:1,scaleY:d.scaleY!==1?i.rect.height*d.scaleY/a.rect.height:1},w={x:d.x-_.x,y:d.y-_.y,...h},x=o({...m,active:i,dragOverlay:a,transform:{initial:d,final:w}}),[S]=x,C=x[x.length-1];if(JSON.stringify(S)===JSON.stringify(C))return;const M=r?.({active:i,dragOverlay:a,...m}),D=a.node.animate(x,{duration:e,easing:n,fill:"forwards"});return new Promise(P=>{D.onfinish=()=>{M?.(),P()}})}}let ML=0;function jOt(t){return E.useMemo(()=>{if(t!=null)return ML++,ML},[t])}const GA=v.memo(t=>{let{adjustScale:e=!1,children:n,dropAnimation:r,style:o,transition:s,modifiers:i,wrapperElement:a="div",className:d,zIndex:m=999}=t;const{activatorEvent:_,active:h,activeNodeRect:w,containerNodeRect:x,draggableNodes:S,droppableContainers:C,dragOverlay:M,over:D,measuringConfiguration:P,scrollableAncestors:R,scrollableAncestorRects:W,windowRect:A}=UA(),N=E.useContext(Gv),H=jOt(h?.id),q=BA(i,{activatorEvent:_,active:h,activeNodeRect:w,containerNodeRect:x,draggingNodeRect:M.rect,over:D,overlayNodeRect:M.rect,scrollableAncestors:R,scrollableAncestorRects:W,transform:N,windowRect:A}),J=kk(w),z=IOt({config:r,draggableNodes:S,droppableContainers:C,measuringConfiguration:P}),K=J?M.setRef:void 0;return v.createElement(kOt,null,v.createElement(SOt,{animation:z},h&&H?v.createElement($Ot,{key:H,id:h.id,ref:K,as:a,activatorEvent:_,adjustScale:e,className:d,transition:s,rect:J,style:{zIndex:m,...o},transform:q},n):null))});function Jv(t,e,n){const r=t.slice();return r.splice(n<0?r.length+n:n,0,r.splice(e,1)[0]),r}function AOt(t,e){return t.reduce((n,r,o)=>{const s=e.get(r);return s&&(n[o]=s),n},Array(t.length))}function k0(t){return t!==null&&t>=0}function POt(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function ROt(t){return typeof t=="boolean"?{draggable:t,droppable:t}:t}const Kv=t=>{let{rects:e,activeIndex:n,overIndex:r,index:o}=t;const s=Jv(e,r,n),i=e[o],a=s[o];return!a||!i?null:{x:a.left-i.left,y:a.top-i.top,scaleX:a.width/i.width,scaleY:a.height/i.height}},JA="Sortable",KA=v.createContext({activeIndex:-1,containerId:JA,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Kv,disabled:{draggable:!1,droppable:!1}});function XA(t){let{children:e,id:n,items:r,strategy:o=Kv,disabled:s=!1}=t;const{active:i,dragOverlay:a,droppableRects:d,over:m,measureDroppableContainers:_}=UA(),h=R1(JA,n),w=a.rect!==null,x=E.useMemo(()=>r.map(N=>typeof N=="object"&&"id"in N?N.id:N),[r]),S=i!=null,C=i?x.indexOf(i.id):-1,M=m?x.indexOf(m.id):-1,D=E.useRef(x),P=!POt(x,D.current),R=M!==-1&&C===-1||P,W=ROt(s);pl(()=>{P&&S&&_(x)},[P,x,S,_]),E.useEffect(()=>{D.current=x},[x]);const A=E.useMemo(()=>({activeIndex:C,containerId:h,disabled:W,disableTransforms:R,items:x,overIndex:M,useDragOverlay:w,sortedRects:AOt(x,d),strategy:o}),[C,h,W.draggable,W.droppable,R,x,M,d,w,o]);return v.createElement(KA.Provider,{value:A},e)}const NOt=t=>{let{id:e,items:n,activeIndex:r,overIndex:o}=t;return Jv(n,r,o).indexOf(e)},zOt=t=>{let{containerId:e,isSorting:n,wasDragging:r,index:o,items:s,newIndex:i,previousItems:a,previousContainerId:d,transition:m}=t;return!m||!r||a!==s&&o===i?!1:n?!0:i!==o&&e===d},HOt={duration:200,easing:"ease"},ZA="transform",FOt=Mu.Transition.toString({property:ZA,duration:0,easing:"linear"}),WOt={roleDescription:"sortable"};function YOt(t){let{disabled:e,index:n,node:r,rect:o}=t;const[s,i]=E.useState(null),a=E.useRef(n);return pl(()=>{if(!e&&n!==a.current&&r.current){const d=o.current;if(d){const m=Hf(r.current,{ignoreTransform:!0}),_={x:d.left-m.left,y:d.top-m.top,scaleX:d.width/m.width,scaleY:d.height/m.height};(_.x||_.y)&&i(_)}}n!==a.current&&(a.current=n)},[e,n,r,o]),E.useEffect(()=>{s&&i(null)},[s]),s}function BOt(t){let{animateLayoutChanges:e=zOt,attributes:n,disabled:r,data:o,getNewIndex:s=NOt,id:i,strategy:a,resizeObserverConfig:d,transition:m=HOt}=t;const{items:_,containerId:h,activeIndex:w,disabled:x,disableTransforms:S,sortedRects:C,overIndex:M,useDragOverlay:D,strategy:P}=E.useContext(KA),R=VOt(r,x),W=_.indexOf(i),A=E.useMemo(()=>({sortable:{containerId:h,index:W,items:_},...o}),[h,o,W,_]),N=E.useMemo(()=>_.slice(_.indexOf(i)),[_,i]),{rect:H,node:q,isOver:J,setNodeRef:z}=qA({id:i,data:A,disabled:R.droppable,resizeObserverConfig:{updateMeasurementsFor:N,...d}}),{active:K,activatorEvent:X,activeNodeRect:te,attributes:ee,setNodeRef:le,listeners:ae,isDragging:me,over:ie,setActivatorNodeRef:se,transform:re}=vOt({id:i,data:A,attributes:{...WOt,...n},disabled:R.draggable}),G=aIt(z,le),ne=!!K,ge=ne&&!S&&k0(w)&&k0(M),_e=!D&&me,ue=_e&&ge?re:null,Te=ge?ue??(a??P)({rects:C,activeNodeRect:te,activeIndex:w,overIndex:M,index:W}):null,je=k0(w)&&k0(M)?s({id:i,items:_,activeIndex:w,overIndex:M}):W,Pe=K?.id,Oe=E.useRef({activeId:Pe,items:_,newIndex:je,containerId:h}),Ye=_!==Oe.current.items,Re=e({active:K,containerId:h,isDragging:me,isSorting:ne,id:i,index:W,items:_,newIndex:Oe.current.newIndex,previousItems:Oe.current.items,previousContainerId:Oe.current.containerId,transition:m,wasDragging:Oe.current.activeId!=null}),Xe=YOt({disabled:!Re,index:W,node:q,rect:H});return E.useEffect(()=>{ne&&Oe.current.newIndex!==je&&(Oe.current.newIndex=je),h!==Oe.current.containerId&&(Oe.current.containerId=h),_!==Oe.current.items&&(Oe.current.items=_)},[ne,je,h,_]),E.useEffect(()=>{if(Pe===Oe.current.activeId)return;if(Pe!=null&&Oe.current.activeId==null){Oe.current.activeId=Pe;return}const Ue=setTimeout(()=>{Oe.current.activeId=Pe},50);return()=>clearTimeout(Ue)},[Pe]),{active:K,activeIndex:w,attributes:ee,data:A,rect:H,index:W,newIndex:je,items:_,isOver:J,isSorting:ne,isDragging:me,listeners:ae,node:q,overIndex:M,over:ie,setNodeRef:G,setActivatorNodeRef:se,setDroppableNodeRef:z,setDraggableNodeRef:le,transform:Xe??Te,transition:ze()};function ze(){if(Xe||Ye&&Oe.current.newIndex===W)return FOt;if(!(_e&&!Vv(X)||!m)&&(ne||Re))return Mu.Transition.toString({...m,property:ZA})}}function VOt(t,e){var n,r;return typeof t=="boolean"?{draggable:t,droppable:!1}:{draggable:(n=t?.draggable)!=null?n:e.draggable,droppable:(r=t?.droppable)!=null?r:e.droppable}}zn.Down,zn.Right,zn.Up,zn.Left;const Tk={fill:"none",stroke:"currentColor",strokeWidth:2};function UOt(){return p.jsx(Y,{component:"svg",width:18,height:18,viewBox:"0 0 18 18",sx:{display:"block"},children:p.jsx("rect",{x:1,y:1,width:16,height:16,rx:3,style:Tk})})}function qOt(){return p.jsx(Y,{component:"svg",width:32,height:18,viewBox:"0 0 32 18",sx:{display:"block"},children:p.jsx("rect",{x:1,y:1,width:30,height:16,rx:3,style:Tk})})}function GOt(){return p.jsx(Y,{component:"svg",width:32,height:12,viewBox:"0 0 32 12",sx:{display:"block"},children:p.jsx("rect",{x:1,y:1,width:30,height:10,rx:3,style:Tk})})}function qg(t){switch(t.type){case"select":return t.default??t.options[0]?.value??"";case"checkbox":return t.default??!0;case"color":return"";case"instanceSelect":return"";case"citySearch":return"";case"text":return t.default??"";case"stateId":return""}}const Ig=[{value:"1x1",label:"1×1",icon:p.jsx(UOt,{})},{value:"2x1",label:"2×1",icon:p.jsx(qOt,{})},{value:"2x0.5",label:"2×½",icon:p.jsx(GOt,{})}],Yw={clock:{name:"wm_Clock",items:{size:{type:"select",label:"wm_Size",options:Ig,default:"1x1",format:"radio"},color:{type:"color",label:"wm_Color"},style:{type:"select",label:"wm_Style",options:[{value:"digital",label:"wm_Digital"},{value:"analog",label:"wm_Analog"}],default:"digital",format:"radio"},showDate:{type:"checkbox",label:"wm_Show date",default:!0},showDow:{type:"checkbox",label:"wm_Show DOW",default:!0},showSeconds:{type:"checkbox",label:"wm_Show seconds",default:!0}}},weather:{name:"wm_Weather",items:{weatherSource:{type:"select",label:"wm_Weather source",options:[{value:"adapter",label:"wm_Adapter"},{value:"openmeteo",label:"Open-Meteo"},{value:"yrno",label:"yr.no"}],default:"adapter",format:"radio"},adapterInstance:{type:"instanceSelect",label:"wm_Adapter instance",adapterNames:["openweathermap","yr","daswetter","weatherunderground"],visibleWhen:{weatherSource:"adapter"}},cityName:{type:"citySearch",label:"wm_City",visibleWhen:{weatherSource:["openmeteo","yrno"]}},size:{type:"select",label:"wm_Size",options:Ig,default:"2x1",format:"radio"},color:{type:"color",label:"wm_Color"}}},iframe:{name:"wm_Iframe",items:{url:{type:"text",label:"URL",placeholder:"wm_URL placeholder"},refreshInterval:{type:"text",label:"wm_Refresh interval",default:"0",helperText:"wm_Refresh interval help",inputType:"number"},appendTimestamp:{type:"checkbox",label:"wm_Append timestamp",default:!1},clickAction:{type:"select",label:"wm_Click action",options:[{value:"dialog",label:"wm_Open in dialog"},{value:"newTab",label:"wm_Open in new tab"},{value:"sameTab",label:"wm_Open in same tab"}],default:"dialog"},size:{type:"select",label:"wm_Size",options:Ig,default:"2x1",format:"radio"},color:{type:"color",label:"wm_Color"}}},wind:{name:"wm_Wind",items:{directionStateId:{type:"stateId",label:"wm_Wind direction"},speedStateId:{type:"stateId",label:"wm_Wind speed"},gustsStateId:{type:"stateId",label:"wm_Wind gusts"},size:{type:"select",label:"wm_Size",options:Ig,default:"1x1",format:"radio"},color:{type:"color",label:"wm_Color"}}}},JOt={lights:p.jsx(pk,{sx:{fontSize:18}}),climate:p.jsx(ul,{sx:{fontSize:18}}),blinds:p.jsx(qDt,{sx:{fontSize:18}}),openings:p.jsx(cf,{sx:{fontSize:18}}),security:p.jsx(SLt,{sx:{fontSize:18}}),info:p.jsx(dLt,{sx:{fontSize:18}}),widgets:p.jsx(BLt,{sx:{fontSize:18}}),other:p.jsx(_Lt,{sx:{fontSize:18}})};function d4(t){return JOt[t]||null}const KOt={temperature:null,humidity:null,motionActive:!1,openings:[],lowBatteryDevices:[]};function Bw(t,e){if(t.type==="category")return"1 / -1";let n;if(t.type==="widget")n=e[t.id]?.size||"1x1";else{const r=t.data,o=Yw[r.type]?.items.size;n=r.size||(o?String(qg(o)):"1x1")}if(n==="2x0.5"||n==="2x1")return"span 2"}function QA(t){const{id:e,gridColumn:n,isDragging:r,favorite:o,onToggleFavorite:s,children:i}=t,{attributes:a,listeners:d,setNodeRef:m,setActivatorNodeRef:_,transform:h,transition:w}=BOt({id:e}),x={position:"relative",gridColumn:n||void 0,opacity:r?.25:1,transform:Mu.Transform.toString(h),transition:w||void 0};return p.jsxs("div",{ref:m,style:x,...a,children:[p.jsx(Y,{ref:_,...d,sx:S=>({position:"absolute",top:4,left:4,p:"2px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",cursor:"grab",zIndex:3,color:S.palette.text.secondary,opacity:.5,transition:"opacity 0.2s, background-color 0.2s","&:hover":{opacity:1,backgroundColor:S.palette.action.hover}}),children:p.jsx(eLt,{sx:{fontSize:16}})}),s?p.jsx(Y,{component:"span",role:"button",tabIndex:0,onClick:S=>{S.stopPropagation(),s(e)},onKeyDown:S=>{(S.key==="Enter"||S.key===" ")&&(S.stopPropagation(),s(e))},sx:S=>({position:"absolute",top:4,left:24,p:"2px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",zIndex:3,color:o?"#ffc107":S.palette.text.secondary,opacity:o?.9:.4,transition:"opacity 0.2s, color 0.2s","&:hover":{opacity:1}}),children:o?p.jsx(kLt,{sx:{fontSize:16}}):p.jsx(TLt,{sx:{fontSize:16}})}):null,i]})}function XOt(t){const{id:e,children:n}=t,{setNodeRef:r,isOver:o}=qA({id:`drop-cat:${e}`});return p.jsx("div",{ref:r,style:{borderRadius:16,outline:o?"2px dashed #4dabf5":"none",outlineOffset:-2,backgroundColor:o?"rgba(77, 171, 245, 0.08)":void 0,transition:"outline 0.15s ease, background-color 0.15s ease"},children:n})}function ZOt(t){const{category:e,canDrag:n,categoryId:r,onOrderChange:o,onMoveWidgetToCategory:s,widgetSettings:i,onToggleFavorite:a}=t,d=e.getOrderedItems(),m=E.useMemo(()=>d.map(X=>X.id),[d]),[_,h]=E.useState(m),[w,x]=E.useState(null),S=E.useRef(_);S.current=_;const C=E.useRef(m);if(C.current!==m){C.current=m;const X=new Set(_),te=new Set(m);(_.length!==m.length||m.some(ee=>!X.has(ee))||_.some(ee=>!te.has(ee)))&&h(m)}const M=MA(Fw(Uv,{activationConstraint:{distance:5}}),Fw(Ck,{activationConstraint:{delay:200,tolerance:5}})),D=E.useMemo(()=>{const X=new Map;for(const te of d)X.set(te.id,te);return X},[d]),[P,R]=E.useState(null),W=E.useRef(null);W.current=P;const A=E.useCallback(X=>{x(String(X.active.id)),R(null)},[]),N=E.useCallback(X=>{const{active:te,over:ee}=X;if(!ee||te.id===ee.id)return;const le=String(ee.id),ae=D.get(String(te.id)),me=D.get(le);if(ae&&ae.type!=="category"&&me?.type==="category"&&s){R(le);return}if(le.startsWith("drop-cat:")&&ae&&ae.type!=="category"&&s){R(le.replace("drop-cat:",""));return}R(null),h(ie=>{const se=ie.indexOf(String(te.id)),re=ie.indexOf(le);return se<0||re<0?ie:Jv(ie,se,re)})},[D,s]),H=E.useCallback(X=>{x(null);const te=W.current;if(R(null),te&&s){s(String(X.active.id),te);return}const ee=S.current;ee.some((le,ae)=>le!==C.current[ae])&&o?.(r,ee)},[r,o,s]),q=E.useCallback(()=>{x(null),R(null),h(m)},[m]),J=_.map(X=>D.get(X)).filter(Boolean),z=w?D.get(w):null,K=(X,te)=>{if(X.type==="category"){const ee=e.renderCategoryTile(X.data);return te?p.jsx("div",{style:{borderRadius:16,outline:"2px dashed #4dabf5",outlineOffset:-2,backgroundColor:"rgba(77, 171, 245, 0.08)",transition:"outline 0.15s ease, background-color 0.15s ease"},children:ee}):ee}return X.type==="widget"?e.renderWidget(X.data):e.renderCustomWidget(X.data)};return n?p.jsxs(VA,{sensors:M,collisionDetection:$A,onDragStart:A,onDragOver:N,onDragEnd:H,onDragCancel:q,children:[p.jsx(XA,{items:_,strategy:Kv,children:p.jsx(Y,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(135px, 1fr))",gap:1.5},children:J.map(X=>p.jsx(QA,{id:X.id,gridColumn:Bw(X,i),isDragging:X.id===w,favorite:X.type!=="category"?i[X.id]?.favorite:void 0,onToggleFavorite:X.type!=="category"?a:void 0,children:K(X,X.type==="category"&&X.id===P)},X.id))})}),p.jsx(GA,{dropAnimation:null,children:z?p.jsx(Y,{sx:{opacity:.85,pointerEvents:"none"},children:K(z)}):null})]}):p.jsx(Y,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(135px, 1fr))",gap:1.5},children:J.map(X=>{const te=Bw(X,i);return te?p.jsx("div",{style:{gridColumn:te},children:K(X)},X.id):p.jsx(v.Fragment,{children:K(X)},X.id)})})}function $L(t){const{category:e,items:n,canDrag:r,groupId:o,onOrderChange:s,onMoveWidgetToCategory:i,categoryItems:a,widgetSettings:d,onToggleFavorite:m}=t,_=E.useMemo(()=>n.map(ee=>ee.id),[n]),[h,w]=E.useState(_),[x,S]=E.useState(null),[C,M]=E.useState(null),D=E.useRef(null);D.current=C;const P=E.useRef(h);P.current=h;const R=E.useRef(_);if(R.current!==_){R.current=_;const ee=new Set(h),le=new Set(_);(h.length!==_.length||_.some(ae=>!ee.has(ae))||h.some(ae=>!le.has(ae)))&&w(_)}const W=MA(Fw(Uv,{activationConstraint:{distance:5}}),Fw(Ck,{activationConstraint:{delay:200,tolerance:5}})),A=E.useCallback(ee=>{S(String(ee.active.id)),M(null)},[]),N=E.useCallback(ee=>{const{active:le,over:ae}=ee;if(!ae||le.id===ae.id)return;const me=String(ae.id);if(me.startsWith("drop-cat:")&&i){M(me.replace("drop-cat:",""));return}M(null),w(ie=>{const se=ie.indexOf(String(le.id)),re=ie.indexOf(me);return se<0||re<0?ie:Jv(ie,se,re)})},[i]),H=E.useCallback(ee=>{S(null);const le=D.current;if(M(null),le&&i){i(String(ee.active.id),le);return}const ae=P.current;ae.some((me,ie)=>me!==R.current[ie])&&s?.(o,ae)},[o,s,i]),q=E.useCallback(()=>{S(null),M(null),w(_)},[_]),J=E.useMemo(()=>{const ee=new Map;for(const le of n)ee.set(le.id,le);return ee},[n]),z=h.map(ee=>J.get(ee)).filter(Boolean),K=x?J.get(x):null,X=ee=>ee.type==="category"?e.renderCategoryTile(ee.data):ee.type==="widget"?e.renderWidget(ee.data):e.renderCustomWidget(ee.data);if(!r)return p.jsx(Y,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(135px, 1fr))",gap:1.5},children:z.map(ee=>{const le=Bw(ee,d);return le?p.jsx("div",{style:{gridColumn:le},children:X(ee)},ee.id):p.jsx(v.Fragment,{children:X(ee)},ee.id)})});const te=!!x&&!!i&&!!a?.length;return p.jsxs(VA,{sensors:W,collisionDetection:$A,onDragStart:A,onDragOver:N,onDragEnd:H,onDragCancel:q,children:[te?p.jsx(Y,{sx:{mb:1,display:"flex",flexDirection:"column",gap:1},children:a.map(ee=>p.jsx(XOt,{id:ee.id,children:e.renderCategoryTile(ee.data)},`drop-${ee.id}`))}):null,p.jsx(XA,{items:h,strategy:Kv,children:p.jsx(Y,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(135px, 1fr))",gap:1.5},children:z.map(ee=>p.jsx(QA,{id:ee.id,gridColumn:Bw(ee,d),isDragging:ee.id===x,favorite:ee.type!=="category"?d[ee.id]?.favorite:void 0,onToggleFavorite:ee.type!=="category"?m:void 0,children:X(ee)},ee.id))})}),p.jsx(GA,{dropAnimation:null,children:K?p.jsx(Y,{sx:{opacity:.85,pointerEvents:"none"},children:X(K)}):null})]})}function QOt(t){const{widgetIds:e,widgets:n,stateContext:r}=t,o=E.useMemo(()=>{const _=[];for(const h of e){const w=n.find(A=>String(A.id)===h);if(!w?.control?.states)continue;const x=w.control.states,S=x.find(A=>A.name==="ON_SET"),C=x.find(A=>A.name==="ON"),M=x.find(A=>A.name==="SET"),D=x.find(A=>A.name==="ON_ACTUAL"),P=x.find(A=>A.name==="ACTUAL"),R=S?.id??C?.id??M?.id,W=D?.id??S?.id??C?.id??P?.id??R;R&&W&&_.push({widgetId:h,setId:R,listenId:W})}return _},[e,n]),[s,i]=E.useState(0),a=E.useRef({});if(E.useEffect(()=>{if(!o.length)return;const _=[];a.current={};for(const h of o){const w=(x,S)=>{const C=!!S.val;if(a.current[h.widgetId]!==C){a.current[h.widgetId]=C;const M=Object.values(a.current).filter(D=>D).length;i(M)}};r.getState(h.listenId,w),_.push({id:h.listenId,handler:w})}return()=>{for(const h of _)r.removeState(h.id,h.handler);a.current={}}},[o,r]),o.length===0)return null;const d=s>0,m=_=>{_.stopPropagation();const h=!d,w=r.getSocket();for(const x of o)w.setState(x.setId,h)};return p.jsx(ht,{title:d?B.t("wm_Turn all off"):B.t("wm_Turn all on"),children:p.jsx(st,{onClick:m,size:"small",sx:{ml:"auto",p:.5},children:d?p.jsx(pk,{sx:{fontSize:20,color:"warning.main"}}):p.jsx(hk,{sx:{fontSize:20,color:"text.disabled"}})})})}function ejt(t){const{category:e,groups:n,canDrag:r,categoryId:o,onGroupsChange:s,onMoveWidgetToCategory:i,widgetSettings:a,configMode:d,onToggleFavorite:m}=t,_=e.getOrderedItems(),h=E.useMemo(()=>{const D=new Map;for(const P of _)D.set(P.id,P);return D},[_]),w=_.filter(D=>D.type==="category"),x=D=>{if(!s)return;const P=n.map(R=>R.id===D?{...R,collapsed:!R.collapsed}:R);s(o,P)},S=(D,P)=>{if(!s)return;const R=n.map(W=>W.id===D?{...W,widgetIds:P}:W);s(o,R)},C=new Set(n.flatMap(D=>D.widgetIds)),M=_.filter(D=>D.type!=="category"&&!C.has(D.id));return p.jsxs(p.Fragment,{children:[w.length>0?p.jsx(Y,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(135px, 1fr))",gap:1.5,mb:2},children:w.map(D=>p.jsx("div",{style:{gridColumn:"1 / -1"},children:e.renderCategoryTile(D.data)},D.id))}):null,n.map(D=>{const P=D.widgetIds.map(R=>h.get(R)).filter(Boolean);return P.length===0?null:p.jsxs(Y,{sx:{mb:1.5,...!d&&!D.collapsed&&{'&:not(:has([class^="widget-"]))':{display:"none"}}},children:[p.jsxs(Y,{sx:{display:"flex",alignItems:"center",mb:D.collapsed?0:.5},children:[p.jsxs(vr,{onClick:()=>x(D.id),sx:{display:"flex",alignItems:"center",gap:.5,flex:1,justifyContent:"flex-start",py:.5,px:1,borderRadius:1},children:[p.jsx(oLt,{sx:{fontSize:18,color:"text.secondary",transform:D.collapsed?"rotate(-90deg)":"rotate(0)",transition:"transform 0.2s"}}),(()=>{const R=d4(D.id);return R?v.cloneElement(R,{sx:{fontSize:18,color:"text.secondary"}}):null})(),p.jsx(oe,{variant:"subtitle2",sx:{fontWeight:600,color:"text.secondary"},children:B.t(D.name)}),p.jsxs(oe,{variant:"caption",sx:{ml:.5,opacity:.5,color:"text.secondary"},children:["(",P.length,")"]})]}),D.id==="lights"?p.jsx(QOt,{widgetIds:D.widgetIds,widgets:e.props.widgets,stateContext:e.props.stateContext}):null]}),D.collapsed?null:p.jsx($L,{category:e,items:P,canDrag:r,groupId:D.id,onOrderChange:s?S:void 0,onMoveWidgetToCategory:i,categoryItems:w,widgetSettings:a,onToggleFavorite:m})]},D.id)}),M.length>0?p.jsxs(Y,{sx:{mb:1.5},children:[p.jsx(oe,{variant:"subtitle2",sx:{fontWeight:600,color:"text.secondary",px:1,py:.5},children:B.t("wm_group_Other")}),p.jsx($L,{category:e,items:M,canDrag:r,groupId:"__ungrouped__",onMoveWidgetToCategory:i,categoryItems:w,widgetSettings:a,onToggleFavorite:m})]}):null]})}class ma extends E.Component{internalValues={names:{},icons:{},colors:{}};statusSubs=[];statusValues={};scrollRef=v.createRef();parallaxRef=v.createRef();scrollSaveTimer=null;constructor(e){super(e),this.state={names:{},icons:{},colors:{},categoryStatus:{...KOt},subCategoryStatuses:{}}}get widgets(){return this.props.widgets.filter(e=>e.parent===this.props.category.id)}get subCategories(){return this.props.categories.filter(e=>e.parent===this.props.category.id)}readCategorySettings(e,n){e.name&&typeof e.name=="object"?e.name.objectId?this.props.stateContext.getObjectProperty(e.name.objectId,e.name.property,this.onNameChange):n.names[e.id]=this.getText(e.name):typeof typeof e.name=="string"&&(n.names[e.id]=e.name),n.names[e.id]||=e.id==="__root__"?"ioBroker":e.id.toString().split(".").pop()||"",e.icon&&typeof e.icon=="object"?e.icon.stateId&&this.props.stateContext.getState(e.icon.stateId,this.onIconChange):typeof e.icon=="string"&&(n.icons[e.id]=e.icon),e.color&&typeof e.color=="object"?e.color.stateId&&this.props.stateContext.getState(e.color.stateId,this.onColorChange):typeof e.color=="string"&&(n.colors[e.id]=e.color)}componentDidMount(){this.internalValues={names:{},icons:{},colors:{}},this.readCategorySettings(this.props.category,this.internalValues),this.subCategories.forEach(e=>this.readCategorySettings(e,this.internalValues)),this.setState({...this.internalValues}),this.subscribeCategoryStatus(),requestAnimationFrame(()=>this.restoreScrollPosition())}componentWillUnmount(){this.saveScrollPosition(),this.scrollSaveTimer&&clearTimeout(this.scrollSaveTimer);for(const e of this.statusSubs)this.props.stateContext.removeState(e.stateId,this.onStatusChange)}get scrollStorageKey(){return`wm_scroll_${String(this.props.category.id)}`}static getOrientation(){return window.innerHeight>=window.innerWidth?"portrait":"landscape"}saveScrollPosition(){const e=this.scrollRef.current;if(e)try{localStorage.setItem(this.scrollStorageKey,JSON.stringify({top:e.scrollTop,orientation:ma.getOrientation()}))}catch{}}restoreScrollPosition(){const e=this.scrollRef.current;if(e)try{const n=localStorage.getItem(this.scrollStorageKey);if(n){const{top:r,orientation:o}=JSON.parse(n);o===ma.getOrientation()&&typeof r=="number"&&(e.scrollTop=r)}}catch{}}onScroll=()=>{if(this.scrollSaveTimer&&clearTimeout(this.scrollSaveTimer),this.scrollSaveTimer=setTimeout(()=>{this.scrollSaveTimer=null,this.saveScrollPosition()},300),this.parallaxRef.current&&this.scrollRef.current){const e=this.scrollRef.current.scrollTop;this.parallaxRef.current.style.transform=`translateY(${e*-.25}px) scale(1.15)`}};getWidgetName(e){return typeof e.name=="string"?e.name||"":e.name&&typeof e.name=="object"&&e.name.en?this.getText(e.name):""}subscribeWidgetsForStatus(e,n){for(const r of e){const o=r.control?.type;if(!o)continue;let s=null;if(o===Ae.Types.temperature?s="temperature":o===Ae.Types.humidity?s="humidity":o===Ae.Types.motion?s="motion":o===Ae.Types.window?s="window":o===Ae.Types.door&&(s="door"),s){const m=r.control.states.find(_=>_.name==="ACTUAL");if(m?.id&&!this.statusSubs.some(_=>_.stateId===m.id&&_.categoryId===n)){const _=s==="window"||s==="door";this.statusSubs.push({stateId:m.id,role:s,widgetName:_?this.getWidgetName(r):void 0,widgetIcon:_&&typeof r.icon=="string"?r.icon:void 0,widgetId:_?String(r.id):void 0,categoryId:n}),this.props.stateContext.getState(m.id,this.onStatusChange)}if(o===Ae.Types.temperature){const _=r.control.states.find(h=>h.name==="SECOND");_?.id&&!this.statusSubs.some(h=>h.stateId===_.id&&h.categoryId===n)&&(this.statusSubs.push({stateId:_.id,role:"humidity",categoryId:n}),this.props.stateContext.getState(_.id,this.onStatusChange))}}else{const m=r.control.states.find(_=>_.name==="ACTUAL")||r.control.states.find(_=>_.name==="SET")||r.control.states.find(_=>_.name==="ON");m?.id&&!this.statusSubs.some(_=>_.stateId===m.id&&_.categoryId===n)&&(this.statusSubs.push({stateId:m.id,role:"sensor",widgetId:String(r.id),categoryId:n}),this.props.stateContext.getState(m.id,this.onStatusChange))}const i=this.getWidgetName(r),a=r.control.states.find(m=>m.name==="LOWBAT");a?.id&&!this.statusSubs.some(m=>m.stateId===a.id&&m.categoryId===n)&&(this.statusSubs.push({stateId:a.id,role:"lowbat",widgetName:i,categoryId:n}),this.props.stateContext.getState(a.id,this.onStatusChange));const d=r.control.states.find(m=>m.name==="BATTERY");d?.id&&!this.statusSubs.some(m=>m.stateId===d.id&&m.categoryId===n)&&(this.statusSubs.push({stateId:d.id,role:"battery",widgetName:i,categoryId:n}),this.props.stateContext.getState(d.id,this.onStatusChange))}}subscribeCategoryStatus(){this.statusSubs=[],this.statusValues={};const e=this.props.widgets.filter(n=>n.parent===this.props.category.id);this.subscribeWidgetsForStatus(e);for(const n of this.subCategories){const r=this.props.widgets.filter(o=>o.parent===n.id);this.subscribeWidgetsForStatus(r,String(n.id))}}onStatusChange=(e,n)=>{this.statusValues[e]=n.val,this.recalcCategoryStatus()};static toOpeningState(e){return typeof e=="number"&&e===2?2:e?1:0}static computeStatus(e,n){let r=null,o=null,s=!1;const i=[],a=[],d=new Set;for(const m of e){const _=n[m.stateId];switch(m.role){case"temperature":if(r===null&&_!=null){const h=Number(_);isNaN(h)||(r=h)}break;case"humidity":if(o===null&&_!=null){const h=Number(_);isNaN(h)||(o=h)}break;case"motion":_&&(s=!0);break;case"window":case"door":i.push({stateId:m.stateId,kind:m.role==="door"?"door":"window",name:m.widgetName||"",state:_!=null?ma.toOpeningState(_):0,icon:m.widgetIcon,widgetId:m.widgetId});break;case"lowbat":_&&m.widgetName&&!d.has(m.widgetName)&&(d.add(m.widgetName),a.push({name:m.widgetName,level:null}));break;case"battery":{const h=_!=null?Number(_):null;h!=null&&!isNaN(h)&&h<30&&m.widgetName&&!d.has(m.widgetName)&&(d.add(m.widgetName),a.push({name:m.widgetName,level:Math.round(h)}));break}}}return{temperature:r,humidity:o,motionActive:s,openings:i,lowBatteryDevices:a}}recalcCategoryStatus(){const e=this.statusSubs.filter(s=>!s.categoryId),n=ma.computeStatus(e,this.statusValues),r={},o=new Set(this.statusSubs.map(s=>s.categoryId).filter(Boolean));for(const s of o){const i=this.statusSubs.filter(a=>a.categoryId===s);r[s]=ma.computeStatus(i,this.statusValues)}this.setState({categoryStatus:n,subCategoryStatuses:r})}onNameChange=(e,n,r)=>{const o=this.getText(r),s=this.props.category.name;let i=!1;this.props.category.name&&typeof this.props.category.name=="object"&&s.objectId&&s.objectId===e&&s.property===n&&o!==this.internalValues.names[this.props.category.id]&&(this.internalValues.names[this.props.category.id]=o,i=!0),this.subCategories.forEach(a=>{if(a.name&&typeof a.name=="object"){const d=a.name;d.objectId===e&&d.property===n&&o!==this.internalValues.names[a.id]&&(this.internalValues.names[a.id]=o,i=!0)}}),i&&this.setState({names:this.internalValues.names})};onColorChange=(e,n)=>{let r=!1;if(this.props.category.color&&typeof this.props.category.color=="object"){const o=this.props.category.color;if(o.stateId===e){let s="";o.mapping&&o.mapping[n.val]?s=o.mapping[n.val]:n.val!==void 0&&n.val!==null&&(s=n.val||""),s!==this.internalValues.colors[this.props.category.id]&&(this.internalValues.colors[this.props.category.id]=s,r=!0)}}this.subCategories.forEach(o=>{if(o.color&&typeof o.color=="object"){const s=o.color;if(s.stateId===e){let i="";s.mapping&&s.mapping[n.val]?i=s.mapping[n.val]:n.val!==void 0&&n.val!==null&&(i=n.val||""),i!==this.internalValues.colors[o.id]&&(this.internalValues.colors[o.id]=i,r=!0)}}}),r&&this.setState({colors:this.internalValues.colors})};onIconChange=(e,n)=>{let r=!1;if(this.props.category.icon&&typeof this.props.category.icon=="object"){const o=this.props.category.icon;if(o.stateId===e){let s="";o.mapping&&o.mapping[n.val]?s=o.mapping[n.val]:n.val!==void 0&&n.val!==null&&(s=n.val||""),s!==this.internalValues.icons[this.props.category.id]&&(this.internalValues.icons[this.props.category.id]=s,r=!0)}}this.subCategories.forEach(o=>{if(o.icon&&typeof o.icon=="object"){const s=o.icon;if(s.stateId===e){let i="";s.mapping&&s.mapping[n.val]?i=s.mapping[n.val]:n.val!==void 0&&n.val!==null&&(i=n.val||""),i!==this.internalValues.icons[o.id]&&(this.internalValues.icons[o.id]=i,r=!0)}}}),r&&this.setState({icons:this.internalValues.icons})};getOrderedItems(){const e=String(this.props.category.id),n=this.props.categorySettings[e],r=n?.customWidgets||[],o=n?.widgetOrder,s=[...this.subCategories.map(m=>({type:"category",id:String(m.id),data:m})),...this.widgets.map(m=>({type:"widget",id:String(m.id),data:m})),...r.map(m=>({type:"custom",id:m.id,data:m}))];if(!o?.length)return s;const i=new Map(o.map((m,_)=>[m,_])),a=s.filter(m=>i.has(m.id)).sort((m,_)=>i.get(m.id)-i.get(_.id)),d=s.filter(m=>!i.has(m.id));return[...a,...d]}getText(e){return typeof e=="object"?e[this.props.language]||e.en:e}renderWidget(e){let n;if(e.control&&e.control.type===Ae.Types.socket?n=gA:e.control&&e.control.type===Ae.Types.light?n=s7t:e.control&&e.control.type===Ae.Types.dimmer?n=i7t:e.control&&e.control.type===Ae.Types.temperature?n=jw:e.control&&e.control.type===Ae.Types.motion?n=u7t:e.control&&e.control.type===Ae.Types.window?n=yA:e.control&&e.control.type===Ae.Types.blind?n=m7t:e.control&&e.control.type===Ae.Types.blindButtons?n=f7t:e.control&&e.control.type===Ae.Types.lock?n=g7t:e.control&&e.control.type===Ae.Types.door?n=y7t:e.control&&e.control.type===Ae.Types.floodAlarm?n=w7t:e.control&&e.control.type===Ae.Types.fireAlarm?n=v7t:e.control&&e.control.type===Ae.Types.humidity?n=_k:e.control&&e.control.type===Ae.Types.illuminance?n=gk:e.control&&e.control.type===Ae.Types.thermostat?n=Un:e.control&&e.control.type===Ae.Types.airCondition?n=gn:e.control&&e.control.type===Ae.Types.warning?n=_7t:e.control&&(e.control.type===Ae.Types.volume||e.control.type===Ae.Types.volumeGroup)?n=k7t:e.control&&(e.control.type===Ae.Types.slider||e.control.type===Ae.Types.percentage)?n=H7t:e.control?.type===Ae.Types.info&&e.control.states.some(o=>o.name==="ACTUAL"&&/value\.fill|level\.tank|tank/i.test(o.stateRole||""))?n=F7t:e.control&&e.control.type===Ae.Types.image?n=W7t:e.control&&e.control.type===Ae.Types.info?n=ha:e.control&&(e.control.type===Ae.Types.location||e.control.type===Ae.Types.locationOne)?n=Aw:e.control&&e.control.type===Ae.Types.weatherCurrent?n=B7t:e.control&&e.control.type===Ae.Types.weatherForecast?n=jp:e.control&&(e.control.type===Ae.Types.rgbSingle||e.control.type===Ae.Types.rgbwSingle||e.control.type===Ae.Types.rgb||e.control.type===Ae.Types.hue||e.control.type===Ae.Types.cie||e.control.type===Ae.Types.ct)&&(n=D7t),!n){const s=this.props.widgetSettings[String(e.id)]?.size||"1x1",i=e.control?.type||"?";return p.jsxs(Y,{id:String(e.id),sx:a=>({position:"relative",...s==="2x0.5"?{gridColumn:"span 2",height:80}:s==="2x1"?{gridColumn:"span 2",aspectRatio:"2"}:{aspectRatio:"1"},display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:1,p:2,borderRadius:3,border:"2px dashed",borderColor:"error.main",backgroundColor:Tt(a.palette.error.main,.08),textAlign:"center",overflow:"hidden"}),children:[p.jsx(rLt,{sx:{fontSize:32,color:"error.main",opacity:.7}}),p.jsx(oe,{variant:"caption",sx:{color:"error.main",fontWeight:500,lineHeight:1.3},children:B.t("wm_Widget type not supported").replace("%s",i)}),this.props.onDeleteWidgetById?p.jsx(ht,{title:B.t("wm_Delete"),children:p.jsx(st,{size:"small",color:"error",onClick:()=>this.props.onDeleteWidgetById(e.id),children:p.jsx(Do,{fontSize:"small"})})}):null]},e.id)}const r=this.props.widgetSettings[String(e.id)];return p.jsx(n,{stateContext:this.props.stateContext,widget:e,language:this.props.language,settings:r,onOpenSettings:this.props.onOpenSettings,defaultHistory:this.props.defaultHistory,instanceId:this.props.instanceId},e.id)}renderCustomWidget(e){const n=String(this.props.category.id),r=this.props.onOpenCustomWidgetSettings?()=>this.props.onOpenCustomWidgetSettings(n,e.id):void 0,o=this.props.onRemoveCustomWidget?()=>this.props.onRemoveCustomWidget(n,e.id):void 0;switch(e.type){case"clock":return p.jsx(C7t,{id:e.id,language:this.props.language,size:e.size,color:e.color,style:e.style,showDate:e.showDate,showDow:e.showDow,showSeconds:e.showSeconds,onOpenSettings:r,onRemove:o,latitude:this.props.latitude,longitude:this.props.longitude},e.id);case"weather":return p.jsx(rd,{id:e.id,weatherSource:e.weatherSource,adapterInstance:e.adapterInstance,latitude:e.latitude,longitude:e.longitude,cityName:e.cityName,language:this.props.language,size:e.size,color:e.color,stateContext:this.props.stateContext,onOpenSettings:r,onRemove:o},e.id);case"iframe":return p.jsx(tf,{id:e.id,url:e.url,refreshInterval:e.refreshInterval,appendTimestamp:e.appendTimestamp,clickAction:e.clickAction,size:e.size,color:e.color,onOpenSettings:r,onRemove:o},e.id);case"wind":return p.jsx(od,{id:e.id,language:this.props.language,directionStateId:e.directionStateId,speedStateId:e.speedStateId,gustsStateId:e.gustsStateId,size:e.size,color:e.color,stateContext:this.props.stateContext,onOpenSettings:r,onRemove:o},e.id);default:return null}}renderWidgetIconPreviews(e){const n=new Set([Ae.Types.floodAlarm,Ae.Types.fireAlarm,Ae.Types.warning]),r=this.props.widgets.filter(s=>s.parent===e.id&&s.control?.type&&n.has(s.control.type));if(!r.length)return null;const o=[];for(const s of r){if(o.length>=8)break;const i=s.control.states.find(h=>h.name==="ACTUAL")||s.control.states.find(h=>h.name==="SET")||s.control.states.find(h=>h.name==="ON");if(i?.id){if(!this.statusValues[i.id])continue}else continue;const a=typeof s.name=="object"?s.name[B.getLanguage()]||s.name.en||"":String(s.name||""),d=this.props.widgetSettings[String(s.id)],m=d?.iconActive||d?.iconInactive||d?.icon||(typeof s.icon=="string"?s.icon:void 0),_=d?.color;o.push({id:s.id,src:m,name:a,type:s.control.type,color:_})}return o.length?p.jsx(Y,{sx:{display:"flex",alignItems:"center",gap:.5,mt:.25},children:o.map(s=>p.jsx(ht,{title:s.name,children:p.jsx(Y,{sx:{display:"flex"},children:s.src?p.jsx(Gn,{src:s.src,style:{width:16,height:16,color:s.color||void 0}}):ma.renderDefaultTypeIcon(s.type,16)})},s.id))}):null}renderSubCategoryStatus(e,n){const r=this.state.subCategoryStatuses[String(e.id)],o=r?r.openings.filter(a=>a.state!==0):[],s=r&&(r.temperature!==null||r.humidity!==null||r.motionActive||o.length>0||r.lowBatteryDevices.length>0),i=this.renderWidgetIconPreviews(e);return s?p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:1,flexWrap:"wrap",mt:.25},children:[r.temperature!==null?p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:"2px"},children:[p.jsx(ul,{sx:{fontSize:14,color:"text.secondary"}}),p.jsxs(oe,{variant:"caption",sx:{color:"text.secondary",fontWeight:500},children:[r.temperature.toFixed(1),"°"]})]}):null,r.humidity!==null?p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:"2px"},children:[p.jsx(Hs,{sx:{fontSize:14,color:"text.secondary"}}),p.jsxs(oe,{variant:"caption",sx:{color:"text.secondary",fontWeight:500},children:[Math.round(r.humidity),"%"]})]}):null,r.motionActive?p.jsx(ht,{title:B.t("wm_Motion"),children:p.jsx(B0,{sx:{fontSize:16,color:"warning.main"}})}):null,o.length>0?p.jsx(Y,{sx:{display:"flex",alignItems:"center",gap:"3px"},children:o.map(a=>{const d=a.widgetId?this.props.widgetSettings[a.widgetId]:void 0,_=(d?d.iconActive||d.iconInactive||d.icon:void 0)||a.icon,h=d?.color,w=ma.getOpeningColor(a),x=h||w,S=d?.textActive,C=S?`${a.name}: ${S}`:ma.getOpeningTooltip(a);return p.jsx(ht,{title:C,children:_?p.jsx(Y,{sx:{display:"flex"},children:p.jsx(Gn,{src:_,style:{width:16,height:16,color:x}})}):a.kind==="door"?p.jsx(Bp,{sx:{fontSize:16,color:x,transition:"color 0.25s ease"}}):p.jsx(cf,{sx:{fontSize:16,color:x,transform:a.state===2?"rotate(15deg)":void 0,transition:"color 0.25s ease"}})},a.stateId)})}):null,r.lowBatteryDevices.length>0?p.jsx(ht,{title:r.lowBatteryDevices.map(a=>`${a.name}${a.level!=null?`: ${a.level}%`:""}`).join(", "),children:p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:"2px"},children:[p.jsx(Lw,{sx:{fontSize:16,color:"error.main"}}),r.lowBatteryDevices.length>1?p.jsx(oe,{variant:"caption",sx:{color:"error.main",fontWeight:600},children:r.lowBatteryDevices.length}):null]})}):null,i]}):i||(n>0?p.jsx(oe,{variant:"caption",sx:{color:"text.secondary"},children:n===1?B.t("wm_one_device"):B.t("wm_n_devices",n.toString())}):p.jsx(p.Fragment,{}))}renderCategoryTile(e){const n=this.state.icons[e.id],r=this.state.names[e.id]??"...",o=this.props.categorySettings[String(e.id)],s=this.state.colors[e.id]||o?.color,i=o?.image,a=i?`/${this.props.admin?"../../files/":"../"}${i.replace(/^\//,"")}`:"",d=this.props.widgets.filter(m=>m.parent===e.id).length;return p.jsxs(vr,{id:String(e.id),component:"div",onClick:()=>this.props.onNavigate(e),sx:m=>({display:"flex",alignItems:"center",gap:2,width:"100%",gridColumn:"1 / -1",textAlign:"left",overflow:"hidden",borderRadius:"16px",p:2,position:"relative",transition:"all 0.25s cubic-bezier(0.4, 0, 0.2, 1)",backgroundColor:m.palette.mode==="dark"?"rgba(255,255,255,0.04)":"rgba(0,0,0,0.02)",borderLeft:`3px solid ${s||m.palette.primary.main}`,...a?{backgroundImage:`url(${a})`,backgroundSize:"cover",backgroundPosition:"center"}:{},"&:hover":{backgroundColor:m.palette.mode==="dark"?"rgba(255,255,255,0.07)":"rgba(0,0,0,0.04)"},"&:active":{transform:"scale(0.99)"},...a?{"&::before":{content:'""',position:"absolute",inset:0,backgroundColor:Tt(m.palette.background.default,.75),borderRadius:"inherit"}}:{}}),children:[n?p.jsx(Gn,{src:n,style:{width:28,height:28,flexShrink:0,color:s||void 0,position:"relative",zIndex:1}}):p.jsx(Ow,{sx:m=>({fontSize:28,color:s||m.palette.primary.main,flexShrink:0,position:"relative",zIndex:1})}),p.jsxs(Y,{sx:{flex:1,minWidth:0,position:"relative",zIndex:1},children:[p.jsx(oe,{variant:"body1",sx:{fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:s||void 0},children:r}),this.renderSubCategoryStatus(e,d)]}),p.jsx(JDt,{sx:{color:"text.secondary",flexShrink:0,position:"relative",zIndex:1}})]},e.id)}static getOpeningTooltip(e){const n=e.name||(e.kind==="door"?B.t("wm_Door"):B.t("wm_Window"));return e.state===0?`${n}: ${B.t("wm_Closed")}`:e.state===2?`${n}: ${B.t("wm_Tilted")}`:`${n}: ${B.t("wm_Open")}`}static renderDefaultTypeIcon(e,n){const r={fontSize:n,color:"grey"};switch(e){case Ae.Types.window:return p.jsx(cf,{sx:r});case Ae.Types.door:return p.jsx(Bp,{sx:r});case Ae.Types.fireAlarm:return p.jsx(Ps,{sx:r});case Ae.Types.floodAlarm:return p.jsx(FLt,{sx:r});case Ae.Types.motion:return p.jsx(B0,{sx:r});case Ae.Types.warning:return p.jsx(mA,{sx:r});default:return p.jsx(Y0,{sx:r})}}static getOpeningColor(e){return e.state===0?"text.disabled":e.state===2?"info.main":"warning.main"}renderCategoryStatus(){const{temperature:e,humidity:n,motionActive:r,openings:o,lowBatteryDevices:s}=this.state.categoryStatus,i=o.filter(d=>d.state!==0);return e!==null||n!==null||r||i.length>0||s.length>0?p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:2,mb:1.5,px:.5,flexWrap:"wrap"},children:[e!==null?p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:.5},children:[p.jsx(ul,{sx:{fontSize:18,color:"text.secondary"}}),p.jsxs(oe,{variant:"body2",sx:{fontWeight:500,color:"text.secondary"},children:[e.toFixed(1),"°"]})]}):null,n!==null?p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:.5},children:[p.jsx(Hs,{sx:{fontSize:18,color:"text.secondary"}}),p.jsxs(oe,{variant:"body2",sx:{fontWeight:500,color:"text.secondary"},children:[Math.round(n),"%"]})]}):null,r?p.jsx(ht,{title:B.t("wm_Motion"),children:p.jsx(B0,{sx:{fontSize:20,color:"warning.main"}})}):null,i.length>0?p.jsx(Y,{sx:{display:"flex",alignItems:"center",gap:.5},children:i.map(d=>{const m=d.widgetId?this.props.widgetSettings[d.widgetId]:void 0,h=(m?m.iconActive||m.iconInactive||m.icon:void 0)||d.icon,w=m?.color,x=ma.getOpeningColor(d),S=w||x,C=m?.textActive,M=C?`${d.name}: ${C}`:ma.getOpeningTooltip(d);return p.jsx(ht,{title:M,children:h?p.jsx(Y,{sx:{display:"flex"},children:p.jsx(Gn,{src:h,style:{width:20,height:20,color:S}})}):d.kind==="door"?p.jsx(Bp,{sx:{fontSize:20,color:S,transition:"color 0.25s ease"}}):p.jsx(cf,{sx:{fontSize:20,color:S,transform:d.state===2?"rotate(15deg)":void 0,transition:"color 0.25s ease, transform 0.25s ease"}})},d.stateId)})}):null,s.length>0?p.jsx(Y,{sx:{display:"flex",alignItems:"center",gap:.5},children:s.map(d=>p.jsx(ht,{title:`${d.name}${d.level!=null?`: ${d.level}%`:""}`,children:p.jsx(Lw,{sx:{fontSize:20,color:"error.main"}})},d.name))}):null]}):null}render(){const e=this.props.category.parent?this.props.categories.find(D=>String(D.id)===String(this.props.category.parent)):void 0,n=!this.props.category.parent,r=n&&!!SA(),o=this.props.categorySettings[String(this.props.category.id)]?.customWidgets||[],s=this.subCategories.length>0||this.widgets.length>0||o.length>0,i=String(this.props.category.id),a=this.props.categorySettings[i],d=a?.widgetGroups,m=!!(e||this.state.names[this.props.category.id]||a?.name||this.props.onOpenCategorySettings),_=a?.image,h=_?`${this.props.admin?"../../files/":"../"}${_.replace(/^\//,"")}`:"",w=a?.imageScope||"header",x=a?.color,S=a?.backgroundColor,C=a?.name||this.state.names[this.props.category.id]||(n?"":"..."),M=h?{backgroundImage:`url(${h})`,backgroundSize:"cover",backgroundPosition:"center"}:{};return p.jsxs(Y,{id:String(this.props.category.id),sx:{display:"flex",flexDirection:"column",height:"100%",overflow:"hidden",...S?{backgroundColor:S}:{},position:"relative"},children:[h&&w==="page"?p.jsxs(p.Fragment,{children:[p.jsx(Y,{ref:this.parallaxRef,sx:{position:"absolute",inset:0,backgroundImage:`url(${h})`,backgroundSize:"cover",backgroundPosition:"center",transform:"scale(1.15)",willChange:"transform",zIndex:0}}),p.jsx(Y,{sx:D=>({position:"absolute",inset:0,backgroundColor:Tt(S||D.palette.background.default,.75),zIndex:0})})]}):null,!m&&this.props.onToggleConfigMode?p.jsxs(Y,{sx:{position:"absolute",top:8,right:8,zIndex:2,display:"flex",gap:.5},children:[r&&this.props.configMode&&this.props.onInstallSidePanel?p.jsx(ht,{title:B.t("wm_Install as Side Panel"),children:p.jsx(st,{size:"small",onClick:this.props.onInstallSidePanel,sx:{opacity:.35,"&:hover":{opacity:1}},children:p.jsx(UD,{fontSize:"small",sx:{fontSize:18}})})}):null,p.jsx(ht,{title:B.t(this.props.configMode?"wm_Play mode":"wm_Config mode"),children:p.jsx(st,{size:"small",onClick:this.props.onToggleConfigMode,sx:{opacity:this.props.configMode?.5:.35,"&:hover":{opacity:1}},children:this.props.configMode?p.jsx(VD,{fontSize:"small"}):p.jsx(Y0,{fontSize:"small",sx:{fontSize:18}})})})]}):null,m?p.jsxs(Y,{sx:D=>({flexShrink:0,p:1,pb:0,position:"relative",zIndex:1,...h&&w==="header"?{...M,borderRadius:"0 0 16px 16px","&::before":{content:'""',position:"absolute",inset:0,backgroundColor:Tt(S||D.palette.background.default,.7),borderRadius:"inherit"}}:{}}),children:[p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:1,mb:1,px:.5,position:"relative"},children:[e?p.jsxs(Y,{onClick:()=>this.props.onNavigate(e),sx:{display:"flex",alignItems:"center",gap:1,flex:1,minWidth:0,cursor:"pointer",ml:-.5},children:[p.jsx(FDt,{sx:{color:x||void 0,fontSize:24}}),(()=>{const D=this.state.icons[this.props.category.id];return D?p.jsx(Gn,{src:D,style:{width:28,height:28,color:x||void 0}}):null})(),p.jsx(oe,{variant:"h5",sx:{fontWeight:700,flex:1,color:x||void 0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:C})]}):p.jsxs(p.Fragment,{children:[(()=>{const D=a?.rootIcon,R=(D?`${this.props.admin?"../../files/":"../"}${D.replace(/^\//,"")}`:"")||this.state.icons[this.props.category.id];return R?p.jsx(Gn,{src:R,style:{width:28,height:28,color:x||void 0}}):null})(),p.jsx(oe,{variant:"h5",sx:{fontWeight:700,flex:1,color:x||void 0},children:C})]}),this.props.onAddCustomWidget?p.jsx(ht,{title:B.t("wm_Add widget"),children:p.jsx(st,{size:"small",onClick:()=>this.props.onAddCustomWidget(i),sx:{opacity:.5,"&:hover":{opacity:1}},children:p.jsx(dk,{fontSize:"small"})})}):null,this.props.onToggleGrouping?p.jsx(ht,{title:B.t(d?.length?"wm_Ungroup widgets":"wm_Group by type"),children:p.jsx(st,{size:"small",onClick:()=>this.props.onToggleGrouping(i,this.getOrderedItems()),sx:{opacity:d?.length?.7:.5,"&:hover":{opacity:1}},children:d?.length?p.jsx(ALt,{fontSize:"small"}):p.jsx(ULt,{sx:{fontSize:18}})})}):null,this.props.onOpenCategorySettings?p.jsx(ht,{title:B.t("wm_Category settings"),children:p.jsx(st,{size:"small",onClick:()=>this.props.onOpenCategorySettings(i),sx:{opacity:.5,"&:hover":{opacity:1}},children:p.jsx(fh,{fontSize:"small"})})}):null,r&&this.props.configMode&&this.props.onInstallSidePanel?p.jsx(ht,{title:B.t("wm_Install as Side Panel"),children:p.jsx(st,{size:"small",onClick:this.props.onInstallSidePanel,sx:{opacity:.35,"&:hover":{opacity:1}},children:p.jsx(UD,{fontSize:"small",sx:{fontSize:18}})})}):null,this.props.onToggleConfigMode?p.jsx(ht,{title:B.t(this.props.configMode?"wm_Play mode":"wm_Config mode"),children:p.jsx(st,{size:"small",onClick:this.props.onToggleConfigMode,sx:{opacity:this.props.configMode?.5:.35,"&:hover":{opacity:1}},children:this.props.configMode?p.jsx(VD,{fontSize:"small"}):p.jsx(Y0,{fontSize:"small",sx:{fontSize:18}})})}):null]}),p.jsxs(Y,{sx:{position:"relative",display:"flex",alignItems:"center"},children:[p.jsx(Y,{sx:{flex:1},children:this.renderCategoryStatus()}),d?.length&&this.props.onWidgetGroupsChange?p.jsxs(Y,{sx:{display:"flex",ml:"auto"},children:[p.jsx(ht,{title:B.t("wm_Expand all"),children:p.jsx(st,{size:"small",onClick:()=>{const D=d.map(P=>({...P,collapsed:!1}));this.props.onWidgetGroupsChange(i,D)},sx:{opacity:.5,"&:hover":{opacity:1}},children:p.jsx(jLt,{sx:{fontSize:18}})})}),p.jsx(ht,{title:B.t("wm_Collapse all"),children:p.jsx(st,{size:"small",onClick:()=>{const D=d.map(P=>({...P,collapsed:!0}));this.props.onWidgetGroupsChange(i,D)},sx:{opacity:.5,"&:hover":{opacity:1}},children:p.jsx(OLt,{sx:{fontSize:18}})})})]}):null]})]}):null,s?p.jsx(Y,{ref:this.scrollRef,onScroll:this.onScroll,sx:{flex:1,overflow:"auto",p:1,pt:m?.5:2,position:"relative",zIndex:1},children:d?.length?p.jsx(ejt,{category:this,groups:d,canDrag:!!this.props.onWidgetOrderChange,categoryId:String(this.props.category.id),onGroupsChange:this.props.onWidgetGroupsChange,onMoveWidgetToCategory:this.props.onMoveWidgetToCategory,widgetSettings:this.props.widgetSettings,configMode:this.props.configMode,onToggleFavorite:this.props.onToggleFavorite}):p.jsx(ZOt,{category:this,canDrag:!!this.props.onWidgetOrderChange,categoryId:String(this.props.category.id),onOrderChange:this.props.onWidgetOrderChange,onMoveWidgetToCategory:this.props.onMoveWidgetToCategory,widgetSettings:this.props.widgetSettings,onToggleFavorite:this.props.onToggleFavorite})}):null]},this.props.category.id)}}function EL(t){const e=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="${t}"/></svg>`;return`data:image/svg+xml,${encodeURIComponent(e)}`}const tjt=[{id:"lightbulb",label:"Lightbulb",category:"lights",path:"M12,6C15.31,6 18,8.69 18,12C18,14.22 16.79,16.16 15,17.2V19C15,19.55 14.55,20 14,20H10C9.45,20 9,19.55 9,19V17.2C7.21,16.16 6,14.22 6,12C6,8.69 8.69,6 12,6M14,21V22C14,22.55 13.55,23 13,23H11C10.45,23 10,22.55 10,22V21H14M20,11H23V13H20V11M1,11H4V13H1V11M13,1V4H11V1H13M4.92,3.5L7.05,5.64L5.63,7.05L3.5,4.93L4.92,3.5M16.95,5.63L19.07,3.5L20.5,4.93L18.37,7.05L16.95,5.63Z"},{id:"ceiling_light",label:"Ceiling light",category:"lights",path:"M8,9H11V4H13V9H16L20,17H4L8,9M14,18C14,19.1 13.1,20 12,20C10.9,20 10,19.1 10,18H14Z"},{id:"lamp",label:"Lamp",category:"lights",path:"M8,2H16L20,14H4L8,2M11,15H13V20H18V22H6V20H11V15Z"},{id:"led_strip",label:"LED strip",category:"lights",path:"M2.81,8.46L14.83,20.5L15.54,19.78L16.95,21.19L18.36,19.78L16.95,18.36L18.36,16.95L19.78,18.36L21.19,16.95L19.78,15.54L20.5,14.83L8.46,2.81L2.81,8.46M5.64,8.46L8.46,5.64L17.66,14.83L14.83,17.66L5.64,8.46M7.05,8.46L8.46,9.88L9.88,8.46L8.46,7.05L7.05,8.46M9.17,10.59L10.59,12L12,10.59L10.59,9.17L9.17,10.59M11.29,12.71L12.71,14.12L14.12,12.71L12.71,11.29L11.29,12.71M13.41,14.83L14.83,16.24L16.24,14.83L14.83,13.41L13.41,14.83Z"},{id:"spotlight",label:"Spotlight",category:"lights",path:"M9,16.5L9.91,15.59L15.13,20.8L14.21,21.71L9,16.5M15.5,10L16.41,9.09L21.63,14.3L20.71,15.21L15.5,10M6.72,2.72L10.15,6.15L6.15,10.15L2.72,6.72C1.94,5.94 1.94,4.67 2.72,3.89L3.89,2.72C4.67,1.94 5.94,1.94 6.72,2.72M14.57,7.5L15.28,8.21L8.21,15.28L7.5,14.57L6.64,11.07L11.07,6.64L14.57,7.5Z"},{id:"power",label:"Power",category:"power",path:"M13,3h-2v10h2V3zm4.83,2.17l-1.42,1.42C17.99,7.86 19,9.81 19,12c0,3.87-3.13,7-7,7s-7-3.13-7-7c0-2.19 1.01-4.14 2.58-5.42L6.17,5.17C4.23,6.82 3,9.26 3,12c0,4.97 4.03,9 9,9s9-4.03 9-9c0-2.74-1.23-5.18-3.17-6.83z"},{id:"power_plug",label:"Plug",category:"power",path:"M16,7V3H14V7H10V3H8V7H8C7,7 6,8 6,9V14.5L9.5,18V21H14.5V18L18,14.5V9C18,8 17,7 16,7Z"},{id:"socket_eu",label:"Socket",category:"power",path:"M7.5,10.5C8.33,10.5 9,11.17 9,12C9,12.83 8.33,13.5 7.5,13.5C6.66,13.5 6,12.83 6,12C6,11.17 6.67,10.5 7.5,10.5M16.5,10.5C17.33,10.5 18,11.17 18,12C18,12.83 17.33,13.5 16.5,13.5C15.67,13.5 15,12.83 15,12C15,11.17 15.67,10.5 16.5,10.5M4.22,2H19.78C21,2 22,3 22,4.22V19.78C22,21.01 21.01,22 19.78,22H4.22C3,22 2,21 2,19.78V4.22C2,2.99 2.99,2 4.22,2M12,4C7.58,4 4,7.58 4,12C4,16.42 7.58,20 12,20C16.42,20 20,16.42 20,12C20,7.58 16.42,4 12,4Z"},{id:"flash",label:"Flash",category:"power",path:"M7,2V13H10V22L17,10H13L17,2H7Z"},{id:"thermostat",label:"Thermostat",category:"climate",path:"M17,17C17,19.76 14.76,22 12,22C9.24,22 7,19.76 7,17C7,15.36 7.79,13.91 9,13V5C9,3.34 10.34,2 12,2C13.66,2 15,3.34 15,5V13C16.21,13.91 17,15.36 17,17M11,8V14.17C9.83,14.58 9,15.69 9,17C9,18.66 10.34,20 12,20C13.66,20 15,18.66 15,17C15,15.69 14.17,14.58 13,14.17V8H11Z"},{id:"ac_unit",label:"AC / Cooling",category:"climate",path:"M22,11h-4.17l3.24-3.24-1.41-1.42L15,11h-2V9l4.66-4.66-1.42-1.41L13,6.17V2h-2v4.17L7.76,2.93 6.34,4.34 11,9v2H9L4.34,6.34 2.93,7.76 6.17,11H2v2h4.17l-3.24,3.24 1.41,1.42L9,13h2v2l-4.66,4.66 1.42,1.41L11,17.83V22h2v-4.17l3.24,3.24 1.42-1.41L13,15v-2h2l4.66,4.66 1.41-1.42L17.83,13H22z"},{id:"heating",label:"Heating",category:"climate",path:"M11.71,19C9.93,19 8.5,17.59 8.5,15.86C8.5,14.24 9.53,13.1 11.3,12.74C13.07,12.38 14.9,11.53 15.92,10.16C16.31,11.45 16.5,12.81 16.5,14.2C16.5,16.84 14.36,19 11.71,19M13.5,0.67C13.5,0.67 14.24,3.32 14.24,5.47C14.24,7.53 12.89,9.2 10.83,9.2C8.76,9.2 7.2,7.53 7.2,5.47L7.23,5.1C5.21,7.5 4,10.61 4,14C4,18.42 7.58,22 12,22C16.42,22 20,18.42 20,14C20,8.6 17.41,3.8 13.5,0.67Z"},{id:"water_drop",label:"Humidity",category:"climate",path:"M12,3.25C12,3.25 6,10 6,14C6,17.32 8.69,20 12,20C15.31,20 18,17.31 18,14C18,10 12,3.25 12,3.25M14.47,9.97L15.53,11.03L9.53,17.03L8.47,15.97M9.75,10C10.44,10 11,10.56 11,11.25C11,11.94 10.44,12.5 9.75,12.5C9.06,12.5 8.5,11.94 8.5,11.25C8.5,10.56 9.06,10 9.75,10M14.25,14.5C14.94,14.5 15.5,15.06 15.5,15.75C15.5,16.44 14.94,17 14.25,17C13.56,17 13,16.44 13,15.75C13,15.06 13.56,14.5 14.25,14.5Z"},{id:"fan",label:"Fan",category:"climate",path:"M12,11C11.45,11 11,11.45 11,12C11,12.55 11.45,13 12,13C12.55,13 13,12.55 13,12C13,11.45 12.55,11 12,11M12.5,2C17,2 17.11,5.57 14.75,6.75C13.76,7.24 13.32,8.29 13.13,9.22C13.61,9.42 14.03,9.73 14.35,10.13C18.05,8.13 22.03,8.92 22.03,12.5C22.03,17 18.46,17.1 17.28,14.73C16.78,13.74 15.72,13.3 14.79,13.11C14.59,13.59 14.28,14 13.88,14.34C15.87,18.03 15.08,22 11.5,22C7,22 6.91,18.42 9.27,17.24C10.25,16.75 10.69,15.71 10.89,14.79C10.4,14.59 9.97,14.27 9.65,13.87C5.96,15.85 2,15.07 2,11.5C2,7 5.56,6.89 6.74,9.26C7.24,10.25 8.29,10.68 9.22,10.87C9.41,10.39 9.73,9.97 10.14,9.65C8.15,5.96 8.94,2 12.5,2Z"},{id:"door",label:"Door",category:"openings",path:"M8,3C6.89,3 6,3.89 6,5V21H18V5C18,3.89 17.11,3 16,3H8M8,5H16V19H8V5M13,11V13H15V11H13Z"},{id:"door_open",label:"Door open",category:"openings",path:"M12,3C10.89,3 10,3.89 10,5H3V19H2V21H22V19H21V5C21,3.89 20.11,3 19,3H12M12,5H19V19H12V5M5,11H7V13H5V11Z"},{id:"window_closed",label:"Window closed",category:"openings",path:"M6,11H10V9H14V11H18V4H6V11M18,13H6V20H18V13M6,2H18C19.1,2 20,2.9 20,4V20C20,21.1 19.1,22 18,22H6C4.9,22 4,21.1 4,20V4C4,2.9 4.9,2 6,2Z"},{id:"window_open",label:"Window open",category:"openings",path:"M6,8H10V6H14V8H18V4H6V8M18,10H6V15H18V10M6,20H18V17H6V20M6,2H18C19.1,2 20,2.9 20,4V20C20,21.1 19.1,22 18,22H6C4.9,22 4,21.1 4,20V4C4,2.9 4.9,2 6,2Z"},{id:"blinds",label:"Blinds",category:"openings",path:"M3,2H21C21.55,2 22,2.45 22,3V5C22,5.55 21.55,6 21,6H20V13C20,13.55 19.55,14 19,14H13V16.17C14.17,16.58 15,17.69 15,19C15,20.66 13.66,22 12,22C10.34,22 9,20.66 9,19C9,17.69 9.83,16.58 11,16.17V14H5C4.45,14 4,13.55 4,13V6H3C2.45,6 2,5.55 2,5V3C2,2.45 2.45,2 3,2M12,18C11.45,18 11,18.45 11,19C11,19.55 11.45,20 12,20C12.55,20 13,19.55 13,19C13,18.45 12.55,18 12,18Z"},{id:"garage",label:"Garage",category:"openings",path:"M19,20H17V11H7V20H5V9L12,5L19,9V20M8,12H16V14H8V12M8,15H16V17H8V15M16,18V20H8V18H16Z"},{id:"door_wall_closed",label:"Door closed (wall)",category:"openings",path:"M16,11H18V13H16V11M12,3H19C20.11,3 21,3.89 21,5V19H22V21H2V19H10V5C10,3.89 10.89,3 12,3M12,5V19H19V5H12Z"},{id:"skylight_closed",label:"Skylight closed",category:"openings",path:"M12,2L21,9V22H3V9L12,2Z M5,10V20H19V10L12,4L5,10Z M5,15H19V16H5Z"},{id:"skylight_open",label:"Skylight open",category:"openings",path:"M12,2L21,9V22H3V9L12,2Z M5,10V20H19V10L12,4L5,10Z M6,11L12,5L18,11L16,18H8Z"},{id:"window_4pane_closed",label:"Window 4-pane closed",category:"openings",path:"M21,20V2H3V20H1V23H23V20M19,4V11H13V4M5,4H11V11H5M5,20V13H11V20M13,20V13H19V20Z"},{id:"window_4pane_open",label:"Window 4-pane open",category:"openings",path:"M21,20V2H3V20H1V23H23V20M19,4V11H17V4M5,4H7V11H5M5,20V13H7V20M9,20V4H15V20M17,20V13H19V20Z"},{id:"tilt_closed",label:"Tilt window closed",category:"openings",path:"M4,2H20V22H4Z M6,4V20H18V4H6Z M11,14H13V17H11Z"},{id:"tilt_tilted",label:"Tilt window tilted",category:"openings",path:"M4,2H20V22H4Z M6,4V20H18V4H6Z M6,20L9,5H15L18,20Z"},{id:"tilt_open_left",label:"Tilt window open left",category:"openings",path:"M4,2H20V22H4Z M6,4V20H18V4H6Z M18,4V20L8,17V7Z"},{id:"tilt_open_right",label:"Tilt window open right",category:"openings",path:"M4,2H20V22H4Z M6,4V20H18V4H6Z M6,4L16,7V17L6,20Z"},{id:"lock",label:"Lock",category:"security",path:"M12,17C13.1,17 14,16.1 14,15C14,13.89 13.1,13 12,13C10.9,13 10,13.9 10,15C10,16.1 10.9,17 12,17M18,8C19.1,8 20,8.9 20,10V20C20,21.1 19.1,22 18,22H6C4.9,22 4,21.1 4,20V10C4,8.89 4.9,8 6,8H7V6C7,3.24 9.24,1 12,1C14.76,1 17,3.24 17,6V8H18M12,3C10.34,3 9,4.34 9,6V8H15V6C15,4.34 13.66,3 12,3Z"},{id:"lock_open",label:"Lock open",category:"security",path:"M18,8C19.1,8 20,8.9 20,10V20C20,21.1 19.1,22 18,22H6C4.89,22 4,21.1 4,20V10C4,8.9 4.9,8 6,8H15V6C15,4.34 13.66,3 12,3C10.34,3 9,4.34 9,6H7C7,3.24 9.24,1 12,1C14.76,1 17,3.24 17,6V8H18M12,17C13.1,17 14,16.1 14,15C14,13.9 13.1,13 12,13C10.9,13 10,13.9 10,15C10,16.1 10.9,17 12,17Z"},{id:"shield",label:"Shield",category:"security",path:"M12,1L3,5V11C3,16.55 6.84,21.74 12,23C17.16,21.74 21,16.55 21,11V5L12,1Z"},{id:"camera",label:"Camera",category:"security",path:"M18.15,4.94C17.77,4.91 17.37,5 17,5.2L8.35,10.2C7.39,10.76 7.07,12 7.62,12.94L9.12,15.53C9.67,16.5 10.89,16.82 11.85,16.27L13.65,15.23C13.92,15.69 14.32,16.06 14.81,16.27V18.04C14.81,19.13 15.7,20 16.81,20H22V18.04H16.81V16.27C17.72,15.87 18.31,14.97 18.31,14C18.31,13.54 18.19,13.11 17.97,12.73L20.5,11.27C21.47,10.71 21.8,9.5 21.24,8.53L19.74,5.94C19.4,5.34 18.79,5 18.15,4.94M6.22,13.17L2,13.87L2.75,15.17L4.75,18.63L5.5,19.93L8.22,16.63L6.22,13.17Z"},{id:"bell",label:"Alarm bell",category:"security",path:"M11.5,22C11.64,22 11.77,22 11.9,21.96C12.55,21.82 13.09,21.38 13.34,20.78C13.44,20.54 13.5,20.27 13.5,20H9.5C9.5,21.1 10.4,22 11.5,22M18,10.5C18,7.43 15.86,4.86 13,4.18V3.5C13,2.67 12.33,2 11.5,2C10.67,2 10,2.67 10,3.5V4.18C7.13,4.86 5,7.43 5,10.5V16L3,18V19H20V18L18,16M19.97,10H21.97C21.82,6.79 20.24,3.97 17.85,2.15L16.42,3.58C18.46,5 19.82,7.35 19.97,10M6.58,3.58L5.15,2.15C2.76,3.97 1.18,6.79 1,10H3C3.18,7.35 4.54,5 6.58,3.58Z"},{id:"motion",label:"Motion",category:"sensors",path:"M16.5,5.5C17.6,5.5 18.5,4.6 18.5,3.5C18.5,2.4 17.6,1.5 16.5,1.5C15.4,1.5 14.5,2.4 14.5,3.5C14.5,4.6 15.4,5.5 16.5,5.5M12.9,19.4L13.9,15L16,17V23H18V15.5L15.9,13.5L16.5,10.5C17.89,12.09 19.89,13 22,13V11C20.24,11.03 18.6,10.11 17.7,8.6L16.7,7C16.34,6.4 15.7,6 15,6C14.7,6 14.5,6.1 14.2,6.1L9,8.3V13H11V9.6L12.8,8.9L11.2,17L6.3,16L5.9,18L12.9,19.4Z"},{id:"fire",label:"Fire",category:"sensors",path:"M11.71,19C9.93,19 8.5,17.59 8.5,15.86C8.5,14.24 9.53,13.1 11.3,12.74C13.07,12.38 14.9,11.53 15.92,10.16C16.31,11.45 16.5,12.81 16.5,14.2C16.5,16.84 14.36,19 11.71,19M13.5,0.67C13.5,0.67 14.24,3.32 14.24,5.47C14.24,7.53 12.89,9.2 10.83,9.2C8.76,9.2 7.2,7.53 7.2,5.47L7.23,5.1C5.21,7.5 4,10.61 4,14C4,18.42 7.58,22 12,22C16.42,22 20,18.42 20,14C20,8.6 17.41,3.8 13.5,0.67Z"},{id:"flood",label:"Flood",category:"sensors",path:"M12,3.25C12,3.25 6,10 6,14C6,17.32 8.69,20 12,20C15.31,20 18,17.31 18,14C18,10 12,3.25 12,3.25Z"},{id:"warning",label:"Warning",category:"sensors",path:"M13,13H11V7H13M13,17H11V15H13M12,2C6.48,2 2,6.48 2,12C2,17.52 6.48,22 12,22C17.52,22 22,17.52 22,12C22,6.48 17.52,2 12,2Z"},{id:"smoke",label:"Smoke detector",category:"sensors",path:"M12,18C13.1,18 14,17.1 14,16C14,14.9 13.1,14 12,14C10.9,14 10,14.9 10,16C10,17.1 10.9,18 12,18M12,2C6.48,2 2,6.48 2,12C2,17.52 6.48,22 12,22C17.52,22 22,17.52 22,12C22,6.48 17.52,2 12,2M12,20C7.58,20 4,16.42 4,12C4,7.58 7.58,4 12,4C16.42,4 20,7.58 20,12C20,16.42 16.42,20 12,20Z"},{id:"rain",label:"Rain",category:"sensors",path:"M6,14.03A1,1 0 0,1 7,15.03C7,15.58 6.55,16.03 6,16.03C3.24,16.03 1,13.79 1,11.03C1,8.27 3.24,6.03 6,6.03C7,3.68 9.3,2.03 12,2.03C15.43,2.03 18.24,4.69 18.5,8.06L19,8.03A4,4 0 0,1 23,12.03C23,14.23 21.21,16.03 19,16.03H18C17.45,16.03 17,15.58 17,15.03C17,14.47 17.45,14.03 18,14.03H19A2,2 0 0,0 21,12.03A2,2 0 0,0 19,10.03H17V9.03C17,6.27 14.76,4.03 12,4.03C9.5,4.03 7.45,5.84 7.06,8.21C6.73,8.09 6.37,8.03 6,8.03A3,3 0 0,0 3,11.03A3,3 0 0,0 6,14.03M12,14.15C12.18,14.39 12.37,14.66 12.56,14.94C13,15.56 14,17.03 14,18C14,19.11 13.1,20 12,20A2,2 0 0,1 10,18C10,17.03 11,15.56 11.44,14.94C11.63,14.66 11.82,14.4 12,14.15M12,11.03L11.5,11.59C11.5,11.59 10.65,12.55 9.79,13.81C8.93,15.06 8,16.56 8,18A4,4 0 0,0 12,22A4,4 0 0,0 16,18C16,16.56 15.07,15.06 14.21,13.81C13.35,12.55 12.5,11.59 12.5,11.59"},{id:"wind",label:"Wind",category:"sensors",path:"M4,10A1,1 0 0,1 3,9A1,1 0 0,1 4,8H12A2,2 0 0,0 14,6A2,2 0 0,0 12,4C11.45,4 10.95,4.22 10.59,4.59C10.2,5 9.56,5 9.17,4.59C8.78,4.2 8.78,3.56 9.17,3.17C9.9,2.45 10.9,2 12,2A4,4 0 0,1 16,6A4,4 0 0,1 12,10H4M19,12A1,1 0 0,0 20,11A1,1 0 0,0 19,10C18.72,10 18.47,10.11 18.29,10.29C17.9,10.68 17.27,10.68 16.88,10.29C16.5,9.9 16.5,9.27 16.88,8.88C17.42,8.34 18.17,8 19,8A3,3 0 0,1 22,11A3,3 0 0,1 19,14H5A1,1 0 0,1 4,13A1,1 0 0,1 5,12H19M18,18H4A1,1 0 0,1 3,17A1,1 0 0,1 4,16H18A3,3 0 0,1 21,19A3,3 0 0,1 18,22C17.17,22 16.42,21.66 15.88,21.12C15.5,20.73 15.5,20.1 15.88,19.71C16.27,19.32 16.9,19.32 17.29,19.71C17.47,19.89 17.72,20 18,20A1,1 0 0,0 19,19A1,1 0 0,0 18,18Z"},{id:"wind_direction",label:"Wind direction",category:"sensors",path:"M7,17L10.2,10.2L17,7L13.8,13.8L7,17M12,11.1A0.9,0.9 0 0,0 11.1,12A0.9,0.9 0 0,0 12,12.9A0.9,0.9 0 0,0 12.9,12A0.9,0.9 0 0,0 12,11.1M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z"},{id:"sun",label:"Sun",category:"sensors",path:"M3.55 19.09L4.96 20.5L6.76 18.71L5.34 17.29M12 6C8.69 6 6 8.69 6 12S8.69 18 12 18 18 15.31 18 12C18 8.68 15.31 6 12 6M20 13H23V11H20M17.24 18.71L19.04 20.5L20.45 19.09L18.66 17.29M20.45 5L19.04 3.6L17.24 5.39L18.66 6.81M13 1H11V4H13M6.76 5.39L4.96 3.6L3.55 5L5.34 6.81L6.76 5.39M1 13H4V11H1M13 20H11V23H13"},{id:"moon",label:"Moon",category:"sensors",path:"M2 12A10 10 0 0 0 15 21.54A10 10 0 0 1 15 2.46A10 10 0 0 0 2 12Z"},{id:"volume",label:"Volume",category:"media",path:"M14,3.23V5.29C16.89,6.15 19,8.83 19,12C19,15.17 16.89,17.84 14,18.7V20.77C18,19.86 21,16.28 21,12C21,7.72 18,4.14 14,3.23M16.5,12C16.5,10.23 15.5,8.71 14,7.97V16C15.5,15.29 16.5,13.76 16.5,12M3,9V15H7L12,20V4L7,9H3Z"},{id:"tv",label:"Television",category:"media",path:"M21,17H3V5H21M21,3H3C1.9,3 1,3.9 1,5V17C1,18.1 1.9,19 3,19H8V21H16V19H21C22.1,19 23,18.1 23,17V5C23,3.9 22.1,3 21,3Z"},{id:"nas",label:"NAS",category:"computers",path:"M4,5C2.89,5 2,5.89 2,7V17C2,18.11 2.89,19 4,19H20C21.11,19 22,18.11 22,17V7C22,5.89 21.11,5 20,5H4M4.5,7A1,1 0 0,1 5.5,8A1,1 0 0,1 4.5,9A1,1 0 0,1 3.5,8A1,1 0 0,1 4.5,7M7,7H20V17H7V7M8,8V16H11V8H8M12,8V16H15V8H12M16,8V16H19V8H16M9,9H10V10H9V9M13,9H14V10H13V9M17,9H18V10H17V9Z"},{id:"network_switch",label:"Network switch",category:"computers",path:"M4,1C2.89,1 2,1.89 2,3V7C2,8.11 2.89,9 4,9H1V11H13V9H10C11.11,9 12,8.11 12,7V3C12,1.89 11.11,1 10,1H4M4,3H10V7H4V3M3,13V18L3,20H10V18H5V13H3M14,13C12.89,13 12,13.89 12,15V19C12,20.11 12.89,21 14,21H11V23H23V21H20C21.11,21 22,20.11 22,19V15C22,13.89 21.11,13 20,13H14M14,15H20V19H14V15Z"},{id:"pc_monitor",label:"PC / Monitor",category:"computers",path:"M21,16H3V4H21M21,2H3C1.89,2 1,2.89 1,4V16A2,2 0 0,0 3,18H10V20H8V22H16V20H14V18H21A2,2 0 0,0 23,16V4C23,2.89 22.1,2 21,2Z"},{id:"laptop",label:"Laptop",category:"computers",path:"M4,6H20V16H4M20,18A2,2 0 0,0 22,16V6C22,4.89 21.1,4 20,4H4C2.89,4 2,4.89 2,6V16A2,2 0 0,0 4,18H0V20H24V18H20Z"},{id:"tablet_device",label:"Tablet",category:"computers",path:"M19,18H5V6H19M21,4H3C1.89,4 1,4.89 1,6V18A2,2 0 0,0 3,20H21A2,2 0 0,0 23,18V6C23,4.89 22.1,4 21,4Z"},{id:"cellphone",label:"Mobile phone",category:"computers",path:"M17,19H7V5H17M17,1H7C5.89,1 5,1.89 5,3V21A2,2 0 0,0 7,23H17A2,2 0 0,0 19,21V3C19,1.89 18.1,1 17,1Z"},{id:"wifi_router",label:"WiFi router",category:"computers",path:"M20.2,5.9L21,5.1C19.6,3.7 17.8,3 16,3C14.2,3 12.4,3.7 11,5.1L11.8,5.9C13,4.8 14.5,4.2 16,4.2C17.5,4.2 19,4.8 20.2,5.9M19.3,6.7C18.4,5.8 17.2,5.3 16,5.3C14.8,5.3 13.6,5.8 12.7,6.7L13.5,7.5C14.2,6.8 15.1,6.5 16,6.5C16.9,6.5 17.8,6.8 18.5,7.5L19.3,6.7M19,13H17V9H15V13H5A2,2 0 0,0 3,15V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V15A2,2 0 0,0 19,13M8,18H6V16H8V18M11.5,18H9.5V16H11.5V18M15,18H13V16H15V18Z"},{id:"starlink",label:"Starlink / Satellite",category:"computers",path:"M11.86,2L11.34,3.93C15.75,4.78 19.2,8.23 20.05,12.65L22,12.13C20.95,7.03 16.96,3.04 11.86,2M10.82,5.86L10.3,7.81C13.34,8.27 15.72,10.65 16.18,13.68L18.12,13.16C17.46,9.44 14.55,6.5 10.82,5.86M3.72,9.69C3.25,10.73 3,11.86 3,13C3,14.95 3.71,16.82 5,18.28V22H8V20.41C8.95,20.8 9.97,21 11,21C12.14,21 13.27,20.75 14.3,20.28L3.72,9.69M9.79,9.76L9.26,11.72A3,3 0 0,1 12.26,14.72L14.23,14.2C14,11.86 12.13,10 9.79,9.76Z"},{id:"access_point",label:"Access point",category:"computers",path:"M4.93,4.93C3.12,6.74 2,9.24 2,12C2,14.76 3.12,17.26 4.93,19.07L6.34,17.66C4.89,16.22 4,14.22 4,12C4,9.79 4.89,7.78 6.34,6.34L4.93,4.93M19.07,4.93L17.66,6.34C19.11,7.78 20,9.79 20,12C20,14.22 19.11,16.22 17.66,17.66L19.07,19.07C20.88,17.26 22,14.76 22,12C22,9.24 20.88,6.74 19.07,4.93M7.76,7.76C6.67,8.85 6,10.35 6,12C6,13.65 6.67,15.15 7.76,16.24L9.17,14.83C8.45,14.11 8,13.11 8,12C8,10.89 8.45,9.89 9.17,9.17L7.76,7.76M16.24,7.76L14.83,9.17C15.55,9.89 16,10.89 16,12C16,13.11 15.55,14.11 14.83,14.83L16.24,16.24C17.33,15.15 18,13.65 18,12C18,10.35 17.33,8.85 16.24,7.76M12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12A2,2 0 0,0 12,10Z"},{id:"man",label:"Man",category:"people",path:"M12,2A2,2 0 0,1 14,4A2,2 0 0,1 12,6A2,2 0 0,1 10,4A2,2 0 0,1 12,2M10.5,7H13.5A2,2 0 0,1 15.5,9V14.5H14V22H10V14.5H8.5V9A2,2 0 0,1 10.5,7Z"},{id:"woman",label:"Woman",category:"people",path:"M12,2A2,2 0 0,1 14,4A2,2 0 0,1 12,6A2,2 0 0,1 10,4A2,2 0 0,1 12,2M10.5,22V16H7.5L10.09,8.41C10.34,7.59 11.1,7 12,7C12.9,7 13.66,7.59 13.91,8.41L16.5,16H13.5V22H10.5Z"},{id:"family",label:"Family",category:"people",path:"M7.5,2A2,2 0 0,1 9.5,4A2,2 0 0,1 7.5,6A2,2 0 0,1 5.5,4A2,2 0 0,1 7.5,2M6,7H9A2,2 0 0,1 11,9V14.5H9.5V22H5.5V14.5H4V9A2,2 0 0,1 6,7M16.5,2A2,2 0 0,1 18.5,4A2,2 0 0,1 16.5,6A2,2 0 0,1 14.5,4A2,2 0 0,1 16.5,2M15,22V16H12L14.59,8.41C14.84,7.59 15.6,7 16.5,7C17.4,7 18.16,7.59 18.41,8.41L21,16H18V22H15Z"},{id:"girl",label:"Girl",category:"people",path:"M7.5,2A2,2 0 0,1 9.5,4A2,2 0 0,1 7.5,6A2,2 0 0,1 5.5,4A2,2 0 0,1 7.5,2M6,22V16H3L5.6,8.4C5.9,7.6 6.6,7 7.5,7C8.4,7 9.2,7.6 9.4,8.4L12,16H9V22H6M14.5,12A2,2 0 0,1 16.5,10A2,2 0 0,1 18.5,12A2,2 0 0,1 16.5,14A2,2 0 0,1 14.5,12M15,15H18L19.5,19H18V22H15V19H13.5L15,15Z"},{id:"baby",label:"Baby",category:"people",path:"M14.5,9.25A1.25,1.25 0 0,1 15.75,10.5A1.25,1.25 0 0,1 14.5,11.75A1.25,1.25 0 0,1 13.25,10.5A1.25,1.25 0 0,1 14.5,9.25M9.5,9.25A1.25,1.25 0 0,1 10.75,10.5A1.25,1.25 0 0,1 9.5,11.75A1.25,1.25 0 0,1 8.25,10.5A1.25,1.25 0 0,1 9.5,9.25M7.5,14H16.5C15.74,15.77 14,17 12,17C10,17 8.26,15.77 7.5,14M1,12C1,10.19 2.2,8.66 3.86,8.17C5.29,5.11 8.4,3 12,3C15.6,3 18.71,5.11 20.15,8.17C21.8,8.66 23,10.19 23,12C23,13.81 21.8,15.34 20.15,15.83C18.71,18.89 15.6,21 12,21C8.4,21 5.29,18.89 3.86,15.83C2.2,15.34 1,13.81 1,12M12,5C8.82,5 6.14,7.12 5.28,10H5A2,2 0 0,0 3,12A2,2 0 0,0 5,14H5.28C6.14,16.88 8.82,19 12,19C15.18,19 17.86,16.88 18.72,14H19A2,2 0 0,0 21,12A2,2 0 0,0 19,10H18.72C17.86,7.12 15.18,5 12,5Z"},{id:"cat",label:"Cat",category:"people",path:"M12,8L10.67,8.09C9.81,7.07 7.4,4.5 5,4.5C5,4.5 3.03,7.46 4.96,11.41C4.41,12.24 4.07,12.67 4,13.66L2.07,13.95L2.28,14.93L4.04,14.67L4.18,15.38L2.61,16.32L3.08,17.21L4.53,16.32C5.68,18.76 8.59,20 12,20C15.41,20 18.32,18.76 19.47,16.32L20.92,17.21L21.39,16.32L19.82,15.38L19.96,14.67L21.72,14.93L21.93,13.95L20,13.66C19.93,12.67 19.59,12.24 19.04,11.41C20.97,7.46 19,4.5 19,4.5C16.6,4.5 14.19,7.07 13.33,8.09L12,8M9,11A1,1 0 0,1 10,12A1,1 0 0,1 9,13A1,1 0 0,1 8,12A1,1 0 0,1 9,11M15,11A1,1 0 0,1 16,12A1,1 0 0,1 15,13A1,1 0 0,1 14,12A1,1 0 0,1 15,11M11,14H13L12.3,15.39C12.5,16.03 13.06,16.5 13.75,16.5A1.5,1.5 0 0,0 15.25,15H15.75A2,2 0 0,1 13.75,17C13,17 12.35,16.59 12,16V16H12C11.65,16.59 11,17 10.25,17A2,2 0 0,1 8.25,15H8.75A1.5,1.5 0 0,0 10.25,16.5C10.94,16.5 11.5,16.03 11.7,15.39L11,14Z"},{id:"dog",label:"Dog",category:"people",path:"M18,4C16.29,4 15.25,4.33 14.65,4.61C13.88,4.23 13,4 12,4C11,4 10.12,4.23 9.35,4.61C8.75,4.33 7.71,4 6,4C3,4 1,12 1,14C1,14.83 2.32,15.59 4.14,15.9C4.78,18.14 7.8,19.85 11.5,20V15.72C10.91,15.35 10,14.68 10,14C10,13 12,13 12,13C12,13 14,13 14,14C14,14.68 13.09,15.35 12.5,15.72V20C16.2,19.85 19.22,18.14 19.86,15.9C21.68,15.59 23,14.83 23,14C23,12 21,4 18,4M4.15,13.87C3.65,13.75 3.26,13.61 3,13.5C3.25,10.73 5.2,6.4 6.05,6C6.59,6 7,6.06 7.37,6.11C5.27,8.42 4.44,12.04 4.15,13.87M9,12A1,1 0 0,1 8,11C8,10.46 8.45,10 9,10A1,1 0 0,1 10,11C10,11.56 9.55,12 9,12M15,12A1,1 0 0,1 14,11C14,10.46 14.45,10 15,10A1,1 0 0,1 16,11C16,11.56 15.55,12 15,12M19.85,13.87C19.56,12.04 18.73,8.42 16.63,6.11C17,6.06 17.41,6 17.95,6C18.8,6.4 20.75,10.73 21,13.5C20.75,13.61 20.36,13.75 19.85,13.87Z"},{id:"home",label:"Home",category:"other",path:"M10,20V14H14V20H19V12H22L12,3L2,12H5V20H10Z"},{id:"battery",label:"Battery",category:"other",path:"M16.67,4H15V2H9V4H7.33C6.6,4 6,4.6 6,5.33V20.67C6,21.4 6.6,22 7.33,22H16.67C17.4,22 18,21.4 18,20.67V5.33C18,4.6 17.4,4 16.67,4Z"},{id:"wifi",label:"WiFi",category:"other",path:"M12,21L15.6,16.2C14.6,15.45 13.35,15 12,15C10.65,15 9.4,15.45 8.4,16.2L12,21M12,3C7.95,3 4.21,4.34 1.2,6.6L3,9C5.5,7.12 8.62,6 12,6C15.38,6 18.5,7.12 21,9L22.8,6.6C19.79,4.34 16.05,3 12,3M12,9C9.3,9 6.81,9.89 4.8,11.4L6.6,13.8C8.1,12.67 9.97,12 12,12C14.03,12 15.9,12.67 17.4,13.8L19.2,11.4C17.19,9.89 14.7,9 12,9Z"},{id:"gauge",label:"Gauge",category:"other",path:"M12,16C10.34,16 9,14.66 9,13C9,11.88 9.61,10.9 10.5,10.39L20.21,4.77L14.68,14.35C14.18,15.33 13.17,16 12,16M12,3C13.81,3 15.5,3.5 16.97,4.32L14.87,5.53C14,5.19 13,5 12,5C7.58,5 4,8.58 4,13C4,15.21 4.89,17.21 6.34,18.65H6.35C6.74,19.04 6.74,19.67 6.35,20.06C5.96,20.45 5.32,20.45 4.93,20.07V20.07C3.12,18.26 2,15.76 2,13C2,7.48 6.48,3 12,3M22,13C22,15.76 20.88,18.26 19.07,20.07V20.07C18.68,20.45 18.05,20.45 17.66,20.06C17.27,19.67 17.27,19.04 17.66,18.65V18.65C19.11,17.2 20,15.21 20,13C20,12 19.81,11 19.46,10.1L20.67,8C21.5,9.5 22,11.18 22,13Z"},{id:"ev_station",label:"EV station",category:"other",path:"M19.77,7.23L19.78,7.22L16.06,3.5L15,4.56L17.11,6.67C16.17,7.03 15.5,7.93 15.5,9C15.5,10.38 16.62,11.5 18,11.5C18.36,11.5 18.69,11.42 19,11.29V18.5C19,19.05 18.55,19.5 18,19.5C17.45,19.5 17,19.05 17,18.5V14C17,12.9 16.1,12 15,12H14V5C14,3.9 13.1,3 12,3H6C4.9,3 4,3.9 4,5V21H14V13.5H15.5V18.5C15.5,19.88 16.62,21 18,21C19.38,21 20.5,19.88 20.5,18.5V9C20.5,8.31 20.22,7.68 19.77,7.23M18,10C17.45,10 17,9.55 17,9C17,8.45 17.45,8 18,8C18.55,8 19,8.45 19,9C19,9.55 18.55,10 18,10M8,18V13.5H6L10,6V11H12L8,18Z"},{id:"washing",label:"Washing machine",category:"appliances",path:"M14.83,11.17C16.39,12.73 16.39,15.27 14.83,16.83C13.27,18.39 10.73,18.39 9.17,16.83L14.83,11.17M6,2H18C19.1,2 20,2.9 20,4V20C20,21.1 19.1,22 18,22H6C4.9,22 4,21.1 4,20V4C4,2.9 4.9,2 6,2M7,4C6.45,4 6,4.45 6,5C6,5.55 6.45,6 7,6C7.55,6 8,5.55 8,5C8,4.45 7.55,4 7,4M10,4C9.45,4 9,4.45 9,5C9,5.55 9.45,6 10,6C10.55,6 11,5.55 11,5C11,4.45 10.55,4 10,4M12,8C8.69,8 6,10.69 6,14C6,17.31 8.69,20 12,20C15.31,20 18,17.31 18,14C18,10.69 15.31,8 12,8Z"},{id:"tumble_dryer",label:"Dryer",category:"appliances",path:"M6,2H18A2,2 0 0,1 20,4V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V4A2,2 0 0,1 6,2M7,4A1,1 0 0,0 6,5A1,1 0 0,0 7,6A1,1 0 0,0 8,5A1,1 0 0,0 7,4M10,4A1,1 0 0,0 9,5A1,1 0 0,0 10,6A1,1 0 0,0 11,5A1,1 0 0,0 10,4M12,8A6,6 0 0,0 6,14A6,6 0 0,0 12,20A6,6 0 0,0 18,14A6,6 0 0,0 12,8M8.11,10.5H10C9.76,11.88 10,12.67 10.58,13.29C11.68,14.36 12.16,15.71 11.89,17.5H10C10.24,16.12 10,15.33 9.42,14.71C8.32,13.64 7.85,12.29 8.11,10.5M12.11,10.5H14C13.76,11.88 14,12.67 14.58,13.29C15.68,14.36 16.16,15.71 15.89,17.5H14C14.24,16.12 14,15.33 13.42,14.71C12.32,13.64 11.85,12.29 12.11,10.5Z"},{id:"stove",label:"Stove",category:"appliances",path:"M6,14H8L11,17H9L6,14M4,4H5V3A1,1 0 0,1 6,2H10A1,1 0 0,1 11,3V4H13V3A1,1 0 0,1 14,2H18A1,1 0 0,1 19,3V4H20A2,2 0 0,1 22,6V19A2,2 0 0,1 20,21V22H17V21H7V22H4V21A2,2 0 0,1 2,19V6A2,2 0 0,1 4,4M18,7A1,1 0 0,1 19,8A1,1 0 0,1 18,9A1,1 0 0,1 17,8A1,1 0 0,1 18,7M14,7A1,1 0 0,1 15,8A1,1 0 0,1 14,9A1,1 0 0,1 13,8A1,1 0 0,1 14,7M20,6H4V10H20V6M4,19H20V12H4V19M6,7A1,1 0 0,1 7,8A1,1 0 0,1 6,9A1,1 0 0,1 5,8A1,1 0 0,1 6,7M13,14H15L18,17H16L13,14Z"},{id:"microwave",label:"Microwave",category:"appliances",path:"M4,5A2,2 0 0,0 2,7V17A2,2 0 0,0 4,19H20A2,2 0 0,0 22,17V7A2,2 0 0,0 20,5H4M4,7H16V17H4V7M19,7A1,1 0 0,1 20,8A1,1 0 0,1 19,9A1,1 0 0,1 18,8A1,1 0 0,1 19,7M13,9V15H15V9H13M19,11A1,1 0 0,1 20,12A1,1 0 0,1 19,13A1,1 0 0,1 18,12A1,1 0 0,1 19,11Z"},{id:"fridge",label:"Fridge",category:"appliances",path:"M7,2H17A2,2 0 0,1 19,4V9H5V4A2,2 0 0,1 7,2M19,19A2,2 0 0,1 17,21V22H15V21H9V22H7V21A2,2 0 0,1 5,19V10H19V19M8,5V7H10V5H8M8,12V15H10V12H8Z"},{id:"freezer",label:"Freezer",category:"appliances",path:"M9,21V22H7V21A2,2 0 0,1 5,19V4A2,2 0 0,1 7,2H17A2,2 0 0,1 19,4V19A2,2 0 0,1 17,21V22H15V21H9M7,4V9H17V4H7M7,19H17V11H7V19M8,6H10V8H8V6 M12,12.5L13,13.1L14.2,13.8L13.7,15L14.2,16.2L13,16.9L12,17.5L11,16.9L9.8,16.2L10.3,15L9.8,13.8L11,13.1Z"},{id:"dishwasher",label:"Dishwasher",category:"appliances",path:"M18,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V4A2,2 0 0,0 18,2M10,4A1,1 0 0,1 11,5A1,1 0 0,1 10,6A1,1 0 0,1 9,5A1,1 0 0,1 10,4M7,4A1,1 0 0,1 8,5A1,1 0 0,1 7,6A1,1 0 0,1 6,5A1,1 0 0,1 7,4M18,20H6V8H18V20M14.67,15.33C14.69,16.03 14.41,16.71 13.91,17.21C12.86,18.26 11.15,18.27 10.09,17.21C9.59,16.71 9.31,16.03 9.33,15.33C9.4,14.62 9.63,13.94 10,13.33C10.37,12.5 10.81,11.73 11.33,11L12,10C13.79,12.59 14.67,14.36 14.67,15.33"},{id:"coffee_maker",label:"Coffee maker",category:"appliances",path:"M18 6V4H20V2H6C4.9 2 4 2.9 4 4V20C4 21.1 4.9 22 6 22H20V20H15.97C17.2 19.09 18 17.64 18 16V11H8V16C8 17.64 8.81 19.09 10.03 20H6V4H8V6C8 6.55 8.45 7 9 7H17C17.55 7 18 6.55 18 6M13 8C13.55 8 14 8.45 14 9S13.55 10 13 10 12 9.55 12 9 12.45 8 13 8Z"},{id:"vacuum",label:"Vacuum cleaner",category:"appliances",path:"M23 20V22H16L16 20H18.46L12 4.61C11.81 4.14 11.5 3.76 11.06 3.46S10.14 3 9.61 3C8.9 3 8.28 3.27 7.76 3.79S7 4.92 7 5.64L7 9H8C10.21 9 12 10.79 12 13V22H8C8.61 21.16 9 20.13 9 19C9 16.24 6.76 14 4 14C3.29 14 2.61 14.15 2 14.42V9H5V5.64C5 4.8 5.23 4 5.63 3.32C6.04 2.62 6.59 2.06 7.3 1.63C8 1.21 8.77 1 9.61 1C10.55 1 11.4 1.26 12.16 1.77S13.5 2.97 13.87 3.81L20.66 20H23M7 19C7 20.66 5.66 22 4 22S1 20.66 1 19 2.34 16 4 16 7 17.34 7 19M5 19C5 18.45 4.55 18 4 18S3 18.45 3 19 3.45 20 4 20 5 19.55 5 19Z"},{id:"robot_vacuum",label:"Robot vacuum",category:"appliances",path:"M12,2C14.65,2 17.19,3.06 19.07,4.93L17.65,6.35C16.15,4.85 14.12,4 12,4C9.88,4 7.84,4.84 6.35,6.35L4.93,4.93C6.81,3.06 9.35,2 12,2M3.66,6.5L5.11,7.94C4.39,9.17 4,10.57 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12C20,10.57 19.61,9.17 18.88,7.94L20.34,6.5C21.42,8.12 22,10.04 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12C2,10.04 2.58,8.12 3.66,6.5M12,6A6,6 0 0,1 18,12C18,13.59 17.37,15.12 16.24,16.24L14.83,14.83C14.08,15.58 13.06,16 12,16C10.94,16 9.92,15.58 9.17,14.83L7.76,16.24C6.63,15.12 6,13.59 6,12A6,6 0 0,1 12,6M12,8A1,1 0 0,0 11,9A1,1 0 0,0 12,10A1,1 0 0,0 13,9A1,1 0 0,0 12,8Z"},{id:"iron",label:"Iron",category:"appliances",path:"M21 6C19.34 6 18 7.34 18 9V13C13 13.55 17.55 14 17 14V10C17 8.34 15.66 7 14 7H10C8.34 7 7 8.34 7 10H9C9 9.45 9.45 9 10 9H14C14.55 9 15 9.45 15 10V11H6C3.79 11 2 12.79 2 15V18H17V16C18.66 16 20 14.66 20 13V9C20 8.45 20.45 8 21 8H22V6H21Z"},{id:"air_purifier",label:"Air purifier",category:"appliances",path:"M11,9A4,4 0 0,1 15,13A4,4 0 0,1 11,17A4,4 0 0,1 7,13A4,4 0 0,1 11,9M11,11A2,2 0 0,0 9,13A2,2 0 0,0 11,15A2,2 0 0,0 13,13A2,2 0 0,0 11,11M7,4H14A4,4 0 0,1 18,8V9H16V8A2,2 0 0,0 14,6H7A2,2 0 0,0 5,8V20H16V18H18V22H3V8A4,4 0 0,1 7,4M16,11C18.5,11 18.5,9 21,9V11C18.5,11 18.5,13 16,13V11M16,15C18.5,15 18.5,13 21,13V15C18.5,15 18.5,17 16,17V15Z"},{id:"heater",label:"Heater",category:"appliances",path:"M8.5 4.5L5.4 9.5L8.5 14.7L5.2 20.5L3.4 19.6L6.1 14.7L3 9.5L6.7 3.6L8.5 4.5M14.7 4.4L11.6 9.5L14.7 14.5L11.4 20.3L9.6 19.4L12.3 14.5L9.2 9.5L12.9 3.5L14.7 4.4M21 4.4L17.9 9.5L21 14.5L17.7 20.3L15.9 19.4L18.6 14.5L15.5 9.5L19.2 3.5L21 4.4"},{id:"car_auto",label:"Car",category:"appliances",path:"M5,11L6.5,6.5H17.5L19,11M17.5,16A1.5,1.5 0 0,1 16,14.5A1.5,1.5 0 0,1 17.5,13A1.5,1.5 0 0,1 19,14.5A1.5,1.5 0 0,1 17.5,16M6.5,16A1.5,1.5 0 0,1 5,14.5A1.5,1.5 0 0,1 6.5,13A1.5,1.5 0 0,1 8,14.5A1.5,1.5 0 0,1 6.5,16M18.92,6C18.72,5.42 18.16,5 17.5,5H6.5C5.84,5 5.28,5.42 5.08,6L3,12V20A1,1 0 0,0 4,21H5A1,1 0 0,0 6,20V19H18V20A1,1 0 0,0 19,21H20A1,1 0 0,0 21,20V12L18.92,6Z"},{id:"sprinkler",label:"Sprinkler",category:"garden",path:"M10 10H14V22H10V10M7 9H9V7H7V9M4 8H6V6H4V8M4 11H6V9H4V11M1 13H3V11H1V13M1 7H3V5H1V7M1 10H3V8H1V10M18 11H20V9H18V11M21 10H23V8H21V10M21 5V7H23V5H21M21 13H23V11H21V13M15 9H17V7H15V9M18 8H20V6H18V8M10 7H10.33L11 9H13L13.67 7H14V6H10V7Z"},{id:"robot_mower",label:"Robot mower",category:"garden",path:"M1 14C1 16.76 3.24 19 6 19C7.64 19 9.09 18.21 10 17H15.17C15.58 18.17 16.7 19 18 19C19.31 19 20.42 18.17 20.83 17H23V15C23 9.5 18.5 5 13 5H1V14M21 15H10.9C10.97 14.68 11 14.34 11 14C11 11.24 8.76 9 6 9C4.87 9 3.84 9.37 3 10V7H12.5C15.1 7 17.42 8.16 19 10H15V12H20.25C20.67 12.92 20.92 13.94 21 15M6 11C7.66 11 9 12.34 9 14C9 15.66 7.66 17 6 17C4.34 17 3 15.66 3 14C3 12.34 4.34 11 6 11Z"},{id:"flower",label:"Flower",category:"garden",path:"M3,13A9,9 0 0,0 12,22C12,17 7.97,13 3,13M12,5.5A2.5,2.5 0 0,1 14.5,8A2.5,2.5 0 0,1 12,10.5A2.5,2.5 0 0,1 9.5,8A2.5,2.5 0 0,1 12,5.5M5.6,10.25A2.5,2.5 0 0,0 8.1,12.75C8.63,12.75 9.12,12.58 9.5,12.31C9.5,12.37 9.5,12.43 9.5,12.5A2.5,2.5 0 0,0 12,15A2.5,2.5 0 0,0 14.5,12.5C14.5,12.43 14.5,12.37 14.5,12.31C14.88,12.58 15.37,12.75 15.9,12.75C17.28,12.75 18.4,11.63 18.4,10.25C18.4,9.25 17.81,8.4 16.97,8C17.81,7.6 18.4,6.74 18.4,5.75C18.4,4.37 17.28,3.25 15.9,3.25C15.37,3.25 14.88,3.41 14.5,3.69C14.5,3.63 14.5,3.56 14.5,3.5A2.5,2.5 0 0,0 12,1A2.5,2.5 0 0,0 9.5,3.5C9.5,3.56 9.5,3.63 9.5,3.69C9.12,3.41 8.63,3.25 8.1,3.25A2.5,2.5 0 0,0 5.6,5.75C5.6,6.74 6.19,7.6 7.03,8C6.19,8.4 5.6,9.25 5.6,10.25M12,22A9,9 0 0,0 21,13C16,13 12,17 12,22Z"},{id:"tree",label:"Tree",category:"garden",path:"M11,21V16.74C10.53,16.91 10.03,17 9.5,17C7,17 5,15 5,12.5C5,11.23 5.5,10.09 6.36,9.27C6.13,8.73 6,8.13 6,7.5C6,5 8,3 10.5,3C12.06,3 13.44,3.8 14.25,5C14.33,5 14.41,5 14.5,5A5.5,5.5 0 0,1 20,10.5A5.5,5.5 0 0,1 14.5,16C14,16 13.5,15.93 13,15.79V21H11Z"},{id:"grass",label:"Grass",category:"garden",path:"M12 20H2V18H7.75C7 15.19 4.81 13 2 12.26C2.64 12.1 3.31 12 4 12C8.42 12 12 15.58 12 20M22 12.26C21.36 12.1 20.69 12 20 12C17.07 12 14.5 13.58 13.12 15.93C13.41 16.59 13.65 17.28 13.79 18C13.92 18.65 14 19.32 14 20H22V18H16.24C17 15.19 19.19 13 22 12.26M15.64 11C16.42 8.93 17.87 7.18 19.73 6C15.44 6.16 12 9.67 12 14V14C12.95 12.75 14.2 11.72 15.64 11M11.42 8.85C10.58 6.66 8.88 4.89 6.7 4C8.14 5.86 9 8.18 9 10.71C9 10.92 8.97 11.12 8.96 11.32C9.39 11.56 9.79 11.84 10.18 12.14C10.39 10.96 10.83 9.85 11.42 8.85Z"},{id:"watering_can",label:"Watering can",category:"garden",path:"M18.5 7.47C17.76 8.2 17.57 9.25 17.92 10.15L15 13.07V11C15 10.45 14.55 10 14 10H12.97C13 9.83 13 9.67 13 9.5C13 6.46 10.54 4 7.5 4S2 6.46 2 9.5C2 11.21 2.78 12.73 4 13.74V20C4 20.55 4.45 21 5 21H14C14.55 21 15 20.55 15 20V15.89L19.33 11.56C20.23 11.91 21.28 11.73 22 11L18.5 7.47M4.05 10C4.03 9.83 4 9.67 4 9.5C4 7.57 5.57 6 7.5 6S11 7.57 11 9.5C11 9.67 10.97 9.83 10.95 10H4.05Z"},{id:"fence",label:"Fence",category:"garden",path:"M9 9V11H7V9H5V11H3V9H1V21H3V19H5V21H7V19H9V21H11V19H13V21H15V19H17V21H19V19H21V21H23V9H21V11H19V9H17V11H15V9H13V11H11V9H9M3 13H5V17H3V13M7 13H9V17H7V13M11 13H13V17H11V13M15 13H17V17H15V13M19 13H21V17H19V13Z"},{id:"shovel",label:"Shovel",category:"garden",path:"M15.1,1.81L12.27,4.64C11.5,5.42 11.5,6.69 12.27,7.47L13.68,8.88L9.13,13.43L6.31,10.6L4.89,12C-0.06,17 3.5,20.5 3.5,20.5C3.5,20.5 7,24 12,19.09L13.41,17.68L10.61,14.88L15.15,10.34L16.54,11.73C17.32,12.5 18.59,12.5 19.37,11.73L22.2,8.9L15.1,1.81M17.93,10.28L16.55,8.9L15.11,7.46L13.71,6.06L15.12,4.65L19.35,8.88L17.93,10.28Z"},{id:"pool",label:"Pool",category:"garden",path:"M2,15C3.67,14.25 5.33,13.5 7,13.17V5A3,3 0 0,1 10,2C11.31,2 12.42,2.83 12.83,4H10A1,1 0 0,0 9,5V6H14V5A3,3 0 0,1 17,2C18.31,2 19.42,2.83 19.83,4H17A1,1 0 0,0 16,5V14.94C18,14.62 20,13 22,13V15C19.78,15 17.56,17 15.33,17C13.11,17 10.89,15 8.67,15C6.44,15 4.22,16 2,17V15M14,8H9V10H14V8M14,12H9V13C10.67,13.16 12.33,14.31 14,14.79V12M2,19C4.22,18 6.44,17 8.67,17C10.89,17 13.11,19 15.33,19C17.56,19 19.78,17 22,17V19C19.78,19 17.56,21 15.33,21C13.11,21 10.89,19 8.67,19C6.44,19 4.22,20 2,21V19Z"},{id:"grill",label:"Grill",category:"garden",path:"M8.06,2C7.88,3.17 8.17,4.16 8.95,4.97C9.45,5.47 9.61,6.14 9.42,7H10.41C10.53,6.45 10.55,6 10.45,5.55C10.36,5.13 10.05,4.63 9.5,4.03C9.05,3.47 8.89,2.8 9.05,2H8.06M10.55,2C10.36,3.17 10.66,4.16 11.44,4.97C11.94,5.47 12.09,6.14 11.91,7H12.89C13,6.45 13.03,6 12.94,5.55C12.84,5.13 12.53,4.63 12,4.03C11.53,3.47 11.38,2.8 11.53,2H10.55M13.08,2C12.89,3.17 13.19,4.16 13.97,4.97C14.47,5.47 14.61,6.14 14.39,7H15.42C15.55,6.45 15.56,6 15.47,5.55C15.38,5.13 15.06,4.63 14.53,4.03C14.06,3.47 13.91,2.8 14.06,2H13.08M5,8C5,9.42 5.39,10.7 6.14,11.84C6.87,12.96 7.91,13.85 9.14,14.39L5.16,20.44C5.06,20.56 5,20.75 5,21C5,21.41 5.16,21.69 5.44,21.84C5.56,21.94 5.75,22 6,22C6.41,22 6.69,21.84 6.84,21.56L7.83,19.97H14.2C14.41,20.55 14.79,21.05 15.28,21.42C15.78,21.8 16.36,22 17,22C17.83,22 18.53,21.69 19.13,21.09C19.72,20.5 20,19.8 20,19C20,18.17 19.72,17.47 19.13,16.88C18.53,16.28 17.83,16 17,16C16.36,16 15.78,16.17 15.28,16.55C14.78,16.92 14.42,17.41 14.2,18H9.14L11.11,14.95C11.27,15 11.56,15 12,15C12.44,15 12.73,15 12.89,14.95L13.88,16.5C14.29,15.96 14.84,15.54 15.47,15.28L14.91,14.39C16.03,13.89 17,13 17.79,11.77C18.59,10.5 19,9.27 19,8H5M17,18C17.3,18 17.53,18.09 17.72,18.28C17.91,18.47 18,18.72 18,19C18,19.27 17.91,19.5 17.72,19.71C17.54,19.91 17.28,20 17,20C16.74,20 16.5,19.91 16.29,19.71C16.09,19.5 16,19.26 16,19C16,18.7 16.09,18.47 16.29,18.28C16.5,18.09 16.73,18 17,18Z"},{id:"valve",label:"Valve",category:"technical",path:"M4 22H2V2H4M22 2H20V22H22M17.24 5.34L13.24 9.34A3 3 0 0 0 9.24 13.34L5.24 17.34L6.66 18.76L10.66 14.76A3 3 0 0 0 14.66 10.76L18.66 6.76Z"},{id:"tank",label:"Tank",category:"technical",path:"M4 15V18C4 20.21 5.79 22 8 22H16C18.21 22 20 20.21 20 18V15H4M20 13V10C20 8.14 18.72 6.59 17 6.14V4C17 2.9 16.1 2 15 2H9C7.9 2 7 2.9 7 4V6.14C5.28 6.59 4 8.14 4 10V13H20M9 4H15V6H13C13 5.45 12.55 5 12 5S11 5.45 11 6H9V4Z"},{id:"pump",label:"Pump",category:"technical",path:"M2 21V15H3.5C3.18 14.06 3 13.05 3 12C3 7.03 7.03 3 12 3H22V9H20.5C20.82 9.94 21 10.95 21 12C21 16.97 16.97 21 12 21H2M5 12C5 13.28 5.34 14.47 5.94 15.5L9.4 13.5C9.15 13.06 9 12.55 9 12C9 11.35 9.21 10.75 9.56 10.26L6.3 7.93C5.5 9.08 5 10.5 5 12M12 19C14.59 19 16.85 17.59 18.06 15.5L14.6 13.5C14.08 14.4 13.11 15 12 15L11.71 15L11.33 18.97L12 19M12 9C13.21 9 14.26 9.72 14.73 10.76L18.37 9.1C17.27 6.68 14.83 5 12 5V9M12 11C11.45 11 11 11.45 11 12C11 12.55 11.45 13 12 13C12.55 13 13 12.55 13 12C13 11.45 12.55 11 12 11Z"},{id:"water_pump",label:"Water pump",category:"technical",path:"M19,14.5C19,14.5 21,16.67 21,18A2,2 0 0,1 19,20A2,2 0 0,1 17,18C17,16.67 19,14.5 19,14.5M5,18V9A2,2 0 0,1 3,7A2,2 0 0,1 5,5V4A2,2 0 0,1 7,2H9A2,2 0 0,1 11,4V5H19A2,2 0 0,1 21,7V9L21,11A1,1 0 0,1 22,12A1,1 0 0,1 21,13H17A1,1 0 0,1 16,12A1,1 0 0,1 17,11V9H11V18H12A2,2 0 0,1 14,20V22H2V20A2,2 0 0,1 4,18H5Z"},{id:"pipe",label:"Pipe",category:"technical",path:"M22,14H20V16H14V13H16V11H14V6A2,2 0 0,0 12,4H4V2H2V10H4V8H10V11H8V13H10V18A2,2 0 0,0 12,20H20V22H22"},{id:"solar_panel",label:"Solar panel",category:"technical",path:"M4,2H20A2,2 0 0,1 22,4V14A2,2 0 0,1 20,16H15V20H18V22H13V16H11V22H6V20H9V16H4A2,2 0 0,1 2,14V4A2,2 0 0,1 4,2M4,4V8H11V4H4M4,14H11V10H4V14M20,14V10H13V14H20M20,4H13V8H20V4Z"},{id:"lightning_bolt",label:"Lightning bolt",category:"technical",path:"M11 15H6L13 1V9H18L11 23V15Z"},{id:"radiator",label:"Radiator",category:"technical",path:"M7.95,3L6.53,5.19L7.95,7.4H7.94L5.95,10.5L4.22,9.6L5.64,7.39L4.22,5.19L6.22,2.09L7.95,3M13.95,2.89L12.53,5.1L13.95,7.3L13.94,7.31L11.95,10.4L10.22,9.5L11.64,7.3L10.22,5.1L12.22,2L13.95,2.89M20,2.89L18.56,5.1L20,7.3V7.31L18,10.4L16.25,9.5L17.67,7.3L16.25,5.1L18.25,2L20,2.89M2,22V14A2,2 0 0,1 4,12H20A2,2 0 0,1 22,14V22H20V20H4V22H2M6,14A1,1 0 0,0 5,15V17A1,1 0 0,0 6,18A1,1 0 0,0 7,17V15A1,1 0 0,0 6,14M10,14A1,1 0 0,0 9,15V17A1,1 0 0,0 10,18A1,1 0 0,0 11,17V15A1,1 0 0,0 10,14M14,14A1,1 0 0,0 13,15V17A1,1 0 0,0 14,18A1,1 0 0,0 15,17V15A1,1 0 0,0 14,14M18,14A1,1 0 0,0 17,15V17A1,1 0 0,0 18,18A1,1 0 0,0 19,17V15A1,1 0 0,0 18,14Z"},{id:"cog",label:"Gear",category:"technical",path:"M12,15.5A3.5,3.5 0 0,1 8.5,12A3.5,3.5 0 0,1 12,8.5A3.5,3.5 0 0,1 15.5,12A3.5,3.5 0 0,1 12,15.5M19.43,12.97C19.47,12.65 19.5,12.33 19.5,12C19.5,11.67 19.47,11.34 19.43,11L21.54,9.37C21.73,9.22 21.78,8.95 21.66,8.73L19.66,5.27C19.54,5.05 19.27,4.96 19.05,5.05L16.56,6.05C16.04,5.66 15.5,5.32 14.87,5.07L14.5,2.42C14.46,2.18 14.25,2 14,2H10C9.75,2 9.54,2.18 9.5,2.42L9.13,5.07C8.5,5.32 7.96,5.66 7.44,6.05L4.95,5.05C4.73,4.96 4.46,5.05 4.34,5.27L2.34,8.73C2.21,8.95 2.27,9.22 2.46,9.37L4.57,11C4.53,11.34 4.5,11.67 4.5,12C4.5,12.33 4.53,12.65 4.57,12.97L2.46,14.63C2.27,14.78 2.21,15.05 2.34,15.27L4.34,18.73C4.46,18.95 4.73,19.03 4.95,18.95L7.44,17.94C7.96,18.34 8.5,18.68 9.13,18.93L9.5,21.58C9.54,21.82 9.75,22 10,22H14C14.25,22 14.46,21.82 14.5,21.58L14.87,18.93C15.5,18.67 16.04,18.34 16.56,17.94L19.05,18.95C19.27,19.03 19.54,18.95 19.66,18.73L21.66,15.27C21.78,15.05 21.73,14.78 21.54,14.63L19.43,12.97Z"},{id:"wrench",label:"Wrench",category:"technical",path:"M22.7,19L13.6,9.9C14.5,7.6 14,4.9 12.1,3C10.1,1 7.1,0.6 4.7,1.7L9,6L6,9L1.6,4.7C0.4,7.1 0.9,10.1 2.9,12.1C4.8,14 7.5,14.5 9.8,13.6L18.9,22.7C19.3,23.1 19.9,23.1 20.3,22.7L22.6,20.4C23.1,20 23.1,19.3 22.7,19Z"},{id:"filter",label:"Filter",category:"technical",path:"M14,12V19.88C14.04,20.18 13.94,20.5 13.71,20.71C13.32,21.1 12.69,21.1 12.3,20.71L10.29,18.7C10.06,18.47 9.96,18.16 10,17.87V12H9.97L4.21,4.62C3.87,4.19 3.95,3.56 4.38,3.22C4.57,3.08 4.78,3 5,3V3H19V3C19.22,3 19.43,3.08 19.62,3.22C20.05,3.56 20.13,4.19 19.79,4.62L14.03,12H14Z"},{id:"boiler",label:"Boiler",category:"technical",path:"M8 2C6.89 2 6 2.89 6 4V16C6 17.11 6.89 18 8 18H9V20H6V22H9C10.11 22 11 21.11 11 20V18H13V20C13 21.11 13.89 22 15 22H18V20H15V18H16C17.11 18 18 17.11 18 16V4C18 2.89 17.11 2 16 2H8M12 4.97A2 2 0 0 1 14 6.97A2 2 0 0 1 12 8.97A2 2 0 0 1 10 6.97A2 2 0 0 1 12 4.97M10 14.5H14V16H10V14.5Z"},{id:"gas_station",label:"Gas station",category:"technical",path:"M18,10A1,1 0 0,1 17,9A1,1 0 0,1 18,8A1,1 0 0,1 19,9A1,1 0 0,1 18,10M12,10H6V5H12M19.77,7.23L19.78,7.22L16.06,3.5L15,4.56L17.11,6.67C16.17,7 15.5,7.93 15.5,9A2.5,2.5 0 0,0 18,11.5C18.36,11.5 18.69,11.42 19,11.29V18.5A1,1 0 0,1 18,19.5A1,1 0 0,1 17,18.5V14C17,12.89 16.1,12 15,12H14V5C14,3.89 13.1,3 12,3H6C4.89,3 4,3.89 4,5V21H14V13.5H15.5V18.5A2.5,2.5 0 0,0 18,21A2.5,2.5 0 0,0 20.5,18.5V9C20.5,8.31 20.22,7.68 19.77,7.23Z"},{id:"motor",label:"Motor",category:"technical",path:"M17,2H7A2,2 0 0,0 5,4V6H3V10H5V20A2,2 0 0,0 7,22H17A2,2 0 0,0 19,20V10H21V6H19V4A2,2 0 0,0 17,2M17,20H7V4H17V20M12,6A4,4 0 0,0 8,10V18H16V10A4,4 0 0,0 12,6M12,8A2,2 0 0,1 14,10H10A2,2 0 0,1 12,8Z"}],njt=[{id:"lights",label:"wm_group_Lights"},{id:"power",label:"wm_group_Power"},{id:"climate",label:"wm_group_Climate"},{id:"openings",label:"wm_group_Openings"},{id:"security",label:"wm_group_Security"},{id:"sensors",label:"wm_group_Sensors"},{id:"media",label:"wm_group_Media"},{id:"garden",label:"wm_group_Garden"},{id:"technical",label:"wm_group_Technical"},{id:"appliances",label:"wm_group_Appliances"},{id:"computers",label:"wm_group_Computers"},{id:"people",label:"wm_group_People"},{id:"other",label:"wm_group_Other"}];function rjt({d:t,size:e=24}){return p.jsx(Cu,{sx:{fontSize:e},viewBox:"0 0 24 24",children:p.jsx("path",{d:t})})}function u4(t){const{open:e,title:n,value:r,onClose:o,onSelect:s,socket:i,theme:a,admin:d}=t,[m,_]=E.useState("predefined"),[h,w]=E.useState(!1),x=E.useRef(null),S=D=>{const P=D.target.files?.[0];if(!P)return;const R=new FileReader;R.onload=()=>{s(R.result)},R.readAsDataURL(P),D.target.value=""},C=D=>{if(w(!1),!D)return;const P=Array.isArray(D)?D[0]:D;if(P){const R=P.startsWith("/")?P.substring(1):P;s(R)}},M=D=>{s(EL(D.path))};return p.jsxs(p.Fragment,{children:[p.jsxs(Mn,{open:e,onClose:o,maxWidth:"xs",fullWidth:!0,children:[p.jsx(tr,{children:n}),p.jsxs(Dn,{children:[r?p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:1,mb:2,p:1,borderRadius:1,bgcolor:"action.hover"},children:[p.jsx(Gn,{src:r,style:{width:32,height:32}}),p.jsx(oe,{variant:"body2",sx:{flex:1,color:"text.secondary"},children:B.t("wm_Current icon")}),p.jsx(st,{size:"small",onClick:()=>s(""),children:p.jsx(Do,{fontSize:"small"})})]}):null,p.jsxs(nc,{value:m,exclusive:!0,onChange:(D,P)=>{P&&_(P)},size:"small",fullWidth:!0,sx:{mb:2},children:[p.jsxs(pr,{value:"predefined",children:[p.jsx(lLt,{sx:{fontSize:16,mr:.5}}),B.t("wm_Predefined")]}),p.jsxs(pr,{value:"upload",children:[p.jsx(id,{sx:{fontSize:16,mr:.5}}),B.t("wm_Upload")]}),p.jsxs(pr,{value:"iobroker",children:[p.jsx(Wg,{sx:{fontSize:16,mr:.5}}),"ioBroker"]})]}),m==="predefined"?p.jsx(Y,{sx:{maxHeight:300,overflowY:"auto"},children:njt.map(D=>{const P=tjt.filter(R=>R.category===D.id);return P.length?p.jsxs(Y,{sx:{mb:1.5},children:[p.jsx(oe,{variant:"caption",sx:{color:"text.secondary",fontWeight:500,display:"block",mb:.5},children:B.t(D.label)}),p.jsx(Y,{sx:{display:"flex",flexWrap:"wrap",gap:.5},children:P.map(R=>{const W=EL(R.path),A=r===W;return p.jsx(ht,{title:R.label,children:p.jsx(Y,{onClick:()=>M(R),sx:N=>({width:36,height:36,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:1,cursor:"pointer",border:`2px solid ${A?N.palette.primary.main:"transparent"}`,bgcolor:A?"action.selected":"action.hover","&:hover":{bgcolor:"action.focus"}}),children:p.jsx(rjt,{d:R.path,size:22})})},R.id)})})]},D.id):null})}):null,m==="upload"?p.jsxs(Y,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:2,py:3},children:[p.jsx(bt,{variant:"outlined",startIcon:p.jsx(id,{}),onClick:()=>x.current?.click(),children:B.t("wm_Upload")}),p.jsx(oe,{variant:"caption",sx:{color:"text.secondary"},children:"SVG, PNG, JPG"}),p.jsx("input",{ref:x,type:"file",accept:"image/*,.svg",style:{display:"none"},onChange:S})]}):null,m==="iobroker"?p.jsxs(Y,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:2,py:3},children:[p.jsx(bt,{variant:"outlined",startIcon:p.jsx(Wg,{}),onClick:()=>w(!0),children:B.t("wm_Browse")}),p.jsx(oe,{variant:"caption",sx:{color:"text.secondary"},children:B.t("wm_Browse ioBroker")})]}):null]}),p.jsx(Fr,{children:p.jsx(bt,{color:"grey",startIcon:p.jsx(ms,{}),onClick:o,children:B.t("wm_Cancel")})})]}),h?p.jsx(o4,{socket:i,theme:a,imagePrefix:d?"../../files/":"../",filterByType:"images",onClose:()=>w(!1),onOk:C,allowNonRestricted:!0,allowUpload:!0,allowDownload:!0,allowCreateFolder:!0,allowDelete:!0,allowView:!0,showToolbar:!0,restrictToFolder:t.instance}):null]})}const Gg={name:"",color:"",backgroundColor:"",image:"",imageScope:"header"};function ojt(t){const{open:e,categoryName:n,categoryId:r,settings:o,onClose:s,onSave:i,socket:a,instance:d,theme:m,admin:_,categoryOptions:h}=t,w=_?"../../files/":"../",[x,S]=E.useState(o),[C,M]=E.useState(""),[D,P]=E.useState(""),[R,W]=E.useState(""),[A,N]=E.useState(!1),[H,q]=E.useState(!1),[J,z]=E.useState(!1),[K,X]=E.useState(!1),[te,ee]=E.useState(!1),[le,ae]=E.useState(!1),me=E.useRef(null),ie=E.useRef(null),se=E.useRef(null),re=E.useRef(null);E.useEffect(()=>{if(e){S({...o,name:o.name||n});const Ee=o.image||"";M(Ee?`/${w}${Ee.replace(/^\//,"")}`:"");const Ce=o.icon||"";P(Ce?`/${w}${Ce.replace(/^\//,"")}`:"");const Be=o.rootIcon||"";W(Be?`/${w}${Be.replace(/^\//,"")}`:"")}},[o,e,n,w]);const G=E.useCallback(async Ee=>{const Ce=new Image;Ce.src=Ee,await new Promise(ve=>{Ce.onload=()=>ve()});const Be=800;let ft=Ce.width,rt=Ce.height;ft>Be&&(rt=Math.round(rt*(Be/ft)),ft=Be);const qe=document.createElement("canvas");qe.width=ft,qe.height=rt,qe.getContext("2d").drawImage(Ce,0,0,ft,rt);const kt=qe.toDataURL("image/webp",.8).replace(/^data:image\/webp;base64,/,""),we=`category_${String(r).replace(/[^a-zA-Z0-9_-]/g,"_")}.webp`;try{await a.writeFile64(d,we,kt);const ve=`/${d}/${we}`;M(`/${w}${d}/${we}?t=${Date.now()}`),S(Fe=>({...Fe,image:ve}))}catch(ve){console.error("Failed to upload category image:",ve)}},[r,a,d,w]),ne=Ee=>{const Ce=Ee.target.files?.[0];if(!Ce)return;const Be=new FileReader;Be.onload=ft=>{G(ft.target?.result)},Be.readAsDataURL(Ce),Ee.target.value=""},ge=()=>{M(""),S(Ee=>({...Ee,image:""}))},_e=E.useCallback(async Ee=>{const Ce=new Image;Ce.src=Ee,await new Promise(Fe=>{Ce.onload=()=>Fe()});const Be=512,ft=document.createElement("canvas");ft.width=Be,ft.height=Be;const rt=ft.getContext("2d"),qe=Math.min(Ce.width,Ce.height),Je=(Ce.width-qe)/2,Dt=(Ce.height-qe)/2;rt.drawImage(Ce,Je,Dt,qe,qe,0,0,Be,Be);const we=ft.toDataURL("image/png").replace(/^data:image\/png;base64,/,""),ve="pwa_icon.png";try{await a.writeFile64(d,ve,we);const Fe=`/${d}/${ve}`;P(`/${w}${d}/${ve}?t=${Date.now()}`),S(Ge=>({...Ge,icon:Fe}))}catch(Fe){console.error("Failed to upload icon:",Fe)}},[a,d,w]),ue=Ee=>{const Ce=Ee.target.files?.[0];if(!Ce)return;const Be=new FileReader;Be.onload=ft=>{_e(ft.target?.result)},Be.readAsDataURL(Ce),Ee.target.value=""},de=Ee=>{if(z(!1),!Ee)return;const Ce=Array.isArray(Ee)?Ee[0]:Ee;if(Ce){const Be=Ce.startsWith("/")?Ce.substring(1):Ce,ft=`/${Be}`;P(`/${w}${Be}`),S(rt=>({...rt,icon:ft}))}},Te=()=>{P(""),S(Ee=>({...Ee,icon:""}))},je=typeof navigator<"u"&&!!navigator.mediaDevices?.getUserMedia&&window.isSecureContext!==!1,Pe=E.useCallback(()=>{if(re.current){for(const Ee of re.current.getTracks())Ee.stop();re.current=null}},[]),Oe=async()=>{try{const Ee=await navigator.mediaDevices.getUserMedia({video:{facingMode:"environment",width:{ideal:1280}}});re.current=Ee,N(!0),requestAnimationFrame(()=>{se.current&&(se.current.srcObject=Ee)})}catch(Ee){console.error("Camera access denied:",Ee)}},Ye=()=>{const Ee=se.current;if(!Ee)return;const Ce=document.createElement("canvas");Ce.width=Ee.videoWidth,Ce.height=Ee.videoHeight,Ce.getContext("2d").drawImage(Ee,0,0);const ft=Ce.toDataURL("image/png");Pe(),N(!1),G(ft)},Re=()=>{Pe(),N(!1)},Xe=Ee=>{if(q(!1),!Ee)return;const Ce=Array.isArray(Ee)?Ee[0]:Ee;if(Ce){const Be=Ce.startsWith("/")?Ce.substring(1):Ce,ft=`/${Be}`;M(`/${w}${Be}`),S(rt=>({...rt,image:ft}))}};E.useEffect(()=>{e||(Pe(),N(!1),q(!1))},[e,Pe]);const ze=r==="__root__",Ue=x.name!==(o.name||n)||x.color!==(o.color||"")||x.backgroundColor!==(o.backgroundColor||"")||x.image!==(o.image||"")||x.imageScope!==(o.imageScope||"header")||ze&&!!x.hideConfigButton!=!!o.hideConfigButton||ze&&(x.wmTheme||"auto")!==(o.wmTheme||"auto")||ze&&(x.defaultCategory||"")!==(o.defaultCategory||"")||(x.icon||"")!==(o.icon||"")||(x.rootIcon||"")!==(o.rootIcon||"");return p.jsxs(p.Fragment,{children:[p.jsxs(Mn,{open:e,onClose:s,maxWidth:"xs",fullWidth:!0,children:[p.jsx(tr,{children:n}),p.jsxs(Dn,{children:[p.jsx(En,{fullWidth:!0,variant:"filled",label:B.t("wm_Name"),value:x.name,onChange:Ee=>S({...x,name:Ee.target.value}),placeholder:n,size:"small",sx:{mt:1,mb:2}}),p.jsxs(Y,{sx:{mb:2},children:[p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t("wm_Color")}),p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:1},children:[p.jsx(Y,{component:"input",type:"color",value:x.color||"#1976d2",onChange:Ee=>S({...x,color:Ee.target.value}),sx:{width:40,height:40,border:"1px solid",borderColor:"divider",borderRadius:1,cursor:"pointer",p:"2px",backgroundColor:"transparent"}}),x.color?p.jsx(st,{size:"small",onClick:()=>S({...x,color:""}),children:p.jsx(Do,{fontSize:"small"})}):null]})]}),p.jsxs(Y,{sx:{mb:2},children:[p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t("wm_Background color")}),p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:1},children:[p.jsx(Y,{component:"input",type:"color",value:x.backgroundColor||"#121212",onChange:Ee=>S({...x,backgroundColor:Ee.target.value}),sx:{width:40,height:40,border:"1px solid",borderColor:"divider",borderRadius:1,cursor:"pointer",p:"2px",backgroundColor:"transparent"}}),x.backgroundColor?p.jsx(st,{size:"small",onClick:()=>S({...x,backgroundColor:""}),children:p.jsx(Do,{fontSize:"small"})}):null]})]}),p.jsxs(Y,{sx:{mb:2},children:[p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t("wm_Background image")}),p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:1},children:[p.jsx(bt,{variant:"outlined",size:"small",startIcon:p.jsx(id,{}),onClick:()=>me.current?.click(),sx:{textTransform:"none",flex:1},children:B.t("wm_Upload")}),p.jsx(ht,{title:je?"":B.t("wm_Camera requires HTTPS"),arrow:!0,children:p.jsx("span",{style:{flex:1},children:p.jsx(bt,{variant:"outlined",size:"small",startIcon:p.jsx(YD,{}),onClick:()=>{Oe()},disabled:!je,sx:{textTransform:"none",width:"100%"},children:B.t("wm_Take photo")})})}),p.jsx(bt,{variant:"outlined",size:"small",startIcon:p.jsx(Wg,{}),onClick:()=>q(!0),sx:{textTransform:"none",flex:1},children:B.t("wm_Browse")}),p.jsx("input",{ref:me,type:"file",accept:"image/*",style:{display:"none"},onChange:ne}),C?p.jsx(st,{size:"small",onClick:ge,children:p.jsx(Do,{fontSize:"small"})}):null]}),C?p.jsx(Y,{component:"img",src:C,sx:{mt:1,width:"100%",maxHeight:120,objectFit:"cover",borderRadius:1,border:"1px solid",borderColor:"divider"}}):null]}),C?p.jsxs(Y,{children:[p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t("wm_Image scope")}),p.jsxs(nc,{value:x.imageScope,exclusive:!0,onChange:(Ee,Ce)=>{Ce&&S({...x,imageScope:Ce})},size:"small",children:[p.jsx(pr,{value:"header",children:B.t("wm_Header only")}),p.jsx(pr,{value:"page",children:B.t("wm_Whole page")})]})]}):null,ze?null:p.jsxs(Y,{sx:{mt:2},children:[p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t("wm_Icons")}),p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:1},children:[p.jsx(Y,{onClick:()=>X(!0),sx:{width:48,height:48,borderRadius:1,border:"2px dashed",borderColor:"divider",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer","&:hover":{borderColor:"primary.main"}},children:x.icon?p.jsx(Gn,{src:x.icon,style:{width:32,height:32}}):p.jsx(id,{sx:{fontSize:24,color:"text.disabled"}})}),x.icon?p.jsx(st,{size:"small",onClick:()=>S(Ee=>({...Ee,icon:""})),children:p.jsx(Do,{fontSize:"small"})}):null]})]}),ze?p.jsxs(En,{select:!0,fullWidth:!0,variant:"filled",size:"small",label:B.t("wm_Theme"),value:x.wmTheme||"auto",onChange:Ee=>S({...x,wmTheme:Ee.target.value}),sx:{mt:2},children:[p.jsx(ln,{value:"auto",children:B.t("wm_theme_auto")}),p.jsx(ln,{value:"dark",children:B.t("wm_theme_dark")}),p.jsx(ln,{value:"light",children:B.t("wm_theme_light")}),p.jsx(ln,{value:"orangeDark",children:B.t("wm_theme_orangeDark")}),p.jsx(ln,{value:"blueDark",children:B.t("wm_theme_blueDark")}),p.jsx(ln,{value:"styling-grey",children:B.t("wm_theme_styling-grey")})]}):null,ze&&h?p.jsxs(En,{select:!0,fullWidth:!0,variant:"filled",size:"small",label:B.t("wm_Default category"),value:x.defaultCategory||"",onChange:Ee=>S({...x,defaultCategory:Ee.target.value||""}),sx:{mt:2},children:[p.jsx(ln,{value:"",children:B.t("wm_None (root)")}),h.map(Ee=>p.jsx(ln,{value:Ee.id,children:p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:1},children:[Ee.icon?p.jsx(Gn,{src:Ee.icon,style:{width:20,height:20,flexShrink:0}}):null,p.jsx("span",{children:Ee.label})]})},Ee.id))]}):null,ze?p.jsx(Wt,{control:p.jsx(hr,{checked:!!x.hideConfigButton,onChange:(Ee,Ce)=>{Ce&&!_?ae(!0):S({...x,hideConfigButton:Ce})},size:"small"}),label:B.t("wm_Hide config button"),sx:{mt:1}}):null,ze?p.jsxs(Y,{sx:{mt:2},children:[p.jsx(ht,{title:B.t("wm_App icon tooltip"),children:p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t("wm_App icon")})}),p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:1},children:[D?p.jsx(Y,{component:"img",src:D,sx:{width:48,height:48,borderRadius:1,border:"1px solid",borderColor:"divider",objectFit:"cover"}}):null,p.jsx(bt,{variant:"outlined",size:"small",startIcon:p.jsx(id,{}),onClick:()=>ie.current?.click(),sx:{textTransform:"none"},children:B.t("wm_Upload")}),p.jsx(bt,{variant:"outlined",size:"small",startIcon:p.jsx(Wg,{}),onClick:()=>z(!0),sx:{textTransform:"none"},children:B.t("wm_Browse")}),p.jsx("input",{ref:ie,type:"file",accept:"image/*",style:{display:"none"},onChange:ue}),D?p.jsx(st,{size:"small",onClick:Te,children:p.jsx(Do,{fontSize:"small"})}):null]})]}):null,ze?p.jsxs(Y,{sx:{mt:2},children:[p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t("wm_Root icon")}),p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:1},children:[R?p.jsx(Gn,{src:R,style:{width:36,height:36}}):null,p.jsx(bt,{variant:"outlined",size:"small",startIcon:p.jsx(Wg,{}),onClick:()=>ee(!0),sx:{textTransform:"none"},children:B.t("wm_Browse")}),R?p.jsx(st,{size:"small",onClick:()=>{W(""),S(Ee=>({...Ee,rootIcon:""}))},children:p.jsx(Do,{fontSize:"small"})}):null]})]}):null]}),p.jsxs(Fr,{children:[p.jsx(bt,{variant:"contained",disabled:!Ue,startIcon:p.jsx(mk,{}),onClick:()=>i(x),children:B.t("wm_Save")}),p.jsx(bt,{color:"grey",startIcon:p.jsx(ms,{}),onClick:s,children:B.t("wm_Cancel")})]})]}),H?p.jsx(o4,{socket:a,theme:m,imagePrefix:_?"../../files/":"../",filterByType:"images",onClose:()=>q(!1),onOk:Xe,allowNonRestricted:!0,allowUpload:!0,allowDownload:!0,allowCreateFolder:!0,allowDelete:!0,allowView:!0,showToolbar:!0,restrictToFolder:d}):null,K?p.jsx(u4,{open:!0,title:B.t("wm_Icons"),value:x.icon||"",onClose:()=>X(!1),onSelect:Ee=>{S(Ce=>({...Ce,icon:Ee})),Ee&&X(!1)},socket:a,theme:m,admin:_,instance:d}):null,te?p.jsx(u4,{open:!0,title:B.t("wm_Root icon"),value:x.rootIcon||"",onClose:()=>ee(!1),onSelect:Ee=>{S(Be=>({...Be,rootIcon:Ee}));const Ce=Ee?`/${w}${Ee.replace(/^\//,"")}`:"";W(Ce),Ee&&ee(!1)},socket:a,instance:d,theme:m,admin:_}):null,J?p.jsx(o4,{socket:a,theme:m,imagePrefix:_?"../../files/":"../",filterByType:"images",onClose:()=>z(!1),onOk:de,allowNonRestricted:!0,allowUpload:!0,allowDownload:!0,allowCreateFolder:!0,allowDelete:!0,allowView:!0,showToolbar:!0,restrictToFolder:d}):null,p.jsxs(Mn,{open:A,onClose:Re,maxWidth:"sm",fullWidth:!0,children:[p.jsx(tr,{children:B.t("wm_Take photo")}),p.jsx(Dn,{sx:{p:0,display:"flex",justifyContent:"center",backgroundColor:"black"},children:p.jsx(Y,{component:"video",ref:se,autoPlay:!0,playsInline:!0,muted:!0,sx:{width:"100%",maxHeight:"60vh",objectFit:"contain"}})}),p.jsxs(Fr,{children:[p.jsx(bt,{variant:"contained",startIcon:p.jsx(YD,{}),onClick:Ye,children:B.t("wm_Capture")}),p.jsx(bt,{color:"grey",startIcon:p.jsx(ms,{}),onClick:Re,children:B.t("wm_Cancel")})]})]}),p.jsxs(Mn,{open:le,onClose:()=>ae(!1),maxWidth:"xs",children:[p.jsx(tr,{children:B.t("wm_Warning")}),p.jsx(Dn,{children:p.jsx(oe,{children:B.t("wm_Hide config warning")})}),p.jsxs(Fr,{children:[p.jsx(bt,{onClick:()=>{S(Ee=>({...Ee,hideConfigButton:!0})),ae(!1)},color:"warning",children:B.t("wm_OK")}),p.jsx(bt,{onClick:()=>ae(!1),children:B.t("wm_Cancel")})]})]})]})}const sjt={[Ae.Types.socket]:"lights",[Ae.Types.light]:"lights",[Ae.Types.dimmer]:"lights",[Ae.Types.rgbSingle]:"lights",[Ae.Types.rgbwSingle]:"lights",[Ae.Types.rgb]:"lights",[Ae.Types.ct]:"lights",[Ae.Types.hue]:"lights",[Ae.Types.cie]:"lights",[Ae.Types.thermostat]:"climate",[Ae.Types.airCondition]:"climate",[Ae.Types.blind]:"blinds",[Ae.Types.blindButtons]:"blinds",[Ae.Types.window]:"openings",[Ae.Types.door]:"openings",[Ae.Types.lock]:"security",[Ae.Types.motion]:"security",[Ae.Types.floodAlarm]:"security",[Ae.Types.fireAlarm]:"security",[Ae.Types.temperature]:"info",[Ae.Types.humidity]:"info",[Ae.Types.illuminance]:"info",[Ae.Types.info]:"info",[Ae.Types.slider]:"info",[Ae.Types.volume]:"info",[Ae.Types.volumeGroup]:"info",[Ae.Types.location]:"info",[Ae.Types.locationOne]:"info",[Ae.Types.warning]:"info",[Ae.Types.image]:"info",[Ae.Types.weatherCurrent]:"info",[Ae.Types.weatherForecast]:"info"},pf=[{id:"lights",name:"wm_group_Lights"},{id:"climate",name:"wm_group_Climate"},{id:"blinds",name:"wm_group_Blinds"},{id:"openings",name:"wm_group_Openings"},{id:"security",name:"wm_group_Security"},{id:"info",name:"wm_group_Info"},{id:"widgets",name:"wm_group_Widgets"},{id:"other",name:"wm_group_Other"}];function ijt(t){const e={};for(const n of t){if(n.type==="category")continue;let r;if(n.type==="custom")r="widgets";else{const o=n.data;r=o.control?.type&&sjt[o.control.type]||"other"}e[r]||(e[r]=[]),e[r].push(n.id)}return pf.filter(n=>e[n.id]?.length).map(n=>({id:n.id,name:n.name,widgetIds:e[n.id]}))}function ajt(t){return t.flatMap(e=>e.widgetIds)}function ljt(t,e,n){const r=t.some(s=>s.id===n);let o=t.map(s=>{const i=s.widgetIds.filter(a=>a!==e);return s.id===n?{...s,widgetIds:i.includes(e)?i:[...i,e]}:i.length!==s.widgetIds.length?{...s,widgetIds:i}:s});if(!r){const s=pf.find(d=>d.id===n),i={id:n,name:s?.name||n,widgetIds:[e]},a=pf.findIndex(d=>d.id===n);if(a>=0){let d=o.length;for(let m=0;m<o.length;m++)if(pf.findIndex(h=>h.id===o[m].id)>a){d=m;break}o=[...o.slice(0,d),i,...o.slice(d)]}else o.push(i)}return o}function DL(t,e){return t.find(n=>n.widgetIds.includes(e))?.id}function eP(t){const{availableGroups:e,currentGroupId:n,onGroupChange:r}=t,o=E.useMemo(()=>{const s=new Set(e.map(a=>a.id)),i=[];for(const a of pf)s.has(a.id)?i.push(e.find(d=>d.id===a.id)):i.push({id:a.id,name:a.name,widgetIds:[]});for(const a of e)pf.some(d=>d.id===a.id)||i.push(a);return i},[e]);return p.jsxs(Y,{sx:{mb:2},children:[p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t("wm_Group")}),p.jsx(li,{value:n||"",variant:"filled",onChange:s=>r(s.target.value),size:"small",fullWidth:!0,renderValue:s=>{const i=o.find(d=>d.id===s);if(!i)return"";const a=d4(i.id);return p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:1},children:[a?v.cloneElement(a,{sx:{fontSize:18,color:"text.secondary"}}):null,B.t(i.name)]})},children:o.map(s=>{const i=d4(s.id);return p.jsxs(ln,{value:s.id,children:[i?p.jsx(Zl,{sx:{minWidth:32},children:v.cloneElement(i,{sx:{fontSize:20,color:"text.secondary"}})}):null,p.jsx(Ei,{children:B.t(s.name)})]},s.id)})})]})}function cjt(t){return p.jsxs(Cu,{...t,viewBox:"0 0 24 24",children:[p.jsx("rect",{x:"7",y:"2",width:"10",height:"2.5",rx:"1.25"}),p.jsx("rect",{x:"11",y:"4.5",width:"2",height:"4"}),p.jsx("path",{d:"M3,8.5 L21,8.5 L12,14 Z"}),p.jsx("path",{d:"M3,15.5 L21,15.5 L12,10 Z"}),p.jsx("rect",{x:"10",y:"15.5",width:"4",height:"6.5"})]})}function djt(t){return p.jsx(Cu,{...t,children:p.jsx("path",{d:"M12,11A1,1 0 0,0 11,12A1,1 0 0,0 12,13A1,1 0 0,0 13,12A1,1 0 0,0 12,11M12.5,2C17,2 17.11,5.57 14.75,6.75C13.76,7.24 13.32,8.29 13.13,9.22C13.61,9.42 14.03,9.73 14.35,10.13C18.05,8.13 22.03,8.92 22.03,12.5C22.03,17 18.46,17.1 17.28,14.73C16.78,13.74 15.72,13.3 14.79,13.11C14.59,13.59 14.28,14 13.88,14.34C15.87,18.03 15.08,22 11.5,22C7,22 6.91,18.42 9.27,17.24C10.25,16.75 10.69,15.71 10.89,14.79C10.4,14.59 9.97,14.27 9.65,13.87C5.96,15.85 2,15.07 2,11.5C2,7 5.56,6.89 6.74,9.26C7.24,10.25 8.29,10.68 9.22,10.87C9.41,10.39 9.73,9.97 10.14,9.65C8.15,5.96 8.94,2 12.5,2Z"})})}const ujt=[{value:"",label:"wm_Default",icon:p.jsx(iLt,{sx:{fontSize:20}})},{value:"person",label:"wm_Person",icon:p.jsx(bLt,{sx:{fontSize:20}})},{value:"car",label:"wm_Car",icon:p.jsx(ZDt,{sx:{fontSize:20}})},{value:"boat",label:"wm_Boat",icon:p.jsx(XDt,{sx:{fontSize:20}})},{value:"yacht",label:"wm_Yacht",icon:p.jsx(xLt,{sx:{fontSize:20}})},{value:"moped",label:"wm_Moped",icon:p.jsx(ILt,{sx:{fontSize:20}})},{value:"bicycle",label:"wm_Bicycle",icon:p.jsx(vLt,{sx:{fontSize:20}})}];function pjt(t){const{open:e,widgetName:n,settings:r,onClose:o,onSave:s,showChart:i,showBlindType:a,showPin:d,showHideWhenOk:m,showOnBrightness:_,showCoordinates:h,showMarkerIcon:w,showMapTheme:x,showSliderType:S,showWideSliderStyle:C,showAnimation:M,showRefreshInterval:D,objectName:P,objectColor:R,onDelete:W}=t,[A,N]=E.useState(r),[H,q]=E.useState(null),J=E.useRef(null);E.useEffect(()=>{e&&N({...r,name:r.name||P||n,color:r.color||R||""})},[r,e,n,P,R]);const z=A.markerIcon?.startsWith("data:"),K=X=>{const te=X.target.files?.[0];if(!te)return;const ee=new FileReader;ee.onload=()=>{N({...A,markerIcon:ee.result})},ee.readAsDataURL(te),X.target.value=""};return p.jsxs(p.Fragment,{children:[p.jsxs(Mn,{open:e,onClose:o,maxWidth:"xs",fullWidth:!0,children:[p.jsx(tr,{children:n}),p.jsxs(Dn,{children:[p.jsx(En,{fullWidth:!0,variant:"filled",label:B.t("wm_Name"),value:A.name,onChange:X=>N({...A,name:X.target.value}),placeholder:n,size:"small",sx:{mt:1,mb:2}}),p.jsxs(Y,{sx:{mb:2,display:"flex",gap:3},children:[p.jsxs(Y,{sx:{flex:1},children:[p.jsx(oe,{variant:"body2",sx:{mb:.5,fontWeight:500},children:B.t("wm_Color")}),p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:.5},children:[p.jsx(Y,{component:"input",type:"color",value:A.color||"#1976d2",onChange:X=>N({...A,color:X.target.value}),sx:{width:36,height:36,border:"1px solid",borderColor:"divider",borderRadius:1,cursor:"pointer",p:"2px",backgroundColor:"transparent"}}),A.color?p.jsx(st,{size:"small",onClick:()=>N({...A,color:""}),children:p.jsx(Do,{fontSize:"small"})}):null]})]}),p.jsxs(Y,{sx:{flex:1},children:[p.jsx(oe,{variant:"body2",sx:{mb:.5,fontWeight:500},children:B.t("wm_Color inactive")}),p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:.5},children:[p.jsx(Y,{component:"input",type:"color",value:A.colorInactive||"#9e9e9e",onChange:X=>N({...A,colorInactive:X.target.value}),sx:{width:36,height:36,border:"1px solid",borderColor:"divider",borderRadius:1,cursor:"pointer",p:"2px",backgroundColor:"transparent"}}),A.colorInactive?p.jsx(st,{size:"small",onClick:()=>N({...A,colorInactive:""}),children:p.jsx(Do,{fontSize:"small"})}):null]})]})]}),p.jsxs(Y,{children:[p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t("wm_Size")}),p.jsx(nc,{value:A.size,exclusive:!0,onChange:(X,te)=>{te&&N({...A,size:te})},size:"small",children:Ig.map(X=>p.jsx(pr,{value:X.value,children:p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:.75,px:.5},children:[X.icon,p.jsx("span",{children:X.label})]})},X.value))})]}),a?p.jsxs(Y,{sx:{mt:2},children:[p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t("wm_BlindType")}),p.jsxs(nc,{value:A.blindType||"shutter",exclusive:!0,onChange:(X,te)=>{te&&N({...A,blindType:te})},size:"small",children:[p.jsx(pr,{value:"shutter",children:B.t("wm_Shutter")}),p.jsx(pr,{value:"curtain",children:B.t("wm_Curtain")})]})]}):null,d?p.jsx(En,{fullWidth:!0,variant:"filled",label:B.t("wm_PIN Code"),value:A.pin||"",onChange:X=>{const te=X.target.value.replace(/\D/g,"");N({...A,pin:te})},placeholder:"1234",size:"small",slotProps:{htmlInput:{inputMode:"numeric",maxLength:8}},helperText:B.t("wm_PIN help"),sx:{mt:2}}):null,m?p.jsx(Wt,{control:p.jsx(Ii,{checked:!!A.hideWhenOk,onChange:(X,te)=>N({...A,hideWhenOk:te}),color:"primary"}),label:B.t("wm_Hide when OK"),sx:{mt:1,display:"flex"}}):null,t.showAlarmTexts?p.jsxs(Y,{sx:{mt:2,display:"flex",gap:1},children:[p.jsx(En,{variant:"filled",label:B.t("wm_Text active"),value:A.textActive||"",onChange:X=>N({...A,textActive:X.target.value}),placeholder:t.showAlarmTexts.activeDefault,size:"small",sx:{flex:1}}),p.jsx(En,{variant:"filled",label:B.t("wm_Text inactive"),value:A.textInactive||"",onChange:X=>N({...A,textInactive:X.target.value}),placeholder:t.showAlarmTexts.inactiveDefault,size:"small",sx:{flex:1}})]}):null,t.showAlarmIcons?p.jsxs(Y,{sx:{mt:2},children:[p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t("wm_Icons")}),p.jsxs(Y,{sx:{display:"flex",gap:2},children:[p.jsxs(Y,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",gap:.5},children:[p.jsx(oe,{variant:"caption",sx:{color:"text.secondary"},children:B.t("wm_Icon active")}),p.jsx(Y,{onClick:()=>q("iconActive"),sx:{width:48,height:48,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:1,cursor:"pointer",border:"1px dashed",borderColor:"divider","&:hover":{bgcolor:"action.hover"}},children:A.iconActive?p.jsx(Gn,{src:A.iconActive,style:{width:32,height:32,color:A.color||void 0}}):p.jsx(id,{sx:{fontSize:24,color:"text.disabled"}})}),A.iconActive?p.jsx(st,{size:"small",onClick:X=>{X.stopPropagation(),N({...A,iconActive:""})},children:p.jsx(Do,{fontSize:"small"})}):null]}),p.jsxs(Y,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",gap:.5},children:[p.jsx(oe,{variant:"caption",sx:{color:"text.secondary"},children:B.t("wm_Icon inactive")}),p.jsx(Y,{onClick:()=>q("iconInactive"),sx:{width:48,height:48,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:1,cursor:"pointer",border:"1px dashed",borderColor:"divider","&:hover":{bgcolor:"action.hover"}},children:A.iconInactive?p.jsx(Gn,{src:A.iconInactive,style:{width:32,height:32,color:A.colorInactive||"grey"}}):p.jsx(id,{sx:{fontSize:24,color:"text.disabled"}})}),A.iconInactive?p.jsx(st,{size:"small",onClick:X=>{X.stopPropagation(),N({...A,iconInactive:""})},children:p.jsx(Do,{fontSize:"small"})}):null]})]})]}):null,t.showIcon?p.jsxs(Y,{sx:{mt:2},children:[p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t("wm_Icons")}),p.jsxs(Y,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:.5,width:"fit-content"},children:[p.jsx(Y,{onClick:()=>q("icon"),sx:{width:48,height:48,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:1,cursor:"pointer",border:"1px dashed",borderColor:"divider","&:hover":{bgcolor:"action.hover"}},children:A.icon?p.jsx(Gn,{src:A.icon,style:{width:32,height:32,color:A.color||"#1976d2"}}):p.jsx(id,{sx:{fontSize:24,color:"text.disabled"}})}),A.icon?p.jsx(st,{size:"small",onClick:X=>{X.stopPropagation(),N({...A,icon:""})},children:p.jsx(Do,{fontSize:"small"})}):null]})]}):null,_?p.jsx(En,{fullWidth:!0,variant:"filled",label:B.t("wm_On brightness"),type:"number",value:A.onBrightness??100,onChange:X=>{const te=Math.max(1,Math.min(100,Number(X.target.value)||100));N({...A,onBrightness:te})},size:"small",slotProps:{htmlInput:{min:1,max:100}},helperText:"%",sx:{mt:2}}):null,h?p.jsx(Wt,{control:p.jsx(Ii,{checked:!!A.showCoordinates,onChange:(X,te)=>N({...A,showCoordinates:te}),color:"primary"}),label:B.t("wm_Show coordinates"),sx:{mt:1,display:"flex"}}):null,S?p.jsxs(Y,{sx:{mt:2},children:[p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t("wm_Slider type")}),p.jsxs(nc,{value:A.sliderType||"normal",exclusive:!0,onChange:(X,te)=>{te&&N({...A,sliderType:te})},size:"small",children:[p.jsxs(pr,{value:"normal",children:[p.jsx(ht,{title:B.t("wm_slider_normal"),children:p.jsx(Tf,{sx:{fontSize:18,mr:.5}})}),B.t("wm_slider_normal")]}),p.jsxs(pr,{value:"valve",children:[p.jsx(ht,{title:B.t("wm_slider_valve"),children:p.jsx(cjt,{sx:{fontSize:18,mr:.5}})}),B.t("wm_slider_valve")]}),p.jsxs(pr,{value:"fan",children:[p.jsx(ht,{title:B.t("wm_slider_fan"),children:p.jsx(djt,{sx:{fontSize:18,mr:.5}})}),B.t("wm_slider_fan")]}),p.jsxs(pr,{value:"gauge",children:[p.jsx(ht,{title:B.t("wm_slider_gauge"),children:p.jsx(yu,{sx:{fontSize:18,mr:.5}})}),B.t("wm_slider_gauge")]})]})]}):null,C&&(A.size==="2x0.5"||A.size==="2x1")?p.jsxs(Y,{sx:{mt:2},children:[p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t("wm_Wide slider style")}),p.jsxs(nc,{value:A.wideSliderStyle||"horizontal",exclusive:!0,onChange:(X,te)=>{te&&N({...A,wideSliderStyle:te})},size:"small",children:[p.jsx(pr,{value:"horizontal",children:B.t("wm_slider_horizontal")}),p.jsx(pr,{value:"round",children:B.t("wm_slider_round")})]})]}):null,M?p.jsx(Wt,{control:p.jsx(Ii,{checked:A.showAnimation!==!1,onChange:(X,te)=>N({...A,showAnimation:te}),color:"primary"}),label:B.t("wm_Show animation"),sx:{mt:1,display:"flex"}}):null,D?p.jsxs(Y,{sx:{mt:2},children:[p.jsx(En,{fullWidth:!0,variant:"filled",label:B.t("wm_Refresh interval"),type:"number",value:A.refreshInterval??0,onChange:X=>{const te=Math.max(0,Number(X.target.value)||0);N({...A,refreshInterval:te})},size:"small",slotProps:{htmlInput:{min:0}},helperText:B.t("wm_Refresh interval help")}),p.jsx(Wt,{control:p.jsx(Ii,{checked:!!A.appendTimestamp,onChange:(X,te)=>N({...A,appendTimestamp:te}),color:"primary"}),label:B.t("wm_Append timestamp"),sx:{mt:1,display:"flex"}})]}):null,w?p.jsxs(Y,{sx:{mt:2},children:[p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t("wm_Marker icon")}),p.jsxs(Y,{sx:{display:"flex",flexWrap:"wrap",gap:.5,alignItems:"center"},children:[ujt.map(X=>{const te=!z&&(A.markerIcon||"")===X.value;return p.jsx(ht,{title:B.t(X.label),children:p.jsx(Y,{onClick:()=>N({...A,markerIcon:X.value}),sx:ee=>({width:36,height:36,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:1,cursor:"pointer",border:`2px solid ${te?ee.palette.primary.main:"transparent"}`,bgcolor:te?"action.selected":"action.hover","&:hover":{bgcolor:"action.focus"}}),children:X.icon})},X.value||"__default")}),p.jsx(ht,{title:B.t("wm_Custom"),children:p.jsx(Y,{onClick:()=>J.current?.click(),sx:X=>({width:36,height:36,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:1,cursor:"pointer",border:`2px solid ${z?X.palette.primary.main:"transparent"}`,bgcolor:z?"action.selected":"action.hover","&:hover":{bgcolor:"action.focus"}}),children:z?p.jsx(Gn,{src:A.markerIcon,style:{width:20,height:20}}):p.jsx(id,{sx:{fontSize:20}})})}),z?p.jsx(st,{size:"small",onClick:()=>N({...A,markerIcon:""}),children:p.jsx(Do,{fontSize:"small"})}):null]}),p.jsx("input",{ref:J,type:"file",accept:"image/*,.svg",style:{display:"none"},onChange:K})]}):null,x?p.jsxs(Y,{sx:{mt:2},children:[p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t("wm_Map theme")}),p.jsxs(nc,{value:A.mapTheme||"standard",exclusive:!0,onChange:(X,te)=>{te&&N({...A,mapTheme:te})},size:"small",children:[p.jsx(pr,{value:"standard",children:B.t("wm_map_standard")}),p.jsx(pr,{value:"dark",children:B.t("wm_map_dark")}),p.jsx(pr,{value:"satellite",children:B.t("wm_map_satellite")})]})]}):null,i?p.jsxs(Y,{sx:{mt:2},children:[p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t("wm_Chart")}),p.jsxs(nc,{value:A.chartHours,exclusive:!0,onChange:(X,te)=>{te!=null&&N({...A,chartHours:te})},size:"small",sx:{width:"100%","& .MuiToggleButton-root":{flex:1}},children:[p.jsx(pr,{value:0,children:B.t("wm_Off")}),p.jsx(pr,{value:1,children:"1h"}),p.jsx(pr,{value:3,children:"3h"}),p.jsx(pr,{value:6,children:"6h"}),p.jsx(pr,{value:12,children:"12h"}),p.jsx(pr,{value:24,children:"24h"})]}),p.jsx(Wt,{control:p.jsx(Ii,{checked:A.showTrendArrow,onChange:X=>N({...A,showTrendArrow:X.target.checked}),size:"small"}),label:B.t("wm_Trend arrow"),sx:{mt:1}}),A.showTrendArrow?p.jsx(En,{label:B.t("wm_Trend period (min)"),type:"number",size:"small",value:A.trendMinutes||30,onChange:X=>{const te=Math.max(5,Math.min(1440,parseInt(X.target.value,10)||30));N({...A,trendMinutes:te})},slotProps:{htmlInput:{min:5,max:1440,step:5}},sx:{mt:1,width:180}}):null]}):null,t.availableGroups?.length?p.jsx(Y,{sx:{mt:2},children:p.jsx(eP,{availableGroups:t.availableGroups,currentGroupId:t.currentGroupId,onGroupChange:X=>t.onGroupChange?.(X)})}):null,W?p.jsx(bt,{variant:"outlined",color:"error",startIcon:p.jsx(Do,{}),onClick:()=>{W(),o()},fullWidth:!0,sx:{mt:3},children:B.t("wm_Delete")}):null]}),p.jsxs(Fr,{children:[p.jsx(bt,{variant:"contained",disabled:A.size===r.size&&A.chartHours===r.chartHours&&A.name===(r.name||P||n)&&A.color===(r.color||R||"")&&A.blindType===r.blindType&&(A.pin||"")===(r.pin||"")&&!!A.hideWhenOk==!!r.hideWhenOk&&(A.onBrightness??100)===(r.onBrightness??100)&&!!A.showCoordinates==!!r.showCoordinates&&(A.markerIcon||"")===(r.markerIcon||"")&&(A.mapTheme||"standard")===(r.mapTheme||"standard")&&(A.sliderType||"normal")===(r.sliderType||"normal")&&(A.wideSliderStyle||"horizontal")===(r.wideSliderStyle||"horizontal")&&A.showAnimation!==!1==(r.showAnimation!==!1)&&(A.refreshInterval??0)===(r.refreshInterval??0)&&!!A.appendTimestamp==!!r.appendTimestamp&&(A.textActive||"")===(r.textActive||"")&&(A.textInactive||"")===(r.textInactive||"")&&(A.colorInactive||"")===(r.colorInactive||"")&&(A.iconActive||"")===(r.iconActive||"")&&(A.iconInactive||"")===(r.iconInactive||"")&&(A.icon||"")===(r.icon||"")&&!!A.showTrendArrow==!!r.showTrendArrow&&(A.trendMinutes||30)===(r.trendMinutes||30),startIcon:p.jsx(mk,{}),onClick:()=>s(A),children:B.t("wm_Save")}),p.jsx(bt,{color:"grey",startIcon:p.jsx(ms,{}),onClick:o,children:B.t("wm_Cancel")})]})]}),H?p.jsx(u4,{open:!0,title:B.t(H==="iconActive"?"wm_Icon active":H==="iconInactive"?"wm_Icon inactive":"wm_Icons"),value:A[H]||"",onClose:()=>q(null),onSelect:X=>{N({...A,[H]:X}),X&&q(null)},instance:t.instance,socket:t.socket,theme:t.theme,admin:t.admin}):null]})}const hjt=[{type:"clock",icon:p.jsx(HDt,{}),i18nKey:"wm_Clock",descriptionKey:"wm_Clock_desc"},{type:"weather",icon:p.jsx(Hv,{}),i18nKey:"wm_Weather",descriptionKey:"wm_Weather_desc"},{type:"iframe",icon:p.jsx(pLt,{}),i18nKey:"wm_Iframe",descriptionKey:"wm_Iframe_desc"},{type:"wind",icon:p.jsx(us,{}),i18nKey:"wm_Wind",descriptionKey:"wm_Wind_desc"}];function mjt(t){const{open:e,onClose:n,onAdd:r}=t;return p.jsxs(Mn,{open:e,onClose:n,maxWidth:"xs",fullWidth:!0,slotProps:{paper:{sx:{borderRadius:"16px"}}},children:[p.jsxs(tr,{sx:{display:"flex",alignItems:"center",pr:6},children:[B.t("wm_Add widget"),p.jsx(st,{size:"small",onClick:n,sx:{position:"absolute",top:8,right:8},children:p.jsx(ms,{fontSize:"small"})})]}),p.jsx(Dn,{sx:{p:0},children:p.jsx(i1,{children:hjt.map(o=>p.jsxs(dw,{onClick:()=>{r(o.type),n()},children:[p.jsx(Zl,{children:o.icon}),p.jsx(Ei,{primary:B.t(o.i18nKey),secondary:B.t(o.descriptionKey)})]},o.type))})})]})}const j5={},A5=["latitude","longitude"];function fjt(t,e,n,r){return e.format==="radio"?p.jsxs(Y,{sx:{mb:2},children:[p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t(e.label)}),p.jsx(nc,{value:n,exclusive:!0,onChange:(o,s)=>{s&&r(s)},size:"small",children:e.options.map(o=>p.jsx(pr,{value:o.value,children:o.icon?p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:.75,px:.5},children:[o.icon,p.jsx("span",{children:B.t(o.label)})]}):B.t(o.label)},o.value))})]},t):p.jsxs(Y,{sx:{mb:2},children:[p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t(e.label)}),p.jsx(li,{value:n,variant:"filled",onChange:o=>r(o.target.value),size:"small",fullWidth:!0,children:e.options.map(o=>p.jsx(ln,{value:o.value,children:B.t(o.label)},o.value))})]},t)}function _jt(t,e,n,r){return p.jsxs(Y,{sx:{mb:2},children:[p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t(e.label)}),p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:1},children:[p.jsx(Y,{component:"input",type:"color",value:n||"#1976d2",onChange:o=>r(o.target.value),sx:{width:40,height:40,border:"1px solid",borderColor:"divider",borderRadius:1,cursor:"pointer",p:"2px",backgroundColor:"transparent"}}),n?p.jsx(st,{size:"small",onClick:()=>r(""),children:p.jsx(Do,{fontSize:"small"})}):null]})]},t)}function gjt(t,e,n,r){return p.jsxs(Y,{sx:{mb:2},children:[p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t(e.label)}),p.jsx(En,{value:n,variant:"filled",onChange:o=>r((e.inputType==="number",o.target.value)),placeholder:e.placeholder?B.t(e.placeholder):void 0,helperText:e.helperText?B.t(e.helperText):void 0,type:e.inputType||"text",size:"small",fullWidth:!0})]},t)}function yjt(t){const{configKey:e,item:n,value:r,onChange:o,socket:s}=t,[i,a]=E.useState([]),[d,m]=E.useState(!0);return E.useEffect(()=>{if(!s){m(!1);return}let _=!1;const h=[...n.adapterNames].sort().join(",");if(j5[h]){const w=j5[h];a(w),m(!1),!r&&w.length===1&&o(w[0].id);return}return(async()=>{const w=[];for(const x of n.adapterNames)try{const S=await s.getAdapterInstances(x);if(_)return;if(Array.isArray(S))for(const C of S){const M=C._id.replace("system.adapter.",""),D=C.common?.name,P=D&&typeof D=="object"?D.en||M:D||M;w.push({id:M,label:`${P} (${M})`})}}catch{}_||(j5[h]=w,a(w),m(!1),!r&&w.length===1&&o(w[0].id))})(),()=>{_=!0}},[s,n.adapterNames.join(",")]),p.jsxs(Y,{sx:{mb:2},children:[p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t(n.label)}),d?p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:1,py:1},children:[p.jsx(_d,{size:18}),p.jsxs(oe,{variant:"caption",sx:{color:"text.secondary"},children:[B.t("wm_Loading instances"),"..."]})]}):i.length===0?p.jsx(oe,{variant:"caption",sx:{color:"text.secondary"},children:B.t("wm_No weather adapters")}):p.jsxs(li,{value:r,variant:"filled",onChange:_=>o(_.target.value),size:"small",fullWidth:!0,displayEmpty:!0,children:[p.jsx(ln,{value:"",disabled:!0,children:B.t("wm_Select instance")}),i.map(_=>p.jsx(ln,{value:_.id,children:_.label},_.id))]})]},e)}function wjt(t){const{configKey:e,item:n,value:r,latitude:o,longitude:s,onChange:i}=t,[a,d]=E.useState(r||""),[m,_]=E.useState([]),[h,w]=E.useState(!1),[x,S]=E.useState(!1),C=E.useRef(null);E.useEffect(()=>{r&&r!==a&&d(r)},[r]);const M=E.useCallback(P=>{if(C.current&&clearTimeout(C.current),!P||P.length<2){_([]),S(!1);return}C.current=setTimeout(()=>{w(!0);const R=B.getLanguage()||"en";fetch(`https://geocoding-api.open-meteo.com/v1/search?name=${encodeURIComponent(P)}&count=5&language=${R}`).then(W=>W.json()).then(W=>{_(W.results||[]),S(!0),w(!1)}).catch(()=>{w(!1),S(!1)})},400)},[]);E.useEffect(()=>()=>{C.current&&clearTimeout(C.current)},[]);const D=P=>{const R=P.admin1?`${P.name}, ${P.admin1}, ${P.country||""}`:`${P.name}, ${P.country||""}`;d(R),_([]),S(!1),i(R,P.latitude,P.longitude)};return p.jsxs(Y,{sx:{mb:2},children:[p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t(n.label)}),p.jsx(En,{value:a,variant:"filled",onChange:P=>{d(P.target.value),M(P.target.value)},placeholder:B.t("wm_Search city"),size:"small",fullWidth:!0,slotProps:{input:{endAdornment:h?p.jsx(_d,{size:16}):p.jsx(gLt,{sx:{fontSize:18,color:"text.secondary"}})}}}),x&&m.length>0?p.jsx(i1,{dense:!0,sx:{border:"1px solid",borderColor:"divider",borderRadius:1,mt:.5,maxHeight:200,overflow:"auto"},children:m.map((P,R)=>p.jsxs(dw,{onClick:()=>D(P),children:[p.jsx(Ei,{primary:P.name,secondary:[P.admin1,P.country].filter(Boolean).join(", ")}),p.jsxs(oe,{variant:"caption",sx:{color:"text.secondary",ml:1,whiteSpace:"nowrap"},children:[P.latitude.toFixed(2),", ",P.longitude.toFixed(2)]})]},`${P.latitude}-${P.longitude}-${R}`))}):null,x&&m.length===0&&!h?p.jsx(oe,{variant:"caption",sx:{color:"text.secondary",mt:.5,display:"block"},children:B.t("wm_No results")}):null,o!=null&&s!=null?p.jsxs(oe,{variant:"caption",sx:{color:"text.secondary",mt:.5,display:"block"},children:[o.toFixed(4),"°, ",s.toFixed(4),"°"]}):null]},e)}function vjt(t){const{configKey:e,item:n,value:r,onChange:o,socket:s,theme:i}=t,[a,d]=E.useState(!1);return p.jsxs(Y,{sx:{mb:2},children:[p.jsx(oe,{variant:"body2",sx:{mb:1,fontWeight:500},children:B.t(n.label)}),p.jsxs(Y,{sx:{display:"flex",alignItems:"center",gap:1},children:[p.jsx(En,{value:r||"",variant:"filled",onChange:m=>o(m.target.value),placeholder:B.t("wm_State ID"),size:"small",fullWidth:!0}),p.jsx(bt,{variant:"outlined",size:"small",onClick:()=>d(!0),sx:{minWidth:40,px:1},children:"..."}),r?p.jsx(st,{size:"small",onClick:()=>o(""),children:p.jsx(Do,{fontSize:"small"})}):null]}),a&&s?p.jsx(mot,{theme:i,socket:s,dialogName:"windStateSelect",title:B.t(n.label),selected:r||"",onOk:m=>{const _=Array.isArray(m)?m[0]:m;_&&o(_),d(!1)},onClose:()=>d(!1)}):null]},e)}function bjt(t,e,n,r,o,s,i,a){if(e.visibleWhen&&s){for(const[d,m]of Object.entries(e.visibleWhen))if(Array.isArray(m)){if(!m.includes(s[d]))return null}else if(s[d]!==m)return null}switch(e.type){case"select":return fjt(t,e,n,r);case"color":return _jt(t,e,n,r);case"checkbox":return p.jsx(Wt,{control:p.jsx(hr,{checked:n,onChange:(d,m)=>r(m),size:"small"}),label:B.t(e.label)},t);case"instanceSelect":return p.jsx(yjt,{configKey:t,item:e,value:n,onChange:r,socket:o},t);case"text":return gjt(t,e,n,r);case"citySearch":return p.jsx(wjt,{configKey:t,item:e,value:n,latitude:s?.latitude,longitude:s?.longitude,onChange:(d,m,_)=>{if(i){const h={[t]:d};m!=null&&(h.latitude=m),_!=null&&(h.longitude=_),i(h)}else r(d)}},t);case"stateId":return p.jsx(vjt,{configKey:t,item:e,value:n,onChange:r,socket:o,theme:a},t)}}function xjt(t){const{open:e,widgetDef:n,onClose:r,onSave:o,onDelete:s,socket:i}=t,[a,d]=E.useState({}),m=n?Yw[n.type]:null;if(E.useEffect(()=>{if(e&&n){const S=Yw[n.type];if(S){const C={};for(const[M,D]of Object.entries(S.items)){const P=n[M];C[M]=P!==void 0?P:qg(D)}for(const M of A5){const D=n[M];D!==void 0&&(C[M]=D)}d(C)}}},[e,n]),!n||!m)return null;const _=(S,C)=>{d(M=>({...M,[S]:C}))},h=S=>{d(C=>({...C,...S}))},w=Object.entries(m.items).some(([S,C])=>{const M=n[S],D=M!==void 0?M:qg(C);return a[S]!==D})||A5.some(S=>{const C=n[S];return a[S]!==void 0&&a[S]!==C}),x=()=>{const S={id:n.id,type:n.type};for(const[C,M]of Object.entries(m.items)){const D=a[C],P=qg(M);D!==P&&(S[C]=D)}for(const C of A5)a[C]!=null&&(S[C]=a[C]);o(S)};return p.jsxs(Mn,{open:e,onClose:r,maxWidth:"xs",fullWidth:!0,children:[p.jsx(tr,{children:B.t(m.name)}),p.jsxs(Dn,{children:[p.jsx(Y,{sx:{mt:1},children:Object.entries(m.items).map(([S,C])=>bjt(S,C,a[S],M=>_(S,M),i,a,h,t.theme))}),t.availableGroups?.length?p.jsx(Y,{sx:{mb:2},children:p.jsx(eP,{availableGroups:t.availableGroups,currentGroupId:t.currentGroupId,onGroupChange:S=>t.onGroupChange?.(S)})}):null,p.jsx(bt,{variant:"outlined",color:"error",startIcon:p.jsx(Do,{}),onClick:()=>{s(),r()},fullWidth:!0,children:B.t("wm_Delete")})]}),p.jsxs(Fr,{children:[p.jsx(bt,{variant:"contained",disabled:!w,startIcon:p.jsx(mk,{}),onClick:x,children:B.t("wm_Save")}),p.jsx(bt,{color:"grey",startIcon:p.jsx(ms,{}),onClick:r,children:B.t("wm_Cancel")})]})]})}const Sjt=new Set([Ae.Types.floodAlarm,Ae.Types.fireAlarm,Ae.Types.motion,Ae.Types.window,Ae.Types.door,Ae.Types.warning]);function Cjt(t){const{settingsWidget:e,settingsWidgetName:n,widgetSettings:r,chartAvailable:o,settingsObjectName:s,settingsObjectColor:i,onCloseSettings:a,onSaveSettings:d,onDeleteWidget:m,categorySettingsCategoryId:_,categories:h,currentCategory:w,categorySettings:x,rootCategory:S,onCloseCategorySettings:C,onSaveCategorySettings:M,selectedInstance:D,customWidgetDialogCategoryId:P,onCloseCustomWidgetDialog:R,onAddCustomWidget:W,customWidgetSettingsCategoryId:A,customWidgetSettingsWidgetId:N,onCloseCustomWidgetSettings:H,onSaveCustomWidgetSettings:q,onDeleteCustomWidgetFromSettings:J,sidePanelDialogOpen:z,onCloseSidePanel:K,admin:X,socket:te,theme:ee,settingsWidgetId:le,onWidgetGroupMove:ae,getCategoryName:me}=t,ie=v.useMemo(()=>{const se=[];se.push({id:"__favorites__",label:B.t("wm_Favorites"),icon:"⭐"});for(const re of h){if(String(re.id)===S)continue;const G=typeof re.icon=="string"?re.icon:void 0;se.push({id:String(re.id),label:me(re),icon:G})}return se},[h,S,me]);return p.jsxs(p.Fragment,{children:[p.jsx(pjt,{open:e!=null,widgetName:n,settings:e&&r[String(e.id)]||Op,instance:t.selectedInstance,onClose:a,onSave:d,onDelete:m,showChart:o,showBlindType:e?.control?.type===Ae.Types.blind,showPin:e?.control?.type===Ae.Types.lock,showHideWhenOk:e?.control?.type===Ae.Types.floodAlarm||e?.control?.type===Ae.Types.fireAlarm||e?.control?.type===Ae.Types.warning,showCoordinates:e?.control?.type===Ae.Types.location||e?.control?.type===Ae.Types.locationOne,showMarkerIcon:e?.control?.type===Ae.Types.location||e?.control?.type===Ae.Types.locationOne,showMapTheme:e?.control?.type===Ae.Types.location||e?.control?.type===Ae.Types.locationOne,showSliderType:e?.control?.type===Ae.Types.slider||e?.control?.type===Ae.Types.percentage,showWideSliderStyle:e?.control?.type===Ae.Types.dimmer||e?.control?.type===Ae.Types.volume||e?.control?.type===Ae.Types.slider||e?.control?.type===Ae.Types.percentage,showAnimation:e?.control?.type===Ae.Types.info&&!!e?.control?.states.some(se=>se.name==="ACTUAL"&&/value\.fill|level\.tank|tank/i.test(se.stateRole||"")),showOnBrightness:e!=null&&[Ae.Types.rgbSingle,Ae.Types.rgbwSingle,Ae.Types.rgb,Ae.Types.hue,Ae.Types.cie,Ae.Types.ct].includes(e.control?.type)&&e.control.states.some(se=>se.name==="SET"||se.name==="ACTUAL"||se.name==="DIMMER"||se.name==="BRIGHTNESS")&&!e.control.states.some(se=>se.name==="ON_SET"||se.name==="ON"),showAlarmTexts:e?.control?.type===Ae.Types.floodAlarm?{activeDefault:B.t("wm_Flood"),inactiveDefault:B.t("wm_Dry")}:e?.control?.type===Ae.Types.fireAlarm?{activeDefault:B.t("wm_Fire"),inactiveDefault:B.t("wm_OK")}:e?.control?.type===Ae.Types.motion?{activeDefault:B.t("wm_Motion"),inactiveDefault:B.t("wm_Clear")}:e?.control?.type===Ae.Types.window?{activeDefault:B.t("wm_Open"),inactiveDefault:B.t("wm_Closed")}:e?.control?.type===Ae.Types.door?{activeDefault:B.t("wm_Open"),inactiveDefault:B.t("wm_Closed")}:e?.control?.type===Ae.Types.warning?{activeDefault:B.t("wm_Warning"),inactiveDefault:B.t("wm_OK")}:void 0,showAlarmIcons:e?.control?.type===Ae.Types.floodAlarm||e?.control?.type===Ae.Types.fireAlarm||e?.control?.type===Ae.Types.motion||e?.control?.type===Ae.Types.window||e?.control?.type===Ae.Types.door||e?.control?.type===Ae.Types.warning,showIcon:!!e?.control?.type&&!Sjt.has(e.control.type),showRefreshInterval:e?.control?.type===Ae.Types.image,socket:te,theme:ee,admin:X,objectName:s,objectColor:i,availableGroups:x[String(w.id)]?.widgetGroups,currentGroupId:le!=null&&x[String(w.id)]?.widgetGroups?DL(x[String(w.id)].widgetGroups,String(le)):void 0,onGroupChange:le!=null?se=>ae(String(w.id),String(le),se):void 0}),p.jsx(ojt,{open:_!=null,categoryName:_===S?x[S]?.name||B.t("wm_Settings"):_?me(h.find(se=>String(se.id)===_)||w):"",categoryId:_||"",settings:_&&x[_]||Gg,onClose:C,onSave:M,socket:te,instance:D,theme:ee,admin:X,categoryOptions:ie}),p.jsx(mjt,{open:P!=null,onClose:R,onAdd:W}),p.jsx(xjt,{open:A!=null,widgetDef:A&&N&&x[A]?.customWidgets?.find(se=>se.id===N)||null,onClose:H,onSave:q,onDelete:J,socket:te,theme:ee,availableGroups:A?x[A]?.widgetGroups:void 0,currentGroupId:A&&N&&x[A]?.widgetGroups?DL(x[A].widgetGroups,N):void 0,onGroupChange:A&&N?se=>ae(A,N,se):void 0}),p.jsx(iIt,{open:z,onClose:K,admin:X,socket:te})]})}const so="__root__",P5="__favorites__",T0=new Set([Ae.Types.floodAlarm,Ae.Types.fireAlarm,Ae.Types.motion,Ae.Types.window,Ae.Types.door,Ae.Types.warning]),LL='"Inter", "Roboto", "Helvetica Neue", Arial, sans-serif',kjt={dark:{mode:"dark",primary:"#90caf9",secondary:"#ce93d8",bgDefault:"#121212",bgPaper:"#1e1e1e",textPrimary:"#ffffff",textSecondary:"rgba(255,255,255,0.7)",textDisabled:"rgba(255,255,255,0.5)"},light:{mode:"light",primary:"#1976d2",secondary:"#9c27b0",bgDefault:"#f5f5f5",bgPaper:"#ffffff",textPrimary:"rgba(0,0,0,0.87)",textSecondary:"rgba(0,0,0,0.6)",textDisabled:"rgba(0,0,0,0.38)"},orangeDark:{mode:"dark",primary:"#f5a623",secondary:"#ff7043",bgDefault:"#1a1a1a",bgPaper:"#2c2c2e",textPrimary:"#f5f5f5",textSecondary:"rgba(245,245,245,0.65)",textDisabled:"rgba(245,245,245,0.4)"},blueDark:{mode:"dark",primary:"#5eb8ff",secondary:"#82b1ff",bgDefault:"#0d1b2a",bgPaper:"#1b2838",textPrimary:"#e0e6ed",textSecondary:"rgba(224,230,237,0.65)",textDisabled:"rgba(224,230,237,0.4)"},"styling-grey":{mode:"dark",primary:"#a0a0a0",secondary:"#78909c",bgDefault:"#111113",bgPaper:"#1c1c1e",textPrimary:"#e8e8e8",textSecondary:"rgba(232,232,232,0.55)",textDisabled:"rgba(232,232,232,0.35)"}};class $i extends zDt{static i18nInitialized=!1;static fontLoaded=!1;static loadConfigMode(e){try{const n=localStorage.getItem("wm_configMode");if(n!==null)return JSON.parse(n)===!0}catch{}return!!e}stateContext=new yk(this.props.socket);defaultHistory;lastAliveSubscribe="";lastTriggerLoad=0;filterTimeout=null;language=B.getLanguage();widgetTheme=null;widgetThemeType="";communicationStateId="";rootSettingsStateId="";guiConfigCache;constructor(e){super(e),$i.i18nInitialized||($i.i18nInitialized=!0,B.extendTranslations({en:Mut,de:vlt,ru:jmt,pt:Fgt,nl:G0t,fr:tbt,it:l5t,es:f3t,pl:xMt,uk:E8t,"zh-cn":PDt})),this.state={...this.state,categories:[],widgets:[],filter:"",loading:null,alive:null,widgetSettings:{},settingsWidgetId:null,chartAvailable:!1,settingsObjectName:"",settingsObjectColor:"",categorySettings:{},categorySettingsCategoryId:null,customWidgetDialogCategoryId:null,customWidgetSettingsCategoryId:null,customWidgetSettingsWidgetId:null,configMode:!!this.props.showSettingsButton&&$i.loadConfigMode(this.props.admin),sidePanelDialogOpen:!1,latitude:null,longitude:null},this.lastTriggerLoad=this.props.triggerLoad||0}getCategoryName=e=>{if(e.name&&typeof e.name=="string")return e.name;if(e.name&&typeof e.name=="object"&&!e.name.objectId){const n=e.name;return n[this.language]||n.en||String(e.id)}return String(e.id).split(".").pop()||""};buildHashPath(e){if(String(e.id)===so)return"";const n=[];let r=e;for(;r&&String(r.id)!==so;)n.unshift(encodeURIComponent(this.getCategoryName(r))),r=this.state.categories.find(o=>String(o.id)===String(r.parent));return n.join("/")}buildFavoritesCategory(e){const n=e||this.state.widgetSettings;return Object.values(n).some(o=>o.favorite)?{id:P5,type:"category",parent:so,name:{en:"Favorites",de:"Favoriten",ru:"Избранное",pt:"Favoritos",nl:"Favorieten",fr:"Favoris",it:"Preferiti",es:"Favoritos",pl:"Ulubione",uk:"Обрані","zh-cn":"收藏夹"},icon:"⭐"}:null}resolveCategoryFromHash(e,n,r){const o=e.startsWith("#")?e.substring(1):e;if(!o)return n.find(d=>String(d.id)===so);const s=o.split("/").map(d=>decodeURIComponent(d));let i=so,a;for(const d of s){if(a=n.find(m=>String(m.parent)===String(i)&&this.getCategoryName(m)===d),!a){if(i===so){const m=this.buildFavoritesCategory(r);m&&this.getCategoryName(m)===d&&(a=m)}if(!a)return}i=String(a.id)}return a}updateHash(e){const n=this.buildHashPath(e),r=n?`#${n}`:"";window.location.hash!==r&&(window.location.hash=r)}onHashChange=()=>{if(!this.state.categories.length)return;const e=this.resolveCategoryFromHash(window.location.hash,this.state.categories);e&&String(e.id)!==String(this.state.currentCategory?.id)&&this.setState({currentCategory:e})};async componentDidMount(){this.rootSettingsStateId=`${this.state.selectedInstance}.${this.props.rootSettingsStateId||"config"}`;const e=await this.props.socket.getObject(this.rootSettingsStateId);if(e){const r=e.native;this.guiConfigCache=r,this.setState({guiConfig:r}),r?.root?.icon&&$i.applyPwaIcon(r.root.icon,this.props.admin)}if(await this.props.socket.subscribeObject(this.rootSettingsStateId,this.onConfigChanged),this.props.communicationStateId&&(this.props.communicationStateId===!0?this.communicationStateId=`${this.state.selectedInstance}.info.widgetManager`:this.communicationStateId=`${this.state.selectedInstance}.${this.communicationStateId}`,await this.props.socket.getObject(this.communicationStateId)?await this.props.socket.subscribeState(this.communicationStateId,this.onBackendCommand):window.alert(`Updates from backend is not available, because state ${this.props.communicationStateId} does not exist`)),!$i.fontLoaded){$i.fontLoaded=!0;const r=document.createElement("link");r.rel="stylesheet",r.href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap",document.head.appendChild(r)}window.addEventListener("hashchange",this.onHashChange);let n=!1;if(this.state.alive===null&&this.state.selectedInstance){try{(await this.props.socket.getState(`system.adapter.${this.state.selectedInstance}.alive`))?.val&&(n=!0)}catch(r){console.error(r)}this.lastAliveSubscribe=this.state.selectedInstance,this.setState({alive:n},()=>this.props.socket.subscribeState(`system.adapter.${this.state.selectedInstance}.alive`,this.aliveHandler))}else this.state.alive!==null&&(n=this.state.alive);n&&this.loadItemsList();try{const r=await this.stateContext.getObject("system.config"),o=r?.common?.latitude,s=r?.common?.longitude;o!=null&&s!=null&&this.setState({latitude:o,longitude:s})}catch{}}async componentWillUnmount(){window.removeEventListener("hashchange",this.onHashChange),this.state.selectedInstance&&this.props.socket.unsubscribeState(`system.adapter.${this.state.selectedInstance}.alive`,this.aliveHandler),this.communicationStateId&&this.props.socket.unsubscribeState(this.communicationStateId,this.onBackendCommand),await this.props.socket.unsubscribeObject(this.rootSettingsStateId,this.onConfigChanged)}onBackendCommand=(e,n)=>{if(e===this.communicationStateId&&n?.val)try{JSON.parse(n.val).command==="all"&&this.loadItemsList()}catch(r){console.error(`Cannot parse command "${n.val}": ${r}`)}};onConfigChanged=(e,n)=>{if(e===this.rootSettingsStateId&&n?.native){const r=n.native;this.guiConfigCache=r,JSON.stringify(this.state.guiConfig)!==JSON.stringify(r)&&(this.setState(o=>{const s={...o.categorySettings};return r.root&&(s[so]={name:r.root.title||"",color:r.root.color||"",backgroundColor:r.root.backgroundColor||"",image:r.root.image||"",imageScope:r.root.imageScope||"header",icon:r.root.icon||"",rootIcon:r.root.rootIcon||"",wmTheme:r.root.wmTheme,defaultCategory:r.root.defaultCategory||"",customWidgets:r.root.customWidgets,widgetOrder:r.root.widgetOrder,widgetGroups:r.root.widgetGroups}),{guiConfig:r,categorySettings:s}}),r.root?.icon&&$i.applyPwaIcon(r.root.icon,this.props.admin))}};aliveHandler=(e,n)=>{if(this.state.selectedInstance&&e===`system.adapter.${this.state.selectedInstance}.alive`){const r=!!n?.val;r!==this.state.alive&&this.setState({alive:r},()=>{r&&this.componentDidMount().catch(console.error)})}};loadItemsList(){this.setState({loading:!0},async()=>{console.log(`Loading items for ${this.state.selectedInstance}...`);let e=this.state.alive;if(this.state.selectedInstance!==this.lastAliveSubscribe)if(this.lastAliveSubscribe&&this.props.socket.unsubscribeState(`system.adapter.${this.lastAliveSubscribe}.alive`,this.aliveHandler),this.lastAliveSubscribe=this.state.selectedInstance,this.state.selectedInstance){try{(await this.props.socket.getState(`system.adapter.${this.state.selectedInstance}.alive`))?.val&&(e=!0)}catch(n){console.error(n)}await this.props.socket.subscribeState(`system.adapter.${this.state.selectedInstance}.alive`,this.aliveHandler)}else e=!1;try{this.setState({loading:!!e,alive:e}),e&&await this.loadItems(n=>{const r=$i.extractWidgetSettingsFromWidgets(n.widgets),o=!!window.location.hash&&window.location.hash!=="#";let s;if(o&&(s=this.resolveCategoryFromHash(window.location.hash,n.categories,r)),!s){const i=this.guiConfigCache?.root?.defaultCategory;!o&&i&&(i===P5?s=this.buildFavoritesCategory(r)||void 0:s=n.categories.find(a=>String(a.id)===i))}s||(s=n.categories.find(i=>i.id===so)||n.categories[0]),this.setState({categories:n.categories,widgets:n.widgets,loading:!1,currentCategory:s,widgetSettings:r}),this.updateHash(s),console.log(`Loaded ${n.categories.length} categories and ${n.widgets.length} widgets...`),this.extractCategorySettings(n.categories)})}catch(n){console.error(n)}})}updateItem(e){if(e.type==="category"){const n=e,s={categories:this.state.categories.some(i=>String(i.id)===String(n.id))?this.state.categories.map(i=>String(i.id)===String(n.id)?n:i):[...this.state.categories,n]};this.state.currentCategory&&String(this.state.currentCategory.id)===String(n.id)&&(s.currentCategory=n),this.setState(s)}else{const n=e,o=this.state.widgets.some(a=>String(a.id)===String(n.id))?this.state.widgets.map(a=>String(a.id)===String(n.id)?n:a):[...this.state.widgets,n],s={...this.state.widgetSettings},i=$i.extractSingleWidgetSettings(n);i?s[String(n.id)]=i:delete s[String(n.id)],this.setState({widgets:o,widgetSettings:s})}}deleteItem(e){if(this.state.categories.findIndex(r=>String(r.id)===e)!==-1){const r=this.state.categories.filter(s=>String(s.id)!==e),o={categories:r};if(this.state.currentCategory&&String(this.state.currentCategory.id)===e){const s=this.state.currentCategory.parent;o.currentCategory=r.find(i=>String(i.id)===String(s))||r.find(i=>String(i.id)===so)||r[0]}this.setState(o)}else{const r=this.state.widgets.filter(o=>String(o.id)!==e);this.setState({widgets:r})}}onOpenSettings=e=>{this.setState({settingsWidgetId:e,chartAvailable:!1,settingsObjectName:"",settingsObjectColor:""}),this.checkChartAvailable(e),this.loadObjectSettings(e)};async loadObjectSettings(e){try{const n=await this.stateContext.getObject(String(e));if(n?.common){const r=typeof n.common.name=="object"?n.common.name[this.language]||n.common.name.en||"":n.common.name||"",o=n.common.color||"";this.setState({settingsObjectName:r,settingsObjectColor:o})}}catch{}}async checkChartAvailable(e){const n=this.state.widgets.find(r=>r.id===e);if(n?.control?.states?.length){if(this.defaultHistory===void 0)try{const r=await this.stateContext.getObject("system.config");this.defaultHistory=r?.common?.defaultHistory||""}catch{this.defaultHistory=""}if(this.defaultHistory){for(const r of n.control.states)if(r.id)try{if(await this.hasHistoryEnabled(r.id)){this.setState({chartAvailable:!0});return}}catch{}}}}async hasHistoryEnabled(e){let n;try{n=await this.stateContext.getObject(e)}catch{return!1}if(!n)return!1;if(n.common?.custom?.[this.defaultHistory]?.enabled)return!0;const r=n.common?.alias?.id;if(r){const o=typeof r=="object"?r.read:r;if(o&&o!==e)try{if((await this.stateContext.getObject(o))?.common?.custom?.[this.defaultHistory]?.enabled)return!0}catch{}}return!1}onSaveSettings=e=>{const{settingsWidgetId:n}=this.state;if(n!=null){const r={...this.state.widgetSettings,[String(n)]:e},o=this.state.widgets.find(i=>String(i.id)===String(n));let s=this.state.widgets;if(o){const a=(o.control?.type?T0.has(o.control.type):!1)?e.iconInactive||"":e.icon||"";a!==(o.icon||"")&&(s=s.map(d=>String(d.id)===String(n)?{...d,icon:a||void 0}:d))}this.setState({widgetSettings:r,widgets:s,settingsWidgetId:null}),this.saveWidgetSettingsToObject(String(n),e)}};onToggleFavorite=e=>{const n=this.state.widgetSettings[e]||{...Op},r={...n,favorite:!n.favorite},o={...this.state.widgetSettings,[e]:r};this.setState({widgetSettings:o}),this.saveWidgetSettingsToObject(e,r)};static extractSingleWidgetSettings(e){const n=e.custom;if(!n)return null;const r={};for(const o of Object.keys(Op))o==="name"||(o==="iconInactive"&&T0.has(e.control?.type)?e.icon&&(r.iconInactive=e.icon):o==="icon"&&!T0.has(e.control?.type)?e.icon&&(r.icon=e.icon):o in n&&(r[o]=n[o]));return Object.keys(r).length===0?null:{...Op,...r}}static extractWidgetSettingsFromWidgets(e){const n={};for(const r of e){const o=$i.extractSingleWidgetSettings(r);o&&(n[String(r.id)]=o)}return n}async saveWidgetSettingsToObject(e,n){const r=this.state.selectedInstance,o=this.state.widgets.find(i=>String(i.id)===e),s=o?.control?.type?T0.has(o.control.type):!1;try{const i=await this.props.socket.getObject(e);if(!i)return;const a=i.common;a.custom||={};const d={...a.custom[r]||{}};for(const m of Object.keys(Op)){if(m==="name"){n.name&&(a.name=n.name);continue}if(m==="iconInactive"&&s){n.iconInactive?a.icon=n.iconInactive:delete a.icon;continue}if(m==="icon"&&!s){n.icon?a.icon=n.icon:delete a.icon;continue}const _=n[m];_!==Op[m]?d[m]=_:delete d[m]}a.custom[r]=d,await this.props.socket.setObject(i._id,i)}catch(i){console.error("Failed to save widget settings:",i)}}onCloseSettings=()=>{this.setState({settingsWidgetId:null})};onDeleteWidget=async()=>{const e=this.state.settingsWidgetId;if(e==null)return;const n=this.state.selectedInstance;try{const o=await this.props.socket.getObject(String(e));if(o){const s=o.common;s.custom||={},s.custom[n]=null,await this.props.socket.setObject(o._id,o)}}catch(o){console.error("Failed to delete widget custom data:",o)}const r={...this.state.widgetSettings};delete r[String(e)],this.setState({widgetSettings:r,settingsWidgetId:null})};onDeleteWidgetById=async e=>{const n=this.state.selectedInstance;try{const o=await this.props.socket.getObject(String(e));if(o){const s=o.common;s.custom||={},s.custom[n]=null,await this.props.socket.setObject(o._id,o)}}catch(o){console.error("Failed to delete widget custom data:",o)}const r={...this.state.widgetSettings};delete r[String(e)],this.setState({widgetSettings:r})};extractCategorySettings(e){const n={},r=this.state.guiConfig?.root;r&&(n[so]={name:r.title||"",color:r.color||"",backgroundColor:r.backgroundColor||"",image:r.image||"",imageScope:r.imageScope||"header",icon:r.icon||"",rootIcon:r.rootIcon||"",wmTheme:r.wmTheme,defaultCategory:r.defaultCategory||"",customWidgets:r.customWidgets,widgetOrder:r.widgetOrder,widgetGroups:r.widgetGroups});for(const o of e){const s=String(o.id);if(s===so)continue;const i=this.getCategoryName(o),a=typeof o.color=="string"?o.color:"",d=o.custom?.backgroundColor||"",m=o.custom?.image||"",_=o.custom?.imageScope||"header",h=o.custom?.customWidgets,w=o.custom?.widgetOrder,x=o.custom?.widgetGroups,S=typeof o.icon=="string"?o.icon:"";n[s]={name:i,color:a,backgroundColor:d,image:m,imageScope:_,customWidgets:h,widgetOrder:w,widgetGroups:x,icon:S}}this.setState({categorySettings:n})}onOpenCategorySettings=e=>{this.setState({categorySettingsCategoryId:e})};onSaveCategorySettings=e=>{const{categorySettingsCategoryId:n}=this.state;if(n!=null){const r={...this.state.categorySettings,[n]:e};if(n===so){const o={...this.state.guiConfig,root:{...this.state.guiConfig?.root,title:e.name||"",color:e.color||"",backgroundColor:e.backgroundColor||"",image:e.image||"",imageScope:e.imageScope||"header",icon:e.icon||"",rootIcon:e.rootIcon||"",wmTheme:e.wmTheme||void 0,defaultCategory:e.defaultCategory||void 0}};this.setState({categorySettings:r,categorySettingsCategoryId:null,guiConfig:o}),this.saveRootSettings(o),e.icon&&$i.applyPwaIcon(e.icon,this.props.admin)}else{const o=this.state.categories.map(s=>String(s.id)===n?{...s,name:e.name||s.name,color:e.color||void 0,icon:e.icon||void 0,custom:{enabled:!0,...s.custom,backgroundColor:e.backgroundColor||"",image:e.image||"",imageScope:e.imageScope||"header"}}:s);this.setState({categorySettings:r,categories:o,categorySettingsCategoryId:null}),this.saveCategorySettingsToObject(n,e)}}};async saveCategorySettingsToObject(e,n){const r=this.state.selectedInstance;try{const o=await this.props.socket.getObject(e);if(o){const s=o.common||{};n.name&&(s.name=n.name),s.color=n.color||"",n.icon?s.icon=n.icon:delete s.icon,s.custom||={},s.custom[r]={enabled:!0,...s.custom[r],backgroundColor:n.backgroundColor||"",image:n.image||"",imageScope:n.imageScope||"header",...n.widgetOrder?{widgetOrder:n.widgetOrder}:{}},await this.props.socket.setObject(e,o)}}catch(o){console.error("Failed to save category settings:",o)}}async saveRootSettings(e){try{const n=await this.props.socket.getObject(this.rootSettingsStateId);n&&(n.native=e,await this.props.socket.setObject(this.rootSettingsStateId,n))}catch(n){console.error("Failed to save root settings:",n)}}static applyPwaIcon(e,n){const o=`${n?"../../files/":"../"}${e.replace(/^\//,"")}`;let s=document.querySelector('link[rel="shortcut icon"]');s||(s=document.createElement("link"),s.rel="shortcut icon",document.head.appendChild(s)),s.href=o;let i=document.querySelector('link[rel="apple-touch-icon"]');i||(i=document.createElement("link"),i.rel="apple-touch-icon",document.head.appendChild(i)),i.href=o;const a={short_name:document.title||"Smart Home",name:document.title||"Smart Home",icons:[{src:o,sizes:"192x192",type:"image/png"},{src:o,sizes:"512x512",type:"image/png"}],start_url:".",display:"standalone",theme_color:"#000000",background_color:"#121212"},d=new Blob([JSON.stringify(a)],{type:"application/json"}),m=URL.createObjectURL(d);let _=document.querySelector('link[rel="manifest"]');_||(_=document.createElement("link"),_.rel="manifest",document.head.appendChild(_)),_.href=m}onCloseCategorySettings=()=>{this.setState({categorySettingsCategoryId:null})};onWidgetOrderChange=(e,n)=>{const o={...this.state.categorySettings[e]||{name:"",color:"",backgroundColor:"",image:"",imageScope:"header"},widgetOrder:n},s={...this.state.categorySettings,[e]:o};if(e===so){const i={...this.state.guiConfig,root:{...this.state.guiConfig?.root,widgetOrder:n}};this.setState({categorySettings:s,guiConfig:i}),this.saveRootSettings(i)}else{const i=this.state.categories.map(a=>String(a.id)===e?{...a,custom:{...a.custom,widgetOrder:n}}:a);this.setState({categorySettings:s,categories:i}),this.saveWidgetOrderToObject(e,n)}};async saveWidgetOrderToObject(e,n){const r=this.state.selectedInstance;try{const o=await this.props.socket.getObject(e);if(o){const s=o.common||{};s.custom||={},s.custom[r]={...s.custom[r],widgetOrder:n},await this.props.socket.setObject(e,o)}}catch(o){console.error("Failed to save widget order:",o)}}onWidgetGroupsChange=(e,n)=>{const o={...this.state.categorySettings[e]||{...Gg},widgetGroups:n},s={...this.state.categorySettings,[e]:o};if(e===so){const i={...this.state.guiConfig,root:{...this.state.guiConfig?.root,widgetGroups:n}};this.setState({categorySettings:s,guiConfig:i}),this.saveRootSettings(i)}else{const i=this.state.categories.map(a=>String(a.id)===e?{...a,custom:{...a.custom,widgetGroups:n}}:a);this.setState({categorySettings:s,categories:i}),this.saveWidgetGroupsToObject(e,n)}};onToggleGrouping=(e,n)=>{const r=this.state.categorySettings[e]||{...Gg};if(r.widgetGroups?.length){const o=ajt(r.widgetGroups),s={...r,widgetGroups:void 0,widgetOrder:o};this.onWidgetOrderChange(e,o);const i={...this.state.categorySettings,[e]:s};if(this.setState({categorySettings:i}),e===so){const a={...this.state.guiConfig,root:{...this.state.guiConfig?.root,widgetGroups:void 0,widgetOrder:o}};this.setState({guiConfig:a}),this.saveRootSettings(a)}else{const a=this.state.categories.map(d=>String(d.id)===e?{...d,custom:{...d.custom,widgetGroups:void 0,widgetOrder:o}}:d);this.setState({categories:a}),this.saveWidgetGroupsToObject(e,void 0)}}else{const o=ijt(n);this.onWidgetGroupsChange(e,o)}};onWidgetGroupMove=(e,n,r)=>{const o=this.state.categorySettings[e];if(!o?.widgetGroups?.length)return;const s=ljt(o.widgetGroups,n,r);this.onWidgetGroupsChange(e,s)};onMoveWidgetToCategory=(e,n)=>{const r=this.state.widgets.map(o=>String(o.id)===e?{...o,parent:n}:o);this.setState({widgets:r}),this.saveWidgetParentOverride(e,n)};async saveWidgetParentOverride(e,n){const r=this.state.selectedInstance;try{const o=await this.props.socket.getObject(e);if(o){const s=o.common||{};s.custom||={},s.custom[r]={...s.custom[r],parent:n},await this.props.socket.setObject(o._id,o)}}catch(o){console.error("Failed to save widget parent override:",o)}}async saveWidgetGroupsToObject(e,n){const r=this.state.selectedInstance;try{const o=await this.props.socket.getObject(e);if(o){const s=o.common||{};s.custom||={},s.custom[r]={...s.custom[r],widgetGroups:n||null},await this.props.socket.setObject(e,o)}}catch(o){console.error("Failed to save widget groups:",o)}}onOpenCustomWidgetDialog=e=>{this.setState({customWidgetDialogCategoryId:e})};onCloseCustomWidgetDialog=()=>{this.setState({customWidgetDialogCategoryId:null})};onAddCustomWidget=e=>{const{customWidgetDialogCategoryId:n}=this.state;if(!n)return;const r=`custom_${e}_${Date.now().toString(36)}`,o={},s=Yw[e];if(s)for(const[_,h]of Object.entries(s.items))o[_]=qg(h);const i={id:r,type:e,...o},a=this.state.categorySettings[n]||{...Gg},d=[...a.customWidgets||[],i],m={...this.state.categorySettings,[n]:{...a,customWidgets:d}};this.setState({categorySettings:m,customWidgetDialogCategoryId:null}),this.persistCustomWidgets(n,d)};onRemoveCustomWidget=(e,n)=>{const r=this.state.categorySettings[e];if(!r?.customWidgets)return;const o=r.customWidgets.filter(i=>i.id!==n),s={...this.state.categorySettings,[e]:{...r,customWidgets:o}};this.setState({categorySettings:s}),this.persistCustomWidgets(e,o)};onOpenCustomWidgetSettings=(e,n)=>{this.setState({customWidgetSettingsCategoryId:e,customWidgetSettingsWidgetId:n})};onCloseCustomWidgetSettings=()=>{this.setState({customWidgetSettingsCategoryId:null,customWidgetSettingsWidgetId:null})};onSaveCustomWidgetSettings=e=>{const{customWidgetSettingsCategoryId:n}=this.state;if(!n)return;const r=this.state.categorySettings[n];if(!r?.customWidgets)return;const o=r.customWidgets.map(i=>i.id===e.id?e:i),s={...this.state.categorySettings,[n]:{...r,customWidgets:o}};this.setState({categorySettings:s,customWidgetSettingsCategoryId:null,customWidgetSettingsWidgetId:null}),this.persistCustomWidgets(n,o)};onDeleteCustomWidgetFromSettings=()=>{const{customWidgetSettingsCategoryId:e,customWidgetSettingsWidgetId:n}=this.state;e&&n&&this.onRemoveCustomWidget(e,n),this.setState({customWidgetSettingsCategoryId:null,customWidgetSettingsWidgetId:null})};persistCustomWidgets(e,n){if(e===so){const r={...this.state.guiConfig,root:{...this.state.guiConfig?.root,customWidgets:n}};this.setState({guiConfig:r}),this.saveRootSettings(r)}else{const r=this.state.categories.map(o=>String(o.id)===e?{...o,custom:{...o.custom,customWidgets:n}}:o);this.setState({categories:r}),this.saveCustomWidgetsToObject(e,n)}}async saveCustomWidgetsToObject(e,n){const r=this.state.selectedInstance;try{const o=await this.props.socket.getObject(e);o&&(o.common.custom||={},o.common.custom[r]={...o.common.custom[r],customWidgets:n},await this.props.socket.setObject(e,o))}catch(o){console.error("Failed to save custom widgets:",o)}}getWidgetName(e){if(typeof e.name=="string")return e.name||String(e.id);if(typeof e.name=="object"&&"en"in e.name){const n=e.name;return n[this.language]||n.en||String(e.id)}return String(e.id)}cachedWmThemeId;getWidgetTheme(){const e=this.state.categorySettings[so]?.wmTheme||"auto";if(this.widgetTheme&&this.widgetThemeType===this.props.themeType&&this.cachedWmThemeId===e)return this.widgetTheme;this.widgetThemeType=this.props.themeType,this.cachedWmThemeId=e;const n=e==="auto"?this.props.themeType:e,r=kjt[n];return r?(this.widgetTheme=qp({palette:{mode:r.mode,primary:{main:r.primary},secondary:{main:r.secondary},background:{default:r.bgDefault,paper:r.bgPaper},text:{primary:r.textPrimary,secondary:r.textSecondary,disabled:r.textDisabled}},typography:{fontFamily:LL},...n==="styling-grey"?{components:{MuiDialog:{styleOverrides:{paper:{borderRadius:"28px",background:"linear-gradient(145deg, #222224, #1a1a1c)",border:"1px solid rgba(255,255,255,0.04)",boxShadow:"0 24px 48px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.03)"}}},MuiDialogTitle:{styleOverrides:{root:{fontSize:"1rem",fontWeight:600}}},MuiDialogContent:{styleOverrides:{root:{"&::-webkit-scrollbar":{width:6},"&::-webkit-scrollbar-thumb":{background:"rgba(255,255,255,0.1)",borderRadius:3}}}},MuiButton:{styleOverrides:{outlined:{borderColor:"rgba(255,255,255,0.1)",borderRadius:"14px","&:hover":{borderColor:"rgba(255,255,255,0.2)",background:"rgba(255,255,255,0.04)"}},contained:{borderRadius:"14px",boxShadow:"0 4px 12px rgba(0,0,0,0.4)"}}},MuiIconButton:{styleOverrides:{root:{"&:hover":{background:"rgba(255,255,255,0.06)"}}}},MuiSlider:{styleOverrides:{root:{"& .MuiSlider-track":{boxShadow:"0 0 8px currentColor"},"& .MuiSlider-thumb":{boxShadow:"0 0 10px rgba(0,0,0,0.5)"}}}}}}:{}}),this.widgetTheme.wmPreset=n):this.widgetTheme=qp(this.props.theme,{typography:{fontFamily:LL}}),this.widgetTheme}render(){if(this.state.alive===!1)return p.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",opacity:.5},children:B.t("wm_Instance not active")});const e=this.state.currentCategory||this.state.categories.find(h=>h.id===so),n=this.state.settingsWidgetId!=null?this.state.widgets.find(h=>h.id===this.state.settingsWidgetId):null,r=!!this.props.showSettingsButton&&this.state.configMode,o=this.state.categorySettings[so]?.hideConfigButton,s=Object.entries(this.state.widgetSettings).filter(([,h])=>h.favorite).map(([h])=>h),i=s.length>0,a=this.buildFavoritesCategory(),d=i?this.state.widgets.filter(h=>s.includes(String(h.id))).map(h=>({...h,parent:P5})):[],m=a?[...this.state.categories,a]:this.state.categories,_=d.length?[...this.state.widgets,...d]:this.state.widgets;return e?p.jsx(q5,{theme:this.getWidgetTheme(),children:p.jsxs("div",{style:{width:"100%",height:"100%"},children:[p.jsx(ma,{category:e,categories:m,widgets:_,stateContext:this.stateContext,language:this.language,onNavigate:h=>{this.setState({currentCategory:h}),this.updateHash(h)},widgetSettings:this.state.widgetSettings,onOpenSettings:r?this.onOpenSettings:void 0,categorySettings:this.state.categorySettings,onOpenCategorySettings:r?this.onOpenCategorySettings:void 0,onAddCustomWidget:r?this.onOpenCustomWidgetDialog:void 0,onRemoveCustomWidget:r?this.onRemoveCustomWidget:void 0,onOpenCustomWidgetSettings:r?this.onOpenCustomWidgetSettings:void 0,onWidgetOrderChange:r?this.onWidgetOrderChange:void 0,onWidgetGroupsChange:this.onWidgetGroupsChange,onToggleGrouping:r?this.onToggleGrouping:void 0,onMoveWidgetToCategory:r?this.onMoveWidgetToCategory:void 0,configMode:this.state.configMode,onToggleConfigMode:this.props.showSettingsButton&&!o?()=>this.setState(h=>{const w=!h.configMode;try{localStorage.setItem("wm_configMode",JSON.stringify(w))}catch{}return{configMode:w}}):void 0,admin:this.props.admin,defaultHistory:this.defaultHistory||void 0,instanceId:this.state.selectedInstance||void 0,onInstallSidePanel:()=>this.setState({sidePanelDialogOpen:!0}),onDeleteWidgetById:r?this.onDeleteWidgetById:void 0,onToggleFavorite:r?this.onToggleFavorite:void 0,latitude:this.state.latitude,longitude:this.state.longitude},e.id),p.jsx(Cjt,{settingsWidget:n||null,settingsWidgetName:n?this.getWidgetName(n):"",widgetSettings:this.state.widgetSettings,chartAvailable:this.state.chartAvailable,settingsObjectName:this.state.settingsObjectName,settingsObjectColor:this.state.settingsObjectColor,onCloseSettings:this.onCloseSettings,onSaveSettings:this.onSaveSettings,onDeleteWidget:this.onDeleteWidget,categorySettingsCategoryId:this.state.categorySettingsCategoryId,categories:this.state.categories,currentCategory:e,categorySettings:this.state.categorySettings,rootCategory:so,onCloseCategorySettings:this.onCloseCategorySettings,onSaveCategorySettings:this.onSaveCategorySettings,selectedInstance:this.state.selectedInstance,customWidgetDialogCategoryId:this.state.customWidgetDialogCategoryId,onCloseCustomWidgetDialog:this.onCloseCustomWidgetDialog,onAddCustomWidget:this.onAddCustomWidget,customWidgetSettingsCategoryId:this.state.customWidgetSettingsCategoryId,customWidgetSettingsWidgetId:this.state.customWidgetSettingsWidgetId,onCloseCustomWidgetSettings:this.onCloseCustomWidgetSettings,onSaveCustomWidgetSettings:this.onSaveCustomWidgetSettings,onDeleteCustomWidgetFromSettings:this.onDeleteCustomWidgetFromSettings,sidePanelDialogOpen:this.state.sidePanelDialogOpen,onCloseSidePanel:()=>this.setState({sidePanelDialogOpen:!1}),admin:this.props.admin,socket:this.props.socket,theme:this.props.theme,settingsWidgetId:this.state.settingsWidgetId,onWidgetGroupMove:this.onWidgetGroupMove,getCategoryName:this.getCategoryName})]})}):p.jsx("div",{children:B.t("wm_Nothing defined")})}}const Tjt="Add",Mjt="Apply",$jt="Cancel",Ejt="Close",Djt="Color",Ljt="Create",Ijt="Delete",Ojt="Device",jjt="Devices",Ajt="Edit",Pjt="Enabled",Rjt="Execution",Njt="Filter",zjt="Functions",Hjt="General",Fjt="IDs",Wjt="Icon",Yjt="ID",Bjt="Import",Vjt="Importer",Ujt="Indicators",qjt="Name",Gjt="Names",Jjt="OK",Kjt="Off",Xjt="Ok",Zjt="On",Qjt="Readable",eAt="Refresh",tAt="Required",nAt="Role",rAt="Room",oAt="Rooms",sAt="Root",iAt="Save",aAt="Selected",lAt="States",cAt="Step",dAt="Title",uAt="Type",pAt="Types",hAt="Unit",mAt="Value",fAt="Writable",_At="Write",gAt="read",yAt="write",wAt="alive",vAt="You must add the devices to room or function categories to let the devices be detected automatically",bAt="boolean",xAt="file",SAt="Settings",CAt="Function",kAt="ID",TAt="Name",MAt="Role",$At="Room",EAt="Type",DAt="no structure",LAt="functions",IAt="No group",OAt="number",jAt="rooms",AAt="string",PAt="Acknowledged",RAt="Copy state value into clipboard",NAt="Settings",zAt="Delete object",HAt="Edit object",FAt="Modify state value",WAt="Source",YAt="Last change time",BAt="Quality",VAt="Time stamp",UAt="User",qAt="Value",GAt={Add:Tjt,'Add new folder to "%s"':'Add new folder to "%s"',"Add state":"Add state","Add to root":"Add to root",Apply:Mjt,"Automatically detected":"Native devices",Cancel:$jt,Close:Ejt,"Collapse all nodes":"Collapse all folders",Color:Djt,"Copy device":"Copy device","Copy device into aliases":"Copy device into aliases",Create:Ljt,"Create new device":"Create new device","Create new device with Aliases":"Create new device with Aliases","Create new device with LinkedDevices":"Create new device with LinkedDevices","Create new folder":"Create new folder","Create new folder in root":"Create new folder in root directory","Decrement color temperature":"Decrement color temperature","Decrement percentage":"Decrement percentage","Decrement target temperature":"Decrement target temperature",Delete:Ijt,"Delete device with all states":"Delete device with all states","Delete folder":"Delete folder","Delete state":"Delete state",Device:Ojt,"Device and all states will be deleted. Are you sure?":"Device and all states will be deleted. Are you sure?","Device name":"Device name","Device type":"Device type","Drag to resize":"Drag to resize","Drop or select a device to configure":"Drop or select a device to configure",Devices:jjt,"Disable smart":'Disable "smart" functionality',"Do not show dialog for 5 minutes":"Do not show dialog for 5 minutes",Edit:Ajt,"Edit convert functions":"Edit convert functions","Edit device":"Edit device","Edit folder":"Edit folder properties","Edit folder %s":'Edit folder "%s"','Edit name "%s"':'Edit name "%s"',"Edit name and other properties":"Edit name and other properties","Edit read/write functions":"Edit read/write functions","Edit state":"Edit state","Edit state %s":"Edit state %s","Edit states":"Edit states","Enable or disable device":"Enable or disable device",Enabled:Pjt,Execution:Rjt,"Expand all nodes":"Expand all folders",Filter:Njt,"Folder name":"Folder name","Folder will be deleted. Are you sure?":"Folder will be deleted. Are you sure?",Function:"Function",Functions:zjt,General:Hjt,"Get actual temperature":"Get actual temperature","Get target temperature":"Get target temperature","Hide info devices":"Hide info devices","Hide this name from smart assistance":"Hide this name from smart assistance",IDs:Fjt,Icon:Wjt,Id:Yjt,Import:Bjt,"Import state":"Import state",Importer:Vjt,"Increment color temperature":"Increment color temperature","Increment percentage":"Increment percentage","Increment target temperature":"Increment target temperature",Indicators:Ujt,"JS function like":"JS function like","Linked devices":"Linked devices",Name:qjt,Names:Gjt,"New folder":"New folder",OK:Jjt,Off:Kjt,Ok:Xjt,On:Zjt,"Please confirm...":"Please confirm...","Read function":"Read","Read lock state":"Read lock state",Readable:Qjt,Refresh:eAt,Required:tAt,Role:nAt,Room:rAt,Rooms:oAt,Root:sAt,Save:iAt,"Select ID":"Select ID",'Select for "%s"':'Select for "%s"',"Select predefined icon":"Select predefined icon",Selected:aAt,"Set color":"Set color","Set color temperature":"Set color temperature","Set lock state":"Set lock state","Set percentage":"Set percentage","Set target temperature":"Set target temperature","Show expert settings":"Show expert settings","Show hide indicators":"Show/hide indicators","Show only aliases":"Show only aliases","Smart name":"Smart name",States:lAt,Step:cAt,'Supported by "%s"':'Supported by "%s"',"Supported by %s":"Supported by %s","The list of devices to copy is empty":"The list of devices to copy is empty","This name will use be in smart assistance. (optional)":"This name will be used in smart assistance. (optional)",Title:dAt,"Turn off":"Turn off","Turn on":"Turn on",Type:uAt,Types:pAt,Unit:hAt,"Use different states for read and write":"Use different states for read and write","Use one state for read and write":"Use one state for read and write",Value:mAt,"Value=>String":"Mapping of the value to string",Writable:fAt,Write:_At,"Write function":"Write","You can drag & drop device":"You can drag & drop device",alias_read:gAt,alias_write:yAt,alive:wAt,auto_detected_empty_info:vAt,boolean:bAt,"cloning method":"Structure on","do not import devices without category":"do not import devices without category",file:xAt,filter_customs:SAt,filter_func:CAt,filter_id:kAt,filter_name:TAt,filter_role:MAt,filter_room:$At,filter_type:EAt,flat:DAt,functions:LAt,no_group:IAt,number:OAt,rooms:jAt,string:AAt,"Toggle split screen":"Toggle split screen",tooltip_ack:PAt,tooltip_copyState:RAt,tooltip_customConfig:NAt,tooltip_deleteObject:zAt,tooltip_editObject:HAt,tooltip_editState:FAt,tooltip_from:WAt,tooltip_lc:YAt,tooltip_quality:BAt,tooltip_ts:VAt,tooltip_user:UAt,tooltip_value:qAt},JAt="Hinzufügen",KAt="Anwenden",XAt="Abbrechen",ZAt="Schließen",QAt="Farbe",ePt="Erstellen",tPt="Löschen",nPt="Gerät",rPt="Geräte",oPt="Bearbeiten",sPt="Aktiviert",iPt="Ausführung",aPt="Filter",lPt="Funktionen",cPt="Allgemein",dPt="IDs",uPt="Icon",pPt="ID",hPt="Importieren",mPt="Importeur",fPt="Indikatoren",_Pt="Name",gPt="Namen",yPt="OK",wPt="Aus",vPt="Ok",bPt="Ein",xPt="Lesbar",SPt="Aktualisieren",CPt="Erforderlich",kPt="Rolle",TPt="Raum",MPt="Räume",$Pt="Root",EPt="Speichern",DPt="Ausgewählt",LPt="Zustände",IPt="Schritt",OPt="Titel",jPt="Typ",APt="Typen",PPt="Einheit",RPt="Wert",NPt="Schreibbar",zPt="Schreiben",HPt="lesen",FPt="schreiben",WPt="erreichbar",YPt="Die Geräte müssen zu Raum- oder Funktionskategorien hinzufügen werden, damit die Geräte automatisch erkannt werden",BPt="Boolescher Wert",VPt="Datei",UPt="Einstellungen",qPt="Funktion",GPt="ID",JPt="Name",KPt="Rolle",XPt="Raum",ZPt="Typ",QPt="ohne Struktur",eRt="Funktionen",tRt="Keine Gruppe",nRt="Nummer",rRt="Räume",oRt="Zeichenfolge",sRt="Bestätigt",iRt="Den Zustandswert in die Zwischenablage kopieren",aRt="Einstellungen",lRt="Objekt löschen",cRt="Objekt bearbeiten",dRt="Zustandswert ändern",uRt="Quelle",pRt="Zeit der letzten Änderung",hRt="Qualität",mRt="Zeitstempel",fRt="Benutzer",_Rt="Wert",gRt={Add:JAt,'Add new folder to "%s"':'Neuen Ordner zu "%s" hinzufügen',"Add state":"Zustand hinzufügen","Add to root":"Zu root hinzufügen",Apply:KAt,"Automatically detected":"Native Geräte",Cancel:XAt,Close:ZAt,"Collapse all nodes":"Alle Ordner ausblenden",Color:QAt,"Copy device":"Gerät kopieren","Copy device into aliases":"Gerät in Alias kopieren",Create:ePt,"Create new device":"Neues Gerät erstellen","Create new device with Aliases":"Neues Gerät mit Alias erstellen","Create new device with LinkedDevices":"Neues Gerät mit LinkedDevices erstellen","Create new folder":"Neuen Ordner erstellen","Create new folder in root":"Neuen Ordner im Root-Verzeichnis erstellen","Decrement color temperature":"Verringern der Farbtemperatur","Decrement percentage":"Prozentsatz der Verringerung","Decrement target temperature":"Solltemperatur verringern",Delete:tPt,"Delete device with all states":"Gerät mit allen Zuständen löschen","Delete folder":"Ordner löschen","Delete state":"Zustand löschen",Device:nPt,"Device and all states will be deleted. Are you sure?":"Das Gerät und alle Zustände werden gelöscht. Bist du sicher?","Device name":"Gerätename","Device type":"Gerätetyp",Devices:rPt,"Drag to resize":"Ziehen zum Ändern der Größe","Drop or select a device to configure":"Gerät hierher ziehen oder auswählen, um es zu konfigurieren","Disable smart":'Die "intelligente" Funktionalität deaktivieren',"Do not show dialog for 5 minutes":"Dialog 5 Minuten lang nicht anzeigen",Edit:oPt,"Edit convert functions":"Konvertierungsfunktionen bearbeiten","Edit device":"Gerät bearbeiten","Edit folder":"Ordnereigenschaften bearbeiten","Edit folder %s":'Ordner "%s" bearbeiten','Edit name "%s"':'Namen "%s" bearbeiten',"Edit name and other properties":"Namen und andere Eigenschaften bearbeiten","Edit read/write functions":"Lese-/Schreibfunktionen bearbeiten","Edit state":"Zustand editieren","Edit state %s":"Zustand %s bearbeiten","Edit states":"Zustände bearbeiten","Enable or disable device":"Gerät aktivieren oder deaktivieren",Enabled:sPt,Execution:iPt,"Expand all nodes":"Alle Ordner aufklappen",Filter:aPt,"Folder name":"Ordnername","Folder will be deleted. Are you sure?":"Der Ordner wird gelöscht. Bist du sicher?",Function:"Funktion",Functions:lPt,General:cPt,"Get actual temperature":"Aktuelle Temperatur abrufen","Get target temperature":"Solltemperatur abrufen","Hide info devices":"Info-Geräte ausblenden","Hide this name from smart assistance":"Diesen Namen vor Smart Assistance ausblenden",IDs:dPt,Icon:uPt,Id:pPt,Import:hPt,"Import state":"Zustand importieren",Importer:mPt,"Increment color temperature":"Erhöhung der Farbtemperatur","Increment percentage":"Prozentsatz erhöhen","Increment target temperature":"Solltemperatur erhöhen",Indicators:fPt,"JS function like":"JS-Funktion wie","Linked devices":"Verknüpfte Geräte",Name:_Pt,Names:gPt,"New folder":"Neuer Ordner",OK:yPt,Off:wPt,Ok:vPt,On:bPt,"Please confirm...":"Bitte bestätigen...","Read function":"Lesen","Read lock state":"Verschlusszustand lesen",Readable:xPt,Refresh:SPt,Required:CPt,Role:kPt,Room:TPt,Rooms:MPt,Root:$Pt,Save:EPt,"Select ID":"ID auswählen",'Select for "%s"':'Auswählen für "%s"',"Select predefined icon":"Wählen Sie ein vordefiniertes Symbol aus",Selected:DPt,"Set color":"Farbe einstellen","Set color temperature":"Farbtemperatur einstellen","Set lock state":"Verschlussstatus einstellen","Set percentage":"Prozent einstellen","Set target temperature":"Solltemperatur einstellen","Show expert settings":"Experteneinstellungen anzeigen","Show hide indicators":"Indikatoren ein- / ausblenden","Show only aliases":"Nur Aliase anzeigen","Smart name":"Smart-Name",States:LPt,Step:IPt,'Supported by "%s"':'Unterstützt von "%s"',"Supported by %s":"Unterstützt von %s","The list of devices to copy is empty":"Die Liste der zu kopierenden Geräte ist leer","This name will use be in smart assistance. (optional)":"Dieser Name wird in der intelligenten Unterstützung verwendet. (Optional)",Title:OPt,"Turn off":"Ausschalten","Turn on":"Einschalten",Type:jPt,Types:APt,Unit:PPt,"Use different states for read and write":"Unterschiedliche Zustände zum Lesen und Schreiben verwenden","Use one state for read and write":"Einen Zustand zum Lesen und Schreiben verwenden ",Value:RPt,"Value=>String":"Abbildung des Wertes auf den String",Writable:NPt,Write:zPt,"Write function":"Schreiben","You can drag & drop device":"Sie können das Gerät per Drag & Drop verschieben",alias_read:HPt,alias_write:FPt,alive:WPt,auto_detected_empty_info:YPt,boolean:BPt,"cloning method":"Strukturieren nach","do not import devices without category":"keine Geräte ohne Kategorie importieren",file:VPt,filter_customs:UPt,filter_func:qPt,filter_id:GPt,filter_name:JPt,filter_role:KPt,filter_room:XPt,filter_type:ZPt,flat:QPt,functions:eRt,no_group:tRt,number:nRt,rooms:rRt,string:oRt,"Toggle split screen":"Geteilte Ansicht umschalten",tooltip_ack:sRt,tooltip_copyState:iRt,tooltip_customConfig:aRt,tooltip_deleteObject:lRt,tooltip_editObject:cRt,tooltip_editState:dRt,tooltip_from:uRt,tooltip_lc:pRt,tooltip_quality:hRt,tooltip_ts:mRt,tooltip_user:fRt,tooltip_value:_Rt},yRt="Добавить",wRt="Применить",vRt="Отмена",bRt="Закрыть",xRt="Цвет",SRt="Создать",CRt="Удалить",kRt="Устройство",TRt="Устройства",MRt="Редактировать",$Rt="Включено",ERt="Выполнение",DRt="Фильтр",LRt="Функции",IRt="Общее",ORt="Идентификаторы",jRt="Икона",ARt="ID",PRt="Импортировать",RRt="Импортер",NRt="Индикаторы",zRt="Имя",HRt="Имена",FRt="Ок",WRt="Выкл.",YRt="Ok",BRt="Вкл.",VRt="Возможность чтения",URt="Обновить",qRt="Обязательно",GRt="Роль",JRt="Комната",KRt="Комнаты",XRt="Root",ZRt="Сохранить",QRt="Выбранный",eNt="Состояния",tNt="Шаг",nNt="Название",rNt="Тип",oNt="Типы",sNt="Единица",iNt="Значение",aNt="Возможность записи",lNt="Писать",cNt="читать",dNt="писать",uNt="живой",pNt="Вам необходимо добавить устройства в категории комнат или функций, чтобы устройства обнаруживались автоматически.",hNt="логический",mNt="файл",fNt="Настройки",_Nt="Функция",gNt="ID",yNt="Название",wNt="Роль",vNt="Комната",bNt="Тип",xNt="без структуры",SNt="функции",CNt="Нет группы",kNt="номер",TNt="комнаты",MNt="нить",$Nt="Подтвержденный",ENt="Скопировать значение состояния в буфер обмена",DNt="Настройки",LNt="Удалить объект",INt="Редактировать объект",ONt="Изменить значение состояния",jNt="Источник",ANt="Время последнего изменения",PNt="Качественный",RNt="Время",NNt="Пользователь",zNt="Значение",HNt={Add:yRt,'Add new folder to "%s"':'Добавить новую папку в "%s"',"Add state":"Добавить состояние","Add to root":"Добавить в корень",Apply:wRt,"Automatically detected":"Реальные устройства",Cancel:vRt,Close:bRt,"Collapse all nodes":"Свернуть все папки",Color:xRt,"Copy device":"Копировать устройство","Copy device into aliases":"Копировать устройство в псевдонимы",Create:SRt,"Create new device":"Создать новое устройство","Create new device with Aliases":"Создать новое устройство с псевдонимами (aliases)","Create new device with LinkedDevices":"Создать новое устройство с помощью LinkedDevices","Create new folder":"Создать новую папку","Create new folder in root":"Создать новую папку в корневом каталоге","Decrement color temperature":"Уменьшение цветовой температуры","Decrement percentage":"Снижение процента","Decrement target temperature":"Уменьшение желаемой температуры",Delete:CRt,"Delete device with all states":"Удалить устройство со всеми состояниями","Delete folder":"Удалить папку","Delete state":"Удалить состояние",Device:kRt,"Device and all states will be deleted. Are you sure?":"Устройство и все состояния будут удалены. Подтвердить?","Device name":"Имя устройства","Device type":"Тип устройства",Devices:TRt,"Drag to resize":"Перетащите для изменения размера","Drop or select a device to configure":"Перетащите или выберите устройство для настройки","Disable smart":"Отключить «умный» функционал","Do not show dialog for 5 minutes":"Не показывать диалог в течение 5 минут",Edit:MRt,"Edit convert functions":"Редактировать функции преобразования","Edit device":"Редактировать параметры устройства","Edit folder":"Изменить свойства папки","Edit folder %s":'Изменить папку "%s"','Edit name "%s"':'Изменить имя "%s"',"Edit name and other properties":"Изменить имя и другие свойства","Edit read/write functions":"Редактировать функции чтения / записи","Edit state":"Редактировать состояние","Edit state %s":"Изменить состояние %s","Edit states":"Редактировать состояния","Enable or disable device":"Включить или отключить устройство",Enabled:$Rt,Execution:ERt,"Expand all nodes":"Развернуть все папки",Filter:DRt,"Folder name":"Имя папки","Folder will be deleted. Are you sure?":"Папка будет удалена. Подтвердить?",Function:"Функция",Functions:LRt,General:IRt,"Get actual temperature":"Запросить текущую температуру","Get target temperature":"Запросить желаемую температуру","Hide info devices":"Скрыть информационные устройства","Hide this name from smart assistance":"Скрыть это имя от умной помощи",IDs:ORt,Icon:jRt,Id:ARt,Import:PRt,"Import state":"Импортировать состояние",Importer:RRt,"Increment color temperature":"Увеличение цветовой температуры","Increment percentage":"Увеличение процентного значения","Increment target temperature":"Повышение целевой температуры",Indicators:NRt,"JS function like":"JS функционирует как","Linked devices":"Linked devices",Name:zRt,Names:HRt,"New folder":"Новая папка",OK:FRt,Off:WRt,Ok:YRt,On:BRt,"Please confirm...":"Пожалуйста подтвердите...","Read function":"Читать","Read lock state":"Чтение состояния замка",Readable:VRt,Refresh:URt,Required:qRt,Role:GRt,Room:JRt,Rooms:KRt,Root:XRt,Save:ZRt,"Select ID":"Выбор ID",'Select for "%s"':'Выбрать для "%s"',"Select predefined icon":"Выберите предопределенный значок",Selected:QRt,"Set color":"Установить цвет","Set color temperature":"Установить цветовую температуру","Set lock state":"Установить состояние замка","Set percentage":"Установить процент","Set target temperature":"Установить целевую температуру","Show expert settings":"Показать экспертные настройки","Show hide indicators":"Показать / скрыть индикаторы","Show only aliases":"Показывать только псевдонимы","Smart name":"Smart имя",States:eNt,Step:tNt,'Supported by "%s"':'Поддерживается "%s"',"Supported by %s":"Поддерживается %s","The list of devices to copy is empty":"Список копируемых устройств пуст","This name will use be in smart assistance. (optional)":"Это имя будет использоваться в умных помощниках. (по желанию)",Title:nNt,"Turn off":"Выкл","Turn on":"Вкл",Type:rNt,Types:oNt,Unit:sNt,"Use different states for read and write":"Использовать разные состояния для чтения и записи","Use one state for read and write":"Использовать одно состояние для чтения и записи",Value:iNt,"Value=>String":"Отображение значения в строку",Writable:aNt,Write:lNt,"Write function":"Писать","You can drag & drop device":"Вы можете перетащить устройство",alias_read:cNt,alias_write:dNt,alive:uNt,auto_detected_empty_info:pNt,boolean:hNt,"cloning method":"Структура папок","do not import devices without category":"не импортировать устройства без категории",file:mNt,filter_customs:fNt,filter_func:_Nt,filter_id:gNt,filter_name:yNt,filter_role:wNt,filter_room:vNt,filter_type:bNt,flat:xNt,functions:SNt,no_group:CNt,number:kNt,rooms:TNt,string:MNt,"Toggle split screen":"Переключить разделённый экран",tooltip_ack:$Nt,tooltip_copyState:ENt,tooltip_customConfig:DNt,tooltip_deleteObject:LNt,tooltip_editObject:INt,tooltip_editState:ONt,tooltip_from:jNt,tooltip_lc:ANt,tooltip_quality:PNt,tooltip_ts:RNt,tooltip_user:NNt,tooltip_value:zNt},FNt="Adicionar",WNt="Aplicar",YNt="Cancelar",BNt="Perto",VNt="Cor",UNt="Crio",qNt="Excluir",GNt="Dispositivo",JNt="Dispositivos",KNt="Editar",XNt="Ativado",ZNt="Execução",QNt="Filtro",ezt="Funções",tzt="Em geral",nzt="IDs",rzt="Ícone",ozt="ID",szt="Importar",izt="Importador",azt="Indicadores",lzt="Nome",czt="Nomes",dzt="OK",uzt="Fora",pzt="Ok",hzt="Em",mzt="Legível",fzt="Atualizar",_zt="Obrigatório",gzt="Função",yzt="Sala",wzt="quartos",vzt="Raiz",bzt="Salve ",xzt="Selecionado",Szt="Estados",Czt="Etapa",kzt="Título",Tzt="Modelo",Mzt="Tipos",$zt="Unidade",Ezt="Valor",Dzt="Gravável",Lzt="Escreva",Izt="ler",Ozt="escrever",jzt="vivo",Azt="Você deve adicionar os dispositivos às categorias de sala ou função para que eles sejam detectados automaticamente",Pzt="boleano",Rzt="Arquivo",Nzt="Definições",zzt="Função",Hzt="ID",Fzt="Nome",Wzt="Função",Yzt="Sala",Bzt="Tipo",Vzt="nenhuma estrutura",Uzt="funções",qzt="Nenhum grupo",Gzt="número",Jzt="quartos",Kzt="fragmento",Xzt="Reconhecido",Zzt="Copiar valor do estado para a área de transferência",Qzt="Definições",eHt="Excluir objeto",tHt="Editar objeto",nHt="Modificar valor do estado",rHt="Fonte",oHt="Hora da última alteração",sHt="Qualidade",iHt="Carimbo de hora",aHt="Do utilizador",lHt="Valor",cHt={Add:FNt,'Add new folder to "%s"':'Adicione nova pasta a "%s"',"Add state":"Adicionar estado","Add to root":"Adicionar à raiz",Apply:WNt,"Automatically detected":"Dispositivos nativos",Cancel:YNt,Close:BNt,"Collapse all nodes":"Recolher todas as pastas",Color:VNt,"Copy device":"Copiar dispositivo","Copy device into aliases":"Copiar dispositivo para aliases",Create:UNt,"Create new device":"Criar novo dispositivo","Create new device with Aliases":"Crie um novo dispositivo com aliases","Create new device with LinkedDevices":"Crie um novo dispositivo com o LinkedDevices","Create new folder":"Criar nova pasta","Create new folder in root":"Crie uma nova pasta no diretório raiz","Decrement color temperature":"Temperatura de cor decrescente","Decrement percentage":"Percentual de decréscimo","Decrement target temperature":"Temperatura alvo de descida",Delete:qNt,"Delete device with all states":"Excluir dispositivo com todos os estados","Delete folder":"Apagar pasta","Delete state":"Apagar estado",Device:GNt,"Device and all states will be deleted. Are you sure?":"O dispositivo e todos os estados serão excluídos. Tem certeza?","Device name":"Nome do dispositivo","Device type":"Tipo de dispositivo",Devices:JNt,"Drag to resize":"Arraste para redimensionar","Drop or select a device to configure":"Arraste ou selecione um dispositivo para configurar","Disable smart":'Desative a funcionalidade "inteligente"',"Do not show dialog for 5 minutes":"Não mostra a caixa de diálogo por 5 minutos",Edit:KNt,"Edit convert functions":"Editar funções de conversão","Edit device":"Editar dispositivo","Edit folder":"Editar propriedades da pasta","Edit folder %s":'Editar pasta "%s"','Edit name "%s"':'Editar o nome "%s"',"Edit name and other properties":"Editar nome e outras propriedades","Edit read/write functions":"Editar funções de leitura / gravação","Edit state":"Editar estado","Edit state %s":"Editar estado %s","Edit states":"Editar estados","Enable or disable device":"Ativar ou desativar dispositivo",Enabled:XNt,Execution:ZNt,"Expand all nodes":"Expanda todas as pastas",Filter:QNt,"Folder name":"Nome da pasta","Folder will be deleted. Are you sure?":"A pasta será excluída. Tem certeza?",Function:"Função",Functions:ezt,General:tzt,"Get actual temperature":"Obter temperatura real","Get target temperature":"Obter temperatura alvo","Hide info devices":"Ocultar dispositivos de informação","Hide this name from smart assistance":"Ocultar este nome da assistência inteligente",IDs:nzt,Icon:rzt,Id:ozt,Import:szt,"Import state":"Estado de importação",Importer:izt,"Increment color temperature":"Incremento da temperatura de cor","Increment percentage":"Percentual de incremento","Increment target temperature":"Temperatura alvo de incremento",Indicators:azt,"JS function like":"Função JS como","Linked devices":"Linked devices",Name:lzt,Names:czt,"New folder":"Nova pasta",OK:dzt,Off:uzt,Ok:pzt,On:hzt,"Please confirm...":"Por favor confirme...","Read function":"Leitura","Read lock state":"Estado de bloqueio de leitura",Readable:mzt,Refresh:fzt,Required:_zt,Role:gzt,Room:yzt,Rooms:wzt,Root:vzt,Save:bzt,"Select ID":"Selecionar ID",'Select for "%s"':'Selecione para "%s"',"Select predefined icon":"Selecione o ícone predefinido",Selected:xzt,"Set color":"Definir cor","Set color temperature":"Definir temperatura de cor","Set lock state":"Definir estado de bloqueio","Set percentage":"Definir porcentagem","Set target temperature":"Definir temperatura alvo","Show expert settings":"Mostrar configurações de especialistas","Show hide indicators":"Mostrar / ocultar indicadores","Show only aliases":"Mostrar apenas aliases","Smart name":"Nome inteligente",States:Szt,Step:Czt,'Supported by "%s"':'Suportado por "%s"',"Supported by %s":"Suportado por %s","The list of devices to copy is empty":"A lista de dispositivos para copiar está vazia","This name will use be in smart assistance. (optional)":"Este nome será usado na assistência inteligente. (opcional)",Title:kzt,"Turn off":"Desligar","Turn on":"Ligar",Type:Tzt,Types:Mzt,Unit:$zt,"Use different states for read and write":"Use estados diferentes para ler e escrever","Use one state for read and write":"Use um estado para leitura e gravação",Value:Ezt,"Value=>String":"Mapeamento do valor para string",Writable:Dzt,Write:Lzt,"Write function":"Escreva","You can drag & drop device":"Você pode arrastar e soltar o dispositivo",alias_read:Izt,alias_write:Ozt,alive:jzt,auto_detected_empty_info:Azt,boolean:Pzt,"cloning method":"Estrutura em","do not import devices without category":"não importe dispositivos sem categoria",file:Rzt,filter_customs:Nzt,filter_func:zzt,filter_id:Hzt,filter_name:Fzt,filter_role:Wzt,filter_room:Yzt,filter_type:Bzt,flat:Vzt,functions:Uzt,no_group:qzt,number:Gzt,rooms:Jzt,string:Kzt,"Toggle split screen":"Alternar tela dividida",tooltip_ack:Xzt,tooltip_copyState:Zzt,tooltip_customConfig:Qzt,tooltip_deleteObject:eHt,tooltip_editObject:tHt,tooltip_editState:nHt,tooltip_from:rHt,tooltip_lc:oHt,tooltip_quality:sHt,tooltip_ts:iHt,tooltip_user:aHt,tooltip_value:lHt},dHt="Toevoegen",uHt="Van toepassing zijn",pHt="annuleren",hHt="Dichtbij",mHt="Kleur",fHt="Aanmaken",_Ht="Verwijderen",gHt="Apparaat",yHt="Apparaten",wHt="Bewerk",vHt="Ingeschakeld",bHt="Uitvoering",xHt="Filter",SHt="functies",CHt="Algemeen",kHt="IDs",THt="Icoon",MHt="ID",$Ht="Importeren",EHt="Importeur",DHt="Indicatoren",LHt="Naam",IHt="namen",OHt="OK",jHt="Uit",AHt="OK",PHt="Op",RHt="Leesbaar",NHt="Vernieuwen",zHt="Verplicht",HHt="Rol",FHt="Kamer",WHt="kamers",YHt="Wortel",BHt="Sparen",VHt="Geselecteerd",UHt="Staten",qHt="Stap",GHt="Titel",JHt="Type",KHt="Types",XHt="Eenheid",ZHt="Waarde",QHt="Beschrijfbaar",eFt="Schrijven",tFt="lezen",nFt="schrijven",rFt="levend",oFt="U moet de apparaten toevoegen aan kamer- of functiecategorieën om de apparaten automatisch te laten detecteren",sFt="booleaans",iFt="het dossier",aFt="Instellingen",lFt="Functie",cFt="ID",dFt="Naam",uFt="Rol",pFt="Kamer",hFt="Type",mFt="geen structuur",fFt="functies",_Ft="Geen groep",gFt="aantal",yFt="kamers",wFt="draad",vFt="Erkend",bFt="Kopieer de statuswaarde naar het klembord",xFt="Instellingen",SFt="Object verwijderen",CFt="Object bewerken",kFt="Wijzig de statuswaarde",TFt="Bron",MFt="Tijdstip laatste wijziging",$Ft="Kwaliteit",EFt="Tijdstempel",DFt="Gebruiker",LFt="Waarde",IFt={Add:dHt,'Add new folder to "%s"':'Nieuwe map toevoegen aan "%s"',"Add state":"Staat toevoegen","Add to root":"Toevoegen aan root",Apply:uHt,"Automatically detected":"Native apparaten",Cancel:pHt,Close:hHt,"Collapse all nodes":"Alle mappen samenvouwen",Color:mHt,"Copy device":"Kopieer apparaat","Copy device into aliases":"Kopieer het apparaat naar aliassen",Create:fHt,"Create new device":"Maak een nieuw apparaat","Create new device with Aliases":"Maak een nieuw apparaat met aliassen","Create new device with LinkedDevices":"Maak een nieuw apparaat met LinkedDevices","Create new folder":"Nieuwe map maken","Create new folder in root":"Maak een nieuwe map in de hoofdmap","Decrement color temperature":"Verlaging kleurtemperatuur","Decrement percentage":"Verlagingspercentage","Decrement target temperature":"Doeltemperatuur verlagen",Delete:_Ht,"Delete device with all states":"Verwijder apparaat met alle statussen","Delete folder":"Verwijder map","Delete state":"Status verwijderen",Device:gHt,"Device and all states will be deleted. Are you sure?":"Apparaat en alle statussen worden verwijderd. Weet je het zeker?","Device name":"Toestelnaam","Device type":"Soort apparaat",Devices:yHt,"Drag to resize":"Sleep om de grootte te wijzigen","Drop or select a device to configure":"Sleep of selecteer een apparaat om te configureren","Disable smart":'Schakel "slimme" functionaliteit uit',"Do not show dialog for 5 minutes":"Dialoogvenster gedurende 5 minuten niet weergeven",Edit:wHt,"Edit convert functions":"Bewerk conversiefuncties","Edit device":"Apparaat bewerken","Edit folder":"Mapeigenschappen bewerken","Edit folder %s":'Map bewerken "%s"','Edit name "%s"':"Naam '%s' bewerken","Edit name and other properties":"Naam en andere eigenschappen bewerken","Edit read/write functions":"Lees-/schrijffuncties bewerken","Edit state":"Bewerkingsstatus","Edit state %s":"Bewerk staat %s","Edit states":"Bewerk staten","Enable or disable device":"Apparaat in- of uitschakelen",Enabled:vHt,Execution:bHt,"Expand all nodes":"Vouw alle mappen uit",Filter:xHt,"Folder name":"Naam van de map","Folder will be deleted. Are you sure?":"Map wordt verwijderd. Weet je het zeker?",Function:"Functie",Functions:SHt,General:CHt,"Get actual temperature":"Krijg de werkelijke temperatuur","Get target temperature":"Krijg doeltemperatuur","Hide info devices":"Info-apparaten verbergen","Hide this name from smart assistance":"Deze naam verbergen voor slimme assistentie",IDs:kHt,Icon:THt,Id:MHt,Import:$Ht,"Import state":"Importstatus",Importer:EHt,"Increment color temperature":"Verhoog de kleurtemperatuur","Increment percentage":"Verhogen percentage","Increment target temperature":"Verhoog de doeltemperatuur",Indicators:DHt,"JS function like":"JS-functie zoals","Linked devices":"Linked devices",Name:LHt,Names:IHt,"New folder":"Nieuwe map",OK:OHt,Off:jHt,Ok:AHt,On:PHt,"Please confirm...":"Bevestig alstublieft...","Read function":"Lezen","Read lock state":"Lees vergrendelde status",Readable:RHt,Refresh:NHt,Required:zHt,Role:HHt,Room:FHt,Rooms:WHt,Root:YHt,Save:BHt,"Select ID":"Selecteer ID",'Select for "%s"':'Selecteer voor "%s"',"Select predefined icon":"Selecteer voorgedefinieerd pictogram",Selected:VHt,"Set color":"Kleur instellen","Set color temperature":"Stel de kleurtemperatuur in","Set lock state":"Stel de vergrendelingsstatus in","Set percentage":"Percentage instellen","Set target temperature":"Stel de doeltemperatuur in","Show expert settings":"Toon expertinstellingen","Show hide indicators":"Toon / verberg indicatoren","Show only aliases":"Toon alleen aliassen","Smart name":"Slimme naam",States:UHt,Step:qHt,'Supported by "%s"':'Ondersteund door "%s"',"Supported by %s":"Ondersteund door %s","The list of devices to copy is empty":"De lijst met te kopiëren apparaten is leeg","This name will use be in smart assistance. (optional)":"Deze naam wordt gebruikt in slimme assistentie. (optioneel)",Title:GHt,"Turn off":"Uitschakelen","Turn on":"Aanzetten",Type:JHt,Types:KHt,Unit:XHt,"Use different states for read and write":"Gebruik verschillende statussen voor lezen en schrijven","Use one state for read and write":"Gebruik één staat voor lezen en schrijven",Value:ZHt,"Value=>String":"Toewijzing van de waarde aan een tekenreeks",Writable:QHt,Write:eFt,"Write function":"Schrijven","You can drag & drop device":"U kunt het apparaat slepen en neerzetten",alias_read:tFt,alias_write:nFt,alive:rFt,auto_detected_empty_info:oFt,boolean:sFt,"cloning method":"Structuur aan","do not import devices without category":"importeer geen apparaten zonder categorie",file:iFt,filter_customs:aFt,filter_func:lFt,filter_id:cFt,filter_name:dFt,filter_role:uFt,filter_room:pFt,filter_type:hFt,flat:mFt,functions:fFt,no_group:_Ft,number:gFt,rooms:yFt,string:wFt,"Toggle split screen":"Gesplitst scherm wisselen",tooltip_ack:vFt,tooltip_copyState:bFt,tooltip_customConfig:xFt,tooltip_deleteObject:SFt,tooltip_editObject:CFt,tooltip_editState:kFt,tooltip_from:TFt,tooltip_lc:MFt,tooltip_quality:$Ft,tooltip_ts:EFt,tooltip_user:DFt,tooltip_value:LFt},OFt="Ajouter",jFt="Appliquer",AFt="Annuler",PFt="Fermer",RFt="Couleur",NFt="Créer",zFt="Effacer",HFt="Dispositif",FFt="Dispositifs",WFt="Éditer",YFt="Activé",BFt="Exécution",VFt="Filtre",UFt="Les fonctions",qFt="Général",GFt="Identifiants",JFt="Icône",KFt="ID",XFt="Importer",ZFt="Importateur",QFt="Indicateurs",eWt="Nom",tWt="Noms",nWt="OK",rWt="De",oWt="D'accord",sWt="Sur",iWt="Lisible",aWt="Rafraîchir",lWt="Obligatoire",cWt="Rôle",dWt="Pièce",uWt="Pièces",pWt="Racine",hWt="Sauvegarder",mWt="Choisi",fWt="États",_Wt="Étape",gWt="Titre",yWt="Taper",wWt="Les types",vWt="Unité",bWt="Valeur",xWt="Écriture",SWt="Écrivez",CWt="lire",kWt="écrire",TWt="vivant",MWt="Vous devez ajouter les appareils aux catégories de pièces ou de fonctions pour permettre la détection automatique des appareils.",$Wt="booléen",EWt="déposer",DWt="Réglages",LWt="Une fonction",IWt="ID",OWt="Nom",jWt="Rôle",AWt="Chambre",PWt="Type",RWt="pas de structure",NWt="les fonctions",zWt="Pas de groupe",HWt="numéro",FWt="pièces",WWt="chaîne",YWt="Reconnu",BWt="Copier la valeur de l'état dans le presse-papiers",VWt="Réglages",UWt="Supprimer un objet",qWt="Modifier l'objet",GWt="Modifier la valeur de l'état",JWt="La source",KWt="Heure du dernier changement",XWt="Qualité",ZWt="Horodatage",QWt="Utilisateur",eYt="Valeur",tYt={Add:OFt,'Add new folder to "%s"':'Ajouter un nouveau dossier à "%s"',"Add state":"Ajouter un état","Add to root":"Ajouter à la racine",Apply:jFt,"Automatically detected":"Appareils natifs",Cancel:AFt,Close:PFt,"Collapse all nodes":"Réduire tous les dossiers",Color:RFt,"Copy device":"Copier l'appareil","Copy device into aliases":"Copier l'appareil dans des alias",Create:NFt,"Create new device":"Créer un nouveau périphérique","Create new device with Aliases":"Créer un nouvel appareil avec des alias","Create new device with LinkedDevices":"Créer un nouveau périphérique avec LinkedDevices","Create new folder":"Créer un nouveau dossier","Create new folder in root":"Créer un nouveau dossier dans le répertoire racine","Decrement color temperature":"Décrémenter la température de couleur","Decrement percentage":"Pourcentage de décrémentation","Decrement target temperature":"Décrémenter la température cible",Delete:zFt,"Delete device with all states":"Supprimer le périphérique avec tous les états","Delete folder":"Supprimer le dossier","Delete state":"Supprimer l'état",Device:HFt,"Device and all states will be deleted. Are you sure?":"L'appareil et tous les états seront supprimés. Êtes-vous sûr?","Device name":"Nom de l'appareil","Device type":"Type d'appareil",Devices:FFt,"Drag to resize":"Glisser pour redimensionner","Drop or select a device to configure":"Glissez ou sélectionnez un appareil à configurer","Disable smart":'Désactiver la fonctionnalité "intelligente"',"Do not show dialog for 5 minutes":"Ne pas afficher la boîte de dialogue pendant 5 minutes",Edit:WFt,"Edit convert functions":"Modifier les fonctions de conversion","Edit device":"Editer l'appareil","Edit folder":"Modifier les propriétés du dossier","Edit folder %s":'Modifier le dossier "%s"','Edit name "%s"':'Modifier le nom "%s"',"Edit name and other properties":"Editer le nom et autres propriétés","Edit read/write functions":"Modifier les fonctions de lecture/écriture","Edit state":"Modifier l'état","Edit state %s":"Modifier l'état %s","Edit states":"Editer les états","Enable or disable device":"Activer ou désactiver l'appareil",Enabled:YFt,Execution:BFt,"Expand all nodes":"Développer tous les dossiers",Filter:VFt,"Folder name":"Nom de dossier","Folder will be deleted. Are you sure?":"Le dossier sera supprimé. Êtes-vous sûr?",Function:"Une fonction",Functions:UFt,General:qFt,"Get actual temperature":"Obtenir la température réelle","Get target temperature":"Obtenir la température cible","Hide info devices":"Masquer les dispositifs d'information","Hide this name from smart assistance":"Masquer ce nom de l'assistance intelligente",IDs:GFt,Icon:JFt,Id:KFt,Import:XFt,"Import state":"État d'importation",Importer:ZFt,"Increment color temperature":"Incrément de température de couleur","Increment percentage":"Pourcentage d'incrément","Increment target temperature":"Augmenter la température cible",Indicators:QFt,"JS function like":"Fonction JS comme","Linked devices":"Linked devices",Name:eWt,Names:tWt,"New folder":"Nouveau dossier",OK:nWt,Off:rWt,Ok:oWt,On:sWt,"Please confirm...":"Veuillez confirmer...","Read function":"Lis","Read lock state":"État verrouillé",Readable:iWt,Refresh:aWt,Required:lWt,Role:cWt,Room:dWt,Rooms:uWt,Root:pWt,Save:hWt,"Select ID":"Sélectionnez ID",'Select for "%s"':'Sélectionnez pour "%s"',"Select predefined icon":"Sélectionnez l'icône prédéfinie",Selected:mWt,"Set color":"Définir la couleur","Set color temperature":"Régler la température de couleur","Set lock state":"Définir l'état de verrouillage","Set percentage":"Définir le pourcentage","Set target temperature":"Définir la température cible","Show expert settings":"Afficher les paramètres experts","Show hide indicators":"Afficher / masquer les indicateurs","Show only aliases":"Afficher uniquement les alias","Smart name":"Nom intelligent",States:fWt,Step:_Wt,'Supported by "%s"':'Pris en charge par "%s"',"Supported by %s":"Soutenu par %s","The list of devices to copy is empty":"La liste des appareils à copier est vide","This name will use be in smart assistance. (optional)":"Ce nom sera utilisé dans l'assistance intelligente. (optionnel)",Title:gWt,"Turn off":"Éteindre","Turn on":"Allumer",Type:yWt,Types:wWt,Unit:vWt,"Use different states for read and write":"Utiliser des états différents pour la lecture et l'écriture","Use one state for read and write":"Utiliser un état pour la lecture et l'écriture",Value:bWt,"Value=>String":"Mappage de la valeur à la chaîne",Writable:xWt,Write:SWt,"Write function":"Écrivez","You can drag & drop device":"Vous pouvez glisser-déposer l'appareil",alias_read:CWt,alias_write:kWt,alive:TWt,auto_detected_empty_info:MWt,boolean:$Wt,"cloning method":"Structurer sur","do not import devices without category":"n'importez pas d'appareils sans catégorie",file:EWt,filter_customs:DWt,filter_func:LWt,filter_id:IWt,filter_name:OWt,filter_role:jWt,filter_room:AWt,filter_type:PWt,flat:RWt,functions:NWt,no_group:zWt,number:HWt,rooms:FWt,string:WWt,"Toggle split screen":"Basculer l'écran partagé",tooltip_ack:YWt,tooltip_copyState:BWt,tooltip_customConfig:VWt,tooltip_deleteObject:UWt,tooltip_editObject:qWt,tooltip_editState:GWt,tooltip_from:JWt,tooltip_lc:KWt,tooltip_quality:XWt,tooltip_ts:ZWt,tooltip_user:QWt,tooltip_value:eYt},nYt="Inserisci",rYt="Applicare",oYt="Annulla",sYt="Vicino",iYt="Colore",aYt="Creare",lYt="Elimina",cYt="Dispositivo",dYt="dispositivi",uYt="modificare",pYt="Abilitato",hYt="Esecuzione",mYt="Filtro",fYt="funzioni",_Yt="Generale",gYt="ID",yYt="Icona",wYt="ID",vYt="Importare",bYt="Importatore",xYt="Indicatori",SYt="Nome",CYt="nomi",kYt="OK",TYt="via",MYt="Ok",$Yt="Sopra",EYt="Leggibile",DYt="ricaricare",LYt="necessario",IYt="Ruolo",OYt="Camera",jYt="Camere",AYt="Radice",PYt="Salva",RYt="Selezionato",NYt="stati",zYt="Fare un passo",HYt="Titolo",FYt="genere",WYt="tipi",YYt="Unità",BYt="Valore",VYt="scrivibile",UYt="Scrivi",qYt="Leggere",GYt="scrivere",JYt="vivo",KYt="È necessario aggiungere i dispositivi alle categorie di stanza o funzione per consentire il rilevamento automatico dei dispositivi",XYt="booleano",ZYt="file",QYt="impostazioni",eBt="Funzione",tBt="ID",nBt="Nome",rBt="Ruolo",oBt="Camera",sBt="genere",iBt="nessuna struttura",aBt="funzioni",lBt="Nessun gruppo",cBt="numero",dBt="camere",uBt="corda",pBt="Riconosciuto",hBt="Copia il valore dello stato negli appunti",mBt="impostazioni",fBt="Elimina oggetto",_Bt="Modifica oggetto",gBt="Modifica il valore dello stato",yBt="fonte",wBt="Ora dell'ultimo cambio",vBt="Qualità",bBt="Timestamp",xBt="Utente",SBt="Valore",CBt={Add:nYt,'Add new folder to "%s"':'Aggiungi nuova cartella a "%s"',"Add state":"Aggiungi stato","Add to root":"Aggiungi alla radice",Apply:rYt,"Automatically detected":"Dispositivi nativi",Cancel:oYt,Close:sYt,"Collapse all nodes":"Comprimi tutte le cartelle",Color:iYt,"Copy device":"Dispositivo di copia","Copy device into aliases":"Copia il dispositivo negli alias",Create:aYt,"Create new device":"Crea un nuovo dispositivo","Create new device with Aliases":"Crea un nuovo dispositivo con gli alias","Create new device with LinkedDevices":"Crea un nuovo dispositivo con LinkedDevices","Create new folder":"Crea una nuova cartella","Create new folder in root":"Crea una nuova cartella nella directory principale","Decrement color temperature":"Ridurre la temperatura del colore","Decrement percentage":"Percentuale di decremento","Decrement target temperature":"Ridurre la temperatura target",Delete:lYt,"Delete device with all states":"Elimina dispositivo con tutti gli stati","Delete folder":"Elimina cartella","Delete state":"Elimina stato",Device:cYt,"Device and all states will be deleted. Are you sure?":"Il dispositivo e tutti gli stati verranno eliminati. Sei sicuro?","Device name":"Nome del dispositivo","Device type":"Tipo di dispositivo",Devices:dYt,"Drag to resize":"Trascina per ridimensionare","Drop or select a device to configure":"Trascina o seleziona un dispositivo da configurare","Disable smart":'Disabilita la funzionalità "intelligente"',"Do not show dialog for 5 minutes":"Non mostrare la finestra di dialogo per 5 minuti",Edit:uYt,"Edit convert functions":"Modifica funzioni di conversione","Edit device":"Modifica dispositivo","Edit folder":"Modifica le proprietà della cartella","Edit folder %s":'Modifica cartella "%s"','Edit name "%s"':'Modifica nome "%s"',"Edit name and other properties":"Modifica nome e altre proprietà","Edit read/write functions":"Modifica funzioni di lettura/scrittura","Edit state":"Modifica stato","Edit state %s":"Modifica stato %s","Edit states":"Modifica stati","Enable or disable device":"Attiva o disattiva il dispositivo",Enabled:pYt,Execution:hYt,"Expand all nodes":"Espandi tutte le cartelle",Filter:mYt,"Folder name":"Nome della cartella","Folder will be deleted. Are you sure?":"La cartella verrà eliminata. Sei sicuro?",Function:"Funzione",Functions:fYt,General:_Yt,"Get actual temperature":"Ottieni la temperatura effettiva","Get target temperature":"Ottieni la temperatura target","Hide info devices":"Nascondi i dispositivi informativi","Hide this name from smart assistance":"Nascondi questo nome dall'assistenza intelligente",IDs:gYt,Icon:yYt,Id:wYt,Import:vYt,"Import state":"Stato di importazione",Importer:bYt,"Increment color temperature":"Aumenta la temperatura del colore","Increment percentage":"Percentuale di incremento","Increment target temperature":"Aumentare la temperatura target",Indicators:xYt,"JS function like":"Funzione JS come","Linked devices":"Linked devices",Name:SYt,Names:CYt,"New folder":"Nuova cartella",OK:kYt,Off:TYt,Ok:MYt,On:$Yt,"Please confirm...":"Si prega di confermare...","Read function":"Leggere","Read lock state":"Leggi lo stato di blocco",Readable:EYt,Refresh:DYt,Required:LYt,Role:IYt,Room:OYt,Rooms:jYt,Root:AYt,Save:PYt,"Select ID":"Seleziona ID",'Select for "%s"':'Seleziona per "%s"',"Select predefined icon":"Seleziona l'icona predefinita",Selected:RYt,"Set color":"Imposta il colore","Set color temperature":"Imposta la temperatura del colore","Set lock state":"Imposta lo stato di blocco","Set percentage":"Imposta percentuale","Set target temperature":"Imposta la temperatura target","Show expert settings":"Mostra impostazioni avanzate","Show hide indicators":"Mostra / nascondi indicatori","Show only aliases":"Mostra solo alias","Smart name":"Nome intelligente",States:NYt,Step:zYt,'Supported by "%s"':'Supportato da "%s"',"Supported by %s":"Supportato da %s","The list of devices to copy is empty":"L'elenco dei dispositivi da copiare è vuoto","This name will use be in smart assistance. (optional)":"Questo nome verrà utilizzato nell'assistenza intelligente. (opzionale)",Title:HYt,"Turn off":"Spegni","Turn on":"Accendere",Type:FYt,Types:WYt,Unit:YYt,"Use different states for read and write":"Usa stati differenti per la lettura e la scrittura","Use one state for read and write":"Utilizzare uno stato per la lettura e la scrittura",Value:BYt,"Value=>String":"Mappatura del valore in stringa",Writable:VYt,Write:UYt,"Write function":"Scrivi","You can drag & drop device":"Puoi trascinare e rilasciare il dispositivo",alias_read:qYt,alias_write:GYt,alive:JYt,auto_detected_empty_info:KYt,boolean:XYt,"cloning method":"Struttura attiva","do not import devices without category":"non importare dispositivi senza categoria",file:ZYt,filter_customs:QYt,filter_func:eBt,filter_id:tBt,filter_name:nBt,filter_role:rBt,filter_room:oBt,filter_type:sBt,flat:iBt,functions:aBt,no_group:lBt,number:cBt,rooms:dBt,string:uBt,"Toggle split screen":"Attiva/disattiva schermo diviso",tooltip_ack:pBt,tooltip_copyState:hBt,tooltip_customConfig:mBt,tooltip_deleteObject:fBt,tooltip_editObject:_Bt,tooltip_editState:gBt,tooltip_from:yBt,tooltip_lc:wBt,tooltip_quality:vBt,tooltip_ts:bBt,tooltip_user:xBt,tooltip_value:SBt},kBt="Agregar",TBt="Solicitar",MBt="Cancelar",$Bt="Cerca",EBt="Color",DBt="Crear",LBt="Borrar",IBt="Dispositivo",OBt="Dispositivos",jBt="Editar",ABt="Habilitado",PBt="Ejecución",RBt="Filtrar",NBt="Las funciones",zBt="General",HBt="IDs",FBt="Icono",WBt="ID",YBt="Importar",BBt="Importador",VBt="Indicadores",UBt="Nombre",qBt="Nombres",GBt="Okay",JBt="Apagado",KBt="Okay",XBt="En",ZBt="Legible",QBt="Actualizar",eVt="Requerido",tVt="Papel",nVt="Habitación",rVt="Habitaciones",oVt="Raíz",sVt="Ahorrar",iVt="Seleccionado",aVt="Estados",lVt="Paso",cVt="Título",dVt="Tipo",uVt="Tipos",pVt="Unidad",hVt="Valor",mVt="Escribible",fVt="Escribir",_Vt="leer",gVt="escribir",yVt="viva",wVt="Debe agregar los dispositivos a categorías de sala o función para permitir que se detecten automáticamente",vVt="booleano",bVt="expediente",xVt="Configuraciones",SVt="Función",CVt="ID",kVt="Nombre",TVt="Papel",MVt="Habitación",$Vt="Tipo",EVt="sin estructura",DVt="funciones",LVt="No grupo",IVt="número",OVt="habitaciones",jVt="cuerda",AVt="Admitido",PVt="Copiar el valor del estado en el portapapeles",RVt="Configuraciones",NVt="Eliminar objeto",zVt="Editar objeto",HVt="Modificar valor de estado",FVt="Fuente",WVt="Última hora de cambio",YVt="Calidad",BVt="Sello de tiempo",VVt="Usuario",UVt="Valor",qVt={Add:kBt,'Add new folder to "%s"':'Agregar nueva carpeta a "%s"',"Add state":"Agregar estado","Add to root":"Agregar a la raíz",Apply:TBt,"Automatically detected":"Dispositivos nativos",Cancel:MBt,Close:$Bt,"Collapse all nodes":"Contraer todas las carpetas",Color:EBt,"Copy device":"Copiar dispositivo","Copy device into aliases":"Copiar dispositivo en alias",Create:DBt,"Create new device":"Crear nuevo dispositivo","Create new device with Aliases":"Crear nuevo dispositivo con alias","Create new device with LinkedDevices":"Crea un nuevo dispositivo con LinkedDevices","Create new folder":"Crear nueva carpeta","Create new folder in root":"Crear nueva carpeta en el directorio raíz","Decrement color temperature":"Disminuya la temperatura de color","Decrement percentage":"Porcentaje de disminución","Decrement target temperature":"Disminuya la temperatura objetivo",Delete:LBt,"Delete device with all states":"Eliminar dispositivo con todos los estados","Delete folder":"Eliminar carpeta","Delete state":"Eliminar estado",Device:IBt,"Device and all states will be deleted. Are you sure?":"Se eliminarán el dispositivo y todos los estados. ¿Está seguro?","Device name":"Nombre del dispositivo","Device type":"Tipo de dispositivo",Devices:OBt,"Drag to resize":"Arrastrar para redimensionar","Drop or select a device to configure":"Arrastra o selecciona un dispositivo para configurar","Disable smart":'Deshabilitar la funcionalidad "inteligente"',"Do not show dialog for 5 minutes":"No mostrar el diálogo durante 5 minutos",Edit:jBt,"Edit convert functions":"Editar funciones de conversión","Edit device":"Editar dispositivo","Edit folder":"Editar propiedades de carpeta","Edit folder %s":'Editar carpeta "%s"','Edit name "%s"':'Editar el nombre "%s"',"Edit name and other properties":"Editar nombre y otras propiedades","Edit read/write functions":"Editar funciones de lectura / escritura","Edit state":"Editar estado","Edit state %s":"Editar estado %s","Edit states":"Editar estados","Enable or disable device":"Activar o desactivar dispositivo",Enabled:ABt,Execution:PBt,"Expand all nodes":"Expandir todas las carpetas",Filter:RBt,"Folder name":"Nombre de la carpeta","Folder will be deleted. Are you sure?":"Se eliminará la carpeta. ¿Está seguro?",Function:"Función",Functions:NBt,General:zBt,"Get actual temperature":"Obtener temperatura actual","Get target temperature":"Obtener temperatura objetivo","Hide info devices":"Ocultar dispositivos de información","Hide this name from smart assistance":"Ocultar este nombre de la asistencia inteligente",IDs:HBt,Icon:FBt,Id:WBt,Import:YBt,"Import state":"Estado de importación",Importer:BBt,"Increment color temperature":"Incremento de temperatura de color","Increment percentage":"Porcentaje de incremento","Increment target temperature":"Incremento de temperatura objetivo",Indicators:VBt,"JS function like":"JS funciona como","Linked devices":"Linked devices",Name:UBt,Names:qBt,"New folder":"Nueva carpeta",OK:GBt,Off:JBt,Ok:KBt,On:XBt,"Please confirm...":"Por favor confirmar...","Read function":"Leer","Read lock state":"Leer estado de bloqueo",Readable:ZBt,Refresh:QBt,Required:eVt,Role:tVt,Room:nVt,Rooms:rVt,Root:oVt,Save:sVt,"Select ID":"Seleccionar ID",'Select for "%s"':'Seleccionar para "%s"',"Select predefined icon":"Seleccionar icono predefinido",Selected:iVt,"Set color":"Establecer color","Set color temperature":"Establecer temperatura de color","Set lock state":"Establecer estado de bloqueo","Set percentage":"Establecer porcentaje","Set target temperature":"Establecer temperatura objetivo","Show expert settings":"Mostrar configuración de experto","Show hide indicators":"Mostrar / ocultar indicadores","Show only aliases":"Mostrar solo alias","Smart name":"Nombre inteligente",States:aVt,Step:lVt,'Supported by "%s"':'Compatible con "%s"',"Supported by %s":"Con el apoyo de %s","The list of devices to copy is empty":"La lista de dispositivos para copiar está vacía","This name will use be in smart assistance. (optional)":"Este nombre se utilizará en la asistencia inteligente. (Opcional)",Title:cVt,"Turn off":"Apagar","Turn on":"Encender",Type:dVt,Types:uVt,Unit:pVt,"Use different states for read and write":"Utilice diferentes estados para lectura y escritura","Use one state for read and write":"Utilice un estado para leer y escribir",Value:hVt,"Value=>String":"Asignación del valor a la cadena",Writable:mVt,Write:fVt,"Write function":"Escribir","You can drag & drop device":"Puede arrastrar y soltar dispositivo",alias_read:_Vt,alias_write:gVt,alive:yVt,auto_detected_empty_info:wVt,boolean:vVt,"cloning method":"Estructura en","do not import devices without category":"No importar dispositivos sin categoría",file:bVt,filter_customs:xVt,filter_func:SVt,filter_id:CVt,filter_name:kVt,filter_role:TVt,filter_room:MVt,filter_type:$Vt,flat:EVt,functions:DVt,no_group:LVt,number:IVt,rooms:OVt,string:jVt,"Toggle split screen":"Alternar pantalla dividida",tooltip_ack:AVt,tooltip_copyState:PVt,tooltip_customConfig:RVt,tooltip_deleteObject:NVt,tooltip_editObject:zVt,tooltip_editState:HVt,tooltip_from:FVt,tooltip_lc:WVt,tooltip_quality:YVt,tooltip_ts:BVt,tooltip_user:VVt,tooltip_value:UVt},GVt="Dodaj",JVt="Zastosować",KVt="Odwołaj",XVt="Blisko",ZVt="Kolor",QVt="Stwórz",eUt="Kasować",tUt="Urządzenie",nUt="Urządzenia",rUt="Edytować",oUt="Włączone",sUt="Wykonanie",iUt="Filtr",aUt="Funkcje",lUt="Główne",cUt="ID",dUt="Ikona",uUt="ID",pUt="Import",hUt="Importer",mUt="Wskaźniki",fUt="Nazwa",_Ut="Nazwy",gUt="OK",yUt="Poza",wUt="Ok",vUt="Na",bUt="Czytelny",xUt="Odświeżać",SUt="wymagany",CUt="Rola",kUt="Pokój",TUt="Pokoje",MUt="Korzeń",$Ut="Zapisz",EUt="Wybrany",DUt="Stany",LUt="Krok",IUt="Tytuł",OUt="Typ",jUt="Rodzaje",AUt="Jednostka",PUt="Wartość",RUt="Zapisywalny",NUt="Pisać",zUt="Czytać",HUt="pisać",FUt="żywy",WUt="Aby umożliwić automatyczne wykrywanie urządzeń, należy dodać je do kategorii pomieszczeń lub funkcji",YUt="logiczne",BUt="plik",VUt="Ustawienia",UUt="Funkcja",qUt="ID",GUt="Nazwa",JUt="Rola",KUt="Pokój",XUt="Rodzaj",ZUt="brak struktury",QUt="Funkcje",eqt="Brak grupy",tqt="numer",nqt="pokoje",rqt="strunowy",oqt="Potwierdzono",sqt="Skopiuj wartość stanu do schowka",iqt="Ustawienia",aqt="Usuń obiekt",lqt="Edytuj obiekt",cqt="Zmodyfikuj wartość stanu",dqt="Źródło",uqt="Czas ostatniej zmiany",pqt="Jakość",hqt="Znak czasu",mqt="Użytkownik",fqt="Wartość",_qt={Add:GVt,'Add new folder to "%s"':"Dodaj nowy folder do „%s”","Add state":"Dodaj stan","Add to root":"Dodaj do katalogu głównego",Apply:JVt,"Automatically detected":"Urządzenia natywne",Cancel:KVt,Close:XVt,"Collapse all nodes":"Zwiń wszystkie foldery",Color:ZVt,"Copy device":"Kopiuj urządzenie","Copy device into aliases":"Skopiuj urządzenie do aliasów",Create:QVt,"Create new device":"Utwórz nowe urządzenie","Create new device with Aliases":"Utwórz nowe urządzenie za pomocą aliasów","Create new device with LinkedDevices":"Utwórz nowe urządzenie za pomocą LinkedDevices","Create new folder":"Stwórz nowy folder","Create new folder in root":"Utwórz nowy folder w katalogu głównym","Decrement color temperature":"Zmniejszenie temperatury barwowej","Decrement percentage":"Procent zmniejszenia","Decrement target temperature":"Zmniejszenie docelowej temperatury",Delete:eUt,"Delete device with all states":"Usuń urządzenie ze wszystkimi stanami","Delete folder":"Usunięty folder","Delete state":"Usuń stan",Device:tUt,"Device and all states will be deleted. Are you sure?":"Urządzenie i wszystkie stany zostaną usunięte. Jesteś pewny?","Device name":"Nazwa urządzenia","Device type":"Rodzaj urządzenia",Devices:nUt,"Drag to resize":"Przeciągnij, aby zmienić rozmiar","Drop or select a device to configure":"Przeciągnij lub wybierz urządzenie do skonfigurowania","Disable smart":'Wyłącz "inteligentną" funkcjonalność',"Do not show dialog for 5 minutes":"Nie pokazuj okna dialogowego przez 5 minut",Edit:rUt,"Edit convert functions":"Edytuj funkcje konwersji","Edit device":"Edytuj urządzenie","Edit folder":"Edytuj właściwości folderu","Edit folder %s":'Edytuj folder "%s"','Edit name "%s"':"Edytuj nazwę „%s”","Edit name and other properties":"Edytuj nazwę i inne właściwości","Edit read/write functions":"Edytuj funkcje odczytu/zapisu","Edit state":"Edytuj stan","Edit state %s":"Edytuj stan %s","Edit states":"Edytuj stany","Enable or disable device":"Włącz lub wyłącz urządzenie",Enabled:oUt,Execution:sUt,"Expand all nodes":"Rozwiń wszystkie foldery",Filter:iUt,"Folder name":"Nazwa folderu","Folder will be deleted. Are you sure?":"Folder zostanie usunięty. Jesteś pewny?",Function:"Funkcja",Functions:aUt,General:lUt,"Get actual temperature":"Uzyskaj rzeczywistą temperaturę","Get target temperature":"Uzyskaj docelową temperaturę","Hide info devices":"Ukryj urządzenia informacyjne","Hide this name from smart assistance":"Ukryj tę nazwę przed inteligentną pomocą",IDs:cUt,Icon:dUt,Id:uUt,Import:pUt,"Import state":"Stan importu",Importer:hUt,"Increment color temperature":"Zwiększ temperaturę barwową","Increment percentage":"Procent przyrostu","Increment target temperature":"Przyrostowa temperatura docelowa",Indicators:mUt,"JS function like":"Funkcja JS jak","Linked devices":"Linked devices",Name:fUt,Names:_Ut,"New folder":"Nowy folder",OK:gUt,Off:yUt,Ok:wUt,On:vUt,"Please confirm...":"Proszę potwierdzić...","Read function":"Czytać","Read lock state":"Odczyt stanu blokady",Readable:bUt,Refresh:xUt,Required:SUt,Role:CUt,Room:kUt,Rooms:TUt,Root:MUt,Save:$Ut,"Select ID":"Wybierz identyfikator",'Select for "%s"':"Wybierz dla „%s”","Select predefined icon":"Wybierz predefiniowaną ikonę",Selected:EUt,"Set color":"Ustaw kolor","Set color temperature":"Ustaw temperaturę barwową","Set lock state":"Ustaw stan blokady","Set percentage":"Ustaw procent","Set target temperature":"Ustaw temperaturę docelową","Show expert settings":"Pokaż ustawienia eksperckie","Show hide indicators":"Pokaż / ukryj wskaźniki","Show only aliases":"Pokaż tylko aliasy","Smart name":"Inteligentna nazwa",States:DUt,Step:LUt,'Supported by "%s"':"Obsługiwane przez „%s”","Supported by %s":"Obsługiwane przez %s","The list of devices to copy is empty":"Lista urządzeń do skopiowania jest pusta","This name will use be in smart assistance. (optional)":"Ta nazwa będzie używana w inteligentnej pomocy. (opcjonalny)",Title:IUt,"Turn off":"Wyłączyć","Turn on":"Włączyć",Type:OUt,Types:jUt,Unit:AUt,"Use different states for read and write":"Użyj różnych stanów do odczytu i zapisu","Use one state for read and write":"Użyj jednego stanu do odczytu i zapisu",Value:PUt,"Value=>String":"Mapowanie wartości na ciąg",Writable:RUt,Write:NUt,"Write function":"pisać","You can drag & drop device":"Możesz przeciągnąć i upuścić urządzenie",alias_read:zUt,alias_write:HUt,alive:FUt,auto_detected_empty_info:WUt,boolean:YUt,"cloning method":"Struktura włączona","do not import devices without category":"nie importuj urządzeń bez kategorii",file:BUt,filter_customs:VUt,filter_func:UUt,filter_id:qUt,filter_name:GUt,filter_role:JUt,filter_room:KUt,filter_type:XUt,flat:ZUt,functions:QUt,no_group:eqt,number:tqt,rooms:nqt,string:rqt,"Toggle split screen":"Przełącz podzielony ekran",tooltip_ack:oqt,tooltip_copyState:sqt,tooltip_customConfig:iqt,tooltip_deleteObject:aqt,tooltip_editObject:lqt,tooltip_editState:cqt,tooltip_from:dqt,tooltip_lc:uqt,tooltip_quality:pqt,tooltip_ts:hqt,tooltip_user:mqt,tooltip_value:fqt},gqt="додати",yqt="Застосувати",wqt="Скасувати",vqt="Закрити",bqt="колір",xqt="Створити",Sqt="Видалити",Cqt="пристрій",kqt="Пристрої",Tqt="Редагувати",Mqt="Увімкнено",$qt="Виконання",Eqt="фільтр",Dqt="Функції",Lqt="Загальний",Iqt="ідентифікатори",Oqt="значок",jqt="ID",Aqt="Імпорт",Pqt="Імпортер",Rqt="Індикатори",Nqt="Ім'я",zqt="імена",Hqt="в порядку",Fqt="Вимкнено",Wqt="В порядку",Yqt="Увімкнено",Bqt="Читабельний",Vqt="Оновити",Uqt="вимагається",qqt="Роль",Gqt="Кімната",Jqt="Кімнати",Kqt="Корінь",Xqt="зберегти",Zqt="Вибране",Qqt="держави",eGt="Крок",tGt="Назва",nGt="Тип",rGt="Типи",oGt="Одиниця",sGt="Значення",iGt="Можливість запису",aGt="Напишіть",lGt="читати",cGt="писати",dGt="живий",uGt="Ви повинні додати пристрої до категорій кімнат або функцій, щоб дозволити автоматичне виявлення пристроїв",pGt="логічний",hGt="файл",mGt="Налаштування",fGt="функція",_Gt="ID",gGt="Ім'я",yGt="Роль",wGt="Кімната",vGt="Тип",bGt="немає структури",xGt="функції",SGt="Жодної групи",CGt="номер",kGt="кімнати",TGt="рядок",MGt="Визнано",$Gt="Скопіюйте значення стану в буфер обміну",EGt="Налаштування",DGt="Видалити об'єкт",LGt="Редагувати об'єкт",IGt="Змінити значення стану",OGt="Джерело",jGt="Час останньої зміни",AGt="якість",PGt="Позначка часу",RGt="Користувач",NGt="Значення",zGt={Add:gqt,'Add new folder to "%s"':'Додати нову папку до "%s"',"Add state":"Додати стан","Add to root":"Додайте в корінь",Apply:yqt,"Automatically detected":"Рідні пристрої",Cancel:wqt,Close:vqt,"Collapse all nodes":"Згорнути всі папки",Color:bqt,"Copy device":"Копіювальний пристрій","Copy device into aliases":"Копіювати пристрій у псевдоніми",Create:xqt,"Create new device":"Створіть новий пристрій","Create new device with Aliases":"Створіть новий пристрій із псевдонімами","Create new device with LinkedDevices":"Створіть новий пристрій за допомогою LinkedDevices","Create new folder":"Створити нову папку","Create new folder in root":"Створіть нову папку в кореневому каталозі","Decrement color temperature":"Зменшити колірну температуру","Decrement percentage":"Відсоток зменшення","Decrement target temperature":"Зменшити цільову температуру",Delete:Sqt,"Delete device with all states":"Видалити пристрій з усіма станами","Delete folder":"Видалити папку","Delete state":"Видалити стан",Device:Cqt,"Device and all states will be deleted. Are you sure?":"Пристрій і всі стани буде видалено. Ти впевнений?","Device name":"Ім'я пристрою","Device type":"Тип пристрою",Devices:kqt,"Drag to resize":"Перетягніть для зміни розміру","Drop or select a device to configure":"Перетягніть або виберіть пристрій для налаштування","Disable smart":"Вимкніть «розумний» функціонал","Do not show dialog for 5 minutes":"Не показувати діалог протягом 5 хвилин",Edit:Tqt,"Edit convert functions":"Редагувати функції перетворення","Edit device":"Редагувати пристрій","Edit folder":"Редагувати властивості папки","Edit folder %s":'Редагувати папку "%s"','Edit name "%s"':'Редагувати назву "%s"',"Edit name and other properties":"Редагувати назву та інші властивості","Edit read/write functions":"Редагувати функції читання/запису","Edit state":"Редагувати стан","Edit state %s":"Редагувати стан %s","Edit states":"Редагувати стани","Enable or disable device":"Увімкнути або вимкнути пристрій",Enabled:Mqt,Execution:$qt,"Expand all nodes":"Розгорнути всі папки",Filter:Eqt,"Folder name":"Назва папки","Folder will be deleted. Are you sure?":"Папку буде видалено. Ти впевнений?",Function:"функція",Functions:Dqt,General:Lqt,"Get actual temperature":"Отримайте фактичну температуру","Get target temperature":"Отримайте цільову температуру","Hide info devices":"Приховати інформаційні пристрої","Hide this name from smart assistance":"Приховати це ім'я від розумної допомоги",IDs:Iqt,Icon:Oqt,Id:jqt,Import:Aqt,"Import state":"Стан імпорту",Importer:Pqt,"Increment color temperature":"Збільшити колірну температуру","Increment percentage":"Відсоток приросту","Increment target temperature":"Збільшити цільову температуру",Indicators:Rqt,"JS function like":"Функція JS схожа на","Linked devices":"Підключені пристрої",Name:Nqt,Names:zqt,"New folder":"Нова папка",OK:Hqt,Off:Fqt,Ok:Wqt,On:Yqt,"Please confirm...":"Будь-ласка підтвердіть...","Read function":"Прочитайте","Read lock state":"Читати стан блокування",Readable:Bqt,Refresh:Vqt,Required:Uqt,Role:qqt,Room:Gqt,Rooms:Jqt,Root:Kqt,Save:Xqt,"Select ID":"Виберіть ID",'Select for "%s"':'Виберіть для "%s"',"Select predefined icon":"Виберіть попередньо визначений значок",Selected:Zqt,"Set color":"Встановити колір","Set color temperature":"Встановити колірну температуру","Set lock state":"Встановити стан блокування","Set percentage":"Встановити відсоток","Set target temperature":"Встановити цільову температуру","Show expert settings":"Показати експертні налаштування","Show hide indicators":"Показати/приховати індикатори","Show only aliases":"Показувати лише псевдоніми","Smart name":"Розумне ім'я",States:Qqt,Step:eGt,'Supported by "%s"':'Підтримується "%s"',"Supported by %s":"Підтримується %s","The list of devices to copy is empty":"Список пристроїв для копіювання порожній","This name will use be in smart assistance. (optional)":"Це ім’я використовуватиметься в розумній допомозі. (необов'язково)",Title:tGt,"Turn off":"Вимкнути","Turn on":"Ввімкнути",Type:nGt,Types:rGt,Unit:oGt,"Use different states for read and write":"Використовуйте різні стани для читання та запису","Use one state for read and write":"Використовуйте один стан для читання та запису",Value:sGt,"Value=>String":"Відображення значення в рядок",Writable:iGt,Write:aGt,"Write function":"Напишіть","You can drag & drop device":"Ви можете перетягнути пристрій",alias_read:lGt,alias_write:cGt,alive:dGt,auto_detected_empty_info:uGt,boolean:pGt,"cloning method":"Структура на","do not import devices without category":"не імпортувати пристрої без категорії",file:hGt,filter_customs:mGt,filter_func:fGt,filter_id:_Gt,filter_name:gGt,filter_role:yGt,filter_room:wGt,filter_type:vGt,flat:bGt,functions:xGt,no_group:SGt,number:CGt,rooms:kGt,string:TGt,"Toggle split screen":"Перемкнути розділений екран",tooltip_ack:MGt,tooltip_copyState:$Gt,tooltip_customConfig:EGt,tooltip_deleteObject:DGt,tooltip_editObject:LGt,tooltip_editState:IGt,tooltip_from:OGt,tooltip_lc:jGt,tooltip_quality:AGt,tooltip_ts:PGt,tooltip_user:RGt,tooltip_value:NGt},HGt="添加",FGt="申请",WGt="取消",YGt="关闭",BGt="颜色",VGt="创造",UGt="删除",qGt="设备",GGt="设备",JGt="编辑",KGt="已启用",XGt="执行",ZGt="过滤",QGt="功能",eJt="一般的",tJt="标识",nJt="图标",rJt="ID",oJt="进口",sJt="进口商",iJt="指标",aJt="名称",lJt="名称",cJt="好",dJt="关",uJt="确定",pJt="开",hJt="可读",mJt="刷新",fJt="必需的",_Jt="角色",gJt="房间",yJt="房间",wJt="根",vJt="保存",bJt="已选",xJt="状态",SJt="步",CJt="标题",kJt="类型",TJt="类型",MJt="单元",$Jt="值",EJt="可写",DJt="写",LJt="读",IJt="写",OJt="可连接",jJt="您必须将设备添加到房间或功能类别才能让设备被自动检测",AJt="布尔值",PJt="文件",RJt="设定值",NJt="功能",zJt="ID",HJt="名称",FJt="角色",WJt="房间",YJt="类型",BJt="没有结构",VJt="职能",UJt="未分组",qJt="数字",GJt="房间",JJt="细绳",KJt="已确认",XJt="将状态值复制到剪贴板",ZJt="设定值",QJt="删除物件",eKt="编辑物件",tKt="修改状态值",nKt="资源",rKt="最后更改时间",oKt="质量",sKt="时间戳记",iKt="用户",aKt="值",lKt={Add:HGt,'Add new folder to "%s"':"将新文件夹添加到“%s”","Add state":"添加状态","Add to root":"添加到根",Apply:FGt,"Automatically detected":"本机设备",Cancel:WGt,Close:YGt,"Collapse all nodes":"折叠所有文件夹",Color:BGt,"Copy device":"复制设备","Copy device into aliases":"将设备复制到别名",Create:VGt,"Create new device":"创建新设备","Create new device with Aliases":"使用别名创建新设备","Create new device with LinkedDevices":"使用LinkedDevices创建新设备","Create new folder":"创建新文件夹","Create new folder in root":"在根目录新建文件夹","Decrement color temperature":"降低色温","Decrement percentage":"减少百分比","Decrement target temperature":"降低目标温度",Delete:UGt,"Delete device with all states":"删除所有状态的设备","Delete folder":"删除文件夹","Delete state":"删除状态",Device:qGt,"Device and all states will be deleted. Are you sure?":"设备和所有状态将被删除。你确定吗?","Device name":"设备名称","Device type":"设备类型",Devices:GGt,"Drag to resize":"拖动以调整大小","Drop or select a device to configure":"拖放或选择要配置的设备","Disable smart":"禁用“智能”功能","Do not show dialog for 5 minutes":"5 分钟内不显示对话框",Edit:JGt,"Edit convert functions":"编辑转换函数","Edit device":"编辑设备","Edit folder":"编辑文件夹属性","Edit folder %s":"编辑文件夹名称",'Edit name "%s"':"修改名称“%s”","Edit name and other properties":"编辑名称和其他属性","Edit read/write functions":"编辑读/写功能","Edit state":"编辑状态","Edit state %s":"编辑状态 %s","Edit states":"编辑状态","Enable or disable device":"启用或禁用设备",Enabled:KGt,Execution:XGt,"Expand all nodes":"展开所有文件夹",Filter:ZGt,"Folder name":"文件夹名称","Folder will be deleted. Are you sure?":"文件夹将被删除。你确定吗?",Function:"功能",Functions:QGt,General:eJt,"Get actual temperature":"获得实际温度","Get target temperature":"获得目标温度","Hide info devices":"隐藏信息设备","Hide this name from smart assistance":"在智能协助中隐藏此名称",IDs:tJt,Icon:nJt,Id:rJt,Import:oJt,"Import state":"导入状态",Importer:sJt,"Increment color temperature":"增加色温","Increment percentage":"增量百分比","Increment target temperature":"增加目标温度",Indicators:iJt,"JS function like":"JS函数之类的","Linked devices":"Linked devices",Name:aJt,Names:lJt,"New folder":"新建文件夹",OK:cJt,Off:dJt,Ok:uJt,On:pJt,"Please confirm...":"请确认...","Read function":"读","Read lock state":"读门锁状态",Readable:hJt,Refresh:mJt,Required:fJt,Role:_Jt,Room:gJt,Rooms:yJt,Root:wJt,Save:vJt,"Select ID":"选择ID",'Select for "%s"':"选择“%s”","Select predefined icon":"选择预定义图标",Selected:bJt,"Set color":"设置颜色","Set color temperature":"设置色温","Set lock state":"设置门锁状态","Set percentage":"设定百分比","Set target temperature":"设定目标温度","Show expert settings":"显示专家设置","Show hide indicators":"显示/隐藏指示器","Show only aliases":"仅显示别名","Smart name":"聪明的名字",States:xJt,Step:SJt,'Supported by "%s"':"由“%s”支持","Supported by %s":"由 %s 支持","The list of devices to copy is empty":"要复制的设备列表为空","This name will use be in smart assistance. (optional)":"此名称将用于智能协助。 (可选的)",Title:CJt,"Turn off":"关闭","Turn on":"打开",Type:kJt,Types:TJt,Unit:MJt,"Use different states for read and write":"使用不同的状态进行读写","Use one state for read and write":"使用一个状态进行读取和写入",Value:$Jt,"Value=>String":"将值映射到字符串",Writable:EJt,Write:DJt,"Write function":"写","You can drag & drop device":"您可以拖放设备",alias_read:LJt,alias_write:IJt,alive:OJt,auto_detected_empty_info:jJt,boolean:AJt,"cloning method":"结构上","do not import devices without category":"不导入无类别的设备",file:PJt,filter_customs:RJt,filter_func:NJt,filter_id:zJt,filter_name:HJt,filter_role:FJt,filter_room:WJt,filter_type:YJt,flat:BJt,functions:VJt,no_group:UJt,number:qJt,rooms:GJt,string:JJt,"Toggle split screen":"切换分屏",tooltip_ack:KJt,tooltip_copyState:XJt,tooltip_customConfig:ZJt,tooltip_deleteObject:QJt,tooltip_editObject:eKt,tooltip_editState:tKt,tooltip_from:nKt,tooltip_lc:rKt,tooltip_quality:oKt,tooltip_ts:sKt,tooltip_user:iKt,tooltip_value:aKt},R5=new URLSearchParams(window.location.search).get("theme");R5&&["dark","light"].includes(R5)&&window.localStorage.setItem("App.themeName",R5);class cKt extends iu{constructor(e){const n={...e};n.bottomButtons=!1,n.Connection=MH,n.adapterName="devices",n.sentryDSN=window.sentryDSN,n.translations={en:GAt,de:gRt,ru:HNt,pt:cHt,nl:IFt,fr:tYt,it:CBt,es:qVt,pl:_qt,uk:zGt,"zh-cn":lKt},window.location.port==="3000"&&(n.socket={host:"192.168.1.129"}),super(e,n),Urt();const r=this.createTheme();this.state={...this.state,theme:r,themeName:this.getThemeName(r),themeType:this.getThemeType(r)}}onConnectionReady(){super.onConnectionReady();const e=this.socket.systemConfig;this.setState({systemConfig:e})}render(){return this.state.systemConfig?p.jsx(iT,{injectFirst:!0,children:p.jsxs(q5,{theme:this.state.theme,children:[p.jsx(IT,{}),p.jsx($i,{socket:this.socket,selectedInstance:`${this.adapterName}.${this.instance}`,style:{justifyContent:"start"},themeName:this.state.themeName,themeType:this.state.themeType,theme:this.state.theme,isFloatComma:this.state.systemConfig.common.isFloatComma,dateFormat:this.state.systemConfig.common.dateFormat,communicationStateId:!0,admin:!1,showSettingsButton:!0}),this.renderError()]})}):p.jsx(iT,{injectFirst:!0,children:p.jsxs(q5,{theme:this.state.theme,children:[p.jsx(IT,{}),p.jsx(uO,{themeType:this.state.themeType})]})})}}window.adapterName="devices";console.log(`iobroker.${window.adapterName}@${xP.version}`);const IL=document.getElementById("root");IL&&vP.createRoot(IL).render(p.jsx(cKt,{}));SP();
|