@duplicati/ngclient 0.0.97 → 0.0.98

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.
Files changed (101) hide show
  1. package/assets/spk.woff2 +0 -0
  2. package/chunk-25TWFWOC.js +1 -0
  3. package/{chunk-G3YJXHRY.js → chunk-2X7AJBJY.js} +1 -1
  4. package/chunk-3CRLUTKZ.js +6 -0
  5. package/{chunk-FWWMGA32.js → chunk-3UY6NFJH.js} +1 -1
  6. package/chunk-3WHFK5U5.js +1 -0
  7. package/chunk-46YKZZQG.js +1 -0
  8. package/{chunk-RIGBDLYY.js → chunk-5CB3EQEQ.js} +1 -1
  9. package/{chunk-HLLAB5VQ.js → chunk-5WXAGJAM.js} +1 -1
  10. package/chunk-64CRTZO6.js +1 -0
  11. package/{chunk-INK3KQF2.js → chunk-6LVF5Q7U.js} +1 -1
  12. package/chunk-7I2OB6KM.js +1 -0
  13. package/{chunk-QX5XWUM2.js → chunk-AKURWKKM.js} +1 -1
  14. package/{chunk-CMXSHXAU.js → chunk-BCSA6WFY.js} +1 -1
  15. package/{chunk-OL4IJVKD.js → chunk-BGEONYDG.js} +1 -1
  16. package/{chunk-LHSJLKCF.js → chunk-BSJ6OMWB.js} +1 -1
  17. package/chunk-BUHABQCR.js +1 -0
  18. package/{chunk-CPOAOTIS.js → chunk-C36EIFZ5.js} +1 -1
  19. package/chunk-C4WJIBJ4.js +1 -0
  20. package/{chunk-YIWL3QAP.js → chunk-E5PZ2WTR.js} +1 -1
  21. package/{chunk-3GK4TNUH.js → chunk-ERQAUCCL.js} +1 -1
  22. package/{chunk-NV2YMSSM.js → chunk-F2L6ATMF.js} +1 -1
  23. package/{chunk-UMUPSIIL.js → chunk-FXQBVRVU.js} +1 -1
  24. package/{chunk-W5YK2JJZ.js → chunk-FXYF7V3T.js} +1 -1
  25. package/chunk-FYKL2LOY.js +2 -0
  26. package/{chunk-BYMCE7VW.js → chunk-GY445E4I.js} +1 -1
  27. package/{chunk-Q6U2NFPI.js → chunk-H5SFF5D7.js} +1 -1
  28. package/chunk-HJXCC47N.js +6 -0
  29. package/{chunk-7NEOVOUN.js → chunk-I5VNBLZK.js} +1 -1
  30. package/{chunk-7XGYQRKR.js → chunk-I6XPZQ7N.js} +1 -1
  31. package/{chunk-4SOUVJR6.js → chunk-IN4ROBMK.js} +1 -1
  32. package/{chunk-XC6KYSRC.js → chunk-J242X4NN.js} +1 -1
  33. package/chunk-KA2H467C.js +1 -0
  34. package/chunk-KCEYQGRU.js +1 -0
  35. package/chunk-KW2XPLTZ.js +1 -0
  36. package/{chunk-QPO2N2OR.js → chunk-L7XUXGTC.js} +1 -1
  37. package/chunk-LDGR7NUE.js +1 -0
  38. package/chunk-LLNGOQQI.js +1 -0
  39. package/{chunk-WBNOGAKJ.js → chunk-NQYRWS7A.js} +1 -1
  40. package/{chunk-NL7QPU6R.js → chunk-OL234C52.js} +1 -1
  41. package/chunk-OLIPUVMA.js +1 -0
  42. package/chunk-ORIEYVVO.js +1 -0
  43. package/{chunk-MJUYFS7O.js → chunk-PQ6MLKHT.js} +1 -1
  44. package/{chunk-6LVGSIUU.js → chunk-PZY4BMZL.js} +1 -1
  45. package/chunk-QQKVF4B4.js +1 -0
  46. package/{chunk-CHZ7TMI7.js → chunk-QZEFXB74.js} +1 -1
  47. package/chunk-R2D3CVSD.js +1 -0
  48. package/chunk-RIM5NXPM.js +1 -0
  49. package/chunk-RKFABCKT.js +2 -0
  50. package/chunk-RNQH6BGW.js +1 -0
  51. package/chunk-RY7J7BHG.js +7 -0
  52. package/chunk-SBHSCERN.js +1 -0
  53. package/{chunk-ILQK4A72.js → chunk-SHATBKDA.js} +1 -1
  54. package/{chunk-HGERKLOF.js → chunk-TDXJNPMY.js} +1 -1
  55. package/{chunk-XBZX6CUW.js → chunk-TGK3F3XP.js} +1 -1
  56. package/chunk-U7C24GJ2.js +1 -0
  57. package/{chunk-OS4AAJLB.js → chunk-UNV7VK4Z.js} +1 -1
  58. package/{chunk-4XPN5ZGE.js → chunk-VDB64BFB.js} +1 -1
  59. package/{chunk-LO4MUZS2.js → chunk-VGNOUHVL.js} +1 -1
  60. package/{chunk-N7UCCMLS.js → chunk-W4U2FPZX.js} +1 -1
  61. package/chunk-W6TPRQIT.js +1 -0
  62. package/{chunk-IHYIT4I3.js → chunk-XA4UOPDI.js} +1 -1
  63. package/chunk-XQCRX6RA.js +2 -0
  64. package/chunk-YQ7U7A2N.js +1 -0
  65. package/{chunk-3YOT5OAB.js → chunk-Z2LU6ASK.js} +1 -1
  66. package/{chunk-S5VSZG5H.js → chunk-Z5KSF3LW.js} +1 -1
  67. package/{chunk-ZOUY24KQ.js → chunk-ZDCJ72UD.js} +1 -1
  68. package/chunk-ZDMCLDW7.js +1 -0
  69. package/{chunk-IAVOZTCR.js → chunk-ZUX7IMN4.js} +1 -1
  70. package/chunk-ZV72G3X3.js +1 -0
  71. package/index.html +2 -2
  72. package/main-F254FFHF.js +1 -0
  73. package/package.json +1 -1
  74. package/styles-GQ3J35VN.css +1 -0
  75. package/chunk-2SYN2ATG.js +0 -1
  76. package/chunk-3WEATDBM.js +0 -1
  77. package/chunk-3WKC2CFC.js +0 -1
  78. package/chunk-4ERW7ITN.js +0 -1
  79. package/chunk-5COOM7FC.js +0 -6
  80. package/chunk-5UL3RRQI.js +0 -2
  81. package/chunk-7EPQLKGD.js +0 -1
  82. package/chunk-7JZ5LA6R.js +0 -1
  83. package/chunk-C2PMOZWR.js +0 -1
  84. package/chunk-CR2UB7UZ.js +0 -1
  85. package/chunk-GI6WORKU.js +0 -1
  86. package/chunk-HE6PHO5B.js +0 -1
  87. package/chunk-HYBV36HG.js +0 -1
  88. package/chunk-L3T52MCL.js +0 -1
  89. package/chunk-MJI6X5KH.js +0 -1
  90. package/chunk-PTC4N7TU.js +0 -7
  91. package/chunk-PUSUA4U7.js +0 -1
  92. package/chunk-Q3FF4WG3.js +0 -1
  93. package/chunk-USGQSK2Z.js +0 -1
  94. package/chunk-V6OHLKTK.js +0 -1
  95. package/chunk-VYKAGJXY.js +0 -1
  96. package/chunk-WNWGY2FM.js +0 -1
  97. package/chunk-ZFE5M6M3.js +0 -6
  98. package/chunk-ZRXUUC26.js +0 -1
  99. package/chunk-ZTJALQGT.js +0 -1
  100. package/main-GMFQCDBZ.js +0 -1
  101. package/styles-IOWRSZHV.css +0 -1
package/assets/spk.woff2 CHANGED
Binary file
@@ -0,0 +1 @@
1
+ import{e as a,f as b}from"./chunk-YQ7U7A2N.js";import"./chunk-J242X4NN.js";import"./chunk-F2L6ATMF.js";import"./chunk-Z2LU6ASK.js";import"./chunk-BCSA6WFY.js";import"./chunk-TGK3F3XP.js";import"./chunk-TDXJNPMY.js";import"./chunk-ZDCJ72UD.js";import"./chunk-AKURWKKM.js";import"./chunk-BSJ6OMWB.js";import"./chunk-W4U2FPZX.js";import"./chunk-NQYRWS7A.js";import"./chunk-2X7AJBJY.js";import"./chunk-3WHFK5U5.js";import"./chunk-64CRTZO6.js";import"./chunk-VDB64BFB.js";import"./chunk-ERQAUCCL.js";import"./chunk-RY7J7BHG.js";import"./chunk-7CGTOI24.js";export{a as createRestoreSelectFilesForm,b as default};
@@ -1 +1 @@
1
- import{Ca as j,Ga as le,X as ae,a as k,b as se,c as ie,e as p,za as ce}from"./chunk-3GK4TNUH.js";import{Aa as X,Ca as w,Da as E,Ea as S,Fa as K,Ga as q,Ha as J,Hc as oe,Ia as Q,Ja as ee,Ka as te,La as ne,Ma as g,O as y,R as f,Ra as M,Ta as re,U as L,W as c,Z as G,la as C,ma as H,ta as Y,ua as N,va as W,wa as b,xa as P}from"./chunk-PTC4N7TU.js";import{a as I,b as z}from"./chunk-7CGTOI24.js";var x=class extends ie{supportsDOMEvents=!0},B=class r extends x{static makeCurrent(){se(new r)}onAndCancel(n,e,t,o){return n.addEventListener(e,t,o),()=>{n.removeEventListener(e,t,o)}}dispatchEvent(n,e){n.dispatchEvent(e)}remove(n){n.remove()}createElement(n,e){return e=e||this.getDefaultDocument(),e.createElement(n)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(n){return n.nodeType===Node.ELEMENT_NODE}isShadowRoot(n){return n instanceof DocumentFragment}getGlobalEventTarget(n,e){return e==="window"?window:e==="document"?n:e==="body"?n.body:null}getBaseHref(n){let e=Se();return e==null?null:we(e)}resetBaseElement(){T=null}getUserAgent(){return window.navigator.userAgent}getCookie(n){return ae(document.cookie,n)}},T=null;function Se(){return T=T||document.querySelector("base"),T?T.getAttribute("href"):null}function we(r){return new URL(r,document.baseURI).pathname}var Me=(()=>{class r{build(){return new XMLHttpRequest}static \u0275fac=function(t){return new(t||r)};static \u0275prov=f({token:r,factory:r.\u0275fac})}return r})(),F=new L(""),me=(()=>{class r{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,t){this._zone=t,e.forEach(o=>{o.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,t,o,s){return this._findPluginFor(t).addEventListener(e,t,o,s)}getZone(){return this._zone}_findPluginFor(e){let t=this._eventNameToPlugin.get(e);if(t)return t;if(t=this._plugins.find(s=>s.supports(e)),!t)throw new y(5101,!1);return this._eventNameToPlugin.set(e,t),t}static \u0275fac=function(t){return new(t||r)(c(F),c(C))};static \u0275prov=f({token:r,factory:r.\u0275fac})}return r})(),_=class{_doc;constructor(n){this._doc=n}manager},A="ng-app-id";function de(r){for(let n of r)n.remove()}function ue(r,n){let e=n.createElement("style");return e.textContent=r,e}function Te(r,n,e,t){let o=r.head?.querySelectorAll(`style[${A}="${n}"],link[${A}="${n}"]`);if(o)for(let s of o)s.removeAttribute(A),s instanceof HTMLLinkElement?t.set(s.href.slice(s.href.lastIndexOf("/")+1),{usage:0,elements:[s]}):s.textContent&&e.set(s.textContent,{usage:0,elements:[s]})}function $(r,n){let e=n.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",r),e}var ge=(()=>{class r{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;isServer;constructor(e,t,o,s={}){this.doc=e,this.appId=t,this.nonce=o,this.isServer=j(s),Te(e,t,this.inline,this.external),this.hosts.add(e.head)}addStyles(e,t){for(let o of e)this.addUsage(o,this.inline,ue);t?.forEach(o=>this.addUsage(o,this.external,$))}removeStyles(e,t){for(let o of e)this.removeUsage(o,this.inline);t?.forEach(o=>this.removeUsage(o,this.external))}addUsage(e,t,o){let s=t.get(e);s?s.usage++:t.set(e,{usage:1,elements:[...this.hosts].map(i=>this.addElement(i,o(e,this.doc)))})}removeUsage(e,t){let o=t.get(e);o&&(o.usage--,o.usage<=0&&(de(o.elements),t.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])de(e);this.hosts.clear()}addHost(e){this.hosts.add(e);for(let[t,{elements:o}]of this.inline)o.push(this.addElement(e,ue(t,this.doc)));for(let[t,{elements:o}]of this.external)o.push(this.addElement(e,$(t,this.doc)))}removeHost(e){this.hosts.delete(e)}addElement(e,t){return this.nonce&&t.setAttribute("nonce",this.nonce),this.isServer&&t.setAttribute(A,this.appId),e.appendChild(t)}static \u0275fac=function(t){return new(t||r)(c(p),c(N),c(P,8),c(b))};static \u0275prov=f({token:r,factory:r.\u0275fac})}return r})(),U={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},Z=/%COMP%/g;var ve="%COMP%",De=`_nghost-${ve}`,Re=`_ngcontent-${ve}`,Ce=!0,be=new L("",{providedIn:"root",factory:()=>Ce});function Ae(r){return Re.replace(Z,r)}function _e(r){return De.replace(Z,r)}function ye(r,n){return n.map(e=>e.replace(Z,r))}var fe=(()=>{class r{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(e,t,o,s,i,a,d,u=null,l=null){this.eventManager=e,this.sharedStylesHost=t,this.appId=o,this.removeStylesOnCompDestroy=s,this.doc=i,this.platformId=a,this.ngZone=d,this.nonce=u,this.tracingService=l,this.platformIsServer=j(a),this.defaultRenderer=new D(e,i,d,this.platformIsServer,this.tracingService)}createRenderer(e,t){if(!e||!t)return this.defaultRenderer;this.platformIsServer&&t.encapsulation===w.ShadowDom&&(t=z(I({},t),{encapsulation:w.Emulated}));let o=this.getOrCreateRenderer(e,t);return o instanceof O?o.applyToHost(e):o instanceof R&&o.applyStyles(),o}getOrCreateRenderer(e,t){let o=this.rendererByCompId,s=o.get(t.id);if(!s){let i=this.doc,a=this.ngZone,d=this.eventManager,u=this.sharedStylesHost,l=this.removeStylesOnCompDestroy,m=this.platformIsServer,h=this.tracingService;switch(t.encapsulation){case w.Emulated:s=new O(d,u,t,this.appId,l,i,a,m,h);break;case w.ShadowDom:return new V(d,u,e,t,i,a,this.nonce,m,h);default:s=new R(d,u,t,l,i,a,m,h);break}o.set(t.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static \u0275fac=function(t){return new(t||r)(c(me),c(ge),c(N),c(be),c(p),c(b),c(C),c(P),c(X,8))};static \u0275prov=f({token:r,factory:r.\u0275fac})}return r})(),D=class{eventManager;doc;ngZone;platformIsServer;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(n,e,t,o,s){this.eventManager=n,this.doc=e,this.ngZone=t,this.platformIsServer=o,this.tracingService=s}destroy(){}destroyNode=null;createElement(n,e){return e?this.doc.createElementNS(U[e]||e,n):this.doc.createElement(n)}createComment(n){return this.doc.createComment(n)}createText(n){return this.doc.createTextNode(n)}appendChild(n,e){(pe(n)?n.content:n).appendChild(e)}insertBefore(n,e,t){n&&(pe(n)?n.content:n).insertBefore(e,t)}removeChild(n,e){e.remove()}selectRootElement(n,e){let t=typeof n=="string"?this.doc.querySelector(n):n;if(!t)throw new y(-5104,!1);return e||(t.textContent=""),t}parentNode(n){return n.parentNode}nextSibling(n){return n.nextSibling}setAttribute(n,e,t,o){if(o){e=o+":"+e;let s=U[o];s?n.setAttributeNS(s,e,t):n.setAttribute(e,t)}else n.setAttribute(e,t)}removeAttribute(n,e,t){if(t){let o=U[t];o?n.removeAttributeNS(o,e):n.removeAttribute(`${t}:${e}`)}else n.removeAttribute(e)}addClass(n,e){n.classList.add(e)}removeClass(n,e){n.classList.remove(e)}setStyle(n,e,t,o){o&(M.DashCase|M.Important)?n.style.setProperty(e,t,o&M.Important?"important":""):n.style[e]=t}removeStyle(n,e,t){t&M.DashCase?n.style.removeProperty(e):n.style[e]=""}setProperty(n,e,t){n!=null&&(n[e]=t)}setValue(n,e){n.nodeValue=e}listen(n,e,t,o){if(typeof n=="string"&&(n=k().getGlobalEventTarget(this.doc,n),!n))throw new Error(`Unsupported event target ${n} for event ${e}`);let s=this.decoratePreventDefault(t);return this.tracingService!==null&&this.tracingService.wrapEventListener&&(s=this.tracingService.wrapEventListener(n,e,s)),this.eventManager.addEventListener(n,e,s,o)}decoratePreventDefault(n){return e=>{if(e==="__ngUnwrap__")return n;(this.platformIsServer?this.ngZone.runGuarded(()=>n(e)):n(e))===!1&&e.preventDefault()}}};function pe(r){return r.tagName==="TEMPLATE"&&r.content!==void 0}var V=class extends D{sharedStylesHost;hostEl;shadowRoot;constructor(n,e,t,o,s,i,a,d,u){super(n,s,i,d,u),this.sharedStylesHost=e,this.hostEl=t,this.shadowRoot=t.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let l=o.styles;l=ye(o.id,l);for(let h of l){let v=document.createElement("style");a&&v.setAttribute("nonce",a),v.textContent=h,this.shadowRoot.appendChild(v)}let m=o.getExternalStyles?.();if(m)for(let h of m){let v=$(h,s);a&&v.setAttribute("nonce",a),this.shadowRoot.appendChild(v)}}nodeOrShadowRoot(n){return n===this.hostEl?this.shadowRoot:n}appendChild(n,e){return super.appendChild(this.nodeOrShadowRoot(n),e)}insertBefore(n,e,t){return super.insertBefore(this.nodeOrShadowRoot(n),e,t)}removeChild(n,e){return super.removeChild(null,e)}parentNode(n){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(n)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},R=class extends D{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(n,e,t,o,s,i,a,d,u){super(n,s,i,a,d),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=o;let l=t.styles;this.styles=u?ye(u,l):l,this.styleUrls=t.getExternalStyles?.(u)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},O=class extends R{contentAttr;hostAttr;constructor(n,e,t,o,s,i,a,d,u){let l=o+"-"+t.id;super(n,e,t,s,i,a,d,u,l),this.contentAttr=Ae(l),this.hostAttr=_e(l)}applyToHost(n){this.applyStyles(),this.setAttribute(n,this.hostAttr,"")}createElement(n,e){let t=super.createElement(n,e);return super.setAttribute(t,this.contentAttr,""),t}},Oe=(()=>{class r extends _{constructor(e){super(e)}supports(e){return!0}addEventListener(e,t,o,s){return e.addEventListener(t,o,s),()=>this.removeEventListener(e,t,o,s)}removeEventListener(e,t,o,s){return e.removeEventListener(t,o,s)}static \u0275fac=function(t){return new(t||r)(c(p))};static \u0275prov=f({token:r,factory:r.\u0275fac})}return r})(),he=["alt","control","meta","shift"],Ie={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Le={alt:r=>r.altKey,control:r=>r.ctrlKey,meta:r=>r.metaKey,shift:r=>r.shiftKey},He=(()=>{class r extends _{constructor(e){super(e)}supports(e){return r.parseEventName(e)!=null}addEventListener(e,t,o,s){let i=r.parseEventName(t),a=r.eventCallback(i.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>k().onAndCancel(e,i.domEventName,a,s))}static parseEventName(e){let t=e.toLowerCase().split("."),o=t.shift();if(t.length===0||!(o==="keydown"||o==="keyup"))return null;let s=r._normalizeKey(t.pop()),i="",a=t.indexOf("code");if(a>-1&&(t.splice(a,1),i="code."),he.forEach(u=>{let l=t.indexOf(u);l>-1&&(t.splice(l,1),i+=u+".")}),i+=s,t.length!=0||s.length===0)return null;let d={};return d.domEventName=o,d.fullKey=i,d}static matchEventFullKeyCode(e,t){let o=Ie[e.key]||e.key,s="";return t.indexOf("code.")>-1&&(o=e.code,s="code."),o==null||!o?!1:(o=o.toLowerCase(),o===" "?o="space":o==="."&&(o="dot"),he.forEach(i=>{if(i!==o){let a=Le[i];a(e)&&(s+=i+".")}}),s+=o,s===t)}static eventCallback(e,t,o){return s=>{r.matchEventFullKeyCode(s,e)&&o.runGuarded(()=>t(s))}}static _normalizeKey(e){return e==="esc"?"escape":e}static \u0275fac=function(t){return new(t||r)(c(p))};static \u0275prov=f({token:r,factory:r.\u0275fac})}return r})();function St(r,n){return oe(I({rootComponent:r},Ne(n)))}function Ne(r){return{appProviders:[...xe,...r?.providers??[]],platformProviders:Ue}}function Pe(){B.makeCurrent()}function ke(){return new H}function je(){return Y(document),document}var Ue=[{provide:b,useValue:ce},{provide:W,useValue:Pe,multi:!0},{provide:p,useFactory:je,deps:[]}];var xe=[{provide:G,useValue:"root"},{provide:H,useFactory:ke,deps:[]},{provide:F,useClass:Oe,multi:!0,deps:[p]},{provide:F,useClass:He,multi:!0,deps:[p]},fe,ge,me,{provide:re,useExisting:fe},{provide:le,useClass:Me,deps:[]},[]];var wt=(()=>{class r{_doc;constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static \u0275fac=function(t){return new(t||r)(c(p))};static \u0275prov=f({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var Be=(()=>{class r{static \u0275fac=function(t){return new(t||r)};static \u0275prov=f({token:r,factory:function(t){let o=null;return t?o=new(t||r):o=c(Fe),o},providedIn:"root"})}return r})(),Fe=(()=>{class r extends Be{_doc;constructor(e){super(),this._doc=e}sanitize(e,t){if(t==null)return null;switch(e){case g.NONE:return t;case g.HTML:return S(t,"HTML")?E(t):ne(this._doc,String(t)).toString();case g.STYLE:return S(t,"Style")?E(t):t;case g.SCRIPT:if(S(t,"Script"))return E(t);throw new y(5200,!1);case g.URL:return S(t,"URL")?E(t):te(String(t));case g.RESOURCE_URL:if(S(t,"ResourceURL"))return E(t);throw new y(5201,!1);default:throw new y(5202,!1)}}bypassSecurityTrustHtml(e){return K(e)}bypassSecurityTrustStyle(e){return q(e)}bypassSecurityTrustScript(e){return J(e)}bypassSecurityTrustUrl(e){return Q(e)}bypassSecurityTrustResourceUrl(e){return ee(e)}static \u0275fac=function(t){return new(t||r)(c(p))};static \u0275prov=f({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{St as a,wt as b,Be as c};
1
+ import{Ca as j,Ga as le,X as ae,a as k,b as se,c as ie,e as p,za as ce}from"./chunk-ERQAUCCL.js";import{Aa as X,Ca as w,Da as E,Ea as S,Fa as K,Ga as q,Ha as J,Hc as oe,Ia as Q,Ja as ee,Ka as te,La as ne,Ma as g,O as y,R as f,Sa as M,U as L,Ua as re,W as c,Z as G,la as C,ma as H,ta as Y,ua as N,va as W,wa as b,xa as P}from"./chunk-RY7J7BHG.js";import{a as I,b as z}from"./chunk-7CGTOI24.js";var x=class extends ie{supportsDOMEvents=!0},B=class r extends x{static makeCurrent(){se(new r)}onAndCancel(n,e,t,o){return n.addEventListener(e,t,o),()=>{n.removeEventListener(e,t,o)}}dispatchEvent(n,e){n.dispatchEvent(e)}remove(n){n.remove()}createElement(n,e){return e=e||this.getDefaultDocument(),e.createElement(n)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(n){return n.nodeType===Node.ELEMENT_NODE}isShadowRoot(n){return n instanceof DocumentFragment}getGlobalEventTarget(n,e){return e==="window"?window:e==="document"?n:e==="body"?n.body:null}getBaseHref(n){let e=Se();return e==null?null:we(e)}resetBaseElement(){T=null}getUserAgent(){return window.navigator.userAgent}getCookie(n){return ae(document.cookie,n)}},T=null;function Se(){return T=T||document.querySelector("base"),T?T.getAttribute("href"):null}function we(r){return new URL(r,document.baseURI).pathname}var Me=(()=>{class r{build(){return new XMLHttpRequest}static \u0275fac=function(t){return new(t||r)};static \u0275prov=f({token:r,factory:r.\u0275fac})}return r})(),F=new L(""),me=(()=>{class r{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,t){this._zone=t,e.forEach(o=>{o.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,t,o,s){return this._findPluginFor(t).addEventListener(e,t,o,s)}getZone(){return this._zone}_findPluginFor(e){let t=this._eventNameToPlugin.get(e);if(t)return t;if(t=this._plugins.find(s=>s.supports(e)),!t)throw new y(5101,!1);return this._eventNameToPlugin.set(e,t),t}static \u0275fac=function(t){return new(t||r)(c(F),c(C))};static \u0275prov=f({token:r,factory:r.\u0275fac})}return r})(),_=class{_doc;constructor(n){this._doc=n}manager},A="ng-app-id";function de(r){for(let n of r)n.remove()}function ue(r,n){let e=n.createElement("style");return e.textContent=r,e}function Te(r,n,e,t){let o=r.head?.querySelectorAll(`style[${A}="${n}"],link[${A}="${n}"]`);if(o)for(let s of o)s.removeAttribute(A),s instanceof HTMLLinkElement?t.set(s.href.slice(s.href.lastIndexOf("/")+1),{usage:0,elements:[s]}):s.textContent&&e.set(s.textContent,{usage:0,elements:[s]})}function $(r,n){let e=n.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",r),e}var ge=(()=>{class r{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;isServer;constructor(e,t,o,s={}){this.doc=e,this.appId=t,this.nonce=o,this.isServer=j(s),Te(e,t,this.inline,this.external),this.hosts.add(e.head)}addStyles(e,t){for(let o of e)this.addUsage(o,this.inline,ue);t?.forEach(o=>this.addUsage(o,this.external,$))}removeStyles(e,t){for(let o of e)this.removeUsage(o,this.inline);t?.forEach(o=>this.removeUsage(o,this.external))}addUsage(e,t,o){let s=t.get(e);s?s.usage++:t.set(e,{usage:1,elements:[...this.hosts].map(i=>this.addElement(i,o(e,this.doc)))})}removeUsage(e,t){let o=t.get(e);o&&(o.usage--,o.usage<=0&&(de(o.elements),t.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])de(e);this.hosts.clear()}addHost(e){this.hosts.add(e);for(let[t,{elements:o}]of this.inline)o.push(this.addElement(e,ue(t,this.doc)));for(let[t,{elements:o}]of this.external)o.push(this.addElement(e,$(t,this.doc)))}removeHost(e){this.hosts.delete(e)}addElement(e,t){return this.nonce&&t.setAttribute("nonce",this.nonce),this.isServer&&t.setAttribute(A,this.appId),e.appendChild(t)}static \u0275fac=function(t){return new(t||r)(c(p),c(N),c(P,8),c(b))};static \u0275prov=f({token:r,factory:r.\u0275fac})}return r})(),U={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},Z=/%COMP%/g;var ve="%COMP%",De=`_nghost-${ve}`,Re=`_ngcontent-${ve}`,Ce=!0,be=new L("",{providedIn:"root",factory:()=>Ce});function Ae(r){return Re.replace(Z,r)}function _e(r){return De.replace(Z,r)}function ye(r,n){return n.map(e=>e.replace(Z,r))}var fe=(()=>{class r{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(e,t,o,s,i,a,d,u=null,l=null){this.eventManager=e,this.sharedStylesHost=t,this.appId=o,this.removeStylesOnCompDestroy=s,this.doc=i,this.platformId=a,this.ngZone=d,this.nonce=u,this.tracingService=l,this.platformIsServer=j(a),this.defaultRenderer=new D(e,i,d,this.platformIsServer,this.tracingService)}createRenderer(e,t){if(!e||!t)return this.defaultRenderer;this.platformIsServer&&t.encapsulation===w.ShadowDom&&(t=z(I({},t),{encapsulation:w.Emulated}));let o=this.getOrCreateRenderer(e,t);return o instanceof O?o.applyToHost(e):o instanceof R&&o.applyStyles(),o}getOrCreateRenderer(e,t){let o=this.rendererByCompId,s=o.get(t.id);if(!s){let i=this.doc,a=this.ngZone,d=this.eventManager,u=this.sharedStylesHost,l=this.removeStylesOnCompDestroy,m=this.platformIsServer,h=this.tracingService;switch(t.encapsulation){case w.Emulated:s=new O(d,u,t,this.appId,l,i,a,m,h);break;case w.ShadowDom:return new V(d,u,e,t,i,a,this.nonce,m,h);default:s=new R(d,u,t,l,i,a,m,h);break}o.set(t.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static \u0275fac=function(t){return new(t||r)(c(me),c(ge),c(N),c(be),c(p),c(b),c(C),c(P),c(X,8))};static \u0275prov=f({token:r,factory:r.\u0275fac})}return r})(),D=class{eventManager;doc;ngZone;platformIsServer;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(n,e,t,o,s){this.eventManager=n,this.doc=e,this.ngZone=t,this.platformIsServer=o,this.tracingService=s}destroy(){}destroyNode=null;createElement(n,e){return e?this.doc.createElementNS(U[e]||e,n):this.doc.createElement(n)}createComment(n){return this.doc.createComment(n)}createText(n){return this.doc.createTextNode(n)}appendChild(n,e){(pe(n)?n.content:n).appendChild(e)}insertBefore(n,e,t){n&&(pe(n)?n.content:n).insertBefore(e,t)}removeChild(n,e){e.remove()}selectRootElement(n,e){let t=typeof n=="string"?this.doc.querySelector(n):n;if(!t)throw new y(-5104,!1);return e||(t.textContent=""),t}parentNode(n){return n.parentNode}nextSibling(n){return n.nextSibling}setAttribute(n,e,t,o){if(o){e=o+":"+e;let s=U[o];s?n.setAttributeNS(s,e,t):n.setAttribute(e,t)}else n.setAttribute(e,t)}removeAttribute(n,e,t){if(t){let o=U[t];o?n.removeAttributeNS(o,e):n.removeAttribute(`${t}:${e}`)}else n.removeAttribute(e)}addClass(n,e){n.classList.add(e)}removeClass(n,e){n.classList.remove(e)}setStyle(n,e,t,o){o&(M.DashCase|M.Important)?n.style.setProperty(e,t,o&M.Important?"important":""):n.style[e]=t}removeStyle(n,e,t){t&M.DashCase?n.style.removeProperty(e):n.style[e]=""}setProperty(n,e,t){n!=null&&(n[e]=t)}setValue(n,e){n.nodeValue=e}listen(n,e,t,o){if(typeof n=="string"&&(n=k().getGlobalEventTarget(this.doc,n),!n))throw new Error(`Unsupported event target ${n} for event ${e}`);let s=this.decoratePreventDefault(t);return this.tracingService!==null&&this.tracingService.wrapEventListener&&(s=this.tracingService.wrapEventListener(n,e,s)),this.eventManager.addEventListener(n,e,s,o)}decoratePreventDefault(n){return e=>{if(e==="__ngUnwrap__")return n;(this.platformIsServer?this.ngZone.runGuarded(()=>n(e)):n(e))===!1&&e.preventDefault()}}};function pe(r){return r.tagName==="TEMPLATE"&&r.content!==void 0}var V=class extends D{sharedStylesHost;hostEl;shadowRoot;constructor(n,e,t,o,s,i,a,d,u){super(n,s,i,d,u),this.sharedStylesHost=e,this.hostEl=t,this.shadowRoot=t.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let l=o.styles;l=ye(o.id,l);for(let h of l){let v=document.createElement("style");a&&v.setAttribute("nonce",a),v.textContent=h,this.shadowRoot.appendChild(v)}let m=o.getExternalStyles?.();if(m)for(let h of m){let v=$(h,s);a&&v.setAttribute("nonce",a),this.shadowRoot.appendChild(v)}}nodeOrShadowRoot(n){return n===this.hostEl?this.shadowRoot:n}appendChild(n,e){return super.appendChild(this.nodeOrShadowRoot(n),e)}insertBefore(n,e,t){return super.insertBefore(this.nodeOrShadowRoot(n),e,t)}removeChild(n,e){return super.removeChild(null,e)}parentNode(n){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(n)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},R=class extends D{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(n,e,t,o,s,i,a,d,u){super(n,s,i,a,d),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=o;let l=t.styles;this.styles=u?ye(u,l):l,this.styleUrls=t.getExternalStyles?.(u)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},O=class extends R{contentAttr;hostAttr;constructor(n,e,t,o,s,i,a,d,u){let l=o+"-"+t.id;super(n,e,t,s,i,a,d,u,l),this.contentAttr=Ae(l),this.hostAttr=_e(l)}applyToHost(n){this.applyStyles(),this.setAttribute(n,this.hostAttr,"")}createElement(n,e){let t=super.createElement(n,e);return super.setAttribute(t,this.contentAttr,""),t}},Oe=(()=>{class r extends _{constructor(e){super(e)}supports(e){return!0}addEventListener(e,t,o,s){return e.addEventListener(t,o,s),()=>this.removeEventListener(e,t,o,s)}removeEventListener(e,t,o,s){return e.removeEventListener(t,o,s)}static \u0275fac=function(t){return new(t||r)(c(p))};static \u0275prov=f({token:r,factory:r.\u0275fac})}return r})(),he=["alt","control","meta","shift"],Ie={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Le={alt:r=>r.altKey,control:r=>r.ctrlKey,meta:r=>r.metaKey,shift:r=>r.shiftKey},He=(()=>{class r extends _{constructor(e){super(e)}supports(e){return r.parseEventName(e)!=null}addEventListener(e,t,o,s){let i=r.parseEventName(t),a=r.eventCallback(i.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>k().onAndCancel(e,i.domEventName,a,s))}static parseEventName(e){let t=e.toLowerCase().split("."),o=t.shift();if(t.length===0||!(o==="keydown"||o==="keyup"))return null;let s=r._normalizeKey(t.pop()),i="",a=t.indexOf("code");if(a>-1&&(t.splice(a,1),i="code."),he.forEach(u=>{let l=t.indexOf(u);l>-1&&(t.splice(l,1),i+=u+".")}),i+=s,t.length!=0||s.length===0)return null;let d={};return d.domEventName=o,d.fullKey=i,d}static matchEventFullKeyCode(e,t){let o=Ie[e.key]||e.key,s="";return t.indexOf("code.")>-1&&(o=e.code,s="code."),o==null||!o?!1:(o=o.toLowerCase(),o===" "?o="space":o==="."&&(o="dot"),he.forEach(i=>{if(i!==o){let a=Le[i];a(e)&&(s+=i+".")}}),s+=o,s===t)}static eventCallback(e,t,o){return s=>{r.matchEventFullKeyCode(s,e)&&o.runGuarded(()=>t(s))}}static _normalizeKey(e){return e==="esc"?"escape":e}static \u0275fac=function(t){return new(t||r)(c(p))};static \u0275prov=f({token:r,factory:r.\u0275fac})}return r})();function St(r,n){return oe(I({rootComponent:r},Ne(n)))}function Ne(r){return{appProviders:[...xe,...r?.providers??[]],platformProviders:Ue}}function Pe(){B.makeCurrent()}function ke(){return new H}function je(){return Y(document),document}var Ue=[{provide:b,useValue:ce},{provide:W,useValue:Pe,multi:!0},{provide:p,useFactory:je,deps:[]}];var xe=[{provide:G,useValue:"root"},{provide:H,useFactory:ke,deps:[]},{provide:F,useClass:Oe,multi:!0,deps:[p]},{provide:F,useClass:He,multi:!0,deps:[p]},fe,ge,me,{provide:re,useExisting:fe},{provide:le,useClass:Me,deps:[]},[]];var wt=(()=>{class r{_doc;constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static \u0275fac=function(t){return new(t||r)(c(p))};static \u0275prov=f({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var Be=(()=>{class r{static \u0275fac=function(t){return new(t||r)};static \u0275prov=f({token:r,factory:function(t){let o=null;return t?o=new(t||r):o=c(Fe),o},providedIn:"root"})}return r})(),Fe=(()=>{class r extends Be{_doc;constructor(e){super(),this._doc=e}sanitize(e,t){if(t==null)return null;switch(e){case g.NONE:return t;case g.HTML:return S(t,"HTML")?E(t):ne(this._doc,String(t)).toString();case g.STYLE:return S(t,"Style")?E(t):t;case g.SCRIPT:if(S(t,"Script"))return E(t);throw new y(5200,!1);case g.URL:return S(t,"URL")?E(t):te(String(t));case g.RESOURCE_URL:if(S(t,"ResourceURL"))return E(t);throw new y(5201,!1);default:throw new y(5202,!1)}}bypassSecurityTrustHtml(e){return K(e)}bypassSecurityTrustStyle(e){return q(e)}bypassSecurityTrustScript(e){return J(e)}bypassSecurityTrustUrl(e){return Q(e)}bypassSecurityTrustResourceUrl(e){return ee(e)}static \u0275fac=function(t){return new(t||r)(c(p))};static \u0275prov=f({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{St as a,wt as b,Be as c};
@@ -0,0 +1,6 @@
1
+ import{a as je}from"./chunk-J242X4NN.js";import{a as Mt,b as tn}from"./chunk-DNHLTHLR.js";import{a as U}from"./chunk-F2L6ATMF.js";import{a as nn}from"./chunk-KA2H467C.js";import{a as Ft}from"./chunk-Z2LU6ASK.js";import{a as mt}from"./chunk-BCSA6WFY.js";import{a as He}from"./chunk-UNV7VK4Z.js";import{a as Jt,b as ze,c as J,d as Te,e as ee,f as he,g as ut,h as _t,i as De,j as Ee,m as dt,n as ye,o as ve,p as en,q as Pe,r as te,s as Xe,t as Ae}from"./chunk-BSJ6OMWB.js";import{b as fe,d as oe}from"./chunk-NQYRWS7A.js";import{a as ie,b as lt,d as Qt,e as Yt,g as Re,l as Y,o as Zt,p as pt,s as Z,y as Ke,z as ct}from"./chunk-3WHFK5U5.js";import{b as Be}from"./chunk-64CRTZO6.js";import{c as qt}from"./chunk-VDB64BFB.js";import{ia as Wt}from"./chunk-ERQAUCCL.js";import{A as yt,Ab as s,Bb as a,Cb as u,D as Je,Db as X,Eb as H,Fb as tt,Gb as x,Lc as b,Mb as C,Mc as Ve,Nb as S,Ob as I,Pb as At,Qb as Nt,R as Me,Ra as l,Rb as we,Sb as P,Tb as c,Ub as zt,Vb as at,Wb as ge,X as $,Ya as Fe,Yb as Xt,Zb as V,ca as T,cc as Ce,da as h,db as Q,dc as Se,ec as me,fc as F,gc as Ot,ha as Vt,hc as K,ib as _,ic as Ht,kc as be,l as Et,lc as Ge,mc as Le,nc as kt,oa as Pt,oc as $t,p as Ze,pa as et,pc as It,qb as Bt,qc as jt,rb as m,rc as st,sa as y,sb as Kt,sc as nt,tb as ke,uc as ot,wb as D,xb as le,yb as pe,yc as it,zb as ce}from"./chunk-RY7J7BHG.js";import{a as N,c as Ut}from"./chunk-7CGTOI24.js";var dn=[[["label"]],[["","prefix",""]],[["","suffix",""]]],Fn=["label","[prefix]","[suffix]"];function gn(e,n){if(e&1&&F(0),e&2){let t=n.$implicit;K(" ",t.label," ")}}var Cn=[{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],gt=class e{customId=et();timespan=y(0);unit=y("s");timeOptions=y(Cn);readonly=y(!1);onChange=()=>{};onTouched=()=>{};onChangeEffect=Ve(()=>{this.onChange(this.getValue())});writeValue(n){if(n){let t=n.match(/(\d+)([smh])/);t?(this.timespan.set(parseInt(t[1],10)),this.unit.set(t[2])):(this.timespan.set(0),this.unit.set("s"))}else this.timespan.set(0),this.unit.set("s")}registerOnChange(n){this.onChange=n}registerOnTouched(n){this.onTouched=n}setDisabledState(n){this.readonly.set(n)}getValue(){return`${this.timespan()}${this.unit()}`}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=Q({type:e,selectors:[["app-timespan"]],inputs:{customId:[1,"customId"]},features:[jt([{provide:Jt,useExisting:e,multi:!0}])],ngContentSelectors:Fn,decls:8,vars:10,consts:()=>{let n;return n=$localize`Select an item...`,[["type","number",3,"ngModelChange","id","ngModel","disabled"],["placeholder",n,"value","value","label","label",3,"options","readonly","isClearable"],["type","text",3,"ngModelChange","ngModel"]]},template:function(t,o){t&1&&(zt(dn),s(0,"spk-form-field"),at(1,0,["ngProjectAs","label",5,["label"]]),s(2,"input",0),Le("ngModelChange",function(r){return Ge(o.timespan,r)||(o.timespan=r),r}),a(),at(3,1),at(4,2),a(),s(5,"spk-select",1)(6,"input",2),Le("ngModelChange",function(r){return Ge(o.unit,r)||(o.unit=r),r}),a(),_(7,gn,1,1,"ng-template"),a()),t&2&&(Bt("readonly",o.readonly()||void 0),l(2),m("id",o.customId()),be("ngModel",o.timespan),m("disabled",o.readonly()),l(3),Kt("--miw",0),m("options",o.timeOptions())("readonly",o.readonly())("isClearable",!1),l(),be("ngModel",o.unit))},dependencies:[Z,Y,Xe,J,Ee,ee,_t],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}"],changeDetection:0})};var Ct=class e{fromString(n){if(!n)return null;let t=n.match(/(\d+)([smhDWMY])/);return t&&{value:parseInt(t[1]),unit:t[2]}}toString(n,t){return`${n}${t}`}static \u0275fac=function(t){return new(t||e)};static \u0275prov=Me({token:e,factory:e.\u0275fac,providedIn:"root"})};var Oe=class e{#e=$(Be);s3Providers=U(this.getS3Config("Providers"));s3Regions=U(this.getS3Config("Regions"));s3RegionHosts=U(this.getS3Config("RegionHosts"));s3StorageClasses=U(this.getS3Config("StorageClasses"));storjSatellites=U(this.getStorjConfig("Satellites"));storjAuthenticationMethods=U(this.getStorjConfig("AuthenticationMethods"));openstackProviders=U(this.getOpenstackConfig("Providers"));openstackVersions=U(this.getOpenstackConfig("Versions"));gcsLocations=U(this.getGcsConfig("Locations"));gcsStorageClasses=U(this.getGcsConfig("StorageClasses"));getS3Config(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":n}}).pipe(Ze(t=>this.#t(t)))}createS3IamUser(n,t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"CanCreateUser","s3-username":n,"s3-password":t}})}createS3PolicyIAM(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"GetPolicyDoc",path:n}})}getStorjConfig(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"storj-getconfig",requestBody:{"storj-config":n}}).pipe(Ze(t=>this.#t(t)))}getOpenstackConfig(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":n}}).pipe(Ze(t=>this.#t(t)))}getGcsConfig(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":n}}).pipe(Ze(t=>this.#t(t)))}#t(n){return(n.Result&&typeof n.Result=="object"&&Object.entries(n.Result).map(([t,o])=>({key:t,value:o})))??[]}static \u0275fac=function(t){return new(t||e)};static \u0275prov=Me({token:e,factory:e.\u0275fac,providedIn:"root"})};function xe(e){return e==null?"":":"+e.toString()}function W(e){return e==null?"":e.startsWith("/")?e:"/"+e}function R(e,n){let t={},o={};return n.searchParams.forEach((i,r)=>{$e.find(p=>p.key===e)?.dynamicFields?.includes(r)?o[r]=decodeURIComponent(i):t[r]=decodeURIComponent(i)}),{advanced:t,dynamic:o}}function v(e,n=!1){let t=e.map(([i,r])=>`${i}=${r?encodeURIComponent(r.toString()):""}`).join("&");return t?(n?"":"?")+t:""}function St(e){let n=e.destinationType,t=$e.find(o=>o.customKey===n||o.key===n);if(!t)throw new Error("Invalid destination type");return t?.mapper.to(e)??""}function Rt(e){let n=URL.canParse(e),t=e.split("://")[0],o=e.split("://")[1],i="http://"+o;if(o.startsWith("%")&&t==="file")return $e.find(r=>r.customKey===t||r.key===t)?.mapper.from(t,new URL("http://localhost"),e);try{let r=new URL(i);return $e.find(p=>p.customKey===t||p.key===t)?.mapper.from(t,r,e)}catch(r){console.error("Error while parsing target path",r)}if(!n)throw new Error("Invalid target path");return null}var g=new te,$e=[{key:"file",displayName:"File system",description:"Store backups on your local file system.",customFields:{path:{type:"FolderTree",name:"path",shortDescription:"File path",longDescription:"The path to store the backup",formElement:e=>g.control(e??"")}},mapper:{to:e=>{let n=v([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${e.custom.path}${n}`},from:(e,n,t)=>{let i=t.startsWith("file:///")?t.split("file:///")[1]:t.split("file://")[1],r=i.startsWith("%"),f=i.slice(1).startsWith(":\\")||r?i:"/"+i;return N({destinationType:e,custom:{path:f}},R(e,n))}}},{key:"ssh",displayName:"SSH",description:"Store backups in SSH.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"The server to connect to",formElement:e=>g.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"The port to connect to",formElement:e=>g.control(e??"",[Te.required,Te.max(65535)])},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>g.control(e??"")}},dynamicFields:["auth-username"],advancedFields:[{type:"FileTree",name:"ssh-keyfile",accepts:".key,",shortDescription:"This is a path to a private key file locally on the machine",longDescription:"This is a path to a private key file locally on the machine"}],mapper:{to:e=>{let n=v([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+xe(t)+W(i)+n}`},from:(e,n,t)=>N({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"s3",displayName:"S3 compatible bucket",description:"Store backups in any S3 compatible bucket.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>g.control(e??"")},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>g.control(e??"")}},dynamicFields:[{name:"s3-server-name",shortDescription:"Server",type:"NonValidatedSelectableString",loadOptions:e=>e.get(Oe).s3Providers},"use-ssl","auth-username","auth-password"],advancedFields:[{name:"s3-client",type:"Enumeration",options:["aws","minio"]},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(Oe).s3StorageClasses}],mapper:{to:e=>{let{bucket:n,path:t}=e.custom,o=v([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n+W(t)+o}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.pathname,bucket:n.hostname}},R(e,n))}},{key:"gcs",displayName:"Google Cloud Storage",description:"Store backups in Google Cloud Storage.",oauthField:"authid",customFields:{path:{type:"Path",name:"path",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>g.control(e??"")}},dynamicFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:e=>e.get(Oe).gcsLocations},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(Oe).gcsStorageClasses},"authid"],mapper:{to:e=>{let n=v([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${e.custom.path}${n}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"googledrive",displayName:"Google Drive",description:"Store backups in Google Drive.",oauthField:"authid",customFields:{path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>g.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=v([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"pcloud",displayName:"pCloud",description:"Store backups in pCloud.",oauthField:"authid",customFields:{server:{type:"Enumeration",name:"server",loadOptions:()=>y([{key:"pCloud Global",value:"api.pcloud.com"},{key:"pCloud Europe",value:"eapi.pcloud.com"}]),shortDescription:"Server",longDescription:"Server",formElement:e=>g.control(e??"")},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>g.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=v([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{server:t,path:o}=e.custom;return`${e.destinationType}://${t+W(o)+n}`},from:(e,n,t)=>{let o=n.pathname.replace(/^\//,"");return N({destinationType:e,custom:{server:n.hostname,path:o}},R(e,n))}}},{key:"azure",displayName:"Azure Blob Storage",description:"Store backups in Azure Blob Storage.",customFields:{path:{type:"String",name:"path",shortDescription:"Container name",longDescription:"Container name",formElement:e=>g.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:e=>{let n=e.custom.path,t=v([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"onedrivev2",displayName:"OneDrive",description:"Store backups in OneDrive.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>g.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=v([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"od4b",displayName:"OneDrive Business",description:"Store backups in OneDrive Business.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>g.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>g.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>g.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:e=>{let n=v([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+xe(t)+W(i)+n}`},from:(e,n,t)=>N({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"mssp",displayName:"Microsoft SharePoint",description:"Store backups in Microsoft SharePoint.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>g.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>g.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>g.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:e=>{let n=v([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+xe(t)+W(i)+n}`},from:(e,n,t)=>N({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"sharepoint",displayName:"Microsoft SharePoint v2",description:"Store backups in Microsoft SharePoint.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>g.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=v([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"dropbox",displayName:"Dropbox",description:"Store backups in Dropbox.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>g.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=v([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"box",displayName:"Box.com",description:"Store backups in Box.com.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>g.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=v([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"jottacloud",displayName:"Jottacloud",description:"Store backups in Jottacloud.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>g.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=v([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"b2",displayName:"B2 Cloud Storage",description:"Store backups in B2 Cloud Storage.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>g.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path in the bucket",longDescription:"Path in the bucket",formElement:e=>g.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Application ID"},{name:"auth-password",shortDescription:"Application Key"}],mapper:{to:e=>{let{bucket:n,path:t}=e.custom,o=v([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n+W(t)+o}`},from:(e,n,t)=>N({destinationType:e,custom:{bucket:n.hostname,path:n.pathname}},R(e,n))}},{key:"e2",displayName:"IDrive e2",description:"Store backups in IDrive e2.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>g.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path in the bucket",longDescription:"Path in the bucket",formElement:e=>g.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Access ID"},{name:"auth-password",shortDescription:"Access Secret"}],mapper:{to:e=>{let{bucket:n,path:t}=e.custom,o=v([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n+W(t)+o}`},from:(e,n,t)=>N({destinationType:e,custom:{bucket:n.hostname,path:n.pathname}},R(e,n))}},{key:"mega",displayName:"Mega.nz",description:"Store backups in Mega.nz.",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>g.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let n=e.custom.path,t=v([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"msgroup",displayName:"Microsoft Office 365 Group",description:"Store backups in Microsoft Office 365 Group.",oauthField:"authid",customFields:{groupEmail:{type:"Email",name:"groupEmail",shortDescription:"Group email",longDescription:"Group email",formElement:e=>g.control(e??"",[Te.email])},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>g.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=v([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},R(e,n))}},{key:"cloudfiles",displayName:"Rackspace CloudFiles",description:"Store backups in Rackspace CloudFiles.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>g.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>g.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>g.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let n=v([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+xe(t)+W(i)+n}`},from:(e,n,t)=>N({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"rclone",displayName:"Rclone",description:"Store backups in Rclone.",dynamicFields:[{name:"rclone-local-repository",shortDescription:"Local repository",defaultValue:""},{name:"rclone-remote-repository",shortDescription:"Remote repository",defaultValue:""},{name:"rclone-remote-path",shortDescription:"Path on remote repository",defaultValue:""}],mapper:{to:e=>{let n=e.dynamic["rclone-remote-repository"],t=e.dynamic["rclone-remote-path"],o=Object.entries(e.dynamic).filter(([r])=>!["rclone-remote-repository","rclone-remote-path"].includes(r)),i=v([...Object.entries(e.advanced),...o]);return`${e.destinationType}://${n}/${t+i}`},from:(e,n,t)=>{let{advanced:o,dynamic:i}=R(e,n);return N({destinationType:e,dynamic:N({"rclone-remote-repository":n.hostname,"rclone-remote-path":n.pathname},i)},o)}}},{key:"openstack",displayName:"OpenStack Object Storage",description:"Store backups in OpenStack Object Storage.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket",longDescription:"Bucket",formElement:e=>g.control(e??"")}},dynamicFields:[{name:"openstack-authuri",shortDescription:"Auth URI",type:"Enumeration",loadOptions:e=>e.get(Oe).openstackProviders},{name:"openstack-version",shortDescription:"Version",type:"Enumeration",loadOptions:e=>e.get(Oe).openstackVersions},{name:"openstack-domain-name",shortDescription:"Domain name"},{name:"openstack-tenant-name",shortDescription:"Tenant name"},{name:"openstack-region",shortDescription:"Region"}],mapper:{to:e=>{let n=v([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{bucket:t}=e.custom;return`${e.destinationType}://${t+n}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.pathname,bucket:n.hostname}},R(e,n))}},{key:"webdav",displayName:"WebDAV",description:"Store backups in WebDAV.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>g.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>g.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>g.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:"Use SSL"},{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let{port:n,server:t,path:o}=e.custom,i=e.dynamic["use-ssl"],r=v([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([p])=>p!=="use-ssl")]);return`${e.destinationType}${i?"s":""}://${t+xe(n)+W(o)+r}`},from:(e,n,t)=>N({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"aftp",displayName:"FTP",description:"Store backups in FTP.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>g.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>g.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>g.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let{port:n,server:t,path:o}=e.custom,i=v([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([r])=>r!=="use-ssl")]);return`${e.destinationType}://${t+xe(n)+W(o)+i}`},from:(e,n,t)=>N({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"sia",displayName:"Sia Decentrilized Cloud",description:"Store backups in Sia Decentrilized Cloud.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>g.control(e??"")}},dynamicFields:["sia-targetpath","sia-password","sia-redundancy"],mapper:{to:e=>{let n=e.custom.server,t=e.dynamic["sia-targetpath"],o=v([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([i])=>i!=="sia-targetpath")]);return`${e.destinationType}://${n+W(t)+o}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.pathname}},R(e,n))}},{key:"cos",displayName:"Tencent COS",description:"Store backups in Tencent COS.",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>g.control(e??"")}},dynamicFields:[{name:"cos-bucket",shortDescription:"Bucket",order:1},{name:"cos-region",shortDescription:"Region",order:2},{name:"cos-app-id",shortDescription:"COS App Id",order:3},{name:"cos-secret-id",shortDescription:"COS Secret Id",order:4},{name:"cos-secret-key",shortDescription:"COS Secret Key",order:5}],mapper:{to:e=>{let n=e.custom.path,t=v([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([o])=>o!=="cos-targetpath")]);return`${e.destinationType}://${n+t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.pathname}},R(e,n))}},{key:"tahoe",displayName:"Tahoe LAFS",description:"Store backups in Tahoe LAFS.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>g.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>g.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>g.control(e??"")},username:{type:"String",name:"username",shortDescription:"Username",longDescription:"Username",formElement:e=>g.control(e??"")},password:{type:"Password",name:"password",shortDescription:"Password",longDescription:"Password",formElement:e=>g.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:"Use SSL"}],mapper:{to:e=>{let{port:n,server:t,path:o,username:i,password:r}=e.custom,p={"auth-username":i,"auth-password":r},f=e.dynamic["use-ssl"],O=v([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([d])=>d!=="use-ssl"),...Object.entries(p)]);return`${e.destinationType}${f?"s":""}://${t+xe(n)+W(o)+O}`},from:(e,n,t)=>N({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},R(e,n))}},{key:"cifs",displayName:"CIFS",description:"Store backups in CIFS.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>g.control(e??"")},share:{type:"String",name:"share",shortDescription:"Share Name",longDescription:"Share Name",formElement:e=>g.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>g.control(e??"")}},dynamicFields:["transport","auth-username","auth-password","auth-domain"],mapper:{to:e=>{let{share:n,server:t,path:o,username:i,password:r}=e.custom,p={"auth-username":i,"auth-password":r},f=new Map([...Object.entries(p),...Object.entries(e.advanced),...Object.entries(e.dynamic)]),O=v(Array.from(f));return`${e.destinationType}://${t+W(n)+W(o)+O}`},from:(e,n,t)=>{let o=n.pathname.split("/")[1],i=n.pathname.split("/").slice(2).join("/");return N({destinationType:e,custom:{server:n.hostname,share:o,path:i}},R(e,n))}}},{key:"filen",displayName:"Filen.io",description:"Store backups in Filen.io.",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>g.control(e??"")}},dynamicFields:["auth-username","auth-password"],mapper:{to:e=>{let{path:n,username:t,password:o}=e.custom,i={"auth-username":t,"auth-password":o},r=new Map([...Object.entries(i),...Object.entries(e.advanced),...Object.entries(e.dynamic)]),p=v(Array.from(r));return`${e.destinationType}://${n+p}`},from:(e,n,t)=>{let o=n.hostname??"";return n.pathname&&o!==""&&(o+="/"),o+n.pathname,N({destinationType:e,custom:{path:o}},R(e,n))}}},{key:"storj",customKey:"storjAccessGrant",displayName:"Storj Access Grant",description:"Store backups in Storj Access Grant.",dynamicFields:[{name:"storj-shared-access",shortDescription:"Access Grant"},{name:"storj-bucket",shortDescription:"Bucket"},{name:"storj-folder",shortDescription:"Path on server"}],mapper:{to:e=>`storj://storj.io/config?storj-auth-method=Access%20grant&storj-satellite=us1.storj.io%3A7777&storj-api-key&storj-secret&${v([...Object.entries(e.advanced),...Object.entries(e.dynamic)],!0)}`,from:(e,n,t)=>N({destinationType:e},R(e,n))}},{key:"storj",customKey:"storjApiKey",displayName:"Storj API Key",description:"Store backups in Storj API Key.",dynamicFields:[{name:"storj-satellite",shortDescription:"Satellite",type:"Enumeration",loadOptions:e=>e.get(Oe).storjSatellites},{name:"storj-api-key",shortDescription:"API Key"},{name:"storj-secret",shortDescription:"Secret"},{name:"storj-bucket",shortDescription:"Bucket"},{name:"storj-folder",shortDescription:"Path on server"}],mapper:{to:e=>`storj://storj.io/config?storj-auth-method=API%20key&${v([...Object.entries(e.advanced),...Object.entries(e.dynamic)],!0)}`,from:(e,n,t)=>N({destinationType:e},R(e,n))}}];var on=/[a-zA-Z0-9_\-\+\.!@#$%^&*?_~()-]/,ft=class e{generate(n,t=on){let o;do o=this.generatePassword(n,t);while(this.calculatePasswordStrength(o)<5);return o}generatePassword(n,t=on){let o=this;return Array.apply(null,{length:n}).map(()=>{let i;for(;;)if(i=String.fromCharCode(o.#e()),t.test(i))return i},this).join("")}calculatePasswordStrength(n){let t=1;return n.length>=8&&t++,n.match(/[a-z]/)&&n.match(/[A-Z]/)&&t++,n.match(/\d+/)&&t++,n.match(/.[!,@,#,$,%,^,&,*,?,_,~,(,),-]/)&&t++,Math.min(t,5)}#e(){if(window.crypto&&window.crypto.getRandomValues){let n=new Uint8Array(1);return window.crypto.getRandomValues(n),n[0]}else if(window.msCrypto&&window.msCrypto.getRandomValues){let n=new Uint8Array(1);return window.msCrypto.getRandomValues(n),n[0]}else return Math.floor(Math.random()*256)}static \u0275fac=function(t){return new(t||e)};static \u0275prov=Me({token:e,factory:e.\u0275fac,providedIn:"root"})};var Sn=["formRef"];function fn(e,n){if(e&1&&F(0),e&2){let t=n.$implicit;K(" ",t.DisplayName," ")}}function Tn(e,n){if(e&1&&u(0,"spk-progress-bar",37),e&2){let t=c(3);ke("error",t.calculatePasswordStrength()===1)("warn",t.calculatePasswordStrength()===2)("primary",t.calculatePasswordStrength()===4)("success",t.calculatePasswordStrength()===5),m("value",t.calculatePasswordStrength()*(100/5))}}function hn(e,n){e&1&&(s(0,"span",32),I(1,9),a())}function Dn(e,n){e&1&&(C(0,7,1),u(1,"spk-icon"),S())}function En(e,n){e&1&&(C(0,7,2),u(1,"spk-icon"),S())}function yn(e,n){e&1&&(C(0,10,1),u(1,"spk-icon",39),S())}function Pn(e,n){e&1&&(C(0,10,2),u(1,"spk-icon"),S())}function An(e,n){if(e&1){let t=x();s(0,"button",38),P("click",function(){T(t);let i=c(3);return h(i.copyPassword())}),C(1,10),_(2,yn,2,0)(3,Pn,2,0),S(),a()}if(e&2){let t=c(3);l(2),D(t.copiedPassword()?2:3)}}function Nn(e,n){e&1&&(s(0,"spk-alert",36),I(1,11),a())}function On(e,n){if(e&1){let t=x();s(0,"div",27)(1,"spk-form-field")(2,"label",28),C(3,6),u(4,"sup"),S(),a(),u(5,"input",29),a(),_(6,Tn,1,9,"spk-progress-bar",30),s(7,"spk-form-field"),u(8,"input",31),_(9,hn,2,0,"span",32),a(),s(10,"div",33)(11,"button",34),P("click",function(){T(t);let i=c(2);return h(i.showPassword.set(!i.showPassword()))}),C(12,7),_(13,Dn,2,0)(14,En,2,0),S(),a(),s(15,"button",34),P("click",function(){T(t);let i=c(2);return h(i.generatePassword())}),C(16,8),u(17,"spk-icon"),S(),a(),_(18,An,4,1,"button",35),a(),_(19,Nn,2,0,"spk-alert",36),a()}if(e&2){let t=c(2);l(5),m("type",t.showPassword()?"text":"password"),l(),D(t.generalForm.value.password?6:-1),l(2),m("type",t.showPassword()?"text":"password"),l(),D(t.generalForm.value.repeatPassword&&t.generalForm.value.repeatPassword!==t.generalForm.value.password?9:-1),l(4),D(t.showPassword()?13:14),l(5),D(t.showCopyPassword()?18:-1),l(),D(t.generalForm.value.password&&t.generalForm.value.password===t.generalForm.value.repeatPassword?19:-1)}}function kn(e,n){if(e&1&&(s(0,"spk-select",24)(1,"label",25),I(2,5),a(),u(3,"input",26),_(4,fn,1,1,"ng-template"),a(),_(5,On,20,7,"div",27)),e&2){let t=c();m("options",t.encryptionOptions())("isClearable",!1),l(5),D(t.encryptionFieldSignal()!==""?5:-1)}}function $n(e,n){if(e&1&&(s(0,"button",22),C(1,12),u(2,"spk-icon"),S(),a()),e&2){let t=c();m("disabled",t.generalForm.invalid)}}function In(e,n){if(e&1&&(s(0,"spk-tooltip",23)(1,"button",22),C(2,13),u(3,"spk-icon"),S(),a()()),e&2){let t=c();m("disabled",!(t.showCopyPassword()&&!t.copiedPassword())),l(),m("disabled",t.generalForm.invalid||t.showCopyPassword()&&!t.copiedPassword())}}var Qe=new te,rn=(e={name:"",description:"",encryption:"",password:"",repeatPassword:""})=>Qe.group({name:Qe.control(e.name,[Te.required]),description:Qe.control(e.description),encryption:Qe.control(e.encryption,[tn()]),password:Qe.control(e.password,[Mt(n=>n?.value.encryption!=="",[Te.required])]),repeatPassword:Qe.control(e.repeatPassword,[Mt(n=>n?.value.encryption!=="",[Te.required])])}),xt={Key:"",DisplayName:"None"},vt=class e{#e=$(oe);#t=$(fe);#o=$(ft);#i=$(re);#n=$(mt);formRef=Fe.required("formRef");generalForm=this.#i.generalForm;generalFormSignal=this.#i.generalFormSignal;encryptionFieldSignal=this.#i.encryptionFieldSignal;encryptionOptions=this.#i.encryptionOptions;isNew=this.#i.isNew;showPassword=y(!1);copiedPassword=y(!1);showCopyPassword=y(!1);encryptionEffect=Ve(()=>{this.encryptionFieldSignal()===""&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});calculatePasswordStrength=b(()=>{let t=this.generalFormSignal()?.password??"";return this.#o.calculatePasswordStrength(t)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#i.exit()}async copyPassword(){let n=this.generalForm.controls.password.value;await this.#r(n??""),this.copiedPassword.set(!0)}async#r(n){try{await navigator.clipboard.writeText(n)}catch{try{let o=document.createElement("textarea");o.value=n,document.body.appendChild(o),o.select(),document.execCommand("copy"),document.body.removeChild(o)}catch(o){console.error("Failed to copy text: ",o)}}}displayFn(){let n=this.#n.systemInfo()?.EncryptionModules??[];return t=>{let o=[xt,...n].find(i=>i.Key===t);return o?`${o.DisplayName}`:""}}generatePassword(){this.copiedPassword.set(!1);let n=this.#o.generate(16);this.generalForm.controls.password.setValue(n),this.generalForm.controls.repeatPassword.setValue(n),this.showCopyPassword.set(!0)}next(){this.#e.navigate(["destination"],{relativeTo:this.#t.parent})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=Q({type:e,selectors:[["app-general"]],viewQuery:function(t,o){t&1&&Ce(o.formRef,Sn,5),t&2&&Se()},decls:20,vars:3,consts:()=>{let n;n=$localize`Your backup name`;let t;t=$localize`Your backup description`;let o;o=$localize`General backup settings`;let i;i=$localize` Backup name ${"\uFFFD#7\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#7\uFFFD"}:CLOSE_SUPERSCRIPT:`;let r;r=$localize`Backup description`;let p;p=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let f;f=$localize`Encryption`;let O;O=$localize`Encryption`;let d;d=$localize`Password`;let G;G=$localize`Repeat password`;let B;B=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let k;k=$localize`${"\uFFFD*13:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: hide ${"\uFFFD/*13:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*14:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: show ${"\uFFFD/*14:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,k=we(k);let z;z=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let ae;ae=$localize`Passwords do not match`;let q;q=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SPK_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,q=we(q);let E;E=$localize` Tip: Be sure to save your password. If you loose it you will lose access to your backups. `;let A;A=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let L;return L=$localize` Continue ${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],o,i,r,p,O,B,k,z,ae,q,E,A,L,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],["for","backupName"],["type","text","tabindex","1","placeholder",n,"formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder",t,"formControlName","description"],[1,"form-actions"],["type","button","spk-button","",3,"click"],["spk-button","","type","submit",1,"raised","primary",3,"disabled"],["message","Remember to copy the password",1,"primary",3,"disabled"],["value","Key","label","DisplayName",3,"options","isClearable"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",f,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",d,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",G,"formControlName","repeatPassword",3,"type"],["error",""],[1,"password-actions"],["spk-button","","type","button",1,"small",3,"click"],["spk-button","","type","button",1,"small","copy"],["type","primary"],[1,"raised",3,"value"],["spk-button","","type","button",1,"small","copy",3,"click"],[1,"spk-success"]]},template:function(t,o){if(t&1){let i=x();s(0,"form",14,0),P("submit",function(){return T(i),h(o.next())}),s(2,"h3",15),I(3,1),a(),s(4,"spk-form-field")(5,"label",16),C(6,2),u(7,"sup"),S(),a(),u(8,"input",17),a(),s(9,"spk-form-field")(10,"label",18),I(11,3),a(),u(12,"textarea",19),a(),_(13,kn,6,3),s(14,"div",20)(15,"button",21),P("click",function(){return T(i),h(o.exit())}),C(16,4),u(17,"spk-icon"),S(),a(),_(18,$n,3,1,"button",22)(19,In,4,2,"spk-tooltip",23),a()()}t&2&&(m("formGroup",o.generalForm),l(13),D(o.isNew()?13:-1),l(5),D(o.encryptionFieldSignal()===""?18:19))},dependencies:[Ae,De,J,ee,he,ye,Pe,Y,Z,Re,ie,pt,lt,ct],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}sup[_ngcontent-%COMP%]{padding:0 .125rem;color:var(--error-500)}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.copy[_ngcontent-%COMP%] spk-icon.spk-success[_ngcontent-%COMP%]{color:var(--success-500)}"],changeDetection:0})};var Mn=["formRef"],Rn=()=>["encryption-module","--no-encryption","--exclude-files-attributes","--skip-files-larger-than","dblock-size","no-encryption"];function vn(e,n){e&1&&(C(0,2,1),u(1,"spk-icon",13),S())}function xn(e,n){e&1&&(s(0,"p",13),I(1,7),a())}var Ye=new te,an=["Bytes","KB","MB","GB","TB","PB"],wn=[{value:"",name:$localize`Keep all backups`},{value:"time",name:$localize`Delete backups that are older than`},{value:"versions",name:$localize`Keep a specific number of backups`},{value:"smart",name:$localize`Smart backup retention`},{value:"custom",name:$localize`Custom backup retention`}],bn=1024*1024*1024*2,Gn=1024*1024*5,sn=(e={remoteVolumeSize:50,size:"MB",backupRetention:"",advancedOptions:[]})=>Ye.group({remoteVolumeSize:Ye.group({size:Ye.control(e.remoteVolumeSize),unit:Ye.control(e.size)}),backupRetention:Ye.control(e.backupRetention),advancedOptions:Ye.group({})}),wt=class e{#e=$(re);#t=$(oe);#o=$(fe);formRef=Fe.required("formRef");optionsForm=this.#e.optionsForm;selectedOptions=this.#e.selectedOptions;nonSelectedOptions=this.#e.nonSelectedOptions;isSubmitting=this.#e.isSubmitting;settings=this.#e.settings;sizeOptions=y(an);retentionOptions=y(wn);volumeSizeSignal=U(this.optionsForm.controls.remoteVolumeSize.get("size")?.valueChanges.pipe(yt(300))??Et(null));volumeUnitSignal=U(this.optionsForm.controls.remoteVolumeSize.get("unit")?.valueChanges.pipe(yt(300))??Et(null));exceededVolumeSize=b(()=>{let n=this.volumeSizeSignal()??this.optionsForm.controls.remoteVolumeSize.get("size")?.value,t=this.volumeUnitSignal()??this.optionsForm.controls.remoteVolumeSize.get("unit")?.value;if(n==null||t===null||t===void 0)return!1;let o=n*Math.pow(1024,an.indexOf(t));return o>bn||o<Gn});goBack(){this.#t.navigate(["schedule"],{relativeTo:this.#o.parent})}submit(){this.#e.submit()}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=Q({type:e,selectors:[["app-advanced-options-settings"]],viewQuery:function(t,o){t&1&&Ce(o.formRef,Mn,5),t&2&&Se()},decls:30,vars:13,consts:()=>{let n;n=$localize`Select an option...`;let t;t=$localize`Options`;let o;o=$localize` Remote volume size ${"\uFFFD*9:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:warning${"\uFFFD/#1:1\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/*9:1\uFFFD"}:CLOSE_BLOCK_IF:`;let i;i=$localize` The backups will be split up into multiple files called volumes. Here you can set the maximum size of the individual volume files. ${"\uFFFD#16\uFFFD"}:START_LINK: Read more ${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:arrow-square-out${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#16\uFFFD"}:CLOSE_LINK:`;let r;r=$localize`Backup retention`;let p;p=$localize`${"\uFFFD#26\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#26\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let f;f=$localize`${"\uFFFD#29\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#29\uFFFD"}:CLOSE_TAG_SPK_ICON: Submit `;let O;return O=$localize` The chosen size is outside the recommended range. This may cause performance issues, excessively large temporary files or other problems. `,[["formRef",""],t,o,i,r,p,f,O,[3,"submit","formGroup"],[1,"title-30"],[1,"remote-volume-wrap"],["formGroupName","remoteVolumeSize",1,"row-inputs"],["for","size"],[1,"warning"],["type","number","id","size","formControlName","size"],["placeholder",n,3,"isClearable","options","inlineSearch"],["type","text","formControlName","unit"],["href","https://forum.duplicati.com/t/choosing-sizes-in-duplicati/17683","target","_blank",1,"spk-primary"],["suffix",""],["value","value","label","name",3,"options","inlineSearch"],["type","text","formControlName","backupRetention"],[3,"optionsChange","options","hiddenOptions"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(t,o){if(t&1){let i=x();s(0,"form",8,0),P("submit",function(){return T(i),h(o.submit())}),s(2,"h3",9),I(3,1),a(),s(4,"div",10)(5,"div",11)(6,"spk-form-field")(7,"label",12),C(8,2),_(9,vn,2,0,"spk-icon",13),S(),a(),u(10,"input",14),a(),s(11,"spk-select",15),u(12,"input",16),a()(),_(13,xn,2,0,"p",13),s(14,"p"),C(15,3),s(16,"a",17),u(17,"spk-icon",18),a(),S(),a()(),s(18,"spk-select",19)(19,"label",12),I(20,4),a(),u(21,"input",20),a(),s(22,"app-options-list",21),Le("optionsChange",function(p){return T(i),Ge(o.settings,p)||(o.settings=p),h(p)}),a(),s(23,"div",22)(24,"button",23),P("click",function(){return T(i),h(o.goBack())}),C(25,5),u(26,"spk-icon"),S(),a(),s(27,"button",24),C(28,6),u(29,"spk-icon"),S(),a()()()}t&2&&(m("formGroup",o.optionsForm),l(9),D(o.exceededVolumeSize()?9:-1),l(2),m("isClearable",!1)("options",o.sizeOptions())("inlineSearch",!0),l(2),D(o.exceededVolumeSize()?13:-1),l(5),m("options",o.retentionOptions())("inlineSearch",!0),l(4),be("options",o.settings),m("hiddenOptions",st(12,Rn)),l(5),ke("loader",o.isSubmitting()))},dependencies:[Ae,De,J,Ee,ee,he,ye,Pe,ve,nn,Re,ie,Y,Z],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 40px;align-items:flex-end}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}spk-select[_ngcontent-%COMP%]{--miw: p2r(120)}"],changeDetection:0})};var Ln=["formRef"];function Un(e,n){if(e&1){let t=x();s(0,"div",26)(1,"spk-form-field")(2,"label",27),I(3,8),a(),s(4,"input",28,1),P("focus",function(){T(t);let i=me(5);return h(i.showPicker())}),a(),s(6,"spk-icon",29),F(7,"clock"),a()(),s(8,"spk-form-field"),u(9,"label",30),s(10,"input",31,2),P("focus",function(){T(t);let i=me(11);return h(i.showPicker())}),a(),s(12,"spk-icon",29),F(13,"calendar"),a()()(),X(14,32),s(15,"div",33)(16,"spk-form-field")(17,"label",34),I(18,9),a(),u(19,"input",35),a(),s(20,"spk-select",36),u(21,"input",37),a()(),s(22,"app-toggle-card",38),X(23,39),I(24,10),H(),s(25,"div",40)(26,"spk-toggle",21),C(27,11),u(28,"input",41),S(),a(),s(29,"spk-toggle",21),C(30,12),u(31,"input",42),S(),a(),s(32,"spk-toggle",21),C(33,13),u(34,"input",43),S(),a(),s(35,"spk-toggle",21),C(36,14),u(37,"input",44),S(),a(),s(38,"spk-toggle",21),C(39,15),u(40,"input",45),S(),a(),s(41,"spk-toggle",21),C(42,16),u(43,"input",46),S(),a(),s(44,"spk-toggle",21),C(45,17),u(46,"input",47),S(),a()()(),H()}if(e&2){let t=c();l(20),m("options",t.unitOptions)("isClearable",!1),l(2),m("disallowToggle",!0)}}var j=new te,ln=[{key:"s",label:$localize`Seconds`},{key:"m",label:$localize`Minutes`},{key:"h",label:$localize`Hours`},{key:"D",label:$localize`Days`},{key:"W",label:$localize`Weeks`},{key:"M",label:$localize`Months`},{key:"Y",label:$localize`Years`}],pn=(e={autoRun:!0,nextTime:{time:"13:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!1,tue:!1,wed:!1,thu:!1,fri:!1,sat:!1,sun:!1}}})=>j.group({autoRun:j.control(e.autoRun),nextTime:j.group({time:j.control(e.nextTime.time),date:j.control(e.nextTime.date)}),runAgain:j.group({repeatValue:j.control(e.runAgain.repeatValue),repeatUnit:j.control(e.runAgain.repeatUnit),allowedDays:j.group({mon:j.control(e.runAgain.allowedDays.mon),tue:j.control(e.runAgain.allowedDays.tue),wed:j.control(e.runAgain.allowedDays.wed),thu:j.control(e.runAgain.allowedDays.thu),fri:j.control(e.runAgain.allowedDays.fri),sat:j.control(e.runAgain.allowedDays.sat),sun:j.control(e.runAgain.allowedDays.sun)})})}),bt=class e{#e=$(re);#t=$(oe);#o=$(fe);formRef=Fe.required("formRef");scheduleForm=this.#e.scheduleForm;scheduleFormSignal=this.#e.scheduleFormSignal;unitOptions=ln;displayFn(n){let t=ln.find(o=>o.key===n);return t?`${t.label}`:""}goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#o.parent})}next(){this.#t.navigate(["options"],{relativeTo:this.#o.parent})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=Q({type:e,selectors:[["app-schedule"]],viewQuery:function(t,o){t&1&&Ce(o.formRef,Ln,5),t&2&&Se()},decls:18,vars:2,consts:()=>{let n;n=$localize`Schedule`;let t;t=$localize` Automatically run backups ${"\uFFFD#7\uFFFD\uFFFD/#7\uFFFD"}:TAG_INPUT:`;let o;o=$localize`If a date was missed, the job will run as soon as possible.`;let i;i=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let r;r=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let p;p=$localize`Next time`;let f;f=$localize`Run again every`;let O;O=$localize`Allowed days`;let d;d=$localize` Monday ${"\uFFFD#28\uFFFD\uFFFD/#28\uFFFD"}:TAG_INPUT:`;let G;G=$localize` Tuesday ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let B;B=$localize` Wednesday ${"\uFFFD#34\uFFFD\uFFFD/#34\uFFFD"}:TAG_INPUT:`;let k;k=$localize` Thursday ${"\uFFFD#37\uFFFD\uFFFD/#37\uFFFD"}:TAG_INPUT:`;let z;z=$localize` Friday ${"\uFFFD#40\uFFFD\uFFFD/#40\uFFFD"}:TAG_INPUT:`;let ae;ae=$localize` Saturday ${"\uFFFD#43\uFFFD\uFFFD/#43\uFFFD"}:TAG_INPUT:`;let q;return q=$localize` Sunday ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`,[["formRef",""],["timeRef",""],["dateRef",""],n,t,o,i,r,p,f,O,d,G,B,k,z,ae,q,[3,"submit","formGroup"],[1,"title-30"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox","formControlName","autoRun"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["formGroupName","nextTime",1,"row-inputs"],["for","time"],["type","time","id","time","formControlName","time",3,"focus"],["suffix",""],["for","date"],["type","date","id","date","formControlName","date",3,"focus"],["formGroupName","runAgain"],[1,"row-inputs"],["for","repeatValue"],["type","number","id","repeatValue","formControlName","repeatValue"],["value","key","label","label",3,"options","isClearable"],["type","text","id","repeatUnit","formControlName","repeatUnit"],["formGroupName","allowedDays",3,"disallowToggle"],["title",""],[1,"days-wrap"],["type","checkbox","formControlName","mon"],["type","checkbox","formControlName","tue"],["type","checkbox","formControlName","wed"],["type","checkbox","formControlName","thu"],["type","checkbox","formControlName","fri"],["type","checkbox","formControlName","sat"],["type","checkbox","formControlName","sun"]]},template:function(t,o){if(t&1){let i=x();s(0,"form",18,0),P("submit",function(){return T(i),h(o.next())}),s(2,"h3",19),I(3,3),a(),s(4,"div",20)(5,"spk-toggle",21),C(6,4),u(7,"input",22),S(),a(),s(8,"p"),I(9,5),a()(),_(10,Un,47,3),s(11,"div",23)(12,"button",24),P("click",function(){return T(i),h(o.goBack())}),C(13,6),u(14,"spk-icon"),S(),a(),s(15,"button",25),C(16,7),u(17,"spk-icon"),S(),a()()()}if(t&2){let i;m("formGroup",o.scheduleForm),l(10),D((i=o.scheduleFormSignal())!=null&&i.autoRun?10:-1)}},dependencies:[Ae,De,J,Ee,ze,ee,he,ye,Pe,ve,Y,Ke,ie,Re,Z,je],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}.toggle-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.days-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};function Vn(e,n){if(e&1){let t=x();s(0,"spk-select",0)(1,"input",4),P("ngModelChange",function(i){T(t);let r=c(2);return h(r.updateStateExpression(i))}),a()()}if(e&2){let t,o=c(2);m("options",o.fileGroupOptions())("isClearable",!1),l(),m("ngModel",(t=o.pathState())==null?null:t.expression)}}function Bn(e,n){if(e&1){let t=x();s(0,"spk-form-field")(1,"input",4),P("ngModelChange",function(i){T(t);let r=c(2);return h(r.updateStateExpression(i))}),a()()}if(e&2){let t,o=c(2);l(),m("ngModel",(t=o.pathState())==null?null:t.expression)}}function Kn(e,n){if(e&1){let t=x();s(0,"spk-select",0)(1,"input",1),P("ngModelChange",function(i){T(t);let r=c();return h(r.updateStateType(i))}),a()(),_(2,Vn,2,3,"spk-select",0)(3,Bn,2,1,"spk-form-field"),s(4,"div",2),P("click",function(){T(t);let i=c();return h(i.removeFilter())}),s(5,"spk-icon",3),F(6,"x-circle"),a()()}if(e&2){let t,o,i=c();m("options",i.expressionOptions())("isClearable",!1),l(),m("ngModel",(t=i.pathState())==null?null:t.type),l(),D(((o=i.pathState())==null?null:o.type)==="-FileGroup"||((o=i.pathState())==null?null:o.type)==="+FileGroup"?2:3)}}var cn=[{key:"Excludes folders where name contains",value:"-FolderNameIncludes"},{key:"Excludes folder",value:"-Folder"},{key:"Excludes files where name contains",value:"-FileNameIncludes"},{key:"Excludes file extension",value:"-Extension"},{key:"Excludes files where name matches regex",value:"-Regex"},{key:"Includes files where name matches regex",value:"+Regex"},{key:"Excludes file group",value:"-FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"},{key:"None",value:"-Unknown"}],zn=[{key:"Applications",value:"Applications"},{key:"CacheFiles",value:"Cache Files"},{key:"TemporaryFiles",value:"Temporary Files"},{key:"OperatingSystem",value:"Operating System"},{key:"SystemFiles",value:"System Files"},{key:"DefaultExcludes",value:"Standard Excludes"}],Tt=class e{path=et.required();osType=et();pathChange=Pt();remove=Pt();expressionOptions=y(cn);fileGroupOptions=y(zn);pathState=y(null);typeState=b(()=>{let n=this.pathState();return n?n.type:null});pathEffect=Ve(()=>{let n=this.path(),t=n.slice(1),o=n.startsWith("-")?"-":"+",i=this.osType()==="Windows",r=i?"\\":"/",p=t.startsWith("%");return t===""?this.pathState.set({type:"-Unknown",path:"___none___",expression:""}):p&&t.endsWith(r)||i&&t.slice(2).startsWith("\\")&&t.endsWith("\\")||t.startsWith(r)&&t.endsWith(r)?this.pathState.set({type:`${o}Folder`,path:t,expression:t}):t.startsWith("*")&&t.endsWith(`*${r}`)?this.pathState.set({type:`${o}FolderNameIncludes`,path:t,expression:t.slice(1,-2)}):t.startsWith("[.*")&&t.endsWith(`[^\\${r}]*]`)?this.pathState.set({type:`${o}FileNameIncludes`,path:t,expression:t.slice(3,-7)}):t.startsWith("{")&&t.endsWith("}")?this.pathState.set({type:`${o}FileGroup`,path:t,expression:t.slice(1,-1)}):t.startsWith("[")&&t.endsWith("]")?this.pathState.set({type:`${o}Regex`,path:t,expression:t.slice(1,-1)}):t.startsWith("*.")?this.pathState.set({type:`${o}Extension`,path:t,expression:t.slice(2)}):this.pathState.set({type:`${o}Expression`,path:t,expression:t})});updateStateType(n){this.pathState.update(t=>(t.type=n,t.path=this.#t(t),t)),this.#e()}updateStateExpression(n){this.pathState.update(t=>(t.expression=n,t.path=this.#t(t),t)),this.#e()}#e(){setTimeout(()=>this.pathChange.emit(this.pathState().path))}#t(n){let t=n.type.slice(0,1),o=n.type.slice(1),i=this.osType()==="Windows",r=i?"\\":"/",f=i&&!n.expression.startsWith("%")?n.expression.slice(2):n.expression,O=n.path.startsWith("%");if(o==="Unknown")return`${t}${n.expression}`;if(o==="Folder"){let d=O||f.startsWith(r),G=f.endsWith(r);return G&&d?`${t}${n.expression}`:G?`${t}${n.expression}${r}`:d?`${t}${r}${n.expression}`:`${t}${r}${n.expression}${r}`}return o==="FolderNameIncludes"?`${t}*${n.expression}*${r}`:o==="FileNameIncludes"?`${t}[.*${n.expression}[^\\${r}]*]`:o==="FileGroup"?`${t}{${n.expression}}`:o==="Regex"?`${t}[${n.expression}]`:o==="Extension"?`${t}*.${n.expression}`:`${t}${n.expression}`}removeFilter(){this.remove.emit()}displayFn(n){let t=cn.find(o=>o.value===n);return t?t.key:""}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=Q({type:e,selectors:[["app-filter"]],inputs:{path:[1,"path"],osType:[1,"osType"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:1,vars:1,consts:()=>{let n;return n=$localize`Select an option...`,[["value","value","label","key",3,"options","isClearable"],["type","text","placeholder",n,3,"ngModelChange","ngModel"],[1,"filter-removal",3,"click"],[1,"spk-primary"],["type","text",3,"ngModelChange","ngModel"]]},template:function(t,o){t&1&&_(0,Kn,7,4),t&2&&D(o.pathState()?0:-1)},dependencies:[Xe,J,ee,_t,ie,Y,Z],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:13.125rem 1fr 1.875rem;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] spk-select[_ngcontent-%COMP%]{--miw: initial}[_nghost-%COMP%] spk-form-field[_ngcontent-%COMP%]{min-width:110px}[_nghost-%COMP%] spk-form-field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{min-width:110px}[_nghost-%COMP%] .filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"],changeDetection:0})};var Xn=["formRef"];function Hn(e,n){if(e&1){let t=x();s(0,"app-filter",42),P("pathChange",function(i){let r=T(t).$index,p=c(2);return h(p.patchPathAt(i,r))})("remove",function(){let i=T(t).$index,r=c(2);return h(r.removePathAt(i))}),a()}if(e&2){let t,o=n.$implicit,i=c(2);m("path",o)("osType",(t=i.osType())!==null&&t!==void 0?t:"")}}function jn(e,n){if(e&1&&pe(0,Hn,1,2,"app-filter",41,le),e&2){let t=c();ce(t.pathArray())}}function Wn(e,n){if(e&1&&(s(0,"div",40)(1,"spk-form-field"),u(2,"input",43),a(),s(3,"spk-select",44),u(4,"input",45),a()()),e&2){let t=c();l(3),m("options",t.sizeOptions())("isClearable",!1)}}var Ie=new te,qn=["Bytes","KB","MB","GB","TB","PB"],mn=(e={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>Ie.group({path:Ie.control(e.path),excludes:Ie.group({hidden:Ie.control(e.excludes.hidden),system:Ie.control(e.excludes.system),temporary:Ie.control(e.excludes.temporary),filesLargerThan:Ie.group({size:Ie.control(null),unit:Ie.control(null)})})}),Gt=class e{#e=$(re);#t=$(oe);#o=$(fe);formRef=Fe.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new ut("");filesLargerThan=b(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=y(qn);osType=this.#e.osType;pathSignal=U(this.sourceDataForm.controls.path.valueChanges);pathArray=b(()=>this.pathSignal()?.split("\0").filter(n=>n.startsWith("-")||n.startsWith("+")||n==="___none___")??[]);addFilter(n="-*"){let t=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${t}\0${n}`)}patchPathAt(n,t){let i=this.sourceDataForm.controls.path.value.split("\0").filter(p=>!p.startsWith("-")&&!p.startsWith("+")).join("\0"),r=this.pathArray().map((p,f)=>f===t?`${n}`:`${p}`).join("\0");this.sourceDataForm.controls.path.setValue(`${i}\0${r}`)}removePathAt(n){let o=this.sourceDataForm.controls.path.value.split("\0").filter(r=>!r.startsWith("-")&&!r.startsWith("+")).join("\0"),i=this.pathArray().filter((r,p)=>p!==n).join("\0");this.sourceDataForm.controls.path.setValue(`${o}\0${i}`)}getPath(){return this.sourceDataForm.value.path??null}toggleFilesLargerThan(){this.sourceDataForm.controls.excludes.value.filesLargerThan?.size===null?this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:50,unit:"MB"}):this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:null,unit:null})}addNewPath(){let n=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${n}\0${this.newPathCtrl.value}`),this.newPathCtrl.setValue("")}goBack(){this.#t.navigate(["destination"],{relativeTo:this.#o.parent})}next(){this.#t.navigate(["schedule"],{relativeTo:this.#o.parent})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=Q({type:e,selectors:[["app-source-data"]],viewQuery:function(t,o){t&1&&Ce(o.formRef,Xn,5),t&2&&Se()},decls:55,vars:12,consts:()=>{let n;n=$localize`Path`;let t;t=$localize`Add a direct path`;let o;o=$localize`Hidden files`;let i;i=$localize`System files`;let r;r=$localize`Temporary files`;let p;p=$localize`Source Data`;let f;f=$localize`Folder path`;let O;O=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let d;d=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let G;G=$localize`Source Data`;let B;B=$localize`Add Path`;let k;k=$localize`Add a path directly from your machine.`;let z;z=$localize`Filters`;let ae;ae=$localize`Customize your filters.`;let q;q=$localize`Add filter`;let E;E=$localize`Exclude`;let A;A=$localize`Choose if there’s any files you want to exclude.`;let L;L=$localize` Hidden files ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`;let M;M=$localize` System files ${"\uFFFD#48\uFFFD\uFFFD/#48\uFFFD"}:TAG_INPUT:`;let ne;ne=$localize` Temporary files ${"\uFFFD#51\uFFFD\uFFFD/#51\uFFFD"}:TAG_INPUT:`;let _e;_e=$localize` Files larger than `;let se;return se=$localize`Select an option...`,[["formRef",""],p,f,O,d,G,B,k,z,ae,q,E,A,L,M,ne,_e,[3,"submit","formGroup"],[1,"left"],[1,"title-30"],[1,"fill",3,"multiSelect","startingPath","showFiles"],["for","path"],["type","text","id","path","tabindex","4","placeholder",n,"formControlName","path"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[1,"right"],[3,"disallowToggle"],["title",""],["description",""],[1,"row-inputs"],["type","text","placeholder",t,3,"formControl"],["spk-button","","type","button",1,"raised","primary",3,"click"],["type","button","spk-button","","action","",3,"click"],["formGroupName","excludes",3,"disallowToggle"],[1,"raised","primary"],["type","checkbox","placeholder",o,"formControlName","hidden"],["type","checkbox","placeholder",i,"formControlName","system"],["type","checkbox","placeholder",r,"formControlName","temporary"],[1,"raised","primary",3,"click"],["formGroupName","filesLargerThan",1,"row-inputs"],[3,"path","osType"],[3,"pathChange","remove","path","osType"],["type","number","formControlName","size"],[3,"options","isClearable"],["type","text","formControlName","unit","placeholder",se]]},template:function(t,o){if(t&1){let i=x();s(0,"form",17,0),P("submit",function(){return T(i),h(o.next())}),s(2,"div",18)(3,"h3",19),I(4,1),a(),s(5,"app-file-tree",20)(6,"label",21),I(7,2),a(),u(8,"input",22),a(),s(9,"div",23)(10,"button",24),P("click",function(){return T(i),h(o.goBack())}),C(11,3),u(12,"spk-icon"),S(),a(),s(13,"button",25),C(14,4),u(15,"spk-icon"),S(),a()()(),s(16,"div",26)(17,"h3",19),I(18,5),a(),s(19,"app-toggle-card",27),X(20,28),I(21,6),H(),s(22,"p",29),I(23,7),a(),s(24,"div",30)(25,"spk-form-field"),u(26,"input",31),a(),s(27,"button",32),P("click",function(){return T(i),h(o.addNewPath())}),s(28,"spk-icon"),F(29,"plus"),a()()()(),s(30,"app-toggle-card",27),X(31,28),I(32,8),H(),s(33,"p",29),I(34,9),a(),s(35,"button",33),P("click",function(){return T(i),h(o.addFilter())}),I(36,10),a(),_(37,jn,2,0),a(),s(38,"app-toggle-card",34),X(39,28),I(40,11),H(),s(41,"p",29),I(42,12),a(),s(43,"spk-toggle",35),C(44,13),u(45,"input",36),S(),a(),s(46,"spk-toggle",35),C(47,14),u(48,"input",37),S(),a(),s(49,"spk-toggle",35),C(50,15),u(51,"input",38),S(),a(),s(52,"spk-toggle",39),P("click",function(){return T(i),h(o.toggleFilesLargerThan())}),I(53,16),a(),_(54,Wn,5,2,"div",40),a()()()}if(t&2){let i;m("formGroup",o.sourceDataForm),l(5),m("multiSelect",!0)("startingPath",o.getPath())("showFiles",!0),l(14),m("disallowToggle",!0),l(7),m("formControl",o.newPathCtrl),l(4),m("disallowToggle",!0),l(7),D((i=o.pathSignal())!=null&&i.length?37:-1),l(),m("disallowToggle",!0),l(14),ke("active",o.filesLargerThan()),l(2),D(o.filesLargerThan()?54:-1)}},dependencies:[Xe,De,J,Ee,ze,ee,he,Ae,dt,ye,Pe,ve,Y,ie,Re,Ke,Z,Ft,je,Tt],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;width:100%;flex:1 0;overflow:hidden}form[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;flex:1 0;overflow:hidden}.right[_ngcontent-%COMP%], .left[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:1.5rem}.left[_ngcontent-%COMP%]{padding:2.5rem;overflow:hidden;border-right:1px solid var(--base-level-40)}.right[_ngcontent-%COMP%]{padding:2.5rem 1.5rem;overflow:auto}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.row-inputs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content;gap:.5rem}"],changeDetection:0})};var ue=new te,re=class e{#e=$(oe);#t=$(mt);#o=$(Be);#i=$(Ct);generalForm=rn();sourceDataForm=mn();scheduleForm=pn();destinationForm=un();optionsForm=sn();settings=y([]);isDraft=y(!1);backupId=y(null);isSubmitting=y(!1);finishedLoading=y(!1);backupDefaults=y(null);isNew=b(()=>this.backupId()==="new");osType=b(()=>this.#t.systemInfo()?.OSType);selectedOptions=y([]);selectedAdvancedFormPair=y([]);destinationFormPair=y({oauthField:null,custom:[],dynamic:[],advanced:[]});notSelectedAdvancedFormPair=b(()=>{let n=this.destinationFormPair()?.advanced??[],t=this.selectedAdvancedFormPair()??[];return n.filter(o=>t.findIndex(i=>i.name===o.name)===-1)});selectedHttpOptions=y([]);notSelectedHttpOptions=b(()=>{let n=this.httpOptions(),t=this.selectedHttpOptions()??[];return n.filter(o=>t.findIndex(i=>i.name===o.name)===-1)});sourceDataFormSignal=U(this.sourceDataForm.valueChanges);destinationFormSignal=U(this.destinationForm.valueChanges);generalFormSignal=U(this.generalForm.valueChanges);encryptionFieldSignal=U(this.generalForm.controls.encryption.valueChanges);scheduleFormSignal=U(this.scheduleForm.valueChanges);destinationOptions=b(()=>this.#t.backendModules()??[]);httpOptions=b(()=>this.#t.systemInfo()?.GenericModules?.find(n=>n.Key==="http-options")?.Options?.map(this.#n)??[]);advancedOptions=b(()=>this.#t.systemInfo()?.Options?.map(this.#n)??[]);#n(n){return{name:n.Name,type:n.Type,shortDescription:n.ShortDescription??void 0,longDescription:n.LongDescription??void 0,options:n.ValidValues}}encryptionOptions=b(()=>{let n=this.#t.systemInfo()?.EncryptionModules??[];return[xt,...n]});nonSelectedOptions=b(()=>this.advancedOptions().sort((n,t)=>n?.name&&t?.name?n?.name.localeCompare(t?.name):0).filter(n=>this.selectedOptions()?.findIndex(t=>t.name===n.name)===-1));addAdvancedFormPairByName(n,t,o){let i=this.notSelectedAdvancedFormPair().find(r=>r.name===n);i&&this.addAdvancedFormPair(i,t,o)}addHttpOptionByName(n,t,o){let i=this.notSelectedHttpOptions().find(r=>r.name===n);i&&this.addHttpOption(i,t,o)}addAdvancedFormPair(n,t,o){let i=this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced,r=o??n.defaultValue;this.createFormField(i,n,r),this.selectedAdvancedFormPair.set([...this.selectedAdvancedFormPair(),n])}addHttpOption(n,t,o){let i=this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced,r=o??n.defaultValue;this.createFormField(i,n,r),this.selectedHttpOptions.set([...this.selectedHttpOptions(),n])}removeAdvancedFormPair(n,t){this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced.removeControl(n.name),this.selectedAdvancedFormPair().findIndex(i=>i.name===n.name)!==-1?this.selectedAdvancedFormPair.update(i=>(i=i.filter(r=>r.name!==n.name),i)):this.selectedHttpOptions.update(i=>(i=i.filter(r=>r.name!==n.name),i))}removeHttpOption(n,t){this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced.removeControl(n.name),this.selectedHttpOptions.update(o=>(o=o.filter(i=>i.name!==n.name),o))}submit(){this.isSubmitting.set(!0);let n=this.#l(),t=this.backupId();t==="new"||!t||this.isDraft()?this.#o.postApiV1Backups({requestBody:n}).pipe(Je(()=>this.isSubmitting.set(!1))).subscribe({next:o=>{this.exit()},error:o=>{}}):this.#o.putApiV1BackupById({id:t,requestBody:n}).pipe(Je(()=>this.isSubmitting.set(!1))).subscribe({next:o=>{this.exit()},error:o=>{}})}exit(){this.#c(),this.#e.navigate(["/"])}updateFieldsFromTargetUrl(n){this.#r(),setTimeout(()=>{this.#s(n)})}#r(){this.destinationFormPair.set({oauthField:null,custom:[],dynamic:[],advanced:[]}),this.selectedAdvancedFormPair.set([]),this.selectedHttpOptions.set([]),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset()}mapSourceDataToForm(n){let t=n.Sources??"",o=n.Filters?.map(d=>`${d.Include?"":"-"}${d.Expression}`)??[],i=n.Settings?.find(d=>d.Name==="--exclude-files-attributes")?.Value??"",r=n.Settings?.find(d=>d.Name==="--skip-files-larger-than")??null,p=r?.Value.replace(/[0-9]/g,"")??null,f=r?.Value.replace(/[^0-9]/g,"")??null,O={path:[...t,...o].join("\0"),excludes:{hiddenFiles:i.includes("hidden"),systemFiles:i.includes("system"),tempFiles:i.includes("temporary"),filesLargerThan:p&&f?{size:parseInt(f),unit:p.toUpperCase()}:null}};this.sourceDataForm.patchValue(O)}mapDestinationToForm(n){let t=n.TargetURL?Rt(n.TargetURL):null;t&&this.addDestinationFormGroup(t.destinationType,{custom:t.custom,dynamic:t.dynamic,advanced:t.advanced},!0)}#s(n){let t=Rt(n);t&&this.addDestinationFormGroup(t.destinationType,{custom:t.custom,dynamic:t.dynamic,advanced:t.advanced},!0)}mapGeneralToForm(n){let t=n.Settings?.find(r=>r.Name==="encryption-module"),o=t?.Value&&t.Value.length?t.Value:"",i={name:n.Name??"",description:n.Description??""};o&&o!==""&&(i.encryption=o),this.generalForm.patchValue(i)}mapScheduleToForm(n){if(!n){this.scheduleForm.patchValue({autoRun:!1});return}let t=this.#i.fromString(n.Repeat)??null,i={nextTime:this.#p(n.Time),runAgain:{repeatValue:t?.value??1,repeatUnit:t?.unit??"D",allowedDays:{mon:n.AllowedDays?.includes("mon")??!1,tue:n.AllowedDays?.includes("tue")??!1,wed:n.AllowedDays?.includes("wed")??!1,thu:n.AllowedDays?.includes("thu")??!1,fri:n.AllowedDays?.includes("fri")??!1,sat:n.AllowedDays?.includes("sat")??!1,sun:n.AllowedDays?.includes("sun")??!1}}};this.scheduleForm.patchValue(i)}mapOptionsToForms(n){let t=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than"],o=n.Settings?.filter(i=>![...t,"dblock-size"].includes(i.Name));this.settings.set(o??[]),o?.forEach(i=>{if(i.Name==="encryption-module")return this.generalForm.controls.encryption.setValue(i.Value??"");if(i.Name==="dblock-size"){let r=i.Value?.replace(/[^0-9]/g,""),p=i.Value?.replace(/[0-9]/g,"");return this.optionsForm.controls.remoteVolumeSize.setValue({size:r?parseInt(r):null,unit:p?p.toUpperCase():null})}})}getCurrentTargetUrl(){return this.#a(this.destinationForm.controls.destinations)}#l(){let n=this.generalForm.value,t=this.scheduleForm.value,o=this.sourceDataForm.value,r=this.destinationForm.value.destinations?.length?this.#a(this.destinationForm.controls.destinations):[],p=null;t.runAgain?.repeatUnit&&t.runAgain?.repeatValue&&(p=this.#i.toString(t.runAgain.repeatValue,t.runAgain.repeatUnit));let f=t.runAgain?.allowedDays?Object.entries(t.runAgain?.allowedDays).filter(([k,z])=>z).map(([k,z])=>k):[],O=o.path?.split("\0")??[],d=this.mapFormsToSettings(),G=Object.entries(o.excludes??{}).filter(([k,z])=>z&&k!=="filesLargerThan").map(([k])=>k),B=o.excludes?.filesLargerThan;return G.length&&d.push({Name:"--exclude-files-attributes",Value:G.join(",")}),B&&B.size!==null&&B.unit!==null&&d.push({Name:"--skip-files-larger-than",Value:`${B.size}${B.unit}`}),{Backup:{Name:n.name,Description:n.description,TargetURL:r[0]??null,Sources:O.filter(k=>!k.startsWith("-")),Settings:d,Filters:O.filter(k=>k.startsWith("-")).map((k,z)=>({Order:z,Include:!1,Expression:k.slice(1)}))},Schedule:t.autoRun?{Repeat:p,Time:t.nextTime?.date?new Date(`${t.nextTime.date}T${t.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:f}:null}}mapFormsToSettings(n=[]){let t=this.optionsForm.value,o=this.generalForm.value,i=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than"],r=[{Name:"--no-encryption",Value:"True"}];o.encryption!==""&&(r=[{Name:"encryption-module",Value:o.encryption??null},{Name:"passphrase",Value:o.password??null}]);let p=t.remoteVolumeSize?.size?{Name:"dblock-size",Value:`${t.remoteVolumeSize.size}${t.remoteVolumeSize.unit.toLowerCase()}`}:{Name:"dblock-size",Value:"50mb"},f=[...n,...i],O=this.settings().filter(d=>!f.includes(d.Name)).map(d=>{let G=d.Value;return typeof d.Value=="number"&&(G=d.Value.toString()),typeof d.Value=="boolean"&&(G=d.Value?"True":"False"),{Name:d.Name,Value:G}});return[...r,p,...O]}#a(n){return n.controls.map(t=>St(t.value))}#p(n){if(!n||n?.indexOf("T")===-1)return{time:n??"13:00"};let t=new Date(n),o={time:`${(""+t.getHours()).padStart(2,"0")}:${(""+t.getMinutes()).padStart(2,"0")}`};return n.indexOf("T")!==-1&&(o.date=t.toISOString().split("T")[0]),o}removeOptionFromFormGroup(n){let t=n.name;t&&(this.optionsForm.controls.advancedOptions.removeControl(t),this.selectedOptions.update(o=>(o=o.filter(i=>i.name!==t),o)))}addOptionToFormGroup(n,t){let o=this.optionsForm.controls.advancedOptions;this.createFormField(o,n,t??n.defaultValue),this.selectedOptions.update(i=>(i.push(n),i))}addFreeTextOption(n,t,o){let i=this.optionsForm.controls.advancedOptions,r=N({name:n,type:"String",defaultValue:t},o);this.createFormField(i,r,t),this.selectedOptions.update(p=>(p.push(r),p))}createFormField(n,t,o){if(t.type==="String"||t.type==="FileTree"||t.type==="FolderTree"||t.type==="Password"||t.type==="Enumeration"||t.type==="NonValidatedSelectableString"||t.type==="Path"){n.addControl(t.name,ue.control(o));return}if(t.type==="Size"){let i=(o??"").replace(/[0-9]/g,""),r=(o??"").replace(/[^0-9]/g,"");n.addControl(t.name,ue.group({size:ue.control(r?parseInt(r):50),unit:ue.control(i?i.toUpperCase():"MB")}));return}if(t.type==="Integer"){n.addControl(t.name,ue.control(o?parseInt(o):0));return}if(t.type==="Boolean"){n.addControl(t.name,ue.control(o==="true"||o==="True"));return}if(t.type==="Flags"){n.addControl(t.name,ue.control(o??""));return}if(t.type==="Timespan"||t.type==="DateTime"){n.addControl(t.name,ue.control(o,[Te.pattern(/([-+]?\d{1,3}[smhDWMY])+/)]));return}}addDestinationFormGroup(n,t,o=!1){let i=$e.find(E=>E.customKey===n||E.key===n),r=i?.key,p=this.destinationOptions().find(E=>E.Key===r),f=this.httpOptions();if(!p||!p.Options)return;let O=i&&i.oauthField?i.oauthField:null,d=i&&i.customFields?i.customFields:{},G=i&&i.dynamicFields?i.dynamicFields:[],B=i&&i.advancedFields?i.advancedFields:[],k=i&&i.ignoredAdvancedFields?i.ignoredAdvancedFields:[];this.destinationFormPair.set({oauthField:O,custom:[],dynamic:[],advanced:[]});let z=ue.group({}),ae=ue.group({}),q=ue.group({});d&&Object.entries(d).forEach(([E,A],L)=>{let _e=A,{formElement:M}=_e,ne=Ut(_e,["formElement"]);z.addControl(E,M(t?.custom[E])),this.destinationFormPair.update(se=>(se.custom.push(N({order:900+L},ne)),se))});for(let E=0;E<p.Options.length;E++){let A=p.Options[E];if(A.Deprecated)continue;let L=G.find(M=>M===A.Name||M.name===A.Name);if(L){let M=L&&typeof L!="string",ne=M?L?.defaultValue??A.DefaultValue:A.DefaultValue,_e={name:A.Name,type:A.Type,shortDescription:A.ShortDescription??void 0,longDescription:A.LongDescription??void 0,options:A.ValidValues,order:900+E},se=M?N(N({},_e),L):_e,rt=t?.dynamic[A.Name]??ne??A.DefaultValue;this.createFormField(ae,se,rt),this.destinationFormPair.update(Ue=>(Ue.dynamic.push(se),Ue))}else{if(k.find(de=>de===A.Name))continue;let ne=B.find(de=>de===A.Name||de.name===A.Name),_e=ne&&typeof ne!="string",se=t?.advanced[A.Name],w=se??A.DefaultValue,rt={name:A.Name,type:A.Type,shortDescription:A.ShortDescription??void 0,longDescription:A.LongDescription??void 0,options:A.ValidValues,defaultValue:w,order:900+E},Ue=_e?N(N({},rt),ne):rt;o&&se&&(this.createFormField(q,Ue,w),this.selectedAdvancedFormPair.update(de=>(de.push(Ue),de))),this.destinationFormPair.update(de=>(de.advanced.push(Ue),de))}}for(let E=0;E<f.length;E++){let A=f[E],L=t?.advanced[A.name],M=L??A.defaultValue;o&&L&&(this.createFormField(q,A,M),this.selectedHttpOptions.update(ne=>(ne.push(A),ne)))}this.destinationFormPair.update(E=>({oauthField:E.oauthField,custom:E.custom.sort((A,L)=>A.order-L.order),dynamic:E.dynamic.sort((A,L)=>A.order-L.order),advanced:E.advanced.sort((A,L)=>A.order-L.order)})),this.destinationForm.controls.destinations.push(_n({key:i?.customKey??n,customGroup:z,dynamicGroup:ae,advancedGroup:q}))}#c(){this.generalForm.reset(),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset(),this.sourceDataForm.reset(),this.scheduleForm.reset(),this.optionsForm.reset()}static \u0275fac=function(t){return new(t||e)};static \u0275prov=Me({token:e,factory:e.\u0275fac,providedIn:"root"})};var Qn=["formRef"],Yn=(e,n,t,o)=>({index:e,formView:n,formGroupName:"custom",destinationType:t,oauthField:o}),Dt=e=>({$implicit:e}),Zn=(e,n,t,o)=>({index:e,formView:n,formGroupName:"dynamic",destinationType:t,oauthField:o}),Jn=(e,n,t,o)=>({index:e,formView:n,formGroupName:"advanced",destinationType:t,oauthField:o}),eo=(e,n,t,o)=>({index:e,formView:n,formGroupName:"advanced",asHttpOptions:!0,destinationType:t,oauthField:o}),to=()=>({maxWidth:"700px",width:"100%"});function no(e,n){e&1&&(C(0,5,2),u(1,"spk-icon"),S())}function oo(e,n){e&1&&I(0,5,3)}function io(e,n){if(e&1){let t=x();C(0,5,1),s(1,"button",21),P("click",function(){T(t);let i=c();return h(i.testDestination())}),_(2,no,2,0)(3,oo,1,0),a(),S()}if(e&2){let t=c();l(),ke("success",t.successfulTest()),l(),D(t.successfulTest()?2:3)}}function ro(e,n){if(e&1){let t=x();s(0,"p",27),P("click",function(){T(t);let i=c();return h(i.removeDestinationFormGroup(i.destinationCount()-1))}),C(1,8),u(2,"span",28),S(),a()}}function ao(e,n){if(e&1){let t=x();s(0,"div",34),P("click",function(){let i=T(t).$implicit,r=c(2);return h(r.addDestinationFormGroup(i.key))}),s(1,"h3"),F(2),a(),s(3,"p"),F(4),a()()}if(e&2){let t=n.$implicit;l(2),Ot(t.displayName),l(2),Ot(t.description)}}function so(e,n){if(e&1){let t=x();s(0,"button",35,1),P("click",function(){let i=T(t).$implicit,r=c(2);return h(r.addDestinationFormGroup(i.key))}),F(2),a()}if(e&2){let t=n.$implicit;l(2),K(" ",t.displayName," ")}}function lo(e,n){if(e&1&&(s(0,"div",29),pe(1,ao,5,2,"div",30,le),a(),s(3,"spk-menu",31)(4,"button",32),I(5,9),a(),X(6,20),pe(7,so,3,1,"button",33,le),H(),a()),e&2){let t=c();l(),ce(t.destinationTypeOptionsFocused()),l(2),m("searchable",!0),l(4),ce(t.destinationTypeOptionsNotFocused())}}function po(e,n){e&1&&tt(0)}function co(e,n){if(e&1&&_(0,po,1,0,"ng-container",40),e&2){let t,o=n.$implicit,i=n.$index;c();let r=me(29),p=c();m("ngTemplateOutlet",r)("ngTemplateOutletContext",nt(7,Dt,ot(2,Yn,i,o,(t=p.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,p.destinationFormPair().oauthField)))}}function mo(e,n){e&1&&tt(0)}function uo(e,n){if(e&1&&_(0,mo,1,0,"ng-container",40),e&2){let t,o=n.$implicit,i=n.$index;c();let r=me(29),p=c();m("ngTemplateOutlet",r)("ngTemplateOutletContext",nt(7,Dt,ot(2,Zn,i,o,(t=p.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,p.destinationFormPair().oauthField)))}}function _o(e,n){if(e&1){let t=x();C(0,10,1),s(1,"button",35,1),P("click",function(){let i=T(t).$implicit,r=c(2);return h(r.addAdvancedFormPair(i,0))}),a(),S()}if(e&2){let t=n.$implicit;l(),At(t.name),Nt(0)}}function Fo(e,n){e&1&&tt(0)}function go(e,n){if(e&1&&_(0,Fo,1,0,"ng-container",40),e&2){let t,o=n.$implicit,i=n.$index;c();let r=me(29),p=c();m("ngTemplateOutlet",r)("ngTemplateOutletContext",nt(7,Dt,ot(2,Jn,i,o,(t=p.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,p.destinationFormPair().oauthField)))}}function Co(e,n){if(e&1){let t=x();C(0,11,1),s(1,"button",35,1),P("click",function(){let i=T(t).$implicit,r=c(2);return h(r.addHttpOption(i,0))}),a(),S()}if(e&2){let t=n.$implicit;l(),At(t.name),Nt(0)}}function So(e,n){e&1&&tt(0)}function fo(e,n){if(e&1&&_(0,So,1,0,"ng-container",40),e&2){let t,o=n.$implicit,i=n.$index;c();let r=me(29),p=c();m("ngTemplateOutlet",r)("ngTemplateOutletContext",nt(7,Dt,ot(2,eo,i,o,(t=p.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,p.destinationFormPair().oauthField)))}}function To(e,n){if(e&1&&(s(0,"spk-tooltip",49)(1,"spk-icon"),F(2,"question"),a()()),e&2){let t=c(2).$implicit;m("message",t.formView.longDescription)}}function ho(e,n){if(e&1&&(s(0,"app-file-tree",43)(1,"label",48),F(2),_(3,To,3,1,"spk-tooltip",49),a(),u(4,"input",50),a()),e&2){let t,o=c().$implicit,i=c(2);m("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name))("accepts",o.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),V("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),K(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),D(o.formView.longDescription?3:-1),l(),V("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),ge("formControlName",o.formView.name)}}function Do(e,n){if(e&1&&(s(0,"spk-tooltip",49)(1,"spk-icon"),F(2,"question"),a()()),e&2){let t=c(2).$implicit;m("message",t.formView.longDescription)}}function Eo(e,n){if(e&1&&(s(0,"app-file-tree",44)(1,"label",48),F(2),_(3,Do,3,1,"spk-tooltip",49),a(),u(4,"input",50),a()),e&2){let t,o=c().$implicit,i=c(2);m("hideShortcuts",!0)("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name)),l(),V("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),K(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),D(o.formView.longDescription?3:-1),l(),V("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),ge("formControlName",o.formView.name)}}function yo(e,n){if(e&1&&(s(0,"spk-tooltip",49)(1,"spk-icon"),F(2,"question"),a()()),e&2){let t=c(2).$implicit;m("message",t.formView.longDescription)}}function Po(e,n){e&1&&(s(0,"spk-icon",52),F(1,"link"),a())}function Ao(e,n){e&1&&(s(0,"spk-icon",52),F(1,"envelope"),a())}function No(e,n){e&1&&(s(0,"spk-icon",52),F(1,"textbox"),a())}function Oo(e,n){if(e&1&&(s(0,"spk-form-field")(1,"label",48),F(2),_(3,yo,3,1,"spk-tooltip",49),a(),u(4,"input",51),_(5,Po,2,0,"spk-icon",52)(6,Ao,2,0,"spk-icon",52)(7,No,2,0,"spk-icon",52),a()),e&2){let t,o=c().$implicit;l(),V("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),K(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),D(o.formView.longDescription?3:-1),l(),V("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),ge("formControlName",o.formView.name),m("type",o.formView.type==="Email"?"email":"text"),l(),D(o.formView.type==="Path"?5:o.formView.type==="Email"?6:7)}}function ko(e,n){if(e&1){let t=x();s(0,"span",56),P("click",function(){T(t);let i=c(2).$implicit,r=c(2);return h(r.oauthStartTokenCreation(i.destinationType))}),F(1,"AuthID"),a()}}function $o(e,n){e&1&&(s(0,"spk-icon",52),F(1,"password"),a())}function Io(e,n){if(e&1){let t=x();s(0,"spk-icon",57),P("click",function(){T(t);let i=c(2).$implicit;return h(i.formView.showPassword=!i.formView.showPassword)}),F(1," eye "),a()}}function Mo(e,n){if(e&1){let t=x();s(0,"spk-icon",57),P("click",function(){T(t);let i=c(2).$implicit;return h(i.formView.showPassword=!i.formView.showPassword)}),F(1," eye-slash "),a()}}function Ro(e,n){if(e&1&&(s(0,"spk-form-field")(1,"label",48),F(2),a(),u(3,"input",53),_(4,ko,2,0,"span",54)(5,$o,2,0,"spk-icon",52)(6,Io,2,0,"spk-icon",55)(7,Mo,2,0,"spk-icon",55),a()),e&2){let t,o=c().$implicit;l(),V("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),K(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),V("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),ge("formControlName",o.formView.name),m("type",o.formView.showPassword?"text":"password"),l(),D(o.oauthField===o.formView.name?4:5),l(2),D(o.formView.showPassword?6:7)}}function vo(e,n){if(e&1&&(s(0,"spk-tooltip",49)(1,"spk-icon"),F(2,"question"),a()()),e&2){let t=c(3).$implicit;m("message",t.formView.longDescription)}}function xo(e,n){if(e&1&&F(0),e&2){let t=n.$implicit;K(" ",t," ")}}function wo(e,n){if(e&1&&(s(0,"spk-select",58)(1,"label",48),F(2),_(3,vo,3,1,"spk-tooltip",49),a(),u(4,"input",50),a(),_(5,xo,1,1,"ng-template",null,3,it)),e&2){let t,o=me(6);c();let i=It(0),r=c().$implicit;m("options",i)("isClearable",!1)("optionTemplate",o),l(),V("for","destination-",r.formGroupName,"-",r.index,"-",r.asHttpOptions?"http":"other",""),l(),K(" ",(t=r.formView.shortDescription)!==null&&t!==void 0?t:r.formView.name," "),l(),D(r.formView.longDescription?3:-1),l(),V("id","destination-",r.formGroupName,"-",r.index,"-",r.asHttpOptions?"http":"other",""),ge("formControlName",r.formView.name)}}function bo(e,n){if(e&1&&(kt(0),_(1,wo,7,14)),e&2){let t=c().$implicit,o=$t(t.formView.loadOptions?t.formView.loadOptions(c(2).injector)():t.formView.options);l(),D(o?1:-1)}}function Go(e,n){if(e&1&&(s(0,"spk-tooltip",49)(1,"spk-icon"),F(2,"question"),a()()),e&2){let t=c(3).$implicit;m("message",t.formView.longDescription)}}function Lo(e,n){if(e&1&&F(0),e&2){let t=n.$implicit;Ht(" ",t.key," ",t.value?"("+t.value+")":""," ")}}function Uo(e,n){if(e&1&&(s(0,"spk-select",60)(1,"label",48),F(2),_(3,Go,3,1,"spk-tooltip",49),a(),u(4,"input",50),a(),_(5,Lo,1,2,"ng-template",null,4,it)),e&2){let t,o=me(6);c();let i=It(0),r=c().$implicit;m("options",i)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",o),l(),V("for","destination-",r.formGroupName,"-",r.index,"-",r.asHttpOptions?"http":"other",""),l(),K(" ",(t=r.formView.shortDescription)!==null&&t!==void 0?t:r.formView.name," "),l(),D(r.formView.longDescription?3:-1),l(),V("id","destination-",r.formGroupName,"-",r.index,"-",r.asHttpOptions?"http":"other",""),ge("formControlName",r.formView.name)}}function Vo(e,n){e&1&&u(0,"spk-progress-bar",59)}function Bo(e,n){if(e&1&&(kt(0),_(1,Uo,7,15)(2,Vo,1,0,"spk-progress-bar",59)),e&2){let t=c().$implicit,o=$t(t.formView.loadOptions?t.formView.loadOptions(c(2).injector)():t.formView.options);l(),D(o?1:2)}}function Ko(e,n){if(e&1&&(s(0,"spk-tooltip",49)(1,"spk-icon"),F(2,"question"),a()()),e&2){let t=c(2).$implicit;m("message",t.formView.longDescription)}}function zo(e,n){if(e&1&&(s(0,"div",45)(1,"label",48),F(2),_(3,Ko,3,1,"spk-tooltip",49),a(),s(4,"div",61)(5,"spk-form-field"),u(6,"input",62),s(7,"spk-icon",52),F(8,"resize"),a()(),s(9,"spk-select",63),u(10,"input",64),a()()()),e&2){let t,o=c().$implicit,i=c(2);m("formGroupName",o.formView.name),l(),V("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),K(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),D(o.formView.longDescription?3:-1),l(3),V("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(3),m("options",i.sizeOptions())("inlineSearch",!0)}}function Xo(e,n){if(e&1&&(s(0,"spk-tooltip",49)(1,"spk-icon"),F(2,"question"),a()()),e&2){let t=c(2).$implicit;m("message",t.formView.longDescription)}}function Ho(e,n){if(e&1&&(s(0,"spk-form-field")(1,"label",48),F(2),_(3,Xo,3,1,"spk-tooltip",49),a(),u(4,"input",65),s(5,"spk-icon",52),F(6,"numpad"),a()()),e&2){let t,o=c().$implicit;l(),V("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),K(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),D(o.formView.longDescription?3:-1),l(),V("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),ge("formControlName",o.formView.name)}}function jo(e,n){if(e&1&&(s(0,"spk-tooltip",49)(1,"spk-icon"),F(2,"question"),a()()),e&2){let t=c(2).$implicit;m("message",t.formView.longDescription)}}function Wo(e,n){if(e&1&&(s(0,"spk-toggle",46)(1,"label",48),F(2),_(3,jo,3,1,"spk-tooltip",49),a(),u(4,"input",66),a()),e&2){let t,o=c().$implicit;l(),V("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),K(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),D(o.formView.longDescription?3:-1),l(),V("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),ge("formControlName",o.formView.name)}}function qo(e,n){if(e&1&&(s(0,"spk-tooltip",49)(1,"spk-icon"),F(2,"question"),a()()),e&2){let t=c(2).$implicit;m("message",t.formView.longDescription)}}function Qo(e,n){if(e&1&&F(0),e&2){let t=n.$implicit;K(" ",t," ")}}function Yo(e,n){if(e&1&&(s(0,"spk-select",67)(1,"label",48),F(2),_(3,qo,3,1,"spk-tooltip",49),a(),u(4,"input",68),a(),_(5,Qo,1,1,"ng-template",null,4,it)),e&2){let t,o=me(6),i=c().$implicit;m("options",i.formView.options)("selectMultiple",!0)("optionTemplate",o),l(),Xt("for","destination-",i.formGroupName,"-",i.index,""),l(),K(" ",(t=i.formView.shortDescription)!==null&&t!==void 0?t:i.formView.name," "),l(),D(i.formView.longDescription?3:-1),l(),ge("formControlName",i.formView.name)}}function Zo(e,n){if(e&1&&(s(0,"spk-tooltip",49)(1,"spk-icon"),F(2,"question"),a()()),e&2){let t=c(2).$implicit;m("message",t.formView.longDescription)}}function Jo(e,n){if(e&1&&(s(0,"app-timespan",47)(1,"label",48),F(2),_(3,Zo,3,1,"spk-tooltip",49),a()()),e&2){let t,o=c().$implicit;m("formControlName",o.formView.name)("customId","destination-"+o.formGroupName+"-"+o.index+"-"+(o.asHttpOptions?"http":"other")),l(),V("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),K(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),D(o.formView.longDescription?3:-1)}}function ei(e,n){if(e&1){let t=x();s(0,"button",69),P("click",function(){T(t);let i=c().$implicit,r=c(2);return h(r.removeFormView(i.formView,0))}),s(1,"spk-icon"),F(2,"x-circle"),a()()}}function ti(e,n){if(e&1&&(s(0,"div",41),X(1,42),_(2,ho,5,17,"app-file-tree",43)(3,Eo,5,13,"app-file-tree",44)(4,Oo,8,13,"spk-form-field")(5,Ro,8,13,"spk-form-field")(6,bo,2,2)(7,Bo,3,2)(8,zo,11,13,"div",45)(9,Ho,7,11,"spk-form-field")(10,Wo,5,11,"spk-toggle",46)(11,Yo,7,9)(12,Jo,4,8,"app-timespan",47),H(),_(13,ei,3,0,"button",32),a()),e&2){let t=n.$implicit;ke("single-field",t.formGroupName!=="advanced"),l(),m("formGroupName",t.formGroupName),l(),D(t.formView.type==="FileTree"?2:t.formView.type==="FolderTree"?3:t.formView.type==="String"||t.formView.type==="Path"||t.formView.type==="Email"?4:t.formView.type==="Password"?5:t.formView.type==="Enumeration"?6:t.formView.type==="NonValidatedSelectableString"?7:t.formView.type==="Size"?8:t.formView.type==="Integer"?9:t.formView.type==="Boolean"?10:t.formView.type==="Flags"?11:t.formView.type==="Timespan"||t.formView.type==="DateTime"?12:-1),l(11),D(t.formGroupName==="advanced"?13:-1)}}function ni(e,n){if(e&1&&(X(0,22)(1,36),pe(2,co,1,9,"ng-container",null,le),pe(4,uo,1,9,"ng-container",null,le),s(6,"app-toggle-card",37),X(7,38),C(8,10),s(9,"spk-menu",31)(10,"button",39),u(11,"spk-icon"),a(),X(12,20),pe(13,_o,3,1,"button",33,le),H(),a(),S(),H(),pe(15,go,1,9,"ng-container",null,le),a(),s(17,"app-toggle-card",37),X(18,38),C(19,11),s(20,"spk-menu",31)(21,"button",39),u(22,"spk-icon"),a(),X(23,20),pe(24,Co,3,1,"button",33,le),H(),a(),S(),H(),pe(26,fo,1,9,"ng-container",null,le),a(),_(28,ti,14,5,"ng-template",null,2,it),H()()),e&2){let t=c();l(2),ce(t.destinationFormPair().custom),l(2),ce(t.destinationFormPair().dynamic),l(2),m("disallowToggle",!0),l(3),m("searchable",!0),l(),m("disabled",t.notSelectedAdvancedFormPair().length===0),l(3),ce(t.notSelectedAdvancedFormPair()),l(2),ce(t.selectedAdvancedFormPair()),l(2),m("disallowToggle",!0),l(3),m("searchable",!0),l(),m("disabled",t.notSelectedHttpOptions().length===0),l(3),ce(t.notSelectedHttpOptions()),l(2),ce(t.selectedHttpOptions())}}function oi(e,n){if(e&1){let t=x();s(0,"spk-dialog",70),Le("isOpenChange",function(i){T(t);let r=c();return Ge(r.targetUrlDialogOpen,i)||(r.targetUrlDialogOpen=i),h(i)}),s(1,"header",71)(2,"h2"),I(3,12),a(),s(4,"spk-alert",72),I(5,13),a()(),s(6,"div",73)(7,"spk-form-field"),u(8,"textarea",74),a()(),s(9,"footer",75)(10,"button",24),P("click",function(){T(t);let i=c();return h(i.closeTargetUrlDialog(!1))}),F(11,"Cancel"),a(),s(12,"button",76),P("click",function(){T(t);let i=c();return h(i.closeTargetUrlDialog(!0))}),C(13,14),u(14,"spk-icon"),S(),a()()()}if(e&2){let t=c();be("isOpen",t.targetUrlDialogOpen),m("options",st(3,to)),l(8),m("formControl",t.targetUrlCtrl)}}var ii=["Bytes","KB","MB","GB","TB","PB"],ht=new te,un=(e={destinations:[]})=>ht.group({destinations:ht.array(e.destinations)}),_n=({key:e,customGroup:n,dynamicGroup:t,advancedGroup:o})=>ht.group({destinationType:ht.control(e),custom:n,dynamic:t,advanced:o}),Lt=class e{#e=$(oe);#t=$(fe);#o=$(qt);#i=$(Be);#n=$(re);#r=$(Yt);injector=$(Vt);formRef=Fe.required("formRef");destinationForm=this.#n.destinationForm;destinationFormPair=this.#n.destinationFormPair;selectedAdvancedFormPair=this.#n.selectedAdvancedFormPair;notSelectedAdvancedFormPair=this.#n.notSelectedAdvancedFormPair;selectedHttpOptions=this.#n.selectedHttpOptions;notSelectedHttpOptions=this.#n.notSelectedHttpOptions;destinationOptions=this.#n.destinationOptions;destinationFormSignal=this.#n.destinationFormSignal;destinationCount=b(()=>this.destinationFormSignal()?.destinations?.length??0);sizeOptions=y(ii);successfulTest=y(!1);destinationTypeOptionsInFocus=y(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=y($e.map(n=>({key:n.customKey??n.key,customKey:n.customKey??null,displayName:n.displayName,description:n.description})));destinationTypeOptionsFocused=b(()=>{let n=this.destinationTypeOptionsInFocus(),t=this.destinationTypeOptions();return n.map(o=>t.find(i=>i.key===o))});destinationTypeOptionsNotFocused=b(()=>{let n=this.destinationTypeOptionsInFocus();return this.destinationTypeOptions().filter(o=>!n.includes(o.key))});getFormFieldValue(n,t,o){return((this.destinationForm.controls.destinations.controls?.[n]).controls?.[t]).controls[o].value}addDestinationFormGroup(n){this.#n.addDestinationFormGroup(n)}addAdvancedFormPair(n,t){this.#n.addAdvancedFormPair(n,t)}removeFormView(n,t){this.#n.removeAdvancedFormPair(n,t)}addHttpOption(n,t){this.#n.addHttpOption(n,t)}targetUrl=b(()=>this.#n.getCurrentTargetUrl()[0]);targetUrlCtrl=new ut;targetUrlInitial=y(null);targetUrlDialogOpen=y(!1);openTargetUrlDialog(){let t=this.#n.getCurrentTargetUrl()[0];this.targetUrlCtrl.setValue(t),this.targetUrlInitial.set(t),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(n=!1){this.targetUrlDialogOpen.set(!1);let t=this.targetUrlCtrl.value,o=this.targetUrlInitial();!n||t===o||this.#n.updateFieldsFromTargetUrl(this.targetUrlCtrl.value)}testDestination(n=0){let o=this.#n.getCurrentTargetUrl()[n];o&&this.#i.postApiV1RemoteoperationTest({requestBody:{path:o}}).subscribe({next:()=>{this.successfulTest.set(!0),setTimeout(()=>{this.successfulTest.set(!1)},3e3)},error:i=>{let r=i.error.error.Error;if(this.successfulTest.set(!1),r==="missing-folder"){this.#r.open(He,{data:{title:$localize`Create folder`,message:$localize`The remote destination folder does not exist, do you want to create it?`},closed:p=>{p&&this.#i.postApiV1RemoteoperationCreate({requestBody:{path:o}}).subscribe()}});return}if(r.startsWith("incorrect-cert:")){let p=r.split("incorrect-cert:")[1];this.#r.open(He,{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: ${p}`,confirmText:"Trust the certificate",cancelText:"Cancel"},closed:f=>{f&&this.#n.addHttpOptionByName("accept-specified-ssl-hash",p)}});return}if(r.startsWith("incorrect-host-key:")){let p=r.split('incorrect-host-key:"')[1].split('",')[0],f=r.split('accepted-host-key:"')[1].split('",')[0];f?this.#r.open(He,{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 ${f}
6
+ with the REPORTED host key: ${p}?`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:O=>{O&&this.#n.addAdvancedFormPairByName("ssh-fingerprint",n,p)}}):this.#r.open(He,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:$localize`No certificate was specified, please verify that the reported host key is correct: ${p}`,confirmText:"Approve",cancelText:"Cancel"},closed:O=>{O&&this.#n.addAdvancedFormPairByName("ssh-fingerprint",n,p)}});return}this.#r.open(He,{maxWidth:"500px",data:{title:$localize`Test connection failed`,message:r,cancelText:"OK"},closed:p=>{}})}})}mapToTargetUrl(n){return St(n.value)}removeDestinationFormGroup(n){this.destinationForm.controls.destinations.removeAt(n)}displayFn(n){let t=this.destinationOptions().find(o=>o.Key===n);return t?`${t.DisplayName}`:""}goBack(){this.#e.navigate(["general"],{relativeTo:this.#t.parent})}next(){this.#e.navigate(["source-data"],{relativeTo:this.#t.parent})}#s=y("https://duplicati-oauth-handler.appspot.com/").asReadonly();#l=y(Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)).asReadonly();#a=y(!1);#p=y(null);keyCreation(){}oauthStartTokenCreation(n){this.#a.set(!0);let t=450,o=600,i=this.#s()+"?type="+n+"&token="+this.#l(),r=screen.width/2-t/2,p=screen.height/2-o/2,f=window.open(i,"_blank","height="+o+",width="+t+",menubar=0,status=0,titlebar=0,toolbar=0,left="+r+",top="+p);f?.addEventListener("blur",O=>{console.log("event blur",O)}),f?.addEventListener("beforeunload",O=>{console.log("event beforeunload",O),this.#o.get(this.#s()+"fetch?callback=JSON_CALLBACK",{params:{token:this.#l()}}).pipe(Je(()=>this.#a.set(!1))).subscribe({next:d=>{console.log("res",d),d?.authid&&this.#p.set(d.authid)}})})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=Q({type:e,selectors:[["app-destination"]],viewQuery:function(t,o){t&1&&Ce(o.formRef,Qn,5),t&2&&Se()},decls:24,vars:6,consts:()=>{let n;n=$localize` Backup destination ${"\uFFFD#5\uFFFD"}:START_TAG_DIV:${"\uFFFD*6:1\uFFFD"}:START_BLOCK_IF_1:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON:${"\uFFFD*2:2\uFFFD"}:START_BLOCK_IF: Connected ${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/*2:2\uFFFD|\uFFFD/*6:1\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*3:3\uFFFD"}:START_BLOCK_ELSE: Test destination ${"\uFFFD/*3:3\uFFFD"}:CLOSE_BLOCK_ELSE:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*2:2\uFFFD|\uFFFD/*6:1\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD#7\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:dots-three-vertical${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#10\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD#11\uFFFD"}:START_TAG_BUTTON_2:${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:link${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON: Edit target URL ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SPK_MENU:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_DIV:`,n=we(n);let t;t=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let o;o=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let i;i=$localize` Want to select another destination? ${"\uFFFD#2\uFFFD"}:START_TAG_SPAN:Click here${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPAN:`;let r;r=$localize`Other destinations`;let p;p=$localize` Advanced options ${"\uFFFD#9\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#10\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#11\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#10\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#12\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*14:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#10\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*14:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_MENU:`,p=we(p);let f;f=$localize` Http options ${"\uFFFD#20\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#21\uFFFD"}:START_TAG_BUTTON: Add http option ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#21\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#23\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*25:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#21\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*25:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#23\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#20\uFFFD"}:CLOSE_TAG_SPK_MENU:`,f=we(f);let O;O=$localize`Select an option...`;let d;d=$localize`Edit target URL`;let G;G=$localize` Be careful, this will overwrite everything you have in your destination. `;let B;return B=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],["option",""],["fieldTemplate",""],["enumOptionTemplate",""],["optionTemplate",""],n,t,o,i,r,p,f,d,G,B,[3,"submit","formGroup"],[1,"title-30"],[1,"actions"],["spk-button","","type","button",1,"small",3,"success"],["spk-button","","type","button",1,"small"],["menu",""],["spk-button","","type","button",1,"small",3,"click"],["formArrayName","destinations"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[3,"isOpen","options"],[3,"click"],[1,"spk-primary"],[1,"most-common-destinations"],[1,"tile"],[3,"searchable"],["spk-button","","type","button",1,"outlined"],["type","button"],[1,"tile",3,"click"],["type","button",3,"click"],["formGroupName","0"],[3,"disallowToggle"],["title",""],["spk-button","","type","button",1,"outlined","small",3,"disabled"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"field-row"],[3,"formGroupName"],[3,"startingPath","accepts","showFiles","hideShortcuts","showHiddenNodes","selectFiles"],[3,"hideShortcuts","startingPath"],[1,"form-column",3,"formGroupName"],[1,"primary","raised"],[3,"formControlName","customId"],[3,"for"],[1,"primary",3,"message"],["type","text",3,"id","formControlName"],[3,"type","id","formControlName"],["prefix",""],["autocomplete","off",3,"type","id","formControlName"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],[3,"options","isClearable","optionTemplate"],[1,"indeterminate","primary"],["label","key","value","value",3,"options","asFreeText","inlineSearch","optionTemplate"],[1,"form-row"],["type","number","formControlName","size",3,"id"],["placeholder",O,3,"options","inlineSearch"],["type","text","formControlName","unit"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],[1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["type","text","id","text",3,"formControlName"],["spk-button","","type","button",1,"outlined",3,"click"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"warning"],["content",""],["id","targetUrl","autocomplete","off",3,"formControl"],["footer",""],["spk-button","","type","submit",1,"raised","primary",3,"click"]]},template:function(t,o){if(t&1){let i=x();s(0,"form",15,0),P("submit",function(){return T(i),h(o.next())}),s(2,"header")(3,"h3",16),C(4,5),s(5,"div",17),_(6,io,4,3,"button",18),s(7,"spk-menu")(8,"button",19),u(9,"spk-icon"),a(),X(10,20),s(11,"button",21),P("click",function(){return T(i),h(o.openTargetUrlDialog())}),u(12,"spk-icon"),a(),H(),a()(),S(),a(),_(13,ro,3,0,"p"),a(),_(14,lo,9,1)(15,ni,30,6,"ng-container",22),s(16,"div",23)(17,"button",24),P("click",function(){return T(i),h(o.goBack())}),C(18,6),u(19,"spk-icon"),S(),a(),s(20,"button",25),C(21,7),u(22,"spk-icon"),S(),a()()(),_(23,oi,15,4,"spk-dialog",26)}if(t&2){let i;m("formGroup",o.destinationForm),l(6),D(o.destinationCount()>0?6:-1),l(7),D(o.destinationCount()>0?13:-1),l(),D(o.destinationCount()===0?14:-1),l(),D(!((i=o.destinationFormSignal())==null||i.destinations==null)&&i.destinations.length?15:-1),l(8),D(o.targetUrlDialogOpen()?23:-1)}},dependencies:[Ae,De,J,Ee,ze,ee,he,dt,ye,Pe,ve,en,Wt,Y,Zt,ie,Ke,ct,Qt,lt,Z,pt,gt,je,Ft],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] spk-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.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}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 1fr;gap:.5rem;align-items:flex-end}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-500)}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-level-40);border-radius:var(--shape-3);box-shadow:var(--shadow-1);background-color:var(--base-level-20);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-500)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}spk-select[_ngcontent-%COMP%]{--miw: p2r(120)}"],changeDetection:0})};export{gt as a,St as b,$e as c,un as d,_n as e,Lt as f,rn as g,xt as h,vt as i,sn as j,wt as k,pn as l,bt as m,mn as n,Gt as o,re as p};
@@ -1 +1 @@
1
- import{b as k,c as v,d as P,e as O,h as x,m as E,p as F,q as G,s as T}from"./chunk-LHSJLKCF.js";import{d as M}from"./chunk-N7UCCMLS.js";import{c as y}from"./chunk-WBNOGAKJ.js";import"./chunk-G3YJXHRY.js";import{a as S,b,g as L,l as N}from"./chunk-PUSUA4U7.js";import"./chunk-L3T52MCL.js";import"./chunk-4XPN5ZGE.js";import"./chunk-3GK4TNUH.js";import{Ab as t,Bb as i,Cb as p,D as c,Qa as m,Sb as w,X as s,db as g,fc as n,ib as f,rb as h,sa as l,tb as _,wb as C}from"./chunk-PTC4N7TU.js";import"./chunk-7CGTOI24.js";function A(r,e){r&1&&(t(0,"spk-alert",1),n(1," Remember to enter a password, if you can't remember the password open the duplicati client on the machine in question and make sure you open it through the tray icon then go into settings to change the password. "),i())}var u=new G,d=class r{#e=s(y);#t=s(M);failedLogin=l(!1);isLoading=l(!1);loginForm=u.group({user:u.control(""),pass:u.control("",v.required)});submit(){let e=this.loginForm.value.pass;this.loginForm.value.user||e&&(this.isLoading.set(!0),this.#t.login(e).pipe(c(()=>{this.isLoading.set(!1),this.failedLogin.set(!0)})).subscribe({next:()=>this.#e.navigate(["/"])}))}static \u0275fac=function(o){return new(o||r)};static \u0275cmp=g({type:r,selectors:[["app-login"]],decls:15,vars:4,consts:()=>{let e;return e=$localize`Enter your password`,[[3,"submit","formGroup"],["type","warning"],[1,"login-row"],["type","text","hidden","","autocomplete","off","name","username","formControlName","user"],["for","password"],["href","https://docs.duplicati.com/detailed-descriptions/duplicati-access-password","target","_blank","rel","noopener noreferrer"],["type","password","name","password","autocomplete","current-password","placeholder",e,"tabindex","1","formControlName","pass"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(o,a){o&1&&(t(0,"form",0),w("submit",function(){return a.submit()}),f(1,A,2,0,"spk-alert",1),t(2,"div",2),p(3,"input",3),t(4,"spk-form-field")(5,"label",4),n(6," Password "),t(7,"a",5)(8,"spk-icon"),n(9,"question"),i()()(),p(10,"input",6),i(),t(11,"button",7),n(12," Login "),t(13,"spk-icon"),n(14,"arrow-right"),i()()()()),o&2&&(h("formGroup",a.loginForm),m(),C(a.failedLogin()?1:-1),m(10),_("loader",a.isLoading()))},dependencies:[T,x,k,P,O,E,F,N,S,L,b],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{width:100vw;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.5rem}spk-alert[_ngcontent-%COMP%]{max-width:20rem;margin:0 auto}h3[_ngcontent-%COMP%]{font:var(--title-30)}.login-row[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}"],changeDetection:0})};export{d as default};
1
+ import{c as k,d as v,e as P,f as O,i as x,n as E,q as F,r as G,t as T}from"./chunk-BSJ6OMWB.js";import{d as M}from"./chunk-W4U2FPZX.js";import{d as y}from"./chunk-NQYRWS7A.js";import"./chunk-2X7AJBJY.js";import{a as S,b,g as L,l as N}from"./chunk-3WHFK5U5.js";import"./chunk-64CRTZO6.js";import"./chunk-VDB64BFB.js";import"./chunk-ERQAUCCL.js";import{Ab as t,Bb as i,Cb as p,D as c,Ra as m,Sb as w,X as s,db as g,fc as n,ib as f,rb as h,sa as l,tb as _,wb as C}from"./chunk-RY7J7BHG.js";import"./chunk-7CGTOI24.js";function A(r,e){r&1&&(t(0,"spk-alert",1),n(1," Remember to enter a password, if you can't remember the password open the duplicati client on the machine in question and make sure you open it through the tray icon then go into settings to change the password. "),i())}var u=new G,d=class r{#e=s(y);#t=s(M);failedLogin=l(!1);isLoading=l(!1);loginForm=u.group({user:u.control(""),pass:u.control("",v.required)});submit(){let e=this.loginForm.value.pass;this.loginForm.value.user||e&&(this.isLoading.set(!0),this.#t.login(e).pipe(c(()=>{this.isLoading.set(!1),this.failedLogin.set(!0)})).subscribe({next:()=>this.#e.navigate(["/"])}))}static \u0275fac=function(o){return new(o||r)};static \u0275cmp=g({type:r,selectors:[["app-login"]],decls:15,vars:4,consts:()=>{let e;return e=$localize`Enter your password`,[[3,"submit","formGroup"],["type","warning"],[1,"login-row"],["type","text","hidden","","autocomplete","off","name","username","formControlName","user"],["for","password"],["href","https://docs.duplicati.com/detailed-descriptions/duplicati-access-password","target","_blank","rel","noopener noreferrer"],["type","password","name","password","autocomplete","current-password","placeholder",e,"tabindex","1","formControlName","pass"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(o,a){o&1&&(t(0,"form",0),w("submit",function(){return a.submit()}),f(1,A,2,0,"spk-alert",1),t(2,"div",2),p(3,"input",3),t(4,"spk-form-field")(5,"label",4),n(6," Password "),t(7,"a",5)(8,"spk-icon"),n(9,"question"),i()()(),p(10,"input",6),i(),t(11,"button",7),n(12," Login "),t(13,"spk-icon"),n(14,"arrow-right"),i()()()()),o&2&&(h("formGroup",a.loginForm),m(),C(a.failedLogin()?1:-1),m(10),_("loader",a.isLoading()))},dependencies:[T,x,k,P,O,E,F,N,S,L,b],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{width:100vw;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.5rem}spk-alert[_ngcontent-%COMP%]{max-width:20rem;margin:0 auto}h3[_ngcontent-%COMP%]{font:var(--title-30)}.login-row[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}"],changeDetection:0})};export{d as default};
@@ -0,0 +1 @@
1
+ import{ia as je}from"./chunk-ERQAUCCL.js";import{Ab as a,Bb as c,Cb as $,Ec as Le,Fb as ie,Gb as W,Lc as O,Mc as I,Oc as ye,Qa as Me,R as re,Ra as f,Sb as b,Ta as de,Tb as m,Ub as D,Va as Ie,Vb as h,X as F,Ya as j,Za as Ve,_a as P,a as Ee,aa as Te,bc as Ae,ca as S,cc as q,da as k,db as y,dc as Q,ec as He,fb as Re,fc as C,gc as ge,ha as ae,hc as X,ia as le,ib as w,ic as oe,kc as ve,lc as _e,mc as Ce,na as ce,nb as Pe,nc as Se,oa as Y,oc as K,pa as g,pc as z,qa as L,qb as Fe,ra as pe,rb as G,rc as ke,sa as _,sb as B,sc as se,tb as M,ub as ue,vb as te,wb as E,xb as he,yb as fe,zb as me}from"./chunk-RY7J7BHG.js";import{a as N,b as ee,c as be}from"./chunk-7CGTOI24.js";var H=["*"],Ye=[[["","icon",""]],[["","title",""]],"*",[["","content",""]]],Xe=["[icon]","[title]","*","[content]"];function Ge(n,u){n&1&&(a(0,"spk-icon",3),C(1,"info"),c())}function Ke(n,u){n&1&&(a(0,"spk-icon",3),C(1,"info"),c())}function Je(n,u){n&1&&(a(0,"spk-icon",3),C(1,"warning"),c())}function Ze(n,u){n&1&&(a(0,"spk-icon",3),C(1,"warning-octagon"),c())}function et(n,u){n&1&&(a(0,"spk-icon",3),C(1,"check-circle"),c())}function tt(n,u){n&1&&(a(0,"spk-icon",3),C(1,"question"),c())}function it(n,u){if(n&1){let t=W();a(0,"spk-icon",7),b("click",function(){S(t);let i=m();return k(i.removeAlert())}),C(1,"plus"),c()}}var nt=["dialogRef"];function ot(n,u){if(n&1){let t=W();a(0,"div",4),b("click",function(){S(t);let i=m();return k(i.isOpen.set(!1))}),c()}}var st=["spk-button",""];var Be=["triggerRef"],rt=["popoverRef"],at=[[["","trigger",""]],"*"],lt=["[trigger]","*"];var ct=()=>({closeOnButton:!1,closeOnEsc:!0});var pt=[[["label"]],[["","prefix",""]],[["","textPrefix",""]],[["input"]],[["textarea"]],[["","textSuffix",""]],[["","suffix",""]],[["","error",""]],[["","hint",""]]],dt=["label","[prefix]","[textPrefix]","input","textarea","[textSuffix]","[suffix]","[error]","[hint]"],We=["input"],ut=[[["label"]]],ht=["label"];function ft(n,u){if(n&1&&(a(0,"div",3),C(1),c()),n&2){let t=m();f(),ge(t.files()[0].name)}}function mt(n,u){if(n&1&&(a(0,"div",3),C(1),c()),n&2){let t=m();f(),X("",t.files().length," files selected")}}function gt(n,u){if(n&1&&(a(0,"div",4),C(1),c()),n&2){let t=m();f(),ge(t.filesOver()?t.overlayText():t.placeholder())}}var vt=["optionsRef"],_t=["*",[["","menu",""]]],Ct=["*","[menu]"];function St(n,u){n&1&&(a(0,"spk-icon",5),C(1,"caret-down"),c())}var kt=[[["label"]],[["input","type","range"]]],yt=["label","input[type=range]"],Dt=["optionsWrap"],xt=[[["label"]],[["input"]],[["textarea"]]],wt=["label","input","textarea"],Ot=()=>({closeOnButton:!1,closeOnEsc:!1}),xe=n=>({$implicit:n});function bt(n,u){if(n&1&&C(0),n&2){let t=m();X(" ",t.inputValue()," ")}}function Et(n,u){n&1&&ie(0)}function Tt(n,u){if(n&1&&w(0,Et,1,0,"ng-container",13),n&2){let t=m(3).$implicit;m(2);let e=z(6);G("ngTemplateOutlet",e)("ngTemplateOutletContext",se(2,xe,t))}}function Mt(n,u){if(n&1&&C(0),n&2){let t=m(3).$implicit,e=m(2);X(" ",e.getLabel(t)," ")}}function It(n,u){if(n&1){let t=W();a(0,"spk-chip",11),w(1,Tt,1,4,"ng-container")(2,Mt,1,1),a(3,"spk-icon",12),b("click",function(i){S(t);let o=m(2).$index,s=m(2);return k(s.removeSelectedOptionByIndex(i,o))}),C(4,"x-bold"),c()()}if(n&2){let t=m(4),e=z(6);te(t.selectClasses()),f(),E(e?1:2)}}function Vt(n,u){n&1&&ie(0)}function Rt(n,u){if(n&1&&w(0,Vt,1,0,"ng-container",13),n&2){let t=m(4).$implicit;m(2);let e=z(6);G("ngTemplateOutlet",e)("ngTemplateOutletContext",se(2,xe,t))}}function Pt(n,u){if(n&1&&C(0),n&2){let t=m(4).$implicit,e=m(2);X(" ",e.getLabel(t)," ")}}function Ft(n,u){if(n&1&&w(0,Rt,1,4,"ng-container")(1,Pt,1,1),n&2){m(5);let t=z(6);E(t?0:1)}}function At(n,u){if(n&1&&w(0,Ft,2,1),n&2){m(4);let t=z(9);E(t?-1:0)}}function Ht(n,u){if(n&1&&w(0,It,5,3,"spk-chip",10)(1,At,1,1),n&2){m(3);let t=z(8);E(t?0:1)}}function Lt(n,u){if(n&1&&w(0,Ht,2,1),n&2){let t=u.$implicit;E(t?0:-1)}}function jt(n,u){if(n&1&&fe(0,Lt,1,1,null,null,he),n&2){m();let t=z(4);me(t)}}function Bt(n,u){n&1&&ie(0)}function Wt(n,u){if(n&1&&w(0,Bt,1,0,"ng-container",14),n&2){m(2);let t=z(0);G("ngTemplateOutlet",t)}}function qt(n,u){if(n&1&&C(0),n&2){let t,e=m(2);X(" ",(t=e.placeholderText())!==null&&t!==void 0?t:""," ")}}function zt(n,u){if(n&1&&w(0,Wt,1,1,"ng-container")(1,qt,1,1),n&2){m();let t=z(0);E(t?0:1)}}function Ut(n,u){n&1&&(a(0,"spk-icon",6),C(1,"caret-down"),c())}function $t(n,u){n&1&&$(0,"spk-spinner",7)}function Qt(n,u){n&1&&(a(0,"spk-icon",6),C(1,"list-magnifying-glass"),c())}function Nt(n,u){n&1&&(a(0,"spk-icon",6),C(1,"magnifying-glass"),c())}function Yt(n,u){if(n&1){let t=W();a(0,"spk-icon",15),b("click",function(i){S(t);let o=m();return k(o.clear(i))}),C(1,"x-bold"),c()}}function Xt(n,u){n&1&&(a(0,"spk-icon",6),C(1,"caret-down"),c())}function Gt(n,u){n&1&&(a(0,"spk-icon",6),C(1,"caret-up"),c())}function Kt(n,u){if(n&1&&$(0,"spk-checkbox"),n&2){let t=m().$index,e=m();te(e.selectClasses()),M("active",e.isSelected(t))}}function Jt(n,u){n&1&&ie(0)}function Zt(n,u){if(n&1&&w(0,Jt,1,0,"ng-container",13),n&2){let t=m().$implicit;m();let e=z(7);G("ngTemplateOutlet",e)("ngTemplateOutletContext",se(2,xe,t))}}function ei(n,u){if(n&1&&C(0),n&2){let t=m().$implicit,e=m();X(" ",e.getLabel(t)," ")}}function ti(n,u){if(n&1){let t=W();a(0,"li",16),b("click",function(){let i=S(t).$index,o=m();return k(o.toggleOptionByIndex(i))}),w(1,Kt,1,4,"spk-checkbox",17)(2,Zt,1,4,"ng-container")(3,ei,1,1),c()}if(n&2){let t=u.$index,e=m(),i=z(7);M("selected",e.isSelected(t))("focused",t===e.focusedOptionIndex()),f(),E(e.selectMultiple()?1:-1),f(),E(i?2:3)}}var ii=["dragImageElement"],ni=[[["","sidenav",""]],[["","sidenav-closed-topbar",""]],"*"],oi=["[sidenav]","[sidenav-closed-topbar]","*"];function si(n,u){n&1&&$(0,"div",1,0)}function ri(n,u){if(n&1){let t=W();a(0,"div",7),b("drop",function(i){S(t);let o=m();return k(o.drop(i))})("dragover",function(i){S(t);let o=m();return k(o.dragOver(i))})("dragenter",function(){S(t);let i=m();return k(i.dragEnter())})("dragleave",function(){S(t);let i=m();return k(i.dragLeave())}),c()}}function ai(n,u){if(n&1){let t=W();a(0,"div",8),b("dragstart",function(i){S(t);let o=m();return k(o.dragStart(i))})("dragend",function(i){S(t);let o=m();return k(o.dragEnd(i))})("drag",function(i){S(t);let o=m();return k(o.drag(i))})("touchstart",function(i){S(t);let o=m();return k(o.touchStart(i))})("touchmove",function(i){S(t);let o=m();return k(o.touchMove(i))})("touchend",function(i){S(t);let o=m();return k(o.touchEnd(i))})("touchcancel",function(i){S(t);let o=m();return k(o.touchCancel(i))}),c()}}var li=["thead"],ci=[[["","table-header",""]],"*",[["","table-no-rows",""]]],pi=["[table-header]","*","[table-no-rows]"];function di(n,u){n&1&&$(0,"spk-progress-bar",1)}function ui(n,u){n&1&&(a(0,"div",2),h(1,2),c())}var hi=[[["","title",""]],"*"],fi=["[title]","*"];function mi(n,u){n&1&&C(0,"Title")}function gi(n,u){n&1&&(a(0,"spk-icon",1),C(1,"caret-down"),c())}var vi=["tooltipRef"];var De=["bold","thin","light","fill"],Z=(()=>{class n{#e=F(L);get currentClass(){let t=this.#e.nativeElement.innerText;for(let e=0;e<De.length;e++)if(t.endsWith(De[e]))return De[e];return""}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-icon"]],hostVars:2,hostBindings:function(e,i){e&2&&te(i.currentClass)},ngContentSelectors:H,decls:1,vars:0,template:function(e,i){e&1&&(D(),h(0))},encapsulation:2,changeDetection:0})}}return n})(),Ni=(()=>{class n{constructor(){this._el=F(L),this.alertService=g(null),this.id=g(null),this.alertClasses=O(()=>this._el.nativeElement.classList.toString())}removeAlert(){this.id()&&this.alertService()&&this.alertService()?.removeAlert(this.id())}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-alert"]],inputs:{alertService:[1,"alertService"],id:[1,"id"]},ngContentSelectors:Xe,decls:18,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(e,i){if(e&1&&(D(Ye),a(0,"div",1)(1,"div",2,0),h(3),c(),a(4,"div",2),Se(5),w(6,Ge,2,0,"spk-icon",3)(7,Ke,2,0,"spk-icon",3)(8,Je,2,0,"spk-icon",3)(9,Ze,2,0,"spk-icon",3)(10,et,2,0,"spk-icon",3)(11,tt,2,0,"spk-icon",3),c(),a(12,"div",4),h(13,1),h(14,2),c(),w(15,it,2,0,"spk-icon",5),a(16,"div",6),h(17,3),c()()),e&2){let o=He(2);f(),B("display",o.children.length?"block":"none");let s=i.alertClasses();f(5),E(s.includes("primary")?6:s.includes("accent")?7:s.includes("warn")?8:s.includes("error")?9:s.includes("success")?10:11),f(9),E(i.id()?15:-1)}},dependencies:[Z],encapsulation:2,changeDetection:0})}}return n})();function we(){return Date.now().toString(36)+Math.random().toString(36).substring(2)}var Yi=(()=>{class n{constructor(){this.alertHistory=_([]),this.alertHistoryIsOpen=_(!1),this.alertHistoryIsHidden=_(!0)}error(t){this.addAlert({type:"error",title:t??"An error occured"})}success(t){this.addAlert({type:"success",title:t})}question(t){this.addAlert({type:"question",title:t})}warning(t){this.addAlert({type:"warn",title:t})}info(t){this.addAlert({type:"primary",title:t})}addAlert(t){let e=we();this.alertHistory.update(i=>[ee(N({},t),{isOpen:!0,animateIn:!0,animateOut:!1,id:e}),...i]),setTimeout(()=>{this.alertHistory.update(i=>i.map(o=>ee(N({},o),{animateIn:o.id===e?!1:o.animateIn})))},40),setTimeout(()=>{this.hideAlert(e)},2500)}removeAlert(t){this.alertHistory.update(e=>e.map(i=>ee(N({},i),{animateOut:i.id===t?!1:i.animateOut}))),setTimeout(()=>{this.alertHistory.update(e=>e.filter(i=>i.id!==t))},300)}hideAlert(t){this.alertHistory.update(e=>e.map(i=>ee(N({},i),{isOpen:i.id===t?!1:i.isOpen})))}setHidden(t){this.alertHistoryIsHidden.set(t)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275prov=re({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),_i={width:void 0,maxWidth:void 0,height:void 0,maxHeight:void 0,closeOnButton:!0,closeOnEsc:!0,closeOnOutsideClick:!0},Ci=(()=>{class n{constructor(){this.dialogRef=j("dialogRef"),this.isOpen=P(!1),this.options=g(),this.closed=Y(),this.defaultOptionMerge=O(()=>N(N({},_i),this.options())),this.abortController=null,this.isOpenEffect=I(()=>{let t=this.dialogRef()?.nativeElement;this.abortController&&this.abortController.abort(),this.abortController=new AbortController,this.isOpen()?(t?.showModal(),t?.addEventListener("close",()=>{this.isOpen.set(!1),this.closed.emit()},{signal:this.abortController?.signal}),document.addEventListener("keydown",e=>{e.key==="Escape"&&!this.defaultOptionMerge().closeOnEsc&&e.preventDefault(),e.key==="Escape"&&this.defaultOptionMerge().closeOnEsc&&this.isOpen.set(!1)},{signal:this.abortController?.signal})):(this.closed.emit(),t?.close())})}ngOnDestroy(){this.abortController?.abort()}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-dialog"]],viewQuery:function(e,i){e&1&&q(i.dialogRef,nt,5),e&2&&Q()},inputs:{isOpen:[1,"isOpen"],options:[1,"options"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:H,decls:5,vars:9,consts:[["dialogRef",""],["spkDialog",""],[1,"content"],[1,"closeable-overlay"],[1,"closeable-overlay",3,"click"]],template:function(e,i){if(e&1&&(D(),a(0,"dialog",1,0)(2,"div",2),h(3),c(),w(4,ot,1,0,"div",3),c()),e&2){let o,s,r,l;B("width",(o=i.defaultOptionMerge().width)!==null&&o!==void 0?o:"")("max-width",(s=i.defaultOptionMerge().maxWidth)!==null&&s!==void 0?s:"")("max-height",(r=i.defaultOptionMerge().maxHeight)!==null&&r!==void 0?r:"")("height",(l=i.defaultOptionMerge().height)!==null&&l!==void 0?l:""),f(4),E(i.defaultOptionMerge().closeOnOutsideClick?4:-1)}},encapsulation:2,changeDetection:0})}}return n})(),Xi=(()=>{class n{constructor(){this.#e=document.querySelector("body"),this.#i=F(Pe),this.compRef=null,this.insertedCompRef=null,this.closedFieldSub=null,this.compClosedSub=null}#e;#i;open(t,e){let i=this.#i.injector,o=this.#t(),R=e||{},{data:s,closed:r}=R,l=be(R,["data","closed"]);this.compRef&&this.#n(),this.insertedCompRef=ye(t,{environmentInjector:i}),this.compRef=ye(Ci,{hostElement:o,environmentInjector:i,projectableNodes:[[this.insertedCompRef.location.nativeElement]]});let p=this.insertedCompRef.instance?.data,d=this.insertedCompRef.instance?.closed;if(s){if(pe(p))this.insertedCompRef.setInput("data",s);else if(!pe(p))throw new Error("data is not an input signal on the passed component")}d instanceof ce&&(this.closedFieldSub=d.subscribe((...A)=>{r?.(...A),this.#n()})),this.#i.attachView(this.insertedCompRef.hostView),this.#i.attachView(this.compRef.hostView),this.insertedCompRef.changeDetectorRef.detectChanges(),this.compRef.changeDetectorRef.detectChanges(),this.compRef.instance.isOpen.set(!0),this.compRef.setInput("options",l),this.compRef.instance.closed.subscribe(()=>V());let x=this;function V(){d&&d instanceof ce?d.emit(!1):r?.(void 0),x.#n()}return{component:this.insertedCompRef.instance,close:V}}#t(){let t=document.createElement("spk-dialog-ref");return t.id="spk-dialog-ref",document.getElementById("spk-dialog-ref")||this.#e.append(t),document.getElementById("spk-dialog-ref")}#n(){this.insertedCompRef&&(this.#i.detachView(this.insertedCompRef.hostView),this.closedFieldSub?.unsubscribe(),this.insertedCompRef.destroy()),this.compRef&&(this.#i.detachView(this.compRef.hostView),this.compClosedSub?.unsubscribe(),this.compRef.destroy())}ngOnDestroy(){this.#n()}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275prov=re({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),Gi=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-button-group"]],ngContentSelectors:H,decls:1,vars:0,template:function(e,i){e&1&&(D(),h(0))},encapsulation:2,changeDetection:0})}}return n})(),Si=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["","spk-button",""]],attrs:st,ngContentSelectors:H,decls:1,vars:0,template:function(e,i){e&1&&(D(),h(0))},encapsulation:2,changeDetection:0})}}return n})(),Ki=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-card"]],ngContentSelectors:H,decls:1,vars:0,template:function(e,i){e&1&&(D(),h(0))},encapsulation:2,changeDetection:0})}}return n})(),ki=(()=>{class n{#e=F(L);onClick(){this.#e.nativeElement.querySelector("input")&&this.#e.nativeElement.querySelector("input").focus()}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-checkbox"]],hostBindings:function(e,i){e&1&&b("click",function(){return i.onClick()})},ngContentSelectors:H,decls:6,vars:0,consts:[[1,"box"],[1,"inherit","default-indicator"],[1,"inherit","indeterminate-indicator"]],template:function(e,i){e&1&&(D(),a(0,"div",0)(1,"spk-icon",1),C(2,"check"),c(),a(3,"spk-icon",2),C(4,"minus"),c()(),h(5))},dependencies:[Z],encapsulation:2,changeDetection:0})}}return n})(),yi=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-chip"]],ngContentSelectors:H,decls:1,vars:0,template:function(e,i){e&1&&(D(),h(0))},encapsulation:2,changeDetection:0})}}return n})();var Di=["scroll","auto"],xi={width:void 0,height:void 0,closeOnButton:!0,closeOnEsc:!0},qe=(()=>{class n{constructor(){this.#e=F(Le),this.#i=4,this.SUPPORTS_ANCHOR=typeof CSS<"u"&&CSS.supports("position-anchor","--abc")&&CSS.supports("anchor-name","--abc"),this.above=g(!1),this.right=g(!1),this.markForCheck=g(null),this._above=_(this.above()),this._right=_(this.right()),this.disableOpenByClick=g(!1),this.isOpen=P(!1),this.options=g(),this.closed=Y(),this.defaultOptionMerge=O(()=>N(N({},xi),this.options())),this.triggerRef=j.required("triggerRef"),this.popoverRef=j.required("popoverRef"),this.id=_("--"+we()),this.menuStyle=_(null),this.openAbort=null,this.openEffect=I(()=>{let t=this.popoverRef()?.nativeElement;if(this.isOpen()){this.openAbort&&this.openAbort.abort(),this.openAbort=new AbortController;let i={signal:this.openAbort?.signal};t?.showPopover(),document.addEventListener("keydown",o=>{o.key==="Escape"&&!this.defaultOptionMerge().closeOnEsc&&o.preventDefault(),o.key==="Escape"&&this.defaultOptionMerge().closeOnEsc&&this.isOpen.set(!1)},i),setTimeout(()=>{this.#t(this.popoverRef()?.nativeElement).addEventListener("scroll",()=>this.#n(),i),window.addEventListener("resize",()=>this.#n(),i),this.#n()})}else t.hidePopover(),this.openAbort?.abort(),this.closed.emit()}),this.markForCheckEffect=I(()=>{this.markForCheck()&&this.#e.markForCheck()})}#e;#i;toggleIsOpen(t){t.preventDefault(),t.stopPropagation(),this.disableOpenByClick()||this.isOpen.set(!this.isOpen())}eventClose(t){t.stopPropagation(),t.preventDefault(),this.isOpen.set(!1)}#t(t){let e=t.parentElement;for(;e;){if(Di.indexOf(window.getComputedStyle(e).overflowY)>-1&&e.scrollHeight>e.clientHeight)return e;e=e.parentElement}return document.documentElement}#n(){let t=this.triggerRef()?.nativeElement.getBoundingClientRect(),e=this.popoverRef()?.nativeElement.getBoundingClientRect(),i=t.left,o=t.bottom,s=i,r=o+this.#i,l=s+e.width>window.innerWidth,p=r+e.height>window.innerHeight;if(this.SUPPORTS_ANCHOR)this._above.set(p),this._right.set(l);else{if(s=i,r=o+this.#i,p){let x=t.top-e.height-this.#i;x<0||(r=x)}l&&(s=t.right-e.width,s<0&&(s=0));let d={left:s+"px",top:r+"px"};this.menuStyle.set(d)}}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-popover"]],viewQuery:function(e,i){e&1&&(q(i.triggerRef,Be,5),q(i.popoverRef,rt,5)),e&2&&Q(2)},hostVars:4,hostBindings:function(e,i){e&2&&M("above",i._above())("right",i._right())},inputs:{above:[1,"above"],right:[1,"right"],markForCheck:[1,"markForCheck"],disableOpenByClick:[1,"disableOpenByClick"],isOpen:[1,"isOpen"],options:[1,"options"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:lt,decls:10,vars:6,consts:[["triggerRef",""],["popoverRef",""],[1,"trigger",3,"click"],[1,"trigger-wrapper"],["spk-button","",1,"outlined"],["popover","",1,"popover"],[1,"overlay",3,"click"]],template:function(e,i){if(e&1){let o=W();D(at),a(0,"div",2,0),b("click",function(r){return S(o),k(i.toggleIsOpen(r))}),a(2,"div",3),h(3),c(),a(4,"button",4),C(5,"Open popover"),c()(),a(6,"div",5,1)(8,"div",6),b("click",function(r){return S(o),k(i.isOpen()&&i.eventClose(r))}),c(),h(9,1),c()}e&2&&(B("anchor-name",i.id()),f(6),ue(i.menuStyle()),B("position-anchor",i.id()))},dependencies:[Si],encapsulation:2,changeDetection:0})}}return n})();var Ji=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-divider"]],ngContentSelectors:H,decls:1,vars:0,template:function(e,i){e&1&&(D(),h(0))},encapsulation:2,changeDetection:0})}}return n})(),Oe=(()=>{class n{#e=F(L);onClick(){this.#e.nativeElement.querySelector("input")&&this.#e.nativeElement.querySelector("input").focus(),this.#e.nativeElement.querySelector("textarea")&&this.#e.nativeElement.querySelector("textarea").focus()}ngOnInit(){let t=typeof CSS<"u"&&CSS.supports("field-sizing","content"),e=this.#e.nativeElement.querySelector("textarea");if(!t&&e!==null){let s=function(){e.style.height="auto",e.style.height=e.scrollHeight+"px"},r=function(){window.setTimeout(s,0)};var i=s,o=r;e.addEventListener("change",s),e.addEventListener("cut",r),e.addEventListener("paste",r),e.addEventListener("drop",r),e.addEventListener("keydown",r),e.focus(),e.select(),s()}}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-form-field"]],hostBindings:function(e,i){e&1&&b("click",function(){return i.onClick()})},ngContentSelectors:dt,decls:15,vars:0,consts:[[1,"input-wrap"],[1,"prefix"],[1,"suffix"],[1,"helpers"],[1,"error"],[1,"hint"]],template:function(e,i){e&1&&(D(pt),h(0),a(1,"div",0)(2,"div",1),h(3,1),h(4,2),c(),h(5,3),h(6,4),a(7,"div",2),h(8,5),h(9,6),c()(),a(10,"div",3)(11,"div",4),h(12,7),c(),a(13,"div",5),h(14,8),c()())},encapsulation:2,changeDetection:0})}}return n})(),Zi=(()=>{class n{constructor(){this._el=F(L),this.inputRef=j.required("input"),this.filesOver=_(!1),this.multiple=g(),this.accept=g(null),this.placeholder=P("Click or drag files here"),this.overlayText=g("Drop files here"),this.files=P([]),this.fileUploadClasses=O(()=>this._el.nativeElement.classList.toString()),this.inputEffect=I(()=>{let t=this.inputRef().nativeElement;t&&(t.placeholder&&this.placeholder.set(t.placeholder),t.addEventListener("dragover",e=>{e.preventDefault(),this.filesOver.set(!0)}),t.addEventListener("dragleave",e=>{e.preventDefault(),this.filesOver.set(!1)}),t.addEventListener("drop",e=>{e.preventDefault(),this.filesOver.set(!1);let i=e.dataTransfer?.files;i&&i.length>0&&(this.handleFileUpload(Array.from(i)),t.files=i)}),t.addEventListener("change",e=>{e.preventDefault(),this.handleFileUpload(Array.from(e.target.files))}))})}handleFileUpload(t){this.multiple()?this.files.update(e=>[...e,...t]):this.files.set(t)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-file-upload"]],viewQuery:function(e,i){e&1&&q(i.inputRef,We,5),e&2&&Q()},inputs:{multiple:[1,"multiple"],accept:[1,"accept"],placeholder:[1,"placeholder"],overlayText:[1,"overlayText"],files:[1,"files"]},outputs:{placeholder:"placeholderChange",files:"filesChange"},ngContentSelectors:ht,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(e,i){e&1&&(D(ut),a(0,"spk-form-field"),h(1,0,["ngProjectAs","label",5,["label"]]),a(2,"div",2,0),w(4,ft,2,1,"div",3)(5,mt,2,1,"div",3)(6,gt,2,1,"div",4),$(7,"input",5,1)(9,"div",6),c(),a(10,"spk-icon",7),C(11,"upload-simple"),c()()),e&2&&(te(i.fileUploadClasses()),f(4),E(i.files().length===1?4:i.files().length>1?5:6),f(3),Fe("multiple",i.multiple())("accept",i.accept()),f(2),M("files-over",i.filesOver()))},dependencies:[Oe,Z],encapsulation:2,changeDetection:0})}}return n})(),en=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-list"]],ngContentSelectors:H,decls:1,vars:0,template:function(e,i){e&1&&(D(),h(0))},encapsulation:2,changeDetection:0})}}return n})();function ze(n,u){let t=u?.injector||(Te(ze),F(ae)),{debounce:e=0,initialValue:i=void 0,transform:o=v=>v,compare:s=(v,T)=>v===T,forceType:r=void 0,returnPreviousValue:l=!0}=u||{},p=_(i),d=t.get(le),x=O(()=>{let v=n()?.nativeElement;if(v instanceof HTMLInputElement||v instanceof HTMLTextAreaElement)return $e(v)}),V=!1,R,A=null;return I(()=>{let v=x();if(!v)return p.set(l&&R?o(R):void 0);i!==void 0&&v.value===""?p.set(i):v.value!==""&&ne();let T=U=>{A!==null&&clearTimeout(A),A=setTimeout(()=>{A=null,ne()},e)};v.addEventListener("input",T),v.addEventListener("inputValueChanged",T),d.onDestroy(()=>{v.removeEventListener("input",T),v.removeEventListener("inputValueChanged",T),A!==null&&clearTimeout(A)})},{injector:t}),I(()=>{let v=x();if(!v)return;let T=p()??"",U=T==null?"":String(T);v.value!==U&&(R=U,v.value=U,v.dispatchEvent(new Event("input")))},{injector:t}),p;function ne(){if(!V){V=!0;try{let v=x();if(!v)return;let T=v.value,U=r?Qe(T,r):o(T);R=T,s(p(),U)||p.set(U)}finally{V=!1}}}function $e(v){return Object.defineProperty(v,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(v),"value").get.call(this)},set(T){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(v),"value").set.call(this,T);let Ne=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:T}});return this.dispatchEvent(Ne),T}}),v}function Qe(v,T){switch(T){case"string":return v.toString();case"number":let U=Number(v);return isNaN(U)?void 0:U;case"boolean":return v.toLowerCase()==="true"?!0:v.toLowerCase()==="false"?!1:void 0;default:return v}}}function Ue(n,u){let t=F(ae),e=t.get(le),i=_([]),o=null,s=null,r=(p,d)=>{s&&s.disconnect();let x=Array.from(p.nativeElement.querySelectorAll(d.join(",")));i.set(x),s=new MutationObserver(V=>{requestAnimationFrame(()=>{let R=Array.from(p.nativeElement.querySelectorAll(d.join(",")));i.set(R)})}),s.observe(p.nativeElement,{childList:!0,subtree:!0}),e.onDestroy(()=>l())};o=I(()=>{let p=typeof n=="function"&&n[Ee]?n():n,d=typeof u=="function"?u():u;p&&d?.length>0?r(p,d):(i.set([]),s&&(s.disconnect(),s=null))},{injector:t});function l(){o&&o.destroy(),s&&s.disconnect()}return{signal:i.asReadonly(),destroy:l}}var tn=(()=>{class n{constructor(){this.#e=F(Ie),this.above=g(!1),this.right=g(!1),this.openIndicator=g(!1),this.disabled=g(!1),this.customOptionElementSelectors=g(["button"]),this.keepClickedOptionActive=g(!1),this.closeOnClick=g(!0),this.isOpen=P(!1),this.closed=Y(),this.searchable=g(!1),this.activeOptionIndex=_(-1),this.inputRef=j("input"),this.optionsRef=j("optionsRef"),this.options=Ue(this.optionsRef,this.customOptionElementSelectors),this.optionsEl=O(()=>this.options.signal().filter(t=>!t.disabled)),this.inputValue=ze(this.inputRef),this.abortController=null,this.optionsEffect=I(()=>{if(!this.isOpen())return;this.abortController&&(this.abortController.abort(),this.abortController=null),this.abortController=new AbortController;let t=this.inputRef()?.nativeElement;t&&(queueMicrotask(()=>t.focus()),this.closeOnClick()||this.optionsRef()?.nativeElement?.addEventListener("click",i=>{let o=i.target,s=this.activeElements();if(!s.length){let l=this.optionsEl();this.activeElements.set(l),s=l}let r=s.findIndex(l=>l===o);r>-1&&(this.activeOptionIndex.set(r),t.focus())}),t.addEventListener("keydown",e=>{let i=this.activeOptionIndex();e.key==="ArrowDown"?(e.preventDefault(),this.activeOptionIndex.set(this.nextActiveIndex(i))):e.key==="ArrowUp"?(e.preventDefault(),this.activeOptionIndex.set(this.prevActiveIndex(i))):e.key==="Enter"?(e.preventDefault(),i>-1&&(this.activeElements()[i].click(),queueMicrotask(()=>this.close("active")))):e.key==="Tab"&&(e.preventDefault(),this.close("closed"))},{signal:this.abortController.signal}))}),this._lastElementList=[],this.activeElements=_([]),this.lastInputValue="",this.inputValueEffect=I(()=>{if(!this.searchable())return;let e=(this.inputValue()??"").toLowerCase();if(this.#t(),!e||e==="")return;let i=this._lastElementList.length&&e.length>this.lastInputValue.length?this._lastElementList:this.optionsEl();this.lastInputValue=e;for(let o=0;o<i.length;o++){let s=i[o],r=s.textContent?.toLowerCase()||"",l=this.#i(r,e);s.value=l}i=i.filter(o=>o.value>0).sort((o,s)=>s.value-o.value);for(let o=0;o<i.length;o++)this.#e.setStyle(i[o],"order",o);this.activeElements.set(i),this._lastElementList=i}),this.activeOptionIndexEffect=I(()=>{let t=this.activeElements(),e=this.activeOptionIndex();for(let i=0;i<t.length;i++)t[i].classList.remove("active");e>-1&&(t[e].scrollIntoView({block:"center"}),t[e].classList.add("active"))})}#e;#i(t,e){if(!e)return 0;let i=0,o=-1,s=0,r=!0;for(let l=0;l<e.length;l++){let p=e[l];if(t.length>o+1&&t[o+1]===p)i+=l===0?100:150,o++,s++;else{let d=t.indexOf(p,o+1);if(l>0&&(r=!1),d===-1)return 0;i+=100,o=d,s++}}return r&&e.length===s&&(i+=1e3),i+=s*20,i}nextActiveIndex(t){let e=this.activeElements();if(!e.length){let o=this.optionsEl();this.activeElements.set(o),e=o}if(t===-1||t===e.length-1)return 0;let i=t+1;return e[i].disabled?this.nextActiveIndex(i):i}prevActiveIndex(t){let e=this.activeElements();if(!e.length){let o=this.optionsEl();this.activeElements.set(o),e=o}if(t===0||t===-1)return e.length-1;let i=t-1;return e[i].disabled?this.prevActiveIndex(i):i}close(t="closed",e){this.inputValue.set(""),this.closeOnClick()&&((!this.keepClickedOptionActive()||t==="closed")&&this.#t(),this.isOpen.set(!1),this.closed.emit(t==="active"))}#t(){this.activeOptionIndex.set(-1);let t=this.optionsEl();for(let e=0;e<t.length;e++)t[e].classList.remove("active")}ngOnDestroy(){this.abortController&&(this.abortController.abort(),this.abortController=null)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-menu"]],viewQuery:function(e,i){e&1&&(q(i.inputRef,We,5),q(i.optionsRef,vt,5)),e&2&&Q(2)},hostVars:2,hostBindings:function(e,i){e&2&&M("disabled",i.disabled())},inputs:{above:[1,"above"],right:[1,"right"],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:Ct,decls:12,vars:13,consts:[["formFieldWrapper",""],["input",""],["optionsRef",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","above","right","options"],["trigger","",3,"click"],[1,"open-indicator"],[1,"form-field-wrap"],[1,"small","stretch"],["type","text","placeholder","Search"],[1,"options",3,"click"]],template:function(e,i){if(e&1){let o=W();D(_t),a(0,"spk-popover",3,0),Ce("isOpenChange",function(r){return S(o),_e(i.isOpen,r)||(i.isOpen=r),k(r)}),b("closed",function(){return S(o),k(i.close("fromPopover"))}),a(2,"div",4),b("click",function(){return S(o),k(!i.disabled()&&i.isOpen.set(!0))}),h(3),w(4,St,2,0,"spk-icon",5),c(),a(5,"div",6)(6,"spk-form-field",7),$(7,"input",8,1),c()(),a(9,"div",9,2),b("click",function(){return S(o),k(i.close("active"))}),h(11,1),c()()}e&2&&(ve("isOpen",i.isOpen),G("disableOpenByClick",!0)("above",i.above())("right",i.right())("options",ke(12,ct)),f(2),M("is-open",i.isOpen()),f(2),E(i.openIndicator()?4:-1),f(2),M("hidden",i.searchable()===!1),f(3),M("searching",i.searchable()&&i.inputValue()!==""))},dependencies:[qe,Oe,Z],encapsulation:2,changeDetection:0})}}return n})(),wi=(()=>{class n{constructor(){this.value=g(void 0)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-progress-bar"]],inputs:{value:[1,"value"]},decls:1,vars:2,consts:[[1,"progress-bar"]],template:function(e,i){e&1&&$(0,"div",0),e&2&&B("width",i.value(),"%")},encapsulation:2,changeDetection:0})}}return n})(),nn=(()=>{class n{#e=F(L);onClick(){this.#e.nativeElement.querySelector("input")&&this.#e.nativeElement.querySelector("input").focus()}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-radio"]],hostBindings:function(e,i){e&1&&b("click",function(){return i.onClick()})},ngContentSelectors:H,decls:2,vars:0,consts:[[1,"radio"]],template:function(e,i){e&1&&(D(),$(0,"div",0),h(1))},encapsulation:2,changeDetection:0})}}return n})(),on=(()=>{class n{constructor(){this.#e=F(L),this.#i=null,this.#t=null,this.#n=0,this.alwaysShowThumb=g(!1),this.unit=g(""),this.value=P(this.#n),this.inputState=_({min:0,max:100,step:1}),this.valuePercentage=O(()=>{let{min:t,max:e}=this.inputState(),i=this.value()??t;if(isNaN(i))return 0;let o=e-t;if(o===0)return 0;let s=(i-t)/o*100;return Math.max(0,Math.min(100,s))}),this.trackFilledPercentage=O(()=>this.valuePercentage()),this.thumbPositionPercentage=O(()=>this.valuePercentage()),this.syncModelToInputEffect=I(()=>{let t=this.value();if(this.#t){let e=parseFloat(this.#t.value);(isNaN(e)||String(e)!==String(t))&&(this.#t.value=String(t))}})}#e;#i;#t;#n;get hasInputElement(){return!!this.#t}ngAfterViewInit(){this.#t=this.#e.nativeElement.querySelector('input[type="range"]'),this.#t?(this.#a(this.#t),this.#t.oninput=()=>{this.setNewInputValue(this.#t.value)},this.#t.addEventListener("inputValueChanged",t=>{this.setNewInputValue(t.detail.value)}),queueMicrotask(()=>this.#s(!0)),this.#o()):console.error('SparkleRangeSliderComponent: No <input type="range"> element found projected inside.')}setNewInputValue(t){let e=parseFloat(t??"0");if(!isNaN(e)){let{min:i,max:o}=this.inputState();this.value.set(Math.max(i,Math.min(o,e)))}}trackEvent(t){if(!this.#t||this.#t.readOnly||this.#t.disabled){t.preventDefault(),t.stopPropagation();return}if(t.target===this.#t||t.target?.closest(".thumb, .min-indicator, .max-indicator"))return;let i=t.currentTarget.getBoundingClientRect(),o=t.clientX-i.left,s=i.width,{min:r,max:l,step:p}=this.inputState(),d=l-r;if(s>0&&d!==0&&p>0){let V=(o/s*d+r-r)/p,R=r+Math.round(V)*p,A=this.#r(p);R=parseFloat(R.toFixed(A));let ne=Math.max(r,Math.min(l,R));this.value.set(ne)}}#s(t=!1){if(!this.#t)return;let e=parseFloat(this.#t.min??"0")??0,i=parseFloat(this.#t.max??"100")??100,o=this.#t.step,s=1;if(o&&o.toLowerCase()!=="any"){let l=parseFloat(o);!isNaN(l)&&l>0&&(s=l)}this.inputState.set({min:e,max:i,step:s});let r=parseFloat(this.#t.value??String(e))??e;if(t&&this.value()!==this.#n){let l=this.value(),p=Math.max(e,Math.min(i,l));r!==p&&(this.#t.value=String(p)),l!==p&&this.value.set(p)}else{let l=Math.max(e,Math.min(i,r));this.value()!==l&&this.value.set(l)}}#o(){if(!this.#t||typeof MutationObserver>"u")return;let t=["min","max","step","value","readonly","disabled"];this.#i=new MutationObserver(e=>{let i=!1;for(let o of e)if(o.type==="attributes"&&t.includes(o.attributeName??"")){i=!0;break}i&&this.#s(!1)}),this.#i.observe(this.#t,{attributes:!0})}#r(t){if(isNaN(t)||Math.floor(t)===t)return 0;let i=t.toString().split(".")[1];return i?i.length:0}#a(t){Object.defineProperty(t,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),"value").get.call(this)},set(e){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),"value").set.call(this,e);let o=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:e}});return this.dispatchEvent(o),e}})}ngOnDestroy(){this.#i&&this.#i.disconnect(),this.#t&&(this.#t.oninput=null)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-range-slider"]],hostVars:2,hostBindings:function(e,i){e&2&&M("has-input",i.hasInputElement)},inputs:{alwaysShowThumb:[1,"alwaysShowThumb"],unit:[1,"unit"],value:[1,"value"]},outputs:{value:"valueChange"},ngContentSelectors:yt,decls:15,vars:12,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(e,i){e&1&&(D(kt),a(0,"div",0),h(1),c(),a(2,"div",1)(3,"div",2),C(4),c(),a(5,"div",3),b("click",function(s){return i.trackEvent(s)}),h(6,1),a(7,"div",4),$(8,"div",5),c(),a(9,"div",6)(10,"div",7)(11,"div",8),C(12),c()()()(),a(13,"div",9),C(14),c()()),e&2&&(f(4),oe("",i.inputState().min,"",i.unit(),""),f(4),B("width",i.trackFilledPercentage(),"%"),f(),B("left",i.thumbPositionPercentage(),"%"),f(),M("always-show",i.alwaysShowThumb()),f(2),oe("",i.value(),"",i.unit(),""),f(2),oe("",i.inputState().max,"",i.unit(),""))},encapsulation:2,changeDetection:0})}}return n})(),Oi=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-spinner"]],decls:0,vars:0,template:function(e,i){},encapsulation:2,changeDetection:0})}}return n})(),sn=(()=>{class n{constructor(){this.#e=F(L),this.value=g(),this.label=g(),this.asFreeText=g(!1),this.placeholder=g(),this.readonly=P(!1),this.disabled=P(!1),this.lazySearch=g(!1),this.inlineSearch=g(!1),this.asText=g(!1),this.isClearable=g(!0),this.selectMultiple=g(!1),this.optionTemplate=g(null),this.selectedOptionTemplate=g(null),this.placeholderTemplate=g(null),this.isOpen=P(!1),this.isLoading=P(!1),this.options=P([]),this.selectedOptions=P([]),this.cleared=Y(),this.inlineTemplate=Ve(de),this.optionsWrapRef=j.required("optionsWrap"),this.inputRefInput=_(null),this.#i=typeof MutationObserver<"u"&&new MutationObserver(t=>{for(var e of t)e&&(e.target.nodeName==="INPUT"||e.target.nodeName==="TEXTAREA")&&(this.inputRefInput.set(new L(e.target)),this.#i.disconnect())}),this.inputValue=_(""),this.prevInputValue=_(null),this.focusedOptionIndex=_(-1),this._isClearable=O(()=>this.selectMultiple()||this.isClearable()),this.selectClasses=O(()=>this.#e.nativeElement.classList.toString()),this.stretch=O(()=>this.selectClasses().includes("stretch")),this.placeholderText=O(()=>{let t=this.placeholder(),e=this.inputRefEl();return t||e?.placeholder||null}),this.selectedOptionValues=O(()=>{let t=this.selectedOptions(),e=this.value();return e?t.map(i=>this.#o(i,e)):t}),this.filteredOptions=O(()=>{let t=this.options()||[],e=this.label(),i=this.value(),o=this.inlineSearch(),s=this.inputValue().toLowerCase(),r=this.#a(s);if(t.length<=0)return[];if(!o||s==="")return t;let p=t.filter(d=>{let x=e?(this.#o(d,e)??"").toString().toLowerCase():(d??"").toString().toLowerCase(),V=((i?this.#o(d,i):d)??"").toString().toLowerCase(),R=r.test(x),A=r.test(V);return R||A}).map(d=>{let x=e?(this.#o(d,e)??"").toString().toLowerCase():(d??"").toString().toLowerCase(),V=((i?this.#o(d,i):d)??"").toString().toLowerCase(),R=this.#t(x,s),A=this.#t(V,s);return{item:d,score:Math.max(R,A)}});return p.sort((d,x)=>x.score-d.score),p.map(d=>d.item)}),this.inputRefEl=O(()=>{let t=this.inputRefInput();if(t===null)return;let e=t?t.nativeElement:null;return e?(e.autocomplete="off",this.#r(e),e.addEventListener("focus",()=>{this.readonly()||this.open()}),this.hasSearch()&&e.addEventListener("input",i=>{let o=i.target.value,s=this.inputValue();o!==s&&(this.focusedOptionIndex.set(this.asFreeText()?-1:0),this.inputValue.set(o),this.updateInputElValue())}),e.addEventListener("inputValueChanged",i=>{let o=i.detail.value,s=this.inputValue();if(o!==s){if(o===""){this.clear();return}this.setSelectedOptionsFromValue(o),this.setInputValueFromSelectedOptions(),this.#s()}}),e):(console.warn("<spk-select> input element not found are you missing to pass an <input> or <textarea> element to select component?"),null)}),this.openAbortController=null,this.isOpenEffect=I(()=>{if(this.isOpen()){this.openAbortController||(this.openAbortController=new AbortController);let e=this.inputRefEl();if(!e)return;e.addEventListener("keydown",i=>{if((i.key==="Escape"||i.key==="Tab")&&(i.preventDefault(),this.close()),(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),this.toggleOptionByIndex(this.focusedOptionIndex())),i.key==="ArrowDown"){i.preventDefault();let o=this.focusedOptionIndex()+1;this.focusedOptionIndex.set(o>this.filteredOptions().length-1?0:o)}if(i.key==="ArrowUp"){i.preventDefault();let o=this.focusedOptionIndex()-1;this.focusedOptionIndex.set(o<0?this.filteredOptions().length-1:o)}},{signal:this.openAbortController?.signal})}else{if(!this.inputRefEl())return;this.openAbortController&&(this.openAbortController.abort(),this.openAbortController=null)}}),this._inputValue="",this.inputValueEffect=I(()=>{let t=this.inputValue();this._inputValue=t}),this.inputRefElEffect=I(()=>{let t=this.inputRefEl();t&&t.value!==this._inputValue&&(this.disabled.set(t.disabled),this.setSelectedOptionsFromValue(t.value),this.setInputValueFromSelectedOptions())}),this.selectedLabels=O(()=>{let t=this.selectedOptions();return this.label()?t.map(i=>this.getLabel(i)).join(", "):t.join(", ")}),this.inputState=O(()=>(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=O(()=>this.inlineSearch()||this.lazySearch()),this.#n=I(()=>{if(this.selectMultiple()&&this.hasSearch())return;let t=this.selectedOptions(),e=this.value(),i=t.map(o=>e?this.#o(o,e):o).join(",");this.inputValue.set(i)})}#e;#i;#t(t,e){if(!e)return 0;let i=0,o=-1,s=0,r=!0;for(let l=0;l<e.length;l++){let p=e[l];if(t.length>o+1&&t[o+1]===p)i+=l===0?100:150,o++,s++;else{let d=t.indexOf(p,o+1);if(l>0&&(r=!1),d===-1)return 0;i+=100,o=d,s++}}return r&&e.length===s&&(i+=1e3),i+=s*20,i}#n;ngOnInit(){this.setInitInput()}setInitInput(){let t=this.#e.nativeElement.querySelector("input");if(t){this.inputRefInput.set(new L(t));return}let e=this.#e.nativeElement.querySelector("textarea");if(e){this.inputRefInput.set(new L(e));return}typeof MutationObserver<"u"&&this.#i.observe(this.#e.nativeElement,{attributes:!0,childList:!0,subtree:!0,characterData:!0})}setSelectedOptionsFromValue(t){let e=this.options()||[],i=this.value(),o=this.selectMultiple(),s=t.toString().split(",");if(s.length===0){this.selectedOptions.set([]);return}let r=o?s:[s[0]],l=e.filter(p=>{let d=i?this.#o(p,i)?.toString():p?.toString();return d&&r.includes(d)});this.selectedOptions.set(o?l:[l[0]])}setInputValueFromSelectedOptions(){let t=this.selectedOptions(),e=this.value();if(t.length===0){this.inputValue.set(""),this.updateInputElValue();return}let i=t.map(o=>e?this.#o(o,e):o).join(",");this.inputValue.set(i),this.updateInputElValue()}getLabel(t){let e=this.label();return e?this.#o(t,e):t}toggleOptionByIndex(t,e){let i=this.filteredOptions()[t];if(this.asFreeText()&&t===-1||!i){this.close();return}e&&e.stopPropagation();let o=this.selectMultiple(),s=this._isClearable(),r=this.value(),l=this.selectedOptionValues(),p=r?this.#o(i,r):i;this.prevInputValue.set(null),this.selectedOptions.update(d=>{let x=l.indexOf(p);if(x>-1){let V=[...d.slice(0,x),...d.slice(x+1)];return s||V.length>0?V:d}else return this.focusedOptionIndex.set(t),o?[...d,i]:[i]}),o?this.inputRefEl()?.focus():this.isOpen.set(!1),this.setInputValueFromSelectedOptions(),o&&this.hasSearch()&&(this.inputValue.set(""),this.updateInputElValue())}removeSelectedOptionByIndex(t,e){t.stopPropagation(),this.selectedOptions.update(i=>[...i.slice(0,e),...i.slice(e+1)]),this.setInputValueFromSelectedOptions()}isSelected(t){let e=this.value(),i=this.filteredOptions()[t],o=e?this.#o(i,e):i;return this.selectedOptionValues().indexOf(o)>-1}open(){this.isOpen()||(this.isOpen.set(!0),this.hasSearch()&&(this.prevInputValue.set(this.inputValue()??""),this.inputValue.set(""),this.updateInputElValue()),this.selectMultiple()||this.#s())}#s(){let t=this.selectedOptionValues()[0],e=this.value();if(t){let i=this.filteredOptions().findIndex(o=>e?this.#o(o,e)===t:o===t);this.focusedOptionIndex.set(i)}else this.focusedOptionIndex.set(-1)}close(){this.isOpen.set(!1);let t=this.prevInputValue();if(this.asFreeText()){this.updateInputElValue();return}this.hasSearch()&&t&&(this.inputValue.set(t),this.setInputValueFromSelectedOptions()),this.selectMultiple()&&this.setInputValueFromSelectedOptions()}clear(t){t?.stopPropagation(),this.inputValue.set(""),this.selectedOptions.set([]),this.isOpen.set(!1),this.prevInputValue.set(null),this.cleared.emit(),this.updateInputElValue()}updateInputElValue(){let t=this.inputRefEl(),e=this.inputValue();t&&(t.value=e,t.dispatchEvent(new Event("input")))}#o(t,e){return e.split(".").reduce((i,o)=>i?.[o],t)}#r(t){Object.defineProperty(t,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),"value").get.call(this)},set(e){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),"value").set.call(this,e);let o=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:e}});return this.dispatchEvent(o),e}})}#a(t){let e=(t??"").toLowerCase(),i="^";for(let o of e)i+=".*"+this.#l(o);return i+=".*$",new RegExp(i,"i")}#l(t){return t.replace(/[-\/\\^$+?.()|[\]{}]/g,"\\$&")}ngOnDestroy(){this.openAbortController&&(this.openAbortController.abort(),this.openAbortController=null),typeof MutationObserver<"u"&&this.#i.disconnect()}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-select"]],contentQueries:function(e,i,o){e&1&&Ae(o,i.inlineTemplate,de,5),e&2&&Q()},viewQuery:function(e,i){e&1&&q(i.optionsWrapRef,Dt,5),e&2&&Q()},hostVars:2,hostBindings:function(e,i){e&2&&M("multiple",i.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:wt,decls:32,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"],[1,"sparkle-options"],[1,"option",3,"selected","focused"],[1,"small",3,"class"],[1,"small"],[3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngTemplateOutlet"],["suffix","",3,"click"],[1,"option",3,"click"],[3,"class","active"]],template:function(e,i){if(e&1){let o=W();D(xt),Se(0)(1)(2)(3)(4)(5)(6)(7)(8)(9),a(10,"spk-popover",2,0),Ce("isOpenChange",function(r){return S(o),_e(i.isOpen,r)||(i.isOpen=r),k(r)}),b("closed",function(){return S(o),k(i.close())}),a(12,"spk-form-field",3),b("click",function(){return S(o),k(i.open())}),h(13,0,["ngProjectAs","label",5,["label"]]),a(14,"div",4)(15,"div",5),w(16,bt,1,1)(17,jt,2,0)(18,zt,2,1),h(19,1),h(20,2),c()(),w(21,Ut,2,0,"spk-icon",6)(22,$t,1,0,"spk-spinner",7)(23,Qt,2,0,"spk-icon",6)(24,Nt,2,0,"spk-icon",6)(25,Yt,2,0,"spk-icon",6)(26,Xt,2,0,"spk-icon",6)(27,Gt,2,0,"spk-icon",6),c(),a(28,"div",8,1),fe(30,ti,4,6,"li",9,he),c()()}if(e&2){K(i.placeholderTemplate());let o=i.optionTemplate(),s=i.selectedOptionTemplate(),r=i.inlineTemplate();f(4);let l=K(i.selectedOptions()),p=i.inputState();f(2),K(s||o||r),f(),K(o||r),f();let d=K(!i.asText()&&i.selectMultiple());f();let x=K(i.isOpen()&&i.hasSearch()&&(d||i.inputValue().length>0));f(),ve("isOpen",i.isOpen),G("disableOpenByClick",!0)("options",ke(21,Ot)),f(2),M("stretch",i.stretch())("autosize",i.selectMultiple())("readonly",i.readonly()||i.disabled()),f(2),M("show-search-text",x),f(),M("is-selected",p==="selected"),f(),E(i.asFreeText()&&i.inputValue().length>0&&!i.isOpen()?16:l.length>0?17:x?-1:18),f(5),E(p==="closed"?21:p==="loading"?22:p==="open-searching"?23:p==="searching"?24:p==="selected"&&i._isClearable()?25:p==="selected"&&!i._isClearable()?26:27),f(9),me(i.filteredOptions())}},dependencies:[je,qe,Oe,Z,ki,Oi,yi],encapsulation:2,changeDetection:0})}}return n})(),rn=(()=>{class n{constructor(){this.openWidth=280,this.openWidthTreshold=this.openWidth*.9,this.disableDrag=g(!1),this.isOpen=P(!1),this.type=g(""),this.dragImageElement=j.required("dragImageElement"),this.dragIsEnding=_(!1),this.dragIsOnScreen=_(!0),this.isDragging=_(!1),this.dragPositionX=_(0),this.dragActualPositionX=O(()=>{let t=this.dragPositionX(),e=.32;return t>this.openWidthTreshold?this.openWidthTreshold+(t-this.openWidthTreshold)*e:t}),this.draggingStyle=O(()=>this.type()!=="overlay"?null:this.isDragging()?`translateX(${this.dragActualPositionX()}px)`:this.isOpen()?`translateX(${this.openWidth}px)`:"translateX(0px)"),this.draggingEffect=I(()=>{this.isDragging()&&document.body.classList.add("dragging")})}drop(t){t.stopPropagation(),this.#e(t.clientX)}#e(t){this.isDragging.set(!1),t<=0?this.isOpen.set(!1):t>this.openWidthTreshold?this.isOpen.set(!0):t<this.openWidthTreshold&&(!this.isOpen()&&t<this.openWidthTreshold*.6?this.isOpen.set(!0):this.isOpen.set(!1))}dragEnd(t){(t.clientX<0||!this.dragIsOnScreen())&&this.#e(0)}dragEnter(){this.dragIsOnScreen.set(!0)}dragLeave(){this.dragIsOnScreen.set(!1)}dragOver(t){t.preventDefault(),this.#i(t)}dragStart(t){t.stopPropagation(),this.isDragging.set(!0),this.#i(t)}#i(t){t.dataTransfer?.setDragImage(this.dragImageElement().nativeElement,0,0)}drag(t){t.stopPropagation(),setTimeout(()=>{this.isDragging()&&this.dragIsOnScreen()&&this.dragPositionX.set(t.clientX)}),this.#i(t)}touchStart(t){t.stopPropagation(),this.isDragging.set(!0)}touchMove(t){t.stopPropagation(),setTimeout(()=>{this.isDragging()&&this.dragIsOnScreen()&&this.dragPositionX.set(t.touches[0].clientX)})}touchEnd(t){t.stopPropagation(),this.#e(t.changedTouches[0].clientX)}touchCancel(t){t.stopPropagation(),this.isDragging.set(!1)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-sidenav"]],viewQuery:function(e,i){e&1&&q(i.dragImageElement,ii,5),e&2&&Q()},hostVars:10,hostBindings:function(e,i){e&2&&M("open",i.isOpen())("closed",!i.isOpen())("overlay",i.type()==="overlay")("simple",i.type()==="simple")("is-dragging",i.isDragging())},inputs:{disableDrag:[1,"disableDrag"],isOpen:[1,"isOpen"],type:[1,"type"]},outputs:{isOpen:"isOpenChange"},ngContentSelectors:oi,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","dragover","dragenter","dragleave"],["draggable","true",1,"dragable",3,"dragstart","dragend","drag","touchstart","touchmove","touchend","touchcancel"]],template:function(e,i){e&1&&(D(ni),w(0,si,2,0,"div",1)(1,ri,1,0,"div",2),a(2,"div",3),h(3),c(),a(4,"div",4),w(5,ai,1,0,"div",5),a(6,"div",6),h(7,1),c(),a(8,"main"),h(9,2),c()()),e&2&&(E(i.type()==="overlay"?0:-1),f(),E(i.type()==="overlay"&&i.isDragging()?1:-1),f(3),B("transform",i.draggingStyle()),f(),E(i.type()==="overlay"&&!i.disableDrag()?5:-1))},encapsulation:2,changeDetection:0})}}return n})();var an=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-stepper"]],ngContentSelectors:H,decls:1,vars:0,template:function(e,i){e&1&&(D(),h(0))},encapsulation:2,changeDetection:0})}}return n})();var J=1.5,ln=(()=>{class n{constructor(){this.#e=F(L),this.loading=g(!1),this.data=g([]),this.dataChange=Y(),this.sortByColumn=P(null),this.thead=j("thead"),this.columns=Ue(this.thead,["TH"]),this.resizing=_(!1),this.sizeTrigger=_(!0),this.#i=null,this.#t=_(!1),this.scrollXState=_(-1),this.scrollYState=_(-1),this.canScrollX=_(!1),this.canScrollY=_(!1),this.columnSizes=O(()=>{this.sizeTrigger();let t=this.columns.signal();return t.reduce((e,i,o)=>{let s=i,r=o===t.length-1;return s.dataset.size?`${e} ${s.dataset.size}`:s.classList.contains("sticky")||s.classList.contains("sticky-end")?`${e} min-content`:r?`${e} 1fr`:`${e} 1fr`},"")}),this.e=I(()=>{let t=this.sortByColumn();if(t===null)return this.#t()||(this.#i=this.data(),this.#t.set(!0)),this.dataChange.emit(structuredClone(this.#i));let e=t.startsWith("-")?t.slice(1):t,i=t.startsWith("-"),o=this.data().sort((s,r)=>{let l=s[e],p=r[e],d=0;return typeof l=="number"&&typeof p=="number"&&(d=l-p),l instanceof Date&&p instanceof Date&&(d=l.getTime()-p.getTime()),typeof l=="string"&&typeof p=="string"&&(d=l.localeCompare(p,void 0,{sensitivity:"base"})),i?-d:d});this.dataChange.emit(o)})}#e;#i;#t;updateColumnSizes(){this.sizeTrigger.set(!this.sizeTrigger())}onScroll(){this.#n()}onResize(t){this.#n()}ngAfterViewInit(){queueMicrotask(()=>this.#n())}toggleSort(t){let e=this.sortByColumn(),i=e===t?`-${t}`:e===`-${t}`?null:t;this.sortByColumn.set(i)}#n(){let t=this.#e.nativeElement,e=-1,i=-1,o=t.scrollWidth>t.clientWidth+J;if(o){let r=t.scrollLeft<=J;t.scrollWidth-(t.scrollLeft+t.clientWidth)<J?e=1:r||(e=0)}this.scrollXState.set(e),this.canScrollX.set(o);let s=t.scrollHeight>t.clientHeight+J;if(s){let r=t.scrollTop<=J;t.scrollHeight-(t.scrollTop+t.clientHeight)<J?i=1:r||(i=0)}this.scrollYState.set(i),this.canScrollY.set(s)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-table"]],viewQuery:function(e,i){e&1&&q(i.thead,li,5),e&2&&Q()},hostVars:16,hostBindings:function(e,i){e&1&&b("scroll",function(){return i.onScroll()})("resize",function(s){return i.onResize(s)},!1,Me),e&2&&(B("grid-template-columns",i.columnSizes()),M("resizing",i.resizing())("can-scroll-x",i.canScrollX())("can-scroll-y",i.canScrollY())("scrolled-x",i.scrollXState()>=0)("scrolled-x-end",i.scrollXState()===1)("scrolled-y",i.scrollYState()>=0)("scrolled-y-end",i.scrollYState()===1))},inputs:{loading:[1,"loading"],data:[1,"data"],sortByColumn:[1,"sortByColumn"]},outputs:{dataChange:"dataChange",sortByColumn:"sortByColumnChange"},ngContentSelectors:pi,decls:7,vars:2,consts:[["thead",""],[1,"indeterminate","primary"],[1,"no-rows"]],template:function(e,i){e&1&&(D(ci),a(0,"thead",null,0),h(2),w(3,di,1,0,"spk-progress-bar",1),c(),a(4,"tbody"),h(5,1),c(),w(6,ui,2,0,"div",2)),e&2&&(f(3),E(i.loading()?3:-1),f(3),E(i.loading()?-1:6))},dependencies:[wi],encapsulation:2,changeDetection:0})}}return n})(),cn=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-tabs"]],ngContentSelectors:H,decls:1,vars:0,template:function(e,i){e&1&&(D(),h(0))},encapsulation:2,changeDetection:0})}}return n})(),pn=(()=>{class n{constructor(){this.isActive=P(!1),this.disallowToggle=g(!1)}ngOnInit(){this.disallowToggle()&&this.isActive.set(!0)}toggle(){this.isActive.set(!this.isActive())}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-toggle-card"]],hostVars:2,hostBindings:function(e,i){e&2&&M("active",i.isActive())},inputs:{isActive:[1,"isActive"],disallowToggle:[1,"disallowToggle"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:fi,decls:6,vars:1,consts:[[3,"click"],[1,"toggle-icon"],[1,"content"]],template:function(e,i){e&1&&(D(hi),a(0,"h3",0),b("click",function(){return i.disallowToggle()||i.toggle()}),h(1,0,null,mi,1,0),w(3,gi,2,0,"spk-icon",1),c(),a(4,"div",2),h(5,1),c()),e&2&&(f(3),E(i.disallowToggle()?-1:3))},dependencies:[Z],encapsulation:2,changeDetection:0})}}return n})(),dn=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-toggle"]],ngContentSelectors:H,decls:3,vars:0,consts:[[1,"box"],[1,"knob"]],template:function(e,i){e&1&&(D(),a(0,"div",0),$(1,"div",1),c(),h(2))},encapsulation:2,changeDetection:0})}}return n})(),un=(()=>{class n{constructor(){this.#e=4,this.SUPPORTS_ANCHOR=CSS.supports("position-anchor","--abc")&&CSS.supports("anchor-name","--abc"),this.disabled=g(!1),this.above=g(!1),this.right=g(!1),this._above=_(this.above()),this._right=_(this.right()),this.message=g.required(),this.isOpen=P(!1),this.closed=Y(),this.triggerRef=j.required("triggerRef"),this.tooltipRef=j.required("tooltipRef"),this.id=_("--"+we()),this.menuStyle=_(null),this.isCalculatingPosition=O(()=>{let t=this.tooltipRef()?.nativeElement;return this.isOpen()?(t?.showPopover(),!0):(t.hidePopover(),this.abortController?.abort(),this.closed.emit(),!1)}),this.abortController=null,this.calcPositionEffect=I(()=>{if(!this.isCalculatingPosition())return;this.abortController&&this.abortController.abort(),this.abortController=new AbortController;let e=this.abortController.signal;this.calculateMenuPosition(),this.#i(this.tooltipRef()?.nativeElement).addEventListener("scroll",()=>this.calculateMenuPosition(),{signal:e}),document.addEventListener("resize",()=>this.calculateMenuPosition(),{signal:e})}),this.scrollableStyles=["scroll","auto"]}#e;#i(t){let e=t.parentElement;for(;e;){if(this.scrollableStyles.indexOf(window.getComputedStyle(e).overflowY)>-1&&e.scrollHeight>e.clientHeight)return e;e=e.parentElement}return document.documentElement}eventClose(t){t.stopPropagation(),t.preventDefault(),this.isOpen.set(!1)}ngOnDestroy(){this.abortController&&this.abortController.abort()}calculateMenuPosition(){let t=this.triggerRef()?.nativeElement.getBoundingClientRect(),e=this.tooltipRef()?.nativeElement.getBoundingClientRect(),i=t.left,o=t.bottom,s=i,r=o+this.#e,l=s+e.width>window.innerWidth,p=r+e.height>window.innerHeight;if(this.SUPPORTS_ANCHOR)this._above.set(p),this._right.set(l);else{if(this.above()){let d=t.top-e.height-this.#e;d>=0&&(r=d)}else p&&(r=t.top-e.height-this.#e);if(this.right()){let d=t.right-e.width;d>=0&&(s=d)}else l&&(r=p?t.top+t.height-e.height:t.top,s=t.left-e.width-this.#e);this.menuStyle.set({left:s+"px",top:r+"px"})}}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=y({type:n,selectors:[["spk-tooltip"]],viewQuery:function(e,i){e&1&&(q(i.triggerRef,Be,5),q(i.tooltipRef,vi,5)),e&2&&Q(2)},hostVars:6,hostBindings:function(e,i){e&2&&M("above",i._above())("right",i._right())("disabled",i.disabled())},inputs:{disabled:[1,"disabled"],above:[1,"above"],right:[1,"right"],message:[1,"message"],isOpen:[1,"isOpen"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:H,decls:6,vars:7,consts:[["triggerRef",""],["tooltipRef",""],[1,"trigger",3,"mouseover","mouseout"],["popover","",1,"tooltip"]],template:function(e,i){if(e&1){let o=W();D(),a(0,"div",2,0),b("mouseover",function(){return S(o),k(i.isOpen.set(!0))})("mouseout",function(){return S(o),k(i.isOpen.set(!1))}),h(2),c(),a(3,"div",3,1),C(5),c()}e&2&&(B("anchor-name",i.id()),f(3),ue(i.menuStyle()),B("position-anchor",i.id()),f(2),X(" ",i.message()," "))},encapsulation:2,changeDetection:0})}}return n})();var hn=(()=>{class n{constructor(){this.filesOver=_(!1),this.filesDropped=Y()}onDragOver(t){t.preventDefault(),t.stopPropagation(),this.filesOver.set(!0)}onDragLeave(t){t.preventDefault(),t.stopPropagation(),this.filesOver.set(!1)}ondrop(t){t.preventDefault(),t.stopPropagation(),this.filesOver.set(!1);let e=t.dataTransfer?.files;e&&e.length>0&&this.filesDropped.emit(e)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275dir=Re({type:n,selectors:[["","spkDragDrop",""]],hostVars:2,hostBindings:function(e,i){e&1&&b("dragover",function(s){return i.onDragOver(s)})("dragleave",function(s){return i.onDragLeave(s)})("drop",function(s){return i.ondrop(s)}),e&2&&M("filesover",i.filesOver())},outputs:{filesDropped:"filesDropped"}})}}return n})();export{Z as a,Ni as b,Yi as c,Ci as d,Xi as e,Gi as f,Si as g,Ki as h,ki as i,yi as j,Ji as k,Oe as l,Zi as m,en as n,tn as o,wi as p,nn as q,on as r,sn as s,rn as t,an as u,ln as v,cn as w,pn as x,dn as y,un as z,hn as A};
@@ -0,0 +1 @@
1
+ import{a as z}from"./chunk-SBHSCERN.js";import{a as x,c as w,d as B,e as U,f as X}from"./chunk-NQYRWS7A.js";import"./chunk-2X7AJBJY.js";import{a as K,f as V,o as h}from"./chunk-3WHFK5U5.js";import"./chunk-64CRTZO6.js";import"./chunk-VDB64BFB.js";import"./chunk-ERQAUCCL.js";import{Ab as i,Bb as t,Cb as _,Db as M,Eb as f,Gb as R,Mb as l,Nb as s,Ob as b,Pb as y,Qb as v,Ra as p,Sb as u,Tb as c,X as T,ca as a,da as S,db as D,ib as P,rb as N,sa as $,wb as G}from"./chunk-RY7J7BHG.js";import"./chunk-7CGTOI24.js";function W(g,F){if(g&1){let n=R();i(0,"spk-menu",15)(1,"button",16),b(2,2),t(),M(3,17),i(4,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Disabled"))}),l(5,3),_(6,"spk-icon"),s(),t(),i(7,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Verbose"))}),l(8,4),_(9,"spk-icon"),s(),t(),i(10,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("ExplicitOnly"))}),l(11,5),_(12,"spk-icon"),s(),t(),i(13,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Profiling"))}),l(14,6),_(15,"spk-icon"),s(),t(),i(16,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Retry"))}),l(17,7),_(18,"spk-icon"),s(),t(),i(19,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Information"))}),l(20,8),_(21,"spk-icon"),s(),t(),i(22,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("DryRun"))}),l(23,9),_(24,"spk-icon"),s(),t(),i(25,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Warning"))}),l(26,10),_(27,"spk-icon"),s(),t(),i(28,"button",18),u("click",function(){a(n);let e=c();return S(e.updateLogLevel("Error"))}),l(29,11),_(30,"spk-icon"),s(),t(),f(),t()}if(g&2){let n=c();N("openIndicator",!0),p(2),y(n.logLevelByLabel()),v(2)}}var O=class g{#n=T(B);#e=T(z);logLevel=this.#e.logLevel;logLevelByLabel=this.#e.logLevelByLabel;currentUrl=$(this.#n.url);constructor(){this.#n.events.subscribe(F=>{F instanceof x&&this.currentUrl.set(F.urlAfterRedirects)})}updateLogLevel(F){this.#e.updateLogLevel(F)}static \u0275fac=function(n){return new(n||g)};static \u0275cmp=D({type:g,selectors:[["app-logs"]],decls:10,vars:1,consts:()=>{let F;F=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SPK_ICON:archive${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPK_ICON: Stored `;let n;n=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SPK_ICON:play${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SPK_ICON: Live `;let o;o=$localize`Log level: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SPK_ICON:bell-simple-slash${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SPK_ICON: Disabled `;let C;C=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:megaphone-simple${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON: Verbose `;let L;L=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:flow-arrow${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Explicit only `;let d;d=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:speedometer${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Profiling `;let k;k=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SPK_ICON:arrow-arc-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SPK_ICON: Retry `;let I;I=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SPK_ICON:info${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SPK_ICON: Information `;let E;E=$localize`${"\uFFFD#24\uFFFD"}:START_TAG_SPK_ICON:person-simple-run${"\uFFFD/#24\uFFFD"}:CLOSE_TAG_SPK_ICON: Dry run `;let A;A=$localize`${"\uFFFD#27\uFFFD"}:START_TAG_SPK_ICON:warning${"\uFFFD/#27\uFFFD"}:CLOSE_TAG_SPK_ICON: Warning `;let m;return m=$localize`${"\uFFFD#30\uFFFD"}:START_TAG_SPK_ICON:warning-octagon${"\uFFFD/#30\uFFFD"}:CLOSE_TAG_SPK_ICON: Error `,[F,n,o,e,C,L,d,k,I,E,A,m,[1,"filters"],["type","button","routerLink","/about/logs/stored","routerLinkActive","active"],["type","button","routerLink","/about/logs/live","routerLinkActive","active"],[3,"openIndicator"],["spk-button","","type","button"],["menu",""],["spk-button","","type","button",1,"small",3,"click"]]},template:function(n,o){n&1&&(i(0,"div",12)(1,"spk-button-group")(2,"button",13),l(3,0),_(4,"spk-icon"),s(),t(),i(5,"button",14),l(6,1),_(7,"spk-icon"),s(),t()(),P(8,W,31,2,"spk-menu",15),t(),_(9,"router-outlet")),n&2&&(p(8),G(o.currentUrl().startsWith("/about/logs/live")?8:-1))},dependencies:[V,K,h,w,X,U],styles:["[_nghost-%COMP%]{display:block}.filters[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;margin-bottom:1.25rem}"],changeDetection:0})};export{O as default};