PageSourceSearch

https://celebrityai.club/_next/static/chunks/2272.84388fa3bbe5b9a2.js

js celebrityai.club collected 2026-10-02 15:30:59 UTC 2,919 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2272],{52272:(e,t,a)=>{a.d(t,{waveSpeedService:()=>r});var o=a(55036);class i{async generateInfiniteTalk(e){var t;e.image,e.video;let a=e.video?this.v2vModelId:this.modelId,o=await fetch("".concat(this.baseUrl,"/").concat(a),{method:"POST",headers:{Authorization:"Bearer ".concat(this.apiKey),"Content-Type":"application/json"},body:JSON.stringify({audio:e.audio,image:e.image,video:e.video,mask_image:e.mask_image,prompt:e.prompt||"A person naturally speaking",seed:null!=(t=e.seed)?t:-1})});if(!o.ok){let e=await o.text();throw Error("WaveSpeed API error: ".concat(o.status," - ").concat(e))}return await o.json()}async generateInfiniteTalkWithWebhook(e,t){var a;e.image,e.video;let o=e.video?this.v2vModelId:this.modelId,i="".concat(this.baseUrl,"/").concat(o,"?webhook=").concat(encodeURIComponent(t)),r=await fetch(i,{method:"POST",headers:{Authorization:"Bearer ".concat(this.apiKey),"Content-Type":"application/json"},body:JSON.stringify({audio:e.audio,image:e.image,video:e.video,mask_image:e.mask_image,prompt:e.prompt||"A person naturally speaking",seed:null!=(a=e.seed)?a:-1})});if(!r.ok){let e=await r.text();throw Error("WaveSpeed API error: ".concat(r.status," - ").concat(e))}return await r.json()}async generateInfiniteTalkV2VWithWebhook(e,t){return this.generateInfiniteTalkWithWebhook({audio:e.audio,video:e.video,prompt:e.prompt,seed:e.seed},t)}async getTaskStatus(e){let t=await fetch("".concat(this.baseUrl,"/").concat(this.modelId,"/requests/").concat(e),{method:"GET",headers:{Authorization:"Bearer ".concat(this.apiKey),"Content-Type":"application/json"}});if(!t.ok){let e=await t.text();throw Error("WaveSpeed status check error: ".concat(t.status," - ").concat(e))}return t.json()}async generateInfiniteTalkWithPolling(e){var t,a;let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5e3,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:6e5,r=await this.generateInfiniteTalk(e);if(!r.id)throw Error("WaveSpeed did not return a task ID");if("completed"===r.status&&(null==(t=r.outputs)?void 0:t.length))return r;let s=Date.now(),n=r.status;for(;Date.now()-s<i;){await this._sleep(o);try{let e=await this.getTaskStatus(r.id);if(e.status!==n&&(n=e.status),"completed"===e.status){if(e.outputs&&e.outputs.length>0)return e;throw Error("Task completed but no output URL")}if("failed"===e.status)throw Error("WaveSpeed task failed: ".concat(e.error||"Unknown error"));Date.now()}catch(e){if(null==(a=e.message)?void 0:a.includes("status check error"))continue;throw e}}throw Error("WaveSpeed task timed out after ".concat(i/1e3," seconds"))}_sleep(e){return new Promise(t=>setTimeout(t,e))}constructor(){this.baseUrl="https://api.wavespeed.ai/api/v3",this.modelId="wavespeed-ai/infinitetalk-fast",this.v2vModelId="wavespeed-ai/infinitetalk-v2v",this.apiKey=o.env.WAVESPEED_API_KEY||"",this.apiKey}}let r=new i}}]);

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.