1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1375],{18029:function(e,t,r){r.d(t,{Z:function(){return f}});var n=r(57437),a=r(36760),i=r.n(a),s=r(2265),o=r(60209),l=r(95654),c=r(34321),u=r(95804);function d(e){let{muted:t,onChange:r}=e;return(0,n.jsx)(u.Z,{"aria-label":t?"Unmute sounds":"Mute sounds",className:"btn btn-icon-small btn-tertiary backdrop-blur-md",title:t?"Unmute sounds":"Mute sounds",onClick:()=>{r(!t)},children:t?(0,n.jsx)(l.Z,{className:"size-4 fill-white"}):(0,n.jsx)(c.Z,{className:"size-4 fill-white"})})}var C=r(28583),f=(0,s.forwardRef)(function(e,t){let{children:r,muteWrapClassName:a,...s}=e,{muted:l,setMuted:c}=(0,o.D)();return(0,n.jsxs)(C.default,{...s,ref:t,muted:l,children:[(0,n.jsx)("div",{className:i()("absolute left-2 top-2 transition-opacity duration-500",a),children:(0,n.jsx)(d,{muted:l,onChange:c})}),r]})})},91375:function(e,t,r){r.d(t,{default:function(){return Z}});var n=r(57437),a=r(36760),i=r.n(a),s=r(27648),o=r(99376),l=r(2265),c=r(22046),u=r(90443),d=r(78465),C=r(60538),f=r(18029),p=r(61896),h=r(82049),m=r(22787),b=r(85518),x=r(55749),v=r(14082),j=r(95804);function y(e){let{children:t,className:r,onDelete:a,projectId:i}=e,[s,o]=(0,l.useState)(!1),[c,u]=(0,l.useState)(!1),{addToast:d}=(0,b.e)(),C=(0,l.useRef)();async function f(){if(s){clearTimeout(C.current),u(!0);try{await (0,x.th)(i),a(i)}catch(e){console.error(e),d({type:"error",message:"Sorry! We encountered an error deleting your project. Please refresh and try again."})}finally{o(!1),u(!1)}}else o(!0),C.current=setTimeout(()=>{o(!1)},3e3)}return(0,n.jsx)(j.Z,{"aria-label":"Press twice to delete project",className:r,submitting:c,onClick:e=>{(0,v.Z)(e),f()},children:s?"You sure?":t})}function g(e){let{actions:t}=e,[r,a]=(0,l.useState)(!1),{refs:i,floatingStyles:o,context:c}=(0,p.YF)({middleware:[(0,h.RR)(),(0,h.cv)(4),(0,h.uY)()],open:r,onOpenChange:a,placement:"bottom-end"}),u=(0,p.eS)(c),d=(0,p.bQ)(c),{getReferenceProps:C,getFloatingProps:f}=(0,p.NI)([u,d]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("button",{ref:i.setReference,"aria-label":"More actions",className:"btn btn-icon-small btn-tertiary backdrop-blur-md",title:"More actions",...C(),children:(0,n.jsx)(m.Z,{className:"size-4 fill-white"})}),r&&(0,n.jsx)(p.ll,{children:(0,n.jsxs)("div",{ref:i.setFloating,className:"overflow-hidden rounded-2xl bg-secondary",style:o,...f(),children:[t.view&&(0,n.jsx)(s.default,{className:"btn btn-transparent !justify-start border-t-border-light px-4 py-2 first:border-t-0",href:t.view.viewUrl,prefetch:!1,children:"View on Worbler"}),t.edit&&(0,n.jsx)(s.default,{className:"btn btn-transparent !justify-start border-t-border-light px-4 py-2 first:border-t-0",href:"/edit?".concat(new URLSearchParams({project:t.edit.projectId})),prefetch:!1,children:"Edit"}),t.duplicate&&(0,n.jsx)(s.default,{className:"btn btn-transparent !justify-start border-t-border-light px-4 py-2 first:border-t-0",href:"/edit?".concat(new URLSearchParams({template:t.duplicate.templateId})),prefetch:!1,children:"Duplicate"}),t.delete&&(0,n.jsx)(y,{className:"btn-transparent w-full !justify-start border-t-border-light px-4 py-2 first:border-t-0",projectId:t.delete.projectId,onDelete:t.delete.onDelete,children:"Delete"}),t.share&&(0,n.jsx)(s.default,{className:"btn btn-transparent project-video-share !justify-start border-t-border-light px-4 py-2 first:border-t-0",href:t.share.viewUrl,prefetch:!1,children:"Share"}),t.report&&(0,n.jsx)(s.default,{className:"btn btn-transparent !justify-start border-t-border-light px-4 py-2 first:border-t-0",href:"/account/report?".concat(new URLSearchParams({url:t.report.viewUrl})),prefetch:!1,children:"Report"})]})})]})}var w=r(28583),M=r(67812);let N=["edit","share","delete","report","view"];function Z(e){let{actions:t,captionsUrl:r,children:a,clip:p,href:h,muted:m,orientation:b,poster:x,sources:v,videoClassName:j}=e,[y,Z]=(0,l.useState)(0),{setCurrentMedia:S}=(0,u.w)(),k=(0,o.useRouter)(),L=(0,l.useRef)(null),P=(0,l.useRef)(null),R=(0,l.useRef)(null),E=function(){let[e,t]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{t(window.matchMedia("(any-hover: hover)").matches)},[]),e}(),{showExtraUi:U,extraUiShown:D}=function(){let[e,t]=(0,l.useState)(!1),r=(0,l.useRef)();return{showExtraUi:()=>{t(!0),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{t(!1)},1500)},extraUiShown:e}}(),[I,z]=(0,l.useState)(!1),[H,T]=(0,l.useState)(!1),V=(0,c.Y)(!E,L,()=>{let e=P.current;!e||e.playing()||e.play()}),B=t.unmute?f.Z:w.default;return(0,n.jsx)("div",{ref:L,className:"project-video group/video",onMouseEnter:()=>{var e;I||(null===(e=P.current)||void 0===e||e.play(),U())},onMouseLeave:()=>{var e;null===(e=P.current)||void 0===e||e.pause()},onMouseMove:()=>{U()},children:(0,n.jsxs)(B,{ref:P,lazy:!0,captionsUrl:r,className:"overflow-hidden rounded-3xl",clip:p,hidePlayButton:!I,muteWrapClassName:i()("transition-opacity duration-500",D?"opacity-100":"opacity-0"),muted:m,orientation:b,poster:x,preload:"metadata",sources:v,videoClassName:i()("rounded-3xl",j),onClick:()=>{var e,t,r;if(h){k.push(h);return}if(!(null===(e=P.current)||void 0===e?void 0:e.playing())){null===(t=P.current)||void 0===t||t.play();return}E||D?(null===(r=P.current)||void 0===r||r.pause(),z(!0)):U()},onLoadedMetadata:e=>{Z(e.currentTarget.duration),V()},onPause:()=>{U(),T(!1)},onPlay:()=>{U(),T(!0),z(!1),P.current&&S(P.current)},onTimeUpdate:e=>{let t=P.current,r=R.current;if(!t||!r)return;let n="".concat(e/t.duration()*100,"%");r.style.background="linear-gradient(to right, #8AD2FF ".concat(n,", rgba(0,0,0,0.5) ").concat(n,")")},children:[Object.keys(t).some(e=>N.includes(e))&&(0,n.jsx)("div",{className:i()("absolute right-2 top-2 transition-opacity duration-500",E&&!D&&"opacity-0"),children:(0,n.jsx)(g,{actions:t})}),!!y&&!H&&(0,n.jsx)(M.Z,{className:i()("px-4 py-2 transition-transform duration-500",(D||H)&&"-translate-y-4"),duration:y}),!!(t.like||t.duplicate)&&(0,n.jsxs)("div",{className:i()("absolute bottom-2 right-2 flex items-center gap-2 transition-[opacity,transform] duration-500",(D||H)&&"-translate-y-4",D||!H?"opacity-100":"opacity-0"),children:[!!t.like&&(0,n.jsx)(C.Z,{className:"btn-icon-small btn-tertiary backdrop-blur-md",iconClassName:"!h-4 !w-4",id:t.like.projectId}),!!t.duplicate&&(0,n.jsx)(s.default,{"aria-label":"Duplicate this video",className:"duplicate-button btn btn-icon-small btn-tertiary backdrop-blur-md",href:"/edit?".concat(new
1URLSearchParams({template:t.duplicate.templateId})),prefetch:!1,title:"Duplicate this video",children:(0,n.jsx)(d.Z,{className:"size-4 fill-white"})})]}),(0,n.jsx)("div",{ref:R,className:i()("absolute inset-x-0 bottom-0 h-[7px] origin-bottom rounded-b-full bg-black/20 transition-[transform,opacity] duration-500",D||H?"scale-y-100 opacity-100":"scale-y-0 opacity-0")}),a]})})}},67812:function(e,t,r){r.d(t,{Z:function(){return o}});var n=r(57437),a=r(36760),i=r.n(a),s=r(94156);function o(e){let{className:t,duration:r}=e;return(0,n.jsx)("div",{className:i()("pointer-events-none absolute bottom-2 left-2 rounded-full bg-background/50 backdrop-blur-md",t),children:(0,s.Z)(r)})}},22046:function(e,t,r){r.d(t,{AutoPlayManager:function(){return c},Y:function(){return l}});var n=r(57437),a=r(93810),i=r.n(a),s=r(2265);let o=(0,s.createContext)({onScreenElements:new Map,recalculatePlayingElement:i(),activate:i()}),l=(e,t,r)=>{let n=(0,s.useContext)(o);return(0,s.useEffect)(()=>{if(!e)return;let a=new IntersectionObserver(e=>{let[a]=e;(null==a?void 0:a.isIntersecting)?n.onScreenElements.set(t,{play:r}):n.onScreenElements.delete(t),n.recalculatePlayingElement()},{threshold:[0,.25,.5,.75,1]});return t.current&&a.observe(t.current),()=>{a.disconnect(),n.onScreenElements.delete(t)}},[e,t]),n.activate};function c(e){let{children:t}
1=e,r=(0,s.useRef)(!1),[a]=(0,s.useState)(()=>new Map),i=(0,s.useCallback)(()=>{if(!r.current||0===a.size)return;let e=Math.max(document.documentElement.clientHeight||0,window.innerHeight||0),t=Array.from(a.keys()),n=new Map(t.map(e=>[e,e.current.getBoundingClientRect()])),i=t.sort((t,r)=>{let a=n.get(t),i=n.get(r);return Math.abs(e/2-(a.y+a.height/2))-Math.abs(e/2-(i.y+i.height/2))});a.get(i[0]).play()},[a]),l=(0,s.useCallback)(()=>{r.current=!0},[]);return(0,n.jsx)(o.Provider,{value:{onScreenElements:a,recalculatePlayingElement:i,activate:l},children:t})}},90443:function(e,t,r){r.d(t,{MediaProvider:function(){return c},w:function(){return l}});var n=r(57437),a=r(93810),i=r.n(a),s=r(2265);let o=(0,s.createContext)({setCurrentMedia:i()}),l=()=>(0,s.useContext)(o);function c(e){let{children:t}=e,[r,a]=(0,s.useState)();return(0,n.jsx)(o.Provider,{value:{currentMedia:r,setCurrentMedia:e=>{r&&r!==e&&(r instanceof AudioContext?r.suspend():r.pause()),a(e)}},children:t})}},60209:function(e,t,r){r.d(t,{D:function(){return l},GlobalMuteProvider:function(){return c}});var n=r(57437),a=r(93810),i=r.n(a),s=r(2265);let o=(0,s.createContext)({muted:!0,setMuted:i()}),l=()=>(0,s.useContext)(o);function c(e){let{children:t}
1=e,[r,a]=(0,s.useState)(!0);return(0,n.jsx)(o.Provider,{value:{muted:r,setMuted:a},children:t})}},22787:function(e,t,r){r.d(t,{Z:function(){return s}});var n=r(57437),a=r(36760),i=r.n(a);function s(e){let{className:t}=e;return(0,n.jsxs)("svg",{className:i()("icon",t),height:"32",viewBox:"0 0 32 32",width:"32",children:[(0,n.jsx)("path",{d:"M17.5 16C17.5 16.8284 16.8284 17.5 16 17.5C15.1716 17.5 14.5 16.8284 14.5 16C14.5 15.1716 15.1716 14.5 16 14.5C16.8284 14.5 17.5 15.1716 17.5 16Z"}),(0,n.jsx)("path",{d:"M25.5 16C25.5 16.8284 24.8284 17.5 24 17.5C23.1716 17.5 22.5 16.8284 22.5 16C22.5 15.1716 23.1716 14.5 24 14.5C24.8284 14.5 25.5 15.1716 25.5 16Z"}),(0,n.jsx)("path",{d:"M9.5 16C9.5 16.8284 8.82837 17.5 8 17.5C7.17163 17.5 6.5 16.8284 6.5 16C6.5 15.1716 7.17163 14.5 8 14.5C8.82837 14.5 9.5 15.1716 9.5 16Z"})]})}},95654:function(e,t,r){r.d(t,{Z:function(){return s}});var n=r(57437),a=r(36760),i=r.n(a);function s(e){let{className:t}=e;return(0,n.jsxs)("svg",{className:i()("icon",t),height:"32",viewBox:"0 0 32 32",width:"32",children:[(0,n.jsx)("path",{d:"M2.77368 2.55384C2.60689 2.37935 2.3784 2.27713 2.13715 2.26907C1.8959 2.26101 1.66109 2.34776 1.48303 2.51073C1.30497 2.6737 1.19782 2.89993 1.18454 3.14095C1.17126 3.38196 1.25291 3.61859 1.41199 3.80014L7.71368 10.4596H2.91314C2.42345 10.4596 1.95382 10.6541 1.60756 11.0004C1.2613 11.3466 1.06677 11.8162 1.06677 12.3059V19.6914C1.06677 20.1811 1.2613 20.6507 1.60756 20.997C1.95382 21.3432 2.42345 21.5378 2.91314 21.5378H8.14065L16.1954 27.8038C16.3573 27.9294 16.556 27.9984 16.7609 28C16.9005 27.9984 17.0382 27.9669 17.1648 27.9077C17.3206 27.8319 17.4519 27.7138 17.5437 27.5668C17.6356 27.4199 17.6842 27.2501 17.684 27.0768V21.4339L25.209 29.4435C25.2954 29.538 25.4006 29.6135 25.5178 29.6651C25.635 29.7168 25.7617 29.7435 25.8898 29.7435C26.1201 29.7413 26.3416 29.6551 26.513 29.5012C26.6037 29.4202 26.6773 29.3218 26.7295 29.212C26.7816 29.1021 26.8113 28.9829 26.8167 28.8613C26.822 28.7398 26.803 28.6185 26.7608 28.5044C26.7185 28.3903 26.6539 28.2859 26.5706 28.1972L2.77368 2.55384Z"}),(0,n.jsx)("path",{d:"M16.08 14.1754C16.166 14.2704 16.2711 14.3463 16.3884 14.398C16.5057 14.4497 16.6326 14.4761 16.7608 14.4754C16.8751 14.4788 16.9889 14.4591 17.0955 14.4177C17.2697 14.35 17.4192 14.231 17.5243 14.0764C17.6294 13.9219 17.6851 13.7391 17.684 13.5522V4.92047C17.6835 4.74802 17.6347 4.57917 17.5432 4.43304C17.4516 4.2869 17.3209 4.16934 17.166 4.09366C17.011 4.01799 16.838 3.98723 16.6664 4.00487C16.4949 4.0225 16.3317 4.08784 16.1954 4.19346L11.591 7.77079C11.4921 7.84997 11.4102 7.94845 11.3505 8.06024C11.2908 8.17204 11.2544 8.29481 11.2436 8.4211C11.2328 8.54739 11.2478 8.67456 11.2877 8.79487C11.3276 8.91518 11.3915 9.02612 11.4756 9.12094L16.08 14.1754Z"}),(0,n.jsx)("path",{d:"M29.9999 15.6667C29.9999 18.9067 28.7066 22.0267 26.4133 24.3201L26.3066 24.4667L24.6666 22.6667C26.4533 20.8534 27.5466 18.2401 27.5466 15.6801C27.5466 13.1201 26.5199 10.6001 24.6933 8.76008C24.5733 8.65341 24.4799 8.52008 24.4266 8.37341C24.3599 8.21341 24.3333 8.06675 24.3199 7.89341C24.3199 7.73341 24.3599 7.57341 24.4133 7.42675C24.4799 7.28008 24.5733 7.14675 24.6799 7.02675C24.7999 6.92008 24.9333 6.82675 25.0799 6.76008C25.2266 6.70675 25.3866 6.66675 25.5466 6.66675C25.7066 6.66675 25.8666 6.69341 26.0133 6.76008C26.1733 6.82675 26.3066 6.90675 26.4133 7.02675C28.7066 9.32008 29.9999 12.4267 29.9999 15.6667Z"}),(0,n.jsx)("path",{d:"M23.88 15.6668C23.88 17.2002 23.32 18.6535 22.28 19.7735L20.64 17.9468C21.16 17.2935 21.44 16.4935 21.44 15.6668C21.44 14.6935 21.0533 13.7601 20.36 13.0668C20.24 12.9602 20.1467 12.8268 20.0933 12.6802C20.0267 12.5335 20 12.3735 20 12.2135C20 12.0535 20.0267 11.8935 20.0933 11.7468C20.1467 11.5868 20.24 11.4535 20.36 11.3468C20.5867 11.1201 20.9067 10.9868 21.2267 10.9868C21.5467 10.9868 21.8533 11.1201 22.0933 11.3468C23.24 12.4935 23.88 14.0535 23.88 15.6668Z"})]})}},34321:function(e,t,r){r.d(t,{Z:function(){return s}});var n=r(57437),a=r(36760),i=r.n(a);function s(e){let{className:t}=e;return(0,n.jsxs)("svg",{className:i()("icon",t),height:"32",viewBox:"0 0 32 32",width:"32",children:[(0,n.jsx)("path",{d:"M17.5354 4.0917C17.3767 4.01685 17.1996 3.9869 17.0244 4.00525C16.8491 4.02361 16.6827 4.08952 16.5437 4.19555L8.29165 10.4611H2.95554C2.45457 10.4611 1.97413 10.6556 1.61989 11.0018C1.26566 11.3481 1.06665 11.8177 1.06665 12.3073V19.6921C1.06665 20.1817 1.26566 20.6513 1.61989 20.9976C1.97413 21.3438 2.45457 21.5383 2.95554 21.5383H8.29165L16.5437 27.8038C16.7085 27.931 16.9123 28.0001 17.1222 28C17.2651 27.9983 17.406 27.9669 17.5354 27.9077C17.6948 27.8319 17.8291 27.7138 17.9231 27.5669C18.017 27.4199 18.0668 27.2502 18.0667 27.0769V4.92249C18.0668 4.74924 18.017 4.57945 17.9231 4.43253C17.8291 4.28561 17.6948 4.1675 17.5354 4.0917Z"}),(0,n.jsx)("path",{d:"M26.4226 9.26647C26.3081 9.18146 26.1723 9.11417 26.0231 9.06845C25.8738 9.02273 25.714 8.99948 25.5528 9.00001C25.3915 9.00054 25.232 9.02485 25.0833 9.07156C24.9346 9.11826 24.7996 9.18644 24.6861 9.2722C24.5725 9.35797 24.4827 9.45964 24.4216 9.5714C24.3606 9.68317 24.3295 9.80285 24.3302 9.92361C24.3309 10.0444 24.3634
110.1638 24.4258 10.2752C24.4881 10.3866 24.5792 10.4876 24.6937 10.5726C26.5259 11.9493 27.5547 13.8136 27.5547 15.7572C27.5547 17.7008 26.5259 19.5652 24.6937 20.9418C24.5785 21.0261 24.487 21.1268 24.4245 21.2379C24.362 21.3491 24.3298 21.4685 24.3298 21.5891C24.3298 21.7097 24.362 21.8291 24.4245 21.9403C24.487 22.0515 24.5785 22.1522 24.6937 22.2365C24.9222 22.405 25.2299 22.4996 25.5505 22.5C25.8756 22.499 26.1877 22.4047 26.4226 22.2365C28.7136 20.5142 29.9999 18.1824 29.9999 15.7515C29.9999 13.3206 28.7136 10.9887 26.4226 9.26647Z"}),(0,n.jsx)("path",{d:"M20.3638 12.509C20.2486 12.5933 20.1571 12.694 20.0946 12.8051C20.0321 12.9163 19.9999 13.0357 19.9999 13.1563C19.9999 13.2769 20.0321 13.3963 20.0946 13.5075C20.1571 13.6187 20.2486 13.7194 20.3638 13.8037C21.0514 14.3211 21.4375 15.0215 21.4375 15.7515C21.4375 16.4815 21.0514 17.1818 20.3638 17.6993C20.2486 17.7836 20.1571 17.8843 20.0946 17.9954C20.0321 18.1066 19.9999 18.226 19.9999 18.3466C19.9999 18.4672 20.0321 18.5866 20.0946 18.6978C20.1571 18.809 20.2486 18.9097 20.3638 18.994C20.4749 19.0795 20.6082 19.147 20.7556 19.1924C20.903 19.2377 21.0613 19.2599 21.2206 19.2575C21.3822 19.2601 21.5429 19.2381 21.6928 19.1928C21.8427 19.1475 21.9788 19.0798 22.0927 18.994C23.2382 18.1329 23.8813 16.9669 23.8813 15.7515C23.8813 14.536 23.2382 13.3701 22.0927 12.509C21.8632 12.3376 21.5524 12.2413 21.2282 12.2413C20.9041 12.2413 20.5932 12.3376 20.3638 12.509Z"})]})}},94156:function(e,t,r){r.d(t,{Z:function(){return n}});function n(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,r="".concat(Math.floor(e/60)).padStart(t,"0"),n="".concat(Math.floor(e%60)).padStart(2,"0");return"".concat(r,":").concat(n)}}}]);
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.