1import{b as ee}from"./chunk-MS2CS6MN.js";import"./chunk-KLZQNCJY.js";import{E as j,g as Y,o as B}from"./chunk-7JTNILXC.js";import{u as U}from"./chunk-CUOYDGDO.js";import{a as Z}from"./chunk-TTJW756Y.js";import{Af as Q,Bb as b,Cb as W,Da as s,Db as r,Dc as V,Fc as K,Hb as m,Jb as S,Na as $,Qh as q,Rb as w,Sb as v,Tc as H,Tg as J,Ua as y,ba as d,cc as X,dc as k,ec as x,ga as C,gb as c,ha as u,hb as g,nb as o,ob as i,pb as M,xc as z,yf as O,zb as h}from"./chunk-NY4TI4KT.js";import{i as A}from"./chunk-IQVXR75E.js";var ne=["modal"];function te(n,_){n&1&&(o(0,"li"),r(1,5),i());}function oe(n,_){n&1&&(o(0,"li"),r(1,6),i());}function ie(n,_){n&1&&(o(0,"li"),r(1,7),i());}function _e(n,_){n&1&&(o(0,"li"),r(1,8),i());}function ae(n,_){n&1&&(o(0,"li"),r(1,9),i());}function le(n,_){n&1&&(o(0,"li"),r(1,10),i());}function re(n,_){n&1&&(o(0,"li"),r(1,11),i());}function se(n,_){if(n&1){let a=h();o(0,"div",12)(1,"h4",13),r(2,1),i(),o(3,"button",14),m("click",function(){let e=C(a).close;return u(e());}),M(4,"my-global-icon",15),i()(),o(5,"div",16),M(6,"img",17),o(7,"p"),r(8,2),i(),o(9,"ul"),c(10,te,2,0,"li"),c(11,oe,2,0,"li"),c(12,ie,2,0,"li"),c(13,_e,2,0,"li"),c(14,ae,2,0,"li"),c(15,le,2,0,"li"),c(16,re,2,0,"li"),i(),o(17,"p"),b(18,3),M(19,"strong")(20,"a",18),W(),i()(),o(21,"div",19)(22,"my-peertube-checkbox",20),x("ngModelChange",function(e){C(a);let N=S();return k(N.stopDisplayModal,e)||(N.stopDisplayModal=e),u(e);}),i(),o(23,"input",21),m("click",function(){let e=C(a).close;return u(e());})("key.enter",function(){let e=C(a).close;return u(e());}),i(),o(24,"a",22),r(25,4),i()();}if(n&2){let a=S();s(10),g(a.about.instance.name.toLowerCase()==="peertube"?10:-1),s(),g(a.isDefaultShortDescription(a.about.instance.shortDescription)?11:-1),s(),g(a.about.instance.administrator?-1:12),s(),g(a.about.instance.maintenanceLifetime?-1:13),s(),g(a.about.instance.businessModel?-1:14),s(),g(a.about.instance.moderationInformation?-1:15),s(),g(a.about.instance.terms?-1:16),s(6),X("ngModel",a.stopDisplayModal);}}var fe=(()=>{let _=class _{userService=d(q);location=d(H);modalService=d(U);notifier=d(J);modal=K("modal");created=V();stopDisplayModal=!1;about;LS_KEYS={NO_INSTANCE_CONFIG_WARNING_MODAL:"no_instance_config_warning_modal"};ngOnInit(){this.created.emit();}canBeOpenByUser(t){return!(this.modalService.hasOpenModals()||t.noInstanceConfigWarningModal===!0||O.getItem(this.LS_KEYS.NO_INSTANCE_CONFIG_WARNING_MODAL)==="true");}shouldAutoOpen(t,e){return this.modalService.hasOpenModals()||!t.signup.allowed?!1:t.instance.name.toLowerCase()==="peertube"||!e.instance.terms||!e.instance.administrator||!e.instance.maintenanceLifetime;}show(t){if(this.location.path().startsWith("/admin/settings/config/edit-custom"))return;this.about=t,this.modalService.open(this.modal(),{centered:!0}).result.finally(()=>{this.stopDisplayModal===!0&&this.doNotOpenAgain();});}isDefaultShortDescription(t){return t==="PeerTube, an ActivityPub-federated video streaming platform using P2P directly in your web browser.";}doNotOpenAgain(){O.setItem(this.LS_KEYS.NO_INSTANCE_CONFIG_WARNING_MODAL,"true"),this.userService.updateMyProfile({noInstanceConfigWarningModal:!0}).subscribe({next:()=>Q.info("We will not open the instance config warning modal again."),error:t=>this.notifier.handleError(t)});}};A(_,"\u0275fac",function(e){return new(e||_)();}),A(_,"\u0275cmp",$({type:_,selectors:[["my-instance-config-warning-modal"]],viewQuery:function(e,N){e&1&&w(N.modal,ne,5),e&2&&v();},outputs:{created:"created"},decls:2,vars:0,consts:()=>{let t;t="Close this modal";let e;e="Don't show me this warning anymore";let N;N="Close";let p;p="Configuration warning!";let f;f="You enabled user registration on your instance but did not configure the following fields:";let I;I=" Please consider configuring these fields to help people to choose "+"\uFFFD#19\uFFFD"+"the appropriate instance"+"\uFFFD/#19\uFFFD"+". Without them, your instance may not be referenced on the "+"\uFFFD#20\uFFFD"+"JoinPeerTube website"+"\uFFFD/#20\uFFFD"+". ";let T;T=" Configure ";let E;E="Instance name";let L;L="Instance short description";let P;P="Who you are";let G;G="How long you plan to maintain your instance";let R;R="How you plan to pay for keeping your instance running";let D;D="How you will moderate your instance";let F;return F="Instance terms",[["modal",""],p,f,I,T,E,L,P,G,R,D,F,[1,"modal-header"],[1,"modal-title"],["title",t,1,"border-0","p-0",3,"click"],["iconName","cross"],[1,"modal-body"],["src","/client/assets/images/mascot/oh.svg","alt","mascot",1,"mascot"],["target","_blank","rel","noopener noreferrer","href","https://joinpeertube.org"],[1,"modal-footer","inputs"],["inputName","stopDisplayModal","labelText",e,3,"ngModelChange","ngModel"],["type","button","role","button","value",N,1,"peertube-button","secondary-button",3,"click","key.enter"],["ngbAutofocus","","href","/admin/settings/config/edit-custom","target","_blank","rel","noopener noreferrer",1,"peertube-button-link","primary-button"]];},template:function(e,N){e&1&&y(0,se,26,8,"ng-template",null,0,z);},dependencies:[j,Y,B,Z,ee],styles:[`li[_ngcontent-%COMP%]{margin-bottom:10px}.mascot[_ngcontent-%COMP%]{display:block;margin:0 auto 50px;width:25%} 2/*# sourceMappingURL=instance-config-warning-modal.component-N3MKBKTZ.css.map */`]}));let n=_;return n;})();export{fe as InstanceConfigWarningModalComponent};/**i18n:347eeb695970c32bc275618edc2e751c67145d9fc3012e70543c114a99b9e016*///# sourceMappingURL=chunk-QYYMVS2S.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.