1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[38493,53832],{4320:e=>{e.exports={homeContent:"page_homeContent__v1ME9",createCardsCarousel:"page_createCardsCarousel__ij_C3",tutorialCarousel:"page_tutorialCarousel__pM0IQ",tutorialSection:"page_tutorialSection__NIQSc"}},9950:e=>{e.exports={container:"styles_container__8dYFF",content:"styles_content__Iiwqt",iconContainer:"styles_iconContainer__mOutH",icon:"styles_icon__uQQl_",loading:"styles_loading__Lg5WQ",spin:"styles_spin__QeGkN",title:"styles_title__0Kilx",message:"styles_message___d8qT",actionContainer:"styles_actionContainer__koobE",actionButton:"styles_actionButton__wYRC8",actionIcon:"styles_actionIcon__05xwg"}},14140:(e,t,a)=>{Promise.resolve().then(a.bind(a,63294)),Promise.resolve().then(a.bind(a,70746))},14807:e=>{e.exports={feedSwitcher:"FeedSwitcher_feedSwitcher__zoGsF",tabs:"FeedSwitcher_tabs__msscp",tabsHeader:"FeedSwitcher_tabsHeader__cMICy",tabsList:"FeedSwitcher_tabsList__oNezu",tabsTrigger:"FeedSwitcher_tabsTrigger__tRszP",tabsContent:"FeedSwitcher_tabsContent__CTxMY"}},16256:e=>{e.exports={bannersContainer:"styles_bannersContainer__Zeh3_",bannerItem:"styles_bannerItem__JGOhs",bannerText:"styles_bannerText__zwL0J",bannerButtons:"styles_bannerButtons__sXZS1"}},17967:e=>{e.exports={videoCard:"FeaturedVideoCard_videoCard__XQGSd",landscape:"FeaturedVideoCard_landscape__kcXLi",portrait:"FeaturedVideoCard_portrait__7L4eX",hoverPlayVideoWrapper:"FeaturedVideoCard_hoverPlayVideoWrapper__WL6jd",video:"FeaturedVideoCard_video__FA9vi",loadingIcon:"FeaturedVideoCard_loadingIcon__ByZma",spin:"FeaturedVideoCard_spin__djkKf",progressBar:"FeaturedVideoCard_progressBar__R3uNU",videoInfo:"FeaturedVideoCard_videoInfo___4IJp",videoTitle:"FeaturedVideoCard_videoTitle__wXvi0",videoAuthor:"FeaturedVideoCard_videoAuthor__AvqIW",videoMeta:"FeaturedVideoCard_videoMeta__Assx4",videoDuration:"FeaturedVideoCard_videoDuration__tCeSJ",videoScore:"FeaturedVideoCard_videoScore__5VfKJ",recrete:"FeaturedVideoCard_recrete__nuQSs",recreateButton:"FeaturedVideoCard_recreateButton__qTIub"}},22420:e=>{e.exports={videoWaterfall:"VideoWaterfall_videoWaterfall__W5APK",title:"VideoWaterfall_title__fcpn1",stateContainer:"VideoWaterfall_stateContainer__RLzTC",videosGrid:"VideoWaterfall_videosGrid__khkTW",loadMoreContainer:"VideoWaterfall_loadMoreContainer__JeKlm",errorText:"VideoWaterfall_errorText__7DJ0D",loadMoreButton:"VideoWaterfall_loadMoreButton__9n9QP",footer:"VideoWaterfall_footer__3mg20"}},25016:e=>{e.exports={autoLoadMoreContainer:"AutoLoadMoreButton_autoLoadMoreContainer__gmRYS",autoLoadMoreButton:"AutoLoadMoreButton_autoLoadMoreButton__7jkkY"}},30285:(e,t,a)=>{"use strict";a.d(t,{$:()=>l,r:()=>n});var r=a(95155);a(12115);var i=a(74466),s=a(69443),o=a(59434);let n=(0,i.F)("inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"cursor-pointer bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",primary:"cursor-pointer bg-primary text-primary-foreground shadow-xs font-semibold hover:bg-primary/90",destructive:"cursor-pointer bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",outline:"cursor-pointer border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",selected:"cursor-pointer border border-primary bg-primary/10 text-primary shadow-xs",secondary:"cursor-pointer bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"cursor-pointer hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"cursor-pointer text-primary underline-offset-4 hover:underline"},status:{loading:"cursor-progress opacity-80",disabled:"cursor-not-allowed opacity-50"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function l(e){let{className:t,variant:a="default",size:i="default",status:l,asChild:c=!1,...d}=e,u=c?s.bL:"button";return(0,r.jsx)(u,{"data-slot":"button","data-variant":a,"data-size":i,className:(0,o.cn)(n({variant:a,size:i,status:l,className:t})),...d})}},39790:(e,t,a)=>{"use strict";a.d(t,{AutoplayCarousel:()=>c});var r=a(95155),i=a(12115),s=a(91091),o=a(85805),n=a(40416),l=a(59434);let c=e=>{let{children:t,className:a,showNavigation:c=!1,autoplayDelay:d=4e3,placement:u="center"}=e,h=(0,n.a)(),[p,g]=(0,i.useState)(),[m,v]=(0,i.useState)(0),[f,_]=(0,i.useState)(t.length),[y]=(0,i.useState)(()=>[(0,o.A)({delay:d,stopOnMouseEnter:!h,stopOnInteraction:!1,stopOnFocusIn:!0,playOnInit:!0})]);return(0,i.useEffect)(()=>{p&&(_(p.scrollSnapList().length),v(p.selectedScrollSnap()+1),p.on("select",()=>{v(p.selectedScrollSnap()+1)}),p.on("resize",()=>{_(p.scrollSnapList().length),v(p.selectedScrollSnap()+1)}))}
1,[p]),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsxs)(s.FN,{opts:{align:h?u:"start",loop:!0},plugins:y,setApi:g,className:a,children:[(0,r.jsx)(s.Wk,{className:"-ml-2 md:-ml-4",children:t.map((e,t)=>(0,r.jsx)(s.A7,{className:"pl-2 md:pl-4 basis-auto",children:e},t))}),c&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.Q8,{}),(0,r.jsx)(s.Oj,{})]})]}),(0,r.jsx)("div",{className:"flex justify-center mt-2 mb-4 space-x-2",children:Array.from({length:f},(e,t)=>(0,r.jsx)("button",{className:(0,l.cn)("w-2 h-2 rounded-full transition-colors duration-200 cursor-pointer",m===t+1?"bg-white":"bg-white/40 hover:bg-white/60"),onClick:()=>{null==p||p.scrollTo(t)},"aria-label":"Go to slide ".concat(t+1)},t))})]})}},41533:(e,t,a)=>{"use strict";a.d(t,{C$:()=>n,Cf:()=>r,Dr:()=>s,Ip:()=>d,Wp:()=>i,bj:()=>c,u1:()=>o,yz:()=>l});class r extends Error{get causeAsError(){return this.cause instanceof Error?this.cause:null}constructor(e,t){super(e,{cause:t})}}class i extends r{constructor(e,t){let a=i.ERROR_CODE_TABLE[String(e)]||i.ERROR_CODE_TABLE["500"];super(a,void 0),this.code=e,this.serverMessage=t||a}}i.ERROR_CODE_TABLE={"-1":"Unknown error",500:"Oops, something went wrong. Please try again later.",2000001:"Verification code is incorrect.",2000014:"This account is already registered. Please log in.",2000015:"This account is not registered. Please sign up first.",0x2625a32:"Your local data is out of sync with the server. Please refresh the page to get the latest version.",0x2625a33:"Project not found",0x2625a34:"Project id is required.",4000100:"You have already submitted this survey",4e5:"Invalid request. Please check your inputs.",400001:"Invalid request data. Please try again.",400002:"Data has been updated. Please refresh and try again.",400003:"Price has changed. Please refresh and try again.",400100:"The content may violate platform policy regulations. Please contact us via Discord for assistance.",400101:"Content may violate third-party content regulations. Please check if your content conflicts with existing copyrights.",400102:"Content may violate policies on nudity or sexual content. Please ensure your content follows community guidelines.",400103:"Uploading realistic human figures is not supported. Please use other types of images or ensure your image complies with the requirements.",400104:"Content may violate violence policies. Please check for inappropriate violent elements in your content.",400105:"Content may violate policies on minors. Ensure no minors or content involving minors are present in your submission.",400106:"Content may violate illegal activity policies. Avoid uploading content depicting illegal activities.",400107:"Prompt issue, please adjust and try again. Modify your prompt or ensure the correct format is used.",401e3:"Not logged in or login has expired. Please log in again and try again.",401001:"Your authorization has expired. Please reconnect your account.",401002:"Insufficient permissions. Please grant the required access.",402e3:"Insufficient credits. Please purchase more to continue.",402001:"This feature requires a membership subscription.",402002:"This model requires a higher subscription plan.",402010:"Seedance 2.0 is available on the Studio plan â upgrade to use this model.",403e3:"Resource access failed. Please contact us via Discord for assistance.",404e3:"Resource acquisition failed. Please contact us via Discord for assistance.",5e5:"Something went wrong. Please try again later.",500001:"Processing error. Please try again.",500002:"The request timed out. Please try again.",500003:"Processing error. Please try again.",500004:"The task was cancelled.",500005:"An unexpected error occurred. Please try again.",500006:"File processing error. Please try again.",500007:"Network error. Please check your connection and try again.",500100:"Service temporarily unavailable. Please try again later.",500101:"Service temporarily unavailable. Please try again later.",500102:"Service temporarily unavailable. Please try again later.",500103:"File storage error. Please try again.",500104:"Generation service error. Please try again.",500105:"Service temporarily unavailable. Please try again later.",500106:"Service temporarily unavailable. Please try again later.",500107:"Generation service error. Please try again.",500108:"Generation service error. Please try again.",500109:"Video processing error. Please try again.",500110:"Video processing error. Please try again.",500111:"Service is currently busy. Please try again later.",500112:"Service is currently busy. Please try again later.",500113:"YouTube service error. Please try again.",500114:"YouTube quota exceeded. Please try again later.",500115:"Too many users right now. Please try again in a moment, or switch to Seedance 2.0 Pro for priority generation.",500200:"Processing error. Please try again.",500300:"Operation failed. Please try again.",500302:"Connection error. Please refresh the page.",500303:"Generation failed. Please try again.",500304:"Processing failed. Please try again.",500305:"Auto-generation failed. Please try again.",500306:"Animation failed. Please try again.",500307:"Query failed. Please try again.",500308:"Request timed out. Please try again.",500309:"Workflow execution error. Please try again.",500310:"Workflow execution error. Please try again.",500311:"Invalid workflow configuration. Please contact support.",501e3:"This feature is not yet available."};class s extends r{constructor(e,t,a,r="A connection error [".concat(t,"] occurred to ").concat(e)){super(r,a instanceof Error?a:a?Error(String(a)):void 0),this.httpStatusCode=t,this.url=e}}function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.ERROR_CODE_TABLE["500"];return null==e?t:i.ERROR_CODE_TABLE[String(e)]||t}function n(e,t){return e instanceof i&&e.code===t}let l=402010,c=402002;
1class d extends Error{static toast(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info";return new d(e,t,!1)}static blocking(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"error";return new d(e,t,!0)}constructor(e,t,a=!1){super(e),this.severity=t,this.blocking=a}}},59434:(e,t,a)=>{"use strict";a.d(t,{cn:()=>s});var r=a(52596),i=a(39688);function s(){for(var e=arguments.length,t=Array(e),a=0;a<e;a++)t[a]=arguments[a];return(0,i.QP)((0,r.$)(t))}},62523:(e,t,a)=>{"use strict";a.d(t,{p:()=>s});var r=a(95155);a(12115);var i=a(59434);function s(e){let{className:t,type:a,...s}=e;return(0,r.jsx)("input",{type:a,"data-slot":"input",className:(0,i.cn)("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",t),...s})}},63294:(e,t,a)=>{"use strict";a.d(t,{default:()=>T});var r=a(95155),i=a(12115),s=a(63438),o=a(29543),n=a(82031),l=a(82795);class c{static getCachedInstance(){return this.cachedInstance}get isEmpty(){return!this.error&&!this.isLoading&&!this.isLoadingMore&&0===this.videos.length&&this.initialized}get isEmptyLoading(){return!this.error&&(this.isLoading||!this.initialized)&&0===this.videos.length}clearError(){this.error=null}async loadInitial(){if(!this.initialized&&!this.isLoading){(0,o.h5)(()=>{this.isLoading=!0,this.error=null});try{let{posts:e,has_more:t}=await (0,l.eb)({page_size:this.pageSize}),a=e.map(e=>(0,l.jg)(e,!1));(0,o.h5)(()=>{this.videos=a,this.hasMore=t,this.isLoading=!1,this.initialized=!0})}catch(e){console.error("Failed to load stream posts:",e),(0,o.h5)(()=>{this.isLoading=!1,this.initialized=!0,this.error=e instanceof Error?e.message:"Load failed, please try again."})}}}async loadMore(){if(!this.isLoadingMore&&this.hasMore&&!this.isLoading){(0,o.h5)(()=>{this.isLoadingMore=!0,this.error=null});try{var e;let t=null==(e=this.videos[this.videos.length-1])?void 0:e.id;if(!t)return void(0,o.h5)(()=>{this.hasMore=!1,this.isLoadingMore=!1});let{posts:a,has_more:r}=await (0,l.eb)({page_size:this.pageSize,last_id:t}),i=a.map(e=>(0,l.jg)(e,!1));(0,o.h5)(()=>{this.videos.push(...i),(i.length<this.pageSize||!r)&&(this.hasMore=!1),this.isLoadingMore=!1})}catch(e){console.error("Failed to load more stream posts:",e),(0,o.h5)(()=>{this.isLoadingMore=!1,this.error=e instanceof Error?e.message:"Load failed, please try again."})}}}constructor(){this.videos=[],this.isLoading=!1,this.isLoadingMore=!1,this.hasMore=!0,this.pageSize=10,this.error=null,this.initialized=!1,(0,n.p)(this,{videos:o.sH.deep},{deep:!1,autoBind:!0}),n.f||(c.cachedInstance=this)}}c.cachedInstance=null;var d=a(30285),u=a(73632),h=a(22420),p=a.n(h),g=a(17967),m=a.n(g),v=a(52596),f=a(35695),_=a(64250),y=a(40416),b=a(55607),x=a(1920);let w=e=>{let{video:t}=e,[a,s]=(0,i.useState)(!1),[o,n]=(0,i.useState)(!1),[l,c]=(0,i.useState)(0),[d,u]=(0,i.useState)(!1),h=(0,i.useRef)(null),p=(0,i.useRef)(0);return(0,i.useEffect)(()=>{let e=h.current;return()=>{window.clearTimeout(p.current),null==e||e.pause()}},[]),(0,r.jsxs)("div",{className:m().hoverPlayVideoWrapper,onMouseEnter:()=>{p.current=window.setTimeout(async()=>{n(!0);try{var e;await (null==(e=h.current)?void 0:e.play())}catch(e){}},200)},onMouseLeave:()=>{if(window.clearTimeout(p.current),o){let e=h.current;e&&(e.pause(),e.load()),n(!1),u(!1)}},children:[(0,r.jsx)("video",{ref:h,src:t.video_url,poster:t.cover_url,playsInline:!0,muted:!0,loop:!0,preload:"none",className:m().video,onPlaying:()=>{s(!0),u(!1)},onTimeUpdate:e=>{let t=e.target;c(t.currentTime/t.duration)},onWaiting:()=>{u(!0)}}),d||o&&!a?(0,r.jsx)("div",{className:m().loadingIcon}):null,o&&a&&(0,r.jsx)("div",{className:m().progressBar,style:{"--progress-percentage":"".concat(100*l,"%")}})]})},j=e=>{let{video:t}=e,a=(0,f.useRouter)(),{cloneProject:s,cloneStandalone:o}=(0,x.u)(),[n,l]=(0,i.useState)(!1),c=t.parameter,d=!!c&&("project"===c.type&&!!c.ideaI
1D||"standalone"===c.type&&!!c.videoPrompt||"template"===c.type&&!!c.templateId);return(0,r.jsxs)("div",{onClick:()=>{var e;let r=(0,y.F)()?window.scrollY:null==(e=window.document.querySelector('main[role="main"]'))?void 0:e.scrollTop;window.history.replaceState({...window.history.state,scrollPosition:r},"");let i="stream"===t.source?_.RU.StreamVideoDetail:_.RU.FeaturedVideoDetail;a.push("".concat(i).concat(t.id))},className:(0,v.A)(m().videoCard,{[m().landscape]:"landscape"===t.orientation,[m().portrait]:"portrait"===t.orientation}),children:[(0,r.jsx)(w,{video:t}),(0,r.jsxs)("div",{className:m().videoInfo,children:[(0,r.jsxs)("div",{className:m().videoMeta,children:[(0,r.jsx)("span",{className:m().videoAuthor,children:t.user_nickname}),(0,r.jsxs)("span",{className:m().videoScore,children:[(0,r.jsx)(b.A,{size:12}),(0,r.jsx)("span",{children:t.score})]}),(0,r.jsx)("span",{className:m().videoDuration,children:(e=>{if((e=Math.round(e))<60)return"".concat(e,"s");let t=Math.floor(e/60),a=e%60;return"".concat(t,":").concat(a.toString().padStart(2,"0"))})(t.video_duration)})]}),(0,r.jsx)("h3",{className:m().videoTitle,children:t.title})]}),d?(0,r.jsx)("div",{className:m().recrete,onClick:e=>e.stopPropagation(),children:(0,r.jsx)("div",{className:(0,v.A)(m().recreateButton,{[m().loading]:n}),onClick:()=>{d&&c&&("project"===c.type?(l(!0),s(c.ideaID).finally(()=>{l(!1)})):"standalone"===c.type?o({videoPrompt:c.videoPrompt,modelName:c.modelName,aspectRatio:c.aspectRatio,imageID:c.imageID,imageUrl:c.imageUrl,enableAudio:c.enableAudio,duration:c.duration}):"template"===c.type&&a.push("".concat(_.RU.StandaloneTemplate,"/").concat(c.templateId)))},children:(0,r.jsx)("span",{children:"Recreate"})})}):null]})};var C=a(51154);class P{constructor(){this.buttonRef=null,this.intersectionObserver=null,this.isObserverInitialized=!1,this.setButtonRef=e=>{this.buttonRef=e,this.initializeObserver()},this.initializeObserver=()=>{!this.isObserverInitialized&&this.buttonRef&&(this.intersectionObserver=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&this.buttonRef&&!this.buttonRef.disabled&&this.buttonRef.click()})},{threshold:1,rootMargin:"50px"}),this.intersectionObserver.observe(this.buttonRef),this.isObserverInitialized=!0)},this.cleanup=()=>{this.intersectionObserver&&(this.intersectionObserver.disconnect(),this.intersectionObserver=null,this.isObserverInitialized=!1)},this.checkVisibilityAndTrigger=()=>{if(!this.buttonRef)return;let e=this.buttonRef.getBoundingClientRect();e.top>=0&&e.left>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&e.right<=(window.innerWidth||document.documentElement.clientWidth)&&!this.buttonRef.disabled&&this.buttonRef.click()},(0,n.p)(this,{},{deep:!1,autoBind:!0})}}var N=a(25016),S=a.n(N);let k=(0,s.PA)(e=>{let{onClick:t,disabled:a=!1,isLoading:s=!1,loadingText:o="Loading more...",defaultText:n="Load More",variant:l="outline",className:c}=e,[u]=(0,i.useState)(()=>new P),h=(0,i.useRef)(null),p=(0,i.useRef)(a);return(0,i.useEffect)(()=>(u.setButtonRef(h.current),()=>{u.cleanup()}),[u]),(0,i.useEffect)(()=>{p.current&&!a&&setTimeout(()=>{u.checkVisibilityAndTrigger()},100),p.current=a},[a,u]),(0,r.jsx)("div",{className:S().autoLoadMoreContainer,children:(0,r.jsx)(d.$,{ref:h,onClick:()=>{t()},disabled:a,variant:l,className:"".concat(S().autoLoadMoreButton," ").concat(c||""),children:s?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(C.A,{className:"mr-2 h-4 w-4 animate-spin"}),(0,r.jsx)("span",{children:o})]}):(0,r.jsx)("span",{children:n})})})});var R=a(81507);let L={default:5,1920:4,1600:3,1200:2},A=()=>((0,i.useLayoutEffect)(()=>{let e=e=>{var t;if(null==(t=c.getCachedInstance())||!t.isLoadingMore)if((0,y.F)())window.scrollY=e;else{let t=window.document.querySelector('main[role="main"]');t&&(t.scrollTop=e)}},t=window.history.state.scrollPosition;"number"==typeof t&&(window.history.replaceState({...window.history.state,scrollPosition:void 0},""),(async()=>{e(0),await new Promise(requestAnimationFrame),e(t+1),await new Promise(requestAnimationFrame),e(t)})())},[]),null),I=(0,s.PA)(()=>{let[e]=(0,i.useState)(()=>c.getCachedInstance()||new c);return(0,i.useEffect)(()=>{e.loadInitial()},[e]),(0,r.jsx)("div",{className:p().videoWaterfall,children:(0,r.jsxs)(u.A,{state:e.isEmpty?"empty":e.isEmptyLoading?"loading":"ready",className:p().stateContainer,emptyMessage:"No stream posts available.",children:[(0,r.jsx)(R.A,{breakpointCols:L,className:"mansory-grid",columnClassName:"mansory-grid_column",children:e.videos.map(e=>(0,r.jsx)(j,{video:e},e.id))}),(0,r.jsx)(A,{}),(0,r.jsx)("div",{className:p().footer,children:e.error?(0,r.jsxs)("div",{className:p().loadMoreContainer,children:[(0,r.jsx)("div",{className:p().errorText,children:"Something went wrong when loading more posts."}),(0,r.jsx)(d.$,{onClick:()=>{e.clearError(),0===e.videos.length?e.loadInitial():e.loadMore()},variant:"outline",children:"Retry"})]}):e.hasMore&&!e.error?(0,r.jsx)(k,{onClick:()=>{e.loadMore()},disabled:e.isLoadingMore,isLoading:e.isLoadingMore,loadingText:"Loading more...",defaultText:"Load More",variant:"outline"}):null})]})})});var E=a(14807),z=a.n(E);function T(){return(0,r.jsx)("section",{className:z().feedSwitcher,children:(0,r.jsx)(I,{})})}},67839:(e,t,a)=>{"use strict";a.d(t,{LN:()=>j,O7:()=>u,Pf:()=>w,Sx:()=>d,ZG:()=>p,qo:()=>x,wt:()=>C});var r=a(91950),i=a(41533),s=a(82031),o=a(27996),n=a(74131),l=a(35695),c=a(87358);let d="x-everfir-app-id",u="videoinu",h={[d]:u};function p(e){let t=new Headers(e);return t.set(d,u),t}function g(e){Object.assign(e.config.headers,h)}let m=/^([a-z0-9][a-z0-9-]*[a-z0-9])\.test\.videoinu\.com$/;function v(e){return"http://".concat(e?"ace-backend-go-test-".concat(e):"ace-backend-go",":8080/api/backend")}let f=r.yz?c.env.PYTHON_BACKEND_HOST||"https://test-backend.videoinu.com":"http://ace-backend:4321",_=r.yz?c.env.USER_BACKEND_HOST||"https://test.videoinu.com/api/":"http://user-account:8080",y=r.yz?c.env.GO_BACKEND_HOST?"".concat(c.env.GO_BACKEND_HOST,"/api/backend"):"https://test-backend.videoinu.com/api/backend":v(c.env.LANE_ID||""),b={timeout:6e4,requestAdapter:(0,n.A)(),cacheFor:{GET:0},beforeRequest:s.f?async e=>{if(e.url.startsWith("/public"))return;let{headers:t}=await Promise.all([a.e(13832),a.e(66593)]).then(a.bind(a,66593)),r=await t();
1Object.assign(e.config.headers,{cookie:r.get("cookie")||void 0})}:()=>{},responded:{async onSuccess(e,t){if(e.status>=400)try{let t=await e.json();if(console.log("ServerAPIResponse Code >= 400",t),0!==t.err_code)throw new i.Wp(t.err_code||-1,t.err_msg||"(Unknown error)")}catch(t){if(t instanceof i.Wp)throw t;throw new i.Dr(e.url,e.status)}try{let a=await e.json();if(0!==a.err_code)throw new i.Wp(a.err_code||-1,a.err_msg||"(Unknown error)");if(t.url.endsWith("?raw"))return{body:a,response:e};return a.data}catch(t){if(t instanceof i.Wp)throw t;throw new i.Dr(e.url,e.status||-1,t)}},onError(e,t){if(s.f&&(0,l.unstable_rethrow)(e),e instanceof i.Cf)throw e;throw new i.Dr(t.url,-1,e)}}},x=(0,o.s5)({...b,baseURL:s.f?_:"/api",beforeRequest(e){var t;if(g(e),Object.assign(e.config.headers,{"x-everfir-app-type":"web","x-everfir-business":"ace"}),!s.f){let t=localStorage.getItem("utm_source_local");t&&(e.config.headers["x-everfir-utm-source"]=t);let a=localStorage.getItem("utm_id_local");a&&(e.config.headers["x-everfir-utm-id"]=a);let r=localStorage.getItem("utm_medium_local");r&&(e.config.headers["x-everfir-utm-medium"]=r);let i=localStorage.getItem("utm_campaign_local");i&&(e.config.headers["x-everfir-utm-campaign"]=i);let s=sessionStorage.getItem("referrer_local");s&&(e.config.headers["x-everfir-referrer"]=s)}return null==(t=b.beforeRequest)?void 0:t.call(b,e)}});(0,o.s5)({...b,baseURL:s.f?f:"/api"});let w=(0,o.s5)({...b,baseURL:s.f?y:"/api/backend",beforeRequest:s.f?async e=>{g(e);let{headers:t}=await Promise.all([a.e(13832),a.e(66593)]).then(a.bind(a,66593)),i=await t();r.yz||(e.baseURL=v(function(e){if(e){let t=e.match(m);if(t)return t[1]}return c.env.LANE_ID||""}(i.get("host")))),e.url.startsWith("/public")||Object.assign(e.config.headers,{cookie:i.get("cookie")||void 0})}:e=>{g(e)}}),j=(0,o.s5)({...b,baseURL:"/api/bff",beforeRequest(e){var t;if(s.f)throw Error("bffRequestInstance should not be used on server side");return null==(t=b.beforeRequest)?void 0:t.call(b,e)}}),C=(0,o.s5)({...b,baseURL:"/api/agent",beforeRequest(e){var t;if(g(e),s.f)throw Error("agentRequestInstance should not be used on server side");return null==(t=b.beforeRequest)?void 0:t.call(b,e)}})},70746:(e,t,a)=>{"use strict";a.d(t,{default:()=>f});var r=a(95155),i=a(12115),s=a(4320),o=a.n(s),n=a(1920),l=a(59742),c=a(60683),d=a(39790),u=a(46391),h=a(16256),p=a.n(h),g=a(52596);let m=e=>{let{banner:t}=e,[a,s]=(0,i.useState)(!0),{text:o,background:n,foreground_color:d,background_image_url:u,slices:h}=t.data,m=(0,i.useRef)(null),v=(0,i.useMemo)(()=>{let e=null==h?void 0:h.filter(e=>{var t;return"banner_button"===e.slice_type&&(null==(t=e.primary)?void 0:t.type)==="button"});return(null==e?void 0:e.length)===1},[h]);if(!a)return null;let f="Web"===u.link_type?u.url:void 0;return(0,r.jsxs)("div",{className:(0,g.A)(p().bannerItem,{"cursor-pointer":v}),style:{background:n||void 0,color:d||"#000","--background-image":f?"url(".concat(f,")"):void 0},onClick:e=>{var t;if(!v||e.target!==e.currentTarget)return;let a=null==(t=m.current)?void 0:t.querySelector("button");a&&a.click()},children:[(0,r.jsx)("div",{className:p().bannerText,style:{color:d||"#000"},children:o}),(0,r.jsx)("div",{ref:m,className:p().bannerButtons,onClick:e=>{v&&e.stopPropagation()},children:(0,r.jsx)(l.l,{slices:h,components:c.d,context:{onClose:()=>s(!1)}})})]})},v=e=>{let{banners:t}=e;return t&&0!==t.length?(0,r.jsx)("div",{className:p().bannersContainer,children:t.map(e=>(0,r.jsx)(m,{banner:e},e.id))}):null},f=e=>{let{mainEntrySlices:t,homeBanners:a,children:s}=e,{createVideo:h,cloneProject:p,createCanvas:g}=(0,n.u)(),m=t.length>0,f=((e,t)=>{let a=(0,u.useStatsigClient)(),[s,o]=(0,i.useState)(()=>e.filter(e=>!e.primary.visible_tag));return(0,i.useEffect)(()=>{a.isLoading||o(e.filter(e=>!e.primary.visible_tag||a.checkGate(e.primary.visible_tag)))},[a,e]),s.map(e=>(0,r.jsx)(l.l,{slices:[e],components:c.d,context:t},e.id))})(t,{onCreateProject:h,onCreateProjectFromTemplate:p,onCreateCanvas:g});return(0,r.jsxs)("div",{className:o().homeContent,children:[a&&(0,r.jsx)(v,{banners:a}),m&&(0,r.jsx)(d.AutoplayCarousel,{className:o().createCardsCarousel,children:f}),s]})}},73632:(e,t,a)=>{"use strict";a.d(t,{A:()=>m});var r=a(95155);a(12115);var i=a(51154),s=a(9950),o=a.n(s),n=a(52596);let l=e=>{let{message:t="Loading...",className:a}=e;return(0,r.jsx)("div",{className:(0,n.A)(o().container,a),children:(0,r.jsxs)("div",{className:o().content,children:[(0,r.jsx)("div",{className:o().iconContainer,children:(0,r.jsx)(i.A,{className:"".concat(o().icon," ").concat(o().loading)})}),(0,r.jsx)("h3",{className:o().title,children:"In a moment"}),(0,r.jsx)("p",{className:o().message,children:t})]})})};var c=a(85339),d=a(53904),u=a(30285);let h=e=>{let{message:t="Something went wrong. Please try again.",className:a,onRetry:i}=e;return(0,r.jsx)("div",{className:(0,n.A)(o().container,a),children:(0,r.jsxs)("div",{className:o().content,children:[(0,r.jsx)("div",{className:o().iconContainer,children:(0,r.jsx)(c.A,{className:o().icon})}),(0,r.jsx)("h3",{className:o().title,children:"Oops!"}),(0,r.jsx)("p",{className:o().message,children:t}),(0,r.jsx)("div",{className:o().actionContainer,children:(0,r.jsxs)(u.$,{onClick:()=>{i?i():window.location.reload()},"aria-label":"Retry",children:[(0,r.jsx)(d.A,{}),(0,r.jsx)("span",{children:"Retry"})]})})]})})};var p=a(97108);let g=e=>{let{message:t="No data available.",className:a}=e;return(0,r.jsx)("div",{className:(0,n.A)(o().container,a),children:(0,r.jsxs)("div",{className:o().content,children:[(0,r.jsx)("div",{className:o().iconContainer,children:(0,r.jsx)(p.A,{className:o().icon})}),(0,r.jsx)("h3",{className:o().title,children:"Empty"}),(0,r.jsx)("p",{className:o().message,children:t})]})})},m=e=>{let{state:t,errorMessage:a,emptyMessage:i,loadingMessage:s,onRetry:o,children:n,className:c}=e;switch(t){case"ready":return n;case"loading":return(0,r.jsx)(l,{className:c,message:s});case"error":return(0,r.jsx)(h,{className:c,message:a,onRetry:o});case"empty":return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(g,{className:c,message:i}),n]});default:return null}}},82031:(e,t,a)=>{"use strict";a.d(t,{f:()=>i,p:()=>s});var r=a(29543);let i=!1,s=function(){for(var e=arguments.length,t=Array(e),a=0;a<e;a++)t[a]=arguments[a];if(!i)return(0,r.l_)(...t)}},82795:(e,t,a)=>{"use strict";a.d(t,{eb:()=>c,jg:()=>l,pD:()=>d});var r=a(67839),i=a(60066);let s=e=>"number"==typeof e?e:"string"==typeof e&&parseFloat(e)||0,o={"4k":50,"2k":40,"1080p":30,"720p":20,"480p":10},n=e=>o[e.resolution||""]||0,l=function(e){var t,a,r,o;let l=arguments.length>1&&void 0!==arguments[1]&&arguments[1],c=arguments.length>2?arguments[2]:void 0,d=arguments.length>3?arguments[3]:void 0,u=null==(t=e.videos)?void 0:t[0];if(e.videos&&e.videos.length>0){let t=[...e.videos].sort((e,t)=>
1n(t)-n(e));u=l?t[0]:t[t.length-1]}let h="project"===e.artifact.metadata.source?{type:"project",ideaID:e.artifact.metadata.idea_id,projectID:e.artifact.metadata.project_id,projectType:e.artifact.metadata.project_type,videoDuration:e.artifact.metadata.duration,videoLanguage:e.artifact.metadata.language,videoStyle:e.artifact.metadata.style_id,videoStyleName:null==c?void 0:c[e.artifact.metadata.style_id],aspectRatio:"portrait"===e.artifact.metadata.orientation?"9:16":"16:9",videoPrompt:e.artifact.metadata.prompt}:e.artifact.metadata.template_id?{type:"template",templateId:e.artifact.metadata.template_id,aspectRatio:e.artifact.metadata.aspect_ratio||"16:9",duration:s(null==u||null==(a=u.metadata)?void 0:a.duration),templateName:d}:{type:"standalone",modelName:e.artifact.metadata.method,videoPrompt:e.artifact.metadata.prompt,aspectRatio:"portrait"===e.artifact.metadata.orientation?"9:16":"16:9",imageID:e.artifact.metadata.image_id,imageUrl:void 0,enableAudio:"true"===e.artifact.metadata.enable_audio,duration:e.artifact.metadata.duration};return{id:e.post_id,title:e.title||"",user_nickname:e.user_nickname||"",video_url:(null==u?void 0:u.url)||"",video_duration:s(null==u||null==(r=u.metadata)?void 0:r.duration),orientation:"9:16"===((null==u?void 0:u.aspect_ratio)||"")?i.t4.Portrait:i.t4.Landscape,cover_url:(null==u||null==(o=u.metadata)?void 0:o.cover_url)||"",score:e.score||0,comment_count:0,source:"stream",parameter:h}},c=async e=>{let t=new URLSearchParams;return t.set("page_size",String(e.page_size||10)),e.last_id&&t.set("last_id",e.last_id),await r.Pf.Get("/public/post/list?".concat(t.toString())).send()},d=async e=>await r.Pf.Post("/post/create",{artifact_id:e}).send()},85057:(e,t,a)=>{"use strict";a.d(t,{J:()=>o});var r=a(95155);a(12115);var i=a(13225),s=a(59434);function o(e){let{className:t,...a}=e;return(0,r.jsx)(i.Root,{"data-slot":"label",className:(0,s.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),...a})}},91091:(e,t,a)=>{"use strict";a.d(t,{A7:()=>g,FN:()=>h,Oj:()=>v,Q8:()=>m,Wk:()=>p});var r=a(95155),i=a(12115),s=a(85005),o=a(35169),n=a(92138),l=a(59434),c=a(30285);let d=i.createContext(null);function u(){let e=i.useContext(d);if(!e)throw Error("useCarousel must be used within a <Carousel />");return e}function h(e){let{orientation:t="horizontal",opts:a,setApi:o,plugins:n,className:c,children:u,...h}=e,[p,g]=(0,s.A)({...a,axis:"horizontal"===t?"x":"y"},n),[m,v]=i.useState(!1),[f,_]=i.useState(!1),y=i.useCallback(e=>{e&&(v(e.canScrollPrev()),_(e.canScrollNext()))},[]),b=i.useCallback(()=>{null==g||g.scrollPrev()},[g]),x=i.useCallback(()=>{null==g||g.scrollNext()},[g]),w=i.useCallback(e=>{"ArrowLeft"===e.key?(e.preventDefault(),b()):"ArrowRight"===e.key&&(e.preventDefault(),x())},[b,x]);return i.useEffect(()=>{g&&o&&o(g)},[g,o]),i.useEffect(()=>{if(g)return y(g),g.on("reInit",y),g.on("select",y),()=>{null==g||g.off("select",y)}},[g,y]),(0,r.jsx)(d.Provider,{value:{carouselRef:p,api:g,opts:a,orientation:t||((null==a?void 0:a.axis)==="y"?"vertical":"horizontal"),scrollPrev:b,scrollNext:x,canScrollPrev:m,canScrollNext:f},children:(0,r.jsx)("div",{onKeyDownCapture:w,className:(0,l.cn)("relative",c),role:"region","aria-roledescription":"carousel","data-slot":"carousel",...h,children:u})})}function p(e){let{className:t,...a}=e,{carouselRef:i,orientation:s}=u();return(0,r.jsx)("div",{ref:i,className:"overflow-hidden p-1.5 mx-[-6px]","data-slot":"carousel-content",children:(0,r.jsx)("div",{className:(0,l.cn)("flex","horizontal"===s?"-ml-4":"-mt-4 flex-col",t),...a})})}function g(e){let{className:t,...a}=e,{orientation:i}=u();return(0,r.jsx)("div",{role:"group","aria-roledescription":"slide","data-slot":"carousel-item",className:(0,l.cn)("min-w-0 shrink-0 grow-0 basis-full","horizontal"===i?"pl-4":"pt-4",t),...a})}function m(e){let{className:t,variant:a="outline",size:i="icon",...s}=e,{orientation:n,scrollPrev:d,canScrollPrev:h}=u();return(0,r.jsxs)(c.$,{"data-slot":"carousel-previous",variant:a,size:i,className:(0,l.cn)("absolute size-8 rounded-full","horizontal"===n?"top-1/2 -left-12 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",t),disabled:!h,onClick:d,...s,children:[(0,r.jsx)(o.A,{}),(0,r.jsx)("span",{className:"sr-only",children:"Previous slide"})]})}function v(e){let{className:t,variant:a="outline",size:i="icon",...s}=e,{orientation:o,scrollNext:d,canScrollNext:h}=u();return(0,r.jsxs)(c.$,{"data-slot":"carousel-next",variant:a,size:i,className:(0,l.cn)("absolute size-8 rounded-full","horizontal"===o?"top-1/2 -right-12 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",t),disabled:!h,onClick:d,...s,children:[(0,r.jsx)(n.A,{}),(0,r.jsx)("span",{className:"sr-only",children:"Next slide"})]})}}},e=>{e.O(0,[43738,33658,10787,40866,28753,1944,37203,35152,56671,1345,6874,6990,78082,63438,69474,3970,99718,13832,43051,46391,42976,14620,9333,35226,1920,60683,28441,15964,77358],()=>
1e(e.s=14140)),_N_E=e.O()}]);
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.