1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ModelCanvas-CLPK1FNU.js","assets/chunk-UVKPFVEO-KDm8Svg-.js","assets/products-CAtYBNSL.js","assets/ChromeColorPicker-CH27-G0K.js","assets/index-BR6tXMqi.js","assets/index-DvYStDLT.js","assets/exportMotionVideo-BztGdION.js","assets/preload-helper-BXl3LOEh.js"])))=>i.map(i=>d[i]); 2import{_ as Oe}from"./preload-helper-BXl3LOEh.js";import{j as t,r as n,c as Ko}from"./chunk-UVKPFVEO-KDm8Svg-.js";import{B as l}from"./Button-B9gOb_A-.js";import{A as Xo,C as Ee}from"./AppHeader-Dh8Q-NXZ.js";import"./products-CAtYBNSL.js";import{T as k}from"./Tooltip-DWrQksaf.js";import{h as Re,a as Yo}from"./index-DvYStDLT.js";import{c as Zo,a as qo}from"./checkout-BHb0bGr4.js";function Rn(){return typeof window<"u"}function Wo(){try{const r="production"}catch{}return"production"}function On(){return(Rn()?window.vam:Wo())||"production"}function Sn(){return On()==="production"}function Jo(){return On()==="development"}function Qo(r,{[r]:w,...x}){return x}function er(r,w){if(!r)return;let x=r;const d=[];for(const[b,g]of Object.entries(r))typeof g=="object"&&g!==null&&(w.strip?x=Qo(b,x):d.push(b));if(d.length>0&&!w.strip)throw Error(`The following properties are not valid: ${d.join(", ")}. Only strings, numbers, booleans, and null are allowed.`);return x}function tr(r,w,x){var d,b;if(!Rn()){const g="[Vercel Web Analytics] Please import `track` from `@vercel/analytics/server` when using this function in a server environment";if(Sn())console.warn(g);else throw new Error(g);return}if(!w){(d=window.va)==null||d.call(window,"event",{name:r,options:x});return}try{const g=er(w,{strip:Sn()});(b=window.va)==null||b.call(window,"event",{name:r,data:g,options:x})}catch(g){g instanceof Error&&Jo()&&console.error(g)}}function nr({className:r,title:w="Photoshop"}){return t.jsxs("svg",{className:r,viewBox:"0 0 100 98",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":w,focusable:"false",children:[t.jsx("path",{d:"M17.7083 0H82.2917C92.0833 0 100 7.91667 100 17.7083V79.7917C100 89.5833 92.0833 97.5 82.2917 97.5H17.7083C7.91667 97.5 0 89.5833 0 79.7917V17.7083C0 7.91667 7.91667 0 17.7083 0Z",fill:"var(--ps-icon-bg, var(--fg))"}),t.jsx("path",{d:"M22.5 68.3751V25.5001C22.5 25.2084 22.625 25.0417 22.9167 25.0417C23.625 25.0417 24.2917 25.0417 25.25 25.0001C26.25 24.9584 27.2917 24.9584 28.4167 24.9167C29.5417 24.8751 30.75 24.8751 32.0417 24.8334C33.3333 24.7917 34.5833 24.7917 35.8333 24.7917C39.25 24.7917 42.0833 25.2084 44.4167 26.0834C46.5 26.7917 48.4167 27.9584 50 29.5001C51.3333 30.8334 52.375 32.4584 53.0417 34.2501C53.6667 36.0001 54 37.7917 54 39.6667C54 43.2501 53.1667 46.2084 51.5 48.5417C49.8333 50.8751 47.5 52.6251 44.7917 53.6251C41.9583 54.6667 38.8333 55.0417 35.4167 55.0417C34.4167 55.0417 33.75 55.0417 33.3333 55.0001C32.9167 54.9584 32.3333 54.9584 31.5417 54.9584V68.3334C31.5833 68.6251 31.375 68.8751 31.0833 68.9167C31.0417 68.9167 31 68.9167 30.9167 68.9167H23C22.6667 68.9167 22.5 68.7501 22.5 68.3751ZM31.5833 33.0834V47.0834C32.1667 47.1251 32.7083 47.1667 33.2083 47.1667H35.4167C37.0417 47.1667 38.6667 46.9167 40.2083 46.4167C41.5417 46.0417 42.7083 45.2501 43.625 44.2084C44.5 43.1667 44.9167 41.7501 44.9167 39.9167C44.9583 38.6251 44.625 37.3334 43.9583 36.2084C43.25 35.1251 42.25 34.2917 41.0417 33.8334C39.5 33.2084 37.8333 32.9584 36.125 33.0001C35.0417 33.0001 34.0833 33.0001 33.2917 33.0417C32.4583 33.0001 31.875 33.0417 31.5833 33.0834Z",fill:"var(--ps-icon-fg, var(--border-soft))"}),t.jsx("path",{d:"M80.0001 44.5417C78.7501 43.875 77.4168 43.4167 76.0001 43.125C74.4584 42.7917 72.9168 42.5833 71.3334 42.5833C70.5001 42.5417 69.6251 42.6667 68.8334 42.875C68.2918 43 67.8334 43.2917 67.5418 43.7083C67.3334 44.0417 67.2084 44.4583 67.2084 44.8333C67.2084 45.2083 67.3751 45.5833 67.6251 45.9167C68.0001 46.375 68.5001 46.75 69.0418 47.0417C70.0001 47.5417 71.0001 48 72.0001 48.4167C74.2501 49.1667 76.4168 50.2083 78.4168 51.4583C79.7918 52.3333 80.9168 53.5 81.7084 54.9167C82.3751 56.25 82.7084 57.7083 82.6668 59.2083C82.7084 61.1667 82.1251 63.125 81.0418 64.75C79.8751 66.4167 78.2501 67.7083 76.3751 68.4583C74.3334 69.3333 71.8334 69.7917 68.8334 69.7917C66.9168 69.7917 65.0418 69.625 63.1668 69.25C61.7084 69 60.2501 68.5417 58.9168 67.9167C58.6251 67.75 58.4168 67.4583 58.4584 67.125V
259.875C58.4584 59.75 58.5001 59.5833 58.6251 59.5C58.7501 59.4167 58.8751 59.4583 59.0001 59.5417C60.6251 60.5 62.3334 61.1667 64.1668 61.5833C65.7501 62 67.4168 62.2083 69.0834 62.2083C70.6668 62.2083 71.7918 62 72.5418 61.625C73.2084 61.3333 73.6668 60.625 73.6668 59.875C73.6668 59.2917 73.3334 58.75 72.6668 58.2083C72.0001 57.6667 70.6251 57.0417 68.5834 56.25C66.4584 55.5 64.5001 54.5 62.6668 53.25C61.3751 52.3333 60.2918 51.125 59.5001 49.7083C58.8334 48.375 58.5001 46.9167 58.5418 45.4583C58.5418 43.6667 59.0418 41.9583 59.9584 40.4167C61.0001 38.75 62.5418 37.4167 64.3334 36.5833C66.2918 35.5833 68.7501 35.125 71.7084 35.125C73.4168 35.125 75.1668 35.25 76.8751 35.5C78.1251 35.6667 79.3334 36 80.4584 36.4583C80.6251 36.5 80.7918 36.6667 80.8751 36.8333C80.9168 37 80.9584 37.1667 80.9584 37.3333V44.125C80.9584 44.2917 80.8751 44.4583 80.7501 44.5417C80.3751 44.625 80.1668 44.625 80.0001 44.5417Z",fill:"var(--ps-icon-fg, var(--border-soft))"})]})}function D(r,w,...x){const d=n.useRef(x);d.current=x,n.useEffect(()=>{if(!r)return;function b(g){const v=g.target;if(v){for(const q of d.current)if(q.current?.contains(v))return;w()}}return document.addEventListener("mousedown",b),()=>{document.removeEventListener("mousedown",b)}},[r,w])}const or="16:9",An="clockwise",rr=n.lazy(()=>Oe(()=>import("./ModelCanvas-CLPK1FNU.js"),__vite__mapDeps([0,1,2]))),En=n.lazy(()=>Oe(()=>import("./ChromeColorPicker-CH27-G0K.js"),__vite__mapDeps([3,1,4,5])).then(r=>({default:r.ChromeColorPicker})));function xr({product:r}){const w=Ko(),x=new URLSearchParams(w.search),d=x.get("thumb")==="1",[b,g]=n.useState(()=>{if(x.get("variant")!=="psd")return 0;const e=r.modelVariants?.findIndex(o=>o.type==="psd");return e!=null&&e>=0?e:0}),[v,q]=n.useState(null),[De,ie]=n.useState(!1),[Dn,Te]=n.useState(!1),[Ie,W]=n.useState(!1),[Tn,vt]=n.useState(!1),[Fe,bt]=n.useState(!1),[Ue,Ct]=n.useState(!1),[In,le]=n.useState(0),[jt,ce]=n.useState(null),[Fn,kt]=n.useState("video"),[P,Un]=n.useState(or),[He,J]=n.useState(!1),[yt,Be]=n.useState(!1),[N,de]=n.useState(null),[T,Le]=n.useState(null),[I,Nt]=n.useState(An),[ue,Hn]=n.useState(An),[$e,pe]=n.useState(!1),[Pt,fe]=n.useState(null),[he,_t]=n.useState(50),[Q,ze]=n.useState(100),[_,Mt]=n.useState("transparent"),[S,Bn]=n.useState(""),St=1e-4,[At,Et]=n.useState(()=>Re("#000000")),Ve=n.useRef(At.h),Ge=n.useRef(!1);n.useEffect(()=>{if(Ge.current){Ge.current=!1;return}if(S&&!/^[0-9A-F]{3}([0-9A-F]{3})?$/.test(S))return;const e=S?`#${S}`:"#000000",o=Re(e),s=o.s<=St?Ve.current:o.h,i={...o,h:s};Et(i),o.s>St&&(Ve.current=o.h)},[S]);const[,Ke]=n.useState(0),[Ln,Xe]=n.useState(!1),$n=r?.hasShadow??!1,[F,zn]=n.useState($n),[me,Vn]=n.useState("soft"),[xe,Rt]=n.useState(50),Ot=2,[Ye,Dt]=n.useState(!1),[Tt,Gn]=n.useState(Math.PI/4),[Ze,Kn]=n.useState(Math.PI/6),[Xn]=n.useState(24),[U,Yn]=n.useState(0),[Zn,It]=n.useState(0),[qn,Ft]=n.useState(0),Ut=n.useRef(null),H=n.useRef(null);n.useEffect(()=>{const e=Math.sin(Tt)*Math.cos(Ze),o=Math.sin(Ze);It(e),Ft(o)},[]);const Wn=Math.PI/2-.2,Ht=45-2,Jn=50+Zn*Ht,Qn=50-qn*Ht,qe=-100,Bt=100,eo=(U-qe)/(Bt-qe)*100,to=U<0?1+U*.005:1+U*.012;function Lt(e){const s=e.currentTarget.getBoundingClientRect(),i=(e.clientX-s.left)/s.width,c=(e.clientY-s.top)/s.height,m=(i-.5)*2,M=-((c-.5)*2),Z=Math.hypot(m,M),Mn=Z>1?m/Z:m,wt=Z>1?M/Z:M,Vo=Math.atan2(Mn,wt),Go=wt*Wn;
2Ut.current={padX:Mn,padY:wt,yaw:Vo,pitch:Go},H.current==null&&(H.current=window.requestAnimationFrame(()=>{H.current=null;const ae=Ut.current;ae&&(It(ae.padX),Ft(ae.padY),Gn(ae.yaw),Kn(ae.pitch))}))}const[B,$t]=n.useState(null);function ee(e){$t(e);const o=()=>$t(null);window.addEventListener("pointerup",o,{once:!0,passive:!0}),window.addEventListener("pointercancel",o,{once:!0,passive:!0}),window.addEventListener("blur",o,{once:!0})}const[no,oo]=n.useState(!1),[y,L]=n.useState(""),[ge,zt]=n.useState(!1),[$,We]=n.useState(!1),Vt=1e-4,[Gt,ro]=n.useState(()=>Re("#000000")),Kt=n.useRef(Gt.h);n.useEffect(()=>{if(y&&!/^[0-9A-F]{3}([0-9A-F]{3})?$/.test(y))return;const e=y?`#${y}`:"#000000",o=Re(e),s=o.s<=Vt?Kt.current:o.h,i={...o,h:s};ro(i),o.s>Vt&&(Kt.current=o.h)},[y]);const[Je,z]=n.useState(!1),[so,Qe]=n.useState(!1),[we,et]=n.useState(null),Xt=n.useRef(null),f=n.useRef(null),A=n.useRef(null),Yt=n.useRef(!1),te=n.useRef(null),ne=n.useRef(0),E=n.useRef(null),tt=n.useRef(Q),nt=n.useRef(!1),Zt=n.useRef("nudge"),qt=n.useRef(null),oe=n.useRef(null),Wt=n.useRef(null),Jt=n.useRef(null);function ot(){at(0),it(0),st(!1)}function ao(){We(!1),oe.current=null}function Qt(e){L(e),ao(),z(!0)}function rt(){W(!1),pe(!1),Te(!1)}function en(){ce(null),le(0),ne.current=0,Se()}function tn(){Be(!1),Ct(!1),le(0),ce(null),Le(null),de(null),Te(!1),W(!1)}const[R,st]=n.useState(!1),[ve,at]=n.useState(0),[be,it]=n.useState(0),O=n.useRef({x:0,y:0}),io=Math.abs(ve)>1e-6||Math.abs(be)>1e-6,lt=n.useRef(null),Ce=n.useRef(null),re=n.useRef(null),lo=.01,co=.05;n.useEffect(()=>{O.current={x:ve,y:be}},[ve,be]);const[V,ct]=n.useState(!1),nn=n.useRef(null),on=n.useRef(null),[dt,je]=n.useState(!1),rn=n.useRef(null),sn=n.useRef(null),an=n.useRef(null),ln=n.useRef(null),cn=typeof r.shadowFloorOffset=="number"?r.shadowFloorOffset:.5;n.useEffect(()=>{const e=Math.round(Math.min(100,Math.max(0,cn/Ot*100)));Rt(e)},[cn]);const ke=r.codeNumber??0,G=String(ke||0).padStart(3,"0"),se=r.name,uo=r.label??"Mockup",po=[".jpg, .png, .webp, .avif",r?.artworkAspectTooltip?`(${r.artworkAspectTooltip})`:null].filter(Boolean).join(" "),K=r.modelVariants??[],u=K.length>0?K[Math.min(b,K.length-1)]:null,h=u?.type==="psd",C=!h,fo=r.allowRotation??!0,ye=C&&fo,ut=r.motion,ho=C&&!!ut?.enabled,dn=ut?.presets??[],un=ut?.defaultPreset??dn[0]??null,j=T!=null,Ne=r.psdPreviewImage??r.thumb??`/thumbs/${G}.png`;n.useEffect(()=>{if(!h){fe(null);return}const e=r.psdThumbnails??[];e.length>0?fe(o=>o&&e.includes(o)?o:e[0]):fe(Ne)},[h,r,Ne]),n.useEffect(()=>{if(!C)return;const e=u?.baseHexColor??"";!Je&&!$&&(e?(L(e.toUpperCase()),z(!1)):(L(""),z(!1)))},[C,u?.id,u?.baseHexColor,Je,$]),n.useEffect(()=>{if(!C)return;const e=u?.defaultArtworkUrl??null;if(!Yt.current){if(e&&v!==e){q(e),wo(),ot();return}!e&&v&&(q(null),ot())}},[C,u?.id,u?.defaultArtworkUrl,v]);const Pe=r.presetBaseHex??null,_e=r.presetBackground??null,pn=r.presetYawRad,fn=r.presetPitchRad,mo=r.artworkAspect,hn=C?u?.path??`/models/${G}-variant-${b+1}.glb`:"";function mn(e){return e==="orbit"?"Subtle orbit":e==="fullOrbit"?"Full orbit":e==="spinner"?"Spinner":e==="kenBurns"?"Ken Burns":e}function xn(e){return e==="clockwise"?"Clockwise":"Counter-clockwise"}function ir(e){return e}function pt(e,o){return o==="motion"?e==="16:9"?{width:1920,height:1080}:e==="9:16"?{width:1080,height:1920}:{width:1920,height:1920}:o==="high"?e==="16:9"?{width:3840,height:2160}:e==="9:16"?{width:2160,height:3840}:{width:3200,height:3200}:e==="16:9"?{width:1600,height:900}:e==="9:16"?{width:900,height:1600}:{width:1200,height:1200}}function xo(e){return{product_code:G,product_id:r.id,product_name:r.name,product_kind:r.kind,variant_id:u?.id??null,variant_type:u?.type??null,aspect_ratio:P,has_artwork:!!v,background_mode:_,motion_applied:j,motion_preset:T??null,motion_direction:ue,thumb_mode:d,...e}}function a(e,o){d||tr(e,xo(o))}function go(e){tt.current=e,ze(e)}function wo(){tt.current=100,ze(100)}function gn(e){a("artwork_size_changed",{artwork_scale:tt.current,source:e})}function vo(e){nt.current=!0,Zt.current=e}function bo(){nt.current&&(nt.current=!1,a("artwork_position_changed",{artwork_offset_x:Number(O.current.x.toFixed(3)),artwork_offset_y:Number(O.current.y.toFixed(3)),source:Zt.current}))}function ft(){p(),st(!1)}function Co(e,o="footer"){const s=K[e];if(!s||(g(e),a("variant_changed",{from_variant_id:u?.id??null,to_variant_id:s.id,to_variant_type:s.type,source:o}),s.type==="psd"))return;const i=s.defaultOrientation;if(!i)return;const c=f.current;c&&("setOrientation"in c&&typeof c.setOrientation=="function"?c.setOrientation(i.yaw,i.pitch):"setAngle"in c&&typeof c.setAngle=="function"&&c.setAngle(i.yaw))}n.useEffect(()=>{if(d)return;const e=r.id;qt.current!==e&&(qt.current=e,a("editor_opened"))},[d,r.id]);function jo(e){const o=!!(u?.baseHexColor&&C);!Je&&!$&&!o&&L(e)}function ko(){const e=pt(P,"low"),o=f.current?.exportImage("low",{width:e.width,height:e.height,exactSize:!0});
2if(!o){console.warn("No exportable frame yet (scene not ready?)."),a("export_error",{export_type:"still",resolution:"low",error_message:"No exportable frame yet"});return}const s=document.createElement("a");s.href=o,s.download=`${G||"mockup"}.png`,document.body.appendChild(s),s.click(),document.body.removeChild(s),a("image_export_download",{export_type:"still",resolution:"standard",width:e.width,height:e.height})}function wn(e){if(!["image/jpeg","image/png","image/webp","image/avif"].includes(e.type)){et("This file type isnât supported for artwork. Try a JPG, PNG, WebP, or AVIF image.");return}et(null),A.current&&(URL.revokeObjectURL(A.current),A.current=null);const s=URL.createObjectURL(e);A.current=s,Yt.current=!0,q(s),ze(100),ot(),a("artwork_uploaded",{file_type:e.type,file_size_kb:Math.round(e.size/1024)})}function yo(e){const o=e.target.files?.[0];o&&(wn(o),e.target.value="")}n.useEffect(()=>{if(!we)return;const e=window.setTimeout(()=>{et(null)},3500);return()=>window.clearTimeout(e)},[we]),n.useEffect(()=>()=>{A.current&&(URL.revokeObjectURL(A.current),A.current=null)},[]),n.useEffect(()=>{if(Me(),f.current?.stopMotionPreview(),!C){Xe(!0),Ke(100),tn();return}Xe(!1),Ke(0),tn()},[hn,C]),n.useEffect(()=>{const e=window.setTimeout(()=>{oo(!0)},500);return()=>window.clearTimeout(e)},[]),n.useEffect(()=>{if(d||!ye||!C){Qe(!1);return}Qe(!0);const e=window.setTimeout(()=>{Qe(!1)},4e3);return()=>window.clearTimeout(e)},[d,ye,C]),D(ge,()=>{zt(!1)},Wt,Jt),n.useEffect(()=>{v||Dt(!1)},[v]),D(V,()=>{ct(!1)},nn,on),D(R,()=>{ft(),Ce.current?.querySelector("button")?.focus()},lt,Ce),n.useEffect(()=>{R&&requestAnimationFrame(()=>{lt.current?.focus()})},[R]),D(dt,()=>{je(!1)},rn),D(He,()=>{J(!1)},ln),D(Ie,()=>{W(!1)},sn),D($e,()=>{pe(!1)},an);function Me(){te.current!=null&&(window.clearTimeout(te.current),te.current=null)}function Se(){E.current!=null&&(window.cancelAnimationFrame(E.current),E.current=null)}function No(){Se();const e=()=>{le(o=>{const s=ne.current,i=s-o;if(i<=.001)return s;const c=o+Math.max(.004,i*.18);return c+.001<s?E.current=window.requestAnimationFrame(e):E.current=null,Math.min(s,c)})};E.current=window.requestAnimationFrame(e)}function Po(e){ne.current=Math.max(ne.current,Math.min(1,e)),E.current==null&&No()}function ht(e){ne.current=0,Se(),Ct(e),le(0)}function _o(){en(),J(!1),ie(!0)}function vn(){en(),J(!1),ie(!1)}n.useEffect(()=>{if(!De||!j){kt("video");return}let e=!1;async function o(){const s=pt(P,"motion"),{detectPreferredMotionVideoFormat:i}=await Oe(async()=>{const{detectPreferredMotionVideoFormat:m}=await import("./exportMotionVideo-BztGdION.js");return{detectPreferredMotionVideoFormat:m}},__vite__mapDeps([6,7])),c=await i(s.width,s.height,30);e||kt(c==="mp4"?"MP4":c==="webm"?"WebM":"video")}return o(),()=>{e=!0}},[De,j,P]);function bn(){de(T??un),Nt(ue),Te(!0),a("animate_opened",{default_motion_preset:un??null})}function Cn(){f.current?.stopMotionPreview(),rt()}function Mo(){if(!N)return;const e=!yt;Me(),Le(N),Hn(I),rt(),a("scene_changed",{control:"motion_preview",motion_preset:N,motion_direction:I}),window.requestAnimationFrame(()=>{f.current?.previewMotionPreset(N,I)}),e&&(te.current=window.setTimeout(()=>{Be(!0),te.current=null},5e3))}function jn(){Me(),f.current?.stopMotionPreview(),Be(!1),Le(null),de(null),rt(),a("scene_changed",{control:"motion_cleared"})}function So(){T&&f.current?.previewMotionPreset(T,ue)}function Ao(){ko(),ie(!1)}async function Eo(){const e=f.current,o=T;if(!e||!o)throw new Error("No canvas or motion preset available for video export");const s="getOrientation"in e&&typeof e.getOrientation=="function"?e.getOrientation():null;if(!s)throw new Error("No current orientation available for motion export");ht(!0);try{const{exportMotionVideo:i}=await Oe(async()=>{const{exportMotionVideo:M}=await import("./exportMotionVideo-BztGdION.js");return{exportMotionVideo:M}},__vite__mapDeps([6,7])),c="getMotionDurationMs"in e&&typeof e.getMotionDurationMs=="function"?e.getMotionDurationMs(o):5e3,m=pt(P,"motion"),gt=await i({width:m.width,height:m.height,fps:30,durationMs:c,renderFrame:(M,Z)=>"exportMotionFrame"in e&&typeof e.exportMotionFrame=="function"?e.exportMotionFrame({preset:o,direction:ue,elapsedMs:Z,mode:"low",baseOrientation:s,width:m.width,height:m.height,exactSize:!0,exportBackgroun
2dCss:Y??"#000000"}):null,onProgress:M=>{Po(M)}});return ht(!1),{blob:gt.blob,mimeType:gt.mimeType}}finally{"setOrientation"in e&&typeof e.setOrientation=="function"&&e.setOrientation(s.yaw,s.pitch),ht(!1)}}function kn(){const e=window.open("about:blank","_blank");return e?(e.opener=null,e.document.title="Preparing download",e.document.body.style.margin="0",e.document.body.style.fontFamily="system-ui, sans-serif",e.document.body.style.display="grid",e.document.body.style.minHeight="100vh",e.document.body.style.placeItems="center",e.document.body.textContent="Preparing download...",e):null}function yn(e,o){if(o&&!o.closed){o.location.href=e;return}window.open(e,"_blank","noopener,noreferrer")||window.location.assign(e)}function mt(e){!e||e.closed||e.close()}async function Ro(e,o,s){const i=await qo({codeNumber:r.codeNumber,exportType:e,files:o});a("free_download_started",{delivery_type:"polar",export_type:e,file_count:o.length,amount_usd:0}),yn(i,s),ie(!1)}async function Oo(){const e=kn();a("motion_export_clicked",{export_type:"motion",amount_usd:0}),bt(!0),ce(null);try{const o=await Eo();await Ro("motion",[o],e)}catch(o){mt(e);const s=o instanceof Error?o.message:"Unable to export motion video right now";console.error(s),ce(s),a("export_error",{export_type:"motion",resolution:"high",error_message:s})}finally{bt(!1)}}async function Do(){const e=kn();if(!r?.polarId||r.psdPriceUsd!==0){mt(e);return}try{const o=await Zo({productId:r.polarId});a("checkout_started",{checkout_type:"psd",export_type:"psd",polar_product_id:r.polarId,amount_usd:0}),yn(o,e)}catch(o){throw mt(e),o}}function To(){vt(!0)}function Nn(){vt(!1)}function Io(e){e.target===e.currentTarget&&vn()}function Fo(e){e.target===e.currentTarget&&Nn()}function Uo(e){e.target===e.currentTarget&&Cn()}function Ho(e){const o=e.target.value.replace(/[^0-9a-fA-F]/g,"");o.length<=6&&Qt(o.toUpperCase())}function Bo(){const e=f.current;if(Pe||_e||pn!=null||fn!=null){if($){if(We(!1),oe.current!=null?(L(oe.current),oe.current===""&&z(!1)):z(!1),e){const s=u?.defaultOrientation??{yaw:0,pitch:0};"setOrientation"in e&&typeof e.setOrientation=="function"?e.setOrientation(s.yaw,s.pitch):"setAngle"in e&&typeof e.setAngle=="function"&&e.setAngle(s.yaw)}a("scene_changed",{control:"preset",preset_applied:!1});return}if(oe.current=y||"",Pe&&L(Pe.toUpperCase()),e){const s=pn??0,i=fn??0;"setOrientation"in e&&typeof e.setOrientation=="function"?e.setOrientation(s,i):"setAngle"in e&&typeof e.setAngle=="function"&&e.setAngle(s)}We(!0),z(!0),a("scene_changed",{control:"preset",preset_applied:!0})}}function p(){re.current!=null&&(window.clearInterval(re.current),re.current=null),bo()}function X(e,o,s){const i=s?co:lo,c=O.current.x+e*i,m=O.current.y+o*i;O.current={x:c,y:m},at(c),it(m),vo(s?"nudge_large":"nudge")}function Ae(e,o,s){p(),X(e,o,s);const i=200,c=60,m=window.setTimeout(()=>{re.current=window.setInterval(()=>{X(e,o,s)},c)},i);re.current=m}function Lo(e){if(!R)return;const o=e.shiftKey;if(e.key==="Escape"){e.preventDefault(),ft(),Ce.current?.querySelector("button")?.focus();return}if(e.key==="ArrowUp"){e.preventDefault(),X(0,1,o);return}if(e.key==="ArrowDown"){e.preventDefault(),X(0,-1,o);return}if(e.key==="ArrowLeft"){e.preventDefault(),X(-1,0,o);return}if(e.key==="ArrowRight"){e.preventDefault(),X(1,0,o);return}}n.useEffect(()=>()=>p(),[]),n.useEffect(()=>()=>{Me()},[]),n.useEffect(()=>()=>{Se()},[]),n.useEffect(()=>()=>{H.current!=null&&(window.cancelAnimationFrame(H.current),H.current=null)},[]);const Pn=t.jsxs("div",{className:"editor-hex-input",children:[t.jsx("label",{className:"sr-only",htmlFor:"mockup-hex-colour",children:"Base color hex code"}),t.jsxs("div",{className:"editor-hex-input-main",children:[t.jsx("span",{className:"editor-hex-prefix",children:"#"}),t.jsx("input",{id:"mockup-hex-colour",type:"text",inputMode:"text",autoComplete:"off",spellCheck:!1,maxLength:6,className:"editor-hex-input-field",value:y,onChange:Ho,"aria-describedby":"mockup-hex-help"})]}),t.jsx("button",{type:"button",ref:Jt,className:"editor-hex-swatch",onClick:()=>zt(e=>!e),"aria-label":"Open color picker",style:{backgroundColor:y?`#${y}`:"#CCCCCC"}}),ge&&t.jsx("div",{ref:Wt,className:`editor-popover editor-color-popover ${ge?"open":""}`,children:t.jsx(n.Suspense,{fallback:null,children:t.jsx(En,{color:Gt,onCh
2ange:e=>{const o=(e.hex||"").replace("#","").toUpperCase(),s=o.length===3||o.length===6,i=/^[0-9A-F]+$/.test(o);!s||!i||Qt(o)}})})})]});let Y=null;h||(_==="solid"&&S?Y=`#${S}`:$&&_e&&(Y=_e));const _n=!h&&u?.loaderThumb||r.thumb||`/thumbs/${G}.png`,xt={position:"relative"};!h&&_n&&(xt["--loader-thumb"]=`url(${_n})`),Y&&(xt["--editor-canvas-bg"]=Y);const $o=h?null:y||null,zo=h?"editor-canvas editor-canvas--psd":"editor-canvas";return t.jsxs("div",{className:`app-root ${V?"app-root--scene-open":""}`,children:[t.jsx(Xo,{logoFrom:99,logoTo:ke||0,stickyMiddle:!1}),t.jsx("main",{className:"app-main editor-main",children:t.jsxs("section",{className:"editor-section",children:[t.jsxs("div",{className:"editor-meta",children:[h?"Preview:":"Editing:"," ",se," ",uo]}),t.jsx("div",{className:`${zo}${V?" editor-canvas--scene-open":""}`,style:xt,children:h?t.jsxs(t.Fragment,{children:[r.psdThumbnails&&r.psdThumbnails.length>0&&t.jsx("div",{className:"editor-psd-thumb-strip",children:r.psdThumbnails.map(e=>{const o=e===(Pt??Ne);return t.jsx("button",{type:"button",className:"editor-psd-thumb"+(o?" editor-psd-thumb--active":""),onClick:()=>fe(e),children:t.jsx("img",{src:e,alt:`${se} view`})},e)})}),t.jsx("div",{className:"model-canvas",children:t.jsx("img",{src:Pt??Ne,alt:`${se} Photoshop mockup preview`,className:"psd-main-img"})})]}):t.jsxs(t.Fragment,{children:[!d&&ye&&t.jsx("div",{className:`drag-hint ${so?"":"hidden"}`,children:"Drag to rotate"}),!Ln&&t.jsx("div",{className:"editor-loader-overlay",children:t.jsx("div",{className:"editor-loader-skeleton",children:t.jsx("span",{className:"sr-only",children:"Loading mockup"})})}),no&&t.jsx(n.Suspense,{fallback:null,children:t.jsx(rr,{ref:f,modelPath:hn,thumbMode:d,artworkUrl:v,artworkTargetAspect:mo,baseColorHex:$o,zoom:he,onZoomChange:_t,bodyLightness:u?.bodyLightness,artworkScale:Q/100,artworkOffsetX:ve,artworkOffsetY:be,initialOrientation:u?.defaultOrientation,onInitialBaseColor:jo,onModelLoadProgress:e=>Ke(e),onModelLoaded:()=>Xe(!0),allowRotation:ye,exportBackgroundCss:Y,hasShadow:!0,showShadow:F,shadowStyle:me,shadowFloorOffset:xe/100*Ot,lightYaw:Tt,lightPitch:Ze,lightDistance:Xn,exposure:to,materialProfile:r.materialProfile,orbitTargetOffset:u?.orbitTargetOffset,onArtworkFileDrop:wn,...ke===11?{deboss:!!v&&Ye}:{}})})]})})]})}),Tn&&r.artworkGuideImage&&t.jsx("div",{className:"modal-backdrop modal-backdrop--medium",onClick:Fo,children:t.jsxs("div",{className:"modal modal--wide modal--export modal--artwork-guide",children:[t.jsxs("div",{className:"modal-header",children:[t.jsx("h2",{className:"modal-title",children:"Artwork guide"}),t.jsx(l,{variant:"tertiary",onClick:Nn,"aria-label":"Close modal",title:"Close",children:t.jsx(Ee,{size:10})})]}),t.jsx("div",{className:"modal-artwork-guide-preview",children:t.jsx("img",{src:r.artworkGuideImage,alt:`${se} artwork guide`,className:"modal-artwork-guide-img"})}),t.jsx("div",{className:"modal-actions",children:t.jsx("a",{className:"btn-primary modal-artwork-guide-download",href:r.artworkGuideImage,download:r.artworkGuideDownloadName??`${G}-artwork-guide.jpg`,children:"Download guide"})})]})}),!h&&Dn&&t.jsx("div",{className:"modal-backdrop modal-backdrop--medium",onClick:Uo,children:t.jsxs("div",{className:"modal modal--narrow modal--export",children:[t.jsxs("div",{className:"modal-header",children:[t.jsx("h2",{className:"modal-title",children:"Animate mockup"}),t.jsx(l,{variant:"tertiary",onClick:Cn,"aria-label":"Close modal",title:"Close",children:t.jsx(Ee,{size:10})})]}),t.jsx("p",{className:"modal-body-text",children:"Apply a 5-second motion preset"}),t.jsxs("div",{className:"editor-scene-row editor-scene-row--motion-preset",children:[t.jsx("span",{className:"editor-scene-label",children:"Motion preset"}),t.jsxs("div",{className:"editor-scene-select-custom editor-scene-select-custom--motion-preset",ref:sn,children:[t.jsxs("button",{type:"button",className:"editor-scene-select-trigger",onClick:()=>W(e=>!e),"aria-haspopup":"listbox","aria-expanded":Ie,children:[N?mn(N):"Select",t.jsx("svg",{className:"editor-scene-select-icon",viewBox:"0 0 32 32","aria-hidden":"true",focusable:"false",children:t.jsx("polygon",{points:"16,22 6,12 7.4,10.6 16,19.2 24.6,10.6 26,12",fill:"
2currentColor"})})]}),Ie&&t.jsx("ul",{className:"editor-scene-select-menu",role:"listbox",children:dn.map(e=>t.jsx("li",{role:"option","aria-selected":N===e,className:N===e?"is-active":"",onClick:()=>{de(e),W(!1)},children:mn(e)},e))})]})]}),t.jsxs("div",{className:"editor-scene-row editor-scene-row--motion-preset",children:[t.jsx("span",{className:"editor-scene-label",children:"Direction"}),t.jsxs("div",{className:"editor-scene-select-custom editor-scene-select-custom--motion-preset",ref:an,children:[t.jsxs("button",{type:"button",className:"editor-scene-select-trigger",onClick:()=>pe(e=>!e),"aria-haspopup":"listbox","aria-expanded":$e,children:[xn(I),t.jsx("svg",{className:"editor-scene-select-icon",viewBox:"0 0 32 32","aria-hidden":"true",focusable:"false",children:t.jsx("polygon",{points:"16,22 6,12 7.4,10.6 16,19.2 24.6,10.6 26,12",fill:"currentColor"})})]}),$e&&t.jsx("ul",{className:"editor-scene-select-menu",role:"listbox",children:["clockwise","counterClockwise"].map(e=>t.jsx("li",{role:"option","aria-selected":I===e,className:I===e?"is-active":"",onClick:()=>{Nt(e),pe(!1)},children:xn(e)},e))})]})]}),t.jsxs("div",{className:"modal-actions",children:[t.jsx(l,{variant:"primary",onClick:Mo,disabled:!N,children:"Preview motion"}),j?t.jsx(l,{variant:"tertiary",onClick:jn,children:"Clear motion"}):null]})]})}),!h&&De&&t.jsx("div",{className:"modal-backdrop modal-backdrop--medium",onClick:Io,children:t.jsxs("div",{className:"modal modal--narrow modal--export",children:[t.jsxs("div",{className:"modal-header",children:[t.jsx("h2",{className:"modal-title",children:j?"Export motion":"Export mockup"}),t.jsx(l,{variant:"tertiary",onClick:vn,"aria-label":"Close modal",title:"Close",children:t.jsx(Ee,{size:10})})]}),t.jsx("p",{className:"modal-body-text",children:j?t.jsxs(t.Fragment,{children:["Export this mockup as a 5-second ",Fn]}):t.jsxs(t.Fragment,{children:["Choose how you want to download ",t.jsx("span",{children:se})]})}),t.jsxs("div",{className:"editor-scene-row editor-scene-row--export-ratio",children:[t.jsx("span",{className:"editor-scene-label",children:"Aspect ratio"}),t.jsxs("div",{className:"editor-scene-select-custom editor-scene-select-custom--export-ratio",ref:ln,children:[t.jsxs("button",{type:"button",className:"editor-scene-select-trigger",onClick:()=>J(e=>!e),"aria-haspopup":"listbox","aria-expanded":He,children:[P,t.jsx("svg",{className:"editor-scene-select-icon",viewBox:"0 0 32 32","aria-hidden":"true",focusable:"false",children:t.jsx("polygon",{points:"16,22 6,12 7.4,10.6 16,19.2 24.6,10.6 26,12",fill:"currentColor"})})]}),He&&t.jsx("ul",{className:"editor-scene-select-menu",role:"listbox",children:["16:9","9:16","1:1"].map(e=>t.jsx("li",{role:"option","aria-selected":P===e,className:P===e?"is-active":"",onClick:()=>{Un(e),J(!1)},children:e},e))})]})]}),t.jsxs("div",{className:"modal-actions",children:[t.jsx(l,{variant:j?"secondary":"primary",onClick:Ao,disabled:Fe||Ue,children:"Download PNG â free"}),j&&t.jsxs("div",{className:"premium-export-wrap",children:[t.jsx(l,{variant:"primary",onClick:Oo,disabled:Fe||Ue,children:Ue?`Rendering video⦠${Math.round(In*100)}%`:Fe?"Preparing your downloadâ¦":"Download motion â free"}),jt&&t.jsx("p",{className:"premium-note text-balance",children:jt})]})]})]})}),t.jsx("footer",{className:"app-footer",children:t.jsxs("div",{className:"editor-footer-inner",children:[t.jsx("div",{className:"editor-footer-group",children:K.length>0&&K.map((e,o)=>t.jsx(l,{variant:b===o?"primary":"secondary",onClick:()=>Co(o),children:e.type==="psd"?t.jsxs("span",{className:"editor-variant-label editor-variant-label--has-icon",children:[t.jsx("span",{className:"editor-variant-text",children:e.label}),t.jsx("span",{className:"editor-variant-icon","aria-hidden":"true",children:t.jsx(nr,{})})]}):e.label},e.id))}),!h&&t.jsxs("div",{className:"editor-footer-group",children:[(Pe||_e)&&t.jsx(l,{variant:$?"primary":"secondary",onClick:Bo,children:"Preset"}),ge?Pn:t.jsx(k,{label:"Object color",children:Pn}),v&&t.jsxs(t.Fragment,{children:[t.jsx(k,{label:"Resize the artwork",children:t.jsx("div",{className:"editor-zoom-control",children:t.jsxs("div",{className:"editor-zoom-bar",children:[t.jsx("div",{className:"editor-zoom-label",children:"Size"}),t.jsx("div",{className:"editor-zoom-fill",style:{width:`${Math.min(100,Math.max(0,(Q-25)/150*100))}%`}}),t.jsx("input",{type:"range",min:25,max:175,value:Q,onChange:e=>go(Number(e.target.value)),onPointerDown:()=>ee("artwork"),onPointerUp:()=>gn("slider"),onKeyUp:()=>
2gn("keyboard"),className:`editor-zoom-input ${B==="artwork"?"is-dragging":""}`}),t.jsx("span",{className:"editor-zoom-value",children:Q.toFixed(0)})]})})}),t.jsxs("div",{className:"editor-artwork-pos-wrap",children:[t.jsx(k,{label:"Reposition the artwork",children:t.jsx("div",{ref:Ce,className:"editor-artwork-pos-trigger",children:t.jsx(l,{variant:"secondary",onClick:()=>{if(R){ft();return}st(!0)},onBlur:()=>p(),children:"Position"})})}),R&&t.jsx("div",{ref:lt,className:`editor-popover editor-artwork-pos-popover ${R?"open":""}`,role:"dialog","aria-label":"Artwork position",tabIndex:-1,onKeyDown:Lo,children:t.jsxs("div",{className:"editor-artwork-dpad",role:"group","aria-label":"Artwork position controls",children:[t.jsx("button",{type:"button",className:"editor-dpad-btn editor-dpad-btn--up","aria-label":"Move artwork up",onPointerDown:e=>{e.preventDefault(),Ae(0,1,e.shiftKey)},onPointerUp:p,onPointerLeave:p,onPointerCancel:p,children:"â"}),t.jsx("button",{type:"button",className:"editor-dpad-btn editor-dpad-btn--left","aria-label":"Move artwork left",onPointerDown:e=>{e.preventDefault(),Ae(-1,0,e.shiftKey)},onPointerUp:p,onPointerLeave:p,onPointerCancel:p,children:"â"}),io&&t.jsx("div",{className:"editor-dpad-btn--reset",children:t.jsx(l,{variant:"primary",onClick:()=>{p(),O.current={x:0,y:0},at(0),it(0),a("artwork_position_changed",{artwork_offset_x:0,artwork_offset_y:0,source:"reset"})},children:"Reset"})}),t.jsx("button",{type:"button",className:"editor-dpad-btn editor-dpad-btn--right","aria-label":"Move artwork right",onPointerDown:e=>{e.preventDefault(),Ae(1,0,e.shiftKey)},onPointerUp:p,onPointerLeave:p,onPointerCancel:p,children:"â"}),t.jsx("button",{type:"button",className:"editor-dpad-btn editor-dpad-btn--down","aria-label":"Move artwork down",onPointerDown:e=>{e.preventDefault(),Ae(0,-1,e.shiftKey)},onPointerUp:p,onPointerLeave:p,onPointerCancel:p,children:"â"})]})})]})]}),!h&&ke===11&&v&&t.jsx(l,{variant:Ye?"primary":"secondary",onClick:()=>{const e=!Ye;Dt(e),a("scene_changed",{control:"deboss",enabled:e})},children:"Deboss"}),t.jsxs("div",{className:"editor-scene-trigger",ref:on,children:[V?t.jsx(l,{variant:"secondary",onClick:()=>ct(e=>!e),children:"Scene"}):t.jsx(k,{label:"Adjust environment settings",children:t.jsx(l,{variant:"secondary",onClick:()=>ct(e=>!e),children:"Scene"})}),V&&t.jsx("div",{className:"editor-scene-popover-wrap",children:t.jsxs("div",{ref:nn,className:`editor-scene-popover ${V?"open":""}`,children:[t.jsxs("div",{className:"editor-scene-panel light-panel",children:[t.jsx("div",{className:"editor-scene-row",children:t.jsx("span",{className:"editor-scene-label",children:"Light direction"})}),t.jsx("div",{className:"editor-light-pad",children:t.jsx("div",{className:`editor-light-pad-hit ${B==="light-pad"?"is-dragging":""}`,onPointerDown:e=>{e.currentTarget.setPointerCapture(e.pointerId),ee("light-pad"),Lt(e)},onPointerMove:e=>{B==="light-pad"&&Lt(e)},onPointerUp:()=>{a("scene_changed",{control:"light_direction"})},children:t.jsx("div",{className:"editor-light-dot",style:{left:`${Jn}%`,top:`${Qn}%`}})})}),t.jsxs("div",{className:"editor-scene-row editor-scene-row--exposure",children:[t.jsx("span",{className:"editor-scene-label",children:"Exposure"}),t.jsx("div",{className:"editor-scene-slider",children:t.jsxs("div",{className:"editor-scene-slider-bar",children:[t.jsx("div",{className:"editor-scene-slider-fill",style:{width:`${eo}%`}}),t.jsx("input",{type:"range",min:qe,max:Bt,value:U,onChange:e=>{const o=Number(e.target.value);Yn(o)},onPointerDown:()=>ee("exposure"),onPointerUp:e=>{a("scene_changed",{control:"exposure",exposure:Number(e.currentTarget.value)})},onKeyUp:e=>{a("scene_changed",{control:"exposure",exposure:Number(e.currentTarget.value)})},className:`editor-scene-slider-input ${B==="exposure"?"is-dragging":""}`}),t.jsx("span",{className:"editor-scene-slider-value",children:U.toFixed(0)})]})})]})]}),t.jsxs("div",{className:"editor-scene-panel options-panel",children:[t.jsxs("div",{className:"editor-scene-row",children:[t.jsx("span",{className:"editor-scene-label",children:"Shadow floor"}),t.jsx(l,{variant:F?"primary":"secondary",onClick:()=>{const e=!F;zn(e),a("scene_changed",{control:"shadow_floor",enabled:e})},children:F?"On":"Off"})]}),F&&t.jsxs("div",{className:"editor-scene-row",children:[t.jsx("span",{className:"editor-scene-label",children:"Shadow style"}),t.jsx(l,{variant:me==="soft"?"primary":"secondary",onClick:()=>{const e=me==="soft"?"hard":"soft";Vn(e),a("scene_changed",{control:"shadow_style",shadow_style:e})},children:me==="soft"?"Soft":"Hard"})]}),F&&t.jsxs("div",{className:"editor-scene-row",children:[t.jsx("span",{className:"editor-scene-label",children:"Shadow offset"}),t.jsx("div",{className:"editor-scene-slider",children:t.jsxs("div",{className:"editor-scene-slider-bar",children:[t.jsx("div",{className:"editor-scene-slider-fill",style:{width:`${xe}%`}}),t.jsx("input",{type:"range",min:0,max:100,value:xe,onChange:e=>{const o=Number(e.target.value);Rt(o)},onPointerDown:()=>ee("shadow-offset"),onPointerUp:e=>{a("scene_changed",{control:"shadow_offset",shadow_offset:Number(e.currentTarget.value)})},onKeyUp:e=>{a("scene_changed",{control:"shadow_offset",shadow_offset:Number(e.currentTarget.value)})},className:`editor-scene-slider-input ${B==="shadow-offset"?"is-dragging":""}`}),t.jsx("span",{className:"editor-scene-slider-value",children:xe.toFixed(0)})]})})]}),t.jsxs("div",{className:"editor-scene-row",children:[t.jsx("span",{className:"editor-scene-label",children:"Zoom"}),t.jsx("div",{className:"editor-scene-slider",children:t.jsxs("div",{className:"editor-scene-slider-bar",children:[t.jsx("div",{className:"editor-scene-slider-fill",style:{width:`${he}%`}}
2),t.jsx("input",{type:"range",min:0,max:100,value:he,onChange:e=>{const o=Number(e.target.value);_t(o)},onPointerDown:()=>ee("zoom"),onPointerUp:e=>{a("scene_changed",{control:"zoom",zoom:Number(e.currentTarget.value)})},onKeyUp:e=>{a("scene_changed",{control:"zoom",zoom:Number(e.currentTarget.value)})},className:`editor-scene-slider-input ${B==="zoom"?"is-dragging":""}`}),t.jsx("span",{className:"editor-scene-slider-value",children:he.toFixed(0)})]})})]}),t.jsxs("div",{className:"editor-scene-row",children:[t.jsx("span",{className:"editor-scene-label",children:"Background"}),t.jsxs("div",{className:"editor-scene-select-custom",ref:rn,children:[t.jsxs("button",{type:"button",className:"editor-scene-select-trigger",onClick:()=>je(e=>!e),"aria-haspopup":"listbox","aria-expanded":dt,children:[_==="transparent"?"Transparent":"Solid",t.jsx("svg",{className:"editor-scene-select-icon",viewBox:"0 0 32 32","aria-hidden":"true",focusable:"false",children:t.jsx("polygon",{points:"16,22 6,12 7.4,10.6 16,19.2 24.6,10.6 26,12",fill:"currentColor"})})]}),dt&&t.jsxs("ul",{className:"editor-scene-select-menu",role:"listbox",children:[t.jsx("li",{role:"option","aria-selected":_==="transparent",className:_==="transparent"?"is-active":"",onClick:()=>{Mt("transparent"),je(!1),a("scene_changed",{control:"background_mode",background_mode:"transparent"})},children:"Transparent"}),t.jsx("li",{role:"option","aria-selected":_==="solid",className:_==="solid"?"is-active":"",onClick:()=>{Mt("solid"),je(!1),a("scene_changed",{control:"background_mode",background_mode:"solid"})},children:"Solid"})]})]})]}),_==="solid"&&t.jsx("div",{className:"editor-scene-row editor-scene-row--stacked",children:t.jsx("div",{className:"editor-scene-color-picker",children:t.jsx(n.Suspense,{fallback:null,children:t.jsx(En,{color:At,onChange:e=>{const o=e.hsva;Ve.current=o.h,Et(o),Ge.current=!0;const s=Yo(o).replace("#","").toUpperCase();Bn(s)}})})})})]})]})})]})]}),t.jsx("div",{className:"editor-footer-group editor-footer-group--artwork",children:h?t.jsx(k,{label:r.psdPriceUsd===0?r.psdTooltip??"Includes layered PSD mockup":"This archived PSD is no longer available to download",children:t.jsx(l,{variant:"primary",onClick:Do,disabled:r.psdPriceUsd!==0||!r.polarId,children:r.psdPriceUsd===0?"Download PSD â free":"PSD no longer available"})}):t.jsxs(t.Fragment,{children:[t.jsx(k,{label:po,children:t.jsx(l,{variant:"secondary",onMouseEnter:()=>f.current?.setArtworkHighlight(!0),onMouseLeave:()=>f.current?.setArtworkHighlight(!1),onFocus:()=>f.current?.setArtworkHighlight(!0),onBlur:()=>f.current?.setArtworkHighlight(!1),onClick:()=>{f.current?.setArtworkHighlight(!1),Xt.current?.click()},children:"Upload artwork"})}),t.jsx("input",{ref:Xt,type:"file",accept:".jpg,.jpeg,.png,.webp,.avif",style:{display:"none"},onChange:yo}),r.artworkGuideImage&&t.jsx(k,{label:"View downloadable artwork guide",children:t.jsx(l,{variant:"secondary",onClick:To,children:"Guide"})}),ho&&t.jsxs("div",{className:"editor-motion-actions",children:[j&&yt&&t.jsx("div",{className:"editor-motion-replay",children:t.jsx(l,{variant:"secondary",onClick:So,children:t.jsxs("span",{className:"editor-replay-label",children:[t.jsxs("svg",{className:"editor-replay-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32","aria-hidden":"true",focusable:"false",children:[t.jsx("path",{d:"M12,10H6.78A11,11,0,0,1,27,16h2A13,13,0,0,0,6,7.68V4H4v8h8Z"}),t.jsx("path",{d:"M20,22h5.22A11,11,0,0,1,5,16H3a13,13,0,0,0,23,8.32V28h2V20H20Z"})]}),t.jsx("span",{children:"Replay"})]})})}),j?t.jsxs("div",{className:"editor-motion-trigger segmented-buttons",children:[t.jsx(k,{label:"Choose or change the motion preset",children:t.jsx("div",{className:"segmented-buttons__main",children:t.jsx(l,{variant:"primary",onClick:bn,children:"Animate"})})}),t.jsx(k,{label:"Clear motion preset",children:t.jsx("div",{className:"segmented-buttons__icon",children:t.jsx(l,{variant:"primary",onClick:jn,"aria-label":"Clear motion preset",title:"Clear motion preset",children:t.jsx(Ee,{size:10})})})})]}):t.jsx(k,{label:"Choose a motion preset for motion export",children:t.jsx(l,{variant:"secondary",onClick:bn,children:"Animate"})})]}),t.jsx(k,{label:j?"Export 5s motion video":"Download a free PNG",children:t.jsx(l,{variant:"primary",onClick:_o,children:"Export"})}),we&&t.jsx("div",{className:"editor-artwork-error",children:we})]})})]})})]})}export{xr as EditorPage};
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.