1"use strict";(self.webpackChunkPeerTube=self.webpackChunkPeerTube||[]).push([[8032],{31552:(N,B,i)=>{i.d(B,{W:()=>T});var M=i(80151),S=i(51197),U=i(54856);const e=["contentWrapper"];let T=(()=>{var b;class _{constructor(c){this.customMarkupService=c,this.displayed=!1}ngOnChanges(){var c=this;return(0,M.Z)(function*(){yield c.rebuild()})()}rebuild(){var c=this;return(0,M.Z)(function*(){if(c.content instanceof HTMLDivElement)return c.loadElement(c.content);const{rootElement:C,componentsLoaded:p}=yield c.customMarkupService.buildElement(c.content);return yield p,c.loadElement(C)})()}loadElement(c){this.contentWrapper.nativeElement.appendChild(c),this.displayed=!0}}return(b=_).\u0275fac=function(c){return new(c||b)(S.Y36(U.R))},b.\u0275cmp=S.Xpm({type:b,selectors:[["my-custom-markup-container"]],viewQuery:function(c,C){if(1&c&&S.Gf(e,7),2&c){let p;S.iGM(p=S.CRH())&&(C.contentWrapper=p.first)}},inputs:{content:"content"},features:[S.TTD],decls:2,vars:1,consts:[[1,"custom-markup-container",3,"hidden"],["contentWrapper",""]],template:function(c,C){1&c&&S._UZ(0,"div",0,1),2&c&&S.Q6J("hidden",!C.displayed)},encapsulation:2}),_})()},54856:(N,B,i)=>{i.d(B,{R:()=>Y});var M=i(80151),S=i(72255),U=i(91203),e=i(51197),T=i(89650);let b=(()=>{var s;class f{getTarget(){return!0===this.blankTarget?"_blank":""}getClasses(){return["peertube-button-link","primary"===this.theme?"orange-button":"grey-button"]}}return(s=f).\u0275fac=function(t){return new(t||s)},s.\u0275cmp=e.Xpm({type:s,selectors:[["my-button-markup"]],inputs:{theme:"theme",href:"href",label:"label",blankTarget:"blankTarget"},decls:2,vars:4,consts:[[3,"href","ngClass","target"]],template:function(t,n){1&t&&(e.TgZ(0,"a",0),e._uU(1),e.qZA()),2&t&&(e.Q6J("href",n.href,e.LSH)("ngClass",n.getClasses())("target",n.getTarget()),e.xp6(1),e.Oqu(n.label))},dependencies:[T.mk],changeDetection:0}),f})();var _=i(59522),g=i(7218),c=i(75162),C=i(4881),p=i(13045),O=i(19868),R=i(61771),A=i(83473),D=i(19952),u=i(20532),a=i(20961),P=i(74944);function l(s,f){if(1&s&&e._UZ(0,"my-video-miniature",1),2&s){const r=e.oxw();e.Q6J("video",r.video)("user",r.getUser())("displayAsRow",!1)("displayVideoActions",!0)("displayOptions",r.displayOptions)}}let y=(()=>{var s;class f{constructor(t,n,o,d){this.auth=t,this.findInBulk=n,this.notifier=o,this.cd=d,this.loaded=new e.vpe,this.displayOptions={date:!0,views:!0,by:!0,avatar:!1,privacyLabel:!1,privacyText:!1,state:!1,blacklistInfo:!1}}getUser(){return this.auth.getUser()}ngOnInit(){if(this.onlyDisplayTitle)for(const t of(0,a.eJ)(this.displayOptions))this.displayOptions[t]=!1;this.video||this.findInBulk.getVideo(this.uuid).pipe((0,C.x)(()=>this.loaded.emit(!0))).subscribe({next:t=>{this.video=t,this.cd.markForCheck()},error:t=>this.notifier.error("Error in video miniature component: " + t.message + "")})}}return(s=f).\u0275fac=function(t){return new(t||s)(e.Y36(O.e8),e.Y36(R.XX),e.Y36(O.d4),e.Y36(e.sBO))},s.\u0275cmp=e.Xpm({type:s,selectors:[["my-video-miniature-markup"]],inputs:{uuid:"uuid",onlyDisplayTitle:"onlyDisplayTitle",video:"video"},outputs:{loaded:"loaded"},decls:1,vars:1,consts:[[3,"video","user","displayAsRow","displayVideoActions","displayOptions",4,"ngIf"],[3,"video","user","displayAsRow","displayVideoActions","displayOptions"]],template:function(t,n){1&t&&e.YNc(0,l,1,5,"my-video-miniature",0),2&t&&e.Q6J("ngIf",n.video)},dependencies:[T.O5,P.v],styles:["my-video-miniature[_ngcontent-%COMP%]{display:inline-block;width:280px}"],changeDetection:0}),f})();function m(s,f){if(1&s&&(e.TgZ(0,"span",11),e.SDv(1,12),e.qZA()),2&s){const r=e.oxw(2);e.xp6(1),e.pQV(r.totalVideos)(r.totalVideos),e.QtT(1)}}function v(s,f){if(1&s&&e._UZ(0,"div",13),2&s){const r=e.oxw(2);e.Q6J("innerHTML",r.descriptionHTML,e.oJD)}}function I(s,f){if(1&s&&(e.TgZ(0,"div",14)(1,"div",15),e.SDv(2,16),e.qZA(),e._UZ(3,"my-video-miniature-markup",17),e.qZA()),2&s){const r=e.oxw(2);e.xp6(3),e.Q6J("video",r.video)("onlyDisplayTitle",!0)}}function x(s,f){if(1&s&&(e.TgZ(0,"div",1)(1,"div",2),e._UZ(2,"my-actor-avatar",3),e.TgZ(3,"h6")(4,"a",4),e._uU(5),e.qZA()(),e.TgZ(6,"div",5)(7,"div",6),e.SDv(8,7),e.qZA(),e.YNc(9,m,2,2,"span",8),e.qZA(),e.YNc(10,v,1,1,"div",9),e.qZA(),e.YNc(11,I,4,2,"div",10),e.qZA()),2&s){const r=e.oxw();e.xp6(2),e.Q6J("actor",r.channel)("internalHref",r.getVideoChannelLink()),e.xp6(2),e.Q6J("routerLink",r.getVideoChannelLink()),e.xp6(1),e.hij(" ",r.channel.displayName," "),e.xp6(3),e.p
1QV(r.channel.followersCount)(r.channel.followersCount),e.QtT(8),e.xp6(1),e.Q6J("ngIf",void 0!==r.totalVideos),e.xp6(1),e.Q6J("ngIf",r.displayDescription),e.xp6(1),e.Q6J("ngIf",r.video&&r.displayLatestVideo)}}let w=(()=>{var s;class f{constructor(t,n,o,d,E,h){this.markdown=t,this.findInBulk=n,this.videoService=o,this.userService=d,this.notifier=E,this.cd=h,this.loaded=new e.vpe}ngOnInit(){this.findInBulk.getChannel(this.name).pipe((0,g.b)(t=>{this.channel=t}),(0,c.w)(()=>(0,_.D)(this.markdown.textMarkdownToHTML({markdown:this.channel.description,withEmoji:!0,withHtml:!0}))),(0,g.b)(t=>{this.descriptionHTML=t}),(0,c.w)(()=>this.loadVideosObservable()),(0,C.x)(()=>this.loaded.emit(!0))).subscribe({next:({total:t,data:n})=>{this.totalVideos=t,this.video=n[0],this.cd.markForCheck()},error:t=>this.notifier.error("Error in channel miniature component: " + t.message + "")})}getVideoChannelLink(){return["/c",this.channel.nameWithHost]}loadVideosObservable(){const t={videoChannel:this.channel,videoPagination:{currentPage:1,itemsPerPage:1},sort:"-publishedAt",count:1};return this.userService.getAnonymousOrLoggedUser().pipe((0,p.U)(n=>n.nsfwPolicy),(0,c.w)(n=>this.videoService.getVideoChannelVideos({...t,nsfw:this.videoService.nsfwPolicyToParam(n)})))}}return(s=f).\u0275fac=function(t){return new(t||s)(e.Y36(O.Zy),e.Y36(R.XX),e.Y36(A.kI),e.Y36(O.KD),e.Y36(O.d4),e.Y36(e.sBO))},s.\u0275cmp=e.Xpm({type:s,selectors:[["my-channel-miniature-markup"]],inputs:{name:"name",displayLatestVideo:"displayLatestVideo",displayDescription:"displayDescription"},outputs:{loaded:"loaded"},decls:1,vars:1,consts:function(){let r,t,n,o,d,E;return r="See this video channel",t="See this video channel",n="{VAR_PLURAL, plural, =1 {1 subscriber} other {{INTERPOLATION} subscribers}}",n=e.Zx4(n,{VAR_PLURAL:"\ufffd0\ufffd",INTERPOLATION:"\ufffd1\ufffd"}),o="{VAR_PLURAL, plural, =1 {1 videos} other {{INTERPOLATION} videos}}",o=e.Zx4(o,{VAR_PLURAL:"\ufffd0\ufffd",INTERPOLATION:"\ufffd1\ufffd"}),d=" " + o + " ",E="Latest published video",[["class","channel",4,"ngIf"],[1,"channel"],[1,"channel-avatar-row"],["actorType","channel","title",r,"size","75",3,"actor","internalHref"],["title",t,3,"routerLink"],[1,"actor-counters"],[1,"followers"],n,["class","videos-count",4,"ngIf"],["class","description-html",3,"innerHTML",4,"ngIf"],["class","video",4,"ngIf"],[1,"videos-count"],d,[1,"description-html",3,"innerHTML"],[1,"video"],[1,"video-label"],E,[3,"video","onlyDisplayTitle"]]},template:function(t,n){1&t&&e.YNc(0,x,12,9,"div",0),2&t&&e.Q6J("ngIf",n.channel)},dependencies:[T.O5,D.rH,u.b,y],styles:['@charset "UTF-8";.channel[_ngcontent-%COMP%]{padding:20px;background-color:var(--channelBackgroundColor);margin-bottom:30px;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.channel-avatar-row[_ngcontent-%COMP%], .video[_ngcontent-%COMP%]{width:280px}.channel-avatar-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto 1fr;column-gap:15px}.channel-avatar-row[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{word-break:break-word;word-wrap:break-word;overflow-wrap:break-word;-webkit-hyphens:auto;hyphens:auto;color:var(--mainForegroundColor)}.channel-avatar-row[_ngcontent-%COMP%] my-actor-avatar[_ngcontent-%COMP%]{grid-column:1;grid-row:1/4}.channel-avatar-row[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{grid-column:2;margin:0}.channel-avatar-row[_ngcontent-%COMP%] .actor-counters[_ngcontent-%COMP%]{color:var(--greyForegroundColor);display:flex;align-items:center;font-size:13px;grid-column:2}.channel-avatar-row[_ngcontent-%COMP%] .actor-counters[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:not(:last-child):after{content:"\\2022";margin:0 5px;color:var(--mainColor)}.channel-avatar-row[_ngcontent-%COMP%] .description-html[_ngcontent-%COMP%]{position:relative;overflow:hidden;max-height:60px;grid-column:2}.channel-avatar-row[_ngcontent-%COMP%] .description-html[_ngcontent-%COMP%]:after{content:"";pointer-events:none;width:100%;height:100%;position:absolute;left:0;top:0;background:linear-gradient(transparent 30px,var(--channelBackgroun
1dColor))}.video-label[_ngcontent-%COMP%]{font-size:12px;color:var(--greyForegroundColor);margin:15px 0 5px}'],changeDetection:0}),f})();var V=i(20553),H=i(62887);let F=(()=>{var s;class f{constructor(t){this.el=t,this.type="video"}ngOnInit(){const t="video"===this.type?(0,a.Ce)({uuid:this.uuid},V.N.originServerUrl):(0,a.pb)({uuid:this.uuid},V.N.originServerUrl);this.el.nativeElement.innerHTML=(0,H.t3)({embedUrl:t,embedTitle:this.uuid})}}return(s=f).\u0275fac=function(t){return new(t||s)(e.Y36(e.SBq))},s.\u0275cmp=e.Xpm({type:s,selectors:[["my-embed-markup"]],inputs:{uuid:"uuid",type:"type"},decls:0,vars:0,template:function(t,n){},encapsulation:2}),f})();var $=i(21198);function j(s,f){if(1&s&&e._UZ(0,"my-video-playlist-miniature",1),2&s){const r=e.oxw();e.Q6J("playlist",r.playlist)}}let K=(()=>{var s;class f{constructor(t,n,o){this.findInBulkService=t,this.notifier=n,this.cd=o,this.loaded=new e.vpe,this.displayOptions={date:!0,views:!0,by:!0,avatar:!1,privacyLabel:!1,privacyText:!1,state:!1,blacklistInfo:!1}}ngOnInit(){this.findInBulkService.getPlaylist(this.uuid).pipe((0,C.x)(()=>this.loaded.emit(!0))).subscribe({next:t=>{this.playlist=t,this.cd.markForCheck()},error:t=>this.notifier.error("Error in playlist miniature component: " + t.message + "")})}}return(s=f).\u0275fac=function(t){return new(t||s)(e.Y36(R.XX),e.Y36(O.d4),e.Y36(e.sBO))},s.\u0275cmp=e.Xpm({type:s,selectors:[["my-playlist-miniature-markup"]],inputs:{uuid:"uuid"},outputs:{loaded:"loaded"},decls:1,vars:1,consts:[[3,"playlist",4,"ngIf"],[3,"playlist"]],template:function(t,n){1&t&&e.YNc(0,j,1,1,"my-video-playlist-miniature",0),2&t&&e.Q6J("ngIf",n.playlist)},dependencies:[T.O5,$.U],styles:["my-video-playlist-miniature[_ngcontent-%COMP%]{display:inline-block;width:280px}"],changeDetection:0}),f})();function G(s,f){if(1&s&&(e.TgZ(0,"div",3),e._UZ(1,"my-video-miniature",4),e.qZA()),2&s){const r=f.$implicit,t=e.oxw();e.xp6(1),e.Q6J("video",r)("user",t.getUser())("displayAsRow",!1)("displayVideoActions",!0)("displayOptions",t.displayOptions)}}let W=(()=>{var s;class f{constructor(t,n,o,d){this.auth=t,this.videoService=n,this.notifier=o,this.cd=d,this.loaded=new e.vpe,this.displayOptions={date:!1,views:!0,by:!0,avatar:!1,privacyLabel:!1,privacyText:!1,state:!1,blacklistInfo:!1}}getUser(){return this.auth.getUser()}limitRowsStyle(){return this.maxRows<=0?{}:{"grid-template-rows":`repeat(${this.maxRows}, 1fr)`,"grid-auto-rows":"0","overflow-y":"hidden"}}ngOnInit(){if(this.onlyDisplayTitle)for(const t of(0,a.eJ)(this.displayOptions))this.displayOptions[t]=!1;return this.getVideosObservable().pipe((0,C.x)(()=>this.loaded.emit(!0))).subscribe({next:t=>{this.videos=t,this.cd.markForCheck()},error:t=>this.notifier.error("Error in videos list component: " + t.message + "")})}getVideosObservable(){const t={videoPagination:{currentPage:1,itemsPerPage:this.count},categoryOneOf:this.categoryOneOf,languageOneOf:this.languageOneOf,isLocal:this.isLocal,isLive:this.isLive,sort:this.sort,account:{nameWithHost:this.accountHandle},videoChannel:{nameWithHost:this.channelHandle},skipCount:!0};let n;return n=this.channelHandle?this.videoService.getVideoChannelVideos(t):this.accountHandle?this.videoService.getAccountVideos(t):this.videoService.getVideos(t),n.pipe((0,p.U)(({data:o})=>o))}}return(s=f).\u0275fac=function(t){return new(t||s)(e.Y36(O.e8),e.Y36(A.kI),e.Y36(O.d4),e.Y36(e.sBO))},s.\u0275cmp=e.Xpm({type:s,selectors:[["my-videos-list-markup"]],inputs:{sort:"sort",categoryOneOf:"categoryOneOf",languageOneOf:"languageOneOf",count:"count",onlyDisplayTitle:"onlyDisplayTitle",isLocal:"isLocal",isLive:"isLive",maxRows:"maxRows",channelHandle:"channelHandle",accountHandle:"accountHandle"},outputs:{loaded:"loaded"},decls:3,vars:2,consts:[[1,"root"],[1,"videos",3,"ngStyle"],["class","video-wrapper",4,"ngFor","ngForOf"],[1,"video-wrapper"],[3,"video","user","displayAsRow","displayVideoActions","displayOptions"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1),e.YNc(2,G,2,5,"div",2),e.qZA()()),2&t&&(e.xp6(1),e.Q6J("ngStyle",n.limitRowsStyle()),e.xp6(1),e.Q6J("ngForOf",n.videos))},dependencies:[T.sg,T.PC,P.v],styles:["@media screen and (min-width: 500px){.root[_ngcontent-%COMP%] .videos[_ngcontent-%COMP%], .root[_ngcontent-%COMP%] .playlists[_ngcontent-%COMP%]{--miniatureMinWidth: 255px;--miniatureMaxWidth: 280px;
1display:grid;column-gap:30px;grid-template-columns:repeat(auto-fill,minmax(var(--miniatureMinWidth),1fr))}.root[_ngcontent-%COMP%] .videos[_ngcontent-%COMP%] .video-wrapper[_ngcontent-%COMP%], .root[_ngcontent-%COMP%] .videos[_ngcontent-%COMP%] .playlist-wrapper[_ngcontent-%COMP%], .root[_ngcontent-%COMP%] .playlists[_ngcontent-%COMP%] .video-wrapper[_ngcontent-%COMP%], .root[_ngcontent-%COMP%] .playlists[_ngcontent-%COMP%] .playlist-wrapper[_ngcontent-%COMP%]{margin:0 auto;width:100%}.root[_ngcontent-%COMP%] .videos[_ngcontent-%COMP%] .video-wrapper[_ngcontent-%COMP%] my-video-miniature[_ngcontent-%COMP%], .root[_ngcontent-%COMP%] .videos[_ngcontent-%COMP%] .video-wrapper[_ngcontent-%COMP%] my-video-playlist-miniature[_ngcontent-%COMP%], .root[_ngcontent-%COMP%] .videos[_ngcontent-%COMP%] .playlist-wrapper[_ngcontent-%COMP%] my-video-miniature[_ngcontent-%COMP%], .root[_ngcontent-%COMP%] .videos[_ngcontent-%COMP%] .playlist-wrapper[_ngcontent-%COMP%] my-video-playlist-miniature[_ngcontent-%COMP%], .root[_ngcontent-%COMP%] .playlists[_ngcontent-%COMP%] .video-wrapper[_ngcontent-%COMP%] my-video-miniature[_ngcontent-%COMP%], .root[_ngcontent-%COMP%] .playlists[_ngcontent-%COMP%] .video-wrapper[_ngcontent-%COMP%] my-video-playlist-miniature[_ngcontent-%COMP%], .root[_ngcontent-%COMP%] .playlists[_ngcontent-%COMP%] .playlist-wrapper[_ngcontent-%COMP%] my-video-miniature[_ngcontent-%COMP%], .root[_ngcontent-%COMP%] .playlists[_ngcontent-%COMP%] .playlist-wrapper[_ngcontent-%COMP%] my-video-playlist-miniature[_ngcontent-%COMP%]{display:block;min-width:var(--miniatureMinWidth);max-width:var(--miniatureMaxWidth)}}@media screen and (min-width: 500px) and (min-width: breakpoint(xm)){.root[_ngcontent-%COMP%] .videos[_ngcontent-%COMP%], .root[_ngcontent-%COMP%] .playlists[_ngcontent-%COMP%]{column-gap:15px}}@media screen and (min-width: 500px) and (min-width: breakpoint(fhd)){.root[_ngcontent-%COMP%] .videos[_ngcontent-%COMP%], .root[_ngcontent-%COMP%] .playlists[_ngcontent-%COMP%]{column-gap:2%}}"],changeDetection:0}),f})();var Z=i(49662);let Y=(()=>{var s;class f{constructor(t,n){this.dynamicElementService=t,this.markdown=n,this.angularBuilders={"peertube-button":o=>this.buttonBuilder(o),"peertube-video-embed":o=>this.embedBuilder(o,"video"),"peertube-playlist-embed":o=>this.embedBuilder(o,"playlist"),"peertube-video-miniature":o=>this.videoMiniatureBuilder(o),"peertube-playlist-miniature":o=>this.playlistMiniatureBuilder(o),"peertube-channel-miniature":o=>this.channelMiniatureBuilder(o),"peertube-videos-list":o=>this.videosListBuilder(o)},this.htmlBuilders={"peertube-container":o=>this.containerBuilder(o)},this.customMarkdownRenderer=o=>this.buildElement(o).then(({rootElement:d})=>d)}getCustomMarkdownRenderer(){return this.customMarkdownRenderer}buildElement(t){var n=this;return(0,M.Z)(function*(){const o=yield n.markdown.customPageMarkdownToHTML({markdown:t,additionalAllowedTags:n.getSupportedTags()}),d=document.createElement("div");d.innerHTML=o;for(const h of Object.keys(n.htmlBuilders))d.querySelectorAll(h).forEach(L=>{try{const k=n.execHTMLBuilder(h,L);L.insertBefore(k,L.firstChild)}catch(k){U.k.error(`Cannot inject component ${h}`,k)}});const E=[];for(const h of Object.keys(n.angularBuilders))d.querySelectorAll(h).forEach(L=>{try{const k=n.execAngularBuilder(h,L);if(k.instance.loaded){const X=(0,S.z)(k.instance.loaded);E.push(X)}n.dynamicElementService.injectElement(L,k)}catch(k){U.k.error(`Cannot inject component ${h}`,k)}});return{rootElement:d,componentsLoaded:Promise.all(E)}})()}getSupportedTags(){return Object.keys(this.angularBuilders).concat(Object.keys(this.htmlBuilders))}execHTMLBuilder(t,n){return this.htmlBuilders[t](n)}execAngularBuilder(t,n){return this.angularBuilders[t](n)}embedBuilder(t,n){const o=t.dataset,d=this.dynamicElementService.createElement(F);return this.dynamicElementService.setModel(d,{uuid:o.uuid,type:n}),d}playlistMiniatureBuilder(t){const n=t.dataset,o=this.dynamicElementService.createElement(K);return this.dynamicElementService.setModel(o,{uuid:n.uuid}),o}channelMiniatureBuilder(t){var n,o;const d=t.dataset,E=this.dynamicElementService.createElement(w),h={name:d.name,displayLatestVideo:null===(n=this.buildBoolean(d.displayLatestVideo))||void 0===n||n,displayDescription:null===(o=this.buildBoolean(d.displayDescription))||void 0===o||o};return this.dynamicElementService.setModel(E,h),E}buttonBuilder(t){var n,o;const d=t.dataset,E=this.dynamicElementService.createElement(b),h={theme:null!==(n=d.theme)&&void 0!==n?n:"primary",href:d.href,label:d.label,blankTarget:null!==(o=this.buildBoolean(d.blankTarget))&&void 0!==o&&o};return this.dynamicElementService.setModel(E,h),E}videoMiniatureBuilder(t){var n;const o=t.dataset,d=this.dynamicElementService.createElement(y),E={uuid:o.uuid,onlyDisplayTitle:null!==(n=this.buildBoolean(o.onlyDisplayTitle))&&void 0!==n&&n};return this.dynamicElementService.setModel(d,E),d}videosListBuilder(t){var n,o,d,E;const h=t.dataset,L=this.dynamicElementService.createElement(W),k={onlyDisplayTitle:null!==(n=this.buildBoolean(h.onlyDisplayTitle))&&void 0!==n&&n,maxRows:null!==(o=this.buildNumber(h.maxRows))&&void 0!==o?o:-1,sort:h.sort||"-publishedAt",count:this.buildNumber(h.count)||10,categoryOneOf:null!==(d=this.buildArrayNumber(h.categoryOneOf))&&void 0!==d?d:[],languageOneOf:null!==(E=this.buildArrayString(h.languageOneOf))&&void 0!==E?E:[],accountHandle:h.accountHandle||void 0,channelHandle:h.channelHandle||void 0,isLive:this.buildBoolean(h.isLive),isLocal:!!this.buildBoolean(h.onlyLocal)||void 0};return this.dynamicElementService.setModel(L,k),L}containerBuilder(t){const n=t.dataset,o=t.innerHTML;t.innerHTML="";const d=document.createElement("div");if(d.innerHTML=o,d.classList.add("peertube-container",n.layout?"layout-"+n.layout:"layout-column"),d.style.justifyContent=n.justifyContent||"space-between",n.width&&d.setAttribute("width",n.width),n.title||n.description){const h=document.createElement("div");if(h.classList.add("header"),n.title){const L=document.createElement("h4");L.innerText=n.title,h.appendChild(L)}if(n.description){const L=document.createElement("div");L.innerText=n.description,h.append(L)}d.insertBefore(h,d.firstChild)}return d}buildNumber(t){if(t)return parseInt(t,10)}
1buildBoolean(t){return"true"===t||"false"!==t&&void 0}buildArrayNumber(t){if(t)return t.split(",").map(n=>parseInt(n,10))}buildArrayString(t){if(t)return t.split(",")}}return(s=f).\u0275fac=function(t){return new(t||s)(e.LFG(Z.D),e.LFG(O.Zy))},s.\u0275prov=e.Yz7({token:s,factory:s.\u0275fac}),f})()},49662:(N,B,i)=>{i.d(B,{D:()=>U});var M=i(51197),S=i(20961);let U=(()=>{var e;class T{constructor(_,g){this.injector=_,this.applicationRef=g}createElement(_){const g=document.createElement("div");return(0,M.LMc)(_,{environmentInjector:this.applicationRef.injector,elementInjector:this.injector,hostElement:g})}injectElement(_,g){const c=g.hostView;this.applicationRef.attachView(c),_.appendChild(c.rootNodes[0])}setModel(_,g){const c={};for(const p of(0,S.eJ)(g)){const O=_.instance[p],R=g[p];_.instance[p]=R,c[p]=new M.WD2(O,R,void 0===O)}const C=_.instance;"function"==typeof C.ngOnChanges&&C.ngOnChanges(c),_.changeDetectorRef.detectChanges()}}return(e=T).\u0275fac=function(_){return new(_||e)(M.LFG(M.zs3),M.LFG(M.z2F))},e.\u0275prov=M.Yz7({token:e,factory:e.\u0275fac}),T})()},8032:(N,B,i)=>{i.d(B,{R9:()=>M.R,VY:()=>O});var M=i(54856),U=(i(31552),i(49662)),e=i(89650),T=i(19019),b=i(95498),_=i(83473),g=i(61771),c=i(34298),C=i(64155),p=i(51197);let O=(()=>{var R;class A{}return(R=A).\u0275fac=function(u){return new(u||R)},R.\u0275mod=p.oAB({type:R}),R.\u0275inj=p.cJS({providers:[M.R,U.D],imports:[e.ez,_.nC,b.Y,c.F5,C.xq,T.v,g.DV]}),A})()},61771:(N,B,i)=>{i.d(B,{ZJ:()=>S,XX:()=>O,oD:()=>C.o,DV:()=>D});var M=i(5914);class S{constructor(a){a&&(this.startDate=a.startDate||void 0,this.endDate=a.endDate||void 0,this.originallyPublishedStartDate=a.originallyPublishedStartDate||void 0,this.originallyPublishedEndDate=a.originallyPublishedEndDate||void 0,this.nsfw=a.nsfw||void 0,this.isLive=a.isLive||void 0,this.categoryOneOf=a.categoryOneOf||void 0,this.licenceOneOf=a.licenceOneOf||void 0,this.languageOneOf=a.languageOneOf||void 0,this.tagsOneOf=(0,M.$f)(a.tagsOneOf),this.tagsAllOf=(0,M.$f)(a.tagsAllOf),this.durationMin=a.durationMin?parseInt(a.durationMin,10):void 0,this.durationMax=a.durationMax?parseInt(a.durationMax,10):void 0,this.host=a.host||void 0,this.searchTarget=a.searchTarget||void 0,this.resultType=a.resultType||void 0,this.excludeAlreadyWatched=a.excludeAlreadyWatched||void 0,!this.resultType&&this.hasVideoFilter()&&(this.resultType="videos"),isNaN(this.durationMin)&&(this.durationMin=void 0),isNaN(this.durationMax)&&(this.durationMax=void 0),this.sort=a.sort||"-match")}containsValues(){return 0!==this.size()}reset(){this.startDate=void 0,this.endDate=void 0,this.originallyPublishedStartDate=void 0,this.originallyPublishedEndDate=void 0,this.nsfw=void 0,this.categoryOneOf=void 0,this.licenceOneOf=void 0,this.languageOneOf=void 0,this.tagsOneOf=void 0,this.tagsAllOf=void 0,this.durationMin=void 0,this.durationMax=void 0,this.isLive=void 0,this.host=void 0,this.sort="-match"}toUrlObject(){return{startDate:this.startDate,endDate:this.endDate,originallyPublishedStartDate:this.originallyPublishedStartDate,originallyPublishedEndDate:this.originallyPublishedEndDate,nsfw:this.nsfw,categoryOneOf:this.categoryOneOf,licenceOneOf:this.licenceOneOf,languageOneOf:this.languageOneOf,tagsOneOf:this.tagsOneOf,tagsAllOf:this.tagsAllOf,durationMin:this.durationMin,durationMax:this.durationMax,isLive:this.isLive,host:this.host,sort:this.sort,searchTarget:this.searchTarget,resultType:this.resultType,excludeAlreadyWatched:this.excludeAlreadyWatched}}toVideosAPIObject(){let a;return this.isLive&&(a="true"===this.isLive),{startDate:this.startDate,endDate:this.endDate,originallyPublishedStartDate:this.originallyPublishedStartDate,originallyPublishedEndDate:this.originallyPublishedEndDate,nsfw:this.nsfw,categoryOneOf:(0,M.$f)(this.categoryOneOf),licenceOneOf:(0,M.$f)(this.licenceOneOf),languageOneOf:(0,M.$f)(this.languageOneOf),tagsOneOf:this.tagsOneOf,tagsAllOf:this.tagsAllOf,durationMin:this.durationMin,durationMax:this.durationMax,host:this.host,isLive:a,sort:this.sort,searchTarget:this.searchTarget,excludeAlreadyWatched:this.excludeAlreadyWatched}}toPlaylistAPIObject(){return{host:this.host,searchTarget:this.searchTarget}}toChannelAPIObject(){return{host:this.host,searchTarget:this.searchTarget}}size(){let a=0;return(this.isValidValue(this.startDate)||this.isValidValue(this.endDate))&&a++,(this.isValidValue(this.originallyPublishedStartDate)||this.isValidValue(this.originallyPublishedEndDate))&&a++,this.isValidValue(this.nsfw)&&a++,this.isValidValue(this.categoryOneOf)&&a++,this.isValidValue(this.licenceOneOf)&&a++,this.isValidValue(this.languageOneOf)&&a++,this.isValidValue(this.tagsOneOf)&&a++,this.isValidValue(this.tagsAllOf)&&a++,(this.isValidValue(this.durationMin)||this.isValidValue(this.durationMax))&&a++,this.isValidValue(this.isLive)&&a++,this.isValidValue(this.host)&&a++,this.isValidValue(this.resultType)&&a++,a}isValidValue(a){return!(void 0===a||""===a||Array.isArray(a)&&0===a.length)}hasVideoFilter(){return void 0!==this.startDate||void 0!==this.endDate||void 0!==this.originallyPublishedStartDate||void 0!==this.originallyPublishedEndDate||void 0!==this.nsfw||void 0!==this.categoryOneOf||void 0!==this.licenceOneOf||void 0!==this.languageOneOf||void 0!==this.tagsOneOf||void 0!==this.tagsAllOf||void 0!==this.durationMin||void 0!==this.durationMax||void 0!==this.isLive}}var U=i(75811),e=i(40803),T=i(90961),b=i(37574),_=i(87257),g=i(13045),c=i(51197),C=i(77615);const p=U("peertube:search:FindInBulkService");let O=(()=>{var u;class a{constructor(l){this.searchService=l,this.getVideoInBulk=this.buildBulkObservableObject(this.getVideosInBulk.bind(this)),this.getChannelInBulk=this.buildBulkObservableObject(this.getChannelsInBulk.bind(this)),this.getPlaylistInBulk=this.buildBulkObservableObject(this.getPlaylistsInBulk.bind(this)),this.advancedSearchForBulk=new S({searchTarget:"local"})}getVideo(l){return p("Schedule video fetch for uuid %s.",l),this.getData({observableObject:this.getVideoInBulk,finder:y=>y.uuid===l||y.shortUUID===l,param:l})}getChannel(l){return p("Schedule channel fetch for handle %s.",l),this.getData({observableObject:this.getChannelInBulk,finder:y=>y.nameWithHost===l||y.nameWithHostForced===l,param:l})}getPlaylist(l){return p("Schedule playlist fetch for uuid %s.",l),this.getData({observableObject:this.getPlaylistInBulk,finder:y=>y.uuid===l,param:l})}getData(l){const{observableObject:y,param:m,finder:v}=l;return new e.y(I=>{y.result.pipe((0,b.h)(x=>x.params.includes(m)),(0,_.P)(),(0,g.U)(x=>x.response.data),(0,g.U)(x=>x.find(v))).subscribe({next:x=>{x?(I.next(x),I.complete()):I.error(new Error("Element " + m + " not found"))},error:x=>I.error(x)}),y.notifier.next(m)})}getVideosInBulk(l){return p("Fetching videos %s.",l.join(", ")),this.searchService.searchVideos({uuids:l,componentPagination:{itemsPerPage:l.length,currentPage:1},skipCount:!0,advancedSearch:this.advancedSearchForBulk})}getChannelsInBulk(l){return p("Fetching channels %s.",l.join(", ")),this.searchService.searchVideoChannels({handles:l,componentPagination:{itemsPerPage:l.length,currentPage:1},advancedSearch:this.advancedSearchForBulk})}getPlaylistsInBulk(l){return p("Fetching playlists %s.",l.join(", ")),this.searchService.searchVideoPlaylists({uuids:l,componentPagination:{itemsPerPage:l.length,currentPage:1},advancedSearch:this.advancedSearchForBulk})}buildBulkObservableObject(l){const y=new T.x;return{notifier:y,result:(0,M.f8)({time:500,bulkGet:l,notifierObservable:y.asObservable()})}}}return(u=a).\u0275fac=function(l){return new(l||u)(c.LFG(C.o))},u.\u0275prov=c.Yz7({token:u,factory:u.\u0275fac}),a})();var R=i(83473),A=i(64155);let D=(()=>{var u;class a{}return(u=a).\u0275fac=function(l){return new(l||u)},u.\u0275mod=c.oAB({type:u}),u.\u0275inj=c.cJS({providers:[O,C.o],imports:[R.nC,A.xq]}),a})()}
1,77615:(N,B,i)=>{i.d(B,{o:()=>O});var p,M=i(83693),S=i(75162),U=i(56997),e=i(13045),T=i(74048),b=i(83473),_=i(20553),g=i(51197),c=i(19868),C=i(64155);class O{constructor(A,D,u,a,P){this.authHttp=A,this.restExtractor=D,this.restService=u,this.videoService=a,this.playlistService=P}searchVideos(A){const{search:D,uuids:u,componentPagination:a,advancedSearch:P,skipCount:l}=A;if(void 0!==(null==P?void 0:P.resultType)&&"videos"!==P.resultType)return(0,M.of)({total:0,data:[]});const y=O.BASE_SEARCH_URL+"videos";let m;a&&(m=this.restService.componentToRestPagination(a));let v=new T.LE;if(v=this.restService.addRestGetParams(v,m),D&&(v=v.append("search",D)),!0===l&&(v=v.append("skipCount",!0)),u&&(v=this.restService.addArrayParams(v,"uuids",u)),P){const I=P.toVideosAPIObject();v=this.restService.addObjectParams(v,I)}return this.authHttp.get(y,{params:v}).pipe((0,S.w)(I=>this.videoService.extractVideos(I)),(0,U.K)(I=>this.restExtractor.handleError(I)))}searchVideoChannels(A){const{search:D,advancedSearch:u,componentPagination:a,handles:P}=A;if(void 0!==(null==u?void 0:u.resultType)&&"channels"!==u.resultType)return(0,M.of)({total:0,data:[]});const l=O.BASE_SEARCH_URL+"video-channels";let y;a&&(y=this.restService.componentToRestPagination(a));
1let m=new T.LE;if(m=this.restService.addRestGetParams(m,y),D&&(m=m.append("search",D)),P&&(m=this.restService.addArrayParams(m,"handles",P)),u){const v=u.toChannelAPIObject();m=this.restService.addObjectParams(m,v)}return this.authHttp.get(l,{params:m}).pipe((0,e.U)(v=>b.B1.extractVideoChannels(v)),(0,U.K)(v=>this.restExtractor.handleError(v)))}searchVideoPlaylists(A){const{search:D,advancedSearch:u,componentPagination:a,uuids:P}=A;if(void 0!==(null==u?void 0:u.resultType)&&"playlists"!==u.resultType)return(0,M.of)({total:0,data:[]});const l=O.BASE_SEARCH_URL+"video-playlists";let y;a&&(y=this.restService.componentToRestPagination(a));let m=new T.LE;if(m=this.restService.addRestGetParams(m,y),D&&(m=m.append("search",D)),P&&(m=this.restService.addArrayParams(m,"uuids",P)),u){const v=u.toPlaylistAPIObject();m=this.restService.addObjectParams(m,v)}return this.authHttp.get(l,{params:m}).pipe((0,S.w)(v=>this.playlistService.extractPlaylists(v)),(0,U.K)(v=>this.restExtractor.handleError(v)))}}(p=O).BASE_SEARCH_URL=_.N.apiUrl+"/api/v1/search/",p.\u0275fac=function(A){return new(A||p)(g.LFG(T.eN),g.LFG(c.DI),g.LFG(c.vg),g.LFG(b.kI),g.LFG(C.Qq))},p.\u0275prov=g.Yz7({token:p,factory:p.\u0275fac})}}]); 2//# sourceMappingURL=8032.3104078997e0f884.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.