@duplicati/ngclient 0.0.179 → 0.0.182
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.
- package/assets/dest-icons/internxt.png +0 -0
- package/chunk-2JD6CIZ4.js +1 -0
- package/chunk-2PAQOFN3.js +1 -0
- package/chunk-2QP2Y5QS.js +1 -0
- package/chunk-2XXH473G.js +1 -0
- package/chunk-3BGJPVDV.js +1 -0
- package/{chunk-JSYVSJJU.js → chunk-3U36LG4E.js} +1 -1
- package/{chunk-66GTW6AR.js → chunk-44TUAFTV.js} +1 -1
- package/{chunk-WGXHTY3T.js → chunk-4BAHV6VO.js} +1 -1
- package/{chunk-MVPMVVRC.js → chunk-4N3AWKEK.js} +1 -1
- package/chunk-4NN5ZM73.js +1 -0
- package/chunk-4QGMMHYT.js +1 -0
- package/chunk-4VEFX5WQ.js +2 -0
- package/{chunk-WILUKPQ3.js → chunk-5DJAX2HH.js} +1 -1
- package/{chunk-6KSFCVWH.js → chunk-5JYCHNFV.js} +1 -1
- package/{chunk-JKDYRSAH.js → chunk-5QAV2WXY.js} +1 -1
- package/chunk-5QZIKR6A.js +1 -0
- package/{chunk-SYMBRSKN.js → chunk-5YSRDRTE.js} +1 -1
- package/{chunk-L37SKX3M.js → chunk-6AJQBDVV.js} +1 -1
- package/{chunk-RIVMPP47.js → chunk-6ALGXRIS.js} +1 -1
- package/chunk-6GC4UPHS.js +1 -0
- package/{chunk-6KLZAB4D.js → chunk-7XS6T6TX.js} +1 -1
- package/{chunk-GO4NSDR6.js → chunk-A4LPGPDU.js} +1 -1
- package/chunk-AABUGLWU.js +1 -0
- package/{chunk-T5LLH46J.js → chunk-AS6Z56AD.js} +1 -1
- package/{chunk-GH6EHG4Z.js → chunk-B2Y54P3R.js} +1 -1
- package/{chunk-BKANUILG.js → chunk-BGTK25UG.js} +1 -1
- package/{chunk-OWEK4OHZ.js → chunk-CR3C6XYB.js} +1 -1
- package/{chunk-U5GRFEV3.js → chunk-DI73L7JI.js} +1 -1
- package/{chunk-FBWFZMGL.js → chunk-DW332N2S.js} +1 -1
- package/{chunk-DNNNVTJK.js → chunk-EBQRGLJL.js} +1 -1
- package/{chunk-6AX4L2U5.js → chunk-ETAHWUMY.js} +1 -1
- package/{chunk-U63HBLGG.js → chunk-FK7JFD5B.js} +1 -1
- package/{chunk-AJXTVI3H.js → chunk-FOQJA6X2.js} +1 -1
- package/{chunk-TOB4ESNO.js → chunk-FQYMMYS4.js} +1 -1
- package/{chunk-6Y3RYZEE.js → chunk-FQZFKTPW.js} +1 -1
- package/chunk-H4TNKM4Y.js +1 -0
- package/chunk-HPNLQHW6.js +1 -0
- package/{chunk-EIZKIIDW.js → chunk-HSUSP2MR.js} +1 -1
- package/{chunk-DV67LYLW.js → chunk-IW4RDAIN.js} +2 -2
- package/{chunk-2LAZMIL4.js → chunk-JGQOVZKK.js} +1 -1
- package/{chunk-T7XH5JIZ.js → chunk-JJJ5UALU.js} +1 -1
- package/{chunk-FEBDZE5A.js → chunk-JW4235US.js} +1 -1
- package/{chunk-SD4AWG7T.js → chunk-JWO4FPWJ.js} +1 -1
- package/{chunk-D7TCA6E7.js → chunk-KRXQDBGB.js} +1 -1
- package/{chunk-XECFWVLT.js → chunk-KSMDO4WE.js} +1 -1
- package/{chunk-D47P7LFF.js → chunk-LDLSFKM4.js} +1 -1
- package/{chunk-LVPZTSKG.js → chunk-LFISHZZP.js} +1 -1
- package/{chunk-2U23BDRP.js → chunk-LMCAVLBO.js} +1 -1
- package/{chunk-55RRXYNB.js → chunk-LX37357J.js} +1 -1
- package/{chunk-AGPZBYW6.js → chunk-ME77WZZI.js} +1 -1
- package/{chunk-TJYZBTTS.js → chunk-MHRECQ5Y.js} +1 -1
- package/chunk-MRAKGZE6.js +1 -0
- package/{chunk-FHO4PDLK.js → chunk-MXH4QJKB.js} +1 -1
- package/{chunk-WPT4ETG3.js → chunk-NDPFWL4Y.js} +1 -1
- package/{chunk-PTSGXV6M.js → chunk-NJ2XZSM6.js} +1 -1
- package/{chunk-GMNCWLGX.js → chunk-O4OTZE5N.js} +1 -1
- package/chunk-OTPG7USH.js +1 -0
- package/{chunk-7XLQX4B6.js → chunk-PAMKTLG5.js} +1 -1
- package/chunk-PCFTQ4BE.js +1 -0
- package/{chunk-56FBKSBN.js → chunk-PKPBSTZA.js} +1 -1
- package/{chunk-C6LHWLWL.js → chunk-PUV7YKEQ.js} +1 -1
- package/chunk-QG566HCB.js +1 -0
- package/{chunk-HPU4SX5Z.js → chunk-QHQQ5BDV.js} +1 -1
- package/{chunk-FIBRO5I3.js → chunk-QPTSKQZ2.js} +2 -2
- package/{chunk-CGKL2MHM.js → chunk-QZRRXR3V.js} +1 -1
- package/{chunk-4F7BBMQ2.js → chunk-RXVG6AZW.js} +1 -1
- package/chunk-SBWCJMHH.js +1 -0
- package/chunk-SFR3XMV4.js +1 -0
- package/chunk-T2WO6CVD.js +4 -0
- package/{chunk-CHUTAXTB.js → chunk-T7WSF7RL.js} +1 -1
- package/{chunk-2HZ7VZ3D.js → chunk-TEGY2W63.js} +1 -1
- package/{chunk-NEV6JB5M.js → chunk-TELPJYLN.js} +1 -1
- package/chunk-TT3S63BX.js +1 -0
- package/{chunk-6WVN2KRC.js → chunk-TT4FAVLM.js} +1 -1
- package/{chunk-OC3JR7EH.js → chunk-VEWX3KXN.js} +1 -1
- package/{chunk-LF24JF3M.js → chunk-VHOAXFIJ.js} +1 -1
- package/chunk-VW35MTSI.js +1 -0
- package/{chunk-FXF5TO2Q.js → chunk-VYJNNEM5.js} +1 -1
- package/chunk-WIVARGP6.js +1 -0
- package/{chunk-3CCAGUTG.js → chunk-XADL5RYU.js} +1 -1
- package/{chunk-IQI7X3JY.js → chunk-XKHIN6T2.js} +1 -1
- package/{chunk-WA7KEG63.js → chunk-XZ35H3QB.js} +1 -1
- package/chunk-XZ37OAYY.js +1 -0
- package/chunk-YDDSLDHZ.js +1 -0
- package/chunk-YEYDDZIG.js +1 -0
- package/{chunk-HEV3WHAH.js → chunk-YV32N6PE.js} +1 -1
- package/chunk-ZHTPSBYJ.js +1 -0
- package/{chunk-IH4WNUW5.js → chunk-ZXVCNNR6.js} +1 -1
- package/index.html +1 -1
- package/main-RYFYCW3E.js +1 -0
- package/package.json +1 -1
- package/chunk-3CJTIOP4.js +0 -1
- package/chunk-4JVBYGOM.js +0 -1
- package/chunk-6GJYSOXJ.js +0 -1
- package/chunk-AYN5EDSZ.js +0 -1
- package/chunk-B5LH4P4E.js +0 -1
- package/chunk-BGYXB4MY.js +0 -1
- package/chunk-BUO6CCKF.js +0 -1
- package/chunk-CM6KCZ6Q.js +0 -1
- package/chunk-FCCYQZ63.js +0 -1
- package/chunk-HC6NRM4H.js +0 -1
- package/chunk-HDM6ELAR.js +0 -1
- package/chunk-HGZYRAXZ.js +0 -1
- package/chunk-I77LGXJN.js +0 -2
- package/chunk-IE7RK4YW.js +0 -1
- package/chunk-JRFX5D6S.js +0 -1
- package/chunk-JRMY6F6W.js +0 -1
- package/chunk-LUQFHR44.js +0 -1
- package/chunk-PF2QQ2YW.js +0 -1
- package/chunk-PNYEL323.js +0 -1
- package/chunk-QF5K4MHH.js +0 -1
- package/chunk-QNZTEY37.js +0 -1
- package/chunk-QWNOPLJC.js +0 -1
- package/chunk-RMOTUTEQ.js +0 -1
- package/chunk-RYXU2QDS.js +0 -1
- package/chunk-UTLK72CH.js +0 -1
- package/chunk-VYIUFXYO.js +0 -1
- package/chunk-XYHHESIX.js +0 -4
- package/main-CMSRKMLS.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as _e}from"./chunk-
|
|
1
|
+
import{a as _e}from"./chunk-4VEFX5WQ.js";import{a as le}from"./chunk-AS6Z56AD.js";import"./chunk-IW4RDAIN.js";import{j as ae}from"./chunk-XADL5RYU.js";import"./chunk-O4OTZE5N.js";import{a as ie,b as oe,c as se}from"./chunk-WIVARGP6.js";import"./chunk-MHRECQ5Y.js";import"./chunk-6Q6SSTBK.js";import"./chunk-5DJAX2HH.js";import"./chunk-6ALGXRIS.js";import"./chunk-DW332N2S.js";import"./chunk-AABUGLWU.js";import"./chunk-TELPJYLN.js";import"./chunk-5QZIKR6A.js";import{B as ee,H as ne,P as te,c as H,e as q,i as Y,k as j,s as Q,u as Z}from"./chunk-HPNLQHW6.js";import"./chunk-BGTK25UG.js";import{b as W,d as V}from"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{$ as N,Ab as o,Bb as m,Ib as h,Mc as J,Pa as c,Pb as S,Qb as C,Rb as r,Sc as X,Vb as I,W as g,Xb as p,aa as P,cb as z,cc as v,dc as x,gc as K,la as B,oc as u,pc as d,qc as T,sb as E,tb as f,xc as U,yb as O,zb as t}from"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";var re=["formRef"],ce=()=>["--skip-files-larger-than","dblock-size","encryption-module","no-encryption","--no-encryption","compression-module","--exclude-files-attributes","keep-time","keep-versions","retention-policy"];function pe(a,l){a&1&&(S(0,1,1),m(1,"sh-icon",20),C())}function ue(a,l){a&1&&(t(0,"p",21),r(1,6),o())}function de(a,l){a&1&&(t(0,"p"),r(1,7),o())}function Te(a,l){if(a&1){let n=h();t(0,"p"),r(1,8),o(),t(2,"app-timespan",18),T("ngModelChange",function(s){N(n);let i=p();return d(i.optionsFields.backupRetentionTime,s)||(i.optionsFields.backupRetentionTime=s),P(s)}),t(3,"label",30),r(4,9),o()()}if(a&2){let n=p();c(2),O("customId","backupRetentionTime"),u("ngModel",n.optionsFields.backupRetentionTime)}}function Se(a,l){if(a&1){let n=h();t(0,"p"),r(1,10),o(),t(2,"sh-form-field")(3,"label",31),r(4,11),o(),t(5,"input",32),T("ngModelChange",function(s){N(n);let i=p();return d(i.optionsFields.backupRetentionVersions,s)||(i.optionsFields.backupRetentionVersions=s),P(s)}),o()()}if(a&2){let n=p();c(5),u("ngModel",n.optionsFields.backupRetentionVersions)}}function Ce(a,l){a&1&&(t(0,"p"),r(1,12),o())}function Oe(a,l){if(a&1){let n=h();t(0,"p"),r(1,13),o(),t(2,"sh-form-field")(3,"p"),r(4,14),o(),t(5,"label",33),r(6,15),o(),t(7,"input",34),T("ngModelChange",function(s){N(n);let i=p();return d(i.optionsFields.backupRetentionCustom,s)||(i.optionsFields.backupRetentionCustom=s),P(s)}),o()()}if(a&2){let n=p();c(7),u("ngModel",n.optionsFields.backupRetentionCustom)}}var me=[{value:"all",name:$localize`Keep all backups`},{value:"time",name:$localize`Delete backups that are older than`},{value:"versions",name:$localize`Keep a specific number of backups`},{value:"smart",name:$localize`Smart backup retention`},{value:"custom",name:$localize`Custom backup retention`}],ge=1024*1024*1024*2,Ne=1024*1024*5,F=class a{#e=g(ae);#n=g(V);#t=g(W);formRef=X.required("formRef");isSubmitting=this.#e.isSubmitting;settings=this.#e.settings;optionsFields=this.#e.optionsFields;applicationOptions=this.#e.applicationOptions;retentionOptions=B(me);exceededVolumeSize=J(()=>{let{size:l,unit:n}=oe(this.optionsFields.remoteVolumeSize());if(l==null||n===null||n===void 0)return!1;let e=l*Math.pow(1024,ie.findIndex(s=>s.value===n));return e>ge||e<Ne});goBack(){this.#n.navigate(["schedule"],{relativeTo:this.#t.parent})}submit(){this.#e.submit()}static \u0275fac=function(n){return new(n||a)};static \u0275cmp=z({type:a,selectors:[["app-advanced-options-settings"]],viewQuery:function(n,e){n&1&&v(e.formRef,re,5),n&2&&x()},decls:30,vars:16,consts:()=>{let l;l=$localize`Options`;let n;n=$localize` Remote volume size ${"\uFFFD*7:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#1:1\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*7:1\uFFFD"}:CLOSE_BLOCK_IF:`;let e;e=$localize` The backups will be split up into multiple files called volumes. Here you can set the maximum size of the individual volume files. ${"\uFFFD#11\uFFFD"}:START_LINK: Read more ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-square-out${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#11\uFFFD"}:CLOSE_LINK:`;let s;s=$localize`Backup retention`;let i;i=$localize`${"\uFFFD#26\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#26\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let M;M=$localize`${"\uFFFD#29\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#29\uFFFD"}:CLOSE_TAG_SH_ICON: Submit `;let R;R=$localize` The chosen size is outside the recommended range. This may cause performance issues, excessively large temporary files or other problems. `;let A;A=$localize`Nothing will be deleted. The backup size will grow with each change.`;let b;b=$localize`If at least one newer backup is found, all backups older than this date are deleted.`;let y;y=$localize`Time to keep versions`;let $;$=$localize`Once there are more backups than the specified number, the oldest backups are deleted.`;let k;k=$localize`Number of versions`;let L;L=$localize` Over time backups will be deleted automatically. There will remain one backup for each of the last 7 days, each of the last 4 weeks, each of the last 12 months. There will always be at least one remaining backup. `;let w;w=$localize` Enter a retention strategy manually. Placeholders are D/W/Y for days/weeks/years and U for unlimited. The syntax is: 7D:1D,4W:1W,36M:1M. This example keeps one backup for each of the next 7 days, one for each of the next 4 weeks, and one for each of the next 36 months. This can also be written as 1W:1D,1M:1W,3Y:1M. `;let G;G=$localize`Once there are more backups than the specified number, the oldest backups are deleted.`;let D;return D=$localize`Retention expression`,[l,n,e,s,i,M,R,A,b,y,$,k,L,w,G,D,[1,"title-30"],[1,"remote-volume-wrap"],[3,"ngModelChange","customId","ngModel"],["for","size"],[1,"warning"],[1,"warn"],["href","https://forum.duplicati.com/t/choosing-sizes-in-duplicati/17683","target","_blank",1,"sh-primary"],["suffix",""],["value","value","label","name",3,"options","inlineSearch","isClearable"],["type","text",3,"ngModelChange","ngModel"],[3,"optionsChange","options","applicationOptions","hasFreeTextSettings","hiddenOptions"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","",1,"raised","primary",3,"click"],["for","backupRetentionTime"],["for","backupRetentionVersions"],["type","number","id","backupRetentionVersions",3,"ngModelChange","ngModel"],["for","backupRetentionCustom"],["type","text","id","backupRetentionCustom",3,"ngModelChange","ngModel"]]},template:function(n,e){n&1&&(t(0,"section")(1,"h3",16),r(2,0),o(),t(3,"div",17)(4,"app-size",18),T("ngModelChange",function(i){return d(e.optionsFields.remoteVolumeSize,i)||(e.optionsFields.remoteVolumeSize=i),i}),t(5,"label",19),S(6,1),E(7,pe,2,0,"sh-icon",20),C(),o()(),E(8,ue,2,0,"p",21),t(9,"p"),S(10,2),t(11,"a",22),m(12,"sh-icon",23),o(),C(),o()(),t(13,"sh-select",24)(14,"label",19),r(15,3),o(),t(16,"input",25),T("ngModelChange",function(i){return d(e.optionsFields.backupRetention,i)||(e.optionsFields.backupRetention=i),i}),o()(),E(17,de,2,0,"p")(18,Te,5,2)(19,Se,6,1)(20,Ce,2,0,"p")(21,Oe,8,1),t(22,"app-options-list",26),T("optionsChange",function(i){return d(e.settings,i)||(e.settings=i),i}),o(),t(23,"div",27)(24,"button",28),I("click",function(){return e.goBack()}),S(25,4),m(26,"sh-icon"),C(),o(),t(27,"button",29),I("click",function(){return e.submit()}),S(28,5),m(29,"sh-icon"),C(),o()()()),n&2&&(c(4),O("customId","size"),u("ngModel",e.optionsFields.remoteVolumeSize),c(3),f(e.exceededVolumeSize()?7:-1),c(),f(e.exceededVolumeSize()?8:-1),c(5),O("options",e.retentionOptions())("inlineSearch",!0)("isClearable",!1),c(3),u("ngModel",e.optionsFields.backupRetention),c(),f(e.optionsFields.backupRetention()==="all"?17:e.optionsFields.backupRetention()==="time"?18:e.optionsFields.backupRetention()==="versions"?19:e.optionsFields.backupRetention()==="smart"?20:e.optionsFields.backupRetention()==="custom"?21:-1),c(5),u("options",e.settings),O("applicationOptions",e.applicationOptions())("hasFreeTextSettings",!0)("hiddenOptions",U(15,ce)),c(5),K("loader",e.isSubmitting()))},dependencies:[Q,H,j,q,Y,_e,se,le,ee,Z,te,ne],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:37.5rem;padding:2.5rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 2.5rem;align-items:flex-end}sh-select[_ngcontent-%COMP%]{--miw: p2r(120)}"],changeDetection:0})};export{F as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as b,c as _}from"./chunk-BGTK25UG.js";import{d as T}from"./chunk-A4LPGPDU.js";import{a as y,d as O}from"./chunk-QPTSKQZ2.js";import{ua as P,va as o}from"./chunk-OTPG7USH.js";import{C as l,E as N,M as g,R as a,W as i,f as I,i as S,l as E,la as n,p as R,wa as v,z as A}from"./chunk-T2WO6CVD.js";var c=class r{platformId=i(v);STORAGE_VERSION="v1";APP_NAME="duplicati";PERSISTED_PREFIX="persist:";getItemParsed(e,t=!1){return o(this.platformId)?null:JSON.parse(localStorage.getItem(`${this.STORAGE_VERSION}:${t?this.PERSISTED_PREFIX:""}${this.APP_NAME}:${e}`)??"null")}setItemParsed(e,t,s=!1){if(!o(this.platformId))return localStorage.setItem(`${this.STORAGE_VERSION}:${s?this.PERSISTED_PREFIX:""}${this.APP_NAME}:${e}`,JSON.stringify(t))}get length(){return P(this.platformId)?localStorage.length:0}getItem(e){return o(this.platformId)?null:localStorage.getItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${e}`)??null}setItem(e,t){if(!o(this.platformId))return localStorage.setItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${e}`,t)}removeItem(e){o(this.platformId)||(localStorage.removeItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${e}`),localStorage.removeItem(`${this.STORAGE_VERSION}:${this.PERSISTED_PREFIX}${this.APP_NAME}:${e}`))}clearAllNotCurrentVersion(){if(!o(this.platformId))for(var e in localStorage)!e.startsWith(this.STORAGE_VERSION)&&e.includes(this.APP_NAME)&&localStorage.removeItem(e)}clearAll(){o(this.platformId)||localStorage.clear()}clear(){if(!o(this.platformId))for(var e in localStorage)e.includes(this.APP_NAME)&&!e.includes(this.PERSISTED_PREFIX)&&localStorage.removeItem(e)}key(e){return o(this.platformId)?null:localStorage.key(e)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=a({token:r,factory:r.\u0275fac})};var f=class r{#i=i(c);#r=n(null);#t=window.self!==window.top;#s=n(this.#t);relayIsEnabled=this.#s.asReadonly();config=this.#r.asReadonly();configLoaded=this.#t?new S:null;isLoading=n(this.#t);parentIframeListner=null;parentOrigin="*";fetchConfig(){this.#o(),this.#t&&(this.#s.set(!0),this.parentIframeListner=new AbortController,this.#e("connected"),window.addEventListener("message",e=>{if(e.data.startsWith("access:")){let t=e.data.replace("access:",""),s=JSON.parse(t);if(!s?.accessToken||!s?.clientId){this.#e("error:invalid-config"),this.#s.set(!1);return}if(typeof s.clientId!="string"){this.#e("error:invalid-config"),this.#s.set(!1);return}if(typeof s.accessToken!="string"){this.#e("error:invalid-config"),this.#s.set(!1);return}let m=this.#i.getItem("locale")??"en-US",p=s.locale??"en-US";m!==p&&(this.#i.setItem("locale",p),window.location.reload()),this.#r.set(s),this.configLoaded?.next(!0),this.isLoading.set(!1),this.#e("handshake-complete")}},{signal:this.parentIframeListner.signal}))}#e(e){window.parent.postMessage(e,"*")}#o(){this.parentIframeListner&&(this.parentIframeListner.abort(),this.parentIframeListner=null)}setConfig(e){this.#r.set(e)}clearConfig(){this.#r.set(null)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=a({token:r,factory:r.\u0275fac,providedIn:"root"})};var u="PROXY_AUTHED_FAKE_TOKEN",h="refreshNonce",d="v1:persist:duplicati:refreshNonce",k=class r{#i=i(T);#r=i(O);#t=i(_);#s=i(f);#e=n(null);#o=n(!1);token=this.#e.asReadonly();isLoggingOut=this.#o.asReadonly();setRefreshNonce(e,t){if(!e){sessionStorage.removeItem(h);return}t?localStorage.setItem(d,e||""):sessionStorage.setItem(h,e||"")}getRefreshNonceBody(){let e=sessionStorage.getItem(h),t=localStorage.getItem(d),s=e||t;return{requestBody:s?{requestBody:{Nonce:s}}:void 0,local:s===t}}login(e,t){return this.#t.postApiV1AuthLogin({requestBody:{Password:e,RememberMe:t}}).pipe(l(1),g(s=>{s.AccessToken?(this.#e.set(s.AccessToken),this.setRefreshNonce(s.RefreshNonce,t)):this.#e.set(null)}))}refreshToken(){if(this.#s.relayIsEnabled())return this.#e.set(u),new I(s=>{s.next({AccessToken:u}),s.complete()});let{requestBody:e,local:t}=this.getRefreshNonceBody();return this.#t.postApiV1AuthRefresh(e).pipe(l(1),g(s=>{s.AccessToken&&(this.#e.set(s.AccessToken),this.setRefreshNonce(s.RefreshNonce,t))}))}checkProxyAuthed(){let e=new y({"custom-proxy-check":"true"}),t=b.BASE||"";return this.#r.get(`${t}/api/v1/systeminfo`,{headers:e}).pipe(R(()=>(this.#e.set(u),!0)),A(()=>E(!1)))}logout(){this.#o.set(!0);let{requestBody:e,local:t}=this.getRefreshNonceBody();sessionStorage.removeItem(h),t&&localStorage.removeItem(d),this.#t.postApiV1AuthRefreshLogout(e).pipe(l(1),N(()=>{this.#o.set(!1),this.#e.set(null),this.#i.navigate(["/login"])})).subscribe()}static \u0275fac=function(t){return new(t||r)};static \u0275prov=a({token:r,factory:r.\u0275fac,providedIn:"root"})};export{c as a,f as b,u as c,k as d};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Gt}from"./chunk-
|
|
1
|
+
import{a as Gt}from"./chunk-AS6Z56AD.js";import{a as yt,b as Re,c as Ot,d as Ft,e as At,f as wt,h as Mt,i as Lt,j as Pt}from"./chunk-IW4RDAIN.js";import{j as $t}from"./chunk-XADL5RYU.js";import{c as vt,d as Vt}from"./chunk-WIVARGP6.js";import{a as Dt}from"./chunk-LFISHZZP.js";import{a as U}from"./chunk-5DJAX2HH.js";import{a as xt}from"./chunk-6ALGXRIS.js";import{a as Et,b as It}from"./chunk-DW332N2S.js";import{a as ue}from"./chunk-TELPJYLN.js";import{B as Ce,C as pt,E as mt,H as Pe,K as Ct,L as ut,O as gt,P as Tt,V as ft,W as St,Y as Nt,a as st,c as se,e as de,i as ce,k as dt,s as pe,t as ct,u as me,z as Le}from"./chunk-HPNLQHW6.js";import{c as ht}from"./chunk-BGTK25UG.js";import{e as _t}from"./chunk-A4LPGPDU.js";import{_ as rt}from"./chunk-OTPG7USH.js";import{$ as f,Ab as d,Ac as Me,Bb as R,D as He,E as $e,Fb as xe,Gb as fe,Gc as oe,Hb as P,Ib as E,K as je,M as qe,Ma as Qe,Mc as $,Pa as r,Pb as H,Qb as j,Qc as ot,R as Ie,Rb as _e,Rc as ae,Sc as at,Ub as Ye,Uc as lt,Vb as h,W as w,Xb as l,Yb as De,Zb as ye,aa as S,cb as Z,cc as Ze,da as We,dc as et,ec as y,f as Ee,fc as tt,gc as Oe,hb as x,jc as m,kc as nt,l as Je,la as k,lc as A,mc as Se,na as Te,oc as Fe,p as Xe,pc as Ae,qc as we,rc as X,sb as u,sc as M,tb as g,tc as p,ub as te,uc as Ge,wb as ne,wc as it,xb as ie,xc as be,yb as c,yc as v,zb as s,zc as B}from"./chunk-T2WO6CVD.js";import{a as z,b as he}from"./chunk-7CGTOI24.js";var bt=class n{#e=w(ht);#t=w(Le);#n=w(ue);testDestination(t,e,o,i,a){return this.#n.hasV2TestOperations()?this.testDestinationv2(t,e,o,i,a):this.testDestinationv1(t,e,o,i,a)}testDestinationv2(t,e,o,i,a){return new Ee(_=>{this.#e.postApiV2DestinationTest({requestBody:{DestinationUrl:t,BackupId:e=="new"?null:e,AutoCreate:!1,Options:null}}).subscribe({next:C=>{if(C.Success){this.emitSuccessV2(_,t,o,C);return}this.handleGenericError(_,t,o,C.Error??"Unknown error",a)},error:C=>{let N=C?.error?.body??C?.error?.requestBody;if(N?.Data?.FolderExists===!1||N?.StatusCode==="missing-folder"){i?this.handleMissingFolder(_,t,o):this.handleGenericError(_,t,o,$localize`The remote destination folder does not exist.`,a);return}if(N?.Data?.HostCertificate){this.handleMissingCertificate(_,t,o,N.Data?.HostCertificate);return}if(N?.Data?.ReportedHostKey){this.handleIncorrectKey(_,t,o,N.Data.ReportedHostKey,N.Data.AcceptedHostKey??null);return}this.handleGenericError(_,t,o,C?.message??"Unknown error",a)}})})}testDestinationv1(t,e,o,i,a){return new Ee(_=>{this.#e.postApiV1RemoteoperationTest({requestBody:{path:t,backupId:e=="new"?null:e}}).subscribe({next:C=>{_.next({action:"success",targetUrl:t,testAgain:!1,destinationIndex:o}),_.complete()},error:C=>{this.handleDestinationErrorv1(C.message,t,o,i,a).subscribe(N=>{_.next(N)})}})})}handleMissingFolder(t,e,o){this.#t.open(U,{data:{title:$localize`Create folder`,message:$localize`The remote destination folder does not exist, do you want to create it?`,confirmText:$localize`Create folder`,cancelText:$localize`Cancel`},closed:i=>{if(!i){this.reportNoAction(t,e,o,$localize`The remote folder does not exist.`);return}this.#n.hasV2TestOperations()?this.#e.postApiV2DestinationTest({requestBody:{DestinationUrl:e,AutoCreate:!0,Options:null}}).subscribe({next:a=>{if(a.Success){this.emitSuccessV2(t,e,o,a);return}else this.handleFolderCreateFailure(t,e,o,a.Error??$localize`Unknown error`)},error:a=>{this.handleFolderCreateFailure(t,e,o,a.message??$localize`Unknown error`)}}):this.#e.postApiV1RemoteoperationCreate({requestBody:{path:e}}).subscribe({next:()=>{this.handleFolderCreated(t,e,o)},error:a=>{this.handleFolderCreateFailure(t,e,o,a.message??$localize`Unknown error`)}})}})}handleFolderCreateFailure(t,e,o,i){this.#t.open(U,{data:{title:$localize`Error creating folder`,message:$localize`The remote destination folder could not be created. ${i}`,confirmText:$localize`OK`,cancelText:null},closed:()=>{t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:o}),t.complete()}})}emitSuccessV2(t,e,o,i){t.next({action:"success",targetUrl:e,testAgain:!1,destinationIndex:o,anyFilesFound:!i.Data?.FolderIsEmpty,containsBackup:i.Data?.FolderContainsBackupFiles??void 0,containsEncryptedBackupFiles:i.Data?.FolderContainsEncryptedBackupFiles??void 0}),t.complete()}handleFolderCreated(t,e,o){this.#t.open(U,{data:{title:$localize`Folder created`,message:$localize`The remote destination folder was created successfully.`,confirmText:$localize`OK`,cancelText:null},closed:()=>{t.next({action:"test-again",targetUrl:e,testAgain:!0,destinationIndex:o}),t.complete()}})}reportNoAction(t,e,o,i){t.next({action:"generic-error",targetUrl:e,errorMessage:i,testAgain:!1,destinationIndex:o}),t.complete()}handleMissingCertificate(t,e,o,i){this.#t.open(U,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:$localize`The server is using a certificate that is not trusted.
|
|
2
2
|
If this is a self-signed certificate, you can choose to trust this certificate.
|
|
3
3
|
The server reported the certificate hash: ${i}`,confirmText:$localize`Trust the certificate`,cancelText:$localize`Cancel`},closed:a=>{if(!a){this.reportNoAction(t,e,o,$localize`The server certificate is not trusted.`);return}t.next({action:"trust-cert",targetUrl:e,testAgain:!0,certData:i,destinationIndex:o}),t.complete()}})}handleIncorrectKey(t,e,o,i,a){a?this.#t.open(U,{maxWidth:"500px",data:{title:$localize`The host key has changed`,message:$localize`The host key has changed, please check with the server administrator if this is correct,
|
|
4
4
|
otherwise you could be the victim of a MAN-IN-THE-MIDDLE attack.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as K}from"./chunk-
|
|
1
|
+
import{a as K}from"./chunk-4NN5ZM73.js";import"./chunk-6Q6SSTBK.js";import{a as z}from"./chunk-5DJAX2HH.js";import"./chunk-QZRRXR3V.js";import"./chunk-AABUGLWU.js";import"./chunk-TELPJYLN.js";import"./chunk-5QZIKR6A.js";import{B as U,H as x,I as V,W as j,b as E,c as A,e as R,f as b,j as y,p as B,q as $,r as v,t as G,u as k,x as L,z as w}from"./chunk-HPNLQHW6.js";import{c as J}from"./chunk-BGTK25UG.js";import{d as O,e as M}from"./chunk-A4LPGPDU.js";import"./chunk-PKPBSTZA.js";import"./chunk-QPTSKQZ2.js";import"./chunk-OTPG7USH.js";import"./chunk-TT3S63BX.js";import{Ab as i,Bb as u,E as g,Pa as l,Pb as D,Qb as h,Rb as _,Ub as I,Vb as d,W as s,cb as f,gc as P,la as c,sb as C,tb as S,xc as N,yb as p,zb as a}from"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";var X=()=>["/"];function H(m,o){m&1&&(a(0,"sh-form-field")(1,"label",14),_(2,3),i(),u(3,"input",15),i())}var F=new v,T=class m{#t=s(L);#o=s(w);#i=s(J);#n=s(K);#e=s(O);isImporting=c(!1);isSecureFile=c(!1);isValid=c(!1);importForm=F.group({config:F.control(""),cmdline:F.control(!1),import_metadata:F.control(!1),direct:F.control(!1),passphrase:F.control("")});selectedFile=c([]);onFileDropped(o){let e=o[0];if(e){let t=new FileReader;this.isSecureFile.set(e.type!=="application/json"),t.onload=this.#r.bind(this),t.readAsArrayBuffer(e)}}#r(o){let e=o.target?.result;this.isSecureFile.set(this.#a(e)!=="json"),this.importForm.patchValue({config:this.#s(e)}),this.isValid.set(this.importForm.value.config!=="")}#a(o){let e=new Uint8Array(o);if(e.length>=5&&e[0]===65&&e[1]===69&&e[2]===83&&e[4]===0)return"aes";try{let t=new TextDecoder().decode(o),n=JSON.parse(t);if(typeof n=="object"&&n!==null)return"json"}catch{}return"unknown"}#s(o){let e=new Uint8Array(o),t=e.byteLength,n="";for(let r=0;r<t;r++)n+=String.fromCharCode(e[r]);return btoa(n)}submit(){this.isImporting.set(!0);let o=this.importForm.value.direct??!1;this.#i.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(g(()=>this.isImporting.set(!1))).subscribe({next:e=>{if(o){this.#t.success("Backup imported successfully."),this.#e.navigate(["/"]);return}let t=this.#n.addDraftBackup(e.data);this.#e.navigate(["/backup-draft",t])},error:e=>{let t=e.message||$localize`Unknown error`;this.#o.open(z,{data:{title:$localize`Failed to import backup`,message:t,confirmText:$localize`OK`,cancelText:void 0}})}})}static \u0275fac=function(e){return new(e||m)};static \u0275cmp=f({type:m,selectors:[["app-import"]],decls:19,vars:8,consts:()=>{let o;o=$localize` Import backup configuration ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Back ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Import ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,o=I(o);let e;e=$localize`Import Metadata`;let t;t=$localize`Save now`;let n;return n=$localize`Passphrase`,[o,e,t,n,[1,"actions"],["shButton","","type","button",1,"outlined",3,"routerLink"],["shButton","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["accept",".json,.aes",3,"filesChange","files"],[1,"primary","raised"],["for","importMetadata"],["type","checkbox","formControlName","import_metadata"],["for","direct"],["type","checkbox","formControlName","direct"],["for","passphrase"],["type","password","formControlName","passphrase"]]},template:function(e,t){e&1&&(a(0,"header")(1,"h3"),D(2,0),a(3,"div",4)(4,"button",5),u(5,"sh-icon"),i(),a(6,"button",6),d("click",function(){return t.submit()}),u(7,"sh-icon"),i()(),h(),i()(),a(8,"form",7)(9,"sh-file-upload",8),d("filesChange",function(r){return t.onFileDropped(r)}),i(),C(10,H,4,0,"sh-form-field"),a(11,"sh-toggle",9)(12,"label",10),_(13,1),i(),u(14,"input",11),i(),a(15,"sh-toggle",9)(16,"label",12),_(17,2),i(),u(18,"input",13),i()()),e&2&&(l(4),p("routerLink",N(7,X)),l(2),P("loader",t.isImporting()),p("disabled",t.isImporting()||!t.isValid()),l(2),p("formGroup",t.importForm),l(),p("files",t.selectedFile()),l(),S(t.isSecureFile()?10:-1))},dependencies:[G,y,A,E,R,b,$,B,M,x,k,U,j,V],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}sh-file-upload[_ngcontent-%COMP%]{width:100%}"],changeDetection:0})};export{T as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as d}from"./chunk-
|
|
1
|
+
import{b as d}from"./chunk-DW332N2S.js";import{a as u,b as E}from"./chunk-AABUGLWU.js";import{c as p}from"./chunk-BGTK25UG.js";import{Mc as o,R as v,W as s,la as h,na as l,z as g}from"./chunk-T2WO6CVD.js";import{a as i}from"./chunk-7CGTOI24.js";var A="shown-welcome-page-v1",_="hide-console-connection-status",f="disable-console-control",C="disable-trayicon-login",S="server-listen-interface",O="allowed-hostnames",b="server-passphrase",R="update-channel",T="startup-delay",D="usage-reporter-level",N="power-mode-provider",m=class n{#t=s(p);#r=s(u);#s=s(E);#n=d(this.#t.getApiV1Serversettings());#e=h(void 0);serverSettings=o(()=>this.#e()||this.#n());#o=l(()=>{let e=this.#r.serverSettings();e&&this.#e.set(e)});constructor(){this.#r.subscribe("serversettings")}isConsoleConnectionStatusHidden=o(()=>{let e=this.serverSettings();return e?e[_]==="True":!1});refreshServerSettings(){this.#s.getConnectionMethod()!=="websocket"&&this.#t.getApiV1Serversettings().subscribe({next:e=>{this.#e.set(e)}})}#i(e,t){var r=i({},e);for(let[a,c]of Object.entries(t))c===null?delete r[a]:r[a]=c;return r}patchServerSettings(e){let t=i({},this.serverSettings());return this.#e.set(this.#i(this.serverSettings()??{},e)),this.#t.patchApiV1Serversettings({requestBody:e}).pipe(g(r=>{throw this.#e.set(t),r}))}patchServerSetting(e,t){let r={};return r[e]=t,this.patchServerSettings(r)}setShownWelcomePage(){return this.patchServerSetting(A,"true")}setHideConsoleConnectionStatus(e){return this.patchServerSetting(_,e?"True":"False")}setDisableTrayIconLogin(e){return this.patchServerSetting(C,e?"True":"False")}setDisableConsoleControl(e){return this.patchServerSetting(f,e?"True":"False")}setRemoteAccessInterface(e){return this.patchServerSetting(S,e)}setRemoteAccessAllowedHostnames(e){var t={[O]:e};return this.serverSettings()?.[S]==="loopback"&&(t[S]="any"),this.patchServerSettings(t)}setRemoteAccessPassword(e){return this.patchServerSetting(b,e)}setUpdateChannel(e){return this.patchServerSetting(R,e)}setStartupDelay(e){return this.patchServerSetting(T,e)}setUsageReporterLevel(e){return this.patchServerSetting(D,e)}setPowerModeProvider(e){return this.patchServerSetting(N,e)}static \u0275fac=function(t){return new(t||n)};static \u0275prov=v({token:n,factory:n.\u0275fac,providedIn:"root"})};export{m as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as ha,A as I,Aa as Ka,B as J,Ba as La,C as K,Ca as Ma,D as L,Da as Na,E as M,Ea as Oa,F as N,Fa as Pa,G as O,Ga as Qa,H as P,I as Q,J as R,K as S,L as T,M as U,N as V,O as W,P as X,Q as Y,R as Z,S as _,T as $,U as aa,V as ba,W as ca,X as da,Y as ea,Z as fa,_ as ga,a as i,aa as ia,b as j,ba as ja,c as k,ca as ka,d as l,da as la,e as m,ea as ma,f as n,fa as na,g as o,ga as oa,h as p,ha as pa,i as q,ia as qa,j as r,ja as ra,k as s,ka as sa,l as t,la as ta,m as u,ma as ua,n as v,na as va,o as w,oa as wa,p as x,pa as xa,q as y,qa as Aa,r as z,ra as Ba,s as A,sa as Ca,t as B,ta as Da,u as C,ua as Ea,v as D,va as Fa,w as E,wa as Ga,x as F,xa as Ha,y as G,ya as Ia,z as H,za as Ja}from"./chunk-OTPG7USH.js";import{a as c,b as d,c as e,d as f,e as g,f as h,g as ya,h as za}from"./chunk-TT3S63BX.js";import{ea as a,za as b}from"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";export{k as APP_BASE_HREF,ha as AsyncPipe,h as BrowserPlatformLocation,wa as CommonModule,ua as CurrencyPipe,ma as DATE_PIPE_DEFAULT_OPTIONS,la as DATE_PIPE_DEFAULT_TIMEZONE,a as DOCUMENT,na as DatePipe,sa as DecimalPipe,q as FormStyle,s as FormatWidth,n as HashLocationStrategy,oa as I18nPluralPipe,pa as I18nSelectPipe,b as IMAGE_CONFIG,Ja as IMAGE_LOADER,qa as JsonPipe,ra as KeyValuePipe,g as LOCATION_INITIALIZED,m as Location,j as LocationStrategy,ia as LowerCasePipe,W as NgClass,X as NgComponentOutlet,Z as NgFor,Z as NgForOf,Y as NgForOfContext,_ as NgIf,$ as NgIfContext,V as NgLocaleLocalization,U as NgLocalization,Qa as NgOptimizedImage,da as NgPlural,ea as NgPluralCase,fa as NgStyle,aa as NgSwitch,ba as NgSwitchCase,ca as NgSwitchDefault,ga as NgTemplateOutlet,o as NumberFormatStyle,t as NumberSymbol,Pa as PRECONNECT_CHECK_BLOCKLIST,l as PathLocationStrategy,ta as PercentPipe,f as PlatformLocation,xa as PlatformNavigation,p as Plural,va as SlicePipe,ja as TitleCasePipe,r as TranslationWidth,ka as UpperCasePipe,Ga as VERSION,Ha as ViewportScroller,u as WeekDay,za as XhrFactory,R as formatCurrency,Q as formatDate,T as formatNumber,S as formatPercent,O as getCurrencySymbol,J as getLocaleCurrencyCode,I as getLocaleCurrencyName,H as getLocaleCurrencySymbol,C as getLocaleDateFormat,E as getLocaleDateTimeFormat,x as getLocaleDayNames,w as getLocaleDayPeriods,N as getLocaleDirection,z as getLocaleEraNames,L as getLocaleExtraDayPeriodRules,M as getLocaleExtraDayPeriods,A as getLocaleFirstDayOfWeek,v as getLocaleId,y as getLocaleMonthNames,G as getLocaleNumberFormat,F as getLocaleNumberSymbol,K as getLocalePluralCase,D as getLocaleTimeFormat,B as getLocaleWeekEndRange,P as getNumberOfCurrencyDigits,Ea as isPlatformBrowser,Fa as isPlatformServer,Ka as provideCloudflareLoader,La as provideCloudinaryLoader,Ma as provideImageKitLoader,Na as provideImgixLoader,Oa as provideNetlifyLoader,Ba as registerLocaleData,e as \u0275DomAdapter,Aa as \u0275NavigationAdapterForLocation,Ia as \u0275NullViewportScroller,Ca as \u0275PLATFORM_BROWSER_ID,Da as \u0275PLATFORM_SERVER_ID,c as \u0275getDOM,i as \u0275normalizeQueryParams,ya as \u0275parseCookieValue,d as \u0275setRootDomAdapter};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{c as P}from"./chunk-BGTK25UG.js";import"./chunk-QPTSKQZ2.js";import"./chunk-TT3S63BX.js";import{Cb as o,Db as i,E as p,Mc as x,Pa as s,R as h,W as r,Xb as L,cb as u,fc as E,jc as a,kc as M,la as c,sb as f,tb as C,ub as _,wb as v,xb as b}from"./chunk-T2WO6CVD.js";import"./chunk-7CGTOI24.js";var l=class e{#e=r(P);isLoaded=c(!1);crashLog=c(null);load(){this.isLoaded()||this.#e.getApiV1LogdataCrashlog().pipe(p(()=>this.isLoaded.set(!0))).subscribe({next:t=>{this.crashLog.set(t.Logdata??null)}})}static \u0275fac=function(n){return new(n||e)};static \u0275prov=h({token:e,factory:e.\u0275fac,providedIn:"root"})};function O(e,t){e&1&&(o(0,"div",0),a(1,"Loading ..."),i())}function S(e,t){e&1&&(o(0,"div",0),a(1,"No crash log found"),i())}function w(e,t){if(e&1&&(o(0,"li"),a(1),i()),e&2){let n=t.$implicit;s(),M(n)}}function D(e,t){if(e&1&&(o(0,"div",2)(1,"code")(2,"ol",3),v(3,w,2,1,"li",null,_),i()()()),e&2){let n=L();E("grid-column","1 / -1")("height","auto"),s(3),b(n.breakIntoLines(n.crashLog()))}}var g=class e{#e=r(l);logsLoading=x(()=>!this.#e.isLoaded());crashLog=this.#e.crashLog;ngOnInit(){this.#e.load()}breakIntoLines(t){return t?t.split(`
|
|
2
2
|
`):[]}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=u({type:e,selectors:[["app-crashlogs"]],decls:5,vars:1,consts:[[1,"loading"],[2,"white-space","pre-wrap",3,"grid-column","height"],[2,"white-space","pre-wrap"],[1,"line-numbers-ol"]],template:function(n,d){if(n&1&&(o(0,"h3"),a(1,"Crash log"),i(),f(2,O,2,0,"div",0)(3,S,2,0,"div",0)(4,D,5,4,"div",1)),n&2){let m;s(2),C(d.logsLoading()?2:d.crashLog()==null||((m=d.crashLog())==null?null:m.length)===0?3:4)}},styles:["[_nghost-%COMP%]{display:block;padding:0 2.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}sh-table[_ngcontent-%COMP%]{--table-columns: auto auto 1fr auto}sh-table[_ngcontent-%COMP%] td.id[_ngcontent-%COMP%]{justify-content:center}sh-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code){padding:1rem .75rem;overflow:hidden}sh-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code) code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{g as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as $r}from"./chunk-56FBKSBN.js";import{h as jr,k as Je}from"./chunk-RMOTUTEQ.js";import{$a as Cr,$b as Nr,A as be,Bb as Er,C as ce,E as dr,F as V,G as Ot,Hc as Ur,J as hr,K as x,L as We,M as A,Na as Rr,O as S,P as fr,Pc as _r,R as m,Rc as Lr,T as pr,U as T,V as H,Vb as Or,Vc as Ye,W as h,X as Dt,Xa as Pt,Ya as j,Z as ee,Za as Sr,Zc as Xe,_ as P,_b as Dr,ac as Pr,ad as xr,bb as Ze,cb as wr,d as or,da as gr,e as sr,eb as Te,f as ar,fa as vr,g as J,ga as mr,h as O,ha as te,j as z,jb as br,k as I,ka as Qe,l as p,la as Ie,lb as Ir,m as ur,n as Mt,nb as Ar,o as cr,oa as G,ob as Tr,p as R,pa as Ae,q as Et,qa as Ke,r as L,ra as yr,rb as Mr,s as Ce,sa as Nt,t as lr,u as Ge,x as F,z as we}from"./chunk-XYHHESIX.js";import{a as d,b as N}from"./chunk-7CGTOI24.js";var f="primary",ke=Symbol("RouteTitle"),jt=class{params;constructor(n){this.params=n||{}}has(n){return Object.prototype.hasOwnProperty.call(this.params,n)}get(n){if(this.has(n)){let e=this.params[n];return Array.isArray(e)?e[0]:e}return null}getAll(n){if(this.has(n)){let e=this.params[n];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}};function oe(t){return new jt(t)}function Wr(t,n,e){let r=e.path.split("/");if(r.length>t.length||e.pathMatch==="full"&&(n.hasChildren()||r.length<t.length))return null;let i={};for(let o=0;o<r.length;o++){let s=r[o],a=t[o];if(s[0]===":")i[s.substring(1)]=a;else if(s!==a.path)return null}return{consumed:t.slice(0,r.length),posParams:i}}function ot(t){return new Promise((n,e)=>{t.pipe(V()).subscribe({next:r=>n(r),error:r=>e(r)})})}function Fn(t,n){if(t.length!==n.length)return!1;for(let e=0;e<t.length;++e)if(!$(t[e],n[e]))return!1;return!0}function $(t,n){let e=t?$t(t):void 0,r=n?$t(n):void 0;if(!e||!r||e.length!=r.length)return!1;let i;for(let o=0;o<e.length;o++)if(i=e[o],!Qr(t[i],n[i]))return!1;return!0}function $t(t){return[...Object.keys(t),...Object.getOwnPropertySymbols(t)]}function Qr(t,n){if(Array.isArray(t)&&Array.isArray(n)){if(t.length!==n.length)return!1;let e=[...t].sort(),r=[...n].sort();return e.every((i,o)=>r[o]===i)}else return t===n}function Kr(t){return t.length>0?t[t.length-1]:null}function ae(t){return Mt(t)?t:Ir(t)?I(Promise.resolve(t)):p(t)}function Zr(t){return Mt(t)?ot(t):Promise.resolve(t)}var qn={exact:Xr,subset:Jr},Yr={exact:Bn,subset:Vn,ignored:()=>!0};function kr(t,n,e){return qn[e.paths](t.root,n.root,e.matrixParams)&&Yr[e.queryParams](t.queryParams,n.queryParams)&&!(e.fragment==="exact"&&t.fragment!==n.fragment)}function Bn(t,n){return $(t,n)}function Xr(t,n,e){if(!ne(t.segments,n.segments)||!rt(t.segments,n.segments,e)||t.numberOfChildren!==n.numberOfChildren)return!1;for(let r in n.children)if(!t.children[r]||!Xr(t.children[r],n.children[r],e))return!1;return!0}function Vn(t,n){return Object.keys(n).length<=Object.keys(t).length&&Object.keys(n).every(e=>Qr(t[e],n[e]))}function Jr(t,n,e){return en(t,n,n.segments,e)}function en(t,n,e,r){if(t.segments.length>e.length){let i=t.segments.slice(0,e.length);return!(!ne(i,e)||n.hasChildren()||!rt(i,e,r))}else if(t.segments.length===e.length){if(!ne(t.segments,e)||!rt(t.segments,e,r))return!1;for(let i in n.children)if(!t.children[i]||!Jr(t.children[i],n.children[i],r))return!1;return!0}else{let i=e.slice(0,t.segments.length),o=e.slice(t.segments.length);return!ne(t.segments,i)||!rt(t.segments,i,r)||!t.children[f]?!1:en(t.children[f],n,o,r)}}function rt(t,n,e){return n.every((r,i)=>Yr[e](t[i].parameters,r.parameters))}var _=class{root;queryParams;fragment;_queryParamMap;constructor(n=new g([],{}),e={},r=null){this.root=n,this.queryParams=e,this.fragment=r}get queryParamMap(){return this._queryParamMap??=oe(this.queryParams),this._queryParamMap}toString(){return Wn.serialize(this)}},g=class{segments;children;parent=null;constructor(n,e){this.segments=n,this.children=e,Object.values(e).forEach(r=>r.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return nt(this)}},W=class{path;parameters;_parameterMap;constructor(n,e){this.path=n,this.parameters=e}get parameterMap(){return this._parameterMap??=oe(this.parameters),this._parameterMap}toString(){return rn(this)}};function Hn(t,n){return ne(t,n)&&t.every((e,r)=>$(e.parameters,n[r].parameters))}function ne(t,n){return t.length!==n.length?!1:t.every((e,r)=>e.path===n[r].path)}function Gn(t,n){let e=[];return Object.entries(t.children).forEach(([r,i])=>{r===f&&(e=e.concat(n(i,r)))}),Object.entries(t.children).forEach(([r,i])=>{r!==f&&(e=e.concat(n(i,r)))}),e}var ze=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=m({token:t,factory:()=>new Q,providedIn:"root"})}return t})(),Q=class{parse(n){let e=new zt(n);return new _(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(n){let e=`/${Me(n.root,!0)}`,r=Zn(n.queryParams),i=typeof n.fragment=="string"?`#${Qn(n.fragment)}`:"";return`${e}${r}${i}`}},Wn=new Q;function nt(t){return t.segments.map(n=>rn(n)).join("/")}function Me(t,n){if(!t.hasChildren())return nt(t);if(n){let e=t.children[f]?Me(t.children[f],!1):"",r=[];return Object.entries(t.children).forEach(([i,o])=>{i!==f&&r.push(`${i}:${Me(o,!1)}`)}),r.length>0?`${e}(${r.join("//")})`:e}else{let e=Gn(t,(r,i)=>i===f?[Me(t.children[f],!1)]:[`${i}:${Me(r,!1)}`]);return Object.keys(t.children).length===1&&t.children[f]!=null?`${nt(t)}/${e[0]}`:`${nt(t)}/(${e.join("//")})`}}function tn(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function et(t){return tn(t).replace(/%3B/gi,";")}function Qn(t){return encodeURI(t)}function kt(t){return tn(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function it(t){return decodeURIComponent(t)}function zr(t){return it(t.replace(/\+/g,"%20"))}function rn(t){return`${kt(t.path)}${Kn(t.parameters)}`}function Kn(t){return Object.entries(t).map(([n,e])=>`;${kt(n)}=${kt(e)}`).join("")}function Zn(t){let n=Object.entries(t).map(([e,r])=>Array.isArray(r)?r.map(i=>`${et(e)}=${et(i)}`).join("&"):`${et(e)}=${et(r)}`).filter(e=>e);return n.length?`?${n.join("&")}`:""}var Yn=/^[^\/()?;#]+/;function Ut(t){let n=t.match(Yn);return n?n[0]:""}var Xn=/^[^\/()?;=#]+/;function Jn(t){let n=t.match(Xn);return n?n[0]:""}var ei=/^[^=?&#]+/;function ti(t){let n=t.match(ei);return n?n[0]:""}var ri=/^[^&#]+/;function ni(t){let n=t.match(ri);return n?n[0]:""}var zt=class{url;remaining;constructor(n){this.url=n,this.remaining=n}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new g([],{}):new g([],this.parseChildren())}parseQueryParams(){let n={};if(this.consumeOptional("?"))do this.parseQueryParam(n);while(this.consumeOptional("&"));return n}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let n=[];for(this.peekStartsWith("(")||n.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),n.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let r={};return this.peekStartsWith("(")&&(r=this.parseParens(!1)),(n.length>0||Object.keys(e).length>0)&&(r[f]=new g(n,e)),r}parseSegment(){let n=Ut(this.remaining);if(n===""&&this.peekStartsWith(";"))throw new S(4009,!1);return this.capture(n),new W(it(n),this.parseMatrixParams())}parseMatrixParams(){let n={};for(;this.consumeOptional(";");)this.parseParam(n);return n}parseParam(n){let e=Jn(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){let i=Ut(this.remaining);i&&(r=i,this.capture(r))}n[it(e)]=it(r)}parseQueryParam(n){let e=ti(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){let s=ni(this.remaining);s&&(r=s,this.capture(r))}let i=zr(e),o=zr(r);if(n.hasOwnProperty(i)){let s=n[i];Array.isArray(s)||(s=[s],n[i]=s),s.push(o)}else n[i]=o}parseParens(n){let e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let r=Ut(this.remaining),i=this.remaining[r.length];if(i!=="/"&&i!==")"&&i!==";")throw new S(4010,!1);let o;r.indexOf(":")>-1?(o=r.slice(0,r.indexOf(":")),this.capture(o),this.capture(":")):n&&(o=f);let s=this.parseChildren();e[o??f]=Object.keys(s).length===1&&s[f]?s[f]:new g([],s),this.consumeOptional("//")}return e}peekStartsWith(n){return this.remaining.startsWith(n)}consumeOptional(n){return this.peekStartsWith(n)?(this.remaining=this.remaining.substring(n.length),!0):!1}capture(n){if(!this.consumeOptional(n))throw new S(4011,!1)}};function nn(t){return t.segments.length>0?new g([],{[f]:t}):t}function on(t){let n={};for(let[r,i]of Object.entries(t.children)){let o=on(i);if(r===f&&o.segments.length===0&&o.hasChildren())for(let[s,a]of Object.entries(o.children))n[s]=a;else(o.segments.length>0||o.hasChildren())&&(n[r]=o)}let e=new g(t.segments,n);return ii(e)}function ii(t){if(t.numberOfChildren===1&&t.children[f]){let n=t.children[f];return new g(t.segments.concat(n.segments),n.children)}return t}function K(t){return t instanceof _}function sn(t,n,e=null,r=null,i=new Q){let o=an(t);return un(o,n,e,r,i)}function an(t){let n;function e(o){let s={};for(let u of o.children){let c=e(u);s[u.outlet]=c}let a=new g(o.url,s);return o===t&&(n=a),a}let r=e(t.root),i=nn(r);return n??i}function un(t,n,e,r,i){let o=t;for(;o.parent;)o=o.parent;if(n.length===0)return _t(o,o,o,e,r,i);let s=oi(n);if(s.toRoot())return _t(o,o,new g([],{}),e,r,i);let a=si(s,o,t),u=a.processChildren?Oe(a.segmentGroup,a.index,s.commands):ln(a.segmentGroup,a.index,s.commands);return _t(o,a.segmentGroup,u,e,r,i)}function st(t){return typeof t=="object"&&t!=null&&!t.outlets&&!t.segmentPath}function Pe(t){return typeof t=="object"&&t!=null&&t.outlets}function Fr(t,n,e){t||="\u0275";let r=new _;return r.queryParams={[t]:n},e.parse(e.serialize(r)).queryParams[t]}function _t(t,n,e,r,i,o){let s={};for(let[c,l]of Object.entries(r??{}))s[c]=Array.isArray(l)?l.map(v=>Fr(c,v,o)):Fr(c,l,o);let a;t===n?a=e:a=cn(t,n,e);let u=nn(on(a));return new _(u,s,i)}function cn(t,n,e){let r={};return Object.entries(t.children).forEach(([i,o])=>{o===n?r[i]=e:r[i]=cn(o,n,e)}),new g(t.segments,r)}var at=class{isAbsolute;numberOfDoubleDots;commands;constructor(n,e,r){if(this.isAbsolute=n,this.numberOfDoubleDots=e,this.commands=r,n&&r.length>0&&st(r[0]))throw new S(4003,!1);let i=r.find(Pe);if(i&&i!==Kr(r))throw new S(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function oi(t){if(typeof t[0]=="string"&&t.length===1&&t[0]==="/")return new at(!0,0,t);let n=0,e=!1,r=t.reduce((i,o,s)=>{if(typeof o=="object"&&o!=null){if(o.outlets){let a={};return Object.entries(o.outlets).forEach(([u,c])=>{a[u]=typeof c=="string"?c.split("/"):c}),[...i,{outlets:a}]}if(o.segmentPath)return[...i,o.segmentPath]}return typeof o!="string"?[...i,o]:s===0?(o.split("/").forEach((a,u)=>{u==0&&a==="."||(u==0&&a===""?e=!0:a===".."?n++:a!=""&&i.push(a))}),i):[...i,o]},[]);return new at(e,n,r)}var de=class{segmentGroup;processChildren;index;constructor(n,e,r){this.segmentGroup=n,this.processChildren=e,this.index=r}};function si(t,n,e){if(t.isAbsolute)return new de(n,!0,0);if(!e)return new de(n,!1,NaN);if(e.parent===null)return new de(e,!0,0);let r=st(t.commands[0])?0:1,i=e.segments.length-1+r;return ai(e,i,t.numberOfDoubleDots)}function ai(t,n,e){let r=t,i=n,o=e;for(;o>i;){if(o-=i,r=r.parent,!r)throw new S(4005,!1);i=r.segments.length}return new de(r,!1,i-o)}function ui(t){return Pe(t[0])?t[0].outlets:{[f]:t}}function ln(t,n,e){if(t??=new g([],{}),t.segments.length===0&&t.hasChildren())return Oe(t,n,e);let r=ci(t,n,e),i=e.slice(r.commandIndex);if(r.match&&r.pathIndex<t.segments.length){let o=new g(t.segments.slice(0,r.pathIndex),{});return o.children[f]=new g(t.segments.slice(r.pathIndex),t.children),Oe(o,0,i)}else return r.match&&i.length===0?new g(t.segments,{}):r.match&&!t.hasChildren()?Ft(t,n,e):r.match?Oe(t,0,i):Ft(t,n,e)}function Oe(t,n,e){if(e.length===0)return new g(t.segments,{});{let r=ui(e),i={};if(Object.keys(r).some(o=>o!==f)&&t.children[f]&&t.numberOfChildren===1&&t.children[f].segments.length===0){let o=Oe(t.children[f],n,e);return new g(t.segments,o.children)}return Object.entries(r).forEach(([o,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(i[o]=ln(t.children[o],n,s))}),Object.entries(t.children).forEach(([o,s])=>{r[o]===void 0&&(i[o]=s)}),new g(t.segments,i)}}function ci(t,n,e){let r=0,i=n,o={match:!1,pathIndex:0,commandIndex:0};for(;i<t.segments.length;){if(r>=e.length)return o;let s=t.segments[i],a=e[r];if(Pe(a))break;let u=`${a}`,c=r<e.length-1?e[r+1]:null;if(i>0&&u===void 0)break;if(u&&c&&typeof c=="object"&&c.outlets===void 0){if(!Br(u,c,s))return o;r+=2}else{if(!Br(u,{},s))return o;r++}i++}return{match:!0,pathIndex:i,commandIndex:r}}function Ft(t,n,e){let r=t.segments.slice(0,n),i=0;for(;i<e.length;){let o=e[i];if(Pe(o)){let u=li(o.outlets);return new g(r,u)}if(i===0&&st(e[0])){let u=t.segments[n];r.push(new W(u.path,qr(e[0]))),i++;continue}let s=Pe(o)?o.outlets[f]:`${o}`,a=i<e.length-1?e[i+1]:null;s&&a&&st(a)?(r.push(new W(s,qr(a))),i+=2):(r.push(new W(s,{})),i++)}return new g(r,{})}function li(t){let n={};return Object.entries(t).forEach(([e,r])=>{typeof r=="string"&&(r=[r]),r!==null&&(n[e]=Ft(new g([],{}),0,r))}),n}function qr(t){let n={};return Object.entries(t).forEach(([e,r])=>n[e]=`${r}`),n}function Br(t,n,e){return t==e.path&&$(n,e.parameters)}var De="imperative",y=(function(t){return t[t.NavigationStart=0]="NavigationStart",t[t.NavigationEnd=1]="NavigationEnd",t[t.NavigationCancel=2]="NavigationCancel",t[t.NavigationError=3]="NavigationError",t[t.RoutesRecognized=4]="RoutesRecognized",t[t.ResolveStart=5]="ResolveStart",t[t.ResolveEnd=6]="ResolveEnd",t[t.GuardsCheckStart=7]="GuardsCheckStart",t[t.GuardsCheckEnd=8]="GuardsCheckEnd",t[t.RouteConfigLoadStart=9]="RouteConfigLoadStart",t[t.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",t[t.ChildActivationStart=11]="ChildActivationStart",t[t.ChildActivationEnd=12]="ChildActivationEnd",t[t.ActivationStart=13]="ActivationStart",t[t.ActivationEnd=14]="ActivationEnd",t[t.Scroll=15]="Scroll",t[t.NavigationSkipped=16]="NavigationSkipped",t})(y||{}),E=class{id;url;constructor(n,e){this.id=n,this.url=e}},se=class extends E{type=y.NavigationStart;navigationTrigger;restoredState;constructor(n,e,r="imperative",i=null){super(n,e),this.navigationTrigger=r,this.restoredState=i}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},D=class extends E{urlAfterRedirects;type=y.NavigationEnd;constructor(n,e,r){super(n,e),this.urlAfterRedirects=r}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},b=(function(t){return t[t.Redirect=0]="Redirect",t[t.SupersededByNewNavigation=1]="SupersededByNewNavigation",t[t.NoDataFromResolver=2]="NoDataFromResolver",t[t.GuardRejected=3]="GuardRejected",t[t.Aborted=4]="Aborted",t})(b||{}),Ue=(function(t){return t[t.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",t[t.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",t})(Ue||{}),k=class extends E{reason;code;type=y.NavigationCancel;constructor(n,e,r,i){super(n,e),this.reason=r,this.code=i}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},q=class extends E{reason;code;type=y.NavigationSkipped;constructor(n,e,r,i){super(n,e),this.reason=r,this.code=i}},fe=class extends E{error;target;type=y.NavigationError;constructor(n,e,r,i){super(n,e),this.error=r,this.target=i}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},_e=class extends E{urlAfterRedirects;state;type=y.RoutesRecognized;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},ut=class extends E{urlAfterRedirects;state;type=y.GuardsCheckStart;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},ct=class extends E{urlAfterRedirects;state;shouldActivate;type=y.GuardsCheckEnd;constructor(n,e,r,i,o){super(n,e),this.urlAfterRedirects=r,this.state=i,this.shouldActivate=o}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},lt=class extends E{urlAfterRedirects;state;type=y.ResolveStart;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},dt=class extends E{urlAfterRedirects;state;type=y.ResolveEnd;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},ht=class{route;type=y.RouteConfigLoadStart;constructor(n){this.route=n}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},ft=class{route;type=y.RouteConfigLoadEnd;constructor(n){this.route=n}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},pt=class{snapshot;type=y.ChildActivationStart;constructor(n){this.snapshot=n}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},gt=class{snapshot;type=y.ChildActivationEnd;constructor(n){this.snapshot=n}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},vt=class{snapshot;type=y.ActivationStart;constructor(n){this.snapshot=n}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},mt=class{snapshot;type=y.ActivationEnd;constructor(n){this.snapshot=n}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}};var Le=class{},pe=class{url;navigationBehaviorOptions;constructor(n,e){this.url=n,this.navigationBehaviorOptions=e}};function di(t){return!(t instanceof Le)&&!(t instanceof pe)}function hi(t,n){return t.providers&&!t._injector&&(t._injector=Ze(t.providers,n,`Route: ${t.path}`)),t._injector??n}function U(t){return t.outlet||f}function fi(t,n){let e=t.filter(r=>U(r)===n);return e.push(...t.filter(r=>U(r)!==n)),e}function me(t){if(!t)return null;if(t.routeConfig?._injector)return t.routeConfig._injector;for(let n=t.parent;n;n=n.parent){let e=n.routeConfig;if(e?._loadedInjector)return e._loadedInjector;if(e?._injector)return e._injector}return null}var yt=class{rootInjector;outlet=null;route=null;children;attachRef=null;get injector(){return me(this.route?.snapshot)??this.rootInjector}constructor(n){this.rootInjector=n,this.children=new ye(this.rootInjector)}},ye=(()=>{class t{rootInjector;contexts=new Map;constructor(e){this.rootInjector=e}onChildOutletCreated(e,r){let i=this.getOrCreateContext(e);i.outlet=r,this.contexts.set(e,i)}onChildOutletDestroyed(e){let r=this.getContext(e);r&&(r.outlet=null,r.attachRef=null)}onOutletDeactivated(){let e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let r=this.getContext(e);return r||(r=new yt(this.rootInjector),this.contexts.set(e,r)),r}getContext(e){return this.contexts.get(e)||null}static \u0275fac=function(r){return new(r||t)(H(ee))};static \u0275prov=m({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Rt=class{_root;constructor(n){this._root=n}get root(){return this._root.value}parent(n){let e=this.pathFromRoot(n);return e.length>1?e[e.length-2]:null}children(n){let e=qt(n,this._root);return e?e.children.map(r=>r.value):[]}firstChild(n){let e=qt(n,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(n){let e=Bt(n,this._root);return e.length<2?[]:e[e.length-2].children.map(i=>i.value).filter(i=>i!==n)}pathFromRoot(n){return Bt(n,this._root).map(e=>e.value)}};function qt(t,n){if(t===n.value)return n;for(let e of n.children){let r=qt(t,e);if(r)return r}return null}function Bt(t,n){if(t===n.value)return[n];for(let e of n.children){let r=Bt(t,e);if(r.length)return r.unshift(n),r}return[]}var M=class{value;children;constructor(n,e){this.value=n,this.children=e}toString(){return`TreeNode(${this.value})`}};function le(t){let n={};return t&&t.children.forEach(e=>n[e.value.outlet]=e),n}var xe=class extends Rt{snapshot;constructor(n,e){super(n),this.snapshot=e,Kt(this,n)}toString(){return this.snapshot.toString()}};function dn(t){let n=pi(t),e=new O([new W("",{})]),r=new O({}),i=new O({}),o=new O({}),s=new O(""),a=new B(e,r,o,s,i,f,t,n.root);return a.snapshot=n.root,new xe(new M(a,[]),n)}function pi(t){let n={},e={},r={},o=new ie([],n,r,"",e,f,t,null,{});return new je("",new M(o,[]))}var B=class{urlSubject;paramsSubject;queryParamsSubject;fragmentSubject;dataSubject;outlet;component;snapshot;_futureSnapshot;_routerState;_paramMap;_queryParamMap;title;url;params;queryParams;fragment;data;constructor(n,e,r,i,o,s,a,u){this.urlSubject=n,this.paramsSubject=e,this.queryParamsSubject=r,this.fragmentSubject=i,this.dataSubject=o,this.outlet=s,this.component=a,this._futureSnapshot=u,this.title=this.dataSubject?.pipe(R(c=>c[ke]))??p(void 0),this.url=n,this.params=e,this.queryParams=r,this.fragment=i,this.data=o}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(R(n=>oe(n))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(R(n=>oe(n))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function St(t,n,e="emptyOnly"){let r,{routeConfig:i}=t;return n!==null&&(e==="always"||i?.path===""||!n.component&&!n.routeConfig?.loadComponent)?r={params:d(d({},n.params),t.params),data:d(d({},n.data),t.data),resolve:d(d(d(d({},t.data),n.data),i?.data),t._resolvedData)}:r={params:d({},t.params),data:d({},t.data),resolve:d(d({},t.data),t._resolvedData??{})},i&&fn(i)&&(r.resolve[ke]=i.title),r}var ie=class{url;params;queryParams;fragment;data;outlet;component;routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;get title(){return this.data?.[ke]}constructor(n,e,r,i,o,s,a,u,c){this.url=n,this.params=e,this.queryParams=r,this.fragment=i,this.data=o,this.outlet=s,this.component=a,this.routeConfig=u,this._resolve=c}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=oe(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=oe(this.queryParams),this._queryParamMap}toString(){let n=this.url.map(r=>r.toString()).join("/"),e=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${n}', path:'${e}')`}},je=class extends Rt{url;constructor(n,e){super(e),this.url=n,Kt(this,e)}toString(){return hn(this._root)}};function Kt(t,n){n.value._routerState=t,n.children.forEach(e=>Kt(t,e))}function hn(t){let n=t.children.length>0?` { ${t.children.map(hn).join(", ")} } `:"";return`${t.value}${n}`}function Lt(t){if(t.snapshot){let n=t.snapshot,e=t._futureSnapshot;t.snapshot=e,$(n.queryParams,e.queryParams)||t.queryParamsSubject.next(e.queryParams),n.fragment!==e.fragment&&t.fragmentSubject.next(e.fragment),$(n.params,e.params)||t.paramsSubject.next(e.params),Fn(n.url,e.url)||t.urlSubject.next(e.url),$(n.data,e.data)||t.dataSubject.next(e.data)}else t.snapshot=t._futureSnapshot,t.dataSubject.next(t._futureSnapshot.data)}function Vt(t,n){let e=$(t.params,n.params)&&Hn(t.url,n.url),r=!t.parent!=!n.parent;return e&&!r&&(!t.parent||Vt(t.parent,n.parent))}function fn(t){return typeof t.title=="string"||t.title===null}var pn=new T(""),Zt=(()=>{class t{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=f;activateEvents=new te;deactivateEvents=new te;attachEvents=new te;detachEvents=new te;routerOutletData=Lr();parentContexts=h(ye);location=h(Sr);changeDetector=h(Ye);inputBinder=h(Fe,{optional:!0});supportsBindingToComponentInputs=!0;ngOnChanges(e){if(e.name){let{firstChange:r,previousValue:i}=e.name;if(r)return;this.isTrackedInParentContexts(i)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(i)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(e){return this.parentContexts.getContext(e)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let e=this.parentContexts.getContext(this.name);e?.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new S(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new S(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new S(4012,!1);this.location.detach();let e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,r){this.activated=e,this._activatedRoute=r,this.location.insert(e.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){let e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,r){if(this.isActivated)throw new S(4013,!1);this._activatedRoute=e;let i=this.location,s=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,u=new Ht(e,a,i.injector,this.routerOutletData);this.activated=i.createComponent(s,{index:i.length,injector:u,environmentInjector:r}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Te({type:t,selectors:[["router-outlet"]],inputs:{name:"name",routerOutletData:[1,"routerOutletData"]},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],features:[Ae]})}return t})(),Ht=class{route;childContexts;parent;outletData;constructor(n,e,r,i){this.route=n,this.childContexts=e,this.parent=r,this.outletData=i}get(n,e){return n===B?this.route:n===ye?this.childContexts:n===pn?this.outletData:this.parent.get(n,e)}},Fe=new T(""),Yt=(()=>{class t{outletDataSubscriptions=new Map;bindActivatedRouteToOutletComponent(e){this.unsubscribeFromRouteData(e),this.subscribeToRouteData(e)}unsubscribeFromRouteData(e){this.outletDataSubscriptions.get(e)?.unsubscribe(),this.outletDataSubscriptions.delete(e)}subscribeToRouteData(e){let{activatedRoute:r}=e,i=Et([r.queryParams,r.params,r.data]).pipe(x(([o,s,a],u)=>(a=d(d(d({},o),s),a),u===0?p(a):Promise.resolve(a)))).subscribe(o=>{if(!e.isActivated||!e.activatedComponentRef||e.activatedRoute!==r||r.component===null){this.unsubscribeFromRouteData(e);return}let s=xr(r.component);if(!s){this.unsubscribeFromRouteData(e);return}for(let{templateName:a}of s.inputs)e.activatedComponentRef.setInput(a,o[a])});this.outletDataSubscriptions.set(e,i)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=m({token:t,factory:t.\u0275fac})}return t})(),Xt=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=wr({type:t,selectors:[["ng-component"]],exportAs:["emptyRouterOutlet"],decls:1,vars:0,template:function(r,i){r&1&&Er(0,"router-outlet")},dependencies:[Zt],encapsulation:2})}return t})();function Jt(t){let n=t.children&&t.children.map(Jt),e=n?N(d({},t),{children:n}):d({},t);return!e.component&&!e.loadComponent&&(n||e.loadChildren)&&e.outlet&&e.outlet!==f&&(e.component=Xt),e}function gi(t,n,e){let r=$e(t,n._root,e?e._root:void 0);return new xe(r,n)}function $e(t,n,e){if(e&&t.shouldReuseRoute(n.value,e.value.snapshot)){let r=e.value;r._futureSnapshot=n.value;let i=vi(t,n,e);return new M(r,i)}else{if(t.shouldAttach(n.value)){let o=t.retrieve(n.value);if(o!==null){let s=o.route;return s.value._futureSnapshot=n.value,s.children=n.children.map(a=>$e(t,a)),s}}let r=mi(n.value),i=n.children.map(o=>$e(t,o));return new M(r,i)}}function vi(t,n,e){return n.children.map(r=>{for(let i of e.children)if(t.shouldReuseRoute(r.value,i.value.snapshot))return $e(t,r,i);return $e(t,r)})}function mi(t){return new B(new O(t.url),new O(t.params),new O(t.queryParams),new O(t.fragment),new O(t.data),t.outlet,t.component,t)}var ge=class{redirectTo;navigationBehaviorOptions;constructor(n,e){this.redirectTo=n,this.navigationBehaviorOptions=e}},gn="ngNavigationCancelingError";function Ct(t,n){let{redirectTo:e,navigationBehaviorOptions:r}=K(n)?{redirectTo:n,navigationBehaviorOptions:void 0}:n,i=vn(!1,b.Redirect);return i.url=e,i.navigationBehaviorOptions=r,i}function vn(t,n){let e=new Error(`NavigationCancelingError: ${t||""}`);return e[gn]=!0,e.cancellationCode=n,e}function yi(t){return mn(t)&&K(t.url)}function mn(t){return!!t&&t[gn]}var Ri=(t,n,e,r)=>R(i=>(new Gt(n,i.targetRouterState,i.currentRouterState,e,r).activate(t),i)),Gt=class{routeReuseStrategy;futureState;currState;forwardEvent;inputBindingEnabled;constructor(n,e,r,i,o){this.routeReuseStrategy=n,this.futureState=e,this.currState=r,this.forwardEvent=i,this.inputBindingEnabled=o}activate(n){let e=this.futureState._root,r=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,r,n),Lt(this.futureState.root),this.activateChildRoutes(e,r,n)}deactivateChildRoutes(n,e,r){let i=le(e);n.children.forEach(o=>{let s=o.value.outlet;this.deactivateRoutes(o,i[s],r),delete i[s]}),Object.values(i).forEach(o=>{this.deactivateRouteAndItsChildren(o,r)})}deactivateRoutes(n,e,r){let i=n.value,o=e?e.value:null;if(i===o)if(i.component){let s=r.getContext(i.outlet);s&&this.deactivateChildRoutes(n,e,s.children)}else this.deactivateChildRoutes(n,e,r);else o&&this.deactivateRouteAndItsChildren(e,r)}deactivateRouteAndItsChildren(n,e){n.value.component&&this.routeReuseStrategy.shouldDetach(n.value.snapshot)?this.detachAndStoreRouteSubtree(n,e):this.deactivateRouteAndOutlet(n,e)}detachAndStoreRouteSubtree(n,e){let r=e.getContext(n.value.outlet),i=r&&n.value.component?r.children:e,o=le(n);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,i);if(r&&r.outlet){let s=r.outlet.detach(),a=r.children.onOutletDeactivated();this.routeReuseStrategy.store(n.value.snapshot,{componentRef:s,route:n,contexts:a})}}deactivateRouteAndOutlet(n,e){let r=e.getContext(n.value.outlet),i=r&&n.value.component?r.children:e,o=le(n);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,i);r&&(r.outlet&&(r.outlet.deactivate(),r.children.onOutletDeactivated()),r.attachRef=null,r.route=null)}activateChildRoutes(n,e,r){let i=le(e);n.children.forEach(o=>{this.activateRoutes(o,i[o.value.outlet],r),this.forwardEvent(new mt(o.value.snapshot))}),n.children.length&&this.forwardEvent(new gt(n.value.snapshot))}activateRoutes(n,e,r){let i=n.value,o=e?e.value:null;if(Lt(i),i===o)if(i.component){let s=r.getOrCreateContext(i.outlet);this.activateChildRoutes(n,e,s.children)}else this.activateChildRoutes(n,e,r);else if(i.component){let s=r.getOrCreateContext(i.outlet);if(this.routeReuseStrategy.shouldAttach(i.snapshot)){let a=this.routeReuseStrategy.retrieve(i.snapshot);this.routeReuseStrategy.store(i.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),Lt(a.route.value),this.activateChildRoutes(n,null,s.children)}else s.attachRef=null,s.route=i,s.outlet&&s.outlet.activateWith(i,s.injector),this.activateChildRoutes(n,null,s.children)}else this.activateChildRoutes(n,null,r)}},wt=class{path;route;constructor(n){this.path=n,this.route=this.path[this.path.length-1]}},he=class{component;route;constructor(n,e){this.component=n,this.route=e}};function Si(t,n,e){let r=t._root,i=n?n._root:null;return Ee(r,i,e,[r.value])}function Ci(t){let n=t.routeConfig?t.routeConfig.canActivateChild:null;return!n||n.length===0?null:{node:t,guards:n}}function Re(t,n){let e=Symbol(),r=n.get(t,e);return r===e?typeof t=="function"&&!pr(t)?t:n.get(t):r}function Ee(t,n,e,r,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=le(n);return t.children.forEach(s=>{wi(s,o[s.value.outlet],e,r.concat([s.value]),i),delete o[s.value.outlet]}),Object.entries(o).forEach(([s,a])=>Ne(a,e.getContext(s),i)),i}function wi(t,n,e,r,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=t.value,s=n?n.value:null,a=e?e.getContext(t.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){let u=bi(s,o,o.routeConfig.runGuardsAndResolvers);u?i.canActivateChecks.push(new wt(r)):(o.data=s.data,o._resolvedData=s._resolvedData),o.component?Ee(t,n,a?a.children:null,r,i):Ee(t,n,e,r,i),u&&a&&a.outlet&&a.outlet.isActivated&&i.canDeactivateChecks.push(new he(a.outlet.component,s))}else s&&Ne(n,a,i),i.canActivateChecks.push(new wt(r)),o.component?Ee(t,null,a?a.children:null,r,i):Ee(t,null,e,r,i);return i}function bi(t,n,e){if(typeof e=="function")return e(t,n);switch(e){case"pathParamsChange":return!ne(t.url,n.url);case"pathParamsOrQueryParamsChange":return!ne(t.url,n.url)||!$(t.queryParams,n.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Vt(t,n)||!$(t.queryParams,n.queryParams);case"paramsChange":default:return!Vt(t,n)}}function Ne(t,n,e){let r=le(t),i=t.value;Object.entries(r).forEach(([o,s])=>{i.component?n?Ne(s,n.children.getContext(o),e):Ne(s,null,e):Ne(s,n,e)}),i.component?n&&n.outlet&&n.outlet.isActivated?e.canDeactivateChecks.push(new he(n.outlet.component,i)):e.canDeactivateChecks.push(new he(null,i)):e.canDeactivateChecks.push(new he(null,i))}function qe(t){return typeof t=="function"}function Ii(t){return typeof t=="boolean"}function Ai(t){return t&&qe(t.canLoad)}function Ti(t){return t&&qe(t.canActivate)}function Mi(t){return t&&qe(t.canActivateChild)}function Ei(t){return t&&qe(t.canDeactivate)}function Oi(t){return t&&qe(t.canMatch)}function yn(t){return t instanceof cr||t?.name==="EmptyError"}var tt=Symbol("INITIAL_VALUE");function ve(){return x(t=>Et(t.map(n=>n.pipe(ce(1),hr(tt)))).pipe(R(n=>{for(let e of n)if(e!==!0){if(e===tt)return tt;if(e===!1||Di(e))return e}return!0}),F(n=>n!==tt),ce(1)))}function Di(t){return K(t)||t instanceof ge}function Rn(t){return t.aborted?p(void 0).pipe(ce(1)):new ar(n=>{let e=()=>{n.next(),n.complete()};return t.addEventListener("abort",e),()=>t.removeEventListener("abort",e)})}function Sn(t){return We(Rn(t))}function Ni(t,n){return L(e=>{let{targetSnapshot:r,currentSnapshot:i,guards:{canActivateChecks:o,canDeactivateChecks:s}}=e;return s.length===0&&o.length===0?p(N(d({},e),{guardsResult:!0})):Pi(s,r,i,t).pipe(L(a=>a&&Ii(a)?Ui(r,o,t,n):p(a)),R(a=>N(d({},e),{guardsResult:a})))})}function Pi(t,n,e,r){return I(t).pipe(L(i=>$i(i.component,i.route,e,n,r)),V(i=>i!==!0,!0))}function Ui(t,n,e,r){return I(n).pipe(be(i=>lr(Li(i.route.parent,r),_i(i.route,r),ji(t,i.path,e),xi(t,i.route,e))),V(i=>i!==!0,!0))}function _i(t,n){return t!==null&&n&&n(new vt(t)),p(!0)}function Li(t,n){return t!==null&&n&&n(new pt(t)),p(!0)}function xi(t,n,e){let r=n.routeConfig?n.routeConfig.canActivate:null;if(!r||r.length===0)return p(!0);let i=r.map(o=>Ge(()=>{let s=me(n)??e,a=Re(o,s),u=Ti(a)?a.canActivate(n,t):P(s,()=>a(n,t));return ae(u).pipe(V())}));return p(i).pipe(ve())}function ji(t,n,e){let r=n[n.length-1],o=n.slice(0,n.length-1).reverse().map(s=>Ci(s)).filter(s=>s!==null).map(s=>Ge(()=>{let a=s.guards.map(u=>{let c=me(s.node)??e,l=Re(u,c),v=Mi(l)?l.canActivateChild(r,t):P(c,()=>l(r,t));return ae(v).pipe(V())});return p(a).pipe(ve())}));return p(o).pipe(ve())}function $i(t,n,e,r,i){let o=n&&n.routeConfig?n.routeConfig.canDeactivate:null;if(!o||o.length===0)return p(!0);let s=o.map(a=>{let u=me(n)??i,c=Re(a,u),l=Ei(c)?c.canDeactivate(t,n,e,r):P(u,()=>c(t,n,e,r));return ae(l).pipe(V())});return p(s).pipe(ve())}function ki(t,n,e,r,i){let o=n.canLoad;if(o===void 0||o.length===0)return p(!0);let s=o.map(a=>{let u=Re(a,t),c=Ai(u)?u.canLoad(n,e):P(t,()=>u(n,e)),l=ae(c);return i?l.pipe(Sn(i)):l});return p(s).pipe(ve(),Cn(r))}function Cn(t){return sr(A(n=>{if(typeof n!="boolean")throw Ct(t,n)}),R(n=>n===!0))}function zi(t,n,e,r,i){let o=n.canMatch;if(!o||o.length===0)return p(!0);let s=o.map(a=>{let u=Re(a,t),c=Oi(u)?u.canMatch(n,e):P(t,()=>u(n,e)),l=ae(c);return i?l.pipe(Sn(i)):l});return p(s).pipe(ve(),Cn(r))}var re=class wn extends Error{segmentGroup;constructor(n){super(),this.segmentGroup=n||null,Object.setPrototypeOf(this,wn.prototype)}},Wt=class bn extends Error{urlTree;constructor(n){super(),this.urlTree=n,Object.setPrototypeOf(this,bn.prototype)}};function Fi(t){throw new S(4e3,!1)}function qi(t){throw vn(!1,b.GuardRejected)}var Bi=class{urlSerializer;urlTree;constructor(n,e){this.urlSerializer=n,this.urlTree=e}async lineralizeSegments(n,e){let r=[],i=e.root;for(;;){if(r=r.concat(i.segments),i.numberOfChildren===0)return r;if(i.numberOfChildren>1||!i.children[f])throw Fi(`${n.redirectTo}`);i=i.children[f]}}async applyRedirectCommands(n,e,r,i,o){let s=await Vi(e,i,o);if(s instanceof _)throw new Wt(s);let a=this.applyRedirectCreateUrlTree(s,this.urlSerializer.parse(s),n,r);if(s[0]==="/")throw new Wt(a);return a}applyRedirectCreateUrlTree(n,e,r,i){let o=this.createSegmentGroup(n,e.root,r,i);return new _(o,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(n,e){let r={};return Object.entries(n).forEach(([i,o])=>{if(typeof o=="string"&&o[0]===":"){let a=o.substring(1);r[i]=e[a]}else r[i]=o}),r}createSegmentGroup(n,e,r,i){let o=this.createSegments(n,e.segments,r,i),s={};return Object.entries(e.children).forEach(([a,u])=>{s[a]=this.createSegmentGroup(n,u,r,i)}),new g(o,s)}createSegments(n,e,r,i){return e.map(o=>o.path[0]===":"?this.findPosParam(n,o,i):this.findOrReturn(o,r))}findPosParam(n,e,r){let i=r[e.path.substring(1)];if(!i)throw new S(4001,!1);return i}findOrReturn(n,e){let r=0;for(let i of e){if(i.path===n.path)return e.splice(r),i;r++}return n}};function Vi(t,n,e){if(typeof t=="string")return Promise.resolve(t);let r=t,{queryParams:i,fragment:o,routeConfig:s,url:a,outlet:u,params:c,data:l,title:v}=n;return ot(ae(P(e,()=>r({params:c,data:l,queryParams:i,fragment:o,routeConfig:s,url:a,outlet:u,title:v}))))}var Qt={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function Hi(t,n,e,r,i,o){let s=In(t,n,e);return s.matched?(r=hi(n,r),zi(r,n,e,i,o).pipe(R(a=>a===!0?s:d({},Qt)))):p(s)}function In(t,n,e){if(n.path==="**")return Gi(e);if(n.path==="")return n.pathMatch==="full"&&(t.hasChildren()||e.length>0)?d({},Qt):{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};let i=(n.matcher||Wr)(e,t,n);if(!i)return d({},Qt);let o={};Object.entries(i.posParams??{}).forEach(([a,u])=>{o[a]=u.path});let s=i.consumed.length>0?d(d({},o),i.consumed[i.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:i.consumed,remainingSegments:e.slice(i.consumed.length),parameters:s,positionalParamSegments:i.posParams??{}}}function Gi(t){return{matched:!0,parameters:t.length>0?Kr(t).parameters:{},consumedSegments:t,remainingSegments:[],positionalParamSegments:{}}}function Vr(t,n,e,r){return e.length>0&&Ki(t,e,r)?{segmentGroup:new g(n,Qi(r,new g(e,t.children))),slicedSegments:[]}:e.length===0&&Zi(t,e,r)?{segmentGroup:new g(t.segments,Wi(t,e,r,t.children)),slicedSegments:e}:{segmentGroup:new g(t.segments,t.children),slicedSegments:e}}function Wi(t,n,e,r){let i={};for(let o of e)if(It(t,n,o)&&!r[U(o)]){let s=new g([],{});i[U(o)]=s}return d(d({},r),i)}function Qi(t,n){let e={};e[f]=n;for(let r of t)if(r.path===""&&U(r)!==f){let i=new g([],{});e[U(r)]=i}return e}function Ki(t,n,e){return e.some(r=>It(t,n,r)&&U(r)!==f)}function Zi(t,n,e){return e.some(r=>It(t,n,r))}function It(t,n,e){return(t.hasChildren()||n.length>0)&&e.pathMatch==="full"?!1:e.path===""}function Yi(t,n,e){return n.length===0&&!t.children[e]}var Xi=class{};async function Ji(t,n,e,r,i,o,s="emptyOnly",a){return new to(t,n,e,r,i,s,o,a).recognize()}var eo=31,to=class{injector;configLoader;rootComponentType;config;urlTree;paramsInheritanceStrategy;urlSerializer;abortSignal;applyRedirects;absoluteRedirectCount=0;allowRedirects=!0;constructor(n,e,r,i,o,s,a,u){this.injector=n,this.configLoader=e,this.rootComponentType=r,this.config=i,this.urlTree=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a,this.abortSignal=u,this.applyRedirects=new Bi(this.urlSerializer,this.urlTree)}noMatchError(n){return new S(4002,`'${n.segmentGroup}'`)}async recognize(){let n=Vr(this.urlTree.root,[],[],this.config).segmentGroup,{children:e,rootSnapshot:r}=await this.match(n),i=new M(r,e),o=new je("",i),s=sn(r,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,o.url=this.urlSerializer.serialize(s),{state:o,tree:s}}async match(n){let e=new ie([],Object.freeze({}),Object.freeze(d({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),f,this.rootComponentType,null,{});try{return{children:await this.processSegmentGroup(this.injector,this.config,n,f,e),rootSnapshot:e}}catch(r){if(r instanceof Wt)return this.urlTree=r.urlTree,this.match(r.urlTree.root);throw r instanceof re?this.noMatchError(r):r}}async processSegmentGroup(n,e,r,i,o){if(r.segments.length===0&&r.hasChildren())return this.processChildren(n,e,r,o);let s=await this.processSegment(n,e,r,r.segments,i,!0,o);return s instanceof M?[s]:[]}async processChildren(n,e,r,i){let o=[];for(let u of Object.keys(r.children))u==="primary"?o.unshift(u):o.push(u);let s=[];for(let u of o){let c=r.children[u],l=fi(e,u),v=await this.processSegmentGroup(n,l,c,u,i);s.push(...v)}let a=An(s);return ro(a),a}async processSegment(n,e,r,i,o,s,a){for(let u of e)try{return await this.processSegmentAgainstRoute(u._injector??n,e,u,r,i,o,s,a)}catch(c){if(c instanceof re||yn(c))continue;throw c}if(Yi(r,i,o))return new Xi;throw new re(r)}async processSegmentAgainstRoute(n,e,r,i,o,s,a,u){if(U(r)!==s&&(s===f||!It(i,o,r)))throw new re(i);if(r.redirectTo===void 0)return this.matchSegmentAgainstRoute(n,i,r,o,s,u);if(this.allowRedirects&&a)return this.expandSegmentAgainstRouteUsingRedirect(n,i,e,r,o,s,u);throw new re(i)}async expandSegmentAgainstRouteUsingRedirect(n,e,r,i,o,s,a){let{matched:u,parameters:c,consumedSegments:l,positionalParamSegments:v,remainingSegments:C}=In(e,i,o);if(!u)throw new re(e);typeof i.redirectTo=="string"&&i.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>eo&&(this.allowRedirects=!1));let w=new ie(o,c,Object.freeze(d({},this.urlTree.queryParams)),this.urlTree.fragment,Hr(i),U(i),i.component??i._loadedComponent??null,i,Gr(i)),Z=St(w,a,this.paramsInheritanceStrategy);if(w.params=Object.freeze(Z.params),w.data=Object.freeze(Z.data),this.abortSignal.aborted)throw new Error(this.abortSignal.reason);let Y=await this.applyRedirects.applyRedirectCommands(l,i.redirectTo,v,w,n),X=await this.applyRedirects.lineralizeSegments(i,Y);return this.processSegment(n,r,e,X.concat(C),s,!1,a)}async matchSegmentAgainstRoute(n,e,r,i,o,s){if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);let a=await ot(Hi(e,r,i,n,this.urlSerializer,this.abortSignal));if(r.path==="**"&&(e.children={}),!a?.matched)throw new re(e);n=r._injector??n;let{routes:u}=await this.getChildConfig(n,r,i),c=r._loadedInjector??n,{parameters:l,consumedSegments:v,remainingSegments:C}=a,w=new ie(v,l,Object.freeze(d({},this.urlTree.queryParams)),this.urlTree.fragment,Hr(r),U(r),r.component??r._loadedComponent??null,r,Gr(r)),Z=St(w,s,this.paramsInheritanceStrategy);w.params=Object.freeze(Z.params),w.data=Object.freeze(Z.data);let{segmentGroup:Y,slicedSegments:X}=Vr(e,v,C,u);if(X.length===0&&Y.hasChildren()){let kn=await this.processChildren(c,u,Y,w);return new M(w,kn)}if(u.length===0&&X.length===0)return new M(w,[]);let He=U(r)===o,ir=await this.processSegment(c,u,Y,X,He?f:o,!0,w);return new M(w,ir instanceof M?[ir]:[])}async getChildConfig(n,e,r){if(e.children)return{routes:e.children,injector:n};if(e.loadChildren){if(e._loadedRoutes!==void 0)return{routes:e._loadedRoutes,injector:e._loadedInjector};if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);if(await ot(ki(n,e,r,this.urlSerializer,this.abortSignal))){let o=await this.configLoader.loadChildren(n,e);return e._loadedRoutes=o.routes,e._loadedInjector=o.injector,o}throw qi(e)}return{routes:[],injector:n}}};function ro(t){t.sort((n,e)=>n.value.outlet===f?-1:e.value.outlet===f?1:n.value.outlet.localeCompare(e.value.outlet))}function no(t){let n=t.value.routeConfig;return n&&n.path===""}function An(t){let n=[],e=new Set;for(let r of t){if(!no(r)){n.push(r);continue}let i=n.find(o=>r.value.routeConfig===o.value.routeConfig);i!==void 0?(i.children.push(...r.children),e.add(i)):n.push(r)}for(let r of e){let i=An(r.children);n.push(new M(r.value,i))}return n.filter(r=>!e.has(r))}function Hr(t){return t.data||{}}function Gr(t){return t.resolve||{}}var io=new T("",{factory:()=>Ji});function oo(t,n,e,r,i,o,s){let a=t.get(io);return L(u=>p(u).pipe(x(c=>a(t,n,e,r,c.extractedUrl,i,o,s)),R(({state:c,tree:l})=>N(d({},u),{targetSnapshot:c,urlAfterRedirects:l}))))}function so(t,n){return L(e=>{let{targetSnapshot:r,guards:{canActivateChecks:i}}=e;if(!i.length)return p(e);let o=new Set(i.map(u=>u.route)),s=new Set;for(let u of o)if(!s.has(u))for(let c of Tn(u))s.add(c);let a=0;return I(s).pipe(be(u=>o.has(u)?ao(u,r,t,n):(u.data=St(u,u.parent,t).resolve,p(void 0))),A(()=>a++),Ot(1),L(u=>a===s.size?p(e):z))})}function Tn(t){let n=t.children.map(e=>Tn(e)).flat();return[t,...n]}function ao(t,n,e,r){let i=t.routeConfig,o=t._resolve;return i?.title!==void 0&&!fn(i)&&(o[ke]=i.title),Ge(()=>(t.data=St(t,t.parent,e).resolve,uo(o,t,n,r).pipe(R(s=>(t._resolvedData=s,t.data=d(d({},t.data),s),null)))))}function uo(t,n,e,r){let i=$t(t);if(i.length===0)return p({});let o={};return I(i).pipe(L(s=>co(t[s],n,e,r).pipe(V(),A(a=>{if(a instanceof ge)throw Ct(new Q,a);o[s]=a}))),Ot(1),R(()=>o),we(s=>yn(s)?z:ur(s)))}function co(t,n,e,r){let i=me(n)??r,o=Re(t,i),s=o.resolve?o.resolve(n,e):P(i,()=>o(n,e));return ae(s)}function xt(t){return x(n=>{let e=t(n);return e?I(e).pipe(R(()=>n)):p(n)})}var er=(()=>{class t{buildTitle(e){let r,i=e.root;for(;i!==void 0;)r=this.getResolvedTitleForRoute(i)??r,i=i.children.find(o=>o.outlet===f);return r}getResolvedTitleForRoute(e){return e.data[ke]}static \u0275fac=function(r){return new(r||t)};static \u0275prov=m({token:t,factory:()=>h(Mn),providedIn:"root"})}return t})(),Mn=(()=>{class t extends er{title;constructor(e){super(),this.title=e}updateTitle(e){let r=this.buildTitle(e);r!==void 0&&this.title.setTitle(r)}static \u0275fac=function(r){return new(r||t)(H($r))};static \u0275prov=m({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Se=new T("",{factory:()=>({})}),Be=new T(""),tr=(()=>{class t{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=h(Ur);async loadComponent(e,r){if(this.componentLoaders.get(r))return this.componentLoaders.get(r);if(r._loadedComponent)return Promise.resolve(r._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(r);let i=(async()=>{try{let o=await Zr(P(e,()=>r.loadComponent())),s=await Dn(On(o));return this.onLoadEndListener&&this.onLoadEndListener(r),r._loadedComponent=s,s}finally{this.componentLoaders.delete(r)}})();return this.componentLoaders.set(r,i),i}loadChildren(e,r){if(this.childrenLoaders.get(r))return this.childrenLoaders.get(r);if(r._loadedRoutes)return Promise.resolve({routes:r._loadedRoutes,injector:r._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(r);let i=(async()=>{try{let o=await En(r,this.compiler,e,this.onLoadEndListener);return r._loadedRoutes=o.routes,r._loadedInjector=o.injector,o}finally{this.childrenLoaders.delete(r)}})();return this.childrenLoaders.set(r,i),i}static \u0275fac=function(r){return new(r||t)};static \u0275prov=m({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();async function En(t,n,e,r){let i=await Zr(P(e,()=>t.loadChildren())),o=await Dn(On(i)),s;o instanceof Cr||Array.isArray(o)?s=o:s=await n.compileModuleAsync(o),r&&r(t);let a,u,c=!1;return Array.isArray(s)?(u=s,c=!0):(a=s.create(e).injector,u=a.get(Be,[],{optional:!0,self:!0}).flat()),{routes:u.map(Jt),injector:a}}function lo(t){return t&&typeof t=="object"&&"default"in t}function On(t){return lo(t)?t.default:t}async function Dn(t){return t}var At=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=m({token:t,factory:()=>h(ho),providedIn:"root"})}return t})(),ho=(()=>{class t{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,r){return e}static \u0275fac=function(r){return new(r||t)};static \u0275prov=m({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Nn=new T("");var fo=()=>{},Pn=new T(""),Un=(()=>{class t{currentNavigation=Ie(null,{equal:()=>!1});currentTransition=null;lastSuccessfulNavigation=Ie(null);events=new J;transitionAbortWithErrorSubject=new J;configLoader=h(tr);environmentInjector=h(ee);destroyRef=h(vr);urlSerializer=h(ze);rootContexts=h(ye);location=h(Je);inputBindingEnabled=h(Fe,{optional:!0})!==null;titleStrategy=h(er);options=h(Se,{optional:!0})||{};paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly";urlHandlingStrategy=h(At);createViewTransition=h(Nn,{optional:!0});navigationErrorHandler=h(Pn,{optional:!0});navigationId=0;get hasRequestedNavigation(){return this.navigationId!==0}transitions;afterPreactivation=()=>p(void 0);rootComponentType=null;destroyed=!1;constructor(){let e=i=>this.events.next(new ht(i)),r=i=>this.events.next(new ft(i));this.configLoader.onLoadEndListener=r,this.configLoader.onLoadStartListener=e,this.destroyRef.onDestroy(()=>{this.destroyed=!0})}complete(){this.transitions?.complete()}handleNavigationRequest(e){let r=++this.navigationId;G(()=>{this.transitions?.next(N(d({},e),{extractedUrl:this.urlHandlingStrategy.extract(e.rawUrl),targetSnapshot:null,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null,id:r}))})}setupNavigations(e){return this.transitions=new O(null),this.transitions.pipe(F(r=>r!==null),x(r=>{let i=!1,o=new AbortController;return p(r).pipe(x(s=>{if(this.navigationId>r.id)return this.cancelNavigationTransition(r,"",b.SupersededByNewNavigation),z;this.currentTransition=r;let a=this.lastSuccessfulNavigation();this.currentNavigation.set({id:s.id,initialUrl:s.rawUrl,extractedUrl:s.extractedUrl,targetBrowserUrl:typeof s.extras.browserUrl=="string"?this.urlSerializer.parse(s.extras.browserUrl):s.extras.browserUrl,trigger:s.source,extras:s.extras,previousNavigation:a?N(d({},a),{previousNavigation:null}):null,abort:()=>o.abort()});let u=!e.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),c=s.extras.onSameUrlNavigation??e.onSameUrlNavigation;if(!u&&c!=="reload")return this.events.next(new q(s.id,this.urlSerializer.serialize(s.rawUrl),"",Ue.IgnoredSameUrlNavigation)),s.resolve(!1),z;if(this.urlHandlingStrategy.shouldProcessUrl(s.rawUrl))return p(s).pipe(x(l=>(this.events.next(new se(l.id,this.urlSerializer.serialize(l.extractedUrl),l.source,l.restoredState)),l.id!==this.navigationId?z:Promise.resolve(l))),oo(this.environmentInjector,this.configLoader,this.rootComponentType,e.config,this.urlSerializer,this.paramsInheritanceStrategy,o.signal),A(l=>{r.targetSnapshot=l.targetSnapshot,r.urlAfterRedirects=l.urlAfterRedirects,this.currentNavigation.update(C=>(C.finalUrl=l.urlAfterRedirects,C));let v=new _e(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot);this.events.next(v)}));if(u&&this.urlHandlingStrategy.shouldProcessUrl(s.currentRawUrl)){let{id:l,extractedUrl:v,source:C,restoredState:w,extras:Z}=s,Y=new se(l,this.urlSerializer.serialize(v),C,w);this.events.next(Y);let X=dn(this.rootComponentType).snapshot;return this.currentTransition=r=N(d({},s),{targetSnapshot:X,urlAfterRedirects:v,extras:N(d({},Z),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.update(He=>(He.finalUrl=v,He)),p(r)}else return this.events.next(new q(s.id,this.urlSerializer.serialize(s.extractedUrl),"",Ue.IgnoredByUrlHandlingStrategy)),s.resolve(!1),z}),A(s=>{let a=new ut(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(a)}),R(s=>(this.currentTransition=r=N(d({},s),{guards:Si(s.targetSnapshot,s.currentSnapshot,this.rootContexts)}),r)),Ni(this.environmentInjector,s=>this.events.next(s)),A(s=>{if(r.guardsResult=s.guardsResult,s.guardsResult&&typeof s.guardsResult!="boolean")throw Ct(this.urlSerializer,s.guardsResult);let a=new ct(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot,!!s.guardsResult);this.events.next(a)}),F(s=>s.guardsResult?!0:(this.cancelNavigationTransition(s,"",b.GuardRejected),!1)),xt(s=>{if(s.guards.canActivateChecks.length!==0)return p(s).pipe(A(a=>{let u=new lt(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(u)}),x(a=>{let u=!1;return p(a).pipe(so(this.paramsInheritanceStrategy,this.environmentInjector),A({next:()=>u=!0,complete:()=>{u||this.cancelNavigationTransition(a,"",b.NoDataFromResolver)}}))}),A(a=>{let u=new dt(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(u)}))}),xt(s=>{let a=c=>{let l=[];if(c.routeConfig?._loadedComponent)c.component=c.routeConfig?._loadedComponent;else if(c.routeConfig?.loadComponent){let v=me(c)??this.environmentInjector;l.push(this.configLoader.loadComponent(v,c.routeConfig).then(C=>{c.component=C}))}for(let v of c.children)l.push(...a(v));return l},u=a(s.targetSnapshot.root);return u.length===0?p(s):I(Promise.all(u).then(()=>s))}),xt(()=>this.afterPreactivation()),x(()=>{let{currentSnapshot:s,targetSnapshot:a}=r,u=this.createViewTransition?.(this.environmentInjector,s.root,a.root);return u?I(u).pipe(R(()=>r)):p(r)}),R(s=>{let a=gi(e.routeReuseStrategy,s.targetSnapshot,s.currentRouterState);return this.currentTransition=r=N(d({},s),{targetRouterState:a}),this.currentNavigation.update(u=>(u.targetRouterState=a,u)),r}),A(()=>{this.events.next(new Le)}),Ri(this.rootContexts,e.routeReuseStrategy,s=>this.events.next(s),this.inputBindingEnabled),ce(1),We(Rn(o.signal).pipe(F(()=>!i&&!r.targetRouterState),A(()=>{this.cancelNavigationTransition(r,o.signal.reason+"",b.Aborted)}))),A({next:s=>{i=!0,this.currentNavigation.update(a=>(a.abort=fo,a)),this.lastSuccessfulNavigation.set(G(this.currentNavigation)),this.events.next(new D(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects))),this.titleStrategy?.updateTitle(s.targetRouterState.snapshot),s.resolve(!0)},complete:()=>{i=!0}}),We(this.transitionAbortWithErrorSubject.pipe(A(s=>{throw s}))),dr(()=>{o.abort(),i||this.cancelNavigationTransition(r,"",b.SupersededByNewNavigation),this.currentTransition?.id===r.id&&(this.currentNavigation.set(null),this.currentTransition=null)}),we(s=>{if(this.destroyed)return r.resolve(!1),z;if(i=!0,mn(s))this.events.next(new k(r.id,this.urlSerializer.serialize(r.extractedUrl),s.message,s.cancellationCode)),yi(s)?this.events.next(new pe(s.url,s.navigationBehaviorOptions)):r.resolve(!1);else{let a=new fe(r.id,this.urlSerializer.serialize(r.extractedUrl),s,r.targetSnapshot??void 0);try{let u=P(this.environmentInjector,()=>this.navigationErrorHandler?.(a));if(u instanceof ge){let{message:c,cancellationCode:l}=Ct(this.urlSerializer,u);this.events.next(new k(r.id,this.urlSerializer.serialize(r.extractedUrl),c,l)),this.events.next(new pe(u.redirectTo,u.navigationBehaviorOptions))}else throw this.events.next(a),s}catch(u){this.options.resolveNavigationPromiseOnError?r.resolve(!1):r.reject(u)}}return z}))}))}cancelNavigationTransition(e,r,i){let o=new k(e.id,this.urlSerializer.serialize(e.extractedUrl),r,i);this.events.next(o),e.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let e=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),r=G(this.currentNavigation),i=r?.targetBrowserUrl??r?.extractedUrl;return e.toString()!==i?.toString()&&!r?.extras.skipLocationChange}static \u0275fac=function(r){return new(r||t)};static \u0275prov=m({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function po(t){return t!==De}var _n=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=m({token:t,factory:()=>h(go),providedIn:"root"})}return t})(),bt=class{shouldDetach(n){return!1}store(n,e){}shouldAttach(n){return!1}retrieve(n){return null}shouldReuseRoute(n,e){return n.routeConfig===e.routeConfig}},go=(()=>{class t extends bt{static \u0275fac=(()=>{let e;return function(i){return(e||(e=Ke(t)))(i||t)}})();static \u0275prov=m({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),rr=(()=>{class t{urlSerializer=h(ze);options=h(Se,{optional:!0})||{};canceledNavigationResolution=this.options.canceledNavigationResolution||"replace";location=h(Je);urlHandlingStrategy=h(At);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";currentUrlTree=new _;getCurrentUrlTree(){return this.currentUrlTree}rawUrlTree=this.currentUrlTree;getRawUrlTree(){return this.rawUrlTree}createBrowserPath({finalUrl:e,initialUrl:r,targetBrowserUrl:i}){let o=e!==void 0?this.urlHandlingStrategy.merge(e,r):r,s=i??o;return s instanceof _?this.urlSerializer.serialize(s):s}commitTransition({targetRouterState:e,finalUrl:r,initialUrl:i}){r&&e?(this.currentUrlTree=r,this.rawUrlTree=this.urlHandlingStrategy.merge(r,i),this.routerState=e):this.rawUrlTree=i}routerState=dn(null);getRouterState(){return this.routerState}stateMemento=this.createStateMemento();updateStateMemento(){this.stateMemento=this.createStateMemento()}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}resetInternalState({finalUrl:e}){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e??this.rawUrlTree)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=m({token:t,factory:()=>h(Ln),providedIn:"root"})}return t})(),Ln=(()=>{class t extends rr{currentPageId=0;lastSuccessfulId=-1;restoredState(){return this.location.getState()}get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}registerNonRouterCurrentEntryChangeListener(e){return this.location.subscribe(r=>{r.type==="popstate"&&setTimeout(()=>{e(r.url,r.state,"popstate")})})}handleRouterEvent(e,r){e instanceof se?this.updateStateMemento():e instanceof q?this.commitTransition(r):e instanceof _e?this.urlUpdateStrategy==="eager"&&(r.extras.skipLocationChange||this.setBrowserUrl(this.createBrowserPath(r),r)):e instanceof Le?(this.commitTransition(r),this.urlUpdateStrategy==="deferred"&&!r.extras.skipLocationChange&&this.setBrowserUrl(this.createBrowserPath(r),r)):e instanceof k&&e.code!==b.SupersededByNewNavigation&&e.code!==b.Redirect?this.restoreHistory(r):e instanceof fe?this.restoreHistory(r,!0):e instanceof D&&(this.lastSuccessfulId=e.id,this.currentPageId=this.browserPageId)}setBrowserUrl(e,{extras:r,id:i}){let{replaceUrl:o,state:s}=r;if(this.location.isCurrentPathEqualTo(e)||o){let a=this.browserPageId,u=d(d({},s),this.generateNgRouterState(i,a));this.location.replaceState(e,"",u)}else{let a=d(d({},s),this.generateNgRouterState(i,this.browserPageId+1));this.location.go(e,"",a)}}restoreHistory(e,r=!1){if(this.canceledNavigationResolution==="computed"){let i=this.browserPageId,o=this.currentPageId-i;o!==0?this.location.historyGo(o):this.getCurrentUrlTree()===e.finalUrl&&o===0&&(this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(r&&this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.getRawUrlTree()),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,r){return this.canceledNavigationResolution==="computed"?{navigationId:e,\u0275routerPageId:r}:{navigationId:e}}static \u0275fac=(()=>{let e;return function(i){return(e||(e=Ke(t)))(i||t)}})();static \u0275prov=m({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function nr(t,n){t.events.pipe(F(e=>e instanceof D||e instanceof k||e instanceof fe||e instanceof q),R(e=>e instanceof D||e instanceof q?0:(e instanceof k?e.code===b.Redirect||e.code===b.SupersededByNewNavigation:!1)?2:1),F(e=>e!==2),ce(1)).subscribe(()=>{n()})}var vo={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},mo={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},ue=(()=>{class t{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}disposed=!1;nonRouterCurrentEntryChangeSubscription;console=h(br);stateManager=h(rr);options=h(Se,{optional:!0})||{};pendingTasks=h(mr);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";navigationTransitions=h(Un);urlSerializer=h(ze);location=h(Je);urlHandlingStrategy=h(At);injector=h(ee);_events=new J;get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}navigated=!1;routeReuseStrategy=h(_n);onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore";config=h(Be,{optional:!0})?.flat()??[];componentInputBindingEnabled=!!h(Fe,{optional:!0});currentNavigation=this.navigationTransitions.currentNavigation.asReadonly();constructor(){this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this).subscribe({error:e=>{this.console.warn(e)}}),this.subscribeToNavigationEvents()}eventsSubscription=new or;subscribeToNavigationEvents(){let e=this.navigationTransitions.events.subscribe(r=>{try{let i=this.navigationTransitions.currentTransition,o=G(this.navigationTransitions.currentNavigation);if(i!==null&&o!==null){if(this.stateManager.handleRouterEvent(r,o),r instanceof k&&r.code!==b.Redirect&&r.code!==b.SupersededByNewNavigation)this.navigated=!0;else if(r instanceof D)this.navigated=!0;else if(r instanceof pe){let s=r.navigationBehaviorOptions,a=this.urlHandlingStrategy.merge(r.url,i.currentRawUrl),u=d({browserUrl:i.extras.browserUrl,info:i.extras.info,skipLocationChange:i.extras.skipLocationChange,replaceUrl:i.extras.replaceUrl||this.urlUpdateStrategy==="eager"||po(i.source)},s);this.scheduleNavigation(a,De,null,u,{resolve:i.resolve,reject:i.reject,promise:i.promise})}}di(r)&&this._events.next(r)}catch(i){this.navigationTransitions.transitionAbortWithErrorSubject.next(i)}});this.eventsSubscription.add(e)}resetRootComponentType(e){this.routerState.root.component=e,this.navigationTransitions.rootComponentType=e}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),De,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((e,r,i)=>{this.navigateToSyncWithBrowser(e,i,r)})}navigateToSyncWithBrowser(e,r,i){let o={replaceUrl:!0},s=i?.navigationId?i:null;if(i){let u=d({},i);delete u.navigationId,delete u.\u0275routerPageId,Object.keys(u).length!==0&&(o.state=u)}let a=this.parseUrl(e);this.scheduleNavigation(a,r,s,o).catch(u=>{this.disposed||this.injector.get(Qe)(u)})}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return G(this.navigationTransitions.currentNavigation)}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(e){this.config=e.map(Jt),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this._events.unsubscribe(),this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(e,r={}){let{relativeTo:i,queryParams:o,fragment:s,queryParamsHandling:a,preserveFragment:u}=r,c=u?this.currentUrlTree.fragment:s,l=null;switch(a??this.options.defaultQueryParamsHandling){case"merge":l=d(d({},this.currentUrlTree.queryParams),o);break;case"preserve":l=this.currentUrlTree.queryParams;break;default:l=o||null}l!==null&&(l=this.removeEmptyProps(l));let v;try{let C=i?i.snapshot:this.routerState.snapshot.root;v=an(C)}catch{(typeof e[0]!="string"||e[0][0]!=="/")&&(e=[]),v=this.currentUrlTree.root}return un(v,e,l,c??null,this.urlSerializer)}navigateByUrl(e,r={skipLocationChange:!1}){let i=K(e)?e:this.parseUrl(e),o=this.urlHandlingStrategy.merge(i,this.rawUrlTree);return this.scheduleNavigation(o,De,null,r)}navigate(e,r={skipLocationChange:!1}){return yo(e),this.navigateByUrl(this.createUrlTree(e,r),r)}serializeUrl(e){return this.urlSerializer.serialize(e)}parseUrl(e){try{return this.urlSerializer.parse(e)}catch{return this.console.warn(fr(4018,!1)),this.urlSerializer.parse("/")}}isActive(e,r){let i;if(r===!0?i=d({},vo):r===!1?i=d({},mo):i=r,K(e))return kr(this.currentUrlTree,e,i);let o=this.parseUrl(e);return kr(this.currentUrlTree,o,i)}removeEmptyProps(e){return Object.entries(e).reduce((r,[i,o])=>(o!=null&&(r[i]=o),r),{})}scheduleNavigation(e,r,i,o,s){if(this.disposed)return Promise.resolve(!1);let a,u,c;s?(a=s.resolve,u=s.reject,c=s.promise):c=new Promise((v,C)=>{a=v,u=C});let l=this.pendingTasks.add();return nr(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(l))}),this.navigationTransitions.handleNavigationRequest({source:r,restoredState:i,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:o,resolve:a,reject:u,promise:c,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),c.catch(v=>Promise.reject(v))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=m({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function yo(t){for(let n=0;n<t.length;n++)if(t[n]==null)throw new S(4008,!1)}var Tt=(()=>{class t{router;route;tabIndexAttribute;renderer;el;locationStrategy;reactiveHref=Ie(null);get href(){return G(this.reactiveHref)}set href(e){this.reactiveHref.set(e)}target;queryParams;fragment;queryParamsHandling;state;info;relativeTo;isAnchorElement;subscription;onChanges=new J;applicationErrorHandler=h(Qe);options=h(Se,{optional:!0});constructor(e,r,i,o,s,a){this.router=e,this.route=r,this.tabIndexAttribute=i,this.renderer=o,this.el=s,this.locationStrategy=a,this.reactiveHref.set(h(new _r("href"),{optional:!0}));let u=s.nativeElement.tagName?.toLowerCase();this.isAnchorElement=u==="a"||u==="area"||!!(typeof customElements=="object"&&customElements.get(u)?.observedAttributes?.includes?.("href")),this.isAnchorElement?this.setTabIndexIfNotOnNativeEl("0"):this.subscribeToNavigationEventsIfNecessary()}subscribeToNavigationEventsIfNecessary(){if(this.subscription!==void 0||!this.isAnchorElement)return;let e=this.preserveFragment,r=i=>i==="merge"||i==="preserve";e||=r(this.queryParamsHandling),e||=!this.queryParamsHandling&&!r(this.options?.defaultQueryParamsHandling),e&&(this.subscription=this.router.events.subscribe(i=>{i instanceof D&&this.updateHref()}))}preserveFragment=!1;skipLocationChange=!1;replaceUrl=!1;setTabIndexIfNotOnNativeEl(e){this.tabIndexAttribute!=null||this.isAnchorElement||this.applyAttributeValue("tabindex",e)}ngOnChanges(e){this.isAnchorElement&&(this.updateHref(),this.subscribeToNavigationEventsIfNecessary()),this.onChanges.next(this)}routerLinkInput=null;set routerLink(e){e==null?(this.routerLinkInput=null,this.setTabIndexIfNotOnNativeEl(null)):(K(e)?this.routerLinkInput=e:this.routerLinkInput=Array.isArray(e)?e:[e],this.setTabIndexIfNotOnNativeEl("0"))}onClick(e,r,i,o,s){let a=this.urlTree;if(a===null||this.isAnchorElement&&(e!==0||r||i||o||s||typeof this.target=="string"&&this.target!="_self"))return!0;let u={skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info};return this.router.navigateByUrl(a,u)?.catch(c=>{this.applicationErrorHandler(c)}),!this.isAnchorElement}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){let e=this.urlTree;this.reactiveHref.set(e!==null&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(e))??"":null)}applyAttributeValue(e,r){let i=this.renderer,o=this.el.nativeElement;r!==null?i.setAttribute(o,e,r):i.removeAttribute(o,e)}get urlTree(){return this.routerLinkInput===null?null:K(this.routerLinkInput)?this.routerLinkInput:this.router.createUrlTree(this.routerLinkInput,{relativeTo:this.relativeTo!==void 0?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}static \u0275fac=function(r){return new(r||t)(j(ue),j(B),yr("tabindex"),j(Pt),j(Nt),j(jr))};static \u0275dir=Te({type:t,selectors:[["","routerLink",""]],hostVars:2,hostBindings:function(r,i){r&1&&Or("click",function(s){return i.onClick(s.button,s.ctrlKey,s.shiftKey,s.altKey,s.metaKey)}),r&2&&Mr("href",i.reactiveHref(),Rr)("target",i.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[2,"preserveFragment","preserveFragment",Xe],skipLocationChange:[2,"skipLocationChange","skipLocationChange",Xe],replaceUrl:[2,"replaceUrl","replaceUrl",Xe],routerLink:"routerLink"},features:[Ae]})}return t})(),So=(()=>{class t{router;element;renderer;cdr;links;classes=[];routerEventsSubscription;linkInputChangesSubscription;_isActive=!1;get isActive(){return this._isActive}routerLinkActiveOptions={exact:!1};ariaCurrentWhenActive;isActiveChange=new te;link=h(Tt,{optional:!0});constructor(e,r,i,o){this.router=e,this.element=r,this.renderer=i,this.cdr=o,this.routerEventsSubscription=e.events.subscribe(s=>{s instanceof D&&this.update()})}ngAfterContentInit(){p(this.links.changes,p(null)).pipe(Ce()).subscribe(e=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();let e=[...this.links.toArray(),this.link].filter(r=>!!r).map(r=>r.onChanges);this.linkInputChangesSubscription=I(e).pipe(Ce()).subscribe(r=>{this._isActive!==this.isLinkActive(this.router)(r)&&this.update()})}set routerLinkActive(e){let r=Array.isArray(e)?e:e.split(" ");this.classes=r.filter(i=>!!i)}ngOnChanges(e){this.update()}ngOnDestroy(){this.routerEventsSubscription.unsubscribe(),this.linkInputChangesSubscription?.unsubscribe()}update(){!this.links||!this.router.navigated||queueMicrotask(()=>{let e=this.hasActiveLinks();this.classes.forEach(r=>{e?this.renderer.addClass(this.element.nativeElement,r):this.renderer.removeClass(this.element.nativeElement,r)}),e&&this.ariaCurrentWhenActive!==void 0?this.renderer.setAttribute(this.element.nativeElement,"aria-current",this.ariaCurrentWhenActive.toString()):this.renderer.removeAttribute(this.element.nativeElement,"aria-current"),this._isActive!==e&&(this._isActive=e,this.cdr.markForCheck(),this.isActiveChange.emit(e))})}isLinkActive(e){let r=Co(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact||!1;return i=>{let o=i.urlTree;return o?e.isActive(o,r):!1}}hasActiveLinks(){let e=this.isLinkActive(this.router);return this.link&&e(this.link)||this.links.some(e)}static \u0275fac=function(r){return new(r||t)(j(ue),j(Nt),j(Pt),j(Ye))};static \u0275dir=Te({type:t,selectors:[["","routerLinkActive",""]],contentQueries:function(r,i,o){if(r&1&&Dr(o,Tt,5),r&2){let s;Nr(s=Pr())&&(i.links=s)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],features:[Ae]})}return t})();function Co(t){return!!t.paths}var Ve=class{},wo=(()=>{class t{preload(e,r){return r().pipe(we(()=>p(null)))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=m({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var xn=(()=>{class t{router;injector;preloadingStrategy;loader;subscription;constructor(e,r,i,o){this.router=e,this.injector=r,this.preloadingStrategy=i,this.loader=o}setUpPreloading(){this.subscription=this.router.events.pipe(F(e=>e instanceof D),be(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(e,r){let i=[];for(let o of r){o.providers&&!o._injector&&(o._injector=Ze(o.providers,e,`Route: ${o.path}`));let s=o._injector??e,a=o._loadedInjector??s;(o.loadChildren&&!o._loadedRoutes&&o.canLoad===void 0||o.loadComponent&&!o._loadedComponent)&&i.push(this.preloadConfig(s,o)),(o.children||o._loadedRoutes)&&i.push(this.processRoutes(a,o.children??o._loadedRoutes))}return I(i).pipe(Ce())}preloadConfig(e,r){return this.preloadingStrategy.preload(r,()=>{let i;r.loadChildren&&r.canLoad===void 0?i=I(this.loader.loadChildren(e,r)):i=p(null);let o=i.pipe(L(s=>s===null?p(void 0):(r._loadedRoutes=s.routes,r._loadedInjector=s.injector,this.processRoutes(s.injector??e,s.routes))));if(r.loadComponent&&!r._loadedComponent){let s=this.loader.loadComponent(e,r);return I([o,s]).pipe(Ce())}else return o})}static \u0275fac=function(r){return new(r||t)(H(ue),H(ee),H(Ve),H(tr))};static \u0275prov=m({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),bo=new T("");function Io(t,...n){return Dt([{provide:Be,multi:!0,useValue:t},[],{provide:B,useFactory:Ao},{provide:Ar,multi:!0,useFactory:To},n.map(e=>e.\u0275providers)])}function Ao(){return h(ue).routerState.root}function jn(t,n){return{\u0275kind:t,\u0275providers:n}}function To(){let t=h(gr);return n=>{let e=t.get(Tr);if(n!==e.components[0])return;let r=t.get(ue),i=t.get(Mo);t.get(Eo)===1&&r.initialNavigation(),t.get($n,null,{optional:!0})?.setUpPreloading(),t.get(bo,null,{optional:!0})?.init(),r.resetRootComponentType(e.componentTypes[0]),i.closed||(i.next(),i.complete(),i.unsubscribe())}}var Mo=new T("",{factory:()=>new J}),Eo=new T("",{factory:()=>1});var $n=new T("");function Oo(t){return jn(0,[{provide:$n,useExisting:xn},{provide:Ve,useExisting:t}])}function Do(){return jn(8,[Yt,{provide:Fe,useExisting:Yt}])}export{D as a,B as b,Zt as c,ue as d,Tt as e,So as f,wo as g,Io as h,Oo as i,Do as j};
|
|
1
|
+
import{b as $r}from"./chunk-PKPBSTZA.js";import{b as jr,e as Je}from"./chunk-OTPG7USH.js";import{$a as Cr,$b as Nr,A as be,Bb as Er,C as ue,E as dr,F as V,G as Ot,Hc as Ur,J as hr,K as x,L as We,M as A,Na as Rr,O as S,P as fr,Pc as _r,R as m,Rc as Lr,T as pr,U as T,V as H,Vb as Or,Vc as Ye,W as h,X as Dt,Xa as Pt,Ya as j,Z as ee,Za as Sr,Zc as Xe,_ as P,_b as Dr,ac as Pr,ad as xr,bb as Ze,cb as wr,d as or,da as gr,e as sr,eb as Te,f as ar,fa as vr,g as J,ga as mr,h as O,ha as te,j as z,jb as br,k as I,ka as Qe,l as p,la as Ie,lb as Ir,m as cr,n as Mt,nb as Ar,o as ur,oa as G,ob as Tr,p as R,pa as Ae,q as Et,qa as Ke,r as L,ra as yr,rb as Mr,s as Ce,sa as Nt,t as lr,u as Ge,x as F,z as we}from"./chunk-T2WO6CVD.js";import{a as d,b as N}from"./chunk-7CGTOI24.js";var f="primary",ke=Symbol("RouteTitle"),jt=class{params;constructor(n){this.params=n||{}}has(n){return Object.prototype.hasOwnProperty.call(this.params,n)}get(n){if(this.has(n)){let e=this.params[n];return Array.isArray(e)?e[0]:e}return null}getAll(n){if(this.has(n)){let e=this.params[n];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}};function oe(t){return new jt(t)}function Wr(t,n,e){let r=e.path.split("/");if(r.length>t.length||e.pathMatch==="full"&&(n.hasChildren()||r.length<t.length))return null;let i={};for(let o=0;o<r.length;o++){let s=r[o],a=t[o];if(s[0]===":")i[s.substring(1)]=a;else if(s!==a.path)return null}return{consumed:t.slice(0,r.length),posParams:i}}function ot(t){return new Promise((n,e)=>{t.pipe(V()).subscribe({next:r=>n(r),error:r=>e(r)})})}function Fn(t,n){if(t.length!==n.length)return!1;for(let e=0;e<t.length;++e)if(!$(t[e],n[e]))return!1;return!0}function $(t,n){let e=t?$t(t):void 0,r=n?$t(n):void 0;if(!e||!r||e.length!=r.length)return!1;let i;for(let o=0;o<e.length;o++)if(i=e[o],!Qr(t[i],n[i]))return!1;return!0}function $t(t){return[...Object.keys(t),...Object.getOwnPropertySymbols(t)]}function Qr(t,n){if(Array.isArray(t)&&Array.isArray(n)){if(t.length!==n.length)return!1;let e=[...t].sort(),r=[...n].sort();return e.every((i,o)=>r[o]===i)}else return t===n}function Kr(t){return t.length>0?t[t.length-1]:null}function ae(t){return Mt(t)?t:Ir(t)?I(Promise.resolve(t)):p(t)}function Zr(t){return Mt(t)?ot(t):Promise.resolve(t)}var qn={exact:Xr,subset:Jr},Yr={exact:Bn,subset:Vn,ignored:()=>!0};function kr(t,n,e){return qn[e.paths](t.root,n.root,e.matrixParams)&&Yr[e.queryParams](t.queryParams,n.queryParams)&&!(e.fragment==="exact"&&t.fragment!==n.fragment)}function Bn(t,n){return $(t,n)}function Xr(t,n,e){if(!ne(t.segments,n.segments)||!rt(t.segments,n.segments,e)||t.numberOfChildren!==n.numberOfChildren)return!1;for(let r in n.children)if(!t.children[r]||!Xr(t.children[r],n.children[r],e))return!1;return!0}function Vn(t,n){return Object.keys(n).length<=Object.keys(t).length&&Object.keys(n).every(e=>Qr(t[e],n[e]))}function Jr(t,n,e){return en(t,n,n.segments,e)}function en(t,n,e,r){if(t.segments.length>e.length){let i=t.segments.slice(0,e.length);return!(!ne(i,e)||n.hasChildren()||!rt(i,e,r))}else if(t.segments.length===e.length){if(!ne(t.segments,e)||!rt(t.segments,e,r))return!1;for(let i in n.children)if(!t.children[i]||!Jr(t.children[i],n.children[i],r))return!1;return!0}else{let i=e.slice(0,t.segments.length),o=e.slice(t.segments.length);return!ne(t.segments,i)||!rt(t.segments,i,r)||!t.children[f]?!1:en(t.children[f],n,o,r)}}function rt(t,n,e){return n.every((r,i)=>Yr[e](t[i].parameters,r.parameters))}var _=class{root;queryParams;fragment;_queryParamMap;constructor(n=new g([],{}),e={},r=null){this.root=n,this.queryParams=e,this.fragment=r}get queryParamMap(){return this._queryParamMap??=oe(this.queryParams),this._queryParamMap}toString(){return Wn.serialize(this)}},g=class{segments;children;parent=null;constructor(n,e){this.segments=n,this.children=e,Object.values(e).forEach(r=>r.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return nt(this)}},W=class{path;parameters;_parameterMap;constructor(n,e){this.path=n,this.parameters=e}get parameterMap(){return this._parameterMap??=oe(this.parameters),this._parameterMap}toString(){return rn(this)}};function Hn(t,n){return ne(t,n)&&t.every((e,r)=>$(e.parameters,n[r].parameters))}function ne(t,n){return t.length!==n.length?!1:t.every((e,r)=>e.path===n[r].path)}function Gn(t,n){let e=[];return Object.entries(t.children).forEach(([r,i])=>{r===f&&(e=e.concat(n(i,r)))}),Object.entries(t.children).forEach(([r,i])=>{r!==f&&(e=e.concat(n(i,r)))}),e}var ze=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=m({token:t,factory:()=>new Q,providedIn:"root"})}return t})(),Q=class{parse(n){let e=new zt(n);return new _(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(n){let e=`/${Me(n.root,!0)}`,r=Zn(n.queryParams),i=typeof n.fragment=="string"?`#${Qn(n.fragment)}`:"";return`${e}${r}${i}`}},Wn=new Q;function nt(t){return t.segments.map(n=>rn(n)).join("/")}function Me(t,n){if(!t.hasChildren())return nt(t);if(n){let e=t.children[f]?Me(t.children[f],!1):"",r=[];return Object.entries(t.children).forEach(([i,o])=>{i!==f&&r.push(`${i}:${Me(o,!1)}`)}),r.length>0?`${e}(${r.join("//")})`:e}else{let e=Gn(t,(r,i)=>i===f?[Me(t.children[f],!1)]:[`${i}:${Me(r,!1)}`]);return Object.keys(t.children).length===1&&t.children[f]!=null?`${nt(t)}/${e[0]}`:`${nt(t)}/(${e.join("//")})`}}function tn(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function et(t){return tn(t).replace(/%3B/gi,";")}function Qn(t){return encodeURI(t)}function kt(t){return tn(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function it(t){return decodeURIComponent(t)}function zr(t){return it(t.replace(/\+/g,"%20"))}function rn(t){return`${kt(t.path)}${Kn(t.parameters)}`}function Kn(t){return Object.entries(t).map(([n,e])=>`;${kt(n)}=${kt(e)}`).join("")}function Zn(t){let n=Object.entries(t).map(([e,r])=>Array.isArray(r)?r.map(i=>`${et(e)}=${et(i)}`).join("&"):`${et(e)}=${et(r)}`).filter(e=>e);return n.length?`?${n.join("&")}`:""}var Yn=/^[^\/()?;#]+/;function Ut(t){let n=t.match(Yn);return n?n[0]:""}var Xn=/^[^\/()?;=#]+/;function Jn(t){let n=t.match(Xn);return n?n[0]:""}var ei=/^[^=?&#]+/;function ti(t){let n=t.match(ei);return n?n[0]:""}var ri=/^[^&#]+/;function ni(t){let n=t.match(ri);return n?n[0]:""}var zt=class{url;remaining;constructor(n){this.url=n,this.remaining=n}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new g([],{}):new g([],this.parseChildren())}parseQueryParams(){let n={};if(this.consumeOptional("?"))do this.parseQueryParam(n);while(this.consumeOptional("&"));return n}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let n=[];for(this.peekStartsWith("(")||n.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),n.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let r={};return this.peekStartsWith("(")&&(r=this.parseParens(!1)),(n.length>0||Object.keys(e).length>0)&&(r[f]=new g(n,e)),r}parseSegment(){let n=Ut(this.remaining);if(n===""&&this.peekStartsWith(";"))throw new S(4009,!1);return this.capture(n),new W(it(n),this.parseMatrixParams())}parseMatrixParams(){let n={};for(;this.consumeOptional(";");)this.parseParam(n);return n}parseParam(n){let e=Jn(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){let i=Ut(this.remaining);i&&(r=i,this.capture(r))}n[it(e)]=it(r)}parseQueryParam(n){let e=ti(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){let s=ni(this.remaining);s&&(r=s,this.capture(r))}let i=zr(e),o=zr(r);if(n.hasOwnProperty(i)){let s=n[i];Array.isArray(s)||(s=[s],n[i]=s),s.push(o)}else n[i]=o}parseParens(n){let e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let r=Ut(this.remaining),i=this.remaining[r.length];if(i!=="/"&&i!==")"&&i!==";")throw new S(4010,!1);let o;r.indexOf(":")>-1?(o=r.slice(0,r.indexOf(":")),this.capture(o),this.capture(":")):n&&(o=f);let s=this.parseChildren();e[o??f]=Object.keys(s).length===1&&s[f]?s[f]:new g([],s),this.consumeOptional("//")}return e}peekStartsWith(n){return this.remaining.startsWith(n)}consumeOptional(n){return this.peekStartsWith(n)?(this.remaining=this.remaining.substring(n.length),!0):!1}capture(n){if(!this.consumeOptional(n))throw new S(4011,!1)}};function nn(t){return t.segments.length>0?new g([],{[f]:t}):t}function on(t){let n={};for(let[r,i]of Object.entries(t.children)){let o=on(i);if(r===f&&o.segments.length===0&&o.hasChildren())for(let[s,a]of Object.entries(o.children))n[s]=a;else(o.segments.length>0||o.hasChildren())&&(n[r]=o)}let e=new g(t.segments,n);return ii(e)}function ii(t){if(t.numberOfChildren===1&&t.children[f]){let n=t.children[f];return new g(t.segments.concat(n.segments),n.children)}return t}function K(t){return t instanceof _}function sn(t,n,e=null,r=null,i=new Q){let o=an(t);return cn(o,n,e,r,i)}function an(t){let n;function e(o){let s={};for(let c of o.children){let u=e(c);s[c.outlet]=u}let a=new g(o.url,s);return o===t&&(n=a),a}let r=e(t.root),i=nn(r);return n??i}function cn(t,n,e,r,i){let o=t;for(;o.parent;)o=o.parent;if(n.length===0)return _t(o,o,o,e,r,i);let s=oi(n);if(s.toRoot())return _t(o,o,new g([],{}),e,r,i);let a=si(s,o,t),c=a.processChildren?Oe(a.segmentGroup,a.index,s.commands):ln(a.segmentGroup,a.index,s.commands);return _t(o,a.segmentGroup,c,e,r,i)}function st(t){return typeof t=="object"&&t!=null&&!t.outlets&&!t.segmentPath}function Pe(t){return typeof t=="object"&&t!=null&&t.outlets}function Fr(t,n,e){t||="\u0275";let r=new _;return r.queryParams={[t]:n},e.parse(e.serialize(r)).queryParams[t]}function _t(t,n,e,r,i,o){let s={};for(let[u,l]of Object.entries(r??{}))s[u]=Array.isArray(l)?l.map(v=>Fr(u,v,o)):Fr(u,l,o);let a;t===n?a=e:a=un(t,n,e);let c=nn(on(a));return new _(c,s,i)}function un(t,n,e){let r={};return Object.entries(t.children).forEach(([i,o])=>{o===n?r[i]=e:r[i]=un(o,n,e)}),new g(t.segments,r)}var at=class{isAbsolute;numberOfDoubleDots;commands;constructor(n,e,r){if(this.isAbsolute=n,this.numberOfDoubleDots=e,this.commands=r,n&&r.length>0&&st(r[0]))throw new S(4003,!1);let i=r.find(Pe);if(i&&i!==Kr(r))throw new S(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function oi(t){if(typeof t[0]=="string"&&t.length===1&&t[0]==="/")return new at(!0,0,t);let n=0,e=!1,r=t.reduce((i,o,s)=>{if(typeof o=="object"&&o!=null){if(o.outlets){let a={};return Object.entries(o.outlets).forEach(([c,u])=>{a[c]=typeof u=="string"?u.split("/"):u}),[...i,{outlets:a}]}if(o.segmentPath)return[...i,o.segmentPath]}return typeof o!="string"?[...i,o]:s===0?(o.split("/").forEach((a,c)=>{c==0&&a==="."||(c==0&&a===""?e=!0:a===".."?n++:a!=""&&i.push(a))}),i):[...i,o]},[]);return new at(e,n,r)}var de=class{segmentGroup;processChildren;index;constructor(n,e,r){this.segmentGroup=n,this.processChildren=e,this.index=r}};function si(t,n,e){if(t.isAbsolute)return new de(n,!0,0);if(!e)return new de(n,!1,NaN);if(e.parent===null)return new de(e,!0,0);let r=st(t.commands[0])?0:1,i=e.segments.length-1+r;return ai(e,i,t.numberOfDoubleDots)}function ai(t,n,e){let r=t,i=n,o=e;for(;o>i;){if(o-=i,r=r.parent,!r)throw new S(4005,!1);i=r.segments.length}return new de(r,!1,i-o)}function ci(t){return Pe(t[0])?t[0].outlets:{[f]:t}}function ln(t,n,e){if(t??=new g([],{}),t.segments.length===0&&t.hasChildren())return Oe(t,n,e);let r=ui(t,n,e),i=e.slice(r.commandIndex);if(r.match&&r.pathIndex<t.segments.length){let o=new g(t.segments.slice(0,r.pathIndex),{});return o.children[f]=new g(t.segments.slice(r.pathIndex),t.children),Oe(o,0,i)}else return r.match&&i.length===0?new g(t.segments,{}):r.match&&!t.hasChildren()?Ft(t,n,e):r.match?Oe(t,0,i):Ft(t,n,e)}function Oe(t,n,e){if(e.length===0)return new g(t.segments,{});{let r=ci(e),i={};if(Object.keys(r).some(o=>o!==f)&&t.children[f]&&t.numberOfChildren===1&&t.children[f].segments.length===0){let o=Oe(t.children[f],n,e);return new g(t.segments,o.children)}return Object.entries(r).forEach(([o,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(i[o]=ln(t.children[o],n,s))}),Object.entries(t.children).forEach(([o,s])=>{r[o]===void 0&&(i[o]=s)}),new g(t.segments,i)}}function ui(t,n,e){let r=0,i=n,o={match:!1,pathIndex:0,commandIndex:0};for(;i<t.segments.length;){if(r>=e.length)return o;let s=t.segments[i],a=e[r];if(Pe(a))break;let c=`${a}`,u=r<e.length-1?e[r+1]:null;if(i>0&&c===void 0)break;if(c&&u&&typeof u=="object"&&u.outlets===void 0){if(!Br(c,u,s))return o;r+=2}else{if(!Br(c,{},s))return o;r++}i++}return{match:!0,pathIndex:i,commandIndex:r}}function Ft(t,n,e){let r=t.segments.slice(0,n),i=0;for(;i<e.length;){let o=e[i];if(Pe(o)){let c=li(o.outlets);return new g(r,c)}if(i===0&&st(e[0])){let c=t.segments[n];r.push(new W(c.path,qr(e[0]))),i++;continue}let s=Pe(o)?o.outlets[f]:`${o}`,a=i<e.length-1?e[i+1]:null;s&&a&&st(a)?(r.push(new W(s,qr(a))),i+=2):(r.push(new W(s,{})),i++)}return new g(r,{})}function li(t){let n={};return Object.entries(t).forEach(([e,r])=>{typeof r=="string"&&(r=[r]),r!==null&&(n[e]=Ft(new g([],{}),0,r))}),n}function qr(t){let n={};return Object.entries(t).forEach(([e,r])=>n[e]=`${r}`),n}function Br(t,n,e){return t==e.path&&$(n,e.parameters)}var De="imperative",y=(function(t){return t[t.NavigationStart=0]="NavigationStart",t[t.NavigationEnd=1]="NavigationEnd",t[t.NavigationCancel=2]="NavigationCancel",t[t.NavigationError=3]="NavigationError",t[t.RoutesRecognized=4]="RoutesRecognized",t[t.ResolveStart=5]="ResolveStart",t[t.ResolveEnd=6]="ResolveEnd",t[t.GuardsCheckStart=7]="GuardsCheckStart",t[t.GuardsCheckEnd=8]="GuardsCheckEnd",t[t.RouteConfigLoadStart=9]="RouteConfigLoadStart",t[t.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",t[t.ChildActivationStart=11]="ChildActivationStart",t[t.ChildActivationEnd=12]="ChildActivationEnd",t[t.ActivationStart=13]="ActivationStart",t[t.ActivationEnd=14]="ActivationEnd",t[t.Scroll=15]="Scroll",t[t.NavigationSkipped=16]="NavigationSkipped",t})(y||{}),E=class{id;url;constructor(n,e){this.id=n,this.url=e}},se=class extends E{type=y.NavigationStart;navigationTrigger;restoredState;constructor(n,e,r="imperative",i=null){super(n,e),this.navigationTrigger=r,this.restoredState=i}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},D=class extends E{urlAfterRedirects;type=y.NavigationEnd;constructor(n,e,r){super(n,e),this.urlAfterRedirects=r}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},b=(function(t){return t[t.Redirect=0]="Redirect",t[t.SupersededByNewNavigation=1]="SupersededByNewNavigation",t[t.NoDataFromResolver=2]="NoDataFromResolver",t[t.GuardRejected=3]="GuardRejected",t[t.Aborted=4]="Aborted",t})(b||{}),Ue=(function(t){return t[t.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",t[t.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",t})(Ue||{}),k=class extends E{reason;code;type=y.NavigationCancel;constructor(n,e,r,i){super(n,e),this.reason=r,this.code=i}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},q=class extends E{reason;code;type=y.NavigationSkipped;constructor(n,e,r,i){super(n,e),this.reason=r,this.code=i}},fe=class extends E{error;target;type=y.NavigationError;constructor(n,e,r,i){super(n,e),this.error=r,this.target=i}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},_e=class extends E{urlAfterRedirects;state;type=y.RoutesRecognized;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},ct=class extends E{urlAfterRedirects;state;type=y.GuardsCheckStart;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},ut=class extends E{urlAfterRedirects;state;shouldActivate;type=y.GuardsCheckEnd;constructor(n,e,r,i,o){super(n,e),this.urlAfterRedirects=r,this.state=i,this.shouldActivate=o}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},lt=class extends E{urlAfterRedirects;state;type=y.ResolveStart;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},dt=class extends E{urlAfterRedirects;state;type=y.ResolveEnd;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},ht=class{route;type=y.RouteConfigLoadStart;constructor(n){this.route=n}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},ft=class{route;type=y.RouteConfigLoadEnd;constructor(n){this.route=n}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},pt=class{snapshot;type=y.ChildActivationStart;constructor(n){this.snapshot=n}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},gt=class{snapshot;type=y.ChildActivationEnd;constructor(n){this.snapshot=n}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},vt=class{snapshot;type=y.ActivationStart;constructor(n){this.snapshot=n}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},mt=class{snapshot;type=y.ActivationEnd;constructor(n){this.snapshot=n}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}};var Le=class{},pe=class{url;navigationBehaviorOptions;constructor(n,e){this.url=n,this.navigationBehaviorOptions=e}};function di(t){return!(t instanceof Le)&&!(t instanceof pe)}function hi(t,n){return t.providers&&!t._injector&&(t._injector=Ze(t.providers,n,`Route: ${t.path}`)),t._injector??n}function U(t){return t.outlet||f}function fi(t,n){let e=t.filter(r=>U(r)===n);return e.push(...t.filter(r=>U(r)!==n)),e}function me(t){if(!t)return null;if(t.routeConfig?._injector)return t.routeConfig._injector;for(let n=t.parent;n;n=n.parent){let e=n.routeConfig;if(e?._loadedInjector)return e._loadedInjector;if(e?._injector)return e._injector}return null}var yt=class{rootInjector;outlet=null;route=null;children;attachRef=null;get injector(){return me(this.route?.snapshot)??this.rootInjector}constructor(n){this.rootInjector=n,this.children=new ye(this.rootInjector)}},ye=(()=>{class t{rootInjector;contexts=new Map;constructor(e){this.rootInjector=e}onChildOutletCreated(e,r){let i=this.getOrCreateContext(e);i.outlet=r,this.contexts.set(e,i)}onChildOutletDestroyed(e){let r=this.getContext(e);r&&(r.outlet=null,r.attachRef=null)}onOutletDeactivated(){let e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let r=this.getContext(e);return r||(r=new yt(this.rootInjector),this.contexts.set(e,r)),r}getContext(e){return this.contexts.get(e)||null}static \u0275fac=function(r){return new(r||t)(H(ee))};static \u0275prov=m({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Rt=class{_root;constructor(n){this._root=n}get root(){return this._root.value}parent(n){let e=this.pathFromRoot(n);return e.length>1?e[e.length-2]:null}children(n){let e=qt(n,this._root);return e?e.children.map(r=>r.value):[]}firstChild(n){let e=qt(n,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(n){let e=Bt(n,this._root);return e.length<2?[]:e[e.length-2].children.map(i=>i.value).filter(i=>i!==n)}pathFromRoot(n){return Bt(n,this._root).map(e=>e.value)}};function qt(t,n){if(t===n.value)return n;for(let e of n.children){let r=qt(t,e);if(r)return r}return null}function Bt(t,n){if(t===n.value)return[n];for(let e of n.children){let r=Bt(t,e);if(r.length)return r.unshift(n),r}return[]}var M=class{value;children;constructor(n,e){this.value=n,this.children=e}toString(){return`TreeNode(${this.value})`}};function le(t){let n={};return t&&t.children.forEach(e=>n[e.value.outlet]=e),n}var xe=class extends Rt{snapshot;constructor(n,e){super(n),this.snapshot=e,Kt(this,n)}toString(){return this.snapshot.toString()}};function dn(t){let n=pi(t),e=new O([new W("",{})]),r=new O({}),i=new O({}),o=new O({}),s=new O(""),a=new B(e,r,o,s,i,f,t,n.root);return a.snapshot=n.root,new xe(new M(a,[]),n)}function pi(t){let n={},e={},r={},o=new ie([],n,r,"",e,f,t,null,{});return new je("",new M(o,[]))}var B=class{urlSubject;paramsSubject;queryParamsSubject;fragmentSubject;dataSubject;outlet;component;snapshot;_futureSnapshot;_routerState;_paramMap;_queryParamMap;title;url;params;queryParams;fragment;data;constructor(n,e,r,i,o,s,a,c){this.urlSubject=n,this.paramsSubject=e,this.queryParamsSubject=r,this.fragmentSubject=i,this.dataSubject=o,this.outlet=s,this.component=a,this._futureSnapshot=c,this.title=this.dataSubject?.pipe(R(u=>u[ke]))??p(void 0),this.url=n,this.params=e,this.queryParams=r,this.fragment=i,this.data=o}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(R(n=>oe(n))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(R(n=>oe(n))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function St(t,n,e="emptyOnly"){let r,{routeConfig:i}=t;return n!==null&&(e==="always"||i?.path===""||!n.component&&!n.routeConfig?.loadComponent)?r={params:d(d({},n.params),t.params),data:d(d({},n.data),t.data),resolve:d(d(d(d({},t.data),n.data),i?.data),t._resolvedData)}:r={params:d({},t.params),data:d({},t.data),resolve:d(d({},t.data),t._resolvedData??{})},i&&fn(i)&&(r.resolve[ke]=i.title),r}var ie=class{url;params;queryParams;fragment;data;outlet;component;routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;get title(){return this.data?.[ke]}constructor(n,e,r,i,o,s,a,c,u){this.url=n,this.params=e,this.queryParams=r,this.fragment=i,this.data=o,this.outlet=s,this.component=a,this.routeConfig=c,this._resolve=u}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=oe(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=oe(this.queryParams),this._queryParamMap}toString(){let n=this.url.map(r=>r.toString()).join("/"),e=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${n}', path:'${e}')`}},je=class extends Rt{url;constructor(n,e){super(e),this.url=n,Kt(this,e)}toString(){return hn(this._root)}};function Kt(t,n){n.value._routerState=t,n.children.forEach(e=>Kt(t,e))}function hn(t){let n=t.children.length>0?` { ${t.children.map(hn).join(", ")} } `:"";return`${t.value}${n}`}function Lt(t){if(t.snapshot){let n=t.snapshot,e=t._futureSnapshot;t.snapshot=e,$(n.queryParams,e.queryParams)||t.queryParamsSubject.next(e.queryParams),n.fragment!==e.fragment&&t.fragmentSubject.next(e.fragment),$(n.params,e.params)||t.paramsSubject.next(e.params),Fn(n.url,e.url)||t.urlSubject.next(e.url),$(n.data,e.data)||t.dataSubject.next(e.data)}else t.snapshot=t._futureSnapshot,t.dataSubject.next(t._futureSnapshot.data)}function Vt(t,n){let e=$(t.params,n.params)&&Hn(t.url,n.url),r=!t.parent!=!n.parent;return e&&!r&&(!t.parent||Vt(t.parent,n.parent))}function fn(t){return typeof t.title=="string"||t.title===null}var pn=new T(""),Zt=(()=>{class t{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=f;activateEvents=new te;deactivateEvents=new te;attachEvents=new te;detachEvents=new te;routerOutletData=Lr();parentContexts=h(ye);location=h(Sr);changeDetector=h(Ye);inputBinder=h(Fe,{optional:!0});supportsBindingToComponentInputs=!0;ngOnChanges(e){if(e.name){let{firstChange:r,previousValue:i}=e.name;if(r)return;this.isTrackedInParentContexts(i)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(i)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(e){return this.parentContexts.getContext(e)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let e=this.parentContexts.getContext(this.name);e?.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new S(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new S(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new S(4012,!1);this.location.detach();let e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,r){this.activated=e,this._activatedRoute=r,this.location.insert(e.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){let e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,r){if(this.isActivated)throw new S(4013,!1);this._activatedRoute=e;let i=this.location,s=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,c=new Ht(e,a,i.injector,this.routerOutletData);this.activated=i.createComponent(s,{index:i.length,injector:c,environmentInjector:r}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Te({type:t,selectors:[["router-outlet"]],inputs:{name:"name",routerOutletData:[1,"routerOutletData"]},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],features:[Ae]})}return t})(),Ht=class{route;childContexts;parent;outletData;constructor(n,e,r,i){this.route=n,this.childContexts=e,this.parent=r,this.outletData=i}get(n,e){return n===B?this.route:n===ye?this.childContexts:n===pn?this.outletData:this.parent.get(n,e)}},Fe=new T(""),Yt=(()=>{class t{outletDataSubscriptions=new Map;bindActivatedRouteToOutletComponent(e){this.unsubscribeFromRouteData(e),this.subscribeToRouteData(e)}unsubscribeFromRouteData(e){this.outletDataSubscriptions.get(e)?.unsubscribe(),this.outletDataSubscriptions.delete(e)}subscribeToRouteData(e){let{activatedRoute:r}=e,i=Et([r.queryParams,r.params,r.data]).pipe(x(([o,s,a],c)=>(a=d(d(d({},o),s),a),c===0?p(a):Promise.resolve(a)))).subscribe(o=>{if(!e.isActivated||!e.activatedComponentRef||e.activatedRoute!==r||r.component===null){this.unsubscribeFromRouteData(e);return}let s=xr(r.component);if(!s){this.unsubscribeFromRouteData(e);return}for(let{templateName:a}of s.inputs)e.activatedComponentRef.setInput(a,o[a])});this.outletDataSubscriptions.set(e,i)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=m({token:t,factory:t.\u0275fac})}return t})(),Xt=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=wr({type:t,selectors:[["ng-component"]],exportAs:["emptyRouterOutlet"],decls:1,vars:0,template:function(r,i){r&1&&Er(0,"router-outlet")},dependencies:[Zt],encapsulation:2})}return t})();function Jt(t){let n=t.children&&t.children.map(Jt),e=n?N(d({},t),{children:n}):d({},t);return!e.component&&!e.loadComponent&&(n||e.loadChildren)&&e.outlet&&e.outlet!==f&&(e.component=Xt),e}function gi(t,n,e){let r=$e(t,n._root,e?e._root:void 0);return new xe(r,n)}function $e(t,n,e){if(e&&t.shouldReuseRoute(n.value,e.value.snapshot)){let r=e.value;r._futureSnapshot=n.value;let i=vi(t,n,e);return new M(r,i)}else{if(t.shouldAttach(n.value)){let o=t.retrieve(n.value);if(o!==null){let s=o.route;return s.value._futureSnapshot=n.value,s.children=n.children.map(a=>$e(t,a)),s}}let r=mi(n.value),i=n.children.map(o=>$e(t,o));return new M(r,i)}}function vi(t,n,e){return n.children.map(r=>{for(let i of e.children)if(t.shouldReuseRoute(r.value,i.value.snapshot))return $e(t,r,i);return $e(t,r)})}function mi(t){return new B(new O(t.url),new O(t.params),new O(t.queryParams),new O(t.fragment),new O(t.data),t.outlet,t.component,t)}var ge=class{redirectTo;navigationBehaviorOptions;constructor(n,e){this.redirectTo=n,this.navigationBehaviorOptions=e}},gn="ngNavigationCancelingError";function Ct(t,n){let{redirectTo:e,navigationBehaviorOptions:r}=K(n)?{redirectTo:n,navigationBehaviorOptions:void 0}:n,i=vn(!1,b.Redirect);return i.url=e,i.navigationBehaviorOptions=r,i}function vn(t,n){let e=new Error(`NavigationCancelingError: ${t||""}`);return e[gn]=!0,e.cancellationCode=n,e}function yi(t){return mn(t)&&K(t.url)}function mn(t){return!!t&&t[gn]}var Ri=(t,n,e,r)=>R(i=>(new Gt(n,i.targetRouterState,i.currentRouterState,e,r).activate(t),i)),Gt=class{routeReuseStrategy;futureState;currState;forwardEvent;inputBindingEnabled;constructor(n,e,r,i,o){this.routeReuseStrategy=n,this.futureState=e,this.currState=r,this.forwardEvent=i,this.inputBindingEnabled=o}activate(n){let e=this.futureState._root,r=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,r,n),Lt(this.futureState.root),this.activateChildRoutes(e,r,n)}deactivateChildRoutes(n,e,r){let i=le(e);n.children.forEach(o=>{let s=o.value.outlet;this.deactivateRoutes(o,i[s],r),delete i[s]}),Object.values(i).forEach(o=>{this.deactivateRouteAndItsChildren(o,r)})}deactivateRoutes(n,e,r){let i=n.value,o=e?e.value:null;if(i===o)if(i.component){let s=r.getContext(i.outlet);s&&this.deactivateChildRoutes(n,e,s.children)}else this.deactivateChildRoutes(n,e,r);else o&&this.deactivateRouteAndItsChildren(e,r)}deactivateRouteAndItsChildren(n,e){n.value.component&&this.routeReuseStrategy.shouldDetach(n.value.snapshot)?this.detachAndStoreRouteSubtree(n,e):this.deactivateRouteAndOutlet(n,e)}detachAndStoreRouteSubtree(n,e){let r=e.getContext(n.value.outlet),i=r&&n.value.component?r.children:e,o=le(n);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,i);if(r&&r.outlet){let s=r.outlet.detach(),a=r.children.onOutletDeactivated();this.routeReuseStrategy.store(n.value.snapshot,{componentRef:s,route:n,contexts:a})}}deactivateRouteAndOutlet(n,e){let r=e.getContext(n.value.outlet),i=r&&n.value.component?r.children:e,o=le(n);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,i);r&&(r.outlet&&(r.outlet.deactivate(),r.children.onOutletDeactivated()),r.attachRef=null,r.route=null)}activateChildRoutes(n,e,r){let i=le(e);n.children.forEach(o=>{this.activateRoutes(o,i[o.value.outlet],r),this.forwardEvent(new mt(o.value.snapshot))}),n.children.length&&this.forwardEvent(new gt(n.value.snapshot))}activateRoutes(n,e,r){let i=n.value,o=e?e.value:null;if(Lt(i),i===o)if(i.component){let s=r.getOrCreateContext(i.outlet);this.activateChildRoutes(n,e,s.children)}else this.activateChildRoutes(n,e,r);else if(i.component){let s=r.getOrCreateContext(i.outlet);if(this.routeReuseStrategy.shouldAttach(i.snapshot)){let a=this.routeReuseStrategy.retrieve(i.snapshot);this.routeReuseStrategy.store(i.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),Lt(a.route.value),this.activateChildRoutes(n,null,s.children)}else s.attachRef=null,s.route=i,s.outlet&&s.outlet.activateWith(i,s.injector),this.activateChildRoutes(n,null,s.children)}else this.activateChildRoutes(n,null,r)}},wt=class{path;route;constructor(n){this.path=n,this.route=this.path[this.path.length-1]}},he=class{component;route;constructor(n,e){this.component=n,this.route=e}};function Si(t,n,e){let r=t._root,i=n?n._root:null;return Ee(r,i,e,[r.value])}function Ci(t){let n=t.routeConfig?t.routeConfig.canActivateChild:null;return!n||n.length===0?null:{node:t,guards:n}}function Re(t,n){let e=Symbol(),r=n.get(t,e);return r===e?typeof t=="function"&&!pr(t)?t:n.get(t):r}function Ee(t,n,e,r,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=le(n);return t.children.forEach(s=>{wi(s,o[s.value.outlet],e,r.concat([s.value]),i),delete o[s.value.outlet]}),Object.entries(o).forEach(([s,a])=>Ne(a,e.getContext(s),i)),i}function wi(t,n,e,r,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=t.value,s=n?n.value:null,a=e?e.getContext(t.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){let c=bi(s,o,o.routeConfig.runGuardsAndResolvers);c?i.canActivateChecks.push(new wt(r)):(o.data=s.data,o._resolvedData=s._resolvedData),o.component?Ee(t,n,a?a.children:null,r,i):Ee(t,n,e,r,i),c&&a&&a.outlet&&a.outlet.isActivated&&i.canDeactivateChecks.push(new he(a.outlet.component,s))}else s&&Ne(n,a,i),i.canActivateChecks.push(new wt(r)),o.component?Ee(t,null,a?a.children:null,r,i):Ee(t,null,e,r,i);return i}function bi(t,n,e){if(typeof e=="function")return e(t,n);switch(e){case"pathParamsChange":return!ne(t.url,n.url);case"pathParamsOrQueryParamsChange":return!ne(t.url,n.url)||!$(t.queryParams,n.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Vt(t,n)||!$(t.queryParams,n.queryParams);case"paramsChange":default:return!Vt(t,n)}}function Ne(t,n,e){let r=le(t),i=t.value;Object.entries(r).forEach(([o,s])=>{i.component?n?Ne(s,n.children.getContext(o),e):Ne(s,null,e):Ne(s,n,e)}),i.component?n&&n.outlet&&n.outlet.isActivated?e.canDeactivateChecks.push(new he(n.outlet.component,i)):e.canDeactivateChecks.push(new he(null,i)):e.canDeactivateChecks.push(new he(null,i))}function qe(t){return typeof t=="function"}function Ii(t){return typeof t=="boolean"}function Ai(t){return t&&qe(t.canLoad)}function Ti(t){return t&&qe(t.canActivate)}function Mi(t){return t&&qe(t.canActivateChild)}function Ei(t){return t&&qe(t.canDeactivate)}function Oi(t){return t&&qe(t.canMatch)}function yn(t){return t instanceof ur||t?.name==="EmptyError"}var tt=Symbol("INITIAL_VALUE");function ve(){return x(t=>Et(t.map(n=>n.pipe(ue(1),hr(tt)))).pipe(R(n=>{for(let e of n)if(e!==!0){if(e===tt)return tt;if(e===!1||Di(e))return e}return!0}),F(n=>n!==tt),ue(1)))}function Di(t){return K(t)||t instanceof ge}function Rn(t){return t.aborted?p(void 0).pipe(ue(1)):new ar(n=>{let e=()=>{n.next(),n.complete()};return t.addEventListener("abort",e),()=>t.removeEventListener("abort",e)})}function Sn(t){return We(Rn(t))}function Ni(t,n){return L(e=>{let{targetSnapshot:r,currentSnapshot:i,guards:{canActivateChecks:o,canDeactivateChecks:s}}=e;return s.length===0&&o.length===0?p(N(d({},e),{guardsResult:!0})):Pi(s,r,i,t).pipe(L(a=>a&&Ii(a)?Ui(r,o,t,n):p(a)),R(a=>N(d({},e),{guardsResult:a})))})}function Pi(t,n,e,r){return I(t).pipe(L(i=>$i(i.component,i.route,e,n,r)),V(i=>i!==!0,!0))}function Ui(t,n,e,r){return I(n).pipe(be(i=>lr(Li(i.route.parent,r),_i(i.route,r),ji(t,i.path,e),xi(t,i.route,e))),V(i=>i!==!0,!0))}function _i(t,n){return t!==null&&n&&n(new vt(t)),p(!0)}function Li(t,n){return t!==null&&n&&n(new pt(t)),p(!0)}function xi(t,n,e){let r=n.routeConfig?n.routeConfig.canActivate:null;if(!r||r.length===0)return p(!0);let i=r.map(o=>Ge(()=>{let s=me(n)??e,a=Re(o,s),c=Ti(a)?a.canActivate(n,t):P(s,()=>a(n,t));return ae(c).pipe(V())}));return p(i).pipe(ve())}function ji(t,n,e){let r=n[n.length-1],o=n.slice(0,n.length-1).reverse().map(s=>Ci(s)).filter(s=>s!==null).map(s=>Ge(()=>{let a=s.guards.map(c=>{let u=me(s.node)??e,l=Re(c,u),v=Mi(l)?l.canActivateChild(r,t):P(u,()=>l(r,t));return ae(v).pipe(V())});return p(a).pipe(ve())}));return p(o).pipe(ve())}function $i(t,n,e,r,i){let o=n&&n.routeConfig?n.routeConfig.canDeactivate:null;if(!o||o.length===0)return p(!0);let s=o.map(a=>{let c=me(n)??i,u=Re(a,c),l=Ei(u)?u.canDeactivate(t,n,e,r):P(c,()=>u(t,n,e,r));return ae(l).pipe(V())});return p(s).pipe(ve())}function ki(t,n,e,r,i){let o=n.canLoad;if(o===void 0||o.length===0)return p(!0);let s=o.map(a=>{let c=Re(a,t),u=Ai(c)?c.canLoad(n,e):P(t,()=>c(n,e)),l=ae(u);return i?l.pipe(Sn(i)):l});return p(s).pipe(ve(),Cn(r))}function Cn(t){return sr(A(n=>{if(typeof n!="boolean")throw Ct(t,n)}),R(n=>n===!0))}function zi(t,n,e,r,i){let o=n.canMatch;if(!o||o.length===0)return p(!0);let s=o.map(a=>{let c=Re(a,t),u=Oi(c)?c.canMatch(n,e):P(t,()=>c(n,e)),l=ae(u);return i?l.pipe(Sn(i)):l});return p(s).pipe(ve(),Cn(r))}var re=class wn extends Error{segmentGroup;constructor(n){super(),this.segmentGroup=n||null,Object.setPrototypeOf(this,wn.prototype)}},Wt=class bn extends Error{urlTree;constructor(n){super(),this.urlTree=n,Object.setPrototypeOf(this,bn.prototype)}};function Fi(t){throw new S(4e3,!1)}function qi(t){throw vn(!1,b.GuardRejected)}var Bi=class{urlSerializer;urlTree;constructor(n,e){this.urlSerializer=n,this.urlTree=e}async lineralizeSegments(n,e){let r=[],i=e.root;for(;;){if(r=r.concat(i.segments),i.numberOfChildren===0)return r;if(i.numberOfChildren>1||!i.children[f])throw Fi(`${n.redirectTo}`);i=i.children[f]}}async applyRedirectCommands(n,e,r,i,o){let s=await Vi(e,i,o);if(s instanceof _)throw new Wt(s);let a=this.applyRedirectCreateUrlTree(s,this.urlSerializer.parse(s),n,r);if(s[0]==="/")throw new Wt(a);return a}applyRedirectCreateUrlTree(n,e,r,i){let o=this.createSegmentGroup(n,e.root,r,i);return new _(o,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(n,e){let r={};return Object.entries(n).forEach(([i,o])=>{if(typeof o=="string"&&o[0]===":"){let a=o.substring(1);r[i]=e[a]}else r[i]=o}),r}createSegmentGroup(n,e,r,i){let o=this.createSegments(n,e.segments,r,i),s={};return Object.entries(e.children).forEach(([a,c])=>{s[a]=this.createSegmentGroup(n,c,r,i)}),new g(o,s)}createSegments(n,e,r,i){return e.map(o=>o.path[0]===":"?this.findPosParam(n,o,i):this.findOrReturn(o,r))}findPosParam(n,e,r){let i=r[e.path.substring(1)];if(!i)throw new S(4001,!1);return i}findOrReturn(n,e){let r=0;for(let i of e){if(i.path===n.path)return e.splice(r),i;r++}return n}};function Vi(t,n,e){if(typeof t=="string")return Promise.resolve(t);let r=t,{queryParams:i,fragment:o,routeConfig:s,url:a,outlet:c,params:u,data:l,title:v}=n;return ot(ae(P(e,()=>r({params:u,data:l,queryParams:i,fragment:o,routeConfig:s,url:a,outlet:c,title:v}))))}var Qt={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function Hi(t,n,e,r,i,o){let s=In(t,n,e);return s.matched?(r=hi(n,r),zi(r,n,e,i,o).pipe(R(a=>a===!0?s:d({},Qt)))):p(s)}function In(t,n,e){if(n.path==="**")return Gi(e);if(n.path==="")return n.pathMatch==="full"&&(t.hasChildren()||e.length>0)?d({},Qt):{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};let i=(n.matcher||Wr)(e,t,n);if(!i)return d({},Qt);let o={};Object.entries(i.posParams??{}).forEach(([a,c])=>{o[a]=c.path});let s=i.consumed.length>0?d(d({},o),i.consumed[i.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:i.consumed,remainingSegments:e.slice(i.consumed.length),parameters:s,positionalParamSegments:i.posParams??{}}}function Gi(t){return{matched:!0,parameters:t.length>0?Kr(t).parameters:{},consumedSegments:t,remainingSegments:[],positionalParamSegments:{}}}function Vr(t,n,e,r){return e.length>0&&Ki(t,e,r)?{segmentGroup:new g(n,Qi(r,new g(e,t.children))),slicedSegments:[]}:e.length===0&&Zi(t,e,r)?{segmentGroup:new g(t.segments,Wi(t,e,r,t.children)),slicedSegments:e}:{segmentGroup:new g(t.segments,t.children),slicedSegments:e}}function Wi(t,n,e,r){let i={};for(let o of e)if(It(t,n,o)&&!r[U(o)]){let s=new g([],{});i[U(o)]=s}return d(d({},r),i)}function Qi(t,n){let e={};e[f]=n;for(let r of t)if(r.path===""&&U(r)!==f){let i=new g([],{});e[U(r)]=i}return e}function Ki(t,n,e){return e.some(r=>It(t,n,r)&&U(r)!==f)}function Zi(t,n,e){return e.some(r=>It(t,n,r))}function It(t,n,e){return(t.hasChildren()||n.length>0)&&e.pathMatch==="full"?!1:e.path===""}function Yi(t,n,e){return n.length===0&&!t.children[e]}var Xi=class{};async function Ji(t,n,e,r,i,o,s="emptyOnly",a){return new to(t,n,e,r,i,s,o,a).recognize()}var eo=31,to=class{injector;configLoader;rootComponentType;config;urlTree;paramsInheritanceStrategy;urlSerializer;abortSignal;applyRedirects;absoluteRedirectCount=0;allowRedirects=!0;constructor(n,e,r,i,o,s,a,c){this.injector=n,this.configLoader=e,this.rootComponentType=r,this.config=i,this.urlTree=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a,this.abortSignal=c,this.applyRedirects=new Bi(this.urlSerializer,this.urlTree)}noMatchError(n){return new S(4002,`'${n.segmentGroup}'`)}async recognize(){let n=Vr(this.urlTree.root,[],[],this.config).segmentGroup,{children:e,rootSnapshot:r}=await this.match(n),i=new M(r,e),o=new je("",i),s=sn(r,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,o.url=this.urlSerializer.serialize(s),{state:o,tree:s}}async match(n){let e=new ie([],Object.freeze({}),Object.freeze(d({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),f,this.rootComponentType,null,{});try{return{children:await this.processSegmentGroup(this.injector,this.config,n,f,e),rootSnapshot:e}}catch(r){if(r instanceof Wt)return this.urlTree=r.urlTree,this.match(r.urlTree.root);throw r instanceof re?this.noMatchError(r):r}}async processSegmentGroup(n,e,r,i,o){if(r.segments.length===0&&r.hasChildren())return this.processChildren(n,e,r,o);let s=await this.processSegment(n,e,r,r.segments,i,!0,o);return s instanceof M?[s]:[]}async processChildren(n,e,r,i){let o=[];for(let c of Object.keys(r.children))c==="primary"?o.unshift(c):o.push(c);let s=[];for(let c of o){let u=r.children[c],l=fi(e,c),v=await this.processSegmentGroup(n,l,u,c,i);s.push(...v)}let a=An(s);return ro(a),a}async processSegment(n,e,r,i,o,s,a){for(let c of e)try{return await this.processSegmentAgainstRoute(c._injector??n,e,c,r,i,o,s,a)}catch(u){if(u instanceof re||yn(u))continue;throw u}if(Yi(r,i,o))return new Xi;throw new re(r)}async processSegmentAgainstRoute(n,e,r,i,o,s,a,c){if(U(r)!==s&&(s===f||!It(i,o,r)))throw new re(i);if(r.redirectTo===void 0)return this.matchSegmentAgainstRoute(n,i,r,o,s,c);if(this.allowRedirects&&a)return this.expandSegmentAgainstRouteUsingRedirect(n,i,e,r,o,s,c);throw new re(i)}async expandSegmentAgainstRouteUsingRedirect(n,e,r,i,o,s,a){let{matched:c,parameters:u,consumedSegments:l,positionalParamSegments:v,remainingSegments:C}=In(e,i,o);if(!c)throw new re(e);typeof i.redirectTo=="string"&&i.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>eo&&(this.allowRedirects=!1));let w=new ie(o,u,Object.freeze(d({},this.urlTree.queryParams)),this.urlTree.fragment,Hr(i),U(i),i.component??i._loadedComponent??null,i,Gr(i)),Z=St(w,a,this.paramsInheritanceStrategy);if(w.params=Object.freeze(Z.params),w.data=Object.freeze(Z.data),this.abortSignal.aborted)throw new Error(this.abortSignal.reason);let Y=await this.applyRedirects.applyRedirectCommands(l,i.redirectTo,v,w,n),X=await this.applyRedirects.lineralizeSegments(i,Y);return this.processSegment(n,r,e,X.concat(C),s,!1,a)}async matchSegmentAgainstRoute(n,e,r,i,o,s){if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);let a=await ot(Hi(e,r,i,n,this.urlSerializer,this.abortSignal));if(r.path==="**"&&(e.children={}),!a?.matched)throw new re(e);n=r._injector??n;let{routes:c}=await this.getChildConfig(n,r,i),u=r._loadedInjector??n,{parameters:l,consumedSegments:v,remainingSegments:C}=a,w=new ie(v,l,Object.freeze(d({},this.urlTree.queryParams)),this.urlTree.fragment,Hr(r),U(r),r.component??r._loadedComponent??null,r,Gr(r)),Z=St(w,s,this.paramsInheritanceStrategy);w.params=Object.freeze(Z.params),w.data=Object.freeze(Z.data);let{segmentGroup:Y,slicedSegments:X}=Vr(e,v,C,c);if(X.length===0&&Y.hasChildren()){let kn=await this.processChildren(u,c,Y,w);return new M(w,kn)}if(c.length===0&&X.length===0)return new M(w,[]);let He=U(r)===o,ir=await this.processSegment(u,c,Y,X,He?f:o,!0,w);return new M(w,ir instanceof M?[ir]:[])}async getChildConfig(n,e,r){if(e.children)return{routes:e.children,injector:n};if(e.loadChildren){if(e._loadedRoutes!==void 0)return{routes:e._loadedRoutes,injector:e._loadedInjector};if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);if(await ot(ki(n,e,r,this.urlSerializer,this.abortSignal))){let o=await this.configLoader.loadChildren(n,e);return e._loadedRoutes=o.routes,e._loadedInjector=o.injector,o}throw qi(e)}return{routes:[],injector:n}}};function ro(t){t.sort((n,e)=>n.value.outlet===f?-1:e.value.outlet===f?1:n.value.outlet.localeCompare(e.value.outlet))}function no(t){let n=t.value.routeConfig;return n&&n.path===""}function An(t){let n=[],e=new Set;for(let r of t){if(!no(r)){n.push(r);continue}let i=n.find(o=>r.value.routeConfig===o.value.routeConfig);i!==void 0?(i.children.push(...r.children),e.add(i)):n.push(r)}for(let r of e){let i=An(r.children);n.push(new M(r.value,i))}return n.filter(r=>!e.has(r))}function Hr(t){return t.data||{}}function Gr(t){return t.resolve||{}}var io=new T("",{factory:()=>Ji});function oo(t,n,e,r,i,o,s){let a=t.get(io);return L(c=>p(c).pipe(x(u=>a(t,n,e,r,u.extractedUrl,i,o,s)),R(({state:u,tree:l})=>N(d({},c),{targetSnapshot:u,urlAfterRedirects:l}))))}function so(t,n){return L(e=>{let{targetSnapshot:r,guards:{canActivateChecks:i}}=e;if(!i.length)return p(e);let o=new Set(i.map(c=>c.route)),s=new Set;for(let c of o)if(!s.has(c))for(let u of Tn(c))s.add(u);let a=0;return I(s).pipe(be(c=>o.has(c)?ao(c,r,t,n):(c.data=St(c,c.parent,t).resolve,p(void 0))),A(()=>a++),Ot(1),L(c=>a===s.size?p(e):z))})}function Tn(t){let n=t.children.map(e=>Tn(e)).flat();return[t,...n]}function ao(t,n,e,r){let i=t.routeConfig,o=t._resolve;return i?.title!==void 0&&!fn(i)&&(o[ke]=i.title),Ge(()=>(t.data=St(t,t.parent,e).resolve,co(o,t,n,r).pipe(R(s=>(t._resolvedData=s,t.data=d(d({},t.data),s),null)))))}function co(t,n,e,r){let i=$t(t);if(i.length===0)return p({});let o={};return I(i).pipe(L(s=>uo(t[s],n,e,r).pipe(V(),A(a=>{if(a instanceof ge)throw Ct(new Q,a);o[s]=a}))),Ot(1),R(()=>o),we(s=>yn(s)?z:cr(s)))}function uo(t,n,e,r){let i=me(n)??r,o=Re(t,i),s=o.resolve?o.resolve(n,e):P(i,()=>o(n,e));return ae(s)}function xt(t){return x(n=>{let e=t(n);return e?I(e).pipe(R(()=>n)):p(n)})}var er=(()=>{class t{buildTitle(e){let r,i=e.root;for(;i!==void 0;)r=this.getResolvedTitleForRoute(i)??r,i=i.children.find(o=>o.outlet===f);return r}getResolvedTitleForRoute(e){return e.data[ke]}static \u0275fac=function(r){return new(r||t)};static \u0275prov=m({token:t,factory:()=>h(Mn),providedIn:"root"})}return t})(),Mn=(()=>{class t extends er{title;constructor(e){super(),this.title=e}updateTitle(e){let r=this.buildTitle(e);r!==void 0&&this.title.setTitle(r)}static \u0275fac=function(r){return new(r||t)(H($r))};static \u0275prov=m({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Se=new T("",{factory:()=>({})}),Be=new T(""),tr=(()=>{class t{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=h(Ur);async loadComponent(e,r){if(this.componentLoaders.get(r))return this.componentLoaders.get(r);if(r._loadedComponent)return Promise.resolve(r._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(r);let i=(async()=>{try{let o=await Zr(P(e,()=>r.loadComponent())),s=await Dn(On(o));return this.onLoadEndListener&&this.onLoadEndListener(r),r._loadedComponent=s,s}finally{this.componentLoaders.delete(r)}})();return this.componentLoaders.set(r,i),i}loadChildren(e,r){if(this.childrenLoaders.get(r))return this.childrenLoaders.get(r);if(r._loadedRoutes)return Promise.resolve({routes:r._loadedRoutes,injector:r._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(r);let i=(async()=>{try{let o=await En(r,this.compiler,e,this.onLoadEndListener);return r._loadedRoutes=o.routes,r._loadedInjector=o.injector,o}finally{this.childrenLoaders.delete(r)}})();return this.childrenLoaders.set(r,i),i}static \u0275fac=function(r){return new(r||t)};static \u0275prov=m({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();async function En(t,n,e,r){let i=await Zr(P(e,()=>t.loadChildren())),o=await Dn(On(i)),s;o instanceof Cr||Array.isArray(o)?s=o:s=await n.compileModuleAsync(o),r&&r(t);let a,c,u=!1;return Array.isArray(s)?(c=s,u=!0):(a=s.create(e).injector,c=a.get(Be,[],{optional:!0,self:!0}).flat()),{routes:c.map(Jt),injector:a}}function lo(t){return t&&typeof t=="object"&&"default"in t}function On(t){return lo(t)?t.default:t}async function Dn(t){return t}var At=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=m({token:t,factory:()=>h(ho),providedIn:"root"})}return t})(),ho=(()=>{class t{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,r){return e}static \u0275fac=function(r){return new(r||t)};static \u0275prov=m({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Nn=new T("");var fo=()=>{},Pn=new T(""),Un=(()=>{class t{currentNavigation=Ie(null,{equal:()=>!1});currentTransition=null;lastSuccessfulNavigation=Ie(null);events=new J;transitionAbortWithErrorSubject=new J;configLoader=h(tr);environmentInjector=h(ee);destroyRef=h(vr);urlSerializer=h(ze);rootContexts=h(ye);location=h(Je);inputBindingEnabled=h(Fe,{optional:!0})!==null;titleStrategy=h(er);options=h(Se,{optional:!0})||{};paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly";urlHandlingStrategy=h(At);createViewTransition=h(Nn,{optional:!0});navigationErrorHandler=h(Pn,{optional:!0});navigationId=0;get hasRequestedNavigation(){return this.navigationId!==0}transitions;afterPreactivation=()=>p(void 0);rootComponentType=null;destroyed=!1;constructor(){let e=i=>this.events.next(new ht(i)),r=i=>this.events.next(new ft(i));this.configLoader.onLoadEndListener=r,this.configLoader.onLoadStartListener=e,this.destroyRef.onDestroy(()=>{this.destroyed=!0})}complete(){this.transitions?.complete()}handleNavigationRequest(e){let r=++this.navigationId;G(()=>{this.transitions?.next(N(d({},e),{extractedUrl:this.urlHandlingStrategy.extract(e.rawUrl),targetSnapshot:null,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null,id:r}))})}setupNavigations(e){return this.transitions=new O(null),this.transitions.pipe(F(r=>r!==null),x(r=>{let i=!1,o=new AbortController;return p(r).pipe(x(s=>{if(this.navigationId>r.id)return this.cancelNavigationTransition(r,"",b.SupersededByNewNavigation),z;this.currentTransition=r;let a=this.lastSuccessfulNavigation();this.currentNavigation.set({id:s.id,initialUrl:s.rawUrl,extractedUrl:s.extractedUrl,targetBrowserUrl:typeof s.extras.browserUrl=="string"?this.urlSerializer.parse(s.extras.browserUrl):s.extras.browserUrl,trigger:s.source,extras:s.extras,previousNavigation:a?N(d({},a),{previousNavigation:null}):null,abort:()=>o.abort()});let c=!e.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),u=s.extras.onSameUrlNavigation??e.onSameUrlNavigation;if(!c&&u!=="reload")return this.events.next(new q(s.id,this.urlSerializer.serialize(s.rawUrl),"",Ue.IgnoredSameUrlNavigation)),s.resolve(!1),z;if(this.urlHandlingStrategy.shouldProcessUrl(s.rawUrl))return p(s).pipe(x(l=>(this.events.next(new se(l.id,this.urlSerializer.serialize(l.extractedUrl),l.source,l.restoredState)),l.id!==this.navigationId?z:Promise.resolve(l))),oo(this.environmentInjector,this.configLoader,this.rootComponentType,e.config,this.urlSerializer,this.paramsInheritanceStrategy,o.signal),A(l=>{r.targetSnapshot=l.targetSnapshot,r.urlAfterRedirects=l.urlAfterRedirects,this.currentNavigation.update(C=>(C.finalUrl=l.urlAfterRedirects,C));let v=new _e(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot);this.events.next(v)}));if(c&&this.urlHandlingStrategy.shouldProcessUrl(s.currentRawUrl)){let{id:l,extractedUrl:v,source:C,restoredState:w,extras:Z}=s,Y=new se(l,this.urlSerializer.serialize(v),C,w);this.events.next(Y);let X=dn(this.rootComponentType).snapshot;return this.currentTransition=r=N(d({},s),{targetSnapshot:X,urlAfterRedirects:v,extras:N(d({},Z),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.update(He=>(He.finalUrl=v,He)),p(r)}else return this.events.next(new q(s.id,this.urlSerializer.serialize(s.extractedUrl),"",Ue.IgnoredByUrlHandlingStrategy)),s.resolve(!1),z}),A(s=>{let a=new ct(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(a)}),R(s=>(this.currentTransition=r=N(d({},s),{guards:Si(s.targetSnapshot,s.currentSnapshot,this.rootContexts)}),r)),Ni(this.environmentInjector,s=>this.events.next(s)),A(s=>{if(r.guardsResult=s.guardsResult,s.guardsResult&&typeof s.guardsResult!="boolean")throw Ct(this.urlSerializer,s.guardsResult);let a=new ut(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot,!!s.guardsResult);this.events.next(a)}),F(s=>s.guardsResult?!0:(this.cancelNavigationTransition(s,"",b.GuardRejected),!1)),xt(s=>{if(s.guards.canActivateChecks.length!==0)return p(s).pipe(A(a=>{let c=new lt(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(c)}),x(a=>{let c=!1;return p(a).pipe(so(this.paramsInheritanceStrategy,this.environmentInjector),A({next:()=>c=!0,complete:()=>{c||this.cancelNavigationTransition(a,"",b.NoDataFromResolver)}}))}),A(a=>{let c=new dt(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(c)}))}),xt(s=>{let a=u=>{let l=[];if(u.routeConfig?._loadedComponent)u.component=u.routeConfig?._loadedComponent;else if(u.routeConfig?.loadComponent){let v=me(u)??this.environmentInjector;l.push(this.configLoader.loadComponent(v,u.routeConfig).then(C=>{u.component=C}))}for(let v of u.children)l.push(...a(v));return l},c=a(s.targetSnapshot.root);return c.length===0?p(s):I(Promise.all(c).then(()=>s))}),xt(()=>this.afterPreactivation()),x(()=>{let{currentSnapshot:s,targetSnapshot:a}=r,c=this.createViewTransition?.(this.environmentInjector,s.root,a.root);return c?I(c).pipe(R(()=>r)):p(r)}),R(s=>{let a=gi(e.routeReuseStrategy,s.targetSnapshot,s.currentRouterState);return this.currentTransition=r=N(d({},s),{targetRouterState:a}),this.currentNavigation.update(c=>(c.targetRouterState=a,c)),r}),A(()=>{this.events.next(new Le)}),Ri(this.rootContexts,e.routeReuseStrategy,s=>this.events.next(s),this.inputBindingEnabled),ue(1),We(Rn(o.signal).pipe(F(()=>!i&&!r.targetRouterState),A(()=>{this.cancelNavigationTransition(r,o.signal.reason+"",b.Aborted)}))),A({next:s=>{i=!0,this.currentNavigation.update(a=>(a.abort=fo,a)),this.lastSuccessfulNavigation.set(G(this.currentNavigation)),this.events.next(new D(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects))),this.titleStrategy?.updateTitle(s.targetRouterState.snapshot),s.resolve(!0)},complete:()=>{i=!0}}),We(this.transitionAbortWithErrorSubject.pipe(A(s=>{throw s}))),dr(()=>{o.abort(),i||this.cancelNavigationTransition(r,"",b.SupersededByNewNavigation),this.currentTransition?.id===r.id&&(this.currentNavigation.set(null),this.currentTransition=null)}),we(s=>{if(this.destroyed)return r.resolve(!1),z;if(i=!0,mn(s))this.events.next(new k(r.id,this.urlSerializer.serialize(r.extractedUrl),s.message,s.cancellationCode)),yi(s)?this.events.next(new pe(s.url,s.navigationBehaviorOptions)):r.resolve(!1);else{let a=new fe(r.id,this.urlSerializer.serialize(r.extractedUrl),s,r.targetSnapshot??void 0);try{let c=P(this.environmentInjector,()=>this.navigationErrorHandler?.(a));if(c instanceof ge){let{message:u,cancellationCode:l}=Ct(this.urlSerializer,c);this.events.next(new k(r.id,this.urlSerializer.serialize(r.extractedUrl),u,l)),this.events.next(new pe(c.redirectTo,c.navigationBehaviorOptions))}else throw this.events.next(a),s}catch(c){this.options.resolveNavigationPromiseOnError?r.resolve(!1):r.reject(c)}}return z}))}))}cancelNavigationTransition(e,r,i){let o=new k(e.id,this.urlSerializer.serialize(e.extractedUrl),r,i);this.events.next(o),e.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let e=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),r=G(this.currentNavigation),i=r?.targetBrowserUrl??r?.extractedUrl;return e.toString()!==i?.toString()&&!r?.extras.skipLocationChange}static \u0275fac=function(r){return new(r||t)};static \u0275prov=m({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function po(t){return t!==De}var _n=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=m({token:t,factory:()=>h(go),providedIn:"root"})}return t})(),bt=class{shouldDetach(n){return!1}store(n,e){}shouldAttach(n){return!1}retrieve(n){return null}shouldReuseRoute(n,e){return n.routeConfig===e.routeConfig}},go=(()=>{class t extends bt{static \u0275fac=(()=>{let e;return function(i){return(e||(e=Ke(t)))(i||t)}})();static \u0275prov=m({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),rr=(()=>{class t{urlSerializer=h(ze);options=h(Se,{optional:!0})||{};canceledNavigationResolution=this.options.canceledNavigationResolution||"replace";location=h(Je);urlHandlingStrategy=h(At);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";currentUrlTree=new _;getCurrentUrlTree(){return this.currentUrlTree}rawUrlTree=this.currentUrlTree;getRawUrlTree(){return this.rawUrlTree}createBrowserPath({finalUrl:e,initialUrl:r,targetBrowserUrl:i}){let o=e!==void 0?this.urlHandlingStrategy.merge(e,r):r,s=i??o;return s instanceof _?this.urlSerializer.serialize(s):s}commitTransition({targetRouterState:e,finalUrl:r,initialUrl:i}){r&&e?(this.currentUrlTree=r,this.rawUrlTree=this.urlHandlingStrategy.merge(r,i),this.routerState=e):this.rawUrlTree=i}routerState=dn(null);getRouterState(){return this.routerState}stateMemento=this.createStateMemento();updateStateMemento(){this.stateMemento=this.createStateMemento()}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}resetInternalState({finalUrl:e}){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e??this.rawUrlTree)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=m({token:t,factory:()=>h(Ln),providedIn:"root"})}return t})(),Ln=(()=>{class t extends rr{currentPageId=0;lastSuccessfulId=-1;restoredState(){return this.location.getState()}get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}registerNonRouterCurrentEntryChangeListener(e){return this.location.subscribe(r=>{r.type==="popstate"&&setTimeout(()=>{e(r.url,r.state,"popstate")})})}handleRouterEvent(e,r){e instanceof se?this.updateStateMemento():e instanceof q?this.commitTransition(r):e instanceof _e?this.urlUpdateStrategy==="eager"&&(r.extras.skipLocationChange||this.setBrowserUrl(this.createBrowserPath(r),r)):e instanceof Le?(this.commitTransition(r),this.urlUpdateStrategy==="deferred"&&!r.extras.skipLocationChange&&this.setBrowserUrl(this.createBrowserPath(r),r)):e instanceof k&&e.code!==b.SupersededByNewNavigation&&e.code!==b.Redirect?this.restoreHistory(r):e instanceof fe?this.restoreHistory(r,!0):e instanceof D&&(this.lastSuccessfulId=e.id,this.currentPageId=this.browserPageId)}setBrowserUrl(e,{extras:r,id:i}){let{replaceUrl:o,state:s}=r;if(this.location.isCurrentPathEqualTo(e)||o){let a=this.browserPageId,c=d(d({},s),this.generateNgRouterState(i,a));this.location.replaceState(e,"",c)}else{let a=d(d({},s),this.generateNgRouterState(i,this.browserPageId+1));this.location.go(e,"",a)}}restoreHistory(e,r=!1){if(this.canceledNavigationResolution==="computed"){let i=this.browserPageId,o=this.currentPageId-i;o!==0?this.location.historyGo(o):this.getCurrentUrlTree()===e.finalUrl&&o===0&&(this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(r&&this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.getRawUrlTree()),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,r){return this.canceledNavigationResolution==="computed"?{navigationId:e,\u0275routerPageId:r}:{navigationId:e}}static \u0275fac=(()=>{let e;return function(i){return(e||(e=Ke(t)))(i||t)}})();static \u0275prov=m({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function nr(t,n){t.events.pipe(F(e=>e instanceof D||e instanceof k||e instanceof fe||e instanceof q),R(e=>e instanceof D||e instanceof q?0:(e instanceof k?e.code===b.Redirect||e.code===b.SupersededByNewNavigation:!1)?2:1),F(e=>e!==2),ue(1)).subscribe(()=>{n()})}var vo={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},mo={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},ce=(()=>{class t{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}disposed=!1;nonRouterCurrentEntryChangeSubscription;console=h(br);stateManager=h(rr);options=h(Se,{optional:!0})||{};pendingTasks=h(mr);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";navigationTransitions=h(Un);urlSerializer=h(ze);location=h(Je);urlHandlingStrategy=h(At);injector=h(ee);_events=new J;get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}navigated=!1;routeReuseStrategy=h(_n);onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore";config=h(Be,{optional:!0})?.flat()??[];componentInputBindingEnabled=!!h(Fe,{optional:!0});currentNavigation=this.navigationTransitions.currentNavigation.asReadonly();constructor(){this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this).subscribe({error:e=>{this.console.warn(e)}}),this.subscribeToNavigationEvents()}eventsSubscription=new or;subscribeToNavigationEvents(){let e=this.navigationTransitions.events.subscribe(r=>{try{let i=this.navigationTransitions.currentTransition,o=G(this.navigationTransitions.currentNavigation);if(i!==null&&o!==null){if(this.stateManager.handleRouterEvent(r,o),r instanceof k&&r.code!==b.Redirect&&r.code!==b.SupersededByNewNavigation)this.navigated=!0;else if(r instanceof D)this.navigated=!0;else if(r instanceof pe){let s=r.navigationBehaviorOptions,a=this.urlHandlingStrategy.merge(r.url,i.currentRawUrl),c=d({browserUrl:i.extras.browserUrl,info:i.extras.info,skipLocationChange:i.extras.skipLocationChange,replaceUrl:i.extras.replaceUrl||this.urlUpdateStrategy==="eager"||po(i.source)},s);this.scheduleNavigation(a,De,null,c,{resolve:i.resolve,reject:i.reject,promise:i.promise})}}di(r)&&this._events.next(r)}catch(i){this.navigationTransitions.transitionAbortWithErrorSubject.next(i)}});this.eventsSubscription.add(e)}resetRootComponentType(e){this.routerState.root.component=e,this.navigationTransitions.rootComponentType=e}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),De,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((e,r,i)=>{this.navigateToSyncWithBrowser(e,i,r)})}navigateToSyncWithBrowser(e,r,i){let o={replaceUrl:!0},s=i?.navigationId?i:null;if(i){let c=d({},i);delete c.navigationId,delete c.\u0275routerPageId,Object.keys(c).length!==0&&(o.state=c)}let a=this.parseUrl(e);this.scheduleNavigation(a,r,s,o).catch(c=>{this.disposed||this.injector.get(Qe)(c)})}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return G(this.navigationTransitions.currentNavigation)}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(e){this.config=e.map(Jt),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this._events.unsubscribe(),this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(e,r={}){let{relativeTo:i,queryParams:o,fragment:s,queryParamsHandling:a,preserveFragment:c}=r,u=c?this.currentUrlTree.fragment:s,l=null;switch(a??this.options.defaultQueryParamsHandling){case"merge":l=d(d({},this.currentUrlTree.queryParams),o);break;case"preserve":l=this.currentUrlTree.queryParams;break;default:l=o||null}l!==null&&(l=this.removeEmptyProps(l));let v;try{let C=i?i.snapshot:this.routerState.snapshot.root;v=an(C)}catch{(typeof e[0]!="string"||e[0][0]!=="/")&&(e=[]),v=this.currentUrlTree.root}return cn(v,e,l,u??null,this.urlSerializer)}navigateByUrl(e,r={skipLocationChange:!1}){let i=K(e)?e:this.parseUrl(e),o=this.urlHandlingStrategy.merge(i,this.rawUrlTree);return this.scheduleNavigation(o,De,null,r)}navigate(e,r={skipLocationChange:!1}){return yo(e),this.navigateByUrl(this.createUrlTree(e,r),r)}serializeUrl(e){return this.urlSerializer.serialize(e)}parseUrl(e){try{return this.urlSerializer.parse(e)}catch{return this.console.warn(fr(4018,!1)),this.urlSerializer.parse("/")}}isActive(e,r){let i;if(r===!0?i=d({},vo):r===!1?i=d({},mo):i=r,K(e))return kr(this.currentUrlTree,e,i);let o=this.parseUrl(e);return kr(this.currentUrlTree,o,i)}removeEmptyProps(e){return Object.entries(e).reduce((r,[i,o])=>(o!=null&&(r[i]=o),r),{})}scheduleNavigation(e,r,i,o,s){if(this.disposed)return Promise.resolve(!1);let a,c,u;s?(a=s.resolve,c=s.reject,u=s.promise):u=new Promise((v,C)=>{a=v,c=C});let l=this.pendingTasks.add();return nr(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(l))}),this.navigationTransitions.handleNavigationRequest({source:r,restoredState:i,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:o,resolve:a,reject:c,promise:u,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),u.catch(v=>Promise.reject(v))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=m({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function yo(t){for(let n=0;n<t.length;n++)if(t[n]==null)throw new S(4008,!1)}var Tt=(()=>{class t{router;route;tabIndexAttribute;renderer;el;locationStrategy;reactiveHref=Ie(null);get href(){return G(this.reactiveHref)}set href(e){this.reactiveHref.set(e)}target;queryParams;fragment;queryParamsHandling;state;info;relativeTo;isAnchorElement;subscription;onChanges=new J;applicationErrorHandler=h(Qe);options=h(Se,{optional:!0});constructor(e,r,i,o,s,a){this.router=e,this.route=r,this.tabIndexAttribute=i,this.renderer=o,this.el=s,this.locationStrategy=a,this.reactiveHref.set(h(new _r("href"),{optional:!0}));let c=s.nativeElement.tagName?.toLowerCase();this.isAnchorElement=c==="a"||c==="area"||!!(typeof customElements=="object"&&customElements.get(c)?.observedAttributes?.includes?.("href")),this.isAnchorElement?this.setTabIndexIfNotOnNativeEl("0"):this.subscribeToNavigationEventsIfNecessary()}subscribeToNavigationEventsIfNecessary(){if(this.subscription!==void 0||!this.isAnchorElement)return;let e=this.preserveFragment,r=i=>i==="merge"||i==="preserve";e||=r(this.queryParamsHandling),e||=!this.queryParamsHandling&&!r(this.options?.defaultQueryParamsHandling),e&&(this.subscription=this.router.events.subscribe(i=>{i instanceof D&&this.updateHref()}))}preserveFragment=!1;skipLocationChange=!1;replaceUrl=!1;setTabIndexIfNotOnNativeEl(e){this.tabIndexAttribute!=null||this.isAnchorElement||this.applyAttributeValue("tabindex",e)}ngOnChanges(e){this.isAnchorElement&&(this.updateHref(),this.subscribeToNavigationEventsIfNecessary()),this.onChanges.next(this)}routerLinkInput=null;set routerLink(e){e==null?(this.routerLinkInput=null,this.setTabIndexIfNotOnNativeEl(null)):(K(e)?this.routerLinkInput=e:this.routerLinkInput=Array.isArray(e)?e:[e],this.setTabIndexIfNotOnNativeEl("0"))}onClick(e,r,i,o,s){let a=this.urlTree;if(a===null||this.isAnchorElement&&(e!==0||r||i||o||s||typeof this.target=="string"&&this.target!="_self"))return!0;let c={skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info};return this.router.navigateByUrl(a,c)?.catch(u=>{this.applicationErrorHandler(u)}),!this.isAnchorElement}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){let e=this.urlTree;this.reactiveHref.set(e!==null&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(e))??"":null)}applyAttributeValue(e,r){let i=this.renderer,o=this.el.nativeElement;r!==null?i.setAttribute(o,e,r):i.removeAttribute(o,e)}get urlTree(){return this.routerLinkInput===null?null:K(this.routerLinkInput)?this.routerLinkInput:this.router.createUrlTree(this.routerLinkInput,{relativeTo:this.relativeTo!==void 0?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}static \u0275fac=function(r){return new(r||t)(j(ce),j(B),yr("tabindex"),j(Pt),j(Nt),j(jr))};static \u0275dir=Te({type:t,selectors:[["","routerLink",""]],hostVars:2,hostBindings:function(r,i){r&1&&Or("click",function(s){return i.onClick(s.button,s.ctrlKey,s.shiftKey,s.altKey,s.metaKey)}),r&2&&Mr("href",i.reactiveHref(),Rr)("target",i.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[2,"preserveFragment","preserveFragment",Xe],skipLocationChange:[2,"skipLocationChange","skipLocationChange",Xe],replaceUrl:[2,"replaceUrl","replaceUrl",Xe],routerLink:"routerLink"},features:[Ae]})}return t})(),So=(()=>{class t{router;element;renderer;cdr;links;classes=[];routerEventsSubscription;linkInputChangesSubscription;_isActive=!1;get isActive(){return this._isActive}routerLinkActiveOptions={exact:!1};ariaCurrentWhenActive;isActiveChange=new te;link=h(Tt,{optional:!0});constructor(e,r,i,o){this.router=e,this.element=r,this.renderer=i,this.cdr=o,this.routerEventsSubscription=e.events.subscribe(s=>{s instanceof D&&this.update()})}ngAfterContentInit(){p(this.links.changes,p(null)).pipe(Ce()).subscribe(e=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();let e=[...this.links.toArray(),this.link].filter(r=>!!r).map(r=>r.onChanges);this.linkInputChangesSubscription=I(e).pipe(Ce()).subscribe(r=>{this._isActive!==this.isLinkActive(this.router)(r)&&this.update()})}set routerLinkActive(e){let r=Array.isArray(e)?e:e.split(" ");this.classes=r.filter(i=>!!i)}ngOnChanges(e){this.update()}ngOnDestroy(){this.routerEventsSubscription.unsubscribe(),this.linkInputChangesSubscription?.unsubscribe()}update(){!this.links||!this.router.navigated||queueMicrotask(()=>{let e=this.hasActiveLinks();this.classes.forEach(r=>{e?this.renderer.addClass(this.element.nativeElement,r):this.renderer.removeClass(this.element.nativeElement,r)}),e&&this.ariaCurrentWhenActive!==void 0?this.renderer.setAttribute(this.element.nativeElement,"aria-current",this.ariaCurrentWhenActive.toString()):this.renderer.removeAttribute(this.element.nativeElement,"aria-current"),this._isActive!==e&&(this._isActive=e,this.cdr.markForCheck(),this.isActiveChange.emit(e))})}isLinkActive(e){let r=Co(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact||!1;return i=>{let o=i.urlTree;return o?e.isActive(o,r):!1}}hasActiveLinks(){let e=this.isLinkActive(this.router);return this.link&&e(this.link)||this.links.some(e)}static \u0275fac=function(r){return new(r||t)(j(ce),j(Nt),j(Pt),j(Ye))};static \u0275dir=Te({type:t,selectors:[["","routerLinkActive",""]],contentQueries:function(r,i,o){if(r&1&&Dr(o,Tt,5),r&2){let s;Nr(s=Pr())&&(i.links=s)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],features:[Ae]})}return t})();function Co(t){return!!t.paths}var Ve=class{},wo=(()=>{class t{preload(e,r){return r().pipe(we(()=>p(null)))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=m({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var xn=(()=>{class t{router;injector;preloadingStrategy;loader;subscription;constructor(e,r,i,o){this.router=e,this.injector=r,this.preloadingStrategy=i,this.loader=o}setUpPreloading(){this.subscription=this.router.events.pipe(F(e=>e instanceof D),be(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(e,r){let i=[];for(let o of r){o.providers&&!o._injector&&(o._injector=Ze(o.providers,e,`Route: ${o.path}`));let s=o._injector??e,a=o._loadedInjector??s;(o.loadChildren&&!o._loadedRoutes&&o.canLoad===void 0||o.loadComponent&&!o._loadedComponent)&&i.push(this.preloadConfig(s,o)),(o.children||o._loadedRoutes)&&i.push(this.processRoutes(a,o.children??o._loadedRoutes))}return I(i).pipe(Ce())}preloadConfig(e,r){return this.preloadingStrategy.preload(r,()=>{let i;r.loadChildren&&r.canLoad===void 0?i=I(this.loader.loadChildren(e,r)):i=p(null);let o=i.pipe(L(s=>s===null?p(void 0):(r._loadedRoutes=s.routes,r._loadedInjector=s.injector,this.processRoutes(s.injector??e,s.routes))));if(r.loadComponent&&!r._loadedComponent){let s=this.loader.loadComponent(e,r);return I([o,s]).pipe(Ce())}else return o})}static \u0275fac=function(r){return new(r||t)(H(ce),H(ee),H(Ve),H(tr))};static \u0275prov=m({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),bo=new T("");function Io(t,...n){return Dt([{provide:Be,multi:!0,useValue:t},[],{provide:B,useFactory:Ao},{provide:Ar,multi:!0,useFactory:To},n.map(e=>e.\u0275providers)])}function Ao(){return h(ce).routerState.root}function jn(t,n){return{\u0275kind:t,\u0275providers:n}}function To(){let t=h(gr);return n=>{let e=t.get(Tr);if(n!==e.components[0])return;let r=t.get(ce),i=t.get(Mo);t.get(Eo)===1&&r.initialNavigation(),t.get($n,null,{optional:!0})?.setUpPreloading(),t.get(bo,null,{optional:!0})?.init(),r.resetRootComponentType(e.componentTypes[0]),i.closed||(i.next(),i.complete(),i.unsubscribe())}}var Mo=new T("",{factory:()=>new J}),Eo=new T("",{factory:()=>1});var $n=new T("");function Oo(t){return jn(0,[{provide:$n,useExisting:xn},{provide:Ve,useExisting:t}])}function Do(){return jn(8,[Yt,{provide:Fe,useExisting:Yt}])}export{D as a,B as b,Zt as c,ce as d,Tt as e,So as f,wo as g,Io as h,Oo as i,Do as j};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as v}from"./chunk-TELPJYLN.js";import{b as $,d as j}from"./chunk-5QZIKR6A.js";import{z as f}from"./chunk-HPNLQHW6.js";import{c as b}from"./chunk-BGTK25UG.js";import{ka as L}from"./chunk-OTPG7USH.js";import{Cb as N,Cc as G,Db as y,Eb as I,Ec as W,L as E,Mc as p,Pa as R,Pb as _,Qb as A,R as h,Rb as w,Sb as P,Tb as F,W as c,cb as M,f as m,g as k,la as n,na as O}from"./chunk-T2WO6CVD.js";var S=class r{reconnectTimer=n(15e3);countdown=n(0);connectTimerEffect=O(()=>{let e=this.reconnectTimer();this.countdown.set(e/1e3)});interval=setInterval(()=>{if(this.countdown()<=1){this.countdown.set(this.reconnectTimer()/1e3);return}this.countdown.set(this.countdown()-1)},1e3);ngOnDestroy(){clearInterval(this.interval)}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=M({type:r,selectors:[["app-disconnected-dialog"]],decls:8,vars:4,consts:()=>{let e;e=$localize`Reconnecting...`;let t;return t=$localize` The connection to the server is lost, attempting again in ${"\uFFFD#6\uFFFD"}:START_TAG_STRONG:0:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_STRONG:`,[e,t,["header",""],["content",""]]},template:function(t,s){t&1&&(N(0,"header",2)(1,"h3"),w(2,0),y()(),N(3,"div",3)(4,"p"),_(5,1),I(6,"strong"),G(7,"number"),A(),y()()),t&2&&(R(7),P(W(7,1,s.countdown(),"2.0-0")),F(5))},dependencies:[L],styles:["[_nghost-%COMP%]{display:block;padding:1rem}"],changeDetection:0})};var D=class r{dialog=c(f);#t=c(b);#i=n("disconnected");#s=n(null);#e=n(-1);#r=n(0);#l=n(!1);#u=new k;connectionStatus=this.#i.asReadonly();serverState=this.#s.asReadonly();#o=void 0;duration=c($).relayIsEnabled()?"94s":"299s";start(){this.#l.set(!0),this.#u=new k,this.#c()}stop(){this.#u.next(),this.#u.complete(),this.#l.set(!1)}reconnect(){this.stop(),this.start()}reconnectIfNeeded(){this.#l()||this.reconnect()}#c(){this.#i.set("connecting"),this.#t.getApiV1Serverstate({lastEventId:this.#e(),longpoll:this.#e()>=0,duration:this.duration}).pipe(E(this.#u)).subscribe({next:e=>{e&&this.#a(e),this.#n()},error:e=>{let s=this.#r()+1,a=Math.min(5e3*s,3e4);this.#r.set(s),s>3&&this.#i.set("disconnected"),this.#o||(this.#o=this.dialog.open(S,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1})),this.#o.component.reconnectTimer.set(a),setTimeout(()=>{this.#c()},a)}})}#a(e){this.#i.set("connected"),this.#s.set(e),this.#e.set(e.LastEventID??-1),this.#r.set(0)}#n(){this.#l()&&this.#c()}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac,providedIn:"root"})};var u=!1,T=class r{#t=c(j);#i=c(v);dialog=c(f);#s=null;#e=n("disconnected");#r=n(null);#l=n(null);#u=n(null);#o=n(null);#c=n(null);#a=void 0;#n=n({legacystatus:!0});shouldConnect=n(!0);connectionStatus=this.#e.asReadonly();serverState=this.#r.asReadonly();serverProgress=this.#l.asReadonly();serverSettings=this.#u.asReadonly();subscriptions=this.#n.asReadonly();serverTaskQueue=this.#o.asReadonly();backupListState=this.#c.asReadonly();#h=null;taskCompleted=new m(e=>{this.#h=e});#d=0;start(){this.#p(),this.shouldConnect.set(!0)}#p(){let e=this.#t.token();if(!e){console.error("No access token available");return}let t=window.location.protocol==="https:"?"wss:":"ws:",s=window.location.port?`:${window.location.port}`:"";window.location.port==="4200"&&(s=":8200");let a=window.location.hostname,g=this.#i.hasWebSocketAuth()?`${t}//${a}${s}/notifications`:`${t}//${a}${s}/notifications?token=${e}`;this.#e.set("connecting"),this.#s=new WebSocket(g),this.#s.onopen=()=>{u&&console.log("WebSocket connection established"),this.#i.hasWebSocketAuth()?(this.#e.set("authenticating"),this.#s?.send(JSON.stringify({Version:1,Token:e}))):this.#S()},this.#s.onmessage=d=>{if(this.#e()==="authenticating")try{let i=JSON.parse(d.data);i.Success?(u&&console.log("WebSocket authentication successful"),this.#S()):(console.error("WebSocket authentication failed:",i.Message),this.#e.set("disconnected"));return}catch(i){console.error("Error parsing WebSocket authentication reply",i),this.#e.set("disconnected");return}try{let i=JSON.parse(d.data),l=i?.Type;if(l==="legacystatus"||l==null)u&&console.log("Received legacy status update:",i),this.#r.set(i);else if(l==="reply"){let o=i;o.Success||console.error("WebSocket reply error:",o.Message)}else if(l==="progress"){let o=i;u&&console.log("Received progress update:",o.Data),this.#l.set(o.Data)}else if(l==="serversettings"){let o=i;u&&console.log("Received server settings update:",o.Data),this.#u.set(o.Data)}else if(l==="taskqueue"){let o=i;u&&console.log("Received task update:",o.Data),this.#o.set(o.Data)}else if(l==="taskcompleted"){let o=i;u&&console.log("Received task completed:",o.Data),this.#h?.next(o.Data)}else if(l==="backuplist"){let o=i;u&&console.log("Received backup list update:",o.Data),this.#c.set(o.Data)}else console.warn("Unknown WebSocket message type:",l)}catch(i){console.error("Error parsing WebSocket message",i)}},this.#s.onclose=d=>{u&&console.log("WebSocket connection closed",d),this.#e.set("disconnected"),this.shouldConnect()&&(this.#a||(this.#a=this.dialog.open(S,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1}),this.#a.component.reconnectTimer.set(15e3)),setTimeout(()=>this.#p(),5e3))},this.#s.onerror=d=>{console.error("WebSocket error",d),this.#e.set("disconnected")}}#S(){this.#e.set("connected");let e=this.#n();Object.keys(e).length>0&&Object.entries(e).forEach(([t,s])=>{s!=null&&this.sendSubscribeRequest(t,s)}),this.#a&&this.#a.close()}stop(){this.shouldConnect.set(!1),this.#s?.close()}reconnect(){this.#s?.close(),this.start()}reconnectIfNeeded(){this.#s?.readyState!==WebSocket.OPEN&&this.reconnect()}sendSubscribeRequest(e,t){this.#s?.send(JSON.stringify({Version:1,Id:`req-${++this.#d}`,Action:"sub",Service:e,Data:t||null}))}subscribe(e,t=void 0){let s=this.#n(),a=s[e];(!a||JSON.stringify(a)!==JSON.stringify(t||!0))&&(s[e]=t||!0,this.#n.set(s),this.#e()=="connected"&&this.sendSubscribeRequest(e,t))}unsubscribe(e){let t=this.#n();t[e]&&(delete t[e],this.#n.set(t),this.#e()=="connected"&&this.#s?.send(JSON.stringify({Version:1,Id:`req-${++this.#d}`,Action:"unsub",Service:e})))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac,providedIn:"root"})};var x=10,q=class r{#t=c(T);#i=c(D);#s=c(b);#e=c(v);#r=n("longpoll");#l=n(!1);#u=p(()=>this.#e.hasTaskCompletedOption()&&this.#r()==="websocket");#o={};#c=null;#a=!1;#n=[];constructor(){this.#t.subscribe("taskcompleted"),this.#t.taskCompleted.subscribe(e=>{if(this.#n.unshift(e),this.#n.length>x&&this.#n.pop(),!e.ID)return;let t=this.#o[e.ID];t&&(t.forEach(s=>{s.next(e),s.complete()}),delete this.#o[e.ID])})}connectionStatus=p(()=>this.#r()==="websocket"?this.#t.connectionStatus():this.#i.connectionStatus());isConnectionMethodSet=this.#l.asReadonly();serverState=p(()=>this.#r()==="websocket"?this.#t.serverState():this.#i.serverState());progressState=this.#t.serverProgress;taskQueueState=this.#t.serverTaskQueue;activeTaskQueueState=p(()=>this.#r()==="websocket"?this.#t.serverTaskQueue()?.map(t=>t.ID).filter(t=>t)??[]:(this.#i.serverState()?.SchedulerQueueIds??[]).map(t=>t.Item1).filter(t=>t));backupListState=p(()=>this.#t.backupListState());setConnectionMethod(e){e==="websocket"?(this.#t.reconnectIfNeeded(),this.#i.stop()):(this.#i.reconnectIfNeeded(),this.#t.stop()),this.#r.set(e),this.#l.set(!0)}getConnectionMethod(){return this.#r()}subscribe(e,t=null){this.#t.subscribe(e,t)}unsubscribe(e){this.#t.unsubscribe(e)}waitForTaskToComplete(e){return new m(t=>{let s=this.#n.find(a=>a.ID===e);if(s){t.next(s),t.complete();return}this.#o[e]=this.#o[e]||[],this.#o[e].push(t),this.#h()})}#h(){this.#a||this.#u()||(this.#a=!0,this.#d())}#d(){let e=Object.keys(this.#o).map(s=>parseInt(s,10));if(e.length===0){this.#p();return}let t=Math.min(...e);this.#s.getApiV1TaskByTaskid({taskid:t}).subscribe({next:s=>{s.TaskFinished!=null&&(this.#n.unshift(s),this.#n.length>x&&this.#n.pop(),this.#o[t].forEach(g=>{g.next(s),g.complete()}),delete this.#o[t])},complete:()=>{this.#c=window.setTimeout(()=>{this.#d()},1e3)},error:s=>{this.#c=window.setTimeout(()=>{this.#d()},3e3)}})}#p(){this.#c!==null&&(clearTimeout(this.#c),this.#c=null),this.#a=!1}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac,providedIn:"root"})};export{T as a,q as b};
|