import{d as w,e as N}from"./chunk-IW76GIZR.js";import{h as v}from"./chunk-6B7LVSD5.js";import{a as $}from"./chunk-NPJE7ESS.js";import{b as z}from"./chunk-5FHECZHZ.js";import{E as G,a as x,d as n,g as y,o as b}from"./chunk-U7YDHGE3.js";import{Ec as h,Hb as O,Jb as C,Na as _,Ua as I,Y as g,cc as D,dc as T,ec as R,ga as A,gb as c,ha as u,hb as m,kc as f,mb as d,nb as V,ob as E,pb as p,ra as S,xc as M,zb as L}from"./chunk-DZBHF6HI.js";import{i as s}from"./chunk-IQVXR75E.js";function F(e,o){e&1&&p(0,"my-collaborator-state",2);}function P(e,o){e&1&&p(0,"my-collaborator-state",3);}function W(e,o){if(e&1&&c(0,F,1,0,"my-collaborator-state",2)(1,P,1,0,"my-collaborator-state",3),e&2){let r=C().$implicit;m(r.editor?0:r.owner?1:-1);}}function Y(e,o){if(e&1&&c(0,W,2,1),e&2){let r=o.$implicit;m(r.collaborate?0:-1);}}var ee=(()=>{let o=class o{inputId=h.required();items=h([]);channels;selectedId;ngOnChanges(){this.channels=this.items().map(t=>{let a=t.avatarFileUrl?t.avatarFileUrl:z.GET_DEFAULT_AVATAR_URL(21);return Object.assign({},t,{imageUrl:a});});}propagateChange=t=>{};writeValue(t){this.selectedId=typeof t=="string"?parseInt(t,10):t;}registerOnChange(t){this.propagateChange=t;}registerOnTouched(){}onModelChange(){this.propagateChange(this.selectedId);}getSelectedChannel(){return(this.channels||[]).find(t=>t.id+""==this.selectedId+"");}};s(o,"\u0275fac",function(a){return new(a||o)();}),s(o,"\u0275cmp",_({type:o,selectors:[["my-select-channel"]],inputs:{inputId:[1,"inputId"],items:[1,"items"]},features:[f([{provide:x,useExisting:g(()=>o),multi:!0}]),S],decls:3,vars:4,consts:[["itemExtra",""],[3,"ngModelChange","inputId","items","ngModel","filter"],["type","accepted","disableTooltip","true",1,"lh-1","ms-2"],["type","owner","disableTooltip","true",1,"lh-1","ms-2"]],template:function(a,i){if(a&1){let q=L();V(0,"my-select-options",1),R("ngModelChange",function(l){return A(q),T(i.selectedId,l)||(i.selectedId=l),u(l);}),O("ngModelChange",function(){return i.onModelChange();}),I(1,Y,1,1,"ng-template",null,0,M),E();}a&2&&(d("inputId",i.inputId())("items",i.channels),D("ngModel",i.selectedId),d("filter",i.channels&&i.channels.length>5));},dependencies:[G,y,b,v,$],encapsulation:2}));let e=o;return e;})();var ie={VALIDATORS:[n.required,n.minLength(3),n.maxLength(120)],MESSAGES:{required:"\u5F71\u7247\u540D\u7A31\u70BA\u5FC5\u586B\u3002",minlength:"\u5F71\u7247\u540D\u7A31\u5FC5\u9808\u81F3\u5C11 3 \u500B\u5B57\u5143\u9577\u3002",maxlength:"\u5F71\u7247\u540D\u7A31\u4E0D\u80FD\u591A\u65BC 120 \u500B\u5B57\u5143\u9577\u3002",spaces:"\u5F71\u7247\u540D\u7A31\u6709\u958B\u982D\u6216\u7D50\u5C3E\u7A7A\u767D\u3002"}},re={VALIDATORS:[n.required],MESSAGES:{required:"\u5F71\u7247\u96B1\u79C1\u70BA\u5FC5\u586B\u3002"}},le={VALIDATORS:[n.minLength(2),n.maxLength(100)],MESSAGES:{minlength:"\u5BC6\u78BC\u5FC5\u9808\u81F3\u5C11\u5169\u500B\u5B57\u5143\u9577\u3002",maxlength:"\u5BC6\u78BC\u5FC5\u9808\u77ED\u65BC 100 \u500B\u5B57\u5143\u9577\u3002",required:"\u53D7\u5BC6\u78BC\u4FDD\u8B77\u7684\u5F71\u7247\u5FC5\u9808\u6709\u5BC6\u78BC\u3002"}},se={VALIDATORS:[],MESSAGES:{}},ce={VALIDATORS:[],MESSAGES:{}},me={VALIDATORS:[],MESSAGES:{}};var de={VALIDATORS:[n.required],MESSAGES:{required:"\u5F71\u7247\u983B\u9053\u70BA\u5FC5\u586B\u3002"}},pe={VALIDATORS:[n.minLength(3),n.maxLength(1e4)],MESSAGES:{minlength:"\u5F71\u7247\u63CF\u8FF0\u5FC5\u9808\u81F3\u5C11 3 \u500B\u5B57\u5143\u9577\u3002",maxlength:"\u5F71\u7247\u63CF\u8FF0\u4E0D\u80FD\u591A\u65BC 10000 \u500B\u5B57\u5143\u3002"}},he={VALIDATORS:[n.maxLength(5),B()],MESSAGES:{maxlength:"\u4E00\u90E8\u5F71\u7247\u6700\u591A\u53EF\u4EE5\u4F7F\u7528 5 \u500B\u6A19\u7C64\u3002",arrayTagLength:"\u6A19\u7C64\u5FC5\u9808\u5728 1 \u81F3 30 \u500B\u5B57\u5143\u9577\u3002"}},ge={VALIDATORS:[n.minLength(3),n.maxLength(1e3)],MESSAGES:{minlength:"\u5F71\u7247\u652F\u63F4\u5FC5\u9808\u81F3\u5C11 3 \u500B\u5B57\u5143\u9577\u3002",maxlength:"\u5F71\u7247\u652F\u63F4\u4E0D\u80FD\u8D85\u904E 1000 \u7684\u5B57\u5143\u9577\u3002"}};function Ae(e){N(e,3,{message:"Support must be at least 3 characters long."}),w(e,1e3,{message:"Support cannot be more than 1000 characters long."});}var ue={VALIDATORS:[n.minLength(3),n.maxLength(250)],MESSAGES:{minlength:"\u5F71\u7247\u652F\u63F4\u5FC5\u9808\u81F3\u5C11 3 \u500B\u5B57\u5143\u9577\u3002",maxlength:"\u5F71\u7247\u652F\u63F4\u7684\u9577\u5EA6\u4E0D\u80FD\u8D85\u904E 250 \u500B\u5B57\u5143\u3002"}},Se={VALIDATORS:[],MESSAGES:{required:"\u65E5\u671F\u70BA\u6392\u5B9A\u5F71\u7247\u66F4\u65B0\u5FC5\u586B\u3002"}},_e={VALIDATORS:[],MESSAGES:{}};function B(e=2,o=30){return r=>r.value.every(a=>a.length>=e&&a.length<=o)?null:{arrayTagLength:!0};}export{ie as a,re as b,le as c,se as d,ce as e,me as f,de as g,pe as h,he as i,ge as j,Ae as k,ue as l,Se as m,_e as n,ee as o};/**i18n:347eeb695970c32bc275618edc2e751c67145d9fc3012e70543c114a99b9e016*///# sourceMappingURL=chunk-HWORNHYK.js.map