@duplicati/ngclient 0.0.143 → 0.0.145
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/aliyun.png +0 -0
- package/assets/dest-icons/aws.png +0 -0
- package/assets/dest-icons/azure.png +0 -0
- package/assets/dest-icons/backblaze.png +0 -0
- package/assets/dest-icons/box-com.png +0 -0
- package/assets/dest-icons/dropbox.png +0 -0
- package/assets/dest-icons/external-harddrive.png +0 -0
- package/assets/dest-icons/file-jump.png +0 -0
- package/assets/dest-icons/file-system.png +0 -0
- package/assets/dest-icons/filen.png +0 -0
- package/assets/dest-icons/ftp.png +0 -0
- package/assets/dest-icons/google-cloud.png +0 -0
- package/assets/dest-icons/google-drive.png +0 -0
- package/assets/dest-icons/idrive-e2.png +0 -0
- package/assets/dest-icons/jottacloud.png +0 -0
- package/assets/dest-icons/mega-nz.png +0 -0
- package/assets/dest-icons/nas.png +0 -0
- package/assets/dest-icons/office-365.png +0 -0
- package/assets/dest-icons/one-drive.png +0 -0
- package/assets/dest-icons/open-stack.png +0 -0
- package/assets/dest-icons/pcloud.png +0 -0
- package/assets/dest-icons/rackspace.png +0 -0
- package/assets/dest-icons/rclone.png +0 -0
- package/assets/dest-icons/sftp.png +0 -0
- package/assets/dest-icons/sharepoint.png +0 -0
- package/assets/dest-icons/sia-cloud.png +0 -0
- package/assets/dest-icons/sia_logo_dark.92db63f5.svg +6 -0
- package/assets/dest-icons/smb.png +0 -0
- package/assets/dest-icons/ssh.png +0 -0
- package/assets/dest-icons/storj.png +0 -0
- package/assets/dest-icons/tahoelafs.png +0 -0
- package/assets/dest-icons/tencent-cloud.png +0 -0
- package/assets/dest-icons/webdav.png +0 -0
- package/{chunk-X3IA226Q.js → chunk-2F6NVETW.js} +1 -1
- package/{chunk-VC72SWC4.js → chunk-2QJC4PGQ.js} +1 -1
- package/{chunk-PT7UQJD4.js → chunk-2UCO57JQ.js} +1 -1
- package/chunk-2UGURIOT.js +1 -0
- package/{chunk-4YL5DZVH.js → chunk-43JMN2ZY.js} +1 -1
- package/{chunk-LZUM5XKC.js → chunk-4TDUWDRL.js} +1 -1
- package/{chunk-SCOG2I64.js → chunk-62QANGOE.js} +1 -1
- package/{chunk-XNVRJH42.js → chunk-6LTGTS6B.js} +1 -1
- package/{chunk-73RDJP55.js → chunk-6OPAGPKF.js} +1 -1
- package/{chunk-KUPXKQHP.js → chunk-7B43LCPI.js} +1 -1
- package/chunk-7EBTJOD7.js +1 -0
- package/{chunk-6GC5VKTI.js → chunk-7IQY6U5W.js} +1 -1
- package/chunk-A6VGO6B5.js +1 -0
- package/{chunk-GHFYBZHQ.js → chunk-AJTK6HBC.js} +1 -1
- package/chunk-B2D4QGDJ.js +1 -0
- package/chunk-BPJCKQYP.js +1 -0
- package/{chunk-UACX27D3.js → chunk-DDWLL7XA.js} +1 -1
- package/{chunk-GUH5TMOS.js → chunk-DELLEGXW.js} +1 -1
- package/{chunk-IHNX6WZQ.js → chunk-DFMGS3IN.js} +1 -1
- package/chunk-DFMPWF6R.js +1 -0
- package/chunk-DKTUN7FF.js +1 -0
- package/{chunk-KGJAK6OP.js → chunk-DLMKZACT.js} +1 -1
- package/{chunk-FFY3NRCC.js → chunk-DNDTLTUM.js} +1 -1
- package/{chunk-3UN32GIC.js → chunk-DVDTYV66.js} +1 -1
- package/{chunk-IGOZJJE3.js → chunk-E66CBA5F.js} +1 -1
- package/{chunk-JA7OQSO3.js → chunk-EBIM5FBM.js} +1 -1
- package/{chunk-GO22DJ44.js → chunk-ESUPNSKH.js} +1 -1
- package/{chunk-OTMW34HV.js → chunk-FCRM5DER.js} +1 -1
- package/chunk-FDCY62KM.js +1 -0
- package/chunk-FFEDQIYN.js +1 -0
- package/{chunk-XQ4CAUD4.js → chunk-FUOS2UGQ.js} +1 -1
- package/{chunk-BIETD4DI.js → chunk-FZHTJSDJ.js} +1 -1
- package/{chunk-BXRW2LGW.js → chunk-GB3UMYUD.js} +1 -1
- package/chunk-H7K35UUX.js +1 -0
- package/chunk-HI4XLHO3.js +1 -0
- package/{chunk-QDFCX6XE.js → chunk-HNWRQABR.js} +3 -3
- package/{chunk-J2MHNGNQ.js → chunk-IFW3O4YJ.js} +1 -1
- package/{chunk-CTEFMU6N.js → chunk-J3ONM4TQ.js} +1 -1
- package/chunk-KDYD6LMI.js +1 -0
- package/{chunk-GDWLKG6V.js → chunk-KGKIF5H4.js} +1 -1
- package/chunk-KLW6HEOS.js +1 -0
- package/{chunk-K3ZQ67VT.js → chunk-L6CWVBZ6.js} +1 -1
- package/chunk-LVP2TPMO.js +1 -0
- package/{chunk-5PSLWJTF.js → chunk-M6WWZKV7.js} +1 -1
- package/chunk-MAQO5X5Q.js +1 -0
- package/{chunk-36RDZAZ4.js → chunk-MSLKIHQQ.js} +1 -1
- package/{chunk-UT6XGEMV.js → chunk-MVNLSG6Z.js} +1 -1
- package/{chunk-USU2EHJV.js → chunk-N5SC4SKW.js} +1 -1
- package/{chunk-QY6E755W.js → chunk-N6ABN43N.js} +1 -1
- package/{chunk-WWFNG47J.js → chunk-NJEX2N4Q.js} +1 -1
- package/{chunk-JIHMT35A.js → chunk-NJZSEKTD.js} +1 -1
- package/{chunk-J3BBLPAD.js → chunk-NOPMCS2Z.js} +1 -1
- package/{chunk-ACH476VA.js → chunk-NQ27E6KP.js} +1 -1
- package/{chunk-QGFC5ZUR.js → chunk-O64ZZGQZ.js} +1 -1
- package/{chunk-CZLLEVMJ.js → chunk-OMMUXRXE.js} +1 -1
- package/{chunk-AO4O42CM.js → chunk-OWDKOVPL.js} +1 -1
- package/{chunk-TJOWPBPB.js → chunk-PN3U7MRX.js} +1 -1
- package/{chunk-CFNP4FBG.js → chunk-POMLWQHO.js} +1 -1
- package/{chunk-BGUKMOKY.js → chunk-QDFDQHU3.js} +1 -1
- package/{chunk-7AMBMWZP.js → chunk-QHC3CY43.js} +1 -1
- package/{chunk-ARXKB7WH.js → chunk-QITXA3NT.js} +1 -1
- package/chunk-QYI4IMJE.js +8 -0
- package/{chunk-J5PSMGKZ.js → chunk-R5RIFWZO.js} +1 -1
- package/chunk-RPU4AJBK.js +1 -0
- package/chunk-RUFE3SMI.js +1 -0
- package/{chunk-WJPLJKPQ.js → chunk-RUXCS4ZK.js} +1 -1
- package/{chunk-7X7K5IXS.js → chunk-SFSB73YO.js} +1 -1
- package/{chunk-B5FUQFEQ.js → chunk-TDKBGGNK.js} +1 -1
- package/{chunk-6XBSQDXR.js → chunk-TIWH4NKT.js} +1 -1
- package/{chunk-XHUUCB2W.js → chunk-TKO3OH2C.js} +1 -1
- package/chunk-U5C62E46.js +1 -0
- package/chunk-UIIHBXLB.js +1 -0
- package/{chunk-OXOOR7I4.js → chunk-UIJYCGKA.js} +1 -1
- package/{chunk-ETCRT3EV.js → chunk-UKQFDBNO.js} +1 -1
- package/{chunk-CWBEE627.js → chunk-UP5EOICU.js} +1 -1
- package/{chunk-6WWCFRZ5.js → chunk-VHE3K2F5.js} +1 -1
- package/{chunk-66BSPEOQ.js → chunk-VTSUHAP5.js} +1 -1
- package/chunk-W6DRPPZU.js +1 -0
- package/{chunk-UW4GBMEP.js → chunk-WS76KLII.js} +1 -1
- package/{chunk-WZ23D2R7.js → chunk-XJZ5GM36.js} +1 -1
- package/{chunk-ZGAC2JKG.js → chunk-Z3EPZZGY.js} +1 -1
- package/{chunk-5AENPWCF.js → chunk-ZNWZFRFW.js} +1 -1
- package/index.html +2 -2
- package/{main-SFGPSKNZ.js → main-Z5T5HH5Q.js} +1 -1
- package/package.json +1 -1
- package/styles-LRXGHWCZ.css +1 -0
- package/chunk-2NU5Y4V7.js +0 -1
- package/chunk-2RB5RKNM.js +0 -1
- package/chunk-6BCYG4Y6.js +0 -1
- package/chunk-7WD3AN66.js +0 -1
- package/chunk-AB2L3URR.js +0 -1
- package/chunk-BSP6AKSZ.js +0 -1
- package/chunk-HBTRQAXQ.js +0 -1
- package/chunk-HDQRG3ZZ.js +0 -1
- package/chunk-HKZX6OB5.js +0 -1
- package/chunk-L2EO4M4B.js +0 -1
- package/chunk-LSVMEMXJ.js +0 -1
- package/chunk-M2RYJ73O.js +0 -1
- package/chunk-MBBEXLIJ.js +0 -1
- package/chunk-NTA2CULM.js +0 -1
- package/chunk-ODVCGM2O.js +0 -1
- package/chunk-QFU6VJXV.js +0 -1
- package/chunk-QNOIURSX.js +0 -1
- package/chunk-UUODEERG.js +0 -1
- package/chunk-WRNQOX5R.js +0 -1
- package/chunk-XLE2TW65.js +0 -1
- package/chunk-YHNIGBHB.js +0 -8
- package/styles-EZGVWHZF.css +0 -1
package/chunk-WRNQOX5R.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ea as gt}from"./chunk-WJPLJKPQ.js";import{Ab as O,Ac as Me,Bb as M,Cb as me,Db as j,Eb as W,Fb as ge,Ib as ye,Jb as ie,Mc as Qe,Oc as L,Pc as U,Qa as lt,Ra as b,Ta as De,Tc as ue,Uc as T,V as Ae,Va as _e,Vc as se,Wb as Y,Wc as mt,Xa as ct,Xb as ce,Xc as G,Y as st,Yb as w,Zb as B,_ as P,_b as y,a as nt,ba as ot,bb as A,ca as rt,da as at,db as Oe,dc as ht,dd as Ye,ea as F,ec as ne,fa as H,fc as ae,gb as Se,gc as pt,hc as ee,ia as Le,ic as $,jc as ut,ka as we,kc as de,lb as He,lc as R,mc as qe,na as Fe,nc as he,oa as k,oc as Te,qb as dt,qc as ze,rc as $e,sc as Ne,tb as be,tc as ft,ua as Q,ub as q,uc as pe,vb as z,vc as te,wb as je,xb as Be,yb as We,zb as le,zc as Ue}from"./chunk-QDFCX6XE.js";import{a as re,b as fe,c as it,d as u,e as x,f as D,g as E}from"./chunk-EUDKD2JW.js";var Z=["*"],It=[[["","icon",""]],[["","title",""]],"*",[["","content",""]]],kt=["[icon]","[title]","*","[content]"];function Rt(t,e){t&1&&(O(0,"sh-icon",3),R(1,"info"),M())}function Vt(t,e){t&1&&(O(0,"sh-icon",3),R(1,"info"),M())}function Pt(t,e){t&1&&(O(0,"sh-icon",3),R(1,"warning"),M())}function At(t,e){t&1&&(O(0,"sh-icon",3),R(1,"warning-octagon"),M())}function Lt(t,e){t&1&&(O(0,"sh-icon",3),R(1,"check-circle"),M())}function Ft(t,e){t&1&&(O(0,"sh-icon",3),R(1,"question"),M())}function Ht(t,e){if(t&1){let s=ie();O(0,"sh-icon",7),Y("click",function(){F(s);let i=w();return H(i.removeAlert())}),R(1,"plus"),M()}}var jt=["dialogRef"];function Bt(t,e){if(t&1){let s=ie();j(0,"div",4),ce("click",function(){F(s);let i=w();return H(i.isOpen.set(!1))}),W()}}var Wt=["shButton",""];var qt=["triggerRef"],zt=["popoverRef"],$t=[[["","trigger",""]],[["button"]],[["","shButton",""]],"*"],Nt=["[trigger]","button","[shButton]","*"];var Ut=()=>({closeOnButton:!1,closeOnEsc:!0});var Qt=[[["label"]],[["","prefix",""]],[["","textPrefix",""]],[["input"]],[["textarea"]],[["","textSuffix",""]],[["","suffix",""]],[["","error",""]],[["","hint",""]]],Yt=["label","[prefix]","[textPrefix]","input","textarea","[textSuffix]","[suffix]","[error]","[hint]"],vt=["input"],Xt=[[["label"]]],Gt=["label"];function Kt(t,e){if(t&1&&(O(0,"div",3),R(1),M()),t&2){let s=w();b(),qe(s.files()[0].name)}}function Zt(t,e){if(t&1&&(O(0,"div",3),R(1),M()),t&2){let s=w();b(),he("",s.files().length," files selected")}}function Jt(t,e){if(t&1&&(O(0,"div",4),R(1),M()),t&2){let s=w();b(),qe(s.filesOver()?s.overlayText():s.placeholder())}}var ei=["optionsRef"],ti=["*",[["","menu",""]]],ii=["*","[menu]"];function ni(t,e){t&1&&(O(0,"sh-icon",5),R(1,"caret-down"),M())}var si=[[["label"]],[["input","type","range"]]],oi=["label","input[type=range]"],ri=["optionsWrap"],ai=[[["label"]],[["input"]],[["textarea"]]],li=["label","input","textarea"],ci=()=>({closeOnButton:!1,closeOnEsc:!1}),Je=t=>({$implicit:t});function di(t,e){if(t&1&&R(0),t&2){let s=w();he(" ",s.inputValue()," ")}}function hi(t,e){t&1&&ye(0)}function pi(t,e){if(t&1&&Se(0,hi,1,0,"ng-container",12),t&2){let s=w(3).$implicit;w(2);let n=te(2);le("ngTemplateOutlet",n)("ngTemplateOutletContext",Me(2,Je,s))}}function ui(t,e){if(t&1&&R(0),t&2){let s=w(3).$implicit,n=w(2);he(" ",n.getLabel(s)," ")}}function fi(t,e){if(t&1){let s=ie();O(0,"sh-chip",11),Y("click",function(i){F(s);let o=w(2).$index,m=w(2);return H(m.removeSelectedOptionByIndex(i,o))}),q(1,pi,1,4,"ng-container")(2,ui,1,1),O(3,"sh-icon"),R(4,"x-bold"),M()()}if(t&2){let s=w(4),n=te(2);de(s.selectClasses()),b(),z(n?1:2)}}function mi(t,e){t&1&&ye(0)}function gi(t,e){if(t&1&&Se(0,mi,1,0,"ng-container",12),t&2){let s=w(4).$implicit;w(2);let n=te(2);le("ngTemplateOutlet",n)("ngTemplateOutletContext",Me(2,Je,s))}}function vi(t,e){if(t&1&&R(0),t&2){let s=w(4),n=s.$implicit,i=s.$index,o=s.$count,m=w(2);he(" ",i===o-1?m.getLabel(n):m.getLabel(n)+","," ")}}function Ci(t,e){if(t&1&&q(0,gi,1,4,"ng-container")(1,vi,1,1),t&2){w(5);let s=te(2);z(s?0:1)}}function _i(t,e){if(t&1&&q(0,Ci,2,1),t&2){w(4);let s=te(5);z(s?-1:0)}}function Si(t,e){if(t&1&&q(0,fi,5,3,"sh-chip",10)(1,_i,1,1),t&2){w(3);let s=te(4);z(s?0:1)}}function yi(t,e){if(t&1&&q(0,Si,2,1),t&2){let s=e.$implicit;z(s?0:-1)}}function xi(t,e){if(t&1&&Be(0,yi,1,1,null,null,je),t&2){w();let s=te(1);We(s)}}function Ei(t,e){t&1&&ye(0)}function wi(t,e){if(t&1&&Se(0,Ei,1,0,"ng-container",13),t&2){w(2);let s=te(0);le("ngTemplateOutlet",s)}}function Di(t,e){if(t&1&&R(0),t&2){let s=w(2);he(" ",s.placeholderText()??""," ")}}function Oi(t,e){if(t&1&&q(0,wi,1,1,"ng-container")(1,Di,1,1),t&2){w();let s=te(0);z(s?0:1)}}function bi(t,e){t&1&&(O(0,"sh-icon",6),R(1,"caret-down"),M())}function Ti(t,e){t&1&&me(0,"sh-spinner",7)}function Mi(t,e){t&1&&(O(0,"sh-icon",6),R(1,"list-magnifying-glass"),M())}function Ii(t,e){t&1&&(O(0,"sh-icon",6),R(1,"magnifying-glass"),M())}function ki(t,e){if(t&1){let s=ie();O(0,"sh-icon",14),Y("click",function(i){F(s);let o=w();return H(o.clear(i))}),R(1,"x-bold"),M()}}function Ri(t,e){t&1&&(O(0,"sh-icon",6),R(1,"caret-down"),M())}function Vi(t,e){t&1&&(O(0,"sh-icon",6),R(1,"caret-up"),M())}function Pi(t,e){if(t&1&&me(0,"sh-checkbox"),t&2){let s=w().$index,n=w();de(n.selectClasses()),$("active",n.isSelected(s))}}function Ai(t,e){t&1&&ye(0)}function Li(t,e){if(t&1&&Se(0,Ai,1,0,"ng-container",12),t&2){let s=w().$implicit;w();let n=te(3);le("ngTemplateOutlet",n)("ngTemplateOutletContext",Me(2,Je,s))}}function Fi(t,e){if(t&1&&R(0),t&2){let s=w().$implicit,n=w();he(" ",n.getLabel(s)," ")}}function Hi(t,e){if(t&1){let s=ie();O(0,"li",15),Y("click",function(){let i=F(s).$index,o=w();return H(o.toggleOptionByIndex(i))}),q(1,Pi,1,4,"sh-checkbox",16),q(2,Li,1,4,"ng-container")(3,Fi,1,1),M()}if(t&2){let s=e.$implicit,n=e.$index,i=w(),o=te(3);$("selected",i.isSelected(n))("focused",n===i.focusedOptionIndex()),le("id",i.getLabelAsSlug(s)),be("aria-selected",i.isSelected(n)),b(),z(i.selectMultiple()?1:-1),b(),z(o?2:3)}}var ji=["dragImageElement"],Bi=[[["","sidenav",""]],[["","sidenav-closed-topbar",""]],"*"],Wi=["[sidenav]","[sidenav-closed-topbar]","*"];function qi(t,e){t&1&&ge(0,"div",1,0)}function zi(t,e){if(t&1){let s=ie();j(0,"div",7),ce("drop",function(i){F(s);let o=w();return H(o.drop(i))})("dragenter",function(){F(s);let i=w();return H(i.dragEnter())})("dragleave",function(){F(s);let i=w();return H(i.dragLeave())}),W()}}function $i(t,e){if(t&1){let s=ie();j(0,"div",8),ce("dragstart",function(i){F(s);let o=w();return H(o.dragStart(i))})("dragend",function(i){F(s);let o=w();return H(o.dragEnd(i))})("drag",function(i){F(s);let o=w();return H(o.drag(i))})("touchstart",function(i){F(s);let o=w();return H(o.touchStart(i))})("touchmove",function(i){F(s);let o=w();return H(o.touchMove(i))})("touchend",function(i){F(s);let o=w();return H(o.touchEnd(i))})("touchcancel",function(i){F(s);let o=w();return H(o.touchCancel(i))}),W()}}var Ni=["tbody"],Ui=["*",[["","table-no-rows",""]]],Qi=["*","[table-no-rows]"];function Yi(t,e){t&1&&me(0,"sh-progress-bar",1)}function Xi(t,e){t&1&&(O(0,"div",2),y(1,1),M())}var Gi=[[["","title",""]],"*"],Ki=["[title]","*"];function Zi(t,e){t&1&&R(0,"Title")}function Ji(t,e){t&1&&(O(0,"sh-icon",1),R(1,"caret-down"),M())}var en=["bold","thin","light","fill"],Ce=(()=>{var e,s;let n=class n{constructor(){x(this,e,P(Q));x(this,s,P(_e))}ngAfterContentInit(){let o=u(this,e).nativeElement.textContent?.trim();if(!o)return;let m=o.split("-").at(-1);m&&en.includes(m)&&u(this,s).addClass(u(this,e).nativeElement,m)}};e=new WeakMap,s=new WeakMap,n.\u0275fac=function(m){return new(m||n)},n.\u0275cmp=A({type:n,selectors:[["sh-icon"]],ngContentSelectors:Z,decls:1,vars:0,template:function(m,p){m&1&&(B(),y(0))},encapsulation:2,changeDetection:0});let t=n;return t})(),Pn=(()=>{let e=class e{constructor(){this._el=P(Q),this.alertService=T(null),this.id=T(null),this.alertClasses=L(()=>this._el.nativeElement.classList.toString())}removeAlert(){this.id()&&this.alertService()&&this.alertService()?.removeAlert(this.id())}};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=A({type:e,selectors:[["sh-alert"]],inputs:{alertService:[1,"alertService"],id:[1,"id"]},ngContentSelectors:kt,decls:17,vars:4,consts:[["ref",""],[1,"alert"],[1,"icon"],[1,"state-icon"],[1,"title"],[1,"close-icon"],[1,"content"],[1,"close-icon",3,"click"]],template:function(i,o){if(i&1&&(B(It),O(0,"div",1)(1,"div",2,0),y(3),M(),O(4,"div",2),q(5,Rt,2,0,"sh-icon",3)(6,Vt,2,0,"sh-icon",3)(7,Pt,2,0,"sh-icon",3)(8,At,2,0,"sh-icon",3)(9,Lt,2,0,"sh-icon",3)(10,Ft,2,0,"sh-icon",3),M(),O(11,"div",4),y(12,1),y(13,2),M(),q(14,Ht,2,0,"sh-icon",5),O(15,"div",6),y(16,3),M()()),i&2){let m=pt(2);b(),ee("display",m.children.length?"block":"none");let p=o.alertClasses();b(4),z(p.includes("primary")?5:p.includes("accent")?6:p.includes("warn")?7:p.includes("error")?8:p.includes("success")?9:10),b(9),z(o.id()?14:-1)}},dependencies:[Ce],encapsulation:2,changeDetection:0});let t=e;return t})();function Re(){return Date.now().toString(36)+Math.random().toString(36).substring(2)}var An=(()=>{let e=class e{constructor(){this.alertHistory=k([]),this.alertHistoryIsOpen=k(!1),this.alertHistoryIsHidden=k(!0)}error(n){this.addAlert({type:"error",title:n??"An error occured"})}success(n){this.addAlert({type:"success",title:n})}question(n){this.addAlert({type:"question",title:n})}warning(n){this.addAlert({type:"warn",title:n})}info(n){this.addAlert({type:"primary",title:n})}addAlert(n){let i=Re();this.alertHistory.update(o=>[fe(re({},n),{isOpen:!0,animateIn:!0,animateOut:!1,id:i}),...o]),setTimeout(()=>{this.alertHistory.update(o=>o.map(m=>fe(re({},m),{animateIn:m.id===i?!1:m.animateIn})))},40),setTimeout(()=>{this.hideAlert(i)},2500)}removeAlert(n){this.alertHistory.update(i=>i.map(o=>fe(re({},o),{animateOut:o.id===n?!1:o.animateOut}))),setTimeout(()=>{this.alertHistory.update(i=>i.filter(o=>o.id!==n))},300)}hideAlert(n){this.alertHistory.update(i=>i.map(o=>fe(re({},o),{isOpen:o.id===n?!1:o.isOpen})))}setHidden(n){this.alertHistoryIsHidden.set(n)}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),et=new st("Ship UI Config"),tn={class:"default",width:void 0,maxWidth:void 0,height:void 0,maxHeight:void 0,closeOnButton:!0,closeOnEsc:!0,closeOnOutsideClick:!0},nn=(()=>{var e;let s=class s{constructor(){x(this,e);D(this,e,P(et,{optional:!0})),this.dialogRef=se("dialogRef"),this.isOpen=G(!1),this.options=T(),this.closed=ue(),this.defaultOptionMerge=L(()=>re(fe(re({},tn),{class:u(this,e)?.dialogType??"default"}),this.options())),this.abortController=null,this.isOpenEffect=U(()=>{let i=this.dialogRef()?.nativeElement;this.abortController&&this.abortController.abort(),this.abortController=new AbortController,this.isOpen()?(i?.showModal(),i?.addEventListener("close",()=>{this.isOpen.set(!1),this.closed.emit()},{signal:this.abortController?.signal}),document.addEventListener("keydown",o=>{o.key==="Escape"&&!this.defaultOptionMerge().closeOnEsc&&o.preventDefault(),o.key==="Escape"&&this.defaultOptionMerge().closeOnEsc&&this.isOpen.set(!1)},{signal:this.abortController?.signal})):(this.closed.emit(),i?.close())})}ngOnDestroy(){this.abortController?.abort()}};e=new WeakMap,s.\u0275fac=function(o){return new(o||s)},s.\u0275cmp=A({type:s,selectors:[["sh-dialog"]],viewQuery:function(o,m){o&1&&ne(m.dialogRef,jt,5),o&2&&ae()},inputs:{isOpen:[1,"isOpen"],options:[1,"options"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:Z,decls:5,vars:11,consts:[["dialogRef",""],["shDialog",""],[1,"content"],[1,"closeable-overlay"],[1,"closeable-overlay",3,"click"]],template:function(o,m){if(o&1&&(B(),j(0,"dialog",1,0)(2,"div",2),y(3),W(),q(4,Bt,1,0,"div",3),W()),o&2){let p=m.defaultOptionMerge();de(p.class),ee("width",p.width??"")("max-width",p.maxWidth??"")("max-height",p.maxHeight??"")("height",p.height??""),b(4),z(m.defaultOptionMerge().closeOnOutsideClick?4:-1)}},encapsulation:2,changeDetection:0});let t=s;return t})(),Ln=(()=>{var e,s,n,Ct,xe;let m=class m{constructor(){x(this,n);x(this,e);x(this,s);D(this,e,typeof document<"u"?document.querySelector("body"):null),D(this,s,P(dt)),this.compRef=null,this.insertedCompRef=null,this.closedFieldSub=null,this.compClosedSub=null}open(a,r){let d=u(this,s).injector,C=E(this,n,Ct).call(this),_=r||{},{data:v,closed:g}=_,S=it(_,["data","closed"]);this.compRef&&E(this,n,xe).call(this),this.insertedCompRef=Ye(a,{environmentInjector:d}),this.compRef=Ye(nn,{hostElement:C,environmentInjector:d,projectableNodes:[[this.insertedCompRef.location.nativeElement]]});let c=this.insertedCompRef.instance?.data,l=this.insertedCompRef.instance?.closed;if(v){if(Fe(c))this.insertedCompRef.setInput("data",v);else if(!Fe(c))throw new Error("data is not an input signal on the passed component")}l instanceof Qe&&(this.closedFieldSub=l.subscribe((...I)=>{g?.(...I),E(this,n,xe).call(this)})),u(this,s).attachView(this.insertedCompRef.hostView),u(this,s).attachView(this.compRef.hostView),this.insertedCompRef.changeDetectorRef.detectChanges(),this.compRef.changeDetectorRef.detectChanges(),this.compRef.instance.isOpen.set(!0),this.compRef.setInput("options",S),this.compRef.instance.closed.subscribe(()=>f());let h=this;function f(){var I;l&&l instanceof Qe?l.emit(!1):g?.(void 0),E(I=h,n,xe).call(I)}return{component:this.insertedCompRef.instance,close:f}}ngOnDestroy(){E(this,n,xe).call(this)}};e=new WeakMap,s=new WeakMap,n=new WeakSet,Ct=function(){let a=document.createElement("sh-dialog-ref");return a.id="sh-dialog-ref",document.getElementById("sh-dialog-ref")||u(this,e)?.append(a),document.getElementById("sh-dialog-ref")},xe=function(){this.insertedCompRef&&(u(this,s).detachView(this.insertedCompRef.hostView),this.closedFieldSub?.unsubscribe(),this.insertedCompRef.destroy()),this.compRef&&(u(this,s).detachView(this.compRef.hostView),this.compClosedSub?.unsubscribe(),this.compRef.destroy())},m.\u0275fac=function(r){return new(r||m)},m.\u0275prov=Ae({token:m,factory:m.\u0275fac,providedIn:"root"});let t=m;return t})(),Fn=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=A({type:e,selectors:[["sh-button-group"]],ngContentSelectors:Z,decls:1,vars:0,template:function(i,o){i&1&&(B(),y(0))},encapsulation:2,changeDetection:0});let t=e;return t})(),Hn=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=A({type:e,selectors:[["","shButton",""]],attrs:Wt,ngContentSelectors:Z,decls:1,vars:0,template:function(i,o){i&1&&(B(),y(0))},encapsulation:2,changeDetection:0});let t=e;return t})(),jn=(()=>{var e;let s=class s{constructor(){x(this,e);D(this,e,P(et,{optional:!0})),this.class=k(u(this,e)?.cardType??"default")}};e=new WeakMap,s.\u0275fac=function(o){return new(o||s)},s.\u0275cmp=A({type:s,selectors:[["sh-card"]],hostVars:2,hostBindings:function(o,m){o&2&&de(m.class())},ngContentSelectors:Z,decls:1,vars:0,template:function(o,m){o&1&&(B(),y(0))},encapsulation:2,changeDetection:0});let t=s;return t})(),sn=(()=>{var e;let s=class s{constructor(){x(this,e,P(Q))}};e=new WeakMap,s.\u0275fac=function(o){return new(o||s)},s.\u0275cmp=A({type:s,selectors:[["sh-checkbox"]],ngContentSelectors:Z,decls:6,vars:0,consts:[[1,"box"],[1,"inherit","default-indicator"],[1,"inherit","indeterminate-indicator"]],template:function(o,m){o&1&&(B(),O(0,"div",0)(1,"sh-icon",1),R(2,"check-bold"),M(),O(3,"sh-icon",2),R(4,"minus-bold"),M()(),y(5))},dependencies:[Ce],encapsulation:2,changeDetection:0});let t=s;return t})(),on=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=A({type:e,selectors:[["sh-chip"]],ngContentSelectors:Z,decls:2,vars:0,template:function(i,o){i&1&&(B(),j(0,"div"),y(1),W())},encapsulation:2,changeDetection:0});let t=e;return t})();var rn=["scroll","auto"],an={width:void 0,height:void 0,closeOnButton:!0,closeOnEsc:!0},_t=(()=>{var e,s,St,Ie;let o=class o{constructor(){x(this,s);x(this,e);D(this,e,4),this.SUPPORTS_ANCHOR=typeof CSS<"u"&&CSS.supports("position-anchor","--abc")&&CSS.supports("anchor-name","--abc"),this.asMultiLayer=T(!1),this.disableOpenByClick=T(!1),this.isOpen=G(!1),this.options=T(),this.closed=ue(),this.defaultOptionMerge=L(()=>re(re({},an),this.options())),this.triggerRef=se.required("triggerRef"),this.popoverRef=se.required("popoverRef"),this.id=k("--"+Re()),this.menuStyle=k(null),this.openAbort=null,this.openEffect=U(()=>{let p=this.popoverRef()?.nativeElement;if(this.isOpen()){this.openAbort&&this.openAbort.abort(),this.openAbort=new AbortController;let r={signal:this.openAbort?.signal};p?.showPopover(),document.addEventListener("keydown",d=>{d.key==="Escape"&&!this.defaultOptionMerge().closeOnEsc&&d.preventDefault(),d.key==="Escape"&&this.defaultOptionMerge().closeOnEsc&&this.isOpen.set(!1)},r),setTimeout(()=>{E(this,s,St).call(this,this.popoverRef()?.nativeElement).addEventListener("scroll",()=>E(this,s,Ie).call(this),r),window?.addEventListener("resize",()=>E(this,s,Ie).call(this),r),E(this,s,Ie).call(this)})}else p.hidePopover&&p.hidePopover(),this.openAbort?.abort(),this.closed.emit()})}toggleIsOpen(p){p.preventDefault(),p.stopPropagation(),this.disableOpenByClick()||this.isOpen.set(!this.isOpen())}eventClose(p){p.stopPropagation(),p.preventDefault(),this.isOpen.set(!1)}};e=new WeakMap,s=new WeakSet,St=function(p){let a=p.parentElement;for(;a;){if(rn.indexOf(window?.getComputedStyle(a).overflowY)>-1&&a.scrollHeight>a.clientHeight)return a;a=a.parentElement}return document.documentElement},Ie=function(){let p=this.triggerRef()?.nativeElement.getBoundingClientRect(),a=this.popoverRef()?.nativeElement.getBoundingClientRect(),r=p.left,d=p.bottom,C=r,v=d+u(this,e),g=C+a.width>window?.innerWidth,S=v+a.height>window?.innerHeight;if(!this.SUPPORTS_ANCHOR){if(C=r,v=d+u(this,e),S){let l=p.top-a.height-u(this,e);l<0||(v=l)}g&&(C=p.right-a.width,C<0&&(C=0));let c={left:C+"px",top:v+"px"};this.menuStyle.set(c)}},o.\u0275fac=function(a){return new(a||o)},o.\u0275cmp=A({type:o,selectors:[["sh-popover"]],viewQuery:function(a,r){a&1&&(ne(r.triggerRef,qt,5),ne(r.popoverRef,zt,5)),a&2&&ae(2)},hostVars:2,hostBindings:function(a,r){a&2&&$("multi-layer",r.asMultiLayer())},inputs:{asMultiLayer:[1,"asMultiLayer"],disableOpenByClick:[1,"disableOpenByClick"],isOpen:[1,"isOpen"],options:[1,"options"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:Nt,decls:10,vars:6,consts:[["triggerRef",""],["popoverRef",""],[1,"trigger",3,"click"],[1,"trigger-wrapper"],["popover","",1,"popover"],[1,"overlay",3,"click"]],template:function(a,r){if(a&1){let d=ie();B($t),j(0,"div",2,0),ce("click",function(v){return F(d),H(r.toggleIsOpen(v))}),j(2,"div",3),y(3),y(4,1),y(5,2),W()(),j(6,"div",4,1)(8,"div",5),ce("click",function(v){return F(d),H(r.isOpen()&&r.eventClose(v))}),W(),y(9,3),W()}a&2&&(ee("anchor-name",r.id()),b(6),ut(r.menuStyle()),ee("position-anchor",r.id()))},encapsulation:2,changeDetection:0});let t=o;return t})();var Bn=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=A({type:e,selectors:[["sh-divider"]],ngContentSelectors:Z,decls:1,vars:0,template:function(i,o){i&1&&(B(),y(0))},encapsulation:2,changeDetection:0});let t=e;return t})(),tt=(()=>{var e;let s=class s{constructor(){x(this,e,P(Q));He(()=>{let i=typeof CSS<"u"&&CSS.supports("field-sizing","content"),o=u(this,e).nativeElement.querySelector("textarea");if(!i&&o!==null){let a=function(){o.style.height="auto",o.style.height=o.scrollHeight+"px"},r=function(){setTimeout(a,0)};var m=a,p=r;o.addEventListener("change",a),o.addEventListener("cut",r),o.addEventListener("paste",r),o.addEventListener("drop",r),o.addEventListener("keydown",r),o.focus(),o.select(),a()}})}onClick(){u(this,e).nativeElement.querySelector("input")&&u(this,e).nativeElement.querySelector("input").focus(),u(this,e).nativeElement.querySelector("textarea")&&u(this,e).nativeElement.querySelector("textarea").focus()}};e=new WeakMap,s.\u0275fac=function(o){return new(o||s)},s.\u0275cmp=A({type:s,selectors:[["sh-form-field"]],hostBindings:function(o,m){o&1&&Y("click",function(){return m.onClick()})},ngContentSelectors:Yt,decls:15,vars:0,consts:[[1,"input-wrap"],[1,"prefix"],[1,"suffix"],[1,"helpers"],[1,"error-wrap"],[1,"hint"]],template:function(o,m){o&1&&(B(Qt),y(0),j(1,"div",0)(2,"div",1),y(3,1),y(4,2),W(),y(5,3),y(6,4),j(7,"div",2),y(8,5),y(9,6),W()(),j(10,"div",3)(11,"div",4),y(12,7),W(),j(13,"div",5),y(14,8),W()())},encapsulation:2,changeDetection:0});let t=s;return t})(),Wn=(()=>{let e=class e{constructor(){this._el=P(Q),this.inputRef=se.required("input"),this.filesOver=k(!1),this.multiple=T(),this.accept=T(null),this.placeholder=G("Click or drag files here"),this.overlayText=T("Drop files here"),this.files=G([]),this.fileUploadClasses=L(()=>this._el.nativeElement.classList.toString()),this.inputEffect=U(()=>{let n=this.inputRef().nativeElement;n&&(n.placeholder&&this.placeholder.set(n.placeholder),n.addEventListener("dragover",i=>{i.preventDefault(),this.filesOver.set(!0)}),n.addEventListener("dragleave",i=>{i.preventDefault(),this.filesOver.set(!1)}),n.addEventListener("drop",i=>{i.preventDefault(),this.filesOver.set(!1);let o=i.dataTransfer?.files;o&&o.length>0&&(this.handleFileUpload(Array.from(o)),n.files=o)}),n.addEventListener("change",i=>{i.preventDefault(),this.handleFileUpload(Array.from(i.target.files))}))})}handleFileUpload(n){this.multiple()?this.files.update(i=>[...i,...n]):this.files.set(n)}};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=A({type:e,selectors:[["sh-file-upload"]],viewQuery:function(i,o){i&1&&ne(o.inputRef,vt,5),i&2&&ae()},inputs:{multiple:[1,"multiple"],accept:[1,"accept"],placeholder:[1,"placeholder"],overlayText:[1,"overlayText"],files:[1,"files"]},outputs:{placeholder:"placeholderChange",files:"filesChange"},ngContentSelectors:Gt,decls:12,vars:7,consts:[["inputWrap",""],["input",""],["ngProjectAs","input",5,["input"],1,"input"],[1,"files-text"],[1,"placeholder"],["type","file"],[1,"bg-overlay"],["suffix",""]],template:function(i,o){i&1&&(B(Xt),O(0,"sh-form-field"),y(1,0,["ngProjectAs","label",5,["label"]]),O(2,"div",2,0),q(4,Kt,2,1,"div",3)(5,Zt,2,1,"div",3)(6,Jt,2,1,"div",4),me(7,"input",5,1)(9,"div",6),M(),O(10,"sh-icon",7),R(11,"upload-simple"),M()()),i&2&&(de(o.fileUploadClasses()),b(4),z(o.files().length===1?4:o.files().length>1?5:6),b(3),be("multiple",o.multiple())("accept",o.accept()),b(2),$("files-over",o.filesOver()))},dependencies:[tt,Ce],encapsulation:2,changeDetection:0});let t=e;return t})(),qn=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=A({type:e,selectors:[["sh-list"]],ngContentSelectors:Z,decls:1,vars:0,template:function(i,o){i&1&&(B(),y(0))},encapsulation:2,changeDetection:0});let t=e;return t})();function yt(t,e){let s=e?.injector||(at(yt),P(Le)),{debounce:n=0,initialValue:i=void 0,transform:o=f=>f,compare:m=(f,_)=>f===_,forceType:p=void 0,returnPreviousValue:a=!0}=e||{},r=k(i),d=s.get(we),C=L(()=>{let f=t()?.nativeElement;if(f instanceof HTMLInputElement||f instanceof HTMLTextAreaElement)return l(f)}),v=!1,g,S=null;return U(()=>{let f=C();if(!f)return r.set(a&&g?o(g):void 0);i!==void 0&&f.value===""?r.set(i):f.value!==""&&c();let _=I=>{S!==null&&clearTimeout(S),S=setTimeout(()=>{S=null,c()},n)};f.addEventListener("input",_),f.addEventListener("inputValueChanged",_),d.onDestroy(()=>{f.removeEventListener("input",_),f.removeEventListener("inputValueChanged",_),S!==null&&clearTimeout(S)})},{injector:s}),U(()=>{let f=C();if(!f)return;let _=r()??"",I=_==null?"":String(_);f.value!==I&&(g=I,f.value=I,f.dispatchEvent(new Event("input")))},{injector:s}),r;function c(){if(!v){v=!0;try{let f=C();if(!f)return;let _=f.value,I=p?h(_,p):o(_);g=_,m(r(),I)||r.set(I)}finally{v=!1}}}function l(f){return Object.defineProperty(f,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(f),"value").get.call(this)},set(_){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(f),"value").set.call(this,_);let X=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:_}});return this.dispatchEvent(X),_}}),f}function h(f,_){switch(_){case"string":return f.toString();case"number":let I=Number(f);return isNaN(I)?void 0:I;case"boolean":return f.toLowerCase()==="true"?!0:f.toLowerCase()==="false"?!1:void 0;default:return f}}}function xt(t,e){let s=P(Le),n=s.get(we),i=k([]),o=null,m=null,p=(r,d)=>{m&&m.disconnect();let C=Array.from(r.nativeElement.querySelectorAll(d.join(",")));i.set(C),typeof MutationObserver<"u"&&(m=new MutationObserver(v=>{queueMicrotask(()=>{let g=Array.from(r.nativeElement.querySelectorAll(d.join(",")));i.set(g)})}),m.observe(r.nativeElement,{childList:!0,subtree:!0})),n.onDestroy(()=>a())};o=U(()=>{let r=typeof t=="function"&&t[nt]?t():t,d=typeof e=="function"?e():e;r&&d?.length>0?p(r,d):(i.set([]),m&&(m.disconnect(),m=null))},{injector:s});function a(){o&&o.destroy(),m&&m.disconnect()}return{signal:i.asReadonly(),destroy:a}}var zn=(()=>{var e,s,Et,Xe;let o=class o{constructor(){x(this,s);x(this,e);D(this,e,P(_e)),this.asMultiLayer=T(!1),this.openIndicator=T(!1),this.disabled=T(!1),this.customOptionElementSelectors=T(["button"]),this.keepClickedOptionActive=T(!1),this.closeOnClick=T(!0),this.isOpen=G(!1),this.closed=ue(),this.searchable=T(!1),this.activeOptionIndex=k(-1),this.inputRef=se("input"),this.optionsRef=se("optionsRef"),this.options=xt(this.optionsRef,this.customOptionElementSelectors),this.optionsEl=L(()=>this.options.signal().filter(p=>!p.disabled)),this.inputValue=yt(this.inputRef),this.abortController=null,this.optionsEffect=U(()=>{if(!this.isOpen())return;this.abortController&&(this.abortController.abort(),this.abortController=null),this.abortController=new AbortController;let p=this.inputRef()?.nativeElement;p&&(queueMicrotask(()=>p.focus()),this.closeOnClick()||this.optionsRef()?.nativeElement?.addEventListener("click",r=>{let d=r.target,C=this.activeElements();if(!C.length){let g=this.optionsEl();this.activeElements.set(g),C=g}let v=C.findIndex(g=>g===d);v>-1&&(this.activeOptionIndex.set(v),p.focus())}),p.addEventListener("keydown",a=>{let r=this.activeOptionIndex();a.key==="ArrowDown"?(a.preventDefault(),this.activeOptionIndex.set(this.nextActiveIndex(r))):a.key==="ArrowUp"?(a.preventDefault(),this.activeOptionIndex.set(this.prevActiveIndex(r))):a.key==="Enter"?(a.preventDefault(),r>-1&&(this.activeElements()[r].click(),queueMicrotask(()=>this.close("active")))):a.key==="Tab"&&(a.preventDefault(),this.close("closed"))},{signal:this.abortController.signal}))}),this._lastElementList=[],this.activeElements=k([]),this.lastInputValue="",this.inputValueEffect=U(()=>{if(!this.searchable())return;let a=(this.inputValue()??"").toLowerCase();if(E(this,s,Xe).call(this),!a||a==="")return;let r=this._lastElementList.length&&a.length>this.lastInputValue.length?this._lastElementList:this.optionsEl();this.lastInputValue=a;for(let d=0;d<r.length;d++){let C=r[d],v=C.textContent?.toLowerCase()||"",g=E(this,s,Et).call(this,v,a);C.value=g}r=r.filter(d=>d.value>0).sort((d,C)=>C.value-d.value);for(let d=0;d<r.length;d++)u(this,e).setStyle(r[d],"order",d);this.activeElements.set(r),this._lastElementList=r}),this.activeOptionIndexEffect=U(()=>{let p=this.activeElements(),a=this.activeOptionIndex();for(let r=0;r<p.length;r++)p[r].classList.remove("active");a>-1&&(p[a].scrollIntoView({block:"center"}),p[a].classList.add("active"))})}nextActiveIndex(p){let a=this.activeElements();if(!a.length){let d=this.optionsEl();this.activeElements.set(d),a=d}if(p===-1||p===a.length-1)return 0;let r=p+1;return a[r].disabled?this.nextActiveIndex(r):r}prevActiveIndex(p){let a=this.activeElements();if(!a.length){let d=this.optionsEl();this.activeElements.set(d),a=d}if(p===0||p===-1)return a.length-1;let r=p-1;return a[r].disabled?this.prevActiveIndex(r):r}close(p="closed",a){this.inputValue.set(""),this.closeOnClick()&&((!this.keepClickedOptionActive()||p==="closed")&&E(this,s,Xe).call(this),this.isOpen.set(!1),this.closed.emit(p==="active"))}ngOnDestroy(){this.abortController&&(this.abortController.abort(),this.abortController=null)}};e=new WeakMap,s=new WeakSet,Et=function(p,a){if(!a)return 0;let r=0,d=-1,C=0,v=!0;for(let g=0;g<a.length;g++){let S=a[g];if(p.length>d+1&&p[d+1]===S)r+=g===0?100:150,d++,C++;else{let c=p.indexOf(S,d+1);if(g>0&&(v=!1),c===-1)return 0;r+=100,d=c,C++}}return v&&a.length===C&&(r+=1e3),r+=C*20,r},Xe=function(){this.activeOptionIndex.set(-1);let p=this.optionsEl();for(let a=0;a<p.length;a++)p[a].classList.remove("active")},o.\u0275fac=function(a){return new(a||o)},o.\u0275cmp=A({type:o,selectors:[["sh-menu"]],viewQuery:function(a,r){a&1&&(ne(r.inputRef,vt,5),ne(r.optionsRef,ei,5)),a&2&&ae(2)},hostVars:6,hostBindings:function(a,r){a&2&&$("disabled",r.disabled())("has-search",r.searchable())("multi-layer",r.asMultiLayer())},inputs:{asMultiLayer:[1,"asMultiLayer"],openIndicator:[1,"openIndicator"],disabled:[1,"disabled"],customOptionElementSelectors:[1,"customOptionElementSelectors"],keepClickedOptionActive:[1,"keepClickedOptionActive"],closeOnClick:[1,"closeOnClick"],isOpen:[1,"isOpen"],searchable:[1,"searchable"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:ii,decls:12,vars:12,consts:[["formFieldWrapper",""],["input",""],["optionsRef",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","asMultiLayer","options"],["trigger","",3,"click"],[1,"open-indicator"],[1,"form-field-wrap"],[1,"small","stretch"],["type","text","placeholder","Search"],[1,"options",3,"click"]],template:function(a,r){if(a&1){let d=ie();B(ti),O(0,"sh-popover",3,0),Ne("isOpenChange",function(v){return F(d),$e(r.isOpen,v)||(r.isOpen=v),H(v)}),Y("closed",function(){return F(d),H(r.close("fromPopover"))}),O(2,"div",4),Y("click",function(){return F(d),H(!r.disabled()&&r.isOpen.set(!0))}),y(3),q(4,ni,2,0,"sh-icon",5),M(),O(5,"div",6)(6,"sh-form-field",7),me(7,"input",8,1),M()(),O(9,"div",9,2),Y("click",function(){return F(d),H(r.close("active"))}),y(11,1),M()()}a&2&&(ze("isOpen",r.isOpen),le("disableOpenByClick",!0)("asMultiLayer",r.asMultiLayer())("options",Ue(11,Ut)),b(2),$("is-open",r.isOpen()),b(2),z(r.openIndicator()?4:-1),b(2),$("hidden",r.searchable()===!1),b(3),$("searching",r.searchable()&&r.inputValue()!==""))},dependencies:[_t,tt,Ce],encapsulation:2,changeDetection:0});let t=o;return t})(),ln=(()=>{let e=class e{constructor(){this.value=T(void 0)}};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=A({type:e,selectors:[["sh-progress-bar"]],inputs:{value:[1,"value"]},decls:1,vars:2,consts:[[1,"progress-bar"]],template:function(i,o){i&1&&ge(0,"div",0),i&2&&ee("width",o.value(),"%")},encapsulation:2,changeDetection:0});let t=e;return t})(),$n=(()=>{var e;let s=class s{constructor(){x(this,e,P(Q))}onClick(){u(this,e).nativeElement.querySelector("input")&&u(this,e).nativeElement.querySelector("input").focus()}};e=new WeakMap,s.\u0275fac=function(o){return new(o||s)},s.\u0275cmp=A({type:s,selectors:[["sh-radio"]],hostBindings:function(o,m){o&1&&Y("click",function(){return m.onClick()})},ngContentSelectors:Z,decls:2,vars:0,consts:[[1,"radio"]],template:function(o,m){o&1&&(B(),ge(0,"div",0),y(1))},encapsulation:2,changeDetection:0});let t=s;return t})(),Nn=(()=>{var e,s,n,i,o,Ge,wt,Dt,Ot;let d=class d{constructor(){x(this,o);x(this,e);x(this,s);x(this,n);x(this,i);D(this,e,P(Q)),D(this,s,null),D(this,n,null),D(this,i,0),this.unit=T(""),this.value=G(u(this,i)),this.inputState=k({min:0,max:100,step:1}),this.valuePercentage=L(()=>{let{min:v,max:g}=this.inputState(),S=this.value()??v;if(isNaN(S))return 0;let c=g-v;if(c===0)return 0;let l=(S-v)/c*100;return Math.max(0,Math.min(100,l))}),this.trackFilledPercentage=L(()=>this.valuePercentage()),this.thumbPositionPercentage=L(()=>this.valuePercentage()),this.syncModelToInputEffect=U(()=>{let v=this.value();if(u(this,n)){let g=parseFloat(u(this,n).value);(isNaN(g)||String(g)!==String(v))&&(u(this,n).value=String(v))}})}get hasInputElement(){return!!u(this,n)}ngAfterViewInit(){D(this,n,u(this,e).nativeElement.querySelector('input[type="range"]')),u(this,n)?(E(this,o,Ot).call(this,u(this,n)),u(this,n).oninput=()=>{this.setNewInputValue(u(this,n).value)},u(this,n).addEventListener("inputValueChanged",v=>{this.setNewInputValue(v.detail.value)}),queueMicrotask(()=>E(this,o,Ge).call(this,!0)),E(this,o,wt).call(this)):console.error('ShipRangeSliderComponent: No <input type="range"> element found projected inside.')}setNewInputValue(v){let g=parseFloat(v??"0");if(!isNaN(g)){let{min:S,max:c}=this.inputState();this.value.set(Math.max(S,Math.min(c,g)))}}trackEvent(v){if(!u(this,n)||u(this,n).readOnly||u(this,n).disabled){v.preventDefault(),v.stopPropagation();return}if(v.target===u(this,n)||v.target?.closest(".thumb, .min-indicator, .max-indicator"))return;let S=v.currentTarget.getBoundingClientRect(),c=v.clientX-S.left,l=S.width,{min:h,max:f,step:_}=this.inputState(),I=f-h;if(l>0&&I!==0&&_>0){let N=(c/l*I+h-h)/_,V=h+Math.round(N)*_,K=E(this,o,Dt).call(this,_);V=parseFloat(V.toFixed(K));let oe=Math.max(h,Math.min(f,V));this.value.set(oe)}}ngOnDestroy(){u(this,s)&&u(this,s).disconnect(),u(this,n)&&(u(this,n).oninput=null)}};e=new WeakMap,s=new WeakMap,n=new WeakMap,i=new WeakMap,o=new WeakSet,Ge=function(v=!1){if(!u(this,n))return;let g=parseFloat(u(this,n).min??"0")??0,S=parseFloat(u(this,n).max??"100")??100,c=u(this,n).step,l=1;if(c&&c.toLowerCase()!=="any"){let f=parseFloat(c);!isNaN(f)&&f>0&&(l=f)}this.inputState.set({min:g,max:S,step:l});let h=parseFloat(u(this,n).value??String(g))??g;if(v&&this.value()!==u(this,i)){let f=this.value(),_=Math.max(g,Math.min(S,f));h!==_&&(u(this,n).value=String(_)),f!==_&&this.value.set(_)}else{let f=Math.max(g,Math.min(S,h));this.value()!==f&&this.value.set(f)}},wt=function(){if(!u(this,n)||typeof MutationObserver>"u")return;let v=["min","max","step","value","readonly","disabled"];D(this,s,new MutationObserver(g=>{let S=!1;for(let c of g)if(c.type==="attributes"&&v.includes(c.attributeName??"")){S=!0;break}S&&E(this,o,Ge).call(this,!1)})),u(this,s).observe(u(this,n),{attributes:!0})},Dt=function(v){if(isNaN(v)||Math.floor(v)===v)return 0;let S=v.toString().split(".")[1];return S?S.length:0},Ot=function(v){Object.defineProperty(v,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(v),"value").get.call(this)},set(g){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(v),"value").set.call(this,g);let c=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:g}});return this.dispatchEvent(c),g}})},d.\u0275fac=function(g){return new(g||d)},d.\u0275cmp=A({type:d,selectors:[["sh-range-slider"]],hostVars:2,hostBindings:function(g,S){g&2&&$("has-input",S.hasInputElement)},inputs:{unit:[1,"unit"],value:[1,"value"]},outputs:{value:"valueChange"},ngContentSelectors:oi,decls:15,vars:10,consts:[[1,"label"],[1,"input-wrap"],[1,"min-indicator"],[1,"track-wrap",3,"click"],[1,"track"],[1,"track-filled"],[1,"thumb-wrap"],[1,"thumb"],[1,"value-indicator"],[1,"max-indicator"]],template:function(g,S){g&1&&(B(si),j(0,"div",0),y(1),W(),j(2,"div",1)(3,"div",2),R(4),W(),j(5,"div",3),ce("click",function(l){return S.trackEvent(l)}),y(6,1),j(7,"div",4),ge(8,"div",5),W(),j(9,"div",6)(10,"div",7)(11,"div",8),R(12),W()()()(),j(13,"div",9),R(14),W()()),g&2&&(b(4),Te("",S.inputState().min,"",S.unit()),b(4),ee("width",S.trackFilledPercentage(),"%"),b(),ee("left",S.thumbPositionPercentage(),"%"),b(3),Te("",S.value(),"",S.unit()),b(2),Te("",S.inputState().max,"",S.unit()))},encapsulation:2,changeDetection:0});let t=d;return t})(),cn=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=A({type:e,selectors:[["sh-spinner"]],decls:0,vars:0,template:function(i,o){},encapsulation:2,changeDetection:0});let t=e;return t})(),Un=(()=>{var e,s,n,i,Ke,m,p,Ze,J,bt,Tt,Mt;let g=class g{constructor(){x(this,i);x(this,e);x(this,s);x(this,n);x(this,m);x(this,p);D(this,e,P(Q)),this.value=T(),this.label=T(),this.asFreeText=T(!1),this.placeholder=T(),this.readonly=G(!1),this.disabled=G(!1),this.lazySearch=T(!1),this.inlineSearch=T(!1),this.asText=T(!1),this.isClearable=T(!0),this.selectMultiple=T(!1),this.optionTemplate=T(null),this.selectedOptionTemplate=T(null),this.placeholderTemplate=T(null),this.isOpen=G(!1),this.isLoading=G(!1),this.options=G([]),this.selectedOptions=G([]),this.cleared=ue(),D(this,s,k(null)),this.inlineTemplate=mt(De),this.optionsWrapRef=se.required("optionsWrap"),this.inputRefInput=k(null),D(this,n,typeof MutationObserver<"u"&&new MutationObserver(c=>{for(var l of c)l&&(l.target.nodeName==="INPUT"||l.target.nodeName==="TEXTAREA")&&(this.inputRefInput.set(new Q(l.target)),u(this,n).disconnect())})),this.inputValue=k(""),this.prevInputValue=k(null),this.focusedOptionIndex=k(-1),this._isClearable=L(()=>this.selectMultiple()||this.isClearable()),this.selectClasses=L(()=>u(this,e).nativeElement.classList.toString()),this.stretch=L(()=>this.selectClasses().includes("stretch")),this.small=L(()=>this.selectClasses().includes("small")),this.placeholderText=L(()=>{let c=this.placeholder(),l=this.inputRefEl();return c||l?.placeholder||null}),this.selectedOptionValues=L(()=>{let c=this.selectedOptions(),l=this.value();return l?c.map(h=>E(this,i,J).call(this,h,l)):c}),this.filteredOptions=L(()=>{let c=this.options()||[],l=this.label(),h=this.value(),f=this.inlineSearch(),_=this.inputValue().toLowerCase(),I=E(this,i,Tt).call(this,_);if(c.length<=0)return[];if(!f||_==="")return c;let N=c.filter(V=>{let K=l?(E(this,i,J).call(this,V,l)??"").toString().toLowerCase():(V??"").toString().toLowerCase(),oe=((h?E(this,i,J).call(this,V,h):V)??"").toString().toLowerCase(),Ve=I.test(K),Pe=I.test(oe);return Ve||Pe}).map(V=>{let K=l?(E(this,i,J).call(this,V,l)??"").toString().toLowerCase():(V??"").toString().toLowerCase(),oe=((h?E(this,i,J).call(this,V,h):V)??"").toString().toLowerCase(),Ve=E(this,i,Ke).call(this,K,_),Pe=E(this,i,Ke).call(this,oe,_);return{item:V,score:Math.max(Ve,Pe)}});return N.sort((V,K)=>K.score-V.score),N.map(V=>V.item)}),D(this,m,Re()),this.inputRefEl=L(()=>{let c=this.inputRefInput();if(c===null)return;let l=c?c.nativeElement:null;return l?(l.autocomplete="off",l.setAttribute("role","combobox"),l.setAttribute("id",`combobox-${u(this,m)}`),l.setAttribute("aria-haspopup","listbox"),l.setAttribute("aria-owns","optionsWrapId"),E(this,i,bt).call(this,l),l.addEventListener("focus",()=>{this.readonly()||this.open()}),this.hasSearch()&&l.addEventListener("input",h=>{let f=h.target.value,_=this.inputValue();f!==_&&(this.focusedOptionIndex.set(this.asFreeText()?-1:0),this.inputValue.set(f),this.updateInputElValue())}),l.addEventListener("inputValueChanged",h=>{let f=h.detail.value,_=this.inputValue();if(f!==_){if(f===""){this.clear();return}this.setSelectedOptionsFromValue(f),this.setInputValueFromOptions(this.selectedOptions()),E(this,i,Ze).call(this)}}),l):(console.warn("<sh-select> input element not found are you missing to pass an <input> or <textarea> element to select component?"),null)}),this.focusEffect=U(()=>{let c=this.inputRefEl();if(!c)return;let l=this.getLabelAsSlug(this.filteredOptions()[this.focusedOptionIndex()]);l?c.setAttribute("aria-activedescendant",l):c.removeAttribute("aria-activedescendant")}),this.openAbortController=null,this.isOpenEffect=U(()=>{if(this.isOpen()){this.openAbortController||(this.openAbortController=new AbortController);let l=this.inputRefEl();if(!l)return;l.setAttribute("aria-expanded",this.isOpen().toString()),l.addEventListener("keydown",h=>{if((h.key==="Escape"||h.key==="Tab")&&(h.preventDefault(),this.close()),(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),this.toggleOptionByIndex(this.focusedOptionIndex())),h.key==="ArrowDown"){h.preventDefault();let f=this.focusedOptionIndex()+1;this.focusedOptionIndex.set(f>this.filteredOptions().length-1?0:f)}if(h.key==="ArrowUp"){h.preventDefault();let f=this.focusedOptionIndex()-1;this.focusedOptionIndex.set(f<0?this.filteredOptions().length-1:f)}},{signal:this.openAbortController?.signal})}else{let l=this.inputRefEl();if(!l)return;l.setAttribute("aria-expanded",this.isOpen().toString()),this.openAbortController&&(this.openAbortController.abort(),this.openAbortController=null)}}),this._inputValue="",this.inputValueEffect=U(()=>{let c=this.inputValue();this._inputValue=c}),this.inputRefElEffect=U(()=>{let c=this.inputRefEl();c&&c.value!==this._inputValue&&(this.disabled.set(c.disabled),this.setSelectedOptionsFromValue(c.value),this.setInputValueFromOptions(this.selectedOptions()))}),this.selectedLabels=L(()=>{let c=this.selectedOptions();return this.label()?c.map(h=>this.getLabel(h)).join(", "):c.join(", ")}),this.inputState=L(()=>(this.selectedOptions().length>0||this.asFreeText()&&this.inputValue().length>0)&&!this.isOpen()?"selected":this.isLoading()?"loading":this.isOpen()&&(this.lazySearch()||this.inlineSearch())?"open-searching":this.isOpen()?"open":this.inlineSearch()||this.lazySearch()?"searching":"closed"),this.hasSearch=L(()=>this.inlineSearch()||this.lazySearch()),D(this,p,U(()=>{if(this.selectMultiple()&&this.hasSearch())return;let c=this.selectedOptions(),l=this.value(),h=c.map(f=>l?E(this,i,J).call(this,f,l):f).join(",");this.inputValue.set(h)}))}ngOnInit(){this.setInitInput()}setInitInput(){let c=u(this,e).nativeElement.querySelector("input");if(c){this.inputRefInput.set(new Q(c));return}let l=u(this,e).nativeElement.querySelector("textarea");if(l){this.inputRefInput.set(new Q(l));return}typeof MutationObserver<"u"&&u(this,n).observe(u(this,e).nativeElement,{attributes:!0,childList:!0,subtree:!0,characterData:!0})}setSelectedOptionsFromValue(c){let l=this.options()||[],h=this.value(),f=this.selectMultiple(),_=c.toString().split(",");if(_.length===0){this.selectedOptions.set([]);return}let I=f?_:[_[0]],X=l.filter(N=>{let V=h?E(this,i,J).call(this,N,h)?.toString():N?.toString();return V&&I.includes(V)});this.selectedOptions.set(f?X:[X[0]])}setInputValueFromOptions(c){let l=this.value();if(c.length===0){this.inputValue.set(""),this.updateInputElValue();return}let h=c.map(f=>l?E(this,i,J).call(this,f,l):f).join(",");h!==this.inputValue()&&(this.inputValue.set(h),this.updateInputElValue())}getLabel(c){let l=this.label();return l?E(this,i,J).call(this,c,l):c}getLabelAsSlug(c){let l=this.getLabel(c);return!l||typeof l!="string"?"":l.replaceAll(" ","-")}toggleOptionByIndex(c,l){let h=this.filteredOptions()[c];if(this.asFreeText()&&c===-1||!h){this.close();return}l&&l.stopPropagation();let f=this.selectMultiple(),_=this._isClearable(),I=this.value(),X=this.selectedOptionValues(),N=I?E(this,i,J).call(this,h,I):h;this.prevInputValue.set(null),u(this,s).set(null),this.selectedOptions.update(V=>{let K=X.indexOf(N);if(K>-1){let oe=[...V.slice(0,K),...V.slice(K+1)];return _||oe.length>0?oe:V}else return this.focusedOptionIndex.set(c),f?[...V,h]:[h]}),f?this.inputRefEl()?.focus():this.isOpen.set(!1),this.setInputValueFromOptions(this.selectedOptions()),f&&this.hasSearch()&&(this.inputValue.set(""),this.updateInputElValue())}removeSelectedOptionByIndex(c,l){c.stopPropagation(),this.selectedOptions.update(h=>[...h.slice(0,l),...h.slice(l+1)]),this.setInputValueFromOptions(this.selectedOptions())}isSelected(c){let l=this.value(),h=this.filteredOptions()[c],f=l?E(this,i,J).call(this,h,l):h;return this.selectedOptionValues().indexOf(f)>-1}open(){this.isOpen()||(this.isOpen.set(!0),this.hasSearch()?(this.prevInputValue.set(this.inputValue()??""),this.inputValue.set(""),this.updateInputElValue()):u(this,s).set(this.selectedOptions()),this.selectMultiple()||E(this,i,Ze).call(this))}close(){this.isOpen.set(!1);let c=this.prevInputValue(),l=u(this,s).call(this);if(this.asFreeText()){this.updateInputElValue();return}this.hasSearch()&&c&&(this.inputValue.set(c),this.setInputValueFromOptions(this.selectedOptions())),!this.hasSearch()&&l!==null&&this.setInputValueFromOptions(l),this.selectMultiple()&&this.setInputValueFromOptions(this.selectedOptions())}clear(c){c?.stopPropagation(),this.inputValue.set(""),this.selectedOptions.set([]),this.isOpen.set(!1),this.prevInputValue.set(null),this.cleared.emit(),this.updateInputElValue()}updateInputElValue(){let c=this.inputRefEl(),l=this.inputValue();c&&(c.value=l,c.dispatchEvent(new Event("input")))}ngOnDestroy(){this.openAbortController&&(this.openAbortController.abort(),this.openAbortController=null),typeof MutationObserver<"u"&&u(this,n).disconnect()}};e=new WeakMap,s=new WeakMap,n=new WeakMap,i=new WeakSet,Ke=function(c,l){if(!l)return 0;let h=0,f=-1,_=0,I=!0;for(let X=0;X<l.length;X++){let N=l[X];if(c.length>f+1&&c[f+1]===N)h+=X===0?100:150,f++,_++;else{let V=c.indexOf(N,f+1);if(X>0&&(I=!1),V===-1)return 0;h+=100,f=V,_++}}return I&&l.length===_&&(h+=1e3),h+=_*20,h},m=new WeakMap,p=new WeakMap,Ze=function(){let c=this.selectedOptionValues()[0],l=this.value();if(c){let h=this.filteredOptions().findIndex(f=>l?E(this,i,J).call(this,f,l)===c:f===c);this.focusedOptionIndex.set(h)}else this.focusedOptionIndex.set(-1)},J=function(c,l){return l.split(".").reduce((h,f)=>h?.[f],c)},bt=function(c){Object.defineProperty(c,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(c),"value").get.call(this)},set(l){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(c),"value").set.call(this,l);let f=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:l}});return this.dispatchEvent(f),l}})},Tt=function(c){let l=(c??"").toLowerCase(),h="^";for(let f of l)h+=".*"+E(this,i,Mt).call(this,f);return h+=".*$",new RegExp(h,"i")},Mt=function(c){return c.replace(/[-\/\\^$+?.()|[\]{}]/g,"\\$&")},g.\u0275fac=function(l){return new(l||g)},g.\u0275cmp=A({type:g,selectors:[["sh-select"]],contentQueries:function(l,h,f){l&1&&ht(f,h.inlineTemplate,De,5),l&2&&ae()},viewQuery:function(l,h){l&1&&ne(h.optionsWrapRef,ri,5),l&2&&ae()},hostVars:2,hostBindings:function(l,h){l&2&&$("multiple",h.selectMultiple())},inputs:{value:[1,"value"],label:[1,"label"],asFreeText:[1,"asFreeText"],placeholder:[1,"placeholder"],readonly:[1,"readonly"],disabled:[1,"disabled"],lazySearch:[1,"lazySearch"],inlineSearch:[1,"inlineSearch"],asText:[1,"asText"],isClearable:[1,"isClearable"],selectMultiple:[1,"selectMultiple"],optionTemplate:[1,"optionTemplate"],selectedOptionTemplate:[1,"selectedOptionTemplate"],placeholderTemplate:[1,"placeholderTemplate"],isOpen:[1,"isOpen"],isLoading:[1,"isLoading"],options:[1,"options"],selectedOptions:[1,"selectedOptions"]},outputs:{readonly:"readonlyChange",disabled:"disabledChange",isOpen:"isOpenChange",isLoading:"isLoadingChange",options:"optionsChange",selectedOptions:"selectedOptionsChange",cleared:"cleared"},ngContentSelectors:li,decls:28,vars:22,consts:[["formFieldWrapper",""],["optionsWrap",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","options"],["trigger","",3,"click"],["ngProjectAs","input",5,["input"],1,"input"],[1,"selected-value"],["suffix",""],["suffix","",1,"primary"],["id","optionsWrapId","role","listbox",1,"ship-options"],[1,"option",3,"id","selected","focused"],[1,"small",3,"class"],[1,"small",3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngTemplateOutlet"],["suffix","",3,"click"],[1,"option",3,"click","id"],[3,"class","active"]],template:function(l,h){if(l&1){let f=ie();B(ai),ft(0)(1)(2)(3)(4)(5),O(6,"sh-popover",2,0),Ne("isOpenChange",function(I){return F(f),$e(h.isOpen,I)||(h.isOpen=I),H(I)}),Y("closed",function(){return F(f),H(h.close())}),O(8,"sh-form-field",3),Y("click",function(){return F(f),H(h.open())}),y(9,0,["ngProjectAs","label",5,["label"]]),O(10,"div",4)(11,"div",5),q(12,di,1,1)(13,xi,2,0)(14,Oi,2,1),y(15,1),y(16,2),M()(),q(17,bi,2,0,"sh-icon",6)(18,Ti,1,0,"sh-spinner",7)(19,Mi,2,0,"sh-icon",6)(20,Ii,2,0,"sh-icon",6)(21,ki,2,0,"sh-icon",6)(22,Ri,2,0,"sh-icon",6)(23,Vi,2,0,"sh-icon",6),M(),O(24,"div",8,1),Be(26,Hi,4,8,"li",9,je),M()()}if(l&2){pe(h.placeholderTemplate());let f=h.optionTemplate(),_=h.selectedOptionTemplate(),I=h.inlineTemplate();b();let X=pe(h.selectedOptions()),N=h.inputState();b(),pe(_||f||I),b(),pe(f||I),b();let V=pe(!h.asText()&&h.selectMultiple());b();let K=pe(h.isOpen()&&h.hasSearch()&&(V||h.inputValue().length>0));b(),ze("isOpen",h.isOpen),le("disableOpenByClick",!0)("options",Ue(21,ci)),b(2),$("stretch",h.stretch())("small",h.small())("readonly",h.readonly()||h.disabled()),b(2),$("show-search-text",K),b(),$("is-selected",N==="selected"),b(),z(h.asFreeText()&&h.inputValue().length>0&&!h.isOpen()?12:X.length>0?13:K?-1:14),b(5),z(N==="closed"?17:N==="loading"?18:N==="open-searching"?19:N==="searching"?20:N==="selected"&&h._isClearable()?21:N==="selected"&&!h._isClearable()?22:23),b(9),We(h.filteredOptions())}},dependencies:[gt,_t,tt,Ce,sn,cn,on],encapsulation:2,changeDetection:0});let t=g;return t})();function dn(t){let e=P(Q),s=P(we),n=k(!1),i=typeof MutationObserver<"u"&&new MutationObserver(o=>{o.forEach(m=>{m.type==="attributes"&&m.attributeName==="class"&&n.set(e.nativeElement.classList.contains(t))})});return rt(e.nativeElement,()=>{i&&i.observe(e.nativeElement,{attributes:!0}),n.set(e.nativeElement.classList.contains(t))}),s.onDestroy(()=>{i&&i.disconnect()}),n}var Qn=(()=>{var e,s,n,i,Ee;let m=class m{constructor(){x(this,i);x(this,e);x(this,s);x(this,n);D(this,e,P(Q)),this.openWidth=280,this.openWidthTreshold=this.openWidth*.5,this.disableDrag=T(!1),this.isOpen=G(!1),this.isOverlay=dn("overlay"),D(this,s,u(this,e).nativeElement.parentElement),D(this,n,u(this,s).getBoundingClientRect&&u(this,s).getBoundingClientRect()),this.dragImageElement=se.required("dragImageElement"),this.dragIsEnding=k(!1),this.dragIsOnScreen=k(!0),this.isDragging=k(!1),this.dragPositionX=k(0),this.dragActualPositionX=L(()=>{let a=this.dragPositionX(),r=280,d=100,C=.008,v=r/2,g=v-d/2,S=v+d/2;if(a>S){let c=a-S,h=(r-S)*(1-Math.exp(-C*c));return S+h}else if(a<g){let c=g-a,h=g*(1-Math.exp(-C*c));return g-h}return a}),this.draggingStyle=L(()=>this.isOverlay()?this.isDragging()?`translateX(${this.dragActualPositionX()}px)`:this.isOpen()?`translateX(${this.openWidth}px)`:"translateX(0px)":null),this.draggingEffect=U(()=>{typeof document>"u"||(this.isDragging()?document.body.classList.add("dragging"):document.body.classList.remove("dragging"))})}drop(a){a.stopPropagation(),E(this,i,Ee).call(this,a.clientX-u(this,n).left)}dragEnd(a){a.clientX-u(this,n).left<0&&E(this,i,Ee).call(this,0),a.clientX-u(this,n).left>this.openWidthTreshold&&E(this,i,Ee).call(this,this.openWidthTreshold)}dragEnter(){this.dragIsOnScreen.set(!0)}dragLeave(){this.dragIsOnScreen.set(!1)}dragStart(a){a.stopPropagation(),D(this,n,u(this,s).getBoundingClientRect()),this.isDragging.set(!0)}drag(a){a.stopPropagation(),this.isDragging()&&(a.clientX!==0||a.clientY!==0)&&this.dragPositionX.set(a.clientX-u(this,n).left)}touchStart(a){a.stopPropagation(),this.isDragging.set(!0),D(this,n,u(this,s).getBoundingClientRect()),this.dragPositionX.set(0)}touchMove(a){a.stopPropagation(),this.isDragging()&&this.dragPositionX.set(a.touches[0].clientX-u(this,n).left)}touchEnd(a){a.stopPropagation(),E(this,i,Ee).call(this,a.changedTouches[0].clientX-u(this,n).left)}touchCancel(a){a.stopPropagation(),this.isDragging.set(!1)}};e=new WeakMap,s=new WeakMap,n=new WeakMap,i=new WeakSet,Ee=function(a){this.isDragging.set(!1),a>=this.openWidthTreshold?this.isOpen.set(!0):this.isOpen.set(!1)},m.\u0275fac=function(r){return new(r||m)},m.\u0275cmp=A({type:m,selectors:[["sh-sidenav"]],viewQuery:function(r,d){r&1&&ne(d.dragImageElement,ji,5),r&2&&ae()},hostVars:6,hostBindings:function(r,d){r&2&&$("open",d.isOpen())("closed",!d.isOpen())("is-dragging",d.isDragging())},inputs:{disableDrag:[1,"disableDrag"],isOpen:[1,"isOpen"]},outputs:{isOpen:"isOpenChange"},ngContentSelectors:Wi,decls:10,vars:5,consts:[["dragImageElement",""],[1,"drag-image"],[1,"dropping-surface"],[1,"sidenav"],[1,"main-wrap"],["draggable","true",1,"dragable"],[1,"closed-topbar"],[1,"dropping-surface",3,"drop","dragenter","dragleave"],["draggable","true",1,"dragable",3,"dragstart","dragend","drag","touchstart","touchmove","touchend","touchcancel"]],template:function(r,d){r&1&&(B(Bi),q(0,qi,2,0,"div",1),q(1,zi,1,0,"div",2),j(2,"div",3),y(3),W(),j(4,"div",4),q(5,$i,1,0,"div",5),j(6,"div",6),y(7,1),W(),j(8,"main"),y(9,2),W()()),r&2&&(z(d.isOverlay()?0:-1),b(),z(d.isOverlay()&&d.isDragging()?1:-1),b(3),ee("transform",d.draggingStyle()),b(),z(d.isOverlay()&&!d.disableDrag()?5:-1))},encapsulation:2,changeDetection:0});let t=m;return t})();var Yn=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=A({type:e,selectors:[["sh-stepper"]],ngContentSelectors:Z,decls:1,vars:0,template:function(i,o){i&1&&(B(),y(0))},encapsulation:2,changeDetection:0});let t=e;return t})();var Xn=(()=>{var e;let s=class s{constructor(){x(this,e);D(this,e,P(hn)),this.shSort=T(),this.sortAsc=L(()=>{let i=u(this,e).sortByColumn(),o=this.shSort();return!i||!o?!1:i===o}),this.sortDesc=L(()=>{let i=u(this,e).sortByColumn(),o=this.shSort();return!i||!o?!1:i===`-${o}`})}toggleSort(){let i=this.shSort();i&&u(this,e).toggleSort(i)}};e=new WeakMap,s.\u0275fac=function(o){return new(o||s)},s.\u0275dir=Oe({type:s,selectors:[["","shSort",""]],hostAttrs:[1,"sortable"],hostVars:4,hostBindings:function(o,m){o&1&&Y("mousedown",function(){return m.toggleSort()}),o&2&&$("sort-asc",m.sortAsc())("sort-desc",m.sortDesc())},inputs:{shSort:[1,"shSort"]}});let t=s;return t})();var ve=1.5,hn=(()=>{var e,s,n,i,o,ke;let p=class p{constructor(){x(this,o);x(this,e);x(this,s);x(this,n);x(this,i);D(this,e,P(Q)),D(this,s,P(et,{optional:!0})),this.loading=T(!1),this.data=T([]),this.dataChange=ue(),this.sortByColumn=G(null),this.tbody=se("tbody"),this.columns=xt(this.tbody,["tr:first-child th"]),this.class=k(u(this,s)?.tableType??"default"),this.resizing=k(!1),this.sizeTrigger=k(!0),D(this,n,null),D(this,i,k(!1)),this.scrollXState=k(-1),this.scrollYState=k(-1),this.canScrollX=k(!1),this.canScrollY=k(!1),this.columnSizes=L(()=>{this.sizeTrigger();let r=this.columns.signal();return r.reduce((d,C,v)=>{let g=C,S=g.getAttribute("size"),c=v===r.length-1;return S?`${d} ${S}`:g.classList.contains("sticky")||g.classList.contains("sticky-end")?`${d} min-content`:c?`${d} 1fr`:`${d} 1fr`},"")}),this.e=U(()=>{let r=this.sortByColumn();if(r===null)return u(this,i).call(this)||(D(this,n,this.data()),u(this,i).set(!0)),this.dataChange.emit(structuredClone(u(this,n)));let d=r.startsWith("-")?r.slice(1):r,C=r.startsWith("-"),v=this.data().sort((g,S)=>{let c=g[d],l=S[d],h=0;return typeof c=="number"&&typeof l=="number"&&(h=c-l),c instanceof Date&&l instanceof Date&&(h=c.getTime()-l.getTime()),typeof c=="string"&&typeof l=="string"&&(h=c.localeCompare(l,void 0,{sensitivity:"base"})),C?-h:h});this.dataChange.emit(v)})}updateColumnSizes(){this.sizeTrigger.set(!this.sizeTrigger())}onScroll(){E(this,o,ke).call(this)}onResize(r){E(this,o,ke).call(this)}ngAfterViewInit(){queueMicrotask(()=>E(this,o,ke).call(this))}toggleSort(r){let d=this.sortByColumn(),C=d===r?`-${r}`:d===`-${r}`?null:r;this.sortByColumn.set(C)}};e=new WeakMap,s=new WeakMap,n=new WeakMap,i=new WeakMap,o=new WeakSet,ke=function(){let r=u(this,e).nativeElement,d=-1,C=-1,v=r.scrollWidth>r.clientWidth+ve;if(v){let S=r.scrollLeft<=ve;r.scrollWidth-(r.scrollLeft+r.clientWidth)<ve?d=1:S||(d=0)}this.scrollXState.set(d),this.canScrollX.set(v);let g=r.scrollHeight>r.clientHeight+ve;if(g){let S=r.scrollTop<=ve;r.scrollHeight-(r.scrollTop+r.clientHeight)<ve?C=1:S||(C=0)}this.scrollYState.set(C),this.canScrollY.set(g)},p.\u0275fac=function(d){return new(d||p)},p.\u0275cmp=A({type:p,selectors:[["sh-table"]],viewQuery:function(d,C){d&1&&ne(C.tbody,Ni,5),d&2&&ae()},hostVars:18,hostBindings:function(d,C){d&1&&Y("scroll",function(){return C.onScroll()})("resize",function(g){return C.onResize(g)},lt),d&2&&(de(C.class()),ee("grid-template-columns",C.columnSizes()),$("resizing",C.resizing())("can-scroll-x",C.canScrollX())("can-scroll-y",C.canScrollY())("scrolled-x",C.scrollXState()>=0)("scrolled-x-end",C.scrollXState()===1)("scrolled-y",C.scrollYState()>=0)("scrolled-y-end",C.scrollYState()===1))},inputs:{loading:[1,"loading"],data:[1,"data"],sortByColumn:[1,"sortByColumn"]},outputs:{dataChange:"dataChange",sortByColumn:"sortByColumnChange"},ngContentSelectors:Qi,decls:5,vars:2,consts:[["tbody",""],[1,"indeterminate","primary"],[1,"no-rows"]],template:function(d,C){d&1&&(B(Ui),q(0,Yi,1,0,"sh-progress-bar",1),O(1,"tbody",null,0),y(3),M(),q(4,Xi,2,0,"div",2)),d&2&&(z(C.loading()?0:-1),b(4),z(C.loading()?-1:4))},dependencies:[ln],encapsulation:2,changeDetection:0});let t=p;return t})(),Gn=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=A({type:e,selectors:[["sh-tabs"]],ngContentSelectors:Z,decls:1,vars:0,template:function(i,o){i&1&&(B(),y(0))},encapsulation:2,changeDetection:0});let t=e;return t})(),Kn=(()=>{let e=class e{constructor(){this.isActive=G(!1),this.disallowToggle=T(!1)}ngOnInit(){this.disallowToggle()&&this.isActive.set(!0)}toggle(){this.isActive.set(!this.isActive())}};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=A({type:e,selectors:[["sh-toggle-card"]],hostVars:2,hostBindings:function(i,o){i&2&&$("active",o.isActive())},inputs:{isActive:[1,"isActive"],disallowToggle:[1,"disallowToggle"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:Ki,decls:7,vars:1,consts:[[3,"click"],[1,"toggle-icon"],[1,"collapsable"],[1,"content"]],template:function(i,o){i&1&&(B(Gi),O(0,"h3",0),Y("click",function(){return o.disallowToggle()||o.toggle()}),y(1,0,null,Zi,1,0),q(3,Ji,2,0,"sh-icon",1),M(),O(4,"div",2)(5,"div",3),y(6,1),M()()),i&2&&(b(3),z(o.disallowToggle()?-1:3))},dependencies:[Ce],encapsulation:2,changeDetection:0});let t=e;return t})(),Zn=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=A({type:e,selectors:[["sh-toggle"]],ngContentSelectors:Z,decls:3,vars:0,consts:[[1,"box"],[1,"knob"]],template:function(i,o){i&1&&(B(),j(0,"div",0),ge(1,"div",1),W(),y(2))},encapsulation:2,changeDetection:0});let t=e;return t})();var Jn=(()=>{let e=class e{constructor(){this.filesOver=k(!1),this.filesDropped=ue()}onDragOver(n){n.preventDefault(),n.stopPropagation(),this.filesOver.set(!0)}onDragLeave(n){n.preventDefault(),n.stopPropagation(),this.filesOver.set(!1)}ondrop(n){n.preventDefault(),n.stopPropagation(),this.filesOver.set(!1);let i=n.dataTransfer?.files;i&&i.length>0&&this.filesDropped.emit(i)}};e.\u0275fac=function(i){return new(i||e)},e.\u0275dir=Oe({type:e,selectors:[["","shDragDrop",""]],hostVars:2,hostBindings:function(i,o){i&1&&Y("dragover",function(p){return o.onDragOver(p)})("dragleave",function(p){return o.onDragLeave(p)})("drop",function(p){return o.ondrop(p)}),i&2&&$("filesover",o.filesOver())},outputs:{filesDropped:"filesDropped"}});let t=e;return t})();var pn=(()=>{var e,s,n;let i=class i{constructor(){x(this,e);x(this,s);x(this,n);this.positionAnchorName=T.required(),this.anchorEl=T.required(),this.isOpen=T(!1),D(this,e,P(Q)),D(this,s,P(_e)),D(this,n,null),this.SUPPORTS_ANCHOR=typeof CSS<"u"&&CSS.supports("position-anchor","--abc"),this.isBelow=k(!1),this.openEffect=U(()=>{this.isOpen()?setTimeout(()=>{u(this,e).nativeElement.showPopover(),this.calculateTooltipPosition()}):u(this,e).nativeElement.hidePopover()}),this.calculateTooltipPosition=()=>{if(!this.anchorEl())return;let m=this.anchorEl().nativeElement.getBoundingClientRect(),p=u(this,e).nativeElement,a=p.getBoundingClientRect();if(a.width===0&&a.height===0)return;let r=m.top-a.height<0;if(this.isBelow.set(r),!this.SUPPORTS_ANCHOR){let d=m.top-a.height,C=m.left+m.width/2-a.width/2;r&&(d=m.top+m.height),C+a.width>window?.innerWidth&&(C=m.right-a.width/2),C<0&&(C=-(a.width/2)),u(this,s).setStyle(p,"left",`${C}px`),u(this,s).setStyle(p,"top",`${d}px`),u(this,s).setStyle(p,"position","fixed")}},He(()=>{D(this,n,new AbortController);let m={signal:u(this,n).signal,capture:!0};window?.addEventListener("scroll",this.calculateTooltipPosition,m),window?.addEventListener("resize",this.calculateTooltipPosition,{signal:u(this,n).signal}),setTimeout(()=>this.calculateTooltipPosition())})}ngOnDestroy(){u(this,n)?.abort()}};e=new WeakMap,s=new WeakMap,n=new WeakMap,i.\u0275fac=function(p){return new(p||i)},i.\u0275cmp=A({type:i,selectors:[["ship-tooltip-wrapper"]],hostAttrs:["role","tooltip"],hostVars:5,hostBindings:function(p,a){p&2&&(be("popover","auto"),ee("position-anchor",a.positionAnchorName()),$("below",a.isBelow()))},inputs:{positionAnchorName:[1,"positionAnchorName"],anchorEl:[1,"anchorEl"],isOpen:[1,"isOpen"]},ngContentSelectors:Z,decls:2,vars:0,consts:[[1,"tooltip-content"]],template:function(p,a){p&1&&(B(),j(0,"div",0),y(1),W())},encapsulation:2});let t=i;return t})(),es=(()=>{var e,s,n,i,o,m;let p=class p{constructor(){x(this,e);x(this,s);x(this,n);x(this,i);x(this,o);x(this,m);this.shTooltip=T.required(),D(this,e,P(Q)),D(this,s,P(ct)),D(this,n,P(ot)),D(this,i,P(_e)),D(this,o,null),D(this,m,null),this.anchorName=`--${Re()}`,this.isOpen=k(!1)}onMouseEnter(){this.cleanupTooltip(),queueMicrotask(()=>this.showTooltip())}ngOnDestroy(){this.cleanupTooltip()}showTooltip(){if(u(this,o)||!this.shTooltip())return;this.isOpen.set(!0);let r,d=this.shTooltip();if(typeof d=="string")r=[[u(this,i).createText(d)]];else if(d instanceof De)D(this,m,d.createEmbeddedView({})),u(this,m).detectChanges(),r=[u(this,m).rootNodes];else return;D(this,o,u(this,s).createComponent(pn,{environmentInjector:u(this,n),projectableNodes:r})),u(this,o).setInput("positionAnchorName",this.anchorName),u(this,o).setInput("anchorEl",u(this,e)),u(this,o).setInput("isOpen",this.isOpen),u(this,o).changeDetectorRef.detectChanges()}cleanupTooltip(){this.isOpen.set(!1),u(this,o)&&(u(this,o).destroy(),D(this,o,null)),u(this,m)&&(u(this,m).destroy(),D(this,m,null))}};e=new WeakMap,s=new WeakMap,n=new WeakMap,i=new WeakMap,o=new WeakMap,m=new WeakMap,p.\u0275fac=function(d){return new(d||p)},p.\u0275dir=Oe({type:p,selectors:[["","shTooltip",""]],hostAttrs:[1,"tooltip"],hostVars:4,hostBindings:function(d,C){d&1&&Y("mouseenter",function(){return C.onMouseEnter()}),d&2&&(ee("anchor-name",C.anchorName),$("active",C.isOpen()))},inputs:{shTooltip:[1,"shTooltip"]}});let t=p;return t})();export{Ce as a,Pn as b,An as c,nn as d,Ln as e,Fn as f,Hn as g,jn as h,sn as i,on as j,Bn as k,tt as l,Wn as m,qn as n,zn as o,ln as p,$n as q,Nn as r,cn as s,Un as t,Qn as u,Yn as v,Xn as w,hn as x,Gn as y,Kn as z,Zn as A,Jn as B,es as C};
|
package/chunk-XLE2TW65.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as k,r as L}from"./chunk-USU2EHJV.js";import{h as U}from"./chunk-J3BBLPAD.js";import{H as C,Oc as R,V as E,_ as A,oa as z,r as S}from"./chunk-QDFCX6XE.js";import{a,b as D}from"./chunk-EUDKD2JW.js";var h=class{constructor(t){this.loader=t}_data=z(void 0);_isLoading=!1;_loaded=!1;load(){return!this._loaded&&!this._isLoading&&(this._isLoading=!0,this.loader().pipe(C(()=>this._isLoading=!1)).subscribe(t=>{this._data.set(t),this._loaded=!0})),this._data.asReadonly()}value(){return this._data.asReadonly()}isLoading(){return this._isLoading}isLoaded(){return this._loaded}reset(){this._data.set(void 0),this._loaded=!1}};var g=class e{#e=A(U);#o=new h(()=>this.getS3Config("Providers"));#n=new h(()=>this.getS3Config("Regions"));#r=new h(()=>this.getS3Config("RegionHosts"));#i=new h(()=>this.getS3Config("StorageClasses"));#a=R(()=>{let t=this.#o.value()(),o=this.#r.value()(),r=[...t??[],...o?.map(n=>({key:`Amazon ${n.key}`,value:n.value}))??[]];return Array.from(new Map(r.map(n=>[n.value,n])).values())});#s=new h(()=>this.getStorjConfig("Satellites"));#l=new h(()=>this.getStorjConfig("AuthenticationMethods"));#c=new h(()=>this.getOpenstackConfig("Providers"));#p=new h(()=>this.getOpenstackConfig("Versions"));#u=new h(()=>this.getGcsConfig("Locations"));#m=new h(()=>this.getGcsConfig("StorageClasses"));getS3AllProviders(){return this.#o.load(),this.#r.load(),this.#a}getS3Providers(){return this.#o.load()}getS3Regions(){return this.#n.load()}getS3RegionHosts(){return this.#r.load()}getS3StorageClasses(){return this.#i.load()}getStorjSatellites(){return this.#s.load()}getStorjAuthenticationMethods(){return this.#l.load()}getOpenstackProviders(){return this.#c.load()}getOpenstackVersions(){return this.#p.load()}getGcsLocations(){return this.#u.load()}getGcsStorageClasses(){return this.#m.load()}getS3Config(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":t}}).pipe(S(o=>this.#t(o)))}createS3IamUser(t,o){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"CanCreateUser","s3-username":t,"s3-password":o}})}createS3PolicyIAM(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"GetPolicyDoc",path:t}})}getStorjConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"storj-getconfig",requestBody:{"storj-config":t}}).pipe(S(o=>this.#t(o)))}getOpenstackConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":t}}).pipe(S(o=>this.#t(o)))}getGcsConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":t}}).pipe(S(o=>this.#t(o)))}#t(t){return(t.Result&&typeof t.Result=="object"&&Object.entries(t.Result).map(([o,r])=>({key:o,value:r})))??[]}static \u0275fac=function(o){return new(o||e)};static \u0275prov=E({token:e,factory:e.\u0275fac,providedIn:"root"})};var i=new L,p={type:"error",message:$localize`Using a leading slash is most likely wrong, and will result in objects being created with a leading slash in the name.`},w={description:$localize`Unknown destination type`,isDefaultEntry:!0,customFields:{path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path`,formElement:e=>i.control(e??"")}},mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>{let n=o.startsWith(`${e}:///`)?o.split(`${e}:///`)[1]:o.split(`${e}://`)[1];return a({destinationType:e,custom:{path:n.split("?")[0]}},s(e,t))}}},V=[{key:"file",displayName:$localize`File system`,description:$localize`Store backups on your local file system.`,customFields:{path:{type:"FolderTree",name:"path",doubleSlash:p,shortDescription:$localize`File path`,longDescription:$localize`The path to store the backup`,formElement:e=>i.control(e??""),isMandatory:!0}},mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>{let r=o.startsWith("file:///"),n=decodeURIComponent(r?o.split("file:///")[1]:o.split("file://")[1]),u=n.slice(1).startsWith(":\\")?n:"/"+n;return a({destinationType:e,custom:{path:u.split("?")[0]}},s(e,t))}}},{key:"ssh",displayName:$localize`SSH`,description:$localize`Store backups with SSH.`,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`The server to connect to`,formElement:e=>i.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`The port to connect to`,formElement:e=>i.control(e??"",[k.required,k.max(65535)])},path:{type:"Path",name:"path",shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>i.control(e??"")}},dynamicFields:[{name:"auth-username",isMandatory:!0}],advancedFields:[{type:"FileTree",name:"ssh-keyfile",accepts:".key,",shortDescription:$localize`This is a path to a private key file locally on the machine`,longDescription:$localize`This is a path to a private key file locally on the machine`},{type:"FreeText",name:"ssh-key",shortDescription:$localize`SSH private key`,longDescription:$localize`An SSH private key. Supported formats are OpenSSL, OpenSSH, PuTTY, and PEM.`}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:l}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:l}},s(e,t))}}},{key:"s3",displayName:$localize`S3 Compatible`,description:$localize`Store backups in any S3 compatible bucket.`,customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>i.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the S3 compatible server to connect to`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(g).getS3AllProviders(),isMandatory:!0,formElement:e=>i.control(e??"")},{name:"use-ssl",order:2},{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>z([{key:"AWS Library",value:"aws"},{key:"MinIO Library",value:"minio"}])},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(g).getS3StorageClasses()},{name:"s3-location-constraint",type:"NonValidatedSelectableString",loadOptions:e=>e.get(g).getS3Regions()}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{server:r,path:n}=m(t);return a({destinationType:e,custom:{path:n,bucket:r}},s(e,t))}}},{key:"gcs",displayName:$localize`Google Cloud Storage`,description:$localize`Store backups in Google Cloud Storage.`,oauthField:"authid",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>i.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],advancedFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:e=>e.get(g).getGcsLocations()},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(g).getGcsStorageClasses()}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{server:r,path:n}=m(t);return a({destinationType:e,custom:{path:n,bucket:r}},s(e,t))}}},{key:"googledrive",displayName:$localize`Google Drive`,description:$localize`Store backups in Google Drive.`,oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"authid",type:"Password",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:d(t)}},s(e,t))}},{key:"pcloud",displayName:$localize`pCloud`,description:$localize`Store backups in pCloud.`,oauthField:"authid",customFields:{server:{type:"Enumeration",name:"server",loadOptions:()=>z([{key:"pCloud Global",value:"api.pcloud.com"},{key:"pCloud Europe",value:"eapi.pcloud.com"}]),shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>i.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"authid",type:"Password",oauthVersion:2,isMandatory:!0}],mapper:{to:e=>{let{server:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{server:r,path:n}=m(t);return a({destinationType:e,custom:{server:r,path:n}},s(e,t))}}},{key:"azure",displayName:$localize`Azure Blob Storage`,description:$localize`Store backups in Azure Blob Storage.`,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Container name`,longDescription:$localize`Container name`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:d(t)}},s(e,t))}},{key:"onedrivev2",displayName:$localize`OneDrive`,description:$localize`Store backups in OneDrive.`,oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:d(t)}},s(e,t))}},{key:"od4b",displayName:$localize`OneDrive Business`,description:$localize`Store backups in OneDrive Business.`,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>i.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>i.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:l}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:l}},s(e,t))}}},{key:"mssp",displayName:$localize`Microsoft SharePoint`,description:$localize`Store backups in Microsoft SharePoint.`,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>i.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>i.control(e??"")},path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:l}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:l}},s(e,t))}}},{key:"sharepoint",displayName:$localize`Microsoft SharePoint v2`,description:$localize`Store backups in Microsoft SharePoint.`,oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"site-id",isMandatory:!0},{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:d(t)}},s(e,t))}},{key:"dropbox",displayName:$localize`Dropbox`,description:$localize`Store backups in Dropbox.`,oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:d(t)}},s(e,t))}},{key:"box",displayName:$localize`Box.com`,description:$localize`Store backups in Box.com.`,oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:d(t)}},s(e,t))}},{key:"jottacloud",displayName:$localize`Jottacloud`,description:$localize`Store backups in Jottacloud.`,oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:d(t)}},s(e,t))}},{key:"b2",displayName:$localize`B2 Cloud Storage`,description:$localize`Store backups in B2 Cloud Storage.`,customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>i.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in the bucket`,longDescription:$localize`Path in the bucket`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Application ID`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Application Key`,isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{server:r,path:n}=m(t);return a({destinationType:e,custom:{path:n,bucket:r}},s(e,t))}}},{key:"e2",displayName:$localize`IDrive e2`,description:$localize`Store backups in IDrive e2.`,customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>i.control(e??""),isMandatory:!0},path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path in the bucket`,longDescription:$localize`Path in the bucket`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Access ID`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access Secret`,isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{server:r,path:n}=m(t);return a({destinationType:e,custom:{bucket:r,path:n}},s(e,t))}}},{key:"mega",displayName:$localize`Mega.nz`,description:$localize`Store backups in Mega.nz.`,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let t=e.custom.path;return c(e,null,null,t)},from:(e,t,o)=>a({destinationType:e,custom:{path:d(t)}},s(e,t))}},{key:"msgroup",displayName:$localize`Microsoft Office 365 Group`,description:$localize`Store backups in Microsoft Office 365 Group.`,oauthField:"authid",customFields:{groupEmail:{type:"Email",name:"groupEmail",shortDescription:$localize`Group email`,longDescription:$localize`Group email`,formElement:e=>i.control(e??"",[k.email]),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:d(t)}},s(e,t))}},{key:"cloudfiles",displayName:$localize`Rackspace CloudFiles`,description:$localize`Store backups in Rackspace CloudFiles.`,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>i.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>i.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:l}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:l}},s(e,t))}}},{key:"rclone",displayName:$localize`Rclone`,description:$localize`Store backups in Rclone.`,dynamicFields:[{name:"rclone-local-repository",shortDescription:$localize`Local repository`,defaultValue:""},{name:"rclone-remote-repository",shortDescription:$localize`Remote repository`,defaultValue:""},{name:"rclone-remote-path",type:"Path",shortDescription:$localize`Path on remote repository`,defaultValue:""}],mapper:{to:e=>{let t=e.dynamic["rclone-remote-repository"],o=e.dynamic["rclone-remote-path"],r=Object.entries(e.dynamic).filter(([n])=>!["rclone-remote-repository","rclone-remote-path"].includes(n));return v(e.destinationType??"rclone",t,null,o,[...Object.entries(e.advanced),...r])},from:(e,t,o)=>{let{advanced:r,dynamic:n}=s(e,t),{server:l,path:u}=m(t);return a({destinationType:e,dynamic:a({"rclone-remote-repository":l,"rclone-remote-path":u},n)},r)}}},{key:"openstack",displayName:$localize`OpenStack Object Storage`,description:$localize`Store backups in OpenStack Object Storage.`,customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket`,longDescription:$localize`Bucket`,formElement:e=>i.control(e??""),isMandatory:!0}},dynamicFields:[{name:"openstack-authuri",shortDescription:$localize`Auth URI`,type:"Enumeration",loadOptions:e=>e.get(g).getOpenstackProviders(),isMandatory:!0},{name:"openstack-version",shortDescription:$localize`Version`,type:"Enumeration",loadOptions:e=>e.get(g).getOpenstackVersions()},{name:"openstack-domain-name",type:"Hostname",shortDescription:$localize`Domain name`},{name:"openstack-tenant-name",shortDescription:$localize`Tenant name`},{name:"openstack-region",shortDescription:$localize`Region`}],mapper:{to:e=>{let{bucket:t}=e.custom;return c(e,t,null,null)},from:(e,t,o)=>{let{server:r,path:n}=m(t);return a({destinationType:e,custom:{path:n,bucket:r}},s(e,t))}}},{key:"webdav",displayName:$localize`WebDAV`,description:$localize`Store backups in WebDAV.`,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>i.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>i.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:$localize`Use SSL`},{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:l}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:l}},s(e,t))}}},{key:"aftp",displayName:$localize`Alternative FTP`,description:$localize`Store backups in FTP.`,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>i.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>i.control(e??"")},path:{type:"Path",name:"path",shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>i.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:l}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:l}},s(e,t))}}},{key:"ftp",displayName:$localize`FTP`,description:$localize`Store backups in FTP.`,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>i.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>i.control(e??"")},path:{type:"Path",name:"path",shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>i.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:l}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:l}},s(e,t))}}},{key:"sia",displayName:$localize`Sia Decentrilized Cloud`,description:$localize`Store backups in Sia Decentrilized Cloud.`,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>i.control(e??""),isMandatory:!0}},dynamicFields:["sia-targetpath","sia-password","sia-redundancy"],mapper:{to:e=>{let t=e.custom.server,o=e.dynamic["sia-targetpath"],r=[...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([n])=>n!=="sia-targetpath")];return v(e.destinationType??"sia",t,null,o,r)},from:(e,t,o)=>a({destinationType:e,custom:{path:d(t)}},s(e,t))}},{key:"cos",displayName:$localize`Tencent COS`,description:$localize`Store backups in Tencent COS.`,customFields:{bucket:{name:"bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:!0,formElement:e=>i.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"cos-region",shortDescription:$localize`Region`},{name:"cos-app-id",shortDescription:$localize`COS App Id`,isMandatory:!0},{name:"cos-secret-id",shortDescription:$localize`COS Secret Id`,isMandatory:!0},{name:"cos-secret-key",shortDescription:$localize`COS Secret Key`,isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom,r=D(a({},e),{advanced:D(a({},e.advanced),{"cos-bucket":t})});return c(r,null,null,o)},from:(e,t,o)=>{let r=s(e,t),n=r.advanced["cos-bucket"];return delete r.advanced["cos-bucket"],a({destinationType:e,custom:{path:d(t),bucket:n}},r)}}},{key:"tahoe",displayName:$localize`Tahoe LAFS`,description:$localize`Store backups in Tahoe LAFS.`,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>i.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>i.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:$localize`Use SSL`}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:l}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:l}},s(e,t))}}},{key:"smb",displayName:$localize`Windows Share (SMB)`,description:$localize`Store backups on SMB storage.`,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>i.control(e??""),isMandatory:!0},share:{type:"Hostname",name:"share",shortDescription:$localize`Share Name`,longDescription:$localize`Share Name`,formElement:e=>i.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.control(e??"")}},dynamicFields:["transport",{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0},"auth-domain"],mapper:{to:e=>{let{share:t,server:o,path:r}=e.custom;return c(e,o,null,M(t,r))},from:(e,t,o)=>{let{server:r,path:n}=m(t),l=n.split("/")[0],u=n.split("/").slice(1).join("/");return a({destinationType:e,custom:{server:r,share:l,path:u}},s(e,t))}}},{key:"filen",displayName:$localize`Filen.io`,description:$localize`Store backups in Filen.io.`,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on Filen`,longDescription:$localize`Path on Filen`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:d(t)}},s(e,t))}},{key:"filejump",displayName:$localize`Filejump`,description:$localize`Store backups in Filejump.`,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on Filejump`,longDescription:$localize`Path on Filejump`,formElement:e=>i.control(e??"")}},dynamicFields:[{type:"Password",name:"api-token",shortDescription:$localize`API Token`,longDescription:$localize`Filejump API Token`,formElement:e=>i.control(e??""),isMandatory:!0}],mapper:{to:e=>{let{path:t}=e.custom;return console.log(t),c(e,null,null,t)},from:(e,t,o)=>(console.log(t),a({destinationType:e,custom:{path:d(t)}},s(e,t)))}},{key:"storj",customKey:"storjAccessGrant",displayName:$localize`Storj Access Grant`,description:$localize`Store backups in Storj Access Grant.`,dynamicFields:[{name:"storj-shared-access",shortDescription:$localize`Access Grant`,isMandatory:!0},{name:"storj-bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:!0},{name:"storj-folder",type:"Path",shortDescription:$localize`Path on server`,doubleSlash:p},{name:"storj-satellite",shortDescription:$localize`Satellite`,type:"Enumeration",loadOptions:e=>e.get(g).getStorjSatellites(),isMandatory:!0}],mapper:{to:e=>{let t={"storj-auth-method":"Acccess grant"};return`storj://storj.io/config${b([...Object.entries(e.advanced),...Object.entries(e.dynamic),...Object.entries(t)])}`},from:(e,t,o)=>{let r=s(e,t);return delete r.advanced["storj-auth-method"],a({destinationType:e},r)}}},{key:"storj",customKey:"storjApiKey",displayName:$localize`Storj API Key`,description:$localize`Store backups in Storj API Key.`,dynamicFields:[{name:"storj-satellite",shortDescription:$localize`Satellite`,type:"Enumeration",loadOptions:e=>e.get(g).getStorjSatellites(),isMandatory:!0},{name:"storj-api-key",shortDescription:$localize`API Key`,isMandatory:!0},{name:"storj-secret",shortDescription:$localize`Secret`,isMandatory:!0},{name:"storj-bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:!0},{name:"storj-folder",type:"Path",shortDescription:$localize`Path on server`,doubleSlash:p}],mapper:{to:e=>{let t={"storj-auth-method":"API key"};return`storj://storj.io/config${b([...Object.entries(e.advanced),...Object.entries(e.dynamic),...Object.entries(t)])}`},from:(e,t,o)=>{let r=s(e,t);return delete r.advanced["storj-auth-method"],a({destinationType:e},r)}}},{key:"aliyunoss",displayName:$localize`Aliyun OSS`,description:$localize`Store backups in Aliyun OSS`,customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,formElement:e=>i.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in bucket`,longDescription:$localize`Path in bucket`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"oss-endpoint",isMandatory:!0},{name:"oss-access-key-id",isMandatory:!0},{name:"oss-access-key-secret",isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom,r=D(a({},e),{advanced:D(a({},e.advanced),{"oss-bucket-name":t})});return c(r,null,null,o)},from:(e,t,o)=>{let r=s(e,t),n=r.advanced["oss-bucket-name"];return delete r.advanced["oss-bucket-name"],a({destinationType:e,custom:{path:d(t),bucket:n}},r)}}}],le={".amazonaws.com":"Amazon S3",".mycloudyplace.com":"MyCloudyPlace S3",".impossibleapi.net":"Impossible Cloud S3",".scw.cloud":"Scaleway S3",".hosteurope.de":"Hosteurope S3",".dunkel.de":"Dunkel S3",".dreamhost.com":"DreamHost S3",".dincloud.com":"dinCloud S3",".polisystems.ch":"Poli Systems S3",".softlayer.net":"IBM COS (S3)",".storadera.com":"Storadera S3",".wasabisys.com":"Wasabi S3",".infomaniak.com":"Infomaniak S3",".infomaniak.cloud":"Infomaniak S3",".sakurastorage.jp":"\u3055\u304F\u3089\u306E\u30AF\u30E9\u30A6\u30C9 S3",".lyvecloud.seagate.com":"Seagate Lyve S3",".digitaloceanspaces.com":"DigitalOcean S3",".backblazeb2.com":"Backblaze B2 S3",".cloudian.com":"Cloudian S3",".min.io":"MinIO S3",".linodeobjects.com":"Linode S3",".bunnycdn.com":"BunnyCDN S3",".azure.com":"Microsoft Azure S3",".googleapis.com":"Google Cloud Storage S3",".ibm.com":"IBM Cloud S3",".oracle.com":"Oracle Cloud S3",".cloudflare.com":"Cloudflare S3",".alibaba.com":"Alibaba Cloud S3",".huawei.com":"Huawei Cloud S3",".tencent.com":"Tencent Cloud S3",".baidu.com":"Baidu Cloud S3",".jd.com":"JD Cloud S3",".ucloud.cn":"UCloud S3",".qiniu.com":"Qiniu Cloud S3",".aliyuncs.com":"Aliyun S3",".tcloud.com":"TCloud S3",".tencentcloudapi.com":"Tencent Cloud S3"};function c(e,t,o,r){return v(e.destinationType??"file",t,o,r,[...Object.entries(e.advanced),...Object.entries(e.dynamic)])}function v(e,t,o,r,n){let l=b(n),u=encodeURIComponent(B(t)),y=u==""?"":u+j(o),f=r??"",$=f.slice(1).startsWith(":\\")&&e=="file"?"file:///":`${e}://`,O=M(y,I(f));return`${$}${O}${l}`}function N(e){return e==null||e===""?"":e.startsWith("/")?e.substring(1):e}function M(...e){if(e.length===0)return"";if(e.length===1)return e[0]??"";let t="";for(let o of e)o==null||o===""||(t+=t.endsWith("/")||t==""?o:"/"+o);return t}function I(e){return e.split("/").map(encodeURIComponent).join("/")}function d(e){if(e==null||e==="")return"";if(typeof e=="string")try{e=new URL(e)}catch{return""}return decodeURIComponent(e.hostname??"")+decodeURIComponent(e.pathname=="/"?"":e.pathname??"")}function B(e){return e==null||e===""?"":e.endsWith("/")?e.substring(0,e.length-1):e}function j(e){return e==null||e===""?"":":"+e.toString()}function P(e){return V.find(o=>o.key===e||o.customKey===e)??V.find(o=>`${o.key}s`===e)??null??a({key:e,displayName:e},w)}function m(e){return{server:decodeURIComponent(e.hostname),port:e.port,path:N(decodeURIComponent(e.pathname))}}function s(e,t){let o={},r={},n=P(e);return t.searchParams.forEach((l,u)=>{n?.dynamicFields?.some(f=>f===u||f?.name===u)?r[u]=decodeURIComponent(l):o[u]=decodeURIComponent(l)}),{advanced:o,dynamic:r}}function b(e,t=!1){let o=e.map(([n,l])=>`${n}=${l?encodeURIComponent(l.toString()):""}`).join("&");return o?(t?"":"?")+o:""}function me(e){let t=e.destinationType??"";return P(t)?.mapper.to(e)??""}function de(e){let t=URL.canParse(e),o=e.split("://")[0],r=e.split("://")[1],n=o==="file"?"http://dummy":"http://"+r;if(!r)return null;if(r.startsWith("%")&&o==="file")return P(o).mapper.from(o,new URL("http://localhost"),e);let l=P(o),u="";`${l.key}s`===o&&(u+=n.indexOf("?")===-1?"?":"&",u+="use-ssl=true",e=l.key+e.substring(o.length));try{let y=new URL(n+u);if(y.host==="undefined")return null;let f=r.split("?")[0].split("/")[0],G=!isNaN(Number(y.host.replaceAll(".",""))),$=f.split("."),O=$.length===4&&$.every(F=>F.length&&F.length<=3&&!isNaN(Number(F))&&parseInt(F)<=255);return G&&!O?null:l.mapper.from(l.key,y,e)}catch(y){return console.error("Error while parsing target path",y),null}}export{P as a,me as b,de as c,le as d};
|
package/chunk-YHNIGBHB.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{a as it}from"./chunk-6GC5VKTI.js";import{a as tt,b as nt}from"./chunk-CZLLEVMJ.js";import{a as X,b as Ze,c as Je}from"./chunk-XLE2TW65.js";import{h as et}from"./chunk-36RDZAZ4.js";import{a as Ye}from"./chunk-QY6E755W.js";import{a as k}from"./chunk-GUH5TMOS.js";import{a as K}from"./chunk-66BSPEOQ.js";import{a as qe,c as ue,e as Ce,i as ge,k as We,s as fe,t as Qe}from"./chunk-USU2EHJV.js";import{A as Ue,C as He,a as pe,e as ke,g as me,l as Re,o as Be,p as ze,t as Ke,z as Xe}from"./chunk-WRNQOX5R.js";import{h as je}from"./chunk-J3BBLPAD.js";import{ea as Ge}from"./chunk-WJPLJKPQ.js";import{Ab as _,Ac as de,Bb as d,Cb as z,Cc as ce,Gb as re,Hb as W,Hc as J,Ib as le,Jb as N,Oc as P,Pc as Y,Qb as Q,Ra as l,Rb as Z,Sb as De,Uc as ee,V as oe,Wb as x,Xc as be,Yb as s,Zb as we,_ as M,_b as Ae,ac as Fe,bb as ae,bc as Oe,cc as Me,ea as T,f as ie,fa as S,gb as G,gc as B,ia as ye,ic as se,lc as p,nc as F,oa as b,oc as _e,qc as Ve,rc as ve,sc as Le,tc as L,ub as g,uc as A,vb as f,vc as c,wb as H,xb as j,yb as q,yc as Pe,zb as m,zc as $e}from"./chunk-QDFCX6XE.js";import{a as O,b as ne}from"./chunk-EUDKD2JW.js";var ot=class n{#t=M(je);#e=M(ke);#n=M(K);testDestination(t,e,o,i){return this.#n.hasV2TestOperations()?this.testDestinationv2(t,e,o,i):this.testDestinationv1(t,e,o,i)}testDestinationv2(t,e,o,i){return new ie(a=>{this.#t.postApiV2DestinationTest({requestBody:{DestinationUrl:t,AutoCreate:!1,Options:null}}).subscribe({next:r=>{if(r.Success){this.emitSuccessV2(a,t,e,r);return}this.handleGenericError(a,t,e,r.Error??"Unknown error",i)},error:r=>{let u=r?.error?.body;if(u?.Data?.FolderExists===!1||u?.StatusCode==="missing-folder"){o?this.handleMissingFolder(a,t,e):this.handleGenericError(a,t,e,$localize`The remote destination folder does not exist.`,i);return}if(u?.Data?.HostCertificate){this.handleMissingCertificate(a,t,e,u.Data?.HostCertificate);return}if(u?.Data?.ReportedHostKey){this.handleIncorrectKey(a,t,e,u.Data.ReportedHostKey,u.Data.AcceptedHostKey??null);return}this.handleGenericError(a,t,e,r?.message??"Unknown error",i)}})})}testDestinationv1(t,e,o,i){return new ie(a=>{this.#t.postApiV1RemoteoperationTest({requestBody:{path:t}}).subscribe({next:r=>{a.next({action:"success",targetUrl:t,testAgain:!1,destinationIndex:e}),a.complete()},error:r=>{this.handleDestinationErrorv1(r.message,t,e,o,i).subscribe(u=>{a.next(u)})}})})}handleMissingFolder(t,e,o){this.#e.open(k,{data:{title:$localize`Create folder`,message:$localize`The remote destination folder does not exist, do you want to create it?`,confirmText:$localize`Create folder`,cancelText:$localize`Cancel`},closed:i=>{if(!i){this.reportNoAction(t,e,o,$localize`The remote folder does not exist.`);return}this.#n.hasV2TestOperations()?this.#t.postApiV2DestinationTest({requestBody:{DestinationUrl:e,AutoCreate:!0,Options:null}}).subscribe({next:a=>{if(a.Success){this.emitSuccessV2(t,e,o,a);return}else this.handleFolderCreateFailure(t,e,o,a.Error??$localize`Unknown error`)},error:a=>{this.handleFolderCreateFailure(t,e,o,a.message??$localize`Unknown error`)}}):this.#t.postApiV1RemoteoperationCreate({requestBody:{path:e}}).subscribe({next:()=>{this.handleFolderCreated(t,e,o)},error:a=>{this.handleFolderCreateFailure(t,e,o,a.message??$localize`Unknown error`)}})}})}handleFolderCreateFailure(t,e,o,i){this.#e.open(k,{data:{title:$localize`Error creating folder`,message:$localize`The remote destination folder could not be created. ${i}`,confirmText:$localize`OK`,cancelText:null},closed:()=>{t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:o}),t.complete()}})}emitSuccessV2(t,e,o,i){t.next({action:"success",targetUrl:e,testAgain:!1,destinationIndex:o,anyFilesFound:!i.Data?.FolderIsEmpty,containsBackup:i.Data?.FolderContainsBackupFiles??void 0,containsEncryptedBackupFiles:i.Data?.FolderContainsEncryptedBackupFiles??void 0}),t.complete()}handleFolderCreated(t,e,o){this.#e.open(k,{data:{title:$localize`Folder created`,message:$localize`The remote destination folder was created successfully.`,confirmText:$localize`OK`,cancelText:null},closed:()=>{t.next({action:"test-again",targetUrl:e,testAgain:!0,destinationIndex:o}),t.complete()}})}reportNoAction(t,e,o,i){t.next({action:"generic-error",targetUrl:e,errorMessage:i,testAgain:!1,destinationIndex:o}),t.complete()}handleMissingCertificate(t,e,o,i){this.#e.open(k,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:$localize`The server is using a certificate that is not trusted.
|
|
2
|
-
If this is a self-signed certificate, you can choose to trust this certificate.
|
|
3
|
-
The server reported the certificate hash: ${i}`,confirmText:$localize`Trust the certificate`,cancelText:$localize`Cancel`},closed:a=>{if(!a){this.reportNoAction(t,e,o,$localize`The server certificate is not trusted.`);return}t.next({action:"trust-cert",targetUrl:e,testAgain:!0,certData:i,destinationIndex:o}),t.complete()}})}handleIncorrectKey(t,e,o,i,a){a?this.#e.open(k,{maxWidth:"500px",data:{title:$localize`The host key has changed`,message:$localize`The host key has changed, please check with the server administrator if this is correct,
|
|
4
|
-
otherwise you could be the victim of a MAN-IN-THE-MIDDLE attack.
|
|
5
|
-
Do you want to REPLACE your CURRENT host key ${a}
|
|
6
|
-
with the REPORTED host key: ${i}?`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:r=>{if(!r){this.reportNoAction(t,e,o,$localize`The host key was not approved.`);return}t.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:i,destinationIndex:o}),t.complete()}}):this.#e.open(k,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:$localize`No certificate was specified, please verify that the reported host key is correct: ${i}`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:r=>{if(!r){this.reportNoAction(t,e,o,$localize`The host key was not approved.`);return}t.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:i,destinationIndex:o}),t.complete()}})}handleGenericError(t,e,o,i,a){function r(){t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:o,errorMessage:i}),t.complete()}if(a){r();return}this.#e.open(k,{maxWidth:"500px",data:{title:$localize`Test connection failed`,message:i,cancelText:$localize`OK`},closed:u=>r()})}handleDestinationErrorv1(t,e,o,i,a){return new ie(r=>{if(t==="missing-folder"){i?this.handleMissingFolder(r,e,o):this.handleGenericError(r,e,o,$localize`The remote destination folder does not exist.`,a);return}if(t.startsWith("incorrect-cert:")){let u=t.split("incorrect-cert:")[1];this.handleMissingCertificate(r,e,o,u);return}if(t.startsWith("incorrect-host-key:")){let u=t.split('incorrect-host-key:"')[1].split('",')[0],E=t.split('accepted-host-key:"')[1].split('",')[0];this.handleIncorrectKey(r,e,o,u,E);return}this.handleGenericError(r,e,o,t,a)})}static \u0275fac=function(e){return new(e||n)};static \u0275prov=oe({token:n,factory:n.\u0275fac,providedIn:"root"})};var Te=class n{#t=M(K);supportedDestinationTypes=P(()=>this.#t.backendModules().map(t=>{if(!t?.Key)return null;let e=X(t.Key);return e.isDefaultEntry===!0?ne(O({},e),{displayName:t.DisplayName||e.displayName||t.Key,description:t.Description||e.description||""}):e}).filter(t=>t!==null));destinationTypeOptions=P(()=>this.supportedDestinationTypes().map(t=>({key:t.customKey??t.key,customKey:t.customKey??null,displayName:t.displayName,description:t.description})));backendModules=P(()=>this.#t.backendModules()??[]);static \u0275fac=function(e){return new(e||n)};static \u0275prov=oe({token:n,factory:n.\u0275fac,providedIn:"root"})};var st=["fileInput"],_t=[[["label"]]],dt=["label"],Se=class n{customId=ee();content=b("");readonly=b(!1);placeholder=ee("Drop a file here or use the browse button");fileInputRef;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(),!1}onChange=()=>{};onTouched=()=>{};onChangeEffect=Y(()=>{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||n)};static \u0275cmp=ae({type:n,selectors:[["app-file-drop-textarea"]],viewQuery:function(e,o){if(e&1&&Fe(st,5),e&2){let i;Oe(i=Me())&&(o.fileInputRef=i.first)}},inputs:{customId:[1,"customId"],placeholder:[1,"placeholder"]},features:[Pe([{provide:qe,useExisting:n,multi:!0}])],ngContentSelectors:dt,decls:9,vars:3,consts:()=>{let t;return t=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:upload${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["fileInput",""],t,[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,o){if(e&1){let i=N();we(_t),Ae(0,0,["ngProjectAs","label",5,["label"]]),_(1,"div",2)(2,"button",3),x("click",function(){return T(i),S(o.triggerBrowse())}),Q(3,1),z(4,"sh-icon"),Z(),d()(),_(5,"div",4),x("drop",function(r){return T(i),S(o.onFileDrop(r))})("dragover",function(r){return T(i),S(o.onDragOver(r))}),_(6,"textarea",5),Le("ngModelChange",function(r){return T(i),ve(o.content,r)||(o.content=r),S(r)}),d()(),_(7,"input",6,0),x("change",function(r){return T(i),S(o.onFileSelected(r))}),d()}e&2&&(l(6),m("placeholder",o.placeholder()),Ve("ngModel",o.content),m("disabled",o.readonly()))},dependencies:[fe,ue,Ce,ge,pe,me],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}'],changeDetection:0})};var ct=(n,t,e,o)=>({index:n,fieldGroup:"custom",formView:t,destinationType:e,oauthField:o}),Ie=n=>({$implicit:n}),pt=(n,t,e,o)=>({index:n,fieldGroup:"dynamic",formView:t,destinationType:e,oauthField:o}),mt=()=>({updateOn:"blur"}),ut=(n,t,e,o)=>({index:n,formView:t,fieldGroup:"advanced",destinationType:e,oauthField:o});function Ct(n,t){n&1&&le(0)}function gt(n,t){if(n&1&&G(0,Ct,1,0,"ng-container",13),n&2){let e=t.$implicit,o=t.$index;s();let i=B(15);s();let a=c(0),r=c(1);m("ngTemplateOutlet",i)("ngTemplateOutletContext",de(7,Ie,ce(2,ct,o,e,a,r.oauthField)))}}function ft(n,t){n&1&&le(0)}function Tt(n,t){if(n&1&&G(0,ft,1,0,"ng-container",13),n&2){let e=t.$implicit,o=t.$index;s();let i=B(15);s();let a=c(0),r=c(1);m("ngTemplateOutlet",i)("ngTemplateOutletContext",de(7,Ie,ce(2,pt,o,e,a,r.oauthField)))}}function St(n,t){if(n&1){let e=N();_(0,"button",14),x("click",function(){T(e);let i=s(2);return S(i.showTextArea.set(!1))}),Q(1,6),z(2,"sh-icon"),Z(),d()}}function ht(n,t){if(n&1){let e=N();_(0,"button",21,1),x("click",function(){let i=T(e).$implicit,a=s(3);return S(a.addAdvancedOption(i))}),p(2),d()}if(n&2){let e=t.$implicit;l(2),F(" ",e.name," ")}}function xt(n,t){if(n&1){let e=N();_(0,"div",11)(1,"sh-menu",15)(2,"button",16),Q(3,7),z(4,"sh-icon"),Z(),d(),re(5,17),j(6,ht,3,1,"button",18,H),W(),d(),_(8,"sh-menu")(9,"button",19)(10,"sh-icon"),p(11,"dots-three-vertical"),d()(),re(12,17),_(13,"button",20),x("click",function(){T(e);let i=s(2);return S(i.showTextArea.set(!0))}),_(14,"sh-icon"),p(15,"link"),d(),p(16," Edit contents as text "),d(),W(),d()()}if(n&2){s();let e=c(9);l(),m("searchable",!0),l(),m("disabled",e.length===0),l(4),q(e)}}function Nt(n,t){if(n&1){let e=N();_(0,"textarea",22),x("ngModelChange",function(i){T(e);let a=s(2);return S(a.updateSettingsFromText(i))}),d()}if(n&2){let e=s(2);m("ngModel",e.settingsAsText())("ngModelOptions",$e(2,mt))}}function Et(n,t){n&1&&le(0)}function It(n,t){if(n&1&&G(0,Et,1,0,"ng-container",13),n&2){let e=t.$implicit,o=t.$index;s(2);let i=B(15),a=s(),r=c(0),u=c(1),E=a.getFormView("advanced",e)??a.getDefaultFormView(e);m("ngTemplateOutlet",i)("ngTemplateOutletContext",de(7,Ie,ce(2,ut,o,E,r,u.oauthField)))}}function yt(n,t){if(n&1&&j(0,It,1,9,"ng-container",null,H),n&2){let e=s(2);q(e.advancedFormFieldNames())}}function Dt(n,t){n&1&&(_(0,"sup",31),p(1,"*"),d())}function wt(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("shTooltip",e.formView.longDescription)}}function At(n,t){if(n&1){let e=N();_(0,"app-file-tree",24)(1,"label",30),g(2,Dt,2,0,"sup",31),p(3),g(4,wt,2,1,"sh-icon",32),d(),_(5,"input",33),x("ngModelChange",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d()()}if(n&2){let e=s().$implicit,o=c(1),i=c(2),a=c(3),r=c(4),u=c(5);m("startingPath",a)("accepts",e.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),m("for",u),l(),f(e.formView.isMandatory&&r?2:-1),l(),F(" ",o," "),l(),f(e.formView.longDescription?4:-1),l(),m("id",u)("ngModel",i)}}function Ft(n,t){n&1&&(_(0,"sup",34),p(1,"*"),d())}function Ot(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("shTooltip",e.formView.longDescription)}}function Mt(n,t){if(n&1){let e=N();_(0,"app-file-tree",25)(1,"label",30),g(2,Ft,2,0,"sup",34),p(3),g(4,Ot,2,1,"sh-icon",32),d(),_(5,"input",33),x("ngModelChange",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d()()}if(n&2){let e=s().$implicit,o=c(1),i=c(2),a=c(3),r=c(4),u=c(5);m("hideShortcuts",!0)("enableCreateFolder",!0)("startingPath",a),l(),m("for",u),l(),f(e.formView.isMandatory&&r?2:-1),l(),F(" ",o," "),l(),f(e.formView.longDescription?4:-1),l(),m("id",u)("ngModel",i)}}function Vt(n,t){n&1&&(_(0,"sup",35),p(1,"*"),d())}function vt(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("shTooltip",e.formView.longDescription)}}function Lt(n,t){n&1&&(_(0,"sh-icon",36),p(1," warning "),d())}function Pt(n,t){n&1&&(_(0,"sh-icon",37),p(1,"x-circle"),d())}function $t(n,t){n&1&&(_(0,"sh-icon",38),p(1,"warning"),d())}function bt(n,t){if(n&1&&(_(0,"sh-icon",42),p(1," link "),d()),n&2){s();let e=c(9),o=c(10);se("error",e&&o==="error")("warn",e&&o==="warning"),m("shTooltip",e)}}function Gt(n,t){n&1&&(_(0,"sh-icon",41),p(1,"envelope"),d())}function kt(n,t){n&1&&(_(0,"sh-icon",41),p(1,"hard-drives"),d())}function Rt(n,t){n&1&&(_(0,"sh-icon",41),p(1,"jar"),d())}function Bt(n,t){n&1&&(_(0,"sh-icon",41),p(1,"textbox"),d())}function zt(n,t){if(n&1){let e=N();_(0,"sh-form-field")(1,"label",30),g(2,Vt,2,0,"sup",35),p(3),g(4,vt,2,1,"sh-icon",32),g(5,Lt,2,0,"sh-icon",36),g(6,Pt,2,0,"sh-icon",37),g(7,$t,2,0,"sh-icon",38),d(),_(8,"input",39),x("keydown",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.onKeyDown(a.fieldGroup,a.formView.name,a.formView.type,i))})("ngModelChange",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d(),L(9)(10),g(11,bt,2,5,"sh-icon",40)(12,Gt,2,0,"sh-icon",41)(13,kt,2,0,"sh-icon",41)(14,Rt,2,0,"sh-icon",41)(15,Bt,2,0,"sh-icon",41),d()}if(n&2){let e=s().$implicit,o=c(1),i=c(2),a=c(3),r=c(4),u=c(5),E=s(2);l(),m("for",u),l(),f(e.formView.isMandatory&&r?2:-1),l(),F(" ",o," "),l(),f(e.formView.longDescription?4:-1),l(),f(r&&e.formView.type==="Path"?5:-1),l(),f(e.formView.type=="Hostname"&&!r&&!E.isValidHostname(a)?6:-1),l(),f(e.formView.type=="Bucketname"&&!r&&!E.isValidBucketname(a)?7:-1),l(),m("type",e.formView.type==="Email"?"email":"text")("id",u)("ngModel",i);let V=a,w=E.hasLeadingSlash(V??"");l(),A(w&&(e.formView.doubleSlash==null?null:e.formView.doubleSlash.message)),l(),A(e.formView.doubleSlash==null?null:e.formView.doubleSlash.type),l(),f(e.formView.type==="Path"?11:e.formView.type==="Email"?12:e.formView.type==="Hostname"?13:e.formView.type==="Bucketname"?14:15)}}function Kt(n,t){n&1&&(_(0,"sup",43),p(1,"*"),d())}function Xt(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("shTooltip",e.formView.longDescription)}}function Ut(n,t){if(n&1){let e=N();_(0,"span",47),x("click",function(){T(e);let i=s(2).$implicit,a=s(2);return S(a.oauthStartTokenCreation(i.destinationType,i.fieldGroup,i.formView.name,i.formView.oauthVersion))}),p(1," AuthID "),d()}}function Ht(n,t){n&1&&(_(0,"sh-icon",41),p(1,"password"),d())}function jt(n,t){if(n&1){let e=N();_(0,"sh-icon",48),x("click",function(){T(e);let i=s(2).$implicit;return S(i.formView.showPassword=!i.formView.showPassword)}),p(1," eye "),d()}}function qt(n,t){if(n&1){let e=N();_(0,"sh-icon",48),x("click",function(){T(e);let i=s(2).$implicit;return S(i.formView.showPassword=!i.formView.showPassword)}),p(1," eye-slash "),d()}}function Wt(n,t){if(n&1){let e=N();_(0,"sh-form-field")(1,"label",30),g(2,Kt,2,0,"sup",43),p(3),g(4,Xt,2,1,"sh-icon",32),d(),_(5,"input",44),x("ngModelChange",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d(),g(6,Ut,2,0,"span",45)(7,Ht,2,0,"sh-icon",41),g(8,jt,2,0,"sh-icon",46)(9,qt,2,0,"sh-icon",46),d()}if(n&2){let e=s().$implicit,o=c(1),i=c(2),a=c(4),r=c(5);l(),m("for",r),l(),f(e.formView.isMandatory&&a?2:-1),l(),F(" ",o," "),l(),f(e.formView.longDescription?4:-1),l(),m("type",e.formView.showPassword?"text":"password")("id",r)("ngModel",i),l(),f(e.oauthField===e.formView.name?6:7),l(2),f(e.formView.showPassword?8:9)}}function Qt(n,t){n&1&&(_(0,"sup",50),p(1,"*"),d())}function Zt(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(3).$implicit;m("shTooltip",e.formView.longDescription)}}function Jt(n,t){if(n&1&&p(0),n&2){let e=t.$implicit;_e(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function Yt(n,t){if(n&1){let e=N();_(0,"sh-select",49)(1,"label",30),g(2,Qt,2,0,"sup",50),p(3),g(4,Zt,2,1,"sh-icon",32),d(),_(5,"input",33),x("ngModelChange",function(i){T(e);let a=s(2).$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d()(),G(6,Jt,1,2,"ng-template",null,2,J)}if(n&2){let e=B(7);s();let o=c(0),i=s().$implicit,a=c(1),r=c(2),u=c(4),E=c(5);m("options",o)("isClearable",!1)("optionTemplate",e),l(),m("for",E),l(),f(i.formView.isMandatory&&u?2:-1),l(),F(" ",a," "),l(),f(i.formView.longDescription?4:-1),l(),m("id",E)("ngModel",r)}}function en(n,t){if(n&1&&(L(0),g(1,Yt,8,9)),n&2){let e=s().$implicit,o=A(s(2).mapOptions(e.formView));l(),f(o?1:-1)}}function tn(n,t){n&1&&(_(0,"sup",53),p(1,"*"),d())}function nn(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(3).$implicit;m("shTooltip",e.formView.longDescription)}}function on(n,t){if(n&1&&p(0),n&2){let e=t.$implicit;_e(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function an(n,t){if(n&1){let e=N();_(0,"sh-select",52)(1,"label",30),g(2,tn,2,0,"sup",53),p(3),g(4,nn,2,1,"sh-icon",32),d(),_(5,"input",33),x("ngModelChange",function(i){T(e);let a=s(2).$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d()(),G(6,on,1,2,"ng-template",null,3,J)}if(n&2){let e=B(7);s();let o=c(0),i=s().$implicit,a=c(1),r=c(2),u=c(4),E=c(5);m("options",o)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",e),l(),m("for",E),l(),f(i.formView.isMandatory&&u?2:-1),l(),F(" ",a," "),l(),f(i.formView.longDescription?4:-1),l(),m("id",E)("ngModel",r)}}function rn(n,t){n&1&&z(0,"sh-progress-bar",51)}function ln(n,t){if(n&1&&(L(0),g(1,an,8,10)(2,rn,1,0,"sh-progress-bar",51)),n&2){let e=s().$implicit,o=c(2),i=A(s(2).mapOptionsWithFreeText(e.formView,o));l(),f(i?1:2)}}function sn(n,t){n&1&&(_(0,"sup",55),p(1,"*"),d())}function _n(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("shTooltip",e.formView.longDescription)}}function dn(n,t){if(n&1){let e=N();_(0,"app-size",54),x("ngModelChange",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),_(1,"label",30),g(2,sn,2,0,"sup",55),p(3),g(4,_n,2,1,"sh-icon",32),d()()}if(n&2){let e=s().$implicit,o=c(1),i=c(2),a=c(4),r=c(5);m("inputType",e.Name)("ngModel",i)("customId",r),l(),m("for",r),l(),f(e.formView.isMandatory&&a?2:-1),l(),F(" ",o," "),l(),f(e.formView.longDescription?4:-1)}}function cn(n,t){n&1&&(_(0,"sup",56),p(1,"*"),d())}function pn(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("shTooltip",e.formView.longDescription)}}function mn(n,t){if(n&1){let e=N();_(0,"sh-form-field")(1,"label",30),g(2,cn,2,0,"sup",56),p(3),g(4,pn,2,1,"sh-icon",32),d(),_(5,"input",57),x("ngModelChange",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d(),_(6,"sh-icon",41),p(7,"numpad"),d()()}if(n&2){let e=s().$implicit,o=c(1),i=c(2),a=c(4),r=c(5);l(),m("for",r),l(),f(e.formView.isMandatory&&a?2:-1),l(),F(" ",o," "),l(),f(e.formView.longDescription?4:-1),l(),m("id",r)("ngModel",i)}}function un(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("shTooltip",e.formView.longDescription)}}function Cn(n,t){if(n&1){let e=N();_(0,"sh-toggle",58),x("click",function(){T(e);let i=s().$implicit,a=c(2),r=s(2);return S(r.updateFieldValue(i.fieldGroup,i.formView.name,r.isTrue(a)?"false":"true"))}),_(1,"label",30),p(2),g(3,un,2,1,"sh-icon",32),d()()}if(n&2){let e=s().$implicit,o=c(1),i=c(2),a=c(5),r=s(2);se("active",r.isTrue(i)),l(),m("for",a),l(),F(" ",o," "),l(),f(e.formView.longDescription?3:-1)}}function gn(n,t){n&1&&(_(0,"sup",60),p(1,"*"),d())}function fn(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(3).$implicit;m("shTooltip",e.formView.longDescription)}}function Tn(n,t){if(n&1&&p(0),n&2){let e=t.$implicit;_e(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function Sn(n,t){if(n&1){let e=N();_(0,"sh-select",59)(1,"label",30),g(2,gn,2,0,"sup",60),p(3),g(4,fn,2,1,"sh-icon",32),d(),_(5,"input",61),x("ngModelChange",function(i){T(e);let a=s(2).$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d()(),G(6,Tn,1,2,"ng-template",null,4,J)}if(n&2){let e=B(7);s();let o=c(0),i=s().$implicit,a=c(1),r=c(2),u=c(4),E=c(5);m("options",o)("selectMultiple",!0)("optionTemplate",e),l(),m("for",E),l(),f(i.formView.isMandatory&&u?2:-1),l(),F(" ",a," "),l(),f(i.formView.longDescription?4:-1),l(),m("ngModel",r)}}function hn(n,t){if(n&1&&(L(0),g(1,Sn,8,8)),n&2){let e=s().$implicit,o=A(s(2).mapOptions(e.formView));l(),f(o?1:-1)}}function xn(n,t){n&1&&(_(0,"sup",62),p(1,"*"),d())}function Nn(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("shTooltip",e.formView.longDescription)}}function En(n,t){if(n&1){let e=N();_(0,"app-timespan",54),x("ngModelChange",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),_(1,"label",30),g(2,xn,2,0,"sup",62),p(3),g(4,Nn,2,1,"sh-icon",32),d()()}if(n&2){let e=s().$implicit,o=c(1),i=c(2),a=c(4),r=c(5);m("inputType",e.formView.name)("ngModel",i)("customId",r),l(),m("for",r),l(),f(e.formView.isMandatory&&a?2:-1),l(),F(" ",o," "),l(),f(e.formView.longDescription?4:-1)}}function In(n,t){n&1&&(_(0,"sup",64),p(1,"*"),d())}function yn(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("shTooltip",e.formView.longDescription)}}function Dn(n,t){if(n&1){let e=N();_(0,"app-file-drop-textarea",63),x("ngModelChange",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),_(1,"label"),g(2,In,2,0,"sup",64),p(3),g(4,yn,2,1,"sh-icon",32),d()()}if(n&2){let e=s().$implicit,o=c(2),i=c(4),a=c(5);m("ngModel",o)("customId",a)("placeholder",e.formView.longDescription),l(2),f(e.formView.isMandatory&&i?2:-1),l(),F(" ",e.formView.shortDescription??e.formView.name," "),l(),f(e.formView.longDescription?4:-1)}}function wn(n,t){if(n&1){let e=N();_(0,"button",65),x("click",function(){T(e);let i=s().$implicit,a=s(2);return S(a.removeAdvancedOption(i.formView.name))}),_(1,"sh-icon"),p(2,"x-circle"),d()()}}function An(n,t){if(n&1&&(_(0,"div",23),L(1)(2)(3)(4)(5),g(6,At,6,12,"app-file-tree",24)(7,Mt,6,9,"app-file-tree",25)(8,zt,16,13,"sh-form-field")(9,Wt,10,9,"sh-form-field")(10,en,2,2)(11,ln,3,2)(12,dn,5,7,"app-size",26)(13,mn,8,6,"sh-form-field")(14,Cn,4,5,"sh-toggle",27)(15,hn,2,2)(16,En,5,7,"app-timespan",26)(17,Dn,5,6,"app-file-drop-textarea",28),g(18,wn,3,0,"button",29),d()),n&2){let e=t.$implicit;s();let o=c(0),i=s();se("single-field",e.fieldGroup!=="advanced"),l(),A(e.formView.shortDescription??e.formView.name),l(),A(i.getFieldGroup(o,e.fieldGroup)[e.formView.name]),l();let a=A(i.getFieldValue(e.fieldGroup,e.formView.name));l(),A((a??"").toString().trim()===""),l(),A("destination-"+e.fieldGroup+"-"+e.index+"-"+(e.asHttpOptions?"http":"other")),l(),f(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"?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:-1),l(12),f(e.fieldGroup==="advanced"?18:-1)}}function Fn(n,t){if(n&1&&(L(0),j(1,gt,1,9,"ng-container",null,H),j(3,Tt,1,9,"ng-container",null,H),_(5,"sh-toggle-card",8),re(6,9)(7),De(8,5),W(),L(9),g(10,St,3,0,"button",10)(11,xt,17,2,"div",11),W(),g(12,Nt,1,3,"textarea",12)(13,yt,2,0),d(),G(14,An,19,9,"ng-template",null,0,J)),n&2){let e=s(),o=c(1);A(e.destinationForm()),l(),q(o.custom),l(2),q(o.dynamic),l(2),m("disallowToggle",!0),l(4),A(e.nonSelectedAdvancedFormViews()),l(),f(e.showTextArea()?10:11),l(2),f(e.showTextArea()?12:13)}}var at=class n{#t=M(et);#e=M(K);#n=M(it);#a=M(Te);injector=M(ye);targetUrl=be.required();useBackupState=ee(!1);#i=null;destinationType=P(()=>{let t=this.targetUrl();if(!t)return null;let e=X(t.split("://")[0]);return this.#i=e?.customKey??e?.key,this.#i});destinationForm=b({custom:{},dynamic:{},advanced:{}});advancedFormFieldNames=P(()=>Object.keys(this.destinationForm().advanced));destinationFormConfig=b(null);showTextArea=b(!1);nonSelectedAdvancedFormViews=P(()=>{let t=this.destinationFormConfig();if(!t)return[];let e=this.advancedFormFieldNames();return t.advanced.filter(o=>e.findIndex(i=>i===o.name)===-1)});destinationTypeEffect=Y(()=>{let t=this.destinationType()??"",e=X(t),o=e?.key,i=this.#a.backendModules().find(I=>I.Key===o)??{Key:t,DisplayName:t,Description:X(t).description,Options:[]};if(!i||!i.Options||!t)return;let a=e&&e.oauthField?e.oauthField:null,r=e&&e.customFields?e.customFields:{},u=e&&e.dynamicFields?e.dynamicFields:[],E=e&&e.advancedFields?e.advancedFields:[],V=e&&e.ignoredAdvancedFields?e.ignoredAdvancedFields:[],w={destinationType:t,oauthField:a,custom:[],dynamic:[],advanced:[]};r&&Object.entries(r).forEach(([I,C],y)=>{let D=C.order??y;w.custom.push(O({order:900+D},C))});for(let I=0;I<i.Options.length;I++){let C=i.Options[I];if(C.Deprecated)continue;let y=u.find(D=>D===C.Name||C.Aliases?.includes(D.name)||D.name===C.Name);if(y){let D=C.Aliases?.indexOf(y.name)??-1,$=C.Aliases&&D>-1?C.Aliases[D]:C.Name,h=y&&typeof y!="string",he=h?y?.defaultValue??C.DefaultValue:C.DefaultValue,xe=h&&y?.order!==void 0?y.order:I,U={name:$,type:C.Type,shortDescription:C.ShortDescription??void 0,longDescription:C.LongDescription??void 0,options:C.ValidValues,order:900+xe},Ne=h?O(O({},U),y):U;w.dynamic.push(Ne)}else{let D=C.Name;if(V.find(te=>te===D))continue;let h=E.find(te=>te===D||te.name===D),he=h&&typeof h!="string",xe=he&&h?.order!==void 0?h.order:I,U={name:D,type:C.Type,shortDescription:C.ShortDescription??void 0,longDescription:C.LongDescription??void 0,options:C.ValidValues,defaultValue:C.DefaultValue,order:900+xe},Ne=he?O(O({},U),h):U;w.advanced.push(Ne)}}w.custom.sort((I,C)=>I.order-C.order),w.dynamic.sort((I,C)=>I.order-C.order),w.advanced.sort((I,C)=>I.order-C.order),this.destinationFormConfig.set(w);let R=this.targetUrl();if(!R)return;let v=Je(R);v&&this.destinationForm.set({custom:v.custom,dynamic:v.dynamic,advanced:v.advanced})});destinationFormEffect=Y(()=>{let t=this.#i,e=this.destinationForm();if(!e||!t)return;let o=Ze({destinationType:t,custom:e.custom,dynamic:e.dynamic,advanced:e.advanced});o&&this.targetUrl.set(o)});getFieldValue(t,e){let i=this.destinationForm()[t][e];return i||null}getFormView(t,e){let i=this.destinationFormConfig()?.[t].find(a=>a.name===e);return i||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("/")??!1}addAdvancedOption(t){let e=this.destinationForm();e.advanced[t.name]=t.defaultValue,this.destinationForm.set(O({},e))}isValidBucketname(t){if(!t)return!1;let e=t.length;return!(e<3||e>63||!/^[a-z0-9.-]+$/.test(t)||!/^[a-z0-9]/.test(t)||!/[a-z0-9]$/.test(t)||/^\d{1,3}(\.\d{1,3}){3}$/.test(t)||/(\.\.)|(\.-)|(-\.)/.test(t))}isValidHostname(t){if(!t||t.length>253)return!1;let e=t.split(".");for(let o of e)if(!o||o.length>63||!/^[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?$/.test(o))return!1;return!0}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!1}onKeyDown(t,e,o,i){if(o==="Hostname"||o==="Bucketname"){if(["Backspace","Delete","ArrowLeft","ArrowRight","Tab","Home","End"].includes(i.key))return;if(i.key=="/"||i.key=="\\"||i.key==":"){i.preventDefault();return}}}updateFieldValue(t,e,o){let i=this.destinationForm();i[t][e]=o,this.destinationForm.set(O({},i))}removeAdvancedOption(t){let e=this.destinationForm();delete e.advanced[t],this.destinationForm.set(O({},e))}mapOptions(t){let e=t.loadOptions;if(e)return e(this.injector)();let o=t.options;return o?o.map(i=>({key:i,value:i})):null}mapOptionsWithFreeText(t,e){let o=this.mapOptions(t);return o?(e&&e.length>0&&(o.find(a=>a.value===e)||o.push({key:e,value:e})),o):null}#o=b(!1);oauthStartTokenCreation(t,e,o,i){this.#o.set(!0);let a=(i??1)==2?this.#e.defaultOAuthUrlV2():this.#e.defaultOAuthUrl(),r=this.#n.serverSettings()?.["--oauth-url"];if(r&&r.length>0&&(a=r),this.useBackupState()){let C=this.#t.mapFormsToSettings().find(y=>y.Name==="--oauth-url")?.Value;C&&C.length>0&&(a=C)}let u=this.destinationForm().advanced["oauth-url"];u&&u.length>0&&(a=u);let E=`${a}?type=${t}`,V=450,w=600,R=screen.width/2-V/2,v=screen.height/2-w/2,I=window.open(E,"_blank","height="+w+",width="+V+",menubar=0,status=0,titlebar=0,toolbar=0,left="+R+",top="+v);return window.addEventListener("message",C=>{let y=C.data.startsWith("authid:"),D=y?C.data.replace("authid:",""):null;y&&(this.destinationForm.update($=>($[e][o]=D,$)),this.#o.set(!1),I?.close())}),!1}settingsAsText=P(()=>{let t=this.destinationForm().advanced;return Object.entries(t).map(([e,o])=>{let i=e??"",a="";return typeof o=="boolean"?a=this.isTrue(o)?"True":"False":(typeof o=="number"||o!=null)&&(a=o.toString()),`${i}=${a}`}).join(`
|
|
7
|
-
`)});updateSettingsFromText(t){if(typeof t!="string")return;let e=t.split(`
|
|
8
|
-
`).map(i=>i.trim()).filter(i=>i.length>0),o={};for(let i of e){let[a,r]=i.split("=").map(u=>u.trim());a&&a.trim().length>0&&r!==void 0&&(o[a]=r)}this.destinationForm.update(i=>ne(O({},i),{advanced:o}))}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ae({type:n,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 o;o=$localize` Add advanced option ${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let i;i=$localize`This field is mandatory`;let a;a=$localize`This field is mandatory`;let r;r=$localize`This field is mandatory`;let u;u=$localize`An empty path means storing data in the initial or root folder, which is not recommended`;let E;E=$localize`Hostname is invalid`;let V;V=$localize`Bucket name is invalid`;let w;w=$localize`This field is mandatory`;let R;R=$localize`This field is mandatory`;let v;v=$localize`This field is mandatory`;let I;I=$localize`This field is mandatory`;let C;C=$localize`This field is mandatory`;let y;y=$localize`This field is mandatory`;let D;D=$localize`This field is mandatory`;let $;return $=$localize`This field is mandatory`,[["fieldTemplate",""],["option",""],["enumOptionTemplate",""],["nonValidatedOptionTemplate",""],["optionTemplate",""],t,e,o,[1,"advanced-options",3,"disallowToggle"],["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"],[3,"hideShortcuts","enableCreateFolder","startingPath"],[3,"inputType","ngModel","customId"],[1,"primary","raised",3,"active"],[3,"ngModel","customId","placeholder"],["shButton","","type","button",1,"outlined"],[3,"for"],["shTooltip",i],[1,"primary",3,"shTooltip"],["type","text",3,"ngModelChange","id","ngModel"],["shTooltip",a],["shTooltip",r],["shTooltip",u,1,"warn"],["shTooltip",E,1,"error"],["shTooltip",V,1,"warn"],[3,"keydown","ngModelChange","type","id","ngModel"],["prefix","",3,"error","warn","shTooltip"],["prefix",""],["prefix","",3,"shTooltip"],["shTooltip",w],["autocomplete","off",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",R],[1,"indeterminate","primary"],["label","key","value","value",3,"options","asFreeText","inlineSearch","optionTemplate"],["shTooltip",v],[3,"ngModelChange","inputType","ngModel","customId"],["shTooltip",I],["shTooltip",C],["type","number",3,"ngModelChange","id","ngModel"],[1,"primary","raised",3,"click"],["key","key","value","value",1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["shTooltip",y],["type","text","id","text",3,"ngModelChange","ngModel"],["shTooltip",D],[3,"ngModelChange","ngModel","customId","placeholder"],["shTooltip",$],["shButton","","type","button",1,"outlined",3,"click"]]},template:function(e,o){if(e&1&&(L(0)(1),g(2,Fn,16,5)),e&2){let i=A(o.destinationType());l();let a=A(o.destinationFormConfig());l(),f(i&&a?2:-1)}},dependencies:[Qe,ue,We,Ce,fe,ge,Ge,Ye,tt,nt,Se,Re,me,pe,Xe,Be,Ke,He,Ue,ze],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-500)}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-500)}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}"],changeDetection:0})};export{ot as a,Te as b,at as c};
|