1import{o as r,c as l,a as t,n as h,t as n,b as u,u as y,ap as g,S as f,d as a,B as p,A as d,e as x,F as b,q as w}from"./app.a816cb64.js";import{a as v}from"./axios.f1f32898.js";import{c as _,e as $}from"./api.85804dd1.js";import{e as k}from"./queryString.f1345032.js";import{L as E}from"./LoadingOverlay.03494e6c.js";import{_ as m}from"./ListboxSelect.10178c90.js";import{_ as c}from"./Base.857045cd.js";import{_ as V}from"./TextField.5877dd14.js";import{_ as N}from"./Pagination.2c43ed58.js";import{N as H}from"./Nudger.96908119.js";import"./Email.f2a0449f.js";import"./plugin-vue_export-helper.21dcd24c.js";import"./dom.e8bb1461.js";import"./use-tracked-pointer.e9fe94e3.js";import"./open-closed.39048018.js";import"./use-resolve-button-type.e1964d1a.js";import"./focus-management.fb5003c3.js";import"./use-outside-click.32a17c38.js";import"./hidden.418cb265.js";import"./use-controllable.edbae43b.js";import"./CheckIcon.35241a7c.js";import"./XMarkIcon.85e7adf4.js";const P={class:"text-xs"},S={class:"relative py-3 pl-3 pr-2 sm:pl-4 max-w-[10rem] lg:max-w-xs align-top"},T=["href"],Q={class:"relative py-3 pl-3 pr-2 sm:pl-4 text-gray-500 overflow-hidden align-top"},B={class:"text-ellipsis overflow-hidden"},j={class:"px-3 py-3 text-gray-500 text-center align-top"},C={key:0,class:"flex items-center justify-center rounded bg-green-50 px-1.5 py-0.5 text-3xs font-semibold tracking-wider text-green-700 ring-1 ring-green-700/40 overflow-hidden transition duration-300 ease-in-out relative group w-20 mx-auto"},A={key:1,class:"flex items-center justify-center rounded bg-pink-50 px-1.5 py-0.5 text-3xs font-semibold tracking-wider text-pink-700 ring-1 ring-pink-700/40 overflow-hidden transition duration-300 ease-in-out relative group w-20 mx-auto"},L={class:"px-3 py-3 text-gray-500 align-top"},D={name:"ExceptionsRow",props:{entry:null,incognito:{type:Boolean,default:!1}},computed:{exceptionTitle(){return this.entry.typeHandle==="email"?this.entry.emailHash:this.entry.typeHandle==="phoneNumber"?this.entry.phoneNumber:this.entry.typeHandle==="address"?this.entry.addressLine+", "+this.entry.postalCode+", "+this.entry.countryCode:"unknown"},typeHandle(){return this.entry.typeHandle==="email"?"Email":this.entry.typeHandle==="phoneNumber"?"Phone number":this.entry.typeHandle==="address"?"Address":"unknown"}},methods:{}},q=Object.assign(D,{setup(s){return(e,o)=>(r(),l("tr",P,[t("td",S,[t("a",{href:s.entry.url,class:"flex items-center justify-start gap-1 font-semibold"},[t("div",{class:h(["font-mono font-medium text-ellipsis overflow-hidden",s.incognito?"blur hover:blur-none":""])},n(e.exceptionTitle),3)],8,T)]),t("td",Q,[t("div",B,n(e.$t(e.typeHandle)),1)]),t("td",j,[s.entry.outcome==1?(r(),l("div",C,n(e.$t("Allow")),1)):u("",!0),s.entry.outcome==-1?(r(),l("div",A,n(e.$t("Block")),1)):u("",!0)]),t("td",L,n(y(g)(s.entry.postDate)),1)]))}}),F={class:"relative"},O={class:"bg-white mt-6 ring-1 ring-gray-900/5 sm:mx-0 rounded sm:rounded-lg overflow-y-auto w-full mx-auto"},U={class:"min-w-full divide-y divide-gray-900/5"},z={class:"bg-gray-50"},R={scope:"col",class:"py-3 pl-4 pr-2 text-left text-xs font-semibold text-gray-900 sm:pl-4"},M={scope:"col",class:"py-3 pl-4 pr-2 text-left text-xs font-semibold text-gray-900 sm:pl-4"},G={scope:"col",class:"px-3 py-3.5 text-center text-xs font-semibold text-gray-900 sm:pl-4"},I={scope:"col",class:"px-3 py-3.5 text-left text-xs font-semibold text-gray-900"},J={key:0},K={class:"text-xs text-gray-500 tracking-wide text-center"},W={colspan:"4",class:"p-4"},X={key:1,class:"divide-y divide-gray-900/5"},Y={name:"ExceptionsBrowser",data(){return{loading:!1,response:null,entries:[],type:{label:"---",value:null,type:"text"},outcome:{value:null,label:"---"},search:"",changed:!1,limit:50,page:1,incognito:!1}},computed:{typeQueryString(){return this.type.value?'type: "'+this.type.value+'"':""},searchQueryString(){if(this.search){if(this.type.value==="email")return k(this.search);if(this.type.value==="phoneNumber")return'phoneNumber: "*'+this.search+'*"';if(this.type.value==="address")return'addressLine: "*'+this.search+'*"'}return""},outcomeQueryString(){return this.outcome.value?"outcome: "+this.outcome.value:""},entriesQuery(){return` 2 query {
3 entries( 4 section: "exceptions", 5 limit: `+this.limit+`, 6 offset: `+this.limit*(this.page-1)+` 7 `+this.searchQueryString+` 8 `+this.typeQueryString+` 9 `+this.outcomeQueryString+` 10 ) { 11 id 12 uid 13 url 14 postDate 15 typeHandle 16 ... on exceptions_email_Entry { 17 emailHash 18 outcome 19 } 20 ... on exceptions_phoneNumber_Entry { 21 phoneNumber 22 outcome 23 } 24 ... on exceptions_address_Entry { 25 countryCode 26 postalCode 27 addressLine 28 outcome 29 } 30 } 31 } 32 `}},methods:{getExceptions(){this.changed=!1,this.loading=!0;const s=v.create(_(window.endpoints.gql));$(s,this.entriesQuery,e=>{this.entries=e.entries}).finally(()=>{this.loading=!1})},submit(){this.getExceptions()},paginateNext(){this.page++,this.getExceptions(),this.scrollToTop()},paginatePrevious(){this.page<=1||(this.page--,this.getExceptions(),this.scrollToTop())},resetPage(){this.page=1},scrollToTop(){window.scrollTo(0,0)}},mounted(){this.getExceptions()},watch:{outcome:function(s,e){this.resetPage(),this.getExceptions()},type:function(s,e){this.resetPage(),this.getExceptions()},search:function(s,e){if(this.resetPage(),s==""){this.getExceptions();return}this.changed=!0}}},ve=Object.assign(Y,{setup(s){return(e,o)=>(r(),l("section",F,[t("header",null,[t("form",{class:"flex flex-wrap 2xl:flex-nowrap justify-between gap-2",onSubmit:o[4]||(o[4]=f((...i)=>e.submit&&e.submit(...i),["prevent"]))},[a(c,{class:"w-full md:w-1/2 lg:w-1/2 2xl:w-full",handle:"type",label:"Exception Type"},{input:p(()=>[a(m,{handle:"type",items:[{label:"E-mail",value:"email",type:"email"},{label:"Phone number",value:"phoneNumber",type:"text"},{label:"Address",value:"address",type:"text"}],modelValue:e.type,"onUpdate:modelValue":o[0]||(o[0]=i=>e.type=i)},null,8,["modelValue"])]),_:1}),e.type.value?(r(),d(V,{key:0,class:"w-full md:w-1/2 lg:w-1/2 2xl:w-full",label:e.type.label,type:e.type.type,handle:"search",modelValue:e.search,"onUpdate:modelValue":o[1]||(o[1]=i=>e.search=i),clearable:!0},null,8,["label","type","modelValue"])):u("",!0),a(c,{class:"w-full md:w-1/2 lg:w-1/2 2xl:w-full",handle:"outcome",label:"Decision"},{input:p(()=>[a(m,{handle:"outcome",items:[{label:"Allow",value:1},{label:"Block",value:-1}],modelValue:e.outcome,"onUpdate:modelValue":o[2]||(o[2]=i=>e.outcome=i)},null,8,["modelValue"])]),_:1}),t("button",{type:"submit",class:"relative flex items-center bg-white w-20 flex-none rounded-md shadow-sm text-2xs justify-center font-semibold text-gray-900 ring-1 ring-inset ring-gray-900/10 hover:bg-gray-50 focus:z-10 h-9 mt-6",onClick:o[3]||(o[3]=(...i)=>e.submit&&e.submit(...i))},[x(n(e.$t("Search"))+" ",1),a(H,{visible:e.changed},null,8,["visible"])])],32)]),t("div",O,[t("table",U,[t("thead",z,[t("tr",null,[t("th",R,n(e.$t("Data")),1),t("th",M,n(e.$t("Type")),1),t("th",G,n(e.$t("Result")),1),t("th",I,n(e.$t("Submission date")),1)])]),e.entries.length===0?(r(),l("tbody",J,[t("tr",K,[t("td",W,n(e.$t("No Exception found.")),1)])])):(r(),l("tbody",X,[(r(!0),l(b,null,w(e.entries,i=>(r(),d(q,{key:i.uid,entry:i,incognito:e.incognito},null,8,["entry","incognito"]))),128))]))])]),e.entries.length==e.limit?(r(),d(N,{key:0,class:"mt-6 flex items-center justify-end","onPagination:next":e.paginateNext,"onPagination:previous":e.paginatePrevious,page:e.page},null,8,["onPagination:next","onPagination:previous","page"])):u("",!0),a(E,{loading:e.loading},null,8,["loading"])]))}});export{ve as default}; 33//# sourceMappingURL=Browser.cf1abc00.js.map
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.