@duplicati/ngclient 0.0.230 → 0.0.231
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/dest-icons/googleworkspace.png +0 -0
- package/assets/sh.woff2 +0 -0
- package/chunk--kVw-BwM.js +1 -0
- package/chunk-5Ay2I6OJ.js +2 -0
- package/chunk-6bHATzM2.js +1 -0
- package/{chunk-DtA6Mvdt.js → chunk-7qu0Yols.js} +1 -1
- package/{chunk-DmKJmG9z.js → chunk-B1FMMTzB.js} +1 -1
- package/{chunk-BjAIXsAS.js → chunk-B6VmpM-T.js} +1 -1
- package/chunk-B7vxwDBG.js +1 -0
- package/chunk-BAVJD-p4.js +1 -0
- package/chunk-BC2-YuwH.js +14 -0
- package/{chunk-C4kBXz3C.js → chunk-BFfFD-XE.js} +1 -1
- package/chunk-BHERv_y8.js +1 -0
- package/chunk-BIAFFPb6.js +1 -0
- package/{chunk-C6QX7znk.js → chunk-BRJ93eei.js} +1 -1
- package/{chunk-C-NgIZiF.js → chunk-BYJ0fSUP.js} +1 -1
- package/chunk-B_iekvt6.js +1 -0
- package/chunk-Baizh2Dx.js +1 -0
- package/{chunk-Ca1C9pJ0.js → chunk-Bcxzhjj8.js} +1 -1
- package/{chunk-D2g5mSLr.js → chunk-Bfak-Gjv.js} +1 -1
- package/{chunk-DD_QfWih.js → chunk-Bgx4dtaL.js} +1 -1
- package/chunk-BhGD1_v8.js +2 -0
- package/{chunk-Dj3xknEh.js → chunk-BhPCHFyT.js} +1 -1
- package/{chunk-B728v9oc.js → chunk-Bj1ToKwz.js} +2 -2
- package/{chunk-BIOMsSHI.js → chunk-BjSSXg5V.js} +1 -1
- package/chunk-BlfsmSZO.js +4 -0
- package/chunk-Bnu5Zyue.js +1 -0
- package/{chunk-OFYkgZA1.js → chunk-C1BwGQgo.js} +2 -2
- package/{chunk-D2g44FyO.js → chunk-C2H72Zk8.js} +2 -2
- package/{chunk-DPNAj9Vc.js → chunk-C3KPTLNN.js} +1 -1
- package/{chunk-B2TXzbpy.js → chunk-C5p3bQwH.js} +1 -1
- package/{chunk-C1kucB1O.js → chunk-C6beMvkJ.js} +2 -2
- package/chunk-CAgfvBGI.js +2 -0
- package/{chunk-BD9-OWSe.js → chunk-CDEvMQA2.js} +1 -1
- package/{chunk-OLi7f6y7.js → chunk-CI8lsvKT.js} +1 -1
- package/chunk-CP3edE1P.js +1 -0
- package/{chunk-wyNyzSXi.js → chunk-CQv4eyEK.js} +1 -1
- package/chunk-CTwvkMrj.js +2 -0
- package/chunk-CmexLvf7.js +2 -0
- package/chunk-Cng2PWKw.js +2 -0
- package/chunk-CqwyTVd3.js +1 -0
- package/{chunk-Fw6nFDZK.js → chunk-Crs56mDy.js} +2 -2
- package/{chunk-BYJA6sbi.js → chunk-CwKxis_6.js} +1 -1
- package/{chunk-DWkdK0Ib.js → chunk-CxjTj8X0.js} +1 -1
- package/chunk-CzJ3-6Pu.js +1 -0
- package/chunk-D2MSuPzM.js +2 -0
- package/{chunk-PVmXLw9b.js → chunk-D2aWqPl_.js} +1 -1
- package/{chunk-DuIUmwWN.js → chunk-D3SUPUQT.js} +3 -3
- package/{chunk-C7pjkqKB.js → chunk-D3d-eReU.js} +1 -1
- package/chunk-D5031IDL.js +3 -0
- package/{chunk-khm9J_G0.js → chunk-D7AP6g7S.js} +1 -1
- package/chunk-D9O-afXN.js +1 -0
- package/chunk-DA5X-TzJ.js +1 -0
- package/chunk-DAM-4k69.js +2 -0
- package/{chunk-Cgbi9MZq.js → chunk-DH6L3nQP.js} +1 -1
- package/chunk-DH6iiZWc.js +3 -0
- package/{chunk-D5lj-fQk.js → chunk-DKacf9Tj.js} +1 -1
- package/{chunk-BzIY4AaX.js → chunk-DKwqdnLJ.js} +1 -1
- package/{chunk-CJ0GoaW1.js → chunk-DNUCXG8E.js} +1 -1
- package/chunk-DPpQ_8VM.js +1 -0
- package/chunk-Da2vs6ff.js +1 -0
- package/chunk-DfcHtA-G.js +1 -0
- package/chunk-DlTsXgG2.js +2 -0
- package/{chunk-DaGzYsVs.js → chunk-DlqfMbsZ.js} +1 -1
- package/chunk-DoYGADYB.js +1 -0
- package/{chunk-RQ_MoiOh.js → chunk-DuHXCtrV.js} +1 -1
- package/{chunk-CT9ziigM.js → chunk-DuTbfCdT.js} +2 -2
- package/{chunk-dmyIQdVx.js → chunk-EwTTC1EW.js} +1 -1
- package/{chunk-I0R6Ty-p.js → chunk-JMkz2RrF.js} +1 -1
- package/chunk-PGDvGDW-.js +1 -0
- package/{chunk-CRAg6SRo.js → chunk-PONAC1Ya.js} +1 -1
- package/chunk-RqvNv7T_.js +2 -0
- package/{chunk-DFEb6rgg.js → chunk-SycSMD-r.js} +2 -2
- package/chunk-U0VOUPLl.js +1 -0
- package/chunk-Z5fN6CGR.js +1 -0
- package/chunk-d4cdVCUg.js +2 -0
- package/{chunk-DN6f5jXR.js → chunk-dCFVYHva.js} +1 -1
- package/{chunk-D6aNT_wo.js → chunk-gaP3Sx_C.js} +1 -1
- package/chunk-mnaJWx8D.js +1 -0
- package/chunk-oTpkLrqH.js +1 -0
- package/chunk-tpJJunhQ.js +1 -0
- package/index.html +1 -1
- package/locale/messages.de.json +1 -1
- package/locale/messages.de_CH.json +1 -1
- package/locale/messages.de_DE.json +1 -1
- package/locale/messages.en.json +65 -1
- package/locale/messages.fr.json +1 -1
- package/locale/messages.fr_CA.json +1 -1
- package/locale/messages.fr_FR.json +1 -1
- package/locale/messages.it.json +95 -2
- package/locale/messages.it_IT.json +94 -1
- package/locale/messages.json +65 -1
- package/locale/messages.nl_BE.json +1 -1
- package/locale/messages.nl_NL.json +1 -1
- package/locale/messages.zh_HK.json +152 -8
- package/main-QLXVXD6E.js +16 -0
- package/package.json +1 -1
- package/chunk-3RXp81pP.js +0 -1
- package/chunk-B0RBkC1E.js +0 -1
- package/chunk-BB1pOOUx.js +0 -1
- package/chunk-BIL3nR4_.js +0 -2
- package/chunk-BOOAIFTC.js +0 -1
- package/chunk-BaGYaLxZ.js +0 -2
- package/chunk-Bceym75m.js +0 -1
- package/chunk-BfZh4DNq.js +0 -2
- package/chunk-BlSN71kd.js +0 -1
- package/chunk-Bq7wRTmy.js +0 -2
- package/chunk-ByhuT4BS.js +0 -14
- package/chunk-CBgNjPex.js +0 -1
- package/chunk-CEyp0Xmg.js +0 -1
- package/chunk-CFne6FXR.js +0 -1
- package/chunk-CGn_EA_5.js +0 -2
- package/chunk-CJ1mxauG.js +0 -2
- package/chunk-CMJCX33P.js +0 -1
- package/chunk-CWAvlP_u.js +0 -1
- package/chunk-CYQJGwsB.js +0 -1
- package/chunk-Ca-HIRNP.js +0 -1
- package/chunk-CegwkGVu.js +0 -3
- package/chunk-CgcnOoRq.js +0 -2
- package/chunk-Ck9c9Juw.js +0 -1
- package/chunk-CnRCpl-v.js +0 -2
- package/chunk-CrgyDps4.js +0 -1
- package/chunk-DDBflo2l.js +0 -4
- package/chunk-Df7q8ewK.js +0 -1
- package/chunk-Dgns65Zu.js +0 -2
- package/chunk-Dh6x3lXP.js +0 -2
- package/chunk-DipTNkHN.js +0 -1
- package/chunk-DkdGEw1e.js +0 -1
- package/chunk-DtdFhFa9.js +0 -1
- package/chunk-DwKPz2Gn.js +0 -3
- package/chunk-DwMhABnQ.js +0 -2
- package/chunk-HWQc1Hoa.js +0 -1
- package/chunk-LL0IHZns.js +0 -1
- package/chunk-Zo-grJt3.js +0 -1
- package/chunk-glhLCQrb.js +0 -1
- package/chunk-yF6CJHRg.js +0 -1
- package/main-KFKZO6SJ.js +0 -16
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {y,F,m}from'./chunk-BFfFD-XE.js';import {p as pn$1,N as Ne,C as Ct$1,M as Mt}from'./chunk-CmexLvf7.js';import {I}from'./chunk-Bgx4dtaL.js';import {J}from'./chunk-D7AP6g7S.js';import'./chunk-CQv4eyEK.js';import {d as d$1,E as Ee,L as Le,x as xe,V,h,R as Re,W as We,B as Be,T as Te,G,I as Ie}from'./chunk-DH6iiZWc.js';import {N as Nt$1,m as m$2}from'./chunk-DuTbfCdT.js';import {v as ve$1}from'./chunk-DKacf9Tj.js';import {x}from'./chunk-gaP3Sx_C.js';import'./chunk-CI8lsvKT.js';import {D}from'./chunk-C5p3bQwH.js';import {T,e as ee,aw as W,m as m$1,E as D1,G as Ge,z as za$1,N as Nt,h as hw,v,d as N,u as ue,Q as Qi$1,V as Vg,n as nC,$ as $l,f as aT,L as Lg,j as vg,F as Fg,s as CD,A as yg,C as CE,i as cT,y as _D,o as oC,W as Wg,K as fC,a6 as be,l as vT,w as jC,aP as ql,aQ as Gl,p as cm,Y as Yg,x as am,cc as E,H as qu,aZ as ee$1,af as E1,b as I1,M as aC,ak as um,al as WC,ac as v1,ai as m$3,aj as l,U as UC,a1 as dT,a2 as fT,bF as ve$2,cd as wy,aG as pt,aV as sy,ay as Gu,b0 as Hs,b1 as oy,at as h$1,b_ as ei,_ as _t$1,ab as C$1,bK as Dy,ce as nd,k as iC,r as kd,O as Od,bu as rE,X as cC,a3 as KC,ae as eo$1,c8 as T1,aJ as ci$1,bW as re,bV as B,bg as ag,aD as YC,c9 as Ug,cf as mo$1,bk as j,cg as Ss$1,ch as xs$1,ci as S,ao as qC,ar as Qp,aC as mg,ap as lT,c6 as lb,cj as Sr$1,J as om,bv as N$1,a4 as uT,aa as Ql,g as NC,ag as Zg,c4 as pC,a$ as JC,ck as eb,b$ as Dg,aF as XC,bx as _C,aB as im}from'./main-QLXVXD6E.js';import {f}from'./chunk-C3KPTLNN.js';import {d}from'./chunk-PONAC1Ya.js';import {F as Fe,A as Ae}from'./chunk-D3SUPUQT.js';import {j as jn,m as me,G as Gn,T as Tn$1,Z as Ze$1,R as Rn,P as Pn,g as gn$1,h as hn,L,B as Bn,J as Jt,l as ln,f as ft,e as en$1,y as yt,b as m$4,D as D$1}from'./chunk-DoYGADYB.js';import {a as at}from'./chunk-Crs56mDy.js';import {C}from'./chunk-Bcxzhjj8.js';import {O}from'./chunk-BYJ0fSUP.js';import'./chunk-D2aWqPl_.js';import {L as L$1,$,F as F$1}from'./chunk-D3d-eReU.js';var zt=class i{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||i)};static \u0275prov=ee$1({token:i,factory:i.\u0275fac,providedIn:"root"})};function gt(i){if(Sr$1(i))return i();if(Array.isArray(i))return i.map(t=>gt(t));if(typeof i=="object"&&i!==null){let t={};for(let e in i)i.hasOwnProperty(e)&&(t[e]=gt(i[e]));return t}return i}var ui=i=>i;function ai(i,t){let e=mo$1(i,ui,t?.equal),n=e[j],o=e;return o.set=a=>{let _=e();return Ss$1(n,a),()=>{Ss$1(n,_);}},o.update=a=>{let _=e();return xs$1(n,a),()=>{Ss$1(n,_);}},e}var st=class i{#e=T(E);isSaving=Ge(false);resourceDestinations=$({stream:()=>this.#e.getApiV2ConnectionStrings()});destinations=ai(()=>{let t=this.resourceDestinations.value()?.Data;return t||[]});save(t,e){return this.isSaving.set(true),e.Description="",(t==="new"?this.#e.postApiV2ConnectionStrings({requestBody:e}):this.#e.putApiV2ConnectionStringById({id:t.ID,requestBody:e})).pipe(qu(()=>{this.isSaving.set(false);}))}getById(t){return this.#e.getApiV2ConnectionStringById({id:t})}delete(t){return this.#e.deleteApiV2ConnectionStringById({id:t})}reload(){this.resourceDestinations.reload();}updateBackups(t,e){return this.#e.postApiV2ConnectionStringByIdUpdateBackups({id:t,requestBody:{BackupIDs:e}})}static \u0275fac=function(e){return new(e||i)};static \u0275prov=ee$1({token:i,factory:i.\u0275fac,providedIn:"root"})};var pi=["daysRef"];function mi(i,t){if(i&1&&jC(0),i&2){let e=iC();Ql(" - ",e.getMonthName(e.getLastVisibleMonth())," ");}}function gi(i,t){if(i&1&&(Qi$1(0,"div"),jC(1),$l()),i&2){let e=t.$implicit;CE(),om(e);}}function Ci(i,t){if(i&1){let e=vT();Qi$1(0,"button",9,1),Vg("keydown",function(o){let a=kd(e).$implicit,_=iC(2);return Od(_.onKeydown(o,a))})("click",function(){let o=kd(e).$implicit,a=pC(1),_=iC(2);return Od(_.setDate(o,a))}),jC(2),$l();}if(i&2){let e=t.$implicit,n=iC().$implicit,o=iC();NC(o.isDateSelected(e)),Yg("out-of-scope",!o.isCurrentMonth(e,n)),mg("aria-label",o.getAriaLabel(e))("tabindex",o.getTabIndex(e))("aria-selected",o.isDateSelectedBool(e)),CE(2),Ql(" ",e.getDate()," ");}}function Ti(i,t){if(i&1&&(Qi$1(0,"article",7),vg(1,"div",10),$l()),i&2){let e=iC(2);CE(),_C(e.selectedDateStylePosition());}}function Si(i,t){if(i&1&&(Qi$1(0,"div",5)(1,"nav",6),dT(2,gi,2,1,"div",null,lT),$l(),Qi$1(4,"div",7,0),dT(6,Ci,3,8,"button",8,lT),aT(8,Ti,2,2,"article",7),$l()()),i&2){let e=t.$implicit,n=iC();CE(2),fT(n.weekdays()),CE(4),fT(n.getMonthDates(e)),CE(2),cT(n.asRange()?-1:8);}}var fi=[[["label"]],[["","prefix",""]],[["","textPrefix",""]],[["input"]],[["","textSuffix",""]],[["","suffix",""]]],hi=["label","[prefix]","[textPrefix]","input","[textSuffix]","[suffix]"],Ei=["ngProjectAs","label",5,["label"]],yi=["ngProjectAs","[prefix]",5,["","prefix",""]],Ni=["ngProjectAs","[textPrefix]",5,["","textPrefix",""]],Fi=["ngProjectAs","[textSuffix]",5,["","textSuffix",""]],Di=["ngProjectAs","[suffix]",5,["","suffix",""]];function Ai(i,t){if(i&1&&(Qi$1(0,"div",3),jC(1),$l()),i&2){let e=iC();CE(),Ql(" ",e._maskedDate()," ");}}function Ii(i,t){if(i&1){let e=vT();Qi$1(0,"sh-datepicker",7),Vg("dateChange",function(o){kd(e);let a=iC();return Od(a.onDateChange(o))})("tabbedOut",function(){kd(e);let o=iC();return Od(o.isOpen.set(false))}),$l();}if(i&2){let e=iC();NC(e.currentClass()),yg("date",e.internalDate());}}function Oi(i,t){}var Pi=`sh-daterange-input sh-form-field-popover .input-wrap .input,sh-datepicker-input sh-form-field-popover .input-wrap .input{display:grid;grid-template-columns:1fr auto auto;align-items:center}sh-daterange-input sh-form-field-popover .input-wrap .input.active-start input:first-of-type,sh-datepicker-input sh-form-field-popover .input-wrap .input.active-start input:first-of-type{color:var(--primary-8)}sh-daterange-input sh-form-field-popover .input-wrap .input.active-end input:last-of-type,sh-datepicker-input sh-form-field-popover .input-wrap .input.active-end input:last-of-type{color:var(--primary-8)}sh-daterange-input sh-form-field-popover .input-wrap [suffix],sh-datepicker-input sh-form-field-popover .input-wrap [suffix]{margin-right:.75rem}sh-daterange-input sh-form-field-popover .masked-value,sh-datepicker-input sh-form-field-popover .masked-value{font:var(--paragraph-30B);color:var(--base-8);display:flex;gap:.25rem}sh-daterange-input sh-form-field-popover .masked-value.active-start .start-val,sh-datepicker-input sh-form-field-popover .masked-value.active-start .start-val{color:var(--primary-8)}sh-daterange-input sh-form-field-popover .masked-value.active-end .end-val,sh-datepicker-input sh-form-field-popover .masked-value.active-end .end-val{color:var(--primary-8)}sh-daterange-input sh-form-field-popover .masked-value+input+input,sh-daterange-input sh-form-field-popover .masked-value+input,sh-datepicker-input sh-form-field-popover .masked-value+input+input,sh-datepicker-input sh-form-field-popover .masked-value+input{opacity:0;height:0;width:0;margin:0}sh-daterange-input sh-form-field-popover [suffix]+[suffix].default-indicator,sh-datepicker-input sh-form-field-popover [suffix]+[suffix].default-indicator{display:none}sh-daterange-input sh-datepicker,sh-datepicker-input sh-datepicker{z-index:10000;position:relative;--dp-width: 15rem}sh-daterange-input sh-popover .popover-content{--dp-width: 18.75rem;min-width:var(--dp-width)}sh-daterange-input sh-form-field-popover.columns-1 sh-popover .popover-content{--dp-width: 18.75rem }sh-daterange-input sh-form-field-popover.columns-2 sh-popover .popover-content{--dp-width: 38.5rem }sh-daterange-input sh-form-field-popover.columns-3 sh-popover .popover-content{--dp-width: 58.25rem }sh-datepicker-input.sharp sh-datepicker,sh-daterange-input.sharp sh-datepicker,sh-datepicker.sharp{--dp-sel-s: var(--shape-1);--dp-ar: 1/.8;--dp-day-g: .5rem 0}sh-datepicker{--dp-sel-bg: var(--base-8);--dp-sel-bw: 0;--dp-sel-bc: transparent;--dp-sel-s: 50%;--dp-sel-c: #fff;--dp-day-c: var(--base-8);--dp-day-g: .25rem 0;--dp-day-f: var(--paragraph-20);--dp-width: 18.75rem;--dp-ar: 1/1;width:100%;padding:.5rem;max-width:var(--dp-width);display:flex;flex-direction:column}sh-datepicker.disabled{opacity:.5;pointer-events:none;-webkit-user-select:none;user-select:none;cursor:initial}sh-datepicker.columns-1{--dp-width: 18.75rem }sh-datepicker.columns-2{--dp-width: 38.5rem }sh-datepicker.columns-3{--dp-width: 58.25rem }sh-datepicker.columns-4{--dp-width: 78rem }sh-datepicker.columns-5{--dp-width: 97.75rem }sh-datepicker.columns-6{--dp-width: 117.5rem }sh-datepicker.columns-7{--dp-width: 137.25rem }sh-datepicker.columns-8{--dp-width: 157rem }sh-datepicker.columns-9{--dp-width: 176.75rem }sh-datepicker.columns-10{--dp-width: 196.5rem }sh-datepicker.columns-11{--dp-width: 216.25rem }sh-datepicker.columns-12{--dp-width: 236rem }sh-datepicker.as-range section .days>div.sel,sh-datepicker.as-range section .days>button.sel{background:var(--dp-sel-bg);opacity:.5;border-radius:0}sh-datepicker.as-range section .days>div.month-start,sh-datepicker.as-range section .days>div.week-start,sh-datepicker.as-range section .days>div.first,sh-datepicker.as-range section .days>button.month-start,sh-datepicker.as-range section .days>button.week-start,sh-datepicker.as-range section .days>button.first{border-top-left-radius:var(--dp-sel-s);border-bottom-left-radius:var(--dp-sel-s)}sh-datepicker.as-range section .days>div.month-end,sh-datepicker.as-range section .days>div.week-end,sh-datepicker.as-range section .days>div.last,sh-datepicker.as-range section .days>button.month-end,sh-datepicker.as-range section .days>button.week-end,sh-datepicker.as-range section .days>button.last{border-top-right-radius:var(--dp-sel-s);border-bottom-right-radius:var(--dp-sel-s)}sh-datepicker.as-range section .days>div.first,sh-datepicker.as-range section .days>div.last,sh-datepicker.as-range section .days>button.first,sh-datepicker.as-range section .days>button.last{opacity:1}sh-datepicker.as-range .month .days>div.out-of-scope,sh-datepicker.as-range .month .days>button.out-of-scope{opacity:0;pointer-events:none}sh-datepicker header{display:flex;align-items:center;justify-content:space-between;padding:.25rem 0;gap:0}sh-datepicker header .title{font:var(--paragraph-20)}sh-datepicker header button{appearance:none;background-color:transparent;border:0;cursor:pointer;height:2rem;color:var(--base-8)}sh-datepicker header button:focus{outline:none}sh-datepicker .months-container{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:1rem}sh-datepicker .month{display:grid;grid-template-columns:repeat(7,1fr);grid-template-rows:1fr 6fr;gap:var(--dp-day-g);align-items:flex-start}sh-datepicker .month .days,sh-datepicker .month .weekdays{display:grid;grid-column:1/-1;gap:var(--dp-day-g);grid-template-columns:subgrid;position:relative}sh-datepicker .month .days>.days,sh-datepicker .month .weekdays>.days{position:absolute;top:0;left:0;width:100%;height:100%;display:grid;grid-template-columns:repeat(7,1fr);grid-template-rows:repeat(7,1fr);gap:var(--dp-day-g);z-index:0}sh-datepicker .month .days>div,sh-datepicker .month .days>button,sh-datepicker .month .weekdays>div,sh-datepicker .month .weekdays>button{appearance:none;background:transparent;border:none;padding:0;margin:0;display:flex;align-items:center;justify-content:center;aspect-ratio:var(--dp-ar);cursor:pointer;position:relative;z-index:1;color:var(--dp-day-c);font:var(--dp-day-f);-webkit-user-select:none;user-select:none;border-radius:var(--dp-sel-s)}sh-datepicker .month .days>div:focus-visible,sh-datepicker .month .days>button:focus-visible,sh-datepicker .month .weekdays>div:focus-visible,sh-datepicker .month .weekdays>button:focus-visible{outline:2px solid var(--primary-10, #005fcc);outline-offset:-2px}sh-datepicker .month .days>div.sel,sh-datepicker .month .days>button.sel,sh-datepicker .month .weekdays>div.sel,sh-datepicker .month .weekdays>button.sel{color:var(--dp-sel-c);transition:color 75ms linear}sh-datepicker .month .days>div.out-of-scope,sh-datepicker .month .days>button.out-of-scope,sh-datepicker .month .weekdays>div.out-of-scope,sh-datepicker .month .weekdays>button.out-of-scope{opacity:.4}sh-datepicker .month .days>div.sel-el,sh-datepicker .month .days>button.sel-el,sh-datepicker .month .weekdays>div.sel-el,sh-datepicker .month .weekdays>button.sel-el{position:relative;top:0;left:0;transition:transform 75ms linear,opacity 75ms linear;background:var(--dp-sel-bg);border-radius:var(--dp-sel-s);border:var(--dp-sel-bw) solid var(--dp-sel-bc);opacity:0;box-sizing:border-box}sh-datepicker .month .weekdays>div{color:var(--base-12)}sh-datepicker.primary{--dp-sel-bg: var(--primary-8)}sh-datepicker.accent{--dp-sel-bg: var(--accent-8)}sh-datepicker.warn{--dp-sel-bg: var(--warn-8)}sh-datepicker.error{--dp-sel-bg: var(--error-8)}sh-datepicker.success{--dp-sel-bg: var(--success-8)}sh-datepicker.raised{--dp-sel-bg: var(--base-g2)}sh-datepicker.raised.primary{--dp-sel-bg: var(--primary-g2)}sh-datepicker.raised.accent{--dp-sel-bg: var(--accent-g2)}sh-datepicker.raised.warn{--dp-sel-bg: var(--warn-g2)}sh-datepicker.raised.error{--dp-sel-bg: var(--error-g2)}sh-datepicker.raised.success{--dp-sel-bg: var(--success-g2)}
|
|
2
|
+
`;var cn=(()=>{class i{constructor(){this.#e=new Date(new Date().setHours(0,0,0,0)),this.date=E1(null),this.endDate=E1(null),this.asRange=I1(false),this.activeRangeSelection=I1(null),this.monthsToShow=I1(1),this.disabled=I1(false),this.tabbedOut=v1(),this.startOfWeek=I1(1),this.weekdayLabels=I1(["Su","Mo","Tu","We","Th","Fr","Sa"]),this.daysRef=D1("daysRef"),this.currentDate=Ge(this.date()??this.#e),this.#t=T(N$1),this.prevMonthShortcut=Nt(()=>{let e="datepicker.prev-month",n=this.#t.getShortcut(e);return n?this.#t.getDisplayShortcut(e)||n:null}),this.nextMonthShortcut=Nt(()=>{let e="datepicker.next-month",n=this.#t.getShortcut(e);return n?this.#t.getDisplayShortcut(e)||n:null}),this.monthOffsets=Nt(()=>Array.from({length:this.monthsToShow()},(e,n)=>n)),this.selectedDateStylePosition=Ge(null),this.weekdays=Nt(()=>{let e=this.startOfWeek(),n=this.weekdayLabels();return n.slice(e).concat(n.slice(0,e))}),this.currentClasses=re(),this.someEffect=za$1(()=>{this.currentClasses();this.#o();}),this.#n=za$1(()=>{this.monthsToShow()>1||this.#i();}),this.focusedDate=Ge(null),this.#a=T(eo$1);}#e;#t;getLastVisibleMonth(){let e=this.monthsToShow()-1;return this.getOffsetDate(e)}getOffsetDate(e){let n=new Date(this.currentDate());return n.setMonth(n.getMonth()+e),n}getMonthDates(e){let n=this.getOffsetDate(e);return this.#r(n,this.startOfWeek())}#n;ngOnInit(){this.monthsToShow()!==1&&this.#i();}#i(){let e=this.date();e&&!isNaN(e.getTime())&&this.currentDate.set(e),this.#o();}#o(){setTimeout(()=>{let e=this.daysRef()?.nativeElement.querySelector(".sel");if(!e)return this.selectedDateStylePosition.update(n=>n?m$3(l({},n),{opacity:"0"}):null);this.setSelectedDateStylePosition(e);});}#r(e,n){let o=e.getFullYear(),a=e.getMonth(),_=new Date(o,a,1).getDay(),c=new Date(o,a+1,0).getDate(),u=[],T=_-n;T<0&&(T+=7);let D=new Date(o,a,0).getDate();for(let M=T-1;M>=0;M--)u.push(new Date(o,a-1,D-M,0,0,0,0));for(let M=1;M<=c;M++)u.push(new Date(o,a,M,0,0,0,0));let y=1;for(;u.length%7!==0;)u.push(new Date(o,a+1,y++,0,0,0,0));return u}nextMonth(){this.currentDate.update(e=>{let n=new Date(e);return n.setMonth(e.getMonth()+1),n}),this.#o();}previousMonth(){this.currentDate.update(e=>{let n=new Date(e);return n.setMonth(e.getMonth()-1),n}),this.#o();}setDate(e,n){this.focusedDate.set(e);let o=(a,_)=>{let c=0,u=0,T=0,D=0;return _&&((typeof _=="string"||typeof _=="number")&&(_=new Date(_)),_ instanceof Date&&!isNaN(_.getTime())&&(c=_.getHours(),u=_.getMinutes(),T=_.getSeconds(),D=_.getMilliseconds())),new Date(a.getFullYear(),a.getMonth(),a.getDate(),c,u,T,D)};if(!this.asRange())this.date.set(o(e,this.date())),this.endDate.set(null);else {let a=this.date(),_=this.endDate(),c=this.activeRangeSelection();if(c==="start"){let u=o(e,a);this.date.set(u),_&&u>_&&this.endDate.set(null);}else if(c==="end")if(!a||e<a){let u=o(e,a);this.date.set(u),this.endDate.set(null);}else {let u=o(e,_);this.endDate.set(u);}else if(a)if(_){let u=o(e,a);this.date.set(u),this.endDate.set(null);}else if(e<a){let u=o(e,a);this.date.set(u),this.endDate.set(null);}else {let u=o(e,_);this.endDate.set(u);}else {let u=o(e,a);this.date.set(u);}}this.asRange()||this.setSelectedDateStylePosition(n);}isDateSelected(e){let n=this.date(),o=this.endDate();if((typeof n=="string"||typeof n=="number")&&(n=new Date(n)),(typeof o=="string"||typeof o=="number")&&(o=new Date(o)),!n||!(n instanceof Date)||isNaN(n.getTime()))return null;let a=y=>new Date(y.getFullYear(),y.getMonth(),y.getDate(),0,0,0,0),_=y=>new Date(y.getFullYear(),y.getMonth(),y.getDate(),23,59,59,999),c=a(e),u=a(n),T=o?_(o):null,D=[];if(this.asRange())if(T===null)c.getTime()===u.getTime()&&D.push("sel first last");else {if(c.getTime()===u.getTime()&&D.push("first"),c.getTime()===a(T).getTime()&&D.push("last"),c>=u&&c<=T){D.push("sel");let J=c.getDay(),X=this.startOfWeek();J===X&&D.push("week-start");let k=(X+6)%7;J===k&&D.push("week-end");}let y=new Date(c);y.setDate(c.getDate()+1),new Date(c).setDate(c.getDate()-1);let G=c.getDate()===1,I=y.getMonth()!==c.getMonth();G&&D.push("month-start"),I&&D.push("month-end");}else c.getTime()===u.getTime()&&D.push("sel");return D.join(" ")||null}setSelectedDateStylePosition(e){this.selectedDateStylePosition.set({transform:`translate(${e.offsetLeft}px, ${e.offsetTop}px)`,opacity:"1"});}getMonthName(e){return e.toLocaleString("default",{month:"long"})}getFullYear(e){return e.getFullYear()}isCurrentMonth(e,n){let o=this.getOffsetDate(n);return e.getMonth()===o.getMonth()}#a;isSameDay(e,n){return !e||!n?false:e.getFullYear()===n.getFullYear()&&e.getMonth()===n.getMonth()&&e.getDate()===n.getDate()}getAriaLabel(e){return e.toLocaleDateString(void 0,{weekday:"long",year:"numeric",month:"long",day:"numeric"})}getTabIndex(e){let n=this.focusedDate(),o=this.date(),a=new Date;return n?this.isSameDay(e,n)?0:-1:o?this.isSameDay(e,o)?0:-1:this.isSameDay(e,a)?0:-1}isDateSelectedBool(e){let n=this.isDateSelected(e);return n?n.includes("sel"):false}onKeydown(e,n){let o=new Date(n),a=false;this.#t.matches(e,"datepicker.prev-month")?(o.setMonth(n.getMonth()-1),a=true):this.#t.matches(e,"datepicker.next-month")?(o.setMonth(n.getMonth()+1),a=true):this.#t.matches(e,"datepicker.prev-year")?(o.setFullYear(n.getFullYear()-1),a=true):this.#t.matches(e,"datepicker.next-year")?(o.setFullYear(n.getFullYear()+1),a=true):this.#t.matches(e,"datepicker.month-start")?(o=new Date(n.getFullYear(),n.getMonth(),1,0,0,0,0),a=true):this.#t.matches(e,"datepicker.month-end")?(o=new Date(n.getFullYear(),n.getMonth()+1,0,0,0,0,0),a=true):this.#t.matches(e,"datepicker.day-next")?(o.setDate(n.getDate()+1),a=true):this.#t.matches(e,"datepicker.day-prev")?(o.setDate(n.getDate()-1),a=true):this.#t.matches(e,"datepicker.week-next")?(o.setDate(n.getDate()+7),a=true):this.#t.matches(e,"datepicker.week-prev")&&(o.setDate(n.getDate()-7),a=true),a&&(e.preventDefault(),this.ensureDateVisible(o),this.focusedDate.set(o),setTimeout(()=>{let _=this.#a.nativeElement.querySelectorAll("button");if(_){let c=this.getAriaLabel(o),u=null;for(let T=0;T<_.length&&!(_[T].getAttribute("aria-label")===c&&(u=_[T],!_[T].classList.contains("out-of-scope")));T++);u&&u.focus();}}));}ensureDateVisible(e){let n=this.currentDate(),o=this.getLastVisibleMonth();if(e<new Date(n.getFullYear(),n.getMonth(),1))this.currentDate.set(new Date(e.getFullYear(),e.getMonth(),1)),this.#o();else if(e>new Date(o.getFullYear(),o.getMonth()+1,0)){let a=new Date(e);a.setMonth(a.getMonth()-this.monthsToShow()+1),a.setDate(1),this.currentDate.set(a),this.#o();}}focusActiveDate(){setTimeout(()=>{let e=this.#a.nativeElement.querySelector('button[tabindex="0"]');e&&e.focus();},50);}onFocusOut(e){setTimeout(()=>{let n=document.activeElement;n&&n!==document.body&&!this.#a.nativeElement.contains(n)&&this.tabbedOut.emit();});}static{this.\u0275fac=function(n){return new(n||i)};}static{this.\u0275cmp=hw({type:i,selectors:[["sh-datepicker"]],viewQuery:function(n,o){n&1&&Wg(o.daysRef,pi,5),n&2&&fC();},hostVars:6,hostBindings:function(n,o){n&1&&Vg("focusout",function(_){return o.onFocusOut(_)}),n&2&&(NC("columns-"+o.monthsToShow()),Yg("as-range",o.asRange())("disabled",o.disabled()));},inputs:{date:[1,"date"],endDate:[1,"endDate"],asRange:[1,"asRange"],activeRangeSelection:[1,"activeRangeSelection"],monthsToShow:[1,"monthsToShow"],disabled:[1,"disabled"],startOfWeek:[1,"startOfWeek"],weekdayLabels:[1,"weekdayLabels"]},outputs:{date:"dateChange",endDate:"endDateChange",tabbedOut:"tabbedOut"},decls:14,vars:5,consts:[["daysRef",""],["elementRef",""],["tabindex","-1",3,"click"],[1,"title"],[1,"months-container"],[1,"month"],[1,"weekdays"],[1,"days"],["type","button",3,"out-of-scope","class"],["type","button",3,"keydown","click"],[1,"sel-el"]],template:function(n,o){n&1&&(Qi$1(0,"header")(1,"button",2),Vg("click",function(){return o.previousMonth()}),Qi$1(2,"sh-icon"),jC(3,"caret-left"),$l()(),Qi$1(4,"div",3),jC(5),aT(6,mi,1,1),jC(7),$l(),Qi$1(8,"button",2),Vg("click",function(){return o.nextMonth()}),Qi$1(9,"sh-icon"),jC(10,"caret-right"),$l()()(),Qi$1(11,"section",4),dT(12,Si,9,1,"div",5,uT),$l()),n&2&&(CE(),mg("aria-keyshortcuts",o.prevMonthShortcut()),CE(4),Ql(" ",o.getMonthName(o.currentDate())," "),CE(),cT(o.monthsToShow()>1?6:-1),CE(),Ql(" ",o.getFullYear(o.currentDate())," "),CE(),mg("aria-keyshortcuts",o.nextMonthShortcut()),CE(4),fT(o.monthOffsets()));},dependencies:[N],styles:[`sh-daterange-input sh-form-field-popover .input-wrap .input,sh-datepicker-input sh-form-field-popover .input-wrap .input{display:grid;grid-template-columns:1fr auto auto;align-items:center}sh-daterange-input sh-form-field-popover .input-wrap .input.active-start input:first-of-type,sh-datepicker-input sh-form-field-popover .input-wrap .input.active-start input:first-of-type{color:var(--primary-8)}sh-daterange-input sh-form-field-popover .input-wrap .input.active-end input:last-of-type,sh-datepicker-input sh-form-field-popover .input-wrap .input.active-end input:last-of-type{color:var(--primary-8)}sh-daterange-input sh-form-field-popover .input-wrap [suffix],sh-datepicker-input sh-form-field-popover .input-wrap [suffix]{margin-right:.75rem}sh-daterange-input sh-form-field-popover .masked-value,sh-datepicker-input sh-form-field-popover .masked-value{font:var(--paragraph-30B);color:var(--base-8);display:flex;gap:.25rem}sh-daterange-input sh-form-field-popover .masked-value.active-start .start-val,sh-datepicker-input sh-form-field-popover .masked-value.active-start .start-val{color:var(--primary-8)}sh-daterange-input sh-form-field-popover .masked-value.active-end .end-val,sh-datepicker-input sh-form-field-popover .masked-value.active-end .end-val{color:var(--primary-8)}sh-daterange-input sh-form-field-popover .masked-value+input+input,sh-daterange-input sh-form-field-popover .masked-value+input,sh-datepicker-input sh-form-field-popover .masked-value+input+input,sh-datepicker-input sh-form-field-popover .masked-value+input{opacity:0;height:0;width:0;margin:0}sh-daterange-input sh-form-field-popover [suffix]+[suffix].default-indicator,sh-datepicker-input sh-form-field-popover [suffix]+[suffix].default-indicator{display:none}sh-daterange-input sh-datepicker,sh-datepicker-input sh-datepicker{z-index:10000;position:relative;--dp-width: 15rem}sh-daterange-input sh-popover .popover-content{--dp-width: 18.75rem;min-width:var(--dp-width)}sh-daterange-input sh-form-field-popover.columns-1 sh-popover .popover-content{--dp-width: 18.75rem }sh-daterange-input sh-form-field-popover.columns-2 sh-popover .popover-content{--dp-width: 38.5rem }sh-daterange-input sh-form-field-popover.columns-3 sh-popover .popover-content{--dp-width: 58.25rem }sh-datepicker-input.sharp sh-datepicker,sh-daterange-input.sharp sh-datepicker,sh-datepicker.sharp{--dp-sel-s: var(--shape-1);--dp-ar: 1/.8;--dp-day-g: .5rem 0}sh-datepicker{--dp-sel-bg: var(--base-8);--dp-sel-bw: 0;--dp-sel-bc: transparent;--dp-sel-s: 50%;--dp-sel-c: #fff;--dp-day-c: var(--base-8);--dp-day-g: .25rem 0;--dp-day-f: var(--paragraph-20);--dp-width: 18.75rem;--dp-ar: 1/1;width:100%;padding:.5rem;max-width:var(--dp-width);display:flex;flex-direction:column}sh-datepicker.disabled{opacity:.5;pointer-events:none;-webkit-user-select:none;user-select:none;cursor:initial}sh-datepicker.columns-1{--dp-width: 18.75rem }sh-datepicker.columns-2{--dp-width: 38.5rem }sh-datepicker.columns-3{--dp-width: 58.25rem }sh-datepicker.columns-4{--dp-width: 78rem }sh-datepicker.columns-5{--dp-width: 97.75rem }sh-datepicker.columns-6{--dp-width: 117.5rem }sh-datepicker.columns-7{--dp-width: 137.25rem }sh-datepicker.columns-8{--dp-width: 157rem }sh-datepicker.columns-9{--dp-width: 176.75rem }sh-datepicker.columns-10{--dp-width: 196.5rem }sh-datepicker.columns-11{--dp-width: 216.25rem }sh-datepicker.columns-12{--dp-width: 236rem }sh-datepicker.as-range section .days>div.sel,sh-datepicker.as-range section .days>button.sel{background:var(--dp-sel-bg);opacity:.5;border-radius:0}sh-datepicker.as-range section .days>div.month-start,sh-datepicker.as-range section .days>div.week-start,sh-datepicker.as-range section .days>div.first,sh-datepicker.as-range section .days>button.month-start,sh-datepicker.as-range section .days>button.week-start,sh-datepicker.as-range section .days>button.first{border-top-left-radius:var(--dp-sel-s);border-bottom-left-radius:var(--dp-sel-s)}sh-datepicker.as-range section .days>div.month-end,sh-datepicker.as-range section .days>div.week-end,sh-datepicker.as-range section .days>div.last,sh-datepicker.as-range section .days>button.month-end,sh-datepicker.as-range section .days>button.week-end,sh-datepicker.as-range section .days>button.last{border-top-right-radius:var(--dp-sel-s);border-bottom-right-radius:var(--dp-sel-s)}sh-datepicker.as-range section .days>div.first,sh-datepicker.as-range section .days>div.last,sh-datepicker.as-range section .days>button.first,sh-datepicker.as-range section .days>button.last{opacity:1}sh-datepicker.as-range .month .days>div.out-of-scope,sh-datepicker.as-range .month .days>button.out-of-scope{opacity:0;pointer-events:none}sh-datepicker header{display:flex;align-items:center;justify-content:space-between;padding:.25rem 0;gap:0}sh-datepicker header .title{font:var(--paragraph-20)}sh-datepicker header button{appearance:none;background-color:transparent;border:0;cursor:pointer;height:2rem;color:var(--base-8)}sh-datepicker header button:focus{outline:none}sh-datepicker .months-container{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:1rem}sh-datepicker .month{display:grid;grid-template-columns:repeat(7,1fr);grid-template-rows:1fr 6fr;gap:var(--dp-day-g);align-items:flex-start}sh-datepicker .month .days,sh-datepicker .month .weekdays{display:grid;grid-column:1/-1;gap:var(--dp-day-g);grid-template-columns:subgrid;position:relative}sh-datepicker .month .days>.days,sh-datepicker .month .weekdays>.days{position:absolute;top:0;left:0;width:100%;height:100%;display:grid;grid-template-columns:repeat(7,1fr);grid-template-rows:repeat(7,1fr);gap:var(--dp-day-g);z-index:0}sh-datepicker .month .days>div,sh-datepicker .month .days>button,sh-datepicker .month .weekdays>div,sh-datepicker .month .weekdays>button{appearance:none;background:transparent;border:none;padding:0;margin:0;display:flex;align-items:center;justify-content:center;aspect-ratio:var(--dp-ar);cursor:pointer;position:relative;z-index:1;color:var(--dp-day-c);font:var(--dp-day-f);-webkit-user-select:none;user-select:none;border-radius:var(--dp-sel-s)}sh-datepicker .month .days>div:focus-visible,sh-datepicker .month .days>button:focus-visible,sh-datepicker .month .weekdays>div:focus-visible,sh-datepicker .month .weekdays>button:focus-visible{outline:2px solid var(--primary-10, #005fcc);outline-offset:-2px}sh-datepicker .month .days>div.sel,sh-datepicker .month .days>button.sel,sh-datepicker .month .weekdays>div.sel,sh-datepicker .month .weekdays>button.sel{color:var(--dp-sel-c);transition:color 75ms linear}sh-datepicker .month .days>div.out-of-scope,sh-datepicker .month .days>button.out-of-scope,sh-datepicker .month .weekdays>div.out-of-scope,sh-datepicker .month .weekdays>button.out-of-scope{opacity:.4}sh-datepicker .month .days>div.sel-el,sh-datepicker .month .days>button.sel-el,sh-datepicker .month .weekdays>div.sel-el,sh-datepicker .month .weekdays>button.sel-el{position:relative;top:0;left:0;transition:transform 75ms linear,opacity 75ms linear;background:var(--dp-sel-bg);border-radius:var(--dp-sel-s);border:var(--dp-sel-bw) solid var(--dp-sel-bc);opacity:0;box-sizing:border-box}sh-datepicker .month .weekdays>div{color:var(--base-12)}sh-datepicker.primary{--dp-sel-bg: var(--primary-8)}sh-datepicker.accent{--dp-sel-bg: var(--accent-8)}sh-datepicker.warn{--dp-sel-bg: var(--warn-8)}sh-datepicker.error{--dp-sel-bg: var(--error-8)}sh-datepicker.success{--dp-sel-bg: var(--success-8)}sh-datepicker.raised{--dp-sel-bg: var(--base-g2)}sh-datepicker.raised.primary{--dp-sel-bg: var(--primary-g2)}sh-datepicker.raised.accent{--dp-sel-bg: var(--accent-g2)}sh-datepicker.raised.warn{--dp-sel-bg: var(--warn-g2)}sh-datepicker.raised.error{--dp-sel-bg: var(--error-g2)}sh-datepicker.raised.success{--dp-sel-bg: var(--success-g2)}
|
|
3
|
+
`],encapsulation:2});}}return i})(),ri=(()=>{class i{constructor(){this.#e=T(eo$1),this.ngControl=T1(m$4),this.#t=T(ci$1),this.#n=Ge(null),this.masking=I1("mediumDate"),this.closed=v1(),this._maskedDate=Nt(()=>{let e=this.internalDate(),n=this.masking();return n?e?this.#t.transform(e,n):null:e}),this.internalDate=Ge(null),this.isOpen=E1(false),this.currentClass=re(),this.#i=B("#input-wrap input"),this.datepicker=D1(cn),this.#o=za$1(()=>{this.isOpen()&&setTimeout(()=>{this.datepicker()?.focusActiveDate();},50);}),this.#r=za$1(()=>{let e=this.#i();if(!e.length)return;let n=e[0];n&&(this.#a(n),n.addEventListener("inputValueChanged",o=>{let a=o.detail.value;if(!a){this.internalDate.set(null);return}let _=new Date(a);if(isNaN(_.getTime())&&typeof a=="string"&&/^(\d{2}):(\d{2})/.test(a)){let c=a.match(/^(\d{2}):(\d{2})(?::(\d{2}))?/);if(c){let u=this.internalDate()||new Date;_=new Date(u),_.setHours(parseInt(c[1],10),parseInt(c[2],10),c[3]?parseInt(c[3],10):0,0);}}isNaN(_.getTime())||this.internalDate.set(_);}),n.addEventListener("focus",()=>{this.isOpen.set(true);}),this.#n.set(n),n.autocomplete="off",typeof n.value=="string"&&this.internalDate.set(n.value?new Date(n.value):null));});}#e;#t;#n;#i;#o;onFocusOut(e){setTimeout(()=>{let n=document.activeElement;n&&n!==document.body&&!this.#e.nativeElement.contains(n)&&this.isOpen.set(false);});}onDateChange(e){this.internalDate.set(e);let n=this.ngControl()?.control;if(n)n.setValue(e);else {let o=this.#n();o&&(o.value=e?e.toString():"",o.dispatchEvent(new Event("input")));}}close(){this.closed.emit(this.internalDate());}#r;#a(e){return Object.defineProperty(e,"value",{configurable:true,get(){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").get.call(this)},set(n){Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").set.call(this,n);let a=new CustomEvent("inputValueChanged",{bubbles:true,cancelable:true,detail:{value:n}});return this.dispatchEvent(a),n}}),e}static{this.\u0275fac=function(n){return new(n||i)};}static{this.\u0275cmp=hw({type:i,selectors:[["sh-datepicker-input"]],contentQueries:function(n,o,a){n&1&&Ug(a,o.ngControl,m$4,5),n&2&&fC();},viewQuery:function(n,o){n&1&&Wg(o.datepicker,cn,5),n&2&&fC();},hostBindings:function(n,o){n&1&&Vg("focusout",function(_){return o.onFocusOut(_)});},inputs:{masking:[1,"masking"],isOpen:[1,"isOpen"]},outputs:{closed:"closed",isOpen:"isOpenChange"},features:[YC([ci$1])],ngContentSelectors:hi,decls:15,vars:3,consts:[["defaultIndicator",""],[3,"closed","isOpenChange","isOpen"],["id","input-wrap","ngProjectAs","input",5,["input"],1,"input"],[1,"masked-value"],["suffix","",1,"default-indicator"],["popoverContent",""],[3,"date","class"],[3,"dateChange","tabbedOut","date"]],template:function(n,o){if(n&1){let a=vT();aC(fi),Qi$1(0,"sh-form-field-popover",1),Vg("closed",function(){return o.close()}),cm("isOpenChange",function(c){return kd(a),UC(o.isOpen,c)||(o.isOpen=c),Od(c)}),cC(1,0,Ei),cC(2,1,yi),cC(3,2,Ni),Qi$1(4,"div",2),aT(5,Ai,2,1,"div",3),cC(6,3),$l(),cC(7,4,Fi),cC(8,5,Di),Qi$1(9,"sh-icon",4),jC(10,"calendar"),$l(),Qi$1(11,"div",5),aT(12,Ii,1,3,"sh-datepicker",6),$l()(),ag(13,Oi,0,0,"ng-template",null,0,lb);}n&2&&(am("isOpen",o.isOpen),CE(5),cT(o.masking()?5:-1),CE(7),cT(o.isOpen()?12:-1));},dependencies:[cn,Ae,N],styles:[Pi],encapsulation:2});}}return i})();function Mi(i,t){if(i&1){let e=vT();Qi$1(0,"div",26)(1,"sh-form-field")(2,"label",27),nC(3,7),$l(),Qi$1(4,"input",28,0),cm("ngModelChange",function(o){kd(e);let a=iC(2);return UC(a.scheduleFields.nextTime.time,o)||(a.scheduleFields.nextTime.time=o),Od(o)}),$l(),CD(),Qi$1(6,"sh-icon",29),jC(7,"clock"),$l()(),Qi$1(8,"sh-datepicker-input",30)(9,"label",31),jC(10,"\xA0"),$l(),Qi$1(11,"input",32,1),cm("ngModelChange",function(o){kd(e);let a=iC(2);return UC(a.scheduleFields.nextTime.date,o)||(a.scheduleFields.nextTime.date=o),Od(o)}),$l(),CD(),Qi$1(13,"sh-icon",29),jC(14,"calendar"),$l()()(),Qi$1(15,"div",26)(16,"sh-form-field")(17,"label",33),nC(18,8),$l(),Qi$1(19,"input",34),cm("ngModelChange",function(o){kd(e);let a=iC(2);return UC(a.scheduleFields.runAgain.repeatValue,o)||(a.scheduleFields.runAgain.repeatValue=o),Od(o)}),$l(),CD(),$l(),Qi$1(20,"sh-select",35)(21,"input",36),cm("ngModelChange",function(o){kd(e);let a=iC(2);return UC(a.scheduleFields.runAgain.repeatUnit,o)||(a.scheduleFields.runAgain.repeatUnit=o),Od(o)}),$l(),CD(),$l()(),Qi$1(22,"sh-toggle-card",37),ql(23,38),nC(24,9),Gl(),Qi$1(25,"div",39)(26,"sh-toggle",24),Lg(27,10),Qi$1(28,"input",25),cm("ngModelChange",function(o){kd(e);let a=iC(2);return UC(a.scheduleFields.runAgain.allowedDays.mon,o)||(a.scheduleFields.runAgain.allowedDays.mon=o),Od(o)}),$l(),CD(),Fg(),$l(),Qi$1(29,"sh-toggle",24),Lg(30,11),Qi$1(31,"input",25),cm("ngModelChange",function(o){kd(e);let a=iC(2);return UC(a.scheduleFields.runAgain.allowedDays.tue,o)||(a.scheduleFields.runAgain.allowedDays.tue=o),Od(o)}),$l(),CD(),Fg(),$l(),Qi$1(32,"sh-toggle",24),Lg(33,12),Qi$1(34,"input",25),cm("ngModelChange",function(o){kd(e);let a=iC(2);return UC(a.scheduleFields.runAgain.allowedDays.wed,o)||(a.scheduleFields.runAgain.allowedDays.wed=o),Od(o)}),$l(),CD(),Fg(),$l(),Qi$1(35,"sh-toggle",24),Lg(36,13),Qi$1(37,"input",25),cm("ngModelChange",function(o){kd(e);let a=iC(2);return UC(a.scheduleFields.runAgain.allowedDays.thu,o)||(a.scheduleFields.runAgain.allowedDays.thu=o),Od(o)}),$l(),CD(),Fg(),$l(),Qi$1(38,"sh-toggle",24),Lg(39,14),Qi$1(40,"input",25),cm("ngModelChange",function(o){kd(e);let a=iC(2);return UC(a.scheduleFields.runAgain.allowedDays.fri,o)||(a.scheduleFields.runAgain.allowedDays.fri=o),Od(o)}),$l(),CD(),Fg(),$l(),Qi$1(41,"sh-toggle",24),Lg(42,15),Qi$1(43,"input",25),cm("ngModelChange",function(o){kd(e);let a=iC(2);return UC(a.scheduleFields.runAgain.allowedDays.sat,o)||(a.scheduleFields.runAgain.allowedDays.sat=o),Od(o)}),$l(),CD(),Fg(),$l(),Qi$1(44,"sh-toggle",24),Lg(45,16),Qi$1(46,"input",25),cm("ngModelChange",function(o){kd(e);let a=iC(2);return UC(a.scheduleFields.runAgain.allowedDays.sun,o)||(a.scheduleFields.runAgain.allowedDays.sun=o),Od(o)}),$l(),CD(),Fg(),$l()()();}if(i&2){let e=iC(2);CE(4),am("ngModel",e.scheduleFields.nextTime.time),_D(),CE(7),am("ngModel",e.scheduleFields.nextTime.date),_D(),CE(8),am("ngModel",e.scheduleFields.runAgain.repeatValue),_D(),CE(),yg("options",e.unitOptions)("isClearable",false),CE(),am("ngModel",e.scheduleFields.runAgain.repeatUnit),_D(),CE(),yg("disableToggle",true),CE(6),am("ngModel",e.scheduleFields.runAgain.allowedDays.mon),_D(),CE(3),am("ngModel",e.scheduleFields.runAgain.allowedDays.tue),_D(),CE(3),am("ngModel",e.scheduleFields.runAgain.allowedDays.wed),_D(),CE(3),am("ngModel",e.scheduleFields.runAgain.allowedDays.thu),_D(),CE(3),am("ngModel",e.scheduleFields.runAgain.allowedDays.fri),_D(),CE(3),am("ngModel",e.scheduleFields.runAgain.allowedDays.sat),_D(),CE(3),am("ngModel",e.scheduleFields.runAgain.allowedDays.sun),_D();}}function xi(i,t){if(i&1){let e=vT();Qi$1(0,"div",23)(1,"sh-toggle",24),Lg(2,5),Qi$1(3,"input",25),cm("ngModelChange",function(o){kd(e);let a=iC();return UC(a.scheduleFields.autoRun,o)||(a.scheduleFields.autoRun=o),Od(o)}),$l(),CD(),Fg(),$l(),Qi$1(4,"p"),nC(5,6),$l()(),aT(6,Mi,47,14);}if(i&2){let e=iC();CE(3),am("ngModel",e.scheduleFields.autoRun),_D(),CE(3),cT(e.scheduleFields.autoRun()?6:-1);}}var Ri=[{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`}],Wt=[{key:$localize`Daily 13:00`,value:"daily",data:{autoRun:true,nextTime:{time:"13:00:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:true,tue:true,wed:true,thu:true,fri:true,sat:true,sun:true}}}},{key:$localize`Weekdays 13:00`,value:"weekdays",data:{autoRun:true,nextTime:{time:"13:00:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:true,tue:true,wed:true,thu:true,fri:true,sat:false,sun:false}}}},{key:$localize`Weekly monday 13:00`,value:"weekly",data:{autoRun:true,nextTime:{time:"13:00:00",date:Li().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"W",allowedDays:{mon:true,tue:false,wed:false,thu:false,fri:false,sat:false,sun:false}}}},{key:$localize`Don't run automatically`,value:"disabled",data:{autoRun:false,nextTime:{time:"13:00:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:true,tue:true,wed:true,thu:true,fri:true,sat:true,sun:true}}}},{key:$localize`Custom`,value:"custom",data:{autoRun:true,nextTime:{time:"13:00:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:true,tue:true,wed:true,thu:true,fri:true,sat:true,sun:true}}}}];function si(i){if(!i.autoRun)return null;let t=[i.runAgain.allowedDays.mon?"Monday":null,i.runAgain.allowedDays.tue?"Tuesday":null,i.runAgain.allowedDays.wed?"Wednesday":null,i.runAgain.allowedDays.thu?"Thursday":null,i.runAgain.allowedDays.fri?"Friday":null,i.runAgain.allowedDays.sat?"Saturday":null,i.runAgain.allowedDays.sun?"Sunday":null].filter(G=>G!==null),e=new Date(i.nextTime.date),n=i.nextTime.time.split(":"),o=e.getFullYear(),a=e.getMonth(),_=e.getDate(),c=parseInt(n[0]??"0"),u=parseInt(n[1]??"0"),T=parseInt(n[2]??"0"),D=new Date(o,a,_,c,u,T,0),y=i.runAgain.repeatValue,M=i.runAgain.repeatUnit;return {Time:D.toISOString(),Repeat:`${y}${M}`,AllowedDays:t}}function Li(){let i=new Date,t=i.getDay(),e=t===1?7:(8-t)%7;return i.setDate(i.getDate()+e),i.setHours(12,0,0,0),i}var pn=()=>({autoRun:Ge(true),nextTime:{time:Ge("13:00"),date:Ge(new Date().toISOString().split("T")[0])},runAgain:{repeatValue:Ge(1),repeatUnit:Ge("D"),allowedDays:{mon:Ge(true),tue:Ge(true),wed:Ge(true),thu:Ge(true),fri:Ge(true),sat:Ge(true),sun:Ge(true)}}}),un=class i{#e=T(ke);#t=T(ee);#n=T(W);unitOptions=Ri;scheduleFields=this.#e.scheduleFields;scheduleType=this.#e.scheduleType;scheduleOptions=Wt;updateScheduleType(t){let e=Wt.find(n=>n.value===t);if(e&&e?.value!=="custom"){this.scheduleType.set(e.value);let n=e.data;this.scheduleFields.autoRun.set(n.autoRun??false),this.scheduleFields.nextTime.time.set(n.nextTime?.time??"13:00"),this.scheduleFields.nextTime.date.set(n.nextTime?.date??new Date().toISOString().split("T")[0]),this.scheduleFields.runAgain.repeatValue.set(n.runAgain?.repeatValue??1),this.scheduleFields.runAgain.repeatUnit.set(n.runAgain?.repeatUnit??"D"),this.scheduleFields.runAgain.allowedDays.mon.set(n.runAgain?.allowedDays?.mon??true),this.scheduleFields.runAgain.allowedDays.tue.set(n.runAgain?.allowedDays?.tue??true),this.scheduleFields.runAgain.allowedDays.wed.set(n.runAgain?.allowedDays?.wed??true),this.scheduleFields.runAgain.allowedDays.thu.set(n.runAgain?.allowedDays?.thu??true),this.scheduleFields.runAgain.allowedDays.fri.set(n.runAgain?.allowedDays?.fri??true),this.scheduleFields.runAgain.allowedDays.sat.set(n.runAgain?.allowedDays?.sat??true),this.scheduleFields.runAgain.allowedDays.sun.set(n.runAgain?.allowedDays?.sun??true);}else this.scheduleType.set("custom");}goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#n.parent});}next(){this.#e.shouldAutoSave()&&this.#e.submit(true),this.#t.navigate(["options"],{relativeTo:this.#n.parent});}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-schedule"]],decls:12,vars:4,consts:()=>{let t;t=$localize`Select an option...`;let e;e=$localize`Schedule`;let n;n=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let o;o=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let a;a=$localize` Automatically run backups ${"\uFFFD#3\uFFFD\uFFFD/#3\uFFFD"}:TAG_INPUT:`;let _;_=$localize`If a date was missed, the job will run as soon as possible.`;let c;c=$localize`Next time`;let u;u=$localize`Run again every`;let T;T=$localize`Allowed days`;let D;D=$localize` Monday ${"\uFFFD#28\uFFFD\uFFFD/#28\uFFFD"}:TAG_INPUT:`;let y;y=$localize` Tuesday ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let M;M=$localize` Wednesday ${"\uFFFD#34\uFFFD\uFFFD/#34\uFFFD"}:TAG_INPUT:`;let G;G=$localize` Thursday ${"\uFFFD#37\uFFFD\uFFFD/#37\uFFFD"}:TAG_INPUT:`;let I;I=$localize` Friday ${"\uFFFD#40\uFFFD\uFFFD/#40\uFFFD"}:TAG_INPUT:`;let J;J=$localize` Saturday ${"\uFFFD#43\uFFFD\uFFFD/#43\uFFFD"}:TAG_INPUT:`;let X;return X=$localize` Sunday ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`,[["timeRef",""],["dateRef",""],e,n,o,a,_,c,u,T,D,y,M,G,I,J,X,[1,"title-30"],["label","key","value","value",3,"isClearable","options"],["type","text","placeholder",t,3,"ngModelChange","ngModel"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","",1,"raised","primary",3,"click"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"row-inputs"],["for","time"],["type","time","id","time",3,"ngModelChange","ngModel"],["suffix",""],[1,"primary","sharp"],["for","date"],["type","text","id","date",3,"ngModelChange","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,"disableToggle"],["title",""],[1,"days-wrap"]]},template:function(e,n){e&1&&(Qi$1(0,"h3",17),nC(1,2),$l(),Qi$1(2,"sh-select",18)(3,"input",19),Vg("ngModelChange",function(a){return n.updateScheduleType(a)}),$l(),CD(),$l(),aT(4,xi,7,2),Qi$1(5,"div",20)(6,"button",21),Vg("click",function(){return n.goBack()}),Lg(7,3),vg(8,"sh-icon"),Fg(),$l(),Qi$1(9,"button",22),Vg("click",function(){return n.next()}),Lg(10,4),vg(11,"sh-icon"),Fg(),$l()()),e&2&&(CE(2),yg("isClearable",false)("options",n.scheduleOptions),CE(),yg("ngModel",n.scheduleType()),_D(),CE(),cT(n.scheduleType()==="custom"?4:-1));},dependencies:[Bn,Ze$1,en$1,yt,Rn,Jt,Fe,J,N,v,Nt$1,I,ri],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40rem;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}"]})};var bi=[[["","title",""]],[["","description",""]],[["","action",""]],"*"],vi=["[title]","[description]","[action]","*"];function wi(i,t){i&1&&jC(0,"Title");}function Gi(i,t){i&1&&(Qi$1(0,"sh-icon"),jC(1,"caret-down"),$l());}var Ze=class i{isActive=E1(false);disableToggle=I1(false);ngOnInit(){this.disableToggle()&&this.isActive.set(true);}toggle(){this.isActive.set(!this.isActive());}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-toggle-card"]],hostVars:2,hostBindings:function(e,n){e&2&&Yg("active",n.isActive());},inputs:{isActive:[1,"isActive"],disableToggle:[1,"disableToggle"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:vi,decls:11,vars:1,consts:[[1,"title"],[3,"click"],[1,"actions"],[1,"content"]],template:function(e,n){e&1&&(aC(bi),Qi$1(0,"header")(1,"div",0)(2,"h3",1),Vg("click",function(){return n.disableToggle()||n.toggle()}),cC(3,0,null,wi,1,0),aT(5,Gi,2,0,"sh-icon"),$l(),cC(6,1),$l(),Qi$1(7,"div",2),cC(8,2),$l()(),Qi$1(9,"div",3),cC(10,3),$l()),e&2&&(CE(5),cT(n.disableToggle()?-1:5));},dependencies:[N],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;border-radius:var(--shape-3);background-color:var(--base-2)}.active[_nghost-%COMP%] .content[_ngcontent-%COMP%]{max-height:1000px;transition:max-height 1s linear;padding:0 1rem 1rem}.active[_nghost-%COMP%] sh-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}[_nghost-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.25rem;font:var(--paragraph-10);cursor:pointer;-webkit-user-select:none;user-select:none}[_nghost-%COMP%] sh-icon[_ngcontent-%COMP%]{transform:rotate(0);transform-origin:center;transition:transform .2s ease}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem}header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;flex:1 0}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]:empty{display:none}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:0 1rem;overflow:hidden;max-height:0;transition:max-height .25s linear,padding .25s linear}.content[_ngcontent-%COMP%]:empty{display:none}"]})};var ki=["textInput"];function $i(i,t){if(i&1){let e=vT();Qi$1(0,"sh-select",3)(1,"input",7),cm("ngModelChange",function(o){kd(e);let a=iC();return UC(a.internalPath,o)||(a.internalPath=o),Od(o)}),Vg("ngModelChange",function(){kd(e);let o=iC();return Od(o.updateFilter())}),$l(),CD(),$l();}if(i&2){let e=iC();yg("options",e.fileGroupOptions())("isClearable",false)("selectMultiple",true),CE(),am("ngModel",e.internalPath),_D();}}function Ui(i,t){if(i&1&&(Qi$1(0,"div",8),jC(1),$l()),i&2){let e=iC(2);CE(),om(e.currentExpressionOption()?.startsWith);}}function Bi(i,t){if(i&1&&(Qi$1(0,"div",9),jC(1),$l()),i&2){let e=iC(2);CE(),om(e.currentExpressionOption()?.endsWith);}}function Vi(i,t){if(i&1){let e=vT();Qi$1(0,"sh-form-field",4)(1,"input",7,0),cm("ngModelChange",function(o){kd(e);let a=iC();return UC(a.internalPath,o)||(a.internalPath=o),Od(o)}),Vg("ngModelChange",function(){kd(e);let o=iC();return Od(o.updateFilter())}),$l(),CD(),aT(3,Ui,2,1,"div",8),aT(4,Bi,2,1,"div",9),$l();}if(i&2){let e=iC();CE(),am("ngModel",e.internalPath),_D(),CE(2),cT(e.currentExpressionOption()?.startsWith?.length?3:-1),CE(),cT(e.currentExpressionOption()?.endsWith?.length?4:-1);}}var Ki=[{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"}],Ji=[{key:"Excludes folders where name contains",value:"-FolderName"},{key:"Includes folders where name contains",value:"+FolderName"},{key:"Excludes folder",value:"-Folder"},{key:"Includes folder",value:"+Folder"},{key:"Excludes files where name contains",value:"-FileName"},{key:"Includes files where name contains",value:"+FileName"},{key:"Excludes file extension",value:"-Extension"},{key:"Include 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:"Include file groups",value:"+FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"},{key:"None",value:"-Unknown"}],Ht=class i{#e=T(ve$2);path=I1.required();osType=I1();isNew=I1(false);pathChange=v1();remove=v1();internalPath=Ge("");pathType=Ge("-Expression");textInput=D1("textInput");currentExpressionOption=Nt(()=>{let t=this.pathType();return this.expressionOptions().find(e=>e.value===t)});fileGroupOptions=Ge(Ki);expressionOptions=Nt(()=>{let e=this.osType()==="Windows"?"\\":"/";return Ji.map(n=>n.value==="-Folder"||n.value==="+Folder"?m$3(l({},n),{startsWith:"",endsWith:""}):n.value==="-FolderName"||n.value==="+FolderName"?m$3(l({},n),{startsWith:"*",endsWith:`*${e}`}):n.value==="-FileName"||n.value==="+FileName"?m$3(l({},n),{startsWith:"[.*",endsWith:`[^\\${e}]*]`}):n.value==="-FileGroup"||n.value==="+FileGroup"?m$3(l({},n),{startsWith:"{",endsWith:"}"}):n.value==="-Regex"||n.value==="+Regex"?m$3(l({},n),{startsWith:"[",endsWith:"]"}):n.value==="-Extension"||n.value==="+Extension"?m$3(l({},n),{startsWith:"*.",endsWith:""}):m$3(l({},n),{startsWith:"",endsWith:""}))});pathEffect=za$1(()=>{let t=this.path(),e=t.slice(1),n=t.startsWith("-")?"-":"+",o=this.osType()==="Windows",a=o?"\\":"/";e.startsWith("%")&&e.endsWith(a)||o&&e.slice(2).startsWith(a)&&e.endsWith(a)||e.startsWith(a)&&e.endsWith(a)?(this.pathType.set(`${n}Folder`),this.internalPath.set(e)):e.startsWith("*")&&e.endsWith(`*${a}`)?(this.pathType.set(`${n}FolderName`),this.internalPath.set(e.slice(1,-2))):e.startsWith("[.*")&&e.endsWith(`[^\\${a}]*]`)?(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)),this.isNew()&&rE(()=>{this.focusInput();},{injector:this.#e});});focusInput(){let t=this.textInput()?.nativeElement;t&&(t.focus(),t.select());}updateFilter(){let t=this.internalPath(),e=this.currentExpressionOption();t!==""&&(t==="*"&&(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||i)};static \u0275cmp=hw({type:i,selectors:[["app-new-filter"]],viewQuery:function(e,n){e&1&&Wg(n.textInput,ki,5),e&2&&fC();},inputs:{path:[1,"path"],osType:[1,"osType"],isNew:[1,"isNew"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:7,vars:4,consts:()=>{let t;return t=$localize`Select an option...`,[["textInput",""],["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"],["boxPrefix",""],["boxSuffix",""]]},template:function(e,n){e&1&&(Qi$1(0,"sh-select",1)(1,"input",2),cm("ngModelChange",function(a){return UC(n.pathType,a)||(n.pathType=a),a}),Vg("ngModelChange",function(){return n.updateFilter()}),$l(),CD(),$l(),aT(2,$i,2,4,"sh-select",3)(3,Vi,5,3,"sh-form-field",4),Qi$1(4,"div",5),Vg("click",function(){return n.removeFilter()}),Qi$1(5,"sh-icon",6),jC(6,"x-circle"),$l()()),e&2&&(yg("options",n.expressionOptions())("isClearable",false),CE(),am("ngModel",n.pathType),_D(),CE(),cT(n.currentExpressionOption()?.value=="-FileGroup"||n.currentExpressionOption()?.value=="+FileGroup"?2:3));},dependencies:[Bn,Ze$1,Rn,Jt,Nt$1,Fe,N],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}"]})};var Xi=["filtersContainer"],zi=()=>({updateOn:"blur",standalone:true});function Wi(i,t){i&1&&(Qi$1(0,"sh-icon",14),jC(1," warning "),$l());}function Hi(i,t){if(i&1){let e=vT();aT(0,Wi,2,0,"sh-icon",14),Qi$1(1,"button",15),Vg("click",function(){kd(e);let o=iC();return Od(o.addFilter())}),Lg(2,3),vg(3,"sh-icon"),Fg(),$l();}if(i&2){let e=iC();cT(e.wrongConfiguration()?0:-1);}}function ji(i,t){i&1&&nC(0,2,1);}function qi(i,t){i&1&&nC(0,2,2);}function Yi(i,t){i&1&&(Qi$1(0,"p",12),nC(1,4),$l());}function Qi(i,t){i&1&&(Qi$1(0,"p",12),nC(1,5),$l());}function Zi(i,t){if(i&1){let e=vT();Qi$1(0,"sh-form-field")(1,"textarea",16),cm("ngModelChange",function(o){kd(e);let a=iC();return UC(a.bulkFilters,o)||(a.bulkFilters=o),Od(o)}),Vg("ngModelChange",function(){kd(e);let o=iC();return Od(o.saveBulkFilterEdit())}),$l(),CD(),$l();}if(i&2){let e=iC();CE(),am("ngModel",e.bulkFilters),yg("ngModelOptions",KC(2,zi)),_D();}}function eo(i,t){if(i&1){let e=vT();Qi$1(0,"app-new-filter",18),Vg("pathChange",function(o){let a=kd(e).$index,_=iC(2);return Od(_.updateFilterAt(o,a))})("remove",function(){let o=kd(e).$index,a=iC(2);return Od(a.removeFilterAt(o))}),$l();}if(i&2){let e=t.$implicit,n=t.$index,o=iC(2);yg("path",e)("osType",o.osType())("isNew",o.lastAddedIndex()===n);}}function to(i,t){if(i&1&&(Qi$1(0,"div",13,0),dT(2,eo,1,3,"app-new-filter",17,lT),$l()),i&2){let e=iC();CE(2),fT(e.filters());}}var jt=class i{#e=T(ve$2);filters=E1.required();osType=I1("");disableToggle=I1(true);bulkFilterEditMode=Ge(false);bulkFilters=Ge("");lastAddedIndex=Ge(null);filtersContainer=D1.required("filtersContainer");hasFilters=Nt(()=>this.filters().length>0);wrongConfiguration=Nt(()=>{let t=this.filters();if(t.length===0)return false;let e=t.findIndex(o=>o==="-*"||o==="-*.*"||o==="-**");if(e===-1)return false;let n=t.findIndex(o=>o.startsWith("+"));return n===-1||e<n});toggleBulkFilterEdit(){this.bulkFilterEditMode()?this.bulkFilterEditMode.set(false):(this.bulkFilters.set(this.filters().join(`
|
|
4
|
+
`)),this.bulkFilterEditMode.set(true));}saveBulkFilterEdit(){let t=this.bulkFilters().split(`
|
|
5
|
+
`).map(n=>n.trim()).filter(n=>n!==""&&(n.startsWith("-")||n.startsWith("+"))),e=[...new Set(t)];this.filters.set(e),this.bulkFilterEditMode.set(false);}addFilter(){let t=this.filters(),e=t.length;this.filters.set([...t,"-*.lock"]),this.lastAddedIndex.set(e),rE(()=>{this.scrollToFilter(e);},{injector:this.#e});}scrollToFilter(t){let e=this.filtersContainer()?.nativeElement;if(!e)return;let n=e.querySelectorAll("app-new-filter");n[t]&&n[t].scrollIntoView({behavior:"smooth",block:"nearest"});}updateFilterAt(t,e){let o=[...this.filters()];o[e]=t,this.filters.set(o),this.lastAddedIndex.set(null);}removeFilterAt(t){let n=this.filters().filter((o,a)=>a!==t);this.filters.set(n),this.lastAddedIndex.set(null);}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-filters"]],viewQuery:function(e,n){e&1&&Wg(n.filtersContainer,Xi,5),e&2&&fC();},inputs:{filters:[1,"filters"],osType:[1,"osType"],disableToggle:[1,"disableToggle"]},outputs:{filters:"filtersChange"},decls:20,vars:5,consts:()=>{let t;t=$localize`Filters`;let e;e=$localize`${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD*14:1\uFFFD"}:START_BLOCK_IF: Edit contents as list ${"\uFFFD/*14:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*15:2\uFFFD"}:START_BLOCK_ELSE: Edit contents as text ${"\uFFFD/*15:2\uFFFD"}:CLOSE_BLOCK_ELSE:`;let n;n=$localize`The filters will unconditionally exclude all files.`;let o;o=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON: Add filter `;let a;a=$localize`Customize your filters.`;let _;return _=$localize`Edit filters as text, one per line.`,[["filtersContainer",""],t,e,o,a,_,[3,"disableToggle"],["title",""],[1,"spacer"],["shButton","","type","button",1,"small"],["menu",""],["shButton","","type","button",1,"small",3,"click"],["description",""],[1,"filters"],["shTooltip",n,1,"warn"],["type","button","shButton","",1,"small",3,"click"],["wrap","off","rows","10",1,"bulk-textarea",3,"ngModelChange","ngModel","ngModelOptions"],[3,"path","osType","isNew"],[3,"pathChange","remove","path","osType","isNew"]]},template:function(e,n){e&1&&(Qi$1(0,"app-toggle-card",6),ql(1,7),Qi$1(2,"span"),nC(3,1),$l(),vg(4,"div",8),aT(5,Hi,4,1),Qi$1(6,"sh-menu")(7,"button",9)(8,"sh-icon"),jC(9,"dots-three-vertical"),$l()(),ql(10,10),Qi$1(11,"button",11),Vg("click",function(){return n.toggleBulkFilterEdit()}),Lg(12,2),vg(13,"sh-icon"),aT(14,ji,1,0)(15,qi,1,0),Fg(),$l(),Gl(),$l(),Gl(),aT(16,Yi,2,0,"p",12)(17,Qi,2,0,"p",12),aT(18,Zi,2,3,"sh-form-field")(19,to,4,0,"div",13),$l()),e&2&&(yg("disableToggle",n.disableToggle()),CE(5),cT(n.bulkFilterEditMode()?-1:5),CE(9),cT(n.bulkFilterEditMode()?14:15),CE(2),cT(n.bulkFilterEditMode()?17:16),CE(2),cT(n.bulkFilterEditMode()?18:19));},dependencies:[Bn,Ze$1,Rn,Jt,v,N,ve$1,Fe,at,Ze,Ht],styles:["[_nghost-%COMP%]{display:block}.spacer[_ngcontent-%COMP%]{flex:1}.bulk-textarea[_ngcontent-%COMP%]{width:100%;font-family:monospace;min-height:12.5rem}.filters[_ngcontent-%COMP%]{max-height:200px;overflow-y:auto;display:flex;flex-direction:column;gap:.5rem}"]})};function no(i,t){i&1&&(Qi$1(0,"div",24)(1,"sh-icon"),jC(2,"spinner"),$l(),Qi$1(3,"span"),nC(4,2),$l()());}function io(i,t){if(i&1&&(Qi$1(0,"div",25)(1,"sh-icon"),jC(2,"warning"),$l(),Qi$1(3,"span"),jC(4),$l()()),i&2){let e=iC();CE(4),om(e.error());}}function oo(i,t){if(i&1&&(Qi$1(0,"div",31)(1,"dt"),Lg(2,20),vg(3,"span",32),Fg(),$l(),Qi$1(4,"dd"),jC(5),$l()(),Qi$1(6,"div",31)(7,"dt"),Lg(8,21),vg(9,"span",32),Fg(),$l(),Qi$1(10,"dd"),jC(11),$l()()),i&2){iC();let e=qC(0);CE(5),om(e.sites.personalLicensedUser),CE(6),om(e.sites.personalUnlicensedUser);}}function ao(i,t){if(i&1&&(um(0),Qi$1(1,"div",26)(2,"section",29)(3,"h4"),nC(4,3),$l(),Qi$1(5,"dl")(6,"div")(7,"dt"),nC(8,4),$l(),Qi$1(9,"dd"),jC(10),$l()(),Qi$1(11,"div")(12,"dt"),nC(13,5),$l(),Qi$1(14,"dd"),jC(15),$l()(),Qi$1(16,"div")(17,"dt"),nC(18,6),$l(),Qi$1(19,"dd"),jC(20),$l()(),Qi$1(21,"div")(22,"dt"),nC(23,7),$l(),Qi$1(24,"dd"),jC(25),$l()(),Qi$1(26,"div",30)(27,"dt"),nC(28,8),$l(),Qi$1(29,"dd"),jC(30),$l()()()(),Qi$1(31,"section",29)(32,"h4"),nC(33,9),$l(),Qi$1(34,"dl")(35,"div")(36,"dt"),nC(37,10),$l(),Qi$1(38,"dd"),jC(39),$l()(),Qi$1(40,"div")(41,"dt"),nC(42,11),$l(),Qi$1(43,"dd"),jC(44),$l()(),Qi$1(45,"div",30)(46,"dt"),nC(47,12),$l(),Qi$1(48,"dd"),jC(49),$l()()()(),Qi$1(50,"section",29)(51,"h4"),nC(52,13),$l(),Qi$1(53,"dl")(54,"div")(55,"dt"),nC(56,14),$l(),Qi$1(57,"dd"),jC(58),$l()(),Qi$1(59,"div")(60,"dt"),nC(61,15),$l(),Qi$1(62,"dd"),jC(63),$l()(),Qi$1(64,"div")(65,"dt"),nC(66,16),$l(),Qi$1(67,"dd"),jC(68),$l()(),Qi$1(69,"div")(70,"dt"),nC(71,17),$l(),Qi$1(72,"dd"),jC(73),$l()(),aT(74,oo,12,2),Qi$1(75,"div")(76,"dt"),nC(77,18),$l(),Qi$1(78,"dd"),jC(79),$l()(),Qi$1(80,"div",30)(81,"dt"),nC(82,19),$l(),Qi$1(83,"dd"),jC(84),$l()()()()()),i&2){let e=WC(iC().counts());CE(10),om(e.users.licensed),CE(5),om(e.users.unlicensed),CE(5),om(e.users.sharedMailboxWithStorage),CE(5),om(e.users.sharedMailboxWithoutStorage),CE(5),om(e.users.total),CE(9),om(e.groups.unified),CE(5),om(e.groups.notUnified),CE(5),om(e.groups.total),CE(9),om(e.sites.group),CE(5),om(e.sites.classic),CE(5),om(e.sites.communication),CE(5),om(e.sites.personal),CE(),cT(e.sites.personalLicensedUser!==null&&e.sites.personalUnlicensedUser!==null?74:-1),CE(5),om(e.sites.other),CE(5),om(e.sites.total);}}var qt=class i{#e=T(d$1);data=I1();closed=v1();status=Ge("loading");error=Ge(null);counts=Ge(null);#t=za$1(()=>{let t=this.data(),e=t?.url,n=t?.sourcePrefix,o=t?.backupId??null;if(!e||!n){this.status.set("error"),this.error.set($localize`No URL provided`);return}this.status.set("loading"),this.#e.getOffice365Counts(e,n,o).subscribe({next:a=>{this.counts.set(a),this.status.set("success");},error:a=>{this.error.set(a?.message??$localize`Failed to load counts`),this.status.set("error");}});});static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-office365-counts-dialog"]],inputs:{data:[1,"data"]},outputs:{closed:"closed"},decls:10,vars:1,consts:()=>{let t;t=$localize`Microsoft 365 tenant items found`;let e;e=$localize`Close`;let n;n=$localize`Loading counts…`;let o;o=$localize`Users`;let a;a=$localize`Licensed`;let _;_=$localize`Unlicensed`;let c;c=$localize`Shared mailbox (with storage)`;let u;u=$localize`Shared mailbox (without storage)`;let T;T=$localize`Total`;let D;D=$localize`Groups`;let y;y=$localize`Unified`;let M;M=$localize`Not unified`;let G;G=$localize`Total`;let I;I=$localize`Sites`;let J;J=$localize`Group`;let X;X=$localize`Classic`;let k;k=$localize`Communication`;let Q;Q=$localize`Personal`;let W;W=$localize`Other`;let be;be=$localize`Total`;let he;he=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SPAN:—${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SPAN: Licensed users `;let Ee;return Ee=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SPAN:—${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPAN: Unlicensed users `,[t,e,n,o,a,_,c,u,T,D,y,M,G,I,J,X,k,Q,W,be,he,Ee,[1,"title-30"],["content",""],[1,"state","loading"],[1,"state","error"],[1,"counts"],["footer",""],["shButton","","type","button",3,"click"],[1,"group"],[1,"total"],[1,"sub"],[1,"indent"]]},template:function(e,n){if(e&1&&(Qi$1(0,"header")(1,"h3",22),nC(2,0),$l()(),Qi$1(3,"section",23),aT(4,no,5,0,"div",24)(5,io,5,1,"div",25)(6,ao,85,16,"div",26),$l(),Qi$1(7,"footer",27)(8,"button",28),Vg("click",function(){return n.closed.emit()}),nC(9,1),$l()()),e&2){let o;CE(4),cT((o=n.status())==="loading"?4:o==="error"?5:o==="success"?6:-1);}},dependencies:[v,N],styles:["[_nghost-%COMP%]{--dialog-p: 1.5rem;display:flex;flex-direction:column;gap:1rem}header[_ngcontent-%COMP%]{display:flex;padding:1.5rem 1.5rem 0}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.state[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.5rem 0}.state.loading[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_spin 1s linear infinite}.state.error[_ngcontent-%COMP%]{color:var(--color-danger, #c0392b)}@keyframes _ngcontent-%COMP%_spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.counts[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.group[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin:0 0 .5rem}.group[_ngcontent-%COMP%] dl[_ngcontent-%COMP%]{display:grid;gap:.25rem;margin:0}.group[_ngcontent-%COMP%] dl[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:.25rem 0;border-bottom:1px solid var(--color-border, #e0e0e0)}.group[_ngcontent-%COMP%] dl[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:last-child{border-bottom:none}.group[_ngcontent-%COMP%] dl[_ngcontent-%COMP%] > div.total[_ngcontent-%COMP%]{font-weight:700}.group[_ngcontent-%COMP%] dl[_ngcontent-%COMP%] > div.sub[_ngcontent-%COMP%] dt[_ngcontent-%COMP%]{color:var(--color-text-secondary, #666);font-size:.9em}.group[_ngcontent-%COMP%] dl[_ngcontent-%COMP%] > div.sub[_ngcontent-%COMP%] dd[_ngcontent-%COMP%]{font-weight:500}.group[_ngcontent-%COMP%] dl[_ngcontent-%COMP%] dt[_ngcontent-%COMP%]{margin:0;color:var(--color-text-secondary, #666)}.group[_ngcontent-%COMP%] dl[_ngcontent-%COMP%] dd[_ngcontent-%COMP%]{margin:0;font-weight:600}footer[_ngcontent-%COMP%]{z-index:1}"]})};var Ct=class i{data=I1();closed=v1();path=Ge("");isValid=Nt(()=>this.path().length>0);dataEffect=za$1(()=>{let t=this.data();t?.initialPath&&this.path.set(t.initialPath);});submit(){this.closed.emit(this.path()||null);}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-target-disk-dialog"]],inputs:{data:[1,"data"]},outputs:{closed:"closed"},decls:11,vars:4,consts:()=>{let t;t=$localize`Path`;let e;e=$localize`Full disk source`;let n;n=$localize`Cancel`;let o;return o=$localize` Use this disk `,[e,n,o,[1,"title-30"],["content",""],[3,"customRemoteMode","destinationUrl"],["type","text","id","path","tabindex","4","placeholder",t,3,"ngModelChange","ngModel"],["footer","",1,"sticky"],["shButton","","type","button",3,"click"],["shButton","","type","button",1,"raised","primary",3,"click","disabled"]]},template:function(e,n){e&1&&(Qi$1(0,"header")(1,"h3",3),nC(2,0),$l()(),Qi$1(3,"section",4)(4,"app-file-tree",5)(5,"input",6),cm("ngModelChange",function(a){return UC(n.path,a)||(n.path=a),a}),$l(),CD(),$l()(),Qi$1(6,"footer",7)(7,"button",8),Vg("click",function(){return n.closed.emit(null)}),nC(8,1),$l(),Qi$1(9,"button",9),Vg("click",function(){return n.submit()}),nC(10,2),$l()()),e&2&&(CE(4),yg("customRemoteMode","diskimage")("destinationUrl","diskimage://"),CE(),am("ngModel",n.path),_D(),CE(4),yg("disabled",!n.isValid()));},dependencies:[v,Ne,Bn,Ze$1,Rn,Jt],styles:["[_nghost-%COMP%]{--dialog-p: 1.5rem;display:flex;flex-direction:column;gap:1rem}header[_ngcontent-%COMP%]{display:flex;padding:1.5rem 1.5rem 0}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}footer[_ngcontent-%COMP%]{z-index:1}"]})};function Yt(i,t,e){return i??t??e}function li(i,t){return t?i.sourceDescription??i.description:i.description}var ro=[[["","displayName",""]],[["","description",""]],"*"],so=["[displayName]","[description]","*"];function lo(i,t){if(i&1&&jC(0),i&2){iC(2);let e=qC(1);Ql(" ",e.Name," ");}}function _o(i,t){if(i&1&&jC(0),i&2){iC(2);let e=qC(0);Ql(" ",e.displayName," ");}}function co(i,t){i&1&&(Qi$1(0,"sh-chip",6),jC(1,"Untested"),$l());}function uo(i,t){i&1&&(Qi$1(0,"sh-chip",6),jC(1,"Special"),$l());}function po(i,t){i&1&&(Qi$1(0,"sh-chip",7),jC(1,"Deprecated"),$l());}function mo(i,t){if(i&1&&jC(0),i&2){iC();let e=qC(16);Ql(" ",e," ");}}function go(i,t){if(i&1&&jC(0),i&2){let e=iC(2);Ql(" ",e.description()," ");}}function Co(i,t){if(i&1&&(Qi$1(0,"sh-card",0)(1,"div",1),vg(2,"img",2),$l(),Qi$1(3,"div",3)(4,"div",4),cC(5),$l(),Qi$1(6,"div",5),aT(7,lo,1,1)(8,_o,1,1),aT(9,co,2,0,"sh-chip",6)(10,uo,2,0,"sh-chip",6)(11,po,2,0,"sh-chip",7),$l()(),Qi$1(12,"div",8)(13,"div",4),cC(14,1),$l(),Qi$1(15,"div",5),um(16),aT(17,mo,1,1)(18,go,1,1),$l()(),Qi$1(19,"div",9),cC(20,2),$l()()),i&2){let e=iC(),n=qC(0),o=qC(1);yg("variant",e.variant()),CE(2),yg("src",n.icon,Qp),mg("alt",n.displayName),CE(5),cT(o&&o.Name?7:8),CE(2),cT((n.sortOrder??0)==-3?9:(n.sortOrder??0)==-2?10:(n.sortOrder??0)<0?11:-1),CE(7);let a=WC(e.getSimplePath(o?.BaseUrl));CE(),cT(a&&a.length>0?17:18);}}var lt=class i{destination=I1();targetUrl=I1();variant=I1("type-b");connectionStringId=I1();showAsSource=I1(false);#e=T(st);connectionString=Nt(()=>{let t=this.connectionStringId();return t==null?null:this.#e.destinations().find(e=>e.ID===t)});selectedDestinationType=Nt(()=>{let t=this.targetUrl();return t?V(t)??null:null});destinationFromTargetUrl=Nt(()=>{let t=this.selectedDestinationType();return t?{key:t.customKey??t.key,customKey:t.customKey??null,displayName:t.displayName,description:t.description,sourceDescription:t.sourceDescription??null,icon:t.icon}:null});destinationItem=Nt(()=>{let t=this.destination(),e=this.destinationFromTargetUrl();return t||e||null});description=Nt(()=>{let t=this.destinationItem();return t?li(t,this.showAsSource()):""});getSimplePath(t){return t?h(t):""}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-destination-list-item"]],inputs:{destination:[1,"destination"],targetUrl:[1,"targetUrl"],variant:[1,"variant"],connectionStringId:[1,"connectionStringId"],showAsSource:[1,"showAsSource"]},ngContentSelectors:so,decls:3,vars:3,consts:[[3,"variant"],[1,"icon"],[3,"src"],[1,"name"],[1,"projected"],[1,"default"],[1,"small","simple","primary"],[1,"small","simple","warn"],[1,"description"],[1,"actions"]],template:function(e,n){if(e&1&&(aC(ro),um(0)(1),aT(2,Co,21,7,"sh-card",0)),e&2){let o=WC(n.destinationItem());CE(),WC(n.connectionString()),CE(),cT(o?2:-1);}},dependencies:[f,D],styles:['[_nghost-%COMP%]{display:block;border-radius:var(--shape-3)}[_nghost-%COMP%]:focus-visible{outline:2px solid var(--primary-8);outline-offset:2px}sh-card[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:3rem 1fr auto;grid-template-areas:"icon name actions" "icon description actions";gap:.25rem 1rem}sh-card[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{grid-area:icon;display:flex;align-items:center;justify-content:center;width:3rem;height:3rem;border-radius:var(--shape-2)}sh-card[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{object-fit:contain;width:100%;border-radius:var(--shape-2);overflow:hidden}sh-card[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{grid-area:name;font:var(--paragraph-10)}sh-card[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .projected[_ngcontent-%COMP%]:empty{display:none}sh-card[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .projected[_ngcontent-%COMP%]:not(:empty) + .default[_ngcontent-%COMP%]{display:none}sh-card[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{grid-area:description;color:var(--base-8)}sh-card[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .projected[_ngcontent-%COMP%]:empty{display:none}sh-card[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .projected[_ngcontent-%COMP%]:not(:empty) + .default[_ngcontent-%COMP%]{display:none}sh-card[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{grid-area:actions;display:flex;align-items:center;gap:.5rem}']})};var _t=class i{#e=T(m$1);#t(t){return t.flatMap(e=>{if(!e?.Key)return null;let n=Ie(e.Key);if(n.length<=1){let o=G(e.Key);return o.isDefaultEntry===true?[m$3(l({},o),{displayName:e.DisplayName||o.displayName||e.Key,description:e.Description||o.description||"",sourceDescription:Yt(o.sourceDescription,e.Description,o.description)})]:m$3(l({},o),{sourceDescription:Yt(o.sourceDescription,e.Description,o.description)})}else return n.map(o=>m$3(l({},o),{sourceDescription:Yt(o.sourceDescription,e.Description,o.description)}))}).filter(e=>e!==null)}#n(t){return t.map(e=>({key:e.customKey??e.key,customKey:e.customKey??null,displayName:e.displayName,description:e.description,sourceDescription:e.sourceDescription??null,icon:e.icon,searchTerms:[e.displayName,e.description,e.key,e.searchTerms??"",e.customKey??""].join(" "),sortOrder:e.sortOrder??0}))}backendDestinationOptions=Nt(()=>{let t=this.#e.backendModules(),e=this.#t(t);return this.#n(e)});sourceProviderOptions=Nt(()=>{let t=this.#e.sourceProviderModules(),e=this.#t(t.length?t:this.#e.backendModules());return this.#n(e)});restoreDestinationOptions=Nt(()=>{let t=this.#e.restoreDestinationProviderModules(),e=this.#t(t.length?t:this.#e.backendModules());return this.#n(e)});destinationTypeOptions=this.backendDestinationOptions;allModules=Nt(()=>[...this.#e.backendModules(),...this.#e.sourceProviderModules(),...this.#e.restoreDestinationProviderModules()].reduce((t,e)=>(t.find(n=>n.Key===e.Key)||t.push(e),t),[]));static \u0275fac=function(e){return new(e||i)};static \u0275prov=ee$1({token:i,factory:i.\u0275fac,providedIn:"root"})};function To(i,t){if(i&1){let e=vT();Qi$1(0,"input",8),cm("ngModelChange",function(o){kd(e);let a=iC();return UC(a.destinationSearchTerm,o)||(a.destinationSearchTerm=o),Od(o)}),$l(),CD();}if(i&2){let e=iC();am("ngModel",e.destinationSearchTerm),_D();}}function So(i,t){if(i&1){let e=vT();Qi$1(0,"input",9),cm("ngModelChange",function(o){kd(e);let a=iC();return UC(a.destinationSearchTerm,o)||(a.destinationSearchTerm=o),Od(o)}),$l(),CD();}if(i&2){let e=iC();am("ngModel",e.destinationSearchTerm),_D();}}function fo(i,t){if(i&1){let e=vT();Qi$1(0,"app-destination-list-item",10),Vg("click",function(){let o=kd(e).$implicit,a=iC();return Od(a.setDestination.emit(o.customKey??o.key))})("keydown.enter",function(o){return o.target.click()})("keydown.space",function(o){return o.target.click()}),Qi$1(1,"button",11),Lg(2,1),vg(3,"sh-icon"),Fg(),$l()();}if(i&2){let e=t.$implicit,n=iC();yg("destination",e)("showAsSource",n.showAsSources());}}var Qt=class i{#e=T(_t);#t=T(m$1);showAsSources=I1(false);moduleType=I1("Backend");setDestination=v1();destinationSearchTerm=Ge("");showAllDestinations=Ge(false);destinationTypeOptions=Nt(()=>{switch(this.moduleType()){case "SourceProvider":return this.#e.sourceProviderOptions();case "RestoreDestinationProvider":return this.#e.restoreDestinationOptions();default:return this.#e.backendDestinationOptions()}});destinationTypeOptionsFocused=Nt(()=>{let t=this.#t.backendModules(),e=this.destinationTypeOptions().map(_=>{let c=t.find(u=>u.Key==_.key);return c&&(_=m$3(l({},_),{sortOrder:c.IsDeprecated?-1:c.IsUntested?-3:_.sortOrder})),_}),n=this.destinationSearchTerm().toLowerCase(),o=this.showAllDestinations(),a=[...e].sort((_,c)=>{let u=_.sortOrder??0,T=c.sortOrder??0;return u!==T?T-u:_.displayName.localeCompare(c.displayName)}).filter(_=>{if(o)return true;let c=_.sortOrder??0;return c<0&&n?.length&&(_.key.toLocaleLowerCase()===n.toLocaleLowerCase()||_.customKey?.toLocaleLowerCase()===n.toLocaleLowerCase())?true:c>=0});return n?a.filter(_=>_.searchTerms.toLowerCase().includes(n)):a});static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-destination-list"]],inputs:{showAsSources:[1,"showAsSources"],moduleType:[1,"moduleType"]},outputs:{setDestination:"setDestination"},decls:9,vars:2,consts:()=>{let t;t=$localize`Search for remote source...`;let e;e=$localize`Search for destination...`;let n;n=$localize`Show all`;let o;return o=$localize` Choose ${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON:`,[n,o,[1,"search-area"],["type","text","placeholder",t,3,"ngModel"],["type","text","placeholder",e,3,"ngModel"],[1,"raised","primary",3,"checkedChange","checked"],[1,"list"],["tabindex","0",3,"destination","showAsSource"],["type","text","placeholder",t,3,"ngModelChange","ngModel"],["type","text","placeholder",e,3,"ngModelChange","ngModel"],["tabindex","0",3,"click","keydown.enter","keydown.space","destination","showAsSource"],["shButton","","tabindex","-1","type","button"]]},template:function(e,n){e&1&&(Qi$1(0,"div",2)(1,"sh-form-field"),aT(2,To,1,1,"input",3)(3,So,1,1,"input",4),$l(),Qi$1(4,"sh-toggle",5),cm("checkedChange",function(a){return UC(n.showAllDestinations,a)||(n.showAllDestinations=a),a}),nC(5,0),$l()(),Qi$1(6,"div",6),dT(7,fo,4,2,"app-destination-list-item",7,lT),$l()),e&2&&(CE(2),cT(n.showAsSources()?2:3),CE(2),am("checked",n.showAllDestinations),CE(3),fT(n.destinationTypeOptionsFocused()));},dependencies:[lt,Bn,Ze$1,Rn,Jt,Fe,v,N,J],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1rem;height:100%;overflow:hidden;padding:.25rem;min-height:250px}.list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;height:100%;overflow:auto;padding:.25rem .375rem 1rem;width:calc(100% + .5rem);margin-left:-.375rem;border-bottom:.0625rem solid var(--base-4)}.search-area[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:1rem}"]})};var ho=["fileInput"],Eo=[[["label"]]],yo=["label"],No=["ngProjectAs","label",5,["label"]],Zt=class i{customId=I1();content=Ge("");readonly=Ge(false);placeholder=I1($localize`Drop a file here or use the browse button`);fileInputRef=D1("fileInput");onFileSelected(t){let e=t.target;e.files&&e.files.length>0&&this.readFile(e.files[0]);}onFileDrop(t){t.preventDefault(),t.dataTransfer?.files&&t.dataTransfer.files.length>0&&this.readFile(t.dataTransfer.files[0]);}onDragOver(t){t.preventDefault();}readFile(t){let e=new FileReader;e.onload=()=>{this.content.set(e.result);},e.readAsText(t);}triggerBrowse(){return this.fileInputRef()?.nativeElement.click(),false}onChange=()=>{};onTouched=()=>{};onChangeEffect=za$1(()=>{this.onChange(this.content());});writeValue(t){this.content.set(t??"");}registerOnChange(t){this.onChange=t;}registerOnTouched(t){this.onTouched=t;}setDisabledState(t){this.readonly.set(t);}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-file-drop-textarea"]],viewQuery:function(e,n){e&1&&Wg(n.fileInputRef,ho,5),e&2&&fC();},inputs:{customId:[1,"customId"],placeholder:[1,"placeholder"]},features:[YC([{provide:D$1,useExisting:i,multi:true}])],ngContentSelectors:yo,decls:9,vars:3,consts:[["fileInput",""],[1,"browse-btn"],["shButton","","type","button",1,"small","outlined",3,"click"],[1,"textarea-container","textarea-wrap",3,"drop","dragover"],["rows","10",3,"ngModelChange","placeholder","ngModel","disabled"],["type","file",1,"hidden",3,"change"]],template:function(e,n){if(e&1){let o=vT();aC(Eo),cC(0,0,No),Qi$1(1,"div",1)(2,"button",2),Vg("click",function(){return n.triggerBrowse()}),Qi$1(3,"sh-icon"),jC(4,"upload"),$l()()(),Qi$1(5,"div",3),Vg("drop",function(_){return n.onFileDrop(_)})("dragover",function(_){return n.onDragOver(_)}),Qi$1(6,"textarea",4),cm("ngModelChange",function(_){return kd(o),UC(n.content,_)||(n.content=_),Od(_)}),$l(),CD(),$l(),Qi$1(7,"input",5,0),Vg("change",function(_){return n.onFileSelected(_)}),$l();}e&2&&(CE(6),yg("placeholder",n.placeholder()),am("ngModel",n.content),yg("disabled",n.readonly()),_D());},dependencies:[Bn,Ze$1,Rn,Jt,N,v],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label browsebtn" "input input";grid-template-columns:8fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .browse-btn[_ngcontent-%COMP%]{grid-area:browsebtn}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%]{grid-area:input;width:100%;border:none;font:var(--code-20)}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%;color:var(--base-8);background-color:var(--base-1);border:1px solid var(--base-4);border-radius:var(--shape-3);padding:.5rem;resize:vertical;box-shadow:var(--box-shadow-10)}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%] .dark[_ngcontent-%COMP%]{background-color:var(--base-2)}[_nghost-%COMP%] .hidden[_ngcontent-%COMP%]{display:none}']})};var en=class i{data=I1();closed=v1();path=Ge("");destinationUrl=Ge("");backupId=Ge("");connectionStringId=Ge(null);isValid=Nt(()=>this.path().length>0);dataEffect=za$1(()=>{let t=this.data();t?.destinationUrl&&this.destinationUrl.set(t.destinationUrl),t?.backupId&&this.backupId.set(t.backupId),t?.connectionStringId&&this.connectionStringId.set(t.connectionStringId);});submit(){this.closed.emit(this.path()||null);}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-browse-path-dialog"]],inputs:{data:[1,"data"]},outputs:{closed:"closed"},decls:11,vars:8,consts:()=>{let t;t=$localize`Path`;let e;e=$localize`Select destination folder`;let n;n=$localize`Cancel`;let o;return o=$localize` Use this folder `,[e,n,o,[1,"title-30"],["content",""],[3,"customRemoteMode","backupId","destinationUrl","connectionStringId","onlySelectFolder","selectFiles"],["type","text","id","path","tabindex","4","placeholder",t,3,"ngModelChange","ngModel"],["footer","",1,"sticky"],["shButton","","type","button",3,"click"],["shButton","","type","button",1,"raised","primary",3,"click","disabled"]]},template:function(e,n){e&1&&(Qi$1(0,"header")(1,"h3",3),nC(2,0),$l()(),Qi$1(3,"section",4)(4,"app-file-tree",5)(5,"input",6),cm("ngModelChange",function(a){return UC(n.path,a)||(n.path=a),a}),$l(),CD(),$l()(),Qi$1(6,"footer",7)(7,"button",8),Vg("click",function(){return n.closed.emit(null)}),nC(8,1),$l(),Qi$1(9,"button",9),Vg("click",function(){return n.submit()}),nC(10,2),$l()()),e&2&&(CE(4),yg("customRemoteMode","backend")("backupId",n.backupId())("destinationUrl",n.destinationUrl())("connectionStringId",n.connectionStringId())("onlySelectFolder",true)("selectFiles",false),CE(),am("ngModel",n.path),_D(),CE(4),yg("disabled",!n.isValid()));},dependencies:[v,Ne,Bn,Ze$1,Rn,Jt],styles:["[_nghost-%COMP%]{--dialog-p: 1.5rem;display:flex;flex-direction:column;gap:1rem}header[_ngcontent-%COMP%]{display:flex;padding:1.5rem 1.5rem 0}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}footer[_ngcontent-%COMP%]{z-index:1}"]})};var Fo=(i,t,e,n)=>({index:i,fieldGroup:"custom",formView:t,destinationType:e,oauthField:n}),fe=i=>({$implicit:i}),Do=(i,t,e,n)=>({index:i,fieldGroup:"dynamic",formView:t,destinationType:e,oauthField:n}),Ao=()=>({updateOn:"blur"}),Io=(i,t,e,n)=>({index:i,formView:t,fieldGroup:"advanced",destinationType:e,oauthField:n}),ve=(i,t)=>({fieldGroup:i,formView:t}),Oo=()=>["/connect/logon"];function Po(i,t){i&1&&Dg(0);}function Mo(i,t){if(i&1&&ag(0,Po,1,0,"ng-container",25),i&2){let e=t.$implicit,n=t.$index;iC();let o=pC(15);iC();let a=qC(0),_=qC(1);yg("ngTemplateOutlet",o)("ngTemplateOutletContext",JC(7,fe,eb(2,Fo,n,e,a,_.oauthField)));}}function xo(i,t){i&1&&Dg(0);}function Ro(i,t){if(i&1&&ag(0,xo,1,0,"ng-container",25),i&2){let e=t.$implicit,n=t.$index;iC();let o=pC(15);iC();let a=qC(0),_=qC(1);yg("ngTemplateOutlet",o)("ngTemplateOutletContext",JC(7,fe,eb(2,Do,n,e,a,_.oauthField)));}}function Lo(i,t){if(i&1){let e=vT();Qi$1(0,"button",26),Vg("click",function(){kd(e);let o=iC(2);return Od(o.showTextArea.set(false))}),Lg(1,8),vg(2,"sh-icon"),Fg(),$l();}}function bo(i,t){if(i&1){let e=vT();Qi$1(0,"button",33,2),Vg("click",function(){let o=kd(e).$implicit,a=iC(3);return Od(a.addAdvancedOption(o))}),jC(2),$l();}if(i&2){let e=t.$implicit;CE(2),Ql(" ",e.name," ");}}function vo(i,t){if(i&1){let e=vT();Qi$1(0,"div",23)(1,"sh-menu",27)(2,"button",28),Lg(3,9),vg(4,"sh-icon"),Fg(),$l(),ql(5,29),dT(6,bo,3,1,"button",30,lT),Gl(),$l(),Qi$1(8,"sh-menu")(9,"button",31)(10,"sh-icon"),jC(11,"dots-three-vertical"),$l()(),ql(12,29),Qi$1(13,"button",32),Vg("click",function(){kd(e);let o=iC(2);return Od(o.showTextArea.set(true))}),Qi$1(14,"sh-icon"),jC(15,"link"),$l(),jC(16," Edit contents as text "),$l(),Gl(),$l()();}if(i&2){iC();let e=qC(9);CE(),yg("searchable",true),CE(),yg("disabled",e.length===0),CE(4),fT(e);}}function wo(i,t){if(i&1){let e=vT();Qi$1(0,"textarea",34),Vg("ngModelChange",function(o){kd(e);let a=iC(2);return Od(a.updateSettingsFromText(o))}),$l(),CD();}if(i&2){let e=iC(2);yg("ngModel",e.settingsAsText())("ngModelOptions",KC(2,Ao)),_D();}}function Go(i,t){i&1&&Dg(0);}function ko(i,t){if(i&1&&ag(0,Go,1,0,"ng-container",25),i&2){let e=t.$implicit,n=t.$index;iC(2);let o=pC(15),a=iC(),_=qC(0),c=qC(1),u=a.getFormView("advanced",e)??a.getDefaultFormView(e);yg("ngTemplateOutlet",o)("ngTemplateOutletContext",JC(7,fe,eb(2,Io,n,u,_,c.oauthField)));}}function $o(i,t){if(i&1&&dT(0,ko,1,9,"ng-container",null,lT),i&2){let e=iC(2);fT(e.advancedFormFieldNames());}}function Uo(i,t){i&1&&(Qi$1(0,"sup",43),jC(1,"*"),$l());}function Bo(i,t){if(i&1&&(Qi$1(0,"sh-icon",44),jC(1,"question"),$l()),i&2){let e=iC(2).$implicit;yg("shTooltip",e.formView.longDescription);}}function Vo(i,t){if(i&1){let e=vT();Qi$1(0,"app-file-tree",36)(1,"label",42),aT(2,Uo,2,0,"sup",43),jC(3),aT(4,Bo,2,1,"sh-icon",44),$l(),Qi$1(5,"input",45),Vg("ngModelChange",function(o){kd(e);let a=iC().$implicit,_=iC(2);return Od(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),$l(),CD(),$l();}if(i&2){let e=iC().$implicit,n=qC(1),o=qC(2),a=qC(3),_=qC(4),c=qC(5);yg("startingPath",a)("accepts",e.formView.accepts)("showFiles",true)("hideShortcuts",false)("showHiddenNodes",true)("selectFiles",true)("resolvePaths",true),CE(),yg("for",c),CE(),cT(e.formView.isMandatory&&_?2:-1),CE(),Ql(" ",n," "),CE(),cT(e.formView.longDescription?4:-1),CE(),yg("id",c)("ngModel",o),_D();}}function Ko(i,t){i&1&&(Qi$1(0,"sup",46),jC(1,"*"),$l());}function Jo(i,t){if(i&1&&(Qi$1(0,"sh-icon",44),jC(1,"question"),$l()),i&2){let e=iC(2).$implicit;yg("shTooltip",e.formView.longDescription);}}function Xo(i,t){if(i&1){let e=vT();Qi$1(0,"app-file-tree",37)(1,"label",42),aT(2,Ko,2,0,"sup",46),jC(3),aT(4,Jo,2,1,"sh-icon",44),$l(),Qi$1(5,"input",45),Vg("ngModelChange",function(o){kd(e);let a=iC().$implicit,_=iC(2);return Od(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),$l(),CD(),$l();}if(i&2){let e=iC().$implicit,n=qC(1),o=qC(2),a=qC(3),_=qC(4),c=qC(5);yg("hideShortcuts",false)("enableCreateFolder",true)("startingPath",a)("resolvePaths",true),CE(),yg("for",c),CE(),cT(e.formView.isMandatory&&_?2:-1),CE(),Ql(" ",n," "),CE(),cT(e.formView.longDescription?4:-1),CE(),yg("id",c)("ngModel",o),_D();}}function zo(i,t){i&1&&(Qi$1(0,"sup",47),jC(1,"*"),$l());}function Wo(i,t){if(i&1&&(Qi$1(0,"sh-icon",44),jC(1,"question"),$l()),i&2){let e=iC(2).$implicit;yg("shTooltip",e.formView.longDescription);}}function Ho(i,t){i&1&&(Qi$1(0,"sh-icon",48),jC(1," warning "),$l());}function jo(i,t){i&1&&Dg(0);}function qo(i,t){if(i&1&&(Qi$1(0,"sh-icon",53),jC(1," link "),$l()),i&2){iC();let e=qC(8),n=qC(9);Yg("error",e&&n==="error")("warn",e&&n==="warning"),yg("shTooltip",e);}}function Yo(i,t){i&1&&(Qi$1(0,"sh-icon",51),jC(1,"envelope"),$l());}function Qo(i,t){i&1&&(Qi$1(0,"sh-icon",51),jC(1,"hard-drives"),$l());}function Zo(i,t){i&1&&(Qi$1(0,"sh-icon",51),jC(1,"jar"),$l());}function ea(i,t){i&1&&(Qi$1(0,"sh-icon",51),jC(1,"textbox"),$l());}function ta(i,t){if(i&1){let e=vT();Qi$1(0,"button",54),Vg("click",function(o){kd(e);let a=iC(2).$implicit,_=iC(2);return Od(_.browse(a.fieldGroup,a.formView.name,o))}),jC(1," Browse ... "),$l();}}function na(i,t){if(i&1){let e=vT();Qi$1(0,"sh-form-field")(1,"label",42),aT(2,zo,2,0,"sup",47),jC(3),aT(4,Wo,2,1,"sh-icon",44),aT(5,Ho,2,0,"sh-icon",48),ag(6,jo,1,0,"ng-container",25),$l(),Qi$1(7,"input",49),Vg("keydown",function(o){kd(e);let a=iC().$implicit,_=iC(2);return Od(_.onKeyDown(a.fieldGroup,a.formView.name,a.formView.type,o))})("ngModelChange",function(o){kd(e);let a=iC().$implicit,_=iC(2);return Od(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),$l(),CD(),um(8)(9),aT(10,qo,2,5,"sh-icon",50)(11,Yo,2,0,"sh-icon",51)(12,Qo,2,0,"sh-icon",51)(13,Zo,2,0,"sh-icon",51)(14,ea,2,0,"sh-icon",51),aT(15,ta,2,0,"button",52),$l();}if(i&2){let e=iC().$implicit,n=qC(1),o=qC(2),a=qC(3),_=qC(4),c=qC(5);iC();let u=pC(17),T=iC();CE(),yg("for",c),CE(),cT(e.formView.isMandatory&&_?2:-1),CE(),Ql(" ",n," "),CE(),cT(e.formView.longDescription?4:-1),CE(),cT(_&&e.formView.type==="Path"?5:-1),CE(),yg("ngTemplateOutlet",u)("ngTemplateOutletContext",JC(17,fe,XC(14,ve,e.fieldGroup,e.formView))),CE(),yg("type",e.formView.type==="Email"?"email":"text")("id",c)("ngModel",o),_D();let D=a,y=T.hasLeadingSlash(D??"");CE(),WC(y&&e.formView.doubleSlash?.message),CE(),WC(e.formView.doubleSlash?.type),CE(),cT(e.formView.type==="Path"?10:e.formView.type==="Email"?11:e.formView.type==="Hostname"?12:e.formView.type==="Bucketname"||e.formView.type==="BucketnameB2"?13:14),CE(5),cT(e.formView.type==="Path"&&T.hasV2ListBackendOperations()?15:-1);}}function ia(i,t){i&1&&(Qi$1(0,"sup",55),jC(1,"*"),$l());}function oa(i,t){if(i&1&&(Qi$1(0,"sh-icon",44),jC(1,"question"),$l()),i&2){let e=iC(2).$implicit;yg("shTooltip",e.formView.longDescription);}}function aa(i,t){i&1&&Dg(0);}function ra(i,t){if(i&1){let e=vT();Qi$1(0,"span",59),Vg("click",function(){kd(e);let o=iC(2).$implicit,a=iC(2);return Od(a.oauthStartTokenCreation(o.destinationType,o.fieldGroup,o.formView.name,o.formView.oauthVersion))}),jC(1," AuthID "),$l();}}function sa(i,t){i&1&&(Qi$1(0,"sh-icon",51),jC(1,"password"),$l());}function la(i,t){if(i&1){let e=vT();Qi$1(0,"sh-icon",60),Vg("click",function(){kd(e);let o=iC(2).$implicit;return Od(o.formView.showPassword=!o.formView.showPassword)}),jC(1," eye "),$l();}}function _a(i,t){if(i&1){let e=vT();Qi$1(0,"sh-icon",60),Vg("click",function(){kd(e);let o=iC(2).$implicit;return Od(o.formView.showPassword=!o.formView.showPassword)}),jC(1," eye-slash "),$l();}}function da(i,t){if(i&1){let e=vT();Qi$1(0,"sh-form-field")(1,"label",42),aT(2,ia,2,0,"sup",55),jC(3),aT(4,oa,2,1,"sh-icon",44),ag(5,aa,1,0,"ng-container",25),$l(),Qi$1(6,"input",56),Vg("ngModelChange",function(o){kd(e);let a=iC().$implicit,_=iC(2);return Od(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),$l(),CD(),aT(7,ra,2,0,"span",57)(8,sa,2,0,"sh-icon",51),aT(9,la,2,0,"sh-icon",58)(10,_a,2,0,"sh-icon",58),$l();}if(i&2){let e=iC().$implicit,n=qC(1),o=qC(2),a=qC(4),_=qC(5);iC();let c=pC(17);CE(),yg("for",_),CE(),cT(e.formView.isMandatory&&a?2:-1),CE(),Ql(" ",n," "),CE(),cT(e.formView.longDescription?4:-1),CE(),yg("ngTemplateOutlet",c)("ngTemplateOutletContext",JC(14,fe,XC(11,ve,e.fieldGroup,e.formView))),CE(),yg("type",e.formView.showPassword?"text":"password")("id",_)("ngModel",o),_D(),CE(),cT(e.oauthField===e.formView.name?7:8),CE(2),cT(e.formView.showPassword?9:10);}}function ca(i,t){i&1&&(Qi$1(0,"sup",62),jC(1,"*"),$l());}function ua(i,t){if(i&1&&(Qi$1(0,"sh-icon",44),jC(1,"question"),$l()),i&2){let e=iC(3).$implicit;yg("shTooltip",e.formView.longDescription);}}function pa(i,t){i&1&&Dg(0);}function ma(i,t){if(i&1&&jC(0),i&2){let e=t.$implicit;im(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ");}}function ga(i,t){if(i&1){let e=vT();Qi$1(0,"sh-select",61)(1,"label",42),aT(2,ca,2,0,"sup",62),jC(3),aT(4,ua,2,1,"sh-icon",44),ag(5,pa,1,0,"ng-container",25),$l(),Qi$1(6,"input",45),Vg("ngModelChange",function(o){kd(e);let a=iC(2).$implicit,_=iC(2);return Od(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),$l(),CD(),$l(),ag(7,ma,1,2,"ng-template",null,3,lb);}if(i&2){let e=pC(8);iC();let n=qC(0),o=iC().$implicit,a=qC(1),_=qC(2),c=qC(4),u=qC(5);iC();let T=pC(17);yg("options",n)("isClearable",false)("optionTemplate",e),CE(),yg("for",u),CE(),cT(o.formView.isMandatory&&c?2:-1),CE(),Ql(" ",a," "),CE(),cT(o.formView.longDescription?4:-1),CE(),yg("ngTemplateOutlet",T)("ngTemplateOutletContext",JC(14,fe,XC(11,ve,o.fieldGroup,o.formView))),CE(),yg("id",u)("ngModel",_),_D();}}function Ca(i,t){if(i&1&&(um(0),aT(1,ga,9,16)),i&2){let e=iC().$implicit,n=WC(iC(2).mapOptions(e.formView));CE(),cT(n?1:-1);}}function Ta(i,t){i&1&&(Qi$1(0,"sup",65),jC(1,"*"),$l());}function Sa(i,t){if(i&1&&(Qi$1(0,"sh-icon",44),jC(1,"question"),$l()),i&2){let e=iC(3).$implicit;yg("shTooltip",e.formView.longDescription);}}function fa(i,t){i&1&&Dg(0);}function ha(i,t){if(i&1&&jC(0),i&2){let e=t.$implicit;im(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ");}}function Ea(i,t){if(i&1){let e=vT();Qi$1(0,"sh-select",64)(1,"label",42),aT(2,Ta,2,0,"sup",65),jC(3),aT(4,Sa,2,1,"sh-icon",44),ag(5,fa,1,0,"ng-container",25),$l(),Qi$1(6,"input",45),Vg("ngModelChange",function(o){kd(e);let a=iC(2).$implicit,_=iC(2);return Od(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),$l(),CD(),$l(),ag(7,ha,1,2,"ng-template",null,4,lb);}if(i&2){let e=pC(8);iC();let n=qC(0),o=iC().$implicit,a=qC(1),_=qC(2),c=qC(4),u=qC(5);iC();let T=pC(17);yg("options",n)("asFreeText",true)("inlineSearch",true)("optionTemplate",e),CE(),yg("for",u),CE(),cT(o.formView.isMandatory&&c?2:-1),CE(),Ql(" ",a," "),CE(),cT(o.formView.longDescription?4:-1),CE(),yg("ngTemplateOutlet",T)("ngTemplateOutletContext",JC(15,fe,XC(12,ve,o.fieldGroup,o.formView))),CE(),yg("id",u)("ngModel",_),_D();}}function ya(i,t){i&1&&vg(0,"sh-progress-bar",63);}function Na(i,t){if(i&1&&(um(0),aT(1,Ea,9,17)(2,ya,1,0,"sh-progress-bar",63)),i&2){let e=iC().$implicit,n=qC(2),o=WC(iC(2).mapOptionsWithFreeText(e.formView,n));CE(),cT(o?1:2);}}function Fa(i,t){i&1&&(Qi$1(0,"sup",67),jC(1,"*"),$l());}function Da(i,t){if(i&1&&(Qi$1(0,"sh-icon",44),jC(1,"question"),$l()),i&2){let e=iC(2).$implicit;yg("shTooltip",e.formView.longDescription);}}function Aa(i,t){i&1&&Dg(0);}function Ia(i,t){if(i&1){let e=vT();Qi$1(0,"app-size",66),Vg("ngModelChange",function(o){kd(e);let a=iC().$implicit,_=iC(2);return Od(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),Qi$1(1,"label",42),aT(2,Fa,2,0,"sup",67),jC(3),aT(4,Da,2,1,"sh-icon",44),ag(5,Aa,1,0,"ng-container",25),$l()(),CD();}if(i&2){let e=iC().$implicit,n=qC(1),o=qC(2),a=qC(4),_=qC(5);iC();let c=pC(17);yg("inputType",e.Name)("ngModel",o)("customId",_),_D(),CE(),yg("for",_),CE(),cT(e.formView.isMandatory&&a?2:-1),CE(),Ql(" ",n," "),CE(),cT(e.formView.longDescription?4:-1),CE(),yg("ngTemplateOutlet",c)("ngTemplateOutletContext",JC(12,fe,XC(9,ve,e.fieldGroup,e.formView)));}}function Oa(i,t){i&1&&(Qi$1(0,"sup",68),jC(1,"*"),$l());}function Pa(i,t){if(i&1&&(Qi$1(0,"sh-icon",44),jC(1,"question"),$l()),i&2){let e=iC(2).$implicit;yg("shTooltip",e.formView.longDescription);}}function Ma(i,t){i&1&&Dg(0);}function xa(i,t){if(i&1){let e=vT();Qi$1(0,"sh-form-field")(1,"label",42),aT(2,Oa,2,0,"sup",68),jC(3),aT(4,Pa,2,1,"sh-icon",44),ag(5,Ma,1,0,"ng-container",25),$l(),Qi$1(6,"input",69),Vg("ngModelChange",function(o){kd(e);let a=iC().$implicit,_=iC(2);return Od(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),$l(),CD(),Qi$1(7,"sh-icon",51),jC(8,"numpad"),$l()();}if(i&2){let e=iC().$implicit,n=qC(1),o=qC(2),a=qC(4),_=qC(5);iC();let c=pC(17);CE(),yg("for",_),CE(),cT(e.formView.isMandatory&&a?2:-1),CE(),Ql(" ",n," "),CE(),cT(e.formView.longDescription?4:-1),CE(),yg("ngTemplateOutlet",c)("ngTemplateOutletContext",JC(11,fe,XC(8,ve,e.fieldGroup,e.formView))),CE(),yg("id",_)("ngModel",o),_D();}}function Ra(i,t){if(i&1&&(Qi$1(0,"sh-icon",44),jC(1,"question"),$l()),i&2){let e=iC(2).$implicit;yg("shTooltip",e.formView.longDescription);}}function La(i,t){i&1&&Dg(0);}function ba(i,t){if(i&1){let e=vT();Qi$1(0,"sh-toggle",39)(1,"label",42),jC(2),aT(3,Ra,2,1,"sh-icon",44),ag(4,La,1,0,"ng-container",25),$l(),Qi$1(5,"input",70),Vg("change",function(o){kd(e);let a=iC().$implicit,_=iC(2);return Od(_.updateFieldValue(a.fieldGroup,a.formView.name,o.target.checked?"true":"false"))}),$l()();}if(i&2){let e=iC().$implicit,n=qC(1),o=qC(2),a=qC(5);iC();let _=pC(17),c=iC();CE(),yg("for",a),CE(),Ql(" ",n," "),CE(),cT(e.formView.longDescription?3:-1),CE(),yg("ngTemplateOutlet",_)("ngTemplateOutletContext",JC(9,fe,XC(6,ve,e.fieldGroup,e.formView))),CE(),yg("checked",c.isTrue(o));}}function va(i,t){i&1&&(Qi$1(0,"sup",72),jC(1,"*"),$l());}function wa(i,t){if(i&1&&(Qi$1(0,"sh-icon",44),jC(1,"question"),$l()),i&2){let e=iC(3).$implicit;yg("shTooltip",e.formView.longDescription);}}function Ga(i,t){i&1&&Dg(0);}function ka(i,t){if(i&1&&jC(0),i&2){let e=t.$implicit;im(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ");}}function $a(i,t){if(i&1){let e=vT();Qi$1(0,"sh-select",71)(1,"label",42),aT(2,va,2,0,"sup",72),jC(3),aT(4,wa,2,1,"sh-icon",44),ag(5,Ga,1,0,"ng-container",25),$l(),Qi$1(6,"input",73),Vg("ngModelChange",function(o){kd(e);let a=iC(2).$implicit,_=iC(2);return Od(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),$l(),CD(),$l(),ag(7,ka,1,2,"ng-template",null,5,lb);}if(i&2){let e=pC(8);iC();let n=qC(0),o=iC().$implicit,a=qC(1),_=qC(2),c=qC(4),u=qC(5);iC();let T=pC(17);yg("options",n)("selectMultiple",true)("optionTemplate",e),CE(),yg("for",u),CE(),cT(o.formView.isMandatory&&c?2:-1),CE(),Ql(" ",a," "),CE(),cT(o.formView.longDescription?4:-1),CE(),yg("ngTemplateOutlet",T)("ngTemplateOutletContext",JC(13,fe,XC(10,ve,o.fieldGroup,o.formView))),CE(),yg("ngModel",_),_D();}}function Ua(i,t){if(i&1&&(um(0),aT(1,$a,9,15)),i&2){let e=iC().$implicit,n=WC(iC(2).mapOptions(e.formView));CE(),cT(n?1:-1);}}function Ba(i,t){i&1&&(Qi$1(0,"sup",74),jC(1,"*"),$l());}function Va(i,t){if(i&1&&(Qi$1(0,"sh-icon",44),jC(1,"question"),$l()),i&2){let e=iC(2).$implicit;yg("shTooltip",e.formView.longDescription);}}function Ka(i,t){i&1&&Dg(0);}function Ja(i,t){if(i&1){let e=vT();Qi$1(0,"app-timespan",66),Vg("ngModelChange",function(o){kd(e);let a=iC().$implicit,_=iC(2);return Od(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),Qi$1(1,"label",42),aT(2,Ba,2,0,"sup",74),jC(3),aT(4,Va,2,1,"sh-icon",44),ag(5,Ka,1,0,"ng-container",25),$l()(),CD();}if(i&2){let e=iC().$implicit,n=qC(1),o=qC(2),a=qC(4),_=qC(5);iC();let c=pC(17);yg("inputType",e.formView.name)("ngModel",o)("customId",_),_D(),CE(),yg("for",_),CE(),cT(e.formView.isMandatory&&a?2:-1),CE(),Ql(" ",n," "),CE(),cT(e.formView.longDescription?4:-1),CE(),yg("ngTemplateOutlet",c)("ngTemplateOutletContext",JC(12,fe,XC(9,ve,e.fieldGroup,e.formView)));}}function Xa(i,t){i&1&&(Qi$1(0,"sup",76),jC(1,"*"),$l());}function za(i,t){if(i&1&&(Qi$1(0,"sh-icon",44),jC(1,"question"),$l()),i&2){let e=iC(2).$implicit;yg("shTooltip",e.formView.longDescription);}}function Wa(i,t){i&1&&Dg(0);}function Ha(i,t){if(i&1){let e=vT();Qi$1(0,"app-file-drop-textarea",75),Vg("ngModelChange",function(o){kd(e);let a=iC().$implicit,_=iC(2);return Od(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),Qi$1(1,"label"),aT(2,Xa,2,0,"sup",76),jC(3),aT(4,za,2,1,"sh-icon",44),ag(5,Wa,1,0,"ng-container",25),$l()(),CD();}if(i&2){let e=iC().$implicit,n=qC(2),o=qC(4),a=qC(5);iC();let _=pC(17);yg("ngModel",n)("customId",a)("placeholder",e.formView.longDescription),_D(),CE(2),cT(e.formView.isMandatory&&o?2:-1),CE(),Ql(" ",e.formView.shortDescription??e.formView.name," "),CE(),cT(e.formView.longDescription?4:-1),CE(),yg("ngTemplateOutlet",_)("ngTemplateOutletContext",JC(11,fe,XC(8,ve,e.fieldGroup,e.formView)));}}function ja(i,t){i&1&&(vg(0,"sh-spinner"),Qi$1(1,"span"),nC(2,10),$l()),i&2&&Zg("--spinner-size","16px")("--spinner-thickness","2px");}function qa(i,t){if(i&1){let e=vT();Qi$1(0,"div",79)(1,"span"),nC(2,11),$l(),Qi$1(3,"button",32),Vg("click",function(){kd(e);let o=iC(6);return Od(o.reloadTrigger.set(!o.reloadTrigger()))}),nC(4,12),$l()();}}function Ya(i,t){if(i&1&&jC(0),i&2){let e=t.$implicit;im(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ");}}function Qa(i,t){if(i&1){let e=vT();Qi$1(0,"sh-select",80)(1,"label",42)(2,"sup",81),jC(3,"*"),$l(),Qi$1(4,"span"),nC(5,13),$l()(),Qi$1(6,"input",45),Vg("ngModelChange",function(o){kd(e);let a=iC(4).$implicit,_=iC(2);return Od(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),$l(),CD(),$l(),ag(7,Ya,1,2,"ng-template",null,6,lb);}if(i&2){iC(4);let e=qC(2),n=qC(5),o=iC(2);yg("options",o.restoreBackupIdOptions())("isClearable",false),CE(),yg("for",n),CE(5),yg("id",n)("ngModel",e),_D();}}function Za(i,t){if(i&1&&aT(0,ja,3,4)(1,qa,5,0,"div",79)(2,Qa,9,5),i&2){let e=iC(5);cT(e.isLoadingRestoreBackupIdOptions()?0:e.restoreBackupIdOptions().length==0?1:2);}}function er(i,t){i&1&&(Qi$1(0,"sup",82),jC(1,"*"),$l());}function tr(i,t){if(i&1&&(Qi$1(0,"sh-icon",44),jC(1,"question"),$l()),i&2){let e=iC(4).$implicit;yg("shTooltip",e.formView.longDescription);}}function nr(i,t){i&1&&Dg(0);}function ir(i,t){if(i&1){let e=vT();Qi$1(0,"button",84),Vg("click",function(){kd(e),iC(4);let o=qC(5),a=iC(2);return Od(a.toggleDisabled(o))}),Lg(1,14),vg(2,"sh-icon"),Fg(),$l();}}function or(i,t){if(i&1){let e=vT();Qi$1(0,"sh-form-field")(1,"label",42),aT(2,er,2,0,"sup",82),jC(3),aT(4,tr,2,1,"sh-icon",44),ag(5,nr,1,0,"ng-container",25),$l(),Qi$1(6,"input",83),Vg("ngModelChange",function(o){kd(e);let a=iC(3).$implicit,_=iC(2);return Od(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),$l(),CD(),Qi$1(7,"sh-icon",51),jC(8,"textbox"),$l()(),aT(9,ir,3,0,"button",41);}if(i&2){let e=iC(3).$implicit,n=qC(1),o=qC(2),a=qC(4),_=qC(5);iC();let c=pC(17),u=iC();CE(),yg("for",_),CE(),cT(e.formView.isMandatory&&a?2:-1),CE(),Ql(" ",n," "),CE(),cT(e.formView.longDescription?4:-1),CE(),yg("ngTemplateOutlet",c)("ngTemplateOutletContext",JC(15,fe,XC(12,ve,e.fieldGroup,e.formView))),CE(),yg("type","text")("id",_)("ngModel",o)("placeholder",e.formView.longDescription)("disabled",true),_D(),CE(3),cT(u.getIsDisabled(_)?9:-1);}}function ar(i,t){if(i&1&&(Qi$1(0,"div",77),aT(1,Za,3,1)(2,or,10,17),$l()),i&2){let e=iC(4);CE(),cT(e.isRestoreFlow()?1:2);}}function rr(i,t){if(i&1){let e=vT();Qi$1(0,"div",85),Lg(1,15),vg(2,"div")(3,"div"),Fg(),$l(),Qi$1(4,"button",84),Vg("click",function(){kd(e);let o=iC(5);return Od(o.openConsole())}),Lg(5,16),vg(6,"sh-icon"),Fg(),$l();}}function sr(i,t){i&1&&(Qi$1(0,"div",85),nC(1,17),$l(),Qi$1(2,"button",86),Lg(3,18),vg(4,"sh-icon"),Fg(),$l()),i&2&&(CE(2),yg("routerLink",KC(1,Oo)));}function lr(i,t){if(i&1&&(Qi$1(0,"div",78),aT(1,rr,7,0)(2,sr,5,2),$l()),i&2){let e=iC(4);CE(),cT(e.isConnectedToConsole()?1:2);}}function _r(i,t){if(i&1&&aT(0,ar,3,1,"div",77)(1,lr,3,1,"div",78),i&2){let e=iC(3);cT(e.isConnectedToConsole()&&e.hasStorageApiKey()?0:1);}}function dr(i,t){i&1&&(Qi$1(0,"sup",87),jC(1,"*"),$l());}function cr(i,t){if(i&1&&(Qi$1(0,"sh-icon",44),jC(1,"question"),$l()),i&2){let e=iC(3).$implicit;yg("shTooltip",e.formView.longDescription);}}function ur(i,t){i&1&&Dg(0);}function pr(i,t){if(i&1){let e=vT();Qi$1(0,"sh-form-field")(1,"label",42),aT(2,dr,2,0,"sup",87),jC(3),aT(4,cr,2,1,"sh-icon",44),ag(5,ur,1,0,"ng-container",25),$l(),Qi$1(6,"input",88),Vg("ngModelChange",function(o){kd(e);let a=iC(2).$implicit,_=iC(2);return Od(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),$l(),CD(),Qi$1(7,"sh-icon",51),jC(8,"textbox"),$l(),Qi$1(9,"button",89),Vg("click",function(){kd(e);let o=iC(4);return Od(o.authenticateFilen())}),nC(10,19),$l()();}if(i&2){let e=iC(2).$implicit,n=qC(1),o=qC(2),a=qC(4),_=qC(5);iC();let c=pC(17),u=iC();CE(),yg("for",_),CE(),cT(e.formView.isMandatory&&a?2:-1),CE(),Ql(" ",n," "),CE(),cT(e.formView.longDescription?4:-1),CE(),yg("ngTemplateOutlet",c)("ngTemplateOutletContext",JC(12,fe,XC(9,ve,e.fieldGroup,e.formView))),CE(),yg("id",_)("ngModel",o),_D(),CE(3),yg("disabled",u.isAuthenticatingFilen());}}function mr(i,t){if(i&1&&aT(0,pr,11,14,"sh-form-field"),i&2){let e=iC(3);cT(e.hasFilenApiKey()?-1:0);}}function gr(i,t){if(i&1){let e=vT();Qi$1(0,"button",84),Vg("click",function(){kd(e);let o=iC().$implicit,a=iC(2);return Od(a.removeAdvancedOption(o.formView.name))}),Qi$1(1,"sh-icon"),jC(2,"x-circle"),$l()();}}function Cr(i,t){if(i&1&&(Qi$1(0,"div",35),um(1)(2)(3)(4)(5),aT(6,Vo,6,13,"app-file-tree",36)(7,Xo,6,10,"app-file-tree",37)(8,na,16,19,"sh-form-field")(9,da,11,16,"sh-form-field")(10,Ca,2,2)(11,Na,3,2)(12,Ia,6,14,"app-size",38)(13,xa,9,13,"sh-form-field")(14,ba,6,11,"sh-toggle",39)(15,Ua,2,2)(16,Ja,6,14,"app-timespan",38)(17,Ha,6,13,"app-file-drop-textarea",40)(18,_r,2,1)(19,mr,1,1),aT(20,gr,3,0,"button",41),$l()),i&2){let e=t.$implicit;iC();let n=qC(0),o=iC();Yg("single-field",e.fieldGroup!=="advanced"),CE(),WC(e.formView.shortDescription??e.formView.name),CE(),WC(o.getFieldGroup(n,e.fieldGroup)[e.formView.name]),CE();let a=WC(o.getFieldValue(e.fieldGroup,e.formView.name));CE(),WC((a??"").toString().trim()===""),CE(),WC("destination-"+e.fieldGroup+"-"+e.index+"-"+(e.asHttpOptions?"http":"other")),CE(),cT(e.formView.type==="FileTree"?6:e.formView.type==="FolderTree"?7:e.formView.type==="String"||e.formView.type==="Path"||e.formView.type==="Email"||e.formView.type==="Hostname"||e.formView.type==="Bucketname"||e.formView.type==="BucketnameB2"?8:e.formView.type==="Password"?9:e.formView.type==="Enumeration"?10:e.formView.type==="NonValidatedSelectableString"?11:e.formView.type==="Size"?12:e.formView.type==="Integer"?13:e.formView.type==="Boolean"?14:e.formView.type==="Flags"?15:e.formView.type==="Timespan"||e.formView.type==="DateTime"?16:e.formView.type==="FreeText"?17:e.formView.type==="DuplicatiBackupId"?18:e.formView.type==="Filen2FACode"?19:-1),CE(14),cT(e.fieldGroup==="advanced"?20:-1);}}function Tr(i,t){if(i&1&&(Qi$1(0,"sh-icon",90),jC(1,"x-circle"),$l()),i&2){iC();let e=qC(0);yg("shTooltip",e?.message??"Invalid value");}}function Sr(i,t){if(i&1&&(Qi$1(0,"sh-icon",91),jC(1,"warning"),$l()),i&2){iC();let e=qC(0);yg("shTooltip",e?.message??"Invalid value");}}function fr(i,t){if(i&1&&(um(0),aT(1,Tr,2,1,"sh-icon",90)(2,Sr,2,1,"sh-icon",91)),i&2){let e=iC().$implicit,n=qC(0),o=WC(e.formView.validate(n));CE(),cT(o?.type==="error"?1:o?.type==="warning"?2:-1);}}function hr(i,t){if(i&1&&(um(0),aT(1,fr,3,2)),i&2){let e=t.$implicit,o=(WC(iC(2).getFieldValue(e.fieldGroup,e.formView.name))??"").toString().trim()==="";CE(),cT(!o&&e.formView.validate?1:-1);}}function Er(i,t){if(i&1&&(um(0),dT(1,Mo,1,9,"ng-container",null,lT),dT(3,Ro,1,9,"ng-container",null,lT),Qi$1(5,"sh-toggle-card",20),ql(6,21)(7),nC(8,7),Gl(),um(9),aT(10,Lo,3,0,"button",22)(11,vo,17,2,"div",23),Gl(),aT(12,wo,1,3,"textarea",24)(13,$o,2,0),$l(),ag(14,Cr,21,9,"ng-template",null,0,lb)(16,hr,2,2,"ng-template",null,1,lb)),i&2){let e=iC(),n=qC(1);WC(e.destinationForm()),CE(),fT(n.custom),CE(2),fT(n.dynamic),CE(2),yg("disableToggle",true),CE(4),WC(e.nonSelectedAdvancedFormViews()),CE(),cT(e.showTextArea()?10:11),CE(2),cT(e.showTextArea()?12:13);}}var tn=class i{#e=T(ke);#t=T(m$1);#n=T(O);#i=T(_t);#o=T(C);#r=T(d$1);#a=T(be);injector=T(ve$2);targetUrl=E1.required();useBackupState=I1(false);#s=null;destinationType=Nt(()=>{let t=this.targetUrl();if(!t)return null;let e=V(t);return this.#s=e?.customKey??e?.key,this.#s});refreshView=Ge(false);destinationForm=Ge({custom:{},dynamic:{},advanced:{}});advancedFormFieldNames=Nt(()=>Object.keys(this.destinationForm().advanced??{}));destinationFormConfig=Ge(null);showTextArea=Ge(false);hasV2ListBackendOperations=this.#t.hasV2ListBackendOperations;isLoadingRestoreBackupIdOptions=Ge(false);isRestoreFlow=Nt(()=>!this.useBackupState());reloadTrigger=Ge(false);hasLoadedBackupIdOptions=Ge(false);restoreBackupIdOptions=L$1(wy(F$1(this.targetUrl).pipe(sy(),pt(t=>({url:t,isReload:false}))),F$1(this.reloadTrigger).pipe(pt(()=>({url:this.targetUrl(),isReload:true})))).pipe(Gu(({url:t,isReload:e})=>t&&t.startsWith("duplicati://")&&this.hasStorageApiKey()&&this.isRestoreFlow()&&(e||!this.hasLoadedBackupIdOptions())?(this.hasLoadedBackupIdOptions.set(true),this.isLoadingRestoreBackupIdOptions.set(true),this.#r.getDuplicatiStorageBackups(t).pipe(Hs(a=>(console.error("Error loading Duplicati storage backups",a),oy([]))),qu(()=>this.isLoadingRestoreBackupIdOptions.set(false)))):oy([]))),{initialValue:[]});isConnectedToConsole=Nt(()=>this.#o.state()==="connected");hasStorageApiKey=Nt(()=>{let t=this.destinationForm();return (this.#n.serverSettings()?.["remote-control-storage-api-id"]??"").length>0||t.advanced["duplicati-auth-apiid"]});isAuthenticatingFilen=Ge(false);hasFilenApiKey=Nt(()=>{let e=this.destinationForm().advanced["api-key"];return e&&e.length>0});nonSelectedAdvancedFormViews=Nt(()=>{let t=this.destinationFormConfig();if(!t)return [];let e=this.advancedFormFieldNames();return t.advanced.filter(n=>e.findIndex(o=>o===n.name)===-1)});destinationTypeEffect=za$1(()=>{let t=this.targetUrl(),e=V(t??""),n=e.key,o=e.customKey??n,a=this.#i.allModules().find(G=>G.Key===n)??{DisplayName:e.displayName,Description:e.description,Options:[]};if(!a||!a.Options||!n)return;let _=e&&e.oauthField?e.oauthField:null,c=e&&e.customFields?e.customFields:{},u=e&&e.dynamicFields?e.dynamicFields:[],T=e&&e.advancedFields?e.advancedFields:[],D=e&&e.ignoredAdvancedFields?e.ignoredAdvancedFields:[],y={destinationType:o,oauthField:_,custom:[],dynamic:[],advanced:[]};c&&Object.entries(c).forEach(([G,I],J)=>{let X=I.order??J,k=I.validate;!k&&I.type==="Bucketname"&&(k=Q=>Re(Q)?null:{type:"error",message:$localize`Invalid bucket name.`}),k&&I.type==="Hostname"&&(k=Q=>We(Q)?null:{type:"error",message:$localize`Invalid hostname.`}),y.custom.push(l({order:900+X,validate:k},I));});for(let G=0;G<a.Options.length;G++){let I=a.Options[G];if(I.Deprecated)continue;let J=u.find(X=>X===I.Name||I.Aliases?.includes(X.name)||X.name===I.Name);if(J){let X=I.Aliases?.indexOf(J.name)??-1,k=I.Aliases&&X>-1?I.Aliases[X]:I.Name,Q=J&&typeof J!="string";Q?J?.defaultValue??I.DefaultValue:I.DefaultValue;let be=Q&&J?.order!==void 0?J.order:G,he={name:k,type:I.Type,shortDescription:I.ShortDescription??void 0,longDescription:I.LongDescription??void 0,options:I.ValidValues,order:900+be},Ee=Q?l(l({},he),J):he;y.dynamic.push(Ee);}else {let X=I.Name;if(D.find(K=>K===X))continue;let Q=T.find(K=>K===X||K.name===X),W=Q&&typeof Q!="string",be=W&&Q?.order!==void 0?Q.order:G,he={name:X,type:I.Type,shortDescription:I.ShortDescription??void 0,longDescription:I.LongDescription??void 0,options:I.ValidValues,defaultValue:I.DefaultValue,order:900+be},Ee=W?l(l({},he),Q):he;y.advanced.push(Ee);}}if(y.custom.sort((G,I)=>G.order-I.order),y.dynamic.sort((G,I)=>G.order-I.order),y.advanced.sort((G,I)=>G.order-I.order),this.destinationFormConfig.set(y),!t)return;let M=xe(t);M&&this.destinationForm.set({custom:M.custom,dynamic:M.dynamic,advanced:M.advanced});});destinationFormEffect=za$1(()=>{let t=this.#s,e=this.destinationForm();this.refreshView();if(!e||!t)return;let o=Be({destinationType:t,custom:e.custom,dynamic:e.dynamic,advanced:e.advanced});o&&this.targetUrl.set(o);});getFieldValue(t,e){let o=this.destinationForm()[t][e];return o||null}getFormView(t,e){let o=this.destinationFormConfig()?.[t].find(a=>a.name===e);return o||null}getDefaultFormView(t){return {name:t,type:"String",shortDescription:t,longDescription:$localize`This is an undocumented option.`}}getFieldGroup(t,e){return t[e]}hasLeadingSlash(t){return t?.startsWith("/")??false}addAdvancedOption(t){let e=this.destinationForm();e.advanced[t.name]=t.defaultValue,this.destinationForm.set(l({},e));}isTrue(t){if(typeof t=="boolean")return t;if(typeof t=="string"){let e=t.toLowerCase();return e==="true"||e==="1"||e==="yes"||e==="on"}return false}onKeyDown(t,e,n,o){if(n==="Hostname"||n==="Bucketname"){if(["Backspace","Delete","ArrowLeft","ArrowRight","Tab","Home","End"].includes(o.key))return;if(o.key=="/"||o.key=="\\"||o.key==":"){o.preventDefault();return}}}updateFieldValue(t,e,n){let o=this.destinationForm();o[t][e]=n,this.destinationForm.set(l({},o));}removeAdvancedOption(t){let e=this.destinationForm();delete e.advanced[t],this.destinationForm.set(l({},e));}mapOptions(t){let e=t.loadOptions;if(e)return e(this.injector)();let n=t.options;return n?n.map(o=>({key:o,value:o})):null}mapOptionsWithFreeText(t,e){let n=this.mapOptions(t);return n?(e&&e.length>0&&(n.find(a=>a.value===e)||n.push({key:e,value:e})),n):null}#l=Ge(false);browse(t,e,n){let o=this.useBackupState()?this.#e.backupId():null,a=this.useBackupState()?this.#e.connectionStringId():null;this.#a.open(en,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:false,data:{backupId:o,destinationUrl:this.targetUrl(),connectionStringId:a}}).closed.subscribe(c=>{c&&(c=c.replace(/^\/+/,""),this.destinationForm.update(u=>(u[t][e]=c,l({},u))));});}oauthStartTokenCreation(t,e,n,o){this.#l.set(true);let a=(o??1)==2?this.#t.defaultOAuthUrlV2():this.#t.defaultOAuthUrl(),_=this.#n.serverSettings()?.["--oauth-url"];if(_&&_.length>0&&(a=_),this.useBackupState()){let I=this.#e.mapFormsToSettings().find(J=>J.Name==="--oauth-url")?.Value;I&&I.length>0&&(a=I);}let c=this.destinationForm().advanced["oauth-url"];c&&c.length>0&&(a=c);let u=`${a}?type=${t}`,T=450,D=600,y=screen.width/2-T/2,M=screen.height/2-D/2,G=window.open(u,"_blank","height="+D+",width="+T+",menubar=0,status=0,titlebar=0,toolbar=0,left="+y+",top="+M);return window.addEventListener("message",I=>{let J=I.data.startsWith("authid:"),X=J?I.data.replace("authid:",""):null;J&&(this.destinationForm.update(k=>(k[e][n]=X,l({},k))),this.#l.set(false),this.refreshView.set(!this.refreshView()),G?.close());}),false}settingsAsText=Nt(()=>{let t=this.destinationForm().advanced;return Object.entries(t).map(([e,n])=>{let o=e??"",a="";return typeof n=="boolean"?a=this.isTrue(n)?"True":"False":(typeof n=="number"||n!=null)&&(a=n.toString()),`${o}=${a}`}).join(`
|
|
6
|
+
`)});updateSettingsFromText(t){if(typeof t!="string")return;let e=Te(t);this.destinationForm.update(n=>m$3(l({},n),{advanced:e}));}getIsDisabled(t){return document.getElementById(t)?.disabled??true}toggleDisabled(t){let e=document.getElementById(t);e&&(e.disabled=!e.disabled);}openConsole(){this.#o.openConsole();}#_(t){var e=this.useBackupState()?this.#e.backupId():null;this.isAuthenticatingFilen.set(true),this.#r.getFilenApiKey(t,e).pipe(qu(()=>this.isAuthenticatingFilen.set(false))).subscribe({next:n=>{if(n.length===0){this.#a.open(h$1,{data:{title:$localize`Authentication failed`,message:$localize`No API key was returned from the Filen server.`,confirmText:$localize`OK`}});return}this.destinationForm.update(o=>(o.advanced["api-key"]=n,o.dynamic["two-factor-code"]=null,l({},o))),this.refreshView.set(!this.refreshView());},error:n=>{console.error("Error authenticating Filen",n),this.#a.open(h$1,{data:{title:$localize`Authentication failed`,message:$localize`An error occurred while requesting the Filen API key: ${n.message}`,confirmText:$localize`OK`}});}});}authenticateFilen(){let t=this.targetUrl();if(!t)return;let n=this.destinationForm().advanced["api-key"];if(n&&n.length>0){this.#a.open(h$1,{data:{title:$localize`Confirm re-authenticate?`,message:$localize`You already have an API key. Are you sure you want to re-authenticate?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:o=>{if(o){var a=new URL(t);a.searchParams.delete("api-key"),this.#_(a.toString());}}});return}this.#_(t);}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-single-destination"]],inputs:{targetUrl:[1,"targetUrl"],useBackupState:[1,"useBackupState"]},outputs:{targetUrl:"targetUrlChange"},decls:3,vars:3,consts:()=>{let t;t=$localize`Advanced options`;let e;e=$localize` Show editor ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let n;n=$localize` Add advanced option ${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let o;o=$localize`This field is mandatory`;let a;a=$localize`This field is mandatory`;let _;_=$localize`This field is mandatory`;let c;c=$localize`An empty path means storing data in the initial or root folder, which is not recommended`;let u;u=$localize`This field is mandatory`;let T;T=$localize`This field is mandatory`;let D;D=$localize`This field is mandatory`;let y;y=$localize`This field is mandatory`;let M;M=$localize`This field is mandatory`;let G;G=$localize`This field is mandatory`;let I;I=$localize`This field is mandatory`;let J;J=$localize`This field is mandatory`;let X;X=$localize`Loading available backups...`;let k;k=$localize`No backups found from this machine, contact support`;let Q;Q=$localize` Try again `;let W;W=$localize`This field is mandatory`;let be;be=$localize`Pick the backup to restore from`;let he;he=$localize`This field is mandatory`;let Ee;Ee=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:pencil${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let K;K=$localize`${"[\uFFFD#2\uFFFD|\uFFFD#3\uFFFD]"}:START_TAG_DIV:An API key with storage access is required to use Duplicati storage.${"[\uFFFD/#2\uFFFD|\uFFFD/#3\uFFFD]"}:CLOSE_TAG_DIV:${"[\uFFFD#2\uFFFD|\uFFFD#3\uFFFD]"}:START_TAG_DIV:Visit the console and assign an API key to this machine.${"[\uFFFD/#2\uFFFD|\uFFFD/#3\uFFFD]"}:CLOSE_TAG_DIV:`,K=oC(K);let ct;ct=$localize` Visit console ${"\uFFFD#6\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_ICON:`;let ut;ut=$localize`Connect to the console to use Duplicati storage.`;let q;q=$localize` Connect now ${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Sn;Sn=$localize`This field is mandatory`;let fn;return fn=$localize` Authenticate now `,[["fieldTemplate",""],["validateTemplate",""],["option",""],["enumOptionTemplate",""],["nonValidatedOptionTemplate",""],["optionTemplate",""],["backupIdOptionTemplate",""],t,e,n,X,k,Q,be,Ee,K,ct,ut,q,fn,[1,"advanced-options",3,"disableToggle"],["title",""],["shButton","","type","button",1,"outlined","small"],[1,"actions"],["wrap","off","placeholder","Paste advanced options here, one per line.",1,"raw-text-area",3,"ngModel","ngModelOptions"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["shButton","","type","button",1,"outlined","small",3,"click"],[3,"searchable"],["shButton","","type","button",1,"outlined","small",3,"disabled"],["menu",""],["type","button"],["shButton","","type","button",1,"small"],["shButton","","type","button",1,"small",3,"click"],["type","button",3,"click"],["wrap","off","placeholder","Paste advanced options here, one per line.",1,"raw-text-area",3,"ngModelChange","ngModel","ngModelOptions"],[1,"field-row"],[3,"startingPath","accepts","showFiles","hideShortcuts","showHiddenNodes","selectFiles","resolvePaths"],[3,"hideShortcuts","enableCreateFolder","startingPath","resolvePaths"],[3,"inputType","ngModel","customId"],[1,"primary","raised"],[3,"ngModel","customId","placeholder"],["shButton","","type","button",1,"outlined"],[3,"for"],["shTooltip",o],[1,"primary",3,"shTooltip"],["type","text",3,"ngModelChange","id","ngModel"],["shTooltip",a],["shTooltip",_],["shTooltip",c,1,"warn"],["autocomplete","off",3,"keydown","ngModelChange","type","id","ngModel"],["prefix","",3,"error","warn","shTooltip"],["prefix",""],["suffix","","shButton","","type","button",1,"outlined","small","browse"],["prefix","",3,"shTooltip"],["suffix","","shButton","","type","button",1,"outlined","small","browse",3,"click"],["shTooltip",u],["autocomplete","new-password",3,"ngModelChange","type","id","ngModel"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],["label","key","value","value",3,"options","isClearable","optionTemplate"],["shTooltip",T],[1,"indeterminate","primary"],["label","key","value","value",3,"options","asFreeText","inlineSearch","optionTemplate"],["shTooltip",D],[3,"ngModelChange","inputType","ngModel","customId"],["shTooltip",y],["shTooltip",M],["type","number",3,"ngModelChange","id","ngModel"],["type","checkbox",3,"change","checked"],["key","key","value","value",1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["shTooltip",G],["type","text","id","text",3,"ngModelChange","ngModel"],["shTooltip",I],[3,"ngModelChange","ngModel","customId","placeholder"],["shTooltip",J],[1,"duplicati-backup-id"],[1,"duplicati-backup-id-console"],[1,"no-backups-found"],[3,"options","isClearable"],["shTooltip",W],["shTooltip",he],["autocomplete","off",3,"ngModelChange","type","id","ngModel","placeholder","disabled"],["shButton","","type","button",1,"outlined",3,"click"],[1,"info"],["shButton","","type","button",1,"outlined",3,"routerLink"],["shTooltip",Sn],["type","text","autocomplete","off",3,"ngModelChange","id","ngModel"],["suffix","","shButton","","type","button",1,"outlined","small",3,"click","disabled"],[1,"error",3,"shTooltip"],[1,"warn",3,"shTooltip"]]},template:function(e,n){if(e&1&&(um(0)(1),aT(2,Er,18,5)),e&2){let o=WC(n.destinationType());CE();let a=WC(n.destinationFormConfig());CE(),cT(o&&a?2:-1);}},dependencies:[Gn,Ze$1,en$1,Rn,Bn,Jt,ei,_t$1,Ne,Ct$1,Mt,Zt,Fe,v,N,I,ve$1,Nt$1,at,J,d,m$2],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.advanced-options[_ngcontent-%COMP%]{position:relative;z-index:1}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}sh-select[_ngcontent-%COMP%]{--miw: p2r(120)}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-8)}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-8)}label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}label[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1rem}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.raw-text-area[_ngcontent-%COMP%]{min-height:12rem;white-space:pre}.duplicati-backup-id[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:8px;align-items:flex-end}.duplicati-backup-id[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{width:100%}.duplicati-backup-id-console[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:8px;align-items:center}.duplicati-backup-id-console[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;gap:4px}.no-backups-found[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-left:4px;margin-right:4px}.browse[_ngcontent-%COMP%]{padding:.25rem}"]})};var nn=class i{#e=T(C$1);#t=T(be);#n=T(m$1);testDestination(t,e,n,o,a,_,c,u,T){return this.#n.hasV2TestOperations()?this.testDestinationv2(t,e,n,o,a,_,c,u,T):this.testDestinationv1(t,e,n,o,a,_,c,u,T)}testDestinationv2(t,e,n,o,a,_,c,u,T){return new S(D=>{this.#e.postApiV2DestinationTest({requestBody:{DestinationUrl:t,ConnectionStringId:n??null,BackupId:e=="new"?null:e,AutoCreate:u==="create",ReadOnlyTest:T,Options:null,DestinationType:_,SourcePrefix:e=="new"?null:o}}).subscribe({next:y=>{if(y.Success){this.emitSuccessV2(D,t,a,y);return}this.handleGenericError(D,t,a,y.Error??"Unknown error",c);},error:y=>{let M=y?.error?.body??y?.error?.requestBody;if(M?.Data?.FolderExists===false||M?.StatusCode==="missing-folder"){this.handleMissingFolder(D,t,e,n,a,c,u,T);return}if(M?.Data?.HostCertificate){this.handleMissingCertificate(D,t,a,M.Data?.HostCertificate,c);return}if(M?.Data?.ReportedHostKey){this.handleIncorrectKey(D,t,a,M.Data.ReportedHostKey,M.Data.AcceptedHostKey??null,c);return}this.handleGenericError(D,t,a,y?.message??"Unknown error",c);}});})}testDestinationv1(t,e,n,o,a,_,c,u,T){return new S(D=>{this.#e.postApiV1RemoteoperationTest({readOnlyTest:T,requestBody:{path:t,backupId:e=="new"?null:e,connectionStringId:n??null,sourcePrefix:e=="new"?null:o},type:_}).subscribe({next:y=>{D.next({action:"success",targetUrl:t,testAgain:false,destinationIndex:a}),D.complete();},error:y=>{this.handleDestinationErrorv1(y.message,t,e,n,a,c,u,T).subscribe(M=>{D.next(M);});}});})}handleMissingFolder(t,e,n,o,a,_,c,u){function T(){t.next({action:"missing-folder",targetUrl:e,testAgain:false,destinationIndex:a,errorMessage:$localize`The remote destination folder does not exist.`}),t.complete();}if(_||c==="error"){T();return}this.#t.open(h$1,{data:{title:$localize`Create folder`,message:$localize`The remote destination folder does not exist, do you want to create it?`,confirmText:$localize`Create folder`,cancelText:$localize`Cancel`},closed:D=>{if(!D){this.reportNoAction(t,e,a,$localize`The remote folder does not exist.`);return}this.#n.hasV2TestOperations()?this.#e.postApiV2DestinationTest({requestBody:{DestinationUrl:e,ConnectionStringId:o,AutoCreate:true,ReadOnlyTest:u,Options:null,BackupId:n=="new"?null:n}}).subscribe({next:y=>{if(y.Success){this.emitSuccessV2(t,e,a,y);return}else this.handleFolderCreateFailure(t,e,a,y.Error??$localize`Unknown error`);},error:y=>{this.handleFolderCreateFailure(t,e,a,y.message??$localize`Unknown error`);}}):this.#e.postApiV1RemoteoperationCreate({requestBody:{path:e,backupId:n=="new"?null:n}}).subscribe({next:()=>{this.handleFolderCreated(t,e,a);},error:y=>{this.handleFolderCreateFailure(t,e,a,y.message??$localize`Unknown error`);}});}});}handleFolderCreateFailure(t,e,n,o){this.#t.open(h$1,{data:{title:$localize`Error creating folder`,message:$localize`The remote destination folder could not be created. ${o}`,confirmText:$localize`OK`,cancelText:null},closed:()=>{t.next({action:"generic-error",targetUrl:e,testAgain:false,destinationIndex:n}),t.complete();}});}emitSuccessV2(t,e,n,o){t.next({action:"success",targetUrl:e,testAgain:false,destinationIndex:n,anyFilesFound:!o.Data?.FolderIsEmpty,containsBackup:o.Data?.FolderContainsBackupFiles??void 0,containsEncryptedBackupFiles:o.Data?.FolderContainsEncryptedBackupFiles??void 0}),t.complete();}handleFolderCreated(t,e,n){this.#t.open(h$1,{data:{title:$localize`Folder created`,message:$localize`The remote destination folder was created successfully.`,confirmText:$localize`OK`,cancelText:null},closed:()=>{t.next({action:"test-again",targetUrl:e,testAgain:true,destinationIndex:n}),t.complete();}});}reportNoAction(t,e,n,o){t.next({action:"generic-error",targetUrl:e,errorMessage:o,testAgain:false,destinationIndex:n}),t.complete();}handleMissingCertificate(t,e,n,o,a){let _=$localize`The server is using a certificate that is not trusted.
|
|
7
|
+
If this is a self-signed certificate, you can choose to trust this certificate.
|
|
8
|
+
The server reported the certificate hash: ${o}`,c=e.includes("?");function u(){t.next({action:"trust-cert",targetUrl:e,suggestedUrl:e+`${c?"&":"?"}accept-specified-ssl-hash=${o}`,testAgain:true,certData:o,errorMessage:_,destinationIndex:n}),t.complete();}if(a){u();return}this.#t.open(h$1,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:_,confirmText:$localize`Trust the certificate`,cancelText:$localize`Cancel`},closed:T=>{if(!T){this.reportNoAction(t,e,n,$localize`The server certificate is not trusted.`);return}u();}});}handleIncorrectKey(t,e,n,o,a,_){if(a){let D=function(){t.next({action:"approve-host-key",targetUrl:e,suggestedUrl:T,testAgain:true,reportedHostKey:o,errorMessage:u,destinationIndex:n}),t.complete();};let u=$localize`The host key has changed, please check with the server administrator if this is correct,
|
|
9
|
+
otherwise you could be the victim of a MAN-IN-THE-MIDDLE attack.
|
|
10
|
+
Do you want to REPLACE your CURRENT host key ${a}
|
|
11
|
+
with the REPORTED host key: ${o}?`,T=e;try{let M=new URL(e);M.searchParams.set("ssh-fingerprint",o),T=M.toString();}catch{let M=e.replace(/([?&])ssh-fingerprint=[^&]*/,""),G=M.includes("?");T=M+`${G?"&":"?"}ssh-fingerprint=${o}`;}if(_){D();return}this.#t.open(h$1,{maxWidth:"500px",data:{title:$localize`The host key has changed`,message:u,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:M=>{if(!M){this.reportNoAction(t,e,n,$localize`The host key was not approved.`);return}D();}});}else {let D=function(){t.next({action:"approve-host-key",targetUrl:e,suggestedUrl:e+`${T?"&":"?"}ssh-fingerprint=${o}`,testAgain:true,reportedHostKey:o,errorMessage:u,destinationIndex:n}),t.complete();};let u=$localize`No certificate was specified, please verify that the reported host key is correct: ${o}`,T=e.includes("?");if(_){D();return}this.#t.open(h$1,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:u,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:y=>{if(!y){this.reportNoAction(t,e,n,$localize`The host key was not approved.`);return}D();}});}}handleGenericError(t,e,n,o,a){function _(){t.next({action:"generic-error",targetUrl:e,testAgain:false,destinationIndex:n,errorMessage:o}),t.complete();}if(a){_();return}this.#t.open(h$1,{maxWidth:"500px",data:{title:$localize`Test connection failed`,message:o,cancelText:$localize`OK`},closed:c=>_()});}handleDestinationErrorv1(t,e,n,o,a,_,c,u){return new S(T=>{if(t==="missing-folder"){this.handleMissingFolder(T,e,n,o,a,_,c,u);return}if(t.startsWith("incorrect-cert:")){let D=t.split("incorrect-cert:")[1];this.handleMissingCertificate(T,e,a,D,_);return}if(t.startsWith("incorrect-host-key:")){let D=t.split('incorrect-host-key:"')[1].split('",')[0],y=t.split('accepted-host-key:"')[1].split('",')[0];this.handleIncorrectKey(T,e,a,D,y,_);return}this.handleGenericError(T,e,a,t,_);})}static \u0275fac=function(e){return new(e||i)};static \u0275prov=ee$1({token:i,factory:i.\u0275fac,providedIn:"root"})};function yr(i,t){if(i&1){let e=vT();Qi$1(0,"sh-alert",13),Lg(1,0),Qi$1(2,"button",14),Vg("click",function(){kd(e);let o=iC(2);return Od(o.testDestinationClick())}),$l(),Fg(),$l();}}function Nr(i,t){i&1&&(Qi$1(0,"sh-alert",13),Lg(1,1),vg(2,"sh-icon"),Qi$1(3,"div",15),vg(4,"sh-spinner"),$l(),Fg(),$l()),i&2&&(CE(4),Zg("--spinner-size","16px")("--spinner-thickness","2px"));}function Fr(i,t){i&1&&(Qi$1(0,"sh-alert",17),nC(1,2),$l());}function Dr(i,t){i&1&&(Qi$1(0,"sh-alert",16),nC(1,3),$l());}function Ar(i,t){if(i&1&&aT(0,Fr,2,0,"sh-alert",17)(1,Dr,2,0,"sh-alert",16),i&2){let e=iC(4);cT(e.testResponse()?.containsBackup?0:1);}}function Ir(i,t){i&1&&(Qi$1(0,"sh-alert",18),nC(1,4),$l());}function Or(i,t){i&1&&(Qi$1(0,"sh-alert",16),nC(1,5),$l());}function Pr(i,t){i&1&&(Qi$1(0,"sh-alert",17),nC(1,6),$l());}function Mr(i,t){if(i&1&&aT(0,Ir,2,0,"sh-alert",18)(1,Or,2,0,"sh-alert",16)(2,Pr,2,0,"sh-alert",17),i&2){let e=iC(4);cT(e.testResponse()?.containsBackup?0:e.testResponse()?.anyFilesFound?1:2);}}function xr(i,t){i&1&&(Qi$1(0,"sh-alert",17),nC(1,7),$l());}function Rr(i,t){i&1&&(Qi$1(0,"sh-alert",16),nC(1,8),$l());}function Lr(i,t){if(i&1&&aT(0,xr,2,0,"sh-alert",17)(1,Rr,2,0,"sh-alert",16),i&2){let e=iC(4);cT(e.testResponse()?.anyFilesFound?0:1);}}function br(i,t){i&1&&(Qi$1(0,"sh-alert",17),nC(1,9),$l());}function vr(i,t){i&1&&(Qi$1(0,"sh-alert",17),nC(1,10),$l());}function wr(i,t){i&1&&(Qi$1(0,"sh-alert",17),nC(1,11),$l());}function Gr(i,t){if(i&1&&aT(0,br,2,0,"sh-alert",17)(1,vr,2,0,"sh-alert",17)(2,wr,2,0,"sh-alert",17),i&2){let e=iC(4);cT(e.testResponse()?.containsBackup?0:e.testResponse()?.anyFilesFound?1:2);}}function kr(i,t){if(i&1&&aT(0,Ar,2,1)(1,Mr,3,1)(2,Lr,2,1)(3,Gr,3,1),i&2){let e=iC(3);cT(e.testExpectation()==="containsBackup"?0:e.testExpectation()==="destinationEmpty"?1:e.testExpectation()==="destinationNotEmpty"?2:3);}}function $r(i,t){if(i&1){let e=vT();Lg(0,12,1),Qi$1(1,"button",14),Vg("click",function(){kd(e);let o=iC(4);return Od(o.createFolder())}),$l(),Fg();}}function Ur(i,t){if(i&1&&(Qi$1(0,"sh-alert",16),Lg(1,12),aT(2,$r,2,0,"button",19),Fg(),$l()),i&2){let e=iC(3);CE(2),cT(e.askToCreate()?2:-1);}}function Br(i,t){if(i&1){let e=vT();Qi$1(0,"sh-alert",16),jC(1),Qi$1(2,"button",14),Vg("click",function(){kd(e);let o=iC(3);return Od(o.useSuggestedUrl())}),jC(3,"Approve"),$l()();}if(i&2){let e=iC(3);CE(),Ql(" ",e.testResponse()?.errorMessage," ");}}function Vr(i,t){if(i&1){let e=vT();Qi$1(0,"sh-alert",16),jC(1),Qi$1(2,"button",14),Vg("click",function(){kd(e);let o=iC(3);return Od(o.useSuggestedUrl())}),jC(3,"Approve"),$l()();}if(i&2){let e=iC(3);CE(),Ql(" ",e.testResponse()?.errorMessage," ");}}function Kr(i,t){if(i&1){let e=vT();Qi$1(0,"sh-alert",16),jC(1),Qi$1(2,"button",14),Vg("click",function(){kd(e);let o=iC(3);return Od(o.testDestinationClick())}),jC(3,"Test again"),$l()();}if(i&2){let e=iC(3);CE(),Ql(" ",e.testResponse()?.errorMessage," ");}}function Jr(i,t){if(i&1&&aT(0,kr,4,1)(1,Ur,3,1,"sh-alert",16)(2,Br,4,1,"sh-alert",16)(3,Vr,4,1,"sh-alert",16)(4,Kr,4,1,"sh-alert",16),i&2){let e=iC(2);cT(e.testResponse()?.action==="success"?0:e.testResponse()?.action==="missing-folder"?1:e.testResponse()?.action==="trust-cert"?2:e.testResponse()?.action==="approve-host-key"?3:e.testResponse()?.action==="generic-error"?4:-1);}}function Xr(i,t){if(i&1&&aT(0,yr,3,0,"sh-alert",13)(1,Nr,5,4,"sh-alert",13)(2,Jr,5,1),i&2){let e=iC();cT(e.testSignal()===null?0:e.testSignal()==="testing"?1:2);}}var on=class i{#e=T(nn);targetUrl=E1.required();testSignal=E1.required();connectionStringId=I1(null);backupId=I1.required();sourcePrefix=I1.required();suppressErrorDialogs=I1.required();askToCreate=I1.required();readOnlyTest=I1.required();testExpectation=I1.required();moduleType=I1.required();testResponse=Nt(()=>{let t=this.testSignal();return t&&typeof t!="string"?t:null});isExpectedValidTargetUrl=Nt(()=>{let t=this.targetUrl();return !(!t||!xe(t))});prevTargetUrl=null;targetUrlEffect=za$1(()=>{let t=this.targetUrl(),e=this.prevTargetUrl;t!==e&&(this.prevTargetUrl=t,this.testSignal()!=="testing"&&e!==null&&this.testSignal.set(null));});useSuggestedUrl(){let t=this.targetUrl(),e=this.testSignal(),n=e&&typeof e!="string"?e?.targetUrl:null,o=e&&typeof e!="string"?e?.suggestedUrl:null;return !t||!o||n!==t||(this.targetUrl.set(o),this.testDestinationClick()),false}createFolder(){return this.testDestination(true),false}testDestinationClick(){return this.testDestination(false),false}testDestination(t){let e=this.targetUrl();if(!e)return;this.testSignal.set("testing");let n=t?"create":this.askToCreate()?"prompt":"error";return new Promise(o=>{this.#e.testDestination(e,this.backupId(),this.connectionStringId(),this.sourcePrefix(),0,this.moduleType(),this.suppressErrorDialogs(),n,this.readOnlyTest())?.subscribe({next:a=>{if(!this.suppressErrorDialogs()&&a.testAgain){let _=a.suggestedUrl;_&&this.targetUrl.set(_),this.testSignal.set("testing"),this.#e.testDestination(_??e,this.backupId(),this.connectionStringId(),this.sourcePrefix(),0,this.moduleType(),this.suppressErrorDialogs(),n,this.readOnlyTest())?.subscribe({next:c=>{this.testSignal.set(c),o(c);}});}else this.testSignal.set(a),o(a);}});})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-test-url"]],inputs:{targetUrl:[1,"targetUrl"],testSignal:[1,"testSignal"],connectionStringId:[1,"connectionStringId"],backupId:[1,"backupId"],sourcePrefix:[1,"sourcePrefix"],suppressErrorDialogs:[1,"suppressErrorDialogs"],askToCreate:[1,"askToCreate"],readOnlyTest:[1,"readOnlyTest"],testExpectation:[1,"testExpectation"],moduleType:[1,"moduleType"]},outputs:{targetUrl:"targetUrlChange",testSignal:"testSignalChange"},decls:1,vars:1,consts:()=>{let t;t=$localize` Make sure to test the configuration ${"\uFFFD#2\uFFFD"}:START_TAG_BUTTON:Test now${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_BUTTON:`;let e;e=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:spinner${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD#3\uFFFD"}:START_TAG_DIV: Testing connection... ${"\uFFFD#4\uFFFD"}:START_TAG_SH_SPINNER:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_SPINNER:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`;let n;n=$localize`Success! Test completed, backup found.`;let o;o=$localize`No backup found at the specified destination.`;let a;a=$localize` The remote destination already contains a backup. Please use a different folder for each backup. `;let _;_=$localize` The remote destination is not empty. It is recommended to use an empty folder for the backup. `;let c;c=$localize`Success! Test completed, destination is empty.`;let u;u=$localize`Success! Test completed, destination contains files.`;let T;T=$localize`The remote destination is empty.`;let D;D=$localize`Success! Test completed, backup found.`;let y;y=$localize`Success! Test completed, destination contains files.`;let M;M=$localize`Success! Test completed, destination is empty.`;let G;return G=$localize` The specified folder does not exist. ${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON:Create now${"\uFFFD/#1:1\uFFFD"}:CLOSE_TAG_BUTTON:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:`,[t,e,n,o,a,_,c,u,T,D,y,M,G,[1,"simple","primary"],["shButton","",1,"primary","small",3,"click"],[1,"testing"],[1,"simple","warn"],[1,"simple","success"],[1,"simple","error"],["shButton","",1,"primary","small"]]},template:function(e,n){e&1&&aT(0,Xr,3,1),e&2&&cT(n.isExpectedValidTargetUrl()?0:-1);},dependencies:[ue,v,N,m$2],styles:["[_nghost-%COMP%]{display:block}.testing[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:8px;justify-content:space-between}"]})};function zr(i,t){if(i&1){let e=vT();Qi$1(0,"app-destination-list",10),Vg("setDestination",function(o){kd(e);let a=iC();return Od(a.setDestination(o))}),$l();}if(i&2){let e=iC();yg("showAsSources",true)("moduleType",e.moduleType());}}function Wr(i,t){if(i&1){let e=vT();Qi$1(0,"app-destination-list-item",11)(1,"button",8),Vg("click",function(){kd(e);let o=iC();return Od(o.removeDestination())}),nC(2,3),$l()(),Qi$1(3,"app-test-url",12),cm("targetUrlChange",function(o){kd(e);let a=iC();return UC(a.targetUrlModel,o)||(a.targetUrlModel=o),Od(o)})("testSignalChange",function(o){kd(e);let a=iC();return UC(a.testSignal,o)||(a.testSignal=o),Od(o)}),$l(),Qi$1(4,"app-single-destination",13),cm("targetUrlChange",function(o){kd(e);let a=iC();return UC(a.targetUrlModel,o)||(a.targetUrlModel=o),Od(o)}),$l();}if(i&2){let e=iC();yg("targetUrl",e.targetUrlModel()),CE(3),am("targetUrl",e.targetUrlModel)("testSignal",e.testSignal),yg("backupId",e.backupId())("sourcePrefix",e.sourcePrefix())("suppressErrorDialogs",e.suppressErrorDialogs())("askToCreate",e.askToCreate())("testExpectation",e.expectedResult())("readOnlyTest",true)("moduleType",e.moduleType()),CE(),am("targetUrl",e.targetUrlModel);}}function Hr(i,t){i&1&&nC(0,2,1);}function jr(i,t){i&1&&nC(0,2,2);}function qr(i,t){i&1&&nC(0,2,3);}function Yr(i,t){i&1&&nC(0,2,4);}var Tt=class i{data=I1();closed=v1();targetUrlModel=Ge(null);moduleType=Ge("Backend");askToCreate=Ge(false);expectedResult=Ge("any");suppressErrorDialogs=Ge(false);backupId=Ge(null);sourcePrefix=Ge(null);dataEffect=za$1(()=>{let t=this.data();t?.targetUrlModel&&this.targetUrlModel.set(t.targetUrlModel),t?.moduleType&&this.moduleType.set(t.moduleType),t?.askToCreate!==null&&t?.askToCreate!==void 0&&this.askToCreate.set(t.askToCreate),t?.expectedResult&&this.expectedResult.set(t.expectedResult),t?.suppressErrorDialogs!==null&&t?.suppressErrorDialogs!==void 0&&this.suppressErrorDialogs.set(t.suppressErrorDialogs),t?.backupId&&this.backupId.set(t.backupId),t?.sourcePrefix&&this.sourcePrefix.set(t.sourcePrefix);});testSignal=Ge(null);setTargetUrl(t,e=false){this.targetUrlModel.set(t);}setDestination(t){let e=G(t??"");if(e){if(e.mapper.default){let n=e.mapper.default("");this.setTargetUrl(n,true);return}this.setTargetUrl(`${t}://`,true);}}submit(){this.closed.emit(this.targetUrlModel());}removeDestination(){this.setTargetUrl(null,true);}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-target-url-dialog"]],inputs:{data:[1,"data"]},outputs:{closed:"closed"},decls:15,vars:6,consts:()=>{let t;t=$localize`Remote source`;let e;e=$localize`Cancel`;let n;n=$localize`${"\uFFFD*11:1\uFFFD"}:START_BLOCK_IF: Use storage destination ${"\uFFFD/*11:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*12:2\uFFFD"}:START_BLOCK_ELSE_IF: Use remote source ${"[\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD]"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*13:3\uFFFD"}:START_BLOCK_ELSE_IF_1: Use remote destination ${"[\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD]"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*14:4\uFFFD"}:START_BLOCK_ELSE: Use remote URL ${"\uFFFD/*14:4\uFFFD"}:CLOSE_BLOCK_ELSE:`,n=oC(n);let o;return o=$localize`Change`,[t,e,n,o,[1,"title-30"],["content",""],[3,"showAsSources","moduleType"],["footer","",1,"sticky"],["shButton","","type","button",3,"click"],["shButton","","type","button",1,"raised","primary",3,"click","disabled"],[3,"setDestination","showAsSources","moduleType"],[1,"current-destination",3,"targetUrl"],[3,"targetUrlChange","testSignalChange","targetUrl","testSignal","backupId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","readOnlyTest","moduleType"],[3,"targetUrlChange","targetUrl"]]},template:function(e,n){if(e&1&&(Qi$1(0,"header")(1,"h3",4),nC(2,0),$l()(),Qi$1(3,"section",5),aT(4,zr,1,2,"app-destination-list",6),aT(5,Wr,5,11),$l(),Qi$1(6,"footer",7)(7,"button",8),Vg("click",function(){return n.closed.emit(null)}),nC(8,1),$l(),Qi$1(9,"button",9),Vg("click",function(){return n.submit()}),Lg(10,2),aT(11,Hr,1,0)(12,jr,1,0)(13,qr,1,0)(14,Yr,1,0),Fg(),$l()()),e&2){let o=!!n.targetUrlModel();CE(4),cT(o?-1:4),CE(),cT(o?5:-1),CE(4),Yg("loading",n.testSignal()==="testing"),yg("disabled",!o||n.testSignal()===null||n.testSignal()==="testing"),CE(2),cT(n.moduleType()==="Backend"?11:n.moduleType()==="SourceProvider"?12:n.moduleType()==="RestoreDestinationProvider"?13:14);}},dependencies:[tn,Qt,lt,v,on],styles:["[_nghost-%COMP%]{--dialog-p: 1.5rem;display:flex;flex-direction:column;gap:1rem}header[_ngcontent-%COMP%]{display:flex;padding:1.5rem 1.5rem 0}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}footer[_ngcontent-%COMP%]{z-index:1}"]})};var Qr=["formRef"],Zr=()=>({updateOn:"blur",standalone:true}),gn=()=>({standalone:true});function es(i,t){if(i&1){let e=vT();Qi$1(0,"button",41),Vg("click",function(){kd(e);let o=iC(2);return Od(o.openLocalDiskDialog())}),Lg(1,12),vg(2,"sh-icon"),Fg(),$l();}}function ts(i,t){if(i&1){let e=vT();aT(0,es,3,0,"button",40),Qi$1(1,"button",41),Vg("click",function(){kd(e);let o=iC();return Od(o.openRemoteDestinationDialog())}),Lg(2,11),vg(3,"sh-icon"),Fg(),$l();}if(i&2){let e=iC();cT(e.isLocalDiskSupported()?0:-1);}}function ns(i,t){i&1&&nC(0,7,1);}function is(i,t){i&1&&nC(0,7,2);}function os(i,t){i&1&&(Qi$1(0,"p",34),nC(1,13),$l());}function as(i,t){i&1&&(Qi$1(0,"p",34),nC(1,14),$l());}function rs(i,t){if(i&1){let e=vT();Qi$1(0,"sh-form-field")(1,"textarea",42),cm("ngModelChange",function(o){kd(e);let a=iC();return UC(a.bulkPaths,o)||(a.bulkPaths=o),Od(o)}),Vg("ngModelChange",function(){kd(e);let o=iC();return Od(o.savePathBulkEdit())}),$l(),CD(),$l();}if(i&2){let e=iC();CE(),am("ngModel",e.bulkPaths),yg("ngModelOptions",KC(2,Zr)),_D();}}function ss(i,t){if(i&1){let e=vT();Qi$1(0,"sh-form-field",46)(1,"input",47),cm("ngModelChange",function(o){kd(e);let a=iC(3);return UC(a.editingPath,o)||(a.editingPath=o),Od(o)}),$l(),CD(),$l(),Qi$1(2,"button",24),Vg("click",function(){kd(e);let o=iC(3);return Od(o.updatePath())}),Qi$1(3,"sh-icon"),jC(4,"floppy-disk"),$l()(),Qi$1(5,"button",24),Vg("click",function(){kd(e);let o=iC(3);return Od(o.cancelEditPath())}),Qi$1(6,"sh-icon"),jC(7,"x-bold"),$l()();}if(i&2){let e=iC(3);CE(),am("ngModel",e.editingPath),yg("ngModelOptions",KC(2,gn)),_D();}}function ls(i,t){if(i&1){let e=vT();Qi$1(0,"button",50),Vg("click",function(){kd(e);let o=iC(3).$implicit,a=iC(2);return Od(a.openOffice365Counts(o))}),Qi$1(1,"sh-icon"),jC(2,"info"),$l()();}}function _s(i,t){if(i&1&&(Qi$1(0,"sh-chip"),vg(1,"img",48),jC(2),$l(),aT(3,ls,3,0,"button",49)),i&2){let e=iC(2).$implicit,n=iC(2);CE(),yg("src",n.getBackendIcon(e),Qp),CE(),Ql(" ",n.getRemotePathDisplayName(e)," "),CE(),cT(e.includes("|office365://")?3:-1);}}function ds(i,t){if(i&1&&(Qi$1(0,"sh-form-field",46),vg(1,"input",51),CD(),$l()),i&2){let e=iC(2).$implicit;mg("readonly",true),CE(),yg("ngModel",e)("ngModelOptions",KC(3,gn)),_D();}}function cs(i,t){if(i&1){let e=vT();aT(0,_s,4,3)(1,ds,2,4,"sh-form-field",46),Qi$1(2,"button",24),Vg("click",function(){kd(e);let o=iC().$implicit,a=iC(2);return Od(a.editPath(o))}),Qi$1(3,"sh-icon"),jC(4,"pen"),$l()(),Qi$1(5,"button",24),Vg("click",function(){kd(e);let o=iC().$implicit,a=iC(2);return Od(a.removePath(o))}),Qi$1(6,"sh-icon"),jC(7,"trash-simple"),$l()();}if(i&2){let e=iC().$implicit;cT(e.startsWith("@")?0:1);}}function us(i,t){if(i&1&&(Qi$1(0,"div",43),aT(1,ss,8,3)(2,cs,8,1),$l()),i&2){let e=t.$implicit,n=iC(2);CE(),cT(n.oldPath()===e?1:2);}}function ps(i,t){if(i&1){let e=vT();dT(0,us,3,1,"div",43,lT),Qi$1(2,"div",39)(3,"sh-form-field"),vg(4,"input",44),CD(),$l(),Qi$1(5,"button",45),Vg("click",function(){kd(e);let o=iC();return Od(o.addNewPath())}),Qi$1(6,"sh-icon"),jC(7,"plus"),$l()()();}if(i&2){let e=iC();fT(e.nonFilterPaths()),CE(4),yg("formControl",e.newPathCtrl),_D();}}function ms(i,t){if(i&1){let e=vT();Qi$1(0,"div",39)(1,"app-size",52),Vg("ngModelChange",function(o){kd(e);let a=iC();return Od(a.updateFilesLargerThan(o))}),$l(),CD(),$l();}if(i&2){let e=iC();CE(),yg("ngModel",e.filesLargerThan())("ngModelOptions",KC(2,gn)),_D();}}var dt=new jn,_i=(i={path:"",filters:[],excludes:{filesLargerThan:null}})=>dt.group({path:dt.control(i.path),excludes:dt.group({filesLargerThan:dt.group({size:dt.control(null),unit:dt.control(null)})})}),mn=class i{#e=T(ke);#t=T(be);#n=T(ee);#i=T(W);#o=T(m$1);#r=T(d$1);formRef=D1.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new L("");filesLargerThan=Nt(()=>{let t=this.sourceDataFormSignal()?.excludes?.filesLargerThan??{};return t.size!==null&&t.unit!==null?`${t.size}${t.unit}`:null});osType=this.#e.osType;pathSignal=L$1(this.sourceDataForm.controls.path.valueChanges);pathArray=Nt(()=>this.pathSignal()?.split("\0").filter(t=>t.startsWith("-")||t.startsWith("+")||t==="___none___")??[]);nonFilterPaths=Nt(()=>this.pathSignal()?.split("\0").filter(t=>!t.startsWith("-")&&!t.startsWith("+")&&t!==""));oldPath=Ge(null);editingPath=Ge(null);addingNewPath=Ge(false);bulkPathEditMode=Ge(false);bulkPaths=Ge("");mobileMenuOpen=Ge(false);backupId=this.#e.backupId();isLocalDiskSupported=Nt(()=>this.#o.systemInfo()?.SourceProviderModules?.find(t=>t.Key=="diskimage"));filters=Ge([]);#a=za$1(()=>{let e=this.pathSignal()?.split("\0").filter(n=>n!=="___none___"&&(n.startsWith("-")||n.startsWith("+")))??[];this.filters.set(e);});openRemoteDestinationDialog(){this.#t.open(Tt,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:false,data:{targetUrlModel:null,moduleType:"SourceProvider",askToCreate:false,expectedResult:"destinationNotEmpty",suppressErrorDialogs:true,backupId:null,sourcePrefix:null}}).component.closed.subscribe(e=>{if(!e)return;let n=Math.random().toString(36).substring(2,10),o=e.split("://")[0],_=`@${this.#o.systemInfo()?.DirectorySeparator==="\\"?"X:\\":"/"}dupl-${o}-${n}|${e}`;this.addPath(_);});}openLocalDiskDialog(){this.#t.open(Ct,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:false,data:{initialPath:null}}).closed.subscribe(e=>{if(!e)return;let n=Math.random().toString(36).substring(2,10),a=`@${this.#o.systemInfo()?.DirectorySeparator==="\\"?"X:\\":"/"}dupl-disk-${n}|diskimage://${e}`;this.addPath(a);});}togglePathBulkEdit(){if(this.bulkPathEditMode())this.bulkPathEditMode.set(false);else {let t=this.nonFilterPaths()?.join(`
|
|
12
|
+
`)??"";this.bulkPaths.set(t),this.bulkPathEditMode.set(true);}}savePathBulkEdit(){let t=this.bulkPaths().split(`
|
|
13
|
+
`).filter(a=>a.trim()!=="")??[],e=this.pathArray(),n=[...t,...e],o=[...new Set(n)].join("\0");this.sourceDataForm.controls.path.setValue(o);}editPath(t){if(t&&t.startsWith("@")){let e=t.split("|");if(e.length!==2)return;e[1].startsWith("diskimage://")?this.editLocalDiskSource(t,e[0],e[1].substring(12)):this.editTargetUrlPath(t,e[0],e[1]);return}this.oldPath.set(t),this.editingPath.set(t);}editLocalDiskSource(t,e,n){this.#t.open(Ct,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:false,data:{initialPath:n}}).closed.subscribe(a=>{if(!a)return;let _=`${e}|diskimage://${a}`,c=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(c?.replace(t,_)??"");});}editTargetUrlPath(t,e,n){this.#t.open(Tt,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:false,data:{targetUrlModel:n,moduleType:"SourceProvider",askToCreate:false,expectedResult:"destinationNotEmpty",suppressErrorDialogs:true,backupId:this.#e.backupId(),sourcePrefix:e}}).closed.subscribe(a=>{if(!a)return;let _=`${e}|${a}`,c=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(c?.replace(t,_)??"");});}updateFilesLargerThan(t){let{size:e,unit:n}=pn$1(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"),o=n.indexOf(t);if(o===-1)return;n.splice(o,1);let a=n.filter(_=>_&&_!=="").join("\0");this.sourceDataForm.controls.path.setValue(a);}addPath(t){let n=[this.sourceDataForm.controls.path.value,t].filter(o=>o&&o!=="").join("\0");this.sourceDataForm.controls.path.setValue(n);}updateFilters(t){let n=[...this.nonFilterPaths()??[],...t].filter(o=>o&&o!=="").join("\0");this.sourceDataForm.controls.path.setValue(n);}getPath(){return this.sourceDataForm.value.path??null}getBackendIcon(t){if(!t)return "";let e=t.split("|")[1];return Ee(e)}getRemotePathDisplayName(t){if(!t)return "";let e=t.split("|")[1];return Le(e)}openOffice365Counts(t){if(!t||!t.startsWith("@"))return;let e=t.split("|");if(e.length!==2||!e[1].startsWith("office365://"))return;let n=e[0],o=e[1];this.#t.open(qt,{maxWidth:"500px",width:"100%",closeOnOutsideClick:true,data:{url:o,sourcePrefix:n,backupId:this.backupId}});}toggleFilesLargerThan(t){t?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 o=n.filter(a=>a&&a!=="").join("\0");this.sourceDataForm.controls.path.setValue(o),this.newPathCtrl.setValue("");}goBack(){this.#n.navigate(["destination"],{relativeTo:this.#i.parent});}next(){this.#e.shouldAutoSave()&&this.#e.submit(true),this.#n.navigate(["schedule"],{relativeTo:this.#i.parent});}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-source-data"]],viewQuery:function(e,n){e&1&&Wg(n.formRef,Qr,5),e&2&&fC();},decls:57,vars:18,consts:()=>{let t;t=$localize`Path`;let e;e=$localize`Source Data`;let n;n=$localize`Folder path`;let o;o=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let a;a=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let _;_=$localize`Options`;let c;c=$localize`Paths`;let u;u=$localize`${"\uFFFD#40\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#40\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD*41:1\uFFFD"}:START_BLOCK_IF: Edit contents as list ${"\uFFFD/*41:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*42:2\uFFFD"}:START_BLOCK_ELSE: Edit contents as text ${"\uFFFD/*42:2\uFFFD"}:CLOSE_BLOCK_ELSE:`;let T;T=$localize`Exclude`;let D;D=$localize`Choose if there’s any files you want to exclude.`;let y;y=$localize` Files larger than `;let M;M=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:cloud-arrow-down${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON: Add remote path `;let G;G=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:hard-drive${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Add local disk `;let I;I=$localize`Manually add a path.`;let J;J=$localize`Edit paths as text, one per line.`;let X;X=$localize`Add a direct path`;let k;k=$localize`Edit path`;let Q;return Q=$localize`Show item counts`,[["formRef",""],e,n,o,a,_,c,u,T,D,y,M,G,I,J,[3,"submit","formGroup"],[1,"left"],[1,"header-row"],[1,"title-30"],["shButton","","type","button",1,"small","ghost","mobile-menu-toggle",3,"click"],[1,"fill",3,"multiSelect","startingPath","showFiles","showUnrootedSources","backupId"],["for","path"],["type","text","id","path","tabindex","4","placeholder",t,"formControlName","path"],[1,"form-actions"],["shButton","","type","button",1,"small",3,"click"],["shButton","","type","submit",1,"raised","primary","small"],[1,"right"],[1,"mobile-header"],["shButton","","type","button",1,"small","ghost",3,"click"],[3,"disableToggle"],["title",""],[1,"spacer"],["shButton","","type","button",1,"small"],["menu",""],["description",""],[1,"paths"],[3,"filtersChange","filters","osType"],["formGroupName","excludes",3,"disableToggle"],[1,"raised","primary",3,"checkedChange","checked"],[1,"row-inputs"],["shButton","","type","button",1,"small","rowbutton"],["shButton","","type","button",1,"small","rowbutton",3,"click"],["wrap","off","rows","10",1,"bulk-textarea",3,"ngModelChange","ngModel","ngModelOptions"],[1,"path"],["type","text","placeholder",X,3,"formControl"],["shButton","","type","button",1,"raised","primary",3,"click"],[1,"small"],["type","text","placeholder",k,3,"ngModelChange","ngModel","ngModelOptions"],["alt","Provider icon",1,"provider-icon",3,"src"],["shButton","","type","button","title",Q,1,"small"],["shButton","","type","button","title",Q,1,"small",3,"click"],["type","text",3,"ngModel","ngModelOptions"],[3,"ngModelChange","ngModel","ngModelOptions"]]},template:function(e,n){if(e&1){let o=vT();Qi$1(0,"form",15,0),Vg("submit",function(){return n.next()}),Qi$1(2,"div",16)(3,"div",17)(4,"h3",18),nC(5,1),$l(),Qi$1(6,"button",19),Vg("click",function(){return n.mobileMenuOpen.set(true)}),Qi$1(7,"sh-icon"),jC(8,"sliders"),$l()()(),Qi$1(9,"app-file-tree",20)(10,"label",21),nC(11,2),$l(),vg(12,"input",22),CD(),$l(),Qi$1(13,"div",23)(14,"button",24),Vg("click",function(){return n.goBack()}),Lg(15,3),vg(16,"sh-icon"),Fg(),$l(),Qi$1(17,"button",25),Lg(18,4),vg(19,"sh-icon"),Fg(),$l()()(),Qi$1(20,"div",26)(21,"div",27)(22,"span",18),nC(23,5),$l(),Qi$1(24,"button",28),Vg("click",function(){return n.mobileMenuOpen.set(false)}),Qi$1(25,"sh-icon"),jC(26,"x-bold"),$l()()(),Qi$1(27,"app-toggle-card",29),ql(28,30),Qi$1(29,"span"),nC(30,6),$l(),vg(31,"div",31),aT(32,ts,4,1),Qi$1(33,"sh-menu")(34,"button",32)(35,"sh-icon"),jC(36,"dots-three-vertical"),$l()(),ql(37,33),Qi$1(38,"button",24),Vg("click",function(){return n.togglePathBulkEdit()}),Lg(39,7),vg(40,"sh-icon"),aT(41,ns,1,0)(42,is,1,0),Fg(),$l(),Gl(),$l(),Gl(),aT(43,os,2,0,"p",34)(44,as,2,0,"p",34),Qi$1(45,"div",35),aT(46,rs,2,3,"sh-form-field")(47,ps,8,1),$l()(),Qi$1(48,"app-filters",36),cm("filtersChange",function(_){return kd(o),UC(n.filters,_)||(n.filters=_),Od(_)}),Vg("filtersChange",function(_){return n.updateFilters(_)}),$l(),Qi$1(49,"app-toggle-card",37),ql(50,30),nC(51,8),Gl(),Qi$1(52,"p",34),nC(53,9),$l(),Qi$1(54,"sh-toggle",38),Vg("checkedChange",function(_){return n.toggleFilesLargerThan(_)}),nC(55,10),$l(),aT(56,ms,2,3,"div",39),$l()()();}e&2&&(yg("formGroup",n.sourceDataForm),CE(9),yg("multiSelect",true)("startingPath",n.getPath())("showFiles",true)("showUnrootedSources",true)("backupId",n.backupId),CE(3),_D(),CE(8),Yg("open",n.mobileMenuOpen()),CE(7),yg("disableToggle",true),CE(5),cT(n.bulkPathEditMode()?-1:32),CE(9),cT(n.bulkPathEditMode()?41:42),CE(2),cT(n.bulkPathEditMode()?44:43),CE(3),cT(n.bulkPathEditMode()?46:47),CE(2),am("filters",n.filters),yg("osType",n.osType()??""),CE(),yg("disableToggle",true),CE(5),yg("checked",n.filesLargerThan()!==null),CE(2),cT(n.filesLargerThan()?56:-1));},dependencies:[Bn,Tn$1,Ze$1,Rn,Pn,Jt,Gn,ln,gn$1,hn,ft,Fe,N,v,J,ve$1,jt,Ne,Ze,Ct$1,D],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}@media only screen and (max-width:768px){form[_ngcontent-%COMP%]{display:block;position:relative}}.right[_ngcontent-%COMP%], .left[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:1.5rem}.header-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.mobile-header[_ngcontent-%COMP%]{display:none}@media only screen and (max-width:768px){.mobile-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:1.5rem}}.mobile-menu-toggle[_ngcontent-%COMP%]{display:none}@media only screen and (max-width:768px){.mobile-menu-toggle[_ngcontent-%COMP%]{display:inline-flex}}.left[_ngcontent-%COMP%]{padding:2.5rem;overflow:hidden;border-right:1px solid var(--base-4)}@media only screen and (max-width:768px){.left[_ngcontent-%COMP%]{border-right:none;padding:1.5rem 1.5rem 4.5rem;height:100%;width:100%}}.right[_ngcontent-%COMP%]{padding:2.5rem 1.5rem;overflow:auto}@media only screen and (max-width:768px){.right[_ngcontent-%COMP%]{position:absolute;inset:0;z-index:10;background:var(--base-1);padding:1.5rem;transform:translate(100%);transition:transform .3s cubic-bezier(.4,0,.2,1)}.right.open[_ngcontent-%COMP%]{transform:translate(0)}}.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}.path[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content min-content min-content;gap:.25rem;align-items:center}.path[_ngcontent-%COMP%] sh-chip[_ngcontent-%COMP%]{width:100%}.path[_ngcontent-%COMP%] .provider-icon[_ngcontent-%COMP%]{width:1rem;height:1rem;margin-right:.5rem}.bulk-textarea[_ngcontent-%COMP%]{width:100%;font-family:monospace;min-height:12.5rem}.paths[_ngcontent-%COMP%]{max-height:200px;overflow-y:auto;display:flex;flex-direction:column;gap:.5rem}"]})};var di="1W:1D,4W:1W,12M:1M",Cn=false,ke=class i{#e=T(ee);#t=T(m$1);#n=T(be);#i=T(C$1);#o=T(O);#r=T(zt);#a=T(st);generalForm=ci();sourceDataForm=_i();scheduleFields=pn();scheduleType=Ge("daily");settings=Ge([]);optionsFields={backupRetention:Ge("all"),backupRetentionTime:Ge(""),backupRetentionVersions:Ge(0),backupRetentionCustom:Ge("")};targetUrls=Ge([]);targetUrlModel=Nt(()=>this.targetUrls()[0]?.url??null);connectionStringId=Nt(()=>this.targetUrls()[0]?.connectionStringId??null);targetUrlTestSignal=Ge(null);backupMetadata=Ge(null);isDraft=Ge(false);backupId=Ge(null);backupName=Nt(()=>this.generalFormSignal()?.name??"");isSubmitting=Ge(false);finishedLoading=Ge(false);backupDefaults=Ge(null);applicationOptions=Ge(null);isNew=Nt(()=>this.backupId()==="new");shouldAutoSave=Nt(()=>!this.isDraft()&&!this.isNew());osType=Nt(()=>this.#t.systemInfo()?.OSType);isSyncMode=Nt(()=>this.generalForm.controls.operationType.value==="Sync");isConnectionStringSaved=Nt(()=>{let t=this.targetUrlModel();return t?this.#a.destinations().some(e=>e.BaseUrl===t):false});selectedOptions=Ge([]);sourceDataFormSignal=L$1(this.sourceDataForm.valueChanges);generalFormSignal=L$1(this.generalForm.valueChanges);encryptionFieldSignal=L$1(this.generalForm.controls.encryption.valueChanges);operationTypeFieldSignal=L$1(this.generalForm.controls.operationType.valueChanges);advancedOptions=Nt(()=>this.#t.systemInfo()?.Options?.map(this.#u)??[]);#s=Ge(null);#l=null;testSignal=this.#s.asReadonly();#_=za$1(()=>{let t=this.targetUrlModel(),e=this.#s(),n=this.#l;this.#l=t,!(e==="testing"||n===null||n===t)&&this.#s.set(null);});#g=za$1(()=>{this.targetUrlModel();let e=this.connectionStringId();if(e){let n=this.#a.destinations();if(n.length===0)return;let o=n.find(a=>a.ID===e);!o||o.BaseUrl;}});setTestState(t){this.#s.set(t);}#u(t){return {name:t.Name,type:t.Type,shortDescription:t.ShortDescription??void 0,longDescription:t.LongDescription??void 0,options:t.ValidValues}}encryptionOptions=Nt(()=>{let t=this.#t.systemInfo()?.EncryptionModules??[];return [St,...t]});nonSelectedOptions=Nt(()=>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=false){this.isSubmitting.set(true),this.#p().pipe(Gu(e=>{let n=this.#d(),o=this.backupId(),a=n;if(a.Backup){e.length>0&&e[0]!==null?n.Backup.ConnectionStringID=e[0]:e.length>0&&e[0]===null&&(n.Backup.ConnectionStringID=void 0);let c=this.targetUrls().slice(1).map((u,T)=>{let D=e[T+1];return {TargetUrl:u.url,ConnectionStringID:D??void 0,UrlKey:u.urlKey}});c.length>0&&(a.Backup.AdditionalTargetURLs=c);}return this.isDraft()&&n.Backup&&(n.Backup.Metadata=this.backupMetadata()),o==="new"||!o||this.isDraft()?this.#i.postApiV1Backups({requestBody:n}):this.#i.putApiV1BackupById({id:o,requestBody:n})}),qu(()=>this.isSubmitting.set(false))).subscribe({next:()=>{t||this.exit(false);},error:()=>{}});}validateBeforeSubmit(){this.generalForm.markAllAsTouched(),this.sourceDataForm.markAllAsTouched();let t=this.#d(),e=(t.Backup.Name??"").trim()!=="",a=(!(this.generalForm.controls.operationType.value==="Sync")&&this.generalForm.controls.encryption.value!==""&&this.generalForm.controls.encryption.value!=="-")===false||this.generalForm.controls.password.value===this.generalForm.controls.repeatPassword.value&&this.generalForm.controls.password.value!=="";if(!e||!a)return this.#n.open(h$1,{data:{title:$localize`Validation Error`,message:this.isNew()?$localize`Please fix the errors indicated before creating the backup.`:$localize`Please fix the errors indicated before saving.`,confirmText:$localize`OK`}}),"general";let _=this.targetUrls();if(!(_.length>0&&_.some(T=>T.url.trim()!=="")))return this.#n.open(h$1,{data:{title:$localize`Destination required`,message:this.isNew()?$localize`You must setup a destination before creating the backup.`:$localize`Please setup a destination before saving.`,confirmText:$localize`OK`}}),"destination";var u=(t.Backup.Sources??[]).filter(T=>T.trim()!=="").length>0;return !u||!this.sourceDataForm.valid?(this.#n.open(h$1,{data:{title:$localize`Source data required`,message:this.isNew()?$localize`You must setup source data before creating the backup.`:$localize`Please add at least one source path before saving.`,confirmText:$localize`OK`}}),"source"):""}exit(t){if(!t){this.#c(),this.#e.navigate(["/"]);return}this.#n.open(h$1,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:e=>{e&&(this.#c(),this.#e.navigate(["/"]));}});}mapSourceDataToForm(t){let e=t.Sources??"",n=t.Filters?.map(_=>`${_.Include?"+":"-"}${_.Expression}`)??[],o=t.Settings?.find(_=>_.Name==="--skip-files-larger-than")?.Value?.toUpperCase()??null,a={path:[...e,...n].join("\0"),excludes:{filesLargerThan:o===null?void 0:pn$1(o)}};this.sourceDataForm.patchValue(a);}mapDestinationToForm(t){let e=t,n=t.TargetURL??"",o=(t.ConnectionStringID===-1?null:t.ConnectionStringID)??null,a=n?[{url:n,connectionStringId:o,urlKey:null,save:!!o}]:[],_=e.AdditionalTargetURLs?.map(c=>({url:c.TargetUrl,urlKey:c.UrlKey,connectionStringId:c.ConnectionStringID??null,save:!!c.ConnectionStringID}))??[];this.targetUrls.set([...a,..._]);}mapGeneralToForm(t){let e=t.Name??"",n=t.Description??"",o=t.Settings?.find(T=>T.Name==="encryption-module"),a=t.Settings?.find(T=>T.Name==="passphrase")?.Value??"",_=o?.Value&&o.Value.length?o.Value:"",c=t.OperationType??"Backup",u={name:t.Name??"",description:t.Description??"",operationType:c};e&&e!==""&&(u.name=e),n&&n!==""&&(u.description=n),_&&_!==""&&(u.encryption=_),a&&a!==""&&(u.password=a,u.repeatPassword=a),this.generalForm.patchValue(u);}mapScheduleToForm(t){if(!t){this.scheduleType.set("disabled"),this.scheduleFields.autoRun.set(false);return}let e=this.#r.fromString(t.Repeat)??null,n=this.#m(t.Time);this.scheduleFields.autoRun.set(true),n.date&&this.scheduleFields.nextTime.date.set(n.date),this.scheduleFields.nextTime.time.set(n.time),this.scheduleFields.runAgain.repeatUnit.set(e?.unit??"D"),this.scheduleFields.runAgain.repeatValue.set(e?.value??1),this.scheduleFields.runAgain.allowedDays.mon.set(t.AllowedDays?.includes("mon")??false),this.scheduleFields.runAgain.allowedDays.tue.set(t.AllowedDays?.includes("tue")??false),this.scheduleFields.runAgain.allowedDays.wed.set(t.AllowedDays?.includes("wed")??false),this.scheduleFields.runAgain.allowedDays.thu.set(t.AllowedDays?.includes("thu")??false),this.scheduleFields.runAgain.allowedDays.fri.set(t.AllowedDays?.includes("fri")??false),this.scheduleFields.runAgain.allowedDays.sat.set(t.AllowedDays?.includes("sat")??false),this.scheduleFields.runAgain.allowedDays.sun.set(t.AllowedDays?.includes("sun")??false);let o=gt(this.scheduleFields),a=Wt.find(_=>JSON.stringify(_.data)===JSON.stringify(o));a?this.scheduleType.set(a.value):this.scheduleType.set("custom");}mapOptionsToForms(t,e=false){let n=["--no-encryption","--skip-files-larger-than","passphrase","keep-time","keep-versions","retention-policy"],o=(t.Settings??[]).map(u=>u);if(e){let u=this.#o.serverSettings()??{};Object.keys(u).filter(T=>T.startsWith("--")).forEach(T=>{o.find(y=>y.Name===T)||o.push({Name:T,Value:u[T],Filter:null});});}let a=o.filter(u=>!n.includes(u.Name)),_=o.filter(u=>n.includes(u.Name));this.settings.set(a??[]),a?.forEach(u=>{if(u.Name==="encryption-module"&&this.isNew())return this.generalForm.controls.encryption.setValue(u.Value??"")});var c="all";_?.forEach(u=>{if(u.Name==="keep-time"&&(u.Value??"")!=="")return c="time",this.optionsFields.backupRetentionTime.set(u.Value??"");if(u.Name==="keep-versions"&&(u.Value??"")!=="")return c="versions",this.optionsFields.backupRetentionVersions.set(u.Value?parseInt(u.Value):null);if(u.Name==="retention-policy"&&(u.Value??"")!=="")if(u.Value===di)c="smart";else return c="custom",this.optionsFields.backupRetentionCustom.set(u.Value??"")}),this.optionsFields.backupRetention.set(c);}storeMetadata(t,e){this.backupMetadata.set(e?t.Metadata??null:null);}getScheduleFormValue(){let t=gt(this.scheduleFields);return si(t)}#d(){let t=this.generalForm.value,e=this.getScheduleFormValue(),n=this.sourceDataForm.value,a=this.targetUrls()[0],_=a?.url??null,c=n.path?.split("\0")??[],u=this.mapFormsToSettings(),T=n.excludes?.filesLargerThan;return T&&T.size!==null&&T.unit!==null&&u.push({Name:"--skip-files-larger-than",Value:`${T.size}${T.unit}`}),{Backup:{Name:t.name,Description:t.description,TargetURL:_??null,ConnectionStringID:a?.connectionStringId??null,OperationType:t.operationType??"Backup",Sources:c.filter(D=>!(D.startsWith("-")||D.startsWith("+"))),Settings:u,Filters:c.filter(D=>D.startsWith("-")||D.startsWith("+")).map((D,y)=>({Order:y,Include:D.startsWith("+"),Expression:D.slice(1)}))},Schedule:e}}mapFormsToSettings(t=[]){let e=this.generalForm.value,n=["dblock-size","compression-module"],o=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","encryption-module","passphrase","keep-time","keep-versions","retention-policy",...n,...n.map(y=>`--${y}`)],a=[{Name:"--no-encryption",Value:"True"}];!(e.operationType==="Sync")&&e.encryption!==""&&e.encryption!==St.Key&&(a=[{Name:"encryption-module",Value:e.encryption??null},{Name:"passphrase",Value:e.password??null}]);let c=n.map(y=>{let M=this.settings().find(G=>G.Name===y||G.Name==="--"+y);return M?{Name:y,Value:M.Value}:null}).filter(y=>y!==null),u=[];if(!this.isSyncMode())switch(this.optionsFields.backupRetention()){case "time":u.push({Name:"keep-time",Value:this.optionsFields.backupRetentionTime()});break;case "versions":u.push({Name:"keep-versions",Value:this.optionsFields.backupRetentionVersions()?.toString()??""});break;case "custom":u.push({Name:"retention-policy",Value:this.optionsFields.backupRetentionCustom()});break;case "smart":u.push({Name:"retention-policy",Value:di});break}let T=[...t,...o],D=this.settings().filter(y=>!T.includes(y.Name)).map(y=>{let M=y.Value;return typeof y.Value=="number"&&(M=y.Value.toString()),typeof y.Value=="boolean"&&(M=y.Value?"True":"False"),{Name:y.Name?.startsWith("--")?y.Name:`--${y.Name}`,Value:M}});return [...a,...c,...u,...D]}#p(){let t=this.targetUrls();if(t.length===0)return oy([]);let e=t.map(n=>{if(n.connectionStringId)return oy(n.connectionStringId);if(!n.save)return oy(null);let o=n.url,_=V(o)?.displayName??"Destination";this.#a.destinations().filter(y=>y.Name?.startsWith(_)).length;let D={Name:`${_} ${new Date().toISOString()}`,Description:null,BaseUrl:o};return this.#a.save("new",D).pipe(pt(y=>y.Data?.ID??null))});return Dy(e).pipe(nd(n=>{let o=this.targetUrls();n.forEach((a,_)=>{if(a&&_<o.length&&(this.#a.reload(),o[_].connectionStringId!==a)){let c=o[_].urlKey;this.updateTargetUrl(_,o[_].url,a,c);}});}))}#m(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.getFullYear()).padStart(4,"0")}-${(""+(e.getMonth()+1)).padStart(2,"0")}-${(""+e.getDate()).padStart(2,"0")}`}}setTargetUrl(t,e=false,n=null,o=null){if(e&&(this.#l=null),t===null){this.targetUrls.set([]);return}this.targetUrls.update(a=>{let _=[...a];return _.length===0?_.push({url:t,urlKey:o,connectionStringId:n,save:n?true:Cn}):_[0]={url:t,urlKey:o,connectionStringId:n,save:n?true:Cn},_});}addTargetUrl(t,e,n){this.targetUrls.update(o=>[...o,{url:t,connectionStringId:e,urlKey:n,save:e?true:Cn}]);}updateTargetUrl(t,e,n,o){this.targetUrls.update(a=>{if(t<0||t>=a.length)return a;let _=[...a],c=_[t].save;return _[t]={url:e,connectionStringId:n,urlKey:o,save:n?true:c},_});}toggleSaveConnectionString(t){this.targetUrls.update(e=>{if(t<0||t>=e.length)return e;let n=[...e];return n[t]=m$3(l({},n[t]),{save:!n[t].save}),n});}removeTargetUrl(t){this.targetUrls.update(e=>e.filter((n,o)=>o!==t));}#c(){this.generalForm.reset({operationType:"Backup"}),this.sourceDataForm.reset(),this.scheduleFields=pn(),this.optionsFields.backupRetention.set("all"),this.settings.set([]),this.targetUrls.set([]);}static \u0275fac=function(e){return new(e||i)};static \u0275prov=ee$1({token:i,factory:i.\u0275fac,providedIn:"root"})};var gs=["formRef"];function Cs(i,t){i&1&&(Qi$1(0,"sh-alert",31),Lg(1,5),vg(2,"sh-icon",33),Fg(),$l());}function Ts(i,t){i&1&&(Qi$1(0,"sh-alert",32),Lg(1,6),vg(2,"sh-icon",33),Fg(),$l());}function Ss(i,t){if(i&1&&aT(0,Cs,3,0,"sh-alert",31)(1,Ts,3,0,"sh-alert",32),i&2){let e=iC();cT(e.generalFormSignal()?.operationType==="Sync"?0:e.generalFormSignal()?.encryption!==""?1:-1);}}function fs(i,t){if(i&1){let e=vT();Qi$1(0,"div",26)(1,"label"),nC(2,7),$l(),Qi$1(3,"sh-button-group",34),cm("valueChange",function(o){kd(e);let a=iC();return UC(a.operationTypeFieldSignal,o)||(a.operationTypeFieldSignal=o),Od(o)}),Qi$1(4,"button",35),Lg(5,8),vg(6,"sh-icon",36),Fg(),$l(),Qi$1(7,"button",37),Lg(8,9),vg(9,"sh-icon",36),Fg(),$l()()();}if(i&2){let e=iC();CE(3),am("value",e.operationTypeFieldSignal),CE(3),yg("shTooltip","Store backups with version history, deduplication, compression and encryption"),CE(3),yg("shTooltip","Copy files from the source to the destination without compression or encryption");}}function hs(i,t){i&1&&(Qi$1(0,"sh-alert",38),Lg(1,10),vg(2,"sh-icon",33),Fg(),$l());}function Es(i,t){if(i&1&&aT(0,hs,3,0,"sh-alert",38),i&2){let e=iC();cT(e.isNew()?0:-1);}}function ys(i,t){if(i&1&&jC(0),i&2){let e=t.$implicit;Ql(" ",e.DisplayName," ");}}function Ns(i,t){if(i&1&&vg(0,"sh-progress-bar",52),i&2){let e=iC(4);Yg("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),yg("value",e.calculatePasswordStrength()*(100/5));}}function Fs(i,t){i&1&&(Qi$1(0,"span",47),nC(1,15),$l());}function Ds(i,t){i&1&&(Lg(0,13,1),vg(1,"sh-icon"),Fg());}function As(i,t){i&1&&(Lg(0,13,2),vg(1,"sh-icon"),Fg());}function Is(i,t){i&1&&(Lg(0,16,1),vg(1,"sh-icon",54),Fg());}function Os(i,t){i&1&&(Lg(0,16,2),vg(1,"sh-icon"),Fg());}function Ps(i,t){if(i&1){let e=vT();Qi$1(0,"button",53),Vg("click",function(){kd(e);let o=iC(4);return Od(o.copyPassword())}),Lg(1,16),aT(2,Is,2,0)(3,Os,2,0),Fg(),$l();}if(i&2){let e=iC(4);CE(2),cT(e.copiedPassword()?2:3);}}function Ms(i,t){i&1&&(Qi$1(0,"sh-alert",51),nC(1,17),$l());}function xs(i,t){if(i&1){let e=vT();Qi$1(0,"div",42)(1,"sh-form-field")(2,"label",43),Lg(3,12),vg(4,"sup"),Fg(),$l(),vg(5,"input",44),CD(),$l(),aT(6,Ns,1,9,"sh-progress-bar",45),Qi$1(7,"sh-form-field"),vg(8,"input",46),CD(),aT(9,Fs,2,0,"span",47),$l(),Qi$1(10,"div",48)(11,"button",49),Vg("click",function(){kd(e);let o=iC(3);return Od(o.showPassword.set(!o.showPassword()))}),Lg(12,13),aT(13,Ds,2,0)(14,As,2,0),Fg(),$l(),Qi$1(15,"button",49),Vg("click",function(){kd(e);let o=iC(3);return Od(o.generatePassword())}),Lg(16,14),vg(17,"sh-icon"),Fg(),$l(),aT(18,Ps,4,1,"button",50),$l(),aT(19,Ms,2,0,"sh-alert",51),$l();}if(i&2){let e=iC(3);CE(5),yg("type",e.showPassword()?"text":"password"),_D(),CE(),cT(e.generalForm.value.password?6:-1),CE(2),yg("type",e.showPassword()?"text":"password"),_D(),CE(),cT(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?9:-1),CE(4),cT(e.showPassword()?13:14),CE(5),cT(e.showCopyPassword()?18:-1),CE(),cT(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?19:-1);}}function Rs(i,t){if(i&1&&(Qi$1(0,"sh-select",39)(1,"label",40),nC(2,11),$l(),vg(3,"input",41),CD(),ag(4,ys,1,1,"ng-template"),$l(),aT(5,xs,20,7,"div",42)),i&2){let e=iC(2);yg("options",e.encryptionOptions())("isClearable",false),CE(3),_D(),CE(2),cT(e.encryptionFieldSignal()!==e.noneOptionKey?5:-1);}}function Ls(i,t){if(i&1&&aT(0,Rs,6,3),i&2){let e=iC();cT(e.isNew()?0:-1);}}function bs(i,t){if(i&1&&(Qi$1(0,"button",29),Lg(1,18),vg(2,"sh-icon"),Fg(),$l()),i&2){let e=iC();yg("disabled",e.nameAndDescriptionValid()===false);}}function vs(i,t){if(i&1&&(Qi$1(0,"button",30),Lg(1,19),vg(2,"sh-icon"),Fg(),$l()),i&2){let e=iC();yg("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword());}}var et=new jn,ci=(i={name:"",description:"",encryption:"",password:"",repeatPassword:"",compression:"",operationType:"Backup"})=>et.group({name:et.control(i.name,[me.required]),description:et.control(i.description),encryption:et.control(i.encryption,[F()]),password:et.control(i.password,[y(t=>t?.value.encryption!=="-",[me.required])]),repeatPassword:et.control(i.repeatPassword,[y(t=>t?.value.encryption!=="-",[me.required])]),operationType:et.control(i.operationType)}),St={Key:"-",DisplayName:"None"},Tn=class i{#e=T(ee);#t=T(W);#n=T(m);#i=T(ke);#o=T(m$1);formRef=D1.required("formRef");generalForm=this.#i.generalForm;generalFormSignal=this.#i.generalFormSignal;encryptionFieldSignal=this.#i.encryptionFieldSignal;operationTypeFieldSignal=Ge("Backup");encryptionOptions=this.#i.encryptionOptions;isNew=this.#i.isNew;syncModeSupported=this.#o.hasSyncMode;showPassword=Ge(false);copiedPassword=Ge(false);showCopyPassword=Ge(false);noneOptionKey=St.Key;encryptionEffect=za$1(()=>{this.encryptionFieldSignal()===St.Key&&(this.copiedPassword.set(false),this.showCopyPassword.set(false));});#r=za$1(()=>{let t=this.#i.operationTypeFieldSignal();this.operationTypeFieldSignal.set(t??"Backup");});#a=za$1(()=>{let t=this.operationTypeFieldSignal();this.generalForm.controls.operationType.setValue(t);});nameAndDescriptionValid=Nt(()=>{this.generalFormSignal();let e=this.generalForm.controls;return e?.name&&e.name.valid&&e?.description&&e.description.valid});calculatePasswordStrength=Nt(()=>{let e=this.generalFormSignal()?.password??"";return this.#n.calculatePasswordStrength(e)});ngOnInit(){this.formRef().nativeElement.focus();}exit(){this.#i.exit(true);}async copyPassword(){let t=this.generalForm.controls.password.value;await this.#s(t??""),this.copiedPassword.set(true);}async#s(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(false);let t=this.#n.generate(41);this.generalForm.controls.password.setValue(t),this.generalForm.controls.repeatPassword.setValue(t),this.showCopyPassword.set(true);}next(){this.#i.shouldAutoSave()&&this.#i.submit(true),this.#e.navigate(["destination"],{relativeTo:this.#t.parent});}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-general"]],viewQuery:function(e,n){e&1&&Wg(n.formRef,gs,5),e&2&&fC();},decls:23,vars:5,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 o;o=$localize`General backup settings`;let a;a=$localize` Backup name ${"\uFFFD#8\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#8\uFFFD"}:CLOSE_SUPERSCRIPT:`;let _;_=$localize`Backup description`;let c;c=$localize`${"\uFFFD#20\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#20\uFFFD"}:CLOSE_TAG_SH_ICON: Exit `;let u;u=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrows-left-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Synchronization job - files are not encrypted `;let T;T=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:lock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Encrypted backup `;let D;D=$localize`Operation mode`;let y;y=$localize` Backup ${"\uFFFD#6\uFFFD"}:START_TAG_SH_ICON: info ${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_ICON:`;let M;M=$localize` Sync ${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON: info ${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON:`;let G;G=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: This is a synchronization job. Files are copied without encryption. `;let I;I=$localize`Encryption`;let J;J=$localize`Encryption`;let X;X=$localize`Password`;let k;k=$localize`Repeat password`;let Q;Q=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let W;W=$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:`,W=oC(W);let be;be=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Generate password `;let he;he=$localize`Passwords do not match`;let Ee;Ee=$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:`,Ee=oC(Ee);let K;K=$localize` Tip: Be sure to save your password. If you lose it, you will lose access to your backups. `;let ct;ct=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let ut;return ut=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],o,a,_,c,u,T,D,y,M,G,J,Q,W,be,he,Ee,K,ct,ut,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],["for","backupName"],["type","text","tabindex","1","placeholder",t,"formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder",e,"formControlName","description"],[1,"mode-toggle"],[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"],[1,"primary","accent"],[1,"primary"],["icon",""],[3,"valueChange","value"],["value","Backup","type","button"],[3,"shTooltip"],["value","Sync","type","button"],[1,"accent"],["value","Key","label","DisplayName",3,"options","isClearable"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",I,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",X,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",k,"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){e&1&&(Qi$1(0,"form",20,0),Vg("submit",function(){return n.next()}),Qi$1(2,"h3",21),nC(3,1),$l(),aT(4,Ss,2,1),Qi$1(5,"sh-form-field")(6,"label",22),Lg(7,2),vg(8,"sup"),Fg(),$l(),vg(9,"input",23),CD(),$l(),Qi$1(10,"sh-form-field")(11,"label",24),nC(12,3),$l(),vg(13,"textarea",25),CD(),$l(),aT(14,fs,10,3,"div",26),aT(15,Es,1,1)(16,Ls,1,1),Qi$1(17,"div",27)(18,"button",28),Vg("click",function(){return n.exit()}),Lg(19,4),vg(20,"sh-icon"),Fg(),$l(),aT(21,bs,3,1,"button",29)(22,vs,3,1,"button",30),$l()()),e&2&&(yg("formGroup",n.generalForm),CE(4),cT(n.isNew()?-1:4),CE(5),_D(),CE(4),_D(),CE(),cT(n.isNew()&&n.syncModeSupported()?14:-1),CE(),cT(n.generalFormSignal()?.operationType==="Sync"?15:16),CE(6),cT(n.generalFormSignal()?.operationType==="Sync"||n.encryptionFieldSignal()===n.noneOptionKey||!n.isNew()?21:22));},dependencies:[Gn,Tn$1,Ze$1,Rn,Pn,gn$1,hn,Fe,Nt$1,v,N,d,ue,at,x],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)}.mode-toggle[_ngcontent-%COMP%]{display:flex;flex-direction:column;position:relative;width:100%;transition:transform 125ms linear;transform:scale(1);gap:.25rem}.mode-toggle[_ngcontent-%COMP%] sh-button-group[_ngcontent-%COMP%]{width:100%}"]})};
|
|
14
|
+
var chunkGMUQCY5J=/*#__PURE__*/Object.freeze({__proto__:null,NONE_OPTION:St,createGeneralForm:ci,default:Tn});var chunkX7EGSZ7Z=/*#__PURE__*/Object.freeze({__proto__:null,createSourceDataForm:_i,default:mn});var chunkI7Z5EL7U=/*#__PURE__*/Object.freeze({__proto__:null,SCHEDULE_DEFAULT_OPTIONS:Wt,SCHEDULE_FIELD_DEFAULTS:pn,default:un,scheduleOptionToSchedule:si});export{Qt as Q,Tt as T,Ze as Z,chunkX7EGSZ7Z as a,chunkI7Z5EL7U as b,chunkGMUQCY5J as c,jt as j,ke as k,lt as l,on as o,st as s,tn as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {c3 as e,aZ as ee,aj as l}from'./main-QLXVXD6E.js';var d=/[a-zA-Z0-9_\-\+\.!@#$%^&*?_~()-]/,m=class n{generate(r,t=d){let a;do a=this.generatePassword(r,t);while(this.calculatePasswordStrength(a)<5);return a}generatePassword(r,t=d){return Array.apply(null,{length:r}).map(()=>{let a;for(;;)if(a=String.fromCharCode(e()),t.test(a))return a},this).join("")}calculatePasswordStrength(r){let t=1;return r.length>=8&&t++,r.match(/[a-z]/)&&r.match(/[A-Z]/)&&t++,r.match(/\d+/)&&t++,r.match(/.[!,@,#,$,%,^,&,*,?,_,~,(,),-]/)&&t++,Math.min(t,5)}static \u0275fac=function(t){return new(t||n)};static \u0275prov=ee({token:n,factory:n.\u0275fac,providedIn:"root"})};function y(n,r,t="conditional"){return a=>{if(!a.parent)return null;let e=null;if(n(a.parent)&&(e=(Array.isArray(r)?r:[r]).find(l=>l(a)!==null)??null),t&&e){let o={};o[t]=e,e=o;}return e}}function F(){return n=>(n.parent&&Object.values(n.parent.controls).forEach(r=>{r!==n&&r.updateValueAndValidity();}),null)}function C(n,r,t,a="conditional"){return e=>{if(!e.parent)return null;let o={},l$1=e.parent.get(n);if(!l$1)return console.warn("Conditional field not found"),null;if(Array.isArray(r)?l$1.value?.includes(r):l$1.value===r){let f=Array.isArray(t)?t:[t];for(let A of f){let u=A(e),p=o||{};if(u!==null){o=l(l({},p),u);break}}}return o}}export{C,F,m,y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t=[{path:"",redirectTo:"destination",pathMatch:"full"},{path:"destination",loadComponent:()=>import('./chunk-BhGD1_v8.js')},{path:"encryption",loadComponent:()=>import('./chunk-Bfak-Gjv.js').then(function(n){return n.c})},{path:"select-config",loadComponent:()=>import('./chunk-PGDvGDW-.js')}],o=t;export{o as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {w}from'./chunk-CDEvMQA2.js';import {d}from'./chunk-Bfak-Gjv.js';import'./chunk-DAM-4k69.js';import {e as ee}from'./chunk-CzJ3-6Pu.js';import'./chunk-oTpkLrqH.js';import'./chunk-dCFVYHva.js';import'./chunk--kVw-BwM.js';import {k as ke}from'./chunk-BC2-YuwH.js';import'./chunk-BFfFD-XE.js';import'./chunk-CmexLvf7.js';import'./chunk-Bgx4dtaL.js';import'./chunk-D7AP6g7S.js';import'./chunk-CQv4eyEK.js';import'./chunk-DH6iiZWc.js';import'./chunk-DuTbfCdT.js';import'./chunk-DKacf9Tj.js';import'./chunk-gaP3Sx_C.js';import'./chunk-CI8lsvKT.js';import'./chunk-C5p3bQwH.js';import {h as hw,Z as lr,_ as _t,a8 as To,j as vg,Q as Qi,n as nC,$ as $l,C as CE,A as yg,a3 as KC,aD as YC}from'./main-QLXVXD6E.js';import'./chunk-C3KPTLNN.js';import'./chunk-PONAC1Ya.js';import'./chunk-D3SUPUQT.js';import'./chunk-DoYGADYB.js';import'./chunk-Crs56mDy.js';import'./chunk-Bcxzhjj8.js';import'./chunk-BYJ0fSUP.js';import'./chunk-D2aWqPl_.js';import'./chunk-D3d-eReU.js';var S=()=>["/backup/import-destination/destination"],M=()=>["/backup/import-destination/encryption"],g=()=>["/backup/import-destination/select-config"],p=class T{static \u0275fac=function(e){return new(e||T)};static \u0275cmp=hw({type:T,selectors:[["app-import-destination"]],features:[YC([d,ke])],decls:10,vars:6,consts:()=>{let i;i=$localize` Destination `;let e;e=$localize` Encryption `;let s;return s=$localize` Select configurations `,[i,e,s,[1,"primary"],["tabindex","-1","routerLinkActive","active",3,"routerLink"],["tabindex","-1","routerLinkActive","active",1,"inactive",3,"routerLink"]]},template:function(e,s){e&1&&(vg(0,"app-status-bar"),Qi(1,"sh-stepper",3)(2,"div",4),nC(3,0),$l(),Qi(4,"div",4),nC(5,1),$l(),Qi(6,"div",5),nC(7,2),$l()(),Qi(8,"section"),vg(9,"router-outlet"),$l()),e&2&&(CE(2),yg("routerLink",KC(3,S)),CE(2),yg("routerLink",KC(4,M)),CE(2),yg("routerLink",KC(5,g)));},dependencies:[w,ee,lr,_t,To],styles:["[_nghost-%COMP%]{display:block}.full-width[_nghost-%COMP%] section[_ngcontent-%COMP%]{max-width:62.5rem}sh-stepper[_ngcontent-%COMP%]{margin:2.5rem 2rem;width:calc(100% - 4rem)}section[_ngcontent-%COMP%]{max-width:31.25rem;margin:0 auto 2.5rem}@media only screen and (max-width:768px){section[_ngcontent-%COMP%]{padding:0 2rem}}.inactive[_ngcontent-%COMP%]{pointer-events:none;opacity:.5}"]})};export{p as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {T,ab as C,
|
|
1
|
+
import {T,ab as C,G as Ge,N as Nt,z as za,H as qu,aZ as ee}from'./main-QLXVXD6E.js';var u=[{value:"Disabled",label:$localize`Disabled`},{value:"Verbose",label:$localize`Verbose`},{value:"ExplicitOnly",label:$localize`Explicit only`},{value:"Profiling",label:$localize`Profiling`},{value:"Retry",label:$localize`Retry`},{value:"Information",label:$localize`Information`},{value:"DryRun",label:$localize`Dry run`},{value:"Warning",label:$localize`Warning`},{value:"Error",label:$localize`Error`}],v=class a{#l=T(C);#e=Ge([]);LOG_LEVELS=u;logLevel=Ge("Disabled");logLevelByLabel=Nt(()=>u.find(e=>e.value===this.logLevel())?.label);whenFilter=Ge(null);backupIdFilter=Ge(null);id=Ge(0);logs=Nt(()=>this.whenFilter()&&this.backupIdFilter()?this.#e().filter(e=>e.BackupID===this.backupIdFilter()&&new Date(e.When).getTime()>=this.whenFilter()&&e.BackupID===this.backupIdFilter()):this.#e());timerInterval;logsLoading=Ge(false);isPolling=Ge(false);pagination=Ge({offset:0,pagesize:100});logLevelEffect=za(()=>{this.isPolling()?(this.#e.set([]),this.id.set(0),queueMicrotask(()=>this.loadLogs()),this.timerInterval&&clearInterval(this.timerInterval),this.timerInterval=setInterval(()=>{this.loadLogs();},3e3)):this.clearPolling();});setWhenFilter(e){this.whenFilter.set(e);}setBackupIdFilter(e){this.backupIdFilter.set(e);}loadLogs(){this.logsLoading.set(true),this.#l.getApiV1LogdataPoll({id:this.id(),level:this.logLevel(),pagesize:this.pagination().pagesize}).pipe(qu(()=>this.logsLoading.set(false))).subscribe({next:e=>{let i=e.reverse(),t=this.#i(i);t>0&&this.id.set(t),this.#e.set([...i,...this.#e()]);}});}updateLogLevel(e){this.logLevel.set(e),e==="Disabled"&&this.clearPolling();}#i(e){return e.reduce((i,t)=>Math.max(i,t.ID),0)}destroy(){this.logLevel.set("Disabled"),this.clearPolling();}clearPolling(){this.timerInterval&&clearInterval(this.timerInterval),this.timerInterval=void 0;}static \u0275fac=function(i){return new(i||a)};static \u0275prov=ee({token:a,factory:a.\u0275fac,providedIn:"root"})};export{v};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {L}from'./chunk-
|
|
1
|
+
import {L}from'./chunk-D3d-eReU.js';import {T as T$1,ab as C$1,a as T$2,bh as Q,m as m$1,G as Ge,N as Nt,z as za,aj as l,b0 as Hs,aZ as ee}from'./main-QLXVXD6E.js';var _="shown-welcome-page-v1",m="hide-console-connection-status",A="use-out-of-process-controller",R="disable-console-control",b="disable-tray-icon-login",c="server-listen-interface",T="allowed-hostnames",D="server-passphrase",N="update-channel",w="startup-delay",y="usage-reporter-level",P="power-mode-provider",I="autogenerated-passphrase",C="has-asked-for-password-change",O=class o{#s=T$1(C$1);#r=T$1(T$2);#n=T$1(Q);#i=T$1(m$1);#o=L(this.#s.getApiV1Serversettings());#e=Ge(void 0);#t(e,t){if(!t)return false;let s=t[e];if((s??"").trim().length==0)return false;let r=s.trim().toLowerCase();return r==="true"||r==="1"||r==="yes"||r==="on"}serverSettings=Nt(()=>this.#e()||this.#o());askForInitialPasswordConfig=Nt(()=>{let e=(this.#i.systemInfo()?.StartedBy??"").trim().toLowerCase();if(e==="tray icon"||e=="trayicon")return false;let t=this.#e(),s=this.#t(I,t),r=this.#t(C,t);return s&&!r});showWelcomePage=Nt(()=>{let e=this.#e();if(!e)return false;let t=this.#t(C,e),s=this.#t(_,e);return !(t||s)});#c=za(()=>{let e=this.#r.serverSettings();e&&this.#e.set(e);});constructor(){this.#r.subscribe("serversettings");}isConsoleConnectionStatusHidden=Nt(()=>this.#t(m,this.serverSettings()));isControllerIpcEnabled=Nt(()=>this.#t(A,this.serverSettings()));refreshServerSettings(){this.#n.getConnectionMethod()!=="websocket"&&this.#s.getApiV1Serversettings().subscribe({next:e=>{this.#e.set(e);}});}#a(e,t){var s=l({},e);for(let[r,S]of Object.entries(t))S===null?delete s[r]:s[r]=S;return s}patchServerSettings(e){let t=l({},this.serverSettings());return this.#e.set(this.#a(this.serverSettings()??{},e)),this.#s.patchApiV1Serversettings({requestBody:e}).pipe(Hs(s=>{throw this.#e.set(t),s}))}patchServerSetting(e,t){let s={};return s[e]=t,this.patchServerSettings(s)}setShownWelcomePage(){return this.patchServerSetting(_,"true")}setHideConsoleConnectionStatus(e){return this.patchServerSetting(m,e?"True":"False")}setControllerIpcState(e){return this.patchServerSetting(A,e?"True":"False")}setDisableTrayIconLogin(e){return this.patchServerSetting(b,e?"True":"False")}setDisableConsoleControl(e){return this.patchServerSetting(R,e?"True":"False")}setRemoteAccessInterface(e){return this.patchServerSetting(c,e)}setRemoteAccessAllowedHostnames(e){var t={[T]:e};return this.serverSettings()?.[c]==="loopback"&&(t[c]="any"),this.patchServerSettings(t)}setRemoteAccessPassword(e){return this.patchServerSetting(D,e)}setUpdateChannel(e){return this.patchServerSetting(N,e)}setStartupDelay(e){return this.patchServerSetting(w,e)}setUsageReporterLevel(e){return this.patchServerSetting(y,e)}setPowerModeProvider(e){return this.patchServerSetting(P,e)}static \u0275fac=function(t){return new(t||o)};static \u0275prov=ee({token:o,factory:o.\u0275fac,providedIn:"root"})};export{O};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {ShipTable as ot}from'./chunk-SycSMD-r.js';import'./chunk-C5p3bQwH.js';import {T,ab as C,a6 as be,a5 as g,e as ee,b as I1,N as Nt,G as Ge,z as za,ai as m,aj as l,at as h,H as qu,h as hw,v as v$1,_ as _t,aH as m$1,b2 as m$2,Q as Qi,n as nC,$ as $l,f as aT,V as Vg,p as cm,C as CE,au as jg,av as rC,i as cT,A as yg,a3 as KC,Y as Yg,x as am,o as oC,U as UC,j as vg,l as vT,r as kd,k as iC,O as Od,a1 as dT,a2 as fT,w as jC,aM as ob,J as om,aN as ab,aR as sb}from'./main-QLXVXD6E.js';import {d}from'./chunk-PONAC1Ya.js';import {$}from'./chunk-D3d-eReU.js';import {U}from'./chunk-D2aWqPl_.js';var de=()=>["/"],Se=(l,n)=>n.Version;function ce(l,n){l&1&&(Qi(0,"div",11),vg(1,"sh-progress-bar",19),Qi(2,"p"),nC(3,4),$l()());}function Ce(l,n){l&1&&(Qi(0,"div",12)(1,"p"),nC(2,5),$l()());}function me(l,n){if(l&1){let e=vT();Qi(0,"tr",26),Vg("click",function(i){let r=kd(e).$implicit,S=iC(2);return Od(S.toggleSelected(r.Version,i))}),Qi(1,"td")(2,"sh-checkbox",22),Vg("click",function(i){let r=kd(e).$implicit,S=iC(2);return Od(S.toggleSelected(r.Version,i))}),$l()(),Qi(3,"td"),jC(4),$l(),Qi(5,"td"),jC(6),ob(7,"relativeTime"),$l(),Qi(8,"td"),jC(9),ob(10,"relativeTime"),$l(),Qi(11,"td"),jC(12),ob(13,"bytes"),$l(),Qi(14,"td"),jC(15),$l()();}if(l&2){let e=n.$implicit;CE(2),yg("checked",e.Selected),CE(2),om(e.Version),CE(2),om(ab(7,6,e.Time,true)),CE(3),om(ab(10,9,e.Time,false)),CE(3),om(sb(13,12,e.FileSizes)),CE(3),om(e.FileCount);}}function pe(l,n){if(l&1){let e=vT();Qi(0,"sh-table",20),cm("sortByColumnChange",function(i){kd(e);let r=iC();return UC(r.sortByColumn,i)||(r.sortByColumn=i),Od(i)}),Qi(1,"tr",21)(2,"th")(3,"sh-checkbox",22),Vg("click",function(){kd(e);let i=iC();return Od(i.toggleSelect())}),$l()(),Qi(4,"th",23),nC(5,6),$l(),Qi(6,"th",23),nC(7,7),$l(),Qi(8,"th",23),nC(9,8),$l(),Qi(10,"th",24),nC(11,9),$l(),Qi(12,"th",25),nC(13,10),$l()(),dT(14,me,16,14,"tr",null,Se),$l();}if(l&2){let e=iC();yg("data",e.versions())("loading",e.isLoading()),am("sortByColumn",e.sortByColumn),CE(3),Yg("indeterminate",e.indeterminate()),yg("checked",e.allSelected()),CE(11),fT(e.versions());}}var v=class l$1{#e=T(C);#n=T(be);#t=T(g);#i=T(ee);id=I1.required();backup=Nt(()=>{this.#t.backups();return this.#t.getBackupById(this.id())});versionsResource=$({params:()=>({id:this.id()}),stream:({params:n})=>this.#e.postApiV2BackupListFilesets({requestBody:{BackupId:n.id}})});isLoading=Nt(()=>this.versionsResource.isLoading());isDeleting=Ge(false);performCompact=Ge(true);versions=Ge([]);constructor(){za(()=>{let n=this.versionsResource.value();if(n){let e=(n.Data??[]).slice().sort((t,i)=>t.Time<i.Time?1:t.Time>i.Time?-1:0);this.versions.set(e.map(t=>m(l({},t),{Selected:false})));}});}selectedItems=Nt(()=>this.versions().filter(n=>n.Selected));allSelected=Nt(()=>this.selectedItems().length===this.versions().length&&this.versions().length>0);noneSelected=Nt(()=>this.selectedItems().length===0);indeterminate=Nt(()=>this.selectedItems().length>0&&!this.allSelected());sortByColumn=Ge("version");toggleSelected(n,e){e?.stopPropagation(),this.versions.update(t=>t.map(i=>i.Version===n?m(l({},i),{Selected:!i.Selected}):i));}toggleSelect(){this.allSelected()?this.selectNone():this.selectAll();}selectAll(){this.versions.update(n=>n.map(e=>m(l({},e),{Selected:true})));}selectNone(){this.versions.update(n=>n.map(e=>m(l({},e),{Selected:false})));}deleteVersions(){let n=this.selectedItems();if(n.length===0)return;let e=n.length,t=n.map(i=>i.Version);this.#n.open(h,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete ${e} version(s)?`,confirmText:$localize`Delete versions`,cancelText:$localize`Cancel`},closed:i=>{i&&(this.isDeleting.set(true),this.#e.postApiV2BackupDeleteVersions({requestBody:{BackupId:this.id(),Versions:t,SuppressCompact:!this.performCompact()}}).pipe(qu(()=>this.isDeleting.set(false))).subscribe({next:()=>{this.#i.navigate(["/"]);}}));}});}static \u0275fac=function(e){return new(e||l$1)};static \u0275cmp=hw({type:l$1,selectors:[["app-delete-versions"]],inputs:{id:[1,"id"]},decls:13,vars:11,consts:()=>{let n;n=$localize`Delete versions from ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize`Cancel`;let t;t=$localize`{VAR_PLURAL, plural, =1 {1 version} other {{INTERPOLATION} versions}}`,t=oC(t,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let i;i=$localize` Delete ${t}:ICU@@85461926550041466: `;let r;r=$localize`Compact after deletion`;let S;S=$localize`Fetching versions from destination...`;let $;$=$localize`No versions found for this backup.`;let b;b=$localize`Version`;let B;B=$localize`Timestamp`;let k;k=$localize`When`;let G;G=$localize`Size`;let x;return x=$localize`Files`,[n,e,i,r,S,$,b,B,k,G,x,[1,"loading-state"],[1,"empty-state"],[1,"type-b",3,"data","loading","sortByColumn"],[1,"actions"],["shButton","",3,"routerLink","disabled"],["shButton","",1,"raised","error",3,"click","disabled"],[1,"sub-actions"],[1,"primary","raised",3,"checkedChange","checked"],[1,"primary","indeterminate"],[1,"type-b",3,"sortByColumnChange","data","loading","sortByColumn"],["thead",""],[1,"primary","raised",3,"click","checked"],["shSort","version"],["shSort","size"],["shSort","files"],[3,"click"]]},template:function(e,t){e&1&&(Qi(0,"h3"),nC(1,0),$l(),aT(2,ce,4,0,"div",11)(3,Ce,3,0,"div",12)(4,pe,16,6,"sh-table",13),Qi(5,"div",14)(6,"button",15),nC(7,1),$l(),Qi(8,"button",16),Vg("click",function(){return t.deleteVersions()}),nC(9,2),$l()(),Qi(10,"div",17)(11,"sh-checkbox",18),cm("checkedChange",function(r){return UC(t.performCompact,r)||(t.performCompact=r),r}),nC(12,3),$l()()),e&2&&(CE(),jg(t.backup()?.Backup?.Name),rC(1),CE(),cT(t.isLoading()?2:t.versions().length===0?3:4),CE(4),yg("routerLink",KC(10,de))("disabled",t.isDeleting()),CE(2),Yg("loading",t.isDeleting()),yg("disabled",t.isDeleting()||t.selectedItems().length===0||t.isLoading()),CE(),jg(t.selectedItems().length)(t.selectedItems().length),rC(9),CE(2),am("checked",t.performCompact));},dependencies:[v$1,U,d,ot,_t,m$1,m$2],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;padding:2.5rem;max-width:43.75rem}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0}sh-table[_ngcontent-%COMP%]{padding:2rem 0}.loading-state[_ngcontent-%COMP%], .empty-state[_ngcontent-%COMP%]{padding:2rem 0;display:flex;flex-direction:column;gap:1rem}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:.5rem;padding-top:2rem}.sub-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:.5rem;padding-top:.5rem;padding-bottom:2rem}"]})};export{v as default};
|