@duplicati/ngclient 0.0.103 → 0.0.105

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 (119) hide show
  1. package/assets/spk-bold.woff2 +0 -0
  2. package/chunk-2HUZWRPM.js +1 -0
  3. package/{chunk-73FGPZLT.js → chunk-2WMFHNHQ.js} +1 -1
  4. package/chunk-3MVGDMRL.js +1 -0
  5. package/{chunk-7NSKVKO7.js → chunk-47X3OGYT.js} +1 -1
  6. package/chunk-4LYA3XAH.js +1 -0
  7. package/chunk-4PUCRV6F.js +1 -0
  8. package/chunk-5H7QZHN7.js +2 -0
  9. package/chunk-5LODOOQE.js +1 -0
  10. package/{chunk-YC7JUCYS.js → chunk-5VR5J6BY.js} +1 -1
  11. package/{chunk-Y5T3G6PP.js → chunk-6DH6O5YE.js} +1 -1
  12. package/{chunk-POO6N4RH.js → chunk-6U42RKWI.js} +1 -1
  13. package/chunk-7EYE3BSS.js +1 -0
  14. package/{chunk-ARQ6YMHX.js → chunk-7L42EO7J.js} +1 -1
  15. package/chunk-7UQE266G.js +4 -0
  16. package/chunk-BEXTTKFK.js +1 -0
  17. package/chunk-CETM57LL.js +1 -0
  18. package/{chunk-2IDHF5MN.js → chunk-CKPICCFH.js} +1 -1
  19. package/{chunk-FQMZSQUI.js → chunk-DE4NDI5F.js} +1 -1
  20. package/chunk-E6VGAA7Q.js +1 -0
  21. package/{chunk-N35UIMLP.js → chunk-FROEBZRG.js} +1 -1
  22. package/{chunk-C4IFBLYB.js → chunk-FSGJ5KIH.js} +1 -1
  23. package/chunk-G432CCD5.js +1 -0
  24. package/chunk-GOTRUTIB.js +1 -0
  25. package/chunk-HN4MKGHV.js +1 -0
  26. package/{chunk-NYZVIDDD.js → chunk-HTNYQE2B.js} +1 -1
  27. package/{chunk-PX25CWH6.js → chunk-I3C2AEHI.js} +1 -1
  28. package/{chunk-HPSQUH4S.js → chunk-IXM6PMZU.js} +1 -1
  29. package/chunk-J4KNSP44.js +1 -0
  30. package/{chunk-OP5UYIDM.js → chunk-JAYNAMCB.js} +1 -1
  31. package/{chunk-HFKG5ODC.js → chunk-JCXYUHPV.js} +1 -1
  32. package/chunk-JKOCS4GE.js +1 -0
  33. package/chunk-JLBV3QXT.js +1 -0
  34. package/{chunk-UKQTVYRS.js → chunk-JQPXZWKR.js} +1 -1
  35. package/chunk-KFU7HSAL.js +1 -0
  36. package/{chunk-UO57IKTF.js → chunk-KSP3JQHY.js} +1 -1
  37. package/chunk-L4CVN3UF.js +1 -0
  38. package/chunk-LD2OSURG.js +1 -0
  39. package/chunk-M4YSJR2J.js +1 -0
  40. package/{chunk-TKVTCBLW.js → chunk-MZ473NLM.js} +1 -1
  41. package/chunk-NF5EQK5W.js +1 -0
  42. package/chunk-NTVLL6TO.js +1 -0
  43. package/{chunk-ZVBVR6H4.js → chunk-O2YN63YI.js} +1 -1
  44. package/chunk-O7DK2M4U.js +1 -0
  45. package/chunk-OUD6FSMZ.js +1 -0
  46. package/chunk-P5KOELKA.js +1 -0
  47. package/{chunk-OD5LGCQE.js → chunk-PFYOWXZZ.js} +1 -1
  48. package/{chunk-DYCJPQSE.js → chunk-PTDSOPNK.js} +1 -1
  49. package/chunk-QO6SPSAF.js +8 -0
  50. package/chunk-QVIZK4WW.js +1 -0
  51. package/{chunk-W2OVJAGT.js → chunk-QWIDEDE7.js} +1 -1
  52. package/{chunk-B7AEDFNS.js → chunk-RP6N6NQM.js} +1 -1
  53. package/{chunk-IYJFFIHQ.js → chunk-RVCYNHAQ.js} +1 -1
  54. package/chunk-SAVY3OEX.js +1 -0
  55. package/chunk-SHOSAHEC.js +1 -0
  56. package/chunk-SITZCHGF.js +1 -0
  57. package/chunk-SZ64OOBT.js +1 -0
  58. package/{chunk-QTTYDT3P.js → chunk-T2OUHRUV.js} +1 -1
  59. package/{chunk-U34D3G4S.js → chunk-TPWSQH24.js} +1 -1
  60. package/chunk-TQGG56ZZ.js +1 -0
  61. package/{chunk-DHVICIXP.js → chunk-U2HORYSZ.js} +1 -1
  62. package/chunk-VAOJO535.js +1 -0
  63. package/{chunk-YRQ33MKD.js → chunk-VN7JM6M3.js} +1 -1
  64. package/{chunk-KEHATBLP.js → chunk-VOGYVLLM.js} +1 -1
  65. package/{chunk-GM25ACCR.js → chunk-W2F756OF.js} +4 -4
  66. package/{chunk-LU6KVNOT.js → chunk-W2VC37XO.js} +1 -1
  67. package/chunk-WHVFYB7T.js +1 -0
  68. package/{chunk-BIHIR35J.js → chunk-WMTA6PZM.js} +1 -1
  69. package/chunk-WSFEYRKT.js +3 -0
  70. package/{chunk-6WLXFV43.js → chunk-WX7L7V6J.js} +1 -1
  71. package/chunk-XG7KYN67.js +1 -0
  72. package/{chunk-OPC7T2MU.js → chunk-XJXOUOD5.js} +1 -1
  73. package/{chunk-K4BJJNFG.js → chunk-XY5EWT4P.js} +1 -1
  74. package/{chunk-R5DUA6AR.js → chunk-YDRXW35Y.js} +1 -1
  75. package/chunk-YF5K7PNR.js +1 -0
  76. package/chunk-YWCTOOED.js +1 -0
  77. package/index.html +3 -3
  78. package/main-HT3PXURE.js +1 -0
  79. package/package.json +1 -1
  80. package/{polyfills-BZ5XXHZK.js → polyfills-6QHLTIIN.js} +1 -1
  81. package/{styles-CAXGLRRN.css → styles-V3SS5M3J.css} +1 -1
  82. package/chunk-2EOGI5U4.js +0 -8
  83. package/chunk-2PAPG5UW.js +0 -1
  84. package/chunk-4B4SNBSE.js +0 -1
  85. package/chunk-4YRHMBJK.js +0 -1
  86. package/chunk-5242ZMFS.js +0 -1
  87. package/chunk-56BIOJTU.js +0 -1
  88. package/chunk-5BO226DZ.js +0 -1
  89. package/chunk-5EOQSHY6.js +0 -1
  90. package/chunk-5XWXETE2.js +0 -1
  91. package/chunk-6OYKPS4F.js +0 -1
  92. package/chunk-7WCKE7GY.js +0 -1
  93. package/chunk-A7BKUGJT.js +0 -1
  94. package/chunk-ADU47UB6.js +0 -1
  95. package/chunk-EQ74YCX7.js +0 -1
  96. package/chunk-GON7FNZR.js +0 -1
  97. package/chunk-GWH4FCBZ.js +0 -1
  98. package/chunk-IPNKLO2C.js +0 -1
  99. package/chunk-K7E5BKU4.js +0 -8
  100. package/chunk-KXHE37LY.js +0 -1
  101. package/chunk-LOR4VCVG.js +0 -1
  102. package/chunk-MYXDJGSR.js +0 -1
  103. package/chunk-OELZQ6RK.js +0 -1
  104. package/chunk-OQNO5JCJ.js +0 -1
  105. package/chunk-ORNS7N6Q.js +0 -1
  106. package/chunk-P3QRASBZ.js +0 -1
  107. package/chunk-PXG6UWRT.js +0 -1
  108. package/chunk-QBYHBPBT.js +0 -1
  109. package/chunk-S2EID4MC.js +0 -1
  110. package/chunk-S6C4DHJH.js +0 -3
  111. package/chunk-TFIF6FCF.js +0 -1
  112. package/chunk-VJPUDP2T.js +0 -1
  113. package/chunk-WX5636KE.js +0 -1
  114. package/chunk-X7KD2725.js +0 -1
  115. package/chunk-XYENMXJU.js +0 -1
  116. package/chunk-YBGYY3E5.js +0 -1
  117. package/chunk-YCVMFFKU.js +0 -2
  118. package/chunk-ZJWHMCU4.js +0 -1
  119. package/main-DQ77DZR6.js +0 -1
Binary file
@@ -0,0 +1 @@
1
+ import"./chunk-7CGTOI24.js";var o=[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-O7DK2M4U.js")},{path:"destination",loadComponent:()=>import("./chunk-JKOCS4GE.js")},{path:"source-data",loadComponent:()=>import("./chunk-JLBV3QXT.js")},{path:"schedule",loadComponent:()=>import("./chunk-J4KNSP44.js")},{path:"options",loadComponent:()=>import("./chunk-U2HORYSZ.js")}];export{o as default};
@@ -1 +1 @@
1
- import{c,e as O,f as C}from"./chunk-7WCKE7GY.js";import"./chunk-BIHIR35J.js";import{x as d}from"./chunk-6WLXFV43.js";import"./chunk-TKVTCBLW.js";import"./chunk-2IDHF5MN.js";import{Gb as n,_a as T,ub as e,vb as t,wb as A}from"./chunk-GM25ACCR.js";import"./chunk-7CGTOI24.js";var l=class a{static \u0275fac=function(o){return new(o||a)};static \u0275cmp=T({type:a,selectors:[["app-about"]],decls:15,vars:0,consts:()=>{let _;_=$localize`General`;let o;o=$localize`Changelog`;let r;r=$localize`Libraries`;let s;s=$localize`System info`;let u;u=$localize`Logs`;let g;return g=$localize`Crash log`,[_,o,r,s,u,g,[1,"primary"],["tab","","routerLink","/about/general","routerLinkActive","active"],["tab","","routerLink","/about/changelog","routerLinkActive","active"],["tab","","routerLink","/about/libraries","routerLinkActive","active"],["tab","","routerLink","/about/system-info","routerLinkActive","active"],["tab","","routerLink","/about/logs","routerLinkActive","active"],["tab","","routerLink","/about/crashlogs","routerLinkActive","active"]]},template:function(o,r){o&1&&(e(0,"spk-tabs",6)(1,"button",7),n(2,0),t(),e(3,"button",8),n(4,1),t(),e(5,"button",9),n(6,2),t(),e(7,"button",10),n(8,3),t(),e(9,"button",11),n(10,4),t(),e(11,"button",12),n(12,5),t()(),e(13,"section"),A(14,"router-outlet"),t())},dependencies:[d,c,O,C],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:0;padding:2.5rem}.nav[_ngcontent-%COMP%]{display:flex;gap:.5rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:2rem 0}"],changeDetection:0})};export{l as default};
1
+ import{c,e as O,f as C}from"./chunk-QVIZK4WW.js";import"./chunk-WMTA6PZM.js";import{x as d}from"./chunk-WX7L7V6J.js";import"./chunk-MZ473NLM.js";import"./chunk-CKPICCFH.js";import{Ib as n,ab as T,wb as e,xb as t,yb as A}from"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";var l=class a{static \u0275fac=function(o){return new(o||a)};static \u0275cmp=T({type:a,selectors:[["app-about"]],decls:15,vars:0,consts:()=>{let _;_=$localize`General`;let o;o=$localize`Changelog`;let r;r=$localize`Libraries`;let s;s=$localize`System info`;let u;u=$localize`Logs`;let g;return g=$localize`Crash log`,[_,o,r,s,u,g,[1,"primary"],["tab","","routerLink","/about/general","routerLinkActive","active"],["tab","","routerLink","/about/changelog","routerLinkActive","active"],["tab","","routerLink","/about/libraries","routerLinkActive","active"],["tab","","routerLink","/about/system-info","routerLinkActive","active"],["tab","","routerLink","/about/logs","routerLinkActive","active"],["tab","","routerLink","/about/crashlogs","routerLinkActive","active"]]},template:function(o,r){o&1&&(e(0,"spk-tabs",6)(1,"button",7),n(2,0),t(),e(3,"button",8),n(4,1),t(),e(5,"button",9),n(6,2),t(),e(7,"button",10),n(8,3),t(),e(9,"button",11),n(10,4),t(),e(11,"button",12),n(12,5),t()(),e(13,"section"),A(14,"router-outlet"),t())},dependencies:[d,c,O,C],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:0;padding:2.5rem}.nav[_ngcontent-%COMP%]{display:flex;gap:.5rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:2rem 0}"],changeDetection:0})};export{l as default};
@@ -0,0 +1 @@
1
+ import"./chunk-7CGTOI24.js";var o=[{path:"",redirectTo:"select-files",pathMatch:"full"},{path:"destination",loadComponent:()=>import("./chunk-7UQE266G.js")},{path:"encryption",loadComponent:()=>import("./chunk-XG7KYN67.js")},{path:"select-files",loadComponent:()=>import("./chunk-4PUCRV6F.js")},{path:"options",loadComponent:()=>import("./chunk-M4YSJR2J.js")},{path:"progress",loadComponent:()=>import("./chunk-SHOSAHEC.js")}],t=o;export{t as default};
@@ -1,4 +1,4 @@
1
- import{a as xe}from"./chunk-NYZVIDDD.js";import{c as ke}from"./chunk-BIHIR35J.js";import{b as be}from"./chunk-DYCJPQSE.js";import"./chunk-TKVTCBLW.js";import"./chunk-2IDHF5MN.js";import{Gb as fe,Ka as oe,Oa as ae,U as le,X as q,_a as ce,ic as de,lb as he,r as ie,ub as pe,vb as ue,wb as ge}from"./chunk-GM25ACCR.js";import{a as m,b as z}from"./chunk-7CGTOI24.js";function F(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var R=F();function $e(a){R=a}var E={exec:()=>null};function g(a,e=""){let t=typeof a=="string"?a:a.source,n={replace:(s,i)=>{let r=typeof i=="string"?i:i.source;return r=r.replace(x.caret,"$1"),t=t.replace(s,r),n},getRegex:()=>new RegExp(t,e)};return n}var x={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:a=>new RegExp(`^( {0,3}${a})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:a=>new RegExp(`^ {0,${Math.min(3,a-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:a=>new RegExp(`^ {0,${Math.min(3,a-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:a=>new RegExp(`^ {0,${Math.min(3,a-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:a=>new RegExp(`^ {0,${Math.min(3,a-1)}}#`),htmlBeginRegex:a=>new RegExp(`^ {0,${Math.min(3,a-1)}}<(?:[a-z].*>|!--)`,"i")},Me=/^(?:[ \t]*(?:\n|$))+/,De=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Oe=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,v=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ne=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Q=/(?:[*+-]|\d{1,9}[.)])/,Re=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ze=g(Re).replace(/bull/g,Q).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Ge=g(Re).replace(/bull/g,Q).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),U=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Ze=/^[^\n]+/,X=/(?!\s*\])(?:\\.|[^\[\]\\])+/,He=g(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",X).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),je=g(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Q).getRegex(),O="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",W=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Fe=g("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",W).replace("tag",O).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ce=g(U).replace("hr",v).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",O).getRegex(),Qe=g(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ce).getRegex(),V={blockquote:Qe,code:De,def:He,fences:Oe,heading:Ne,hr:v,html:Fe,lheading:ze,list:je,newline:Me,paragraph:Ce,table:E,text:Ze},me=g("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",v).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",O).getRegex(),Ue=z(m({},V),{lheading:Ge,table:me,paragraph:g(U).replace("hr",v).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",me).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",O).getRegex()}),Xe=z(m({},V),{html:g(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",W).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:E,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:g(U).replace("hr",v).replace("heading",` *#{1,6} *[^
1
+ import{a as xe}from"./chunk-HTNYQE2B.js";import{c as ke}from"./chunk-WMTA6PZM.js";import{b as be}from"./chunk-PTDSOPNK.js";import"./chunk-MZ473NLM.js";import"./chunk-CKPICCFH.js";import{Ib as fe,Ma as oe,Qa as ae,V as le,Y as q,ab as ce,kc as de,nb as he,r as ie,wb as pe,xb as ue,yb as ge}from"./chunk-W2F756OF.js";import{a as m,b as z}from"./chunk-7CGTOI24.js";function F(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var R=F();function $e(a){R=a}var E={exec:()=>null};function g(a,e=""){let t=typeof a=="string"?a:a.source,n={replace:(s,i)=>{let r=typeof i=="string"?i:i.source;return r=r.replace(x.caret,"$1"),t=t.replace(s,r),n},getRegex:()=>new RegExp(t,e)};return n}var x={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:a=>new RegExp(`^( {0,3}${a})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:a=>new RegExp(`^ {0,${Math.min(3,a-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:a=>new RegExp(`^ {0,${Math.min(3,a-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:a=>new RegExp(`^ {0,${Math.min(3,a-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:a=>new RegExp(`^ {0,${Math.min(3,a-1)}}#`),htmlBeginRegex:a=>new RegExp(`^ {0,${Math.min(3,a-1)}}<(?:[a-z].*>|!--)`,"i")},Me=/^(?:[ \t]*(?:\n|$))+/,De=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Oe=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,v=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ne=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Q=/(?:[*+-]|\d{1,9}[.)])/,Re=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ze=g(Re).replace(/bull/g,Q).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Ge=g(Re).replace(/bull/g,Q).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),U=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Ze=/^[^\n]+/,X=/(?!\s*\])(?:\\.|[^\[\]\\])+/,He=g(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",X).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),je=g(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Q).getRegex(),O="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",W=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Fe=g("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",W).replace("tag",O).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ce=g(U).replace("hr",v).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",O).getRegex(),Qe=g(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ce).getRegex(),V={blockquote:Qe,code:De,def:He,fences:Oe,heading:Ne,hr:v,html:Fe,lheading:ze,list:je,newline:Me,paragraph:Ce,table:E,text:Ze},me=g("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",v).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",O).getRegex(),Ue=z(m({},V),{lheading:Ge,table:me,paragraph:g(U).replace("hr",v).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",me).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",O).getRegex()}),Xe=z(m({},V),{html:g(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",W).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:E,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:g(U).replace("hr",v).replace("heading",` *#{1,6} *[^
2
2
  ]`).replace("lheading",ze).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),We=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ve=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,_e=/^( {2,}|\\)\n(?!\s*$)/,Je=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,N=/[\p{P}\p{S}]/u,J=/[\s\p{P}\p{S}]/u,Ae=/[^\s\p{P}\p{S}]/u,Ke=g(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,J).getRegex(),Pe=/(?!~)[\p{P}\p{S}]/u,Ye=/(?!~)[\s\p{P}\p{S}]/u,et=/(?:[^\s\p{P}\p{S}]|~)/u,tt=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Le=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,nt=g(Le,"u").replace(/punct/g,N).getRegex(),st=g(Le,"u").replace(/punct/g,Pe).getRegex(),Ie="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",rt=g(Ie,"gu").replace(/notPunctSpace/g,Ae).replace(/punctSpace/g,J).replace(/punct/g,N).getRegex(),it=g(Ie,"gu").replace(/notPunctSpace/g,et).replace(/punctSpace/g,Ye).replace(/punct/g,Pe).getRegex(),lt=g("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Ae).replace(/punctSpace/g,J).replace(/punct/g,N).getRegex(),ot=g(/\\(punct)/,"gu").replace(/punct/g,N).getRegex(),at=g(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),ct=g(W).replace("(?:-->|$)","-->").getRegex(),ht=g("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",ct).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),D=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,pt=g(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",D).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Ee=g(/^!?\[(label)\]\[(ref)\]/).replace("label",D).replace("ref",X).getRegex(),Be=g(/^!?\[(ref)\](?:\[\])?/).replace("ref",X).getRegex(),ut=g("reflink|nolink(?!\\()","g").replace("reflink",Ee).replace("nolink",Be).getRegex(),K={_backpedal:E,anyPunctuation:ot,autolink:at,blockSkip:tt,br:_e,code:Ve,del:E,emStrongLDelim:nt,emStrongRDelimAst:rt,emStrongRDelimUnd:lt,escape:We,link:pt,nolink:Be,punctuation:Ke,reflink:Ee,reflinkSearch:ut,tag:ht,text:Je,url:E},gt=z(m({},K),{link:g(/^!?\[(label)\]\((.*?)\)/).replace("label",D).getRegex(),reflink:g(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",D).getRegex()}),H=z(m({},K),{emStrongRDelimAst:it,emStrongLDelim:st,url:g(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),ft=z(m({},H),{br:g(_e).replace("{2,}","*").getRegex(),text:g(H.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),M={normal:V,gfm:Ue,pedantic:Xe},L={normal:K,gfm:H,breaks:ft,pedantic:gt},dt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},we=a=>dt[a];function T(a,e){if(e){if(x.escapeTest.test(a))return a.replace(x.escapeReplace,we)}else if(x.escapeTestNoEncode.test(a))return a.replace(x.escapeReplaceNoEncode,we);return a}function ye(a){try{a=encodeURI(a).replace(x.percentDecode,"%")}catch{return null}return a}function Se(a,e){let t=a.replace(x.findPipe,(i,r,l)=>{let o=!1,c=r;for(;--c>=0&&l[c]==="\\";)o=!o;return o?"|":" |"}),n=t.split(x.splitPipe),s=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;s<n.length;s++)n[s]=n[s].trim().replace(x.slashPipe,"|");return n}function I(a,e,t){let n=a.length;if(n===0)return"";let s=0;for(;s<n&&a.charAt(n-s-1)===e;)s++;return a.slice(0,n-s)}function kt(a,e){if(a.indexOf(e[1])===-1)return-1;let t=0;for(let n=0;n<a.length;n++)if(a[n]==="\\")n++;else if(a[n]===e[0])t++;else if(a[n]===e[1]&&(t--,t<0))return n;return-1}function Te(a,e,t,n,s){let i=e.href,r=e.title||null,l=a[1].replace(s.other.outputLinkReplace,"$1");if(a[0].charAt(0)!=="!"){n.state.inLink=!0;let o={type:"link",raw:t,href:i,title:r,text:l,tokens:n.inlineTokens(l)};return n.state.inLink=!1,o}return{type:"image",raw:t,href:i,title:r,text:l}}function bt(a,e,t){let n=a.match(t.other.indentCodeCompensation);if(n===null)return e;let s=n[1];return e.split(`
3
3
  `).map(i=>{let r=i.match(t.other.beginningSpace);if(r===null)return i;let[l]=r;return l.length>=s.length?i.slice(s.length):i}).join(`
4
4
  `)}var _=class{options;rules;lexer;constructor(e){this.options=e||R}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:I(n,`
@@ -0,0 +1 @@
1
+ import{a as ee}from"./chunk-TQGG56ZZ.js";import{a as be}from"./chunk-VN7JM6M3.js";import{a as Z}from"./chunk-HTNYQE2B.js";import{a as Q}from"./chunk-SAVY3OEX.js";import{a as ne}from"./chunk-7L42EO7J.js";import{b as Me,c as M,e as L,f as $,i as b,k as Le,n as D,q as A,r as v,s as $e,t as w}from"./chunk-T2OUHRUV.js";import{b as O,d as C}from"./chunk-QVIZK4WW.js";import{a as k,e as Ne,g as y,l as Pe,p as he,q as Ie,t as ke,z as ye}from"./chunk-WX7L7V6J.js";import{b as I}from"./chunk-PTDSOPNK.js";import{j as J}from"./chunk-CKPICCFH.js";import{$b as q,Ab as j,B as Fe,Bc as H,Cb as V,E as oe,F as T,Gb as u,Hb as F,Ib as E,J as me,Jb as Te,Kb as Ee,Mb as f,N as Se,Nb as W,O as K,Qa as S,S as de,Y as p,ab as h,cc as fe,da as N,ea as P,fb as x,i as _e,kc as Oe,nb as d,o as ce,pb as ge,pc as Ce,rc as Re,sb as B,ua as c,wb as r,x as ie,xb as a,y as ue,yb as _,zb as U}from"./chunk-W2F756OF.js";var De=new v,we=()=>De.group({passphrase:De.control("")}),se=class s{#t=p(I);#e=p(R);#i=p(C);#n=p(O);encryptionForm=this.#e.encryptionForm;creatingTemporaryBackup=c(!1);next(){let i=this.#e.destinationTargetUrl();if(!i)throw new Error("No target URL");this.creatingTemporaryBackup.set(!0);let e=this.encryptionForm.value?.passphrase??null,t=[{Name:"--no-encryption",Value:"true"}];e&&(t=[{Name:"--passphrase",Value:e}]),this.#t.postApiV1Backups({requestBody:{Backup:{TargetURL:i,Settings:t}},temporary:!0}).pipe(T(()=>this.creatingTemporaryBackup.set(!1))).subscribe({next:o=>{let n=o.ID;this.#i.navigate([`/restore-draft/${n}`])},error:o=>{console.error(o)}})}back(){this.#e.isFileRestore()?this.#i.navigate(["encryption"],{relativeTo:this.#n.parent}):this.#e.exit()}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=h({type:s,selectors:[["app-restore-encryption"]],decls:12,vars:1,consts:()=>{let i;i=$localize`Enter backup passphrase if defined.`;let e;e=$localize`Password`;let t;t=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let o;return o=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `,[e,t,o,[3,"submit","formGroup"],["for","password"],["type","password","id","password","placeholder",i,"formControlName","passphrase"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(e,t){e&1&&(r(0,"form",3),f("submit",function(){return t.next()}),r(1,"spk-form-field")(2,"label",4),E(3,0),a(),_(4,"input",5),a(),r(5,"div",6)(6,"button",7),f("click",function(){return t.back()}),u(7,1),_(8,"spk-icon"),F(),a(),r(9,"button",8),u(10,2),_(11,"spk-icon"),F(),a()()()),e&2&&d("formGroup",t.encryptionForm)},dependencies:[w,b,M,L,$,D,A,Pe,k,y],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};function Be(s,i){s&1&&_(0,"spk-progress-bar",7)}function Ve(s,i){if(s&1&&(r(0,"div",13),q(1),Ce(2,"date"),a()),s&2){let e=i.$implicit;S(),fe("",e.Version,": ",Re(2,2,e.Time,"medium"),"")}}function We(s,i){s&1&&_(0,"spk-progress-bar",7)}function Xe(s,i){if(s&1&&(r(0,"app-file-tree",14)(1,"label",15),E(2,4),a(),_(3,"input",16),a()),s&2){let e=W(3);d("rootPath",e.rootPath())("backupSettings",e.backupSettings())("multiSelect",!0)("showFiles",!0)}}function ze(s,i){if(s&1&&x(0,Xe,4,4,"app-file-tree",14),s&2){let e=W(2);B((e.isDraft()&&!e.isRepairing()||!e.isDraft())&&e.backupSettings()?0:-1)}}function Ye(s,i){if(s&1){let e=V();r(0,"spk-select",11),f("cleared",function(){N(e);let o=W();return P(o.abortLoading())}),_(1,"input",12),x(2,Ve,3,5,"ng-template"),a(),x(3,We,1,0,"spk-progress-bar",7)(4,ze,1,1)}if(s&2){let e=W();d("options",e.versionOptions())("isClearable",!0),S(3),B(e.isDraft()&&e.isRepairing()||e.versionOptionsLoading()||e.loadingRootPath()?3:-1),S(),B(e.showFileTree()?4:-1)}}var te=new v,Ge=()=>te.group({filesToRestore:te.control(""),selectedOption:te.control(null),passphrase:te.control(null)}),ae=class s{#t=p(I);#e=p(R);#i=p(Q);#n=p(C);#o=p(O);#s=p(J);#r=null;#a=null;selectFilesForm=this.#e.selectFilesForm;selectFilesFormSignal=this.#e.selectFilesFormSignal;selectOptionSignal=this.#e.selectOptionSignal;backupId=this.#e.backupId;versionOptionsLoading=this.#e.versionOptionsLoading;versionOptions=this.#e.versionOptions;isDraft=this.#e.isDraft;isFileRestore=this.#e.isFileRestore;showFileTree=c(!1);backupSettings=c(null);rootPath=c(void 0);loadingRootPath=c(!1);isRepairing=c(!1);loadingEffect=H(()=>{if(this.versionOptionsLoading())return;let e=this.versionOptions();if(e&&e?.length>0){let t=e[0].Version;Number.isInteger(t)&&this.selectFilesForm.controls.selectedOption.setValue(t)}});backupSettingsEffect=H(()=>{let i=this.backupId(),e=this.isRepairing(),t=typeof this.selectOptionSignal()=="string"?parseInt(this.selectOptionSignal()):this.selectOptionSignal();if(typeof t!="number"||!i)return;let n=this.versionOptions()?.find(l=>l.Version===t)?.Time??null;!n||e||(this.showFileTree.set(!1),queueMicrotask(()=>{let l={id:i+"",time:n};this.backupSettings.set(l),this.getRootPath(l)}))});repairEffect=H(()=>{let i=this.#e.isDraft(),e=this.selectOptionSignal(),t=this.versionOptions();if(i&&e){let o=t.find(m=>m.Version===parseInt(e));if(o===void 0)return;let n=this.backupId(),l=`${n}+${o.Time}`;if(this.#a===l)return;this.#a=l,this.isRepairing.set(!0),this.#t.postApiV1BackupByIdRepairupdate({id:n,requestBody:{only_paths:!0,time:o.Time}}).pipe(K(this.abortLoading$),T(()=>{this.#a=null})).subscribe(m=>{let G=m.ID;var z=window.setInterval(()=>{this.#t.getApiV1TaskByTaskid({taskid:G}).subscribe(Y=>{Y.Status==="Completed"&&(clearInterval(z),this.isRepairing.set(!1))})},1e3)})}});getRootPath(i){let e={id:i.id+"",time:i.time,prefixOnly:!0,folderContents:!1},t=i.id+"";this.isRepairing()||this.#r===t||(this.#r=t,this.loadingRootPath.set(!0),this.#i.hasV2ListOperations()?this.#t.postApiV2BackupListFolder({requestBody:{BackupId:i.id,Time:i.time,Paths:null,PageSize:0,Page:0}}).pipe(K(this.abortLoading$),T(()=>{this.showFileTree.set(!0),this.loadingRootPath.set(!1),this.#r=null})).subscribe({next:o=>{let n=(o.Data??[]).map(l=>l.Path);n.length==1?this.rootPath.set(n[0]??"/"):this.rootPath.set("")}}):this.#t.getApiV1BackupByIdFiles(e).pipe(K(this.abortLoading$),T(()=>{this.showFileTree.set(!0),this.loadingRootPath.set(!1)})).subscribe({next:o=>{let n=o.Files.map(l=>l.Path);n.length==1?this.rootPath.set(n[0]??"/"):this.rootPath.set("")}}))}abortLoading$=new _e;abortLoading(){this.showFileTree.set(!1),this.loadingRootPath.set(!1),this.abortLoading$.next(!0)}displayFn(){let i=this.versionOptions();return e=>{if(!e)return"";let t=i?.find(o=>typeof o.Version=="number"&&o.Version.toString()===e);return t?`${t.Version}: ${this.#s.transform(t.Time,"medium")}`:""}}next(){this.#n.navigate(["options"],{relativeTo:this.#o.parent})}back(){this.#e.isFileRestore()?this.#n.navigate(["encryption"],{relativeTo:this.#o.parent}):this.#e.exit()}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=h({type:s,selectors:[["app-select-files"]],features:[Oe([J])],decls:13,vars:3,consts:()=>{let i;i=$localize`Select files`;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let t;t=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let o;o=$localize`Select an option...`;let n;return n=$localize`Path`,[["formRef",""],i,e,t,n,[3,"submit","formGroup"],[1,"title-30"],[1,"indeterminate","primary"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["value","Version",3,"cleared","options","isClearable"],["type","text","placeholder",o,"formControlName","selectedOption"],[1,"custom-option"],[3,"rootPath","backupSettings","multiSelect","showFiles"],["for","path"],["type","text","id","path","formControlName","filesToRestore"]]},template:function(e,t){if(e&1){let o=V();r(0,"form",5,0),f("submit",function(){return N(o),P(t.next())}),r(2,"h3",6),E(3,1),a(),x(4,Be,1,0,"spk-progress-bar",7)(5,Ye,5,4),r(6,"div",8)(7,"button",9),f("click",function(){return N(o),P(t.back())}),u(8,2),_(9,"spk-icon"),F(),a(),r(10,"button",10),u(11,3),_(12,"spk-icon"),F(),a()()()}e&2&&(d("formGroup",t.selectFilesForm),S(4),B(t.versionOptionsLoading()?4:5),S(5),Te(t.isFileRestore()?"Back":"Exit"),Ee(8))},dependencies:[$e,b,M,L,$,w,D,A,J,ee,y,k,ke,he],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var R=class s{#t=p(C);#e=p(O);#i=p(Q);#n=p(Ne);#o=p(I);backupId=c(null);backup=c(null);destinationTargetUrl=c(null);selectFilesForm=Ge();optionsForm=xe();encryptionForm=we();optionsFormSignal=Z(this.optionsForm.valueChanges);selectFilesFormSignal=Z(this.selectFilesForm.valueChanges);selectOptionSignal=Z(this.selectFilesForm.controls.selectedOption.valueChanges);versionOptionsLoading=c(!1);versionOptions=c([]);isSubmitting=c(!1);isDraft=c(!1);isFileRestore=c(!1);isFullWidthPage=c(!1);init(i,e=!1,t=!1){this.backupId.set(i),this.isFileRestore.set(e),this.isDraft.set(t),e&&this.#t.navigate(["/restore-from-files/destination"]),e||this.getBackup(!0)}updateTargetUrl(i){this.destinationTargetUrl.set(i)}submit(){this.isSubmitting.set(!0);let i=this.backupId(),e=this.optionsForm.value,t=this.selectFilesForm.value,o=this.versionOptions()?.find(n=>n.Version===t.selectedOption);this.#o.postApiV1BackupByIdRestore({id:i??"",requestBody:{paths:t.filesToRestore?.split("\0").map(n=>`${n}*`)??[],passphrase:t.passphrase??null,time:o?.Time,restore_path:e.restoreFromPath,overwrite:e.handleExisting==="overwrite",permissions:e.permissions,skip_metadata:!0}}).pipe(T(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.#t.navigate(["./progress"],{relativeTo:this.#e})},error:n=>{console.error("restore error",n)}})}exit(){this.#n.open(ne,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:i=>{i&&(this.#s(),this.#t.navigate(["/"]))}})}getVersionOptions(){this.versionOptions()}loadFilesetsWithRetryv2(i,e=2){return this.#o.postApiV2BackupListFilesets({requestBody:{BackupId:i}}).pipe(Fe(t=>{let o=t?.error?.body?.StatusCode==="EncryptedStorageNoPassphrase",n=t?.error?.body?.StatusCode==="FolderMissing",l=t?.error?.body?.StatusCode==="EmptyRemoteFolder";return o||n||l||e===0?ce(()=>t):ue(1e3).pipe(Se(()=>this.loadFilesetsWithRetryv2(i,e-1)))}))}getBackup(i=!1){let e=this.backupId();this.versionOptionsLoading.set(!0),this.#i.hasV2ListOperations()?ie([this.#o.getApiV1BackupById({id:e}),this.loadFilesetsWithRetryv2(e)]).pipe(oe(1),T(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([t,o])=>{if(o.Error)throw new Error(o.Error);this.versionOptions.set((o.Data??[]).map(n=>({Version:n.Version??-1,IsFullBackup:n.IsFullBackup??void 0,Time:n.Time??"<missing>",FileCount:n.FileCount??void 0,FileSizes:n.FileSizes??void 0}))),this.backup.set(t)},error:t=>{let o=t?.error?.body?.StatusCode==="EncryptedStorageNoPassphrase",n=t?.error?.body?.StatusCode==="FolderMissing",l=t?.error?.body?.StatusCode==="EmptyRemoteFolder",m=$localize`An error occurred while loading the backup filesets: ${t.message}`;o&&(m=$localize`The remote storage is encrypted. Please enter the passphrase to access the backup.`),n&&(m=$localize`The backup storage folder was not found.`),l&&(m=$localize`The backup storage folder does not contain any filesets.`),this.#n.open(ne,{data:{title:$localize`Failed to load backup filesets`,message:m,confirmText:$localize`OK`,cancelText:void 0},closed:G=>{this.#t.navigate([o?"/restore-from-files/encryption":"/restore-from-files/destination"])}})}}):ie([this.#o.getApiV1BackupById({id:e}),this.#o.getApiV1BackupByIdFilesets({id:e}).pipe(me(3))]).pipe(oe(1),T(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([t,o])=>{this.versionOptions.set(o.map(n=>({Version:n.Version??-1,IsFullBackup:(n.IsFullBackup??1)==1,Time:n.Time??"<missing>",FileCount:n.FileCount??void 0,FileSizes:n.FileSizes??void 0}))),this.backup.set(t)}})}#s(){this.selectFilesForm.reset(),this.optionsForm.reset()}static \u0275fac=function(e){return new(e||s)};static \u0275prov=de({token:s,factory:s.\u0275fac,providedIn:"root"})};var X=new v,xe=()=>X.group({restoreFrom:X.control("orignal"),restoreFromPath:X.control(""),handleExisting:X.control("overwrite"),permissions:X.control(!1)}),le=class s{#t=p(R);#e=p(C);#i=p(O);optionsForm=this.#t.optionsForm;optionsFormSignal=this.#t.optionsFormSignal;isSubmitting=this.#t.isSubmitting;goBack(){this.#e.navigate(["select-files"],{relativeTo:this.#i.parent})}submit(){this.#t.submit()}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=h({type:s,selectors:[["app-advanced-options-settings"]],decls:39,vars:6,consts:()=>{let i;i=$localize`Restore options`;let e;e=$localize`Where do you want to restore files to?`;let t;t=$localize` Original location ${"\uFFFD#9\uFFFD\uFFFD/#9\uFFFD"}:TAG_INPUT:`;let o;o=$localize` Pick location ${"\uFFFD#12\uFFFD\uFFFD/#12\uFFFD"}:TAG_INPUT:`;let n;n=$localize`How do you want to handle existing files?`;let l;l=$localize` Overwrite ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let m;m=$localize` Save different versions with timestamp in file name ${"\uFFFD#25\uFFFD\uFFFD/#25\uFFFD"}:TAG_INPUT:`;let G;G=$localize`Permissions`;let z;z=$localize` Restore read/write permissions ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let Y;Y=$localize`${"\uFFFD#35\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#35\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let pe;return pe=$localize`${"\uFFFD#38\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#38\uFFFD"}:CLOSE_TAG_SPK_ICON: Submit `,[["formRef",""],i,e,t,o,n,l,m,G,z,Y,pe,[3,"submit","formGroup"],[1,"title-30"],[3,"disallowToggle"],["title",""],[1,"raised","primary"],["type","radio","name","restoreFrom","value","orignal","formControlName","restoreFrom"],["type","radio","name","restoreFrom","value","pickLocation","formControlName","restoreFrom"],[3,"disabled"],["for","path"],["type","text","id","path","formControlName","restoreFromPath"],["type","radio","name","handleExisting","value","overwrite","formControlName","handleExisting"],["type","radio","name","handleExisting","value","saveTimestamp","formControlName","handleExisting"],[1,"primary","raised"],["type","checkbox","formControlName","permissions"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(e,t){if(e&1){let o=V();r(0,"form",12,0),f("submit",function(){return N(o),P(t.submit())}),r(2,"h3",13),E(3,1),a(),r(4,"app-toggle-card",14),U(5,15),E(6,2),j(),r(7,"spk-radio",16),u(8,3),_(9,"input",17),F(),a(),r(10,"spk-radio",16),u(11,4),_(12,"input",18),F(),a(),r(13,"app-file-tree",19)(14,"label",20),q(15,"Path"),a(),_(16,"input",21),a()(),r(17,"app-toggle-card",14),U(18,15),E(19,5),j(),r(20,"spk-radio",16),u(21,6),_(22,"input",22),F(),a(),r(23,"spk-radio",16),u(24,7),_(25,"input",23),F(),a()(),r(26,"app-toggle-card"),U(27,15),E(28,8),j(),r(29,"spk-toggle",24),u(30,9),_(31,"input",25),F(),a()(),r(32,"div",26)(33,"button",27),f("click",function(){return N(o),P(t.goBack())}),u(34,10),_(35,"spk-icon"),F(),a(),r(36,"button",28),u(37,11),_(38,"spk-icon"),F(),a()()()}if(e&2){let o;d("formGroup",t.optionsForm),S(4),d("disallowToggle",!0),S(9),d("disabled",((o=t.optionsFormSignal())==null?null:o.restoreFrom)!=="pickLocation"),S(4),d("disallowToggle",!0),S(19),ge("loader",t.isSubmitting())}},dependencies:[w,b,M,Me,Le,L,$,D,A,be,ee,ye,Ie,y,k],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};export{xe as a,le as b,we as c,se as d,Ge as e,ae as f,R as g};
@@ -0,0 +1 @@
1
+ import{e as a,f as b}from"./chunk-4LYA3XAH.js";import"./chunk-TQGG56ZZ.js";import"./chunk-VN7JM6M3.js";import"./chunk-HTNYQE2B.js";import"./chunk-SAVY3OEX.js";import"./chunk-7L42EO7J.js";import"./chunk-T2OUHRUV.js";import"./chunk-QVIZK4WW.js";import"./chunk-WMTA6PZM.js";import"./chunk-WX7L7V6J.js";import"./chunk-PTDSOPNK.js";import"./chunk-MZ473NLM.js";import"./chunk-CKPICCFH.js";import"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";export{a as createRestoreSelectFilesForm,b as default};
@@ -0,0 +1,2 @@
1
+ import{a as V}from"./chunk-7EYE3BSS.js";import{a as A,n as R,w as F}from"./chunk-WX7L7V6J.js";import{j as N}from"./chunk-CKPICCFH.js";import{$b as s,Bc as x,Cb as w,Ib as m,Mb as y,Nb as r,Qa as l,Y as O,ab as h,ac as L,bc as d,da as b,ea as I,fb as u,nb as T,ob as P,pb as C,pc as G,ra as p,rc as $,sb as g,tb as S,ua as M,ub as v,vb as f,wb as o,xb as i,yb as k}from"./chunk-W2F756OF.js";function B(n,t){n&1&&(o(0,"div",4),m(1,0),i())}function D(n,t){if(n&1&&(o(0,"li"),s(1),i()),n&2){let e=t.$implicit;l(),L(e)}}function U(n,t){if(n&1&&(o(0,"code")(1,"ol",15),v(2,D,2,1,"li",null,S),i()()),n&2){let e=r(2).$implicit,a=r(2);l(2),f(a.breakIntoLines(e.Exception))}}function X(n,t){if(n&1&&(o(0,"li"),s(1),i()),n&2){let e=t.$implicit;l(),L(e)}}function z(n,t){if(n&1&&(o(0,"code")(1,"ol",15),v(2,X,2,1,"li",null,S),i()()),n&2){let e=r(2).$implicit,a=r(2);l(2),f(a.breakIntoLines(e.Message))}}function W(n,t){if(n&1&&(o(0,"tr")(1,"td",12)(2,"spk-list",13)(3,"div",14),s(4),i(),o(5,"div",14),s(6),i(),o(7,"div",14),s(8),i(),o(9,"div",14),s(10),i(),o(11,"div",14),s(12),i()(),u(13,U,4,0,"code")(14,z,4,0,"code"),i()()),n&2){let e=r().$implicit;l(4),d("ID: ",e.ID,""),l(2),d("Type: ",e.Type,""),l(2),d("Tag: ",e.Tag,""),l(2),d("TaskID: ",e.TaskID,""),l(2),d("MessageID: ",e.MessageID,""),l(),g(e.Exception?13:-1),l(),g(e.Message?14:-1)}}function j(n,t){if(n&1){let e=w();o(0,"tr",10),y("click",function(){let _=b(e).$index,c=r(2);return I(c.toggleRow(_))}),o(1,"td"),s(2),G(3,"date"),i(),o(4,"td"),s(5),i(),o(6,"td",8)(7,"button",11)(8,"spk-icon"),s(9,"caret-down"),i()()()(),u(10,W,15,7,"tr")}if(n&2){let e=t.$implicit,a=t.$index,_=r(2);l(2),L($(3,5,e.When,"MMM dd. hh:mm")),l(3),L(_.subStringMessage(e.Message)),l(2),C("rotated-icon",a===_.openRowIndex()),l(3),g(a===_.openRowIndex()?10:-1)}}function H(n,t){if(n&1&&(o(0,"spk-table",6)(1,"tr",7)(2,"th"),m(3,1),i(),o(4,"th"),m(5,2),i(),k(6,"th",8),i(),v(7,j,11,8,null,null,S),o(9,"div",9),m(10,3),i()()),n&2){let e=r();P("grid-template-columns","auto 1fr auto"),C("type-b",e.asSimpleList()),T("data",e.logs())("loading",e.logsLoading()),l(7),f(e.logs())}}var E=class n{#e=O(V);whenFilter=p();backupIdFilter=p();asSimpleList=p();polling=p();logLevel=this.#e.logLevel;logLevelByLabel=this.#e.logLevelByLabel;logs=this.#e.logs;logsLoading=this.#e.logsLoading;pollingEffect=x(()=>{let t=this.polling()??!1;this.#e.isPolling.set(t)});openRowIndex=M(null);whenEffect=x(()=>{let t=this.whenFilter()??null;this.#e.setWhenFilter(t),this.#e.logLevel.set(t?"Verbose":"Disabled")});backupIdEffect=x(()=>{let t=this.backupIdFilter()??null;this.#e.setBackupIdFilter(t),this.#e.logLevel.set(t?"Verbose":"Disabled")});toggleRow(t){this.openRowIndex.set(t===this.openRowIndex()?null:t)}breakIntoLines(t){return t?t.split(`
2
+ `):[]}subStringMessage(t){return t?t.substring(0,80)+"...":""}ngOnDestroy(){this.#e.destroy()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=h({type:n,selectors:[["app-logs-live"]],hostVars:2,hostBindings:function(e,a){e&2&&C("simple-list",a.asSimpleList())},inputs:{whenFilter:[1,"whenFilter"],backupIdFilter:[1,"backupIdFilter"],asSimpleList:[1,"asSimpleList"],polling:[1,"polling"]},decls:2,vars:1,consts:()=>{let t;t=$localize`Live logs are disabled`;let e;e=$localize`When`;let a;a=$localize`Message`;let _;return _=$localize`No data available`,[t,e,a,_,[1,"live-view-disabled"],[3,"type-b","data","loading","grid-template-columns"],[3,"data","loading"],["table-header",""],[1,"sticky-end"],["table-no-rows",""],[3,"click"],["spk-button","","type","button",1,"outlined","small"],[1,"expanded-cell"],[1,"primary"],["item",""],[1,"line-numbers-ol"]]},template:function(e,a){e&1&&u(0,B,2,0,"div",4)(1,H,11,6,"spk-table",5),e&2&&g(a.logLevel()==="Disabled"?0:1)},dependencies:[F,A,R,N],styles:["[_nghost-%COMP%]{display:block}.simple-list[_nghost-%COMP%] spk-table[_ngcontent-%COMP%]{--table-td-bg: var(--base-level-20);height:100%}.live-view-disabled[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;min-height:18.75rem;width:100%;background-color:var(--base-level-20);border:1px solid var(--base-level-30);border-radius:var(--shape-2);font:var(--paragraph-20)}.expanded-cell[_ngcontent-%COMP%]{height:auto;grid-column:1/-1;white-space:pre-wrap;display:flex;flex-direction:column}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}spk-table[_ngcontent-%COMP%]{--table-columns: auto auto 1fr auto}spk-table[_ngcontent-%COMP%] td.id[_ngcontent-%COMP%]{justify-content:center}spk-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code){padding:1rem .75rem;overflow:hidden}spk-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code) code[_ngcontent-%COMP%]{background-color:var(--grey-800);color:var(--grey-100);padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre;max-width:100%}"],changeDetection:0})};export{E as a};
@@ -0,0 +1 @@
1
+ import{a as Ke}from"./chunk-VN7JM6M3.js";import{a as he,b as se}from"./chunk-HTNYQE2B.js";import{a as pe}from"./chunk-TPWSQH24.js";import{a as be}from"./chunk-VAOJO535.js";import"./chunk-SZ64OOBT.js";import{a as Be}from"./chunk-VOGYVLLM.js";import"./chunk-RHW5QVAY.js";import{a as le}from"./chunk-O2YN63YI.js";import"./chunk-T2OUHRUV.js";import"./chunk-FSGJ5KIH.js";import"./chunk-I3C2AEHI.js";import{b as Ie,e as ke}from"./chunk-QVIZK4WW.js";import"./chunk-WMTA6PZM.js";import{a as z,g as _e,j as ve,k as ye,p as re,x as xe}from"./chunk-WX7L7V6J.js";import{b as ae}from"./chunk-PTDSOPNK.js";import"./chunk-MZ473NLM.js";import"./chunk-DE4NDI5F.js";import{j as w,k as oe}from"./chunk-CKPICCFH.js";import"./chunk-PFYOWXZZ.js";import{$b as F,Ab as P,Ac as fe,Cb as K,Gb as N,Hb as M,Ib as _,Jb as s,Kb as d,Lb as U,Mb as y,Nb as m,Qa as o,Y as R,ab as b,ac as x,bc as S,da as D,dc as Re,ea as $,fb as C,hc as De,ic as $e,jc as X,nb as h,pb as f,pc as u,qc as g,r as B,ra as ie,rc as T,sb as E,tb as I,ua as G,ub as k,vb as v,wb as i,xb as t,yb as c,zb as A}from"./chunk-W2F756OF.js";import{a as te}from"./chunk-7CGTOI24.js";function we(n,a){n&1&&c(0,"spk-progress-bar",31)}function ze(n,a){n&1&&c(0,"div",34)}function Ve(n,a){n&1&&c(0,"div",35)}function We(n,a){n&1&&c(0,"div",36)}function je(n,a){if(n&1&&F(0),n&2){let e=m().$implicit;S(" (",e.data==null?null:e.data.WarningsActualLength," warnings) ")}}function qe(n,a){if(n&1&&(i(0,"details",45)(1,"summary"),N(2,15),c(3,"spk-icon"),i(4,"div",46),c(5,"spk-icon",39),t(),M(),t(),i(6,"div",47)(7,"p"),_(8,16),u(9,"date"),t(),i(10,"p"),_(11,17),u(12,"date"),t(),i(13,"p"),_(14,18),u(15,"durationFormat"),t(),i(16,"p"),_(17,19),t(),c(18,"spk-divider"),i(19,"p"),_(20,20),t(),i(21,"p"),_(22,21),t()()(),i(23,"details",45)(24,"summary")(25,"spk-icon"),F(26,"file-archive"),t(),F(27," Compression phase "),i(28,"div",46)(29,"spk-icon",39),F(30,"caret-down"),t()()(),i(31,"div",47)(32,"p"),_(33,22),u(34,"date"),t(),i(35,"p"),_(36,23),u(37,"date"),t(),i(38,"p"),_(39,24),u(40,"durationFormat"),t(),c(41,"spk-divider"),i(42,"p"),_(43,25),u(44,"bytes"),t(),i(45,"p"),_(46,26),u(47,"bytes"),t(),i(48,"p"),_(49,27),u(50,"bytes"),t(),c(51,"spk-divider"),i(52,"p"),_(53,28),t(),i(54,"p"),_(55,29),t()()()),n&2){let e=m(2).$implicit;o(9),s(T(9,17,e.data==null||e.data.TestResults==null?null:e.data.TestResults.BeginTime,"medium")),d(8),o(3),s(T(12,20,e.data==null||e.data.TestResults==null?null:e.data.TestResults.EndTime,"medium")),d(11),o(3),s(g(15,23,e.data==null||e.data.TestResults==null?null:e.data.TestResults.Duration)),d(14),o(2),s(e.data==null||e.data.TestResults==null?null:e.data.TestResults.VerificationsActualLength),d(17),o(3),s(e.data==null||e.data.TestResults==null?null:e.data.TestResults.WarningsActualLength),d(20),o(2),s(e.data==null||e.data.TestResults==null?null:e.data.TestResults.ErrorsActualLength),d(22),o(12),s(T(34,25,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.BeginTime,"medium")),d(33),o(3),s(T(37,28,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.EndTime,"medium")),d(36),o(3),s(g(40,31,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.Duration)),d(39),o(4),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileCount)(g(44,33,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileSize)),d(43),o(3),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileCount)(g(47,35,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileSize)),d(46),o(3),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileCount)(g(50,37,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileSize)),d(49),o(3),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.WarningsActualLength),d(53),o(2),s(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.ErrorsActualLength),d(55)}}function Je(n,a){if(n&1&&(i(0,"code"),F(1),u(2,"json"),t()),n&2){let e=a.$implicit;o(),x(g(2,1,e))}}function He(n,a){if(n&1&&(i(0,"details",45)(1,"summary"),N(2,30),c(3,"spk-icon"),i(4,"div",46),c(5,"spk-icon",39),t(),M(),t(),i(6,"div",47),k(7,Je,3,3,"code",null,I),t()()),n&2){let e=m(2).$implicit;o(5),s(e.data.VerificationsActualLength),d(2),o(2),v(e.data.Verifications)}}function Qe(n,a){if(n&1&&(i(0,"code"),F(1),u(2,"json"),t()),n&2){let e=a.$implicit;o(),x(g(2,1,e))}}function Ye(n,a){n&1&&(i(0,"p"),F(1,"No errors"),t())}function Ze(n,a){if(n&1&&(i(0,"code"),F(1),u(2,"json"),t()),n&2){let e=a.$implicit;o(),x(g(2,1,e))}}function en(n,a){if(n&1&&(i(0,"section",40)(1,"app-toggle-card",41),A(2,42),i(3,"h3"),_(4,0),t(),P(),A(5,43),i(6,"p"),_(7,1),u(8,"date"),t(),i(9,"p"),_(10,2),u(11,"date"),t(),i(12,"p"),_(13,3),u(14,"durationFormat"),t(),P(),t(),i(15,"app-toggle-card",41),A(16,42),i(17,"h3"),_(18,4),t(),P(),A(19,43),i(20,"p"),_(21,5),u(22,"bytes"),t(),i(23,"p"),_(24,6),u(25,"bytes"),t(),i(26,"p"),_(27,7),u(28,"bytes"),t(),i(29,"p"),_(30,8),u(31,"bytes"),t(),i(32,"p"),_(33,9),t(),i(34,"p"),_(35,10),t(),i(36,"p"),_(37,11),t(),P(),t(),i(38,"div",44),c(39,"spk-divider"),C(40,qe,56,39)(41,He,9,1,"details",45),i(42,"details",45)(43,"summary"),N(44,12),c(45,"spk-icon"),i(46,"div",46),c(47,"spk-icon",39),t(),M(),t(),i(48,"div",47),k(49,Qe,3,3,"code",null,I),t()(),i(51,"details",45)(52,"summary"),N(53,13),c(54,"spk-icon"),i(55,"div",46),c(56,"spk-icon",39),t(),M(),t(),i(57,"div",47),C(58,Ye,2,0,"p"),k(59,Ze,3,3,"code",null,I),t()(),c(61,"spk-divider"),i(62,"details")(63,"summary"),N(64,14),c(65,"spk-icon"),i(66,"div",46),c(67,"spk-icon",39),t(),M(),t(),i(68,"code")(69,"button",48),F(70,"Copy"),t(),F(71),u(72,"json"),t()()()()),n&2){let e=m().$implicit;o(),h("disallowToggle",!0),o(7),s(T(8,22,e.data==null?null:e.data.BeginTime,"medium")),d(7),o(3),s(T(11,25,e.data==null?null:e.data.EndTime,"medium")),d(10),o(3),s(g(14,28,e.data==null?null:e.data.Duration)),d(13),o(),h("disallowToggle",!0),o(7),s(e.data==null?null:e.data.ExaminedFiles)(g(22,30,e.data==null?null:e.data.SizeOfExaminedFiles)),d(21),o(3),s(e.data==null?null:e.data.OpenedFiles)(g(25,32,e.data==null?null:e.data.SizeOfOpenedFiles)),d(24),o(3),s(e.data==null?null:e.data.AddedFiles)(g(28,34,e.data==null?null:e.data.SizeOfAddedFiles)),d(27),o(3),s(e.data==null?null:e.data.ModifiedFiles)(g(31,36,e.data==null?null:e.data.SizeOfModifiedFiles)),d(30),o(2),s(e.data==null?null:e.data.DeletedFiles),d(33),o(2),s(e.data==null?null:e.data.TooLargeFiles),d(35),o(2),s(e.data==null?null:e.data.FilesWithError),d(37),o(3),E((e.data==null?null:e.data.MainOperation)==="Backup"?40:-1),o(),E((e.data==null?null:e.data.MainOperation)==="Test"?41:-1),o(6),s(e.data==null?null:e.data.WarningsActualLength),d(44),o(2),v(e.data==null?null:e.data.Warnings),o(7),s(e.data==null?null:e.data.ErrorsActualLength),d(53),o(2),E((e.data==null||e.data.Errors==null?null:e.data.Errors.length)===0?58:-1),o(),v(e.data==null?null:e.data.Errors),o(12),S(" ",g(72,38,e.data)," ")}}function nn(n,a){if(n&1){let e=K();i(0,"article",32)(1,"header",33),y("click",function(){let r=D(e).$implicit,L=m();return $(L.toggleOpenEntry(r.id))}),C(2,ze,1,0,"div",34)(3,Ve,1,0,"div",35)(4,We,1,0,"div",36),i(5,"h3"),F(6),u(7,"date"),t(),i(8,"p"),F(9),C(10,je,1,1),t(),c(11,"div",37),i(12,"div",38)(13,"spk-icon",39),F(14,"caret-down"),t()()(),C(15,en,73,40,"section",40),t()}if(n&2){let e=a.$implicit,l=m();o(2),E(e.data!=null&&e.data.ErrorsActualLength&&(e.data==null?null:e.data.ErrorsActualLength)>0?2:e.data!=null&&e.data.WarningsActualLength&&(e.data==null?null:e.data.WarningsActualLength)>0?3:4),o(4),x(T(7,7,e.timestamp,"medium")),o(3),S(" ",e.data==null?null:e.data.MainOperation," "),o(),E(e.data!=null&&e.data.WarningsActualLength&&(e.data==null?null:e.data.WarningsActualLength)>0?10:-1),o(3),f("open",e.id===l.openEntry()),o(2),E(e.id===l.openEntry()?15:-1)}}var de=class n{#e=R(ae);backupId=ie.required();openEntry=G(null);pagination=G({offset:0,pagesize:100});resource=se({request:()=>te({id:this.backupId()},this.pagination()),loader:({request:a})=>this.#e.getApiV1BackupByIdLog({id:a.id,pagesize:100}).pipe(B(e=>e.map(l=>({id:l.ID,operationId:l.OperationID,timestamp:l.Timestamp*1e3,type:l.Type,data:JSON.parse(l.Message),exception:JSON.stringify(l.Exception)==="{}"?null:l.Exception}))))});toggleOpenEntry(a){if(this.openEntry()===a){this.openEntry.set(null);return}this.openEntry.set(a)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-general-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:()=>{let a;a=$localize`Time`;let e;e=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let l;l=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let r;r=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let L;L=$localize`Source files`;let V;V=$localize`Evaluated: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let W;W=$localize`Opened: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let j;j=$localize`Added: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let q;q=$localize`Modified: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let J;J=$localize`Deleted: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let H;H=$localize`Too large: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Q;Q=$localize`Files with error: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let O;O=$localize`${"\uFFFD#45\uFFFD"}:START_TAG_SPK_ICON:warning-circle${"[\uFFFD/#45\uFFFD|\uFFFD/#47\uFFFD]"}:CLOSE_TAG_SPK_ICON: Warnings ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#46\uFFFD"}:START_TAG_DIV:${"\uFFFD#47\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#45\uFFFD|\uFFFD/#47\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_DIV:`,O=U(O);let Y;Y=$localize`${"\uFFFD#54\uFFFD"}:START_TAG_SPK_ICON:warning${"[\uFFFD/#54\uFFFD|\uFFFD/#56\uFFFD]"}:CLOSE_TAG_SPK_ICON: Errors ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#55\uFFFD"}:START_TAG_DIV:${"\uFFFD#56\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#54\uFFFD|\uFFFD/#56\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#55\uFFFD"}:CLOSE_TAG_DIV:`,Y=U(Y);let Z;Z=$localize`${"\uFFFD#65\uFFFD"}:START_TAG_SPK_ICON:notepad${"[\uFFFD/#65\uFFFD|\uFFFD/#67\uFFFD]"}:CLOSE_TAG_SPK_ICON: Complete log ${"\uFFFD#66\uFFFD"}:START_TAG_DIV:${"\uFFFD#67\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#65\uFFFD|\uFFFD/#67\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#66\uFFFD"}:CLOSE_TAG_DIV:`,Z=U(Z);let ee;ee=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:circle-half-tilt${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON: Test phase ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,ee=U(ee);let Fe;Fe=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ge;ge=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ee;Ee=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let me;me=$localize`Verifications: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ce;Ce=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Oe;Oe=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Le;Le=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Te;Te=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ae;Ae=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Pe;Pe=$localize` Deleted files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Se;Se=$localize` Downloaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Ge;Ge=$localize` Uploaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Ne;Ne=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Me;Me=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ne;return ne=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:warning-circle${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON: Verifications ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,ne=U(ne),[a,e,l,r,L,V,W,j,q,J,H,Q,O,Y,Z,ee,Fe,ge,Ee,me,Ce,Oe,Le,Te,Ae,Pe,Se,Ge,Ne,Me,ne,[1,"indeterminate","primary"],[1,"log-entry"],[3,"click"],[1,"status","error"],[1,"status","warn"],[1,"status"],[1,"spacer"],[1,"action"],[1,"toggle-indicator"],[1,"log-content"],[3,"disallowToggle"],["title",""],["content",""],[1,"extra-info"],["name","details"],[1,"actions"],[1,"content"],["spk-button","",1,"small"]]},template:function(e,l){e&1&&(C(0,we,1,0,"spk-progress-bar",31),k(1,nn,16,10,"article",32,I)),e&2&&(E(l.resource.isLoading()?0:-1),o(),v(l.resource.value()))},dependencies:[Ke,ye,re,_e,z,le,w,pe,oe],styles:["[_nghost-%COMP%]{display:block}.log-entry[_ngcontent-%COMP%]{display:flex;flex-direction:column;cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:1rem;border-bottom:1px solid var(--base-level-40);background-color:var(--base-level-10);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-level-20)}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-30);margin:0}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-level-60)}.toggle-indicator[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;transition:transform 125ms linear}.toggle-indicator.open[_ngcontent-%COMP%]{transform:rotate(180deg)}details[_ngcontent-%COMP%]{display:flex;flex-direction:column}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;gap:.5rem;padding:.75rem;border-radius:var(--shape-2);background-color:var(--base-level-20)}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:focus{outline:none}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:hover{background-color:var(--base-level-30)}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]::marker{font-size:0}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;flex:1 0;gap:.5rem;-webkit-user-select:none;user-select:none}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:2rem;transition:transform 125ms linear}details[open][_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding:.75rem 1rem 0;display:flex;flex-direction:column;gap:.75rem}details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}details[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{margin-top:.75rem;position:relative}details[_ngcontent-%COMP%] code[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{position:absolute;top:.75rem;right:.75rem}.extra-info[_ngcontent-%COMP%]{grid-column:1/-1;display:flex;flex-direction:column;gap:1rem}.extra-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:.75rem}.extra-info[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{white-space:pre-wrap;padding:1rem;display:block;border-radius:var(--shape-2);background-color:var(--base-level-20)}.log-content[_ngcontent-%COMP%]{padding:1rem;display:grid;grid-template-columns:1fr 1fr;gap:1rem}.status[_ngcontent-%COMP%]{display:block;width:1rem;height:1rem;background-color:var(--success-500);border-radius:50%}.status.error[_ngcontent-%COMP%]{background-color:var(--error-500)}.status.warn[_ngcontent-%COMP%]{background-color:var(--warn-500)}"],changeDetection:0})};function tn(n,a){n&1&&c(0,"spk-progress-bar",0)}function on(n,a){if(n&1&&(i(0,"section",5)(1,"code"),F(2),u(3,"json"),t()()),n&2){let e=m().$implicit;o(2),x(g(3,1,e.data))}}function an(n,a){if(n&1){let e=K();i(0,"article",1)(1,"header",2),y("click",function(){let r=D(e).$implicit,L=m();return $(L.toggleOpenEntry(r.id))}),i(2,"h3"),F(3),u(4,"date"),t(),i(5,"div",3)(6,"spk-icon",4),F(7,"caret-down"),t()()(),C(8,on,4,3,"section",5),t()}if(n&2){let e=a.$implicit,l=m();o(3),Re("",T(4,6,e.timestamp,"medium"),": ",e.operation," ",e.path,""),o(3),f("open",e.id===l.openEntry()),o(2),E(e.id===l.openEntry()?8:-1)}}var ue=class n{#e=R(ae);backupId=ie.required();openEntry=G(null);pagination=G({offset:0,pagesize:100});resource=se({request:()=>te({id:this.backupId()},this.pagination()),loader:({request:a})=>this.#e.getApiV1BackupByIdRemotelog({id:a.id,pagesize:100}).pipe(B(e=>e.map((l,r)=>({id:l.ID,operationId:l.OperationID,timestamp:l.Timestamp*1e3,operation:l.Operation,path:l.Path,data:typeof l.Data=="string"?JSON.parse(l.Data):null}))))});toggleOpenEntry(a){if(this.openEntry()===a){this.openEntry.set(null);return}this.openEntry.set(a)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-remote-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:[[1,"indeterminate","primary"],[1,"log-entry"],[3,"click"],[1,"actions"],[1,"toggle-indicator"],[1,"log-content"]],template:function(e,l){e&1&&(C(0,tn,1,0,"spk-progress-bar",0),k(1,an,9,9,"article",1,I)),e&2&&(E(l.resource.isLoading()?0:-1),o(),v(l.resource.value()))},dependencies:[oe,re,z,w],styles:["[_nghost-%COMP%]{display:block}.log-entry[_ngcontent-%COMP%]{display:flex;flex-direction:column}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:1rem;border-bottom:1px solid var(--base-level-40);background-color:var(--base-level-10);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-level-20)}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-30);margin:0;-webkit-user-select:none;user-select:none}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-level-60)}.toggle-indicator[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;transition:transform 125ms linear}.toggle-indicator.open[_ngcontent-%COMP%]{transform:rotate(180deg)}.log-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem}code[_ngcontent-%COMP%]{white-space:pre-wrap;padding:1rem;display:block;border-radius:var(--shape-2);background-color:var(--base-level-20)}"],changeDetection:0})};function ln(n,a){if(n&1&&(F(0," - "),A(1),_(2,6),P(),F(3),u(4,"durationFormat")),n&2){m(2);let e=X(6);o(3),S(" ",g(4,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDuration)," ")}}function _n(n,a){n&1&&(A(0),_(1,7),P())}function rn(n,a){if(n&1&&(F(0),u(1,"bytes")),n&2){m(2);let e=X(6);S(" ",g(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.SourceFilesSize)," ")}}function pn(n,a){n&1&&(A(0),_(1,8),P())}function sn(n,a){if(n&1&&(F(0),u(1,"bytes")),n&2){m(2);let e=X(6);S(" ",g(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.TargetFilesSize)," ")}}function dn(n,a){n&1&&(A(0),_(1,9),P())}function un(n,a){if(n&1&&(i(0,"spk-chip",19),_(1,10),t()),n&2){m(2);let e=X(6);o(),s(e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.BackupListCount),d(1)}}function cn(n,a){n&1&&(i(0,"spk-chip",20),_(1,11),t())}function Fn(n,a){if(n&1&&(i(0,"div",14)(1,"div",18)(2,"h3"),F(3),i(4,"spk-icon"),F(5,"database"),t()(),i(6,"p")(7,"span"),_(8,3),t(),F(9),u(10,"date"),C(11,ln,5,3)(12,_n,2,0,"ng-container"),t(),i(13,"p")(14,"span"),_(15,4),t(),C(16,rn,2,3)(17,pn,2,0,"ng-container"),t(),i(18,"p")(19,"span"),_(20,5),t(),C(21,sn,2,3)(22,dn,2,0,"ng-container"),t()(),C(23,un,2,1,"spk-chip",19)(24,cn,2,0,"spk-chip",20),t()),n&2){let e,l=m(),r=X(6);o(3),S(" ",(e=r.Backup==null?null:r.Backup.Name)!==null&&e!==void 0?e:l.MISSING_BACKUP_NAME," "),o(6),S(" ",T(10,6,r.Backup==null||r.Backup.Metadata==null?null:r.Backup.Metadata.LastBackupDate,"short")," "),o(2),E(!(r.Backup==null||r.Backup.Metadata==null)&&r.Backup.Metadata.LastBackupDuration?11:12),o(5),E(!(r.Backup==null||r.Backup.Metadata==null)&&r.Backup.Metadata.SourceFilesSize?16:17),o(5),E(!(r.Backup==null||r.Backup.Metadata==null)&&r.Backup.Metadata.TargetFilesSize?21:22),o(2),E(!(r.Backup==null||r.Backup.Metadata==null)&&r.Backup.Metadata.BackupListCount?23:24)}}function gn(n,a){if(n&1&&c(0,"app-general-log",17),n&2){let e=m();h("backupId",e.backupId())}}function En(n,a){if(n&1&&c(0,"app-remote-log",17),n&2){let e=m();h("backupId",e.backupId())}}var ce=class n{#e=R(Ie);#n=R(Be);MISSING_BACKUP_NAME=$localize`Backup name missing`;activeTab=G("general");backupId=he(this.#e.params.pipe(B(a=>a.id)));backup=fe(()=>{let a=this.backupId();return a?this.#n.getBackupById(a):null});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-log"]],decls:15,vars:8,consts:()=>{let a;a=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let e;e=$localize`General`;let l;l=$localize` Destination `;let r;r=$localize`Last successful backup:`;let L;L=$localize`Source:`;let V;V=$localize`Destination:`;let W;W=$localize`took`;let j;j=$localize`N/A`;let q;q=$localize`N/A`;let J;J=$localize`N/A`;let H;H=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION: Version`;let Q;return Q=$localize`No version yet`,[a,e,l,r,L,V,W,j,q,J,H,Q,[1,"back"],["type","button","spk-button","","routerLink","/",1,"small"],[1,"backup"],[1,"primary"],["tab","",3,"click"],[3,"backupId"],[1,"text"],[1,"simple","success"],[1,"simple"]]},template:function(e,l){if(e&1){let r=K();c(0,"app-status-bar"),i(1,"section")(2,"div",12)(3,"button",13),N(4,0),c(5,"spk-icon"),M(),t()(),De(6),C(7,Fn,25,9,"div",14),i(8,"spk-tabs",15)(9,"button",16),y("click",function(){return D(r),$(l.activeTab.set("general"))}),_(10,1),t(),i(11,"button",16),y("click",function(){return D(r),$(l.activeTab.set("destination"))}),_(12,2),t()(),C(13,gn,1,1,"app-general-log",17)(14,En,1,1,"app-remote-log",17),t()}if(e&2){o(6);let r=$e(l.backup());o(),E(r?7:-1),o(2),f("active",l.activeTab()==="general"),o(2),f("active",l.activeTab()==="destination"),o(2),E(l.activeTab()==="general"?13:-1),o(),E(l.activeTab()==="destination"?14:-1)}},dependencies:[xe,de,ue,ke,le,pe,w,be,z,_e,ve],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 1.5rem;gap:1rem}spk-tabs[_ngcontent-%COMP%]{margin-bottom:1rem}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-level-40);border-radius:var(--shape-3);box-shadow:var(--shadow-1)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{color:var(--base-level-60)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-level-60)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-level-70)}"],changeDetection:0})};export{ce as default};
@@ -1,2 +1,2 @@
1
- import{b as P}from"./chunk-DYCJPQSE.js";import"./chunk-TKVTCBLW.js";import"./chunk-2IDHF5MN.js";import{E as m,Lb as x,Oa as s,R as h,X as r,Zb as a,_a as u,_b as y,db as f,mb as C,qb as _,rb as v,sa as d,sb as L,tb as b,ub as o,vb as i,yc as M}from"./chunk-GM25ACCR.js";import"./chunk-7CGTOI24.js";var l=class e{#e=r(P);isLoaded=d(!1);crashLog=d(null);load(){this.isLoaded()||this.#e.getApiV1LogdataCrashlog().pipe(m(()=>this.isLoaded.set(!0))).subscribe({next:t=>{this.crashLog.set(t.Logdata??null)}})}static \u0275fac=function(n){return new(n||e)};static \u0275prov=h({token:e,factory:e.\u0275fac,providedIn:"root"})};function S(e,t){e&1&&(o(0,"div",0),a(1,"Loading ..."),i())}function k(e,t){e&1&&(o(0,"div",0),a(1,"No crash log found"),i())}function w(e,t){if(e&1&&(o(0,"li"),a(1),i()),e&2){let n=t.$implicit;s(),y(n)}}function I(e,t){if(e&1&&(o(0,"div",2)(1,"code")(2,"ol",3),L(3,w,2,1,"li",null,v),i()()()),e&2){let n=x();C("grid-column","1 / -1")("height","auto"),s(3),b(n.breakIntoLines(n.crashLog()))}}var p=class e{#e=r(l);logsLoading=M(()=>!this.#e.isLoaded());crashLog=this.#e.crashLog;ngOnInit(){this.#e.load()}breakIntoLines(t){return t?t.split(`
1
+ import{b as P}from"./chunk-PTDSOPNK.js";import"./chunk-MZ473NLM.js";import"./chunk-CKPICCFH.js";import{$b as a,Ac as M,F as m,Nb as x,Qa as s,S as h,Y as r,ab as u,ac as y,fb as f,ob as C,sb as _,tb as v,ua as d,ub as L,vb as b,wb as o,xb as i}from"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";var l=class e{#e=r(P);isLoaded=d(!1);crashLog=d(null);load(){this.isLoaded()||this.#e.getApiV1LogdataCrashlog().pipe(m(()=>this.isLoaded.set(!0))).subscribe({next:t=>{this.crashLog.set(t.Logdata??null)}})}static \u0275fac=function(n){return new(n||e)};static \u0275prov=h({token:e,factory:e.\u0275fac,providedIn:"root"})};function S(e,t){e&1&&(o(0,"div",0),a(1,"Loading ..."),i())}function k(e,t){e&1&&(o(0,"div",0),a(1,"No crash log found"),i())}function w(e,t){if(e&1&&(o(0,"li"),a(1),i()),e&2){let n=t.$implicit;s(),y(n)}}function I(e,t){if(e&1&&(o(0,"div",2)(1,"code")(2,"ol",3),L(3,w,2,1,"li",null,v),i()()()),e&2){let n=x();C("grid-column","1 / -1")("height","auto"),s(3),b(n.breakIntoLines(n.crashLog()))}}var p=class e{#e=r(l);logsLoading=M(()=>!this.#e.isLoaded());crashLog=this.#e.crashLog;ngOnInit(){this.#e.load()}breakIntoLines(t){return t?t.split(`
2
2
  `):[]}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=u({type:e,selectors:[["app-crashlogs"]],decls:5,vars:1,consts:[[1,"loading"],[2,"white-space","pre-wrap",3,"grid-column","height"],[2,"white-space","pre-wrap"],[1,"line-numbers-ol"]],template:function(n,c){if(n&1&&(o(0,"h3"),a(1,"Crash log"),i(),f(2,S,2,0,"div",0)(3,k,2,0,"div",0)(4,I,5,4,"div",1)),n&2){let g;s(2),_(c.logsLoading()?2:c.crashLog()==null||((g=c.crashLog())==null?null:g.length)===0?3:4)}},styles:["[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}spk-table[_ngcontent-%COMP%]{--table-columns: auto auto 1fr auto}spk-table[_ngcontent-%COMP%] td.id[_ngcontent-%COMP%]{justify-content:center}spk-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code){padding:1rem .75rem;overflow:hidden}spk-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code) code[_ngcontent-%COMP%]{background-color:var(--grey-800);color:var(--grey-100);padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{p as default};
@@ -1 +1 @@
1
- import{a as O,c as P,e as E,h as v,j as N,s as I}from"./chunk-QTTYDT3P.js";import{l as y,o as X,t as Y}from"./chunk-6WLXFV43.js";import{Ab as W,Gb as F,Hb as A,Ib as D,Kb as j,Lb as M,Mb as T,Nb as d,Oa as s,Zb as G,_a as f,ac as U,ca as $,cc as g,da as k,db as w,dc as _,ec as C,ic as S,kb as b,lb as p,mb as z,pa as m,rb as R,sa as l,sb as V,tb as B,ub as u,vb as a,xb as L,yb as x,yc as c,zc as h}from"./chunk-GM25ACCR.js";var Q=[[["label"]],[["","prefix",""]],[["","suffix",""]]],ee=["label","[prefix]","[suffix]"];function te(i,e){if(i&1&&G(0),i&2){let t=e.$implicit,n=M();U("",t.label,"",n.hasPerSecond()?"/s":"","")}}var ne=[{value:"bytes",label:"Bytes"},{value:"KB",label:"KB"},{value:"MB",label:"MB"},{value:"GB",label:"GB"},{value:"TB",label:"TB"},{value:"PB",label:"PB"}],ie=["throttle-upload","throttle-download"],H=class i{customId=m();inputType=m();timespan=l(0);unit=l("MB");sizeOptions=l(ne);readonly=l(!1);hasPerSecond=c(()=>{let e=this.inputType();return e&&ie.includes(e)});onChange=()=>{};onTouched=()=>{};onChangeEffect=h(()=>{this.onChange(this.getValue())});writeValue(e){if(e){let t=e.match(/^(\d+)(bytes|kb|mb|gb|tb|pb|b)$/i);t?(this.timespan.set(parseInt(t[1],10)),this.unit.set(t[2].toUpperCase())):(this.timespan.set(0),this.unit.set("MB"))}else this.timespan.set(0),this.unit.set("MB")}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.readonly.set(e)}getValue(){return`${this.timespan()}${this.unit()}`}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=f({type:i,selectors:[["app-size"]],inputs:{customId:[1,"customId"],inputType:[1,"inputType"]},features:[S([{provide:O,useExisting:i,multi:!0}])],ngContentSelectors:ee,decls:9,vars:10,consts:[[1,"label"],["type","number",3,"ngModelChange","id","ngModel","disabled"],["value","value","label","label",3,"options","readonly","isClearable"],["type","text",3,"ngModelChange","ngModel"]],template:function(t,n){t&1&&(T(Q),u(0,"div",0),d(1,0,["ngProjectAs","label",5,["label"]]),a(),u(2,"spk-form-field")(3,"input",1),C("ngModelChange",function(o){return _(n.timespan,o)||(n.timespan=o),o}),a(),d(4,1),d(5,2),a(),u(6,"spk-select",2)(7,"input",3),C("ngModelChange",function(o){return _(n.unit,o)||(n.unit=o),o}),a(),w(8,te,1,2,"ng-template"),a()),t&2&&(s(2),b("readonly",n.readonly()||void 0),s(),p("id",n.customId()),g("ngModel",n.timespan),p("disabled",n.readonly()),s(3),z("--miw",0),p("options",n.sizeOptions())("readonly",n.readonly())("isClearable",!1),s(),g("ngModel",n.unit))},dependencies:[Y,y,I,P,N,E,v],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label label" "input unit";grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] spk-form-field[_ngcontent-%COMP%]{grid-area:input}[_nghost-%COMP%] spk-select[_ngcontent-%COMP%]{grid-area:unit}'],changeDetection:0})};var oe=[[["label"]],[["","prefix",""]],[["","suffix",""]]],se=["label","[prefix]","[suffix]"];function ae(i,e){if(i&1){let t=W();u(0,"button",7),j("click",function(){let r=$(t).$implicit,o=M();return k(o.updateUnit(r.value))}),F(1,1),a()}if(i&2){let t=e.$implicit;s(),A(t.label),D(1)}}var le=[{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],re=[{value:"Y",label:$localize`Years`},{value:"M",label:$localize`Months`},{value:"W",label:$localize`Weeks`},{value:"D",label:$localize`Days`}],pe=["retry-delay","web-timeout","read-write-timeout","run-script-timeout","list-timeout","short-timeout"],K=class i{customId=m();inputType=m();timespan=l(0);#e="D";unit=l(this.#e);unitLabel=c(()=>{let e=this.timeOptions(),t=e.findIndex(n=>n.value===this.unit());return e[t]?.label??this.unit()});isShortTime=c(()=>{let e=this.inputType();return e&&pe.includes(e)});timeOptions=c(()=>this.isShortTime()?le:re);readonly=l(!1);onChange=()=>{};onTouched=()=>{};onChangeEffect=h(()=>{this.onChange(this.getValue())});inputTypeEffect=h(()=>{let e=this.timeOptions(),t=this.isShortTime()?"s":"D";this.#e=t,this.unit.set(t)});updateUnit(e){this.unit.set(e)}writeValue(e){let t=this.isShortTime();if(e){let n=t?/(\d+)([smh])/i:/^(\d+)([YMWD])$/i,r=e.match(n);r?(this.timespan.set(parseInt(r[1],10)),this.unit.set(r[2])):(this.timespan.set(0),this.unit.set(this.#e))}else this.timespan.set(0),this.unit.set(this.#e)}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.readonly.set(e)}getValue(){return`${this.timespan()}${this.unit()}`}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=f({type:i,selectors:[["app-timespan"]],inputs:{customId:[1,"customId"],inputType:[1,"inputType"]},features:[S([{provide:O,useExisting:i,multi:!0}])],ngContentSelectors:se,decls:11,vars:7,consts:()=>{let e;e=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let t;return t=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`,[e,t,["type","number",3,"ngModelChange","id","ngModel","disabled"],[3,"openIndicator","searchable"],["spk-button","","type","button",1,"trigger"],["menu",""],["spk-button","","type","button",1,"small"],["spk-button","","type","button",1,"small",3,"click"]]},template:function(t,n){t&1&&(T(oe),d(0,0,["ngProjectAs","label",5,["label"]]),u(1,"spk-form-field")(2,"input",2),C("ngModelChange",function(o){return _(n.timespan,o)||(n.timespan=o),o}),a(),d(3,1),d(4,2),a(),u(5,"spk-menu",3)(6,"button",4),F(7,0),a(),L(8,5),V(9,ae,2,1,"button",6,R),x(),a()),t&2&&(s(),b("readonly",n.readonly()||void 0),s(),p("id",n.customId()),g("ngModel",n.timespan),p("disabled",n.readonly()),s(3),p("openIndicator",!0)("searchable",!0),s(2),A(n.unitLabel()),D(7),s(2),B(n.timeOptions()))},dependencies:[X,y,I,P,N,E,v],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label label" "input unit";grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] spk-form-field[_ngcontent-%COMP%]{grid-area:input}[_nghost-%COMP%] spk-menu[_ngcontent-%COMP%]{grid-area:unit}[_nghost-%COMP%] spk-menu[_ngcontent-%COMP%] button.trigger[_ngcontent-%COMP%]{width:100%}'],changeDetection:0})};export{H as a,K as b};
1
+ import{a as O,c as P,e as E,h as v,j as N,s as I}from"./chunk-T2OUHRUV.js";import{l as y,o as X,t as Y}from"./chunk-WX7L7V6J.js";import{$b as G,Ab as x,Ac as c,Bc as h,Cb as W,Ib as F,Jb as A,Kb as D,Mb as j,Nb as M,Ob as T,Pb as d,Qa as s,ab as f,cc as U,da as $,ea as k,ec as g,fb as w,fc as _,gc as C,kc as S,mb as b,nb as p,ob as z,ra as m,tb as R,ua as l,ub as V,vb as B,wb as u,xb as a,zb as L}from"./chunk-W2F756OF.js";var Q=[[["label"]],[["","prefix",""]],[["","suffix",""]]],ee=["label","[prefix]","[suffix]"];function te(i,e){if(i&1&&G(0),i&2){let t=e.$implicit,n=M();U("",t.label,"",n.hasPerSecond()?"/s":"","")}}var ne=[{value:"bytes",label:"Bytes"},{value:"KB",label:"KB"},{value:"MB",label:"MB"},{value:"GB",label:"GB"},{value:"TB",label:"TB"},{value:"PB",label:"PB"}],ie=["throttle-upload","throttle-download"],H=class i{customId=m();inputType=m();timespan=l(0);unit=l("MB");sizeOptions=l(ne);readonly=l(!1);hasPerSecond=c(()=>{let e=this.inputType();return e&&ie.includes(e)});onChange=()=>{};onTouched=()=>{};onChangeEffect=h(()=>{this.onChange(this.getValue())});writeValue(e){if(e){let t=e.match(/^(\d+)(bytes|kb|mb|gb|tb|pb|b)$/i);t?(this.timespan.set(parseInt(t[1],10)),this.unit.set(t[2].toUpperCase())):(this.timespan.set(0),this.unit.set("MB"))}else this.timespan.set(0),this.unit.set("MB")}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.readonly.set(e)}getValue(){return`${this.timespan()}${this.unit()}`}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=f({type:i,selectors:[["app-size"]],inputs:{customId:[1,"customId"],inputType:[1,"inputType"]},features:[S([{provide:O,useExisting:i,multi:!0}])],ngContentSelectors:ee,decls:9,vars:10,consts:[[1,"label"],["type","number",3,"ngModelChange","id","ngModel","disabled"],["value","value","label","label",3,"options","readonly","isClearable"],["type","text",3,"ngModelChange","ngModel"]],template:function(t,n){t&1&&(T(Q),u(0,"div",0),d(1,0,["ngProjectAs","label",5,["label"]]),a(),u(2,"spk-form-field")(3,"input",1),C("ngModelChange",function(o){return _(n.timespan,o)||(n.timespan=o),o}),a(),d(4,1),d(5,2),a(),u(6,"spk-select",2)(7,"input",3),C("ngModelChange",function(o){return _(n.unit,o)||(n.unit=o),o}),a(),w(8,te,1,2,"ng-template"),a()),t&2&&(s(2),b("readonly",n.readonly()||void 0),s(),p("id",n.customId()),g("ngModel",n.timespan),p("disabled",n.readonly()),s(3),z("--miw",0),p("options",n.sizeOptions())("readonly",n.readonly())("isClearable",!1),s(),g("ngModel",n.unit))},dependencies:[Y,y,I,P,N,E,v],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label label" "input unit";grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] spk-form-field[_ngcontent-%COMP%]{grid-area:input}[_nghost-%COMP%] spk-select[_ngcontent-%COMP%]{grid-area:unit}'],changeDetection:0})};var oe=[[["label"]],[["","prefix",""]],[["","suffix",""]]],se=["label","[prefix]","[suffix]"];function ae(i,e){if(i&1){let t=W();u(0,"button",7),j("click",function(){let r=$(t).$implicit,o=M();return k(o.updateUnit(r.value))}),F(1,1),a()}if(i&2){let t=e.$implicit;s(),A(t.label),D(1)}}var le=[{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],re=[{value:"Y",label:$localize`Years`},{value:"M",label:$localize`Months`},{value:"W",label:$localize`Weeks`},{value:"D",label:$localize`Days`}],pe=["retry-delay","web-timeout","read-write-timeout","run-script-timeout","list-timeout","short-timeout"],K=class i{customId=m();inputType=m();timespan=l(0);#e="D";unit=l(this.#e);unitLabel=c(()=>{let e=this.timeOptions(),t=e.findIndex(n=>n.value===this.unit());return e[t]?.label??this.unit()});isShortTime=c(()=>{let e=this.inputType();return e&&pe.includes(e)});timeOptions=c(()=>this.isShortTime()?le:re);readonly=l(!1);onChange=()=>{};onTouched=()=>{};onChangeEffect=h(()=>{this.onChange(this.getValue())});inputTypeEffect=h(()=>{let e=this.timeOptions(),t=this.isShortTime()?"s":"D";this.#e=t,this.unit.set(t)});updateUnit(e){this.unit.set(e)}writeValue(e){let t=this.isShortTime();if(e){let n=t?/(\d+)([smh])/i:/^(\d+)([YMWD])$/i,r=e.match(n);r?(this.timespan.set(parseInt(r[1],10)),this.unit.set(r[2])):(this.timespan.set(0),this.unit.set(this.#e))}else this.timespan.set(0),this.unit.set(this.#e)}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.readonly.set(e)}getValue(){return`${this.timespan()}${this.unit()}`}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=f({type:i,selectors:[["app-timespan"]],inputs:{customId:[1,"customId"],inputType:[1,"inputType"]},features:[S([{provide:O,useExisting:i,multi:!0}])],ngContentSelectors:se,decls:11,vars:7,consts:()=>{let e;e=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let t;return t=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`,[e,t,["type","number",3,"ngModelChange","id","ngModel","disabled"],[3,"openIndicator","searchable"],["spk-button","","type","button",1,"trigger"],["menu",""],["spk-button","","type","button",1,"small"],["spk-button","","type","button",1,"small",3,"click"]]},template:function(t,n){t&1&&(T(oe),d(0,0,["ngProjectAs","label",5,["label"]]),u(1,"spk-form-field")(2,"input",2),C("ngModelChange",function(o){return _(n.timespan,o)||(n.timespan=o),o}),a(),d(3,1),d(4,2),a(),u(5,"spk-menu",3)(6,"button",4),F(7,0),a(),L(8,5),V(9,ae,2,1,"button",6,R),x(),a()),t&2&&(s(),b("readonly",n.readonly()||void 0),s(),p("id",n.customId()),g("ngModel",n.timespan),p("disabled",n.readonly()),s(3),p("openIndicator",!0)("searchable",!0),s(2),A(n.unitLabel()),D(7),s(2),B(n.timeOptions()))},dependencies:[X,y,I,P,N,E,v],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label label" "input unit";grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] spk-form-field[_ngcontent-%COMP%]{grid-area:input}[_nghost-%COMP%] spk-menu[_ngcontent-%COMP%]{grid-area:unit}[_nghost-%COMP%] spk-menu[_ngcontent-%COMP%] button.trigger[_ngcontent-%COMP%]{width:100%}'],changeDetection:0})};export{H as a,K as b};
@@ -1 +1 @@
1
- import{a as ke,c as Re,d as B}from"./chunk-UO57IKTF.js";import{a as Oe}from"./chunk-NYZVIDDD.js";import{a as ue}from"./chunk-KEHATBLP.js";import"./chunk-RHW5QVAY.js";import{b as de,c as Pe,d as S,e as Te,f as Ce,i as me,n as Ee,q as Se,r as ge,t as fe}from"./chunk-QTTYDT3P.js";import"./chunk-PX25CWH6.js";import{b as oe,d as te,e as ne}from"./chunk-7WCKE7GY.js";import"./chunk-BIHIR35J.js";import{A as Fe,a as re,b as se,f as ae,g as le,l as pe,p as _e,z as ce}from"./chunk-6WLXFV43.js";import{b as ie}from"./chunk-DYCJPQSE.js";import{c as ee}from"./chunk-TKVTCBLW.js";import"./chunk-2IDHF5MN.js";import{Ab as M,E as I,Eb as _,Fb as c,Gb as m,Hb as y,Ib as h,Jb as X,Kb as E,Lb as u,M as H,Oa as s,X as T,Zb as A,_a as J,_b as Q,ac as W,ca as x,da as D,db as d,jc as Y,lb as P,nb as f,qb as F,sa as C,ub as a,vb as r,wb as p,yc as N,zc as Z}from"./chunk-GM25ACCR.js";import"./chunk-7CGTOI24.js";var we=()=>["/"];function $e(t,o){t&1&&(a(0,"spk-toggle",24),_(1,5),p(2,"input",27),c(),r())}function xe(t,o){t&1&&(a(0,"span",30),m(1,9),r())}function De(t,o){if(t&1&&(a(0,"span",30),m(1,10),r()),t&2){let e=u(2);s(),y(e.exportForm.controls.password.errors==null?null:e.exportForm.controls.password.errors.minlength.requiredLength),h(1)}}function Ae(t,o){if(t&1&&p(0,"spk-progress-bar",37),t&2){let e=u(2);f("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),P("value",e.calculatePasswordStrength()*(100/5))}}function Ne(t,o){t&1&&(a(0,"span",30),m(1,11),r())}function Ie(t,o){t&1&&(a(0,"span",30),m(1,12),r())}function Me(t,o){if(t&1&&(a(0,"span",30),m(1,13),r()),t&2){let e=u(2);s(),y(e.exportForm.controls.repeatPassword.errors==null?null:e.exportForm.controls.repeatPassword.errors.minlength.requiredLength),h(1)}}function ye(t,o){t&1&&(_(0,7,1),p(1,"spk-icon"),c())}function he(t,o){t&1&&(_(0,7,2),p(1,"spk-icon"),c())}function Xe(t,o){t&1&&(_(0,14,1),p(1,"spk-icon",39),c())}function Be(t,o){t&1&&(_(0,14,2),p(1,"spk-icon"),c())}function Le(t,o){if(t&1){let e=M();a(0,"button",38),E("click",function(){x(e);let i=u(2);return D(i.copyPassword())}),_(1,14),d(2,Xe,2,0)(3,Be,2,0),c(),r()}if(t&2){let e=u(2);s(2),F(e.copiedPassword()?2:3)}}function be(t,o){t&1&&(a(0,"spk-alert",36),m(1,15),r())}function ve(t,o){if(t&1){let e=M();a(0,"div",25)(1,"spk-form-field")(2,"label",28),_(3,6),p(4,"sup"),c(),r(),p(5,"input",29),d(6,xe,2,0,"span",30)(7,De,2,1,"span",30),r(),d(8,Ae,1,9,"spk-progress-bar",31),a(9,"spk-form-field"),p(10,"input",32),d(11,Ne,2,0,"span",30)(12,Ie,2,0,"span",30)(13,Me,2,1,"span",30),r(),a(14,"div",33)(15,"button",34),E("click",function(){x(e);let i=u();return D(i.showPassword.set(!i.showPassword()))}),_(16,7),d(17,ye,2,0)(18,he,2,0),c(),r(),a(19,"button",34),E("click",function(){x(e);let i=u();return D(i.generatePassword())}),_(20,8),p(21,"spk-icon"),c(),r(),d(22,Le,4,1,"button",35),r(),d(23,be,2,0,"spk-alert",36),r()}if(t&2){let e=u();s(5),P("type",e.showPassword()?"text":"password"),s(),F(e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.required?6:e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.minlength?7:-1),s(2),F(e.exportForm.value.password?8:-1),s(2),P("type",e.showPassword()?"text":"password"),s(),F(e.exportForm.value.repeatPassword&&e.exportForm.value.repeatPassword!==e.exportForm.value.password?11:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.required?12:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.minlength?13:-1),s(6),F(e.showPassword()?17:18),s(5),F(e.showCopyPassword()?22:-1),s(),F(e.exportForm.value.password&&e.exportForm.value.password===e.exportForm.value.repeatPassword?23:-1)}}function Ge(t,o){if(t&1&&(a(0,"div",26)(1,"code"),A(2),r()()),t&2){let e=u();s(2),Q(e.exportedCmd())}}var O=new ge,L=class t{#o=T(ke);#t=T(ie);#e=T(oe);#n=T(te);#i=T(ee);#r=T(ue);isExporting=C(!1);exportType=C("file");exportedCmd=C(null);exportForm=O.group({exportPasswords:O.control(!0),encryption:O.control(!1,[S.required,Re()]),password:O.control("",[B("encryption",!0,[S.required,S.minLength(3)])]),repeatPassword:O.control("",[B("encryption",!0,[S.required,S.minLength(3)])])});exportFormSignal=Oe(this.exportForm.valueChanges);encryptionFieldSignal=N(()=>this.exportFormSignal()?.encryption??!1);activeBackup=N(()=>this.#r.backups().find(o=>o.Backup?.ID===this.#e.snapshot.params.id));showPassword=C(!1);copiedPassword=C(!1);showCopyPassword=C(!1);calculatePasswordStrength=N(()=>{let e=this.exportFormSignal()?.password??"";return this.#o.calculatePasswordStrength(e)});showPasswordEffect=Z(()=>{this.showPassword()&&this.exportForm.updateValueAndValidity()});submit(){this.isExporting.set(!0),this.exportType()==="file"?this.#t.postApiV1AuthIssuetokenByOperation({operation:"export"}).pipe(H(o=>{let e=i=>{let g=Object.entries(i);return g?"?"+g.map(([k,R])=>`${k}=${R}`).join("&"):""},n=this.exportFormSignal()?.password?.length?this.exportFormSignal()?.password:void 0;return this.#i.get(`/api/v1/backup/${this.#e.snapshot.params.id}/export${e({"export-passwords":this.exportFormSignal()?.exportPasswords??void 0,passphrase:n,token:o.Token})}`,{responseType:"blob"})}),I(()=>this.isExporting.set(!1))).subscribe({next:o=>{let n=this.activeBackup()?.Backup?.Name??"Backup",i=this.exportFormSignal()?.encryption?"aes":"json";this.downloadFile(o,`${n}-duplicati-config.${i}`),this.#n.navigate(["/"])},error:o=>{}}):this.#t.getApiV1BackupByIdExportCmdline({id:this.#e.snapshot.params.id,exportPasswords:this.exportFormSignal()?.exportPasswords??void 0,passphrase:this.exportFormSignal()?.password??void 0}).pipe(I(()=>this.isExporting.set(!1))).subscribe({next:o=>{this.exportedCmd.set(o.Command??null)},error:o=>{}})}downloadFile(o,e){let n=window.URL.createObjectURL(o),i=document.createElement("a");i.href=n,i.download=e,i.click(),window.URL.revokeObjectURL(n)}async copyPassword(){let o=this.exportForm.controls.password.value;await this.#s(o??""),this.copiedPassword.set(!0)}async#s(o){try{await navigator.clipboard.writeText(o)}catch{try{let n=document.createElement("textarea");n.value=o,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}catch(n){console.error("Failed to copy text: ",n)}}}generatePassword(){this.copiedPassword.set(!1);let o=this.#o.generate(16);this.exportForm.controls.password.setValue(o),this.exportForm.controls.repeatPassword.setValue(o),this.showCopyPassword.set(!0)}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=J({type:t,selectors:[["app-export"]],decls:27,vars:16,consts:()=>{let o;o=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let e;e=$localize`${"\uFFFD#10\uFFFD"}:START_TAG_SPK_ICON:export${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_SPK_ICON: Export `;let n;n=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:terminal-window${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: As command line `;let i;i=$localize`${"\uFFFD#20\uFFFD"}:START_TAG_SPK_ICON:file${"\uFFFD/#20\uFFFD"}:CLOSE_TAG_SPK_ICON: To file `;let g;g=$localize` Export passwords ${"\uFFFD#23\uFFFD\uFFFD/#23\uFFFD"}:TAG_INPUT:`;let k;k=$localize` Encrypt file ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let R;R=$localize`Password`;let b;b=$localize`Repeat password`;let v;v=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let w;w=$localize`${"\uFFFD*17: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/*17:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*18: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/*18:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,w=X(w);let G;G=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let K;K=$localize`Passwords are required`;let U;U=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let z;z=$localize`Passwords do not match`;let V;V=$localize`Passwords are required`;let q;q=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let $;$=$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:`,$=X($);let j;return j=$localize` Tip: Be sure to save your password. If you loose it you will lose access to your backups. `,[o,e,n,i,g,k,v,w,G,K,U,z,V,q,$,j,[1,"actions"],["spk-button","",1,"outlined",3,"routerLink"],["message","Remember to copy the password",1,"primary",3,"disabled"],["spk-button","",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["type","button",3,"click"],[1,"raised","primary"],["type","checkbox","formControlName","exportPasswords"],[1,"primary","raised"],[1,"passwords"],[1,"cmd-output"],["type","checkbox","formControlName","encryption"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",R,"formControlName","password",3,"type"],["error",""],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",b,"formControlName","repeatPassword",3,"type"],[1,"password-actions"],["spk-button","","type","button",1,"small",3,"click"],["spk-button","","type","button",1,"small","copy"],[1,"primary"],[1,"raised",3,"value"],["spk-button","","type","button",1,"small","copy",3,"click"],[1,"spk-success"]]},template:function(e,n){if(e&1&&(a(0,"header")(1,"h3"),A(2," Export backup configuration "),a(3,"div",16)(4,"button",17),_(5,0),p(6,"spk-icon"),c(),r(),a(7,"spk-tooltip",18)(8,"button",19),E("click",function(){return n.submit()}),_(9,1),p(10,"spk-icon"),c(),r()()()(),a(11,"p"),A(12),r()(),a(13,"form",20)(14,"spk-button-group")(15,"button",21),E("click",function(){return n.exportType.set("cmd")}),_(16,2),p(17,"spk-icon"),c(),r(),a(18,"button",21),E("click",function(){return n.exportType.set("file")}),_(19,3),p(20,"spk-icon"),c(),r()(),a(21,"spk-toggle",22),_(22,4),p(23,"input",23),c(),r(),d(24,$e,3,0,"spk-toggle",24)(25,ve,24,8,"div",25)(26,Ge,3,1,"div",26),r()),e&2){let i;s(4),P("routerLink",Y(15,we)),s(3),f("loading",n.isExporting()),P("disabled",!(n.showCopyPassword()&&!n.copiedPassword())),s(),P("disabled",n.exportForm.invalid||n.showCopyPassword()&&!n.copiedPassword()),s(4),W("#",(i=n.activeBackup())==null||i.Backup==null?null:i.Backup.ID,": ",(i=n.activeBackup())==null||i.Backup==null?null:i.Backup.Name,""),s(),P("formGroup",n.exportForm),s(2),f("active",n.exportType()==="cmd"),s(3),f("active",n.exportType()==="file"),s(6),F(n.exportType()==="file"?24:-1),s(),F(n.encryptionFieldSignal()?25:-1),s(),F(n.exportedCmd()?26:-1)}},dependencies:[fe,me,Pe,de,Te,Ce,Ee,Se,ne,ae,ce,re,pe,le,se,_e,Fe],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.copy[_ngcontent-%COMP%] spk-icon.spk-success[_ngcontent-%COMP%]{color:var(--success-500)}.hide[_ngcontent-%COMP%]{display:none}"],changeDetection:0})};export{L as default};
1
+ import{a as ke,c as Re,d as B}from"./chunk-KSP3JQHY.js";import{a as Oe}from"./chunk-HTNYQE2B.js";import{a as ue}from"./chunk-VOGYVLLM.js";import"./chunk-RHW5QVAY.js";import{b as de,c as Pe,d as S,e as Te,f as Ce,i as me,n as Ee,q as Se,r as ge,t as fe}from"./chunk-T2OUHRUV.js";import"./chunk-I3C2AEHI.js";import{b as oe,d as te,e as ne}from"./chunk-QVIZK4WW.js";import"./chunk-WMTA6PZM.js";import{A as Fe,a as re,b as se,f as ae,g as le,l as pe,p as _e,z as ce}from"./chunk-WX7L7V6J.js";import{b as ie}from"./chunk-PTDSOPNK.js";import{c as ee}from"./chunk-MZ473NLM.js";import"./chunk-CKPICCFH.js";import{$b as A,Ac as N,Bc as Z,Cb as M,F as I,Gb as _,Hb as c,Ib as m,Jb as y,Kb as h,Lb as X,Mb as E,N as H,Nb as u,Qa as s,Y as T,ab as Q,ac as J,cc as W,da as x,ea as D,fb as d,lc as Y,nb as P,pb as f,sb as F,ua as C,wb as a,xb as r,yb as p}from"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";var we=()=>["/"];function $e(t,o){t&1&&(a(0,"spk-toggle",24),_(1,5),p(2,"input",27),c(),r())}function xe(t,o){t&1&&(a(0,"span",30),m(1,9),r())}function De(t,o){if(t&1&&(a(0,"span",30),m(1,10),r()),t&2){let e=u(2);s(),y(e.exportForm.controls.password.errors==null?null:e.exportForm.controls.password.errors.minlength.requiredLength),h(1)}}function Ae(t,o){if(t&1&&p(0,"spk-progress-bar",37),t&2){let e=u(2);f("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),P("value",e.calculatePasswordStrength()*(100/5))}}function Ne(t,o){t&1&&(a(0,"span",30),m(1,11),r())}function Ie(t,o){t&1&&(a(0,"span",30),m(1,12),r())}function Me(t,o){if(t&1&&(a(0,"span",30),m(1,13),r()),t&2){let e=u(2);s(),y(e.exportForm.controls.repeatPassword.errors==null?null:e.exportForm.controls.repeatPassword.errors.minlength.requiredLength),h(1)}}function ye(t,o){t&1&&(_(0,7,1),p(1,"spk-icon"),c())}function he(t,o){t&1&&(_(0,7,2),p(1,"spk-icon"),c())}function Xe(t,o){t&1&&(_(0,14,1),p(1,"spk-icon",39),c())}function Be(t,o){t&1&&(_(0,14,2),p(1,"spk-icon"),c())}function Le(t,o){if(t&1){let e=M();a(0,"button",38),E("click",function(){x(e);let i=u(2);return D(i.copyPassword())}),_(1,14),d(2,Xe,2,0)(3,Be,2,0),c(),r()}if(t&2){let e=u(2);s(2),F(e.copiedPassword()?2:3)}}function be(t,o){t&1&&(a(0,"spk-alert",36),m(1,15),r())}function ve(t,o){if(t&1){let e=M();a(0,"div",25)(1,"spk-form-field")(2,"label",28),_(3,6),p(4,"sup"),c(),r(),p(5,"input",29),d(6,xe,2,0,"span",30)(7,De,2,1,"span",30),r(),d(8,Ae,1,9,"spk-progress-bar",31),a(9,"spk-form-field"),p(10,"input",32),d(11,Ne,2,0,"span",30)(12,Ie,2,0,"span",30)(13,Me,2,1,"span",30),r(),a(14,"div",33)(15,"button",34),E("click",function(){x(e);let i=u();return D(i.showPassword.set(!i.showPassword()))}),_(16,7),d(17,ye,2,0)(18,he,2,0),c(),r(),a(19,"button",34),E("click",function(){x(e);let i=u();return D(i.generatePassword())}),_(20,8),p(21,"spk-icon"),c(),r(),d(22,Le,4,1,"button",35),r(),d(23,be,2,0,"spk-alert",36),r()}if(t&2){let e=u();s(5),P("type",e.showPassword()?"text":"password"),s(),F(e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.required?6:e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.minlength?7:-1),s(2),F(e.exportForm.value.password?8:-1),s(2),P("type",e.showPassword()?"text":"password"),s(),F(e.exportForm.value.repeatPassword&&e.exportForm.value.repeatPassword!==e.exportForm.value.password?11:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.required?12:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.minlength?13:-1),s(6),F(e.showPassword()?17:18),s(5),F(e.showCopyPassword()?22:-1),s(),F(e.exportForm.value.password&&e.exportForm.value.password===e.exportForm.value.repeatPassword?23:-1)}}function Ge(t,o){if(t&1&&(a(0,"div",26)(1,"code"),A(2),r()()),t&2){let e=u();s(2),J(e.exportedCmd())}}var O=new ge,L=class t{#o=T(ke);#t=T(ie);#e=T(oe);#n=T(te);#i=T(ee);#r=T(ue);isExporting=C(!1);exportType=C("file");exportedCmd=C(null);exportForm=O.group({exportPasswords:O.control(!0),encryption:O.control(!1,[S.required,Re()]),password:O.control("",[B("encryption",!0,[S.required,S.minLength(3)])]),repeatPassword:O.control("",[B("encryption",!0,[S.required,S.minLength(3)])])});exportFormSignal=Oe(this.exportForm.valueChanges);encryptionFieldSignal=N(()=>this.exportFormSignal()?.encryption??!1);activeBackup=N(()=>this.#r.backups().find(o=>o.Backup?.ID===this.#e.snapshot.params.id));showPassword=C(!1);copiedPassword=C(!1);showCopyPassword=C(!1);calculatePasswordStrength=N(()=>{let e=this.exportFormSignal()?.password??"";return this.#o.calculatePasswordStrength(e)});showPasswordEffect=Z(()=>{this.showPassword()&&this.exportForm.updateValueAndValidity()});submit(){this.isExporting.set(!0),this.exportType()==="file"?this.#t.postApiV1AuthIssuetokenByOperation({operation:"export"}).pipe(H(o=>{let e=i=>{let g=Object.entries(i);return g?"?"+g.map(([k,R])=>`${k}=${R}`).join("&"):""},n=this.exportFormSignal()?.password?.length?this.exportFormSignal()?.password:void 0;return this.#i.get(`/api/v1/backup/${this.#e.snapshot.params.id}/export${e({"export-passwords":this.exportFormSignal()?.exportPasswords??void 0,passphrase:n,token:o.Token})}`,{responseType:"blob"})}),I(()=>this.isExporting.set(!1))).subscribe({next:o=>{let n=this.activeBackup()?.Backup?.Name??"Backup",i=this.exportFormSignal()?.encryption?"aes":"json";this.downloadFile(o,`${n}-duplicati-config.${i}`),this.#n.navigate(["/"])},error:o=>{}}):this.#t.getApiV1BackupByIdExportCmdline({id:this.#e.snapshot.params.id,exportPasswords:this.exportFormSignal()?.exportPasswords??void 0,passphrase:this.exportFormSignal()?.password??void 0}).pipe(I(()=>this.isExporting.set(!1))).subscribe({next:o=>{this.exportedCmd.set(o.Command??null)},error:o=>{}})}downloadFile(o,e){let n=window.URL.createObjectURL(o),i=document.createElement("a");i.href=n,i.download=e,i.click(),window.URL.revokeObjectURL(n)}async copyPassword(){let o=this.exportForm.controls.password.value;await this.#s(o??""),this.copiedPassword.set(!0)}async#s(o){try{await navigator.clipboard.writeText(o)}catch{try{let n=document.createElement("textarea");n.value=o,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}catch(n){console.error("Failed to copy text: ",n)}}}generatePassword(){this.copiedPassword.set(!1);let o=this.#o.generate(16);this.exportForm.controls.password.setValue(o),this.exportForm.controls.repeatPassword.setValue(o),this.showCopyPassword.set(!0)}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=Q({type:t,selectors:[["app-export"]],decls:27,vars:16,consts:()=>{let o;o=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let e;e=$localize`${"\uFFFD#10\uFFFD"}:START_TAG_SPK_ICON:export${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_SPK_ICON: Export `;let n;n=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:terminal-window${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: As command line `;let i;i=$localize`${"\uFFFD#20\uFFFD"}:START_TAG_SPK_ICON:file${"\uFFFD/#20\uFFFD"}:CLOSE_TAG_SPK_ICON: To file `;let g;g=$localize` Export passwords ${"\uFFFD#23\uFFFD\uFFFD/#23\uFFFD"}:TAG_INPUT:`;let k;k=$localize` Encrypt file ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let R;R=$localize`Password`;let b;b=$localize`Repeat password`;let v;v=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let w;w=$localize`${"\uFFFD*17: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/*17:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*18: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/*18:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,w=X(w);let G;G=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let K;K=$localize`Passwords are required`;let U;U=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let z;z=$localize`Passwords do not match`;let V;V=$localize`Passwords are required`;let q;q=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let $;$=$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:`,$=X($);let j;return j=$localize` Tip: Be sure to save your password. If you loose it you will lose access to your backups. `,[o,e,n,i,g,k,v,w,G,K,U,z,V,q,$,j,[1,"actions"],["spk-button","",1,"outlined",3,"routerLink"],["message","Remember to copy the password",1,"primary",3,"disabled"],["spk-button","",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["type","button",3,"click"],[1,"raised","primary"],["type","checkbox","formControlName","exportPasswords"],[1,"primary","raised"],[1,"passwords"],[1,"cmd-output"],["type","checkbox","formControlName","encryption"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",R,"formControlName","password",3,"type"],["error",""],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",b,"formControlName","repeatPassword",3,"type"],[1,"password-actions"],["spk-button","","type","button",1,"small",3,"click"],["spk-button","","type","button",1,"small","copy"],[1,"primary"],[1,"raised",3,"value"],["spk-button","","type","button",1,"small","copy",3,"click"],[1,"spk-success"]]},template:function(e,n){if(e&1&&(a(0,"header")(1,"h3"),A(2," Export backup configuration "),a(3,"div",16)(4,"button",17),_(5,0),p(6,"spk-icon"),c(),r(),a(7,"spk-tooltip",18)(8,"button",19),E("click",function(){return n.submit()}),_(9,1),p(10,"spk-icon"),c(),r()()()(),a(11,"p"),A(12),r()(),a(13,"form",20)(14,"spk-button-group")(15,"button",21),E("click",function(){return n.exportType.set("cmd")}),_(16,2),p(17,"spk-icon"),c(),r(),a(18,"button",21),E("click",function(){return n.exportType.set("file")}),_(19,3),p(20,"spk-icon"),c(),r()(),a(21,"spk-toggle",22),_(22,4),p(23,"input",23),c(),r(),d(24,$e,3,0,"spk-toggle",24)(25,ve,24,8,"div",25)(26,Ge,3,1,"div",26),r()),e&2){let i;s(4),P("routerLink",Y(15,we)),s(3),f("loading",n.isExporting()),P("disabled",!(n.showCopyPassword()&&!n.copiedPassword())),s(),P("disabled",n.exportForm.invalid||n.showCopyPassword()&&!n.copiedPassword()),s(4),W("#",(i=n.activeBackup())==null||i.Backup==null?null:i.Backup.ID,": ",(i=n.activeBackup())==null||i.Backup==null?null:i.Backup.Name,""),s(),P("formGroup",n.exportForm),s(2),f("active",n.exportType()==="cmd"),s(3),f("active",n.exportType()==="file"),s(6),F(n.exportType()==="file"?24:-1),s(),F(n.encryptionFieldSignal()?25:-1),s(),F(n.exportedCmd()?26:-1)}},dependencies:[fe,me,Pe,de,Te,Ce,Ee,Se,ne,ae,ce,re,pe,le,se,_e,Fe],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.copy[_ngcontent-%COMP%] spk-icon.spk-success[_ngcontent-%COMP%]{color:var(--success-500)}.hide[_ngcontent-%COMP%]{display:none}"],changeDetection:0})};export{L as default};
@@ -0,0 +1 @@
1
+ import{b as u}from"./chunk-PTDSOPNK.js";import{Ac as r,Bc as g,F as s,S as n,Y as o,ua as l}from"./chunk-W2F756OF.js";var h=[{value:"Disabled",label:$localize`Disabled`},{value:"Verbose",label:$localize`Verbose`},{value:"ExplicitOnly",label:$localize`Explicit only`},{value:"Profiling",label:$localize`Profiling`},{value:"Retry",label:$localize`Retry`},{value:"Information",label:$localize`Information`},{value:"DryRun",label:$localize`Dry run`},{value:"Warning",label:$localize`Warning`},{value:"Error",label:$localize`Error`}],c=class a{#l=o(u);#e=l([]);LOG_LEVELS=h;logLevel=l("Disabled");logLevelByLabel=r(()=>h.find(e=>e.value===this.logLevel())?.label);whenFilter=l(null);backupIdFilter=l(null);id=l(0);logs=r(()=>this.whenFilter()&&this.backupIdFilter()?this.#e().filter(e=>e.BackupID===this.backupIdFilter()&&new Date(e.When).getTime()>=this.whenFilter()&&e.BackupID===this.backupIdFilter()):this.#e());timerInterval;logsLoading=l(!1);isPolling=l(!1);pagination=l({offset:0,pagesize:100});logLevelEffect=g(()=>{this.logLevel()==="Disabled"?this.timerInterval=void 0:this.isPolling()?(this.#e.set([]),this.id.set(0),queueMicrotask(()=>this.loadLogs()),this.timerInterval&&clearInterval(this.timerInterval),this.timerInterval=setInterval(()=>{this.loadLogs()},3e3)):(this.timerInterval&&clearInterval(this.timerInterval),this.timerInterval=void 0)});setWhenFilter(e){this.whenFilter.set(e)}setBackupIdFilter(e){this.backupIdFilter.set(e)}loadLogs(){this.logsLoading.set(!0),this.#l.getApiV1LogdataPoll({id:this.id(),level:this.logLevel(),pagesize:this.pagination().pagesize}).pipe(s(()=>this.logsLoading.set(!1))).subscribe({next:e=>{let t=e.reverse(),i=this.#t(t);i>0&&this.id.set(i),this.#e.set([...t,...this.#e()])}})}updateLogLevel(e){this.logLevel.set(e)}#t(e){return e.reduce((t,i)=>Math.max(t,i.ID),0)}destroy(){this.logLevel.set("Disabled"),this.timerInterval&&clearInterval(this.timerInterval)}static \u0275fac=function(t){return new(t||a)};static \u0275prov=n({token:a,factory:a.\u0275fac,providedIn:"root"})};export{c as a};
@@ -1 +1 @@
1
- import{Ab as C,Kb as x,Lb as l,Oa as n,Zb as r,_a as T,_b as m,ca as f,da as _,db as u,oa as g,pa as D,qb as s,ub as i,vb as o,yc as b}from"./chunk-GM25ACCR.js";import{a as p}from"./chunk-7CGTOI24.js";function v(e,a){if(e&1&&(i(0,"p"),r(1),o()),e&2){let t=l();n(),m(t._data().message)}}function y(e,a){if(e&1){let t=C();i(0,"button",5),x("click",function(){f(t);let d=l();return _(d.close("cancel"))}),r(1),o()}if(e&2){let t=l();n(),m(t._data().cancelText)}}function h(e,a){if(e&1){let t=C();i(0,"button",6),x("click",function(){f(t);let d=l();return _(d.close("confirm"))}),r(1),o()}if(e&2){let t=l();n(),m(t._data().confirmText)}}var w={title:$localize`Are you sure?`,confirmText:void 0,cancelText:$localize`Cancel`},k=class e{data=D();_data=b(()=>p(p({},w),this.data()));closed=g();close(a="confirm"){this.closed.emit(a==="confirm")}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=T({type:e,selectors:[["app-confirm-dialog"]],inputs:{data:[1,"data"]},outputs:{closed:"closed"},decls:8,vars:4,consts:[["header",""],["content",""],["footer",""],["spk-button","",1,""],["spk-button","",1,"raised","primary"],["spk-button","",1,"",3,"click"],["spk-button","",1,"raised","primary",3,"click"]],template:function(t,c){t&1&&(i(0,"header",0)(1,"h3"),r(2),o()(),i(3,"div",1),u(4,v,2,1,"p"),o(),i(5,"footer",2),u(6,y,2,1,"button",3)(7,h,2,1,"button",4),o()),t&2&&(n(2),m(c._data().title),n(2),s(c._data().message?4:-1),n(2),s(c._data().cancelText?6:-1),n(),s(c._data().confirmText?7:-1))},styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};export{k as a};
1
+ import{$b as r,Ac as b,Cb as C,Mb as x,Nb as l,Qa as n,ab as T,ac as m,da as f,ea as _,fb as u,qa as g,ra as D,sb as s,wb as i,xb as o}from"./chunk-W2F756OF.js";import{a as p}from"./chunk-7CGTOI24.js";function v(e,a){if(e&1&&(i(0,"p"),r(1),o()),e&2){let t=l();n(),m(t._data().message)}}function y(e,a){if(e&1){let t=C();i(0,"button",5),x("click",function(){f(t);let d=l();return _(d.close("cancel"))}),r(1),o()}if(e&2){let t=l();n(),m(t._data().cancelText)}}function h(e,a){if(e&1){let t=C();i(0,"button",6),x("click",function(){f(t);let d=l();return _(d.close("confirm"))}),r(1),o()}if(e&2){let t=l();n(),m(t._data().confirmText)}}var w={title:$localize`Are you sure?`,confirmText:void 0,cancelText:$localize`Cancel`},k=class e{data=D();_data=b(()=>p(p({},w),this.data()));closed=g();close(a="confirm"){this.closed.emit(a==="confirm")}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=T({type:e,selectors:[["app-confirm-dialog"]],inputs:{data:[1,"data"]},outputs:{closed:"closed"},decls:8,vars:4,consts:[["header",""],["content",""],["footer",""],["spk-button","",1,""],["spk-button","",1,"raised","primary"],["spk-button","",1,"",3,"click"],["spk-button","",1,"raised","primary",3,"click"]],template:function(t,c){t&1&&(i(0,"header",0)(1,"h3"),r(2),o()(),i(3,"div",1),u(4,v,2,1,"p"),o(),i(5,"footer",2),u(6,y,2,1,"button",3)(7,h,2,1,"button",4),o()),t&2&&(n(2),m(c._data().title),n(2),s(c._data().message?4:-1),n(2),s(c._data().cancelText?6:-1),n(),s(c._data().confirmText?7:-1))},styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};export{k as a};
@@ -0,0 +1,4 @@
1
+ import{g as Yt}from"./chunk-4LYA3XAH.js";import{a as jt,b as Qt,c as Jt,n as Z}from"./chunk-QO6SPSAF.js";import{a as zt,b as Xt}from"./chunk-6DH6O5YE.js";import{a as Wt}from"./chunk-TQGG56ZZ.js";import{a as qt}from"./chunk-VN7JM6M3.js";import"./chunk-KSP3JQHY.js";import"./chunk-HTNYQE2B.js";import"./chunk-SAVY3OEX.js";import{a as Kt}from"./chunk-7L42EO7J.js";import"./chunk-RHW5QVAY.js";import{b as ht,c as $t,e as wt,f as At,g as vt,i as Pt,j as Vt,m as bt,n as Mt,o as Gt,p as Bt,q as Lt,r as Ut,t as Ht}from"./chunk-T2OUHRUV.js";import{b as gt,d as ft}from"./chunk-QVIZK4WW.js";import"./chunk-WMTA6PZM.js";import{A as yt,a as Dt,b as St,d as Et,e as Ot,l as xt,o as kt,p as Rt,t as Nt,z as It}from"./chunk-WX7L7V6J.js";import"./chunk-PTDSOPNK.js";import{c as Ct}from"./chunk-MZ473NLM.js";import{i as Tt}from"./chunk-CKPICCFH.js";import{$b as _,Ab as w,Ac as H,Bb as b,Bc as dt,Cb as S,F as nt,Gb as E,Hb as O,Ib as M,Jb as X,Kb as q,Lb as U,Mb as f,Nb as s,Qa as a,Qb as k,Sb as rt,Tb as d,Xa as ot,Y as N,Yb as lt,Zb as st,_b as A,ab as at,ac as j,bc as D,cc as pt,da as C,ea as g,ec as _t,fb as m,fc as ct,gc as mt,hc as Q,ic as J,ja as it,jc as Y,kc as Ft,lc as ut,mc as G,nb as c,oc as B,pb as z,sb as F,sc as L,tb as I,ua as x,ub as y,vb as h,wb as l,xb as r,yb as u,zb as $}from"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";var Zt=["formRef"],te=(n,i,t,e)=>({index:n,formView:i,formGroupName:"custom",destinationType:t,oauthField:e}),W=n=>({$implicit:n}),ee=(n,i,t,e)=>({index:n,formView:i,formGroupName:"dynamic",destinationType:t,oauthField:e}),ne=(n,i,t,e)=>({index:n,formView:i,formGroupName:"advanced",destinationType:t,oauthField:e}),ie=(n,i,t,e)=>({index:n,formView:i,formGroupName:"advanced",asHttpOptions:!0,destinationType:t,oauthField:e}),oe=()=>({maxWidth:"700px",width:"100%"});function ae(n,i){n&1&&(E(0,5,2),u(1,"spk-icon"),O())}function re(n,i){n&1&&M(0,5,3)}function le(n,i){if(n&1){let t=S();E(0,5,1),l(1,"button",21),f("click",function(){C(t);let o=s();return g(o.testDestination())}),m(2,ae,2,0)(3,re,1,0),r(),O()}if(n&2){let t=s();a(),z("success",t.successfulTest()),a(),F(t.successfulTest()?2:3)}}function se(n,i){if(n&1){let t=S();l(0,"p",27),f("click",function(){C(t);let o=s();return g(o.removeDestinationFormGroup(o.destinationCount()-1))}),E(1,8),u(2,"span",28),O(),r()}}function pe(n,i){if(n&1){let t=S();l(0,"div",34),f("click",function(){let o=C(t).$implicit,p=s(2);return g(p.addDestinationFormGroup(o.key))}),l(1,"h3"),_(2),r(),l(3,"p"),_(4),r()()}if(n&2){let t=i.$implicit;a(2),j(t.displayName),a(2),j(t.description)}}function _e(n,i){if(n&1){let t=S();l(0,"button",35,1),f("click",function(){let o=C(t).$implicit,p=s(2);return g(p.addDestinationFormGroup(o.key))}),_(2),r()}if(n&2){let t=i.$implicit;a(2),D(" ",t.displayName," ")}}function ce(n,i){if(n&1&&(l(0,"div",29),y(1,pe,5,2,"div",30,I),r(),l(3,"spk-menu",31)(4,"button",32),M(5,9),r(),$(6,20),y(7,_e,3,1,"button",33,I),w(),r()),n&2){let t=s();a(),h(t.destinationTypeOptionsFocused()),a(2),c("searchable",!0),a(4),h(t.destinationTypeOptionsNotFocused())}}function me(n,i){n&1&&b(0)}function Fe(n,i){if(n&1&&m(0,me,1,0,"ng-container",40),n&2){let t,e=i.$implicit,o=i.$index;s();let p=A(29),T=s();c("ngTemplateOutlet",p)("ngTemplateOutletContext",G(7,W,B(2,te,o,e,(t=T.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,T.destinationFormPair().oauthField)))}}function ue(n,i){n&1&&b(0)}function de(n,i){if(n&1&&m(0,ue,1,0,"ng-container",40),n&2){let t,e=i.$implicit,o=i.$index;s();let p=A(29),T=s();c("ngTemplateOutlet",p)("ngTemplateOutletContext",G(7,W,B(2,ee,o,e,(t=T.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,T.destinationFormPair().oauthField)))}}function Te(n,i){if(n&1){let t=S();E(0,10,1),l(1,"button",35,1),f("click",function(){let o=C(t).$implicit,p=s(2);return g(p.addAdvancedFormPair(o,0))}),r(),O()}if(n&2){let t=i.$implicit;a(),X(t.name),q(0)}}function Ce(n,i){n&1&&b(0)}function ge(n,i){if(n&1&&m(0,Ce,1,0,"ng-container",40),n&2){let t,e=i.$implicit,o=i.$index;s();let p=A(29),T=s();c("ngTemplateOutlet",p)("ngTemplateOutletContext",G(7,W,B(2,ne,o,e,(t=T.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,T.destinationFormPair().oauthField)))}}function fe(n,i){if(n&1){let t=S();E(0,11,1),l(1,"button",35,1),f("click",function(){let o=C(t).$implicit,p=s(2);return g(p.addHttpOption(o,0))}),r(),O()}if(n&2){let t=i.$implicit;a(),X(t.name),q(0)}}function De(n,i){n&1&&b(0)}function Se(n,i){if(n&1&&m(0,De,1,0,"ng-container",40),n&2){let t,e=i.$implicit,o=i.$index;s();let p=A(29),T=s();c("ngTemplateOutlet",p)("ngTemplateOutletContext",G(7,W,B(2,ie,o,e,(t=T.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,T.destinationFormPair().oauthField)))}}function Ee(n,i){if(n&1&&(l(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=s(2).$implicit;c("message",t.formView.longDescription)}}function Oe(n,i){if(n&1&&(l(0,"app-file-tree",43)(1,"label",47),_(2),m(3,Ee,3,1,"spk-tooltip",48),r(),u(4,"input",49),r()),n&2){let t,e=s().$implicit,o=s(2);c("startingPath",o.getFormFieldValue(0,e.formGroupName,e.formView.name))("accepts",e.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),a(),d("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),a(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),a(),F(e.formView.longDescription?3:-1),a(),d("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),k("formControlName",e.formView.name)}}function xe(n,i){if(n&1&&(l(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=s(2).$implicit;c("message",t.formView.longDescription)}}function ke(n,i){if(n&1&&(l(0,"app-file-tree",44)(1,"label",47),_(2),m(3,xe,3,1,"spk-tooltip",48),r(),u(4,"input",49),r()),n&2){let t,e=s().$implicit,o=s(2);c("hideShortcuts",!0)("startingPath",o.getFormFieldValue(0,e.formGroupName,e.formView.name)),a(),d("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),a(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),a(),F(e.formView.longDescription?3:-1),a(),d("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),k("formControlName",e.formView.name)}}function Re(n,i){if(n&1&&(l(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=s(2).$implicit;c("message",t.formView.longDescription)}}function Ne(n,i){n&1&&(l(0,"spk-icon",51),_(1,"link"),r())}function Ie(n,i){n&1&&(l(0,"spk-icon",51),_(1,"envelope"),r())}function ye(n,i){n&1&&(l(0,"spk-icon",51),_(1,"textbox"),r())}function he(n,i){if(n&1&&(l(0,"spk-form-field")(1,"label",47),_(2),m(3,Re,3,1,"spk-tooltip",48),r(),u(4,"input",50),m(5,Ne,2,0,"spk-icon",51)(6,Ie,2,0,"spk-icon",51)(7,ye,2,0,"spk-icon",51),r()),n&2){let t,e=s().$implicit;a(),d("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),a(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),a(),F(e.formView.longDescription?3:-1),a(),d("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),k("formControlName",e.formView.name),c("type",e.formView.type==="Email"?"email":"text"),a(),F(e.formView.type==="Path"?5:e.formView.type==="Email"?6:7)}}function $e(n,i){if(n&1){let t=S();l(0,"span",55),f("click",function(){C(t);let o=s(2).$implicit,p=s(2);return g(p.oauthStartTokenCreation(o.destinationType))}),_(1,"AuthID"),r()}}function we(n,i){n&1&&(l(0,"spk-icon",51),_(1,"password"),r())}function Ae(n,i){if(n&1){let t=S();l(0,"spk-icon",56),f("click",function(){C(t);let o=s(2).$implicit;return g(o.formView.showPassword=!o.formView.showPassword)}),_(1," eye "),r()}}function ve(n,i){if(n&1){let t=S();l(0,"spk-icon",56),f("click",function(){C(t);let o=s(2).$implicit;return g(o.formView.showPassword=!o.formView.showPassword)}),_(1," eye-slash "),r()}}function Pe(n,i){if(n&1&&(l(0,"spk-form-field")(1,"label",47),_(2),r(),u(3,"input",52),m(4,$e,2,0,"span",53)(5,we,2,0,"spk-icon",51)(6,Ae,2,0,"spk-icon",54)(7,ve,2,0,"spk-icon",54),r()),n&2){let t,e=s().$implicit;a(),d("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),a(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),a(),d("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),k("formControlName",e.formView.name),c("type",e.formView.showPassword?"text":"password"),a(),F(e.oauthField===e.formView.name?4:5),a(2),F(e.formView.showPassword?6:7)}}function Ve(n,i){if(n&1&&(l(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=s(3).$implicit;c("message",t.formView.longDescription)}}function be(n,i){if(n&1&&_(0),n&2){let t=i.$implicit;D(" ",t," ")}}function Me(n,i){if(n&1&&(l(0,"spk-select",57)(1,"label",47),_(2),m(3,Ve,3,1,"spk-tooltip",48),r(),u(4,"input",49),r(),m(5,be,1,1,"ng-template",null,3,L)),n&2){let t,e=A(6);s();let o=Y(0),p=s().$implicit;c("options",o)("isClearable",!1)("optionTemplate",e),a(),d("for","destination-",p.formGroupName,"-",p.index,"-",p.asHttpOptions?"http":"other",""),a(),D(" ",(t=p.formView.shortDescription)!==null&&t!==void 0?t:p.formView.name," "),a(),F(p.formView.longDescription?3:-1),a(),d("id","destination-",p.formGroupName,"-",p.index,"-",p.asHttpOptions?"http":"other",""),k("formControlName",p.formView.name)}}function Ge(n,i){if(n&1&&(Q(0),m(1,Me,7,14)),n&2){let t=s().$implicit,e=J(t.formView.loadOptions?t.formView.loadOptions(s(2).injector)():t.formView.options);a(),F(e?1:-1)}}function Be(n,i){if(n&1&&(l(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=s(3).$implicit;c("message",t.formView.longDescription)}}function Le(n,i){if(n&1&&_(0),n&2){let t=i.$implicit;pt(" ",t.key," ",t.value?"("+t.value+")":""," ")}}function Ue(n,i){if(n&1&&(l(0,"spk-select",59)(1,"label",47),_(2),m(3,Be,3,1,"spk-tooltip",48),r(),u(4,"input",49),r(),m(5,Le,1,2,"ng-template",null,4,L)),n&2){let t,e=A(6);s();let o=Y(0),p=s().$implicit;c("options",o)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",e),a(),d("for","destination-",p.formGroupName,"-",p.index,"-",p.asHttpOptions?"http":"other",""),a(),D(" ",(t=p.formView.shortDescription)!==null&&t!==void 0?t:p.formView.name," "),a(),F(p.formView.longDescription?3:-1),a(),d("id","destination-",p.formGroupName,"-",p.index,"-",p.asHttpOptions?"http":"other",""),k("formControlName",p.formView.name)}}function He(n,i){n&1&&u(0,"spk-progress-bar",58)}function Ke(n,i){if(n&1&&(Q(0),m(1,Ue,7,15)(2,He,1,0,"spk-progress-bar",58)),n&2){let t=s().$implicit,e=J(t.formView.loadOptions?t.formView.loadOptions(s(2).injector)():t.formView.options);a(),F(e?1:2)}}function We(n,i){if(n&1&&(l(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=s(2).$implicit;c("message",t.formView.longDescription)}}function ze(n,i){if(n&1&&(l(0,"app-size",45)(1,"label",47),_(2),m(3,We,3,1,"spk-tooltip",48),r()()),n&2){let t,e=s().$implicit;c("inputType",e.Name)("formControlName",e.formView.name)("customId",`destination-{{ item.formGroupName }}-{{ item.index }}-{{
2
+ item.asHttpOptions ? 'http' : 'other'
3
+ }}`),a(),d("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),a(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),a(),F(e.formView.longDescription?3:-1)}}function Xe(n,i){if(n&1&&(l(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=s(2).$implicit;c("message",t.formView.longDescription)}}function qe(n,i){if(n&1&&(l(0,"spk-form-field")(1,"label",47),_(2),m(3,Xe,3,1,"spk-tooltip",48),r(),u(4,"input",60),l(5,"spk-icon",51),_(6,"numpad"),r()()),n&2){let t,e=s().$implicit;a(),d("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),a(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),a(),F(e.formView.longDescription?3:-1),a(),d("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),k("formControlName",e.formView.name)}}function je(n,i){if(n&1&&(l(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=s(2).$implicit;c("message",t.formView.longDescription)}}function Qe(n,i){if(n&1&&(l(0,"spk-toggle",46)(1,"label",47),_(2),m(3,je,3,1,"spk-tooltip",48),r(),u(4,"input",61),r()),n&2){let t,e=s().$implicit;a(),d("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),a(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),a(),F(e.formView.longDescription?3:-1),a(),d("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),k("formControlName",e.formView.name)}}function Je(n,i){if(n&1&&(l(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=s(2).$implicit;c("message",t.formView.longDescription)}}function Ye(n,i){if(n&1&&_(0),n&2){let t=i.$implicit;D(" ",t," ")}}function Ze(n,i){if(n&1&&(l(0,"spk-select",62)(1,"label",47),_(2),m(3,Je,3,1,"spk-tooltip",48),r(),u(4,"input",63),r(),m(5,Ye,1,1,"ng-template",null,4,L)),n&2){let t,e=A(6),o=s().$implicit;c("options",o.formView.options)("selectMultiple",!0)("optionTemplate",e),a(),rt("for","destination-",o.formGroupName,"-",o.index,""),a(),D(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),a(),F(o.formView.longDescription?3:-1),a(),k("formControlName",o.formView.name)}}function tn(n,i){if(n&1&&(l(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=s(2).$implicit;c("message",t.formView.longDescription)}}function en(n,i){if(n&1&&(l(0,"app-timespan",45)(1,"label",47),_(2),m(3,tn,3,1,"spk-tooltip",48),r()()),n&2){let t,e=s().$implicit;c("inputType",e.formView.name)("formControlName",e.formView.name)("customId","destination-"+e.formGroupName+"-"+e.index+"-"+(e.asHttpOptions?"http":"other")),a(),d("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),a(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),a(),F(e.formView.longDescription?3:-1)}}function nn(n,i){if(n&1){let t=S();l(0,"button",64),f("click",function(){C(t);let o=s().$implicit,p=s(2);return g(p.removeFormView(o.formView,0))}),l(1,"spk-icon"),_(2,"x-circle"),r()()}}function on(n,i){if(n&1&&(l(0,"div",41),$(1,42),m(2,Oe,5,17,"app-file-tree",43)(3,ke,5,13,"app-file-tree",44)(4,he,8,13,"spk-form-field")(5,Pe,8,13,"spk-form-field")(6,Ge,2,2)(7,Ke,3,2)(8,ze,4,9,"app-size",45)(9,qe,7,11,"spk-form-field")(10,Qe,5,11,"spk-toggle",46)(11,Ze,7,9)(12,en,4,9,"app-timespan",45),w(),m(13,nn,3,0,"button",32),r()),n&2){let t=i.$implicit;z("single-field",t.formGroupName!=="advanced"),a(),c("formGroupName",t.formGroupName),a(),F(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),a(11),F(t.formGroupName==="advanced"?13:-1)}}function an(n,i){if(n&1&&($(0,22)(1,36),y(2,Fe,1,9,"ng-container",null,I),y(4,de,1,9,"ng-container",null,I),l(6,"app-toggle-card",37),$(7,38),E(8,10),l(9,"spk-menu",31)(10,"button",39),u(11,"spk-icon"),r(),$(12,20),y(13,Te,3,1,"button",33,I),w(),r(),O(),w(),y(15,ge,1,9,"ng-container",null,I),r(),l(17,"app-toggle-card",37),$(18,38),E(19,11),l(20,"spk-menu",31)(21,"button",39),u(22,"spk-icon"),r(),$(23,20),y(24,fe,3,1,"button",33,I),w(),r(),O(),w(),y(26,Se,1,9,"ng-container",null,I),r(),m(28,on,14,5,"ng-template",null,2,L),w()()),n&2){let t=s();a(2),h(t.destinationFormPair().custom),a(2),h(t.destinationFormPair().dynamic),a(2),c("disallowToggle",!0),a(3),c("searchable",!0),a(),c("disabled",t.notSelectedAdvancedFormPair().length===0),a(3),h(t.notSelectedAdvancedFormPair()),a(2),h(t.selectedAdvancedFormPair()),a(2),c("disallowToggle",!0),a(3),c("searchable",!0),a(),c("disabled",t.notSelectedHttpOptions().length===0),a(3),h(t.notSelectedHttpOptions()),a(2),h(t.selectedHttpOptions())}}function rn(n,i){if(n&1){let t=S();l(0,"spk-dialog",65),mt("isOpenChange",function(o){C(t);let p=s();return ct(p.targetUrlDialogOpen,o)||(p.targetUrlDialogOpen=o),g(o)}),l(1,"header",66)(2,"h2"),M(3,12),r(),l(4,"spk-alert",67),M(5,13),r()(),l(6,"div",68)(7,"spk-form-field"),u(8,"textarea",69),r()(),l(9,"footer",70)(10,"button",24),f("click",function(){C(t);let o=s();return g(o.closeTargetUrlDialog(!1))}),_(11,"Cancel"),r(),l(12,"button",71),f("click",function(){C(t);let o=s();return g(o.closeTargetUrlDialog(!0))}),E(13,14),u(14,"spk-icon"),O(),r()()()}if(n&2){let t=s();_t("isOpen",t.targetUrlDialogOpen),c("options",ut(3,oe)),a(8),c("formControl",t.targetUrlCtrl)}}var K=new Ut,wn=(n={destinations:[]})=>K.group({destinations:K.array(n.destinations)}),An=({key:n,customGroup:i,dynamicGroup:t,advancedGroup:e})=>K.group({destinationType:K.control(n),custom:i,dynamic:t,advanced:e}),tt=class n{#a=N(ft);#r=N(gt);#l=N(Ct);#t=N(Z);#s=N(Ot);#p=N(jt);#e=N(Yt);injector=N(it);formRef=ot.required("formRef");destinationForm=this.#t.destinationForm;destinationFormPair=this.#t.destinationFormPair;selectedAdvancedFormPair=this.#t.selectedAdvancedFormPair;notSelectedAdvancedFormPair=this.#t.notSelectedAdvancedFormPair;selectedHttpOptions=this.#t.selectedHttpOptions;notSelectedHttpOptions=this.#t.notSelectedHttpOptions;destinationOptions=this.#t.destinationOptions;destinationFormSignal=this.#t.destinationFormSignal;destinationCount=H(()=>this.destinationFormSignal()?.destinations?.length??0);successfulTest=x(!1);destinationTypeOptionsInFocus=x(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=x(Jt.map(i=>({key:i.customKey??i.key,customKey:i.customKey??null,displayName:i.displayName,description:i.description})));destinationTypeOptionsFocused=H(()=>{let i=this.destinationTypeOptionsInFocus(),t=this.destinationTypeOptions();return i.map(e=>t.find(o=>o.key===e))});destinationTypeOptionsNotFocused=H(()=>{let i=this.destinationTypeOptionsInFocus();return this.destinationTypeOptions().filter(e=>!i.includes(e.key))});targetUrlEffect=dt(()=>{if(this.destinationFormSignal(),this.destinationForm.valid){let i=this.#t.getCurrentTargetUrl();this.#e.updateTargetUrl(i[0])}else this.#e.updateTargetUrl(null)});ngOnInit(){let i=this.#e.destinationTargetUrl();i&&this.#t.updateFieldsFromTargetUrl(i)}getFormFieldValue(i,t,e){return((this.destinationForm.controls.destinations.controls?.[i]).controls?.[t]).controls[e].value}addDestinationFormGroup(i){this.#t.addDestinationFormGroup(i)}addAdvancedFormPair(i,t){this.#t.addAdvancedFormPair(i,t)}removeFormView(i,t){this.#t.removeAdvancedFormPair(i,t)}addHttpOption(i,t){this.#t.addHttpOption(i,t)}targetUrlCtrl=new vt;targetUrlInitial=x(null);targetUrlDialogOpen=x(!1);openTargetUrlDialog(){let t=this.#t.getCurrentTargetUrl()[0];this.targetUrlCtrl.setValue(t),this.targetUrlInitial.set(t),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(i=!1){this.targetUrlDialogOpen.set(!1);let t=this.targetUrlCtrl.value,e=this.targetUrlInitial();!i||t===e||this.#t.updateFieldsFromTargetUrl(this.targetUrlCtrl.value)}testDestination(i=0){let e=this.#t.getCurrentTargetUrl()[i];e&&this.#p.testDestination(e,i,!1).subscribe({next:o=>{if(o.action==="success"){o.anyFilesFound===!1&&this.#s.open(Kt,{data:{title:$localize`Empty destination`,message:$localize`The remote destination does not contain any files.
4
+ Check that the details are correct and that the destination is not empty.`,confirmText:$localize`OK`,cancelText:void 0}}),this.successfulTest.set(!0),setTimeout(()=>{this.successfulTest.set(!1)},3e3);return}if(o.action==="generic-error"){this.successfulTest.set(!1);return}o.action==="trust-cert"&&this.#t.addHttpOptionByName("accept-specified-ssl-hash",o.destinationIndex,o.certData),o.action==="approve-host-key"&&this.#t.addHttpOptionByName("accept-specified-host-key",o.destinationIndex,o.reportedHostKey),o.testAgain&&this.testDestination(o.destinationIndex)}})}mapToTargetUrl(i){return Qt(i.value)}removeDestinationFormGroup(i){this.destinationForm.controls.destinations.removeAt(i)}displayFn(i){let t=this.destinationOptions().find(e=>e.Key===i);return t?`${t.DisplayName}`:""}goBack(){this.#e.exit()}next(){this.#a.navigate(["encryption"],{relativeTo:this.#r.parent})}#n=x("https://duplicati-oauth-handler.appspot.com/").asReadonly();#i=x(Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)).asReadonly();#o=x(!1);#_=x(null);keyCreation(){}oauthStartTokenCreation(i){this.#o.set(!0);let t=450,e=600,o=this.#n()+"?type="+i+"&token="+this.#i(),p=screen.width/2-t/2,T=screen.height/2-e/2,v=window.open(o,"_blank","height="+e+",width="+t+",menubar=0,status=0,titlebar=0,toolbar=0,left="+p+",top="+T);v?.addEventListener("blur",P=>{console.log("event blur",P)}),v?.addEventListener("beforeunload",P=>{console.log("event beforeunload",P),this.#l.get(this.#n()+"fetch?callback=JSON_CALLBACK",{params:{token:this.#i()}}).pipe(nt(()=>this.#o.set(!1))).subscribe({next:V=>{console.log("res",V),V?.authid&&this.#_.set(V.authid)}})})}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=at({type:n,selectors:[["app-restore-destination"]],viewQuery:function(t,e){t&1&&lt(e.formRef,Zt,5),t&2&&st()},features:[Ft([Z])],decls:24,vars:6,consts:()=>{let i;i=$localize` Backup placement ${"\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:`,i=U(i);let t;t=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let e;e=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let o;o=$localize` Want to select another destination? ${"\uFFFD#2\uFFFD"}:START_TAG_SPAN:Click here${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPAN:`;let p;p=$localize`Other destinations`;let T;T=$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:`,T=U(T);let v;v=$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:`,v=U(v);let P;P=$localize`Edit target URL`;let V;V=$localize` Be careful, this will overwrite everything you have in your destination. `;let et;return et=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],["option",""],["fieldTemplate",""],["enumOptionTemplate",""],["optionTemplate",""],i,t,e,o,p,T,v,P,V,et,[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"],[3,"inputType","formControlName","customId"],[1,"primary","raised"],[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"],["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,e){if(t&1){let o=S();l(0,"form",15,0),f("submit",function(){return C(o),g(e.next())}),l(2,"header")(3,"h3",16),E(4,5),l(5,"div",17),m(6,le,4,3,"button",18),l(7,"spk-menu")(8,"button",19),u(9,"spk-icon"),r(),$(10,20),l(11,"button",21),f("click",function(){return C(o),g(e.openTargetUrlDialog())}),u(12,"spk-icon"),r(),w(),r()(),O(),r(),m(13,se,3,0,"p"),r(),m(14,ce,9,1)(15,an,30,6,"ng-container",22),l(16,"div",23)(17,"button",24),f("click",function(){return C(o),g(e.goBack())}),E(18,6),u(19,"spk-icon"),O(),r(),l(20,"button",25),E(21,7),u(22,"spk-icon"),O(),r()()(),m(23,rn,15,4,"spk-dialog",26)}if(t&2){let o;c("formGroup",e.destinationForm),a(6),F(e.destinationCount()>0?6:-1),a(7),F(e.destinationCount()>0?13:-1),a(),F(e.destinationCount()===0?14:-1),a(),F(!((o=e.destinationFormSignal())==null||o.destinations==null)&&o.destinations.length?15:-1),a(8),F(e.targetUrlDialogOpen()?23:-1)}},dependencies:[Ht,Pt,$t,Vt,ht,wt,At,bt,Mt,Lt,Gt,Bt,Tt,xt,kt,Dt,It,yt,Et,St,Nt,Rt,Xt,zt,qt,Wt],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}.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}"],changeDetection:0})};export{wn as createDestinationForm,An as createDestinationFormGroup,tt as default};