1import{o as C,r as c,bV as v,j as m,e as t,dD as ce,M as k,bB as de,i as l,cr as pe,d6 as ue,at as H,cs as me,bP as ge,go as K,ek as X,bd as Z,el as Y,cR as J,am as T,a9 as he,cK as fe,F as y,af as ye,eQ as Q,gp as ee,gq as te,gr as be,gs as ve,eo as we,b as x,gt as Ce,gu as P,gv as ke,gh as xe,gw as z,bC as Pe,bF as Ie,bG as Se,gx as De,gy as _e,gz as Ee,D as A,P as Te,gA as Ae,S as Be,s as B,gB as R,br as Le,gC as Me,dV as Ve,gD as Oe,gE as Fe,gF as N,gG as D,gH as ze,er as oe,bw as Re,gI as Ne,bj as Ue,gJ as je,aW as U,aX as j,aV as G,aZ as Ge,aY as qe,gK as _,gL as We,cT as $e}from"./index-dK-KQR3u.js";import{O as He}from"./OrgVideosDropList-CAtvjYTj.js";import{TemplateGalleryModal as Ke}from"./TemplateGalleryModal-BNWJUvb5.js";import"./chunk-Ccq0P8SR.js";import"./store-BerQXuIb.js";import{u as Xe}from"./TemplateSearch-DD0awpNt.js";import{S as Ze}from"./SearchInput-C-9cnuR6.js";import{N as Ye}from"./NoResults-M0UmE4Lj.js";import{B as Je,a as Qe,b as et}from"./BulkDeleteAction-BRb7U4Qj.js";import{D as tt}from"./DownloadMinimalistic-nb9BzaTU.js";import{A as ot}from"./AddLibraryItemCard-DsW1Mm1N.js";import{E as nt}from"./ExpandLess-BXbSz50b.js";import{E as at}from"./ExpandMore-CxR-uHRp.js";import"./templates-api-BFxMJLMP.js";import"./ChipFilter-C8VJRULF.js";import"./Tabs-DSvp3Kpp.js";import"./PlusSign-BndXfrxF.js";import"./RadioGroup-CutKXCyA.js";import"./Stack-Dm43KxsF.js";import"./styled-DURT3pbh.js";import"./index.esm-DDWa65cW.js";import"./index.esm-C4qE9m-H.js";import"./Link-DOVGJBbg.js";import"./Stop-YUvT33VP.js";import"./AltArrowDown-CLy8fyI1.js";import"./s3-BQJuckyL.js";import"./lottie-react.esm-CgzLbITc.js";import"./Search-plTd6u46.js";import"./Clear-DU0TUgTT.js";import"./Trash-DmwKbRsY.js";const st=l("div",{target:"e1czawdl7"})("width:100%;display:flex;justify-content:space-between;align-items:center;color:",({theme:e})=>e.colors.black.main,";font-size:24px;font-weight:600;letter-spacing:-0.48px;font-family:'Manrope',sans-serif;button{color:",({theme:e})=>e.colors.black.main,";}"),rt=l("video",{target:"e1czawdl6"})("border-radius:8px;outline:none;width:100%;height:auto;max-height:501px;background:",({theme:e})=>e.colors.black.main,";::cue{text-shadow:-1px -1px 0 ",({theme:e})=>e.colors.black.main,",1px -1px 0 ",({theme:e})=>e.colors.black.main,",-1px 1px 0 ",({theme:e})=>e.colors.black.main,",1px 1px 0 ",({theme:e})=>e.colors.black.main,";}"),it=l(ge,{target:"e1czawdl5"})({name:"1nixeyu",styles:"& .MuiPaper-root{padding:24px;box-sizing:content-box;max-width:940px;border-radius:20px;}"}),lt=l(H,{target:"e1czawdl4"})({name:"1o3nkn",styles:"margin-left:auto"}),ct=l(pe,{target:"e1czawdl3"})({name:"7xl4vw",styles:"padding:0px!important;margin-bottom:24px"}),dt=l(ue,{target:"e1czawdl2"})({name:"1rrhe0z",styles:"padding:0px!important"}),pt=l(me,{target:"e1czawdl1"})({name:"z1npnl",styles:"margin-top:24px;padding:0px!important;justify-content:flex-end"}),ut=l("div",{target:"e1czawdl0"})("position:relative;width:100%;background:",({theme:e})=>e.colors.black.main,";border-radius:8px;overflow:hidden;"),mt=({isOpen:e,onClose:o,headerText:n,videoUrl:r,ctaLabel:s,onCtaClick:a,mixpanelEventName:i})=>{const p=C();c.useEffect(()=>{e&&(p==null||p.track(i,{event:v.VIEW,action:"modal-open"}))},[e,p,i]);const d=h=>{const u=h.target;u.currentTime=0,u.controls=!0},g=()=>{p==null||p.track(i,{event:v.CLICK,action:"close"}),o()};return m(it,{onClose:g,open:e,children:[t(ct,{children:m(st,{children:[n,t(ce,{onClick:g,children:t(k,{src:de,size:"20px"})})]})}),t(dt,{children:t(ut,{children:m(rt,{preload:"auto",onLoadedMetadata:d,width:"100%",height:"100%",controls:!0,controlsList:"nodownload",crossOrigin:"use-credentials",playsInline:!0,autoPlay:!0,children:[t("source",{src:r,type:"video/mp4"}),"Your browser does not support the video tag."]})})}),t(pt,{children:t(lt,{variant:"contained",color:"primary",onClick:a,children:s})})]})},gt=l(ye,{target:"e1r281q40"})({name:"1wdl9q5",styles:"--did-button-primary-solid-text:var(--static-ink)"}),ht=()=>{const{navigateToAdvancedEditor:e,isLoading:o}=K(),{outOfFreeVideos:n}=X(),r=Z(Y),{open:s,isVisuallyOpen:a}=J(),i=T("template_gallery_v2",!1),p=Xe(),d=()=>{i&&!n&&p()};return m(y,{children:[t(gt,{id:"create-video-btn","data-testid":"studio-create-video-button",onClick:async()=>
1{if(n){r(!0);return}if(i){s();return}await e({mixPanelFrom:"header-button"})},onMouseEnter:d,onFocus:d,"aria-label":"create video",isLoading:o,leftIcon:t(he,{src:fe,size:"16px"}),size:"large",children:"Create video"}),a&&t(Ke,{from:"Videos"})]})},ft=()=>{const[e,o]=Q(ee),n=s=>{const a=s.currentTarget.value||"";o(i=>({...i,nameContains:a}))},r=()=>{o(s=>({...s,nameContains:""}))};return t(Ze,{id:"video-search-textfield",placeholder:"Search videos",search:e.nameContains||"",onChange:n,onClear:r})},yt=l("div",{target:"e11vyaia0"})({name:"bcffy2",styles:"display:flex;align-items:center;justify-content:space-between"}),bt=()=>m(yt,{children:[t(ft,{}),t(ht,{})]}),vt="https://website.simpleshow.com",ne="simpleshow-banner",wt="/v0.1262.0/assets/video-bg-2ZkZ9jyG.png",Ct=l("div",{target:"entul0o1"})("background:",({theme:e})=>e.colors.primary.bgMedium,";color:",({theme:e})=>e.colors.primary.main,";border-radius:16px;padding:4px 8px;width:fit-content;font-size:12px;font-weight:700;line-height:19px;letter-spacing:0.16px;font-family:'Manrope',sans-serif;"),q=l(H,{target:"entul0o0"})("font-size:14px;&.MuiButton-outlined{border-color:",({theme:e})=>e.colors.black[300],"!important;}"),kt="https://www.d-id.com/create-explainer-videos-with-simpleshow-now-available-for-d-id-users/",xt=encodeURI(`${we}/simpleshow_promo_video_V2.mp4`),Pt="simpleshow-banner",It="simpleshow-modal",St=()=>{const[e,o]=c.useState(!0),[n,r]=c.useState(!1),{incrementCloseCount:s,markCtaClicked:a}=te(ne),i=C(),p=()=>{o(!1),s(),i==null||i.track("close-banner-videomaker",{event:v.CLICK,from:"Studio Banner"})},d=()=>{r(!0),i==null||i.track("video-preview",{event:v.CLICK,from:"video-maker-banner",videoID:"simpleshow_promo_video_V2"})},g=()=>{o(!1),a(),i==null||i.track("try-videomaker",{event:v.CLICK,from:"Studio Banner"}),window.open(vt,"_blank","noopener,noreferrer")};return m(y,{children:[t(ve,{isOpen:e,badge:t(Ct,{children:'Get 75% off all simpleshow plans with code "DID75"'}),title:"A new way to create animated videos - simpleshow is now part of D-ID",description:"Easily turn your content into engaging, on-brand explainer videos with visuals and voice - powered by D-ID avatars.",actions:m(y,{children:[m(q,{variant:"contained",color:"primary",onClick:g,style:{minWidth:"88px"},children:["Try for free",t(k,{src:be,size:"15px",style:{marginLeft:"4px"}})]}),t(q,{variant:"outlined",color:"secondary",onClick:()=>{o(!1),a(),i==null||i.track("learnmore-videomaker",{event:v.CLICK,from:"Studio Banner"}),window.open(kt,"_blank","noopener,noreferrer")},style:{minWidth:"88px"},children:"Learn more"})]}),videoBgImage:wt,onClose:p,onVideoClick:d,mixpanelEventName:Pt}),t(mt,{isOpen:n,onClose:()=>r(!1),headerText:"simpleshow is now part of D-ID!",videoUrl:xt,ctaLabel:"Try for free",onCtaClick:()=>{g(),r(!1)},mixpanelEventName:It})]})},Dt=()=>{const{user:e}=x(),o=Ce(e),{shouldShowBanner:n}=te(ne);return{showBanner:o&&n}},_t=l(Ie,{target:"e1b9gfe70"})("& .",Se.tooltip,"{background-color:",({theme:e})=>e.colors.secondary.main,";}"),Et=()=>{const{selected:e,reset:o}=P(),n=C(),{mutateAsync:r}=ke(),{mutateAsync:s}=xe(),a=[...e.values()];return a.find(d=>![z.Done,z.Ready].includes(d.status))?null:t(_t,{title:"Download videos",children:t(Pe,{src:tt,size:"24px",onClick:async()=>{if(!e.size)return;n==null||n.track("bulk-download-projects",{event:"click",from:"library",count:e.size});const d=a.map(g=>({dataurl:g.video_url,filename:g.name??"video",extension:".mp4"}));d.length===1&&await s(d[0]),d.length>1&&await r(d),o()}})})},Tt=()=>{const{selected:e,reset:o}=P(),{mutate:n,isLoading:r}=De(),{clearIdbDraft:s}=_e();return m(Qe,{children:[t(Et,{}),t(Je,{selected:e,reset:o,onDelete:n,isDeleting:r,tooltipTitle:"Delete videos",itemType:"video",mixpanelEvent:"bulk-delete-projects",modalText:{title:"Confirm delete",content:`Are you sure you want to delete ${e.size} videos from your library? This action cannot be undone.`,cta:"Delete videos"},onBeforeDelete:e.has(Ee)?s:void 0})]})},At=()=>{const{selected:e,reset:o}=P();return t(et,{reset:o,selectedElementsCount:e.size,children:t(Tt,{})})},Bt=l(ot,{target:"efzbvam0"})({name:"18srsm0",styles:"width:305px;height:190px"}),Lt=()=>{const{outOfFreeVideos:e}=X(),o=Z(Y),{isLoading:n,navigateToAdvancedEditor:r}=K(),{open:s}=J(),a=T("template_gallery_v2",!1);return t(Bt,{id:"create-video-card",label:"Create video",onClick:async()=>
1{if(e){o(!0);return}if(a){s();return}await r({mixPanelFrom:"create-video-tile"})},loading:n})};function Mt({openPostCheckout:e}){const{state:o}=A(),[n,r]=c.useState(!1),[s,a]=c.useState(!1),{newPriceId:i,newPlan:p,newInterval:d}=o||{},g=C(),{user:h}=x();return c.useEffect(()=>{i&&((h==null?void 0:h.paymentProvider)===Te.AppStore?(g==null||g.track("goto-mobile-manage-account",{redirect:"root",cause:"mobile user"}),r(!0)):a(!0))},[i,h==null?void 0:h.paymentProvider]),s?m(y,{children:[t(Ae,{setIsOpen:a,newPlan:p,newInterval:d,newPriceId:i,openPostCheckout:e}),t(Be,{open:n,onClose:()=>{r(!1)},content:"Please use the mobile app to manage your plan.",primaryActionContent:"Got It",onPrimaryAction:()=>{r(!1)},buttonPlacement:"center"})]}):null}const Vt=({isPostCheckoutOpen:e,setIsPostCheckoutOpen:o})=>{const{state:n}=A(),{user:r}=x(),s=B()[0],a=s.get("purchase");if(c.useEffect(()=>{a==="success"&&o(!0)},[a]),!e)return null;const i=s.get("price_id")||void 0,p=s.get("plan"),d=s.get("billing")||(r==null?void 0:r.billingInterval);return a==="success"?t(R,{isNewSubscription:!0,onClose:()=>o(!1),requestedPriceId:i,requestedPlan:p,requestedBilling:d}):t(R,{onClose:()=>o(!1),requestedPlan:n==null?void 0:n.newPlan,requestedBilling:n==null?void 0:n.newInterval,requestedPriceId:n==null?void 0:n.newPriceId})},Ot=l("div",{target:"ee7absy2"})({name:"g1721d",styles:"display:flex;flex-direction:column;gap:24px;width:100%"}),Ft=l("div",{target:"ee7absy1"})("display:grid;grid-template-columns:repeat(auto-fill, minmax(",oe,"px, 1fr));grid-row:1;grid-gap:24px;overflow:hidden;"),zt=l("div",{target:"ee7absy0"})(),Rt=()=>{var O,F;const{user:e}=x(),o=C(),{ref:n,inView:r}=Le(),{fetchNextPage:s,isLoading:a,hasNextPage:i}=Me({isAnonymous:!1}),[p,d]=c.useState(!1),{state:g}=A(),{isAfterGenerate:h}=g||{},{userSettings:u}=Ve(),{reset:w}=P(),{items:f}=Oe(),[ae,se]=Q(ee),{getFilteredVideos:re}=Fe(),L=re(f);c.useEffect(()=>()=>w(),[]);const M=c.useRef(!1);c.useEffect(()=>{if(!a&&f.length>0&&!M.current){const b=f.filter(S=>S.type===N.SIMPLESHOW).length,I=f.filter(S=>S.type===N.PROJECT).length;o==null||o.track("galleryLoad",{allProjectsCount:f.length,videomakerProjectsCount:b,editorProjectsCount:I}),M.current=!0}},[a,f.length,o]);const V=T("monthly_to_annual_popup_type",D.CONTROL),ie=V===D.A||V===D.B,le=(e==null?void 0:e.billingInterval)==="month"&&ie&&h&&f.length>ze(e==null?void 0:e.planGroup)&&!((F=(O=u==null?void 0:u.messages)==null?void 0:O.monthlyToAnnualDiscountOffer)!=null&&F.seen);return c.useEffect(()=>{r&&!a&&s()},[r,a]),a?t(Re,{amount:7,tileHeight:"190px",tileWidth:`${oe}px`}):m(Ot,{children:[!a&&!(f!=null&&f.length)?t(y,{children:t(Lt,{})}):m(y,{children:[t(Ye,{show:!L.length&&!!ae.nameContains,handleClearSearch:()=>se(b=>({...b,nameContains:""}))}),t(Ft,{children:L.map((b,I)=>t(Ne,{item:b,origin:"video-gallery",priority:I<Ue},b.id))}),i&&t(zt,{ref:n}),t(At,{})]}),t(Vt,{isPostCheckoutOpen:p,setIsPostCheckoutOpen:d}),t(Mt,{openPostCheckout:()=>{d(!0)}}),t(je,{show:le})]})},W="/v0.1262.0/assets/CalendarMark-Bej_UitE.svg",Nt="/v0.1262.0/assets/ClockCircle-BB8NNHfv.svg",$="/v0.1262.0/assets/SortByAlphabet-Rl9ch36P.svg",Ut="/v0.1262.0/assets/SortVertical-CosrXq7b.svg",jt=l("div",{target:"e1dsdfhm2"})({name:"11rcwxl",styles:"margin-bottom:4px"}),Gt=l("span",{target:"e1dsdfhm1"})("font-size:12px;font-weight:600;color:",({theme:e})=>e.colors.secondary[600],";"),qt=l("div",{target:"e1dsdfhm0"})({name:"ysrhpu",styles:"margin:4px 12px 8px 12px"}),E=[{key:"last-modified",label:"Last modified",sort_by:"modified_at",order:"descending",icon:Nt},{key:"newest",label:"Newest created",sort_by:"created_at",order:"descending",icon:W},{key:"oldest",label:"Oldest created",sort_by:"created_at",order:"ascending",icon:W},{key:"az",label:"Alphabetical (A-Z)",sort_by:"name",order:"ascending",icon:$},{key:"za",label:"Alphabetical (Z-A)",sort_by:"name",order:"descending",icon:$}],Wt=()=>{const[e,o]=B(),[n,r]=c.useState(!1),s=c.useMemo(()=>e.get("sort_by"),[e]),a=c.useMemo(()=>e.get("order"),[e]),i=c.useMemo(()=>E.map(u=>({label:m(G,{selected:u.sort_by===s&&u.order===a,onClick:()=>{o(w=>(w.set("sort_by",u.sort_by),w.set("order",u.order),w)),r(!1)},children:[t(U,{children:t(k,{src:u.icon,size:"20px",tone:"secondary"})}),t(j,{children:u.label})]})})),[s,a,o]),p=c.useMemo(()=>E.find(u=>u.sort_by===s&&u.order===a)||E[0],[s,a]),d=c.useCallback(u=>m(jt,{children:[t(qt,{children:t(Gt,{children:"Sort by"})}),u]}),[]),g=c.useCallback(()=>{r(!1)},[]),h=c.useCallback(()=>{r(!0)},[]);return t(qe,{closed:!n,onClose:g,onOpen:h,trigger:m(G,{children:[t(U,{children:t(k,{src:Ut,size:"20px",tone:"secondary"})}),t(j,{children:p.label}),t(Ge,{children:n?t(at,{}):t(nt,{})})]}),renderMenuWrapper:d,items:i})},$t=l("div",{target:"eo79lva1"})({name:"qn0jt5",styles:"display:flex;flex-direction:row;gap:2rem"}),Ht=l("button",{target:"eo79lva0"})("padding:1rem 0;border:none;background:none;cursor:pointer;font-size:1.6rem;color:",e=>e.theme.colors.secondary.main,";font-weight:600;position:relative;transition:color 0.3s ease;outline:none;&::after{content:'';position:absolute;bottom:-2px;left:0;width:100%;height:2px;background-color:",({theme:e,isActive:o})=>o?e.colors.primary.main:e.colors.secondary[600],";
1transform:scaleX(",e=>e.isActive?1:0,");transition:transform 0.3s ease,background-color 0.3s ease;}&:hover::after{transform:scaleX(1);}"),Kt=[{label:"All",filter:_.ALL},{label:"Videos",filter:_.VIDEOS},{label:"Draft",filter:_.DRAFTS}],Xt=c.memo(()=>{const[e,o]=B(),n=c.useMemo(()=>e.get("filter_by"),[e]),r=c.useCallback(s=>{o(a=>(a.set("filter_by",s),a))},[o]);return t($t,{children:Kt.map((s,a)=>t(Ht,{isActive:n===s.filter||!n&&a===0,onClick:()=>r(s.filter),children:s.label},s.filter))})}),Eo=l("h2",{target:"e1375k402"})("color:",({theme:e})=>e.colors.black[700],";font-size:16px;font-weight:700;letter-spacing:-0.32px;"),Zt=l("div",{target:"e1375k401"})("margin:32px 0 16px;display:flex;align-items:center;gap:8px;justify-content:space-between;border-bottom:1px solid ",({theme:e})=>e.colors.black[200],";"),Yt=l("div",{target:"e1375k400"})({name:"1u1z6e7",styles:"display:flex;gap:2rem"}),To=()=>{const{showBanner:e}=Dt();return m(y,{children:[t(bt,{}),e&&t(St,{}),m(Zt,{children:[t(Xt,{}),m(Yt,{children:[t(He,{}),t(Wt,{})]})]}),t(Rt,{}),t(We,{}),t($e,{from:"video-studio"})]})};export{Eo as SectionTitle,To as VideoStudioPage};
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.