"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[72479],{684780(e,t,n){n.d(t,{c:()=>r});const i=/^[A-Za-z0-9+/]{42}[AEIMQUYcgkosw480]=$/;function r(e){return!!e&&i.test(e)}},60143(e,t,n){n.d(t,{U:()=>l});var i=n(222102),r=n(15989),s=n(401042),o=n(360278);const a=(0,r.uh)((0,o.G)()),l=(0,i.Mz)(a,s.kh)},547967(e,t,n){n.d(t,{AC:()=>E,D7:()=>p,Ie:()=>h,JL:()=>u,JX:()=>O,KY:()=>I,O2:()=>A,Op:()=>c,Rm:()=>N,e$:()=>T,t7:()=>m,yr:()=>S});var i=n(179102),r=n(505817),s=n(247816),o=n(409844),a=n(291508),l=n(61322),_=n(309130),d=n(100978);const c=(0,s.A)(d.A,(0,a.A)("inline","wrap"))`
  position: relative;
  flex: ${({inline:e})=>e?"1 1 0":"0 0 100%"};
  align-items: flex-start;
  flex-flow: ${({wrap:e})=>"row "+(e?"wrap":"nowrap")};
  gap: ${_.kc};
`,A=(0,s.A)(d.A,(0,a.A)("editMaxHeight","editFieldWrap"))`
  flex-direction: column;
  max-height: ${({editMaxHeight:e})=>`${e||300}px`};
  overflow-y: auto;
  overflow-x: hidden;
  gap: ${_.YC};

  ${({editFieldWrap:e,theme:{themeName:t}})=>e?`\n    gap: 0;\n\n    > * {\n      border-bottom: ${r.Ay[`desktop-border-divider-${t}`]};\n      padding-bottom: ${_.kc};\n      padding-top: ${_.kc};\n    }\n\n    > *:first-child {\n      padding-top: 0;\n    }\n\n    > *:last-child {\n      border-bottom: none;\n      padding-bottom: 0;\n    }\n  `:""}
`,E=(0,s.A)("div",(0,a.A)("isWindowsTable","rows","tableMaxHeight","marginTop"))`
  width: 100%;
  // windows table inherits height from parent container
  height: ${({rows:e,isWindowsTable:t})=>t&&`${l.I.ROW_HEIGHT*e+l.I.HEADER_HEIGHT}`}px;
  max-height: ${({tableMaxHeight:e})=>e?`${e}px`:"auto"};
  margin-top: ${({marginTop:e})=>e||_.Ln};

  table {
    td {
      max-width: 170px;

      span {
        overflow: hidden;
        text-overflow: ellipsis;
      }
    }
  }
`,p=(0,s.A)(i.A)`
  margin-right: ${_.YC};
`,I=o.AH`
  :first-of-type {
    padding: 0 ${_.fS} 0 0px;
  }
`,N="drag-and-drop-table-row-placeholder",m=(0,s.A)(d.A)`
  flex-direction: column;

  /* Adjust weird padding on the right side for the ID column when right aligned (drag & drop table) */
  table > thead > tr > th:last-of-type {
    padding-right: ${_.kc};
  }

  /* Add missing border between drag and drop groups (tbody elements) */
  table > tbody {
    border-bottom: ${({theme:{themeName:e}})=>r.Ay[`desktop-border-divider-${e}`]};
  }
  /* Last cell in table is hover content which is not used in this table */
  table > tbody[data-rbd-droppable-context-id] td:not(:last-of-type),
  table > thead > tr > th {
    /* Align drag & drop table cell padding to regular table padding */
    padding-right: ${_.kc} !important;
  }
  /* Align drop zone placeholder row when a row is dragged to matched the CSS overrides for drag and drop table we use */
  table .${N} {
    display: flex;
  }
`,u=o.AH`
  /* This is default for the table rows, so we need it for the header. */
  display: flex;
  width: 100%;

  > th:first-child {
    /* Since we flex the header, we must specify this to align with the table rows. */
    width: 24px;
  }
  > th:not(:first-child) {
    /* Something inside UIC sets the padding to 8px for table header and 5px for table rows. This aligns it to make flex work. */
    padding-right: ${_.kc} !important;
  }
`,T=o.AH`
  /* Override the padding-right of the first column to align with manage + drop modes. */
  > th:first-child {
    padding-right: ${_.kc} !important;
  }
  > th:first-child:has(> label) {
    padding-right: 1px !important;
    width: 36px;
  }
`,S=o.AH`
  /* UIC already does this for some table states, like drag and drop and when in manage mode. If we just use this ALWAYS, we're avoiding many issues related to using different alignment techniques in different places. */
  display: flex;
`,O=o.AH`
  tbody {
    display: flex;
    flex-direction: column;
  }
`;function h(e,t){return o.AH`
    width: ${t.width?`${t.width}px`:"auto"};
    min-width: ${t.minWidth?`${t.minWidth}px`:"0px"};
    flex: ${t.growthFactor||0} !important;
    padding-left: ${_.kc} !important;
    padding-right: ${_.kc} !important;
  `}},256468(e,t,n){var i;n.d(t,{EE:()=>s,Uh:()=>i,Vf:()=>r}),function(e){e.SINGLE="single",e.PLURAL="plural"}(i||(i={}));const r="editActive",s=20},469057(e,t,n){n.d(t,{$L:()=>O,$e:()=>a,Bw:()=>I,IS:()=>E,Mr:()=>l,O1:()=>N,SU:()=>r,Wx:()=>T,_h:()=>C,bF:()=>_,do:()=>h,du:()=>i,eI:()=>s,fI:()=>d,g9:()=>m,ir:()=>p,oM:()=>o,ow:()=>u,vY:()=>A,wO:()=>c,x1:()=>S});const i=[{value:10},...n(310758).ob],r=40,s=60,o=24,a=20,l=29,_=14,d=64,c=1419,A=1420,E=1500,p=68,I=540,N=1280,m=65536,u=A-r,T=1360,S=500,O=1220,h=8960,C=190},531984(e,t,n){n.d(t,{w:()=>o});var i=n(602086),r=n(977872),s=n(205521);const o=e=>{const t=(0,r.wA)();(0,i.useEffect)(()=>{t((0,s.SQ)(e))},[t,e])}},762542(e,t,n){n.d(t,{y:()=>r});var i=n(531984);const r=e=>(0,i.w)(e.formState.isDirty)},612389(e,t,n){n.d(t,{A:()=>c});var i=n(274934),r=n(505817),s=n(179102),o=n(247816),a=n(263705),l=n(309130),_=n(100978);const d=(0,o.A)(s.A)`
  line-height: 20px;
`,c=({icon:e,description:t,action:n,footer:s,background:o,...c})=>{const{themeName:A}=(0,a.u)();return(0,i.jsxs)(_.A,{flexGrow:1,borderRadius:l.YC,padding:l.kc,background:o||r.Ay[`desktop-color-neutral-01-${A}`],gap:l.kc,flexDirection:"column",...c,children:[(0,i.jsxs)(_.A,{flexGrow:1,gap:l.kc,children:[e,t?(0,i.jsx)(d,{size:"medium",children:t}):null,n?(0,i.jsx)(_.A,{marginLeft:"auto",children:(0,i.jsx)(d,{size:"medium",children:n})}):null]}),s]})}},330973(e,t,n){n.d(t,{A:()=>_});var i=n(274934),r=n(247368),s=n(470070),o=n(726831),a=n(793442),l=n(612389);const _=({feature:e,isAlternativeTranslation:t})=>(0,i.jsx)(l.A,{icon:(0,i.jsx)(r.A,{size:"original",isActive:!0,variant:"fill"}),description:(0,i.jsx)(s.sA,{id:t?"SETTINGS_LOW_PERFORMANCE_GATEWAY_WARNING_ALTERNATIVE_TEXT":"SETTINGS_LOW_PERFORMANCE_GATEWAY_WARNING",values:{feature:(0,s.tz)().formatMessage({id:e}),link:(0,i.jsx)(a.A,{href:o.A.storeCloudGateways,id:"SETTINGS_CLOUD_GATEWAY"})}})})},753959(e,t,n){n.d(t,{A:()=>l});var i=n(274934),r=n(505817),s=n(247368),o=n(263705),a=n(612389);const l=({children:e,icon:t,background:n,...l})=>{const{themeName:_}=(0,o.u)();return(0,i.jsx)(a.A,{icon:t||(0,i.jsx)(s.A,{variant:"fill",size:"original",color:r.Ay[`desktop-color-ublue-06-${_}`]}),description:e,background:n,...l})}},901389(e,t,n){n.d(t,{A:()=>l});var i=n(274934),r=n(505817),s=n(711950),o=n(263705),a=n(612389);const l=({children:e,...t})=>{const{themeName:n}=(0,o.u)();return(0,i.jsx)(a.A,{icon:(0,i.jsx)(s.A,{variant:"fill",size:"original",color:r.Ay[`desktop-color-orange-06-${n}`]}),description:e,...t})}},465615(e,t,n){n.d(t,{A:()=>s});var i=n(247816),r=n(624258);const s=(0,i.A)(r.A)`
  width: 48px;
  background: none;
  padding: 0;
  > div:first-child {
    display: none;
  }
  span {
    display: none;
  }
`},842758(e,t,n){n.d(t,{A:()=>E});var i=n(274934),r=n(602086),s=n(977872),o=n(890932),a=n(726831);const l={};var _=n(247816),d=n(291508);const c=(0,_.A)("img",(0,d.A)("dimension"))`
  ${({dimension:e=22})=>`\n    height: ${e}px;\n    width: ${e}px;\n  `}
`;var A;!function(e){e.ICON_FILE_NAME="iconFileName",e.DIMENSION="dimension",e.STYLE="style"}(A||(A={}));const E=(0,r.memo)(({[A.ICON_FILE_NAME]:e,[A.DIMENSION]:t,[A.STYLE]:n={}})=>{const _=(0,s.d4)(o.p),d=(0,r.useMemo)(()=>l[e]||encodeURI(`${a.A.dpiPath}${e}`),[e]),E=(0,r.useCallback)(({target:t})=>{l[e]=t.src},[e]),p=(0,r.useCallback)(({currentTarget:e})=>{e.src=`${_}/dpiFallback.svg`},[_]);return(0,i.jsx)(c,{src:d,dimension:t,onLoad:E,onError:p,style:n})})},535322(e,t,n){n.d(t,{A:()=>p,I:()=>i});var i,r=n(274934),s=n(505817),o=n(753583),a=n(247816),l=n(565527),_=n(309130),d=n(100978),c=n(291508);!function(e){e.ACCORDION="accordion",e.BUTTON_LIST="buttonList"}(i||(i={}));const A=(0,a.A)(d.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}`]};
  ${({nested:e,theme:{themeName:t}})=>e?`border: ${s.Ay[`desktop-border-divider-${t}`]};`:""}
  padding: ${({isButtonList:e,padding:t})=>t||(e?`0 ${_.Ln}`:_.Ln)};
  margin-bottom: ${({marginBottom:e})=>e||_.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  `:""}
`,E=(0,a.A)(o.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}`]};
  ${({nested:e,theme:{themeName:t}})=>e?`border: ${s.Ay[`desktop-border-divider-${t}`]};`:""}
  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,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}`]};
      height: 48px;
      padding: 0 ${_.Ln};
    }
    > div:nth-child(2) {
      margin-bottom: 0;
      padding: 0;
      > div {
        padding: 0 ${_.Ln} ${_.Ln};
      }
    }
  }
`,p=({type:e,marginBottom:t,margin:n,padding:s,flex:o,width:a,nested:l,..._})=>"items"in _?(0,r.jsx)(E,{marginBottom:t,margin:n,padding:s,flex:o,nested:l,..._}):(0,r.jsx)(A,{nested:l,width:a,marginBottom:t,margin:n,padding:s,flex:o,isButtonList:e===i.BUTTON_LIST,..._,children:_.children})},883748(e,t,n){n.d(t,{A:()=>A});var i=n(274934),r=n(977872),s=n(566056),o=n(309130),a=n(156007),l=n(100978),_=n(650632),d=n(831433),c=n(34118);const A=({mac:e,enabled:t})=>{const n=(0,r.d4)(c.GB).find(t=>"mac"in t&&t.mac===e)||{};return(0,i.jsx)(s.A,{symbol:(0,i.jsx)(l.A,{maxWidth:20,maxHeight:20,opacity:t?void 0:o.xN,children:(0,i.jsx)(_.A,{client:{mac:e,...n}})}),children:(0,i.jsx)(a.A,{enabled:t,children:(0,d.tn)(n)||e})})}},583821(e,t,n){n.d(t,{A:()=>o});var i=n(274934),r=n(717218),s=n(156007);const o=({domain:e,enabled:t})=>(0,i.jsx)(r.A,{children:(0,i.jsx)(s.A,{color:t?void 0:"disabled",children:e})})},603542(e,t,n){n.d(t,{A:()=>o});var i=n(274934),r=n(717218),s=n(156007);const o=({ip:e,enabled:t})=>(0,i.jsx)(r.A,{children:(0,i.jsx)(s.A,{color:t?void 0:"disabled",children:e})})},185669(e,t,n){n.d(t,{A:()=>d});var i=n(274934),r=n(602086),s=n(717218),o=n(309130),a=n(625796),l=n(156007),_=n(100978);const d=({region:e,enabled:t})=>{const n=(0,r.useMemo)(()=>a.Ay.find(t=>t.value===e),[e]);return n?(0,i.jsx)(s.A,{symbol:(0,i.jsx)(_.A,{width:20,height:20,padding:"2px",opacity:t?1:o.xN,children:n.image()}),children:(0,i.jsx)(l.A,{color:t?void 0:"disabled",children:n.label})}):null}},297640(e,t,n){n.d(t,{A:()=>c});var i=n(274934),r=n(977872),s=n(775250),o=n(309130),a=n(100978),l=n(650632),_=n(831433),d=n(34118);const c=({mac:e})=>{const t=(0,r.d4)(d.GB).find(t=>"mac"in t&&t.mac===e)||{};return(0,i.jsxs)(a.A,{gap:o.kc,alignItems:"center",children:[(0,i.jsx)(a.A,{maxWidth:16,maxHeight:16,children:(0,i.jsx)(l.A,{client:{mac:e,...t}})}),(0,i.jsx)(s.A,{variant:"inherit",isTruncated:!0,children:(0,_.tn)(t||{})||e})]})}},32437(e,t,n){n.d(t,{A:()=>s});var i=n(274934),r=n(775250);const s=({domain:e})=>(0,i.jsx)(r.A,{variant:"inherit",isTruncated:!0,children:e})},968058(e,t,n){n.d(t,{A:()=>s});var i=n(274934),r=n(775250);const s=({ip:e})=>(0,i.jsx)(r.A,{variant:"inherit",isTruncated:!0,children:e})},361693(e,t,n){n.d(t,{A:()=>_});var i=n(274934),r=n(602086),s=n(775250),o=n(309130),a=n(625796),l=n(100978);const _=({region:e})=>{const t=(0,r.useMemo)(()=>a.Ay.find(t=>t.value===e),[e]);return t?(0,i.jsxs)(l.A,{alignItems:"center",gap:o.kc,children:[(0,i.jsx)(l.A,{width:16,height:16,padding:"2px",children:t.image()}),(0,i.jsx)(s.A,{variant:"inherit",isTruncated:!0,children:t.label})]}):null}},880080(e,t,n){n.d(t,{QK:()=>A,_O:()=>c,f9:()=>E,qj:()=>d});var i=n(91206),r=n(138277),s=n(821711),o=n(45651),a=n(230491),l=n(958361),_=n(551173);const d=20,c=[24,8,0,1,6,3,4,5,13,11,7,17],A={0:"COMMON_DPI_CATEGORIES_INSTANT_MESSAGING",1:"COMMON_DPI_CATEGORIES_P2P",3:"COMMON_DPI_CATEGORIES_FILE_TRANSFER",4:"COMMON_DPI_CATEGORIES_STREAMING_MEDIA",5:"COMMON_DPI_CATEGORIES_MAIL_AND_COLLABORATION",6:"COMMON_DPI_CATEGORIES_VOICE_OVER_IP",7:"COMMON_DPI_CATEGORIES_DATABASE",8:"COMMON_DPI_CATEGORIES_GAMES",9:"COMMON_DPI_CATEGORIES_NETWORK_MANAGEMENT",10:"COMMON_DPI_CATEGORIES_REMOTE_ACCESS_TERMINALS",11:"COMMON_DPI_CATEGORIES_BYPASS_PROXIES_AND_TUNNELS",12:"COMMON_DPI_CATEGORIES_STOCK_MARKET",13:"COMMON_DPI_CATEGORIES_WEB",14:"COMMON_DPI_CATEGORIES_SECURITY_UPDATE",15:"COMMON_DPI_CATEGORIES_WEB_IM",17:"COMMON_DPI_CATEGORIES_BUSINESS",23:"COMMON_DPI_CATEGORIES_PRIVATE_PROTOCOL",24:"COMMON_DPI_CATEGORIES_SOCIAL_NETWORK",255:"COMMON_DPI_CATEGORIES_UNKNOWN"},E=(e,t=!1)=>[{label:"COMMON_APP",value:_.Kl.APP,image:o.A},{label:"COMMON_APP_GROUP",value:_.Kl.APP_CATEGORY,image:l.A},{label:"COMMON_DOMAIN_NAME",value:_.Kl.DOMAIN,image:s.A},{label:"COMMON_IP_ADDRESS",value:_.Kl.IP,image:r.A},...e?[{label:"COMMON_REGION",value:_.Kl.REGION,image:a.A}]:[],{label:"COMMON_INTERNET",value:_.Kl.INTERNET,image:s.A},...t?[]:[{label:"COMMON_LOCAL_NETWORK",value:_.Kl.LOCAL_NETWORK,image:i.A}]]},309675(e,t,n){n.d(t,{A:()=>a});var i=n(274934),r=n(505817),s=n(711950),o=n(263705);const a=e=>{const{themeName:t}=(0,o.u)();return(0,i.jsx)(s.A,{size:"original",variant:"fill",color:r.Ay[`desktop-color-orange-06-${t}`],...e})}},737364(e,t,n){n.d(t,{A:()=>A});var i=n(274934),r=n(526744),s=n(309130),o=n(580988),a=n(100978),l=n(470070),_=n(156007),d=n(300626),c=n(174710);const A=({enabled:e,label:t,tooltipItems:n,neverShowListMarkers:A,limit:E=20,seeMoreCallback:p,isInteractive:I,title:N,showMatchOppositeIcon:m,listGap:u,iconProps:T})=>(0,i.jsxs)(a.A,{flex:1,overflow:"hidden",gap:s.YC,children:[m?(0,i.jsx)(o.A,{enabled:e}):null,(0,i.jsx)(d.A,{tooltip:(0,i.jsx)(c.A,{title:N,position:"top",isInteractive:Boolean(p)||I,items:n,showListMarkers:!A,maxItemCount:E,getItemKey:(e,t)=>t,renderItem:e=>e,listGap:u,renderShowMore:p?()=>(0,i.jsx)(r.A,{variant:"inline",onClick:p,children:(0,i.jsx)(l.sA,{id:"COMMON_SEE_MORE"})}):void 0,iconProps:T}),children:t?(0,i.jsx)(_.A,{color:e?"inherit":"disabled",children:t}):null})]})},174710(e,t,n){n.d(t,{A:()=>o});var i=n(274934),r=n(304151),s=n(158498);const o=function({items:e,getItemKey:t,renderItem:n,maxItemCount:o,renderShowMore:a,showListMarkers:l,title:_,position:d,isInteractive:c,cursorType:A,listGap:E,iconProps:p}){return(0,i.jsx)(r.A,{title:_,position:d,isInteractive:c,cursorType:A,description:(0,i.jsx)(s.A,{items:e,getItemKey:t,renderItem:n,maxItemCount:o,listGap:E,renderShowMore:a,showListMarkers:l}),iconProps:p})}},580988(e,t,n){n.d(t,{A:()=>_});var i=n(274934),r=n(548941),s=n(722682),o=n(309130),a=n(100978),l=n(470070);const _=({enabled:e})=>(0,i.jsx)(a.A,{opacity:e?void 0:o.xN,children:(0,i.jsx)(r.A,{description:(0,i.jsx)(l.sA,{id:"COMMON_MATCH_OPPOSITE"}),portal:!0,children:(0,i.jsx)(s.A,{size:"original"})})})},300626(e,t,n){n.d(t,{A:()=>o});var i=n(274934),r=n(309130),s=n(100978);const o=({children:e,tooltip:t})=>(0,i.jsxs)(s.A,{maxWidth:"100%",overflow:"hidden",gap:r.YC,alignItems:"center",children:[e?(0,i.jsx)(s.A,{flex:1,overflow:"hidden",children:e}):null,t]})},384783(e,t,n){n.d(t,{A:()=>o});var i=n(274934),r=n(122616),s=n(826600);const o=({children:e=null,hideModal:t,onRequestClose:n,portalSelector:o=s.J,forwardedRef:a=null,...l})=>(0,i.jsx)(r.A,{isOpen:!0,shouldCloseOnEsc:!0,onRequestClose:n||t,parentSelector:o,ref:a,...l,children:e})},826600(e,t,n){n.d(t,{J:()=>i,g:()=>r});const i=()=>document.getElementById("modal-container"),r=()=>document.getElementById("modal-settings-container")},419582(e,t,n){n.r(t),n.d(t,{default:()=>bn});var i,r,s=n(274934),o=n(602086),a=n(977872),l=n(42220),_=n(121713),d=n(756782),c=n(100978),A=n(581814),E=n(794721),p=n(969288),I=n(762542),N=n(877840),m=n(897166),u=n(553732),T=n(205521),S=n(449339),O=n(309130),h=n(470070),C=n(871808),g=n(95857),x=n(197571),R=n(754924),v=n(330973),f=n(936069),M=n(258978);!function(e){e.OFF="off",e.IP="ip",e.DOMAIN="domain",e.REGION="region"}(i||(i={})),function(e){e.OFF="off",e.DEVICE="device",e.NETWORK="network"}(r||(r={}));var y=n(753959),j=n(502129),b=n(43506);const D=()=>{const e=(0,b.A)(`${p.p7}?${p.Rp}=${p.HJ}`);return(0,s.jsx)(y.A,{children:(0,s.jsx)(h.sA,{id:"SETTINGS_VPN_WIZARD_INFO",values:{policyBasedRouteLink:(0,s.jsx)(j.A,{to:e,children:(0,s.jsx)(h.sA,{id:"COMMON_POLICY_BASED_ROUTE"})})}})})};var L=n(360278),P=n(623568),V=n(556059),G=n(464920),w=n(700444),F=n(159469),U=n(164398),K=n(423564),k=n(742220),W=n(469057),Y=n(115114),$=n(635891);const B=({form:e})=>(0,s.jsx)($.A,{label:(0,s.jsx)(h.sA,{id:"COMMON_NAME"}),control:e.control,name:"name"});var H,z,Q,X,Z=n(325461),J=n(260334),q=n(59564),ee=n(149450),te=n(684780),ne=n(570866);!function(e){e[e.MIN=1]="MIN",e[e.MAX=65535]="MAX"}(H||(H={})),function(e){e.NEUTRAL="neutral06",e.SUCCESS="green06",e.WARNING="red06",e.REQUEST="orange06"}(z||(z={})),function(e){e.CONNECTING_LONGER_THAN_USUAL="CONNECTING_LONGER_THAN_USUAL",e.ROUTE_CONFLICT="ROUTE_CONFLICT",e.ADDRESS_CONFLICT="ADDRESS_CONFLICT",e.AUTHENTICATION_FAILURE="AUTHENTICATION_FAILURE",e.SERVER_REJECT="SERVER_REJECT",e.CONNECTION_FAILURE="CONNECTION_FAILURE",e.BAD_CONFIGURATION="BAD_CONFIGURATION",e.UNEXPECTED_DISCONNECT="UNEXPECTED_DISCONNECT",e.UNKNOWN="UNKNOWN"}(Q||(Q={})),function(e){e.CONFIGURATION_IS_EMPTY="CONFIGURATION_IS_EMPTY",e.MISSING_INTERFACE_SECTION="MISSING_INTERFACE_SECTION",e.MISSING_INTERFACE_PRIVATE_KEY="MISSING_PRIVATE_KEY",e.MISSING_INTERFACE_ADDRESS="MISSING_INTERFACE_ADDRESS",e.INVALID_INTERFACE_ADDRESS_COUNT="INVALID_INTERFACE_ADDRESS_COUNT",e.MISSING_PEER_SECTION="MISSING_PEER_SECTION",e.MISSING_PEER_ENDPOINT="MISSING_PEER_ENDPOINT",e.MISSING_PEER_PUBLIC_KEY="MISSING_PEER_PUBLIC_KEY",e.INVALID_PEER_ENDPOINT="INVALID_PEER_ENDPOINT",e.INVALID_PEER_ENDPOINT_IP_FQDN="INVALID_PEER_ENDPOINT_IP_FQDN",e.INVALID_PEER_ENDPOINT_PORT="INVALID_PEER_ENDPOINT_PORT",e.INVALID_INTERFACE_PRIVATE_KEY="INVALID_PRIVATE_KEY",e.INVALID_PEER_PUBLIC_KEY="INVALID_PUBLIC_KEY",e.INVALID_PEER_PRE_SHARED_KEY="INVALID_PRE_SHARED_KEY",e.INVALID_INTERFACE_DNS="INVALID_DNS",e.INVALID_INTERFACE_ADDRESS="INVALID_ADDRESS",e.NO_ERRORS="NO_ERRORS"}(X||(X={}));var ie=n(199220),re=n(565545),se=n(875762),oe=n(810024),ae=n(640708);const le=/^[\s]*client.*$/m,_e=/^[\s]*tls-client.*$/m,de=/^[\s]*pull.*$/m,ce=/^[\s]*remote.*$/m,Ae=/^\s*\[\s*interface\s*\]/im,Ee=/^\s*\[\s*peer\s*\]/im,pe=/^[A-Za-z0-9+/]{43}=$/,Ie=Z.Ay.object({name:Z.Ay.string(),content:Z.Ay.string()},{message:(0,J.rn)("SETTINGS_VALIDATION_CONFIGURATION_FILE")}),Ne=Z.Ay.object({ip:ee.B,subnet:Z.Ay.coerce.number().min(0).max(32)}),me=Z.Ay.object({ip:ie.XK,subnet:Z.Ay.coerce.number().min(0).max(128)}),ue=Z.Ay.object({ip:Z.Ay.literal("").optional(),subnet:Z.Ay.any()}).optional().transform(()=>{}),Te=Z.Ay.object({ip:Z.Ay.literal("").optional(),subnet:Z.Ay.any()}).optional().transform(()=>{}),Se=Ie.refine(e=>e.content.trim().length>0,{message:(0,J.rn)("SETTINGS_VPN_CLIENT_OVPN_CONFIG_IS_EMPTY")}).refine(e=>le.test(e.content)||_e.test(e.content)&&de.test(e.content),{message:(0,J.rn)("SETTINGS_VPN_CLIENT_OVPN_CONFIG_NOT_CLIENT_CONFIGURATION")}).refine(e=>ce.test(e.content),{message:(0,J.rn)("SETTINGS_VPN_CLIENT_OVPN_CONFIG_MISSING_REMOTE")}),Oe=e=>!!e&&pe.test(e),he=(e,t)=>{const n=t=>(e?ne.vS:ne.fg).test(t),i=e=>e>=H.MIN&&e<=H.MAX;return Ie.refine(e=>e.content.trim().length>0,{message:(0,J.rn)("SETTINGS_VPN_CLIENT_WG_CONFIG_IS_EMPTY")}).refine(e=>Ae.test(e.content),{message:(0,J.rn)("SETTINGS_VPN_CLIENT_WG_CONFIG_MISSING_INTERFACE_SECTION")}).refine(e=>Ee.test(e.content),{message:(0,J.rn)("SETTINGS_VPN_CLIENT_WG_CONFIG_MISSING_PEER_SECTION")}).transform(e=>({...e,parsed:(0,se.G)(e.content)})).refine(e=>!!e.parsed.interface.privateKey,{message:(0,J.rn)("SETTINGS_VPN_CLIENT_WG_CONFIG_MISSING_PRIVATE_KEY")}).refine(e=>Oe(e.parsed.interface.privateKey),{message:(0,J.rn)("SETTINGS_VPN_CLIENT_WG_CONFIG_INVALID_INTERFACE_PRIVATE_KEY")}).refine(t=>t.parsed.interface.dns.some(t=>(e?ne.BY:ne.zF).test(t)),{message:(0,J.rn)(e?"SETTINGS_VPN_CLIENT_WG_CONFIG_INVALID_INTERFACE_DNS_IPV6":"SETTINGS_VPN_CLIENT_WG_CONFIG_INVALID_INTERFACE_DNS")}).refine(t=>t.parsed.interface.address.some(t=>e||t.version===re.k.v4),{message:(0,J.rn)("SETTINGS_VPN_CLIENT_WG_CONFIG_MISSING_INTERFACE_ADDRESS")}).refine(t=>t.parsed.interface.address.filter(t=>e||t.version===re.k.v4).every(t=>(e?ne.U_:ne.wK).test(`${t.ip}/${t.subnet}`)),{message:(0,J.rn)(e?"SETTINGS_VPN_CLIENT_WG_CONFIG_INVALID_INTERFACE_ADDRESS_IPV6":"SETTINGS_VPN_CLIENT_WG_CONFIG_INVALID_INTERFACE_ADDRESS")}).refine(t=>{const n=t.parsed.interface.address.filter(t=>e||t.version===re.k.v4);if(e){const e=n.filter(e=>ne.wK.test(`${e.ip}/${e.subnet}`)).length,t=n.filter(e=>ne.QD.test(`${e.ip}/${e.subnet}`)).length;return n.length<=2&&e<=1&&t<=1}return n.length<=1},{message:(0,J.rn)(e?"SETTINGS_VPN_CLIENT_WG_CONFIG_INVALID_INTERFACE_ADDRESS_COUNT":"SETTINGS_VPN_CLIENT_WG_CONFIG_INVALID_INTERFACE_ADDRESS")}).refine(e=>!!e.parsed.peer.endpoint?.address,{message:(0,J.rn)(e?"SETTINGS_VPN_CLIENT_WG_CONFIG_MISSING_PEER_ENDPOINT_IPV6":"SETTINGS_VPN_CLIENT_WG_CONFIG_MISSING_PEER_ENDPOINT")}).refine(e=>{const t=e.parsed.peer.endpoint;return!t||n(t.address)||i(t.port)},{message:(0,J.rn)(e?"SETTINGS_VPN_CLIENT_WG_CONFIG_INVALID_PEER_ENDPOINT_IPV6":"SETTINGS_VPN_CLIENT_WG_CONFIG_INVALID_PEER_ENDPOINT")}).refine(e=>{const t=e.parsed.peer.endpoint;return!t||n(t.address)},{message:(0,J.rn)(e?"SETTINGS_VPN_CLIENT_WG_CONFIG_INVALID_PEER_ENDPOINT_IPV6":"SETTINGS_VPN_CLIENT_WG_CONFIG_INVALID_PEER_ENDPOINT")}).refine(e=>{const t=e.parsed.peer.endpoint;return!t||i(t.port)},{message:(0,J.rn)(e?"SETTINGS_VPN_CLIENT_WG_CONFIG_INVALID_PEER_ENDPOINT_PORT_IPV6":"SETTINGS_VPN_CLIENT_WG_CONFIG_INVALID_PEER_ENDPOINT_PORT")}).refine(e=>!!e.parsed.peer.publicKey,{message:(0,J.rn)("SETTINGS_VPN_CLIENT_WG_CONFIG_MISSING_PEER_PUBLIC_KEY")}).refine(e=>Oe(e.parsed.peer.publicKey),{message:(0,J.rn)("SETTINGS_VPN_CLIENT_WG_CONFIG_INVALID_PEER_PUBLIC_KEY")}).refine(e=>{const t=e.parsed.peer.preSharedKey;return!t||Oe(t)},{message:(0,J.rn)("SETTINGS_VPN_CLIENT_WG_CONFIG_INVALID_PEER_PRE_SHARED_KEY")}).superRefine((e,n)=>{const i=e.parsed.interface.address.find(e=>e.version===re.k.v4),r=i?`${i.ip}/${i.subnet}`:void 0;if(r){const e=t.find(e=>e.ip_subnet&&(0,oe.MD)(e.ip_subnet,r));e&&n.addIssue({code:Z.Ay.ZodIssueCode.custom,message:(0,J.rn)("SETTINGS_VPN_CLIENT_TUNNEL_SUBNET_OVERLAP",{name:e.name})})}}).superRefine((e,n)=>{const i=e.parsed.interface.address.find(e=>e.version===re.k.v6),r=i?`${i.ip}/${i.subnet}`:void 0;if(r){const e=t.find(e=>e.ipv6_subnet&&(0,ae.$G)(e.ipv6_subnet,r));e&&n.addIssue({code:Z.Ay.ZodIssueCode.custom,message:(0,J.rn)("SETTINGS_VPN_CLIENT_TUNNEL_SUBNET_OVERLAP",{name:e.name})})}}).transform(({parsed:e,...t})=>({...t}))},Ce=(e,t=[])=>Z.Ay.object({name:Z.Ay.string().min(1).max(64),device_wizard:Z.Ay.union([Z.Ay.object({type:Z.Ay.literal(r.OFF)}),Z.Ay.object({type:Z.Ay.literal(r.NETWORK),networks:Z.Ay.array(Z.Ay.string(),{message:(0,J.rn)("COMMON_VALIDATION_NETWORK")}).min(1,(0,J.rn)("COMMON_VALIDATION_NETWORK"))}),Z.Ay.object({type:Z.Ay.literal(r.DEVICE),devices:Z.Ay.array(Z.Ay.string(),{message:(0,J.rn)("SETTINGS_COMMON_DEVICE_REQUIRED")}).min(1,(0,J.rn)("SETTINGS_COMMON_DEVICE_REQUIRED"))})]),content_wizard:Z.Ay.union([Z.Ay.object({type:Z.Ay.literal(i.OFF)}),Z.Ay.object({type:Z.Ay.literal(i.IP),ips:Z.Ay.array(Z.Ay.custom(),{message:(0,J.rn)("SETTINGS_VALIDATION_ADD_AT_LEAST_ONE",{target:(0,J.rn)("COMMON_IP")})}).min(1,(0,J.rn)("SETTINGS_VALIDATION_ADD_AT_LEAST_ONE",{target:(0,J.rn)("COMMON_IP")}))}),Z.Ay.object({type:Z.Ay.literal(i.DOMAIN),domains:Z.Ay.array(Z.Ay.string(),{message:(0,J.rn)("SETTINGS_ROUTING_QOS_DOMAINS_VALIDATION")}).min(1,(0,J.rn)("SETTINGS_ROUTING_QOS_DOMAINS_VALIDATION"))}),Z.Ay.object({type:Z.Ay.literal(i.REGION),regions:Z.Ay.array(Z.Ay.string(),{message:(0,J.rn)("SETTINGS_COMMON_REGION_REQUIRED")}).min(1,(0,J.rn)("SETTINGS_COMMON_REGION_REQUIRED"))})]),wizard_kill_switch_enabled:Z.Ay.boolean().optional(),mtu:Z.Ay.union([Z.Ay.object({type:Z.Ay.literal("auto")}),Z.Ay.object({type:Z.Ay.literal("custom"),value:Z.Ay.number().int().min(W.ir).max(W.g9)})]),mss_clamp:Z.Ay.union([Z.Ay.object({type:Z.Ay.literal(A.dY.AUTO)}),Z.Ay.object({type:Z.Ay.literal(A.dY.OFF)}),Z.Ay.object({type:Z.Ay.literal(A.dY.CUSTOM),value:Z.Ay.number().int().min(W.x1).max(W.do)})]),mss_clamp_ipv6:Z.Ay.union([Z.Ay.object({type:Z.Ay.literal(A.dY.AUTO)}),Z.Ay.object({type:Z.Ay.literal(A.dY.OFF)}),Z.Ay.object({type:Z.Ay.literal(A.dY.CUSTOM),value:Z.Ay.number().int().min(W.$L).max(W.do)})])}).and(Z.Ay.union([Z.Ay.object({vpn_type:Z.Ay.literal(E.E.OPENVPN_CLIENT),openvpn_configuration_file:Se,openvpn_username:Z.Ay.string().min(1,(0,J.rn)("COMMON_VALIDATION_REQUIRED",{name:(0,J.rn)("COMMON_LABEL_USERNAME")})),openvpn_password:Z.Ay.string().min(1,(0,J.rn)("COMMON_VALIDATION_REQUIRED",{name:(0,J.rn)("COMMON_PASSWORD")}))}),Z.Ay.intersection(Z.Ay.object({vpn_type:Z.Ay.literal(E.E.WIREGUARD_CLIENT)}),Z.Ay.union([Z.Ay.object({setup_mode:Z.Ay.literal(A.hS.FILE),wireguard_configuration_file:he(e,t)}),Z.Ay.object({setup_mode:Z.Ay.literal(A.hS.MANUAL),dhcpd_dns_1:e?q.Z:ee.B,dhcpd_dns_2:(e?q.Z:ee.B).or(Z.Ay.literal("")).optional().transform(e=>e||void 0),wireguard_private_key:Z.Ay.string({message:(0,J.rn)("SETTINGS_NETWORKS_FORM_VPN_CLIENT_PRIVATE_PUBLIC_KEYS_VALIDATION")}).refine(te.c,{message:(0,J.rn)("SETTINGS_NETWORKS_FORM_VPN_CLIENT_PRIVATE_PUBLIC_KEYS_VALIDATION")}),wireguard_public_key:Z.Ay.string(),wireguard_client_peer_ip:Z.Ay.string({message:(0,J.rn)(e?"SETTINGS_NETWORKS_FORM_VPN_CLIENT_SERVER_ADDRESS_VALIDATION_IPV6":"SETTINGS_NETWORKS_FORM_VPN_CLIENT_SERVER_ADDRESS_VALIDATION")}).regex(e?ne.L3:ne.vz,{message:(0,J.rn)(e?"SETTINGS_NETWORKS_FORM_VPN_CLIENT_SERVER_ADDRESS_VALIDATION_IPV6":"SETTINGS_NETWORKS_FORM_VPN_CLIENT_SERVER_ADDRESS_VALIDATION")}),wireguard_client_peer_port:Z.Ay.coerce.number({message:(0,J.rn)("SETTINGS_COMMON_PORT_VALIDATION")}).min(H.MIN,{message:(0,J.rn)("SETTINGS_COMMON_PORT_VALIDATION")}).max(H.MAX,{message:(0,J.rn)("SETTINGS_COMMON_PORT_VALIDATION")}),wireguard_client_peer_public_key:Z.Ay.string({message:(0,J.rn)("SETTINGS_NETWORKS_FORM_VPN_CLIENT_KEY_VALIDATION")}).refine(te.c,{message:(0,J.rn)("SETTINGS_NETWORKS_FORM_VPN_CLIENT_KEY_VALIDATION")}),wireguard_client_preshared_key:Z.Ay.union([Z.Ay.object({enabled:Z.Ay.literal(!1)}),Z.Ay.object({enabled:Z.Ay.literal(!0),value:Z.Ay.string({message:(0,J.rn)("SETTINGS_NETWORKS_FORM_VPN_CLIENT_KEY_VALIDATION")}).refine(te.c,{message:(0,J.rn)("SETTINGS_NETWORKS_FORM_VPN_CLIENT_KEY_VALIDATION")})})])}).and(e?Z.Ay.object({ip_subnet:Ne.or(ue),ipv6_subnet:me.or(Te)}).refine(e=>e.ip_subnet||e.ipv6_subnet,{path:["ip_subnet","ip"],message:(0,J.rn)("COMMON_VALIDATION_VALID_IPV4")}):Z.Ay.object({ip_subnet:Ne})).superRefine((e,n)=>{const i="ip_subnet"in e&&e.ip_subnet?`${e.ip_subnet.ip}/${e.ip_subnet.subnet}`:void 0;if(i){const e=t.find(e=>e.ip_subnet&&(0,oe.MD)(e.ip_subnet,i));e&&n.addIssue({code:Z.Ay.ZodIssueCode.custom,message:(0,J.rn)("SETTINGS_VPN_CLIENT_TUNNEL_SUBNET_OVERLAP",{name:e.name}),path:["ip_subnet","ip"]})}}).superRefine((e,n)=>{const i="ipv6_subnet"in e&&e.ipv6_subnet?`${e.ipv6_subnet.ip}/${e.ipv6_subnet.subnet}`:void 0;if(i){const e=t.find(e=>e.ipv6_subnet&&(0,ae.$G)(e.ipv6_subnet,i));e&&n.addIssue({code:Z.Ay.ZodIssueCode.custom,message:(0,J.rn)("SETTINGS_VPN_CLIENT_TUNNEL_SUBNET_OVERLAP",{name:e.name}),path:["ipv6_subnet","ip"]})}})]))])).superRefine((e,t)=>{"custom"===e.mtu.type&&(e.mtu.value<W.Bw&&(e.mss_clamp.type===A.dY.CUSTOM||e.mss_clamp.type===A.dY.AUTO)&&t.addIssue({code:Z.Ay.ZodIssueCode.custom,message:(0,J.rn)("SETTINGS_NETWORKS_FORM_FIELD_MTU_MIN_MSS_VALIDATION",{minMtu:W.Bw}),path:["mtu","value"]}),e.mss_clamp.type===A.dY.CUSTOM&&e.mss_clamp.value>e.mtu.value-W.SU&&t.addIssue({code:Z.Ay.ZodIssueCode.custom,message:(0,J.rn)("SETTINGS_NETWORKS_FORM_FIELD_MTU_MSS_VALIDATION_MAX",{maxMss:e.mtu.value-W.SU}),path:["mss_clamp","value"]}))}).superRefine((e,t)=>{"custom"===e.mtu.type&&e.mss_clamp_ipv6.type===A.dY.CUSTOM&&e.mss_clamp_ipv6.value>e.mtu.value-W.eI&&t.addIssue({code:Z.Ay.ZodIssueCode.custom,message:(0,J.rn)("SETTINGS_NETWORKS_FORM_FIELD_MTU_MSS_VALIDATION_MAX",{maxMss:e.mtu.value-W.eI}),path:["mss_clamp_ipv6","value"]})});var ge=n(213981);const xe=(e,t,n)=>{switch(e){case E.E.WIREGUARD_CLIENT:{const e=t.filter(({vpn_type:e})=>e===E.E.WIREGUARD_CLIENT).length;return n({id:"SETTINGS_NETWORKS_VPN_CLIENT_NAME"},{vpnClient:A.PG.WIREGUARD,clientsCount:e>0?e+1:1})}case E.E.OPENVPN_CLIENT:{const e=t.filter(({vpn_type:e})=>e===E.E.OPENVPN_CLIENT).length;return n({id:"SETTINGS_NETWORKS_VPN_CLIENT_NAME"},{vpnClient:A.PG.OPENVPN,clientsCount:e>0?e+1:1})}default:return n({id:"SETTINGS_NETWORKS_VPN_CLIENT_NAME"},{vpnClient:"",clientsCount:null})}},Re=(e,t,n,s,o)=>{const a=e?.vpn_type===E.E.WIREGUARD_CLIENT||e?.vpn_type===E.E.OPENVPN_CLIENT?e.vpn_type:t?E.E.WIREGUARD_CLIENT:E.E.OPENVPN_CLIENT,l=(0,ge.yi)(e?.x_wireguard_private_key);return{vpn_type:a,name:e?.name||(e?"":xe(a,s,o)),ip_subnet:{ip:e?.ip_subnet?e.ip_subnet.split("/")[0]:"",subnet:Number(e?.ip_subnet?.split("/")[1]||k.NS)},ipv6_subnet:{ip:e?.ipv6_subnet?e.ipv6_subnet.split("/")[0]:"",subnet:Number(e?.ipv6_subnet?.split("/")[1]||k.Vd)},dhcpd_dns_1:e?.dhcpd_dns_1||"",dhcpd_dns_2:e?.dhcpd_dns_2||"",openvpn_configuration_file:e?.openvpn_configuration?{content:e.openvpn_configuration,name:e?.openvpn_configuration_filename||"config.ovpn"}:void 0,openvpn_password:e?.x_openvpn_password||"",openvpn_username:e?.openvpn_username||"",setup_mode:e?.wireguard_client_mode??A.hS.FILE,wireguard_configuration_file:e?.wireguard_client_configuration_file?{content:e.wireguard_client_configuration_file,name:e?.wireguard_client_configuration_filename||"config.conf"}:void 0,wireguard_private_key:e?.x_wireguard_private_key||l.privateKey,wireguard_public_key:e?.wireguard_public_key||l.publicKey,wireguard_client_preshared_key:{enabled:!!e?.wireguard_client_preshared_key_enabled,value:e?.wireguard_client_preshared_key||""},wireguard_client_peer_ip:e?.wireguard_client_peer_ip||"",wireguard_client_peer_port:e?.wireguard_client_peer_port||51821,wireguard_client_peer_public_key:e?.wireguard_client_peer_public_key||"",device_wizard:{type:r.OFF,networks:[],devices:[]},content_wizard:{type:i.OFF,regions:[],domains:[],ips:[]},wizard_kill_switch_enabled:n,mtu:{type:e?.interface_mtu_enabled?"custom":"auto",value:e?.interface_mtu??W.vY},mss_clamp:{type:e?.mss_clamp??A.dY.AUTO,value:e?.mss_clamp_mss??W.ow},mss_clamp_ipv6:{type:e?.mss_clamp_ipv6??A.dY.AUTO,value:e?.mss_clamp_mss_ipv6??W.Wx}}};var ve=n(597750),fe=n(164487),Me=n(787481),ye=n(482609),je=n(846294);const be={[E.E.OPENVPN_CLIENT]:"COMMON_OPEN_VPN",[E.E.WIREGUARD_CLIENT]:"COMMON_WIREGUARD"},De=({form:e,existingRecord:t})=>{const{formatMessage:n}=(0,h.tz)(),i=(0,a.d4)(x.Ct),r=(0,C.A)(g.Xj.WIREGUARD_VPN_CLIENT),_=(0,o.useMemo)(()=>[...r?[E.E.WIREGUARD_CLIENT]:[],E.E.OPENVPN_CLIENT],[r]),d=(0,l.FH)({control:e.control,name:"vpn_type"});return(0,s.jsx)(ve.A,{label:(0,s.jsx)(fe.A,{children:(0,s.jsx)(h.sA,{id:"COMMON_TYPE"})}),children:(0,s.jsx)(Me.A,{children:_.map(r=>(0,s.jsx)(je.A,{reason:t&&d!==r?(0,s.jsx)(h.sA,{id:"SETTINGS_VPN_CLIENT_CANNOT_CHANGE_TYPE"}):void 0,children:(0,s.jsx)(ye.A,{control:e.control,name:"vpn_type",value:r,onCheck:()=>{t||e.getFieldState("name")?.isDirty||e.setValue("name",xe(r,i,n))},children:(0,s.jsx)(h.sA,{id:be[r]})})},r))})})},Le=({form:e})=>(0,s.jsx)(ve.A,{label:(0,s.jsx)(fe.A,{children:(0,s.jsx)(h.sA,{id:"SETTINGS_VPN_CLIENT_SETUP"})}),children:(0,s.jsxs)(Me.A,{children:[(0,s.jsx)(ye.A,{name:"setup_mode",control:e.control,value:A.hS.FILE,children:(0,s.jsx)(h.sA,{id:"COMMON_FILE"})}),(0,s.jsx)(ye.A,{name:"setup_mode",control:e.control,value:A.hS.MANUAL,children:(0,s.jsx)(h.sA,{id:"COMMON_MANUAL"})})]})});var Pe=n(266824),Ve=n(179102),Ge=n(775250),we=n(392452),Fe=n(247816),Ue=n(494824),Ke=n(663723),ke=n(399935),We=n(833466),Ye=n(304151),$e=n(296261),Be=n(901389),He=n(793442),ze=n(726831),Qe=n(541496),Xe=n(204832);const Ze=e=>e.length>0,Je=({form:e})=>{const t=(0,l.FH)({control:e.control,name:"openvpn_configuration_file"}),n=(0,l.FH)({control:e.control,name:"vpn_type"}),i=(0,o.useMemo)(()=>n===E.E.OPENVPN_CLIENT?((e,t)=>{const{certificate_ca:n,certificate_cert:i,vpnKey:r,privateKey:s,encryptedPrivateKey:o}=(0,Xe.y)(e),a=Ze(n),l=Ze(i)&&a,_=k.tZ.test(s),d=(e=>k.cU.test(e))(r);return t&&e?n||r?o?Qe.T7.HAS_ENCRYPTED_PRIVATE_KEY:!n||r||s||i?r&&n&&!s&&!i?a?d?Qe.T7.NO_ERRORS:Qe.T7.INVALID_STATIC_KEY:Qe.T7.INVALID_CERTFICATE:s&&n&&i&&!r?l?_?Qe.T7.NO_ERRORS:Qe.T7.INVALID_PRIVATE_KEY:Qe.T7.INVALID_CERTFICATE:n&&i&&r&&s?l?d?_?Qe.T7.NO_ERRORS:Qe.T7.INVALID_PRIVATE_KEY:Qe.T7.INVALID_STATIC_KEY:Qe.T7.INVALID_CERTFICATE:l?_?Qe.T7.NO_ERRORS:Qe.T7.INVALID_PRIVATE_KEY:Qe.T7.INVALID_CERTFICATE:a?Qe.T7.NO_ERRORS:Qe.T7.INVALID_CERTFICATE:Qe.T7.MISSING_KEYS:Qe.T7.NO_ERRORS})(t?.content,t?.name):Qe.T7.NO_ERRORS,[t,n]);return i===Qe.T7.NO_ERRORS?null:(0,s.jsx)(Be.A,{children:(0,s.jsx)(h.sA,{id:k.xH[i],values:{link:(0,s.jsx)(He.A,{href:ze.A.openVpnClientSetupGuide,id:"COMMON_LEARN_MORE",noWrap:!0})}})})},qe=(0,Fe.A)(we.A)`
  max-width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
`,et=/^MTU\s*=\s*(\d+)/m,tt=({form:e})=>{const t=(0,l.FH)({control:e.control,name:"vpn_type"}),n=(0,J.L_)(),i=(0,l.as)({control:e.control,name:t===E.E.WIREGUARD_CLIENT?"wireguard_configuration_file":"openvpn_configuration_file"}),r=(0,o.useCallback)(async(t,n)=>{const r=n&&"current"in n?n.current?.files?.[0]:void 0;if(r){const t=await(0,$e.Gu)(r),n=(e=>{try{if(!e)return;const t=e.toString().match(et);if(t&&t.length>=2){const e=Number(t[1]);if(Number.isFinite(e))return e}return}catch{return}})(t);i.field.onChange({name:r.name,content:t}),n&&e.setValue("mtu",{type:"custom",value:n})}},[i.field,e]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(ve.A,{children:[(0,s.jsxs)(c.A,{height:We.b,alignItems:"center",maxWidth:"100%",overflow:"hidden",gap:O.YC,children:[(0,s.jsx)(c.A,{overflow:"hidden",children:(0,s.jsx)(qe,{accept:t===E.E.WIREGUARD_CLIENT?k.MG:k.Ex,onClick:e=>{e.currentTarget.value=""},onChange:r,children:(0,s.jsx)(Pe.A,{fontSize:"medium",style:{maxWidth:"100%"},onClick:e=>e.currentTarget.parentNode?.parentNode?.childNodes[0]?.click(),children:(0,s.jsxs)(c.A,{alignItems:"center",gap:O.YC,maxWidth:"100%",overflow:"hidden",children:[(0,s.jsx)(i.field.value?Ue.A:Ke.A,{size:"original",isActive:!0}),(0,s.jsx)(Ge.A,{isTruncated:!0,variant:"inherit",children:i.field.value?i.field.value.name:(0,s.jsx)(h.sA,{id:"SETTINGS_UPLOAD_CONFIGURATION_FILE"})})]})})})}),(0,s.jsx)(Ye.A,{description:(0,s.jsx)(c.A,{flexDirection:"column",gap:O.kc,children:(0,s.jsxs)(s.Fragment,t===E.E.OPENVPN_CLIENT?{children:[(0,s.jsx)(Ve.A,{variant:"inherit",children:(0,s.jsx)(h.sA,{id:"SETTINGS_VPN_CLIENT_OPENVPN_CONFIGURATION_FILE_DESC"})}),(0,s.jsx)(Ve.A,{variant:"inherit",children:(0,s.jsx)(h.sA,{id:"SETTINGS_VPN_CLIENT_OPENVPN_CONFIGURATION_FILE_DESC_PART_TWO"})})]}:{children:[(0,s.jsx)(Ve.A,{variant:"inherit",children:(0,s.jsx)(h.sA,{id:"SETTINGS_VPN_CLIENT_WIREGUARD_CONFIGURATION_FILE_DESC"})}),(0,s.jsx)(Ve.A,{variant:"inherit",children:(0,s.jsx)(h.sA,{id:"SETTINGS_VPN_CLIENT_WIREGUARD_CONFIGURATION_FILE_DESC_PART_TWO"})})]})})})]}),i.fieldState.error?.message?(0,s.jsx)(ke.A,{isInvalid:!0,label:n(i.fieldState.error.message)}):void 0]}),(0,s.jsx)(Je,{form:e})]})};var nt=n(831433),it=n(34118),rt=n(656647),st=n(46497),ot=n(650632);const at={[r.OFF]:"COMMON_OFF",[r.DEVICE]:"COMMON_DEVICE",[r.NETWORK]:"COMMON_NETWORK"},lt=[r.OFF,r.DEVICE,r.NETWORK],_t=({form:e})=>{const t=(0,a.d4)(x.Ct),n=(0,a.d4)(it.GB),i=(0,o.useMemo)(()=>t.filter(U.mH).map(e=>({type:"CHECKBOX",id:e._id,title:e.name,children:[],checkboxProps:{data:(0,K.mC)(e)}})),[t]),_=(0,o.useMemo)(()=>n.flatMap(e=>"mac"in e?[{type:"CHECKBOX",id:e.mac,title:(0,nt.tn)(e)||e.mac,children:[],checkboxProps:{data:(0,s.jsx)(st.A,{mac:e.mac}),symbol:(0,s.jsx)(c.A,{maxWidth:20,maxHeight:20,children:(0,s.jsx)(ot.A,{client:e})})}}]:[]),[n]),d=(0,l.FH)({control:e.control,name:"device_wizard.type"});return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(ve.A,{label:(0,s.jsx)(fe.A,{tooltip:(0,s.jsx)(h.sA,{id:"SETTINGS_VPN_DEVICE_WIZARD_TOOLTIP"}),children:(0,s.jsx)(h.sA,{id:"SETTINGS_VPN_DEVICE_WIZARD"})}),children:(0,s.jsx)(Me.A,{children:lt.map(t=>(0,s.jsx)(ye.A,{control:e.control,name:"device_wizard.type",value:t,children:(0,s.jsx)(h.sA,{id:at[t]})},t))})}),d===r.DEVICE?(0,s.jsx)(rt.A,{control:e.control,name:"device_wizard.devices",options:_,isVirtualized:!0}):null,d===r.NETWORK?(0,s.jsx)(rt.A,{control:e.control,name:"device_wizard.networks",options:i}):null]})};var dt=n(858098),ct=n(198301),At=n(598890);const Et={[i.OFF]:"COMMON_OFF",[i.IP]:"COMMON_IP",[i.DOMAIN]:"COMMON_DOMAIN",[i.REGION]:"COMMON_REGION"},pt=[i.OFF,i.DOMAIN,i.IP,i.REGION],It=({form:e})=>{const{formatMessage:t}=(0,h.tz)(),n=(0,l.FH)({control:e.control,name:"content_wizard.type"}),r=(0,J.L_)();return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(ve.A,{label:(0,s.jsx)(fe.A,{tooltip:(0,s.jsx)(h.sA,{id:"SETTINGS_VPN_CONTENT_WIZARD_TOOLTIP"}),children:(0,s.jsx)(h.sA,{id:"SETTINGS_VPN_CONTENT_WIZARD"})}),children:(0,s.jsx)(Me.A,{children:pt.map(t=>(0,s.jsx)(ye.A,{control:e.control,name:"content_wizard.type",value:t,children:(0,s.jsx)(h.sA,{id:Et[t]})},t))})}),n===i.DOMAIN?(0,s.jsx)(dt.A,{form:e,name:"content_wizard.domains",fieldLabel:"COMMON_DOMAIN_NAME",modalTitle:(0,s.jsx)(h.sA,{id:"SETTINGS_ADD_MULTIPLE_DOMAINS"}),modalFieldPlaceholder:t({id:"SETTINGS_ADD_MULTIPLE_DOMAINS_PLACEHOLDER"}),itemSchema:Z.Ay.string().regex(ne.Eg,t({id:"COMMON_DOMAIN_VALIDATION"})),placeholder:t({id:"SETTINGS_SECURITY_DOMAINS_PLACEHOLDER"}),getDuplicationMessage:()=>t({id:"SETTINGS_SECURITY_DOMAINS_VALIDATION"})}):null,n===i.IP?(0,s.jsx)(l.xI,{control:e.control,name:"content_wizard.ips",render:({field:e,fieldState:t,formState:n})=>(0,s.jsx)(ct.f,{value:e.value||[],onChange:t=>e.onChange(t),invalid:t.invalid?r((0,l.Jt)(n.errors,e.name)?.message)||!0:void 0})}):null,n===i.REGION?(0,s.jsx)(At.A,{form:e,name:"content_wizard.regions"}):null]})};var Nt=n(796091),mt=n(625133);const ut=({form:e})=>(0,s.jsx)(Nt.A,{children:(0,s.jsx)(mt.A,{control:e.control,name:"wizard_kill_switch_enabled",tooltip:(0,s.jsx)(h.sA,{id:"SETTINGS_KILL_SWITCH_TOOLTIP_VPN"}),children:(0,s.jsx)(h.sA,{id:"COMMON_KILL_SWITCH"})})});var Tt=n(840800),St=n(156007),Ot=n(547967),ht=n(717218),Ct=n(895983),gt=n(297640),xt=n(811138),Rt=n(668663),vt=n(883748);const ft=({item:e})=>e.target_devices?.[0]?.type===V.Q.ALL_CLIENTS?(0,s.jsx)(ht.A,{isDisabled:!e.enabled,children:(0,s.jsx)(h.sA,{id:"COMMON_ANY"})}):(0,s.jsxs)(c.A,{gap:O.YC,maxWidth:"100%",children:[e.target_devices.slice(0,1).map(({type:t,network_id:n,client_mac:i})=>{switch(t){case V.Q.NETWORK:return(0,s.jsx)(Rt.A,{enabled:e.enabled,id:n},n);case V.Q.CLIENT:return(0,s.jsx)(vt.A,{enabled:e.enabled,mac:i},i);default:return null}}),e.target_devices.length>1?(0,s.jsx)(xt.A,{enabled:e.enabled,items:e.target_devices.slice(1),getItemKey:e=>`${e.network_id}${e.client_mac}`,renderItem:e=>{switch(e.type){case V.Q.NETWORK:return(0,s.jsx)(Ct.A,{id:e.network_id},e.network_id);case V.Q.CLIENT:return(0,s.jsx)(gt.A,{mac:e.client_mac},e.client_mac);default:return null}}}):null]});var Mt=n(998948),yt=n(361693),jt=n(968058),bt=n(32437),Dt=n(185669),Lt=n(603542),Pt=n(583821),Vt=n(635187);const Gt=e=>[...(e.ports||[]).map(e=>String(e)),...(e.port_ranges||[]).map(({port_start:e,port_stop:t})=>`${e}${Vt.jr}${t}`)].filter(Boolean).join(Vt.KE),wt=({item:e})=>{if(e.matching_target===M.d.INTERNET)return(0,s.jsx)(Ve.A,{color:e.enabled?"inherit":"disabled",children:(0,s.jsx)(h.sA,{id:"COMMON_ANY"})});if(e.matching_target===M.d.REGION){const t=e.regions.flatMap(e=>Mt.A.find(t=>t.countryCode===e));return(0,s.jsxs)(c.A,{gap:O.YC,maxWidth:"100%",children:[t?.slice(0,1).map(t=>(0,s.jsx)(Dt.A,{enabled:e.enabled,region:t.countryCode,children:(0,s.jsx)(St.A,{children:t.countryName})},t.countryCode)),t.length>1?(0,s.jsx)(xt.A,{enabled:e.enabled,items:t.slice(1),getItemKey:({countryCode:e})=>e,renderItem:({countryCode:e})=>(0,s.jsx)(yt.A,{region:e})}):null]})}if(e.matching_target===M.d.DOMAIN){const t=[...(e.domains||[]).map(({domain:e,port_ranges:t,ports:n})=>[e,Gt({ports:n,port_ranges:t})].filter(Boolean).join(Vt.oH))];return(0,s.jsxs)(c.A,{gap:O.YC,maxWidth:"100%",children:[t?.slice(0,1).map(t=>(0,s.jsx)(Pt.A,{domain:t,enabled:e.enabled},t)),t.length>1?(0,s.jsx)(xt.A,{enabled:e.enabled,items:t.slice(1),getItemKey:e=>e,renderItem:e=>(0,s.jsx)(bt.A,{domain:e})}):null]})}if(e.matching_target===M.d.IP){const t=[...(e.ip_addresses||[]).map(e=>[e.ip_or_subnet,Gt(e)].filter(Boolean).join(Vt.oH)),...(e.ip_ranges||[]).map(e=>[e.ip_start,e.ip_stop].filter(Boolean).join(Vt.jr))];return(0,s.jsxs)(c.A,{gap:O.YC,maxWidth:"100%",children:[t.slice(0,1).map(t=>(0,s.jsx)(Lt.A,{ip:t,enabled:e.enabled},t)),t.length>1?(0,s.jsx)(xt.A,{items:t.slice(1),getItemKey:e=>e,renderItem:e=>(0,s.jsx)(jt.A,{ip:e})}):null]})}return(0,s.jsx)(Ve.A,{color:e.enabled?"inherit":"disabled",children:(0,s.jsx)(h.sA,{id:"COMMON_FALLBACK"})})},Ft=[{id:"description",label:(0,s.jsx)(h.sA,{id:"COMMON_NAME"}),renderCell:e=>(0,s.jsx)(St.A,{color:e.enabled?"inherit":"disabled",children:e.description})},{id:"target_devices",label:(0,s.jsx)(h.sA,{id:"COMMON_SOURCE"}),renderCell:e=>(0,s.jsx)(ft,{item:e})},{id:"matching_target",label:(0,s.jsx)(h.sA,{id:"COMMON_DESTINATION"}),renderCell:e=>(0,s.jsx)(wt,{item:e})}],Ut=({associatedTrafficRoutes:e})=>{const t=(0,a.wA)();return(0,s.jsx)(d.A,{title:(0,s.jsx)(h.sA,{id:"SETTINGS_VPN_ASSOCIATED_POLICIES"}),children:(0,s.jsx)(Ot.AC,{isWindowsTable:!0,rows:e.length,marginTop:"none",children:(0,s.jsx)(Tt.A,{rowHeight:We.b,idField:"_id",hideCellOverflow:!0,disableColumnFilters:!0,onRowClick:({_id:e})=>t((0,T.XP)({type:S.H.POLICY_BASED_ROUTE,id:e})),columns:Ft,items:e})})})},Kt=({form:e})=>(0,s.jsx)($.A,{control:e.control,name:"openvpn_username",label:(0,s.jsx)(h.sA,{id:"COMMON_LABEL_USERNAME"}),tooltip:(0,s.jsx)(h.sA,{id:"SETTINGS_NETWORKS_VPN_CLIENT_USERNAME_PASSWORD_DESC"})}),kt=({form:e})=>(0,s.jsx)($.A,{control:e.control,name:"openvpn_password",label:(0,s.jsx)(h.sA,{id:"COMMON_PASSWORD"}),tooltip:(0,s.jsx)(h.sA,{id:"SETTINGS_NETWORKS_VPN_CLIENT_USERNAME_PASSWORD_DESC"}),type:"password",passwordToggle:!0}),Wt=({form:e})=>(0,s.jsx)($.A,{control:e.control,name:"wireguard_private_key",autoComplete:"new-password",type:"password",passwordToggle:!0,label:(0,s.jsx)(h.sA,{id:"COMMON_PRIVATE_KEY"}),tooltip:(0,s.jsx)(h.sA,{id:"SETTINGS_NETWORKS_FORM_FIELD_PRIVATE_KEY_CLIENT_DESC"}),onAfterChange:()=>{e.setValue("wireguard_public_key",(0,ge.yi)(e.getValues("wireguard_private_key")).publicKey||e.getValues("wireguard_public_key"),{shouldTouch:!0,shouldDirty:!0,shouldValidate:!0})}});var Yt=n(465615);const $t=({form:e})=>{const t=(0,l.FH)({control:e.control,name:"wireguard_public_key"});return(0,s.jsx)(N.A,{isDisabled:!0,children:(0,s.jsx)($.A,{control:e.control,name:"wireguard_public_key",autoComplete:"new-password",type:"password",passwordToggle:!0,contentAfter:t?(0,s.jsx)(Yt.A,{link:t,variant:"secondary"}):null,label:(0,s.jsx)(h.sA,{id:"COMMON_PUBLIC_KEY"}),tooltip:(0,s.jsx)(h.sA,{id:"SETTINGS_NETWORKS_FORM_FIELD_PUBLIC_KEY_CLIENT_DESC"})})})};var Bt=n(477909),Ht=n(89469),zt=n(689941);const Qt=(0,Bt.A)(k.pY,k.Jn+1).reverse().map(e=>({label:e.toString(),value:e})),Xt=(0,Bt.A)(k.Rd,k.rn+1).reverse().map(e=>({label:e.toString(),value:e})),Zt=({form:e})=>{const t=(0,C.A)(g.Xj.WIREGUARD_IPV6_SUPPORT),{formatMessage:n}=(0,h.tz)();return(0,s.jsx)(ve.A,{gap:O.kc,label:(0,s.jsxs)(c.A,{gap:O.YC,paddingTop:O.YC,children:[(0,s.jsx)(Ge.A,{variant:"heading-medium",children:(0,s.jsx)(h.sA,{id:"COMMON_TUNNEL_IP"})}),(0,s.jsx)(Ye.A,{description:(0,s.jsx)(h.sA,{id:"SETTINGS_VPN_CLIENT_TUNNEL_IP_DESC"}),portal:!0})]}),children:(0,s.jsxs)(Ht.A,{children:[(0,s.jsxs)(c.A,{gap:O.kc,alignItems:"flex-start",children:[(0,s.jsx)(c.A,{flex:2,children:(0,s.jsx)($.A,{control:e.control,name:"ip_subnet.ip",placeholder:n({id:"COMMON_IPV4_ADDRESS"}),label:(0,s.jsx)(h.sA,{id:"COMMON_IPV4_ADDRESS"}),onBlur:()=>e.trigger("ipv6_subnet")})}),(0,s.jsx)(c.A,{flex:1,children:(0,s.jsx)(zt.A,{label:(0,s.jsx)(h.sA,{id:"SETTINGS_NETWORKS_FORM_NETMASK"}),control:e.control,name:"ip_subnet.subnet",options:Qt,searchable:!0,onAfterChange:()=>e.trigger("ipv6_subnet")})})]}),t?(0,s.jsxs)(c.A,{gap:O.kc,alignItems:"flex-start",children:[(0,s.jsx)(c.A,{flex:2,children:(0,s.jsx)($.A,{control:e.control,name:"ipv6_subnet.ip",placeholder:n({id:"COMMON_IPV6_ADDRESS"}),label:(0,s.jsx)(h.sA,{id:"COMMON_IPV6_ADDRESS"}),onBlur:()=>e.trigger("ip_subnet")})}),(0,s.jsx)(c.A,{flex:1,children:(0,s.jsx)(zt.A,{label:(0,s.jsx)(h.sA,{id:"SETTINGS_NETWORKS_FORM_NETMASK"}),control:e.control,name:"ipv6_subnet.subnet",options:Xt,searchable:!0,onAfterChange:()=>e.trigger("ip_subnet")})})]}):null]})})};var Jt=n(16805);const qt=({form:e})=>{const{formatMessage:t}=(0,h.tz)(),n=(0,C.A)(g.Xj.WIREGUARD_IPV6_SUPPORT);return(0,s.jsx)(ve.A,{gap:O.kc,label:(0,s.jsxs)(c.A,{gap:O.YC,children:[(0,s.jsx)(Ge.A,{variant:"heading-medium",children:(0,s.jsx)(h.sA,{id:"COMMON_SERVER_ADDRESS"})}),(0,s.jsx)(Ye.A,{description:(0,s.jsx)(h.sA,{id:"SETTINGS_NETWORKS_FORM_FIELD_VPN_PUBLIC_IP_CLIENT_DESC"}),portal:!0})]}),children:(0,s.jsxs)(c.A,{gap:O.kc,alignItems:"flex-start",children:[(0,s.jsx)(c.A,{flex:2,children:(0,s.jsx)($.A,{control:e.control,name:"wireguard_client_peer_ip",placeholder:t({id:n?"COMMON_IPV4_IPV6_ADDRESS_HOSTNAME":"COMMON_IPV4_ADDRESS_HOSTNAME"}),label:(0,s.jsx)(h.sA,{id:"COMMON_IP_HOSTNAME"})})}),(0,s.jsx)(c.A,{flex:1,children:(0,s.jsx)(Jt.A,{label:(0,s.jsx)(h.sA,{id:"COMMON_PORT"}),control:e.control,name:"wireguard_client_peer_port",min:H.MIN,max:H.MAX})})]})})},en=({form:e})=>{const t=(0,l.FH)({control:e.control,name:"wireguard_client_peer_public_key"});return(0,s.jsx)($.A,{control:e.control,name:"wireguard_client_peer_public_key",autoComplete:"new-password",type:"password",passwordToggle:!0,contentAfter:t?(0,s.jsx)(Yt.A,{link:t,variant:"secondary"}):null,label:(0,s.jsx)(h.sA,{id:"COMMON_PUBLIC_SERVER_KEY"}),tooltip:(0,s.jsx)(h.sA,{id:"SETTINGS_VPN_CLIENT_PUBLIC_SERVER_KEY_DESC"})})},tn=({form:e})=>{const t=(0,l.FH)({control:e.control,name:"wireguard_client_preshared_key.enabled"});return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Nt.A,{children:(0,s.jsx)(mt.A,{tooltip:(0,s.jsx)(h.sA,{id:"SETTINGS_VPN_CLIENT_PUBLIC_PRE_SHARED_KEY_DESC"}),control:e.control,name:"wireguard_client_preshared_key.enabled",onToggle:t=>{t&&!e.getValues("wireguard_client_preshared_key.value")&&e.setValue("wireguard_client_preshared_key.value",(0,ge.$g)(),{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0}),t||e.setValue("wireguard_client_preshared_key.value","")},children:(0,s.jsx)(h.sA,{id:"COMMON_PRE_SHARED_KEY"})})}),t?(0,s.jsx)($.A,{control:e.control,name:"wireguard_client_preshared_key.value"}):null]})},nn=({form:e})=>{const t=(0,C.A)(g.Xj.WIREGUARD_IPV6_SUPPORT),{formatMessage:n}=(0,h.tz)();return(0,s.jsx)($.A,{control:e.control,name:"dhcpd_dns_1",label:(0,s.jsx)(h.sA,{id:"COMMON_PRIMARY_DNS_SERVER"}),tooltip:(0,s.jsx)(h.sA,{id:"SETTINGS_NETWORKS_FORM_FIELD_VPN_DNS_CLIENT_DESC"}),placeholder:n({id:t?"COMMON_IPV4_IPV6_ADDRESS":"COMMON_IPV4_ADDRESS"})})},rn=({form:e})=>{const t=(0,C.A)(g.Xj.WIREGUARD_IPV6_SUPPORT),{formatMessage:n}=(0,h.tz)();return(0,s.jsx)($.A,{control:e.control,name:"dhcpd_dns_2",label:(0,s.jsx)(h.sA,{id:"COMMON_SECONDARY_DNS_SERVER"}),placeholder:n({id:t?"COMMON_IPV4_IPV6_ADDRESS":"COMMON_IPV4_ADDRESS"})})};var sn=n(918071);const on=({form:e})=>{const t="auto"===(0,l.FH)({control:e.control,name:"mtu.type"});return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(ve.A,{children:[(0,s.jsx)(fe.A,{htmlFor:"interface_mtu_enabled",tooltip:(0,s.jsx)(h.sA,{id:"SETTINGS_NETWORKS_FORM_FIELD_MTU_DESC"}),children:(0,s.jsx)(h.sA,{id:"SETTINGS_NETWORKS_FORM_FIELD_MTU"})}),(0,s.jsxs)(Me.A,{children:[(0,s.jsx)(ye.A,{control:e.control,name:"mtu.type",value:"auto",children:(0,s.jsx)(h.sA,{id:"COMMON_AUTO"})}),(0,s.jsx)(ye.A,{control:e.control,name:"mtu.type",value:"custom",children:(0,s.jsx)(h.sA,{id:"COMMON_CUSTOM"})})]})]}),t?null:(0,s.jsx)(c.A,{width:sn.G,children:(0,s.jsx)(Jt.A,{control:e.control,name:"mtu.value",label:(0,s.jsx)(h.sA,{id:"SETTINGS_NETWORKS_FORM_FIELD_MTU_VALUE_LABEL"}),contentAfter:(0,s.jsx)(h.sA,{id:"COMMON_BYTES"}),min:W.ir,max:W.g9})})]})},an=({form:e})=>{const t=(0,l.FH)({control:e.control,name:"mss_clamp_ipv6.type"});return(0,s.jsxs)(Ht.A,{children:[(0,s.jsx)(ve.A,{label:(0,s.jsx)(fe.A,{tooltip:(0,s.jsx)(h.sA,{id:"SETTINGS_NETWORKS_FORM_FIELD_MSS_IPV6_DESC"}),children:(0,s.jsx)(h.sA,{id:"SETTINGS_NETWORKS_FORM_FIELD_MSS_IPV6"})}),children:(0,s.jsxs)(Me.A,{children:[(0,s.jsx)(ye.A,{control:e.control,name:"mss_clamp_ipv6.type",value:A.dY.AUTO,children:(0,s.jsx)(h.sA,{id:"COMMON_AUTO"})}),(0,s.jsx)(ye.A,{control:e.control,name:"mss_clamp_ipv6.type",value:A.dY.CUSTOM,children:(0,s.jsx)(h.sA,{id:"COMMON_CUSTOM"})}),(0,s.jsx)(ye.A,{control:e.control,name:"mss_clamp_ipv6.type",value:A.dY.OFF,children:(0,s.jsx)(h.sA,{id:"COMMON_OFF"})})]})}),t===A.dY.CUSTOM?(0,s.jsx)(c.A,{width:sn.G,children:(0,s.jsx)(Jt.A,{control:e.control,name:"mss_clamp_ipv6.value",label:(0,s.jsx)(h.sA,{id:"SETTINGS_NETWORKS_FORM_FIELD_MSS_IPV6_VALUE_LABEL"}),contentAfter:(0,s.jsx)(h.sA,{id:"COMMON_BYTES"}),min:W.$L,max:W.do,onAfterChange:({target:t})=>{Number(t.value)&&e.setValue("mss_clamp_ipv6.value",Number(t.value),{shouldValidate:!0})}})}):null]})},ln=({form:e})=>{const t=(0,l.FH)({control:e.control,name:"mss_clamp.type"})===A.dY.CUSTOM;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(ve.A,{children:[(0,s.jsx)(fe.A,{htmlFor:"interface_mtu_enabled",tooltip:(0,s.jsx)(h.sA,{id:"SETTINGS_NETWORKS_FORM_FIELD_MSS_DESC"}),children:(0,s.jsx)(h.sA,{id:"SETTINGS_NETWORKS_FORM_FIELD_MSS"})}),(0,s.jsxs)(Me.A,{children:[(0,s.jsx)(ye.A,{control:e.control,name:"mss_clamp.type",value:A.dY.AUTO,children:(0,s.jsx)(h.sA,{id:"COMMON_AUTO"})}),(0,s.jsx)(ye.A,{control:e.control,name:"mss_clamp.type",value:A.dY.CUSTOM,children:(0,s.jsx)(h.sA,{id:"COMMON_CUSTOM"})}),(0,s.jsx)(ye.A,{control:e.control,name:"mss_clamp.type",value:A.dY.OFF,children:(0,s.jsx)(h.sA,{id:"COMMON_OFF"})})]})]}),t?(0,s.jsx)(c.A,{width:sn.G,children:(0,s.jsx)(Jt.A,{control:e.control,name:"mss_clamp.value",label:(0,s.jsx)(h.sA,{id:"SETTINGS_NETWORKS_FORM_FIELD_MSS_VALUE_LABEL"}),contentAfter:(0,s.jsx)(h.sA,{id:"COMMON_BYTES"}),min:W.x1,max:W.do})}):null]})};var _n=n(486061),dn=n(47604),cn=n(60143);const An=({existingRecord:e,form:t})=>{const n=(0,a.d4)(cn.U).find(({network_id:t})=>t===e?._id),i=(0,l.FH)({control:t.control,name:"vpn_type"}),r=(0,l.FH)({control:t.control,name:"mss_clamp"}),o=(0,l.FH)({control:t.control,name:"mtu"}),_=i===E.E.OPENVPN_CLIENT?W.IS:W.vY,d=(r?.type===A.dY.CUSTOM?r.value:W.ow)||W.ow;return"auto"!==o?.type||r?.type!==A.dY.CUSTOM||d<=_-W.SU||n?.status!==dn.T.CONNECTED?null:(0,s.jsx)(y.A,{maxWidth:_n.ng,children:(0,s.jsx)(h.sA,{id:"SETTINGS_NETWORKS_FORM_FIELD_MTU_MSS_WARNING",values:{maxMss:_-W.SU}})})};var En=n(184931);const pn=({form:e})=>{const t=(0,En.mQ)(),n=(0,o.useCallback)(()=>{const{privateKey:t,publicKey:n}=(0,ge.yi)();e.setValue("wireguard_private_key",t,{shouldTouch:!0,shouldDirty:!0,shouldValidate:!0}),e.setValue("wireguard_public_key",n,{shouldTouch:!0,shouldDirty:!0,shouldValidate:!0})},[e]);return(0,s.jsx)(c.A,{alignItems:"center",justifyContent:"flex-start",width:"100%",children:(0,s.jsx)(Pe.A,{isDisabled:t,type:"button",onClick:n,fontSize:"medium",children:(0,s.jsx)(h.sA,{id:"SETTINGS_NETWORKS_FORM_GENERATE_KEY_PAIR"})})})};var In=n(263705),Nn=n(505817),mn=n(38355);const un={ok:"green-06",warning:"orange-06",pending:"orange-06",error:"red-06"},Tn=({existingRecord:e})=>{const t=(0,In.u)(),n=(0,a.d4)(cn.U),i=(0,a.d4)(R.jY),r=n.find(({network_id:t})=>t===e._id),o=(0,k.O0)({network:e,connection:r,isUbiOS:i});return o.type===mn.q.DISABLED?null:(0,s.jsxs)(c.A,{alignItems:"center",height:O.Er,background:Nn.Ay[`desktop-color-neutral-01-${t.themeName}`],borderRadius:O.YC,padding:`0 ${O.kc} 0 0`,children:[(0,s.jsx)(c.A,{width:O.Er,height:O.Er,alignItems:"center",justifyContent:"center",children:(0,s.jsx)(c.A,{width:6,height:6,borderRadius:"50%",background:Nn.Ay[`desktop-color-${un[o.type]}-${t.themeName}`]})}),(0,s.jsx)(St.A,{size:"medium",color:"text-2",children:(0,s.jsx)(h.sA,{id:o.title})})]})};var Sn=n(309675);const On=({existingRecord:e})=>{const{themeName:t}=(0,In.u)(),n=(0,a.d4)(cn.U),i=(0,a.d4)(R.jY),r=n.find(({network_id:t})=>t===e._id),o=(0,k.O0)({network:e,connection:r,isUbiOS:i});return o.type!==mn.q.OK&&o.description?(0,s.jsx)(Be.A,{icon:(0,s.jsx)(Sn.A,o.type===mn.q.ERROR?{color:Nn.Ay[`desktop-color-red-06-${t}`]}:{color:Nn.Ay[`desktop-color-orange-06-${t}`]}),children:(0,s.jsx)(h.sA,{id:o.description})}):null};var hn=n(699709),Cn=n(221835);const gn=e=>ne.fg.test(e),xn=e=>ne.vS.test(e),Rn=e=>ne.zF.test(e),vn=e=>ne.BY.test(e),fn=e=>ne.wK.test(e),Mn=e=>ne.U_.test(e);var yn=n(237887);const jn=({form:e})=>{const t=(0,C.A)(g.Xj.WIREGUARD_IPV6_SUPPORT),n=(0,l.FH)({control:e.control,name:"wireguard_configuration_file"}),i=(0,o.useMemo)(()=>n?.content?(0,se.G)(n.content):null,[n?.content]),r=i?.interface.privateKey,a=(0,o.useMemo)(()=>(0,ge.yi)(r)?.publicKey,[r]),_=(0,o.useMemo)(()=>((e,t,n)=>{const i=(0,se.G)(e),r=(0,te.c)(i.interface.privateKey),s=(0,te.c)(i.peer.publicKey),o=(0,te.c)(i.peer.preSharedKey),a=(n?vn:Rn)(i.interface.dns[0]),l=i.peer.endpoint,_=l&&(n?xn:gn)(l?.address),d=l&&(e=>{const t=Number(e);return t>=H.MIN&&t<=H.MAX})(l?.port),c=n?Mn:fn,E=i.interface.address.filter(e=>n||e.version===re.k.v4),p=n?E.length&&E.length<=2&&E.map(e=>`${e.ip}/${e.subnet}`).every(c):1===E.length&&c(`${E[0].ip}/${E[0].subnet}`),I=!n||E.filter(e=>ne.QD.test(e.ip+"/"+e.subnet)).length<=1&&E.filter(e=>ne.wK.test(e.ip+"/"+e.subnet)).length<=1,N=p&&I&&r&&s&&_&&d&&a;return t?""===e?A.mo.CONNECTION_FAILED:i.peer.preSharedKey?N&&o?A.mo.VALID:A.mo.CONNECTION_FAILED:N?A.mo.VALID:A.mo.CONNECTION_FAILED:A.mo.NEW})(n?.content,n?.name,t),[n?.content,n?.name,t]),{ipv4Address:d,ipv6Address:E}=(0,o.useMemo)(()=>{const e=i?.interface.address.filter(e=>t||e.version===re.k.v4)||[];return{ipv4Address:e.find(e=>e.version===re.k.v4),ipv6Address:e.find(e=>e.version===re.k.v6)}},[t,i]),p=(0,o.useMemo)(()=>t||i?.peer?.endpoint?.ipVersion===re.k.v4?i?.peer.endpoint:void 0,[t,i?.peer?.endpoint]);return _!==A.mo.VALID?null:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(hn.A,{width:"100%",variant:"secondary",passwordToggle:!0,type:"password",autoComplete:"new-password",label:(0,s.jsx)(h.sA,{id:"COMMON_PRIVATE_KEY"}),labelTooltip:(0,s.jsx)(h.sA,{id:"SETTINGS_NETWORKS_FORM_FIELD_PRIVATE_KEY_CLIENT_DESC"}),labelTooltipProps:{portal:!0},disabled:!0,value:r||""}),(0,s.jsx)(hn.A,{width:"100%",variant:"secondary",passwordToggle:!0,type:"password",autoComplete:"new-password",contentAfter:a?(0,s.jsx)(Yt.A,{link:a,variant:"secondary"}):null,label:(0,s.jsx)(h.sA,{id:"COMMON_PUBLIC_KEY"}),labelTooltip:(0,s.jsx)(h.sA,{id:"SETTINGS_NETWORKS_FORM_FIELD_PUBLIC_KEY_CLIENT_DESC"}),labelTooltipProps:{portal:!0},disabled:!0,value:a||""}),(0,s.jsx)(ve.A,{gap:O.kc,label:(0,s.jsxs)(c.A,{gap:O.YC,paddingTop:O.YC,children:[(0,s.jsx)(Ge.A,{variant:"heading-medium",children:(0,s.jsx)(h.sA,{id:"COMMON_TUNNEL_IP"})}),(0,s.jsx)(Ye.A,{description:(0,s.jsx)(h.sA,{id:"SETTINGS_VPN_CLIENT_TUNNEL_IP_DESC"}),portal:!0})]}),children:(0,s.jsxs)(Ht.A,{children:[(0,s.jsxs)(c.A,{gap:O.kc,alignItems:"flex-start",children:[(0,s.jsx)(c.A,{flex:2,children:(0,s.jsx)(hn.A,{width:"100%",type:"text",disabled:!0,variant:"secondary",label:(0,s.jsx)(h.sA,{id:"COMMON_IPV4_ADDRESS"}),value:d?.ip||""})}),(0,s.jsx)(c.A,{flex:1,children:(0,s.jsx)(yn.A,{width:"100%",variant:"secondary",disabled:!0,label:(0,s.jsx)(h.sA,{id:"SETTINGS_NETWORKS_FORM_NETMASK"}),options:[{value:d?.subnet||"",label:d?.subnet||""}],searchable:!0,value:d?.subnet||""})})]}),t?(0,s.jsxs)(c.A,{gap:O.kc,alignItems:"flex-start",children:[(0,s.jsx)(c.A,{flex:2,children:(0,s.jsx)(hn.A,{width:"100%",type:"text",disabled:!0,variant:"secondary",label:(0,s.jsx)(h.sA,{id:"COMMON_IPV6_ADDRESS"}),value:E?.ip||""})}),(0,s.jsx)(c.A,{flex:1,children:(0,s.jsx)(yn.A,{width:"100%",variant:"secondary",disabled:!0,label:(0,s.jsx)(h.sA,{id:"SETTINGS_NETWORKS_FORM_NETMASK"}),options:[{value:E?.subnet||"",label:E?.subnet||""}],searchable:!0,value:E?.subnet||""})})]}):null]})}),(0,s.jsx)(ve.A,{gap:O.kc,label:(0,s.jsxs)(c.A,{gap:O.YC,children:[(0,s.jsx)(Ge.A,{variant:"heading-medium",children:(0,s.jsx)(h.sA,{id:"COMMON_SERVER_ADDRESS"})}),(0,s.jsx)(Ye.A,{description:(0,s.jsx)(h.sA,{id:"SETTINGS_NETWORKS_FORM_FIELD_VPN_PUBLIC_IP_CLIENT_DESC"}),portal:!0})]}),children:(0,s.jsxs)(c.A,{gap:O.kc,alignItems:"flex-start",children:[(0,s.jsx)(c.A,{flex:2,children:(0,s.jsx)(hn.A,{width:"100%",type:"text",variant:"secondary",label:(0,s.jsx)(h.sA,{id:"COMMON_IP_HOSTNAME"}),value:p?.address||"",disabled:!0})}),(0,s.jsx)(c.A,{flex:1,children:(0,s.jsx)(hn.A,{width:"100%",type:"number",variant:"secondary",label:(0,s.jsx)(h.sA,{id:"COMMON_PORT"}),value:p?.port||"",disabled:!0})})]})}),(0,s.jsx)(hn.A,{width:"100%",variant:"secondary",type:"password",autoComplete:"new-password",passwordToggle:!0,contentAfter:i?.peer.publicKey?(0,s.jsx)(Yt.A,{link:i.peer.publicKey,variant:"secondary"}):null,label:(0,s.jsx)(h.sA,{id:"COMMON_PUBLIC_SERVER_KEY"}),labelTooltip:(0,s.jsx)(h.sA,{id:"SETTINGS_VPN_CLIENT_PUBLIC_SERVER_KEY_DESC"}),labelTooltipProps:{portal:!0},disabled:!0,value:i?.peer.publicKey||""}),(0,s.jsxs)(c.A,{children:[(0,s.jsx)(Nt.A,{children:(0,s.jsx)(Cn.A,{variant:"primary",disabled:!0,id:"wireguard_preshared_key",checked:!!i?.peer.preSharedKey,children:(0,s.jsx)(h.sA,{id:"COMMON_PRE_SHARED_KEY"})})}),(0,s.jsx)(Ye.A,{description:(0,s.jsx)(h.sA,{id:"SETTINGS_VPN_CLIENT_PUBLIC_PRE_SHARED_KEY_DESC"}),portal:!0})]}),i?.peer.preSharedKey?(0,s.jsx)(hn.A,{type:"text",variant:"secondary",width:"100%",value:i.peer.preSharedKey,disabled:!0}):null,(0,s.jsx)(hn.A,{variant:"secondary",label:(0,s.jsx)(h.sA,{id:"COMMON_PRIMARY_DNS_SERVER"}),labelTooltip:(0,s.jsx)(h.sA,{id:"SETTINGS_NETWORKS_FORM_FIELD_VPN_DNS_CLIENT_DESC"}),labelTooltipProps:{portal:!0},value:i?.interface.dns[0]||"",disabled:!0,width:"100%"}),(0,s.jsx)(hn.A,{variant:"secondary",label:(0,s.jsx)(h.sA,{id:"COMMON_SECONDARY_DNS_SERVER"}),labelTooltip:(0,s.jsx)(h.sA,{id:"SETTINGS_NETWORKS_FORM_FIELD_VPN_DNS_CLIENT_DESC"}),labelTooltipProps:{portal:!0},value:i?.interface.dns[1]||"",disabled:!0,width:"100%"})]})},bn=({activeItem:e})=>{const t=e&&e._id!==p.R6?e:void 0,{formatMessage:n}=(0,h.tz)(),y=(0,a.wA)(),j=(0,a.d4)(m.EL),b=(0,a.d4)(x.Ct),$=(0,a.d4)(f.iE),H=(0,a.d4)(R.Lt),z=(0,C.A)(g.Xj.WIREGUARD_VPN_CLIENT),Q=(0,C.A)(g.Xj.TRAFFIC_ROUTE_KILL_SWITCH),X=(0,C.A)(g.Xj.VPN_MSS_CLAMPING),Z=(0,C.A)(g.Xj.WIREGUARD_IPV6_SUPPORT),J=(0,o.useMemo)(()=>t?._id?$.filter(({network_id:e})=>e===t._id):[],[t?._id,$]),q=(0,o.useMemo)(()=>b.filter(e=>e._id!==t?._id),[b,t?._id]),ee=(0,_.m)({defaultValues:Re(t,z,Q,b,n),schema:Ce(Z,q)});(0,I.y)(ee);const{isDirty:te,isSubmitting:ne}=(0,l.lN)(ee),ie=(0,l.FH)({control:ee.control,name:"vpn_type"}),re=(0,l.FH)({control:ee.control,name:"content_wizard.type"}),se=(0,l.FH)({control:ee.control,name:"device_wizard.type"}),oe=(0,l.FH)({control:ee.control,name:"setup_mode"}),ae=(0,l.FH)({control:ee.control,name:"wireguard_configuration_file"}),le=ee.handleSubmit(async e=>{try{const n=((e,t,n)=>({...e,enabled:e?.enabled??n.filter(t=>t._id!==e?._id&&t.enabled&&(0,K.MY)(t)).length<k.Ch,purpose:e?.purpose??A.rR.VPN_CLIENT,vpn_type:t.vpn_type,name:t.name,ip_subnet:"ip_subnet"in t&&t.ip_subnet?`${t.ip_subnet.ip}/${t.ip_subnet.subnet}`:void 0,ipv6_subnet:"ipv6_subnet"in t&&t.ipv6_subnet?`${t.ipv6_subnet.ip}/${t.ipv6_subnet.subnet}`:void 0,dhcpd_dns_1:"dhcpd_dns_1"in t?t.dhcpd_dns_1:void 0,dhcpd_dns_2:"dhcpd_dns_2"in t&&t.dhcpd_dns_2||void 0,openvpn_configuration_filename:t.vpn_type===E.E.OPENVPN_CLIENT?t.openvpn_configuration_file.name:void 0,openvpn_configuration:t.vpn_type===E.E.OPENVPN_CLIENT?t.openvpn_configuration_file.content:void 0,openvpn_username:t.vpn_type===E.E.OPENVPN_CLIENT?t.openvpn_username:void 0,x_openvpn_password:t.vpn_type===E.E.OPENVPN_CLIENT?t.openvpn_password:void 0,wireguard_client_configuration_file:t.vpn_type===E.E.WIREGUARD_CLIENT&&t.setup_mode===A.hS.FILE?t.wireguard_configuration_file.content:void 0,wireguard_client_configuration_filename:t.vpn_type===E.E.WIREGUARD_CLIENT&&t.setup_mode===A.hS.FILE?t.wireguard_configuration_file.name:void 0,wireguard_client_mode:t.vpn_type===E.E.WIREGUARD_CLIENT?t.setup_mode:void 0,x_wireguard_private_key:t.vpn_type===E.E.WIREGUARD_CLIENT&&t.setup_mode===A.hS.MANUAL?t.wireguard_private_key:void 0,wireguard_public_key:t.vpn_type===E.E.WIREGUARD_CLIENT&&t.setup_mode===A.hS.MANUAL?t.wireguard_public_key:void 0,wireguard_client_preshared_key_enabled:t.vpn_type===E.E.WIREGUARD_CLIENT&&t.setup_mode===A.hS.MANUAL?t.wireguard_client_preshared_key.enabled:void 0,wireguard_client_preshared_key:t.vpn_type===E.E.WIREGUARD_CLIENT&&t.setup_mode===A.hS.MANUAL&&t.wireguard_client_preshared_key?.enabled?t.wireguard_client_preshared_key.value:void 0,wireguard_client_peer_ip:t.vpn_type===E.E.WIREGUARD_CLIENT&&t.setup_mode===A.hS.MANUAL?t.wireguard_client_peer_ip:void 0,wireguard_client_peer_port:t.vpn_type===E.E.WIREGUARD_CLIENT&&t.setup_mode===A.hS.MANUAL?t.wireguard_client_peer_port:void 0,wireguard_client_peer_public_key:t.vpn_type===E.E.WIREGUARD_CLIENT&&t.setup_mode===A.hS.MANUAL?t.wireguard_client_peer_public_key:void 0,interface_mtu_enabled:"custom"===t.mtu.type,interface_mtu:"custom"===t.mtu.type?t.mtu.value:void 0,mss_clamp_mss:t.mss_clamp.type===A.dY.CUSTOM?t.mss_clamp.value:W.ow,mss_clamp:t.mss_clamp.type,mss_clamp_ipv6:t.vpn_type===E.E.WIREGUARD_CLIENT?t.mss_clamp_ipv6.type:void 0,mss_clamp_mss_ipv6:t.vpn_type===E.E.WIREGUARD_CLIENT&&"value"in t.mss_clamp_ipv6?t.mss_clamp_ipv6.value:void 0}))(t,e,b),s=t?u.ux:u.VS,o=await y(s(n,{},{resolveWithExisting:!1})),a=o?.data?.[0]?._id||o?._id;e.device_wizard.type===r.OFF&&e.content_wizard.type===i.OFF||await y((0,P.kk)({description:e.name,enabled:!0,network_id:a,domains:"domains"in e.content_wizard?e.content_wizard.domains.map(U.DP):[],ip_addresses:"ips"in e.content_wizard?e.content_wizard.ips.filter(e=>"ip_or_subnet"in e):[],target_devices:e.device_wizard.type===r.NETWORK?e.device_wizard.networks.map(e=>({type:V.Q.NETWORK,network_id:e})):e.device_wizard.type===r.DEVICE?e.device_wizard.devices.map(e=>({type:V.Q.CLIENT,client_mac:e})):[{type:V.Q.ALL_CLIENTS}],ip_ranges:"ips"in e.content_wizard?e.content_wizard.ips.filter(e=>"ip_start"in e):[],matching_target:e.content_wizard.type===i.REGION?M.d.REGION:e.content_wizard.type===i.IP?M.d.IP:e.content_wizard.type===i.DOMAIN?M.d.DOMAIN:M.d.INTERNET,next_hop:"",kill_switch_enabled:!!e.wizard_kill_switch_enabled,regions:"regions"in e.content_wizard?e.content_wizard.regions:[],_id:void 0})),await y((0,L.G)()),y((0,T.SQ)(!1)),a&&y((0,T.XP)({type:S.H.VPN_CLIENT,id:a})),ee.reset()}catch(t){const n=(0,G.F)(t)?t:void 0;y((0,w.ox)({type:F.C.danger,message:"SETTINGS_VPN_CLIENT_CREATE_FORM_SAVE_ERROR",errorMessage:n?.msg,errorValues:{...n,name:e.name,overlappedNetwork:n?.name}}))}});return(0,s.jsx)("form",{onSubmit:le,children:(0,s.jsxs)(N.A,{isDisabled:j,children:[(0,s.jsxs)(c.A,{flexDirection:"column",width:"100%",gap:O.kc,children:[(0,s.jsxs)(d.A,{title:(0,s.jsx)(h.sA,{id:"COMMON_CONFIGURATION"}),children:[H?(0,s.jsx)(v.A,{feature:"COMMON_VPN_CLIENT"}):null,(0,s.jsx)(De,{form:ee,existingRecord:t}),(0,s.jsx)(B,{form:ee}),ie!==E.E.WIREGUARD_CLIENT||t?null:(0,s.jsx)(Le,{form:ee}),ie===E.E.OPENVPN_CLIENT||oe===A.hS.FILE?(0,s.jsx)(tt,{form:ee}):null,J.length?null:(0,s.jsx)(_t,{form:ee}),J.length?null:(0,s.jsx)(It,{form:ee}),J.length?null:(0,s.jsx)(D,{}),J.length||!Q||re===i.OFF&&se===r.OFF?null:(0,s.jsx)(ut,{form:ee})]}),J.length?(0,s.jsx)(Ut,{associatedTrafficRoutes:J}):null,ie!==E.E.WIREGUARD_CLIENT||oe!==A.hS.FILE||ae?.content?(0,s.jsxs)(d.A,{title:(0,s.jsxs)(c.A,{gap:O.YC,alignItems:"center",children:[(0,s.jsx)(h.sA,{id:"COMMON_CONNECTION"}),t?(0,s.jsx)(Tn,{existingRecord:t}):null]}),children:[t?(0,s.jsx)(On,{existingRecord:t}):null,ie===E.E.WIREGUARD_CLIENT&&oe===A.hS.MANUAL?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Wt,{form:ee}),(0,s.jsx)($t,{form:ee}),(0,s.jsx)(pn,{form:ee}),(0,s.jsx)(Zt,{form:ee}),(0,s.jsx)(qt,{form:ee}),(0,s.jsx)(en,{form:ee}),(0,s.jsx)(tn,{form:ee}),(0,s.jsx)(nn,{form:ee}),(0,s.jsx)(rn,{form:ee})]}):null,ie===E.E.WIREGUARD_CLIENT&&oe!==A.hS.MANUAL?(0,s.jsx)(jn,{form:ee}):null,ie===E.E.OPENVPN_CLIENT?(0,s.jsx)(Kt,{form:ee}):null,ie===E.E.OPENVPN_CLIENT?(0,s.jsx)(kt,{form:ee}):null]}):null,(0,s.jsxs)(d.A,{title:(0,s.jsx)(h.sA,{id:"COMMON_ADVANCED"}),children:[(0,s.jsx)(on,{form:ee}),X?(0,s.jsx)(ln,{form:ee}):null,(0,s.jsx)(An,{existingRecord:t,form:ee}),X&&Z&&ie===E.E.WIREGUARD_CLIENT?(0,s.jsx)(an,{form:ee}):null]})]}),(0,s.jsx)(Y.A,{onFormSubmit:le,onFormCancel:()=>ee.reset(),isDirty:te||!t,hideCancelButton:!te,submitButtonText:t?void 0:"COMMON_ACTION_CREATE",isSubmitting:ne})]})})}},213981(e,t,n){n.d(t,{$g:()=>I,yi:()=>p});var i=n(684780);n(794721),n(283713);const r=e=>{const t=new Float64Array(16);if(e)for(let n=0;n<e.length;n++)t[n]=e[n];return t},s=e=>{for(let t=0;t<16;t++)e[(t+1)%16]+=(t<15?1:38)*Math.floor(e[t]/65536),e[t]&=65535},o=(e,t,n)=>{let i;const r=~(n-1);for(let n=0;n<16;++n)i=r&(e[n]^t[n]),e[n]^=i,t[n]^=i},a=(e,t,n)=>{for(let i=0;i<16;++i)e[i]=t[i]+n[i]|0},l=(e,t,n)=>{for(let i=0;i<16;++i)e[i]=t[i]-n[i]|0},_=(e,t,n)=>{var i=new Float64Array(31);for(let e=0;e<16;++e)for(let r=0;r<16;++r)i[e+r]+=t[e]*n[r];for(let e=0;e<15;++e)i[e]+=38*i[e+16];for(let t=0;t<16;++t)e[t]=i[t];s(e),s(e)},d=e=>{e[31]=127&e[31]|64,e[0]&=248},c=()=>{const e=new Uint8Array(32);return window.crypto.getRandomValues(e),e},A=(e,t)=>{const n=Uint8Array.from([t[0]>>2&63,63&(t[0]<<4|t[1]>>4),63&(t[1]<<2|t[2]>>6),63&t[2]]);for(let t=0;t<4;++t)e[t]=n[t]+65+(25-n[t]>>8&6)-(51-n[t]>>8&75)-(61-n[t]>>8&15)+(62-n[t]>>8&3)},E=e=>{let t;const n=new Uint8Array(44);for(t=0;t<32/3;++t)A(n.subarray(4*t),e.subarray(3*t));return A(n.subarray(4*t),Uint8Array.from([e[3*t+0],e[3*t+1],0])),n[43]=61,String.fromCharCode.apply(null,n)};function p(e){const t=e&&(0,i.c)(e)?function(e){return Uint8Array.from(window.atob(e),e=>e.charCodeAt(0))}(e):(()=>{const e=c();return d(e),e})(),n=(e=>{let t;const n=new Uint8Array(32),i=r([1]),c=r([9]),A=r(),E=r([1]),p=r(),I=r(),N=r([56129,1]),m=r([9]);for(let t=0;t<32;++t)n[t]=e[t];d(n);for(let e=254;e>=0;--e)t=n[e>>>3]>>>(7&e)&1,o(i,c,t),o(A,E,t),a(p,i,A),l(i,i,A),a(A,c,E),l(c,c,E),_(E,p,p),_(I,i,i),_(i,A,i),_(A,c,p),a(p,i,A),l(i,i,A),_(c,i,i),l(A,E,I),_(i,A,N),a(i,i,E),_(A,A,i),_(i,E,I),_(E,c,m),_(c,p,p),o(i,c,t),o(A,E,t);return((e,t)=>{const n=r();for(let e=0;e<16;++e)n[e]=t[e];for(let e=253;e>=0;--e)_(n,n,n),2!==e&&4!==e&&_(n,n,t);for(let t=0;t<16;++t)e[t]=n[t]})(A,A),_(i,i,A),((e,t)=>{let n;const i=r(),a=r();for(let e=0;e<16;e++)a[e]=t[e];s(a),s(a),s(a);for(let e=0;e<2;++e){i[0]=a[0]-65517;for(let e=1;e<15;++e)i[e]=a[e]-65535-(i[e-1]>>16&1),i[e-1]&=65535;i[15]=a[15]-32767-(i[14]>>16&1),n=i[15]>>16&1,i[14]&=65535,o(a,i,1-n)}for(let t=0;t<16;++t)e[2*t]=255&a[t],e[2*t+1]=a[t]>>8})(n,i),n})(t);return{publicKey:E(n),privateKey:E(t)}}const I=()=>{const e=c();return d(e),E(e)}},464849(e,t,n){n.d(t,{_:()=>r});var i=n(794721);const r=({vpn_type:e})=>e===i.E.OPENVPN_CLIENT},204832(e,t,n){n.d(t,{j:()=>o,y:()=>s});const i=/^remote\s+(\S+)(?:\s+(\d+))?/m,r=/^ifconfig\s+(\S+)\s+(\S+)/m,s=e=>{let t="",n="",s="",o="",a="";const l=/<ca>(.*?)<\/ca>/gs,_=/<cert>(.*?)<\/cert>/gs,d=/<tls-auth>(.*?)<\/tls-auth>/gs,c=/-----BEGIN ENCRYPTED PRIVATE KEY-----(.*?)-----END ENCRYPTED PRIVATE KEY-----/gs,A=/<key>(.*?)<\/key>/gs;let E,p,I,N,m;for(;e&&(E=l.exec(e));)t=E[1];for(;e&&(p=_.exec(e));)n=p[1];for(;e&&(I=A.exec(e));)s=I[1];for(;e&&(N=c.exec(e));)a=N[1];for(;e&&(m=d.exec(e));)o=m[1];const u=e?i.exec(e):null,T=u?.[1],S=u?.[2]?Number(u[2]):void 0,O=e?r.exec(e):null,h=O?.[1];return{certificate_ca:t,certificate_cert:n,privateKey:s,vpnKey:o,encryptedPrivateKey:a,remoteAddress:T,remotePort:S,tunnelIp:h}},o=e=>e?.openvpn_configuration?s(e.openvpn_configuration):void 0},875762(e,t,n){n.d(t,{G:()=>d,d:()=>c});var i=n(635187),r=n(565545),s=n(570866),o=n(471195),a=n(464849);const l=/^\[([^\]]+)\]:(\d+)$/,_=e=>{if(!e)return;const t=e.match(l);if(t)return{address:t[1],port:Number(t[2]),ipVersion:r.k.v6};const[n,s]=e.split(i.oH);return{address:n,port:Number(s),ipVersion:r.k.v4}},d=e=>{const t=(e=>(e?.split("\n").map(e=>e.split("#")[0].trim())||[]).filter(Boolean).flatMap(e=>{if(e.startsWith("[")&&e.endsWith("]"))return[{type:"title",value:e.slice(1,-1)}];if(e.includes("=")){const[t,...n]=e.split("=");if(t.trim()&&n.length)return[{type:"keyValue",key:t.trim().toLowerCase(),value:n.join("=").trim()}]}return[]}))(e),n=(e=>{const t=[],n=[];let i=null;for(const r of e)"title"!==r.type?"keyValue"===r.type&&("interface"===i?t.push({key:r.key,value:r.value}):"peer"===i&&n.push({key:r.key,value:r.value})):i=r.value.toLowerCase();return{interface:Object.fromEntries(t.map(e=>[e.key.toLowerCase(),e.value])),peer:Object.fromEntries(n.map(e=>[e.key.toLowerCase(),e.value]))}})(t);return{interface:{address:(a=n.interface.address,a?a.split(i.KE).map(e=>e.trim()).filter(Boolean).map(e=>{const[t,n]=e.split(i.Ed);return{ip:t,subnet:n,version:s.zF.test(t)?r.k.v4:s.nI.test(t)?r.k.v6:void 0}}).filter(function(e){return void 0!==e.version}):[]),dns:(o=n.interface.dns,o?o.split(i.KE).map(e=>e.trim()).filter(Boolean):[]),privateKey:n.interface.privatekey},peer:{allowedIps:n.peer.allowedips?.split(i.KE).map(e=>e.trim())||[],endpoint:_(n.peer.endpoint),publicKey:n.peer.publickey,preSharedKey:n.peer.presharedkey}};var o,a},c=e=>{const t=(0,a._)(e),n=(0,o.b)(e);return t||n?void 0:d(e.wireguard_client_configuration_file||"")}},471195(e,t,n){n.d(t,{b:()=>r});var i=n(581814);const r=e=>e.wireguard_client_mode===i.hS.MANUAL},625796(e,t,n){n.d(t,{Ay:()=>l,PN:()=>o,xn:()=>a});var i=n(274934),r=n(86635),s=n(998948);const o=15,a=150,l=s.A.map(({countryCode:e,countryName:t})=>({image:()=>(0,i.jsx)(r.A,{countryCode:e,width:"auto",height:"100%",style:{borderRadius:"50%",objectFit:"cover",aspectRatio:"1 / 1"}}),label:t,value:e}))},61322(e,t,n){n.d(t,{I:()=>i});const i={HEADER_HEIGHT:32,ROW_HEIGHT:32,EDIT_FIELD_HEIGHT:36,getHeight(e,t,n,i){return Math.min((i||this.ROW_HEIGHT)*e+(n??this.HEADER_HEIGHT),(i||this.ROW_HEIGHT)*t+(n??this.HEADER_HEIGHT))},getEditContainerHeight(e,t,n){return Math.min((n||this.EDIT_FIELD_HEIGHT)*e,(n||this.EDIT_FIELD_HEIGHT)*t)}}},598890(e,t,n){n.d(t,{A:()=>l});var i=n(274934),r=n(602086),s=n(625796),o=n(656647),a=n(609553);const l=function({form:e,name:t,...n}){const l=(0,r.useMemo)(()=>s.Ay.map(({label:e,value:t,image:n})=>({type:"CHECKBOX",title:e,id:t.toString(),checkboxProps:{symbol:n()},children:[]})),[]);return(0,i.jsx)(o.A,{options:l,name:t,control:e.control,maxSelections:a.KW,...n})}},858098(e,t,n){n.d(t,{A:()=>c});var i=n(274934),r=n(602086),s=n(42220),o=n(260334),a=n(184931),l=n(100978),_=n(470070),d=n(680163);const c=function({form:e,name:t,fieldLabel:n,modalTitle:c,modalFieldPlaceholder:A,placeholder:E,itemSchema:p,transformValue:I,getDuplicationMessage:N,extraDisplayColumns:m,actions:u,max:T,disableMultiEdit:S=!1,splitBy:O,validateInArray:h,sortValue:C,hideBatchAddLabel:g=!1}){const x=(0,a.mQ)(),R=(0,o.L_)(),{formatMessage:v}=(0,_.tz)(),f=(0,r.useMemo)(()=>({fieldLabel:n,modalTitle:c,modalFieldPlaceholder:A}),[n,A,c]),M=(0,r.useMemo)(()=>({getDuplicationMessage:N??(()=>v({id:"SETTINGS_VALUE_UNIQUE"})),validateInArray:h,validate:e=>{if(O&&"string"==typeof e){const t=e.split(O).map(e=>e.trim()).filter(Boolean);for(const n of t.length>0?t:[e]){const e=p.safeParse(n);if(!e.success)return R(e.error.issues[0]?.message)}return!0}const t=p.safeParse(e);return!!t.success||R(t.error.issues[0]?.message)}}),[v,R,N,p,O,h]),y=(0,r.useMemo)(()=>({placeholder:E,translatePlaceholder:!1,parser:I?e=>I(e?.[0]?.target?.value):void 0}),[E,I]);return(0,i.jsx)(s.xI,{control:e.control,name:t,render:({field:e,fieldState:t,formState:n})=>(0,i.jsx)(l.A,{flexDirection:"column",width:"100%",children:(0,i.jsx)(d.A,{disabled:x,labels:f,fieldValidation:M,extraFieldConfig:y,value:C?C(e.value||[]):e.value||[],onChange:t=>e.onChange(t),invalid:t.invalid?R((0,s.Jt)(n.errors,e.name)?.message)||!0:void 0,extraDisplayColumns:m,actions:u,disableMultiEdit:S,max:T,splitBy:O,transformValue:I,hideBatchAddLabel:g})})})}},918071(e,t,n){n.d(t,{G:()=>i});const i=165},846294(e,t,n){n.d(t,{A:()=>_});var i=n(274934),r=n(548941),s=n(409844),o=n(184931),a=n(877840);const l=s.AH`
  width: fit-content;
`,_=({reasons:e,reason:t,children:n,isInteractive:s,noWrap:_,position:d,fitContent:c})=>{const A=(0,o.pv)(),E=[t,...e||[]].filter(Boolean)[0]||null,p=!!E;return(0,i.jsx)(a.A,{isDisabled:{fields:p,labels:p,tooltipIcons:p,tooltipPopovers:!A.fields&&p},children:(0,i.jsx)(r.A,{description:A.fields?null:E,portal:!0,isInteractive:s,noWrap:_,position:d,className:c?l:void 0,children:n})})}},877840(e,t,n){n.d(t,{A:()=>a});var i=n(274934),r=n(602086),s=n(184931),o=n(712642);const a=({isDisabled:e,isAdditive:t=!0,children:n})=>{const a=(0,s.pv)(),l=(0,r.useMemo)(()=>"boolean"==typeof e?{fields:e,labels:e,tooltipIcons:e,tooltipPopovers:!1}:e,[e]),_=(0,r.useMemo)(()=>({fields:t?l.fields||a.fields:l.fields,labels:t?l.labels||a.labels:l.labels,tooltipIcons:t?l.tooltipIcons||a.tooltipIcons:l.tooltipIcons,tooltipPopovers:t?l.tooltipPopovers||a.tooltipPopovers:l.tooltipPopovers}),[t,l.fields,l.labels,l.tooltipIcons,l.tooltipPopovers,a.fields,a.labels,a.tooltipIcons,a.tooltipPopovers]);return(0,i.jsx)(o.I.Provider,{value:_,children:n})}},16805(e,t,n){n.d(t,{A:()=>_});var i=n(274934),r=n(42220),s=n(699709),o=n(309130),a=n(260334),l=n(184931);const _=function({control:e,name:t,label:n,placeholder:_,tooltip:d,tooltipProps:c,contentAfter:A,arrowSize:E,min:p,max:I,step:N,value:m,variant:u="secondary",iconBefore:T,onAfterChange:S,onChange:O}){const h=(0,l.mQ)(),C=(0,a.L_)();return(0,i.jsx)(r.xI,{control:e,name:t,render:({field:{ref:e,...a},fieldState:l,formState:g})=>(0,i.jsx)(s.A,{type:"number",variant:u,width:"100%",...a,value:m??a.value??"",onChange:e=>{O?O(e,g):a.onChange(e.target.value?.length?+e.target.value:null),S?.(e)},disabled:h,invalid:l.invalid?C((0,r.Jt)(g.errors,t)?.message)||!0:void 0,labelTooltip:d,labelTooltipProps:{style:{opacity:h?o.xN:void 0,...c?.style},...c},label:n,placeholder:_,arrowSize:E,contentAfter:A,iconBefore:T,step:N,min:p,max:I})})}},656647(e,t,n){n.d(t,{A:()=>p});var i=n(274934),r=n(602086),s=n(42220),o=n(399935),a=n(397281),l=n(164487),_=n(597750),d=n(309130),c=n(260334),A=n(184931);const E=()=>{},p=function({control:e,name:t,tooltip:n,label:p,options:I,isVirtualized:N,isAllSelected:m,onSelectAll:u,disabledKeys:T,maxSelections:S}){const O=(0,A.mQ)(),h=(0,c.L_)(),{field:C,fieldState:g,formState:x}=(0,s.as)({control:e,name:t}),R=(0,r.useMemo)(()=>new Set(C.value),[C.value]),v=(0,r.useMemo)(()=>O?I.map(e=>e.id):T||I.flatMap(e=>"CHECKBOX"===e.type&&(e.checkboxProps?.isDisabled||S&&R.size>=S&&!R.has(e.id))?[e.id]:[]),[O,I,T,S,R]),f=(0,r.useCallback)(()=>C.onChange(I.map(e=>e.id)),[I,C]),M=(0,r.useMemo)(()=>m||(()=>!!I.length&&I.every(e=>R.has(e.id))),[m,I,R]),y=(0,r.useCallback)(()=>C.onChange([]),[C]),j=(0,r.useMemo)(()=>({disabledKeys:v}),[v]),b=(0,r.useCallback)(e=>{C.onChange("all"!==e?[...e]:I.map(e=>e.id))},[C,I]);return(0,i.jsxs)(_.A,{style:{opacity:O?d.xN:void 0},children:[p?(0,i.jsx)(l.A,{tooltip:n,children:p}):null,(0,i.jsx)(a.A,{onSelectionChange:b,"aria-disabled":O,selectedKeys:R,treeProps:j,items:I,isVirtualized:N,setSelectedKeys:E,onSelectAll:u??f,onDeselectAll:y,isAllSelected:M,hasSelectAllControl:!S}),g.invalid?(0,i.jsx)(o.A,{isInvalid:!0,label:h((0,s.Jt)(x.errors,t)?.message)}):void 0]})}},635891(e,t,n){n.d(t,{A:()=>d});var i=n(274934),r=n(42220),s=n(699709),o=n(775250),a=n(309130),l=n(260334),_=n(184931);const d=function({control:e,name:t,label:n,placeholder:d,tooltip:c,tooltipProps:A,autoFocus:E,motif:p,onChange:I,onBlur:N,onAfterChange:m,onPaste:u,onKeyDown:T,passwordToggle:S,type:O,helperMessage:h,autoComplete:C,contentBefore:g,contentAfter:x,onFocus:R,value:v,invalid:f}){const M=(0,_.mQ)(),y=(0,_.Im)(),j=(0,_.q)(),b=(0,l.L_)();return(0,i.jsx)(r.xI,{control:e,name:t,render:({field:e,fieldState:l,formState:_})=>(0,i.jsx)(s.A,{type:O||(S?"password":"text"),variant:"secondary",width:"100%",autoFocus:E,...e,onChange:t=>{I?I(t,e,_):e.onChange(t),m?.(t)},onBlur:t=>{N?N(t,e,_):e.onBlur()},onFocus:R,onPaste:u,disabled:M,value:v??e.value?.toString(),invalid:f||(l.invalid?(0,i.jsxs)(o.A,{variant:"inherit",style:{overflowWrap:"break-word"},children:[b((0,r.Jt)(_.errors,t)?.message)||!0," "]}):void 0),label:n,placeholder:d,labelTooltip:c,labelTooltipProps:{style:{opacity:y?a.xN:void 0,pointerEvents:j?"none":void 0,...A?.style},...A},motif:p,passwordToggle:S,helperMessage:h,autoComplete:C,onKeyDown:T,contentBefore:g,contentAfter:x})})}},59564(e,t,n){n.d(t,{Z:()=>a});var i=n(241792),r=n(745454),s=n(640708),o=n(260334);const a=i.Yj({message:(0,o.rn)("COMMON_VALIDATION_VALID_IPV4_IPV6")}).refine(e=>(0,r.isValidIpv6)(e)||(0,r.isValidIpv4)(e),{message:(0,o.rn)("COMMON_VALIDATION_VALID_IPV4_IPV6")}).refine(e=>!(0,s.m0)(e),{message:(0,o.rn)("SETTINGS_NETWORKS_IPV6_ADDRESS_IPV4_MAPPED_IPV6_INVALID")}).refine(e=>!(0,s.aN)(e),{message:(0,o.rn)("SETTINGS_NETWORKS_IPV6_ADDRESS_MULTICAST_INVALID")})},149450(e,t,n){n.d(t,{B:()=>a,b:()=>o});var i=n(241792),r=n(745454),s=n(260334);const o=i.Yj({message:(0,s.rn)("COMMON_VALIDATION_VALID_IPV4")}).refine(e=>!e||(0,r.isValidIpv4)(e),{message:(0,s.rn)("COMMON_VALIDATION_VALID_IPV4")}),a=i.Yj({message:(0,s.rn)("COMMON_VALIDATION_VALID_IPV4")}).refine(e=>(0,r.isValidIpv4)(e),{message:(0,s.rn)("COMMON_VALIDATION_VALID_IPV4")})},199220(e,t,n){n.d(t,{Jh:()=>a,XK:()=>o,m9:()=>l});var i=n(241792),r=n(640708),s=n(260334);const o=i.Yj().ip({version:"v6",message:(0,s.rn)("SETTINGS_NETWORKS_IPV6_ADDRESS_INVALID")}).refine(e=>!e||!e.includes("%"),{message:(0,s.rn)("SETTINGS_NETWORKS_IPV6_ADDRESS_INVALID")}),a=i.KC([i.Yj().ip({version:"v6",message:(0,s.rn)("SETTINGS_NETWORKS_IPV6_ADDRESS_INVALID")}),i.eu("")]).optional().refine(e=>!e||!e.includes("%"),{message:(0,s.rn)("SETTINGS_NETWORKS_IPV6_ADDRESS_INVALID")}),l=o.refine(e=>!(0,r.m0)(e),{message:(0,s.rn)("SETTINGS_NETWORKS_IPV6_ADDRESS_IPV4_MAPPED_IPV6_INVALID")}).refine(e=>!(0,r.aN)(e),{message:(0,s.rn)("SETTINGS_NETWORKS_IPV6_ADDRESS_MULTICAST_INVALID")})},871808(e,t,n){n.d(t,{A:()=>o});var i=n(602086),r=n(977872),s=n(167933);const o=e=>(0,r.d4)((0,i.useMemo)(()=>(0,s.jN)(e),[e]))}}]);