1import{De as Le,pa as Re}from"./chunk-TN5ZZO3Q.js";import{$g as se,Ba as q,Cg as L,Dg as $,Fb as x,Fr as he,Ga as w,Gb as R,I as k,Ia as S,J as V,Jg as ae,Jm as fe,K as X,Ka as K,La as T,M as z,Ma as h,Mo as ge,N as _,Na as y,No as Ee,Oa as a,Oc as oe,Oo as Ce,Pa as n,Pl as ue,Qa as u,Sb as ie,Ti as pe,Ug as B,Ui as me,Ut as be,Vg as I,W as J,Wt as De,Xa as b,Xt as Me,Yb as ne,Yg as N,Z as s,Zg as U,_a as d,_g as le,_r as ye,a as v,ah as ce,bh as _e,ca as E,cd as re,cq as we,cv as xe,d as O,da as C,db as D,dq as Se,eb as c,g as m,h as W,iq as Te,k as P,l as j,m as g,om as de,qb as f,rb as H,sb as M,ta as l,ub as Z,vb as ee,wb as te,xa as Q,ya as Y}from"./chunk-N6MTJI5Q.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-JDIAMZ3Z.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.