PageSourceSearch

https://studio.d-id.com/v0.1262.0/assets/template-k4D_9RZ9.js

js d-id.com collected 2026-09-24 07:59:47 UTC 2,881 bytes, 1 lines download raw bytes

1import{r as x,o as g,j as c,e as t,M as h,af as p,fg as v,F as y,u as m,eR as A,c9 as k,m as w,i as o,dD as b,f as u,b as C,a as S,d as T,cL as L}from"./index-dK-KQR3u.js";import{u as P}from"./useAgentsLibrary-BSnIaWge.js";import{A as z}from"./AgentPreview-DiI-t9ri.js";import"./loadAgentsClientScript-XJeYhoW0.js";const B="/v0.1262.0/assets/Forward-DrKthopn.svg",E=({template:e})=>{const[r,a]=x.useState(null),n=g();return c(y,{children:[t(p,{variant:"outlined","aria-label":"Share",onClick:i=>a(i.currentTarget),leftIcon:t(h,{src:B,size:"20px"}),children:"Share"}),t(v,{id:"agent-template-share-menu",createShareUrl:()=>window.location.href,handleShare:()=>{n==null||n.track("agent-share",{event:"click",from:"agent-template",template:e.id})},open:!!r,anchorEl:r,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:-10,horizontal:-20},onClose:()=>{a(null)}})]})},I=o("header",{target:"e1txy9vd2"})({name:"1wcglds",styles:"display:flex;align-items:center;gap:16px"}),F=o(b,{target:"e1txy9vd1"})("padding:0;border-radius:12px;height:40px;color:",({theme:e})=>e.colors.black[700],";margin-right:auto;&:active{background-color:",({theme:e})=>e.colors.black[50],";}&:hover{background-color:",({theme:e})=>e.colors.black[100],";}"),j=o("p",{target:"e1txy9vd0"})("color:",({theme:e})=>e.colors.black[700],";font-size:16px;font-weight:500;line-height:160%;letter-spacing:0.15px;margin-left:10px;margin-right:12px;"),M=({template:e})=>{const r=m(),a=g(),{mutateAsync:n,isLoading:s}=A(),{navigateToAgentEditor:i}=k(),l=()=>{r(u.Agent)},d=async()=>{a==null||a.track("agent-create",{event:"click",from:"agent-template",template:e.id});const f=await n(e.id);i({agentId:f.id,mixPanelFrom:"agent-template-page"})};return c(I,{children:[c(F,{onClick:l,children:[t(h,{src:w,size:"32px"}),t(j,{children:e.preview_name})]}),t(E,{template:e}),t(p,{variant:"secondary","aria-label":"Use template",onClick:d,isLoading:s,style:{minWidth:132},children:"Use template"})]})},U=o("div",{target:"e12e41w92"})({name:"zgdip4",styles:"display:flex;flex-direction:column;height:100%;width:100%;overflow:hidden;font-size:16px;*{font-family:'Manrope';}"}),K=o(z,{target:"e12e41w91"})("height:100%;flex:1;overflow:hidden;user-select:text;outline:none;margin:0 auto;border:1px solid ",({theme:e})=>e.colors.black[300],";border-radius:24px;isolation:isolate;width:auto;aspect-ratio:16/9;max-width:100%;max-height:80vh;"),D=o("div",{target:"e12e41w90"})({name:"1cf95nb",styles:"display:flex;flex-direction:column;flex:1;justify-content:center"}),H=({agent:e})=>c(U,{children:[t(M,{template:e}),t(D,{children:t(K,{agentId:e.id,from:"agent-template-page"})})]}),_=()=>{const e=m(),{isAnonymous:r}=C(),{agentId:a}=S(),{publicAgents:n,isLoading:s}=P(),{isLoading:i}=T({isAnonymous:r}),l=n.find(d=>d.id===a);return s||i?t(L,{}):l?t(H,{agent:l}):(e(u.Agent),null)};export{_ as AgentTemplatePage};

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.