PageSourceSearch

https://www.debugbear.com/cdn/chunk-admin.59abea838d1aba26a99f.js

js debugbear.com collected 2026-10-01 09:04:20 UTC 245,052 bytes, 1 lines download raw bytes

1"use strict";(("undefined"==typeof window?self:window).webpackChunkdebugbear_gae=("undefined"==typeof window?self:window).webpackChunkdebugbear_gae||[]).push([[9884],{82249(e,t,r){r.d(t,{A:()=>x}),r(62953);var n=r(96540),a=r(85072),i=r.n(a),o=r(97825),l=r.n(o),s=r(77659),d=r.n(s),c=r(55056),u=r.n(c),h=r(10540),m=r.n(h),p=r(41113),g=r.n(p),b=r(15642),f={};f.styleTagTransform=g(),f.setAttributes=u(),f.insert=d().bind(null,"head"),f.domAPI=l(),f.insertStyleElement=m(),i()(b.A,f),b.A&&b.A.locals&&b.A.locals;var v=r(74848);function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function x(e){let t=e.items,r=e.keys,a=e.extraColumns,i=e.renderDetail,o=e.maxItemsToShow;const l=t.length,s=(u=n.useState(!1),h=2,function(e){if(Array.isArray(e))return e}(u)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,o,l=[],s=!0,d=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){d=!0,a=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw a}}return l}}(u,h)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?y(e,t):void 0}}(u,h)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),d=s[0],c=s[1];var u,h;return o&&!d&&(t=t.slice(0,o)),(0,v.jsxs)(v.Fragment,{children:[l>t.length&&(0,v.jsxs)("div",{children:["Showing ",t.length," out of ",l," items."," ",(0,v.jsx)("button",{onClick:()=>c(!0),children:"Show all (may be slow)"})]}),(0,v.jsxs)("table",{className:"quicktable",children:[(0,v.jsx)("thead",{children:(0,v.jsxs)("tr",{children:[r.map((e,t)=>(0,v.jsx)("td",{style:{border:"1px solid #999"},children:(0,v.jsx)("b",{children:"string"==typeof e?e:e.id})},"k"+t)),a&&a.map((e,t)=>(0,v.jsx)("th",{children:e.title},t))]})}),(0,v.jsx)("tbody",{children:t.map((e,t)=>
1(0,v.jsx)(j,{item:e,keys:r,extraColumns:a||[],renderDetail:i},t))})]})]})}class j extends n.PureComponent{constructor(){var e,t,r;super(...arguments),e=this,r={isExpanded:!1},(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t="state"))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}render(){const e=this.props,t=e.item,r=e.keys,a=e.renderDetail,i=e.extraColumns,o=this.state.isExpanded;let l=!1;const s=()=>l?null:(l=!0,a&&(0,v.jsx)("button",{onClick:()=>{this.setState({isExpanded:!o})},"data-quicktable-expand-button":!0,children:o?"-":"+"}));return(0,v.jsxs)(n.Fragment,{children:[(0,v.jsxs)("tr",{className:"quicktable__row",children:[r.map((e,r)=>{const n="string"==typeof e?t[e]+"":e.render(t[e.id]);return(0,v.jsxs)("td",{className:"quicktable__cell",children:[s(),n]},"k"+r)}),i&&i.map((e,r)=>(0,v.jsxs)("td",{className:"quicktable__cell",children:[s(),e.render(t)]},r))]},t.id),a&&o&&(0,v.jsx)("tr",{className:"quicktable__row-detail",children:(0,v.jsx)("td",{colSpan:r.length+(i?i.length:0),children:a(t)})},t.id+"_detail")]})}}},37459(e,t,r){var n=r(96540),a=r(76213),i=r(13087),o=r(44367),l=r(85072),s=r.n(l),d=r(97825),c=r.n(d),u=r(77659),h=r.n(u),m=r(55056),p=r.n(m),g=r(10540),b=r.n(g),f=r(41113),v=r.n(f),y=r(35846),x={};x.styleTagTransform=v(),x.setAttributes=p(),x.insert=h().bind(null,"head"),x.domAPI=c(),x.insertStyleElement=b(),s()(y.A,x),y.A&&y.A.locals&&y.A.locals;var j=r(74848);const w=[{title:"Operations",links:[{label:"Queue",href:"/debugbearadmin/queue"},{label:"Recent results",href:"/debugbearadmin/recentResults/"},{label:"Slow attempts",href:"/debugbearadmin/attempts/slow"},{label:"All attempts",href:"/debugbearadmin/attempts"},{label:"Admin Config",href:"/debugbearadmin/edit/adminConfig/1"},{label:"MCP",href:"/debugbearadmin/mcp"}]},{title:"Accounts & billing",links:[{label:"Support",href:"/debugbearadmin/support"},{label:"BC Summary",href:"/debugbearadmin/bcSummary"},{label:"Project Quota",href:"/debugbearadmin/projectQuota"},{label:"Unused Accounts",href:"/debugbearadmin/unusedaccounts"},{label:"Account Creation Requests",href:"/debugbearadmin/accountcreationrequests"},{label:"New Subscription Stats",href:"/debugbearadmin/newSubscriptionStats"},{label:"Signup Stats",href:"/debugbearadmin/signupstats"},{label:"Scan Automation signups",href:"/debugbearadmin/scan-automation"},{label:"Create Missing Chargebee Plans (writes to CB)",href:"/debugbearadmin/createMissingChargebeePlans"}]},{title:"Messaging",links:[{label:"Email queue",href:"/debugbearadmin/emailQueue/"},{label:"Slack Messages",href:"/debugbearadmin/slackMessages"},{label:"Sent Emails log",href:"/debugbearadmin/sentEmails"},{label:"Weekly Emails",href:"/debugbearadmin/weeklyEmails"},{label:"Build Alerts",href:"/debugbearadmin/testBuildAlert"}]},{title:"Other",links:[{label:"Debug Events",href:"/debugbearadmin/debugEvents"},{label:"RUM Snippets",href:"/debugbearadmin/rumSnippets"},{label:"Uptime Monitoring",href:"/debugbearadmin/uptime"},{label:"One-off / Free Tests",href:"/debugbearadmin/oneOffTests"},{label:"Website Scans",href:"/debugbearadmin/websitescans"}]}];class S extends n.Component{render(){return(0,i.wE)("Admin"),(0,j.jsx)("div",{className:"admin-page",children:(0,j.jsxs)("div",{children:[(0,j.jsx)(o.P,{items:[{title:"Admin",href:"#"}]}),(0,j.jsxs)("div",{className:"content-container",children:[(0,j.jsx)("h2",{style:{marginLeft:10,textDecoration:"underline"},children:"Admin"}),w.map(e=>(0,j.jsxs)("div",{style:{marginBottom:20},children:[(0,j.jsx)("h3",{children:e.title}),e.links.map(e=>(0,j.jsxs)(n.Fragment,{children:[(0,j.jsx)("a",{href:e.href,children:e.label}),(0,j.jsx)("br",{})]},e.href))]},e.title))]})]})})}}r(62953);var T=r(95503),C=r(11178),A=r(1404),k=r(41802),Z=r(28448),M=r(44952),P=r(82249);function N(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,o,l=[],s=!0,d=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){d=!0,a=e}
1finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw a}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return I(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?I(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function I(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function D(){const e=(0,a.FE)()[0],t=N((0,n.useState)(null),2),r=t[0],o=t[1],l=N((0,n.useState)(null),2),s=l[0],d=l[1];return(0,n.useEffect)(()=>{const t=e.params.slowOrServerId;"slow"===t?M.FH.adminGetSlowAttempts((0,T.v)().lastNHours||1).then(e=>{o(e)}):t?(M.FH.adminGetServerAttempts(t).then(e=>{o(e)}),M.FH.adminGetServerInfo(t).then(e=>{d(e)})):M.FH.adminGetAttempts().then(e=>{o(e)})},[]),(0,i.wE)("Attempts"),r?(0,j.jsxs)(C.K7,{children:[s&&(0,j.jsx)(R,{serverInfo:s}),(0,j.jsx)("br",{})," for slow: ",(0,j.jsx)("a",{href:"?lastNHours=8",children:"last 8 hours"}),(0,j.jsx)("br",{}),(0,j.jsx)("a",{href:"/debugbearadmin/attempts/slow",children:"slow"}),(0,j.jsx)("br",{}
1),(0,j.jsx)(P.A,{items:r,keys:["id"],renderDetail:e=>(0,j.jsx)(O,{attempt:e}),extraColumns:[{title:"Link",render:e=>{let t;try{t=(0,j.jsx)("a",{href:Z.DS.pageLoadUrl(1,JSON.parse(e.analysisInfo).pageLoad.id),children:"PL"})}catch(e){console.log(e),t="err"}return(0,j.jsxs)("div",{children:[t,(0,j.jsx)("br",{}),(0,j.jsx)("span",{style:{fontSize:12},children:(0,k.r6)(e.createdAt)})]})}},{title:"URL",render:e=>{try{return(0,j.jsx)("div",{children:JSON.parse(e.analysisInfo).pageLoad.url.slice(0,50)})}catch(e){return console.log(e),"err"}}},{title:"failureType",render:e=>(0,j.jsxs)("div",{children:[e.failureType,(0,j.jsx)("div",{style:{fontSize:12,wordBreak:"break-all",maxWidth:600},children:JSON.stringify(e.failureDetails)})]})},{title:"Duration",render:e=>{const t=new Date(e.responseReceivedAt).valueOf()-new Date(e.createdAt).valueOf();return(0,k.MH)(t)}}]})]}):(0,j.jsx)(A.y,{})}class O extends n.Component{constructor(){var e,t,r;super(...arguments),e=this,r={isExpanded:!1},(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t="state"))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}render(){return(0,j.jsx)("pre",{onClick:()=>{this.setState({isExpanded:!0}),console.log(this.props.attempt)},style:{overflow:this.state.isExpanded?"auto":"hidden",margin:0,maxWidth:"70vw",maxHeight:this.state.isExpanded?void 0:40},children:this.props.attempt.log})}}function R(e){let t=e.serverInfo;const r=N((0,n.useState)(!1),2),a=r[0],i=r[1],o=t.instanceId,l=new Date(t.createdAt);let s=`https://console.cloud.google.com/logs/query;query=%2528resource.type%3D%22gce_instance%22%20AND%20resource.labels.instance_id%3D%22${o}%22%2529%20OR%20%2528resource.type%3D%22global%22%20AND%20jsonPayload.instance.id%3D%22${o}%22%2529;timeRange=${l.toISOString()}%2F${l.toISOString()}--PT1H?folder=true&organizationId=339811428603&project=debugbear-us`;return(0,j.jsxs)("div",{children:[(0,j.jsx)("h2",{children:"VM info"}),(0,j.jsx)("a",{href:s,target:"_blank",rel:"noreferrer",children:"View logs"}),(0,j.jsx)("br",{}),!a&&(0,j.jsx)("button",{onClick:()=>i(!0),children:"show full info"}),a&&(0,j.jsx)("pre",{children:JSON.stringify(t,null,2)})]})}r(25440),r(3296),r(27208),r(48408);var F=r(38478),L=r(30843),W=r(2747),B=r(54673),E=r(24389);function H(e){return e.includes("@gmail.com")||e.includes("@mail.ru")||e.includes("@hotmail.")||e.includes("@outlook.com")||e.includes("@yahoo.")||e.includes("@o2.")||e.includes("@outlook.fr")||e.includes("@gmx.")||e.includes("@web.de")||e.includes("@qq.com")||e.includes("@protonmail.com")||e.includes("@icloud.com")||e.includes("@live.")||e.includes("@aol.com")||e.includes("@proton.me")||e.includes("@mailto.plus")||e.includes("@googlemail.com")||e.includes("@yandex.ru")||e.includes("@lapeds.com")||e.includes("@me.com")||e.includes("@mozmail.com")||e.includes("@ymail.com")||e.includes("@atomicmail.io")||e.endsWith(".ac.uk")||e.endsWith(".edu.my")||e.endsWith(".edu.vn")}const U=["IN","PK","UA","ID","CN","BD","PH","MA","EG","TH","AE","ZA","NG","CL","TN","LK","LY","TR","RS","VN","IR","NP","BY","YE","KE","DZ","VE","EC","RU","UG","BW","KH","AM","KZ","DO"];var z=r(18728),V=r(16172),G=r(66304),q=r(2543),$=r(25759),X={};X.styleTagTransform=v(),X.setAttributes=p(),X.insert=h().bind(null,"head"),X.domAPI=c(),X.insertStyleElement=b(),s()($.A,X),$.A&&$.A.locals&&$.A.locals;var _=r(17672);function J(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Y(e){let t=e.billingCustomerId;const r=(o=(0,n.useState)(null),l=2,function(e){if(Array.isArray(e))return e}(o)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,o,l=[],s=!0,d=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){d=!0,a=e}
1finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw a}}return l}}(o,l)||function(e,t){if(e){if("string"==typeof e)return J(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?J(e,t):void 0}}(o,l)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=r[0],i=r[1];var o,l;return(0,n.useEffect)(()=>{i(null),M.FH.adminGetBillingCustomer(t).then(e=>i(e))},[t]),a?(console.log({bc:a}),(0,j.jsxs)("div",{children:[(0,j.jsx)(W.mY,{items:a.comments,columns:{content:{heading:{title:"Note"},render:e=>(0,j.jsx)("div",{children:e.content})},addedBy:{heading:{title:"Added By"},render:e=>(0,j.jsx)("div",{children:e.addedBy})},createdAt:{heading:{title:"Date"},render:e=>(0,j.jsx)("div",{children:(0,k.w_)(e.createdAt)})}}}),(0,j.jsx)("div",{className:"mt-3 mb-3",children:(0,j.jsx)("button",{onClick:()=>{M.FH.adminAddBillingCustomerComment(t,{content:prompt("Enter comment"),type:"manual"}).then(e=>i({...a,comments:[e,...a.comments]}))},className:"btn btn-primary btn-sm",children:"Add Comment"})})]})):(0,j.jsx)(_.v,{})}function K(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,o,l=[],s=!0,d=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){d=!0,a=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw a}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Q(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Q(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Q(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function ee(e){let t=e.billingCustomers;const r=K(n.useState(!1),2),a=r[0],i=r[1];return(0,j.jsxs)("div",{children:[(0,j.jsx)("button",{onClick:()=>i(!a),children:"toggle show mrr info"}),a&&(0,j.jsx)(re,{billingCustomers:t})]})}const te=(e,t)=>{const r=null==t?void 0:t.find(t=>t.name===e.planName);return(null==r?void 0:r.price)/100};function re(e){let t=e.billingCustomers;const r=K(n.useState(null),2),a=r[0],i=r[1];if(n.useEffect(()=>{M.FH.adminGetPlans().then(e=>{i(e)})},[]),!a)return(0,j.jsx)(A.y,{});t=(t||[]).filter(e=>"freeTrial"!==e.planName);const o=(0,k.cz)(t.map(e=>te(e,a))),l=(0,q.groupBy)(t,ne),s=(0,q.sortBy)(Object.entries(l).map(e=>{let t=K(e,2),r=t[0],n=t[1];const i=(0,k.cz)(n.map(e=>te(e,a)));return{planNamePart:r,customerCount:n.length,groupMrr:i,groupMrrString:(0,k.Ke)(i),mrrPercentage:(0,k.LI)(i/o*100,1)}}),e=>-e.groupMrr),d=(0,q.groupBy)(t,e=>function(e,t){const r=te(e,t);return 0===r?"0":r<=10?"<10":r<45?"11-45":r<100?"46-100":r<150?"100-150":r<300?"150-300":r<1e3?"300-1000":"1000+"}(e,a)),c=(0,q.sortBy)(Object.entries(d).map(e=>{let t=K(e,2),r=t[0],n=t[1];const i=(0,k.cz)(n.map(e=>te(e,a)));return{planNamePart:r,groupMrr:i,customerCount:n.length,groupMrrString:(0,k.Ke)(i),mrrPercentage:(0,k.LI)(i/o*100,1)}}),e=>-e.groupMrr);return(0,j.jsxs)("div",{children:["Overall CB MRR (not considering discounts):",(0,k.Ke)(o),(0,j.jsx)(P.A,{items:s,keys:["planNamePart","customerCount","groupMrrString","mrrPercentage"]}),(0,j.jsx)(P.A,{items:c,keys:["planNamePart","customerCount","groupMrrString","mrrPercentage"]}),(0,j.jsx)(ae,{billingCustomers:t,allPlans:a,countOrValue:"count"}),(0,j.jsx)(ae,{billingCustomers:t,allPlans:a,countOrValue:"value"})]})}function ne(e){return e.planName.split("-")[0]}function ae(e){let t=e.billingCustomers,r=e.allPlans,a=e.countOrValue;const i=K(n.useState("chart"),2),o=i[0],l=i[1],s=K(n.useState(!1),2),d=s[0],c=s[1],u=["starter","basic","essential","pro","corporate"],h=u.map(e=>({data:[],name:e})),m=[];for(let e=0;e<=36;e++){const n=new Date(2021,e,1),i=new Date(2021,e+1,1);m.push((0,k.Yq)(n,!0));const o=t.filter(e=>{const t=new Date(e.createdAt);return t>n&&t<i&&te(e,r)>0}),l=(0,q.groupBy)(o,ne);u.forEach((e,t)=>{const n=l[e];let i="value"===a?n?(0,k.cz)(n.map(e=>te(e,r))):0:n?n.length:0;if(d){const e="count"===a?o.length:(0,k.cz)(o.map(e=>te(e,r)));i=Math.round(i/e*1e3)/10}h[t].data.push(i)})}const p={chart:{type:"column",height:600},title:{text:"MRR plan breakdown: customer"+a},xAxis:{categories:m},yAxis:{min:0,stackLabels:{enabled:!0,style:{fontWeight:"bold"}}},plotOptions:{column:{animation:!1,stacking:"normal",dataLabels:{enabled:!0,formatter:function(){return this.y+" "+this.series.name}}}},series:h},g=(0,j.jsx)("button",{onClick:()=>{c(!d)},children:"toggle percentages"});if("chart"===o)return(0,j.jsxs)("div",{children:[(0,j.jsx)("button",{onClick:()=>l("table"),children:"Show table"}),g,(0,j.jsx)(B.F,{options:p})]});{const e=[];return h[0].data.forEach((t,r)=>{const n={period:m[r]};u.forEach((e,t)=>{n[e]=h[t].data[r]}),e.push(n)}),(0,j.jsxs)("div",{children:[g,(0,j.jsx)(P.A,{items:e,keys:["period",...u]})]})}}function ie(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function oe(e){const t=(s=n.useState(!1),d=2,function(e){if(Array.isArray(e))return e}(s)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,o,l=[],s=!0,d=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){d=!0,a=e}
1finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw a}}return l}}(s,d)||function(e,t){if(e){if("string"==typeof e)return ie(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ie(e,t):void 0}}(s,d)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),r=t[0],a=t[1],i=e.height,o=e.width,l=e.saveValue;var s,d;function c(e){const t=e.querySelector("textarea").value;l(t).then(()=>{document.title=Math.random().toString()}),a(!1)}const u=(0,j.jsx)("textarea",{style:{width:o||200,height:i||40,marginRight:r?0:40},onKeyDown:e=>{13!==e.keyCode||e.shiftKey||(e.preventDefault(),c(e.target.parentElement))},defaultValue:e.defaultValue,onFocus:()=>{r||a(!0)}});return(0,j.jsx)("div",{children:(0,j.jsxs)("form",{className:"special-form",onSubmit:e=>{e.preventDefault(),c(e.target)},children:[u,r&&(0,j.jsx)("button",{style:{fontSize:8,padding:1},children:"Update"})]})})}var le=r(3006),se=r(27867),de=r(69821),ce=r(6463);const ue=[{title:"How Marketing And Development Teams Can Collaborate On Page Speed",path:"/blog/marketing-dev-collaboration",date:"2026-09-02T01:00:00.000Z",author:"Matt Zeunert"},{title:"Server Timings: Measure And Track Backend Performance",path:"/blog/server-timings",date:"2026-08-19T01:00:00.000Z",author:"Conor McCarthy"},{title:"Network Efficiency Guardrails: Detect Web Performance Issues",path:"/blog/network-efficiency-guardrails",date:"2026-08-03T01:00:00.000Z",author:"Jakub Andrzejewski"},{title:"Find Hidden Render-Blocking Requests with the Website Bottleneck Finder",path:"/blog/website-bottleneck-finder",date:"2026-07-29T01:00:00.000Z",author:"Joe Coulson"},{title:"Implement Website Best Practices With Lighthouse",path:"/blog/lighthouse-best-practices",date:"2026-07-15T01:00:00.000Z",author:"Conor McCarthy"},{title:"What's The Fastest Post Office Website In Europe?",path:"/blog/european-post-office-website-benchmark",date:"2026-06-25T01:00:00.000Z",author:"Conor McCarthy"},{title:"WebMCP: Optimize Your Website for AI Agents",path:"/blog/webmcp",date:"2026-06-23T01:00:00.000Z",author:"Jakub Andrzejewski"},{title:"What's The Fastest Train Booking Website In Europe?",path:"/blog/which-european-country-has-the-fastest-train-website",date:"2026-06-15T01:00:00.000Z",author:"Conor McCarthy"},{title:"How Does Indaru Ecometrics Calculate Website Carbon Footprint?",path:"/blog/indaru-ecometrics-website-carbon-footprint-plugin",date:"2026-06-14T01:00:00.000Z",author:"Matt Zeunert"},{title:"How To Set Up Performance Alerts On Your Website",path:"/blog/web-performance-monitoring-alerts",date:"2026-05-28T01:00:00.000Z",author:"Conor McCarthy"},{title:"Smarter Website Caching With No-Vary-Search",path:"/blog/no-vary-search",date:"2026-05-26T01:00:00.000Z",author:"Jakub Andrzejewski"},{title:"Google Lighthouse Has A New Agentic Browsing Category",path:"/blog/lighthouse-agentic-browsing",date:"2026-05-10T01:00:00.000Z",author:"Matt Zeunert"},{title:"Can A Content Delivery Network Boost Website SEO?",path:"/blog/cdn-seo",date:"2026-05-04T01:00:00.000Z",author:"Conor McCarthy"},{title:"Declarative Shadow DOM and Native Server-Side Rendering",path:"/blog/declarative-shadow-dom",date:"2026-04-29T01:00:00.000Z",author:"Anna Monus"},{title:"Which Country Has The Fastest Government Website?",path:"/blog/which-government-website-is-the-fastest",date:"2026-04-24T01:00:00.000Z",author:"Conor McCarthy"},{title:"Technical SEO Checklist: The Complete Guide For 2026",path:"/blog/technical-seo-checklist",date:"2026-04-21T01:00:00.000Z",author:"MJ Cachon"},{title:"Shopify Speed Optimization: Fixing The Real Bottlenecks",path:"/blog/shopify-speed-optimization",date:"2026-04-20T01:00:00.000Z",author:"Saurabh Shukla"},{title:"How to Use Lazy Loading Without Hurting Web Performance",path:"/blog/lazy-loading-performance",date:"2026-04-10T01:00:00.000Z",author:"Jakub Andrzejewski"},{title:"Using Too Many Preconnects Isn't That Bad For Page Speed",path:"/blog/excessive-preconnect-hints",date:"2026-03-27T02:00:00.000Z",author:"Conor McCarthy"},{title:"An Introduction to React Server Components",path:"/blog/react-server-components",date:"2026-03-11T02:00:00.000Z",author:"Anna Monus"},{title:"Improve Web Performance With requestAnimationFrame",path:"/blog/requestanimationframe",date:"2026-03-09T02:00:00.000Z",author:"Jakub Andrzejewski"},{title:"What Googlebot's 2MB Crawl Size Limit Means For SEO",path:"/blog/googlebot-crawler-file-size-limit",date:"2026-02-16T02:00:00.000Z",author:"Matt Zeunert"},{title:"Mobile performance: How to make your website mobile friendly",path:"/blog/mobile-website-performance",date:"2026-02-09T02:00:00.000Z",author:"Jakub Andrzejewski"},{title:"A Web Performance Analysis Of Consent Management Platforms",path:"/blog/consent-management-platforms-performance-comparison",date:"2026-02-06T02:00:00.000Z",author:"Conor McCarthy"},{title:"The Complete Guide To Ecommerce SEO in 2026",path:"/blog/ecommerce-website-seo",date:"2026-02-04T02:00:00.000Z",author:"MJ Cachon"},{title:"What is JPEG XL: do we really need another image format?",path:"/blog/jpeg-xl-image-format",date:"2026-02-02T02:00:00.000Z",author:"Aaron T. Grogg"},{title:"React Compiler: An Introduction, Pros, Cons & When to Use It",path:"/blog/react-compiler",date:"2026-01-28T02:00:00.000Z",author:"Anna Monus"},{title:"How Web Performance Impacts User Experience",path:"/blog/web-performance-user-experience",date:"2026-01-26T02:00:00.000Z",author:"Matt Zeunert"},{title:"Improve React Performance With useMemo And useCallback",path:"/blog/react-usememo-usecallback",date:"2026-01-23T02:00:00.000Z",author:"Jakub Andrzejewski"},{title:"How To Diagnose Lighthouse Score Discrepancies Between Tools",path:"/blog/lighthouse
1-score-discrepancies",date:"2026-01-21T02:00:00.000Z",author:"Matt Zeunert"},{title:"How to Measure and Optimize React Performance",path:"/blog/measuring-react-app-performance",date:"2026-01-12T02:00:00.000Z",author:"Anna Monus"},{title:"We Fixed A 6-Year-Old JavaScript Memory Leak",path:"/blog/javascript-memory-leak",date:"2026-01-05T02:00:00.000Z",author:"Matt Zeunert"},{title:"How We Made DebugBear Better In 2025",path:"/blog/debugbear-product-updates-2025",date:"2025-12-18T02:00:00.000Z",author:"Matt Zeunert"},{title:"Firefox And Safari Now Support Two Core Web Vitals Metrics",path:"/blog/firefox-safari-web-vitals",date:"2025-12-15T02:00:00.000Z",author:"Matt Zeunert"},{title:"A Website Performance Review Of The Splunk Homepage",path:"/blog/splunk-website-performance",date:"2025-12-12T02:00:00.000Z",author:"Matt Zeunert"},{title:"Next.js Image Optimization: The next/image Component",path:"/blog/nextjs-image-optimization",date:"2025-12-09T02:00:00.000Z",author:"Jakub Andrzejewski"},{title:"2025 In Review: What’s New In Web Performance?",path:"/blog/2025-in-web-performance",date:"2025-12-05T02:00:00.000Z",author:"Matt Zeunert"},{title:"Calendly Booking Links: A Web Performance Audit",path:"/blog/calendly-web-performance-audit",date:"2025-11-26T02:00:00.000Z",author:"Matt Zeunert"},{title:"How Quickly Can Chrome Parse HTML Code?",path:"/blog/html-parser-throughput",date:"2025-11-17T02:00:00.000Z",author:"Matt Zeunert"},{title:"How To Debug JavaScript In Chrome DevTools",path:"/blog/chrome-javascript-debugger",date:"2025-11-10T02:00:00.000Z",author:"Matt Zeunert"},{title:"How To Throttle Specific Requests In Chrome DevTools",path:"/blog/chrome-devtools-throttle-individual-request",date:"2025-11-04T02:00:00.000Z",author:"Matt Zeunert"},{title:"Inlining Critical CSS: Does It Make Your Website Faster?",path:"/blog/critical-css",date:"2025-10-27T02:00:00.000Z",author:"Matt Zeunert"},{title:"How To Optimize Your Magento Website For Performance",path:"/blog/magento-performance-optimization",date:"2025-10-21T01:00:00.000Z",author:"Samuel Boczek"},{title:"Performance Debugging With The Chrome DevTools MCP Server",path:"/blog/chrome-devtools-mcp-performance-debugging",date:"2025-10-13T01:00:00.000Z",author:"Matt Zeunert"},{title:"Optimizing Images For Web Performance: All You Need To Know",path:"/blog/image-optimization-web-performance",date:"2025-10-08T01:00:00.000Z",author:"Guy Parsons"},{title:"Nuxt vs Next.js: A Practical Comparison",path:"/blog/nuxt-vs-next",date:"2025-10-06T01:00:00.000Z",author:"Jakub Andrzejewski"},{title:"Analyzing the Web Performance of Food & Recipe Websites",path:"/blog/media-publisher-web-performance-recipe-food-sites",date:"2025-10-02T01:00:00.000Z",author:"Guy Parsons"},{title:"How to Optimize Viewport for Mobile for Faster Interactions",path:"/blog/optimize-viewport-for-mobile",date:"2025-10-01T01:00:00.000Z",author:"Anna Monus"},{title:"JMeter Tutorial: Get Started With Load Testing",path:"/blog/load-testing-jmeter-tutorial",date:"2025-09-25T01:00:00.000Z",author:"Andrew Lee"},{title:"What's The Fastest Self-Checkout: An Input Latency Analysis",path:"/blog/self-checkout-input-latency",date:"2025-09-24T01:00:00.000Z",author:"Matt Zeunert"},{title:"Analysing the Web Performance of Gaming Websites Online",path:"/blog/media-publisher-web-performance-gaming",date:"2025-09-22T01:00:00.000Z",author:"Guy Parsons"},{title:"Nuxt Scripts: Load And Optimize Third Party Code",path:"/blog/nuxt-scripts",date:"2025-09-15T01:00:00.000Z",author:"Jakub Andrzejewski"},{title:"Performance Engineering: To Invest or Not To Invest",path:"/blog/performance-engineering-why-invest-in-web-performance",date:"2025-09-01T01:00:00.000Z",author:"Scott Moore"},{title:"Partytown: Optimize Third Party Scripts with Web Workers",path:"/blog/partytown-web-workers",date:"2025-08-28T01:00:00.000Z",author:"Jakub Andrzejewski"},{title:"How To Fix A Slow Website: 4 Web Performance Tips",path:"/blog/fix-slow-loading-websites",date:"2025-08-08T01:00:00.000Z",author:"Scott Moore"},{title:"How To Use The Safari Developer Tools",path:"/blog/safari-developer-tools",date:"2025-08-05T01:00:00.000Z",author:"Matt Zeunert"},{title:"Efficient Data Fetching In Nuxt With useAsyncData",path:"/blog/nuxt-useasyncdata",date:"2025-08-01T01:00:00.000Z",author:"Jakub Andrzejewski"},{title:"Many Servers Don't Properly Support HTTP Prioritization",path:"/blog/http-prioritization",date:"2025-07-29T01:00:00.000Z",author:"Matt Zeunert"},{title:"How To Monitor Single Page Application Performance",path:"/blog/single-page-application-monitoring",date:"2025-07-22T01:00:00.000Z",author:"Matt Zeunert"},{title:"Optimizing Nuxt Server Side Rendering (SSR) Performance",path:"/blog/nuxt-ssr-performance",date:"2025-07-11T01:00:00.000Z",author:"Jakub Andrzejewski"},{title:"Bridging the Performance Divide: Backend and Frontend Engineers Must Unite",path:"/blog/performance-divide-backend-frontend",date:"2025-07-08T01:00:00.000Z",author:"Scott Moore"},{title:"HTTP/3 vs HTTP/2 Performance: Is the Upgrade Worth It?",path:"/blog/http3-vs-http2-performance",date:"2025-06-30T01:00:00.000Z",author:"Anna Monus"},{title:"How To Use The Browser Console: An In-Depth Guide",path:"/blog/chrome-browser-console",date:"2025-06-12T01:00:00.000Z",author:"Matt Zeunert"},{title:"Website INP Scores In 2025: UX Impact Across The World",path:"/blog/global-inp-statistics",date:"2025-06-09T01:00:00.000Z",author:"Matt Zeunert"},{title:"How Google Search Uses Speculation Rules With A Proxy",path:"/blog/google-blocked-website",date:"2025-05-28T01:00:00.000Z",author:"Matt Zeunert"},{title:"How to Improve Image Delivery on Your Website",path:"/blog/improve-image-delivery",date:"2025-05-23T01:00:00.000Z",author:"Anna Monus"},{title:"How To Generate And Open HAR Files",path:"/blog/generate-open-har-files",date:"2025-05-19T01:00:00.000Z",author:"Matt Zeunert"},{title:"How To Optimize Document Request Latency",path:"/blog/document-request-latency",date:"2025-05-12T01:00:00.000Z",author:"Matt Zeunert"},{title:"7 Best Practices for Improving Landing Page Performance",path:"/blog/improving-landing-page-performance",date:"2025-04-29T01:00:00.000Z",author:"Anna Monus"},{title:"Does Making Fewer HTTP Requests Improve Page Speed?",path:"/blog/make-fewer-http-requests",date:"2025-04-28T01:00:00.000Z",author:"Matt Zeunert"},{title:"How To Optimize LCP Request Discovery",path:"/blog/lcp-request-discovery",date:"2025-04-18T01:00:00.000Z",author:"Conor McCarthy"},{title:"How To Improve Website Performance: A Detailed Guide",path:"/blog/improve-website-performance",date:"2025-04-16T01:00:00.000Z",author:"Matt Zeunert"},{title:"5 Ways to Reduce HTML File Size on Your Website",path:"/blog/reduce-html-file-size",date:"2025-04-10T01:00:00.000Z",author:"Anna Monus"},{title:"How To Fix Forced Reflows And Layout Thrashing",path:"/blog/for
1ced-reflows",date:"2025-04-08T01:00:00.000Z",author:"Matt Zeunert"},{title:"WooCommerce Performance Optimization: How To Fix a Slow Online Store",path:"/blog/optimize-woocommerce-performance",date:"2025-04-07T01:00:00.000Z",author:"Andrea Cardinali"},{title:"How to Properly Size Images to Improve Core Web Vitals",path:"/blog/properly-size-images",date:"2025-04-04T01:00:00.000Z",author:"Anna Monus"},{title:"Build Customizable Select Boxes with Native HTML",path:"/blog/customizable-select-with-native-html",date:"2025-04-03T01:00:00.000Z",author:"Matt Zeunert"},{title:"Performance Insights Audits in Lighthouse and Chrome",path:"/blog/performance-insights-devtools-lighthouse",date:"2025-04-02T01:00:00.000Z",author:"Matt Zeunert"},{title:"How Does Chrome Prioritize Image Requests?",path:"/blog/chrome-image-request-prioritization",date:"2025-03-31T01:00:00.000Z",author:"Conor McCarthy"},{title:"Cookie Consent Banners, Page Speed, And Core Web Vitals",path:"/blog/cookie-consent-banner-performance",date:"2025-03-20T02:00:00.000Z",author:"Matt Zeunert"},{title:"How To Efficiently Encode Images On Your Website",path:"/blog/efficiently-encode-images",date:"2025-03-19T02:00:00.000Z",author:"Conor McCarthy"},{title:"Legacy JavaScript: How To Avoid Serving It To Modern Browsers",path:"/blog/avoid-legacy-js",date:"2025-03-18T02:00:00.000Z",author:"Matt Zeunert"},{title:"Use Efficient Cache Lifetimes To Serve Static Assets",path:"/blog/serve-static-assets-with-an-efficient-cache-policy",date:"2025-03-14T02:00:00.000Z",author:"Umar Hansa"},{title:"Faster Rendering with the content-visibility CSS Property",path:"/blog/content-visibility-api",date:"2025-03-13T02:00:00.000Z",author:"Umar Hansa"},{title:"Lazy Load Background Images with the IntersectionObserver API",path:"/blog/lazy-load-background-images-intersection-observer",date:"2025-03-12T02:00:00.000Z",author:"Anna Monus"},{title:"7 Tips to Eliminate Render-Blocking Resources in WordPress",path:"/blog/eliminate-render-blocking-resources-wordpress",date:"2025-03-11T02:00:00.000Z",author:"Anna Monus"},{title:"How to Optimize Next.js Performance: An In-depth Guide",path:"/blog/nextjs-performance",date:"2025-03-10T02:00:00.000Z",author:"Cory Miller"},{title:"How To Use PageSpeed Insights: A Detailed Guide",path:"/blog/pagespeed-insights",date:"2025-03-09T02:00:00.000Z",author:"Matt Zeunert"},{title:"Page Speed: Avoid Large Base64 data URLs in HTML and CSS",path:"/blog/base64-data-urls-html-css",date:"2025-03-07T02:00:00.000Z",author:"Conor McCarthy"},{title:"How To Reduce The Impact Of Third-Party Code: A Guide",path:"/blog/reduce-the-impact-of-third-party-code",date:"2025-03-06T02:00:00.000Z",author:"Matt Zeunert"},{title:"Our Favorite DevTools Features of 2025",path:"/blog/favourite-devtools-features-in-2025",date:"2025-03-05T02:00:00.000Z",author:"Umar Hansa"},{title:"No Compression Applied: Fix Text Compression On Your Website",path:"/blog/enable-text-compression",date:"2025-02-27T02:00:00.000Z",author:"Umar Hansa"},{title:"Resource Prefetching May Slow Down Your Website",path:"/blog/prefetch-slower-website",date:"2025-02-24T02:00:00.000Z",author:"Matt Zeunert"},{title:"WordPress Speed Optimization: A Step-By-Step Guide",path:"/blog/speed-up-wordpress",date:"2025-02-20T02:00:00.000Z",author:"Anna Monus"},{title:"How Does Bandwidth Competition Impact Page Speed?",path:"/blog/bandwidth-competition-page-speed",date:"2025-02-19T02:00:00.000Z",author:"Matt Zeunert"},{title:"How To Use Chrome's Developer Tools",path:"/blog/use-chrome-devtools",date:"2025-02-16T02:00:00.000Z",author:"Matt Zeunert"},{title:"How To Fix LCP Resource Load Duration",path:"/blog/lcp-resource-load-duration",date:"2025-02-10T02:00:00.000Z",author:"Matt Zeunert"},{title:"Preload Fonts On Your Website For Better Core Web Vitals",path:"/blog/preload-web-fonts",date:"2025-02-07T02:00:00.000Z",author:"Conor McCarthy"},{title:"How To Optimize The Critical Rendering Path",path:"/blog/optimizing-the-critical-rendering-path",date:"2025-02-05T02:00:00.000Z",author:"Matt Zeunert"},{title:"CSS Font Display: Keep Text Visible During Webfont Load",path:"/blog/ensure-text-remains-visible-during-webfont-load",date:"2025-02-03T02:00:00.000Z",author:"Conor McCarthy"},{title:"Website Performance Optimization: Effective Strategies",path:"/blog/website-performance-optimization",date:"2025-01-30T02:00:00.000Z",author:"Matt Zeunert"},{title:"How To Audit Core Web Vitals: An In-depth Guide",path:"/blog/core-web-vitals-audit",date:"2025-01-24T02:00:00.000Z",author:"Matt Zeunert"},{title:"How To Avoid Large Layout Shifts: 3 Practical Examples",path:"/blog/avoid-large-layout-shifts",date:"2025-01-23T02:00:00.000Z",author:"Matt Zeunert"},{title:"How To Reduce Unused CSS And Speed Up Your Website",path:"/blog/reduce-unused-css",date:"2025-01-22T02:00:00.000Z",author:"Conor McCarthy"},{title:"What Are Network Latency And Round Trip Time (RTT)?",path:"/blog/network-round-trip-time-latency",date:"2025-01-21T02:00:00.000Z",author:"Matt Zeunert"},{title:"Website Load Time Statistics: Page Speed In 2025",path:"/blog/website-speed-statistics",date:"2025-01-20T02:00:00.000Z",author:"Matt Zeunert"},{title:"Avoid Multiple Page Redirects: How Redirects Impact Page Speed",path:"/blog/avoid-multiple-page-redirects",date:"2025-01-16T02:00:00.000Z",author:"Conor McCarthy"},{title:"You Might Not Have A Web Performance Problem",path:"/blog/poor-performance-score-good-performance",date:"2025-01-15T02:00:00.000Z",author:"Matt Zeunert"},{title:"Why Is Google Field TTFB Worse Than Lighthouse Lab Data?",path:"/blog/ttfb-lab-vs-field",date:"2025-01-10T02:00:00.000Z",author:"Matt Zeunert"},{title:"How To Preload Your Largest Contentful Paint Image",path:"/blog/preload-largest-contentful-paint-image",date:"2025-01-08T02:00:00.000Z",author:"Conor McCarthy"},{title:"5 Ways To Reduce Initial Server Response Time",path:"/blog/reduce-initial-server-response-time",date:"2025-01-07T02:00:00.000Z",author:"Anna Monus"},{title:"How To Interpret Data From Google's Chrome UX Report",path:"/blog/interpret-chrome-ux-report-data",date:"2025-01-06T02:00:00.000Z",author:"Matt Zeunert"},{title:"How To Use Vue DevTools To Investigate Performance",path:"/blog/vue-devtools-performance",date:"2024-12-23T02:00:00.000Z",author:"Jakub Andrzejewski"},{title:"CPU Throttling In Chrome DevTools and Lighthouse",path:"/blog/cpu-throttling-in-chrome-devtools-and-lighthouse",date:"2024-12-18T02:00:00.000Z",author:"Conor McCarthy"},{title:"What Does The DOMContentLoaded Event Measure?",path:"/blog/domcontentloaded",date:"2024-12-16T02:00:00.000Z",author:"Matt Zeunert"},{title:"2024 In Review: What’s New In Web Performance?",path:"/blog/2024-in-web-performance",date:"2024-12-13T02:00:00.000Z",author:"Umar Hansa"},{title:"Caching on a Content Delivery Network (CDN)",path:"/blog/cdn-cache",date:"2024-12-11T02:00:00.000Z",author:"Umar Hansa"},{title:"Fix Your LCP Score By Reducing Resource Load Delay",path:"/blog/lcp-resource-load-delay",date:"2024-12-10T02:00:00.000Z",author:"Conor McCarthy"},{title:"What Are Lighthouse Performance Audits And Why Do Their Results Vary?",path:"/blog/lighthouse
1-performance-audits",date:"2024-12-09T02:00:00.000Z",author:"Anna Monus"},{title:"How To Fix Largest Contentful Paint For Background Images",path:"/blog/largest-contentful-paint-background-images",date:"2024-12-06T02:00:00.000Z",author:"Conor McCarthy"},{title:"How To Leverage Browser Caching to Improve Site Speed",path:"/blog/browser-caching",date:"2024-12-05T02:00:00.000Z",author:"Umar Hansa"},{title:"10 Steps to Avoid Enormous Network Payloads",path:"/blog/avoid-enormous-network-payloads",date:"2024-11-29T02:00:00.000Z",author:"Anna Monus"},{title:"How To Optimize Performance In Nuxt Apps",path:"/blog/optimize-nuxt-performance",date:"2024-11-28T02:00:00.000Z",author:"Jakub Andrzejewski"},{title:"How To Reduce JavaScript Execution Time",path:"/blog/reduce-javascript-execution-time",date:"2024-11-26T02:00:00.000Z",author:"Conor McCarthy"},{title:"How To Monitor JavaScript Performance",path:"/blog/javascript-performance-monitoring",date:"2024-11-17T02:00:00.000Z",author:"Conor McCarthy"},{title:"View Transition API: Single Page Apps Without a Framework",path:"/blog/view-transitions-spa-without-framework",date:"2024-11-13T02:00:00.000Z",author:"Umar Hansa"},{title:"How To Optimize Performance In Vue Apps",path:"/blog/optimize-vue-performance",date:"2024-11-12T02:00:00.000Z",author:"Jakub Andrzejewski"},{title:"How To Annotate A Chrome DevTools Performance Trace",path:"/blog/chrome-devtools-performance-annotations",date:"2024-11-08T02:00:00.000Z",author:"Matt Zeunert"},{title:"How To Achieve Instant Navigations On The Web",path:"/blog/instant-navigations",date:"2024-11-06T02:00:00.000Z",author:"Matt Zeunert"},{title:"Layout Shift Culprits: Debug CLS On Your Website",path:"/blog/devtools-layout-shift",date:"2024-11-05T02:00:00.000Z",author:"Umar Hansa"},{title:"ConvertKit Rebranding: A Web Performance Success Story, With A Few Glitches",path:"/blog/convertkit-rebrand-web-vitals",date:"2024-11-01T02:00:00.000Z",author:"Anna Monus"},{title:"Browser Support For Core Web Vitals And Page Speed Metrics",path:"/blog/browser-support-for-core-web-vitals",date:"2024-10-31T02:00:00.000Z",author:"Conor McCarthy"},{title:"Network Dependency Tree: Avoid Chaining Critical Requests",path:"/blog/avoid-chaining-critical-requests",date:"2024-10-25T01:00:00.000Z",author:"Conor McCarthy"},{title:"How To Speed Up Your Vue App With Server Side Rendering",path:"/blog/vue-ssr",date:"2024-10-23T01:00:00.000Z",author:"Jakub Andrzejewski"},{title:"How To Test Your Website With JavaScript Disabled",path:"/blog/test-website-with-javascript-disabled",date:"2024-10-21T01:00:00.000Z",author:"Matt Zeunert"},{title:"The Ultimate Guide to Shared Compression Dictionaries",path:"/blog/shared-compression-dictionaries",date:"2024-10-14T01:00:00.000Z",author:"Anna Monus"},{title:"Fix Your LCP Score By Improving Render Delay",path:"/blog/lcp-render-delay",date:"2024-10-03T01:00:00.000Z",author:"Conor McCarthy"},{title:"Google's New CrUX Vis Tool: Explore Core Web Vitals Data",path:"/blog/google-crux-vis",date:"2024-10-01T01:00:00.000Z",author:"Matt Zeunert"},{title:"Cloudflare Speed Brain: What You Need to Know",path:"/blog/cloudflare-speed-brain",date:"2024-09-26T01:00:00.000Z",author:"Umar Hansa"},{title:"How to Defer Offscreen Images: An In-Depth Guide",path:"/blog/defer-offscreen-images",date:"2024-09-24T01:00:00.000Z",author:"Anna Monus"},{title:"What Is JavaScript Hydration For Single Page Applications?",path:"/blog/javascript-hydration",date:"2024-09-23T01:00:00.000Z",author:"Matt Zeunert"},{title:"Largest Contentful Paint Differences In Lab And Field Data",path:"/blog/lcp-lab-field-differences",date:"2024-09-17T01:00:00.000Z",author:"Matt Zeunert"},{title:"How To Optimize Largest Contentful Paint For Video Elements",path:"/blog/optimize-video-lcp",date:"2024-09-16T01:00:00.000Z",author:"Conor McCarthy"},{title:"Modern HTTP: HTTP/1.1 vs HTTP/2 For Performance",path:"/blog/http1-vs-http2",date:"2024-09-12T01:00:00.000Z",author:"Conor McCarthy"},{title:"What’s The Difference Between CrUX And RUM Data?",path:"/blog/crux-vs-rum",date:"2024-09-09T01:00:00.000Z",author:"Matt Zeunert"},{title:"The Ultimate Guide to Font Performance Optimization",path:"/blog/website-font-performance",date:"2024-08-28T01:00:00.000Z",author:"Anna Monus"},{title:"Monitor Core Web Vitals with the web-vitals.js Library",path:"/blog/core-web-vitals-js",date:"2024-08-23T01:00:00.000Z",author:"Umar Hansa"},{title:"How To Reduce Unused JavaScript",path:"/blog/reduce-unused-javascript",date:"2024-08-19T01:00:00.000Z",author:"Anna Monus"},{title:"Brand New Performance Features in Chrome DevTools",path:"/blog/fix-web-performance-devtools",date:"2024-08-15T01:00:00.000Z",author:"Umar Hansa"},{title:"Minify JavaScript And CSS Code For A Faster Website",path:"/blog/minify-javascript-css",date:"2024-08-07T01:00:00.000Z",author:"Matt Zeunert"},{title:"PageSpeed Insights API: Discover Web Performance Insights",path:"/blog/pagespeed-insights-api",date:"2024-08-05T01:00:00.000Z",author:"Umar Hansa"},{title:"Are Re-renders Hurting Your Largest Contentful Paint Score?",path:"/blog/content-rerenders-largest-contentful-paint",date:"2024-08-02T01:00:00.000Z",author:"Conor McCarthy"},{title:"Debunking 5 Myths About Interaction to Next Paint (INP)",path:"/blog/inp-misconceptions",date:"2024-0
17-29T01:00:00.000Z",author:"Umar Hansa"},{title:"What Elements Contribute to Interaction to Next Paint?",path:"/blog/inp-element-interactions",date:"2024-07-25T01:00:00.000Z",author:"Umar Hansa"},{title:"Chrome Extension Statistics: Data From 2024",path:"/blog/chrome-extension-statistics",date:"2024-07-19T01:00:00.000Z",author:"Matt Zeunert"},{title:"How To Fix Missing INP Attribution Data With The LoAF API",path:"/blog/inp-attribution-data-missing",date:"2024-07-17T01:00:00.000Z",author:"Matt Zeunert"},{title:"Synthetic Monitoring vs. Real User Monitoring (RUM): A Comparison",path:"/blog/synthetic-vs-rum",date:"2024-07-15T01:00:00.000Z",author:"Umar Hansa"},{title:"A Guide to Website Monitoring",path:"/blog/types-of-monitoring",date:"2024-07-11T01:00:00.000Z",author:"Umar Hansa"},{title:"Optimize DOM Size For Better Web Performance",path:"/blog/excessive-dom-size",date:"2024-07-09T01:00:00.000Z",author:"Umar Hansa"},{title:'Avoid Overusing fetchpriority="high"',path:"/blog/avoid-overusing-fetchpriority-high",date:"2024-07-04T01:00:00.000Z",author:"Conor McCarthy"},{title:"Blazing Fast Websites with Speculation Rules",path:"/blog/speculation-rules",date:"2024-06-13T01:00:00.000Z",author:"Umar Hansa"},{title:"Fixing Layout Shifts Caused by Web Fonts",path:"/blog/web-font-layout-shift",date:"2024-06-06T01:00:00.000Z",author:"Umar Hansa"},{title:"Test And Visualize Your Website's Render-Blocking Scripts",path:"/blog/visualize-render-blocking-scripts",date:"2024-05-22T01:00:00.000Z",author:"Umar Hansa"},{title:"How Do Chrome Extensions Impact Website Performance In 2024?",path:"/blog/chrome-extensions-website-performance",date:"2024-05-16T01:00:00.000Z",author:"Matt Zeunert"},{title:"Getting Started With scheduler.yield - A Beginner's Guide",path:"/blog/scheduler-yield",date:"2024-04-30T01:00:00.000Z",author:"Umar Hansa"},{title:"How Fast Do Websites Load In 2024?",path:"/blog/page-speed-2024",date:"2024-04-04T01:00:00.000Z",author:"Matt Zeunert"},{title:"How Does The Loading Stage Of A Website Impact INP?",path:"/blog/inp-loading-stage",date:"2024-03-08T02:00:00.000Z",author:"Matt Zeunert"},{title:"The Ultimate Guide To Speed Up A Website",path:"/blog/make-your-website-faster",date:"2024-02-19T02:00:00.000Z",author:"Anna Monus"},{title:"What Does The Page Load Event Measure?",path:"/blog/load-event",date:"2024-01-31T02:00:00.000Z",author:"Matt Zeunert"},{title:"What Different Navigation Types Mean For Page Speed",path:"/blog/navigation-type",date:"2024-01-22T02:00:00.000Z",author:"Matt Zeunert"},{title:"How To Improve INP With Chrome DevTools",path:"/blog/inp-chrome-devtools",date:"2024-01-17T02:00:00.000Z",author:"Matt Zeunert"},{title:"How To Improve Page Speed With 103 Early Hints",path:"/blog/103-early-hints",date:"2024-01-12T02:00:00.000Z",author:"Matt Zeunert"},{title:"How to Set Up Soft Navigation Reporting in a React App",path:"/blog/soft-navigations-react-tutorial",date:"2024-01-10T02:00:00.000Z",author:"Anna Monus"},{title:"How To Fix A Failed Core Web Vitals Assessment",path:"/blog/failed-core-web-vitals-assessment",date:"2024-01-08T02:00:00.000Z",author:"Matt Zeunert"},{title:"2023 In Review: What’s New In Web Performance?",path:"/blog/2023-in-web-performance",date:"2023-12-20T02:00:00.000Z",author:"Matt Zeunert"},{title:"How To Use React Suspense: The Complete Guide",path:"/blog/guide-to-react-suspense",date:"2023-12-15T02:00:00.000Z",author:"Jerry Ejonavi"},{title:"A Guide To Soft Navigations And Core Web Vitals Reporting",path:"/blog/soft-navigations",date:"2023-12-08T02:00:00.000Z",author:"Anna Monus"},{title:"Improve React App Performance With Webpack Bundle Analyzer",path:"/blog/webpack-bundle-analyzer",date:"2023-12-06T02:00:00.000Z",author:"Rose Waitherero Chege"},{title:"Measure LCP Subparts To Improve Largest Contentful Paint",path:"/blog/lcp-subparts",date:"2023-11-29T02:00:00.000Z",author:"Matt Zeunert"},{title:"Measuring Long Animation Frames (LoAFs) In The Browser",path:"/blog/long-animation-frames",date:"2023-11-23T02:00:00.000Z",author:"Matt Zeunert"},{title:"Learn About Page Speed: 12 Example Request Waterfalls",path:"/blog/waterfall-calendar",date:"2023-11-21T02:00:00.000Z",author:"Matt Zeunert"},{title:"Remote Debugging Mobile Websites With Chrome DevTools On Android",path:"/blog/debugging-mobile-websites",date:"2023-11-17T02:00:00.000Z",author:"Keanan Koppenhaver"},{title:"How To Pause Page Loading In Chrome And Inspect Step By Step",path:"/blog/load-website-step-by-step",date:"2023-11-13T
102:00:00.000Z",author:"Matt Zeunert"},{title:"Why We Don’t Report Website Carbon Emissions",path:"/blog/website-carbon-emissions",date:"2023-10-31T02:00:00.000Z",author:"Matt Zeunert"},{title:"Brotli vs. GZIP: Improve Page Speed With HTTP Compression",path:"/blog/http-compression-gzip-brotli",date:"2023-10-23T01:00:00.000Z",author:"Matt Zeunert"},{title:"Packet Level Throttling: Collecting Reliable Page Speed Data",path:"/blog/packet-level-throttling",date:"2023-10-11T01:00:00.000Z",author:"Matt Zeunert"},{title:"Why Optimizing CSS Stylesheets Matters For Page Speed",path:"/blog/css-page-speed",date:"2023-10-09T01:00:00.000Z",author:"Matt Zeunert"},{title:"How To Improve Your Lighthouse SEO Score",path:"/blog/lighthouse-seo-score",date:"2023-09-28T01:00:00.000Z",author:"Matt Zeunert"},{title:"How To Test Page Speed With Google Lighthouse",path:"/blog/lighthouse-page-speed",date:"2023-09-13T01:00:00.000Z",author:"Matt Zeunert"},{title:"How To Use A CDN To Improve Web Performance",path:"/blog/cdn",date:"2023-08-22T01:00:00.000Z",author:"Abdulmalik Salawu"},{title:"What Are Google Page Experience Signals?",path:"/blog/google-page-experience-signals",date:"2023-08-08T01:00:00.000Z",author:"N/A"},{title:"The Ultimate Guide To Responsive Images On The Web",path:"/blog/responsive-images",date:"2023-07-13T01:00:00.000Z",author:"Anna Monus"},{title:"Server Cache vs. Browser Cache: What Front-end Developers Need To Know",path:"/blog/server-cache-browser-cache",date:"2023-06-27T01:00:00.000Z",author:"Daniel Olaogun"},{title:"Understanding Lighthouse Accessibility Audit Reports",path:"/blog/lighthouse-accessibility",date:"2023-06-20T01:00:00.000Z",author:"Daniel Olaogun"},{title:"Async vs. Defer: How To Optimize Script Tags",path:"/blog/async-vs-defer",date:"2023-05-18T01:00:00.000Z",author:"Matt Zeunert"},{title:"Cumulative Layout Shift Differences In Lab And Field Data",path:"/blog/cls-lab-field-differences",date:"2023-05-08T01:00:00.000Z",author:"Matt Zeunert"},{title:"Optimize Request Priorities To Speed Up Your Website",path:"/blog/request-priorities",date:"2023-05-03T01:00:00.000Z",author:"Matt Zeunert"},{title:"Is Reducing Page Weight Important For Website Speed?",path:"/blog/page-weight-website-speed",date:"2023-04-04T01:00:00.000Z",author:"Matt Zeunert"},{title:"Getting Started with React DevTools in Chrome",path:"/blog/react-devtools",date:"2023-03-29T01:00:00.000Z",author:"Piero Borrelli"},{title:"View Site Speed Trends With The CrUX History API",path:"/blog/crux-history-api-node",date:"2023-02-24T02:00:00.000Z",author:"N/A"},{title:"Is Google PageSpeed Insights Reliable?",path:"/blog/is-pagespeed-insights-reliable",date:"2023-02-20T02:00:00.000Z",author:"Matt Zeunert"},{title:"How Server HTTP Connections Work On The Web",path:"/blog/http-server-connections",date:"2023-02-09T02:00:00.000Z",author:"Matt Zeunert"},{title:"How Do Websites Work: A Technical Introduction",path:"/blog/how-websites-work",date:"2023-02-03T02:00:00.000Z",author:"Matt Zeunert"},{title:"2022 In Review: What’s New In Web Performance?",path:"/blog/2022-in-web-performance",date:"2022-12-12T02:00:00.000Z",author:"Matt Zeunert"},{title:"How to Serve Images in Next-Gen Formats: An In-Depth Guide",path:"/blog/image-formats",date:"2022-12-05T02:00:00.000Z",author:"Anna Monus"},{title:"Chrome Local Overrides: Run Core Web Vitals Experiments",path:"/blog/devtools-local-overrides",date:"2022-11-22T02:00:00.000Z",author:"Matt Zeunert"},{title:"What Is CSS @import And Why Can It Slow Down Websites?",path:"/blog/avoid-css-import",date:"2022-11-17T02:00:00.000Z",author:"Matt Zeunert"},{title:"What Does The Back/Forward Cache Mean For Site Speed?",path:"/blog/back-forward-cache",date:"2022-11-09T02:00:00.000Z",author:"Matt Zeunert"},{title:"Google Search Console: How To Use The Core Web Vitals Report",path:"/blog/search-console-core-web-vitals",date:"2022-10-31T02:00:00.000Z",author:"Matt Zeunert"},{title:"The Ultimate Guide To The HTTP/3 And QUIC Protocols",path:"/blog/http3-quic-protocol-guide",date:"2022-10-25T01:00:00.000Z",author:"Anna Monus"},{title:"Optimize Resource Loading: The fetchpriority=high Attribute",path:"/blog/fetchpriority-attribute",date:"2022-10-06T01:00:00.000Z",author:"Matt Zeunert"},{title:"Network Throttling in Chrome DevTools",path:"/blog/chrome-devtools-network-throttling",date:"2022-09-26T01:00:00.000Z",author:"N/A"},{title:"How To Eliminate Render-Blocking Requests (CSS & More)",path:"/blog/render-blocking-resources",date:"2022-08-23T01:00:00.000Z",author:"Matt Zeunert"},{title:"Simulated Throttling In Lighthouse And On PageSpeed Insights",path:"/blog/simulated-throttling",date:"2022-08-08T01:00:00.000Z",author:"Matt Zeunert"},{title:"Why Does Page Speed Matter?",path:"/blog/why-site-speed-matters",date:"2022-08-04T01:00:00.000Z",author:"Justin Ferrell"},{title:"What Cloud Provider Has The Fastest Console Page Speed? Data from GCP, AWS, And Azure",path:"/blog/cloud-console-speed",date:"2022-07-27T01:00:00.000Z",author:"Matt Zeunert"},{title:"Google's Chrome User Experience Report (CrUX): A Detailed Guide",path:"/blog/chrome-user-experience-report",date:"2022-06-20T01:00:00.000Z",author:"Anna Monus"},{title:"How To Select A Device Configuration For Site Speed Tests",path:"/blog/site-speed-device-configuration",date:"2022-06-13T
101:00:00.000Z",author:"N/A"},{title:"Server-Side Rendering (SSR) on the Web",path:"/blog/server-side-rendering",date:"2022-04-25T01:00:00.000Z",author:"Anna Monus"},{title:"PageSpeed Insights vs. Lighthouse: What's the Difference?",path:"/blog/why-is-my-lighthouse-score-different-from-pagespeed-insights",date:"2022-03-23T02:00:00.000Z",author:"Matt Zeunert"},{title:"How CSS Opacity Animations Can Delay The Largest Contentful Paint",path:"/blog/opacity-animation-poor-lcp",date:"2022-03-07T02:00:00.000Z",author:"Matt Zeunert"},{title:"Anti-Flicker Snippets From A/B Testing Tools And Page Speed",path:"/blog/ab-testing-anti-flicker-body-hiding",date:"2022-02-01T02:00:00.000Z",author:"Matt Zeunert"},{title:"How DebugBear Uses DebugBear To Run DebugBear",path:"/blog/dogfooding",date:"2022-01-28T02:00:00.000Z",author:"N/A"},{title:"5 Site Speed Tools for Technical SEOs",path:"/blog/seo-site-speed-tools",date:"2022-01-24T02:00:00.000Z",author:"N/A"},{title:"Working With Web Performance Budgets",path:"/blog/working-with-performance-budgets",date:"2022-01-11T02:00:00.000Z",author:"N/A"},{title:"Core Web Vitals: Which Metric Is The Hardest To Pass?",path:"/blog/hardest-core-web-vitals-metric",date:"2021-12-14T02:00:00.000Z",author:"N/A"},{title:"Measuring User Flow Performance With Lighthouse",path:"/blog/lighthouse-user-flows",date:"2021-11-08T02:00:00.000Z",author:"N/A"},{title:"Recording A User Flow In Chrome DevTools",path:"/blog/chrome-devtools-user-flow-recorder",date:"2021-11-06T02:00:00.000Z",author:"N/A"},{title:"Optimizing Core Web Vitals Without Improving Site Performance",path:"/blog/optimizing-web-vitals-without-improving-performance",date:"2021-10-20T01:00:00.000Z",author:"N/A"},{title:"Blowing Up HTML Size With Responsive Images",path:"/blog/srcset-page-html-size",date:"2021-09-07T01:00:00.000Z",author:"N/A"},{title:"Why Does Lighthouse Lab Data Not Match Field Data?",path:"/blog/lighthouse-lab-data-not-matching-field-data",date:"2021-08-15T01:00:00.000Z",author:"N/A"},{title:"CSP Error Noise Caused by Chrome Extensions",path:"/blog/chrome-extension-csp-error-noise",date:"2021-07-29T01:00:00.000Z",author:"N/A"},{title:"How Do Chrome Extensions Impact Browser Performance?",path:"/blog/chrome-extension-performance-2021",date:"2021-07-05T01:00:00.000Z",author:"Matt Zeunert"},{title:"What's New In Lighthouse 8.0?",path:"/blog/lighthouse-v8",date:"2021-06-04T01:00:00.000Z",author:"N/A"},{title:"HTML Image Lazy Loading: Optimize Page Performance",path:"/blog/image-lazy-loading",date:"2021-04-28T01:00:00.000Z",author:"Matt Zeunert"},{title:"Profile Site Speed With The DevTools Performance Tab",path:"/blog/devtools-performance",date:"2021-04-22T01:00:00.000Z",author:"Matt Zeunert"},{title:"Web Vitals FAQ",path:"/blog/web-vitals-faq",date:"2021-03-22T02:00:00.000Z",author:"N/A"},{title:'Common Problems With rel="preload"',path:"/blog/rel-preload-problems",date:"2021-03-16T02:00:00.000Z",author:"Matt Zeunert"},{title:"Optimizing React Performance By Preventing Unnecessary Re-renders",path:"/blog/react-rerenders",date:"2021-02-12T02:00:00.000Z",author:"Matt Zeunert"},{title:"The Chrome DevTools Network Tab: Debug Page Speed",path:"/blog/devtools-network",date:"2021-01-04T02:00:00.000Z",author:"N/A"},{title:"Why Is The Google Cloud UI So Slow?",path:"/blog/slow-google-cloud-ui",date:"2020-12-09T02:00:00.000Z",author:"Matt Zeunert"},{title:"Website Builder Performance Review",path:"/blog/website-builder-performance-review",date:"2020-11-19T02:00:00.000Z",author:"N/A"},{title:"Creating A Web Performance Team",path:"/blog/web-performance-team",date:"2020-11-10T02:00:00.000Z",author:"Marc Radziwill"},{title:"Reducing Variability In Web Performance Metrics",path:"/blog/web-performance-test-variability",date:"2020-11-05T02:00:00.000Z",author:"N/A"},{title:"Building Custom Lighthouse Audits",path:"/blog/custom-lighthouse-audits",date:"2020-11-02T02:00:00.000Z",author:"N/A"},{title:"How To Debug JavaScript Memory Leaks",path:"/blog/debugging-javascript-memory-leaks",date:"2020-09-14T01:00:00.000Z",author:"Marc Radziwill"},{title:"How To Optimize Front-end JavaScript Performance",path:"/blog/front-end-javascript-performance",date:"2020-09-08T01:00:00.000Z",author:"Marc Radziwill"},{title:"Is The Web Getting Slower?",path:"/blog/is-the-web-getting-slower",date:"2020-08-23T01:00:00.000Z",author:"Matt Zeunert"},{title:"GPT-3 On Web Performance",path:"/blog/gpt-3-on-web-performance",date:"2020-07-30T01:00:00.000Z",author:"N/A"},{title:"Counting Chrome Extensions – Chrome Web Store Statistics",path:"/blog/counting-chrome-extensions",date:"2020-06-29T01:00:00.000Z",author:"N/A"},{title:"2020 Chrome Extension Performance Report",path:"/blog/2020-chrome-extension-performance-report",date:"2020-06-14T01:00:00.000Z",author:"N/A"},{title:"How Many Websites Support The Save-Data Header?",path:"/blog/save-data-ad
1option",date:"2020-03-09T02:00:00.000Z",author:"Matt Zeunert"},{title:"Performant Front-end Architecture",path:"/blog/performant-front-end-architecture",date:"2020-02-10T02:00:00.000Z",author:"Matt Zeunert"},{title:"What's Causing Intermittent gzip Compression?",path:"/blog/intermittent-compression",date:"2020-01-26T02:00:00.000Z",author:"N/A"},{title:"How Does Browser Support Impact JavaScript Bundle Size?",path:"/blog/how-does-browser-support-impact-bundle-size",date:"2019-11-13T02:00:00.000Z",author:"N/A"},{title:"Web Performance Metrics: Lab Data vs Field Data",path:"/blog/web-performance-metrics-lab-vs-rum",date:"2019-09-10T01:00:00.000Z",author:"N/A"},{title:"Lazy Loading Angular Components Without A Router",path:"/blog/lazy-loading-angular-components-without-a-router",date:"2019-09-02T01:00:00.000Z",author:"N/A"},{title:"How Do Different Chat Widgets Impact Site Performance?",path:"/blog/chat-widget-site-performance",date:"2019-07-14T01:00:00.000Z",author:"N/A"},{title:"Browser Resource Hints: preload, prefetch, and preconnect",path:"/blog/resource-hints-rel-preload-prefetch-preconnect",date:"2019-05-12T01:00:00.000Z",author:"Matt Zeunert"},{title:"Measuring When Images Are Displayed With The Element Timing API",path:"/blog/image-element-timing",date:"2019-04-28T01:00:00.000Z",author:"N/A"},{title:"The User Timing API: Custom Front-end Performance Metrics",path:"/blog/user-timing-api",date:"2019-03-31T02:00:00.000Z",author:"Matt Zeunert"},{title:"How Different Network Throttling Methods Impact Page Speed Scores",path:"/blog/network-throttling-methods",date:"2019-03-13T02:00:00.000Z",author:"Matt Zeunert"},{title:"Bundle Splitting Components With Webpack and React",path:"/blog/bundle-splitting-components-with-webpack-and-react",date:"2019-01-15T02:00:00.000Z",author:"N/A"},{title:"Measuring The Performance Impact Of Chrome Extensions",path:"/blog/measuring-the-performance-impact-of-chrome-extensions",date:"2018-12-05T02:00:00.000Z",author:"N/A"},{title:"Optimizing JavaScript Bundle Size",path:"/blog/reducing-javascript-bundle-size",date:"2018-10-22T01:00:00.000Z",author:"Matt Zeunert"}].map(e=>({...e,type:"blog"})),he=[{title:"The Best Uptime Monitoring Tools For 2026",path:"/software/best-uptime-monitoring-tools",date:"2026-07-26T01:00:00.000Z",author:"Matt Zeunert"},{title:"Best Digital Experience Monitoring Solutions: A 2026 Guide",path:"/software/digital-experience-monitoring-tools",date:"2026-05-12T01:00:00.000Z",author:"Matt Zeunert"},{title:"The 9 Best Synthetic Monitoring Tools Reviewed For 2026",path:"/software/best-synthetic-monitoring-tools",date:"2026-01-27T02:00:00.000Z",author:"Umar Hansa"},{title:"Best SEO Testing And Monitoring Tools In 2026",path:"/software/best-seo-monitoring-tools",date:"2026-01-17T02:00:00.000Z",author:"Matt Zeunert"},{title:"6 Best Splunk Alternatives In 2026",path:"/software/splunk-alternatives",date:"2026-01-11T02:00:00.000Z",author:"Matt Zeunert"},{title:"How To Set Up Splunk Real User Monitoring",path:"/software/splunk-real-user-monitoring",date:"2026-01-10T02:00:00.000Z",author:"Matt Zeunert"},{title:"Top 5 Alternatives To Uptrends In 2026",path:"/software/uptrends-alternatives",date:"2026-01-03T02:00:00.000Z",author:"Matt Zeunert"},{title:"How To Set Up Splunk Synthetic Monitoring",path:"/software/splunk-synthetic-monitoring",date:"2026-01-01T02:00:00.000Z",author:"Matt Zeunert"},{title:"The Uptrends Website Speed Test: Measure Global Performance",path:"/software/uptrends-website-speed-test",date:"2025-12-20T02:00:00.000Z",author:"Matt Zeunert"},{title:"GTmetrix vs. PageSpeed Insights and WebPageTest: A Comparison",path:"/software/gtmetrix-vs-pagespeed-insights-vs-webpagetest",date:"2025-12-19T02:00:00.000Z",author:"Matt Zeunert"},{title:"A Guide To Dynatrace Real User Monitoring (RUM)",path:"/software/dynatrace-real-user-monitoring",date:"2025-12-18T02:00:00.000Z",author:"Matt Zeunert"},{title:"Frontend Observability Tools: Stay On Top Of User Experience",path:"/software/frontend-observability-tools",date:"2025-12-14T02:00:00.000Z",author:"Matt Zeunert"},{title:"A Guide To Dynatrace Synthetic Monitoring",path:"/software/dynatrace-synthetic-monitoring",date:"2025-12-13T02:00:00.000Z",author:"Matt Zeunert"},{title:"Best YSlow Alternatives: Modern Page Speed Testing Tools",path:"/software/yslow-alternatives",date:"2025-12-12T02:00:00.000Z",author:"Matt Zeunert"},{title:"Use Cookie-Free Domains To Avoid Unnecessary Network Traffic",path:"/software/use-cookie-free-domains",date:"2025-12-11T02:00:00.000Z",author:"Matt Zeunert"},{title:"6 Best Alternatives to Sentry In 2026",path:"/software/best-sentry-alternatives",date:"2025-12-07T02:00:00.000Z",author:"Matt Zeunert"},{title:"8 Best Website Monitoring Tools In 2026",path:"/software/best-website-monitoring-tools",date:"2025-10-27T02:00:00.000Z",author:"Matt Zeunert"},{title:"Optimizing Images For SEO: All You Need To Know",path:"/software/image-optimization-seo",date:"2025-09-14T01:00:00.000Z",author:"Guy Parsons"},{title:"Lighthouse Test Automation: How To Continuously Monitor Site Speed",path:"/software/lighthouse
1-automation",date:"2025-08-26T01:00:00.000Z",author:"Guy Parsons"},{title:"How to Use Google Search Console Tools: A Tutorial",path:"/software/google-search-console-guide",date:"2025-08-19T01:00:00.000Z",author:"Guy Parsons"},{title:"Unlighthouse: Scan And Audit All Pages Of Your Website",path:"/software/unlighthouse-website-scan",date:"2025-08-11T01:00:00.000Z",author:"Matt Zeunert"},{title:"The GTmetrix Grade: What It Means And How To Improve It",path:"/software/gtmetrix-grade",date:"2025-07-30T01:00:00.000Z",author:"Matt Zeunert"},{title:"The GTmetrix Speed Test Tool: A Detailed Guide",path:"/software/gtmetrix-speed-test",date:"2025-07-28T01:00:00.000Z",author:"Guy Parsons"},{title:"9 Core Web Vitals Tools For Monitoring Page Speed",path:"/software/core-web-vitals-monitoring-tools",date:"2025-07-24T01:00:00.000Z",author:"Guy Parsons"},{title:"Google's CrUX Dashboard and Best Alternatives for Core Web Vitals Monitoring",path:"/software/crux-dashboard-alternatives",date:"2025-07-11T01:00:00.000Z",author:"Guy Parsons"},{title:"Digital Experience Monitoring (DEM) Explained + Tools To Use",path:"/software/digital-experience-monitoring",date:"2025-06-25T01:00:00.000Z",author:"Guy Parsons"},{title:"Online Image Compression Tools: Optimizilla vs. Squoosh",path:"/software/online-image-optimization-tools",date:"2025-04-03T01:00:00.000Z",author:"Conor McCarthy"},{title:"Web Application Monitoring Tools: A Guide",path:"/software/web-application-monitoring",date:"2025-03-10T02:00:00.000Z",author:"Matt Zeunert"},{title:"WebPageTest: A Guide To Web Performance Testing",path:"/software/webpagetest",date:"2025-03-08T02:00:00.000Z",author:"Matt Zeunert"},{title:"The Pingdom Speed Test Tool: A Detailed Guide",path:"/software/pingdom-speed-test",date:"2025-03-04T02:00:00.000Z",author:"Matt Zeunert"},{title:"Best GTmetrix Alternatives In 2026: A Comparison",path:"/software/gtmetrix-alternatives",date:"2025-03-03T02:00:00.000Z",author:"Matt Zeunert"},{title:"How To Conduct A Website Health Check",path:"/software/website-health-check",date:"2025-03-02T02:00:00.000Z",author:"Matt Zeunert"},{title:"Top 6 Dynatrace Alternatives In 2025",path:"/software/dynatrace-alternatives",date:"2025-03-01T02:00:00.000Z",author:"Matt Zeunert"},{title:"Top 7 Pingdom Alternatives In 2026",path:"/software/pingdom-alternatives",date:"2025-02-08T02:00:00.000Z",author:"Matt Zeunert"},{title:"How To Find The Best WordPress Speed Optimization Services",path:"/software/wordpress-speed-optimization-services",date:"2025-02-05T02:00:00.000Z",author:"Anna Monus"},{title:"A Guide To Core Web Vitals Reporting In SEMrush",path:"/software/semrush-core-web-vitals",date:"2025-02-04T02:00:00.000Z",author:"Matt Zeunert"},{title:"How To Test Performance And Core Web Vitals In Ahrefs",path:"/software/ahrefs-core-web-vitals",date:"2025-01-28T02:00:00.000Z",author:"Matt Zeunert"},{title:"Alternatives To Google's Deprecated Web Vitals Chrome Extension",path:"/software/google-web-vitals-extension-alternatives",date:"2025-01-20T02:00:00.000Z",author:"Matt Zeunert"},{title:"11 Best Website Optimization Tools: SEO And Performance",path:"/software/website-optimization-tools",date:"2025-01-19T02:00:00.000Z",author:"Matt Zeunert"},{title:"Top 10 Website Performance Monitoring Tools In 2026",path:"/software/best-website-performance-monitoring-tools",date:"2025-01-15T02:00:00.000Z",author:"Matt Zeunert"},{title:"Best Real User Monitoring Tools: A 2026 Comparison",path:"/software/best-real-user-monitoring-tools",date:"2025-01-08T02:00:00.000Z",author:"Umar Hansa"},{title:"How To View Page Speed And Core Web Vitals Data In Moz",path:"/software/moz-core-web-vitals",date:"2024-08-04T01:00:00.000Z",author:"Matt Zeunert"}].map(e=>("/software/best-synthetic-monitoring-tools"===e.path&&(e.date="2024-11-05T00:00:00.000Z"),"/software/best-real-user-monitoring-tools"===e.path&&(e.date="2024-11-01T00:00:00.000Z"),"/software/best-website-performance-monitoring-tools"===e.path&&(e.date="2024-08-27T00:00:00.000Z"),{...e,type:"software"})),me=[{title:"WebPageTest alternative",path:"/webpagetest-alternative",date:"2024-01-06T00:00:00.000Z"},{title:"GTmetrix alternative",path:"/gtmetrix-alternative",date:"2021-10-18T00:00:00.000Z"},{title:"SpeedCurve alternative",path:"/speedcurve-alternative",date:"2023-04-27T00:00:00.000Z"},{title:"Pingdom alternative",path:"/pingdom-alternative",date:"2000-01-01T00:00:00.000Z"},{title:"Dareboost alternative",path:"/dareboost-alternative",date:"2000-01-01T00:00:00.000Z"},{title:"PSI alternative",path:"/pagespeed-insights-alternative",date:"2022-10-31T00:00:00.000Z"},{title:"New Relic Alternative",path:"/newrelic-alternative",date:"2024-01-18T00:00:00.000Z"},{title:"Sentry Alternative",path:"/sentry-alternative",date:"2024-0
17-03T00:00:00.000Z"},{title:"Lighthouse Alternative",path:"/lighthouse-alternative",date:"2024-07-03T00:00:00.000Z"},{title:"Uptrends Alternative",path:"/uptrends-alternative",date:"2024-08-03T00:00:00.000Z"},{title:"Raygun Alternative",path:"/raygun-alternative",date:"2024-08-16T00:00:00.000Z"},{title:"Calibre Analytics Alternative",path:"/calibreapp-alternative",date:"2024-08-16T00:00:00.000Z"},{title:"Request Metrics Alternative",path:"/request-metrics-alternative",date:"2024-08-03T00:00:00.000Z"},{title:"Site24x7 Alternative",path:"/site24x7-alternative",date:"2024-08-06T00:00:00.000Z"},{title:"Splunk Rigor Alternative",path:"/splunk-rigor-alternative",date:"2025-10-06T00:00:00.000Z"}].map(e=>({...e,type:"alternative"})),pe=[{title:"Interaction to Next Paint",path:"/docs/metrics/interaction-to-next-paint",date:"2022-05-09T00:00:00.000Z"},{title:"Largest Contentful Paint",path:"/docs/metrics/largest-contentful-paint",date:"2020-11-11T00:00:00.000Z"},{title:"First Contentful Paint",path:"/docs/metrics/first-contentful-paint",date:"2020-07-04T00:00:00.000Z"},{title:"Core Web Vitals",path:"/docs/metrics/core-web-vitals",date:"2020-11-11T00:00:00.000Z"},{title:"Cumulative Layout Shift",path:"/docs/metrics/cumulative-layout-shift",date:"2020-09-13T00:00:00.000Z"},{title:"Page Load Time",path:"/docs/page-load-time",date:"2023-01-10T00:00:00.000Z"},{title:"TTFB",path:"/docs/metrics/time-to-first-byte",date:"2020-07-08T00:00:00.000Z"},{title:"Measure And Optimize Time to Interactive (TTI)",path:"/docs/metrics/time-to-interactive",date:"2000-01-01T00:00:00.000Z"},{title:"Visually Complete",path:"/docs/metrics/visually-complete",date:"2000-01-01T00:00:00.000Z"},{title:"Measure And Optimize Speed Index",path:"/docs/metrics/speed-index",date:"2000-01-01T00:00:00.000Z"},{title:"Measure And Optimize First Input Delay (FID)",path:"/docs/metrics/first-input-delay",date:"2000-01-01T00:00:00.000Z"}].map(e=>({...e,type:"metrics"})),ge=[{title:"CSS Size Analyzer",path:"/css-size-analyzer",date:"2023-09-28T00:00:00.000Z"},{title:"HTML Size Analyzer",path:"/html-size-analyzer",date:"2021-10-09T00:00:00.000Z"},{title:"Basic Auth Header Generator",path:"/basic-auth-header-generator",date:"2021-02-08T00:00:00.000Z"},{title:"Random Page Tool",path:"/random-page-on-website",date:"2024-01-15T00:00:00.000Z"},{title:"JSON Size Analyzer",path:"/json-size-analyzer",date:"2019-07-16T00:00:00.000Z"},{title:"Website Speed Test",path:"/test/website-speed",date:"2022-10-12T00:00:00.000Z"},{title:"INP Debugger",path:"/inp-debugger",date:"2022-08-28T00:00:00.000Z"},{title:"Core Web Vitals Test",path:"/test/core-web-vitals",date:"2023-01-13T00:00:00.000Z"},{title:"Wordpress Speed Test",path:"/test/wordpress-speed",date:"2025-01-08T00:00:00.000Z"},{title:"Page Size Checker",path:"/test/page-size-checker",date:"2025-01-21T00:00:00.000Z"},{title:"Website Grader And Quality Checker",path:"/test/website-grader",date:"2025-01-23T00:00:00.000Z"},{title:"TTFB Test",path:"/test/ttfb",date:"2025-01-18T00:00:00.000Z"},{title:"CDN Performance Test",path:"/test/cdn-performance",date:"2025-01-18T00:00:00.000Z"},{title:"Website Cache Checker",path:"/test/website-cache-checker",date:"2025-06-07T00:00:00.000Z"},{title:"Noscript Test",path:"/test/noscript",date:"2025-01-18T00:00:00.000Z"},{title:"Resource Hint Validator",path:"/resource-hint-validator",date:"2022-02-22T00:00:00.000Z"},{title:"Har File Analyzer",path:"/har-file-analyzer",date:"2025-05-06T00:00:00.000Z"},{title:"PNG to WebP Converter",path:"/convert/png-to-webp",date:"2026-01-25T00:00:00.000Z"},{title:"WebP to PNG Converter",path:"/convert/webp-to-png",date:"2026-01-25T00:00:00.000Z"},{title:"JPEG to WebP Converter",path:"/convert/jpeg-to-webp",date:"2026-04-17T00:00:00.000Z"},{title:"WebP to JPEG Converter",path:"/convert/webp-to-jpeg",date:"2026-04-17T00:00:00.000Z"},{title:"HTTP Status Checker",path:"/http-status-checker",date:"2025-09-22T00:00:00.000Z"},{title:"Redirect Checker",path:"/redirect-checker",date:"2026-09-17T00:00:00.000Z"},{title:"CLS Test",path:"/test/cls",date:"2026-04-18T00:00:00.000Z"},{title:"HTTP Header Checker",path:"/http-header-checker",date:"2025-09-03T00:00:00.000Z"},{title:"Website Analysis Tool",path:"/test/website-analysis-tool",date:"2025-09-03T00:00:00.000Z"},{title:"Website SEO Checker",path:"/website-seo-checker",date:"2025-09-19T00:00:00.000Z"},{title:"Open Graph Checker",path:"/open-graph-checker",date:"2025-11-27T00:00:00.000Z"},{title:"Website Down Checker",path:"/test/website-down-checker",date:"2025-11-27T00:00:00.000Z"},{title:"JavaScript Minifier",path:"/tool/minify-js",date:"2026-01-04T00:00:00.000Z"},{title:"HTML Minifier",path:"/tool/minify-html",date:"2026-01-04T00:00:00.000Z"},{title:"CSS Minifier",path:"/tool/minify-css",date:"2026-01-04T00:00:00.000Z"},{title:"JSON Minifier",path:"/tool/minify-json",date:"2026-01-04T00:00:00.000Z"},{title:"JavaScript Beautifier",path:"/tool/beautify-js",date:"2026-01-04T00:00:00.000Z"},{title:"HTML Beautifier",path:"/tool/beautify-html",date:"2026-01-04T00:00:00.000Z"},{title:"CSS Beautifier",path:"/tool/beautify-css",date:"2026-01-04T00:00:00.000Z"},{title:"JSON Beautifier",path:"/tool/beautify-json",date:"2026-01-04T00:00:00.000Z"},{title:"Website Bottleneck Finder",path:"/website-bottleneck-finder",date:"2026-07-17T00:00:00.000Z"}].map(e=>({...e,type:"tool"})),be=[{title:"Minimize Main Thread Work",path:"/docs/performance/minimize-main-thread-work",date:"2000-01-01T00:00:00.000Z"},{title:"Are CWV ranking factor",path:"/docs/core-web-vitals-ranking-factor",date:"2022-11-28T00:00:00.000Z"},{title:"Waterfall",path:"/docs/waterfall",date:"2000-01-01T00:00:00.000Z"},{title:"Web Performance Metrics",path:"/docs/web-performance-metrics",date:"2000-09-03T00:00:00.000Z"},{title:"What Is Real User Monitoring?",path:"/docs/what-is-real-user-monitoring",date:"2024-06-12T00:00:00.000Z"},{title:"Frontend Performance Monitoring",path:"/docs/frontend-performance-monitoring",date:"2024-10-21T00:00:00.000Z"},{title:"Synthetic Website Monitoring",path:"/docs/synthetic-website-monitoring",date:"2024-10-22T00:00:00.000Z"},{title:"Benchmark Website Performance",path:"/docs/benchmark-website-performance",date:"2025-01-10T00:00:00.000Z"},{title:"Cache Hit Rate",path:"/docs/metrics/cache-hit-rate",date:"2024-11-04T00:00:00.000Z"},{title:"Core Web Vitals Metrics And Thresholds",path:"/docs/core-web-vitals-metrics",date:"2024-11-05T00:00:00.000Z"},{title:"How To Fix LCP For Text Elements And H1 Headings",path:"/docs/largest-contentful-paint-text-h1",date:"2024-11-17T00:00:00.000Z"},{title:"How To Fix LCP Issues In Google Search Console",path:"/docs/fix-lcp-issue",date:"2024-11-18T00:00:00.000Z"},{title:"How To Fix CLS Issues",path:"/docs/fix-cls-issues",date:"2024-11-18T00:00:00.000Z"},{title:"Page Speed And SEO",path:"/docs/page-speed-seo",date:"2025-01-22T00:00:00.000Z"},{title:"How To Optimize Single Page Applications For SEO",path:"/docs/single-page-application-seo",date:"2025-07-20T00:00:00.000Z"},{title:"How To Fix INP Issues With Real User Data",path:"/docs/rum/fix-inp-issues",date:"2025-01-26T00:00:00.000Z"},{title:"How To Check Site Speed From Multiple Locations",path:"/docs/check-site-speed-from-multiple-locations",date:"2025-02-01T00:00:00.000Z"},{title:"How To Measure And Reduce Script Evaluation Time",path:"/docs/script-evaluation",date:"2025-02-01T00:00:00.000Z"},{title:"Cloudflare caching",path:"/docs/cloudflare-caching",date:"2024-12-10T00:00:00.000Z"},{title:"Wordpress caching",path:"/docs/wordpress-caching",date:"2024-12-09T00:00:00.000Z"},{title:"Link Rel Preload",path:"/docs/link-rel-preload",date:"2025-02-05T00:00:00.000Z"},{title:"Link Rel Preconnect",path:"/docs/link-rel-preconnect",date:"2025-02-05T00:00:00.000Z"},{title:"Link Rel Prefetch",path:"/docs/link-rel-prefetch",date:"2025-02-15T00:00:00.000Z"},{title:"Preload CSS",path:"/docs/preload-css",date:"2025-02-05T00:00:00.000Z"}
1,{title:"Lighthouse Treemap",path:"/docs/lighthouse-treemap",date:"2025-02-06T00:00:00.000Z"},{title:"A Late Network Request Adjusted The Page Layout",path:"/docs/late-network-request-adjusted-page-layout",date:"2025-02-08T00:00:00.000Z"},{title:"How To Fix Media Element Lacking An Explicit Size",path:"/docs/media-element-lacking-an-explicit-size",date:"2025-02-08T00:00:00.000Z"},{title:"Largest Contentful Paint Element",path:"/docs/largest-contentful-paint-element",date:"2025-02-09T00:00:00.000Z"},{title:"LCP Resource Types",path:"/docs/lcp-resource-types",date:"2025-02-12T00:00:00.000Z"},{title:"DevTools Device Simulation",path:"/docs/chrome-devtools-device-mode",date:"2025-02-16T00:00:00.000Z"},{title:"Net Internals",path:"/docs/net-internals",date:"2025-02-16T00:00:00.000Z"},{title:"Request Initiator Chains In Chrome DevTools",path:"/docs/request-initiator-chain",date:"2025-02-17T00:00:00.000Z"},{title:"How To Fix Largest Contentful Paint Image Was Lazily Loaded",path:"/docs/lcp-lazily-loaded",date:"2025-02-19T00:00:00.000Z"},{title:"Client Side Rendering",path:"/docs/client-side-rendering",date:"2025-02-19T00:00:00.000Z"},{title:"How To Defer JavaScript On Your Website",path:"/docs/how-to-defer-javascript-on-your-website",date:"2025-02-20T00:00:00.000Z"},{title:"Waiting For Server Response Too Long In Chrome DevTools",path:"/docs/waiting-for-server-response",date:"2025-02-22T00:00:00.000Z"},{title:"Fix Image Elements Do Not Have Explicit Width And Height",path:"/docs/image-elements-do-not-have-explicit-width-and-height",date:"2025-03-01T00:00:00.000Z"},{title:"A Guide to HTTP Cache Control Headers",path:"/docs/http-cache-control-header",date:"2025-03-10T00:00:00.000Z"},{title:"Reduce Rage Clicks By Making Your Website More Responsive",path:"/docs/rage-clicks",date:"2025-03-15T00:00:00.000Z"},{title:"Image Sizing: Intrinsic vs. Rendered Size",path:"/docs/intrinsic-vs-rendered-size",date:"2025-03-20T00:00:00.000Z"},{title:"Cloudflare's cf-cache-status header explained",path:"/docs/cf-cache-status",date:"2025-03-20T00:00:00.000Z"},{title:"Add Expires Headers For Better Page Speed",path:"/docs/expires-headers",date:"2025-04-27T00:00:00.000Z"},{title:"LCP by phase",path:"/docs/lcp-by-phase",date:"2025-05-01T00:00:00.000Z"},{title:"Client side vs server side",path:"/docs/client-vs-server-side",date:"2025-05-02T00:00:00.000Z"},{title:"Stale-While-Revalidate",path:"/docs/stale-while-revalidate",date:"2025-08-28T00:00:00.000Z"},{title:"What are HTTP headers?",path:"/docs/http-headers",date:"2025-10-27T00:00:00.000Z"},{title:"Synthetic transactions monitoring",path:"/docs/synthetic-transaction-monitoring",date:"2025-11-29T00:00:00.000Z"},{title:"Percentiles",path:"/docs/rum/percentiles",date:"2023-07-07T00:00:00.000Z"},{title:"Lighthouse: Accessibility tree is not well-formed",path:"/docs/agentic-browsing/accessibility-tree-is-not-well-formed",date:"2026-05-29T00:00:00.000Z"},{title:"Lighthouse: llms.txt does not follow recommendations",path:"/docs/agentic-browsing/llms-txt-does-not-follow-recommendations",date:"2026-05-29T00:00:00.000Z"},{title:"Website Uptime Monitoring: A Guide",path:"/docs/website-uptime-monitoring",date:"2026-08-31T00:00:00.000Z"},...[{title:"Lighthouse Monitoring",path:"/lighthouse",date:"2019-07-17T00:00:00.000Z"},{title:"Page Speed Monitoring",path:"/page-speed-monitoring",date:"2023-01-23T00:00:00.000Z"},{title:"Website Performance Monitoring",path:"/website-performance-monitoring",date:"2020-07-14T00:00:00.000Z"},{title:"Synthetic Website Monitoring",path:"/synthetic-website-monitoring",date:"2022-01-18T00:00:00.000Z"},{title:"Real User Monitoring",path:"/real-user-monitoring",date:"2023-05-13T00:00:00.000Z"},{title:"Website Uptime Monitoring",path:"/uptime-monitoring",date:"2026-08-04T00:00:00.000Z"},{title:"Core Web Vitals Monitoring",path:"/core-web-vitals-monitoring",date:"2022-01-11T00:00:00.000Z"},{title:"Browser End User Monitoring",path:"/browser-end-user-monitoring",date:"2024-01-18T00:00:00.000Z"},{title:"Google CrUX Monitoring",path:"/google-crux-monitoring",date:"2024-08-24T00:00:00.000Z"},{title:"Wordpress Performance Monitoring",path:"/wordpress-performance-monitoring",date:"2024-10-14T00:00:00.000Z"},{title:"Drupal Performance Monitoring",path:"/drupal-performance-monitoring",date:"2024-10-16T00:00:00.000Z"},{title:"Joomla Performance Monitoring",path:"/joomla-performance-monitoring",date:"2024-10-16T00:00:00.000Z"},{title:"Mobile Website Monitoring",path:"/mobile-website-monitoring",date:"2024-10-21T00:00:00.000Z"},{title:"User Experience Monitoring",path:"/user-experience-monitoring",date:"2026-02-01T00:00:00.000Z"},{title:"Global Website Monitoring",path:"/global-website-monitoring",date:"2026-02-05T00:00:00.000Z"},{title:"Digital Experience Monitoring",path:"/digital-experience-monitoring",date:"2026-04-19T00:00:00.000Z"}].map(e=>({...e,type:"landing"})),...ge,...pe,...ue,...he,...me],fe={"/blog/cloudflare-speed-brain":"S","/blog/defer-offscreen-images":"M","/blog/javascript-hydration":"XS","/blog/lcp-lab-field-differences":"XS","/blog/optimize-video-lcp":"S","/blog/http1-vs-http2":"S","/blog/crux-vs-rum":"XS","/blog/website-font-performance":"L","/software/best-website-performance-monitoring-tools":"XS","/google-crux-monitoring":"XS","/blog/core-web-vitals-js":"M","/blog/reduce-unused-javascript":"S","/raygun-alternative":"XXS","/calibreapp-alternative":"XXS","/blog/fix-web-performance-devtools":"M","/blog/minify-javascript-css":"XS","/site24x7-alternative":"XXS","/blog/pagespeed-insights-api":"M","/software/moz-core-web-vitals":"XS","/uptrends-alternative":"XXS","/request-metrics-alternative":"XXS","/blog/content-rerenders-largest-contentful-paint":"M","/blog/inp-misconceptions":"M","/blog/inp-element-interactions":"M","/blog/chrome-extension-statistics":"S","/blog/inp-attribution-data-missing":"XS","/blog/synthetic-vs-rum":"M","/blog/types-of-monitoring":"M","/blog/avoid-overusing-fetchpriority-high":"S","/blog/excessive-dom-size":"S","/sentry-alternative":"XXS","/lighthouse
1-alternative":"XXS","/blog/speculation-rules":"L","/docs/what-is-real-user-monitoring":"S","/blog/web-font-layout-shift":"M","/blog/visualize-render-blocking-scripts":"M","/blog/chrome-extensions-website-performance":"L","/blog/scheduler-yield":"L","/blog/page-speed-2024":"S","/blog/inp-loading-stage":"XS","/blog/make-your-website-faster":"M","/blog/load-event":"XS","/blog/navigation-type":"XS","/browser-end-user-monitoring":"XXS","/newrelic-alternative":"XXS","/blog/inp-chrome-devtools":"XS","/random-page-on-website":"M","/blog/103-early-hints":"S","/webpagetest-alternative":"XXS","/blog/2023-in-web-performance":"S","/blog/guide-to-react-suspense":"M","/blog/soft-navigations":"M","/blog/lcp-subparts":"XS","/blog/css-page-speed":"S","/blog/packet-level-throttling":"S","/blog/http-compression-gzip-brotli":"XS","/blog/website-carbon-emissions":"L","/blog/load-website-step-by-step":"S","/blog/debugging-mobile-websites":"M","/blog/waterfall-calendar":"XS","/blog/long-animation-frames":"XS","/blog/webpack-bundle-analyzer":"S","/blog/failed-core-web-vitals-assessment":"XS","/blog/soft-navigations-react-tutorial":"XS","/docs/web-performance-metrics":"S","/blog/measuring-the-performance-impact-of-chrome-extensions":"M","/blog/network-throttling-methods":"S","/blog/user-timing-api":"XS","/docs/metrics/core-web-vitals-ranking-factor":"XS","/page-speed-monitoring":"XXS","/real-user-monitoring":"XS","/css-size-analyzer":"M","/test/website-speed":"L","/test/core-web-vitals":"S","/blog/lighthouse-seo-score":"XS","/blog/lighthouse-page-speed":"XS","/blog/cdn":"L","/blog/google-page-experience-signals":"XS","/blog/responsive-images":"L","/blog/server-cache-browser-cache":"M","/blog/lighthouse-accessibility":"S","/blog/async-vs-defer":"XS","/blog/cls-lab-field-differences":"XS","/blog/request-priorities":"XS","/blog/is-pagespeed-insights-reliable":"XS","/blog/search-console-core-web-vitals":"XS","/blog/react-devtools":"M","/blog/avoid-css-import":"XS","/blog/http3-quic-protocol-guide":"L","/blog/fetchpriority-attribute":"XS","/blog/page-weight-website-speed":"XS","/blog/back-forward-cache":"XS","/blog/http-server-connections":"S","/blog/devtools-local-overrides":"XS","/blog/how-websites-work":"S","/blog/crux-history-api-node":"XS","/blog/image-formats":"L","/blog/2022-in-web-performance":"S","/inp-debugger":"L","/blog/chrome-devtools-network-throttling":"S","/blog/render-blocking-resources":"S","/blog/simulated-throttling":"S","/blog/why-site-speed-matters":"S","/blog/cloud-console-speed":"M","/blog/chrome-user-experience-report":"M","/blog/site-speed-device-configuration":"S","/docs/metrics/interaction-to-next-paint":"M","/blog/server-side-rendering":"M","/blog/opacity-animation-poor-lcp":"S","/resource-hint-validator":"M","/blog/ab-testing-anti-flicker-body-hiding":"S","/blog/dogfooding":"XS","/blog/seo-site-speed-tools":"XS","/synthetic-website-monitoring":"XXS","/core-web-vitals-monitoring":"XXS","/blog/working-with-performance-budgets":"S","/blog/hardest-core-web-vitals-metric":"XS","/blog/lighthouse-user-flows":"XS","/blog/chrome-devtools-user-flow-recorder":"XS","/blog/optimizing-web-vitals-without-improving-performance":"XS","/html-size-analyzer":"M","/blog/srcset-page-html-size":"S","/blog/lighthouse-lab-data-not-matching-field-data":"S","/blog/chrome-extension-csp-error-noise":"XS","/blog/chrome-extension-performance-2021":"L","/blog/lighthouse-v8":"XS","/blog/image-lazy-loading":"S","/blog/web-vitals-faq":"XS","/blog/devtools-performance":"M","/blog/rel-preload-problems":"S","/blog/react-rerenders":"S","/blog/devtools-network":"M","/blog/slow-google-cloud-ui":"M","/blog/website-builder-performance-review":"L","/docs/metrics/largest-contentful-paint":"L","/docs/metrics/core-web-vitals":"L","/blog/web-performance-team":"M","/docs/metrics/time-to-first-byte":"L","/blog/custom-lighthouse-audits":"S","/blog/web-performance-test-variability":"S","/blog/debugging-javascript-memory-leaks":"M","/docs/metrics/cumulative-layout-shift":"L","/blog/front-end-javascript-performance":"L","/blog/is-the-web-getting-slower":"M","/blog/gpt-3-on-web-performance":"S","/website-performance-monitoring":"XXS","/docs/metrics/first-contentful-paint":"S","/blog/counting-chrome-extensions":"S","/blog/2020-chrome-extension-performance-report":"L","/blog/save-data-ad
1option":"XS","/blog/performant-front-end-architecture":"L","/blog/intermittent-compression":"XS","/pagespeed-insights-alternative":"XXS","/dareboost-alternative":"XXS","/pingdom-alternative":"XXS","/speedcurve-alternative":"XXS","/gtmetrix-alternative":"XXS","/blog/reducing-javascript-bundle-size":"S","/docs/performance/minimize-main-thread-work":"M","/docs/waterfall":"M","/docs/page-load-time":"M","/blog/bundle-splitting-components-with-webpack-and-react":"S","/blog/image-element-timing":"XS","/blog/chat-widget-site-performance":"M","/blog/measuring-react-app-performance":"M","/json-size-analyzer":"M","/lighthouse":"XXS","/blog/how-does-browser-support-impact-bundle-size":"S","/blog/web-performance-metrics-lab-vs-rum":"S","/blog/lazy-loading-angular-components-without-a-router":"S","/blog/why-is-my-lighthouse-score-different-from-pagespeed-insights":"S","/blog/resource-hints-rel-preload-prefetch-preconnect":"S"};function ve(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,o,l=[],s=!0,d=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){d=!0,a=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw a}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ye(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ye(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ye(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function xe(e){const t=e.match(/[?&]utm_campaign=([^&]*)/);return t?decodeURIComponent(t[1]):e.includes("msclkid=")?"msclkid":e.includes("gclid=")?"gclid":""}function je(e){var t,r,a;let i=e.billingCustomers;const o=ve(n.useState("-date"),2),l=o[0],s=o[1],d=ve(n.useState(!1),2),c=d[0],u=d[1],h=new Date(1990,0,1),m=new Date(2050,0,1),p=ve(n.useState(h),2),g=p[0],b=p[1],f=ve(n.useState(m),2),v=f[0],y=f[1],x=ve(n.useState(!1),2),w=x[0],S=x[1],C=ve(n.useState(!1),2),A=C[0],Z=C[1],P=ve(n.useState(!1),2),N=P[0],I=P[1],D=ve(n.useState(!1),2),O=D[0],R=D[1],F=ve(n.useState(!1),2),L=F[0],B=F[1],H=ve(n.useState(!1),2),U=H[0],z=H[1],G=ve(n.useState(""),2),$=G[0],X=G[1],_=ve(n.useState(""),2),J=_[0],Y=_[1],K=ve(n.useState(!1),2),Q=K[0],ee=K[1],te=ve(n.useState(!1),2),re=te[0],ne=te[1],ae=ve(n.useState(0),2),ie=ae[0],oe=ae[1],ue=ve(n.useState("trials"),2),he=ue[0],me=ue[1],pe=ve(n.useState("landingPage"),2),ge=pe[0],ye=pe[1],je=we({billingCustomers:i,lpTableHighLevel:!1,lpTableIgnoreQueryParams:!0,lpTableQuery:!1}),Se=ve(n.useState(null),2),Te=Se[0],Ce=Se[1];n.useEffect(()=>{M.FH.getExternalAnalytics().then(Ce)},[]);let Ae={};null!=Te&&Te.gsc3mo&&Object.entries((0,q.groupBy)(Te.gsc3mo.data,e=>(e.url||"").split("#")[0].split("?")[0])).filter(e=>""!==ve(e,1)[0]).forEach(e=>{let t=ve(e,2),r=t[0],n=t[1];const a=(0,q.sortBy)(n,e=>-e.impressions)[0];Ae[new URL(r).pathname]={impressions:(0,q.sum)(n.map(e=>e.imp2)),clicks:(0,q.sum)(n.map(e=>e.clicks2)),impressionsBefore:(0,q.sum)(n.map(e=>e.imp1)),clicksBefore:(0,q.sum)(n.map(e=>e.clicks1)),rank:a.avgpos2,rankBefore:a.avgpos1}}),console.log({externalAnalytics:Te});const ke=(0,q.keyBy)((null==Te||null===(t=Te.plausible12mo)||void 0===t?void 0:t.data)||{},e=>e.path),Ze=(0,q.keyBy)((null==Te||null===(r=Te.plausible3mo)||void 0===r?void 0:r.data)||{},e=>e.path),Me=(0,q.keyBy)((null==Te||null===(a=Te.plausible1mo)||void 0===a?void 0:a.data)||{},e=>e.path),Pe=[],Ne={};if(0!==ie){for(let e=0;e<4;e++){const t=(0,de.e)(new Date,e*ie);Pe.push({from:(0,de.e)(t,ie),to:t})}Pe.reverse()}let Ie=be.map(e=>{var t,r,n,a,i,o,l,s;return{...e,data:je.find(t=>t.landingPage===e.path),impressions:null===(t=Ae[e.path])||void 0===t?void 0:t.impressions,avgRank:null===(r=Ae[e.path])||void 0===r?void 0:r.rank,clicks:null===(n=Ae[e.path])||void 0===n?void 0:n.clicks,impressionsBefore:null===(a=Ae[e.path])||void 0===a?void 0:a.impressionsBefore,clicksBefore:null===(i=Ae[e.path])||void 0===i?void 0:i.clicksBefore,plausible12moVisitors:null===(o=ke[e.path])||void 0===o?void 0:o.visitors,plausible3moVisitors:null===(l=Ze[e.path])||void 0===l?void 0:l.visitors,plausible1moVisitors:null===(s=Me[e.path])||void 0===s?void 0:s.visitors}});Ie=Ie.filter(e=>new Date(e.date)>g),Ie=Ie.filter(e=>new Date(e.date)<v),c&&(Ie=Ie.filter(e=>{var t;return null==e||null===(t=e.data)||void 0===t?void 0:t.paidCount})),console.log({detailsListPagesWithData:Ie}),function(e){const t=(0,q.groupBy)(e,e=>(0,k.Yq)(new Date(e.date),!0).split(" ").slice(1).join(" "));let r="Month\tBlog\tSoftware\tAlternative\tMetrics\tTool\tLanding\tOther";const n=new Date("2023-01-01");for(;n<new Date;){const e=(0,k.Yq)(n,!0).split(" ").slice(1).join(" "),a=(0,q.groupBy)(t[e]||[],e=>e.type);r+=`\n${e}\t${(a.blog||[]).length}\t${(a.software||[]).length}\t${(a.alternative||[]).length}\t${(a.metrics||[]).length}\t${(a.tool||[]).length}\t${(a.landing||[]).length}\t${(a[void 0]||[]).length}`,n.setMonth(n.getMonth()+1)}console.log(r);let a="Month\tBlog\tSoftware\tAlternative\tMetrics\tTool\tLanding\tOther";const i=new Date("2023-01-01");for(;i<new Date;){const e=(0,k.Yq)(i,!0).split(" ").slice(1).join(" "),r=(0,q.groupBy)(t[e]||[],e=>e.type);console.log(r),a+=`\n${e}\t${(r.blog||[]).map(e=>{var t;return(null==e||null===(t=e.data)||void 0===t?void 0:t.count)||0}).reduce((e,t)=>
1e+t,0)}\t${(r.software||[]).map(e=>{var t;return(null==e||null===(t=e.data)||void 0===t?void 0:t.count)||0}).reduce((e,t)=>e+t,0)}\t${(r.alternative||[]).map(e=>{var t;return(null==e||null===(t=e.data)||void 0===t?void 0:t.count)||0}).reduce((e,t)=>e+t,0)}\t${(r.metrics||[]).map(e=>{var t;return(null==e||null===(t=e.data)||void 0===t?void 0:t.count)||0}).reduce((e,t)=>e+t,0)}\t${(r.tool||[]).map(e=>{var t;return(null==e||null===(t=e.data)||void 0===t?void 0:t.count)||0}).reduce((e,t)=>e+t,0)}\t${(r.landing||[]).map(e=>{var t;return(null==e||null===(t=e.data)||void 0===t?void 0:t.count)||0}).reduce((e,t)=>e+t,0)}\t${(r[void 0]||[]).map(e=>{var t;return(null==e||null===(t=e.data)||void 0===t?void 0:t.count)||0}).reduce((e,t)=>e+t,0)}`,i.setMonth(i.getMonth()+1)}console.log("trialcount",a)}(Ie);let De=[];if("landingPage"!==ge&&i){const e=(0,q.groupBy)(i,e=>{var t;if("referrerDomain"!==ge)return xe((null===(t=e.note)||void 0===t?void 0:t.landingPage)||"")||"(none)";{var r;const t=(null===(r=e.note)||void 0===r?void 0:r.initialReferrer)||"";try{return t?new URL(t).hostname:"(none)"}catch{return t||"(none)"}}});De=(0,q.sortBy)(Object.entries(e).map(e=>{let t=ve(e,2),r=t[0],n=t[1];return{title:r,data:{count:n.length,paidCount:n.filter(e=>e.hasEverBoughtSubscription).length,bcs:n}}}),e=>-e.data.count),c&&(De=De.filter(e=>e.data.paidCount))}const Oe="landingPage"!==ge,Re=Oe?["title","trials","conversions"]:["title","type","date","clicks","plausible3mo","trials","conversions"];Pe.forEach((e,t)=>{Re.push(`trials_${t}`),Ne[`trials_${t}`]={heading:{title:(0,k.Yq)(e.from)+"-"+(0,k.Yq)(e.to,!0),alignRight:!0,style:{width:135,fontSize:10}},calculate:r=>{const n=i(e),a=Pe[t-1]?i(Pe[t-1]):null;function i(e){var t;return((null===(t=r.data)||void 0===t?void 0:t.bcs)||[]).filter(t=>{const r=new Date(t.createdAt);return r>e.from&&r<e.to})}const o="conversions"===he?n.filter(e=>e.hasEverBoughtSubscription).length:n.length,l=a?"conversions"===he?a.filter(e=>e.hasEverBoughtSubscription).length:a.length:void 0;return{count:o,previousCount:l,change:"number"==typeof l?o-l:null}},getSortByValue:(e,t,r)=>r.change,render(e,t,r){const n=r.change;return(0,j.jsxs)("div",{children:[(0,j.jsx)("span",{style:{opacity:0===r.count?.4:.8,fontSize:12},children:r.count})," ",n?(0,j.jsxs)("span",{style:{color:n>0?"green":"red",fontSize:15,display:"inline-block",width:50},children:[(0,j.jsx)("span",{style:{display:"inline-block",marginRight:2},children:n>0?"↑":"↓"}),Math.abs(n)]}):null]})}}}),w&&Re.push("clicksBefore"),N&&(Re.push("impressions"),Re.push("clickThroughRate")),L&&Re.push("gscAvgRank"),O&&Re.push("plausible12mo","plausible1mo"),A&&Re.push("plausibleViewToTrial"),U&&Re.push("plausibleViewsPerEffort","trialsPerEffort","projectedTrialsPerYear","projectedTrialsPerYearPerEffort"),re&&Re.push("url");const Fe={XXS:1,XS:4,S:10,M:24,L:48},Le=e=>{var t;const r=(null==e||null===(t=e.data)||void 0===t?void 0:t.count)/3,n=Fe[fe[e.path]];return(0,q.round)(r/n*8,1)},We=e=>{const t=(null==e?void 0:e.plausible3moVisitors)/3,r=Fe[fe[e.path]];return(0,q.round)(t/r*8,1)},Be=e=>{var t;const r=(null==e||null===(t=e.data)||void 0===t?void 0:t.count)/3;return(0,q.round)(12*r,1)},Ee=e=>{const t=Be(e);return(0,q.round)(t/Fe[fe[e.path]]*8,1)},He={XXS:"1h",XS:"4h",S:"10h",M:"3d",L:"6d"},Ue=["XXS","XS","S","M","L"];return(0,j.jsxs)("div",{className:"mt-2",children:[(0,j.jsxs)("div",{children:["Group by:"," ",(0,j.jsxs)("select",{value:ge,onChange:e=>ye(e.target.value),children:[(0,j.jsx)("option",{value:"landingPage",children:"Landing Page"}),(0,j.jsx)("option",{value:"referrerDomain",children:"Referrer Domain"}),(0,j.jsx)("option",{value:"campaign",children:"Campaign"})]})]}),(0,j.jsxs)("label",{children:[(0,j.jsx)("input",{type:"checkbox",onClick:e=>u(e.target.checked),checked:c}),"With conversions only"]}),(0,j.jsxs)("div",{className:"mt-1",children:["Page creation date | Filter from: ",(0,k.Yq)(g,!0),(0,j.jsx)("select",{onChange:e=>{b(new Date(e.target.value))},className:"ml-1 mr-1",children:[{from:h,title:"All time"},{from:(0,ce.o)((0,V.f)(new Date,-30)),title:"Last 1 month"},{from:(0,ce.o)((0,V.f)(new Date,-92)),title:"Last 3 months"},{from:(0,ce.o)((0,V.f)(new Date,-184)),title:"Last 6 months"},{from:(0,ce.o)((0,V.f)(new Date,-365)),title:"Last 12 months"},{from:(0,ce.o)((0,V.f)(new Date,-730)),title:"Last 24 months"}].map(e=>(0,j.jsx)("option",{value:e.from.toISOString(),selected:e.from.toISOString()===g.toISOString(),children:e.title},e.from.toISOString()))}),"| Filter to: ",(0,k.Yq)(v,!0),(0,j.jsx)("select",{onChange:e=>{y(new Date(e.target.value))},className:"ml-1 mr-1",children:[{to:m,title:"all time"},{to:(0,ce.o)((0,V.f)(new Date,-31)),title:"1 month ago"},{to:(0,ce.o)((0,V.f)(new Date,-92)),title:"3 months ago"}].map(e=>(0,j.jsx)("option",{value:e.to.toISOString(),selected:e.to.toISOString()===g.toISOString(),children:e.title},e.to.toISOString()))})]}),(0,j.jsxs)("div",{style:{display:"flex"},children:[(0,j.jsxs)("div",{className:"mr-2",children:["Filter page type:"," ",(0,j.jsxs)("select",{value:$,onChange:e=>X(e.target.value),children:[(0,j.jsx)("option",{value:"",children:"All"}),Array.from(new Set(Ie.map(e=>e.type))).map(e=>(0,j.jsx)("option",{value:e,children:e},e))]})]}),(0,j.jsxs)("div",{className:"mr-2",children:["Filter effort size:"," ",(0,j.jsxs)("select",{value:J,onChange:e=>Y(e.target.value),children:[(0,j.jsx)("option",{value:"",children:"All"}),Ue.map(e=>(0,j.jsxs)("option",{value:e,children:[e," (",He[e],")"]},e))]})]})]}),(0,j.jsxs)("div",{className:"mt-2 d-flex",children:[(0,j.jsxs)("label",{className:"d-flex align-items-center",children:[(0,j.jsx)("input",{type:"checkbox",className:"mr-1",onChange:e=>ee(e.target.checked),checked:Q}),"Title Only"]}),(0,j.jsxs)("label",{className:"d-flex align-items-center ml-2",children:[(0,j.jsx)("input",{type:"checkbox",className:"mr-1 ",onChange:e=>ne(e.target.checked),checked:re}),"Show URL Column"]})]}),(0,j.jsxs)("div",{children:["Trial Day Interval"," ",(0,j.jsx)("select",{onChange:e=>{oe(parseFloat(e.target.value))},className:"ml-1 mr-1",children:[0,7,30,90,180,360].map(e=>(0,j.jsx)("option",{value:e,selected:e===ie,children:e},e))}),0!==ie&&(0,j.jsxs)("select",{onChange:e=>{me(e.target.value)},className:"ml-1",children:[(0,j.jsx)("option",{value:"trials",selected:"trials"===he,children:"Trials"}),(0,j.jsx)("option",{value:"conversions",selected:"conversions"===he,children:"Conversions"})]})]}),(0,j.jsxs)("div",{className:"mt-2 d-flex",children:[(0,j.jsxs)("label",{className:"d-flex align-items-center",children:[(0,j.jsx)("input",{type:"checkbox",className:"mr-1",onChange:e=>S(e.target.checked),checked:w}),"GSC comparison to prev 3mo"]}),(0,j.jsxs)("label",{className:"d-flex align-items-center",children:[(0,j.jsx)("input",{type:"checkbox",className:"ml-2  mr-1",onChange:e=>Z(e.target.checked),checked:A}),"Click/view to trial conversion rates"," ",(0,j.jsx)("span",{className:"scale-small-1 color-coldGrey1",children:"(filter trials for last 3 mo only first)"})]}),(0,j.jsxs)("label",{className:"d-flex align-items-center",children:[(0,j.jsx)("input",{type:"checkbox",className:"ml-2 mr-1",onChange:e=>R(e.target.checked),checked:O}),"Plausible 12mo/1mo"]}),(0,j.jsxs)("label",{className:"d-flex align-items-center",children:[(0,j.jsx)("input",{type:"checkbox",className:"ml-2 mr-1",onChange:e=>I(e.target.checked),checked:N}),"GSC click through rate"]}),(0,j.jsxs)("label",{className:"d-flex align-items-center",children:[(0,j.jsx)("input",{type:"checkbox",className:"ml-2 mr-1",onChange:e=>B(e.target.checked),checked:L}),"GSC avg rank"]}),(0,j.jsxs)("label",{className:"d-flex align-items-center",children:[(0,j.jsx)("input",{type:"checkbox",className:"ml-2 mr-1",onChange:e=>z(e.target.checked),checked:U}),"Effort Analysis"]})]}),(0,j.jsxs)("div",{className:"mt-1 mb-1 scale-small-1 color-coldGrey1",children:["External analytics status: Plausible12Mo:"," ",null!=Te&&Te.plausible12mo?(0,k.Yq)(new Date(null==Te?void 0:Te.plausible12mo.createdAt)):"n/a"," ","| Plausible3Mo:"," ",null!=Te&&Te.plausible3mo?(0,k.Yq)(new Date(null==Te?void 0:Te.plausible3mo.createdAt)):"n/a"," ","| Plausible1Mo:"," ",null!=Te&&Te.plausible1mo?(0,k.Yq)(new Date(null==Te?void 0:Te.plausible1mo.createdAt)):"n/a"," ","| GSC3Mo:"," ",null!=Te&&Te.gsc3mo?(0,k.Yq)(new Date(null==Te?void 0:Te.g
1sc3mo.createdAt)):"n/a"]}),!(0,T.v)().createdAfter&&(0,j.jsx)("div",{className:"alert alert-warning",children:"When looking at trials per unit of time / effort analysis, make sure to look enable the last 3 mo time filter. Generally, also consider if Plausible data etc is up to date."}),(0,j.jsx)(W.mY,{items:Oe?De:Ie.filter(e=>!$||e.type===$).filter(e=>!J||fe[e.path]===J),showColumns:Re,sortByColumn:l,onSortByChange:e=>s(e),columns:{title:{heading:{title:Oe?"referrerDomain"===ge?"Referrer Domain":"Campaign":"Title"},getSortByValue:e=>e.title,render:e=>Oe?(0,j.jsx)("div",{children:e.title}):(0,j.jsxs)("div",{className:"d-flex align-items-center",children:[(0,j.jsx)("div",{className:"mr-2",children:e.title}),!Q&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("div",{className:"color-coldGrey1",children:e.path}),(0,j.jsx)("a",{href:e.path,target:"_blank",rel:"noreferrer",className:"ml-1",style:{lineHeight:"1em"},children:(0,j.jsx)(se.p,{fill:"#aaa"})}),(0,j.jsx)("a",{href:`https://search.google.com/search-console/performance/search-analytics?resource_id=sc-domain%3Adebugbear.com&page=*${encodeURIComponent(e.path)}`,target:"_blank",rel:"noreferrer",className:"ml-1 landing-page-table-external-button",children:"GSC"}),(0,j.jsx)("a",{href:`https://plausible.io/debugbear.com?filters=((is,page,(${e.path})))`,target:"_blank",rel:"noreferrer",className:"ml-1 landing-page-table-external-button",children:"PL"}),(0,j.jsx)("a",{href:`https://app.ahrefs.com/v2-site-explorer/backlinks?anchorRules=&bestFilter=all&dataMode=text&domainNameRules=&followType=all&grouping=one-per-domain&highlightChanges=30d&history=all&ipRules=&limit=50&mode=prefix&offset=0&refPageAuthorRules=&refPageTitleRules=&refPageUrlRules=&sort=Traffic&sortDirection=desc&surroundingRules=&target=www.debugbear.com${encodeURIComponent(e.path)}&targetUrlRules=`,target:"_blank",rel:"noreferrer",className:"ml-1 landing-page-table-external-button",children:"Ahrefs"}),fe[e.path]&&(0,j.jsx)("div",{style:{marginLeft:"auto",background:{XXS:"#f0f0f0",XS:"#c2d8e8",S:"#a4c2e0",M:"rgb(214 196 127)",L:"rgb(230 155 177)"}[fe[e.path]]},className:"effort-size-badge",title:He[fe[e.path]],children:fe[e.path]}),(0,T.v)().sizeAssignment&&(!fe[e.path]||(0,T.v)().forceSizeUI)&&(0,j.jsx)("div",{className:"d-flex ml-auto",children:Ue.map(t=>(0,j.jsxs)("button",{className:"ml-1 effort-size-button",style:{background:fe[e.path]===t?"orange":void 0},onClick:r=>{r.target.parentElement.style.visibility="hidden",fe[e.path]=t,window.effortSizeByPath=fe},children:[t," (",He[t],")"]},t))})]})]})},url:{heading:{title:"URL",style:{width:250}},render:e=>(0,j.jsx)("div",{children:e.path})},type:{heading:{title:"Type",style:{width:100}},getSortByValue:e=>e.type,render(e){const t={other:{bgColor:"grey1"},landing:{bgColor:"green1"},tool:{bgColor:"blue1"},metrics:{bgColor:"orange1"},blog:{bgColor:"red1"}}[e.type||"other"];return(0,j.jsx)(le.E,{bgColor:null==t?void 0:t.bgColor,children:e.type||"other"})}},date:{heading:{title:"Date",alignRight:!0,style:{width:120}},getSortByValue:e=>new Date(e.date).valueOf(),render:e=>(0,k.Yq)(new Date(e.date),!0)},clicks:{heading:{title:"Clicks3Mo",alignRight:!0,style:{width:100}},getSortByValue:e=>null==e?void 0:e.clicks,render:e=>"number"==typeof(null==e?void 0:e.clicks)?(0,k.Ke)(null==e?void 0:e.clicks):"-"},impressions:{heading:{title:"Impressions",alignRight:!0,style:{width:100}},getSortByValue:e=>null==e?void 0:e.impressions,render:e=>"number"==typeof(null==e?void 0:e.impressions)?(0,k.Ke)(null==e?void 0:e.impressions):"-"},gscAvgRank:{heading:{title:"Avg rank",alignRight:!0,style:{width:100}},getSortByValue:e=>null==e?void 0:e.avgRank,render:e=>"number"==typeof(null==e?void 0:e.avgRank)?(0,q.round)(null==e?void 0:e.avgRank,1):"-"},clickThroughRate:{heading:{title:"CTR",alignRight:!0,style:{width:100}},getSortByValue:e=>(null==e?void 0:e.clicks)/(null==e?void 0:e.impressions),render(e){const t=(null==e?void 0:e.clicks)/(null==e?void 0:e.impressions);return t?Math.round(1e3*t)/10+"%":"-"}},gscClickToTrial:{heading:{title:"GSC 3Mo Conv",alignRight:!0,style:{width:120}},getSortByValue(e){var t;return(null==e||null===(t=e.data)||void 0===t?void 0:t.count)/(null==e?void 0:e.clicks)},render(e){var t;const r=(null==e||null===(t=e.data)||void 0===t?void 0:t.count)/(null==e?void 0:e.clicks);return r?Math.round(1e3*r)/10+"%":"-"}},plausibleViewToTrial:{heading:{title:"PL 3Mo Conv",alignRight:!0,style:{width:120}},getSortByValue(e){var t;return(null==e||null===(t=e.data)||void 0===t?void 0:t.count)/(null==e?void 0:e.plausible3moVisitors)},render(e){var t;const r=(null==e||null===(t=e.data)||void 0===t?void 0:t.count)/(null==e?void 0:e.plausible3moVisitors);return r?Math.round(1e3*r)/10+"%":"-"}},plausible12mo:{heading:{title:"12mo Plausible",alignRight:!0,style:{width:100}},getSortByValue:e=>null==e?void 0:e.plausible12moVisitors,render:e=>"number"==typeof(null==e?void 0:e.plausible12moVisitors)?(0,k.Ke)(null==e?void 0:e.plausible12moVisitors):"-"},plausible3mo:{heading:{title:"3mo Plausible",alignRight:!0,style:{width:100}},getSortByValue:e=>null==e?void 0:e.plausible3moVisitors,render:e=>"number"==typeof(null==e?void 0:e.plausible3moVisitors)?(0,k.Ke)(null==e?void 0:e.plausible3moVisitors):"-"},plausible1mo:{heading:{title:"1mo Plausible",alignRight:!0,style:{width:100}},getSortByValue:e=>null==e?void 0:e.plausible1moVisitors,render:e=>"number"==typeof(null==e?void 0:e.plausible1moVisitors)?(0,k.Ke)(null==e?void 0:e.plausible1moVisitors):"-"},plausibleViewsPerEffort:{heading:{title:"PL Views/Mo/D",alignRight:!0,style:{width:120}},getSortByValue:e=>We(e),render:e=>We(e)||"-"},trialsPerEffort:{heading:{title:"Trials/Mo/D",alignRight:!0,style:{width:120}},getSortByValue:e=>Le(e),render:e=>Le(e)||"-"},projectedTrialsPerYear:{heading:{title:"Trials/Yr",alignRight:!0,style:{width:120}},getSortByValue:e=>Be(e),render:e=>Be(e)||"-"},projectedTrialsPerYearPerEffort:{heading:{title:"Trials/Yr/D",alignRight:!0,style:{width:120}},getSortByValue:e=>Ee(e),render:e=>Ee(e)||"-"},clicksBefore:{heading:{title:"Clicks*",alignRight:!0,style:{width:100}},getSortByValue:e=>null==e?void 0:e.clicksBefore,render:e=>"number"==typeof(null==e?void 0:e.clicksBefore)?(0,k.Ke)(null==e?void 0:e.clicksBefore):"-"},...Ne,trials:{heading:{title:"Trials",alignRight:!0,style:{width:100}},getSortByValue(e){var t;return null==e||null===(t=e.data)||void 0===t?void 0:t.count},render(e){var t,r;if(null==e||null===(t=e.data)||void 0===t||!t.count)return"-";const n=Oe?"referrerDomain"===ge?{referrerSearch:e.title}:{campaignSearch:e.title}:{landingPageUrlSearch:e.path};return(0,j.jsx)("a",{href:(0,E.O$)(location.href,n),target:"_blank",rel:"noreferrer",children:null==e||null===(r=e.data)||void 0===r?void 0:r.count})}},conversions:{heading:{title:"Conversions",alignRight:!0,style:{width:100}},getSortByValue(e){var t;return null==e||null===(t=e.data)||void 0===t?void 0:t.paidCount},render(e){var t,r;return null!==(t=null==e||null===(r=e.data)||void 0===r?void 0:r.paidCount)&&void 0!==t?t:"-"}}}})]})}function we(e){let t=e.billingCustomers,r=e.lpTableHighLevel,n=e.lpTableIgnoreQueryParams,a=e.lpTableQuery,i=(0,q.groupBy)(t||[],e=>{var t;let i=(null===(t=e.note)||void 0===t?void 0:t.landingPage)||"";if(a){const e=i.split("?")[1]||"n/a";return e.startsWith("u=")?"u=...":e.startsWith("fbclid=")?"fbclid=...":e.startsWith("url=")?"url=...":e.startsWith("metric=")||e.startsWith("group=")||e.startsWith("share=")||e.startsWith("analyses=")||e.startsWith("analysis=")?"(app)":e}if(i.startsWith("/project")||i.startsWith("/viewResult")||i.startsWith("/logout")||i.startsWith("/account/upgrade"))return"projectEtc";if(i.startsWith("/test/website-speed"))return"/test/website-speed";if(i.startsWith("/account/upgrade/"))return"/account/upgrade";if(i.startsWith("/inp-debugger"))return"/inp-debugger";let o=i.replace("utm_campaign=","utm_campaign_").replace("utm_source=","utm_source_").replace(/=[^&]+/g,"_").slice(0,120);return n&&(o=o.split("?")[0]),r&&(o.startsWith("/blog")?o="/blog":o.startsWith("/docs/metrics")?o="/docs/metrics":o.startsWith("/docs")?o="/docs":o.includes("-alternative")?o="alternative pages":o.includes("-monitoring")||o.startsWith("/lighthouse")?o="landing pages":o.startsWith("/inp-debugger")||o.startsWith("/basic-auth-header-generator")||o.startsWith("/resource-hint-validator")||o.startsWith("/extension/status")?o="misc tools":(o.startsWith("/pricing")||o.startsWith("/signup")||o.startsWith("/login"))&&(o="pricingSignupEtc"),o=o.split("?")[0]),o}),o=[];
1return Object.entries(i).forEach(e=>{let t=ve(e,2),r=t[0],n=t[1];o.push({landingPage:r,count:n.length,paidCount:n.filter(e=>e.hasEverBoughtSubscription).length,bcs:n})}),(0,q.sortBy)(o,e=>-e.count)}function Se(e,t){let r=t.isReadOnly;return fetch("/debugbearadmin/adminLoginLink/"+e+"?isReadOnly="+r,{method:"POST",credentials:"same-origin",headers:{Accept:"application/json","Content-Type":"application/json"}}).then(e=>e.json())}function Te(e,t,r){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ce(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,o,l=[],s=!0,d=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){d=!0,a=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw a}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ae(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ae(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ae(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function ke(e){const t=(0,F.I)(),r=Ce((0,L.t)("mode","auto"),2),n=r[0],i=r[1],o=Ce((0,L.t)("landingPageUrlSearch",""),2),l=o[0],s=o[1],d=Ce((0,L.t)("referrerSearch",""),2),c=d[0],u=d[1],h=Ce((0,L.t)("campaignSearch",""),2),m=h[0],p=h[1],g=Ce((0,L.t)("relatedAccount",""),2),b=g[0],f=g[1],v=(0,a.Zp)();return(0,j.jsxs)("div",{children:[(0,j.jsxs)("div",{className:"d-flex align-items-center",children:["Mode",(0,j.jsxs)("select",{value:n,onChange:e=>{i(e.target.value)},className:"ml-1",children:[(0,j.jsx)("option",{value:"auto",children:"Auto"}),(0,j.jsx)("option",{value:"sales",children:"Sales"})]}),(0,j.jsx)("button",{className:"ml-2",onClick:()=>{v((0,E.O$)(location.pathname,{...(0,T.v)(),mode:"sales",hidePersonal:"true",hideDeleted:"true",hideSuspended:"true",excludeLowConvertingCountries:"true"}))},children:"Check sales"}),(0,j.jsx)("span",{className:"ml-2",children:"Add ?minEmployees=200 to URL to filter"})]}),(0,j.jsx)(Ze,{...e,createdAfter:t.get("createdAfter"),createdBefore:t.get("createdBefore"),navigate:v,mode:n,landingPageUrlSearch:l,setLandingPageUrlSearch:s,referrerSearch:c,setReferrerSearch:u,campaignSearch:m,setCampaignSearch:p,relatedAccountFilter:b,setRelatedAccountFilter:f,excludeLowConvertingCountries:t.get("excludeLowConvertingCountries"),hidePersonal:t.get("hidePersonal"),hideDeleted:t.get("hideDeleted"),hideSuspended:t.get("hideSuspended"),showBCST:t.get("showBCST")})]})}class Ze extends n.Component{constructor(e){super(e),this.state={billingCustomers:null,filter:(0,T.v)().filter||"none",levelFilter:(0,T.v)().levelFilter?parseFloat((0,T.v)().levelFilter):null,lastSeenNDaysAgoFilter:(0,T.v)().lastSeenNDaysAgo?parseFloat((0,T.v)().lastSeenNDaysAgo):9999,minEmployees:(0,T.v)().minEmployees||null,planNameFilter:(0,T.v)().planName||null,showCustomConfig:!1,showSubnet:!1,search:(0,T.v)().search||"",excludeSearch:"",showLpTable:!1,showLpTable2:!1,weekdayFilter:"all",conversionFilter:null,lpTableIgnoreQueryParams:!1,lpTableHighLevel:!1,showConversionTable:!1,showConversionStatsTable:!1,lpTableQueryParams:!1,last6MoOnly:!(0,T.v)().bcId&&!(0,T.v)().allTime,showDomains:!1},M.FH.adminGetBillingCustomers({billingCustomerId:(0,T.v)().bcId,fromDate:this.state.last6MoOnly?(0,V.f)(new Date,-190):null}).then(e=>{console.log({billingCustomers:e}),this.setState({billingCustomers:e})})}render(){(0,i.wE)("Admin");const e=this.props.createdAfter?new Date(this.props.createdAfter):null,t=this.props.createdBefore?new Date(this.props.createdBefore):null,r=this.props.excludeLowConvertingCountries,n=this.props.hidePersonal,a=this.props.hideDeleted,o=this.props.hideSuspended,l=this.props.showBCST;let s=this.state.billingCustomers;s&&(s=s.filter(i=>{let l=!!i.note;if(e&&(l=l&&e<new Date(i.createdAt)),t&&(l=l&&t>new Date(i.createdAt)),"nonFreeTrial"===this.state.filter&&(l=l&&"freeTrial"!==i.planName),"checkInDue"===this.state.filter&&(l=l&&(!i.note.nextCheckInDate||new Date(i.note.nextCheckInDate)<new Date)),this.state.planNameFilter&&(l="paid"===this.state.planNameFilter?l&&!["freeTrial","beta","reddit"].includes(i.planName):l&&i.planName===this.state.planNameFilter),r&&(l=l&&!U.includes(i.note.country)),"trialExpiring"===this.state.filter){const e=((new Date).valueOf()-new Date(i.freeTrialEnd).valueOf())/k.ec;l=l&&e<7&&e>-4}if(null!==this.state.levelFilter&&(l=l&&i.note.level===this.state.levelFilter),this.state.conversionFilter){var s;const e=this.state.conversionFilter.startsWith("!"),t=e?this.state.conversionFilter.slice(1):this.state.conversionFilter,r="purchase"===t?i.hasEverBoughtSubscription:null===(s=i.note.activation)||void 0===s?void 0:s[t];l=l&&(e?!r:r)}if(this.state.lastSeenNDaysAgoFilter<1e3&&(l=l&&i.userAccesses.find(e=>e.user&&new Date(e.user.lastSeen).valueOf()>(new Date).valueOf()-this.state.lastSeenNDaysAgoFilter*k.ec)),"weekday"===this.state.weekdayFilter){const e=new Date(i.createdAt);l=l&&[1,2,3,4,5].includes(e.getDay())}else if("weekend"===this.state.weekdayFilter){const e=new Date(i.createdAt);l=l&&[6,0].includes(e.getDay())}if(n){const e=i.userAccesses&&i.userAccesses[0]&&i.userAccesses[0].user&&i.userAccesses[0].user.email;e&&H(e)&&(l=!1)}if(this.state.minEmployees){var d;const e=null===(d=i.note.domainInfo)||void 0===d?void 0:d.about;let t=null==e?void 0:e.totalEmployeesExact;!t&&null!=e&&e.totalEmployees&&(e.totalEmployees.includes("k")?t=1e3:"200-500"===e.totalEmployees?t=350:"50-200"===e.totalEmployees&&(t=100)),l=l&&t>=this.state.minEmployees}
1a&&(i.accountDeletedAt||i.deletionScheduledFor)&&(l=!1),o&&i.suspendedEmail&&(l=!1),this.props.relatedAccountFilter&&("excludeRelated"===this.props.relatedAccountFilter?l=l&&!i.note.relatedBillingCustomerId:"relatedOnly"===this.props.relatedAccountFilter?l=l&&i.note.relatedBillingCustomerId:"excludeRelatedAndProjectLandingPage"===this.props.relatedAccountFilter&&(l=l&&!i.note.relatedBillingCustomerId&&!(i.note.landingPage||"").includes("/project"))),location.href.includes("?all")||(l=l&&i.note&&"ignore"!==i.note.channel&&"duplicate"!==i.note.channel);const c=`${i.note.channel} ${i.note.tags.join(",")} ${i.note.landingPage} ${i.userAccesses.filter(e=>!!e.user).map(e=>e.user.email+" "+e.user.name+" "+e.user.lastName).join(",")} ${i.id}`.toLowerCase();return this.state.search&&(c.includes(this.state.search.toLowerCase())||(l=!1)),this.props.landingPageUrlSearch&&((i.note.landingPage||"").includes(this.props.landingPageUrlSearch)||(l=!1)),this.props.referrerSearch&&((i.note.initialReferrer||"").includes(this.props.referrerSearch)||(l=!1)),this.props.campaignSearch&&(xe(i.note.landingPage||"").includes(this.props.campaignSearch)||(l=!1)),this.state.excludeSearch&&c.includes(this.state.excludeSearch.toLowerCase())&&(l=!1),l}));let d=null;if(this.state.showLpTable){const e=we({billingCustomers:s,lpTableHighLevel:this.state.lpTableHighLevel,lpTableIgnoreQueryParams:this.state.lpTableIgnoreQueryParams,lpTableQuery:this.state.lpTableQueryParams});d=(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(P.A,{items:e,keys:["landingPage","count","paidCount"]}),(0,j.jsx)(je,{billingCustomers:s})]})}let c=null;return this.state.showLpTable2&&(c=(0,j.jsx)(j.Fragment,{children:(0,j.jsx)(je,{billingCustomers:s})})),(0,j.jsx)("div",{children:(0,j.jsxs)("div",{children:[(0,j.jsx)(ee,{billingCustomers:s}),this.state.last6MoOnly&&(0,j.jsxs)("div",{className:"alert alert-info mb-2 mt-2",children:["Only showing signups from last 6 months!"," ",(0,j.jsx)("a",{href:(0,E.O$)(location.href,{allTime:!0}),className:"btn btn-primary btn-xs",children:"Show all"})]}),(0,j.jsxs)("div",{className:"content-container",children:[(0,j.jsxs)("div",{children:[(0,j.jsx)("button",{onClick:()=>{this.setState({showDomains:!this.state.showDomains})},children:"toggle domains"}),this.state.showDomains&&(0,j.jsx)(Qe,{billingCustomers:s})]}),(0,j.jsx)("a",{href:"/debugbearadmin/bcSummary?all",children:'include channel "ignore"'}),(0,j.jsx)("br",{}),(0,j.jsxs)("div",{children:["filter"," ",(0,j.jsx)("button",{onClick:()=>this.setState({filter:"none"}),children:"none"}),(0,j.jsx)("button",{onClick:()=>this.setState({filter:"nonFreeTrial"}),children:"nonFreeTrial"}),(0,j.jsx)("button",{onClick:()=>this.setState({weekdayFilter:"all"}),children:"all days"}),(0,j.jsx)("button",{onClick:()=>this.setState({weekdayFilter:"weekday"}),children:"weekdaySignup"}),(0,j.jsx)("button",{onClick:()=>this.setState({weekdayFilter:"weekend"}),children:"weekendSignup"}),"related acct",(0,j.jsxs)("select",{value:this.props.relatedAccountFilter,onChange:e=>this.props.setRelatedAccountFilter(e.target.value),children:[(0,j.jsx)("option",{value:"",children:"No Filter"}),(0,j.jsx)("option",{value:"excludeRelated",children:"Exclude Related"}),(0,j.jsx)("option",{value:"excludeRelatedAndProjectLandingPage",children:"Exclude Related And Project Landing page"}),(0,j.jsx)("option",{value:"relatedOnly",children:"Related Only"})]}),(0,j.jsx)("button",{onClick:()=>this.setState({filter:"checkInDue"}),children:"Check In Due"}),(0,j.jsx)("button",{onClick:()=>this.setState({filter:"trialExpiring"}),children:"trial expiring"}),(0,j.jsx)("button",{onClick:()=>this.setState({lastSeenNDaysAgoFilter:10}),children:"admin seen in last 10 days"}),(0,j.jsx)("button",{onClick:()=>this.setState({lastSeenNDaysAgoFilter:30}),children:"admin seen in last 30 days"})]}),(0,j.jsxs)("div",{className:"mt-1 d-flex",children:[(0,j.jsx)(Ge,{}),(0,j.jsx)(qe,{}),(0,j.jsx)($e,{}),(0,j.jsx)(Xe,{})]}),(0,j.jsx)("div",{children:(0,j.jsx)("button",{onClick:()=>this.setState({planNameFilter:"freeTrial"}),children:"Free Trial only"})}),(0,j.jsxs)("div",{children:[(0,j.jsx)("button",{onClick:()=>{this.setState({showCustomConfig:!0})},children:"show custom config"}),(0,j.jsx)("button",{onClick:()=>{this.setState({showSubnet:!0})},children:"show subnet"})]}),(0,j.jsxs)("div",{className:"d-flex",children:[(0,j.jsx)(Je,{beforeOrAfter:"after"}),(0,j.jsx)(Je,{beforeOrAfter:"before"}),(0,j.jsx)("button",{className:"ml-2",onClick:()=>{this.props.navigate((0,E.O$)(location.pathname,{...(0,T.v)(),createdAfter:(0,G.P)(new Date,-3).toISOString()}))},children:"filter last 3 mo"}),(0,j.jsx)(Ye,{navigate:this.props.navigate})]}),(0,j.jsx)(_e,{}),(0,j.jsx)("br",{}),"Search",(0,j.jsx)("input",{type:"text",value:this.state.search,onChange:e=>this.setState({search:e.target.value})}),"Search Exclusion",(0,j.jsx)("input",{type:"text",value:this.state.excludeSearch,onChange:e=>this.setState({excludeSearch:e.target.value})}),"Landing Page URL Search",(0,j.jsx)("input",{type:"text",value:this.props.landingPageUrlSearch,onChange:e=>this.props.setLandingPageUrlSearch(e.target.value)}),"Referrer Search",(0,j.jsx)("input",{type:"text",value:this.props.referrerSearch,onChange:e=>this.props.setReferrerSearch(e.target.value)}),"Campaign Search",(0,j.jsx)("input",{type:"text",value:this.props.campaignSearch,onChange:e=>this.props.setCampaignSearch(e.target.value)}),!s&&(0,j.jsx)(A.y,{}),s&&(0,j.jsxs)("div",{children:[(0,j.jsx)("h2",{style:{marginLeft:10,textDecoration:"underline"},children:"Admin"}),(0,j.jsxs)("label",{children:[(0,j.jsx)("input",{type:"checkbox",checked:this.state.showConversionStatsTable,onChange:e=>{this.setState({showConversionStatsTable:e.target.checked})}}),"Show Conversion Stats Table"]}),(0,j.jsx)("br",{}),this.state.showConversionStatsTable&&(0,j.jsx)(De,{bcs:s}),(0,j.jsxs)("label",{children:[(0,j.jsx)("input",{type:"checkbox",checked:this.state.showConversionTable,onChange:e=>{this.setState({showConversionTable:e.target.checked})}}),"Show Conversion table + Other options"]}),(0,j.jsx)("br",{}),this.state.showConversionTable&&(0,j.jsx)(Oe,{bcs:s,conversionFilter:this.state.conversionFilter,setConversionFilter:e=>this.setState({conversionFilter:e})}),(0,j.jsx)("button",{onClick:()=>this.setState({showLpTable2:!this.state.showLpTable2}),style:{background:"#aaffaa"},children:"Toggle Landing Page Table 2"}),(0,j.jsx)("button",{onClick:()=>this.setState({showLpTable:!this.state.showLpTable}),children:"Toggle Landing Page Table 1"}),(0,j.jsx)("button",{onClick:()=>this.setState({lpTableIgnoreQueryParams:!this.state.lpTableIgnoreQueryParams}),children:"toggle lpTableIgnoreQueryParams"}),(0,j.jsx)("button",{onClick:()=>this.setState({lpTableHighLevel:!this.state.lpTableHighLevel}),children:"toggle lpTableHighLevel"}),(0,j.jsx)("button",{onClick:()=>this.setState({lpTableQueryParams:!this.state.lpTableQueryParams}),children:"toggle lpTableQueryParams"}),this.state.showLpTable&&d,this.state.showLpTable2&&c,(0,j.jsx)(Ke,{billingCustomers:s})]}),s&&(0,j.jsx)(Me,{billingCustomers:s,showCustomConfig:this.state.showCustomConfig,showSubnet:this.state.showSubnet,showBCST:l})]})]})})}}function Me(e){let t=e.billingCustomers,r=e.showSubnet,a=e.showCustomConfig,i=e.showBCST;const o=Ce((0,L.t)("mode","auto"),1)[0],l=Ce(n.useState({}),2),s=l[0],d=l[1];n.useEffect(()=>{fetch("/debugbearadmin/support/blockedDomains").then(e=>e.json()).then(e=>d(e)).catch(e=>console.error(e))},[]);const c=e=>(s.blockedLabTestUrls||[]).some(t=>e.includes(t));return(0,j.jsxs)("div",{children:[(0,j.jsx)("br",{}),(0,j.jsx)("div",{className:"bc-list",children:(0,j.jsx)(P.A,{maxItemsToShow:500,items:t,keys:[],renderDetail
1:e=>(console.log("Detail",e),(0,j.jsxs)("div",{style:{paddingBottom:20},children:[(0,j.jsx)("pre",{children:e.note&&JSON.stringify(e.note.domainInfo,null,2)}),(0,j.jsxs)("div",{children:["City: ",e.note&&e.note.city]}),(0,j.jsxs)("div",{style:{marginTop:8},children:[(0,j.jsx)("div",{children:(0,j.jsx)("strong",{children:"Lab URLs to block:"})}),(()=>{const t=[],r=new Set;for(const n of e.projects.flatMap(e=>e.icons||[])){let e=n;try{e=new URL(n.startsWith("http")?n:"https://"+n).hostname}catch{}const a=n+"|"+e;r.has(a)||(r.add(a),t.push({url:n,domain:e}))}return t.map(e=>{let t=e.url,r=e.domain;const n=c(t),a=c(r);return(0,j.jsxs)("div",{style:{marginBottom:4},children:[(0,j.jsx)("span",{style:{color:n?"#999":void 0,textDecoration:n?"line-through":void 0},children:r})," ",n?(0,j.jsx)("span",{style:{color:"#888",fontSize:12},children:"(URL already blocked)"}):a?(0,j.jsx)("span",{style:{color:"#888",fontSize:12},children:"(domain already blocked)"}):(0,j.jsx)("button",{onClick:e=>{const t=e.currentTarget;t.disabled=!0,M.FH.adminBlockTestUrl(r).then(()=>{t.style.background="green"})},children:"Block scans"})]},t)})})()]}),(0,j.jsxs)("div",{style:{marginTop:8},children:[(0,j.jsx)("div",{children:(0,j.jsx)("strong",{children:"Emails to block:"})}),[...new Set(e.userAccesses.filter(e=>e.user&&e.user.email).map(e=>H(e.user.email)?e.user.email:"@"+e.user.email.split("@")[1]))].map(e=>(0,j.jsx)("div",{style:{marginBottom:4},children:(0,j.jsxs)("button",{onClick:t=>{const r=t.currentTarget;r.disabled=!0,M.FH.adminBlockEmailDomain(e).then(()=>{r.style.background="green"})},children:["Block ",e]})},e))]}),(0,j.jsxs)("div",{className:"p-2",style:{border:"1px solid #ddd"},children:[(0,j.jsx)("h2",{children:"Comments"}),(0,j.jsx)(Y,{billingCustomerId:e.id})]}),(0,j.jsx)(We,{billingCustomer:e}),(0,j.jsx)(Be,{billingCustomer:e}),e.projects[0]&&(0,j.jsx)(He,{projectId:e.projects[0]&&e.projects[0].id}),e.userAccesses.map(e=>e.user?(0,j.jsx)("div",{children:(0,j.jsx)(Ee,{user:e.user})},e.user.id):null),(0,j.jsx)(Ue,{billingCustomerId:e.id}),(0,j.jsx)("button",{onClick:t=>{let r=t.target;r.disabled=!0,r.style.background="gray",M.FH.adminNotifyUpcomingDeletion(e.id).then(()=>{r.style.background="green"})},children:"Notify acc will be deleted"}),(0,j.jsx)("br",{}),"general trial end",(0,j.jsx)("input",{type:"date",defaultValue:e.freeTrialEnd.split("T")[0],onBlur:t=>{let r=t.target;const n=new Date(t.target.value);M.FH.adminUpdateBillingCustomer(e.id,{freeTrialEnd:n}).then(()=>{r.style.background="lime"})}}),"rum trial end",(0,j.jsx)("input",{type:"date",defaultValue:e.rumTrialEnd?e.rumTrialEnd.split("T")[0]:"",onBlur:t=>{let r=t.target;const n=new Date(t.target.value);M.FH.adminUpdateBillingCustomer(e.id,{rumTrialEnd:n}).then(()=>{r.style.background="lime"})}}),(0,j.jsx)("br",{}),(0,j.jsx)("a",{href:"/debugbearadmin/deleteBillingCustomer/"+e.id,children:"Delete bc"}),(0,j.jsx)("pre",{children:JSON.stringify(e.note.activation,null,2)})]})),extraColumns:[{title:"id",render:e=>(0,j.jsx)("a",{href:"/debugbearadmin/billingCustomer/"+e.id,children:e.id})},{title:"planName",render:e=>(0,j.jsxs)("div",{children:[(0,j.jsx)("div",{children:e.planName}),e.chargebeeAddons&&(0,j.jsx)("div",{children:e.chargebeeAddons.map((e,t)=>(0,j.jsxs)("div",{style:{background:"green",borderRadius:4,color:"white",marginTop:2},children:[e.quantity,"x ",e.id]},t))}),"freeTrial"===e.planName&&e.hasEverBoughtSubscription&&(0,j.jsx)("div",{style:{background:"#008067",color:"white",fontWeight:"bold"},children:"Former customer"})]})},{title:"Created",render:e=>(0,k.Yq)(e.createdAt,!0)},{title:"TrialEnd",render:e=>(0,k.Yq)(e.freeTrialEnd,!0)},{title:"P",render:e=>(0,j.jsx)(n.Fragment,{children:e.projects.slice(0,5).map(e=>(0,j.jsxs)("a",{href:Z.DS.projectUrl(e.id),children:["P"," "]},e.id))})},{title:"u",render:e=>{var t,l,s;const d=[];return["deletionScheduledFor","paymentOverdueSince","paidPlanExpiresAt","accountDeletedAt","accountMarkedForDeletionAt"].forEach(t=>{e[t]&&d.push(t+": "+(0,k.Yq)(e[t],!0))}),e.customConfig.customerLogoUseOptOut&&d.push("Logo optout"),e.ssoOrganizationId&&d.push("SSO: "+e.ssoOrganizationId),e.note.isTemporaryEmail&&d.push("Temp email"),(0,j.jsxs)(n.Fragment,{children:[(i||e.accountDeletedAt)&&(0,j.jsxs)(j.Fragment,{children:[(0,k.ex)(e.note.landingPage||"",120,20),(0,j.jsx)("br",{}),(0,k.ex)((e.note.initialReferrer||"").replace("https://",""),120,20),(0,j.jsx)("br",{})]}),e.suspendedEmail&&(0,j.jsx)("div",{style:{color:"white",padding:4,background:"freeTrial"===e.planName?"red":"#b58900"},children:"Suspended Email"}),e.userAccesses.map(t=>{var r,n,a,i,l;if(!t.user)return null;const s=t.user.email.split("@")[1];return(0,j.jsxs)("div",{children:[(0,j.jsxs)("div",{style:{float:"right",display:"flex"},children:[(0,j.jsx)("div",{style:{fontSize:10,background:null!==(r=e.note.activation)&&void 0!==r&&r.createdPage?"#36c5de":"#ddd",width:20,color:"white",opacity:.75,borderRadius:4,marginLeft:2},children:"Syn"}),(0,j.jsx)("div",{style:{fontSize:10,background:null!==(n=e.note.activation)&&void 0!==n&&n.createdRumSnippet?"#8deb8d":"#ddd",width:20,color:"white",opacity:.75,borderRadius:4,marginLeft:2},children:"R0"}),(0,j.jsx)("div",{style:{fontSize:10,background:null!==(a=e.note.activation)&&void 0!==a&&a.installedRumSnippet?"#26d126":"#ddd",width:20,color:"white",opacity:.75,borderRadius:4,marginLeft:2},children:"R1"}),(0,j.jsx)("div",{style:{fontSize:10,background:null!==(i=e.note.activation)&&void 0!==i&&i.invitedUser?"#52ceea":"#ddd",width:20,color:"white",opacity:.75,borderRadius:4,marginLeft:2},children:"T"})," ",(0,j.jsx)("div",{style:{fontSize:10,background:null!==(l=e.note.activation)&&void 0!==l&&l.seenAfter1Day?"#3fa715ff":"#ddd",width:20,color:"white",opacity:.75,borderRadius:4,marginLeft:2},children:"1D"})]}),(0,j.jsxs)("a",{href:`/debugbearadmin/userLogs/${t.user.id}`,target:"_blank",rel:"noreferrer",children:[t.user.name," ",t.user.lastName]})," <",(0,j.jsx)("a",{href:`/debugbearadmin/sentEmails?email=${encodeURIComponent(t.user.email)}`,target:"_blank",rel:"noreferrer",children:t.user.email}),">"," ",(0,j.jsxs)("span",{style:{opacity:Date.now()-new Date(t.user.createdAt).getTime()>1728e5&&Date.now()-new Date(t.user.lastSeen).getTime()>2592e5?.5:void 0},children:["| seen ",(0,k.uT)(t.user.lastSeen)," (",(0,k.Yq)(t.user.lastSeen),")"]}),"sales"===o&&(0,j.jsxs)("div",{children:[(0,j.jsxs)("a",{href:"https://"+s,target:"_blank",rel:"noreferrer",children:["Open ",s]})," ","|"," ",(0,j.jsx)("a",{href:`https://www.linkedin.com/search/results/all/?keywords=${encodeURIComponent(t.user.name+" "+t.user.lastName+" "+t.user.email.split("@")[1].split(".")[0])}&origin=GLOBAL_SEARCH_HEADER`,target:"_blank",rel:"noreferrer",children:"Search name on Linkedin"})]})]},t.user.id)}),"sales"===o&&(null===(t=e.note.domainInfo)||void 0===t||null===(t=t.about)||void 0===t?void 0:t.totalEmployees)&&(0,j.jsxs)("div",{children:["Employee Count:"," ",null===(l=e.note.domainInfo)||void 0===l||null===(l=l.about)||void 0===l?void 0:l.totalEmployees]}),e.note.relatedBillingCustomerId&&(0,j.jsxs)("div",{children:["Related BC:"," ",(0,j.jsx)("a",{href:`/debugbearadmin/bcSummary?bcId=${e.note.relatedBillingCustomerId}`,target:"_blank",rel:"noreferrer",children:e.note.relatedBillingCustomerId})]}),a&&(0,j.jsx)(ze,{bc:e}),r&&(0,j.jsx)(Ve,{bc:e}),d.map(e=>(0,j.jsx)("div",{className:"bc-summary__badge",children:e},e)),"number"==typeof e.note.ipScore&&e.note.ipScore>30&&(0,j.jsxs)("div",{style:{color:e.note.ipScore>30?"red":"#333"},children:["IP Score: ",e.note.ipScore]}),(0,j.jsxs)("div",{className:"color-coldGrey1 scale-small-1 text-break",children:["Lab: ",e.projects.map(e=>e.icons).join(", ")," | RUM:"," ",e.projects.flatMap(e=>{var t;return(null===(t=e.rumSnippets)||void 0===t?void 0:t.flatMap(e=>{var t;return null===(t=e.dataDomains)||void 0===t?void 0:t.map(e=>e.replace(/https:\/\//g,""))}))||[]}
1).filter(Boolean).join(", "),"| CrUX:"," ",e.projects.map(e=>null==e?void 0:e.cruxHistoryOrigins).join(", "),null!==(s=e.quickTestUrls)&&void 0!==s&&s.length?(0,j.jsxs)(j.Fragment,{children:[" | Quick tests: ",e.quickTestUrls.join(", ")]}):null]})]})}},{title:"country",render:e=>e.note.country},{title:"ch",render:e=>(0,j.jsxs)("div",{children:[(0,j.jsx)("span",{style:{fontSize:12},children:e.note.how}),e.discountCode?(0,j.jsx)("div",{style:{padding:2,background:"red",color:"white"},children:e.discountCode}):null,(0,j.jsx)(oe,{height:40,defaultValue:e.note.channel,saveValue:t=>M.FH.adminUpdateBillingCustomerNote(e.note.id,{channel:t})})]})},{title:"tags",render:e=>(0,j.jsx)("div",{children:(0,j.jsx)(oe,{height:40,defaultValue:e.note.tags.join(","),saveValue:t=>M.FH.adminUpdateBillingCustomerNote(e.note.id,{tags:t.split(",")})})})}]})})]})}function Pe(e){e=new Date(e),(e=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()))).setUTCDate(e.getUTCDate()+4-(e.getUTCDay()||7));const t=new Date(Date.UTC(e.getUTCFullYear(),0,1)),r=Math.ceil(((e-t.valueOf())/864e5+1)/7);return{year:e.getUTCFullYear(),week:r}}function Ne(e,t){if("channel"===t)return e.note.channel.split(",")[0];{let r=!1;t.includes("-deep")&&(r=!0,t=t.replace("-deep",""));const n=e.note.tags.find(e=>e.startsWith(t+"."));return n?r?n.replace(t+".",""):n.replace(t+".","").split(".")[0]:"other"}}const Ie=["viewedProject","createdPage","seenAfter1Day","seenAfter3Days","seenAfter7Days","invitedUser","renamedProject","createdRumSnippet","installedRumSnippet","createLabBudget","createRumBudget","addChatIntegration","createCustomDashboard","runQuickTest","createdUptimeMonitor","connectMcp"];function De(e){let t=e.bcs;return(0,j.jsxs)("div",{style:{marginBottom:20},children:[(0,j.jsx)("h3",{children:"Conversion Rates Overview"}),(0,j.jsxs)("table",{className:"table table-striped",children:[(0,j.jsx)("thead",{children:(0,j.jsxs)("tr",{children:[(0,j.jsx)("th",{children:"Conversion Type"}),(0,j.jsx)("th",{children:"Conversions"}),(0,j.jsx)("th",{children:"Total"}),(0,j.jsx)("th",{children:"Rate"})]})}),(0,j.jsx)("tbody",{children:["createdPage","createdRumSnippet","installedRumSnippet","seenAfter1Day","seenAfter7Days","purchase"].map(e=>{const r=(e=>{const r=t.length;let n=0;"purchase"===e?n=t.filter(e=>e.hasEverBoughtSubscription).length:Ie.includes(e)&&(n=t.filter(t=>{var r;return null===(r=t.note)||void 0===r||null===(r=r.activation)||void 0===r?void 0:r[e]}).length);const a=r>0?n/r*100:0;return{total:r,converted:n,rate:Math.round(10*a)/10}})(e);return(0,j.jsxs)("tr",{children:[(0,j.jsx)("td",{children:e}),(0,j.jsx)("td",{children:r.converted}),(0,j.jsx)("td",{children:r.total}),(0,j.jsxs)("td",{children:[r.rate,"%"]})]},e)})})]})]})}function Oe(e){const t=e.bcs,r=e.conversionFilter,a=e.setConversionFilter,i=Ce(n.useState("overview"),2),o=i[0],l=i[1],s=Ce(n.useState("month"),2),d=s[0],c=s[1],u=Ce(n.useState(!1),2),h=u[0],m=u[1],p=Ce(n.useState(!1),2),g=p[0],b=p[1],f=Ce(n.useState("channel"),2),v=f[0],y=f[1],x=Ce(n.useState("purchase"),2),w=x[0],S=x[1],T=[],C=(0,q.uniq)(t.map(e=>Ne(e,v)));let A,k=null;function Z(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r="sum";t||(r="month"===(arguments.length>2?arguments[2]:void 0)?z.h[new Date(e[0].createdAt).getMonth()]+" "+new Date(e[0].createdAt).getFullYear():Pe(e[0].createdAt).week.toString()+" "+new Date(e[0].createdAt).getFullYear());const n={date:t?new Date(2050,0,1):new Date(e[0].createdAt),monthString:r};function a(e,t){const r=t.filter(k),a=r.length,i=t.length;"all"===e&&(n[e+"_signupEmails"]=t.map(Le).join(", "),n[e+"_conversionEmails"]=r.map(Le).join(", "),new Date(n.date).setDate(1)),n[e+"_signupCount"]=i,n[e+"_conversionCount"]=a;const o=Math.round(a/i*1e3)/10;n[e+"_conversionRate"]=o}return a("all",e),C.forEach(t=>{const r=e.filter(e=>function(e,t){return"channel"===v?e.note.channel===t:Ne(e,v)===t}(e,t));a(t,r)}),n}"purchase"===w?k=e=>e.hasEverBoughtSubscription:Ie.includes(w)?k=e=>e.note.activation[w]:alert("unknown conversiontype"),A="month"===d?(0,q.groupBy)(t,e=>new Date(e.createdAt).getMonth()+"_"+new Date(e.createdAt).getFullYear()):(0,q.groupBy)(t,e=>Pe(e.createdAt).week+"_"+new Date(e.createdAt).getFullYear());let M=Object.values(A).map(e=>Z(e,null,d));function N(e){const t=isNaN(e)?"-":e.toString();let r=1;return"-"!==t&&"0"!==t||(r=.3),(0,j.jsx)("div",{style:{opacity:r},children:t})}
1return M.push(Z(t,"sum")),M=(0,q.sortBy)(M,e=>e.date),console.log(M),"overview"===o?["signupCount","conversionCount","conversionRate"].forEach(e=>{T.push({title:e,render:t=>N(t["all_"+e])})}):["all",...C].forEach(e=>{T.push({title:e,render:t=>N(t[e+"_"+o])})}),(0,j.jsxs)("div",{children:["group by ",(0,j.jsx)("button",{onClick:()=>c("week"),children:"week"}),(0,j.jsx)("button",{onClick:()=>c("month"),children:"month"}),"categories"," ",(0,j.jsx)("button",{onClick:()=>y("channel"),children:"channel"}),(0,j.jsx)("button",{onClick:()=>y("role"),children:"role"}),(0,j.jsx)("button",{onClick:()=>y("role-deep"),children:"role-deep"}),(0,j.jsx)("button",{onClick:()=>y("co"),children:"co"}),(0,j.jsx)("button",{onClick:()=>y("co-deep"),children:"co-deep"}),(0,j.jsx)("br",{}),(0,j.jsx)("button",{onClick:()=>l("overview"),children:"overview"}),(0,j.jsx)("button",{onClick:()=>l("signupCount"),children:"signupCount"}),(0,j.jsx)("button",{onClick:()=>l("conversionCount"),children:"conversionCount"}),(0,j.jsx)("button",{onClick:()=>l("conversionRate"),children:"conversionRate"}),(0,j.jsx)("br",{}),"Conversion:"," ",["purchase",...Ie].map(e=>(0,j.jsx)("button",{onClick:()=>S(e),children:e},e)),(0,j.jsx)("br",{}),"Conversion filter: ",r," ",(0,j.jsx)("button",{onClick:()=>a(w),children:"include"}),(0,j.jsx)("button",{onClick:()=>a("!"+w),children:"exclude"}),(0,j.jsx)("button",{onClick:()=>a(null),children:"reset"}),(0,j.jsx)("br",{}
1),(0,j.jsx)(P.A,{items:M,keys:["monthString"],renderDetail:e=>(0,j.jsx)("div",{style:{padding:10,wordBreak:"break-all"},children:(0,j.jsx)(P.A,{items:(0,q.sortBy)(Object.entries(e),e=>Ce(e,1)[0]),keys:["0","1"]})}),extraColumns:T}),(0,j.jsx)("button",{onClick:()=>m(!h),children:"toggle count chart"}),h&&(0,j.jsx)(Fe,{info:M,channels:C}),(0,j.jsx)("button",{onClick:()=>b(!g),children:"toggle conversionchart"}),g&&(0,j.jsx)(Re,{info:M,conversionType:w})]})}function Re(e){let t=e.info,r=e.conversionType;console.log({info:t,conversionType:r});const n=[{name:r,data:t.slice(0,-1).map(e=>e.all_conversionRate)}];console.log(n);const a={chart:{type:"line",height:500},title:{text:""},xAxis:{categories:t.map(e=>e.monthString)},yAxis:{min:0,stackLabels:{enabled:!0,style:{fontWeight:"bold"}}},plotOptions:{column:{stacking:"normal",dataLabels:{enabled:!0,formatter:function(){return this.y+" "+this.series.name}}}},series:n};return(0,j.jsx)("div",{children:(0,j.jsx)(B.F,{options:a})})}function Fe(e){let t=e.info,r=e.channels;const a=Ce(n.useState(!1),2),i=a[0],o=a[1];t=t.slice(),i?t=[t[t.length-1]]:t.pop(),i&&(r=(0,q.sortBy)(r,e=>t[0][e+"_signupCount"]||0));const l=r.map(e=>({name:e,data:t.map(t=>t[e+"_signupCount"]||0)}));console.log(l);const s={chart:{type:"column",height:800},title:{text:""},xAxis:{categories:t.map(e=>e.monthString)},yAxis:{min:0,stackLabels:{enabled:!0,style:{fontWeight:"bold"}}},plotOptions:{column:{stacking:"normal",dataLabels:{enabled:!0,formatter:function(){return this.y+" "+this.series.name}}}},series:l};return(0,j.jsxs)("div",{children:[(0,j.jsx)("button",{onClick:()=>o(!i),children:"toggle all vs breakdown"}),(0,j.jsx)(B.F,{options:s})]})}function Le(e){for(const t of e.userAccesses)if(t.user)return t.user.email;return""}class We extends n.PureComponent{render(){const e=this.props.billingCustomer,t=e&&e.note&&e.note.level;return(0,j.jsxs)("div",{children:["level ",t,[0,1,2,3,4,5].map(r=>(0,j.jsx)("button",{onClick:t=>{t.target.style.background="orange",M.FH.adminUpdateBillingCustomerNote(e.note.id,{level:r})},style:{background:r===t?"red":""},children:r},r))]})}}class Be extends n.PureComponent{render(){const e=this.props.billingCustomer;return(0,j.jsxs)("div",{children:["Next checkin:"," ",e.note.nextCheckInDate&&(0,j.jsx)("input",{type:"date",defaultValue:e.note.nextCheckInDate.split("T")[0],onBlur:t=>{const r=new Date(t.target.value);M.FH.adminUpdateBillingCustomerNote(e.note.id,{nextCheckInDate:r})}}),[0,1,3,5,14,21,28,90,5e3].map(t=>(0,j.jsxs)("button",{onClick:r=>{r.target.style.background="orange",M.FH.adminUpdateBillingCustomerNote(e.note.id,{nextCheckInDate:new Date((new Date).valueOf()+t*k.ec)})},children:["in ",t," days"]},t))]})}}class Ee extends n.PureComponent{render(){const e=this.props.user;return(0,j.jsxs)("div",{children:[e.name," ",e.lastName," | ",e.email]})}}class He extends n.PureComponent{constructor(e){super(e),Te(this,"state",{quotas:null}),M.FH.getBillingCustomerQuotaDetailsFromProjectId(e.projectId).then(e=>this.setState({quotas:e}))}render(){const e=this.state.quotas;return e?(0,j.jsx)("div",{children:(0,j.jsxs)("b",{children:["Expected usage:"," ",e.analyses.predictedScheduledMonthlyAnalyses/e.analyses.quota*1e3/10,"%"]})}):null}}class Ue extends n.Component{constructor(){super(...arguments),Te(this,"state",{bcUsers:null})}async componentDidMount(){this.setState({bcUsers:await M.FH.adminGetBillingCustomerUsers(this.props.billingCustomerId)})}render(){const e=this.state.bcUsers;return e?(0,j.jsx)(P.A,{keys:["name","lastName","email"],extraColumns:[{title:"created",render:e=>(0,j.jsx)("span",{children:(0,k.Yq)(e.createdAt,!0)})},{title:"last seen",render:e=>(0,j.jsx)("span",{children:(0,k.Yq)(e.lastSeen,!0)})},{title:"ip at creation",render:e=>(0,j.jsx)("span",{children:e.ipAtAccountCreation})},{title:"login",render:e=>(0,j.jsx)("div",{children:(0,j.jsx)("button",{onClick:t=>{let r=t.target;r.disabled=!0,Se(e.id,{isReadOnly:!1}).then(e=>{const t=document.createElement("a");t.textContent="quick login",t.href=e.url,r.parentElement.prepend(t),r.remove()})},children:"Quick link"})})},{title:"Delete",render:e=>(0,j.jsx)("a",{href:"/debugbearadmin/deleteUser/"+e.id,children:"D"})}],items:e}):"loading bc users"}}class ze extends n.Component{render(){const e=this.props.bc,t=e.customConfig&&"analysis-next"===e.customConfig.analysisVersionOverride;return(0,j.jsx)("div",{children:(0,j.jsxs)("form",{className:"special-form",onSubmit:t=>{const r=t.target;t.preventDefault();try{const t=JSON.parse(r.querySelector("textarea").value);console.log({newCustomConfig:t}
1),r.style.background="blue",M.FH.adminUpdateBillingCustomer(e.id,{customConfig:t}).then(()=>{r.background="wheat"})}catch(e){alert("failed to update "+e.message)}},children:[(0,j.jsx)("b",{children:"Custom config"}),(0,j.jsx)("textarea",{style:{width:500,height:20},defaultValue:JSON.stringify(e.customConfig)}),(0,j.jsx)("button",{type:"submit",children:"update"}),t?(0,j.jsx)("button",{type:"submit",onClick:t=>{const r=t.target,n=e.customConfig||{};delete n.analysisVersionOverride,r.parentElement.querySelector("textarea").value=JSON.stringify(n)},children:"reset v next"}):(0,j.jsx)("button",{type:"submit",onClick:t=>{const r=e.customConfig||{},n=t.target;r.analysisVersionOverride="analysis-next",n.parentElement.querySelector("textarea").value=JSON.stringify(r)},children:"use v next"})]})})}}class Ve extends n.Component{render(){const e=this.props.bc;return(0,j.jsx)("div",{children:(0,j.jsxs)("form",{className:"special-form",onSubmit:t=>{t.preventDefault();const r=t.target,n=r.querySelector("input[type='text']").value;r.style.background="blue",M.FH.adminUpdateBillingCustomer(e.id,{subnet:n}).then(()=>{r.background="wheat"})},children:[(0,j.jsx)("b",{children:"Subnet"}),(0,j.jsx)("input",{type:"text",style:{width:500,height:20},defaultValue:e.subnet}),(0,j.jsx)("button",{type:"submit",children:"update"}),["net1","net2","any","auto","hmm do we need something like net1_2 for both sets of IP addresses?"].map(e=>(0,j.jsx)("button",{type:"submit",onClick:t=>{t.target.parentNode.querySelector("input[type='text']").value=e},children:e},e))]})})}}function Ge(){const e=(0,a.Zp)();return(0,j.jsxs)("label",{className:"ml-2",children:[(0,j.jsx)("input",{type:"checkbox",checked:!!(0,T.v)().hidePersonal,onChange:t=>{e((0,E.O$)(location.pathname,{...(0,T.v)(),hidePersonal:t.target.checked?"true":""}))}}),"Hide personal emails"]})}function qe(){const e=(0,a.Zp)();return(0,j.jsxs)("label",{className:"ml-2",children:[(0,j.jsx)("input",{type:"checkbox",checked:!!(0,T.v)().hideDeleted,onChange:t=>{e((0,E.O$)(location.pathname,{...(0,T.v)(),hideDeleted:t.target.checked?"true":""}))}}),"Hide deleted"]})}function $e(){const e=(0,a.Zp)();return(0,j.jsxs)("label",{className:"ml-2",children:[(0,j.jsx)("input",{type:"checkbox",checked:!!(0,T.v)().hideSuspended,onChange:t=>{e((0,E.O$)(location.pathname,{...(0,T.v)(),hideSuspended:t.target.checked?"true":""}))}}),"Hide suspended emails"]})}function Xe(){const e=(0,a.Zp)();return(0,j.jsxs)("label",{className:"ml-2",children:[(0,j.jsx)("input",{type:"checkbox",checked:!!(0,T.v)().excludeLowConvertingCountries,onChange:t=>{e((0,E.O$)(location.pathname,{...(0,T.v)(),excludeLowConvertingCountries:t.target.checked?"true":""}))}}),"Exclude low converting countries"]})}function _e(){const e=(0,a.Zp)();return(0,j.jsx)("div",{children:(0,j.jsxs)("label",{children:[(0,j.jsx)("input",{type:"checkbox",checked:!!(0,T.v)().showBCST,onChange:t=>{e((0,E.O$)(location.pathname,{...(0,T.v)(),showBCST:t.target.checked?"true":""}))}}),"Show landing page and referrer"]})})}function Je(e){let t=e.beforeOrAfter;const r=(0,a.Zp)(),n=(0,F.I)(),i="after"===t?"createdAfter":"createdBefore",o=n.get(i),l=o?new Date(o).toISOString().split("T")[0]:"after"===t?"2018-01-01":"2027-01-01";return(0,j.jsxs)("div",{children:[i,":"," ",(0,j.jsx)("input",{type:"date",defaultValue:l,onBlur:e=>r((0,E.O$)(location.pathname,{...(0,T.v)(),[i]:new Date(e.target.value).toISOString()}))},l)]})}function Ye(e){let t=e.navigate;const r=(0,F.I)().get("createdAfter"),n=e=>`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}T00:00:00.000Z`,a=e=>{let a;if(r){const e=new Date(r);a=new Date(e.getFullYear(),e.getMonth(),1)}else{const e=new Date;a=new Date(e.getFullYear(),e.getMonth(),1)}const i="prev"===e?-1:1,o=new Date(a.getFullYear(),a.getMonth()+i,1),l=new Date(o.getFullYear(),o.getMonth()+1,1);t((0,E.O$)(location.pathname,{...(0,T.v)(),createdAfter:n(o),createdBefore:n(l)}))};return(0,j.jsxs)("div",{className:"ml-2 d-flex",children:[(0,j.jsx)("button",{onClick:()=>{const e=new Date,r=new Date(e.getFullYear(),e.getMonth()-1,1),a=new Date(e.getFullYear(),e.getMonth(),1);t((0,E.O$)(location.pathname,{...(0,T.v)(),createdAfter:n(r),createdBefore:n(a)}))},children:"Last Month"}),(0,j.jsx)("button",{className:"ml-1",onClick:()=>a("prev"),children:"< Prev"}),(0,j.jsx)("button",{className:"ml-1",onClick:()=>a("next"),children:"Next >"})]})}function Ke(e){let t=e.billingCustomers;const r=Ce((0,L.t)("showCountryBreakdown",!1),2),a=r[0],i=r[1],o=Ce(n.useState(null),2),l=o[0],s=o[1],d=!!(0,T.v)().excludeLowConvertingCountries;if(!a)return(0,j.jsx)("button",{onClick:()=>i(!0),children:"Show country breakdown"});const c=(0,q.groupBy)(t,e=>e.note.country||"n/a");return(0,j.jsx)("div",{className:"mt-2",children:(0,j.jsx)(W.mY,{columns:{country:{heading:{title:"Country"},render:e=>e.country,getSortByValue:e=>e.country},trials:{heading:{title:"Trials"},render:e=>e.count,getSortByValue:e=>e.count},conversionCount:{heading:{title:"Conversions"},render:e=>e.conversionCount,getSortByValue:e=>e.conversionCount},conversionRate:{heading:{title:"Conversion Rate"},render:e=>Math.round(1e3*e.conversionRate)/10+"%",getSortByValue:e=>e.conversionRate}},sortByColumn:l,onSortByChange:s,items:Object.entries(c).map(e=>{let t=Ce(e,2),r=t[0],n=t[1];const a=n.filter(e=>e.hasEverBoughtSubscription).length;return{country:r,count:n.length,conversionCount:a,conversionRate:a/n.length}}).filter(e=>!d||e.conversionCount>=2)})})}function Qe(e){let t=e.billingCustomers;const r=Ce(n.useState({}),2),a=r[0],i=r[1];n.useEffect(()=>{fetch("/debugbearadmin/support/blockedDomains").then(e=>e.json()).then(e=>i(e)).catch(e=>console.error(e))},[]);const o={};t.filter(e=>
1"freeTrial"===e.planName).forEach(e=>{e.projects.forEach(t=>{(t.icons||[]).forEach(r=>{o[r]=o[r]||[],o[r].push({bc:e,p:t})})})});const l=(0,q.sortBy)(Object.entries(o).map(e=>{let t=Ce(e,2),r=t[0],n=t[1];const a=new Map;for(const e of n)a.has(e.bc.id)||a.set(e.bc.id,e);const i=Array.from(a.values());return{domain:r,count:i.length,items:i}}),e=>-e.count);return(0,j.jsxs)("div",{children:["(free trial lab test domains)",(0,j.jsx)(P.A,{items:l.slice(0,125),keys:[],extraColumns:[{title:"Domain",render:e=>{const t=a.blockedLabTestUrls&&a.blockedLabTestUrls.includes(e.domain);return(0,j.jsx)("span",{style:{color:t?"#999":void 0,textDecoration:t?"line-through":"none"},children:e.domain})}},{title:"Count",render:e=>(0,j.jsx)("span",{children:e.items.length})},{title:"bcs",render:e=>e.items.map((e,t)=>(0,j.jsxs)("span",{children:[(0,j.jsxs)("a",{target:"_blank",rel:"noreferrer",href:`/debugbearadmin/bcSummary?bcId=${e.bc.id}`,children:[e.bc.id,e.bc.suspendedEmail&&(0,j.jsx)("span",{style:{color:"red"},children:"_S "})]})," "]},t))}]})]})}var et=r(32485),tt=r.n(et),rt=r(30225),nt={};function at(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,o,l=[],s=!0,d=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){d=!0,a=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw a}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return it(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?it(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function it(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function ot(){const e=(0,a.FE)()[0],t=at(n.useState(null),2),r=t[0],i=t[1],o=at(n.useState([]),2),l=o[0],s=o[1],d=at(n.useState([]),2),c=d[0],u=d[1];if(n.useEffect(()=>{M.FH.adminGetBillingCustomer(e.params.billingCustomerId).then(e=>i(e))},[]),n.useEffect(()=>{M.FH.adminGetBillingCustomerAllUsers(e.params.billingCustomerId).then(e=>s(e))},[]),n.useEffect(()=>{M.FH.adminGetBillingCustomerRecentlyDeletedPages(e.params.billingCustomerId).then(u)},[]),!r)return(0,j.jsx)(A.y,{});const h=l.filter(e=>e.billingCustomersIds.length>1).length;return(0,j.jsxs)(C.K7,{children:[(0,j.jsx)("h1",{children:r.name}),(0,j.jsx)("pre",{children:JSON.stringify(r,null,2)}),(0,j.jsx)("br",{}),(0,j.jsx)("br",{}),(0,j.jsx)("h2",{children:"Mostly for non chargebee customers"}),(0,j.jsx)("h3",{children:"Change plan to"}),(0,j.jsxs)("p",{children:["This doesn't charge any money, but it changes the plan and starts a new billing period.",(0,j.jsx)("br",{}),(0,j.jsx)("br",{}),"You may also want to set disableManageSubscription in the custom config, so that the user can't access chargebee if for example they paid by bank transfer."]}),["pro-feb2024","pro-yearly-feb2024","essential-jun2022","essential-yearly-jun2022","corporate-aug2020","corporate-yeary-aug2020","corporate-yearly-apr2022","corporate-apr2022","corporate-jun2023","corporate-yearly-jun2023","enterprise-1"].map(e=>(0,j.jsx)("button",{onClick:()=>{M.FH.adminUpdatePlan(r.id,e).then(()=>alert("ok"))},children:e},"planId")),(0,j.jsx)("br",{}),(0,j.jsx)("h3",{children:"Cancel"}),(0,j.jsx)("button",{onClick:()=>{M.FH.adminCancelPlan(r.id).then(()=>alert("ok"))},children:"Cancel plan"}),(0,j.jsx)("br",{}),(0,j.jsx)("h2",{children:"Reset payment overdue"}),(0,j.jsx)("button",{onClick:()=>{M.FH.adminResetOverduePayment(r.id).then(()=>alert("ok"))},children:"Reset payment overdue since"}),(0,j.jsx)("h2",{children:"SSO"}),(0,j.jsx)("br",{}),"allowShareLinks: ",r.allowShareLinks+"",(0,j.jsx)("br",{}),(0,j.jsx)("br",{}),"SSO ID: ",r.ssoOrganizationId,(0,j.jsx)("button",{onClick:e=>{e.target.style.background="gray";const t=prompt("Enter SSO Organization ID");
1t?M.FH.adminEnableSso(r.id,t).then(()=>{e.target.style.background="green"}):alert("Won't set")},children:"enable sso"}),(0,j.jsxs)("div",{children:[(0,j.jsx)("br",{}),(0,j.jsx)("h3",{children:"Users"}),!!h&&(0,j.jsxs)("div",{className:"users-bc-warning",children:[h," users have access to multiple billing accounts."]}),!r.hasUserControl&&(0,j.jsx)("div",{className:"users-bc-warning",children:(0,j.jsx)("button",{onClick:()=>{M.FH.adminEnableBillingCustomerUserControl(r.id).then(e=>{let t=e.users,r=e.bc;s(t),i(r),alert("ok")})},children:"Enable user control"},"planId")}),(0,j.jsx)(P.A,{items:l,keys:["id","name","email","controllingBillingCustomerId"],extraColumns:[{title:"oauth providers",render:e=>e.providers.join(", ")||"none"},{title:"billing customers ids",render:e=>(0,j.jsx)("span",{className:tt()({"users-bc-list":e.billingCustomersIds.length>1}),children:e.billingCustomersIds.map(e=>(0,j.jsxs)("span",{children:[(0,j.jsx)("a",{href:`/debugbearadmin/billingCustomer/${e}`,children:e}),","," "]},e))})}]})]}),(0,j.jsxs)("div",{children:[(0,j.jsx)("br",{}),(0,j.jsx)("h3",{children:"Recently deleted pages"}),!c.length&&(0,j.jsx)("div",{children:"Billing customer has no recently deleted pages."}),!!c.length&&(0,j.jsx)(P.A,{items:c,keys:[],extraColumns:[{title:"Project Id",render:e=>(0,j.jsx)("a",{href:`/project/${e.projectId}`,target:"_blank",rel:"noreferrer",children:e.projectId})},{title:"Project name",render:e=>e.projectName},{title:"Page name",render:e=>e.pageName},{title:"Deleted at",render:e=>e.pageDeletedAt},{title:"Actions",render(e){return(0,j.jsx)("button",{onClick:(t=e.pageId,function(){M.FH.adminRecoverRecentlyDeletedPage(t).then(()=>{const e=c.filter(e=>e.pageId!==t);u(e),alert("ok")})}),children:"undo deletion"});var t}}]})]})]})}nt.styleTagTransform=v(),nt.setAttributes=p(),nt.insert=h().bind(null,"head"),nt.domAPI=c(),nt.insertStyleElement=b(),s()(rt.A,nt),rt.A&&rt.A.locals&&rt.A.locals;var lt=r(94430);function st(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function dt(){let e=(i=n.useState(null),o=2,function(e){if(Array.isArray(e))return e}(i)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,o,l=[],s=!0,d=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){d=!0,a=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw a}}return l}}(i,o)||function(e,t){if(e){if("string"==typeof e)return st(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?st(e,t):void 0}}(i,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),t=e[0],r=e[1];var i,o;const l=(0,F.I)(),s=(0,a.Zp)(),d=l.get("type")||"",c=l.get("summary")||"",u=l.get("contentColumn")||"",h=l.get("exclude")||"";n.useEffect(()=>{M.FH.getDebugEvents({type:d,summary:c}).then(e=>r(e))},[d,c]);const m=JSON.parse(JSON.stringify(t));h&&m&&(m.events=m.events.filter(e=>!JSON.stringify(e).includes(h)));let p=null;if(m){const e=(0,q.groupBy)(m.events,e=>e.summary),t=(0,q.sortBy)(Object.entries(e),e=>e[1].length),r=(0,q.groupBy)(m.events,e=>{var t;return null===(t=e.content)||void 0===t?void 0:t.email}),n=(0,q.sortBy)(Object.entries(r),e=>e[1].length),a=(0,q.groupBy)(m.events,e=>e.content[u]),i=(0,q.sortBy)(Object.entries(a),e=>e[1].length);p=(0,j.jsxs)("div",{children:[(0,j.jsxs)("h3",{children:["Count by summary (",t.length," unique summaries)"]}),t.map(e=>(0,j.jsxs)("tr",{children:[(0,j.jsx)("td",{children:e[0]}),(0,j.jsx)("td",{children:e[1].length})]},e[0])),(0,j.jsxs)("h3",{children:["Count by email (",n.length," unique emails)"]}),n.map(e=>(0,j.jsxs)("tr",{children:[(0,j.jsx)("td",{children:e[0]}),(0,j.jsx)("td",{children:e[1].length})]},e[0])),(0,j.jsxs)("h3",{children:["Count content columns (",i.length," unique values)"]}),i.map(e=>(0,j.jsxs)("tr",{children:[(0,j.jsx)("td",{children:e[0]}),(0,j.jsx)("td",{children:e[1].length})]},e[0]))]})}return(0,j.jsxs)(C.K7,{header:(0,j.jsx)(lt.V,{}),fullWidth:!0,children:[!m&&(0,j.jsx)(A.y,{}),m&&(0,j.jsxs)("div",{children:["Type",(0,j.jsx)("input",{type:"text",defaultValue:d,onChange:e=>{const t=e.target.value;l.set("type",t),s(location.pathname+"?"+l.toString())}}),"Summary",(0,j.jsx)("input",{type:"text",defaultValue:c,onChange:e=>{const t=e.target.value;l.set("summary",t),s(location.pathname+"?"+l.toString())}}),"Content column",(0,j.jsx)("input",{type:"text",defaultValue:u,onChange:e=>{const t=e.target.value;l.set("contentColumn",t),s(location.pathname+"?"+l.toString())}}),"Exclude",(0,j.jsx)("input",{type:"text",defaultValue:h,onChange:e=>{const t=e.target.value;l.set("exclude",t),s(location.pathname+"?"+l.toString())}}),(0,j.jsx)("br",{}),(0,j.jsx)("br",{}),"Count/Limit: ",m.events.length,"/",m.limit,(0,j.jsx)("br",{}),(0,j.jsx)("br",{}),(0,j.jsx)("h2",{children:"Stats:"}),p,(0,j.jsx)("br",{}),(0,j.jsx)("br",{}),(0,j.jsx)("style",{children:"td { border: 1px solid #ddd; font-size: 13px; padding: 2px; word-break: break-all;}"}),(0,j.jsxs)("table",{children:[(0,j.jsxs)("tr",{children:[(0,j.jsx)("th",{children:"ID"}),(0,j.jsx)("th",{children:"CreatedAt"}),(0,j.jsx)("th",{children:"Type"}),(0,j.jsx)("th",{children:"Summary"}),(0,j.jsx)("th",{style:{width:"50%"},children:"Content"}),(0,j.jsx)("th",{children:"ContentColumn"})]}),m.events.map(e=>(0,j.jsxs)("tr",{children:[(0,j.jsx)("td",{children:e.id}),(0,j.jsx)("td",{children:e.createdAt}),(0,j.jsx)("td",{children:e.type}),(0,j.jsx)("td",{children:e.summary}),(0,j.jsx)("td",{children:JSON.stringify(e.content,null,2)}),(0,j.jsx)("td",{children:e.content[u]})]},e.id))]})]})]})}class ct extends n.Component{constructor(e){super(e),this.state={emails:null,alerts:null,isUpdating:!1},M.FH.adminGetQueuedEmails().then(e=>{this.setState({emails:e})})}render(){(0,i.wE)("emails");const e=this.state.emails;return e?(0,j.jsx)(C.K7,{children:(0,j.jsx)(P.A,{items:e,keys:["id","emailType","userId","didReject","shouldDelay"],extraColumns:[{title:"to",render:e=>{if(e.sendgridMessage)return e.sendgridMessage.to}},{title:"createdAt",render:e=>{if(e.createdAt)return(0,k.uT)(new Date(e.createdAt))}},{title:"sentAt",render:e=>{if(e.sentAt)return(0,k.uT)(new Date(e.sentAt))}},{title:"title",render:e=>{if(e.sendgridMessage)return e.sendgridMessage.subject||e.sendgridMessage.dynamic_template_data.subject}},{title:"resend now",render:e=>e.sentAt?(0,j.jsx)("button",{onClick:t=>{const r=t.target;r.disabled=!0,M.FH.adminResendEmail(e.id).then(()=>{r.textContent="done"})},children:"resend"}):null},{title:"reject",render:e=>{if(e.shouldDelay&&!e.sentAt&&!e.didReject)return(0,j.jsx)("button",{onClick:t=>{const r=t.target;r.disabled=!0,M.FH.adminRejectEmail(e.id).then(()=>{r.remove()})},children:"Reject"})}}]})}):null}}function ut(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function ht(){const e=(a=n.useState(null),o=2,function(e){if(Array.isArray(e))return e}(a)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,o,l=[],s=!0,d=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){d=!0,a=e}
1finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw a}}return l}}(a,o)||function(e,t){if(e){if("string"==typeof e)return ut(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ut(e,t):void 0}}(a,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),t=e[0],r=e[1];var a,o;return n.useEffect(()=>{M.FH.adminGetRecentFreeTests(parseFloat((0,T.v)().count)).then(r)},[]),(0,i.wE)("Recent Free Tests"),t?(0,j.jsxs)(C.K7,{header:(0,j.jsx)(lt.V,{}),fullWidth:!0,children:[(0,j.jsx)("div",{children:"Add ?count=400 query param or to load more tests"}),(0,j.jsx)("h1",{className:"mb-2",children:"Recent free tests"}),(0,j.jsx)(P.A,{items:t,keys:[{id:"id",render:e=>(0,j.jsx)("a",{href:`/test/website-speed/${e}`,children:e})},{id:"url",render:e=>(0,j.jsx)("a",{href:e,target:"_blank",rel:"noopener noreferrer nofollow",children:e})},"state",{id:"createdAt",render:e=>(0,k.r6)(new Date(e))},{id:"completedAt",render:e=>e?(0,k.r6)(new Date(e)):(0,j.jsx)("i",{children:"not completed"})},{id:"country",render:e=>e||(0,j.jsx)("i",{children:"no country"})},{id:"userAgent",render:e=>e?(0,j.jsx)("span",{className:"scale-small-2",children:e}):(0,j.jsx)("i",{children:"no userAgent"})},{id:"ip",render:e=>e||(0,j.jsx)("i",{children:"no IP"})},{id:"email",render:e=>e||(0,j.jsx)("i",{children:"no user"})}]})]}):(0,j.jsx)("div",{className:"d-flex align-items-center justify-content-center",children:(0,j.jsx)(A.y,{})})}function mt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,o,l=[],s=!0,d=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){d=!0,a=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw a}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return pt(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?pt(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}const gt=1200,bt=630,ft=164,vt=75/56,yt=70/73;function xt(e){return`bold ${e}px Roboto, "Helvetica Neue", Arial, sans-serif`}function jt(e,t,r){const n=[];let a="";for(const i of t.split(/\s+/).filter(Boolean)){const t=a?`${a} ${i}`:i;a&&e.measureText(t).width>r?(n.push(a),a=i):a=t}return a&&n.push(a),n}function wt(e,t){if(!t.length)return{ascent:0,descent:0};const r=e.measureText(t[0]),n=e.measureText(t[t.length-1]);return{ascent:r.actualBoundingBoxAscent,descent:n.actualBoundingBoxDescent}}function St(){const e=n.useRef(null),t=mt(n.useState("Implement Website Best Practices With Lighthouse"),2),r=t[0],a=t[1],i=mt(n.useState(null),2),o=i[0],l=i[1],s=mt(n.useState(""),2),d=s[0],c=s[1],u=mt(n.useState(1),2),h=u[0],m=u[1],p=mt(n.useState(null),2),g=p[0],b=p[1],f=mt(n.useState(!1),2),v=f[0],y=f[1],x=mt(n.useState(!1),2),w=x[0],S=x[1];n.useEffect(()=>{const e=new Image;e.width=136,e.height=146,e.onload=()=>b(e),e.src="/public/landing/logo-white-border.svg"},[]),n.useEffect(()=>{const e=document.fonts;null!=e&&e.load?Promise.all([e.load(xt(56)),e.load(xt(26))]).catch(()=>{}).then(()=>y(!0)):y(!0)},[]),n.useEffect(()=>{e.current&&function(e,t){let r=t.title,n=t.image,a=t.logo,i=t.scale;const o=e.getContext("2d");if(o){if(o.clearRect(0,0,gt,bt),o.fillStyle="#f5f9fb",o.fillRect(0,0,gt,bt),o.fillStyle="#0b415f",o.fillRect(0,0,gt,ft),r.trim()){const e=function(e,t){let r=null;for(let n=56;n>=26;n-=1){e.font=xt(n);const a=jt(e,t,982),i=Math.round(n*vt);r={lines:a,fontSize:n,lineHeight:i};const o=wt(e,a),l=o.ascent,s=o.descent;if(l+i*(a.length-1)+s<=140)return r}return r}(o,r.trim()),t=e.lines,n=e.fontSize,a=e.lineHeight;o.font=xt(n);const i=wt(o,t),l=i.ascent,s=i.descent,d=l+a*(t.length-1)+s,c=(ft-d)/2+l;o.fillStyle="#ffffff",o.textAlign="left",o.textBaseline="alphabetic",t.forEach((e,t)=>{o.fillText(e,30,c+t*a)})}if(a){const e=Math.min(141.82857142857145,146),t=e*yt,r=1042+(136-t)/2,n=(ft-e)/2;o.drawImage(a,r,n,t,e)}
1if(n){const e=ft,t=466,r=1120,a=t-80,l=Math.min(r/n.naturalWidth,a/n.naturalHeight,1),s=n.naturalWidth*l*i,d=n.naturalHeight*l*i;o.save(),o.beginPath(),o.rect(0,e,gt,t),o.clip(),o.drawImage(n,(gt-s)/2,e+(t-d)/2,s,d),o.restore()}}}(e.current,{title:r,image:o,logo:g,scale:h})},[r,o,g,h,v]);const T=n.useCallback(e=>{if(!e||!e.type.startsWith("image/"))return;const t=URL.createObjectURL(e),r=new Image;r.onload=()=>{l(r),c(e.name),m(1),URL.revokeObjectURL(t)},r.onerror=()=>URL.revokeObjectURL(t),r.src=t},[]);return n.useEffect(()=>{const e=e=>{var t,r;const n=Array.from(null!==(t=null===(r=e.clipboardData)||void 0===r?void 0:r.items)&&void 0!==t?t:[]).find(e=>e.type.startsWith("image/"));var a;n&&T(null!==(a=n.getAsFile())&&void 0!==a?a:void 0)};return window.addEventListener("paste",e),()=>window.removeEventListener("paste",e)},[T]),(0,j.jsxs)(C.U5,{children:[(0,j.jsx)("h1",{className:"mb-1",style:{fontWeight:500},children:"Open Graph Image Maker"}),(0,j.jsxs)("div",{className:"color-coldGrey1 scale-small-1 mb-3",children:["Generates a ",gt,"x",bt," social sharing image. Everything runs in the browser — nothing is uploaded."]}),(0,j.jsxs)("div",{className:"d-flex",style:{gap:24,flexWrap:"wrap"},children:[(0,j.jsxs)("div",{style:{flex:"1 1 320px",minWidth:300},children:[(0,j.jsx)("label",{className:"d-block mb-1",htmlFor:"og-title",children:"Title"}),(0,j.jsx)("textarea",{id:"og-title",className:"w-100 mb-3",rows:3,value:r,onChange:e=>a(e.currentTarget.value),placeholder:"Post title"}),(0,j.jsx)("label",{className:"d-block mb-1",children:"Image"}),(0,j.jsx)("div",{onDragOver:e=>{e.preventDefault(),S(!0)},onDragLeave:()=>S(!1),onDrop:e=>{e.preventDefault(),S(!1),T(e.dataTransfer.files[0])},onClick:()=>{var e;return null===(e=document.getElementById("og-file"))||void 0===e?void 0:e.click()},style:{border:"2px dashed "+(w?"#0b415f":"#ccc"),background:w?"#f5f9fb":void 0,borderRadius:6,padding:24,textAlign:"center",cursor:"pointer"},children:d?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("div",{children:d}),(0,j.jsxs)("div",{className:"color-coldGrey1 scale-small-1 mt-1",children:[null==o?void 0:o.naturalWidth,"x",null==o?void 0:o.naturalHeight," — drop, paste, or click to replace"]})]}):(0,j.jsx)("div",{className:"color-coldGrey1",children:"Drop an image here, paste one, or click to pick a file"})}),(0,j.jsx)("input",{type:"file",id:"og-file",accept:"image/*",className:"d-none",onChange:e=>{var t;return T(null===(t=e.currentTarget.files)||void 0===t?void 0:t[0])}}),o&&(0,j.jsxs)("div",{className:"mt-3",children:[(0,j.jsxs)("label",{className:"d-block mb-1",htmlFor:"og-scale",children:["Image scale: ",h.toFixed(2),"x"]}),(0,j.jsx)("input",{id:"og-scale",type:"range",min:.25,max:3,step:.05,value:h,className:"w-100",onChange:e=>m(Number(e.currentTarget.value))}),(0,j.jsx)("button",{className:"btn btn-secondary btn-sm mt-1",onClick:()=>m(1),children:"Reset scale"})]}),(0,j.jsx)("div",{className:"mt-4",children:(0,j.jsx)("button",{className:"btn btn-primary",onClick:function(){const t=e.current;t&&t.toBlob(e=>{if(!e)return;const t=URL.createObjectURL(e),n=document.createElement("a");n.href=t,n.download=`${function(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||"og-image"}(r)}.png`,n.click(),URL.revokeObjectURL(t)},"image/png")},children:"Export PNG"})})]}),(0,j.jsxs)("div",{style:{flex:"2 1 560px",minWidth:320},children:[(0,j.jsx)("label",{className:"d-block mb-1",children:"Preview"}),(0,j.jsx)("canvas",{ref:e,width:gt,height:bt,style:{width:"100%",maxWidth:gt,height:"auto",border:"1px solid #ddd",borderRadius:4}})]})]})]})}function Tt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Ct(){const e=(0,a.g)().projectId,t=Number(e),r=(s=n.useState(null),d=2,function(e){if(Array.isArray(e))return e}(s)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,o,l=[],s=!0,d=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){d=!0,a=e}
1finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw a}}return l}}(s,d)||function(e,t){if(e){if("string"==typeof e)return Tt(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Tt(e,t):void 0}}(s,d)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=r[0],l=r[1];var s,d;if(n.useEffect(()=>{Number.isFinite(t)&&M.FH.adminGetProjectQuickTests(t).then(l)},[t]),(0,i.wE)(`Quick Tests – Project ${t}`),!o)return(0,j.jsx)("div",{className:"d-flex align-items-center justify-content-center",style:{minHeight:"80vh"},children:(0,j.jsx)(A.y,{})});const c=new Map;for(const e of o.pgBossJobs){var u,h;const t=null===(u=e.data)||void 0===u?void 0:u.quickTestId;if("number"!=typeof t)continue;const r=null!==(h=c.get(t))&&void 0!==h?h:[];r.push(e),c.set(t,r)}return(0,j.jsxs)(C.K7,{header:(0,j.jsx)(lt.V,{}),fullWidth:!0,children:[(0,j.jsxs)("h1",{className:"mb-2",children:["Quick tests – Project ",(0,j.jsx)("a",{href:`/project/${t}`,children:t})]}),(0,j.jsx)(P.A,{items:o.quickTests,keys:["id",{id:"url",render:e=>(0,j.jsx)("a",{href:e,target:"_blank",rel:"noopener noreferrer nofollow",children:e})},"region","deviceId",{id:"createdAt",render:e=>e?(0,j.jsx)(j.Fragment,{children:(0,k.r6)(new Date(e))}):(0,j.jsx)(j.Fragment,{})},{id:"completedAt",render:e=>e?(0,j.jsx)(j.Fragment,{children:(0,k.r6)(new Date(e))}):(0,j.jsx)("i",{children:"not completed"})},{id:"deletedAt",render:e=>e?(0,j.jsx)(j.Fragment,{children:(0,k.r6)(new Date(e))}):(0,j.jsx)(j.Fragment,{})},"storageKey"],extraColumns:[{title:"queue",render:e=>{var t;const r=null!==(t=c.get(e.id))&&void 0!==t?t:[],n=Array.from(new Set(r.map(e=>e.name)));return 0===n.length?(0,j.jsx)("i",{className:"scale-small-1 color-coldGrey1",children:"—"}):(0,j.jsx)("span",{className:"scale-small-1",children:n.join(", ")})}},{title:"pg-boss jobs",render:e=>{var t;const r=null!==(t=c.get(e.id))&&void 0!==t?t:[];return(0,j.jsx)("span",{className:"scale-small-1 color-coldGrey1",children:r.length})}}
1],renderDetail:e=>{var t;const r=null!==(t=c.get(e.id))&&void 0!==t?t:[];return(0,j.jsxs)("div",{className:"p-2",children:[(0,j.jsx)("div",{className:"mt-2 mb-1",children:(0,j.jsx)("b",{children:"pg-boss jobs"})}),0===r.length?(0,j.jsx)("i",{className:"scale-small-1",children:"none"}):(0,j.jsx)(P.A,{items:r,keys:["id","name","state","retryCount",{id:"createdOn",render:e=>e?(0,j.jsx)(j.Fragment,{children:(0,k.r6)(new Date(e))}):(0,j.jsx)(j.Fragment,{})},{id:"startedOn",render:e=>e?(0,j.jsx)(j.Fragment,{children:(0,k.r6)(new Date(e))}):(0,j.jsx)("i",{children:"—"})},{id:"completedOn",render:e=>e?(0,j.jsx)(j.Fragment,{children:(0,k.r6)(new Date(e))}):(0,j.jsx)("i",{children:"—"})}],extraColumns:[{title:"pulls",render:e=>{var t,r;const n=null!==(t=null===(r=e.data)||void 0===r?void 0:r.pulls)&&void 0!==t?t:[];return 0===n.length?(0,j.jsx)("i",{children:"—"}):(0,j.jsx)("ul",{style:{margin:0,paddingLeft:14},children:n.map((e,t)=>{const r=o.instanceIdByName[e.instanceName],n=new Date(e.pulledAt),a=r?`https://console.cloud.google.com/logs/query;query=%2528resource.type%3D%22gce_instance%22%20AND%20resource.labels.instance_id%3D%22${r}%22%2529%20OR%20%2528resource.type%3D%22global%22%20AND%20jsonPayload.instance.id%3D%22${r}%22%2529;timeRange=${n.toISOString()}%2F${n.toISOString()}--PT1H?folder=true&organizationId=339811428603&project=debugbear-us`:null;return(0,j.jsxs)("li",{className:"scale-small-1",children:[(0,k.r6)(n)," – ",e.instanceName,a&&(0,j.jsxs)(j.Fragment,{children:[" ",(0,j.jsx)("a",{href:a,target:"_blank",rel:"noreferrer",children:"View logs"})]})]},t)})})}}
1],renderDetail:e=>(0,j.jsx)("div",{style:{maxWidth:900,maxHeight:400,overflow:"auto"},children:(0,j.jsx)("pre",{style:{fontSize:11,margin:0},children:JSON.stringify(e,null,2)})})}),(0,j.jsx)("div",{className:"mt-3 mb-1",children:(0,j.jsx)("b",{children:"analysisInfo"})}),(0,j.jsx)("div",{style:{maxWidth:900,maxHeight:400,overflow:"auto"},children:(0,j.jsx)("pre",{style:{fontSize:11,margin:0},children:JSON.stringify(e.analysisInfo,null,2)})}),(0,j.jsx)("div",{className:"mt-3 mb-1",children:(0,j.jsx)("b",{children:"perfSummary"})}),e.perfSummary?(0,j.jsx)("div",{style:{maxWidth:900,maxHeight:400,overflow:"auto"},children:(0,j.jsx)("pre",{style:{fontSize:11,margin:0},children:JSON.stringify(e.perfSummary,null,2)})}):(0,j.jsx)("i",{className:"scale-small-1",children:"none"})]})}})]})}function At(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,o,l=[],s=!0,d=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){d=!0,a=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw a}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return kt(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?kt(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Zt(){const e=At(n.useState(null),2),t=e[0],r=e[1],l=At(n.useState(!1),2),s=l[0],d=l[1],c=(0,a.FE)()[0];n.useEffect(()=>{M.FH.adminGetRecentResults(parseFloat(c.params.pageLoadId),parseFloat((0,T.v)().maxCount||"50"),parseFloat((0,T.v)().offset||"0"),(0,T.v)().projectId?parseFloat((0,T.v)().projectId):null,void 0!==(0,T.v)().incompleteOnly,(0,T.v)().before?new Date((0,T.v)().before).toISOString():null).then(e=>{r(e)})},[]);let u=[];return u=[{title:"Admin",href:"#"}],(0,i.wE)("recentResults"),(0,j.jsx)("div",{children:(0,j.jsxs)("div",{children:[(0,j.jsx)(o.P,{items:u}),(0,j.jsxs)("div",{className:"content-container",children:[(0,j.jsx)("a",{href:"?maxCount=200",children:"show 200"}),(0,j.jsx)("a",{href:"?maxCount=200&offset=200",children:"show 200, offset 200"}),(0,j.jsx)("span",{children:"use ?projectId= to filter by project"}),(0,j.jsx)("span",{children:"use ?before= to filter by creation date"}),(0,j.jsx)("a",{href:"?maxCount=200&incompleteOnly",className:"btn btn-secondary btn-sm",children:"View incomplete tests"})," ",(0,j.jsx)("button",{onClick:()=>d(!0),children:"show delete+trigger"}),!t&&(0,j.jsx)(A.y,{}),t&&(0,j.jsx)("div",{children:(0,j.jsx)(P.A,{items:t,keys:["id","pageLoadAnalysisId","attemptCount","targetAttemptCount","queueName"],renderDetail
1:e=>{const t=e.pageLoadAnalysis,r=t.commitBranch,n=t.buildTitle,a=t.commitHash,i=t.baseBranch,o=t.isPrimary,l=t.baseHash;return(0,j.jsxs)("div",{style:{padding:10},children:[(0,j.jsx)("div",{children:JSON.stringify({commitBranch:r,buildTitle:n,commitHash:a,baseBranch:i,baseHash:l,isPrimary:o})}),(0,j.jsx)(P.A,{items:e.analysisAttempts,keys:["createdAt","id"],renderDetail:e=>{let t;try{t=JSON.parse(e.analysisInfo)}catch(e){t=e.message}return(0,j.jsxs)("pre",{style:{padding:20,whiteSpace:"pre-wrap",wordWrap:"break-word"},children:[JSON.stringify(t,null,2),e.log]})},extraColumns:[{title:"serverId",render:e=>(0,j.jsx)("a",{href:"/debugbearadmin/attempts/"+e.serverId,children:e.serverId})},{title:"failureType",render:e=>e.failureType},{title:"failureDetails",render:e=>(0,j.jsxs)("div",{children:[JSON.stringify(e.failureDetails).slice(0,200)," ","| ",e.debugMeta]})},{title:"GCE logs",render:e=>(0,j.jsx)("a",{href:`/debugbearadmin/viewAttemptLogs/${e.id}`,children:"Go"})}]})]})},extraColumns:[{title:"period",render:e=>e.pageLoadAnalysis&&e.pageLoadAnalysis.period&&(0,k.r6)(new Date(e.pageLoadAnalysis.period))},{title:"trigger",render:e=>e.pageLoadAnalysis&&e.pageLoadAnalysis.analysisTrigger},{title:"createdAt",render:e=>(0,k.w_)(new Date(e.createdAt))},{title:"url",render:e=>{const t=e.analysisAttempts.map(e=>{try{return JSON.parse(e.analysisInfo).pageLoad.url}catch(e){return e.message}});let r=e.pageLoadAnalysis&&e.pageLoadAnalysis.pageLoad&&e.pageLoadAnalysis.pageLoad.url;return t[0]&&(r=t[0]),(0,j.jsx)("div",{style:{wordBreak:"break-word"},children:r})}},{title:"endTime",render:e=>{const t=new Date(e.endTime).valueOf()-new Date(e.createdAt).valueOf();return(0,j.jsxs)("div",{children:[(0,k.uT)(new Date(e.endTime)),(0,j.jsxs)("div",{className:"scale-small-1",title:`Endtime: ${(0,k.w_)(e.endTime)}`,children:["Dur: ",(0,k.MH)(t)]})]})}},{title:"PL",render:e=>e.pageLoadAnalysis&&e.pageLoadAnalysis.pageLoad?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("a",{href:Z.DS.pageLoadUrl(e.pageLoadAnalysis.pageLoad.projectId,e.pageLoadAnalysis.pageLoad.id),children:"PL"}),(0,j.jsx)("a",{href:`/viewResult/${e.pageLoadAnalysis.id}`,style:{color:"gray",fontSize:10},children:"vr"})]}):"-"},{title:"attempts",render:e=>(0,j.jsx)("div",{children:e.analysisAttempts.map(e=>{let t="n/a",r={};try{r=JSON.parse(e.debugMeta)||{}}catch(e){}return e.responseReceivedAt&&(t=Math.round((new Date(e.responseReceivedAt).valueOf()-new Date(e.createdAt).valueOf())/1e3)),(0,j.jsxs)("span",{style:{fontWeight:r.didAccept?"bold":void 0},children:[e.id+"_"+e.failureType+(e.failureDetails&&e.failureDetails.failureCode?"_"+e.failureDetails.failureCode:"")+(r.didAccept?"_acc":"")+"_"+t," "]},e.id)})})},{title:"-",render:e=>(0,j.jsx)("button",{onClick:()=>{console.log(e),e.analysisAttempts.forEach(e=>{console.log(e),console.log(e.log)})},children:"Log this"})},{title:"delete",render:e=>(0,j.jsxs)(j.Fragment,{children:[!s&&(0,j.jsx)("button",{onClick:t=>{const r=t.target;r.style.background="red",M.FH.deletePageLoadAnalysis(e.pageLoadAnalysis.id).then(()=>{r.remove()})},children:"delete"}),s&&(0,j.jsx)("button",{onClick:t=>{const r=t.target;r.style.background="red",r.remove(),M.FH.deletePageLoadAnalysis(e.pageLoadAnalysis.id),M.FH.triggerAnalysis(e.pageLoadAnalysis.pageLoad.id)},children:"delete and trigger"})]})}]})})]})]})})}var Mt=r(93823);async function Pt(e,t,r){let n="string"==typeof e?""===e?"body":e.replace(/(:[^\d])/g,"\\$1").replace(/(!)/g,"\\!").replace(/:(\d+)+/g,":nth-child($1)"):null;n&&(n=n.replace(/##/g,"#\\#"));const a=n?n.split(">"):null,i=a&&a.filter(e=>!/\.\d/.test(e)&&!/#\d/.test(e)).filter(e=>!(e.includes("[")||e.includes("]"))).filter(e=>!/\//.test(e)).map(e=>e.includes("#")?e.split(":nth")[0]:e);n=i&&i.join(">");let o,l=!1,s=n;o=h(s),o||(document.documentElement.scrollTop=4e3,await new Promise(e=>setTimeout(e,1e3)),document.documentElement.scrollTop=0,await new Promise(e=>setTimeout(e,1e3)),o=h(s));let d="";if(o||(s=function(e){const t=(i||[]).slice(-5),r=(i||[]).slice(0,-5);return console.log("shorter selector",e),r.filter(e=>e.includes("#")).join(" ")+" "+t.join(">")}(s),o=h(s)),o||(s=u(i),o=h(s)),o||(s=function(e,t){const r=t.findIndex(e=>e.includes("#"));return-1===r?e:t.slice(r).map(e=>/\..*\d/.test(e)?e.split(".")[0]:e.split(":")[0]).join(" ")}(s,i),o=h(s)),!o){const e=u(i).split(" ");for(let t=0;t<e.length-1&&(s=e.filter((e,r)=>r!==t).join(" "),o=document.querySelector(s),!o);t++);}if(o&&(d=s),o||(o=function(){const e=Array.from(document.querySelectorAll("img[alt]")).slice(0,2e3).filter(e=>e.getAttribute("alt").includes(r));console.log("matching elementText",e.length);return e[0]||null}(),l=!0,o&&(d="Text: "+r)),o||(o=function(){if(!t)return null;return Array.from(document.querySelectorAll("*")).slice(0,2e3).filter(e=>{if("IMG"===e.tagName&&e.src)return e.src===t;let r=getComputedStyle(e).backgroundImage;return r&&"none"!==r?(console.log("found bg image",r),r.includes(t)):void 0}).filter(m)[0]||null}
1(),o&&(d="Image: "+t)),!o)return{status:"error",selector:n};!function(e){const t=e.getBoundingClientRect();document.elementsFromPoint(t.x+t.width/2,t.y+t.height/2).forEach(t=>{if(!e.contains(t)&&e!==t&&!t.contains(e)){var r;const n=Array.from(document.querySelectorAll("*")).filter(e=>"fixed"===getComputedStyle(e).position).find(e=>e.contains(t)||e===t);if(n&&n.contains(e))return;if(console.log("Has overlapping element",null==t||null===(r=t.outerHTML)||void 0===r?void 0:r.slice(0,100),"pos",getComputedStyle(t).position),n){const e=n.getBoundingClientRect(),t=0===e.left&&e.width===window.innerWidth&&0===e.top&&e.height===window.innerHeight;n.style.opacity=t?0:.1}else"absolute"===getComputedStyle(t).position&&(console.log("setting position abs opacity to 0.1"),t.style.opacity=.1)}})}(o);const c=document.createElement("style");return c.innerHTML="\n            /* Prevent smooth scrolling*/\n            * {\n              scroll-behavior: auto !important;\n            }\n          ",document.body.appendChild(c),document.documentElement.scrollTop=o.getBoundingClientRect().top-window.innerHeight,await new Promise(e=>setTimeout(e,500)),{status:"ok",includeElementTextLater:l,sizeInfo:{element:JSON.parse(JSON.stringify(o.getBoundingClientRect())),window:{width:window.innerWidth,height:window.innerHeight},testId:o.dataset.elementlookupTest||null},usedLookup:d};function u(e){return e.map(e=>e.split(":")[0]).join(" ")}function h(e){return(e?Array.from(document.querySelectorAll(e)).filter(m):[])[0]||null}function m(e){return e.getBoundingClientRect().width>0}}function Nt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function It(){var e;const t=JSON.parse(decodeURIComponent((0,T.v)().data)),r=(o=n.useState(null),l=2,function(e){if(Array.isArray(e))return e}(o)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,o,l=[],s=!0,d=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){d=!0,a=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw a}}return l}}(o,l)||function(e,t){if(e){if("string"==typeof e)return Nt(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Nt(e,t):void 0}}(o,l)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=r[0],i=r[1];var o,l;n.useEffect(()=>{i(null),M.FH.getRumElement(location.href.includes("localhost")?10:2,t).then(e=>i(e))},[]);const s=`const lookup = ${Pt.toString()};\nconsole.log(\n  await lookup(\n    "${t.path}"   ,\n    ${t.imageUrl?`"${t.imageUrl}"`:"null"},\n    ${t.elementText?`"${t.elementText}"`:"null"},\n    "${t.path}".split(">")\n  )\n)`;return(0,j.jsxs)(C.U5,{children:[(0,j.jsx)("div",{children:(0,j.jsx)("pre",{children:JSON.stringify(t,null,2)})}),(0,j.jsxs)("div",{children:["For findElement testing:"," ",(0,j.jsx)("button",{onClick:e=>{navigator.clipboard.writeText(s),e.target.textContent="ok"},children:"copy"}),(0,j.jsx)("pre",{style:{maxHeight:100,overflow:"auto"},children:s})]}),(0,j.jsx)("div",{style:{width:400,border:"1px solid gray"},children:a?(0,j.jsx)(Mt.iN,{screenshotInfo:a}):(0,j.jsx)(_.v,{})}),(null==a?void 0:a.debug)&&(0,j.jsxs)("div",{children:[(0,j.jsx)("h2",{children:"Debug data"}),"Final URL: ",null==a||null===(e=a.debug)||void 0===e?void 0:e.finalUrl,(0,j.jsx)("br",{}),(0,j.jsx)("br",{})]}),(0,j.jsx)("h2",{children:"Screenshot info"}),(0,j.jsx)("div",{children:(0,j.jsx)("pre",{children:JSON.stringify(a,null,2)})})]})}r(96906);var Dt=r(35262),Ot=r(47490),Rt=r(58233),Ft=r(49463),Lt={};function Wt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,o,l=[],s=!0,d=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){d=!0,a=e}
1finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw a}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Bt(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Bt(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Bt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Et(){const e=Wt(n.useState(!1),2),t=e[0],r=e[1],a=Wt(n.useState(null),2),i=a[0],o=a[1],l=Wt((0,L.t)("experienceId",""),2),s=l[0],d=l[1];return n.useEffect(()=>{s&&async function(e){r(!0),await M.FH.adminGetRumExperience(e).then(e=>{o(e),r(!1)})}(s)},[s]),(0,j.jsxs)(C.K7,{header:(0,j.jsx)(lt.V,{}),fullWidth:!0,children:[(0,j.jsx)("h3",{children:"Search RUM Page Views"}),(0,j.jsx)(Rt.l1,{initialValues:{experienceIdField:s},onSubmit:e=>{let t=e.experienceIdField;d(t)},validateOnBlur:!1,children:()=>(0,j.jsx)(Rt.lV,{children:(0,j.jsx)(Dt.x,{className:"flex-grow-1",input:(0,j.jsx)(j.Fragment,{children:(0,j.jsx)(Rt.D0,{name:"experienceIdField",style:{marginTop:0,height:"44px"},placeholder:"Experience ID",className:"flex-grow-1"})}),button:(0,j.jsx)(Ot.b,{title:"Search",isSubmitting:t,style:{minWidth:"10rem",fontSize:"20px"},className:"btn-blue"})})})}),(0,j.jsx)(Ht,{result:i})]})}function Ht(e){var t,r;let n=e.result;if(!n)return(0,j.jsx)(j.Fragment,{});if(n&&!n.pageViews)return(0,j.jsx)("div",{className:"results pt-3",children:"No data found"});const i=n.pageViews[0];return(0,j.jsxs)("div",{className:"py-5 px-2",children:[(0,j.jsxs)("div",{className:"d-flex flex-row mb-4",children:[(0,j.jsx)("h2",{className:"scale-base",children:"Experience:"}),(0,j.jsxs)("div",{className:"flex-shrink-1 mx-4",children:[i.urlPath,null!==(t=JSON.parse(i.data))&&void 0!==t&&t.query?`?${JSON.parse(i.data).query}`:"",(0,j.jsx)("br",{}),(0,j.jsx)("span",{className:"color-coldGrey2 scale-small-1",children:(0,k.r6)(new Date(i.date),{excludeYear:!0,shortMonth:!1})})]}),(0,j.jsx)("div",{children:(0,j.jsx)(a.N_,{to:`/project/${null===(r=n.snippet)||void 0===r||null===(r=r.project)||void 0===r?void 0:r.id}/rum/trends?device=&info=views&id=${i.experienceId}`,className:"btn btn-primary",children:"View in Dashboard"})})]}),(0,j.jsx)(Ut,{pageViews:n.pageViews})]})}function Ut(e){let t=e.pageViews;const r={sendIndex:{heading:{title:"Send Index",style:{width:100}},render:e=>(0,j.jsxs)("div",{style:{fontWeight:500},className:"color-blue1",children:["#",e.sendIndex]})},date:{heading:{title:"Date",alignRight:!0},render:e=>(0,j.jsx)("div",{className:"color-coldGrey2 scale-small-1",children:e.date&&(0,k.r6)(new Date(e.date),{excludeYear:!0,shortMonth:!0})})}};return(0,j.jsx)(W.mY,{noDetailsPadding:!0,items:t,getItemKey:function(e){return e.sendIndex.toString()},noMatchingItemsMessage:"No matching items.",columns:r,ItemDetailsRenderer:zt})}function zt(e){let t=e.item;return(0,j.jsxs)("div",{className:"rum-page-view-search__details row p-3",children:[(0,j.jsx)("div",{className:"col-md-8 p",children:(0,j.jsx)("table",{className:"",width:"100%",children:(0,j.jsx)("tbody",{children:Object.entries(t).map((e,t)=>(0,j.jsx)(Vt,{record:e},t))})})}),(0,j.jsx)("div",{className:"col-md-4",children:(0,j.jsxs)("div",{className:"json-export pt-2",children:[(0,j.jsx)("pre",{children:JSON.stringify(t,null,2)}),(0,j.jsx)("button",{className:"mt-2",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(t,null,2))},children:"Copy JSON"})]})})]})}function Vt(e){let t=e.record;"data"==t[0]&&(t[1]=JSON.parse(t[1]));const r=!(!(0,q.isObject)(t[1])&&"data"!==t[0]);return(0,j.jsxs)("tr",{children:[(0,j.jsx)("th",{children:t[0]}),(0,j.jsx)("td",{children:r?(0,j.jsx)("pre",{style:{maxHeight:400},children:JSON.stringify(t[1],null,2)}):null===t[1]?(0,j.jsx)("i",{children:"NULL"}):t[1]})]})}Lt.styleTagTransform=v(),Lt.setAttributes=p(),Lt.insert=h().bind(null,"head"),Lt.domAPI=c(),Lt.insertStyleElement=b(),s()(Ft.A,Lt),Ft.A&&Ft.A.locals&&Ft.A.locals;var Gt=r(19158),qt=r(27083),$t=r(44954);function Xt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,o,l=[],s=!0,d=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){d=!0,a=e}
1finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw a}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return _t(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_t(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _t(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Jt(e){let t=e.rumSnippets;const r=Xt(n.useState(!0),2),a=r[0],i=r[1],o=Xt(n.useState("all"),2),l=o[0],s=o[1],d=Xt((0,L.t)("sorting","viewCount"),2),c=d[0],u=d[1];let h=t.filter(e=>!a||e.pageViews>0).filter(e=>{var t;if("all"===l)return!0;const r=null===(t=e.project)||void 0===t||null===(t=t.billingCustomer)||void 0===t?void 0:t.planName;var n,a;return"payingForRum"===l?"freeTrial"!==r&&(null===(n=e.currentUsagePeriod)||void 0===n?void 0:n.rumPageViewLimit)>0:"freeTrial"===l?"freeTrial"===r:"payingNonRum"===l?"freeTrial"!==r&&0===(null===(a=e.currentUsagePeriod)||void 0===a?void 0:a.rumPageViewLimit):void 0});return"viewCount"===c&&(h=(0,q.sortBy)(h,e=>-e.pageViews)),"usagePct"===c&&(h=(0,q.sortBy)(h,e=>-Yt(e))),(0,j.jsxs)("div",{children:[(0,j.jsx)("h2",{children:"List"}),(0,j.jsx)("div",{children:(0,j.jsx)("button",{className:"btn btn-primary btn-sm",onClick:()=>i(!a),children:"toggle show with page views only"})}),(0,j.jsxs)("div",{style:{marginTop:8,marginBottom:8},children:["Show bc:",(0,j.jsxs)("select",{value:l,onChange:e=>s(e.target.value),children:[(0,j.jsx)("option",{value:"all",children:"All"}),(0,j.jsx)("option",{value:"payingForRum",children:"Paying for RUM"}),(0,j.jsx)("option",{value:"payingNonRum",children:"Paying, but not for RUM"}),(0,j.jsx)("option",{value:"freeTrial",children:"Free Trial"})]})]}),(0,j.jsxs)("div",{style:{marginTop:8,marginBottom:8},children:["Sorting:",(0,j.jsxs)("select",{value:c,onChange:e=>u(e.target.value),children:[(0,j.jsx)("option",{value:"auto",children:"Auto"}),(0,j.jsx)("option",{value:"viewCount",children:"View count"}),(0,j.jsx)("option",{value:"usagePct",children:"usage percentage"})]})]}),(0,j.jsx)(P.A,{items:h,keys:["key","projectId"],extraColumns:[{title:"Created",render:e=>(0,j.jsxs)("div",{children:[(0,k.Yq)(e.createdAt),e.deletedAt&&(0,j.jsx)("div",{style:{color:"red"},children:"DELETED"})]})},{title:"Project",render:e=>{var t;return(0,j.jsxs)(j.Fragment,{children:[null===(t=e.project)||void 0===t?void 0:t.name,e.dataDomains&&(0,j.jsx)("div",{className:"scale-small-2",children:e.dataDomains.join(", ")})]})}},{title:"BC",render:e=>{var t,r;return(0,j.jsx)("a",{href:`/debugbearadmin/bcSummary?bcId=${null===(t=e.project)||void 0===t||null===(t=t.billingCustomer)||void 0===t?void 0:t.id}`,children:null===(r=e.project)||void 0===r||null===(r=r.billingCustomer)||void 0===r?void 0:r.name})}},{title:"Plan",render:e=>Kt(e)},{title:"rum trial end",render:e=>{var t,r;const n=(null===(t=e.project)||void 0===t||null===(t=t.billingCustomer)||void 0===t?void 0:t.rumTrialEnd)||(null===(r=e.project)||void 0===r||null===(r=r.billingCustomer)||void 0===r?void 0:r.freeTrialEnd);return n?(0,k.Yq)(n,!0):"n/a"}},{title:"Sampling",render:e=>{var t;return null===(t=e.config)||void 0===t?void 0:t.sampling}},{title:"key",render:e=>e.key},{title:"Script",render:e=>{var t;return(null===(t=e.config)||void 0===t?void 0:t.scriptVersion)||"stable"}},{title:"View",render:e=>(0,j.jsx)("a",{href:`/project/${e.projectId}/rum/trends`,children:"Go"})},{title:"Alerts",render:e=>(0,j.jsx)("a",{href:`/debugbearadmin/rumAlert/${e.key}`,children:"View"})},{title:"7d page views",render:e=>(0,k.Ke)(e.pageViews)},{title:"last7DayViewCount",render:e=>(0,k.Ke)(e.last7DayViewCount)},{title:"last1DayViewCount",render:e=>(0,k.Ke)(e.last1DayViewCount)},{title:"Current Usage",render:e=>e.currentUsagePeriod?(0,k.Ke)(e.currentUsagePeriod.rumPageViewCount):""},{title:"Usage %",render:e=>{if(!e.currentUsagePeriod||!e.currentUsagePeriod.rumPageViewLimit)return"";const t=Math.round(e.currentUsagePeriod.rumPageViewCount/e.currentUsagePeriod.rumPageViewLimit*1e4)/100;return t?t+"%":""}},{title:"Projection",render:e=>(0,k.Ke)((0,$t.p4)(e.last7DayViewCount))},{title:"Projected Usage",render:e=>{const t=Yt(e);return t?t+"%":""}}
1],renderDetail:e=>(0,j.jsx)("pre",{children:JSON.stringify(e,null,2)})})]})}function Yt(e){return e.currentUsagePeriod&&e.currentUsagePeriod.rumPageViewLimit?Math.round((0,$t.p4)(e.last7DayViewCount)/e.currentUsagePeriod.rumPageViewLimit*1e4)/100:0}function Kt(e){var t,r,n,a;const i=null===(t=e.project)||void 0===t||null===(t=t.billingCustomer)||void 0===t||null===(t=t.chargebeeAddons)||void 0===t?void 0:t.find(e=>e.id.includes("rum"));return(0,j.jsxs)("div",{children:[(0,j.jsx)("div",{children:null===(r=e.project)||void 0===r||null===(r=r.billingCustomer)||void 0===r?void 0:r.planName}),"freeTrial"===(null===(n=e.project)||void 0===n||null===(n=n.billingCustomer)||void 0===n?void 0:n.planName)&&(null===(a=e.project)||void 0===a||null===(a=a.billingCustomer)||void 0===a?void 0:a.hasEverBoughtSubscription)&&(0,j.jsx)("div",{style:{background:"yellow"},children:"Previous customer"}),i&&(0,j.jsxs)("div",{style:{background:"green",color:"white",borderRadius:4,paddingLeft:4,paddingRight:4,display:"inline-block"},children:[i.quantity,"x RUM"]})]})}function Qt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function er(e){let t=e.rumSnippets;
1const r=(s=(0,n.useState)("-projection"),d=2,function(e){if(Array.isArray(e))return e}(s)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,o,l=[],s=!0,d=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){d=!0,a=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw a}}return l}}(s,d)||function(e,t){if(e){if("string"==typeof e)return Qt(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Qt(e,t):void 0}}(s,d)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=r[0],o=r[1],l=Object.entries((0,q.groupBy)(t.filter(e=>e.last7DayViewCount>0),e=>{var t;return null===(t=e.project)||void 0===t||null===(t=t.billingCustomer)||void 0===t?void 0:t.id})).map(e=>({billingCustomerId:e[0],snippets:e[1]}));var s,d;return console.log(t.filter(e=>e.last7DayViewCount>0)),(0,j.jsx)(W.mY,{items:l,sortByColumn:i,onSortByChange:e=>o(e),ItemDetailsRenderer:e=>{let t=e.item;return(0,j.jsx)("div",{className:"mb-2",children:(0,j.jsx)(W.mY,{items:t.snippets,variant:"boxy",columns:{project:{heading:{title:"Project Name"},render(e){var t,r;return(0,j.jsx)(a.N_,{to:`/project/${null===(t=e.project)||void 0===t?void 0:t.id}`,target:"_blank",rel:"noreferrer",children:null===(r=e.project)||void 0===r?void 0:r.name})}},sevenDays:{heading:{title:"7 Day View count"},render:e=>(0,j.jsx)("div",{children:(0,k.Ke)(e.last7DayViewCount)})},last1DayViewCount:{heading:{title:"1 Day View count"},render:e=>(0,j.jsx)("div",{children:(0,k.Ke)(e.last1DayViewCount)})},projection:{heading:{title:"Projection"},render:e=>(0,j.jsx)("div",{children:(0,k.Ke)(Math.round(4.3*e.last7DayViewCount))})}}})})},columns:{bc:{heading:{title:"Billing Customer "},render(e){var t;console.log({item:e});const r=null===(t=e.snippets[0])||void 0===t||null===(t=t.project)||void 0===t?void 0:t.billingCustomer,n=e.snippets.map(e=>e.dataDomains.map(e=>e.replace("https://",""))).flat();return(0,j.jsxs)("div",{children:[null==r?void 0:r.name,r&&(0,j.jsx)(a.N_,{to:`https://www.debugbear.com/debugbearadmin/support/bc/${r.id}`,target:"_blank",children:(0,j.jsx)(se.p,{})}),(0,j.jsx)("br",{}),(0,j.jsx)("div",{className:"scale-small-1 color-coldGrey1",children:Kt(e.snippets[0])}),(0,j.jsx)("div",{className:"scale-small-1 color-coldGrey1 text-break",style:{maxHeight:50,overflow:"auto"},children:n.join(", ")})]})}},last7DayViewCount:{heading:{title:"7D View Count"},calculate:e=>(0,q.sum)(e.snippets.map(e=>e.last7DayViewCount)),getSortByValue:(e,t,r)=>r,render:(e,t,r)=>(0,j.jsx)("div",{children:(0,k.Ke)(r)})},last1DayViewCount:{heading:{title:"1D View Count"},calculate:e=>(0,q.sum)(e.snippets.map(e=>e.last1DayViewCount)),getSortByValue:(e,t,r)=>r,render:(e,t,r)=>(0,j.jsx)("div",{children:(0,k.Ke)(r)})},projection:{heading:{title:"Projection"},calculate:e=>{var t;const r=null===(t=e.snippets[0])||void 0===t?void 0:t.currentUsagePeriod;return r?(0,q.sum)(e.snippets.map(e=>4.3*e.last7DayViewCount))/r.rumPageViewLimit:null},getSortByValue:(e,t,r)=>r,render:(e,t,r)=>(0,j.jsx)("div",{children:r&&(0,j.jsxs)("div",{style:{color:r>1.2?"red":""},children:[Math.round(100*r),"%"]})})},currentUsage:{heading:{title:"Current Usage"},calculate:e=>{var t;const r=null===(t=e.snippets[0])||void 0===t?void 0:t.currentUsagePeriod;return r?r.rumPageViewCount/r.rumPageViewLimit:null},getSortByValue:(e,t,r)=>r,render(e,t,r){var n;const a=null===(n=e.snippets[0])||void 0===n?void 0:n.currentUsagePeriod;return(0,j.jsx)(qt.m,{overlay:tr(a),children:(0,j.jsxs)("div",{children:[(0,j.jsxs)("div",{style:{color:r>1.25?"red":""},children:[Math.round(100*r),"%"]}),a&&(0,j.jsxs)("div",{className:"scale-small-1 color-coldGrey1",children:[(0,k.Ke)(a.rumPageViewCount)," /"," ",(0,k.Ke)(a.rumPageViewLimit)]})]})})}},previousUsage:{heading:{title:"Previous Usage"},calculate:e=>{var t;const r=null===(t=e.snippets[0])||void 0===t?void 0:t.previousUsagePeriod;return r?r.rumPageViewCount/r.rumPageViewLimit:null},getSortByValue:(e,t,r)=>r,render(e,t,r){var n;const a=null===(n=e.snippets[0])||void 0===n?void 0:n.previousUsagePeriod;return(0,j.jsx)(qt.m,{overlay:tr(a),children:(0,j.jsxs)("div",{children:[(0,j.jsxs)("div",{style:{color:r>1.25?"red":""},children:[Math.round(100*r),"%"]}),a&&(0,j.jsxs)("div",{className:"scale-small-1 color-coldGrey1",children:[(0,k.Ke)(a.rumPageViewCount)," /"," ",(0,k.Ke)(a.rumPageViewLimit)]})]})})}}}})}function tr(e){return(0,j.jsx)("div",{children:e&&(0,j.jsxs)("div",{children:[(0,k.Yq)(e.startDate)," - ",(0,k.Yq)(e.endDate)]})})}function rr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function nr(e){let t=e.rumSnippets;
1const r=(o=(0,n.useState)(null),l=2,function(e){if(Array.isArray(e))return e}(o)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,o,l=[],s=!0,d=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){d=!0,a=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw a}}return l}}(o,l)||function(e,t){if(e){if("string"==typeof e)return rr(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?rr(e,t):void 0}}(o,l)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=r[0],i=r[1];var o,l;return(0,n.useEffect)(()=>{M.FH.adminGetRumDomains().then(e=>i(e))},[]),a?(0,j.jsxs)("div",{children:[(0,j.jsx)("h2",{className:"scale-5 mb-3 mt-3",children:"Top domains + snippetKeys over the last four 12-hour intervals"}),a.map(e=>(0,j.jsxs)("div",{className:"mb-3",children:[(0,j.jsxs)("b",{className:"mb-3",children:[(0,k.r6)(e.startDate)," - ",(0,k.r6)(e.endDate)]}),(0,j.jsx)(W.mY,{items:e.info,columns:{domain:{heading:{title:"Domain"},render:e=>(0,j.jsx)("div",{children:e.domain})},snippetKey:{heading:{title:"Snippet Key"},render(e){const r=t.find(t=>t.key===e.snippetKey);return r?(0,j.jsx)("div",{children:(0,j.jsx)("a",{href:`/project/${r.projectId}/rum/stats?device=`,children:e.snippetKey})}):(0,j.jsx)("div",{children:e.snippetKey})}},planName:{heading:{title:"Plan Name"},render(e){var r,n;const a=t.find(t=>t.key===e.snippetKey);return(0,j.jsx)("div",{children:null!==(r=null==a||null===(n=a.project)||void 0===n||null===(n=n.billingCustomer)||void 0===n?void 0:n.planName)&&void 0!==r?r:"N/A"})}},viewCount:{heading:{title:"View Count"},render:e=>(0,j.jsx)("div",{children:(0,k.Ke)(e.viewCount)})}}})]},e.id))]}):(0,j.jsx)("div",{className:"d-flex align-items-center justify-content-center",children:(0,j.jsx)(A.y,{})})}function ar(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,o,l=[],s=!0,d=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){d=!0,a=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw a}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ir(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ir(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ir(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function or(){const e=ar((0,L.t)("tab","snippets"),2),t=e[0],r=e[1],a=ar(n.useState(null),2),i=a[0],o=a[1];return n.useEffect(()=>{M.FH.adminGetRumSnippets().then(e=>o(e))},[]),i?(0,j.jsxs)(C.K7,{header:(0,j.jsx)(lt.V,{}),fullWidth:!0,children:[(0,j.jsx)("div",{className:"mb-2",children:(0,j.jsx)(Gt.L,{optionValue:t,options:[{value:"snippets",title:"Snippets"},{value:"bcs",title:"BillingCustomers"},{value:"versions",title:"Versions"},{value:"domains",title:"Domains"}],onSelectOption:e=>r(e)})}),"versions"===t&&(0,j.jsx)(lr,{}),"snippets"===t&&(0,j.jsx)(Jt,{rumSnippets:i}),"bcs"===t&&(0,j.jsx)(er,{rumSnippets:i}),"domains"===t&&(0,j.jsx)(nr,{rumSnippets:i})]}):(0,j.jsx)(A.y,{})}function lr(){const e=ar(n.useState(null),2),t=e[0],r=e[1];function a(e,t){r(t),fetch(e,{method:"POST"}).then(e=>e.text()).then(e=>{alert(e),r(null)}).catch(()=>r(null))}return(0,j.jsxs)("div",{className:"mb-2",children:[(0,j.jsx)("h2",{children:"Version actions"}),(0,j.jsx)("button",{className:"btn btn-primary btn-sm",disabled:null!==t,onClick:()=>a("/debugbearadmin/promoteNextRumSnippet","promote"),children:"promote"===t?"Promoting…":"Promote next to stable"})," ",(0,j.jsx)("button",{className:"btn btn-primary btn-sm",disabled:null!==t,onClick:()=>a("/debugbearadmin/redeployAllRumSnippets","redeploy"),children:"redeploy"===t?"Redeploying…":"Redeploy All"})]})}class sr extends n.Component{constructor(e){super(e),this.state={slackMessages:null,isUpdating:!1},M.FH.adminGetSlackMessages().then(e=>{this.setState({slackMessages:e})})}render(){(0,i.wE)("slack messages");const e=this.state.slackMessages;return e?(0,j.jsx)(C.K7,{children:(0,j.jsx)(P.A,{items:e,keys:["id","didReject"],extraColumns:[{title:"createdAt",render:e=>{if(e.createdAt)return(0,k.uT)(new Date(e.createdAt))}},{title:"sentAt",render:e=>{if(e.sentAt)return(0,k.uT)(new Date(e.sentAt))}},{title:"webhookUrl",render:e=>e.webhookUrl},{title:"messageBody",render:e=>JSON.stringify(e.messageBody).slice(0,300)},{title:"reject",render:e=>{if(!e.sentAt&&!e.didReject)return(0,j.jsx)("button",{onClick:t=>{const r=t.target;r.disabled=!0,M.FH.adminRejectSlackMessage(e.id).then(()=>{r.remove()})},children:"Reject"})}}]})}):null}}var dr=r(74334),cr=r(7640),ur=r(78689),hr={};hr.styleTagTransform=v(),hr.setAttributes=p(),hr.insert=h().bind(null,"head"),hr.domAPI=c(),hr.insertStyleElement=b(),s()(ur.A,hr),ur.A&&ur.A.locals&&ur.A.locals;var mr=r(69187),pr=r(6869),gr=r(32304);function br(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}let fr=location.hostname.includes("localhost")?"https://debugbear-test.chargebee.com":"https://debugbear.chargebee.com";function vr(e){let t=e.billingCustomer;const r=(o=n.useState(!1),l=2,function(e){if(Array.isArray(e))return e}(o)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,o,l=[],s=!0,d=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){d=!0,a=e}
1finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw a}}return l}}(o,l)||function(e,t){if(e){if("string"==typeof e)return br(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?br(e,t):void 0}}(o,l)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=r[0],i=r[1];var o,l;return(0,j.jsxs)("div",{children:[(0,j.jsxs)("div",{className:"row",children:[(0,j.jsxs)("div",{className:"col-md-6",children:[(0,j.jsx)("h3",{children:"Plan"}),(0,j.jsx)(cr.D,{items:[{title:"Name",info:t.planName},{title:"Addons",info:yr(t)},{title:"Chargebee Link",info:t.chargebeeCustomerId?(0,j.jsx)("a",{href:`${fr}/d/customers/${t.chargebeeCustomerId}`,rel:"noreferrer",target:"_blank",children:"Open in Chargebee"}):(0,j.jsxs)("div",{children:["n/a"," ",(0,j.jsx)(gr.c,{content:"If a paying customer doesn't have a chargebee link that might be because of some custom arrangement like invoice / purchase order payment"})]})}]})]}),(0,j.jsxs)("div",{className:"col-md-6",children:[(0,j.jsx)("h3",{children:"Trial"}),(0,j.jsxs)("div",{className:"row",children:[(0,j.jsxs)("div",{className:"col-md-3",children:[(0,j.jsx)("h4",{children:"Free Trial End"}),(0,j.jsx)("input",{type:"date",defaultValue:t.freeTrialEnd.split("T")[0],onBlur:e=>{let r=e.target;const n=new Date(e.target.value);M.FH.adminUpdateBillingCustomer(t.id,{freeTrialEnd:n}).then(()=>{r.style.background="lime"})}})]}),(0,j.jsxs)("div",{className:"col-md-3",children:[(0,j.jsxs)("h4",{children:["RUM Trial End"," ",(0,j.jsx)(gr.c,{content:"RUM Trial End is only applicable if the user already has a lab data subscription."})]}),(0,j.jsx)("input",{type:"date",defaultValue:t.rumTrialEnd?t.rumTrialEnd.split("T")[0]:"",onBlur:e=>{let r=e.target;const n=new Date(e.target.value);M.FH.adminUpdateBillingCustomer(t.id,{rumTrialEnd:n}).then(()=>{r.style.background="lime"})}})]})]})]})]}),(0,j.jsxs)(pr.w,{children:[(0,j.jsx)("h3",{children:"JSON"}),(0,j.jsx)("button",{onClick:()=>i(!a),className:"btn btn-primary btn-sm mb-2",children:"Toggle Show JSON"}),a&&(0,j.jsx)("pre",{children:JSON.stringify(t,null,2)})]})]})}function yr(e){return e.debugbearAddons?e.debugbearAddons.map((e,t)=>(0,j.jsx)("div",{children:(0,mr.Zc)(e)},t)):"n/a"}function xr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,o,l=[],s=!0,d=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){d=!0,a=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw a}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return jr(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?jr(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function wr(){const e=xr(n.useState(null),2),t=e[0],r=e[1],i=xr((0,L.t)("bcSearch",""),2),o=i[0],l=i[1];return(0,j.jsxs)("div",{children:[(0,j.jsx)("h2",{className:"ml-0",children:"Search Billing Customer By Chargebee ID"}),(0,j.jsx)(Rt.l1,{initialValues:{bcSearch:o},onSubmit:(e,t)=>{let n=t.setSubmitting;l(e.bcSearch),n(!0),M.FH.adminFindBillingCustomer(e.bcSearch.trim()).then(e=>{r(e),n(!1)})},children:e=>{let t=e.handleSubmit,r=e.isSubmitting;return(0,j.jsxs)("form",{onSubmit:t,id:"support-bc-search-form",children:[(0,j.jsx)(dr.u,{name:"bcSearch",label:"Chargebee Customer ID"}),(0,j.jsx)(Ot.J,{title:"Search",isSubmitting:r,small:!0})]})}}),t&&(0,j.jsxs)("div",{className:"mt-4",children:[(0,j.jsx)("h3",{children:"Matching billing customers"}),(0,j.jsx)("div",{className:"mt-2",children:0===t.length?(0,j.jsx)("div",{children:"No billing customers found"}):t.map(e=>(0,j.jsxs)("div",{className:"mb-3",children:[(0,j.jsxs)("div",{className:"d-flex align-items-center",children:[(0,j.jsxs)("h4",{children:[e.name," (",e.planName,")"]}),(0,j.jsx)(a.N_,{to:`/debugbearadmin/support/bc/${e.id}`,className:"btn btn-primary btn-sm ml-2",children:"View Details"})]}),(0,j.jsxs)("div",{className:"scale-small-1 color-coldGrey1",children:["BC #",e.id," | Created: ",(0,k.Yq)(e.createdAt,!0)," | Chargebee: ",e.chargebeeCustomerId]}),(0,j.jsx)(vr,{billingCustomer:e})]},e.id))})]})]})}function Sr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,o,l=[],s=!0,d=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){d=!0,a=e}
1finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw a}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Tr(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Tr(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Tr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Cr(){const e=Sr(n.useState(null),2),t=e[0],r=e[1],a=Sr(n.useState(null),2),i=a[0],o=a[1],l=n.useRef(null);return n.useEffect(()=>{l.current&&l.current.select()}),(0,j.jsxs)("div",{children:[(0,j.jsx)("h2",{className:"mt-4 ml-0",children:"Upload Image"}),(0,j.jsx)("p",{children:"Image upload for documentation"}),i&&(0,j.jsx)("div",{className:"alert alert-danger",children:i}),(0,j.jsx)("input",{type:"file",accept:"image/*",style:{background:"#fafafa",padding:10,border:"1px solid #eee",borderRadius:4},onChange:e=>{o(null);let t=new FormData;t.append("docImage",e.target.files[0]),fetch("/debugbearadmin/api/uploadDocsImage",{method:"POST",body:t}).then(e=>e.json()).then(e=>{e.error?o(e.error):r(e.url)}).catch(()=>{alert("Upload failed")})}}),t&&(0,j.jsxs)("div",{children:[(0,j.jsx)("div",{className:"mb-2",children:(0,j.jsx)("input",{style:{width:600,marginTop:4},type:"text",value:t,ref:l})}),(0,j.jsx)("input",{style:{fontSize:10,padding:2,width:600},value:`![](${t})`}),(0,j.jsxs)("div",{style:{marginTop:6},children:[(0,j.jsx)("b",{children:"Preview"}),(0,j.jsx)("p",{className:"scale-small-1 color-coldGrey1",children:"Docusaurus displays blog images at a width of 633px below a window width of 1440px."}),(0,j.jsx)("div",{id:"img-dimensions-info",style:{marginBottom:4}}),(0,j.jsx)("img",{src:t,style:{maxWidth:633},onLoad:e=>{const t=document.querySelector("#img-dimensions-info"),r=e.target,n=r.naturalWidth/r.naturalHeight;let a="";r.naturalWidth>1e3&&(a=n>2?`<div style="color: ${n>2.5?"red":"orange"};">Be careful with wide hard-to-read images!</div>`:'<div style="color: hotpink;">Aim to keep image width below 1000px if possible. But no big deal as long as it\'s readable (and 1000px+ at 2x res is fine).</div>'),t.innerHTML=`Image dimensions: ${r.naturalWidth}x${r.naturalHeight}<br/>\n              Aspect ratio: ${n.toFixed(2)}<br/>\n              ${a}`}})]})]})]})}function Ar(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,o,l=[],s=!0,d=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){d=!0,a=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw a}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return kr(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?kr(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Zr(){const e=Ar(n.useState(null),2),t=e[0],r=e[1];(0,i.wE)("Support");const o=Ar((0,L.t)("search",""),2),l=o[0],s=o[1];return n.useEffect(()=>{setTimeout(()=>{l?document.querySelector("#support-search-form button").click():document.querySelector("#support-search-form input").focus()},400)},[]),(0,j.jsxs)(C.K7,{contentContainerClassName:"admin-support",children:[(0,j.jsxs)("div",{className:"row",children:[(0,j.jsxs)("div",{className:"col-md-6",children:[(0,j.jsx)("h2",{className:"ml-0",children:"Search Users By Email/Name"}),(0,j.jsx)(Rt.l1,{initialValues:{search:(0,T.v)().search||""},onSubmit:(e,t)=>
1{let n=t.setSubmitting;s(e.search),n(!0),M.FH.adminFindUser(e.search.trim()).then(e=>{console.log(e),r(e),n(!1)})},children:e=>{let t=e.handleSubmit,r=e.isSubmitting;return(0,j.jsxs)("form",{onSubmit:t,id:"support-search-form",children:[(0,j.jsx)(dr.u,{name:"search"}),(0,j.jsx)(Ot.J,{title:"Search",isSubmitting:r})]})}})]}),(0,j.jsxs)("div",{className:"col-md-6",children:[(0,j.jsx)("h2",{className:"ml-0",children:"Links"}),(0,j.jsx)("a",{href:"/debugbearadmin/support/blockedDomains",children:"View Blocked Domains"}),(0,j.jsx)("br",{}),(0,j.jsx)("a",{href:"https://docs.google.com/document/d/1TWpOntXVdEe4ZNbayDgk56RDWN-Jqh6vl85jW9bHODk/edit",target:"_blank",rel:"noreferrer",children:"View Support Guide"}),(0,j.jsx)("br",{}),(0,j.jsx)(a.N_,{to:"/debugbearadmin/support/ogImageMaker",children:"Open Graph Image Maker"})]})]}),t&&(0,j.jsxs)("div",{children:[(0,j.jsx)("h3",{children:"Matching users"}),(0,j.jsx)("div",{className:"mt-2",children:(0,j.jsx)(W.mY,{noDetailsPadding:!0,initialExpandedItemIds:1===t.length?[t[0].id]:void 0,items:t,columns:{email:{heading:{title:"Email"},render:e=>(0,j.jsxs)("div",{children:[e.email,e.maybeSuspended&&(0,j.jsx)("div",{style:{color:"red"},children:"Suspended if non-paying"})]})},name:{heading:{title:"Name"},render:e=>e.name+" "+e.lastName},lastSeen:{heading:{title:"Last Seen",style:{width:130}},render:e=>(0,j.jsx)("div",{children:(0,k.uT)(new Date(e.lastSeen))})},accounts:{heading:{title:"Accounts",style:{width:170}},render:e=>e.billingCustomers.map(e=>(0,j.jsxs)("div",{children:[e.planName,(0,j.jsx)("br",{}),(0,j.jsxs)("div",{className:"scale-small-1 color-coldGrey1",children:["created ",(0,k.Yq)(e.createdAt,!0)]})]},e.id))},projects:{heading:{title:"Projects"},render:e=>e.projects.map(e=>(0,j.jsx)("div",{children:(0,j.jsx)("a",{href:`/project/${e.id}`,onClick:e=>e.stopPropagation(),children:e.name})},e.id))}},ItemDetailsRenderer:e=>{let t=e.item;return(0,j.jsxs)("div",{children:[(0,j.jsxs)("div",{className:"row",children:[(0,j.jsxs)("div",{className:"col-md-6",children:[(0,j.jsxs)("div",{className:"d-flex align-items-center mt-3 mb-3",children:[(0,j.jsx)("h2",{className:"mt-0 mb-0",children:"User"}),(0,j.jsxs)("div",{className:"scale-small-1 color-coldGrey1 ml-2",children:["#",t.id]})]}),(0,j.jsx)(cr.D,{items:[{title:"Name",info:t.name},{title:"Last Name",info:t.lastName},{title:"Created At",info:(0,k.Yq)(t.createdAt,!0)},{title:"Last Seen At",info:(0,k.Yq)(t.lastSeen,!0)},{title:"Restricted by",info:t.controllingBillingCustomerId?"BC #"+t.controllingBillingCustomerId:"n/a"}]})]}),(0,j.jsxs)("div",{className:"col-md-6",children:[(0,j.jsx)("h2",{children:"Log in as user"}),(0,j.jsx)(Mr,{user:t})]})]}),t.billingCustomers.length>1&&(0,j.jsx)("div",{className:"alert alert-warning",children:"This user belongs to multiple billing accounts. Be mindful which one you're editing when making changes."}),t.billingCustomers.map(e=>(0,j.jsxs)("div",{children:[(0,j.jsxs)("div",{className:"d-flex align-items-center",children:[(0,j.jsxs)("h2",{children:["Billing Account (",e.name,")"]}),(0,j.jsx)(a.N_,{to:`/debugbearadmin/support/bc/${e.id}`,className:"btn btn-primary btn-sm ml-2",children:"View"})]}),(0,j.jsx)(vr,{billingCustomer:e})]},e.id))]})}})})]}),(0,j.jsx)("div",{className:"mt-5",children:(0,j.jsx)(wr,{})}),(0,j.jsx)(Cr,{})]})}function Mr(e){let t=e.user;const r=Ar(n.useState(!1),2),a=r[0],i=r[1],o=Ar(n.useState(null),2),l=o[0],s=o[1],d=async e=>{let r=e.isReadOnly;i(!0);const n=(await Se(t.id,{isReadOnly:r})).url;i(!1),s(n)};return(0,j.jsxs)("div",{children:[!a&&!l&&(0,j.jsxs)("div",{children:[(0,j.jsx)("p",{className:"scale-small color-coldGrey1",children:"To prevent unintended changes, use readonly permissions unless you want to make any changes to account data."}),(0,j.jsx)("button",{className:"btn btn-primary mr-2",onClick:()=>d({isReadOnly:!0}),children:"Readonly"}),(0,j.jsx)("button",{className:"btn btn-primary btn-sm",onClick:()=>d({isReadOnly:!1}),children:"With edit rights"})]}),a&&(0,j.jsx)(_.v,{}),l&&(0,j.jsxs)("div",{children:[(0,j.jsx)("div",{className:"alert alert-warning mt-3",children:"Open this link in an incognito window, or you'll be logged out of your support account!"}),(0,j.jsx)("a",{href:l,className:"btn btn-primary",onClick:e=>e.preventDefault(),children:"Complete login"})]})]})}var Pr=r(14728);function Nr(e){let t=e.bc;return(0,j.jsxs)("div",{style:{maxWidth:1e3},children:[(0,j.jsx)(W.mY,{items:[{title:"Lab Tests",key:"analyses"},{title:"Projects",key:"projects"},{title:"RUM Page Views",key:"rumPageViews"},{title:"Max Users",key:"maxUsers"},{title:"Uptime Monitors",key:"uptimeMonitors"}
1,{title:"SSO",key:"sso"}],columns:{title:{heading:{title:"Title"},render:e=>e.title},quota:{heading:{title:"Quota"},render:e=>{const r=t.quotaDetails.quotas[e.key];return"sso"===e.key?r?"Enabled":"Disabled":(0,k.Ke)(r)}},override:{heading:{title:"Override"},render:e=>{const r=function(e,t){var r;return"analyses"===t?e.customConfig.analysisQuotaOverride:null===(r=e.customConfig)||void 0===r||null===(r=r.quotaOverrides)||void 0===r?void 0:r[t]}(t,e.key);let n=r?(0,k.Ke)(r):"-";return"sso"===e.key&&(n=r?"true":"false"),(0,j.jsxs)("div",{children:[n," ",(0,j.jsx)(Pr.K,{icon:"edit",onClick:()=>{const r=prompt(`Enter new override value for the ${e.key} quota`);M.FH.adminSetQuotaOverride(t.id,e.key,r).then(()=>{location.reload()})}})]})}}}}),(0,j.jsxs)("div",{className:"mt-2",children:["Allow reduce quota with overrides:"," ",t.customConfig.allowReduceQuoteWithOverrides?"True":"False",(0,j.jsxs)("button",{onClick:()=>{M.FH.adminSetAllowReduceQuoteWithOverrides(t.id,!t.customConfig.allowReduceQuoteWithOverrides).then(()=>{location.reload()})},className:"ml-2 btn btn-xs btn-primary",children:["Set to ",!t.customConfig.allowReduceQuoteWithOverrides+""]})]})]})}function Ir(e){var t,r,n;let a=e.bc;return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)("div",{children:[(0,j.jsx)("h2",{className:"mt-2",children:"Auth/SSO"}),(0,j.jsx)(Rt.l1,{initialValues:{ssoOrganizationId:a.ssoOrganizationId||""},onSubmit:e=>{M.FH.setSsoOrganizationId(a.id,e.ssoOrganizationId).then(()=>{location.reload()})},children:e=>{let t=e.handleSubmit,r=e.isSubmitting;return(0,j.jsx)("form",{onSubmit:t,children:(0,j.jsxs)("div",{className:"d-flex",children:[(0,j.jsx)(dr.u,{style:{width:300},name:"ssoOrganizationId",label:"SSO Organization Id"})," ",(0,j.jsx)("div",{style:{marginTop:30},children:r?(0,j.jsx)(_.v,{}):(0,j.jsx)("button",{type:"submit",className:"btn btn-sm btn-primary ml-2",children:"Save"})})]})})}})]}),(0,j.jsxs)("div",{children:[(0,j.jsx)("h2",{className:"mt-4",children:"RUM Proxy"}),(0,j.jsx)("p",{className:"color-coldGrey1 scale-small-1",children:"When a RUM snippet is created, should our EU RUM proxy be used to process visitor requests?"}),(0,j.jsxs)("div",{children:["Default to EU RUM proxy:"," ",null!==(t=a.customConfig)&&void 0!==t&&t.defaultToEURumProxy?"Enabled":"Disabled",(0,j.jsx)("button",{onClick:()=>{var e;M.FH.adminSetDefaultToEURumProxy(a.id,!(null!==(e=a.customConfig)&&void 0!==e&&e.defaultToEURumProxy)).then(()=>{location.reload()})},className:"ml-2 btn btn-xs btn-primary",children:null!==(r=a.customConfig)&&void 0!==r&&r.defaultToEURumProxy?"Disable":"Enable"})]})]}),(0,j.jsxs)("div",{children:[(0,j.jsx)("h2",{className:"mt-4",children:"Customer Message"}),(0,j.jsx)("p",{className:"color-coldGrey1 scale-small-1",children:"Shown as an alert at the top of every page in this billing customer's projects. Leave blank to clear."}),(0,j.jsx)(Rt.l1,{initialValues:{customerMessage:(null===(n=a.customConfig)||void 0===n?void 0:n.customerMessage)||""},onSubmit:e=>{M.FH.adminSetCustomerMessage(a.id,e.customerMessage).then(()=>{location.reload()})},children:e=>{let t=e.handleSubmit,r=e.isSubmitting,n=e.values,a=e.handleChange;return(0,j.jsxs)("form",{onSubmit:t,children:[(0,j.jsx)("textarea",{name:"customerMessage",value:n.customerMessage,onChange:a,rows:3,style:{width:500,display:"block"}}),(0,j.jsx)("div",{style:{marginTop:8},children:r?(0,j.jsx)(_.v,{}):(0,j.jsx)("button",{type:"submit",className:"btn btn-sm btn-primary",children:"Save"})})]})}})]})]})}function Dr(e){var t;let r=e.bc,n=e.refetchBillingCustomer;const a=e=>M.FH.adminUpdateBillingCustomer(r.id,{paidPlanExpiresAt:e}),i=["freeTrial","essential-yearly-apr2023","pro-yearly-feb2024","corporate-yearly-jun2023"];return i.includes(r.planName)||i.push(r.planName),(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)("div",{children:[(0,j.jsx)("h2",{className:"mt-2",children:"Plan"}),"freeTrial"===r.planName?(0,j.jsxs)("div",{style:{paddingLeft:"1rem"},children:["Custom Pricing Plan:",(0,j.jsx)("select",{value:r.customPricingPlan||"",onChange:e=>{const t=e.target.value;M.FH.adminUpdateCustomPricingPlan(r.id,""===t?null:t).then(()=>{location.reload()})},children:[{name:"None",value:""},{name:"basic-apr2023 ($39/month)",value:"basic-apr2023"},{name:"basic-yearly-apr2023 ($29/mo)",value:"basic-yearly-apr2023"}].map(e=>{let t=e.name,r=e.value;return(0,j.jsx)("option",{value:r,children:t},r)})})]}):null,(0,j.jsxs)("p",{className:"alert alert-warning mt-2",children:["Don't use this UI for self service Chargebee customers! (CB ID:"," ",r.chargebeeCustomerId||"n/a",")"]}),(0,j.jsx)("div",{className:"d-flex align-items-center",children:(0,j.jsxs)("div",{children:["Plan Name:",(0,j.jsx)("select",{value:null!==(t=r.customPricingPlan)&&void 0!==t?t:"",onChange:e=>{const t=e.target.value;M.FH.adminUpdatePlan(r.id,t).then(()=>{location.reload()})},children:i.map(e=>(0,j.jsx)("option",{value:e,children:e},e))})]})})]}),(0,j.jsxs)("div",{className:"mt-2",children:["Paid Plan Expires At:"," ",(0,j.jsx)("input",{type:"date",defaultValue:(r.paidPlanExpiresAt||"").split("T")[0],onBlur:e=>{let t=e.target;const r=new Date(e.target.value);a(r).then(()=>{t.style.background="lime"})}}),(0,j.jsx)("button",{onClick:()=>{a(null)}
1,className:"ml-2 btn btn-xs btn-primary",children:"Set to null"})]}),(0,j.jsxs)("div",{className:"mt-2",children:["Disable manage subscription:"," ",r.customConfig.disableManageSubscription?"True/Disabled":"False/Enabled",(0,j.jsxs)("button",{onClick:()=>{M.FH.adminSetDisableManageSubscription(r.id,!r.customConfig.disableManageSubscription).then(()=>{location.reload()})},className:"ml-2 btn btn-xs btn-primary",children:["Set to ",!r.customConfig.disableManageSubscription+""]})]}),(0,j.jsx)("h2",{className:"mt-2",children:"Usage periods"}),(0,j.jsx)("button",{className:"btn btn-primary btn-sm",onClick:()=>{M.FH.adminForceStartNewUsagePeriod(r.id).then(()=>{window.location.reload()})},children:"Force start new usage period"}),(0,j.jsx)(mr.Gx,{canEditUsagePeriodLimits:!0,refetchBillingCustomer:n,usagePeriods:r.usagePeriods}),(0,j.jsxs)("div",{className:"mt-3",children:[(0,j.jsx)("strong",{children:"Prevent hide page content until:"})," ",(0,j.jsx)("input",{type:"date",defaultValue:(r.customConfig.preventHidePageContentUntil||"").split("T")[0],onBlur:e=>{const t=e.target,n=t.value;let a=null;if(n){const e=new Date(n);e.setUTCHours(23,59,59,999),a=e.toISOString()}M.FH.adminSetPreventHidePageContentUntil(r.id,a).then(()=>{t.style.background="lime"})}}),(0,j.jsx)("button",{onClick:()=>{M.FH.adminSetPreventHidePageContentUntil(r.id,null).then(()=>{location.reload()})},className:"ml-2 btn btn-xs btn-primary",children:"Clear"}),(0,j.jsx)("div",{className:"scale-small-1 color-coldGrey1 mt-1",children:"While set and in the future, page content stays visible even if the account's payment is many weeks overdue."})]})]})}function Or(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,o,l=[],s=!0,d=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){d=!0,a=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw a}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Rr(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Rr(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Rr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Fr(){const e=(0,a.FE)()[0].params.bcId,t=Or(n.useState(null),2),r=t[0],i=t[1],o=Or(n.useState(null),2),l=o[0],s=o[1],d=Or(n.useState("-lastSeen"),2),c=d[0],u=d[1],h=n.useCallback(t=>(t||i(null),M.FH.adminGetBillingCustomer(e).then(e=>(i(e),e))),[e]);n.useEffect(()=>{s(null),h(),M.FH.adminGetBillingCustomerAllUsers(e).then(e=>s(e))},[e]);let m=(0,j.jsx)(A.y,{});return r&&l&&(m=(0,j.jsxs)("div",{children:[(0,j.jsx)("div",{className:"d-flex justify-content-end",children:(0,j.jsx)("a",{href:`/debugbearadmin/bcSummary?bcId=${r.id}`,className:"scale-small-1",children:"➔ BC Summary"})}),(0,j.jsxs)("div",{children:[(0,j.jsx)("h2",{children:"Users"}),(0,j.jsx)("div",{className:"scale-small1 color-coldGrey1",children:"Trying to contact this customer? Aim to email admins and users who've been active recently."}),(0,j.jsx)(W.mY,{items:l,sortByColumn:c,onSortByChange:e=>u(e),columns:{email:{heading:{title:"Email"},getSortByValue:e=>e.email,render:e=>(0,j.jsxs)("div",{children:[e.email," ",(0,j.jsx)(a.N_,{to:`/debugbearadmin/support/?search=${e.email}`,children:(0,j.jsx)(se.p,{})})]})},name:{heading:{title:"Name"},getSortByValue:e=>e.name+" "+e.lastName,render:e=>(0,j.jsx)("div",{children:e.name+" "+e.lastName})},isAdmin:{heading:{title:"Admin",style:{width:100}},getSortByValue:e=>e.isAccountAdmin,render:e=>e.isAccountAdmin?(0,j.jsx)("div",{className:"badge bg-blue1",children:"Admin"}):null},createdAt:{heading:{title:"Created",style:{width:180}},getSortByValue:e=>new Date(e.createdAt).getTime(),render:e=>(0,j.jsx)("div",{className:"color-coldGrey1 scale-small-1",children:(0,k.r6)(new Date(e.createdAt))})},lastSeen:{heading:{title:"Last Seen"},getSortByValue:e=>new Date(e.lastSeen).getTime(),render:e=>(0,j.jsx)("div",{children:(0,k.r6)(new Date(e.lastSeen))})}}}),(0,j.jsx)("h2",{className:"mt-2",children:"BC Notes"}),(0,j.jsx)(Y,{billingCustomerId:r.id}),(0,j.jsx)("h2",{className:"mt-2",children:"Plan + Quota"}),(0,j.jsxs)("div",{children:["Plan: ",r.planName]}),r.paymentOverdueSince&&(0,j.jsxs)("div",{className:"color-red1",children:["Payment overdue since:"," ",(0,k.r6)(r.paymentOverdueSince,{shortMonth:!0})]}),(0,j.jsx)(Nr,{bc:r}),(0,j.jsx)(Dr,{refetchBillingCustomer:h,bc:r}),(0,j.jsx)(Ir,{bc:r}),(0,j.jsxs)(pr.w,{children:[(0,j.jsx)("h2",{children:"JSON"}),(0,j.jsx)("pre",{children:JSON.stringify(r,null,2)}),(0,j.jsx)("pre",{children:JSON.stringify(l,null,2)})]})]})]})),(0,j.jsx)(C.K7,{children:m})}function Lr(){const e=(0,a.FE)()[0];return(0,j.jsx)(Wr,{match:e})}class Wr extends n.Component{constructor(e){super(e);const t=e.match.params,r=t.entityType,n=t.entityId;this.state={entity:null},M.FH.adminGetEntity(r,n).then(e=>{console.log({entity:e}),this.setState({entity:e})})}render(){let e=[];e=[{title:"Admin",href:"#"}],(0,i.wE)("Admin edit entity");const t=this.state.entity,r=this.props.match.params,n=r.entityType,a=r.entityId;let l;return t&&("pageLoadAnalysisResult"===n?l=JSON.stringify(t.resultJson,null,4):"adminConfig"===n&&(l=JSON.stringify(t.value,null,4))),(0,j.jsx)("div",{children:(0,j.jsxs)("div",{children:[(0,j.jsx)(o.P,{items:e}),(0,j.jsx)("div",{className:"content-container",children:t&&(0,j.jsxs)("div",{children:[(0,j.jsx)("textarea",{style:{width:"100%",height:500},ref:e=>{this.textarea=e},defaultValue:l}),(0,j.jsx)("button",{onClick:()=>{let e;"pageLoadAnalysisResult"===n?e={resultJson:JSON.parse(this.textarea.value)}:"adminConfig"===n&&(e={value:JSON.parse(this.textarea.value)}),M.FH.adminUpdateEntity(n,a,e).then(()=>alert("Ok"))},children:"Update"}),t.artifacts&&(0,j.jsx)("div",{children:(0,j.jsx)(P.A,{items:t.artifacts,keys:["id","name","attemptId","isPreliminary","deletedAt"],extraColumns:[{title:"storageKey",render:e=>(0,j.jsx)("a",{href:"/debugbearadmin/viewArtifact/"+e.storageKey,children:e.storageKey})}]})})]})})]})})}}function Br(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Er(){const e=(i=n.useState(null),o=2,function(e){if(Array.isArray(e))return e}(i)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,o,l=[],s=!0,d=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){d=!0,a=e}
1finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw a}}return l}}(i,o)||function(e,t){if(e){if("string"==typeof e)return Br(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Br(e,t):void 0}}(i,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),t=e[0],r=e[1],a=(0,T.v)();var i,o;return n.useEffect(()=>{M.FH.adminGetUnusedAccounts({notSeenInNDays:a.notSeenInNDays}).then(e=>r(e))},[a.notSeenInNDays]),(0,j.jsxs)(C.K7,{header:(0,j.jsx)(lt.V,{}),fullWidth:!0,children:[(0,j.jsx)("h1",{children:"List of unused user accounts"}),(0,j.jsx)("p",{children:"No activity, no account they belong to"}),!t&&(0,j.jsx)(A.y,{}),t&&(0,j.jsx)(P.A,{items:t,keys:["id","createdAt","email","lastSeen","adminBCIds"],extraColumns:[{title:"Admin For Accounts",render:e=>e.adminBCIds.join(",")},{title:"Team Member Ids",render:e=>e.teamMemberRows.map(e=>{var t;return(null===(t=e.team)||void 0===t?void 0:t.name)||"??"})},{title:"Delete",render:e=>(0,j.jsx)("a",{href:`/debugbearadmin/deleteUser/${e.id}`,target:"_blank",rel:"noreferrer",children:"Delete"})}]})]})}function Hr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,o,l=[],s=!0,d=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){d=!0,a=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw a}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ur(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ur(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ur(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function zr(e){return e<60?`${e}s`:e<3600?e/60+"m":e/3600+"h"}function Vr(){const e=Hr(n.useState(null),2),t=e[0],r=e[1],a=Hr((0,L.t)("plan","all"),2),i=a[0],o=a[1];if(n.useEffect(()=>{M.FH.adminGetUptimeSummary().then(r)},[]),!t)return(0,j.jsx)(A.y,{});const l=t.projects.filter(e=>"all"===i||("paying"===i?null!=e.planName&&"freeTrial"!==e.planName:e.planName===i));return(0,j.jsxs)(C.K7,{header:(0,j.jsx)(lt.V,{}),fullWidth:!0,children:[(0,j.jsx)("h1",{children:"Uptime Monitoring"}),(0,j.jsxs)("div",{className:"mb-2",children:[t.totals.monitorCount," monitors across"," ",t.totals.projectCount," projects and"," ",t.totals.billingCustomerCount," billing accounts."," ",t.totals.downCount>0&&(0,j.jsxs)("b",{children:[t.totals.downCount," currently alerting down."]})]}),(0,j.jsxs)("div",{style:{marginTop:8,marginBottom:8},children:["Plan:"," ",(0,j.jsxs)("select",{value:i,onChange:e=>o(e.target.value),children:[(0,j.jsx)("option",{value:"all",children:"All"}),(0,j.jsx)("option",{value:"paying",children:"Paying"}),(0,j.jsx)("option",{value:"freeTrial",children:"Free trial"})]})]}),(0,j.jsx)(P.A,{items:l,keys:["projectName","monitorCount"],extraColumns:[{title:"Billing account",render:e=>null==e.billingCustomerId?"—":(0,j.jsx)("a",{href:`/debugbearadmin/billingCustomer/${e.billingCustomerId}`,children:e.billingCustomerName||e.billingCustomerId})},{title:"Plan",render:e=>{var t;return null!==(t=e.planName)&&void 0!==t?t:"—"}},{title:"Project",render:e=>(0,j.jsx)("a",{href:`/project/${e.projectId}/uptime`,children:e.projectId})},{title:"Frequencies",render:e=>e.intervalsSeconds.map(zr).join(", ")},{title:"Down now",render:e=>e.downCount>0?(0,j.jsx)("b",{children:e.downCount}):"0"},{title:"No alerting",render:e=>e.noAlertingCount},{title:"First monitor",render:e=>(0,k.Yq)(new Date(e.firstMonitorAt))},{title:"Latest monitor",render:e=>(0,k.Yq)(new Date(e.latestMonitorAt))}]})]})}const Gr=()=>{const e=(0,a.FE)()[0];return(0,j.jsx)(S,{...e.params})};r.g.makeAdminRoutes=()=>(0,a.Eu)((0,j.jsxs)(n.Fragment,{children:[(0,j.jsx)(a.qh,{path:"/debugbearadmin",element:(0,j.jsx)(Gr,{})}),(0,j.jsx)(a.qh,{path:"/debugbearadmin/rumElementPreview",element:(0,j.jsx)(It,{})})," ",(0,j.jsx)(a.qh,{path:"/debugbearadmin/emailQueue",element:(0,j.jsx)(ct,{})})," ",(0,j.jsx)(a.qh,{path:"/debugbearadmin/slackMessages",element:(0,j.jsx)(sr,{})}),(0,j.jsx)(a.qh,{path:"/debugbearadmin/recentResults/:pageLoadId?",element:(0,j.jsx)(Zt,{})}),(0,j.jsx)(a.qh,{path:"/debugbearadmin/attempts/:slowOrServerId?",element:(0,j.jsx)(D,{})}),(0,j.jsx)(a.qh,{path:"/debugbearadmin/unusedaccounts",element:(0,j.jsx)(Er,{})}),(0,j.jsx)(a.qh,{path:"/debugbearadmin/billingCustomer/:billingCustomerId",element:(0,j.jsx)(ot,{})}),(0,j.jsx)(a.qh,{path:"/debugbearadmin/bcSummary",element:(0,j.jsx)(ke,{})}),(0,j.jsx)(a.qh,{path:"/debugbearadmin/uptime",element:(0,j.jsx)(Vr,{})}),(0,j.jsx)(a.qh,{path:"/debugbearadmin/debugEvents",element:(0,j.jsx)(dt,{})}),(0,j.jsx)(a.qh,{path:"/debugbearadmin/rumSnippets",element:(0,j.jsx)(or,{})}),(0,j.jsx)(a.qh,{path:"/debugbearadmin/rumPageViewSearch",element:(0,j.jsx)(Et,{})}),(0,j.jsx)(a.qh,{path:"/debugbearadmin/edit/:entityType/:entityId",element:(0,j.jsx)(Lr,{})}),(0,j.jsx)(a.qh,{path:"/debugbearadmin/oneOffTests",element:(0,j.jsx)(ht,{})}),(0,j.jsx)(a.qh,{path:"/debugbearadmin/quickTests/:projectId",element:(0,j.jsx)(Ct,{})}),(0,j.jsx)(a.qh,{path:"/debugbearadmin/support",element:(0,j.jsx)(Zr,{})}),(0,j.jsx)(a.qh,{path:"/debugbearadmin/support/bc/:bcId",element:(0,j.jsx)(Fr,{})}),(0,j.jsx)(a.qh,{path:"/debugbearadmin/support/ogImageMaker",element:(0,j.jsx)(St,{})})]}),[100])},93823(e,t,r){r.d(t,{iN:()=>P,df:()=>M,q7:()=>N}),r(62953);
1var n=r(44952),a=r(6869),i=r(32304),o=r(17672),l=r(68498),s=r(24389),d=r(44954),c=r(96540),u=r(8705),h=r(85072),m=r.n(h),p=r(97825),g=r.n(p),b=r(77659),f=r.n(b),v=r(55056),y=r.n(v),x=r(10540),j=r.n(x),w=r(41113),S=r.n(w),T=r(64858),C={};C.styleTagTransform=S(),C.setAttributes=y(),C.insert=f().bind(null,"head"),C.domAPI=g(),C.insertStyleElement=j(),m()(T.A,C),T.A&&T.A.locals&&T.A.locals;var A=r(74848);function k(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,o,l=[],s=!0,d=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){d=!0,a=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw a}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Z(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Z(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Z(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function M(e){var t;let r=e.experience,i=e.time,o=e.snippetId,l=e.path,s=e.imageUrl,h=e.elementText;const m=c.useMemo(()=>({url:(0,d.O8)(r,i),path:l,imageUrl:s,elementText:h,device:r.device,viewportWidth:r.windowWidth,viewportHeight:r.windowHeight}),[r,i,l,s,h]),p=k((0,u.w)({method:n.FH.getRumElement,getArgs:()=>[o,m],additionalDependencies:[m]}),1)[0],g=null==p||null===(t=p.debug)||void 0===t?void 0:t.finalUrl,b=(0,A.jsxs)(a.w,{children:[(0,A.jsx)("pre",{children:JSON.stringify(m)}),(0,A.jsx)("a",{href:"http://localhost:8080/debugbearadmin/rumElementPreview?data="+encodeURIComponent(JSON.stringify(m)),target:"_blank",rel:"noreferrer",children:"Test local"}),(0,A.jsx)("a",{href:"https://www.debugbear.com/debugbearadmin/rumElementPreview?data="+encodeURIComponent(JSON.stringify(m)),target:"_blank",rel:"noreferrer",children:"Test prod"})]});return(0,A.jsxs)("div",{"data-testid":"rum-screenshot",...g?{"data-finalurl":g}:{},children:[b,(0,A.jsx)("div",{className:"d-flex align-items-center flex-grow-1",style:{minHeight:300},children:(0,A.jsx)(P,{screenshotInfo:p})})]})}function P(e){let t=e.screenshotInfo,r=e.maxImageHeight,n=(0,A.jsx)("div",{className:"d-flex justify-content-around",children:(0,A.jsx)(o.v,{bgColor:"blueGrey"})});return t&&(n="error"===t.status?(0,A.jsxs)("div",{className:"color-coldGrey1 scale-small-1 text-center",children:[(0,A.jsxs)("div",{className:"d-flex align-items-center justify-content-center mb-2",children:[(0,A.jsx)("div",{children:"Preview not available."}),(0,A.jsx)(i.c,{maxWidth:400,content:(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)("p",{children:"Element screenshots are taken independently of the initial RUM data collection."}),(0,A.jsx)("p",{children:"This can fail for a variety of reasons:"}),(0,A.jsxs)("ul",{className:"mt-1 mb-2",children:[(0,A.jsx)("li",{children:"The page has changed since the RUM data was collected"}),(0,A.jsx)("li",{children:"Page content varies due to A/B tests"}),(0,A.jsx)("li",{children:"Logged-in users see different content"}),(0,A.jsx)("li",{children:"Content is only available in specific countries"}),(0,A.jsx)("li",{children:"DebugBear is getting blocked while running the test"}),(0,A.jsx)("li",{children:"Limitations of our current screenshot generation logic"})]}),(0,A.jsx)("p",{children:"Please contact support if you have additional questions about this."}),(0,A.jsx)("hr",{}),(0,A.jsxs)("div",{className:"color-red1",children:["Error: ",t.message]})]}),style:{marginLeft:4}})]}),t.screenshot&&(0,A.jsx)("img",{src:t.screenshot,style:{maxWidth:"100%",maxHeight:300,opacity:.4}})]}):(0,A.jsx)(l.Ix,{imageSrc:t.screenshot,rects:[t.position],truncateRects:!0,maxHeight:r,centerImage:!0,invertedHighlight:!0})),(0,A.jsx)("div",{style:{width:"100%",borderBottomLeftRadius:3,borderBottomRightRadius:3,padding:16,alignSelf:"stretch",alignItems:"center",alignContent:"center"},className:"rum-screenshot-container",children:n})}function N(e){let t=e.project,r=e.rumMetric,a=e.extraFilters,i=e.maxImageHeight,o=e.cacheByElementText;const l=k((0,u.w)({blockComparisonRequests:!0,method:n.FH.getRumElementByFilter,getArgs:e=>[t.rumSnippet.id,r,(0,s.O$)(e,a),o]}),1)[0];return(0,A.jsx)(P,{screenshotInfo:l,maxImageHeight:i})}},35846(e,t,r){var n=r(31601),a=r.n(n),i=r(76314),o=r.n(i)()(a());
1o.push([e.id,".admin-page button:hover{background:#ff0;cursor:pointer}",""]);const l=o;r.d(t,["A",0,l])},25759(e,t,r){var n=r(31601),a=r.n(n),i=r(76314),o=r.n(i)()(a());o.push([e.id,".bc-summary__badge{background:#c52626;color:#fff;display:inline-block;font-weight:bold;padding:2px 8px;border-radius:4px;margin-right:2px;margin-bottom:2px}.landing-page-table-external-button{opacity:.9;text-transform:uppercase;font-size:11px;background:#d1cbde;border-radius:4px;color:#333;padding-left:4px;padding-right:4px}.landing-page-table-external-button:hover{opacity:1}.effort-size-badge{opacity:1;text-transform:uppercase;font-size:11px;border-radius:4px;color:#333;padding-left:4px;padding-right:4px}.effort-size-button{border-radius:4px;background:#fff;border:1px solid #ddd}.effort-size-button:hover{background:orange}",""]);const l=o;r.d(t,["A",0,l])},30225(e,t,r){var n=r(31601),a=r.n(n),i=r(76314),o=r.n(i)()(a());o.push([e.id,".users-bc-list{font-weight:bold;color:red}.users-bc-list a{color:red}.users-bc-warning{margin-bottom:1rem}",""]);const l=o;r.d(t,["A",0,l])},49463(e,t,r){var n=r(31601),a=r.n(n),i=r(76314),o=r.n(i)()(a());o.push([e.id,".rum-page-view-search__details pre{padding:8px;font-size:12px;max-height:600px;overflow:auto;background:#fafafa;border:1px solid #eee}.rum-page-view-search__details table{table-layout:fixed}.rum-page-view-search__details table tr:hover{background-color:#f5f8ff}.rum-page-view-search__details table th{vertical-align:top;width:250px}.rum-page-view-search__details table td{font-family:monospace;font-size:13px}",""]);const l=o;r.d(t,["A",0,l])},78689(e,t,r){var n=r(31601),a=r.n(n),i=r(76314),o=r.n(i)()(a());o.push([e.id,".admin-support h4{font-size:16px;margin-left:8px;margin-top:8px}.admin-support h2{margin-top:12px;margin-left:8px}.admin-support h3{margin-top:12px;font-size:24px;margin-left:8px}",""]);const l=o;r.d(t,["A",0,l])},15642(e,t,r){var n=r(31601),a=r.n(n),i=r(76314),o=r.n(i)()(a());o.push([e.id,".quicktable{font-size:14px;width:100%}.quicktable__row:nth-child(odd) td{background:#f7f7f7}.quicktable__row td{transition:.2s all}.quicktable__row:hover td,.quicktable__row:nth-child(odd):hover td{background:#eef}.quicktable__cell{border:1px solid #999;padding-left:4px}",""]);const l=o;r.d(t,["A",0,l])},64858(e,t,r){var n=r(31601),a=r.n(n),i=r(76314),o=r.n(i)()(a());o.push([e.id,".rum-screenshot-container{background:#ecf2f5}.dark-mode .rum-screenshot-container{background:#1e212e;color:#fff}",""]);const l=o;r.d(t,["A",0,l])},66304(e,t,r){r.d(t,{P:()=>i});var n=r(43329),a=r(29407);function i(e,t,r){const i=(0,a.a)(e,r?.in);if(isNaN(t))return(0,n.w)(r?.in||e,NaN);if(!t)return i;const o=i.getDate(),l=(0,n.w)(r?.in||e,i.getTime());return l.setMonth(i.getMonth()+t+1,0),o>=l.getDate()?l:(i.setFullYear(l.getFullYear(),l.getMonth(),o),i)}}}]);

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.