"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[66889,89965],{38671:(e,t,n)=>{function a(e){return"object"==typeof e&&!!e&&"apiMsg"in e&&"status"in e}n.d(t,{F:()=>a})},40964:(e,t,n)=>{n.d(t,{A:()=>o});var a=n(349005),o={input:"input__kxWRaesR",uploadButton:"uploadButton__kxWRaesR"};(0,a.A)(".input__kxWRaesR{display:none}.uploadButton__kxWRaesR{-webkit-appearance:none;-moz-appearance:none;appearance:none}")},48925:(e,t,n)=>{n.d(t,{A:()=>A});var a=n(296540),o=n(217439),r=n(71479),i=n(454195),l=n(566723),s=n(968906),E=n(199582),c=n(311785),_=n(766624),m=n(294303),T=n(689965),d=n(242366);const p=(0,r.A)(T.A,(0,c.A)("isOutlined"))`
  border: ${({theme:e,isOutlined:t})=>`1px solid ${t?e.motifPalette.uBlue06:"transparent"}`};
`,A=({children:e,title:t,tooltip:n,tooltipProps:r,[E.L]:c,titleAction:T,isOutlined:A})=>a.createElement(p,{marginBottom:"none",...s.A.addDataTestId(c),isOutlined:A},a.createElement(m.A,{flexDirection:"column",gap:l.Ln,width:"100%",minHeight:i.b},t?a.createElement(m.A,{alignItems:"center",gap:l.YC,justifyContent:"space-between",width:"100%"},a.createElement(m.A,{gap:l.YC,alignItems:"center"},a.createElement(o.A,{variant:"heading-medium"},t),n?a.createElement(_.A,{description:n,portal:!0,...r}):null),T?a.createElement(m.A,null,T):null):null,e?a.createElement(d.A,null,e):null))},79786:(e,t,n)=>{n.d(t,{m:()=>l});var a=n(349785),o=n(296540),r=n(59116),i=n(870893);function l({schema:e,defaultValues:t,presets:n}){const l=(0,o.useMemo)(()=>n?(0,r.A)(n,e=>e.defaultValues):{},[n]),s=(0,o.useMemo)(()=>({...t,...l}),[l,t]),E=(0,a.mN)({resolver:(0,i.u)(e),shouldFocusError:!0,defaultValues:s,shouldUseNativeValidation:!1,mode:"onTouched"}),c=(0,o.useRef)(s);c.current=s;const _=(0,o.useCallback)((...e)=>{const[t,...n]=e;return E.reset(t?{...t,...l}:c.current,...n)},[l,E]);return{...E,reset:_,formState:{...E.formState,isDirty:!!Object.keys(E.formState.dirtyFields).length,isSubmitting:E.formState.isSubmitting},handleSubmit:(...e)=>E.handleSubmit(e[0],(t,...n)=>{const a=Object.keys(t)[0];if(a)try{const e=document.getElementsByName(a)?.[0];e?.scrollIntoView?.({behavior:"smooth",block:"center"}),e?.focus?.({preventScroll:!0})}catch{}e[1]?.(t,...n)})}}},199582:(e,t,n)=>{n.d(t,{L:()=>a});const a="data-testid"},242366:(e,t,n)=>{n.d(t,{A:()=>i});var a=n(296540),o=n(566723),r=n(294303);const i=(0,a.forwardRef)((e,t)=>a.createElement(r.A,{ref:t,flexDirection:"column",gap:o.kc,width:"100%",...e}))},263130:(e,t,n)=>{n.d(t,{A:()=>c});var a=n(296540),o=n(927099),r=n(71479),i=n(998837),l=n(566723),s=n(294303);const E=(0,r.A)(o.A)`
  line-height: 20px;
`,c=({icon:e,description:t,action:n,footer:o,background:r,...c})=>{const _=(0,i.u)().motifPalette.neutral01;return a.createElement(s.A,{flexGrow:1,borderRadius:l.YC,padding:l.kc,background:r||_,gap:l.kc,flexDirection:"column",...c},a.createElement(s.A,{flexGrow:1,gap:l.kc},e,t?a.createElement(E,{size:"body"},t):null,n?a.createElement(s.A,{marginLeft:"auto"},a.createElement(E,{size:"body"},n)):null),o)}},263963:(e,t,n)=>{n.d(t,{L_:()=>c,MS:()=>E,rn:()=>s});var a=n(117958),o=n(215616),r=n(296540),i=n(699784);const l="{::}",s=(e,t)=>`${e}${l}${JSON.stringify(t??{})}`,E=(e,t)=>{if("string"!=typeof t)return;const[n,...a]=t.split(l);if(!n||!a.length)return t;let o={};try{o=Object.fromEntries(Object.entries(JSON.parse(a.join(l))).map(([t,n])=>[t,"string"==typeof n?E(e,n):n]))}catch{0}return e.formatMessage({id:n},o)};function c(){const{formatMessage:e}=(0,i.tz)();return(0,r.useCallback)(t=>E({formatMessage:e},t),[e])}a.pJ((e,t)=>e.message?{message:e.message}:e.code===o.eq.too_small&&"string"===e.type?{message:s("COMMON_MIN_CHARS",{min:Number(e.minimum)})}:e.code===o.eq.too_big&&"string"===e.type?{message:s("COMMON_MAX_CHARS",{name:s("COMMON_VALUE"),max:Number(e.maximum)})}:e.code===o.eq.invalid_type&&"array"===e.expected&&"undefined"===e.received?{message:s("COMMON_SELECT_AT_LEAST_ONE_ITEM")}:e.code===o.eq.too_small&&"array"===e.type?{message:s("COMMON_ADD_AT_LEAST_X_ITEMS",{min:Number(e.minimum)})}:e.code===o.eq.invalid_type&&"undefined"===e.received?{message:s("COMMON_VALIDATION_VALUE_REQUIRED")}:e.code===o.eq.invalid_type&&"number"===e.expected?{message:s("COMMON_VALIDATION_PLEASE_ENTER_A_NUMBER")}:{message:t.defaultError})},284428:(e,t,n)=>{n.d(t,{Im:()=>s,iL:()=>E,mQ:()=>i,pv:()=>r,q:()=>l});var a=n(296540),o=n(451449);function r(){return(0,a.useContext)(o.I)}function i(){return r().fields}function l(){return r().tooltipPopovers}function s(){return r().tooltipIcons}function E(){return r().labels}},305455:(e,t,n)=>{var a,o;n.d(t,{I:()=>o,M:()=>a}),function(e){e.SELF_SIGNED="SELF_SIGNED",e.UPLOAD="UPLOAD"}(a||(a={})),function(e){e.SSL_INSPECTION="sslInspection",e.CONTENT_FILTERING="contentFiltering"}(o||(o={}))},313615:(e,t,n)=>{n.d(t,{A:()=>l});var a=n(296540),o=n(42302),r=n(40964);const i=(0,n(722860).c)(r.A),l=a.forwardRef(function(e,t){const{accept:n,multiple:r=!1,id:l="file-upload",name:s="file-upload",className:E="",inputClassName:c="",onChange:_=o.A,children:m,...T}=e,d=(0,a.useRef)(null),p=t||d;return a.createElement("label",{className:E,tabIndex:0,onKeyDown:e=>{var t;"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),e.stopPropagation(),null===(t=p.current)||void 0===t||t.click())}},a.createElement("input",{type:"file",id:l,name:s,accept:n,multiple:r,ref:p,onChange:e=>_(e,p),className:i.concat(c)("input"),...T}),m)})},329109:(e,t,n)=>{n.d(t,{A:()=>c});var a=n(296540),o=n(691441),r=n(71479),i=n(132196),l=n(373229);const s=(0,r.A)("div")`
  height: 66px;
`,E=i.AH`
  padding: 0px !important;
`,c=({isDirty:e,onFormSubmit:t,onFormCancel:n,isInvalid:r,...i})=>e?a.createElement(o.A,null,a.createElement(l.A,{isDirty:e,onFormCancel:n,onFormSubmit:t,isInvalid:r,className:E,...i})):a.createElement(s,null)},373229:(e,t,n)=>{n.d(t,{A:()=>E});var a=n(296540),o=n(758649),r=n(71479),i=n(566723),l=n(699784);const s=(0,r.A)("footer",{shouldForwardProp:e=>"hasFormResetButton"!==e})`
  display: flex;
  justify-content: ${({hasFormResetButton:e})=>e?"space-between":"flex-end"};
  padding: ${i.S2} ${i.fS};
  gap: ${i.kc};
`,E=({allowCancel:e,isDirty:t,isInvalid:n,isSubmitting:r,onFormSubmit:i,onFormReset:E,onFormCancel:c,className:_,submitButtonText:m,customButton:T,applyButton:d,applyButtonFirst:p,hideCancelButton:A,form:I})=>{const S=(0,a.useMemo)(()=>d||a.createElement(o.A,{name:"submit",variant:"primary",type:"submit",onClick:i,disabled:!t||n||r,form:I},a.createElement(l.sA,{id:m||"COMMON_ACTION_APPLY_CHANGES"})),[d,I,t,n,r,i,m]);return a.createElement(s,{className:_,hasFormResetButton:!!E},p?S:T,A?null:a.createElement(o.A,{name:"cancel",variant:"default",type:"button",onClick:c,disabled:!e&&!t},a.createElement(l.sA,{id:"COMMON_ACTION_CANCEL"})),E?a.createElement(o.A,{name:"reset",variant:"default",type:"button",onClick:E,disabled:!t},a.createElement(l.sA,{id:"COMMON_ACTION_RESET_TO_DEFAULTS"})):null,p?T:S)}},383725:(e,t,n)=>{var a;n.d(t,{b:()=>a}),function(e){e.DASHBOARD_WAN_GRAPH="dashboard-wan-graph",e.DASHBOARD_WIFI_GRAPH="dashboard-wifi-graph",e.DASHBOARD_FLOWS_GRAPH="dashboard-flows-graph",e.DASHBOARD_PANEL_LIVE_ACTIVITY="dashboard-panel-live-activity",e.DASHBOARD_PANEL_SPEED_TEST_ACTIVITY="dashboard-panel-speed-test-activity",e.INTERNET_HEALTH="internet-health",e.ISP_UPTIME="isp-uptime",e.SYSTEM_UPTIME="system-uptime",e.NETWORK_DASHBOARD="network-dashboard",e.DASHBOARD_LOADER="dashboard-loader",e.DASHBOARD_UNIFI_OS_VERSION="dashboard-unifi-os-version",e.DASHBOARD_NETWORK_VERSION="dashboard-network-version",e.HOTSPOT_PORTAL_MINIMIZER="hotspot-portal-minimizer",e.HOTSPOT_PORTAL_SETTINGS_RESTORE_DEFAULT="hotspot-portal-settings-restore-default",e.HOTSPOT_PORTAL_PREVIEW_BACKGROUND="hotspot-portal-preview-background",e.HOTSPOT_PORTAL_PREVIEW_CONTAINER="hotspot-portal-preview-container",e.HOTSPOT_PORTAL_PREVIEW_LOGO="hotspot-portal-preview-logo",e.HOTSPOT_PORTAL_PREVIEW_LANGUAGE="hotspot-portal-preview-language",e.HOTSPOT_PORTAL_PREVIEW_TITLE="hotspot-portal-preview-title",e.HOTSPOT_PORTAL_PREVIEW_WELCOME_TEXT="hotspot-portal-preview-welcome-text",e.HOTSPOT_PORTAL_PREVIEW_AUTHENTICATION_TEXT="hotspot-portal-preview-authentication-text",e.HOTSPOT_PORTAL_PREVIEW_BUTTON_TEXT="hotspot-portal-preview-button-text",e.HOTSPOT_PORTAL_PREVIEW_HOTSPOT_PACKAGES="hotspot-portal-preview-hotspot-packages",e.HOTSPOT_PORTAL_PREVIEW_FACEBOOK="hotspot-portal-preview-facebook",e.HOTSPOT_PORTAL_PREVIEW_VOUCHER="hotspot-portal-preview-voucher",e.HOTSPOT_PORTAL_PREVIEW_PASSWORD="hotspot-portal-preview-password",e.HOTSPOT_PORTAL_PREVIEW_RADIUS="hotspot-portal-preview-radius",e.HOTSPOT_PORTAL_BRANDING_INFORMATION="hotspot-portal-branding-information",e.HOTSPOT_PORTAL_BRANDING_SUCCESS="hotspot-portal-branding-success",e.HOTSPOT_PORTAL_BRANDING_LOGO="hotspot-portal-branding-logo",e.WATCHLIST_TABLE="watchlist-table",e.PROBLEMATIC_CLIENTS_TABLE="problematic-clients-table",e.NETWORK_VERSION="network-version",e.PLAY_PAUSE_BUTTON="play-pause-button",e.CONTROL_PANEL_HEADER="control-panel-header",e.CONTROL_PANEL_HEADER_FILTER_BUTTON="control-panel-header-filter-button",e.HEADER_SIGNOUT_BUTTON="header-signout-button",e.HEADER_USERICON="header_usericon",e.RESTORE_COLUMNS_BUTTON="restore-columns-button",e.WIFI_SECURITY_PROTOCOLS="wifi-security-protocols",e.WIFI_BANDWIDTH_PROFILE="wifi-bandwidth-profile",e.WIFI_PMF_MODE="wifi-pmf-mode",e.WIFI_VLAN_BANDS="wifi-vlan-bands",e.NETWORKCONF_ID="networkconf-id",e.APS_TABLE="aps-table",e.AP_GROUPS_TABLE="ap-groups-table",e.IP_ADDRESS_DROPDOWN="ip-address-dropdown",e.TUNNEL_SUBNET="tunnel-subnet",e.COPY_WIREGUARD_PUBLIC_KEY="copy-wireguard-public-key",e.IPSEC_ESP_LIFETIME_CONTAINER="ipsec-esp-lifetime-container",e.IPSEC_ESP_DH_GROUP_CONTAINER="ipsec-esp-dh-group-container",e.IPSEC_ESP_HASH_CONTAINER="ipsec-esp-hash-container",e.IPSEC_ESP_ENCRYPTION_CONTAINER="ipsec-esp-encryption-container",e.IPSEC_IKE_LIFETIME_CONTAINER="ipsec-ike-lifetime-container",e.IPSEC_IKE_HASH_CONTAINER="ipsec-ike-hash-container",e.IPSEC_IKE_ENCRYPTION_CONTAINER="ipsec-ike-encryption-container",e.EXTRAS_CONTAINER="extras-container",e.TELEPORT_LINK_EXPIRY="teleport-link-expiry",e.TELEPORT_TOKEN_TABLE="teleport-token-table",e.NETWORK_SUBNET_DROPDOWN="network-subnet-dropdown",e.NETWORKS_TABLE="networks-table",e.WS_USERS_TABLE="ws-users-table",e.TOGGLE_DHCP_MANAGEMENT="toggle-dhcp-management",e.DHCP_MODE_DROPDOWN="dhcp-mode-dropdown",e.ADD_NEW_DHCP_OPTION="add-new-dhcp-option",e.TOPOLOGY_FILTER_CONTROL="topology-filter-control",e.TOPOLOGY_ROTATION="topology-rotation",e.SETTINGS_DEVICE_UPDATE_CACHE="settings-device-update-cache",e.SETTINGS_DEVICE_UPDATE_SCHEDULE="settings-device-update-schedule",e.SETTINGS_DEVICE_FIRMWARE="settings-device-firmware",e.SETTINGS_DEVICE_FIRMWARE_RELEASE_CHANNEL="settings-device-firmware-release-channel",e.SETTINGS_EARLY_ACCESS_RELEASE_CHANNELS="settings-early-access-release-channels",e.SETTINGS_NETWORKS_NEW_VIRTUAL_NETWORK="settings-networks-new-virtual-network",e.LOGS_CATEGORY_PICKER="logs-category-picker",e.LOGS_SUBCATEGORY_PICKER="logs-subcategory-picker",e.LOGS_EVENT_PICKER="logs-event-picker",e.LOGS_SETTINGS="logs-settings",e.LOGS_RELOAD="logs-reload",e.PUSH_NOTIFICATIONS_PICKER="push-notifications-picker",e.VIEWER_NETWORK="viewer-network",e.VIEWER_INTERNET="viewer-internet",e.VIEWER_VPN_SERVER="viewer-vpn-server",e.VIEWER_VPN_CLIENT="viewer-vpn-client",e.VIEWER_POLICY_BASED_ROUTING="viewer-policy-based-routing",e.VIEWER_FIREWALL_RULES="viewer-firewall-rules",e.VIEWER_NAT="viewer-nat",e.VIEWER_SITE_TO_SITE_VPN="viewer-site-to-site-vpn",e.VIEWER_WIFI="viewer-wifi",e.CREATE_FIREWALL_ZONE_BUTTON="create-firewall-zone-button",e.CREATE_FIREWALL_POLICY_BUTTON="create-firewall-policy-button",e.FIREWALL_POLICY_ORDER_BUTTON="firewall-policy-order-button",e.POLICY_BASED_ROUTES_DOMAIN="editable-grid-table-wrapper-domains",e.ACL_POLICY_FORM_TYPE="acl-policy-form-type",e.ACL_POLICY_FORM_SOURCE="acl-policy-form-source",e.ACL_POLICY_FORM_ACTION="acl-policy-form-action",e.ACL_POLICY_FORM_DESTINATION="acl-policy-form-destination",e.VIEWER_CONTENT_FILTER="viewer-content-filter",e.CLIENTS_FILTER_FOOTER="clients-filter-footer",e.CLIENTS_FILTER_CONTENT="clients-filter-content",e.VIEWER_ETHERNET_PORTS_PROFILE="viewer-ethernet-ports-profile",e.VIEWER_WAN_SLA="viewer-wan-sla",e.VIEWER_NETWORK_LISTS="viewer-network-lists",e.VIEWER_WIFI_SPEED_LIMIT_PROFILE="viewer-wifi-speed-limit-profile",e.VIEWER_RADIUS_PROFILE="viewer-radius-profile"}(a||(a={}))},451449:(e,t,n)=>{n.d(t,{I:()=>a});const a=(0,n(296540).createContext)({fields:!1,labels:!1,tooltipPopovers:!1,tooltipIcons:!1})},454195:(e,t,n)=>{n.d(t,{b:()=>a});const a=32},470591:(e,t,n)=>{n.d(t,{A:()=>a});const a=(0,n(296540).createContext)({isStandalone:!0,header:[null,()=>{}],footer:[null,()=>{}]})},588915:(e,t,n)=>{n.d(t,{A:()=>c});var a=n(296540),o=n(313615),r=n(40964),i=n(722860),l=n(758649),s=n(273133);const E=(0,i.c)(r.A),c=(0,s.A)(({id:e="file",name:t="file",accept:n,multiple:r=!1,motif:i="light",disabled:s,children:c,onChange:_,className:m,buttonClassName:T,forwardedRef:d,...p})=>a.createElement(o.A,{id:e,name:t,accept:n,multiple:r,onChange:_,className:m,disabled:s},a.createElement(l.A,{component:"span",className:E.concat(T)("uploadButton"),motif:i,ref:d,disabled:s,...p},c)))},689965:(e,t,n)=>{n.d(t,{A:()=>T,I:()=>a});var a,o=n(296540),r=n(822336),i=n(427853),l=n(71479),s=n(825032),E=n(566723),c=n(294303);!function(e){e.ACCORDION="accordion",e.BUTTON_LIST="buttonList"}(a||(a={}));const _=(0,l.A)(c.A,{shouldForwardProp:e=>!["marginBottom","isButtonList","margin","flex","width","padding","nested","background"].includes(e)})`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||r.Ay[n===s.S.DARK?`desktop-color-neutral-${t?"00":"01"}-dark`:`desktop-color-neutral-${t?"01":"00"}-light`]};
  padding: ${({theme:e,isButtonList:t,padding:n})=>n||(t?`0 ${e.spacing["spacing-l"]}`:e.spacing["spacing-l"])};
  margin-bottom: ${({theme:e,marginBottom:t})=>t||e.spacing["spacing-l"]};
  ${({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}})=>r.Ay[`desktop-border-divider-${e}`]};\n      &:last-child {\n        border-bottom: none;\n      }\n    }\n  `:""}
`,m=(0,l.A)(i.A,{shouldForwardProp:e=>!["marginBottom","margin","flex","padding","nested","background"].includes(e)})`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||r.Ay[n===s.S.DARK?`desktop-color-neutral-${t?"00":"01"}-dark`:`desktop-color-neutral-${t?"01":"00"}-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||r.Ay[t===s.S.DARK?"desktop-color-neutral-01-dark":"desktop-color-neutral-00-light"]};
      height: 48px;
      padding: 0 ${E.Ln};
    }
    > div:nth-child(2) {
      margin-bottom: 0;
      padding: 0 ${E.Ln} ${E.Ln};
      > div {
        padding: 0;
      }
    }
  }
`,T=({type:e,marginBottom:t,margin:n,padding:r,flex:i,width:l,nested:s,...E})=>"items"in E?o.createElement(m,{marginBottom:t,margin:n,padding:r,flex:i,nested:s,...E}):o.createElement(_,{nested:s,width:l,marginBottom:t,margin:n,padding:r,flex:i,isButtonList:e===a.BUTTON_LIST,...E},E.children)},691441:(e,t,n)=>{n.d(t,{A:()=>r});var a=n(296540),o=n(470591);function r(e){const{children:t}=e,{isStandalone:n,footer:[,r]}=(0,a.useContext)(o.A);return(0,a.useLayoutEffect)(()=>{if(!n)return r(t),()=>r(null)},[n,t]),a.createElement(a.Fragment,null,n&&t)}},725508:(e,t,n)=>{n.d(t,{A:()=>r});var a=n(296540),o=n(629318);const r=(0,n(51946).w)(e=>(0,a.createElement)("svg",(0,o.d)({viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em"},e),(0,a.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 3a1 1 0 0 1 1-1h7a1 1 0 0 1 .707.293l3 3A1 1 0 0 1 16 6v11a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V3Z",fill:"currentColor",className:e.twotonedclassname}),(0,a.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5 2a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V6a1 1 0 0 0-.293-.707l-3-3A1 1 0 0 0 12 2H5Zm0 15V3h6.999v2a1 1 0 0 0 1 1h2L15 17H5Z",fill:"currentColor",className:e.baseclassname}),(0,a.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.999 2a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V6a1 1 0 0 0-.293-.707l-3-3A1 1 0 0 0 12 2H5Zm10 4.5h-2.5a1 1 0 0 1-1-1V3L15 6.5Z",fill:"currentColor",className:e.fillclassname})))},747280:(e,t,n)=>{n.d(t,{A:()=>r});var a=n(296540),o=n(629318);const r=(0,n(51946).w)(e=>(0,a.createElement)("svg",(0,o.d)({viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em"},e),(0,a.createElement)("rect",{x:5,y:5,width:10,height:12,rx:1,fill:"currentColor",className:e.twotonedclassname}),(0,a.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.5 5V4a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v1h3a.5.5 0 0 1 0 1h-13a.5.5 0 0 1 0-1h3Zm6 0V4h-5v1h5Z",fill:"currentColor",className:e.baseclassname}),(0,a.createElement)("path",{d:"M14 17H6a1 1 0 0 1-1-1V7.5a.5.5 0 0 1 1 0V16h8V7.5a.5.5 0 0 1 1 0V16a1 1 0 0 1-1 1Z",fill:"currentColor",className:e.baseclassname}),(0,a.createElement)("path",{d:"M8 13.5a.5.5 0 0 0 1 0v-4a.5.5 0 0 0-1 0v4Zm3.5.5a.5.5 0 0 1-.5-.5v-4a.5.5 0 0 1 1 0v4a.5.5 0 0 1-.5.5Z",fill:"currentColor",className:e.baseclassname}),(0,a.createElement)("path",{d:"M16.854 5.854A.502.502 0 0 0 16.5 5h-3V4a1 1 0 0 0-1-1h-5a1 1 0 0 0-1 1v1h-3a.502.502 0 0 0-.5.5.5.5 0 0 0 .5.5h13a.502.502 0 0 0 .354-.146Z",fill:"currentColor",className:e.fillclassname}),(0,a.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 7h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1Zm2.5 7a.5.5 0 0 0 .5-.5v-4a.502.502 0 0 0-.5-.5.5.5 0 0 0-.5.5v4a.5.5 0 0 0 .5.5Zm3 0a.5.5 0 0 0 .5-.5v-4a.502.502 0 0 0-.5-.5.5.5 0 0 0-.5.5v4a.5.5 0 0 0 .5.5Z",fill:"currentColor",className:e.fillclassname})))},766624:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(296540),o=n(271856),r=n(709690),i=n(284428),l=n(566723);const s=({description:e,isInteractive:t,portal:n=!0,cursorType:s,title:E,position:c,width:_,iconProps:m,disabled:T=!1})=>{const d=(0,i.Im)()||T,p=(0,i.q)();return a.createElement(o.A,{description:e,portal:n,isInteractive:t,style:{display:"flex",alignItems:"center"},cursorType:s,title:E,position:c,width:_,disableHover:p},a.createElement(r.A,{isActive:!0,size:"original",opacity:d?l.xN:void 0,...m}))}},766889:(e,t,n)=>{n.r(t),n.d(t,{default:()=>U});var a=n(469733),o=n(296540),r=n(742920),i=n(38671),l=n(79786),s=n(845030),E=n(675359),c=n(175165),_=n(329109),m=n(305455),T=n(407814),d=n(263963);const p=T.E$(T.Ik({name:T.Yj({message:(0,d.rn)("SETTINGS_SYSTEM_CTRL_CERTIFICATES_NAME_VALIDATION")}).min(1,{message:(0,d.rn)("SETTINGS_SYSTEM_CTRL_CERTIFICATES_NAME_VALIDATION")}).max(64,{message:(0,d.rn)("SETTINGS_COMMON_FIELD_SHOULD_NOT_EXCEED_MAX_LENGTH",{limit:64,name:(0,d.rn)("COMMON_NAME")})})}),T.KC([T.Ik({type:T.eu(m.M.SELF_SIGNED),commonName:T.Yj().min(1,{message:(0,d.rn)("SETTINGS_SYSTEM_CTRL_CERTIFICATES_COMMON_NAME_VALIDATION")}),alternativeName:T.Yj()}),T.Ik({type:T.eu(m.M.UPLOAD),certificate:T.Yj().min(1,{message:(0,d.rn)("SETTINGS_SYSTEM_CTRL_CERTIFICATES_UPLOAD_CERTIFICATE_VALIDATION")}),private_key:T.Yj().min(1,{message:(0,d.rn)("SETTINGS_SYSTEM_CTRL_CERTIFICATES_UPLOAD_PRIVATE_KEY_VALIDATION")}),certificateFileName:T.Yj().min(1),private_keyFileName:T.Yj().min(1)})]));var A=n(349785),I=n(979106),S=n(217439),u=n(132196),O=n(895424),N=n(566723),R=n(823084),C=n(48925),g=n(242366),f=n(349107),L=n(294303),h=n(699784),v=n(765562),P=n(588915),b=n(758649),D=n(705145),M=n(86838),w=n(747280),F=n(725508),y=n(998837),k=n(258840),G=n(766624);const x=u.AH`
  padding: 0;
`,V=({form:e,name:t,fileNameField:n,label:a,tooltip:r,accept:i})=>{const{motifPalette:{neutral01:l,neutral08:s}}=(0,y.u)(),E=(0,d.L_)();return o.createElement(A.xI,{control:e.control,name:t,render:({field:c,fieldState:_})=>{const m=e.watch(n);return Boolean(c.value&&m)?o.createElement(L.A,{flexDirection:"column",alignItems:"flex-start"},o.createElement(L.A,{borderRadius:N.YC,padding:N.YC,gap:N.kc,width:"100%",background:l,minHeight:N.fS,alignItems:"center"},o.createElement(F.A,{size:"original",variant:"fill",color:s}),o.createElement(D.A,{isTruncated:!0,style:{flex:1},color:"text-2"},m),o.createElement(A.xI,{control:e.control,name:n,render:({field:e})=>o.createElement(b.A,{variant:"inline",onClick:()=>{c.onChange(""),e.onChange("")}},o.createElement(w.A,{size:"original",color:s}))})),_.error?o.createElement(M.A,{isInvalid:!0,label:E(_.error.message)}):null):o.createElement(L.A,{flexDirection:"column",alignItems:"flex-start"},o.createElement(L.A,{minHeight:N.fS,alignItems:"center",gap:N.kc},o.createElement(A.xI,{control:e.control,name:n,render:({field:e})=>o.createElement(P.A,{name:t,variant:"link",accept:i,buttonClassName:u.AH`
                      ${x}
                    `,onChange:async({target:t})=>{const n=t.files?.[0];if(n)try{const t=await(0,k.Gu)(n);e.onChange(n.name),c.onChange(t)}catch(e){}else e.onChange(""),c.onChange("")}},a)}),r?o.createElement(G.A,{description:r,portal:!0}):null),_.error?o.createElement(M.A,{isInvalid:!0,label:E(_.error.message)}):null)}})},B=[{id:m.M.SELF_SIGNED,label:o.createElement(h.sA,{id:"SETTINGS_SYSTEM_CTRL_CERTIFICATES_SELF_SIGNED"})},{id:m.M.UPLOAD,label:o.createElement(h.sA,{id:"COMMON_UPLOAD"})}],H=({form:e,isContentFiltering:t})=>{const n=(0,A.FH)({control:e.control,name:"type"}),{formatMessage:a}=(0,h.tz)(),r=n===m.M.SELF_SIGNED;return o.createElement(C.A,null,o.createElement(L.A,{flexDirection:"column",width:"100%",gap:N.Ln},o.createElement(R.A,null,o.createElement(h.sA,{id:r?t?"SETTINGS_SYSTEM_CTRL_CERTIFICATES_SELF_SIGNED_INFO_CONTENT_FILTERING":"SETTINGS_SYSTEM_CTRL_CERTIFICATES_SELF_SIGNED_INFO":t?"SETTINGS_SYSTEM_CTRL_CERTIFICATES_ADD_NEW_INFO_CONTENT_FILTERING":"SETTINGS_SYSTEM_CTRL_CERTIFICATES_ADD_NEW_INFO",values:{link:o.createElement(f.A,{id:"COMMON_LEARN_MORE",href:v.A.sslInspectionArticle,noWrap:!0})}})),o.createElement(O.A,{control:e.control,name:"name",label:o.createElement(h.sA,{id:"COMMON_NAME"})}),o.createElement(A.xI,{control:e.control,name:"type",render:({field:e})=>o.createElement(I.A,{tabsClassName:u.AH`
                flex: 1;
              `,variant:"capsule",tabs:B,selectedTab:e.value,onSelectTab:({id:t})=>e.onChange(t)})}),n===m.M.SELF_SIGNED?o.createElement(g.A,null,o.createElement(O.A,{control:e.control,name:"commonName",label:o.createElement(h.sA,{id:"SETTINGS_SYSTEM_CTRL_CERTIFICATES_COMMON_NAME"}),tooltip:o.createElement(h.sA,{id:"SETTINGS_SYSTEM_CTRL_CERTIFICATES_COMMON_NAME_TOOLTIP"}),placeholder:a({id:"SETTINGS_SYSTEM_CTRL_CERTIFICATES_COMMON_NAME_PLACEHOLDER"})}),o.createElement(O.A,{control:e.control,name:"alternativeName",label:o.createElement(h.sA,{id:"SETTINGS_SYSTEM_CTRL_CERTIFICATES_ALTERNATIVE_NAME"}),tooltip:o.createElement(h.sA,{id:"SETTINGS_SYSTEM_CTRL_CERTIFICATES_ALTERNATIVE_NAME_TOOLTIP"})}),o.createElement(S.A,{size:"small",color:"text-3"},o.createElement(h.sA,{id:"SETTINGS_SYSTEM_CTRL_CERTIFICATE_EXPIRES_AT"}))):o.createElement(g.A,{alignItems:"flex-start"},o.createElement(V,{form:e,name:"certificate",fileNameField:"certificateFileName",label:o.createElement(h.sA,{id:"SETTINGS_SYSTEM_CTRL_CERTIFICATES_UPLOAD"}),tooltip:o.createElement(h.sA,{id:"SETTINGS_SYSTEM_CTRL_CERTIFICATES_UPLOAD_TOOLTIP"}),accept:".crt,.cer,.ca-bundle,.p7b,.p7c,.p7s,.pem"}),o.createElement(V,{form:e,name:"private_key",fileNameField:"private_keyFileName",label:o.createElement(h.sA,{id:"SETTINGS_SYSTEM_CTRL_CERTIFICATES_UPLOAD_PRIVATE_KEY"}),tooltip:o.createElement(h.sA,{id:"SETTINGS_SYSTEM_CTRL_CERTIFICATES_UPLOAD_PRIVATE_KEY_TOOLTIP"}),accept:".pfx,p12"}))))},W={type:m.M.SELF_SIGNED,name:"",commonName:"",alternativeName:"",certificate:"",private_key:"",certificateFileName:"",private_keyFileName:""},U=({activeItem:e})=>{const t=(0,a.useDispatch)(),n=(0,l.m)({schema:p,defaultValues:W}),T=n.handleSubmit(async e=>{try{await(async e=>{const n=e.type===m.M.SELF_SIGNED?(0,c.pY)({name:e.name,common_name:e.commonName||"",alternative_name:e.alternativeName||""}):(0,c.GX)({name:e.name,certificate:btoa(e.certificate||""),private_key:btoa(e.private_key||"")});return t(n)})(e),t((0,c.d6)()),t((0,s.K5)()),n.reset()}catch(e){const n=(0,i.F)(e)?e:void 0;t((0,E.ox)({type:r.C.danger,message:"SETTINGS_SYSTEM_CTRL_CERTIFICATES_ADD_ERROR",errorMessage:n?.msg}))}});return o.createElement("form",{onSubmit:T,style:{height:"100%"}},o.createElement(H,{form:n,isContentFiltering:e.id===m.I.CONTENT_FILTERING}),o.createElement(_.A,{onFormSubmit:T,onFormCancel:()=>n.reset(),isDirty:n.formState.isDirty,isSubmitting:n.formState.isSubmitting,submitButtonText:"SETTINGS_SYSTEM_CTRL_CERTIFICATE_ADD"}))}},823084:(e,t,n)=>{n.d(t,{A:()=>l});var a=n(296540),o=n(162420),r=n(998837),i=n(263130);const l=({children:e,icon:t,background:n,...l})=>{const{motifPalette:{uBlue06:s}}=(0,r.u)();return a.createElement(i.A,{icon:t||a.createElement(o.A,{variant:"fill",size:"original",color:s}),description:e,background:n,...l})}},895424:(e,t,n)=>{n.d(t,{A:()=>c});var a=n(349785),o=n(296540),r=n(438628),i=n(705145),l=n(566723),s=n(263963),E=n(284428);const c=function({control:e,name:t,label:n,placeholder:c,tooltip:_,tooltipProps:m,autoFocus:T,motif:d,onChange:p,onBlur:A,onAfterChange:I,onPaste:S,onKeyDown:u,passwordToggle:O,type:N,helperMessage:R,autoComplete:C,contentBefore:g,contentAfter:f,onFocus:L,value:h,invalid:v}){const P=(0,E.mQ)(),b=(0,E.Im)(),D=(0,E.q)(),M=(0,s.L_)();return o.createElement(a.xI,{control:e,name:t,render:({field:e,fieldState:s,formState:E})=>o.createElement(r.A,{type:N||(O?"password":"text"),variant:"secondary",width:"100%",autoFocus:T,...e,onChange:t=>{p?p(t,e,E):e.onChange(t),I?.(t)},onBlur:t=>{A?A(t,e,E):e.onBlur()},onFocus:L,onPaste:S,disabled:P,value:h??e.value?.toString(),invalid:v||(s.invalid?o.createElement(i.A,{variant:"inherit",style:{overflowWrap:"break-word"}},M((0,a.Jt)(E.errors,t)?.message)||!0," "):void 0),label:n,placeholder:c,labelTooltip:_,labelTooltipProps:{style:{opacity:b?l.xN:void 0,pointerEvents:D?"none":void 0,...m?.style},...m},motif:d,passwordToggle:O,helperMessage:R,autoComplete:C,onKeyDown:u,contentBefore:g,contentAfter:f})})}},968906:(e,t,n)=>{n.d(t,{A:()=>i});var a=n(383725),o=n(199582);class r{static addDataTestId(e){return{[o.L]:e}}}r.TestId=a.b;const i=r}}]);