PageSourceSearch

https://neat.tube/client/en-US/chunk-C2KV35ZG.js

js neat.tube collected 2026-10-05 10:33:24 UTC 6,415 bytes, 3 lines download raw bytes

1import{b as x}from"./chunk-G6JMM6YH.js";import{c as A}from"./chunk-SGCHCWLM.js";import{d as b}from"./chunk-5TE7477A.js";import{Bf as V,C as g,R as p,Vf as u,Z as m,ba as l,ih as D,k as O,nd as y,nh as S,o as P,qd as v}from"./chunk-NY4TI4KT.js";import{i as o}from"./chunk-IQVXR75E.js";var s=class s{authHttp=l(v);restExtractor=l(D);restService=l(S);videoService=l(A);playlistService=l(x);searchVideos(e){let{search:n,uuids:a,componentPagination:d,advancedSearch:r,skipCount:c}=e;if(r?.resultType!==void 0&&r.resultType!=="videos")return O({total:0,data:[]});let h=s.BASE_SEARCH_URL+"videos",i;d&&(i=this.restService.componentToRestPagination(d));let t=new y;if(t=this.restService.addRestGetParams(t,i),n&&(t=t.append("search",n)),c===!0&&(t=t.append("skipCount",!0)),a&&(t=this.restService.addArrayParams(t,"uuids",a)),r){let f=r.toVideosAPIObject();t=this.restService.addObjectParams(t,f)}return t=this.videoService.buildNSFWParams(t,{}),this.authHttp.get(h,{params:t}).pipe(p(f=>this.videoService.extractVideos(f)),g(f=>this.restExtractor.handleError(f)))}searchVideoChannels(e){let{search:n,advancedSearch:a,componentPagination:d,handles:r}=e;if(a?.resultType!==void 0&&a.resultType!=="channels")return O({total:0,data:[]});let c=s.BASE_SEARCH_URL+"video-channels",h;d&&(h=this.restService.componentToRestPagination(d));let i=new y;if(i=this.restService.addRestGetParams(i,h),n&&(i=i.append("search",n)),r&&(i=this.restService.addArrayParams(i,"handles",r)),a){let t=a.toChannelAPIObject();i=this.restService.addObjectParams(i,t)}return this.authHttp.get(c,{params:i}).pipe(P(t=>b.extractVideoChannels(t)),g(t=>this.restExtractor.handleError(t)))}searchVideoPlaylists(e){let{search:n,advancedSearch:a,componentPagination:d,uuids:r}=e;if(a?.resultType!==void 0&&a.resultType!=="playlists")return O({total:0,data:[]});let c=s.BASE_SEARCH_URL+"video-playlists",h;d&&(h=this.restService.componentToRestPagination(d));let i=new y;if(i=this.restService.addRestGetParams(i,h),n&&(i=i.append("search",n)),r&&(i=this.restService.addArrayParams(i,"uuids",r)),a){let t=a.toPlaylistAPIObject();i=this.restService.addObjectParams(i,t)}return this.authHttp.get(c,{params:i}).pipe(p(t=>this.playlistService.extractPlaylists(t)),g(t=>this.restExtractor.handleError(t)))}};o(s,"BASE_SEARCH_URL",V.apiUrl+"/api/v1/search/"),o(s,"\u0275fac",function(n){return new(n||s)}),o(s,"\u0275prov",m({token:s,factory:s.\u0275fac}));var T=s;var E=class{startDate;endDate;originallyPublishedStartDate;originallyPublishedEndDate;categoryOneOf;licenceOneOf;languageOneOf;tagsOneOf;tagsAllOf;durationMin;durationMax;isLive;host;sort;searchTarget;resultType;excludeAlreadyWatched;constructor(e){e&&(this.startDate=e.startDate||void 0,this.endDate=e.endDate||void 0,this.originallyPublishedStartDate=e.originallyPublishedStartDate||void 0,this.originallyPublishedEndDate=e.originallyPublishedEndDate||void 0,this.isLive=e.isLive||void 0,this.categoryOneOf=e.categoryOneOf||void 0,this.licenceOneOf=e.licenceOneOf||void 0,this.languageOneOf=e.languageOneOf||void 0,this.tagsOneOf=u(e.tagsOneOf),this.tagsAllOf=u(e.tagsAllOf),this.durationMin=e.durationMin?parseInt(e.durationMin,10):void 0,this.durationMax=e.durationMax?parseInt(e.durationMax,10):void 0,this.host=e.host||void 0,this.searchTarget=e.searchTarget||void 0,this.resultType=e.resultType||void 0,this.excludeAlreadyWatched=e.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=e.sort||"-match")}containsValues(){return this.size()!==0}reset(){this.startDate=void 0,this.endDate=void 0,this.originallyPublishedStartDate=void 0,this.originallyPublishedEndDate=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,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 e;return this.isLive&&(e=this.isLive==="true"),{startDate:this.startDate,endD
1ate:this.endDate,originallyPublishedStartDate:this.originallyPublishedStartDate,originallyPublishedEndDate:this.originallyPublishedEndDate,categoryOneOf:u(this.categoryOneOf),licenceOneOf:u(this.licenceOneOf),languageOneOf:u(this.languageOneOf),tagsOneOf:this.tagsOneOf,tagsAllOf:this.tagsAllOf,durationMin:this.durationMin,durationMax:this.durationMax,host:this.host,isLive:e,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 e=0;return(this.isValidValue(this.startDate)||this.isValidValue(this.endDate))&&e++,(this.isValidValue(this.originallyPublishedStartDate)||this.isValidValue(this.originallyPublishedEndDate))&&e++,this.isValidValue(this.categoryOneOf)&&e++,this.isValidValue(this.licenceOneOf)&&e++,this.isValidValue(this.languageOneOf)&&e++,this.isValidValue(this.tagsOneOf)&&e++,this.isValidValue(this.tagsAllOf)&&e++,(this.isValidValue(this.durationMin)||this.isValidValue(this.durationMax))&&e++,this.isValidValue(this.isLive)&&e++,this.isValidValue(this.host)&&e++,this.isValidValue(this.resultType)&&e++,e}isValidValue(e){return!(e===void 0||e===""||Array.isArray(e)&&e.length===0)}hasVideoFilter(){return this.startDate!==void 0||this.endDate!==void 0||this.originallyPublishedStartDate!==void 0||this.originallyPublishedEndDate!==void 0||this.categoryOneOf!==void 0||this.licenceOneOf!==void 0||this.tagsOneOf!==void 0||this.tagsAllOf!==void 0||this.durationMin!==void 0||this.durationMax!==void 0||this.isLive!==void 0}};export{E as a,T as b};
2/**i18n:347eeb695970c32bc275618edc2e751c67145d9fc3012e70543c114a99b9e016*/
3//# sourceMappingURL=chunk-C2KV35ZG.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.