tressi
Version:
Deterministic load testing for API performance validation.
3 lines (2 loc) • 23 kB
JavaScript
import{a as Re,b as K}from"./chunk-ELI7JHGH.js";import{a as Fe}from"./chunk-2NHEPAC5.js";import{a as Ue}from"./chunk-DLPQUWGS.js";import{a as je}from"./chunk-5PTWAMZ6.js";import{a as Y}from"./chunk-MZUHTIQN.js";import"./chunk-UR67FGQG.js";import"./chunk-RQPLME55.js";import{a as Le}from"./chunk-2IBU6HRE.js";import{a as Ae,b as Ne}from"./chunk-OVBUA5RI.js";import{b as Ee,i as Me,m as Oe,q as Pe,r as De,s as Te,u as xe,x as F}from"./chunk-BEQIQLT5.js";import{$ as _,$a as h,Ab as ve,Bb as be,Bc as c,Cb as oe,D as k,Db as d,Hc as Ie,Ia as ge,Ka as p,L as T,O as w,Ob as ye,P as se,Pb as Ce,Qb as b,R as x,Rb as we,U as ce,V as ee,W as i,X as le,aa as S,ba as pe,d as V,dc as ke,e as z,fc as N,ga as de,hb as H,ja as me,jb as te,jc as _e,ka as I,kb as he,kc as Se,lb as E,ma as ue,mb as M,n as C,rb as R,sb as O,tb as A,ub as B,vb as f,wb as v,xb as fe,y as g,z as X,zb as G}from"./chunk-W6IDPYNF.js";import{a as ae}from"./chunk-I4MTPUBM.js";var ne="Service workers are disabled or not supported by this browser",P=class{serviceWorker;worker;registration;events;constructor(o,e){if(this.serviceWorker=o,!o)this.worker=this.events=this.registration=new V(r=>r.error(new w(5601,!1)));else{let r=null,n=new z;this.worker=new V(l=>(r!==null&&l.next(r),n.subscribe(W=>l.next(W))));let s=()=>{let{controller:l}=o;l!==null&&(r=l,n.next(r))};o.addEventListener("controllerchange",s),s(),this.registration=this.worker.pipe(T(()=>o.getRegistration().then(l=>{if(!l)throw new w(5601,!1);return l})));let a=new z;this.events=a.asObservable();let u=l=>{let{data:W}=l;W?.type&&a.next(W)};o.addEventListener("message",u),e?.get(te,null,{optional:!0})?.onDestroy(()=>{o.removeEventListener("controllerchange",s),o.removeEventListener("message",u)})}}postMessage(o,e){return new Promise(r=>{this.worker.pipe(k(1)).subscribe(n=>{n.postMessage(ae({action:o},e)),r()})})}postMessageWithOperation(o,e,r){let n=this.waitForOperationCompleted(r),s=this.postMessage(o,e);return Promise.all([s,n]).then(([,a])=>a)}generateNonce(){return Math.round(Math.random()*1e7)}eventsOfType(o){let e;return typeof o=="string"?e=r=>r.type===o:e=r=>o.includes(r.type),this.events.pipe(X(e))}nextEventOfType(o){return this.eventsOfType(o).pipe(k(1))}waitForOperationCompleted(o){return new Promise((e,r)=>{this.eventsOfType("OPERATION_COMPLETED").pipe(X(n=>n.nonce===o),k(1),C(n=>{if(n.result!==void 0)return n.result;throw new Error(n.error)})).subscribe({next:e,error:r})})}get isEnabled(){return!!this.serviceWorker}},Ge=(()=>{class t{sw;messages;notificationClicks;notificationCloses;pushSubscriptionChanges;subscription;get isEnabled(){return this.sw.isEnabled}pushManager=null;subscriptionChanges=new z;constructor(e){if(this.sw=e,!e.isEnabled){this.messages=g,this.notificationClicks=g,this.notificationCloses=g,this.pushSubscriptionChanges=g,this.subscription=g;return}this.messages=this.sw.eventsOfType("PUSH").pipe(C(n=>n.data)),this.notificationClicks=this.sw.eventsOfType("NOTIFICATION_CLICK").pipe(C(n=>n.data)),this.notificationCloses=this.sw.eventsOfType("NOTIFICATION_CLOSE").pipe(C(n=>n.data)),this.pushSubscriptionChanges=this.sw.eventsOfType("PUSH_SUBSCRIPTION_CHANGE").pipe(C(n=>n.data)),this.pushManager=this.sw.registration.pipe(C(n=>n.pushManager));let r=this.pushManager.pipe(T(n=>n.getSubscription()));this.subscription=new V(n=>{let s=r.subscribe(n),a=this.subscriptionChanges.subscribe(n);return()=>{s.unsubscribe(),a.unsubscribe()}})}requestSubscription(e){if(!this.sw.isEnabled||this.pushManager===null)return Promise.reject(new Error(ne));let r={userVisibleOnly:!0},n=this.decodeBase64(e.serverPublicKey.replace(/_/g,"/").replace(/-/g,"+")),s=new Uint8Array(new ArrayBuffer(n.length));for(let a=0;a<n.length;a++)s[a]=n.charCodeAt(a);return r.applicationServerKey=s,new Promise((a,u)=>{this.pushManager.pipe(T(y=>y.subscribe(r)),k(1)).subscribe({next:y=>{this.subscriptionChanges.next(y),a(y)},error:u})})}unsubscribe(){if(!this.sw.isEnabled)return Promise.reject(new Error(ne));let e=r=>{if(r===null)throw new w(5602,!1);return r.unsubscribe().then(n=>{if(!n)throw new w(5603,!1);this.subscriptionChanges.next(null)})};return new Promise((r,n)=>{this.subscription.pipe(k(1),T(e)).subscribe({next:r,error:n})})}decodeBase64(e){return atob(e)}static \u0275fac=function(r){return new(r||t)(ee(P))};static \u0275prov=x({token:t,factory:t.\u0275fac})}return t})(),Ke=(()=>{class t{sw;versionUpdates;unrecoverable;get isEnabled(){return this.sw.isEnabled}ongoingCheckForUpdate=null;constructor(e){if(this.sw=e,!e.isEnabled){this.versionUpdates=g,this.unrecoverable=g;return}this.versionUpdates=this.sw.eventsOfType(["VERSION_DETECTED","VERSION_INSTALLATION_FAILED","VERSION_READY","NO_NEW_VERSION_DETECTED"]),this.unrecoverable=this.sw.eventsOfType("UNRECOVERABLE_STATE")}checkForUpdate(){if(!this.sw.isEnabled)return Promise.reject(new Error(ne));if(this.ongoingCheckForUpdate)return this.ongoingCheckForUpdate;let e=this.sw.generateNonce();return this.ongoingCheckForUpdate=this.sw.postMessageWithOperation("CHECK_FOR_UPDATES",{nonce:e},e).finally(()=>{this.ongoingCheckForUpdate=null}),this.ongoingCheckForUpdate}activateUpdate(){if(!this.sw.isEnabled)return Promise.reject(new w(5601,!1));let e=this.sw.generateNonce();return this.sw.postMessageWithOperation("ACTIVATE_UPDATE",{nonce:e},e)}static \u0275fac=function(r){return new(r||t)(ee(P))};static \u0275prov=x({token:t,factory:t.\u0275fac})}return t})(),Ve=new ce("");function Ye(){let t=i(j);if(!("serviceWorker"in navigator&&t.enabled!==!1))return;let o=i(Ve),e=i(de),r=i(te);e.runOutsideAngular(()=>{let n=navigator.serviceWorker,s=()=>n.controller?.postMessage({action:"INITIALIZE"});n.addEventListener("controllerchange",s),r.onDestroy(()=>{n.removeEventListener("controllerchange",s)})}),e.runOutsideAngular(()=>{let n,{registrationStrategy:s}=t;if(typeof s=="function")n=new Promise(a=>s().subscribe(()=>a()));else{let[a,...u]=(s||"registerWhenStable:30000").split(":");switch(a){case"registerImmediately":n=Promise.resolve();break;case"registerWithDelay":n=We(+u[0]||0);break;case"registerWhenStable":n=Promise.race([r.whenStable(),We(+u[0])]);break;default:throw new w(5600,!1)}}n.then(()=>{r.destroyed||navigator.serviceWorker.register(o,{scope:t.scope,updateViaCache:t.updateViaCache,type:t.type}).catch(a=>console.error(se(5604,!1)))})})}function We(t){return new Promise(o=>setTimeout(o,t))}function $e(){let t=i(j),o=i(pe),e=!0;return new P(e&&t.enabled!==!1?navigator.serviceWorker:void 0,o)}var j=class{enabled;updateViaCache;type;scope;registrationStrategy};function ze(t,o={}){return le([Ge,Ke,{provide:Ve,useValue:t},{provide:j,useValue:o},{provide:P,useFactory:$e},H(Ye)])}function Ze(t,o){if(t&1&&(f(0,"output",1),fe(1,"img",2)(2,"span",3),v()),t&2){let e=d();ye("opacity-0",e.isFadingOut()||!e.navigating())("opacity-100",!e.isFadingOut()&&e.navigating()),he("aria-busy",e.navigating()),p(),ve("src",e.logoSrc,ge)}}var $=class t{navigating=Se(!1);isFadingOut=I(!1);shouldRender=I(!1);logoSrc=xe;constructor(){ue(()=>{this.navigating()?(this.shouldRender.set(!0),this.isFadingOut.set(!1)):(this.isFadingOut.set(!0),setTimeout(()=>{this.shouldRender.set(!1),this.isFadingOut.set(!1)},300))})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=h({type:t,selectors:[["app-loading"]],inputs:{navigating:[1,"navigating"]},decls:1,vars:1,consts:[["data-e2e","loading-overlay","aria-live","polite",1,"loading-overlay",3,"opacity-0","opacity-100"],["data-e2e","loading-overlay","aria-live","polite",1,"loading-overlay"],["alt","Tressi Logo",1,"mb-4","size-20",3,"src"],[1,"text-base-content/50","loading","loading-infinity","size-12"]],template:function(e,r){e&1&&E(0,Ze,3,6,"output",0),e&2&&M(r.shouldRender()?0:-1)},styles:[` properties;.loading-overlay[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_fadeIn .3s ease-out;position:fixed;top:calc(var(--spacing, .25rem) * 0);left:calc(var(--spacing, .25rem) * 0);z-index:50;display:flex;height:100vh;width:100vw;flex-direction:column;align-items:center;justify-content:center;background-color:var(--color-base-100);transition-property:opacity;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s));--tw-duration: .3s;transition-duration:.3s;--tw-ease: var(--ease-out, cubic-bezier(0, 0, .2, 1));transition-timing-function:var(--ease-out, cubic-bezier(0, 0, .2, 1))} _ngcontent-%COMP%_fadeIn{0%{opacity:0}to{opacity:1}} base{:where([_ngcontent-%COMP%]:root), [_ngcontent-%COMP%]:root:has(input.theme-controller[value=light]:checked), [data-theme=light][_ngcontent-%COMP%]{color-scheme:light;--color-base-100: oklch(100% 0 0);--color-base-200: oklch(98% 0 0);--color-base-300: oklch(95% 0 0);--color-base-content: oklch(21% .006 285.885);--color-primary: oklch(45% .24 277.023);--color-primary-content: oklch(93% .034 272.788);--color-secondary: oklch(65% .241 354.308);--color-secondary-content: oklch(94% .028 342.258);--color-accent: oklch(77% .152 181.912);--color-accent-content: oklch(38% .063 188.416);--color-neutral: oklch(14% .005 285.823);--color-neutral-content: oklch(92% .004 286.32);--color-info: oklch(74% .16 232.661);--color-info-content: oklch(29% .066 243.157);--color-success: oklch(76% .177 163.223);--color-success-content: oklch(37% .077 168.94);--color-warning: oklch(82% .189 84.429);--color-warning-content: oklch(41% .112 45.904);--color-error: oklch(71% .194 13.428);--color-error-content: oklch(27% .105 12.094);--radius-selector: .5rem;--radius-field: .25rem;--radius-box: .5rem;--size-selector: .25rem;--size-field: .25rem;--border: 1px;--depth: 1;--noise: 0}} base{{[_ngcontent-%COMP%]:root:not([data-theme]){color-scheme:dark;--color-base-100: oklch(25.33% .016 252.42);--color-base-200: oklch(23.26% .014 253.1);--color-base-300: oklch(21.15% .012 254.09);--color-base-content: oklch(97.807% .029 256.847);--color-primary: oklch(58% .233 277.117);--color-primary-content: oklch(96% .018 272.314);--color-secondary: oklch(65% .241 354.308);--color-secondary-content: oklch(94% .028 342.258);--color-accent: oklch(77% .152 181.912);--color-accent-content: oklch(38% .063 188.416);--color-neutral: oklch(14% .005 285.823);--color-neutral-content: oklch(92% .004 286.32);--color-info: oklch(74% .16 232.661);--color-info-content: oklch(29% .066 243.157);--color-success: oklch(76% .177 163.223);--color-success-content: oklch(37% .077 168.94);--color-warning: oklch(82% .189 84.429);--color-warning-content: oklch(41% .112 45.904);--color-error: oklch(71% .194 13.428);--color-error-content: oklch(27% .105 12.094);--radius-selector: .5rem;--radius-field: .25rem;--radius-box: .5rem;--size-selector: .25rem;--size-field: .25rem;--border: 1px;--depth: 1;--noise: 0}}} base{[_ngcontent-%COMP%]:root:has(input.theme-controller[value=light]:checked), [data-theme=light][_ngcontent-%COMP%]{color-scheme:light;--color-base-100: oklch(100% 0 0);--color-base-200: oklch(98% 0 0);--color-base-300: oklch(95% 0 0);--color-base-content: oklch(21% .006 285.885);--color-primary: oklch(45% .24 277.023);--color-primary-content: oklch(93% .034 272.788);--color-secondary: oklch(65% .241 354.308);--color-secondary-content: oklch(94% .028 342.258);--color-accent: oklch(77% .152 181.912);--color-accent-content: oklch(38% .063 188.416);--color-neutral: oklch(14% .005 285.823);--color-neutral-content: oklch(92% .004 286.32);--color-info: oklch(74% .16 232.661);--color-info-content: oklch(29% .066 243.157);--color-success: oklch(76% .177 163.223);--color-success-content: oklch(37% .077 168.94);--color-warning: oklch(82% .189 84.429);--color-warning-content: oklch(41% .112 45.904);--color-error: oklch(71% .194 13.428);--color-error-content: oklch(27% .105 12.094);--radius-selector: .5rem;--radius-field: .25rem;--radius-box: .5rem;--size-selector: .25rem;--size-field: .25rem;--border: 1px;--depth: 1;--noise: 0}} base{[_ngcontent-%COMP%]:root:has(input.theme-controller[value=dark]:checked), [data-theme=dark][_ngcontent-%COMP%]{color-scheme:dark;--color-base-100: oklch(25.33% .016 252.42);--color-base-200: oklch(23.26% .014 253.1);--color-base-300: oklch(21.15% .012 254.09);--color-base-content: oklch(97.807% .029 256.847);--color-primary: oklch(58% .233 277.117);--color-primary-content: oklch(96% .018 272.314);--color-secondary: oklch(65% .241 354.308);--color-secondary-content: oklch(94% .028 342.258);--color-accent: oklch(77% .152 181.912);--color-accent-content: oklch(38% .063 188.416);--color-neutral: oklch(14% .005 285.823);--color-neutral-content: oklch(92% .004 286.32);--color-info: oklch(74% .16 232.661);--color-info-content: oklch(29% .066 243.157);--color-success: oklch(76% .177 163.223);--color-success-content: oklch(37% .077 168.94);--color-warning: oklch(82% .189 84.429);--color-warning-content: oklch(41% .112 45.904);--color-error: oklch(71% .194 13.428);--color-error-content: oklch(27% .105 12.094);--radius-selector: .5rem;--radius-field: .25rem;--radius-box: .5rem;--size-selector: .25rem;--size-field: .25rem;--border: 1px;--depth: 1;--noise: 0}} base{[_ngcontent-%COMP%]:root{--fx-noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.34' numOctaves='4' stitchTiles='stitch'%3E%3C/feTurbulence%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23a)' opacity='0.2'%3E%3C/rect%3E%3C/svg%3E")}} base{[_ngcontent-%COMP%]:root{scrollbar-color:currentColor #0000} (color: color-mix(in lab,red,red)){[_ngcontent-%COMP%]:root{scrollbar-color:color-mix(in oklch,currentColor 35%,#0000) #0000}}} base{ --radialprogress{syntax: "<percentage>"; inherits: true; initial-value: 0%;}} base{[_ngcontent-%COMP%]:root:not(span){overflow:var(--page-overflow)}} base{[_ngcontent-%COMP%]:root{background:var(--page-scroll-bg, var(--root-bg));--page-scroll-bg-on: linear-gradient(var(--root-bg, #0000), var(--root-bg, #0000)) var(--root-bg, #0000);--page-scroll-transition-on: background-color .3s ease-out;transition:var(--page-scroll-transition);scrollbar-gutter:var(--page-scroll-gutter, unset);scrollbar-gutter:if(style(--page-has-scroll: 1): var(--page-scroll-gutter, unset) ; else: unset)} (color: color-mix(in lab,red,red)){[_ngcontent-%COMP%]:root{--page-scroll-bg-on: linear-gradient(var(--root-bg, #0000), var(--root-bg, #0000)) color-mix(in srgb, var(--root-bg, #0000), oklch(0% 0 0) calc(var(--page-has-backdrop, 0) * 40%))}} set-page-has-scroll{0%,to{--page-has-scroll: 1}}} base{[_ngcontent-%COMP%]:root, [data-theme][_ngcontent-%COMP%]{background:var(--page-scroll-bg, var(--root-bg));color:var(--color-base-content)}:where([_ngcontent-%COMP%]:root, [data-theme][_ngcontent-%COMP%]){--root-bg: var(--color-base-100)}} _ngcontent-%COMP%_rating{0%,40%{scale:1.1;filter:brightness(1.05) contrast(1.05)}} _ngcontent-%COMP%_dropdown{0%{opacity:0}} _ngcontent-%COMP%_radio{0%{padding:5px}50%{padding:3px}} _ngcontent-%COMP%_toast{0%{scale:.9;opacity:0}to{scale:1;opacity:1}} _ngcontent-%COMP%_rotator{89.9999%,to{--first-item-position: 0 0%}90%,99.9999%{--first-item-position: 0 calc(var(--items) * 100%)}to{translate:0 -100%}} _ngcontent-%COMP%_skeleton{0%{background-position:150%}to{background-position:-50%}} _ngcontent-%COMP%_menu{0%{opacity:0}} _ngcontent-%COMP%_progress{50%{background-position-x:-115%}} --tw-duration{syntax: "*"; inherits: false;} --tw-ease{syntax: "*"; inherits: false;} properties{ ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*[_ngcontent-%COMP%], [_ngcontent-%COMP%]:before, [_ngcontent-%COMP%]:after, [_ngcontent-%COMP%]::backdrop{--tw-duration: initial;--tw-ease: initial}}}
`],changeDetection:0})};var D=class t{_localStorageService=i(Ie);_deferredPrompt=I(null);canInstall=N(()=>{let o=this._localStorageService.preferences().pwaPromptDismissed;return!!this._deferredPrompt()&&!o});constructor(){globalThis.addEventListener("beforeinstallprompt",o=>{o.preventDefault(),this._deferredPrompt.set(o)}),globalThis.addEventListener("appinstalled",()=>{this._deferredPrompt.set(null)})}async installPwa(){let o=this._deferredPrompt();if(!o)return;o.prompt();let{outcome:e}=await o.userChoice;e==="accepted"&&this._deferredPrompt.set(null)}dismissPrompt(){this._localStorageService.dismissPwaPrompt()}static \u0275fac=function(e){return new(e||t)};static \u0275prov=x({token:t,factory:t.\u0275fac,providedIn:"root"})};function qe(t,o){if(t&1){let e=G();f(0,"div",0)(1,"div",1)(2,"span",2),b(3,"download"),v(),f(4,"div")(5,"h3",3),b(6,"Install Tressi"),v(),f(7,"div",4),b(8,"Add Tressi to your desktop for a native experience."),v()(),f(9,"div",5)(10,"button",6),oe("click",function(){_(e);let n=d();return S(n.pwaService.dismissPrompt())}),b(11," Dismiss "),v(),f(12,"button",7),oe("click",function(){_(e);let n=d();return S(n.pwaService.installPwa())}),b(13," Install "),v()()()()}}var Z=class t{pwaService=i(D);static \u0275fac=function(e){return new(e||t)};static \u0275cmp=h({type:t,selectors:[["app-pwa-installer"]],decls:1,vars:1,consts:[[1,"animate-in","absolute","inset-x-0","top-4","mx-auto","w-fit"],["role","alert",1,"alert"],[1,"material-symbols-outlined","text-primary"],[1,"font-bold"],[1,"text-xs"],[1,"flex","gap-2"],["type","button",1,"btn","btn-sm","btn-ghost",3,"click"],["type","button",1,"btn","btn-sm","btn-primary",3,"click"]],template:function(e,r){e&1&&E(0,qe,14,0,"div",0),e&2&&M(r.pwaService.canInstall()?0:-1)},styles:["@keyframes _ngcontent-%COMP%_slideDown{0%{opacity:0;transform:translateY(-1rem)}to{opacity:1;transform:translateY(0)}}.animate-in[_ngcontent-%COMP%]{opacity:0;animation:_ngcontent-%COMP%_slideDown .4s cubic-bezier(.16,1,.3,1) 1s forwards}"]})};function Je(t,o){if(t&1){let e=G();O(0,"div",0)(1,"div",1),B(2,"app-icon",2),O(3,"span"),b(4),A(),O(5,"app-button",3),be("click",function(){_(e);let n=d();return S(n.onDismiss())})("onKeyDown",function(){_(e);let n=d();return S(n.onDismiss())}),A()()()}if(t&2){let e=d();p(),Ce(e.alertClass()+" toast-animation"),p(),R("name",e.iconName()),p(2),we(e.toastService.toastMessage()),p(),R("ghost",!0)("title","Close")("icon","close")}}var q=class t{toastService=i(Re);dismissed=_e();iconName=N(()=>{switch(this.toastService.toastType()){case"error":return"error";case"warning":return"warning";case"success":return"check";default:return"info"}});alertClass=N(()=>{switch(this.toastService.toastType()){case"error":return"alert alert-error";case"warning":return"alert alert-warning";case"success":return"alert alert-success";default:return"alert alert-info"}});onDismiss(){this.toastService.dismiss(),this.dismissed.emit()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=h({type:t,selectors:[["app-toast"]],outputs:{dismissed:"dismissed"},decls:1,vars:1,consts:[[1,"toast","toast-end","z-50"],["role","alert"],[3,"name"],[3,"click","onKeyDown","ghost","title","icon"]],template:function(e,r){e&1&&E(0,Je,6,7,"div",0),e&2&&M(r.toastService.showToast()?0:-1)},dependencies:[Ae,Ne],styles:["@keyframes _ngcontent-%COMP%_toastFade{0%{opacity:0;transform:translateY(-10px)}10%{opacity:1;transform:translateY(0)}90%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(10px)}}.toast-animation[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_toastFade 5s ease-in-out forwards}"]})};var J=class t{_titleService=i(je);_themeService=i(Fe);appRouter=i(F);pwaService=i(D);ngOnInit(){this._titleService.resetTitle(),this._themeService.loadInitialTheme()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=h({type:t,selectors:[["app-root"]],decls:5,vars:1,consts:[[1,"bg-base-100","min-h-screen"],[3,"navigating"]],template:function(e,r){e&1&&(O(0,"div",0),B(1,"app-loading",1)(2,"app-toast")(3,"app-pwa-installer")(4,"router-outlet"),A()),e&2&&(p(),R("navigating",r.appRouter.isNavigating()))},dependencies:[Oe,$,q,Z],encapsulation:2,changeDetection:0})};var U=()=>i(K).getAll();var Q=async()=>{let o=await i(Le).client.docs.list.$get();if(!o.ok)throw new Error("Failed to load documentation list");let e=await o.json();if("error"in e)throw new Error("Failed to load documentation list");return e};var He=async t=>{let o=i(Ue),e=t.paramMap.get("testId");if(!e)throw new Error("Test ID is required for resolution");let[r,n]=await Promise.all([o.getTestById(e),o.getTestMetrics(e)]);return{metrics:n,test:r}};var m=async()=>{let t=i(Y),o=i(F);return!t.isHealthy()||!await t.check()?(o.toServerUnavailable(),!1):!0},ie=async(t,o)=>{let e=i(K),r=i(F);try{let n=await e.getAll(),s=Array.isArray(n)&&n.length>0,a=t?.routeConfig?.path||"",y=(o?.url||"").replaceAll(/(^\/+)|(\/+$)/g,""),l=a||y;return s?l===c.WELCOME||l===c.HOME?(r.toDashboard(),!1):!0:l===c.WELCOME||l==="settings"||l===c.HOME?!0:(r.toWelcome(),!1)}catch{return!0}},Be=[{data:{title:"Server Unavailable"},loadComponent:()=>import("./chunk-7YOEOWEY.js").then(t=>t.ServerUnavailableComponent),path:c.SERVER_UNAVAILABLE},{canActivate:[m,ie],data:{title:"Welcome"},loadComponent:()=>import("./chunk-MB6TS4DE.js").then(t=>t.WelcomeComponent),path:c.WELCOME},{canActivate:[m],data:{title:"Configs"},loadComponent:()=>import("./chunk-E2JNEZZA.js").then(t=>t.ConfigsComponent),path:c.CONFIGS,resolve:{configs:U}},{canActivate:[m],data:{title:"Configs"},loadComponent:()=>import("./chunk-E2JNEZZA.js").then(t=>t.ConfigsComponent),path:c.CONFIGS_CREATE,resolve:{configs:U}},{canActivate:[m,ie],data:{title:"Dashboard"},loadComponent:()=>import("./chunk-BPIGQDXC.js").then(t=>t.DashboardComponent),path:c.DASHBOARD,resolve:{configs:U}},{canActivate:[m,ie],data:{title:"Dashboard"},loadComponent:()=>import("./chunk-BPIGQDXC.js").then(t=>t.DashboardComponent),path:c.DASHBOARD_WITH_ID,resolve:{configs:U}},{data:{title:"Showcase"},loadComponent:()=>import("./chunk-T3JNEED3.js").then(t=>t.ShowcaseComponent),path:c.SHOWCASE},{canActivate:[m],data:{title:"Test Details"},loadComponent:()=>import("./chunk-UZZIBFVW.js").then(t=>t.TestDetailComponent),path:c.TESTS_WITH_ID,resolve:{data:He}},{canActivate:[m],data:{title:"Documentation"},loadComponent:()=>import("./chunk-PML45H6B.js").then(t=>t.DocsComponent),path:c.DOCS,resolve:{availableDocs:Q}},{canActivate:[m],data:{title:"Documentation"},loadComponent:()=>import("./chunk-PML45H6B.js").then(t=>t.DocsComponent),path:c.DOCS_WITH_FILENAME,resolve:{availableDocs:Q}},{canActivate:[m],data:{title:"Documentation"},loadComponent:()=>import("./chunk-PML45H6B.js").then(t=>t.DocsComponent),path:c.DOCS_WITH_SECTION,resolve:{availableDocs:Q}},{path:c.HOME,pathMatch:"full",redirectTo:`/${c.WELCOME}`},{path:"**",redirectTo:`/${c.WELCOME}`}];var Qe=()=>i(Y).init(),Xe={providers:[ke(),Ee(),me(),Pe(Be,Te(),De()),ze("ngsw-worker.js",{enabled:!0,registrationStrategy:"registerWhenStable:30000"}),H(Qe)]};Me(J,Xe).catch(t=>console.error(t));