"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[9490],{345558:(e,t,l)=>{l.d(t,{_:()=>r});var a=l(691189);const n="hotspotConfig",r=(e={},t={})=>(0,a.Kd)(n,"/api/stat/s/{site}/hotspotconfig",n,e,t)},579229:(e,t,l)=>{l.d(t,{d:()=>i});var a=l(801081),n=l(87485),r=l(25553),c=l(226034),s=l(141997);const i=(0,a.Mz)(e=>{const{startDate:t,endDate:l}=(0,c.kR)(e);return(0,r.uh)((0,s.P)({start:t.getTime(),end:l.getTime()}))(e)},n.kh)},129490:(e,t,l)=>{l.d(t,{N:()=>Cn});var a=l(296540),n=l(670180),r=l(469733),c=l(9535),s=l(46685),i=l(716654),o=l(861878),u=l(604482),m=l(445054),d=l(580176),E=l(71479),A=l(294303),O=l(566723);const T=(0,E.A)(A.A)`
  flex-direction: column;
  gap: ${O.kc};
  margin-bottom: ${O.Ln};
`;var S=l(451723),C=l(845030),h=l(398300);const p=(0,a.memo)(()=>{const e=(0,r.useDispatch)(),t=(0,a.useCallback)(()=>{e((0,C.XP)({id:h.H.FLOWS_DOWNLOAD,type:h.H.FLOWS_DOWNLOAD}))},[e]);return(0,S.A)().isFlowsDownloadAvailable?a.createElement(o.A,{onPress:t,labelId:"COMMON_DOWNLOAD"}):null}),_=()=>{const e=(0,r.useDispatch)(),t=(0,r.useSelector)(i._S),l=(0,m.A)(u.g1.INSIGHTS),n=(0,a.useCallback)(()=>{e((0,s.A)())},[e]),E=(0,a.useCallback)(()=>{e((0,d.GD)(u.g1.INSIGHTS))},[e]);return a.createElement(T,null,a.createElement(c.A,{onClear:n,disabled:t}),a.createElement(p,null),a.createElement(o.A,{onPress:E,labelId:"COMMON_CUSTOMIZE_COLUMNS",disabled:l}))};var b=l(314714),N=l(217439),M=l(592563),g=l(429252),P=l.n(g),I=l(459449),R=l(889188),D=l(469987),f=l(67716),k=l(407652),v=l(198494),L=l(523275),y=l(775699),z=l(415246),w=l(77247),H=l(518089);const U=(0,E.A)(H.CW)``,$=(0,E.A)(H.kp)`
  gap: ${O.kc};
  > label:first-child {
    margin-bottom: ${O.xO};
  }
`;var x=l(362412),V=l(792072),Y=l(277517),W=l(765051),G=l(39512);const F=(0,E.A)(A.A)`
  flex-direction: column;
  gap: ${O.kc};
`,B=(0,a.memo)(()=>{const e=(0,r.useDispatch)(),{formatMessage:t}=(0,I.tz)(),l=(0,r.useSelector)(i.zB),n=(0,r.useSelector)(V.Ty),c=(0,r.useSelector)(Y.YX),{areAllFlowsSupported:s,areAllFlowsEnabled:o}=(0,S.A)(),u=(0,a.useMemo)(()=>[...s?[{value:W.L1.ALL_FLOWS,label:t({id:"FLOWS_ALL_FLOWS"}),disabled:!o}]:[],{value:W.L1.BLOCKED,label:t({id:"COMMON_BLOCKED"})},{value:W.L1.THREATS,label:t({id:"COMMON_THREATS"})},...n?[{value:W.L1.NEXT_AI,label:t({id:"COMMON_NEXT_AI"}),disabled:!c}]:[]],[t,n,c,s,o]),m=(0,a.useCallback)(({value:t})=>{e((0,G.A)(t))},[e]);return a.createElement(F,null,a.createElement(N.A,{size:"small",color:"text-1"},a.createElement(I.sA,{id:"COMMON_CUSTOMIZE_COLUMNS"})),a.createElement(x.A,{options:u,variant:"secondary",width:"100%",value:l,onChange:m}))}),K=(0,a.memo)(()=>{const e=(0,r.useDispatch)(),t=(0,a.useRef)(null),l=(0,w.A)(t),n=(0,r.useSelector)(i.bB),c=(0,r.useSelector)(i.zB),s=(0,a.useCallback)(({target:{checked:t,name:l}})=>{e((0,D.jo)(t?[...n,l]:n.filter(e=>e!==l)))},[e,n]),o=(0,a.useMemo)(()=>P()(n,k.RI[c]),[n,c]),{tablePresets:m}=(0,r.useSelector)(v.Gm),{sizes:E}=(0,a.useMemo)(()=>m[c],[m,c]),A=(0,a.useMemo)(()=>P()(E,(0,L.A)()),[E]),O=(0,r.useSelector)(i.mE),T=(0,a.useCallback)(({target:{ariaChecked:t}})=>{switch(t){case"true":return e((0,D.jo)([])),null;case"false":case"mixed":return e((0,D.jo)(O)),null;default:return null}},[e,O]),S=(0,a.useCallback)(()=>{e((0,d.Zi)(u.g1.INSIGHTS))},[e]),C=(0,a.useCallback)(()=>{(0,r.batch)(()=>{o||e((0,D.jo)(k.RI[c])),A||e((0,y.dR)({[z.lR.TABLE_PRESETS]:{...m,[c]:{...m[c],sizes:(0,L.A)()}}}))})},[e,c,o,m,A]),h=(0,a.useMemo)(()=>!!n.length&&(n.length===O.length||"mixed"),[n.length,O.length]),p=(0,a.useMemo)(()=>o&&A,[o,A]);return a.createElement(U,{hasOverflow:l},a.createElement(B,null),a.createElement($,null,a.createElement(b.A,{id:"flows-all-columns",checked:h,onChange:T},a.createElement(N.A,{size:"medium",color:"text-2"},a.createElement(I.sA,{id:"COMMON_ALL"}))),O.map(e=>a.createElement(b.A,{key:e,id:e,checked:n.includes(e),name:e,onChange:s},a.createElement(N.A,{size:"medium",color:"text-2"},a.createElement(I.sA,{id:R.eu[e]})))),a.createElement(H.Ot,null,a.createElement(f.d$,null),a.createElement(M.A,{type:"button",onPress:C,isDisabled:p},a.createElement(N.A,{size:"medium",color:"inherit"},a.createElement(I.sA,{id:"COMMON_ACTION_RESTORE"}))),a.createElement(M.A,{type:"button",onPress:S},a.createElement(N.A,{size:"medium",color:"inherit"},a.createElement(I.sA,{id:"COMMON_ACTION_DONE"}))))))}),j=(0,a.memo)(()=>(0,m.A)(u.g1.INSIGHTS)?a.createElement(K,null):null);var Z=l(436017),X=l(177846),q=l(260411),J=l(86747),Q=l(903216),ee=l(310067),te=l(224323),le=l(509426),ae=l(822336);const ne=(0,E.A)(A.A)`
  border: 1px solid ${({theme:{themeName:e}})=>ae.Ay[`desktop-color-neutral-03-${e}`]};
  border-radius: ${ae.Ay["desktop-radius-base"]};
  padding: ${O.kc};
  gap: ${O.kc};
  width: 100%;
  flex-direction: column;
`,re=(0,E.A)(A.A)`
  justify-content: space-between;
  width: 100%;
  align-items: center;
`;var ce=l(801081),se=l(792542);const ie=(0,ce.Mz)(se.Sm,e=>e.reduce((e,t)=>e+t["rx_byte-r"]*t.interval_seconds,0)),oe=(0,ce.Mz)(se.Sm,e=>e.reduce((e,t)=>e+t["tx_byte-r"]*t.interval_seconds,0)),ue=()=>{const e=(0,r.useDispatch)(),{formatMessage:t}=(0,I.tz)(),l=(0,r.useSelector)(X.Vn),n=(0,r.useSelector)(X.mE),c=(0,r.useSelector)(ie),s=(0,r.useSelector)(oe),i=(0,a.useCallback)(({target:{checked:t}})=>{e((0,q.dm)(t))},[e]),o=(0,a.useCallback)(({value:t})=>{e((0,q.YO)(t))},[e]),u=(0,a.useMemo)(()=>[{value:J.u.INTERNET_ACTIVITY,image:a.createElement(ee.A,null),label:t({id:"COMMON_INTERNET_ACTIVITY"}),additionalInfo:(0,Q.FI)(c+s)},{value:J.u.DOWNLOAD,image:a.createElement(te.A,null),label:t({id:"COMMON_DOWNLOAD"}),additionalInfo:(0,Q.FI)(c)},{value:J.u.UPLOAD,image:a.createElement(le.A,null),label:t({id:"COMMON_UPLOAD"}),additionalInfo:(0,Q.FI)(s)}],[t,c,s]);return a.createElement(ne,null,a.createElement(re,null,a.createElement(N.A,{size:"medium",color:"text-2"},a.createElement(I.sA,{id:"COMMON_STATS"})),a.createElement(Z.A,{style:{width:"auto"},onChange:i,checked:l,full:!0,size:"small"})),l?a.createElement(x.A,{style:{whiteSpace:"nowrap"},options:u,width:"100%",variant:"secondary",value:n,onChange:o}):null)};var me=l(149188),de=l(584916),Ee=l(992149),Ae=l(739177);const Oe=(0,a.memo)(()=>{const e=(0,r.useDispatch)(),t=(0,r.useSelector)(X.Bw),[l,n]=(0,a.useState)(null===t.preset?de.j:t.preset),[c,s]=(0,a.useState)(null===t.preset?{startDate:t.startDate,endDate:t.endDate}:null),i=(0,a.useCallback)(({id:t})=>{const l=Ae.i8.find(e=>e.id===t);l?e((0,q.Xy)({...l.getRange(new Date),preset:t})):c&&e((0,q.Xy)({...c,preset:de.j})),n(t)},[c,e]),o=(0,a.useCallback)(t=>{s(t),e((0,q.Xy)({...t,preset:de.j})),n(de.j)},[e]),u=(0,a.useMemo)(()=>Ae.i8.map(({id:e,message:t,messageValues:l})=>({id:e,label:a.createElement(I.sA,{id:t,values:l})})).concat({id:de.j,label:a.createElement(me.A,null)}),[]);return a.createElement(Ee.A,{presets:u,selectedPreset:l,range:t,onSelectTab:i,onSelectCustomRange:o,showCalendar:l===de.j})});var Te=l(445535),Se=l(89716),Ce=l(767974),he=l(918060),pe=l(668995),_e=l(318686),be=l(455155),Ne=l(175522);const Me=({total_bytes:e},{total_bytes:t})=>t-e,ge=({category:e,application:t})=>(({name:l,iconFileName:n})=>({id:[e,t].join(Ne.A),type:"CHECKBOX",title:l,checkboxProps:{symbol:a.createElement(be.A,{iconFileName:n,dimension:20})},children:[]}))(_e.Z6[(0,pe.h)(e,t)]),Pe=(0,a.memo)(({queryParams:e})=>{const t=(0,r.useDispatch)(),l=(0,r.useSelector)(X.Uz),n=(0,r.useSelector)((0,a.useMemo)(()=>(0,Se.mH)(e),[e])),c=(0,a.useMemo)(()=>n.sort(Me).map(ge),[n]),s=(0,a.useMemo)(()=>l.length===n.length?"all":new Set(l.map(e=>[e[Ce.wA.CAT],e[Ce.wA.APP]].join(Ne.A))),[l,n.length]),i=(0,a.useCallback)(e=>{t((0,q.yJ)("all"===e?l:Array.from(e).map(e=>(([e,t])=>({[Ce.wA.CAT]:+e,[Ce.wA.APP]:+t}))(e.toString().split(Ne.A)))))},[t,l]),o=(0,a.useCallback)(()=>{t((0,q.yJ)(n.map(({category:e,application:t})=>({[Ce.wA.CAT]:e,[Ce.wA.APP]:t}))))},[t,n]),u=(0,a.useCallback)(()=>{t((0,q.yJ)([]))},[t]);return a.createElement(he.A,{items:c,selectedKeys:s,onSelectionChange:i,onSelectAll:o,onDeselectAll:u})});var Ie=l(703447);const Re=({total_bytes:e},{total_bytes:t})=>t-e,De=({client:e,client:{mac:t,name:l}})=>({id:t,type:"CHECKBOX",checkboxProps:{symbol:a.createElement(Ie.A,{client:e,width:20,height:20})},title:l,children:[]}),fe=(0,a.memo)(({queryParams:e})=>{const t=(0,a.useRef)(void 0),l=(0,r.useDispatch)(),n=(0,r.useSelector)(X.Wq),c=(0,r.useSelector)((0,a.useMemo)(()=>(0,Se.WY)(e),[e])),s=(0,a.useMemo)(()=>{return t.current?(e=[t.current,...c]).filter((e=>({mac:t},l)=>e.findIndex((e=>t=>t.mac===e)(t))===l)(e)):c;var e},[c,t]),i=(0,a.useMemo)(()=>s.sort(Re).map(De),[s]),o=(0,a.useMemo)(()=>c.map(({mac:e})=>e),[c]),u=(0,a.useMemo)(()=>n.length===o.length?"all":new Set(n),[o.length,n]),m=(0,a.useCallback)(e=>{l((0,q._b)("all"===e?o:Array.from(e)))},[l,o]),d=(0,a.useCallback)(()=>{l((0,q._b)(o))},[l,o]),E=(0,a.useCallback)(()=>{l((0,q._b)([]))},[l]);return(0,a.useEffect)(()=>{const e=c.find(({mac:e})=>n.includes(e));e&&(t.current=e)},[c,n]),a.createElement(he.A,{items:i,selectedKeys:u,onSelectionChange:m,onSelectAll:d,onDeselectAll:E})});var ke=l(120205);const ve=(0,a.memo)(()=>{const e=(0,r.useSelector)(X.Bw),t=(0,r.useSelector)(X.nc),l=(0,a.useMemo)(()=>({start:e.startDate.getTime(),end:e.endDate.getTime(),includeUnidentified:!0}),[e]),{ActivityPicker:n,title:c}=(0,a.useMemo)(()=>{switch(t){case ke.f.CLIENTS:return{ActivityPicker:a.createElement(fe,{queryParams:l}),title:a.createElement(I.sA,{id:"COMMON_CLIENTS"})};case ke.f.APPS:return{ActivityPicker:a.createElement(Pe,{queryParams:l}),title:a.createElement(I.sA,{id:"COMMON_APPLICATIONS"})};default:return{ActivityPicker:null,title:null}}},[t,l]);return a.createElement(Te.A,{label:c},n)}),Le=(0,a.memo)(()=>{const e=(0,r.useDispatch)(),t=(0,r.useSelector)(X.ij),l=(0,a.useCallback)(()=>{e((0,q.qx)())},[e]);return a.createElement(c.A,{onClear:l,disabled:t})});var ye=l(54227),ze=l(705145);const we=(0,E.A)(A.A)`
  flex-direction: row;
  gap: ${O.Ln};
  > label {
    max-width: 50%;
    p {
      max-width: 100%;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
  }
`,He=()=>{const e=(0,r.useDispatch)(),t=(0,r.useSelector)(X.nc),l=(0,a.useCallback)(t=>()=>{e((0,q.P7)(t))},[e]),n=(0,a.useMemo)(()=>[{id:ke.f.APPS,children:a.createElement(I.sA,{id:"COMMON_APPLICATIONS"}),onChange:l(ke.f.APPS),checked:t===ke.f.APPS},{id:ke.f.CLIENTS,children:a.createElement(I.sA,{id:"COMMON_CLIENTS"}),onChange:l(ke.f.CLIENTS),checked:t===ke.f.CLIENTS}],[t,l]);return a.createElement(Te.A,{label:a.createElement(I.sA,{id:"ACTIVITY_ANCHOR_BY"})},a.createElement(we,null,n.map(({id:e,checked:t,onChange:l,children:n})=>a.createElement(ye.A,{key:e,id:e,checked:t,onChange:l},a.createElement(ze.A,{isTruncated:!0,color:"inherit",size:"inherit"},n)))))};var Ue=l(974546),$e=l(879077),xe=l(639775),Ve=l(451919),Ye=l(269672),We=l(282556),Ge=l(602021),Fe=l(261686);const Be="id",Ke=[Be,"name","hostname","ip","authorized_by","voucher_code","formattedVoucher","returning","startTime","endTime"],je=new Ue.A.Document({tokenize:"forward",cache:500,encode:xe.Rd,document:{store:Ke,id:Be,index:Ke}}),Ze=()=>{const{formatMessage:e}=(0,I.tz)(),t=(0,r.useSelector)(We.zi),l=(0,r.useSelector)(Ge.hq),n=(0,r.useSelector)(v.BQ),{placeholder:c,returning:s,newLabel:i}=(0,a.useMemo)(()=>({placeholder:e({id:"HOTSPOT_SEARCH_GUESTS"}),returning:e({id:"HOTSPOT_RETURNING"}),newLabel:e({id:"COMMON_NEW"})}),[e]),o=(0,a.useMemo)(()=>new Intl.DateTimeFormat(t,{timeZone:l,hourCycle:n,day:"numeric",month:"short",hour:"numeric",minute:"numeric",year:"numeric"}),[t,l,n]),u=(0,r.useSelector)((0,a.useMemo)(()=>(0,Fe.a)({returning:s,newLabel:i},o),[s,i,o]));return a.createElement($e.A,{lsKey:Ve.UZ.HOTSPOT_GUEST_SEARCH,searchModelName:Ye.U4.HOTSPOT_GUESTS,searchIndex:je,enabledColumns:Ke,records:u,recordIdKey:Be,placeholder:c})};var Xe=l(412808),qe=l(164520);const Je=["id","name"],Qe=new Ue.A.Document({tokenize:"forward",cache:500,encode:xe.Rd,document:{store:Je,id:"id",index:Je}}),et=()=>a.createElement($e.A,{lsKey:Ve.UZ.HOTSPOT_PAYMENTS_SEARCH,searchModelName:Ye.U4.HOTSPOT_PAYMENTS,searchIndex:Qe,enabledColumns:Je,records:(0,r.useSelector)(qe.b),recordIdKey:"id",placeholder:(0,I.tz)().formatMessage({id:"HOTSPOT_SEARCH_PAYMENTS"})});var tt=l(207196);const lt=["id","note"],at=new Ue.A.Document({tokenize:"forward",cache:500,encode:xe.Rd,document:{store:lt,id:"id",index:lt}}),nt=()=>a.createElement($e.A,{lsKey:Ve.UZ.HOTSPOT_VOUCHERS_SEARCH,searchModelName:Ye.U4.HOTSPOT_VOUCHERS,searchIndex:at,enabledColumns:lt,records:(0,r.useSelector)(tt.x),recordIdKey:"id",placeholder:(0,I.tz)().formatMessage({id:"HOTSPOT_SEARCH_VOUCHERS"})}),rt=({hotspotRoute:e})=>{switch(e){case Xe.z.GUESTS:return a.createElement(Ze,null);case Xe.z.PAYMENTS:return a.createElement(et,null);case Xe.z.VOUCHERS:return a.createElement(nt,null);case Xe.z.PORTAL:default:return null}};var ct,st=l(497336),it=l.n(st),ot=l(76671),ut=l.n(ot),mt=l(814942),dt=l.n(mt),Et=l(208288),At=l(515893),Ot=l(297651),Tt=l(874807),St=l(915315);!function(e){e.DEFAULT="default",e.DROPDOWN="dropdown"}(ct||(ct={}));var Ct=l(609392);const ht=({dateRange:e,onRangeSelected:t=Tt.A,onClear:l=Tt.A,twoMonthCalendar:n=!0,disabled:r=!1,isActive:c=!0,forcedValue:s,presets:i,isClearable:o=!0,calendarVariant:u=ct.DROPDOWN})=>{const{formatMessage:m}=(0,I.tz)(),[d,E]=(0,a.useState)(!1),[A,O]=(0,a.useState)(!1),{startDate:T,endDate:S}=e||{},{minValue:C,maxValue:h}=(0,a.useMemo)(()=>T&&S?{minValue:(0,Et.A)(T,"CalendarDate"),maxValue:(0,Et.A)(dt()(S,1),"CalendarDate")}:{},[S,T]),[p,_]=(0,a.useState)(c?{start:C,end:h}:null);(0,a.useEffect)(()=>{!e&&p&&_(null)},[e,p]);const b=(0,a.useCallback)(()=>{O(!1)},[]),N=(0,a.useCallback)(e=>{if(_(e),E(Boolean(e)),e&&(0,Ct.Q)(e)){const l=ut()(e.start.toString());t({startDate:l.getTime()<0?new Date(0):l,endDate:it()(e.end.toString())}),b()}},[t,b]),M=(0,a.useCallback)(e=>{_(e),b()},[b]),g=(0,a.useCallback)(e=>{O(e)},[]),P=(0,a.useCallback)(e=>{e&&!p&&Boolean(C)&&Boolean(h)&&_({start:C,end:h}),e||d||_(null),O(e)},[d,h,C,p]),{DateRangePicker:R,onChange:D,onOpenChange:f}=(0,a.useMemo)(()=>{switch(u){case ct.DEFAULT:return{DateRangePicker:At.A,onChange:M,onOpenChange:g};case ct.DROPDOWN:return{DateRangePicker:Ot.A,onChange:N,onOpenChange:P};default:return{DateRangePicker:void 0,onChange:Tt.A,onOpenChange:Tt.A}}},[u,g,P,N,M]);(0,a.useEffect)(()=>{const{startDate:t,endDate:l}=s||(e.preset===de.j?e:{});if(!t||!l)return _(null),void E(!1);_({start:(0,Et.A)(t,"CalendarDate"),end:(0,Et.A)(dt()(l,1),"CalendarDate")})},[s,e]);const k=(0,a.useMemo)(()=>({startsAtLabel:m({id:"COMMON_STARTS_AT"}),endsAtLabel:m({id:"COMMON_ENDS_AT"}),applyButton:m({id:"COMMON_ACTION_APPLY"}),cancelButton:m({id:"COMMON_ACTION_CANCEL"})}),[m]),v=(0,a.useCallback)(()=>{E(!1),l(),_(null)},[l]),{calendarMaxValue:L,calendarMinValue:y}=(0,a.useMemo)(()=>({calendarMaxValue:(0,Et.A)(new Date,"CalendarDate"),calendarMinValue:(0,Et.A)(new Date(0),"CalendarDate")}),[]);return r?null:a.createElement(St.w,{isActive:c},a.createElement(R,{localizationTexts:k,value:p,defaultFocusedValue:h,shouldCloseOnSelect:!1,isOpen:A,onOpenChange:f,maxValue:L,minValue:y,twoMonthCalendar:n,onChange:D,onClear:v,isClearable:o,"aria-label":"Date Range Picker",presets:i}))};var pt=l(979106),_t=l(572112);const bt=(0,E.A)(pt.A)`
  overflow-x: unset !important;
  justify-content: center;
  // without flex: 0 the styling looked very weird on smaller screens.
  flex: 0;

  @media ${_t.A.VIEWPORT_M_UP} {
    justify-content: flex-end;
  }
  > div {
    margin: unset;
    > button > span > div {
      display: flex;
    }
  }
`,Nt=({dateRange:e,setDateRange:t,dateRangePresets:l})=>{const n=(0,r.useDispatch)(),[c,s]=(0,a.useState)(null===e.preset?{startDate:e.startDate,endDate:e.endDate}:null),i=(0,a.useCallback)(()=>{const e=l[0];e&&n(t({...e.getRange(new Date),preset:e.id}))},[l,t,n]),o=(0,a.useCallback)(({id:e})=>{const a=l.find(t=>t.id===e);a?n(t({...a.getRange(new Date),preset:e})):c&&n(t({...c,preset:de.j}))},[c,l,t,n]),u=(0,a.useMemo)(()=>l.map(({id:e,message:t,messageValues:l})=>({id:e,label:a.createElement(I.sA,{id:t,values:l})})),[l]),m=(0,a.useCallback)(e=>{s(e),n(t({...e,preset:de.j}))},[n,t]),d=(0,a.useMemo)(()=>({id:de.j,label:a.createElement(ht,{dateRange:e,onClear:i,onRangeSelected:m})}),[e,i,m]),E=(0,a.useMemo)(()=>Array.prototype.concat.apply([],[...u,d]),[u,d]);return a.createElement(bt,{variant:"filter",tabs:E,selectedTab:null===e.preset?de.j:e.preset,onSelectTab:o,stretched:!0})};var Mt=l(912955),gt=l(464088);const Pt=(0,a.memo)(()=>a.createElement(Nt,{dateRange:(0,r.useSelector)(gt.K5),setDateRange:Mt.qe,dateRangePresets:(0,r.useSelector)(gt.gu)}));var It=l(334377),Rt=l(226034);const Dt=(0,a.memo)(()=>a.createElement(Nt,{dateRange:(0,r.useSelector)(Rt.kR),setDateRange:It.aX,dateRangePresets:(0,r.useSelector)(Rt.u_)})),ft=({hotspotRoute:e})=>{switch(e){case Xe.z.GUESTS:return a.createElement(Pt,null);case Xe.z.PAYMENTS:return a.createElement(Dt,null);case Xe.z.VOUCHERS:case Xe.z.PORTAL:default:return null}};var kt=l(956347),vt=l(291231),Lt=l(627440),yt=l(257143),zt=l(478211),wt=l(118818),Ht=l(302167),Ut=l(582724),$t=l(457311),xt=l(592510);const Vt="LANDING_PAGE_BUTTON_TEXT_CLASSNAME",Yt="LANDING_PAGE_SVG_CLASSNAME",Wt=(0,E.A)(A.A,{shouldForwardProp:e=>"isActive"!==e})`
  gap: ${O.kc};
  align-items: center;
  border: 1px solid ${({theme:{themeName:e}})=>ae.Ay[`desktop-color-neutral-02-${e}`]};
  border-radius: 6px;
  padding: ${O.YC} ${O.kc};
  justify-content: center;
  cursor: pointer;
  .${Vt}, .${Yt} {
    color: ${({theme:{themeName:e},isActive:t})=>t?ae.Ay[`desktop-color-ublue-06-${e}`]:"inherit"} !important;
  }
  &:hover {
    .${Vt}, .${Yt} {
      color: ${({theme:{themeName:e}})=>ae.Ay[`desktop-color-neutral-07-${e}`]};
    }
  }
  .${Vt}, .${Yt} {
    transition: color 0.2s ease;
    color: ${({theme:{themeName:e}})=>ae.Ay[`desktop-color-neutral-08-${e}`]};
  }
  &:active {
    .${Vt}, .${Yt} {
      color: ${({theme:{themeName:e}})=>ae.Ay[`desktop-color-neutral-09-${e}`]};
    }
  }
`,Gt=(0,a.memo)(({onClick:e,isActive:t})=>{const{portal_enabled:l}=(0,r.useSelector)(Ht.fX);return(0,Ut.A)([(0,$t.Uc)(void 0,{crudCacheStrategy:{type:xt.e.CACHE}})],a.createElement(Wt,{onClick:e,isActive:t},a.createElement(zt.A,{size:"original",className:Vt}),a.createElement(N.A,{size:"medium",color:"inherit",className:Yt},a.createElement(I.sA,{id:"COMMON_LANDING_PAGE"})),a.createElement(wt.A,{variant:l?"success":"neutral"})))}),Ft=(0,E.A)(A.A)`
  flex-direction: column;
  gap: ${O.YC};
`,Bt=()=>{const e=(0,kt.W6)(),t=(0,kt.g)(),l=(0,r.useSelector)(vt.G),c=(0,a.useMemo)(()=>[{id:Xe.z.GUESTS,label:a.createElement(I.sA,{id:"COMMON_GUESTS"}),disabled:!l[Xe.z.GUESTS][Lt.o9.NAVIGATION][Lt.mx.AVAILABLE]},{id:Xe.z.PAYMENTS,label:a.createElement(I.sA,{id:"COMMON_PAYMENTS"}),disabled:!l[Xe.z.PAYMENTS][Lt.o9.NAVIGATION][Lt.mx.AVAILABLE]},{id:Xe.z.VOUCHERS,label:a.createElement(I.sA,{id:"COMMON_VOUCHERS"}),disabled:!l[Xe.z.VOUCHERS][Lt.o9.NAVIGATION][Lt.mx.AVAILABLE]}],[l]),s=(0,a.useCallback)(({id:l})=>{e.push((0,kt.tW)(yt.K[n.H.HOTSPOT],{...t,subSection:l}))},[e,t]),i=(0,a.useCallback)(()=>{s({id:Xe.z.PORTAL})},[s]);return a.createElement(Ft,null,a.createElement(pt.A,{tabs:c,onSelectTab:s,selectedTab:t.subSection,variant:"filter",stretched:!0}),l[Xe.z.PORTAL][Lt.o9.NAVIGATION][Lt.mx.AVAILABLE]?a.createElement(Gt,{onClick:i,isActive:t.subSection===Xe.z.PORTAL}):null)};var Kt,jt=l(758649),Zt=l(927099),Xt=l(64741),qt=l(866709),Jt=l(157240),Qt=l(832914),el=l(137625),tl=l(712492),ll=l(126457),al=l(776309),nl=l(297465),rl=l(10164),cl=l(259853),sl=l(995710);!function(e){e.ALL="all",e.BATCH="batch",e.UNUSED="unused",e.CUSTOM="custom"}(Kt||(Kt={}));const il="voucher-print-container-wrapper-id",ol="voucher-print-container-id",ul="voucher-print-inner-container-id",ml="voucher-print-page-break-id",dl=[{id:"HOTSPOT_PRINT_ALL",voucherPrintType:Kt.ALL},{id:"HOTSPOT_PRINT_BATCH",voucherPrintType:Kt.BATCH},{id:"HOTSPOT_PRINT_UNUSED",voucherPrintType:Kt.UNUSED}],El=(0,a.memo)(({qos_usage_quota:e})=>a.createElement(Zt.A,{size:"label",style:{color:"#000000"}},a.createElement(I.sA,{id:"COMMON_DATA_LIMIT"}),": ",e?a.createElement(a.Fragment,null,e," ",a.createElement(I.sA,{id:"COMMON_UNIT_BYTES_SHORT",values:{prefix:"M"}})):a.createElement(I.sA,{id:"COMMON_UNLIMITED"}))),Al=(0,a.memo)(({code:e})=>a.createElement(Zt.A,{size:"header-xs",weight:"bold",style:{color:"#000000"}},e));var Ol=l(137298);const Tl=(0,a.memo)(({qos_rate_max_down:e})=>a.createElement(Zt.A,{size:"label",style:{color:"#000000"}},a.createElement(I.sA,{id:"HOTSPOT_VOUCHER_DOWNLOAD_SPEED"}),": ",e?a.createElement("span",null,(0,Ol.Up)(e)):a.createElement(I.sA,{id:"COMMON_UNLIMITED"})));var Sl=l(90757);const Cl=(0,a.memo)(({duration:e})=>a.createElement(Zt.A,{size:"body",style:{color:"#666666",textDecoration:"underline"}},a.createElement(I.sA,{id:"HOTSPOT_VOUCHER_VALID_FOR"})," ",(0,Sl.Ay)(60*e)));var hl=l(968154);const pl=()=>a.createElement(hl.m,null,a.createElement("style",null,`\n        @media screen { #${il} { overflow: hidden; height: 0; width: 0; } }\n        @media print { \n          html, body { height: auto !important; overflow: initial !important; -webkit-print-color-adjust: exact; background: #ffffff; } \n          #${il} { margin: 0; padding: 0; display: table; }\n          #${ml} { display: block; break-before: always; }\n          #${ol} { display: table-cell; float: left; break-before: always; }\n          #${ul} { display: flex; flex-direction: column; width: 166px; height: 112px; text-align: center; border: 1px dashed #000000; } }\n      `)),_l=(0,a.memo)(({qos_rate_max_up:e})=>a.createElement(Zt.A,{size:"label",style:{color:"#000000"}},a.createElement(I.sA,{id:"HOTSPOT_VOUCHER_UPLOAD_SPEED"}),": ",e?a.createElement("span",null,(0,Ol.Up)(e)):a.createElement(I.sA,{id:"COMMON_UNLIMITED"}))),bl=(0,a.forwardRef)(({vouchersForPrint:e},t)=>a.createElement(a.Fragment,null,a.createElement(pl,null),a.createElement("div",{id:il,ref:t},e.map(({duration:e,code:t,qos_rate_max_down:l,qos_rate_max_up:n,qos_usage_quota:r})=>a.createElement("div",{key:t,id:ol},a.createElement("div",{id:ml}),a.createElement("div",{id:ul},a.createElement(Cl,{duration:e}),a.createElement(Al,{code:t}),a.createElement(Tl,{qos_rate_max_down:l}),a.createElement(_l,{qos_rate_max_up:n}),a.createElement(El,{qos_usage_quota:r})))))));var Nl=l(879002);const Ml=({onPrintClick:e,showPrintPopover:t,setShowPrintPopover:l})=>{const n=(0,a.useRef)(null);return(0,Nl.A)(n,()=>{t&&l(!1)},[t]),a.createElement(A.A,{alignItems:"flex-start",flexDirection:"column",gap:O.YC,ref:n},dl.map(({id:t,voucherPrintType:l})=>a.createElement(jt.A,{key:l,variant:"inline",size:"medium",onClick:e(l)},a.createElement(Zt.A,{size:"inherit",color:"primary"},a.createElement(I.sA,{id:t})))))},gl=()=>{const e=(0,r.useDispatch)(),[t,l]=(0,a.useState)(!1),[n,c]=(0,a.useState)(!1),[s,i]=(0,a.useState)([]),o=(0,r.useSelector)(tl.nY),u=(0,r.useSelector)(sl.M),m=(0,a.useRef)(null),d=(0,Jt.useReactToPrint)({content:()=>m.current}),E=(0,a.useMemo)(()=>(0,Xt.A)(d,1e3),[d]),T=(0,a.useCallback)(()=>l(!1),[]),S=(0,a.useCallback)(()=>{e((0,nl.P5)())},[e]),C=(0,a.useCallback)(()=>{e((0,cl.s0)([]))},[e]),h=(0,a.useCallback)(()=>{e(1===u.length?(0,nl.fX)(u[0]):(0,nl.UY)(u,u.length===o.length)).then(S).finally(C)},[e,S,C,u,o.length]),p=(0,a.useCallback)(()=>{l(!0)},[]),_=(0,a.useCallback)(e=>{e.stopPropagation(),e.preventDefault(),c(e=>!e)},[]),b=(0,a.useCallback)(()=>a.createElement(qt.A,{actionable:!0,onClick:_,size:"original"}),[_]),N=(0,a.useCallback)(e=>{i(e),c(!1),setTimeout(E,0)},[E]),M=(0,a.useCallback)(()=>N(o),[N,o]),g=(0,a.useCallback)(()=>{e((0,ll.to)({modalType:al.A.HOTSPOT_VOUCHER_PRINT_BATCH,modalProps:{hotspotVouchers:o,onPrint:N,setShowPrintPopover:c}}))},[e,o,N]),P=(0,a.useCallback)(()=>{N(o.filter(({_id:e})=>u.includes(e)))},[N,o,u]),R=(0,a.useCallback)(()=>{N(o.filter(({quota:e,used:t})=>0===e||t<e))},[N,o]),D=(0,a.useMemo)(()=>({[Kt.ALL]:M,[Kt.BATCH]:g,[Kt.UNUSED]:R,[Kt.CUSTOM]:P}),[M,g,P,R]),f=(0,a.useCallback)(e=>()=>{D[e]()},[D]);return a.createElement(A.A,{zIndex:1,alignItems:"center"},u.length?a.createElement(el.A,{title:"HOTSPOT_REVOKE_INTERFACE_TITLE",message:"HOTSPOT_REVOKE_INTERFACE_DESCRIPTION",messageValues:{count:u.length},handleClose:T,handleConfirm:h,buttonVariant:"danger",buttonMessage:"COMMON_ACTION_REVOKE",position:"bottom",isOpen:t},a.createElement(jt.A,{variant:"inline",type:"button",size:"medium",onClick:p},a.createElement(Zt.A,{size:"inherit",color:"danger"},a.createElement(I.sA,{id:"COMMON_ACTION_REVOKE"})))):a.createElement(rl.A,{onlyVoucherForm:!0}),o.length?a.createElement(a.Fragment,null,u.length?a.createElement(jt.A,{style:{margin:`0px ${O.Ln} 0 ${O.Ln}`},variant:"inline",type:"button",size:"medium",onClick:f(Kt.CUSTOM)},a.createElement(I.sA,{id:"HOTSPOT_PRINT"})):a.createElement(Qt.A,{open:n,size:"auto",renderToggle:b},a.createElement(Ml,{onPrintClick:f,showPrintPopover:n,setShowPrintPopover:c})),a.createElement(bl,{vouchersForPrint:s,ref:m})):null)},Pl=({hotspotRoute:e})=>{switch(e){case Xe.z.GUESTS:case Xe.z.PAYMENTS:return null;case Xe.z.VOUCHERS:return a.createElement(gl,null);case Xe.z.PORTAL:default:return null}};var Il=l(421289),Rl=l(256856),Dl=l(171073),fl=l(71177),kl=l(503793),vl=l(928085),Ll=l(959341),yl=l(316144),zl=l(532419);const wl=(0,E.A)(A.A)`
  align-items: center;
  gap: ${O.kc};
  justify-content: center;
`,Hl=(0,E.A)(A.A)`
  align-items: center;
  gap: ${O.YC};
  white-space: nowrap;
`,Ul=()=>{const e=(0,kt.W6)(),t=(0,r.useSelector)(V.$c),{isAvailable:l,isSubscribed:n,unavailabilityReason:c,redirect:s}=(0,kl.g)(),i=(0,r.useSelector)(zl.$x),o=(0,vl.A)(`${Ll.bB}/${Ll.Uy.CYBERSECURE}`),u=(0,yl.Ad)(i),m=(0,a.useCallback)(()=>{e.push(o)},[e,o]);return(0,Ut.A)([(0,fl.m)(void 0,{crudCacheStrategy:{type:xt.e.CACHE}}),(0,Dl.Uc)(void 0,{crudCacheStrategy:{type:xt.e.CACHE}})],t?a.createElement(Te.A,null,a.createElement(wl,null,a.createElement(Il.A,{description:n?null:a.createElement(I.sA,{id:"FLOWS_CYBERSECURE_TOOLTIP"})},a.createElement(Hl,null,a.createElement(Rl.A,{size:"original",isActive:n}),a.createElement(N.A,{size:"medium",color:"inherit"},a.createElement(I.sA,{id:n?u?"COMMON_CYBERSECURE_ENTERPRISE":"COMMON_CYBERSECURE":"COMMON_CYBERSECURE_ENHANCED"})))),n?a.createElement(M.A,{type:"button",fontSize:"medium",onPress:m},a.createElement(N.A,{size:"medium",color:"inherit"},a.createElement(I.sA,{id:"COMMON_ACTIVE"}))):a.createElement(Il.A,{description:l?void 0:c},a.createElement("span",null,a.createElement(M.A,{type:"button",fontSize:"medium",onPress:s,isDisabled:!l},a.createElement(I.sA,{id:"COMMON_ACTIVATE"})))))):null)};var $l=l(764784);const xl=(0,E.A)(A.A)`
  width: 100%;
  justify-content: space-between;
  border-radius: ${ae.Ay["desktop-radius-global"]};
  padding: ${O.kc};
  background: ${({theme:{themeName:e}})=>ae.Ay[`desktop-color-neutral-01-${e}`]};
  gap: ${O.kc};
`,Vl=(0,a.memo)(()=>(0,S.A)().showExternalDiskMessage?a.createElement(xl,null,a.createElement($l.A,{size:"original",variant:"fill",isActive:!0}),a.createElement(N.A,{size:"medium"},a.createElement(I.sA,{id:"COMMON_FLOWS_ADD_STORAGE_MESSAGE"}))):null);var Yl=l(105925),Wl=l(382915),Gl=l(919075);const Fl=(0,E.A)(A.A)`
  > div:first-child {
    width: 100%;
  }
  align-items: center;
  gap: ${O.YC};
`;var Bl=l(597073),Kl=l(513587);const jl={opacity:.5,pointerEvents:"none"},Zl=(0,E.A)(A.A)`
  background: ${({theme:{themeName:e}})=>ae.Ay[`desktop-color-neutral-01-${e}`]};
  border-radius: ${ae.Ay["desktop-radius-base"]};
  padding: ${O.kc};
  cursor: pointer;
  align-items: center;
  height: ${O.fS};
`,Xl=(0,a.memo)(()=>{const e=(0,r.useDispatch)(),[t,l]=(0,a.useState)(!1),n=(0,r.useSelector)(i.tT),c=(0,Kl.A)(),s=(0,a.useCallback)(()=>{c&&(e((0,D.bD)({...n,endDate:new Date})),l(!0),setTimeout(()=>{l(!1)},750))},[e,n,c]);return a.createElement(Zl,null,a.createElement(Bl.A,{size:"original",style:{...t||n.preset===de.j?jl:{}},onClick:s,actionable:!0}))}),ql=(0,a.memo)(()=>{const e=(0,r.useDispatch)(),{formatMessage:t}=(0,I.tz)(),l=(0,r.useSelector)(i.xM),[n,c]=(0,a.useState)(l||Gl.X),s=(0,a.useCallback)(t=>{e((0,D.lB)(t))},[e]),o=(0,a.useMemo)(()=>(0,Xt.A)(e=>{s(e)},Gl.i),[s]),u=(0,a.useCallback)(()=>{c(Gl.X),o(Gl.X),o.flush()},[o]),m=(0,a.useCallback)((e,t)=>{c(t),o(t)},[o]),d=(0,a.useCallback)((e,t)=>{o(t),o.flush()},[o]),E=(0,a.useMemo)(()=>t({id:"COMMON_SEARCH"}),[t]);return(0,a.useEffect)(()=>{c(l)},[l]),a.createElement(Fl,null,a.createElement(Yl.A,{onAddTag:Tt.A,onRemoveTag:Tt.A,onReset:u,onChange:m,value:n,placeholder:E,onSubmit:d,width:Wl.Em}),a.createElement(Xl,null))});var Jl=l(27075),Ql=l(969072),ea=l(286388);const ta=(0,E.A)(A.A)`
  align-items: center;
  gap: ${O.YC};
`,la=(0,E.A)(A.A,{shouldForwardProp:e=>!["isActive"].includes(e)})`
  padding: ${"1px 7px"};
  cursor: pointer;
  border-radius: ${ae.Ay["desktop-radius-base"]};
  border: 1px solid
    ${({theme:{themeName:e},isActive:t})=>ae.Ay[`desktop-color-${t?"ublue-06":"neutral-03"}-${e}`]};
  border-radius: ${ae.Ay["desktop-radius-base"]};
`,aa=(0,a.memo)(()=>{const e=(0,r.useDispatch)(),t=(0,r.useSelector)(i.ti),l=(0,a.useCallback)(l=>()=>{e((0,D.th)(t.includes(l)?t.filter(e=>e!==l):[...t,l]))},[e,t]);return a.createElement(ta,null,a.createElement(Il.A,{description:a.createElement(I.sA,{id:"COMMON_ALLOWED"})},a.createElement(la,{isActive:t.includes(ea.HI.ALLOWED),onClick:l(ea.HI.ALLOWED)},a.createElement(Jl.A,{size:"original"}))),a.createElement(Il.A,{description:a.createElement(I.sA,{id:"COMMON_BLOCKED"})},a.createElement(la,{isActive:t.includes(ea.HI.BLOCKED),onClick:l(ea.HI.BLOCKED)},a.createElement(Ql.A,{size:"original"}))))});var na=l(545467),ra=l(329792);const ca=(0,a.memo)(({flowsRisk:e,flowsRisks:t})=>{const l=(0,r.useDispatch)(),n=(0,a.useMemo)(()=>t.includes(e),[e,t]),c=(0,a.useCallback)(()=>{l((0,D.Ce)(n?t.filter(t=>t!==e):[...t,e]))},[l,e,t,n]);return a.createElement(Il.A,{description:a.createElement(I.sA,{id:ra.r$[e]})},a.createElement(na.zn,{isActive:n,flowsRisk:e,onClick:c},a.createElement(na.Di,null),a.createElement(na.Di,null),a.createElement(na.Di,null)))}),sa=(0,E.A)(A.A,{shouldForwardProp:e=>!["fullWidth"].includes(e)})`
  width: 100%;
  align-items: center;
  gap: ${O.YC};
  > div {
    width: ${({fullWidth:e})=>e?"100%":"auto"};
  }
`,ia=(0,a.memo)(({fullWidth:e})=>{const t=(0,r.useSelector)(i.IG);return a.createElement(sa,{fullWidth:e},a.createElement(ca,{flowsRisk:ea.GD.LOW,flowsRisks:t}),a.createElement(ca,{flowsRisk:ea.GD.MEDIUM,flowsRisks:t}),a.createElement(ca,{flowsRisk:ea.GD.HIGH,flowsRisks:t}))}),oa=(0,E.A)(A.A)`
  align-items: center;
  gap: ${O.xO};
`,ua=()=>{const e=(0,r.useSelector)(i.lX);return a.createElement(Te.A,{label:a.createElement(I.sA,{id:"FLOWS_RISK"})},a.createElement(oa,null,a.createElement(ia,{fullWidth:!e}),e?a.createElement(aa,null):null))};var ma=l(950733),da=l(763449),Ea=l(866979),Aa=l(48369),Oa=l.n(Aa),Ta=l(415614);const Sa=(0,ce.Mz)(i.tT,({startDate:e,endDate:t})=>Ta.w.map(l=>{return a=l.getRange(new Date),{...l,id:l.id,range:a,selected:Oa()(e,a.startDate)&&Oa()(t,a.endDate)};var a})),Ca=((0,E.A)(A.A)`
  width: 100%;
`,(0,E.A)(pt.A)`
  min-height: ${O.fS};
  > div > button:last-of-type {
    padding: 0;
  }
`),ha=(0,a.memo)(()=>{const e=(0,r.useDispatch)(),t=(0,r.useSelector)(i.tT),l=(0,r.useSelector)(Sa),[n,c]=(0,a.useState)(null===t.preset?de.j:t.preset),[s,o]=(0,a.useState)(null===t.preset?{startDate:t.startDate,endDate:t.endDate}:null),u=(0,a.useCallback)(({id:t})=>{const a=l.find(e=>e.id===t);a?e((0,D.bD)({...a.getRange(new Date),preset:t})):s&&e((0,D.bD)({...s,preset:de.j})),c(t)},[s,e,l]),m=(0,a.useCallback)(()=>{u({id:ma.U.ONE_MONTH})},[u]),d=(0,a.useCallback)(e=>{o(e),c(de.j)},[]),E=(0,a.useMemo)(()=>t.preset===de.j,[t.preset]),A=(0,a.useCallback)(()=>{e((0,D.Rh)(da.J.HEADER))},[e]),O=(0,a.useMemo)(()=>({id:de.j,label:a.createElement(Ea.A,{currentFlowsCalendarId:da.J.HEADER,onRangeSelected:d,onClear:m},a.createElement(me.A,{size:"original",actionable:!0,isActive:E,onClick:A}))}),[E,A,m,d]);(0,a.useEffect)(()=>{t.preset===de.j&&n!==de.j&&c(de.j)},[t.preset,n]);const T=(0,a.useMemo)(()=>[...l.map(({id:e,message:t,messageValues:l})=>({id:e,label:a.createElement(I.sA,{id:t,values:l})})),O],[l,O]);return a.createElement(Ca,{tabs:T,selectedTab:n,onSelectTab:u,variant:"filter",stretched:!0})});var pa=l(644659);const _a=()=>{const e=(0,r.useDispatch)(),t=(0,r.useSelector)(i.Lw),l=(0,r.useSelector)(pa.t),n=(0,a.useCallback)(({target:{checked:t}})=>{e((0,D.dU)(t))},[e]);return l?a.createElement(Te.A,null,a.createElement(Z.A,{onChange:n,checked:t,full:!0,size:"small"},a.createElement(N.A,{size:"medium",color:"text-2"},a.createElement(I.sA,{id:"FLOWS_FLOW_SUMMARY"})))):null};var ba=l(238761),Na=l(196010);const Ma=(0,E.A)(A.A)`
  > div:first-child > div {
    width: fit-content;
  }
`,ga=()=>{const e=(0,r.useDispatch)(),t=(0,r.useSelector)(i.zB),{areAllFlowsSupported:l,areAllFlowsEnabled:n}=(0,S.A)(),c=(0,r.useSelector)(V.Ty),s=(0,r.useSelector)(Y.YX),o=(0,r.useSelector)(Ht.fu),u=(0,vl.A)(`${Ll.bB}/${Ll.Uy.SSL_INSPECTION}`),m=(0,a.useCallback)(t=>()=>{e((0,G.A)(t))},[e]),d=(0,a.useCallback)(()=>{e((0,$t.oz)({...o,enabled_allowed_traffic:!0})).then(()=>{e((0,G.A)(W.L1.ALL_FLOWS))})},[e,o]),E=(0,a.useMemo)(()=>[{id:W.L1.ALL_FLOWS,label:"FLOWS_ALL_FLOWS",available:l,disabled:!n,description:o.enabled_allowed_traffic?null:a.createElement("span",null,a.createElement(I.sA,{id:"COMMON_FLOWS_BLOCKED_TRAFFIC_ONLY",values:{link:a.createElement(jt.A,{variant:"inline",type:"button",size:"small",onClick:d},a.createElement(I.sA,{id:"COMMON_CHANGE_TO_ALL_TRAFFIC"}))}}))},{id:W.L1.BLOCKED,label:"COMMON_BLOCKED",available:!0,disabled:!1,description:null},{id:W.L1.THREATS,label:"COMMON_THREATS",available:!0,disabled:!1,description:null},{id:W.L1.NEXT_AI,label:"COMMON_NEXT_AI",available:c,disabled:!s,description:s?null:a.createElement(I.sA,{id:"FLOWS_NEXT_AI_DISABLED_TOOLTIP",values:{link:a.createElement(Na.A,{to:u},a.createElement(I.sA,{id:"FLOWS_VIEW_INSPECTION_SETTINGS"}))}})}].filter(({available:e})=>e).map(({id:e,label:l,disabled:n,description:r})=>({id:e,children:a.createElement(I.sA,{id:l}),onChange:m(e),checked:t===e,disabled:n,tooltipProps:{description:r}})),[t,m,l,c,o.enabled_allowed_traffic,d,s,u,n]);return a.createElement(Te.A,{label:a.createElement(I.sA,{id:"COMMON_FLOWS"})},a.createElement(Ma,null,a.createElement(ba.A,{items:E,spacing:"flush"})))};var Pa=l(388287),Ia=l(958178),Ra=l(609950),Da=l(160087);const fa=(0,E.A)(Da.s)``,ka=(0,E.A)(A.A)`
  width: 100%;
  align-items: center;
  justify-content: space-between;
`,va=(0,E.A)(A.A)`
  width: 100%;
  height: 120px;
`,La=(0,a.memo)(()=>{const e=(0,r.useDispatch)(),t=(0,r.useSelector)(pa.t),l=(0,r.useSelector)(Ia.o),n=(0,r.useSelector)(i.FW),c=(0,a.useCallback)(({target:{checked:t}})=>{e((0,D.BN)(t))},[e]);return t||l?a.createElement(fa,null,a.createElement(ka,null,a.createElement(Z.A,{onChange:c,checked:n,full:!0,size:"small"},a.createElement(N.A,{size:"medium",color:"text-2"},a.createElement(I.sA,{id:t?"FLOWS_ON_MAP":"FLOWS_GEO_MAP"})))),a.createElement(va,null,t?a.createElement(Pa.A,{minimized:!0}):a.createElement(Ra.A,{minimized:!0}))):null});var ya=l(156372);const za=(0,E.A)(A.A)`
  justify-content: space-between;
  align-items: center;
  width: 100%;
`,wa=(0,E.A)(A.A)`
  align-items: center;
  gap: ${O.YC};
`,Ha=(0,E.A)(A.A,{shouldForwardProp:e=>"isActive"!==e})`
  padding: 1px 7px;
  cursor: pointer;
  border-radius: ${ae.Ay["desktop-radius-base"]};
  border: 1px solid
    ${({theme:{themeName:e},isActive:t})=>ae.Ay[`desktop-color-${t?"ublue-06":"neutral-03"}-${e}`]};
  border-radius: ${ae.Ay["desktop-radius-base"]};
`;var Ua=l(961390),$a=l(275737),xa=l(872797);const Va={[ea.ss.INCOMING]:a.createElement($a.A,{size:"original"}),[ea.ss.OUTGOING]:a.createElement(Ua.A,{size:"original"}),[ea.ss.LOCAL]:a.createElement(xa.A,{size:"original"})},Ya=()=>{const e=(0,r.useDispatch)(),t=(0,r.useSelector)(i._K),l=(0,a.useCallback)(l=>()=>{e((0,D.A6)(t.includes(l)?t.filter(e=>e!==l):[...t,l]))},[e,t]);return a.createElement(Te.A,null,a.createElement(za,null,a.createElement(N.A,{size:"medium",color:"text-2"},a.createElement(I.sA,{id:"COMMON_DIRECTION"})),a.createElement(wa,null,k.XC.map(e=>a.createElement(Il.A,{key:e,description:a.createElement(I.sA,{id:ya.Z[e]})},a.createElement(Ha,{isActive:t.includes(e),onClick:l(e)},Va[e]))))))};var Wa=l(753103),Ga=l(882750),Fa=l(193075),Ba=l(553392);const Ka=({id:e})=>{const[t,l]=(0,a.useState)(!1),n=(0,a.useCallback)(e=>{l(e)},[l]);return a.createElement(Ga.A,{label:a.createElement(I.sA,{id:Ba.Z[e]}),size:"small",isExpanded:t,onExpandedChange:n},t?a.createElement(Fa.A,{id:e}):null)},ja=()=>a.createElement(Ka,{id:Wa.Z.SOURCE}),Za=()=>a.createElement(Ka,{id:Wa.Z.SOURCE_ZONE}),Xa=()=>a.createElement(Ka,{id:Wa.Z.SOURCE_NETWORK}),qa=()=>a.createElement(Ka,{id:Wa.Z.SOURCE_MAC}),Ja=()=>a.createElement(Ka,{id:Wa.Z.SOURCE_IP}),Qa=()=>a.createElement(Ka,{id:Wa.Z.SOURCE_PORT}),en=()=>a.createElement(Ka,{id:Wa.Z.SOURCE_REGION}),tn=()=>a.createElement(Ka,{id:Wa.Z.DESTINATION}),ln=()=>a.createElement(Ka,{id:Wa.Z.DESTINATION_ZONE}),an=()=>a.createElement(Ka,{id:Wa.Z.DESTINATION_NETWORK}),nn=()=>a.createElement(Ka,{id:Wa.Z.DESTINATION_MAC}),rn=()=>a.createElement(Ka,{id:Wa.Z.DESTINATION_IP}),cn=()=>a.createElement(Ka,{id:Wa.Z.DESTINATION_PORT}),sn=()=>a.createElement(Ka,{id:Wa.Z.DESTINATION_REGION}),on=()=>a.createElement(Ka,{id:Wa.Z.SERVICE}),un=()=>a.createElement(Ka,{id:Wa.Z.PROTOCOL}),mn=()=>a.createElement(Ka,{id:Wa.Z.INTERFACE_IN}),dn=()=>a.createElement(Ka,{id:Wa.Z.INTERFACE_OUT}),En=()=>a.createElement(Ka,{id:Wa.Z.POLICY}),An=()=>a.createElement(Ka,{id:Wa.Z.POLICY_TYPE}),On=()=>{const e=(0,r.useSelector)(V.Ty),t=(0,r.useSelector)(Y.YX);return e&&t?a.createElement(Ka,{id:Wa.Z.NEXT_AI_QUERY}):null},Tn=()=>a.createElement(a.Fragment,null,a.createElement(ja,null),a.createElement(Za,null),a.createElement(Xa,null),a.createElement(qa,null),a.createElement(Ja,null),a.createElement(Qa,null),a.createElement(en,null),a.createElement(tn,null),a.createElement(ln,null),a.createElement(an,null),a.createElement(nn,null),a.createElement(rn,null),a.createElement(cn,null),a.createElement(sn,null),a.createElement(on,null),a.createElement(un,null),a.createElement(mn,null),a.createElement(dn,null),a.createElement(En,null),a.createElement(An,null),a.createElement(On,null)),Sn=()=>(0,r.useSelector)(i.x7)?a.createElement(a.Fragment,{key:n.H.FLOWS},a.createElement(Ul,null),a.createElement(Vl,null),a.createElement(ql,null),a.createElement(ua,null),a.createElement(ha,null),a.createElement(_a,null),a.createElement(ga,null),a.createElement(La,null),a.createElement(Ya,null),a.createElement(Tn,null)):null,Cn=e=>({[n.H.FLOWS]:{footer:a.createElement(_,null),columns:a.createElement(j,null),children:a.createElement(Sn,null)},[n.H.ACTIVITY]:{footer:a.createElement(Le,null),columns:void 0,children:a.createElement(a.Fragment,{key:n.H.ACTIVITY},a.createElement(ue,null),a.createElement(Oe,null),a.createElement(He,null),a.createElement(ve,null))},[n.H.HOTSPOT]:{footer:void 0,columns:void 0,children:a.createElement(a.Fragment,{key:n.H.HOTSPOT},a.createElement(Bt,null),a.createElement(rt,{hotspotRoute:e}),a.createElement(ft,{hotspotRoute:e}),a.createElement(Pl,{hotspotRoute:e}))}})},261686:(e,t,l)=>{l.d(t,{F:()=>u,a:()=>m});var a=l(801081),n=l(113294),r=l(59308),c=l(269672),s=l(878490),i=l(90757),o=l(546391);const u=(0,a.Mz)(n.v,s.e,(0,r.U)(c.U4.HOTSPOT_GUESTS),(e,t,l)=>e.filter(({_id:e})=>!l||l.has(e)).map(e=>({...e,hotspotClient:t.find(({mac:t})=>t===e.mac)||{}}))),m=(e,t)=>(0,a.Mz)(n.v,l=>l.map(({_id:l,name:a,hostname:n,ip:r,authorized_by:c,voucher_code:s,start:u,end:m,is_returning:d})=>({id:l,name:a,hostname:n,ip:r,authorized_by:c,voucher_code:s,formattedVoucher:s?.replace(o.fe,"$&-"),startTime:t.format((0,i.gH)(u)),endTime:t.format((0,i.gH)(m)),returning:d?e.returning:e.newLabel})))},88444:(e,t,l)=>{l.d(t,{MB:()=>O,f6:()=>T,qL:()=>A});var a,n=l(296540),r=l(927099),c=l(459449),s=l(396660),i=l(573531),o=l(664967),u=l(584916),m=l(434431);!function(e){e.PAID="paid"}(a||(a={}));var d=l(823881);const E=e=>{switch(e){case d.Zg.STRIPE:return"HOTSPOT_PAYMENTS_GATEWAY_STRIPE";case d.Zg.PAYPAL:return"HOTSPOT_PAYMENTS_GATEWAY_PAYPAL";case d.Zg.IPPAY:return"HOTSPOT_PAYMENTS_GATEWAY_IPPAY";case d.Zg.MERCHANTWARRIOR:return"HOTSPOT_PAYMENTS_GATEWAY_MERCHANT_WARRIOR";case d.Zg.QUICKPAY:return"HOTSPOT_PAYMENTS_GATEWAY_QUICKPAY";case d.Zg.AUTHORIZE:return"HOTSPOT_PAYMENTS_GATEWAY_AUTHORIZE";default:return"COMMON_FALLBACK"}},A=(e,t,l)=>[{id:m.lp.ID,label:null,minWidth:36,maxWidth:36,renderCell:()=>null},{id:m.lp.NAME,sortable:!0,label:n.createElement(c.sA,{id:m.bj[m.lp.NAME]}),minWidth:180,renderCell:({name:e})=>n.createElement(r.A,{size:"body",truncate:!0},e||n.createElement(c.sA,{id:"COMMON_FALLBACK"})),compare:(0,s.l0)(({name:e})=>e||i.L)},{id:m.lp.DATE_TIME,sortable:!0,label:n.createElement(c.sA,{id:m.bj[m.lp.DATE_TIME]}),minWidth:180,renderCell:({time:a})=>n.createElement(r.A,{size:"inherit",color:"inherit"},new Intl.DateTimeFormat(e,{month:"short",day:"2-digit",year:"numeric",timeZone:t,hour:"numeric",minute:"2-digit",hourCycle:l}).format(a)),compare:(0,s.l0)(({time:e})=>e)},{id:m.lp.HOTSPOT_PACKAGE,sortable:!0,label:n.createElement(c.sA,{id:m.bj[m.lp.HOTSPOT_PACKAGE]}),minWidth:180,renderCell:({hotspotPackage:e})=>n.createElement(r.A,{size:"inherit",color:"inherit"},e?.amount?`${e.amount} ${e.currency}`:n.createElement(c.sA,{id:"COMMON_FALLBACK"})),compare:(0,s.l0)(({hotspotPackage:e})=>e?.amount)},{id:m.lp.STATUS,sortable:!0,label:n.createElement(r.A,{size:"body",weight:"bold",color:"inherit"},n.createElement(c.sA,{id:m.bj[m.lp.STATUS]})),minWidth:180,renderCell:({status:e})=>n.createElement(r.A,{size:"inherit",color:"inherit"},e===a.PAID?n.createElement(c.sA,{id:"HOTSPOT_PAID"}):n.createElement(c.sA,{id:"COMMON_FALLBACK"})),compare:(0,s.l0)(({status:e})=>e)},{id:m.lp.INFO,sortable:!0,label:n.createElement(c.sA,{id:m.bj[m.lp.INFO]}),minWidth:180,renderCell:({info:e})=>n.createElement(r.A,{size:"inherit",color:"inherit"},e||n.createElement(c.sA,{id:"COMMON_FALLBACK"})),compare:(0,s.l0)(({info:e})=>e||i.L)},{id:m.lp.PACKAGE,sortable:!0,label:n.createElement(c.sA,{id:m.bj[m.lp.PACKAGE]}),minWidth:180,renderCell:e=>n.createElement(r.A,{size:"body",color:"inherit"},e.package),compare:(0,s.l0)(e=>e.package)},{id:m.lp.TYPE,sortable:!0,label:n.createElement(c.sA,{id:m.bj[m.lp.TYPE]}),minWidth:180,renderCell:({gateway:e})=>n.createElement(r.A,{size:"inherit",color:"inherit"},n.createElement(c.sA,{id:E(e)})),compare:(0,s.l0)(({gateway:e})=>e)}],O=[{value:20,default:!0},{value:50},{value:100}],T=[o.E[u.l.ONE_DAY],o.E[u.l.ONE_WEEK],o.E[u.l.ONE_MONTH]]},226034:(e,t,l)=>{l.d(t,{jN:()=>d,kR:()=>u,u_:()=>m});var a=l(48369),n=l.n(a),r=l(801081),c=l(919952),s=l(434431),i=l(88444);const o=e=>e[c.U.HOTSPOT_PAYMENTS],u=(0,r.Mz)(o,e=>({[s.SY.START_DATE]:e[s.ns.DATE_RANGE][s.SY.START_DATE],[s.SY.END_DATE]:e[s.ns.DATE_RANGE][s.SY.END_DATE],[s.SY.PRESET]:e[s.ns.DATE_RANGE][s.SY.PRESET]})),m=(0,r.Mz)(u,({startDate:e,endDate:t})=>i.f6.map(l=>{const a=l.getRange(new Date);return{...l,range:a,selected:n()(e,a.startDate)&&n()(t,a.endDate)}})),d=(0,r.Mz)(o,e=>e[s.ns.PAGE_NUMBER])},164520:(e,t,l)=>{l.d(t,{b:()=>o,p:()=>i});var a=l(801081),n=l(579229),r=l(116351),c=l(59308),s=l(269672);const i=(0,a.Mz)(n.d,r.ls,(0,c.U)(s.U4.HOTSPOT_PAYMENTS),(e,t,l)=>e.filter(({_id:e})=>!l||l.has(e)).map(e=>({...e,hotspotPackage:t.find(({name:t})=>t===e.package)}))),o=(0,a.Mz)(n.d,e=>e.map(({_id:e,name:t})=>({id:e,name:t})))},995710:(e,t,l)=>{l.d(t,{F:()=>i,M:()=>s});var a=l(801081),n=l(919952),r=l(913371);const c=e=>e[n.U.HOTSPOT_VOUCHERS],s=(0,a.Mz)(c,e=>e[r.z0.VOUCHER_IDS]),i=(0,a.Mz)(c,e=>e[r.z0.PAGE_NUMBER])},207196:(e,t,l)=>{l.d(t,{$:()=>s,x:()=>i});var a=l(801081),n=l(712492),r=l(59308),c=l(269672);const s=(0,a.Mz)(n.nY,(0,r.U)(c.U4.HOTSPOT_VOUCHERS),(e,t)=>t?e.filter(({code:e})=>t.has(e)):e),i=(0,a.Mz)(n.nY,e=>e.map(({code:e,note:t})=>({id:e,note:t})))},28067:(e,t,l)=>{l.d(t,{k:()=>c});var a=l(670180),n=l(257143),r=l(412808);const c={[r.z.GUESTS]:`${n.K[a.H.HOTSPOT]}/${r.z.GUESTS}`,[r.z.PAYMENTS]:`${n.K[a.H.HOTSPOT]}/${r.z.PAYMENTS}`,[r.z.VOUCHERS]:`${n.K[a.H.HOTSPOT]}/${r.z.VOUCHERS}`,[r.z.PORTAL]:`${n.K[a.H.HOTSPOT]}/${r.z.PORTAL}`}},291231:(e,t,l)=>{l.d(t,{G:()=>P});var a=l(801081),n=l(296540);const r=(0,n.lazy)(()=>l.e(4158).then(l.bind(l,713331))),c=e=>n.createElement(n.Suspense,{fallback:null},n.createElement(r,{...e})),s=(0,n.lazy)(()=>l.e(8004).then(l.bind(l,687535))),i=()=>n.createElement(n.Suspense,{fallback:null},n.createElement(s,null)),o=(0,n.lazy)(()=>Promise.all([l.e(8339),l.e(8003)]).then(l.bind(l,632378))),u=e=>n.createElement(n.Suspense,{fallback:null},n.createElement(o,{...e})),m=(0,n.lazy)(()=>l.e(8880).then(l.bind(l,486799))),d=()=>n.createElement(n.Suspense,{fallback:null},n.createElement(m,null));var E=l(87485),A=l(25553),O=l(345558);const T=(0,A.uh)((0,O._)()),S=(0,a.Mz)(T,E.i6);var C;!function(e){e.EXTERNAL="custom",e.HOTSPOT="hotspot",e.NONE="none"}(C||(C={}));var h=l(602021),p=l(627440),_=l(189601),b=l(412808),N=l(592510);const M={[b.z.GUESTS]:void 0,[b.z.PAYMENTS]:[(0,O._)(void 0,{crudCacheStrategy:{type:N.e.CACHE}})],[b.z.VOUCHERS]:[(0,O._)(void 0,{crudCacheStrategy:{type:N.e.CACHE}})],[b.z.PORTAL]:void 0};var g=l(28067);const P=(0,_.WY)()((0,a.Mz)(S,h.dK,({auth:e,payment_enabled:t,voucher_enabled:l},a)=>{return n=e===C.HOTSPOT,{[b.z.GUESTS]:{[p.o9.ROUTE_COMPONENT]:c,[p.o9.SIDE_NAVIGATION]:void 0,[p.o9.ROUTE]:{[p.Fm.AVAILABLE]:!0},[p.o9.NAVIGATION]:{[p.mx.AVAILABLE]:!0},[p.o9.DEPENDENCIES]:M[b.z.GUESTS]},[b.z.PAYMENTS]:{[p.o9.ROUTE_COMPONENT]:i,[p.o9.SIDE_NAVIGATION]:void 0,[p.o9.ROUTE]:{[p.Fm.AVAILABLE]:n&&t},[p.o9.NAVIGATION]:{[p.mx.AVAILABLE]:n&&t},[p.o9.DEPENDENCIES]:M[b.z.PAYMENTS],[p.o9.REDIRECT_WHEN_UNAVAILABLE]:{[p.W4.PATH]:g.k[b.z.GUESTS]}},[b.z.VOUCHERS]:{[p.o9.ROUTE_COMPONENT]:d,[p.o9.SIDE_NAVIGATION]:void 0,[p.o9.ROUTE]:{[p.Fm.AVAILABLE]:n&&l},[p.o9.NAVIGATION]:{[p.mx.AVAILABLE]:n&&l},[p.o9.DEPENDENCIES]:M[b.z.VOUCHERS],[p.o9.REDIRECT_WHEN_UNAVAILABLE]:{[p.W4.PATH]:g.k[b.z.GUESTS]}},[b.z.PORTAL]:{[p.o9.ROUTE_COMPONENT]:u,[p.o9.SIDE_NAVIGATION]:void 0,[p.o9.ROUTE]:{[p.Fm.AVAILABLE]:a},[p.o9.NAVIGATION]:{[p.mx.AVAILABLE]:a},[p.o9.DEPENDENCIES]:M[b.z.PORTAL],[p.o9.REDIRECT_WHEN_UNAVAILABLE]:{[p.W4.PATH]:g.k[b.z.GUESTS]}}};var n}),e=>e)},513587:(e,t,l)=>{l.d(t,{A:()=>n});var a=l(296540);const n=()=>{const e=(0,a.useRef)(!1);return(0,a.useEffect)(()=>(e.current=!0,()=>{e.current=!1}),[]),e}}}]);