import{a as _t,b as Te,e as D}from"./chunk-YV5OTGZG.js";import"./chunk-TUHMDTWM.js";import{a as lt,b as st,r as $,s as dt,t as ct,v as De,w as Ee,x as Fe}from"./chunk-KWVSCH2H.js";import{c as at}from"./chunk-ZY32XQLH.js";import{a as mt}from"./chunk-HY4QHXNE.js";import"./chunk-OPRQNONW.js";import"./chunk-DVYB3SDD.js";import"./chunk-N57YLHBF.js";import"./chunk-ADV7WH2N.js";import"./chunk-QSR2JW5H.js";import"./chunk-2HNNT2VT.js";import{h as ie}from"./chunk-KYFYXE3K.js";import"./chunk-XSS37KCJ.js";import"./chunk-BJVL6ZJ5.js";import{b as j}from"./chunk-MBQWFBKS.js";import{c as G}from"./chunk-VQCVCUXF.js";import"./chunk-PR244PNT.js";import{E as y,F as v,c as ue,g as b,h as U,o as He,p as V,r as Ke,w as Y,x as B}from"./chunk-7JTNILXC.js";import{u as tt}from"./chunk-CUOYDGDO.js";import{a as Ne}from"./chunk-TTJW756Y.js";import{Af as ge,Bb as H,Cb as K,D as $e,Da as s,Db as a,Dc as I,E as Le,Eb as J,Ec as P,Fb as ee,Fc as Oe,Gb as Ye,Hb as M,Jb as N,Jc as te,Jf as Me,Lh as ot,Mc as ce,Na as f,Nc as Z,Qe as et,Qh as it,R as ae,Rb as Be,Rh as rt,Sb as je,Ta as xe,Tb as z,Tg as Ce,Ua as ke,Ug as nt,Ve as h,Wc as pe,Yb as q,Zb as Ae,_c as Qe,ba as C,cc as le,dc as se,ec as de,fd as ne,ga as S,gb as w,ha as T,hb as W,j as Ge,jb as Xe,kb as Ue,kc as me,lb as Ve,mb as m,mc as _e,me as Je,nb as r,ob as o,pb as c,ra as we,sa as We,ua as ze,vh as fe,xc as qe,ye as oe,yf as Se,za as Ze,zb as Q}from"./chunk-NY4TI4KT.js";import{a as ve,e as be,i as u}from"./chunk-IQVXR75E.js";var Ot=be((no,Rt)=>{Rt.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 St=be((oo,yt)=>{yt.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>
`;});var ut=(()=>{let i=class i extends Te{};u(i,"\u0275fac",(()=>{let n;return function(e){return(n||(n=We(i)))(e||i);};})()),u(i,"\u0275cmp",f({type:i,selectors:[["my-admin-config-wizard-stepper"]],features:[me([{provide:Te,useExisting:i}]),xe],decls:2,vars:1,consts:[[3,"ngTemplateOutlet"]],template:function(t,e){t&1&&(r(0,"div"),c(1,"div",0),o()),t&2&&(s(),m("ngTemplateOutlet",e.selected?e.selected.content:null));},dependencies:[ne,Qe],encapsulation:2}));let _=i;return _;})();function Pe(){return"no_welcome_modal";}var gt=(()=>{let i=class i{hide=I();};u(i,"\u0275fac",function(t){return new(t||i)();}),u(i,"\u0275cmp",f({type:i,selectors:[["my-admin-config-wizard-documentation"]],outputs:{hide:"hide"},decls:55,vars:0,consts:()=>{let n;n="\u795D\u8D3A";let t;t="\u4F60\u7684\u5E73\u53F0\u5DF2\u7ECF\u914D\u7F6E\u597D\uFF01";let e;e="\u662F\u65F6\u5019\u6DFB\u52A0\u5173\u4E8E\u4F60\u5E73\u53F0\u7684\u4FE1\u606F\u4E86\uFF01"+"[\uFFFD#12\uFFFD|\uFFFD#13\uFFFD|\uFFFD#14\uFFFD|\uFFFD#15\uFFFD|\uFFFD#16\uFFFD]"+"\u8BBE\u7F6E\u63CF\u8FF0"+"[\uFFFD/#12\uFFFD|\uFFFD/#13\uFFFD|\uFFFD/#14\uFFFD|\uFFFD/#15\uFFFD|\uFFFD/#16\uFFFD]"+"\u3001\u8BF4\u6E05 "+"[\uFFFD#12\uFFFD|\uFFFD#13\uFFFD|\uFFFD#14\uFFFD|\uFFFD#15\uFFFD|\uFFFD#16\uFFFD]"+"\u4F60\u662F\u8C01"+"[\uFFFD/#12\uFFFD|\uFFFD/#13\uFFFD|\uFFFD/#14\uFFFD|\uFFFD/#15\uFFFD|\uFFFD/#16\uFFFD]"+"\u3001\u4F60\u4E3A\u4F55"+"[\uFFFD#12\uFFFD|\uFFFD#13\uFFFD|\uFFFD#14\uFFFD|\uFFFD#15\uFFFD|\uFFFD#16\uFFFD]"+"\u521B\u5EFA\u8FD9\u4E2A\u5E73\u53F0"+"[\uFFFD/#12\uFFFD|\uFFFD/#13\uFFFD|\uFFFD/#14\uFFFD|\uFFFD/#15\uFFFD|\uFFFD/#16\uFFFD]"+"\u4EE5\u53CA"+"[\uFFFD#12\uFFFD|\uFFFD#13\uFFFD|\uFFFD#14\uFFFD|\uFFFD#15\uFFFD|\uFFFD#16\uFFFD]"+"\u4F60\u6253\u7B97"+"[\uFFFD/#12\uFFFD|\uFFFD/#13\uFFFD|\uFFFD/#14\uFFFD|\uFFFD/#15\uFFFD|\uFFFD/#16\uFFFD]"+"\u7EF4\u62A4\u8FD9\u4E2A\u5E73\u53F0 "+"[\uFFFD#12\uFFFD|\uFFFD#13\uFFFD|\uFFFD#14\uFFFD|\uFFFD#15\uFFFD|\uFFFD#16\uFFFD]"+"\u591A\u4E45"+"[\uFFFD/#12\uFFFD|\uFFFD/#13\uFFFD|\uFFFD/#14\uFFFD|\uFFFD/#15\uFFFD|\uFFFD/#16\uFFFD]"+"\u5BF9\u8BBF\u95EE\u8005\u7406\u89E3\u4ED6\u4EEC\u5728\u4EC0\u4E48\u7C7B\u578B\u7684\u7F51\u7AD9\u4E0A\u975E\u5E38\u91CD\u8981\u3002 ",e=Ye(e);let l;l="\u5B9E\u7528\u94FE\u63A5";let p;p="PeerTube \u5B98\u7F51\uFF1A";let g;g="\u535A\u5BA2\u6587\u7AE0\u3001\u83B7\u53D6\u5E2E\u52A9\u6216\u63A2\u7D22 PeerTube";let A;A="PeerTube \u516C\u5171\u7D22\u5F15\uFF1A";let E;E="\u5C06\u5E73\u53F0\u653E\u5728\u5B98\u65B9 PeerTube \u516C\u5171\u7D22\u5F15\u4E2D";let x;x="\u6587\u6863";let k;k="\u7BA1\u7406\u5458\uFF1A";let X;X="\u7BA1\u7406\u7528\u6237\u3001\u5173\u6CE8\u5176\u4ED6\u5E73\u53F0\u3001\u5904\u7406\u5783\u573E\u4FE1\u606F\u53D1\u9001\u8005\u3001\u914D\u7F6E\u5BF9\u8C61\u5B58\u50A8\u6216\u8FDC\u7A0B\u8F6C\u7801\u2026";let O;O="\u8BBE\u7F6E\u4F60\u7684\u8D26\u6237\uFF0C\u7BA1\u7406\u89C6\u9891\u64AD\u653E\u5217\u8868\uFF0C\u641C\u7D22\u7B2C\u4E09\u65B9\u5E94\u7528\u7A0B\u5E8F\u2026\u2026";let R;R="CLI:";let he;he="\u4E0A\u4F20\u6216\u5BFC\u5165\u89C6\u9891\uFF0C\u89E3\u6790\u65E5\u5FD7\uFF0C\u5220\u9664\u5B58\u50A8\u76EE\u5F55\uFF0C\u91CD\u7F6E\u7528\u6237\u5BC6\u7801\u2026\u2026";let Re;Re="\u5173\u95ED";let ye;return ye="\u586B\u5199\u5E73\u53F0\u4FE1\u606F",[n,t,e,l,p,g,A,E,x,k,X,O,R,he,Re,ye,[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(t,e){t&1&&(r(0,"div",16)(1,"div",17)(2,"div",18),c(3,"img",19),o(),r(4,"h4")(5,"div",20),a(6,0),o(),r(7,"div",21),a(8,1),o()()(),r(9,"div",22)(10,"span",23),H(11,2),c(12,"strong")(13,"strong")(14,"strong")(15,"strong")(16,"strong"),K(),o()(),r(17,"div",22)(18,"h5"),a(19,3),o(),r(20,"ul",23)(21,"li")(22,"a",24),a(23,4),o(),r(24,"span"),a(25,5),o()(),r(26,"li")(27,"a",25),a(28,6),o(),r(29,"span"),a(30,7),o()()()(),r(31,"div",22)(32,"h5"),a(33,8),o(),r(34,"ul",23)(35,"li")(36,"a",26),a(37,9),o(),r(38,"span"),a(39,10),o()(),r(40,"li")(41,"a",27),q(42,"User:"),o(),r(43,"span"),a(44,11),o()(),r(45,"li")(46,"a",28),a(47,12),o(),r(48,"span"),a(49,13),o()()()(),r(50,"div",29)(51,"my-button",30),M("click",function(){return e.hide.emit();}),a(52,14),o(),r(53,"my-button",31),M("click",function(){return e.hide.emit();}),a(54,15),o()()());},dependencies:[G],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)}
/*# sourceMappingURL=admin-config-wizard-modal-common-QWVLRUK2.css.map */`]}));let _=i;return _;})();var Mt=_=>({"input-error":_});function Ft(_,i){if(_&1&&(r(0,"div",22),q(1),o()),_&2){let d=N();s(),Ae(d.formErrors.platformName);}}function Pt(_,i){if(_&1&&(r(0,"div",22),q(1),o()),_&2){let d=N();s(),Ae(d.formErrors.shortDescription);}}function ht(_,i){if(_&1){let d=Q();r(0,"my-button",34),M("click",function(){S(d);let t=N();return T(t.back.emit());}),a(1,10),o();}}var Ct=(()=>{let i=class i{server=C(fe);formReactiveService=C(j);themeService=C(rt);currentStep=P.required({transform:Z});totalSteps=P.required({transform:Z});showBack=P.required({transform:ce});back=I();next=I();hide=I();form;formErrors={};validationMessages={};ngOnInit(){this.buildForm();let n=et(this.server.getHTMLConfig().instance.avatars,128);n&&fetch(n.fileUrl).then(t=>t.blob()).then(t=>this.form.patchValue({avatar:t})).catch(()=>{ge.error("Could not fetch instance avatar");});}get avatarFileConstraints(){return this.server.getHTMLConfig().avatar.file;}buildForm(){let n={platformName:lt,shortDescription:st,avatar:null,primaryColor:at},{form:t,formErrors:e,validationMessages:l}=this.formReactiveService.buildForm(n,this.getDefaultValues());this.form=t,this.formErrors=e,this.validationMessages=l;}getDefaultValues(){let n=this.server.getHTMLConfig(),t=n.theme.customization.primaryColor,e=t?this.themeService.formatColorForForm(t):this.themeService.formatColorForForm(this.themeService.getCSSConfigValue("primaryColor"));return{platformName:n.instance.name,shortDescription:n.instance.shortDescription,avatar:void 0,primaryColor:e};}};u(i,"\u0275fac",function(t){return new(t||i)();}),u(i,"\u0275cmp",f({type:i,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 n;n="\u6B65\u9AA4 "+"\uFFFD0\uFFFD"+"/"+"\uFFFD1\uFFFD"+"";let t;t="\u5E38\u89C4\u4FE1\u606F";let e;e="\u4F60\u53EF\u4EE5\u7A0D\u540E\u7F16\u8F91\u6B64\u4FE1\u606F";let l;l="\u5E73\u53F0\u540D";let p;p="\u7B80\u77ED\u63CF\u8FF0";let g;g="\u5E73\u53F0\u56FE\u6807";let A;A="\u5728\u7F51\u7AD9\u3001\u79FB\u52A8\u5E94\u7528\u548C\u793E\u4EA4\u5A92\u4F53\u7B49\u591A\u4E2A\u5730\u65B9\u4F7F\u7528";let E;E="\u4E3B\u8272";let x;x="\u4E0B\u4E00\u6B65";let k;k="\u6682\u65F6\u5FFD\u7565";let X;return X="\u8FD4\u56DE",[n,t,e,l,p,g,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(t,e){t&1&&(r(0,"div",11)(1,"div",12)(2,"div"),c(3,"img",13),o(),r(4,"div")(5,"div",14)(6,"div",15),a(7,0),o()(),r(8,"h4",16),a(9,1),o(),r(10,"div",17),a(11,2),o(),r(12,"form",18)(13,"div",19)(14,"label",20),a(15,3),o(),c(16,"input",21),w(17,Ft,2,1,"div",22),o(),r(18,"div",19)(19,"label",23),a(20,4),o(),c(21,"textarea",24),w(22,Pt,2,1,"div",22),o(),r(23,"div",19)(24,"label",25),a(25,5),o(),r(26,"div",26),a(27,6),o(),c(28,"my-image-input",27),o(),r(29,"div",19)(30,"label",28),a(31,7),o(),c(32,"my-peertube-color-picker",29),o(),r(33,"div",30),w(34,ht,2,0,"my-button",31),r(35,"my-button",32),M("click",function(){return e.next.emit(e.form.value);}),a(36,8),o(),r(37,"button",33),M("click",function(){return e.hide.emit();}),a(38,9),o()()()()()()),t&2&&(s(7),J(e.currentStep())(e.totalSteps()),ee(7),s(5),m("formGroup",e.form),s(4),m("ngClass",_e(11,Mt,e.formErrors.platformName)),s(),W(e.formErrors.platformName?17:-1),s(4),m("ngClass",_e(13,Mt,e.formErrors.shortDescription)),s(),W(e.formErrors.shortDescription?22:-1),s(6),m("fileConstraints",e.avatarFileConstraints),s(4),m("formError",e.formErrors.primaryColor),s(2),W(e.showBack()?34:-1),s(),m("disabled",!e.form.valid));},dependencies:[ne,pe,y,V,ue,b,U,v,B,Y,dt,D,G,mt],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}
/*# sourceMappingURL=admin-config-wizard-edit-info.component-M7DIOZPB.css.map */`,`.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)}
/*# sourceMappingURL=admin-config-wizard-modal-common-QWVLRUK2.css.map */`]}));let _=i;return _;})();var ft=(()=>{let i=class i{el=C(ze);unsafeHTML=P.required();ngOnInit(){let n=this.el.nativeElement;n.innerHTML=this.unsafeHTML(),n.ariaHidden="true";}};u(i,"\u0275fac",function(t){return new(t||i)();}),u(i,"\u0275cmp",f({type:i,selectors:[["my-custom-icon"]],inputs:{unsafeHTML:[1,"unsafeHTML"]},decls:0,vars:0,template:function(t,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}
/*# sourceMappingURL=common-icon.component-XANAO2SC.css.map */`],changeDetection:0}));let _=i;return _;})();var Nt=(()=>{let i=class i{formReactiveService=C(j);usageType=te.required();form;formErrors={};validationMessages={};registrationOptions=[{id:"open",label:"\u6253\u5F00",description:"\u4EFB\u4F55\u4EBA\u5747\u53EF\u6CE8\u518C\u5E76\u4F7F\u7528\u5E73\u53F0"},{id:"approval",label:"\u9700\u8981\u6279\u51C6",description:"\u4EFB\u4F55\u4EBA\u5747\u53EF\u6CE8\u518C\u8D26\u6237\uFF0C\u4F46\u5728\u53EF\u4EE5\u4F7F\u7528\u5E73\u53F0\u524D\u9700\u8981 \u5BA1\u6838\u8005 \u6279\u51C6\u8D26\u6237"},{id:"closed",label:"\u5173\u95ED",description:"\u4EC5\u7BA1\u7406\u5458\u53EF\u5728\u8BE5\u5E73\u53F0\u4E0A\u521B\u5EFA\u7528\u6237"}];importOptions=[{id:"enabled",label:"\u5DF2\u542F\u7528",description:"Your community can import videos from remote platforms (YouTube, Vimeo...) and automatically synchronize remote channels"},{id:"disabled",label:"\u5DF2\u7981\u7528",description:"\u793E\u533A\u4E0D\u80FD\u5BFC\u5165\u6216\u540C\u6B65\u6765\u81EA\u8FDC\u7A0B\u5E73\u53F0\u7684\u5185\u5BB9"}];liveOptions=[{id:"enabled",label:"\u662F",description:"\u4F60\u7684\u793E\u533A\u53EF\u4EE5\u5728\u5E73\u53F0\u4E0A\u76F4\u64AD\uFF08\u9700\u8981\u989D\u5916\u7684\u76D1\u7BA1\u5DE5\u4F5C\uFF09"},{id:"disabled",label:"\u5426",description:"\u4E0D\u5141\u8BB8\u4F60\u7684\u793E\u533A\u5728\u5E73\u53F0\u4E0A\u76F4\u64AD"}];globalSearchOptions=[{id:"enabled",label:"\u542F\u7528\u5168\u5C40\u641C\u7D22",description:"\u5C06 https://sepiasearch.org \u7528\u4F5C\u5728\u6240\u6709\u5DF2\u77E5\u7684 PeerTube \u5E73\u53F0\u641C\u7D22\u5185\u5BB9\u7684\u641C\u7D22\u5F15\u64CE"},{id:"disabled",label:"\u505C\u7528\u5168\u5C40\u641C\u7D22",description:"\u4F7F\u7528\u53EA\u5C55\u793A\u672C\u5730\u5185\u5BB9\u7684\u5E73\u53F0\u641C\u7D22\u5F15\u64CE"}];videoQuotaOptions=ct();ngOnInit(){this.buildForm(),this.form.valueChanges.subscribe(n=>{this.usageType().patch(n);});}buildForm(){let n={registration:null,remoteImport:null,videoQuota:null,live:null,globalSearch:null},{form:t,formErrors:e,validationMessages:l}=this.formReactiveService.buildForm(n,this.usageType());this.form=t,this.formErrors=e,this.validationMessages=l;}};u(i,"\u0275fac",function(t){return new(t||i)();}),u(i,"\u0275cmp",f({type:i,selectors:[["my-community-based-config"]],inputs:{usageType:[1,"usageType"]},outputs:{usageType:"usageTypeChange"},decls:21,vars:6,consts:()=>{let n;n="\u6CE8\u518C\u653F\u7B56";let t;t="\u65B0\u7528\u6237\u89C6\u9891\u914D\u989D";let e;e="\u89C6\u9891\u5BFC\u5165\u548C\u540C\u6B65";let l;l="\u6211\u7684\u793E\u533A\u53EF\u4EE5\u4E32\u6D41\u76F4\u64AD";let p;return p="\u641C\u7D22",[n,t,e,l,p,[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(t,e){t&1&&(r(0,"form",5)(1,"div",6)(2,"label",7),a(3,0),o(),c(4,"my-select-options",8),o(),r(5,"div",6)(6,"label",7),a(7,1),o(),c(8,"my-select-options",9),o(),r(9,"div",6)(10,"label",10),a(11,2),o(),c(12,"my-select-options",11),o(),r(13,"div",6)(14,"label",7),a(15,3),o(),c(16,"my-select-options",12),o(),r(17,"div",6)(18,"label",7),a(19,4),o(),c(20,"my-select-options",13),o()()),t&2&&(m("formGroup",e.form),s(4),m("items",e.registrationOptions),s(4),m("items",e.videoQuotaOptions),s(4),m("items",e.importOptions),s(4),m("items",e.liveOptions),s(4),m("items",e.globalSearchOptions));},dependencies:[y,V,b,U,v,B,Y,$,D,ie],encapsulation:2}));let _=i;return _;})();var It=(()=>{let i=class i{formReactiveService=C(j);usageType=te.required();form;formErrors={};validationMessages={};p2pOptions=[{id:"enabled",label:"\u5DF2\u542F\u7528",description:"\u5BF9\u533F\u540D\u7528\u6237\u548C\u65B0\u7528\u6237\u9ED8\u8BA4\u5F00\u542F P2P \u4E32\u6D41"},{id:"disabled",label:"\u5DF2\u7981\u7528",description:"\u505C\u7528 P2P \u4E32\u6D41"}];transcriptionOptions=[{id:"enabled",label:"\u5DF2\u542F\u7528",description:"\u5F00\u542F\u89C6\u9891\u81EA\u52A8\u6587\u5B57\u8BB0\u5F55\u4EE5\u81EA\u52A8\u751F\u6210\u5B57\u5E55"},{id:"disabled",label:"\u5DF2\u7981\u7528",description:"\u505C\u7528\u89C6\u9891\u81EA\u52A8\u6587\u5B57\u8BB0\u5F55"}];keepOriginalVideoOptions=[{id:"enabled",label:"\u662F",description:"\u5728\u670D\u52A1\u5668\u4E0A\u4FDD\u7559\u539F\u59CB\u89C6\u9891\u6587\u4EF6"},{id:"disabled",label:"\u5426",description:"\u5904\u7406\u540E\u5220\u9664\u539F\u59CB\u89C6\u9891\u6587\u4EF6"}];authenticationOptions=[{id:"local",label:"\u5DF2\u7981\u7528",description:"\u5E73\u53F0\u5185\u90E8\u7BA1\u7406\u7528\u6237\u6CE8\u518C\u548C\u767B\u5F55"},{id:"ldap",label:"LDAP",description:"\u4F7F\u7528 LDAP \u8FDB\u884C\u7528\u6237\u8EAB\u4EFD\u8BA4\u8BC1"},{id:"oidc",label:"OIDC",description:"\u4F7F\u7528 OpenID Connect \u8FDB\u884C\u7528\u6237\u8EAB\u4EFD\u8BA4\u8BC1"},{id:"saml",label:"SAML",description:"\u4F7F\u7528 SAML 2.0 \u8FDB\u884C\u7528\u6237\u8EAB\u4EFD\u8BA4\u8BC1"}];ngOnInit(){this.buildForm(),this.form.valueChanges.subscribe(n=>{this.usageType().patch(n);});}buildForm(){let n={keepOriginalVideo:null,p2p:null,transcription:null,authType:null},{form:t,formErrors:e,validationMessages:l}=this.formReactiveService.buildForm(n,this.usageType());this.form=t,this.formErrors=e,this.validationMessages=l;}};u(i,"\u0275fac",function(t){return new(t||i)();}),u(i,"\u0275cmp",f({type:i,selectors:[["my-institutional-config"]],inputs:{usageType:[1,"usageType"]},outputs:{usageType:"usageTypeChange"},decls:21,vars:5,consts:()=>{let n;n="\u4FDD\u5B58\u5DF2\u4E0A\u4F20\u89C6\u9891\u7684\u526F\u672C";let t;t="\u5BF9\u7B49\u7F51\u7EDC";let e;e="\u6709\u52A9\u4E8E\u60A8\u7684\u5E73\u53F0\u5206\u53D1\u89C6\u9891\u5185\u5BB9\uFF0C\u4F46\u4F1A"+"\uFFFD#10\uFFFD"+"\u964D\u4F4E\u7528\u6237\u9690\u79C1"+"\uFFFD#11\uFFFD"+""+"\uFFFD/#11\uFFFD"+""+"\uFFFD/#10\uFFFD"+"\u3002 ";let l;l="\u89C6\u9891\u6587\u5B57\u8BB0\u5F55";let p;return p="\u8FDC\u7A0B\u8EAB\u4EFD\u8BA4\u8BC1",[n,t,e,l,p,[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(t,e){t&1&&(r(0,"form",5)(1,"div",6)(2,"label",7),a(3,0),o(),c(4,"my-select-options",8),o(),r(5,"div",6)(6,"label",9),a(7,1),o(),r(8,"div",10),H(9,2),r(10,"a",11),c(11,"my-global-icon",12),o(),K(),o(),c(12,"my-select-options",13),o(),r(13,"div",6)(14,"label",14),a(15,3),o(),c(16,"my-select-options",15),o(),r(17,"div",6)(18,"label",16),a(19,4),o(),c(20,"my-select-options",17),o()()),t&2&&(m("formGroup",e.form),s(4),m("items",e.keepOriginalVideoOptions),s(8),m("items",e.p2pOptions),s(4),m("items",e.transcriptionOptions),s(4),m("items",e.authenticationOptions));},dependencies:[y,V,b,U,v,B,Y,$,D,ie,Ne],encapsulation:2}));let _=i;return _;})();var At=(()=>{let i=class i{formReactiveService=C(j);usageType=te.required();form;formErrors={};validationMessages={};importOptions=[{id:"enabled",label:"\u5DF2\u542F\u7528",description:"\u7528\u6237\u53EF\u4EE5\u4ECE\u8FDC\u7A0B\u5E73\u53F0\uFF08Youtube\u3001Vimeo\u2026\uFF09\u5BFC\u5165\u89C6\u9891\u5E76\u81EA\u52A8\u540C\u6B65\u8FDC\u7A0B\u9891\u9053"},{id:"disabled",label:"\u5DF2\u7981\u7528",description:"\u505C\u7528\u89C6\u9891\u5BFC\u5165\u548C\u9891\u9053\u540C\u6B65"}];liveOptions=[{id:"enabled",label:"\u662F"},{id:"disabled",label:"\u5426"}];keepOriginalVideoOptions=[{id:"enabled",label:"\u662F",description:"\u5728\u670D\u52A1\u5668\u4E0A\u4FDD\u7559\u539F\u59CB\u89C6\u9891\u6587\u4EF6"},{id:"disabled",label:"\u5426",description:"\u5904\u7406\u540E\u5220\u9664\u539F\u59CB\u89C6\u9891\u6587\u4EF6"}];ngOnInit(){this.buildForm(),this.form.valueChanges.subscribe(n=>{this.usageType().patch(n);});}buildForm(){let n={remoteImport:null,live:null,keepOriginalVideo:null},{form:t,formErrors:e,validationMessages:l}=this.formReactiveService.buildForm(n,this.usageType());this.form=t,this.formErrors=e,this.validationMessages=l;}};u(i,"\u0275fac",function(t){return new(t||i)();}),u(i,"\u0275cmp",f({type:i,selectors:[["my-private-instance-config"]],inputs:{usageType:[1,"usageType"]},outputs:{usageType:"usageTypeChange"},decls:13,vars:4,consts:()=>{let n;n="\u89C6\u9891\u5BFC\u5165\u548C\u540C\u6B65";let t;t="\u7528\u6237\u53EF\u4EE5\u76F4\u64AD";let e;return e="\u4FDD\u5B58\u5DF2\u4E0A\u4F20\u89C6\u9891\u7684\u526F\u672C",[n,t,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(t,e){t&1&&(r(0,"form",3)(1,"div",4)(2,"label",5),a(3,0),o(),c(4,"my-select-options",6),o(),r(5,"div",4)(6,"label",7),a(7,1),o(),c(8,"my-select-options",8),o(),r(9,"div",4)(10,"label",9),a(11,2),o(),c(12,"my-select-options",10),o()()),t&2&&(m("formGroup",e.form),s(4),m("items",e.importOptions),s(4),m("items",e.liveOptions),s(4),m("items",e.keepOriginalVideoOptions));},dependencies:[y,V,b,U,v,B,Y,$,D,ie],encapsulation:2}));let _=i;return _;})();var re=class _{registration;videoQuota;remoteImport;live;globalSearch;defaultPrivacy;defaultCommentPolicy;p2p;federation;keepOriginalVideo;allowReplaceFile;preferDisplayName;transcription;authType;unsafeExplanations=[];config={};plugins=[];constructor(i){for(let[d,n]of Object.entries(i))this[d]=n;}static initForCommunity(){let i=new _({registration:"approval",remoteImport:"disabled",live:"enabled",videoQuota:5368709120,globalSearch:"enabled",defaultPrivacy:oe.PUBLIC,p2p:"enabled",federation:"enabled",keepOriginalVideo:"disabled",allowReplaceFile:"disabled",defaultCommentPolicy:void 0,authType:void 0,preferDisplayName:void 0,transcription:void 0});return i.compute(),i;}static initForPrivateInstance(){let i=new _({registration:"closed",remoteImport:"enabled",live:"enabled",videoQuota:-1,globalSearch:"disabled",defaultPrivacy:oe.INTERNAL,p2p:"disabled",federation:"disabled",keepOriginalVideo:"enabled",allowReplaceFile:"enabled",preferDisplayName:"enabled",defaultCommentPolicy:void 0,authType:void 0,transcription:void 0});return i.compute(),i;}static initForInstitution(){let i=new _({registration:"closed",remoteImport:"enabled",live:"enabled",videoQuota:-1,globalSearch:"disabled",defaultPrivacy:oe.PUBLIC,p2p:"disabled",keepOriginalVideo:"enabled",allowReplaceFile:"enabled",preferDisplayName:"enabled",authType:"local",transcription:"enabled",defaultCommentPolicy:Je.REQUIRES_APPROVAL,federation:void 0});return i.compute(),i;}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 ve({},this.config);}getPlugins(){return[...this.plugins];}patch(i){for(let[d,n]of Object.entries(i))this[d]=n;this.compute();}computeRegistration(){h(this.registration)&&(this.registration==="open"?(this.addExplanation("<strong>\u5141\u8BB8</strong>\u4EFB\u4F55\u7528\u6237 <strong>\u6CE8\u518C</strong>"),this.addConfig({signup:{enabled:!0,requiresApproval:!1}})):this.registration==="approval"?(this.addExplanation("\u5141\u8BB8\u7528\u6237 <strong>\u7533\u8BF7\u5728\u4F60\u7684\u5E73\u53F0\u4E0A</strong>\u6CE8\u518C"),this.addConfig({signup:{enabled:!0,requiresApproval:!0}})):this.registration==="closed"&&(this.addExplanation("<strong>\u7981\u6B62</strong>\u7528\u6237<strong>\u6CE8\u518C</strong>"),this.addConfig({signup:{enabled:!1}})),(this.registration==="approval"||this.registration==="open")&&(this.addExplanation("\u4F60\u7684\u793E\u533A\u53D1\u5E03\u7684\u89C6\u9891\u9700\u8981 <strong>\u5BA1\u6838\u8005 \u6279\u51C6</strong>"),this.addConfig({autoBlacklist:{videos:{ofUsers:{enabled:!0}}}})));}computeVideoQuota(){h(this.videoQuota)&&(this.addConfig({user:{videoQuota:this.videoQuota}}),this.videoQuota===0?this.addExplanation("<strong>\u963B\u6B62</strong> \u65B0\u7528\u6237 <strong>\u4E0A\u4F20\u89C6\u9891</strong> \uFF08 \u5BA1\u6838\u8005 \u53EF\u4EE5\u66F4\u6539\u8BBE\u7F6E\uFF09"):this.videoQuota===-1?this.addExplanation("<strong>\u4E0D\u9650\u5236</strong> \u65B0\u7528\u6237\u53EF\u4EE5\u4E0A\u4F20\u7684\u89C6\u9891\u6570"):this.addExplanation("\u5C06\u65B0\u7528\u6237\u7684 <strong>\u89C6\u9891\u914D\u989D\u8BBE\u4E3A "+nt(this.videoQuota,0)+"</strong>\uFF08\u5BA1\u6838\u8005 \u53EF\u4EE5\u66F4\u6539\u8BBE\u7F6E\uFF09"));}computeVideoImport(){h(this.remoteImport)&&(this.addConfig({import:{videos:{http:{enabled:this.remoteImport==="enabled"}},videoChannelSynchronization:{enabled:this.remoteImport==="enabled"}}}),this.remoteImport==="enabled"?this.addExplanation("<strong>\u5141\u8BB8</strong> \u7528\u6237 <strong>\u4ECE\u8FDC\u7A0B\u5E73\u53F0\uFF08YouTube, Vimeo...\uFF09</strong>\u5BFC\u5165\u5E76\u540C\u6B65\u89C6\u9891"):this.addExplanation("<strong>\u963B\u6B62</strong>\u7528\u6237<strong>\u4ECE\u8FDC\u7A0B\u5E73\u53F0</strong> \u5BFC\u5165\u89C6\u9891"));}computeStreamLives(){h(this.live)&&(this.addConfig({live:{enabled:this.live==="enabled"}}),this.live==="enabled"?(this.plugins.push("peertube-plugin-livechat"),this.addExplanation("<strong>\u5141\u8BB8</strong> \u7528\u6237 <strong>\u76F4\u64AD</strong> \u5E76\u4F7F\u7528 <strong>Livechat</strong> \u63D2\u4EF6\u548C\u89C2\u4F17\u804A\u5929")):this.addExplanation("<strong>\u963B\u6B62</strong> \u7528\u6237\u8FDB\u884C <strong>\u76F4\u64AD</strong>"));}computeDefaultVideoPrivacy(){h(this.defaultPrivacy)&&(this.addConfig({defaults:{publish:{privacy:this.defaultPrivacy}}}),this.defaultPrivacy===oe.INTERNAL?this.addExplanation("\u5C06<strong>\u89C6\u9891\u9ED8\u8BA4\u9690\u79C1\u7B49\u7EA7</strong> \u8BBE\u4E3A <strong>\u5185\u90E8</strong>"):this.defaultPrivacy===oe.PUBLIC&&this.addExplanation("\u5C06 <strong>\u89C6\u9891\u9ED8\u8BA4\u9690\u79C1\u7B49\u7EA7</strong> \u8BBE\u4E3A <strong>\u516C\u5F00</strong>"));}computeDefaultVideoCommentPolicy(){h(this.defaultCommentPolicy)&&(this.addConfig({defaults:{publish:{commentsPolicy:this.defaultCommentPolicy}}}),this.addExplanation("<strong>\u65B0\u7684\u89C6\u9891\u8BC4\u8BBA</strong> \u9ED8\u8BA4\u9700\u8981\u6279\u51C6"));}computeP2P(){h(this.p2p)&&(this.addConfig({defaults:{p2p:{embed:{enabled:this.p2p==="enabled"},webapp:{enabled:this.p2p==="enabled"}}}}),this.p2p==="enabled"?this.addExplanation("\u5BF9\u533F\u540D\u548C\u65B0\u7528\u6237<strong>\u9ED8\u8BA4\u5141\u8BB8 P2P \u4E32\u6D41</strong>"):this.addExplanation("\u5BF9\u533F\u540D\u548C\u65B0\u7528\u6237<strong>\u9ED8\u8BA4\u7981\u7528 P2P \u4E32\u6D41</strong>"));}computeFederation(){h(this.federation)&&(this.addConfig({followers:{instance:{enabled:this.federation==="enabled"},channels:{enabled:this.federation==="enabled"}}}),this.federation==="enabled"?this.addExplanation("<strong>\u5141\u8BB8</strong>\u5916\u90E8\u5E73\u53F0/\u7528\u6237\u8BA2\u9605 <strong>subscribe</strong>\u4F60\u7684\u5185\u5BB9"):this.addExplanation("<strong>\u963B\u6B62</strong> \u5916\u90E8\u5E73\u53F0/\u7528\u6237 <strong>\u8BA2\u9605\u4F60\u7684\u5185\u5BB9</strong>"));}computeKeepOriginalVideo(){h(this.keepOriginalVideo)&&(this.addConfig({transcoding:{originalFile:{keep:this.keepOriginalVideo==="enabled"}}}),this.keepOriginalVideo==="enabled"&&this.addExplanation("<strong>\u4FDD\u5B58</strong> \u5DF2\u4E0A\u4F20\u89C6\u9891\u6587\u4EF6\u7684\u526F\u672C"));}computeReplaceVideoFile(){h(this.allowReplaceFile)&&(this.addConfig({videoFile:{update:{enabled:this.allowReplaceFile==="enabled"}}}),this.allowReplaceFile==="enabled"&&this.addExplanation("<strong>\u5141\u8BB8</strong>\u7528\u6237 <strong>\u66FF\u6362</strong> \u5DF2\u53D1\u5E03\u7684\u89C6\u9891"));}computeMiniatureSettings(){h(this.preferDisplayName)&&this.addConfig({client:{videos:{miniature:{preferAuthorDisplayName:this.preferDisplayName==="enabled"}}}});}computeGlobalSearch(){h(this.globalSearch)&&(this.addConfig({search:{searchIndex:{enabled:this.globalSearch==="enabled",isDefaultSearch:this.globalSearch==="enabled",url:"https://sepiasearch.org"}}}),this.globalSearch==="enabled"&&this.addExplanation("\u5C06 <a href=\"https://sepiasearch.org\" target=\"_blank\">SepiaSearch</a> \u8BBE\u4E3A <strong>\u9ED8\u8BA4\u641C\u7D22\u5F15\u64CE</strong>"));}computeTranscription(){h(this.transcription)&&(this.addConfig({videoTranscription:{enabled:this.transcription==="enabled"}}),this.transcription==="enabled"&&this.addExplanation("<strong>\u542F\u7528\u81EA\u52A8\u7684\u89C6\u9891\u6587\u5B57\u8BB0\u5F55</strong> \u6765\u521B\u5EFA\u5B57\u5E55\u5E76\u6539\u8FDB\u65E0\u969C\u788D\u6027"));}computeAuth(){if(!h(this.authType))return;let i="\u5FC5\u987B\u5728\u786E\u8BA4\u9884\u914D\u7F6E\u5411\u5BFC\u540E <strong>\u624D\u80FD\u914D\u7F6E\u6B64\u63D2\u4EF6</strong>\u3002";this.authType==="ldap"?(this.addExplanation("\u5B89\u88C5 <strong>LDAP</strong> \u8EAB\u4EFD\u8BA4\u8BC1\u63D2\u4EF6\u3002"+i),this.plugins.push("peertube-plugin-auth-ldap")):this.authType==="saml"?(this.addExplanation("\u5B89\u88C5 <strong>SAML 2.0</strong> \u8EAB\u4EFD\u8BA4\u8BC1\u63D2\u4EF6\u3002"+i),this.plugins.push("peertube-plugin-auth-saml2")):this.authType==="oidc"&&(this.addExplanation("\u5B89\u88C5 <strong>OpenID Connect</strong>\u8EAB\u4EFD\u8BA4\u8BC1\u63D2\u4EF6\u3002"+i),this.plugins.push("peertube-plugin-auth-openid-connect"));}addConfig(i){return this.config=Me(this.config,i);}addExplanation(i){this.unsafeExplanations.push(i);}};var vt=_=>({"platform-type-selected":_});function bt(_,i){if(_&1&&c(0,"my-community-based-config",35),_&2){let d=N();m("usageType",d.usageType[d.platformType]);}}function Gt(_,i){if(_&1&&c(0,"my-institutional-config",35),_&2){let d=N();m("usageType",d.usageType[d.platformType]);}}function $t(_,i){if(_&1&&c(0,"my-private-instance-config",35),_&2){let d=N();m("usageType",d.usageType[d.platformType]);}}var Tt=(()=>{let i=class i{currentStep=P.required({transform:Z});totalSteps=P.required({transform:Z});back=I();next=I();hide=I();iconKey=Ot();iconInstitution=St();platformType;usageType={community:re.initForCommunity(),institution:re.initForInstitution(),private:re.initForPrivateInstance()};};u(i,"\u0275fac",function(t){return new(t||i)();}),u(i,"\u0275cmp",f({type:i,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 n;n="\u6B65\u9AA4 "+"\uFFFD0\uFFFD"+"/"+"\uFFFD1\uFFFD"+"";let t;t="\u4F7F\u7528\u7C7B\u578B";let e;e="\u6211\u7684\u5E73\u53F0\u66F4\u50CF\u2026";let l;l="\u57FA\u4E8E\u793E\u533A";let p;p="\u5141\u8BB8\u793E\u533A\u4E00\u9053\u53D1\u5E03\u5185\u5BB9\u5E76\u4E92\u52A8\u3002";let g;g="\u673A\u6784";let A;A="\u516C\u5F00\u64AD\u51FA\u89C6\u9891\u3002\u63A8\u8350\u516C\u5171\u673A\u6784\u3001\u534F\u4F1A\u548C\u4F01\u4E1A\u3002";let E;E="\u79C1\u4EAB";let x;x="\u4EC5\u7279\u5B9A\u4EBA\u7FA4\u53EF\u8BBF\u95EE\u5185\u5BB9\u3002\u63A8\u8350\u5BB6\u65CF\u548C\u4E0D\u516C\u5F00\u7684\u793E\u533A\u3002";let k;k="\u8FD4\u56DE";let X;X="\u9884\u89C8\u914D\u7F6E";let O;return O="\u6682\u65F6\u5FFD\u7565",[n,t,e,l,p,g,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(t,e){t&1&&(r(0,"div",12)(1,"div",13)(2,"div"),c(3,"img",14),o(),r(4,"div")(5,"div",15)(6,"div",16),a(7,0),o()(),r(8,"h4",17),a(9,1),o(),r(10,"div",18),q(11,"You can also edit your platform configuration at a later time"),o()()(),r(12,"div",19),a(13,2),o(),r(14,"div",20)(15,"div",21)(16,"ul",22)(17,"li",23)(18,"input",24),de("ngModelChange",function(p){return se(e.platformType,p)||(e.platformType=p),p;}),o(),r(19,"label",25)(20,"div"),c(21,"my-global-icon",26),o(),r(22,"div")(23,"div",27),a(24,3),o(),r(25,"div",28),a(26,4),o()()()(),r(27,"li",23)(28,"input",29),de("ngModelChange",function(p){return se(e.platformType,p)||(e.platformType=p),p;}),o(),r(29,"label",30)(30,"div"),c(31,"my-custom-icon",31),o(),r(32,"div")(33,"div",27),a(34,5),o(),r(35,"div",28),a(36,6),o()()()(),r(37,"li",23)(38,"input",32),de("ngModelChange",function(p){return se(e.platformType,p)||(e.platformType=p),p;}),o(),r(39,"label",33)(40,"div"),c(41,"my-custom-icon",31),o(),r(42,"div")(43,"div",27),a(44,7),o(),r(45,"div",28),a(46,8),o()()()()()(),r(47,"div",34),w(48,bt,1,1,"my-community-based-config",35)(49,Gt,1,1,"my-institutional-config",35)(50,$t,1,1,"my-private-instance-config",35),o()(),r(51,"div",36)(52,"my-button",37),M("click",function(){return e.back.emit();}),a(53,9),o(),r(54,"my-button",38),M("click",function(){return e.next.emit(e.usageType[e.platformType]);}),a(55,10),o(),r(56,"button",39),M("click",function(){return e.hide.emit();}),a(57,11),o()()()),t&2&&(s(7),J(e.currentStep())(e.totalSteps()),ee(7),s(8),m("ngClass",_e(10,vt,e.platformType)),s(3),le("ngModel",e.platformType),s(10),le("ngModel",e.platformType),s(3),m("unsafeHTML",e.iconInstitution),s(7),le("ngModel",e.platformType),s(3),m("unsafeHTML",e.iconKey),s(7),W(e.platformType==="community"?48:e.platformType==="institution"?49:e.platformType==="private"?50:-1),s(6),m("disabled",!e.platformType));},dependencies:[ne,pe,y,ue,Ke,b,He,v,$,D,G,Ne,Nt,At,It,ft],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}}
/*# sourceMappingURL=admin-config-wizard-form.component-L5IHLCBK.css.map */`,`.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)}
/*# sourceMappingURL=admin-config-wizard-modal-common-QWVLRUK2.css.map */`]}));let _=i;return _;})();function Lt(_,i){if(_&1&&c(0,"li",14),_&2){let d=i.$implicit;m("innerHTML",d,Ze);}}var Dt=(()=>{let i=class i{adminConfig=C(De);pluginAPI=C(Ee);notifier=C(Ce);html=C(ot);server=C(fe);instanceLogo=C(Fe);currentStep=P.required({transform:Z});totalSteps=P.required({transform:Z});usageType=P.required();instanceInfo=P.required();dryRun=P.required({transform:ce});back=I();next=I();hide=I();safeExplanations=[];plugins=[];config={};updating=!1;ngOnChanges(){this.usageType()&&(this.safeExplanations=this.usageType().getUnsafeExplanations().map(n=>this.html.toSimpleSafeHtml(n)),this.config=Me({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=!0,this.adminConfig.updateCustomConfig(this.config).pipe(ae(()=>{let n=this.instanceInfo().avatar;return n?this.instanceLogo.updateAvatar(n):this.instanceLogo.deleteAvatar();}),ae(()=>this.server.resetConfig()),ae(()=>Ge(this.plugins).pipe(Le(n=>this.pluginAPI.install(n)),$e()))).subscribe({next:()=>{this.updating=!1,this.next.emit();},error:n=>{this.notifier.handleError(n),this.updating=!1;}});}};u(i,"\u0275fac",function(t){return new(t||i)();}),u(i,"\u0275cmp",f({type:i,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:[me([De,Ee,Fe]),we],decls:25,vars:4,consts:()=>{let n;n="\u6B65\u9AA4 "+"\uFFFD0\uFFFD"+"/"+"\uFFFD1\uFFFD"+"";let t;t="\u914D\u7F6E\u9884\u89C8";let e;e="\u5982\u679C\u786E\u8BA4\uFF0CPeerTube \u4F1A\uFF1A";let l;l="\u5982\u679C\u60F3\u8981\u66F4\u7CBE\u7EC6\u7684\u8BBE\u7F6E\u63A7\u5236\uFF0C\u53EF\u4EE5\u5728\u9884\u914D\u7F6E\u5411\u5BFC\u540E\u8F7B\u677E\u66F4\u6539\u5E73\u53F0\u914D\u7F6E\uFF01";let p;p="\u8FD4\u56DE";let g;g="\u786E\u8BA4\u6B64\u914D\u7F6E";let A;return A="\u6682\u65F6\u5FFD\u7565",[n,t,e,l,p,g,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(t,e){t&1&&(r(0,"div",7)(1,"div",8)(2,"div"),c(3,"img",9),o(),r(4,"div")(5,"div",10)(6,"div",11),a(7,0),o()(),r(8,"h4",12),a(9,1),o(),r(10,"div",13)(11,"p"),a(12,2),o(),r(13,"ul"),Ue(14,Lt,1,1,"li",14,Xe),o(),r(16,"p"),a(17,3),o()()()(),r(18,"div",15)(19,"my-button",16),M("click",function(){return e.back.emit();}),a(20,4),o(),r(21,"my-button",17),M("click",function(){return e.confirm();}),a(22,5),o(),r(23,"button",18),M("click",function(){return e.hide.emit();}),a(24,6),o()()()),t&2&&(s(7),J(e.currentStep())(e.totalSteps()),ee(7),s(7),Ve(e.safeExplanations),s(7),m("disabled",e.updating)("loading",e.updating));},dependencies:[y,v,$,D,G],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)}
/*# sourceMappingURL=admin-config-wizard-modal-common-QWVLRUK2.css.map */`]}));let _=i;return _;})();var Et=(()=>{let i=class i{back=I();next=I();hide=I();};u(i,"\u0275fac",function(t){return new(t||i)();}),u(i,"\u0275cmp",f({type:i,selectors:[["my-admin-config-wizard-welcome"]],outputs:{back:"back",next:"next",hide:"hide"},decls:18,vars:0,consts:()=>{let n;n="\u6B22\u8FCE\u6765\u5230 PeerTube";let t;t="\u4EB2\u7231\u7684\u7BA1\u7406\u5458\uFF01";let e;e="\u4E4C\u8D3C Sepia \u6709\u51E0\u4E2A\u95EE\u9898\u5E2E\u52A9\u4F60 "+"\uFFFD#10\uFFFD"+"\u5FEB\u901F\u9884\u914D\u7F6E\u4F60\u7684\u5E73\u53F0"+"\uFFFD/#10\uFFFD"+"\u3002";let l;l="\u5F00\u59CB\u5427\uFF01";let p;p="\u7A0D\u540E\u518D\u63D0\u9192\u6211";let g;return g="\u4E0D\u518D\u663E\u793A",[n,t,e,l,p,g,[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(t,e){t&1&&(r(0,"div",6)(1,"div",7),c(2,"img",8),o(),r(3,"h4")(4,"div",9),a(5,0),o(),r(6,"div",10),a(7,1),o()(),r(8,"div",11),H(9,2),c(10,"strong"),K(),o(),r(11,"div",12)(12,"my-button",13),M("click",function(){return e.next.emit();}),a(13,3),o(),r(14,"my-button",14),M("click",function(){return e.hide.emit({doNotOpenAgain:!1});}),a(15,4),o(),r(16,"button",15),M("click",function(){return e.hide.emit({doNotOpenAgain:!0});}),a(17,5),o()()());},dependencies:[y,v,D,G],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)}
/*# sourceMappingURL=admin-config-wizard-modal-common-QWVLRUK2.css.map */`]}));let _=i;return _;})();var wt=["modal"],Wt=["stepper"];function zt(_,i){if(_&1){let d=Q();r(0,"cdk-step",3)(1,"my-admin-config-wizard-welcome",11),M("back",function(){S(d),N();let t=z(2);return T(t.previous());})("next",function(){S(d),N();let t=z(2);return T(t.next());})("hide",function(t){S(d);let e=N(2);return T(e.hide(t));}),o()();}}function Zt(_,i){if(_&1){let d=Q();r(0,"cdk-step",10)(1,"my-admin-config-wizard-documentation",12),M("hide",function(){S(d);let t=N(2);return T(t.hide({doNotOpenAgain:!0}));}),o()();}}function xt(_,i){if(_&1){let d=Q();r(0,"div",2)(1,"my-admin-config-wizard-stepper",null,1),w(3,zt,2,0,"cdk-step",3),r(4,"cdk-step",4)(5,"my-admin-config-wizard-edit-info",5),M("back",function(){S(d);let t=z(2);return T(t.previous());})("next",function(t){S(d);let e=z(2),l=N();return l.instanceInfo=t,T(e.next());})("hide",function(){S(d);let t=N();return T(t.hide());}),o()(),r(6,"cdk-step",6)(7,"my-admin-config-wizard-form",7),M("back",function(){S(d);let t=z(2);return T(t.previous());})("next",function(t){S(d);let e=z(2),l=N();return l.usageType=t,T(e.next());})("hide",function(){S(d);let t=N();return T(t.hide());}),o()(),r(8,"cdk-step",8)(9,"my-admin-config-wizard-preview",9),M("back",function(){S(d);let t=z(2);return T(t.previous());})("next",function(){S(d);let t=z(2),e=N();return T(e.showWelcome?t.next():e.hide());})("hide",function(){S(d);let t=N();return T(t.hide());}),o()(),w(10,Zt,2,0,"cdk-step",10),o()();}if(_&2){let d=N();s(3),W(d.showWelcome?3:-1),s(2),m("currentStep",d.currentStep())("showBack",d.showWelcome),s(2),m("currentStep",d.currentStep()),s(2),m("usageType",d.usageType)("instanceInfo",d.instanceInfo)("dryRun",d.dryRun)("currentStep",d.currentStep()),s(),W(d.showWelcome?10:-1);}}var ni=(()=>{let i=class i{modalService=C(tt);userService=C(it);notifier=C(Ce);modal=Oe("modal");stepper=Oe("stepper");created=I();usageType;instanceInfo;showWelcome;dryRun;modalRef;ngOnInit(){this.created.emit();}shouldAutoOpen(n){return this.modalService.hasOpenModals()?!1:this.getFragment()==="#admin-welcome-wizard"||this.getFragment()==="#admin-welcome-wizard-test"?!0:!(n.noWelcomeModal===!0||Se.getItem(Pe())==="true");}show({showWelcome:n}){this.showWelcome=n,this.dryRun=this.getFragment()==="#admin-welcome-wizard-test",this.modalRef=this.modalService.open(this.modal(),{centered:!0,backdrop:"static",keyboard:!1,size:"lg"});}currentStep(){if(!this.stepper())return 0;let n=this.stepper().selectedIndex;return this.showWelcome?n:n+1;}totalSteps(){if(!this.stepper())return 0;let n=this.stepper().steps.length;return this.showWelcome?n-1:n;}hide(n={}){let{doNotOpenAgain:t=!1}=n;t&&this.doNotOpenAgain(),this.modalRef.close();}doNotOpenAgain(){Se.setItem(Pe(),"true"),this.userService.updateMyProfile({noWelcomeModal:!0}).subscribe({next:()=>ge.info("We will not open the welcome modal again."),error:n=>this.notifier.handleError(n)});}getFragment(){return window.location.hash;}};u(i,"\u0275fac",function(t){return new(t||i)();}),u(i,"\u0275cmp",f({type:i,selectors:[["my-admin-config-wizard-modal"]],viewQuery:function(t,e){t&1&&Be(e.modal,wt,5)(e.stepper,Wt,5),t&2&&je(2);},outputs:{created:"created"},decls:2,vars:0,consts:()=>{let n;n="\u6B22\u8FCE\u4ECB\u7ECD";let t;t="\u7F16\u8F91\u5E38\u89C4\u4FE1\u606F";let e;e="\u4F7F\u7528\u7C7B\u578B";let l;l="\u914D\u7F6E\u9884\u89C8";let p;return p="Post \u914D\u7F6E\u6587\u6863",[["modal",""],["stepper",""],[1,"modal-body"],["label",n],["label",t],["totalSteps","3",3,"back","next","hide","currentStep","showBack"],["label",e],["totalSteps","3",3,"back","next","hide","currentStep"],["label",l],["totalSteps","3",3,"back","next","hide","usageType","instanceInfo","dryRun","currentStep"],["label",p],[3,"back","next","hide"],[3,"hide"]];},template:function(t,e){t&1&&ke(0,xt,11,9,"ng-template",null,0,qe);},dependencies:[D,_t,ut,Et,Ct,Tt,Dt,gt],styles:[`.modal-body[_ngcontent-%COMP%]{padding:2rem 3rem}
/*# sourceMappingURL=admin-config-wizard-modal.component-7M3OGGTO.css.map */`]}));let _=i;return _;})();export{ni as AdminConfigWizardModalComponent};/**i18n:347eeb695970c32bc275618edc2e751c67145d9fc3012e70543c114a99b9e016*///# sourceMappingURL=chunk-3NCAZULR.js.map