"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[39181],{897015(e,t,n){n.d(t,{VG:()=>i,Vm:()=>s,z7:()=>o});const i=80,o="22:00",s="08:00"},446863(e,t,n){n.d(t,{H5:()=>l,Lq:()=>r,n0:()=>a});var i=n(909924),o=n(573534),s=n(172205);const a=e=>e[s.U.SHARED][o.N.PROPERTY_PANEL]?.[i.Io.TAB_GET_DATA_FUNCTION]||{},r=e=>e[s.U.SHARED][o.N.PROPERTY_PANEL]?.[i.Io.TAB_SUBMIT_FUNCTION]||{},l=e=>e[s.U.SHARED][o.N.PROPERTY_PANEL]?.[i.Io.TAB_RESET_FUNCTION]||{}},535322(e,t,n){n.d(t,{A:()=>_,I:()=>i});var i,o=n(274934),s=n(814557),a=n(158885),r=n(247816),l=n(565527),d=n(309130),m=n(100978),c=n(291508);!function(e){e.ACCORDION="accordion",e.BUTTON_LIST="buttonList"}(i||(i={}));const g=(0,r.A)(m.A,(0,c.A)("marginBottom","isButtonList","margin","flex","width","padding","nested","background"))`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||s.Ay[n===l.S.DARK?`desktop-color-neutral-${t?"00":"01"}-${l.S.DARK}`:`desktop-color-neutral-${t?"01":"00"}-${l.S.LIGHT}`]};
  padding: ${({isButtonList:e,padding:t})=>t||(e?`0 ${d.Ln}`:d.Ln)};
  margin-bottom: ${({marginBottom:e})=>e||d.Ln};
  ${({margin:e})=>e?`margin: ${e};`:""}
  border-radius: 8px;
  flex-direction: column;
  width: ${({width:e="100%"})=>e};
  flex: ${({flex:e=0})=>e};
  > :last-child {
    margin-bottom: 0;
  }
  thead {
    tr {
      height: 32px !important;
    }
    th {
      text-transform: none;
    }
  }
  ${({isButtonList:e})=>e?`\n    > div {\n      display: flex;\n      height: 48px;\n      border-bottom: ${({theme:{themeName:e}})=>s.Ay[`desktop-border-divider-${e}`]};\n      &:last-child {\n        border-bottom: none;\n      }\n    }\n  `:""}
`,u=(0,r.A)(a.A,(0,c.A)("marginBottom","margin","flex","padding","nested","background"))`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||s.Ay[n===l.S.DARK?`desktop-color-neutral-${t?"00":"01"}-${l.S.DARK}`:`desktop-color-neutral-${t?"01":"00"}-${l.S.LIGHT}`]};
  margin-bottom: ${({theme:e,marginBottom:t})=>t||e.spacing["spacing-l"]};
  ${({margin:e})=>e?`margin: ${e};`:""}
  ${({padding:e})=>e?`padding: ${e};`:""}
  border-radius: 8px;
  flex-direction: column;
  flex: ${({flex:e=0})=>e};
  > :last-child {
    margin-bottom: 0;
  }
  thead {
    tr {
      height: 32px !important;
    }
    th {
      text-transform: none;
    }
  }
  > li {
    > div:first-child {
      background: ${({background:e,theme:{themeName:t}})=>e||s.Ay[t===l.S.DARK?`desktop-color-neutral-01-${l.S.DARK}`:`desktop-color-neutral-00-${l.S.LIGHT}`]};
      height: 48px;
      padding: 0 ${d.Ln};
    }
    > div:nth-child(2) {
      margin-bottom: 0;
      padding: 0;
      > div {
        padding: 0 ${d.Ln} ${d.Ln};
      }
    }
  }
`,_=({type:e,marginBottom:t,margin:n,padding:s,flex:a,width:r,nested:l,...d})=>"items"in d?(0,o.jsx)(u,{marginBottom:t,margin:n,padding:s,flex:a,nested:l,...d}):(0,o.jsx)(g,{nested:l,width:r,marginBottom:t,margin:n,padding:s,flex:a,isButtonList:e===i.BUTTON_LIST,...d,children:d.children})},250266(e,t,n){n.d(t,{A:()=>m});var i=n(274934),o=n(602086),s=n(696264),a=n(409844),r=n(521376),l=n(309130),d=n(470070);const m=({children:e=null,title:t,titleValues:n,message:m,messageValues:c,handleConfirm:g=()=>null,handleClose:u=()=>null,handleCancel:_,isOpen:h,buttonVariant:A="primary",cancelButtonVariant:p="tertiary",cancelButtonMessage:b="COMMON_ACTION_CANCEL",buttonMessage:x="COMMON_ACTION_CONFIRM",buttonDisabled:C=!1,position:f="top",offset:O,showHeaderClose:E=!1,contentClassName:N="",body:M,titleBody:v,className:I,rootClose:T=!1,footerActions:S})=>{const $=(0,o.useCallback)(e=>{h&&(e.stopPropagation(),e.key===r.U.ENTER?g():e.key===r.U.ESCAPE&&u(!1))},[h,g,u]);(0,o.useEffect)(()=>(window.addEventListener("keydown",$,!0),()=>{window.removeEventListener("keydown",$,!0)}),[$]);const j=(0,o.useCallback)(()=>{u(!1),_?.()},[u,_]),R=(0,o.useCallback)(()=>{u(!1),g()},[u,g]),L=(0,o.useMemo)(()=>[{text:(0,i.jsx)(d.sA,{id:b}),variant:p,onClick:j},{text:(0,i.jsx)(d.sA,{id:x}),disabled:C,variant:A,onClick:R}],[x,A,b,p,j,R,C]),k=(0,o.useCallback)(()=>{u(!1)},[u]),y=a.AH`
    ${t?"":`margin-top: ${l.xO}`}
  `;return(0,i.jsx)(s.A,{title:t?(0,i.jsx)(d.sA,{id:t,values:n}):v||null,...m?{body:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(d.sA,{id:m,values:c}),M]})}:{body:M},position:f,portal:!0,offset:O,actions:S||L,showHeaderClose:E,contentClassName:a.AH`
        ${y}
        ${N}
      `,onRequestClose:k,isOpen:h,allowOverflow:!0,rootClose:T,className:I,children:e})}},269935(e,t,n){n.d(t,{A:()=>k,h:()=>I});var i=n(274934),o=n(418398),s=n(977872),a=n(602086),r=n(843871),l=n(396489),d=n.n(l),m=n(125799),c=n(938984),g=n(925845),u=n(853777),_=n(247816),h=n(950804),A=n(586566),p=n(309130),b=n(120197),x=n(100978),C=n(205521),f=n(470070),O=n(291935),E=n(598990),N=n(897166),M=n(897015),v=n(505342);const I="lcmScreen",T=(0,_.A)(c.A)`
  flex: 1;
  margin-right: ${p.xO};
`,S=(0,_.A)("div")`
  margin-right: 2px;
`,$=(0,_.A)(u.A)`
  margin-left: 6px;
  margin-bottom: 3px;
`,j=(0,_.A)(m.A)`
  top: 2px;
`,R=(0,r.bk)({enableReinitialize:!0,isInitialValid:!0,mapPropsToValues:({lcmSettings:e,activeItem:{lcm_brightness:t=M.VG,lcm_brightness_override:n=!1,lcm_night_mode_enabled:i=!1,lcm_night_mode_begins:o=M.z7,lcm_night_mode_ends:s=M.Vm}})=>({lcm:e,lcm_brightness:t,lcm_brightness_override:n,lcm_night_mode_enabled:i,lcm_night_mode_begins:o,lcm_night_mode_ends:s}),validationSchema:h.A.object().shape({lcm:h.A.object().shape({sync:h.A.boolean()}),lcm_brightness_override:h.A.boolean(),lcm_brightness:h.A.number().label("COMMON_BRIGHTNESS").min(1).max(100).required(),lcm_night_mode_begins:h.A.string(),lcm_night_mode_ends:h.A.string()}),handleSubmit:()=>null}),L=e=>(0,i.jsx)(c.A,{size:"medium",children:e}),k=(0,o.Zz)((0,s.Ng)(e=>({lcmSettings:(0,O.ml)(e)}),{}),R)(({values:e,setFieldValue:t,resetForm:n,setFormDirty:o,setFormInvalid:r,dirty:l,isValid:m,initialValues:u,activeItem:_})=>{const h=(0,s.wA)(),O=(0,s.d4)(N.EL);return(0,a.useEffect)(()=>{o(I,l),r(I,!m)},[o,r,m,l]),(0,a.useEffect)(()=>(h((0,C.uo)({[I]:()=>({...e,lcm_brightness_override:e.lcm_brightness!==M.VG,lcm_night_mode_begins:e.lcm_night_mode_begins,lcm_night_mode_ends:e.lcm_night_mode_ends})})),h((0,C.Oo)({[I]:()=>{d()(u.lcm,e.lcm)||h((0,E.vd)(e.lcm)),n({values:e})}})),h((0,C.rW)({[I]:n})),()=>{h((0,C.uo)({[I]:null})),h((0,C.Oo)({[I]:null})),h((0,C.rW)({[I]:null}))}),[n,e,u.lcm,h]),(0,i.jsxs)(i.Fragment,{children:[(0,A.TY)(_)?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(x.A,{justifyContent:"space-between",marginBottom:p.Ln,children:[(0,i.jsx)(c.A,{color:"text-1",size:"medium",children:(0,i.jsx)(f.sA,{id:"COMMON_BRIGHTNESS"})}),(0,i.jsx)(g.A,{width:"50%",value:e.lcm_brightness||M.VG,withValueIndicator:!0,min:1,valueIndicatorPosition:"right",formatValueIndicatorContent:L,onChange:e=>{t("lcm_brightness",+e.target.value)},disabled:O})]}),(0,i.jsx)(v.A,{})]}):null,(0,i.jsx)(x.A,{justifyContent:"space-between",alignItems:"center",children:(0,i.jsx)(b.A,{type:"realCheckbox",name:"lcm.sync",children:(0,i.jsx)(T,{color:"text-1",size:"medium",children:(0,i.jsxs)(x.A,{alignItems:"center",children:[(0,i.jsx)(S,{children:(0,i.jsx)(f.sA,{id:"COMMON_RACK_MULTI_SCREEN_SYNC"})}),(0,i.jsx)(j,{tooltipClassName:"tooltip-position-fixer",width:200,description:(0,i.jsx)(f.sA,{id:"DEVICE_PROPERTIES_LABEL_RACK_MULTI_SCREEN_SYNCHRONIZATION_TOOLTIP"}),children:(0,i.jsx)($,{isActive:!0,size:"original"})})]})})})})]})})},505342(e,t,n){n.d(t,{A:()=>x});var i=n(274934),o=n(977872),s=n(602086),a=n(843871),r=n(938984),l=n(247816),d=n(641645),m=n(309130),c=n(120197),g=n(470070),u=n(570801),_=n(304151),h=n(100978);const A=(0,l.A)(h.A)`
  margin-bottom: 24px;
`,p=e=>{const[t,n]=e.split(":");return 60*Number(t)+Number(n)},b=e=>`${Math.floor(e/d.t).toString().padStart(2,"0")}:${(e%d.t).toString().padStart(2,"0")}`,x=(0,s.memo)(()=>{const{values:{lcm_night_mode_begins:e,lcm_night_mode_ends:t},setFieldValue:n}=(0,a.j7)(),{formatMessage:l}=(0,g.tz)(),x=(0,o.d4)(u.jc),C=(0,s.useMemo)(()=>(0,d.gy)(x,15,l),[x,l]),f=(0,s.useMemo)(()=>"string"==typeof e?p(e):e,[e]),O=(0,s.useMemo)(()=>"string"==typeof t?p(t):t,[t]),E=(0,s.useCallback)(({value:e})=>{n("lcm_night_mode_begins",b(+e))},[n]),N=(0,s.useCallback)(({value:e})=>{n("lcm_night_mode_ends",b(+e))},[n]);return!f&&0!==f||!O&&0!==O?null:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(h.A,{justifyContent:"flex-start",marginBottom:m.kc,alignItems:"center",gap:m.YC,children:[(0,i.jsx)(r.A,{color:"text-1",size:"medium",children:(0,i.jsx)(g.sA,{id:"DEVICE_PROPERTIES_LABEL_LCM_NIGHT_MODE"})}),(0,i.jsx)(_.A,{description:(0,i.jsx)(g.sA,{id:"DEVICE_PROPERTIES_LABEL_LCM_NIGHT_MODE_DESCRIPTION"})})]}),(0,i.jsx)(A,{justifyContent:"space-between",flexDirection:"column",children:(0,i.jsxs)(h.A,{gap:m.Ln,children:[(0,i.jsx)(c.A,{type:"dropdown",variant:"secondary",label:"COMMON_START_TIME",translateLabel:!0,name:"lcm_night_mode_begins",placeholder:C.some(({value:e})=>e===f)?void 0:(0,d.oP)({formatMessage:l,minuteOfDay:f,use24HourFormat:x}),translatePlaceholder:!1,options:C,value:f,onChange:E,full:!0}),(0,i.jsx)(c.A,{type:"dropdown",variant:"secondary",label:"COMMON_END_TIME",translateLabel:!0,name:"lcm_night_mode_ends",placeholder:C.some(({value:e})=>e===O)?void 0:(0,d.oP)({formatMessage:l,minuteOfDay:O,use24HourFormat:x}),translatePlaceholder:!1,options:C,value:O,onChange:N,full:!0})]})})]})})},521376(e,t,n){var i;n.d(t,{U:()=>i}),function(e){e.ARROW_LEFT="ArrowLeft",e.ARROW_RIGHT="ArrowRight",e.ARROW_DOWN="ArrowDown",e.ARROW_UP="ArrowUp",e.ENTER="Enter",e.ESCAPE="Escape",e.BACKSPACE="Backspace",e.DELETE="Delete",e.TAB="Tab"}(i||(i={}))},478961(e,t,n){n.d(t,{A:()=>s});var i=n(274934),o=n(602086);const s=function(e){return t=>n=>{const[s,a]=(0,o.useState)(Object.fromEntries(e.map(e=>[e,!1]))),[r,l]=(0,o.useState)(Object.fromEntries(e.map(e=>[e,!1]))),d=(0,o.useCallback)((e,t)=>{a(n=>({...n,[e]:t}))},[]),m=(0,o.useCallback)((e,t)=>{l(n=>({...n,[e]:t}))},[]),c=!!Object.values(s).find(e=>e),g=!!Object.values(r).find(e=>e);return(0,i.jsx)(t,{isDirty:c,isInvalid:g,formStates:s,setFormDirty:d,setFormInvalid:m,...n})}}},641645(e,t,n){n.d(t,{EJ:()=>d,gy:()=>r,oP:()=>a,pi:()=>s,q8:()=>l,t:()=>o});var i=n(477909);const o=60,s=24,a=({minuteOfDay:e,use24HourFormat:t,formatMessage:n})=>{const i=Math.floor(e/60);return`${String(t?i:i%12||12).padStart(2,"0")}:${String(e%o).padStart(2,"0")}${t?"":` ${n({id:i>=12?"COMMON_PM":"COMMON_AM"})}`}`},r=(e,t,n)=>{const s=Math.max(1,Math.min(60,Math.floor(60/t))),r=Math.floor(60/s);return(0,i.A)(0,24).flatMap(t=>(0,i.A)(s).map(i=>{const s=i*r;return{label:a({use24HourFormat:e,formatMessage:n,minuteOfDay:t*o+s}),value:60*t+ +s}}))},l=e=>6e4*Math.round(e/6e4),d=(e,t)=>{const n=+(e/1e3).toFixed(1),i=+(n/1e3).toFixed(1),o=+(n/6e4).toFixed(1);return n<1e3?`${n} ${t({id:"COMMON_UNIT_MS"})}`:i<60?`${i} ${t({id:"COMMON_UNIT_S"})}`:`${o} ${t({id:"COMMON_UNIT_MIN"})}`}}}]);