import{c as H}from"./chunk-V4YGGZ4W.js";import{c as O}from"./chunk-ITB6MN7G.js";import{$a as D,$c as u,B as f,Q as g,Sc as x,Xc as m,Y as h,aa as a,da as B,na as w,pc as v,uh as l,vg as E,yc as T,za as j,zh as I}from"./chunk-GKQGDBUU.js";import{i as n}from"./chunk-QVFSZZWQ.js";var c=class c{authHttp=a(u);restExtractor=a(l);restService=a(I);videoService=a(H);list(t,o){let s=this.restService.componentToRestPagination(t),r=new m;return r=this.restService.addRestGetParams(r,s),o&&(r=r.append("search",o)),this.authHttp.get(c.BASE_USER_VIDEOS_HISTORY_URL,{params:r}).pipe(g(i=>this.videoService.extractVideos(i)),f(i=>this.restExtractor.handleError(i)))}deleteElement(t){return this.authHttp.delete(c.BASE_USER_VIDEOS_HISTORY_URL+"/"+t.id).pipe(f(o=>this.restExtractor.handleError(o)))}clearAll(){return this.authHttp.post(c.BASE_USER_VIDEOS_HISTORY_URL+"/remove",{}).pipe(f(t=>this.restExtractor.handleError(t)))}};n(c,"BASE_USER_VIDEOS_HISTORY_URL",E.apiUrl+"/api/v1/users/me/history/videos"),n(c,"\u0275fac",function(o){return new(o||c)}),n(c,"\u0275prov",h({token:c,factory:c.\u0275fac}));var _=c;var d=class d{authHttp=a(u);restExtractor=a(l);restService=a(I);listByAccount(t){let{pagination:o,sort:s,account:r,includeCollaborations:i}=t,p=new m;p=this.restService.addRestGetParams(p,o,s),i&&(p=p.append("includeCollaborations","true"));let L=O.BASE_ACCOUNT_URL+r.nameWithHost+"/video-channel-syncs";return this.authHttp.get(L,{params:p}).pipe(f(N=>this.restExtractor.handleError(N)))}create(t){return this.authHttp.post(d.BASE_VIDEO_CHANNEL_URL,t).pipe(f(o=>this.restExtractor.handleError(o)))}delete(t){let o=`${d.BASE_VIDEO_CHANNEL_URL}/${t}`;return this.authHttp.delete(o).pipe(f(s=>this.restExtractor.handleError(s)))}};n(d,"BASE_VIDEO_CHANNEL_URL",E.apiUrl+"/api/v1/video-channel-syncs"),n(d,"\u0275fac",function(o){return new(o||d)}),n(d,"\u0275prov",h({token:d,factory:d.\u0275fac,providedIn:"root"}));var y=d;function Z(e){return e.buttons===0||e.detail===0}function tt(e){let t=e.touches&&e.touches[0]||e.changedTouches&&e.changedTouches[0];return!!t&&t.identifier===-1&&(t.radiusX==null||t.radiusX===1)&&(t.radiusY==null||t.radiusY===1)}function ot(e,t,o,s,r){let i=parseInt(v.major),p=parseInt(v.minor);return i>19||i===19&&p>0||i===0&&p===0?e.listen(t,o,s,r):(t.addEventListener(o,s,r),()=>{t.removeEventListener(o,s,r)})}var S;try{S=typeof Intl<"u"&&Intl.v8BreakIterator}catch{S=!1}var ct=(()=>{let t=class t{_platformId=a(j);isBrowser=this._platformId?x(this._platformId):typeof document=="object"&&!!document;EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent);TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent);BLINK=this.isBrowser&&!!(window.chrome||S)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT;WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT;IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window);FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent);ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT;SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT;constructor(){}};n(t,"\u0275fac",function(r){return new(r||t)}),n(t,"\u0275prov",h({token:t,factory:t.\u0275fac,providedIn:"root"}));let e=t;return e})();var R=new WeakMap,mt=(()=>{let t=class t{_appRef;_injector=a(w);_environmentInjector=a(B);load(s){let r=this._appRef=this._appRef||this._injector.get(D),i=R.get(r);i||(i={loaders:new Set,refs:[]},R.set(r,i),r.onDestroy(()=>{R.get(r)?.refs.forEach(p=>p.destroy()),R.delete(r)})),i.loaders.has(s)||(i.loaders.add(s),i.refs.push(T(s,{environmentInjector:this._environmentInjector})))}};n(t,"\u0275fac",function(r){return new(r||t)}),n(t,"\u0275prov",h({token:t,factory:t.\u0275fac,providedIn:"root"}));let e=t;return e})();function lt(e){return Array.isArray(e)?e:[e]}export{Z as a,tt as b,ot as c,ct as d,mt as e,lt as f,_ as g,y as h};
/**i18n:42345378061bf3c93df67acfa161b751a7b03cc91f3ede7c1f1cdf2bba62fe26*/
//# sourceMappingURL=chunk-5KEFVXIX.js.map
