@mxtommy/kip 3.10.0-beta.4 → 3.10.0-beta.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/package.json +3 -2
  2. package/plugin/index.js +234 -26
  3. package/plugin/openApi.json +141 -0
  4. package/public/3rdpartylicenses.txt +52 -52
  5. package/public/assets/help-docs/welcome.md +2 -2
  6. package/public/assets/svg/icons.svg +5 -1
  7. package/public/chunk-27I36ZYA.js +2 -0
  8. package/public/chunk-2YGPLTEW.js +6 -0
  9. package/public/chunk-4MSEQKGR.js +2 -0
  10. package/public/chunk-5UBH6OWU.js +5 -0
  11. package/public/{chunk-Y2IB2JDT.js → chunk-CEAJKNTR.js} +10 -10
  12. package/public/chunk-DPDOUEUH.js +9 -0
  13. package/public/chunk-HO743WL4.js +3 -0
  14. package/public/chunk-I3H3XQ5E.js +1 -0
  15. package/public/{chunk-LRX3XYXK.js → chunk-I772OX6I.js} +1 -1
  16. package/public/chunk-IUCJGG6N.js +1 -0
  17. package/public/chunk-JNQX4WPI.js +1 -0
  18. package/public/chunk-JNXVWBL2.js +1 -0
  19. package/public/chunk-KNN6A4MI.js +2 -0
  20. package/public/chunk-LKF7CNOE.js +2 -0
  21. package/public/chunk-LTNAKI5X.js +1 -0
  22. package/public/chunk-MMJBKCH5.js +1 -0
  23. package/public/{chunk-GJ33QBJ6.js → chunk-MZURT7UO.js} +1 -1
  24. package/public/chunk-PB7HT3XU.js +15 -0
  25. package/public/chunk-PR5DAT3I.js +2 -0
  26. package/public/{chunk-J3WNXGAQ.js → chunk-QG3TFUUS.js} +1 -1
  27. package/public/{chunk-TDHAZ7DS.js → chunk-QXMATZB6.js} +1 -1
  28. package/public/chunk-SPUZNRYQ.js +5 -0
  29. package/public/chunk-TFULQA7J.js +3 -0
  30. package/public/{chunk-7OMETTVK.js → chunk-USU5F3L5.js} +1 -1
  31. package/public/index.html +1 -1
  32. package/public/{main-SVHIKBQ5.js → main-MAUOXZ64.js} +12 -14
  33. package/COPILOT.md +0 -362
  34. package/eslint.config.js +0 -45
  35. package/kip-plugin/src/index.ts +0 -49
  36. package/kip-plugin/tsconfig.plugin.json +0 -13
  37. package/public/chunk-BZF6OYAF.js +0 -7
  38. package/public/chunk-FW2LAMAA.js +0 -16
  39. package/public/chunk-GBHBJN24.js +0 -1
  40. package/public/chunk-GDOUBCED.js +0 -1
  41. package/public/chunk-HKUJILH7.js +0 -6
  42. package/public/chunk-JFDPDIG2.js +0 -2
  43. package/public/chunk-KJQ6X3BT.js +0 -2
  44. package/public/chunk-MXKB5Z6M.js +0 -5
  45. package/public/chunk-NL52VRFS.js +0 -1
  46. package/public/chunk-PTADMSJZ.js +0 -1
  47. package/public/chunk-T5GXSVMN.js +0 -1
  48. package/public/chunk-VSGAZDLP.js +0 -11
@@ -0,0 +1,2 @@
1
+ import{A as Ye,C as Qe,F as Xe,G as I,H as et,Hb as ke,Ia as Ae,Ja as c,Jc as U,O as tt,Oc as B,Pa as ae,Qa as d,Sa as f,W as it,Wa as k,Xb as m,Z as nt,Za as rt,a as v,aa as oe,ab as W,b as S,ba as p,ca as C,da as se,dc as T,ea as N,ec as P,f as y,ga as _,j as ie,l as h,oc as ot,p as Ze,qc as Me,r as Te,ra as A,t as b,tb as G,ua as R,v as ne,va as w,vc as Ee,w as re,wa as Ve}from"./chunk-PB7HT3XU.js";var l=(function(n){return n.Disconnected="Disconnected",n.HTTPDiscovering="HTTPDiscovering",n.HTTPConnected="HTTPConnected",n.HTTPError="HTTPError",n.HTTPRetrying="HTTPRetrying",n.WebSocketConnecting="WebSocketConnecting",n.Connected="Connected",n.WebSocketError="WebSocketError",n.WebSocketRetrying="WebSocketRetrying",n.PermanentFailure="PermanentFailure",n})(l||{}),st=(()=>{class n{config={httpRetryCount:3,webSocketRetryCount:5,retryIntervals:[2e3,3e3,5e3],notificationDebounceMs:0};_currentState$=new h(l.Disconnected);_status$=new h(this.createStatus(l.Disconnected,"Not connected"));_httpRetryCount=0;_webSocketRetryCount=0;_retryTimeout=null;_notificationTimeout=null;_httpRetryCallback=null;_webSocketRetryCallback=null;_isInitializationMode=!0;constructor(){console.log("[ConnectionStateMachine] Service initialized")}get state$(){return this._currentState$.asObservable()}get status$(){return this._status$.asObservable()}get currentState(){return this._currentState$.getValue()}enableWebSocketMode(){this._isInitializationMode=!1,console.log("[ConnectionStateMachine] WebSocket mode enabled");let e=this._status$.getValue();console.log(`[ConnectionStateMachine] Current status when enabling WebSocket mode: ${e.state} - ${e.message}`),this._status$.next(e)}setHTTPRetryCallback(e){this._httpRetryCallback=e}setWebSocketRetryCallback(e){this._webSocketRetryCallback=e}startHTTPDiscovery(e="Connection request"){console.log(`[ConnectionStateMachine] Starting HTTP discovery: ${e}`),this._httpRetryCount=0,this.setState(l.HTTPDiscovering,"Discovering Signal K server...")}onHTTPDiscoverySuccess(){console.log("[ConnectionStateMachine] HTTP discovery successful"),this._httpRetryCount=0,this.setState(l.HTTPConnected,"Signal K server discovered"),this._isInitializationMode||this.startWebSocketConnection()}onHTTPDiscoveryError(e){console.log(`[ConnectionStateMachine] HTTP discovery failed: ${e}`),this._httpRetryCount<this.config.httpRetryCount?(this._httpRetryCount++,this.setState(l.HTTPRetrying,`HTTP connection failed. Retrying (${this._httpRetryCount}/${this.config.httpRetryCount})...`,this._httpRetryCount,this.config.httpRetryCount),this.scheduleHTTPRetry()):this.setState(l.PermanentFailure,`HTTP connection failed after ${this.config.httpRetryCount} attempts. Check server URL.`,this.config.httpRetryCount,this.config.httpRetryCount)}startWebSocketConnection(){if(!(this.currentState===l.HTTPConnected||this.currentState===l.WebSocketRetrying||this.currentState===l.WebSocketConnecting||this.currentState===l.Connected))return this.currentState===l.HTTPDiscovering,void 0;console.log("[ConnectionStateMachine] Starting WebSocket connection"),this._webSocketRetryCount=0,this.setState(l.WebSocketConnecting,"Connecting to Signal K Websocket...")}onWebSocketConnected(){console.log("[ConnectionStateMachine] WebSocket connected"),this._webSocketRetryCount=0,this.setState(l.Connected,"Connected to Signal K server")}onWebSocketError(e){if(console.log(`[ConnectionStateMachine] WebSocket error: ${e}`),this.currentState!==l.HTTPConnected&&this.currentState!==l.WebSocketConnecting&&this.currentState!==l.Connected&&this.currentState!==l.WebSocketRetrying){console.log("[ConnectionStateMachine] HTTP connection lost, restarting HTTP discovery"),this.startHTTPDiscovery("HTTP connection lost during WebSocket operation");return}this._webSocketRetryCount++,this.setState(l.WebSocketRetrying,`WebSocket connection failed. Retry attempt ${this._webSocketRetryCount}...`,this._webSocketRetryCount,this.config.webSocketRetryCount),this.scheduleWebSocketRetry()}shutdown(e="App shutdown"){console.log(`[ConnectionStateMachine] Shutting down all connections: ${e}`),this.clearRetryTimer(),this.clearNotificationTimeout(),this._httpRetryCount=0,this._webSocketRetryCount=0,this.setState(l.Disconnected,"Application restarting...")}isHTTPConnected(){return this.currentState===l.HTTPConnected||this.currentState===l.WebSocketConnecting||this.currentState===l.Connected||this.currentState===l.WebSocketRetrying}isFullyConnected(){return this.currentState===l.Connected}setState(e,i,r,o){this._currentState$.next(e);let s=this.createStatus(e,i,r,o);e===l.HTTPDiscovering||e===l.WebSocketConnecting?this._status$.next(s):e===l.Connected?(this.clearNotificationTimeout(),this._notificationTimeout=setTimeout(()=>{this._status$.next(s)},this.config.notificationDebounceMs)):(this.clearNotificationTimeout(),this._status$.next(s))}createStatus(e,i,r,o){return{state:e,operation:this.stateToOperationCode(e),message:i,retryCount:r||0,maxRetries:o||0,timestamp:new Date}}stateToOperationCode(e){switch(e){case l.Disconnected:return 0;case l.HTTPDiscovering:case l.WebSocketConnecting:return 1;case l.Connected:return 2;case l.HTTPError:case l.WebSocketError:case l.HTTPRetrying:case l.WebSocketRetrying:return 3;case l.HTTPConnected:return 2;case l.PermanentFailure:return 5;default:return 0}}scheduleHTTPRetry(){this.clearRetryTimer();let e=Math.min(this._httpRetryCount-1,this.config.retryIntervals.length-1),i=this.config.retryIntervals[e];console.log(`[ConnectionStateMachine] Scheduling HTTP retry in ${i}ms`),this._retryTimeout=setTimeout(()=>{this._httpRetryCallback?(console.log(`[ConnectionStateMachine] Executing HTTP retry ${this._httpRetryCount}/${this.config.httpRetryCount}`),this._httpRetryCallback()):(console.error("[ConnectionStateMachine] No HTTP retry callback set!"),this.setState(l.Disconnected,"HTTP retry callback not configured"))},i)}scheduleWebSocketRetry(){this.clearRetryTimer(),console.log(`[ConnectionStateMachine] Scheduling WebSocket retry in ${this.config.retryIntervals[1]}ms`),this._retryTimeout=setTimeout(()=>{this._webSocketRetryCallback?(console.log(`[ConnectionStateMachine] Executing WebSocket retry ${this._webSocketRetryCount}/${this.config.webSocketRetryCount}`),this._webSocketRetryCallback()):(console.log("[ConnectionStateMachine] No WebSocket retry callback - using state change method"),this.setState(l.WebSocketConnecting,`Retrying WebSocket connection (${this._webSocketRetryCount}/${this.config.webSocketRetryCount})...`,this._webSocketRetryCount,this.config.webSocketRetryCount))},this.config.retryIntervals[1])}clearRetryTimer(){this._retryTimeout&&(clearTimeout(this._retryTimeout),this._retryTimeout=null)}clearNotificationTimeout(){this._notificationTimeout&&(clearTimeout(this._notificationTimeout),this._notificationTimeout=null)}ngOnDestroy(){this.clearRetryTimer(),this.clearNotificationTimeout(),this._httpRetryCallback=null,this._webSocketRetryCallback=null,this._currentState$?.complete(),this._status$?.complete()}static \u0275fac=function(i){return new(i||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var le=(()=>{class n{TIMEOUT_DURATION=1e4;connectionStateMachine=_(st);constructor(){this.connectionStateMachine.setHTTPRetryCallback(()=>{console.log("[SignalKConnectionService] Executing HTTP retry via callback"),this.retryCurrentConnection()})}serverServiceEndpoint$=new h({operation:0,message:"Not connected",serverDescription:null,httpServiceUrl:null,WsServiceUrl:null});signalKURL;serverName;serverVersion$=new h(null);serverRoles=[];http=_(U);currentProxyEnabled;currentSubscribeAll;validateSignalKUrl(e){return y(this,null,function*(){if(!e)throw new Error("Please enter a server URL");try{let r=new URL(e);if(!["http:","https:"].includes(r.protocol))throw new Error("URL must start with http:// or https://")}catch{throw new Error("Invalid URL format - please check for typos and ensure it starts with http:// or https://")}let i=e;i.endsWith("signalk/")||(i+="/signalk/"),console.log(`[Connection Service] Validating Signal K server at: ${e}`);try{if(!(yield b(this.http.get(i,{observe:"response"}).pipe(ne(5e3),I(o=>{throw console.error("[Connection Service] HTTP Error details:",o),o.name==="TimeoutError"?(console.error("[Connection Service] Validation timed out after 5000ms"),new Error("Server is not responding - check if the URL is correct and the server is running")):o.status===0||o.status===void 0?new Error("Cannot connect to server - check the URL format and ensure the server is accessible"):o.status===404?new Error("Server found but no Signal K service detected - verify this is a Signal K server"):o.status===403?new Error("Server refused connection - check if the server allows connections from this browser"):o.status>=500?new Error(`Server error (${o.status}) - the Signal K server may be having issues`):new Error(`Connection failed (${o.status}) - ${o.statusText||"please check the server URL"}`)})))).body?.endpoints?.v1)throw new Error("Server responded but doesn't appear to be a Signal K server - missing required endpoints");console.log(`[Connection Service] Validation successful for: ${e}`)}catch(r){throw console.error(`[Connection Service] Validation failed for ${e}:`,r.message),r}})}initializeConnection(e,i,r){return y(this,null,function*(){if(!e.url){console.log("[Connection Service] Connection initialization called with null or empty URL value");return}this.currentProxyEnabled=i,this.currentSubscribeAll=r;let o={operation:1,message:"Connecting...",serverDescription:null,httpServiceUrl:null,WsServiceUrl:null};this.signalKURL=e,this.serverServiceEndpoint$.next(o),this.connectionStateMachine.startHTTPDiscovery(`Connecting to ${e.url}`);let s=this.signalKURL.url;s.endsWith("signalk/")||(s+="/signalk/");try{console.log("[Connection Service] Connecting to: "+this.signalKURL.url);let a=yield b(this.http.get(s,{observe:"response"}).pipe(ne(this.TIMEOUT_DURATION),I(u=>(u.name==="TimeoutError"&&console.error("[Connection Service] Connection request timed out after "+this.TIMEOUT_DURATION+"ms"),Te(u)))));Object.assign(o,this.processEndpointResponse(a,i,r)),this.connectionStateMachine.onHTTPDiscoverySuccess()}catch(a){o.operation=3,o.message=a.message,this.connectionStateMachine.onHTTPDiscoveryError(a.message),this.handleError(a)}finally{o.subscribeAll=!!r,this.serverServiceEndpoint$.next(o)}})}retryCurrentConnection(){if(!this.signalKURL?.url){console.error("[SignalKConnectionService] Cannot retry - no current URL stored");return}console.log(`[SignalKConnectionService] Retrying connection to ${this.signalKURL.url}`),this.performHTTPDiscovery()}performHTTPDiscovery(){return y(this,null,function*(){if(!this.signalKURL?.url){console.error("[SignalKConnectionService] No URL available for HTTP discovery");return}let e=this.signalKURL.url;e.endsWith("signalk/")||(e+="/signalk/");try{console.log("[Connection Service] Connecting to: "+this.signalKURL.url);let i=yield b(this.http.get(e,{observe:"response"}).pipe(ne(this.TIMEOUT_DURATION),I(o=>(o.name==="TimeoutError"&&console.error("[Connection Service] Connection request timed out after "+this.TIMEOUT_DURATION+"ms"),Te(o))))),r=this.processEndpointResponse(i,this.currentProxyEnabled,this.currentSubscribeAll);this.connectionStateMachine.onHTTPDiscoverySuccess(),this.serverServiceEndpoint$.next(r)}catch(i){let r={operation:3,message:i.message,serverDescription:null,httpServiceUrl:null,WsServiceUrl:null};this.connectionStateMachine.onHTTPDiscoveryError(i.message),this.serverServiceEndpoint$.next(r),this.handleError(i)}})}processEndpointResponse(e,i,r){console.debug("[Connection Service] Signal K HTTP Endpoints retrieved"),this.serverVersion$.next(e.body.server.version);let o=e.body.endpoints.v1["signalk-http"],s=e.body.endpoints.v1["signalk-ws"],a={operation:2,message:e.status?.toString()||"Connected",serverDescription:`${e.body.server.id} ${e.body.server.version}`,httpServiceUrl:null,WsServiceUrl:null};if(i)console.debug("[Connection Service] Proxy Mode Enabled"),a.httpServiceUrl=window.location.origin+new URL(o).pathname,a.WsServiceUrl=window.location.protocol.replace("http","ws")+"//"+window.location.host+new URL(s).pathname;else{a.httpServiceUrl=o;let u=window.location.protocol==="https:";a.WsServiceUrl=u?s.replace("ws://","wss://"):s}return console.debug("[Connection Service] HTTP URI: "+a.httpServiceUrl),console.debug("[Connection Service] WebSocket URI: "+a.WsServiceUrl),a.subscribeAll=!!r,a}handleError(e){let i=e.status===0?`[Connection Service] ${e.name}: ${e.message}`:`[Connection Service] Backend returned code ${e.status}, body was: ${e.error}`;throw console.error(i),e}getServiceEndpointStatusAsO(){return this.serverServiceEndpoint$.asObservable()}setServerInfo(e,i,r){this.serverName=e,this.serverRoles=r,console.log(`[Connection Service] Server Name: ${e}, Version: ${i}, Roles: ${JSON.stringify(r)}`)}get skServerName(){return this.serverName}get skServerVersion(){return this.serverVersion$.getValue()}get skServerRoles(){return this.serverRoles}static \u0275fac=function(i){return new(i||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var ei="/signalk/v1/",at="auth/login",ti="auth/logout",ii="auth/validate",ni=60,lt=(()=>{class n{http=_(U);conn=_(le);_IsLoggedIn$=new h(!1);isLoggedIn$=this._IsLoggedIn$.asObservable();_authToken$=new h(null);authToken$=this._authToken$.asObservable();connectionEndpointSubscription=null;authTokenSubscription=null;isRenewingToken=!1;loginUrl=null;logoutUrl=null;validateTokenUrl=null;constructor(){let e=JSON.parse(localStorage.getItem("authorization_token"));e&&(e.isDeviceAccessToken?e.expiry===null?(console.log("[Authentication Service] Device Access Token found with expiry: NEVER"),this._authToken$.next(e)):this.isTokenExpired(e.expiry)?(console.log("[Authentication Service] Device Access Token expired. Deleting token"),localStorage.removeItem("authorization_token")):(console.log("[Authentication Service] Device Access Token found in Local Storage"),this._authToken$.next(e)):(console.log("[Authentication Service] User session token found in Local Storage"),console.log("[Authentication Service] Deleting user session token"),localStorage.removeItem("authorization_token"))),this.authTokenSubscription=this._authToken$.pipe(Xe(i=>!!i&&i.expiry!==null),tt((i,r)=>i.expiry===r.expiry),re(i=>{let r=this.getTokenExpirationDate(i.expiry,ni),o=r.getTime()-Date.now();return console.log(`[Authentication Service] Token refresh timer set for ${o} ms (Token Expiry: ${r.toISOString()})`),Math.max(o,0)}),it(i=>Qe(i))).subscribe(()=>{this.handleTokenRenewal()}),this.connectionEndpointSubscription=this.conn.serverServiceEndpoint$.subscribe(i=>{if(i.operation===2){let r=i.httpServiceUrl.substring(0,i.httpServiceUrl.length-4);this.loginUrl=r+at,this.logoutUrl=r+ti,this.validateTokenUrl=r+ii}})}handleTokenRenewal(){if(this.isRenewingToken){console.warn("[Authentication Service] Token renewal already in progress.");return}this.isRenewingToken=!0;let e=JSON.parse(localStorage.getItem("authorization_token"));if(!e){console.warn("[Authentication Service] No token found in local storage. Cannot renew."),this.isRenewingToken=!1;return}if(e.isDeviceAccessToken)console.warn("[Authentication Service] Device Access Token expired. Manual renewal required."),this.isRenewingToken=!1;else if(this.isTokenExpired(e.expiry))console.log("[Authentication Service] User session Token expired. Cannot renew."),this.isRenewingToken=!1;else{console.log("[Authentication Service] User session Token expires soon. Renewing token...");let i=JSON.parse(localStorage.getItem("connectionConfig"));this.login({usr:i.loginName,pwd:i.loginPassword}).then(()=>{console.log("[Authentication Service] Token successfully renewed.")}).catch(r=>{console.error("[Authentication Service] Token renewal failed. Server returned:",r.error)}).finally(()=>{this.isRenewingToken=!1})}}login(o){return y(this,arguments,function*({usr:e,pwd:i,newUrl:r}){let s;if(r?s=r.replace(/\/+$/,"")+ei+at:s=this.loginUrl,this._IsLoggedIn$.getValue()&&(yield this.logout(!0)),!s)throw console.error("[Authentication Service] Login URL is not set. Cannot perform login."),this.deleteToken(),new Error("Login URL is not set.");yield b(this.http.post(s,{username:e,password:i},{observe:"response"})).then(a=>{console.log("[Authentication Service] User "+e+" login successful"),this.setSession(a.body.token)}).catch(a=>{this.deleteToken(),this.handleError(a)})})}handleError(e){throw e.status===0&&this.deleteToken(),e}setSession(e){if(e){let i=JSON.parse(atob(e.split(".")[1])).exp,r={token:null,expiry:null,isDeviceAccessToken:!1};i===void 0?(r.token=e,console.log("[Authentication Service] User Session Token received. Token Expiration: NEVER"),this._IsLoggedIn$.next(!0),this._authToken$.next(r),localStorage.setItem("authorization_token",JSON.stringify(r))):this.isTokenExpired(i)?console.log("[Authentication Service] Received expired Session Token from server"):(r.token=e,r.expiry=i,console.log("[Authentication Service] Session Authorization Token received. Token Expiration: "+this.getTokenExpirationDate(r.expiry)),this._IsLoggedIn$.next(!0),this._authToken$.next(r),localStorage.setItem("authorization_token",JSON.stringify(r)))}}isTokenExpired(e){return Math.floor(new Date().getTime()/1e3)>=e}getTokenExpirationDate(e,i){let r=new Date(0);if(i){let o=new Date(0);o.setUTCSeconds(e-i),r=o}else r.setUTCSeconds(e);return r}renewToken(){return this.http.post(this.validateTokenUrl,null,{observe:"response"})}logout(e){return y(this,null,function*(){localStorage.removeItem("authorization_token"),yield b(this.http.put(this.logoutUrl,null)).then(()=>{this._IsLoggedIn$.next(!1),e||this._authToken$.next(null),console.log("[Authentication Service] User logged out")}).catch(i=>{console.error(i)})})}deleteToken(){this._authToken$&&(console.log("[Authentication Service] Deleting Authorization token"),localStorage.removeItem("authorization_token"),this._IsLoggedIn$.next(!1),this._authToken$.next(null))}setDeviceAccessToken(e){if(e){let i=JSON.parse(atob(e.split(".")[1])).exp,r={token:null,expiry:null,isDeviceAccessToken:!0};i===void 0?(r.token=e,console.log("[Authentication Service] Device Access Token received. Token Expiration: NEVER"),this._IsLoggedIn$.next(!1),this._authToken$.next(r),localStorage.setItem("authorization_token",JSON.stringify(r))):this.isTokenExpired(i)?console.log("[Authentication Service] Received expired Device Access Token from server"):(r.token=e,r.expiry=i,console.log("[Authentication Service] Device Access Token received. Token Expiration: "+this.getTokenExpirationDate(r.expiry)),this._IsLoggedIn$.next(!1),this._authToken$.next(r),localStorage.setItem("authorization_token",JSON.stringify(r)))}}ngOnDestroy(){this.connectionEndpointSubscription?.unsubscribe(),this.authTokenSubscription?.unsubscribe()}static \u0275fac=function(i){return new(i||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var ri=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,Ne=n=>{if(typeof n!="string")throw new TypeError("Invalid argument expected string");let t=n.match(ri);if(!t)throw new Error(`Invalid argument not valid semver ('${n}' received)`);return t.shift(),t},ct=n=>n==="*"||n==="x"||n==="X",ut=n=>{let t=parseInt(n,10);return isNaN(t)?n:t},oi=(n,t)=>typeof n!=typeof t?[String(n),String(t)]:[n,t],si=(n,t)=>{if(ct(n)||ct(t))return 0;let[e,i]=oi(ut(n),ut(t));return e>i?1:e<i?-1:0},xe=(n,t)=>{for(let e=0;e<Math.max(n.length,t.length);e++){let i=si(n[e]||"0",t[e]||"0");if(i!==0)return i}return 0};var dt=(n,t)=>{let e=Ne(n),i=Ne(t),r=e.pop(),o=i.pop(),s=xe(e,i);return s!==0?s:r&&o?xe(r.split("."),o.split(".")):r||o?r?-1:1:0};var Fe=(n,t,e)=>{ai(e);let i=dt(n,t);return ft[e].includes(i)},ft={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},ht=Object.keys(ft),ai=n=>{if(typeof n!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof n}`);if(ht.indexOf(n)===-1)throw new Error(`Invalid operator, expected one of ${ht.join("|")}`)};var gt=(()=>{class n{server=_(le);http=_(U);_auth=_(lt);serverEndpoint=null;isAppDataSupported=!1;configFileVersion=null;sharedConfigName;InitConfig=null;storageServiceReady$=new h(!1);_isLoggedIn=!1;_networkStatus=void 0;patchQueue$=new ie;patch=function(e){return this.http.post(e.url,e.document).pipe(nt(()=>console.log("[Storage Service] Remote config patch request completed successfully")),I(i=>this.handleError(i)))};constructor(){let e=this.server;this._auth.isLoggedIn$.pipe(B()).subscribe(i=>{this._isLoggedIn=i,this.isStorageServiceReady()}),e.serverServiceEndpoint$.pipe(B()).subscribe(i=>{this._networkStatus=i,this.isStorageServiceReady()}),e.serverVersion$.pipe(B()).subscribe(i=>{i&&(this.isAppDataSupported=Fe(i,"1.27.0",">="))}),this.patchQueue$.pipe(et(i=>this.patch(i)),B()).subscribe(()=>{})}isStorageServiceReady(){this._networkStatus?.httpServiceUrl&&(this.serverEndpoint=this._networkStatus.httpServiceUrl.substring(0,this._networkStatus.httpServiceUrl.length-4)+"applicationData/"),this._networkStatus?.operation===2&&this._isLoggedIn&&this.serverEndpoint?(this.storageServiceReady$.next(!0),console.log(`[Remote Storage Service] Authenticated ${this._isLoggedIn} ,AppData API: ${this.serverEndpoint}`)):this.storageServiceReady$.next(!1)}ensureReady(){if(!this.storageServiceReady$.getValue())throw new Error("[StorageService] Not ready: storageServiceReady is false")}listConfigs(e){return y(this,null,function*(){this.ensureReady();let i=[];if(!this.serverEndpoint)return console.warn("[Storage Service] No server endpoint set. Cannot retrieve config list"),null;let r=this.serverEndpoint,o=r+"global/kip/"+this.configFileVersion+"/?keys=true",s=r+"user/kip/"+this.configFileVersion+"/?keys=true";return e&&(o=r+"global/kip/"+e+"/?keys=true",s=r+"user/kip/"+e+"/?keys=true"),yield b(this.http.get(o)).then(a=>{for(let u of a)i.push({scope:"global",name:u});console.log("[Storage Service] Retrieved Global config list")}).catch(a=>{this.handleError(a)}),yield b(this.http.get(s)).then(a=>{for(let u of a)i.push({scope:"user",name:u});console.log("[Storage Service] Retrieved User config list")}).catch(a=>{this.handleError(a)}),i})}getConfig(e,i,r,o){return y(this,null,function*(){this.ensureReady();let s=null,a=this.serverEndpoint+e+"/kip/"+this.configFileVersion+"/"+i;return r&&(a=this.serverEndpoint+e+"/kip/"+r+"/"+i),yield b(this.http.get(a)).then(u=>{s=u,console.log(`[Storage Service] Retrieved config [${i}] from [${e}] scope`),o&&(this.InitConfig=u)}).catch(u=>{this.handleError(u)}),s})}setConfig(e,i,r,o){return y(this,null,function*(){this.ensureReady();let s=this.serverEndpoint+e+"/kip/"+this.configFileVersion+"/"+i,a=null;return o&&(s=this.serverEndpoint+e+"/kip/"+o+"/"+i),yield b(this.http.post(s,r)).then(u=>{console.log(`[Storage Service] Saved config [${i}] to [${e}] scope`),a=u}).catch(u=>{this.handleError(u)}),a})}patchConfig(e,i,r){this.ensureReady();let o=this.serverEndpoint+"user/kip/"+this.configFileVersion,s;switch(r&&(o=this.serverEndpoint+"user/kip/"+r),e){case"IAppConfig":s=[{op:"replace",path:`/${this.sharedConfigName}/app`,value:i}];break;case"IThemeConfig":s=[{op:"replace",path:`/${this.sharedConfigName}/theme/themeName`,value:i.themeName}];break;case"IWidgetConfig":s=[{op:"replace",path:`/${this.sharedConfigName}/widget`,value:i}];break;case"ILayoutConfig":s=[{op:"replace",path:`/${this.sharedConfigName}/layout`,value:i}];break;case"Dashboards":s=[{op:"replace",path:`/${this.sharedConfigName}/dashboards`,value:i}];break;case"Array<IUnitDefaults>":s=[{op:"replace",path:`/${this.sharedConfigName}/app/unitDefaults`,value:i}];break;case"Array<IDatasetDef>":s=[{op:"replace",path:`/${this.sharedConfigName}/app/dataSets`,value:i}];break;case"INotificationConfig":s=[{op:"replace",path:`/${this.sharedConfigName}/app/notificationConfig`,value:i}];break;default:console.warn("[Storage Service] JSON Patch request type unknown");break}let a={url:o,document:s};this.patchQueue$.next(a)}patchGlobal(e,i,r,o,s){this.ensureReady();let a=this.serverEndpoint+i+"/kip/"+this.configFileVersion;s&&(a=this.serverEndpoint+i+"/kip/"+s);let u;switch(o){case"add":u=[{op:"add",path:`/${e}`,value:r}];break;case"replace":u=[{op:"replace",path:`/${e}`,value:r}];break;case"remove":u=[{op:"remove",path:`/${e}`,value:r}];break;default:console.warn("[Storage Service] JSON Patch operation request type unknown");break}let Xt={url:a,document:u};this.patchQueue$.next(Xt)}removeItem(e,i,r){this.ensureReady();let o=this.serverEndpoint+e+"/kip/"+this.configFileVersion;r&&(o=this.serverEndpoint+e+"/kip/"+r);let s=[{op:"remove",path:`/${i}`}],a={url:o,document:s};this.patchQueue$.next(a)}clear(){this.ensureReady()}set activeConfigFileVersion(e){this.configFileVersion=e}handleError(e){throw e.status===0?console.error("[Storage Service] An error occurred:",e.error):console.error("[Storage Service] Backend returned error: ",e.message),e}get initConfig(){return this.InitConfig}static \u0275fac=function(i){return new(i||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var M=class{static create(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){let e=Math.random()*16|0;return(t=="x"?e:e&3|8).toString(16)})}};var K={disableNotifications:!1,menuGrouping:!0,security:{disableSecurity:!0},devices:{disableDevices:!1,showNormalState:!1,showNominalState:!1},sound:{disableSound:!1,muteNormal:!0,muteNominal:!0,muteWarn:!0,muteAlert:!1,muteAlarm:!1,muteEmergency:!1}};var ce={Unitless:"unitless",Speed:"knots",Flow:"l/h",Temperature:"celsius",Length:"m",Volume:"liter",Current:"A",Potential:"V",Charge:"C",Power:"W",Energy:"J",Pressure:"mmHg","Fuel Distance":"nm/l","Energy Distance":"nm/kWh",Density:"kg/m3",Time:"Hours","Angular Velocity":"deg/min",Angle:"deg",Frequency:"Hz",Ratio:"ratio",Resistance:"ohm"};var pt={configVersion:11,autoNightMode:!0,redNightMode:!1,nightModeBrightness:.27,isRemoteControl:!1,instanceName:"",dataSets:[],unitDefaults:ce,notificationConfig:K},mt={themeName:""};var vt={configVersion:11,kipUUID:M.create(),signalKUrl:null,proxyEnabled:!1,signalKSubscribeAll:!1,useDeviceToken:!1,loginName:null,loginPassword:null,useSharedConfig:!1,sharedConfigName:"default"};var Ie={configVersion:11,autoNightMode:!1,redNightMode:!1,nightModeBrightness:.27,isRemoteControl:!1,instanceName:"",dataSets:[{uuid:"afbe4e41-26f5-404f-a55d-9f7b9b76fbd1",path:"self.environment.wind.speedApparent",pathSource:"default",period:1,baseUnit:"m/s",label:"self.environment.wind.speedApparent, Source: default, Scale: minute, Period: 1",timeScaleFormat:"minute"}],unitDefaults:{Unitless:"unitless",Speed:"knots",Flow:"l/h",Temperature:"celsius",Length:"m",Volume:"liter",Current:"A",Potential:"V",Charge:"C",Power:"W",Energy:"J",Pressure:"mmHg","Fuel Distance":"nm/l","Energy Distance":"nm/kWh",Density:"kg/m3",Time:"Hours","Angular Velocity":"deg/min",Angle:"deg",Frequency:"Hz",Ratio:"ratio",Resistance:"ohm"},notificationConfig:{disableNotifications:!1,menuGrouping:!0,security:{disableSecurity:!0},devices:{disableDevices:!1,showNormalState:!1,showNominalState:!1},sound:{disableSound:!1,muteNormal:!0,muteNominal:!0,muteWarn:!0,muteAlert:!1,muteAlarm:!1,muteEmergency:!1}}},Re=[{id:"3e0825ee-95fd-4ad4-8802-e0507845b668",name:"Sailing",icon:"dashboard-sailing",configuration:[{w:3,h:4,id:"339698a7-2cff-4ab9-9b50-d8056f971471",selector:"widget-numeric",input:{widgetProperties:{type:"widget-numeric",uuid:"339698a7-2cff-4ab9-9b50-d8056f971471",config:{displayName:"Depth",filterSelfPaths:!0,paths:{numericPath:{description:"Numeric Data",path:"self.environment.depth.belowTransducer",source:"default",pathType:"number",isPathConfigurable:!0,convertUnitTo:"m",showPathSkUnitsFilter:!0,pathSkUnitsFilter:null,sampleTime:500}},showMax:!1,showMin:!1,numDecimal:1,showMiniChart:!0,yScaleMin:0,yScaleMax:100,inverseYAxis:!1,verticalChart:!1,color:"blue",enableTimeout:!1,dataTimeout:5,ignoreZones:!1}}},x:0,y:0},{w:5,h:10,id:"a44028e0-dfee-4492-895b-2b03a60f3a69",selector:"widget-wind-steer",input:{widgetProperties:{type:"widget-wind-steer",uuid:"a44028e0-dfee-4492-895b-2b03a60f3a69",config:{filterSelfPaths:!0,paths:{headingPath:{description:"True Heading",path:"self.navigation.headingTrue",source:"default",pathType:"number",isPathConfigurable:!0,pathRequired:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",convertUnitTo:"deg",showConvertUnitTo:!1,sampleTime:500},appWindAngle:{description:"Apparent Wind Angle",path:"self.environment.wind.angleApparent",source:"default",pathType:"number",isPathConfigurable:!0,pathRequired:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",convertUnitTo:"deg",showConvertUnitTo:!1,sampleTime:500},appWindSpeed:{description:"Apparent Wind Speed",path:"self.environment.wind.speedApparent",source:"default",pathType:"number",isPathConfigurable:!0,pathRequired:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"m/s",convertUnitTo:"knots",sampleTime:500},trueWindAngle:{description:"True Wind Angle",path:"self.environment.wind.angleTrueWater",source:"default",pathType:"number",isPathConfigurable:!0,pathRequired:!1,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",convertUnitTo:"deg",showConvertUnitTo:!1,sampleTime:500},trueWindSpeed:{description:"True Wind Speed",path:"self.environment.wind.speedTrue",source:"default",pathType:"number",isPathConfigurable:!0,pathRequired:!1,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"m/s",convertUnitTo:"knots",sampleTime:500},courseOverGround:{description:"True Course Over Ground",path:"self.navigation.courseOverGroundTrue",source:"default",pathType:"number",isPathConfigurable:!0,pathRequired:!1,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",showConvertUnitTo:!1,convertUnitTo:"deg",sampleTime:500},nextWaypointBearing:{description:"Next Waypoint True Bearing",path:"self.navigation.courseGreatCircle.nextPoint.bearingTrue",source:"default",pathType:"number",isPathConfigurable:!1,pathRequired:!1,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",convertUnitTo:"deg",showConvertUnitTo:!1,sampleTime:500},set:{description:"True Drift Set",path:"self.environment.current.setTrue",source:"default",pathType:"number",isPathConfigurable:!0,pathRequired:!1,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",convertUnitTo:"deg",showConvertUnitTo:!1,sampleTime:500},drift:{description:"Drift Speed Impact",path:"self.environment.current.drift",source:"default",pathType:"number",isPathConfigurable:!0,pathRequired:!1,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"m/s",convertUnitTo:"knots",sampleTime:500}},windSectorEnable:!0,windSectorWindowSeconds:5,laylineEnable:!0,laylineAngle:40,waypointEnable:!0,courseOverGroundEnable:!0,driftEnable:!0,awsEnable:!0,twsEnable:!0,sailSetupEnable:!1,enableTimeout:!1,dataTimeout:5}}},x:3,y:0},{w:4,h:6,id:"24406c15-7738-4dc1-a206-7a4862c2931d",selector:"widget-gauge-ng-radial",input:{widgetProperties:{type:"widget-gauge-ng-radial",uuid:"24406c15-7738-4dc1-a206-7a4862c2931d",config:{displayName:"SOG",filterSelfPaths:!0,paths:{gaugePath:{description:"Numeric Data",path:"self.navigation.speedOverGround",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!0,pathSkUnitsFilter:null,convertUnitTo:"knots",sampleTime:500}},displayScale:{lower:0,upper:10,type:"linear"},gauge:{type:"ngRadial",subType:"measuring",enableTicks:!0,compassUseNumbers:!1,highlightsWidth:5,scaleStart:180},numInt:1,numDecimal:1,enableTimeout:!1,color:"yellow",dataTimeout:5,ignoreZones:!1}}},x:8,y:0},{w:3,h:4,id:"c6bcaa53-afa1-42c7-ad92-d5f7dba14734",selector:"widget-numeric",input:{widgetProperties:{type:"widget-numeric",uuid:"c6bcaa53-afa1-42c7-ad92-d5f7dba14734",config:{displayName:"STW",filterSelfPaths:!0,paths:{numericPath:{description:"Numeric Data",path:"self.navigation.speedThroughWater",source:"default",pathType:"number",isPathConfigurable:!0,convertUnitTo:"knots",showPathSkUnitsFilter:!0,pathSkUnitsFilter:null,sampleTime:500}},showMax:!0,showMin:!0,numDecimal:1,showMiniChart:!1,yScaleMin:0,yScaleMax:10,inverseYAxis:!1,verticalChart:!1,color:"contrast",enableTimeout:!1,dataTimeout:5,ignoreZones:!1}}},x:0,y:4},{w:4,h:6,id:"973c8804-be09-4923-bb5d-48c13b65db69",selector:"widget-data-chart",input:{widgetProperties:{type:"widget-data-chart",uuid:"973c8804-be09-4923-bb5d-48c13b65db69",config:{displayName:"Chart Label",filterSelfPaths:!0,convertUnitTo:"knots",datasetUUID:"afbe4e41-26f5-404f-a55d-9f7b9b76fbd1",inverseYAxis:!1,datasetAverageArray:"sma",showAverageData:!0,trackAgainstAverage:!1,showDatasetMinimumValueLine:!1,showDatasetMaximumValueLine:!1,showDatasetAverageValueLine:!0,showDatasetAngleAverageValueLine:!1,showLabel:!1,showTimeScale:!0,startScaleAtZero:!1,verticalChart:!1,showYScale:!0,yScaleSuggestedMin:null,yScaleSuggestedMax:null,enableMinMaxScaleLimit:!1,yScaleMin:null,yScaleMax:null,numDecimal:1,color:"orange",invertData:!1,verticalGraph:!1}}},x:8,y:6},{x:0,y:8,w:3,h:4,minW:1,minH:1,id:"5289a84d-18fd-4ee7-9724-72249af403f2",selector:"widget-position",input:{widgetProperties:{type:"widget-position",uuid:"5289a84d-18fd-4ee7-9724-72249af403f2",config:{displayName:"Position",filterSelfPaths:!0,paths:{longPath:{description:"Longitude",path:"self.navigation.position.longitude",source:"default",pathType:"number",isPathConfigurable:!0,convertUnitTo:"longitudeMin",showPathSkUnitsFilter:!0,pathSkUnitsFilter:null,sampleTime:500},latPath:{description:"Latitude",path:"self.navigation.position.latitude",source:"default",pathType:"number",isPathConfigurable:!0,convertUnitTo:"latitudeMin",showPathSkUnitsFilter:!0,pathSkUnitsFilter:null,sampleTime:500}},color:"grey",enableTimeout:!1,dataTimeout:5}}}},{w:5,h:2,id:"1a7a3f79-2eb4-4092-a0c3-9a61db8a8586",selector:"widget-simple-linear",input:{widgetProperties:{type:"widget-simple-linear",uuid:"1a7a3f79-2eb4-4092-a0c3-9a61db8a8586",config:{displayName:"House Bank",filterSelfPaths:!0,paths:{gaugePath:{description:"Numeric Data",path:"self.electrical.batteries.1.voltage",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!0,pathSkUnitsFilter:"V",convertUnitTo:"V",sampleTime:500}},displayScale:{lower:0,upper:15,type:"linear"},gauge:{type:"simpleLinear",unitLabelFormat:"full"},numInt:1,numDecimal:2,ignoreZones:!1,color:"green",enableTimeout:!1,dataTimeout:5}}},x:3,y:10}]},{id:"7c67c8c5-dc55-4e1d-9fc5-3dd95fd41bea",name:"Charting",icon:"dashboard-map",configuration:[{x:0,y:0,w:8,h:12,id:"488d620a-37d4-4b98-849d-304cd18003e9",selector:"widget-freeboardsk",input:{widgetProperties:{type:"widget-freeboardsk",uuid:"488d620a-37d4-4b98-849d-304cd18003e9"}}},{x:8,y:0,w:2,h:3,id:"26a2a150-5af8-4f1d-aaab-0cb2a406fc17",selector:"widget-gauge-ng-compass",input:{widgetProperties:{type:"widget-gauge-ng-compass",uuid:"26a2a150-5af8-4f1d-aaab-0cb2a406fc17",config:{displayName:"COG (T)",filterSelfPaths:!0,paths:{gaugePath:{description:"Numeric Data",path:"self.navigation.courseOverGroundTrue",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",showConvertUnitTo:!1,convertUnitTo:"deg",sampleTime:500}},gauge:{type:"ngRadial",subType:"marineCompass",enableTicks:!0,compassUseNumbers:!0,showValueBox:!1},enableTimeout:!1,color:"purple",dataTimeout:5}}}},{x:10,y:0,w:2,h:3,id:"caf9ca47-fcf6-4736-a314-2b5210edaf03",selector:"widget-datetime",input:{widgetProperties:{type:"widget-datetime",uuid:"caf9ca47-fcf6-4736-a314-2b5210edaf03",config:{displayName:"Next WP Arrival",filterSelfPaths:!0,paths:{gaugePath:{description:"String Data",path:"self.navigation.datetime",source:"default",pathType:"Date",isPathConfigurable:!0,sampleTime:500}},dateFormat:"dd/MM HH:mm",dateTimezone:"America/Toronto",color:"contrast",enableTimeout:!1,dataTimeout:5}}}},{x:8,y:3,w:4,h:9,id:"daa21350-009e-4d99-8209-364f9b99caee",selector:"widget-autopilot",input:{widgetProperties:{type:"widget-autopilot",uuid:"daa21350-009e-4d99-8209-364f9b99caee",config:{filterSelfPaths:!0,paths:{autopilotState:{description:"Autopilot State",path:"self.steering.autopilot.state",source:"default",pathType:"string",isPathConfigurable:!1,showPathSkUnitsFilter:!1,convertUnitTo:"",sampleTime:500},autopilotTargetHeading:{description:"Autopilot Target Magnetic Heading",path:"self.steering.autopilot.target.headingMagnetic",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!1,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",sampleTime:500},autopilotTargetWindHeading:{description:"Autopilot Target Apparent Wind Angle",path:"self.steering.autopilot.target.windAngleApparent",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!1,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",sampleTime:500},rudderAngle:{description:"Rudder Angle",path:"self.steering.rudderAngle",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!1,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",sampleTime:500},courseXte:{description:"Cross Track Error",path:"self.navigation.course.calcValues.crossTrackError",source:"default",pathType:"number",isPathConfigurable:!1,convertUnitTo:"m",showPathSkUnitsFilter:!0,pathRequired:!1,pathSkUnitsFilter:"m",sampleTime:500},headingMag:{description:"Magnetic Heading",path:"self.navigation.headingMagnetic",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!0,pathRequired:!1,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",showConvertUnitTo:!1,sampleTime:500},headingTrue:{description:"True Heading",path:"self.navigation.headingTrue",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!0,pathRequired:!1,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",showConvertUnitTo:!1,sampleTime:500},windAngleApparent:{description:"Apparent Wind Angle",path:"self.environment.wind.angleApparent",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!0,pathRequired:!1,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",showConvertUnitTo:!1,sampleTime:500},windAngleTrueWater:{description:"Wind Angle True Water",path:"self.environment.wind.angleTrueWater",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!0,pathRequired:!1,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",showConvertUnitTo:!1,sampleTime:500}},invertRudder:!0,headingDirectionTrue:!1,courseDirectionTrue:!1,enableTimeout:!1,dataTimeout:5,autopilotInstance:"_default"}}}}]}],Pe={themeName:""};var Wn={configVersion:11,kipUUID:M.create(),signalKUrl:"https://demo.signalk.org",proxyEnabled:!1,signalKSubscribeAll:!1,useDeviceToken:!1,loginName:null,loginPassword:null,useSharedConfig:!1,sharedConfigName:"default"};var li="",ci=11,z=11,er=(()=>{class n{storage=_(gt);unitDefaults=new h({});themeName=new h(li);kipKNotificationConfig=new h(K);autoNightMode=new h(!1);redNightMode=new h(!1);nightModeBrightness=new h(1);isRemoteControl=new h(!1);instanceName=new h("");proxyEnabled=!1;signalKSubscribeAll=!1;useDeviceToken=!1;loginName;loginPassword;useSharedConfig;sharedConfigName;activeConfig={app:null,theme:null,dashboards:null};kipUUID;signalkUrl;widgets;_dashboards=[];dataSets=[];configUpgrade=A(!1);constructor(){if(console.log("[AppSettings Service] Service startup..."),this.storage.activeConfigFileVersion=ci,!window.localStorage)console.error(`[AppSettings Service] LocalStorage NOT SUPPORTED by browser
2
+ This is a requirement to run Kip. See browser documentation to enable this feature.`);else{this.loadConnectionConfig();let e;if(this.storage.initConfig===null&&this.useSharedConfig&&this.loginName!==null&&this.loginPassword!==null&&this.signalkUrl.url!==null?this.resetSettings():e=this.storage.initConfig,e)console.log("[AppSettings Service] Remote configuration storage enabled"),this.checkConfigUpgradeRequired(!1),this.activeConfig=e,this.pushSettings();else{console.log("[AppSettings Service] LocalStorage enabled");let i={app:null,theme:null,dashboards:null};i.app=this.loadConfigFromLocalStorage("appConfig"),i.app.configVersion!==z&&this.checkConfigUpgradeRequired(!0),i.dashboards=this.loadConfigFromLocalStorage("dashboardsConfig"),i.theme=this.loadConfigFromLocalStorage("themeConfig"),this.activeConfig=i,this.pushSettings()}}}loadConnectionConfig(){let e=this.loadConfigFromLocalStorage("connectionConfig");switch(e.configVersion){case 11:break;default:console.error(`[AppSettings Service] Invalid connectionConfig version ${e.configVersion}. Resetting and loading connection configuration default`),this.resetConnection();break}this.signalkUrl={url:e.signalKUrl,new:!1},this.proxyEnabled=e.proxyEnabled,this.signalKSubscribeAll=e.signalKSubscribeAll,this.useDeviceToken=e.useDeviceToken,this.loginName=e.loginName,this.loginPassword=e.loginPassword,this.useSharedConfig=e.useSharedConfig,this.sharedConfigName=e.sharedConfigName,this.kipUUID=e.kipUUID}resetConnection(){localStorage.setItem("connectionConfig",JSON.stringify(this.getDefaultConnectionConfig())),this.reloadApp()}checkConfigUpgradeRequired(e){e?this.configUpgrade.set(!0):this.storage.listConfigs(9).then(i=>y(this,null,function*(){for(let r of i)try{if((yield this.storage.getConfig(r.scope,r.name,9)).app?.configVersion===10){this.configUpgrade.set(!0),console.log("[AppSettings Service] Configuration upgrade required for version 10.");break}}catch(o){console.error(`[AppSettings Service] Error fetching configuration for ${r.name}:`,o)}})).catch(i=>{console.error("[AppSettings Service] Error fetching configuration data:",i)})}loadConfigFromLocalStorage(e){let i=JSON.parse(localStorage.getItem(e));if(i===null)switch(console.log(`[AppSettings Service] Error loading ${e} config. Force loading ${e} defaults`),e){case"appConfig":i=this.getDefaultAppConfig();break;case"connectionConfig":i=this.getDefaultConnectionConfig();break;case"dashboardsConfig":i=this.getDefaultDashboardsConfig();break;case"themeConfig":i=this.getDefaultThemeConfig();break;default:console.error(`[AppSettings Service] Invalid ${e} default config requested`);break}if(e==="connectionConfig"&&i.configVersion!==z)switch(console.log(`[AppSettings Service] Invalid ${e} version. Force loading defaults`),e){case"connectionConfig":i=this.getDefaultConnectionConfig();break}return i}pushSettings(){this.themeName.next(this.activeConfig.theme.themeName),this.dataSets=this.activeConfig.app.dataSets,this.unitDefaults.next(this.activeConfig.app.unitDefaults),this.kipKNotificationConfig.next(this.activeConfig.app.notificationConfig),this.activeConfig.app.autoNightMode===void 0?this.setAutoNightMode(!1):this.autoNightMode.next(this.activeConfig.app.autoNightMode),this.activeConfig.app.redNightMode===void 0?this.setRedNightMode(!1):this.redNightMode.next(this.activeConfig.app.redNightMode),this.activeConfig.app.nightModeBrightness===void 0?this.setNightModeBrightness(.2):this.nightModeBrightness.next(this.activeConfig.app.nightModeBrightness),this.activeConfig.dashboards===void 0?this._dashboards=[]:this._dashboards=this.activeConfig.dashboards,this.activeConfig.app.isRemoteControl===void 0?this.setIsRemoteControl(!1):this.isRemoteControl.next(this.activeConfig.app.isRemoteControl),this.activeConfig.app.instanceName===void 0?this.setInstanceName(""):this.instanceName.next(this.activeConfig.app.instanceName)}getDefaultUnitsAsO(){return this.unitDefaults.asObservable()}getDefaultUnits(){return this.unitDefaults.getValue()}setDefaultUnits(e){this.unitDefaults.next(e),this.useSharedConfig?this.storage.patchConfig("Array<IUnitDefaults>",e):this.saveAppConfigToLocalStorage()}getAppConfig(){return this.buildAppStorageObject()}getConnectionConfig(){return this.buildConnectionStorageObject()}setConnectionConfig(e){this.loginName=e.loginName,this.loginPassword=e.loginPassword,this.useSharedConfig=e.useSharedConfig,this.proxyEnabled=e.proxyEnabled,this.signalKSubscribeAll=e.signalKSubscribeAll,this.signalkUrl.url=e.signalKUrl,e.useSharedConfig?this.useDeviceToken=!1:this.useDeviceToken=!0,this.saveConnectionConfigToLocalStorage()}setUseDeviceToken(e){this.useDeviceToken=e,this.saveConnectionConfigToLocalStorage()}getDashboardConfig(){return this.buildDashboardStorageObject()}getThemeConfig(){return this.buildThemeStorageObject()}get KipUUID(){return this.kipUUID}getThemeNameAsO(){return this.themeName.asObservable()}setThemeName(e){if(this.themeName.next(e),this.useSharedConfig){let i={themeName:e};this.storage.patchConfig("IThemeConfig",i)}else this.saveThemeConfigToLocalStorage()}getThemeName(){return this.themeName.getValue()}getAutoNightModeAsO(){return this.autoNightMode.asObservable()}setAutoNightMode(e){this.autoNightMode.next(e);let i=this.buildAppStorageObject();this.useSharedConfig?this.storage.patchConfig("IAppConfig",i):this.saveAppConfigToLocalStorage()}getAutoNightMode(){return this.autoNightMode.getValue()}getRedNightModeAsO(){return this.redNightMode.asObservable()}getRedNightMode(){return this.redNightMode.getValue()}setRedNightMode(e){this.redNightMode.next(e);let i=this.buildAppStorageObject();this.useSharedConfig?this.storage.patchConfig("IAppConfig",i):this.saveAppConfigToLocalStorage()}getIsRemoteControlAsO(){return this.isRemoteControl.asObservable()}getIsRemoteControl(){return this.isRemoteControl.getValue()}setIsRemoteControl(e){this.isRemoteControl.next(e);let i=this.buildAppStorageObject();this.useSharedConfig?this.storage.patchConfig("IAppConfig",i):this.saveAppConfigToLocalStorage()}getInstanceNameAsO(){return this.instanceName.asObservable()}getInstanceName(){return this.instanceName.getValue()}setInstanceName(e){this.instanceName.next(e);let i=this.buildAppStorageObject();this.useSharedConfig?this.storage.patchConfig("IAppConfig",i):this.saveAppConfigToLocalStorage()}getNightModeBrightness(){return this.nightModeBrightness.getValue()}setNightModeBrightness(e){this.nightModeBrightness.next(e);let i=this.buildAppStorageObject();this.useSharedConfig?this.storage.patchConfig("IAppConfig",i):this.saveAppConfigToLocalStorage()}getWidgets(){return this.widgets}saveDashboards(e){this.useSharedConfig?this.storage.storageServiceReady$.getValue()&&this.storage.patchConfig("Dashboards",e):this.saveLDashboardsConfigToLocalStorage(e),this._dashboards=e}saveDataSets(e){this.dataSets=e,this.useSharedConfig?this.storage.patchConfig("Array<IDatasetDef>",e):this.saveAppConfigToLocalStorage()}getDataSets(){return this.dataSets}getNotificationServiceConfigAsO(){return this.kipKNotificationConfig.asObservable()}getNotificationConfig(){return this.kipKNotificationConfig.getValue()}setNotificationConfig(e){this.kipKNotificationConfig.next(e),this.useSharedConfig?this.storage.patchConfig("INotificationConfig",e):this.saveAppConfigToLocalStorage()}resetSettings(){let e={app:null,theme:null,dashboards:null};e.app=this.getDefaultAppConfig(),e.theme=this.getDefaultThemeConfig(),e.dashboards=this.getDefaultDashboardsConfig(),this.useSharedConfig?this.storage.storageServiceReady$.getValue()&&this.storage.setConfig("user",this.sharedConfigName,e).then(()=>{console.log("[AppSettings Service] Replaced server config name: "+this.sharedConfigName+", with default configuration values"),this.reloadApp()}).catch(i=>{console.error("[AppSettings Service] Error replacing server config name: "+this.sharedConfigName+", with default configuration values",i)}):this.reloadApp()}replaceConfig(e,i,r){let o=JSON.stringify(i);localStorage.setItem(e,o),r&&this.reloadApp()}loadDemoConfig(){if(this.useSharedConfig){let e={app:Ie,dashboards:Re,theme:Pe};console.log("[AppSettings Service] Loading Demo configuration settings as remote config: "+this.useSharedConfig+" and reloading app."),this.storage.setConfig("user",this.sharedConfigName,e),this.reloadApp()}else console.log("[AppSettings Service] Loading Demo configuration settings to LocalStorage"),this.replaceConfig("appConfig",Ie),this.replaceConfig("dashboardsConfig",Re),this.replaceConfig("themeConfig",Pe,!0)}reloadApp(){console.log("[AppSettings Service] Reload app"),!window.__KIP_TEST__&&location.replace("./")}buildAppStorageObject(){return{configVersion:z,autoNightMode:this.autoNightMode.getValue(),redNightMode:this.redNightMode.getValue(),nightModeBrightness:this.nightModeBrightness.getValue(),isRemoteControl:this.isRemoteControl.getValue(),instanceName:this.instanceName.getValue(),dataSets:this.dataSets,unitDefaults:this.unitDefaults.getValue(),notificationConfig:this.kipKNotificationConfig.getValue()}}buildConnectionStorageObject(){return{configVersion:z,kipUUID:this.kipUUID,signalKUrl:this.signalkUrl.url,proxyEnabled:this.proxyEnabled,signalKSubscribeAll:this.signalKSubscribeAll,useDeviceToken:this.useDeviceToken,loginName:this.loginName,loginPassword:this.loginPassword,useSharedConfig:this.useSharedConfig,sharedConfigName:this.sharedConfigName}}buildDashboardStorageObject(){return this._dashboards}buildThemeStorageObject(){return{themeName:this.themeName.getValue()}}saveAppConfigToLocalStorage(){console.log("[AppSettings Service] Saving Application config to LocalStorage"),localStorage.setItem("appConfig",JSON.stringify(this.buildAppStorageObject()))}saveConnectionConfigToLocalStorage(){console.log("[AppSettings Service] Saving Connection config to LocalStorage"),localStorage.setItem("connectionConfig",JSON.stringify(this.buildConnectionStorageObject()))}saveLDashboardsConfigToLocalStorage(e){console.log("[AppSettings Service] Saving Dashboard config to LocalStorage"),localStorage.setItem("dashboardsConfig",JSON.stringify(e))}saveThemeConfigToLocalStorage(){console.log("[AppSettings Service] Saving Theme config to LocalStorage"),localStorage.setItem("themeConfig",JSON.stringify(this.buildThemeStorageObject()))}getDefaultAppConfig(){let e=pt;return e.notificationConfig=K,e.unitDefaults=ce,e.configVersion=z,localStorage.setItem("appConfig",JSON.stringify(e)),e}getDefaultConnectionConfig(){let e=vt;return e.kipUUID=M.create(),e.signalKUrl=window.location.origin,localStorage.setItem("connectionConfig",JSON.stringify(e)),e}getDefaultDashboardsConfig(){let e=[];return localStorage.setItem("dashboardsConfig",JSON.stringify(e)),e}getDefaultThemeConfig(){let e=mt;return localStorage.setItem("themeConfig",JSON.stringify(e)),e}static \u0275fac=function(i){return new(i||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var Vt=(()=>{class n{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,i){this._renderer=e,this._elementRef=i}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static \u0275fac=function(i){return new(i||n)(c(Ae),c(Ve))};static \u0275dir=d({type:n})}return n})(),At=(()=>{class n extends Vt{static \u0275fac=(()=>{let e;return function(r){return(e||(e=w(n)))(r||n)}})();static \u0275dir=d({type:n,features:[f]})}return n})(),te=new N("");var ui={provide:te,useExisting:p(()=>kt),multi:!0};function di(){let n=Ee()?Ee().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}var hi=new N(""),kt=(()=>{class n extends Vt{_compositionMode;_composing=!1;constructor(e,i,r){super(e,i),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!di())}writeValue(e){let i=e??"";this.setProperty("value",i)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static \u0275fac=function(i){return new(i||n)(c(Ae),c(Ve),c(hi,8))};static \u0275dir=d({type:n,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(i,r){i&1&&G("input",function(s){return r._handleInput(s.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(s){return r._compositionEnd(s.target.value)})},standalone:!1,features:[m([ui]),f]})}return n})();function je(n){return n==null||He(n)===0}function He(n){return n==null?null:Array.isArray(n)||typeof n=="string"?n.length:n instanceof Set?n.size:null}var D=new N(""),F=new N(""),fi=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,yt=class{static min(t){return Mt(t)}static max(t){return Et(t)}static required(t){return Nt(t)}static requiredTrue(t){return gi(t)}static email(t){return pi(t)}static minLength(t){return mi(t)}static maxLength(t){return vi(t)}static pattern(t){return xt(t)}static nullValidator(t){return de()}static compose(t){return Ot(t)}static composeAsync(t){return $t(t)}};function Mt(n){return t=>{if(t.value==null||n==null)return null;let e=parseFloat(t.value);return!isNaN(e)&&e<n?{min:{min:n,actual:t.value}}:null}}function Et(n){return t=>{if(t.value==null||n==null)return null;let e=parseFloat(t.value);return!isNaN(e)&&e>n?{max:{max:n,actual:t.value}}:null}}function Nt(n){return je(n.value)?{required:!0}:null}function gi(n){return n.value===!0?null:{required:!0}}function pi(n){return je(n.value)||fi.test(n.value)?null:{email:!0}}function mi(n){return t=>{let e=t.value?.length??He(t.value);return e===null||e===0?null:e<n?{minlength:{requiredLength:n,actualLength:e}}:null}}function vi(n){return t=>{let e=t.value?.length??He(t.value);return e!==null&&e>n?{maxlength:{requiredLength:n,actualLength:e}}:null}}function xt(n){if(!n)return de;let t,e;return typeof n=="string"?(e="",n.charAt(0)!=="^"&&(e+="^"),e+=n,n.charAt(n.length-1)!=="$"&&(e+="$"),t=new RegExp(e)):(e=n.toString(),t=n),i=>{if(je(i.value))return null;let r=i.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}function de(n){return null}function Ft(n){return n!=null}function It(n){return rt(n)?Ze(n):n}function Rt(n){let t={};return n.forEach(e=>{t=e!=null?v(v({},t),e):t}),Object.keys(t).length===0?null:t}function Pt(n,t){return t.map(e=>e(n))}function yi(n){return!n.validate}function Ut(n){return n.map(t=>yi(t)?t:e=>t.validate(e))}function Ot(n){if(!n)return null;let t=n.filter(Ft);return t.length==0?null:function(e){return Rt(Pt(e,t))}}function Le(n){return n!=null?Ot(Ut(n)):null}function $t(n){if(!n)return null;let t=n.filter(Ft);return t.length==0?null:function(e){let i=Pt(e,t).map(It);return Ye(i).pipe(re(Rt))}}function We(n){return n!=null?$t(Ut(n)):null}function Ct(n,t){return n===null?[t]:Array.isArray(n)?[...n,t]:[n,t]}function jt(n){return n._rawValidators}function Ht(n){return n._rawAsyncValidators}function Ue(n){return n?Array.isArray(n)?n:[n]:[]}function he(n,t){return Array.isArray(n)?n.includes(t):n===t}function _t(n,t){let e=Ue(t);return Ue(n).forEach(r=>{he(e,r)||e.push(r)}),e}function bt(n,t){return Ue(t).filter(e=>!he(n,e))}var fe=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=Le(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=We(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t=void 0){this.control&&this.control.reset(t)}hasError(t,e){return this.control?this.control.hasError(t,e):!1}getError(t,e){return this.control?this.control.getError(t,e):null}},g=class extends fe{name;get formDirective(){return null}get path(){return null}},V=class extends fe{_parent=null;name=null;valueAccessor=null},ge=class{_cd;constructor(t){this._cd=t}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},Ci={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},Dr=S(v({},Ci),{"[class.ng-submitted]":"isSubmitted"}),wr=(()=>{class n extends ge{constructor(e){super(e)}static \u0275fac=function(i){return new(i||n)(c(V,2))};static \u0275dir=d({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,r){i&2&&ke("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},standalone:!1,features:[f]})}return n})(),Tr=(()=>{class n extends ge{constructor(e){super(e)}static \u0275fac=function(i){return new(i||n)(c(g,10))};static \u0275dir=d({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(i,r){i&2&&ke("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)("ng-submitted",r.isSubmitted)},standalone:!1,features:[f]})}return n})();var J="VALID",ue="INVALID",O="PENDING",Z="DISABLED",E=class{},pe=class extends E{value;source;constructor(t,e){super(),this.value=t,this.source=e}},Q=class extends E{pristine;source;constructor(t,e){super(),this.pristine=t,this.source=e}},X=class extends E{touched;source;constructor(t,e){super(),this.touched=t,this.source=e}},$=class extends E{status;source;constructor(t,e){super(),this.status=t,this.source=e}},me=class extends E{source;constructor(t){super(),this.source=t}},ve=class extends E{source;constructor(t){super(),this.source=t}};function Ge(n){return(be(n)?n.validators:n)||null}function _i(n){return Array.isArray(n)?Le(n):n||null}function Be(n,t){return(be(t)?t.asyncValidators:n)||null}function bi(n){return Array.isArray(n)?We(n):n||null}function be(n){return n!=null&&!Array.isArray(n)&&typeof n=="object"}function Lt(n,t,e){let i=n.controls;if(!(t?Object.keys(i):i).length)throw new oe(1e3,"");if(!i[e])throw new oe(1001,"")}function Wt(n,t,e){n._forEachChild((i,r)=>{if(e[r]===void 0)throw new oe(1002,"")})}var H=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(t,e){this._assignValidators(t),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get status(){return T(this.statusReactive)}set status(t){T(()=>this.statusReactive.set(t))}_status=P(()=>this.statusReactive());statusReactive=A(void 0);get valid(){return this.status===J}get invalid(){return this.status===ue}get pending(){return this.status==O}get disabled(){return this.status===Z}get enabled(){return this.status!==Z}errors;get pristine(){return T(this.pristineReactive)}set pristine(t){T(()=>this.pristineReactive.set(t))}_pristine=P(()=>this.pristineReactive());pristineReactive=A(!0);get dirty(){return!this.pristine}get touched(){return T(this.touchedReactive)}set touched(t){T(()=>this.touchedReactive.set(t))}_touched=P(()=>this.touchedReactive());touchedReactive=A(!1);get untouched(){return!this.touched}_events=new ie;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t)}setAsyncValidators(t){this._assignAsyncValidators(t)}addValidators(t){this.setValidators(_t(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(_t(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(bt(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(bt(t,this._rawAsyncValidators))}hasValidator(t){return he(this._rawValidators,t)}hasAsyncValidator(t){return he(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){let e=this.touched===!1;this.touched=!0;let i=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsTouched(S(v({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new X(!0,i))}markAllAsDirty(t={}){this.markAsDirty({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsDirty(t))}markAllAsTouched(t={}){this.markAsTouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(t))}markAsUntouched(t={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:i})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,i),e&&t.emitEvent!==!1&&this._events.next(new X(!1,i))}markAsDirty(t={}){let e=this.pristine===!0;this.pristine=!1;let i=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsDirty(S(v({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new Q(!1,i))}markAsPristine(t={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:t.emitEvent})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t,i),e&&t.emitEvent!==!1&&this._events.next(new Q(!0,i))}markAsPending(t={}){this.status=O;let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new $(this.status,e)),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.markAsPending(S(v({},t),{sourceControl:e}))}disable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=Z,this.errors=null,this._forEachChild(r=>{r.disable(S(v({},t),{onlySelf:!0}))}),this._updateValue();let i=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new pe(this.value,i)),this._events.next(new $(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(S(v({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=J,this._forEachChild(i=>{i.enable(S(v({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(S(v({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(t,e){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine({},e),this._parent._updateTouched({},e))}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let i=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===J||this.status===O)&&this._runAsyncValidator(i,t.emitEvent)}let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new pe(this.value,e)),this._events.next(new $(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(S(v({},t),{sourceControl:e}))}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Z:J}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t,e){if(this.asyncValidator){this.status=O,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1,shouldHaveEmitted:t!==!1};let i=It(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:e,shouldHaveEmitted:t})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let t=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,t}return!1}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(t){let e=t;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((i,r)=>i&&i._find(r),this)}getError(t,e){let i=e?this.get(e):this;return i&&i.errors?i.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t,e,i){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),(t||i)&&this._events.next(new $(this.status,e)),this._parent&&this._parent._updateControlsErrors(t,e,i)}_initObservables(){this.valueChanges=new k,this.statusChanges=new k}_calculateStatus(){return this._allControlsDisabled()?Z:this.errors?ue:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(O)?O:this._anyControlsHaveStatus(ue)?ue:J}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t,e){let i=!this._anyControlsDirty(),r=this.pristine!==i;this.pristine=i,this._parent&&!t.onlySelf&&this._parent._updatePristine(t,e),r&&this._events.next(new Q(this.pristine,e))}_updateTouched(t={},e){this.touched=this._anyControlsTouched(),this._events.next(new X(this.touched,e)),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,e)}_onDisabledChange=[];_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){be(t)&&t.updateOn!=null&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){let e=this._parent&&this._parent.dirty;return!t&&!!e&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=_i(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=bi(this._rawAsyncValidators)}},x=class extends H{constructor(t,e,i){super(Ge(e),Be(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,i={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(t,e={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(t,e,i={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){Wt(this,!0,t),Object.keys(t).forEach(i=>{Lt(this,!0,i),this.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(Object.keys(t).forEach(i=>{let r=this.controls[i];r&&r.patchValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((i,r)=>{i.reset(t?t[r]:null,{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,i)=>(t[i]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(e,i)=>i._syncPendingControls()?!0:e);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{let i=this.controls[e];i&&t(i,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(let[e,i]of Object.entries(this.controls))if(this.contains(e)&&t(i))return!0;return!1}_reduceValue(){let t={};return this._reduceChildren(t,(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(t,e){let i=t;return this._forEachChild((r,o)=>{i=e(i,r,o)}),i}_allControlsDisabled(){for(let t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(t){return this.controls.hasOwnProperty(t)?this.controls[t]:null}};var Vr=x;var Oe=class extends x{};var L=new N("",{providedIn:"root",factory:()=>Se}),Se="always";function De(n,t){return[...t.path,n]}function ee(n,t,e=Se){qe(n,t),t.valueAccessor.writeValue(n.value),(n.disabled||e==="always")&&t.valueAccessor.setDisabledState?.(n.disabled),Di(n,t),Ti(n,t),wi(n,t),Si(n,t)}function ye(n,t,e=!0){let i=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(i),t.valueAccessor.registerOnTouched(i)),_e(n,t),n&&(t._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}))}function Ce(n,t){n.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function Si(n,t){if(t.valueAccessor.setDisabledState){let e=i=>{t.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(e),t._registerOnDestroy(()=>{n._unregisterOnDisabledChange(e)})}}function qe(n,t){let e=jt(n);t.validator!==null?n.setValidators(Ct(e,t.validator)):typeof e=="function"&&n.setValidators([e]);let i=Ht(n);t.asyncValidator!==null?n.setAsyncValidators(Ct(i,t.asyncValidator)):typeof i=="function"&&n.setAsyncValidators([i]);let r=()=>n.updateValueAndValidity();Ce(t._rawValidators,r),Ce(t._rawAsyncValidators,r)}function _e(n,t){let e=!1;if(n!==null){if(t.validator!==null){let r=jt(n);if(Array.isArray(r)&&r.length>0){let o=r.filter(s=>s!==t.validator);o.length!==r.length&&(e=!0,n.setValidators(o))}}if(t.asyncValidator!==null){let r=Ht(n);if(Array.isArray(r)&&r.length>0){let o=r.filter(s=>s!==t.asyncValidator);o.length!==r.length&&(e=!0,n.setAsyncValidators(o))}}}let i=()=>{};return Ce(t._rawValidators,i),Ce(t._rawAsyncValidators,i),e}function Di(n,t){t.valueAccessor.registerOnChange(e=>{n._pendingValue=e,n._pendingChange=!0,n._pendingDirty=!0,n.updateOn==="change"&&Gt(n,t)})}function wi(n,t){t.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,n.updateOn==="blur"&&n._pendingChange&&Gt(n,t),n.updateOn!=="submit"&&n.markAsTouched()})}function Gt(n,t){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function Ti(n,t){let e=(i,r)=>{t.valueAccessor.writeValue(i),r&&t.viewToModelUpdate(i)};n.registerOnChange(e),t._registerOnDestroy(()=>{n._unregisterOnChange(e)})}function Bt(n,t){n==null,qe(n,t)}function Vi(n,t){return _e(n,t)}function Ke(n,t){if(!n.hasOwnProperty("model"))return!1;let e=n.model;return e.isFirstChange()?!0:!Object.is(t,e.currentValue)}function Ai(n){return Object.getPrototypeOf(n.constructor)===At}function qt(n,t){n._syncPendingControls(),t.forEach(e=>{let i=e.control;i.updateOn==="submit"&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}function ze(n,t){if(!t)return null;Array.isArray(t);let e,i,r;return t.forEach(o=>{o.constructor===kt?e=o:Ai(o)?i=o:r=o}),r||i||e||null}function ki(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}var Mi={provide:g,useExisting:p(()=>Ei)},Y=Promise.resolve(),Ei=(()=>{class n extends g{callSetDisabledState;get submitted(){return T(this.submittedReactive)}_submitted=P(()=>this.submittedReactive());submittedReactive=A(!1);_directives=new Set;form;ngSubmit=new k;options;constructor(e,i,r){super(),this.callSetDisabledState=r,this.form=new x({},Le(e),We(i))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){Y.then(()=>{let i=this._findContainer(e.path);e.control=i.registerControl(e.name,e.control),ee(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){Y.then(()=>{let i=this._findContainer(e.path);i&&i.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){Y.then(()=>{let i=this._findContainer(e.path),r=new x({});Bt(r,e),i.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){Y.then(()=>{let i=this._findContainer(e.path);i&&i.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,i){Y.then(()=>{this.form.get(e.path).setValue(i)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submittedReactive.set(!0),qt(this.form,this._directives),this.ngSubmit.emit(e),this.form._events.next(new me(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this.submittedReactive.set(!1),this.form._events.next(new ve(this.form))}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}static \u0275fac=function(i){return new(i||n)(c(D,10),c(F,10),c(L,8))};static \u0275dir=d({type:n,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(i,r){i&1&&G("submit",function(s){return r.onSubmit(s)})("reset",function(){return r.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[m([Mi]),f]})}return n})();function St(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}function Dt(n){return typeof n=="object"&&n!==null&&Object.keys(n).length===2&&"value"in n&&"disabled"in n}var j=class extends H{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(t=null,e,i){super(Ge(e),Be(i,e)),this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),be(e)&&(e.nonNullable||e.initialValueIsDefault)&&(Dt(t)?this.defaultValue=t.value:this.defaultValue=t)}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(i=>i(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=this.defaultValue,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){St(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){St(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(t){Dt(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}},kr=j,Ni=n=>n instanceof j,xi=(()=>{class n extends g{_parent;ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return De(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}static \u0275fac=(()=>{let e;return function(r){return(e||(e=w(n)))(r||n)}})();static \u0275dir=d({type:n,standalone:!1,features:[f]})}return n})();var Fi={provide:V,useExisting:p(()=>Ii)},wt=Promise.resolve(),Ii=(()=>{class n extends V{_changeDetectorRef;callSetDisabledState;control=new j;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new k;constructor(e,i,r,o,s,a){super(),this._changeDetectorRef=s,this.callSetDisabledState=a,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=ze(this,o)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),Ke(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){ee(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(e){wt.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let i=e.isDisabled.currentValue,r=i!==0&&Me(i);wt.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?De(e,this._parent):[e]}static \u0275fac=function(i){return new(i||n)(c(g,9),c(D,10),c(F,10),c(te,10),c(ot,8),c(L,8))};static \u0275dir=d({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[m([Fi]),f,R]})}return n})();var Mr=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275dir=d({type:n,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return n})(),Ri={provide:te,useExisting:p(()=>Pi),multi:!0},Pi=(()=>{class n extends At{writeValue(e){let i=e??"";this.setProperty("value",i)}registerOnChange(e){this.onChange=i=>{e(i==""?null:parseFloat(i))}}static \u0275fac=(()=>{let e;return function(r){return(e||(e=w(n)))(r||n)}})();static \u0275dir=d({type:n,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(i,r){i&1&&G("input",function(s){return r.onChange(s.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[m([Ri]),f]})}return n})();var Je=new N(""),Ui={provide:V,useExisting:p(()=>Oi)},Oi=(()=>{class n extends V{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(e){}model;update=new k;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,i,r,o,s){super(),this._ngModelWarningConfig=o,this.callSetDisabledState=s,this._setValidators(e),this._setAsyncValidators(i),this.valueAccessor=ze(this,r)}ngOnChanges(e){if(this._isControlChanged(e)){let i=e.form.previousValue;i&&ye(i,this,!1),ee(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}Ke(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&ye(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_isControlChanged(e){return e.hasOwnProperty("form")}static \u0275fac=function(i){return new(i||n)(c(D,10),c(F,10),c(te,10),c(Je,8),c(L,8))};static \u0275dir=d({type:n,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],standalone:!1,features:[m([Ui]),f,R]})}return n})(),$i={provide:g,useExisting:p(()=>Kt)},Kt=(()=>{class n extends g{callSetDisabledState;get submitted(){return T(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}_submitted=P(()=>this._submittedReactive());_submittedReactive=A(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];form=null;ngSubmit=new k;constructor(e,i,r){super(),this.callSetDisabledState=r,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(_e(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){let i=this.form.get(e.path);return ee(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){ye(e.control||null,e,!1),ki(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,i){this.form.get(e.path).setValue(i)}onSubmit(e){return this._submittedReactive.set(!0),qt(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new me(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0,i={}){this.form.reset(e,i),this._submittedReactive.set(!1),i?.emitEvent!==!1&&this.form._events.next(new ve(this.form))}_updateDomValue(){this.directives.forEach(e=>{let i=e.control,r=this.form.get(e.path);i!==r&&(ye(i||null,e),Ni(r)&&(ee(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let i=this.form.get(e.path);Bt(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){let i=this.form.get(e.path);i&&Vi(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){qe(this.form,this),this._oldForm&&_e(this._oldForm,this)}static \u0275fac=function(i){return new(i||n)(c(D,10),c(F,10),c(L,8))};static \u0275dir=d({type:n,selectors:[["","formGroup",""]],hostBindings:function(i,r){i&1&&G("submit",function(s){return r.onSubmit(s)})("reset",function(){return r.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[m([$i]),f,R]})}return n})(),ji={provide:g,useExisting:p(()=>zt)},zt=(()=>{class n extends xi{name=null;constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r)}_checkParentType(){Zt(this._parent)}static \u0275fac=function(i){return new(i||n)(c(g,13),c(D,10),c(F,10))};static \u0275dir=d({type:n,selectors:[["","formGroupName",""]],inputs:{name:[0,"formGroupName","name"]},standalone:!1,features:[m([ji]),f]})}return n})(),Hi={provide:g,useExisting:p(()=>Jt)},Jt=(()=>{class n extends g{_parent;name=null;constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r)}ngOnInit(){Zt(this._parent),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective?.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return De(this.name==null?this.name:this.name.toString(),this._parent)}static \u0275fac=function(i){return new(i||n)(c(g,13),c(D,10),c(F,10))};static \u0275dir=d({type:n,selectors:[["","formArrayName",""]],inputs:{name:[0,"formArrayName","name"]},standalone:!1,features:[m([Hi]),f]})}return n})();function Zt(n){return!(n instanceof zt)&&!(n instanceof Kt)&&!(n instanceof Jt)}var Li={provide:V,useExisting:p(()=>Wi)},Wi=(()=>{class n extends V{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(e){}model;update=new k;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,i,r,o,s){super(),this._ngModelWarningConfig=s,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=ze(this,o)}ngOnChanges(e){this._added||this._setUpControl(),Ke(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return De(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_setUpControl(){this.control=this.formDirective.addControl(this),this._added=!0}static \u0275fac=function(i){return new(i||n)(c(g,13),c(D,10),c(F,10),c(te,10),c(Je,8))};static \u0275dir=d({type:n,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[m([Li]),f,R]})}return n})();function Yt(n){return typeof n=="number"?n:parseFloat(n)}var we=(()=>{class n{_validator=de;_onChange;_enabled;ngOnChanges(e){if(this.inputName in e){let i=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):de,this._onChange&&this._onChange()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return e!=null}static \u0275fac=function(i){return new(i||n)};static \u0275dir=d({type:n,features:[R]})}return n})(),Gi={provide:D,useExisting:p(()=>Bi),multi:!0},Bi=(()=>{class n extends we{max;inputName="max";normalizeInput=e=>Yt(e);createValidator=e=>Et(e);static \u0275fac=(()=>{let e;return function(r){return(e||(e=w(n)))(r||n)}})();static \u0275dir=d({type:n,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&W("max",r._enabled?r.max:null)},inputs:{max:"max"},standalone:!1,features:[m([Gi]),f]})}return n})(),qi={provide:D,useExisting:p(()=>Ki),multi:!0},Ki=(()=>{class n extends we{min;inputName="min";normalizeInput=e=>Yt(e);createValidator=e=>Mt(e);static \u0275fac=(()=>{let e;return function(r){return(e||(e=w(n)))(r||n)}})();static \u0275dir=d({type:n,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&W("min",r._enabled?r.min:null)},inputs:{min:"min"},standalone:!1,features:[m([qi]),f]})}return n})(),zi={provide:D,useExisting:p(()=>Ji),multi:!0};var Ji=(()=>{class n extends we{required;inputName="required";normalizeInput=Me;createValidator=e=>Nt;enabled(e){return e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=w(n)))(r||n)}})();static \u0275dir=d({type:n,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(i,r){i&2&&W("required",r._enabled?"":null)},inputs:{required:"required"},standalone:!1,features:[m([zi]),f]})}return n})();var Zi={provide:D,useExisting:p(()=>Yi),multi:!0},Yi=(()=>{class n extends we{pattern;inputName="pattern";normalizeInput=e=>e;createValidator=e=>xt(e);static \u0275fac=(()=>{let e;return function(r){return(e||(e=w(n)))(r||n)}})();static \u0275dir=d({type:n,selectors:[["","pattern","","formControlName",""],["","pattern","","formControl",""],["","pattern","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&W("pattern",r._enabled?r.pattern:null)},inputs:{pattern:"pattern"},standalone:!1,features:[m([Zi]),f]})}return n})();var Qt=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=ae({type:n});static \u0275inj=se({})}return n})(),$e=class extends H{constructor(t,e,i){super(Ge(e),Be(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;at(t){return this.controls[this._adjustIndex(t)]}push(t,e={}){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(t,e,i={}){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(t,e={}){let i=this._adjustIndex(t);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(t,e,i={}){let r=this._adjustIndex(t);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){Wt(this,!1,t),t.forEach((i,r)=>{Lt(this,!1,r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(t.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t=[],e={}){this._forEachChild((i,r)=>{i.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(t=>t.getRawValue())}clear(t={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:t.emitEvent}))}_adjustIndex(t){return t<0?t+this.length:t}_syncPendingControls(){let t=this.controls.reduce((e,i)=>i._syncPendingControls()?!0:e,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){this.controls.forEach((e,i)=>{t(e,i)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_allControlsDisabled(){for(let t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}_find(t){return this.at(t)??null}};function Tt(n){return!!n&&(n.asyncValidators!==void 0||n.validators!==void 0||n.updateOn!==void 0)}var Qi=(()=>{class n{useNonNullable=!1;get nonNullable(){let e=new n;return e.useNonNullable=!0,e}group(e,i=null){let r=this._reduceControls(e),o={};return Tt(i)?o=i:i!==null&&(o.validators=i.validator,o.asyncValidators=i.asyncValidator),new x(r,o)}record(e,i=null){let r=this._reduceControls(e);return new Oe(r,i)}control(e,i,r){let o={};return this.useNonNullable?(Tt(i)?o=i:(o.validators=i,o.asyncValidators=r),new j(e,S(v({},o),{nonNullable:!0}))):new j(e,i,r)}array(e,i,r){let o=e.map(s=>this._createControl(s));return new $e(o,i,r)}_reduceControls(e){let i={};return Object.keys(e).forEach(r=>{i[r]=this._createControl(e[r])}),i}_createControl(e){if(e instanceof j)return e;if(e instanceof H)return e;if(Array.isArray(e)){let i=e[0],r=e.length>1?e[1]:null,o=e.length>2?e[2]:null;return this.control(i,r,o)}else return this.control(e)}static \u0275fac=function(i){return new(i||n)};static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var Er=(()=>{class n extends Qi{group(e,i=null){return super.group(e,i)}control(e,i,r){return super.control(e,i,r)}array(e,i,r){return super.array(e,i,r)}static \u0275fac=(()=>{let e;return function(r){return(e||(e=w(n)))(r||n)}})();static \u0275prov=C({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var Nr=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:L,useValue:e.callSetDisabledState??Se}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=ae({type:n});static \u0275inj=se({imports:[Qt]})}return n})(),xr=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:Je,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:L,useValue:e.callSetDisabledState??Se}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=ae({type:n});static \u0275inj=se({imports:[Qt]})}return n})();export{M as a,K as b,vt as c,l as d,st as e,le as f,Fe as g,lt as h,gt as i,er as j,te as k,kt as l,D as m,yt as n,g as o,V as p,wr as q,Tr as r,x as s,Vr as t,Ei as u,j as v,kr as w,Ii as x,Mr as y,Pi as z,Oi as A,Kt as B,zt as C,Jt as D,Wi as E,Bi as F,Ki as G,Ji as H,Yi as I,Er as J,Nr as K,xr as L};
@@ -0,0 +1,5 @@
1
+ import{b as kt,c as xt}from"./chunk-PR5DAT3I.js";import{e as Ct,i as Rt,j as St}from"./chunk-2YGPLTEW.js";import{c as Re}from"./chunk-LKF7CNOE.js";import{B as bt}from"./chunk-SPUZNRYQ.js";import{$d as yt,Ab as N,Bb as B,Dd as mt,E as ae,Ed as ft,Fa as m,Fb as at,Ga as F,Gd as de,Hb as Y,Ja as Je,Kb as $,La as Z,Lb as nt,Mb as ee,Nd as ht,Oa as S,Pa as j,Qa as d,Sa as p,Ud as pt,Vd as gt,Wa as X,X as ge,Xb as C,Ya as se,_d as _t,ab as P,ae as Ce,bb as w,be as wt,ca as _e,cb as v,ce as ue,da as H,ea as Q,eb as et,fb as tt,fe as vt,ga as s,gb as it,gd as st,hb as V,he as Dt,ib as u,ic as rt,j as I,ja as ne,jb as f,jd as lt,ka as re,kb as le,l as G,la as U,lb as ve,ld as ct,m as fe,ma as qe,mb as De,na as Ke,nb as ot,nd as dt,oa as Ze,oc as te,pc as ie,q,qb as D,qc as g,ra as Xe,rb as be,rc as ce,s as Ge,sa as ye,ta as we,tb as z,ua as K,va as R,vb as x,w as he,wa as T,wb as J,x as pe,xb as E,xd as ut,yb as A}from"./chunk-PB7HT3XU.js";var jt=[[["caption"]],[["colgroup"],["col"]],"*"],Vt=["caption","colgroup, col","*"];function Qt(i,a){i&1&&E(0,2)}function Ut(i,a){i&1&&(u(0,"thead",0),D(1,1),f(),u(2,"tbody",0),D(3,2)(4,3),f(),u(5,"tfoot",0),D(6,4),f())}function Yt(i,a){i&1&&D(0,1)(1,2)(2,3)(3,4)}var M=new Q("CDK_TABLE");var Me=(()=>{class i{template=s(F);constructor(){}static \u0275fac=function(t){return new(t||i)};static \u0275dir=d({type:i,selectors:[["","cdkCellDef",""]]})}return i})(),Te=(()=>{class i{template=s(F);constructor(){}static \u0275fac=function(t){return new(t||i)};static \u0275dir=d({type:i,selectors:[["","cdkHeaderCellDef",""]]})}return i})(),Et=(()=>{class i{template=s(F);constructor(){}static \u0275fac=function(t){return new(t||i)};static \u0275dir=d({type:i,selectors:[["","cdkFooterCellDef",""]]})}return i})(),oe=(()=>{class i{_table=s(M,{optional:!0});_hasStickyChanged=!1;get name(){return this._name}set name(e){this._setNameInput(e)}_name;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}_sticky=!1;get stickyEnd(){return this._stickyEnd}set stickyEnd(e){e!==this._stickyEnd&&(this._stickyEnd=e,this._hasStickyChanged=!0)}_stickyEnd=!1;cell;headerCell;footerCell;cssClassFriendlyName;_columnCssClassName;constructor(){}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}_updateColumnCssClassName(){this._columnCssClassName=[`cdk-column-${this.cssClassFriendlyName}`]}_setNameInput(e){e&&(this._name=e,this.cssClassFriendlyName=e.replace(/[^a-z0-9_-]/gi,"-"),this._updateColumnCssClassName())}static \u0275fac=function(t){return new(t||i)};static \u0275dir=d({type:i,selectors:[["","cdkColumnDef",""]],contentQueries:function(t,o,n){if(t&1&&(A(n,Me,5),A(n,Te,5),A(n,Et,5)),t&2){let r;N(r=B())&&(o.cell=r.first),N(r=B())&&(o.headerCell=r.first),N(r=B())&&(o.footerCell=r.first)}},inputs:{name:[0,"cdkColumnDef","name"],sticky:[2,"sticky","sticky",g],stickyEnd:[2,"stickyEnd","stickyEnd",g]},features:[C([{provide:"MAT_SORT_HEADER_COLUMN_DEF",useExisting:i}])]})}return i})(),ke=class{constructor(a,e){e.nativeElement.classList.add(...a._columnCssClassName)}},Ot=(()=>{class i extends ke{constructor(){super(s(oe),s(T))}static \u0275fac=function(t){return new(t||i)};static \u0275dir=d({type:i,selectors:[["cdk-header-cell"],["th","cdk-header-cell",""]],hostAttrs:["role","columnheader",1,"cdk-header-cell"],features:[p]})}return i})();var It=(()=>{class i extends ke{constructor(){let e=s(oe),t=s(T);super(e,t);let o=e._table?._getCellRole();o&&t.nativeElement.setAttribute("role",o)}static \u0275fac=function(t){return new(t||i)};static \u0275dir=d({type:i,selectors:[["cdk-cell"],["td","cdk-cell",""]],hostAttrs:[1,"cdk-cell"],features:[p]})}return i})();var Ae=(()=>{class i{template=s(F);_differs=s(ie);columns;_columnsDiffer;constructor(){}ngOnChanges(e){if(!this._columnsDiffer){let t=e.columns&&e.columns.currentValue||[];this._columnsDiffer=this._differs.find(t).create(),this._columnsDiffer.diff(t)}}getColumnsDiff(){return this._columnsDiffer.diff(this.columns)}extractCellTemplate(e){return this instanceof me?e.headerCell.template:this instanceof Ne?e.footerCell.template:e.cell.template}static \u0275fac=function(t){return new(t||i)};static \u0275dir=d({type:i,features:[K]})}return i})(),me=(()=>{class i extends Ae{_table=s(M,{optional:!0});_hasStickyChanged=!1;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}_sticky=!1;constructor(){super(s(F),s(ie))}ngOnChanges(e){super.ngOnChanges(e)}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}static \u0275fac=function(t){return new(t||i)};static \u0275dir=d({type:i,selectors:[["","cdkHeaderRowDef",""]],inputs:{columns:[0,"cdkHeaderRowDef","columns"],sticky:[2,"cdkHeaderRowDefSticky","sticky",g]},features:[p,K]})}return i})(),Ne=(()=>{class i extends Ae{_table=s(M,{optional:!0});_hasStickyChanged=!1;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}_sticky=!1;constructor(){super(s(F),s(ie))}ngOnChanges(e){super.ngOnChanges(e)}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}static \u0275fac=function(t){return new(t||i)};static \u0275dir=d({type:i,selectors:[["","cdkFooterRowDef",""]],inputs:{columns:[0,"cdkFooterRowDef","columns"],sticky:[2,"cdkFooterRowDefSticky","sticky",g]},features:[p,K]})}return i})(),Ee=(()=>{class i extends Ae{_table=s(M,{optional:!0});when;constructor(){super(s(F),s(ie))}static \u0275fac=function(t){return new(t||i)};static \u0275dir=d({type:i,selectors:[["","cdkRowDef",""]],inputs:{columns:[0,"cdkRowDefColumns","columns"],when:[0,"cdkRowDefWhen","when"]},features:[p]})}return i})(),W=(()=>{class i{_viewContainer=s(Z);cells;context;static mostRecentCellOutlet=null;constructor(){i.mostRecentCellOutlet=this}ngOnDestroy(){i.mostRecentCellOutlet===this&&(i.mostRecentCellOutlet=null)}static \u0275fac=function(t){return new(t||i)};static \u0275dir=d({type:i,selectors:[["","cdkCellOutlet",""]]})}return i})(),Be=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=S({type:i,selectors:[["cdk-header-row"],["tr","cdk-header-row",""]],hostAttrs:["role","row",1,"cdk-header-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,o){t&1&&D(0,0)},dependencies:[W],encapsulation:2})}return i})();var Le=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=S({type:i,selectors:[["cdk-row"],["tr","cdk-row",""]],hostAttrs:["role","row",1,"cdk-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,o){t&1&&D(0,0)},dependencies:[W],encapsulation:2})}return i})(),Oe=(()=>{class i{templateRef=s(F);_contentClassName="cdk-no-data-row";constructor(){}static \u0275fac=function(t){return new(t||i)};static \u0275dir=d({type:i,selectors:[["ng-template","cdkNoDataRow",""]]})}return i})(),Mt=["top","bottom","left","right"],Pe=class{_isNativeHtmlTable;_stickCellCss;_isBrowser;_needsPositionStickyOnElement;direction;_positionListener;_tableInjector;_elemSizeCache=new WeakMap;_resizeObserver=globalThis?.ResizeObserver?new globalThis.ResizeObserver(a=>this._updateCachedSizes(a)):null;_updatedStickyColumnsParamsToReplay=[];_stickyColumnsReplayTimeout=null;_cachedCellWidths=[];_borderCellCss;_destroyed=!1;constructor(a,e,t=!0,o=!0,n,r,l){this._isNativeHtmlTable=a,this._stickCellCss=e,this._isBrowser=t,this._needsPositionStickyOnElement=o,this.direction=n,this._positionListener=r,this._tableInjector=l,this._borderCellCss={top:`${e}-border-elem-top`,bottom:`${e}-border-elem-bottom`,left:`${e}-border-elem-left`,right:`${e}-border-elem-right`}}clearStickyPositioning(a,e){(e.includes("left")||e.includes("right"))&&this._removeFromStickyColumnReplayQueue(a);let t=[];for(let o of a)o.nodeType===o.ELEMENT_NODE&&t.push(o,...Array.from(o.children));se({write:()=>{for(let o of t)this._removeStickyStyle(o,e)}},{injector:this._tableInjector})}updateStickyColumns(a,e,t,o=!0,n=!0){if(!a.length||!this._isBrowser||!(e.some(k=>k)||t.some(k=>k))){this._positionListener?.stickyColumnsUpdated({sizes:[]}),this._positionListener?.stickyEndColumnsUpdated({sizes:[]});return}let r=a[0],l=r.children.length,c=this.direction==="rtl",h=c?"right":"left",y=c?"left":"right",_=e.lastIndexOf(!0),O=t.indexOf(!0),L,Ye,$e;n&&this._updateStickyColumnReplayQueue({rows:[...a],stickyStartStates:[...e],stickyEndStates:[...t]}),se({earlyRead:()=>{L=this._getCellWidths(r,o),Ye=this._getStickyStartColumnPositions(L,e),$e=this._getStickyEndColumnPositions(L,t)},write:()=>{for(let k of a)for(let b=0;b<l;b++){let We=k.children[b];e[b]&&this._addStickyStyle(We,h,Ye[b],b===_),t[b]&&this._addStickyStyle(We,y,$e[b],b===O)}this._positionListener&&L.some(k=>!!k)&&(this._positionListener.stickyColumnsUpdated({sizes:_===-1?[]:L.slice(0,_+1).map((k,b)=>e[b]?k:null)}),this._positionListener.stickyEndColumnsUpdated({sizes:O===-1?[]:L.slice(O).map((k,b)=>t[b+O]?k:null).reverse()}))}},{injector:this._tableInjector})}stickRows(a,e,t){if(!this._isBrowser)return;let o=t==="bottom"?a.slice().reverse():a,n=t==="bottom"?e.slice().reverse():e,r=[],l=[],c=[];se({earlyRead:()=>{for(let h=0,y=0;h<o.length;h++){if(!n[h])continue;r[h]=y;let _=o[h];c[h]=this._isNativeHtmlTable?Array.from(_.children):[_];let O=this._retrieveElementSize(_).height;y+=O,l[h]=O}},write:()=>{let h=n.lastIndexOf(!0);for(let y=0;y<o.length;y++){if(!n[y])continue;let _=r[y],O=y===h;for(let L of c[y])this._addStickyStyle(L,t,_,O)}t==="top"?this._positionListener?.stickyHeaderRowsUpdated({sizes:l,offsets:r,elements:c}):this._positionListener?.stickyFooterRowsUpdated({sizes:l,offsets:r,elements:c})}},{injector:this._tableInjector})}updateStickyFooterContainer(a,e){this._isNativeHtmlTable&&se({write:()=>{let t=a.querySelector("tfoot");t&&(e.some(o=>!o)?this._removeStickyStyle(t,["bottom"]):this._addStickyStyle(t,"bottom",0,!1))}},{injector:this._tableInjector})}destroy(){this._stickyColumnsReplayTimeout&&clearTimeout(this._stickyColumnsReplayTimeout),this._resizeObserver?.disconnect(),this._destroyed=!0}_removeStickyStyle(a,e){if(!a.classList.contains(this._stickCellCss))return;for(let o of e)a.style[o]="",a.classList.remove(this._borderCellCss[o]);Mt.some(o=>e.indexOf(o)===-1&&a.style[o])?a.style.zIndex=this._getCalculatedZIndex(a):(a.style.zIndex="",this._needsPositionStickyOnElement&&(a.style.position=""),a.classList.remove(this._stickCellCss))}_addStickyStyle(a,e,t,o){a.classList.add(this._stickCellCss),o&&a.classList.add(this._borderCellCss[e]),a.style[e]=`${t}px`,a.style.zIndex=this._getCalculatedZIndex(a),this._needsPositionStickyOnElement&&(a.style.cssText+="position: -webkit-sticky; position: sticky; ")}_getCalculatedZIndex(a){let e={top:100,bottom:10,left:1,right:1},t=0;for(let o of Mt)a.style[o]&&(t+=e[o]);return t?`${t}`:""}_getCellWidths(a,e=!0){if(!e&&this._cachedCellWidths.length)return this._cachedCellWidths;let t=[],o=a.children;for(let n=0;n<o.length;n++){let r=o[n];t.push(this._retrieveElementSize(r).width)}return this._cachedCellWidths=t,t}_getStickyStartColumnPositions(a,e){let t=[],o=0;for(let n=0;n<a.length;n++)e[n]&&(t[n]=o,o+=a[n]);return t}_getStickyEndColumnPositions(a,e){let t=[],o=0;for(let n=a.length;n>0;n--)e[n]&&(t[n]=o,o+=a[n]);return t}_retrieveElementSize(a){let e=this._elemSizeCache.get(a);if(e)return e;let t=a.getBoundingClientRect(),o={width:t.width,height:t.height};return this._resizeObserver&&(this._elemSizeCache.set(a,o),this._resizeObserver.observe(a,{box:"border-box"})),o}_updateStickyColumnReplayQueue(a){this._removeFromStickyColumnReplayQueue(a.rows),this._stickyColumnsReplayTimeout||this._updatedStickyColumnsParamsToReplay.push(a)}_removeFromStickyColumnReplayQueue(a){let e=new Set(a);for(let t of this._updatedStickyColumnsParamsToReplay)t.rows=t.rows.filter(o=>!e.has(o));this._updatedStickyColumnsParamsToReplay=this._updatedStickyColumnsParamsToReplay.filter(t=>!!t.rows.length)}_updateCachedSizes(a){let e=!1;for(let t of a){let o=t.borderBoxSize?.length?{width:t.borderBoxSize[0].inlineSize,height:t.borderBoxSize[0].blockSize}:{width:t.contentRect.width,height:t.contentRect.height};o.width!==this._elemSizeCache.get(t.target)?.width&&$t(t.target)&&(e=!0),this._elemSizeCache.set(t.target,o)}e&&this._updatedStickyColumnsParamsToReplay.length&&(this._stickyColumnsReplayTimeout&&clearTimeout(this._stickyColumnsReplayTimeout),this._stickyColumnsReplayTimeout=setTimeout(()=>{if(!this._destroyed){for(let t of this._updatedStickyColumnsParamsToReplay)this.updateStickyColumns(t.rows,t.stickyStartStates,t.stickyEndStates,!0,!1);this._updatedStickyColumnsParamsToReplay=[],this._stickyColumnsReplayTimeout=null}},0))}};function $t(i){return["cdk-cell","cdk-header-cell","cdk-footer-cell"].some(a=>i.classList.contains(a))}var xe=new Q("CDK_SPL");var He=(()=>{class i{viewContainer=s(Z);elementRef=s(T);constructor(){let e=s(M);e._rowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||i)};static \u0275dir=d({type:i,selectors:[["","rowOutlet",""]]})}return i})(),je=(()=>{class i{viewContainer=s(Z);elementRef=s(T);constructor(){let e=s(M);e._headerRowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||i)};static \u0275dir=d({type:i,selectors:[["","headerRowOutlet",""]]})}return i})(),Ve=(()=>{class i{viewContainer=s(Z);elementRef=s(T);constructor(){let e=s(M);e._footerRowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||i)};static \u0275dir=d({type:i,selectors:[["","footerRowOutlet",""]]})}return i})(),Qe=(()=>{class i{viewContainer=s(Z);elementRef=s(T);constructor(){let e=s(M);e._noDataRowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||i)};static \u0275dir=d({type:i,selectors:[["","noDataRowOutlet",""]]})}return i})(),Ue=(()=>{class i{_differs=s(ie);_changeDetectorRef=s(te);_elementRef=s(T);_dir=s(ft,{optional:!0});_platform=s(st);_viewRepeater=s(ue);_viewportRuler=s(vt);_stickyPositioningListener=s(xe,{optional:!0,skipSelf:!0});_document=s(Ze);_data;_onDestroy=new I;_renderRows;_renderChangeSubscription;_columnDefsByName=new Map;_rowDefs;_headerRowDefs;_footerRowDefs;_dataDiffer;_defaultRowDef;_customColumnDefs=new Set;_customRowDefs=new Set;_customHeaderRowDefs=new Set;_customFooterRowDefs=new Set;_customNoDataRow;_headerRowDefChanged=!0;_footerRowDefChanged=!0;_stickyColumnStylesNeedReset=!0;_forceRecalculateCellWidths=!0;_cachedRenderRowsMap=new Map;_isNativeHtmlTable;_stickyStyler;stickyCssClass="cdk-table-sticky";needsPositionStickyOnElement=!0;_isServer;_isShowingNoDataRow=!1;_hasAllOutlets=!1;_hasInitialized=!1;_getCellRole(){if(this._cellRoleInternal===void 0){let e=this._elementRef.nativeElement.getAttribute("role");return e==="grid"||e==="treegrid"?"gridcell":"cell"}return this._cellRoleInternal}_cellRoleInternal=void 0;get trackBy(){return this._trackByFn}set trackBy(e){this._trackByFn=e}_trackByFn;get dataSource(){return this._dataSource}set dataSource(e){this._dataSource!==e&&this._switchDataSource(e)}_dataSource;get multiTemplateDataRows(){return this._multiTemplateDataRows}set multiTemplateDataRows(e){this._multiTemplateDataRows=e,this._rowOutlet&&this._rowOutlet.viewContainer.length&&(this._forceRenderDataRows(),this.updateStickyColumnStyles())}_multiTemplateDataRows=!1;get fixedLayout(){return this._fixedLayout}set fixedLayout(e){this._fixedLayout=e,this._forceRecalculateCellWidths=!0,this._stickyColumnStylesNeedReset=!0}_fixedLayout=!1;contentChanged=new X;viewChange=new G({start:0,end:Number.MAX_VALUE});_rowOutlet;_headerRowOutlet;_footerRowOutlet;_noDataRowOutlet;_contentColumnDefs;_contentRowDefs;_contentHeaderRowDefs;_contentFooterRowDefs;_noDataRow;_injector=s(Ke);constructor(){s(new rt("role"),{optional:!0})||this._elementRef.nativeElement.setAttribute("role","table"),this._isServer=!this._platform.isBrowser,this._isNativeHtmlTable=this._elementRef.nativeElement.nodeName==="TABLE",this._dataDiffer=this._differs.find([]).create((t,o)=>this.trackBy?this.trackBy(o.dataIndex,o.data):o)}ngOnInit(){this._setupStickyStyler(),this._viewportRuler.change().pipe(ge(this._onDestroy)).subscribe(()=>{this._forceRecalculateCellWidths=!0})}ngAfterContentInit(){this._hasInitialized=!0}ngAfterContentChecked(){this._canRender()&&this._render()}ngOnDestroy(){this._stickyStyler?.destroy(),[this._rowOutlet?.viewContainer,this._headerRowOutlet?.viewContainer,this._footerRowOutlet?.viewContainer,this._cachedRenderRowsMap,this._customColumnDefs,this._customRowDefs,this._customHeaderRowDefs,this._customFooterRowDefs,this._columnDefsByName].forEach(e=>{e?.clear()}),this._headerRowDefs=[],this._footerRowDefs=[],this._defaultRowDef=null,this._onDestroy.next(),this._onDestroy.complete(),Ce(this.dataSource)&&this.dataSource.disconnect(this)}renderRows(){this._renderRows=this._getAllRenderRows();let e=this._dataDiffer.diff(this._renderRows);if(!e){this._updateNoDataRow(),this.contentChanged.next();return}let t=this._rowOutlet.viewContainer;this._viewRepeater.applyChanges(e,t,(o,n,r)=>this._getEmbeddedViewArgs(o.item,r),o=>o.item.data,o=>{o.operation===wt.INSERTED&&o.context&&this._renderCellTemplateForItem(o.record.item.rowDef,o.context)}),this._updateRowIndexContext(),e.forEachIdentityChange(o=>{let n=t.get(o.currentIndex);n.context.$implicit=o.item.data}),this._updateNoDataRow(),this.contentChanged.next(),this.updateStickyColumnStyles()}addColumnDef(e){this._customColumnDefs.add(e)}removeColumnDef(e){this._customColumnDefs.delete(e)}addRowDef(e){this._customRowDefs.add(e)}removeRowDef(e){this._customRowDefs.delete(e)}addHeaderRowDef(e){this._customHeaderRowDefs.add(e),this._headerRowDefChanged=!0}removeHeaderRowDef(e){this._customHeaderRowDefs.delete(e),this._headerRowDefChanged=!0}addFooterRowDef(e){this._customFooterRowDefs.add(e),this._footerRowDefChanged=!0}removeFooterRowDef(e){this._customFooterRowDefs.delete(e),this._footerRowDefChanged=!0}setNoDataRow(e){this._customNoDataRow=e}updateStickyHeaderRowStyles(){let e=this._getRenderedRows(this._headerRowOutlet);if(this._isNativeHtmlTable){let o=Tt(this._headerRowOutlet,"thead");o&&(o.style.display=e.length?"":"none")}let t=this._headerRowDefs.map(o=>o.sticky);this._stickyStyler.clearStickyPositioning(e,["top"]),this._stickyStyler.stickRows(e,t,"top"),this._headerRowDefs.forEach(o=>o.resetStickyChanged())}updateStickyFooterRowStyles(){let e=this._getRenderedRows(this._footerRowOutlet);if(this._isNativeHtmlTable){let o=Tt(this._footerRowOutlet,"tfoot");o&&(o.style.display=e.length?"":"none")}let t=this._footerRowDefs.map(o=>o.sticky);this._stickyStyler.clearStickyPositioning(e,["bottom"]),this._stickyStyler.stickRows(e,t,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,t),this._footerRowDefs.forEach(o=>o.resetStickyChanged())}updateStickyColumnStyles(){let e=this._getRenderedRows(this._headerRowOutlet),t=this._getRenderedRows(this._rowOutlet),o=this._getRenderedRows(this._footerRowOutlet);(this._isNativeHtmlTable&&!this._fixedLayout||this._stickyColumnStylesNeedReset)&&(this._stickyStyler.clearStickyPositioning([...e,...t,...o],["left","right"]),this._stickyColumnStylesNeedReset=!1),e.forEach((n,r)=>{this._addStickyColumnStyles([n],this._headerRowDefs[r])}),this._rowDefs.forEach(n=>{let r=[];for(let l=0;l<t.length;l++)this._renderRows[l].rowDef===n&&r.push(t[l]);this._addStickyColumnStyles(r,n)}),o.forEach((n,r)=>{this._addStickyColumnStyles([n],this._footerRowDefs[r])}),Array.from(this._columnDefsByName.values()).forEach(n=>n.resetStickyChanged())}_outletAssigned(){!this._hasAllOutlets&&this._rowOutlet&&this._headerRowOutlet&&this._footerRowOutlet&&this._noDataRowOutlet&&(this._hasAllOutlets=!0,this._canRender()&&this._render())}_canRender(){return this._hasAllOutlets&&this._hasInitialized}_render(){this._cacheRowDefs(),this._cacheColumnDefs(),!this._headerRowDefs.length&&!this._footerRowDefs.length&&this._rowDefs.length;let t=this._renderUpdatedColumns()||this._headerRowDefChanged||this._footerRowDefChanged;this._stickyColumnStylesNeedReset=this._stickyColumnStylesNeedReset||t,this._forceRecalculateCellWidths=t,this._headerRowDefChanged&&(this._forceRenderHeaderRows(),this._headerRowDefChanged=!1),this._footerRowDefChanged&&(this._forceRenderFooterRows(),this._footerRowDefChanged=!1),this.dataSource&&this._rowDefs.length>0&&!this._renderChangeSubscription?this._observeRenderChanges():this._stickyColumnStylesNeedReset&&this.updateStickyColumnStyles(),this._checkStickyStates()}_getAllRenderRows(){let e=[],t=this._cachedRenderRowsMap;if(this._cachedRenderRowsMap=new Map,!this._data)return e;for(let o=0;o<this._data.length;o++){let n=this._data[o],r=this._getRenderRowsForData(n,o,t.get(n));this._cachedRenderRowsMap.has(n)||this._cachedRenderRowsMap.set(n,new WeakMap);for(let l=0;l<r.length;l++){let c=r[l],h=this._cachedRenderRowsMap.get(c.data);h.has(c.rowDef)?h.get(c.rowDef).push(c):h.set(c.rowDef,[c]),e.push(c)}}return e}_getRenderRowsForData(e,t,o){return this._getRowDefs(e,t).map(r=>{let l=o&&o.has(r)?o.get(r):[];if(l.length){let c=l.shift();return c.dataIndex=t,c}else return{data:e,rowDef:r,dataIndex:t}})}_cacheColumnDefs(){this._columnDefsByName.clear(),Se(this._getOwnDefs(this._contentColumnDefs),this._customColumnDefs).forEach(t=>{this._columnDefsByName.has(t.name),this._columnDefsByName.set(t.name,t)})}_cacheRowDefs(){this._headerRowDefs=Se(this._getOwnDefs(this._contentHeaderRowDefs),this._customHeaderRowDefs),this._footerRowDefs=Se(this._getOwnDefs(this._contentFooterRowDefs),this._customFooterRowDefs),this._rowDefs=Se(this._getOwnDefs(this._contentRowDefs),this._customRowDefs);let e=this._rowDefs.filter(t=>!t.when);!this.multiTemplateDataRows&&e.length>1,this._defaultRowDef=e[0]}_renderUpdatedColumns(){let e=(r,l)=>{let c=!!l.getColumnsDiff();return r||c},t=this._rowDefs.reduce(e,!1);t&&this._forceRenderDataRows();let o=this._headerRowDefs.reduce(e,!1);o&&this._forceRenderHeaderRows();let n=this._footerRowDefs.reduce(e,!1);return n&&this._forceRenderFooterRows(),t||o||n}_switchDataSource(e){this._data=[],Ce(this.dataSource)&&this.dataSource.disconnect(this),this._renderChangeSubscription&&(this._renderChangeSubscription.unsubscribe(),this._renderChangeSubscription=null),e||(this._dataDiffer&&this._dataDiffer.diff([]),this._rowOutlet&&this._rowOutlet.viewContainer.clear()),this._dataSource=e}_observeRenderChanges(){if(!this.dataSource)return;let e;Ce(this.dataSource)?e=this.dataSource.connect(this):Ge(this.dataSource)?e=this.dataSource:Array.isArray(this.dataSource)&&(e=q(this.dataSource)),this._renderChangeSubscription=e.pipe(ge(this._onDestroy)).subscribe(t=>{this._data=t||[],this.renderRows()})}_forceRenderHeaderRows(){this._headerRowOutlet.viewContainer.length>0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach((e,t)=>this._renderRow(this._headerRowOutlet,e,t)),this.updateStickyHeaderRowStyles()}_forceRenderFooterRows(){this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach((e,t)=>this._renderRow(this._footerRowOutlet,e,t)),this.updateStickyFooterRowStyles()}_addStickyColumnStyles(e,t){let o=Array.from(t?.columns||[]).map(l=>{let c=this._columnDefsByName.get(l);return c}),n=o.map(l=>l.sticky),r=o.map(l=>l.stickyEnd);this._stickyStyler.updateStickyColumns(e,n,r,!this._fixedLayout||this._forceRecalculateCellWidths)}_getRenderedRows(e){let t=[];for(let o=0;o<e.viewContainer.length;o++){let n=e.viewContainer.get(o);t.push(n.rootNodes[0])}return t}_getRowDefs(e,t){if(this._rowDefs.length==1)return[this._rowDefs[0]];let o=[];if(this.multiTemplateDataRows)o=this._rowDefs.filter(n=>!n.when||n.when(t,e));else{let n=this._rowDefs.find(r=>r.when&&r.when(t,e))||this._defaultRowDef;n&&o.push(n)}return o.length,o}_getEmbeddedViewArgs(e,t){let o=e.rowDef,n={$implicit:e.data};return{templateRef:o.template,context:n,index:t}}_renderRow(e,t,o,n={}){let r=e.viewContainer.createEmbeddedView(t.template,n,o);return this._renderCellTemplateForItem(t,n),r}_renderCellTemplateForItem(e,t){for(let o of this._getCellTemplates(e))W.mostRecentCellOutlet&&W.mostRecentCellOutlet._viewContainer.createEmbeddedView(o,t);this._changeDetectorRef.markForCheck()}_updateRowIndexContext(){let e=this._rowOutlet.viewContainer;for(let t=0,o=e.length;t<o;t++){let r=e.get(t).context;r.count=o,r.first=t===0,r.last=t===o-1,r.even=t%2===0,r.odd=!r.even,this.multiTemplateDataRows?(r.dataIndex=this._renderRows[t].dataIndex,r.renderIndex=t):r.index=this._renderRows[t].dataIndex}}_getCellTemplates(e){return!e||!e.columns?[]:Array.from(e.columns,t=>{let o=this._columnDefsByName.get(t);return e.extractCellTemplate(o)})}_forceRenderDataRows(){this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear(),this.renderRows()}_checkStickyStates(){let e=(t,o)=>t||o.hasStickyChanged();this._headerRowDefs.reduce(e,!1)&&this.updateStickyHeaderRowStyles(),this._footerRowDefs.reduce(e,!1)&&this.updateStickyFooterRowStyles(),Array.from(this._columnDefsByName.values()).reduce(e,!1)&&(this._stickyColumnStylesNeedReset=!0,this.updateStickyColumnStyles())}_setupStickyStyler(){let e=this._dir?this._dir.value:"ltr";this._stickyStyler=new Pe(this._isNativeHtmlTable,this.stickyCssClass,this._platform.isBrowser,this.needsPositionStickyOnElement,e,this._stickyPositioningListener,this._injector),(this._dir?this._dir.change:q()).pipe(ge(this._onDestroy)).subscribe(t=>{this._stickyStyler.direction=t,this.updateStickyColumnStyles()})}_getOwnDefs(e){return e.filter(t=>!t._table||t._table===this)}_updateNoDataRow(){let e=this._customNoDataRow||this._noDataRow;if(!e)return;let t=this._rowOutlet.viewContainer.length===0;if(t===this._isShowingNoDataRow)return;let o=this._noDataRowOutlet.viewContainer;if(t){let n=o.createEmbeddedView(e.templateRef),r=n.rootNodes[0];n.rootNodes.length===1&&r?.nodeType===this._document.ELEMENT_NODE&&(r.setAttribute("role","row"),r.classList.add(e._contentClassName))}else o.clear();this._isShowingNoDataRow=t,this._changeDetectorRef.markForCheck()}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=S({type:i,selectors:[["cdk-table"],["table","cdk-table",""]],contentQueries:function(t,o,n){if(t&1&&(A(n,Oe,5),A(n,oe,5),A(n,Ee,5),A(n,me,5),A(n,Ne,5)),t&2){let r;N(r=B())&&(o._noDataRow=r.first),N(r=B())&&(o._contentColumnDefs=r),N(r=B())&&(o._contentRowDefs=r),N(r=B())&&(o._contentHeaderRowDefs=r),N(r=B())&&(o._contentFooterRowDefs=r)}},hostAttrs:[1,"cdk-table"],hostVars:2,hostBindings:function(t,o){t&2&&Y("cdk-table-fixed-layout",o.fixedLayout)},inputs:{trackBy:"trackBy",dataSource:"dataSource",multiTemplateDataRows:[2,"multiTemplateDataRows","multiTemplateDataRows",g],fixedLayout:[2,"fixedLayout","fixedLayout",g]},outputs:{contentChanged:"contentChanged"},exportAs:["cdkTable"],features:[C([{provide:M,useExisting:i},{provide:ue,useClass:Re},{provide:xe,useValue:null}])],ngContentSelectors:Vt,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(t,o){t&1&&(J(jt),E(0),E(1,1),w(2,Qt,1,0),w(3,Ut,7,0)(4,Yt,4,0)),t&2&&(m(2),v(o._isServer?2:-1),m(),v(o._isNativeHtmlTable?3:4))},dependencies:[je,He,Qe,Ve],styles:[`.cdk-table-fixed-layout{table-layout:fixed}
2
+ `],encapsulation:2})}return i})();function Se(i,a){return i.concat(Array.from(a))}function Tt(i,a){let e=a.toUpperCase(),t=i.viewContainer.element.nativeElement;for(;t;){let o=t.nodeType===1?t.nodeName:null;if(o===e)return t;if(o==="TABLE")break;t=t.parentNode}return null}var Ft=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=j({type:i});static \u0275inj=H({imports:[Dt]})}return i})();var Wt=[[["caption"]],[["colgroup"],["col"]],"*"],Gt=["caption","colgroup, col","*"];function qt(i,a){i&1&&E(0,2)}function Kt(i,a){i&1&&(u(0,"thead",0),D(1,1),f(),u(2,"tbody",2),D(3,3)(4,4),f(),u(5,"tfoot",0),D(6,5),f())}function Zt(i,a){i&1&&D(0,1)(1,3)(2,4)(3,5)}var eo=(()=>{class i extends Ue{stickyCssClass="mat-mdc-table-sticky";needsPositionStickyOnElement=!1;static \u0275fac=(()=>{let e;return function(o){return(e||(e=R(i)))(o||i)}})();static \u0275cmp=S({type:i,selectors:[["mat-table"],["table","mat-table",""]],hostAttrs:[1,"mat-mdc-table","mdc-data-table__table"],hostVars:2,hostBindings:function(t,o){t&2&&Y("mdc-table-fixed-layout",o.fixedLayout)},exportAs:["matTable"],features:[C([{provide:Ue,useExisting:i},{provide:M,useExisting:i},{provide:ue,useClass:Re},{provide:xe,useValue:null}]),p],ngContentSelectors:Gt,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["role","rowgroup",1,"mdc-data-table__content"],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(t,o){t&1&&(J(Wt),E(0),E(1,1),w(2,qt,1,0),w(3,Kt,7,0)(4,Zt,4,0)),t&2&&(m(2),v(o._isServer?2:-1),m(),v(o._isNativeHtmlTable?3:4))},dependencies:[je,He,Qe,Ve],styles:[`.mat-mdc-table-sticky{position:sticky !important}mat-table{display:block}mat-header-row{min-height:var(--mat-table-header-container-height, 56px)}mat-row{min-height:var(--mat-table-row-item-container-height, 52px)}mat-footer-row{min-height:var(--mat-table-footer-container-height, 52px)}mat-row,mat-header-row,mat-footer-row{display:flex;border-width:0;border-bottom-width:1px;border-style:solid;align-items:center;box-sizing:border-box}mat-cell:first-of-type,mat-header-cell:first-of-type,mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] mat-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}mat-cell:last-of-type,mat-header-cell:last-of-type,mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] mat-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}mat-cell,mat-header-cell,mat-footer-cell{flex:1;display:flex;align-items:center;overflow:hidden;word-wrap:break-word;min-height:inherit}.mat-mdc-table{min-width:100%;border:0;border-spacing:0;table-layout:auto;white-space:normal;background-color:var(--mat-table-background-color, var(--mat-sys-surface))}.mdc-data-table__cell{box-sizing:border-box;overflow:hidden;text-align:left;text-overflow:ellipsis}[dir=rtl] .mdc-data-table__cell{text-align:right}.mdc-data-table__cell,.mdc-data-table__header-cell{padding:0 16px}.mat-mdc-header-row{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;height:var(--mat-table-header-container-height, 56px);color:var(--mat-table-header-headline-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mat-table-header-headline-font, var(--mat-sys-title-small-font, Roboto, sans-serif));line-height:var(--mat-table-header-headline-line-height, var(--mat-sys-title-small-line-height));font-size:var(--mat-table-header-headline-size, var(--mat-sys-title-small-size, 14px));font-weight:var(--mat-table-header-headline-weight, var(--mat-sys-title-small-weight, 500))}.mat-mdc-row{height:var(--mat-table-row-item-container-height, 52px);color:var(--mat-table-row-item-label-text-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)))}.mat-mdc-row,.mdc-data-table__content{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-table-row-item-label-text-font, var(--mat-sys-body-medium-font, Roboto, sans-serif));line-height:var(--mat-table-row-item-label-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-table-row-item-label-text-size, var(--mat-sys-body-medium-size, 14px));font-weight:var(--mat-table-row-item-label-text-weight, var(--mat-sys-body-medium-weight))}.mat-mdc-footer-row{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;height:var(--mat-table-footer-container-height, 52px);color:var(--mat-table-row-item-label-text-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mat-table-footer-supporting-text-font, var(--mat-sys-body-medium-font, Roboto, sans-serif));line-height:var(--mat-table-footer-supporting-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-table-footer-supporting-text-size, var(--mat-sys-body-medium-size, 14px));font-weight:var(--mat-table-footer-supporting-text-weight, var(--mat-sys-body-medium-weight));letter-spacing:var(--mat-table-footer-supporting-text-tracking, var(--mat-sys-body-medium-tracking))}.mat-mdc-header-cell{border-bottom-color:var(--mat-table-row-item-outline-color, var(--mat-sys-outline, rgba(0, 0, 0, 0.12)));border-bottom-width:var(--mat-table-row-item-outline-width, 1px);border-bottom-style:solid;letter-spacing:var(--mat-table-header-headline-tracking, var(--mat-sys-title-small-tracking));font-weight:inherit;line-height:inherit;box-sizing:border-box;text-overflow:ellipsis;overflow:hidden;outline:none;text-align:left}[dir=rtl] .mat-mdc-header-cell{text-align:right}.mdc-data-table__row:last-child>.mat-mdc-header-cell{border-bottom:none}.mat-mdc-cell{border-bottom-color:var(--mat-table-row-item-outline-color, var(--mat-sys-outline, rgba(0, 0, 0, 0.12)));border-bottom-width:var(--mat-table-row-item-outline-width, 1px);border-bottom-style:solid;letter-spacing:var(--mat-table-row-item-label-text-tracking, var(--mat-sys-body-medium-tracking));line-height:inherit}.mdc-data-table__row:last-child>.mat-mdc-cell{border-bottom:none}.mat-mdc-footer-cell{letter-spacing:var(--mat-table-row-item-label-text-tracking, var(--mat-sys-body-medium-tracking))}mat-row.mat-mdc-row,mat-header-row.mat-mdc-header-row,mat-footer-row.mat-mdc-footer-row{border-bottom:none}.mat-mdc-table tbody,.mat-mdc-table tfoot,.mat-mdc-table thead,.mat-mdc-cell,.mat-mdc-footer-cell,.mat-mdc-header-row,.mat-mdc-row,.mat-mdc-footer-row,.mat-mdc-table .mat-mdc-header-cell{background:inherit}.mat-mdc-table mat-header-row.mat-mdc-header-row,.mat-mdc-table mat-row.mat-mdc-row,.mat-mdc-table mat-footer-row.mat-mdc-footer-cell{height:unset}mat-header-cell.mat-mdc-header-cell,mat-cell.mat-mdc-cell,mat-footer-cell.mat-mdc-footer-cell{align-self:stretch}
3
+ `],encapsulation:2})}return i})(),to=(()=>{class i extends Me{static \u0275fac=(()=>{let e;return function(o){return(e||(e=R(i)))(o||i)}})();static \u0275dir=d({type:i,selectors:[["","matCellDef",""]],features:[C([{provide:Me,useExisting:i}]),p]})}return i})(),io=(()=>{class i extends Te{static \u0275fac=(()=>{let e;return function(o){return(e||(e=R(i)))(o||i)}})();static \u0275dir=d({type:i,selectors:[["","matHeaderCellDef",""]],features:[C([{provide:Te,useExisting:i}]),p]})}return i})();var oo=(()=>{class i extends oe{get name(){return this._name}set name(e){this._setNameInput(e)}_updateColumnCssClassName(){super._updateColumnCssClassName(),this._columnCssClassName.push(`mat-column-${this.cssClassFriendlyName}`)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=R(i)))(o||i)}})();static \u0275dir=d({type:i,selectors:[["","matColumnDef",""]],inputs:{name:[0,"matColumnDef","name"]},features:[C([{provide:oe,useExisting:i},{provide:"MAT_SORT_HEADER_COLUMN_DEF",useExisting:i}]),p]})}return i})(),ao=(()=>{class i extends Ot{static \u0275fac=(()=>{let e;return function(o){return(e||(e=R(i)))(o||i)}})();static \u0275dir=d({type:i,selectors:[["mat-header-cell"],["th","mat-header-cell",""]],hostAttrs:["role","columnheader",1,"mat-mdc-header-cell","mdc-data-table__header-cell"],features:[p]})}return i})();var no=(()=>{class i extends It{static \u0275fac=(()=>{let e;return function(o){return(e||(e=R(i)))(o||i)}})();static \u0275dir=d({type:i,selectors:[["mat-cell"],["td","mat-cell",""]],hostAttrs:[1,"mat-mdc-cell","mdc-data-table__cell"],features:[p]})}return i})();var ro=(()=>{class i extends me{static \u0275fac=(()=>{let e;return function(o){return(e||(e=R(i)))(o||i)}})();static \u0275dir=d({type:i,selectors:[["","matHeaderRowDef",""]],inputs:{columns:[0,"matHeaderRowDef","columns"],sticky:[2,"matHeaderRowDefSticky","sticky",g]},features:[C([{provide:me,useExisting:i}]),p]})}return i})();var so=(()=>{class i extends Ee{static \u0275fac=(()=>{let e;return function(o){return(e||(e=R(i)))(o||i)}})();static \u0275dir=d({type:i,selectors:[["","matRowDef",""]],inputs:{columns:[0,"matRowDefColumns","columns"],when:[0,"matRowDefWhen","when"]},features:[C([{provide:Ee,useExisting:i}]),p]})}return i})(),lo=(()=>{class i extends Be{static \u0275fac=(()=>{let e;return function(o){return(e||(e=R(i)))(o||i)}})();static \u0275cmp=S({type:i,selectors:[["mat-header-row"],["tr","mat-header-row",""]],hostAttrs:["role","row",1,"mat-mdc-header-row","mdc-data-table__header-row"],exportAs:["matHeaderRow"],features:[C([{provide:Be,useExisting:i}]),p],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,o){t&1&&D(0,0)},dependencies:[W],encapsulation:2})}return i})();var co=(()=>{class i extends Le{static \u0275fac=(()=>{let e;return function(o){return(e||(e=R(i)))(o||i)}})();static \u0275cmp=S({type:i,selectors:[["mat-row"],["tr","mat-row",""]],hostAttrs:["role","row",1,"mat-mdc-row","mdc-data-table__row"],exportAs:["matRow"],features:[C([{provide:Le,useExisting:i}]),p],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,o){t&1&&D(0,0)},dependencies:[W],encapsulation:2})}return i})(),uo=(()=>{class i extends Oe{_contentClassName="mat-mdc-no-data-row";static \u0275fac=(()=>{let e;return function(o){return(e||(e=R(i)))(o||i)}})();static \u0275dir=d({type:i,selectors:[["ng-template","matNoDataRow",""]],features:[C([{provide:Oe,useExisting:i}]),p]})}return i})();var mo=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=j({type:i});static \u0275inj=H({imports:[de,Ft,de]})}return i})(),Xt=9007199254740991,Pt=class extends yt{_data;_renderData=new G([]);_filter=new G("");_internalPageChanges=new I;_renderChangesSubscription=null;filteredData;get data(){return this._data.value}set data(a){a=Array.isArray(a)?a:[],this._data.next(a),this._renderChangesSubscription||this._filterData(a)}get filter(){return this._filter.value}set filter(a){this._filter.next(a),this._renderChangesSubscription||this._filterData(this.data)}get sort(){return this._sort}set sort(a){this._sort=a,this._updateChangeSubscription()}_sort;get paginator(){return this._paginator}set paginator(a){this._paginator=a,this._updateChangeSubscription()}_paginator;sortingDataAccessor=(a,e)=>{let t=a[e];if(lt(t)){let o=Number(t);return o<Xt?o:t}return t};sortData=(a,e)=>{let t=e.active,o=e.direction;return!t||o==""?a:a.sort((n,r)=>{let l=this.sortingDataAccessor(n,t),c=this.sortingDataAccessor(r,t),h=typeof l,y=typeof c;h!==y&&(h==="number"&&(l+=""),y==="number"&&(c+=""));let _=0;return l!=null&&c!=null?l>c?_=1:l<c&&(_=-1):l!=null?_=1:c!=null&&(_=-1),_*(o=="asc"?1:-1)})};filterPredicate=(a,e)=>{let t=e.trim().toLowerCase();return Object.values(a).some(o=>`${o}`.toLowerCase().includes(t))};constructor(a=[]){super(),this._data=new G(a),this._updateChangeSubscription()}_updateChangeSubscription(){let a=this._sort?ae(this._sort.sortChange,this._sort.initialized):q(null),e=this._paginator?ae(this._paginator.page,this._internalPageChanges,this._paginator.initialized):q(null),t=this._data,o=pe([t,this._filter]).pipe(he(([l])=>this._filterData(l))),n=pe([o,a]).pipe(he(([l])=>this._orderData(l))),r=pe([n,e]).pipe(he(([l])=>this._pageData(l)));this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=r.subscribe(l=>this._renderData.next(l))}_filterData(a){return this.filteredData=this.filter==null||this.filter===""?a:a.filter(e=>this.filterPredicate(e,this.filter)),this.paginator&&this._updatePaginator(this.filteredData.length),this.filteredData}_orderData(a){return this.sort?this.sortData(a.slice(),this.sort):a}_pageData(a){if(!this.paginator)return a;let e=this.paginator.pageIndex*this.paginator.pageSize;return a.slice(e,e+this.paginator.pageSize)}_updatePaginator(a){Promise.resolve().then(()=>{let e=this.paginator;if(e&&(e.length=a,e.pageIndex>0)){let t=Math.ceil(e.length/e.pageSize)-1||0,o=Math.min(e.pageIndex,t);o!==e.pageIndex&&(e.pageIndex=o,this._internalPageChanges.next())}})}connect(){return this._renderChangesSubscription||this._updateChangeSubscription(),this._renderData}disconnect(){this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=null}};function Jt(i,a){if(i&1&&(u(0,"mat-option",17),$(1),f()),i&2){let e=a.$implicit;V("value",e),m(),ee(" ",e," ")}}function ei(i,a){if(i&1){let e=be();u(0,"mat-form-field",14)(1,"mat-select",16,0),z("selectionChange",function(o){ne(e);let n=x(2);return re(n._changePageSize(o.value))}),tt(3,Jt,2,2,"mat-option",17,et),f(),u(5,"div",18),z("click",function(){ne(e);let o=at(2);return re(o.open())}),f()()}if(i&2){let e=x(2);V("appearance",e._formFieldAppearance)("color",e.color),m(),V("value",e.pageSize)("disabled",e.disabled)("aria-labelledby",e._pageSizeLabelId)("panelClass",e.selectConfig.panelClass||"")("disableOptionCentering",e.selectConfig.disableOptionCentering),m(2),it(e._displayedPageSizeOptions)}}function ti(i,a){if(i&1&&(u(0,"div",15),$(1),f()),i&2){let e=x(2);m(),nt(e.pageSize)}}function ii(i,a){if(i&1&&(u(0,"div",3)(1,"div",13),$(2),f(),w(3,ei,6,7,"mat-form-field",14),w(4,ti,2,1,"div",15),f()),i&2){let e=x();m(),P("id",e._pageSizeLabelId),m(),ee(" ",e._intl.itemsPerPageLabel," "),m(),v(e._displayedPageSizeOptions.length>1?3:-1),m(),v(e._displayedPageSizeOptions.length<=1?4:-1)}}function oi(i,a){if(i&1){let e=be();u(0,"button",19),z("click",function(){ne(e);let o=x();return re(o._buttonClicked(0,o._previousButtonsDisabled()))}),U(),u(1,"svg",8),le(2,"path",20),f()()}if(i&2){let e=x();V("matTooltip",e._intl.firstPageLabel)("matTooltipDisabled",e._previousButtonsDisabled())("disabled",e._previousButtonsDisabled())("tabindex",e._previousButtonsDisabled()?-1:null),P("aria-label",e._intl.firstPageLabel)}}function ai(i,a){if(i&1){let e=be();u(0,"button",21),z("click",function(){ne(e);let o=x();return re(o._buttonClicked(o.getNumberOfPages()-1,o._nextButtonsDisabled()))}),U(),u(1,"svg",8),le(2,"path",22),f()()}if(i&2){let e=x();V("matTooltip",e._intl.lastPageLabel)("matTooltipDisabled",e._nextButtonsDisabled())("disabled",e._nextButtonsDisabled())("tabindex",e._nextButtonsDisabled()?-1:null),P("aria-label",e._intl.lastPageLabel)}}var Ie=(()=>{class i{changes=new I;itemsPerPageLabel="Items per page:";nextPageLabel="Next page";previousPageLabel="Previous page";firstPageLabel="First page";lastPageLabel="Last page";getRangeLabel=(e,t,o)=>{if(o==0||t==0)return`0 of ${o}`;o=Math.max(o,0);let n=e*t,r=n<o?Math.min(n+t,o):n+t;return`${n+1} \u2013 ${r} of ${o}`};static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function ni(i){return i||new Ie}var ri={provide:Ie,deps:[[new ye,new we,Ie]],useFactory:ni},si=50;var li=new Q("MAT_PAGINATOR_DEFAULT_OPTIONS"),ci=(()=>{class i{_intl=s(Ie);_changeDetectorRef=s(te);_formFieldAppearance;_pageSizeLabelId=s(ut).getId("mat-paginator-page-size-label-");_intlChanges;_isInitialized=!1;_initializedStream=new fe(1);color;get pageIndex(){return this._pageIndex}set pageIndex(e){this._pageIndex=Math.max(e||0,0),this._changeDetectorRef.markForCheck()}_pageIndex=0;get length(){return this._length}set length(e){this._length=e||0,this._changeDetectorRef.markForCheck()}_length=0;get pageSize(){return this._pageSize}set pageSize(e){this._pageSize=Math.max(e||0,0),this._updateDisplayedPageSizeOptions()}_pageSize;get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(e){this._pageSizeOptions=(e||[]).map(t=>ce(t,0)),this._updateDisplayedPageSizeOptions()}_pageSizeOptions=[];hidePageSize=!1;showFirstLastButtons=!1;selectConfig={};disabled=!1;page=new X;_displayedPageSizeOptions;initialized=this._initializedStream;constructor(){let e=this._intl,t=s(li,{optional:!0});if(this._intlChanges=e.changes.subscribe(()=>this._changeDetectorRef.markForCheck()),t){let{pageSize:o,pageSizeOptions:n,hidePageSize:r,showFirstLastButtons:l}=t;o!=null&&(this._pageSize=o),n!=null&&(this._pageSizeOptions=n),r!=null&&(this.hidePageSize=r),l!=null&&(this.showFirstLastButtons=l)}this._formFieldAppearance=t?.formFieldAppearance||"outline"}ngOnInit(){this._isInitialized=!0,this._updateDisplayedPageSizeOptions(),this._initializedStream.next()}ngOnDestroy(){this._initializedStream.complete(),this._intlChanges.unsubscribe()}nextPage(){this.hasNextPage()&&this._navigate(this.pageIndex+1)}previousPage(){this.hasPreviousPage()&&this._navigate(this.pageIndex-1)}firstPage(){this.hasPreviousPage()&&this._navigate(0)}lastPage(){this.hasNextPage()&&this._navigate(this.getNumberOfPages()-1)}hasPreviousPage(){return this.pageIndex>=1&&this.pageSize!=0}hasNextPage(){let e=this.getNumberOfPages()-1;return this.pageIndex<e&&this.pageSize!=0}getNumberOfPages(){return this.pageSize?Math.ceil(this.length/this.pageSize):0}_changePageSize(e){let t=this.pageIndex*this.pageSize,o=this.pageIndex;this.pageIndex=Math.floor(t/e)||0,this.pageSize=e,this._emitPageEvent(o)}_nextButtonsDisabled(){return this.disabled||!this.hasNextPage()}_previousButtonsDisabled(){return this.disabled||!this.hasPreviousPage()}_updateDisplayedPageSizeOptions(){this._isInitialized&&(this.pageSize||(this._pageSize=this.pageSizeOptions.length!=0?this.pageSizeOptions[0]:si),this._displayedPageSizeOptions=this.pageSizeOptions.slice(),this._displayedPageSizeOptions.indexOf(this.pageSize)===-1&&this._displayedPageSizeOptions.push(this.pageSize),this._displayedPageSizeOptions.sort((e,t)=>e-t),this._changeDetectorRef.markForCheck())}_emitPageEvent(e){this.page.emit({previousPageIndex:e,pageIndex:this.pageIndex,pageSize:this.pageSize,length:this.length})}_navigate(e){let t=this.pageIndex;e!==t&&(this.pageIndex=e,this._emitPageEvent(t))}_buttonClicked(e,t){t||this._navigate(e)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=S({type:i,selectors:[["mat-paginator"]],hostAttrs:["role","group",1,"mat-mdc-paginator"],inputs:{color:"color",pageIndex:[2,"pageIndex","pageIndex",ce],length:[2,"length","length",ce],pageSize:[2,"pageSize","pageSize",ce],pageSizeOptions:"pageSizeOptions",hidePageSize:[2,"hidePageSize","hidePageSize",g],showFirstLastButtons:[2,"showFirstLastButtons","showFirstLastButtons",g],selectConfig:"selectConfig",disabled:[2,"disabled","disabled",g]},outputs:{page:"page"},exportAs:["matPaginator"],decls:14,vars:14,consts:[["selectRef",""],[1,"mat-mdc-paginator-outer-container"],[1,"mat-mdc-paginator-container"],[1,"mat-mdc-paginator-page-size"],[1,"mat-mdc-paginator-range-actions"],["aria-live","polite",1,"mat-mdc-paginator-range-label"],["matIconButton","","type","button","matTooltipPosition","above","disabledInteractive","",1,"mat-mdc-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","disabled","tabindex"],["matIconButton","","type","button","matTooltipPosition","above","disabledInteractive","",1,"mat-mdc-paginator-navigation-previous",3,"click","matTooltip","matTooltipDisabled","disabled","tabindex"],["viewBox","0 0 24 24","focusable","false","aria-hidden","true",1,"mat-mdc-paginator-icon"],["d","M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"],["matIconButton","","type","button","matTooltipPosition","above","disabledInteractive","",1,"mat-mdc-paginator-navigation-next",3,"click","matTooltip","matTooltipDisabled","disabled","tabindex"],["d","M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"],["matIconButton","","type","button","matTooltipPosition","above","disabledInteractive","",1,"mat-mdc-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","disabled","tabindex"],[1,"mat-mdc-paginator-page-size-label"],[1,"mat-mdc-paginator-page-size-select",3,"appearance","color"],[1,"mat-mdc-paginator-page-size-value"],["hideSingleSelectionIndicator","",3,"selectionChange","value","disabled","aria-labelledby","panelClass","disableOptionCentering"],[3,"value"],[1,"mat-mdc-paginator-touch-target",3,"click"],["matIconButton","","type","button","matTooltipPosition","above","disabledInteractive","",1,"mat-mdc-paginator-navigation-first",3,"click","matTooltip","matTooltipDisabled","disabled","tabindex"],["d","M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"],["matIconButton","","type","button","matTooltipPosition","above","disabledInteractive","",1,"mat-mdc-paginator-navigation-last",3,"click","matTooltip","matTooltipDisabled","disabled","tabindex"],["d","M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"]],template:function(t,o){t&1&&(u(0,"div",1)(1,"div",2),w(2,ii,5,4,"div",3),u(3,"div",4)(4,"div",5),$(5),f(),w(6,oi,3,5,"button",6),u(7,"button",7),z("click",function(){return o._buttonClicked(o.pageIndex-1,o._previousButtonsDisabled())}),U(),u(8,"svg",8),le(9,"path",9),f()(),qe(),u(10,"button",10),z("click",function(){return o._buttonClicked(o.pageIndex+1,o._nextButtonsDisabled())}),U(),u(11,"svg",8),le(12,"path",11),f()(),w(13,ai,3,5,"button",12),f()()()),t&2&&(m(2),v(o.hidePageSize?-1:2),m(3),ee(" ",o._intl.getRangeLabel(o.pageIndex,o.pageSize,o.length)," "),m(),v(o.showFirstLastButtons?6:-1),m(),V("matTooltip",o._intl.previousPageLabel)("matTooltipDisabled",o._previousButtonsDisabled())("disabled",o._previousButtonsDisabled())("tabindex",o._previousButtonsDisabled()?-1:null),P("aria-label",o._intl.previousPageLabel),m(3),V("matTooltip",o._intl.nextPageLabel)("matTooltipDisabled",o._nextButtonsDisabled())("disabled",o._nextButtonsDisabled())("tabindex",o._nextButtonsDisabled()?-1:null),P("aria-label",o._intl.nextPageLabel),m(3),v(o.showFirstLastButtons?13:-1))},dependencies:[bt,Rt,Ct,gt,kt],styles:[`.mat-mdc-paginator{display:block;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-paginator-container-text-color, var(--mat-sys-on-surface));background-color:var(--mat-paginator-container-background-color, var(--mat-sys-surface));font-family:var(--mat-paginator-container-text-font, var(--mat-sys-body-small-font));line-height:var(--mat-paginator-container-text-line-height, var(--mat-sys-body-small-line-height));font-size:var(--mat-paginator-container-text-size, var(--mat-sys-body-small-size));font-weight:var(--mat-paginator-container-text-weight, var(--mat-sys-body-small-weight));letter-spacing:var(--mat-paginator-container-text-tracking, var(--mat-sys-body-small-tracking));--mat-form-field-container-height: var(--mat-paginator-form-field-container-height, 40px);--mat-form-field-container-vertical-padding: var(--mat-paginator-form-field-container-vertical-padding, 8px)}.mat-mdc-paginator .mat-mdc-select-value{font-size:var(--mat-paginator-select-trigger-text-size, var(--mat-sys-body-small-size))}.mat-mdc-paginator .mat-mdc-form-field-subscript-wrapper{display:none}.mat-mdc-paginator .mat-mdc-select{line-height:1.5}.mat-mdc-paginator-outer-container{display:flex}.mat-mdc-paginator-container{display:flex;align-items:center;justify-content:flex-end;padding:0 8px;flex-wrap:wrap;width:100%;min-height:var(--mat-paginator-container-size, 56px)}.mat-mdc-paginator-page-size{display:flex;align-items:baseline;margin-right:8px}[dir=rtl] .mat-mdc-paginator-page-size{margin-right:0;margin-left:8px}.mat-mdc-paginator-page-size-label{margin:0 4px}.mat-mdc-paginator-page-size-select{margin:0 4px;width:84px}.mat-mdc-paginator-range-label{margin:0 32px 0 24px}.mat-mdc-paginator-range-actions{display:flex;align-items:center}.mat-mdc-paginator-icon{display:inline-block;width:28px;fill:var(--mat-paginator-enabled-icon-color, var(--mat-sys-on-surface-variant))}.mat-mdc-icon-button[aria-disabled] .mat-mdc-paginator-icon{fill:var(--mat-paginator-disabled-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}[dir=rtl] .mat-mdc-paginator-icon{transform:rotate(180deg)}@media(forced-colors: active){.mat-mdc-icon-button[aria-disabled] .mat-mdc-paginator-icon,.mat-mdc-paginator-icon{fill:currentColor}.mat-mdc-paginator-range-actions .mat-mdc-icon-button{outline:solid 1px}.mat-mdc-paginator-range-actions .mat-mdc-icon-button[aria-disabled]{color:GrayText}}.mat-mdc-paginator-touch-target{display:var(--mat-paginator-touch-target-display, block);position:absolute;top:50%;left:50%;width:84px;height:48px;background-color:rgba(0,0,0,0);transform:translate(-50%, -50%);cursor:pointer}
4
+ `],encapsulation:2,changeDetection:0})}return i})(),Eo=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=j({type:i});static \u0275inj=H({providers:[ri],imports:[_t,St,xt,ci]})}return i})();var di=["mat-sort-header",""],ui=["*"];function mi(i,a){i&1&&(ve(0,"div",2),U(),ve(1,"svg",3),ot(2,"path",4),De()())}var zt=new Q("MAT_SORT_DEFAULT_OPTIONS"),fi=(()=>{class i{_defaultOptions;_initializedStream=new fe(1);sortables=new Map;_stateChanges=new I;active;start="asc";get direction(){return this._direction}set direction(e){this._direction=e}_direction="";disableClear;disabled=!1;sortChange=new X;initialized=this._initializedStream;constructor(e){this._defaultOptions=e}register(e){this.sortables.set(e.id,e)}deregister(e){this.sortables.delete(e.id)}sort(e){this.active!=e.id?(this.active=e.id,this.direction=e.start?e.start:this.start):this.direction=this.getNextSortDirection(e),this.sortChange.emit({active:this.active,direction:this.direction})}getNextSortDirection(e){if(!e)return"";let t=e?.disableClear??this.disableClear??!!this._defaultOptions?.disableClear,o=hi(e.start||this.start,t),n=o.indexOf(this.direction)+1;return n>=o.length&&(n=0),o[n]}ngOnInit(){this._initializedStream.next()}ngOnChanges(){this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete(),this._initializedStream.complete()}static \u0275fac=function(t){return new(t||i)(Je(zt,8))};static \u0275dir=d({type:i,selectors:[["","matSort",""]],hostAttrs:[1,"mat-sort"],inputs:{active:[0,"matSortActive","active"],start:[0,"matSortStart","start"],direction:[0,"matSortDirection","direction"],disableClear:[2,"matSortDisableClear","disableClear",g],disabled:[2,"matSortDisabled","disabled",g]},outputs:{sortChange:"matSortChange"},exportAs:["matSort"],features:[K]})}return i})();function hi(i,a){let e=["asc","desc"];return i=="desc"&&e.reverse(),a||e.push(""),e}var Fe=(()=>{class i{changes=new I;static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function pi(i){return i||new Fe}var gi={provide:Fe,deps:[[new ye,new we,Fe]],useFactory:pi},Ko=(()=>{class i{_intl=s(Fe);_sort=s(fi,{optional:!0});_columnDef=s("MAT_SORT_HEADER_COLUMN_DEF",{optional:!0});_changeDetectorRef=s(te);_focusMonitor=s(ct);_elementRef=s(T);_ariaDescriber=s(mt,{optional:!0});_renderChanges;_animationsDisabled=ht();_recentlyCleared=Xe(null);_sortButton;id;arrowPosition="after";start;disabled=!1;get sortActionDescription(){return this._sortActionDescription}set sortActionDescription(e){this._updateSortActionDescription(e)}_sortActionDescription="Sort";disableClear;constructor(){s(dt).load(pt);let e=s(zt,{optional:!0});this._sort,e?.arrowPosition&&(this.arrowPosition=e?.arrowPosition)}ngOnInit(){!this.id&&this._columnDef&&(this.id=this._columnDef.name),this._sort.register(this),this._renderChanges=ae(this._sort._stateChanges,this._sort.sortChange).subscribe(()=>this._changeDetectorRef.markForCheck()),this._sortButton=this._elementRef.nativeElement.querySelector(".mat-sort-header-container"),this._updateSortActionDescription(this._sortActionDescription)}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(()=>this._recentlyCleared.set(null))}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._sort.deregister(this),this._renderChanges?.unsubscribe(),this._sortButton&&this._ariaDescriber?.removeDescription(this._sortButton,this._sortActionDescription)}_toggleOnInteraction(){if(!this._isDisabled()){let e=this._isSorted(),t=this._sort.direction;this._sort.sort(this),this._recentlyCleared.set(e&&!this._isSorted()?t:null)}}_handleKeydown(e){(e.keyCode===32||e.keyCode===13)&&(e.preventDefault(),this._toggleOnInteraction())}_isSorted(){return this._sort.active==this.id&&(this._sort.direction==="asc"||this._sort.direction==="desc")}_isDisabled(){return this._sort.disabled||this.disabled}_getAriaSortAttribute(){return this._isSorted()?this._sort.direction=="asc"?"ascending":"descending":"none"}_renderArrow(){return!this._isDisabled()||this._isSorted()}_updateSortActionDescription(e){this._sortButton&&(this._ariaDescriber?.removeDescription(this._sortButton,this._sortActionDescription),this._ariaDescriber?.describe(this._sortButton,e)),this._sortActionDescription=e}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=S({type:i,selectors:[["","mat-sort-header",""]],hostAttrs:[1,"mat-sort-header"],hostVars:3,hostBindings:function(t,o){t&1&&z("click",function(){return o._toggleOnInteraction()})("keydown",function(r){return o._handleKeydown(r)})("mouseleave",function(){return o._recentlyCleared.set(null)}),t&2&&(P("aria-sort",o._getAriaSortAttribute()),Y("mat-sort-header-disabled",o._isDisabled()))},inputs:{id:[0,"mat-sort-header","id"],arrowPosition:"arrowPosition",start:"start",disabled:[2,"disabled","disabled",g],sortActionDescription:"sortActionDescription",disableClear:[2,"disableClear","disableClear",g]},exportAs:["matSortHeader"],attrs:di,ngContentSelectors:ui,decls:4,vars:17,consts:[[1,"mat-sort-header-container","mat-focus-indicator"],[1,"mat-sort-header-content"],[1,"mat-sort-header-arrow"],["viewBox","0 -960 960 960","focusable","false","aria-hidden","true"],["d","M440-240v-368L296-464l-56-56 240-240 240 240-56 56-144-144v368h-80Z"]],template:function(t,o){t&1&&(J(),ve(0,"div",0)(1,"div",1),E(2),De(),w(3,mi,3,0,"div",2),De()),t&2&&(Y("mat-sort-header-sorted",o._isSorted())("mat-sort-header-position-before",o.arrowPosition==="before")("mat-sort-header-descending",o._sort.direction==="desc")("mat-sort-header-ascending",o._sort.direction==="asc")("mat-sort-header-recently-cleared-ascending",o._recentlyCleared()==="asc")("mat-sort-header-recently-cleared-descending",o._recentlyCleared()==="desc")("mat-sort-header-animations-disabled",o._animationsDisabled),P("tabindex",o._isDisabled()?null:0)("role",o._isDisabled()?null:"button"),m(3),v(o._renderArrow()?3:-1))},styles:[`.mat-sort-header{cursor:pointer}.mat-sort-header-disabled{cursor:default}.mat-sort-header-container{display:flex;align-items:center;letter-spacing:normal;outline:0}[mat-sort-header].cdk-keyboard-focused .mat-sort-header-container,[mat-sort-header].cdk-program-focused .mat-sort-header-container{border-bottom:solid 1px currentColor}.mat-sort-header-container::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-sort-header-content{display:flex;align-items:center}.mat-sort-header-position-before{flex-direction:row-reverse}@keyframes _mat-sort-header-recently-cleared-ascending{from{transform:translateY(0);opacity:1}to{transform:translateY(-25%);opacity:0}}@keyframes _mat-sort-header-recently-cleared-descending{from{transform:translateY(0) rotate(180deg);opacity:1}to{transform:translateY(25%) rotate(180deg);opacity:0}}.mat-sort-header-arrow{height:12px;width:12px;position:relative;transition:transform 225ms cubic-bezier(0.4, 0, 0.2, 1),opacity 225ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0;overflow:visible;color:var(--mat-sort-arrow-color, var(--mat-sys-on-surface))}.mat-sort-header.cdk-keyboard-focused .mat-sort-header-arrow,.mat-sort-header.cdk-program-focused .mat-sort-header-arrow,.mat-sort-header:hover .mat-sort-header-arrow{opacity:.54}.mat-sort-header .mat-sort-header-sorted .mat-sort-header-arrow{opacity:1}.mat-sort-header-descending .mat-sort-header-arrow{transform:rotate(180deg)}.mat-sort-header-recently-cleared-ascending .mat-sort-header-arrow{transform:translateY(-25%)}.mat-sort-header-recently-cleared-ascending .mat-sort-header-arrow{transition:none;animation:_mat-sort-header-recently-cleared-ascending 225ms cubic-bezier(0.4, 0, 0.2, 1) forwards}.mat-sort-header-recently-cleared-descending .mat-sort-header-arrow{transition:none;animation:_mat-sort-header-recently-cleared-descending 225ms cubic-bezier(0.4, 0, 0.2, 1) forwards}.mat-sort-header-animations-disabled .mat-sort-header-arrow{transition-duration:0ms;animation-duration:0ms}.mat-sort-header-arrow svg{width:24px;height:24px;fill:currentColor;position:absolute;top:50%;left:50%;margin:-12px 0 0 -12px;transform:translateZ(0)}.mat-sort-header-arrow,[dir=rtl] .mat-sort-header-position-before .mat-sort-header-arrow{margin:0 0 0 6px}.mat-sort-header-position-before .mat-sort-header-arrow,[dir=rtl] .mat-sort-header-arrow{margin:0 6px 0 0}
5
+ `],encapsulation:2,changeDetection:0})}return i})(),Zo=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=j({type:i});static \u0275inj=H({providers:[gi],imports:[de]})}return i})();export{eo as a,to as b,io as c,oo as d,ao as e,no as f,ro as g,so as h,lo as i,co as j,uo as k,mo as l,Pt as m,ci as n,Eo as o,fi as p,Ko as q,Zo as r};