1import{e as Vi}from"./chunk-6QGIWFU5.js";import{a as yt}from"./chunk-UXCNQWS2.js";import{Eb as Di,H as wt,Pb as Ft,Q as se,Sb as Ti,T as Lt,Ub as Pe,a as Fe,c as It,nc as ki}from"./chunk-S4NQP4LP.js";import"./chunk-B64J7ZZS.js";import{b as Ai}from"./chunk-R5YUASVJ.js";import"./chunk-PDILTSKP.js";import{a as xt}from"./chunk-7U4AVULL.js";import{b as ei}from"./chunk-BV2R7AJC.js";import"./chunk-HGCPQJ2I.js";import{c as Ri}from"./chunk-HQHWRVR3.js";import{e as bt}from"./chunk-VOVW6SD7.js";import{A as Qe,B as Ut,H as Le,L as Et,a as Li,b as Fi,c as vt,d as Ie,e as we,w as Pt}from"./chunk-I76JT55S.js";import"./chunk-TY33FVDP.js";import{$b as mi,$c as Ci,$d as ht,Aa as Ce,Ac as he,Bb as re,Bc as U,Cb as ct,Cc as Si,D as ge,Dc as _i,E as ae,Ea as rt,Ec as p,Ee as $e,Fa as $,Fc as Be,Ga as Xt,Gb as pt,Gc as S,H as Ve,Ha as y,Hc as Ne,I as ci,K as ee,Kf as Ct,Le as St,Me as bi,Na as k,Pa as Q,Pe as _t,Q as _,Qa as H,Qd as ut,R as Re,Ra as j,Rd as T,Sa as a,Sd as He,Se as Ii,T as nt,Ta as o,Td as F,Ua as K,Ub as di,Uc as qe,Ud as Ui,Va as st,Vb as De,Wa as ot,Wd as xi,X as de,Ya as ue,Yb as Se,Yd as pe,Za as J,_ as L,_a as v,_d as je,a as x,b as I,ba as pi,bc as ui,bd as vi,cc as hi,da as R,db as ye,de as yi,ea as A,eb as at,fb as lt,fe as We,gb as h,gc as ve,ge as gt,hb as N,hc as Te,ib as ce,ic as ke,id as Pi,k as oi,kc as g,lc as Me,m as ai,mc as gi,na as Ze,nc as fi,nd as dt,pc as Oe,q as li,qa as me,qb as Ae,qe as ft,rc as b,s as Ue,sb as ne,se as ze,ta as s,td as V,ub as D,ud as mt,v as w,vb as q,wb as Ee,wf as Xe,x as it,xa as le,xb as be,xf as wi,z as oe,za as xe,ze as Ei}from"./chunk-KTJXEXP6.js";var ur="url list create",G=Be(ur),Y=I(x({},Me),{SAVE_NAME:"save name",SAVE_DESCRIPTION:"save description",DETAILS_FORM:{INIT:"detail form init",DETAILS_CHANGED:"detail form changed",SAVE:"details form save",CANCEL:"details form cancel"},CREATE:"create",CANCEL:"cancel",CHANGE_URL:"change existed url",UPDATE_HAS_ASSOCIATED_ALIASES_URL:"update has associated aliases url",VERIFY_URL:"verify url",CHECK_URL_NEED_VERIFY:"check url need verify"}),m={init:{request:p(G(Y.INIT,g.REQUEST)),success:p(G(Y.INIT,g.SUCCESS),b()),failed:p(G(Y.INIT,g.FAILED))},destroy:p(G(Y.DESTROY)),saveName:p(G(Y.SAVE_NAME,g.SUCCESS),b()),saveDescription:p(G(Y.SAVE_DESCRIPTION,g.SUCCESS),b()),detailsForm:{init:p(G(Y.DETAILS_FORM.INIT)),detailsChanged:p(G(Y.DETAILS_FORM.DETAILS_CHANGED),b()),save:p(G(Y.DETAILS_FORM.SAVE)),cancel:p(G(Y.DETAILS_FORM.CANCEL))},create:{request:p(G(Y.CREATE,g.REQUEST)),success:p(G(Y.CREATE,g.SUCCESS)),failed:p(G(Y.CREATE,g.FAILED))},cancel:p(G(Y.CANCEL)),changeUrl:p(G(Y.CHANGE_URL),b()),updateHasAssociatedAliasesUrl:p(G(Y.UPDATE_HAS_ASSOCIATED_ALIASES_URL),b()),checkUrlNeedVerify:p(G(Y.CHECK_URL_NEED_VERIFY),b()),verifyUrl:{request:p(G(Y.VERIFY_URL,g.REQUEST),b()),success:p(G(Y.VERIFY_URL,g.SUCCESS),b()),failed:p(G(Y.VERIFY_URL,g.FAILED),b())}};var Vt=class{constructor(){this.defaultEndUserId=null,this.originalUrls=[],this.urlsFormState={state:V.Default,model:{urls:[]}},this.patterns=[],this.contentFilters=new Ft,this.details={nameInProgress:!1,descriptionInProgress:!1,name:"",description:"",id:"",changedOn:"",changedOnFormatted:""},this.pending=!1,this.newName=null,this.newDescription=null,this.shouldBeClosed=null,this.domainWithAliases=[],this.urlVerificationInProgress=[],this.enhancedProtectionVerificationResultUrl=new fe}},fe=class{constructor(i){this.has=!1,this.offensive=new Fe,this.youtube=new Fe,this.web=new Fe,this.bypassVideoBlocking=[],this.bypassImageFiltering=[],this.blackl
1ist=[],i&&(this.has=i.has,this.web=new Fe(i.web),this.youtube=new Fe(i.youtube),this.offensive=new Fe(i.offensive),this.blacklist=[...i.blacklist],this.bypassVideoBlocking=[...i.bypassVideoBlocking],this.bypassImageFiltering=[...i.bypassImageFiltering])}};var Ge=class{constructor(){this.name="",this.description="",this.defaultEndUserId=null,this.detailFormState={state:V.Default,model:{name:"",description:""}},this.urlsFormState={state:V.Default,model:{urls:[]}},this.patterns=[],this.model={name:"",description:""},this.urls=[],this.contentFilters=new Ft,this.domainWithAliases=[],this.pending=!1,this.urlVerificationInProgress=[],this.enhancedProtectionVerificationResultUrl=new fe}};var Rt=class{constructor(){this.pending=!1,this.list=[],this.total=0,this.query={search:"",page:1,pageSize:15}}};var At=class extends Oe{init(i){this.newState.patterns=i.patterns.map(t=>({id:t.key,title:t.value})),this.newState.defaultEndUserId=i.endUserId}setPending(i){this.newState.pending=i}setFormState(i){this.newState.urlsFormState=I(x({},this.newState.urlsFormState),{state:i})}setName(i){this.newState.name=i}setDescription(i){this.newState.description=i}changeUrl(i){this.newState.urlsFormState=I(x({},this.newState.urlsFormState),{model:{urls:i.urls}})}updateDetailsModel(){this.modelDetailChange({name:this.newState.name,description:this.newState.description})}saveDetailsModel(){this.newState.name=this.newState.detailFormState.model.name,this.newState.description=this.newState.detailFormState.model.description}modelDetailChange(i){this.newState.detailFormState={model:i,state:V.Changed}}cancelDetailsModel(){this.newState.detailFormState=new Ge().detailFormState}setDomainWithAliases(i){this.newState.domainWithAliases=i}addUrlToEnhancedProtectionVerificationInProgress(i){this.newState.urlVerificationInProgress=[...this.newState.urlVerificationInProgress],!(this.newState.enhancedProtectionVerificationResultUrl.has&&(this.newState.enhancedProtectionVerificationResultUrl.web.getAllValues().includes(i)||this.newState.enhancedProtectionVerificationResultUrl.youtube.getAllValues().includes(i)||this.newState.enhancedProtectionVerificationResultUrl.offensive.getAllValues().includes(i)))&&(this.newState.urlVerificationInProgress.includes(i)||this.newState.urlVerificationInProgress.push(i))}removeUrlToEnhancedProtectionVerificationInProgress(i){this.newState.urlVerificationInProgress=this.newState.urlVerificationInProgress.filter(t=>t!==i)}addUrlToEnhancedProtectionVerification(i){let t=new fe(this.newState.enhancedProtectionVerificationResultUrl);if(i.bypassEnhancedProtectionSettings.isBypassEnhancedProtection){if(i.bypassEnhancedProtectionSettings.bypassFlags.length===0)return;i.bypassEnhancedProtectionSettings.bypassFlags.includes("ForcedImageFiltering")&&(t.has=!0,t.bypassImageFiltering.push(i.url)),i.bypassEnhancedProtectionSettings.bypassFlags.includes("ForcedVideoBlocking")&&(t.has=!0,t.bypassVideoBlocking.push(i.url)),this.newState.enhancedProtectionVerificationResultUrl=t}i.isBlacklistedByEnhancedProtection&&(t.has=!0,t.blacklist.push(i.url),this.newState.enhancedProtectionVerificationResultUrl=t);let r=[...i.matchedFilteringSettings,...i.filterActionReasons].filter(n=>n.enhancedProtection.length>0).map(n=>({name:n.name,type:n.type,enhancedProtection:n.enhancedProtection}));r.length!==0&&(r.forEach(n=>{n.enhancedProtection.includes("ForceBlocked")&&(t.has=!0,n.type==="WebCategory"&&t.web.pushValueByKey(n.name,i.url),n.type==="YouTubeCategory"&&t.youtube.pushValueByKey(n.name,i.url),n.type==="OffensiveTextCategory"&&t.offensive.pushValueByKey(n.name,i.url))}),this.newState.enhancedProtectionVerificationResultUrl=t)}syncEnhancedProtectionTemporaryAccessWithActual(){let i=new fe(this.newState.enhancedProtectionVerificationResultUrl);i.blacklist.forEach(t=>{this.newState.urlsFormState.model.urls.find(r=>r.value===t)||(i.blacklist=i.blacklist.filter(r=>r!==t))}),i.bypassImageFiltering.forEach(t=>{this.newState.urlsFormState.model.urls.find(r=>r.value===t)||(i.bypassImageFiltering=i.bypassImageFiltering.filter(r=>r!==t))}),i.bypassVideoBlocking.forEach(t=>{this.newState.urlsFormState.model.urls.find(r=>r.value===t)||(i.bypassVideoBlocking=i.bypassVideoBlocking.filter(r=>r!==t))}
1),i.web.getAllValues().forEach(t=>{this.newState.urlsFormState.model.urls.find(r=>r.value===t)||i.web.removeValueFromAllPairs(t)}),i.youtube.getAllValues().forEach(t=>{this.newState.urlsFormState.model.urls.find(r=>r.value===t)||i.youtube.removeValueFromAllPairs(t)}),i.offensive.getAllValues().forEach(t=>{this.newState.urlsFormState.model.urls.find(r=>r.value===t)||i.offensive.removeValueFromAllPairs(t)}),this.newState.enhancedProtectionVerificationResultUrl=I(x({},i),{has:i.web.length>0||i.youtube.length>0||i.offensive.length>0||i.blacklist.length>0||i.bypassImageFiltering.length>0||i.bypassVideoBlocking.length>0})}};var Dt=class extends Oe{setShouldBeClosed(i){this.newState.shouldBeClosed=i}setUrlsInProgress(){this.newState.urlsInProgress=!0}init({countUsers:i,urlsList:t,patterns:r,stateSnapshot:n,domains:c,endUserId:d}){this.newState.patterns=r.map(C=>({id:C.key,title:C.value})),this.newState.countUsers=i,this.newState.domainWithAliases=c,n&&De.isAfter(n.details.changedOn,t.changedOn)?this.setUrlListByStateSnapshot(n):this.setUrlList(t),this.newState.defaultEndUserId=d}setUrlList(i){this.newState.urlsInProgress=i.notCompletedStates.includes(Le.UrlsUpdate_Completed);let t=i.urls.map(({pattern:r,value:n,access:c,textFiltering:d,imageFiltering:C,audioBlocking:E,videoBlocking:X,order:Je})=>({pattern:r,value:n,access:c,textFilteringEnabled:d,imageFilteringEnabled:C,audioBlockingEnabled:E,videoBlockingEnabled:X,order:Je})).sort((r,n)=>r.order-n.order);this.newState.urlsFormState={state:V.Default,model:{urls:[...t]}},this.newState.originalUrls=[...t],this.newState.details={nameInProgress:i.notCompletedStates.includes(Le.NameUpdate_Completed),descriptionInProgress:i.notCompletedStates.includes(Le.DescriptionUpdate_Completed),id:i.id,name:i.name,description:i.description,changedOn:i.changedOn,changedOnFormatted:De.formatToDateAndTime(i.changedOn)}}setUrlListByStateSnapshot(i){let t=i.urlsFormState.model.urls.map(r=>I(x({},r),{editing:!1})).sort((r,n)=>r.order-n.order);this.newState.urlsFormState={state:V.Default,model:{urls:[...t]}},this.newState.originalUrls=[...t],this.newState.details=x({},i.details)}onEditUrlsSuccessfully(i){this.newState.urlsFormState={model:{urls:this.newState.urlsFormState.model.urls.map(t=>I(x({},t),{editing:!1}))},state:V.Default},this.setChangedOnDate(i)}setPending(i){this.newState.pending=i}setState(i){this.newState.urlsFormState=x({},this.newState.urlsFormState),this.newState.urlsFormState.state=i}setNewName(i){this.newState.newName=i}setNameInProgress(i){this.newState.details=I(x({},this.newState.details),{nameInProgress:i})}resetNewName(){this.newState.newName=null}applyNewName(i){this.newState.details=I(x({},this.newState.details),{name:this.newState.newName}),this.newState.newName=null,this.setChangedOnDate(i)}setNewDescription(i){this.newState.newDescription=i}setDescriptionInProgress(i){this.newState.details=I(x({},this.newState.details),{descriptionInProgress:i})}resetNewDescription(){this.newState.newDescription=null}applyNewDescription(i){this.newState.details=I(x({},this.newState.details),{description:this.newState.newDescription}),this.newState.newDescription=null,this.setChangedOnDate(i)}changeUrl(i){this.newState.urlsFormState=I(x({},this.newState.urlsFormState),{model:{urls:i.urls}})}addUrlToEnhancedProtectionVerificationInProgress(i){this.newState.urlVerificationInProgress=[...this.newState.urlVerificationInProgress],!(this.newState.enhancedProtectionVerificationResultUrl.has&&(this.newState.enhancedProtectionVerificationResultUrl.web.getAllValues().includes(i)||this.newState.enhancedProtectionVerificationResultUrl.youtube.getAllValues().includes(i)||this.newState.enhancedProtectionVerificationResultUrl.offensive.getAllValues().includes(i)))&&(this.newState.urlVerificationInProgress.includes(i)||this.newState.urlVerificationInProgress.push(i))}removeUrlToEnhancedProtectionVerificationInProgress(i){this.newState.urlVerificationInProgress=this.newState.urlVerificationInProgress.filter(t=>t!==i)}addUrlToEnhancedProtectionVerification(i){let t=new fe(this.newState.enhancedProtectionVerificationResultUrl);
1if(i.bypassEnhancedProtectionSettings&&i.bypassEnhancedProtectionSettings.isBypassEnhancedProtection){if(i.bypassEnhancedProtectionSettings.bypassFlags.length===0)return;i.bypassEnhancedProtectionSettings.bypassFlags.includes("ForcedImageFiltering")&&(t.has=!0,t.bypassImageFiltering.push(i.url)),i.bypassEnhancedProtectionSettings.bypassFlags.includes("ForcedVideoBlocking")&&(t.has=!0,t.bypassVideoBlocking.push(i.url)),this.newState.enhancedProtectionVerificationResultUrl=t}i.isBlacklistedByEnhancedProtection&&(t.has=!0,t.blacklist.push(i.url),this.newState.enhancedProtectionVerificationResultUrl=t);let r=[...i.matchedFilteringSettings,...i.filterActionReasons].filter(n=>n.enhancedProtection.length>0).map(n=>({name:n.name,type:n.type,enhancedProtection:n.enhancedProtection}));r.length!==0&&(r.forEach(n=>{n.enhancedProtection.includes("ForceBlocked")&&(t.has=!0,n.type==="WebCategory"&&t.web.pushValueByKey(n.name,i.url),n.type==="YouTubeCategory"&&t.youtube.pushValueByKey(n.name,i.url),n.type==="OffensiveTextCategory"&&t.offensive.pushValueByKey(n.name,i.url))}),this.newState.enhancedProtectionVerificationResultUrl=t)}syncEnhancedProtectionTemporaryAccessWithActual(){let i=new fe(this.newState.enhancedProtectionVerificationResultUrl);i.blacklist.forEach(t=>{this.newState.urlsFormState.model.urls.find(r=>r.value===t)||(i.blacklist=i.blacklist.filter(r=>r!==t))}),i.bypassImageFiltering.forEach(t=>{this.newState.urlsFormState.model.urls.find(r=>r.value===t)||(i.bypassImageFiltering=i.bypassImageFiltering.filter(r=>r!==t))}),i.bypassVideoBlocking.forEach(t=>{this.newState.urlsFormState.model.urls.find(r=>r.value===t)||(i.bypassVideoBlocking=i.bypassVideoBlocking.filter(r=>r!==t))}
1),i.web.getAllValues().forEach(t=>{this.newState.urlsFormState.model.urls.find(r=>r.value===t)||i.web.removeValueFromAllPairs(t)}),i.youtube.getAllValues().forEach(t=>{this.newState.urlsFormState.model.urls.find(r=>r.value===t)||i.youtube.removeValueFromAllPairs(t)}),i.offensive.getAllValues().forEach(t=>{this.newState.urlsFormState.model.urls.find(r=>r.value===t)||i.offensive.removeValueFromAllPairs(t)}),this.newState.enhancedProtectionVerificationResultUrl=I(x({},i),{has:i.web.length>0||i.youtube.length>0||i.offensive.length>0||i.blacklist.length>0||i.bypassImageFiltering.length>0||i.bypassVideoBlocking.length>0})}updateUrlsByEnhancedProtectionVerificationResultUrl(){if(!this.newState.enhancedProtectionVerificationResultUrl.has)return;let i=[...this.newState.enhancedProtectionVerificationResultUrl.web.getAllValues(),...this.newState.enhancedProtectionVerificationResultUrl.youtube.getAllValues(),...this.newState.enhancedProtectionVerificationResultUrl.offensive.getAllValues(),...this.newState.enhancedProtectionVerificationResultUrl.bypassImageFiltering,...this.newState.enhancedProtectionVerificationResultUrl.bypassVideoBlocking,...this.newState.enhancedProtectionVerificationResultUrl.blacklist],t=this.newState.urlsFormState.model.urls.filter(r=>!i.includes(r.value));this.changeUrl({urls:t})}setChangedOnDate(i){this.newState.details=I(x({},this.newState.details),{changedOn:i,changedOnFormatted:De.formatToDateAndTime(i)})}};var Tt=class extends Oe{setModel(i){this.newState.list=i.list.map(this.mapProfileItem),this.newState.total=i.total}setQuery({input:i}){this.newState.query={page:i.page,pageSize:i.pageSize,search:i.search}}setPending(i){this.newState.pending=i}mapProfileItem(i){let t=De.formatToDateAndTime(i.changedOn);return{id:i.id,inProgress:i.inProgress,name:i.name,description:i.description,type:i.type,changedBy:i.changedByName,changedOn:i.changedOn,changedOnFormatted:t,urlsSummary:{allowed:i.urlsSummary.allowed,blocked:i.urlsSummary.blocked,filtered:i.urlsSummary.filtered}}}};var hr=Ne(Ge,At,S(m.destroy,e=>{e.resetModel()}),S(m.init.request,e=>{e.setPending(!0)}),S(m.init.success,(e,i)=>{e.setPending(!1),e.init(i),e.setDomainWithAliases(i.domains)}),S(m.init.failed,e=>{e.setPending(!1)}),S(m.create.request,e=>{e.setFormState(V.Saving)}),S(m.create.success,e=>{e.setFormState(V.Saved),e.cancelDetailsModel()}),S(m.create.failed,e=>{e.setFormState(V.NotSaved)}),S(m.cancel,e=>{e.resetModel()}),S(m.saveName,(e,{name:i})=>{e.setName(i)}),S(m.saveDescription,(e,{description:i})=>{e.setDescription(i)}),S(m.changeUrl,(e,{model:i})=>{e.setFormState(V.Changed),e.changeUrl(i),e.syncEnhancedProtectionTemporaryAccessWithActual()}),S(m.detailsForm.init,e=>{e.updateDetailsModel()}),S(m.detailsForm.detailsChanged,(e,{model:i})=>{e.setFormState(V.Changed),e.modelDetailChange(i)}),S(m.detailsForm.cancel,e=>{e.cancelDetailsModel()}),S(m.detailsForm.save,e=>{e.saveDetailsModel()}),S(m.updateHasAssociatedAliasesUrl,(e,{url:i})=>{e.changeUrl(i)}),S(m.verifyUrl.request,(e,{url:i})=>{e.addUrlToEnhancedProtectionVerificationInProgress(i)}),S(m.verifyUrl.success,(e,{result:i})=>{e.removeUrlToEnhancedProtectionVerificationInProgress(i.url),e.addUrlToEnhancedProtectionVerification(i)}),S(m.verifyUrl.failed,(e,{url:i})=>{e.removeUrlToEnhancedProtectionVerificationInProgress(i)}));function Mi(e,i){return hr(e,i)}var Oi=e=>e.pending,Bi=e=>e.detailFormState,Ni=e=>e.urlsFormState,qi=e=>e.urlsFormState.state===V.Saving,Hi=e=>e.detailFormState.state!==V.Default&&e.detailFormState.state!==V.Saved||e.urlsFormState.state!==V.Default&&e.urlsFormState.state!==V.Saved,ji=e=>e.name.trim().length>0,Wi=e=>e.urlsFormState.model.urls.length>0,zi=e=>e.name,$i=e=>e.description,Qi=e=>e.urlsFormState.model.urls,Gi=e=>e.patterns,Yi=e=>e.contentFilters,Ki=e=>e.domainWithAliases,Ji=e=>e.urlVerificationInProgress,Zi=e=>e.enhancedProtectionVerificationResultUrl,Xi=e=>e.defaultEndUserId;var fr="url lists",te=Be(fr),ie=I(x(x(x({},Me),fi),gi),{RELOAD:"reload list"}),f={destroy:p(te(ie.DESTROY)),init:{request:p(te(ie.INIT,g.REQUEST)),success:p(te(ie.INIT,g.SUCCESS),b()),failed:p(te(ie.INIT,g.FAILED))},reload:{request:p(te(ie.RELOAD,g.REQUEST)),success:p(te(ie.RELOAD,g.SUCCESS),b()),failed:p(te(ie.RELOAD,g.FAILED))},page:{request:p(te(ie.PAGE_CHANGE,g.REQUEST),b()),success:p(te(ie.PAGE_CHANGE,g.SUCCESS),b()),failed:p(te(ie.PAGE_CHANGE,g.FAILED))},pageSize:{request:p(te(ie.PAGE_SIZE_CHANGE,g.REQUEST),b()),success:p(te(ie.PAGE_SIZE_CHANGE,g.SUCCESS),b()),failed:p(te(ie.PAGE_SIZE_CHANGE,g.FAILED))},search:{request:p(te(ie.SEARCH,g.REQUEST),b()),success:p(te(ie.SEARCH,g.SUCCESS),b()),failed:p(te(ie.SEARCH,g.FAILED))}};var Sr=Ne(Rt,Tt,S(f.destroy,e=>{e.resetModel()}),S(f.init.request,f.reload.request,f.search.request,f.page.request,f.pageSize.request,e=>{e.setPending(!0)}),S(f.init.success,f.reload.success,f.search.success,f.page.success,f.pageSize.success,(e,{response:i})=>{e.setModel(i),e.setQuery(i),e.setPending(!1)}),S(f.init.failed,f.reload.failed,f.search.failed,f.page.failed,f.pageSize.failed,e=>{e.setPending(!1)}));function en(e,i){return Sr(e,i)}var Cr="urls list",M=Be(Cr),O=I(x({}
1,Me),{RELOAD:"reload urls",SAVE_NAME:"save name",SAVE_DESCRIPTION:"save description",SAVE:"update list",DELETE:"delete list",CANCEL:"cancel",CHANGE_URL:"change existed url",UPDATE_HAS_ASSOCIATED_ALIASES_URL:"update has associated aliases url",VERIFY_URL:"verify url",CHECK_URL_NEED_VERIFY:"check url need verify"}),l={destroy:p(M(O.DESTROY)),init:{request:p(M(O.INIT,g.REQUEST),b()),success:p(M(O.INIT,g.SUCCESS),b()),failed:p(M(O.INIT,g.FAILED))},reload:{request:p(M(O.RELOAD,g.REQUEST)),success:p(M(O.RELOAD,g.SUCCESS),b()),failed:p(M(O.RELOAD,g.FAILED))},changeUrl:p(M(O.CHANGE_URL),b()),updateHasAssociatedAliasesUrl:p(M(O.UPDATE_HAS_ASSOCIATED_ALIASES_URL),b()),cancel:p(M(O.CANCEL)),saveName:{request:p(M(O.SAVE_NAME,g.REQUEST),b()),success:p(M(O.SAVE_NAME,g.SUCCESS),b()),failed:p(M(O.SAVE_NAME,g.FAILED))},saveDescription:{request:p(M(O.SAVE_DESCRIPTION,g.REQUEST),b()),success:p(M(O.SAVE_DESCRIPTION,g.SUCCESS),b()),failed:p(M(O.SAVE_DESCRIPTION,g.FAILED))},save:{request:p(M(O.SAVE,g.REQUEST),b()),success:p(M(O.SAVE,g.SUCCESS),b()),failed:p(M(O.SAVE,g.FAILED))},delete:{request:p(M(O.DELETE,g.REQUEST)),success:p(M(O.DELETE,g.SUCCESS)),failed:p(M(O.DELETE,g.FAILED))},checkUrlNeedVerify:p(M(O.CHECK_URL_NEED_VERIFY),b()),verifyUrl:{request:p(M(O.VERIFY_URL,g.REQUEST),b()),success:p(M(O.VERIFY_URL,g.SUCCESS),b()),failed:p(M(O.VERIFY_URL,g.FAILED),b())}};var vr=Ne(Vt,Dt,S(l.destroy,e=>{e.resetModel()}),S(l.init.request,e=>{e.setPending(!0)}),S(l.init.success,(e,i)=>{e.setPending(!1),e.init(i)}),S(l.init.failed,e=>{e.setPending(!1)}),S(l.save.request,(e,{close:i})=>{e.setState(V.Saving),e.setShouldBeClosed(i)}),S(l.save.success,(e,{changedOn:i})=>{e.onEditUrlsSuccessfully(i),e.updateUrlsByEnhancedProtectionVerificationResultUrl()}),S(l.save.failed,e=>{e.setState(V.NotSaved)}),S(l.cancel,e=>{e.setState(V.Saved),e.setUrlsInProgress()}),S(l.reload.success,(e,{urlsList:i})=>{e.setUrlList(i)}),S(l.saveName.request,(e,{name:i})=>{e.setNewName(i),e.setNameInProgress(!0)}),S(l.saveName.success,(e,{changedOn:i})=>{e.applyNewName(i),e.setNameInProgress(!1)}),S(l.saveName.failed,e=>{e.setNameInProgress(!1),e.resetNewName()}),S(l.saveDescription.request,(e,{description:i})=>{e.setNewDescription(i),e.setDescriptionInProgress(!0)}),S(l.saveDescription.success,(e,{changedOn:i})=>{e.applyNewDescription(i),e.setDescriptionInProgress(!1)}),S(l.saveDescription.failed,e=>{e.setDescriptionInProgress(!1),e.resetNewDescription()}),S(l.changeUrl,(e,{url:i})=>{e.setState(V.Changed),e.changeUrl(i),e.syncEnhancedProtectionTemporaryAccessWithActual()}),S(l.updateHasAssociatedAliasesUrl,(e,{url:i})=>{e.changeUrl(i)}),S(l.delete.success,e=>{e.setState(V.Default)}),S(l.verifyUrl.request,(e,{url:i})=>{e.addUrlToEnhancedProtectionVerificationInProgress(i)}),S(l.verifyUrl.success,(e,{result:i})=>{e.removeUrlToEnhancedProtectionVerificationInProgress(i.url),e.addUrlToEnhancedProtectionVerification(i)}),S(l.verifyUrl.failed,(e,{url:i})=>{e.removeUrlToEnhancedProtectionVerificationInProgress(i)}));function tn(e,i){return vr(e,i)}var nn=e=>e.pending,rn=e=>e.urlsFormState.state!==V.Default&&e.urlsFormState.state!==V.Saved,sn=e=>(e.details.name||"").trim().length>0,on=e=>e.urlsFormState.model.urls.length>0,an=e=>e.details.name,ln=e=>e.details.description,cn=e=>e.urlsFormState.model.urls,pn=e=>e.urlsFormState,dn=e=>e.patterns,mn=e=>e.countUsers,un=e=>e.details.id,hn=e=>e.details.changedOnFormatted,gn=e=>e.contentFilters,fn=e=>e.domainWithAliases,Sn=e=>e.urlsInProgress,_n=e=>e.details.nameInProgress,Cn=e=>e.details.descriptionInProgress,vn=e=>e.shouldBeClosed,Pn=e=>e.urlVerificationInProgress,Un=e=>e.enhancedProtectionVerificationResultUrl,xn=e=>e.defaultEndUserId;var yn={create:Mi,urlsList:tn,list:en},ti="urlLists",ii=Si(ti),et=U(ii,e=>e.list),Z=U(ii,e=>e.create),B=U(ii,e=>e.urlsList),En=U(Z,Oi),bn=U(Z,Bi),In=U(Z,Ni),wn=U(Z,Hi),Ln=U(Z,qi),Fn=U(Z,ji),Bo=U(Z,Wi),Vn=U(Z,zi),Rn=U(Z,$i),An=U(Z,Qi),Dn=U(Z,Gi),Tn=U(Z,Yi),kn=U(Z,Ki),kt=U(Z,Ji),Mt=U(Z,Zi),Mn=U(Z,Xi),On=U(B,nn),Bn=U(B,rn),No=U(B,sn),qo=U(B,on),Nn=U(B,pn),Ye=U(B,an),qn=U(B,ln),Hn=U(B,cn),jn=U(B,dn),Wn=U(B,mn),zn=U(B,hn),$n=U(B,gn),Qn=U(B,Sn),Gn=U(B,_n),Yn=U(B,Cn),Kn=U(B,un),Jn=U(B,vn),Zn=U(B,fn),Ot=U(B,Pn),Bt=U(B,Un),Xn=U(B,xn);var Nt=(()=>{class e{constructor(t){this.store=t,this.pending=this.store.selectSignal(En),this.hasChanges=this.store.selectSignal(wn),this.hasName=this.store.selectSignal(Fn),this.name=this.store.selectSignal(Vn),this.description=this.store.selectSignal(Rn),this.patterns=this.store.selectSignal(Dn),this.contentFilters=this.store.selectSignal(Tn),this.detailFormState=this.store.selectSignal(bn),this.urlsFormState=this.store.selectSignal(In),this.submitting=this.store.selectSignal(Ln),this.accountId=this.store.selectSignal(se),this.enhancedProtectionVerificationResultUrl=this.store.selectSignal(Mt);let r=this.store.selectSignal(kt),n=this.store.selectSignal(Lt);this.urlVerificationInProgress=re(()=>r().length>0),this.enableEnhancedProtection=re(()=>n()!==wt.Off)}init(){this.store.dispatch(m.init.request())}destroy(){this.store.dispatch(m.destroy())}saveName(t){this.store.dispatch(m.saveName({name:t}))}saveDescription(t){this.store.dispatch(m.saveDescription({description:t}))}submit(){this.store.dispatch(m.create.request())}cancel(){this.store.dispatch(m.cancel())}changeUrl(t){this.store.dispatch(m.changeUrl({model:t}))}
1detailsFormInit(){this.store.dispatch(m.detailsForm.init())}modelChange(t){this.store.dispatch(m.detailsForm.detailsChanged({model:t}))}verifyUrl(t){this.store.dispatch(m.checkUrlNeedVerify({url:t.value}))}submitDetailsForm(){this.store.dispatch(m.detailsForm.save())}cancelDetailsForm(){this.store.dispatch(m.detailsForm.cancel())}static{this.\u0275fac=function(r){return new(r||e)(L(he))}}static{this.\u0275prov=de({token:e,factory:e.\u0275fac})}}return e})();var Er=["dialog"],br=["enhancedProtectionModalTmpl"],Ir=e=>({disabled:e}),ni=e=>({name:e});function wr(e,i){e&1&&(a(0,"div",22),K(1,"div",23),D(2,"translate"),o()),e&2&&(s(),y("innerHTML",q(2,1,"urlLists.create.table.info"),me))}function Lr(e,i){if(e&1){let t=ue();a(0,"div",24)(1,"div",25)(2,"app-url-list-detail-form",26),D(3,"translate"),J("modelChange",function(n){R(t);let c=v();return A(c.modelChange(n))})("submitClick",function(){R(t);let n=v();return A(n.onSubmitDetailForm())})("cancelClick",function(){R(t);let n=v();return A(n.dialogRef.close())}),o()()()}if(e&2){let t=v();s(2),y("formModelState",t.detailFormState())("accountId",t.accountId())("subHeader",q(3,3,"urlLists.create.dialog.subHeader"))}}function Fr(e,i){if(e&1&&(a(0,"li")(1,"strong"),h(2),o()()),e&2){let t=i.$implicit;s(2),N(t)}}function Vr(e,i){if(e&1&&(a(0,"div",33)(1,"span",34),h(2,"urlLists.enhancedProtection.bypassImageFiltering"),o()(),a(3,"ul",35),H(4,Fr,3,1,"li",null,Q),o()),e&2){let t=v(2);s(4),j(t.enhancedProtectionVerificationResultUrl().bypassImageFiltering)}}function Rr(e,i){if(e&1&&(a(0,"li")(1,"strong"),h(2),o()()),e&2){let t=i.$implicit;s(2),N(t)}}function Ar(e,i){if(e&1&&(a(0,"div",33)(1,"span",34),h(2,"urlLists.enhancedProtection.bypassVideoBlocking"),o()(),a(3,"ul",35),H(4,Rr,3,1,"li",null,Q),o()),e&2){let t=v(2);s(4),j(t.enhancedProtectionVerificationResultUrl().bypassVideoBlocking)}}function Dr(e,i){if(e&1&&(a(0,"li")(1,"strong"),h(2),o()()),e&2){let t=i.$implicit;s(2),N(t)}}function Tr(e,i){if(e&1&&(a(0,"div",33)(1,"span",34),h(2," urlLists.enhancedProtection.urlBlockedByBlacklist "),o()(),a(3,"ul",35),H(4,Dr,3,1,"li",null,Q),o()),e&2){let t=v(2);s(4),j(t.enhancedProtectionVerificationResultUrl().blacklist)}}function kr(e,i){if(e&1&&(a(0,"li")(1,"strong"),h(2),o()()),e&2){let t=i.$implicit;s(2),N(t)}}function Mr(e,i){if(e&1&&(a(0,"div",33)(1,"span",36),h(2," urlLists.enhancedProtection.urlBlockedByWeb "),o()(),a(3,"ul",35),H(4,kr,3,1,"li",null,Q),o()),e&2){let t=i.$implicit;s(),y("translateParams",ne(1,ni,t.key)),s(3),j(t.array)}}function Or(e,i){if(e&1&&H(0,Mr,6,3,null,null,Q),e&2){let t=v(2);j(t.enhancedProtectionVerificationResultUrl().web)}}function Br(e,i){if(e&1&&(a(0,"li")(1,"strong"),h(2),o()()),e&2){let t=i.$implicit;s(2),N(t)}}function Nr(e,i){if(e&1&&(a(0,"div",33)(1,"span",36),h(2," urlLists.enhancedProtection.urlBlockedByYoutube "),o()(),a(3,"ul",35),H(4,Br,3,1,"li",null,Q),o()),e&2){let t=i.$implicit;s(),y("translateParams",ne(1,ni,t.key)),s(3),j(t.array)}}function qr(e,i){if(e&1&&H(0,Nr,6,3,null,null,Q),e&2){let t=v(2);j(t.enhancedProtectionVerificationResultUrl().youtube)}}function Hr(e,i){if(e&1&&(a(0,"li")(1,"strong"),h(2),o()()),e&2){let t=i.$implicit;s(2),N(t)}}function jr(e,i){if(e&1&&(a(0,"div",33)(1,"span",36),h(2," urlLists.enhancedProtection.urlBlockedByOffensive "),o()(),a(3,"ul",35),H(4,Hr,3,1,"li",null,Q),o()),e&2){let t=i.$implicit;s(),y("translateParams",ne(1,ni,t.key)),s(3),j(t.array)}}function Wr(e,i){if(e&1&&H(0,jr,6,3,null,null,Q),e&2){let t=v(2);j(t.enhancedProtectionVerificationResultUrl().offensive)}}function zr(e,i){if(e&1){let t=ue();a(0,"div",27)(1,"app-spinner-box",28)(2,"div",25)(3,"h2",29),h(4," urlLists.enhancedProtection.title "),o(),a(5,"app-alert",30),h(6),D(7,"translate"),o(),$(8,Vr,6,0)(9,Ar,6,0)(10,Tr,6,0)(11,Or,2,0)(12,qr,2,0)(13,Wr,2,0),a(14,"div",31)(15,"app-primary-button",32),J("click",function(){R(t);let n=v();return A(n.closeModal())}),h(16),D(17,"translate"),o()()()()()}if(e&2){let t=v();s(),y("pending",t.urlVerificationInProgress())("popup",!1),s(5),N(q(7,10,"urlLists.enhancedProtection.blockedAlert")),s(2),k(t.enhancedProtectionVerificationResultUrl().bypassImageFiltering.length>0?8:-1),s(),k(t.enhancedProtectionVerificationResultUrl().bypassVideoBlocking.length>0?9:-1),s(),k(t.enhancedProtectionVerificationResultUrl().blacklist.length>0?10:-1),s(),k(t.enhancedProtectionVerificationResultUrl().web.length>0?11:-1),s(),k(t.enhancedProtectionVerificationResultUrl().youtube.length>0?12:-1),s(),k(t.enhancedProtectionVerificationResultUrl().offensive.length>0?13:-1),s(3),ce(" ",q(17,12,"GOT_IT")," ")}}var qt=(()=>{class e extends mt{constructor(t,r,n,c){super(),this.service=t,this.dialogService=r,this.confirmationService=n,this.asyncValidatorsService=c,this.configuration={translatePath:"urlLists.create.errors.",namePlaceholder:"urlLists.create.defaultName",descriptionPlaceholder:"urlLists.create.defaultDescription",nameAsyncValidator:d=>this.asyncValidatorsService.isUrlListNameUsed(d,()=>this.accountId())},this.pending=this.service.pending,this.submitting=this.service.submitting,this.name=this.service.name,this.description=this.service.description,this.patterns=this.service.patterns,this.contentFilters=this.service.contentFilters,this.detailFormState=this.service.detailFormState,this.urlsFormState=this.service.urlsFormState,this.accountId=this.service.accountId,this.enhancedProtectionVerificationResultUrl=this.service.enhancedProtectionVerificationResultUrl,this.urlVerificationInProgress=this.service.urlVerificationInProgress,this.enableEnhancedProtection=this.service.enableEnhancedProtection,this.urlListTableComponentRef=xe(Pe),this.dialog=xe("dialog"),this.enhancedProtectionModalTmpl=xe("enhancedProtectionModalTmpl"),this.submitDisabled=Ze(!0),this.nameInputStatus=new oi($e.Default),ct(()=>{!this.urlVerificationInProgress()&&!this.enhancedProtectionVerificationResultUrl().has&&this.enhancedProtectionModalRef&&this.saveWithEnhancedProtection()})}ngOnInit(){this.service.init()}ngOnDestroy(){this.service.destroy(),super.ngOnDestroy(),this.dialogRef!=null&&this.dialogRef.close()}canBeDeactivated(){return this.service.hasChanges()?this.confirmationService.leaveConfirm().pipe(w(t=>!!t)):Ue(!0)}saveName(t){this.service.saveName(t)}saveDescription(t){this.service.saveDescription(t)}onSubmit(){this.nameInputStatus.value!==$e.Invalid&&(this.nameInputStatus.value===$e.Validating?this.nameInputStatus.pipe(ge(t=>t!==$e.Validating),Ve(1)):Ue(this.nameInputStatus.value)).pipe(this.takeUntilDestroy()).subscribe(t=>{t!==$e.Invalid&&this.urlListTableComponentRef().onSubmit()})}onSubmitDetailForm(){this.service.submitDetailsForm(),this.dialogRef.close()}save(){this.service.hasName()?this.service.submit():(this.service.detailsFormInit(),this.dialogRef=this.dialogService.open(this.dialog()),this.dialogRef.afterClosed().subscribe(()=>{this.dialogRef=null,this.service.cancelDetailsForm()}))}cancel(){this.service.hasChanges()?this.confirmationService.cancelConfirm().subscribe(t=>{t&&this.service.cancel()}):this.service.cancel()}changeUrl(t){this.service.changeUrl(t)}verifyUrl(t){this.enableEnhancedProtection()&&(t.pattern==="ExactMatch"||t.pattern==="Contains")&&this.service.verifyUrl(t)}modelChange(t){this.service.modelChange(t)}
1nameInputStatusChanged(t){this.nameInputStatus.next(t)}openModal(){this.enhancedProtectionModalRef||(this.enhancedProtectionModalRef=this.dialogService.open(this.enhancedProtectionModalTmpl()),this.enhancedProtectionModalRef.afterClosed().subscribe(()=>{this.enhancedProtectionModalRef=null}))}closeModal(){this.enhancedProtectionModalRef&&this.enhancedProtectionModalRef.close()}saveWithEnhancedProtection(){this.save(),this.closeModal()}verifyEnhancedProtection(){this.urlVerificationInProgress()||this.enhancedProtectionVerificationResultUrl().has?this.openModal():this.save()}onChangeTableSubmitDisabled(t){this.submitDisabled.set(t)}static{this.\u0275fac=function(r){return new(r||e)(le(Nt),le(ft),le(ze),le(Et))}}static{this.\u0275cmp=Ce({type:e,selectors:[["ng-component"]],viewQuery:function(r,n){r&1&&(ye(n.urlListTableComponentRef,Pe,5),ye(n.dialog,Er,5),ye(n.enhancedProtectionModalTmpl,br,5)),r&2&&at(3)},features:[Ae([Nt]),rt],decls:31,vars:23,consts:[["titleTooltipTemplate",""],["dialog",""],["enhancedProtectionModalTmpl",""],[1,"block-with-sticky-footer"],[1,"scrollable"],[1,"content-inner"],[1,"responsive-loader-box",3,"isLoading"],[3,"pending","popup"],[1,"url-list-create-main"],[1,"url-list-details"],[3,"saveName","saveDescription","nameInputStatusChanged","name","description","configuration"],[1,"url-table-panel"],[1,"view-title","text-with-icon"],[1,"txt"],["href","javascript:void(0);","appTooltipPlacement","right","appTooltipTrigger","click",1,"icon-wrapper",3,"appTooltip"],["name","info",1,"small-size"],[1,"url-list-table-wrapper"],[1,"no-scroll",3,"onChangeUrl","onValueOrAccessChanged","onSave","advancedSubmitDisabledChanged","patterns","contentFilters","state","isUrlRequired"],[1,"action-footer"],[1,"button-bar"],[3,"click","ngClass"],[1,"cancel-button",3,"click"],[1,"simple-tooltip"],[3,"innerHTML"],[1,"modal-content","modal-url-list-detail"],[1,"modal-body"],[3,"modelChange","submitClick","cancelClick","formModelState","accountId","subHeader"],[1,"modal-content","locked-modal"],[1,"locked-spinner-box",3,"pending","popup"],["translate","",1,"modal-title"],["type","error",1,"alert","m-b-1"],[1,"modal-footer"],[1,"button",3,"click"],[1,"title-locked"],["translate",""],[1,"locked-items"],["translate","",3,"translateParams"]],template:function(r,n){if(r&1){let c=ue();a(0,"div",3)(1,"div",4)(2,"div",5)(3,"app-loader-box",6)(4,"app-spinner-box",7)(5,"div",8)(6,"div",9)(7,"app-edit-page-header",10),J("saveName",function(C){return R(c),A(n.saveName(C))})("saveDescription",function(C){return R(c),A(n.saveDescription(C))})("nameInputStatusChanged",function(C){return R(c),A(n.nameInputStatusChanged(C))}),o()(),a(8,"div",11)(9,"h4",12)(10,"span",13),h(11),D(12,"translate"),o(),a(13,"a",14),K(14,"app-svg-icon",15),$(15,wr,3,3,"ng-template",null,0,be),o()()(),a(17,"div",16)(18,"app-url-list-table",17),J("onChangeUrl",function(C){return R(c),A(n.changeUrl(C))})("onValueOrAccessChanged",function(C){return R(c),A(n.verifyUrl(C))})("onSave",function(){return R(c),A(n.verifyEnhancedProtection())})("advancedSubmitDisabledChanged",function(C){return R(c),A(n.onChangeTableSubmitDisabled(C))}),o()()()()()()(),a(19,"div",18)(20,"div",19)(21,"app-primary-button",20),J("click",function(){return R(c),A(n.onSubmit())}),h(22),D(23,"translate"),o(),a(24,"app-primary-outline-button",21),J("click",function(){return R(c),A(n.cancel())}),h(25),D(26,"translate"),o()()()(),$(27,Lr,4,5,"ng-template",null,1,be)(29,zr,18,14,"ng-template",null,2,be)}if(r&2){let c=lt(16);s(3),y("isLoading",n.pending()),s(),y("pending",n.submitting())("popup",!1),s(3),y("name",n.name())("description",n.description())("configuration",n.configuration),s(4),N(q(12,15,"urlLists.create.table.title")),s(2),y("appTooltip",c),s(5),y("patterns",n.patterns())("contentFilters",n.contentFilters())("state",n.urlsFormState())("isUrlRequired",!0),s(3),y("ngClass",ne(21,Ir,n.submitDisabled())),s(),ce(" ",q(23,17,"urlLists.create.buttons.submit")," "),s(3),ce(" ",q(26,19,"CANCEL")," ")}},dependencies:[ke,Te,St,_t,yt,ht,qe,Pe,Vi,pt,ut,We,gt],styles:[".url-list-details[_ngcontent-%COMP%]{margin-bottom:25px}.view-title[_ngcontent-%COMP%]{margin-bottom:5px}.content-inner[_ngcontent-%COMP%]{max-width:1240px;margin-bottom:35px}.block-with-sticky-footer[_ngcontent-%COMP%]{padding-left:106px;box-sizing:border-box}.url-table-panel[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.url-table-panel[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{margin-right:8px;
1cursor:pointer}.cancel-button[_ngcontent-%COMP%]{margin-left:16px}.locked-modal[_ngcontent-%COMP%]{min-width:220px;max-width:455px}.locked-modal[_ngcontent-%COMP%] .url[_ngcontent-%COMP%]{word-break:break-all}.locked-modal[_ngcontent-%COMP%] .locked-spinner-box[_ngcontent-%COMP%]{min-width:200px;min-height:120px}.locked-modal[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%]{margin-top:25px;display:flex}.locked-modal[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{flex:1 1 0}.locked-modal[_ngcontent-%COMP%] .title-locked[_ngcontent-%COMP%]{font-size:16px}.locked-modal[_ngcontent-%COMP%] .alert[_ngcontent-%COMP%]{display:block;margin-left:0}.locked-modal[_ngcontent-%COMP%] .button[_ngcontent-%COMP%] + .button[_ngcontent-%COMP%]{margin-left:16px}.locked-items[_ngcontent-%COMP%]{margin:0 0 16px;padding:0;list-style:none;overflow-wrap:break-word}.locked-items[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin-top:8px}"],changeDetection:0})}}return e})();var Ht=(()=>{class e{constructor(t){this.store=t,this.listState=this.store.selectSignal(et)}init(){this.store.dispatch(f.init.request())}pageChanged(t){this.store.dispatch(f.page.request({page:t}))}pageSizeChanged(t){this.store.dispatch(f.pageSize.request({pageSize:t}))}searchChanged(t){this.store.dispatch(f.search.request({search:t}))}destroy(){this.store.dispatch(f.destroy())}static{this.\u0275fac=function(r){return new(r||e)(L(he))}}static{this.\u0275prov=de({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Qr=e=>["../",e],Gr=(e,i)=>i.id;function Yr(e,i){e&1&&(st(0),a(1,"app-primary-button",13),h(2),D(3,"translate"),o(),ot()),e&2&&(s(2),ce(" ",q(3,1,"urlLists.nav.new")," "))}function Kr(e,i){if(e&1&&(a(0,"tr")(1,"td",14),K(2,"div",15),D(3,"highlight"),o()()),e&2){let t=v().$implicit,r=v();s(2),y("innerHTML",Ee(3,2,t.name,r.search()),me),Xt("title",t.name)}}function Jr(e,i){if(e&1&&(K(0,"div",17),D(1,"highlight")),e&2){let t=v(2).$implicit,r=v();y("innerHTML",Ee(1,1,t.description,r.search()),me)}}function Zr(e,i){if(e&1&&(a(0,"span"),K(1,"app-svg-icon",20)(2,"span",21),o()),e&2){let t=v(2).$implicit;s(2),y("innerHTML",t.urlsSummary.allowed,me)}}function Xr(e,i){if(e&1&&(a(0,"span"),K(1,"app-svg-icon",22)(2,"span",21),o()),e&2){let t=v(2).$implicit;s(2),y("innerHTML",t.urlsSummary.filtered,me)}}function es(e,i){if(e&1&&(a(0,"span"),K(1,"app-svg-icon",23)(2,"span",21),o()),e&2){let t=v(2).$implicit;s(2),y("innerHTML",t.urlsSummary.blocked,me)}}function ts(e,i){if(e&1&&(a(0,"tr")(1,"td"),K(2,"a",16),D(3,"highlight"),$(4,Jr,2,4,"div",17),o(),a(5,"td",18),$(6,Zr,3,1,"span")(7,Xr,3,1,"span")(8,es,3,1,"span"),o(),a(9,"td")(10,"span",19),h(11),o()(),a(12,"td")(13,"span"),h(14),o()()()),e&2){let t=v().$implicit,r=v();s(2),y("routerLink",ne(12,Qr,t.id))("innerHTML",Ee(3,9,t.name,r.search()),me),Xt("title",t.name),s(2),k(t.description?4:-1),s(2),k(t.urlsSummary.allowed?6:-1),s(),k(t.urlsSummary.filtered?7:-1),s(),k(t.urlsSummary.blocked?8:-1),s(3),N(t.changedBy),s(3),N(t.changedOnFormatted)}}function is(e,i){if(e&1&&$(0,Kr,4,5,"tr")(1,ts,15,14,"tr"),e&2){let t=i.$implicit;k(t.inProgress?0:1)}}function ns(e,i){e&1&&(a(0,"div"),h(1),D(2,"translate"),K(3,"br"),h(4),D(5,"translate"),o()),e&2&&(s(),ce(" ",q(2,2,"search.noResults.cause")," "),s(3),ce(" ",q(5,4,"search.noResults.action")," "))}function rs(e,i){e&1&&(a(0,"div"),h(1),D(2,"translate"),o()),e&2&&(s(),N(q(2,1,"urlLists.list.emptyMessage")))}function ss(e,i){if(e&1&&(a(0,"tr",11)(1,"td",24),$(2,ns,6,6,"div")(3,rs,3,3,"div"),o()()),e&2){let t=v();s(2),k(t.search()?2:-1),s(),k(!t.pending()&&!t.search()?3:-1)}}function os(e,i){if(e&1){let t=ue();a(0,"app-custom-pagination",25),J("currentPageChange",function(n){R(t);let c=v();return A(c.pageChanged(n))})("pageAmountChange",function(n){R(t);let c=v();return A(c.pageAmountChanged(n))}),o()}if(e&2){let t=v();y("total",t.total())("itemsPerPage",t.pageSize())("currentPage",t.page())}}var jt=(()=>{class e{constructor(t){this.service=t,this.createUrlListPermission={operation:we.Create,type:Ie.UrlListAccount},this.total=re(()=>this.service.listState().total),this.pending=re(()=>this.service.listState().pending),this.listUrls=re(()=>this.service.listState().list),this.page=re(()=>this.service.listState().query.page),this.pageSize=re(()=>this.service.listState().query.pageSize),this.search=re(()=>this.service.listState().query.search),this.matches=re(()=>{let r=this.service.listState();return!r.pending&&r.query.search?r.total:null})}ngOnInit(){this.service.init()}ngOnDestroy(){this.service.destroy()}pageChanged(t){this.service.pageChanged(t)}pageAmountChanged(t){this.service.pageSizeChanged(t)}searchChanged(t){this.service.searchChanged(t)}static{this.\u0275fac=function(r){return new(r||e)(le(Ht))}}static{this.\u0275cmp=Ce({type:e,selectors:[["ng-component"]],features:[Ae([Ht])],decls:18,vars:9,consts:[[1,"scrollable"],[1,"page-inner"],[1,"flex-box","m-b-1"],[1,"search-input",3,"ngModelChange","ngModel","placeholder","matches"],[4,"appIfAllowed"],[3,"pen
1ding"],[1,"table","table-fixed"],["translate","urlLists.list.urlList",1,"list-name-cell"],["translate","urlLists.list.includedUrls"],["translate","urlLists.list.changedBy"],["translate","urlLists.list.changedOn"],[1,"row-no-results"],[3,"total","itemsPerPage","currentPage"],["routerLink","../new","routerLinkActive","active",1,"pull-right"],["colspan","4",1,"cell-with-loader"],[1,"text-cut",3,"innerHTML"],[1,"text-cut",3,"routerLink","innerHTML"],[1,"description","text-cut",3,"innerHTML"],[1,"urls-summary"],[1,"text-cut"],["name","tick",2,"color","#39ac73"],[3,"innerHTML"],["name","filter",2,"color","#F0D42F"],["name","block",2,"color","#dd4d52"],["colspan","4",1,"txt-c"],[3,"currentPageChange","pageAmountChange","total","itemsPerPage","currentPage"]],template:function(r,n){r&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"app-search-input",3),D(4,"translate"),J("ngModelChange",function(d){return n.searchChanged(d)}),o(),$(5,Yr,4,3,"ng-container",4),o(),a(6,"app-loader-list-box",5)(7,"table",6)(8,"thead"),K(9,"th",7)(10,"th",8)(11,"th",9)(12,"th",10),o(),a(13,"tbody"),H(14,is,2,1,null,null,Gr),$(16,ss,4,2,"tr",11),o()(),$(17,os,1,3,"app-custom-pagination",12),o()()()),r&2&&(s(3),y("ngModel",n.search())("placeholder",q(4,7,"search.placeholder"))("matches",n.matches()),s(2),y("appIfAllowed",n.createUrlListPermission),s(),y("pending",n.pending()),s(8),j(n.listUrls()),s(2),k(n.listUrls().length===0?16:-1),s(),k(n.total()>15?17:-1))},dependencies:[ke,Te,Ii,ui,hi,bi,qe,vt,Ai,We,Ei,Pi,Ci,vi],styles:[".page-inner[_ngcontent-%COMP%]{max-width:1024px;margin-bottom:1rem}.pull-right[_ngcontent-%COMP%]{align-self:end;margin-left:auto}.search-input[_ngcontent-%COMP%]{margin-right:15px}.urls-summary[_ngcontent-%COMP%] app-svg-icon[_ngcontent-%COMP%]{margin-right:4px;vertical-align:middle}.urls-summary[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:inline-block;margin-right:8px;vertical-align:middle}.list-name-cell[_ngcontent-%COMP%]{width:400px}.description[_ngcontent-%COMP%]{color:#757575}.row-no-results[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{height:48px}"],changeDetection:0})}}return e})();var Wt=(()=>{class e{constructor(t){this.store=t;let r=this.store.selectSignal(wi),n=this.store.selectSignal(Ot),c=this.store.selectSignal(Lt);this.pending=this.store.selectSignal(On),this.hasChanges=this.store.selectSignal(Bn),this.name=this.store.selectSignal(Ye),this.description=this.store.selectSignal(qn),this.urlsFormState=this.store.selectSignal(Nn),this.patterns=this.store.selectSignal(jn),this.countUsers=this.store.selectSignal(Wn),this.changedOnFormatted=this.store.selectSignal(zn),this.contentFilters=this.store.selectSignal($n),this.urlsInProgress=this.store.selectSignal(Qn),this.nameInProgress=this.store.selectSignal(Gn),this.descriptionInProgress=this.store.selectSignal(Yn),this.accountId=this.store.selectSignal(se),this.enhancedProtectionVerificationResultUrl=this.store.selectSignal(Bt),this.urlsListId=re(()=>r().urlListId),this.urlVerificationInProgress=re(()=>n().length>0),this.enableEnhancedProtection=re(()=>c()!==wt.Off)}init(){this.store.dispatch(l.init.request({listId:this.urlsListId()}))}destroy(){this.store.dispatch(l.destroy())}saveName(t){this.store.dispatch(l.saveName.request({name:t}))}saveDescription(t){this.store.dispatch(l.saveDescription.request({description:t}))}submit(t){this.store.dispatch(l.save.request({close:t}))}cancel(){this.store.dispatch(l.cancel())}changeUrl(t){this.store.dispatch(l.changeUrl({url:t}))}deleteList(){this.store.dispatch(l.delete.request())}verifyUrl(t){this.store.dispatch(l.checkUrlNeedVerify({url:t.value}))}static{this.\u0275fac=function(r){return new(r||e)(L(he))}}static{this.\u0275prov=de({token:e,factory:e.\u0275fac})}}return e})();var ls=["enhancedProtectionModalTmpl"],cs=e=>({date:e}),er=e=>({disabled:e}),ps=e=>({countUsers:e}),si=e=>({name:e});function ds(e,i){if(e&1){let t=ue();a(0,"app-edit-page-header",25),J("saveName",function(n){R(t);let c=v();return A(c.saveName(n))})("saveDescription",function(n){R(t);let c=v();return A(c.saveDescription(n))}),o()}if(e&2){let t=v();y("name",t.name())("nameInProgress",t.nameInProgress())("description",t.description())("descriptionInProgress",t.descriptionInProgress())("configuration",t.configuration)}}function ms(e,i){if(e&1&&(a(0,"h2",26),h(1),o(),a(2,"div",27),h(3),o()),e&2){let t=v();s(),N(t.name()),s(2),N(t.description())}}function us(e,i){if(e&1){let t=ue();st(0),a(1,"app-destructive-button",23),J("click",function(){R(t);let n=v();return A(n.deleteList())}),h(2),D(3,"translate"),o(),ot()}e&2&&(s(2),ce(" ",q(3,1,"urlLists.view.buttons.delete")," "))}function hs(e,i){e&1&&(a(0,"div",28),K(1,"div",29),D(2,"translate"),o()),e&2&&(s(),y("innerHTML",q(2,1,"urlLists.view.table.info"),me))}function gs(e,i){if(e&1){let t=ue();a(0,"app-primary-button",30),J("click",function(){R(t);let n=v();return A(n.onSubmit())}
1),h(1),D(2,"translate"),o(),a(3,"app-primary-button",30),J("click",function(){R(t);let n=v();return A(n.onSubmit(!1))}),h(4),D(5,"translate"),o()}if(e&2){let t=v();y("ngClass",ne(8,er,t.submitDisabled())),s(),ce(" ",q(2,4,"SAVE_AND_CLOSE")," "),s(2),y("ngClass",ne(10,er,t.submitDisabled())),s(),ce(" ",q(5,6,"SAVE")," ")}}function fs(e,i){e&1&&(a(0,"app-alert",24),K(1,"span",29),D(2,"translate"),o()),e&2&&(s(),y("innerHTML",Ee(2,1,"urlLists.view.effectedUsers",ne(4,ps,i)),me))}function Ss(e,i){if(e&1&&(a(0,"li")(1,"strong"),h(2),o()()),e&2){let t=i.$implicit;s(2),N(t)}}function _s(e,i){if(e&1&&(a(0,"div",38)(1,"span",39),h(2,"urlLists.enhancedProtection.bypassImageFiltering"),o()(),a(3,"ul",40),H(4,Ss,3,1,"li",null,Q),o()),e&2){let t=v(2);s(4),j(t.enhancedProtectionVerificationResultUrl().bypassImageFiltering)}}function Cs(e,i){if(e&1&&(a(0,"li")(1,"strong"),h(2),o()()),e&2){let t=i.$implicit;s(2),N(t)}}function vs(e,i){if(e&1&&(a(0,"div",38)(1,"span",39),h(2,"urlLists.enhancedProtection.bypassVideoBlocking"),o()(),a(3,"ul",40),H(4,Cs,3,1,"li",null,Q),o()),e&2){let t=v(2);s(4),j(t.enhancedProtectionVerificationResultUrl().bypassVideoBlocking)}}function Ps(e,i){if(e&1&&(a(0,"li")(1,"strong"),h(2),o()()),e&2){let t=i.$implicit;s(2),N(t)}}function Us(e,i){if(e&1&&(a(0,"div",38)(1,"span",39),h(2," urlLists.enhancedProtection.urlBlockedByBlacklist "),o()(),a(3,"ul",40),H(4,Ps,3,1,"li",null,Q),o()),e&2){let t=v(2);s(4),j(t.enhancedProtectionVerificationResultUrl().blacklist)}}function xs(e,i){if(e&1&&(a(0,"li")(1,"strong"),h(2),o()()),e&2){let t=i.$implicit;s(2),N(t)}}function ys(e,i){if(e&1&&(a(0,"div",38)(1,"span",41),h(2," urlLists.enhancedProtection.urlBlockedByWeb "),o()(),a(3,"ul",40),H(4,xs,3,1,"li",null,Q),o()),e&2){let t=i.$implicit;s(),y("translateParams",ne(1,si,t.key)),s(3),j(t.array)}}function Es(e,i){if(e&1&&H(0,ys,6,3,null,null,Q),e&2){let t=v(2);j(t.enhancedProtectionVerificationResultUrl().web)}}function bs(e,i){if(e&1&&(a(0,"li")(1,"strong"),h(2),o()()),e&2){let t=i.$implicit;s(2),N(t)}}function Is(e,i){if(e&1&&(a(0,"div",38)(1,"span",41),h(2," urlLists.enhancedProtection.urlBlockedByYoutube "),o()(),a(3,"ul",40),H(4,bs,3,1,"li",null,Q),o()),e&2){let t=i.$implicit;s(),y("translateParams",ne(1,si,t.key)),s(3),j(t.array)}}function ws(e,i){if(e&1&&H(0,Is,6,3,null,null,Q),e&2){let t=v(2);j(t.enhancedProtectionVerificationResultUrl().youtube)}}function Ls(e,i){if(e&1&&(a(0,"li")(1,"strong"),h(2),o()()),e&2){let t=i.$implicit;s(2),N(t)}}function Fs(e,i){if(e&1&&(a(0,"div",38)(1,"span",41),h(2," urlLists.enhancedProtection.urlBlockedByOffensive "),o()(),a(3,"ul",40),H(4,Ls,3,1,"li",null,Q),o()),e&2){let t=i.$implicit;s(),y("translateParams",ne(1,si,t.key)),s(3),j(t.array)}}function Vs(e,i){if(e&1&&H(0,Fs,6,3,null,null,Q),e&2){let t=v(2);j(t.enhancedProtectionVerificationResultUrl().offensive)}}function Rs(e,i){if(e&1){let t=ue();a(0,"div",31)(1,"app-spinner-box",32)(2,"div",33)(3,"h2",34),h(4," urlLists.enhancedProtection.title "),o(),a(5,"app-alert",35),h(6),D(7,"translate"),o(),$(8,_s,6,0)(9,vs,6,0)(10,Us,6,0)(11,Es,2,0)(12,ws,2,0)(13,Vs,2,0),a(14,"div",36)(15,"app-primary-button",37),J("click",function(){R(t);let n=v();return A(n.closeModal())}),h(16),D(17,"translate"),o()()()()()}if(e&2){let t=v();s(),y("pending",t.urlVerificationInProgress())("popup",!1),s(5),N(q(7,10,"urlLists.enhancedProtection.blockedAlert")),s(2),k(t.enhancedProtectionVerificationResultUrl().bypassImageFiltering.length>0?8:-1),s(),k(t.enhancedProtectionVerificationResultUrl().bypassVideoBlocking.length>0?9:-1),s(),k(t.enhancedProtectionVerificationResultUrl().blacklist.length>0?10:-1),s(),k(t.enhancedProtectionVerificationResultUrl().web.length>0?11:-1),s(),k(t.enhancedProtectionVerificationResultUrl().youtube.length>0?12:-1),s(),k(t.enhancedProtectionVerificationResultUrl().offensive.length>0?13:-1),s(3),ce(" ",q(17,12,"GOT_IT")," ")}}var zt=(()=>{class e extends mt{constructor(t,r,n,c,d,C){super(),this.service=t,this.confirmationService=r,this.translate=n,this.asyncValidatorsService=c,this.permissionsService=d,this.dialogService=C,this.pending=this.service.pending,this.urlsInProgress=this.service.urlsInProgress,this.nameInProgress=this.service.nameInProgress,this.descriptionInProgress=this.service.descriptionInProgress,this.name=this.service.name,this.description=this.service.description,this.urlsFormState=this.service.urlsFormState,this.contentFilters=this.service.contentFilters,this.patterns=this.service.patterns,this.countUsers=this.service.countUsers,this.changedOnFormatted=this.service.changedOnFormatted,this.accountId=this.service.accountId,this.urlListId=this.service.urlsListId,this.enhancedProtectionVerificationResultUrl=this.service.enhancedProtectionVerificationResultUrl,this.urlVerificationInProgress=this.service.urlVerificationInProgress,this.enableEnhancedProtection=this.service.enableEnhancedProtection,this.submitDisabled=Ze(!0),this.isUpdateAllowed=Ze(!0),this.urlListTableComponentRef=xe(Pe),this.enhancedProtectionModalTmpl=xe("enhancedProtectionModalTmpl"),this.configuration={translatePath:"urlLists.view.errors.",namePlaceholder:"",descriptionPlaceholder:"urlLists.view.defaultDescription",nameAsyncValidator:E=>this.asyncValidatorsService.isUrlListNameUsed(E,()=>this.accountId(),()=>this.urlListId())},this.deleteUrlListPermission={operation:we.Delete,type:Ie.UrlListAccount},this.shouldClosed=!0,ct(()=>{let E=this.urlVerificationInProgress(),X=this.enhancedProtectionVerificationResultUrl();!E&&!X.has&&this.enhancedProtectionModalRef&&(this.save(),this.closeModal())})}ngOnInit(){this.service.init(),this.fetchPermissions()}ngOnDestroy(){this.service.destroy(),super.ngOnDestroy()}canBeDeactivated(){return this.service.hasChanges()?this.confirmationService.leaveConfirm().pipe(w(t=>!!t)):Ue(!0)}saveName(t){this.service.saveName(t)}saveDescription(t){this.service.saveDescription(t)}deleteList(){let t=this.countUsers(),r=t>0?this.translate.get("urlLists.view.deleteConfirm.message",{countUsers:t}):this.translate.get("urlLists.view.deleteConfirm.messageWithoutLinkUsers");oe([this.translate.get("urlLists.view.deleteConfirm.header"),r,this.translate.get("urlLists.view.deleteConfirm.deleteBtn"),this.translate.get("urlLists.view.deleteConfirm.cancelBtn")]).subscribe(([n,c,d,C])=>{this.confirmationService.confirm({header:n,message:c,okBtnText:d,cancelBtnText:C}).subscribe(E=>{E&&this.service.deleteList()})})}onSubmit(t=!0){this.shouldClosed=t,this.urlListTableComponentRef().onSubmit()}onChangeTableSubmitDisabled(t){this.submitDisabled.set(t)}save(){let t=this.urlVerificationInProgress(),r=this.enhancedProtectionVerificationResultUrl();t||r.has?this.openModal():(this.service.submit(this.shouldClosed),this.shouldClosed=!0)}cancel(){this.service.hasChanges()?this.confirmationService.cancelConfirm().subscribe(t=>{t&&this.service.cancel()}):this.service.cancel()}changeUrl(t){this.service.changeUrl(t)}verifyUrl(t){this.enableEnhancedProtection()&&(t.pattern==="ExactMatch"||t.pattern==="Contains")&&this.service.verifyUrl(t)}openModal(){this.enhancedProtectionModalRef||(this.enhancedProtectionModalRef=this.dialogService.open(this.enhancedProtectionModalTmpl()),this.enhancedProtectionModalRef.afterClosed().subscribe(()=>{this.enhancedProtectionModalRef=null}))}closeModal(){this.enhancedProtectionModalRef&&this.enhancedProtectionModalRef.close()}fetchPermissions(){this.permissionsService.isResourceAllowed({operation:we.Update,type:Ie.UrlListAccount}).pipe(this.takeUntilDestroy()).subscribe(t=>this.isUpdateAllowed.set(t))}static{this.\u0275fac=function(r){return new(r||e)(le(Wt),le(ze),le(ve),le(Et),le(Li),le(ft))}}static{this.\u0275cmp=Ce({type:e,selectors:[["app-url-list-component"]],viewQuery:function(r,n){r&1&&(ye(n.urlListTableComponentRef,Pe,5),ye(n.enhancedProtectionModalTmpl,ls,5)),r&2&&at(2)},features:[Ae([Wt]),rt],decls:35,vars:24,consts:[["titleTooltipTemplate",""],["exceptionsUrlListRef",""],["enhancedProtectionModalTmpl",""],[1,"block-with-sticky-footer"],[1,"scrollable"],[1,"urls-list-main"],[3,"isLoading"],[1,"url-list-details"],[1,"m-r-1"],[3,"name","nameInProgress","description","descriptionInProgress","configuration"],[1,"form-note"],[4,"appIfAllowed"],[1,"url-table-panel","sticky"],[1,"view-title","text-with-icon"],[1,"txt"],["href","javascript:void(0);","appTooltipPlacement","right","appTooltipTrigger","click",1,"icon-wrapper",3,"appTooltip"],["name","info",1,"small-size"],[3,"pen
1ding"],[1,"url-list-table"],[1,"sticky-header",3,"onChangeUrl","onValueOrAccessChanged","onSave","advancedSubmitDisabledChanged","patterns","contentFilters","state","isUrlRequired","readonly"],[1,"action-footer"],[1,"button-bar"],[1,"button-bar-inner"],[3,"click"],["type","warning",1,"alert"],[3,"saveName","saveDescription","name","nameInProgress","description","descriptionInProgress","configuration"],[1,"view-title"],[1,"view-desc"],[1,"simple-tooltip"],[3,"innerHTML"],[3,"click","ngClass"],[1,"modal-content","locked-modal"],[1,"locked-spinner-box",3,"pending","popup"],[1,"modal-body"],["translate","",1,"modal-title"],["type","error",1,"alert","m-b-1"],[1,"modal-footer"],[1,"button",3,"click"],[1,"title-locked"],["translate",""],[1,"locked-items"],["translate","",3,"translateParams"]],template:function(r,n){if(r&1){let c=ue();a(0,"div",3)(1,"div",4)(2,"div",5)(3,"app-loader-box",6)(4,"div",7)(5,"div",8),$(6,ds,1,5,"app-edit-page-header",9)(7,ms,4,2),a(8,"span",10),h(9),D(10,"translate"),o()(),$(11,us,4,3,"ng-container",11),o(),a(12,"div",12)(13,"h4",13)(14,"span",14),h(15),D(16,"translate"),o(),a(17,"a",15),K(18,"app-svg-icon",16),$(19,hs,3,3,"ng-template",null,0,be),o()()(),a(21,"app-spinner-box",17)(22,"div",18)(23,"app-url-list-table",19,1),J("onChangeUrl",function(C){return R(c),A(n.changeUrl(C))})("onValueOrAccessChanged",function(C){return R(c),A(n.verifyUrl(C))})("onSave",function(){return R(c),A(n.save())})("advancedSubmitDisabledChanged",function(C){return R(c),A(n.onChangeTableSubmitDisabled(C))}),o()()()()()(),a(25,"div",20)(26,"div",21)(27,"div",22),$(28,gs,6,12),a(29,"app-primary-outline-button",23),J("click",function(){return R(c),A(n.cancel())}),h(30),D(31,"translate"),o(),$(32,fs,3,6,"app-alert",24),o()()()(),$(33,Rs,18,14,"ng-template",null,2,be)}if(r&2){let c,d=lt(20);s(3),y("isLoading",n.pending()),s(3),k(n.isUpdateAllowed()?6:7),s(3),N(Ee(10,15,"LAST_CHANGED_DATE",ne(22,cs,n.changedOnFormatted()))),s(2),y("appIfAllowed",n.deleteUrlListPermission),s(4),N(q(16,18,"urlLists.view.table.title")),s(2),y("appTooltip",d),s(4),y("pending",n.urlsInProgress()),s(2),y("patterns",n.patterns())("contentFilters",n.contentFilters())("state",n.urlsFormState())("isUrlRequired",!0)("readonly",!n.isUpdateAllowed()),s(5),k(n.isUpdateAllowed()?28:-1),s(2),ce(" ",q(31,20,"CANCEL")," "),s(2),k((c=n.countUsers())?32:-1,c)}},dependencies:[ke,Te,St,yt,ht,qe,_t,Pe,pt,vt,ut,yi,We,gt],styles:["router-outlet[_ngcontent-%COMP%] + ng-component[_ngcontent-%COMP%], router-outlet[_ngcontent-%COMP%] + .layout-route[_ngcontent-%COMP%]{display:block;height:100%;width:100%}#main-holder[_ngcontent-%COMP%]{position:relative;height:100%;box-sizing:border-box;display:block;overflow:hidden}.layout[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:stretch;position:relative;width:100%;height:100%;overflow:auto}.layout[_ngcontent-%COMP%] .layout-side-menu[_ngcontent-%COMP%]{display:block;height:100%}.layout[_ngcontent-%COMP%] .layout-content[_ngcontent-%COMP%]{display:block;width:100%;height:100%;overflow:hidden}.layout-with-breadcrumbs[_ngcontent-%COMP%]{height:calc(100% - 32px)}.block-with-fixed-footer[_ngcontent-%COMP%], .block-with-sticky-footer[_ngcontent-%COMP%]{display:flex;flex-direction:column;overflow:hidden;width:100%;height:100%}.block-with-sticky-footer[_ngcontent-%COMP%] > .scrollable[_ngcontent-%COMP%]{height:auto}.block-with-sticky-footer[_ngcontent-%COMP%] > .action-footer[_ngcontent-%COMP%]{padding:14px 24px 15px;background:#f6f6f6}.scrollable[_ngcontent-%COMP%]{overflow:auto;height:100%;padding:32px 24px 1px;box-sizing:border-box}.urls-list-main[_ngcontent-%COMP%]{max-width:1240px;margin-bottom:35px}.url-list-details[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:25px}.url-list-details[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{flex:1 1 auto;min-width:500px;word-wrap:break-word}.url-list-details[_ngcontent-%COMP%] .btn-cancel[_ngcontent-%COMP%]{flex:0 1 auto}.view-title[_ngcontent-%COMP%]{margin-bottom:5px}.no-mb[_ngcontent-%COMP%]{margin-bottom:0}.button-bar-inner[_ngcontent-%COMP%]{display:flex;align-items:flex-start}.button-bar-inner[_ngcontent-%COMP%] app-primary-button[_ngcontent-%COMP%]{margin-right:16px}.alert[_ngcontent-%COMP%]{display:inline-block;margin-left:16px}.url-table-panel[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-end}.url-table-panel.sticky[_ngcontent-%COMP%]{height:32px;position:sticky;top:-32px;background-color:#f6f6f6;z-index:2}.url-table-panel[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{margin-right:8px;
1cursor:pointer}.scroll-link[_ngcontent-%COMP%]{display:inline-block;vertical-align:middle}.locked-modal[_ngcontent-%COMP%]{min-width:220px;max-width:455px}.locked-modal[_ngcontent-%COMP%] .url[_ngcontent-%COMP%]{word-break:break-all}.locked-modal[_ngcontent-%COMP%] .locked-spinner-box[_ngcontent-%COMP%]{min-width:200px;min-height:120px}.locked-modal[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%]{margin-top:25px;display:flex}.locked-modal[_ngcontent-%COMP%] .modal-footer[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{flex:1 1 0}.locked-modal[_ngcontent-%COMP%] .title-locked[_ngcontent-%COMP%]{font-size:16px}.locked-modal[_ngcontent-%COMP%] .alert[_ngcontent-%COMP%]{display:block;margin-left:0}.locked-items[_ngcontent-%COMP%]{margin:0 0 16px;padding:0;list-style:none;overflow-wrap:break-word}.locked-items[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin-top:8px}"],changeDetection:0})}}return e})();var $t=(()=>{class e{static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275cmp=Ce({type:e,selectors:[["ng-component"]],decls:4,vars:0,consts:[[1,"layout"],[1,"layout-side-menu"],[1,"layout-content"]],template:function(r,n){r&1&&(a(0,"div",0),K(1,"app-filtering-settings-side-menu",1),a(2,"section",2),K(3,"router-outlet"),o()())},dependencies:[mi,Di],encapsulation:2,changeDetection:0})}}return e})();var Qt=class extends pe{constructor(i,t){super();let r=t.urlsFormState.model.urls;if(t.enhancedProtectionVerificationResultUrl.has){let n=[...t.enhancedProtectionVerificationResultUrl.web.getAllValues(),...t.enhancedProtectionVerificationResultUrl.youtube.getAllValues(),...t.enhancedProtectionVerificationResultUrl.offensive.getAllValues()];r=t.urlsFormState.model.urls.filter(c=>!n.includes(c.value))}this.input=I(x({},Se.createOperationInputWithId()),{accountId:i,name:t.name,description:t.description,urls:r.map(n=>({order:n.order,access:n.access,pattern:It[n.pattern],value:n.value,imageFiltering:n.imageFilteringEnabled,textFiltering:n.textFilteringEnabled,audioBlocking:n.audioBlockingEnabled,videoBlocking:n.videoBlockingEnabled}))})}};var Gt=class extends pe{constructor(i,{details:{id:t,name:r},urlsFormState:{model:{urls:n}},originalUrls:c}){super();let d=this.calculateChanges(n,c);this.input=I(x({},Se.createOperationInput()),{accountId:i,endUserId:void 0,id:t,name:r,type:"AccountLevel",urls:d})}calculateChanges(i,t){let r=i.reduce((E,X)=>(E.set(X.order,X),E),new Map),n=t.reduce((E,X)=>(E.set(X.order,X),E),new Map),c=t.filter(({order:E})=>!r.has(E)).map(E=>I(x({},this.mapUrl(E)),{diffAction:"Removed"})),d=i.filter(({order:E})=>n.has(E)).filter(E=>{let X=n.get(E.order);return!Ti.isUrlEqual(E,X)}).map(E=>I(x({},this.mapUrl(E)),{diffAction:"Changed"})),C=i.filter(({order:E})=>!n.has(E)).map(E=>I(x({},this.mapUrl(E)),{diffAction:"Added"}));return[...c,...d,...C]}mapUrl({order:i,access:t,pattern:r,value:n,textFilteringEnabled:c,imageFilteringEnabled:d,audioBlockingEnabled:C,videoBlockingEnabled:E}){return{order:i,access:t,pattern:It[r],value:n,textFiltering:c,imageFiltering:d,audioBlocking:C,videoBlocking:E,diffAction:"None"}}};var Yt=class extends pe{constructor({search:i,page:t,pageSize:r,accountId:n}){super(),this.input={page:1,pageSize:15,search:null,isAscending:!1,orderBy:null,accountId:null},n!=null&&(this.input.accountId=n),t!=null&&(this.input.page=t),r!=null&&(this.input.pageSize=r),i!=null&&(this.input.search=i)}setPage(i){this.input.page=i}setPageSize(i){this.input.pageSize=i,this.setPage(1)}setSearch(i){this.input.search=i,this.setPage(1)}};var Kt=class extends pe{constructor(i,t){super(),this.input=I(x({},Se.createOperationInput()),{accountId:i,name:t})}};var Jt=class extends pe{constructor(i,t){super(),this.input=I(x({},Se.createOperationInput()),{accountId:i,id:t.details.id,name:t.newName})}};var Zt=class extends pe{constructor(i,t){super(),this.input=I(x({},Se.createOperationInput()),{accountId:i,id:t.details.id,name:t.details.name,description:t.newDescription})}};var Ke=class extends pe{constructor(i,t){super(),this.input={url:t,endUserId:i}}};var nr=(()=>{class e extends je{constructor(t,r,n,c,d,C,E,X,Je){super("urlLists.create.effect.",n),this.store=t,this.actions=r,this.endUsersService=c,this.urlListsService=d,this.cacheApiService=C,this.workerClientService=E,this.verificationService=X,this.rbProviderService=Je,this.detailsFormSave=T(()=>this.actions.pipe(F(m.detailsForm.save),w(()=>m.create.request()))),this.init=T(()=>this.actions.pipe(F(m.init.request),_(()=>this.accountId),_(W=>oe([this.urlListsService.getPatterns(),this.cacheApiService.getDomainList(),this.endUsersService.getDefault({accountId:W})]).pipe(w(([u,P,{endUserId:z}])=>m.init.success({patterns:u,domains:P,endUserId:z})),ae(u=>this.showHttpError(u,"couldNotLoadPatterns",[m.init.failed()])))))),this.createUrlList=T(()=>this.actions.pipe(F(m.create.request),_(()=>this.rbProviderService.getRequestBuilder(Qt,se,Z)),_(W=>this.urlListsService.postAccount(W.getResult()).pipe(_(()=>this.showSuccessMessage("createdSuccessfully",[m.create.success()])),ae(u=>this.showHttpError(u,"notCreated",[m.create.failed()])))))),this.backToList=T(()=>this.actions.pipe(F(m.create.success,m.cancel),w(()=>Xe.back()))),this.updateHasAssociatedAliasesUrl=T(()=>this.actions.pipe(F(m.changeUrl),_(()=>oe([this.urls,this.domainWithAliases])),_(([W,u])=>this.workerClientService.checkDomainWithAliases(W,u)),w(W=>m.updateHasAssociatedAliasesUrl({url:{urls:W}})))),this.checkUrlNeedVerify=T(()=>this.actions.pipe(F(m.checkUrlNeedVerify),ge(({url:W})=>dt.testUrlFormat(W)),_(({url:W})=>oe([this.store.select(kt).pipe(ee()),this.store.select(Mt).pipe(ee())]).pipe(w(([u,P])=>[...u,...P.web.getAllValues(),...P.youtube.getAllValues(),...P.offensive.getAllValues(),...P.blacklist,...P.bypassVideoBlocking,...P.bypassImageFiltering]),ge(u=>!u.includes(W)),w(()=>m.verifyUrl.request({url:W})))))),this.verifyUrl=T(()=>this.actions.pipe(F(m.verifyUrl.request)).pipe(_(({url:W})=>this.rbProviderService.getRequestBuilder(Ke,Mn,W)),w(W=>W.getResult()),it(W=>this.verificationService.postUrlsEndUsers(W).pipe(w(u=>m.verifyUrl.success({result:u})),ae(u=>this.showHttpError(u,"couldNotVerifyUrl",[m.verifyUrl.failed({url:W.url})])))))),this.domainWithAliases=this.store.select(kn).pipe(ee()),this.urls=this.store.select(An).pipe(ee()),this.accountId=this.store.select(se).pipe(ee())}static{this.\u0275fac=function(r){return new(r||e)(L(he),L(He),L(ve),L(Pt),L(Qe),L(xt),L(bt),L(Ut),L(Ct))}}static{this.\u0275prov=de({token:e,factory:e.\u0275fac})}}return e})();var rr=(()=>{class e extends je{constructor(t,r,n,c){super("urlLists.list.effect.",c),this.actions=t,this.store=r,this.apiService=n,this.init=T(()=>this.actions.pipe(F(f.init.request),_(()=>this.requestBuilder),_(d=>this.getProfilesListOrFail(d,f.init)))),this.reload=T(()=>this.actions.pipe(F(f.reload.request),_(()=>this.requestBuilder),_(d=>this.getProfilesListOrFail(d,f.reload)))),this.search=T(()=>this.actions.pipe(F(f.search.request),_(({search:d})=>this.requestBuilder.pipe(nt(C=>C.setSearch(d)))),_(d=>this.getProfilesListOrFail(d,f.search)))),this.pageChanged=T(()=>this.actions.pipe(F(f.page.request),_(({page:d})=>this.requestBuilder.pipe(nt(C=>C.setPage(d)))),_(d=>this.getProfilesListOrFail(d,f.page)))),this.pageSizeChanged=T(()=>this.actions.pipe(F(f.pageSize.request),_(({pageSize:d})=>this.requestBuilder.pipe(nt(C=>C.setPageSize(d)))),_(d=>this.getProfilesListOrFail(d,f.pageSize)))),this.reloadByTime=T(()=>this.actions.pipe(F(f.init.success,f.reload.success,f.page.success,f.pageSize.success,f.search.success)).pipe(_(()=>this.inProgressFilter()),_(()=>Ue(null).pipe(Re(this.actions.pipe(F(f.init.request,f.reload.request,f.page.request,f.pageSize.request,f.search.request,f.destroy))),ci(di.timeForReloadInProgressState))),_(()=>this.inProgressFilter()),w(()=>f.reload.request()))),this.requestBuilder=oe([this.store.select(et).pipe(ee()),this.store.select(se).pipe(ee())]).pipe(w(([{query:{search:d,page:C,pageSize:E}},X])=>new Yt({search:d,page:C,pageSize:E,accountId:X})))}inProgressFilter(){return this.store.select(et).pipe(w(t=>t.list.some(r=>r.inProgress)),Ve(1),ge(t=>t))}getProfilesListOrFail(t,r){let n=t.getResult();return this.apiService.getAccount(n).pipe(Re(this.actions.pipe(F(f.destroy))),w(({collection:c,total:d})=>
1({list:c,total:d,input:n})),w(c=>r.success({response:{input:c.input,total:c.total,list:c.list.map(d=>I(x({},d),{inProgress:d.notCompletedStates.some(C=>[Le.Create_Completed,Le.Delete_Completed].includes(C))}))}})),ae(c=>this.showHttpError(c,"couldNotLoadDataError",[r.failed()])))}static{this.\u0275fac=function(r){return new(r||e)(L(He),L(he),L(Qe),L(ve))}}static{this.\u0275prov=de({token:e,factory:e.\u0275fac})}}return e})();var sr=(()=>{class e extends je{constructor(t,r,n,c,d,C,E,X,Je,W){super("urlLists.view.effect.",W),this.actions=t,this.store=r,this.urlListsService=n,this.endUsersService=c,this.verificationService=d,this.rbProviderService=C,this.cacheStore=E,this.cacheApiService=X,this.workerClientService=Je,this.init=T(()=>this.actions.pipe(F(l.init.request),_(({listId:u})=>this.accountId.pipe(w(P=>({listId:u,accountId:P})))),_(({listId:u,accountId:P})=>oe([this.getUrlListFromCache(u),this.urlListsService.getById(u),this.urlListsService.getPatterns(),this.urlListsService.getByIdAffectedEndUsers(u),this.cacheApiService.getDomainList(),this.endUsersService.getDefault({accountId:P})]).pipe(Re(this.actions.pipe(F(l.destroy))),w(([z,lr,cr,{count:pr},dr,mr])=>l.init.success({stateSnapshot:z,urlsList:lr,patterns:cr,countUsers:pr,domains:dr,endUserId:mr.endUserId})),ae(z=>this.showHttpError(z,"couldNotLoadUrlList",[l.init.failed()])))))),this.reload=T(()=>this.actions.pipe(F(l.reload.request),_(()=>this.urlsListId),_(u=>this.urlListsService.getById(u).pipe(Re(this.actions.pipe(F(l.destroy))),w(P=>l.reload.success({urlsList:P})),ae(P=>this.showHttpError(P,"couldNotLoadUrlList",[l.init.failed()])))))),this.editUrlList=T(()=>this.actions.pipe(F(l.save.request),_(()=>oe([this.rbProviderService.getRequestBuilder(Gt,se,B),this.urlsListId])),w(([u,P])=>({listId:P,input:u.getResult()})),_(({listId:u,input:P})=>(P.urls.length===0?li([null],ai):this.urlListsService.putById(u,P)).pipe(_(()=>this.showSuccessMessage("updatedSuccessfully",[l.save.success({changedOn:P.operationDate})])),ae(z=>this.showHttpError(z,"couldNotUpdate",[l.save.failed()])))))),this.deleteUrlList=T(()=>this.actions.pipe(F(l.delete.request),_(()=>oe([this.rbProviderService.getRequestBuilder(Kt,se,Ye),this.urlsListId])),_(([u,P])=>this.urlListsService.deleteById(P,u.getResult()).pipe(_(()=>this.showSuccessMessage("deletedSuccessfully",[l.delete.success()])),ae(z=>this.showHttpError(z,"couldNotDelete",[l.delete.failed()])))))),this.saveName=T(()=>this.actions.pipe(F(l.saveName.request),_(()=>this.rbProviderService.getRequestBuilder(Jt,se,B)),_(u=>{let P=u.getResult();return this.urlListsService.putByIdName(P.id,P).pipe(w(()=>l.saveName.success({changedOn:P.operationDate})),ae(z=>this.showHttpError(z,"couldNotSaveName",[l.saveName.failed()])))}))),this.saveDescription=T(()=>this.actions.pipe(F(l.saveDescription.request),_(()=>this.rbProviderService.getRequestBuilder(Zt,se,B)),_(u=>{let P=u.getResult();return this.urlListsService.putByIdDescription(P.id,P).pipe(w(()=>l.saveDescription.success({changedOn:P.operationDate})),ae(z=>this.showHttpError(z,"couldNotSaveDescription",[l.saveDescription.failed()])))}))),this.redirectBackBySubmit=T(()=>this.actions.pipe(F(l.save.success),_(()=>this.store.select(Jn).pipe(Ve(1))),ge(u=>u),w(()=>Xe.goWithCurrent({commands:[".."]})))),this.redirectToList=T(()=>this.actions.pipe(F(l.cancel,l.delete.success),w(()=>Xe.back()))),this.saveSnapshotInCache=T(()=>this.actions.pipe(F(l.save.success,l.saveName.success,l.saveDescription.success),_(()=>this.saveStateSnapshotInCache())),{dispatch:!1}),this.updateHasAssociatedAliasesUrl=T(()=>this.actions.pipe(F(l.changeUrl,l.init.success,l.reload.success),_(()=>oe([this.urls,this.domainWithAliases])),_(([u,P])=>this.workerClientService.checkDomainWithAliases(u,P)),w(u=>l.updateHasAssociatedAliasesUrl({url:{urls:u}})))),this.checkUrlNeedVerify=T(()=>this.actions.pipe(F(l.checkUrlNeedVerify),ge(({url:u})=>dt.testUrlFormat(u)),_(({url:u})=>oe([this.store.select(Ot).pipe(ee()),this.store.select(Bt).pipe(ee())]).pipe(w(([P,z])=>[...P,...z.web.getAllValues(),...z.youtube.getAllValues(),...z.offensive.getAllValues(),...z.blacklist,...z.bypassImageFiltering,...z.bypassVideoBlocking]),ge(P=>!P.includes(u)),w(()=>l.verifyUrl.request({url:u})))))),this.verifyUrl=T(()=>this.actions.pipe(F(l.verifyUrl.request)).pipe(_(({url:u})=>this.rbProviderService.getRequestBuilder(Ke,Xn,u)),w(u=>u.getResult()),it(u=>this.verificationService.postUrlsEndUsers(u).pipe(w(P=>l.verifyUrl.success({result:P})),ae(P=>this.showHttpError(P,"couldNotVerifyUrl",[l.verifyUrl.failed({url:u.url})])))))),this.urlsListId=this.store.select(Kn).pipe(ee()),this.domainWithAliases=this.store.select(Zn).pipe(ee()),this.urls=this.store.select(Hn).pipe(ee()),this.accountId=this.store.select(se).pipe(ee())}getCacheIdForStateSnapShot(t,r=""){return`/url-lists/${t}/${r}`}getUrlListFromCache(t){let r=this.getCacheIdForStateSnapShot(t);return this.cacheStore.get(r)}saveStateSnapshotInCache(){return this.store.select(B).pipe(ee(),_(t=>{let r=this.getCacheIdForStateSnapShot(t.details.id);return this.cacheStore.set(r,t)}))}static{this.\u0275fac=function(r){return new(r||e)(L(He),L(he),L(Qe),L(Pt),L(Ut),L(Ct),L(Ri),L(xt),L(bt),L(ve))}}static{this.\u0275prov=de({token:e,factory:e.\u0275fac})}}return e})();var or=[nr,sr,rr];
1function ar(){return[pi(_i.forFeature(ti,yn),Ui.forFeature(or)),ze,...ki()]}var Nc=[{path:"",component:$t,providers:ar(),data:{breadcrumbs:"urlLists.nav.main"},children:[{path:"",pathMatch:"full",redirectTo:"list"},{path:"list",pathMatch:"full",component:jt,data:{aiPageName:"URL lists"}},{path:"new",component:qt,canActivate:[Fi],canDeactivate:[ei],data:{breadcrumbs:"urlLists.nav.new",hideSideMenu:!0,defaultBack:["list"],aiPageName:"Create URL list",permission:{operation:we.Create,type:Ie.UrlListAccount}}},{path:":urlListId",pathMatch:"full",component:zt,canDeactivate:[ei],data:{breadcrumbsTextSelector:Ye,breadcrumbs:xi,aiPageName:"URL list"}}]}];export{Nc as routes};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.