PageSourceSearch

https://wavevisual.com/_next/static/chunks/6356.f2bc08c386f48211.js

js wavevisual.com collected 2026-10-04 13:33:39 UTC 30,134 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6356],{86356:function(e,s,a){a.r(s),a.d(s,{EditorAdminDialog:function(){return K}});var t=a(52322),l=a(2784),r=a(42658),n=a(15644),i=a(12524),o=a.n(i);let d=e=>{let{active:s,onClick:a,children:l}=e;return(0,t.jsx)("button",{onClick:a,className:o()("w-full text-left px-4 py-3 rounded-lg transition-colors",s?"bg-violet-100 text-violet-700 font-medium":"text-gray-600 hover:bg-gray-100"),children:l})};var c=a(83327),u=a(78369),m=a(7355),x=a(23083);let g=e=>{let{close:s}=e,a=(0,m.aC)(),[r,n]=(0,l.useState)(""),[i,o]=(0,l.useState)(""),[d,g]=(0,l.useState)(null),[h,p]=(0,l.useState)("idle"),[b,f]=(0,l.useState)(null),[v,j]=(0,l.useState)(""),[y,N]=(0,l.useState)(null),[w,k]=(0,l.useState)("idle"),[C,M]=(0,l.useState)(null),[D,F]=(0,l.useState)("idle"),[S,I]=(0,l.useState)(null),O=async()=>{let e=r.trim();if(e){F("loading"),I(null);try{await a.signInWithCustomToken(e),s()}catch(e){var t,l,n,i;I((null==e?void 0:null===(t=e.response)||void 0===t?void 0:t.status)===404||(null==e?void 0:null===(l=e.message)||void 0===l?void 0:l.includes("not found"))||(null==e?void 0:null===(n=e.message)||void 0===n?void 0:n.includes("status: 404"))?"User not found":null!==(i=null==e?void 0:e.message)&&void 0!==i?i:"Could not switch account"),F("error")}}},A=async()=>{let e=i.trim();if(e){p("loading"),f(null),g(null);try{let s=await (0,x.Bh)(e);g(s),p("success")}catch(e){var s,a,t,l;f((null==e?void 0:null===(s=e.response)||void 0===s?void 0:s.status)===404||(null==e?void 0:null===(a=e.message)||void 0===a?void 0:a.includes("not found"))||(null==e?void 0:null===(t=e.message)||void 0===t?void 0:t.includes("status: 404"))?"User not found":null!==(l=null==e?void 0:e.message)&&void 0!==l?l:"Inquiry failed"),p("error")}}},E=async()=>{let e=v.trim();if(e){k("loading"),M(null),N(null);try{let s=await (0,x.zl)({email:e});N(s),k("success")}catch(e){M(function(e){var s;let a=null!==(s=null==e?void 0:e.message)&&void 0!==s?s:"";return a.includes("409")||a.includes("already belongs")?"User already belongs to a classroom team":a.includes("404")||a.includes("not found")?"User not found":a||"Could not create class team"}(e)),k("error")}}};return(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg p-5 shadow-sm",children:[(0,t.jsx)("h3",{className:"font-semibold text-base mb-2",children:"Account Switcher"}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mb-4",children:"Switch to another user account by entering their email address."}),(0,t.jsx)("div",{className:"flex w-full my-2",children:(0,t.jsx)(u.I,{type:"email",label:"Email address",className:"w-full",onInput:e=>n(e.currentTarget.value),defaultValue:r,placeholder:"Enter email address",disabled:"loading"===D})}),(0,t.jsx)(c.z,{variant:"default",onClick:O,disabled:"loading"===D||!r.trim(),"aria-label":"switch to account",className:"mt-2",children:"loading"===D?"Switching…":"Switch to account"}),"error"===D&&S&&(0,t.jsx)("p",{className:"mt-4 text-sm text-red-600",children:S})]}),(0,t.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg p-5 shadow-sm",children:[(0,t.jsx)("h3",{className:"font-semibold text-base mb-2",children:"Account inquiry"}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mb-4",children:"Look up account details by email: credits, subscription, and number of designs."}),(0,t.jsx)("div",{className:"flex w-full my-2",children:(0,t.jsx)(u.I,{type:"email",label:"Email address",className:"w-full",onInput:e=>o(e.currentTarget.value),defaultValue:i,placeholder:"Enter email address",disabled:"loading"===h})}),(0,t.jsx)(c.z,{variant:"default",onClick:A,disabled:"loading"===h||!i.trim(),"aria-label":"inquire account",className:"mt-2",children:"loading"===h?"Loading…":"Inquire"}),"success"===h&&d&&(0,t.jsxs)("div",{className:"mt-4 p-3 bg-gray-50 rounded border border-gray-200 text-sm space-y-1",children:[(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"font-medium",children:"Credits:"})," ",d.credit]}),(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"font-medium",children:"Current subscription:"})," ",0===d.subscriptions.length?"None":d.subscriptions.map(e=>{var s,a;return"".concat(null!==(s=e.subscription_plan)&&void 0!==s?s:"Plan"," (").concat(null!==(a=e.state)&&void 0!==a?a:"unknown",")")}
1).join(", ")]}),(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"font-medium",children:"Number of designs:"})," ",d.designCount]})]}),"error"===h&&b&&(0,t.jsx)("p",{className:"mt-4 text-sm text-red-600",children:b})]}),(0,t.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg p-5 shadow-sm",children:[(0,t.jsx)("h3",{className:"font-semibold text-base mb-2",children:"Create class (teacher)"}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mb-4",children:"Provision a new classroom team for an existing user. They become the class teacher (team admin) and can use /team-designs to review student work."}),(0,t.jsx)("div",{className:"flex w-full my-2",children:(0,t.jsx)(u.I,{type:"email",label:"Teacher account email",className:"w-full",onInput:e=>j(e.currentTarget.value),defaultValue:v,placeholder:"[email protected]",disabled:"loading"===w})}),(0,t.jsx)(c.z,{variant:"default",onClick:E,disabled:"loading"===w||!v.trim(),"aria-label":"create class team for user",className:"mt-2",children:"loading"===w?"Creating…":"Create class team"}),"success"===w&&y&&(0,t.jsxs)("div",{className:"mt-4 p-3 bg-gray-50 rounded border border-gray-200 text-sm space-y-1",children:[(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"font-medium",children:"Team id:"})," ",y.teamId]}),(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"font-medium",children:"User id:"})," ",y.userId]}),(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"font-medium",children:"Email:"})," ",y.email]})]}),"error"===w&&C&&(0,t.jsx)("p",{className:"mt-4 text-sm text-red-600",children:C})]})]})};var h=a(52522),p=a(10289),b=a(65089),f=a(62487),v=a(18997),j=a(51574);let y=()=>{let e=(0,p.M)(),{designId:s}=(0,h.hl)(),a=(0,b.dy)(),{startConvertAudio:l}=(0,f.L)();return a&&a.type===j.CustomFileType.bucket?(0,t.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg p-5 shadow-sm",children:[(0,t.jsx)("h3",{className:"font-semibold text-base mb-2",children:"Audio Conversion"}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mb-4",children:"Convert the original audio file to a different format."}),(0,t.jsx)(c.z,{variant:"default",loading:e.isPending,"aria-label":"convert audio",onClick:async()=>{if(!a.name){(0,v.H)("Audio resource name is empty");return}e.setPending(),await l(s,a.name),e.setSuccess()},children:"Convert original audio"})]}):null};var N=a(82066);let w=()=>{let{designId:e}=(0,h.hl)(),{isLoading:s,mutate:a}=(0,N.useMutation)(["download-design-doc",e],async()=>{if(!e)return;let s=new Blob([JSON.stringify(await (0,x.rT)(e))],{type:"application/json"}),a=window.URL.createObjectURL(s),t=document.createElement("a");t.href=a,t.download="".concat(e,".json"),document.body.appendChild(t),t.click(),t.remove()});return(0,t.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg p-5 shadow-sm",children:[(0,t.jsx)("h3",{className:"font-semibold text-base mb-2",children:"Design Document"}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mb-4",children:"Download the complete design document as a JSON file."}),(0,t.jsx)(c.z,{variant:"default",onClick:()=>a(),loading:s,"aria-label":"download design document",children:"Download design document"})]})};var k=a(99127);let C=()=>{let{designId:e}=(0,h.hl)(),{isLoading:s,data:a,mutate:r}=(0,N.useMutation)(["clear_exports",e],async()=>!!e&&(await (0,x.IG)(e),!0));return(0,l.useEffect)(()=>{if(a){var e;null===(e=window)||void 0===e||e.location.reload()}},[a]),(0,t.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg p-5 shadow-sm",children:[(0,t.jsxs)("h3",{className:"font-semibold text-base mb-2 flex items-center gap-2",children:[(0,t.jsx)(k.VPh,{}),"Export Management"]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mb-4",children:"Clear all exported images and files for this design."}),(0,t.jsx)(c.z,{variant:"default",loading:s,onClick:()=>r(),"aria-label":"clear exports",children:"Clear exports"})]})};var M=a(14084);let D=()=>{var e;let s=(0,m.aC)(),{designId:a}=(0,h.hl)(),{designDocument:r}=(0,M.s)(),[n,i]=(0,l.useState)(""),o=null===(e=s.userDetails)||void 0===e?void 0:e.uid,d=null==r?void 0:r.userId,{isLoading:g,data:p,mutate:b}=(0,N.useMutation)(["reassign_design",a],async()=>!!a&&!!n&&(await (0,x.c1)({userId:n},a),!0));return(0,t.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg p-5 shadow-sm",children:[(0,t.jsx)("h3",{className:"font-semibold text-base mb-2",children:"Reassign Design"}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mb-2",children:"Transfer this design to another user by entering their user ID."}),(0,t.jsxs)("div",{className:"flex flex-col gap-1 mb-4 text-sm text-gray-500",children:[o&&(0,t.jsxs)("p",{children:["Current user ID: ",(0,t.jsx)("code",{className:"bg-gray-100 px-1.5 py-0.5 rounded break-all",children:o})]}),d&&(0,t.jsxs)("p",{children:["Design owner ID: ",(0,t.jsx)("code",{className:"bg-gray-100 px-1.5 py-0.5 rounded break-all",children:d})]})]}),(0,t.jsx)("div",{className:"flex w-full my-2",children:(0,t.jsx)(u.I,{type:"text",label:"Target User ID",className:"w-full",onInput:e=>i(e.currentTarget.value),value:n,placeholder:"Enter user ID"})}),p&&(0,t.jsx)("div",{className:"flex flex-col text-green-600 w-full break-all mb-2 p-3 bg-green-50 rounded-lg",children:(0,t.jsx)("p",{children:"Design reassigned successfully!"})}),(0,t.jsx)(c.z,{variant:"default",loading:g,onClick:()=>b(),disabled:!n,"aria-label":"reassign design",children:"Reassign design to user"})]})},F=()=>{let{designId:e}=(0,h.hl)(),{isLoading:s,data:a,mutate:r}=(0,N.useMutation)(["make_design_editable",e],async()=>!!e&&(await (0,x.Fw)({},e),!0));return(0,l.useEffect)(()=>
1{if(a){var e;null===(e=window)||void 0===e||e.location.reload()}},[a]),(0,t.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg p-5 shadow-sm",children:[(0,t.jsx)("h3",{className:"font-semibold text-base mb-2",children:"Make Design Editable"}),(0,t.jsx)("p",{className:"text-sm text-slate-600 mb-4",children:"Updates paidAt to current date, allowing the design to be edited again."}),a&&(0,t.jsx)("div",{className:"flex flex-col text-green-600 w-full break-all mb-4 p-3 bg-green-50 rounded-lg",children:(0,t.jsx)("p",{children:"Design is now editable!"})}),(0,t.jsx)(c.z,{variant:"default",loading:s,onClick:()=>r(),"aria-label":"make design editable",children:"Make design editable"})]})},S=()=>{let{designId:e}=(0,h.hl)(),{isLoading:s,data:a,mutate:l}=(0,N.useMutation)(["duplicate_to_sandbox",e],async()=>e?(0,x.BO)({},e):null);return(0,t.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg p-5 shadow-sm",children:[(0,t.jsx)("h3",{className:"font-semibold text-base mb-2",children:"Duplicate to Sandbox"}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mb-4",children:"Duplicate this design to the sandbox database and assign it to the admin user."}),a&&(0,t.jsxs)("div",{className:"flex flex-col text-green-600 w-full break-all mb-4 p-3 bg-green-50 rounded-lg",children:[(0,t.jsx)("p",{className:"font-semibold text-sm mb-2",children:"Design duplicated successfully!"}),(0,t.jsxs)("p",{className:"text-sm mb-2",children:["New Design ID: ",a.designId]}),(0,t.jsx)("a",{href:"http://localhost:3000/editor?id=".concat(a.designId),target:"_blank",rel:"noopener noreferrer",className:"text-sm underline hover:text-green-700",children:"Open in editor →"})]}),(0,t.jsx)(c.z,{variant:"default",loading:s,onClick:()=>l(),"aria-label":"duplicate design to sandbox",children:"Duplicate to sandbox"})]})},I=()=>{let{designId:e}=(0,h.hl)(),{isLoading:s,data:a,mutate:l}=(0,N.useMutation)(["duplicate_from_sandbox",e],async()=>e?(0,x._q)({},e):null);return(0,t.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg p-5 shadow-sm",children:[(0,t.jsx)("h3",{className:"font-semibold text-base mb-2",children:"Duplicate to Production"}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mb-4",children:"Duplicate this design from the sandbox database to production, keeping the original user."}),a&&(0,t.jsxs)("div",{className:"flex flex-col text-green-600 w-full break-all mb-4 p-3 bg-green-50 rounded-lg",children:[(0,t.jsx)("p",{className:"font-semibold text-sm mb-2",children:"Design duplicated successfully!"}),(0,t.jsxs)("p",{className:"text-sm mb-2",children:["New Design ID: ",a.designId]}),(0,t.jsx)("a",{href:"https://wavevisual.com/editor?id=".concat(a.designId),target:"_blank",rel:"noopener noreferrer",className:"text-sm underline hover:text-green-700",children:"Open in editor →"})]}),(0,t.jsx)(c.z,{variant:"default",loading:s,onClick:()=>l(),"aria-label":"duplicate design to production",children:"Duplicate to Production"})]})},O=()=>{let{designId:e}=(0,h.hl)();return e?(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsx)(y,{}),(0,t.jsx)(C,{}),(0,t.jsx)(S,{}),(0,t.jsx)(I,{}),(0,t.jsx)(F,{}),(0,t.jsx)(D,{}),(0,t.jsx)(w,{})]}):(0,t.jsx)("div",{className:"flex flex-col items-center justify-center py-8 text-gray-500",children:(0,t.jsx)("p",{children:"No design selected"})})};var A=a(33256),E=a(3741);function T(e){return"boolean"==typeof e?e?"true":"false":"number"==typeof e?String(e):"string"==typeof e?'"'.concat(e,'"'):"object"==typeof e&&null!==e?JSON.stringify(e,null,2):null===e?"null":"undefined"}let P=()=>{let[e,s]=(0,l.useState)(0),[a,r]=(0,l.useState)(""),n=(0,l.useMemo)(()=>{let e=(0,E.getBaseFeatureFlags)(),s=(0,E.getFeatureFlagOverrides)();return(function e(s,a,t){let l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",r=[];return Object.keys(s).forEach(n=>{let i=l?"".concat(l,".").concat(n):n,o=s[n],d=a[n],c=null==t?void 0:t[n],u=void 0!==c&&function e(s,a){if(null===s&&null==a||void 0===s&&void 0===a)return!1;if(null===s||null===a||void 0===s||void 0===a)return!0;if("object"!=typeof s||null===s||"object"!=typeof a||null===a)return s!==a;let t=Object.keys(s),l=Object.keys(a);return t.length!==l.length||t.some(t=>e(s[t],a[t]))}(o,d);if("object"!=typeof o||null===o||Array.isArray(o))r.push({path:i,value:o,baseValue:null!=d?d:null,isOverrid
1den:u});else{let s="object"!=typeof c||null===c||Array.isArray(c)?void 0:c,a="object"!=typeof d||null===d||Array.isArray(d)?{}:d;r.push(...e(o,a,s,i))}}),r})(E.featureFlags,e,null!=s?s:void 0).sort((e,s)=>e.path.localeCompare(s.path))},[e]),i=(0,l.useMemo)(()=>{let e=a.trim().toLowerCase();return e?n.filter(s=>!!(s.path.toLowerCase().includes(e)||T(s.value).toLowerCase().includes(e)||s.isOverridden&&T(s.baseValue).toLowerCase().includes(e))):n},[n,a]),o=(e,a)=>{let t=function(e,s){let a=e.split("."),t={},l=t;a.slice(0,-1).forEach(e=>{l[e]={},l=l[e]});let r=a[a.length-1];return r&&(l[r]=s),t}(e.path,a);(0,E.setFeatureFlagOverrides)(t),s(e=>e+1)};return(0,t.jsx)("div",{className:"flex flex-col gap-4",children:(0,t.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg p-5 shadow-sm",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsx)("h3",{className:"font-semibold text-base",children:"Features"}),(0,t.jsx)(c.z,{variant:"outline",size:"sm",onClick:()=>{(0,E.refreshFeatureFlagOverrides)(),s(e=>e+1)},"aria-label":"Refresh feature flags",children:"Refresh"})]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mb-4",children:'Current feature flag values. Values marked as "(overridden)" have been changed via localStorage.'}),(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(u.I,{id:"admin-features-flag-search",type:"search",label:"Search flags",className:"w-full",value:a,onChange:e=>r(e.target.value),placeholder:"Filter by path or value…",autoComplete:"off","aria-describedby":"admin-features-flag-search-hint"}),(0,t.jsx)("p",{id:"admin-features-flag-search-hint",className:"text-xs text-gray-500 mt-2",children:a.trim()?"Showing ".concat(i.length," of ").concat(n.length):"".concat(n.length," flags")})]}),(0,t.jsx)("div",{className:"space-y-2 max-h-[60vh] overflow-y-auto",children:0===i.length?(0,t.jsx)("p",{className:"text-sm text-gray-500 py-4 text-center",children:"No flags match your search."}):i.map(e=>(0,t.jsxs)("div",{className:"flex flex-col gap-1 p-3 bg-gray-50 rounded border border-gray-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"font-mono text-sm font-medium text-gray-800",children:e.path}),(0,t.jsx)("span",{className:"text-xs px-2 py-0.5 rounded ".concat(e.isOverridden?"bg-yellow-100 text-yellow-800":"bg-gray-100 text-gray-600"),children:e.isOverridden?"(overridden)":"(default)"})]}),(0,t.jsxs)("div",{className:"flex items-start gap-2 justify-between",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500 min-w-[60px]",children:"Value:"}),"boolean"==typeof e.value?(0,t.jsxs)("span",{className:"inline-flex items-center gap-2",children:[(0,t.jsxs)(A.rs,{checked:e.value,onChange:s=>
1o(e,s),className:"".concat(e.value?"bg-violet-600":"bg-gray-200"," relative inline-flex h-6 w-11 items-center rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-violet-500 focus:ring-offset-2"),children:[(0,t.jsxs)("span",{className:"sr-only",children:["Toggle ",e.path]}),(0,t.jsx)("span",{className:"".concat(e.value?"translate-x-6":"translate-x-1"," inline-block h-4 w-4 rounded-full bg-white transition-transform")})]}),(0,t.jsx)("span",{className:"font-mono text-xs text-gray-700",children:e.value?"true":"false"})]}):(0,t.jsx)("span",{className:"font-mono text-xs text-gray-700 break-all",children:T(e.value)})]}),e.isOverridden&&(0,t.jsx)("span",{className:"font-mono text-xs text-gray-500 line-through break-all self-end",children:T(e.baseValue)})]},e.path))})]})})};var z=a(3011),_=a(40381),J=a(7015),L=a(27750),q=a(53665),R=a(91705),U=a(2431);let V={prepareMs:"Prepare",spectrumPrecomputeMs:"Spectrum precompute",framesToDiskMs:"Frames to disk",ffmpegMuxMs:"FFmpeg mux",uploadMs:"Upload",totalMs:"Total (wall)"},Q={populateDesignMs:"Populate design",workerQueueMs:"Worker queue",renderMs:"Render (canvas/PDF)",waveConvertMs:"WaveConvert",updateExportsMs:"Update exports",totalMs:"Total (wall)"};function B(e,s){return Object.entries(s).filter(s=>{let[a]=s;return"number"==typeof e[a]}).map(s=>{let[a,t]=s;return{key:a,label:t,ms:e[a]}})}function W(e){let{job:s}=e,a=(0,J.cu)(s.result),l=(0,J.Mj)(a),r=(0,L.a)(a),n=[];l?n=B(l,V):r&&(n=B(r,Q));let i=null==a?[]:Object.entries(a).filter(e=>{let[s]=e;return"phaseTimingsMs"!==s&&"progressPercent"!==s});if(!s.result)return null;if(!a){let e=s.status===_.E.errored;return(0,t.jsx)("p",{className:"text-xs rounded-md px-3 py-2 mb-3 border break-all ".concat(e?"text-red-900 bg-red-50 border-red-200":"text-amber-800 bg-amber-50 border-amber-200"),children:e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"font-semibold",children:"Error: "}),s.result]}):(0,t.jsx)(t.Fragment,{children:"Result is present but could not be parsed as JSON."})})}return(0,t.jsxs)("div",{className:"mb-4 space-y-4",children:[n.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-xs font-semibold text-gray-700 uppercase tracking-wide mb-2",children:"Phase timings"}),(0,t.jsxs)("div",{className:"rounded-lg border border-gray-200 overflow-hidden bg-white",children:[(0,t.jsxs)("table",{className:"w-full text-xs",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"bg-gray-100 text-left text-gray-600",children:[(0,t.jsx)("th",{className:"px-3 py-2 font-medium",children:"Phase"}),(0,t.jsx)("th",{className:"px-3 py-2 font-medium text-right w-[28%]",children:"Time"})]})}),(0,t.jsx)("tbody",{children:n.map(e=>{let{key:s,label:a,ms:l}=e;return(0,t.jsxs)("tr",{className:"border-t border-gray-100",children:[(0,t.jsx)("td",{className:"px-3 py-1.5 text-gray-800",children:a}),(0,t.jsx)("td",{className:"px-3 py-1.5 text-right font-mono text-gray-700 tabular-nums",title:"".concat(l.toLocaleString()," ms"),children:l>=1e3?"".concat((l/1e3).toFixed(1)," s"):"".concat(l," ms")})]},s)})})]}),l&&"number"==typeof l.maxConcurrency&&(0,t.jsxs)("p",{className:"px-3 py-2 text-xs text-gray-600 border-t border-gray-100 bg-gray-50",children:["Frame render concurrency:"," ",(0,t.jsx)("span",{className:"font-mono font-medium",children:l.maxConcurrency})]}),(null==r?void 0:r.waveConvertJobId)&&(0,t.jsxs)("p",{className:"px-3 py-2 text-xs text-gray-600 border-t border-gray-100 bg-gray-50 break-all",children:["WaveConvert job:"," ",(0,t.jsx)("span",{className:"font-mono font-medium",children:r.waveConvertJobId})]}),(null==r?void 0:r.traceId)&&(0,t.jsxs)("p",{className:"px-3 py-2 text-xs text-gray-600 border-t border-gray-100 bg-gray-50 break-all",children:["Trace:"," ",(0,t.jsx)("span",{className:"font-mono font-medium",children:r.traceId})]})]})]}),i.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-xs font-semibold text-gray-700 uppercase tracking-wide mb-2",children:"Outputs"}),(0,t.jsx)("ul",{className:"space-y-2 text-xs",children:i.map(e=>{let[s,a]=e;return(0,t.jsxs)("li",{className:"rounded-md border border-gray-200 bg-white p-2",children:[(0,t.jsx)("div",{className:"font-mono font-medium text-violet-800 break-all",children:s}),(0,t.jsx)("div",{className:"mt-1 font-mono text-gray-700 break-all text-[11px]",children:"string"==typeof a?a:JSON.stringify(a)})]},s)})})]}),0===n.length&&0===i.length&&(0,t.jsx)("p",{className:"text-xs text-gray-500",children:"Parsed JSON has no phase timings or output keys."})]})}let Z=()=>{let{designId:e}=(0,h.hl)(),{designJobs:s,isLoading:a}=(0,U.YZ)(),l=s=>{if(!e)return;
1let a=q.isDevEnvironment?"sandbox":"-default-",t=e.replace(/\//g,"~2F"),l=s.replace(/\//g,"~2F"),r="https://console.firebase.google.com/u/0/project/wavevisual-36d2f/firestore/databases/".concat(a,"/data/~2Fdesigns~2F").concat(t,"~2Fjobs~2F").concat(l);window.open(r,"_blank","noopener,noreferrer")};if(!e)return(0,t.jsx)("div",{className:"flex flex-col items-center justify-center py-8 text-gray-500",children:(0,t.jsx)("p",{children:"No design selected"})});if(a)return(0,t.jsx)("div",{className:"flex flex-col gap-2",children:[1,2,3].map(e=>(0,t.jsxs)("div",{className:"border-b border-gray-200 pb-4",children:[(0,t.jsx)("div",{className:"h-12 bg-gray-200 rounded animate-pulse mb-2"}),(0,t.jsx)("div",{className:"h-32 bg-gray-100 rounded animate-pulse"})]},e))});if(!s||0===Object.keys(s).length)return(0,t.jsx)("div",{className:"flex flex-col items-center justify-center py-8 text-gray-500",children:(0,t.jsx)("p",{children:"No jobs found for this design"})});let r=Object.entries(s).sort((e,s)=>{let[,a]=e,[,t]=s,l=a.createdAt?new Date(a.createdAt).getTime():0;return(t.createdAt?new Date(t.createdAt).getTime():0)-l});return(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsxs)("p",{className:"font-semibold mb-4",children:["Design Jobs (",r.length,")"]}),(0,t.jsx)(z.UQ,{type:"single",collapsible:!0,className:"w-full",children:r.map(e=>{let[s,a]=e;return(0,t.jsxs)(z.Qd,{value:s,children:[(0,t.jsx)(z.o4,{className:"text-left",children:(0,t.jsxs)("div",{className:"flex items-center gap-2 w-full",children:[(0,t.jsxs)("div",{className:"flex flex-col items-start flex-1",children:[(0,t.jsx)("span",{className:"font-medium",children:s}),(0,t.jsxs)("span",{className:"text-xs text-gray-500 mt-1",children:["Status: ",a.status," | Started: ",new Date(a.startedAt).toLocaleString()]})]}),(0,t.jsx)("div",{onClick:e=>{e.stopPropagation(),l(s)},onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.stopPropagation(),l(s))},role:"button",tabIndex:0,"aria-label":"Open job Firestore database",title:"Open job Firestore database",className:"text-violet-600 hover:text-violet-700 transition-colors shrink-0 cursor-pointer focus:outline-none focus:ring-2 focus:ring-violet-500 rounded",children:(0,t.jsx)(R.i1q,{fontSize:16})})]})}),(0,t.jsx)(z.vF,{children:(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsx)(W,{job:a}),(0,t.jsx)("p",{className:"text-xs font-semibold text-gray-700 uppercase tracking-wide mb-2",children:"Raw job document"}),(0,t.jsx)("pre",{className:"bg-gray-50 p-4 rounded-lg overflow-auto text-xs border border-gray-200",children:JSON.stringify(a,null,2)})]})})]},s)})})]})};var G=a(71680);let H={design:"Design",account:"Account",features:"Features",jobs:"Jobs"},K=()=>{var e,s;let[a,i]=(0,l.useState)(!1),[o,c]=(0,l.useState)("design"),{designId:u}=(0,h.hl)(),x=(0,m.aC)(),p=()=>i(!1),b=()=>{if(!u)return;let e=q.isDevEnvironment?"sandbox":"-default-",s=u.replace(/\//g,"~2F"),a="https://console.firebase.google.com/u/0/project/wavevisual-36d2f/firestore/databases/".concat(e,"/data/~2Fdesigns~2F").concat(s);window.open(a,"_blank","noopener,noreferrer")},f=()=>{var e;let s=null===(e=x.userDetails)||void 0===e?void 0:e.uid;if(!s)return;let a=q.isDevEnvironment?"sandbox":"-default-",t=s.replace(/\//g,"~2F"),l="https://console.firebase.google.com/u/0/project/wavevisual-36d2f/firestore/databases/".concat(a,"/data/~2Fusers~2F").concat(t);window.open(l,"_blank","noopener,noreferrer")},v=[{value:"design",label:H.design},{value:"account",label:H.account},{value:"features",label:H.features},...u?[{value:"jobs",label:H.jobs}]:[]];return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{className:"flex bg-violet-600 items-center p-2 rounded-lg hover:bg-violet-500 text-white h-10 px-2",onClick:()=>i(!0),"aria-label":"Open admin panel",children:(0,t.jsx)(r.ZJo,{fontSize:24})}),(0,t.jsx)(n.Q,{open:a,onClose:p,className:"max-w-4xl",children:(0,t.jsxs)("div",{className:"flex flex-col lg:flex-row min-h-[400px]",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-3 p-4 lg:hidden border-b border-gray-200",children:[(0,t.jsx)("h2",{className:"font-semibold text-lg text-gray-900",children:"Admin Panel"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("div",{className:"relative flex-1",children:[(0,t.jsx)("select",{value:o,onChange:e=>c(e.target.value),className:"w-full appearance-none bg-white border border-gray-300 rounded-lg px-4 py-3 pr-10 text-gray-900 font-medium focus:outline-none focus:ring-2 focus:ring-violet-500 focus:border-transparent","aria-label":"Select admin section",children:v.map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,t.jsx)(G.RiI,{className:"absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none text-gray-500",fontSize:14})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[u&&(0,t.jsx)("button",{onClick:b,"aria-label":"Open design Firestore database",title:"Open design Firestore database",className:"text-violet-600 hover:text-violet-700 transition-colors p-2 rounded",children:(0,t.jsx)(R.i1q,{fontSize:16})}),(null===(s=x.userDetails)||void 0===s?void 0:s.uid)&&(0,t.jsx)("button",{onClick:f,"aria-label":"Open user Firestore database",title:"Open user Firestore database",className:"text-violet-600 hover:text-violet-700 transition-colors p-2 rounded",children:(0,t.jsx)(R.i1q,{fontSize:16})})]})]})]}),(0,t.jsxs)("div",{className:"hidden lg:flex w-48 border-r border-gray-200 pr-4 flex-col gap-1",children:[(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)("h2",{className:"font-semibold text-lg text-gray-900",children:"Admin Panel"})}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(d,{active:"design"===o,onClick:()=>c("design"),children:"Design"}),u&&(0,t.jsx)("button",{onClick:b,"aria-label":"Open design Firestore database",title:"Open design Firestore database",className:"text-violet-600 hover:text-violet-700 transition-colors shrink-0",children:(0,t.jsx)(R.i1q,{fontSize:16})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(d,{active:"account"===o,onClick:()=>c("account"),children:"Account"}),(null===(e=x.userDetails)||void 0===e?void 0:e.uid)&&(0,t.jsx)("button",{onClick:f,"aria-label":"Open user Firestore database",title:"Open user Firestore database",className:"text-violet-600 hover:text-violet-700 transition-colors shrink-0",children:(0,t.jsx)(R.i1q,{fontSize:16})})]}),(0,t.jsx)(d,{active:"features"===o,onClick:()=>c("features"),children:"Features"}),u&&(0,t.jsx)(d,{active:"jobs"===o,onClick:()=>c("jobs"),children:"Jobs"})]}),(0,t.jsxs)("div",{className:"flex-1 p-4 lg:p-6 overflow-y-auto max-h-[70vh] bg-neutral-100",children:["account"===o&&(0,t.jsx)(g,{close:p}),"design"===o&&(0,t.jsx)(O,{}),"features"===o&&(0,t.jsx)(P,{}),"jobs"===o&&(0,t.jsx)(Z,{isActive:"jobs"===o})]})]})})]})}},27750:function(e,s){s.a=function(e){if(!e)return null;
1let s=e.phaseTimingsMs;if(!s||"object"!=typeof s||Array.isArray(s))return null;for(let e of["populateDesignMs","workerQueueMs","renderMs","waveConvertMs","updateExportsMs","totalMs"])if("number"!=typeof s[e]||Number.isNaN(s[e]))return null;let a={populateDesignMs:s.populateDesignMs,workerQueueMs:s.workerQueueMs,renderMs:s.renderMs,waveConvertMs:s.waveConvertMs,updateExportsMs:s.updateExportsMs,totalMs:s.totalMs};return"string"==typeof s.activePhase&&(a.activePhase=s.activePhase),"string"==typeof s.waveConvertJobId&&(a.waveConvertJobId=s.waveConvertJobId),"string"==typeof s.workerRequestId&&(a.workerRequestId=s.workerRequestId),"string"==typeof s.traceId&&(a.traceId=s.traceId),a}},7015:function(e,s){s.cu=function(e){if(null==e)return null;if("string"==typeof e)try{let s=JSON.parse(e);if(s&&"object"==typeof s&&!Array.isArray(s))return s;return null}catch(e){return null}return"object"!=typeof e||Array.isArray(e)?null:e},s.Mj=function(e){if(!e)return null;let s=e.phaseTimingsMs;if(!s||"object"!=typeof s||Array.isArray(s))return null;for(let e of["prepareMs","spectrumPrecomputeMs","framesToDiskMs","ffmpegMuxMs","uploadMs","totalMs"])if("number"!=typeof s[e]||Number.isNaN(s[e]))return null;let a={prepareMs:s.prepareMs,spectrumPrecomputeMs:s.spectrumPrecomputeMs,framesToDiskMs:s.framesToDiskMs,ffmpegMuxMs:s.ffmpegMuxMs,uploadMs:s.uploadMs,totalMs:s.totalMs};return"number"!=typeof s.maxConcurrency||Number.isNaN(s.maxConcurrency)||(a.maxConcurrency=s.maxConcurrency),a}}}]);

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.