@duplicati/ngclient 0.0.223 → 0.0.225
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/{chunk-TPKKLIFK.js → chunk-2EX5HS5X.js} +1 -1
- package/{chunk-ZKIZ7IIA.js → chunk-35FMFK4I.js} +1 -1
- package/{chunk-UOMUNAOT.js → chunk-3DHD6GQL.js} +1 -1
- package/{chunk-YKF5ZW55.js → chunk-3HYQMG65.js} +1 -1
- package/{chunk-YFA6MJ2B.js → chunk-3PARK7B7.js} +1 -1
- package/chunk-3V25RAVK.js +1 -0
- package/{chunk-CWBB6FON.js → chunk-4ISFDBI3.js} +1 -1
- package/chunk-5FQ7HESA.js +1 -0
- package/{chunk-O5RZGVMD.js → chunk-5QGFYH2A.js} +1 -1
- package/{chunk-GBSP3YAH.js → chunk-5UJN5SN4.js} +1 -1
- package/{chunk-ZTENLO77.js → chunk-6DX35WDO.js} +1 -1
- package/{chunk-KI2HT2TI.js → chunk-6WX2UOAN.js} +1 -1
- package/{chunk-LNKXSLIG.js → chunk-7VQ67PEZ.js} +1 -1
- package/{chunk-WKQ3ICDB.js → chunk-A23UTI46.js} +1 -1
- package/chunk-AR5SEBWX.js +1 -0
- package/{chunk-AXLO5KWF.js → chunk-E4CYVUYG.js} +1 -1
- package/chunk-EBKOJDCT.js +1 -0
- package/{chunk-X5W2K6AN.js → chunk-EVEI25GQ.js} +1 -1
- package/{chunk-JB26UVQP.js → chunk-EXAZ4QZR.js} +1 -1
- package/{chunk-4J64RICN.js → chunk-G7TNRWOU.js} +1 -1
- package/chunk-GKAMSAN5.js +1 -0
- package/chunk-HS3UDQIJ.js +1 -0
- package/chunk-IDJ52K34.js +1 -0
- package/chunk-ITN4L52Q.js +1 -0
- package/chunk-J7GH3G72.js +1 -0
- package/chunk-JBX7YYME.js +1 -0
- package/chunk-JCXT6U5P.js +1 -0
- package/{chunk-3BIHFX4H.js → chunk-JNZJE3GC.js} +1 -1
- package/chunk-KGK4RY3J.js +1 -0
- package/{chunk-5E3B4AEF.js → chunk-KNSQLQC6.js} +1 -1
- package/chunk-KUNX5APQ.js +1 -0
- package/chunk-KX3UP3HV.js +1 -0
- package/chunk-KZYRTI62.js +1 -0
- package/chunk-LXTSZI4K.js +1 -0
- package/chunk-MKI54WTC.js +1 -0
- package/chunk-MSIH2OJ5.js +1 -0
- package/{chunk-SZLRIYOM.js → chunk-N5XYG3QW.js} +1 -1
- package/{chunk-UXIWNORE.js → chunk-NE255HQN.js} +1 -1
- package/chunk-NQAD2FBX.js +1 -0
- package/{chunk-JYRKUYG6.js → chunk-NUV5LHQV.js} +1 -1
- package/{chunk-N3TVNDVH.js → chunk-O2HQIEE4.js} +1 -1
- package/chunk-O2L2FRYE.js +11 -0
- package/chunk-OP7MDR2B.js +1 -0
- package/chunk-OSGHJCUU.js +1 -0
- package/chunk-OYU6OBKA.js +1 -0
- package/{chunk-TOV6NJCD.js → chunk-P2EIEVFT.js} +1 -1
- package/{chunk-VNXFTYQQ.js → chunk-PDZNQW6F.js} +1 -1
- package/chunk-PMF4FTBF.js +1 -0
- package/{chunk-EAVDZEBJ.js → chunk-PNRFCYAE.js} +1 -1
- package/{chunk-GBUTPGY5.js → chunk-POVWDK74.js} +1 -1
- package/chunk-QW23XWNE.js +1 -0
- package/chunk-T7RMSUHE.js +1 -0
- package/chunk-TSVSMVY4.js +1 -0
- package/chunk-TV7OB7Y4.js +1 -0
- package/{chunk-FQINMZH2.js → chunk-TWWAK5M6.js} +1 -1
- package/{chunk-XXXS73XL.js → chunk-TXCVGOPN.js} +1 -1
- package/{chunk-AXG7WHBS.js → chunk-UIVZWXBK.js} +1 -1
- package/chunk-UNQKMTFM.js +1 -0
- package/{chunk-7AXKIK5Z.js → chunk-VOXTAZLZ.js} +1 -1
- package/{chunk-F5RBSCC2.js → chunk-VQLI7RDY.js} +1 -1
- package/chunk-VTOEFKZG.js +1 -0
- package/chunk-VZNLMGYP.js +2 -0
- package/chunk-XUCXLLB4.js +1 -0
- package/chunk-Y47NRSCA.js +1 -0
- package/{chunk-5W4BSVZJ.js → chunk-YS4B2B5N.js} +1 -1
- package/{chunk-RDT3GMNM.js → chunk-ZGQ2WCM2.js} +1 -1
- package/chunk-ZSAEIKEB.js +1 -0
- package/chunk-ZXBKGNJU.js +1 -0
- package/index.html +1 -1
- package/{main-NENDDABN.js → main-S64CL44W.js} +1 -1
- package/package.json +1 -1
- package/chunk-22JSUCD3.js +0 -1
- package/chunk-2CKH2RVA.js +0 -1
- package/chunk-2VLJLCTO.js +0 -1
- package/chunk-35ZRBDWM.js +0 -1
- package/chunk-3D6EL52D.js +0 -1
- package/chunk-4IRGFIAU.js +0 -1
- package/chunk-6JGOGUIX.js +0 -1
- package/chunk-6RIKNAXD.js +0 -1
- package/chunk-6V4CDRLK.js +0 -1
- package/chunk-7SP45FHP.js +0 -1
- package/chunk-AFHEXZUZ.js +0 -1
- package/chunk-CEDH3C4K.js +0 -1
- package/chunk-CUYURNCQ.js +0 -1
- package/chunk-DT3A5ZZG.js +0 -1
- package/chunk-FNWC6U3F.js +0 -1
- package/chunk-FXBX5QMR.js +0 -1
- package/chunk-HDGXP6C6.js +0 -1
- package/chunk-JLANSXSK.js +0 -1
- package/chunk-MJPEKJ3T.js +0 -2
- package/chunk-NDOIWI7D.js +0 -1
- package/chunk-NFATJ2CP.js +0 -1
- package/chunk-OETM3ZQK.js +0 -1
- package/chunk-OQGMZ5Z4.js +0 -1
- package/chunk-PDGW22XJ.js +0 -1
- package/chunk-PVSB5UU6.js +0 -1
- package/chunk-QGAOYLQU.js +0 -1
- package/chunk-QLW7KAXY.js +0 -1
- package/chunk-QZEIAQ3M.js +0 -1
- package/chunk-R6FKSUPU.js +0 -1
- package/chunk-RM2KGG7J.js +0 -1
- package/chunk-RTGUYIWH.js +0 -11
- package/chunk-SL34UKL5.js +0 -1
- package/chunk-TI76HSL2.js +0 -1
- package/chunk-WJVFREPL.js +0 -1
- package/chunk-WULWYGYR.js +0 -1
- package/chunk-ZYYLNYSK.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as tt}from"./chunk-MJPEKJ3T.js";import{k as Ze,n as et}from"./chunk-RTGUYIWH.js";import{a as ce}from"./chunk-TPKKLIFK.js";import{a as Qe}from"./chunk-COEGVUM3.js";import{a as A}from"./chunk-PEOYNJJM.js";import{b as Ee}from"./chunk-2KD757N6.js";import{b as Ke}from"./chunk-AFHEXZUZ.js";import{a as Z}from"./chunk-JYRKUYG6.js";import{B as Q,H as _e,L as Ue,M as Ye,P as He,V as je,W as qe,b as Ve,c as V,e as J,f as z,i as Je,j as X,l as ze,p as U,q as Y,r as H,s as Xe,t as j,v as q,z as le}from"./chunk-CJKZ27FM.js";import{d as K}from"./chunk-5E3B4AEF.js";import{b,d as $}from"./chunk-CQJRBQ6I.js";import{ha as ae}from"./chunk-YF6JHIN5.js";import{$ as p,Ac as we,B as De,Bc as me,Db as O,E as oe,Eb as r,Fb as a,G as P,Gb as d,Gc as Se,Hc as We,Ic as Be,J as be,Kb as G,Lb as k,M as $e,N as ne,Nb as D,Rc as h,Ta as c,Ub as m,Vb as S,W as Ae,Wb as F,Xb as de,Yb as pe,_b as N,ac as E,ea as I,fa as M,g as Me,hb as B,lc as xe,m as Le,mb as ve,oc as y,qa as _,qc as Ge,rc as ke,sa as W,tc as ie,uc as se,vc as re,w as ue,x as ye,xb as T,yb as g}from"./chunk-K5XGRFWJ.js";function _t(i,t){i&1&&(r(0,"p"),F(1,3),a())}function ct(i,t){i&1&&(r(0,"sh-form-field")(1,"label",11),F(2,4),a(),d(3,"input",12),a())}var ot=new H,st=()=>ot.group({passphrase:ot.control("")}),Te=class i{#e=p(K);#t=p(v);#i=p($);#n=p(b);encryptionForm=this.#t.encryptionForm;creatingTemporaryBackup=_(!1);settings=_([]);hasEncryptedBackup=h(()=>{let t=this.#t.destinationTestSignal();return t==="testing"||typeof t=="string"?!0:t?.containsEncryptedBackupFiles??!0});showEncryptionField=_(!1);next(){let t=this.#t.destinationTargetUrl();if(!t)throw new Error("No target URL");this.creatingTemporaryBackup.set(!0);let e=this.encryptionForm.value?.passphrase??null,o=[];e?o.push({Name:"--passphrase",Value:e}):o.push({Name:"--no-encryption",Value:"true"}),this.settings().forEach(n=>{let s=n.Name?.trim();s&&s!=="--"&&(s.startsWith("--")||(s=`--${s}`),o.push({Name:s,Value:n.Value??""}))}),this.#e.postApiV1Backups({requestBody:{Backup:{TargetURL:t,Settings:o}},temporary:!0}).pipe(P(()=>this.creatingTemporaryBackup.set(!1))).subscribe({next:n=>{let s=n.ID;this.#i.navigate([`/restore-draft/${s}`])},error:n=>{console.error(n)}})}back(){this.#t.isFileRestore()?this.#i.navigate(["destination"],{relativeTo:this.#n.parent}):this.#t.exit()}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=B({type:i,selectors:[["app-restore-encryption"]],decls:14,vars:5,consts:()=>{let t;t=$localize`Advanced options`;let e;e=$localize`${"\uFFFD#10\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let o;o=$localize`${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let n;n=$localize`The backup does not contain encrypted files.`;let s;s=$localize`Enter backup passphrase if defined.`;let l;return l=$localize`Password`,[t,e,o,n,l,[3,"submit","formGroup"],["title",""],[3,"optionsChange","options","hasFreeTextSettings"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],["for","password"],["type","password","id","password","autocomplete","disabled","placeholder",s,"formControlName","passphrase"]]},template:function(e,o){e&1&&(r(0,"form",5),N("submit",function(){return o.next()}),T(1,_t,2,0,"p"),T(2,ct,4,0,"sh-form-field"),r(3,"sh-toggle-card"),G(4,6),F(5,0),k(),r(6,"app-options-list",7),re("optionsChange",function(s){return se(o.settings,s)||(o.settings=s),s}),a()(),r(7,"div",8)(8,"button",9),N("click",function(){return o.back()}),m(9,1),d(10,"sh-icon"),S(),a(),r(11,"button",10),m(12,2),d(13,"sh-icon"),S(),a()()()),e&2&&(O("formGroup",o.encryptionForm),c(),g(o.hasEncryptedBackup()?-1:1),c(),g(o.hasEncryptedBackup()||o.showEncryptionField()?2:-1),c(4),ie("options",o.settings),O("hasFreeTextSettings",!0))},dependencies:[j,X,V,J,z,Y,U,_e,q,Q,je,tt],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var rt=()=>({standalone:!0});function ut(i,t){i&1&&d(0,"sh-progress-bar",13)}function dt(i,t){if(i&1&&(y(0),Se(1,"bytes")),i&2){let e=E().$implicit;Ge(" (",We(1,1,e.FileSizes),") ")}}function pt(i,t){i&1&&(r(0,"span",20),F(1,4),a())}function mt(i,t){if(i&1&&(r(0,"div",19),y(1),Se(2,"date"),T(3,dt,2,3),T(4,pt,2,0,"span",20),a()),i&2){let e=t.$implicit;c(),ke(" ",e.Version,": ",Be(2,4,e.Time,"medium")," "),c(2),g(e.FileSizes?3:-1),c(),g(e.IsFullBackup===!1?4:-1)}}function St(i,t){i&1&&d(0,"sh-progress-bar",13)}function Et(i,t){i&1&&(r(0,"sh-icon",28),y(1,"spinner"),a())}function Tt(i,t){i&1&&(r(0,"sh-icon"),y(1,"magnifying-glass"),a())}function gt(i,t){if(i&1){let e=D();r(0,"button",31),N("click",function(){I(e);let n=E(4);return M(n.clearSearch())}),r(1,"sh-icon"),y(2,"x-circle"),a(),r(3,"span"),F(4,8),a()()}}function Ft(i,t){i&1&&(r(0,"span"),F(1,9),a())}function Ct(i,t){if(i&1&&(r(0,"span"),F(1,10),a()),i&2){let e=E(5);c(),de(e.searchResults().length),pe(1)}}function Ot(i,t){if(i&1&&(r(0,"div",30),T(1,Ft,2,0,"span")(2,Ct,2,1,"span"),a()),i&2){let e=E(4);c(),g(e.searchResults().length===0?1:2)}}function Nt(i,t){if(i&1){let e=D();r(0,"div",24)(1,"sh-form-field")(2,"label",25),F(3,6),a(),r(4,"input",26),re("ngModelChange",function(n){I(e);let s=E(3);return se(s.searchQuery,n)||(s.searchQuery=n),M(n)}),N("keydown.enter",function(n){I(e);let s=E(3);return n.preventDefault(),M(s.performSearch())}),a()(),r(5,"button",27),N("click",function(){I(e);let n=E(3);return M(n.performSearch())}),T(6,Et,2,0,"sh-icon",28)(7,Tt,2,0,"sh-icon"),r(8,"span"),F(9,7),a()(),T(10,gt,5,0,"button",29),a(),T(11,Ot,3,1,"div",30)}if(i&2){let e=E(3);c(4),ie("ngModel",e.searchQuery),O("ngModelOptions",me(6,rt)),c(),O("disabled",e.isSearching()||!e.searchQuery().trim()),c(),g(e.isSearching()?6:7),c(4),g(e.isSearchMode()?10:-1),c(),g(e.isSearchMode()&&!e.isSearching()?11:-1)}}function ht(i,t){if(i&1){let e=D();T(0,Nt,12,7),r(1,"app-file-tree",21),N("hasExtendedData",function(n){I(e);let s=E(2);return M(s.extendedDataType.set(n))}),r(2,"label",22),F(3,5),a(),d(4,"input",23),a()}if(i&2){let e=E(2);g(e.canSearch()?0:-1),c(),O("rootPaths",e.rootPaths())("initialNodes",e.initialNodes())("backupSettings",e.backupSettings())("multiSelect",!0)("showFiles",!0)("loadExtendedData",!0)("searchMode",e.isSearchMode())("searchResults",e.searchResults())}}function ft(i,t){if(i&1){let e=D();r(0,"sh-select",17),N("cleared",function(){I(e);let n=E();return M(n.abortLoading())}),r(1,"input",18),re("ngModelChange",function(n){I(e);let s=E();return se(s.selectOption,n)||(s.selectOption=n),M(n)}),a(),ve(2,mt,5,7,"ng-template"),a(),T(3,St,1,0,"sh-progress-bar",13),T(4,ht,5,9)}if(i&2){let e=E();O("options",e.versionOptions())("isClearable",!1),c(),ie("ngModel",e.selectOption),O("ngModelOptions",me(6,rt)),c(2),g(e.isRepairing()||e.versionOptionsLoading()||e.loadingRootPath()?3:-1),c(),g(e.showFileTree()?4:-1)}}var Fe=new H,at=()=>Fe.group({filesToRestore:Fe.control(""),passphrase:Fe.control(null)}),Ce=class i{#e=p(K);#t=p(v);#i=p(Ke);#n=p(Z);#o=p($);#s=p(b);#a=p(ae);#l=null;#_=null;#r=_([]);selectFilesForm=this.#t.selectFilesForm;selectFilesFormSignal=this.#t.selectFilesFormSignal;selectOption=this.#t.selectOption;backupId=this.#t.backupId;versionOptionsLoading=this.#t.versionOptionsLoading;versionOptions=this.#t.versionOptions;isFileRestore=this.#t.isFileRestore;extendedDataType=this.#t.extendedDataType;needsDatabaseRepair=h(()=>this.#t.backup()?.Backup?.IsTemporary??!0);showFileTree=_(!1);backupSettings=_(null);rootPaths=_([]);initialNodes=_([]);loadingRootPath=_(!1);isRepairing=h(()=>this.#r().length>0);loadedVersions=_({});canSearch=h(()=>this.#n.hasV2ListOperations());searchQuery=_("");isSearching=_(!1);searchResults=_([]);hasSearched=_(!1);isSearchMode=h(()=>this.searchQuery().length>0&&this.hasSearched());loadingEffect=W(()=>{if(this.versionOptionsLoading())return;let e=this.versionOptions();if(e&&e?.length>0){let o=e[0].Version;this.selectOption.set(o.toString())}});backupSettingsEffect=W(()=>{let t=this.backupId(),e=this.selectOption(),o=this.isRepairing(),n=this.loadedVersions();if(!e||!t)return;let l=this.versionOptions()?.find(x=>x.Version===parseInt(e))?.Time??null;if(!l)return;let u=`${t}+${l}`,R=n[u];if(this.needsDatabaseRepair()&&(!R||o))return;let L={id:t+"",time:l};this.backupSettings.set(L),this.getRootPath(L)});repairEffect=W(()=>{if(!this.needsDatabaseRepair())return;let t=this.selectOption(),e=this.versionOptions();if(t){let o=e.find(l=>l.Version===parseInt(t));if(o===void 0)return;let n=this.backupId(),s=`${n}+${o.Time}`;if(this.#_===s||(this.#_=s,this.#r().includes(s)))return;this.#r.update(l=>[...l,s]),this.#e.postApiV1BackupByIdRepairupdate({id:n,requestBody:{only_paths:!0,time:o.Time}}).pipe(ne(this.abortLoading$),P(()=>{this.#_=null})).subscribe(l=>{let u=l.ID;this.#i.waitForTaskToComplete(u).pipe(oe(1)).subscribe(()=>{this.#r.update(R=>R.filter(L=>L!==s)),this.loadedVersions.update(R=>(R[s]=!0,R))})})}});getRootPath(t){let e={id:t.id+"",time:t.time,prefixOnly:!0,folderContents:!1},o=t.id+"";this.isRepairing()||this.#l===o||(this.#l=o,this.loadingRootPath.set(!0),this.showFileTree.set(!1),this.#n.hasV2ListOperations()?this.#e.postApiV2BackupListFolder({requestBody:{BackupId:t.id,Time:t.time,Paths:null,PageSize:0,Page:0,ReturnExtended:!0}}).pipe(ne(this.abortLoading$),P(()=>{this.showFileTree.set(!0),this.loadingRootPath.set(!1),this.#l=null})).subscribe({next:n=>{let s=(n.Data??[]).find(u=>u.Metadata&&u.Metadata.ExtType&&u.Metadata.ExtType.length>0);s&&this.extendedDataType.set(s.Metadata.ExtType);let l=(n.Data??[]).map(u=>u.Path??"");l.length>0?(this.initialNodes.set([]),this.rootPaths.set(l)):(this.initialNodes.set([]),this.rootPaths.set(["/"]))}}):this.#e.getApiV1BackupByIdFiles(e).pipe(ne(this.abortLoading$),P(()=>{this.showFileTree.set(!0),this.loadingRootPath.set(!1)})).subscribe({next:n=>{let s=n.Files.map(l=>l.Path??"");s.length>0?(this.initialNodes.set([]),this.rootPaths.set(s)):(this.initialNodes.set([]),this.rootPaths.set(["/"]))}}))}abortLoading$=new Me;abortLoading(){this.showFileTree.set(!1),this.loadingRootPath.set(!1),this.abortLoading$.next(!0)}displayFn(){let t=this.versionOptions();return e=>{if(!e)return"";let o=t?.find(n=>typeof n.Version=="number"&&n.Version.toString()===e);return o?`${o.Version}: ${this.#a.transform(o.Time,"medium")}`:""}}next(){this.#o.navigate(["options"],{relativeTo:this.#s.parent})}back(){this.#t.isFileRestore()?this.#o.navigate(["encryption"],{relativeTo:this.#s.parent}):this.#t.exit()}performSearch(){let t=this.searchQuery().trim(),e=this.backupSettings();if(!t||!e)return;let n=this.versionOptions()?.find(s=>s.Version===parseInt(this.selectOption()??""))?.Version;n!=null&&(this.isSearching.set(!0),this.searchResults.set([]),this.hasSearched.set(!0),this.#e.postApiV2BackupSearch({requestBody:{BackupId:e.id,Time:null,Version:[n],Filters:[t],Paths:null,PageSize:1e3,Page:0,ReturnExtended:!0}}).pipe(ne(this.abortLoading$),P(()=>this.isSearching.set(!1))).subscribe({next:s=>{this.searchResults.set(s.Data??[])},error:()=>{this.searchResults.set([])}}))}clearSearch(){this.searchQuery.set(""),this.searchResults.set([]),this.hasSearched.set(!1)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=B({type:i,selectors:[["app-select-files"]],features:[we([ae])],decls:13,vars:3,consts:()=>{let t;t=$localize`Select files`;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let o;o=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let n;n=$localize`Select an option...`;let s;s=$localize`(partial)`;let l;l=$localize`Path`;let u;u=$localize`Enter search term...`;let R;R=$localize`Search files`;let L;L=$localize`Search`;let x;x=$localize`Clear`;let ee;ee=$localize`0 results found`;let te;return te=$localize`Found ${"\uFFFD0\uFFFD"}:INTERPOLATION: result(s)`,[["formRef",""],t,e,o,s,l,R,L,x,ee,te,[3,"submit","formGroup"],[1,"title-30"],[1,"indeterminate","primary"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],["value","Version",3,"cleared","options","isClearable"],["type","text","placeholder",n,3,"ngModelChange","ngModel","ngModelOptions"],[1,"custom-option"],[1,"partial"],[3,"hasExtendedData","rootPaths","initialNodes","backupSettings","multiSelect","showFiles","loadExtendedData","searchMode","searchResults"],["for","path"],["type","text","id","path","formControlName","filesToRestore"],[1,"search-container"],["for","search"],["type","text","id","search","placeholder",u,3,"ngModelChange","keydown.enter","ngModel","ngModelOptions"],["shButton","","type","button",1,"small",3,"click","disabled"],[1,"spinner"],["shButton","","type","button",1,"small","secondary"],[1,"search-results-info"],["shButton","","type","button",1,"small","secondary",3,"click"]]},template:function(e,o){e&1&&(r(0,"form",11,0),N("submit",function(){return o.next()}),r(2,"h3",12),F(3,1),a(),T(4,ut,1,0,"sh-progress-bar",13)(5,ft,5,7),r(6,"div",14)(7,"button",15),N("click",function(){return o.back()}),m(8,2),d(9,"sh-icon"),S(),a(),r(10,"button",16),m(11,3),d(12,"sh-icon"),S(),a()()()),e&2&&(O("formGroup",o.selectFilesForm),c(4),g(o.versionOptionsLoading()?4:5),c(5),de(o.isFileRestore()?"Back":"Exit"),pe(8))},dependencies:[Xe,X,V,J,z,Je,j,Y,U,ce,Q,_e,q,He,Ue,ae,Qe],styles:["[_nghost-%COMP%]{display:block;margin-top:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.partial[_ngcontent-%COMP%]{color:var(--base-9);font-style:italic}.search-container[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.search-container[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%]{flex:1}.search-results-info[_ngcontent-%COMP%]{color:var(--base-8);font-size:var(--small)}"],changeDetection:0})};var v=class i{#e=p($);#t=p(b);#i=p(Z);#n=p(le);#o=p(K);backupId=_(null);backup=_(null);destinationTargetUrl=_(null);destinationTestSignal=_(null);selectFilesForm=at();optionsForm=lt();encryptionForm=st();optionsFormSignal=Ee(this.optionsForm.valueChanges);selectFilesFormSignal=Ee(this.selectFilesForm.valueChanges);selectOption=_(null);versionOptionsLoading=_(!1);versionOptions=_([]);isSubmitting=_(!1);isFileRestore=_(!1);isFullWidthPage=_(!1);extendedDataType=_(null);alternateRestorePath=_(null);alternateRestorePathSourcePrefix=_(null);init(t,e=!1){this.backupId.set(t),this.isFileRestore.set(e),this.alternateRestorePath.set(null),this.extendedDataType.set(null),e&&this.#e.navigate(["/restore-from-files/destination"]),e||this.getBackup()}updateTargetUrl(t){this.destinationTargetUrl.set(t)}setAlternateRestorePath(t,e){this.alternateRestorePath.set(t),this.alternateRestorePathSourcePrefix.set(e)}submit(){this.isSubmitting.set(!0);let t=this.backupId();this.backup()?.Backup?.IsTemporary??!1?this.#o.postApiV1BackupByIdCopytotemp({id:this.backupId()??""}).subscribe({next:o=>{this.#s(o.ID??"")},error:o=>this.showErrorDialog($localize`An error occurred while copying the backup to a temporary location: ${o.message}`)}):this.#s(t??"")}showErrorDialog(t){this.#n.open(A,{data:{title:$localize`Error occured`,message:t,confirmText:$localize`OK`,cancelText:void 0},closed:e=>{}})}#s(t){let e=this.optionsForm.value,o=this.selectFilesForm.value,n=this.selectOption(),s=this.versionOptions()?.find(l=>l.Version===(n&&parseInt(n)));this.#o.postApiV1BackupByIdRestore({id:t??"",requestBody:{paths:o.filesToRestore?.split("\0").map(l=>l.endsWith("/")||l.endsWith("\\")?`${l}*`:l)??[],passphrase:o.passphrase??null,time:s?.Time,restore_path:this.alternateRestorePath()??e.restoreFromPath,overwrite:e.handleExisting==="overwrite",permissions:e.permissions,skip_metadata:!e.includeMetadata,source_prefix:this.alternateRestorePathSourcePrefix(),connection_string_id:null}}).pipe(P(()=>this.isSubmitting.set(!1))).subscribe({next:l=>{this.#e.navigate([`./${l.ID}`,"progress"],{relativeTo:this.#t})},error:l=>{console.error("restore error",l)}})}exit(){this.#n.open(A,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:t=>{t&&(this.#a(),this.#e.navigate(["/"]))}})}getVersionOptions(){this.versionOptions()}loadFilesetsWithRetryv2(t,e=2){return this.#o.postApiV2BackupListFilesets({requestBody:{BackupId:t}}).pipe(De(o=>{let n=o?.error?.body?.StatusCode??o?.error?.requestBody?.StatusCode;return n==="EncryptedStorageNoPassphrase"||n==="FolderMissing"||n==="EmptyRemoteFolder"||e===0?Le(()=>o):ye(1e3).pipe($e(()=>this.loadFilesetsWithRetryv2(t,e-1)))}))}getBackup(){let t=this.backupId();this.versionOptionsLoading.set(!0),this.#i.hasV2ListOperations()?ue([this.#o.getApiV1BackupById({id:t}),this.loadFilesetsWithRetryv2(t)]).pipe(oe(1),P(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([e,o])=>{if(o.Error)throw new Error(o.Error);if(!(e.Backup?.IsTemporary??!0)&&e?.Backup?.DBPathExists===!1){this.#n.open(A,{data:{title:$localize`Missing Local Database`,message:$localize`The local database for this backup is missing. Please repair or recreate the local database before restoring.`,confirmText:$localize`OK`,cancelText:void 0},closed:s=>{this.#e.navigate(["/backup",t,"database"])}});return}this.versionOptions.set((o.Data??[]).map(s=>({Version:s.Version??-1,IsFullBackup:s.IsFullBackup??void 0,Time:s.Time??"<missing>",FileCount:s.FileCount??void 0,FileSizes:s.FileSizes??void 0}))),this.backup.set(e)},error:e=>{let o=e?.error?.body?.StatusCode??e?.error?.requestBody?.StatusCode,n=o==="EncryptedStorageNoPassphrase",s=o==="FolderMissing",l=o==="EmptyRemoteFolder",u=$localize`An error occurred while loading the backup filesets: ${e.message}`;n&&(u=$localize`The remote storage is encrypted. Please enter the passphrase to access the backup.`),s&&(u=$localize`The backup storage folder was not found.`),l&&(u=$localize`The backup storage folder does not contain any filesets.`),this.#n.open(A,{data:{title:$localize`Failed to load backup filesets`,message:u,confirmText:$localize`OK`,cancelText:void 0},closed:R=>{this.#e.navigate([n?"/restore-from-files/encryption":"/restore-from-files/destination"])}})}}):ue([this.#o.getApiV1BackupById({id:t}),this.#o.getApiV1BackupByIdFilesets({id:t}).pipe(be(3))]).pipe(oe(1),P(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([e,o])=>{this.versionOptions.set(o.map(n=>({Version:n.Version??-1,IsFullBackup:(n.IsFullBackup??1)==1,Time:n.Time??"<missing>",FileCount:n.FileCount??void 0,FileSizes:n.FileSizes??void 0}))),this.backup.set(e)}})}#a(){this.selectFilesForm.reset(),this.optionsForm.reset()}static \u0275fac=function(e){return new(e||i)};static \u0275prov=Ae({token:i,factory:i.\u0275fac,providedIn:"root"})};function Rt(i,t){if(i&1){let e=D();r(0,"sh-radio",27),m(1,6),d(2,"input",31),S(),a(),r(3,"sh-radio",27),m(4,7),r(5,"input",32),N("click",function(){I(e);let n=E(2);return M(n.chooseCustomRemoteDestination())}),a(),S(),a()}}function Pt(i,t){if(i&1){let e=D();r(0,"sh-radio",27),m(1,8),d(2,"input",31),S(),a(),r(3,"sh-radio",27),m(4,9),r(5,"input",32),N("click",function(){I(e);let n=E(2);return M(n.chooseCustomRemoteDestination())}),a(),S(),a()}}function It(i,t){if(i&1&&(r(0,"app-file-tree",29)(1,"label",33),y(2,"Path"),a(),d(3,"input",34),a()),i&2){let e,o=E(2);O("disabled",((e=o.optionsFormSignal())==null?null:e.restoreFrom)!=="pickLocation")("enableCreateFolder",!0)("resolvePaths",!0)}}function Mt(i,t){if(i&1&&(r(0,"app-file-tree",30)(1,"label",33),y(2,"Path"),a(),d(3,"input",34),a()),i&2){let e=E(2);O("customRemoteMode",e.extendedDataType())("backupId",e.backupId())("sourcePrefix",e.remoteCustomSourcePrefix())("destinationUrl",e.customDestinationUrl())}}function Lt(i,t){if(i&1&&(T(0,Rt,6,0)(1,Pt,6,0),r(2,"sh-radio",27),m(3,5),d(4,"input",28),S(),a(),T(5,It,4,3,"app-file-tree",29),T(6,Mt,4,4,"app-file-tree",30)),i&2){let e,o=E();g(o.extendedDataType()==="o365"?0:o.extendedDataType()==="gsuite"?1:-1),c(5),g(((e=o.optionsFormSignal())==null?null:e.restoreFrom)==="pickLocation"?5:-1),c(),g(o.showCustomRemoteRestoreTree()?6:-1)}}function yt(i,t){if(i&1&&(r(0,"sh-radio",27),m(1,10),d(2,"input",35),S(),a(),r(3,"sh-radio",27),m(4,11),d(5,"input",28),S(),a(),r(6,"app-file-tree",29)(7,"label",33),y(8,"Path"),a(),d(9,"input",34),a()),i&2){let e,o=E();c(6),O("disabled",((e=o.optionsFormSignal())==null?null:e.restoreFrom)!=="pickLocation")("enableCreateFolder",!0)("resolvePaths",!0)}}function Dt(i,t){i&1&&(r(0,"app-toggle-card",22),G(1,23),F(2,12),k(),r(3,"sh-toggle",27),m(4,13),d(5,"input",36),S(),a()()),i&2&&O("disableToggle",!0)}function bt(i,t){i&1&&(r(0,"app-toggle-card",22),G(1,23),F(2,14),k(),r(3,"sh-radio",27),m(4,15),d(5,"input",37),S(),a(),r(6,"sh-radio",27),m(7,16),d(8,"input",38),S(),a()(),r(9,"app-toggle-card"),G(10,23),F(11,17),k(),r(12,"sh-toggle",39),m(13,18),d(14,"input",40),S(),a(),r(15,"sh-toggle",39),m(16,19),d(17,"input",41),S(),a()()),i&2&&O("disableToggle",!0)}var w=new H,lt=()=>w.group({restoreFrom:w.control("original"),restoreFromPath:w.control(""),handleExisting:w.control("saveTimestamp"),permissions:w.control(!1),includeMetadata:w.control(!0),customRemoteIgnoreExisting:w.control(!1)}),Oe=class i{#e=p(v);#t=p($);#i=p(b);#n=p(Z);#o=p(le);optionsForm=this.#e.optionsForm;optionsFormSignal=this.#e.optionsFormSignal;isSubmitting=this.#e.isSubmitting;extendedData=this.#e.extendedDataType;remoteCustomTargetUrl=_(null);backupId=h(()=>this.#e.backup()?.Backup?.ID??null);extendedDataType=h(()=>{let t=this.#e.extendedDataType();return t==="o365"?"o365":t==="gsuite"?"gsuite":null});remoteCustomSourceEntry=h(()=>this.#e.backup()?.Backup?.Sources?.filter(t=>t.startsWith("@")&&(t.includes("|office365://")||t.includes("|googleworkspace://")))[0]??null);remoteCustomSourceUrl=h(()=>this.remoteCustomSourceEntry()?.split("|")[1]??null);remoteCustomSourcePrefix=h(()=>this.remoteCustomSourceEntry()?.split("|")[0]??null);customDestinationUrl=h(()=>{let t=this.optionsFormSignal()?.restoreFrom,e=this.extendedDataType()!==null;return t==="same-custom"&&e?this.remoteCustomSourceUrl():t==="other-custom"&&e?this.remoteCustomTargetUrl():null});showCustomRemoteRestoreTree=h(()=>!!(this.optionsFormSignal()?.restoreFrom==="same-custom"&&this.customDestinationUrl()&&this.backupId()||this.optionsFormSignal()?.restoreFrom==="other-custom"&&this.customDestinationUrl()));isCustomRemoteRestore=h(()=>{let t=this.optionsFormSignal()?.restoreFrom;return t==="same-custom"||t==="other-custom"});chooseCustomRemoteDestination(){let t=this.extendedDataType()==="o365"?"office365://":"googleworkspace://";return this.#o.open(et,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:!1,data:{targetUrlModel:this.remoteCustomTargetUrl()||this.remoteCustomSourceUrl()||t,moduleType:"RestoreDestinationProvider",askToCreate:!0,expectedResult:"any",suppressErrorDialogs:!0,backupId:this.backupId(),sourcePrefix:this.remoteCustomSourcePrefix()}}).closed.subscribe(o=>{o&&(this.remoteCustomTargetUrl.set(o),this.optionsForm.controls.restoreFrom.setValue("other-custom"))}),!1}#s=W(()=>{let t=this.optionsFormSignal()?.restoreFrom;this.extendedDataType()!=null&&(t==="original"||t===void 0)&&(this.optionsForm.controls.restoreFrom.setValue("pickLocation"),this.optionsForm.controls.handleExisting.setValue("overwrite")),this.extendedDataType()==null&&(t==="same-custom"||t==="other-custom")&&(this.optionsForm.controls.restoreFrom.setValue("original"),this.optionsForm.controls.handleExisting.setValue("saveTimestamp"))});goBack(){this.#t.navigate(["select-files"],{relativeTo:this.#i.parent})}submit(){let t=this.#e.selectFilesFormSignal()?.filesToRestore??[];if(t.length>0&&this.optionsFormSignal()?.restoreFrom=="original"&&(t[0].includes("/")?"/":"\\")!==this.#n.systemInfo()?.DirectorySeparator){this.#o.open(A,{data:{title:$localize`Confirm target folder`,message:$localize`This backup was created on another operating system. Restoring files without specifying a destination folder can cause files to be restored in unexpected places. Are you sure you want to continue without choosing a destination folder?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:n=>{n&&this.#e.submit()}});return}if(this.optionsFormSignal()?.restoreFrom==="same-custom"||this.optionsFormSignal()?.restoreFrom==="other-custom"){let o=this.optionsFormSignal()?.restoreFromPath;if(o&&o.startsWith("/")&&(o=o.substring(1)),!o||o.trim()===""){this.#o.open(A,{data:{title:$localize`No path specified`,message:this.extendedDataType()==="gsuite"?$localize`Please choose a path to restore to in the Google Workspace account.`:$localize`Please choose a path to restore to in the Microsoft 365 tenant.`,confirmText:$localize`OK`,cancelText:void 0}});return}let n=this.optionsFormSignal()?.customRemoteIgnoreExisting,s=this.customDestinationUrl()?.substring(this.customDestinationUrl().indexOf("?")),l=this.extendedDataType()==="gsuite"?`@googleworkspace://${encodeURIComponent(o)}${s}&google-ignore-existing=${n?"true":"false"}`:`@office365://${encodeURIComponent(o)}${s}&office365-ignore-existing=${n?"true":"false"}`;this.#e.setAlternateRestorePath(l,this.remoteCustomSourcePrefix()),this.optionsForm.controls.includeMetadata.setValue(!0),this.optionsForm.controls.permissions.setValue(!0)}else this.#e.setAlternateRestorePath(null,null);this.#e.submit()}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=B({type:i,selectors:[["app-advanced-options-settings"]],decls:18,vars:6,consts:()=>{let t;t=$localize`Restore options`;let e;e=$localize`Where do you want to restore files to?`;let o;o=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let n;n=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Submit `;let s;s=$localize` Local file system ${"\uFFFD#4\uFFFD\uFFFD/#4\uFFFD"}:TAG_INPUT:`;let l;l=$localize` Same Microsoft 365 Tenant ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let u;u=$localize` Different Microsoft 365 Tenant ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let R;R=$localize` Same Google Workspace Account ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let L;L=$localize` Different Google Workspace Account ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let x;x=$localize` Original location ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let ee;ee=$localize` Pick location ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let te;te=$localize`Restore settings`;let f;f=$localize` Ignore existing resources in the destination ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let Ne;Ne=$localize`How do you want to handle existing files?`;let he;he=$localize` Overwrite ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let fe;fe=$localize` Save different versions with timestamp in file name ${"\uFFFD#8\uFFFD\uFFFD/#8\uFFFD"}:TAG_INPUT:`;let Re;Re=$localize`Metadata settings`;let Pe;Pe=$localize` Restore file metadata ${"\uFFFD#14\uFFFD\uFFFD/#14\uFFFD"}:TAG_INPUT:`;let Ie;return Ie=$localize` Restore read/write permissions ${"\uFFFD#17\uFFFD\uFFFD/#17\uFFFD"}:TAG_INPUT:`,[["formRef",""],t,e,o,n,s,l,u,R,L,x,ee,te,f,Ne,he,fe,Re,Pe,Ie,[3,"submit","formGroup"],[1,"title-30"],[3,"disableToggle"],["title",""],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],[1,"raised","primary"],["type","radio","name","restoreFrom","value","pickLocation","formControlName","restoreFrom"],[3,"disabled","enableCreateFolder","resolvePaths"],[3,"customRemoteMode","backupId","sourcePrefix","destinationUrl"],["type","radio","name","restoreFrom","value","same-custom","formControlName","restoreFrom"],["type","radio","name","restoreFrom","value","other-custom","formControlName","restoreFrom",3,"click"],["for","path"],["type","text","id","path","formControlName","restoreFromPath"],["type","radio","name","restoreFrom","value","original","formControlName","restoreFrom"],["type","checkbox","formControlName","customRemoteIgnoreExisting"],["type","radio","name","handleExisting","value","overwrite","formControlName","handleExisting"],["type","radio","name","handleExisting","value","saveTimestamp","formControlName","handleExisting"],[1,"primary","raised"],["type","checkbox","formControlName","includeMetadata"],["type","checkbox","formControlName","permissions"]]},template:function(e,o){e&1&&(r(0,"form",20,0),N("submit",function(){return o.submit()}),r(2,"h3",21),F(3,1),a(),r(4,"app-toggle-card",22),G(5,23),F(6,2),k(),T(7,Lt,7,3)(8,yt,10,3),a(),T(9,Dt,6,1,"app-toggle-card",22)(10,bt,18,1),r(11,"div",24)(12,"button",25),N("click",function(){return o.goBack()}),m(13,3),d(14,"sh-icon"),S(),a(),r(15,"button",26),m(16,4),d(17,"sh-icon"),S(),a()()()),e&2&&(O("formGroup",o.optionsForm),c(4),O("disableToggle",!0),c(3),g(o.extendedDataType()!==null?7:8),c(2),g(o.isCustomRemoteRestore()?9:10),c(6),xe("loading",o.isSubmitting()))},dependencies:[j,X,V,Ve,ze,J,z,Y,U,Ze,ce,qe,Ye,Q,q],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};export{lt as a,Oe as b,st as c,Te as d,at as e,Ce as f,v as g};
|
|
1
|
+
import{a as tt}from"./chunk-VZNLMGYP.js";import{k as Ze,n as et}from"./chunk-O2L2FRYE.js";import{a as ce}from"./chunk-2EX5HS5X.js";import{a as Qe}from"./chunk-COEGVUM3.js";import{b as Ee}from"./chunk-2KD757N6.js";import{b as Ke}from"./chunk-OP7MDR2B.js";import{a as A}from"./chunk-PEOYNJJM.js";import{a as Z}from"./chunk-NUV5LHQV.js";import{B as Q,H as _e,L as Ue,M as Ye,P as He,V as je,W as qe,b as Ve,c as V,e as J,f as z,i as Je,j as X,l as ze,p as U,q as Y,r as H,s as Xe,t as j,v as q,z as le}from"./chunk-CJKZ27FM.js";import{d as K}from"./chunk-KNSQLQC6.js";import{b,d as $}from"./chunk-CQJRBQ6I.js";import{ha as ae}from"./chunk-YF6JHIN5.js";import{$ as p,Ac as we,B as De,Bc as me,Db as O,E as oe,Eb as r,Fb as a,G as P,Gb as d,Gc as Se,Hc as We,Ic as Be,J as be,Kb as G,Lb as k,M as $e,N as ne,Nb as D,Rc as h,Ta as c,Ub as m,Vb as S,W as Ae,Wb as F,Xb as de,Yb as pe,_b as N,ac as E,ea as I,fa as M,g as Me,hb as B,lc as xe,m as Le,mb as ve,oc as y,qa as _,qc as Ge,rc as ke,sa as W,tc as ie,uc as se,vc as re,w as ue,x as ye,xb as T,yb as g}from"./chunk-K5XGRFWJ.js";function _t(i,t){i&1&&(r(0,"p"),F(1,3),a())}function ct(i,t){i&1&&(r(0,"sh-form-field")(1,"label",11),F(2,4),a(),d(3,"input",12),a())}var ot=new H,st=()=>ot.group({passphrase:ot.control("")}),Te=class i{#e=p(K);#t=p(v);#i=p($);#n=p(b);encryptionForm=this.#t.encryptionForm;creatingTemporaryBackup=_(!1);settings=_([]);hasEncryptedBackup=h(()=>{let t=this.#t.destinationTestSignal();return t==="testing"||typeof t=="string"?!0:t?.containsEncryptedBackupFiles??!0});showEncryptionField=_(!1);next(){let t=this.#t.destinationTargetUrl();if(!t)throw new Error("No target URL");this.creatingTemporaryBackup.set(!0);let e=this.encryptionForm.value?.passphrase??null,o=[];e?o.push({Name:"--passphrase",Value:e}):o.push({Name:"--no-encryption",Value:"true"}),this.settings().forEach(n=>{let s=n.Name?.trim();s&&s!=="--"&&(s.startsWith("--")||(s=`--${s}`),o.push({Name:s,Value:n.Value??""}))}),this.#e.postApiV1Backups({requestBody:{Backup:{TargetURL:t,Settings:o}},temporary:!0}).pipe(P(()=>this.creatingTemporaryBackup.set(!1))).subscribe({next:n=>{let s=n.ID;this.#i.navigate([`/restore-draft/${s}`])},error:n=>{console.error(n)}})}back(){this.#t.isFileRestore()?this.#i.navigate(["destination"],{relativeTo:this.#n.parent}):this.#t.exit()}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=B({type:i,selectors:[["app-restore-encryption"]],decls:14,vars:5,consts:()=>{let t;t=$localize`Advanced options`;let e;e=$localize`${"\uFFFD#10\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let o;o=$localize`${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let n;n=$localize`The backup does not contain encrypted files.`;let s;s=$localize`Enter backup passphrase if defined.`;let l;return l=$localize`Password`,[t,e,o,n,l,[3,"submit","formGroup"],["title",""],[3,"optionsChange","options","hasFreeTextSettings"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],["for","password"],["type","password","id","password","autocomplete","disabled","placeholder",s,"formControlName","passphrase"]]},template:function(e,o){e&1&&(r(0,"form",5),N("submit",function(){return o.next()}),T(1,_t,2,0,"p"),T(2,ct,4,0,"sh-form-field"),r(3,"sh-toggle-card"),G(4,6),F(5,0),k(),r(6,"app-options-list",7),re("optionsChange",function(s){return se(o.settings,s)||(o.settings=s),s}),a()(),r(7,"div",8)(8,"button",9),N("click",function(){return o.back()}),m(9,1),d(10,"sh-icon"),S(),a(),r(11,"button",10),m(12,2),d(13,"sh-icon"),S(),a()()()),e&2&&(O("formGroup",o.encryptionForm),c(),g(o.hasEncryptedBackup()?-1:1),c(),g(o.hasEncryptedBackup()||o.showEncryptionField()?2:-1),c(4),ie("options",o.settings),O("hasFreeTextSettings",!0))},dependencies:[j,X,V,J,z,Y,U,_e,q,Q,je,tt],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var rt=()=>({standalone:!0});function ut(i,t){i&1&&d(0,"sh-progress-bar",13)}function dt(i,t){if(i&1&&(y(0),Se(1,"bytes")),i&2){let e=E().$implicit;Ge(" (",We(1,1,e.FileSizes),") ")}}function pt(i,t){i&1&&(r(0,"span",20),F(1,4),a())}function mt(i,t){if(i&1&&(r(0,"div",19),y(1),Se(2,"date"),T(3,dt,2,3),T(4,pt,2,0,"span",20),a()),i&2){let e=t.$implicit;c(),ke(" ",e.Version,": ",Be(2,4,e.Time,"medium")," "),c(2),g(e.FileSizes?3:-1),c(),g(e.IsFullBackup===!1?4:-1)}}function St(i,t){i&1&&d(0,"sh-progress-bar",13)}function Et(i,t){i&1&&(r(0,"sh-icon",28),y(1,"spinner"),a())}function Tt(i,t){i&1&&(r(0,"sh-icon"),y(1,"magnifying-glass"),a())}function gt(i,t){if(i&1){let e=D();r(0,"button",31),N("click",function(){I(e);let n=E(4);return M(n.clearSearch())}),r(1,"sh-icon"),y(2,"x-circle"),a(),r(3,"span"),F(4,8),a()()}}function Ft(i,t){i&1&&(r(0,"span"),F(1,9),a())}function Ct(i,t){if(i&1&&(r(0,"span"),F(1,10),a()),i&2){let e=E(5);c(),de(e.searchResults().length),pe(1)}}function Ot(i,t){if(i&1&&(r(0,"div",30),T(1,Ft,2,0,"span")(2,Ct,2,1,"span"),a()),i&2){let e=E(4);c(),g(e.searchResults().length===0?1:2)}}function Nt(i,t){if(i&1){let e=D();r(0,"div",24)(1,"sh-form-field")(2,"label",25),F(3,6),a(),r(4,"input",26),re("ngModelChange",function(n){I(e);let s=E(3);return se(s.searchQuery,n)||(s.searchQuery=n),M(n)}),N("keydown.enter",function(n){I(e);let s=E(3);return n.preventDefault(),M(s.performSearch())}),a()(),r(5,"button",27),N("click",function(){I(e);let n=E(3);return M(n.performSearch())}),T(6,Et,2,0,"sh-icon",28)(7,Tt,2,0,"sh-icon"),r(8,"span"),F(9,7),a()(),T(10,gt,5,0,"button",29),a(),T(11,Ot,3,1,"div",30)}if(i&2){let e=E(3);c(4),ie("ngModel",e.searchQuery),O("ngModelOptions",me(6,rt)),c(),O("disabled",e.isSearching()||!e.searchQuery().trim()),c(),g(e.isSearching()?6:7),c(4),g(e.isSearchMode()?10:-1),c(),g(e.isSearchMode()&&!e.isSearching()?11:-1)}}function ht(i,t){if(i&1){let e=D();T(0,Nt,12,7),r(1,"app-file-tree",21),N("hasExtendedData",function(n){I(e);let s=E(2);return M(s.extendedDataType.set(n))}),r(2,"label",22),F(3,5),a(),d(4,"input",23),a()}if(i&2){let e=E(2);g(e.canSearch()?0:-1),c(),O("rootPaths",e.rootPaths())("initialNodes",e.initialNodes())("backupSettings",e.backupSettings())("multiSelect",!0)("showFiles",!0)("loadExtendedData",!0)("searchMode",e.isSearchMode())("searchResults",e.searchResults())}}function ft(i,t){if(i&1){let e=D();r(0,"sh-select",17),N("cleared",function(){I(e);let n=E();return M(n.abortLoading())}),r(1,"input",18),re("ngModelChange",function(n){I(e);let s=E();return se(s.selectOption,n)||(s.selectOption=n),M(n)}),a(),ve(2,mt,5,7,"ng-template"),a(),T(3,St,1,0,"sh-progress-bar",13),T(4,ht,5,9)}if(i&2){let e=E();O("options",e.versionOptions())("isClearable",!1),c(),ie("ngModel",e.selectOption),O("ngModelOptions",me(6,rt)),c(2),g(e.isRepairing()||e.versionOptionsLoading()||e.loadingRootPath()?3:-1),c(),g(e.showFileTree()?4:-1)}}var Fe=new H,at=()=>Fe.group({filesToRestore:Fe.control(""),passphrase:Fe.control(null)}),Ce=class i{#e=p(K);#t=p(v);#i=p(Ke);#n=p(Z);#o=p($);#s=p(b);#a=p(ae);#l=null;#_=null;#r=_([]);selectFilesForm=this.#t.selectFilesForm;selectFilesFormSignal=this.#t.selectFilesFormSignal;selectOption=this.#t.selectOption;backupId=this.#t.backupId;versionOptionsLoading=this.#t.versionOptionsLoading;versionOptions=this.#t.versionOptions;isFileRestore=this.#t.isFileRestore;extendedDataType=this.#t.extendedDataType;needsDatabaseRepair=h(()=>this.#t.backup()?.Backup?.IsTemporary??!0);showFileTree=_(!1);backupSettings=_(null);rootPaths=_([]);initialNodes=_([]);loadingRootPath=_(!1);isRepairing=h(()=>this.#r().length>0);loadedVersions=_({});canSearch=h(()=>this.#n.hasV2ListOperations());searchQuery=_("");isSearching=_(!1);searchResults=_([]);hasSearched=_(!1);isSearchMode=h(()=>this.searchQuery().length>0&&this.hasSearched());loadingEffect=W(()=>{if(this.versionOptionsLoading())return;let e=this.versionOptions();if(e&&e?.length>0){let o=e[0].Version;this.selectOption.set(o.toString())}});backupSettingsEffect=W(()=>{let t=this.backupId(),e=this.selectOption(),o=this.isRepairing(),n=this.loadedVersions();if(!e||!t)return;let l=this.versionOptions()?.find(x=>x.Version===parseInt(e))?.Time??null;if(!l)return;let u=`${t}+${l}`,R=n[u];if(this.needsDatabaseRepair()&&(!R||o))return;let L={id:t+"",time:l};this.backupSettings.set(L),this.getRootPath(L)});repairEffect=W(()=>{if(!this.needsDatabaseRepair())return;let t=this.selectOption(),e=this.versionOptions();if(t){let o=e.find(l=>l.Version===parseInt(t));if(o===void 0)return;let n=this.backupId(),s=`${n}+${o.Time}`;if(this.#_===s||(this.#_=s,this.#r().includes(s)))return;this.#r.update(l=>[...l,s]),this.#e.postApiV1BackupByIdRepairupdate({id:n,requestBody:{only_paths:!0,time:o.Time}}).pipe(ne(this.abortLoading$),P(()=>{this.#_=null})).subscribe(l=>{let u=l.ID;this.#i.waitForTaskToComplete(u).pipe(oe(1)).subscribe(()=>{this.#r.update(R=>R.filter(L=>L!==s)),this.loadedVersions.update(R=>(R[s]=!0,R))})})}});getRootPath(t){let e={id:t.id+"",time:t.time,prefixOnly:!0,folderContents:!1},o=t.id+"";this.isRepairing()||this.#l===o||(this.#l=o,this.loadingRootPath.set(!0),this.showFileTree.set(!1),this.#n.hasV2ListOperations()?this.#e.postApiV2BackupListFolder({requestBody:{BackupId:t.id,Time:t.time,Paths:null,PageSize:0,Page:0,ReturnExtended:!0}}).pipe(ne(this.abortLoading$),P(()=>{this.showFileTree.set(!0),this.loadingRootPath.set(!1),this.#l=null})).subscribe({next:n=>{let s=(n.Data??[]).find(u=>u.Metadata&&u.Metadata.ExtType&&u.Metadata.ExtType.length>0);s&&this.extendedDataType.set(s.Metadata.ExtType);let l=(n.Data??[]).map(u=>u.Path??"");l.length>0?(this.initialNodes.set([]),this.rootPaths.set(l)):(this.initialNodes.set([]),this.rootPaths.set(["/"]))}}):this.#e.getApiV1BackupByIdFiles(e).pipe(ne(this.abortLoading$),P(()=>{this.showFileTree.set(!0),this.loadingRootPath.set(!1)})).subscribe({next:n=>{let s=n.Files.map(l=>l.Path??"");s.length>0?(this.initialNodes.set([]),this.rootPaths.set(s)):(this.initialNodes.set([]),this.rootPaths.set(["/"]))}}))}abortLoading$=new Me;abortLoading(){this.showFileTree.set(!1),this.loadingRootPath.set(!1),this.abortLoading$.next(!0)}displayFn(){let t=this.versionOptions();return e=>{if(!e)return"";let o=t?.find(n=>typeof n.Version=="number"&&n.Version.toString()===e);return o?`${o.Version}: ${this.#a.transform(o.Time,"medium")}`:""}}next(){this.#o.navigate(["options"],{relativeTo:this.#s.parent})}back(){this.#t.isFileRestore()?this.#o.navigate(["encryption"],{relativeTo:this.#s.parent}):this.#t.exit()}performSearch(){let t=this.searchQuery().trim(),e=this.backupSettings();if(!t||!e)return;let n=this.versionOptions()?.find(s=>s.Version===parseInt(this.selectOption()??""))?.Version;n!=null&&(this.isSearching.set(!0),this.searchResults.set([]),this.hasSearched.set(!0),this.#e.postApiV2BackupSearch({requestBody:{BackupId:e.id,Time:null,Version:[n],Filters:[t],Paths:null,PageSize:1e3,Page:0,ReturnExtended:!0}}).pipe(ne(this.abortLoading$),P(()=>this.isSearching.set(!1))).subscribe({next:s=>{this.searchResults.set(s.Data??[])},error:()=>{this.searchResults.set([])}}))}clearSearch(){this.searchQuery.set(""),this.searchResults.set([]),this.hasSearched.set(!1)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=B({type:i,selectors:[["app-select-files"]],features:[we([ae])],decls:13,vars:3,consts:()=>{let t;t=$localize`Select files`;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let o;o=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let n;n=$localize`Select an option...`;let s;s=$localize`(partial)`;let l;l=$localize`Path`;let u;u=$localize`Enter search term...`;let R;R=$localize`Search files`;let L;L=$localize`Search`;let x;x=$localize`Clear`;let ee;ee=$localize`0 results found`;let te;return te=$localize`Found ${"\uFFFD0\uFFFD"}:INTERPOLATION: result(s)`,[["formRef",""],t,e,o,s,l,R,L,x,ee,te,[3,"submit","formGroup"],[1,"title-30"],[1,"indeterminate","primary"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],["value","Version",3,"cleared","options","isClearable"],["type","text","placeholder",n,3,"ngModelChange","ngModel","ngModelOptions"],[1,"custom-option"],[1,"partial"],[3,"hasExtendedData","rootPaths","initialNodes","backupSettings","multiSelect","showFiles","loadExtendedData","searchMode","searchResults"],["for","path"],["type","text","id","path","formControlName","filesToRestore"],[1,"search-container"],["for","search"],["type","text","id","search","placeholder",u,3,"ngModelChange","keydown.enter","ngModel","ngModelOptions"],["shButton","","type","button",1,"small",3,"click","disabled"],[1,"spinner"],["shButton","","type","button",1,"small","secondary"],[1,"search-results-info"],["shButton","","type","button",1,"small","secondary",3,"click"]]},template:function(e,o){e&1&&(r(0,"form",11,0),N("submit",function(){return o.next()}),r(2,"h3",12),F(3,1),a(),T(4,ut,1,0,"sh-progress-bar",13)(5,ft,5,7),r(6,"div",14)(7,"button",15),N("click",function(){return o.back()}),m(8,2),d(9,"sh-icon"),S(),a(),r(10,"button",16),m(11,3),d(12,"sh-icon"),S(),a()()()),e&2&&(O("formGroup",o.selectFilesForm),c(4),g(o.versionOptionsLoading()?4:5),c(5),de(o.isFileRestore()?"Back":"Exit"),pe(8))},dependencies:[Xe,X,V,J,z,Je,j,Y,U,ce,Q,_e,q,He,Ue,ae,Qe],styles:["[_nghost-%COMP%]{display:block;margin-top:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.partial[_ngcontent-%COMP%]{color:var(--base-9);font-style:italic}.search-container[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.search-container[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%]{flex:1}.search-results-info[_ngcontent-%COMP%]{color:var(--base-8);font-size:var(--small)}"],changeDetection:0})};var v=class i{#e=p($);#t=p(b);#i=p(Z);#n=p(le);#o=p(K);backupId=_(null);backup=_(null);destinationTargetUrl=_(null);destinationTestSignal=_(null);selectFilesForm=at();optionsForm=lt();encryptionForm=st();optionsFormSignal=Ee(this.optionsForm.valueChanges);selectFilesFormSignal=Ee(this.selectFilesForm.valueChanges);selectOption=_(null);versionOptionsLoading=_(!1);versionOptions=_([]);isSubmitting=_(!1);isFileRestore=_(!1);isFullWidthPage=_(!1);extendedDataType=_(null);alternateRestorePath=_(null);alternateRestorePathSourcePrefix=_(null);init(t,e=!1){this.backupId.set(t),this.isFileRestore.set(e),this.alternateRestorePath.set(null),this.extendedDataType.set(null),e&&this.#e.navigate(["/restore-from-files/destination"]),e||this.getBackup()}updateTargetUrl(t){this.destinationTargetUrl.set(t)}setAlternateRestorePath(t,e){this.alternateRestorePath.set(t),this.alternateRestorePathSourcePrefix.set(e)}submit(){this.isSubmitting.set(!0);let t=this.backupId();this.backup()?.Backup?.IsTemporary??!1?this.#o.postApiV1BackupByIdCopytotemp({id:this.backupId()??""}).subscribe({next:o=>{this.#s(o.ID??"")},error:o=>this.showErrorDialog($localize`An error occurred while copying the backup to a temporary location: ${o.message}`)}):this.#s(t??"")}showErrorDialog(t){this.#n.open(A,{data:{title:$localize`Error occured`,message:t,confirmText:$localize`OK`,cancelText:void 0},closed:e=>{}})}#s(t){let e=this.optionsForm.value,o=this.selectFilesForm.value,n=this.selectOption(),s=this.versionOptions()?.find(l=>l.Version===(n&&parseInt(n)));this.#o.postApiV1BackupByIdRestore({id:t??"",requestBody:{paths:o.filesToRestore?.split("\0").map(l=>l.endsWith("/")||l.endsWith("\\")?`${l}*`:l)??[],passphrase:o.passphrase??null,time:s?.Time,restore_path:this.alternateRestorePath()??e.restoreFromPath,overwrite:e.handleExisting==="overwrite",permissions:e.permissions,skip_metadata:!e.includeMetadata,source_prefix:this.alternateRestorePathSourcePrefix(),connection_string_id:null}}).pipe(P(()=>this.isSubmitting.set(!1))).subscribe({next:l=>{this.#e.navigate([`./${l.ID}`,"progress"],{relativeTo:this.#t})},error:l=>{console.error("restore error",l)}})}exit(){this.#n.open(A,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:t=>{t&&(this.#a(),this.#e.navigate(["/"]))}})}getVersionOptions(){this.versionOptions()}loadFilesetsWithRetryv2(t,e=2){return this.#o.postApiV2BackupListFilesets({requestBody:{BackupId:t}}).pipe(De(o=>{let n=o?.error?.body?.StatusCode??o?.error?.requestBody?.StatusCode;return n==="EncryptedStorageNoPassphrase"||n==="FolderMissing"||n==="EmptyRemoteFolder"||e===0?Le(()=>o):ye(1e3).pipe($e(()=>this.loadFilesetsWithRetryv2(t,e-1)))}))}getBackup(){let t=this.backupId();this.versionOptionsLoading.set(!0),this.#i.hasV2ListOperations()?ue([this.#o.getApiV1BackupById({id:t}),this.loadFilesetsWithRetryv2(t)]).pipe(oe(1),P(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([e,o])=>{if(o.Error)throw new Error(o.Error);if(!(e.Backup?.IsTemporary??!0)&&e?.Backup?.DBPathExists===!1){this.#n.open(A,{data:{title:$localize`Missing Local Database`,message:$localize`The local database for this backup is missing. Please repair or recreate the local database before restoring.`,confirmText:$localize`OK`,cancelText:void 0},closed:s=>{this.#e.navigate(["/backup",t,"database"])}});return}this.versionOptions.set((o.Data??[]).map(s=>({Version:s.Version??-1,IsFullBackup:s.IsFullBackup??void 0,Time:s.Time??"<missing>",FileCount:s.FileCount??void 0,FileSizes:s.FileSizes??void 0}))),this.backup.set(e)},error:e=>{let o=e?.error?.body?.StatusCode??e?.error?.requestBody?.StatusCode,n=o==="EncryptedStorageNoPassphrase",s=o==="FolderMissing",l=o==="EmptyRemoteFolder",u=$localize`An error occurred while loading the backup filesets: ${e.message}`;n&&(u=$localize`The remote storage is encrypted. Please enter the passphrase to access the backup.`),s&&(u=$localize`The backup storage folder was not found.`),l&&(u=$localize`The backup storage folder does not contain any filesets.`),this.#n.open(A,{data:{title:$localize`Failed to load backup filesets`,message:u,confirmText:$localize`OK`,cancelText:void 0},closed:R=>{this.#e.navigate([n?"/restore-from-files/encryption":"/restore-from-files/destination"])}})}}):ue([this.#o.getApiV1BackupById({id:t}),this.#o.getApiV1BackupByIdFilesets({id:t}).pipe(be(3))]).pipe(oe(1),P(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([e,o])=>{this.versionOptions.set(o.map(n=>({Version:n.Version??-1,IsFullBackup:(n.IsFullBackup??1)==1,Time:n.Time??"<missing>",FileCount:n.FileCount??void 0,FileSizes:n.FileSizes??void 0}))),this.backup.set(e)}})}#a(){this.selectFilesForm.reset(),this.optionsForm.reset()}static \u0275fac=function(e){return new(e||i)};static \u0275prov=Ae({token:i,factory:i.\u0275fac,providedIn:"root"})};function Rt(i,t){if(i&1){let e=D();r(0,"sh-radio",27),m(1,6),d(2,"input",31),S(),a(),r(3,"sh-radio",27),m(4,7),r(5,"input",32),N("click",function(){I(e);let n=E(2);return M(n.chooseCustomRemoteDestination())}),a(),S(),a()}}function Pt(i,t){if(i&1){let e=D();r(0,"sh-radio",27),m(1,8),d(2,"input",31),S(),a(),r(3,"sh-radio",27),m(4,9),r(5,"input",32),N("click",function(){I(e);let n=E(2);return M(n.chooseCustomRemoteDestination())}),a(),S(),a()}}function It(i,t){if(i&1&&(r(0,"app-file-tree",29)(1,"label",33),y(2,"Path"),a(),d(3,"input",34),a()),i&2){let e,o=E(2);O("disabled",((e=o.optionsFormSignal())==null?null:e.restoreFrom)!=="pickLocation")("enableCreateFolder",!0)("resolvePaths",!0)}}function Mt(i,t){if(i&1&&(r(0,"app-file-tree",30)(1,"label",33),y(2,"Path"),a(),d(3,"input",34),a()),i&2){let e=E(2);O("customRemoteMode",e.extendedDataType())("backupId",e.backupId())("sourcePrefix",e.remoteCustomSourcePrefix())("destinationUrl",e.customDestinationUrl())}}function Lt(i,t){if(i&1&&(T(0,Rt,6,0)(1,Pt,6,0),r(2,"sh-radio",27),m(3,5),d(4,"input",28),S(),a(),T(5,It,4,3,"app-file-tree",29),T(6,Mt,4,4,"app-file-tree",30)),i&2){let e,o=E();g(o.extendedDataType()==="o365"?0:o.extendedDataType()==="gsuite"?1:-1),c(5),g(((e=o.optionsFormSignal())==null?null:e.restoreFrom)==="pickLocation"?5:-1),c(),g(o.showCustomRemoteRestoreTree()?6:-1)}}function yt(i,t){if(i&1&&(r(0,"sh-radio",27),m(1,10),d(2,"input",35),S(),a(),r(3,"sh-radio",27),m(4,11),d(5,"input",28),S(),a(),r(6,"app-file-tree",29)(7,"label",33),y(8,"Path"),a(),d(9,"input",34),a()),i&2){let e,o=E();c(6),O("disabled",((e=o.optionsFormSignal())==null?null:e.restoreFrom)!=="pickLocation")("enableCreateFolder",!0)("resolvePaths",!0)}}function Dt(i,t){i&1&&(r(0,"app-toggle-card",22),G(1,23),F(2,12),k(),r(3,"sh-toggle",27),m(4,13),d(5,"input",36),S(),a()()),i&2&&O("disableToggle",!0)}function bt(i,t){i&1&&(r(0,"app-toggle-card",22),G(1,23),F(2,14),k(),r(3,"sh-radio",27),m(4,15),d(5,"input",37),S(),a(),r(6,"sh-radio",27),m(7,16),d(8,"input",38),S(),a()(),r(9,"app-toggle-card"),G(10,23),F(11,17),k(),r(12,"sh-toggle",39),m(13,18),d(14,"input",40),S(),a(),r(15,"sh-toggle",39),m(16,19),d(17,"input",41),S(),a()()),i&2&&O("disableToggle",!0)}var w=new H,lt=()=>w.group({restoreFrom:w.control("original"),restoreFromPath:w.control(""),handleExisting:w.control("saveTimestamp"),permissions:w.control(!1),includeMetadata:w.control(!0),customRemoteIgnoreExisting:w.control(!1)}),Oe=class i{#e=p(v);#t=p($);#i=p(b);#n=p(Z);#o=p(le);optionsForm=this.#e.optionsForm;optionsFormSignal=this.#e.optionsFormSignal;isSubmitting=this.#e.isSubmitting;extendedData=this.#e.extendedDataType;remoteCustomTargetUrl=_(null);backupId=h(()=>this.#e.backup()?.Backup?.ID??null);extendedDataType=h(()=>{let t=this.#e.extendedDataType();return t==="o365"?"o365":t==="gsuite"?"gsuite":null});remoteCustomSourceEntry=h(()=>this.#e.backup()?.Backup?.Sources?.filter(t=>t.startsWith("@")&&(t.includes("|office365://")||t.includes("|googleworkspace://")))[0]??null);remoteCustomSourceUrl=h(()=>this.remoteCustomSourceEntry()?.split("|")[1]??null);remoteCustomSourcePrefix=h(()=>this.remoteCustomSourceEntry()?.split("|")[0]??null);customDestinationUrl=h(()=>{let t=this.optionsFormSignal()?.restoreFrom,e=this.extendedDataType()!==null;return t==="same-custom"&&e?this.remoteCustomSourceUrl():t==="other-custom"&&e?this.remoteCustomTargetUrl():null});showCustomRemoteRestoreTree=h(()=>!!(this.optionsFormSignal()?.restoreFrom==="same-custom"&&this.customDestinationUrl()&&this.backupId()||this.optionsFormSignal()?.restoreFrom==="other-custom"&&this.customDestinationUrl()));isCustomRemoteRestore=h(()=>{let t=this.optionsFormSignal()?.restoreFrom;return t==="same-custom"||t==="other-custom"});chooseCustomRemoteDestination(){let t=this.extendedDataType()==="o365"?"office365://":"googleworkspace://";return this.#o.open(et,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:!1,data:{targetUrlModel:this.remoteCustomTargetUrl()||this.remoteCustomSourceUrl()||t,moduleType:"RestoreDestinationProvider",askToCreate:!0,expectedResult:"any",suppressErrorDialogs:!0,backupId:this.backupId(),sourcePrefix:this.remoteCustomSourcePrefix()}}).closed.subscribe(o=>{o&&(this.remoteCustomTargetUrl.set(o),this.optionsForm.controls.restoreFrom.setValue("other-custom"))}),!1}#s=W(()=>{let t=this.optionsFormSignal()?.restoreFrom;this.extendedDataType()!=null&&(t==="original"||t===void 0)&&(this.optionsForm.controls.restoreFrom.setValue("pickLocation"),this.optionsForm.controls.handleExisting.setValue("overwrite")),this.extendedDataType()==null&&(t==="same-custom"||t==="other-custom")&&(this.optionsForm.controls.restoreFrom.setValue("original"),this.optionsForm.controls.handleExisting.setValue("saveTimestamp"))});goBack(){this.#t.navigate(["select-files"],{relativeTo:this.#i.parent})}submit(){let t=this.#e.selectFilesFormSignal()?.filesToRestore??[];if(t.length>0&&this.optionsFormSignal()?.restoreFrom=="original"&&(t[0].includes("/")?"/":"\\")!==this.#n.systemInfo()?.DirectorySeparator){this.#o.open(A,{data:{title:$localize`Confirm target folder`,message:$localize`This backup was created on another operating system. Restoring files without specifying a destination folder can cause files to be restored in unexpected places. Are you sure you want to continue without choosing a destination folder?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:n=>{n&&this.#e.submit()}});return}if(this.optionsFormSignal()?.restoreFrom==="same-custom"||this.optionsFormSignal()?.restoreFrom==="other-custom"){let o=this.optionsFormSignal()?.restoreFromPath;if(o&&o.startsWith("/")&&(o=o.substring(1)),!o||o.trim()===""){this.#o.open(A,{data:{title:$localize`No path specified`,message:this.extendedDataType()==="gsuite"?$localize`Please choose a path to restore to in the Google Workspace account.`:$localize`Please choose a path to restore to in the Microsoft 365 tenant.`,confirmText:$localize`OK`,cancelText:void 0}});return}let n=this.optionsFormSignal()?.customRemoteIgnoreExisting,s=this.customDestinationUrl()?.substring(this.customDestinationUrl().indexOf("?")),l=this.extendedDataType()==="gsuite"?`@googleworkspace://${encodeURIComponent(o)}${s}&google-ignore-existing=${n?"true":"false"}`:`@office365://${encodeURIComponent(o)}${s}&office365-ignore-existing=${n?"true":"false"}`;this.#e.setAlternateRestorePath(l,this.remoteCustomSourcePrefix()),this.optionsForm.controls.includeMetadata.setValue(!0),this.optionsForm.controls.permissions.setValue(!0)}else this.#e.setAlternateRestorePath(null,null);this.#e.submit()}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=B({type:i,selectors:[["app-advanced-options-settings"]],decls:18,vars:6,consts:()=>{let t;t=$localize`Restore options`;let e;e=$localize`Where do you want to restore files to?`;let o;o=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let n;n=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Submit `;let s;s=$localize` Local file system ${"\uFFFD#4\uFFFD\uFFFD/#4\uFFFD"}:TAG_INPUT:`;let l;l=$localize` Same Microsoft 365 Tenant ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let u;u=$localize` Different Microsoft 365 Tenant ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let R;R=$localize` Same Google Workspace Account ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let L;L=$localize` Different Google Workspace Account ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let x;x=$localize` Original location ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let ee;ee=$localize` Pick location ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let te;te=$localize`Restore settings`;let f;f=$localize` Ignore existing resources in the destination ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let Ne;Ne=$localize`How do you want to handle existing files?`;let he;he=$localize` Overwrite ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let fe;fe=$localize` Save different versions with timestamp in file name ${"\uFFFD#8\uFFFD\uFFFD/#8\uFFFD"}:TAG_INPUT:`;let Re;Re=$localize`Metadata settings`;let Pe;Pe=$localize` Restore file metadata ${"\uFFFD#14\uFFFD\uFFFD/#14\uFFFD"}:TAG_INPUT:`;let Ie;return Ie=$localize` Restore read/write permissions ${"\uFFFD#17\uFFFD\uFFFD/#17\uFFFD"}:TAG_INPUT:`,[["formRef",""],t,e,o,n,s,l,u,R,L,x,ee,te,f,Ne,he,fe,Re,Pe,Ie,[3,"submit","formGroup"],[1,"title-30"],[3,"disableToggle"],["title",""],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],[1,"raised","primary"],["type","radio","name","restoreFrom","value","pickLocation","formControlName","restoreFrom"],[3,"disabled","enableCreateFolder","resolvePaths"],[3,"customRemoteMode","backupId","sourcePrefix","destinationUrl"],["type","radio","name","restoreFrom","value","same-custom","formControlName","restoreFrom"],["type","radio","name","restoreFrom","value","other-custom","formControlName","restoreFrom",3,"click"],["for","path"],["type","text","id","path","formControlName","restoreFromPath"],["type","radio","name","restoreFrom","value","original","formControlName","restoreFrom"],["type","checkbox","formControlName","customRemoteIgnoreExisting"],["type","radio","name","handleExisting","value","overwrite","formControlName","handleExisting"],["type","radio","name","handleExisting","value","saveTimestamp","formControlName","handleExisting"],[1,"primary","raised"],["type","checkbox","formControlName","includeMetadata"],["type","checkbox","formControlName","permissions"]]},template:function(e,o){e&1&&(r(0,"form",20,0),N("submit",function(){return o.submit()}),r(2,"h3",21),F(3,1),a(),r(4,"app-toggle-card",22),G(5,23),F(6,2),k(),T(7,Lt,7,3)(8,yt,10,3),a(),T(9,Dt,6,1,"app-toggle-card",22)(10,bt,18,1),r(11,"div",24)(12,"button",25),N("click",function(){return o.goBack()}),m(13,3),d(14,"sh-icon"),S(),a(),r(15,"button",26),m(16,4),d(17,"sh-icon"),S(),a()()()),e&2&&(O("formGroup",o.optionsForm),c(4),O("disableToggle",!0),c(3),g(o.extendedDataType()!==null?7:8),c(2),g(o.isCustomRemoteRestore()?9:10),c(6),xe("loading",o.isSubmitting()))},dependencies:[j,X,V,Ve,ze,J,z,Y,U,Ze,ce,qe,Ye,Q,q],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};export{lt as a,Oe as b,st as c,Te as d,at as e,Ce as f,v as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as w}from"./chunk-
|
|
1
|
+
import{a as w}from"./chunk-NUV5LHQV.js";import{J as k,v as D}from"./chunk-CJKZ27FM.js";import"./chunk-KNSQLQC6.js";import"./chunk-HDDAGHHE.js";import{aa as A}from"./chunk-YF6JHIN5.js";import"./chunk-2YUSBRXY.js";import{$ as O,Bb as I,Cb as v,Cc as m,Db as f,Dc as F,Eb as r,Fb as l,Kc as $,Mb as g,Nb as M,Rc as R,Ta as c,Wb as N,_b as E,ac as a,ea as T,fa as h,hb as x,jc as C,kc as P,lc as y,mb as p,oc as s,pc as b,qa as _,xb as d,yb as u}from"./chunk-K5XGRFWJ.js";import"./chunk-7CGTOI24.js";var Y=e=>({children:e,level:0}),L=e=>({$implicit:e}),j=(e,t)=>({children:e,level:t}),V=(e,t)=>t.id;function z(e,t){if(e&1&&(r(0,"sh-icon"),s(1,"caret-down"),l()),e&2){let n=a().$implicit;y("open",n.isOpen())}}function B(e,t){e&1&&(r(0,"sh-icon"),s(1,"dot"),l())}function J(e,t){e&1&&g(0)}function U(e,t){if(e&1&&p(0,J,1,0,"ng-container",3),e&2){let n=a().$implicit,o=a().$implicit;a();let i=C(3);f("ngTemplateOutlet",i)("ngTemplateOutletContext",m(5,L,F(2,j,n.children,o.level+1)))}}function X(e,t){if(e&1){let n=M();r(0,"div",4,1),E("click",function(){let i=T(n).$implicit,G=a(2);return h(i.children.length>0&&G.toggleNode(i))}),d(2,z,2,2,"sh-icon",5)(3,B,2,0,"sh-icon"),r(4,"div",6),s(5),l()(),d(6,U,1,7,"ng-container")}if(e&2){let n=t.$implicit;y("cannot-toggle",n.children.length===0)("open",n.isOpen()),c(2),u(n.children.length>0?2:3),c(3),b(n.text),c(),u(n.isOpen()?6:-1)}}function q(e,t){if(e&1&&(r(0,"sh-list"),I(1,X,7,7,null,null,V),l()),e&2){let n=t.$implicit;P("padding-left",n.level*.25,"rem"),c(),v(n.children)}}function H(e,t){e&1&&g(0)}var S=class e{#e=O(w);treeStructure=R(()=>{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:_(!1)}):o.push({id:i,text:`${i}: ${t[i]}`,children:[],level:n,isOpen:_(!1)});return o}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=x({type:e,selectors:[["app-server-settings"]],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&&(r(0,"h3"),N(1,2),l(),p(2,q,3,2,"ng-template",null,0,$)(4,H,1,0,"ng-container",3)),n&2){let i=C(3);c(4),f("ngTemplateOutlet",i)("ngTemplateOutletContext",m(4,L,m(2,Y,o.treeStructure())))}},dependencies:[k,D,A],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;padding:0 2.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}sh-icon[_ngcontent-%COMP%]{font-size:1rem}sh-list[_ngcontent-%COMP%]{padding:0}sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0}sh-list[_ngcontent-%COMP%] [action].cannot-toggle[_ngcontent-%COMP%]{cursor:initial}"],changeDetection:0})};export{S as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as K}from"./chunk-
|
|
1
|
+
import{a as K}from"./chunk-E4CYVUYG.js";import"./chunk-6Q6SSTBK.js";import"./chunk-YS4B2B5N.js";import"./chunk-OP7MDR2B.js";import{a as z}from"./chunk-PEOYNJJM.js";import"./chunk-NUV5LHQV.js";import"./chunk-PDZNQW6F.js";import{B as U,H as x,I as V,W as j,b as E,c as A,e as y,f as R,j as b,p as B,q as $,r as v,t as G,v as k,x as L,z as w}from"./chunk-CJKZ27FM.js";import{d as J}from"./chunk-KNSQLQC6.js";import{d as O,e as M}from"./chunk-CQJRBQ6I.js";import"./chunk-V2UO7ES2.js";import"./chunk-HDDAGHHE.js";import"./chunk-YF6JHIN5.js";import"./chunk-2YUSBRXY.js";import{$ as s,Bc as N,Db as p,Eb as a,Fb as i,G as T,Gb as u,Ta as l,Ub as D,Vb as h,Wb as _,Zb as I,_b as d,hb as f,lc as P,qa as c,xb as C,yb as S}from"./chunk-K5XGRFWJ.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,g=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(T(()=>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","autocomplete","disabled","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("loading",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,b,A,E,y,R,$,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{g as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as W}from"./chunk-KZYRTI62.js";import{a as G}from"./chunk-TSVSMVY4.js";import"./chunk-2KD757N6.js";import"./chunk-OP7MDR2B.js";import"./chunk-PEOYNJJM.js";import"./chunk-NUV5LHQV.js";import"./chunk-PDZNQW6F.js";import{B as I,D as x,Y as A,v as w,y as $}from"./chunk-CJKZ27FM.js";import"./chunk-KNSQLQC6.js";import{d as R}from"./chunk-CQJRBQ6I.js";import"./chunk-V2UO7ES2.js";import"./chunk-HDDAGHHE.js";import"./chunk-YF6JHIN5.js";import"./chunk-2YUSBRXY.js";import{$ as d,Ab as m,Bb as p,Bc as N,Cb as f,Db as S,Eb as e,Fb as t,Gb as v,Ta as a,Wb as s,_b as C,hb as y,lc as k,oc as _,pc as u,qa as E,sa as L,tc as h,uc as M,vc as P}from"./chunk-K5XGRFWJ.js";import"./chunk-7CGTOI24.js";var D=()=>({maxWidth:"520px",width:"100%"});function z(r,i){if(r&1&&(e(0,"div",11)(1,"sh-icon",26),_(2,"check-circle"),t(),e(3,"span"),_(4),t()()),r&2){let o=i.$implicit;a(4),u(o)}}function J(r,i){if(r&1&&(e(0,"div",11)(1,"sh-icon",26),_(2,"check-circle"),t(),e(3,"span"),_(4),t()()),r&2){let o=i.$implicit;a(4),u(o)}}var T=class r{#n=d(G);#e=d(R);#t=d(W);hoveringConnect=E(!1);skipDialogOpen=E(!1);hasConnectionLink=E(!1);primaryBenefits=[$localize`Zero-configuration cloud storage`,$localize`Centralized backup reporting and monitoring`,$localize`Remote management from the dashboard`,$localize`Notifcations if backups stop running`];secondaryBenefits=[$localize`Get notified if your backups stop working`,$localize`Access AI powered troubleshooting`,$localize`View all backups from one place`];#i=L(()=>{let i=this.#t.state();i=="unknown"||i=="inactive"||this.setWelcomeShown()});setWelcomeShown(){this.#n.setShownWelcomePage().subscribe(()=>{this.#e.navigate([""])})}openSkipDialog(){this.skipDialogOpen.set(!0)}connect(){let i=this.hasConnectionLink()?"/welcome/connect/link":"/welcome/connect/logon";this.#e.navigate([i])}static \u0275fac=function(o){return new(o||r)};static \u0275cmp=y({type:r,selectors:[["app-select"]],decls:36,vars:7,consts:()=>{let i;i=$localize`Proceed without connecting to console`;let o;o=$localize`Connect to console`;let n;n=$localize`Consolidate all your backup reports in one place.`;let c;c=$localize`I have a connection link`;let l;l=$localize`Are you sure?`;let O;O=$localize`Cancel`;let b;return b=$localize`Proceed without connecting`,[i,o,n,c,l,O,b,[1,"left"],[1,"actionables"],[1,"without-connecting",3,"click"],[1,"benefits"],[1,"benefit"],["shButton","",1,"connect","outlined","primary",3,"mouseenter","mouseleave","click"],[1,"action"],[1,"connection-link-label"],[1,"primary","raised","connection-link-check",3,"checkedChange","checked"],[3,"shTooltip"],[1,"right"],["src","assets/images/console.avif","alt",""],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],[1,"dialog-benefits-header"],[1,"dialog-benefits"],["footer",""],["type","button","shButton","",1,"outlined",3,"click"],[1,"primary"]]},template:function(o,n){o&1&&(e(0,"section",7)(1,"div",8)(2,"div",9),C("click",function(){return n.openSkipDialog()}),s(3,0),t(),e(4,"div",10),p(5,z,5,1,"div",11,m),t(),e(7,"button",12),C("mouseenter",function(){return n.hoveringConnect.set(!0)})("mouseleave",function(){return n.hoveringConnect.set(!1)})("click",function(){return n.connect()}),e(8,"div",13)(9,"h2"),s(10,1),t(),e(11,"p"),s(12,2),t()()(),e(13,"div",14)(14,"sh-checkbox",15),P("checkedChange",function(l){return M(n.hasConnectionLink,l)||(n.hasConnectionLink=l),l}),t(),e(15,"span"),s(16,3),t(),e(17,"sh-icon",16),_(18," information "),t()()()(),e(19,"section",17),v(20,"img",18),t(),e(21,"sh-dialog",19),P("isOpenChange",function(l){return M(n.skipDialogOpen,l)||(n.skipDialogOpen=l),l}),e(22,"header",20)(23,"h3"),s(24,4),t()(),e(25,"div",21)(26,"h4",22),_(27," You can use Duplicati without a Console connection, but connecting to the Console will expand the capabilities of Duplicati. "),t(),e(28,"div",23),p(29,J,5,1,"div",11,m),t()(),e(31,"footer",24)(32,"button",25),C("click",function(){return n.skipDialogOpen.set(!1)}),s(33,5),t(),e(34,"button",25),C("click",function(){return n.setWelcomeShown()}),s(35,6),t()()()),o&2&&(a(5),f(n.primaryBenefits),a(9),h("checked",n.hasConnectionLink),a(3),S("shTooltip","Connection links are used for Enterprise and large-scale installations"),a(2),k("hovering",n.hoveringConnect()),a(2),h("isOpen",n.skipDialogOpen),S("options",N(6,D)),a(8),f(n.secondaryBenefits))},dependencies:[I,x,$,w,A],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:1fr 2fr;grid-template-rows:1fr;height:100vh;overflow:hidden;padding:2rem}@media only screen and (max-width:768px){[_nghost-%COMP%]{display:flex;flex-direction:column-reverse;height:auto;padding:4rem 1rem;gap:2rem}}.left[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end;justify-content:center}@media only screen and (max-width:768px){.left[_ngcontent-%COMP%]{align-items:flex-start}}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:1rem}@media only screen and (max-width:768px){.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%]{width:100%}}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] sh-divider[_ngcontent-%COMP%]{width:100%}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] .benefits[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem;padding:1.5rem 0}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] .benefits[_ngcontent-%COMP%] .benefit[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;color:var(--base-11)}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] .benefits[_ngcontent-%COMP%] .benefit[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1.25rem;flex-shrink:0}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] .benefits[_ngcontent-%COMP%] .benefit[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:.875rem}.right[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:2rem 2rem 2rem 0}.right.hovering[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{border-color:var(--primary-8)}.right[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:90%;max-height:90%;object-fit:contain;border:1px solid var(--base-3);border-radius:var(--shape-2);box-shadow:var(--box-shadow-20);transition:border-color .2s ease-in-out}.connect[_ngcontent-%COMP%]{height:auto;padding:2rem}.without-connecting[_ngcontent-%COMP%]{text-decoration:underline;cursor:pointer;margin:0}.without-connecting[_ngcontent-%COMP%]:hover{color:var(--primary-8)}.dialog-benefits-header[_ngcontent-%COMP%]{margin-bottom:1rem}.dialog-benefits[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;margin-bottom:2rem}.dialog-benefits[_ngcontent-%COMP%] .benefit[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:.5rem;color:var(--base-11)}.dialog-benefits[_ngcontent-%COMP%] .benefit[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1.25rem;flex-shrink:0}.dialog-benefits[_ngcontent-%COMP%] .benefit[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:.875rem}.connection-link-label[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:.5rem}"],changeDetection:0})};export{T as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as m}from"./chunk-6Q6SSTBK.js";import{a as r}from"./chunk-
|
|
1
|
+
import{a as m}from"./chunk-6Q6SSTBK.js";import{a as r}from"./chunk-YS4B2B5N.js";import{b as B}from"./chunk-OP7MDR2B.js";import{a as k}from"./chunk-NUV5LHQV.js";import{d as b}from"./chunk-KNSQLQC6.js";import{$ as s,E as i,G as u,O as c,Rc as d,W as o,qa as a,sa as p}from"./chunk-K5XGRFWJ.js";var y="backupListOrderBy",v="backupListShowActualTimes",D=[{value:"id",label:$localize`Backup ID`},{value:"name",label:$localize`Backup name`},{value:"lastrun",label:$localize`Last run time`},{value:"nextrun",label:$localize`Next run time`},{value:"schedule",label:$localize`Is scheduled`},{value:"backend",label:$localize`Destination type`},{value:"sourcesize",label:$localize`Source size`},{value:"destinationsize",label:$localize`Destination size`},{value:"duration",label:$localize`Duration`},{value:"-id",label:$localize`Backup ID (descending)`},{value:"-name",label:$localize`Backup name (descending)`},{value:"-lastrun",label:$localize`Last run time (descending)`},{value:"-nextrun",label:$localize`Next run time (descending)`},{value:"-schedule",label:$localize`Is scheduled (descending)`},{value:"-backend",label:$localize`Destination type (descending)`},{value:"-sourcesize",label:$localize`Source size (descending)`},{value:"-destinationsize",label:$localize`Destination size (descending)`},{value:"-duration",label:$localize`Duration (descending)`}],g=class l{#s=s(b);#o=s(k);#e=s(B);#u=null;#t=a([]);#a=a([]);#l=a(!1);#n=a(null);#p=a(null);#c=r(v,"relative");#i=r(y,"id");orderByOptions=a(D);orderBy=this.#i.asReadonly();backups=this.#a.asReadonly();timeType=this.#c.asReadonly();backupsLoading=this.#l.asReadonly();startingBackup=this.#n.asReadonly();deletingBackup=this.#p.asReadonly();draftBackups=this.#t.asReadonly();#r=d(()=>this.#o.hasBackupListSubscribeOption()&&this.#e.getConnectionMethod()==="websocket");#d=p(()=>{let e=this.#e.backupListState();e&&this.#a.set(e)});addDraftBackup(e){let t=m();return this.#t.set([...this.#t(),{id:t,data:e}]),t}setOrderBy(e){this.#i.set(e),this.#e.isConnectionMethodSet()&&(this.#r()?this.#e.subscribe("backuplist",e):this.getBackups(!0))}setTimeType(e){this.#c.set(e)}removeDraftBackupById(e){this.#t.set(this.#t().filter(t=>t.id!==e))}getBackupById(e){return this.#a().find(t=>t.Backup?.ID===e)??null}getBackups(e=!1){if(!this.#e.isConnectionMethodSet())return;if(this.#r()){this.#e.subscribe("backuplist",this.#i());return}let t=this.#u,n=Date.now(),h=t&&n-t<900*1e3;t&&n-t<100||!e&&h&&this.#a().length||(this.#u=n,this.#l.set(!0),this.#s.getApiV1Backups({orderBy:this.#i()}).pipe(i(1),c(f=>this.#a.set(f)),u(()=>this.#l.set(!1))).subscribe())}startBackup(e){this.#n.set(e),this.#s.postApiV1BackupByIdStart({id:e}).pipe(i(1),c(()=>this.getBackups(!0)),u(()=>this.#n.set(null))).subscribe()}deleteBackup(e){return this.#s.deleteApiV1BackupById(e).pipe(i(1))}static \u0275fac=function(t){return new(t||l)};static \u0275prov=o({token:l,factory:l.\u0275fac,providedIn:"root"})};export{g as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as mn}from"./chunk-EXAZ4QZR.js";import"./chunk-TWWAK5M6.js";import"./chunk-6DX35WDO.js";import"./chunk-35FMFK4I.js";import{a as ee}from"./chunk-B4QFOJXL.js";import"./chunk-UIVZWXBK.js";import{a as Ge}from"./chunk-E4CYVUYG.js";import"./chunk-BPHX6VXP.js";import"./chunk-XWML36YQ.js";import"./chunk-6Q6SSTBK.js";import{a as Z}from"./chunk-COEGVUM3.js";import"./chunk-YS4B2B5N.js";import"./chunk-KZYRTI62.js";import"./chunk-TSVSMVY4.js";import{b as Nn,c as Ae}from"./chunk-2KD757N6.js";import"./chunk-OP7MDR2B.js";import"./chunk-PEOYNJJM.js";import"./chunk-NUV5LHQV.js";import"./chunk-PDZNQW6F.js";import{B as Oe,E as gn,G as Ln,L as Ne,U as Sn,V as On,v as q}from"./chunk-CJKZ27FM.js";import{d as me}from"./chunk-KNSQLQC6.js";import{b as pn,e as Tn}from"./chunk-CQJRBQ6I.js";import"./chunk-V2UO7ES2.js";import"./chunk-HDDAGHHE.js";import{ha as j,ka as Se}from"./chunk-YF6JHIN5.js";import"./chunk-2YUSBRXY.js";import{$ as z,Bb as x,Cb as b,Db as w,Eb as _,Fb as o,G as Fn,Gb as F,Gc as C,Hc as $,Ic as D,Jc as X,Kb as M,Lb as f,M as rn,Nb as I,Rc as ge,Ta as a,Tc as Cn,Ub as p,Vb as T,Wb as s,Xb as c,Xc as Le,Yb as d,Zb as m,_b as y,ac as E,ea as P,fa as R,hb as W,lc as Y,oc as g,p as ln,pc as K,q as H,qa as h,qc as V,rc as sn,sc as un,tc as cn,uc as dn,vc as En,wc as pe,xb as L,xc as Te,yb as S,yc as J,zb as v}from"./chunk-K5XGRFWJ.js";import{a as Ce}from"./chunk-7CGTOI24.js";function Dn(n,t){n&1&&F(0,"sh-progress-bar",58)}function Pn(n,t){n&1&&F(0,"div",61)}function Rn(n,t){n&1&&F(0,"div",61)}function In(n,t){n&1&&F(0,"div",62)}function $n(n,t){n&1&&F(0,"div",63)}function Mn(n,t){if(n&1&&(_(0,"details",72)(1,"summary"),p(2,15),F(3,"sh-icon"),_(4,"div",74),F(5,"sh-icon",66),o(),T(),o(),_(6,"div",75)(7,"p"),s(8,16),C(9,"date"),o(),_(10,"p"),s(11,17),C(12,"date"),o(),_(13,"p"),s(14,18),C(15,"durationFormat"),o(),_(16,"p"),s(17,19),o(),F(18,"sh-divider"),_(19,"p"),s(20,20),o(),_(21,"p"),s(22,21),o()()(),_(23,"details",72)(24,"summary"),p(25,22),F(26,"sh-icon"),_(27,"div",74),F(28,"sh-icon",66),o(),T(),o(),_(29,"div",75)(30,"p"),s(31,23),C(32,"date"),o(),_(33,"p"),s(34,24),C(35,"date"),o(),_(36,"p"),s(37,25),C(38,"durationFormat"),o(),F(39,"sh-divider"),_(40,"p"),s(41,26),C(42,"bytes"),o(),_(43,"p"),s(44,27),C(45,"bytes"),o(),_(46,"p"),s(47,28),C(48,"bytes"),o(),F(49,"sh-divider"),_(50,"p"),s(51,29),o(),_(52,"p"),s(53,30),o()()()),n&2){let e=E(2).$implicit;a(9),c(D(9,17,e.data==null||e.data.TestResults==null?null:e.data.TestResults.BeginTime,"medium")),d(8),a(3),c(D(12,20,e.data==null||e.data.TestResults==null?null:e.data.TestResults.EndTime,"medium")),d(11),a(3),c($(15,23,e.data==null||e.data.TestResults==null?null:e.data.TestResults.Duration)),d(14),a(2),c(e.data==null||e.data.TestResults==null?null:e.data.TestResults.VerificationsActualLength),d(17),a(3),c(e.data==null||e.data.TestResults==null?null:e.data.TestResults.WarningsActualLength),d(20),a(2),c(e.data==null||e.data.TestResults==null?null:e.data.TestResults.ErrorsActualLength),d(22),a(10),c(D(32,25,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.BeginTime,"medium")),d(31),a(3),c(D(35,28,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.EndTime,"medium")),d(34),a(3),c($(38,31,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.Duration)),d(37),a(4),c(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileCount)(X(42,33,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileSize,!0,!0)),d(41),a(3),c(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileCount)(X(45,37,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileSize,!0,!0)),d(44),a(3),c(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileCount)(X(48,41,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileSize,!0,!0)),d(47),a(3),c(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.WarningsActualLength),d(51),a(2),c(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.ErrorsActualLength),d(53)}}function fn(n,t){n&1&&(_(0,"p"),g(1,"No messages"),o())}function hn(n,t){n&1&&(p(0,43,1),F(1,"sh-icon"),T())}function yn(n,t){n&1&&(p(0,43,2),F(1,"sh-icon"),T())}function Bn(n,t){if(n&1){let e=I();_(0,"div",76)(1,"code"),g(2),o(),_(3,"button",77),y("click",function(l){let u=P(e).$implicit,O=E(5);return R(O.copyToClipboard(l,u,u))}),p(4,43),L(5,hn,2,0,"sh-icon")(6,yn,2,0,"sh-icon"),T(),o()()}if(n&2){let e=t.$implicit,i=E(5);a(2),K(e),a(3),S(i.copied()==e?5:6)}}function vn(n,t){n&1&&(_(0,"p"),g(1,"No warnings"),o())}function xn(n,t){n&1&&(p(0,44,1),F(1,"sh-icon"),T())}function bn(n,t){n&1&&(p(0,44,2),F(1,"sh-icon"),T())}function kn(n,t){if(n&1){let e=I();_(0,"div",76)(1,"code"),g(2),o(),_(3,"button",77),y("click",function(l){let u=P(e).$implicit,O=E(5);return R(O.copyToClipboard(l,u,u))}),p(4,44),L(5,xn,2,0,"sh-icon")(6,bn,2,0,"sh-icon"),T(),o()()}if(n&2){let e=t.$implicit,i=E(5);a(2),K(e),a(3),S(i.copied()==e?5:6)}}function Kn(n,t){n&1&&(_(0,"p"),g(1,"No errors"),o())}function Un(n,t){n&1&&(p(0,45,1),F(1,"sh-icon"),T())}function wn(n,t){n&1&&(p(0,45,2),F(1,"sh-icon"),T())}function Jn(n,t){if(n&1){let e=I();_(0,"div",76)(1,"code"),g(2),o(),_(3,"button",77),y("click",function(l){let u=P(e).$implicit,O=E(5);return R(O.copyToClipboard(l,u,u))}),p(4,45),L(5,Un,2,0,"sh-icon")(6,wn,2,0,"sh-icon"),T(),o()()}if(n&2){let e=t.$implicit,i=E(5);a(2),K(e),a(3),S(i.copied()==e?5:6)}}function Xn(n,t){if(n&1&&(_(0,"details",72)(1,"summary"),p(2,31),F(3,"sh-icon"),_(4,"div",74),F(5,"sh-icon",66),o(),T(),o(),_(6,"div",75)(7,"p"),s(8,32),C(9,"date"),o(),_(10,"p"),s(11,33),C(12,"date"),o(),_(13,"p"),s(14,34),C(15,"durationFormat"),o(),F(16,"sh-divider"),_(17,"p"),s(18,35),C(19,"bytes"),o(),_(20,"p"),s(21,36),o(),_(22,"p"),s(23,37),o(),_(24,"p"),s(25,38),o(),_(26,"p"),s(27,39),o(),F(28,"sh-divider"),_(29,"details",78)(30,"summary"),p(31,40),F(32,"sh-icon"),_(33,"div",74),F(34,"sh-icon",66),o(),T(),o(),_(35,"div",75),L(36,fn,2,0,"p"),x(37,Bn,7,2,"div",76,v),o()(),_(39,"details",79)(40,"summary"),p(41,41),F(42,"sh-icon"),_(43,"div",74),F(44,"sh-icon",66),o(),T(),o(),_(45,"div",75),L(46,vn,2,0,"p"),x(47,kn,7,2,"div",76,v),o()(),_(49,"details",80)(50,"summary"),p(51,42),F(52,"sh-icon"),_(53,"div",74),F(54,"sh-icon",66),o(),T(),o(),_(55,"div",75),L(56,Kn,2,0,"p"),x(57,Jn,7,2,"div",76,v),o()(),F(59,"sh-divider"),o()()),n&2){let e=t.$implicit;a(5),c(e.Destination),d(2),a(4),c(D(9,16,e.BeginTime,"medium")),d(8),a(3),c(D(12,19,e.EndTime,"medium")),d(11),a(3),c($(15,22,e.Duration)),d(14),a(4),c(e.CopiedFileCount)(X(19,24,e.CopiedFileSize,!0,!0)),d(18),a(2),c(e.DeletedFileCount),d(21),a(2),c(e.RenamedFileCount),d(23),a(2),c(e.VerifiedFileCount),d(25),a(2),c(e.FailedVerificationCount),d(27),a(7),c(e.MessagesActualLength),d(31),a(2),S((e.Messages==null?null:e.Messages.length)===0?36:-1),a(),b(e.Messages),a(7),c(e.WarningsActualLength),d(41),a(2),S((e.Warnings==null?null:e.Warnings.length)===0?46:-1),a(),b(e.Warnings),a(7),c(e.ErrorsActualLength),d(51),a(2),S((e.Errors==null?null:e.Errors.length)===0?56:-1),a(),b(e.Errors)}}function zn(n,t){if(n&1&&x(0,Xn,60,28,"details",72,v),n&2){let e=E(2).$implicit;b(e.data==null?null:e.data.RemoteSynchronizationResults)}}function Vn(n,t){if(n&1&&(_(0,"details",72)(1,"summary"),p(2,46),F(3,"sh-icon"),_(4,"div",74),F(5,"sh-icon",66),o(),T(),o(),_(6,"div",75)(7,"p"),s(8,47),C(9,"date"),o(),_(10,"p"),s(11,48),C(12,"date"),o(),_(13,"p"),s(14,49),C(15,"durationFormat"),o(),F(16,"sh-divider"),_(17,"p"),s(18,50),o(),_(19,"p"),s(20,51),o(),_(21,"p"),s(22,52),o()()()),n&2){let e=E(2).$implicit;a(9),c(D(9,6,e.data==null||e.data.LockResults==null?null:e.data.LockResults.BeginTime,"medium")),d(8),a(3),c(D(12,9,e.data==null||e.data.LockResults==null?null:e.data.LockResults.EndTime,"medium")),d(11),a(3),c($(15,12,e.data==null||e.data.LockResults==null?null:e.data.LockResults.Duration)),d(14),a(3),c(e.data==null||e.data.LockResults==null?null:e.data.LockResults.VolumesRead),d(18),a(2),c(e.data==null||e.data.LockResults==null?null:e.data.LockResults.VolumesUpdated),d(20),a(2),c(e.data==null||e.data.LockResults==null?null:e.data.LockResults.ParsedResult),d(22)}}function Hn(n,t){if(n&1&&(_(0,"code"),g(1),C(2,"json"),o()),n&2){let e=t.$implicit;a(),K($(2,1,e))}}function Wn(n,t){if(n&1&&(_(0,"details",72)(1,"summary"),p(2,53),F(3,"sh-icon"),_(4,"div",74),F(5,"sh-icon",66),o(),T(),o(),_(6,"div",75),x(7,Hn,3,3,"code",null,v),o()()),n&2){let e=E(2).$implicit;a(5),c(e.data.VerificationsActualLength),d(2),a(2),b(e.data.Verifications)}}function jn(n,t){n&1&&(_(0,"sh-icon"),g(1,"check"),o())}function qn(n,t){n&1&&(_(0,"sh-icon"),g(1,"copy"),o())}function Qn(n,t){n&1&&(M(0),p(1,54),F(2,"sh-icon"),T(),f())}function Yn(n,t){n&1&&(M(0),p(1,55),F(2,"sh-icon"),T(),f())}function Zn(n,t){n&1&&(M(0),p(1,56),F(2,"sh-icon"),T(),f())}function et(n,t){if(n&1){let e=I();_(0,"button",82),y("click",function(){P(e),E();let l=J(0),u=E(3);return R(u.toggleWarningSuppression(l.MessageId))}),L(1,Qn,3,0,"ng-container")(2,Yn,3,0,"ng-container")(3,Zn,3,0,"ng-container"),o()}if(n&2){E();let e=J(0),i=E(3),l=i.isWarningSuppressed(e.MessageId);w("disabled",i.isSuppressingWarning()),a(),S(i.isSuppressingWarning()?1:l?2:3)}}function nt(n,t){if(n&1){let e=I();pe(0),_(1,"div",76)(2,"code"),g(3),o(),_(4,"button",77),y("click",function(l){let u=P(e).$implicit,O=E(3);return R(O.copyToClipboard(l,u,u))}),g(5," Copy "),L(6,jn,2,0,"sh-icon")(7,qn,2,0,"sh-icon"),o(),L(8,et,4,2,"button",81),o()}if(n&2){let e=t.$implicit,i=E(3),l=Te(i.parseWarning(e));a(3),K(e),a(3),S(i.copied()==e?6:7),a(2),S(l!=null&&l.MessageId?8:-1)}}function tt(n,t){n&1&&(_(0,"p"),g(1,"No errors"),o())}function it(n,t){n&1&&(p(0,57,1),F(1,"sh-icon"),T())}function ot(n,t){n&1&&(p(0,57,2),F(1,"sh-icon"),T())}function _t(n,t){if(n&1){let e=I();_(0,"div",76)(1,"code"),g(2),o(),_(3,"button",77),y("click",function(l){let u=P(e).$implicit,O=E(3);return R(O.copyToClipboard(l,u,u))}),p(4,57),L(5,it,2,0,"sh-icon")(6,ot,2,0,"sh-icon"),T(),o()()}if(n&2){let e=t.$implicit,i=E(3);a(2),K(e),a(3),S(i.copied()==e?5:6)}}function at(n,t){n&1&&(_(0,"sh-icon"),g(1,"check"),o())}function lt(n,t){n&1&&(_(0,"sh-icon"),g(1,"copy"),o())}function Ft(n,t){if(n&1){let e=I();_(0,"section",67)(1,"sh-toggle-card",68),M(2,69),_(3,"h3"),s(4,0),o(),f(),M(5,70),_(6,"p"),s(7,1),C(8,"date"),o(),_(9,"p"),s(10,2),C(11,"date"),o(),_(12,"p"),s(13,3),C(14,"durationFormat"),o(),f(),o(),_(15,"sh-toggle-card",68),M(16,69),_(17,"h3"),s(18,4),o(),f(),M(19,70),_(20,"p"),s(21,5),C(22,"bytes"),o(),_(23,"p"),s(24,6),C(25,"bytes"),o(),_(26,"p"),s(27,7),C(28,"bytes"),o(),_(29,"p"),s(30,8),C(31,"bytes"),o(),_(32,"p"),s(33,9),o(),_(34,"p"),s(35,10),o(),_(36,"p"),s(37,11),o(),f(),o(),_(38,"div",71),F(39,"sh-divider"),L(40,Mn,54,45),L(41,zn,2,0),L(42,Vn,23,14,"details",72),L(43,Wn,9,1,"details",72),_(44,"details",73)(45,"summary"),p(46,12),F(47,"sh-icon"),_(48,"div",74),F(49,"sh-icon",66),o(),T(),o(),_(50,"div",75),x(51,nt,9,4,"div",76,v),o()(),_(53,"details",73)(54,"summary"),p(55,13),F(56,"sh-icon"),_(57,"div",74),F(58,"sh-icon",66),o(),T(),o(),_(59,"div",75),L(60,tt,2,0,"p"),x(61,_t,7,2,"div",76,v),o()(),F(63,"sh-divider"),_(64,"details")(65,"summary"),p(66,14),F(67,"sh-icon"),_(68,"div",74),F(69,"sh-icon",66),o(),T(),o(),_(70,"code")(71,"button",77),y("click",function(l){P(e);let u=E().$implicit,O=E();return R(O.copyToClipboard(l,O.stringify(u.data),"all"))}),g(72," Copy "),L(73,at,2,0,"sh-icon")(74,lt,2,0,"sh-icon"),o(),g(75),C(76,"json"),o()()()()}if(n&2){let e=E().$implicit,i=E();a(),w("disableToggle",!0),a(7),c(D(8,27,e.data==null?null:e.data.BeginTime,"medium")),d(7),a(3),c(D(11,30,e.data==null?null:e.data.EndTime,"medium")),d(10),a(3),c($(14,33,e.data==null?null:e.data.Duration)),d(13),a(),w("disableToggle",!0),a(7),c(e.data==null?null:e.data.ExaminedFiles)(X(22,35,e.data==null?null:e.data.SizeOfExaminedFiles,!0,!0)),d(21),a(3),c(e.data==null?null:e.data.OpenedFiles)(X(25,39,e.data==null?null:e.data.SizeOfOpenedFiles,!0,!0)),d(24),a(3),c(e.data==null?null:e.data.AddedFiles)(X(28,43,e.data==null?null:e.data.SizeOfAddedFiles,!0,!0)),d(27),a(3),c(e.data==null?null:e.data.ModifiedFiles)(X(31,47,e.data==null?null:e.data.SizeOfModifiedFiles,!0,!0)),d(30),a(2),c(e.data==null?null:e.data.DeletedFiles),d(33),a(2),c(e.data==null?null:e.data.TooLargeFiles),d(35),a(2),c(e.data==null?null:e.data.FilesWithError),d(37),a(3),S(e.data!=null&&e.data.TestResults?40:-1),a(),S(e.data!=null&&e.data.RemoteSynchronizationResults?41:-1),a(),S(e.data!=null&&e.data.LockResults?42:-1),a(),S((e.data==null?null:e.data.MainOperation)==="Test"?43:-1),a(),w("open",e.id===i.openEntry()&&i.openSection()==="warnings"),a(5),c(e.data==null?null:e.data.WarningsActualLength),d(46),a(2),b(e.data==null?null:e.data.Warnings),a(2),w("open",e.id===i.openEntry()&&i.openSection()==="errors"),a(5),c(e.data==null?null:e.data.ErrorsActualLength),d(55),a(2),S((e.data==null||e.data.Errors==null?null:e.data.Errors.length)===0?60:-1),a(),b(e.data==null?null:e.data.Errors),a(12),S(i.copied()=="all"?73:74),a(2),V(" ",$(76,51,e.data)," ")}}function rt(n,t){if(n&1){let e=I();_(0,"article",59)(1,"header",60),y("click",function(){let l=P(e).$implicit,u=E();return R(u.toggleOpenEntry(l))}),L(2,Pn,1,0,"div",61)(3,Rn,1,0,"div",61)(4,In,1,0,"div",62)(5,$n,1,0,"div",63),_(6,"h3"),g(7),C(8,"date"),o(),_(9,"p"),g(10),o(),F(11,"div",64),_(12,"div",65)(13,"sh-icon",66),g(14,"caret-down"),o()()(),L(15,Ft,77,53,"section",67),o()}if(n&2){let e=t.$implicit,i=E(),l=(e.data==null?null:e.data.ParsedResult)||"Unknown";a(2),S(l=="Fatal"?2:l=="Error"?3:l=="Warning"?4:5),a(5),K(D(8,7,e.timestamp,"medium")),a(3),sn(" ",e.data==null?null:e.data.MainOperation," ",i.getLocalizedSummary(e)," "),a(3),Y("open",e.id===i.openEntry()),a(2),S(e.id===i.openEntry()?15:-1)}}var De=class n{#e=z(me);#n=z(Ge);#t=new Z;#i=new ee;backupId=Le.required();isSuppressingWarning=h(!1);copied=h(null);backupResource=Cn({params:()=>({id:this.backupId()}),loader:({params:t})=>ln(this.#e.getApiV1BackupById({id:t.id}))});suppressedWarningIds=ge(()=>{let t=this.backupResource.value();if(!t?.Backup?.Settings)return new Set;let e=t.Backup.Settings.find(i=>i.Name==="--suppress-warnings");return e?.Value?new Set(e.Value.split(",").map(i=>i.trim()).filter(Boolean)):new Set});openEntry=h(null);openSection=h(null);pagination=h({offset:0,pagesize:100});resource=Ae({params:()=>Ce({id:this.backupId()},this.pagination()),stream:({params:t})=>this.#e.getApiV1BackupByIdLog({id:t.id,pagesize:100}).pipe(H(e=>e.map(i=>({id:i.ID,operationId:i.OperationID,timestamp:i.Timestamp*1e3,type:i.Type,data:JSON.parse(i.Message),exception:JSON.stringify(i.Exception)==="{}"?null:i.Exception}))))});getLocalizedSummary(t){let e=t.data?.ErrorsActualLength??0,i=t.data?.WarningsActualLength??0,l=[];if(t.data?.MainOperation=="Backup"){if(t.data?.Duration){let u=this.#i.transform(t.data?.Duration,!0);u.startsWith("0h ")&&(u=u.slice(3)),u.startsWith("0m ")&&(u=u.slice(3)),l.push($localize`took ${u}`)}t.data?.BackendStatistics?.BytesUploaded&&l.push($localize`uploaded ${this.#t.transform(t.data?.BackendStatistics?.BytesUploaded)}`),t.data?.BackendStatistics?.KnownFileSize&&l.push($localize`backup size ${this.#t.transform(t.data?.BackendStatistics?.KnownFileSize)}`)}return e!==0&&l.push($localize`:@@errorCount:${e} error${e===1?"":"s"}`),i!==0&&l.push($localize`:@@warningCount:${i} warning${i===1?"":"s"}`),l.length===0?"":`(${l.join(", ")})`}toggleOpenEntry(t){let e=t.id;if(this.openEntry()===e){this.openEntry.set(null),this.openSection.set(null);return}let i=t.data?.ErrorsActualLength??0,l=t.data?.WarningsActualLength??0;i>0?this.openSection.set("errors"):l>0?this.openSection.set("warnings"):this.openSection.set(null),this.openEntry.set(e)}parseWarning(t){let e=t.match(/^(.*?) - \[(.*?)-(.*?)-(.*?)\]: (.*)$/);if(!e)return null;let[,i,l,u,O,G]=e;return{Timestamp:i,LogLevel:l,Source:u,MessageId:O,Message:G}}isWarningSuppressed(t){return this.suppressedWarningIds().has(t)}toggleWarningSuppression(t){let e=this.backupId();!e||!t||(this.isSuppressingWarning.set(!0),this.#e.getApiV1BackupById({id:e}).pipe(rn(i=>{let l=i.Backup?.Settings??[],u=l.findIndex(N=>N.Name==="--suppress-warnings"),O=this.isWarningSuppressed(t),G="";if(u>=0){let B=(l[u].Value??"").split(",").map(U=>U.trim()).filter(Boolean);O?B=B.filter(U=>U!==t):B.includes(t)||B.push(t),G=B.join(",")}else O||(G=t);let k=l.map(N=>({Name:N.Name,Value:N.Value,Filter:N.Filter}));return u>=0?G===""?k.splice(u,1):k[u]={Name:"--suppress-warnings",Value:G,Filter:null}:G!==""&&k.push({Name:"--suppress-warnings",Value:G,Filter:null}),this.#e.putApiV1BackupById({id:e,requestBody:{Backup:{Name:i.Backup?.Name,Description:i.Backup?.Description,DBPath:i.Backup?.DBPath,Tags:i.Backup?.Tags??[],TargetURL:i.Backup?.TargetURL,ConnectionStringID:i.Backup?.ConnectionStringID,Sources:i.Backup?.Sources??[],Settings:k,Filters:i.Backup?.Filters?.map(N=>({Expression:N.Expression,Include:N.Include,Order:N.Order})),Metadata:i.Backup?.Metadata??{},AdditionalTargetURLs:i.Backup?.AdditionalTargetURLs?.map(N=>({TargetUrl:N.TargetUrl,UrlKey:N.UrlKey,Mode:N.Mode,Interval:N.Interval,ConnectionStringID:N.ConnectionStringID,Options:N.Options}))},Schedule:i.Schedule?{Repeat:i.Schedule.Repeat,Time:i.Schedule.Time,AllowedDays:i.Schedule.AllowedDays}:void 0}})}),Fn(()=>this.isSuppressingWarning.set(!1))).subscribe({next:()=>{this.#n.getBackups(!0),this.backupResource.reload()},error:i=>{console.error("Failed to toggle warning suppression:",i)}}))}copyToClipboard(t,e,i){t.stopPropagation(),navigator.clipboard.writeText(e),this.copied.set(i),setTimeout(()=>{this.copied.set(null)},2e3)}stringify(t){return JSON.stringify(t,null,2)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=W({type:n,selectors:[["app-general-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:()=>{let t;t=$localize`Time`;let e;e=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let i;i=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let l;l=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let u;u=$localize`Source files`;let O;O=$localize` Evaluated: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let G;G=$localize`Opened: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let k;k=$localize`Added: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let N;N=$localize` Modified: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let B;B=$localize`Deleted: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let U;U=$localize`Too large: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Q;Q=$localize`Files with error: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let A;A=$localize`${"\uFFFD#47\uFFFD"}:START_TAG_SH_ICON:warning-circle${"[\uFFFD/#47\uFFFD|\uFFFD/#49\uFFFD]"}:CLOSE_TAG_SH_ICON: Warnings ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#48\uFFFD"}:START_TAG_DIV:${"\uFFFD#49\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#47\uFFFD|\uFFFD/#49\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#48\uFFFD"}:CLOSE_TAG_DIV:`,A=m(A);let ne;ne=$localize`${"\uFFFD#56\uFFFD"}:START_TAG_SH_ICON:warning${"[\uFFFD/#56\uFFFD|\uFFFD/#58\uFFFD]"}:CLOSE_TAG_SH_ICON: Errors ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#57\uFFFD"}:START_TAG_DIV:${"\uFFFD#58\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#56\uFFFD|\uFFFD/#58\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#57\uFFFD"}:CLOSE_TAG_DIV:`,ne=m(ne);let te;te=$localize`${"\uFFFD#67\uFFFD"}:START_TAG_SH_ICON:notepad${"[\uFFFD/#67\uFFFD|\uFFFD/#69\uFFFD]"}:CLOSE_TAG_SH_ICON: Complete log ${"\uFFFD#68\uFFFD"}:START_TAG_DIV:${"\uFFFD#69\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#67\uFFFD|\uFFFD/#69\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#68\uFFFD"}:CLOSE_TAG_DIV:`,te=m(te);let ie;ie=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:circle-half-tilt${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON: Test phase ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,ie=m(ie);let Ie;Ie=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let $e;$e=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Me;Me=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let fe;fe=$localize`Verifications: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let he;he=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ye;ye=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let oe;oe=$localize`${"\uFFFD#26\uFFFD"}:START_TAG_SH_ICON:file-archive${"[\uFFFD/#26\uFFFD|\uFFFD/#28\uFFFD]"}:CLOSE_TAG_SH_ICON: Compact phase ${"\uFFFD#27\uFFFD"}:START_TAG_DIV:${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#26\uFFFD|\uFFFD/#28\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#27\uFFFD"}:CLOSE_TAG_DIV:`,oe=m(oe);let Be;Be=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ve;ve=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let xe;xe=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let be;be=$localize` Deleted files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let ke;ke=$localize` Downloaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Ke;Ke=$localize` Uploaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Ue;Ue=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let we;we=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let _e;_e=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:arrows-clockwise${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON: Secondary destination: ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,_e=m(_e);let Je;Je=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Xe;Xe=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ze;ze=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ve;Ve=$localize` Files copied: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let He;He=$localize`Files deleted: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let We;We=$localize`Files renamed: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let je;je=$localize`Files verified: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let qe;qe=$localize`Failed verifications: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ae;ae=$localize`${"\uFFFD#32\uFFFD"}:START_TAG_SH_ICON:info${"[\uFFFD/#32\uFFFD|\uFFFD/#34\uFFFD]"}:CLOSE_TAG_SH_ICON: Messages ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#33\uFFFD"}:START_TAG_DIV:${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#32\uFFFD|\uFFFD/#34\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#33\uFFFD"}:CLOSE_TAG_DIV:`,ae=m(ae);let le;le=$localize`${"\uFFFD#42\uFFFD"}:START_TAG_SH_ICON:warning-circle${"[\uFFFD/#42\uFFFD|\uFFFD/#44\uFFFD]"}:CLOSE_TAG_SH_ICON: Warnings ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#43\uFFFD"}:START_TAG_DIV:${"\uFFFD#44\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#42\uFFFD|\uFFFD/#44\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_DIV:`,le=m(le);let Fe;Fe=$localize`${"\uFFFD#52\uFFFD"}:START_TAG_SH_ICON:warning${"[\uFFFD/#52\uFFFD|\uFFFD/#54\uFFFD]"}:CLOSE_TAG_SH_ICON: Errors ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#53\uFFFD"}:START_TAG_DIV:${"\uFFFD#54\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#52\uFFFD|\uFFFD/#54\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#53\uFFFD"}:CLOSE_TAG_DIV:`,Fe=m(Fe);let re;re=$localize` Copy ${"\uFFFD*5:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*5:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*6:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*6:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,re=m(re);let se;se=$localize` Copy ${"\uFFFD*5:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*5:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*6:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*6:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,se=m(se);let ue;ue=$localize` Copy ${"\uFFFD*5:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*5:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*6:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*6:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,ue=m(ue);let ce;ce=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:lock${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON: Lock results ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,ce=m(ce);let Qe;Qe=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ye;Ye=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ze;Ze=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let en;en=$localize`Volumes read: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let nn;nn=$localize`Volumes updated: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let tn;tn=$localize`Parsed result: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let de;de=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:warning-circle${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON: Verifications ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,de=m(de);let on;on=$localize` Updating ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:spinner${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let _n;_n=$localize` Un-suppress ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:bell${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let an;an=$localize` Suppress ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:bell-slash${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Ee;return Ee=$localize` Copy ${"\uFFFD*5:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*5:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*6:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*6:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,Ee=m(Ee),[t,e,i,l,u,O,G,k,N,B,U,Q,A,ne,te,ie,Ie,$e,Me,fe,he,ye,oe,Be,ve,xe,be,ke,Ke,Ue,we,_e,Je,Xe,ze,Ve,He,We,je,qe,ae,le,Fe,re,se,ue,ce,Qe,Ye,Ze,en,nn,tn,de,on,_n,an,Ee,[1,"indeterminate","primary"],[1,"log-entry"],[3,"click"],[1,"status","error"],[1,"status","warn"],[1,"status"],[1,"spacer"],[1,"action"],[1,"toggle-indicator"],[1,"log-content"],[3,"disableToggle"],["title",""],["content",""],[1,"extra-info"],["name","details"],["name","details",3,"open"],[1,"actions"],[1,"content"],[1,"warning-item"],["shButton","",1,"small",3,"click"],["name","details-messages"],["name","details-warnings"],["name","details-errors"],["shButton","",1,"small",3,"disabled"],["shButton","",1,"small",3,"click","disabled"]]},template:function(e,i){e&1&&(L(0,Dn,1,0,"sh-progress-bar",58),x(1,rt,16,10,"article",59,v)),e&2&&(S(i.resource.isLoading()?0:-1),a(),b(i.resource.value()))},dependencies:[On,Ln,Ne,Oe,q,Z,j,ee,Se],styles:["[_nghost-%COMP%]{display:block}.log-entry[_ngcontent-%COMP%]{display:flex;flex-direction:column;cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:1rem;border-bottom:1px solid var(--base-4);background-color:var(--base-1);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-2)}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-30);margin:0}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.toggle-indicator[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;transition:transform 125ms linear}.toggle-indicator.open[_ngcontent-%COMP%]{transform:rotate(180deg)}details[_ngcontent-%COMP%]{display:flex;flex-direction:column}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;gap:.5rem;padding:.75rem;border-radius:var(--shape-2);background-color:var(--base-2)}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:focus{outline:none}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:hover{background-color:var(--base-3)}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]::marker{font-size:0}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;flex:1 0;gap:.5rem;-webkit-user-select:none;user-select:none}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:2rem;transition:transform 125ms linear}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] sh-icon.toggle-indicator[_ngcontent-%COMP%]{transform:rotate(0)}details[open][_ngcontent-%COMP%] > summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] sh-icon.toggle-indicator[_ngcontent-%COMP%]{transform:rotate(180deg)}details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding:.75rem 1rem 0;display:flex;flex-direction:column;gap:.75rem}details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}details[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{margin-top:.75rem;position:relative}details[_ngcontent-%COMP%] code[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{position:absolute;top:.75rem;right:.75rem}.extra-info[_ngcontent-%COMP%]{grid-column:1/-1;display:flex;flex-direction:column;gap:1rem}.extra-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:.75rem}.extra-info[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{white-space:pre-wrap;padding:1rem;display:block;border-radius:var(--shape-2);background-color:var(--base-2)}.log-content[_ngcontent-%COMP%]{padding:1rem;display:grid;grid-template-columns:1fr 1fr;gap:1rem}.status[_ngcontent-%COMP%]{display:block;width:1rem;height:1rem;background-color:var(--success-8);border-radius:50%}.status.error[_ngcontent-%COMP%]{background-color:var(--error-8)}.status.warn[_ngcontent-%COMP%]{background-color:var(--warn-8)}.warning-item[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:.5rem;padding:.75rem;border-radius:var(--shape-2);background-color:var(--base-2)}.warning-item[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{margin:0;white-space:pre-wrap;word-break:break-word}.warning-item[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{align-self:flex-start;white-space:nowrap}"],changeDetection:0})};function st(n,t){n&1&&F(0,"sh-progress-bar",1)}function ut(n,t){n&1&&(p(0,0,1),F(1,"sh-icon"),T())}function ct(n,t){n&1&&(p(0,0,2),F(1,"sh-icon"),T())}function dt(n,t){if(n&1){let e=I();_(0,"section",6)(1,"button",7),y("click",function(){P(e);let l=E(),u=l.$implicit,O=l.$index,G=E();return R(G.copyToClipboard(u.data,O))}),p(2,0),L(3,ut,2,0)(4,ct,2,0),T(),o(),_(5,"code"),g(6),C(7,"json"),o()()}if(n&2){let e=E(),i=e.$implicit,l=e.$index,u=E();a(),Y("success",u.copiedFromIndex()===l),a(2),S(u.copiedFromIndex()===l?3:4),a(3),K($(7,4,i.data))}}function Et(n,t){if(n&1){let e=I();_(0,"article",2)(1,"header",3),y("click",function(){let l=P(e).$implicit,u=E();return R(u.toggleOpenEntry(l.id))}),_(2,"h3"),g(3),C(4,"date"),o(),_(5,"div",4)(6,"sh-icon",5),g(7,"caret-down"),o()()(),L(8,dt,8,6,"section",6),o()}if(n&2){let e=t.$implicit,i=E();a(3),un("",D(4,6,e.timestamp,"medium"),": ",e.operation," ",e.path),a(3),Y("open",e.id===i.openEntry()),a(2),S(e.id===i.openEntry()?8:-1)}}var Pe=class n{#e=z(me);backupId=Le.required();openEntry=h(null);pagination=h({offset:0,pagesize:100});copiedFromIndex=h(null);resource=Ae({params:()=>Ce({id:this.backupId()},this.pagination()),stream:({params:t})=>this.#e.getApiV1BackupByIdRemotelog({id:t.id,pagesize:100}).pipe(H(e=>e.map((i,l)=>({id:i.ID,operationId:i.OperationID,timestamp:i.Timestamp*1e3,operation:i.Operation,path:i.Path,data:typeof i.Data=="string"?JSON.parse(i.Data):null}))))});toggleOpenEntry(t){if(this.openEntry()===t){this.openEntry.set(null);return}this.openEntry.set(t)}copyToClipboard(t,e){let i=JSON.stringify(t,null,2);navigator.clipboard.writeText(i),this.copiedFromIndex.set(e),setTimeout(()=>{this.copiedFromIndex.set(null)},3e3)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=W({type:n,selectors:[["app-remote-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:()=>{let t;return t=$localize`${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copied ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*4:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy to clipboard ${"\uFFFD/*4:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,t=m(t),[t,[1,"indeterminate","primary"],[1,"log-entry"],[3,"click"],[1,"actions"],[1,"toggle-indicator"],[1,"log-content"],["shButton","",1,"small",3,"click"]]},template:function(e,i){e&1&&(L(0,st,1,0,"sh-progress-bar",1),x(1,Et,9,9,"article",2,v)),e&2&&(S(i.resource.isLoading()?0:-1),a(),b(i.resource.value()))},dependencies:[Ne,q,Se,j],styles:["[_nghost-%COMP%]{display:block}.log-entry[_ngcontent-%COMP%]{display:flex;flex-direction:column}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:1rem;border-bottom:1px solid var(--base-4);background-color:var(--base-1);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-2)}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-30);margin:0;-webkit-user-select:none;user-select:none}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.toggle-indicator[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;transition:transform 125ms linear}.toggle-indicator.open[_ngcontent-%COMP%]{transform:rotate(180deg)}.log-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem;position:relative}.log-content[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{position:absolute;top:2rem;right:2rem;background:transparent}code[_ngcontent-%COMP%]{white-space:pre-wrap;padding:1rem;display:block;border-radius:var(--shape-2);background-color:var(--base-2)}"],changeDetection:0})};function Ct(n,t){if(n&1&&(g(0," - "),M(1),s(2,6),f(),g(3),C(4,"durationFormat")),n&2){E(2);let e=J(6);a(3),V(" ",$(4,1,e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDuration)," ")}}function pt(n,t){n&1&&(M(0),s(1,7),f())}function Tt(n,t){if(n&1&&(g(0),C(1,"bytes")),n&2){E(2);let e=J(6);V(" ",$(1,1,e.Backup.Metadata==null?null:e.Backup.Metadata.SourceFilesSize)," ")}}function gt(n,t){n&1&&(M(0),s(1,8),f())}function Lt(n,t){if(n&1&&(g(0),C(1,"bytes")),n&2){E(2);let e=J(6);V(" ",$(1,1,e.Backup.Metadata==null?null:e.Backup.Metadata.TargetFilesSize)," ")}}function St(n,t){n&1&&(M(0),s(1,9),f())}function Ot(n,t){if(n&1&&(_(0,"sh-chip",20),s(1,10),o()),n&2){E(2);let e=J(6);a(),c(e.Backup.Metadata==null?null:e.Backup.Metadata.BackupListCount),d(1)}}function Nt(n,t){n&1&&(_(0,"sh-chip",21),s(1,11),o())}function mt(n,t){if(n&1&&(_(0,"div",14)(1,"div",19)(2,"h3"),g(3),_(4,"sh-icon"),g(5,"database"),o()(),_(6,"p")(7,"span"),s(8,3),o(),g(9),C(10,"date"),L(11,Ct,5,3)(12,pt,2,0,"ng-container"),o(),_(13,"p")(14,"span"),s(15,4),o(),L(16,Tt,2,3)(17,gt,2,0,"ng-container"),o(),_(18,"p")(19,"span"),s(20,5),o(),L(21,Lt,2,3)(22,St,2,0,"ng-container"),o()(),L(23,Ot,2,1,"sh-chip",20)(24,Nt,2,0,"sh-chip",21),o()),n&2){let e=E(),i=J(6);a(3),V(" ",i.Backup.Name??e.MISSING_BACKUP_NAME," "),a(6),V(" ",D(10,6,i.Backup.Metadata==null?null:i.Backup.Metadata.LastBackupFinished,"short")," "),a(2),S(i.Backup.Metadata!=null&&i.Backup.Metadata.LastBackupDuration?11:12),a(5),S(i.Backup.Metadata!=null&&i.Backup.Metadata.SourceFilesSize?16:17),a(5),S(i.Backup.Metadata!=null&&i.Backup.Metadata.TargetFilesSize?21:22),a(2),S(i.Backup.Metadata!=null&&i.Backup.Metadata.BackupListCount?23:24)}}function Gt(n,t){if(n&1&&F(0,"app-general-log",18),n&2){let e=E();w("backupId",e.backupId())}}function At(n,t){if(n&1&&F(0,"app-remote-log",18),n&2){let e=E();w("backupId",e.backupId())}}var Re=class n{#e=z(pn);#n=z(Ge);MISSING_BACKUP_NAME=$localize`Backup name missing`;activeTab=h("general");backupId=Nn(this.#e.params.pipe(H(t=>t.id)));backup=ge(()=>{let t=this.backupId();return t?this.#n.getBackupById(t):null});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=W({type:n,selectors:[["app-log"]],decls:15,vars:5,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let e;e=$localize`General`;let i;i=$localize`Destination`;let l;l=$localize`Last successful backup:`;let u;u=$localize`Source:`;let O;O=$localize`Destination:`;let G;G=$localize`took`;let k;k=$localize`N/A`;let N;N=$localize`N/A`;let B;B=$localize`N/A`;let U;U=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION: Version`;let Q;return Q=$localize`No version yet`,[t,e,i,l,u,O,G,k,N,B,U,Q,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"backup"],[1,"primary",3,"valueChange","value"],["value","general"],["value","destination"],[3,"backupId"],[1,"text"],[1,"simple","success"],[1,"simple"]]},template:function(e,i){if(e&1){let l=I();F(0,"app-status-bar"),_(1,"section")(2,"div",12)(3,"button",13),p(4,0),F(5,"sh-icon"),T(),o()(),pe(6),L(7,mt,25,9,"div",14),_(8,"sh-tabs",15),En("valueChange",function(O){return P(l),dn(i.activeTab,O)||(i.activeTab=O),R(O)}),_(9,"button",16),s(10,1),o(),_(11,"button",17),s(12,2),o()(),L(13,Gt,1,1,"app-general-log",18),L(14,At,1,1,"app-remote-log",18),o()}if(e&2){a(6);let l=Te(i.backup());a(),S(l?7:-1),a(),cn("value",i.activeTab),a(5),S(i.activeTab()==="general"?13:-1),a(),S(i.activeTab()==="destination"?14:-1)}},dependencies:[Sn,De,Pe,Tn,mn,q,Oe,gn,Z,ee,j],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 1.5rem;gap:1rem}sh-tabs[_ngcontent-%COMP%]{margin-bottom:1rem}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-12)}"],changeDetection:0})};export{Re as default};
|