@duplicati/ngclient 0.0.158 → 0.0.160
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-KSEFQ2XA.js → chunk-2J4H7C6W.js} +1 -1
- package/{chunk-PD73DDOS.js → chunk-2QJVTZ56.js} +2 -2
- package/{chunk-COUIDDUK.js → chunk-4IXUXIXV.js} +1 -1
- package/{chunk-TJIZJNCK.js → chunk-4NBLWONL.js} +1 -1
- package/{chunk-FMEVVC6D.js → chunk-4OBQWIWP.js} +3 -3
- package/{chunk-L3RU4D2N.js → chunk-4XH2XMUL.js} +1 -1
- package/{chunk-7FCBU2UO.js → chunk-5EOS64VG.js} +1 -1
- package/{chunk-ENNM55FS.js → chunk-5WDKKAXO.js} +1 -1
- package/{chunk-HKL7ZJV5.js → chunk-66TRUOH6.js} +1 -1
- package/{chunk-VRV52R6I.js → chunk-6YGURBW6.js} +1 -1
- package/{chunk-K3VDFIJM.js → chunk-72QJ345F.js} +1 -1
- package/{chunk-XVWOVBC4.js → chunk-7LYN2XHO.js} +1 -1
- package/{chunk-TPBZNCDW.js → chunk-7RM3VKDO.js} +1 -1
- package/{chunk-X3XJ26NZ.js → chunk-C6F6FP4R.js} +1 -1
- package/{chunk-ZSZLXWN6.js → chunk-CCKT2GLS.js} +1 -1
- package/{chunk-EE5UMXWP.js → chunk-D4F7SID5.js} +1 -1
- package/chunk-DQGMVICD.js +1 -0
- package/{chunk-JRDR23NB.js → chunk-DUHMJQLC.js} +1 -1
- package/chunk-EKL66TNH.js +1 -0
- package/{chunk-2KH32RMH.js → chunk-EMRD3UKA.js} +1 -1
- package/{chunk-M6SIMFCD.js → chunk-ERFIISF6.js} +1 -1
- package/{chunk-3AGOCPNZ.js → chunk-EWLAEWGN.js} +1 -1
- package/{chunk-UQY3P37P.js → chunk-F6ME3VE6.js} +1 -1
- package/{chunk-WXF4HUYT.js → chunk-GCCJSS4C.js} +1 -1
- package/chunk-GNKFIYOX.js +1 -0
- package/{chunk-SKSEDWGR.js → chunk-GOVVHVP2.js} +1 -1
- package/chunk-GZ4YKLCY.js +1 -0
- package/chunk-H3UUJ5EW.js +1 -0
- package/{chunk-XHITDSWR.js → chunk-IXN3WMCO.js} +1 -1
- package/{chunk-EVJPCAZV.js → chunk-JTSI7UN4.js} +1 -1
- package/chunk-K6V2N3GS.js +1 -0
- package/chunk-KATY4JFV.js +1 -0
- package/{chunk-7TF7DTKJ.js → chunk-KXM6LF3X.js} +1 -1
- package/chunk-LVTEOKA4.js +1 -0
- package/{chunk-2IE65QDC.js → chunk-MBRRLME5.js} +1 -1
- package/{chunk-TG2ZSU7H.js → chunk-NM7WJRU7.js} +1 -1
- package/chunk-OQ3CIW34.js +1 -0
- package/{chunk-RADP6NAN.js → chunk-OXKNUQ4S.js} +1 -1
- package/{chunk-3AYCMVTF.js → chunk-PHQBBCUL.js} +1 -1
- package/{chunk-ISNV5CM5.js → chunk-PULERFBI.js} +1 -1
- package/chunk-Q65KFDJ5.js +1 -0
- package/{chunk-QWQKYLNR.js → chunk-QX3IRESN.js} +1 -1
- package/{chunk-J2Y5AVUU.js → chunk-RFQCUMV5.js} +1 -1
- package/{chunk-CUL5FHDH.js → chunk-RZVBW5HI.js} +1 -1
- package/{chunk-HWCUMKYF.js → chunk-SDXU6VMB.js} +1 -1
- package/{chunk-C2VSATF5.js → chunk-SWD3HS57.js} +1 -1
- package/{chunk-363K6H7I.js → chunk-TDJOG66Y.js} +1 -1
- package/{chunk-RIFNOGGK.js → chunk-TIGMPMCF.js} +1 -1
- package/{chunk-6XXAHUOH.js → chunk-TX6PGD4I.js} +1 -1
- package/chunk-TYUEMPMP.js +1 -0
- package/{chunk-XH5CTH3O.js → chunk-TZAOQANG.js} +1 -1
- package/{chunk-FIUF53BE.js → chunk-UST7PIBI.js} +1 -1
- package/{chunk-VUKS2SJL.js → chunk-USYSNGYO.js} +1 -1
- package/{chunk-3LVCVLMO.js → chunk-UTOT5S6Z.js} +1 -1
- package/chunk-UZVZ7QY6.js +1 -0
- package/chunk-V4JPJPZI.js +3 -0
- package/{chunk-ZWO4SECL.js → chunk-V7LUGECS.js} +1 -1
- package/chunk-WXTYJ7CH.js +1 -0
- package/{chunk-MTQKK2WN.js → chunk-XLDVUBTQ.js} +1 -1
- package/{chunk-RDCD2W2C.js → chunk-YHUSOICR.js} +1 -1
- package/chunk-YX7ZJ2VA.js +1 -0
- package/{chunk-BNWLPYK6.js → chunk-ZMTLDG46.js} +1 -1
- package/index.html +1 -1
- package/locale/messages.de.json +4 -4
- package/locale/messages.it.json +123 -3
- package/{main-ATSCYMRN.js → main-OUD7GLNU.js} +1 -1
- package/package.json +1 -1
- package/chunk-3F7ADWPY.js +0 -1
- package/chunk-72HORZFV.js +0 -1
- package/chunk-BGKZFATT.js +0 -1
- package/chunk-BTJVI7MG.js +0 -1
- package/chunk-CFN5U5PK.js +0 -1
- package/chunk-JH4DRDIH.js +0 -1
- package/chunk-LANFQDZE.js +0 -1
- package/chunk-LYKQBVOC.js +0 -1
- package/chunk-MSX2SJC7.js +0 -1
- package/chunk-NC73IOHK.js +0 -1
- package/chunk-O4WI3VDE.js +0 -1
- package/chunk-U4U2GCS5.js +0 -1
- package/chunk-Y75ZS4Q2.js +0 -1
- package/chunk-YHOYPGPD.js +0 -3
- package/chunk-ZKX6JJ6S.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ut,c as ct,d as dt}from"./chunk-VUKS2SJL.js";import{a as ye}from"./chunk-3NFAL4U4.js";import{a as rt,b as Ve,c as _t}from"./chunk-4VY6SMSL.js";import{b as re}from"./chunk-Z27IQRKV.js";import{a as lt}from"./chunk-72HORZFV.js";import{a as Oe}from"./chunk-MTQKK2WN.js";import{b as ie,d as H}from"./chunk-ABYM5HWA.js";import{B as se,G as Y,K as ot,O as le,V as Me,X as at,b as Te,c as z,d as he,e as j,f as Ne,h as Qe,i as oe,j as fe,k as Ze,n as et,o as Pe,p as tt,q as Ae,r as De,s as ae,t as Re,u as q,w as nt,z as it}from"./chunk-QF4DQYEP.js";import{h as st}from"./chunk-PD73DDOS.js";import{$b as u,Ab as $e,Bb as xe,Bc as Se,Cb as T,Db as s,Eb as l,Fb as g,H as we,Jb as B,Kb as k,Mb as x,Qc as G,Rc as ne,Sa as _,Tb as E,Ub as m,V as Ce,Vb as N,Vc as Be,Wc as ke,Xc as Fe,Yb as Ue,Zb as F,_ as O,cb as J,ea as c,fa as d,gc as ge,hb as je,hc as Ee,ic as be,kc as me,nc as U,oc as ve,pa as C,pc as Ye,sc as y,tc as L,ub as qe,uc as I,xb as A,yb as D,zb as Ge}from"./chunk-QONLYWYC.js";import{a as b,b as X}from"./chunk-EUDKD2JW.js";var Le=class a{fromString(t){if(!t)return null;let e=t.match(/(\d+)([smhDWMY])/);return e&&{value:parseInt(e[1]),unit:e[2]}}toString(t,e){return`${t}${e}`}static \u0275fac=function(e){return new(e||a)};static \u0275prov=Ce({token:a,factory:a.\u0275fac,providedIn:"root"})};function Et(a,t){if(a&1){let e=x();s(0,"div",24)(1,"sh-form-field")(2,"label",25),N(3,7),l(),s(4,"input",26,0),I("ngModelChange",function(i){c(e);let o=u();return L(o.scheduleFields.nextTime().time,i)||(o.scheduleFields.nextTime().time=i),d(i)}),F("focus",function(){c(e);let i=be(5);return d(i.showPicker())}),l(),s(6,"sh-icon",27),U(7,"clock"),l()(),s(8,"sh-form-field"),g(9,"label",28),s(10,"input",29,1),I("ngModelChange",function(i){c(e);let o=u();return L(o.scheduleFields.nextTime().date,i)||(o.scheduleFields.nextTime().date=i),d(i)}),F("focus",function(){c(e);let i=be(11);return d(i.showPicker())}),l(),s(12,"sh-icon",27),U(13,"calendar"),l()()(),s(14,"div",24)(15,"sh-form-field")(16,"label",30),N(17,8),l(),s(18,"input",31),I("ngModelChange",function(i){c(e);let o=u();return L(o.scheduleFields.runAgain().repeatValue,i)||(o.scheduleFields.runAgain().repeatValue=i),d(i)}),l()(),s(19,"sh-select",32)(20,"input",33),I("ngModelChange",function(i){c(e);let o=u();return L(o.scheduleFields.runAgain().repeatUnit,i)||(o.scheduleFields.runAgain().repeatUnit=i),d(i)}),l()()(),s(21,"app-toggle-card",34),B(22,35),N(23,9),k(),s(24,"div",36)(25,"sh-toggle",19),E(26,10),s(27,"input",20),I("ngModelChange",function(i){c(e);let o=u();return L(o.scheduleFields.runAgain().allowedDays.mon,i)||(o.scheduleFields.runAgain().allowedDays.mon=i),d(i)}),l(),m(),l(),s(28,"sh-toggle",19),E(29,11),s(30,"input",20),I("ngModelChange",function(i){c(e);let o=u();return L(o.scheduleFields.runAgain().allowedDays.tue,i)||(o.scheduleFields.runAgain().allowedDays.tue=i),d(i)}),l(),m(),l(),s(31,"sh-toggle",19),E(32,12),s(33,"input",20),I("ngModelChange",function(i){c(e);let o=u();return L(o.scheduleFields.runAgain().allowedDays.wed,i)||(o.scheduleFields.runAgain().allowedDays.wed=i),d(i)}),l(),m(),l(),s(34,"sh-toggle",19),E(35,13),s(36,"input",20),I("ngModelChange",function(i){c(e);let o=u();return L(o.scheduleFields.runAgain().allowedDays.thu,i)||(o.scheduleFields.runAgain().allowedDays.thu=i),d(i)}),l(),m(),l(),s(37,"sh-toggle",19),E(38,14),s(39,"input",20),I("ngModelChange",function(i){c(e);let o=u();return L(o.scheduleFields.runAgain().allowedDays.fri,i)||(o.scheduleFields.runAgain().allowedDays.fri=i),d(i)}),l(),m(),l(),s(40,"sh-toggle",19),E(41,15),s(42,"input",20),I("ngModelChange",function(i){c(e);let o=u();return L(o.scheduleFields.runAgain().allowedDays.sat,i)||(o.scheduleFields.runAgain().allowedDays.sat=i),d(i)}),l(),m(),l(),s(43,"sh-toggle",19),E(44,16),s(45,"input",20),I("ngModelChange",function(i){c(e);let o=u();return L(o.scheduleFields.runAgain().allowedDays.sun,i)||(o.scheduleFields.runAgain().allowedDays.sun=i),d(i)}),l(),m(),l()()()}if(a&2){let e=u();_(4),y("ngModel",e.scheduleFields.nextTime().time),_(6),y("ngModel",e.scheduleFields.nextTime().date),_(8),y("ngModel",e.scheduleFields.runAgain().repeatValue),_(),T("options",e.unitOptions)("isClearable",!1),_(),y("ngModel",e.scheduleFields.runAgain().repeatUnit),_(),T("disallowToggle",!0),_(6),y("ngModel",e.scheduleFields.runAgain().allowedDays.mon),_(3),y("ngModel",e.scheduleFields.runAgain().allowedDays.tue),_(3),y("ngModel",e.scheduleFields.runAgain().allowedDays.wed),_(3),y("ngModel",e.scheduleFields.runAgain().allowedDays.thu),_(3),y("ngModel",e.scheduleFields.runAgain().allowedDays.fri),_(3),y("ngModel",e.scheduleFields.runAgain().allowedDays.sat),_(3),y("ngModel",e.scheduleFields.runAgain().allowedDays.sun)}}var mt=[{key:"s",label:$localize`Seconds`},{key:"m",label:$localize`Minutes`},{key:"h",label:$localize`Hours`},{key:"D",label:$localize`Days`},{key:"W",label:$localize`Weeks`},{key:"M",label:$localize`Months`},{key:"Y",label:$localize`Years`}],ee={autoRun:!0,nextTime:{time:"13:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!1,tue:!1,wed:!1,thu:!1,fri:!1,sat:!1,sun:!1}}},Ke=class a{#e=O(Q);#t=O(H);#i=O(ie);unitOptions=mt;scheduleFields=this.#e.scheduleFields;goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#i.parent})}next(){this.#e.isNew()||this.#e.submit(!0),this.#t.navigate(["options"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=J({type:a,selectors:[["app-schedule"]],decls:16,vars:2,consts:()=>{let t;t=$localize`Schedule`;let e;e=$localize` Automatically run backups ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let n;n=$localize`If a date was missed, the job will run as soon as possible.`;let i;i=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let o;o=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let r;r=$localize`Next time`;let p;p=$localize`Run again every`;let h;h=$localize`Allowed days`;let S;S=$localize` Monday ${"\uFFFD#27\uFFFD\uFFFD/#27\uFFFD"}:TAG_INPUT:`;let w;w=$localize` Tuesday ${"\uFFFD#30\uFFFD\uFFFD/#30\uFFFD"}:TAG_INPUT:`;let P;P=$localize` Wednesday ${"\uFFFD#33\uFFFD\uFFFD/#33\uFFFD"}:TAG_INPUT:`;let $;$=$localize` Thursday ${"\uFFFD#36\uFFFD\uFFFD/#36\uFFFD"}:TAG_INPUT:`;let K;K=$localize` Friday ${"\uFFFD#39\uFFFD\uFFFD/#39\uFFFD"}:TAG_INPUT:`;let v;v=$localize` Saturday ${"\uFFFD#42\uFFFD\uFFFD/#42\uFFFD"}:TAG_INPUT:`;let W;return W=$localize` Sunday ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`,[["timeRef",""],["dateRef",""],t,e,n,i,o,r,p,h,S,w,P,$,K,v,W,[1,"title-30"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","",1,"raised","primary",3,"click"],[1,"row-inputs"],["for","time"],["type","time","id","time",3,"ngModelChange","focus","ngModel"],["suffix",""],["for","date"],["type","date","id","date",3,"ngModelChange","focus","ngModel"],["for","repeatValue"],["type","number","id","repeatValue",3,"ngModelChange","ngModel"],["value","key","label","label",3,"options","isClearable"],["type","text","id","repeatUnit",3,"ngModelChange","ngModel"],[3,"disallowToggle"],["title",""],[1,"days-wrap"]]},template:function(e,n){e&1&&(s(0,"h3",17),N(1,2),l(),s(2,"div",18)(3,"sh-toggle",19),E(4,3),s(5,"input",20),I("ngModelChange",function(o){return L(n.scheduleFields.autoRun,o)||(n.scheduleFields.autoRun=o),o}),l(),m(),l(),s(6,"p"),N(7,4),l()(),A(8,Et,46,14),s(9,"div",21)(10,"button",22),F("click",function(){return n.goBack()}),E(11,5),g(12,"sh-icon"),m(),l(),s(13,"button",23),F("click",function(){return n.next()}),E(14,6),g(15,"sh-icon"),m(),l()()),e&2&&(_(5),y("ngModel",n.scheduleFields.autoRun),_(3),D(n.scheduleFields.autoRun()?8:-1))},dependencies:[ae,z,Ze,Te,j,oe,Y,Me,q,se,le,ye],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem 2.5rem 1.5rem;display:flex;flex-direction:column;gap:1.5rem}.toggle-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.days-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};function St(a,t){if(a&1){let e=x();s(0,"sh-select",2)(1,"input",6),I("ngModelChange",function(i){c(e);let o=u();return L(o.internalPath,i)||(o.internalPath=i),d(i)}),F("ngModelChange",function(){c(e);let i=u();return d(i.updateFilter())}),l()()}if(a&2){let e=u();T("options",e.fileGroupOptions())("isClearable",!1)("selectMultiple",!0),_(),y("ngModel",e.internalPath)}}function Ft(a,t){if(a&1&&(B(0,7),U(1),k()),a&2){let e,n=u(2);_(),ve((e=n.currentExpressionOption())==null?null:e.startsWith)}}function Tt(a,t){if(a&1&&(B(0,8),U(1),k()),a&2){let e,n=u(2);_(),ve((e=n.currentExpressionOption())==null?null:e.endsWith)}}function ht(a,t){if(a&1){let e=x();s(0,"sh-form-field",3)(1,"input",6),I("ngModelChange",function(i){c(e);let o=u();return L(o.internalPath,i)||(o.internalPath=i),d(i)}),F("ngModelChange",function(){c(e);let i=u();return d(i.updateFilter())}),l(),A(2,Ft,2,1,"ng-container",7),A(3,Tt,2,1,"ng-container",8),l()}if(a&2){let e,n,i=u();_(),y("ngModel",i.internalPath),_(),D(!((e=i.currentExpressionOption())==null||e.startsWith==null)&&e.startsWith.length?2:-1),_(),D(!((n=i.currentExpressionOption())==null||n.endsWith==null)&&n.endsWith.length?3:-1)}}var Nt=[{key:"Applications",value:"Applications"},{key:"CacheFiles",value:"Cache Files"},{key:"TemporaryFiles",value:"Temporary Files"},{key:"OperatingSystem",value:"Operating System"},{key:"SystemFiles",value:"System Files"},{key:"DefaultExcludes",value:"Standard Excludes"}],ft=[{key:"Excludes folders where name contains",value:"-FolderName"},{key:"Excludes folder",value:"-Folder"},{key:"Excludes files where name contains",value:"-FileName"},{key:"Excludes file extension",value:"-Extension"},{key:"Excludes files where name matches regex",value:"-Regex"},{key:"Includes files where name matches regex",value:"+Regex"},{key:"Exclude file groups",value:"-FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"},{key:"None",value:"-Unknown"}],Ie=class a{path=ke.required();osType=ke();pathChange=Be();remove=Be();internalPath=C("");pathType=C("-Expression");currentExpressionOption=G(()=>{let t=this.pathType();return this.expressionOptions().find(e=>e.value===t)});fileGroupOptions=C(Nt);expressionOptions=G(()=>{let e=this.osType()==="Windows"?"\\":"/";return ft.map(n=>n.value==="-Folder"||n.value==="+Folder"?X(b({},n),{startsWith:"",endsWith:""}):n.value==="-FolderName"||n.value==="+FolderName"?X(b({},n),{startsWith:"*",endsWith:`*${e}`}):n.value==="-FileName"||n.value==="+FileName"?X(b({},n),{startsWith:"[.*",endsWith:`[^\\${e}]*]`}):n.value==="-FileGroup"||n.value==="+FileGroup"?X(b({},n),{startsWith:"{",endsWith:"}"}):n.value==="-Regex"||n.value==="+Regex"?X(b({},n),{startsWith:"[",endsWith:"]"}):n.value==="-Extension"||n.value==="+Extension"?X(b({},n),{startsWith:"*.",endsWith:""}):X(b({},n),{startsWith:"",endsWith:""}))});pathEffect=ne(()=>{let t=this.path(),e=t.slice(1),n=t.startsWith("-")?"-":"+",i=this.osType()==="Windows",o=i?"\\":"/";e.startsWith("%")&&e.endsWith(o)||i&&e.slice(2).startsWith(o)&&e.endsWith(o)||e.startsWith(o)&&e.endsWith(o)?(this.pathType.set(`${n}Folder`),this.internalPath.set(e)):e.startsWith("*")&&e.endsWith(`*${o}`)?(this.pathType.set(`${n}FolderName`),this.internalPath.set(e.slice(1,-2))):e.startsWith("[.*")&&e.endsWith(`[^\\${o}]*]`)?(this.pathType.set(`${n}FileName`),this.internalPath.set(e.slice(3,-7))):e.startsWith("{")&&e.endsWith("}")?(this.pathType.set(`${n}FileGroup`),this.internalPath.set(e.slice(1,-1))):e.startsWith("[")&&e.endsWith("]")?(this.pathType.set(`${n}Regex`),this.internalPath.set(e.slice(1,-1))):e.startsWith("*.")?(this.pathType.set(`${n}Extension`),this.internalPath.set(e.slice(2))):(this.pathType.set(`${n}Expression`),this.internalPath.set(e))});updateFilter(){let t=this.internalPath(),e=this.currentExpressionOption();t!==""&&this.pathChange.emit(`${e?.value.slice(0,1)}${e?.startsWith??""}${t}${e?.endsWith??""}`)}removeFilter(){this.remove.emit()}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=J({type:a,selectors:[["app-new-filter"]],inputs:{path:[1,"path"],osType:[1,"osType"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:7,vars:4,consts:()=>{let t;return t=$localize`Select an option...`,[["value","value","label","key",3,"options","isClearable"],["type","text","placeholder",t,3,"ngModelChange","ngModel"],["value","key","label","value",1,"expression-input",3,"options","isClearable","selectMultiple"],[1,"expression-input"],[1,"filter-removal",3,"click"],[1,"sh-primary"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],["suffix",""]]},template:function(e,n){if(e&1&&(s(0,"sh-select",0)(1,"input",1),I("ngModelChange",function(o){return L(n.pathType,o)||(n.pathType=o),o}),F("ngModelChange",function(){return n.updateFilter()}),l()(),A(2,St,2,4,"sh-select",2)(3,ht,4,3,"sh-form-field",3),s(4,"div",4),F("click",function(){return n.removeFilter()}),s(5,"sh-icon",5),U(6,"x-circle"),l()()),e&2){let i;T("options",n.expressionOptions())("isClearable",!1),_(),y("ngModel",n.pathType),_(),D(((i=n.currentExpressionOption())==null?null:i.value)=="-FileGroup"||((i=n.currentExpressionOption())==null?null:i.value)=="+FileGroup"?2:3)}},dependencies:[ae,z,j,oe,le,Y,q],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:13.125rem 1fr 1.875rem;gap:.5rem;align-items:flex-end}.expression-input[_ngcontent-%COMP%]{--ff-suffix-bg: var(--base-2)}.filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"],changeDetection:0})};var Pt=["formRef"],He=()=>({standalone:!0});function At(a,t){if(a&1){let e=x();s(0,"sh-form-field",41)(1,"input",42),I("ngModelChange",function(i){c(e);let o=u(2);return L(o.editingPath,i)||(o.editingPath=i),d(i)}),l()(),s(2,"button",43),F("click",function(){c(e);let i=u(2);return d(i.updatePath())}),s(3,"sh-icon"),U(4,"floppy-disk"),l()(),s(5,"button",43),F("click",function(){c(e);let i=u(2);return d(i.cancelEditPath())}),s(6,"sh-icon"),U(7,"x-bold"),l()()}if(a&2){let e=u(2);_(),y("ngModel",e.editingPath),T("ngModelOptions",Se(2,He))}}function Dt(a,t){if(a&1){let e=x();s(0,"sh-form-field",41),g(1,"input",44),l(),s(2,"button",43),F("click",function(){c(e);let i=u().$implicit,o=u();return d(o.editPath(i))}),s(3,"sh-icon"),U(4,"pen"),l()(),s(5,"button",43),F("click",function(){c(e);let i=u().$implicit,o=u();return d(o.removePath(i))}),s(6,"sh-icon"),U(7,"trash-simple"),l()()}if(a&2){let e=u().$implicit;qe("readonly",!0),_(),T("ngModel",e)("ngModelOptions",Se(3,He))}}function Rt(a,t){if(a&1&&(s(0,"div",30),A(1,At,8,3)(2,Dt,8,4),l()),a&2){let e=t.$implicit,n=u();_(),D(n.oldPath()===e?1:2)}}function Mt(a,t){if(a&1){let e=x();s(0,"app-new-filter",46),F("pathChange",function(i){let o=c(e).$index,r=u(2);return d(r.patchPathAt(i,o))})("remove",function(){let i=c(e).$index,o=u(2);return d(o.removePathAt(i))}),l()}if(a&2){let e=t.$implicit,n=u(2);T("path",e)("osType",n.osType()??"")}}function Ot(a,t){if(a&1&&$e(0,Mt,1,2,"app-new-filter",45,Ge),a&2){let e=u();xe(e.pathArray())}}function yt(a,t){if(a&1){let e=x();s(0,"div",31)(1,"app-size",47),F("ngModelChange",function(i){c(e);let o=u();return d(o.updateFilesLargerThan(i))}),l()()}if(a&2){let e=u();_(),T("ngModel",e.filesLargerThan())("ngModelOptions",Se(2,He))}}var V=new De,pt=(a={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>V.group({path:V.control(a.path),excludes:V.group({hidden:V.control(a.excludes.hidden),system:V.control(a.excludes.system),temporary:V.control(a.excludes.temporary),filesLargerThan:V.group({size:V.control(null),unit:V.control(null)})})}),Je=class a{#e=O(Q);#t=O(H);#i=O(ie);formRef=Fe.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new Qe("");filesLargerThan=G(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);osType=this.#e.osType;pathSignal=re(this.sourceDataForm.controls.path.valueChanges);pathArray=G(()=>this.pathSignal()?.split("\0").filter(t=>t.startsWith("-")||t.startsWith("+")||t==="___none___")??[]);nonFilterPaths=G(()=>this.pathSignal()?.split("\0").filter(t=>!t.startsWith("-")&&!t.startsWith("+")&&t!==""));oldPath=C(null);editingPath=C(null);addingNewPath=C(!1);editPath(t){this.oldPath.set(t),this.editingPath.set(t)}updateFilesLargerThan(t){let{size:e,unit:n}=ct(t);this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:e,unit:n})}updatePath(){let t=this.oldPath(),e=this.editingPath();if(!t||!e||e===t){this.oldPath.set(null),this.editingPath.set(null);return}let n=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(n?.replace(t,e)??""),this.oldPath.set(null),this.editingPath.set(null)}cancelEditPath(){this.oldPath.set(null),this.editingPath.set(null)}removePath(t){let n=(this.sourceDataForm.controls.path.value??"").split("\0"),i=n.indexOf(t);if(i===-1)return;n.splice(i,1);let o=n.filter(r=>r&&r!=="").join("\0");this.sourceDataForm.controls.path.setValue(o)}addFilter(t="-*"){let n=[this.sourceDataForm.controls.path.value,t].filter(i=>i&&i!=="").join("\0");this.sourceDataForm.controls.path.setValue(n)}patchPathAt(t,e){let i=this.sourceDataForm.controls.path.value.split("\0").filter(p=>!p.startsWith("-")&&!p.startsWith("+")).join("\0"),o=this.pathArray().map((p,h)=>h===e?`${t}`:`${p}`).join("\0"),r=[i,o].filter(p=>p&&p!=="").join("\0");this.sourceDataForm.controls.path.setValue(r)}removePathAt(t){let n=this.sourceDataForm.controls.path.value.split("\0").filter(r=>!r.startsWith("-")&&!r.startsWith("+")).join("\0"),i=this.pathArray().filter((r,p)=>p!==t).join("\0"),o=[n,i].filter(r=>r&&r!=="").join("\0");this.sourceDataForm.controls.path.setValue(o)}getPath(){return this.sourceDataForm.value.path??null}toggleFilesLargerThan(){this.sourceDataForm.controls.excludes.value.filesLargerThan?.size===null?this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:50,unit:"MB"}):this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:null,unit:null})}addNewPath(){let t=this.sourceDataForm.controls.path.value,e=this.newPathCtrl.value,n=t?.split("\0")||[];e&&!n.includes(e)&&n.push(e);let i=n.filter(o=>o&&o!=="").join("\0");this.sourceDataForm.controls.path.setValue(i),this.newPathCtrl.setValue("")}goBack(){this.#t.navigate(["destination"],{relativeTo:this.#i.parent})}next(){this.#e.isNew()||this.#e.submit(!0),this.#t.navigate(["schedule"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=J({type:a,selectors:[["app-source-data"]],viewQuery:function(e,n){e&1&&ge(n.formRef,Pt,5),e&2&&Ee()},decls:56,vars:12,consts:()=>{let t;t=$localize`Path`;let e;e=$localize`Add a direct path`;let n;n=$localize`Hidden files`;let i;i=$localize`System files`;let o;o=$localize`Temporary files`;let r;r=$localize`Source Data`;let p;p=$localize`Folder path`;let h;h=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let S;S=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let w;w=$localize`Paths`;let P;P=$localize`Add a path directly from your machine.`;let $;$=$localize`Filters`;let K;K=$localize`Customize your filters.`;let v;v=$localize`Add filter`;let W;W=$localize`Exclude`;let R;R=$localize`Choose if there’s any files you want to exclude.`;let Z;Z=$localize` Files with the Hidden attribute ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`;let _e;_e=$localize` Files with the System attribute ${"\uFFFD#49\uFFFD\uFFFD/#49\uFFFD"}:TAG_INPUT:`;let ue;ue=$localize` Files with the Temporary attribute ${"\uFFFD#52\uFFFD\uFFFD/#52\uFFFD"}:TAG_INPUT:`;let ce;ce=$localize` Files larger than `;let f;return f=$localize`Edit path`,[["formRef",""],r,p,h,S,w,P,$,K,v,W,R,Z,_e,ue,ce,[3,"submit","formGroup"],[1,"left"],[1,"title-30"],[1,"fill",3,"multiSelect","startingPath","showFiles"],["for","path"],["type","text","id","path","tabindex","4","placeholder",t,"formControlName","path"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],[1,"right"],[3,"disallowToggle"],["title",""],["description",""],[1,"paths"],[1,"path"],[1,"row-inputs"],["type","text","placeholder",e,3,"formControl"],["shButton","","type","button",1,"raised","primary",3,"click"],["type","button","shButton","","action","",3,"click"],["formGroupName","excludes",3,"disallowToggle"],[1,"raised","primary"],["type","checkbox","placeholder",n,"formControlName","hidden"],["type","checkbox","placeholder",i,"formControlName","system"],["type","checkbox","placeholder",o,"formControlName","temporary"],[1,"raised","primary",3,"click"],[1,"small"],["type","text","placeholder",f,3,"ngModelChange","ngModel","ngModelOptions"],["shButton","","type","button",1,"small",3,"click"],["type","text",3,"ngModel","ngModelOptions"],[3,"path","osType"],[3,"pathChange","remove","path","osType"],[3,"ngModelChange","ngModel","ngModelOptions"]]},template:function(e,n){if(e&1){let i=x();s(0,"form",16,0),F("submit",function(){return c(i),d(n.next())}),s(2,"div",17)(3,"h3",18),N(4,1),l(),s(5,"app-file-tree",19)(6,"label",20),N(7,2),l(),g(8,"input",21),l(),s(9,"div",22)(10,"button",23),F("click",function(){return c(i),d(n.goBack())}),E(11,3),g(12,"sh-icon"),m(),l(),s(13,"button",24),E(14,4),g(15,"sh-icon"),m(),l()()(),s(16,"div",25)(17,"app-toggle-card",26),B(18,27),N(19,5),k(),s(20,"p",28),N(21,6),l(),s(22,"div",29),$e(23,Rt,3,1,"div",30,Ge),s(25,"div",31)(26,"sh-form-field"),g(27,"input",32),l(),s(28,"button",33),F("click",function(){return c(i),d(n.addNewPath())}),s(29,"sh-icon"),U(30,"plus"),l()()()()(),s(31,"app-toggle-card",26),B(32,27),N(33,7),k(),s(34,"p",28),N(35,8),l(),s(36,"button",34),F("click",function(){return c(i),d(n.addFilter())}),N(37,9),l(),A(38,Ot,2,0),l(),s(39,"app-toggle-card",35),B(40,27),N(41,10),k(),s(42,"p",28),N(43,11),l(),s(44,"sh-toggle",36),E(45,12),g(46,"input",37),m(),l(),s(47,"sh-toggle",36),E(48,13),g(49,"input",38),m(),l(),s(50,"sh-toggle",36),E(51,14),g(52,"input",39),m(),l(),s(53,"sh-toggle",40),F("click",function(){return c(i),d(n.toggleFilesLargerThan())}),N(54,15),l(),A(55,yt,2,3,"div",31),l()()()}if(e&2){let i;T("formGroup",n.sourceDataForm),_(5),T("multiSelect",!0)("startingPath",n.getPath())("showFiles",!0),_(12),T("disallowToggle",!0),_(6),xe(n.nonFilterPaths()),_(4),T("formControl",n.newPathCtrl),_(4),T("disallowToggle",!0),_(7),D((i=n.pathSignal())!=null&&i.length?38:-1),_(),T("disallowToggle",!0),_(14),me("active",n.filesLargerThan()),_(2),D(n.filesLargerThan()?55:-1)}},dependencies:[ae,fe,z,Te,j,Ne,oe,Re,et,Pe,Ae,tt,Y,q,se,Me,Ie,ut,ye,dt],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;width:100%;flex:1 0;overflow:hidden}form[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;flex:1 0;overflow:hidden}.right[_ngcontent-%COMP%], .left[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:1.5rem}.left[_ngcontent-%COMP%]{padding:2.5rem;overflow:hidden;border-right:1px solid var(--base-4)}.right[_ngcontent-%COMP%]{padding:2.5rem 1.5rem;overflow:auto}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}sh-divider[_ngcontent-%COMP%]{margin:.75rem 0}.row-inputs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content;gap:.25rem}.paths[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.path[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:1fr min-content min-content;gap:.25rem}"],changeDetection:0})};var Ct="1W:1D,4W:1W,12M:1M",Q=class a{#e=O(H);#t=O(Oe);#i=O(it);#n=O(st);#a=O(Le);generalForm=gt();sourceDataForm=pt();scheduleFields={autoRun:C(ee.autoRun),nextTime:C(ee.nextTime),runAgain:C(ee.runAgain)};settings=C([]);optionsFields={remoteVolumeSize:C("50MB"),backupRetention:C("all"),backupRetentionTime:C(""),backupRetentionVersions:C(0),backupRetentionCustom:C("")};targetUrlModel=C(null);backupMetadata=C(null);isDraft=C(!1);backupId=C(null);backupName=G(()=>this.generalFormSignal()?.name??"");isSubmitting=C(!1);finishedLoading=C(!1);backupDefaults=C(null);applicationOptions=C(null);isNew=G(()=>this.backupId()==="new");osType=G(()=>this.#t.systemInfo()?.OSType);selectedOptions=C([]);sourceDataFormSignal=re(this.sourceDataForm.valueChanges);generalFormSignal=re(this.generalForm.valueChanges);encryptionFieldSignal=re(this.generalForm.controls.encryption.valueChanges);advancedOptions=G(()=>this.#t.systemInfo()?.Options?.map(this.#_)??[]);#o=C("");#s=C(null);#l=null;testSignal=this.#o.asReadonly();testErrorMessage=this.#s.asReadonly();#d=ne(()=>{let t=this.targetUrlModel(),e=this.#o(),n=this.#l;this.#l=t,!(e==="testing"||n===null||n===t)&&(this.#o.set(""),this.#s.set(null))});setTestState(t,e){this.#o.set(t),this.#s.set(e??null)}#_(t){return{name:t.Name,type:t.Type,shortDescription:t.ShortDescription??void 0,longDescription:t.LongDescription??void 0,options:t.ValidValues}}encryptionOptions=G(()=>{let t=this.#t.systemInfo()?.EncryptionModules??[];return[pe,...t]});nonSelectedOptions=G(()=>this.advancedOptions().sort((t,e)=>t?.name&&e?.name?t?.name.localeCompare(e?.name):0).filter(t=>this.selectedOptions()?.findIndex(e=>e.name===t.name)===-1));submit(t=!1){this.isSubmitting.set(!0);let e=this.#u(),n=this.backupId();this.isDraft()&&e.Backup&&(e.Backup.Metadata=this.backupMetadata()),n==="new"||!n||this.isDraft()?this.#n.postApiV1Backups({requestBody:e}).pipe(we(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{t||this.exit(!1)},error:()=>{}}):this.#n.putApiV1BackupById({id:n,requestBody:e}).pipe(we(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{t||this.exit(!1)},error:()=>{}})}exit(t){if(!t){this.#r(),this.#e.navigate(["/"]);return}this.#i.open(lt,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:e=>{e&&(this.#r(),this.#e.navigate(["/"]))}})}mapSourceDataToForm(t){let e=t.Sources??"",n=t.Filters?.map(p=>`${p.Include?"":"-"}${p.Expression}`)??[],i=t.Settings?.find(p=>p.Name==="--exclude-files-attributes")?.Value??"",o=t.Settings?.find(p=>p.Name==="--skip-files-larger-than")??null,r={path:[...e,...n].join("\0"),excludes:{hiddenFiles:i.includes("hidden"),systemFiles:i.includes("system"),tempFiles:i.includes("temporary"),filesLargerThan:o?.Value?.toUpperCase()??null}};this.sourceDataForm.patchValue(r)}mapDestinationToForm(t){this.targetUrlModel.set(t.TargetURL??"")}mapGeneralToForm(t){let e=t.Name??"",n=t.Description??"",i=t.Settings?.find(S=>S.Name==="encryption-module"),o=t.Settings?.find(S=>S.Name==="passphrase")?.Value??"",r=i?.Value&&i.Value.length?i.Value:"",p=t.Settings?.find(S=>S.Name==="compression-module")?.Value??"",h={name:t.Name??"",description:t.Description??""};e&&e!==""&&(h.name=e),n&&n!==""&&(h.description=n),r&&r!==""&&(h.encryption=r),o&&o!==""&&(h.password=o,h.repeatPassword=o),p&&p!==""&&(h.compression=p),this.generalForm.patchValue(h)}mapScheduleToForm(t){if(!t){this.scheduleFields.autoRun.set(!1);return}let e=this.#a.fromString(t.Repeat)??null,n=this.#c(t.Time);this.scheduleFields.autoRun.set(!0),this.scheduleFields.nextTime.update(i=>b(b({},i),n)),this.scheduleFields.runAgain.set({repeatValue:e?.value??1,repeatUnit:e?.unit??"D",allowedDays:{mon:t.AllowedDays?.includes("mon")??!1,tue:t.AllowedDays?.includes("tue")??!1,wed:t.AllowedDays?.includes("wed")??!1,thu:t.AllowedDays?.includes("thu")??!1,fri:t.AllowedDays?.includes("fri")??!1,sat:t.AllowedDays?.includes("sat")??!1,sun:t.AllowedDays?.includes("sun")??!1}})}mapOptionsToForms(t){let e=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","dblock-size","passphrase","keep-time","keep-versions","retention-policy"],n=t.Settings?.filter(r=>!e.includes(r.Name)),i=t.Settings?.filter(r=>e.includes(r.Name));this.settings.set(n??[]),n?.forEach(r=>{if(r.Name==="encryption-module"&&this.isNew())return this.generalForm.controls.encryption.setValue(r.Value??"")});var o="all";i?.forEach(r=>{if(r.Name==="dblock-size"&&this.optionsFields.remoteVolumeSize.set(r.Value??"50MB"),r.Name==="keep-time"&&(r.Value??"")!=="")return o="time",this.optionsFields.backupRetentionTime.set(r.Value??"");if(r.Name==="keep-versions"&&(r.Value??"")!=="")return o="versions",this.optionsFields.backupRetentionVersions.set(r.Value?parseInt(r.Value):null);if(r.Name==="retention-policy"&&(r.Value??"")!=="")if(r.Value===Ct)o="smart";else return o="custom",this.optionsFields.backupRetentionCustom.set(r.Value??"")}),this.optionsFields.backupRetention.set(o)}storeMetadata(t,e){this.backupMetadata.set(e?t.Metadata??null:null)}getScheduleFormValue(){return{autoRun:this.scheduleFields.autoRun(),nextTime:this.scheduleFields.nextTime(),runAgain:this.scheduleFields.runAgain()}}#u(){let t=this.generalForm.value,e=this.getScheduleFormValue(),n=this.sourceDataForm.value,i=this.targetUrlModel(),o=null;e.runAgain?.repeatUnit&&e.runAgain?.repeatValue&&(o=this.#a.toString(e.runAgain.repeatValue,e.runAgain.repeatUnit));let r=e.runAgain?.allowedDays?Object.entries(e.runAgain?.allowedDays).filter(([P,$])=>$).map(([P,$])=>P):[],p=n.path?.split("\0")??[],h=this.mapFormsToSettings(),S=Object.entries(n.excludes??{}).filter(([P,$])=>$&&P!=="filesLargerThan").map(([P])=>P),w=n.excludes?.filesLargerThan;return S.length&&h.push({Name:"--exclude-files-attributes",Value:S.join(",")}),w&&w.size!==null&&w.unit!==null&&h.push({Name:"--skip-files-larger-than",Value:`${w.size}${w.unit}`}),{Backup:{Name:t.name,Description:t.description,TargetURL:i??null,Sources:p.filter(P=>!P.startsWith("-")),Settings:h,Filters:p.filter(P=>P.startsWith("-")).map((P,$)=>({Order:$,Include:!1,Expression:P.slice(1)}))},Schedule:e.autoRun?{Repeat:o,Time:e.nextTime?.date?new Date(`${e.nextTime.date}T${e.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:r}:null}}mapFormsToSettings(t=[]){let e=this.generalForm.value,n=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","encryption-module","passphrase","keep-time","keep-versions","retention-policy","dblock-size","compression-module"],i=[{Name:"--no-encryption",Value:"True"}];e.encryption!==""&&e.encryption!==pe.Key&&(i=[{Name:"encryption-module",Value:e.encryption??null},{Name:"passphrase",Value:e.password??null}]);let o=[{Name:"compression-module",Value:e.compression}];e.compression===""&&(o=[]);let r=[{Name:"dblock-size",Value:this.optionsFields.remoteVolumeSize()}];switch(this.optionsFields.backupRetention()){case"time":r.push({Name:"keep-time",Value:this.optionsFields.backupRetentionTime()});break;case"versions":r.push({Name:"keep-versions",Value:this.optionsFields.backupRetentionVersions()?.toString()??""});break;case"custom":r.push({Name:"retention-policy",Value:this.optionsFields.backupRetentionCustom()});break;case"smart":r.push({Name:"retention-policy",Value:Ct});break}let p=[...t,...n],h=this.settings().filter(S=>!p.includes(S.Name)).map(S=>{let w=S.Value;return typeof S.Value=="number"&&(w=S.Value.toString()),typeof S.Value=="boolean"&&(w=S.Value?"True":"False"),{Name:S.Name?.startsWith("--")?S.Name:`--${S.Name}`,Value:w}});return[...i,...o,...r,...h]}#c(t){if(!t||t?.indexOf("T")===-1)return{time:t??"13:00"};let e=new Date(t);return{time:`${(""+e.getHours()).padStart(2,"0")}:${(""+e.getMinutes()).padStart(2,"0")}`,date:e.toISOString().split("T")[0]}}setTargetUrl(t,e=!1){e&&(this.#l=null),this.targetUrlModel.set(t)}#r(){this.generalForm.reset(),this.sourceDataForm.reset(),this.scheduleFields.autoRun.set(ee.autoRun),this.scheduleFields.nextTime.set(ee.nextTime),this.scheduleFields.runAgain.set(ee.runAgain),this.optionsFields.remoteVolumeSize.set("50MB"),this.optionsFields.backupRetention.set("all"),this.settings.set([]),this.targetUrlModel.set(null)}static \u0275fac=function(e){return new(e||a)};static \u0275prov=Ce({token:a,factory:a.\u0275fac,providedIn:"root"})};var Lt=["formRef"];function It(a,t){a&1&&(s(0,"sh-alert",17),E(1,5),g(2,"sh-icon",26),m(),l())}function wt(a,t){if(a&1&&U(0),a&2){let e=t.$implicit;Ye(" ",e.DisplayName," ")}}function Gt(a,t){if(a&1&&g(0,"sh-progress-bar",40),a&2){let e=u(3);me("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),T("value",e.calculatePasswordStrength()*(100/5))}}function $t(a,t){a&1&&(s(0,"span",35),N(1,10),l())}function xt(a,t){a&1&&(E(0,8,1),g(1,"sh-icon"),m())}function Ut(a,t){a&1&&(E(0,8,2),g(1,"sh-icon"),m())}function bt(a,t){a&1&&(E(0,11,1),g(1,"sh-icon",42),m())}function vt(a,t){a&1&&(E(0,11,2),g(1,"sh-icon"),m())}function Bt(a,t){if(a&1){let e=x();s(0,"button",41),F("click",function(){c(e);let i=u(3);return d(i.copyPassword())}),E(1,11),A(2,bt,2,0)(3,vt,2,0),m(),l()}if(a&2){let e=u(3);_(2),D(e.copiedPassword()?2:3)}}function kt(a,t){a&1&&(s(0,"sh-alert",39),N(1,12),l())}function Vt(a,t){if(a&1){let e=x();s(0,"div",30)(1,"sh-form-field")(2,"label",31),E(3,7),g(4,"sup"),m(),l(),g(5,"input",32),l(),A(6,Gt,1,9,"sh-progress-bar",33),s(7,"sh-form-field"),g(8,"input",34),A(9,$t,2,0,"span",35),l(),s(10,"div",36)(11,"button",37),F("click",function(){c(e);let i=u(2);return d(i.showPassword.set(!i.showPassword()))}),E(12,8),A(13,xt,2,0)(14,Ut,2,0),m(),l(),s(15,"button",37),F("click",function(){c(e);let i=u(2);return d(i.generatePassword())}),E(16,9),g(17,"sh-icon"),m(),l(),A(18,Bt,4,1,"button",38),l(),A(19,kt,2,0,"sh-alert",39),l()}if(a&2){let e=u(2);_(5),T("type",e.showPassword()?"text":"password"),_(),D(e.generalForm.value.password?6:-1),_(2),T("type",e.showPassword()?"text":"password"),_(),D(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?9:-1),_(4),D(e.showPassword()?13:14),_(5),D(e.showCopyPassword()?18:-1),_(),D(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?19:-1)}}function Kt(a,t){if(a&1&&(s(0,"sh-select",27)(1,"label",28),N(2,6),l(),g(3,"input",29),je(4,wt,1,1,"ng-template"),l(),A(5,Vt,20,7,"div",30)),a&2){let e=u();T("options",e.encryptionOptions())("isClearable",!1),_(5),D(e.encryptionFieldSignal()!==e.noneOptionKey?5:-1)}}function Wt(a,t){if(a&1&&(s(0,"button",24),E(1,13),g(2,"sh-icon"),m(),l()),a&2){let e=u();T("disabled",e.nameAndDescriptionValid()===!1)}}function Xt(a,t){if(a&1&&(s(0,"button",25),E(1,14),g(2,"sh-icon"),m(),l()),a&2){let e=u();T("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var te=new De,gt=(a={name:"",description:"",encryption:"",password:"",repeatPassword:"",compression:""})=>te.group({name:te.control(a.name,[he.required]),description:te.control(a.description),encryption:te.control(a.encryption,[_t()]),password:te.control(a.password,[Ve(t=>t?.value.encryption!=="",[he.required])]),repeatPassword:te.control(a.repeatPassword,[Ve(t=>t?.value.encryption!=="",[he.required])]),compression:te.control(a.compression)}),pe={Key:"-",DisplayName:"None"},ze=class a{#e=O(H);#t=O(ie);#i=O(rt);#n=O(Q);#a=O(Oe);formRef=Fe.required("formRef");generalForm=this.#n.generalForm;generalFormSignal=this.#n.generalFormSignal;encryptionFieldSignal=this.#n.encryptionFieldSignal;encryptionOptions=this.#n.encryptionOptions;isNew=this.#n.isNew;showPassword=C(!1);copiedPassword=C(!1);showCopyPassword=C(!1);noneOptionKey=pe.Key;encryptionEffect=ne(()=>{this.encryptionFieldSignal()===pe.Key&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});nameAndDescriptionValid=G(()=>{let t=this.generalFormSignal(),e=this.generalForm.controls;return e?.name&&e.name.valid&&e?.description&&e.description.valid});calculatePasswordStrength=G(()=>{let e=this.generalFormSignal()?.password??"";return this.#i.calculatePasswordStrength(e)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#n.exit(!0)}async copyPassword(){let t=this.generalForm.controls.password.value;await this.#o(t??""),this.copiedPassword.set(!0)}async#o(t){try{await navigator.clipboard.writeText(t)}catch{try{let n=document.createElement("textarea");n.value=t,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}catch(n){console.error("Failed to copy text: ",n)}}}generatePassword(){this.copiedPassword.set(!1);let t=this.#i.generate(16);this.generalForm.controls.password.setValue(t),this.generalForm.controls.repeatPassword.setValue(t),this.showCopyPassword.set(!0)}next(){this.#n.isNew()||this.#n.submit(!0),this.#e.navigate(["destination"],{relativeTo:this.#t.parent})}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=J({type:a,selectors:[["app-general"]],viewQuery:function(e,n){e&1&&ge(n.formRef,Lt,5),e&2&&Ee()},decls:21,vars:4,consts:()=>{let t;t=$localize`Your backup name`;let e;e=$localize`Your backup description`;let n;n=$localize`Remember to copy the password`;let i;i=$localize`General backup settings`;let o;o=$localize` Backup name ${"\uFFFD#8\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#8\uFFFD"}:CLOSE_SUPERSCRIPT:`;let r;r=$localize`Backup description`;let p;p=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON: Exit `;let h;h=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:lock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Encrypted backup `;let S;S=$localize`Encryption`;let w;w=$localize`Encryption`;let P;P=$localize`Password`;let $;$=$localize`Repeat password`;let K;K=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let v;v=$localize`${"\uFFFD*13:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: hide ${"\uFFFD/*13:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*14:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: show ${"\uFFFD/*14:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,v=Ue(v);let W;W=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Generate password `;let R;R=$localize`Passwords do not match`;let Z;Z=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,Z=Ue(Z);let _e;_e=$localize` Tip: Be sure to save your password. If you lose it, you will lose access to your backups. `;let ue;ue=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let ce;return ce=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],i,o,r,p,h,w,K,v,W,R,Z,_e,ue,ce,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],[1,"primary"],["for","backupName"],["type","text","tabindex","1","placeholder",t,"formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder",e,"formControlName","description"],[1,"form-actions"],["type","button","shButton","",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],["shButton","","type","submit","shTooltip",n,1,"raised","primary",3,"disabled"],["icon",""],["value","Key","label","DisplayName",3,"options","isClearable"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",S,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",P,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",$,"formControlName","repeatPassword",3,"type"],["error",""],[1,"password-actions"],["shButton","","type","button",1,"small",3,"click"],["shButton","","type","button",1,"small","copy"],["type","primary"],[1,"raised",3,"value"],["shButton","","type","button",1,"small","copy",3,"click"],[1,"sh-success"]]},template:function(e,n){if(e&1){let i=x();s(0,"form",15,0),F("submit",function(){return c(i),d(n.next())}),s(2,"h3",16),N(3,1),l(),A(4,It,3,0,"sh-alert",17),s(5,"sh-form-field")(6,"label",18),E(7,2),g(8,"sup"),m(),l(),g(9,"input",19),l(),s(10,"sh-form-field")(11,"label",20),N(12,3),l(),g(13,"textarea",21),l(),A(14,Kt,6,3),s(15,"div",22)(16,"button",23),F("click",function(){return c(i),d(n.exit())}),E(17,4),g(18,"sh-icon"),m(),l(),A(19,Wt,3,1,"button",24)(20,Xt,3,1,"button",25),l()()}if(e&2){let i;T("formGroup",n.generalForm),_(4),D(!n.isNew()&&((i=n.generalFormSignal())==null?null:i.encryption)!==""?4:-1),_(10),D(n.isNew()?14:-1),_(5),D(n.encryptionFieldSignal()===n.noneOptionKey||!n.isNew()?19:20)}},dependencies:[Re,fe,z,j,Ne,Pe,Ae,Y,le,se,q,ot,nt,at],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}sup[_ngcontent-%COMP%]{padding:0 .125rem;color:var(--error-8)}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.copy[_ngcontent-%COMP%] sh-icon.sh-success[_ngcontent-%COMP%]{color:var(--success-8)}"],changeDetection:0})};export{gt as a,pe as b,ze as c,ee as d,Ke as e,pt as f,Je as g,Q as h};
|
|
1
|
+
import{a as ut,c as ct,d as dt}from"./chunk-USYSNGYO.js";import{a as ye}from"./chunk-3NFAL4U4.js";import{a as rt,b as Ve,c as _t}from"./chunk-4VY6SMSL.js";import{b as re}from"./chunk-Z27IQRKV.js";import{a as lt}from"./chunk-LVTEOKA4.js";import{a as Oe}from"./chunk-XLDVUBTQ.js";import{b as ie,d as H}from"./chunk-ABYM5HWA.js";import{B as se,G as Y,K as ot,O as le,V as Me,X as at,b as Te,c as z,d as he,e as j,f as Ne,h as Qe,i as oe,j as fe,k as Ze,n as et,o as Pe,p as tt,q as Ae,r as De,s as ae,t as Re,u as q,w as nt,z as it}from"./chunk-QF4DQYEP.js";import{h as st}from"./chunk-2QJVTZ56.js";import{$b as u,Ab as $e,Bb as xe,Bc as Se,Cb as T,Db as s,Eb as l,Fb as g,H as we,Jb as B,Kb as k,Mb as x,Qc as G,Rc as ne,Sa as _,Tb as E,Ub as m,V as Ce,Vb as N,Vc as Be,Wc as ke,Xc as Fe,Yb as Ue,Zb as F,_ as O,cb as J,ea as c,fa as d,gc as ge,hb as je,hc as Ee,ic as be,kc as me,nc as U,oc as ve,pa as C,pc as Ye,sc as y,tc as L,ub as qe,uc as I,xb as A,yb as D,zb as Ge}from"./chunk-QONLYWYC.js";import{a as b,b as X}from"./chunk-EUDKD2JW.js";var Le=class a{fromString(t){if(!t)return null;let e=t.match(/(\d+)([smhDWMY])/);return e&&{value:parseInt(e[1]),unit:e[2]}}toString(t,e){return`${t}${e}`}static \u0275fac=function(e){return new(e||a)};static \u0275prov=Ce({token:a,factory:a.\u0275fac,providedIn:"root"})};function Et(a,t){if(a&1){let e=x();s(0,"div",24)(1,"sh-form-field")(2,"label",25),N(3,7),l(),s(4,"input",26,0),I("ngModelChange",function(i){c(e);let o=u();return L(o.scheduleFields.nextTime().time,i)||(o.scheduleFields.nextTime().time=i),d(i)}),F("focus",function(){c(e);let i=be(5);return d(i.showPicker())}),l(),s(6,"sh-icon",27),U(7,"clock"),l()(),s(8,"sh-form-field"),g(9,"label",28),s(10,"input",29,1),I("ngModelChange",function(i){c(e);let o=u();return L(o.scheduleFields.nextTime().date,i)||(o.scheduleFields.nextTime().date=i),d(i)}),F("focus",function(){c(e);let i=be(11);return d(i.showPicker())}),l(),s(12,"sh-icon",27),U(13,"calendar"),l()()(),s(14,"div",24)(15,"sh-form-field")(16,"label",30),N(17,8),l(),s(18,"input",31),I("ngModelChange",function(i){c(e);let o=u();return L(o.scheduleFields.runAgain().repeatValue,i)||(o.scheduleFields.runAgain().repeatValue=i),d(i)}),l()(),s(19,"sh-select",32)(20,"input",33),I("ngModelChange",function(i){c(e);let o=u();return L(o.scheduleFields.runAgain().repeatUnit,i)||(o.scheduleFields.runAgain().repeatUnit=i),d(i)}),l()()(),s(21,"app-toggle-card",34),B(22,35),N(23,9),k(),s(24,"div",36)(25,"sh-toggle",19),E(26,10),s(27,"input",20),I("ngModelChange",function(i){c(e);let o=u();return L(o.scheduleFields.runAgain().allowedDays.mon,i)||(o.scheduleFields.runAgain().allowedDays.mon=i),d(i)}),l(),m(),l(),s(28,"sh-toggle",19),E(29,11),s(30,"input",20),I("ngModelChange",function(i){c(e);let o=u();return L(o.scheduleFields.runAgain().allowedDays.tue,i)||(o.scheduleFields.runAgain().allowedDays.tue=i),d(i)}),l(),m(),l(),s(31,"sh-toggle",19),E(32,12),s(33,"input",20),I("ngModelChange",function(i){c(e);let o=u();return L(o.scheduleFields.runAgain().allowedDays.wed,i)||(o.scheduleFields.runAgain().allowedDays.wed=i),d(i)}),l(),m(),l(),s(34,"sh-toggle",19),E(35,13),s(36,"input",20),I("ngModelChange",function(i){c(e);let o=u();return L(o.scheduleFields.runAgain().allowedDays.thu,i)||(o.scheduleFields.runAgain().allowedDays.thu=i),d(i)}),l(),m(),l(),s(37,"sh-toggle",19),E(38,14),s(39,"input",20),I("ngModelChange",function(i){c(e);let o=u();return L(o.scheduleFields.runAgain().allowedDays.fri,i)||(o.scheduleFields.runAgain().allowedDays.fri=i),d(i)}),l(),m(),l(),s(40,"sh-toggle",19),E(41,15),s(42,"input",20),I("ngModelChange",function(i){c(e);let o=u();return L(o.scheduleFields.runAgain().allowedDays.sat,i)||(o.scheduleFields.runAgain().allowedDays.sat=i),d(i)}),l(),m(),l(),s(43,"sh-toggle",19),E(44,16),s(45,"input",20),I("ngModelChange",function(i){c(e);let o=u();return L(o.scheduleFields.runAgain().allowedDays.sun,i)||(o.scheduleFields.runAgain().allowedDays.sun=i),d(i)}),l(),m(),l()()()}if(a&2){let e=u();_(4),y("ngModel",e.scheduleFields.nextTime().time),_(6),y("ngModel",e.scheduleFields.nextTime().date),_(8),y("ngModel",e.scheduleFields.runAgain().repeatValue),_(),T("options",e.unitOptions)("isClearable",!1),_(),y("ngModel",e.scheduleFields.runAgain().repeatUnit),_(),T("disallowToggle",!0),_(6),y("ngModel",e.scheduleFields.runAgain().allowedDays.mon),_(3),y("ngModel",e.scheduleFields.runAgain().allowedDays.tue),_(3),y("ngModel",e.scheduleFields.runAgain().allowedDays.wed),_(3),y("ngModel",e.scheduleFields.runAgain().allowedDays.thu),_(3),y("ngModel",e.scheduleFields.runAgain().allowedDays.fri),_(3),y("ngModel",e.scheduleFields.runAgain().allowedDays.sat),_(3),y("ngModel",e.scheduleFields.runAgain().allowedDays.sun)}}var mt=[{key:"s",label:$localize`Seconds`},{key:"m",label:$localize`Minutes`},{key:"h",label:$localize`Hours`},{key:"D",label:$localize`Days`},{key:"W",label:$localize`Weeks`},{key:"M",label:$localize`Months`},{key:"Y",label:$localize`Years`}],ee={autoRun:!0,nextTime:{time:"13:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!1,tue:!1,wed:!1,thu:!1,fri:!1,sat:!1,sun:!1}}},Ke=class a{#e=O(Q);#t=O(H);#i=O(ie);unitOptions=mt;scheduleFields=this.#e.scheduleFields;goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#i.parent})}next(){this.#e.isNew()||this.#e.submit(!0),this.#t.navigate(["options"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=J({type:a,selectors:[["app-schedule"]],decls:16,vars:2,consts:()=>{let t;t=$localize`Schedule`;let e;e=$localize` Automatically run backups ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let n;n=$localize`If a date was missed, the job will run as soon as possible.`;let i;i=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let o;o=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let r;r=$localize`Next time`;let p;p=$localize`Run again every`;let h;h=$localize`Allowed days`;let S;S=$localize` Monday ${"\uFFFD#27\uFFFD\uFFFD/#27\uFFFD"}:TAG_INPUT:`;let w;w=$localize` Tuesday ${"\uFFFD#30\uFFFD\uFFFD/#30\uFFFD"}:TAG_INPUT:`;let P;P=$localize` Wednesday ${"\uFFFD#33\uFFFD\uFFFD/#33\uFFFD"}:TAG_INPUT:`;let $;$=$localize` Thursday ${"\uFFFD#36\uFFFD\uFFFD/#36\uFFFD"}:TAG_INPUT:`;let K;K=$localize` Friday ${"\uFFFD#39\uFFFD\uFFFD/#39\uFFFD"}:TAG_INPUT:`;let v;v=$localize` Saturday ${"\uFFFD#42\uFFFD\uFFFD/#42\uFFFD"}:TAG_INPUT:`;let W;return W=$localize` Sunday ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`,[["timeRef",""],["dateRef",""],t,e,n,i,o,r,p,h,S,w,P,$,K,v,W,[1,"title-30"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","",1,"raised","primary",3,"click"],[1,"row-inputs"],["for","time"],["type","time","id","time",3,"ngModelChange","focus","ngModel"],["suffix",""],["for","date"],["type","date","id","date",3,"ngModelChange","focus","ngModel"],["for","repeatValue"],["type","number","id","repeatValue",3,"ngModelChange","ngModel"],["value","key","label","label",3,"options","isClearable"],["type","text","id","repeatUnit",3,"ngModelChange","ngModel"],[3,"disallowToggle"],["title",""],[1,"days-wrap"]]},template:function(e,n){e&1&&(s(0,"h3",17),N(1,2),l(),s(2,"div",18)(3,"sh-toggle",19),E(4,3),s(5,"input",20),I("ngModelChange",function(o){return L(n.scheduleFields.autoRun,o)||(n.scheduleFields.autoRun=o),o}),l(),m(),l(),s(6,"p"),N(7,4),l()(),A(8,Et,46,14),s(9,"div",21)(10,"button",22),F("click",function(){return n.goBack()}),E(11,5),g(12,"sh-icon"),m(),l(),s(13,"button",23),F("click",function(){return n.next()}),E(14,6),g(15,"sh-icon"),m(),l()()),e&2&&(_(5),y("ngModel",n.scheduleFields.autoRun),_(3),D(n.scheduleFields.autoRun()?8:-1))},dependencies:[ae,z,Ze,Te,j,oe,Y,Me,q,se,le,ye],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem 2.5rem 1.5rem;display:flex;flex-direction:column;gap:1.5rem}.toggle-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.days-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};function St(a,t){if(a&1){let e=x();s(0,"sh-select",2)(1,"input",6),I("ngModelChange",function(i){c(e);let o=u();return L(o.internalPath,i)||(o.internalPath=i),d(i)}),F("ngModelChange",function(){c(e);let i=u();return d(i.updateFilter())}),l()()}if(a&2){let e=u();T("options",e.fileGroupOptions())("isClearable",!1)("selectMultiple",!0),_(),y("ngModel",e.internalPath)}}function Ft(a,t){if(a&1&&(B(0,7),U(1),k()),a&2){let e,n=u(2);_(),ve((e=n.currentExpressionOption())==null?null:e.startsWith)}}function Tt(a,t){if(a&1&&(B(0,8),U(1),k()),a&2){let e,n=u(2);_(),ve((e=n.currentExpressionOption())==null?null:e.endsWith)}}function ht(a,t){if(a&1){let e=x();s(0,"sh-form-field",3)(1,"input",6),I("ngModelChange",function(i){c(e);let o=u();return L(o.internalPath,i)||(o.internalPath=i),d(i)}),F("ngModelChange",function(){c(e);let i=u();return d(i.updateFilter())}),l(),A(2,Ft,2,1,"ng-container",7),A(3,Tt,2,1,"ng-container",8),l()}if(a&2){let e,n,i=u();_(),y("ngModel",i.internalPath),_(),D(!((e=i.currentExpressionOption())==null||e.startsWith==null)&&e.startsWith.length?2:-1),_(),D(!((n=i.currentExpressionOption())==null||n.endsWith==null)&&n.endsWith.length?3:-1)}}var Nt=[{key:"Applications",value:"Applications"},{key:"CacheFiles",value:"Cache Files"},{key:"TemporaryFiles",value:"Temporary Files"},{key:"OperatingSystem",value:"Operating System"},{key:"SystemFiles",value:"System Files"},{key:"DefaultExcludes",value:"Standard Excludes"}],ft=[{key:"Excludes folders where name contains",value:"-FolderName"},{key:"Excludes folder",value:"-Folder"},{key:"Excludes files where name contains",value:"-FileName"},{key:"Excludes file extension",value:"-Extension"},{key:"Excludes files where name matches regex",value:"-Regex"},{key:"Includes files where name matches regex",value:"+Regex"},{key:"Exclude file groups",value:"-FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"},{key:"None",value:"-Unknown"}],Ie=class a{path=ke.required();osType=ke();pathChange=Be();remove=Be();internalPath=C("");pathType=C("-Expression");currentExpressionOption=G(()=>{let t=this.pathType();return this.expressionOptions().find(e=>e.value===t)});fileGroupOptions=C(Nt);expressionOptions=G(()=>{let e=this.osType()==="Windows"?"\\":"/";return ft.map(n=>n.value==="-Folder"||n.value==="+Folder"?X(b({},n),{startsWith:"",endsWith:""}):n.value==="-FolderName"||n.value==="+FolderName"?X(b({},n),{startsWith:"*",endsWith:`*${e}`}):n.value==="-FileName"||n.value==="+FileName"?X(b({},n),{startsWith:"[.*",endsWith:`[^\\${e}]*]`}):n.value==="-FileGroup"||n.value==="+FileGroup"?X(b({},n),{startsWith:"{",endsWith:"}"}):n.value==="-Regex"||n.value==="+Regex"?X(b({},n),{startsWith:"[",endsWith:"]"}):n.value==="-Extension"||n.value==="+Extension"?X(b({},n),{startsWith:"*.",endsWith:""}):X(b({},n),{startsWith:"",endsWith:""}))});pathEffect=ne(()=>{let t=this.path(),e=t.slice(1),n=t.startsWith("-")?"-":"+",i=this.osType()==="Windows",o=i?"\\":"/";e.startsWith("%")&&e.endsWith(o)||i&&e.slice(2).startsWith(o)&&e.endsWith(o)||e.startsWith(o)&&e.endsWith(o)?(this.pathType.set(`${n}Folder`),this.internalPath.set(e)):e.startsWith("*")&&e.endsWith(`*${o}`)?(this.pathType.set(`${n}FolderName`),this.internalPath.set(e.slice(1,-2))):e.startsWith("[.*")&&e.endsWith(`[^\\${o}]*]`)?(this.pathType.set(`${n}FileName`),this.internalPath.set(e.slice(3,-7))):e.startsWith("{")&&e.endsWith("}")?(this.pathType.set(`${n}FileGroup`),this.internalPath.set(e.slice(1,-1))):e.startsWith("[")&&e.endsWith("]")?(this.pathType.set(`${n}Regex`),this.internalPath.set(e.slice(1,-1))):e.startsWith("*.")?(this.pathType.set(`${n}Extension`),this.internalPath.set(e.slice(2))):(this.pathType.set(`${n}Expression`),this.internalPath.set(e))});updateFilter(){let t=this.internalPath(),e=this.currentExpressionOption();t!==""&&this.pathChange.emit(`${e?.value.slice(0,1)}${e?.startsWith??""}${t}${e?.endsWith??""}`)}removeFilter(){this.remove.emit()}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=J({type:a,selectors:[["app-new-filter"]],inputs:{path:[1,"path"],osType:[1,"osType"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:7,vars:4,consts:()=>{let t;return t=$localize`Select an option...`,[["value","value","label","key",3,"options","isClearable"],["type","text","placeholder",t,3,"ngModelChange","ngModel"],["value","key","label","value",1,"expression-input",3,"options","isClearable","selectMultiple"],[1,"expression-input"],[1,"filter-removal",3,"click"],[1,"sh-primary"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],["suffix",""]]},template:function(e,n){if(e&1&&(s(0,"sh-select",0)(1,"input",1),I("ngModelChange",function(o){return L(n.pathType,o)||(n.pathType=o),o}),F("ngModelChange",function(){return n.updateFilter()}),l()(),A(2,St,2,4,"sh-select",2)(3,ht,4,3,"sh-form-field",3),s(4,"div",4),F("click",function(){return n.removeFilter()}),s(5,"sh-icon",5),U(6,"x-circle"),l()()),e&2){let i;T("options",n.expressionOptions())("isClearable",!1),_(),y("ngModel",n.pathType),_(),D(((i=n.currentExpressionOption())==null?null:i.value)=="-FileGroup"||((i=n.currentExpressionOption())==null?null:i.value)=="+FileGroup"?2:3)}},dependencies:[ae,z,j,oe,le,Y,q],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:13.125rem 1fr 1.875rem;gap:.5rem;align-items:flex-end}.expression-input[_ngcontent-%COMP%]{--ff-suffix-bg: var(--base-2)}.filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"],changeDetection:0})};var Pt=["formRef"],He=()=>({standalone:!0});function At(a,t){if(a&1){let e=x();s(0,"sh-form-field",41)(1,"input",42),I("ngModelChange",function(i){c(e);let o=u(2);return L(o.editingPath,i)||(o.editingPath=i),d(i)}),l()(),s(2,"button",43),F("click",function(){c(e);let i=u(2);return d(i.updatePath())}),s(3,"sh-icon"),U(4,"floppy-disk"),l()(),s(5,"button",43),F("click",function(){c(e);let i=u(2);return d(i.cancelEditPath())}),s(6,"sh-icon"),U(7,"x-bold"),l()()}if(a&2){let e=u(2);_(),y("ngModel",e.editingPath),T("ngModelOptions",Se(2,He))}}function Dt(a,t){if(a&1){let e=x();s(0,"sh-form-field",41),g(1,"input",44),l(),s(2,"button",43),F("click",function(){c(e);let i=u().$implicit,o=u();return d(o.editPath(i))}),s(3,"sh-icon"),U(4,"pen"),l()(),s(5,"button",43),F("click",function(){c(e);let i=u().$implicit,o=u();return d(o.removePath(i))}),s(6,"sh-icon"),U(7,"trash-simple"),l()()}if(a&2){let e=u().$implicit;qe("readonly",!0),_(),T("ngModel",e)("ngModelOptions",Se(3,He))}}function Rt(a,t){if(a&1&&(s(0,"div",30),A(1,At,8,3)(2,Dt,8,4),l()),a&2){let e=t.$implicit,n=u();_(),D(n.oldPath()===e?1:2)}}function Mt(a,t){if(a&1){let e=x();s(0,"app-new-filter",46),F("pathChange",function(i){let o=c(e).$index,r=u(2);return d(r.patchPathAt(i,o))})("remove",function(){let i=c(e).$index,o=u(2);return d(o.removePathAt(i))}),l()}if(a&2){let e=t.$implicit,n=u(2);T("path",e)("osType",n.osType()??"")}}function Ot(a,t){if(a&1&&$e(0,Mt,1,2,"app-new-filter",45,Ge),a&2){let e=u();xe(e.pathArray())}}function yt(a,t){if(a&1){let e=x();s(0,"div",31)(1,"app-size",47),F("ngModelChange",function(i){c(e);let o=u();return d(o.updateFilesLargerThan(i))}),l()()}if(a&2){let e=u();_(),T("ngModel",e.filesLargerThan())("ngModelOptions",Se(2,He))}}var V=new De,pt=(a={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>V.group({path:V.control(a.path),excludes:V.group({hidden:V.control(a.excludes.hidden),system:V.control(a.excludes.system),temporary:V.control(a.excludes.temporary),filesLargerThan:V.group({size:V.control(null),unit:V.control(null)})})}),Je=class a{#e=O(Q);#t=O(H);#i=O(ie);formRef=Fe.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new Qe("");filesLargerThan=G(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);osType=this.#e.osType;pathSignal=re(this.sourceDataForm.controls.path.valueChanges);pathArray=G(()=>this.pathSignal()?.split("\0").filter(t=>t.startsWith("-")||t.startsWith("+")||t==="___none___")??[]);nonFilterPaths=G(()=>this.pathSignal()?.split("\0").filter(t=>!t.startsWith("-")&&!t.startsWith("+")&&t!==""));oldPath=C(null);editingPath=C(null);addingNewPath=C(!1);editPath(t){this.oldPath.set(t),this.editingPath.set(t)}updateFilesLargerThan(t){let{size:e,unit:n}=ct(t);this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:e,unit:n})}updatePath(){let t=this.oldPath(),e=this.editingPath();if(!t||!e||e===t){this.oldPath.set(null),this.editingPath.set(null);return}let n=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(n?.replace(t,e)??""),this.oldPath.set(null),this.editingPath.set(null)}cancelEditPath(){this.oldPath.set(null),this.editingPath.set(null)}removePath(t){let n=(this.sourceDataForm.controls.path.value??"").split("\0"),i=n.indexOf(t);if(i===-1)return;n.splice(i,1);let o=n.filter(r=>r&&r!=="").join("\0");this.sourceDataForm.controls.path.setValue(o)}addFilter(t="-*"){let n=[this.sourceDataForm.controls.path.value,t].filter(i=>i&&i!=="").join("\0");this.sourceDataForm.controls.path.setValue(n)}patchPathAt(t,e){let i=this.sourceDataForm.controls.path.value.split("\0").filter(p=>!p.startsWith("-")&&!p.startsWith("+")).join("\0"),o=this.pathArray().map((p,h)=>h===e?`${t}`:`${p}`).join("\0"),r=[i,o].filter(p=>p&&p!=="").join("\0");this.sourceDataForm.controls.path.setValue(r)}removePathAt(t){let n=this.sourceDataForm.controls.path.value.split("\0").filter(r=>!r.startsWith("-")&&!r.startsWith("+")).join("\0"),i=this.pathArray().filter((r,p)=>p!==t).join("\0"),o=[n,i].filter(r=>r&&r!=="").join("\0");this.sourceDataForm.controls.path.setValue(o)}getPath(){return this.sourceDataForm.value.path??null}toggleFilesLargerThan(){this.sourceDataForm.controls.excludes.value.filesLargerThan?.size===null?this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:50,unit:"MB"}):this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:null,unit:null})}addNewPath(){let t=this.sourceDataForm.controls.path.value,e=this.newPathCtrl.value,n=t?.split("\0")||[];e&&!n.includes(e)&&n.push(e);let i=n.filter(o=>o&&o!=="").join("\0");this.sourceDataForm.controls.path.setValue(i),this.newPathCtrl.setValue("")}goBack(){this.#t.navigate(["destination"],{relativeTo:this.#i.parent})}next(){this.#e.isNew()||this.#e.submit(!0),this.#t.navigate(["schedule"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=J({type:a,selectors:[["app-source-data"]],viewQuery:function(e,n){e&1&&ge(n.formRef,Pt,5),e&2&&Ee()},decls:56,vars:12,consts:()=>{let t;t=$localize`Path`;let e;e=$localize`Add a direct path`;let n;n=$localize`Hidden files`;let i;i=$localize`System files`;let o;o=$localize`Temporary files`;let r;r=$localize`Source Data`;let p;p=$localize`Folder path`;let h;h=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let S;S=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let w;w=$localize`Paths`;let P;P=$localize`Add a path directly from your machine.`;let $;$=$localize`Filters`;let K;K=$localize`Customize your filters.`;let v;v=$localize`Add filter`;let W;W=$localize`Exclude`;let R;R=$localize`Choose if there’s any files you want to exclude.`;let Z;Z=$localize` Files with the Hidden attribute ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`;let _e;_e=$localize` Files with the System attribute ${"\uFFFD#49\uFFFD\uFFFD/#49\uFFFD"}:TAG_INPUT:`;let ue;ue=$localize` Files with the Temporary attribute ${"\uFFFD#52\uFFFD\uFFFD/#52\uFFFD"}:TAG_INPUT:`;let ce;ce=$localize` Files larger than `;let f;return f=$localize`Edit path`,[["formRef",""],r,p,h,S,w,P,$,K,v,W,R,Z,_e,ue,ce,[3,"submit","formGroup"],[1,"left"],[1,"title-30"],[1,"fill",3,"multiSelect","startingPath","showFiles"],["for","path"],["type","text","id","path","tabindex","4","placeholder",t,"formControlName","path"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],[1,"right"],[3,"disallowToggle"],["title",""],["description",""],[1,"paths"],[1,"path"],[1,"row-inputs"],["type","text","placeholder",e,3,"formControl"],["shButton","","type","button",1,"raised","primary",3,"click"],["type","button","shButton","","action","",3,"click"],["formGroupName","excludes",3,"disallowToggle"],[1,"raised","primary"],["type","checkbox","placeholder",n,"formControlName","hidden"],["type","checkbox","placeholder",i,"formControlName","system"],["type","checkbox","placeholder",o,"formControlName","temporary"],[1,"raised","primary",3,"click"],[1,"small"],["type","text","placeholder",f,3,"ngModelChange","ngModel","ngModelOptions"],["shButton","","type","button",1,"small",3,"click"],["type","text",3,"ngModel","ngModelOptions"],[3,"path","osType"],[3,"pathChange","remove","path","osType"],[3,"ngModelChange","ngModel","ngModelOptions"]]},template:function(e,n){if(e&1){let i=x();s(0,"form",16,0),F("submit",function(){return c(i),d(n.next())}),s(2,"div",17)(3,"h3",18),N(4,1),l(),s(5,"app-file-tree",19)(6,"label",20),N(7,2),l(),g(8,"input",21),l(),s(9,"div",22)(10,"button",23),F("click",function(){return c(i),d(n.goBack())}),E(11,3),g(12,"sh-icon"),m(),l(),s(13,"button",24),E(14,4),g(15,"sh-icon"),m(),l()()(),s(16,"div",25)(17,"app-toggle-card",26),B(18,27),N(19,5),k(),s(20,"p",28),N(21,6),l(),s(22,"div",29),$e(23,Rt,3,1,"div",30,Ge),s(25,"div",31)(26,"sh-form-field"),g(27,"input",32),l(),s(28,"button",33),F("click",function(){return c(i),d(n.addNewPath())}),s(29,"sh-icon"),U(30,"plus"),l()()()()(),s(31,"app-toggle-card",26),B(32,27),N(33,7),k(),s(34,"p",28),N(35,8),l(),s(36,"button",34),F("click",function(){return c(i),d(n.addFilter())}),N(37,9),l(),A(38,Ot,2,0),l(),s(39,"app-toggle-card",35),B(40,27),N(41,10),k(),s(42,"p",28),N(43,11),l(),s(44,"sh-toggle",36),E(45,12),g(46,"input",37),m(),l(),s(47,"sh-toggle",36),E(48,13),g(49,"input",38),m(),l(),s(50,"sh-toggle",36),E(51,14),g(52,"input",39),m(),l(),s(53,"sh-toggle",40),F("click",function(){return c(i),d(n.toggleFilesLargerThan())}),N(54,15),l(),A(55,yt,2,3,"div",31),l()()()}if(e&2){let i;T("formGroup",n.sourceDataForm),_(5),T("multiSelect",!0)("startingPath",n.getPath())("showFiles",!0),_(12),T("disallowToggle",!0),_(6),xe(n.nonFilterPaths()),_(4),T("formControl",n.newPathCtrl),_(4),T("disallowToggle",!0),_(7),D((i=n.pathSignal())!=null&&i.length?38:-1),_(),T("disallowToggle",!0),_(14),me("active",n.filesLargerThan()),_(2),D(n.filesLargerThan()?55:-1)}},dependencies:[ae,fe,z,Te,j,Ne,oe,Re,et,Pe,Ae,tt,Y,q,se,Me,Ie,ut,ye,dt],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;width:100%;flex:1 0;overflow:hidden}form[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;flex:1 0;overflow:hidden}.right[_ngcontent-%COMP%], .left[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:1.5rem}.left[_ngcontent-%COMP%]{padding:2.5rem;overflow:hidden;border-right:1px solid var(--base-4)}.right[_ngcontent-%COMP%]{padding:2.5rem 1.5rem;overflow:auto}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}sh-divider[_ngcontent-%COMP%]{margin:.75rem 0}.row-inputs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content;gap:.25rem}.paths[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.path[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:1fr min-content min-content;gap:.25rem}"],changeDetection:0})};var Ct="1W:1D,4W:1W,12M:1M",Q=class a{#e=O(H);#t=O(Oe);#i=O(it);#n=O(st);#a=O(Le);generalForm=gt();sourceDataForm=pt();scheduleFields={autoRun:C(ee.autoRun),nextTime:C(ee.nextTime),runAgain:C(ee.runAgain)};settings=C([]);optionsFields={remoteVolumeSize:C("50MB"),backupRetention:C("all"),backupRetentionTime:C(""),backupRetentionVersions:C(0),backupRetentionCustom:C("")};targetUrlModel=C(null);backupMetadata=C(null);isDraft=C(!1);backupId=C(null);backupName=G(()=>this.generalFormSignal()?.name??"");isSubmitting=C(!1);finishedLoading=C(!1);backupDefaults=C(null);applicationOptions=C(null);isNew=G(()=>this.backupId()==="new");osType=G(()=>this.#t.systemInfo()?.OSType);selectedOptions=C([]);sourceDataFormSignal=re(this.sourceDataForm.valueChanges);generalFormSignal=re(this.generalForm.valueChanges);encryptionFieldSignal=re(this.generalForm.controls.encryption.valueChanges);advancedOptions=G(()=>this.#t.systemInfo()?.Options?.map(this.#_)??[]);#o=C("");#s=C(null);#l=null;testSignal=this.#o.asReadonly();testErrorMessage=this.#s.asReadonly();#d=ne(()=>{let t=this.targetUrlModel(),e=this.#o(),n=this.#l;this.#l=t,!(e==="testing"||n===null||n===t)&&(this.#o.set(""),this.#s.set(null))});setTestState(t,e){this.#o.set(t),this.#s.set(e??null)}#_(t){return{name:t.Name,type:t.Type,shortDescription:t.ShortDescription??void 0,longDescription:t.LongDescription??void 0,options:t.ValidValues}}encryptionOptions=G(()=>{let t=this.#t.systemInfo()?.EncryptionModules??[];return[pe,...t]});nonSelectedOptions=G(()=>this.advancedOptions().sort((t,e)=>t?.name&&e?.name?t?.name.localeCompare(e?.name):0).filter(t=>this.selectedOptions()?.findIndex(e=>e.name===t.name)===-1));submit(t=!1){this.isSubmitting.set(!0);let e=this.#u(),n=this.backupId();this.isDraft()&&e.Backup&&(e.Backup.Metadata=this.backupMetadata()),n==="new"||!n||this.isDraft()?this.#n.postApiV1Backups({requestBody:e}).pipe(we(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{t||this.exit(!1)},error:()=>{}}):this.#n.putApiV1BackupById({id:n,requestBody:e}).pipe(we(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{t||this.exit(!1)},error:()=>{}})}exit(t){if(!t){this.#r(),this.#e.navigate(["/"]);return}this.#i.open(lt,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:e=>{e&&(this.#r(),this.#e.navigate(["/"]))}})}mapSourceDataToForm(t){let e=t.Sources??"",n=t.Filters?.map(p=>`${p.Include?"":"-"}${p.Expression}`)??[],i=t.Settings?.find(p=>p.Name==="--exclude-files-attributes")?.Value??"",o=t.Settings?.find(p=>p.Name==="--skip-files-larger-than")??null,r={path:[...e,...n].join("\0"),excludes:{hiddenFiles:i.includes("hidden"),systemFiles:i.includes("system"),tempFiles:i.includes("temporary"),filesLargerThan:o?.Value?.toUpperCase()??null}};this.sourceDataForm.patchValue(r)}mapDestinationToForm(t){this.targetUrlModel.set(t.TargetURL??"")}mapGeneralToForm(t){let e=t.Name??"",n=t.Description??"",i=t.Settings?.find(S=>S.Name==="encryption-module"),o=t.Settings?.find(S=>S.Name==="passphrase")?.Value??"",r=i?.Value&&i.Value.length?i.Value:"",p=t.Settings?.find(S=>S.Name==="compression-module")?.Value??"",h={name:t.Name??"",description:t.Description??""};e&&e!==""&&(h.name=e),n&&n!==""&&(h.description=n),r&&r!==""&&(h.encryption=r),o&&o!==""&&(h.password=o,h.repeatPassword=o),p&&p!==""&&(h.compression=p),this.generalForm.patchValue(h)}mapScheduleToForm(t){if(!t){this.scheduleFields.autoRun.set(!1);return}let e=this.#a.fromString(t.Repeat)??null,n=this.#c(t.Time);this.scheduleFields.autoRun.set(!0),this.scheduleFields.nextTime.update(i=>b(b({},i),n)),this.scheduleFields.runAgain.set({repeatValue:e?.value??1,repeatUnit:e?.unit??"D",allowedDays:{mon:t.AllowedDays?.includes("mon")??!1,tue:t.AllowedDays?.includes("tue")??!1,wed:t.AllowedDays?.includes("wed")??!1,thu:t.AllowedDays?.includes("thu")??!1,fri:t.AllowedDays?.includes("fri")??!1,sat:t.AllowedDays?.includes("sat")??!1,sun:t.AllowedDays?.includes("sun")??!1}})}mapOptionsToForms(t){let e=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","dblock-size","passphrase","keep-time","keep-versions","retention-policy"],n=t.Settings?.filter(r=>!e.includes(r.Name)),i=t.Settings?.filter(r=>e.includes(r.Name));this.settings.set(n??[]),n?.forEach(r=>{if(r.Name==="encryption-module"&&this.isNew())return this.generalForm.controls.encryption.setValue(r.Value??"")});var o="all";i?.forEach(r=>{if(r.Name==="dblock-size"&&this.optionsFields.remoteVolumeSize.set(r.Value??"50MB"),r.Name==="keep-time"&&(r.Value??"")!=="")return o="time",this.optionsFields.backupRetentionTime.set(r.Value??"");if(r.Name==="keep-versions"&&(r.Value??"")!=="")return o="versions",this.optionsFields.backupRetentionVersions.set(r.Value?parseInt(r.Value):null);if(r.Name==="retention-policy"&&(r.Value??"")!=="")if(r.Value===Ct)o="smart";else return o="custom",this.optionsFields.backupRetentionCustom.set(r.Value??"")}),this.optionsFields.backupRetention.set(o)}storeMetadata(t,e){this.backupMetadata.set(e?t.Metadata??null:null)}getScheduleFormValue(){return{autoRun:this.scheduleFields.autoRun(),nextTime:this.scheduleFields.nextTime(),runAgain:this.scheduleFields.runAgain()}}#u(){let t=this.generalForm.value,e=this.getScheduleFormValue(),n=this.sourceDataForm.value,i=this.targetUrlModel(),o=null;e.runAgain?.repeatUnit&&e.runAgain?.repeatValue&&(o=this.#a.toString(e.runAgain.repeatValue,e.runAgain.repeatUnit));let r=e.runAgain?.allowedDays?Object.entries(e.runAgain?.allowedDays).filter(([P,$])=>$).map(([P,$])=>P):[],p=n.path?.split("\0")??[],h=this.mapFormsToSettings(),S=Object.entries(n.excludes??{}).filter(([P,$])=>$&&P!=="filesLargerThan").map(([P])=>P),w=n.excludes?.filesLargerThan;return S.length&&h.push({Name:"--exclude-files-attributes",Value:S.join(",")}),w&&w.size!==null&&w.unit!==null&&h.push({Name:"--skip-files-larger-than",Value:`${w.size}${w.unit}`}),{Backup:{Name:t.name,Description:t.description,TargetURL:i??null,Sources:p.filter(P=>!P.startsWith("-")),Settings:h,Filters:p.filter(P=>P.startsWith("-")).map((P,$)=>({Order:$,Include:!1,Expression:P.slice(1)}))},Schedule:e.autoRun?{Repeat:o,Time:e.nextTime?.date?new Date(`${e.nextTime.date}T${e.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:r}:null}}mapFormsToSettings(t=[]){let e=this.generalForm.value,n=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","encryption-module","passphrase","keep-time","keep-versions","retention-policy","dblock-size","compression-module"],i=[{Name:"--no-encryption",Value:"True"}];e.encryption!==""&&e.encryption!==pe.Key&&(i=[{Name:"encryption-module",Value:e.encryption??null},{Name:"passphrase",Value:e.password??null}]);let o=[{Name:"compression-module",Value:e.compression}];e.compression===""&&(o=[]);let r=[{Name:"dblock-size",Value:this.optionsFields.remoteVolumeSize()}];switch(this.optionsFields.backupRetention()){case"time":r.push({Name:"keep-time",Value:this.optionsFields.backupRetentionTime()});break;case"versions":r.push({Name:"keep-versions",Value:this.optionsFields.backupRetentionVersions()?.toString()??""});break;case"custom":r.push({Name:"retention-policy",Value:this.optionsFields.backupRetentionCustom()});break;case"smart":r.push({Name:"retention-policy",Value:Ct});break}let p=[...t,...n],h=this.settings().filter(S=>!p.includes(S.Name)).map(S=>{let w=S.Value;return typeof S.Value=="number"&&(w=S.Value.toString()),typeof S.Value=="boolean"&&(w=S.Value?"True":"False"),{Name:S.Name?.startsWith("--")?S.Name:`--${S.Name}`,Value:w}});return[...i,...o,...r,...h]}#c(t){if(!t||t?.indexOf("T")===-1)return{time:t??"13:00"};let e=new Date(t);return{time:`${(""+e.getHours()).padStart(2,"0")}:${(""+e.getMinutes()).padStart(2,"0")}`,date:e.toISOString().split("T")[0]}}setTargetUrl(t,e=!1){e&&(this.#l=null),this.targetUrlModel.set(t)}#r(){this.generalForm.reset(),this.sourceDataForm.reset(),this.scheduleFields.autoRun.set(ee.autoRun),this.scheduleFields.nextTime.set(ee.nextTime),this.scheduleFields.runAgain.set(ee.runAgain),this.optionsFields.remoteVolumeSize.set("50MB"),this.optionsFields.backupRetention.set("all"),this.settings.set([]),this.targetUrlModel.set(null)}static \u0275fac=function(e){return new(e||a)};static \u0275prov=Ce({token:a,factory:a.\u0275fac,providedIn:"root"})};var Lt=["formRef"];function It(a,t){a&1&&(s(0,"sh-alert",17),E(1,5),g(2,"sh-icon",26),m(),l())}function wt(a,t){if(a&1&&U(0),a&2){let e=t.$implicit;Ye(" ",e.DisplayName," ")}}function Gt(a,t){if(a&1&&g(0,"sh-progress-bar",40),a&2){let e=u(3);me("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),T("value",e.calculatePasswordStrength()*(100/5))}}function $t(a,t){a&1&&(s(0,"span",35),N(1,10),l())}function xt(a,t){a&1&&(E(0,8,1),g(1,"sh-icon"),m())}function Ut(a,t){a&1&&(E(0,8,2),g(1,"sh-icon"),m())}function bt(a,t){a&1&&(E(0,11,1),g(1,"sh-icon",42),m())}function vt(a,t){a&1&&(E(0,11,2),g(1,"sh-icon"),m())}function Bt(a,t){if(a&1){let e=x();s(0,"button",41),F("click",function(){c(e);let i=u(3);return d(i.copyPassword())}),E(1,11),A(2,bt,2,0)(3,vt,2,0),m(),l()}if(a&2){let e=u(3);_(2),D(e.copiedPassword()?2:3)}}function kt(a,t){a&1&&(s(0,"sh-alert",39),N(1,12),l())}function Vt(a,t){if(a&1){let e=x();s(0,"div",30)(1,"sh-form-field")(2,"label",31),E(3,7),g(4,"sup"),m(),l(),g(5,"input",32),l(),A(6,Gt,1,9,"sh-progress-bar",33),s(7,"sh-form-field"),g(8,"input",34),A(9,$t,2,0,"span",35),l(),s(10,"div",36)(11,"button",37),F("click",function(){c(e);let i=u(2);return d(i.showPassword.set(!i.showPassword()))}),E(12,8),A(13,xt,2,0)(14,Ut,2,0),m(),l(),s(15,"button",37),F("click",function(){c(e);let i=u(2);return d(i.generatePassword())}),E(16,9),g(17,"sh-icon"),m(),l(),A(18,Bt,4,1,"button",38),l(),A(19,kt,2,0,"sh-alert",39),l()}if(a&2){let e=u(2);_(5),T("type",e.showPassword()?"text":"password"),_(),D(e.generalForm.value.password?6:-1),_(2),T("type",e.showPassword()?"text":"password"),_(),D(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?9:-1),_(4),D(e.showPassword()?13:14),_(5),D(e.showCopyPassword()?18:-1),_(),D(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?19:-1)}}function Kt(a,t){if(a&1&&(s(0,"sh-select",27)(1,"label",28),N(2,6),l(),g(3,"input",29),je(4,wt,1,1,"ng-template"),l(),A(5,Vt,20,7,"div",30)),a&2){let e=u();T("options",e.encryptionOptions())("isClearable",!1),_(5),D(e.encryptionFieldSignal()!==e.noneOptionKey?5:-1)}}function Wt(a,t){if(a&1&&(s(0,"button",24),E(1,13),g(2,"sh-icon"),m(),l()),a&2){let e=u();T("disabled",e.nameAndDescriptionValid()===!1)}}function Xt(a,t){if(a&1&&(s(0,"button",25),E(1,14),g(2,"sh-icon"),m(),l()),a&2){let e=u();T("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var te=new De,gt=(a={name:"",description:"",encryption:"",password:"",repeatPassword:"",compression:""})=>te.group({name:te.control(a.name,[he.required]),description:te.control(a.description),encryption:te.control(a.encryption,[_t()]),password:te.control(a.password,[Ve(t=>t?.value.encryption!=="",[he.required])]),repeatPassword:te.control(a.repeatPassword,[Ve(t=>t?.value.encryption!=="",[he.required])]),compression:te.control(a.compression)}),pe={Key:"-",DisplayName:"None"},ze=class a{#e=O(H);#t=O(ie);#i=O(rt);#n=O(Q);#a=O(Oe);formRef=Fe.required("formRef");generalForm=this.#n.generalForm;generalFormSignal=this.#n.generalFormSignal;encryptionFieldSignal=this.#n.encryptionFieldSignal;encryptionOptions=this.#n.encryptionOptions;isNew=this.#n.isNew;showPassword=C(!1);copiedPassword=C(!1);showCopyPassword=C(!1);noneOptionKey=pe.Key;encryptionEffect=ne(()=>{this.encryptionFieldSignal()===pe.Key&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});nameAndDescriptionValid=G(()=>{let t=this.generalFormSignal(),e=this.generalForm.controls;return e?.name&&e.name.valid&&e?.description&&e.description.valid});calculatePasswordStrength=G(()=>{let e=this.generalFormSignal()?.password??"";return this.#i.calculatePasswordStrength(e)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#n.exit(!0)}async copyPassword(){let t=this.generalForm.controls.password.value;await this.#o(t??""),this.copiedPassword.set(!0)}async#o(t){try{await navigator.clipboard.writeText(t)}catch{try{let n=document.createElement("textarea");n.value=t,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}catch(n){console.error("Failed to copy text: ",n)}}}generatePassword(){this.copiedPassword.set(!1);let t=this.#i.generate(16);this.generalForm.controls.password.setValue(t),this.generalForm.controls.repeatPassword.setValue(t),this.showCopyPassword.set(!0)}next(){this.#n.isNew()||this.#n.submit(!0),this.#e.navigate(["destination"],{relativeTo:this.#t.parent})}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=J({type:a,selectors:[["app-general"]],viewQuery:function(e,n){e&1&&ge(n.formRef,Lt,5),e&2&&Ee()},decls:21,vars:4,consts:()=>{let t;t=$localize`Your backup name`;let e;e=$localize`Your backup description`;let n;n=$localize`Remember to copy the password`;let i;i=$localize`General backup settings`;let o;o=$localize` Backup name ${"\uFFFD#8\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#8\uFFFD"}:CLOSE_SUPERSCRIPT:`;let r;r=$localize`Backup description`;let p;p=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON: Exit `;let h;h=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:lock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Encrypted backup `;let S;S=$localize`Encryption`;let w;w=$localize`Encryption`;let P;P=$localize`Password`;let $;$=$localize`Repeat password`;let K;K=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let v;v=$localize`${"\uFFFD*13:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: hide ${"\uFFFD/*13:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*14:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: show ${"\uFFFD/*14:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,v=Ue(v);let W;W=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Generate password `;let R;R=$localize`Passwords do not match`;let Z;Z=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,Z=Ue(Z);let _e;_e=$localize` Tip: Be sure to save your password. If you lose it, you will lose access to your backups. `;let ue;ue=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let ce;return ce=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],i,o,r,p,h,w,K,v,W,R,Z,_e,ue,ce,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],[1,"primary"],["for","backupName"],["type","text","tabindex","1","placeholder",t,"formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder",e,"formControlName","description"],[1,"form-actions"],["type","button","shButton","",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],["shButton","","type","submit","shTooltip",n,1,"raised","primary",3,"disabled"],["icon",""],["value","Key","label","DisplayName",3,"options","isClearable"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",S,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",P,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",$,"formControlName","repeatPassword",3,"type"],["error",""],[1,"password-actions"],["shButton","","type","button",1,"small",3,"click"],["shButton","","type","button",1,"small","copy"],["type","primary"],[1,"raised",3,"value"],["shButton","","type","button",1,"small","copy",3,"click"],[1,"sh-success"]]},template:function(e,n){if(e&1){let i=x();s(0,"form",15,0),F("submit",function(){return c(i),d(n.next())}),s(2,"h3",16),N(3,1),l(),A(4,It,3,0,"sh-alert",17),s(5,"sh-form-field")(6,"label",18),E(7,2),g(8,"sup"),m(),l(),g(9,"input",19),l(),s(10,"sh-form-field")(11,"label",20),N(12,3),l(),g(13,"textarea",21),l(),A(14,Kt,6,3),s(15,"div",22)(16,"button",23),F("click",function(){return c(i),d(n.exit())}),E(17,4),g(18,"sh-icon"),m(),l(),A(19,Wt,3,1,"button",24)(20,Xt,3,1,"button",25),l()()}if(e&2){let i;T("formGroup",n.generalForm),_(4),D(!n.isNew()&&((i=n.generalFormSignal())==null?null:i.encryption)!==""?4:-1),_(10),D(n.isNew()?14:-1),_(5),D(n.encryptionFieldSignal()===n.noneOptionKey||!n.isNew()?19:20)}},dependencies:[Re,fe,z,j,Ne,Pe,Ae,Y,le,se,q,ot,nt,at],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}sup[_ngcontent-%COMP%]{padding:0 .125rem;color:var(--error-8)}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.copy[_ngcontent-%COMP%] sh-icon.sh-success[_ngcontent-%COMP%]{color:var(--success-8)}"],changeDetection:0})};export{gt as a,pe as b,ze as c,ee as d,Ke as e,pt as f,Je as g,Q as h};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as De,b as we}from"./chunk-FPPZ4BUR.js";import{$ as Be,B as ae,C as Te,H as ve,P as $,S as w,V,Y as S,Z as R,_ as T,ba as
|
|
2
|
-
`).forEach(t=>{let r=t.indexOf(":");if(r>0){let o=t.slice(0,r),n=t.slice(r+1).trim();this.addHeaderEntry(o,n)}})}:typeof Headers<"u"&&e instanceof Headers?(this.headers=new Map,e.forEach((t,r)=>{this.addHeaderEntry(r,t)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(e).forEach(([t,r])=>{this.setHeaderEntries(t,r)})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();let t=this.headers.get(e.toLowerCase());return t&&t.length>0?t[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,t){return this.clone({name:e,value:t,op:"a"})}set(e,t){return this.clone({name:e,value:t,op:"s"})}delete(e,t){return this.clone({name:e,value:t,op:"d"})}maybeSetNormalizedName(e,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,e)}init(){this.lazyInit&&(this.lazyInit instanceof s?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(e=>this.applyUpdate(e)),this.lazyUpdate=null))}copyFrom(e){e.init(),Array.from(e.headers.keys()).forEach(t=>{this.headers.set(t,e.headers.get(t)),this.normalizedNames.set(t,e.normalizedNames.get(t))})}clone(e){let t=new s;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof s?this.lazyInit:this,t.lazyUpdate=(this.lazyUpdate||[]).concat([e]),t}applyUpdate(e){let t=e.name.toLowerCase();switch(e.op){case"a":case"s":let r=e.value;if(typeof r=="string"&&(r=[r]),r.length===0)return;this.maybeSetNormalizedName(e.name,t);let o=(e.op==="a"?this.headers.get(t):void 0)||[];o.push(...r),this.headers.set(t,o);break;case"d":let n=e.value;if(!n)this.headers.delete(t),this.normalizedNames.delete(t);else{let i=this.headers.get(t);if(!i)return;i=i.filter(u=>n.indexOf(u)===-1),i.length===0?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,i)}break}}addHeaderEntry(e,t){let r=e.toLowerCase();this.maybeSetNormalizedName(e,r),this.headers.has(r)?this.headers.get(r).push(t):this.headers.set(r,[t])}setHeaderEntries(e,t){let r=(Array.isArray(t)?t:[t]).map(n=>n.toString()),o=e.toLowerCase();this.headers.set(o,r),this.maybeSetNormalizedName(e,o)}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(t=>e(this.normalizedNames.get(t),this.headers.get(t)))}};var Q=class{encodeKey(e){return Se(e)}encodeValue(e){return Se(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};function Ye(s,e){let t=new Map;return s.length>0&&s.replace(/^\?/,"").split("&").forEach(o=>{let n=o.indexOf("="),[i,u]=n==-1?[e.decodeKey(o),""]:[e.decodeKey(o.slice(0,n)),e.decodeValue(o.slice(n+1))],d=t.get(i)||[];d.push(u),t.set(i,d)}),t}var Qe=/%(\d[a-f0-9])/gi,Ze={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function Se(s){return encodeURIComponent(s).replace(Qe,(e,t)=>Ze[t]??e)}function H(s){return`${s}`}var E=class s{map;encoder;updates=null;cloneFrom=null;constructor(e={}){if(this.encoder=e.encoder||new Q,e.fromString){if(e.fromObject)throw new w(2805,!1);this.map=Ye(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(t=>{let r=e.fromObject[t],o=Array.isArray(r)?r.map(H):[H(r)];this.map.set(t,o)})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();let t=this.map.get(e);return t?t[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,t){return this.clone({param:e,value:t,op:"a"})}appendAll(e){let t=[];return Object.keys(e).forEach(r=>{let o=e[r];Array.isArray(o)?o.forEach(n=>{t.push({param:r,value:n,op:"a"})}):t.push({param:r,value:o,op:"a"})}),this.clone(t)}set(e,t){return this.clone({param:e,value:t,op:"s"})}delete(e,t){return this.clone({param:e,value:t,op:"d"})}toString(){return this.init(),this.keys().map(e=>{let t=this.encoder.encodeKey(e);return this.map.get(e).map(r=>t+"="+this.encoder.encodeValue(r)).join("&")}).filter(e=>e!=="").join("&")}clone(e){let t=new s({encoder:this.encoder});return t.cloneFrom=this.cloneFrom||this,t.updates=(this.updates||[]).concat(e),t}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(e=>this.map.set(e,this.cloneFrom.map.get(e))),this.updates.forEach(e=>{switch(e.op){case"a":case"s":let t=(e.op==="a"?this.map.get(e.param):void 0)||[];t.push(H(e.value)),this.map.set(e.param,t);break;case"d":if(e.value!==void 0){let r=this.map.get(e.param)||[],o=r.indexOf(H(e.value));o!==-1&&r.splice(o,1),r.length>0?this.map.set(e.param,r):this.map.delete(e.param)}else{this.map.delete(e.param);break}}}),this.cloneFrom=this.updates=null)}};var Z=class{map=new Map;set(e,t){return this.map.set(e,t),this}get(e){return this.map.has(e)||this.map.set(e,e.defaultValue()),this.map.get(e)}delete(e){return this.map.delete(e),this}has(e){return this.map.has(e)}keys(){return this.map.keys()}};function et(s){switch(s){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function Ne(s){return typeof ArrayBuffer<"u"&&s instanceof ArrayBuffer}function xe(s){return typeof Blob<"u"&&s instanceof Blob}function Ge(s){return typeof FormData<"u"&&s instanceof FormData}function tt(s){return typeof URLSearchParams<"u"&&s instanceof URLSearchParams}var J="Content-Type",ee="Accept",le="X-Request-URL",Ce="text/plain",Fe="application/json",Le=`${Fe}, ${Ce}, */*`,C=class s{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;credentials;keepalive=!1;cache;priority;mode;redirect;referrer;integrity;responseType="json";method;params;urlWithParams;transferCache;timeout;constructor(e,t,r,o){this.url=t,this.method=e.toUpperCase();let n;if(et(this.method)||o?(this.body=r!==void 0?r:null,n=o):n=r,n){if(this.reportProgress=!!n.reportProgress,this.withCredentials=!!n.withCredentials,this.keepalive=!!n.keepalive,n.responseType&&(this.responseType=n.responseType),n.headers&&(this.headers=n.headers),n.context&&(this.context=n.context),n.params&&(this.params=n.params),n.priority&&(this.priority=n.priority),n.cache&&(this.cache=n.cache),n.credentials&&(this.credentials=n.credentials),typeof n.timeout=="number"){if(n.timeout<1||!Number.isInteger(n.timeout))throw new w(2822,"");this.timeout=n.timeout}n.mode&&(this.mode=n.mode),n.redirect&&(this.redirect=n.redirect),n.integrity&&(this.integrity=n.integrity),n.referrer&&(this.referrer=n.referrer),this.transferCache=n.transferCache}if(this.headers??=new g,this.context??=new Z,!this.params)this.params=new E,this.urlWithParams=t;else{let i=this.params.toString();if(i.length===0)this.urlWithParams=t;else{let u=t.indexOf("?"),d=u===-1?"?":u<t.length-1?"&":"";this.urlWithParams=t+d+i}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||Ne(this.body)||xe(this.body)||Ge(this.body)||tt(this.body)?this.body:this.body instanceof E?this.body.toString():typeof this.body=="object"||typeof this.body=="boolean"||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return this.body===null||Ge(this.body)?null:xe(this.body)?this.body.type||null:Ne(this.body)?null:typeof this.body=="string"?Ce:this.body instanceof E?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?Fe:null}clone(e={}){let t=e.method||this.method,r=e.url||this.url,o=e.responseType||this.responseType,n=e.keepalive??this.keepalive,i=e.priority||this.priority,u=e.cache||this.cache,d=e.mode||this.mode,h=e.redirect||this.redirect,f=e.credentials||this.credentials,b=e.referrer||this.referrer,N=e.integrity||this.integrity,x=e.transferCache??this.transferCache,m=e.timeout??this.timeout,G=e.body!==void 0?e.body:this.body,c=e.withCredentials??this.withCredentials,l=e.reportProgress??this.reportProgress,A=e.headers||this.headers,v=e.params||this.params,y=e.context??this.context;return e.setHeaders!==void 0&&(A=Object.keys(e.setHeaders).reduce((B,k)=>B.set(k,e.setHeaders[k]),A)),e.setParams&&(v=Object.keys(e.setParams).reduce((B,k)=>B.set(k,e.setParams[k]),v)),new s(t,r,G,{params:v,headers:A,context:y,reportProgress:l,responseType:o,withCredentials:c,transferCache:x,keepalive:n,cache:u,priority:i,timeout:m,mode:d,redirect:h,credentials:f,referrer:b,integrity:N})}},O=(function(s){return s[s.Sent=0]="Sent",s[s.UploadProgress=1]="UploadProgress",s[s.ResponseHeader=2]="ResponseHeader",s[s.DownloadProgress=3]="DownloadProgress",s[s.Response=4]="Response",s[s.User=5]="User",s})(O||{}),_=class{headers;status;statusText;url;ok;type;redirected;constructor(e,t=200,r="OK"){this.headers=e.headers||new g,this.status=e.status!==void 0?e.status:t,this.statusText=e.statusText||r,this.url=e.url||null,this.redirected=e.redirected,this.ok=this.status>=200&&this.status<300}},X=class s extends _{constructor(e={}){super(e)}type=O.ResponseHeader;clone(e={}){return new s({headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}},j=class s extends _{body;constructor(e={}){super(e),this.body=e.body!==void 0?e.body:null}type=O.Response;clone(e={}){return new s({body:e.body!==void 0?e.body:this.body,headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0,redirected:e.redirected??this.redirected})}},P=class extends _{name="HttpErrorResponse";message;error;ok=!1;constructor(e){super(e,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${e.url||"(unknown url)"}`:this.message=`Http failure response for ${e.url||"(unknown url)"}: ${e.status} ${e.statusText}`,this.error=e.error||null}},_e=200,st=204;function pe(s,e){return{body:e,headers:s.headers,context:s.context,observe:s.observe,params:s.params,reportProgress:s.reportProgress,responseType:s.responseType,withCredentials:s.withCredentials,credentials:s.credentials,transferCache:s.transferCache,timeout:s.timeout,keepalive:s.keepalive,priority:s.priority,cache:s.cache,mode:s.mode,redirect:s.redirect,integrity:s.integrity,referrer:s.referrer}}var U=(()=>{class s{handler;constructor(t){this.handler=t}request(t,r,o={}){let n;if(t instanceof C)n=t;else{let d;o.headers instanceof g?d=o.headers:d=new g(o.headers);let h;o.params&&(o.params instanceof E?h=o.params:h=new E({fromObject:o.params})),n=new C(t,r,o.body!==void 0?o.body:null,{headers:d,context:o.context,params:h,reportProgress:o.reportProgress,responseType:o.responseType||"json",withCredentials:o.withCredentials,transferCache:o.transferCache,keepalive:o.keepalive,priority:o.priority,cache:o.cache,mode:o.mode,redirect:o.redirect,credentials:o.credentials,referrer:o.referrer,integrity:o.integrity,timeout:o.timeout})}let i=z(n).pipe(Te(d=>this.handler.handle(d)));if(t instanceof C||o.observe==="events")return i;let u=i.pipe(Re(d=>d instanceof j));switch(o.observe||"body"){case"body":switch(n.responseType){case"arraybuffer":return u.pipe(D(d=>{if(d.body!==null&&!(d.body instanceof ArrayBuffer))throw new w(2806,!1);return d.body}));case"blob":return u.pipe(D(d=>{if(d.body!==null&&!(d.body instanceof Blob))throw new w(2807,!1);return d.body}));case"text":return u.pipe(D(d=>{if(d.body!==null&&typeof d.body!="string")throw new w(2808,!1);return d.body}));case"json":default:return u.pipe(D(d=>d.body))}case"response":return u;default:throw new w(2809,!1)}}delete(t,r={}){return this.request("DELETE",t,r)}get(t,r={}){return this.request("GET",t,r)}head(t,r={}){return this.request("HEAD",t,r)}jsonp(t,r){return this.request("JSONP",t,{params:new E().append(r,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,r={}){return this.request("OPTIONS",t,r)}patch(t,r,o={}){return this.request("PATCH",t,pe(o,r))}post(t,r,o={}){return this.request("POST",t,pe(o,r))}put(t,r,o={}){return this.request("PUT",t,pe(o,r))}static \u0275fac=function(r){return new(r||s)(R(F))};static \u0275prov=V({token:s,factory:s.\u0275fac})}return s})(),rt=/^\)\]\}',?\n/;function Me(s){if(s.url)return s.url;let e=le.toLocaleLowerCase();return s.headers.get(e)}var je=new S(""),Y=(()=>{class s{fetchImpl=T(de,{optional:!0})?.fetch??((...t)=>globalThis.fetch(...t));ngZone=T(Ie);destroyRef=T(Ee);destroyed=!1;constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0})}handle(t){return new oe(r=>{let o=new AbortController;this.doRequest(t,o.signal,r).then(ue,i=>r.error(new P({error:i})));let n;return t.timeout&&(n=this.ngZone.runOutsideAngular(()=>setTimeout(()=>{o.signal.aborted||o.abort(new DOMException("signal timed out","TimeoutError"))},t.timeout))),()=>{n!==void 0&&clearTimeout(n),o.abort()}})}async doRequest(t,r,o){let n=this.createRequestInit(t),i;try{let m=this.ngZone.runOutsideAngular(()=>this.fetchImpl(t.urlWithParams,I({signal:r},n)));it(m),o.next({type:O.Sent}),i=await m}catch(m){o.error(new P({error:m,status:m.status??0,statusText:m.statusText,url:t.urlWithParams,headers:m.headers}));return}let u=new g(i.headers),d=i.statusText,h=Me(i)??t.urlWithParams,f=i.status,b=null;if(t.reportProgress&&o.next(new X({headers:u,status:f,statusText:d,url:h})),i.body){let m=i.headers.get("content-length"),G=[],c=i.body.getReader(),l=0,A,v,y=typeof Zone<"u"&&Zone.current,B=!1;if(await this.ngZone.runOutsideAngular(async()=>{for(;;){if(this.destroyed){await c.cancel(),B=!0;break}let{done:M,value:ie}=await c.read();if(M)break;if(G.push(ie),l+=ie.length,t.reportProgress){v=t.responseType==="text"?(v??"")+(A??=new TextDecoder).decode(ie,{stream:!0}):void 0;let Ae=()=>o.next({type:O.DownloadProgress,total:m?+m:void 0,loaded:l,partialText:v});y?y.run(Ae):Ae()}}}),B){o.complete();return}let k=this.concatChunks(G,l);try{let M=i.headers.get(J)??"";b=this.parseBody(t,k,M,f)}catch(M){o.error(new P({error:M,headers:new g(i.headers),status:i.status,statusText:i.statusText,url:Me(i)??t.urlWithParams}));return}}f===0&&(f=b?_e:0);let N=f>=200&&f<300,x=i.redirected;N?(o.next(new j({body:b,headers:u,status:f,statusText:d,url:h,redirected:x})),o.complete()):o.error(new P({error:b,headers:u,status:f,statusText:d,url:h,redirected:x}))}parseBody(t,r,o,n){switch(t.responseType){case"json":let i=new TextDecoder().decode(r).replace(rt,"");if(i==="")return null;try{return JSON.parse(i)}catch(u){if(n<200||n>=300)return i;throw u}case"text":return new TextDecoder().decode(r);case"blob":return new Blob([r],{type:o});case"arraybuffer":return r.buffer}}createRequestInit(t){let r={},o;if(o=t.credentials,t.withCredentials&&(o="include"),t.headers.forEach((n,i)=>r[n]=i.join(",")),t.headers.has(ee)||(r[ee]=Le),!t.headers.has(J)){let n=t.detectContentTypeHeader();n!==null&&(r[J]=n)}return{body:t.serializeBody(),method:t.method,headers:r,credentials:o,keepalive:t.keepalive,cache:t.cache,priority:t.priority,mode:t.mode,redirect:t.redirect,referrer:t.referrer,integrity:t.integrity}}concatChunks(t,r){let o=new Uint8Array(r),n=0;for(let i of t)o.set(i,n),n+=i.length;return o}static \u0275fac=function(r){return new(r||s)};static \u0275prov=V({token:s,factory:s.\u0275fac})}return s})(),de=class{};function ue(){}function it(s){s.then(ue,ue)}function ot(s,e){return e(s)}function nt(s,e,t){return(r,o)=>Pe(t,()=>e(r,n=>s(n,o)))}var he=new S(""),Ue=new S(""),qe=new S("",{providedIn:"root",factory:()=>!0});var te=(()=>{class s extends F{backend;injector;chain=null;pendingTasks=T(Oe);contributeToStability=T(qe);constructor(t,r){super(),this.backend=t,this.injector=r}handle(t){if(this.chain===null){let r=Array.from(new Set([...this.injector.get(he),...this.injector.get(Ue,[])]));this.chain=r.reduceRight((o,n)=>nt(o,n,this.injector),ot)}if(this.contributeToStability){let r=this.pendingTasks.add();return this.chain(t,o=>this.backend.handle(o)).pipe(ve(r))}else return this.chain(t,r=>this.backend.handle(r))}static \u0275fac=function(r){return new(r||s)(R(L),R(Ve))};static \u0275prov=V({token:s,factory:s.\u0275fac})}return s})();var at=/^\)\]\}',?\n/,pt=RegExp(`^${le}:`,"m");function dt(s){return"responseURL"in s&&s.responseURL?s.responseURL:pt.test(s.getAllResponseHeaders())?s.getResponseHeader(le):null}var ce=(()=>{class s{xhrFactory;constructor(t){this.xhrFactory=t}handle(t){if(t.method==="JSONP")throw new w(-2800,!1);let r=this.xhrFactory;return z(null).pipe($(()=>new oe(n=>{let i=r.build();if(i.open(t.method,t.urlWithParams),t.withCredentials&&(i.withCredentials=!0),t.headers.forEach((c,l)=>i.setRequestHeader(c,l.join(","))),t.headers.has(ee)||i.setRequestHeader(ee,Le),!t.headers.has(J)){let c=t.detectContentTypeHeader();c!==null&&i.setRequestHeader(J,c)}if(t.timeout&&(i.timeout=t.timeout),t.responseType){let c=t.responseType.toLowerCase();i.responseType=c!=="json"?c:"text"}let u=t.serializeBody(),d=null,h=()=>{if(d!==null)return d;let c=i.statusText||"OK",l=new g(i.getAllResponseHeaders()),A=dt(i)||t.url;return d=new X({headers:l,status:i.status,statusText:c,url:A}),d},f=()=>{let{headers:c,status:l,statusText:A,url:v}=h(),y=null;l!==st&&(y=typeof i.response>"u"?i.responseText:i.response),l===0&&(l=y?_e:0);let B=l>=200&&l<300;if(t.responseType==="json"&&typeof y=="string"){let k=y;y=y.replace(at,"");try{y=y!==""?JSON.parse(y):null}catch(M){y=k,B&&(B=!1,y={error:M,text:y})}}B?(n.next(new j({body:y,headers:c,status:l,statusText:A,url:v||void 0})),n.complete()):n.error(new P({error:y,headers:c,status:l,statusText:A,url:v||void 0}))},b=c=>{let{url:l}=h(),A=new P({error:c,status:i.status||0,statusText:i.statusText||"Unknown Error",url:l||void 0});n.error(A)},N=b;t.timeout&&(N=c=>{let{url:l}=h(),A=new P({error:new DOMException("Request timed out","TimeoutError"),status:i.status||0,statusText:i.statusText||"Request timeout",url:l||void 0});n.error(A)});let x=!1,m=c=>{x||(n.next(h()),x=!0);let l={type:O.DownloadProgress,loaded:c.loaded};c.lengthComputable&&(l.total=c.total),t.responseType==="text"&&i.responseText&&(l.partialText=i.responseText),n.next(l)},G=c=>{let l={type:O.UploadProgress,loaded:c.loaded};c.lengthComputable&&(l.total=c.total),n.next(l)};return i.addEventListener("load",f),i.addEventListener("error",b),i.addEventListener("timeout",N),i.addEventListener("abort",b),t.reportProgress&&(i.addEventListener("progress",m),u!==null&&i.upload&&i.upload.addEventListener("progress",G)),i.send(u),n.next({type:O.Sent}),()=>{i.removeEventListener("error",b),i.removeEventListener("abort",b),i.removeEventListener("load",f),i.removeEventListener("timeout",N),t.reportProgress&&(i.removeEventListener("progress",m),u!==null&&i.upload&&i.upload.removeEventListener("progress",G)),i.readyState!==i.DONE&&i.abort()}})))}static \u0275fac=function(r){return new(r||s)(R(we))};static \u0275prov=V({token:s,factory:s.\u0275fac})}return s})(),ze=new S(""),ut="XSRF-TOKEN",ct=new S("",{providedIn:"root",factory:()=>ut}),lt="X-XSRF-TOKEN",ht=new S("",{providedIn:"root",factory:()=>lt}),K=class{},yt=(()=>{class s{doc;cookieName;lastCookieString="";lastToken=null;parseCount=0;constructor(t,r){this.doc=t,this.cookieName=r}getToken(){let t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=De(t,this.cookieName),this.lastCookieString=t),this.lastToken}static \u0275fac=function(r){return new(r||s)(R(ke),R(ct))};static \u0275prov=V({token:s,factory:s.\u0275fac})}return s})();function ft(s,e){let t=s.url.toLowerCase();if(!T(ze)||s.method==="GET"||s.method==="HEAD"||t.startsWith("http://")||t.startsWith("https://"))return e(s);let r=T(K).getToken(),o=T(ht);return r!=null&&!s.headers.has(o)&&(s=s.clone({headers:s.headers.set(o,r)})),e(s)}var se=(function(s){return s[s.Interceptors=0]="Interceptors",s[s.LegacyInterceptors=1]="LegacyInterceptors",s[s.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",s[s.NoXsrfProtection=3]="NoXsrfProtection",s[s.JsonpSupport=4]="JsonpSupport",s[s.RequestsMadeViaParent=5]="RequestsMadeViaParent",s[s.Fetch=6]="Fetch",s})(se||{});function $e(s,e){return{\u0275kind:s,\u0275providers:e}}function mt(...s){let e=[U,ce,te,{provide:F,useExisting:te},{provide:L,useFactory:()=>T(je,{optional:!0})??T(ce)},{provide:he,useValue:ft,multi:!0},{provide:ze,useValue:!0},{provide:K,useClass:yt}];for(let t of s)e.push(...t.\u0275providers);return Be(e)}function At(s){return $e(se.Interceptors,s.map(e=>({provide:he,useValue:e,multi:!0})))}function bt(){return $e(se.Fetch,[Y,{provide:je,useExisting:Y},{provide:L,useExisting:Y}])}var ye=class{_fns;constructor(){this._fns=[]}eject(e){let t=this._fns.indexOf(e);t!==-1&&(this._fns=[...this._fns.slice(0,t),...this._fns.slice(t+1)])}use(e){this._fns=[...this._fns,e]}},a={BASE:"",CREDENTIALS:"include",ENCODE_PATH:void 0,HEADERS:void 0,PASSWORD:void 0,TOKEN:void 0,USERNAME:void 0,VERSION:"1",WITH_CREDENTIALS:!1,interceptors:{response:new ye}};var q=class extends Error{url;status;statusText;body;request;constructor(e,t,r){super(r),this.name="ApiError",this.url=t.url,this.status=t.status,this.statusText=t.statusText,this.body=t.body,this.request=e}};var W=s=>typeof s=="string",fe=s=>W(s)&&s!=="",me=s=>s instanceof Blob,Je=s=>s instanceof FormData,Rt=s=>{try{return btoa(s)}catch{return Buffer.from(s).toString("base64")}},Tt=s=>{let e=[],t=(o,n)=>{e.push(`${encodeURIComponent(o)}=${encodeURIComponent(String(n))}`)},r=(o,n)=>{n!=null&&(n instanceof Date?t(o,n.toISOString()):Array.isArray(n)?n.forEach(i=>r(o,i)):typeof n=="object"?Object.entries(n).forEach(([i,u])=>r(`${o}[${i}]`,u)):t(o,n))};return Object.entries(s).forEach(([o,n])=>r(o,n)),e.length?`?${e.join("&")}`:""},vt=(s,e)=>{let t=s.ENCODE_PATH||encodeURI,r=e.url.replace("{api-version}",s.VERSION).replace(/{(.*?)}/g,(n,i)=>e.path?.hasOwnProperty(i)?t(String(e.path[i])):n),o=s.BASE+r;return e.query?o+Tt(e.query):o},Bt=s=>{if(s.formData){let e=new FormData,t=(r,o)=>{W(o)||me(o)?e.append(r,o):e.append(r,JSON.stringify(o))};return Object.entries(s.formData).filter(([,r])=>r!=null).forEach(([r,o])=>{Array.isArray(o)?o.forEach(n=>t(r,n)):t(r,o)}),e}},re=async(s,e)=>typeof e=="function"?e(s):e,Vt=(s,e)=>ge({token:re(e,s.TOKEN),username:re(e,s.USERNAME),password:re(e,s.PASSWORD),additionalHeaders:re(e,s.HEADERS)}).pipe(D(({token:t,username:r,password:o,additionalHeaders:n})=>{let i=Object.entries(I(I({Accept:"application/json"},n),e.headers)).filter(([,u])=>u!=null).reduce((u,[d,h])=>be(I({},u),{[d]:String(h)}),{});if(fe(t)&&(i.Authorization=`Bearer ${t}`),fe(r)&&fe(o)){let u=Rt(`${r}:${o}`);i.Authorization=`Basic ${u}`}return e.body!==void 0&&(e.mediaType?i["Content-Type"]=e.mediaType:me(e.body)?i["Content-Type"]=e.body.type||"application/octet-stream":W(e.body)?i["Content-Type"]="text/plain":Je(e.body)||(i["Content-Type"]="application/json")),new g(i)})),Pt=s=>{if(s.body)return s.mediaType?.includes("application/json")||s.mediaType?.includes("+json")?JSON.stringify(s.body):W(s.body)||me(s.body)||Je(s.body)?s.body:JSON.stringify(s.body)},kt=(s,e,t,r,o,n,i)=>t.request(e.method,r,{headers:i,body:o??n,withCredentials:s.WITH_CREDENTIALS,observe:"response"}),Et=(s,e)=>{if(e){let t=s.headers.get(e);if(W(t))return t}},Ot=s=>{if(s.status!==204&&s.body!==null)return s.body},It=(s,e)=>{let r=I({400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"Im a teapot",421:"Misdirected Request",422:"Unprocessable Content",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",510:"Not Extended",511:"Network Authentication Required"},s.errors)[e.status];if(r)throw new q(s,e,r);if(!e.ok){let o=e.status??"unknown",n=e.statusText??"unknown",i=(()=>{try{return JSON.stringify(e.body,null,2)}catch{return}})();throw new q(s,e,`Generic Error: status: ${o}; status text: ${n}; body: ${i}`)}},p=(s,e,t)=>{let r=vt(s,t),o=Bt(t),n=Pt(t);return Vt(s,t).pipe($(i=>kt(s,t,e,r,n,o,i)),$(async i=>{for(let f of s.interceptors.response._fns)i=await f(i);let u=Ot(i),d=Et(i,t.responseHeader),h=u;return t.responseTransformer&&i.ok&&(h=await t.responseTransformer(u)),{url:r,ok:i.ok,status:i.status,statusText:i.statusText,body:d??h}}),ae(i=>i.status?z({url:r,ok:i.ok,status:i.status,statusText:i.statusText,body:i.error??i.statusText}):ne(()=>i)),D(i=>(It(t,i),i.body)),ae(i=>ne(()=>i)))};var Xe=class s{constructor(e){this.http=e}getApiV1Commandline(){return p(a,this.http,{method:"GET",url:"/api/v1/commandline"})}static \u0275fac=function(t){return new(t||s)(R(U))};static \u0275prov=V({token:s,factory:s.\u0275fac,providedIn:"root"})},Ke=class s{constructor(e){this.http=e}postApiV1Commandline(e){return p(a,this.http,{method:"POST",url:"/api/v1/commandline",body:e.requestBody,mediaType:"application/json"})}getApiV1Acknowledgements(){return p(a,this.http,{method:"GET",url:"/api/v1/acknowledgements"})}postApiV1AuthRefresh(e={}){return p(a,this.http,{method:"POST",url:"/api/v1/auth/refresh",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthSignin(e){return p(a,this.http,{method:"POST",url:"/api/v1/auth/signin",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthLogin(e){return p(a,this.http,{method:"POST",url:"/api/v1/auth/login",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthIssuesignintoken(e){return p(a,this.http,{method:"POST",url:"/api/v1/auth/issuesignintoken",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthRefreshLogout(e={}){return p(a,this.http,{method:"POST",url:"/api/v1/auth/refresh/logout",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthIssuetokenByOperation(e){return p(a,this.http,{method:"POST",url:"/api/v1/auth/issuetoken/{operation}",path:{operation:e.operation}})}postApiV1AuthIssueForeverToken(){return p(a,this.http,{method:"POST",url:"/api/v1/auth/issue-forever-token"})}getApiV1Backupdefaults(){return p(a,this.http,{method:"GET",url:"/api/v1/backupdefaults"})}getApiV1Backups(e={}){return p(a,this.http,{method:"GET",url:"/api/v1/backups",query:{orderBy:e.orderBy}})}postApiV1Backups(e){return p(a,this.http,{method:"POST",url:"/api/v1/backups",query:{temporary:e.temporary,existingdb:e.existingdb},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupsImport(e){return p(a,this.http,{method:"POST",url:"/api/v1/backups/import",body:e.requestBody,mediaType:"application/json"})}getApiV1BugreportByReportid(e){return p(a,this.http,{method:"GET",url:"/api/v1/bugreport/{reportid}",path:{reportid:e.reportid},query:{token:e.token}})}getApiV1Changelog(e={}){return p(a,this.http,{method:"GET",url:"/api/v1/changelog",query:{"from-update":e.fromUpdate}})}getApiV1CommandlineByRunid(e){return p(a,this.http,{method:"GET",url:"/api/v1/commandline/{runid}",path:{runid:e.runid},query:{offset:e.offset,pagesize:e.pagesize}})}postApiV1CommandlineByRunidAbort(e){return p(a,this.http,{method:"POST",url:"/api/v1/commandline/{runid}/abort",path:{runid:e.runid}})}postApiV1Filesystem(e){return p(a,this.http,{method:"POST",url:"/api/v1/filesystem",query:{onlyFolders:e.onlyFolders,showHidden:e.showHidden},body:e.requestBody,mediaType:"application/json"})}postApiV1FilesystemValidate(e){return p(a,this.http,{method:"POST",url:"/api/v1/filesystem/validate",body:e.requestBody,mediaType:"application/json"})}getApiV1Hyperv(){return p(a,this.http,{method:"GET",url:"/api/v1/hyperv"})}getApiV1HypervByKey(e){return p(a,this.http,{method:"GET",url:"/api/v1/hyperv/{key}",path:{key:e.key}})}getApiV1Licenses(){return p(a,this.http,{method:"GET",url:"/api/v1/licenses"})}getApiV1LogdataPoll(e){return p(a,this.http,{method:"GET",url:"/api/v1/logdata/poll",query:{level:e.level,id:e.id,pagesize:e.pagesize}})}getApiV1LogdataLog(e={}){return p(a,this.http,{method:"GET",url:"/api/v1/logdata/log",query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1LogdataCrashlog(){return p(a,this.http,{method:"GET",url:"/api/v1/logdata/crashlog"})}getApiV1Mssql(){return p(a,this.http,{method:"GET",url:"/api/v1/mssql"})}getApiV1MssqlByKey(e){return p(a,this.http,{method:"GET",url:"/api/v1/mssql/{key}",path:{key:e.key}})}getApiV1NotificationById(e){return p(a,this.http,{method:"GET",url:"/api/v1/notification/{id}",path:{id:e.id}})}deleteApiV1NotificationById(e){return p(a,this.http,{method:"DELETE",url:"/api/v1/notification/{id}",path:{id:e.id}})}getApiV1Notifications(){return p(a,this.http,{method:"GET",url:"/api/v1/notifications"})}getApiV1Progressstate(){return p(a,this.http,{method:"GET",url:"/api/v1/progressstate"})}getApiV1RemotecontrolStatus(){return p(a,this.http,{method:"GET",url:"/api/v1/remotecontrol/status"})}postApiV1RemoteoperationDbpath(e){return p(a,this.http,{method:"POST",url:"/api/v1/remoteoperation/dbpath",body:e.requestBody,mediaType:"application/json"})}postApiV1RemoteoperationTest(e){return p(a,this.http,{method:"POST",url:"/api/v1/remoteoperation/test",query:{autocreate:e.autocreate},body:e.requestBody,mediaType:"application/json"})}postApiV1RemoteoperationCreate(e){return p(a,this.http,{method:"POST",url:"/api/v1/remoteoperation/create",body:e.requestBody,mediaType:"application/json"})}getApiV1Serversettings(){return p(a,this.http,{method:"GET",url:"/api/v1/serversettings"})}patchApiV1Serversettings(e){return p(a,this.http,{method:"PATCH",url:"/api/v1/serversettings",body:e.requestBody,mediaType:"application/json"})}getApiV1ServersettingByKey(e){return p(a,this.http,{method:"GET",url:"/api/v1/serversetting/{key}",path:{key:e.key}})}putApiV1ServersettingByKey(e){return p(a,this.http,{method:"PUT",url:"/api/v1/serversetting/{key}",path:{key:e.key},body:e.requestBody,mediaType:"application/json"})}getApiV1Serverstate(e={}){return p(a,this.http,{method:"GET",url:"/api/v1/serverstate",query:{lastEventId:e.lastEventId,longpoll:e.longpoll,duration:e.duration}})}postApiV1ServerstatePause(e={}){return p(a,this.http,{method:"POST",url:"/api/v1/serverstate/pause",query:{duration:e.duration,pauseTransfers:e.pauseTransfers}})}postApiV1ServerstateResume(){return p(a,this.http,{method:"POST",url:"/api/v1/serverstate/resume"})}getApiV1Systeminfo(){return p(a,this.http,{method:"GET",url:"/api/v1/systeminfo"})}getApiV1SysteminfoFiltergroups(){return p(a,this.http,{method:"GET",url:"/api/v1/systeminfo/filtergroups"})}getApiV1Tasks(){return p(a,this.http,{method:"GET",url:"/api/v1/tasks"})}getApiV1TaskByTaskid(e){return p(a,this.http,{method:"GET",url:"/api/v1/task/{taskid}",path:{taskid:e.taskid}})}postApiV1TaskByTaskidStop(e){return p(a,this.http,{method:"POST",url:"/api/v1/task/{taskid}/stop",path:{taskid:e.taskid}})}postApiV1TaskByTaskidAbort(e){return p(a,this.http,{method:"POST",url:"/api/v1/task/{taskid}/abort",path:{taskid:e.taskid}})}getApiV1Uisettings(){return p(a,this.http,{method:"GET",url:"/api/v1/uisettings"})}postApiV1Uisettings(e){return p(a,this.http,{method:"POST",url:"/api/v1/uisettings",body:e.requestBody,mediaType:"application/json"})}getApiV1UisettingsByScheme(e){return p(a,this.http,{method:"GET",url:"/api/v1/uisettings/{scheme}",path:{scheme:e.scheme}})}patchApiV1UisettingsByScheme(e){return p(a,this.http,{method:"PATCH",url:"/api/v1/uisettings/{scheme}",path:{scheme:e.scheme},body:e.requestBody,mediaType:"application/json"})}postApiV1UpdatesCheck(){return p(a,this.http,{method:"POST",url:"/api/v1/updates/check"})}postApiV1WebmoduleByModulekey(e){return p(a,this.http,{method:"POST",url:"/api/v1/webmodule/{modulekey}",path:{modulekey:e.modulekey},body:e.requestBody,mediaType:"application/json"})}getApiV1BackupById(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}",path:{id:e.id}})}putApiV1BackupById(e){return p(a,this.http,{method:"PUT",url:"/api/v1/backup/{id}",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}deleteApiV1BackupById(e){return p(a,this.http,{method:"DELETE",url:"/api/v1/backup/{id}",path:{id:e.id},query:{"delete-remote-files":e.deleteRemoteFiles,"delete-local-db":e.deleteLocalDb,force:e.force}})}getApiV1BackupByIdFiles(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}/files",path:{id:e.id},query:{filter:e.filter,time:e.time,"all-versions":e.allVersions,"prefix-only":e.prefixOnly,"folder-contents":e.folderContents}})}getApiV1BackupByIdLog(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}/log",path:{id:e.id},query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1BackupByIdRemotelog(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}/remotelog",path:{id:e.id},query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1BackupByIdFilesets(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}/filesets",path:{id:e.id},query:{"include-metadata":e.includeMetadata,"from-remote-only":e.fromRemoteOnly}})}getApiV1BackupByIdExportArgsonly(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}/export-argsonly",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase}})}getApiV1BackupByIdExportCmdline(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}/export-cmdline",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase}})}getApiV1BackupByIdExport(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}/export",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase,token:e.token}})}getApiV1BackupByIdIsdbusedelsewhere(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}/isdbusedelsewhere",path:{id:e.id}})}getApiV1BackupByIdIsactive(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}/isactive",path:{id:e.id}})}postApiV1BackupByIdDeletedb(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/deletedb",path:{id:e.id}})}postApiV1BackupByIdMovedb(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/movedb",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdUpdatedb(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/updatedb",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdRestore(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/restore",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdCreatereport(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/createreport",path:{id:e.id}})}postApiV1BackupByIdRepair(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/repair",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdRepairupdate(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/repairupdate",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdVacuum(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/vacuum",path:{id:e.id}})}postApiV1BackupByIdVerify(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/verify",path:{id:e.id}})}postApiV1BackupByIdCompact(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/compact",path:{id:e.id}})}postApiV1BackupByIdStart(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/start",path:{id:e.id},query:{skipQueue:e.skipQueue}})}postApiV1BackupByIdRun(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/run",path:{id:e.id},query:{skipQueue:e.skipQueue}})}postApiV1BackupByIdReportRemoteSize(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/report-remote-size",path:{id:e.id}})}postApiV1BackupByIdCopytotemp(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/copytotemp",path:{id:e.id}})}postApiV1RemotecontrolEnable(){return p(a,this.http,{method:"POST",url:"/api/v1/remotecontrol/enable"})}postApiV1RemotecontrolDisable(){return p(a,this.http,{method:"POST",url:"/api/v1/remotecontrol/disable"})}deleteApiV1RemotecontrolRegistration(){return p(a,this.http,{method:"DELETE",url:"/api/v1/remotecontrol/registration"})}postApiV1RemotecontrolRegister(e){return p(a,this.http,{method:"POST",url:"/api/v1/remotecontrol/register",body:e.requestBody,mediaType:"application/json"})}deleteApiV1RemotecontrolRegister(){return p(a,this.http,{method:"DELETE",url:"/api/v1/remotecontrol/register"})}postApiV2BackupListFilesets(e){return p(a,this.http,{method:"POST",url:"/api/v2/backup/list-filesets",body:e.requestBody,mediaType:"application/json"})}postApiV2BackupListFolder(e){return p(a,this.http,{method:"POST",url:"/api/v2/backup/list-folder",body:e.requestBody,mediaType:"application/json"})}postApiV2BackupListVersions(e){return p(a,this.http,{method:"POST",url:"/api/v2/backup/list-versions",body:e.requestBody,mediaType:"application/json"})}postApiV2BackupSearch(e){return p(a,this.http,{method:"POST",url:"/api/v2/backup/search",body:e.requestBody,mediaType:"application/json"})}postApiV2DestinationTest(e){return p(a,this.http,{method:"POST",url:"/api/v2/destination/test",body:e.requestBody,mediaType:"application/json"})}static \u0275fac=function(t){return new(t||s)(R(U))};static \u0275prov=V({token:s,factory:s.\u0275fac,providedIn:"root"})},We=class s{constructor(e){this.http=e}getApiV1Webmodules(){return p(a,this.http,{method:"GET",url:"/api/v1/webmodules"})}static \u0275fac=function(t){return new(t||s)(R(U))};static \u0275prov=V({token:s,factory:s.\u0275fac,providedIn:"root"})};export{g as a,j as b,U as c,mt as d,At as e,bt as f,Xe as g,Ke as h,We as i};
|
|
1
|
+
import{a as De,b as we}from"./chunk-FPPZ4BUR.js";import{$ as Be,B as ae,C as Te,H as ve,P as $,S as w,V as P,Y as S,Z as R,_ as T,ba as Pe,ca as Ve,f as oe,ka as ke,la as Ee,lb as Ie,n as z,o as ne,r as D,ra as Oe,x as ge,z as Re}from"./chunk-QONLYWYC.js";import{a as I,b as be}from"./chunk-EUDKD2JW.js";var F=class{},L=class{},g=class s{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(e){e?typeof e=="string"?this.lazyInit=()=>{this.headers=new Map,e.split(`
|
|
2
|
+
`).forEach(t=>{let r=t.indexOf(":");if(r>0){let o=t.slice(0,r),n=t.slice(r+1).trim();this.addHeaderEntry(o,n)}})}:typeof Headers<"u"&&e instanceof Headers?(this.headers=new Map,e.forEach((t,r)=>{this.addHeaderEntry(r,t)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(e).forEach(([t,r])=>{this.setHeaderEntries(t,r)})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();let t=this.headers.get(e.toLowerCase());return t&&t.length>0?t[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,t){return this.clone({name:e,value:t,op:"a"})}set(e,t){return this.clone({name:e,value:t,op:"s"})}delete(e,t){return this.clone({name:e,value:t,op:"d"})}maybeSetNormalizedName(e,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,e)}init(){this.lazyInit&&(this.lazyInit instanceof s?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(e=>this.applyUpdate(e)),this.lazyUpdate=null))}copyFrom(e){e.init(),Array.from(e.headers.keys()).forEach(t=>{this.headers.set(t,e.headers.get(t)),this.normalizedNames.set(t,e.normalizedNames.get(t))})}clone(e){let t=new s;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof s?this.lazyInit:this,t.lazyUpdate=(this.lazyUpdate||[]).concat([e]),t}applyUpdate(e){let t=e.name.toLowerCase();switch(e.op){case"a":case"s":let r=e.value;if(typeof r=="string"&&(r=[r]),r.length===0)return;this.maybeSetNormalizedName(e.name,t);let o=(e.op==="a"?this.headers.get(t):void 0)||[];o.push(...r),this.headers.set(t,o);break;case"d":let n=e.value;if(!n)this.headers.delete(t),this.normalizedNames.delete(t);else{let i=this.headers.get(t);if(!i)return;i=i.filter(u=>n.indexOf(u)===-1),i.length===0?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,i)}break}}addHeaderEntry(e,t){let r=e.toLowerCase();this.maybeSetNormalizedName(e,r),this.headers.has(r)?this.headers.get(r).push(t):this.headers.set(r,[t])}setHeaderEntries(e,t){let r=(Array.isArray(t)?t:[t]).map(n=>n.toString()),o=e.toLowerCase();this.headers.set(o,r),this.maybeSetNormalizedName(e,o)}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(t=>e(this.normalizedNames.get(t),this.headers.get(t)))}};var Q=class{encodeKey(e){return Se(e)}encodeValue(e){return Se(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};function Ye(s,e){let t=new Map;return s.length>0&&s.replace(/^\?/,"").split("&").forEach(o=>{let n=o.indexOf("="),[i,u]=n==-1?[e.decodeKey(o),""]:[e.decodeKey(o.slice(0,n)),e.decodeValue(o.slice(n+1))],d=t.get(i)||[];d.push(u),t.set(i,d)}),t}var Qe=/%(\d[a-f0-9])/gi,Ze={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function Se(s){return encodeURIComponent(s).replace(Qe,(e,t)=>Ze[t]??e)}function H(s){return`${s}`}var E=class s{map;encoder;updates=null;cloneFrom=null;constructor(e={}){if(this.encoder=e.encoder||new Q,e.fromString){if(e.fromObject)throw new w(2805,!1);this.map=Ye(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(t=>{let r=e.fromObject[t],o=Array.isArray(r)?r.map(H):[H(r)];this.map.set(t,o)})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();let t=this.map.get(e);return t?t[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,t){return this.clone({param:e,value:t,op:"a"})}appendAll(e){let t=[];return Object.keys(e).forEach(r=>{let o=e[r];Array.isArray(o)?o.forEach(n=>{t.push({param:r,value:n,op:"a"})}):t.push({param:r,value:o,op:"a"})}),this.clone(t)}set(e,t){return this.clone({param:e,value:t,op:"s"})}delete(e,t){return this.clone({param:e,value:t,op:"d"})}toString(){return this.init(),this.keys().map(e=>{let t=this.encoder.encodeKey(e);return this.map.get(e).map(r=>t+"="+this.encoder.encodeValue(r)).join("&")}).filter(e=>e!=="").join("&")}clone(e){let t=new s({encoder:this.encoder});return t.cloneFrom=this.cloneFrom||this,t.updates=(this.updates||[]).concat(e),t}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(e=>this.map.set(e,this.cloneFrom.map.get(e))),this.updates.forEach(e=>{switch(e.op){case"a":case"s":let t=(e.op==="a"?this.map.get(e.param):void 0)||[];t.push(H(e.value)),this.map.set(e.param,t);break;case"d":if(e.value!==void 0){let r=this.map.get(e.param)||[],o=r.indexOf(H(e.value));o!==-1&&r.splice(o,1),r.length>0?this.map.set(e.param,r):this.map.delete(e.param)}else{this.map.delete(e.param);break}}}),this.cloneFrom=this.updates=null)}};var Z=class{map=new Map;set(e,t){return this.map.set(e,t),this}get(e){return this.map.has(e)||this.map.set(e,e.defaultValue()),this.map.get(e)}delete(e){return this.map.delete(e),this}has(e){return this.map.has(e)}keys(){return this.map.keys()}};function et(s){switch(s){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function Ne(s){return typeof ArrayBuffer<"u"&&s instanceof ArrayBuffer}function xe(s){return typeof Blob<"u"&&s instanceof Blob}function Me(s){return typeof FormData<"u"&&s instanceof FormData}function tt(s){return typeof URLSearchParams<"u"&&s instanceof URLSearchParams}var J="Content-Type",ee="Accept",le="X-Request-URL",Ce="text/plain",Fe="application/json",Le=`${Fe}, ${Ce}, */*`,C=class s{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;credentials;keepalive=!1;cache;priority;mode;redirect;referrer;integrity;responseType="json";method;params;urlWithParams;transferCache;timeout;constructor(e,t,r,o){this.url=t,this.method=e.toUpperCase();let n;if(et(this.method)||o?(this.body=r!==void 0?r:null,n=o):n=r,n){if(this.reportProgress=!!n.reportProgress,this.withCredentials=!!n.withCredentials,this.keepalive=!!n.keepalive,n.responseType&&(this.responseType=n.responseType),n.headers&&(this.headers=n.headers),n.context&&(this.context=n.context),n.params&&(this.params=n.params),n.priority&&(this.priority=n.priority),n.cache&&(this.cache=n.cache),n.credentials&&(this.credentials=n.credentials),typeof n.timeout=="number"){if(n.timeout<1||!Number.isInteger(n.timeout))throw new w(2822,"");this.timeout=n.timeout}n.mode&&(this.mode=n.mode),n.redirect&&(this.redirect=n.redirect),n.integrity&&(this.integrity=n.integrity),n.referrer&&(this.referrer=n.referrer),this.transferCache=n.transferCache}if(this.headers??=new g,this.context??=new Z,!this.params)this.params=new E,this.urlWithParams=t;else{let i=this.params.toString();if(i.length===0)this.urlWithParams=t;else{let u=t.indexOf("?"),d=u===-1?"?":u<t.length-1?"&":"";this.urlWithParams=t+d+i}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||Ne(this.body)||xe(this.body)||Me(this.body)||tt(this.body)?this.body:this.body instanceof E?this.body.toString():typeof this.body=="object"||typeof this.body=="boolean"||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return this.body===null||Me(this.body)?null:xe(this.body)?this.body.type||null:Ne(this.body)?null:typeof this.body=="string"?Ce:this.body instanceof E?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?Fe:null}clone(e={}){let t=e.method||this.method,r=e.url||this.url,o=e.responseType||this.responseType,n=e.keepalive??this.keepalive,i=e.priority||this.priority,u=e.cache||this.cache,d=e.mode||this.mode,h=e.redirect||this.redirect,f=e.credentials||this.credentials,b=e.referrer||this.referrer,N=e.integrity||this.integrity,x=e.transferCache??this.transferCache,m=e.timeout??this.timeout,M=e.body!==void 0?e.body:this.body,c=e.withCredentials??this.withCredentials,l=e.reportProgress??this.reportProgress,A=e.headers||this.headers,v=e.params||this.params,y=e.context??this.context;return e.setHeaders!==void 0&&(A=Object.keys(e.setHeaders).reduce((B,k)=>B.set(k,e.setHeaders[k]),A)),e.setParams&&(v=Object.keys(e.setParams).reduce((B,k)=>B.set(k,e.setParams[k]),v)),new s(t,r,M,{params:v,headers:A,context:y,reportProgress:l,responseType:o,withCredentials:c,transferCache:x,keepalive:n,cache:u,priority:i,timeout:m,mode:d,redirect:h,credentials:f,referrer:b,integrity:N})}},O=(function(s){return s[s.Sent=0]="Sent",s[s.UploadProgress=1]="UploadProgress",s[s.ResponseHeader=2]="ResponseHeader",s[s.DownloadProgress=3]="DownloadProgress",s[s.Response=4]="Response",s[s.User=5]="User",s})(O||{}),_=class{headers;status;statusText;url;ok;type;redirected;constructor(e,t=200,r="OK"){this.headers=e.headers||new g,this.status=e.status!==void 0?e.status:t,this.statusText=e.statusText||r,this.url=e.url||null,this.redirected=e.redirected,this.ok=this.status>=200&&this.status<300}},X=class s extends _{constructor(e={}){super(e)}type=O.ResponseHeader;clone(e={}){return new s({headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}},j=class s extends _{body;constructor(e={}){super(e),this.body=e.body!==void 0?e.body:null}type=O.Response;clone(e={}){return new s({body:e.body!==void 0?e.body:this.body,headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0,redirected:e.redirected??this.redirected})}},V=class extends _{name="HttpErrorResponse";message;error;ok=!1;constructor(e){super(e,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${e.url||"(unknown url)"}`:this.message=`Http failure response for ${e.url||"(unknown url)"}: ${e.status} ${e.statusText}`,this.error=e.error||null}},_e=200,st=204;function pe(s,e){return{body:e,headers:s.headers,context:s.context,observe:s.observe,params:s.params,reportProgress:s.reportProgress,responseType:s.responseType,withCredentials:s.withCredentials,credentials:s.credentials,transferCache:s.transferCache,timeout:s.timeout,keepalive:s.keepalive,priority:s.priority,cache:s.cache,mode:s.mode,redirect:s.redirect,integrity:s.integrity,referrer:s.referrer}}var U=(()=>{class s{handler;constructor(t){this.handler=t}request(t,r,o={}){let n;if(t instanceof C)n=t;else{let d;o.headers instanceof g?d=o.headers:d=new g(o.headers);let h;o.params&&(o.params instanceof E?h=o.params:h=new E({fromObject:o.params})),n=new C(t,r,o.body!==void 0?o.body:null,{headers:d,context:o.context,params:h,reportProgress:o.reportProgress,responseType:o.responseType||"json",withCredentials:o.withCredentials,transferCache:o.transferCache,keepalive:o.keepalive,priority:o.priority,cache:o.cache,mode:o.mode,redirect:o.redirect,credentials:o.credentials,referrer:o.referrer,integrity:o.integrity,timeout:o.timeout})}let i=z(n).pipe(Te(d=>this.handler.handle(d)));if(t instanceof C||o.observe==="events")return i;let u=i.pipe(Re(d=>d instanceof j));switch(o.observe||"body"){case"body":switch(n.responseType){case"arraybuffer":return u.pipe(D(d=>{if(d.body!==null&&!(d.body instanceof ArrayBuffer))throw new w(2806,!1);return d.body}));case"blob":return u.pipe(D(d=>{if(d.body!==null&&!(d.body instanceof Blob))throw new w(2807,!1);return d.body}));case"text":return u.pipe(D(d=>{if(d.body!==null&&typeof d.body!="string")throw new w(2808,!1);return d.body}));case"json":default:return u.pipe(D(d=>d.body))}case"response":return u;default:throw new w(2809,!1)}}delete(t,r={}){return this.request("DELETE",t,r)}get(t,r={}){return this.request("GET",t,r)}head(t,r={}){return this.request("HEAD",t,r)}jsonp(t,r){return this.request("JSONP",t,{params:new E().append(r,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,r={}){return this.request("OPTIONS",t,r)}patch(t,r,o={}){return this.request("PATCH",t,pe(o,r))}post(t,r,o={}){return this.request("POST",t,pe(o,r))}put(t,r,o={}){return this.request("PUT",t,pe(o,r))}static \u0275fac=function(r){return new(r||s)(R(F))};static \u0275prov=P({token:s,factory:s.\u0275fac})}return s})(),rt=/^\)\]\}',?\n/;function Ge(s){if(s.url)return s.url;let e=le.toLocaleLowerCase();return s.headers.get(e)}var je=new S(""),Y=(()=>{class s{fetchImpl=T(de,{optional:!0})?.fetch??((...t)=>globalThis.fetch(...t));ngZone=T(Ie);destroyRef=T(Ee);destroyed=!1;constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0})}handle(t){return new oe(r=>{let o=new AbortController;this.doRequest(t,o.signal,r).then(ue,i=>r.error(new V({error:i})));let n;return t.timeout&&(n=this.ngZone.runOutsideAngular(()=>setTimeout(()=>{o.signal.aborted||o.abort(new DOMException("signal timed out","TimeoutError"))},t.timeout))),()=>{n!==void 0&&clearTimeout(n),o.abort()}})}async doRequest(t,r,o){let n=this.createRequestInit(t),i;try{let m=this.ngZone.runOutsideAngular(()=>this.fetchImpl(t.urlWithParams,I({signal:r},n)));it(m),o.next({type:O.Sent}),i=await m}catch(m){o.error(new V({error:m,status:m.status??0,statusText:m.statusText,url:t.urlWithParams,headers:m.headers}));return}let u=new g(i.headers),d=i.statusText,h=Ge(i)??t.urlWithParams,f=i.status,b=null;if(t.reportProgress&&o.next(new X({headers:u,status:f,statusText:d,url:h})),i.body){let m=i.headers.get("content-length"),M=[],c=i.body.getReader(),l=0,A,v,y=typeof Zone<"u"&&Zone.current,B=!1;if(await this.ngZone.runOutsideAngular(async()=>{for(;;){if(this.destroyed){await c.cancel(),B=!0;break}let{done:G,value:ie}=await c.read();if(G)break;if(M.push(ie),l+=ie.length,t.reportProgress){v=t.responseType==="text"?(v??"")+(A??=new TextDecoder).decode(ie,{stream:!0}):void 0;let Ae=()=>o.next({type:O.DownloadProgress,total:m?+m:void 0,loaded:l,partialText:v});y?y.run(Ae):Ae()}}}),B){o.complete();return}let k=this.concatChunks(M,l);try{let G=i.headers.get(J)??"";b=this.parseBody(t,k,G,f)}catch(G){o.error(new V({error:G,headers:new g(i.headers),status:i.status,statusText:i.statusText,url:Ge(i)??t.urlWithParams}));return}}f===0&&(f=b?_e:0);let N=f>=200&&f<300,x=i.redirected;N?(o.next(new j({body:b,headers:u,status:f,statusText:d,url:h,redirected:x})),o.complete()):o.error(new V({error:b,headers:u,status:f,statusText:d,url:h,redirected:x}))}parseBody(t,r,o,n){switch(t.responseType){case"json":let i=new TextDecoder().decode(r).replace(rt,"");if(i==="")return null;try{return JSON.parse(i)}catch(u){if(n<200||n>=300)return i;throw u}case"text":return new TextDecoder().decode(r);case"blob":return new Blob([r],{type:o});case"arraybuffer":return r.buffer}}createRequestInit(t){let r={},o;if(o=t.credentials,t.withCredentials&&(o="include"),t.headers.forEach((n,i)=>r[n]=i.join(",")),t.headers.has(ee)||(r[ee]=Le),!t.headers.has(J)){let n=t.detectContentTypeHeader();n!==null&&(r[J]=n)}return{body:t.serializeBody(),method:t.method,headers:r,credentials:o,keepalive:t.keepalive,cache:t.cache,priority:t.priority,mode:t.mode,redirect:t.redirect,referrer:t.referrer,integrity:t.integrity}}concatChunks(t,r){let o=new Uint8Array(r),n=0;for(let i of t)o.set(i,n),n+=i.length;return o}static \u0275fac=function(r){return new(r||s)};static \u0275prov=P({token:s,factory:s.\u0275fac})}return s})(),de=class{};function ue(){}function it(s){s.then(ue,ue)}function ot(s,e){return e(s)}function nt(s,e,t){return(r,o)=>Ve(t,()=>e(r,n=>s(n,o)))}var he=new S(""),Ue=new S(""),qe=new S("",{providedIn:"root",factory:()=>!0});var te=(()=>{class s extends F{backend;injector;chain=null;pendingTasks=T(Oe);contributeToStability=T(qe);constructor(t,r){super(),this.backend=t,this.injector=r}handle(t){if(this.chain===null){let r=Array.from(new Set([...this.injector.get(he),...this.injector.get(Ue,[])]));this.chain=r.reduceRight((o,n)=>nt(o,n,this.injector),ot)}if(this.contributeToStability){let r=this.pendingTasks.add();return this.chain(t,o=>this.backend.handle(o)).pipe(ve(r))}else return this.chain(t,r=>this.backend.handle(r))}static \u0275fac=function(r){return new(r||s)(R(L),R(Pe))};static \u0275prov=P({token:s,factory:s.\u0275fac})}return s})();var at=/^\)\]\}',?\n/,pt=RegExp(`^${le}:`,"m");function dt(s){return"responseURL"in s&&s.responseURL?s.responseURL:pt.test(s.getAllResponseHeaders())?s.getResponseHeader(le):null}var ce=(()=>{class s{xhrFactory;constructor(t){this.xhrFactory=t}handle(t){if(t.method==="JSONP")throw new w(-2800,!1);let r=this.xhrFactory;return z(null).pipe($(()=>new oe(n=>{let i=r.build();if(i.open(t.method,t.urlWithParams),t.withCredentials&&(i.withCredentials=!0),t.headers.forEach((c,l)=>i.setRequestHeader(c,l.join(","))),t.headers.has(ee)||i.setRequestHeader(ee,Le),!t.headers.has(J)){let c=t.detectContentTypeHeader();c!==null&&i.setRequestHeader(J,c)}if(t.timeout&&(i.timeout=t.timeout),t.responseType){let c=t.responseType.toLowerCase();i.responseType=c!=="json"?c:"text"}let u=t.serializeBody(),d=null,h=()=>{if(d!==null)return d;let c=i.statusText||"OK",l=new g(i.getAllResponseHeaders()),A=dt(i)||t.url;return d=new X({headers:l,status:i.status,statusText:c,url:A}),d},f=()=>{let{headers:c,status:l,statusText:A,url:v}=h(),y=null;l!==st&&(y=typeof i.response>"u"?i.responseText:i.response),l===0&&(l=y?_e:0);let B=l>=200&&l<300;if(t.responseType==="json"&&typeof y=="string"){let k=y;y=y.replace(at,"");try{y=y!==""?JSON.parse(y):null}catch(G){y=k,B&&(B=!1,y={error:G,text:y})}}B?(n.next(new j({body:y,headers:c,status:l,statusText:A,url:v||void 0})),n.complete()):n.error(new V({error:y,headers:c,status:l,statusText:A,url:v||void 0}))},b=c=>{let{url:l}=h(),A=new V({error:c,status:i.status||0,statusText:i.statusText||"Unknown Error",url:l||void 0});n.error(A)},N=b;t.timeout&&(N=c=>{let{url:l}=h(),A=new V({error:new DOMException("Request timed out","TimeoutError"),status:i.status||0,statusText:i.statusText||"Request timeout",url:l||void 0});n.error(A)});let x=!1,m=c=>{x||(n.next(h()),x=!0);let l={type:O.DownloadProgress,loaded:c.loaded};c.lengthComputable&&(l.total=c.total),t.responseType==="text"&&i.responseText&&(l.partialText=i.responseText),n.next(l)},M=c=>{let l={type:O.UploadProgress,loaded:c.loaded};c.lengthComputable&&(l.total=c.total),n.next(l)};return i.addEventListener("load",f),i.addEventListener("error",b),i.addEventListener("timeout",N),i.addEventListener("abort",b),t.reportProgress&&(i.addEventListener("progress",m),u!==null&&i.upload&&i.upload.addEventListener("progress",M)),i.send(u),n.next({type:O.Sent}),()=>{i.removeEventListener("error",b),i.removeEventListener("abort",b),i.removeEventListener("load",f),i.removeEventListener("timeout",N),t.reportProgress&&(i.removeEventListener("progress",m),u!==null&&i.upload&&i.upload.removeEventListener("progress",M)),i.readyState!==i.DONE&&i.abort()}})))}static \u0275fac=function(r){return new(r||s)(R(we))};static \u0275prov=P({token:s,factory:s.\u0275fac})}return s})(),ze=new S(""),ut="XSRF-TOKEN",ct=new S("",{providedIn:"root",factory:()=>ut}),lt="X-XSRF-TOKEN",ht=new S("",{providedIn:"root",factory:()=>lt}),W=class{},yt=(()=>{class s{doc;cookieName;lastCookieString="";lastToken=null;parseCount=0;constructor(t,r){this.doc=t,this.cookieName=r}getToken(){let t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=De(t,this.cookieName),this.lastCookieString=t),this.lastToken}static \u0275fac=function(r){return new(r||s)(R(ke),R(ct))};static \u0275prov=P({token:s,factory:s.\u0275fac})}return s})();function ft(s,e){let t=s.url.toLowerCase();if(!T(ze)||s.method==="GET"||s.method==="HEAD"||t.startsWith("http://")||t.startsWith("https://"))return e(s);let r=T(W).getToken(),o=T(ht);return r!=null&&!s.headers.has(o)&&(s=s.clone({headers:s.headers.set(o,r)})),e(s)}var se=(function(s){return s[s.Interceptors=0]="Interceptors",s[s.LegacyInterceptors=1]="LegacyInterceptors",s[s.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",s[s.NoXsrfProtection=3]="NoXsrfProtection",s[s.JsonpSupport=4]="JsonpSupport",s[s.RequestsMadeViaParent=5]="RequestsMadeViaParent",s[s.Fetch=6]="Fetch",s})(se||{});function $e(s,e){return{\u0275kind:s,\u0275providers:e}}function mt(...s){let e=[U,ce,te,{provide:F,useExisting:te},{provide:L,useFactory:()=>T(je,{optional:!0})??T(ce)},{provide:he,useValue:ft,multi:!0},{provide:ze,useValue:!0},{provide:W,useClass:yt}];for(let t of s)e.push(...t.\u0275providers);return Be(e)}function At(s){return $e(se.Interceptors,s.map(e=>({provide:he,useValue:e,multi:!0})))}function bt(){return $e(se.Fetch,[Y,{provide:je,useExisting:Y},{provide:L,useExisting:Y}])}var ye=class{_fns;constructor(){this._fns=[]}eject(e){let t=this._fns.indexOf(e);t!==-1&&(this._fns=[...this._fns.slice(0,t),...this._fns.slice(t+1)])}use(e){this._fns=[...this._fns,e]}},a={BASE:"",CREDENTIALS:"include",ENCODE_PATH:void 0,HEADERS:void 0,PASSWORD:void 0,TOKEN:void 0,USERNAME:void 0,VERSION:"1",WITH_CREDENTIALS:!1,interceptors:{response:new ye}};var q=class extends Error{url;status;statusText;body;request;constructor(e,t,r){super(r),this.name="ApiError",this.url=t.url,this.status=t.status,this.statusText=t.statusText,this.body=t.body,this.request=e}};var K=s=>typeof s=="string",fe=s=>K(s)&&s!=="",me=s=>s instanceof Blob,Je=s=>s instanceof FormData,Rt=s=>{try{return btoa(s)}catch{return Buffer.from(s).toString("base64")}},Tt=s=>{let e=[],t=(o,n)=>{e.push(`${encodeURIComponent(o)}=${encodeURIComponent(String(n))}`)},r=(o,n)=>{n!=null&&(n instanceof Date?t(o,n.toISOString()):Array.isArray(n)?n.forEach(i=>r(o,i)):typeof n=="object"?Object.entries(n).forEach(([i,u])=>r(`${o}[${i}]`,u)):t(o,n))};return Object.entries(s).forEach(([o,n])=>r(o,n)),e.length?`?${e.join("&")}`:""},vt=(s,e)=>{let t=s.ENCODE_PATH||encodeURI,r=e.url.replace("{api-version}",s.VERSION).replace(/{(.*?)}/g,(n,i)=>e.path?.hasOwnProperty(i)?t(String(e.path[i])):n),o=s.BASE+r;return e.query?o+Tt(e.query):o},Bt=s=>{if(s.formData){let e=new FormData,t=(r,o)=>{K(o)||me(o)?e.append(r,o):e.append(r,JSON.stringify(o))};return Object.entries(s.formData).filter(([,r])=>r!=null).forEach(([r,o])=>{Array.isArray(o)?o.forEach(n=>t(r,n)):t(r,o)}),e}},re=async(s,e)=>typeof e=="function"?e(s):e,Pt=(s,e)=>ge({token:re(e,s.TOKEN),username:re(e,s.USERNAME),password:re(e,s.PASSWORD),additionalHeaders:re(e,s.HEADERS)}).pipe(D(({token:t,username:r,password:o,additionalHeaders:n})=>{let i=Object.entries(I(I({Accept:"application/json"},n),e.headers)).filter(([,u])=>u!=null).reduce((u,[d,h])=>be(I({},u),{[d]:String(h)}),{});if(fe(t)&&(i.Authorization=`Bearer ${t}`),fe(r)&&fe(o)){let u=Rt(`${r}:${o}`);i.Authorization=`Basic ${u}`}return e.body!==void 0&&(e.mediaType?i["Content-Type"]=e.mediaType:me(e.body)?i["Content-Type"]=e.body.type||"application/octet-stream":K(e.body)?i["Content-Type"]="text/plain":Je(e.body)||(i["Content-Type"]="application/json")),new g(i)})),Vt=s=>{if(s.body)return s.mediaType?.includes("application/json")||s.mediaType?.includes("+json")?JSON.stringify(s.body):K(s.body)||me(s.body)||Je(s.body)?s.body:JSON.stringify(s.body)},kt=(s,e,t,r,o,n,i)=>t.request(e.method,r,{headers:i,body:o??n,withCredentials:s.WITH_CREDENTIALS,observe:"response"}),Et=(s,e)=>{if(e){let t=s.headers.get(e);if(K(t))return t}},Ot=s=>{if(s.status!==204&&s.body!==null)return s.body},It=(s,e)=>{let r=I({400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"Im a teapot",421:"Misdirected Request",422:"Unprocessable Content",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",510:"Not Extended",511:"Network Authentication Required"},s.errors)[e.status];if(r)throw new q(s,e,r);if(!e.ok){let o=e.status??"unknown",n=e.statusText??"unknown",i=(()=>{try{return JSON.stringify(e.body,null,2)}catch{return}})();throw new q(s,e,`Generic Error: status: ${o}; status text: ${n}; body: ${i}`)}},p=(s,e,t)=>{let r=vt(s,t),o=Bt(t),n=Vt(t);return Pt(s,t).pipe($(i=>kt(s,t,e,r,n,o,i)),$(async i=>{for(let f of s.interceptors.response._fns)i=await f(i);let u=Ot(i),d=Et(i,t.responseHeader),h=u;return t.responseTransformer&&i.ok&&(h=await t.responseTransformer(u)),{url:r,ok:i.ok,status:i.status,statusText:i.statusText,body:d??h}}),ae(i=>i.status?z({url:r,ok:i.ok,status:i.status,statusText:i.statusText,body:i.error??i.statusText}):ne(()=>i)),D(i=>(It(t,i),i.body)),ae(i=>ne(()=>i)))};var Xe=class s{constructor(e){this.http=e}getApiV1Commandline(){return p(a,this.http,{method:"GET",url:"/api/v1/commandline"})}static \u0275fac=function(t){return new(t||s)(R(U))};static \u0275prov=P({token:s,factory:s.\u0275fac,providedIn:"root"})},We=class s{constructor(e){this.http=e}postApiV1Commandline(e){return p(a,this.http,{method:"POST",url:"/api/v1/commandline",body:e.requestBody,mediaType:"application/json"})}getApiV1Acknowledgements(){return p(a,this.http,{method:"GET",url:"/api/v1/acknowledgements"})}postApiV1AuthRefresh(e={}){return p(a,this.http,{method:"POST",url:"/api/v1/auth/refresh",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthSignin(e){return p(a,this.http,{method:"POST",url:"/api/v1/auth/signin",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthLogin(e){return p(a,this.http,{method:"POST",url:"/api/v1/auth/login",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthIssuesignintoken(e){return p(a,this.http,{method:"POST",url:"/api/v1/auth/issuesignintoken",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthRefreshLogout(e={}){return p(a,this.http,{method:"POST",url:"/api/v1/auth/refresh/logout",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthIssuetokenByOperation(e){return p(a,this.http,{method:"POST",url:"/api/v1/auth/issuetoken/{operation}",path:{operation:e.operation}})}postApiV1AuthIssueForeverToken(){return p(a,this.http,{method:"POST",url:"/api/v1/auth/issue-forever-token"})}getApiV1Backupdefaults(){return p(a,this.http,{method:"GET",url:"/api/v1/backupdefaults"})}getApiV1Backups(e={}){return p(a,this.http,{method:"GET",url:"/api/v1/backups",query:{orderBy:e.orderBy}})}postApiV1Backups(e){return p(a,this.http,{method:"POST",url:"/api/v1/backups",query:{temporary:e.temporary,existingdb:e.existingdb},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupsImport(e){return p(a,this.http,{method:"POST",url:"/api/v1/backups/import",body:e.requestBody,mediaType:"application/json"})}getApiV1BugreportByReportid(e){return p(a,this.http,{method:"GET",url:"/api/v1/bugreport/{reportid}",path:{reportid:e.reportid},query:{token:e.token}})}getApiV1Changelog(e={}){return p(a,this.http,{method:"GET",url:"/api/v1/changelog",query:{"from-update":e.fromUpdate}})}getApiV1CommandlineByRunid(e){return p(a,this.http,{method:"GET",url:"/api/v1/commandline/{runid}",path:{runid:e.runid},query:{offset:e.offset,pagesize:e.pagesize}})}postApiV1CommandlineByRunidAbort(e){return p(a,this.http,{method:"POST",url:"/api/v1/commandline/{runid}/abort",path:{runid:e.runid}})}postApiV1Filesystem(e){return p(a,this.http,{method:"POST",url:"/api/v1/filesystem",query:{onlyFolders:e.onlyFolders,showHidden:e.showHidden},body:e.requestBody,mediaType:"application/json"})}postApiV1FilesystemValidate(e){return p(a,this.http,{method:"POST",url:"/api/v1/filesystem/validate",body:e.requestBody,mediaType:"application/json"})}getApiV1Licenses(){return p(a,this.http,{method:"GET",url:"/api/v1/licenses"})}getApiV1LogdataPoll(e){return p(a,this.http,{method:"GET",url:"/api/v1/logdata/poll",query:{level:e.level,id:e.id,pagesize:e.pagesize}})}getApiV1LogdataLog(e={}){return p(a,this.http,{method:"GET",url:"/api/v1/logdata/log",query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1LogdataCrashlog(){return p(a,this.http,{method:"GET",url:"/api/v1/logdata/crashlog"})}getApiV1NotificationById(e){return p(a,this.http,{method:"GET",url:"/api/v1/notification/{id}",path:{id:e.id}})}deleteApiV1NotificationById(e){return p(a,this.http,{method:"DELETE",url:"/api/v1/notification/{id}",path:{id:e.id}})}getApiV1Notifications(){return p(a,this.http,{method:"GET",url:"/api/v1/notifications"})}getApiV1Progressstate(){return p(a,this.http,{method:"GET",url:"/api/v1/progressstate"})}getApiV1RemotecontrolStatus(){return p(a,this.http,{method:"GET",url:"/api/v1/remotecontrol/status"})}postApiV1RemoteoperationDbpath(e){return p(a,this.http,{method:"POST",url:"/api/v1/remoteoperation/dbpath",body:e.requestBody,mediaType:"application/json"})}postApiV1RemoteoperationTest(e){return p(a,this.http,{method:"POST",url:"/api/v1/remoteoperation/test",query:{autocreate:e.autocreate},body:e.requestBody,mediaType:"application/json"})}postApiV1RemoteoperationCreate(e){return p(a,this.http,{method:"POST",url:"/api/v1/remoteoperation/create",body:e.requestBody,mediaType:"application/json"})}getApiV1Serversettings(){return p(a,this.http,{method:"GET",url:"/api/v1/serversettings"})}patchApiV1Serversettings(e){return p(a,this.http,{method:"PATCH",url:"/api/v1/serversettings",body:e.requestBody,mediaType:"application/json"})}getApiV1ServersettingByKey(e){return p(a,this.http,{method:"GET",url:"/api/v1/serversetting/{key}",path:{key:e.key}})}putApiV1ServersettingByKey(e){return p(a,this.http,{method:"PUT",url:"/api/v1/serversetting/{key}",path:{key:e.key},body:e.requestBody,mediaType:"application/json"})}getApiV1Serverstate(e={}){return p(a,this.http,{method:"GET",url:"/api/v1/serverstate",query:{lastEventId:e.lastEventId,longpoll:e.longpoll,duration:e.duration}})}postApiV1ServerstatePause(e={}){return p(a,this.http,{method:"POST",url:"/api/v1/serverstate/pause",query:{duration:e.duration,pauseTransfers:e.pauseTransfers}})}postApiV1ServerstateResume(){return p(a,this.http,{method:"POST",url:"/api/v1/serverstate/resume"})}getApiV1Systeminfo(){return p(a,this.http,{method:"GET",url:"/api/v1/systeminfo"})}getApiV1SysteminfoFiltergroups(){return p(a,this.http,{method:"GET",url:"/api/v1/systeminfo/filtergroups"})}getApiV1Tasks(){return p(a,this.http,{method:"GET",url:"/api/v1/tasks"})}getApiV1TaskByTaskid(e){return p(a,this.http,{method:"GET",url:"/api/v1/task/{taskid}",path:{taskid:e.taskid}})}postApiV1TaskByTaskidStop(e){return p(a,this.http,{method:"POST",url:"/api/v1/task/{taskid}/stop",path:{taskid:e.taskid}})}postApiV1TaskByTaskidAbort(e){return p(a,this.http,{method:"POST",url:"/api/v1/task/{taskid}/abort",path:{taskid:e.taskid}})}getApiV1Uisettings(){return p(a,this.http,{method:"GET",url:"/api/v1/uisettings"})}postApiV1Uisettings(e){return p(a,this.http,{method:"POST",url:"/api/v1/uisettings",body:e.requestBody,mediaType:"application/json"})}getApiV1UisettingsByScheme(e){return p(a,this.http,{method:"GET",url:"/api/v1/uisettings/{scheme}",path:{scheme:e.scheme}})}patchApiV1UisettingsByScheme(e){return p(a,this.http,{method:"PATCH",url:"/api/v1/uisettings/{scheme}",path:{scheme:e.scheme},body:e.requestBody,mediaType:"application/json"})}postApiV1UpdatesCheck(){return p(a,this.http,{method:"POST",url:"/api/v1/updates/check"})}postApiV1WebmoduleByModulekey(e){return p(a,this.http,{method:"POST",url:"/api/v1/webmodule/{modulekey}",path:{modulekey:e.modulekey},body:e.requestBody,mediaType:"application/json"})}getApiV1BackupById(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}",path:{id:e.id}})}putApiV1BackupById(e){return p(a,this.http,{method:"PUT",url:"/api/v1/backup/{id}",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}deleteApiV1BackupById(e){return p(a,this.http,{method:"DELETE",url:"/api/v1/backup/{id}",path:{id:e.id},query:{"delete-remote-files":e.deleteRemoteFiles,"delete-local-db":e.deleteLocalDb,force:e.force}})}getApiV1BackupByIdFiles(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}/files",path:{id:e.id},query:{filter:e.filter,time:e.time,"all-versions":e.allVersions,"prefix-only":e.prefixOnly,"folder-contents":e.folderContents}})}getApiV1BackupByIdLog(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}/log",path:{id:e.id},query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1BackupByIdRemotelog(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}/remotelog",path:{id:e.id},query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1BackupByIdFilesets(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}/filesets",path:{id:e.id},query:{"include-metadata":e.includeMetadata,"from-remote-only":e.fromRemoteOnly}})}getApiV1BackupByIdExportArgsonly(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}/export-argsonly",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase}})}getApiV1BackupByIdExportCmdline(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}/export-cmdline",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase}})}getApiV1BackupByIdExport(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}/export",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase,token:e.token}})}getApiV1BackupByIdIsdbusedelsewhere(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}/isdbusedelsewhere",path:{id:e.id}})}getApiV1BackupByIdIsactive(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}/isactive",path:{id:e.id}})}postApiV1BackupByIdDeletedb(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/deletedb",path:{id:e.id}})}postApiV1BackupByIdMovedb(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/movedb",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdUpdatedb(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/updatedb",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdRestore(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/restore",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdCreatereport(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/createreport",path:{id:e.id}})}postApiV1BackupByIdRepair(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/repair",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdRepairupdate(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/repairupdate",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdVacuum(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/vacuum",path:{id:e.id}})}postApiV1BackupByIdVerify(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/verify",path:{id:e.id}})}postApiV1BackupByIdCompact(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/compact",path:{id:e.id}})}postApiV1BackupByIdStart(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/start",path:{id:e.id},query:{skipQueue:e.skipQueue}})}postApiV1BackupByIdRun(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/run",path:{id:e.id},query:{skipQueue:e.skipQueue}})}postApiV1BackupByIdReportRemoteSize(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/report-remote-size",path:{id:e.id}})}postApiV1BackupByIdCopytotemp(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/copytotemp",path:{id:e.id}})}postApiV1RemotecontrolEnable(){return p(a,this.http,{method:"POST",url:"/api/v1/remotecontrol/enable"})}postApiV1RemotecontrolDisable(){return p(a,this.http,{method:"POST",url:"/api/v1/remotecontrol/disable"})}deleteApiV1RemotecontrolRegistration(){return p(a,this.http,{method:"DELETE",url:"/api/v1/remotecontrol/registration"})}postApiV1RemotecontrolRegister(e){return p(a,this.http,{method:"POST",url:"/api/v1/remotecontrol/register",body:e.requestBody,mediaType:"application/json"})}deleteApiV1RemotecontrolRegister(){return p(a,this.http,{method:"DELETE",url:"/api/v1/remotecontrol/register"})}postApiV2BackupListFilesets(e){return p(a,this.http,{method:"POST",url:"/api/v2/backup/list-filesets",body:e.requestBody,mediaType:"application/json"})}postApiV2BackupListFolder(e){return p(a,this.http,{method:"POST",url:"/api/v2/backup/list-folder",body:e.requestBody,mediaType:"application/json"})}postApiV2BackupListVersions(e){return p(a,this.http,{method:"POST",url:"/api/v2/backup/list-versions",body:e.requestBody,mediaType:"application/json"})}postApiV2BackupSearch(e){return p(a,this.http,{method:"POST",url:"/api/v2/backup/search",body:e.requestBody,mediaType:"application/json"})}postApiV2DestinationTest(e){return p(a,this.http,{method:"POST",url:"/api/v2/destination/test",body:e.requestBody,mediaType:"application/json"})}static \u0275fac=function(t){return new(t||s)(R(U))};static \u0275prov=P({token:s,factory:s.\u0275fac,providedIn:"root"})},Ke=class s{constructor(e){this.http=e}getApiV1Webmodules(){return p(a,this.http,{method:"GET",url:"/api/v1/webmodules"})}static \u0275fac=function(t){return new(t||s)(R(U))};static \u0275prov=P({token:s,factory:s.\u0275fac,providedIn:"root"})};export{g as a,j as b,U as c,mt as d,At as e,bt as f,Xe as g,We as h,Ke as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as z}from"./chunk-GXGIGJ4W.js";import{a as Q}from"./chunk-
|
|
1
|
+
import{a as z}from"./chunk-GXGIGJ4W.js";import{a as Q}from"./chunk-7LYN2XHO.js";import{d as B}from"./chunk-GCCJSS4C.js";import{d as E}from"./chunk-ABYM5HWA.js";import"./chunk-Z35OG2DV.js";import{B as q,D as $,G as j,b as x,c as O,d as P,e as I,f as T,j as F,o as D,q as G,r as k,t as R,u as A,w as V}from"./chunk-QF4DQYEP.js";import"./chunk-2QJVTZ56.js";import"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import{Cb as _,Db as t,Eb as o,Fb as s,H as u,Mb as M,Rc as N,Sa as c,Xc as y,Zb as w,_ as p,cb as h,ea as g,fa as f,gc as L,hc as v,kc as S,nc as r,pa as m,xb as C,yb as b}from"./chunk-QONLYWYC.js";import"./chunk-EUDKD2JW.js";var X=["passwordInput"];function H(a,e){a&1&&(t(0,"sh-alert",2),r(1," Remember to enter a password, if you can't remember the password open the duplicati client on the machine in question and make sure you open it through the tray icon then go into settings to change the password. "),o())}var l=new k,d=class a{#e=p(E);#t=p(B);rememberMe=Q("rememberMe",!1,!0);failedLogin=m(!1);successLogin=m(!1);isLoading=m(!1);loginForm=l.group({user:l.control(""),pass:l.control("",P.required),rememberMe:l.control(this.rememberMe())});passwordInput=y("passwordInput");passwordEffect=N(()=>{this.failedLogin()&&queueMicrotask(()=>this.passwordInput()?.nativeElement?.focus())});ngOnInit(){this.loginForm.controls.rememberMe.valueChanges.subscribe(e=>this.rememberMe.set(e??!1)),queueMicrotask(()=>this.passwordInput()?.nativeElement?.focus())}submit(){let e=this.loginForm.value.pass,n=this.loginForm.value.user;this.rememberMe.set(this.loginForm.value.rememberMe??!1),!n&&e&&(this.isLoading.set(!0),this.#t.login(e,this.rememberMe()).pipe(u(()=>{this.isLoading.set(!1),this.failedLogin.set(!0)})).subscribe({next:()=>{this.successLogin.set(!0),this.#e.navigate(["/"])}}))}static \u0275fac=function(n){return new(n||a)};static \u0275cmp=h({type:a,selectors:[["app-login"]],viewQuery:function(n,i){n&1&&L(i.passwordInput,X,5),n&2&&v()},decls:24,vars:4,consts:()=>{let e;return e=$localize`Enter your password`,[["passwordInput",""],[3,"submit","formGroup"],["type","warning"],[1,"logo-login"],[1,"inner"],[1,"login-row"],["type","text","hidden","","autocomplete","off","name","username","formControlName","user"],["for","password"],["href","https://docs.duplicati.com/detailed-descriptions/duplicati-access-password","target","_blank","rel","noopener noreferrer"],["type","password","name","password","autocomplete","current-password","placeholder",e,"tabindex","1","formControlName","pass"],["shButton","","type","submit",1,"raised","primary"],[1,"raised","primary"],["type","checkbox","id","rememberMe","tabindex","2","formControlName","rememberMe"],[1,"login-row","checkbox"],["for","rememberMe",1,"remember-me"]]},template:function(n,i){if(n&1){let J=M();t(0,"form",1),w("submit",function(){return g(J),f(i.submit())}),C(1,H,2,0,"sh-alert",2),t(2,"div",3),s(3,"app-logo"),o(),t(4,"div",4)(5,"div",5),s(6,"input",6),t(7,"sh-form-field")(8,"label",7),r(9," Password "),t(10,"a",8)(11,"sh-icon"),r(12,"question"),o()()(),s(13,"input",9,0),o(),t(15,"button",10),r(16," Login "),t(17,"sh-icon"),r(18,"arrow-right"),o()()(),t(19,"sh-checkbox",11),r(20," Keep me logged in "),s(21,"input",12),o(),t(22,"div",13),s(23,"label",14),o()()()}n&2&&(_("formGroup",i.loginForm),c(),b(i.failedLogin()&&!i.successLogin()?1:-1),c(14),S("loader",i.isLoading()))},dependencies:[R,F,O,x,I,T,D,G,z,j,A,q,V,$],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{width:100vw;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.75rem}form[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem}form[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]{align-self:flex-start}sh-alert[_ngcontent-%COMP%]{max-width:20rem;margin:0 auto}h3[_ngcontent-%COMP%]{font:var(--title-30)}.login-row[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.logo-login[_ngcontent-%COMP%]{top:0;left:0;padding:1.25rem;position:fixed}"],changeDetection:0})};export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as B}from"./chunk-
|
|
1
|
+
import{a as B}from"./chunk-CCKT2GLS.js";import{a as m}from"./chunk-6Q6SSTBK.js";import{a as k}from"./chunk-XLDVUBTQ.js";import{a as r}from"./chunk-7LYN2XHO.js";import{h as b}from"./chunk-2QJVTZ56.js";import{F as i,H as u,Qc as p,R as c,Rc as d,V as o,_ as s,pa as a}from"./chunk-QONLYWYC.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=p(()=>this.#o.hasBackupListSubscribeOption()&&this.#e.getConnectionMethod()==="websocket");#d=d(()=>{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};
|