PageSourceSearch

https://cdn.meshy.ai/webapp-build-assets/production/_next/static/chunks/3k4r8ecks415o.js

js meshy.ai collected 2026-09-24 08:41:06 UTC 30,172 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,135342,e=>{"use strict";var t=e.i(954616),i=e.i(368709);let o=async e=>{let{data:{result:t}}=await (0,i.fetchApi)({url:"/v1/feedback",method:"POST",data:e});return t};e.s(["useSubmitFeedback",0,({suppressErrorToast:e}={})=>(0,t.useMutation)({mutationFn:o,meta:{suppressErrorToast:e}})])},966695,e=>{"use strict";e.s(["mcLogger",0,{log:(...e)=>{},warn:(...e)=>{},error:(...e)=>{console.error(...e)}}])},3604,e=>{"use strict";var t=e.i(271645);e.i(460195);var i=e.i(315747),o=e.i(966695);let a=["meshy.ai","www.meshy.ai","app-staging.meshy.ai","taichi-graphics.com","meshy.cn"],r=["meshy-webapp"];class s{static instance=null;worker=null;ready=!1;refCount=0;autoRebuilds=0;idCounter=0;pendingRequests=new Map;readyListeners=new Set;initPromise=null;settleInit=null;readyTimer=null;static getInstance(){return s.instance||(s.instance=new s),s.instance}subscribe(e){return this.refCount++,this.readyListeners.add(e),1===this.refCount?this.initWorker():this.ready&&e(!0),()=>{this.readyListeners.delete(e),this.refCount--,0===this.refCount&&this.cleanup()}}initWorker(){let e;if(this.worker||this.initPromise)return;let t=window.location.hostname;if(e=t.toLowerCase(),!(a.some(t=>e===t||e.endsWith(`.${t}`))||e.endsWith(".vercel.app")&&r.some(t=>e.startsWith(t))))return void o.mcLogger.warn("[useGlbTo3mf] Domain not allowed, WASM will not be loaded:",t);this.initPromise=new Promise((e,t)=>{this.settleInit={resolve:e,reject:t}}),this.initPromise.catch(()=>{}),this.readyTimer=setTimeout(()=>{this.fail("3MF converter WASM not ready (timeout)")},3e4);let s=`?v=${encodeURIComponent("v2026.09.24.post2")}`;this.worker=new Worker((0,i.withBasePath)(`/resource/converter/converter-loader.min.js${s}`),{type:"module"}),this.worker.onmessage=e=>{let{type:t,id:i,data:a,error:r}=e.data;if("loaded"===t){o.mcLogger.log("[useGlbTo3mf] WASM loaded, sending authorization...");let e=window.location.hostname,t=Date.now(),i=(function(e,t){let i=BigInt("14695981039346656037"),o=BigInt("1099511628211"),a=BigInt("0xFFFFFFFFFFFFFFFF");for(let e=0;e<t.length;e++)i^=BigInt(t.charCodeAt(e)),i=i*o&a;for(let t=0;t<e.length;t++)i^=BigInt(e.charCodeAt(t)),i=i*o&a;return i^=i>>BigInt(33),i=i*BigInt("0xff51afd7ed558ccd")&a,i^=i>>BigInt(33),i=i*BigInt("0xc4ceb9fe1a85ec53")&a,i^=i>>BigInt(33)})(e+":"+t,"Meshy_Multi_Color").toString(16).padStart(16,"0");this.worker?.postMessage({type:"authorize",hostname:e,timestamp:t,signature:i});return}if("ready"===t){this.ready=!0,this.autoRebuilds=0,this.clearReadyTimer(),o.mcLogger.log("[useGlbTo3mf] WASM Worker authorized and ready (singleton)"),this.notifyListeners(!0),this.settleInit?.resolve(),this.settleInit=null;return}if("auth_error"===t)return void this.fail(`3MF converter authorization failed: ${r||"unknown reason"}`);if(void 0===i)return;let s=this.pendingRequests.get(i);s&&(this.pendingRequests.delete(i),"result"===t&&a?s.resolve(a):"error"===t&&s.reject(Error(r||"Conversion failed")))},this.worker.onerror=e=>{this.fail(e.message||"3MF converter worker crashed")},this.worker.onmessageerror=()=>{this.fail("3MF converter worker sent an undecodable message")}}notifyListeners(e){this.readyListeners.forEach(t=>t(e))}clearReadyTimer(){this.readyTimer&&clearTimeout(this.readyTimer),this.readyTimer=null}fail(e){o.mcLogger.error("[useGlbTo3mf] Worker error:",e),this.teardown(Error(e)),this.notifyListeners(!1),this.refCount>0&&this.autoRebuilds<2&&(this.autoRebuilds++,setTimeout(()=>{!(this.refCount>0)||this.worker||this.initPromise||this.initWorker()},2e3))}teardown(e){this.clearReadyTimer(),this.worker&&(this.worker.terminate(),this.worker=null),this.ready=!1,this.initPromise=null,this.settleInit?.reject(e),this.settleInit=null;let t=[...this.pendingRequests.values()];this.pendingRequests.clear(),t.forEach(({reject:t})=>t(e))}cleanup(){this.teardown(Error("Worker terminated")),o.mcLogger.log("[useGlbTo3mf] Worker singleton cleaned up")}isReady(){return this.ready}getNextId(){return++this.idCounter}postMessage(e,t){this.worker?.postMessage(e,t)}addPendingRequest(e,t){let i=setTimeout(()=>{this.pendingRequests.has(e)&&this.fail("3MF conversion timed out after 120s")},12e4);this.pendingRequests.set(e,{resolve:e=>{clearTimeout(i),t.resolve(e)},reject:e=>{clearTimeout(i),t.reject(e)}})}getWorker(){return this.worker}async ensureReady(){if(!this.ready){if(this.worker||this.initPromise||this.initWorker(),!this.initPromise)throw Error("Worker not initialized");await this.initPromise}}}e.s(["useGlbTo3mf",0,function({lazy:e=!1}={}){let[i,o]=(0,t.useState)(()=>s.getInstance().isReady());return(0,t.useEffect)(()=>
1{if(!e)return s.getInstance().subscribe(e=>{o(e)})},[e]),{ready:i,convert:(0,t.useCallback)(async e=>{let t=s.getInstance();return await t.ensureReady(),o(!0),new Promise((i,o)=>{if(!t.getWorker())return void o(Error("Worker not initialized"));let a=t.getNextId();t.addPendingRequest(a,{resolve:e=>i(new Blob([e],{type:"application/vnd.ms-package.3dmanufacturing-3dmodel+xml"})),reject:o});let r=new Float32Array(e.positions).buffer,s=new Uint32Array(e.indices).buffer,n={positions:r,indices:s},l=[r,s];if(e.triangleColors){let t=new Uint32Array(e.triangleColors).buffer;n.triangleColors=t,l.push(t)}if(e.paletteColors){let t=new Uint32Array(e.paletteColors).buffer;n.paletteColors=t,l.push(t)}if(e.paintColorStrings&&e.paintColorStrings.length>0){let t=e.paintColorStrings,i=new Uint32Array(t.length),o=0;for(let e=0;e<t.length;e++){let a=t[e]||"";i[e]=a.length,o+=a.length}let a=new TextEncoder,r=new Uint8Array(o),s=0;for(let e of t){let t=a.encode(e);r.set(t,s),s+=t.length}n.paintColorStrings=r.buffer,n.paintColorLengths=i.buffer,l.push(r.buffer,i.buffer)}if(e.textureData&&e.uvs&&e.paletteSlotLut){let t=new Uint8Array(e.textureData).buffer;n.textureData=t,n.textureWidth=e.textureWidth,n.textureHeight=e.textureHeight,l.push(t);let i=new Float32Array(e.uvs).buffer;n.uvs=i,l.push(i);let o=new Uint8Array(e.paletteSlotLut).buffer;n.paletteSlotLut=o,l.push(o),n.faceCount=e.faceCount,n.maxDepth=e.maxDepth??3}let d={targetHeightMeters:e.targetHeightMeters??0,originMode:e.originMode??1,precision:e.precision??4};e.printerProfile&&(d.printer={brand:e.printerProfile.brandId,model:e.printerProfile.modelName,nozzle:e.printerProfile.nozzleDiameter}),t.postMessage({type:"convert",id:a,geometry:n,options:d},l)})},[]),prewarm:(0,t.useCallback)(()=>{s.getInstance().ensureReady().catch(()=>{})},[])}}])},370062,e=>{"use strict";var t=e.i(191476),i=e.i(614484),o=e.i(612276),a=e.i(436890);e.i(817858);var r=e.i(392528),s=e.i(935052),n=e.i(680307);e.s(["useSWRMutation",0,(e,{onError:l,customErrorMessages:d,moderationSurface:c,moderationTaskId:u,key:h,...p}={})=>{let m=(0,n.useRequestError)();return(0,o.default)(h||("function"==typeof e?e().url:e.url)||null,async(o,{arg:n})=>{let l="function"==typeof e?e(n):e;try{let{data:t}=await (0,a.axiosSingleton)({throwErrorOnNoToken:!0,...l,data:"function"==typeof e?l.data:{...l.data,...n}});if((0,r.isAPIResponse)(t))return t.result;return t}catch(e){if(e instanceof t.AxiosError){if(e.response)throw new r.ApiError({code:(0,r.isAPIResponse)(e.response.data)?e.response.data.code:r.ApiCode.UNKNOWN,message:(0,r.isAPIResponse)(e.response.data)&&(0,i.isString)(e.response.data.result)?e.response.data.result:"",status:e.response.status,url:e.response.config.url,rawResponse:e.response,rawData:e.response.data});if(e.code===t.AxiosError.ECONNABORTED||e.code===t.AxiosError.ETIMEDOUT)throw new s.RequestTimeoutError({timeout:l.timeout??0,url:l.url??""})}throw e}},{onError:(e,t,i)=>{m(e,{apiCodeMessageMap:d,moderationSurface:c,moderationTaskId:u}),l?.(e,t,i)},...p,..."throwOnError"in p&&p.throwOnError?{throwOnError:!0}:{throwOnError:!1}})}])},843944,e=>{"use strict";var t=e.i(266027),i=e.i(114828),o=e.i(948148),a=e.i(271645),r=e.i(370062),s=e.i(368709),n=e.i(21930);e.i(817858);var l=e.i(392528),d=e.i(436890);let c=["tasks-downloadable-status"];e.s(["downloadableStatusQueryKey",0,c,"useDownloadTaskV2",0,(e,t="Task",i,a={})=>{let s=(0,o.useTranslations)();return(0,r.useSWRMutation)(o=>({method:"get",url:`${d.MeshyAPIPrefixesEnum.TasksV2}/${e}/asset-url`,params:{type:t,...o,..."Showcase"===t&&i?{source:i}:{}},needsToken:!0,timeout:18e4}),{...a.throwOnError?{throwOnError:!0}:{},customErrorMessages:{[l.ApiCode.LIMIT_EXCEEDED]:s("Workspace.Shared.DownloadDialog.LimitExceeded"),[l.ApiCode.UNKNOWN]:s("Workspace.Shared.DownloadDialog.DownloadFailed")},moderationTaskId:e})},"useDownloadableLimitStatus",0,({taskId:e,type:o="Task"},r={})=>{let l=(0,n.useQueryClient)(),c=(0,t.useQuery)({queryKey:["tasks-downloadable-status",o,e],queryFn:()=>(0,s.fetchApi)({url:`${d.MeshyAPIPrefixesEnum.TasksV2}/${e}/downloadable-status`,params:{type:o}}).then(e=>{let t=e.data.result,i=t.totalLimit;return{...t,totalLimit:"Unlimited"===i?1/0:Number(i)||0}}),refetchOnMount:!1,enabled:!!e&&(r.enabled??!0)}),u=(0,i.useMemoizedFn)(e=>{let t=c.data;["LimitedByFreeCount","LimitedByStarterCount"].includes(t?.downloadableStatus??"")&&l.setQueriesData({queryKey:["tasks-downloadable-status",o],predicate(e){let i=e.state.data;return i?.downloadableStatus===t?.downloadableStatus&&typeof i?.premiumQuota==typeof t?.premiumQuota}},t=>{if(t)return{...t,...e}})});return(0,a.useEffect)(()=>{u({count:c?.data?.count??0,premiumQuota:c?.data?.premiumQuota})},[u,c?.data?.count,c?.data?.premiumQuota]),c},"useInvalidateDownloadableStatus",0,()=>{let e=(0,n.useQueryClient)();return(0,i.useMemoizedFn)(()=>
1{e.invalidateQueries({queryKey:c})})},"useMultiDownloadTaskV2",0,e=>{let t=(0,o.useTranslations)();return(0,r.useSWRMutation)({method:"post",url:`${d.MeshyAPIPrefixesEnum.TasksV2}/batch-assets-url`,needsToken:!0},{customErrorMessages:{[l.ApiCode.LIMIT_EXCEEDED]:t("Workspace.Shared.DownloadDialog.LimitExceeded"),[l.ApiCode.UNKNOWN]:t("Workspace.Shared.DownloadDialog.DownloadFailed")}})}])},607115,345456,e=>{"use strict";var t=e.i(394744),i=e.i(368709),o=e.i(812705);e.i(817858);var a=e.i(392528);let r=(0,o.createLogger)({tag:"client-error"});async function s(e,t,{countQuota:o}={}){try{await (0,i.fetchApi)({method:"POST",url:`/v2/tasks/${e}/mark-downloaded`,data:{format:t,count_quota:o}})}catch(i){r.error("mark-downloaded: failed",{taskId:e,format:t},i)}}e.s(["markTaskDownloaded",0,s],345456);let n=(0,o.createLogger)({tag:"client-error"}),l=[402,403,429];async function d(e,o,{intent:r,countOnFailOpen:c=!0}={}){for(let d=0;;d++)try{return await (0,i.fetchApi)({method:"POST",url:`/v2/tasks/${e}/reserve-download`,data:{format:o,...r&&{intent:r}}}),!0}catch(i){if(i instanceof a.ApiError){if(i.code===a.ApiCode.DEVICE_KICKED)return!0;if(429===i.status&&0===d){await (0,t.sleep)(400);continue}if(l.includes(i.status??0))return n.warn("reserve-download: refused",{taskId:e,format:o,code:i.code,status:i.status}),!1}return n.error("reserve-download: unavailable, counting after the fact",{taskId:e,format:o},i),c&&await s(e,o,{countQuota:!0}),!0}}async function c({taskId:e,format:t,downloadableType:i,countedByAssetUrl:o=!1,intent:a}){let r=function({downloadableType:e,countedByAssetUrl:t=!1}){return"Showcase"!==e&&!t}({downloadableType:i,countedByAssetUrl:o});return a?d(e,t,{intent:a,countOnFailOpen:r}):!r||d(e,t)}e.s(["reserveClientExportQuota",0,c],607115)},88632,e=>{"use strict";var t=e.i(843476),i=e.i(948148),o=e.i(271645),a=e.i(745183),r=e.i(843944);e.s(["useDownloadLimitFeature",0,({taskId:e,type:s="Task",enabled:n=!0,paywallWhenUnknown:l=!0})=>{let d=(0,i.useTranslations)(),{data:c,isUnresolved:u}=(0,a.useTier)(),h=!u&&("free"===c.tier||"anonymous"===c.tier),p=!u&&"starter"===c.tier,m=h||p,{data:g,refetch:f,isError:x}=(0,r.useDownloadableLimitStatus)({taskId:e,type:s},{enabled:n&&m}),{downloadableStatus:b=h&&l?"Forbidden":"Full",totalLimit:T=0,count:w=0,premiumQuota:y}=(m?g:void 0)||{},k=T+(y||0),S=k-w,v=!m||void 0!==g||x,{limited:C,tooltip:D}=(0,o.useMemo)(()=>{let e=S<=0;switch(b){case"Full":default:return{limited:!1,tooltip:""};case"Forbidden":return{limited:!0,tooltip:"Showcase"===s?d("Workspace.Shared.Showcase.Download.Tooltip.Forbidden"):d.rich("Workspace.Shared.Task.Download.Tooltip.LimitNewModelLite",{count:10})};case"LimitedByStarterCount":return{limited:e,tooltip:d.rich("Workspace.Shared.Task.Download.Tooltip.LimitedByStarterCount",{scene:"Showcase"===s?"community":"",count:S,extra:()=>"number"==typeof y&&y>0?(0,t.jsxs)("span",{children:[", plus"," ",(0,t.jsx)("strong",{className:"text-accent-base font-normal",children:y})," ",1===y?"time":"times"," for permanent downloads."]}):".",strong:()=>(0,t.jsx)("strong",{className:"text-accent-base font-normal",children:S})})};case"LimitedByFreeCount":if(e)return{limited:!0,tooltip:d("Workspace.Shared.Task.Download.Tooltip.NoRemaining")};if("number"==typeof y&&y>0)return{limited:!1,tooltip:d.rich("Workspace.Shared.Task.Download.Tooltip.FreePremiumQuotaLite",{count:S,strong:()=>(0,t.jsx)("strong",{className:"text-accent-base font-normal",children:S})})};return{limited:!1,tooltip:d.rich("Workspace.Shared.Task.Download.Tooltip.NewRemainingLite",{count:S,strong:()=>(0,t.jsx)("strong",{className:"text-accent-base font-normal",children:S})})}}},[S,b,d,y,s]);return{refetch:f,isError:x,totalCount:k,totalLimit:T,availableCount:S,limitStatus:b,isResolved:v,limited:C,tooltip:D}}])},86663,e=>{"use strict";var t,i,o=e.i(271645);function a(){return(a=Object.assign.bind()).apply(null,arguments)}e.s(["default",0,function(e){return o.createElement("svg",a({width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),t||(t=o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.17 3.646a.5.5 0 0 1 .707 0l5.477 5.477a.5.5 0 0 1 0 .707l-1.366 1.366a4.373 4.373 0 1 1-6.184-6.184L6.17 3.646Zm.353 1.061L5.508 5.723 5.5 5.73a3.373 3.373 0 1 0 4.77 4.77l.006-.008 1.016-1.015-4.77-4.77Z",fill:"#DEDEDE"})),i||(i=o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.354 10.646a.5.5 0 0 1 0 .707L3.02 13.688a.5.5 0 1 1-.707-.707l2.334-2.334a.5.5 0 0 1 .707 0ZM10.354 2.313a.5.5 0 0 1 0 .707L8.02 5.354a.5.5 0 0 1-.707-.708l2.334-2.333a.5.5 0 0 1 .707 0ZM13.687 5.646a.5.5 0 0 1 0 .708l-2.333 2.333a.5.5 0 1 1-.707-.707l2.333-2.334a.5.5 0 0 1 .707 0Z",fill:"#DEDEDE"})))}])},574156,e=>{"use strict";var t=e.i(843476),i=e.i(956657),o=e.i(403204),a=e.i(513932),r=e.i(948148),s=e.i(271645),n=e.i(136772),l=e.i(711500),d=e.i(472768),c=e.i(691429),u=e.i(233575),h=e.i(593618),p=e.i(930291),m=e.i(187876),g=e.i(800617),f=e.i(787994),x=e.i(991517),b=e.i(537608),T=e.i(490714),w=e.i(671925),y=e.i(814273),k=e.i(763278),S=e.i(82518),v=e.i(851369),C=e.i(433660),D=e.i(758922),N=e.i(423354),I=e.i(975505),E=e.i(358572),j=e.i(70444),L=e.i(726742),R=e.i(32170),_=e.i(235269),P=e.i(514203);e.i(214987);var O=e.i(569660),M=e.i(817683),A=e.i(550896),W=e.i(434296),B=e.i(740789);e.i(325136);
1var U=e.i(656418),F=e.i(507461),z=e.i(480281);e.i(460195);var G=e.i(410067),K=e.i(315747),q=e.i(293486),$=e.i(7246),Q=e.i(843944),Z=e.i(30737);let V={src:`${G.CDN_BASE_URL}/webapp-assets/workspace/tooltip/dcc-bridge.png`};function H({onOpen:e}){return(0,s.useEffect)(()=>{e().catch(()=>{})},[e]),null}e.s(["usePluginPopover",0,({taskId:e,isAnimation:G,modelName:X,position:Y,premiumPosition:J="dcc_bridge",isExample:ee,activePreviewName:et,animationAction:ei,popoverProps:eo})=>{let ea=(0,r.useTranslations)(),[er,es]=(0,s.useState)(!1),en=(0,P.useCnPluginUpgradeNotice)(),{isAuthenticated:el}=(0,q.useAuthStore)(),ed=(0,$.useDialogStore)(e=>e.getCreditDialogRef),ec=(0,b.useTrack)(),eu=(0,T.useShowcaseTrackingEntry)(),eh=(0,T.usePostEventProperties)(),ep=eh?eu.position??Y:Y,{trigger:em}=(0,Q.useDownloadTaskV2)(e||""),eg=(0,j.useAnimatePanelStore)(e=>e.currentAction),ef=(0,z.useIsWindows)(),ex=ef?void 0:ea("Components.SimReady.WindowsOnly"),eb=G?ea("Workspace.Tool.Plugin.AnimatedNotSupported"):void 0,{isUnsubscribed:eT}=(0,I.usePro)({nonProTiers:I.DCC_PRINT_NON_PRO_TIERS}),ew=()=>{ed.current?.open({position:J,subPosition:"plugin"})},[ey,ek]=(0,s.useState)(!1),[eS,ev]=(0,s.useState)(!1),[eC,eD]=(0,s.useState)(!1),[eN,eI]=(0,s.useState)(!1),[eE,ej]=(0,s.useState)(!1),[eL,eR]=(0,s.useState)(!1),[e_,eP]=(0,s.useState)(!1),[eO,eM]=(0,s.useState)(!1),[eA,eW]=(0,s.useState)(!1),eB=(0,W.useRobloxStore)(e=>"connected"===e.connectionStatus),eU=(0,W.useRobloxStore)(e=>e.bridgeActivated),eF=(0,B.useRobloxUpload)({onCompleted:t=>{ec("send_to_dcc",{dcc:"roblox",task:"model",task_id:e,success:!0,position:ep,...eh}),(0,M.focusBridge)().catch(()=>{})},onFailed:t=>{ec("send_to_dcc",{dcc:"roblox",task:"model",task_id:e,success:!1,position:ep,...eh}),t.error&&C.toast.error(t.error)}}),ez=eF.mutateAsync,eG=eF.isPending||eF.isPolling,eK=e=>{let t=_.DCC_TYPE_TO_SLUG[e]??e;window.open((0,K.withBasePath)(`/integrations/${t}`),"_blank")},eq=(e,t)=>{ec("click_dcc_guide_button",{dcc:e}),window.open(t,"_blank")},e$=async(t,i)=>{let o;if(!el)return void(0,w.redirectToLogin)({source:"workspace_send_to_dcc"});try{if(await en())return}catch{}if("omniverse"===t&&!ef||"zbrush"===t&&G)return;switch(t){case"blender":ek(!0);break;case"godot":ev(!0);break;case"unity":eD(!0);break;case"unreal":eI(!0);break;case"maya":ej(!0);break;case"3DS Max":eR(!0);break;case"omniverse":eP(!0);break;case"zbrush":eM(!0)}let a=null;try{let i=E.dccDefaultFileFormatMap[t];if(!await (0,E.checkDCCServerIsRunning)({dcc:t,t:ea})||"omniverse"===t&&!(a=await F.useSimReadyStore.getState().open({modelName:X??e}))){o=!1;return}let r=("all"===ei&&"usdz"===i?void 0:ei)||et||eg;if(G){let e=await em({format:i,includeAnimation:!0,action:r,includeRiggedCharacter:!0,withoutSkin:!1,framesPerSecond:30,singleFile:!1});e&&"object"==typeof e&&"zipUrl"in e&&(o=await (0,E.sendModelUrlToDCC)({modelUrl:e.zipUrl,dcc:t,fileFormat:i,fileName:X??r??void 0,frameRate:30,simReady:a??void 0,t:ea}))}else{let e=await em({format:i,noZip:!0});e&&"string"==typeof e&&(o=await (0,E.sendModelUrlToDCC)({modelUrl:e,dcc:t,fileFormat:i,fileName:X,simReady:a??void 0,t:ea}))}}catch(e){o=!1,console.error(e)}finally{switch(ec("send_to_dcc",{dcc:t,task:G?"animation":"model",task_id:e,...void 0!==o?{success:o}:{},position:ep,...eh}),t){case"blender":ek(!1);break;case"godot":ev(!1);break;case"unity":eD(!1);break;case"unreal":eI(!1);break;case"maya":ej(!1);break;case"3DS Max":eR(!1);break;case"omniverse":eP(!1);break;case"zbrush":eM(!1)}}},eQ=!!G,eZ=eQ?ea("Workspace.Tool.Plugin.AnimatedNotSupported"):void 0,eV=async()=>{if(eQ)return;if(!el)return void(0,w.redirectToLogin)({source:"workspace_send_to_roblox"});if(eT)return void ew();let t=t=>{ec("send_to_dcc",{dcc:"roblox",task:"model",task_id:e,success:t,position:ep,...eh})},i=W.useRobloxStore.getState();i.activateBridge(),i.setSending(!0);let o=await (0,O.checkRobloxBridgeStatus)();if(!o.bridgeRunning){W.useRobloxStore.getState().setSending(!1),C.toast.error(ea("Workspace.Tool.Plugin.Tooltip.RobloxBridgeNotRunning")),t(!1);return}if(!o.connected){W.useRobloxStore.getState().setSending(!1),W.useRobloxStore.getState().openConnectDialog(),t(!1);return}eW(!0);try{let i=await em({format:"glb"});if(i&&"string"==typeof i){let t=new Date().toISOString().replace(/[-:T]/g,"").slice(0,14),o=`Meshy_${e.slice(0,8)}_${t}`;try{await ez({taskId:e,modelUrl:i,displayName:o,description:"Created with Meshy AI"})}catch(e){console.error(e)}}else t(!1)}catch(e){console.error(e),t(!1)}finally{eW(!1),W.useRobloxStore.getState().setSending(!1)}},eH=()=>{W.useRobloxStore.getState().activateBridge(),W.useRobloxStore.getState().openConnectDialog()},eX=()=>{ee||ec("send_to_dcc_intent",{task_id:e,position:ep,isShowcase:!eh&&"community_showcase_card"===Y,...eh})},eY=e=>{e&&!er&&eX(),es(e)},eJ=({dccType:e,icon:o,label:r,documentationLink:s,isLoading:n,onSendToDCC:d,statusLabel:c,onSwitchAccount:u,disabledReason:h,"data-testid":p})=>(0,t.jsx)(D.default,{title:h,side:"top",sideOffset:8,disabled:!h,children:(0,t.jsx)("div",{className:"group relative w-full",children:(0,t.jsx)(y.default,{"data-testid":p,size:"sm",type:"tertiary",onClick:()=>{h||(eT?ew():d())},className:"group flex w-full justify-start gap-2 py-0.5 pr-1 pl-2 text-sm",icon:o,disabled:n||!!h,children:(0,t.jsxs)("div",{className:"flex w-full items-center justify-between",children:[(0,t.jsxs)("div",{className:"text-label-base flex items-center gap-1 text-xs",children:[r,eT&&(0,t.jsx)(I.BaseProTag,{}),c&&(0,t.jsxs)("span",{className:"text-label-faint text-[10px]",children:["(",c,")"]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[n&&(0,t.jsx)(a.IconLoader2,{width:12,height:12,className:"text-label-base animate-spin"}),!n&&!h&&(0,t.jsxs)("div",{className:"hidden items-center gap-1 group-hover:flex",children:[u&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(D.default,{title:ea("Worksp
1ace.Tool.Plugin.SwitchAccount"),side:"top",sideOffset:8,asChild:!0,children:(0,t.jsx)(y.default,{size:"xs",type:"icon-tertiary",className:"hover:text-label-title hover:bg-transparent",icon:(0,t.jsx)(f.default,{width:16,height:16}),onClick:e=>{e.stopPropagation(),u()}})}),(0,t.jsx)(k.default,{direction:"vertical",className:"h-3 rounded-[2px] border-l-2"})]}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(D.default,{title:ea("Workspace.Tool.Plugin.Tooltip.DownloadPlugin"),side:"top",sideOffset:8,asChild:!0,children:(0,t.jsx)(y.default,{size:"xs",type:"icon-tertiary",className:"hover:text-label-title hover:bg-transparent",icon:(0,t.jsx)(l.default,{width:16,height:16}),onClick:t=>{t.stopPropagation(),eK(e)}})}),(0,t.jsx)(D.default,{title:ea("Workspace.Tool.Plugin.Tooltip.Guide"),side:"top",sideOffset:8,asChild:!0,children:(0,t.jsx)(y.default,{size:"xs",type:"icon-tertiary",className:"hover:text-label-title hover:bg-transparent",icon:(0,t.jsx)(i.IconBook2,{width:16,height:16}),onClick:t=>{t.stopPropagation(),eq(e,s)}})})]})]})]})]})})})}),e0=({hasTitle:e=!0,className:i})=>(0,t.jsxs)("div",{className:(0,Z.cn)("bg-bg-sub border-bg-border flex w-64 min-w-[228px] flex-col rounded-lg border-[0.5px]",i),children:[e&&(0,t.jsxs)("div",{className:"border-bg-border pb-md flex w-full items-center gap-1 border-b px-3 pt-3",children:[(0,t.jsx)("span",{className:"text-sm-plus text-label-title","data-testid":R.TEST_IDS.viewer.dccBridgeTitle,children:ea("Workspace.Tool.Plugin.Tooltip.Title")}),(0,t.jsx)(D.default,{className:"p-2",description:(0,t.jsx)(N.TipImageText,{src:V.src,body:ea("Workspace.Tool.Plugin.Tooltip.info")}),asChild:!0,sideOffset:8,side:"top",children:(0,t.jsx)(o.IconInfoCircleFilled,{size:12,strokeWidth:1.5,className:"text-label-faint"})})]}),(0,t.jsxs)("div",{className:"px-xs py-sm gap-xs flex flex-col",children:[(0,t.jsx)(H,{onOpen:en}),(0,t.jsx)(eJ,{dccType:"zbrush",icon:(0,t.jsx)(x.default,{width:16,height:16}),label:ea("Workspace.Tool.Plugin.Tooltip.ZBrush"),documentationLink:L.ZBRUSH_BRIDGE_DOCUMENTATION_LINK,isLoading:eO,onSendToDCC:()=>e$("zbrush"),disabledReason:eb}),(0,_.isDccAvailable)("roblox")&&(0,t.jsx)(eJ,{dccType:"roblox",icon:(0,t.jsx)(p.default,{width:16,height:16}),label:ea("Workspace.Tool.Plugin.Tooltip.RobloxStudio"),documentationLink:L.ROBLOX_BRIDGE_DOCUMENTATION_LINK,isLoading:eA||eG,onSendToDCC:()=>eV(),onSwitchAccount:eB?eH:void 0,disabledReason:eZ}),(0,t.jsx)(eJ,{dccType:"blender","data-testid":R.TEST_IDS.viewer.dccBridgeBlenderBtn,icon:(0,t.jsx)(n.default,{width:16,height:16}),label:ea("Workspace.Tool.Plugin.Tooltip.Blender"),documentationLink:L.BLENDER_BRIDGE_DOCUMENTATION_LINK,isLoading:ey,onSendToDCC:()=>e$("blender")}),(0,t.jsx)(eJ,{dccType:"godot",icon:(0,t.jsx)(d.default,{width:16,height:16}),label:ea("Workspace.Tool.Plugin.Tooltip.Godot"),documentationLink:L.GODOT_BRIDGE_DOCUMENTATION_LINK,isLoading:eS,onSendToDCC:()=>e$("godot")}),(0,t.jsx)(eJ,{dccType:"unity",icon:(0,t.jsx)(m.default,{width:16,height:16}),label:ea("Workspace.Tool.Plugin.Tooltip.Unity"),documentationLink:L.UNITY_BRIDGE_DOCUMENTATION_LINK,isLoading:eC,onSendToDCC:()=>e$("unity")}),(0,t.jsx)(eJ,{dccType:"unreal",icon:(0,t.jsx)(g.default,{width:16,height:16}),label:ea("Workspace.Tool.Plugin.Tooltip.Unreal"),documentationLink:L.UNREAL_BRIDGE_DOCUMENTATION_LINK,isLoading:eN,onSendToDCC:()=>e$("unreal")}),(0,t.jsx)(eJ,{dccType:"maya",icon:(0,t.jsx)(u.default,{width:16,height:16}),label:ea("Workspace.Tool.Plugin.Tooltip.Maya"),documentationLink:L.MAYA_BRIDGE_DOCUMENTATION_LINK,isLoading:eE,onSendToDCC:()=>e$("maya")}),(0,t.jsx)(eJ,{dccType:"3DS Max",icon:(0,t.jsx)(c.default,{width:16,height:16}),label:ea("Workspace.Tool.Plugin.Tooltip.3DSMax"),documentationLink:L.MAX3DS_BRIDGE_DOCUMENTATION_LINK,isLoading:eL,onSendToDCC:()=>e$("3DS Max")}),(0,t.jsx)(eJ,{dccType:"omniverse",icon:(0,t.jsx)(h.default,{width:16,height:16}),label:ea("Workspace.Tool.Plugin.Tooltip.Omniverse"),documentationLink:L.OMNIVERSE_BRIDGE_DOCUMENTATION_LINK,isLoading:e_,onSendToDCC:()=>e$("omniverse"),disabledReason:ex})]})]}),e1=({dccType:e,icon:o,label:r,documentationLink:s,isLoading:n,onSendToDCC:d,statusLabel:c,onSwitchAccount:u,disabledReason:h,onItemSelect:p})=>(0,t.jsx)(D.default,{title:h,side:"right",sideOffset:8,disabled:!h,children:(0,t.jsx)(S.DropdownMenuItem,{size:"xs",className:"group/plugin w-62 pr-0 text-sm [&>*]:gap-2!",icon:o,label:(0,t.jsxs)("div",{className:"flex w-full items-center justify-between gap-1 pr-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{children:r}),eT&&(0,t.jsx)(I.BaseProTag,{}),c&&(0,t.jsxs)("span",{className:"text-label-faint text-[10px]",children:["(",c,")"]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[n&&(0,t.jsx)(a.IconLoader2,{width:16,height:16,className:"text-label-base animate-spin"}),!n&&!h&&(0,t.jsxs)("div",{className:"hidden items-center gap-1 group-hover/plugin:flex",children:[u&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(D.default,{title:ea("Worksp
1ace.Tool.Plugin.SwitchAccount"),side:"top",sideOffset:8,asChild:!0,children:(0,t.jsx)(y.default,{size:"xs",type:"icon-tertiary",className:"hover:text-label-title hover:bg-transparent",icon:(0,t.jsx)(f.default,{width:16,height:16}),onClick:e=>{e.stopPropagation(),u()}})}),(0,t.jsx)(k.default,{direction:"vertical",className:"h-3 rounded-[2px] border-l-2"})]}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(D.default,{title:ea("Workspace.Tool.Plugin.Tooltip.DownloadPlugin"),side:"top",sideOffset:8,asChild:!0,children:(0,t.jsx)(y.default,{size:"xs",type:"icon-tertiary",className:"hover:text-label-title hover:bg-transparent",icon:(0,t.jsx)(l.default,{width:16,height:16}),onClick:t=>{t.stopPropagation(),eK(e)}})}),(0,t.jsx)(D.default,{title:ea("Workspace.Tool.Plugin.Tooltip.Guide"),side:"top",sideOffset:8,asChild:!0,children:(0,t.jsx)(y.default,{size:"xs",type:"icon-tertiary",className:"hover:text-label-title hover:bg-transparent",icon:(0,t.jsx)(i.IconBook2,{width:16,height:16}),onClick:t=>{t.stopPropagation(),eq(e,s)}})})]})]})]})]}),disabled:n||!!h,onSelect:t=>{t?.preventDefault(),h||(p?.(e),eX(),eT?ew():d())}})});return{popoverComponent:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(v.Popover,{open:er,onOpenChange:eY,...eo,children:e0({})}),eU&&(0,t.jsx)(A.RobloxDialogsProvider,{}),(0,t.jsx)(U.SimReadyDialogsProvider,{})]}),openPopover:()=>{eY(!0)},closePopover:()=>{es(!1)},open:er,renderPluginContent:e0,renderPluginDropdownContent:({className:e,onItemSelect:i})=>(0,t.jsxs)("div",{className:(0,Z.cn)("flex flex-col",e),children:[(0,t.jsx)(e1,{onItemSelect:i,dccType:"zbrush",icon:(0,t.jsx)(x.default,{width:20,height:20,className:"text-label-muted group-hover/item:text-label-title"}),label:ea("Workspace.Tool.Plugin.Tooltip.ZBrush"),documentationLink:L.ZBRUSH_BRIDGE_DOCUMENTATION_LINK,isLoading:eO,onSendToDCC:()=>e$("zbrush"),disabledReason:eb}),(0,_.isDccAvailable)("roblox")&&(0,t.jsx)(e1,{onItemSelect:i,dccType:"roblox",icon:(0,t.jsx)(p.default,{width:20,height:20,className:"text-label-muted group-hover/item:text-label-title"}),label:ea("Workspace.Tool.Plugin.Tooltip.RobloxStudio"),documentationLink:L.ROBLOX_BRIDGE_DOCUMENTATION_LINK,isLoading:eA||eG,onSendToDCC:()=>eV(),onSwitchAccount:eB?eH:void 0,disabledReason:eZ}),(0,t.jsx)(e1,{onItemSelect:i,dccType:"blender",icon:(0,t.jsx)(n.default,{width:20,height:20,className:"text-label-muted group-hover/item:text-label-title"}),label:ea("Workspace.Tool.Plugin.Tooltip.Blender"),documentationLink:L.BLENDER_BRIDGE_DOCUMENTATION_LINK,isLoading:ey,onSendToDCC:()=>e$("blender")}),(0,t.jsx)(e1,{onItemSelect:i,dccType:"godot",icon:(0,t.jsx)(d.default,{width:20,height:20,className:"text-label-muted group-hover/item:text-label-title"}),label:ea("Workspace.Tool.Plugin.Tooltip.Godot"),documentationLink:L.GODOT_BRIDGE_DOCUMENTATION_LINK,isLoading:eS,onSendToDCC:()=>e$("godot")}),(0,t.jsx)(e1,{onItemSelect:i,dccType:"unity",icon:(0,t.jsx)(m.default,{width:20,height:20,className:"text-label-muted group-hover/item:text-label-title"}),label:ea("Workspace.Tool.Plugin.Tooltip.Unity"),documentationLink:L.UNITY_BRIDGE_DOCUMENTATION_LINK,isLoading:eC,onSendToDCC:()=>e$("unity")}),(0,t.jsx)(e1,{onItemSelect:i,dccType:"unreal",icon:(0,t.jsx)(g.default,{width:20,height:20,className:"text-label-muted group-hover/item:text-label-title"}),label:ea("Workspace.Tool.Plugin.Tooltip.Unreal"),documentationLink:L.UNREAL_BRIDGE_DOCUMENTATION_LINK,isLoading:eN,onSendToDCC:()=>e$("unreal")}),(0,t.jsx)(e1,{onItemSelect:i,dccType:"maya",icon:(0,t.jsx)(u.default,{width:20,height:20,className:"text-label-muted group-hover/item:text-label-title"}),label:ea("Workspace.Tool.Plugin.Tooltip.Maya"),documentationLink:L.MAYA_BRIDGE_DOCUMENTATION_LINK,isLoading:eE,onSendToDCC:()=>e$("maya")}),(0,t.jsx)(e1,{onItemSelect:i,dccType:"3DS Max",icon:(0,t.jsx)(c.default,{width:20,height:20,className:"text-label-muted group-hover/item:text-label-title"}),label:ea("Workspace.Tool.Plugin.Tooltip.3DSMax"),documentationLink:L.MAX3DS_BRIDGE_DOCUMENTATION_LINK,isLoading:eL,onSendToDCC:()=>e$("3DS Max")}),(0,t.jsx)(e1,{onItemSelect:i,dccType:"omniverse",icon:(0,t.jsx)(h.default,{width:20,height:20,className:"text-label-muted group-hover/item:text-label-title"}
1),label:ea("Workspace.Tool.Plugin.Tooltip.Omniverse"),documentationLink:L.OMNIVERSE_BRIDGE_DOCUMENTATION_LINK,isLoading:e_,onSendToDCC:()=>e$("omniverse"),disabledReason:ex})]}),trackSendToDccIntent:eX}}])}]);

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.