PageSourceSearch

https://worbler.ai/_next/static/chunks/app/(marketing)/create/page-26798bd670a88f55.js

js worbler.ai collected 2026-10-04 13:48:45 UTC 31,612 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1691],{93362:function(e,t,r){Promise.resolve().then(r.bind(r,35396)),Promise.resolve().then(r.bind(r,75940)),Promise.resolve().then(r.bind(r,60202)),Promise.resolve().then(r.bind(r,30089)),Promise.resolve().then(r.bind(r,9493)),Promise.resolve().then(r.bind(r,34810)),Promise.resolve().then(r.bind(r,73164)),Promise.resolve().then(r.bind(r,91375)),Promise.resolve().then(r.bind(r,22046)),Promise.resolve().then(r.bind(r,28423)),Promise.resolve().then(r.bind(r,42458)),Promise.resolve().then(r.t.bind(r,72972,23))},35396:function(e,t,r){"use strict";r.d(t,{default:function(){return j}});var n=r(57437),s=r(36760),l=r.n(s),a=r(99376),i=r(2265),o=r(42419),c=r(95804),d=r(39675),u=r(49420),f=r(44984),h=r(28423),p=r(42458),m=r(85518),x=r(82245),g=r(46246),v=r(52110);class b extends i.PureComponent{componentDidMount(){let{activeJobs:e,addToast:t,searchParams:r}=this.props,n=(null==r?void 0:r.getAll("option"))||[];if(n.length&&(0,v.Ov)(n),(null==r?void 0:r.get("begin_upload"))==="true"&&!(null==e?void 0:e.length)){var s;null===(s=this.dropzoneRef.current)||void 0===s||s.openFileDialog()}let l=null==r?void 0:r.get("error"),a=null==r?void 0:r.get("message");requestAnimationFrame(()=>{l?t({type:"error",message:l}):a&&t({type:"info",message:a})})}render(){let{activeJobs:e,cancelAllJobs:t,updateProject:r}=this.props,{highlight:s,project:a,youtubeUrl:i}=this.state,f=e.filter(e=>"transcode"===e.type||"download"===e.type),h=f.length>0;return(0,n.jsxs)("div",{className:l()("relative flex w-full flex-col items-start overflow-hidden rounded-3xl",'bg-background-layer-1 bg-[url("/create/feature.webp")] bg-cover bg-left-top bg-no-repeat lg:bg-right',!h&&s?"bg-background-layer-2":"bg-background-layer-1"),children:[(0,n.jsxs)(o.Z,{ref:this.dropzoneRef,resetOnComplete:!0,accept:"video/*,image/*",className:"w-full p-8",disabled:h,progressClassName:"!rounded-none px-8 pb-8 pt-12",project:a,tipClassName:"!hidden",onCancel:t,onCreateJobs:this.addJobs,onHighlightChange:e=>{this.setState({highlight:e})},onTokensChange:async e=>{let t=await r({...a,tokens:e});return null==t?void 0:t.tokens},children:[(0,n.jsx)("h1",{className:"mb-4",children:"Create Something"}),(0,n.jsx)("div",{className:"body-xl font-bold text-gray lg:hidden",children:"Upload, paste a YouTube link or browse our library to get started."}),(0,n.jsx)("div",{className:"body-xl hidden font-bold text-gray lg:block",children:"Drag & drop, paste a YouTube link or browse our library to get started."}),(0,n.jsxs)("div",{className:"mt-12 flex w-full flex-col items-stretch gap-4 md:flex-row",children:[(0,n.jsx)(d.Z,{defaultUrl:i,disabled:h,onCreateJobs:this.addJobs}),(0,n.jsx)(c.Z,{"aria-label":"Upload from Device",className:"btn btn-secondary-alt btn-large","data-testid":"open-file-dialog",disabled:h,onClick:()=>{var e;return null===(e=this.dropzoneRef.current)||void 0===e?void 0:e.openFileDialog()},children:"Upload from Device"})]})]}),f.length>0&&f.map(e=>(0,n.jsx)(u.Z,{className:"absolute inset-0 !max-w-none !rounded-none",job:e,tipClassName:"!hidden",onCancel:t},e.id))]})}constructor(...e){var t;super(...e),this.dropzoneRef=i.createRef(),this.state={highlight:!1,project:(0,x.Z)(),synthesizing:!1,youtubeUrl:(null===(t=this.props.searchParams)||void 0===t?void 0:t.get("youtube_url"))||""},this.addJobs=e=>{let{watchJob:t}=this.props;e.forEach(e=>t(e,{onComplete:this.completeJob}))},this.completeJob=async(e,t)=>{let{addToast:r,router:n,updateProject:s,watchJob:l}=this.props,{project:a}=this.state;try{await (0,g.Z)(a,{job:e,result:t,updateProject:s,watchJob:l}),("transcode"===e.type||"download"===e.type)&&n.push("/edit")}catch(e){console.error(e),r({type:"error",message:"Sorry! There was a problem updating the project. Please refresh to try again."})}}}}function j(){let e=(0,a.useRouter)(),t=(0,a.useSearchParams)();return(0,n.jsx)(b,{router:e,searchParams:t||void 0,...(0,f.a)(),...(0,h.C)(),...(0,p.P)(),...(0,m.e)()})}},75940:function(e,t,r){"use strict";r.d(t,{default:function(){return x}});var n=r(57437),s=r(6818),l=r.n(s),a=r(99376),i=r(2265),o=r(88270),c=r(28583),d=r(42458),u=r(85518),f=r(10278),h=r(6904),p=r(52110),m=r(70291);function x(){let[e,t]=(0,i.useState)(!0),[r,s]=(0,i.useState)(10),[x,g]=(0,i.useState)([]),v=(0,i.useRef)(null),{addToast:b}=(0,u.e)(),{updateProject:j}=(0,d.P)(),y=(0,a.useRouter)();async function w(e){let t=(0,p.G$)(),[r]=await (0,m.u3)(e,t);await j({...t,tokens:r}),y.push("/edit"),(0,h.B)("gallery_video_select",{label:e.label})}return(0,i.useEffect)(()=>{let e=async()=>{t(!0);try{g(l()(await (0,f.WY)()))}catch(e){console.error(e),b({type:"error",message:"Sorry! We had trouble loading videos. Please refresh and try again."})}finally{t(!1)}},r=new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting&&(r.disconnect(),e())})},{root:null,threshold:0});return v.current&&r.observe(v.current),()=>{r.disconnect()}},[]),(0,n.jsxs)("div",{ref:v,className:"mb-12 flex w-full flex-col gap-6",id:"gallery",children:[(0,n.jsx)("h3",{children:"Our Gallery"}),(0,n.jsx)(o.Z,{horizontalMobile:!0,hasMore:r<x.length,list:x.slice(0,r),loadMore:()=>s(e=>e+10),loading:e,loadingCardClassName:"aspect-square !w-auto h-full",renderItem:(e,t)=>
1(0,n.jsx)(c.default,{hidePlayButton:!0,loop:!0,muted:!0,className:"gallery-video h-full shrink-0 hover:opacity-90 active:scale-95",orientation:"square",poster:e.poster,preload:"none",sources:e.sources,videoClassName:"rounded-3xl h-full",onClick:()=>w(e),onMouseEnter:e=>{var t;return null===(t=e.currentTarget)||void 0===t?void 0:t.play()},onMouseLeave:e=>{var t;return null===(t=e.currentTarget)||void 0===t?void 0:t.pause()}},"gallery-video-".concat(t)),rowClassName:"h-[234px]"})]})}},4513:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(57437),s=r(36760),l=r.n(s),a=r(2265),i=r(91309);function o(e){let{children:t,description:r,getStartedHref:s,sectionRef:o=a.createRef(),sticky:c=!0,title:d}=e;return(0,a.useEffect)(()=>{let e=o.current;if(!e||!c)return;let t=new IntersectionObserver(e=>{e.forEach(e=>{e.target instanceof HTMLElement&&(e.target.style.opacity=e.isIntersecting?"1":"",e.target.style.transform=e.isIntersecting?"translateY(0)":"")})},{root:null,threshold:.2});return t.observe(e),()=>{t.disconnect()}},[]),(0,n.jsx)("div",{ref:o,className:l()("w-full",c&&"min-h-[100vh] translate-y-2 px-4 py-8 opacity-0 transition-[transform,opacity] duration-500 lg:px-16"),children:(0,n.jsxs)("div",{className:l()("flex w-full flex-col items-center justify-center gap-6 lg:flex-row lg:gap-14",c&&"sticky top-[25vh] min-h-[50vh]"),children:[(0,n.jsx)("div",{className:"flex w-full flex-col items-center justify-center lg:w-1/2",children:t}),(0,n.jsxs)("div",{className:"flex w-full max-w-[596px] flex-col justify-center lg:w-1/2 lg:max-w-none",children:[(0,n.jsx)("h2",{className:"mb-4 max-w-sm lg:mb-6",children:d}),(0,n.jsx)("p",{className:"body-xl mb-6 lg:mb-8",children:r}),(0,n.jsxs)("a",{className:"btn btn-secondary learn-section-get-started btn-large self-start",href:s||"/create",title:d,children:["Get Started",(0,n.jsx)(i.Z,{className:"size-6 fill-white"})]})]})]})})}},60202:function(e,t,r){"use strict";r.d(t,{default:function(){return h}});var n=r(57437),s=r(33145),l=r(2265),a=r(99836),i=r(36760),o=r.n(i);function c(e){let{className:t}=e;return(0,n.jsxs)("svg",{className:o()("icon",t),height:"17",viewBox:"0 0 6 17",width:"6",children:[(0,n.jsx)("path",{d:"M0.891602 1.00856C0.891602 0.625756 1.20193 0.31543 1.58474 0.31543H4.35727C4.74008 0.31543 5.05041 0.625756 5.05041 1.00856V3.18963C5.05041 3.45337 4.90072 3.69426 4.66426 3.81107L3.27799 4.49587C3.08449 4.59146 2.85752 4.59146 2.66402 4.49587L1.27775 3.81107C1.04128 3.69426 0.891602 3.45337 0.891602 3.18963V1.00856Z"}),(0,n.jsx)("line",{stroke:"#DE66FD",strokeWidth:"0.774246",x1:"2.99113",x2:"2.99112",y1:"1.63184",y2:"16.1803"})]})}var d=r(26872),u=r(4513);function f(e){let{alt:t,src:r}=e;return(0,n.jsx)("div",{className:"flex size-8 items-center justify-center rounded-full bg-background-layer-2 lg:size-12",children:(0,n.jsx)("img",{alt:t,className:"lg:size-8",height:"20",src:r,width:"20"})})}function h(e){let{getStartedHref:t,sticky:r}=e,i=(0,l.useRef)(null),o=(0,l.useRef)(null),h=(0,l.useRef)(null);return(0,a.Z)(e=>{let t=i.current,r=o.current,n=h.current;if(!t||!r||!n)return;let s=(0,d.Z)(t).top-window.innerHeight/2,l=s+t.offsetHeight/6;r.style.opacity=e>s?"1":"",r.style.transform=e>s?"translateY(0)":"",n.style.opacity=e>l?"1":"",n.style.transform=e>l?"translateY(0)":""},[]),(0,n.jsx)(u.Z,{description:"AI-powered text-to-speech makes it easy to add a realistic voice-over to your video. Choose from 100+ diverse voices, performed by paid actors to enhance your content effortlessly. Write your script, select a voice and let Worbler do the rest.",getStartedHref:t,sectionRef:i,sticky:r,title:"Give Your Video the Perfect Voice-Over",children:(0,n.jsxs)("div",{className:"relative p-6",children:[(0,n.jsx)(s.default,{alt:"Give Your Video the Perfect Voice-Over",height:548,loading:"eager",src:"/learn/section_1.png",width:548}),(0,n.jsxs)("div",{className:"absolute left-0 top-10 flex w-[165px] flex-col gap-2 lg:top-14 lg:w-[251px]",children:[(0,n.jsxs)("div",{ref:o,className:"flex w-full translate-y-[400%] flex-col gap-2 rounded-md bg-background-layer-1 p-4 text-xs opacity-0 transition-[transform,opacity] duration-500 lg:text-base",children:[(0,n.jsx)("div",{className:"font-bold",children:"Script"}),(0,n.jsxs)("div",{className:"relative",children:["Convert text to",(0,n.jsx)(c,{className:"h-[17px] w-[6px] shrink-0 translate-y-[-15%] fill-voice lg:h-[24px] lg:w-[8px]"}),"speech to add realistic"," ",(0,n.jsx)("span",{className:"rounded bg-voice/55 px-[2px] py-px",children:"voices"})," ","to your videos."]})]}),(0,n.jsxs)("div",{ref:h,className:"flex w-full translate-y-[800%] flex-row justify-center gap-2 rounded-md bg-background-layer-1 py-1 opacity-0 transition-[transform,opacity] duration-500 lg:py-2",children:[(0,n.jsx)(f,{alt:"Olivia Voice",src:"/learn/olivia.svg"}),(0,n.jsx)(f,{alt:"Coco Voice",src:"/learn/coco.svg"}),(0,n.jsx)(f,{alt:"David Voice",src:"/learn/david.svg"}),(0,n.jsx)(f,{alt:"Applejack Voice",src:"/learn/applejack.svg"})]})]})]})})}},30089:function(e,t,r){"use strict";r.d(t,{Callouts:function(){return l}});var n=r(57437),s=r(37491);function l(e){let{index:t}=e,r=s.Z[(t||0)%s.Z.length];return Array.isArray(r)?(0,n.jsx)("div",{className:"grid grid-rows-2 gap-2",children:r.map((e,t)=>(0,n.jsx)(e,{},"".concat(e.name,"-").concat(t)))}):(0,n.jsx)(r,{})}},39675:function(e,t,r){"use strict";r.d(t,{Z:function(){return m}});var n=r(57437),s=r(2265),l=r(85518),a=r(91309),i=r(88891),o=r(4374);async function c(e){return(await (0,o.Z)("/api/download-youtube-video",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({url:e})})).json()}var d=r(6904),u=r(50315),f=r(95804),h=r(98098);let p="Invalid YouTube URL. Please try again.";function m(e){let{defaultUrl:t,disabled:r,formRef:o,onCreateJobs:m,onUrlChange:x}
1=e,[g,v]=(0,s.useState)(t||""),[b,j]=(0,s.useState)(!1),{addToast:y}=(0,l.e)();async function w(e){if(!r){if(!(0,u.d)(e))return y({type:"error",message:p});e=e.replace("http://","https://"),j(!0);try{let t=await c(e);m([t])}catch(e){console.error(e),y({type:"error",message:"Sorry! We encountered a problem downloading your video. Please refresh and try again."})}finally{j(!1)}(0,d.B)("download_youtube",{url:e})}}return(0,s.useEffect)(()=>{t&&(v(t),w(t))},[t]),(0,s.useEffect)(()=>{null==x||x(g)},[g]),(0,n.jsx)("form",{ref:o,action:"#",className:"relative w-full max-w-[387px]",onSubmit:e=>{e.preventDefault(),w(g)},children:(0,n.jsxs)(h.Z,{formNoValidate:!0,hideClear:!0,"aria-label":"YouTube Link",className:"grow",disabled:r,inputClassName:"bg-background-layer-2 pl-12",placeholder:"Paste a YouTube link",submitting:b,type:"url",value:g,onFocus:e=>{e.target.select()},onInput:e=>v(e.trim()),onPaste:e=>{let t=e.clipboardData.getData("text").trim();(0,u.d)(t)?(v(t),w(t)):y({type:"error",message:p})},children:[(0,n.jsx)(i.Z,{className:"pointer-events-none absolute left-4 size-6"}),(0,n.jsx)(f.Z,{formNoValidate:!0,"aria-label":"Submit YouTube Link",className:"btn-primary btn-icon-medium absolute right-4",disabled:r||!g,submitting:b,type:"submit",children:(0,n.jsx)(a.Z,{className:"size-6 fill-background"})})]})})}},88270:function(e,t,r){"use strict";r.d(t,{Z:function(){return m}});var n=r(57437),s=r(36760),l=r.n(s),a=r(7310),i=r.n(a),o=r(2265),c=r(91309),d=r(84277),u=r(21351),f=r(95804),h=r(18963),p=r(55443);function m(e){let{buttonsBlockClicksWhileHidden:t,cardWidth:r=358,emptyMessage:s,hasMore:a,header:m,horizontalMobile:x,limitVerticalScroll:g,list:v,loading:b,loadingCardClassName:j,loadMore:y,onResetScrollButtons:w,renderItem:N,resetScrollButtons:C,rowClassName:Z,smallButtons:k,seeAllUrl:P}=e,[S,R]=(0,o.useState)(!0),[I,M]=(0,o.useState)(!1),L=(0,o.useRef)(null),E=(0,o.useRef)(null);function A(){let e=null==L?void 0:L.current;e&&(R(0===e.scrollLeft),M(e.scrollLeft+e.clientWidth>=e.scrollWidth),w&&w())}function z(e){let t=null==L?void 0:L.current;if(!t)return;let n=2*r+32,s=Math["left"===e?"floor":"ceil"](t.scrollLeft/n)*n;t.scrollTo({top:0,left:Math.max(0,Math.min(t.scrollWidth,s+n*("left"===e?-1:1))),behavior:"smooth"}),A()}(0,o.useEffect)(()=>{let e=new ResizeObserver(A);return L.current&&e.observe(L.current),()=>{e.disconnect()}},[]),(0,o.useEffect)(A,[v]),(0,o.useEffect)(()=>{C&&A()},[C]);let T=l()("relative w-full flex justify-start items-center shrink-0 pb-1 gap-4",x?"flex-row":"flex-col md:flex-row",Z),W=l()("hidden opacity-90 lg:flex absolute top-1/2 translate-y-[calc(-50%-0.25rem)] disabled:opacity-0",k?"btn-tertiary btn-icon-small":"btn-tertiary btn-icon-large",t?"disabled:pointer-events-auto":"disabled:pointer-events-none");return(0,n.jsxs)("div",{className:"flex w-full flex-col gap-4",children:[!!m&&(0,n.jsxs)("h3",{className:"flex flex-row items-center justify-between text-center text-2xl lg:text-left",children:[m,P&&v.length>2&&(0,n.jsxs)("a",{className:"btn btn-secondary btn-small",href:P,children:["See All",(0,n.jsx)(c.Z,{className:"size-4"})]})]}),(0,n.jsxs)("div",{className:"relative",children:[b?(0,n.jsx)("div",{className:T,children:Array.from({length:3}).map((e,t)=>(0,n.jsx)(p.Z,{className:j,style:{width:"".concat(r,"px")}},"loading-card-".concat(t)))}):v.length?(0,n.jsx)(h.Z,{className:T,containerRef:L,hasMore:a,loadMore:y,loader:(0,n.jsx)(p.Z,{ref:E,className:l()("relative",g&&"hidden lg:block",j),style:{width:"".concat(r,"px")}}),loaderRef:E,onScroll:i()(A,100),children:v.map(N)}):s||null,(0,n.jsx)(f.Z,{"aria-label":"Scroll Left",className:l()(W,"-left-3"),disabled:v.length<2||S,onClick:()=>z("left"),children:(0,n.jsx)(u.Z,{className:l()(k?"size-4":"size-5")})}),(0,n.jsx)(f.Z,{"aria-label":"Scroll Right",className:l()(W,"-right-3"),disabled:v.length<2||I,onClick:()=>z("right"),children:(0,n.jsx)(d.Z,{className:l()(k?"size-4":"size-5")})})]})]})}},18963:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(57437),s=r(36760),l=r.n(s),a=r(2265);function i(e){let{children:t,className:r,containerRef:s,hasMore:i,loader:o,loaderRef
1:c,loadMore:d,onScroll:u}=e;return(0,a.useEffect)(()=>{if(!i||!d)return;let e=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&d()})},{root:null,threshold:0});return c.current&&e.observe(c.current),()=>{e.disconnect()}},[t,i,d]),(0,n.jsxs)("div",{ref:s,className:l()("overflow-y-auto",r),onScroll:u,children:[t,i&&o]})}},98098:function(e,t,r){"use strict";r.d(t,{Z:function(){return d}});var n=r(57437),s=r(36760),l=r.n(s),a=r(2265),i=r(20138),o=r(95804),c=r(18406);class d extends a.PureComponent{blur(){var e;null===(e=this.inputRef.current)||void 0===e||e.blur()}focus(){var e;null===(e=this.inputRef.current)||void 0===e||e.focus()}render(){let{children:e,className:t,disabled:r,error:s,hideClear:a,id:d,ignoreDirty:u,inputClassName:f,multiline:h=!1,name:p,readOnly:m,submitting:x,value:g,...v}=this.props,{dirty:b}=this.state;return(0,n.jsxs)("div",{className:l()("relative flex flex-row items-center justify-start",t),children:[h?(0,n.jsx)("textarea",{...v,ref:this.inputRef,className:l()("textarea",f,(b||u)&&s&&"error"),disabled:r||x,id:d||p,name:p,readOnly:m,value:g,onBlur:this.handleBlur,onInput:this.handleChange}):(0,n.jsx)("input",{...v,ref:this.inputRef,className:l()("input",f,(b||u)&&s&&"error"),disabled:r||x,id:d||p,name:p,readOnly:m,value:g,onBlur:this.handleBlur,onInput:this.handleChange}),e,!a&&!!g&&!m&&!x&&(0,n.jsx)(o.Z,{"aria-label":"Clear",className:l()("clear-button btn-transparent btn-icon-small absolute",h?"bottom-2 right-2":"right-4 top-1/2 -translate-y-1/2"),type:"button",onClick:this.handleClear,children:(0,n.jsx)(i.Z,{className:"size-6 fill-gray-500"})}),x&&(0,n.jsx)(c.Z,{className:"absolute right-6 top-1/2 -translate-y-1/2 scale-50"}),(b||u)&&s&&(0,n.jsx)("div",{className:"absolute inset-x-4 top-full z-10 -mt-px flex translate-y-px flex-row items-center justify-start rounded-b-lg bg-background-layer-3 px-2 py-1 text-xs text-white",children:s})]})}constructor(...e){super(...e),this.inputRef=a.createRef(),this.state={dirty:!1},this.handleChange=e=>{this.props.onInput(e.target.value)},this.handleBlur=()=>{this.setState({dirty:!0})},this.handleClear=()=>{this.props.onInput("")}}}},55443:function(e,t,r){"use strict";var n=r(57437),s=r(36760),l=r.n(s),a=r(2265);t.Z=a.forwardRef(function(e,t){let{className:r,style:s}=e;return(0,n.jsx)("div",{ref:t,className:l()("shrink-0 animate-primary-fade rounded-3xl",r),style:s})})},73164:function(e,t,r){"use strict";r.d(t,{default:function(){return y}});var n=r(57437),s=r(47230),l=r.n(s),a=r(27648),i=r(2265),o=r(44984),c=r(85518),d=r(60559),u=r(71425),f=r(55749),h=r(85003),p=r(59301),m=r(6700),x=r(90851),g=r(95804),v=r(18963),b=r(55443),j=r(91375);function y(e){let{actions:t,filterVisibility:r,header:s,order:y,withShowMore:w}=e,[N,C]=(0,i.useState)(!w),[Z,k]=(0,i.useState)(),[P,S]=(0,i.useState)(!0),[R,I]=(0,i.useState)([]),{addToast:M}=(0,c.e)(),{loggedIn:L}=(0,o.a)(),E=(0,i.useRef)(null),A=(0,i.useRef)(null);async function z(){try{if(L){let e=await (0,f.mW)({startKey:Z}),t=await e.json();k(e.headers.get("x-last-evaluated-id")||void 0),I(l()([...R,...t],"id"))}}catch(e){console.error(e),M({type:"error",message:"There was a problem retrieving projects. Please refresh and try again."})}finally{S(!1)}}(0,i.useEffect)(()=>{let e=new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting&&(e.disconnect(),z())})},{root:null,threshold:0});return E.current&&e.observe(E.current),()=>{e.disconnect()}},[]);let T=(0,i.useMemo)(()=>{let e=[...R];if("private"===r?e=e.filter(e=>!!e.private):"public"===r&&(e=e.filter(e=>!e.private)),"least-recent"===y)e.sort((e,t)=>e.updatedAt-t.updatedAt);else if("alphabetical"===y)e.sort((e,t)=>{let r=e.name,n=t.name;return r===n?0:r?n?r<n?-1:1:-1:1});else if("longest"===y||"shortest"===y){let t="longest"===y?-1:1;e.sort((e,r)=>((0,p.V0)(e.tokens)-(0,p.V0)(r.tokens))*t)}return e},[R,y,r]);if(P)return(0,n.jsx)("div",{ref:E,className:"grid w-full grid-cols-2 gap-4 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5 3xl:grid-cols-6",children:Array.from({length:8}).map((e,t)=>(0,n.jsx)(b.Z,{className:"aspect-square"},"loading-card-".concat(t)))});let W=!!Z;return R.length||W?(0,n.jsxs)(n.Fragment,{children:[s,(0,n.jsx)(v.Z,{className:"grid w-full grid-cols-2 gap-2 lg:grid-cols-3 lg:gap-6 xl:grid-cols-4 2xl:grid-cols-5 3xl:grid-cols-6",hasMore:N&&W,loadMore:z,loader:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(b.Z,{ref:A,className:"aspect-square"}),(0,n.jsx)(b.Z,{className:"aspect-square"})]}
1),loaderRef:A,children:(N?T:T.slice(0,8)).map(e=>{let r;let s={};t.includes("edit")&&(r="/edit?".concat(new URLSearchParams({project:e.id})),s.edit={projectId:e.id}),t.includes("delete")&&(s.delete={projectId:e.id,onDelete:e=>{I(R.filter(t=>t.id!==e))}}),t.includes("duplicate")&&(s.duplicate={templateId:e.id});let l=(0,m.q3)("video",e.tokens),a=(0,m.yb)("video",l);return l&&a?(0,n.jsxs)("div",{children:[(0,n.jsx)(j.default,{muted:!0,actions:s,className:"mb-2",clip:l.trim?(0,p.Xr)(l.trim):void 0,href:r,orientation:"square",poster:a.image,sources:a.sources}),(0,n.jsx)("div",{className:"mt-2 font-bold",children:(null==e?void 0:e.name)||"Untitled Worble"}),(0,n.jsx)("div",{className:"text-xs text-gray",children:(null==e?void 0:e.updatedAt)&&(0,h.Z)(e.updatedAt,{includeTime:!0})})]},e.id):null})}),!N&&(R.length>8||W)&&(0,n.jsx)(g.Z,{"aria-label":"Show More",className:"btn-secondary btn-medium mx-auto mt-6",onClick:()=>C(!0),children:"Show More"})]}):(0,n.jsxs)("div",{className:"flex w-full flex-col items-center justify-center gap-4 py-16 text-center",children:[(0,n.jsx)(u.Z,{className:"size-28 fill-background-layer-2"}),(0,n.jsx)("h2",{children:"No Recent Projects... Yet!"}),L?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("h3",{className:"mb-6 text-gray",children:"Create a new project"}),(0,n.jsxs)(a.default,{className:"btn btn-primary btn-large",href:"/edit?fresh=true",prefetch:!1,children:[(0,n.jsx)(d.Z,{className:"size-6"}),"New Project"]})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("h3",{className:"mb-6 text-gray",children:"Sign in to save and edit your projects"}),(0,n.jsx)(x.Z,{saveReturnTo:!0,className:"lg:flex-row lg:justify-center"})]})]})}},9493:function(e,t,r){"use strict";r.d(t,{ContestCalloutVideo:function(){return c}});var n=r(57437),s=r(27648),l=r(59301),a=r(6700),i=r(91375);function o(e){let{templateId:t}=e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"absolute inset-x-2 bottom-2 rounded-2xl bg-background px-2 pb-16 pt-4 text-center opacity-100 transition-opacity duration-500 group-hover/video:opacity-0",children:[(0,n.jsx)("h2",{className:"font-extrabold uppercase",children:"Remix contest"}),(0,n.jsx)("p",{className:"mb-2",children:"Remix this video for a chance to become a Worbler Winner!"})]}),(0,n.jsx)("div",{className:"absolute inset-x-4 bottom-2 z-10 flex justify-center p-4 text-center",children:(0,n.jsx)(s.default,{className:"btn btn-secondary btn-medium",href:"/edit?".concat(new URLSearchParams({template:t})),children:"Start Remixing"})})]})}function c(e){let{orientation:t,project:r}=e,s=(0,a.q3)("video",r.tokens),c=(0,a.yb)("video",s);return s&&c?(0,n.jsx)(i.default,{actions:{duplicate:{templateId:r.id},unmute:!0},clip:s.trim?(0,l.Xr)(s.trim):void 0,href:"/edit?".concat(new URLSearchParams({template:r.id})),orientation:t,poster:c.image,sources:c.sources,children:(0,n.jsx)(o,{templateId:r.id})}):null}},34810:function(e,t,r){"use strict";r.d(t,{default:function(){return j}});var n=r(57437),s=r(2265),l=r(95804),a=r(30089),i=r(22046),o=r(28807),c=r(6700),d=r(3091),u=r(37785),f=r(59301),h=r(91375),p=r(9493);function m(e){var t,r;let{contestProject:s,orientation:l,projectExport:a}=e;if(s)return(0,n.jsx)(p.ContestCalloutVideo,{orientation:l,project:s});if(!a)return null;let i=(0,u.Z)(a.projectId),o=(0,f.Ev)(a.project);if((0,d.jn)(a)){let e={like:{projectId:a.projectId},unmute:!0,view:{viewUrl:(0,u.Z)(a.projectId)}};return a.templateId&&(e.duplicate={templateId:a.templateId}),(0,n.jsx)(h.default,{actions:e,captionsUrl:null===(r=a.captionUrls)||void 0===r?void 0:r.find(e=>e.endsWith(".vtt")),href:i,orientation:l,poster:a.thumbnail||(null==o?void 0:o.image),sources:[a.url],children:(0,n.jsx)("div",{className:"absolute left-2 top-2 rounded-full bg-background/50 px-4 py-2 backdrop-blur-md",children:"\uD83D\uDC51 Worbler Winner"})})}let c={like:{projectId:a.projectId},report:{viewUrl:i},share:{viewUrl:i},unmute:!0,view:{viewUrl:i}};return a.templateId&&(c.duplicate={templateId:a.templateId}),(0,n.jsx)(h.default,{actions:c,captionsUrl:null===(t=a.captionUrls)||void 0===t?void 0:t.find(e=>e.endsWith(".vtt")),href:i,orientation:l,poster:a.thumbnail||(null==o?void 0:o.image),sources:[a.url],videoClassName:"min-h-[200px]"})}function x(e){let{children:t}=e;return(0,n.jsx)("div",{className:"flex flex-col gap-10 md:row-span-5",children:t})}function g(e){let{children:t}=e;return(0,n.jsx)("div",{className:"flex flex-col gap-10 md:row-[span_7] md:grid md:grid-cols-2 md:gap-6",children:t})}function v(e){let{source:t,orientation:r}=e;return"url"in t?(0,n.jsx)(m,{orientation:r,projectExport:t}):(0,n.jsx)(m,{contestProject:t,orientation:r})}function b(e){let{groups:t}=e,r=0;return(0,n.jsx)(i.AutoPlayManager,{children:(0,n.jsx)("div",{className:"grid w-full gap-6 lg:grid-cols-[repeat(2,minmax(440px,1fr))] 2xl:gr
1id-cols-3 3xl:grid-cols-4",children:t.map(e=>{var t,s;return Array.isArray(e)?(0,n.jsxs)(g,{children:[(0,n.jsx)(v,{orientation:"portrait",source:e[0]}),(0,n.jsx)(v,{orientation:"portrait",source:e[1]})]},e[0].id):"portrait"===(0,o.T)((0,c.q3)("video",null!==(s=null===(t="url"in e?e.project:e)||void 0===t?void 0:t.tokens)&&void 0!==s?s:[]))?(0,n.jsxs)(g,{children:[(0,n.jsx)(v,{orientation:"portrait",source:e}),(0,n.jsx)(a.Callouts,{index:r++})]},e.id):(0,n.jsx)(x,{children:(0,n.jsx)(v,{orientation:"landscape",source:e})},e.id)})})})}function j(e){let{groups:t}=e,[r,a]=(0,s.useState)(!1);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(b,{groups:r?t:t.slice(0,8)}),!r&&(0,n.jsx)(l.Z,{"aria-label":"Show More",className:"btn-secondary btn-medium mx-auto",onClick:()=>a(!0),children:"Show More"})]})}},42458:function(e,t,r){"use strict";r.d(t,{P:function(){return d},ProjectProvider:function(){return f}});var n=r(57437),s=r(99376),l=r(2265),a=r(52110),i=r(44984),o=r(85518);let c=(0,l.createContext)({loadingProject:!1,updateProject:()=>Promise.resolve(void 0)}),d=()=>(0,l.useContext)(c);async function u(){return(0,a.f1)("export",async e=>{let t=e.project;await (0,a.UI)(t,!0);let r=new URLSearchParams({project:t.id});window.location.href="/share?".concat(r)})}function f(e){let{children:t,fresh:r,project:d}=e,{loggedIn:f}=(0,i.a)(),h=(0,l.useRef)(),[p,m]=(0,l.useState)(!0),[x,g]=(0,l.useState)(d),{addToast:v}=(0,o.e)(),b=(0,s.useSearchParams)();return(0,l.useEffect)(()=>{(async()=>{let e;if(f&&await u(),x){(0,a.wp)(x),m(!1);return}if(r){g((0,a.G$)()),m(!1);return}try{var t;e=await (0,a.e5)(f,null!==(t=null==b?void 0:b.get("template"))&&void 0!==t?t:void 0)}catch(e){console.error(e),v({type:"error",message:"Oops! We hit an error loading the current project. Please refresh to try again."})}finally{m(!1)}e||(e=(0,a.G$)()),g(e)})()},[]),(0,n.jsx)(c.Provider,{value:{project:x,loadingProject:p,updateProject:async e=>{g(e);try{let t=(0,a.UI)(e,f);h.current=t;let r=await t;return h.current===t&&g(r),r}catch(e){return console.error(e),v({type:"error",message:"Oops! We hit an error saving your project. Please refresh to try again."}),g(x),x}},updateLocalProject:e=>((0,a.wp)(e),g(e),e)},children:t})}},99836:function(e,t,r){"use strict";r.d(t,{Z:function(){return a}});var n=r(37065),s=r.n(n),l=r(2265);function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];(0,l.useEffect)(()=>{let t=s()(t=>{requestAnimationFrame(()=>{var r;e((null===(r=document.scrollingElement)||void 0===r?void 0:r.scrollTop)||window.scrollY||0,t)})},12,{leading:!0,trailing:!0});return t({}),document.addEventListener("scroll",t,{passive:!0}),document.addEventListener("wheel",t,{passive:!0}),()=>{document.removeEventListener("scroll",t),document.removeEventListener("wheel",t)}},t)}},91309:function(e,t,r){"use strict";r.d(t,{Z:function(){return a}});var n=r(57437),s=r(36760),l=r.n(s);function a(e){let{className:t}=e;return(0,n.jsxs)("svg",{className:l()("icon",t),height:"32",viewBox:"0 0 32 32",width:"32",children:[(0,n.jsx)("path",{d:"M5 17H27C27.5523 17 28 16.5523 28 16C28 15.4477 27.5523 15 27 15H5C4.44772 15 4 15.4477 4 16C4 16.5523 4.44772 17 5 17Z"}),(0,n.jsx)("path",{d:"M25.5858 16L17.2929 24.2929C17.1054 24.4804 17 24.7348 17 25C17 25.2652 17.1054 25.5196 17.2929 25.7071C17.4804 25.8946 17.7348 26 18 26C18.2652 26 18.5196 25.8946 18.7071 25.7071L27.7071 16.7071C28.0976 16.3166 28.0976 15.6834 27.7071 15.2929L18.7071 6.29289C18.5196 6.10536 18.2652 6 18 6C17.7348 6 17.4804 6.10536 17.2929 6.29289C17.1054 6.48043 17 6.73478 17 7C17 7.26522 17.1054 7.51957 17.2929 7.70711L25.5858 16Z"})]})}},84277:function(e,t,r){"use strict";r.d(t,{Z:function(){return a}});var n=r(57437),s=r(36760),l=r.n(s);function a(e){let{className:t}=e;return(0,n.jsx)("svg",{className:l()("icon",t),height:"32",viewBox:"0 0 32 32",width:"32",children:(0,n.jsx)("path",{d:"M10.2929 25.2929C10.1054 25.4804 10 25.7348 10 26C10 26.2652 10.1054 26.5196 10.2929 26.7071C10.4804 26.8946 10.7348 27 11 27C11.2652 27 11.5196 26.8946 11.7071 26.7071L21.7071 16.7071C22.0976 16.3166 22.0976 15.6834 21.7071 15.2929L11.7071 5.29289C11.5196 5.10536 11.2652 5 11 5C10.7348 5 10.4804 5.10536 10.2929 5.29289C10.1054 5.48043 10 5.73478 10 6C10 6.26522 10.1054 6.51957 10.2929 6.70711L19.5858 16L10.2929 25.2929Z"})})}},60559:function(e,t,r){"use strict";r.d(t,{Z:function(){return a}});var n=r(57437),s=r(36760),l=r.n(s);function a(e){let{className:t}=e;return(0,n.jsxs)("svg",{className:l()("icon",t),height:"32",viewBox:"0 0 32 32",width:"32",children:[(0,n.jsx)("path",{d:"M5 17H27C27.5523 17 28 16.5523 28 16C28 15.4477 27.5523 15 27 15H5C4.44772 15 4 15.4477 4 16C4 16.5523 4.44772 17 5 17Z"}),(0,n.jsx)("path",{d:"M15 5V27C15 27.5523 15.4477 28 16 28C16.5523 28 17 27.5523 17 27V5C17 4.44772 16.5523 4 16 4C15.4477 4 15 4.44772 15 5Z"})]})}},71425:function(e,t,r){"use strict";r.d(t,{Z:function(){return a}});var n=r(57437),s=r(36760),l=r.n(s);function a(e){let{className:t}=e;return(0,n.jsxs)("svg",{className:l()("icon",t),height:"114",viewBox:"0 0 116 114",width:"116",children:[(0,n.jsx)("rect",{height:"80",rx:"8",stroke:"#0A0B31",strokeWidth:"3",width:"80",x:"3.5",y:"4"}),(0,n.jsx)("rect",{height:"79.6283",rx:"8",stroke:"#0A0B31",strokeWidth:"3",transform:"rotate(15 38.0972 16)",width:"79.6283",x:"38.0972",y:"16"})]})}},21351:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(57437),s=r(36760),l=r.n(s),a=r(84277);function i(e){let{className:t}=e;return(0,n.jsx)(a.Z,{className:l()("rotate-y-180",t)})}},85003:function(e,t,r){"use strict";r.d(t,{Z:function(){return l}});let n=["Jan","Feb","Mar","Apr","May","June","July","Aug","Sept","Oct","Nov","Dec"],s=["January","February","March","April","May","June","July","August","September","October","November","December"];function l(e){let{fullMonth:t,includeTime:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=new Date(e),a=l.getFullYear(),i=l.getDate(),o=(t?s:n)[l.getMonth()];if(r){let e=l.getHours(),t=l.getMinutes();return"".concat(o," ").concat(i,", ").concat(a," at ").concat(e%12||12,":").concat(t<10?"0".concat(t):t," ").concat(e>=12?"PM":"AM")}return"".concat(o," ").concat(i,", ").concat(a)}},26872:function(e,t,r){"use strict";function n(e){if(!e)return{top:0,left:0,width:0,height:0};let t=0,r=0,n=e.offsetWidth,s=e.offsetHeight;for(;e&&e instanceof HTMLElement;)t+=e.offsetTop-e.scrollTop,r+=e.offsetLeft-e.scrollLeft,e=e.offsetParent;return{top:t,left:r,width:n,height:s}}r.d(t,{Z:function(){return n}})},37785:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});var n=r(70916);function s(e){return(0,n.Z)("/project/".concat(e,"/view"))}},50315:function(e,t,r){"use strict";r.d(t,{Z:function(){return a},d:function(){return i}});let n=/^(?:http(s)?:\/\/)?localhost[:\d]*(?:[^\:?\d]\S*)?$/,s=/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/,l=/^(https?:\/\/)?(www\.)?(m\.)?(youtube\.com|youtu\.?be)\/.+$/;function a(e){return n.test(e)||s.test(e)}function i(e){return l.test(e)}}},function(e){e.O(0,[5501,2739,7376,2972,8629,7209,5878,15,2543,5207,8217,8583,8891,4102,6508,1375,2971,2117,1744],function(){return e(e.s=93362)}),_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.