@duplicati/ngclient 0.0.233 → 0.0.235
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/sh.woff2 +0 -0
- package/chunk-29_4gGIi.js +2 -0
- package/{chunk-C3gUxHQM.js → chunk-3YzyUT-a.js} +1 -1
- package/chunk-6-sszNfh.js +1 -0
- package/chunk-7T5O8Syb.js +1 -0
- package/{chunk-CS2J-6VZ.js → chunk-B61kkU_h.js} +1 -1
- package/chunk-B891gwjc.js +1 -0
- package/chunk-BDJqKfxm.js +1 -0
- package/chunk-BEUeHgR9.js +1 -0
- package/chunk-BEzhTDp8.js +2 -0
- package/{chunk-DDWDcSq2.js → chunk-BGuvkLC9.js} +1 -1
- package/{chunk-DXEgz1tV.js → chunk-BJOhC2d8.js} +1 -1
- package/chunk-BOKNwzSl.js +2 -0
- package/chunk-BSCc2xDv.js +1 -0
- package/chunk-BWSg9cLt.js +2 -0
- package/chunk-BWvawawS.js +2 -0
- package/chunk-B_I_9Y7k.js +1 -0
- package/chunk-Bgd5lu61.js +1 -0
- package/chunk-BjqgOGb9.js +2 -0
- package/chunk-Bq_vr6Q3.js +2 -0
- package/{chunk-C9OqpwwE.js → chunk-Brfc2m61.js} +1 -1
- package/{chunk-C9ecLR93.js → chunk-Btvi2S15.js} +11 -11
- package/chunk-C0KXp4hd.js +1 -0
- package/chunk-C0XQD9NK.js +1 -0
- package/chunk-C1-31fA7.js +1 -0
- package/chunk-C185qUb-.js +1 -0
- package/{chunk-CyqqlRjO.js → chunk-C1py21yb.js} +2 -2
- package/chunk-C4Uv1C-T.js +1 -0
- package/{chunk-B1c7h-_w.js → chunk-CFgDqLU0.js} +1 -1
- package/{chunk-aCJqF9DH.js → chunk-CGnjVnmu.js} +1 -1
- package/{chunk-DidJB9ig.js → chunk-CKUlUN3q.js} +1 -1
- package/chunk-CLlZiOaO.js +2 -0
- package/chunk-CQVPqpMp.js +2 -0
- package/chunk-CSrYlKTK.js +2 -0
- package/chunk-CdzKkYEw.js +2 -0
- package/chunk-Cj_yOpND.js +1 -0
- package/chunk-ClFp7JLZ.js +1 -0
- package/{chunk-DGvC49aU.js → chunk-Cm7JSdTO.js} +1 -1
- package/{chunk-D1pDZLJ9.js → chunk-CnZx831x.js} +1 -1
- package/chunk-CsVpmA6t.js +1 -0
- package/chunk-Css7wqTG.js +2 -0
- package/chunk-CxbeRJcJ.js +1 -0
- package/chunk-CzoH_Agx.js +1 -0
- package/chunk-CzsiJ0k-.js +1 -0
- package/chunk-D04TnMUn.js +2 -0
- package/{chunk-BstaUtD_.js → chunk-D2P9ER0I.js} +1 -1
- package/{chunk-mA4J4_nC.js → chunk-D38QrkIM.js} +1 -1
- package/chunk-D4g_OF7M.js +1 -0
- package/chunk-D5V6OY_2.js +2 -0
- package/{chunk-FTZ5atHM.js → chunk-D6IQFx6m.js} +1 -1
- package/chunk-D6y9RCQD.js +1 -0
- package/chunk-D7UddV5F.js +1 -0
- package/chunk-D9jPw9Ov.js +1 -0
- package/chunk-DA7rrIf8.js +1 -0
- package/chunk-DB0aGcRM.js +1 -0
- package/{chunk-DhiIZLrA.js → chunk-DBkkb6OR.js} +3 -3
- package/chunk-DE8p9-HP.js +1 -0
- package/chunk-DFLxy15J.js +1 -0
- package/chunk-DHkdQ4u3.js +3 -0
- package/chunk-DKRWta24.js +2 -0
- package/chunk-DSeMtMg3.js +1 -0
- package/chunk-DWCofCiP.js +14 -0
- package/chunk-DXLQftDm.js +1 -0
- package/{chunk-lymL5FDY.js → chunk-DYV1Pbu1.js} +1 -1
- package/chunk-DaXXLSfy.js +2 -0
- package/chunk-Dbq-qyNL.js +3 -0
- package/{chunk-8Y8ReLEn.js → chunk-DkVHfoYw.js} +2 -2
- package/chunk-DmCJ7w-M.js +1 -0
- package/{chunk-MDqH8T3Z.js → chunk-DneBfCBh.js} +2 -2
- package/{chunk-CX3Axjpk.js → chunk-DuRr4rDS.js} +1 -1
- package/chunk-Dv_fBX0w.js +1 -0
- package/chunk-IqMUABbN.js +1 -0
- package/chunk-Kq2ZFJSk.js +1 -0
- package/chunk-NAAMYA7J.js +1 -0
- package/chunk-NiMN4Rl6.js +1 -0
- package/chunk-OQ_HQ9EL.js +1 -0
- package/chunk-W1dL7dqQ.js +4 -0
- package/chunk-_OzpLe0L.js +1 -0
- package/chunk-ayE11Iz-.js +1 -0
- package/chunk-fDWfSg6Y.js +3 -0
- package/chunk-gId840Er.js +1 -0
- package/{chunk-B6c2NXNy.js → chunk-iGzJokt-.js} +1 -1
- package/{chunk-BmmYJhOf.js → chunk-iU19kwHx.js} +1 -1
- package/chunk-m8vMm7S6.js +1 -0
- package/chunk-xD8qjoz4.js +1 -0
- package/chunk-xI8Kkqgy.js +1 -0
- package/{chunk-h6n5A491.js → chunk-zOY5leQB.js} +1 -1
- package/index.html +1 -1
- package/main-2ZYVV4C4.js +21 -0
- package/package.json +1 -1
- package/assets/dest-icons/sia_logo_dark.92db63f5.svg +0 -6
- package/chunk-AuCOjHXM.js +0 -1
- package/chunk-B1wZ4poV.js +0 -1
- package/chunk-B5Y6lgE8.js +0 -1
- package/chunk-BZgAzrl9.js +0 -2
- package/chunk-B_cIFQAl.js +0 -1
- package/chunk-BaSm1lsB.js +0 -2
- package/chunk-Bgw6E0Xu.js +0 -2
- package/chunk-Bj7EyCHb.js +0 -1
- package/chunk-BrtdRb9j.js +0 -1
- package/chunk-BsNCg00z.js +0 -2
- package/chunk-BxpXVeOr.js +0 -1
- package/chunk-ByL8ndec.js +0 -1
- package/chunk-BzJX1fKw.js +0 -1
- package/chunk-C7AeY2HY.js +0 -2
- package/chunk-C7gG_Yh_.js +0 -2
- package/chunk-CGsQCBkP.js +0 -1
- package/chunk-CIe9Bupz.js +0 -1
- package/chunk-CIw_h8oP.js +0 -1
- package/chunk-CP6xnjgo.js +0 -3
- package/chunk-CWgXi-7W.js +0 -1
- package/chunk-Ca1aaA1h.js +0 -1
- package/chunk-CfxBiw7I.js +0 -1
- package/chunk-CgJAbgNN.js +0 -1
- package/chunk-ChUm8bnG.js +0 -1
- package/chunk-CkRbgemk.js +0 -2
- package/chunk-ClRItSzt.js +0 -1
- package/chunk-CsIAXoYP.js +0 -1
- package/chunk-CuJ_uEdr.js +0 -1
- package/chunk-CvSsZZty.js +0 -1
- package/chunk-D2G7_0hG.js +0 -2
- package/chunk-D3PhthfU.js +0 -2
- package/chunk-D55uWC7G.js +0 -1
- package/chunk-DD_wKpGc.js +0 -1
- package/chunk-DGxk44Me.js +0 -2
- package/chunk-DM11Gu0H.js +0 -1
- package/chunk-DV8bRznt.js +0 -2
- package/chunk-DWiO0A6h.js +0 -2
- package/chunk-DbbyVAGl.js +0 -1
- package/chunk-DcdpG1YG.js +0 -3
- package/chunk-Dk-Wgx3e.js +0 -1
- package/chunk-DuYKanVS.js +0 -1
- package/chunk-DwmssGG9.js +0 -2
- package/chunk-DxFBzFom.js +0 -1
- package/chunk-Dz5guW4b.js +0 -3
- package/chunk-I5dxaHZ4.js +0 -2
- package/chunk-K2iai6rC.js +0 -1
- package/chunk-L8hQtTzU.js +0 -1
- package/chunk-Y-xXBGKy.js +0 -1
- package/chunk-Z81HNfgo.js +0 -1
- package/chunk-aYCYzU5Q.js +0 -1
- package/chunk-bt6lhYfG.js +0 -1
- package/chunk-eiyaQxBt.js +0 -1
- package/chunk-jy8x4GhV.js +0 -1
- package/chunk-ksSA-rDF.js +0 -1
- package/chunk-mflQLMHH.js +0 -2
- package/chunk-nuwlP4Wz.js +0 -14
- package/chunk-uGh0bVbu.js +0 -4
- package/main-3NL5M6JB.js +0 -16
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {w}from'./chunk-DKRWta24.js';import'./chunk-CSrYlKTK.js';import'./chunk-iU19kwHx.js';import {u as un,_ as _n,C as Ct,a as mn,K as Ke}from'./chunk-DWCofCiP.js';import'./chunk-6-sszNfh.js';import'./chunk-Kq2ZFJSk.js';import'./chunk-zOY5leQB.js';import'./chunk-29_4gGIi.js';import'./chunk-BEUeHgR9.js';import'./chunk-CGnjVnmu.js';import'./chunk-BJOhC2d8.js';import {G,A}from'./chunk-fDWfSg6Y.js';import {v as ve$1}from'./chunk-DuRr4rDS.js';import'./chunk-C1py21yb.js';import'./chunk-D38QrkIM.js';import'./chunk-3YzyUT-a.js';import'./chunk-CKUlUN3q.js';import {T,e as ee,ax as W,a6 as be,by as ve,B as w1,G as Ge,N as Nt,au as h,g as gw,v,a as N,a0 as de,u as ue,i as ET,al as dm,Z as Zi,w as Hg,o as oC,W as Wl,l as lT,n as lm,P as Pd,p as qC,L as Ld,F as Fg,d as Ig,j as jg,am as GC,b as bE,c as uT,y as cm,z as vg,s as sC,aF as JC,O as qg,R as hC,h as aC,H as HC,aR as zl,aS as Ql,ap as zC,t as bD,a3 as XC,M as MD}from'./main-2ZYVV4C4.js';import'./chunk-CFgDqLU0.js';import'./chunk-BGuvkLC9.js';import {F as Fe}from'./chunk-DBkkb6OR.js';import {B as Bn,T as Tn,Z as Ze,R as Rn,P as Pn,J as Jt,a as Zt}from'./chunk-iGzJokt-.js';import'./chunk-DneBfCBh.js';import'./chunk-Bq_vr6Q3.js';import'./chunk-D9jPw9Ov.js';import'./chunk-CnZx831x.js';import'./chunk-Cm7JSdTO.js';var Oe=["formRef"],Re=["testUrl"],Ne=()=>({maxWidth:"700px",width:"100%"});function De(o,i){if(o&1){let e=ET();Zi(0,"button",24),Hg("click",function(){Pd(e);let t=aC();return Ld(t.openTargetUrlDialog())}),Fg(1,5),Ig(2,"sh-icon"),jg(),Wl();}}function Ie(o,i){if(o&1){let e=ET();Zi(0,"button",24),Hg("click",function(){Pd(e);let t=aC(2);return Ld(t.copyTargetUrl())}),Fg(1,7),Ig(2,"sh-icon"),jg(),Wl();}}function fe(o,i){if(o&1){let e=ET();Zi(0,"sh-menu")(1,"button",15)(2,"sh-icon"),HC(3,"dots-three-vertical"),Wl()(),zl(4,25),Zi(5,"button",24),Hg("click",function(){Pd(e);let t=aC();return Ld(t.openTargetUrlDialog())}),Fg(6,6),Ig(7,"sh-icon"),jg(),Wl(),lT(8,Ie,3,0,"button",15),Ql(),Wl();}if(o&2){aC();let e=zC(0);bE(8),uT(e?8:-1);}}function he(o,i){if(o&1){let e=ET();Zi(0,"app-destination-list-item",17)(1,"button",20),Hg("click",function(){Pd(e);let t=aC();return Ld(t.removeDestination())}),oC(2,8),Wl()();}if(o&2){aC();let e=zC(12);vg("destination",e);}}function ye(o,i){if(o&1){let e=ET();Zi(0,"app-destination-list",26),Hg("setDestination",function(t){Pd(e);let s=aC();return Ld(s.setDestination(t))}),Wl();}}function Me(o,i){if(o&1){let e=ET();Zi(0,"app-single-destination",27),lm("targetUrlChange",function(t){Pd(e);let s=aC();return qC(s.targetUrlModel,t)||(s.targetUrlModel=t),Ld(t)}),Wl();}if(o&2){let e=aC();cm("targetUrl",e.targetUrlModel);}}function Pe(o,i){o&1&&(Fg(0,4,1),Ig(1,"sh-icon",22),jg());}function Ae(o,i){o&1&&(Fg(0,4,2),Ig(1,"sh-icon"),jg());}function Le(o,i){if(o&1){let e=ET();Zi(0,"sh-dialog",28),lm("isOpenChange",function(t){Pd(e);let s=aC();return qC(s.targetUrlDialogOpen,t)||(s.targetUrlDialogOpen=t),Ld(t)}),Zi(1,"header",29)(2,"div",30)(3,"h2"),oC(4,9),Wl(),Zi(5,"sh-alert",31),oC(6,10),Wl()()(),Zi(7,"div",32)(8,"sh-form-field")(9,"textarea",33),lm("ngModelChange",function(t){Pd(e);let s=aC();return qC(s.targetUrlCtrl,t)||(s.targetUrlCtrl=t),Ld(t)}),Wl(),bD(),Wl()(),Zi(10,"footer",34)(11,"button",20),Hg("click",function(){Pd(e);let t=aC();return Ld(t.closeTargetUrlDialog(false))}),HC(12,"Cancel"),Wl(),Zi(13,"button",35),Hg("click",function(){Pd(e);let t=aC();return Ld(t.closeTargetUrlDialog(true))}),Fg(14,11),Ig(15,"sh-icon"),jg(),Wl()()();}if(o&2){let e=aC();cm("isOpen",e.targetUrlDialogOpen),vg("options",XC(3,Ne)),bE(9),cm("ngModel",e.targetUrlCtrl),MD();}}var x=class o{#i=T(ee);#o=T(W);#n=T(be);injector=T(ve);#e=T(w);formRef=w1.required("formRef");testUrlComponent=w1.required("testUrl");testSignal=this.#e.destinationTestSignal;targetUrlModel=this.#e.destinationTargetUrl;targetUrlCtrl=Ge(null);targetUrlInitial=Ge(null);targetUrlDialogOpen=Ge(false);toggleNewDestination=Ge(true);selectedDestinationType=Nt(()=>{let i=this.#e.destinationTargetUrl();return i?G(i):null});selectedDestinationTypeOption=Nt(()=>{let i=this.selectedDestinationType();return i?{key:i.customKey??i.key,customKey:i.customKey??null,displayName:i.displayName,description:i.description,sourceDescription:i.sourceDescription??null,icon:i.icon}:null});copyTargetUrl(){navigator.clipboard.writeText(this.#e.destinationTargetUrl()??"");}openTargetUrlDialog(){let i=this.#e.destinationTargetUrl();this.targetUrlCtrl.set(i),this.targetUrlInitial.set(i),this.targetUrlDialogOpen.set(true);}closeTargetUrlDialog(i=false){this.targetUrlDialogOpen.set(false);let e=this.targetUrlCtrl(),n=this.targetUrlInitial();!i||e===n||!e||this.#e.updateTargetUrl(e);}setDestination(i){let e=A(i??"");if(e){if(e.mapper.default){let n=e.mapper.default("");this.#e.updateTargetUrl(n);return}this.#e.updateTargetUrl(`${i}://`);}}removeDestination(){this.#e.updateTargetUrl(null);}goBack(){this.#i.navigate(["general"],{relativeTo:this.#o.parent});}next(){let i=this.testSignal();if(i===null){this.#n.open(h,{data:{title:$localize`Test destination`,message:$localize`You have not tested the destination yet. Do you want to test it now?`,confirmText:$localize`Test now`,cancelText:$localize`Skip test and continue`},closed:n=>{n?this.testUrlComponent()?.testDestination(false)?.then(t=>{t.action==="success"&&t.containsBackup?this.#t():this.#n.open(h,{data:{title:$localize`Test did not succeed`,message:t.errorMessage??$localize`Failed to test the destination.`,confirmText:$localize`OK`,cancelText:void 0}});}):this.#t();}});return}let e=typeof i=="string"?null:i;if(e?.action!=="success"||!e.containsBackup){this.#n.open(h,{data:{title:$localize`Test destination`,message:$localize`The destination has not been tested successfully. Are you sure you want to continue?`,confirmText:$localize`Edit destination`,cancelText:$localize`Yes, continue`},closed:n=>{n||this.#t();}});return}this.#t();}#t(){this.#i.navigate(["encryption"],{relativeTo:this.#o.parent});}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=gw({type:o,selectors:[["app-restore-destination"]],viewQuery:function(e,n){e&1&&qg(n.formRef,Oe,5)(n.testUrlComponent,Re,5),e&2&&hC(2);},features:[JC([Ke])],decls:25,vars:18,consts:()=>{let i;i=$localize`Backup destination`;let e;e=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let n;n=$localize`${"\uFFFD*22:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:spinner${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*22:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*23:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:arrow-right${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*23:2\uFFFD"}:CLOSE_BLOCK_ELSE: Continue `,n=sC(n);let t;t=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Set target URL `;let s;s=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Edit target URL `;let g;g=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:copy${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard `;let U;U=$localize`Change`;let b;b=$localize`Edit target URL`;let G;G=$localize`Be careful, this will overwrite everything you have in your destination.`;let k;return k=$localize` Override target URL ${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],["testUrl",""],i,e,n,t,s,g,U,b,G,k,[3,"submit"],[1,"title-30"],[1,"actions"],["shButton","","type","button",1,"small"],[3,"targetUrlChange","testSignalChange","targetUrl","testSignal","backupId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","readOnlyTest","moduleType"],[1,"current-destination",3,"destination"],[3,"targetUrl"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[1,"loader"],[3,"isOpen","options"],["shButton","","type","button",1,"small",3,"click"],["menu",""],[3,"setDestination"],[3,"targetUrlChange","targetUrl"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"target-dialog-header"],[1,"warn"],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(e,n){if(e&1){let t=ET();dm(0),Zi(1,"form",12,0),Hg("submit",function(){return n.next()}),Zi(3,"header")(4,"h3",13)(5,"span"),oC(6,2),Wl(),Zi(7,"div",14),lT(8,De,3,0,"button",15)(9,fe,9,1,"sh-menu"),Wl()(),Zi(10,"app-test-url",16,1),lm("targetUrlChange",function(g){return Pd(t),qC(n.targetUrlModel,g)||(n.targetUrlModel=g),Ld(g)})("testSignalChange",function(g){return Pd(t),qC(n.testSignal,g)||(n.testSignal=g),Ld(g)}),Wl(),dm(12),lT(13,he,3,1,"app-destination-list-item",17),Wl(),lT(14,ye,1,0,"app-destination-list"),lT(15,Me,1,1,"app-single-destination",18),Zi(16,"div",19)(17,"button",20),Hg("click",function(){return n.goBack()}),Fg(18,3),Ig(19,"sh-icon"),jg(),Wl(),Zi(20,"button",21),Fg(21,4),lT(22,Pe,2,0,"sh-icon",22)(23,Ae,2,0,"sh-icon"),jg(),Wl()()(),lT(24,Le,16,4,"sh-dialog",23);}if(e&2){let t=GC(!!n.targetUrlModel());bE(8),uT(t?9:8),bE(2),cm("targetUrl",n.targetUrlModel)("testSignal",n.testSignal),vg("backupId",null)("sourcePrefix",null)("suppressErrorDialogs",false)("askToCreate",false)("testExpectation","containsBackup")("readOnlyTest",true)("moduleType","Backend"),bE(2);let s=GC(n.selectedDestinationTypeOption());bE(),uT(s?13:-1),bE(),uT(t?-1:14),bE(),uT(t?15:-1),bE(5),vg("disabled",n.testSignal()=="testing"||!t),bE(2),uT(n.testSignal()=="testing"?22:23),bE(2),uT(n.targetUrlDialogOpen()?24:-1);}},dependencies:[un,_n,Ct,Bn,Tn,Ze,Rn,Pn,Jt,Zt,v,Fe,ve$1,N,de,ue,mn],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40rem}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] sh-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}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-8)}.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-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);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-8)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}.target-dialog-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:.5rem}"]})};
|
|
2
|
+
export{x as default};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import {n as ne,x}from'./chunk-BjqgOGb9.js';import {m}from'./chunk-C185qUb-.js';import {c}from'./chunk-BJOhC2d8.js';import {c as c$1}from'./chunk-3YzyUT-a.js';import {T,a5 as m$1,I,a6 as be,a7 as D,D as D$1,f,e as ee,N as Nt$1,Q as Qa,g as gw,$ as lr,_ as _t$1,a8 as To,a as N,v as v$1,Z as Zi,n as lm,d as Ig,w as Hg,l as lT,W as Wl,F as Fg,j as jg,H as HC,x as xC,y as cm,z as vg,b as bE,c as uT,a3 as XC,a9 as QC,aa as Yl,s as sC,p as qC,ab as J$1,ac as I1,G as Ge,ad as sy,C as Zu,u as ue,o as oC,t as bD,M as MD,K as Kg,ae as Mr,af as eo,E as E1,ag as D1,B as w1,S as lC,U as ql,Y as uC,X as Gl,ah as Yg,O as qg,R as hC,ai as fe,aj as m$2,ak as l,al as dm,am as GC,i as ET,P as Pd,h as aC,L as Ld,q as qe,an as ai,V as Eg,ao as Bg,ap as zC,a1 as pT,aq as dT,a2 as hT,J as im}from'./main-2ZYVV4C4.js';import'./chunk-BGuvkLC9.js';import {w}from'./chunk-B61kkU_h.js';import {F as Fe}from'./chunk-DBkkb6OR.js';import {B as Bn,Z as Ze,R as Rn,J as Jt,j as jn,m as me,G as Gn}from'./chunk-iGzJokt-.js';import {a as at$1}from'./chunk-DneBfCBh.js';import {v}from'./chunk-Bq_vr6Q3.js';import {R}from'./chunk-D9jPw9Ov.js';import'./chunk-Cm7JSdTO.js';var it=["dragImageElement"],ot=[[["","sidenav",""]],[["","sidenav-closed-topbar",""]],"*"],at=["[sidenav]","[sidenav-closed-topbar]","*"];function st(o,i){o&1&&Eg(0,"div",1,0);}function rt(o,i){if(o&1){let e=ET();ql(0,"div",7),Bg("drop",function(n){Pd(e);let r=aC();return Ld(r.drop(n))})("dragenter",function(){Pd(e);let n=aC();return Ld(n.dragEnter())})("dragleave",function(){Pd(e);let n=aC();return Ld(n.dragLeave())}),Gl();}}function lt(o,i){if(o&1){let e=ET();ql(0,"div",8),Bg("dragstart",function(n){Pd(e);let r=aC();return Ld(r.dragStart(n))})("dragend",function(n){Pd(e);let r=aC();return Ld(r.dragEnd(n))})("drag",function(n){Pd(e);let r=aC();return Ld(r.drag(n))})("touchstart",function(n){Pd(e);let r=aC();return Ld(r.touchStart(n))})("touchmove",function(n){Pd(e);let r=aC();return Ld(r.touchMove(n))})("touchend",function(n){Pd(e);let r=aC();return Ld(r.touchEnd(n))})("touchcancel",function(n){Pd(e);let r=aC();return Ld(r.touchCancel(n))}),Gl();}}function _t(o){let i=T(eo),e=T(qe),t=Ge(false),n=typeof MutationObserver<"u"?new MutationObserver(r=>{r.forEach(N=>{N.type==="attributes"&&N.attributeName==="class"&&t.set(i.nativeElement.classList.contains(o));});}):void 0;return ai(i.nativeElement,()=>{n&&n.observe(i.nativeElement,{attributes:!0}),t.set(i.nativeElement.classList.contains(o));}),e.onDestroy(()=>{n&&n.disconnect();}),t}var et=(()=>{class o{constructor(){this.#e=T(Mr),this.#i=T(eo),this.openWidth=280,this.openWidthTreshold=this.openWidth*.5,this.disableDrag=E1(false),this.isOpen=D1(false),this.isOverlay=_t("overlay"),this.#n=this.#i.nativeElement.parentElement,this.#t=this.#n.getBoundingClientRect&&this.#n.getBoundingClientRect(),this.dragImageElement=w1.required("dragImageElement"),this.dragIsEnding=Ge(false),this.dragIsOnScreen=Ge(true),this.isDragging=Ge(false),this.dragPositionX=Ge(0),this.dragActualPositionX=Nt$1(()=>{let e=this.dragPositionX(),t=280,n=100,N=t/2,A=N-n/2,O=N+n/2;if(e>O){let D=e-O,f=(t-O)*(1-Math.exp(-8e-3*D));return O+f}else if(e<A){let D=A-e,f=A*(1-Math.exp(-8e-3*D));return A-f}return e}),this.draggingStyle=Nt$1(()=>!this.isOverlay()||this.disableDrag()?null:this.isDragging()?`translateX(${this.dragActualPositionX()}px)`:this.isOpen()?`translateX(${this.openWidth}px)`:"translateX(0px)"),this.draggingEffect=Qa(()=>{this.disableDrag()||(this.isDragging()?this.#e.body.classList.add("dragging"):this.#e.body.classList.remove("dragging"));}),this.scrollLockEffect=Qa(e=>{let t=this.isOverlay(),n=this.isOpen();t&&n&&(this.#e.body.classList.add("sh-sidenav-open"),this.#e.documentElement.classList.add("sh-sidenav-open")),e(()=>{this.#e.body.classList.remove("sh-sidenav-open"),this.#e.documentElement.classList.remove("sh-sidenav-open");});});}#e;#i;#n;#t;drop(e){e.stopPropagation(),this.#o(e.clientX-this.#t.left);}#o(e){this.isDragging.set(false),e>=this.openWidthTreshold?this.isOpen.set(true):this.isOpen.set(false);}dragEnd(e){e.clientX-this.#t.left<0&&this.#o(0),e.clientX-this.#t.left>this.openWidthTreshold&&this.#o(this.openWidthTreshold);}dragEnter(){this.dragIsOnScreen.set(true);}dragLeave(){this.dragIsOnScreen.set(false);}dragStart(e){e.stopPropagation(),this.#t=this.#n.getBoundingClientRect(),this.isDragging.set(true);}drag(e){e.stopPropagation(),this.isDragging()&&(e.clientX!==0||e.clientY!==0)&&this.dragPositionX.set(e.clientX-this.#t.left);}touchStart(e){e.stopPropagation(),this.isDragging.set(true),this.#t=this.#n.getBoundingClientRect(),this.dragPositionX.set(0);}touchMove(e){e.stopPropagation(),this.isDragging()&&this.dragPositionX.set(e.touches[0].clientX-this.#t.left);}touchEnd(e){e.stopPropagation(),this.#o(e.changedTouches[0].clientX-this.#t.left);}touchCancel(e){e.stopPropagation(),this.isDragging.set(false);}static{this.\u0275fac=function(t){return new(t||o)};}static{this.\u0275cmp=gw({type:o,selectors:[["sh-sidenav"]],viewQuery:function(t,n){t&1&&qg(n.dragImageElement,it,5),t&2&&hC();},hostVars:6,hostBindings:function(t,n){t&2&&Kg("open",n.isOpen())("closed",!n.isOpen())("is-dragging",n.isDragging());},inputs:{disableDrag:[1,"disableDrag"],isOpen:[1,"isOpen"]},outputs:{isOpen:"isOpenChange"},ngContentSelectors:at,decls:10,vars:5,consts:[["dragImageElement",""],[1,"drag-image"],[1,"dropping-surface"],["role","navigation",1,"sidenav"],[1,"main-wrap"],["draggable","true",1,"dragable"],[1,"closed-topbar"],[1,"dropping-surface",3,"drop","dragenter","dragleave"],["draggable","true",1,"dragable",3,"dragstart","dragend","drag","touchstart","touchmove","touchend","touchcancel"]],template:function(t,n){t&1&&(lC(ot),lT(0,st,2,0,"div",1),lT(1,rt,1,0,"div",2),ql(2,"div",3),uC(3),Gl(),ql(4,"div",4),lT(5,lt,1,0,"div",5),ql(6,"div",6),uC(7,1),Gl(),ql(8,"main"),uC(9,2),Gl()()),t&2&&(uT(n.isOverlay()&&!n.disableDrag()?0:-1),bE(),uT(n.isOverlay()&&n.isDragging()?1:-1),bE(3),Yg("transform",!n.disableDrag()&&n.draggingStyle()),bE(),uT(n.isOverlay()&&!n.disableDrag()?5:-1));},styles:[`html.sh-sidenav-open,body.sh-sidenav-open{overflow:hidden}sh-sidenav{--sidenav-width: 17.5rem;--sidenav-wrap-w: 100vw;--sidenav-wrap-h: 100vh;display:flex;width:var(--sidenav-wrap-w);height:var(--sidenav-wrap-h)}sh-sidenav .sidenav{width:var(--sidenav-width);transition:width .2s linear;height:100%;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:auto;overscroll-behavior:contain}sh-sidenav .main-wrap{position:relative;z-index:1;flex:1 0;display:block;height:100%;overflow:auto;padding:1rem 1rem 1rem 0;background-color:var(--base-1)}sh-sidenav main{overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:auto;border:var(--border-10);border-radius:var(--shape-3);height:calc(100vh - 2rem);box-shadow:var(--box-shadow-35)}sh-sidenav .closed-topbar{display:none;min-height:3.75rem;background-color:var(--base-1);align-items:center;justify-content:space-between;padding:0 1rem;border-bottom:var(--border-10);z-index:10000;position:relative;touch-action:none;overscroll-behavior:none}sh-sidenav .dragable{display:none}sh-sidenav .drag-image{display:none}sh-sidenav.simple{border-radius:0}sh-sidenav.simple .main-wrap{padding:0}sh-sidenav.simple .main-wrap main{height:100vh;border-radius:0;border-width:0 0 0 1px}sh-sidenav.simple.closed{--sidenav-width: 6.25rem}sh-sidenav.overlay{overflow:hidden}sh-sidenav.overlay .drag-image{display:block;width:.25rem;height:40%;background-color:var(--base-2);border-radius:.125rem;box-shadow:none;position:fixed;top:0;left:-9999px}sh-sidenav.overlay .sidenav{position:fixed;z-index:0}sh-sidenav.overlay .dragable{position:absolute;top:0;left:0;bottom:0;z-index:9999;width:50px;padding-right:30px;display:flex;align-items:center;justify-content:center;cursor:grab}sh-sidenav.overlay .dragable:active{cursor:grabbing}sh-sidenav.overlay .dragable:after{content:"";display:block;width:.25rem;height:40%;background-color:var(--base-2);border-radius:.125rem}sh-sidenav.overlay .dragable:hover:after{background-color:var(--base-4)}sh-sidenav.overlay .dropping-surface{position:fixed;inset:0;z-index:100000}sh-sidenav.overlay .main-wrap{z-index:1;padding:0;display:flex;height:100vh;position:relative;flex-direction:column;transform:translate(0);transition:transform .2s linear;overflow:hidden;overscroll-behavior:none}sh-sidenav.overlay.is-dragging{-webkit-user-select:none;user-select:none;cursor:grabbing}sh-sidenav.overlay.is-dragging .main-wrap{transition:none}sh-sidenav.overlay.is-dragging>*{cursor:grabbing}sh-sidenav.overlay.is-dragging .dragable{cursor:grabbing}sh-sidenav.overlay.open .main-wrap{transform:translate(var(--sidenav-width));box-shadow:var(--box-shadow-10);border-left:var(--border-10)}sh-sidenav.overlay.open main{overflow-y:hidden}sh-sidenav.overlay .closed-topbar{display:flex}sh-sidenav.overlay .closed-topbar:empty{display:none}sh-sidenav.overlay main{border:0;box-shadow:none;flex:1;height:auto;min-height:0;border-radius:0}
|
|
2
|
+
`],encapsulation:2});}}return o})();var ct=["scroller"];function dt(o,i){o&1&&(Zi(0,"sh-icon"),HC(1,"bell-ringing"),Wl());}function ut(o,i){o&1&&(Zi(0,"sh-icon"),HC(1,"bell"),Wl());}function gt(o,i){if(o&1&&Ig(0,"app-notification",8),o&2){aC(2);let e=zC(6);vg("index",0)("notification",e.content);}}function pt(o,i){if(o&1&&(Zi(0,"div",11),HC(1),Wl()),o&2){aC(3);let e=zC(6);bE(),Yl(" ",e.content.content," ");}}function ht(o,i){if(o&1&&(Zi(0,"sh-alert")(1,"div",10),HC(2),Wl(),lT(3,pt,2,1,"div",11),Wl()),o&2){aC(2);let e=zC(6);xC(e.content.type||"error"),bE(2),im(e.content.title),bE(),uT(e.content.content?3:-1);}}function mt(o,i){if(o&1&&(Zi(0,"div",6),lT(1,gt,1,2,"app-notification",8)(2,ht,4,4,"sh-alert",9),Wl()),o&2){aC();let e=zC(6);bE(),uT(e.type==="notification"?1:2);}}function St(o,i){if(o&1){let e=ET();Zi(0,"div",7)(1,"div",12)(2,"h6",13),Fg(3,2),Zi(4,"button",5),Hg("click",function(){Pd(e);let n=aC();return Ld(n.toggleNotifications())}),Ig(5,"sh-icon"),Wl(),jg(),Wl(),Zi(6,"div",14,0)(8,"div",15),Ig(9,"app-notifications"),Wl()()()();}}function Ct(o,i){if(o&1&&(Zi(0,"div",20),HC(1),Wl()),o&2){let e=aC().$implicit;bE(),Yl(" ",e.content," ");}}function Tt(o,i){if(o&1){let e=ET();Zi(0,"sh-alert",18,1),Hg("click",function(){let n=Pd(e).$implicit,r=aC(2);return Ld(r.deleteAlertByIndex(n.id))}),Zi(2,"div",19),HC(3),Wl(),lT(4,Ct,2,1,"div",20),Wl();}if(o&2){let e=i.$implicit;xC(e.type),vg("id",e.id),bE(3),im(e.title),bE(),uT(e.content?4:-1);}}function Et(o,i){o&1&&(Zi(0,"p",17),oC(1,4),Wl());}function ft(o,i){if(o&1){let e=ET();Zi(0,"div",7)(1,"div",12)(2,"h6",13),Fg(3,3),Zi(4,"button",5),Hg("click",function(){Pd(e);let n=aC();return Ld(n.toggleAlerts())}),Ig(5,"sh-icon"),Wl(),jg(),Wl(),Zi(6,"div",14,0)(8,"div",15),pT(9,Tt,5,5,"sh-alert",16,dT,false,Et,2,0,"p",17),Wl()()()();}if(o&2){let e=aC();bE(9),hT(e.alertHistory());}}var tt=new jn,J=class o{#e=T(fe);#i=T(D);isSubmitting=Ge(false);messageSent=Ge(false);form=tt.group({message:tt.control("",[me.required])});notifications=this.#i.notifications;shownMessage=Ge(null);shownMessageInterval=null;alertHistory=this.#e.alertHistory;alertHistoryIsOpen=this.#e.alertHistoryIsOpen;alertHistoryIsHidden=this.#e.alertHistoryIsHidden;numberOfOpenAlerts=Nt$1(()=>this.alertHistory().filter(i=>i.isOpen).length);scroller=w1("scroller");isAlertsOpen=D1(false);isNotificationsOpen=D1(false);previousHistoryCount=Ge(null);previousNotificationsCount=Ge(null);constructor(){Qa(()=>{let i=this.alertHistory(),e=this.notifications();if(e.length===0){this.shownMessage.set(null);return}e.length&&this.previousHistoryCount()!==i.length&&!this.isNotificationsOpen()?(this.shownMessage.set({content:e[0],countDown:3,type:"notification"}),this.previousHistoryCount.set(i.length),this.shownMessageInterval=setInterval(()=>{let t=this.shownMessage();if(t?.countDown===0){this.shownMessage.set(null),this.shownMessageInterval=null;return}t!==null&&this.shownMessage.update(n=>m$2(l({},n),{countDown:n.countDown-1}));},1e3)):i.length&&this.previousHistoryCount()!==i.length&&!this.isAlertsOpen()&&(this.shownMessage.set({content:i[0],countDown:3,type:"alert"}),this.previousHistoryCount.set(i.length),this.shownMessageInterval=setInterval(()=>{let t=this.shownMessage();if(t?.countDown===0){this.shownMessage.set(null),this.shownMessageInterval=null;return}t!==null&&this.shownMessage.update(n=>m$2(l({},n),{countDown:n.countDown-1}));},1e3));}),Qa(()=>{this.alertHistoryIsOpen(),this.scrollToBottom();});}resetPreviewMessage(){this.shownMessage.set(null),this.shownMessageInterval=null;}toggleAlerts(){this.isAlertsOpen()?this.isAlertsOpen.set(false):(this.isAlertsOpen.set(true),this.isNotificationsOpen.set(false),this.resetPreviewMessage());}toggleNotifications(){this.isNotificationsOpen.set(!this.isNotificationsOpen()),this.isAlertsOpen()&&this.isAlertsOpen.set(false);}deleteAlertByIndex(i){this.#e.removeAlert(i);}scrollToBottom(){this.scroller()&&this.scroller()?.nativeElement&&this.scroller().nativeElement.scrollTo(0,this.scroller().nativeElement.scrollHeight);}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=gw({type:o,selectors:[["app-service-hub"]],viewQuery:function(e,t){e&1&&qg(t.scroller,ct,5),e&2&&hC();},inputs:{isAlertsOpen:[1,"isAlertsOpen"],isNotificationsOpen:[1,"isNotificationsOpen"]},outputs:{isAlertsOpen:"isAlertsOpenChange",isNotificationsOpen:"isNotificationsOpenChange"},decls:10,vars:9,consts:()=>{let i;i=$localize` Notifications ${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_BUTTON:`;let e;e=$localize` Alerts ${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_BUTTON:`;let t;return t=$localize`No alerts yet`,[["scroller",""],["alerts",""],i,e,t,["shButton","",3,"click"],[1,"preview-alert-wrap"],[1,"alert-stream-modal"],[3,"index","notification"],[3,"class"],["ship-alert-title",""],["ship-alert-content",""],[1,"alert-stream-modal-content"],[1,"paragraph-20"],[1,"alert-stream-modal-list-scroller"],[1,"alert-stream-modal-list"],[3,"class","id"],[1,"no-alerts"],[3,"click","id"],["title",""],["content",""]]},template:function(e,t){if(e&1&&(Zi(0,"button",5),Hg("click",function(){return t.toggleAlerts()}),Zi(1,"sh-icon"),HC(2,"info"),Wl()(),Zi(3,"button",5),Hg("click",function(){return t.toggleNotifications()}),lT(4,dt,2,0,"sh-icon")(5,ut,2,0,"sh-icon"),Wl(),dm(6),lT(7,mt,3,1,"div",6),lT(8,St,10,0,"div",7),lT(9,ft,12,1,"div",7)),e&2){xC(t.alertHistory().length?"error":""),bE(3),xC(t.notifications().length?"error":""),bE(),uT(t.notifications().length?4:5),bE(2);let n=GC(t.shownMessage());bE(),uT(n?7:-1),bE(),uT(t.isNotificationsOpen()?8:-1),bE(),uT(t.isAlertsOpen()?9:-1);}},dependencies:[Gn,ue,N,v$1,ne,x],styles:["[_nghost-%COMP%]{display:flex;position:fixed;gap:.5rem;bottom:1.5rem;right:1.5rem;z-index:5000}@media only screen and (max-width:768px){[_nghost-%COMP%]{bottom:1rem;right:1rem}}[_nghost-%COMP%] h6[_ngcontent-%COMP%]{margin:0}.preview-alert-wrap[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column;min-width:15.625rem}.helpdesk-modal[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column}@media only screen and (max-width:768px){.helpdesk-modal[_ngcontent-%COMP%]{bottom:2.6875rem}}.helpdesk-modal-content[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;gap:1rem;min-width:20rem;border:1px solid var(--base-4);background-color:var(--base-1);border-radius:var(--shape-2)}.helpdesk-modal-content[_ngcontent-%COMP%] .message-sent[_ngcontent-%COMP%]{padding:0 1rem 1rem;text-wrap:pretty}.helpdesk-modal-content[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid var(--base-4);display:flex;align-items:center;justify-content:space-between}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{padding:0 1rem 1rem;display:flex;flex-direction:column;align-items:flex-end;gap:1rem}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{width:100%;text-wrap:pretty}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{width:100%}.alert-stream-modal[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column}@media only screen and (max-width:768px){.alert-stream-modal[_ngcontent-%COMP%]{bottom:2.6875rem}}.alert-stream-modal-list-scroller[_ngcontent-%COMP%]{overflow-y:auto;max-height:18.75rem}.alert-stream-modal-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:1rem;border-radius:var(--shape-2)}.alert-stream-modal-content[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;min-width:20rem;border:1px solid var(--base-4);background-color:var(--base-1);border-radius:var(--shape-2)}.alert-stream-modal-content[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid var(--base-4);display:flex;align-items:center;justify-content:space-between}.no-alerts[_ngcontent-%COMP%]{padding:1rem;display:flex;flex-direction:column;gap:1rem;text-align:center}"]})};function Ft(o,i){o&1&&(Zi(0,"sh-icon",14),HC(1,"check"),Wl());}function At(o,i){o&1&&(Zi(0,"sh-icon",15),HC(1,"prohibit"),Wl());}function Ot(o,i){if(o&1){let e=ET();Zi(0,"button",20),Hg("click",function(){Pd(e);let n=aC();return Ld(n.updatePassphrase())}),oC(1,5),Wl();}if(o&2){let e=aC();Kg("loading",e.isUpdating());}}function vt(o,i){if(o&1){let e=ET();Zi(0,"button",21),Hg("click",function(){Pd(e);let n=aC();return Ld(n.updatePassphrase())}),oC(1,6),Wl();}if(o&2){let e=aC();Kg("loading",e.isUpdating()),vg("disabled",true);}}var K=class o{#e=T(J$1);closed=I1();isUpdating=Ge(false);passphrase=Ge("");repeatPassphrase=Ge("");updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(true),sy(()=>this.#e.patchApiV1Serversettings({body:{"server-passphrase":this.passphrase()}})).pipe(Zu(()=>this.isUpdating.set(false))).subscribe({next:()=>this.closed.emit()}));}cancel(){this.isUpdating.set(true),sy(()=>this.#e.patchApiV1Serversettings({body:{"has-asked-for-password-change":"True"}})).pipe(Zu(()=>this.isUpdating.set(false))).subscribe({next:()=>this.closed.emit()});}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=gw({type:o,selectors:[["app-change-passphrase-alert-dialog"]],outputs:{closed:"closed"},decls:23,vars:7,consts:()=>{let i;i=$localize`Enter new password`;let e;e=$localize`Repeat password`;let t;t=$localize`Password have to be filled and have to match`;let n;n=$localize`Change passphrase`;let r;r=$localize` Duplicati needs to be secured with a passphrase and a random passphrase has been generated for you. ${"[\uFFFD#6\uFFFD\uFFFD/#6\uFFFD|\uFFFD#7\uFFFD\uFFFD/#7\uFFFD]"}:LINE_BREAK:${"[\uFFFD#6\uFFFD\uFFFD/#6\uFFFD|\uFFFD#7\uFFFD\uFFFD/#7\uFFFD]"}:LINE_BREAK: If you open Duplicati from the tray icon, you do not need a passphrase, but if you plan to open it from another location you need to set a passphrase you know. Do you want to set a passphrase now? `,r=sC(r);let N;N=$localize`Passphrase`;let A;A=$localize`Repeat passphrase`;let O;O=$localize`Not now thanks`;let D;D=$localize` Yes, update passphrase now `;let E;return E=$localize` Yes, update passphrase now `,[n,r,N,A,O,D,E,["header",""],["content",""],["type","warning"],["for","password"],["type","password","name","password","autocomplete","disabled","placeholder",i,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","disabled","placeholder",e,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"sh-success"],["suffix",""],["footer",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"loading"],["shButton","","shTooltip",t,1,"raised","primary",3,"loading","disabled"],["shButton","",1,"raised","primary",3,"click"],["shButton","","shTooltip",t,1,"raised","primary",3,"click","disabled"]]},template:function(e,t){e&1&&(Zi(0,"header",7)(1,"h3"),oC(2,0),Wl()(),Zi(3,"div",8)(4,"sh-alert",9),Fg(5,1),Ig(6,"br")(7,"br"),jg(),Wl(),Zi(8,"sh-form-field")(9,"label",10),oC(10,2),Wl(),Zi(11,"input",11),lm("ngModelChange",function(r){return qC(t.passphrase,r)||(t.passphrase=r),r}),Wl(),bD(),Wl(),Zi(12,"sh-form-field")(13,"label",12),oC(14,3),Wl(),Zi(15,"input",13),lm("ngModelChange",function(r){return qC(t.repeatPassphrase,r)||(t.repeatPassphrase=r),r}),Wl(),bD(),lT(16,Ft,2,0,"sh-icon",14)(17,At,2,0,"sh-icon",15),Wl()(),Zi(18,"footer",16)(19,"button",17),Hg("click",function(){return t.cancel()}),oC(20,4),Wl(),lT(21,Ot,2,2,"button",18)(22,vt,2,3,"button",19),Wl()),e&2&&(bE(11),cm("ngModel",t.passphrase),MD(),bE(4),vg("disabled",t.passphrase().length===0),cm("ngModel",t.repeatPassphrase),MD(),bE(),uT(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?16:17),bE(3),Kg("loading",t.isUpdating()),bE(2),uT(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?21:22));},dependencies:[Bn,Ze,Rn,Jt,ue,Fe,N,at$1,v$1],styles:["[_nghost-%COMP%]{display:block;--dialog-p: 1.5rem}[content][_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}"]})};var Nt=()=>({exact:true});function Pt(o,i){o&1&&(Zi(0,"sh-icon"),HC(1,"sun"),Wl());}function Dt(o,i){o&1&&(Zi(0,"sh-icon"),HC(1,"moon"),Wl());}function It(o,i){if(o&1){let e=ET();Zi(0,"button",26),Hg("click",function(){Pd(e);let n=aC();return Ld(n.logout())}),Fg(1,8),Ig(2,"sh-icon"),jg(),Wl();}}var ce=class o{#e=T(m);#i=T(m$1);#n=T(I);#t=T(be);#o=T(D);#r=T(D$1);#a=T(R);#s=T(f);#l=T(ee);#_=T(v);relayIsEnabled=this.#n.relayIsEnabled;isDarkMode=this.#e.isDarkMode;isNavOpen=this.#e.isNavOpen;sidenavType=this.#e.sidenavType;hasShownPasswordDialog=false;machineName=Nt$1(()=>{let i=this.#a.serverSettings();if(i&&i["--machine-name"])return i["--machine-name"];if(i&&i["machine-name"])return i["machine-name"];let e=this.#s.allOptions().find(t=>t.name==="machine-name");return e&&e.defaultValue?e.defaultValue:this.#s.systemInfo()?.MachineName??"Unknown"});ngOnInit(){this.#o.init(),this.#i.getBackups(true);}serverSettingsEffect=Qa(()=>{if(!this.hasShownPasswordDialog&&(this.#a.askForInitialPasswordConfig()&&(this.hasShownPasswordDialog=true,this.#t.open(K,{maxWidth:"500px"})),this.#a.showWelcomePage())){let i=this.#_.state();i=="inactive"?this.#l.navigate(["/welcome"]):i!="unknown"&&this.#a.setShownWelcomePage();}});toggleBodyClass(){this.#e.toggleBodyClass();}changeDefaultClientTo(i){this.#c(i),window.location.replace(`/${i}`);}logout(){this.#r.logout();}#c(i){var e=new Date;e.setTime(e.getTime()+2160*60*60*1e3),document.cookie="default-client="+i+"; expires="+e.toUTCString()+"; path=/";}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=gw({type:o,selectors:[["app-layout"]],decls:44,vars:11,consts:()=>{let i;i=$localize`${"\uFFFD#10\uFFFD"}:START_TAG_SH_ICON:house${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_SH_ICON: Home `;let e;e=$localize`${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON: Add backup `;let t;t=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let n;n=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:link-simple${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Destinations `;let r;r=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:gear${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Settings `;let N;N=$localize`${"\uFFFD#32\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#32\uFFFD"}:CLOSE_TAG_SH_ICON: About Duplicati `;let A;A=$localize`${"\uFFFD#35\uFFFD"}:START_TAG_SH_ICON:files${"[\uFFFD/#35\uFFFD|\uFFFD/#36\uFFFD]"}:CLOSE_TAG_SH_ICON: Documentation ${"\uFFFD#36\uFFFD"}:START_TAG_SH_ICON_1:arrow-square-out${"[\uFFFD/#35\uFFFD|\uFFFD/#36\uFFFD]"}:CLOSE_TAG_SH_ICON:`,A=sC(A);let O;O=$localize`${"\uFFFD#39\uFFFD"}:START_TAG_SH_ICON:chats-circle${"[\uFFFD/#39\uFFFD|\uFFFD/#40\uFFFD]"}:CLOSE_TAG_SH_ICON: Visit forum ${"\uFFFD#40\uFFFD"}:START_TAG_SH_ICON_1:arrow-square-out${"[\uFFFD/#39\uFFFD|\uFFFD/#40\uFFFD]"}:CLOSE_TAG_SH_ICON:`,O=sC(O);let D;return D=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:sign-out${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Log out `,[i,e,t,n,r,N,A,O,D,[3,"isOpenChange","isOpen","disableDrag"],["sidenav",""],["shButton","",1,"icon","small",3,"click"],[1,"base-1","primary"],["action","","routerLink","/","routerLinkActive","active",3,"routerLinkActiveOptions"],["action","","routerLink","/add-backup","routerLinkActive","active"],["action","","routerLink","/restore","routerLinkActive","active"],["action","","routerLink","/destinations","routerLinkActive","active"],["action","","routerLink","/settings","routerLinkActive","active"],[1,"spacer"],[1,"base-1l","primary"],["action","",1,"machine-name",3,"title"],["action","","routerLink","/about","routerLinkActive","active"],["href","https://docs.duplicati.com","target","_blank","action",""],["suffix",""],["href","https://forum.duplicati.com","target","_blank","action",""],["action",""],["action","",3,"click"]]},template:function(e,t){e&1&&(Zi(0,"sh-sidenav",9),lm("isOpenChange",function(r){return qC(t.isNavOpen,r)||(t.isNavOpen=r),r}),Zi(1,"div",10)(2,"header"),Ig(3,"app-logo"),Zi(4,"button",11),Hg("click",function(){return t.toggleBodyClass()}),lT(5,Pt,2,0,"sh-icon")(6,Dt,2,0,"sh-icon"),Wl()(),Zi(7,"sh-list",12)(8,"button",13),Fg(9,0),Ig(10,"sh-icon"),jg(),Wl(),Zi(11,"button",14),Fg(12,1),Ig(13,"sh-icon"),jg(),Wl(),Zi(14,"button",15),Fg(15,2),Ig(16,"sh-icon"),jg(),Wl(),Zi(17,"button",16),Fg(18,3),Ig(19,"sh-icon"),jg(),Wl(),Zi(20,"button",17),Fg(21,4),Ig(22,"sh-icon"),jg(),Wl()(),Ig(23,"div",18),Zi(24,"sh-list",19)(25,"div",20)(26,"sh-icon"),HC(27,"desktop"),Wl(),HC(28),Wl(),Ig(29,"sh-divider"),Zi(30,"button",21),Fg(31,5),Ig(32,"sh-icon"),jg(),Wl(),Zi(33,"a",22),Fg(34,6),Ig(35,"sh-icon")(36,"sh-icon",23),jg(),Wl(),Zi(37,"a",24),Fg(38,7),Ig(39,"sh-icon")(40,"sh-icon",23),jg(),Wl(),lT(41,It,3,0,"button",25),Wl()(),Ig(42,"router-outlet")(43,"app-service-hub"),Wl()),e&2&&(xC(t.sidenavType()),cm("isOpen",t.isNavOpen),vg("disableDrag",true),bE(5),uT(t.isDarkMode()?5:6),bE(3),vg("routerLinkActiveOptions",XC(10,Nt)),bE(17),vg("title",QC(t.machineName())),bE(3),Yl(" ",t.machineName()," "),bE(13),uT(t.relayIsEnabled()?-1:41));},dependencies:[lr,_t$1,To,et,N,c,v$1,c$1,J,w],styles:["[_nghost-%COMP%]{height:100vh;width:100%;overflow:hidden}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1.25rem;gap:.75rem}h3[title][_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}div[sidenav][_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100vh}.machine-name[_ngcontent-%COMP%]{margin:0;cursor:default}"]})};
|
|
3
|
+
export{ce as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {D}from'./chunk-DidJB9ig.js';import {d}from'./chunk-DDWDcSq2.js';import {T,ae as eo,bC as ED,bu as N,E as E1,N as Nt$1,ac as I1,af as D1,bb as ce,c9 as C1,D as w1,c0 as oe$1,G as Ge,z as za,b as me,h as hw,S as aC,Q as Qi,Y as cC,$ as $l,d as aT,C as CE,g as cT,H as Hg,cb as VI,aC as yg,f as NC,ag as Yg,L as Kg,M as qg,R as fC,ca as Wg,bZ as ei,c as N$1,a1 as dT,ap as lT,a2 as fT,i as Ig,bF as ve,b8 as Iw,cc as HI,s as jC,y as vg,aa as Ql,ak as dm,k as iC,al as WC,ao as qC,b_ as wg,aF as XC,K as im}from'./main-3NL5M6JB.js';var Ht=["theadLocal"],Rt=["tbodyLocal"],Lt=[[["","actionbar","",3,"align-right",""]],[["","actionbar","","align-right",""]],[["sh-table-content"]],[["th"]],[["","thead",""]],"*",[["","table-no-rows",""]]],Bt=["[actionbar]:not([align-right])","[actionbar][align-right]","sh-table-content","th","[thead]","*","[table-no-rows]"];function Ft(n,c){n&1&&Ig(0,"sh-progress-bar",4);}function It(n,c){n&1&&(Qi(0,"thead",6,0),cC(2,3),cC(3,4),$l(),Qi(4,"tbody",6,1),cC(6,5),$l());}function Wt(n,c){n&1&&(Qi(0,"div",5),cC(1,6),$l());}var $t=["thead"],qt=["tbody"],Ot=(n,c)=>({$implicit:n,column:c}),Nt=(n,c)=>c.id;function Xt(n,c){n&1&&(Qi(0,"sh-icon"),jC(1,"caret-up"),$l());}function Yt(n,c){n&1&&(Qi(0,"sh-icon"),jC(1,"caret-down"),$l());}function Pt(n,c){n&1&&(Qi(0,"sh-icon"),jC(1,"arrows-down-up"),$l());}function Vt(n,c){if(n&1&&aT(0,Xt,2,0,"sh-icon")(1,Yt,2,0,"sh-icon")(2,Pt,2,0,"sh-icon"),n&2){let t=iC().$implicit,e=iC();cT(e.sortByColumn()===t.id?0:e.sortByColumn()==="-"+t.id?1:2);}}function jt(n,c){if(n&1&&(Qi(0,"th",5),jC(1),aT(2,Vt,3,1),$l()),n&2){let t=c.$implicit;Kg("sticky",t.sticky==="start")("sticky-end",t.sticky==="end"),vg("id",t.id)("shSort",t.sortable?t.id:void 0)("resizable",!!t.resizable)("minWidth",t.minWidth??50)("maxWidth",t.maxWidth??null),yg("aria-label",t.header)("size",t.size||null),CE(),Ql(" ",t.header," "),CE(),cT(t.sortable?2:-1);}}function Kt(n,c){if(n&1&&wg(0,8),n&2){let t=iC().$implicit,e=iC().$implicit;vg("ngTemplateOutlet",t.cellTemplate)("ngTemplateOutletContext",XC(2,Ot,e,t));}}function Qt(n,c){if(n&1&&jC(0),n&2){let t=iC().$implicit,e=iC().$implicit;Ql(" ",t.cell(e)," ");}}function Ut(n,c){if(n&1&&jC(0),n&2){let t=iC().$implicit,e=iC().$implicit,i=iC();Ql(" ",t.format(i.getValue(e,t),e)," ");}}function Gt(n,c){if(n&1&&jC(0),n&2){let t=iC(2).$implicit,e=iC().$implicit,i=iC();Ql(" ",i.formatDate(i.getValue(e,t))," ");}}function Zt(n,c){n&1&&(Qi(0,"sh-icon",9),jC(1,"check"),$l());}function Jt(n,c){n&1&&(Qi(0,"sh-icon",10),jC(1,"x"),$l());}function te(n,c){if(n&1&&aT(0,Zt,2,0,"sh-icon",9)(1,Jt,2,0,"sh-icon",10),n&2){let t=iC(2).$implicit,e=iC().$implicit,i=iC();cT(i.getValue(e,t)?0:1);}}function ee(n,c){if(n&1&&(Qi(0,"sh-chip"),jC(1),$l()),n&2){let t=iC(2).$implicit,e=iC().$implicit,i=iC();CE(),im(i.getValue(e,t));}}function ie(n,c){if(n&1&&jC(0),n&2){let t=iC(2).$implicit,e=iC().$implicit,i=iC();Ql(" ",i.getValue(e,t)," ");}}function ne(n,c){if(n&1&&aT(0,Gt,1,1)(1,te,2,1)(2,ee,2,1,"sh-chip")(3,ie,1,1),n&2){let t,e=iC().$implicit;cT((t=e.type)==="date"?0:t==="boolean"?1:t==="badge"?2:3);}}function se(n,c){if(n&1&&(Qi(0,"td",7),aT(1,Kt,1,5,"ng-container",8)(2,Qt,1,1)(3,Ut,1,1)(4,ne,4,1),$l()),n&2){let t=c.$implicit;iC();let e=qC(0),i=iC();Kg("sticky",t.sticky==="start")("sticky-end",t.sticky==="end"),vg("id",t.id+"-"+e),yg("aria-labelledby",t.id+" "+t.id+"-"+e)("role",t.rowHeader?"rowheader":i.grid()?"gridcell":"cell"),CE(),cT(t.cellTemplate?1:t.cell?2:t.format?3:4);}}function oe(n,c){if(n&1&&(dm(0),Qi(1,"tr",3),dT(2,se,5,8,"td",6,Nt),$l()),n&2){let t=c.$index,e=iC();WC(t),CE(2),fT(e.columns());}}var Et=(()=>{class n{#e;#t;#i;#n;#o;#s;#a;#c;#l;#r;constructor(){this.#e=T(eo),this.#t=T(ED),this.#i=T(ot),this.#n=T(N),this.#o=T(ve),this.#s=Ge(null),this.resizable=E1(true),this.minWidth=E1(50),this.maxWidth=E1(null),this.resizingClass=Ge(false),this.#l=false,this.#r=null,za(()=>{if(this.#s())return;let t=this.#e.nativeElement;if(this.resizable()){let e=[],i="table.column-resize-decrease",o=this.#n.getShortcut(i);o&&e.push(this.#n.getDisplayShortcut(i)||o);let s="table.column-resize-increase",r=this.#n.getShortcut(s);r&&e.push(this.#n.getDisplayShortcut(s)||r),e.length>0?this.#t.setAttribute(t,"aria-keyshortcuts",e.join(", ")):this.#t.removeAttribute(t,"aria-keyshortcuts");}else this.#t.removeAttribute(t,"aria-keyshortcuts");});}ngOnInit(){if(!this.#i){console.error("shTableResize directive must be used within a sh-table component.");return}let t=this.#e.nativeElement;if(this.#s.set(this.#o.get(Mt,null,{optional:true,self:true})),this.resizable()){let e=this.#t.createElement("div");this.#t.addClass(e,"sh-resizer"),this.#t.appendChild(t,e),this.#t.listen(e,"mousedown",this.#h.bind(this)),t.hasAttribute("role")||this.#t.setAttribute(t,"role","columnheader"),!this.#s()&&!t.hasAttribute("tabindex")&&this.#t.setAttribute(t,"tabindex","0");}}onKeyDown(t){if(!this.resizable())return;let e=t.target,i=this.#e.nativeElement;if(e!==i&&(e.tagName==="BUTTON"||e.tagName==="INPUT"||e.tagName==="SELECT"||e.tagName==="TEXTAREA"||e.closest("button, input, select, textarea, a")!==null||e.closest('[role="button"], [role="checkbox"], [role="menuitem"]')!==null))return;if((t.key==="ArrowLeft"||t.key==="ArrowRight")&&!t.shiftKey&&!this.#s()){let r=i.parentElement;if(r){let a=Array.from(r.querySelectorAll("th")).filter(h=>h.getAttribute("tabindex")==="0"||h.hasAttribute("shSort")||h.hasAttribute("shResize")),l=a.indexOf(i);if(l!==-1){let h=t.key==="ArrowRight"?l+1:l-1;if(h>=0&&h<a.length){t.preventDefault(),a[h].focus();return}}}}let o=this.#n.matches(t,"table.column-resize-decrease"),s=this.#n.matches(t,"table.column-resize-increase");if(o||s){t.preventDefault(),t.stopPropagation();let r=this.#e.nativeElement.offsetWidth,a=10,l=o?r-a:r+a,h=Math.max(this.minWidth(),this.maxWidth()?Math.min(l,this.maxWidth()??l):l);this.#t.setAttribute(this.#e.nativeElement,"size",`${h}px`),this.#i.updateColumnSizes();}}onMouseMove(t){this.#l&&this.#d(t);}onMouseUp(t){this.#l&&(this.#l=false,this.resizingClass.set(false),this.#r!==null&&(cancelAnimationFrame(this.#r),this.#r=null),setTimeout(()=>{this.#i.resizing.set(false);},50));}onClick(t){this.#l&&t.stopPropagation();}#h(t){t.stopPropagation(),this.resizable()&&(this.#i.resizing.set(true),this.#l=true,this.resizingClass.set(true),this.#a=t.pageX,this.#c=this.#e.nativeElement.offsetWidth);}#d(t){this.#r!==null&&cancelAnimationFrame(this.#r),this.#r=requestAnimationFrame(()=>{this.#b(t),this.#r=null;});}#b(t){let e=this.#c+(t.pageX-this.#a),i=Math.max(this.minWidth(),this.maxWidth()?Math.min(e,this.maxWidth()??e):e);this.#t.setAttribute(this.#e.nativeElement,"size",`${i}px`),this.#i.updateColumnSizes();}ngOnDestroy(){this.#r!==null&&cancelAnimationFrame(this.#r);}static{this.\u0275fac=function(e){return new(e||n)};}static{this.\u0275dir=Iw({type:n,selectors:[["","shResize",""]],hostVars:2,hostBindings:function(e,i){e&1&&Hg("keydown",function(s){return i.onKeyDown(s)})("mousemove",function(s){return i.onMouseMove(s)},HI)("mouseup",function(s){return i.onMouseUp(s)},HI)("click",function(s){return i.onClick(s)},HI),e&2&&Kg("resizing",i.resizingClass());},inputs:{resizable:[1,"resizable"],minWidth:[1,"minWidth"],maxWidth:[1,"maxWidth"]}});}}return n})(),Mt=(()=>{class n{constructor(){this.#e=T(ot),this.#t=T(N),this.#i=T(ve),this.#n=T(eo),this.#o=Ge(null),this.shSort=E1(),this.tabIndex=Nt$1(()=>{let t=this.#o();return this.shSort()||t&&t.resizable()?"0":null}),this.ariaKeyshortcuts=Nt$1(()=>{let t=[],e=this.#o();if(this.shSort()){let i="table.sort",o=this.#t.getShortcut(i);o&&t.push(this.#t.getDisplayShortcut(i)||o);}if(e&&e.resizable()){let i="table.column-resize-decrease",o=this.#t.getShortcut(i);o&&t.push(this.#t.getDisplayShortcut(i)||o);let s="table.column-resize-increase",r=this.#t.getShortcut(s);r&&t.push(this.#t.getDisplayShortcut(s)||r);}return t.length>0?t.join(", "):null}),this.sortAsc=Nt$1(()=>{let t=this.#e.sortByColumn(),e=this.shSort();return !t||!e?false:t===e}),this.sortDesc=Nt$1(()=>{let t=this.#e.sortByColumn(),e=this.shSort();return !t||!e?false:t===`-${e}`}),this.ariaSort=Nt$1(()=>this.sortAsc()?"ascending":this.sortDesc()?"descending":"none");}#e;#t;#i;#n;#o;ngOnInit(){this.#o.set(this.#i.get(Et,null,{optional:true,self:true}));}onKeyDown(t){if(!this.shSort())return;let e=t.target,i=this.#n.nativeElement;if(!(e!==i&&(e.tagName==="BUTTON"||e.tagName==="INPUT"||e.tagName==="SELECT"||e.tagName==="TEXTAREA"||e.closest("button, input, select, textarea, a")!==null||e.closest('[role="button"], [role="checkbox"], [role="menuitem"]')!==null))){if((t.key==="ArrowLeft"||t.key==="ArrowRight")&&!t.shiftKey){let o=i.parentElement;if(o){let s=Array.from(o.querySelectorAll("th")).filter(a=>a.getAttribute("tabindex")==="0"||a.hasAttribute("shSort")||a.hasAttribute("shResize")),r=s.indexOf(i);if(r!==-1){let a=t.key==="ArrowRight"?r+1:r-1;if(a>=0&&a<s.length){t.preventDefault(),s[a].focus();return}}}}this.#t.matches(t,"table.sort")&&this.toggleSort(t);}}toggleSort(t){if(t){let i=t.target,o=this.#n.nativeElement;if(i!==o&&(i.tagName==="BUTTON"||i.tagName==="INPUT"||i.tagName==="SELECT"||i.tagName==="TEXTAREA"||i.closest("button, input, select, textarea, a")!==null||i.closest('[role="button"], [role="checkbox"], [role="menuitem"]')!==null))return;t.preventDefault();}if(this.#e.resizing())return;let e=this.shSort();e&&this.#e.toggleSort(e);}static{this.\u0275fac=function(e){return new(e||n)};}static{this.\u0275dir=Iw({type:n,selectors:[["","shSort",""]],hostAttrs:["role","columnheader"],hostVars:9,hostBindings:function(e,i){e&1&&Hg("click",function(s){return i.shSort()?i.toggleSort(s):null})("keydown",function(s){return i.onKeyDown(s)}),e&2&&(yg("tabindex",i.tabIndex())("aria-sort",i.shSort()?i.ariaSort():null)("aria-keyshortcuts",i.ariaKeyshortcuts()),Kg("sortable",!!i.shSort())("sort-asc",i.sortAsc())("sort-desc",i.sortDesc()));},inputs:{shSort:[1,"shSort"]}});}}return n})();(()=>{class n{constructor(){this.#e=T(eo),this.#t=T(ED),this.shStickyColumns=E1("start");}#e;#t;ngAfterContentInit(){this.#i();}#i(){let t=this.#e.nativeElement,i=t.querySelectorAll(":scope > th, :scope > td").length;if(i>0){let o=this.shStickyColumns();this.#t.setStyle(t,"grid-column",o==="end"?`-${i+1} / -1`:`1 / ${i+1}`);}}static{this.\u0275fac=function(e){return new(e||n)};}static{this.\u0275dir=Iw({type:n,selectors:[["","shStickyColumns",""]],hostVars:4,hostBindings:function(e,i){e&2&&Kg("sticky",i.shStickyColumns()==="start"||i.shStickyColumns()==="")("sticky-end",i.shStickyColumns()==="end");},inputs:{shStickyColumns:[1,"shStickyColumns"]}});}}return n})();var F=1.5,ot=(()=>{class n{constructor(){this.#e=T(eo),this.#t=T(ED),this.#i=T(N),this.grid=E1(false),this.role=Nt$1(()=>this.grid()?"grid":"table"),this.loading=E1(false),this.data=E1([]),this.dataChange=I1(),this.sortByColumn=D1(null),this.color=E1(null),this.variant=E1(null),this.ariaLabel=E1(null,{alias:"aria-label"}),this.ariaLabelledby=E1(null,{alias:"aria-labelledby"}),this.hostClasses=ce("table",{color:this.color,variant:this.variant}),this.content=C1(At),this.theadLocal=w1("theadLocal"),this.tbodyLocal=w1("tbodyLocal"),this.thead=Nt$1(()=>this.content()?.thead()||this.theadLocal()),this.tbody=Nt$1(()=>this.content()?.tbody()||this.tbodyLocal()),this.columns=oe$1(this.thead,["tr:first-child th"]),this.stickyHeaderHeight=Ge(0),this.theadEffect=za(t=>{let e=this.thead()?.nativeElement;if(e&&typeof ResizeObserver<"u"){let i=new ResizeObserver(o=>{let s=e.clientHeight;this.stickyHeaderHeight.set(s);});i.observe(e),t(()=>i.disconnect());}}),this.bodyEffect=za(()=>{let t=this.tbody()?.nativeElement,e=this.thead()?.nativeElement;if(!t||!e)return;let i=this.stickyHeaderHeight();queueMicrotask(()=>{let o=e.querySelectorAll("tr.sticky").length>0,s=t.querySelectorAll("tr.sticky");if(s.length>0&&o)for(let a=0;a<s.length;a++)s[a].style.top=`${i}px`;});}),this.gridSetupEffect=za(()=>{let t=this.grid();this.data();this.columns.signal();me(()=>{let o=this.#e.nativeElement,s=o.querySelectorAll("th, td");if(t){if(s.length===0)return;let r=false;s.forEach(l=>{l.getAttribute("tabindex")==="0"&&(r=true);}),r||this.#t.setAttribute(s[0],"tabindex","0"),s.forEach(l=>{l.getAttribute("tabindex")!=="0"&&this.#t.setAttribute(l,"tabindex","-1"),l.hasAttribute("role")||this.#t.setAttribute(l,"role",l.tagName==="TD"?"gridcell":"columnheader");}),o.querySelectorAll("tr").forEach(l=>{l.hasAttribute("role")||this.#t.setAttribute(l,"role","row");});}else s.forEach(r=>{r.tagName==="TH"?r.classList.contains("sortable")||r.querySelector(".sh-resizer")!==null||r.hasAttribute("aria-keyshortcuts")?this.#t.setAttribute(r,"tabindex","0"):this.#t.removeAttribute(r,"tabindex"):this.#t.removeAttribute(r,"tabindex");});});}),this.resizing=Ge(false),this.sizeTrigger=Ge(true),this.#n=null,this.#o=Ge(false),this.scrollXState=Ge(-1),this.scrollYState=Ge(-1),this.canScrollX=Ge(false),this.canScrollY=Ge(false),this.columnSizes=Nt$1(()=>{this.sizeTrigger();let t=this.columns.signal();return t.reduce((e,i,o)=>{let s=i,r=s.getAttribute("size"),a=o===t.length-1;return r?`${e} ${r}`:s.classList.contains("sticky")||s.classList.contains("sticky-end")?`${e} min-content`:a?`${e} 1fr`:`${e} 1fr`},"")}),this.e=za(()=>{let t=this.sortByColumn();if(t===null)return this.#o()||(this.#n=this.data(),this.#o.set(true)),this.dataChange.emit(structuredClone(this.#n));let e=t.startsWith("-")?t.slice(1):t,i=t.startsWith("-"),o=this.data(),s=[...o].sort((a,l)=>{let h=this.content()?.columns()?.find(y=>y.id===e);if(h?.sortPredicate){let y=h.sortPredicate(a,l);return i?-y:y}let f=h?this.content()?.getValue(a,h):a[e],b=h?this.content()?.getValue(l,h):l[e],M=f==null,D=b==null;if(M&&D)return 0;if(M)return 1;if(D)return -1;let _=0;if(h?.type==="date"){let y=new Date(f).getTime(),u=new Date(b).getTime();_=isNaN(y)||isNaN(u)?0:y-u;}else h?.type==="number"?_=Number(f)-Number(b):h?.type==="boolean"?_=(f?1:0)-(b?1:0):h?.type==="string"||h?.type==="badge"?_=f.toString().localeCompare(b.toString(),void 0,{sensitivity:"base"}):typeof f=="number"&&typeof b=="number"?_=f-b:f instanceof Date&&b instanceof Date?_=f.getTime()-b.getTime():typeof f=="string"&&typeof b=="string"&&(_=f.localeCompare(b,void 0,{sensitivity:"base"}));return i?-_:_}),r=s.length!==o.length;if(!r){for(let a=0;a<s.length;a++)if(s[a]!==o[a]){r=true;break}}r&&this.dataChange.emit(s);});}#e;#t;#i;#n;#o;updateColumnSizes(){this.sizeTrigger.set(!this.sizeTrigger());}onScroll(){this.#a();}onResize(t){this.#a();}ngAfterViewInit(){queueMicrotask(()=>this.#a());}onFocusIn(t){if(!this.grid())return;let e=t.target;if(!e)return;let i=e.tagName==="TH"||e.tagName==="TD"?e:e.closest("th, td");if(i){i.hasAttribute("role")||this.#t.setAttribute(i,"role",i.tagName==="TD"?"gridcell":"columnheader");let o=i.parentElement;o&&!o.hasAttribute("role")&&this.#t.setAttribute(o,"role","row"),this.#t.setAttribute(i,"tabindex","0"),this.#e.nativeElement.querySelectorAll("th, td").forEach(r=>{r!==i&&this.#t.setAttribute(r,"tabindex","-1");});}}onGridKeyDown(t){if(!this.grid())return;if(t.key==="Tab"){let u=t.target,k=u.tagName==="TH"||u.tagName==="TD"?u:u.closest("th, td");if(!k)return;let I='button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])',H=Array.from(k.querySelectorAll(I)),Z=k.parentElement;if(!Z||Z.tagName!=="TR")return;let R=Array.from(Z.querySelectorAll("th, td")),N=R.indexOf(k);if(N===-1)return;if(t.shiftKey){let J=H.length>0&&u===H[0],O=u===k;if(J)t.preventDefault(),this.#s(k);else if(O&&N>0){t.preventDefault();let tt=R[N-1],et=Array.from(tt.querySelectorAll(I));et.length>0?(this.#s(tt),et[et.length-1].focus()):this.#s(tt);}}else {let J=H.length===0||u===H[H.length-1],O=u===k;J&&!O?N<R.length-1&&(t.preventDefault(),this.#s(R[N+1])):O&&H.length===0&&N<R.length-1&&(t.preventDefault(),this.#s(R[N+1]));}return}let e=this.#i.matches(t,"grid.focus-up"),i=this.#i.matches(t,"grid.focus-down"),o=this.#i.matches(t,"grid.focus-left"),s=this.#i.matches(t,"grid.focus-right"),r=this.#i.matches(t,"grid.focus-first"),a=this.#i.matches(t,"grid.focus-last");if(!e&&!i&&!o&&!s&&!r&&!a)return;let l=t.target;if(l.tagName!=="TH"&&l.tagName!=="TD")return;let h=l.parentElement;if(!h||h.tagName!=="TR")return;let f=Array.from(this.#e.nativeElement.querySelectorAll("tr")),b=f.indexOf(h);if(b===-1)return;let M=Array.from(h.querySelectorAll("th, td")),D=M.indexOf(l);if(D===-1)return;let _=b,y=D;if(e?_=b-1:i?_=b+1:o?y=D-1:s?y=D+1:r?y=0:a&&(y=M.length-1),_!==b){let u=f[_];if(u){let k=Array.from(u.querySelectorAll("th, td")),I=k[Math.min(D,k.length-1)];I&&(t.preventDefault(),this.#s(I));}}else if(y!==D){let u=M[y];u&&(t.preventDefault(),this.#s(u));}}#s(t){this.#t.setAttribute(t,"tabindex","0"),t.focus(),this.#e.nativeElement.querySelectorAll("th, td").forEach(i=>{i!==t&&this.#t.setAttribute(i,"tabindex","-1");});}toggleSort(t){let e=this.sortByColumn(),i=e===t?`-${t}`:e===`-${t}`?null:t;this.sortByColumn.set(i);}#a(){let t=this.#e.nativeElement,e=-1,i=-1,o=t.scrollWidth>t.clientWidth+F;if(o){let r=t.scrollLeft<=F;t.scrollWidth-(t.scrollLeft+t.clientWidth)<F?e=1:r||(e=0);}this.scrollXState.set(e),this.canScrollX.set(o);let s=t.scrollHeight>t.clientHeight+F;if(s){let r=t.scrollTop<=F;t.scrollHeight-(t.scrollTop+t.clientHeight)<F?i=1:r||(i=0);}this.scrollYState.set(i),this.canScrollY.set(s);}static{this.\u0275fac=function(e){return new(e||n)};}static{this.\u0275cmp=hw({type:n,selectors:[["sh-table"]],contentQueries:function(e,i,o){e&1&&Wg(o,i.content,At,5),e&2&&fC();},viewQuery:function(e,i){e&1&&qg(i.theadLocal,Ht,5)(i.tbodyLocal,Rt,5),e&2&&fC(2);},hostVars:22,hostBindings:function(e,i){e&1&&Hg("scroll",function(){return i.onScroll()})("resize",function(s){return i.onResize(s)},VI)("focusin",function(s){return i.onFocusIn(s)})("keydown",function(s){return i.onGridKeyDown(s)}),e&2&&(yg("role",i.role())("aria-busy",i.loading())("aria-label",i.ariaLabel())("aria-labelledby",i.ariaLabelledby()),NC(i.hostClasses()),Yg("grid-template-columns",i.columnSizes()),Kg("resizing",i.resizing())("can-scroll-x",i.canScrollX())("can-scroll-y",i.canScrollY())("scrolled-x",i.scrollXState()>=0)("scrolled-x-end",i.scrollXState()===1)("scrolled-y",i.scrollYState()>=0)("scrolled-y-end",i.scrollYState()===1));},inputs:{grid:[1,"grid"],loading:[1,"loading"],data:[1,"data"],sortByColumn:[1,"sortByColumn"],color:[1,"color"],variant:[1,"variant"],ariaLabel:[1,"aria-label","ariaLabel"],ariaLabelledby:[1,"aria-labelledby","ariaLabelledby"]},outputs:{dataChange:"dataChange",sortByColumn:"sortByColumnChange"},ngContentSelectors:Bt,decls:8,vars:3,consts:[["theadLocal",""],["tbodyLocal",""],[1,"actionbar"],[1,"actionbar-right"],[1,"indeterminate","primary"],[1,"no-rows"],["role","rowgroup"]],template:function(e,i){e&1&&(aC(Lt),Qi(0,"div",2),cC(1),Qi(2,"div",3),cC(3,1),$l()(),aT(4,Ft,1,0,"sh-progress-bar",4),cC(5,2),aT(6,It,7,0),aT(7,Wt,2,0,"div",5)),e&2&&(CE(4),cT(i.loading()?4:-1),CE(2),cT(i.content()?-1:6),CE(),cT(i.loading()?-1:7));},dependencies:[d],styles:[`sh-table{--table-bc: var(--base-4);--table-th-bg: var(--base-2);--table-tr-bg: var(--base-1);--table-td-bg: var(--base-1);--table-th-c: var(--base-8);--table-th-f: var(--paragraph-30);--table-td-c: var(--base-8);--table-td-f: var(--paragraph-30);--table-th-p: 0 1.25rem;--table-td-p: 0 1.25rem;--table-th-mh: 3rem;--table-td-mh: 4.875rem;--table-th-g: .25rem;--table-td-g: .5rem;--table-ws: nowrap;--table-th-bw: 0;--table-td-bw: .0625rem 0 0;--table-columns: 1fr 1fr 1fr max-content;--table-sticky-bw: .0625rem}sh-table.type-a tbody>th,sh-table.type-a tbody>td,sh-table.type-a thead>th,sh-table.type-a thead>td{padding-right:0}sh-table.type-a tbody>th:first-child,sh-table.type-a tbody>td:first-child,sh-table.type-a thead>th:first-child,sh-table.type-a thead>td:first-child{padding:0}sh-table.type-b{--table-th-p: 0 .75rem;--table-td-p: 0 .75rem;--table-th-mh: 2.25rem;--table-td-mh: 3.5rem;--table-th-bw: .0625rem 0 .0625rem .0625rem;--table-td-bw: 0 0 .0625rem .0625rem;--table-sticky-bw: .0625rem}sh-table.type-b th:first-child{border-left-width:0;padding:var(--table-th-p)}sh-table.type-b td:first-child{border-left-width:0;padding:var(--table-td-p)}sh-table.type-b td.sticky,sh-table.type-b th.sticky{border-left-width:0;border-right:var(--table-sticky-bw) solid var(--table-bc)}sh-table.type-b [shStickyColumns] th,sh-table.type-b [shStickyColumns] td{border-right:var(--table-sticky-bw) solid var(--table-bc)}sh-table.type-b th.sticky-end,sh-table.type-b td.sticky-end,sh-table.type-b [shStickyColumns=end] th,sh-table.type-b [shStickyColumns=end] td{border-left:var(--table-sticky-bw) solid var(--table-bc);border-right:0}sh-table.type-b .sticky+th,sh-table.type-b .sticky+td,sh-table.type-b [shStickyColumns]+th,sh-table.type-b [shStickyColumns]+td{border-left-width:0}sh-table.type-b tr:hover td{background-color:var(--base-2)}sh-table.type-b div[table-header] tr:first-child th{border-bottom:0}sh-table.type-b tbody tr:last-child td{border-bottom-width:0}sh-table.type-b .actionbar{background-color:var(--base-2);border-width:.0625rem 0 0}sh-table{width:100%;display:grid;overflow:auto;overscroll-behavior-x:none;grid-template-columns:var(--table-columns);position:relative;container-type:inline-size}sh-table.resizing{-webkit-user-select:none;user-select:none}sh-table:has([shTableResize]) td{overflow:auto}sh-table.no-resize .sh-resizer{display:none}sh-table.no-resize td{overflow:initial}sh-table .actionbar{display:flex;align-items:center;gap:.5rem;grid-column:1/-1;position:sticky;left:0;z-index:10;background-color:var(--base-1);width:100cqw;box-sizing:border-box;padding:.5rem;border:var(--border-10);border-width:.0625rem 0;opacity:1;transition:padding .3s ease-out,border-width .3s ease-out,opacity .3s ease-out;overflow:hidden}sh-table .actionbar:empty,sh-table .actionbar:not(:has(>:not(.actionbar-right))):has(>.actionbar-right:empty){display:none}sh-table .actionbar>*{min-height:0}sh-table .actionbar .actionbar-right{display:flex;align-items:center;gap:.5rem;margin-left:auto;flex-shrink:0}sh-table .actionbar .actionbar-right:empty{display:none}sh-table tbody{position:relative}sh-table tbody:has(tr.sticky){position:sticky;top:0;z-index:1}sh-table thead{position:relative}sh-table thead:has(tr.sticky){position:sticky;top:0;z-index:2}sh-table sh-progress-bar{grid-column:1/-1;position:absolute;top:100%;transform:translateY(-50%);z-index:200}sh-table tbody,sh-table thead,sh-table tr{display:grid;grid-column:1/-1;grid-template-columns:subgrid}sh-table tr{background:var(--table-tr-bg);position:relative;z-index:0}sh-table tr.sticky{position:sticky;top:0;z-index:1}sh-table tr.sticky-end{position:sticky;bottom:0;z-index:3}sh-table tr:has(th.sticky-end) th:nth-last-child(2){padding:var(--table-th-p)}sh-table tr:has(td.sticky-end) td:nth-last-child(2){padding:var(--table-td-p)}sh-table th{display:flex;align-items:center;padding:var(--table-th-p);min-height:var(--table-th-mh);font:var(--table-th-f);line-height:1em;white-space:var(--table-ws);color:var(--table-th-c);border:0;border-color:var(--table-bc);border-style:solid;border-width:var(--table-th-bw);background:var(--table-th-bg);gap:var(--table-th-g);z-index:auto}sh-table th:focus-visible{outline:.125rem solid var(--primary-8);outline-offset:-.125rem}sh-table th:hover,sh-table th.resizing{z-index:10}sh-table th:has(.sh-resizer){position:relative;z-index:2}sh-table th.sortable{--caret-color: var(--base-10);--caret-size: .375rem;cursor:pointer;-webkit-user-select:none;user-select:none}sh-table th.sortable sh-icon{opacity:.35;transition:opacity 125ms ease-in-out}sh-table th.sortable:hover sh-icon{opacity:.7}sh-table th.sortable.sort-asc sh-icon,sh-table th.sortable.sort-desc sh-icon{opacity:1}sh-table th.sortable:not(:has(sh-icon)):after{content:"";border:var(--caret-size) solid transparent;width:0;height:0;opacity:0;transition:opacity 125ms ease-in-out}sh-table th.sortable:not(:has(sh-icon)).sort-desc:after{opacity:1;transform:translateY(-4px);border-bottom-color:var(--caret-color)}sh-table th.sortable:not(:has(sh-icon)).sort-asc:after{opacity:1;transform:translateY(4px);border-top-color:var(--caret-color)}sh-table th .sh-resizer{width:.75rem;height:100%;position:absolute;top:0;right:-.375rem;cursor:col-resize;z-index:5}sh-table th .sh-resizer:after{content:"";position:absolute;top:.3125rem;bottom:.3125rem;border-radius:.125rem;left:50%;transform:translate(-50%);width:.1875rem;background-color:var(--base-4);transition:width .15s ease,background-color .15s ease}sh-table th .sh-resizer:hover:after{width:.3125rem;background-color:var(--primary-8)}@media(pointer:coarse){sh-table th .sh-resizer{width:1.5rem;right:-.75rem}}sh-table th.resizing .sh-resizer:after{width:.3125rem;background-color:var(--primary-8)}sh-table td{display:flex;align-items:center;padding:var(--table-td-p);min-height:var(--table-td-mh);gap:var(--table-td-g);color:var(--table-td-c);font:var(--table-td-f);white-space:var(--table-ws);border-color:var(--table-bc);border-style:solid;border-width:var(--table-td-bw);background:var(--table-td-bg)}sh-table td+td.sticky-end:last-child{padding:var(--table-td-p)}sh-table th.sticky,sh-table th.sticky-end,sh-table td.sticky,sh-table td.sticky-end{position:sticky;overflow:hidden;right:auto;left:0;z-index:1;padding:var(--table-td-p)}sh-table th.sticky:first-child,sh-table th.sticky-end:first-child,sh-table td.sticky:first-child,sh-table td.sticky-end:first-child{padding:var(--table-th-p)}sh-table th.sticky-end,sh-table td.sticky-end{right:0;left:auto}sh-table th.sticky,sh-table th.sticky-end{background:var(--base-1);padding:var(--table-th-p);z-index:101}sh-table th.sticky:first-child,sh-table th.sticky-end:first-child{padding:var(--table-th-p)}sh-table [shStickyColumns]{display:grid;grid-template-columns:subgrid;position:sticky;left:0;z-index:1000;border:0;border-color:var(--table-bc);border-style:solid}sh-table [shStickyColumns] th{background-color:var(--base-1)}sh-table [shStickyColumns=end]{left:auto;right:0}sh-table .span-all{grid-column:1/-1;white-space:initial;align-items:flex-start;padding:0;border-left-width:0;position:sticky;left:0;width:100cqw;box-sizing:border-box}sh-table .no-rows{display:none;grid-column:1/-1}sh-table tbody:empty+.no-rows{display:block}
|
|
2
|
-
`],encapsulation:2});}}return n})(),At=(()=>{class n{constructor(){this.#e=T(ot),this.columns=E1([]),this.data=E1([]),this.sortByColumn=this.#e.sortByColumn,this.grid=this.#e.grid,this.thead=w1("thead"),this.tbody=w1("tbody");}#e;getValue(t,e){if(!t)return "";let i=e.accessorKey||e.id;return typeof i=="string"&&i.includes(".")?i.split(".").reduce((o,s)=>o?.[s],t):t[i]}formatDate(t){if(!t)return "";let e=new Date(t);return isNaN(e.getTime())?String(t):e.toLocaleDateString()}static{this.\u0275fac=function(e){return new(e||n)};}static{this.\u0275cmp=
|
|
1
|
+
import {D}from'./chunk-CKUlUN3q.js';import {d}from'./chunk-BGuvkLC9.js';import {T,af as eo,bv as DD,bn as N,E as E1,N as Nt$1,ac as I1,ag as D1,bd as ce,ca as C1,B as w1,bX as oe$1,G as Ge,Q as Qa,m as me,g as gw,S as lC,Z as Zi,Y as uC,W as Wl,l as lT,b as bE,c as uT,w as Hg,cc as HI,aE as yg,x as xC,ah as Yg,K as Kg,O as qg,R as hC,cb as Wg,bS as ei,a as N$1,a1 as pT,aq as dT,a2 as hT,d as Ig,by as ve,ba as Ew,cd as BI,H as HC,z as vg,aa as Yl,al as dm,h as aC,am as GC,ap as zC,bT as wg,aH as tb,J as im}from'./main-2ZYVV4C4.js';var Ht=["theadLocal"],Rt=["tbodyLocal"],Lt=[[["","actionbar","",3,"align-right",""]],[["","actionbar","","align-right",""]],[["sh-table-content"]],[["th"]],[["","thead",""]],"*",[["","table-no-rows",""]]],Bt=["[actionbar]:not([align-right])","[actionbar][align-right]","sh-table-content","th","[thead]","*","[table-no-rows]"];function Ft(n,c){n&1&&Ig(0,"sh-progress-bar",4);}function It(n,c){n&1&&(Zi(0,"thead",6,0),uC(2,3),uC(3,4),Wl(),Zi(4,"tbody",6,1),uC(6,5),Wl());}function Wt(n,c){n&1&&(Zi(0,"div",5),uC(1,6),Wl());}var $t=["thead"],qt=["tbody"],Ot=(n,c)=>({$implicit:n,column:c}),Nt=(n,c)=>c.id;function Xt(n,c){n&1&&(Zi(0,"sh-icon"),HC(1,"caret-up"),Wl());}function Yt(n,c){n&1&&(Zi(0,"sh-icon"),HC(1,"caret-down"),Wl());}function Pt(n,c){n&1&&(Zi(0,"sh-icon"),HC(1,"arrows-down-up"),Wl());}function Vt(n,c){if(n&1&&lT(0,Xt,2,0,"sh-icon")(1,Yt,2,0,"sh-icon")(2,Pt,2,0,"sh-icon"),n&2){let t=aC().$implicit,e=aC();uT(e.sortByColumn()===t.id?0:e.sortByColumn()==="-"+t.id?1:2);}}function jt(n,c){if(n&1&&(Zi(0,"th",5),HC(1),lT(2,Vt,3,1),Wl()),n&2){let t=c.$implicit;Kg("sticky",t.sticky==="start")("sticky-end",t.sticky==="end"),vg("id",t.id)("shSort",t.sortable?t.id:void 0)("resizable",!!t.resizable)("minWidth",t.minWidth??50)("maxWidth",t.maxWidth??null),yg("aria-label",t.header)("size",t.size||null),bE(),Yl(" ",t.header," "),bE(),uT(t.sortable?2:-1);}}function Kt(n,c){if(n&1&&wg(0,8),n&2){let t=aC().$implicit,e=aC().$implicit;vg("ngTemplateOutlet",t.cellTemplate)("ngTemplateOutletContext",tb(2,Ot,e,t));}}function Qt(n,c){if(n&1&&HC(0),n&2){let t=aC().$implicit,e=aC().$implicit;Yl(" ",t.cell(e)," ");}}function Ut(n,c){if(n&1&&HC(0),n&2){let t=aC().$implicit,e=aC().$implicit,i=aC();Yl(" ",t.format(i.getValue(e,t),e)," ");}}function Gt(n,c){if(n&1&&HC(0),n&2){let t=aC(2).$implicit,e=aC().$implicit,i=aC();Yl(" ",i.formatDate(i.getValue(e,t))," ");}}function Zt(n,c){n&1&&(Zi(0,"sh-icon",9),HC(1,"check"),Wl());}function Jt(n,c){n&1&&(Zi(0,"sh-icon",10),HC(1,"x"),Wl());}function te(n,c){if(n&1&&lT(0,Zt,2,0,"sh-icon",9)(1,Jt,2,0,"sh-icon",10),n&2){let t=aC(2).$implicit,e=aC().$implicit,i=aC();uT(i.getValue(e,t)?0:1);}}function ee(n,c){if(n&1&&(Zi(0,"sh-chip"),HC(1),Wl()),n&2){let t=aC(2).$implicit,e=aC().$implicit,i=aC();bE(),im(i.getValue(e,t));}}function ie(n,c){if(n&1&&HC(0),n&2){let t=aC(2).$implicit,e=aC().$implicit,i=aC();Yl(" ",i.getValue(e,t)," ");}}function ne(n,c){if(n&1&&lT(0,Gt,1,1)(1,te,2,1)(2,ee,2,1,"sh-chip")(3,ie,1,1),n&2){let t,e=aC().$implicit;uT((t=e.type)==="date"?0:t==="boolean"?1:t==="badge"?2:3);}}function se(n,c){if(n&1&&(Zi(0,"td",7),lT(1,Kt,1,5,"ng-container",8)(2,Qt,1,1)(3,Ut,1,1)(4,ne,4,1),Wl()),n&2){let t=c.$implicit;aC();let e=zC(0),i=aC();Kg("sticky",t.sticky==="start")("sticky-end",t.sticky==="end"),vg("id",t.id+"-"+e),yg("aria-labelledby",t.id+" "+t.id+"-"+e)("role",t.rowHeader?"rowheader":i.grid()?"gridcell":"cell"),bE(),uT(t.cellTemplate?1:t.cell?2:t.format?3:4);}}function oe(n,c){if(n&1&&(dm(0),Zi(1,"tr",3),pT(2,se,5,8,"td",6,Nt),Wl()),n&2){let t=c.$index,e=aC();GC(t),bE(2),hT(e.columns());}}var Et=(()=>{class n{#e;#t;#i;#n;#o;#s;#a;#c;#l;#r;constructor(){this.#e=T(eo),this.#t=T(DD),this.#i=T(ot),this.#n=T(N),this.#o=T(ve),this.#s=Ge(null),this.resizable=E1(true),this.minWidth=E1(50),this.maxWidth=E1(null),this.resizingClass=Ge(false),this.#l=false,this.#r=null,Qa(()=>{if(this.#s())return;let t=this.#e.nativeElement;if(this.resizable()){let e=[],i="table.column-resize-decrease",o=this.#n.getShortcut(i);o&&e.push(this.#n.getDisplayShortcut(i)||o);let s="table.column-resize-increase",r=this.#n.getShortcut(s);r&&e.push(this.#n.getDisplayShortcut(s)||r),e.length>0?this.#t.setAttribute(t,"aria-keyshortcuts",e.join(", ")):this.#t.removeAttribute(t,"aria-keyshortcuts");}else this.#t.removeAttribute(t,"aria-keyshortcuts");});}ngOnInit(){if(!this.#i){console.error("shTableResize directive must be used within a sh-table component.");return}let t=this.#e.nativeElement;if(this.#s.set(this.#o.get(Mt,null,{optional:true,self:true})),this.resizable()){let e=this.#t.createElement("div");this.#t.addClass(e,"sh-resizer"),this.#t.appendChild(t,e),this.#t.listen(e,"mousedown",this.#h.bind(this)),t.hasAttribute("role")||this.#t.setAttribute(t,"role","columnheader"),!this.#s()&&!t.hasAttribute("tabindex")&&this.#t.setAttribute(t,"tabindex","0");}}onKeyDown(t){if(!this.resizable())return;let e=t.target,i=this.#e.nativeElement;if(e!==i&&(e.tagName==="BUTTON"||e.tagName==="INPUT"||e.tagName==="SELECT"||e.tagName==="TEXTAREA"||e.closest("button, input, select, textarea, a")!==null||e.closest('[role="button"], [role="checkbox"], [role="menuitem"]')!==null))return;if((t.key==="ArrowLeft"||t.key==="ArrowRight")&&!t.shiftKey&&!this.#s()){let r=i.parentElement;if(r){let a=Array.from(r.querySelectorAll("th")).filter(h=>h.getAttribute("tabindex")==="0"||h.hasAttribute("shSort")||h.hasAttribute("shResize")),l=a.indexOf(i);if(l!==-1){let h=t.key==="ArrowRight"?l+1:l-1;if(h>=0&&h<a.length){t.preventDefault(),a[h].focus();return}}}}let o=this.#n.matches(t,"table.column-resize-decrease"),s=this.#n.matches(t,"table.column-resize-increase");if(o||s){t.preventDefault(),t.stopPropagation();let r=this.#e.nativeElement.offsetWidth,a=10,l=o?r-a:r+a,h=Math.max(this.minWidth(),this.maxWidth()?Math.min(l,this.maxWidth()??l):l);this.#t.setAttribute(this.#e.nativeElement,"size",`${h}px`),this.#i.updateColumnSizes();}}onMouseMove(t){this.#l&&this.#d(t);}onMouseUp(t){this.#l&&(this.#l=false,this.resizingClass.set(false),this.#r!==null&&(cancelAnimationFrame(this.#r),this.#r=null),setTimeout(()=>{this.#i.resizing.set(false);},50));}onClick(t){this.#l&&t.stopPropagation();}#h(t){t.stopPropagation(),this.resizable()&&(this.#i.resizing.set(true),this.#l=true,this.resizingClass.set(true),this.#a=t.pageX,this.#c=this.#e.nativeElement.offsetWidth);}#d(t){this.#r!==null&&cancelAnimationFrame(this.#r),this.#r=requestAnimationFrame(()=>{this.#b(t),this.#r=null;});}#b(t){let e=this.#c+(t.pageX-this.#a),i=Math.max(this.minWidth(),this.maxWidth()?Math.min(e,this.maxWidth()??e):e);this.#t.setAttribute(this.#e.nativeElement,"size",`${i}px`),this.#i.updateColumnSizes();}ngOnDestroy(){this.#r!==null&&cancelAnimationFrame(this.#r);}static{this.\u0275fac=function(e){return new(e||n)};}static{this.\u0275dir=Ew({type:n,selectors:[["","shResize",""]],hostVars:2,hostBindings:function(e,i){e&1&&Hg("keydown",function(s){return i.onKeyDown(s)})("mousemove",function(s){return i.onMouseMove(s)},BI)("mouseup",function(s){return i.onMouseUp(s)},BI)("click",function(s){return i.onClick(s)},BI),e&2&&Kg("resizing",i.resizingClass());},inputs:{resizable:[1,"resizable"],minWidth:[1,"minWidth"],maxWidth:[1,"maxWidth"]}});}}return n})(),Mt=(()=>{class n{constructor(){this.#e=T(ot),this.#t=T(N),this.#i=T(ve),this.#n=T(eo),this.#o=Ge(null),this.shSort=E1(),this.tabIndex=Nt$1(()=>{let t=this.#o();return this.shSort()||t&&t.resizable()?"0":null}),this.ariaKeyshortcuts=Nt$1(()=>{let t=[],e=this.#o();if(this.shSort()){let i="table.sort",o=this.#t.getShortcut(i);o&&t.push(this.#t.getDisplayShortcut(i)||o);}if(e&&e.resizable()){let i="table.column-resize-decrease",o=this.#t.getShortcut(i);o&&t.push(this.#t.getDisplayShortcut(i)||o);let s="table.column-resize-increase",r=this.#t.getShortcut(s);r&&t.push(this.#t.getDisplayShortcut(s)||r);}return t.length>0?t.join(", "):null}),this.sortAsc=Nt$1(()=>{let t=this.#e.sortByColumn(),e=this.shSort();return !t||!e?false:t===e}),this.sortDesc=Nt$1(()=>{let t=this.#e.sortByColumn(),e=this.shSort();return !t||!e?false:t===`-${e}`}),this.ariaSort=Nt$1(()=>this.sortAsc()?"ascending":this.sortDesc()?"descending":"none");}#e;#t;#i;#n;#o;ngOnInit(){this.#o.set(this.#i.get(Et,null,{optional:true,self:true}));}onKeyDown(t){if(!this.shSort())return;let e=t.target,i=this.#n.nativeElement;if(!(e!==i&&(e.tagName==="BUTTON"||e.tagName==="INPUT"||e.tagName==="SELECT"||e.tagName==="TEXTAREA"||e.closest("button, input, select, textarea, a")!==null||e.closest('[role="button"], [role="checkbox"], [role="menuitem"]')!==null))){if((t.key==="ArrowLeft"||t.key==="ArrowRight")&&!t.shiftKey){let o=i.parentElement;if(o){let s=Array.from(o.querySelectorAll("th")).filter(a=>a.getAttribute("tabindex")==="0"||a.hasAttribute("shSort")||a.hasAttribute("shResize")),r=s.indexOf(i);if(r!==-1){let a=t.key==="ArrowRight"?r+1:r-1;if(a>=0&&a<s.length){t.preventDefault(),s[a].focus();return}}}}this.#t.matches(t,"table.sort")&&this.toggleSort(t);}}toggleSort(t){if(t){let i=t.target,o=this.#n.nativeElement;if(i!==o&&(i.tagName==="BUTTON"||i.tagName==="INPUT"||i.tagName==="SELECT"||i.tagName==="TEXTAREA"||i.closest("button, input, select, textarea, a")!==null||i.closest('[role="button"], [role="checkbox"], [role="menuitem"]')!==null))return;t.preventDefault();}if(this.#e.resizing())return;let e=this.shSort();e&&this.#e.toggleSort(e);}static{this.\u0275fac=function(e){return new(e||n)};}static{this.\u0275dir=Ew({type:n,selectors:[["","shSort",""]],hostAttrs:["role","columnheader"],hostVars:9,hostBindings:function(e,i){e&1&&Hg("click",function(s){return i.shSort()?i.toggleSort(s):null})("keydown",function(s){return i.onKeyDown(s)}),e&2&&(yg("tabindex",i.tabIndex())("aria-sort",i.shSort()?i.ariaSort():null)("aria-keyshortcuts",i.ariaKeyshortcuts()),Kg("sortable",!!i.shSort())("sort-asc",i.sortAsc())("sort-desc",i.sortDesc()));},inputs:{shSort:[1,"shSort"]}});}}return n})();(()=>{class n{constructor(){this.#e=T(eo),this.#t=T(DD),this.shStickyColumns=E1("start");}#e;#t;ngAfterContentInit(){this.#i();}#i(){let t=this.#e.nativeElement,i=t.querySelectorAll(":scope > th, :scope > td").length;if(i>0){let o=this.shStickyColumns();this.#t.setStyle(t,"grid-column",o==="end"?`-${i+1} / -1`:`1 / ${i+1}`);}}static{this.\u0275fac=function(e){return new(e||n)};}static{this.\u0275dir=Ew({type:n,selectors:[["","shStickyColumns",""]],hostVars:4,hostBindings:function(e,i){e&2&&Kg("sticky",i.shStickyColumns()==="start"||i.shStickyColumns()==="")("sticky-end",i.shStickyColumns()==="end");},inputs:{shStickyColumns:[1,"shStickyColumns"]}});}}return n})();var F=1.5,ot=(()=>{class n{constructor(){this.#e=T(eo),this.#t=T(DD),this.#i=T(N),this.grid=E1(false),this.role=Nt$1(()=>this.grid()?"grid":"table"),this.loading=E1(false),this.data=E1([]),this.dataChange=I1(),this.sortByColumn=D1(null),this.color=E1(null),this.variant=E1(null),this.ariaLabel=E1(null,{alias:"aria-label"}),this.ariaLabelledby=E1(null,{alias:"aria-labelledby"}),this.hostClasses=ce("table",{color:this.color,variant:this.variant}),this.content=C1(At),this.theadLocal=w1("theadLocal"),this.tbodyLocal=w1("tbodyLocal"),this.thead=Nt$1(()=>this.content()?.thead()||this.theadLocal()),this.tbody=Nt$1(()=>this.content()?.tbody()||this.tbodyLocal()),this.columns=oe$1(this.thead,["tr:first-child th"]),this.stickyHeaderHeight=Ge(0),this.theadEffect=Qa(t=>{let e=this.thead()?.nativeElement;if(e&&typeof ResizeObserver<"u"){let i=new ResizeObserver(o=>{let s=e.clientHeight;this.stickyHeaderHeight.set(s);});i.observe(e),t(()=>i.disconnect());}}),this.bodyEffect=Qa(()=>{let t=this.tbody()?.nativeElement,e=this.thead()?.nativeElement;if(!t||!e)return;let i=this.stickyHeaderHeight();queueMicrotask(()=>{let o=e.querySelectorAll("tr.sticky").length>0,s=t.querySelectorAll("tr.sticky");if(s.length>0&&o)for(let a=0;a<s.length;a++)s[a].style.top=`${i}px`;});}),this.gridSetupEffect=Qa(()=>{let t=this.grid();this.data();this.columns.signal();me(()=>{let o=this.#e.nativeElement,s=o.querySelectorAll("th, td");if(t){if(s.length===0)return;let r=false;s.forEach(l=>{l.getAttribute("tabindex")==="0"&&(r=true);}),r||this.#t.setAttribute(s[0],"tabindex","0"),s.forEach(l=>{l.getAttribute("tabindex")!=="0"&&this.#t.setAttribute(l,"tabindex","-1"),l.hasAttribute("role")||this.#t.setAttribute(l,"role",l.tagName==="TD"?"gridcell":"columnheader");}),o.querySelectorAll("tr").forEach(l=>{l.hasAttribute("role")||this.#t.setAttribute(l,"role","row");});}else s.forEach(r=>{r.tagName==="TH"?r.classList.contains("sortable")||r.querySelector(".sh-resizer")!==null||r.hasAttribute("aria-keyshortcuts")?this.#t.setAttribute(r,"tabindex","0"):this.#t.removeAttribute(r,"tabindex"):this.#t.removeAttribute(r,"tabindex");});});}),this.resizing=Ge(false),this.sizeTrigger=Ge(true),this.#n=null,this.#o=Ge(false),this.scrollXState=Ge(-1),this.scrollYState=Ge(-1),this.canScrollX=Ge(false),this.canScrollY=Ge(false),this.columnSizes=Nt$1(()=>{this.sizeTrigger();let t=this.columns.signal();return t.reduce((e,i,o)=>{let s=i,r=s.getAttribute("size"),a=o===t.length-1;return r?`${e} ${r}`:s.classList.contains("sticky")||s.classList.contains("sticky-end")?`${e} min-content`:a?`${e} 1fr`:`${e} 1fr`},"")}),this.e=Qa(()=>{let t=this.sortByColumn();if(t===null)return this.#o()||(this.#n=this.data(),this.#o.set(true)),this.dataChange.emit(structuredClone(this.#n));let e=t.startsWith("-")?t.slice(1):t,i=t.startsWith("-"),o=this.data(),s=[...o].sort((a,l)=>{let h=this.content()?.columns()?.find(y=>y.id===e);if(h?.sortPredicate){let y=h.sortPredicate(a,l);return i?-y:y}let f=h?this.content()?.getValue(a,h):a[e],b=h?this.content()?.getValue(l,h):l[e],M=f==null,D=b==null;if(M&&D)return 0;if(M)return 1;if(D)return -1;let _=0;if(h?.type==="date"){let y=new Date(f).getTime(),u=new Date(b).getTime();_=isNaN(y)||isNaN(u)?0:y-u;}else h?.type==="number"?_=Number(f)-Number(b):h?.type==="boolean"?_=(f?1:0)-(b?1:0):h?.type==="string"||h?.type==="badge"?_=f.toString().localeCompare(b.toString(),void 0,{sensitivity:"base"}):typeof f=="number"&&typeof b=="number"?_=f-b:f instanceof Date&&b instanceof Date?_=f.getTime()-b.getTime():typeof f=="string"&&typeof b=="string"&&(_=f.localeCompare(b,void 0,{sensitivity:"base"}));return i?-_:_}),r=s.length!==o.length;if(!r){for(let a=0;a<s.length;a++)if(s[a]!==o[a]){r=true;break}}r&&this.dataChange.emit(s);});}#e;#t;#i;#n;#o;updateColumnSizes(){this.sizeTrigger.set(!this.sizeTrigger());}onScroll(){this.#a();}onResize(t){this.#a();}ngAfterViewInit(){queueMicrotask(()=>this.#a());}onFocusIn(t){if(!this.grid())return;let e=t.target;if(!e)return;let i=e.tagName==="TH"||e.tagName==="TD"?e:e.closest("th, td");if(i){i.hasAttribute("role")||this.#t.setAttribute(i,"role",i.tagName==="TD"?"gridcell":"columnheader");let o=i.parentElement;o&&!o.hasAttribute("role")&&this.#t.setAttribute(o,"role","row"),this.#t.setAttribute(i,"tabindex","0"),this.#e.nativeElement.querySelectorAll("th, td").forEach(r=>{r!==i&&this.#t.setAttribute(r,"tabindex","-1");});}}onGridKeyDown(t){if(!this.grid())return;if(t.key==="Tab"){let u=t.target,k=u.tagName==="TH"||u.tagName==="TD"?u:u.closest("th, td");if(!k)return;let I='button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])',H=Array.from(k.querySelectorAll(I)),Z=k.parentElement;if(!Z||Z.tagName!=="TR")return;let R=Array.from(Z.querySelectorAll("th, td")),N=R.indexOf(k);if(N===-1)return;if(t.shiftKey){let J=H.length>0&&u===H[0],O=u===k;if(J)t.preventDefault(),this.#s(k);else if(O&&N>0){t.preventDefault();let tt=R[N-1],et=Array.from(tt.querySelectorAll(I));et.length>0?(this.#s(tt),et[et.length-1].focus()):this.#s(tt);}}else {let J=H.length===0||u===H[H.length-1],O=u===k;J&&!O?N<R.length-1&&(t.preventDefault(),this.#s(R[N+1])):O&&H.length===0&&N<R.length-1&&(t.preventDefault(),this.#s(R[N+1]));}return}let e=this.#i.matches(t,"grid.focus-up"),i=this.#i.matches(t,"grid.focus-down"),o=this.#i.matches(t,"grid.focus-left"),s=this.#i.matches(t,"grid.focus-right"),r=this.#i.matches(t,"grid.focus-first"),a=this.#i.matches(t,"grid.focus-last");if(!e&&!i&&!o&&!s&&!r&&!a)return;let l=t.target;if(l.tagName!=="TH"&&l.tagName!=="TD")return;let h=l.parentElement;if(!h||h.tagName!=="TR")return;let f=Array.from(this.#e.nativeElement.querySelectorAll("tr")),b=f.indexOf(h);if(b===-1)return;let M=Array.from(h.querySelectorAll("th, td")),D=M.indexOf(l);if(D===-1)return;let _=b,y=D;if(e?_=b-1:i?_=b+1:o?y=D-1:s?y=D+1:r?y=0:a&&(y=M.length-1),_!==b){let u=f[_];if(u){let k=Array.from(u.querySelectorAll("th, td")),I=k[Math.min(D,k.length-1)];I&&(t.preventDefault(),this.#s(I));}}else if(y!==D){let u=M[y];u&&(t.preventDefault(),this.#s(u));}}#s(t){this.#t.setAttribute(t,"tabindex","0"),t.focus(),this.#e.nativeElement.querySelectorAll("th, td").forEach(i=>{i!==t&&this.#t.setAttribute(i,"tabindex","-1");});}toggleSort(t){let e=this.sortByColumn(),i=e===t?`-${t}`:e===`-${t}`?null:t;this.sortByColumn.set(i);}#a(){let t=this.#e.nativeElement,e=-1,i=-1,o=t.scrollWidth>t.clientWidth+F;if(o){let r=t.scrollLeft<=F;t.scrollWidth-(t.scrollLeft+t.clientWidth)<F?e=1:r||(e=0);}this.scrollXState.set(e),this.canScrollX.set(o);let s=t.scrollHeight>t.clientHeight+F;if(s){let r=t.scrollTop<=F;t.scrollHeight-(t.scrollTop+t.clientHeight)<F?i=1:r||(i=0);}this.scrollYState.set(i),this.canScrollY.set(s);}static{this.\u0275fac=function(e){return new(e||n)};}static{this.\u0275cmp=gw({type:n,selectors:[["sh-table"]],contentQueries:function(e,i,o){e&1&&Wg(o,i.content,At,5),e&2&&hC();},viewQuery:function(e,i){e&1&&qg(i.theadLocal,Ht,5)(i.tbodyLocal,Rt,5),e&2&&hC(2);},hostVars:22,hostBindings:function(e,i){e&1&&Hg("scroll",function(){return i.onScroll()})("resize",function(s){return i.onResize(s)},HI)("focusin",function(s){return i.onFocusIn(s)})("keydown",function(s){return i.onGridKeyDown(s)}),e&2&&(yg("role",i.role())("aria-busy",i.loading())("aria-label",i.ariaLabel())("aria-labelledby",i.ariaLabelledby()),xC(i.hostClasses()),Yg("grid-template-columns",i.columnSizes()),Kg("resizing",i.resizing())("can-scroll-x",i.canScrollX())("can-scroll-y",i.canScrollY())("scrolled-x",i.scrollXState()>=0)("scrolled-x-end",i.scrollXState()===1)("scrolled-y",i.scrollYState()>=0)("scrolled-y-end",i.scrollYState()===1));},inputs:{grid:[1,"grid"],loading:[1,"loading"],data:[1,"data"],sortByColumn:[1,"sortByColumn"],color:[1,"color"],variant:[1,"variant"],ariaLabel:[1,"aria-label","ariaLabel"],ariaLabelledby:[1,"aria-labelledby","ariaLabelledby"]},outputs:{dataChange:"dataChange",sortByColumn:"sortByColumnChange"},ngContentSelectors:Bt,decls:8,vars:3,consts:[["theadLocal",""],["tbodyLocal",""],[1,"actionbar"],[1,"actionbar-right"],[1,"indeterminate","primary"],[1,"no-rows"],["role","rowgroup"]],template:function(e,i){e&1&&(lC(Lt),Zi(0,"div",2),uC(1),Zi(2,"div",3),uC(3,1),Wl()(),lT(4,Ft,1,0,"sh-progress-bar",4),uC(5,2),lT(6,It,7,0),lT(7,Wt,2,0,"div",5)),e&2&&(bE(4),uT(i.loading()?4:-1),bE(2),uT(i.content()?-1:6),bE(),uT(i.loading()?-1:7));},dependencies:[d],styles:[`sh-table{--table-bc: var(--base-4);--table-th-bg: var(--base-2);--table-tr-bg: var(--base-1);--table-td-bg: var(--base-1);--table-th-c: var(--base-8);--table-th-f: var(--paragraph-30);--table-td-c: var(--base-8);--table-td-f: var(--paragraph-30);--table-th-p: 0 1.25rem;--table-td-p: 0 1.25rem;--table-th-mh: 3rem;--table-td-mh: 4.875rem;--table-th-g: .25rem;--table-td-g: .5rem;--table-ws: nowrap;--table-th-bw: 0;--table-td-bw: .0625rem 0 0;--table-columns: 1fr 1fr 1fr max-content;--table-sticky-bw: .0625rem}sh-table.type-a tbody>th,sh-table.type-a tbody>td,sh-table.type-a thead>th,sh-table.type-a thead>td{padding-right:0}sh-table.type-a tbody>th:first-child,sh-table.type-a tbody>td:first-child,sh-table.type-a thead>th:first-child,sh-table.type-a thead>td:first-child{padding:0}sh-table.type-b{--table-th-p: 0 .75rem;--table-td-p: 0 .75rem;--table-th-mh: 2.25rem;--table-td-mh: 3.5rem;--table-th-bw: .0625rem 0 .0625rem .0625rem;--table-td-bw: 0 0 .0625rem .0625rem;--table-sticky-bw: .0625rem}sh-table.type-b th:first-child{border-left-width:0;padding:var(--table-th-p)}sh-table.type-b td:first-child{border-left-width:0;padding:var(--table-td-p)}sh-table.type-b td.sticky,sh-table.type-b th.sticky{border-left-width:0;border-right:var(--table-sticky-bw) solid var(--table-bc)}sh-table.type-b [shStickyColumns] th,sh-table.type-b [shStickyColumns] td{border-right:var(--table-sticky-bw) solid var(--table-bc)}sh-table.type-b th.sticky-end,sh-table.type-b td.sticky-end,sh-table.type-b [shStickyColumns=end] th,sh-table.type-b [shStickyColumns=end] td{border-left:var(--table-sticky-bw) solid var(--table-bc);border-right:0}sh-table.type-b .sticky+th,sh-table.type-b .sticky+td,sh-table.type-b [shStickyColumns]+th,sh-table.type-b [shStickyColumns]+td{border-left-width:0}sh-table.type-b tr:hover td{background-color:var(--base-2)}sh-table.type-b div[table-header] tr:first-child th{border-bottom:0}sh-table.type-b tbody tr:last-child td{border-bottom-width:0}sh-table.type-b .actionbar{background-color:var(--base-2);border-width:.0625rem 0 0}sh-table{width:100%;display:grid;overflow:auto;overscroll-behavior-x:none;grid-template-columns:var(--table-columns);position:relative;container-type:inline-size}sh-table.resizing{-webkit-user-select:none;user-select:none}sh-table:has([shTableResize]) td{overflow:auto}sh-table.no-resize .sh-resizer{display:none}sh-table.no-resize td{overflow:initial}sh-table .actionbar{display:flex;align-items:center;gap:.5rem;grid-column:1/-1;position:sticky;left:0;z-index:10;background-color:var(--base-1);width:100cqw;box-sizing:border-box;padding:.5rem;border:var(--border-10);border-width:.0625rem 0;opacity:1;transition:padding .3s ease-out,border-width .3s ease-out,opacity .3s ease-out;overflow:hidden}sh-table .actionbar:empty,sh-table .actionbar:not(:has(>:not(.actionbar-right))):has(>.actionbar-right:empty){display:none}sh-table .actionbar>*{min-height:0}sh-table .actionbar .actionbar-right{display:flex;align-items:center;gap:.5rem;margin-left:auto;flex-shrink:0}sh-table .actionbar .actionbar-right:empty{display:none}sh-table tbody{position:relative}sh-table tbody:has(tr.sticky){position:sticky;top:0;z-index:1}sh-table thead{position:relative}sh-table thead:has(tr.sticky){position:sticky;top:0;z-index:2}sh-table sh-progress-bar{grid-column:1/-1;position:absolute;top:100%;transform:translateY(-50%);z-index:200}sh-table tbody,sh-table thead,sh-table tr{display:grid;grid-column:1/-1;grid-template-columns:subgrid}sh-table tr{background:var(--table-tr-bg);position:relative;z-index:0}sh-table tr.sticky{position:sticky;top:0;z-index:1}sh-table tr.sticky-end{position:sticky;bottom:0;z-index:3}sh-table tr:has(th.sticky-end) th:nth-last-child(2){padding:var(--table-th-p)}sh-table tr:has(td.sticky-end) td:nth-last-child(2){padding:var(--table-td-p)}sh-table th{display:flex;align-items:center;padding:var(--table-th-p);min-height:var(--table-th-mh);font:var(--table-th-f);line-height:1em;white-space:var(--table-ws);color:var(--table-th-c);border:0;border-color:var(--table-bc);border-style:solid;border-width:var(--table-th-bw);background:var(--table-th-bg);gap:var(--table-th-g);z-index:auto}sh-table th:focus-visible{outline:.125rem solid var(--primary-8);outline-offset:-.125rem}sh-table th:hover,sh-table th.resizing{z-index:10}sh-table th:has(.sh-resizer){position:relative;z-index:2}sh-table th.sortable{--caret-color: var(--base-10);--caret-size: .375rem;cursor:pointer;-webkit-user-select:none;user-select:none}sh-table th.sortable sh-icon{opacity:.35;transition:opacity 125ms ease-in-out}sh-table th.sortable:hover sh-icon{opacity:.7}sh-table th.sortable.sort-asc sh-icon,sh-table th.sortable.sort-desc sh-icon{opacity:1}sh-table th.sortable:not(:has(sh-icon)):after{content:"";border:var(--caret-size) solid transparent;width:0;height:0;opacity:0;transition:opacity 125ms ease-in-out}sh-table th.sortable:not(:has(sh-icon)).sort-desc:after{opacity:1;transform:translateY(-4px);border-bottom-color:var(--caret-color)}sh-table th.sortable:not(:has(sh-icon)).sort-asc:after{opacity:1;transform:translateY(4px);border-top-color:var(--caret-color)}sh-table th .sh-resizer{width:.75rem;height:100%;position:absolute;top:0;right:-.375rem;cursor:col-resize;z-index:5}sh-table th .sh-resizer:after{content:"";position:absolute;top:.3125rem;bottom:.3125rem;border-radius:.125rem;left:50%;transform:translate(-50%);width:.1875rem;background-color:var(--base-4);transition:width .15s ease,background-color .15s ease}sh-table th .sh-resizer:hover:after{width:.3125rem;background-color:var(--primary-8)}@media(pointer:coarse){sh-table th .sh-resizer{width:1.5rem;right:-.75rem}}sh-table th.resizing .sh-resizer:after{width:.3125rem;background-color:var(--primary-8)}sh-table td{display:flex;align-items:center;padding:var(--table-td-p);min-height:var(--table-td-mh);gap:var(--table-td-g);color:var(--table-td-c);font:var(--table-td-f);white-space:var(--table-ws);border-color:var(--table-bc);border-style:solid;border-width:var(--table-td-bw);background:var(--table-td-bg)}sh-table td+td.sticky-end:last-child{padding:var(--table-td-p)}sh-table th.sticky,sh-table th.sticky-end,sh-table td.sticky,sh-table td.sticky-end{position:sticky;overflow:hidden;right:auto;left:0;z-index:1;padding:var(--table-td-p)}sh-table th.sticky:first-child,sh-table th.sticky-end:first-child,sh-table td.sticky:first-child,sh-table td.sticky-end:first-child{padding:var(--table-th-p)}sh-table th.sticky-end,sh-table td.sticky-end{right:0;left:auto}sh-table th.sticky,sh-table th.sticky-end{background:var(--base-1);padding:var(--table-th-p);z-index:101}sh-table th.sticky:first-child,sh-table th.sticky-end:first-child{padding:var(--table-th-p)}sh-table [shStickyColumns]{display:grid;grid-template-columns:subgrid;position:sticky;left:0;z-index:1000;border:0;border-color:var(--table-bc);border-style:solid}sh-table [shStickyColumns] th{background-color:var(--base-1)}sh-table [shStickyColumns=end]{left:auto;right:0}sh-table .span-all{grid-column:1/-1;white-space:initial;align-items:flex-start;padding:0;border-left-width:0;position:sticky;left:0;width:100cqw;box-sizing:border-box}sh-table .no-rows{display:none;grid-column:1/-1}sh-table tbody:empty+.no-rows{display:block}
|
|
2
|
+
`],encapsulation:2});}}return n})(),At=(()=>{class n{constructor(){this.#e=T(ot),this.columns=E1([]),this.data=E1([]),this.sortByColumn=this.#e.sortByColumn,this.grid=this.#e.grid,this.thead=w1("thead"),this.tbody=w1("tbody");}#e;getValue(t,e){if(!t)return "";let i=e.accessorKey||e.id;return typeof i=="string"&&i.includes(".")?i.split(".").reduce((o,s)=>o?.[s],t):t[i]}formatDate(t){if(!t)return "";let e=new Date(t);return isNaN(e.getTime())?String(t):e.toLocaleDateString()}static{this.\u0275fac=function(e){return new(e||n)};}static{this.\u0275cmp=gw({type:n,selectors:[["sh-table-content"]],viewQuery:function(e,i){e&1&&qg(i.thead,$t,5)(i.tbody,qt,5),e&2&&hC(2);},hostAttrs:[2,"display","contents"],inputs:{columns:[1,"columns"],data:[1,"data"]},decls:9,vars:0,consts:[["thead",""],["tbody",""],["role","rowgroup"],["role","row"],["role","columnheader","shResize","",3,"id","shSort","resizable","minWidth","maxWidth","sticky","sticky-end"],["role","columnheader","shResize","",3,"id","shSort","resizable","minWidth","maxWidth"],[3,"sticky","sticky-end","id"],[3,"id"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"text-success"],[1,"text-muted"]],template:function(e,i){e&1&&(Zi(0,"thead",2,0)(2,"tr",3),pT(3,jt,3,13,"th",4,Nt),Wl()(),Zi(5,"tbody",2,1),pT(7,oe,4,1,"tr",3,dT),Wl()),e&2&&(bE(3),hT(i.columns()),bE(4),hT(i.data()));},dependencies:[ei,Mt,Et,N$1,D],encapsulation:2});}}return n})();export{Et as ShipResize,Mt as ShipSort,ot as ShipTable,At as ShipTableContent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {z}from'./chunk-C1-31fA7.js';import {m as m$4}from'./chunk-C185qUb-.js';import {m as m$1,N as Nt$1}from'./chunk-C1py21yb.js';import {E as E1,T,aY as D,a5 as m,N as Nt,G as Ge$1,Q as Qa,g as gw,a as N,v,b3 as m$2,aL as ci,l as lT,c as uT,aF as JC,aJ as m$3,K as Kg,Z as Zi,W as Wl,h as aC,b as bE,H as HC,d as Ig,aa as Yl,z as vg,F as Fg,aO as sb,j as jg,av as Vg,aT as cb,aP as lb,aw as iC,o as oC,ah as Yg,b4 as cg,b_ as gC,i as ET,w as Hg,P as Pd,L as Ld,J as im,c0 as db,ab as J,a6 as be$1,bk as B,I,f,ad as sy,aR as zl,aS as Ql,s as sC,ac as I1,C as Zu,n as lm,p as qC,t as bD,y as cm,M as MD,_ as _t,a3 as XC}from'./main-2ZYVV4C4.js';import {d}from'./chunk-BGuvkLC9.js';import {a as at}from'./chunk-DneBfCBh.js';import {v as ve$1}from'./chunk-DuRr4rDS.js';import {F as Fe}from'./chunk-DBkkb6OR.js';import {B as Bn,Z as Ze$1,e as en,R as Rn,J as Jt}from'./chunk-iGzJokt-.js';import {v as v$1}from'./chunk-Bq_vr6Q3.js';import {R}from'./chunk-D9jPw9Ov.js';function Y(t,n){if(t&1&&HC(0),t&2){let e=aC(3);Yl(" ",e.statusData().actionText," - ");}}function Z$1(t,n){t&1&&(Zi(0,"sh-icon"),HC(1,"check"),Wl());}function ee$1(t,n){t&1&&(Zi(0,"sh-icon"),HC(1,"copy"),Wl());}function te$1(t,n){if(t&1){let e=ET();Zi(0,"div",9)(1,"button",10),Hg("click",function(u){Pd(e);let F=aC(4);return Ld(F.copyToClipboard(u,F.tooltipText()))}),lT(2,Z$1,2,0,"sh-icon")(3,ee$1,2,0,"sh-icon"),HC(4," Copy "),Wl(),Zi(5,"p",11),HC(6),Wl()();}if(t&2){let e=aC(4);bE(),vg("color",e.copied()?"success":null),bE(),uT(e.copied()===true?2:3),bE(4),im(e.tooltipText());}}function ne(t,n){if(t&1&&(Zi(0,"div",8),HC(1),Wl(),cg(2,te$1,7,3,"ng-template",null,0,db)),t&2){let e=gC(3),s=aC(3);vg("shTooltip",e),bE(),Yl(" ",s.statusData().fileStatusText," ");}}function ie(t,n){if(t&1&&(Zi(0,"div"),lT(1,Y,1,1),HC(2),Wl(),lT(3,ne,4,2),Ig(4,"sh-progress-bar",7)),t&2){let e=aC(2);bE(),uT(e.backupId()===null?1:-1),bE(),Yl(" ",e.statusData().statusText," "),bE(),uT(e.statusData()?.BackendFileSize?3:-1),bE(),vg("value",e.statusData().progress*100);}}function oe(t,n){if(t&1&&(Zi(0,"div",5),Fg(1,1),Ig(2,"sh-icon"),sb(3,"relativeTime"),sb(4,"date"),jg(),Wl()),t&2){let e=aC(2);bE(4),Vg(e.nextBackup().backup?.Backup?.Name)(cb(3,3,e.nextBackup().time))(lb(4,5,e.nextBackup().time,"shortTime")),iC(1);}}function ae(t,n){t&1&&(Zi(0,"div",5),oC(1,2),Wl());}function se(t,n){t&1&&(Zi(0,"div",6),Fg(1,3),Ig(2,"sh-spinner"),jg(),Wl()),t&2&&(bE(2),Yg("--spinner-size","12px")("--spinner-thickness","2px"));}function re(t,n){if(t&1&&(Zi(0,"div",4),lT(1,ie,5,4)(2,oe,5,8,"div",5)(3,ae,2,0,"div",5)(4,se,3,4,"div",6),Wl()),t&2){let e=aC();bE(),uT(e.isActive()?1:!e.backupId()&&(e.nextBackup().backup||e.nextBackup().time)?2:!e.backupId()&&!e.serverState()?.ActiveTask?3:e.backupId()?-1:4);}}var W=class t{backupId=E1(null);#e=T(D);#t=T(m);statusData=this.#e.statusData;serverState=this.#e.serverState;isActive=Nt(()=>this.#e.runningBackupId()!==null);isTargetRunningTask=Nt(()=>{let n=this.backupId();return n?String(this.#e.runningBackupId())===String(n):true});isVisible=Nt(()=>this.backupId()?this.isActive()?this.isTargetRunningTask():false:true);nextBackup=Nt(()=>{this.#t.backups();return {backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}});tooltipText=Nt(()=>{let n=this.statusData();return n?.CurrentFilename?`${n.CurrentFilename}`:""});copied=Ge$1(false);copiedTimeout;copyToClipboard(n,e){n.stopPropagation(),navigator.clipboard.writeText(e),this.copied.set(true),this.copiedTimeout=setTimeout(()=>{this.copied.set(false);},2e3);}tooltipTrigger=Ge$1(true);tooltipTriggerEffect=Qa(()=>{this.tooltipText(),this.tooltipTrigger.update(n=>!n),this.copiedTimeout&&(clearTimeout(this.copiedTimeout),this.copiedTimeout=void 0,this.copied.set(false));});static \u0275fac=function(e){return new(e||t)};static \u0275cmp=gw({type:t,selectors:[["app-backup-progress"]],hostVars:2,hostBindings:function(e,s){e&2&&Kg("is-visible",s.isVisible());},inputs:{backupId:[1,"backupId"]},features:[JC([m$3])],decls:1,vars:1,consts:()=>{let n;n=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: - ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:clock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD1\uFFFD"}:INTERPOLATION_1: at ${"\uFFFD2\uFFFD"}:INTERPOLATION_2: `;let e;e=$localize`No scheduled tasks`;let s;return s=$localize` Loading ${"\uFFFD#2\uFFFD"}:START_TAG_SH_SPINNER:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_SPINNER:`,[["fileStatusTooltip",""],n,e,s,[1,"progress-section"],[1,"label"],[1,"label","label-loading"],[1,"raised","primary",3,"value"],[1,"file-status-text",3,"shTooltip"],[1,"tooltip-status-content"],["shButton","","size","small",3,"click","color"],[1,"tooltip-file-status-text"]]},template:function(e,s){e&1&&lT(0,re,5,1,"div",4),e&2&&uT(s.isVisible()?0:-1);},dependencies:[N,v,m$1,d,at,m$2,ci],styles:["[_nghost-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;gap:.5rem}[_nghost-%COMP%]:not(.is-visible){display:none}.file-status-text[_ngcontent-%COMP%]{color:var(--base-8)}.file-status-text[_ngcontent-%COMP%]:empty{display:none}.tooltip-file-status-text[_ngcontent-%COMP%]{overflow-wrap:break-word;word-break:break-word;display:inline-block;margin-bottom:.25rem}.tooltip-status-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.progress-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:0;min-width:18.75rem;flex:1 0}.progress-section[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{margin-top:.25rem}app-status-bar[_nghost-%COMP%] sh-progress-bar[_ngcontent-%COMP%], app-status-bar [_nghost-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{position:absolute;bottom:0;left:0;right:0;width:100%;max-width:initial;margin-top:0}.label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.label-loading[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem}"]})};function ye(o,t){o&1&&(Zi(0,"sh-icon",2),HC(1,"x-bold"),Wl());}function be(o,t){o&1&&(Zi(0,"sh-icon",3),HC(1,"list-bold"),Wl());}function ve(o,t){if(o&1){let n=ET();Zi(0,"button",1),Hg("click",function(){Pd(n);let i=aC();return Ld(i.toggleNav())}),lT(1,ye,2,0,"sh-icon",2)(2,be,2,0,"sh-icon",3),Wl();}if(o&2){let n=aC();bE(),uT(n.isNavOpen()?1:2);}}var V=class o{#e=T(m$4);isNavOpen=this.#e.isNavOpen;isMobile=this.#e.isMobile;toggleNav(){this.#e.toggleNav();}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=gw({type:o,selectors:[["app-mobile-menu-toggle"]],decls:1,vars:1,consts:[["shButton","",1,"small","toggle-sidebar","ghost"],["shButton","",1,"small","toggle-sidebar","ghost",3,"click"],[1,"cross"],[1,"burger"]],template:function(n,e){n&1&&lT(0,ve,3,1,"button",0),n&2&&uT(e.isMobile()?0:-1);},dependencies:[v,N],styles:["[_nghost-%COMP%]{display:contents}.toggle-sidebar[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center}.toggle-sidebar[_ngcontent-%COMP%] .cross[_ngcontent-%COMP%], .toggle-sidebar[_ngcontent-%COMP%] .burger[_ngcontent-%COMP%]{opacity:1;transition:opacity 124ms linear;margin:0}.toggle-sidebar[_ngcontent-%COMP%] .cross.hidden[_ngcontent-%COMP%], .toggle-sidebar[_ngcontent-%COMP%] .burger.hidden[_ngcontent-%COMP%]{opacity:0}"]})};var Re=()=>["/connect/logon"];function Be(o,t){o&1&&(Fg(0,0,1),Ig(1,"div",9),jg());}function ke(o,t){o&1&&(Fg(0,0,2),Ig(1,"div",10),jg());}function Le(o,t){if(o&1){let n=ET();Zi(0,"div",8),Hg("click",function(){Pd(n);let i=aC();return Ld(i.resetAndRetry())}),Fg(1,0),lT(2,Be,2,0)(3,ke,2,0),jg(),Wl();}if(o&2){let n=aC();bE(2),uT(n.resetting()?2:3);}}function Ge(o,t){o&1&&(Zi(0,"div",6),Fg(1,1),Ig(2,"div",11),jg(),Wl()),o&2&&vg("routerLink",XC(1,Re));}function xe(o,t){o&1&&(Zi(0,"div",6),Fg(1,2),Ig(2,"div",10),jg(),Wl()),o&2&&vg("routerLink",XC(1,Re));}function $e(o,t){if(o&1){let n=ET();Zi(0,"div",7),Fg(1,3),Zi(2,"sh-icon",12),Hg("click",function(){Pd(n);let i=aC();return Ld(i.cancel())}),Wl(),Zi(3,"div",13),Hg("click",function(){Pd(n);let i=aC();return Ld(i.claim())}),Wl(),Ig(4,"div",14),jg(),Wl();}}function Ue(o,t){if(o&1){let n=ET();Zi(0,"div",8),Hg("click",function(){Pd(n);let i=aC();return Ld(i.openConsole())}),Fg(1,4),Ig(2,"div",15),jg(),Wl();}}var x=class o{#e=T(v$1);state=this.#e.state;resetting=Ge$1(false);stateEffect=Qa(()=>{let t=this.#e.state(),n=this.resetting();t==="registered"&&n&&(this.resetting.set(false),this.#e.beginRemoteRegistration());});ngOnInit(){this.#e.refreshRemoteControlStatus();}claim(){let t=this.#e.claimUrl();t&&window.open(t,"_blank");}cancel(){this.#e.cancelRemoteRegistration();}resetAndRetry(){this.resetting.set(true),this.#e.cancelRemoteRegistration();}openConsole(){this.#e.openConsole();}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=gw({type:o,selectors:[["app-remote-connectivity-status"]],decls:5,vars:1,consts:()=>{let t;t=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF: Resetting ${"\uFFFD#1:1\uFFFD"}:START_TAG_DIV:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_DIV:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE: Click to connect ${"\uFFFD#1:2\uFFFD"}:START_TAG_DIV_1:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_DIV:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,t=sC(t);let n;n=$localize` Connecting ${"\uFFFD#2\uFFFD"}:START_TAG_DIV:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_DIV:`;let e;e=$localize` Click to register ${"\uFFFD#2\uFFFD"}:START_TAG_DIV:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_DIV:`;let i;i=$localize`Cancel registration`;let a;a=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD#3\uFFFD"}:START_TAG_DIV:Click to claim${"[\uFFFD/#3\uFFFD|\uFFFD/#4\uFFFD]"}:CLOSE_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_DIV_1:${"[\uFFFD/#3\uFFFD|\uFFFD/#4\uFFFD]"}:CLOSE_TAG_DIV:`,a=sC(a);let u;return u=$localize` Connected ${"\uFFFD#2\uFFFD"}:START_TAG_DIV:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_DIV:`,[t,n,e,a,u,[1,"connectivity-status"],[1,"connectivity-status",3,"routerLink"],[1,"connectivity-status","claim"],[1,"connectivity-status",3,"click"],[1,"status","blinking"],[1,"status"],[1,"status","warning","blinking"],["shTooltip",i,3,"click"],[1,"claim",3,"click"],[1,"status","success","blinking"],[1,"status","success"]]},template:function(n,e){if(n&1&&lT(0,Le,4,1,"div",5)(1,Ge,3,2,"div",6)(2,xe,3,2,"div",6)(3,$e,5,0,"div",7)(4,Ue,3,0,"div",5),n&2){let i=e.state()==="unknown"||e.state()==="inactive"||e.state()==="registeringfaulted",a=e.state()==="registeringfaulted",u=e.state()==="registering",r=e.state()==="registered",M=e.state()==="connected"||e.state()==="disabled"||e.state()==="connecting";uT(a?0:u?1:i?2:r?3:M?4:-1);}},dependencies:[_t,N,at],styles:["[_nghost-%COMP%]{display:flex;align-items:center;padding:0 .75rem}@media only screen and (max-width:768px){[_nghost-%COMP%]{padding:0}}.hide-text[_nghost-%COMP%]{font-size:0}.in-menu[_nghost-%COMP%]{padding:.75rem;border-bottom:1px solid var(--base-4)}.connectivity-status[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer}.connectivity-status[_ngcontent-%COMP%]:hover{color:var(--primary-8)}.connectivity-status.claim[_ngcontent-%COMP%]{display:flex;gap:.5rem;cursor:pointer}.connectivity-status.claim[_ngcontent-%COMP%]:hover{color:inherit}.connectivity-status.claim[_ngcontent-%COMP%] .claim[_ngcontent-%COMP%]:hover{color:var(--primary-8)}.connectivity-status.claim[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]:hover{color:var(--error-8)}.status[_ngcontent-%COMP%]{width:.625rem;height:.625rem;border-radius:50%;background-color:var(--base-4)}.status.success[_ngcontent-%COMP%]{background-color:var(--success-8)}.status.warning[_ngcontent-%COMP%]{background-color:var(--warn-8)}.status.blinking[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_blinking 1s infinite}@keyframes _ngcontent-%COMP%_blinking{0%{opacity:.2}50%{opacity:1}to{opacity:.2}}"]})};var Pe={Byte:"B",KByte:"KB",MByte:"MB",GByte:"GB",TByte:"TB",PByte:"PB"},we=["mbps","gbps"],Ae=8,q=1024,H=q*1024,Q=H*1024,ee=Q*1024,he=ee*1024,Ve={B:1,KB:q,MB:H,GB:Q,TB:ee,PB:he},He=1e3,Z=He*1e3,j=Z*1e3,Ye=[{threshold:he,unitPrefix:"PByte"},{threshold:ee,unitPrefix:"TByte"},{threshold:Q,unitPrefix:"GByte"},{threshold:H,unitPrefix:"MByte"},{threshold:q,unitPrefix:"KByte"},{threshold:1,unitPrefix:"Byte"}],$=class o{#e=T(J);closed=I1();isSubmitting=Ge$1(false);sizeOptions=Ge$1([...we]);maxUpload=Ge$1(0);maxDownload=Ge$1(0);maxUploadUnit=Ge$1("mbps");maxDownloadUnit=Ge$1("mbps");ngOnInit(){this.init();}convertToBitsPerSecondUnits(t,n){let i=t*(Ve[n.toUpperCase()]||H)*Ae;return i===0?{value:0,unit:"mbps"}:i>=j?{value:parseFloat((i/j).toFixed(2)),unit:"gbps"}:{value:parseFloat((i/Z).toFixed(2)),unit:"mbps"}}convertFromBitsPerSecondUnits(t,n){let e=0;switch(n){case "gbps":e=t*j;break;case "mbps":e=t*Z;break}let i=e/Ae;if(i===0)return {valueForApi:0,unitPrefixForApi:"Byte"};for(let{threshold:a,unitPrefix:u}of Ye)if(i>=a)return {valueForApi:Math.round(i/a),unitPrefixForApi:u};return {valueForApi:Math.round(i),unitPrefixForApi:"Byte"}}init(){sy(()=>this.#e.getApiV1Serversettings()).subscribe({next:t=>{let n=t?.["max-upload-speed"],e=t?.["max-download-speed"];if(n&&n!==""){let i=n.match(/^(\d+(?:\.\d+)?)([A-Za-z]+)$/);if(i){let a=parseFloat(i[1]),u=i[2],r=this.convertToBitsPerSecondUnits(a,u);this.maxUpload.set(r.value),this.maxUploadUnit.set(r.unit);}else console.warn("Unexpected max-upload-speed format from API:",n),this.resetUpload();}else this.resetUpload();if(e&&e!==""){let i=e.match(/^(\d+(?:\.\d+)?)([A-Za-z]+)$/);if(i){let a=parseFloat(i[1]),u=i[2],r=this.convertToBitsPerSecondUnits(a,u);this.maxDownload.set(r.value),this.maxDownloadUnit.set(r.unit);}else console.warn("Unexpected max-download-speed format from API:",e),this.resetDownload();}else this.resetDownload();},error:t=>{console.error("Failed to get server settings:",t),this.resetDownload(),this.resetUpload();}});}resetDownload(){this.maxDownload.set(0),this.maxDownloadUnit.set("mbps");}resetUpload(){this.maxUpload.set(0),this.maxUploadUnit.set("mbps");}blockDecimalKeys(t){if([".",","].includes(t.key))return t.preventDefault()}cleanupInputAfterPasting(t){t.preventDefault();let n=t.clipboardData?.getData("text/plain");if(!n)return;let e=n.replaceAll(/[\.,]/g,"");t.target.value=e;}submit(){this.isSubmitting.set(true);let t="",n="",e=this.maxUpload()??0,i=this.maxUploadUnit(),a=this.maxDownload()??0,u=this.maxDownloadUnit();if(e>0){let{valueForApi:r,unitPrefixForApi:M}=this.convertFromBitsPerSecondUnits(e,i),y=Pe[M];y?t=`${r}${y}`:console.error(`Invalid unit prefix for API submission (upload): ${M}. Defaulting to empty string.`);}if(a){let{valueForApi:r,unitPrefixForApi:M}=this.convertFromBitsPerSecondUnits(a,u),y=Pe[M];y?n=`${r}${y}`:console.error(`Invalid unit prefix for API submission (download): ${M}. Defaulting to empty string.`);}sy(()=>this.#e.patchApiV1Serversettings({body:{"max-upload-speed":t,"max-download-speed":n}})).pipe(Zu(()=>this.isSubmitting.set(false))).subscribe({next:()=>{this.closed.emit(true);},error:r=>{console.error("Failed to submit throttle settings:",r);}});}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=gw({type:o,selectors:[["app-throttle-settings-dialog"]],outputs:{closed:"closed"},decls:26,vars:10,consts:()=>{let t;t=$localize`Throttle network speed`;let n;n=$localize`We will round bits to the nearest byte value.`;let e;e=$localize`Max upload speed`;let i;i=$localize`Max download speed`;let a;a=$localize`Cancel`;let u;return u=$localize` Update settings `,[t,n,e,i,a,u,["content",""],[1,"column"],[1,"field-row"],["type","number",3,"paste","keydown","ngModelChange","ngModel"],[3,"isClearable","options"],["type","text",3,"ngModelChange","ngModel"],["footer",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"click"]]},template:function(n,e){n&1&&(Zi(0,"header")(1,"h3"),oC(2,0),Wl(),Zi(3,"p"),oC(4,1),Wl()(),Zi(5,"div",6)(6,"div",7)(7,"div",8)(8,"label"),oC(9,2),Wl(),Zi(10,"sh-form-field")(11,"input",9),Hg("paste",function(a){return e.cleanupInputAfterPasting(a)})("keydown",function(a){return e.blockDecimalKeys(a)}),lm("ngModelChange",function(a){return qC(e.maxUpload,a)||(e.maxUpload=a),a}),Wl(),bD(),Wl(),Zi(12,"sh-select",10)(13,"input",11),lm("ngModelChange",function(a){return qC(e.maxUploadUnit,a)||(e.maxUploadUnit=a),a}),Wl(),bD(),Wl()(),Zi(14,"div",8)(15,"label"),oC(16,3),Wl(),Zi(17,"sh-form-field")(18,"input",9),Hg("paste",function(a){return e.cleanupInputAfterPasting(a)})("keydown",function(a){return e.blockDecimalKeys(a)}),lm("ngModelChange",function(a){return qC(e.maxDownload,a)||(e.maxDownload=a),a}),Wl(),bD(),Wl(),Zi(19,"sh-select",10)(20,"input",11),lm("ngModelChange",function(a){return qC(e.maxDownloadUnit,a)||(e.maxDownloadUnit=a),a}),Wl(),bD(),Wl()()()(),Zi(21,"footer",12)(22,"button",13),Hg("click",function(){return e.closed.emit(false)}),oC(23,4),Wl(),Zi(24,"button",14),Hg("click",function(){return e.submit()}),oC(25,5),Wl()()),n&2&&(bE(11),cm("ngModel",e.maxUpload),MD(),bE(),vg("isClearable",false)("options",e.sizeOptions()),bE(),cm("ngModel",e.maxUploadUnit),MD(),bE(5),cm("ngModel",e.maxDownload),MD(),bE(),vg("isClearable",false)("options",e.sizeOptions()),bE(),cm("ngModel",e.maxDownloadUnit),MD(),bE(4),Kg("loading",e.isSubmitting()));},dependencies:[Bn,Ze$1,en,Rn,Jt,Fe,Nt$1,v],styles:['[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;padding:1rem;gap:.5rem;margin-bottom:1rem}.column[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.field-row[_ngcontent-%COMP%]{display:grid;grid-template-areas:"label label" "input select";grid-template-columns:1fr auto;align-items:center;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%]{grid-area:input}.field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{grid-area:select}']})};function ze(o,t){o&1&&Ig(0,"app-remote-connectivity-status");}function Je(o,t){if(o&1){let n=ET();Zi(0,"button",7),Hg("click",function(){Pd(n);let i=aC(2);return Ld(i.abort())}),Fg(1,1),Ig(2,"sh-icon"),jg(),Wl();}}function Xe(o,t){if(o&1){let n=ET();Zi(0,"button",7),Hg("click",function(){Pd(n);let i=aC(2);return Ld(i.stop())}),Fg(1,2),Ig(2,"sh-icon"),jg(),Wl();}}function Ke(o,t){if(o&1&&lT(0,Je,3,0,"button",14)(1,Xe,3,0,"button",14),o&2){let n=aC();uT(n.isStopping()?0:1);}}function We(o,t){o&1&&(Fg(0,0,1),Ig(1,"sh-icon"),jg());}function je(o,t){o&1&&(Fg(0,0,2),Ig(1,"sh-icon"),jg());}function Ze(o,t){o&1&&Ig(0,"app-remote-connectivity-status",10);}function qe(o,t){o&1&&Ig(0,"app-remote-connectivity-status",12);}function Qe(o,t){if(o&1){let n=ET();Zi(0,"button",13),Hg("click",function(){Pd(n);let i=aC();return Ld(i.isStopping()?i.abort():i.stop())}),Zi(1,"sh-icon"),HC(2),Wl(),HC(3),Wl();}if(o&2){let n=aC();bE(2),im(n.isStopping()?"skull":"stop"),bE(),Yl(" ",n.isStopping()?"Abort":"Stop"," ");}}var te=class o{#e=T(J);#t=T(D);#n=T(be$1);#a=T(B);#i=T(I);#s=T(f);#l=T(R);clientIsRunning=this.#t.clientIsRunning;isResuming=this.#t.isResuming;runningTask=Nt(()=>this.#a.serverState()?.ActiveTask?.Item1);isStopping=Nt(()=>this.runningTask()==this.#o());#o=Ge$1(-1);isUsingRelay=this.#i.relayIsEnabled;hideConsoleConnectionStatus=this.#l.isConsoleConnectionStatusHidden;openThrottleSettingsDialog(){this.#n.open($,{maxWidth:"550px",width:"100%"});}openPauseDialog(){this.#n.open(z,{maxWidth:"550px",width:"100%"});}pauseResume(){if(this.clientIsRunning()){this.openPauseDialog();return}this.#t.pauseResume().subscribe();}stop(){let t=this.runningTask();t&&(this.#o.set(t),sy(()=>this.#e.postApiV1TaskByTaskidStop({path:{taskid:t}})).subscribe());}abort(){let t=this.runningTask();t&&sy(()=>this.#e.postApiV1TaskByTaskidAbort({path:{taskid:t}})).subscribe();}ngAfterViewInit(){let t=this.#i.relayIsEnabled()||!this.#s.hasWebSocket()?"longpoll":"websocket";this.#t.setConnectionMethod(t);}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=gw({type:o,selectors:[["app-status-bar"]],decls:31,vars:10,consts:()=>{let t;t=$localize`${"\uFFFD*9:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:pause${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Pause ${"\uFFFD/*9:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*10:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:play${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Resume ${"\uFFFD/*10:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,t=sC(t);let n;n=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:skull${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Abort `;let e;return e=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:stop${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Stop `,[t,n,e,[1,"current-backup"],[1,"global-progress"],[1,"current-backup-actions"],[1,"desktop-actions"],["shButton","",3,"click"],[1,"mobile-actions"],["shButton","",1,"small","menu-mobile-toggle"],[1,"hide-text"],["menu",""],[1,"in-menu"],[3,"click"],["shButton",""]]},template:function(n,e){n&1&&(Zi(0,"div",3),Ig(1,"app-mobile-menu-toggle")(2,"app-backup-progress",4),Zi(3,"div",5)(4,"div",6),lT(5,ze,1,0,"app-remote-connectivity-status"),lT(6,Ke,2,1),Zi(7,"button",7),Hg("click",function(){return e.pauseResume()}),Fg(8,0),lT(9,We,2,0)(10,je,2,0),jg(),Wl(),Zi(11,"button",7),Hg("click",function(){return e.openThrottleSettingsDialog()}),Zi(12,"sh-icon"),HC(13,"speedometer"),Wl()()(),Zi(14,"div",8)(15,"sh-menu")(16,"button",9),lT(17,Ze,1,0,"app-remote-connectivity-status",10),Zi(18,"sh-icon"),HC(19,"dots-three-vertical-bold"),Wl()(),zl(20,11),lT(21,qe,1,0,"app-remote-connectivity-status",12),lT(22,Qe,4,2,"button"),Zi(23,"button",13),Hg("click",function(){return e.pauseResume()}),Zi(24,"sh-icon"),HC(25),Wl(),HC(26),Wl(),Zi(27,"button",13),Hg("click",function(){return e.openThrottleSettingsDialog()}),Zi(28,"sh-icon"),HC(29,"speedometer"),Wl(),HC(30," Throttle Settings "),Wl(),Ql(),Wl()()()()),n&2&&(bE(5),uT(!e.isUsingRelay()&&!e.hideConsoleConnectionStatus()?5:-1),bE(),uT(e.runningTask()?6:-1),bE(),Kg("loading",e.isResuming()),bE(2),uT(e.clientIsRunning()?9:10),bE(8),uT(!e.isUsingRelay()&&!e.hideConsoleConnectionStatus()?17:-1),bE(4),uT(!e.isUsingRelay()&&!e.hideConsoleConnectionStatus()?21:-1),bE(),uT(e.runningTask()?22:-1),bE(3),im(e.clientIsRunning()?"pause":"play"),bE(),Yl(" ",e.clientIsRunning()?"Pause":"Resume"," "));},dependencies:[x,N,v,ve$1,V,W],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1rem;min-height:3.875rem;border-bottom:1px solid var(--base-4);position:sticky;top:0;z-index:2000;background:var(--base-1)}[_nghost-%COMP%]:has(sh-progress-bar){padding:1rem 1rem 1.5rem}.current-backup[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;gap:.5rem}.global-progress[_ngcontent-%COMP%]{flex:1 0;min-width:18.75rem}.current-backup-actions[_ngcontent-%COMP%], .current-backup-actions[_ngcontent-%COMP%] .desktop-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}@media only screen and (max-width:768px){.current-backup-actions[_ngcontent-%COMP%] .desktop-actions[_ngcontent-%COMP%]{display:none}}.current-backup-actions[_ngcontent-%COMP%] .mobile-actions[_ngcontent-%COMP%]{display:none}@media only screen and (max-width:768px){.current-backup-actions[_ngcontent-%COMP%] .mobile-actions[_ngcontent-%COMP%]{display:flex}}.current-backup-actions[_ngcontent-%COMP%] .menu-mobile-toggle[_ngcontent-%COMP%]{position:relative}.current-backup-actions[_ngcontent-%COMP%] .menu-mobile-toggle[_ngcontent-%COMP%] app-remote-connectivity-status[_ngcontent-%COMP%]{position:absolute;top:-.25rem;right:-.25rem}.menu-status-item[_ngcontent-%COMP%]{padding:.5rem 1rem;display:flex;flex-direction:column;gap:.25rem;border-bottom:1px solid var(--base-4);margin-bottom:.25rem}.menu-status-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem;font-size:.875rem}"]})};export{W,te as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {E as E1,
|
|
2
|
-
`],encapsulation:2});}}return r})(),o=null,at=(()=>{class r{constructor(){this.shTooltip=E1.required(),this.#p=
|
|
1
|
+
import {E as E1,Q as Qa,m as me,T,af as eo,bP as fs,bQ as pe,bo as le,G as Ge,ba as Ew,w as Hg,ah as Yg,K as Kg,N as Nt,bR as Wr,ae as Mr,bv as DD,g as gw,bS as ei,Z as Zi,l as lT,W as Wl,b as bE,c as uT,aE as yg,b4 as cg,h as aC,z as vg,b0 as eb,H as HC,aa as Yl,bT as wg}from'./main-2ZYVV4C4.js';var z=r=>({$implicit:r});function U(r,w){r&1&&wg(0);}function F(r,w){if(r&1&&cg(0,U,1,0,"ng-container",1),r&2){let t=aC();vg("ngTemplateOutlet",t.content())("ngTemplateOutletContext",eb(2,z,t.tooltipContext));}}function $(r,w){if(r&1&&HC(0),r&2){let t=aC();Yl(" ",t.content()," ");}}var X=(()=>{class r{constructor(){this.positionAnchorName=E1.required(),this.anchorEl=E1.required(),this.isOpen=E1(false),this.content=E1(),this.close=E1(()=>{}),this.tooltipContext={close:()=>this.close()()},this.isTemplate=Nt(()=>this.content()instanceof Wr),this.#p=T(Mr),this.#n=T(eo),this.#e=T(DD),this.#t=null,this.SUPPORTS_ANCHOR=typeof CSS<"u"&&CSS.supports("position-anchor","--abc")&&CSS.supports("anchor-name","--abc"),this.isBelow=Ge(false),this.openEffect=Qa(()=>{if(this.isOpen())queueMicrotask(()=>{let t=this.#n.nativeElement;!t||!t.isConnected||(this.#t&&this.#t.abort(),this.#t=new AbortController,t.showPopover(),this.SUPPORTS_ANCHOR||setTimeout(()=>{this.#i(t).addEventListener("scroll",()=>this.#o(),{signal:this.#t?.signal,passive:true}),window?.addEventListener("resize",()=>this.#o(),{signal:this.#t?.signal,passive:true}),this.#o();}));});else {let t=this.#n.nativeElement;if(t)try{t.matches(":popover-open")&&t.hidePopover();}catch{}this.#t?.abort(),this.#t=null;}}),this.#o=()=>{if(!this.anchorEl())return;let t=this.anchorEl().nativeElement.getBoundingClientRect(),e=this.#n.nativeElement,n=e.getBoundingClientRect();if(n.width===0&&n.height===0)return;let p=8,h=(i,s)=>({left:i.left+i.width/2-s.width/2,top:i.top-s.height-p}),j=[h,(i,s)=>({left:i.right-s.width,top:i.top-s.height-p}),(i,s)=>({left:i.left,top:i.top-s.height-p}),(i,s)=>({left:i.left+i.width/2-s.width/2,top:i.bottom+p}),(i,s)=>({left:i.right-s.width,top:i.bottom+p}),(i,s)=>({left:i.left,top:i.bottom+p})];for(let i of j){let s=i(t,n);if(this.#r(s,n)){this.#s(s,e),this.isBelow.set(s.top>t.top);return}}let v=this.#l(h(t,n),n);this.#s(v,e),this.isBelow.set(v.top>t.top);};}#p;#n;#e;#t;ngOnDestroy(){this.#t?.abort(),this.#t=null;}#i(t){let e=["scroll","auto"],n=t.parentElement;for(;n;){if(e.indexOf(window?.getComputedStyle(n).overflowY)>-1&&n.scrollHeight>n.clientHeight)return n;n=n.parentElement;}return this.#p.documentElement}#o;#s(t,e){this.#e.setStyle(e,"left",`${t.left}px`),this.#e.setStyle(e,"top",`${t.top}px`),this.#e.setStyle(e,"position","fixed"),this.#e.setStyle(e,"margin","0");}#r(t,e){return t.left>=0&&t.top>=0&&t.left+e.width<=window.innerWidth&&t.top+e.height<=window.innerHeight}#l(t,e){return {left:Math.max(0,Math.min(t.left,window.innerWidth-e.width)),top:Math.max(0,Math.min(t.top,window.innerHeight-e.height))}}static{this.\u0275fac=function(e){return new(e||r)};}static{this.\u0275cmp=gw({type:r,selectors:[["ship-tooltip-wrapper"]],hostAttrs:["role","tooltip"],hostVars:5,hostBindings:function(e,n){e&2&&(yg("popover","manual"),Yg("position-anchor",n.positionAnchorName()),Kg("below",n.isBelow()));},inputs:{positionAnchorName:[1,"positionAnchorName"],anchorEl:[1,"anchorEl"],isOpen:[1,"isOpen"],content:[1,"content"],close:[1,"close"]},decls:3,vars:1,consts:[[1,"tooltip-content"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,n){e&1&&(Zi(0,"div",0),lT(1,F,1,4,"ng-container")(2,$,1,1),Wl()),e&2&&(bE(),uT(n.isTemplate()?1:2));},dependencies:[ei],styles:[`.tooltip{position:relative;display:flex;pointer-events:initial!important}.tooltip:after{content:"";position:absolute;inset:-.5rem;z-index:1}.tooltip.primary+ship-tooltip-wrapper{--tt-bg: var(--primary-2);--tt-c: var(--primary-8)}.tooltip.accent+ship-tooltip-wrapper{--tt-bg: var(--accent-2);--tt-c: var(--accent-8)}.tooltip.warn+ship-tooltip-wrapper{--tt-bg: var(--warn-2);--tt-c: var(--warn-8)}.tooltip.error+ship-tooltip-wrapper{--tt-bg: var(--error-2);--tt-c: var(--error-8)}.tooltip.success+ship-tooltip-wrapper{--tt-bg: var(--success-2);--tt-c: var(--success-8)}.tooltip.active{z-index:1}.tooltip.active+ship-tooltip-wrapper{z-index:1}@supports (anchor-name: --anchor){.tooltip.active+ship-tooltip-wrapper .tooltip-content{transform:translateY(0) scaleY(1) scaleX(1)}}ship-tooltip-wrapper{--tt-bg: var(--base-3);--tt-c: var(--base-12);--tt-mh: 8.5rem;--tt-mw: 17.5rem;--tt-translate-y: 50%;position:fixed;font:var(--paragraph-30);width:max-content;overflow:visible;box-shadow:none;background:transparent;border:0;padding:0;margin:0;margin-block-end:.75rem}@supports (anchor-name: --anchor){ship-tooltip-wrapper{inset:unset;justify-self:anchor-center;bottom:anchor(top);position:fixed;position-try-order:normal;position-try-fallbacks:flip-block,flip-inline,flip-block flip-inline}}ship-tooltip-wrapper:before{content:"";position:absolute;bottom:-.75rem;top:auto;left:50%;z-index:1;transform:translate(-50%);border-width:.375rem;border-style:solid;border-color:transparent;border-top-color:var(--tt-bg);width:0;height:0;opacity:1}ship-tooltip-wrapper.below{--tt-translate-y: -50%}ship-tooltip-wrapper.below:before{border-top-color:transparent;border-bottom-color:var(--tt-bg);top:-.75rem;bottom:auto}@supports not (anchor-name: --anchor){ship-tooltip-wrapper.below{margin-block-start:.75rem;margin-block-end:0}}ship-tooltip-wrapper .tooltip-content{padding:.5rem .75rem;position:relative;hyphens:auto;text-wrap:pretty;color:var(--tt-c);max-height:var(--tt-mh);max-width:var(--tt-mw);overflow:auto;background:var(--tt-bg);border-radius:var(--shape-2);box-shadow:var(--box-shadow-20)}@supports (anchor-name: --anchor){ship-tooltip-wrapper .tooltip-content{transform:translateY(var(--tt-translate-y)) scaleY(0) scaleX(.8);transition:transform 125ms linear}}
|
|
2
|
+
`],encapsulation:2});}}return r})(),o=null,at=(()=>{class r{constructor(){this.shTooltip=E1.required(),this.#p=Qa(()=>{let t=this.shTooltip();me(()=>{this.isOpen()&&o?.component===this&&o?.wrapperComponentRef&&(o.wrapperComponentRef.setInput("content",t),o.wrapperComponentRef.changeDetectorRef.detectChanges());});}),this.#n=T(eo),this.#e=T(fs),this.#t=T(pe),this.#i=null,this.#o=50,this.anchorName=`--${le()}`,this.isOpen=Ge(false),this.destroyTimeout=null;}#p;#n;#e;#t;#i;#o;onMouseEnter(t){t.stopPropagation(),o&&o.component.anchorName!==this.anchorName?o.component.#a(true):this.#r(),this.#l();}onMouseLeave(t){t.stopPropagation(),this.#s();}ngOnDestroy(){this.#r(),o?.component===this&&this.#a(true);}#s(){this.#r(),this.#i=setTimeout(()=>{this.#a();},this.#o);}#r(){this.#i&&(clearTimeout(this.#i),this.#i=null),this.destroyTimeout&&(clearTimeout(this.destroyTimeout),this.destroyTimeout=null);}#l(){if(o?.wrapperComponentRef||!this.shTooltip()){o?.component===this&&o?.wrapperComponentRef&&o.wrapperComponentRef.setInput("content",this.shTooltip());return}o={wrapperComponentRef:this.#e.createComponent(X,{environmentInjector:this.#t}),component:this},o.wrapperComponentRef.setInput("positionAnchorName",this.anchorName),o.wrapperComponentRef.setInput("anchorEl",this.#n),o.wrapperComponentRef.setInput("isOpen",this.isOpen),o.wrapperComponentRef.setInput("content",this.shTooltip()),o.wrapperComponentRef.setInput("close",()=>this.#a(true)),o.wrapperComponentRef.changeDetectorRef.detectChanges(),o.wrapperComponentRef.location.nativeElement.addEventListener("mouseenter",t=>{t.stopPropagation(),this.#r();}),o.wrapperComponentRef.location.nativeElement.addEventListener("mouseleave",t=>{t.stopPropagation(),this.#s();}),setTimeout(()=>{this.isOpen.set(true);});}#a(t=false){if(o?.wrapperComponentRef){if(o.component!==this&&!t)return;let e=o.wrapperComponentRef,n=o.component;n.#r(),n.isOpen.set(false);try{e.location.nativeElement.hidePopover();}catch{}t?(e.destroy(),o?.wrapperComponentRef===e&&(o=null)):n.destroyTimeout=setTimeout(()=>{queueMicrotask(()=>{e.destroy(),o?.wrapperComponentRef===e&&(o=null);});},this.#o);}}static{this.\u0275fac=function(e){return new(e||r)};}static{this.\u0275dir=Ew({type:r,selectors:[["","shTooltip",""]],hostAttrs:[1,"tooltip"],hostVars:4,hostBindings:function(e,n){e&1&&Hg("mouseenter",function(h){return n.onMouseEnter(h)})("mouseleave",function(h){return n.onMouseLeave(h)}),e&2&&(Yg("anchor-name",n.anchorName),Kg("active",n.isOpen()));},inputs:{shTooltip:[1,"shTooltip"]}});}}return r})();export{at as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {o as oe$1,F as Fe}from'./chunk-DhiIZLrA.js';import {T,ad as Mr,bC as ED,bu as N,N as Nt,E as E1,af as D1,ac as I1,G as Ge,D as w1,z as za,c0 as oe,c1 as ae,bv as le,h as hw,c as N$1,l as vT,S as aC,Q as Qi,p as lm,O as Od,U as UC,P as Pd,H as Hg,Y as cC,d as aT,$ as $l,i as Ig,w as cm,y as vg,a3 as KC,C as CE,L as Kg,aC as yg,g as cT,M as qg,R as fC,s as jC}from'./main-3NL5M6JB.js';var X=["inputRef"],Z=["optionsRef"],ee=["*",[["","menu",""]]],te=["*","[menu]"],ie=()=>({closeOnButton:false,closeOnEsc:true});function ne(a,J){a&1&&(Qi(0,"sh-icon",5),jC(1,"caret-down"),$l());}function se(a,J){a&1&&(Qi(0,"sh-icon",6),jC(1,"caret-right"),$l());}var m=[],ve=(()=>{class a{constructor(){this.#i=T(Mr),this.#t=T(ED),this.#e=T(N),this.parentMenu=T(a,{optional:true,skipSelf:true}),this.isSubmenu=Nt(()=>this.parentMenu!==null),this.asMultiLayer=E1(false),this.openIndicator=E1(false),this.disabled=E1(false),this.customOptionElementSelectors=E1(["button"]),this.keepClickedOptionActive=E1(false),this.closeOnClick=E1(true),this.isOpen=D1(false),this.closed=I1(),this.searchable=E1(false),this.activeOptionIndex=Ge(-1),this.inputRef=w1("inputRef"),this.optionsRef=w1("optionsRef"),this.openMenusEffect=za(t=>{this.isOpen()&&m.push(this),t(()=>{let i=m.indexOf(this);i>-1&&m.splice(i,1);});}),this.options=oe(this.optionsRef,this.customOptionElementSelectors),this.optionsEl=Nt(()=>{let t=this.optionsRef()?.nativeElement;return t?this.options.signal().filter(i=>i.disabled?false:i.closest(".options")===t):[]}),this.inputValue=ae(this.inputRef),this.optionsId=le(),this.activeOptionId=Ge(void 0),this.abortController=null,this.optionsEffect=za(t=>{if(this.abortController!==null&&(this.abortController.abort(),this.abortController=null),!this.isOpen())return;if(this.searchable()&&this.#e.pause(),t(()=>{this.searchable()&&this.#e.resume();}),this.abortController=new AbortController,!this.searchable())this.#i.documentElement.addEventListener("keydown",this.keyDownEventListener,{signal:this.abortController.signal});else {let n=this.inputRef()?.nativeElement;n&&n.addEventListener("keydown",this.keyDownEventListener,{signal:this.abortController.signal});}let e=this.inputRef()?.nativeElement;e&&(queueMicrotask(()=>e.focus()),this.closeOnClick()||this.optionsRef()?.nativeElement?.addEventListener("click",s=>{let o=s.target,r=this.activeElements();if(!r.length){let c=this.optionsEl();this.activeElements.set(c),r=c;}let p=r.findIndex(c=>c===o);p>-1&&(this.activeOptionIndex.set(p),e.focus());}));}),this.keyDownEventListener=t=>{if(m.at(-1)!==this)return;let i=this.activeOptionIndex(),e=this.searchable();if(this.#e.matches(t,"menu.next"))t.preventDefault(),this.activeOptionIndex.set(this.nextActiveIndex(i));else if(this.#e.matches(t,"menu.prev"))t.preventDefault(),this.activeOptionIndex.set(this.prevActiveIndex(i));else if(this.#e.matches(t,"menu.open-submenu")){if(!e&&i>-1){let n=this.activeElements()[i];if(n.parentElement?.hasAttribute("trigger")){t.preventDefault();let o=new CustomEvent("ship-menu-open",{bubbles:true,cancelable:true,detail:{keyboard:true}});n.dispatchEvent(o);}}}else if(this.#e.matches(t,"menu.close-submenu"))!e&&this.isSubmenu()&&(t.preventDefault(),this.close("closed"));else if(this.#e.matches(t,"menu.select")){let n=t.key==="Enter",s=t.key===" "||t.key==="Spacebar";if((n||s&&!e)&&(t.preventDefault(),i>-1)){let o=this.activeElements()[i];if(o.parentElement?.hasAttribute("trigger")){let p=new CustomEvent("ship-menu-open",{bubbles:true,cancelable:true,detail:{keyboard:true}});o.dispatchEvent(p);}else o.click(),o.querySelector("sh-checkbox")||queueMicrotask(()=>this.close("active"));}}else if(t.key==="Tab"){let n=this.activeElements();if(!n.length){let s=this.optionsEl();this.activeElements.set(s),n=s;}t.shiftKey?i<=0?(t.preventDefault(),this.close("closed")):(t.preventDefault(),this.activeOptionIndex.set(this.prevActiveIndex(i))):i>=n.length-1?(t.preventDefault(),this.close("closed")):(t.preventDefault(),this.activeOptionIndex.set(this.nextActiveIndex(i)));}},this._lastElementList=[],this.activeElements=Ge([]),this.lastInputValue="",this.inputValueEffect=za(()=>{if(!this.searchable()){this.activeElements.set(this.optionsEl());return}let i=(this.inputValue()??"").toLowerCase();if(this.#n(),!i||i===""){let n=this.optionsEl();this.activeElements.set(n),this._lastElementList=n;for(let s=0;s<n.length;s++)this.#t.removeStyle(n[s],"order"),n[s].id||(n[s].id=`${this.optionsId}-option-${s}`),n[s].setAttribute("role","option");return}if(!i||i==="")return;let e=this._lastElementList.length&&i.length>this.lastInputValue.length?this._lastElementList:this.optionsEl();this.lastInputValue=i;for(let n=0;n<e.length;n++){let s=e[n],o=s.textContent?.toLowerCase()||"",r=this.#s(o,i);s.value=r;}e=e.filter(n=>n.value>0).sort((n,s)=>s.value-n.value);for(let n=0;n<e.length;n++)this.#t.setStyle(e[n],"order",n);this.activeElements.set(e),this._lastElementList=e;for(let n=0;n<e.length;n++)e[n].id||(e[n].id=`${this.optionsId}-option-${n}`),e[n].setAttribute("role","option");}),this.activeOptionIndexEffect=za(()=>{let t=this.activeElements(),i=this.activeOptionIndex();for(let e=0;e<t.length;e++)t[e].classList.remove("active"),t[e].removeAttribute("aria-selected");if(i>-1){let e=t[i];e.scrollIntoView({block:"center"}),e.classList.add("active"),e.setAttribute("aria-selected","true"),this.activeOptionId.set(e.id);}else this.activeOptionId.set(void 0);});}#i;#t;#e;toggleIsOpen(t){t.preventDefault(),t.stopPropagation(),!this.disabled()&&(this.isOpen()?this.close("fromPopover"):this.open());}open(){this.disabled()||(this.isOpen.set(true),this.searchable()&&setTimeout(()=>this.inputRef()?.nativeElement.focus()));}onShipMenuOpen(t){t.preventDefault(),t.stopPropagation(),this.open(),t.detail?.keyboard&&setTimeout(()=>{this.activeOptionIndex.set(0);},50);}#s(t,i){if(!i)return 0;let e=0,n=-1,s=0,o=true;for(let r=0;r<i.length;r++){let p=i[r];if(t.length>n+1&&t[n+1]===p)e+=r===0?100:150,n++,s++;else {let c=t.indexOf(p,n+1);if(r>0&&(o=false),c===-1)return 0;e+=100,n=c,s++;}}return o&&i.length===s&&(e+=1e3),e+=s*20,e}nextActiveIndex(t){let i=this.activeElements();if(!i.length){let n=this.optionsEl();this.activeElements.set(n),i=n;}if(t===-1||t===i.length-1)return 0;let e=t+1;return i[e].disabled?this.nextActiveIndex(e):e}prevActiveIndex(t){let i=this.activeElements();if(!i.length){let n=this.optionsEl();this.activeElements.set(n),i=n;}if(t===0||t===-1)return i.length-1;let e=t-1;return i[e].disabled?this.prevActiveIndex(e):e}close(t="closed",i){this.inputValue.set("");let e=this.inputRef()?.nativeElement;if(e&&(e.value=""),this.closeOnClick()&&((!this.keepClickedOptionActive()||t==="closed")&&this.#n(),this.isOpen.set(false),this.closed.emit(t==="active"),this.isSubmenu())){let n=this.parentMenu?.inputRef()?.nativeElement;n&&queueMicrotask(()=>n.focus());}}#n(){this.activeOptionIndex.set(-1);let t=this.optionsEl();for(let i=0;i<t.length;i++)t[i].classList.remove("active"),t[i].removeAttribute("aria-selected");}ngOnDestroy(){this.abortController&&(this.abortController.abort(),this.abortController=null);let t=m.indexOf(this);t>-1&&m.splice(t,1);}static{this.\u0275fac=function(i){return new(i||a)};}static{this.\u0275cmp=hw({type:a,selectors:[["sh-menu"]],viewQuery:function(i,e){i&1&&qg(e.inputRef,X,5)(e.optionsRef,Z,5),i&2&&fC(2);},hostVars:6,hostBindings:function(i,e){i&1&&Hg("ship-menu-open",function(s){return e.onShipMenuOpen(s)}),i&2&&Kg("disabled",e.disabled())("has-search",e.searchable())("multi-layer",e.asMultiLayer());},inputs:{asMultiLayer:[1,"asMultiLayer"],openIndicator:[1,"openIndicator"],disabled:[1,"disabled"],customOptionElementSelectors:[1,"customOptionElementSelectors"],keepClickedOptionActive:[1,"keepClickedOptionActive"],closeOnClick:[1,"closeOnClick"],isOpen:[1,"isOpen"],searchable:[1,"searchable"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:te,decls:13,vars:21,consts:[["formFieldWrapper",""],["inputRef",""],["optionsRef",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","asMultiLayer","options"],["trigger","","role","combobox","aria-haspopup","listbox",3,"click"],[1,"open-indicator"],[1,"submenu-indicator"],[1,"form-field-wrap"],[1,"small","stretch"],["type","text","placeholder","Search","role","combobox","aria-autocomplete","list"],["role","listbox",1,"options",3,"click","id"]],template:function(i,e){if(i&1){let n=vT();aC(ee),Qi(0,"sh-popover",3,0),lm("isOpenChange",function(o){return Od(n),UC(e.isOpen,o)||(e.isOpen=o),Pd(o)}),Hg("closed",function(){return e.close("fromPopover")}),Qi(2,"div",4),Hg("click",function(o){return e.toggleIsOpen(o)}),cC(3),aT(4,ne,2,0,"sh-icon",5),aT(5,se,2,0,"sh-icon",6),$l(),Qi(6,"div",7)(7,"sh-form-field",8),Ig(8,"input",9,1),$l()(),Qi(10,"div",10,2),Hg("click",function(){return e.close("active")}),cC(12,1),$l()();}i&2&&(cm("isOpen",e.isOpen),vg("disableOpenByClick",true)("asMultiLayer",e.asMultiLayer())("options",KC(20,ie)),CE(2),Kg("is-open",e.isOpen()),yg("aria-expanded",e.isOpen())("aria-controls",e.optionsId)("aria-activedescendant",e.activeOptionId()),CE(2),cT(e.openIndicator()?4:-1),CE(),cT(e.isSubmenu()?5:-1),CE(2),Kg("hidden",e.searchable()===false),CE(),yg("aria-expanded",e.isOpen())("aria-controls",e.optionsId)("aria-activedescendant",e.activeOptionId()),CE(2),Kg("searching",e.searchable()&&e.inputValue()!==""),vg("id",e.optionsId),yg("aria-activedescendant",e.activeOptionId()));},dependencies:[oe$1,Fe,N$1],styles:[`sh-menu{--menu-mh: 20rem;display:inline-flex;position:relative}sh-menu.disabled{opacity:.5;pointer-events:none}sh-menu.stretch{width:100%}sh-menu.stretch [trigger]>*{width:100%}sh-menu.has-search sh-popover .options [title]{position:sticky;border-bottom:var(--border-10)}sh-menu.has-search .form-field-wrap{margin:.5rem .5rem 0}sh-menu.has-search .options{margin:.25rem 0 0}sh-menu.multi-layer [trigger]:has(sh-icon.open-indicator).is-open .open-indicator{transform:translateY(-50%) rotate(-90deg)}sh-menu.multi-layer [trigger]:has(sh-icon.open-indicator){display:flex}sh-menu.multi-layer [trigger]:has(sh-icon.open-indicator) .open-indicator{right:1rem}sh-menu.multi-layer [trigger] button:first-child{margin-top:0}sh-menu [trigger]:has(sh-icon.open-indicator){position:relative}sh-menu [trigger]:has(sh-icon.open-indicator)>:first-child{padding-right:2rem}sh-menu [trigger]:has(sh-icon.open-indicator) .open-indicator{position:absolute;right:.5rem;top:50%;transform:translateY(-50%);color:var(--base-8);font-size:1rem;font-weight:inherit;pointer-events:none;transition:transform 75ms ease-in-out}sh-menu [trigger]:has(sh-icon.open-indicator).is-open .open-indicator{transform:translateY(-50%) rotate(-180deg)}sh-menu [trigger]:has(sh-icon.submenu-indicator){position:relative}sh-menu [trigger]:has(sh-icon.submenu-indicator)>:first-child{padding-right:2rem!important}sh-menu [trigger]:has(sh-icon.submenu-indicator) .submenu-indicator{position:absolute;right:1rem;top:50%;transform:translateY(-50%);color:var(--base-8);font-size:1rem;font-weight:inherit;pointer-events:none;transition:transform 75ms ease-in-out}sh-menu [trigger]:has(sh-icon.submenu-indicator).is-open .submenu-indicator{transform:translateY(-50%) rotate(90deg)}sh-menu sh-popover{flex:1 0}sh-menu sh-popover .popover{padding:0}sh-menu sh-popover .popover-content{overflow:hidden}sh-menu sh-popover .form-field-wrap sh-form-field{z-index:10;background-color:var(--base-1)}sh-menu sh-popover .form-field-wrap sh-form-field.hidden{opacity:0;height:0;width:0;min-width:0;min-height:0;margin:0}sh-menu sh-popover .options{z-index:2;position:relative;display:flex;flex-direction:column;gap:.25rem;padding:0;margin:0;max-height:var(--menu-mh);overflow:auto}sh-menu sh-popover .options sh-menu:first-child,sh-menu sh-popover .options button:first-child{margin-top:.5rem}sh-menu sh-popover .options.searching button[disabled]{display:none}sh-menu sh-popover .options.searching button[value="0"]{display:none}sh-menu sh-popover .options.searching>*:not(button){display:none}sh-menu sh-popover .options:after{content:"";display:block;width:100%;min-height:.25rem;order:9999999}sh-menu sh-popover .options [title]{font:var(--paragraph-30);color:var(--base-8);padding:.5rem .75rem;margin:0;-webkit-user-select:none;user-select:none;position:relative;top:0;z-index:10;background-color:var(--base-1)}sh-menu sh-popover .options button{display:flex;justify-content:flex-start;align-items:center;text-align:left;height:auto;margin:0 .5rem;padding:.25rem .5rem;gap:0 .5rem;width:calc(100% - 1rem);border-radius:var(--shape-2);appearance:none;background-color:transparent;border:0;cursor:pointer;color:var(--base-12);transition:transform 125ms linear;transform:scale(1)}sh-menu sh-popover .options button:before{content:"";min-height:1.5rem;display:inline-block;width:0;margin-right:-.5rem}sh-menu sh-popover .options button:active{transform:scale(.98)}sh-menu sh-popover .options button[disabled]{opacity:.3;cursor:initial}sh-menu sh-popover .options button[disabled]:hover{background-color:transparent}sh-menu sh-popover .options button [suffix]{order:999;color:var(--base-8);font:var(--paragraph-30);justify-self:flex-end;display:inline-flex;flex:1 0;justify-content:flex-end}sh-menu sh-popover .options button sh-icon{font-size:1rem}sh-menu sh-popover .options button.active,sh-menu sh-popover .options button:hover{background-color:var(--base-2);color:var(--base-12)}sh-menu sh-popover .options button.focused{background-color:var(--primary-2);color:var(--base-12)}sh-menu sh-popover .options button.focused:hover{background-color:var(--primary-3)}
|
|
1
|
+
import {o as oe$1,F as Fe}from'./chunk-DBkkb6OR.js';import {T,ae as Mr,bv as DD,bn as N,N as Nt,E as E1,ag as D1,ac as I1,G as Ge,B as w1,Q as Qa,bX as oe,bY as ae,bo as le,g as gw,a as N$1,i as ET,S as lC,Z as Zi,n as lm,P as Pd,p as qC,L as Ld,w as Hg,Y as uC,l as lT,W as Wl,d as Ig,y as cm,z as vg,a3 as XC,b as bE,K as Kg,aE as yg,c as uT,O as qg,R as hC,H as HC}from'./main-2ZYVV4C4.js';var X=["inputRef"],Z=["optionsRef"],ee=["*",[["","menu",""]]],te=["*","[menu]"],ie=()=>({closeOnButton:false,closeOnEsc:true});function ne(a,J){a&1&&(Zi(0,"sh-icon",5),HC(1,"caret-down"),Wl());}function se(a,J){a&1&&(Zi(0,"sh-icon",6),HC(1,"caret-right"),Wl());}var m=[],ve=(()=>{class a{constructor(){this.#i=T(Mr),this.#t=T(DD),this.#e=T(N),this.parentMenu=T(a,{optional:true,skipSelf:true}),this.isSubmenu=Nt(()=>this.parentMenu!==null),this.asMultiLayer=E1(false),this.openIndicator=E1(false),this.disabled=E1(false),this.customOptionElementSelectors=E1(["button"]),this.keepClickedOptionActive=E1(false),this.closeOnClick=E1(true),this.isOpen=D1(false),this.closed=I1(),this.searchable=E1(false),this.activeOptionIndex=Ge(-1),this.inputRef=w1("inputRef"),this.optionsRef=w1("optionsRef"),this.openMenusEffect=Qa(t=>{this.isOpen()&&m.push(this),t(()=>{let i=m.indexOf(this);i>-1&&m.splice(i,1);});}),this.options=oe(this.optionsRef,this.customOptionElementSelectors),this.optionsEl=Nt(()=>{let t=this.optionsRef()?.nativeElement;return t?this.options.signal().filter(i=>i.disabled?false:i.closest(".options")===t):[]}),this.inputValue=ae(this.inputRef),this.optionsId=le(),this.activeOptionId=Ge(void 0),this.abortController=null,this.optionsEffect=Qa(t=>{if(this.abortController!==null&&(this.abortController.abort(),this.abortController=null),!this.isOpen())return;if(this.searchable()&&this.#e.pause(),t(()=>{this.searchable()&&this.#e.resume();}),this.abortController=new AbortController,!this.searchable())this.#i.documentElement.addEventListener("keydown",this.keyDownEventListener,{signal:this.abortController.signal});else {let n=this.inputRef()?.nativeElement;n&&n.addEventListener("keydown",this.keyDownEventListener,{signal:this.abortController.signal});}let e=this.inputRef()?.nativeElement;e&&(queueMicrotask(()=>e.focus()),this.closeOnClick()||this.optionsRef()?.nativeElement?.addEventListener("click",s=>{let o=s.target,r=this.activeElements();if(!r.length){let c=this.optionsEl();this.activeElements.set(c),r=c;}let p=r.findIndex(c=>c===o);p>-1&&(this.activeOptionIndex.set(p),e.focus());}));}),this.keyDownEventListener=t=>{if(m.at(-1)!==this)return;let i=this.activeOptionIndex(),e=this.searchable();if(this.#e.matches(t,"menu.next"))t.preventDefault(),this.activeOptionIndex.set(this.nextActiveIndex(i));else if(this.#e.matches(t,"menu.prev"))t.preventDefault(),this.activeOptionIndex.set(this.prevActiveIndex(i));else if(this.#e.matches(t,"menu.open-submenu")){if(!e&&i>-1){let n=this.activeElements()[i];if(n.parentElement?.hasAttribute("trigger")){t.preventDefault();let o=new CustomEvent("ship-menu-open",{bubbles:true,cancelable:true,detail:{keyboard:true}});n.dispatchEvent(o);}}}else if(this.#e.matches(t,"menu.close-submenu"))!e&&this.isSubmenu()&&(t.preventDefault(),this.close("closed"));else if(this.#e.matches(t,"menu.select")){let n=t.key==="Enter",s=t.key===" "||t.key==="Spacebar";if((n||s&&!e)&&(t.preventDefault(),i>-1)){let o=this.activeElements()[i];if(o.parentElement?.hasAttribute("trigger")){let p=new CustomEvent("ship-menu-open",{bubbles:true,cancelable:true,detail:{keyboard:true}});o.dispatchEvent(p);}else o.click(),o.querySelector("sh-checkbox")||queueMicrotask(()=>this.close("active"));}}else if(t.key==="Tab"){let n=this.activeElements();if(!n.length){let s=this.optionsEl();this.activeElements.set(s),n=s;}t.shiftKey?i<=0?(t.preventDefault(),this.close("closed")):(t.preventDefault(),this.activeOptionIndex.set(this.prevActiveIndex(i))):i>=n.length-1?(t.preventDefault(),this.close("closed")):(t.preventDefault(),this.activeOptionIndex.set(this.nextActiveIndex(i)));}},this._lastElementList=[],this.activeElements=Ge([]),this.lastInputValue="",this.inputValueEffect=Qa(()=>{if(!this.searchable()){this.activeElements.set(this.optionsEl());return}let i=(this.inputValue()??"").toLowerCase();if(this.#n(),!i||i===""){let n=this.optionsEl();this.activeElements.set(n),this._lastElementList=n;for(let s=0;s<n.length;s++)this.#t.removeStyle(n[s],"order"),n[s].id||(n[s].id=`${this.optionsId}-option-${s}`),n[s].setAttribute("role","option");return}if(!i||i==="")return;let e=this._lastElementList.length&&i.length>this.lastInputValue.length?this._lastElementList:this.optionsEl();this.lastInputValue=i;for(let n=0;n<e.length;n++){let s=e[n],o=s.textContent?.toLowerCase()||"",r=this.#s(o,i);s.value=r;}e=e.filter(n=>n.value>0).sort((n,s)=>s.value-n.value);for(let n=0;n<e.length;n++)this.#t.setStyle(e[n],"order",n);this.activeElements.set(e),this._lastElementList=e;for(let n=0;n<e.length;n++)e[n].id||(e[n].id=`${this.optionsId}-option-${n}`),e[n].setAttribute("role","option");}),this.activeOptionIndexEffect=Qa(()=>{let t=this.activeElements(),i=this.activeOptionIndex();for(let e=0;e<t.length;e++)t[e].classList.remove("active"),t[e].removeAttribute("aria-selected");if(i>-1){let e=t[i];e.scrollIntoView({block:"center"}),e.classList.add("active"),e.setAttribute("aria-selected","true"),this.activeOptionId.set(e.id);}else this.activeOptionId.set(void 0);});}#i;#t;#e;toggleIsOpen(t){t.preventDefault(),t.stopPropagation(),!this.disabled()&&(this.isOpen()?this.close("fromPopover"):this.open());}open(){this.disabled()||(this.isOpen.set(true),this.searchable()&&setTimeout(()=>this.inputRef()?.nativeElement.focus()));}onShipMenuOpen(t){t.preventDefault(),t.stopPropagation(),this.open(),t.detail?.keyboard&&setTimeout(()=>{this.activeOptionIndex.set(0);},50);}#s(t,i){if(!i)return 0;let e=0,n=-1,s=0,o=true;for(let r=0;r<i.length;r++){let p=i[r];if(t.length>n+1&&t[n+1]===p)e+=r===0?100:150,n++,s++;else {let c=t.indexOf(p,n+1);if(r>0&&(o=false),c===-1)return 0;e+=100,n=c,s++;}}return o&&i.length===s&&(e+=1e3),e+=s*20,e}nextActiveIndex(t){let i=this.activeElements();if(!i.length){let n=this.optionsEl();this.activeElements.set(n),i=n;}if(t===-1||t===i.length-1)return 0;let e=t+1;return i[e].disabled?this.nextActiveIndex(e):e}prevActiveIndex(t){let i=this.activeElements();if(!i.length){let n=this.optionsEl();this.activeElements.set(n),i=n;}if(t===0||t===-1)return i.length-1;let e=t-1;return i[e].disabled?this.prevActiveIndex(e):e}close(t="closed",i){this.inputValue.set("");let e=this.inputRef()?.nativeElement;if(e&&(e.value=""),this.closeOnClick()&&((!this.keepClickedOptionActive()||t==="closed")&&this.#n(),this.isOpen.set(false),this.closed.emit(t==="active"),this.isSubmenu())){let n=this.parentMenu?.inputRef()?.nativeElement;n&&queueMicrotask(()=>n.focus());}}#n(){this.activeOptionIndex.set(-1);let t=this.optionsEl();for(let i=0;i<t.length;i++)t[i].classList.remove("active"),t[i].removeAttribute("aria-selected");}ngOnDestroy(){this.abortController&&(this.abortController.abort(),this.abortController=null);let t=m.indexOf(this);t>-1&&m.splice(t,1);}static{this.\u0275fac=function(i){return new(i||a)};}static{this.\u0275cmp=gw({type:a,selectors:[["sh-menu"]],viewQuery:function(i,e){i&1&&qg(e.inputRef,X,5)(e.optionsRef,Z,5),i&2&&hC(2);},hostVars:6,hostBindings:function(i,e){i&1&&Hg("ship-menu-open",function(s){return e.onShipMenuOpen(s)}),i&2&&Kg("disabled",e.disabled())("has-search",e.searchable())("multi-layer",e.asMultiLayer());},inputs:{asMultiLayer:[1,"asMultiLayer"],openIndicator:[1,"openIndicator"],disabled:[1,"disabled"],customOptionElementSelectors:[1,"customOptionElementSelectors"],keepClickedOptionActive:[1,"keepClickedOptionActive"],closeOnClick:[1,"closeOnClick"],isOpen:[1,"isOpen"],searchable:[1,"searchable"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:te,decls:13,vars:21,consts:[["formFieldWrapper",""],["inputRef",""],["optionsRef",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","asMultiLayer","options"],["trigger","","role","combobox","aria-haspopup","listbox",3,"click"],[1,"open-indicator"],[1,"submenu-indicator"],[1,"form-field-wrap"],[1,"small","stretch"],["type","text","placeholder","Search","role","combobox","aria-autocomplete","list"],["role","listbox",1,"options",3,"click","id"]],template:function(i,e){if(i&1){let n=ET();lC(ee),Zi(0,"sh-popover",3,0),lm("isOpenChange",function(o){return Pd(n),qC(e.isOpen,o)||(e.isOpen=o),Ld(o)}),Hg("closed",function(){return e.close("fromPopover")}),Zi(2,"div",4),Hg("click",function(o){return e.toggleIsOpen(o)}),uC(3),lT(4,ne,2,0,"sh-icon",5),lT(5,se,2,0,"sh-icon",6),Wl(),Zi(6,"div",7)(7,"sh-form-field",8),Ig(8,"input",9,1),Wl()(),Zi(10,"div",10,2),Hg("click",function(){return e.close("active")}),uC(12,1),Wl()();}i&2&&(cm("isOpen",e.isOpen),vg("disableOpenByClick",true)("asMultiLayer",e.asMultiLayer())("options",XC(20,ie)),bE(2),Kg("is-open",e.isOpen()),yg("aria-expanded",e.isOpen())("aria-controls",e.optionsId)("aria-activedescendant",e.activeOptionId()),bE(2),uT(e.openIndicator()?4:-1),bE(),uT(e.isSubmenu()?5:-1),bE(2),Kg("hidden",e.searchable()===false),bE(),yg("aria-expanded",e.isOpen())("aria-controls",e.optionsId)("aria-activedescendant",e.activeOptionId()),bE(2),Kg("searching",e.searchable()&&e.inputValue()!==""),vg("id",e.optionsId),yg("aria-activedescendant",e.activeOptionId()));},dependencies:[oe$1,Fe,N$1],styles:[`sh-menu{--menu-mh: 20rem;display:inline-flex;position:relative}sh-menu.disabled{opacity:.5;pointer-events:none}sh-menu.stretch{width:100%}sh-menu.stretch [trigger]>*{width:100%}sh-menu.has-search sh-popover .options [title]{position:sticky;border-bottom:var(--border-10)}sh-menu.has-search .form-field-wrap{margin:.5rem .5rem 0}sh-menu.has-search .options{margin:.25rem 0 0}sh-menu.multi-layer [trigger]:has(sh-icon.open-indicator).is-open .open-indicator{transform:translateY(-50%) rotate(-90deg)}sh-menu.multi-layer [trigger]:has(sh-icon.open-indicator){display:flex}sh-menu.multi-layer [trigger]:has(sh-icon.open-indicator) .open-indicator{right:1rem}sh-menu.multi-layer [trigger] button:first-child{margin-top:0}sh-menu [trigger]:has(sh-icon.open-indicator){position:relative}sh-menu [trigger]:has(sh-icon.open-indicator)>:first-child{padding-right:2rem}sh-menu [trigger]:has(sh-icon.open-indicator) .open-indicator{position:absolute;right:.5rem;top:50%;transform:translateY(-50%);color:var(--base-8);font-size:1rem;font-weight:inherit;pointer-events:none;transition:transform 75ms ease-in-out}sh-menu [trigger]:has(sh-icon.open-indicator).is-open .open-indicator{transform:translateY(-50%) rotate(-180deg)}sh-menu [trigger]:has(sh-icon.submenu-indicator){position:relative}sh-menu [trigger]:has(sh-icon.submenu-indicator)>:first-child{padding-right:2rem!important}sh-menu [trigger]:has(sh-icon.submenu-indicator) .submenu-indicator{position:absolute;right:1rem;top:50%;transform:translateY(-50%);color:var(--base-8);font-size:1rem;font-weight:inherit;pointer-events:none;transition:transform 75ms ease-in-out}sh-menu [trigger]:has(sh-icon.submenu-indicator).is-open .submenu-indicator{transform:translateY(-50%) rotate(90deg)}sh-menu sh-popover{flex:1 0}sh-menu sh-popover .popover{padding:0}sh-menu sh-popover .popover-content{overflow:hidden}sh-menu sh-popover .form-field-wrap sh-form-field{z-index:10;background-color:var(--base-1)}sh-menu sh-popover .form-field-wrap sh-form-field.hidden{opacity:0;height:0;width:0;min-width:0;min-height:0;margin:0}sh-menu sh-popover .options{z-index:2;position:relative;display:flex;flex-direction:column;gap:.25rem;padding:0;margin:0;max-height:var(--menu-mh);overflow:auto}sh-menu sh-popover .options sh-menu:first-child,sh-menu sh-popover .options button:first-child{margin-top:.5rem}sh-menu sh-popover .options.searching button[disabled]{display:none}sh-menu sh-popover .options.searching button[value="0"]{display:none}sh-menu sh-popover .options.searching>*:not(button){display:none}sh-menu sh-popover .options:after{content:"";display:block;width:100%;min-height:.25rem;order:9999999}sh-menu sh-popover .options [title]{font:var(--paragraph-30);color:var(--base-8);padding:.5rem .75rem;margin:0;-webkit-user-select:none;user-select:none;position:relative;top:0;z-index:10;background-color:var(--base-1)}sh-menu sh-popover .options button{display:flex;justify-content:flex-start;align-items:center;text-align:left;height:auto;margin:0 .5rem;padding:.25rem .5rem;gap:0 .5rem;width:calc(100% - 1rem);border-radius:var(--shape-2);appearance:none;background-color:transparent;border:0;cursor:pointer;color:var(--base-12);transition:transform 125ms linear;transform:scale(1)}sh-menu sh-popover .options button:before{content:"";min-height:1.5rem;display:inline-block;width:0;margin-right:-.5rem}sh-menu sh-popover .options button:active{transform:scale(.98)}sh-menu sh-popover .options button[disabled]{opacity:.3;cursor:initial}sh-menu sh-popover .options button[disabled]:hover{background-color:transparent}sh-menu sh-popover .options button [suffix]{order:999;color:var(--base-8);font:var(--paragraph-30);justify-self:flex-end;display:inline-flex;flex:1 0;justify-content:flex-end}sh-menu sh-popover .options button sh-icon{font-size:1rem}sh-menu sh-popover .options button.active,sh-menu sh-popover .options button:hover{background-color:var(--base-2);color:var(--base-12)}sh-menu sh-popover .options button.focused{background-color:var(--primary-2);color:var(--base-12)}sh-menu sh-popover .options button.focused:hover{background-color:var(--primary-3)}
|
|
2
2
|
`],encapsulation:2});}}return a})();export{ve as v};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {d}from'./chunk-gId840Er.js';import'./chunk-CSrYlKTK.js';import'./chunk-Kq2ZFJSk.js';import'./chunk-zOY5leQB.js';import'./chunk-29_4gGIi.js';import'./chunk-BEUeHgR9.js';import {J as J$1}from'./chunk-CGnjVnmu.js';import'./chunk-BJOhC2d8.js';import {I as Ie,L as Le$1}from'./chunk-fDWfSg6Y.js';import'./chunk-DuRr4rDS.js';import'./chunk-C1py21yb.js';import'./chunk-D38QrkIM.js';import'./chunk-3YzyUT-a.js';import {D}from'./chunk-CKUlUN3q.js';import {T,ab as J,e as ee,ai as fe,a5 as m,G as Ge$1,N as Nt,aj as m$1,ak as l,ad as sy,C as Zu,g as gw,v,a as N,aJ as m$2,b3 as m$3,Z as Zi,o as oC,W as Wl,l as lT,w as Hg,d as Ig,F as Fg,j as jg,b as bE,c as uT,z as vg,i as ET,a1 as pT,n as lm,P as Pd,h as aC,p as qC,L as Ld,a2 as hT,y as cm,t as bD,H as HC,M as MD,K as Kg,aa as Yl,as as Yp,aO as sb,av as Vg,aT as cb,aw as iC,aP as lb}from'./main-2ZYVV4C4.js';import {f}from'./chunk-CFgDqLU0.js';import {d as d$1}from'./chunk-BGuvkLC9.js';import {F as Fe$1}from'./chunk-DBkkb6OR.js';import {B as Bn,Z as Ze,R as Rn,J as Jt}from'./chunk-iGzJokt-.js';import {a as at}from'./chunk-DneBfCBh.js';import {U}from'./chunk-CnZx831x.js';import'./chunk-Cm7JSdTO.js';var Fe=(n,t)=>t.BackupId;function Pe(n,t){n&1&&(Zi(0,"div",14),Ig(1,"sh-progress-bar",20),Zi(2,"p"),oC(3,3),Wl()());}function Me(n,t){n&1&&(Zi(0,"div",15)(1,"p"),oC(2,4),Wl()());}function he(n,t){if(n&1){let e=ET();Zi(0,"sh-icon",33),Hg("click",function(){Pd(e);let o=aC(3);return Ld(o.searchTerm.set(""))}),HC(1,"x-circle"),Wl();}}function Le(n,t){if(n&1){let e=ET();Zi(0,"div",27)(1,"sh-form-field")(2,"input",28),lm("ngModelChange",function(o){Pd(e);let c=aC(2);return qC(c.searchTerm,o)||(c.searchTerm=o),Ld(o)}),Wl(),bD(),Zi(3,"sh-icon",29),HC(4,"magnifying-glass"),Wl(),lT(5,he,2,0,"sh-icon",30),Wl()(),Zi(6,"div",31)(7,"button",32),Hg("click",function(){Pd(e);let o=aC(2);return Ld(o.selectAll())}),oC(8,6),Wl(),Zi(9,"button",32),Hg("click",function(){Pd(e);let o=aC(2);return Ld(o.selectNone())}),oC(10,7),Wl()();}if(n&2){let e=aC(2);bE(2),cm("ngModel",e.searchTerm),MD(),bE(3),uT(e.searchTerm()?5:-1),bE(2),vg("disabled",e.allSelected()),bE(2),vg("disabled",e.noneSelected());}}function ye(n,t){if(n&1&&(Zi(0,"div"),oC(1,8),sb(2,"bytes"),Wl()),n&2){let e=aC().$implicit;bE(2),Vg(cb(2,1,e.Metadata?.SourceFilesSize)),iC(1);}}function Ae(n,t){if(n&1&&(Zi(0,"div"),oC(1,9),sb(2,"bytes"),Wl()),n&2){let e=aC().$implicit;bE(2),Vg(cb(2,1,e.Metadata?.TargetFilesSize)),iC(1);}}function Re(n,t){if(n&1&&(Zi(0,"div"),oC(1,10),sb(2,"relativeTime"),Wl()),n&2){let e=aC().$implicit;bE(2),Vg(lb(2,1,e.Metadata?.LastBackupFinished,false)),iC(1);}}function Ge(n,t){if(n&1){let e=ET();Zi(0,"sh-card",34),Hg("click",function(){let o=Pd(e).$implicit,c=aC(2);return Ld(c.toggleSelected(o.BackupId))}),Zi(1,"sh-checkbox",35),lm("checkedChange",function(o){let c=Pd(e).$implicit;return qC(c.Selected,o)||(c.Selected=o),Ld(o)}),Zi(2,"h3"),HC(3),Zi(4,"sh-chip",36),Ig(5,"img",37),HC(6),Wl()()(),Zi(7,"div",38),lT(8,ye,3,3,"div"),lT(9,Ae,3,3,"div"),lT(10,Re,3,4,"div"),Wl()();}if(n&2){let e=t.$implicit,i=aC(2);Kg("unmatched",e.Match===false),bE(),cm("checked",e.Selected),bE(2),Yl(" ",e.Name," "),bE(2),vg("src",i.getBackendIcon(e.TargetURLDisplay),Yp),bE(),Yl(" ",i.getBackendType(e.TargetURLDisplay)," "),bE(2),uT(e.Metadata?.SourceFilesSize?8:-1),bE(),uT(e.Metadata?.TargetFilesSize?9:-1),bE(),uT(e.Metadata?.LastBackupFinished?10:-1);}}function De(n,t){if(n&1){let e=ET();Zi(0,"sh-toggle",26),lm("checkedChange",function(o){Pd(e);let c=aC(2);return qC(c.saveNow,o)||(c.saveNow=o),Ld(o)}),Fg(1,11),Ig(2,"sh-icon",39),jg(),Wl();}if(n&2){let e=aC(2);vg("color","primary"),cm("checked",e.saveNow),bE(2),vg("shTooltip","Save backups without editing the configuration");}}function ke(n,t){n&1&&(Zi(0,"sh-toggle",25),Fg(1,12),Ig(2,"sh-icon",39),jg(),Wl()),n&2&&(vg("color","primary")("checked",true)("disabled",true),bE(2),vg("shTooltip","Save now can only be disabled when importing a single backup"));}function $e(n,t){if(n&1){let e=ET();lT(0,Le,11,4),Zi(1,"div",21),pT(2,Ge,11,9,"sh-card",22,Fe),Wl(),Zi(4,"div",23),lT(5,De,3,3,"sh-toggle",24)(6,ke,3,4,"sh-toggle",25),Zi(7,"sh-toggle",26),lm("checkedChange",function(o){Pd(e);let c=aC();return qC(c.importMetadata,o)||(c.importMetadata=o),Ld(o)}),oC(8,5),Wl()();}if(n&2){let e=aC();uT(e.configs().length>1?0:-1),bE(2),hT(e.configsSorted()),bE(3),uT(e.selectedItems().length<=1?5:6),bE(2),vg("color","primary"),cm("checked",e.importMetadata);}}function be(n,t){n&1&&oC(0,2,1);}function xe(n,t){n&1&&oC(0,2,2);}var K=class n{#t=T(d);#n=T(J);#e=T(ee);#i=T(fe);#o=T(m);getBackendType=Ie;getBackendIcon=Le$1;isLoading=Ge$1(true);isImporting=Ge$1(false);configs=Ge$1([]);saveNow=Ge$1(false);importMetadata=Ge$1(false);searchTerm=Ge$1("");allSelected=Nt(()=>this.selectedItems().length===this.configs().length);noneSelected=Nt(()=>this.selectedItems().length===0);configsSorted=Nt(()=>{let t=this.searchTerm().toLowerCase();return this.configs().map(e=>m$1(l({},e),{Match:t?e.Name?.toLowerCase().includes(t):null})).sort((e,i)=>(e.Name??"").localeCompare(i.Name??"")).sort((e,i)=>e.Match===i.Match?0:e.Match?-1:1)});ngOnInit(){let t=this.#t.temporaryBackupId();if(!t){this.#e.navigate(["/backup/import-destination/destination"]);return}sy(()=>this.#n.postApiV1BackupByIdRestoreTaskConfig({path:{id:t}})).pipe(Zu(()=>this.isLoading.set(false))).subscribe({next:e=>{let i=e.sort((o,c)=>(o.Name??"").localeCompare(c.Name??"")).map(o=>m$1(l({},o),{Selected:e.length===1}));this.configs.set(i);},error:e=>{this.#t.showErrorDialog(e.message||"Failed to fetch configurations");}});}toggleSelected(t){this.configs.update(e=>e.map(i=>i.BackupId===t?m$1(l({},i),{Selected:!i.Selected}):i));}selectAll(){this.configs.update(t=>t.map(e=>m$1(l({},e),{Selected:true})));}selectNone(){this.configs.update(t=>t.map(e=>m$1(l({},e),{Selected:false})));}selectedItems=Nt(()=>this.configs().filter(t=>t.Selected));import(){let t=this.selectedItems();if(t.length===0)return;let e=this.importMetadata(),i=this.saveNow()||t.length!==1;this.isImporting.set(true);let o=c=>{if(c>=t.length){this.isImporting.set(false),this.#i.success($localize`Successfully imported ${t.length} backup(s)`),this.#e.navigate(["/"]);return}let N=t[c];sy(()=>this.#n.postApiV1BackupByIdImportfromtemp({body:{BackupId:N.BackupId,ImportMetadata:e,Direct:i}})).subscribe({next:u=>{if(i)this.configs.update(I=>I.filter(G=>G.BackupId!==N.BackupId)),o(c+1);else {this.isImporting.set(false);let I=this.#o.addDraftBackup(u.data);this.#e.navigate(["/backup-draft",I]);}},error:u=>{this.isImporting.set(false),this.#t.showErrorDialog(`Failed to import ${N.Name}: ${u.message}`);}});};o(0);}back(){this.#e.navigate(["/backup/import-destination/encryption"]);}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=gw({type:n,selectors:[["app-import-destination-select-config"]],decls:14,vars:4,consts:()=>{let t;t=$localize`Select configurations to import`;let e;e=$localize`Back`;let i;i=$localize`${"\uFFFD*12:1\uFFFD"}:START_BLOCK_IF: Importing... ${"\uFFFD/*12:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*13:2\uFFFD"}:START_BLOCK_ELSE: Import selected ${"\uFFFD/*13:2\uFFFD"}:CLOSE_BLOCK_ELSE:`;let o;o=$localize`Fetching backup configurations from destination...`;let c;c=$localize`No backup configurations found at this destination.`;let N;N=$localize`Import metadata`;let u;u=$localize`Search for destination...`;let I;I=$localize`Select all`;let G;G=$localize`Select none`;let U;U=$localize` Source size: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let J;J=$localize` Target size: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let X;X=$localize` Last backup: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let z;z=$localize` Save now ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let V;return V=$localize` Save now ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON: info ${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`,[t,e,i,o,c,N,I,G,U,J,X,z,V,[1,"content-wrapper"],[1,"loading-state"],[1,"empty-state"],[1,"actions"],["shButton","",3,"click","disabled"],[1,"spacer"],["shButton","",1,"primary","raised",3,"click","disabled"],[1,"primary","indeterminate"],[1,"config-list"],[1,"type-a","actionable","full-width",3,"unmatched"],[1,"options"],[3,"color","checked"],[3,"color","checked","disabled"],[3,"checkedChange","color","checked"],[1,"search-area"],["type","text","placeholder",u,3,"ngModelChange","ngModel"],["prefix",""],["suffix","",1,"clear-search"],[1,"list-actions"],["shButton","",1,"small",3,"click","disabled"],["suffix","",1,"clear-search",3,"click"],[1,"type-a","actionable","full-width",3,"click"],[1,"primary","raised",3,"checkedChange","checked"],[1,"small","provider"],["alt","",1,"provider-icon",3,"src"],[1,"metadata"],[1,"small",3,"shTooltip"]]},template:function(e,i){e&1&&(Zi(0,"div",13)(1,"h2"),oC(2,0),Wl(),lT(3,Pe,4,0,"div",14)(4,Me,3,0,"div",15)(5,$e,9,4),Zi(6,"div",16)(7,"button",17),Hg("click",function(){return i.back()}),oC(8,1),Wl(),Ig(9,"div",18),Zi(10,"button",19),Hg("click",function(){return i.import()}),Fg(11,2),lT(12,be,1,0)(13,xe,1,0),jg(),Wl()()()),e&2&&(bE(3),uT(i.isLoading()?3:i.configs().length===0?4:5),bE(4),vg("disabled",i.isImporting()),bE(3),vg("disabled",i.isImporting()||i.selectedItems().length===0||i.isLoading()),bE(2),uT(i.isImporting()?12:13));},dependencies:[v,f,J$1,U,Bn,Ze,Rn,Jt,d$1,at,N,D,Fe$1,m$2,m$3],styles:["[_nghost-%COMP%]{display:block;padding:2rem;max-width:50rem;margin:0 auto}.loading-state[_ngcontent-%COMP%], .empty-state[_ngcontent-%COMP%]{text-align:center;padding:4rem 2rem}.loading-state[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .empty-state[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-top:1rem;color:var(--color-on-surface-variant)}h2[_ngcontent-%COMP%]{margin-bottom:2rem}.search-area[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:1rem;margin-bottom:2rem}.list-actions[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:.5rem;margin-bottom:.5rem;justify-content:flex-end}.clear-search[_ngcontent-%COMP%]{opacity:.6;cursor:pointer}.config-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;margin-bottom:2rem}.config-list[_ngcontent-%COMP%] sh-card[_ngcontent-%COMP%]{padding:1rem;cursor:pointer;display:flex;flex-direction:column;gap:.5rem}.config-list[_ngcontent-%COMP%] sh-card.unmatched[_ngcontent-%COMP%]{opacity:.4}.config-list[_ngcontent-%COMP%] sh-card[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:.5rem;flex-grow:1}.config-list[_ngcontent-%COMP%] sh-card[_ngcontent-%COMP%] .provider[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.config-list[_ngcontent-%COMP%] sh-card[_ngcontent-%COMP%] .metadata[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;margin-left:1.75rem}.provider-icon[_ngcontent-%COMP%]{width:1.25rem;height:1.25rem}.options[_ngcontent-%COMP%]{margin-bottom:2rem;display:flex;flex-direction:column;gap:1rem}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;margin-top:2rem}.actions[_ngcontent-%COMP%] .spacer[_ngcontent-%COMP%]{flex:1}"]})};export{K as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {t as te}from'./chunk-DmCJ7w-M.js';import'./chunk-C1-31fA7.js';import'./chunk-iU19kwHx.js';import'./chunk-C185qUb-.js';import'./chunk-DuRr4rDS.js';import'./chunk-C1py21yb.js';import'./chunk-3YzyUT-a.js';import'./chunk-CKUlUN3q.js';import {T,ax as W,a5 as m,ab as J,a6 as be,G as Ge,aI as pt,N as Nt,Q as Qa,ad as sy,aG as jo,C as Zu,au as h,g as gw,v,a as N,_ as _t,d as Ig,Z as Zi,F as Fg,j as jg,W as Wl,o as oC,w as Hg,n as lm,t as bD,l as lT,b as bE,av as Vg,aw as iC,K as Kg,z as vg,x as xC,y as cm,M as MD,c as uT,p as qC,aV as ay,aW as cy,H as HC}from'./main-2ZYVV4C4.js';import'./chunk-BGuvkLC9.js';import {F as Fe}from'./chunk-DBkkb6OR.js';import {B as Bn,Z as Ze,R as Rn,J as Jt}from'./chunk-iGzJokt-.js';import {a as at}from'./chunk-DneBfCBh.js';import'./chunk-Bq_vr6Q3.js';import'./chunk-D9jPw9Ov.js';import {L,F}from'./chunk-Cm7JSdTO.js';import'./chunk-CnZx831x.js';function pe(_,t){_&1&&(Zi(0,"sh-icon",20),HC(1,"spinner"),Wl());}function he(_,t){_&1&&(Zi(0,"sh-icon",21),HC(1,"check"),Wl());}function Te(_,t){_&1&&(Zi(0,"sh-icon",22),HC(1,"warning"),Wl()),_&2&&vg("shTooltip","File not found");}function Se(_,t){let a=F(_).pipe(ay(t),cy());return L(a,{initialValue:_()})}var f=class _{#o=T(W);#s=T(m);#e=T(J);#a=T(be);#t=Ge("");backupId=L(this.#o.params.pipe(pt(t=>t.id)));activeBackup=Nt(()=>this.#s.backups().find(t=>t.Backup?.ID===this.backupId()));backupFilePath=Ge("");lastValidatedPath=Ge("");isValidatedPath=Nt(()=>this.lastValidatedPath()===this.backupFilePath());pathHasChanged=Nt(()=>this.backupFilePath()!==this.#t());isValidatingPath=Ge(false);#i=Se(this.backupFilePath,500);#n=Ge(false);isWaitingForValidation=Nt(()=>this.#i()!=this.backupFilePath()||this.isValidatingPath());backupFilePathEffect=Qa(()=>{let t=this.#i();this.activeBackup();this.#n();t!==""&&(this.isValidatingPath.set(true),sy(()=>this.#e.postApiV1FilesystemValidate({body:{path:t}})).pipe(jo(1),Zu(()=>this.isValidatingPath.set(false))).subscribe(()=>this.lastValidatedPath.set(t)));});isRestoring=Ge(false);isRepairing=Ge(false);isDeleting=Ge(false);isSavingDbPath=Ge(false);isSavingAndRepairing=Ge(false);isMovingDb=Ge(false);isCreatingBugReport=Ge(false);createdReport=Ge(false);isCompacting=Ge(false);activeBackupEffect=Qa(()=>{let t=this.activeBackup();if(!t)return;let a=t.Backup?.DBPath??"";this.backupFilePath.set(a),this.#t.set(a);});repairDatabase(){this.isRepairing.set(true),sy(()=>this.#e.postApiV1BackupByIdRepair({path:{id:this.backupId()}})).pipe(jo(1),Zu(()=>this.isRepairing.set(false))).subscribe();}deleteDatabase(t=null){this.isValidatedPath()?this.#a.open(h,{data:{title:$localize`Confirm delete?`,message:$localize`Do you really want to delete the database for ${this.activeBackup()?.Backup?.Name}?`,confirmText:$localize`Delete database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doDeleteDatabase(t);}}):this.doDeleteDatabase(t);}doDeleteDatabase(t=null){this.isDeleting.set(true),sy(()=>this.#e.postApiV1BackupByIdDeletedb({path:{id:this.backupId()}})).pipe(jo(1),Zu(()=>this.isDeleting.set(false))).subscribe(()=>{this.lastValidatedPath.set(""),t?.();});}restoreDatabase(){this.isValidatedPath()?this.deleteDatabase(()=>{this.doRepairDatabase();}):this.doRepairDatabase();}doRepairDatabase(){this.isRestoring.set(true),sy(()=>this.#e.postApiV1BackupByIdRepair({path:{id:this.backupId()},body:{}})).pipe(jo(1),Zu(()=>this.isRestoring.set(false))).subscribe();}resetDatabasePath(){this.backupFilePath.set(this.#t());}saveDatabasePath(t=null){this.isValidatedPath()?this.#a.open(h,{data:{title:$localize`Confirm reassign?`,message:$localize`The target database path already exists and may belong to another backup. Are you sure you want to assign this backup to an existing database?`,confirmText:$localize`Assign existing database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doSaveDatabasePath(t);}}):this.doSaveDatabasePath(t);}doSaveDatabasePath(t=null){this.isSavingDbPath.set(true);let a=this.backupFilePath();sy(()=>this.#e.postApiV1BackupByIdUpdatedb({path:{id:this.backupId()},body:{path:a}})).pipe(Zu(()=>this.isSavingDbPath.set(false))).subscribe(()=>{this.#t.set(a),t?.();});}saveAndRepairDatabasePath(){this.saveDatabasePath(()=>(this.isSavingAndRepairing.set(true),sy(()=>this.#e.postApiV1BackupByIdRepair({path:{id:this.backupId()}})).pipe(jo(1),Zu(()=>this.isSavingAndRepairing.set(false))).subscribe()));}moveDatabasePath(){this.isMovingDb.set(true);let t=this.backupFilePath();sy(()=>this.#e.postApiV1BackupByIdMovedb({path:{id:this.backupId()},body:{path:t}})).pipe(Zu(()=>this.isMovingDb.set(false))).subscribe(()=>{this.#n.update(a=>!a),this.#t.set(t);});}createErrorReport(){this.isCreatingBugReport.set(true),sy(()=>this.#e.postApiV1BackupByIdCreatereport({path:{id:this.backupId()}})).pipe(Zu(()=>this.isCreatingBugReport.set(false))).subscribe({next:()=>{this.createdReport.set(true),window.setTimeout(()=>this.createdReport.set(false),3e3);}});}compactDatabase(){this.isCompacting.set(true),sy(()=>this.#e.postApiV1BackupByIdCompact({path:{id:this.backupId()}})).pipe(Zu(()=>this.isCompacting.set(false))).subscribe();}static \u0275fac=function(a){return new(a||_)};static \u0275cmp=gw({type:_,selectors:[["app-database"]],decls:53,vars:24,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let a;a=$localize`Local database for ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. This makes it faster to perform many operations, and reduces the amount of data that needs to be downloaded for each operation. `;let r;r=$localize`Maintenance`;let g;g=$localize` If the backup and the remote storage is out of sync, Duplicati will require that you perform a repair operation to synchronize the database. If the repair is unsuccessful, you can delete the local database and re-generate. The bug report button can be used to create a copy of the database with path information removed. This should only be used if a developer requests to investigate an issue with your database. `;let I;I=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Repair `;let M;M=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:trash${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let R;R=$localize`${"\uFFFD#25\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SH_ICON: Recreate (delete and repair) `;let B;B=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:file-plus${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Create bug report database `;let O;O=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:file-archive${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: Compact `;let $;$=$localize`Placement`;let v;v=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:backspace${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Reset `;let k;k=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SH_ICON:floppy-disk${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SH_ICON: Save `;let y;y=$localize`${"\uFFFD#49\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#49\uFFFD"}:CLOSE_TAG_SH_ICON: Save & Repair `;let G;return G=$localize`${"\uFFFD#52\uFFFD"}:START_TAG_SH_ICON:flow-arrow${"\uFFFD/#52\uFFFD"}:CLOSE_TAG_SH_ICON: Move existing database `,[t,a,e,r,g,I,M,R,B,O,$,v,k,y,G,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"actions","maintenance"],["shButton","",3,"click","disabled"],["type","text",3,"ngModelChange","ngModel"],["prefix","",1,"primary"],["prefix",""],["prefix","",3,"shTooltip"],[1,"actions","placement"]]},template:function(a,e){a&1&&(Ig(0,"app-status-bar"),Zi(1,"section")(2,"div",15)(3,"button",16),Fg(4,0),Ig(5,"sh-icon"),jg(),Wl()(),Zi(6,"article")(7,"h1"),oC(8,1),Wl(),Zi(9,"p"),oC(10,2),Wl()(),Zi(11,"article")(12,"h2"),oC(13,3),Wl(),Zi(14,"p"),oC(15,4),Wl(),Zi(16,"div",17)(17,"button",18),Hg("click",function(){return e.repairDatabase()}),Fg(18,5),Ig(19,"sh-icon"),jg(),Wl(),Zi(20,"button",18),Hg("click",function(){return e.deleteDatabase()}),Fg(21,6),Ig(22,"sh-icon"),jg(),Wl(),Zi(23,"button",18),Hg("click",function(){return e.restoreDatabase()}),Fg(24,7),Ig(25,"sh-icon"),jg(),Wl(),Zi(26,"button",18),Hg("click",function(){return e.createErrorReport()}),Fg(27,8),Ig(28,"sh-icon"),jg(),Wl(),Zi(29,"button",18),Hg("click",function(){return e.compactDatabase()}),Fg(30,9),Ig(31,"sh-icon"),jg(),Wl()()(),Zi(32,"article")(33,"h2"),oC(34,10),Wl(),Zi(35,"sh-form-field")(36,"input",19),lm("ngModelChange",function(g){return qC(e.backupFilePath,g)||(e.backupFilePath=g),g}),Wl(),bD(),lT(37,pe,2,0,"sh-icon",20)(38,he,2,0,"sh-icon",21)(39,Te,2,1,"sh-icon",22),Wl(),Zi(40,"div",23)(41,"button",18),Hg("click",function(){return e.resetDatabasePath()}),Fg(42,11),Ig(43,"sh-icon"),jg(),Wl(),Zi(44,"button",18),Hg("click",function(){return e.saveDatabasePath()}),Fg(45,12),Ig(46,"sh-icon"),jg(),Wl(),Zi(47,"button",18),Hg("click",function(){return e.saveAndRepairDatabasePath()}),Fg(48,13),Ig(49,"sh-icon"),jg(),Wl(),Zi(50,"button",18),Hg("click",function(){return e.moveDatabasePath()}),Fg(51,14),Ig(52,"sh-icon"),jg(),Wl()()()()),a&2&&(bE(8),Vg(e.activeBackup()?.Backup?.Name),iC(8),bE(9),Kg("loading",e.isRepairing()),vg("disabled",!e.isValidatedPath()||e.pathHasChanged()),bE(3),Kg("loading",e.isDeleting()),vg("disabled",!e.isValidatedPath()||e.pathHasChanged()),bE(3),Kg("loading",e.isRestoring()),vg("disabled",e.pathHasChanged()),bE(3),Kg("loading",e.isCreatingBugReport()),vg("disabled",e.isCreatingBugReport()||!e.isValidatedPath()||e.pathHasChanged()),bE(3),Kg("loading",e.isCompacting()),vg("disabled",e.isCompacting()||!e.isValidatedPath()||e.pathHasChanged()),bE(6),xC(e.isValidatedPath()?"success":"error"),bE(),cm("ngModel",e.backupFilePath),MD(),bE(),uT(e.isWaitingForValidation()?37:e.isValidatedPath()?38:39),bE(4),vg("disabled",!e.pathHasChanged()),bE(3),vg("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),bE(3),vg("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),bE(3),vg("disabled",!e.pathHasChanged()||e.isValidatedPath()||e.isWaitingForValidation()));},dependencies:[Bn,Ze,Rn,Jt,te,v,Fe,N,at,_t],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem}article[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}h1[_ngcontent-%COMP%]{font:var(--title-20)}h2[_ngcontent-%COMP%]{font:var(--title-30)}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"]})};export{f as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {v as ve}from'./chunk-DuRr4rDS.js';import {N as Nt$1}from'./chunk-C1py21yb.js';import {F as Fe}from'./chunk-DBkkb6OR.js';import {B as Bn,Z as Ze,e as en,R as Rn,J as Jt,D}from'./chunk-iGzJokt-.js';import {E as E1,G as Ge,N as Nt,Q as Qa,g as gw,S as lC,Z as Zi,Y as uC,W as Wl,n as lm,p as qC,t as bD,b4 as cg,b as bE,aE as yg,z as vg,y as cm,M as MD,ah as Yg,aF as JC,v,o as oC,aR as zl,a1 as pT,aS as Ql,av as Vg,aw as iC,a2 as hT,aq as dT,i as ET,w as Hg,P as Pd,h as aC,L as Ld,H as HC,aD as sm}from'./main-2ZYVV4C4.js';var ne=[[["label"]],[["","prefix",""]],[["","suffix",""]]],ie=["label","[prefix]","[suffix]"],oe=["ngProjectAs","label",5,["label"]];function ae(i,e){if(i&1&&HC(0),i&2){let t=e.$implicit,n=aC();sm("",t.label,"",n.hasPerSecond()?"/s":"");}}var se=["throttle-upload","throttle-download"],re=[{value:"B",label:"Bytes"},{value:"KB",label:"KB"},{value:"MB",label:"MB"},{value:"GB",label:"GB"},{value:"TB",label:"TB"},{value:"PB",label:"PB"}],le=i=>{if(!i||typeof i!="string"||i.length===0)return {size:0,unit:"MB"};let e=i.match(/^(\d+)(bytes|kb|mb|gb|tb|pb|b|kib|mib|gib|tib|pib)$/i);return e&&(e[2].toUpperCase()==="B"||e[2].toUpperCase()==="BYTES")?{size:1,unit:"KB"}:{size:e?parseInt(e[1],10):0,unit:e?e[2].toUpperCase():"MB"}},q=class i{customId=E1();inputType=E1();timespan=Ge(0);unit=Ge("MB");sizeOptions=Ge(re);readonly=Ge(false);hasPerSecond=Nt(()=>{let e=this.inputType();return e&&se.includes(e)});onChange=()=>{};onTouched=()=>{};onChangeEffect=Qa(()=>{this.onChange(this.getValue());});writeValue(e){if(e){let t=le(e);t?queueMicrotask(()=>{this.timespan.set(t.size),this.unit.set(t.unit);}):(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=gw({type:i,selectors:[["app-size"]],inputs:{customId:[1,"customId"],inputType:[1,"inputType"]},features:[JC([{provide:D,useExisting:i,multi:true}])],ngContentSelectors:ie,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&&(lC(ne),Zi(0,"div",0),uC(1,0,oe),Wl(),Zi(2,"sh-form-field")(3,"input",1),lm("ngModelChange",function(o){return qC(n.timespan,o)||(n.timespan=o),o}),Wl(),bD(),uC(4,1),uC(5,2),Wl(),Zi(6,"sh-select",2)(7,"input",3),lm("ngModelChange",function(o){return qC(n.unit,o)||(n.unit=o),o}),Wl(),bD(),cg(8,ae,1,2,"ng-template"),Wl()),t&2&&(bE(2),yg("readonly",n.readonly()||void 0),bE(),vg("id",n.customId()),cm("ngModel",n.timespan),vg("disabled",n.readonly()),MD(),bE(3),Yg("--miw",0),vg("options",n.sizeOptions())("readonly",n.readonly())("isClearable",false),bE(),cm("ngModel",n.unit),MD());},dependencies:[Nt$1,Fe,Bn,Ze,en,Rn,Jt],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%] sh-form-field[_ngcontent-%COMP%]{grid-area:input}[_nghost-%COMP%] sh-select[_ngcontent-%COMP%]{grid-area:unit}']})};var pe=[[["label"]],[["","prefix",""]],[["","suffix",""]]],ue=["label","[prefix]","[suffix]"],de=["ngProjectAs","label",5,["label"]];function me(i,e){if(i&1){let t=ET();Zi(0,"button",7),Hg("click",function(){let l=Pd(t).$implicit,o=aC();return Ld(o.updateUnit(l.value))}),oC(1,1),Wl();}if(i&2){let t=e.$implicit;bE(),Vg(t.label),iC(1);}}var ce=[{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],ge=[{value:"Y",label:$localize`Years`},{value:"M",label:$localize`Months`},{value:"W",label:$localize`Weeks`},{value:"D",label:$localize`Days`}],_e=["retry-delay","web-timeout","read-write-timeout","run-script-timeout","list-timeout","short-timeout","long-database-query-threshold"],Z=class i{customId=E1();inputType=E1();timespan=Ge(0);#e="D";unit=Ge(this.#e);unitLabel=Nt(()=>{let e=this.timeOptions(),t=e.findIndex(n=>n.value===this.unit());return e[t]?.label??this.unit()});isShortTime=Nt(()=>{let e=this.inputType();return e&&_e.includes(e.replace("--",""))});timeOptions=Nt(()=>this.isShortTime()?ce:ge);readonly=Ge(false);onChange=()=>{};onTouched=()=>{};onChangeEffect=Qa(()=>{this.onChange(this.getValue());});inputTypeEffect=Qa(()=>{this.timeOptions();let 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,l=e.match(n);l?(this.timespan.set(parseInt(l[1],10)),this.unit.set(l[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=gw({type:i,selectors:[["app-timespan"]],inputs:{customId:[1,"customId"],inputType:[1,"inputType"]},features:[JC([{provide:D,useExisting:i,multi:true}])],ngContentSelectors:ue,decls:11,vars:6,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"],["shButton","","type","button",1,"trigger"],["menu",""],["shButton","","type","button",1,"small"],["shButton","","type","button",1,"small",3,"click"]]},template:function(t,n){t&1&&(lC(pe),uC(0,0,de),Zi(1,"sh-form-field")(2,"input",2),lm("ngModelChange",function(o){return qC(n.timespan,o)||(n.timespan=o),o}),Wl(),bD(),uC(3,1),uC(4,2),Wl(),Zi(5,"sh-menu",3)(6,"button",4),oC(7,0),Wl(),zl(8,5),pT(9,me,2,1,"button",6,dT),Ql(),Wl()),t&2&&(bE(),yg("readonly",n.readonly()||void 0),bE(),vg("id",n.customId()),cm("ngModel",n.timespan),vg("disabled",n.readonly()),MD(),bE(3),vg("openIndicator",true),bE(2),Vg(n.unitLabel()),iC(7),bE(2),hT(n.timeOptions()));},dependencies:[ve,Fe,Bn,Ze,en,Rn,Jt,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%] sh-form-field[_ngcontent-%COMP%]{grid-area:input}[_nghost-%COMP%] sh-menu[_ngcontent-%COMP%]{grid-area:unit}[_nghost-%COMP%] sh-menu[_ngcontent-%COMP%] button.trigger[_ngcontent-%COMP%]{width:100%}']})};export{Z,le as l,q};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t=[{path:"",redirectTo:"destination",pathMatch:"full"},{path:"destination",loadComponent:()=>import('./chunk-D04TnMUn.js')},{path:"encryption",loadComponent:()=>import('./chunk-gId840Er.js').then(function(n){return n.c})},{path:"select-config",loadComponent:()=>import('./chunk-Dv_fBX0w.js')}],o=t;export{o as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {t as te$1}from'./chunk-DmCJ7w-M.js';import'./chunk-C1-31fA7.js';import'./chunk-iU19kwHx.js';import'./chunk-C185qUb-.js';import'./chunk-DuRr4rDS.js';import'./chunk-C1py21yb.js';import {c}from'./chunk-3YzyUT-a.js';import'./chunk-CKUlUN3q.js';import {T,a5 as m,ab as J,g as gw,v,a as N,_ as _t,d as Ig,Z as Zi,o as oC,W as Wl,b7 as lg,b8 as sT,l as lT,w as Hg,F as Fg,j as jg,b as bE,b9 as aT,c as uT,z as vg,a3 as XC,H as HC,h as aC,a1 as pT,aq as dT,a2 as hT,b0 as eb,av as Vg,aw as iC,aD as sm}from'./main-2ZYVV4C4.js';import {f}from'./chunk-CFgDqLU0.js';import {d}from'./chunk-BGuvkLC9.js';import'./chunk-DBkkb6OR.js';import'./chunk-iGzJokt-.js';import'./chunk-DneBfCBh.js';import'./chunk-Bq_vr6Q3.js';import'./chunk-D9jPw9Ov.js';import'./chunk-CnZx831x.js';import'./chunk-Cm7JSdTO.js';var K=()=>[f,v,N,_t],Q=()=>["/restore-from-files"],U=()=>["/restore/from-config"],Y=n=>["/restore",n];function Z(n,i){if(n&1&&(Zi(0,"sh-card",10),Hg("keydown.enter",function(r){return r.target.click()})("keydown.space",function(r){return r.target.click()}),Ig(1,"img",16),Zi(2,"div",12)(3,"h3"),oC(4,7),Wl(),Zi(5,"p"),HC(6),Wl()(),Zi(7,"button",13),Fg(8,8),Ig(9,"sh-icon"),jg(),Wl()()),n&2){let e=i.$implicit;vg("routerLink",eb(4,Y,e.Backup.ID)),bE(4),Vg(e.Backup.Name??"Backup name missing"),iC(4),bE(2),sm(" ",e.Backup.Metadata?.SourceSizeString??"-"," / ",e.Backup.Metadata?.BackupListCount??"-"," ");}}function ee(n,i){if(n&1&&pT(0,Z,10,6,"sh-card",15,dT),n&2){let e=aC(2);hT(e.backups());}}function ne(n,i){if(n&1&&lT(0,ee,2,0),n&2){let e=aC();uT(e.backups().length?0:-1);}}function te(n,i){n&1&&(Zi(0,"div",17),Ig(1,"sh-progress-bar",18),Zi(2,"div",12)(3,"h3"),oC(4,9),Wl()()());}function oe(n,i){n&1&&(Zi(0,"sh-divider"),HC(1,"Or without a local configuration"),Wl());}var M=class n{#e=T(m);#n=T(J);backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;ngOnInit(){this.#e.getBackups(true);}restoreNow(i){}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=gw({type:n,selectors:[["app-restore"]],decls:29,vars:6,consts:()=>{let i;i=$localize`Where do you want to restore from?`;let e;e=$localize`Direct restore from backup files`;let r;r=$localize`Point to your backup files and restore from there.`;let E;E=$localize` Start ${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:play-circle${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON:`;let _;_=$localize`Restore from configuration`;let h;h=$localize`Load destination from an exported job`;let I;I=$localize` Start ${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:play-circle${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON:`;let y;y=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let $;$=$localize` Restore ${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON:`;let k;return k=$localize`Loading backups...`,[i,e,r,E,_,h,I,y,$,k,[1,"type-a","actionable",3,"keydown.enter","keydown.space","routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["shButton","","tabindex","-1"],["src","assets/images/restore.png","alt","","width","48px"],[1,"type-a","actionable",3,"routerLink"],["src","assets/images/folder.png","alt","","width","48px"],[1,"loading-list"],[1,"indeterminate","primary"]]},template:function(e,r){e&1&&(Ig(0,"app-status-bar"),Zi(1,"section")(2,"h2"),oC(3,0),Wl(),lg(4,ne,1,1)(5,te,5,0),sT(6,4,K,null,5),lT(8,oe,2,0,"sh-divider"),Zi(9,"sh-card",10),Hg("keydown.enter",function(_){return _.target.click()})("keydown.space",function(_){return _.target.click()}),Ig(10,"img",11),Zi(11,"div",12)(12,"h3"),oC(13,1),Wl(),Zi(14,"p"),oC(15,2),Wl()(),Zi(16,"button",13),Fg(17,3),Ig(18,"sh-icon"),jg(),Wl()(),Zi(19,"sh-card",10),Hg("keydown.enter",function(_){return _.target.click()})("keydown.space",function(_){return _.target.click()}),Ig(20,"img",14),Zi(21,"div",12)(22,"h3"),oC(23,4),Wl(),Zi(24,"p"),oC(25,5),Wl()(),Zi(26,"button",13),Fg(27,6),Ig(28,"sh-icon"),jg(),Wl()()()),e&2&&(bE(6),aT(!r.backupsLoading()),bE(2),uT(r.backups().length?8:-1),bE(),vg("routerLink",XC(4,Q)),bE(10),vg("routerLink",XC(5,U)));},dependencies:[te$1,f,v,c,N,d,_t],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{font:var(--title-30);text-align:center;padding:2rem}section[_ngcontent-%COMP%]{max-width:43.75rem;margin:0 auto;padding:2rem 1rem;display:flex;flex-direction:column;gap:1rem}sh-divider[_ngcontent-%COMP%]{color:var(--base-8)}sh-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;--card-padding: 2rem}sh-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:after{transition:inset .1s linear}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}"]})};export{M as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {c}from'./chunk-D6y9RCQD.js';import {v as ve}from'./chunk-DuRr4rDS.js';import {x}from'./chunk-D38QrkIM.js';import'./chunk-DBkkb6OR.js';import {T,e as ee,G as Ge,bb as k,g as gw,v,a as N,$ as lr,a8 as To,_ as _t,Z as Zi,F as Fg,d as Ig,j as jg,W as Wl,l as lT,b as bE,c as uT,i as ET,o as oC,aR as zl,w as Hg,P as Pd,h as aC,L as Ld,aS as Ql,z as vg,av as Vg,aw as iC}from'./main-2ZYVV4C4.js';function W(u,S){if(u&1){let n=ET();Zi(0,"sh-menu",16)(1,"button",17),oC(2,2),Wl(),zl(3,18),Zi(4,"button",19),Hg("click",function(){Pd(n);let e=aC();return Ld(e.updateLogLevel("Disabled"))}),Fg(5,3),Ig(6,"sh-icon"),jg(),Wl(),Zi(7,"button",19),Hg("click",function(){Pd(n);let e=aC();return Ld(e.updateLogLevel("Verbose"))}),Fg(8,4),Ig(9,"sh-icon"),jg(),Wl(),Zi(10,"button",19),Hg("click",function(){Pd(n);let e=aC();return Ld(e.updateLogLevel("ExplicitOnly"))}),Fg(11,5),Ig(12,"sh-icon"),jg(),Wl(),Zi(13,"button",19),Hg("click",function(){Pd(n);let e=aC();return Ld(e.updateLogLevel("Profiling"))}),Fg(14,6),Ig(15,"sh-icon"),jg(),Wl(),Zi(16,"button",19),Hg("click",function(){Pd(n);let e=aC();return Ld(e.updateLogLevel("Retry"))}),Fg(17,7),Ig(18,"sh-icon"),jg(),Wl(),Zi(19,"button",19),Hg("click",function(){Pd(n);let e=aC();return Ld(e.updateLogLevel("Information"))}),Fg(20,8),Ig(21,"sh-icon"),jg(),Wl(),Zi(22,"button",19),Hg("click",function(){Pd(n);let e=aC();return Ld(e.updateLogLevel("DryRun"))}),Fg(23,9),Ig(24,"sh-icon"),jg(),Wl(),Zi(25,"button",19),Hg("click",function(){Pd(n);let e=aC();return Ld(e.updateLogLevel("Warning"))}),Fg(26,10),Ig(27,"sh-icon"),jg(),Wl(),Zi(28,"button",19),Hg("click",function(){Pd(n);let e=aC();return Ld(e.updateLogLevel("Error"))}),Fg(29,11),Ig(30,"sh-icon"),jg(),Wl(),Ql(),Wl();}if(u&2){let n=aC();vg("openIndicator",true),bE(2),Vg(n.logLevelByLabel()),iC(2);}}var O=class u{#n=T(ee);#e=T(c);logLevel=this.#e.logLevel;logLevelByLabel=this.#e.logLevelByLabel;currentUrl=Ge(this.#n.url);constructor(){this.#n.events.subscribe(S=>{S instanceof k&&this.currentUrl.set(S.urlAfterRedirects);});}updateLogLevel(S){this.#e.isPolling.set(true),this.#e.updateLogLevel(S);}static \u0275fac=function(n){return new(n||u)};static \u0275cmp=gw({type:u,selectors:[["app-logs"]],decls:10,vars:1,consts:()=>{let S;S=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:archive${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: Stored `;let n;n=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:play${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Live `;let o;o=$localize`Log level: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SH_ICON:bell-simple-slash${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_ICON: Disabled `;let E;E=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:megaphone-simple${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: Verbose `;let L;L=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:flow-arrow${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Explicit only `;let N;N=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:speedometer${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON: Profiling `;let I;I=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:arrow-arc-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON: Retry `;let d;d=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SH_ICON: Information `;let h;h=$localize`${"\uFFFD#24\uFFFD"}:START_TAG_SH_ICON:person-simple-run${"\uFFFD/#24\uFFFD"}:CLOSE_TAG_SH_ICON: Dry run `;let G;G=$localize`${"\uFFFD#27\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#27\uFFFD"}:CLOSE_TAG_SH_ICON: Warning `;let m;return m=$localize`${"\uFFFD#30\uFFFD"}:START_TAG_SH_ICON:warning-octagon${"\uFFFD/#30\uFFFD"}:CLOSE_TAG_SH_ICON: Error `,[S,n,o,e,E,L,N,I,d,h,G,m,[1,"filters"],[1,"type-b"],["type","button","routerLink","/about/logs/stored","routerLinkActive","active"],["type","button","routerLink","/about/logs/live","routerLinkActive","active"],[3,"openIndicator"],["shButton","","type","button"],["menu",""],["shButton","","type","button",1,"small",3,"click"]]},template:function(n,o){n&1&&(Zi(0,"div",12)(1,"sh-button-group",13)(2,"button",14),Fg(3,0),Ig(4,"sh-icon"),jg(),Wl(),Zi(5,"button",15),Fg(6,1),Ig(7,"sh-icon"),jg(),Wl()(),lT(8,W,31,2,"sh-menu",16),Wl(),Ig(9,"router-outlet")),n&2&&(bE(8),uT(o.currentUrl().startsWith("/about/logs/live")?8:-1));},dependencies:[v,x,N,ve,lr,To,_t],styles:["[_nghost-%COMP%]{display:block}.filters[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;padding:0 2rem;margin-bottom:1.25rem}"]})};export{O as default};
|