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:"Video c\u1EA7n c\xF3 t\xEAn.",minlength:"T\xEAn video c\u1EA7n d\xE0i h\u01A1n 3 k\xFD t\u1EF1.",maxlength:"T\xEAn video c\u1EA7n ng\u1EAFn h\u01A1n 120 k\xFD t\u1EF1.",spaces:"T\xEAn video kh\xF4ng \u0111\u01B0\u1EE3c \u0111\u1EC3 kho\u1EA3ng tr\u1ED1ng."}},re={VALIDATORS:[n.required],MESSAGES:{required:"H\xE3y ch\u1ECDn ki\u1EC3u hi\u1EC3n th\u1ECB c\u1EE7a video."}},le={VALIDATORS:[n.minLength(2),n.maxLength(100)],MESSAGES:{minlength:"M\u1EADt kh\u1EA9u t\u1ED1i thi\u1EC3u 2 k\xFD t\u1EF1.",maxlength:"M\u1EADt kh\u1EA9u t\u1ED1i \u0111a 100 k\xFD t\u1EF1.",required:"M\u1EADt kh\u1EA9u b\u1EAFt bu\u1ED9c \u0111\u1EC3 b\u1EA3o v\u1EC7 video."}},se={VALIDATORS:[],MESSAGES:{}},ce={VALIDATORS:[],MESSAGES:{}},me={VALIDATORS:[],MESSAGES:{}};var de={VALIDATORS:[n.required],MESSAGES:{required:"Y\xEAu c\u1EA7u k\xEAnh video."}},pe={VALIDATORS:[n.minLength(3),n.maxLength(1e4)],MESSAGES:{minlength:"M\xF4 t\u1EA3 video ph\u1EA3i t\u1ED1i thi\u1EC3u 3 k\xFD t\u1EF1.",maxlength:"M\xF4 t\u1EA3 video t\u1ED1i \u0111a 10000 k\xFD t\u1EF1."}},he={VALIDATORS:[n.maxLength(5),B()],MESSAGES:{maxlength:"M\u1ED7i video \u0111\u01B0\u1EE3c d\xF9ng t\u1ED1i \u0111a 5 th\u1EBB.",arrayTagLength:"M\u1ED7i th\u1EBB t\u1ED1i thi\u1EC3u 1 k\xFD t\u1EF1 v\xE0 t\u1ED1i \u0111a 30 k\xFD t\u1EF1."}},ge={VALIDATORS:[n.minLength(3),n.maxLength(1e3)],MESSAGES:{minlength:"H\u1ED7 tr\u1EE3 video \xEDt nh\u1EA5t 3 k\xFD t\u1EF1.",maxlength:"H\u1ED7 tr\u1EE3 video t\u1ED1i \u0111a 1000 k\xFD t\u1EF1."}};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:"H\u1ED7 tr\u1EE3 video \xEDt nh\u1EA5t 3 k\xFD t\u1EF1.",maxlength:"\u0110\u1ED9 d\xE0i video t\u1ED1i \u0111a 250 k\xFD t\u1EF1."}},Se={VALIDATORS:[],MESSAGES:{required:"C\u1EA7n c\xF3 ng\xE0y \u0111\u1EC3 l\xEAn l\u1ECBch c\u1EADp nh\u1EADt video."}},_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