1import{pa as Re,ye as Le}from"./chunk-6QDVQ5WV.js";import{$a as d,$g as N,Ca as q,Fg as L,Gg as $,Ha as w,Hr as he,I as k,Ib as x,J as V,Ja as S,Jb as R,K as X,La as K,M as z,Ma as T,Mg as ae,Mm as fe,N as _,Na as h,Oa as y,Pa as a,Po as ge,Qa as n,Qo as Ee,Ra as u,Ro as Ce,Sc as oe,Sl as ue,W as J,Wb as ie,Wi as pe,Wt as be,Xg as B,Xi as me,Ya as b,Yg as I,Yt as De,Z as s,Zt as Me,a as v,ac as ne,ah as U,as as ye,bh as le,ca as E,ch as se,d as O,da as C,dh as ce,eb as D,eh as _e,eq as we,ev as xe,fb as c,fq as Se,g as m,gd as re,h as W,k as P,kq as Te,l as j,m as g,rm as de,sa as l,tb as f,ub as H,vb as M,xb as Z,ya as Q,yb as ee,za as Y,zb as te}from"./chunk-6VDOBKBI.js";import"./chunk-UNNH6OJB.js";import{h as G}from"./chunk-HE2D45TV.js";var Ie=(t,o)=>o.name;function Ne(t,o){t&1&&u(0,"mat-spinner",10)}function Ue(t,o){if(t&1&&f(0),t&2){let e=c().$implicit;M(" ",e.latency,"ms ")}}function Fe(t,o){if(t&1&&(a(0,"ww-display-object-key"),f(1),n(),a(2,"ww-display-object-value"),w(3,Ne,1,0,"mat-spinner",10)(4,Ue,1,1),n()),t&2){let e=o.$implicit;l(),M(" ",e.name," "),l(2),S(e.latency===null?3:4)}}function Ae(t,o){if(t&1&&(a(0,"ww-display-object")(1,"ww-display-object-key",9),d(2,1),n(),a(3,"ww-display-object-value",9),d(4,2),n(),T(5,Fe,5,2,null,null,Ie),n()),t&2){c();let e=te(5);l(5),h(e)}}function Ge(t,o){if(t&1){let e=b();a(0,"div",6)(1,"button",7),D("click",function(){E(e);let r=c();return C(r.refetch())}),a(2,"span"),d(3,0),n(),u(4,"ww-icon",8),n(),Z(5),x(6,"async"),w(7,Ae,7,0,"ww-display-object"),n()}if(t&2){l(4),y("icon","bx-refresh"),l();let e=ee(R(6,2,c().results$));l(2),S(e&&e.length>0?7:-1)}}function ve(t,o){if(t&1&&(a(0,"div",14),f(1),n()),t&2){let e=o.$implicit;l(),H(e)}}function Oe(t,o){if(t&1){let e=b();a(0,"code",11)(1,"button",12),D("click",function(){E(e);let r=c();return C(r.downloadLog())}),u(2,"ww-icon",13),n(),T(3,ve,2,1,"div",14,K),x(5,"async"),n()}if(t&2){let e=c();l(3),h(R(5,0,e.firestoreLogs$))}}var We=new v(t=>{$("debug"),L(o=>t.next(o))}).pipe(V()),$e=(()=>{class t{constructor(){this.clientConfigFirestoreApi=s(me),this.firestore=s(ae),this.layout=s(xe),this.locationRx=s(Me),this.userRx=s(De),this.usersMe=s(be),this.visitFirestoreApi=s(pe),this.refetchSub=new O(1),this.firestoreLogs$=We.pipe(k((e,i)=>{try{let r=JSON.stringify(i,null,2);return[...e,r]}catch(r){return e}},[]),X({refCount:!0,bufferSize:1})),this.specs=[{name:"Waitwhile Server",api:this.usersMe.get({})},{name:"Firestore Document",api:W(le(I(this.firestore,"client-configs/web-fo")))},{name:"Firestore Document listener",api:ce(I(this.firestore,"client-configs/web-main"))},{name:"Firestore Document listener (cached)",api:this.clientConfigFirestoreApi.getDoc(["test-client"])},{name:"Firestore Collection",api:this.userRx.getCurrentNullableUser(["accountId"]).pipe(_(e=>e?se(N(B(this.firestore,`accounts/${e.accountId}/customers`),U(5))):m))},{name:"Firestore Collection listener",api:this.userRx.getCurrentNullableUser(["accountId"]).pipe(_(e=>e?_e(N(B(this.firestore,`accounts/${e.accountId}/customers`),U(5))):m))},{name:"Firestore Collection listener (cached)",api:g([this.userRx.getCurrentNullableUser(["accountId"]),this.locationRx.locationId$]).pipe(_(([e,i])=>e?this.visitFirestoreApi.getCollection([e.accountId],ye(he,{where:[["locationId","==",i]],limit:[5]})):m))}],this.results$=g(this.specs.map(e=>this.createResult(e))),this.layout.setFeatureContext({name:$localize`Debug`,parentPath:"/about"})}refetch(){this.refetchSub.next()}downloadLog(){return G(this,null,function*(){let e=yield P(this.firestoreLogs$);re(JSON.stringify(e,null,2),"firestore-log.txt")})}createResult(e){let i=Date.now();return this.refetchSub.pipe(_(()=>(i=Date.now(),e.api.pipe(j(()=>({name:e.name,latency:Date.now()-i})),z({name:e.name,latency:null})))))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Q({type:t,selectors:[["ww-debug"]],standalone:!1,decls:3,vars:1,consts:()=>{let e;e=$localize`Connectivity`;let i;i=$localize`Firestore logs`;let r;r=$localize`Measure latency`;let F;F=$localize` Endpoint `;let A;return A=$localize` Latency `,[r,F,A,[3,"type"],["wwTab","","label",e],["wwTab","","label",i],["wwLayoutPadding","",1,"flex","flex-col","gap-6"],["wwButton","secondary",1,"self-start",3,"click"],[3,"icon"],[1,"font-bold"],["diameter","16"],[1,"block","relative","overflow-auto"],["wwButton","tert
1iary",1,"absolute","top-2","right-2",3,"click"],["icon","bx-download"],[1,"whitespace-pre"]]},template:function(i,r){i&1&&(a(0,"ww-tab-group",3),q(1,Ge,8,5,"ng-template",4)(2,Oe,6,2,"ng-template",5),n()),i&2&&y("type","fill")},dependencies:[Re,fe,ue,Ce,ge,Ee,de,Se,we,ie],encapsulation:2,changeDetection:0})}}return t})();var Et=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=Y({type:t})}static{this.\u0275inj=J({imports:[ne,Le,Te,oe.forChild([{path:"",component:$e}])]})}}return t})();export{$e as WwDebugComponent,Et as WwDebugModule}; 2//noopchunk-H25UBBV2.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.