PageSourceSearch

https://app.improvmx.com/assets/Settings-PoQwKdYP.js

js improvmx.com collected 2026-10-03 21:44:23 UTC 44,727 bytes, 2 lines download raw bytes

1import{a as se,r as i,j as e,h as v,s as W,t as $,p as Ce,E as be}from"./index-CucNpGkM.js";import{h as De}from"./moment-BLMuvzoS.js";import{c as Ie}from"./countries-C3b-vYnn.js";import{e as Te}from"./eu-C-P7qd96.js";import{e as Le}from"./eu_vat_examples-mO1E64Oz.js";import{C as te}from"./Copy-i12CxHFh.js";import{W as A,i as Oe,b as ye,t as Fe,a as fe,c as Ue,d as K,e as Ke,I as $e}from"./IconInfoCircle-5LnUZmU-.js";import{I as Me}from"./IconSearch-C_U_TH4G.js";import{f as X}from"./formatNumberWithCommas-5O01V_Vm.js";function Ye({error:s,options:o}){var x,m,l;const{publicKey:r}=o;if(!r)throw Error("options was missing required publicKey property");if(s.name==="AbortError"){if(o.signal instanceof AbortSignal)return new A({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:s})}else if(s.name==="ConstraintError"){if(((x=r.authenticatorSelection)==null?void 0:x.requireResidentKey)===!0)return new A({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:s});if(o.mediation==="conditional"&&((m=r.authenticatorSelection)==null?void 0:m.userVerification)==="required")return new A({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:s});if(((l=r.authenticatorSelection)==null?void 0:l.userVerification)==="required")return new A({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:s})}else{if(s.name==="InvalidStateError")return new A({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:s});if(s.name==="NotAllowedError")return new A({message:s.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:s});if(s.name==="NotSupportedError")return r.pubKeyCredParams.filter(u=>u.type==="public-key").length===0?new A({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:s}):new A({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:s});if(s.name==="SecurityError"){const c=globalThis.location.hostname;if(Oe(c)){if(r.rp.id!==c)return new A({message:`The RP ID "${r.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:s})}else return new A({message:`${globalThis.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:s})}else if(s.name==="TypeError"){if(r.user.id.byteLength<1||r.user.id.byteLength>64)return new A({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:s})}else if(s.name==="UnknownError")return new A({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:s})}return s}async function qe(s){var N;!s.optionsJSON&&s.challenge&&(console.warn("startRegistration() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information."),s={optionsJSON:s});const{optionsJSON:o,useAutoRegister:r=!1}=s;if(!ye())throw new Error("WebAuthn is not supported in this browser");const x={...o,challenge:fe(o.challenge),user:{...o.user,id:fe(o.user.id)},excludeCredentials:(N=o.excludeCredentials)==null?void 0:N.map(Fe)},m={};r&&(m.mediation="conditional"),m.publicKey=x,m.signal=Ue.createNewAbortSignal();let l;try{l=await navigator.credentials.create(m)}catch(n){throw Ye({error:n,options:m})}if(!l)throw new Error("Registration was not completed");const{id:c,rawId:u,response:p,type:y}=l;let w;typeof p.getTransports=="function"&&(w=p.getTransports());let j;if(typeof p.getPublicKeyAlgorithm=="function")try{j=p.getPublicKeyAlgorithm()}catch(n){Z("getPublicKeyAlgorithm()",n)}let R;if(typeof p.getPublicKey=="function")try{const n=p.getPublicKey();n!==null&&(R=K(n))}catch(n){Z("getPublicKey()",n)}let _;if(typeof p.getAuthenticatorData=="function")try{_=K(p.getAuthenticatorData())}catch(n){Z("getAuthenticatorData()",n)}return{id:c,rawId:K(u),response:{attestationObject:K(p.attestationObject),clientDataJSON:K(p.clientDataJSON),transports:w,publicKeyAlgorithm:j,publicKey:R,authenticatorData:_},type:y,clientExtensionResults:l.getClientExtensionResults(),authenticatorAttachment:Ke(l.authenticatorAttachment)}}function Z(s,o){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${s}. You should report this error to them.
2`,o)}function ze(){const s=se(),[o,r]=i.useState(!1),[x,m]=i.useState(!1),[l,c]=i.useState(null),[u,p]=i.useState(null),[y,w]=i.useState(null),j=()=>v.options.root+"account/totp/qrcode.svg?token="+W.get("sessionId"),R=async()=>{try{const n=await v.get("account/totp/secret?token="+W.get("sessionId"));w(n.body.secret||n.body)}catch(n){console.error("Failed to load 2FA secret:",n),w("Failed to load secret")}};i.useEffect(()=>{x&&!s.is_otp_enabled&&R()},[x]);const _=n=>{if(n.preventDefault(),o)return!1;p(null),r(!0),v.post("account/totp/enable",{token:l}).then(a=>{"token"in a.body&&W.set("sessionId",a.body.token),s.setOtp(!0),m(!1),c(null),r(!1),s.load()},a=>{c(null),r(!1),a.status===400&&"errors"in a.body?p(a.body.errors.token[
20]):p("Unable to validate your code.")})},N=n=>{if(n.preventDefault(),o)return!1;p(null),r(!0),v.post("account/totp/disable",{token:l}).then(a=>{s.setOtp(!1),m(!1),c(null),r(!1),s.load()},a=>{r(!1),c(null),a.status===400&&"errors"in a.body?p(a.body.errors.token[0]):p("Unable to validate your code.")})};return e.jsxs("div",{className:"text-sm",children:[e.jsxs("h2",{className:"flex items-center gap-2",children:["Two-Factor Authentication",e.jsxs("small",{className:`inline-flex items-center gap-[5px] whitespace-nowrap flex-shrink-0 ${s.is_otp_enabled?"text-imx-green":"text-imx-red"}`,children:[e.jsx("span",{className:`w-2 h-2 rounded-full inline-block flex-shrink-0 ${s.is_otp_enabled?"bg-imx-green":"bg-imx-red"}`}),s.is_otp_enabled?"Enabled":"Not enabled"]})]}),s.is_otp_enabled?e.jsxs(e.Fragment,{children:[e.jsx("p",{children:"Two-factor authentication is enabled for your account. You can stop using it at any time by clicking on the following button:"}),x?e.jsx("ol",{className:"onboarding",children:e.jsxs("li",{children:[e.jsx("p",{children:"Enter the authentication code from your app to confirm."}),e.jsxs("form",{className:`form--streamlined${u?" has-errors":""}`,onSubmit:N,children:[e.jsx("label",{children:"Auth code"}),e.jsx("input",{type:"text",className:"legacy",name:"token",value:l||"",onChange:n=>c(n.target.value),autoComplete:"off"}),u&&e.jsx("p",{className:"error !mt-1",children:u}),e.jsx("button",{type:"submit",className:"w-full h-14 mb-5 px-5 py-3 bg-imx-green text-white rounded-md hover:bg-imx-green-darker transition-colors disabled:bg-imx-grey-light-medium disabled:cursor-wait outline-none border-0 cursor-pointer",disabled:o,children:"Confirm and disable"})]})]})}):e.jsx("a",{href:"#",className:"outline-none cursor-pointer rounded-[5px] bg-transparent border border-solid border-imx-red-text text-imx-red-text inline-block uppercase py-[5px] px-[10px] text-[11px] tracking-[1px] font-light transition-all duration-[750ms] ease-[cubic-bezier(0.19,1,0.22,1)] hover:bg-imx-red-text hover:text-imx-white",onClick:n=>{n.preventDefault(),m(!0)},children:"Disable 2FA"})]}):x?e.jsxs("ol",{className:"onboarding",children:[e.jsxs("li",{children:[e.jsxs("p",{children:["First, install a two-factor authentication app. We support anything that uses Time-based One Time Passwords (TOPT).",e.jsx("br",{})]}),e.jsx("strong",{children:"iOS:"})," ",e.jsx("a",{target:"_blank",rel:"noopener",href:"https://apps.apple.com/us/app/google-authenticator/id388497605",children:"Google Authenticator"}),","," ",e.jsx("a",{target:"_blank",rel:"noopener",href:"https://itunes.apple.com/us/app/authy/id494168017?mt=8",children:"Authy"})," ",e.jsx("strong",{children:"Android:"})," ",e.jsx("a",{target:"_blank",rel:"noopener",href:"https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2&hl=en",children:"Google Authenticator"}),","," ",e.jsx("a",{target:"_blank",rel:"noopener",href:"https://play.google.com/store/apps/details?id=com.authy.authy&hl=en",children:"Authy"})," ",e.jsx("strong",{children:"Web:"})," ",e.jsx("a",{target:"_blank",rel:"noopener",href:"https://1password.com/",children:"1Password"}),","," ",e.jsx("a",{target:"_blank",rel:"noopener",href:"https://bitwarden.com/",children:"Bitwarden"}),","," ",e.jsx("a",{target:"_blank",rel:"noopener",href:"https://www.lastpass.com/",children:"LastPass"}),","," ",e.jsx("a",{target:"_blank",rel:"noopener",href:"https://www.dashlane.com/",children:"Dashlane"})]}),e.jsxs("li",{children:[e.jsx("p",{children:"Open the app and scan the QR code below. This adds a 2FA secret for future 2FA code generation."}),e.jsx("p",{className:"qrcode",children:e.jsx("img",{src:j(),alt:"QRCode",className:"bg-imx-white-constant rounded-lg p-[8px]"})}),e.jsxs("p",{children:[e.jsx("span",{children:"Or if you prefer manual entry: "}),y?e.jsx(te,{value:y}):e.jsx("span",{children:"Loading..."})]})]}),e.jsxs("li",{children:[e.jsx("p",{children:"Enter a 2FA code from your app to confirm."}),e.jsxs("form",{className:`form--streamlined${u?" has-errors":""}`,onSubmit:_,children:[e.jsx("label",{children:"2FA code"}),e.jsx("input",{type:"text",className:"legacy",name:"token",value:l||"",onChange:n=>c(n.target.value),autoComplete:"off"}),u&&e.jsx("p",{className:"error !mt-1",children:u}),e.jsx("button",{type:"submit",className:"w-full h-14 mb-5 px-5 py-3 bg-imx-green text-white rounded-md hover:bg-imx-green-darker transition-colors disabled:bg-imx-grey-light-medium disabled:cursor-wait outline-none border-0 cursor-pointer",disabled:o,children:"Enable 2FA"})]})]})]}):e.jsxs(e.Fragment,{children:[e.jsx("p",{children:"Two-factor authentication adds extra security to your account. Once enabled, you'll need a 2FA code in addition to your password to login."}),e.jsx("a",{href:"#",className:"outline-none cursor-pointer rounded-[5px] bg-transparent border border-solid border-imx-grey-light text-imx-grey-medium inline-block uppercase py-[5px] px-[10px] text-[11px] tracking-[1px] font-light transition-all duration-[750ms] ease-[cubic-bezier(0.19,1,0.22,1)] hover:border-imx-blue-light hover:text-imx-blue-light",onClick:n=>{n.preventDefault(),m(!0)},children:"Enable 2FA"})]})]})}function We({account:s}){const[o,r]=i.useState(!1),[x,m]=i.useState({password:null,token:null}),l=c=>{c.preventDefault(),v.delete("account/",{body:x}).then(u=>{se.getState().disconnect(),window.location.href="https://improvmx.com"},u=>{let p="An error occured";try{p=u.body.errors[Object.keys(u.body.errors)[0]][0]}catch{}$.error(p)})};return e.jsxs("div",{className:"mt-[8rem] pt-[2rem] border-0 border-solid border-t border-imx-grey-light pt-7.5",children:[e.jsx("h4",{className:"mb-0 text-red-500",children:"Permanently delete this account"}),o?e.jsxs("div",{className:"account__delete__confirmation",children:[e.jsxs("p",{className:"error !mx-0 !mt-[21px] !mb-[30px]",children:["Are you sure you want to delete your account?"," ",e.jsx("strong",{children:"This action is definitive."})]}),e.jsxs("form",{onSubmit:l,className:"form--streamlined",children:[s.password&&e.jsxs("div",{children:[e.jsx("label",{htmlFor:"delete-password",children:"Re-type your password"}),e.jsx("input",{type:"password",id:"delete-password",value:x.password||"",onChange:c=>m({...x,password:c.target.value}),placeholder:"Please provide your password again"})]}),s.is_otp_enabled&&e.jsxs("div",{children:[e.jsx("label",{htmlFor:"delete-2fa",children:"Your 2FA code"}),e.jsx("input",{type:"text",className:"legacy",id:"delete-2fa",value:x.token||"",onChange:c=>m({...x,token:c.target.value}),placeholder:"Please provide a 2FA code using your authentication app"})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row",children:[e.jsx("input",{type:"submit",className:"outline-none cursor-pointer py-[15p
2x] px-[25px] rounded-[5px] border-0 bg-imx-red-text text-imx-white w-full sm:flex-1 h-[55px] mb-[20px] transition-all duration-[750ms] ease-[cubic-bezier(0.19,1,0.22,1)] hover:bg-imx-red-darker",value:"Yes, delete my account"}),e.jsx("a",{href:"#",onClick:c=>{c.preventDefault(),r(!1)},className:"outline-none cursor-pointer px-[20px] rounded-[5px] bg-transparent border-2 border-solid border-imx-grey-light text-imx-grey-medium w-full sm:flex-1 h-[55px] mb-[20px] inline-flex items-center justify-center sm:ml-[32px] sm:whitespace-nowrap transition-all duration-[750ms] ease-[cubic-bezier(0.19,1,0.22,1)] hover:border-imx-blue-light hover:text-imx-blue-light",children:"No, I don't want to delete my account"})]})]})]}):e.jsxs("div",{children:[e.jsx("p",{className:"mb-[30px]",children:"This account will no longer be available. Your domains, aliases, and logs will be deleted and your email forwarding will turn off instantly."}),e.jsx("a",{href:"#",className:"outline-none cursor-pointer rounded-[5px] bg-transparent border border-solid border-imx-red-text text-imx-red-text inline-block uppercase py-[5px] px-[10px] text-[11px] tracking-[1px] font-light transition-all duration-[750ms] ease-[cubic-bezier(0.19,1,0.22,1)] hover:bg-imx-red-text hover:text-imx-white",onClick:c=>{c.preventDefault(),r(!0)},children:"Delete this account (confirmation required)"})]})]})}function Be(){const[s,o]=i.useState(!1),[r,x]=i.useState([]),[m,l]=i.useState(!0),[c,u]=i.useState(null),[p,y]=i.useState(null),w=async()=>{try{const a=await v.get("account/passkeys");x(a.body.passkeys||[])}catch(a){console.error("Failed to load passkeys:",a),x([])}};i.useEffect(()=>{(async()=>(o(ye()),await w(),l(!1)))()},[]);const j=async()=>{u(null);try{const a=await R(),f=await _(a);f&&await N(f)}catch(a){console.error("Passkey setup failed:",a),u("Passkey setup failed. Please try again. If this issue persists, please contact support.")}},R=async()=>{const a=await v.get("auth/passkeys/options");return JSON.parse(a.body.registration_options)},_=async a=>{try{return await qe({optionsJSON:a})}catch(f){return u("Passkey creation failed. Please try again. If this issue persists, please contact support."),console.error("Passkey creation failed:",f),null}},N=async a=>{var f;try{(await v.post("auth/passkeys",{credential:a})).body.success&&(u(null),y("Passkey added successfully"),w(),setTimeout(()=>{y(null)},1e4))}catch(g){console.error("Failed to register passkey:",g);const I=(f=g==null?void 0:g.body)==null?void 0:f.error;u(I||"Failed to register passkey. Please try again. If this issue persists, please contact support.")}},n=async a=>{try{(await v.delete(`account/passkeys/${a}`)).body.success&&($.success("Passkey deleted successfully"),x(g=>g.filter(I=>I.id!==a)))}catch(f){console.error("Failed to delete passkey:",f),$.error("Failed to delete passkey. Please try again.")}};return e.jsxs("div",{className:"text-sm",children:[e.jsxs("h2",{className:"flex items-center gap-2",children:["Passkey Authentication",m?null:e.jsxs("small",{className:`inline-flex items-center gap-[5px] whitespace-nowrap flex-shrink-0 ${r.length>0?"text-imx-green":"text-imx-red"}`,children:[e.jsx("span",{className:`w-2 h-2 rounded-full inline-block flex-shrink-0 ${r.length>0?"bg-imx-green":"bg-imx-red"}`}),r.length>0?"Enabled":"Not enabled"]})]}),m?e.jsx("p",{children:"Loading…"}):r.length>0?e.jsxs(e.Fragment,{children:[e.jsx("p",{children:"Review your passkeys below:"}),e.jsxs("table",{className:"table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{className:"w-1/3",children:"Name"}),e.jsx("th",{className:"w-1/3",children:"Created At"}),e.jsx("th",{className:"w-1/3",children:"Last Used"}),e.jsx("th",{className:"w-8"})]})}),e.jsx("tbody",{children:r.map(a=>e.jsxs("tr",{children:[e.jsxs("td",{children:[a.provider_name," ",a.provider_name==="Unknown Provider"&&e.jsxs("span",{className:"relative group",children:[e.jsx($e,{width:"16",height:"16",className:"cursor-pointer text-imx-grey-medium"}),e.jsx("span",{className:"absolute left-1/2 -translate-x-1/2 mt-2 px-2 py-1 text-xs text-imx-grey-light bg-imx-grey-dark rounded opacity-0 group-hover:opacity-100 transition pointer-events-none w-[280px] whitespace-normal text-left",children:"This passkey provider did not share its name. It will still work normally."})]})]}),e.jsx("td",{children:a.created_at}),e.jsx("td",{children:a.last_used||"Not used"}),e.jsx("td",{children:e.jsx("a",{href:"#",className:"text-[13px] align-middle text-imx-white bg-imx-grey-light w-5 h-5 rounded-full text-center leading-5 inline-block hover:bg-imx-red hover:text-imx-white transition-colors duration-200",onClick:f=>{f.preventDefault(),n(a.id)},children:"X"})})]},a.id))})]})]}):e.jsxs("p",{children:["Passkeys allow passwordless login using public/private key pairs. Instead of entering a password, use your device's built-in authentication like Face ID or PIN to log in."," ",e.jsx("a",{href:"https://www.passkeys.com/what-are-passkeys",className:"underline",children:"Learn more"})]}),!m&&s?e.jsxs(e.Fragment,{children:[e.jsx("button",{className:"text-imx-grey-medium hover:text-imx-blue-light text-xs uppercase cursor-pointer font-light rounded-md pl-4 pr-4 pt-2 pb-2 mt-2 border border-solid border-imx-grey-light hover:border-imx-blue-light bg-transparent transition-colors",onClick:j,children:"Register New Passkey"}),c&&e.jsx("p",{className:"bg-imx-red-light text-imx-red text-[14px] p-[10px_20px] mt-[10px] mb-[10px] rounded-[5px] w-full",children:c}),p&&e.jsx("p",{className:"bg-imx-green-neon-lightest text-imx-green-neon-hover text-[14px] p-[10px_20px] mt-[10px] mb-[10px] rounded-[5px] w-full",children:p})]}):m?null:e.jsx(e.Fragment,{children:"Your browser does not support passkeys. Please use a different browser."})]})}function ee({isVisible:s,onToggle:o,...r}){return e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5 absolute right-3 top-[33%] -translate-y-1/2 cursor-pointer hover:text-blue-500 transition-colors",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",onClick:o,title:s?"Hide password":"Show password",...r,children:[e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"}),s&&e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M3 3l18 18",className:"stroke-current"})]})}function Ve(s){const o=s.kind,r=s.action;if(r=="create"||r=="update"||r=="delete"||r=="disable"||r=="swap"){const x=r.charAt(0).toUpperCase()+r.slice(1),m=o.charAt(0).toUpperCase()+o.slice(1);s.displayAction=x+" "+m}else r=="delete-all"?s.displayAction="Delete All Rules":r=="clear_logs"?s.displayAction="Clear Logs":o=="account"&&(r=="login_token"||r=="login")?s.displayAction="Log In":r=="update_routing_engine"?s.displayAction="Update Routing":s.displayAction=r+" "+o;return s}function He(s){if(!s)return s;const o=navigator.language||navigator.userLanguage||"en-US",r=new Date(s).toLocaleTimeString(o,{timeZoneName:"short"}).split(" ").pop();return`${De(s).format("YYYY-MM-DD HH:mm:ss")} ${r}`}function at(){const s=se(),o=Ce(s),[r]=i.useState(()=>{const t=Date.now();return{now:t,weekAgo:t-10080*60*1e3,monthAgo:t-720*60*60*1e3,threeMonthsAgo:t-2160*60*60*1e3,yearAgo:t-365
2*24*60*60*1e3}}),[x,m]=i.useState("settings"),[l,c]=i.useState({email:null,company_name:null,company_vat:null,timezone:null,country:null,inEU:!1,billing_email:null}),[u,p]=i.useState(0),[y,w]=i.useState("7"),[j,R]=i.useState(!1),[_,N]=i.useState("Save changes"),[n,a]=i.useState(!1),[f,g]=i.useState(!1),[I,re]=i.useState(!1),[P,B]=i.useState({email:null,company_name:null,company_vat:null,country:null,billing_email:null}),[k,M]=i.useState({current:null,password:null,confirm:null}),[T,ae]=i.useState({current:null,password:null,confirm:null}),[ne,ie]=i.useState([]),[b,V]=i.useState({currentPage:1,totalPages:1,totalLogs:0}),[L,we]=i.useState(null),oe=i.useRef(null),H=i.useRef(null),[le,ve]=i.useState(r.weekAgo),[S,G]=i.useState({current:!1,password:!1,confirm:!1}),[ce,J]=i.useState(null),[je,de]=i.useState(!1),ue=j?k.current&&k.password&&k.confirm:k.password&&k.confirm,me=t=>Te.includes(t.country)?{...t,inEU:!0}:{...t,inEU:!1,company_vat:null},Ne=t=>{const d={email:t.email,company_name:t.company_name,country:t.country};"company_vat"in t&&(d.company_vat=t.company_vat),"billing_email"in t&&(d.billing_email=t.billing_email),"privacy_level"in t&&p(t.privacy_level),"email_log_retention_days"in t&&w(t.email_log_retention_days),"password"in t&&R(t.password),c(me(d))},Y=t=>{m(t),N("Save changes"),g(!1),Re(t)},C=t=>x===t,pe=()=>{B({email:null,company_name:null,company_vat:null,country:null}),ae({current:null,password:null,confirm:null})},ke=t=>{if(t.preventDefault(),n)return!1;pe(),a(!0),g(!1),s.update(l).then(d=>{a(!1),N("Saved!"),setTimeout(()=>{N("Save changes")},2500),d.body.pendingEmail&&$.success("We just sent you an email to validate your email. Please click on the provided link to update your email.")},d=>{a(!1),B(d.body.errors)})},Se=t=>{if(t.preventDefault(),n)return!1;a(!0),g(!1),v.put("account/privacy",{privacy_level:u,email_log_retention_days:y}).then(d=>{s.setState({privacy_level:Number(u)}),xe()},d=>{a(!1),d.body&&d.body.error&&$.error(d.body.error)})},Ae=()=>{n||(a(!0),J(null),v.post("auth/password-reset",{domain:s.email}).then(()=>{a(!1),de(!1),J("We've sent a password reset link to your email. Please check your inbox.")},()=>{a(!1),de(!0),J("An error occurred. Please try again.")}))},_e=t=>{if(t.preventDefault(),n)return!1;pe(),a(!0),v.put("account/password",k).then(d=>{M({current:null,password:null,confirm:null}),xe(),"token"in d.body&&W.set("sessionId",d.body.token),s.load()},d=>{a(!1),ae(d.body.errors)}),s.update(l).catch(d=>{a(!1),B(d.body.errors)})},O=async(t,d,h=1,D=null)=>{h===1&&V(Q=>({...Q,currentPage:1})),re(!0),ie([]);const E=await v.get("account/logs",{params:{start:t,end:d,page:h,query:D}});re(!1);const{logs:z,pagination:F}=E.body;V({totalLogs:F.count,totalPages:F.total_pages,currentPage:F.page});const U=z.map(Q=>Ve(Q));ie(Pe(U))},xe=()=>{a(!1),N("Saved!"),setTimeout(()=>{N("Save changes")},2500)},Pe=t=>{if(window.location.host==="app.improvmx.com"||be.getEnv()!=be.DEV||t&&t.some(U=>U.id&&String(U.id).startsWith("fake-")))return t;const h=Date.now(),D=36e5,E=864e5,z=[{id:"fake-log-001",kind:"alias",action:"create",value:"[email protected] → [email protected]",executed:new Date(h-1*D).toISOString(),ip:"203.0.113.42",displayAction:"Create Alias"},{id:"fake-log-002",kind:"domain",action:"create",value:"fake-domain.com",executed:new Date(h-3*D).toISOString(),ip:"203.0.113.42",displayAction:"Create Domain"},{id:"fake-log-003",kind:"alias",action:"update",value:"[email protected] → [email protected]",executed:new Date(h-5*D).toISOString(),ip:"198.51.100.7",displayAction:"Update Alias"},{id:"fake-log-004",kind:"account",action:"login",value:"[email protected]",executed:new Date(h-1*E).toISOString(),ip:"203.0.113.42",displayAction:"Log In"},{id:"fake-log-005",kind:"alias",action:"delete",value:"[email protected] → [email protected]",executed:new Date(h-1*E-2*D).toISOString(),ip:"198.51.100.7",displayAction:"Delete Alias"},{id:"fake-log-006",kind:"domain",action:"update",value:"fake-domain.com",executed:new Date(h-2*E).toISOString(),ip:"203.0.113.42",displayAction:"Update Domain"},{id:"fake-log-007",kind:"account",action:"login_token",value:"[email protected]",executed:new Date(h-3*E).toISOString(),ip:"192.0.2.15",displayAction:"Log In"},{id:"fake-log-008",kind:"smtp",action:"create",value:"[email protected]",executed:new Date(h-4*E).toISOString(),ip:"198.51.100.7",displayAction:"Create Smtp"},{id:"fake-log-009",kind:"domain",action:"delete",value:"fake-old-domain.com",executed:new Date(h-5*E).toISOString(),ip:"203.0.113.42",displayAction:"Delete Domain"},{id:"fake-log-010",kind:"alias",action:"create",value:"[email protected] → [email protected]",executed:new Date(h-5*E-6*D).toISOString(),ip:"192.0.2.15",displayAction:"Create Alias"},{id:"fake-log-011",kind:"account",action:"login",value:"[email protected]",executed:new Date(h-6*E).toISOString(),ip:"203.0.113.42",displayAction:"Log In"}],F=t&&t.length>0?[...z,...t]:z;return V(U=>({...U,totalLogs:F.length,totalPages:1})),F},q=async t=>{if(t<1||t>b.totalPages)return;const d=document.getElementById("period"),h=d?d.value:r.weekAgo;await O(h,r.now,t,L)},Ee=t=>{H.current&&clearTimeout(H.current),H.current=setTimeout(()=>{const d=t.target.closest("form").querySelector("#period").value;O(d,r.now,1,oe.current)},500)},Re=t=>{if(t==="settings")window.location.hash&&history.replaceState(null,null,window.location.pathname+window.location.search);else{const h={password:"security",logs:"logs",privacy:"privacy"}[t];h&&window.location.hash!==`#${h}`&&(window.location.hash=h)}},he=()=>{const t=window.location.hash.substring(1);if(!t){m("settings");return}const h={security:"password",privacy:"privacy",logs:"logs"}[t];m(h||"settings")},ge=()=>{he()};return i.useEffect(()=>{Ne(s)},[s]),i.useEffect(()=>{O(r.weekAgo,r.now,1,L)},[]),i.useEffect(()=>(he(),window.addEventListener("hashchange",ge),()=>{window.removeEventListener("hashchange",ge)}),[]),e.jsxs("div",{className:"wrapper wrapper--shift wrapper--padded fade-in !px-6 sm:!px-5 min-[1150px]:!pl-[350px] min-[1150px]:!pr-5",children:[e.jsx("h1",{className:"text-imx-black",children:"Account Settings"}),e.jsx("div",{className:"domain__tabs",children:e.jsxs("ul",{children:[e.jsx("li",{children:e.jsx("a",{href:"#",className:C("settings")?"active":"",onClick:t=>{t.preventDefault(),Y("settings")},children:"Settings"})}),e.jsx("li",{children:e.jsx("a",{href:"#",className:C("password")?"active":"",onClick:t=>{t.preventDefault(),Y("password")},children:"Security"})}),e.jsx("li",{children:e.jsx("a",{href:"#",className:C("privacy")?"active":"",onClick:t=>{t.preventDefault(),Y("privacy")},children:"Privacy"})}),e.jsx("li",{children:e.jsx("a",{href:"#",className:C("logs")?"active":"",onClick:t=>{t.preventDefault(),Y("logs")},children:"Access Logs"})})]})}),C("settings")?e.jsxs("div",{children:[e.jsxs("form",{className:"form--streamlined",onSubmit:ke,children:[e.jsx("label",{children:"Your email"}),e.jsx("input",{type:"email",className:"legacy",placeholder:"Your email",value:l.email||"",required:!0,onChange:t=>{c({...l,email:t.target.value}),g(!0)}}),P.email&&e.jsx("p",{className:"error",children:P.email[0]}),e.jsx("label",{children:"Your name"}),e.jsx("input",{type:"text",className:"legacy",placeholder:"Your name",value:l.company_name||"",onChange:t=>{c({...l,company_name:t.target.value}),g(!0)}}),P.company_name&&e.jsx("p",{className:"error",children:P.company_name[0]}),(l.inEU||l.company_vat)&&e.jsxs(e.Fragment,{children:[e.jsx("label",{children:"VAT Number"}),e.jsx("input",{type:"text",className:"legacy",placeholder:`VAT Number, e.g. ${Le[l.country]||"EU123456789"}`,value:l.company_vat||"",onChange:t=>{c({...l,company_vat:t.target.value}),g(!0)}}),P.company_vat&&e.jsx("p",{className:"error",children:P.company_vat[0]})]}),e.jsx("label",{children:"Country"}),e.jsx("div",{className:"relative after:content-['▾'] after:block after:absolute after:right-[15px] after:top-[12px]",children:e.jsxs("select",{value:l.country||"",onChange:t=>{c(me({...l,country:t.target.value})),g(!0)},children:[e.jsx("option",{disabled:!0,value:"",children:"Select your country"}),e.jsxs("optgroup",{label:"Most popular",children:[e.jsx("option",{value:"US",children:"United States"}),e.jsx("option",{value:"CA",children:"Canada"}),e.jsx("option",{value:"GB",children:"United Kingdom"}),e.jsx("option",{value:"FR",children:"France"}),e.jsx("option",{value:"DE",children:"Germany"}),e.jsx("option",{value:"IN",children:"India"})]}),e.jsx("optgroup",{label:"All countries",children:Ie.map(t=>e.jsx("option",{value:t.code,children:t.value},t.code))})]})}),P.country&&e.jsx("p",{className:"error",children:P.country[0]}),e.jsx("label",{children:"Billing email (we send bills to your account email otherwise)"}),e.jsx("input",{type:"email",className:"legacy",placeholder:"Your email",value:l.billing_email||"",onChange:t=>{c({...l,billing_email:t.target.value}),g(!0)}}),P.billing_email&&e.jsx("p",{className:"error",children:P.billing_email[0]}),e.jsx("input",{type:"submit",value:_,className:`outline-none py-2.5 px-5 rounded border-none bg-imx-green-neon text-imx-white transition-all duration-700 ease-[
2cubic-bezier(0.19,1,0.22,1)] hover:bg-imx-green-neon-hover hover:text-imx-white h-[55px] mb-5 w-full ${n||!f?"cursor-default !bg-imx-grey-light":"cursor-pointer"}`,disabled:n||!f})]}),e.jsx(We,{account:s})]}):C("password")?e.jsxs("div",{className:"flex flex-row gap-[60px] mt-6",children:[e.jsxs("div",{className:"w-1/2",children:[e.jsxs("h2",{className:"flex items-center gap-2",children:["Password",e.jsxs("small",{className:`inline-flex items-center gap-[5px] whitespace-nowrap flex-shrink-0 ${j?"text-imx-green":"text-imx-red"}`,children:[e.jsx("span",{className:`w-2 h-2 rounded-full inline-block flex-shrink-0 ${j?"bg-imx-green":"bg-imx-red"}`}),j?"Enabled":"Not enabled"]})]}),e.jsxs("form",{className:"form--streamlined",onSubmit:_e,children:[j&&e.jsxs(e.Fragment,{children:[e.jsx("label",{children:"Current password"}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:S.current?"text":"password",className:"w-full h-[50px] rounded-[5px] border border-solid border-imx-light-grey px-[15px] py-0 outline-none text-imx-black transition-none focus:border-imx-blue-light hover:border-imx-grey-medium bg-imx-white appearance-none font-normal text-base leading-normal !mb-0",placeholder:"Current password",value:k.current||"",onChange:t=>M({...k,current:t.target.value})}),e.jsx(ee,{isVisible:S.current,onToggle:()=>G({...S,current:!S.current})})]}),T.current&&e.jsx("p",{className:"error !mt-[10px]",children:T.current[0]}),e.jsx("a",{href:"#",onClick:t=>{t.preventDefault(),Ae()},className:"text-imx-blue-light hover:text-imx-blue-light-hover text-sm mt-[6px] inline-block",children:"Forgot your password?"}),ce?e.jsx("p",{className:`text-sm p-[10px_20px] mt-[6px] mb-[35px] rounded-[5px] w-full ${je?"bg-imx-red-light text-imx-red":"bg-imx-green-neon-lightest text-imx-green"}`,children:ce}):e.jsx("div",{className:"mb-[35px]"})]}),e.jsx("label",{children:"New password"}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:S.password?"text":"password",className:"w-full h-[50px] rounded-[5px] border border-solid border-imx-light-grey px-[15px] py-0 outline-none text-imx-black transition-none focus:border-imx-blue-light hover:border-imx-grey-medium bg-imx-white appearance-none font-normal text-base leading-normal",placeholder:"New password",value:k.password||"",required:!0,onChange:t=>M({...k,password:t.target.value})}),e.jsx(ee,{isVisible:S.password,onToggle:()=>G({...S,password:!S.password})})]}),T.password&&e.jsx("p",{className:"error",children:T.password[0]}),e.jsx("label",{children:"Password confirmation"}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:S.confirm?"text":"password",className:"w-full h-[50px] rounded-[5px] border border-solid border-imx-light-grey px-[15px] py-0 outline-none text-imx-black transition-none focus:border-imx-blue-light hover:border-imx-grey-medium bg-imx-white appearance-none font-normal text-base leading-normal",placeholder:"Confirm new password",value:k.confirm||"",required:!0,onChange:t=>M({...k,confirm:t.target.value})}),e.jsx(ee,{isVisible:S.confirm,onToggle:()=>G({...S,confirm:!S.confirm})})]}),T.confirm&&e.jsx("p",{className:"error",children:T.confirm[0]}),e.jsx("input",{type:"submit",value:_,className:`outline-none py-2.5 px-5 rounded border-none bg-imx-green text-imx-white transition-all duration-700 ease-[cubic-bezier(0.19,1,0.22,1)] hover:bg-imx-green-darker hover:text-imx-white h-[55px] mb-5 w-full ${n||!ue?"cursor-default !bg-imx-grey-light":"cursor-pointer"}`,disabled:n||!ue})]})]}),e.jsxs("div",{className:"w-1/2",children:[e.jsx(ze,{}),e.jsx(Be,{})]})]}):C("privacy")?e.jsxs("div",{className:"text-sm",children:[e.jsxs("p",{children:["Choose how much data to retain about your emails for your own"," ",e.jsx("a",{href:"https://improvmx.com/guides/email-logs",className:"underline",children:"email logs"})," ","and support troubleshooting."]}),e.jsxs("p",{children:["We automatically delete all email data after the configured log retention period. We will ",e.jsx("strong",{children:"never"})," read, share, or sell your data with anyone. See"," ",e.jsx("a",{href:"https://improvmx.com/transparency/our-pledge-to-you",className:"underline",children:"our pledge"}),"."]}),e.jsxs("div",{className:"flex gap-12 mb-0",children:[e.jsx("div",{className:"flex-1",children:e.jsx("h2",{children:"Log Detail Level"})}),e.jsx("div",{className:"flex-1",children:e.jsx("h2",{children:"Log Retention Period"})})]}),e.jsxs("form",{onSubmit:Se,children:[e.jsxs("div",{className:"flex gap-12",children:[e.jsxs("div",{className:"flex-1",children:[e.jsxs("label",{className:"relative mb-6 flex items-start cursor-pointer pt-[5px] pr-5",children:[e.jsx("input",{type:"radio",name:"privacy_level",value:"
20",checked:u==0,onChange:t=>{p(t.target.value),g(!0)},className:"absolute left-0 top-[20px]"}),e.jsx("div",{className:"pl-6",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("h4",{className:`${u==0?"text-imx-black ":""}mb-0 mt-0`,children:["Minimum",e.jsx("span",{className:"font-normal text-imx-grey-medium text-sm block",children:"Save basic email metadata"})]}),e.jsxs("div",{className:"relative group",children:[e.jsx("div",{className:"w-4 h-4 mt-6 bg-imx-grey-light rounded-full flex items-center justify-center text-xs text-imx-grey",children:"?"}),e.jsx("div",{className:"absolute bottom-1/2 left-1/2 transform -translate-x-1/2 mb-2 px-4 py-2 bg-imx-white text-imx-black text-sm rounded-lg opacity-0 group-hover:opacity-100 transition-all duration-300 ease-out pointer-events-none whitespace-nowrap z-10 max-w-sm shadow-lg",children:e.jsxs("ul",{className:"text-left space-y-1",children:[e.jsx("li",{className:"font-semibold",children:"Basic metadata:"}),e.jsx("li",{children:"Client Reverse IP"}),e.jsx("li",{children:"Hostname"}),e.jsx("li",{children:"Return Path Email"}),e.jsx("li",{children:"Timestamps"}),e.jsx("li",{children:"Email Size"}),e.jsx("li",{children:"Server Name"}),e.jsx("li",{children:"Delivery Status"}),e.jsx("li",{children:"Attempts & Retries"})]})})]})]})})]}),e.jsxs("label",{className:"relative mb-6 flex items-start cursor-pointer pt-[5px] pr-5",children:[e.jsx("input",{type:"radio",name:"privacy_level",value:"1",checked:u==1,onChange:t=>{p(t.target.value),g(!0)},className:"absolute left-0 top-[20px]"}),e.jsx("div",{className:"pl-6",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("h4",{className:`${u==1?"text-imx-black ":""}mb-0 mt-0`,children:["Standard",e.jsx("span",{className:"font-normal text-imx-grey-medium text-sm block",children:"Save detailed email metadata"})]}),e.jsxs("span",{className:"relative group",children:[e.jsx("div",{className:"w-4 h-4 mt-6 bg-imx-grey-light rounded-full flex items-center justify-center text-xs text-imx-grey",children:"?"}),e.jsx("div",{className:"absolute bottom-1/2 left-1/2 transform -translate-x-1/2 mb-2 px-4 py-2 bg-imx-white text-imx-black text-sm rounded-lg opacity-0 group-hover:opacity-100 transition-all duration-300 ease-out pointer-events-none whitespace-nowrap z-10 max-w-sm shadow-lg",children:e.jsxs("ul",{className:"text-left space-y-1",children:[e.jsx("li",{className:"font-semibold",children:"Also includes:"}),e.jsx("li",{children:"Subject"}),e.jsx("li",{children:"Message ID"}),e.jsx("li",{children:"From"}),e.jsx("li",{children:"Recipient"}),e.jsx("li",{children:"Forwarded to"})]})})]})]})})]}),e.jsxs("label",{className:"relative mb-6 flex items-start cursor-pointer pt-[5px] pr-5",children:[e.jsx("input",{type:"radio",name:"privacy_level",value:"2",checked:u==2,onChange:t=>{p(t.target.value),g(!0)},className:"absolute left-0 top-[20px]"}),e.jsx("div",{className:"pl-6",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("h4",{className:`${u==2?"text-imx-black ":""}mb-0 mt-0`,children:["Full",e.jsx("span",{className:"font-normal text-imx-grey-medium text-sm block",children:"Save undelivered email content"})]}),e.jsxs("div",{className:"relative group",children:[e.jsx("div",{className:"w-4 h-4 mt-6 bg-imx-grey-light rounded-full flex items-center justify-center text-xs text-imx-grey",children:"?"}),e.jsx("div",{className:"absolute bottom-1/2 left-1/2 transform -translate-x-1/2 mb-2 px-4 py-2 bg-imx-white text-imx-black text-sm rounded-lg opacity-0 group-hover:opacity-100 transition-all duration-300 ease-out pointer-events-none whitespace-nowrap z-10 max-w-sm shadow-lg",children:e.jsxs("ul",{className:"text-left space-y-1",children:[e.jsx("li",{className:"font-semibold",children:"Saves full email contents in cases of:"}),e.jsx("li",{children:"Temporary failure (e.g. DNS failure)"}),e.jsx("li",{children:"SpamAssassin mail blocking"})]})})]})]})})]})]}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("label",{className:"relative mb-6 flex items-start cursor-pointer pt-[5px] pr-5",children:[e.jsx("input",{type:"radio",name:"retention_period",value:"7",checked:y==7,onChange:t=>{w(t.target.value),g(!0)},className:"absolute left-0 top-[12px]"}),e.jsx("div",{className:"pl-6",children:e.jsx("h4",{className:`${y==7?"text-imx-black ":""}mb-0 mt-0`,children:"7 days"})})]}),e.jsxs("label",{className:`relative mb-6 flex items-start pt-[5px] pr-5 ${o?"cursor-pointer":"opacity-50 cursor-not-allowed"}`,children:[e.jsx("input",{type:"radio",name:"retention_period",value:"30",checked:y==30,onChange:t=>{w(t.target.value),g(!0)},disabled:!o,className:"absolute left-0 top-[12px]"}),e.jsx("div",{className:"pl-6",children:e.jsx("h4",{className:`${y==30?"text-imx-black ":""}mb-0 mt-0`,children:"30 days"})})]}),e.jsxs("label",{className:`relative mb-6 flex items-start pt-[5px] pr-5 ${o?"cursor-pointer":"opacity-50 cursor-not-allowed"}`,children:[e.jsx("input",{type:"radio",name:"retention_period",value:"180",checked:y==180,onChange:t=>{w(t.target.value),g(!0)},disabled:!o,className:"absolute left-0 top-[12px]"}),e.jsx("div",{className:"pl-6",children:e.jsx("h4",{className:`${y==180?"text-imx-black ":""}mb-0 mt-0`,children:"180 days"})})]}),!o&&e.jsx("div",{className:"mb-6 p-4 bg-imx-orange-lighter rounded-lg w-fit",children:e.jsxs("span",{className:"text-imx-orange font-medium",children:[e.jsx("a",{href:"/account/payment",className:"underline text-imx-orange hover:text-imx-orange-dark",children:"Upgrade"})," ","for longer retention"]})})]})]}),e.jsx("input",{type:"submit",value:_,className:`outline-none py-2.5 px-5 rounded border-none bg-imx-green text-imx-white transition-all duration-700 ease-[
2cubic-bezier(0.19,1,0.22,1)] hover:bg-imx-green-darker hover:text-imx-white h-[55px] mb-5 w-full mt-10 ${n||!f?"cursor-default !bg-imx-grey-light":"cursor-pointer"}`,disabled:n||!f})]})]}):C("logs")?e.jsxs("div",{className:"text-sm",children:[e.jsx("p",{children:"See historical access logs for your account."}),e.jsx("div",{className:"wrapper__pagehead",children:e.jsxs("form",{onSubmit:t=>{t.preventDefault();const d=t.target.querySelector("#period").value;O(d,r.now,1,L)},className:"relative",children:[e.jsx(Me,{className:"absolute top-[17px] left-[17px] w-[1em] h-[1em] text-imx-grey-medium"}),e.jsx("input",{type:"text",className:"w-[calc(100%-200px)] mb-[2rem] text-imx-black h-[50px] rounded-md border border-solid border-imx-grey-light hover:border-imx-grey-medium focus:border-imx-blue-light px-4 pl-10 outline-none text-sm bg-imx-white focus:bg-imx-white transition-all duration-700 ease-[cubic-bezier(0.19,1,0.22,1)]",name:"q",placeholder:"Search over your logs",autoComplete:"off",value:L||"",onChange:t=>{we(t.target.value),oe.current=t.target.value,Ee(t)},onBlur:t=>{O(le,r.now,1,L)}}),e.jsx("div",{className:"relative w-[190px] ml-2.5 text-sm inline-block after:content-['▾'] after:block after:absolute after:right-[15px] after:top-3 rounded-md outline-none",children:e.jsxs("select",{className:"w-full bg-transparent border border-imx-grey-light border-solid hover:border-imx-grey-medium",name:"period",id:"period",value:le,onChange:t=>{ve(t.target.value),O(t.target.value,r.now,1,L)},children:[e.jsx("option",{value:r.weekAgo,children:"Last 7 days"}),e.jsx("option",{value:r.monthAgo,children:"Last month"}),e.jsx("option",{value:r.threeMonthsAgo,children:"Last 3 months"}),e.jsx("option",{value:r.yearAgo,children:"Last year"})]})})]})}),e.jsxs("table",{className:"table-fixed border-imx-grey-light w-full bg-transparent border-separate border-spacing-0",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"tracking-widest",children:[e.jsx("th",{className:"w-[20%] py-4 pl-6 border border-solid border-r-0 border-b-0 border-imx-grey-light rounded-tl-md bg-imx-white",children:"Action"}),e.jsx("th",{className:"w-[40%] py-4 pl-4 border border-solid border-l-0 border-r-0 border-b-0 border-imx-grey-light bg-imx-white",children:"Target"}),e.jsx("th",{className:"w-[24%] py-4 border border-solid border-l-0 border-r-0 border-b-0 border-imx-grey-light bg-imx-white",children:"Timestamp"}),e.jsx("th",{className:"w-[16%] py-4 border border-solid border-l-0 border-b-0 border-imx-grey-light rounded-tr-md bg-imx-white",children:"IP"})]})}),e.jsxs("tbody",{children:[(I||!ne.length)&&e.jsx("tr",{children:e.jsx("td",{colSpan:"4",className:"py-12 text-center text-lg text-imx-grey-dark border border-solid border-b-0 border-imx-grey-light bg-imx-white",children:I?"Loading…":"No entries"})}),ne.map(t=>e.jsxs("tr",{className:"text-sm odd:bg-imx-white even:bg-imx-grey-lightest",children:[e.jsx("td",{className:"py-4 pl-6 border border-solid border-r-0 border-b-0 border-imx-grey-light",children:t.displayAction}),e.jsx("td",{className:"py-4 pl-4 border border-solid border-r-0 border-b-0 border-l-0 border-imx-grey-light break-all",children:t.value}),e.jsx("td",{className:"border border-solid border-r-0 border-l-0 border-b-0 border-imx-grey-light py-4",children:e.jsx(te,{value:He(t.executed),labelPosition:"above"})}),e.jsx("td",{className:"py-4 border border-solid border-l-0 border-b-0 border-imx-grey-light",children:e.jsx(te,{className:"block w-full",textClass:"block truncate",value:t.ip,labelPosition:"above"})})]},t.id))]})]}),e.jsx("div",{className:"flex items-center justify-between px-4 py-3 bg-imx-white sm:px-6 border border-solid rounded-b-md border-imx-grey-light",children:e.jsxs("div",{className:"flex justify-between items-center w-full",children:[e.jsxs("div",{className:"flex space-x-2",children:[e.jsx("a",{onClick:()=>q(1),disabled:b.currentPage===1,className:`relative inline-flex items-center py-2 text-sm font-normal rounded-md bg-imx-white select-none ${b.currentPage===1?"pointer-events-none text-imx-grey-light-medium":"cursor-pointer"}`,children:"First"}),e.jsx("a",{onClick:()=>q(b.currentPage-1),disabled:b.currentPage===1,className:`relative inline-flex items-center px-4 py-2 text-sm font-normal rounded-md bg-imx-white select-none ${b.currentPage===1?"pointer-events-none text-imx-grey-light-medium":"cursor-pointer"}`,children:"Previous"})]}),e.jsxs("div",{className:"text-sm imx-grey",children:["Showing page"," ",X(b.currentPage)," of"," ",X(b.totalPages)," ",e.jsx("span",{className:"mx-1",children:"·"})," ",X(b.totalLogs)," total logs"]}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx("a",{onClick:()=>q(b.currentPage+1),inactive:b.currentPage>=b.totalPages?"true":void 0,className:`relative inline-flex items-center px-4 py-2 text-sm font-normal rounded-md bg-imx-white select-none ${b.currentPage>=b.totalPages?"pointer-events-none text-imx-grey-light-medium":"cursor-pointer"}`,children:"Next"}),e.jsx("a",{onClick:()=>q(b.totalPages),inactive:b.currentPage>=b.totalPages?"true":void 0,className:`relative inline-flex items-center px-4 py-2 text-sm font-normal rounded-md bg-imx-white select-none ${b.currentPage>=b.totalPages?"pointer-events-none text-imx-grey-light-medium":"cursor-pointer"}`,children:"Last"})]})]})})]}):null]})}export{at as default};

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.