import{L as Lt$1,V as Vt,I as Ii,K as Ke,X as Xe,j as je,$ as $i,q as qi}from'./chunk-BTyktZAo.js';import{T}from'./chunk-BpOe3-4z.js';import{m as me}from'./chunk-CmeTG4Q4.js';import'./chunk-CJ5LAhIS.js';import{A as Ae,i as ie$1}from'./chunk-EQPLZvn8.js';import{a}from'./chunk-BVeX-r_x.js';import'./chunk-nfSA6zwi.js';import{g,r as rr,P as Pc,a as rc,x as xpe,_ as _pe,B as Bn,j,b as Pa,w as w0,I as I$,p as px,c as IV,J as Jn,Q as Qn,C as it,s as sp,f as Pp,d as lb,v as vV,h as sx,i as ax,e as Fp,$ as $t$1,D as w,H as kk,K as qp,L as e3,N as tl,Y as YS,R as cl,U as x3,V as Zn,X as Je,q as qn,a0 as $n,a1 as Vn,a2 as yn,m as zH,k as w2,W as WB,n as cx,E as EV,a3 as H0,a4 as d$,y as qH,o as x2,a5 as fn,l as ln,T as Tr,a6 as XV,O as Ox,t as t$,u as Mx,a7 as yg,a8 as HUe,a9 as Oe,aa as ge,ab as Qn$1,ac as Vd,ad as ti,ae as N2,af as R2,ag as M2,ah as u$,ai as bV,F as F2,G as GI,aj as CV,z as zI,S as SV,ak as xx,al as H,am as Xt,an as Qh,ao as D,ap as R_e,aq as txe,ar as wpe,as as Yl,at as Mn,au as iw}from'./main-DEZ5cZzu.js';var Mt=H((Yn,Et)=>{Et.exports=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-key-round-icon lucide-key-round">
  <path d="M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z" />
  <circle cx="16.5" cy="7.5" r=".5" fill="currentColor" />
</svg>
`;});var ft=H((Bn,Ft)=>{Ft.exports=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-briefcase-business-icon lucide-briefcase-business">
  <path d="M12 12h.01" />
  <path d="M16 6V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v2" />
  <path d="M22 13a18.15 18.15 0 0 1-20 0" />
  <rect width="20" height="14" x="2" y="6" rx="2" />
</svg>
`;});function Ee(){return"no_welcome_modal";}var dt=(()=>{class r{hide=_pe();static ɵfac=function(o){return new(o||r)();};static ɵcmp=Pa({type:r,selectors:[["my-admin-config-wizard-documentation"]],outputs:{hide:"hide"},decls:55,vars:0,consts:()=>{let t;t="Congratulations";let o;o="Your platform has been configured!";let e;e=" It's time to add information about your platform! "+"[\uFFFD#12\uFFFD|\uFFFD#13\uFFFD|\uFFFD#14\uFFFD|\uFFFD#15\uFFFD|\uFFFD#16\uFFFD]"+"Setting up a description"+"[\uFFFD/#12\uFFFD|\uFFFD/#13\uFFFD|\uFFFD/#14\uFFFD|\uFFFD/#15\uFFFD|\uFFFD/#16\uFFFD]"+", specifying "+"[\uFFFD#12\uFFFD|\uFFFD#13\uFFFD|\uFFFD#14\uFFFD|\uFFFD#15\uFFFD|\uFFFD#16\uFFFD]"+"who you are"+"[\uFFFD/#12\uFFFD|\uFFFD/#13\uFFFD|\uFFFD/#14\uFFFD|\uFFFD/#15\uFFFD|\uFFFD/#16\uFFFD]"+", why "+"[\uFFFD#12\uFFFD|\uFFFD#13\uFFFD|\uFFFD#14\uFFFD|\uFFFD#15\uFFFD|\uFFFD#16\uFFFD]"+"you created your platform"+"[\uFFFD/#12\uFFFD|\uFFFD/#13\uFFFD|\uFFFD/#14\uFFFD|\uFFFD/#15\uFFFD|\uFFFD/#16\uFFFD]"+" and "+"[\uFFFD#12\uFFFD|\uFFFD#13\uFFFD|\uFFFD#14\uFFFD|\uFFFD#15\uFFFD|\uFFFD#16\uFFFD]"+"how long"+"[\uFFFD/#12\uFFFD|\uFFFD/#13\uFFFD|\uFFFD/#14\uFFFD|\uFFFD/#15\uFFFD|\uFFFD/#16\uFFFD]"+" you plan to "+"[\uFFFD#12\uFFFD|\uFFFD#13\uFFFD|\uFFFD#14\uFFFD|\uFFFD#15\uFFFD|\uFFFD#16\uFFFD]"+"maintain it"+"[\uFFFD/#12\uFFFD|\uFFFD/#13\uFFFD|\uFFFD/#14\uFFFD|\uFFFD/#15\uFFFD|\uFFFD/#16\uFFFD]"+" is very important for visitors to understand on what type of website they are. ",e=bV(e);let a;a="\u0631\u0648\u0627\u0628\u0637 \u0645\u0641\u064A\u062F\u0629";let d;d="Official PeerTube website:";let p;p="Blog post, get help or discover PeerTube";let A;A="Public PeerTube index:";let E;E="Put your platform on the official PeerTube public index";let x;x="Documentation";let k;k="Admin:";let X;X="Managing users, following other platforms, dealing with spammers, configure object storage or remote transcoding...";let O;O="\u0642\u0645 \u0628\u0625\u0639\u062F\u0627\u062F \u062D\u0633\u0627\u0628\u0643\u060C \u0648\u0625\u062F\u0627\u0631\u0629 \u0642\u0648\u0627\u0626\u0645 \u062A\u0634\u063A\u064A\u0644 \u0627\u0644\u0641\u064A\u062F\u064A\u0648\u060C \u0648\u0627\u0643\u062A\u0634\u0627\u0641 \u062A\u0637\u0628\u064A\u0642\u0627\u062A \u0627\u0644\u0637\u0631\u0641 \u0627\u0644\u062B\u0627\u0644\u062B...";let R;R="CLI:";let Fe;Fe="\u0627\u0631\u0641\u0639 \u0623\u0648 \u0627\u0633\u062A\u0648\u0631\u062F \u0645\u0644\u0641\u0627\u062A \u0627\u0644\u0641\u064A\u062F\u064A\u0648 \u060C\u0631\u0627\u062C\u0639 \u0627\u0644\u0633\u062C\u0644\u0627\u062A\u060C \u0646\u0638\u0641 \u0623\u062F\u0644\u0629 \u0627\u0644\u062A\u062E\u0632\u064A\u0646\u060C \u0623\u0648 \u0623\u0639\u062F \u062A\u0639\u064A\u064A\u0646 \u0643\u0644\u0645\u0629 \u0645\u0631\u0648\u0631 \u0627\u0644\u0645\u0633\u062A\u062E\u062F\u0645 ...";let Pe;Pe="\u0625\u063A\u0644\u0627\u0642";let he;return he="Fill platform information",[t,o,e,a,d,p,A,E,x,k,X,O,R,Fe,Pe,he,[1,"root"],[1,"one-column"],[1,"mascot-container"],["src","/client/assets/images/mascot/happy.svg","alt","mascot",1,"mascot"],[1,"title"],[1,"sub-title"],[1,"mt-4"],[1,"text-content"],["href","https://joinpeertube.org","target","_blank",1,"link-primary","me-1"],["href","https://instances.joinpeertube.org/instances","target","_blank",1,"link-primary","me-1"],["href","https://docs.joinpeertube.org/admin/following-instances","target","_blank",1,"link-primary","me-1"],["href","https://docs.joinpeertube.org/use/setup-account","target","_blank",1,"link-primary","me-1"],["href","https://docs.joinpeertube.org/maintain/tools","target","_blank",1,"link-primary","me-1"],[1,"buttons"],["theme","secondary",3,"click"],["theme","primary","ptRouterLink","/admin/settings/config",3,"click"]];},template:function(o,e){o&1&&(sp(0,"div",16)(1,"div",17)(2,"div",18),Pp(3,"img",19),lb(),sp(4,"h4")(5,"div",20),vV(6,0),lb(),sp(7,"div",21),vV(8,1),lb()()(),sp(9,"div",22)(10,"span",23),sx(11,2),Pp(12,"strong")(13,"strong")(14,"strong")(15,"strong")(16,"strong"),ax(),lb()(),sp(17,"div",22)(18,"h5"),vV(19,3),lb(),sp(20,"ul",23)(21,"li")(22,"a",24),vV(23,4),lb(),sp(24,"span"),vV(25,5),lb()(),sp(26,"li")(27,"a",25),vV(28,6),lb(),sp(29,"span"),vV(30,7),lb()()()(),sp(31,"div",22)(32,"h5"),vV(33,8),lb(),sp(34,"ul",23)(35,"li")(36,"a",26),vV(37,9),lb(),sp(38,"span"),vV(39,10),lb()(),sp(40,"li")(41,"a",27),XV(42,"User:"),lb(),sp(43,"span"),vV(44,11),lb()(),sp(45,"li")(46,"a",28),vV(47,12),lb(),sp(48,"span"),vV(49,13),lb()()()(),sp(50,"div",29)(51,"my-button",30),Fp("click",function(){return e.hide.emit();}),vV(52,14),lb(),sp(53,"my-button",31),Fp("click",function(){return e.hide.emit();}),vV(54,15),lb()()());},dependencies:[it],styles:[".steps[_ngcontent-%COMP%]{color:var(--fg-200);font-size:14px;font-weight:700}.title[_ngcontent-%COMP%]{color:var(--fg-350);font-weight:700;font-size:calc(1.3625rem + 1.35vw)}@media(min-width:1200px){.title[_ngcontent-%COMP%]{font-size:2.375rem}}.sub-title[_ngcontent-%COMP%]{color:var(--fg-300);font-weight:400;font-size:1.25rem}h4[_ngcontent-%COMP%]{margin-bottom:0}.text-content[_ngcontent-%COMP%]{color:var(--fg-200)}.buttons[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;margin-top:calc(1.375rem + 1.5vw)}@media(min-width:1200px){.buttons[_ngcontent-%COMP%]{margin-top:2.5rem}}.buttons[_ngcontent-%COMP%]{gap:calc(1.275rem + .3vw)}@media(min-width:1200px){.buttons[_ngcontent-%COMP%]{gap:1.5rem}}form[_ngcontent-%COMP%]{max-width:512px;width:100%}.two-columns[_ngcontent-%COMP%]{display:flex;gap:1rem}.two-columns.width-50[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:50%}.one-column[_ngcontent-%COMP%]{text-align:center}.one-column[_ngcontent-%COMP%]   .mascot-container[_ngcontent-%COMP%]{position:relative;height:110px;margin:0 auto}.one-column[_ngcontent-%COMP%]   .mascot-container[_ngcontent-%COMP%], .one-column[_ngcontent-%COMP%]   .mascot[_ngcontent-%COMP%]{width:170px}.one-column[_ngcontent-%COMP%]   .mascot[_ngcontent-%COMP%]{position:absolute;top:-100px;left:0;height:190px}h5[_ngcontent-%COMP%]{font-size:1rem;font-weight:700;color:var(--fg-300)}"],changeDetection:1});}return r;})();var mt=r=>({"input-error":r});function St(r,c){if(r&1&&(sp(0,"div",22),XV(1),lb()),r&2){let t=SV();WB(),xx(t.formErrors.platformName);}}function Tt(r,c){if(r&1&&(sp(0,"div",22),XV(1),lb()),r&2){let t=SV();WB(),xx(t.formErrors.shortDescription);}}function Dt(r,c){if(r&1){let t=F2();sp(0,"my-button",34),Fp("click",function(){GI(t);let e=SV();return zI(e.back.emit());}),vV(1,10),lb();}}var ct=(()=>{class r{server=g($t$1);formReactiveService=g(w);themeService=g(kk);currentStep=qp.required({transform:e3});totalSteps=qp.required({transform:e3});showBack=qp.required({transform:tl});back=_pe();next=_pe();hide=_pe();form;formErrors={};validationMessages={};ngOnInit(){this.buildForm();let t=YS(this.server.getHTMLConfig().instance.avatars,128);t&&fetch(t.fileUrl).then(o=>o.blob()).then(o=>this.form.patchValue({avatar:o})).catch(()=>{j.error("Could not fetch instance avatar");});}get avatarFileConstraints(){return this.server.getHTMLConfig().avatar.file;}buildForm(){let t={platformName:Vt,shortDescription:Lt$1,avatar:null,primaryColor:a},{form:o,formErrors:e,validationMessages:a$1}=this.formReactiveService.buildForm(t,this.getDefaultValues());this.form=o,this.formErrors=e,this.validationMessages=a$1;}getDefaultValues(){let t=this.server.getHTMLConfig(),o=t.theme.customization.primaryColor,e=o?this.themeService.formatColorForForm(o):this.themeService.formatColorForForm(this.themeService.getCSSConfigValue("primaryColor"));return{platformName:t.instance.name,shortDescription:t.instance.shortDescription,avatar:void 0,primaryColor:e};}static ɵfac=function(o){return new(o||r)();};static ɵcmp=Pa({type:r,selectors:[["my-admin-config-wizard-edit-info"]],inputs:{currentStep:[1,"currentStep"],totalSteps:[1,"totalSteps"],showBack:[1,"showBack"]},outputs:{back:"back",next:"next",hide:"hide"},decls:39,vars:15,consts:()=>{let t;t="STEP "+"\uFFFD0\uFFFD"+"/"+"\uFFFD1\uFFFD"+"";let o;o="General information";let e;e="You can edit this information later";let a;a="Platform name";let d;d="\u0648\u0635\u0641 \u0642\u0635\u064A\u0631";let p;p="Platform icon";let A;A="Used in various places such as on the website, mobile application and social media";let E;E="Primary color";let x;x="Next step";let k;k="Ignore for now";let X;return X="Back",[t,o,e,a,d,p,A,E,x,k,X,[1,"root"],[1,"two-columns"],["src","/client/assets/images/mascot/pointing.svg","alt","mascot",1,"mascot"],[1,"steps"],[1,"header-steps"],[1,"title"],[1,"text-content"],[3,"formGroup"],[1,"form-group"],["for","platformName"],["type","text","id","platformName","formControlName","platformName",1,"form-control",3,"ngClass"],["role","alert",1,"form-error"],["for","shortDescription"],["id","shortDescription","formControlName","shortDescription",1,"form-control","small",3,"ngClass"],["for","avatarfile"],[1,"form-group-description"],["formControlName","avatar","inputName","avatar","displayDelete","true",1,"avatar-preview",3,"fileConstraints"],["for","primaryColor"],["inputId","primaryColor","formControlName","primaryColor",3,"formError"],[1,"buttons"],["icon","arrow-left","theme","secondary"],["theme","primary",3,"click","disabled"],[1,"button-as-link",3,"click"],["icon","arrow-left","theme","secondary",3,"click"]];},template:function(o,e){o&1&&(sp(0,"div",11)(1,"div",12)(2,"div"),Pp(3,"img",13),lb(),sp(4,"div")(5,"div",14)(6,"div",15),vV(7,0),lb()(),sp(8,"h4",16),vV(9,1),lb(),sp(10,"div",17),vV(11,2),lb(),sp(12,"form",18)(13,"div",19)(14,"label",20),vV(15,3),lb(),Pp(16,"input",21),zH(),w2(17,St,2,1,"div",22),lb(),sp(18,"div",19)(19,"label",23),vV(20,4),lb(),Pp(21,"textarea",24),zH(),w2(22,Tt,2,1,"div",22),lb(),sp(23,"div",19)(24,"label",25),vV(25,5),lb(),sp(26,"div",26),vV(27,6),lb(),Pp(28,"my-image-input",27),zH(),lb(),sp(29,"div",19)(30,"label",28),vV(31,7),lb(),Pp(32,"my-peertube-color-picker",29),zH(),lb(),sp(33,"div",30),w2(34,Dt,2,0,"my-button",31),sp(35,"my-button",32),Fp("click",function(){return e.next.emit(e.form.value);}),vV(36,8),lb(),sp(37,"button",33),Fp("click",function(){return e.hide.emit();}),vV(38,9),lb()()()()()()),o&2&&(WB(7),cx(e.currentStep())(e.totalSteps()),EV(7),WB(5),H0("formGroup",e.form),WB(4),H0("ngClass",d$(11,mt,e.formErrors.platformName)),qH(),WB(),x2(e.formErrors.platformName?17:-1),WB(4),H0("ngClass",d$(13,mt,e.formErrors.shortDescription)),qH(),WB(),x2(e.formErrors.shortDescription?22:-1),WB(6),H0("fileConstraints",e.avatarFileConstraints),qH(),WB(4),H0("formError",e.formErrors.primaryColor),qH(),WB(2),x2(e.showBack()?34:-1),WB(),H0("disabled",!e.form.valid));},dependencies:[cl,x3,Jn,Zn,Je,qn,$n,Qn,Vn,yn,Ii,Ae,it,me],styles:["form[_ngcontent-%COMP%]{margin-top:calc(1.325rem + .9vw)}@media(min-width:1200px){form[_ngcontent-%COMP%]{margin-top:2rem}}.mascot[_ngcontent-%COMP%]{margin-top:-90px;width:170px;height:190px}.avatar-preview[_ngcontent-%COMP%]{width:128px;height:128px}@media screen and (max-width:800px){.mascot[_ngcontent-%COMP%]{display:none}.two-columns[_ngcontent-%COMP%]{justify-content:center}}textarea[_ngcontent-%COMP%]{min-height:150px}",".steps[_ngcontent-%COMP%]{color:var(--fg-200);font-size:14px;font-weight:700}.title[_ngcontent-%COMP%]{color:var(--fg-350);font-weight:700;font-size:calc(1.3625rem + 1.35vw)}@media(min-width:1200px){.title[_ngcontent-%COMP%]{font-size:2.375rem}}.sub-title[_ngcontent-%COMP%]{color:var(--fg-300);font-weight:400;font-size:1.25rem}h4[_ngcontent-%COMP%]{margin-bottom:0}.text-content[_ngcontent-%COMP%]{color:var(--fg-200)}.buttons[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;margin-top:calc(1.375rem + 1.5vw)}@media(min-width:1200px){.buttons[_ngcontent-%COMP%]{margin-top:2.5rem}}.buttons[_ngcontent-%COMP%]{gap:calc(1.275rem + .3vw)}@media(min-width:1200px){.buttons[_ngcontent-%COMP%]{gap:1.5rem}}form[_ngcontent-%COMP%]{max-width:512px;width:100%}.two-columns[_ngcontent-%COMP%]{display:flex;gap:1rem}.two-columns.width-50[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:50%}.one-column[_ngcontent-%COMP%]{text-align:center}.one-column[_ngcontent-%COMP%]   .mascot-container[_ngcontent-%COMP%]{position:relative;height:110px;margin:0 auto}.one-column[_ngcontent-%COMP%]   .mascot-container[_ngcontent-%COMP%], .one-column[_ngcontent-%COMP%]   .mascot[_ngcontent-%COMP%]{width:170px}.one-column[_ngcontent-%COMP%]   .mascot[_ngcontent-%COMP%]{position:absolute;top:-100px;left:0;height:190px}h5[_ngcontent-%COMP%]{font-size:1rem;font-weight:700;color:var(--fg-300)}"],changeDetection:1});}return r;})();var pt=(()=>{class r{el=g(Mn);unsafeHTML=qp.required();ngOnInit(){let t=this.el.nativeElement;t.innerHTML=this.unsafeHTML(),t.ariaHidden="true";}static ɵfac=function(o){return new(o||r)();};static ɵcmp=Pa({type:r,selectors:[["my-custom-icon"]],inputs:{unsafeHTML:[1,"unsafeHTML"]},decls:0,vars:0,template:function(o,e){},styles:["[_nghost-%COMP%]{display:inline-block;height:24px;width:24px}[_nghost-%COMP%]     svg{vertical-align:bottom;width:inherit;height:inherit}[_nghost-%COMP%]     .feather-flag{margin-left:-1px}"]});}return r;})();var ut=(()=>{class r{formReactiveService=g(w);usageType=wpe.required();form;formErrors={};validationMessages={};registrationOptions=[{id:"open",label:"Open",description:"Anyone can register and use the platform"},{id:"approval",label:"Requires approval",description:"Anyone can register, but a moderator must approve their account before they can use the platform"},{id:"closed",label:"Closed",description:"Only an administrator can create users on the platform"}];importOptions=[{id:"enabled",label:"\u0645\u0641\u0639\u0651\u0644",description:"Your community can import videos from remote platforms (YouTube, Vimeo...) and automatically synchronize remote channels"},{id:"disabled",label:"\u0645\u064F\u0639\u0637\u0651\u064E\u0644",description:"Your community cannot import or synchronize content from remote platforms"}];liveOptions=[{id:"enabled",label:"Yes",description:"Your community can live stream on the platform (this requires extra moderation work)"},{id:"disabled",label:"No",description:"Your community is not permitted to run live streams on the platform"}];globalSearchOptions=[{id:"enabled",label:"\u062A\u0645\u0643\u064A\u0646 \u0627\u0644\u0628\u062D\u062B \u0627\u0644\u0639\u0627\u0644\u0645\u064A",description:"Use https://sepiasearch.org as default search engine to search for content across all known PeerTube platforms"},{id:"disabled",label:"Disable global search",description:"Use your platform search engine which only displays local content"}];videoQuotaOptions=qi();ngOnInit(){this.buildForm(),this.form.valueChanges.subscribe(t=>{this.usageType().patch(t);});}buildForm(){let t={registration:null,remoteImport:null,videoQuota:null,live:null,globalSearch:null},{form:o,formErrors:e,validationMessages:a}=this.formReactiveService.buildForm(t,this.usageType());this.form=o,this.formErrors=e,this.validationMessages=a;}static ɵfac=function(o){return new(o||r)();};static ɵcmp=Pa({type:r,selectors:[["my-community-based-config"]],inputs:{usageType:[1,"usageType"]},outputs:{usageType:"usageTypeChange"},decls:21,vars:6,consts:()=>{let t;t="Registration policy";let o;o="Video quota for new users";let e;e="Video import and synchronization";let a;a="My community can stream lives";let d;return d="\u0627\u0628\u062D\u062B",[t,o,e,a,d,[3,"formGroup"],[1,"form-group"],["for",""],["inputId","registration","formControlName","registration",3,"items"],["inputId","videoQuota","formControlName","videoQuota",3,"items"],["for","remoteImport"],["inputId","remoteImport","formControlName","remoteImport",3,"items"],["inputId","live","formControlName","live",3,"items"],["inputId","globalSearch","formControlName","globalSearch",3,"items"]];},template:function(o,e){o&1&&(sp(0,"form",5)(1,"div",6)(2,"label",7),vV(3,0),lb(),Pp(4,"my-select-options",8),zH(),lb(),sp(5,"div",6)(6,"label",7),vV(7,1),lb(),Pp(8,"my-select-options",9),zH(),lb(),sp(9,"div",6)(10,"label",10),vV(11,2),lb(),Pp(12,"my-select-options",11),zH(),lb(),sp(13,"div",6)(14,"label",7),vV(15,3),lb(),Pp(16,"my-select-options",12),zH(),lb(),sp(17,"div",6)(18,"label",7),vV(19,4),lb(),Pp(20,"my-select-options",13),zH(),lb()()),o&2&&(H0("formGroup",e.form),WB(4),H0("items",e.registrationOptions),qH(),WB(4),H0("items",e.videoQuotaOptions),qH(),WB(4),H0("items",e.importOptions),qH(),WB(4),H0("items",e.liveOptions),qH(),WB(4),H0("items",e.globalSearchOptions),qH());},dependencies:[Jn,Zn,qn,$n,Qn,Vn,yn,Ke,Ae,Yl],encapsulation:2,changeDetection:1});}return r;})();var gt=(()=>{class r{formReactiveService=g(w);usageType=wpe.required();form;formErrors={};validationMessages={};p2pOptions=[{id:"enabled",label:"\u0645\u0641\u0639\u0651\u0644",description:"Enable P2P streaming by default for anonymous and new users"},{id:"disabled",label:"\u0645\u064F\u0639\u0637\u0651\u064E\u0644",description:"Disable P2P streaming"}];transcriptionOptions=[{id:"enabled",label:"\u0645\u0641\u0639\u0651\u0644",description:"Enable automatic transcription of videos to automatically generate subtitles"},{id:"disabled",label:"\u0645\u064F\u0639\u0637\u0651\u064E\u0644",description:"Disable automatic transcription of videos"}];keepOriginalVideoOptions=[{id:"enabled",label:"Yes",description:"Keep the original video file on the server"},{id:"disabled",label:"No",description:"Delete the original video file after processing"}];authenticationOptions=[{id:"local",label:"\u0645\u064F\u0639\u0637\u0651\u064E\u0644",description:"Your platform will manage user registration and login internally"},{id:"ldap",label:"LDAP",description:"Use LDAP for user authentication"},{id:"oidc",label:"OIDC",description:"Use OpenID Connect for user authentication"},{id:"saml",label:"SAML",description:"Use SAML 2.0 for user authentication"}];ngOnInit(){this.buildForm(),this.form.valueChanges.subscribe(t=>{this.usageType().patch(t);});}buildForm(){let t={keepOriginalVideo:null,p2p:null,transcription:null,authType:null},{form:o,formErrors:e,validationMessages:a}=this.formReactiveService.buildForm(t,this.usageType());this.form=o,this.formErrors=e,this.validationMessages=a;}static ɵfac=function(o){return new(o||r)();};static ɵcmp=Pa({type:r,selectors:[["my-institutional-config"]],inputs:{usageType:[1,"usageType"]},outputs:{usageType:"usageTypeChange"},decls:21,vars:5,consts:()=>{let t;t="Save a copy of the uploaded video";let o;o="P2P";let e;e=" Helps your platform to distribute video content, but "+"\uFFFD#10\uFFFD"+"decreases privacy "+"\uFFFD#11\uFFFD"+""+"\uFFFD/#11\uFFFD"+""+"\uFFFD/#10\uFFFD"+" of your users ";let a;a="Video transcription";let d;return d="Remote authentication",[t,o,e,a,d,[3,"formGroup"],[1,"form-group"],["for","keepOriginalVideo"],["inputId","keepOriginalVideo","formControlName","keepOriginalVideo",3,"items"],["for","p2p"],[1,"form-group-description"],["href","https://docs.joinpeertube.org/admin/privacy-guide#player-p2p","target","_blank"],["iconName","external-link"],["inputId","p2p","formControlName","p2p",3,"items"],["for","transcription"],["inputId","transcription","formControlName","transcription",3,"items"],["for","authType"],["inputId","authType","formControlName","authType",3,"items"]];},template:function(o,e){o&1&&(sp(0,"form",5)(1,"div",6)(2,"label",7),vV(3,0),lb(),Pp(4,"my-select-options",8),zH(),lb(),sp(5,"div",6)(6,"label",9),vV(7,1),lb(),sp(8,"div",10),sx(9,2),sp(10,"a",11),Pp(11,"my-global-icon",12),lb(),ax(),lb(),Pp(12,"my-select-options",13),zH(),lb(),sp(13,"div",6)(14,"label",14),vV(15,3),lb(),Pp(16,"my-select-options",15),zH(),lb(),sp(17,"div",6)(18,"label",16),vV(19,4),lb(),Pp(20,"my-select-options",17),zH(),lb()()),o&2&&(H0("formGroup",e.form),WB(4),H0("items",e.keepOriginalVideoOptions),qH(),WB(8),H0("items",e.p2pOptions),qH(),WB(4),H0("items",e.transcriptionOptions),qH(),WB(4),H0("items",e.authenticationOptions),qH());},dependencies:[Jn,Zn,qn,$n,Qn,Vn,yn,Ke,Ae,Yl,Tr],encapsulation:2,changeDetection:1});}return r;})();var Ct=(()=>{class r{formReactiveService=g(w);usageType=wpe.required();form;formErrors={};validationMessages={};importOptions=[{id:"enabled",label:"\u0645\u0641\u0639\u0651\u0644",description:"Users can import videos from remote platforms (YouTube, Vimeo...) and automatically synchronize remote channels"},{id:"disabled",label:"\u0645\u064F\u0639\u0637\u0651\u064E\u0644",description:"Disable video import and channel synchronization"}];liveOptions=[{id:"enabled",label:"Yes"},{id:"disabled",label:"No"}];keepOriginalVideoOptions=[{id:"enabled",label:"Yes",description:"Keep the original video file on the server"},{id:"disabled",label:"No",description:"Delete the original video file after processing"}];ngOnInit(){this.buildForm(),this.form.valueChanges.subscribe(t=>{this.usageType().patch(t);});}buildForm(){let t={remoteImport:null,live:null,keepOriginalVideo:null},{form:o,formErrors:e,validationMessages:a}=this.formReactiveService.buildForm(t,this.usageType());this.form=o,this.formErrors=e,this.validationMessages=a;}static ɵfac=function(o){return new(o||r)();};static ɵcmp=Pa({type:r,selectors:[["my-private-instance-config"]],inputs:{usageType:[1,"usageType"]},outputs:{usageType:"usageTypeChange"},decls:13,vars:4,consts:()=>{let t;t="Video import and synchronization";let o;o="Users can stream lives";let e;return e="Save a copy of the uploaded video",[t,o,e,[3,"formGroup"],[1,"form-group"],["for","remoteImport"],["inputId","remoteImport","formControlName","remoteImport",3,"items"],["for","live"],["inputId","live","formControlName","live",3,"items"],["for","keepOriginalVideo"],["inputId","keepOriginalVideo","formControlName","keepOriginalVideo",3,"items"]];},template:function(o,e){o&1&&(sp(0,"form",3)(1,"div",4)(2,"label",5),vV(3,0),lb(),Pp(4,"my-select-options",6),zH(),lb(),sp(5,"div",4)(6,"label",7),vV(7,1),lb(),Pp(8,"my-select-options",8),zH(),lb(),sp(9,"div",4)(10,"label",9),vV(11,2),lb(),Pp(12,"my-select-options",10),zH(),lb()()),o&2&&(H0("formGroup",e.form),WB(4),H0("items",e.importOptions),qH(),WB(4),H0("items",e.liveOptions),qH(),WB(4),H0("items",e.keepOriginalVideoOptions),qH());},dependencies:[Jn,Zn,qn,$n,Qn,Vn,yn,Ke,Ae,Yl],encapsulation:2,changeDetection:1});}return r;})();var ie=class r{registration;videoQuota;remoteImport;live;globalSearch;defaultPrivacy;defaultCommentPolicy;p2p;federation;keepOriginalVideo;allowReplaceFile;preferDisplayName;transcription;authType;unsafeExplanations=[];config={};plugins=[];constructor(c){for(let[t,o]of Object.entries(c))this[t]=o;}static initForCommunity(){let c=new r({registration:"approval",remoteImport:"disabled",live:"enabled",videoQuota:5368709120,globalSearch:"enabled",defaultPrivacy:Xt.PUBLIC,p2p:"enabled",federation:"enabled",keepOriginalVideo:"disabled",allowReplaceFile:"disabled",defaultCommentPolicy:void 0,authType:void 0,preferDisplayName:void 0,transcription:void 0});return c.compute(),c;}static initForPrivateInstance(){let c=new r({registration:"closed",remoteImport:"enabled",live:"enabled",videoQuota:-1,globalSearch:"disabled",defaultPrivacy:Xt.INTERNAL,p2p:"disabled",federation:"disabled",keepOriginalVideo:"enabled",allowReplaceFile:"enabled",preferDisplayName:"enabled",defaultCommentPolicy:void 0,authType:void 0,transcription:void 0});return c.compute(),c;}static initForInstitution(){let c=new r({registration:"closed",remoteImport:"enabled",live:"enabled",videoQuota:-1,globalSearch:"disabled",defaultPrivacy:Xt.PUBLIC,p2p:"disabled",keepOriginalVideo:"enabled",allowReplaceFile:"enabled",preferDisplayName:"enabled",authType:"local",transcription:"enabled",defaultCommentPolicy:Qh.REQUIRES_APPROVAL,federation:void 0});return c.compute(),c;}compute(){this.unsafeExplanations=[],this.plugins=[],this.config={},this.computeRegistration(),this.computeDefaultVideoPrivacy(),this.computeVideoQuota(),this.computeKeepOriginalVideo(),this.computeReplaceVideoFile(),this.computeVideoImport(),this.computeStreamLives(),this.computeP2P(),this.computeGlobalSearch(),this.computeDefaultVideoCommentPolicy(),this.computeFederation(),this.computeMiniatureSettings(),this.computeTranscription(),this.computeAuth();}getUnsafeExplanations(){return[...this.unsafeExplanations];}getConfig(){return D({},this.config);}getPlugins(){return[...this.plugins];}patch(c){for(let[t,o]of Object.entries(c))this[t]=o;this.compute();}computeRegistration(){R_e(this.registration)&&(this.registration==="open"?(this.addExplanation("<strong>Allow</strong> any user <strong>to register</strong>"),this.addConfig({signup:{enabled:true,requiresApproval:false}})):this.registration==="approval"?(this.addExplanation("Allow users to <strong>apply for registration</strong> on your platform"),this.addConfig({signup:{enabled:true,requiresApproval:true}})):this.registration==="closed"&&(this.addExplanation("<strong>Disable</strong> user <strong>registration</strong>"),this.addConfig({signup:{enabled:false}})),(this.registration==="approval"||this.registration==="open")&&(this.addExplanation("Require <strong>moderator approval</strong> for videos published by your community"),this.addConfig({autoBlacklist:{videos:{ofUsers:{enabled:true}}}})));}computeVideoQuota(){R_e(this.videoQuota)&&(this.addConfig({user:{videoQuota:this.videoQuota}}),this.videoQuota===0?this.addExplanation("<strong>Prevent</strong> new users <strong>from uploading videos</strong> (can be changed by moderators)"):this.videoQuota===-1?this.addExplanation("<strong>Not limit the amount of videos</strong> new users can upload"):this.addExplanation("Set <strong>video quota to "+txe(this.videoQuota,0)+"</strong> for new users (can be changed by moderators)"));}computeVideoImport(){R_e(this.remoteImport)&&(this.addConfig({import:{videos:{http:{enabled:this.remoteImport==="enabled"}},videoChannelSynchronization:{enabled:this.remoteImport==="enabled"}}}),this.remoteImport==="enabled"?this.addExplanation("<strong>Allow</strong> your users <strong>to import and synchronize</strong> videos from remote platforms (YouTube, Vimeo...)"):this.addExplanation("<strong>Prevent</strong> your users <strong>from importing videos</strong> from remote platforms"));}computeStreamLives(){R_e(this.live)&&(this.addConfig({live:{enabled:this.live==="enabled"}}),this.live==="enabled"?(this.plugins.push("peertube-plugin-livechat"),this.addExplanation("<strong>Allow</strong> your users <strong>to stream lives</strong> and chat with their viewers using the <strong>Livechat</strong> plugin")):this.addExplanation("<strong>Prevent</strong> your users from running <strong>live streams</strong>"));}computeDefaultVideoPrivacy(){R_e(this.defaultPrivacy)&&(this.addConfig({defaults:{publish:{privacy:this.defaultPrivacy}}}),this.defaultPrivacy===Xt.INTERNAL?this.addExplanation("Set the <strong>default video privacy</strong> to <strong>Internal</strong>"):this.defaultPrivacy===Xt.PUBLIC&&this.addExplanation("Set the <strong>default video privacy</strong> to <strong>Public</strong>"));}computeDefaultVideoCommentPolicy(){R_e(this.defaultCommentPolicy)&&(this.addConfig({defaults:{publish:{commentsPolicy:this.defaultCommentPolicy}}}),this.addExplanation("<strong>Require approval</strong> by default of new video comment"));}computeP2P(){R_e(this.p2p)&&(this.addConfig({defaults:{p2p:{embed:{enabled:this.p2p==="enabled"},webapp:{enabled:this.p2p==="enabled"}}}}),this.p2p==="enabled"?this.addExplanation("<strong>Enable P2P streaming</strong> by default for anonymous and new users"):this.addExplanation("<strong>Disable P2P streaming</strong> by default for anonymous and new users"));}computeFederation(){R_e(this.federation)&&(this.addConfig({followers:{instance:{enabled:this.federation==="enabled"},channels:{enabled:this.federation==="enabled"}}}),this.federation==="enabled"?this.addExplanation("<strong>Allow</strong> external platforms/users to <strong>subscribe</strong> to your content"):this.addExplanation("<strong>Prevent</strong> external platforms/users to <strong>subscribe to your content</strong>"));}computeKeepOriginalVideo(){R_e(this.keepOriginalVideo)&&(this.addConfig({transcoding:{originalFile:{keep:this.keepOriginalVideo==="enabled"}}}),this.keepOriginalVideo==="enabled"&&this.addExplanation("<strong>Save a copy</strong> of the uploaded video file"));}computeReplaceVideoFile(){R_e(this.allowReplaceFile)&&(this.addConfig({videoFile:{update:{enabled:this.allowReplaceFile==="enabled"}}}),this.allowReplaceFile==="enabled"&&this.addExplanation("<strong>Allow</strong> your users <strong>to replace a video</strong> that has already been published"));}computeMiniatureSettings(){R_e(this.preferDisplayName)&&this.addConfig({client:{videos:{miniature:{preferAuthorDisplayName:this.preferDisplayName==="enabled"}}}});}computeGlobalSearch(){R_e(this.globalSearch)&&(this.addConfig({search:{searchIndex:{enabled:this.globalSearch==="enabled",isDefaultSearch:this.globalSearch==="enabled",url:"https://sepiasearch.org"}}}),this.globalSearch==="enabled"&&this.addExplanation("Set <a href=\"https://sepiasearch.org\" target=\"_blank\">SepiaSearch</a> as <strong>default search engine</strong>"));}computeTranscription(){R_e(this.transcription)&&(this.addConfig({videoTranscription:{enabled:this.transcription==="enabled"}}),this.transcription==="enabled"&&this.addExplanation("<strong>Enable automatic transcription</strong> of videos to create subtitles and improve accessibility"));}computeAuth(){if(!R_e(this.authType))return;let c=" The plugin <strong>must be configured</strong> after the pre-configuration wizard confirmation.";this.authType==="ldap"?(this.addExplanation("Install the <strong>LDAP</strong> authentication plugin."+c),this.plugins.push("peertube-plugin-auth-ldap")):this.authType==="saml"?(this.addExplanation("Install the <strong>SAML 2.0</strong> authentication plugin."+c),this.plugins.push("peertube-plugin-auth-saml2")):this.authType==="oidc"&&(this.addExplanation("Install the <strong>OpenID Connect</strong> authentication plugin."+c),this.plugins.push("peertube-plugin-auth-openid-connect"));}addConfig(c){return this.config=HUe(this.config,c);}addExplanation(c){this.unsafeExplanations.push(c);}};var Pt=r=>({"platform-type-selected":r});function ht(r,c){if(r&1&&Pp(0,"my-community-based-config",35),r&2){let t=SV();H0("usageType",t.usageType[t.platformType]);}}function Rt(r,c){if(r&1&&Pp(0,"my-institutional-config",35),r&2){let t=SV();H0("usageType",t.usageType[t.platformType]);}}function yt(r,c){if(r&1&&Pp(0,"my-private-instance-config",35),r&2){let t=SV();H0("usageType",t.usageType[t.platformType]);}}var It=(()=>{class r{currentStep=qp.required({transform:e3});totalSteps=qp.required({transform:e3});back=_pe();next=_pe();hide=_pe();iconKey=Mt();iconInstitution=ft();platformType;usageType={community:ie.initForCommunity(),institution:ie.initForInstitution(),private:ie.initForPrivateInstance()};static ɵfac=function(o){return new(o||r)();};static ɵcmp=Pa({type:r,selectors:[["my-admin-config-wizard-form"]],inputs:{currentStep:[1,"currentStep"],totalSteps:[1,"totalSteps"]},outputs:{back:"back",next:"next",hide:"hide"},decls:58,vars:12,consts:()=>{let t;t="STEP "+"\uFFFD0\uFFFD"+"/"+"\uFFFD1\uFFFD"+"";let o;o="Usage type";let e;e="My platform is more like...";let a;a="Community-based";let d;d="Enable a community to publish content and interact together.";let p;p="Institutional";let A;A="To broadcast your videos. Recommended for public institutions, association and companies.";let E;E="\u062E\u0627\u0635";let x;x="Only certain people can access content. Recommended for families and closed communities.";let k;k="Back";let X;X="Preview configuration";let O;return O="Ignore for now",[t,o,e,a,d,p,A,E,x,k,X,O,[1,"root"],[1,"two-columns","mb-4"],["src","/client/assets/images/mascot/default.svg","alt","mascot",1,"mascot"],[1,"steps"],[1,"header-steps"],[1,"title"],[1,"text-content"],[1,"label"],[1,"two-columns","width-50"],[1,"platform-types",3,"ngClass"],[1,"ul-unstyle"],[1,"platform-type"],["type","radio","name","platformType","id","platformTypeCommunity","value","community",3,"ngModelChange","ngModel"],["for","platformTypeCommunity"],["iconName","users"],[1,"type-label"],[1,"type-description"],["type","radio","name","platformType","id","platformTypeInstitution","value","institution",3,"ngModelChange","ngModel"],["for","platformTypeInstitution"],[3,"unsafeHTML"],["type","radio","name","platformType","id","platformTypePrivate","value","private",3,"ngModelChange","ngModel"],["for","platformTypePrivate"],[1,"platform-config"],[3,"usageType"],[1,"buttons"],["icon","arrow-left","theme","secondary",3,"click"],["theme","primary",3,"click","disabled"],[1,"button-as-link",3,"click"]];},template:function(o,e){o&1&&(sp(0,"div",12)(1,"div",13)(2,"div"),Pp(3,"img",14),lb(),sp(4,"div")(5,"div",15)(6,"div",16),vV(7,0),lb()(),sp(8,"h4",17),vV(9,1),lb(),sp(10,"div",18),XV(11,"You can also edit your platform configuration at a later time"),lb()()(),sp(12,"div",19),vV(13,2),lb(),sp(14,"div",20)(15,"div",21)(16,"ul",22)(17,"li",23)(18,"input",24),Ox("ngModelChange",function(d){return t$(e.platformType,d)||(e.platformType=d),d;}),lb(),zH(),sp(19,"label",25)(20,"div"),Pp(21,"my-global-icon",26),lb(),sp(22,"div")(23,"div",27),vV(24,3),lb(),sp(25,"div",28),vV(26,4),lb()()()(),sp(27,"li",23)(28,"input",29),Ox("ngModelChange",function(d){return t$(e.platformType,d)||(e.platformType=d),d;}),lb(),zH(),sp(29,"label",30)(30,"div"),Pp(31,"my-custom-icon",31),lb(),sp(32,"div")(33,"div",27),vV(34,5),lb(),sp(35,"div",28),vV(36,6),lb()()()(),sp(37,"li",23)(38,"input",32),Ox("ngModelChange",function(d){return t$(e.platformType,d)||(e.platformType=d),d;}),lb(),zH(),sp(39,"label",33)(40,"div"),Pp(41,"my-custom-icon",31),lb(),sp(42,"div")(43,"div",27),vV(44,7),lb(),sp(45,"div",28),vV(46,8),lb()()()()()(),sp(47,"div",34),w2(48,ht,1,1,"my-community-based-config",35)(49,Rt,1,1,"my-institutional-config",35)(50,yt,1,1,"my-private-instance-config",35),lb()(),sp(51,"div",36)(52,"my-button",37),Fp("click",function(){return e.back.emit();}),vV(53,9),lb(),sp(54,"my-button",38),Fp("click",function(){return e.next.emit(e.usageType[e.platformType]);}),vV(55,10),lb(),sp(56,"button",39),Fp("click",function(){return e.hide.emit();}),vV(57,11),lb()()()),o&2&&(WB(7),cx(e.currentStep())(e.totalSteps()),EV(7),WB(8),H0("ngClass",d$(10,Pt,e.platformType)),WB(3),Mx("ngModel",e.platformType),qH(),WB(10),Mx("ngModel",e.platformType),qH(),WB(3),H0("unsafeHTML",e.iconInstitution),WB(7),Mx("ngModel",e.platformType),qH(),WB(3),H0("unsafeHTML",e.iconKey),WB(7),x2(e.platformType==="community"?48:e.platformType==="institution"?49:e.platformType==="private"?50:-1),WB(6),H0("disabled",!e.platformType));},dependencies:[cl,x3,Jn,Je,fn,qn,ln,Qn,Ke,Ae,it,Tr,ut,Ct,gt,pt],styles:[".mascot[_ngcontent-%COMP%]{margin-top:-90px;width:170px;height:190px}.two-columns.width-50[_ngcontent-%COMP%]{gap:0}.platform-types[_ngcontent-%COMP%]{display:flex}@media screen and (min-width:800px){.platform-types.platform-type-selected[_ngcontent-%COMP%] + div[_ngcontent-%COMP%]{border-inline-start:1px solid var(--bg-secondary-450)}.platform-types[_ngcontent-%COMP%] + div[_ngcontent-%COMP%]{padding-inline-start:calc(1.325rem + .9vw)}.platform-types[_ngcontent-%COMP%]{margin-inline-end:calc(1.325rem + .9vw)}}@media screen and (min-width:800px)and (min-width:1200px){.platform-types[_ngcontent-%COMP%] + div[_ngcontent-%COMP%]{padding-inline-start:2rem}}@media screen and (min-width:800px)and (min-width:1200px){.platform-types[_ngcontent-%COMP%]{margin-inline-end:2rem}}@media screen and (max-width:800px){.platform-types.platform-type-selected[_ngcontent-%COMP%] + div[_ngcontent-%COMP%]{border-block-start:1px solid var(--bg-secondary-450)}.platform-types[_ngcontent-%COMP%] + div[_ngcontent-%COMP%]{padding-top:calc(1.325rem + .9vw)}.platform-types[_ngcontent-%COMP%]{margin-bottom:calc(1.325rem + .9vw)}}@media screen and (max-width:800px)and (min-width:1200px){.platform-types[_ngcontent-%COMP%] + div[_ngcontent-%COMP%]{padding-top:2rem}}@media screen and (max-width:800px)and (min-width:1200px){.platform-types[_ngcontent-%COMP%]{margin-bottom:2rem}}.platform-types[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.platform-type[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;padding:1rem 1.5rem;gap:1rem;color:var(--fg-300);border-radius:8px;border:1px solid var(--bg-secondary-450);margin:0}.platform-type[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]   my-global-icon[_ngcontent-%COMP%], .platform-type[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]   my-custom-icon[_ngcontent-%COMP%]{color:var(--secondary-icon-color);display:inline-block;width:34px;height:34px;line-height:34px}.platform-type[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]:hover{background-color:var(--bg-secondary-300)}.platform-type[_ngcontent-%COMP%]   input[type=radio][_ngcontent-%COMP%]{display:none}.type-label[_ngcontent-%COMP%]{color:var(--fg-400);font-weight:700;font-size:1rem}.type-description[_ngcontent-%COMP%]{font-size:14px;font-weight:400}input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{border:2px solid var(--border-primary);margin:-1px;background-color:var(--bg)}input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]   my-global-icon[_ngcontent-%COMP%], input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]   my-custom-icon[_ngcontent-%COMP%]{color:var(--border-primary)}@media screen and (max-width:800px){.mascot[_ngcontent-%COMP%]{display:none}.two-columns[_ngcontent-%COMP%]{justify-content:center}.two-columns.width-50[_ngcontent-%COMP%]{flex-direction:column;align-items:center}.two-columns.width-50[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:100%!important}}",".steps[_ngcontent-%COMP%]{color:var(--fg-200);font-size:14px;font-weight:700}.title[_ngcontent-%COMP%]{color:var(--fg-350);font-weight:700;font-size:calc(1.3625rem + 1.35vw)}@media(min-width:1200px){.title[_ngcontent-%COMP%]{font-size:2.375rem}}.sub-title[_ngcontent-%COMP%]{color:var(--fg-300);font-weight:400;font-size:1.25rem}h4[_ngcontent-%COMP%]{margin-bottom:0}.text-content[_ngcontent-%COMP%]{color:var(--fg-200)}.buttons[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;margin-top:calc(1.375rem + 1.5vw)}@media(min-width:1200px){.buttons[_ngcontent-%COMP%]{margin-top:2.5rem}}.buttons[_ngcontent-%COMP%]{gap:calc(1.275rem + .3vw)}@media(min-width:1200px){.buttons[_ngcontent-%COMP%]{gap:1.5rem}}form[_ngcontent-%COMP%]{max-width:512px;width:100%}.two-columns[_ngcontent-%COMP%]{display:flex;gap:1rem}.two-columns.width-50[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:50%}.one-column[_ngcontent-%COMP%]{text-align:center}.one-column[_ngcontent-%COMP%]   .mascot-container[_ngcontent-%COMP%]{position:relative;height:110px;margin:0 auto}.one-column[_ngcontent-%COMP%]   .mascot-container[_ngcontent-%COMP%], .one-column[_ngcontent-%COMP%]   .mascot[_ngcontent-%COMP%]{width:170px}.one-column[_ngcontent-%COMP%]   .mascot[_ngcontent-%COMP%]{position:absolute;top:-100px;left:0;height:190px}h5[_ngcontent-%COMP%]{font-size:1rem;font-weight:700;color:var(--fg-300)}"],changeDetection:1});}return r;})();function vt(r,c){if(r&1&&Pp(0,"li",14),r&2){let t=c.$implicit;H0("innerHTML",t,iw);}}var Nt=(()=>{class r{adminConfig=g(Xe);pluginAPI=g(je);notifier=g(rc);html=g(yg);server=g($t$1);instanceLogo=g($i);currentStep=qp.required({transform:e3});totalSteps=qp.required({transform:e3});usageType=qp.required();instanceInfo=qp.required();dryRun=qp.required({transform:tl});back=_pe();next=_pe();hide=_pe();safeExplanations=[];plugins=[];config={};updating=false;ngOnChanges(){this.usageType()&&(this.safeExplanations=this.usageType().getUnsafeExplanations().map(t=>this.html.toSimpleSafeHtml(t)),this.config=HUe({instance:{name:this.instanceInfo().platformName,shortDescription:this.instanceInfo().shortDescription},theme:{customization:{primaryColor:this.instanceInfo().primaryColor}}},this.usageType().getConfig()),this.plugins=this.usageType().getPlugins());}confirm(){if(this.dryRun())return this.next.emit();this.updating=true,this.adminConfig.updateCustomConfig(this.config).pipe(Oe(()=>{let t=this.instanceInfo().avatar;return t?this.instanceLogo.updateAvatar(t):this.instanceLogo.deleteAvatar();}),Oe(()=>this.server.resetConfig()),Oe(()=>ge(this.plugins).pipe(Qn$1(t=>this.pluginAPI.install(t)),Vd()))).subscribe({next:()=>{this.updating=false,this.next.emit();},error:t=>{this.notifier.handleError(t),this.updating=false;}});}static ɵfac=function(o){return new(o||r)();};static ɵcmp=Pa({type:r,selectors:[["my-admin-config-wizard-preview"]],inputs:{currentStep:[1,"currentStep"],totalSteps:[1,"totalSteps"],usageType:[1,"usageType"],instanceInfo:[1,"instanceInfo"],dryRun:[1,"dryRun"]},outputs:{back:"back",next:"next",hide:"hide"},features:[u$([Xe,je,$i]),ti],decls:25,vars:4,consts:()=>{let t;t="STEP "+"\uFFFD0\uFFFD"+"/"+"\uFFFD1\uFFFD"+"";let o;o="Configuration preview";let e;e="If you confirm, PeerTube will:";let a;a=" If you want finer settings control, your platform configuration can be easily changed after the pre-configuration wizard! ";let d;d="Back";let p;p="Confirm this configuration";let A;return A="Ignore for now",[t,o,e,a,d,p,A,[1,"root"],[1,"two-columns"],["src","/client/assets/images/mascot/default.svg","alt","mascot",1,"mascot"],[1,"steps"],[1,"header-steps"],[1,"title"],[1,"text-content","mt-3"],[3,"innerHTML"],[1,"buttons"],["icon","arrow-left","theme","secondary",3,"click"],["theme","primary",3,"click","disabled","loading"],[1,"button-as-link",3,"click"]];},template:function(o,e){o&1&&(sp(0,"div",7)(1,"div",8)(2,"div"),Pp(3,"img",9),lb(),sp(4,"div")(5,"div",10)(6,"div",11),vV(7,0),lb()(),sp(8,"h4",12),vV(9,1),lb(),sp(10,"div",13)(11,"p"),vV(12,2),lb(),sp(13,"ul"),N2(14,vt,1,1,"li",14,R2),lb(),sp(16,"p"),vV(17,3),lb()()()(),sp(18,"div",15)(19,"my-button",16),Fp("click",function(){return e.back.emit();}),vV(20,4),lb(),sp(21,"my-button",17),Fp("click",function(){return e.confirm();}),vV(22,5),lb(),sp(23,"button",18),Fp("click",function(){return e.hide.emit();}),vV(24,6),lb()()()),o&2&&(WB(7),cx(e.currentStep())(e.totalSteps()),EV(7),WB(7),M2(e.safeExplanations),WB(7),H0("disabled",e.updating)("loading",e.updating));},dependencies:[Jn,Qn,Ke,Ae,it],styles:[".steps[_ngcontent-%COMP%]{color:var(--fg-200);font-size:14px;font-weight:700}.title[_ngcontent-%COMP%]{color:var(--fg-350);font-weight:700;font-size:calc(1.3625rem + 1.35vw)}@media(min-width:1200px){.title[_ngcontent-%COMP%]{font-size:2.375rem}}.sub-title[_ngcontent-%COMP%]{color:var(--fg-300);font-weight:400;font-size:1.25rem}h4[_ngcontent-%COMP%]{margin-bottom:0}.text-content[_ngcontent-%COMP%]{color:var(--fg-200)}.buttons[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;margin-top:calc(1.375rem + 1.5vw)}@media(min-width:1200px){.buttons[_ngcontent-%COMP%]{margin-top:2.5rem}}.buttons[_ngcontent-%COMP%]{gap:calc(1.275rem + .3vw)}@media(min-width:1200px){.buttons[_ngcontent-%COMP%]{gap:1.5rem}}form[_ngcontent-%COMP%]{max-width:512px;width:100%}.two-columns[_ngcontent-%COMP%]{display:flex;gap:1rem}.two-columns.width-50[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:50%}.one-column[_ngcontent-%COMP%]{text-align:center}.one-column[_ngcontent-%COMP%]   .mascot-container[_ngcontent-%COMP%]{position:relative;height:110px;margin:0 auto}.one-column[_ngcontent-%COMP%]   .mascot-container[_ngcontent-%COMP%], .one-column[_ngcontent-%COMP%]   .mascot[_ngcontent-%COMP%]{width:170px}.one-column[_ngcontent-%COMP%]   .mascot[_ngcontent-%COMP%]{position:absolute;top:-100px;left:0;height:190px}h5[_ngcontent-%COMP%]{font-size:1rem;font-weight:700;color:var(--fg-300)}"],changeDetection:1});}return r;})();var At=(()=>{class r{back=_pe();next=_pe();hide=_pe();static ɵfac=function(o){return new(o||r)();};static ɵcmp=Pa({type:r,selectors:[["my-admin-config-wizard-welcome"]],outputs:{back:"back",next:"next",hide:"hide"},decls:18,vars:0,consts:()=>{let t;t="Welcome to PeerTube";let o;o="dear administrator!";let e;e="Sepia, the cuttlefish, has a few questions to help you "+"\uFFFD#10\uFFFD"+"quickly pre-configure your platform"+"\uFFFD/#10\uFFFD"+".";let a;a="\u0647\u064A\u0627 \u0628\u0646\u0627!";let d;d="\u0630\u0643\u0631\u0646\u064A \u0644\u0627\u062D\u0642\u0627";let p;return p="Do not display again",[t,o,e,a,d,p,[1,"root","one-column"],[1,"mascot-container"],["src","/client/assets/images/mascot/happy.svg","alt","mascot",1,"mascot"],[1,"title"],[1,"sub-title"],[1,"text-content","mt-3"],[1,"buttons"],["theme","primary",3,"click"],["theme","secondary",3,"click"],[1,"button-as-link",3,"click"]];},template:function(o,e){o&1&&(sp(0,"div",6)(1,"div",7),Pp(2,"img",8),lb(),sp(3,"h4")(4,"div",9),vV(5,0),lb(),sp(6,"div",10),vV(7,1),lb()(),sp(8,"div",11),sx(9,2),Pp(10,"strong"),ax(),lb(),sp(11,"div",12)(12,"my-button",13),Fp("click",function(){return e.next.emit();}),vV(13,3),lb(),sp(14,"my-button",14),Fp("click",function(){return e.hide.emit({doNotOpenAgain:false});}),vV(15,4),lb(),sp(16,"button",15),Fp("click",function(){return e.hide.emit({doNotOpenAgain:true});}),vV(17,5),lb()()());},dependencies:[Jn,Qn,Ae,it],styles:[".steps[_ngcontent-%COMP%]{color:var(--fg-200);font-size:14px;font-weight:700}.title[_ngcontent-%COMP%]{color:var(--fg-350);font-weight:700;font-size:calc(1.3625rem + 1.35vw)}@media(min-width:1200px){.title[_ngcontent-%COMP%]{font-size:2.375rem}}.sub-title[_ngcontent-%COMP%]{color:var(--fg-300);font-weight:400;font-size:1.25rem}h4[_ngcontent-%COMP%]{margin-bottom:0}.text-content[_ngcontent-%COMP%]{color:var(--fg-200)}.buttons[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;margin-top:calc(1.375rem + 1.5vw)}@media(min-width:1200px){.buttons[_ngcontent-%COMP%]{margin-top:2.5rem}}.buttons[_ngcontent-%COMP%]{gap:calc(1.275rem + .3vw)}@media(min-width:1200px){.buttons[_ngcontent-%COMP%]{gap:1.5rem}}form[_ngcontent-%COMP%]{max-width:512px;width:100%}.two-columns[_ngcontent-%COMP%]{display:flex;gap:1rem}.two-columns.width-50[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:50%}.one-column[_ngcontent-%COMP%]{text-align:center}.one-column[_ngcontent-%COMP%]   .mascot-container[_ngcontent-%COMP%]{position:relative;height:110px;margin:0 auto}.one-column[_ngcontent-%COMP%]   .mascot-container[_ngcontent-%COMP%], .one-column[_ngcontent-%COMP%]   .mascot[_ngcontent-%COMP%]{width:170px}.one-column[_ngcontent-%COMP%]   .mascot[_ngcontent-%COMP%]{position:absolute;top:-100px;left:0;height:190px}h5[_ngcontent-%COMP%]{font-size:1rem;font-weight:700;color:var(--fg-300)}"],changeDetection:1});}return r;})();var bt=["modal"],Gt=["stepper"];function $t(r,c){if(r&1){let t=F2();sp(0,"cdk-step",3)(1,"my-admin-config-wizard-welcome",11),Fp("back",function(){GI(t),SV();let e=CV(2);return zI(e.previous());})("next",function(){GI(t),SV();let e=CV(2);return zI(e.next());})("hide",function(e){GI(t);let a=SV(2);return zI(a.hide(e));}),lb()();}}function Lt(r,c){if(r&1){let t=F2();sp(0,"cdk-step",10)(1,"my-admin-config-wizard-documentation",12),Fp("hide",function(){GI(t);let e=SV(2);return zI(e.hide({doNotOpenAgain:true}));}),lb()();}}function wt(r,c){if(r&1){let t=F2();sp(0,"div",2)(1,"my-common-stepper",null,1),w2(3,$t,2,0,"cdk-step",3),sp(4,"cdk-step",4)(5,"my-admin-config-wizard-edit-info",5),Fp("back",function(){GI(t);let e=CV(2);return zI(e.previous());})("next",function(e){GI(t);let a=CV(2),d=SV();return d.instanceInfo=e,zI(a.next());})("hide",function(){GI(t);let e=SV();return zI(e.hide());}),lb()(),sp(6,"cdk-step",6)(7,"my-admin-config-wizard-form",7),Fp("back",function(){GI(t);let e=CV(2);return zI(e.previous());})("next",function(e){GI(t);let a=CV(2),d=SV();return d.usageType=e,zI(a.next());})("hide",function(){GI(t);let e=SV();return zI(e.hide());}),lb()(),sp(8,"cdk-step",8)(9,"my-admin-config-wizard-preview",9),Fp("back",function(){GI(t);let e=CV(2);return zI(e.previous());})("next",function(){GI(t);let e=CV(2),a=SV();return zI(a.showWelcome?e.next():a.hide());})("hide",function(){GI(t);let e=SV();return zI(e.hide());}),lb()(),w2(10,Lt,2,0,"cdk-step",10),lb()();}if(r&2){let t=SV();WB(3),x2(t.showWelcome?3:-1),WB(2),H0("currentStep",t.currentStep())("showBack",t.showWelcome),WB(2),H0("currentStep",t.currentStep()),WB(2),H0("usageType",t.usageType)("instanceInfo",t.instanceInfo)("dryRun",t.dryRun)("currentStep",t.currentStep()),WB(),x2(t.showWelcome?10:-1);}}var Bo=(()=>{class r{modalService=g(rr);userService=g(Pc);notifier=g(rc);modal=xpe("modal");stepper=xpe("stepper");created=_pe();usageType;instanceInfo;showWelcome;dryRun;modalRef;ngOnInit(){this.created.emit();}shouldAutoOpen(t){return this.modalService.hasOpenModals()?false:this.getFragment()==="#admin-welcome-wizard"||this.getFragment()==="#admin-welcome-wizard-test"?true:!(t.noWelcomeModal===true||Bn.getItem(Ee())==="true");}show({showWelcome:t}){this.showWelcome=t,this.dryRun=this.getFragment()==="#admin-welcome-wizard-test",this.modalRef=this.modalService.open(this.modal(),{centered:true,backdrop:"static",keyboard:false,size:"lg"});}currentStep(){if(!this.stepper())return 0;let t=this.stepper().selectedIndex;return this.showWelcome?t:t+1;}totalSteps(){if(!this.stepper())return 0;let t=this.stepper().steps.length;return this.showWelcome?t-1:t;}hide(t={}){let{doNotOpenAgain:o=false}=t;o&&this.doNotOpenAgain(),this.modalRef.close();}doNotOpenAgain(){Bn.setItem(Ee(),"true"),this.userService.updateMyProfile({noWelcomeModal:true}).subscribe({next:()=>j.info("We will not open the welcome modal again."),error:t=>this.notifier.handleError(t)});}getFragment(){return window.location.hash;}static ɵfac=function(o){return new(o||r)();};static ɵcmp=Pa({type:r,selectors:[["my-admin-config-wizard-modal"]],viewQuery:function(o,e){o&1&&px(e.modal,bt,5)(e.stepper,Gt,5),o&2&&IV(2);},outputs:{created:"created"},decls:2,vars:0,consts:()=>{let t;t="Welcome introduction";let o;o="Edit general information";let e;e="Usage type";let a;a="Configuration preview";let d;return d="Post configuration documentation",[["modal",""],["stepper",""],[1,"modal-body"],["label",t],["label",o],["totalSteps","3",3,"back","next","hide","currentStep","showBack"],["label",e],["totalSteps","3",3,"back","next","hide","currentStep"],["label",a],["totalSteps","3",3,"back","next","hide","usageType","instanceInfo","dryRun","currentStep"],["label",d],[3,"back","next","hide"],[3,"hide"]];},template:function(o,e){o&1&&w0(0,wt,11,9,"ng-template",null,0,I$);},dependencies:[Ae,ie$1,T,At,ct,It,Nt,dt],styles:[".modal-body[_ngcontent-%COMP%]{padding:2rem 3rem}"],changeDetection:1});}return r;})();/**i18n:c8855ca17fb20171aa9dd43d012e42547cb1f0cfd9c21d4dc05679bbbdf5ccb8*/export{Bo as AdminConfigWizardModalComponent};//# sourceMappingURL=chunk-CzrJTaYY.js.map