PageSourceSearch

https://tankie.tube/client/en-US/main-7RR2Q2IV.js

js tankie.tube collected 2026-10-05 22:13:03 UTC 126,759 bytes, 279 lines download raw bytes

1import{o as F,r as C,s as w}from"./chunk-C6uGsfWa.js";import{$r as Vn,$s as tw,Aa as eo,Ac as yEe,Ai as Z2,An as N5,Ao as l8,At as Hye,B as Cu,Bi as _1,Bo as mBe,Bs as sme,Cs as qa$1,Di as Yn,Do as kg,E as Bi,Ea as eM,Ei as Yg,Er as Sge,Es as qe$1,Fi as Zb,Fn as Ne,Fr as Tm,Fs as s5,Ft as IR,Ga as gBe,Gc as zg,Gi as _x,Gt as J_,H as D1,Hn as O,Hs as st,Ia as fe,Ic as z$,In as Ng,Ir as Tt,Ji as ah,Js as th,Jt as Jc,Ki as a2,Li as Ze,Lr as Tu,Ls as se,M as CA,Ma as ex,Mo as lM,Nc as yh,Ni as ZV,Nn as NT,Oa as el,On as Mp,Or as T,Pa as fDe,Pt as IA,Q as ET,Qa as he,Qn as Or$1,Qs as tt,Qt as K,Ra as fi,Ri as Zg,Rn as Nn,Ro as m,Rr as Tx,Rs as sh,Rt as J3,S as B4e,Sc as x5,Si as YV,T as Bg,Ti as Yc,To as kI,Tt as HV,Ua as g5,Uc as zb,Us as su,Vc as zR,Vi as _I,Vn as Nu,Wc as zc,Wi as _t,Wn as O5,Wo as mn,Wr as UV,Wt as JV,Xn as Oi,Xs as tm,Xt as Jhe,Y as Dt,Ys as tl,Yt as Je,Za as hEe,Zs as tme,Zt as Jje,_a as dDe,_t as Gc,a as $R,aa as bje,bc as wx,bn as Lv,bo as jg,bt as H4,ca as c8,cn as L,co as ih,ct as G$,d as $n,ea as ax,ei as Vo$1,en as KG,eo as hi,es as nme,fa as ch,fn as LA,fo as j,go as jA,gs as po,gt as Gb,hc as w3,hr as Qc,i as $F,ia as bh,in as Kn,is as o5,it as FA,ji as Z3,jr as TA,jt as I,k as Bt,ko as kwe,kr as T3,lc as vX,li as Wg,lo as ij,lt as G5,m as A,mi as X3,mo as j4,mr as Qb,nn as Ke$1,no as ho,ns as nz,oi as Wb,on as Kt$1,or as PG,ot as FI,p as $t,po as j$,pr as QV,pt as GQ,q as Dn,qa as gg,qr as V4,qs as tU,qt as Jb,rn as Kg,ro as i2,rr as PA,rs as o$,so as ie,t as $,ta as az,tc as tx,ti as W,tn as KV,ts as nx,tt as Ei,u as $i,uo as im,ur as Pwe,v as AS,wc as xe,wn as Mg,wr as S5,ws as qb,xa as dh,xn as M5,xo as jr$1,xs as qI,yc as wr$1,yn as Ln,yo as je,ys as px,yt as H$,zn as No,zr as U$,zs as sm}from"./chunk-CBGwcTR3.js";import{t as g}from"./chunk-ky0rEjTB.js";import{t as X1}from"./chunk-GBYIF7KQ.js";import"./chunk-VGG_mq8s.js";import{t as L$1}from"./chunk-D-N3iX3x.js";import"./chunk-BTHGypmd.js";import{n as G,t as C$1}from"./chunk-DIz81XYY.js";import{r as b,t as H}from"./chunk-DOk4pkjP.js";import{t as n}from"./chunk-Af8EktPD.js";import{A as qn,b as dn$1,s as Je$1,u as Qn}from"./chunk-r-w-ffPV.js";import{E as Po,F as Y,J as kt,L as Z,N as Wt,U as ge,m as I$1,nt as rn$1,rt as rr$1}from"./chunk-DV4DsHE_.js";import{o as Qe,p as yn,s as Vt}from"./chunk-DCIfgk1L.js";import{r as Nt}from"./chunk-D8YhVuzA.js";import"./chunk-CQnccI06.js";import{n as ae}from"./chunk-BrelOh9B.js";import"./chunk-Cz6Z8RPJ.js";import"./chunk-CNqowy8i.js";import"./chunk-BehZOJAh.js";import{n as d,t as S}from"./chunk-B_4VQ2JJ.js";import{A as tp,C as gr$1,E as rt,O as sr$1,P as zl,b as ep,c as Hi,g as Vn$1,l as Jc$1,t as $n$1}from"./chunk-Ddg0sIm6.js";import"./chunk-D8G5dF1V.js";import{t as q}from"./chunk-B44FgGc-.js";import{n as de,t as Se}from"./chunk-DEo5M6gB.js";import{r as L$2,t as D}from"./chunk-ComUPC4S.js";import{t as c}from"./chunk-CGYuBYWK.js";import{t as d$1}from"./chunk-DLqCam_1.js";import{t as n$1}from"./chunk-DQeclEmC.js";import{i as t,n as n$2,r}from"./chunk-CLZPHXX8.js";import{n as y,t as x}from"./chunk-ARBBY_ol.js";import{t as _}from"./chunk-4XaygopS.js";import{t as O$1}from"./chunk-zwSp6A-s.js";import{t as c$1}from"./chunk-B27ilotM.js";import{t as i}from"./chunk-B1pfkInb.js";import{t as fe$1}from"./chunk-C37knR4Q.js";import{t as oe}from"./chunk-Drnw3HNX.js";import{t as c$2}from"./chunk-BBaaVGkb2.js";import{s as h}from"./chunk-C2xb4E5B2.js";import{t as E}from"./chunk-DZaW8mX62.js";import{m as n$3}from"./chunk-DQwBk41T2.js";import{i as Tt$1,n as A$1,r as S$1,t as $t$1}from"./chunk-DV2WRGpN2.js";import{t as L$3}from"./chunk-6x-dAtgl2.js";import{t as O$2}from"./chunk-xI_aS2fS2.js";import{t as u}from"./chunk-_-VnPfX82.js";import{t as p}from"./chunk-CAPLqyMG2.js";import{n as ce}from"./chunk-CeBcsVYJ2.js";import{t as k}from"./chunk-Bny6jGhU2.js";var On=`Service workers are disabled or not supported by this browser`;var qe=class{serviceWorker;worker;registration;events;constructor(n,e){if(this.serviceWorker=n,!n)this.worker=this.events=this.registration=new W(i=>i.error(new I(5601,!1)));else{let i=null,o=new K;this.worker=new W(P=>(i!==null&&P.next(i),o.subscribe(L=>P.next(L))));let d=()=>{let{controller:P}=n;P!==null&&(i=P,o.next(i))};n.addEventListener(`controllerchange`,d),d(),this.registration=this.worker.pipe(je(()=>n.getRegistration().then(P=>{if(!P)throw new I(5601,!1);return P})));let m=new K;this.events=m.asObservable();let b=P=>{let{data:L}=P;L?.type&&m.next(L)};n.addEventListener(`message`,b),e?.get($n,null,{optional:!0})?.onDestroy(()=>{n.removeEventListener(`controllerchange`,d),n.removeEventListener(`message`,b)})}}postMessage(n,e){return new Promise(i=>{this.worker.pipe(Nn(1)).subscribe(o=>{o.postMessage(w({action:n},e)),i()})})}postMessageWithOperation(n,e,i){let o=this.waitForOperationCompleted(i),d=this.postMessage(n,e);return Promise.all([d,o]).then(([,m])=>m)}generateNonce(){return Math.round(Math.random()*1e7)}eventsOfType(n){let e;return typeof n==`string`?e=i=>i.type===n:e=i=>n.includes(i.type),this.events.pipe(xe(e))}nextEventOfType(n){return this.eventsOfType(n).pipe(Nn(1))}waitForOperationCompleted(n){return new Promise((e,i)=>{this.eventsOfType(`OPERATION_COMPLETED`).pipe(xe(o=>o.nonce===n),Nn(1),$(o=>{if(o.result!==void 0)return o.result;throw new Error(o.error)})).subscribe({next:e,error:i})})}get isEnabled(){return!!this.serviceWorker}};var Do=(()=>{class t{sw;messages;
1notificationClicks;notificationCloses;pushSubscriptionChanges;subscription;get isEnabled(){return this.sw.isEnabled}pushManager=null;subscriptionChanges=new K;constructor(e){if(this.sw=e,!e.isEnabled){this.messages=tU,this.notificationClicks=tU,this.notificationCloses=tU,this.pushSubscriptionChanges=tU,this.subscription=tU;return}this.messages=this.sw.eventsOfType(`PUSH`).pipe($(o=>o.data)),this.notificationClicks=this.sw.eventsOfType(`NOTIFICATION_CLICK`).pipe($(o=>o.data)),this.notificationCloses=this.sw.eventsOfType(`NOTIFICATION_CLOSE`).pipe($(o=>o.data)),this.pushSubscriptionChanges=this.sw.eventsOfType(`PUSH_SUBSCRIPTION_CHANGE`).pipe($(o=>o.data)),this.pushManager=this.sw.registration.pipe($(o=>o.pushManager));let i=this.pushManager.pipe(je(o=>o.getSubscription()));this.subscription=new W(o=>{let d=i.subscribe(o),m=this.subscriptionChanges.subscribe(o);return()=>{d.unsubscribe(),m.unsubscribe()}})}requestSubscription(e){if(!this.sw.isEnabled||this.pushManager===null)return Promise.reject(new Error(On));let i={userVisibleOnly:!0},o=this.decodeBase64(e.serverPublicKey.replace(/_/g,`/`).replace(/-/g,`+`)),d=new Uint8Array(new ArrayBuffer(o.length));for(let m=0;m<o.length;m++)d[m]=o.charCodeAt(m);return i.applicationServerKey=d,new Promise((m,b)=>{this.pushManager.pipe(je(O=>O.subscribe(i)),Nn(1)).subscribe({next:O=>{this.subscriptionChanges.next(O),m(O)},error:b})})}unsubscribe(){if(!this.sw.isEnabled)return Promise.reject(new Error(On));let e=i=>{if(i===null)throw new I(5602,!1);return i.unsubscribe().then(o=>{if(!o)throw new I(5603,!1);this.subscriptionChanges.next(null)})};return new Promise((i,o)=>{this.subscription.pipe(Nn(1),je(e)).subscribe({next:i,error:o})})}decodeBase64(e){return atob(e)}static ɵfac=function(i){return new(i||t)(L(qe))};static ɵprov=T({token:t,factory:t.ɵfac})}return t})();var Lo=(()=>{class t{sw;versionUpdates;unrecoverable;get isEnabled(){return this.sw.isEnabled}ongoingCheckForUpdate=null;constructor(e){if(this.sw=e,!e.isEnabled){this.versionUpdates=tU,this.unrecoverable=tU;return}this.versionUpdates=this.sw.eventsOfType([`VERSION_DETECTED`,`VERSION_INSTALLATION_FAILED`,`VERSION_READY`,`NO_NEW_VERSION_DETECTED`]),this.unrecoverable=this.sw.eventsOfType(`UNRECOVERABLE_STATE`)}checkForUpdate(){if(!this.sw.isEnabled)return Promise.reject(new Error(On));if(this.ongoingCheckForUpdate)return this.ongoingCheckForUpdate;let e=this.sw.generateNonce();return this.ongoingCheckForUpdate=this.sw.postMessageWithOperation(`CHECK_FOR_UPDATES`,{nonce:e},e).finally(()=>{this.ongoingCheckForUpdate=null}),this.ongoingCheckForUpdate}activateUpdate(){if(!this.sw.isEnabled)return Promise.reject(new I(5601,!1));let e=this.sw.generateNonce();return this.sw.postMessageWithOperation(`ACTIVATE_UPDATE`,{nonce:e},e)}static ɵfac=function(i){return new(i||t)(L(qe))};static ɵprov=T({token:t,factory:t.ɵfac})}return t})();var $o=new A(``);function er(){let t=m(ct);if(!(`serviceWorker`in navigator&&t.enabled!==!1))return;let n=m($o),e=m(ie),i=m($n);e.runOutsideAngular(()=>{let o=navigator.serviceWorker,d=()=>o.controller?.postMessage({action:`INITIALIZE`});o.addEventListener(`controllerchange`,d),i.onDestroy(()=>{o.removeEventListener(`controllerchange`,d)})}),e.runOutsideAngular(()=>{let o,{registrationStrategy:d}=t;if(typeof d==`function`)o=new Promise(m=>d().subscribe(()=>m()));else{let[m,...b]=(d||`registerWhenStable:30000`).split(`:`);switch(m){case`registerImmediately`:o=Promise.resolve();break;case`registerWithDelay`:o=Ro(+b[0]||0);break;case`registerWhenStable`:o=Promise.race([i.whenStable(),Ro(+b[0])]);break;default:throw new I(5600,!1)}}o.then(()=>{i.destroyed||navigator.serviceWorker.register(n,{scope:t.scope,updateViaCache:t.updateViaCache,type:t.type}).catch(m=>console.error(Ln(5604,!1)))})})}function Ro(t){return new Promise(n=>setTimeout(n,t))}function tr(){let t=m(ct),n=m(Dt);return new qe(t.enabled!==!1?navigator.serviceWorker:void 0,n)}var ct=class{enabled;updateViaCache;type;scope;registrationStrategy};function nr(t,n={}){return jr$1([Do,Lo,{provide:$o,useValue:t},{provide:ct,useValue:n},{provide:qe,useFactory:tr},th(er)])}var Ho=(()=>{class t{static register(e,i={}){return{ngModule:t,providers:[nr(e,i)]}}static ɵfac=function(i){return new(i||t)};static ɵmod=Vn({type:t});static ɵinj=Dn({providers:[Do,Lo]})}return t})();function Fo(){return[d,S]}function Vo(t,n){let e=m(mn);if(!(t.url.startsWith(`/`)||bje(GQ(),t.url)))return n(t);return n(t.clone({headers:t.headers.append(`x-peertube-language`,e)}))}var Uo=(()=>{class t extends rn$1{pathId;onInit(){this.pathId=`url(#`+Wt()+`)`}static ɵfac=(()=>{let e;return function(o){return(e||(e=su(t)))(o||t)}})();static ɵcmp=qa$1({type:t,selectors:[[``,`data-p-icon`,`exclamation-triangle`]],features:[TA],decls:7,vars:2,consts:[[`d`,`M13.4018 13.1893H0.598161C0.49329 13.189 0.390283 13.1615 0.299143 13.1097C0.208003 13.0578 0.131826 12.9832 0.0780112 12.8932C0.0268539 12.8015 0 12.6982 0 12.5931C0 12.4881 0.0268539 12.3848 0.0780112 12.293L6.47985 1.08982C6.53679 1.00399 6.61408 0.933574 6.70484 0.884867C6.7956 0.836159 6.897 0.810669 7 0.810669C7.103 0.810669 7.2044 0.836159 7.29516 0.884867C7.38592 0.933574 7.46321 1.00399 7.52015 1.08982L13.922 12.293C13.9731 12.3848 14 12.4881 14 12.5931C14 12.6982 13.9731 12.8015 13.922 12.8932C13.8682 12.9832 13.792 13.0578 13.7009 13.1097C13.6097 13.161
15 13.5067 13.189 13.4018 13.1893ZM1.63046 11.989H12.3695L7 2.59425L1.63046 11.989Z`,`fill`,`currentColor`],[`d`,`M6.99996 8.78801C6.84143 8.78594 6.68997 8.72204 6.57787 8.60993C6.46576 8.49782 6.40186 8.34637 6.39979 8.18784V5.38703C6.39979 5.22786 6.46302 5.0752 6.57557 4.96265C6.68813 4.85009 6.84078 4.78686 6.99996 4.78686C7.15914 4.78686 7.31179 4.85009 7.42435 4.96265C7.5369 5.0752 7.60013 5.22786 7.60013 5.38703V8.18784C7.59806 8.34637 7.53416 8.49782 7.42205 8.60993C7.30995 8.72204 7.15849 8.78594 6.99996 8.78801Z`,`fill`,`currentColor`],[`d`,`M6.99996 11.1887C6.84143 11.1866 6.68997 11.1227 6.57787 11.0106C6.46576 10.8985 6.40186 10.7471 6.39979 10.5885V10.1884C6.39979 10.0292 6.46302 9.87658 6.57557 9.76403C6.68813 9.65147 6.84078 9.58824 6.99996 9.58824C7.15914 9.58824 7.31179 9.65147 7.42435 9.76403C7.5369 9.87658 7.60013 10.0292 7.60013 10.1884V10.5885C7.59806 10.7471 7.53416 10.8985 7.42205 11.0106C7.30995 11.1227 7.15849 11.1866 6.99996 11.1887Z`,`fill`,`currentColor`],[3,`id`],[`width`,`14`,`height`,`14`,`fill`,`white`]],template:function(i,o){i&1&&(qI(),zb(0,`g`),PA(1,`path`,0)(2,`path`,1)(3,`path`,2),Wb(),zb(4,`defs`)(5,`clipPath`,3),PA(6,`rect`,4),Wb()()),i&2&&(ih(`clip-path`,o.pathId),ij(5),jA(`id`,o.pathId))},encapsulation:2,changeDetection:1})}return t})();var zo=(()=>{class t extends rn$1{pathId;onInit(){this.pathId=`url(#`+Wt()+`)`}static ɵfac=(()=>{let e;return function(o){return(e||(e=su(t)))(o||t)}})();static ɵcmp=qa$1({type:t,selectors:[[``,`data-p-icon`,`info-circle`]],features:[TA],decls:5,vars:2,consts:[[`fill-rule`,`evenodd`,`clip-rule`,`evenodd`,`d`,`M3.11101 12.8203C4.26215 13.5895 5.61553 14 7 14C8.85652 14 10.637 13.2625 11.9497 11.9497C13.2625 10.637 14 8.85652 14 7C14 5.61553 13.5895 4.26215 12.8203 3.11101C12.0511 1.95987 10.9579 1.06266 9.67879 0.532846C8.3997 0.00303296 6.99224 -0.13559 5.63437 0.134506C4.2765 0.404603 3.02922 1.07129 2.05026 2.05026C1.07129 3.02922 0.404603 4.2765 0.134506 5.63437C-0.13559 6.99224 0.00303296 8.3997 0.532846 9.67879C1.06266 10.9579 1.95987 12.0511 3.11101 12.8203ZM3.75918 2.14976C4.71846 1.50879 5.84628 1.16667 7 1.16667C8.5471 1.16667 10.0308 1.78125 11.1248 2.87521C12.2188 3.96918 12.8333 5.45291 12.8333 7C12.8333 8.15373 12.4912 9.28154 11.8502 10.2408C11.2093 11.2001 10.2982 11.9478 9.23232 12.3893C8.16642 12.8308 6.99353 12.9463 5.86198 12.7212C4.73042 12.4962 3.69102 11.9406 2.87521 11.1248C2.05941 10.309 1.50384 9.26958 1.27876 8.13803C1.05367 7.00647 1.16919 5.83358 1.61071 4.76768C2.05222 3.70178 2.79989 2.79074 3.75918 2.14976ZM7.00002 4.8611C6.84594 4.85908 6.69873 4.79698 6.58977 4.68801C6.48081 4.57905 6.4187 4.43185 6.41669 4.27776V3.88888C6.41669 3.73417 6.47815 3.58579 6.58754 3.4764C6.69694 3.367 6.84531 3.30554 7.00002 3.30554C7.15473 3.30554 7.3031 3.367 7.4125 3.4764C7.52189 3.58579 7.58335 3.73417 7.58335 3.88888V4.27776C7.58134 4.43185 7.51923 4.57905 7.41027 4.68801C7.30131 4.79698 7.1541 4.85908 7.00002 4.8611ZM7.00002 10.6945C6.84594 10.6925 6.69873 10.6304 6.58977 10.5214C6.48081 10.4124 6.4187 10.2652 6.41669 10.1111V6.22225C6.41669 6.06754 6.47815 5.91917 6.58754 5.80977C6.69694 5.70037 6.84531 5.63892 7.00002 5.63892C7.15473 5.63892 7.3031 5.70037 7.4125 5.80977C7.52189 5.91917 7.58335 6.06754 7.58335 6.22225V10.1111C7.58134 10.2652 7.51923 10.4124 7.41027 10.5214C7.30131 10.6304 7.1541 10.6925 7.00002 10.6945Z`,`fill`,`currentColor`],[3,`id`],[`width`,`14`,`height`,`14`,`fill`,`white`]],template:function(i,o){i&1&&(qI(),zb(0,`g`),PA(1,`path`,0),Wb(),zb(2,`defs`)(3,`clipPath`,1),PA(4,`rect`,2),Wb()()),i&2&&(ih(`clip-path`,o.pathId),ij(3),jA(`id`,o.pathId))},encapsulation:2,changeDetection:1})}return t})();var Go=`
2    .p-toast {
3        width: dt('toast.width');
4        white-space: pre-line;
5        word-break: break-word;
6    }
7
8    .p-toast-message {
9        margin: 0 0 1rem 0;
10        display: grid;
11        grid-template-rows: 1fr;
12    }
13
14    .p-toast-message-icon {
15        flex-shrink: 0;
16        font-size: dt('toast.icon.size');
17        width: dt('toast.icon.size');
18        height: dt('toast.icon.size');
19    }
20
21    .p-toast-message-content {
22        display: flex;
23        align-items: flex-start;
24        padding: dt('toast.content.padding');
25        gap: dt('toast.content.gap');
26        min-height: 0;
27        overflow: hidden;
28        transition: padding 250ms ease-in;
29    }
30
31    .p-toast-message-text {
32        flex: 1 1 auto;
33        display: flex;
34        flex-direction: column;
35        gap: dt('toast.text.gap');
36    }
37
38    .p-toast-summary {
39        font-weight: dt('toast.summary.font.weight');
40        font-size: dt('toast.summary.font.size');
41    }
42
43    .p-toast-detail {
44        font-weight: dt('toast.detail.font.weight');
45        font-size: dt('toast.detail.font.size');
46    }
47
48    .p-toast-close-button {
49        display: flex;
50        align-items: center;
51        justify-content: center;
52        overflow: hidden;
53        position: relative;
54        cursor: pointer;
55        background: transparent;
56        transition:
57            background dt('toast.transition.duration'),
58            color dt('toast.transition.duration'),
59            outline-color dt('toast.transition.duration'),
60            box-shadow dt('toast.transition.duration');
61        outline-color: transparent;
62        color: inherit;
63        width: dt('toast.close.button.width');
64        height: dt('toast.close.button.height');
65        border-radius: dt('toast.close.button.border.radius');
66        margin: -25% 0 0 0;
67        right: -25%;
68        padding: 0;
69        border: none;
70        user-select: none;
71    }
72
73    .p-toast-close-button:dir(rtl) {
74        margin: -25% 0 0 auto;
75        left: -25%;
76        right: auto;
77    }
78
79    .p-toast-message-info,
80    .p-toast-message-success,
81    .p-toast-message-warn,
82    .p-toast-message-error,
83    .p-toast-message-secondary,
84    .p-toast-message-contrast {
85        border-width: dt('toast.border.width');
86        border-style: solid;
87        backdrop-filter: blur(dt('toast.blur'));
88        border-radius: dt('toast.border.radius');
89    }
90
91    .p-toast-close-icon {
92        font-size: dt('toast.close.icon.size');
93        width: dt('toast.close.icon.size');
94        height: dt('toast.close.icon.size');
95    }
96
97    .p-toast-close-button:focus-visible {
98        outline-width: dt('focus.ring.width');
99        outline-style: dt('focus.ring.style');
100        outline-offset: dt('focus.ring.offset');
101    }
102
103    .p-toast-message-info {
104        background: dt('toast.info.background');
105        border-color: dt('toast.info.border.color');
106        color: dt('toast.info.color');
107        box-shadow: dt('toast.info.shadow');
108    }
109
110    .p-toast-message-info .p-toast-detail {
111        color: dt('toast.info.detail.color');
112    }
113
114    .p-toast-message-info .p-toast-close-button:focus-visible {
115        outline-color: dt('toast.info.close.button.focus.ring.color');
116        box-shadow: dt('toast.info.close.button.focus.ring.shadow');
117    }
118
119    .p-toast-message-info .p-toast-close-button:hover {
120        background: dt('toast.info.close.button.hover.background');
121    }
122
123    .p-toast-message-success {
124        background: dt('toast.success.background');
125        border-color: dt('toast.success.border.color');
126        color: dt('toast.success.color');
127        box-shadow: dt('toast.success.shadow');
128    }
129
130    .p-toast-message-success .p-toast-detail {
131        color: dt('toast.success.detail.color');
132    }
133
134    .p-toast-message-success .p-toast-close-button:focus-visible {
135        outline-color: dt('toast.success.close.button.focus.ring.color');
136        box-shadow: dt('toast.success.close.button.focus.ring.shadow');
137    }
138
139    .p-toast-message-success .p-toast-close-button:hover {
140        background: dt('toast.success.close.button.hover.background');
141    }
142
143    .p-toast-message-warn {
144        background: dt('toast.warn.background');
145        border-color: dt('toast.warn.border.color');
146        color: dt('toast.warn.color');
147        box-shadow: dt('toast.warn.shadow');
148    }
149
150    .p-toast-message-warn .p-toast-detail {
151        color: dt('toast.warn.detail.color');
152    }
153
154    .p-toast-message-warn .p-toast-close-button:focus-visible {
155        outline-color: dt('toast.warn.close.button.focus.ring.color');
156        box-shadow: dt('toast.warn.close.button.focus.ring.shadow');
157    }
158
159    .p-toast-message-warn .p-toast-close-button:hover {
160        background: dt('toast.warn.close.button.hover.background');
161    }
162
163    .p-toast-message-error {
164        background: dt('toast.error.background');
165        border-color: dt('toast.error.border.color');
166        color: dt('toast.error.color');
167        box-shadow: dt('toast.error.shadow');
168    }
169
170    .p-toast-message-error .p-toast-detail {
171        color: dt('toast.error.detail.color');
172    }
173
174    .p-toast-message-error .p-toast-close-button:focus-visible {
175        outline-color: dt('toast.error.close.button.focus.ring.color');
176        box-shadow: dt('toast.error.close.button.focus.ring.shadow');
177    }
178
179    .p-toast-message-error .p-toast-close-button:hover {
180        background: dt('toast.error.close.button.hover.background');
181    }
182
183    .p-toast-message-secondary {
184        background: dt('toast.secondary.background');
185        border-color: dt('toast.secondary.border.color');
186        color: dt('toast.secondary.color');
187        box-shadow: dt('toast.secondary.shadow');
188    }
189
190    .p-toast-message-secondary .p-toast-detail {
191        color: dt('toast.secondary.detail.color');
192    }
193
194    .p-toast-message-secondary .p-toast-close-button:focus-visible {
195        outline-color: dt('toast.secondary.close.button.focus.ring.color');
196        box-shadow: dt('toast.secondary.close.button.focus.ring.shadow');
197    }
198
199    .p-toast-message-secondary .p-toast-close-button:hover {
200        background: dt('toast.secondary.close.button.hover.background');
201    }
202
203    .p-toast-message-contrast {
204        background: dt('toast.contrast.background');
205        border-color: dt('toast.contrast.border.color');
206        color: dt('toast.contrast.color');
207        box-shadow: dt('toast.contrast.shadow');
208    }
209    
210    .p-toast-message-contrast .p-toast-detail {
211        color: dt('toast.contrast.detail.color');
212    }
213
214    .p-toast-message-contrast .p-toast-close-button:focus-visible {
215        outline-color: dt('toast.contrast.close.button.focus.ring.color');
216        box-shadow: dt('toast.contrast.close.button.focus.ring.shadow');
217    }
218
219    .p-toast-message-contrast .p-toast-close-button:hover {
220        background: dt('toast.contrast.close.button.hover.background');
221    }
222
223    .p-toast-top-center {
224        transform: translateX(-50%);
225    }
226
227    .p-toast-bottom-center {
228        transform: translateX(-50%);
229    }
230
231    .p-toast-center {
232        min-width: 20vw;
233        transform: translate(-50%, -50%);
234    }
235
236    .p-toast-message-enter-active {
237        animation: p-animate-toast-enter 300ms ease-out;
238    }
239
240    .p-toast-message-leave-active {
241        animation: p-animate-toast-leave 250ms ease-in;
242    }
243
244    .p-toast-message-leave-to .p-toast-message-content {
245        padding-top: 0;
246        padding-bottom: 0;
247    }
248
249    @keyframes p-animate-toast-enter {
250        from {
251            opacity: 0;
252            transform: scale(0.6);
253        }
254        to {
255            opacity: 1;
256            grid-template-rows: 1fr;
257        }
258    }
259
260     @keyframes p-animate-toast-leave {
261        from {
262            opacity: 1;
263        }
264        to {
265            opacity: 0;
266            margin-bottom: 0;
267            grid-template-rows: 0fr;
268            transform: translateY(-100%) scale(0.6);
269        }
270    }
271`;var ir=(t,n)=>({$implicit:t,closeFn:n});var or=t=>({$implicit:t});function rr(t,n){t&1&&FA(0)}function ar(t,n){if(t&1&&CA(0,rr,1,0,`ng-container`,3),t&2){let e=j$();LA(`ngTemplateOutlet`,e.headlessTemplate)(`ngTemplateOutletContext`,M5(2,ir,e.message,e.onCloseIconClick))}}function sr(t,n){if(t&1&&sh(0,`span`,4),t&2){let e=j$(3);s5(e.cn(e.cx(`messageIcon`),e.message==null?null:e.message.icon)),LA(`pBind`,e.ptm(`messageIcon`))}}function lr(t,n){if(t&1&&(qI(),sh(0,`svg`,11)),t&2){let e=j$(4);s5(e.cx(`messageIcon`)),LA(`pBind`,e.ptm(`messageIcon`)),ih(`aria-hidden`,!0)}}function cr(t,n){if(t&1&&(qI(),sh(0,`svg`,12)),t&2){let e=j$(4);s5(e.cx(`messageIcon`)),LA(`pBind`,e.ptm(`messageIcon`)),ih(`aria-hidden`,!0)}}function dr(t,n){if(t&1&&(qI(),sh(0,`svg`,13)),t&2){let e=j$(4);s5(e.cx(`messageIcon`)),LA(`pBind`,e.ptm(`messageIcon`)),ih(`aria-hidden`,!0)}}function pr(t,n){if(t&1&&(qI(),sh(0,`svg`,14)),t&2){let e=j$(4);s5(e.cx(`messageIcon`)),LA(`pBind`,e.ptm(`messageIcon`)),ih(`aria-hidden`,!0)}}function mr(t,n){if(t&1&&(qI(),sh(0,`svg`,12)),t&2){let e=j$(4);s5(e.cx(`messageIcon`)),LA(`pBind`,e.ptm(`messageIcon`)),ih(`aria-hidden`,!0)}}function ur(t,n){if(t&1&&YV(0,lr,1,4,`:svg:svg`,7)(1,cr,1,4,`:svg:svg`,8)(2,dr,1,4,`:svg:svg`,9)(3,pr,1,4,`:svg:svg`,10)(4,mr,1,4,`:svg:svg`,8),t&2){let e;KV((e=j$(3).message.severity)===`success`?0:e===`info`?1:e===`error`?2:e===`warn`?3:4)}}function gr(t,n){if(t&1&&(qb(0),YV(1,sr,1,3,`span`,2)(2,ur,5,1),Mp(3,`div`,6)(4,`div`,6),g5(5),Gb(),Mp(6,`div`,6),g5(7),Gb()(),ah()),t&2){let e=j$(2);ij(),KV(e.message.icon?1:2),ij(2),LA(`pBind`,e.ptm(`messageText`))(`ngClass`,e.cx(`messageText`)),ih(`data-
271p`,e.dataP),ij(),LA(`pBind`,e.ptm(`summary`))(`ngClass`,e.cx(`summary`)),ih(`data-p`,e.dataP),ij(),Jb(` `,e.message.summary,` `),ij(),LA(`pBind`,e.ptm(`detail`))(`ngClass`,e.cx(`detail`)),ih(`data-p`,e.dataP),ij(),Tx(e.message.detail)}}function _r(t,n){t&1&&FA(0)}function hr(t,n){if(t&1&&sh(0,`span`,4),t&2){let e=j$(4);s5(e.cn(e.cx(`closeIcon`),e.message==null?null:e.message.closeIcon)),LA(`pBind`,e.ptm(`closeIcon`))}}function fr(t,n){if(t&1&&CA(0,hr,1,3,`span`,17),t&2)LA(`ngIf`,j$(3).message.closeIcon)}function Cr(t,n){if(t&1&&(qI(),sh(0,`svg`,18)),t&2){let e=j$(3);s5(e.cx(`closeIcon`)),LA(`pBind`,e.ptm(`closeIcon`)),ih(`aria-hidden`,!0)}}function yr(t,n){if(t&1){let e=o$();Mp(0,`div`)(1,`button`,15),ch(`click`,function(o){kI(e);return FI(j$(2).onCloseIconClick(o))})(`keydown.enter`,function(o){kI(e);return FI(j$(2).onCloseIconClick(o))}),YV(2,fr,1,1,`span`,2)(3,Cr,1,4,`:svg:svg`,16),Gb()()}if(t&2){let e=j$(2);ij(),LA(`pBind`,e.ptm(`closeButton`)),ih(`class`,e.cx(`closeButton`))(`aria-label`,e.closeAriaLabel)(`data-p`,e.dataP),ij(),KV(e.message.closeIcon?2:3)}}function br(t,n){if(t&1&&(Mp(0,`div`,4),CA(1,gr,8,12,`ng-container`,5)(2,_r,1,0,`ng-container`,3),YV(3,yr,4,5,`div`),Gb()),t&2){let e=j$();s5(e.cn(e.cx(`messageContent`),e.message==null?null:e.message.contentStyleClass)),LA(`pBind`,e.ptm(`messageContent`)),ij(),LA(`ngIf`,!e.template),ij(),LA(`ngTemplateOutlet`,e.template)(`ngTemplateOutletContext`,N5(7,or,e.message)),ij(),KV((e.message==null?null:e.message.closable)!==!1?3:-1)}}var vr=[`message`];var Sr=[`headless`];function Mr(t,n){if(t&1){let e=o$();Mp(0,`p-toastItem`,1),ch(`onClose`,function(o){kI(e);return FI(j$().onMessageClose(o))})(`onAnimationEnd`,function(){kI(e);return FI(j$().onAnimationEnd())})(`onAnimationStart`,function(){kI(e);return FI(j$().onAnimationStart())}),Gb()}if(t&2){let e=n.$implicit,i=n.index,o=j$();LA(`message`,e)(`index`,i)(`life`,o.life)(`clearAll`,o.clearAllTrigger())(`template`,o.template||o._template)(`headlessTemplate`,o.headlessTemplate||o._headlessTemplate)(`pt`,o.pt)(`unstyled`,o.unstyled())(`motionOptions`,o.computedMotionOptions())}}var Er={root:({instance:t})=>{let{_position:n}=t;return{position:`fixed`,top:n===`top-right`||n===`top-left`||n===`top-center`?`20px`:n===`center`?`50%`:null,right:(n===`top-right`||n===`bottom-right`)&&`20px`,bottom:(n===`bottom-left`||n===`bottom-right`||n===`bottom-center`)&&`20px`,left:n===`top-left`||n===`bottom-left`?`20px`:n===`center`||n===`top-center`||n===`bottom-center`?`50%`:null}}};var Or={root:({instance:t})=>[`p-toast p-component`,`p-toast-${t._position}`],message:({instance:t})=>({"p-toast-message":!0,"p-toast-message-info":t.message.severity===`info`||t.message.severity===void 0,"p-toast-message-warn":t.message.severity===`warn`,"p-toast-message-error":t.message.severity===`error`,"p-toast-message-success":t.message.severity===`success`,"p-toast-message-secondary":t.message.severity===`secondary`,"p-toast-message-contrast":t.message.severity===`contrast`}),messageContent:`p-toast-message-content`,messageIcon:({instance:t})=>({"p-toast-message-icon":!0,[`pi ${t.message.icon}`]:!!t.message.icon}),messageText:`p-toast-message-text`,summary:`p-toast-summary`,detail:`p-toast-detail`,closeButton:`p-toast-close-button`,closeIcon:({instance:t})=>({"p-toast-close-icon":!0,[`pi ${t.message.closeIcon}`]:!!t.message.closeIcon})};var qt=(()=>{class t extends I$1{name=`toast`;style=Go;classes=Or;inlineStyles=Er;static ɵfac=(()=>{let e;return function(o){return(e||(e=su(t)))(o||t)}})();static ɵprov=T({token:t,factory:t.ɵfac})}return t})();var Bo=new A(`TOAST_INSTANCE`);var Tr=(()=>{class t extends Y{zone;message;index;life;template;headlessTemplate;showTransformOptions;hideTransformOptions;showTransitionOptions;hideTransitionOptions;motionOptions=yh();clearAll=yh(null);onAnimationStart=Jhe();onAnimationEnd=Jhe();onBeforeEnter(e){this.onAnimationStart.emit(e.element)}onAfterLeave(e){!this.visible()&&!this.isDestroyed&&(this.onClose.emit({index:this.index,message:this.message}),this.isDestroyed||this.onAnimationEnd.emit(e.element))}onClose=new $t;_componentStyle=m(qt);timeout;visible=Ze(void 0);isDestroyed=!1;isClosing=!1;constructor(e){super(),this.zone=e,Lv(()=>{this.clearAll()&&this.visible.set(!1)})}onAfterViewInit(){this.message?.sticky&&this.visible.set(!0),this.initTimeout()}initTimeout(){this.message?.sticky||(this.clearTimeout(),this.zone.runOutsideAngular(()=>{this.visible.set(!0),this.timeout=setTimeout(()=>{this.visible.set(!1)},this.message?.life||this.life||3e3)}))}clearTimeout(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)}onMouseEnter(){this.clearTimeout()}onMouseLeave(){this.isClosing||this.initTimeout()}onCloseIconClick=e=>{this.isClosing=!0,this.clearTimeout(),this.visible.set(!1),e.preventDefault()};get closeAriaLabel(){return this.config.translation.aria?this.config.translation.aria.close:void 0}onDestroy(){this.isDestroyed=!0,this.clearTimeout(),this.visible.set(!1)}get dataP(){return this.cn({[this.message?.severity]:this.message?.severity})}static ɵfac=function(i){return new(i||t)(fe(ie))};static ɵcmp=qa$1({type:t,selectors:[[`p-toastItem`]],inputs:{message:`message`,index:[2,`index`,`index`,T3],life:[2,`life`,`life`,T3],template:`template`,headlessTemplate:`headlessTemplate`,showTransformOptions:`showTransformOptions`,hideTransformOptions:`hideTransformOptions`,showTransitionOptions:`showTransitionOptions`,hideTransitionOptions:`hideTransitionOptions`,motionOptions:[1,`motionOptions`],clearAll:[1,`clearAll`]},outputs:{onAnimationStart:`onAnimationStart`,onAnimationEnd:`onAnimationEnd`,onClose:`onClose`},features:[x5([qt]),TA],decls:4,vars:10,consts:[[`container`,``],[`role`,`alert`,`aria-live`,`assertive`,`aria-atomic`,`true`,3,`pMotionOnBeforeEnter`,`pMotionOnAfterLeave`,`mouseenter`,`mouseleave`,`pMotion`,`pMotionAppear`,`pMotionName`,`pMotionOptions`,`pBind`],[3,`pBind`,`class`],[4,`ngTemplateOutlet`,`ngTemplateOutletContext`],[3,`pBind`],[4,`ngIf`],[3,`pBind`,`ngClass`],[`data-p-icon`,`check`,3,`pBind`,`class`],[`data-p-icon`,`info-circle`,3,`pBind`,`class`],[`data-p-icon`,`times-circle`,3,`pBind`,`class`],[`data-p-icon`,`exclamation-triangle`,3,`pBind`,`class`],[`data-p-icon`,`check`,3,`pBind`],[`data-p-icon`,`info-circle`,3,`pBind`],[`data-p-icon`,`times-circle`,3,`pBind`],[`data-p-icon`,`exclamation-triangle`,3,`pBind`],[`type`,`button`,`autofocus`,``,3,`click`,`keydown.enter`,`pBind`],[`data-p-icon`,`times`,3,`pBind`,`class`],[3,`pBind`,`class`,4,`ngIf`],[`data-p-icon`,`times`,3,`pBind`]],template:function(i,o){i&1&&(Mp(0,`div`,1,0),ch(`pMotionOnBeforeEnter`,function(m){return o.onBeforeEnter(m)})(`pMotionOnAfterLeave`,function(m){return o.onAfterLeave(m)})(`mouseenter`,function(){return o.onMouseEnter()})(`mouseleave`,function(){return o.onMouseLeave()}),YV(2,ar,1,5,`ng-container`)(3,br,4,9,`div`,2),Gb()),i&2&&(s5(o.cn(o.cx(`message`),o.message==null?null:o.message.styleClass)),LA(`pMotion`,o.visible())(`pMotionAppear`,!0)(`pMotionName`,`p-toast-message`)(`pMotionOptions`,o.motionOptions())(`pBind`,o.ptm(`message`)),ih(`id`,o.message==null?null:o.message.id)(`data-
271p`,o.dataP),ij(2),KV(o.headlessTemplate?2:3))},dependencies:[Nu,X3,Z3,J3,Nt,Uo,zo,rr$1,ae,gBe,Z,Vt,yn],encapsulation:2})}return t})();var Pn=(()=>{class t extends Y{componentName=`Toast`;$pcToast=m(Bo,{optional:!0,skipSelf:!0})??void 0;bindDirectiveInstance=m(Z,{self:!0});onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms([`host`,`root`]))}key;autoZIndex=!0;baseZIndex=0;life=3e3;styleClass;get position(){return this._position}set position(e){this._position=e,this.cd.markForCheck()}preventOpenDuplicates=!1;preventDuplicates=!1;showTransformOptions=`translateY(100%)`;hideTransformOptions=`translateY(-100%)`;showTransitionOptions=`300ms ease-out`;hideTransitionOptions=`250ms ease-in`;motionOptions=yh(void 0);computedMotionOptions=Tu(()=>w(w({},this.ptm(`motion`)),this.motionOptions()));breakpoints;onClose=new $t;template;headlessTemplate;messageSubscription;clearSubscription;messages;messagesArchieve;_position=`top-right`;messageService=m(gg);_componentStyle=m(qt);styleElement;id=Wt(`pn_id_`);templates;clearAllTrigger=Ze(null);constructor(){super()}onInit(){this.messageSubscription=this.messageService.messageObserver.subscribe(e=>{if(e)if(Array.isArray(e)){let i=e.filter(o=>this.canAdd(o));this.add(i)}else this.canAdd(e)&&this.add([e])}),this.clearSubscription=this.messageService.clearObserver.subscribe(e=>{e?this.key===e&&this.clearAll():this.clearAll(),this.cd.markForCheck()})}clearAll(){this.clearAllTrigger.set({})}_template;_headlessTemplate;onAfterContentInit(){this.templates?.forEach(e=>{switch(e.getType()){case`message`:this._template=e.template;break;case`headless`:this._headlessTemplate=e.template;break;default:this._template=e.template;break}})}onAfterViewInit(){this.breakpoints&&this.createStyle()}add(e){this.messages=this.messages?[...this.messages,...e]:[...e],this.preventDuplicates&&(this.messagesArchieve=this.messagesArchieve?[...this.messagesArchieve,...e]:[...e]),this.cd.markForCheck()}canAdd(e){let i=this.key===e.key;return i&&this.preventOpenDuplicates&&(i=!this.containsMessage(this.messages,e)),i&&this.preventDuplicates&&(i=!this.containsMessage(this.messagesArchieve,e)),i}containsMessage(e,i){return e?e.find(o=>o.summary===i.summary&&o.detail==i.detail&&o.severity===i.severity)!=null:!1}onMessageClose(e){this.messages?.splice(e.index,1),this.onClose.emit({message:e.message}),this.onAnimationEnd(),this.cd.detectChanges()}onAnimationStart(){this.renderer.setAttribute(this.el?.nativeElement,this.id,``),this.autoZIndex&&this.el?.nativeElement.style.zIndex===``&&Qe.set(`modal`,this.el?.nativeElement,this.baseZIndex||this.config.zIndex.modal)}onAnimationEnd(){this.autoZIndex&&vX(this.messages)&&Qe.clear(this.el?.nativeElement)}createStyle(){if(!this.styleElement){this.styleElement=this.renderer.createElement(`style`),this.styleElement.type=`text/css`,kt(this.styleElement,`nonce`,this.config?.csp()?.nonce),this.renderer.appendChild(this.document.head,this.styleElement);let e=``;for(let i in this.breakpoints){let o=``;for(let d in this.breakpoints[i])o+=d+`:`+this.breakpoints[i][d]+` !important;`;e+=`
272                    @media screen and (max-width: ${i}) {
273                        .p-toast[${this.id}] {
274                           ${o}
275                        }
276                    }
277                `}this.renderer.setProperty(this.styleElement,`innerHTML`,e),kt(this.styleElement,`nonce`,this.config?.csp()?.nonce)}}destroyStyle(){this.styleElement&&(this.renderer.removeChild(this.document.head,this.styleElement),this.styleElement=null)}onDestroy(){this.messageSubscription&&this.messageSubscription.unsubscribe(),this.el&&this.autoZIndex&&Qe.clear(this.el.nativeElement),this.clearSubscription&&this.clearSubscription.unsubscribe(),this.destroyStyle()}get dataP(){return this.cn({[this.position]:this.position})}static ɵfac=function(i){return new(i||t)};static ɵcmp=qa$1({type:t,selectors:[[`p-toast`]],contentQueries:function(i,o,d){if(i&1&&dh(d,vr,5)(d,Sr,5)(d,mBe,4),i&2){let m;Zb(m=Qb())&&(o.template=m.first),Zb(m=Qb())&&(o.headlessTemplate=m.first),Zb(m=Qb())&&(o.templates=m)}}
277,hostVars:5,hostBindings:function(i,o){i&2&&(ih(`data-p`,o.dataP),o5(o.sx(`root`)),s5(o.cn(o.cx(`root`),o.styleClass)))},inputs:{key:`key`,autoZIndex:[2,`autoZIndex`,`autoZIndex`,Cu],baseZIndex:[2,`baseZIndex`,`baseZIndex`,T3],life:[2,`life`,`life`,T3],styleClass:`styleClass`,position:`position`,preventOpenDuplicates:[2,`preventOpenDuplicates`,`preventOpenDuplicates`,Cu],preventDuplicates:[2,`preventDuplicates`,`preventDuplicates`,Cu],showTransformOptions:`showTransformOptions`,hideTransformOptions:`hideTransformOptions`,showTransitionOptions:`showTransitionOptions`,hideTransitionOptions:`hideTransitionOptions`,motionOptions:[1,`motionOptions`],breakpoints:`breakpoints`},outputs:{onClose:`onClose`},features:[x5([qt,{provide:Bo,useExisting:t},{provide:ge,useExisting:t}]),Z2([Z]),TA],decls:1,vars:1,consts:[[3,`message`,`index`,`life`,`clearAll`,`template`,`headlessTemplate`,`pt`,`unstyled`,`motionOptions`,`onClose`,`onAnimationEnd`,`onAnimationStart`,4,`ngFor`,`ngForOf`],[3,`onClose`,`onAnimationEnd`,`onAnimationStart`,`message`,`index`,`life`,`clearAll`,`template`,`headlessTemplate`,`pt`,`unstyled`,`motionOptions`]],template:function(i,o){i&1&&CA(0,Mr,1,9,`p-toastItem`,0),i&2&&LA(`ngForOf`,o.messages)},dependencies:[Nu,IR,Tr,gBe],encapsulation:2})}return t})();var Kt=(()=>{class t{static ɵfac=function(i){return new(i||t)};static ɵmod=Vn({type:t});static ɵinj=Dn({imports:[Pn,gBe,gBe]})}return t})();var xr=[`modal`];function Nr(t,n){if(t&1){let e=o$();Mp(0,`button`,6),ch(`click`,function(){kI(e);return FI(j$(2).onCloseClick())}),sh(1,`my-global-icon`,7),Gb()}}function wr(t,n){if(t&1){let e=o$();Mp(0,`input`,10),ch(`click`,function(){kI(e);return FI(j$(3).onCancelClick())})(`key.enter`,function(){kI(e);return FI(j$(3).onCancelClick())}),Gb()}if(t&2)LA(`value`,j$(3).cancel.value)}function Ar(t,n){if(t&1){let e=o$();Mp(0,`input`,11),ch(`click`,function(){kI(e);return FI(j$(3).onConfirmClick())})(`key.enter`,function(){kI(e);return FI(j$(3).onConfirmClick())}),Gb()}if(t&2)LA(`value`,j$(3).confirm.value)}function Ir(t,n){if(t&1&&(Mp(0,`div`,5),YV(1,wr,1,1,`input`,8),YV(2,Ar,1,1,`input`,9),Gb()),t&2){let e=j$(2);ij(),KV(e.hasCancel()?1:-1),ij(),KV(e.hasConfirm()?2:-1)}}function kr(t,n){if(t&1&&(Mp(0,`div`,1)(1,`h4`,2),g5(2),Gb(),YV(3,Nr,2,0,`button`,3),Gb(),sh(4,`div`,4),YV(5,Ir,3,2,`div`,5)),t&2){let e=j$();ij(2),Tx(e.title),ij(),KV(e.close?3:-1),ij(),LA(`innerHTML`,e.content,J_),ij(),KV(e.hasCancel()||e.hasConfirm()?5:-1)}}var Yt=class t{modalService=m(sr$1);modal=tme(`modal`);title;content;close;cancel;confirm;modalRef;show(n){if(this.modalRef instanceof Hi&&this.modalService.hasOpenModals()){j.error(`Cannot open another custom modal, one is already opened.`);return}let{title:e,content:i,close:o,cancel:d,confirm:m}=n;this.title=e,this.content=i,this.close=o,this.cancel=d,this.confirm=m,this.modalRef=this.modalService.open(this.modal(),{centered:!0,backdrop:`static`,keyboard:!1,size:`lg`})}onCancelClick(){this.modalRef.close();let n=this.cancel;typeof n.action==`function`&&n.action(),this.destroy()}onCloseClick(){this.modalRef.close(),this.destroy()}onConfirmClick(){this.modalRef.close();let n=this.confirm;typeof n.action==`function`&&n.action(),this.destroy()}hasCancel(){return typeof this.cancel<`u`}hasConfirm(){return typeof this.confirm<`u`}destroy(){delete this.modalRef,delete this.title,delete this.content,delete this.close,delete this.cancel,delete this.confirm}static ɵfac=function(e){return new(e||t)};static ɵcmp=qa$1({type:t,selectors:[[`my-custom-modal`]],viewQuery:function(e,i){e&1&&ax(i.modal,xr,5),e&2&&G$()},decls:2,vars:0,consts:()=>{let n;return n="Close this modal",[[`modal`,``],[1,`modal-header`],[1,`modal-title`],[`title`,n,1,`border-0`,`p-0`],[1,`modal-body`,3,`innerHTML`],[1,`modal-footer`,`inputs`],[`title`,n,1,`border-0`,`p-0`,3,`click`],[`iconName`,`cross`],[`type`,`button`,`role`,`button`,1,`peertube-button`,`secondary-button`,3,`value`],[`type`,`button`,`role`,`button`,1,`peertube-button`,`primary-button`,3,`value`],[`type`,`button`,`role`,`button`,1,`peertube-button`,`secondary-button`,3,`click`,`key.enter`,`value`],[`type`,`button`,`role`,`button`,1,`peertube-button`,`primary-button`,3,`click`,`key.enter`,`value`]]},template:function(e,i){e&1&&CA(0,kr,6,4,`ng-template`,null,0,G5)},dependencies:[X1],styles:[`li[_ngcontent-%COMP%]{margin-bottom:10px}`],changeDetection:1})};var Dr=[`dropdown`];var Lr=()=>[import(`./chunk-BuyvJJJY.js`).then(t=>t.UserNotificationsComponent)];var $r=(t,n)=>({shown:t,hidden:n});var Hr=t=>({loaded:t});function Fr(t,n){if(t&1&&(Mp(0,`div`,10),g5(1),Gb()),t&2){let e=j$(2);ij(),Tx(e.unreadNotifications)}}function Vr(t,n){t&1&&(Mp(0,`div`,10),g5(1,`99+`),Gb())}function Ur(t,n){if(t&1&&YV(0,Fr,2,1,`div`,10)(1,Vr,2,0,`div`,10),t&2){let e=j$();KV(e.unreadNotifications>0&&e.unreadNotifications<100?0:e.unreadNotifications>=100?1:-1)}}function zr(t,n){t&1&&sh(0,`my-global-icon`,11)}function Gr(t,n){t&1&&sh(0,`my-global-icon`,12)}function Br(t,n){if(t&1&&YV(0,zr,1,0,`my-global-icon`,11)(1,Gr,1,0,`my-global-icon`,12),t&2)KV(j$().unreadNotifications?0:1)}function jr(t,n){t&1&&FA(0)}function Xr(t,n){t&1&&FA(0)}function Wr(t,n){if(t&1){let e=o$();Mp(0,`a`,13,2),ch(`click`,function(){kI(e);let o=z$(1);return FI(j$().onNavigate(o))}),CA(2,jr,1,0,`ng-container`,14)(3,Xr,1,0,`ng-container`,14),Gb()}if(t&2){j$();let e=z$(1),i=z$(3);ij(2),LA(`ngTemplateOutlet`,e),ij(),LA(`ngTemplateOutlet`,i)}}function Qr(t,n){t&1&&FA(0)}function qr(t,n){t&1&&FA(0)}function Kr(t,n){if(t&1){let e=o$();Mp(0,`my-button`,25),ch(`click`,function(){kI(e);return FI(j$(2).markAllAsRead())}),Gb()}}function Yr(t,n){if(t&1){let e=o$();Mp(0,`my-user-notifications`,26),ch(`notificationsLoaded`,function(){kI(e);return FI(j$(2).onNotificationLoaded())}),Gb()}if(t&2){let e=j$(2);LA(`ignoreLoadingBar`,!0)(`infiniteScroll`,!1)(`itemsPerPage`,10)(`markAllAsReadSubject`,e.markAllAsReadSubject)(`userNotificationReload`,e.userNotificationReload)}}function Zr(t,n){t&1&&(Mp(0,`div`,21),sh(1,`my-loader`,27),Gb())}function Jr(t,n){t&1&&(Mp(0,`a`,24),qb(1),U$(2,7),ah(),sh(3,`my-global-icon`,28),Gb())}function ea(t,n){if(t&1){let e=o$();Mp(0,`div`,15,3),ch(`openChange`,function(o){kI(e);let d=j$();return FI(o===!0?d.onDropdownShown():d.onDropdownHidden())}),Mp(2,`button`,16),CA(3,Qr,1,0,`ng-container`,14)(4,qr,1,0,`ng-container`,14),Gb(),Mp(5,`div`,17)(6,`div`,18)(7,`header`)(8,`div`,19),U$(9,5),Gb(),YV(10,Kr,1,0,`my-button`,20),Gb(),IA(11,Yr,1,5),UV(12,11,Lr),YV(14,Zr,2,0,`div`,21),Mp(15,`footer`)(16,`a`,22,4),ch(`click`,function(){kI(e);let o=z$(17);return FI(j$().onNavigate(o))}),sh(18,`my-global-icon`,23),qb(19),U$(20,6),ah(),Gb(),YV(21,Jr,4,0,`a`,24),Gb()()()()}if(t&2){let e=j$(),i=z$(1),o=z$(3);ij(2),LA(`ngClass`,M5(8,$r,e.opened,e.isInMobileView)),ij(),LA(`ngTemplateOutlet`,i),ij(),LA(`ngTemplateOutlet`,o),ij(2),LA(`ngClass`,N5(11,Hr,e.loaded)),ij(4),KV(e.unreadNotifications>0?10:-1),ij(2),HV(e.opened),ij(2),KV(e.loaded?-1:14),ij(7),KV(e.loaded?21:-1)}}var Zt=class t{userNotificationService=m(L$3);screenService=m(Yc);peertubeSocket=m(Wg);notifier=m(Oi);router=m(st);dropdown=tme(`dropdown`);unreadNotifications=0;loaded=!1;opened=!1;
277markAllAsReadSubject=new K;userNotificationReload=new K;notificationSub;routeSub;ngOnInit(){this.userNotificationService.countUnreadNotifications().subscribe({next:n=>{this.unreadNotifications=n,this.subscribeToNotifications()},error:n=>this.notifier.handleError(n)}),this.routeSub=this.router.events.pipe(xe(n=>n instanceof Bt)).subscribe(()=>this.closeDropdown())}ngOnDestroy(){this.notificationSub&&this.notificationSub.unsubscribe(),this.routeSub&&this.routeSub.unsubscribe()}get isInMobileView(){return this.screenService.isInMobileView()}closeDropdown(){let n=this.dropdown();n&&n.close()}onDropdownShown(){this.loaded&&this.userNotificationReload.next(!0),this.opened=!0}onDropdownHidden(){this.opened=!1}onNotificationLoaded(){this.loaded=!0}onNavigate(n){this.closeDropdown()}markAllAsRead(){this.markAllAsReadSubject.next(!0)}subscribeToNotifications(){return F(this,null,function*(){let n=yield this.peertubeSocket.getMyNotificationsSocket();this.notificationSub=n.subscribe(e=>{if(e.type===`new`)return this.unreadNotifications++;if(e.type===`read`)return this.unreadNotifications--;if(e.type===`read-all`)return this.unreadNotifications=0})})}static ɵfac=function(e){return new(e||t)};static ɵcmp=qa$1({type:t,selectors:[[`my-notification-dropdown`]],viewQuery:function(e,i){e&1&&ax(i.dropdown,Dr,5),e&2&&G$()},decls:6,vars:1,consts:()=>{let n;n="View your notifications";let e;e="View your notifications";let i;i="Mark all as read";let o;o="Update your notification preferences";let d;d="Notifications";let m;m="Settings";let b;return b="View all",[[`notificationNumber`,``],[`notificationIcon`,``],[`link`,``],[`dropdown`,`ngbDropdown`],[`settingsNotifications`,``],d,m,b,[`title`,n,`routerLink`,`/my-account/notifications`,`routerLinkActive`,`active`,1,`peertube-button`,`tertiary-button`,`rounded-icon-button`,`notification-inbox-link`,`inherit-color`],[`ngbDropdown`,``,`autoClose`,`outside`,`placement`,`bottom-end auto`,`container`,`body`,`dropdownClass`,`dropdown-notifications`],[1,`unread-notifications`],[`iconName`,`opened-bell`],[`iconName`,`bell`],[`title`,n,`routerLink`,`/my-account/notifications`,`routerLinkActive`,`active`,1,`peertube-button`,`tertiary-button`,`rounded-icon-button`,`notification-inbox-link`,`inherit-color`,3,`click`],[4,`ngTemplateOutlet`],[`ngbDropdown`,``,`autoClose`,`outside`,`placement`,`bottom-end auto`,`container`,`body`,`dropdownClass`,`dropdown-notifications`,3,`openChange`],[`title`,e,`ngbDropdownToggle`,``,1,`peertube-button`,`tertiary-button`,`rounded-icon-button`,`disable-dropdown-caret`,`notification-inbox-dropdown`,`inherit-color`,3,`ngClass`],[`ngbDropdownMenu`,``],[1,`content`,3,`ngClass`],[1,`title`],[`label`,i,`icon`,`circle-tick`,`small`,`true`,`theme`,`secondary`],[1,`loader`,`mt-4`],[`title`,o,`routerLink`,`/my-account/settings`,`fragment`,`notifications`,1,`text-decoration-underline`,3,`click`],[`iconName`,`cog`,1,`me-1`,`secondary-icon-color`],[`routerLink`,`/my-account/notifications`,1,`peertube-button-link`,`secondary-button`],[`label`,i,`icon`,`circle-tick`,`small`,`true`,`theme`,`secondary`,3,`click`],[`inPopup`,`true`,3,`notificationsLoaded`,`ignoreLoadingBar`,`infiniteScroll`,`itemsPerPage`,`markAllAsReadSubject`,`userNotificationReload`],[`size`,`xl`,`loading`,`true`],[`iconName`,`arrow-left`,1,`rotate-180`,`ms-2`]]},template:function(e,i){e&1&&(CA(0,Ur,2,1,`ng-template`,null,0,G5)(2,Br,2,1,`ng-template`,null,1,G5),YV(4,Wr,4,2,`a`,8)(5,ea,22,13,`div`,9)),e&2&&(ij(4),KV(i.isInMobileView?4:5))},dependencies:[Nu,X3,J3,X1,p,Tm,H4,ep,$n$1,tp,gr$1,ce],styles:[`.content[_ngcontent-%COMP%]{scrollbar-color:auto;background:var(--%NS%bg-secondary-400);padding-inline-start:calc(1.325rem + .9vw)}@media(min-width:1200px){.content[_ngcontent-%COMP%]{padding-inline-start:2rem}}.content[_ngcontent-%COMP%]{padding-inline-end:calc(1.325rem + .9vw)}@media(min-width:1200px){.content[_ngcontent-%COMP%]{padding-inline-end:2rem}}.content[_ngcontent-%COMP%]{padding-top:calc(1.325rem + .9vw)}@media(min-width:1200px){.content[_ngcontent-%COMP%]{padding-top:2rem}}.content[_ngcontent-%COMP%]{padding-bottom:calc(1.325rem + .9vw)}@media(min-width:1200px){.content[_ngcontent-%COMP%]{padding-bottom:2rem}}header[_ngcontent-%COMP%], footer[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}header[_ngcontent-%COMP%]{margin-bottom:calc(1.275rem + .3vw)}@media(min-width:1200px){header[_ngcontent-%COMP%]{margin-bottom:1.5rem}}header[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{color:var(--%NS%fg-300);font-size:22px;font-weight:700}footer[_ngcontent-%COMP%]{margin-top:calc(1.275rem + .3vw)}@media(min-width:1200px){footer[_ngcontent-%COMP%]{margin-top:1.5rem}}  .dropdown-notifications .dropdown-menu{padding:0;font-family:Source Sans Pro,sans-serif;width:550px;max-width:75vw}  .dropdown-notifications .dropdown-menu .loader{display:flex;align-items:center;justify-content:center;padding:5px 0}  .dropdown-notifications .dropdown-menu .content{max-height:250px;transition:max-height .15s ease-out;display:flex;height:500px;flex-direction:column}  .dropdown-notifications .dropdown-menu .content.loaded{max-height:500px}  .dropdown-notifications .dropdown-menu .content>my-user-notifications:nth-child(2){overflow-y:auto;flex-grow:1}.notification-inbox-dropdown[_ngcontent-%COMP%], .notification-inbox-link[_ngcontent-%COMP%]{cursor:pointer;position:relative;display:inline-block}.notification-inbox-dropdown[_ngcontent-%COMP%]   .unread-notifications[_ngcontent-%COMP%], .notification-inbox-link[_ngcontent-%COMP%]   .unread-notifications[_ngcontent-%COMP%]{margin-left:20px}.notification-inbox-dropdown[_ngcontent-%COMP%]   .unread-notifications[_ngcontent-%COMP%], .notification-inbox-link[_ngcontent-%COMP%]   .unread-notifications[_ngcontent-%COMP%]{position:absolute;top:6px;left:0;background-color:var(--%NS%primary);color:var(--%NS%on-primary);font-weight:700;font-size:10px;border-radius:16px;line-height:16px;padding:0 3px;min-width:16px}`],changeDetection:1})};var ta=[`modal`];function na(t,n){if(t&1&&sh(0,`my-user-interface-settings`,12),t&2){let e=j$(2);LA(`user`,e.user)(`userInformationLoaded`,e.userInformationLoaded)}}function ia(t,n){if(t&1&&sh(0,`my-user-video-settings`,12),t&2){let e=j$(2);LA(`user`,e.user)(`userInformationLoaded`,e.userInformationLoaded)}}
277function oa(t,n){if(t&1){let e=o$();Mp(0,`div`,5)(1,`h4`,6),U$(2,1),Gb(),Mp(3,`button`,7),ch(`click`,function(){let o=kI(e).close;return FI(o())}),sh(4,`my-global-icon`,8),Gb()(),Mp(5,`div`,9)(6,`my-alert`,10),U$(7,2),Gb(),Mp(8,`h5`,11),U$(9,3),Gb(),YV(10,na,1,2,`my-user-interface-settings`,12),Mp(11,`h5`,11),U$(12,4),Gb(),YV(13,ia,1,2,`my-user-video-settings`,12),Gb()}if(t&2){let e=j$();ij(10),KV(e.isUserLoggedIn()?-1:10),ij(3),KV(e.isUserLoggedIn()?-1:13)}}var Jt=class t{modalService=m(sr$1);userService=m(tl);authService=m(tt);localStorageService=m(po);route=m(eo);peertubeRouter=m(Bi);static QUERY_MODAL_NAME=`quick-settings`;modal=tme(`modal`);user;userInformationLoaded=new qe$1(1);openedModal;routeSub;loginSub;localStorageSub;ngOnInit(){this.user=this.userService.getAnonymousUser(),this.localStorageSub=this.localStorageService.watch().subscribe({next:()=>this.user=this.userService.getAnonymousUser()}),this.userInformationLoaded.next(!0),this.loginSub=this.authService.loginChangedSource.pipe(xe(n=>n!==0)).subscribe({next:()=>{this.user=this.userService.getAnonymousUser(),this.userInformationLoaded.next(!0)}}),this.routeSub=this.route.queryParams.subscribe(n=>{n.modal===t.QUERY_MODAL_NAME&&(this.openedModal=this.modalService.open(this.modal(),{centered:!0}),this.openedModal.hidden.subscribe(()=>this.setModalQuery(`remove`)))})}ngOnDestroy(){this.routeSub&&this.routeSub.unsubscribe(),this.loginSub&&this.loginSub.unsubscribe(),this.localStorageSub&&this.localStorageSub.unsubscribe()}isUserLoggedIn(){return this.authService.isLoggedIn()}show(){this.setModalQuery(`add`)}setModalQuery(n){let e=n===`add`?t.QUERY_MODAL_NAME:null;this.peertubeRouter.silentNavigate([],{modal:e},this.route)}static ɵfac=function(e){return new(e||t)};static ɵcmp=qa$1({type:t,selectors:[[`my-quick-settings`]],viewQuery:function(e,i){e&1&&ax(i.modal,ta,5),e&2&&G$()},decls:2,vars:0,consts:()=>{let n;n="Close this modal";let e;e="My settings";let i;i="These settings apply only to your session on this instance.";let o;o="INTERFACE";let d;return d="VIDEOS",[[`modal`,``],e,i,o,d,[1,`modal-header`],[1,`modal-title`],[`title`,n,1,`border-0`,`p-0`,3,`click`],[`iconName`,`cross`],[1,`modal-body`],[`type`,`primary`],[1,`section-label`,`mt-4`,`mb-3`],[`reactiveUpdate`,`true`,`notifyOnUpdate`,`true`,3,`user`,`userInformationLoaded`]]},template:function(e,i){e&1&&CA(0,oa,14,2,`ng-template`,null,0,G5)},dependencies:[X1,Se,de,c$2],styles:[`h5[_ngcontent-%COMP%]{font-size:1rem}`],changeDetection:1})};var Wo=C(Vo$1());function ra(t,n){t&1&&(Mp(0,`span`),U$(1,0),Gb())}function aa(t,n){t&1&&(Mp(0,`span`),U$(1,1),Gb())}var Ke=class t{result=yh(void 0);highlight=yh(void 0);describedby=yh(void 0);disabled=!1;active=!1;getTitle(){let n=this.result();if(n.type===`search-instance`)return `Search "${n.text}" in this instance's network`;if(n.type===`search-index`)return `Search "${n.text}" in the vidiverse`}ngOnInit(){this.result().default&&(this.active=!0)}static ɵfac=function(e){return new(e||t)};static ɵcmp=qa$1({type:t,selectors:[[`my-suggestion`]],inputs:{result:[1,`result`],highlight:[1,`highlight`],describedby:[1,`describedby`]},decls:7,vars:7,consts:()=>{let n;n="In this instance's network";let e;return e="In the vidiverse",[n,e,[`tabindex`,`-1`,1,`d-flex`,`flex-auto`,`align-items-center`,`p-2`],[`iconName`,`search`,1,`me-2`],[1,`flex-auto`,`overflow-hidden`,`no-wrap`,`d-flex`,`align-items-center`],[1,`result-type`,`border`,`rounded`,`flex-shrink-0`,`px-1`,`ms-1`,`f6`]]},template:function(e,i){e&1&&(Mp(0,`a`,2),sh(1,`my-global-icon`,3),Mp(2,`div`,4),g5(3),Gb(),Mp(4,`div`,5),YV(5,ra,2,0,`span`)(6,aa,2,0,`span`),Gb()()),e&2&&(px(`focus-visible`,i.active),ih(`title`,i.getTitle())(`aria-describedby`,i.describedby()),ij(2),ih(`aria-label`,i.result().text),ij(),Jb(` `,i.result().text,` `),ij(2),KV(i.result().type===`search-instance`?5:i.result().type===`search-index`?6:-1))},dependencies:[X1],styles:[`a[_ngcontent-%COMP%]{width:100%}a[_ngcontent-%COMP%], a[_ngcontent-%COMP%]:hover, a[_ngcontent-%COMP%]:focus, a[_ngcontent-%COMP%]:active{text-decoration:none}a[_ngcontent-%COMP%]:focus:not(:focus-visible){outline:none}a[_ngcontent-%COMP%], a[_ngcontent-%COMP%]:hover{color:var(--%NS%fg);opacity:1}a.focus-visible[_ngcontent-%COMP%], a[_ngcontent-%COMP%]:hover.focus-visible{background-color:var(--%NS%primary);color:var(--%NS%on-primary)}.result-type[_ngcontent-%COMP%]{background-color:var(--%NS%bg);color:var(--%NS%fg-400)}my-global-icon[_ngcontent-%COMP%]{color:var(--%NS%on-primary);display:inline-block;width:17px;height:17px;line-height:17px}`],changeDetection:1})};function sa(t,n){if(t&1){let e=o$();Mp(0,`li`,21),ch(`mouseenter`,function(){let o=kI(e).$index;return FI(j$().onSuggestionHover(o))})(`click`,function(){let o=kI(e).$implicit;return FI(j$().onSuggestionClicked(o))})(`keyup.enter`,function(){let o=kI(e).$implicit;return FI(j$().onSuggestionClicked(o))}),sh(1,`my-suggestion`,22),Gb()}if(t&2){let e=n.$implicit,i=j$();
277ij(),LA(`result`,e)(`highlight`,i.search)(`describedby`,i.showSearchGlobalHelp()?`typeahead-help`:void 0)}}function la(t,n){if(t&1&&(Mp(0,`span`,18),U$(1,8),Gb()),t&2){let e=j$(2);ij(),nx(e.serverConfig.search.searchIndex.url),H$(1)}}function ca(t,n){if(t&1&&(Mp(0,`div`,16)(1,`div`,23)(2,`div`,24),U$(3,6),Gb(),YV(4,la,2,1,`span`,18),Gb(),Mp(5,`div`,18),U$(6,7),Gb()()),t&2){let e=j$();ij(4),KV(e.serverConfig?4:-1)}}var da=(0,Wo.default)(`peertube:search`);var en=class t{authService=m(tt);router=m(st);route=m(eo);serverService=m(Kt$1);injector=m(Dt);suggestionItems=nme(Ke);hasChannel=!1;inChannel=!1;areSuggestionsOpened=!0;search=``;serverConfig;inThisChannelText;keyboardEventsManager;results=[];activeSearch;scheduleKeyboardEventsInit=!1;ngOnInit(){this.route.queryParams.pipe(Ke$1(n=>this.isOnSearch()&&n.search!==void 0&&n.search!==null)).subscribe(n=>this.search=n.search),this.serverConfig=this.serverService.getHTMLConfig(),this.computeTypeahead(),this.serverService.configReloaded.subscribe(n=>{this.serverConfig=n,this.computeTypeahead()})}ngAfterViewChecked(){this.scheduleKeyboardEventsInit&&!this.keyboardEventsManager&&setTimeout(()=>this.initKeyboardEventsManager(),0)}ngOnDestroy(){this.keyboardEventsManager&&this.keyboardEventsManager.change.unsubscribe()}showSearchGlobalHelp(){return this.search&&this.areSuggestionsOpened&&this.keyboardEventsManager?.activeItem?.result()?.type===`search-index`}canSearchAnyURI(){return this.authService.isLoggedIn()?this.serverConfig.search.remoteUri.users:this.serverConfig.search.remoteUri.anonymous}onSearchChange(){this.computeTypeahead()}initKeyboardEventsManager(){if(this.keyboardEventsManager)return;this.keyboardEventsManager=new h(this.suggestionItems,this.injector);let n=this.suggestionItems().findIndex(e=>e.result().default===!0);n===-1&&j.error(`Cannot find active index.`,{suggestionItems:this.suggestionItems()}),this.updateItemsState(n),this.keyboardEventsManager.change.subscribe(e=>this.updateItemsState())}computeTypeahead(){let n=this.serverConfig.search.searchIndex;this.activeSearch||(n.enabled&&(n.isDefaultSearch||n.disableLocalSearch)?this.activeSearch=`search-index`:this.activeSearch=`search-instance`),this.areSuggestionsOpened=!0,this.results=[],this.search&&((n.enabled===!1||n.disableLocalSearch!==!0)&&this.results.push({text:this.search,type:`search-instance`,default:this.activeSearch===`search-instance`}),n.enabled&&this.results.push({text:this.search,type:`search-index`,default:this.activeSearch===`search-index`}),this.scheduleKeyboardEventsInit=!0,da(`Typeahead rebuilt`,this.results))}updateItemsState(n){if(this.keyboardEventsManager){n!==void 0&&this.keyboardEventsManager.setActiveItem(n);for(let e of this.suggestionItems()){if(this.keyboardEventsManager.activeItem&&this.keyboardEventsManager.activeItem===e){e.active=!0,this.activeSearch=e.result().type;continue}e.active=!1}}}onSuggestionClicked(n){this.doSearch(this.buildSearchTarget(n))}onSuggestionHover(n){this.updateItemsState(n)}handleKey(n){if(this.keyboardEventsManager)switch(n.key){case`ArrowDown`:case`ArrowUp`:n.stopPropagation(),this.keyboardEventsManager.onKeydown(n);break;case`Enter`:n.stopPropagation(),this.doSearch();break}}isOnSearch(){return window.location.pathname===`/search`}doSearch(n){this.areSuggestionsOpened=!1;let e={};this.isOnSearch()&&this.route.snapshot.queryParams&&Object.assign(e,this.route.snapshot.queryParams),n||(n=this.buildSearchTarget(this.keyboardEventsManager.activeItem.result())),Object.assign(e,{search:this.search,searchTarget:n}),(this.authService.isLoggedIn()?this.loadUserLanguagesIfNeeded(e):O(!0)).subscribe(()=>this.router.navigate([`/search`],{queryParams:e}))}loadUserLanguagesIfNeeded(n){return n?.languageOneOf?O(n):this.authService.userInformationLoaded.pipe(Ke$1(),Tt(()=>Object.assign(n,{languageOneOf:this.authService.getUser().videoLanguages})))}buildSearchTarget(n){return n.type===`search-index`?`search-index`:`local`}static ɵfac=function(e){return new(e||t)};static ɵcmp=qa$1({type:t,selectors:[[`my-search-typeahead`]],viewQuery:function(e,i){e&1&&ax(i.suggestionItems,Ke,5),e&2&&G$()},decls:31,vars:4,consts:()=>{let n;n="Search";let e;e="Search videos, channels…";let i;i="Your query will be matched against video names or channel names.";let o;o="ADVANCED SEARCH";let d;d="will list the matching channel";let m;m="will list the matching channel";let b;b="will list the matching video";let O;O="GLOBAL SEARCH";let P;P="Results will be augmented with those of a third-party index. Only data necessary to make the query will be sent.";let L;return L=`using ${`�0�`}`,[[`searchVideo`,``],i,o,d,m,b,O,P,L,[`id`,`typeahead-container`,1,`position-relative`],[`title`,n,1,`button-unstyle`,`search-button`,3,`click`],[`iconName`,`search`],[`type`,`search`,`id`,`search-video`,`name`,`search-video`,`aria-label`,`Search videos, playlists, channels…`,`placeholder`,e,`autocomplete`,`off`,`aria-describedby`,`typeahead-input-help`,3,`ngModelChange`,`keydown`,`ngModel`],[1,`position-absolute`,`jump-to-suggestions`],[`role`,`listbox`,1,`p-0`,`m-0`,3,`hidden`],[`role`,`option`,`aria-selected`,`true`,`tabindex`,`0`,1,`suggestion`,`d-flex`,`flex-justify-start`,`flex-items-center`,`p-0`,`f5`],[`id`,`typeahead-suggestion-help`,1,`overflow-hidden`],[`id`,`typeahead-input-help`,1,`overflow-hidden`,3,`hidden`],[1,`muted`],[1,`mt-3`,`mb-2`,`section-label`],[1,`flex-auto`,`muted`],[`role`,`option`,`aria-selected`,`true`,`tabindex`,`0`,1,`suggestion`,`d-flex`,`flex-justify-start`,`flex-items-center`,`p-0`,`f5`,3,`mouseenter`,`click`,`keyup.enter`],[3,`result`,`highlight`,`describedby`],[1,`d-flex`,`justify-content-between`],[1,`section-label`,`mb-2`]]},template:function(e,i){if(e&1){let o=o$();Mp(0,`div`,9)(1,`button`,10),ch(`click`,function(){return i.doSearch()}),sh(2,`my-global-icon`,11),Gb(),Mp(3,`input`,12,0),wx(`ngModelChange`,function(m){return kI(o),S5(i.search,m)||(i.search=m),FI(m)}),ch(`ngModelChange`,function(){return i.onSearchChange()})(`keydown`,function(m){return i.handleKey(m)}),Gb(),i2(),Mp(5,`div`,13)(6,`ul`,14),QV(7,sa,2,3,`li`,15,ZV),Gb(),YV(9,ca,7,1,`div`,16),Mp(10,`div`,17)(11,`span`,18),U$(12,1),Gb(),Mp(13,`div`,19),U$(14,2),Gb(),Mp(15,`ul`)(16,`li`)(17,`em`),g5(18,`@channel_id@domain`),Gb(),Mp(19,`span`,20),U$(20,3),Gb()(),Mp(21,`li`)(22,`em`),g5(23,`URL`),Gb(),Mp(24,`span`,18),U$(25,4),Gb()(),Mp(26,`li`)(27,`em`),g5(28,`UUID`),Gb(),Mp(29,`span`,18),U$(30,5),Gb()()()()()()}e&2&&(ij(3),_x(`ngModel`,i.search),a2(),ij(3),LA(`hidden`,!i.search||!i.areSuggestionsOpened),ij(),JV(i.results),ij(2),KV(i.showSearchGlobalHelp()?9:-1),ij(),LA(`hidden`,i.search))},dependencies:[Qn,Je$1,qn,dn$1,X1,Ke],styles:[`#search-video[_ngcontent-%COMP%]{text-overflow:ellipsis;font-size:16px;padding:var(--%NS%input-y-padding) var(--%NS%input-x-padding);width:100%;max-width:100%;color:var(--%NS%input-fg);background-color:var(--%NS%input-bg);border:var(--%NS%input-border-width) solid var(--%NS%input-border-color);border-radius:var(--%NS%input-border-radius);line-height:24px}#search-video[_ngcontent-%COMP%]::placeholder{color:var(--%NS%input-placeholder-color);font-size:var(--%NS%input-placeholder-font-size)}#search-video[readonly][_ngcontent-%COMP%]{color:var(--%NS%fg-300)}#search-video[_ngcontent-%COMP%]:focus, #search-video[_ngcontent-%COMP%]:focus-visible{box-shadow:0 0 0 .2rem var(--%NS%fg-100);outline:0}#search-video[disabled][_ngcontent-%COMP%]{color:var(--%NS%fg-300);opacity:.8}@media screen and (max-width: calc(100% + 40px)){#search-video[_ngcontent-%COMP%]{width:100%}}#search-video[_ngcontent-%COMP%]{padding-inline-start:42px;padding-inline-end:20px}#search-video[_ngcontent-%COMP%]::placeholder{color:var(--%NS%input-placeholder-color)}.search-button[_ngcontent-%COMP%]{position:absolute;top:0;bottom:0}@supports (inset-inline-start: 18px){.search-button[_ngcontent-%COMP%]{inset-inline-start:18px}}@supports not (inset-inline-start: 18px){.search-button[_ngcontent-%COMP%]{left:18px}}.search-button[_ngcontent-%COMP%]:hover{opacity:.8}.search-button[_ngcontent-%COMP%]   my-global-icon[_ngcontent-%COMP%]{height:18px;width:18px;position:relative;top:-2px}.jump-to-suggestions[_ngcontent-%COMP%]{top:100%;left:0;z-index:12650;width:100%}#typeahead-suggestion-help[_ngcontent-%COMP%], #typeahead-input-help[_ngcontent-%COMP%], .suggestion[_ngcontent-%COMP%]{border:1px solid var(--%NS%bg);background:var(--%NS%bg-secondary-400);transition:.3s ease;
277transition-property:box-shadow;cursor:pointer}#typeahead-suggestion-help[_ngcontent-%COMP%], #typeahead-input-help[_ngcontent-%COMP%], .suggestion[_ngcontent-%COMP%]:last-of-type{border-bottom-right-radius:3px;border-bottom-left-radius:3px}#typeahead-suggestion-help[_ngcontent-%COMP%], #typeahead-input-help[_ngcontent-%COMP%]{margin-top:9px;width:100%;padding:.5rem 1rem;white-space:normal}#typeahead-suggestion-help[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%], #typeahead-input-help[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{list-style:none;padding:0;margin-bottom:.5rem}#typeahead-suggestion-help[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   em[_ngcontent-%COMP%], #typeahead-input-help[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   em[_ngcontent-%COMP%]{font-weight:600;font-style:normal;margin-inline-end:.2rem}#typeahead-container[_ngcontent-%COMP%]{font-size:14px}#typeahead-container[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:last-child{display:none}@media screen and (min-width:500px){#typeahead-container[_ngcontent-%COMP%]:focus-within > div[_ngcontent-%COMP%]:last-child{display:initial!important}}#typeahead-container[_ngcontent-%COMP%]:focus-within > div[_ngcontent-%COMP%]:last-child   #typeahead-suggestion-help[_ngcontent-%COMP%], #typeahead-container[_ngcontent-%COMP%]:focus-within > div[_ngcontent-%COMP%]:last-child   #typeahead-input-help[_ngcontent-%COMP%], #typeahead-container[_ngcontent-%COMP%]:focus-within > div[_ngcontent-%COMP%]:last-child   .suggestion[_ngcontent-%COMP%]{box-shadow:#0003 0 10px 20px -5px}#typeahead-container[_ngcontent-%COMP%]:focus-within   input[_ngcontent-%COMP%]{box-shadow:#0003 0 1px 20px;border-end-start-radius:0;border-end-end-radius:0}@media screen and (min-width:1000px){#typeahead-container[_ngcontent-%COMP%]:focus-within   input[_ngcontent-%COMP%]{width:500px}}my-suggestion[_ngcontent-%COMP%]{width:100%}`],changeDetection:1})};var pa=[`quickSettingsModal`];var ma=[`dropdown`];var ua=t=>({"search-hidden":t});var ga=t=>[`/a`,t];function _a(t,n){if(t&1){let e=o$();Mp(0,`div`,9)(1,`div`,17),U$(2,3),Gb(),Mp(3,`a`,18),ch(`click`,function(){kI(e);return FI(j$().onOpenClientClick())}),g5(4,`Open`),Gb(),Mp(5,`button`,19),ch(`click`,function(){kI(e);return FI(j$().hideMobileMsg())}),sh(6,`my-global-icon`,20),Gb()()}if(t&2){let e=j$();ij(3),LA(`href`,e.androidAppUrl||e.iosAppUrl,tw)}}function ha(t,n){if(t&1&&(Mp(0,`span`,13),g5(1),Gb()),t&2){let e=j$();ij(),Tx(e.instanceName)}}function fa(t,n){if(t&1&&sh(0,`my-search-typeahead`,14),t&2)LA(`hidden`,!j$().isLoaded())}function Ca(t,n){if(t&1&&(Mp(0,`a`,22),sh(1,`my-signup-label`,25),Gb()),t&2){let e=j$(2);ij(),LA(`requiresApproval`,e.requiresApproval)}}function ya(t,n){if(t&1){let e=o$();Mp(0,`my-button`,21),ch(`click`,function(){kI(e);return FI(j$().openQuickSettings())}),Gb(),YV(1,Ca,2,1,`a`,22),sh(2,`my-login-link`,23)(3,`my-login-link`,24)}if(t&2){let e=j$();ij(),KV(e.isRegistrationAllowed()?1:-1)}}function ba(t,n){if(t&1&&(Mp(0,`a`,35,2),sh(2,`my-global-icon`,44),qb(3),U$(4,6),ah(),Gb()),t&2)LA(`routerLink`,N5(1,ga,j$(2).user.account.nameWithHost))}function va(t,n){t&1&&(Mp(0,`a`,37),sh(1,`my-global-icon`,45),qb(2),U$(3,7),ah(),Gb())}function Sa(t,n){if(t&1){let e=o$();Mp(0,`button`,46),ch(`click`,function(){kI(e);return FI(j$(2).openHotkeysCheatSheet())}),sh(1,`my-global-icon`,47),qb(2),U$(3,8),ah(),Gb()}}function Ma(t,n){if(t&1){let e=o$();sh(0,`my-notification-dropdown`,26)(1,`my-button`,27),Mp(2,`div`,28,1)(4,`button`,29),sh(5,`my-actor-avatar`,30),Mp(6,`div`,31)(7,`div`,32),g5(8),Gb(),Mp(9,`div`,33),g5(10),Gb()()(),Mp(11,`div`,34),YV(12,ba,5,3,`a`,35),sh(13,`div`,36),YV(14,va,4,0,`a`,37),sh(15,`div`,36),Mp(16,`a`,38),sh(17,`my-global-icon`,39),Mp(18,`span`),U$(19,4),Gb(),Mp(20,`span`,40),g5(21),Gb()(),YV(22,Sa,4,0,`button`,41),Mp(23,`button`,42),ch(`click`,function(o){kI(e);return FI(j$().logout(o))}),sh(24,`my-global-icon`,43),qb(25),U$(26,5),ah(),Gb()()()}if(t&2){let e=j$();ij(5),LA(`actor`,e.user.account),ij(3),Tx(e.user.account?.displayName),ij(2),Jb(`@`,e.user.username),ij(2),KV(e.user.account?12:-1),ij(2),KV(e.user.account?14:-1),ij(7),Tx(e.currentInterfaceLanguage),ij(),KV(e.isInMobileView?-1:22)}}var tn=class t$1{authService=m(tt);serverService=m(Kt$1);redirectService=m(ho);hotkeysService=m(zc);screenService=m(Yc);modalService=m(n$1);router=m(st);menu=m(zg);headerService=m(Zg);localeId=m(mn);static LS_HIDE_MOBILE_MSG=`hide-mobile-msg`;quickSettingsModal=tme(`quickSettingsModal`);dropdown=tme(`dropdown`);user;loggedIn;hotkeysHelpVisible=!1;mobileMsg=!1;androidAppUrl=``;iosAppUrl=``;searchHidden=!1;config;htmlConfig;quickSettingsModalSub;getSearchHiddenSub;hotkeysSub;authSub;get currentInterfaceLanguage(){let n=`English`,e=Ng()?Mg():Ei(this.localeId);return e&&c8[e]||n}get requiresApproval(){return this.config.signup.requiresApproval}get instanceName(){return this.serverService.getHTMLConfig().instance.name}isInstanceNameDisplayed(){return this.serverService.getHTMLConfig().client.header.hideInstanceName!==!0}isLoaded(){return this.config&&(!this.loggedIn||!!this.user?.account)}isInMobileView(){return this.screenService.isInMobileView()}isInSmallView(){return this.screenService.isInSmallView()}getLogoUrl(){let n=this.serverService.getHTMLConfig().instance.logo;return this.isInMobileView()?NT(n.filter(e=>e.type===`header-square`),36)?.fileUrl:NT(n.filter(e=>e.type===`header-wide`),36)?.fileUrl}ngOnInit(){this.htmlConfig=this.serverService.getHTMLConfig(),this.loggedIn=this.authService.isLoggedIn(),this.updateUserState(),this.authSub=this.authService.loginChangedSource.subscribe(n=>{n===0?this.loggedIn=!0:n===1&&(this.loggedIn=!1),this.updateUserState()}),this.hotkeysSub=this.hotkeysService.cheatSheetToggle.subscribe(n=>this.hotkeysHelpVisible=n),this.serverService.getConfig().subscribe(n=>this.config=n),this.quickSettingsModalSub=this.modalService.openQuickSettingsSubject.subscribe(()=>
277this.openQuickSettings()),this.getSearchHiddenSub=this.headerService.getSearchHiddenObs().subscribe(n=>{n?document.documentElement.classList.add(`global-search-hidden`):document.documentElement.classList.remove(`global-search-hidden`),this.searchHidden=n}),this.setupMobileMsg()}ngOnDestroy(){this.quickSettingsModalSub&&this.quickSettingsModalSub.unsubscribe(),this.hotkeysSub&&this.hotkeysSub.unsubscribe(),this.authSub&&this.authSub.unsubscribe(),this.getSearchHiddenSub&&this.getSearchHiddenSub.unsubscribe()}getDefaultRoute(){return this.redirectService.getDefaultRoute()}getDefaultRouteQuery(){return this.redirectService.getDefaultRouteQuery()}setupMobileMsg(){if(!this.isInMobileView()||Kn.getItem(t$1.LS_HIDE_MOBILE_MSG)===`true`||!r()&&!n$2())return;let n=window.location.host,e=this.htmlConfig.client.openInApp.android.intent,i=this.htmlConfig.client.openInApp.ios;if(r()&&e.enabled===!1||n$2()&&i.enabled===!1)return;this.mobileMsg=!0,document.documentElement.classList.add(`mobile-app-msg`);let o=m=>{let b=m.match(/^\/w\/([^/?;]+)/);if(b)return b[1]},d=m=>{let b=m.match(/^\/c\/([^/?;]+)/);if(b)return b[1]};this.router.events.subscribe(m=>{if(!(m instanceof Bt))return;let b=m.url,O=`intent://${e.host}`,P=`#Intent;scheme=${e.scheme};S.browser_fallback_url=${e.fallbackUrl};end`,L=`peertube://${i.host}`,k=o(b),$=d(b);if(k){r()?this.androidAppUrl=`${O}/video/${k}?host=${n}${P}`:this.iosAppUrl=`${L}/video/${k}?host=${n}`;return}if($){r()?this.androidAppUrl=`${O}/video-channel/${$}?host=${n}${P}`:this.iosAppUrl=`${L}/video-channel/${$}?host=${n}`;return}r()?this.androidAppUrl=`${O}/?host=${n}${P}`:this.iosAppUrl=`${L}/?host=${n}`})}hideMobileMsg(){this.mobileMsg=!1,document.documentElement.classList.remove(`mobile-app-msg`),Kn.setItem(t$1.LS_HIDE_MOBILE_MSG,`true`)}onOpenClientClick(){t()&&setTimeout(()=>{window.location.href=this.htmlConfig.client.openInApp.ios.fallbackUrl},2500)}isRegistrationAllowed(){return this.config?this.config.signup.allowed&&this.config.signup.allowedForCurrentIP:!1}logout(n){n.preventDefault(),this.authService.logout(),this.redirectService.redirectToHomepage()}openQuickSettings(){this.quickSettingsModal().show()}openHotkeysCheatSheet(){this.hotkeysService.cheatSheetToggle.next(!this.hotkeysHelpVisible)}toggleMenu(){this.menu.toggleMenu()}updateUserState(){this.user=this.loggedIn?this.authService.getUser():void 0}static ɵfac=function(e){return new(e||t$1)};static ɵcmp=qa$1({type:t$1,selectors:[[`my-header`]],viewQuery:function(e,i){e&1&&ax(i.quickSettingsModal,pa,5)(i.dropdown,ma,5),e&2&&G$(2)},decls:12,vars:12,consts:()=>{let n;n="Go to homepage";let e;e="Open menu";let i;i="Close this message";let o;o="Open in the application?";let d;d="Open settings modal";let m;m="Go to the page where you can manage your account";let b;b="Interface:";let O;O="Log out";let P;P="Public profile";let L;L="Manage my account";let k;return k="Keyboard shortcuts",[[`quickSettingsModal`,``],[`dropdown`,`ngbDropdown`],[`profile`,``],o,b,O,P,L,k,[1,`mobile-msg`],[1,`root`,3,`ngClass`],[`title`,n,1,`peertube-title`,3,`routerLink`,`queryParams`],[`alt`,``,1,`logo`,3,`src`,`title`],[1,`instance-name`],[3,`hidden`],[1,`d-flex`,`align-items-center`,`buttons-container`,3,`hidden`],[`title`,e,`theme`,`tertiary`,`rounded`,`true`,`icon`,`menu`,1,`menu-button`,`margin-button`,3,`click`],[1,`msg`,`ellipsis`,`me-auto`],[1,`peertube-button-link`,`secondary-button`,`me-3`,3,`click`,`href`],[`title`,i,1,`border-0`,`p-0`,3,`click`],[`iconName`,`cross`],[`title`,d,`theme`,`tertiary`,`rounded`,`true`,`icon`,`cog`,1,`margin-button`,`settings-button`,3,`click`],[`routerLink`,`/signup`,1,`peertube-button-link`,`secondary-button`,`w-100`,`ellipsis`,`margin-button`,`create-account-button`],[`className`,`peertube-button-link primary-button w-100 ellipsis`,1,`login-label`],[`className`,`peertube-button-link primary-button icon-only w-100 ellipsis`,`icon`,`true`,`label`,``,1,`login-icon`],[3,`requiresApproval`],[1,`margin-button`],[`title`,m,`theme`,`tertiary`,`rounded`,`true`,`icon`,`cog`,`ptRouterLink`,`/my-account`,`inheritColor`,`true`,1,`margin-button`,`settings-button`],[`ngbDropdown`,``,`placement`,`bottom-left auto`,`container`,`body`,1,`logged-in-container`],[`ngbDropdownToggle`,``,1,`tertiary-button`],[`actorType`,`account`,`size`,`34`,`responseSize`,`true`,3,`actor`],[1,`logged-in-info`,`text-start`,`ms-2`],[1,`display-name`,`ellipsis`],[1,`username`,`ellipsis`,`fs-8`],[`ngbDropdownMenu`,``],[`ngbDropdownItem`,``,1,`dropdown-item`,3,`routerLink`],[1,`dropdown-divider`],[`ngbDropdownItem`,``,`routerLink`,`/my-account`,1,`dropdown-item`],[`myPluginSelector`,``,`pluginSelectorId`,`menu-user-dropdown-language-item`,`ngbDropdownItem`,``,`routerLink`,`/my-account/settings`,`fragment`,`interface-settings`,1,`dropdown-item`],[`iconName`,`language`,`aria-hidden`,`true`],[1,`ms-auto`,`ps-2`,`muted`],[`ngbDropdownItem`,``,1,`dropdown-item`],[`ngbDropdownItem`,``,1,`dropdown-item`,`logout`,3,`click`],[`iconName`,`sign-out`,`aria-hidden`,`true`],[`iconName`,`user`,`aria-hidden`,`true`],[`iconName`,`cog`,`aria-hidden`,`true`],[`ngbDropdownItem`,``,1,`dropdown-item`,3,`click`],[`iconName`,`keyboard`,`aria-hidden`,`true`]]},template:function(e,i){e&1&&(YV(0,_a,7,1,`div`,9),Mp(1,`div`,10)(2,`a`,11),sh(3,`img`,12),YV(4,ha,2,1,`span`,13),Gb(),YV(5,fa,1,1,`my-search-typeahead`,14),Mp(6,`div`,15),YV(7,ya,4,1)(8,Ma,27,7),Gb(),Mp(9,`my-button`,16),ch(`click`,function(){return i.toggleMenu()}),Gb()(),sh(10,`my-quick-settings`,null,0)),e&2&&(KV(i.mobileMsg?0:-1),ij(),LA(`ngClass`,N5(10,ua,i.searchHidden)),ij(),LA(`routerLink`,i.getDefaultRoute())(`queryParams`,i.getDefaultRouteQuery()),ij(),LA(`src`,i.getLogoUrl(),tw)(`title`,i.instanceName),ij(),KV(i.isInstanceNameDisplayed()?4:-1),ij(),KV(i.searchHidden?-1:5),ij(),LA(`hidden`,!i.isLoaded()),ij(),KV(i.loggedIn?8:7))},dependencies:[Nu,X3,Zt,k,c$1,g,L$1,Jt,X1,Tm,ep,$n$1,tp,gr$1,Vn$1,Jc$1,en,ce],styles:[`.mobile-msg[_ngcontent-%COMP%]{display:flex;align-items:center;padding:0 1.5rem;height:48px;background:var(--%NS%bg-secondary-400)}
277.mobile-msg[_ngcontent-%COMP%]   .msg[_ngcontent-%COMP%]{color:var(--%NS%fg-300);font-weight:700;font-size:.875rem}.mobile-msg[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]   my-global-icon[_ngcontent-%COMP%]{color:var(--%NS%fg-200)}.root[_ngcontent-%COMP%]{--%NS%co-logo-size: 34px;--%NS%co-root-padding: 1.5rem;color:var(--%NS%header-fg-500);background-color:var(--%NS%header-bg-500);padding:var(--%NS%co-root-padding);width:100%;display:flex;align-items:center}.peertube-title[_ngcontent-%COMP%]{flex-shrink:1;min-width:var(--%NS%co-logo-size);flex-grow:0;font-size:24px;font-weight:700;color:inherit!important;display:flex;align-items:center;min-height:46px;padding-inline-start:1.125rem;padding-inline-end:.5rem;margin-inline-end:auto}.peertube-title[_ngcontent-%COMP%], .peertube-title[_ngcontent-%COMP%]:hover, .peertube-title[_ngcontent-%COMP%]:focus, .peertube-title[_ngcontent-%COMP%]:active{text-decoration:none}.peertube-title[_ngcontent-%COMP%]:focus:not(:focus-visible){outline:none}.instance-name[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-inline-start:.625rem}.logo[_ngcontent-%COMP%]{display:inline-block;min-width:var(--%NS%co-logo-size);height:var(--%NS%co-logo-size)}my-search-typeahead[_ngcontent-%COMP%]{max-width:270px;width:100%}@media screen and (min-width:1200px){my-search-typeahead[_ngcontent-%COMP%]{max-width:310px}}@media screen and (min-width:1600px){my-search-typeahead[_ngcontent-%COMP%]{max-width:350px}}my-search-typeahead[_ngcontent-%COMP%]{margin-inline-end:calc(1.275rem + .3vw)}@media(min-width:1200px){my-search-typeahead[_ngcontent-%COMP%]{margin-inline-end:1.5rem}}.margin-button[_ngcontent-%COMP%]{margin-inline-end:.75rem}.menu-button[_ngcontent-%COMP%]{display:none;justify-self:end}.dropdown[_ngcontent-%COMP%]{z-index:1!important}.dropdown-item[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;padding:var(--%NS%input-y-padding) 1rem}.dropdown-item[_ngcontent-%COMP%]   my-global-icon[_ngcontent-%COMP%]{width:22px;opacity:.7;position:relative;top:-2px;margin-inline-end:.5rem}.dropdown-item[_ngcontent-%COMP%]   my-actor-avatar[_ngcontent-%COMP%]{margin-inline-end:.5rem}.dropdown-item[_ngcontent-%COMP%]:hover   .hover-display-toggle[_ngcontent-%COMP%]{display:none}.dropdown-item[_ngcontent-%COMP%]:hover   .hover-display-toggle[hidden][_ngcontent-%COMP%]{display:inherit!important}.logged-in-container[_ngcontent-%COMP%]{border-radius:25px;transition:all .1s ease-in-out;cursor:pointer;max-width:250px;height:100%}.logged-in-container[_ngcontent-%COMP%]   .display-name[_ngcontent-%COMP%]{font-weight:700;color:var(--%NS%header-fg-500);line-height:1;padding-top:3px}.logged-in-container[_ngcontent-%COMP%]   .username[_ngcontent-%COMP%]{color:var(--%NS%header-fg-300)}.logged-in-container[_ngcontent-%COMP%] > .dropdown-toggle[_ngcontent-%COMP%]{display:flex;align-items:center;border-radius:6px}.logged-in-container[_ngcontent-%COMP%] > .dropdown-toggle[_ngcontent-%COMP%]:after{border:0}my-actor-avatar[_ngcontent-%COMP%]{width:34px;height:34px}.login-icon[_ngcontent-%COMP%]{display:none}.tertiary-button[_ngcontent-%COMP%]{color:var(--%NS%header-fg-200)}@media screen and (max-width:1200px){.peertube-title[_ngcontent-%COMP%]{padding-inline-start:0}.icon-logo[_ngcontent-%COMP%]{margin-inline-start:0}}@media screen and (max-width:800px){.root[_ngcontent-%COMP%]{--%NS%co-root-padding: 1rem}my-search-typeahead[_ngcontent-%COMP%]{margin-inline-end:.5rem}.margin-button[theme=tertiary][_ngcontent-%COMP%]{margin-inline-end:.3125rem}my-actor-avatar[_ngcontent-%COMP%]{width:24px;height:24px}.dropdown-toggle[_ngcontent-%COMP%]{padding:var(--%NS%input-y-padding) var(--%NS%input-x-padding);font-weight:700;border-radius:var(--%NS%input-border-radius);text-align:center;cursor:pointer;font-size:1rem;line-height:1.5}.dropdown-toggle[_ngcontent-%COMP%]:not(.icon-only)   my-global-icon[_ngcontent-%COMP%] + *[_ngcontent-%COMP%]:not(:empty){margin-inline-start:.5rem}.dropdown-toggle.icon-only[_ngcontent-%COMP%]{padding:var(--%NS%input-y-padding) 8px}.dropdown-toggle.small-button[_ngcontent-%COMP%]{font-size:.9rem;padding:calc(var(--%NS%input-y-padding) / 2) calc(var(--%NS%input-x-padding) / 2)!important}.dropdown-toggle.small-button[_ngcontent-%COMP%]   my-global-icon[_ngcontent-%COMP%]{display:inline-block;width:18px!important;height:18px!important;line-height:18px!important}.dropdown-toggle[_ngcontent-%COMP%]{padding:.5rem!important;border-radius:100%!important}.dropdown-toggle.small-button[_ngcontent-%COMP%]{padding:calc(var(--%NS%input-x-padding) / 4)!important;line-height:0!important}.dropdown-toggle.small-button[_ngcontent-%COMP%]   my-global-icon[_ngcontent-%COMP%]{line-height:0;display:inline-block;width:12px!important;height:12px!important;line-height:12px!important}.dropdown-toggle[_ngcontent-%COMP%]:after{display:none}.logged-in-info[_ngcontent-%COMP%]{display:none}.login-icon[_ngcontent-%COMP%]{display:inline-block}.login-label[_ngcontent-%COMP%]{display:none}}@media screen and (max-width:500px){.root[_ngcontent-%COMP%]{--%NS%co-logo-size: 48px;display:grid;grid-template-columns:auto minmax(0,1fr) auto;row-gap:.5rem;justify-content:space-between}.root[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{grid-row:1}.buttons-container[_ngcontent-%COMP%]{margin:0 auto;max-width:100%}.menu-button[_ngcontent-%COMP%]{display:block;position:relative;right:-10px}my-search-typeahead[_ngcontent-%COMP%]{grid-row:2!important;grid-column:1/4;max-width:100%;margin-inline-end:0}.peertube-title[_ngcontent-%COMP%]{margin-inline-end:.3125rem}
277.instance-name[_ngcontent-%COMP%]{display:none}}`],changeDetection:1})};var Ea=t=>({in:t});function Oa(t,n){if(t&1&&(Mp(0,`span`),g5(1),Gb()),t&2){let e=n.$implicit;ij(),Tx(e)}}function Ta(t,n){if(t&1&&(Mp(0,`li`)(1,`div`,7),QV(2,Oa,2,1,`span`,null,ZV),Gb(),Mp(4,`div`,8),g5(5),Gb()()),t&2){let e=n.$implicit;ij(2),JV(e.formatted),ij(3),Tx(e.description)}}var nn=class t{hotkeysService=m(zc);localStorage=m(po);title=yh("Keyboard Shortcuts");hotkeysModalStateChange=Jhe();hotkeysEnabled=!0;helpVisible=!1;subscription;hotkeys;localStorageHotkeysDisabledKey=`peertube-hotkeys-disabled`;ngOnInit(){this.localStorage.getItem(this.localStorageHotkeysDisabledKey)===`true`&&(this.hotkeysEnabled=!1,this.hotkeysService.disableHotkeys()),this.subscription=this.hotkeysService.cheatSheetToggle.subscribe(n=>{n!==!1&&(this.hotkeys=this.hotkeysService.getHotkeys().filter(e=>e.description)),n===!1?this.helpVisible=!1:this.toggleHelpVisible(),this.hotkeysModalStateChange.emit(this.helpVisible)})}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}toggleCheatSheet(){this.hotkeysService.cheatSheetToggle.next(!this.helpVisible)}toggleHelpVisible(){this.helpVisible=!this.helpVisible}onHotkeysEnabledChange(){if(!this.hotkeysEnabled){this.localStorage.setItem(this.localStorageHotkeysDisabledKey,`true`),this.hotkeysService.disableHotkeys();return}this.hotkeysService.enableHotkeys(),this.localStorage.removeItem(this.localStorageHotkeysDisabledKey)}static ɵfac=function(e){return new(e||t)};static ɵcmp=qa$1({type:t,selectors:[[`my-hotkeys-cheat-sheet`]],inputs:{title:[1,`title`]},outputs:{hotkeysModalStateChange:`hotkeysModalStateChange`},decls:11,vars:5,consts:()=>{let n;return n="Enable hotkeys in this web browser",[[1,`cfp-hotkeys-container`,`fade`,3,`ngClass`],[1,`cfp-hotkeys`],[1,`cfp-hotkeys-title`],[1,`d-flex`,`justify-content-center`,`m-3`],[`inputName`,`enable-hotkeys`,`labelText`,n,3,`ngModelChange`,`ngModel`],[`role`,`presentation`],[1,`button-unstyle`,`cfp-hotkeys-close`,3,`click`],[1,`cfp-hotkeys-keys`],[1,`cfp-hotkeys-text`]]},template:function(e,i){e&1&&(Mp(0,`div`,0)(1,`div`,1)(2,`h2`,2),g5(3),Gb(),Mp(4,`div`,3)(5,`my-peertube-checkbox`,4),wx(`ngModelChange`,function(d){return S5(i.hotkeysEnabled,d)||(i.hotkeysEnabled=d),d}),ch(`ngModelChange`,function(){return i.onHotkeysEnabledChange()}),Gb(),i2(),Gb(),Mp(6,`ul`,5),QV(7,Ta,6,1,`li`,null,ZV),Gb(),Mp(9,`button`,6),ch(`click`,function(){return i.toggleCheatSheet()}),g5(10,`×`),Gb()()()),e&2&&(LA(`ngClass`,N5(3,Ea,i.helpVisible)),ij(3),Tx(i.title()),ij(2),_x(`ngModel`,i.hotkeysEnabled),a2(),ij(2),JV(i.hotkeys))},dependencies:[X3,q,Qn,qn,dn$1],styles:[`.cfp-hotkeys-container[_ngcontent-%COMP%]{display:flex!important;align-items:center;position:fixed;overflow:auto;width:100%;height:100%;top:0;left:0;color:var(--%NS%fg);font-size:1em;background-color:var(--%NS%bg)}.cfp-hotkeys-container.fade[_ngcontent-%COMP%]{z-index:-1024;visibility:hidden;opacity:0;transition:opacity .15s linear}.cfp-hotkeys-container.fade.in[_ngcontent-%COMP%]{z-index:19000;visibility:visible;opacity:1}.cfp-hotkeys-title[_ngcontent-%COMP%]{font-weight:700;text-align:center;font-size:1.2em}.cfp-hotkeys[_ngcontent-%COMP%]{width:100%;max-height:100%}.cfp-hotkeys[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{margin:auto;width:fit-content;list-style:none;color:var(--%NS%fg)}.cfp-hotkeys-keys[_ngcontent-%COMP%], .cfp-hotkeys-text[_ngcontent-%COMP%]{display:inline-block}.cfp-hotkeys-keys[_ngcontent-%COMP%]{padding:5px;min-width:90px}.cfp-hotkeys-keys[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{display:inline-block;color:var(--%NS%bg);background-color:var(--%NS%fg);border:1px solid var(--%NS%fg);border-radius:5px;text-align:center;box-shadow:inset 0 1px #666,0 1px #bbb;padding:5px 9px;font-size:1em;margin-inline-end:.3125rem}.cfp-hotkeys-text[_ngcontent-%COMP%]{font-size:1em;padding-inline-start:.625rem}.cfp-hotkeys-close[_ngcontent-%COMP%]{position:fixed;top:20px;right:20px;font-size:2em;font-weight:700;padding:5px 10px;border:1px solid #ddd;border-radius:5px;min-height:45px;min-width:45px;text-align:center}.cfp-hotkeys-close[_ngcontent-%COMP%]:hover{cursor:pointer;opacity:.8}@media all and (max-width:500px){.cfp-hotkeys[_ngcontent-%COMP%]{font-size:.8em}}@media all and (min-width:750px){.cfp-hotkeys[_ngcontent-%COMP%]{font-size:1.2em}}`],changeDetection:1})};var qo=C(Vo$1());var Pa=(t,n)=>({collapsed:t,"logged-in":n});var xa=t=>({"menu-collapsed":t});var Na=(t,n)=>({"icon-only":t,"label-xl":n});var Ko=t=>({"transform-rotate-180":t});var dt=t=>({"visually-hidden":t});var wa=t=>[t,`menu-block`];function Aa(t,n){if(t&1&&g5(0),t&2)Jb(` `,j$(2).moreInfoLabel,` `)}function Ia(t,n){if(t&1&&(Mp(0,`div`,20)(1,`a`,21),sh(2,`my-global-icon`,22),YV(3,Aa,1,1),Gb()()),t&2){let e=j$();ij(),LA(`ngClass`,M5(2,Na,e.collapsed,e.moreInfoLabel.length>10)),ij(2),KV(e.collapsed?-1:3)}}function ka(t,n){if(t&1){let e=o$();Mp(0,`button`,23),ch(`click`,function(){kI(e);return FI(j$().toggleMenu())}),sh(1,`my-global-icon`,24),Gb()}if(t&2){let e=j$();ij(),s5(N5(2,Ko,!e.isRTL()))}}function Ra(t,n){if(t&1){let e=o$();Mp(0,`button`,25),ch(`click`,function(){kI(e);return FI(j$().toggleMenu())}),sh(1,`my-global-icon`,24),Gb()}if(t&2){let e=j$();ij(),s5(N5(2,Ko,e.isRTL()))}}function Da(t,n){t&1&&FA(0)}function La(t,n){if(t&1&&(Mp(0,`div`,15)(1,`div`,26),U$(2,2),Gb(),Mp(3,`div`,27),g5(4),Gb(),CA(5,Da,1,0,`ng-container`,28),Gb()),t&2){let e=j$(),i=z$(1);ij(),LA(`ngClass`,N5(5,dt,e.collapsed)),ij(),nx(e.instanceName),H$(2),ij(),LA(`ngClass`,N5(7,dt,e.collapsed)),ij(),Tx(e.shortDe
277scription),ij(),LA(`ngTemplateOutlet`,i)}}function $a(t,n){if(t&1&&g5(0),t&2){let e=j$(2).$implicit;Jb(` `,e.label,` `)}}function Ha(t,n){if(t&1&&(Mp(0,`my-button`,31),YV(1,$a,1,1),Gb()),t&2){let e=j$().$implicit,i=j$(2);LA(`ngClass`,e.ngClass)(`icon`,e.icon)(`title`,e.label)(`ptRouterLink`,e.path)(`ptQueryParams`,e.query)(`href`,e.url),ij(),KV(i.collapsed?-1:1)}}function Fa(t,n){if(t&1&&sh(0,`my-global-icon`,34),t&2){let e=j$(3).$implicit;LA(`iconName`,e.icon)(`ngClass`,e.iconClass)}}function Va(t,n){if(t&1&&(YV(0,Fa,1,2,`my-global-icon`,34),Mp(1,`span`,35),g5(2),Gb()),t&2){let e=j$(2).$implicit,i=j$(2);KV(e.icon?0:-1),ij(),LA(`ngClass`,N5(3,dt,i.collapsed)),ij(),Tx(e.label)}}function Ua(t,n){t&1&&FA(0)}function za(t,n){if(t&1&&(Mp(0,`a`,32),CA(1,Ua,1,0,`ng-container`,28),Gb()),t&2){j$();let e=z$(1),i=j$().$implicit;LA(`routerLink`,i.path)(`queryParams`,i.query)(`ngClass`,i.ngClass)(`title`,i.label),ij(),LA(`ngTemplateOutlet`,e)}}function Ga(t,n){t&1&&FA(0)}function Ba(t,n){if(t&1&&(Mp(0,`a`,33),CA(1,Ga,1,0,`ng-container`,28),Gb()),t&2){j$();let e=z$(1),i=j$().$implicit;LA(`href`,i.url,tw)(`ngClass`,i.ngClass)(`title`,i.label),ij(),LA(`ngTemplateOutlet`,e)}}function ja(t,n){if(t&1&&(CA(0,Va,3,5,`ng-template`,null,1,G5),YV(2,za,2,5,`a`,32)(3,Ba,2,4,`a`,33)),t&2){let e=j$().$implicit;ij(2),KV(e.path?2:3)}}function Xa(t,n){if(t&1&&(Mp(0,`li`),YV(1,Ha,2,7,`my-button`,31)(2,ja,4,1),Gb()),t&2){let e=n.$implicit;ij(),KV(e.isPrimaryButton===!0?1:2)}}function Wa(t,n){if(t&1&&(Mp(0,`ul`,16)(1,`li`)(2,`div`,29),g5(3),Gb(),Mp(4,`ul`,30),QV(5,Xa,3,1,`li`,null,ZV),Gb()()()),t&2){let e=n.$implicit,i=j$();LA(`ngClass`,N5(3,wa,e.key)),ij(2),LA(`ngClass`,N5(5,dt,i.collapsed)),ij(),Tx(e.title),ij(2),JV(e.links)}}function Qa(t,n){t&1&&FA(0)}function qa(t,n){if(t&1&&(Mp(0,`div`,17)(1,`div`,36),g5(2),Gb(),CA(3,Qa,1,0,`ng-container`,28),Gb()),t&2){let e=j$(),i=z$(1);ij(),LA(`ngClass`,N5(3,dt,e.collapsed)),ij(),Tx(e.instanceName),ij(),LA(`ngTemplateOutlet`,i)}}function Ka(t,n){t&1&&(Mp(0,`div`,18)(1,`div`,37),ex(2,3),sh(3,`a`,38),tx(),Gb(),Mp(4,`a`,39),U$(5,4),Gb()())}var Qo=(0,qo.default)(`peertube:menu:MenuComponent`);var on=class t{authService=m(tt);userService=m(tl);localeId=m(mn);serverService=m(Kt$1);hooks=m(Yg);menu=m(zg);redirectService=m(ho);menuSections=[];loggedIn;moreInfoLabel="More info";user;canSeeVideoMakerBlock;authSub;get shortDescription(){return this.serverService.getHTMLConfig().instance.shortDescription}get instanceName(){return this.serverService.getHTMLConfig().instance.name}get collapsed(){return this.menu.isCollapsed()}get isOverlay(){return this.menu.isCollapsed()}ngOnInit(){this.loggedIn=this.authService.isLoggedIn(),this.onUserStateChange(),this.authSub=this.authService.loginChangedSource.subscribe(n=>{n===0?this.loggedIn=!0:n===1&&(this.loggedIn=!1),this.onUserStateChange()})}ngOnDestroy(){this.authSub&&this.authSub.unsubscribe()}toggleMenu(){this.menu.toggleMenu()}buildMenuSections(){return F(this,null,function*(){this.menuSections=[];for(let n of[this.buildQuickLinks(),this.buildLibraryLinks(),this.buildVideoMakerLinks(),this.buildAdminLinks()])n.links.length!==0&&this.menuSections.push(n);this.menuSections=yield this.hooks.wrapObject(this.menuSections,`common`,`filter:left-menu.links.create.result`)})}buildQuickLinks(){let n={key:`quick-access`,title:"Quick access",links:[{path:this.redirectService.getDefaultRoute(),query:this.redirectService.getDefaultRouteQuery(),icon:`home`,label:"Home"}]};return this.loggedIn&&n.links.push({path:`/videos/subscriptions`,icon:`subscriptions`,label:"Subscriptions"}),n}buildLibraryLinks(){let n=[];return this.loggedIn&&(n=n.concat([{path:`/my-library/video-playlists`,icon:`playlists`,label:"Playlists"},{path:`/my-library/history/videos`,icon:`history`,label:"History"}])),{key:`my-library`,title:"My library",links:n}}buildVideoMakerLinks(){let n=[];return this.loggedIn&&this.canSeeVideoMakerBlock&&(n=n.concat([{path:`/my-library/video-channels`,icon:`channel`,iconClass:`channel-icon`,label:"Channels"},{path:`/my-library/videos`,icon:`videos`,label:"Videos"},{path:`/videos/publish`,icon:`upload`,label:"Publish",isPrimaryButton:!0,ngClass:`publish-button`}
277])),{key:`my-video-space`,title:"My video space",links:n}}buildAdminLinks(){let n=[];return this.loggedIn&&(this.user.hasRight(Je.SEE_ALL_VIDEOS)&&n.push({path:`/admin/overview`,icon:`overview`,label:"Overview"}),this.user.hasRight(Je.MANAGE_ABUSES)&&n.push({path:`/admin/moderation`,icon:`moderation`,label:"Moderation"}),this.user.hasRight(Je.MANAGE_CONFIGURATION)&&n.push({path:`/admin/settings`,icon:`config`,label:"Settings"})),{key:`admin`,title:"Administration",links:n}}computeCanSeeVideoMakerBlock(){return this.loggedIn?this.user.hasUploadDisabled()?this.authService.userInformationLoaded.pipe(Ke$1(),je(()=>this.userService.getMyVideoQuotaUsed()),$(({videoQuotaUsed:n})=>n!==0)):O(!0):O(!1)}onUserStateChange(){this.user=this.loggedIn?this.authService.getUser():void 0,this.computeCanSeeVideoMakerBlock().subscribe(n=>{this.canSeeVideoMakerBlock=n,this.canSeeVideoMakerBlock?Qo(`User can see videos link.`):Qo(`User cannot see videos link.`),this.buildMenuSections()})}isRTL(){return w3(this.localeId)===`rtl`}static ɵfac=function(e){return new(e||t)};static ɵcmp=qa$1({type:t,selectors:[[`my-menu`]],decls:19,vars:11,consts:()=>{let n;n="Display the lateral menu";let e;e="Hide the lateral menu";let i;i="More info";let o;o=`${`�0�`}`;let d;d=` Platform powered by ${`�#3�`}PeerTube${`�/#3�`}`;let m;return m="Discover more platforms",[[`moreInfoButton`,``],[`linkTemplate`,``],o,d,m,[1,`menu-container`,3,`ngClass`],[1,`main-menu-wrapper`],[1,`main-menu-scrollbar`],[1,`main-menu`],[1,`mobile-controls`],[1,`icon-logo`],[`rounded`,`true`,`icon`,`cross`,`theme`,`tertiary`,3,`click`],[1,`toggle-menu-container`],[`type`,`button`,`title`,n,1,`button-unstyle`,`toggle-menu`],[`type`,`button`,`title`,e,1,`button-unstyle`,`toggle-menu`],[1,`about`,`about-top`],[1,`ul-unstyle`,3,`ngClass`],[1,`about`],[1,`mt-3`,`mx-4`],[1,`menu-overlay`,3,`click`,`ngClass`],[1,`more-info-btn-container`],[`routerLink`,`/about`,`title`,i,`routerLinkActive`,`active`,1,`more-info-btn`,`peertube-button-link`,`peertube-button-icon`,`mt-2`,`d-block`,`ellipsis`,3,`ngClass`],[`iconName`,`help`],[`type`,`button`,`title`,n,1,`button-unstyle`,`toggle-menu`,3,`click`],[`iconName`,`chevron-left`],[`type`,`button`,`title`,e,1,`button-unstyle`,`toggle-menu`,3,`click`],[1,`block-title`,`me-2`,3,`ngClass`],[1,`description`,3,`ngClass`],[4,`ngTemplateOutlet`],[1,`block-title`,`ellipsis`,3,`ngClass`],[1,`ul-unstyle`],[`theme`,`primary`,`autoFontSize`,`true`,1,`d-block`,`menu-button`,3,`ngClass`,`icon`,`title`,`ptRouterLink`,`ptQueryParams`,`href`],[`routerLinkActive`,`active`,1,`menu-link`,`ellipsis`,3,`routerLink`,`queryParams`,`ngClass`,`title`],[`target`,`_blank`,1,`menu-link`,`ellipsis`,3,`href`,`ngClass`,`title`],[`aria-hidden`,`true`,3,`iconName`,`ngClass`],[3,`ngClass`],[1,`block-title`,3,`ngClass`],[1,`fs-8`],[`href`,`https://joinpeertube.org`,`target`,`_blank`,`rel`,`noopener noreferrer`,1,`fw-bold`],[`href`,`https://joinpeertube.org/instances`,`target`,`_blank`,`rel`,`noopener noreferrer`,1,`d-block`,`fs-8`,`fw-bold`]]},template:function(e,i){e&1&&(CA(0,Ia,4,5,`ng-template`,null,0,G5),Mp(2,`div`,5)(3,`div`,6)(4,`div`,7)(5,`div`,8)(6,`div`,9),sh(7,`span`,10),Mp(8,`my-button`,11),ch(`click`,function(){return i.toggleMenu()}),Gb()(),Mp(9,`div`,12),YV(10,ka,2,4,`button`,13)(11,Ra,2,4,`button`,14),Gb(),YV(12,La,6,9,`div`,15),Mp(13,`nav`),QV(14,Wa,7,7,`ul`,16,ZV),Gb(),YV(16,qa,4,5,`div`,17),Gb()()(),YV(17,Ka,6,0,`div`,18),Gb(),Mp(18,`div`,19),ch(`click`,function(){return i.toggleMenu()}),Gb()),e&2&&(ij(2),LA(`ngClass`,M5(6,Pa,i.collapsed,i.loggedIn)),ij(8),KV(i.collapsed?10:11),ij(2),KV(i.loggedIn?-1:12),ij(2),JV(i.menuSections),ij(2),KV(i.loggedIn?16:-1),ij(),KV(i.collapsed?-1:17),ij(),LA(`ngClass`,N5(9,xa,i.collapsed)))},dependencies:[Nu,X3,J3,X1,Tm,H4,ep,ce],styles:[`.menu-container[_ngcontent-%COMP%]{--%NS%co-menu-x-padding: 1.5rem;z-index:12600;width:calc(248px - 2rem);position:fixed;height:calc(100vh - var(--%NS%header-height));margin-inline-start:var(--%NS%menu-margin-left)}.menu-container.collapsed[_ngcontent-%COMP%]{--%NS%co-menu-x-padding: .25rem;width:auto;margin-inline-start:0}.toggle-menu[_ngcontent-%COMP%]{color:var(--%NS%menu-fg-300);width:24px;height:24px;border-radius:100%;background-color:var(--%NS%menu-bg-550)}.toggle-menu[_ngcontent-%COMP%]   my-global-icon[_ngcontent-%COMP%]{position:relative;top:0;right:1px;display:inline-block;width:20px;height:20px;line-height:20px}.toggle-menu[_ngcontent-%COMP%]:not(.icon-only)   my-global-icon[_ngcontent-%COMP%]{margin-inline-end:0}.toggle-menu[_ngcontent-%COMP%]   my-global-icon[_ngcontent-%COMP%]{margin:auto}.toggle-menu[_ngcontent-%COMP%]:hover{opacity:.8}.menu-container[_ngcontent-%COMP%]:not(.collapsed)   .toggle-menu[_ngcontent-%COMP%]{position:absolute;top:22px}@supports (inset-inline-end: 24px){.menu-container[_ngcontent-%COMP%]:not(.collapsed)   .toggle-menu[_ngcontent-%COMP%]{inset-inline-end:24px}}@supports not (inset-inline-end: 24px){.menu-container[_ngcontent-%COMP%]:not(.collapsed)   .toggle-menu[_ngcontent-%COMP%]{right:24px}}.collapsed[_ngcontent-%COMP%]   .toggle-menu[_ngcontent-%COMP%]   my-global-icon[_ngcontent-%COMP%]{right:-1px;top:0}.main-menu-wrapper[_ngcontent-%COMP%]{overflow:hidden;width:100%;height:100%;max-height:calc(100% - 75px)}.main-menu-scrollbar[_ngcontent-%COMP%]{overflow-y:auto;scrollbar-color:transparent transparent;scrollbar-width:thin;max-height:100%}.main-menu-scrollbar[_ngcontent-%COMP%]:focus, .main-menu-scrollbar[_ngcontent-%COMP%]:hover{scrollbar-color:auto}@media not all and (hover:hover)and (pointer:fine){.main-menu-scrollbar[_ngcontent-%COMP%]{border-radius:0;scrollbar-color:auto}}.main-menu[_ngcontent-%COMP%]{position:relative;padding-top:1.5rem;padding-bottom:1.5rem;border-radius:var(--%NS%menu-border-radius);background-color:var(--%NS%menu-bg)}.menu-link[_ngcontent-%COMP%], .menu-button[_ngcontent-%COMP%], .block-title[_ngcontent-%COMP%], .about[_ngcontent-%COMP%]   .description[_ngcontent-%COMP%], .about[_ngcontent-%COMP%]   .more-info-btn-container[_ngcontent-%COMP%]{padding-inline-start:var(--%NS%co-menu-x-padding);padding-inline-end:var(--%NS%co-menu-x-padding)}.menu-block[_ngcontent-%COMP%]:not(:last-child):after, .logged-in[_ngcontent-%COMP%]   .menu-block[_ngcontent-%COMP%]:after, .collapsed[_ngcontent-%COMP%]   .toggle-menu-container[_ngcontent-%COMP%]:after, .about-top[_ngcontent-%COMP%]:after{content:"";display:block;height:2px;margin:1rem var(--%NS%co-menu-x-padding);background:var(--%NS%menu-bg-600)}.block-title[_ngcontent-%COMP%]{font-weight:700;color:var(--%NS%menu-fg-450);font-size:14px;margin-bottom:.5rem;max-width:180px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.menu-link[_ngcontent-%COMP%]{display:flex;align-items:center;white-space:normal;word-break:break-word;transition:background-color .1s ease-in-out;width:100%;padding-top:.5rem;padding-bottom:.5rem}.menu-link[_ngcontent-%COMP%], .menu-link[_ngcontent-%COMP%]:hover, .menu-link[_ngcontent-%COMP%]:focus, .menu-link[_ngcontent-%COMP%]:active{text-decoration:none}.menu-link[_ngcontent-%COMP%]:focus:not(:focus-visible){outline:none}.menu-link[_ngcontent-%COMP%]   my-global-icon[_ngcontent-%COMP%]{width:22px;height:22px;line-height:22px;position:relative;top:-1px}.menu-link[_ngcontent-%COMP%]   my-global-icon[_ngcontent-%COMP%] + *[_ngcontent-%COMP%]:not(.visually-hidden){margin-inline-start:.75rem}.menu-link[_ngcontent-%COMP%]:hover, .menu-link[_ngcontent-%COMP%]:focus-visible{opacity:1;color:var(--%NS%menu-fg-600);background-color:var(--%NS%menu-bg-550)}.menu-link[_ngcontent-%COMP%]:hover   my-global-icon[_ngcontent-%COMP%], .menu-link[_ngcontent-%COMP%]:focus-visible   my-global-icon[_ngcontent-%COMP%]{color:var(--%NS%menu-fg-600)}.menu-button[_ngcontent-%COMP%]{margin-top:.5rem}.about[_ngcontent-%COMP%]   .description[_ngcontent-%COMP%]{font-size:14px;color:var(--%NS%menu-fg-300)}.more-info-btn[_ngcontent-%COMP%]{color:var(--%NS%menu-fg);background-color:transparent;border:1px solid var(--%NS%menu-bg-600)!important}.more-info-btn[_ngcontent-%COMP%]:not(.icon-only)   my-global-icon[_ngcontent-%COMP%]{color:var(--%NS%secondary-icon-color)}.more-info-btn[_ngcontent-%COMP%]:active, .more-info-btn.active[_ngcontent-%COMP%], .more-info-btn[_ngcontent-%COMP%]:focus, .more-info-btn[_ngcontent-%COMP%]:focus-visible{color:var(--%NS%menu-fg);background-color:var(--%NS%menu-bg-600);border-color:var(--%NS%menu-bg-600)}.more-info-btn[_ngcontent-%COMP%]:active   my-global-icon[_ngcontent-%COMP%], .more-info-btn.active[_ngcontent-%COMP%]   my-global-icon[_ngcontent-%COMP%], .more-info-btn[_ngcontent-%COMP%]:focus   my-global-icon[_ngcontent-%COMP%], .more-info-btn[_ngcontent-%COMP%]:focus-visible   my-global-icon[_ngcontent-%COMP%]{color:var(--%NS%menu-fg)!important}.more-info-btn.btn[_ngcontent-%COMP%]:active, .more-info-btn.btn[_ngcontent-%COMP%]:focus-visible, .more-info-btn.btn.show[_ngcontent-%COMP%]{color:var(--%NS%menu-fg)!important;background-color:var(--%NS%menu-bg-600)!important;border-color:var(--%NS%menu-bg-600)!important}.more-info-btn.btn[_ngcontent-%COMP%]:active   my-global-icon[_ngcontent-%COMP%], .more-info-btn.btn[_ngcontent-%COMP%]:focus-visible   my-global-icon[_ngcontent-%COMP%], .more-info-btn.btn.show[_ngcontent-%COMP%]   my-global-icon[_ngcontent-%COMP%]{color:var(--%NS%menu-fg)!important}.more-info-btn[_ngcontent-%COMP%]:hover{color:var(--%NS%menu-fg);background-color:var(--%NS%menu-bg-550)}.more-info-btn[_ngcontent-%COMP%]:hover   my-global-icon[_ngcontent-%COMP%]{color:var(--%NS%menu-fg)!important}.more-info-btn[disabled][_ngcontent-%COMP%]{pointer-events:none;opacity:.6}.more-info-btn.label-xl[_ngcontent-%COMP%]{font-size:90%;padding:var(--%NS%input-y-padding) calc(var(--%NS%input-x-padding) / 2)!important}.more-info-btn[_ngcontent-%COMP%]   my-global-icon[_ngcontent-%COMP%], .menu-link[_ngcontent-%COMP%]   my-global-icon[_ngcontent-%COMP%]{color:var(--%NS%secondary-icon-color)}.more-info-btn.active[_ngcontent-%COMP%], .menu-link.active[_ngcontent-%COMP%]{color:var(--%NS%menu-fg-600);font-weight:700}.more-info-btn.active[_ngcontent-%COMP%]   my-global-icon[_ngcontent-%COMP%], .menu-link.active[_ngcontent-%COMP%]   my-global-icon[_ngcontent-%COMP%]{color:var(--%NS%menu-fg-600)}.menu-link[_ngcontent-%COMP%]{color:var(--%NS%menu-fg)}.menu-link.active[_ngcontent-%COMP%]{background-color:var(--%NS%menu-bg-600)}.powered-by[_ngcontent-%COMP%]{color:var(--%NS%fg-200)}
277.collapsed[_ngcontent-%COMP%]   .menu-block[_ngcontent-%COMP%]:after, .collapsed[_ngcontent-%COMP%]   .toggle-menu-container[_ngcontent-%COMP%]:after, .collapsed[_ngcontent-%COMP%]   .about[_ngcontent-%COMP%]:after{width:28px;margin:1rem auto}.collapsed[_ngcontent-%COMP%]   .main-menu-wrapper[_ngcontent-%COMP%]{max-height:100%}.collapsed[_ngcontent-%COMP%]   .main-menu[_ngcontent-%COMP%]{border-start-start-radius:0;border-end-start-radius:0;padding-top:1rem;padding-bottom:1rem}.collapsed[_ngcontent-%COMP%]   .toggle-menu-container[_ngcontent-%COMP%]{text-align:center}.collapsed[_ngcontent-%COMP%]   .menu-link[_ngcontent-%COMP%], .collapsed[_ngcontent-%COMP%]   .more-info-btn[_ngcontent-%COMP%]{border:0!important;justify-content:center}.collapsed[_ngcontent-%COMP%]   .menu-link[_ngcontent-%COMP%]:not(.active)   my-global-icon[_ngcontent-%COMP%], .collapsed[_ngcontent-%COMP%]   .more-info-btn[_ngcontent-%COMP%]:not(.active)   my-global-icon[_ngcontent-%COMP%]{color:var(--%NS%menu-fg-400)}.menu-overlay[_ngcontent-%COMP%]{background-color:#000;width:100vw;height:100vh;opacity:.75;content:"";display:none;position:fixed;z-index:12550}.mobile-controls[_ngcontent-%COMP%]{display:none;padding:0 calc(var(--%NS%co-menu-x-padding) - 1rem) 2rem var(--%NS%co-menu-x-padding);align-items:center;justify-content:space-between}.mobile-controls[_ngcontent-%COMP%]   .icon-logo[_ngcontent-%COMP%]{display:inline-block;width:48px;height:48px;min-width:48px;max-width:48px;background-repeat:no-repeat;background-size:contain}@media screen and (max-width:1200px){.menu-container[_ngcontent-%COMP%]:not(.collapsed){--%NS%menu-margin-left: 0;border-radius:0;background-color:var(--%NS%menu-bg);overflow:auto}.menu-container[_ngcontent-%COMP%]:not(.collapsed)   .main-menu-wrapper[_ngcontent-%COMP%]{height:auto;max-height:unset}.menu-overlay[_ngcontent-%COMP%]:not(.menu-collapsed){display:block}}@media screen and (max-width:500px){.menu-container[_ngcontent-%COMP%]{height:100vh;margin-top:calc(var(--%NS%header-height) * -1);z-index:17501}.menu-container.collapsed[_ngcontent-%COMP%]{display:none}.menu-container[_ngcontent-%COMP%]:not(.collapsed){width:100vw!important}.main-menu[_ngcontent-%COMP%]{padding-top:.75rem}.menu-overlay[_ngcontent-%COMP%]{display:none!important}.mobile-controls[_ngcontent-%COMP%]{display:flex}.toggle-menu-container[_ngcontent-%COMP%]{display:none}.block-title[_ngcontent-%COMP%]{max-width:90%}}`],changeDetection:1})};var Ya=[`confirmModal`];function Za(t,n){if(t&1&&(Mp(0,`details`,8)(1,`summary`),U$(2,1),Gb(),g5(3),Gb()),t&2){let e=j$(2);ij(2),nx(e.moreInfo.title),H$(2),ij(),Jb(` `,e.moreInfo.content,` `)}}function Ja(t,n){if(t&1){let e=o$();Mp(0,`my-input-text`,17),wx(`ngModelChange`,function(o){kI(e);let d=j$(3);return S5(d.inputValue,o)||(d.inputValue=o),FI(o)}),ch(`keyup.enter`,function(){kI(e);return FI(j$(3).confirm())}),Gb(),i2()}if(t&2){let e=j$(3);LA(`autofocus`,!0),_x(`ngModel`,e.inputValue),a2()}}function es(t,n){if(t&1){let e=o$();Mp(0,`input`,18),wx(`ngModelChange`,function(o){kI(e);let d=j$(3);return S5(d.inputValue,o)||(d.inputValue=o),FI(o)}),ch(`keyup.enter`,function(){kI(e);return FI(j$(3).confirm())}),Gb(),i2()}if(t&2)_x(`ngModel`,j$(3).inputValue),a2()}function ts(t,n){if(t&1&&(Mp(0,`div`,9)(1,`label`,14),g5(2),Gb(),YV(3,Ja,1,2,`my-input-text`,15)(4,es,1,1,`input`,16),Gb()),t&2){let e=j$(2);ij(2),Tx(e.inputLabel),ij(),KV(e.isPasswordInput?3:4)}}function ns(t,n){if(t&1&&(Mp(0,`div`,10),g5(1),Gb()),t&2){let e=j$(2);ij(),Tx(e.errorMessage)}}function is(t,n){if(t&1){let e=o$();Mp(0,`div`,2)(1,`h4`,3),g5(2),Gb(),Mp(3,`button`,4),ch(`click`,function(){let o=kI(e).dismiss;return FI(o())}),sh(4,`my-global-icon`,5),Gb()(),Mp(5,`div`,6),sh(6,`div`,7),YV(7,Za,4,2,`details`,8),YV(8,ts,5,2,`div`,9),YV(9,ns,2,1,`div`,10),Gb(),Mp(10,`div`,11)(11,`input`,12),ch(`click`,function(){let o=kI(e).dismiss;return FI(o())})(`key.enter`,function(){let o=kI(e).dismiss;return FI(o())}),Gb(),Mp(12,`input`,13),ch(`click`,function(){let o=kI(e).close;return FI(o())})(`key.enter`,function(){kI(e);return FI(j$().confirm())}),Gb()()}if(t&2){let e=j$();ij(2),Tx(e.title),ij(4),LA(`innerHtml`,e.message,J_),ij(),KV(e.moreInfo?7:-1),ij(),KV(e.inputLabel?8:-1),ij(),KV(e.hasError()?9:-1),ij(2),LA(`value`,e.cancelButtonText),ij(),LA(`value`,e.confirmButtonText)(`disabled`,e.isConfirmationDisabled())}}var rn=class t{modalService=m(sr$1);html=m(Qc);confirmService=m(Gc);confirmModal=tme(`confirmModal`);title=``;message=``;expectedInputValue=``;inputLabel=``;inputValue=``;moreInfo;cancelButtonText=``;confirmButtonText=``;errorMessage=``;isPasswordInput=!1;openedModal;ngOnInit(){this.confirmService.showConfirm.subscribe(n=>{this.title=``,this.message=``,this.expectedInputValue=``,this.inputLabel=``,this.inputValue=``,this.moreInfo=void 0,this.confirmButtonText=``,this.isPasswordInput=!1,this.errorMessage=``;
277let{type:e,title:i,message:o,confirmButtonText:d,cancelButtonText:m,errorMessage:b,moreInfo:O}=n;this.title=i,this.moreInfo=O,e===`confirm-expected-input`?(this.inputLabel=n.inputLabel,this.expectedInputValue=n.expectedInputValue):e===`confirm-password`&&(this.inputLabel="Confirm your password",this.isPasswordInput=!0,this.errorMessage=b),this.confirmButtonText=d||"Confirm",this.cancelButtonText=m||"Cancel",this.html.toSimpleSafeHtmlWithLinks(o).then(P=>{this.message=P,this.showModal()})})}confirm(){this.openedModal&&this.openedModal.close()}isConfirmationDisabled(){return!this.inputLabel||!this.expectedInputValue?!1:this.expectedInputValue!==this.inputValue}hasError(){return this.errorMessage}showModal(){this.inputValue=``,this.openedModal=this.modalService.open(this.confirmModal(),{centered:!0}),this.openedModal.result.then(()=>{this.confirmService.confirmResponse.next({confirmed:!0,value:this.inputValue})}).catch(n=>{(!n||n!==`pop state dismiss`)&&this.confirmService.confirmResponse.next({confirmed:!1,value:this.inputValue})})}static ɵfac=function(e){return new(e||t)};static ɵcmp=qa$1({type:t,selectors:[[`my-confirm`]],viewQuery:function(e,i){e&1&&ax(i.confirmModal,Ya,5),e&2&&G$()},decls:2,vars:0,consts:()=>{let n;n="Close this modal";let e;return e=`${`�0�`}`,[[`confirmModal`,``],e,[1,`modal-header`],[1,`modal-title`],[`title`,n,1,`border-0`,`p-0`,3,`click`],[`iconName`,`cross`],[1,`modal-body`],[3,`innerHtml`],[1,`mt-3`],[1,`form-group`,`mt-3`],[1,`text-danger`],[1,`modal-footer`,`inputs`],[`type`,`button`,`role`,`button`,1,`peertube-button`,`secondary-button`,3,`click`,`key.enter`,`value`],[`ngbAutofocus`,``,`type`,`submit`,1,`peertube-button`,`primary-button`,3,`click`,`key.enter`,`value`,`disabled`],[`for`,`confirmInput`],[`autocomplete`,`on`,`inputId`,`confirmInput`,3,`autofocus`,`ngModel`],[`type`,`text`,`myAutofocus`,``,`id`,`confirmInput`,`name`,`confirmInput`,3,`ngModel`],[`autocomplete`,`on`,`inputId`,`confirmInput`,3,`ngModelChange`,`keyup.enter`,`autofocus`,`ngModel`],[`type`,`text`,`myAutofocus`,``,`id`,`confirmInput`,`name`,`confirmInput`,3,`ngModelChange`,`keyup.enter`,`ngModel`]]},template:function(e,i){e&1&&CA(0,is,13,8,`ng-template`,null,0,G5)},dependencies:[X1,Qn,Je$1,qn,dn$1,oe],styles:[`.button[_ngcontent-%COMP%]{padding:0 13px}input[type=text][_ngcontent-%COMP%]{display:block;font-size:16px;padding:var(--%NS%input-y-padding) var(--%NS%input-x-padding);width:100%;max-width:100%;color:var(--%NS%input-fg);background-color:var(--%NS%input-bg);border:var(--%NS%input-border-width) solid var(--%NS%input-border-color);border-radius:var(--%NS%input-border-radius);line-height:24px}input[type=text][_ngcontent-%COMP%]::placeholder{color:var(--%NS%input-placeholder-color);font-size:var(--%NS%input-placeholder-font-size)}input[type=text][readonly][_ngcontent-%COMP%]{color:var(--%NS%fg-300)}input[type=text][_ngcontent-%COMP%]:focus, input[type=text][_ngcontent-%COMP%]:focus-visible{box-shadow:0 0 0 .2rem var(--%NS%fg-100);outline:0}input[type=text][disabled][_ngcontent-%COMP%]{color:var(--%NS%fg-300);opacity:.8}@media screen and (max-width: calc(100% + 40px)){input[type=text][_ngcontent-%COMP%]{width:100%}}.modal-body[_ngcontent-%COMP%]{padding-top:0;padding-bottom:0;color:var(--%NS%fg-300)}`],changeDetection:1})};var os=[`accountSetupWarningModal`];var rs=[`adminConfigWizardModal`];var as=[`instanceConfigWarningModal`];var ss=[`customModal`];var ls=()=>[import(`./chunk-By3Rm88D.js`).then(t=>t.AccountSetupWarningModalComponent)];var cs=()=>[import(`./chunk-BPiSkoYR.js`).then(t=>t.InstanceConfigWarningModalComponent),import(`./chunk-CrZ8C1Rc.js`).then(t=>t.AdminConfigWizardModalComponent)];var ds=(t,n,e)=>({"user-logged-in":t,"user-not-logged-in":n,"hotkeys-modal-opened":e});var ps=t=>({expanded:t});function ms(t,n){if(t&1&&sh(0,`div`,7),t&2)LA(`innerHTML`,j$().customCSS,J_)}function us(t,n){if(t&1){let e=o$();Mp(0,`button`,22),ch(`click`,function(){kI(e);return FI(j$(2).hideBroadcastMessage())}),sh(1,`my-global-icon`,23),Gb()}}function gs(t,n){if(t&1&&(Mp(0,`div`,17),sh(1,`div`,20),YV(2,us,2,0,`button`,21),Gb()),t&2){let e=j$();LA(`ngClass`,e.broadcastMessage.class),ij(),LA(`innerHTML`,e.broadcastMessage.message,J_),ij(),KV(e.broadcastMessage.dismissable?2:-1)}}function _s(t,n){if(t&1&&(Mp(0,`div`,24),sh(1,`my-global-icon`,25),Mp(2,`div`,26)(3,`h3`),g5(4),Gb(),Mp(5,`p`),g5(6),Gb()()()),t&2){let e=n.$implicit,i=j$();ij(),LA(`iconName`,i.getNotificationIcon(e)),ij(3),Tx(e.summary),ij(2),Tx(e.detail)}}function hs(t,n){if(t&1){let e=o$();
277Mp(0,`my-account-setup-warning-modal`,27,3),ch(`created`,function(){kI(e);return FI(j$().onModalCreated())}),Gb()}}function fs(t,n){if(t&1){let e=o$();Mp(0,`my-admin-config-wizard-modal`,27,4),ch(`created`,function(){kI(e);return FI(j$().onModalCreated())}),Gb(),Mp(2,`my-instance-config-warning-modal`,27,5),ch(`created`,function(){kI(e);return FI(j$().onModalCreated())}),Gb()}}var an=class t{document=m(Ne);localeId=m(mn);router=m(st);authService=m(tt);serverService=m(Kt$1);peertubeRouter=m(Bi);pluginService=m($i);instanceService=m(E);domSanitizer=m(az);screenService=m(Yc);hotkeysService=m(zc);hooks=m(Yg);location=m(No);modalService=m(sr$1);markdownService=m(Jc);ngbConfig=m(rt);loadingBar=m(S$1);scrollService=m(jg);userLocalStorage=m(el);peertubeModal=m(n$1);routerStatus=m(kg);redirectService=m(ho);menu=m(zg);static LS_BROADCAST_MESSAGE=`app-broadcast-message-dismissed`;accountSetupWarningModal=tme(`accountSetupWarningModal`);adminConfigWizardModal=tme(`adminConfigWizardModal`);instanceConfigWarningModal=tme(`instanceConfigWarningModal`);customModal=tme(`customModal`);customCSS;broadcastMessage=null;hotkeysModalOpened=!1;toastPosition=`bottom-right`;serverConfig;userLoaded=!1;constructor(){this.ngbConfig.animation=!1}ngOnInit(){document.getElementById(`incompatible-browser`).className+=` browser-ok`,this.loadUser(),this.serverConfig=this.serverService.getHTMLConfig(),this.hooks.runAction(`action:application.init`,`common`),this.authService.loadClientCredentials(),this.isUserLoggedIn()&&this.authService.refreshUserInformation(),this.initRouteEvents(),this.scrollService.enableScrollRestoration(),this.injectJS(),this.injectCSS(),this.injectBroadcastMessage(),this.serverService.configReloaded.subscribe(n=>{this.serverConfig=n,this.injectBroadcastMessage(),this.injectCSS()}),this.initHotkeys(),this.location.onPopState(()=>this.modalService.dismissAll(Jje)),this.listenUserChangeForModals(),this.document.documentElement.lang=kwe(this.localeId),this.document.documentElement.dir=w3(this.localeId),this.pluginService.addAction(`application:increment-loader`,()=>(this.loadingBar.useRef(`plugins`).start(),Promise.resolve())),this.pluginService.addAction(`application:decrement-loader`,()=>(this.loadingBar.useRef(`plugins`).complete(),Promise.resolve())),this.peertubeModal.openAdminConfigWizardSubject.subscribe(({showWelcome:n})=>{let e=this.adminConfigWizardModal();e&&e.show({showWelcome:n})}),w3(this.localeId)===`rtl`&&(this.toastPosition=`bottom-left`)}ngAfterViewInit(){this.pluginService.initializeCustomModal(this.customModal())}ngOnDestroy(){this.pluginService.removeAction(`application:increment-loader`),this.pluginService.removeAction(`application:decrement-loader`)}isUserLoggedIn(){return this.authService.isLoggedIn()}isUserAdmin(){return this.isUserLoggedIn()&&this.authService.getUser().role.id===Yn.ADMINISTRATOR}hideBroadcastMessage(){Kn.setItem(t.LS_BROADCAST_MESSAGE,this.serverConfig.broadcastMessage.message),this.broadcastMessage=null,this.screenService.isBroadcastMessageDisplayed=!1}getNotificationIcon(n){switch(n.severity){case`error`:return`cross`;case`success`:return`tick`;case`info`:return`help`}}initRouteEvents(){let n=this.router.events;this.peertubeRouter.getNavigationEndEvents().subscribe(e=>{this.hooks.runAction(`action:router.navigation-end`,`common`,{path:e.url})}),n.pipe(xe(e=>e instanceof tm),xe(()=>this.screenService.isInSmallView()||this.screenService.isInTouchScreen())).subscribe(()=>this.menu.setMenuCollapsed(!0)),n.pipe(xe(e=>e instanceof im)).subscribe(e=>{e.route.data?.preloaded||this.loadingBar.useRef(`router-`+e.route.path).start()}),n.pipe(xe(e=>e instanceof sm)).subscribe(e=>{e.route.data?.preloaded||this.loadingBar.useRef(`router-`+e.route.path).complete()}),n.pipe(xe(e=>e instanceof hi)).subscribe(()=>{let e=this.router.currentNavigation();this.routerStatus.isNavigatingBack=e?.trigger===`popstate`||e?.extras.state?.trigger===`popstate`})}injectBroadcastMessage(){return F(this,null,function*(){this.broadcastMessage=null,this.screenService.isBroadcastMessageDisplayed=!1;let n=this.serverConfig.broadcastMessage;if(n.enabled){if(n.dismissable&&Kn.getItem(t.LS_BROADCAST_MESSAGE)===n.message)return;
277let e={info:`alert-info`,warning:`alert-warning`,error:`alert-danger`},i=document.createElement(`div`);i.innerHTML=yield this.markdownService.markdownToUnsafeHTML({markdown:n.message}),i.querySelectorAll(`a`).forEach(o=>o.className+=` alert-link`),this.broadcastMessage={message:i.innerHTML,dismissable:n.dismissable,class:e[n.level]},this.screenService.isBroadcastMessageDisplayed=!0}})}injectJS(){if(this.serverConfig.instance.customizations.javascript)try{window.eval(this.serverConfig.instance.customizations.javascript)}catch(n){j.error(`Cannot eval custom JavaScript.`,n)}}injectCSS(){let n=document.querySelector(`style.custom-css-style`);if(n&&n.parentNode.removeChild(n),this.customCSS||this.serverConfig.instance.customizations.css){let e=`<style>`+this.serverConfig.instance.customizations.css+`</style>`;this.customCSS=this.domSanitizer.bypassSecurityTrustHtml(e)}}listenUserChangeForModals(){this.authService.userInformationLoaded.pipe($(()=>this.authService.getUser())).subscribe(n=>{this.userLoaded=!0,this.openModalsIfNeeded(n)})}onModalCreated(){let n=this.authService.getUser();n&&setTimeout(()=>this.openModalsIfNeeded(n))}openModalsIfNeeded(n){this.userLoaded&&(n.role.id===Yn.ADMINISTRATOR?this.openAdminModalsIfNeeded(n):this.openAccountModalsIfNeeded(n))}openAdminModalsIfNeeded(n){let e=this.adminConfigWizardModal();if(!e)return;if(e.shouldAutoOpen(n))return e.show({showWelcome:!0});let i=this.instanceConfigWarningModal();i&&i.canBeOpenByUser(n)&&$F([this.serverService.getConfig().pipe(Ke$1()),this.instanceService.getAboutWithCache().pipe(Ke$1())]).subscribe(([o,d])=>{let m=this.instanceConfigWarningModal();m.shouldAutoOpen(o,d)&&m.show(d)})}openAccountModalsIfNeeded(n){let e=this.accountSetupWarningModal();e&&e.shouldAutoOpen(n)&&e.show(n)}initHotkeys(){this.hotkeysService.add([new wr$1([`Shift+/`,`s`],()=>(document.getElementById(`search-video`).focus(),!1),"Focus the search bar"),new wr$1(`b`,()=>(this.menu.toggleMenu(),!1),"Toggle the left menu"),new wr$1(`g o`,()=>(this.router.navigate([`/videos/overview`]),!1),"Go to the \"Discover videos\" page"),new wr$1(`g v`,()=>(this.router.navigate([`/videos/browse`]),!1),"Go to the \"Browse videos\" page"),new wr$1(`g p`,()=>(this.router.navigate([`/videos/publish`]),!1),"Go to the \"Publish video\" page"),new wr$1(`g l`,()=>(this.redirectService.redirectToLogin(),!1),"Go to the login page")])}onHotkeysModalStateChange(n){this.hotkeysModalOpened=n}loadUser(){let n=this.userLocalStorage.getTokens();if(!n)return;let e=this.userLocalStorage.getLoggedInUser();e&&this.authService.buildAuthUser(e,n)}static ɵfac=function(e){return new(e||t)};static ɵcmp=qa$1({type:t,selectors:[[`my-app`]],viewQuery:function(e,i){e&1&&ax(i.accountSetupWarningModal,os,5)(i.adminConfigWizardModal,rs,5)(i.instanceConfigWarningModal,as,5)(i.customModal,ss,5),e&2&&G$(4)},decls:27,vars:14,consts:()=>{let n;n="Skip to main content";let e;return e="Close this message",[[`mainContent`,``],[`message`,``],[`customModal`,``],[`accountSetupWarningModal`,``],[`adminConfigWizardModal`,``],[`instanceConfigWarningModal`,``],n,[3,`innerHTML`],[`href`,`#content`,1,`visually-hidden-focusable`,`skip-to-content`,3,`click`],[3,`hotkeysModalStateChange`],[1,`peertube-container`,3,`ngClass`],[1,`root-header`],[1,`w-100`],[1,`sub-header-container`],[`id`,`left-menu`,`role`,`navigation`,`aria-label`,`Main menu`],[`tabindex`,`-1`,`id`,`content`,1,`main-col`,3,`ngClass`],[1,`main-row`],[1,`broadcast-message`,`alert`,`margin-content`,3,`ngClass`],[`color`,`var(--border-primary)`,3,`includeSpinner`],[3,`position`],[1,`text-break`,3,`innerHTML`],[`title`,e,1,`border-0`],[`title`,e,1,`border-0`,3,`click`],[`iconName`,`cross`],[1,`notification-block`],[3,`iconName`],[1,`message`],[3,`created`]]},template:function(e,i){if(e&1){let o=o$();YV(0,ms,1,1,`div`,7),Mp(1,`a`,8),ch(`click`,function(m){kI(o);let b=z$(10);return m.preventDefault(),FI(b.focus())}),U$(2,6),Gb(),Mp(3,`my-hotkeys-cheat-sheet`,9),ch(`hotkeysModalStateChange`,function(m){return i.onHotkeysModalStateChange(m)}),Gb(),Mp(4,`div`,10)(5,`header`,11),sh(6,`my-header`,12),Gb(),Mp(7,`div`,13),sh(8,`my-menu`,14),Mp(9,`main`,15,0)(11,`div`,16),YV(12,gs,3,3,`div`,17),sh(13,`router-outlet`),Gb()()()(),sh(14,`ngx-loading-bar`,18)(15,`my-confirm`),Mp(16,`p-toast`,19),CA(17,_s,7,3,`ng-template`,null,1,G5),Gb(),IA(19,hs,2,0),UV(20,19,ls),IA(22,fs,4,0),UV(23,22,cs),sh(25,`my-custom-modal`,null,2)}e&2&&(KV(i.customCSS?0:-1),ij(4),LA(`ngClass`,O5(8,ds,i.isUserLoggedIn(),!i.isUserLoggedIn(),i.hotkeysModalOpened)),ij(5),LA(`ngClass`,N5(12,ps,i.menu.isCollapsed())),ij(3),KV(i.broadcastMessage?12:-1),ij(2),LA(`includeSpinner`,!1),ij(2),LA(`position`,i.toastPosition),ij(4),HV(i.isUserLoggedIn()),ij(3),HV(i.isUserAdmin()))},dependencies:[nn,X3,tn,on,X1,ET,A$1,$t$1,rn,Kt,Pn,gBe,Yt],styles:[`.skip-to-content[_ngcontent-%COMP%]{position:absolute;top:0;display:block;z-index:19000;
277width:100%;background:var(--%NS%bg);padding:1rem;text-align:center;text-decoration:underline}.peertube-container[_ngcontent-%COMP%]{padding-bottom:20px}.peertube-container.hotkeys-modal-opened[_ngcontent-%COMP%]{display:none}.main-row[_ngcontent-%COMP%]{min-height:calc(100vh - var(--%NS%header-height) - 30px - 30px)}.sub-header-container[_ngcontent-%COMP%]{margin-top:var(--%NS%header-height);background-color:var(--%NS%bg);width:100%}.root-header[_ngcontent-%COMP%]{height:var(--%NS%header-height);position:fixed;top:0;width:100%;background:var(--%NS%bg)}.broadcast-message[_ngcontent-%COMP%]{min-height:50px;text-align:center;margin-bottom:2rem;display:grid;grid-template-columns:1fr 30px;column-gap:10px}.broadcast-message[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{display:block;color:inherit;height:fit-content;margin:auto}.broadcast-message[_ngcontent-%COMP%]   button[_ngcontent-%COMP%] > my-global-icon[_ngcontent-%COMP%]{display:inline-block;width:20px;height:20px;line-height:20px}`],changeDetection:1})};var sn=class t{static ɵfac=function(e){return new(e||t)};static ɵcmp=qa$1({type:t,selectors:[[`my-empty`]],decls:0,vars:0,template:function(e,i){},encapsulation:2,changeDetection:1})};var pt=class t{route=m(eo);redirectService=m(ho);ngOnInit(){let n=this.route.snapshot.url;(n.length===0||Pwe(`/`+n[0]))&&this.redirectService.redirectToHomepage({skipLocationChange:!0})}static ɵfac=function(e){return new(e||t)};static ɵcmp=qa$1({type:t,selectors:[[`ng-component`]],decls:0,vars:0,template:function(e,i){},encapsulation:2,changeDetection:1})};var Ye=class t{router=m(st);accountService=m(C$1);channelService=m(G);canActivate(n){let e=n.params.actorName;return $F([this.accountService.getAccount(e).pipe(this.orUndefined()),this.channelService.get(e).pipe(this.orUndefined())]).pipe($(([i,o])=>i?this.router.parseUrl(`/a/${e}`):o?this.router.parseUrl(`/c/${e}`):this.router.parseUrl(`/404`)))}orUndefined(){return he(()=>O(void 0))}static ɵfac=function(e){return new(e||t)};static ɵprov=T({token:t,factory:t.ɵfac})};var ln=class t{server=m(Kt$1);authService=m(tt);menuEntries=[];sub;ngOnInit(){this.buildMenu(),this.sub=this.authService.loginChangedSource.subscribe(()=>this.buildMenu())}ngOnDestroy(){this.sub&&this.sub.unsubscribe()}buildMenu(){let n=this.server.getHTMLConfig();this.menuEntries=[],n.homepage.enabled&&this.menuEntries.push({label:"Home",routerLink:`/home`}),this.menuEntries.push({label:"Discover",routerLink:`/videos/overview`}),this.authService.isLoggedIn()&&this.menuEntries.push({label:"Subscriptions",routerLink:`/videos/subscriptions`}),this.menuEntries.push({label:"Browse videos",routerLink:`/videos/browse`})}static ɵfac=function(e){return new(e||t)};static ɵcmp=qa$1({type:t,selectors:[[`my-home-menu`]],decls:2,vars:1,consts:[[1,`margin-content`],[3,`menuEntries`]],template:function(e,i){e&1&&(Mp(0,`div`,0),sh(1,`my-horizontal-menu`,1),Gb()),e&2&&(ij(),LA(`menuEntries`,i.menuEntries))},dependencies:[fe$1],encapsulation:2,changeDetection:1})};var cn=class t{disableForReuse(){}enabledForReuse(){}static ɵfac=function(e){return new(e||t)};static ɵcmp=qa$1({type:t,selectors:[[`ng-component`]],decls:2,vars:0,template:function(e,i){e&1&&sh(0,`my-home-menu`)(1,`router-outlet`)},dependencies:[ln,ET],encapsulation:2,changeDetection:1})};var xn=[{path:`admin`,loadChildren:()=>import(`./chunk-Dcc2_XGP.js`),canActivateChild:[Bg]},{path:`my-account`,loadChildren:()=>import(`./chunk-KkP-kOCK.js`),canActivateChild:[Bg]},{path:`my-library`,loadChildren:()=>import(`./chunk-BZVxBuMC2.js`),canActivateChild:[Bg]},{path:`verify-account`,loadChildren:()=>import(`./chunk-C_qYL3Qi.js`),canActivateChild:[Bg]},{path:`accounts`,redirectTo:`a`},{path:`a`,loadChildren:()=>import(`./chunk-BjXWlIoS.js`),canActivateChild:[Bg]},{path:`video-channels`,redirectTo:`c`},{path:`c`,loadChildren:()=>import(`./chunk-BnIFsza2.js`),canActivateChild:[Bg]},{path:`manage/create`,redirectTo:`/my-library/video-channels/create`,pathMatch:`full`},{path:`manage/update/:channel`,pathMatch:`full`,redirectTo:`/my-library/video-channels/update/:channel`},{path:`p`,loadChildren:()=>import(`./chunk-D7hp-kRV.js`),canActivateChild:[Bg],data:{parentRoute:`/`}},{path:`about`,loadChildren:()=>import(`./chunk-DMbO6wuM.js`),canActivateChild:[Bg]},{path:`signup`,loadChildren:()=>import(`./chunk-C-VPZPhU.js`),canActivateChild:[Bg]},{path:`reset-password`,loadChildren:()=>import(`./chunk-C8cmjyXR.js`),canActivateChild:[Bg]},{path:`login`,loadChildren:()=>import(`./chunk-Bjau7H0l.js`),canActivateChild:[Bg]},{path:`search`,loadChildren:()=>import(`./chunk-aImomrXV.js`),canActivateChild:[Bg]}
277,{path:`studio/edit/:videoId`,redirectTo:`/videos/manage/:videoId/studio`,pathMatch:`full`},{path:`stats/videos/:videoId`,redirectTo:`/videos/manage/:videoId/stats`,pathMatch:`full`},{path:`videos/upload`,redirectTo:`/videos/publish`,pathMatch:`full`},{path:`videos/update/:uuid`,pathMatch:`full`,redirectTo:`/videos/manage/:uuid`},{path:`videos/manage/:uuid`,loadChildren:()=>import(`./chunk-C8w99F_92.js`),canActivateChild:[Bg],data:{meta:{title:"Manage your video"}}},{path:`videos/publish`,loadChildren:()=>import(`./chunk-vM2zPHcC.js`),canActivateChild:[Bg],data:{meta:{title:"Publish your video"}}},{path:`video-playlists/watch`,redirectTo:`w/p`},{path:`videos/watch/playlist`,redirectTo:`w/p`},{path:`videos/watch`,redirectTo:`w`},{path:`w`,loadChildren:()=>import(`./chunk-B6M3GiCr.js`),data:{preload:5e3}},{matcher:t=>t.length<1||!(t[0].path===`home`||t[0].path===`videos`)?null:{consumed:[]},component:cn,children:[{path:`home`,loadChildren:()=>import(`./chunk-B-hIpZdJ.js`),canActivateChild:[Bg]},{path:`videos`,loadChildren:()=>import(`./chunk-D6ZgeZQq.js`),canActivateChild:[Bg]}]},{path:`remote-interaction`,loadChildren:()=>import(`./chunk-BjUIdADt.js`),canActivateChild:[Bg]},{matcher:t=>{let n=new RegExp(`^@(${n$3}+)$`);if(t.length!==1)return null;let e=t[0].path.match(n);return e?{consumed:t,posParams:{actorName:new fi(e[1],{})}}:null},pathMatch:`full`,canActivate:[Ye],component:sn},{path:``,component:pt}];for(let t of l8)xn.push({path:t,component:pt});xn.push({path:`**`,loadChildren:()=>import(`./chunk-CmdLQq-m.js`)});var Yo=xn;var Zo={provide:$R,useClass:class t{injector=m(Dt);router=m(st);authService;intercept(n,e){this.authService===void 0&&(this.authService=this.injector.get(tt));let i=this.cloneRequestWithAuth(n);return e.handle(i).pipe(he(o=>{let d=o.error,m=new Set([dDe.VIDEO_REQUIRES_PASSWORD,dDe.INCORRECT_VIDEO_PASSWORD,dDe.CURRENT_PASSWORD_IS_INVALID]);if(d?.code&&m.has(d.code))return Or$1(()=>o);if(!this.authService.isOTPMissingError(o)){if(o.status===_t.UNAUTHORIZED_401&&d?.code===fDe.INVALID_TOKEN)return this.handleTokenExpired(n,e);if(o.status===_t.UNAUTHORIZED_401)return this.handleNotAuthenticated(o)}return Or$1(()=>o)}))}handleTokenExpired(n,e){return this.authService.refreshAccessToken().pipe(je(()=>{let i=this.cloneRequestWithAuth(n);return e.handle(i)}))}cloneRequestWithAuth(n){let e=this.authService.getRequestHeaderValue(),i=n.url.startsWith(`/`)||bje(GQ(),n.url);return e===null||!i?n:n.clone({headers:n.headers.set(`Authorization`,e)})}handleNotAuthenticated(n){return this.router.navigate([`/401`],{state:{obj:n},skipLocationChange:!0}),O(n.message)}static ɵfac=function(e){return new(e||t)};static ɵprov=T({token:t,factory:t.ɵfac})},multi:!0};var dn=class t{videoService=m(H);resolve(n){let e=n.params.videoId;return this.videoService.getVideo({videoId:e})}static ɵfac=function(e){return new(e||t)};static ɵprov=T({token:t,factory:t.ɵfac})};function Jo(){return[AS,u,Zo,C$1,D,L$3,y,_,O$2,H,x,dn,O$1,G,b,n,c,Ye,E,L$2,i,d$1]}Sge(yEe,`oc`);function Cs(t,n,e,i){let o=()=>(i.init(),e.initialize(),n.initializePlugins());return()=>{let d=t.loadHTMLConfig();return d?d.pipe(je(()=>o())):o()}}se.production;j.registerServerSending(se.apiUrl);var ys=()=>KG(an,{providers:[sme({eventCoalescing:!0}),_I(nz,Ho.register(`ngsw-worker.js`,{enabled:se.production})),zR(PG([Vo])),_I(Tt$1,Kt,zl),B4e(),Jo(),Fo(),_1,{provide:eM,useClass:D1},j4(Yo,lM(_1),V4({anchorScrolling:`disabled`,scrollPositionRestoration:`disabled`})),{provide:bh,useValue:`/`},th(()=>Cs(m(Kt$1),m($i),m(Kg),m(ho))()),Po({theme:{preset:hEe}})]}).then(t=>{if(!se.production){let e=t.injector.get($n).components[0];Hye(e)}return t}).catch(t=>{try{j.error(t)}catch(n){console.error(`Cannot log error`,{err:t,err2:n})}return setTimeout(()=>{if(document.querySelector(`my-app`).innerHTML===``)throw t},1e3),null});ys();export{Cs as loadConfigFactory};
278//# debugId=d75265dd-0a11-5db7-b5f6-455924b98e77
279//# sourceMappingURL=main-7RR2Q2IV.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.