@duplicati/ngclient 0.0.98 → 0.0.99
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/spk.woff2 +0 -0
- package/chunk-22CSSCKZ.js +1 -0
- package/chunk-23KHTRDM.js +1 -0
- package/chunk-2SGDSXNW.js +1 -0
- package/chunk-2ZK7AAG4.js +1 -0
- package/chunk-36ZZ3COU.js +1 -0
- package/{chunk-L7XUXGTC.js → chunk-3IZBE2NA.js} +1 -1
- package/chunk-3NDOYD25.js +1 -0
- package/chunk-3UJUWE5B.js +1 -0
- package/chunk-3V622MYY.js +1 -0
- package/chunk-436ZVGPO.js +1 -0
- package/chunk-47OESBLR.js +1 -0
- package/{chunk-VGNOUHVL.js → chunk-4FF7PF7J.js} +1 -1
- package/chunk-54SNAQYD.js +1 -0
- package/chunk-7NPADQLG.js +1 -0
- package/chunk-AKXOFDEQ.js +8 -0
- package/chunk-AMJ2CM2Q.js +1 -0
- package/chunk-ASEBN4DE.js +1 -0
- package/chunk-BKWTKAB4.js +1 -0
- package/{chunk-QZEFXB74.js → chunk-BWYJMRKB.js} +1 -1
- package/chunk-CEOO3F5U.js +1 -0
- package/chunk-D5WIWFNP.js +1 -0
- package/{chunk-FXYF7V3T.js → chunk-DJWNLIDJ.js} +1 -1
- package/chunk-DRBDCRHV.js +1 -0
- package/{chunk-PQ6MLKHT.js → chunk-E2LHQGCK.js} +1 -1
- package/chunk-EKIFJPZJ.js +1 -0
- package/{chunk-RIM5NXPM.js → chunk-EO2PLY2Q.js} +1 -1
- package/chunk-EQCQL7A4.js +1 -0
- package/{chunk-PZY4BMZL.js → chunk-FDMBNUIK.js} +1 -1
- package/{chunk-I5VNBLZK.js → chunk-FKTH6XCB.js} +1 -1
- package/chunk-FQPH5MIV.js +2 -0
- package/chunk-FRXAEGHW.js +1 -0
- package/chunk-GNTO7EKM.js +1 -0
- package/chunk-H6IX2D2G.js +1 -0
- package/chunk-I3TLRILF.js +1 -0
- package/{chunk-SBHSCERN.js → chunk-I457VUEG.js} +1 -1
- package/{chunk-J242X4NN.js → chunk-ISRMJKPG.js} +1 -1
- package/chunk-J6XKFGF5.js +2 -0
- package/chunk-JIPY2BNJ.js +1 -0
- package/{chunk-BSJ6OMWB.js → chunk-JJQARMUD.js} +1 -1
- package/{chunk-VDB64BFB.js → chunk-K3CYM6ID.js} +1 -1
- package/{chunk-H5SFF5D7.js → chunk-KABJYPCP.js} +1 -1
- package/chunk-LU4LP7JL.js +3 -0
- package/chunk-M7VDIUGU.js +1 -0
- package/{chunk-46YKZZQG.js → chunk-MEQPT4C3.js} +1 -1
- package/chunk-MYK7A3PZ.js +1 -0
- package/{chunk-Z5KSF3LW.js → chunk-NFME267J.js} +1 -1
- package/chunk-O6GWHO26.js +1 -0
- package/chunk-OH33D663.js +1 -0
- package/{chunk-3UY6NFJH.js → chunk-PFAU4FFV.js} +1 -1
- package/chunk-PGUALKQ6.js +1 -0
- package/{chunk-UNV7VK4Z.js → chunk-PX6A6XCQ.js} +1 -1
- package/chunk-QMMXH5TN.js +1 -0
- package/chunk-QRVYPTC6.js +8 -0
- package/chunk-RHW5QVAY.js +1 -0
- package/chunk-SFWQDWHT.js +1 -0
- package/chunk-UJZB6UQE.js +1 -0
- package/chunk-UXWTPWS6.js +1 -0
- package/chunk-VP44CSPI.js +1 -0
- package/{chunk-FYKL2LOY.js → chunk-VRGLHRK2.js} +1 -1
- package/{chunk-BCSA6WFY.js → chunk-WCLOWI5G.js} +1 -1
- package/chunk-WSLU6K4D.js +1 -0
- package/chunk-WVVXCHHS.js +1 -0
- package/chunk-X4FOF7ZO.js +1 -0
- package/chunk-XGARKXE4.js +7 -0
- package/chunk-XH2A67YP.js +1 -0
- package/chunk-XITZBHPE.js +1 -0
- package/chunk-XQKR67WI.js +1 -0
- package/chunk-YPSSTA3J.js +1 -0
- package/chunk-ZDBNCA7O.js +1 -0
- package/chunk-ZHAXIU33.js +1 -0
- package/chunk-ZP273LXY.js +1 -0
- package/index.html +2 -2
- package/main-73DNRGWN.js +1 -0
- package/package.json +1 -1
- package/{styles-GQ3J35VN.css → styles-2KPDWK5U.css} +1 -1
- package/chunk-25TWFWOC.js +0 -1
- package/chunk-2X7AJBJY.js +0 -1
- package/chunk-3CRLUTKZ.js +0 -6
- package/chunk-3WHFK5U5.js +0 -1
- package/chunk-5CB3EQEQ.js +0 -1
- package/chunk-5WXAGJAM.js +0 -3
- package/chunk-64CRTZO6.js +0 -1
- package/chunk-6LVF5Q7U.js +0 -1
- package/chunk-7I2OB6KM.js +0 -1
- package/chunk-AKURWKKM.js +0 -1
- package/chunk-BGEONYDG.js +0 -1
- package/chunk-BUHABQCR.js +0 -1
- package/chunk-C36EIFZ5.js +0 -1
- package/chunk-C4WJIBJ4.js +0 -1
- package/chunk-E5PZ2WTR.js +0 -1
- package/chunk-ERQAUCCL.js +0 -1
- package/chunk-F2L6ATMF.js +0 -1
- package/chunk-FXQBVRVU.js +0 -1
- package/chunk-GY445E4I.js +0 -1
- package/chunk-HJXCC47N.js +0 -6
- package/chunk-I6XPZQ7N.js +0 -1
- package/chunk-IN4ROBMK.js +0 -1
- package/chunk-KA2H467C.js +0 -1
- package/chunk-KCEYQGRU.js +0 -1
- package/chunk-KW2XPLTZ.js +0 -1
- package/chunk-LDGR7NUE.js +0 -1
- package/chunk-LLNGOQQI.js +0 -1
- package/chunk-NQYRWS7A.js +0 -1
- package/chunk-OL234C52.js +0 -1
- package/chunk-OLIPUVMA.js +0 -1
- package/chunk-ORIEYVVO.js +0 -1
- package/chunk-QQKVF4B4.js +0 -1
- package/chunk-R2D3CVSD.js +0 -1
- package/chunk-RKFABCKT.js +0 -2
- package/chunk-RNQH6BGW.js +0 -1
- package/chunk-RY7J7BHG.js +0 -7
- package/chunk-SHATBKDA.js +0 -1
- package/chunk-TDXJNPMY.js +0 -1
- package/chunk-TGK3F3XP.js +0 -1
- package/chunk-U7C24GJ2.js +0 -1
- package/chunk-W4U2FPZX.js +0 -1
- package/chunk-W6TPRQIT.js +0 -1
- package/chunk-XA4UOPDI.js +0 -1
- package/chunk-XQCRX6RA.js +0 -2
- package/chunk-YQ7U7A2N.js +0 -1
- package/chunk-Z2LU6ASK.js +0 -1
- package/chunk-ZDCJ72UD.js +0 -1
- package/chunk-ZDMCLDW7.js +0 -1
- package/chunk-ZUX7IMN4.js +0 -1
- package/chunk-ZV72G3X3.js +0 -1
- package/main-F254FFHF.js +0 -1
package/chunk-Z2LU6ASK.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as me}from"./chunk-BCSA6WFY.js";import{s as Ce}from"./chunk-BSJ6OMWB.js";import{a as pe,f as ue,l as he,n as _e,p as fe,y as ge}from"./chunk-3WHFK5U5.js";import{b as de}from"./chunk-64CRTZO6.js";import{ia as ce}from"./chunk-ERQAUCCL.js";import{Ab as u,Bb as h,Cb as te,D as V,Fb as X,Gb as I,Lc as A,Mc as R,Ob as W,Pb as ne,Qb as ie,Ra as g,Sb as k,Tb as p,Ub as oe,Vb as L,X as H,Ya as G,ca as N,cc as Q,da as y,db as J,dc as re,ec as K,fc as S,hc as se,ib as x,oa as j,pa as E,rb as q,sa as M,sb as Y,sc as $,tb as T,tc as le,v as U,wb as O,yb as Z,yc as ae,zb as ee}from"./chunk-RY7J7BHG.js";import{a as D,b as B}from"./chunk-7CGTOI24.js";var ve=["treeContainer"],Te=["formRef"],xe=[[["label"]],[["label"]],[["input"]]],be=["label","label","input"],Me=s=>({children:s,level:0}),Ee=s=>({$implicit:s}),Oe=(s,t)=>({children:s,level:t}),Se=(s,t)=>t.id;function we(s,t){if(s&1){let e=I();u(0,"spk-button-group")(1,"button",13),k("click",function(){N(e);let o=p();return y(o.pathDiscoveryMethod.set("browse"))}),W(2,4),h(),u(3,"button",13),k("click",function(){N(e);let o=p();return y(o.pathDiscoveryMethod.set("path"))}),W(4,5),h()()}if(s&2){let e=p();g(),T("active",e.pathDiscoveryMethod()==="browse"),g(2),T("active",e.pathDiscoveryMethod()==="path")}}function Fe(s,t){s&1&&te(0,"spk-progress-bar",9)}function Ne(s,t){s&1&&(u(0,"spk-icon",18),S(1,"caret-down"),h(),u(2,"spk-icon",16),S(3,"folder-open"),h())}function ye(s,t){s&1&&(u(0,"spk-icon"),S(1,"file"),h())}function ke(s,t){s&1&&(u(0,"spk-icon",18),S(1,"caret-right"),h(),u(2,"spk-icon",16),S(3,"folder"),h())}function Re(s,t){if(s&1&&x(0,Ne,4,0)(1,ye,2,0,"spk-icon")(2,ke,4,0),s&2){let e=p(2).$implicit;O(e.children.length?0:e.cls==="file"?1:2)}}function Ie(s,t){s&1&&(u(0,"spk-icon",16),S(1,"desktop-tower"),h())}function We(s,t){s&1&&X(0)}function Le(s,t){if(s&1&&x(0,We,1,0,"ng-container",10),s&2){let e=p(2).$implicit,n=p().$implicit;p();let o=K(7);q("ngTemplateOutlet",o)("ngTemplateOutletContext",$(5,Ee,le(2,Oe,e.children,n.level+1)))}}function $e(s,t){if(s&1){let e=I();u(0,"div",14,3),k("click",function(){N(e);let o=p().$implicit,i=p(2);return y(i.toggleNode(o.id,o))}),u(2,"div",15),x(3,Re,3,1)(4,Ie,2,0,"spk-icon",16),h(),u(5,"div",17),k("click",function(o){N(e);let i=p().$implicit,r=p(2);return y(r.toggleSelectedNode(o,i))}),S(6),h()(),x(7,Le,1,7,"ng-container")}if(s&2){let e=p().$implicit,n=p().$implicit,o=p();T("accepted",e.accepted===!0)("active",e.evalState===o.TreeEvalEnum.Included)("indeterminate",e.isIndeterminate)("open",e.children.length)("usually-hidden",e.hidden)("root",n.level===0),g(2),T("file",e.cls==="file"),g(),O(e.id!=="/"?3:4),g(3),se(" ",e.text," "),g(),O(e.children.length>0?7:-1)}}function Ae(s,t){if(s&1&&x(0,$e,8,17),s&2){let e=t.$implicit,n=p(2);O(e.hidden&&n._showHiddenNodes()||!e.hidden?0:-1)}}function De(s,t){if(s&1&&(u(0,"spk-list"),Z(1,Ae,1,1,null,null,Se),h()),s&2){let e=t.$implicit;Y("padding-left",e.level*.25,"rem"),g(),ee(e.children)}}function Be(s,t){s&1&&X(0)}function Ve(s,t){if(s&1){let e=I();u(0,"spk-toggle",19),k("click",function(){N(e);let o=p();return y(o._showHiddenNodes.set(!o._showHiddenNodes()))}),W(1,6),h()}if(s&2){let e=p();T("active",e._showHiddenNodes()),g(),ne(e.showFiles()?"files":"folders"),ie(1)}}var Pe=(i=>(i[i.ExcludedByParent=-2]="ExcludedByParent",i[i.Excluded=-1]="Excluded",i[i.None=0]="None",i[i.Included=1]="Included",i[i.IncludedByParent=2]="IncludedByParent",i))(Pe||{}),z=class s{#t=H(de);#r=H(me);multiSelect=E(!1);disabled=E(!1);showFiles=E(!1);selectFiles=E(!1);accepts=E(null);startingPath=E(null);rootPath=E(void 0);backupSettings=E(null);pathRefreshTrigger=E(!1);showHiddenNodes=E(!1);hideShortcuts=E(!1);includes=j();excludes=j();_showHiddenNodes=M(!1);treeContainerRef=G("treeContainer");formRef=G("formRef");pathDiscoveryMethod=M("browse");isLoading=M(!1);currentPath=M("/");#e=M(null);treeSearchQuery=M("");treeNodes=M([]);filterGroups=this.#r.filterGroups();isByBackupSettings=A(()=>{let t=this.backupSettings();return!(t===void 0||t?.id===void 0||t?.time===void 0)});searchableTreeNodes=A(()=>{let t=this.treeSearchQuery();return t?this.treeNodes().filter(e=>e.text?.toLowerCase().includes(t.toLowerCase())):this.treeNodes()});TreeEvalEnum=Pe;treeStructure=A(()=>{let t=this.showHiddenNodes(),e=this.currentPath().split("\0").filter(c=>c!==""&&c!=="/"),n=structuredClone(e);for(let c=0;c<n.length;c++){let d=n[c].slice(1);if(d.startsWith("{")&&d.endsWith("}")){let m=d.slice(1,-1),f=this.filterGroups?.FilterGroups[m];if(f&&f.length){let P=f.map(v=>`-${v}`);n.splice(c,1,...P)}}}let o=this.searchableTreeNodes(),i=new Map,r=this.rootPath(),_=this.accepts(),l=r?{id:r,resolvedpath:r,text:r,parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"}:{id:"/",resolvedpath:"/",text:"Computer",parentPath:"",children:[],evalState:0,isIndeterminate:!1};_&&(l.accepted=!0),i.set("/",l);for(let c of o){let a=c.id.replace(r??"",""),m=a.includes("\\")?"\\":"/",f=a.split(m).filter(Boolean),P="",v=l;for(let C of f){if(P+="/"+C,!i.has(P)){let w=c.hidden===!0&&t?0:this.#s(n,c.id,c.cls,v),b={id:c.id,isIndeterminate:this.isIndeterminate(n,c.id),evalState:w,parentPath:P,resolvedpath:c.id?.startsWith("%")?c.resolvedpath+"/":P,hidden:c.hidden,text:c.text,cls:c.cls,children:[]};_&&(b.accepted=this.matchAccepts(_,b)),i.set(P,b),v.children.push(b)}v=i.get(P)}}return[l]});#s(t,e,n,o){if(o.evalState===-1)return-2;let i=0,r=t.filter(l=>!l.startsWith("-")&&!l.startsWith("+")),_=t.filter(l=>l.startsWith("-")||l.startsWith("+"));if(r.length===0)return i;for(let l=0;l<r.length;l++){let c=r[l];if(e?.startsWith(c)){i=1;break}}if(_.length===0)return i;for(let l=0;l<_.length;l++){let c=_[l],a=c.slice(1),d=c.startsWith("-")?"exclude":"include",m=e.includes("\\"),f=m?"\\":"/";if((m?a.slice(2):a).startsWith(f)&&a.endsWith(f)){if(n!=="folder")continue;if(e===a){i=d==="include"?1:-1;break}}if(a.startsWith("*")&&a.endsWith(`*${f}`)){if(n!=="folder")continue;let C=a.slice(1,-2);if(C==="")break;if(e?.includes(C+f)){i=d==="include"?1:-1;break}}if(a.startsWith("[.*")&&a.endsWith(`[^\\${f}]*]`)){if(n!=="file")continue;let C=a.slice(3,-7);if(new RegExp(C).test(e)){i=d==="include"?1:-1;break}}if(a.startsWith("[")&&a.endsWith("]")){let C=a.slice(1,-1),w=this.translateCSharpRegex(C);if(new RegExp(`${w}`).test(e)){i=d==="include"?1:-1;break}}if(a.startsWith("*.")){if(n!=="file"||a.replace("*.","").length===0)continue;if(this.#n(e,a,!0)){i=d==="include"?1:-1;break}}if(a==="")continue;if(a===e){i=d==="include"?1:-1;break}if(this.#n(e,a,!0)){i=d==="include"?1:-1;break}}return i}translateCSharpRegex(t){let e=t;e=e.replace(/^@/,"");let n=/\(\?<(?<name>\w+)>(?<pattern>[^)]+)\)/g;return e=e.replace(n,(o,i,r)=>`(${r})`),e=e.replace(/\\/g,"\\\\"),e}isIndeterminate(t,e){return t.some(n=>n.startsWith(e))}#n(t,e,n=!1){let o=e.replace(/\*/g,".*").replace(/\?/g,".").replace(/\[!([^\]]+)\]/g,"[^$1]");return new RegExp(`${o}${n?"$":""}`).test(t)}showHiddenNodesEffect=R(()=>this._showHiddenNodes.set(this.showHiddenNodes()));pathDiscoveryMethodEffect=R(()=>{let t=this.pathDiscoveryMethod(),e=this.#e();t==="browse"&&e&&this.currentPath.set(e.value)});matchAccepts(t,e){if(!t||e.cls==="folder"||e.id==="/")return!0;let n=t.split(",");if(n.length===0)return!0;let o="."+e.id.slice(e.id.indexOf("."));return o?n.some(i=>o.endsWith(i)):!1}currentPathEffect=R(()=>{let t=this.#e();t&&(t.value=this.currentPath(),t.dispatchEvent(new Event("input")))});inputValueChangeAbortController=null;inputRefEffect=R(()=>{let t=this.formRef()?.nativeElement?.querySelector("input");t&&(this.#a(t),this.inputValueChangeAbortController&&this.inputValueChangeAbortController.abort(),this.inputValueChangeAbortController=new AbortController,t.addEventListener("inputValueChanged",e=>{this.currentPath.set(e.detail.value)},{signal:this.inputValueChangeAbortController.signal}),this.#e.set(t),t.autocomplete="off")});ngOnInit(){let t=this.startingPath();t?(this.currentPath.set(t),this.#p(t)):this.#o(null,this.rootPath())}toggleSelectedNode(t,e){if(e.id==="/"||(t.stopPropagation(),e.evalState===-2))return;if(this.selectFiles()&&e.cls==="folder"){this.toggleNode(e.id,e);return}if(this.accepts()&&!e.accepted)return;let o=this.currentPath().split("\0").filter(r=>r!==""&&r!=="/"),i=this.isChildOfSelected(e)?`-${e.id}`:e.id;this.multiSelect()?o.includes(e.id)?this.currentPath.set(o.filter(r=>r!==e.id).join("\0")):o.some(r=>r.startsWith(i))?this.currentPath.set(o.filter(r=>r!==i).join("\0")):this.currentPath.set([...o,i].join("\0")):o.includes(e.id)?this.currentPath.set(o.filter(r=>r!==e.id).join("\0")):this.currentPath.set(e.id)}isChildOfSelected(t){return this.currentPath().split("\0").filter(n=>n!==""&&n!=="/").some(n=>t.id?.startsWith(n)||`-${t.id}`.startsWith(n))}toggleNode(t,e=null){e?.cls==="folder"&&(e?.children.length?this.treeNodes.update(n=>n.filter(o=>!o.id?.startsWith(e.id)||o.id===e.id)):this.#o(e,t))}#l(){setTimeout(()=>{let e=this.treeContainerRef()?.nativeElement?.querySelector(".active");e&&e.scrollIntoView({behavior:"smooth",block:"center"})},100)}#a(t){return Object.defineProperty(t,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").get.call(this)},set(e){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").set.call(this,e),this.dispatchEvent(new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:e}})),e}}),t}#c(t){return this.#t.postApiV1Filesystem({showHidden:!0,requestBody:{path:t},onlyFolders:!this.showFiles()})}#d(t){let e=this.backupSettings(),n={id:e.id+"",prefixOnly:!1,folderContents:!0,time:e.time,filter:t?"@"+t:void 0};return this.#t.getApiV1BackupByIdFiles(n)}#i(t){return this.isByBackupSettings()?this.#d(t):this.#c(t)}#p(t){let e=t.split("\0").filter(r=>r.startsWith("-")).map(r=>r.slice(1,-1)),n=t.split("\0").filter(r=>!r.startsWith("-")).filter(Boolean),o=n.map(r=>{let _=r.indexOf(":")===1;return r.split(_?"\\":"/").filter(l=>l.includes(".")?!1:l)}),i=[this.rootPath()??"/"];o.forEach(r=>{r.forEach((_,l)=>{let c=r[0].endsWith(":"),a=r.slice(0,l+1).join(c?"\\":"/"),d=a;d.indexOf(":")===-1&&!d.startsWith("%")&&(d="/"+a),i.includes(d)||i.push(d)})}),this.isLoading.set(!0),U([...i.map(r=>this.#i(r))]).pipe(V(()=>this.isLoading.set(!1))).subscribe({next:r=>{this.treeNodes.update(_=>{let l=r.flatMap(a=>a.map(d=>{let m=d.id,f=m&&m.split("/").filter(Boolean).slice(0,-1).join("/"),v="/"+(m&&m.split("/").filter(Boolean).join("/")),C=n.findIndex(F=>this.multiSelect()?v.startsWith(F):v===F)>-1,w=n.findIndex(F=>F===m)>-1,b=e.findIndex(F=>F===v)>-1;return B(D({},d),{parentPath:f.startsWith("%")?f:"/"+f,isSelected:C&&!b||w})})),c=[...new Map([..._,...l].map(a=>[a.resolvedpath??a.id,a])).values()];return this.#l(),c})}})}#o(t=null,e="/"){this.isLoading.set(!0),this.#i(e).pipe(V(()=>this.isLoading.set(!1))).subscribe({next:n=>{let o=this.isByBackupSettings()?n.Files.map(i=>({text:i.Path.split("/").filter(r=>r!=="").pop(),id:i.Path,cls:i.Path.endsWith("/")||i.Path.endsWith("\\")?"folder":"file",leaf:t!==null,resolvedpath:i.Path,hidden:!1})):n;this.treeNodes.update(i=>{let r=o.map(l=>{let c=l.id.startsWith("%")&&l.id.endsWith("%")||l.id.endsWith("/")||l.id.endsWith("\\")?"folder":"file";return B(D({},l),{cls:c,parentPath:e})}),_=[...new Map([...i,...r].map(l=>[l.resolvedpath??l.id,l])).values()];return this.hideShortcuts()?_.filter(l=>!l.id.startsWith("%")):_})}})}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=J({type:s,selectors:[["app-file-tree"]],viewQuery:function(e,n){e&1&&(Q(n.treeContainerRef,ve,5),Q(n.formRef,Te,5)),e&2&&re(2)},hostVars:2,hostBindings:function(e,n){e&2&&T("disabled",n.disabled())},inputs:{multiSelect:[1,"multiSelect"],disabled:[1,"disabled"],showFiles:[1,"showFiles"],selectFiles:[1,"selectFiles"],accepts:[1,"accepts"],startingPath:[1,"startingPath"],rootPath:[1,"rootPath"],backupSettings:[1,"backupSettings"],pathRefreshTrigger:[1,"pathRefreshTrigger"],showHiddenNodes:[1,"showHiddenNodes"],hideShortcuts:[1,"hideShortcuts"]},outputs:{includes:"includes",excludes:"excludes"},ngContentSelectors:be,decls:15,vars:15,consts:()=>{let t;t=$localize` Browser path `;let e;e=$localize` Manually type path `;let n;return n=$localize` Show hidden ${"\uFFFD0\uFFFD"}:INTERPOLATION: `,[["treeContainer",""],["recursiveTree",""],["formRef",""],["treeNode",""],t,e,n,[1,"section"],[1,"browse-files"],[1,"indeterminate","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"primary","raised","browse-files-toggle",3,"active"],[1,"form-field"],["type","button",3,"click"],["action","",3,"click"],[1,"icon"],[1,"spk-primary"],[1,"text",3,"click"],[1,"small"],[1,"primary","raised","browse-files-toggle",3,"click"]]},template:function(e,n){if(e&1&&(oe(xe),x(0,we,5,4,"spk-button-group"),u(1,"div",7),L(2,0,["ngProjectAs","label",5,["label"]]),u(3,"div",8,0),x(5,Fe,1,0,"spk-progress-bar",9)(6,De,3,2,"ng-template",null,1,ae)(8,Be,1,0,"ng-container",10),h(),x(9,Ve,2,3,"spk-toggle",11),h(),u(10,"div",12,2)(12,"spk-form-field"),L(13,1,["ngProjectAs","label",5,["label"]]),L(14,2,["ngProjectAs","input",5,["input"]]),h()()),e&2){let o=K(7);O(n.multiSelect()?-1:0),g(),T("hidden",n.pathDiscoveryMethod()!=="browse"),g(2),T("visualize-accepted",n.accepts()),g(2),O(n.isLoading()?5:-1),g(3),q("ngTemplateOutlet",o)("ngTemplateOutletContext",$(13,Ee,$(11,Me,n.treeStructure()))),g(),O(n.accepts()?-1:9),g(),T("hidden",n.pathDiscoveryMethod()!=="path")}},dependencies:[ue,ge,pe,he,_e,fe,ce,Ce],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1rem}.disabled[_nghost-%COMP%]{opacity:.5;-webkit-user-select:none;user-select:none;pointer-events:none;position:relative}.disabled[_nghost-%COMP%]:before{content:"";position:absolute;inset:0;background:transparent}.fill[_nghost-%COMP%]{height:auto;overflow:hidden;flex:1 0}.fill[_nghost-%COMP%] .section[_ngcontent-%COMP%]{height:auto;overflow:hidden;flex:1 0;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto 1fr;grid-template-areas:"label toggle" "tree tree"}.fill[_nghost-%COMP%] .browse-files[_ngcontent-%COMP%]{resize:none;height:initial;grid-area:tree}.fill[_nghost-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.fill[_nghost-%COMP%] spk-toggle[_ngcontent-%COMP%]{grid-area:toggle;flex-direction:row-reverse}.section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.form-field.hidden[_ngcontent-%COMP%]{display:none}.browse-files[_ngcontent-%COMP%]{display:flex;gap:.5rem;padding:.5rem 1rem;height:12.5rem;border:1px solid var(--base-level-40);border-radius:var(--shape-3);overflow:auto;resize:vertical;background:var(--base-level-10);position:relative}.browse-files[_ngcontent-%COMP%] spk-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]:not(.accepted){opacity:.5}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action].accepted[_ngcontent-%COMP%]{opacity:1}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%]{--list-active-bg: var(--base-level-30);gap:.125rem;padding:0;height:min-content;min-width:min-content}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0;gap:0;border:1px solid transparent}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].active[_ngcontent-%COMP%]{border-color:transparent;--list-active-bg: var(--primary-level-20)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].indeterminate[_ngcontent-%COMP%]{border-color:var(--primary-level-40)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].usually-hidden[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%]{gap:.25rem}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]:has(spk-icon:nth-child(2)){width:3rem}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:1.5rem}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;height:100%;width:max-content;display:flex;align-items:center}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:3rem;gap:.25rem;height:1.5rem;display:flex;align-items:center;justify-content:center;cursor:pointer}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon.file[_ngcontent-%COMP%]{width:2rem;padding:0 .25rem}.browse-files-toggle[_ngcontent-%COMP%]{color:var(--base-level-60R)}.hidden[_ngcontent-%COMP%]{display:none}'],changeDetection:0})};export{z as a};
|
package/chunk-ZDCJ72UD.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as P,d as A}from"./chunk-W4U2FPZX.js";import{e as d}from"./chunk-3WHFK5U5.js";import{b as k}from"./chunk-64CRTZO6.js";import{ua as M}from"./chunk-ERQAUCCL.js";import{Ab as m,Bb as f,Cb as _,Lc as g,M as C,Mb as v,Mc as b,Nb as E,Ob as N,Pb as I,Qb as F,R as c,Ra as T,X as s,db as O,g as S,sa as n,vc as w,xc as y}from"./chunk-RY7J7BHG.js";var r=class o{reconnectTimer=n(15e3);countdown=n(0);connectTimerEffect=b(()=>{let t=this.reconnectTimer();this.countdown.set(t/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(e){return new(e||o)};static \u0275cmp=O({type:o,selectors:[["app-disconnected-dialog"]],decls:8,vars:4,consts:()=>{let t;t=$localize`Reconnecting...`;let e;return e=$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:`,[t,e,["header",""],["content",""]]},template:function(e,i){e&1&&(m(0,"header",2)(1,"h3"),N(2,0),f()(),m(3,"div",3)(4,"p"),v(5,1),_(6,"strong"),w(7,"number"),E(),f()()),e&2&&(T(7),I(y(7,1,i.countdown(),"2.0-0")),F(5))},dependencies:[M],styles:["[_nghost-%COMP%]{display:block;padding:1rem}"],changeDetection:0})};var h=class o{dialog=s(d);#o=s(k);#t=n("disconnected");#e=n(null);#s=n(-1);#n=n(0);#i=n(!1);#c=new S;connectionStatus=this.#t.asReadonly();serverState=this.#e.asReadonly();#r=void 0;duration=s(P).relayIsEnabled()?"94s":"299s";start(){this.#i.set(!0),this.#c=new S,this.#a()}stop(){this.#c.next(),this.#c.complete(),this.#i.set(!1)}reconnect(){this.stop(),this.start()}reconnectIfNeeded(){console.log("reconnectIfNeeded"),!this.#i()&&this.reconnect()}#a(){this.#t.set("connecting"),this.#o.getApiV1Serverstate({lastEventId:this.#s(),longpoll:this.#s()>0,duration:this.duration}).pipe(C(this.#c)).subscribe({next:t=>{t&&this.#l(t),this.#d()},error:t=>{let i=this.#n()+1,l=Math.min(5e3*i,3e4);this.#n.set(i),i>3&&this.#t.set("disconnected"),this.#r||(this.#r=this.dialog.open(r,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1})),this.#r.component.reconnectTimer.set(l),setTimeout(()=>{this.#a()},l)}})}#l(t){this.#t.set("connected"),this.#e.set(t),this.#s.set(t.LastEventID||-1),this.#n.set(0)}#d(){this.#i()&&this.#a()}static \u0275fac=function(e){return new(e||o)};static \u0275prov=c({token:o,factory:o.\u0275fac,providedIn:"root"})};var p=class o{#o=s(A);dialog=s(d);#t=null;#e=n("disconnected");#s=n(null);#n=void 0;shouldConnect=n(!0);connectionStatus=this.#e.asReadonly();serverState=this.#s.asReadonly();start(){this.#i(),this.shouldConnect.set(!0)}#i(){let t=this.#o.token();if(!t){console.error("No access token available");return}let e=window.location.protocol==="https:"?"wss:":"ws:",i=window.location.port?`:${window.location.port}`:"";window.location.port==="4200"&&(i=":8200");let l=window.location.hostname,$=`${e}//${l}${i}/notifications?token=${t}`;this.#e.set("connecting"),this.#t=new WebSocket($),this.#t.onopen=()=>{console.log("WebSocket connection established"),this.#e.set("connected"),this.#n&&this.#n.close()},this.#t.onmessage=a=>{try{let u=JSON.parse(a.data);this.#s.set(u)}catch(u){console.error("Error parsing WebSocket message",u)}},this.#t.onclose=a=>{console.log("WebSocket connection closed",a),this.#e.set("disconnected"),this.shouldConnect()&&(this.#n||(this.#n=this.dialog.open(r,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1}),this.#n.component.reconnectTimer.set(15e3)),setTimeout(()=>this.#i(),5e3))},this.#t.onerror=a=>{console.error("WebSocket error",a),this.#e.set("disconnected")}}stop(){this.shouldConnect.set(!1),this.#t?.close()}reconnect(){this.#t?.close(),this.start()}reconnectIfNeeded(){this.#t?.readyState!==WebSocket.OPEN&&this.reconnect()}static \u0275fac=function(e){return new(e||o)};static \u0275prov=c({token:o,factory:o.\u0275fac,providedIn:"root"})};var R=class o{#o=s(p);#t=s(h);#e=n("longpoll");connectionStatus=g(()=>this.#e()==="websocket"?this.#o.connectionStatus():this.#t.connectionStatus());serverState=g(()=>this.#e()==="websocket"?this.#o.serverState():this.#t.serverState());setConnectionMethod(t){t==="websocket"?(this.#o.reconnectIfNeeded(),this.#t.stop()):(this.#t.reconnectIfNeeded(),this.#o.stop()),this.#e.set(t)}getConnectionMethod(){return this.#e()}static \u0275fac=function(e){return new(e||o)};static \u0275prov=c({token:o,factory:o.\u0275fac,providedIn:"root"})};export{R as a};
|
package/chunk-ZDMCLDW7.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as a,o as b}from"./chunk-3CRLUTKZ.js";import"./chunk-J242X4NN.js";import"./chunk-DNHLTHLR.js";import"./chunk-F2L6ATMF.js";import"./chunk-KA2H467C.js";import"./chunk-Z2LU6ASK.js";import"./chunk-BCSA6WFY.js";import"./chunk-UNV7VK4Z.js";import"./chunk-BSJ6OMWB.js";import"./chunk-NQYRWS7A.js";import"./chunk-2X7AJBJY.js";import"./chunk-3WHFK5U5.js";import"./chunk-64CRTZO6.js";import"./chunk-VDB64BFB.js";import"./chunk-ERQAUCCL.js";import"./chunk-RY7J7BHG.js";import"./chunk-7CGTOI24.js";export{a as createSourceDataForm,b as default};
|
package/chunk-ZUX7IMN4.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as D}from"./chunk-BCSA6WFY.js";import{a as b,n as w}from"./chunk-3WHFK5U5.js";import"./chunk-64CRTZO6.js";import"./chunk-VDB64BFB.js";import{ia as A}from"./chunk-ERQAUCCL.js";import{Ab as c,Bb as r,Fb as u,Gb as v,Lc as $,Ob as P,Ra as l,Sb as k,Tb as s,X as y,ca as O,da as x,db as T,ec as C,fc as p,gc as E,ib as a,rb as d,sa as m,sb as h,sc as _,tb as f,tc as N,wb as g,yb as I,yc as F,zb as M}from"./chunk-RY7J7BHG.js";import"./chunk-7CGTOI24.js";var L=e=>({children:e,level:0}),R=e=>({$implicit:e}),V=(e,t)=>({children:e,level:t}),j=(e,t)=>t.id;function z(e,t){if(e&1&&(c(0,"spk-icon"),p(1,"caret-down"),r()),e&2){let n=s().$implicit;f("open",n.isOpen())}}function B(e,t){e&1&&(c(0,"spk-icon"),p(1,"dot"),r())}function G(e,t){e&1&&u(0)}function U(e,t){if(e&1&&a(0,G,1,0,"ng-container",3),e&2){let n=s().$implicit,o=s().$implicit;s();let i=C(3);d("ngTemplateOutlet",i)("ngTemplateOutletContext",_(5,R,N(2,V,n.children,o.level+1)))}}function X(e,t){if(e&1){let n=v();c(0,"div",4,1),k("click",function(){let i=O(n).$implicit,Y=s(2);return x(i.children.length>0&&Y.toggleNode(i))}),a(2,z,2,2,"spk-icon",5)(3,B,2,0,"spk-icon"),c(4,"div",6),p(5),r()(),a(6,U,1,7,"ng-container")}if(e&2){let n=t.$implicit;f("cannot-toggle",n.children.length===0)("open",n.isOpen()),l(2),g(n.children.length>0?2:3),l(3),E(n.text),l(),g(n.isOpen()?6:-1)}}function q(e,t){if(e&1&&(c(0,"spk-list"),I(1,X,7,7,null,null,j),r()),e&2){let n=t.$implicit;h("padding-left",n.level*.25,"rem"),l(),M(n.children)}}function H(e,t){e&1&&u(0)}var S=class e{#e=y(D);treeStructure=$(()=>{let t=this.#e.systemInfo();return this.processObject(t,0)});toggleNode(t){t.isOpen.update(n=>!n)}processObject(t,n){let o=[];for(let i in t)typeof t[i]=="object"?o.push({id:i,text:i,children:this.processObject(t[i],n+1),level:n,isOpen:m(!1)}):o.push({id:i,text:`${i}: ${t[i]}`,children:[],level:n,isOpen:m(!1)});return o}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=T({type:e,selectors:[["app-system-info"]],decls:5,vars:6,consts:()=>{let t;return t=$localize`System info`,[["recursiveTree",""],["treeNode",""],t,[4,"ngTemplateOutlet","ngTemplateOutletContext"],["action","",3,"click"],[3,"open"],[1,"text"]]},template:function(n,o){if(n&1&&(c(0,"h3"),P(1,2),r(),a(2,q,3,2,"ng-template",null,0,F)(4,H,1,0,"ng-container",3)),n&2){let i=C(3);l(4),d("ngTemplateOutlet",i)("ngTemplateOutletContext",_(4,R,_(2,L,o.treeStructure())))}},dependencies:[w,b,A],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}spk-icon[_ngcontent-%COMP%]{font-size:1rem}spk-list[_ngcontent-%COMP%]{padding:0}spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0}spk-list[_ngcontent-%COMP%] [action].cannot-toggle[_ngcontent-%COMP%]{cursor:initial}"],changeDetection:0})};export{S as default};
|
package/chunk-ZV72G3X3.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as h}from"./chunk-AKURWKKM.js";import{b as v,c as G,e as L,f as w,i as U,n as K,q as X,r as x,t as V}from"./chunk-BSJ6OMWB.js";import{d as O,e as A}from"./chunk-NQYRWS7A.js";import"./chunk-2X7AJBJY.js";import{a as R,c as N,g as E,l as $,m as y,y as B}from"./chunk-3WHFK5U5.js";import{b}from"./chunk-64CRTZO6.js";import"./chunk-VDB64BFB.js";import"./chunk-ERQAUCCL.js";import{Ab as r,Bb as n,Cb as l,D as g,Mb as P,Nb as I,Ob as _,Ra as s,Rb as M,Sb as d,X as F,db as T,ib as S,rb as u,rc as k,sa as m,tb as C,wb as D}from"./chunk-RY7J7BHG.js";import"./chunk-7CGTOI24.js";var z=()=>["/"];function j(c,t){c&1&&(r(0,"spk-form-field")(1,"label",14),_(2,3),n(),l(3,"input",15),n())}var p=new x,f=class c{#e=F(N);#t=F(b);#o=F(h);#n=F(O);isImporting=m(!1);isSecureFile=m(!1);importForm=p.group({config:p.control(""),cmdline:p.control(!1),importMetadata:p.control(!1),direct:p.control(!1),passphrase:p.control("")});selectedFile=m([]);onFileDropped(t){let e=t[0];if(e){let o=new FileReader;this.isSecureFile.set(e.type!=="application/json"),o.onload=this.#i.bind(this),o.readAsArrayBuffer(e)}}#i(t){let e=t.target?.result;this.importForm.patchValue({config:this.#r(e)})}#r(t){let e=new Uint8Array(t),o=e.byteLength,a="";for(let i=0;i<o;i++)a+=String.fromCharCode(e[i]);return btoa(a)}submit(){this.isImporting.set(!0),this.#t.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(g(()=>this.isImporting.set(!1))).subscribe({next:t=>{let e=this.#o.addDraftBackup(t.data);this.#n.navigate(["/backup-draft",e])},error:t=>{this.#e.error(t.message)}})}static \u0275fac=function(e){return new(e||c)};static \u0275cmp=T({type:c,selectors:[["app-import"]],decls:19,vars:8,consts:()=>{let t;t=$localize` Import backup configuration ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SPK_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SPK_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_SPK_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SPK_ICON: Import ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,t=M(t);let e;e=$localize`Import Metadata`;let o;o=$localize`Save now`;let a;return a=$localize`Passphrase`,[t,e,o,a,[1,"actions"],["spk-button","","type","button",1,"outlined",3,"routerLink"],["spk-button","","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","importMetadata"],["for","direct"],["type","checkbox","formControlName","direct"],["for","passphrase"],["type","password","formControlName","passphrase"]]},template:function(e,o){e&1&&(r(0,"header")(1,"h3"),P(2,0),r(3,"div",4)(4,"button",5),l(5,"spk-icon"),n(),r(6,"button",6),d("click",function(){return o.submit()}),l(7,"spk-icon"),n()(),I(),n()(),r(8,"form",7)(9,"spk-file-upload",8),d("filesChange",function(i){return o.onFileDropped(i)}),n(),S(10,j,4,0,"spk-form-field"),r(11,"spk-toggle",9)(12,"label",10),_(13,1),n(),l(14,"input",11),n(),r(15,"spk-toggle",9)(16,"label",12),_(17,2),n(),l(18,"input",13),n()()),e&2&&(s(4),u("routerLink",k(7,z)),s(2),C("loader",o.isImporting()),u("disabled",o.isImporting()),s(2),u("formGroup",o.importForm),s(),u("files",o.selectedFile()),s(),D(o.isSecureFile()?10:-1))},dependencies:[V,U,G,v,L,w,K,X,A,$,R,E,B,y],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}spk-file-upload[_ngcontent-%COMP%]{width:100%}"],changeDetection:0})};export{f as default};
|
package/main-F254FFHF.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as me,c as de}from"./chunk-FXYF7V3T.js";import{a as N}from"./chunk-BCSA6WFY.js";import{a as ce}from"./chunk-H5SFF5D7.js";import{a as I}from"./chunk-TGK3F3XP.js";import{a as ie}from"./chunk-TDXJNPMY.js";import"./chunk-ZDCJ72UD.js";import"./chunk-AKURWKKM.js";import{a as y,b,c as pe,d as w}from"./chunk-W4U2FPZX.js";import{c as te,d as oe,g as ne,h as re}from"./chunk-NQYRWS7A.js";import{a as ee}from"./chunk-2X7AJBJY.js";import{c as ae}from"./chunk-3WHFK5U5.js";import{d as se}from"./chunk-64CRTZO6.js";import{a as q,b as X,d as Q,e as Y,f as Z}from"./chunk-VDB64BFB.js";import{ua as z}from"./chunk-ERQAUCCL.js";import{b as le}from"./chunk-QZEFXB74.js";import{Bc as $,Cb as B,Cc as K,D as R,J as U,L as S,Mc as _,N as D,R as T,U as F,X as s,d as H,db as J,g as P,ha as G,l as V,m as j,p as A,sa as d,x as O,y as W}from"./chunk-RY7J7BHG.js";import"./chunk-7CGTOI24.js";var k=class o{#o=s(y);#s=s(b);ngOnInit(){this.#s.fetchConfig(),this.#o.clearAllNotCurrentVersion()}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=J({type:o,selectors:[["app-root"]],decls:1,vars:0,template:function(t,n){t&1&&B(0,"router-outlet")},dependencies:[te],encapsulation:2})};var he={production:!0,baseUrl:"/api",machineServerUrl:"${WS_URL}",defaultTimeout:3e4};var f=new F("ENVIRONMENT");var M=class o{#o=s(se);isLoaded=d(!1);webmodules=d(null);preload(e=!1){let t=this.#o.getApiV1Webmodules().pipe(D(n=>this.webmodules.set(n)),R(()=>this.isLoaded.set(!0)));if(e)return t;t.subscribe()}static \u0275fac=function(t){return new(t||o)};static \u0275prov=T({token:o,factory:o.\u0275fac,providedIn:"root"})};var Re=()=>{let o=s(w);return o.token()?!0:o.checkProxyAuthed().pipe(S(e=>e?V(!0):o.refreshToken().pipe(A(()=>!0))))},Te=()=>{let o=s(b),e=s(I),t=s(G),n=o.relayIsEnabled()?"longpoll":"websocket",i=[t.get(N).preload(!0),t.get(N).preloadFilterGroups(!0),t.get(M).preload(!0)];return o.configLoaded===null?O(i).pipe(A(()=>n)):o.configLoaded?.pipe(S(()=>O(i)))},fe=[{path:"",children:[{path:"login",canActivate:[],loadComponent:()=>import("./chunk-3UY6NFJH.js")},{path:"logout",loadComponent:()=>import("./chunk-Z5KSF3LW.js")},{path:"",canActivate:[Re],children:[{path:"",canActivate:[Te],loadComponent:()=>import("./chunk-GY445E4I.js"),children:[{path:"",loadComponent:()=>import("./chunk-BGEONYDG.js")},{path:"add-backup",loadComponent:()=>import("./chunk-6LVF5Q7U.js")},{path:"backup/:id/export",loadComponent:()=>import("./chunk-LLNGOQQI.js")},{path:"backup/import",loadComponent:()=>import("./chunk-ZV72G3X3.js")},{path:"backup-draft/:id",loadComponent:()=>import("./chunk-I6XPZQ7N.js"),loadChildren:()=>import("./chunk-W6TPRQIT.js")},{path:"backup/:id",loadComponent:()=>import("./chunk-I6XPZQ7N.js"),loadChildren:()=>import("./chunk-W6TPRQIT.js")},{path:"backup/:id/log",loadComponent:()=>import("./chunk-FXQBVRVU.js")},{path:"backup/:id/database",loadComponent:()=>import("./chunk-C36EIFZ5.js")},{path:"backup/:id/commandline",loadComponent:()=>import("./chunk-5WXAGJAM.js")},{path:"backup/:id/commandline/:runId",loadComponent:()=>import("./chunk-OL234C52.js")},{path:"restore",children:[{path:"",loadComponent:()=>import("./chunk-SHATBKDA.js")},{path:"from-config",loadComponent:()=>import("./chunk-PQ6MLKHT.js")}]},{path:"restore-from-files",loadComponent:()=>import("./chunk-IN4ROBMK.js"),loadChildren:()=>import("./chunk-R2D3CVSD.js")},{path:"restore-draft/:id",loadComponent:()=>import("./chunk-IN4ROBMK.js"),loadChildren:()=>import("./chunk-R2D3CVSD.js")},{path:"restore/:id",loadComponent:()=>import("./chunk-IN4ROBMK.js"),loadChildren:()=>import("./chunk-R2D3CVSD.js")},{path:"settings",loadComponent:()=>import("./chunk-ORIEYVVO.js")},{path:"about",loadComponent:()=>import("./chunk-RIM5NXPM.js"),children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-PZY4BMZL.js")},{path:"changelog",loadComponent:()=>import("./chunk-VGNOUHVL.js")},{path:"libraries",loadComponent:()=>import("./chunk-L7XUXGTC.js")},{path:"system-info",loadComponent:()=>import("./chunk-ZUX7IMN4.js")},{path:"logs",loadChildren:()=>import("./chunk-KW2XPLTZ.js")},{path:"crashlogs",loadComponent:()=>import("./chunk-FYKL2LOY.js")}]}]}]}]}];var x=null,ge=(o,e)=>{let t=s(w),n=s(oe),i=s(y),c=s(f),r=i.getItem("locale"),u=s(ae),a=me(r),p=o.url==="/api/v1/auth/login",m=o.url==="/api/v1/auth/refresh",C=o.url==="/api/v1/progressstate",g=o.url==="/api/v1/remoteoperation/test",h=t.token(),v=o,L=o.headers.has("custom-proxy-check")||h===pe;if(h&&o.url.startsWith(c.baseUrl)&&!L){let l=o.headers.set("Authorization",`Bearer ${h}`);r&&r!=="en-US"&&(l=l.set("X-Ui-Language",a)),v=o.clone({headers:l})}return e(v).pipe(W(l=>{if(!L&&(C&&l.status===404||g||u.error(l.message),m&&l.status===401&&(t.logout(),n.navigate(["/logout"])),!p&&!m&&l.status===401))return x??=t.refreshToken().pipe(U()),x.pipe(S(()=>e(o.clone({headers:o.headers.set("Authorization",`Bearer ${t.token()}`)}))),R(()=>x=null));let Se=`Error Code: ${l.status}, Message: ${l.message}`;return j(()=>({error:l,message:Se}))}))};var we="1.0.0",ye=`portal-proxy-client-${crypto.randomUUID()}`,Ie=1,E=class o{#o=1e3;#s=s(f);#t=d("disconnected");#l=d(this.#o);#i=d(!1);#n=d(!1);#a=d(null);isConnectedToMachineServer=this.#n.asReadonly();wsState=this.#t.asReadonly();#p=[];#r={};#e=null;#m=new TextDecoder("utf-8");#c=null;#d=_(()=>{let e=this.#i(),t=this.#l(),n=this.#a();if(!n||!e||!t||t<this.#o){this.#c&&window.clearInterval(this.#c);return}this.#c=window.setInterval(()=>{this.connectToMachineServer(n)},t)});utf8Atob(e){let t=Uint8Array.from(atob(e),i=>i.charCodeAt(0)),n=this.#m.decode(t);return n?JSON.parse(n):null}connectToMachineServer(e,t){let n=t?.reconnect??!1,i=this.wsState();(i==="disconnected"||i==="error"||n)&&(this.#e?.close(),this.#e=null),!this.#e&&(this.#e=new WebSocket(this.#s.machineServerUrl),this.#t.set("connecting"),this.#e.onopen=()=>{this.#t.set("connect"),this.#n.set(!0),this.#i.set(!1),this.#a.set(null)},this.#e.onclose=()=>{this.#t.set("disconnected"),this.#n.set(!1),this.#a.set(e),this.#i.set(!0)},this.#e.onerror=()=>{this.#t.set("error")},this.#e.onmessage=c=>{let r=JSON.parse(c.data);if(this.wsState()==="connect"){if(r.type!=="welcome"){this.disconnectFromMachineServer(`Unexpected message type, expected 'welcome' but got '${r.type}'`);return}let a={token:e,publicKey:"",clientVersion:we,protocolVersion:Ie},p=this.createResponse(r,"authportal",a);this.#t.set("welcome"),this.#e?.send(p)}else if(this.wsState()==="welcome"){if(r.type!=="authportal"){this.disconnectFromMachineServer(`Unexpected message type, expected 'authportal' but got '${r.type}'`);return}var u=JSON.parse(r.payload??"");if(u.accepted===!1){this.disconnectFromMachineServer("Authentication failed");return}for(this.#t.set("authenticated"),this.#n.set(!0);this.#p.length>0;){let a=this.#p.pop();a&&this.#r[a.messageId]&&this.activateCommand(a)}}else if(this.wsState()==="authenticated"){if(r.type!=="command"){console.warn(`Unexpected message type, expected 'command' but got '${r.type}'`);return}let a=this.#r[r.messageId];if(a){if(r.errorMessage){a.reject(r.errorMessage);return}else{let p=JSON.parse(r.payload??"");p.body=p?.body==null?null:this.utf8Atob(p.body),a.resolve(p)}delete this.#r[r.messageId],window.clearTimeout(a.timer)}}})}disconnectFromMachineServer(e=null){e&&console.error(e),this.#e?.close(),this.#e=null,this.#t.set("disconnected"),this.#n.set(!1)}createResponse(e,t,n){let i={from:ye,to:e.from,type:t,messageId:e.messageId,payload:JSON.stringify(n)};return JSON.stringify(i)}sendCommand(e,t,n,i,c,r,u=5e3){return(this.wsState()==="disconnected"||this.wsState()==="error")&&this.connectToMachineServer(e),new Promise((a,p)=>{let m=crypto.randomUUID(),g={from:ye,to:t,type:"command",messageId:m,payload:JSON.stringify({method:n,path:i,body:c,headers:r})},h={resolve:a,reject:p,timer:window.setTimeout(()=>{let v=this.#r[m];v&&(delete this.#r[m],v.reject("Timeout"))},u)};this.#r[m]=h,this.#n()?this.activateCommand(g):this.#p.push(g)})}activateCommand(e){this.#e?.send(JSON.stringify(e))}static \u0275fac=function(t){return new(t||o)};static \u0275prov=T({token:o,factory:o.\u0275fac,providedIn:"root"})};function ke(o){if(typeof o!="string")return null;let t=new TextEncoder().encode(o);return window.btoa(String.fromCharCode(...t))}function be(o,e,t){let n=o.relayconfigState.config();if(n===null)return t(e);let i=ke(e.body),c={};e.headers.keys().forEach(p=>{c[p]=e.headers.get(p)??""});let r=e.headers.get("timeout"),u=r!==null?parseInt(r):o.defaultTimeout;e.url.startsWith("/api/v1/serverstate")&&e.url.includes("longpoll=true")&&(u=1e3*99);let a=o.relayWebsocket.sendCommand(n.accessToken,n.clientId,e.method,e.url,i,c,u);return new H(p=>{a.then(m=>{let C=new q;c!=null&&Object.keys(c).forEach(h=>{C.set(h,c[h])});let g=new X({body:m.body,status:m.code,statusText:"OK",headers:C});p.next(g),p.complete()})})}var Ce=(o,e)=>{let t={relayconfigState:s(b),defaultTimeout:s(f).defaultTimeout,relayWebsocket:s(E)},n=t.relayconfigState.config();if(t.relayconfigState.configLoaded!==null&&n===null){let i=new P;return t.relayconfigState.configLoaded.subscribe(c=>{c&&be(t,o,e).subscribe(i)}),i}return be(t,o,e)};var ve={providers:[$(),ne(fe,re()),Q(Z(),Y([Ce,ge])),y,{provide:f,useValue:he},{provide:K,useValue:de()},ce,I,le,z,ie]};ee(k,ve);
|