@volter/editor 0.5.57 → 0.5.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BUNDLED_NOTICES +6 -6
- package/dist/.vite/manifest.json +228 -228
- package/dist/assets/{AudioViewer-DILwc7Pt.js → AudioViewer-CEfg6soG.js} +1 -1
- package/dist/assets/{EntityModelDocument-DVlDQ_IJ.js → EntityModelDocument-rBweka7M.js} +1 -1
- package/dist/assets/{EnvironmentAssetDocument-BVGDJjW4.js → EnvironmentAssetDocument-VgR_on1P.js} +1 -1
- package/dist/assets/{GameplaySessionTimeline-X_nMT8Sa.js → GameplaySessionTimeline-B9v8LIxV.js} +1 -1
- package/dist/assets/{ImageViewer-D-aZoyr1.js → ImageViewer-CvnifCXj.js} +1 -1
- package/dist/assets/{InspectorObjectPreview-CpHEw6QH.js → InspectorObjectPreview-gbDaFcDe.js} +1 -1
- package/dist/assets/{JsonAssetDocument-CLVN1V9Z.js → JsonAssetDocument-B-ze7id8.js} +1 -1
- package/dist/assets/{ModelAssetDocument-C60lQ11c.js → ModelAssetDocument-NDTeB7b_.js} +1 -1
- package/dist/assets/{NonThreeAuthoringBootstrap-D8oHDftw.js → NonThreeAuthoringBootstrap-D1oTrvVk.js} +2 -2
- package/dist/assets/{Object3DPreview-CSmLPKkk.js → Object3DPreview-DvXwCq08.js} +2 -2
- package/dist/assets/{OnlineAssetDetail-D8wVVoay.js → OnlineAssetDetail-GdHcOske.js} +2 -2
- package/dist/assets/{SourceAssetViewer-BcOCJ2ye.js → SourceAssetViewer-C0qk5wJl.js} +2 -2
- package/dist/assets/{StageHost-B_YrFNiC.js → StageHost-BU-t7Wwj.js} +4 -4
- package/dist/assets/{ToolObject3DPreview-Crowr7IN.js → ToolObject3DPreview-CP6YmA70.js} +1 -1
- package/dist/assets/{TransientHint-GNwuzA4c.js → TransientHint-Rw3wxMUO.js} +1 -1
- package/dist/assets/{VideoViewer-CjQ4P9AJ.js → VideoViewer-D8aW7n4N.js} +1 -1
- package/dist/assets/{asset-editor-persistence-D3Yy77wZ.js → asset-editor-persistence-COlYs9e4.js} +1 -1
- package/dist/assets/blender-emscripten-engine-BkrPLmPf.js +2 -0
- package/dist/assets/{blender-node-editor.document-BfvoBocD.js → blender-node-editor.document-DtaO2jAu.js} +1 -1
- package/dist/assets/{blender-outliner-model-B8b00oxr.js → blender-outliner-model-CfXIMSXz.js} +1 -1
- package/dist/assets/{blender-properties-tab-0M780SHF.js → blender-properties-tab-DYiaVS6T.js} +3 -3
- package/dist/assets/blender-runtime-host-DGe1KLVZ.js +4 -0
- package/dist/assets/{blender-runtime-skin-DcwXD-m8.js → blender-runtime-skin-CBll8ovN.js} +3 -3
- package/dist/assets/blender-runtime.document-CStrnPJb.js +8 -0
- package/dist/assets/{blender-timeline.document-RtHIpbT1.js → blender-timeline.document-WjHuKO96.js} +1 -1
- package/dist/assets/{blender-uv-editor.document-ChwaS3BG.js → blender-uv-editor.document-CsjAI-Lc.js} +1 -1
- package/dist/assets/{blender-version.status-Bnhf8h1I.js → blender-version.status-BcaIEqih.js} +1 -1
- package/dist/assets/{blender-wali-engine-C7bet0ss.js → blender-wali-engine-Dtwixi7B.js} +1 -1
- package/dist/assets/{blender.command-BCCEp0kb.js → blender.command-B9Qf17Yr.js} +1 -1
- package/dist/assets/{browserAll-Do0ehj3Q.js → browserAll-DAbE1efB.js} +1 -1
- package/dist/assets/{edit-mode-authoring-BX4IRQq9.js → edit-mode-authoring-BBWCwYeE.js} +1 -1
- package/dist/assets/{hosted-asset-materialization-BK7DHisS.js → hosted-asset-materialization-CvAt4P7_.js} +1 -1
- package/dist/assets/{index-5av5LJja.js → index-CY4oDLhJ.js} +348 -348
- package/dist/assets/{models.finder-Bm1YfG95.js → models.finder-CZNTvr_w.js} +1 -1
- package/dist/assets/{product-Ywxte8eQ.js → product-Dr7coa2h.js} +1 -1
- package/dist/assets/{properties-bone-constraints.inspector-Ck0Hzlvr.js → properties-bone-constraints.inspector-DBAuXqr4.js} +1 -1
- package/dist/assets/{properties-bone.inspector-B8M42o0V.js → properties-bone.inspector-C_F8SxhT.js} +1 -1
- package/dist/assets/{properties-collection.inspector-D-RSO5zy.js → properties-collection.inspector-C1DLm9eT.js} +1 -1
- package/dist/assets/{properties-constraints.inspector-DbJa57oa.js → properties-constraints.inspector-BySUEgAb.js} +1 -1
- package/dist/assets/{properties-data.inspector-DLgjbRW6.js → properties-data.inspector-BOvrvedq.js} +1 -1
- package/dist/assets/{properties-material.inspector-B11LZYDW.js → properties-material.inspector-CGJmh_QM.js} +1 -1
- package/dist/assets/{properties-modifiers.inspector-BCWwuA26.js → properties-modifiers.inspector-xnsQ1ddN.js} +1 -1
- package/dist/assets/{properties-object.inspector-UZVJG49S.js → properties-object.inspector-BOEEbStu.js} +1 -1
- package/dist/assets/{properties-output.inspector-XOwcBits.js → properties-output.inspector-NXZnMx4l.js} +1 -1
- package/dist/assets/{properties-particles.inspector-By04vT7R.js → properties-particles.inspector-D6D1g8l3.js} +1 -1
- package/dist/assets/{properties-physics.inspector-D3T7FLdg.js → properties-physics.inspector-DoPfj0an.js} +1 -1
- package/dist/assets/{properties-render.inspector-Y0Rjr9gZ.js → properties-render.inspector-Cvnkkapn.js} +1 -1
- package/dist/assets/{properties-scene.inspector-CfyDWB4W.js → properties-scene.inspector-C2mQ8GLM.js} +1 -1
- package/dist/assets/{properties-texture.inspector-AFRsJx6-.js → properties-texture.inspector-DvASuzXS.js} +1 -1
- package/dist/assets/{properties-view-layer.inspector-Co07LAmQ.js → properties-view-layer.inspector-FIxWmUI0.js} +1 -1
- package/dist/assets/{properties-world.inspector-C7T4JocI.js → properties-world.inspector-BfopwUSa.js} +1 -1
- package/dist/assets/{react-story-board-vrmj74Ng.js → react-story-board-DBO76grK.js} +1 -1
- package/dist/assets/{react-three-rapier.esm-D874pLFD.js → react-three-rapier.esm-Cj4NtDam.js} +1 -1
- package/dist/assets/{session-1bPxsLdy.js → session-Dv4dTRLk.js} +180 -22
- package/dist/assets/{spark.module-D1CUMLYS.js → spark.module-BOFvGTtp.js} +1 -1
- package/dist/assets/{stage-keyboard-Cx90EYIT.js → stage-keyboard-BsKOZggP.js} +1 -1
- package/dist/assets/{stage-overlay-set-duu3P0mZ.js → stage-overlay-set-bQwh25SV.js} +1 -1
- package/dist/assets/{stage-presence-markers-DKH3p_ao.js → stage-presence-markers-CALnBqqb.js} +1 -1
- package/dist/assets/{story-capture-Dqurwlhr.js → story-capture-BLVE1Bck.js} +1 -1
- package/dist/assets/{story-pixi-preview-c78Aygdi.js → story-pixi-preview-B1LxWTHx.js} +1 -1
- package/dist/assets/{story-three-preview-CbZo5B3D.js → story-three-preview-CsjJKTcf.js} +2 -2
- package/dist/assets/{webworkerAll-iMzrvNir.js → webworkerAll-dq7Pw9V8.js} +1 -1
- package/dist/assets/worker-29OHwCKe.js +2 -0
- package/dist/assets/{world-documents-CGbrcsYk.js → world-documents-PX5fRvVn.js} +1 -1
- package/dist-node/cli.js +9 -9
- package/package.json +9 -9
- package/dist/assets/blender-emscripten-engine-C_uFxIuO.js +0 -2
- package/dist/assets/blender-runtime-host-D8NHsAfD.js +0 -4
- package/dist/assets/blender-runtime.document-BixTvrw8.js +0 -7
- package/dist/assets/worker-DTgfRRas.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as o}from"./jsx-runtime-DPjLkJKQ.js";import{Object3DPreview as d}from"./Object3DPreview-
|
|
1
|
+
import{a as o}from"./jsx-runtime-DPjLkJKQ.js";import{Object3DPreview as d}from"./Object3DPreview-DvXwCq08.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-CY4oDLhJ.js";import"./index-DaQZGF7d.js";import"./index-D_NuPfjr.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-D2LwEE0L.js";import"./client-DNXj_opT.js";import"./three.module-BynznMJN.js";import"./OrbitControls-BHxt84w6.js";import"./editor-presentation-activity-C7SNSmTd.js";function F({build:r,displayName:e="Object3D preview",height:m=360,background:p,showSkeleton:s=!1,cameraDirection:n,showGrid:c,useDefaultLighting:u,exposure:a,setupPreview:t,active:j=!0}){const i=t!==void 0;return o.jsx("div",{style:{width:"100%",height:m,minHeight:240},children:o.jsx(d,{sourceFactory:r,displayName:e,active:j,showSkeleton:s,background:p,cameraDirection:n,showGrid:c??!i,useDefaultLighting:u??!i,exposure:a,setupPreview:t})})}export{F as ToolObject3DPreview};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./jsx-runtime-DPjLkJKQ.js";import{r as i}from"./index-DaQZGF7d.js";import"./index-CtzuWnCS.js";import{E as s,F as n,G as o,t,H as r}from"./index-
|
|
1
|
+
import{a}from"./jsx-runtime-DPjLkJKQ.js";import{r as i}from"./index-DaQZGF7d.js";import"./index-CtzuWnCS.js";import{E as s,F as n,G as o,t,H as r}from"./index-CY4oDLhJ.js";import"./index-D2LwEE0L.js";function x(){const e=i.useSyncExternalStore(s,n,n);return e?a.jsx("div",{role:"status","aria-live":"polite","data-testid":"transient-hint",style:{position:"absolute",left:"50%",bottom:r[6],transform:"translateX(-50%)",maxWidth:"min(440px, 80%)",padding:`${r[3]}px ${r[5]}px`,borderRadius:t.shape.medium,border:`1px solid ${t.boundary.strong}`,background:t.surface.overlay,color:t.content.primary,fontSize:"var(--vgai-font-base)",lineHeight:1.4,textAlign:"center",pointerEvents:"none",zIndex:o.toast},children:e.message},e.id):null}export{x as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t}from"./jsx-runtime-DPjLkJKQ.js";import{r}from"./index-DaQZGF7d.js";import"./index-CtzuWnCS.js";import{T as c,q as x}from"./index-
|
|
1
|
+
import{a as t}from"./jsx-runtime-DPjLkJKQ.js";import{r}from"./index-DaQZGF7d.js";import"./index-CtzuWnCS.js";import{T as c,q as x}from"./index-CY4oDLhJ.js";import"./index-D2LwEE0L.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";import"./client-DNXj_opT.js";import"./three.module-BynznMJN.js";function W({assetPath:s}){const[p,a]=r.useState(!1),[d,m]=r.useState(null),i=s;r.useEffect(()=>{a(!1)},[i]);const n=s.split("/").pop()??s,l=r.useCallback(e=>{if(e){if(e.error){a(!0);return}e.videoWidth<=0||m(o=>o&&o.w===e.videoWidth&&o.h===e.videoHeight?o:{w:e.videoWidth,h:e.videoHeight})}},[]);return t.jsxs("div",{"data-testid":"video-asset-document",style:{height:"100%",minHeight:240,display:"flex",flexDirection:"column",minWidth:0},children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"6px 8px"},children:[t.jsx(c,{tone:"dim",variant:"label",children:n}),d&&t.jsxs(c,{tone:"muted",variant:"code",children:[d.w," × ",d.h]})]}),t.jsx("div",{className:"vgai-asset-transparency-well",style:{flex:1,minHeight:0,display:"flex",alignItems:"center",justifyContent:"center",padding:12},children:p?t.jsxs("div",{style:{color:x[2],fontSize:12,textAlign:"center"},children:[n," could not be played from ",i,". The file may be missing, or its codec may not be one this browser decodes."]}):t.jsx("video",{src:i,controls:!0,playsInline:!0,preload:"metadata",ref:l,onError:()=>a(!0),onLoadedMetadata:e=>l(e.currentTarget),style:{maxWidth:"100%",maxHeight:"100%",display:"block"}},i)})]})}export{W as VideoViewer};
|
package/dist/assets/{asset-editor-persistence-D3Yy77wZ.js → asset-editor-persistence-COlYs9e4.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as v,r as h,h as g,w as l,i as m,j as k}from"./index-
|
|
1
|
+
import{f as v,r as h,h as g,w as l,i as m,j as k}from"./index-CY4oDLhJ.js";const p=new WeakMap;function w(e){typeof window>"u"||(window.dispatchEvent(new CustomEvent("editor:assets-changed",{detail:{paths:[u(e)]}})),window.dispatchEvent(new CustomEvent("editor:asset-mutation",{detail:{type:"change",paths:[u(e)]}})))}function b(e,a){const s=u(a);let n=p.get(e);n||(n=new Map,p.set(e,n));const t=n.get(s);if(t)return t;const d=e.registry.registerProject("project-file",`.vgai/history/imported-assets/${s}`,s.split("/").pop()),r={revision:0,driver:void 0},o=async()=>{const i=await m(s),c=new TextEncoder().encode(i);return{revision:r.revision,contentType:"application/vnd.vgai.asset-history-token",bytes:c,sha256:await k(c)}};return r.driver={descriptor:d,capture:o,preflight:async i=>{const c=await o();return c.sha256===i.sha256?{ok:!0}:{ok:!1,reason:"content-conflict",actualRevision:r.revision,actualSha256:c.sha256}},restore:async i=>{const c=new TextDecoder().decode(e.snapshots.read(i).bytes);await h(s,c),r.revision++,w(s)},estimateBytes:i=>i.byteLength},e.registerDriver(r.driver),n.set(s,r),r}function f(e){return new TextEncoder().encode(e)}async function j(e,a){if(e.length===0)return;const s=l();if(!s)return;const n=e.map(t=>({entry:t,resource:b(s,t.assetPath)}));try{await s.recordAppliedTransaction({label:a,detail:e.map(t=>u(t.assetPath)).join(", "),resources:n.map(({resource:t})=>t.driver.descriptor.key),scope:"project"},n.map(({entry:t,resource:d})=>({resource:d.driver.descriptor.key,beforeBytes:f(t.beforeToken),afterBytes:f(t.afterToken),contentType:"application/vnd.vgai.asset-history-token"})))}catch(t){const d=await Promise.allSettled(e.map(o=>h(o.assetPath,o.beforeToken)));for(const o of e)w(o.assetPath);const r=d.find(o=>o.status==="rejected");throw r?.status==="rejected"?new Error(`Project history could not record undo/redo and rollback failed: ${r.reason instanceof Error?r.reason.message:String(r.reason)}`):new Error(`Assets were rolled back because project history could not record undo/redo: ${t instanceof Error?t.message:String(t)}`)}}async function E(e,a=`Import ${e.name}`){const s=await v(e);return s.ok&&s.history&&await j([s.history],a),s}function u(e){const a=e.split(/[?#]/,1)[0].replace(/^\/+/,"");if(!a)throw new Error("Project asset path cannot be empty.");return a}function P(e,a){const s=l(),n=u(e);let t=!1;const d=()=>{t||(t=!0,queueMicrotask(()=>{t=!1,a()}))},r=s?g(s).subscribeAll(i=>{i===n&&d()}):()=>{},o=i=>{const c=i.detail?.paths;(!c||c.some(y=>u(y)===n))&&d()};return typeof window<"u"&&window.addEventListener("editor:assets-changed",o),()=>{r(),typeof window<"u"&&window.removeEventListener("editor:assets-changed",o)}}export{E as d,P as s};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{b as u,a as S,S as f,P as m,s as _,o as g}from"./worker-29OHwCKe.js";import{s as F}from"./session-Dv4dTRLk.js";async function O(a){const o=await fetch(a);if(!o.ok)throw new Error(`${a}: HTTP ${o.status}`);const e=await o.text(),r={exports:{}},l=new Function("module","exports","define",`${e}
|
|
2
|
+
return typeof createBlenderModule === 'function' ? createBlenderModule : module.exports;`)(r,r.exports,void 0);if(typeof l!="function")throw new Error("blender_browser.js did not produce a module factory");return l}const R=new TextEncoder;function B(a,o){let e="";for(const r of o.split("/").filter(Boolean))a.FS_createPath(e||"/",r,!0,!0),e+=`/${r}`}function I(a){const o=a.FS;return{readFile:async e=>o.readFile(e),writeFile:async(e,r)=>o.writeFile(e,r),mkdirTree:async e=>o.mkdirTree(e),readdir:async e=>o.readdir(e),stat:async e=>{let r;try{r=o.stat(e)}catch{return null}const i=r.mtime;return{size:r.size,mode:r.mode??0,mtimeMs:typeof i=="number"?i:i?.getTime()??0}},unlink:async e=>o.unlink(e)}}async function k(a,o){if(!self.crossOriginIsolated)throw new Error("Headless Blender needs SharedArrayBuffer, so the editor page has to be cross-origin isolated (Cross-Origin-Opener-Policy: same-origin and Cross-Origin-Embedder-Policy on every response). This worker reports crossOriginIsolated=false.");const e=u("blender_browser.js"),r=await O(e),i=performance.now();let l=null;const s=(t,c)=>{c.startsWith("@@VGAI-READY ")&&(l=c.slice(13)),a.log(c.startsWith("@@VGAI-WARN")||c.startsWith("@@VGAI-ERROR")?"error":"log",c)},n=await r({arguments:["--background","--factory-startup","--python",S],locateFile:t=>u(t),mainScriptUrlOrBlob:e,print:t=>s("log",t),printErr:t=>s("error",t),preRun:[t=>{t.ENV??={},Object.assign(t.ENV,{BLENDER_SYSTEM_RESOURCES:"/bw",BLENDER_SYSTEM_PYTHON:"/bw/python",BLENDER_SYSTEM_SCRIPTS:"/bw/scripts",BLENDER_SYSTEM_DATAFILES:"/bw/datafiles",VGAI_SESSION_ROOT:f,HOME:"/root",TMPDIR:"/tmp"});for(const c of["/tmp","/root","/work",f,...m,a.project])B(t,c);t.FS_createDataFile(f,"session.py",R.encode(F),!0,!0,!0)}]});for(;l===null;)await _(5);const d=performance.now()-i,b=JSON.parse(l);let h=null;if(typeof n.releasePreloadedFileData=="function"){const t=n.releasePreloadedFileData();h=t.bytes,a.log("log",`blender: released the preloaded ${(t.bytes/1048576).toFixed(0)} MB payload (${t.files} files); WasmFS already holds it`)}else a.log("error","blender: this bundle has no releasePreloadedFileData, so the ~55 MB packed .data payload stays resident beside the copy WasmFS made of it — relink with the recipe's --post-js (recipe/release-preloaded-file-data.js).");const p=n.FS;let w="";for(const t of`${a.project}`.split("/").filter(Boolean)){w+=`/${t}`;try{p.chmod(w,511)}catch{}}for(const t of["/work","/tmp","/root",f,...m])try{p.chmod(t,511)}catch{}const y=I(n);p.chmod("/bw/datafiles",493),await T(y);const{request:E}=g(y,a);return{skew:"emscripten",banner:b,files:y,request:E,readArena:async()=>n.HEAPU8.subarray(n._blender_web_export_buffer(),n._blender_web_export_buffer()+n._blender_web_export_buffer_size()),bootMs:d,memoryBytes:()=>n.HEAPU8.length,releasedPayloadBytes:h}}async function T(a){const[o,e]=await Promise.all([fetch(u("essentials.json")),fetch(u("essentials.bin"))]);if(!o.ok||!e.ok)throw new Error(`Blender Essentials assets are missing (${o.status}/${e.status})`);const r=await o.json(),i=await e.arrayBuffer(),l=Array.from(new Uint8Array(await crypto.subtle.digest("SHA-256",i)),s=>s.toString(16).padStart(2,"0")).join("");if(i.byteLength!==r.bytes||l!==r.sha256)throw new Error("Blender Essentials payload does not match its source manifest");for(const s of r.files){if(!s.path||s.path.includes("\\")||s.path.split("/").some(d=>!d||d==="."||d==="..")||!Number.isInteger(s.offset)||!Number.isInteger(s.bytes)||s.offset<0||s.bytes<0||s.offset+s.bytes>i.byteLength)throw new Error(`Invalid Blender Essentials file: ${s.path}`);const n=`/bw/datafiles/assets/${s.path}`;await a.mkdirTree(n.slice(0,n.lastIndexOf("/"))),await a.writeFile(n,new Uint8Array(i,s.offset,s.bytes))}}export{k as startEmscriptenBlenderEngine};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as i}from"./jsx-runtime-DPjLkJKQ.js";import{ah as Ce}from"./index-5av5LJja.js";import{r as T}from"./index-DaQZGF7d.js";import{s as Te,e as Q,f as Ee,n as ee,g as B,i as U,r as we,j as Oe,k as Ie,N as Ne}from"./blender-runtime-host-D8NHsAfD.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-D_NuPfjr.js";import"./index-D2LwEE0L.js";import"./client-DNXj_opT.js";import"./three.module-BynznMJN.js";import"./clip-planes-CnAI6DZn.js";const Re={customSocketOrder:!0,items:[{kind:"input",name:"Image"},{kind:"output",name:"Image",alignWithPrevious:!0},{kind:"input",name:"Factor",identifier:"Fac"},{kind:"input",name:"Type"},{kind:"input",name:"Lift",identifier:"Base Lift"},{kind:"input",name:"Lift",identifier:"Color Lift"},{kind:"input",name:"Gamma",identifier:"Base Gamma"},{kind:"input",name:"Gamma",identifier:"Color Gamma"},{kind:"input",name:"Gain",identifier:"Base Gain"},{kind:"input",name:"Gain",identifier:"Color Gain"},{kind:"input",name:"Offset",identifier:"Base Offset"},{kind:"input",name:"Offset",identifier:"Color Offset"},{kind:"input",name:"Power",identifier:"Base Power"},{kind:"input",name:"Power",identifier:"Color Power"},{kind:"input",name:"Slope",identifier:"Base Slope"},{kind:"input",name:"Slope",identifier:"Color Slope"},{kind:"panel",name:"Input",items:[{kind:"input",name:"Temperature",identifier:"Input Temperature"},{kind:"input",name:"Tint",identifier:"Input Tint"},{kind:"layout"}]},{kind:"panel",name:"Output",items:[{kind:"input",name:"Temperature",identifier:"Output Temperature"},{kind:"input",name:"Tint",identifier:"Output Tint"},{kind:"layout"}]}]},Pe={customSocketOrder:!0,items:[{kind:"input",name:"Image"},{kind:"output",name:"Image",alignWithPrevious:!0},{kind:"input",name:"Mask"},{kind:"panel",name:"Master",items:[{kind:"input",name:"Saturation",identifier:"Master Saturation"},{kind:"input",name:"Contrast",identifier:"Master Contrast"},{kind:"input",name:"Gamma",identifier:"Master Gamma"},{kind:"input",name:"Gain",identifier:"Master Gain"},{kind:"input",name:"Offset",identifier:"Master Offset"}],defaultClosed:!0},{kind:"panel",name:"Highlights",items:[{kind:"input",name:"Saturation",identifier:"Highlights Saturation"},{kind:"input",name:"Contrast",identifier:"Highlights Contrast"},{kind:"input",name:"Gamma",identifier:"Highlights Gamma"},{kind:"input",name:"Gain",identifier:"Highlights Gain"},{kind:"input",name:"Offset",identifier:"Highlights Offset"}],defaultClosed:!0},{kind:"panel",name:"Midtones",items:[{kind:"input",name:"Saturation",identifier:"Midtones Saturation"},{kind:"input",name:"Contrast",identifier:"Midtones Contrast"},{kind:"input",name:"Gamma",identifier:"Midtones Gamma"},{kind:"input",name:"Gain",identifier:"Midtones Gain"},{kind:"input",name:"Offset",identifier:"Midtones Offset"}],defaultClosed:!0},{kind:"panel",name:"Shadows",items:[{kind:"input",name:"Saturation",identifier:"Shadows Saturation"},{kind:"input",name:"Contrast",identifier:"Shadows Contrast"},{kind:"input",name:"Gamma",identifier:"Shadows Gamma"},{kind:"input",name:"Gain",identifier:"Shadows Gain"},{kind:"input",name:"Offset",identifier:"Shadows Offset"}],defaultClosed:!0},{kind:"panel",name:"Tonal Range",items:[{kind:"input",name:"Midtones Start"},{kind:"input",name:"Midtones End"}],defaultClosed:!0},{kind:"panel",name:"Channels",items:[{kind:"input",name:"Red",identifier:"Apply On Red"},{kind:"input",name:"Green",identifier:"Apply On Green"},{kind:"input",name:"Blue",identifier:"Apply On Blue"}],defaultClosed:!0}]},_e={customSocketOrder:!0,items:[{kind:"output",name:"Image"},{kind:"input",name:"Image"},{kind:"input",name:"Factor",identifier:"Fac"},{kind:"input",name:"Spill Channel"},{kind:"input",name:"Limit Method"},{kind:"input",name:"Limit Channel"},{kind:"input",name:"Limit Strength"},{kind:"panel",name:"Spill Strength",items:[{kind:"input",name:"Use Spill Strength",panelToggle:!0},{kind:"input",name:"Strength",identifier:"Spill Strength"}],defaultClosed:!0}]},Me={customSocketOrder:!0,items:[{kind:"input",name:"Image"},{kind:"output",name:"Image",alignWithPrevious:!0},{kind:"output",name:"Plane"},{kind:"input",name:"Upper Left"},{kind:"input",name:"Upper Right"},{kind:"input",name:"Lower Left"},{kind:"input",name:"Lower Right"},{kind:"panel",name:"Sampling",items:[{kind:"input",name:"Interpolation"},{kind:"input",name:"Extension X"},{kind:"input",name:"Extension Y"}],defaultClosed:!0}]},ve={customSocketOrder:!0,items:[{kind:"input",name:"Image"},{kind:"output",name:"Image",alignWithPrevious:!0},{kind:"input",name:"Samples"},{kind:"input",name:"Center"},{kind:"input",name:"Rotation"},{kind:"input",name:"Scale"},{kind:"panel",name:"Translation",items:[{kind:"input",name:"Amount",identifier:"Translation Amount"},{kind:"input",name:"Direction",identifier:"Translation Direction"}]}]},Ae={customSocketOrder:!0,items:[{kind:"input",name:"Image"},{kind:"output",name:"Image",alignWithPrevious:!0},{kind:"input",name:"Displacement"},{kind:"panel",name:"Sampling",items:[{kind:"input",name:"Interpolation"},{kind:"input",name:"Extension X"},{kind:"input",name:"Extension Y"}],defaultClosed:!0}]},be={customSocketOrder:!0,items:[{kind:"input",name:"Image"},{kind:"output",name:"Image",alignWithPrevious:!0},{kind:"output",name:"Glare"},{kind:"output",name:"Highlights"},{kind:"input",name:"Type"},{kind:"input",name:"Quality"},{kind:"panel",name:"Highlights",items:[{kind:"input",name:"Threshold",identifier:"Highlights Threshold"},{kind:"input",name:"Smoothness",identifier:"Highlights Smoothness"},{kind:"panel",name:"Clamp",items:[{kind:"input",name:"Clamp",identifier:"Clamp Highlights",panelToggle:!0},{kind:"input",name:"Maximum",identifier:"Maximum Highlights"}],defaultClosed:!0}],defaultClosed:!0},{kind:"panel",name:"Adjust",items:[{kind:"input",name:"Strength"},{kind:"input",name:"Saturation"},{kind:"input",name:"Tint"}]},{kind:"panel",name:"Glare",items:[{kind:"input",name:"Size"},{kind:"input",name:"Streaks"},{kind:"input",name:"Streaks Angle"},{kind:"input",name:"Iterations"},{kind:"input",name:"Fade"},{kind:"input",name:"Color Modulation"},{kind:"input",name:"Diagonal",identifier:"Diagonal Star"},{kind:"input",name:"Sun Position"},{kind:"input",name:"Jitter"},{kind:"input",name:"Kernel Data Type"},{kind:"input",name:"Kernel",identifier:"Float Kernel"},{kind:"input",name:"Kernel",identifier:"Color Kernel"}]}]},De={customSocketOrder:!0,items:[{kind:"input",name:"Image"},{kind:"output",name:"Image",alignWithPrevious:!0},{kind:"output",name:"Matte"},{kind:"output",name:"Edges"},{kind:"input",name:"Key Color"},{kind:"panel",name:"Preprocess",items:[{kind:"input",name:"Blur Size",identifier:"Preprocess Blur Size"}],defaultClosed:!0},{kind:"panel",name:"Key",items:[{kind:"input",name:"Balance",identifier:"Key Balance"}],defaultClosed:!0},{kind:"panel",name:"Tweak",items:[{kind:"input",name:"Black Level"},{kind:"input",name:"White Level"},{kind:"panel",name:"Edges",items:[{kind:"input",name:"Size",identifier:"Edge Search Size"},{kind:"input",name:"Tolerance",identifier:"Edge Tolerance"}],defaultClosed:!0}],defaultClosed:!0},{kind:"panel",name:"Mask",items:[{kind:"input",name:"Garbage Matte"},{kind:"input",name:"Core Matte"}],defaultClosed:!0},{kind:"panel",name:"Postprocess",items:[{kind:"input",name:"Blur Size",identifier:"Postprocess Blur Size"},{kind:"input",name:"Dilate Size",identifier:"Postprocess Dilate Size"},{kind:"input",name:"Feather Size",identifier:"Postprocess Feather Size"},{kind:"input",name:"Feather Falloff"}],defaultClosed:!0},{kind:"panel",name:"Despill",items:[{kind:"input",name:"Strength",identifier:"Despill Strength"},{kind:"input",name:"Balance",identifier:"Despill Balance"}],defaultClosed:!0}]},Be={customSocketOrder:!0,items:[{kind:"input",name:"Image"},{kind:"output",name:"Image",alignWithPrevious:!0},{kind:"input",name:"UV"},{kind:"panel",name:"Sampling",items:[{kind:"input",name:"Interpolation"},{kind:"input",name:"Extension X"},{kind:"input",name:"Extension Y"}],defaultClosed:!0}]},Le={customSocketOrder:!0,items:[{kind:"output",name:"Mask"},{kind:"layout"},{kind:"input",name:"Size Source"},{kind:"input",name:"Size X"},{kind:"input",name:"Size Y"},{kind:"input",name:"Feather"},{kind:"panel",name:"Motion Blur",items:[{kind:"input",name:"Motion Blur",panelToggle:!0},{kind:"input",name:"Samples",identifier:"Motion Blur Samples"},{kind:"input",name:"Shutter",identifier:"Motion Blur Shutter"}],defaultClosed:!0}]},je={customSocketOrder:!0,items:[{kind:"input",name:"Image"},{kind:"output",name:"Image",alignWithPrevious:!0},{kind:"output",name:"Plane"},{kind:"layout"},{kind:"panel",name:"Motion Blur",items:[{kind:"input",name:"Motion Blur",panelToggle:!0},{kind:"input",name:"Samples",identifier:"Motion Blur Samples"},{kind:"input",name:"Shutter",identifier:"Motion Blur Shutter"}],defaultClosed:!0}]},$e={customSocketOrder:!0,items:[{kind:"input",name:"Image"},{kind:"output",name:"Image",alignWithPrevious:!0},{kind:"input",name:"Angle"},{kind:"panel",name:"Sampling",items:[{kind:"input",name:"Interpolation"},{kind:"input",name:"Extension X"},{kind:"input",name:"Extension Y"}],defaultClosed:!0}]},Fe={customSocketOrder:!0,items:[{kind:"input",name:"Image"},{kind:"output",name:"Image",alignWithPrevious:!0},{kind:"input",name:"Type"},{kind:"input",name:"X"},{kind:"input",name:"Y"},{kind:"input",name:"Frame Type"},{kind:"panel",name:"Sampling",items:[{kind:"input",name:"Interpolation"},{kind:"input",name:"Extension X"},{kind:"input",name:"Extension Y"}],defaultClosed:!0}]},Ge={customSocketOrder:!0,items:[{kind:"input",name:"Image"},{kind:"output",name:"Image",alignWithPrevious:!0},{kind:"layout"},{kind:"input",name:"Frame"},{kind:"input",name:"Invert"},{kind:"panel",name:"Sampling",items:[{kind:"input",name:"Interpolation"},{kind:"input",name:"Extension X"},{kind:"input",name:"Extension Y"}],defaultClosed:!0}]},We={customSocketOrder:!0,items:[{kind:"output",name:"Image"},{kind:"input",name:"String"},{kind:"input",name:"Font"},{kind:"input",name:"Size"},{kind:"panel",name:"Alignment",items:[{kind:"input",name:"Horizontal Alignment"},{kind:"input",name:"Vertical Alignment"}],defaultClosed:!0},{kind:"panel",name:"Wrap",items:[{kind:"input",name:"Wrap",panelToggle:!0},{kind:"input",name:"Width",identifier:"Wrap Width"}],defaultClosed:!0}]},He={customSocketOrder:!0,items:[{kind:"input",name:"Image"},{kind:"output",name:"Image",alignWithPrevious:!0},{kind:"input",name:"X"},{kind:"input",name:"Y"},{kind:"input",name:"Angle"},{kind:"input",name:"Scale"},{kind:"panel",name:"Sampling",items:[{kind:"input",name:"Interpolation"},{kind:"input",name:"Extension X"},{kind:"input",name:"Extension Y"}],defaultClosed:!0}]},Ue={customSocketOrder:!0,items:[{kind:"input",name:"Image"},{kind:"output",name:"Image",alignWithPrevious:!0},{kind:"input",name:"X"},{kind:"input",name:"Y"},{kind:"panel",name:"Sampling",items:[{kind:"input",name:"Interpolation"},{kind:"input",name:"Extension X"},{kind:"input",name:"Extension Y"}],defaultClosed:!0}]},Ye={customSocketOrder:!0,items:[{kind:"output",name:"Matrix"},{kind:"panel",name:"Column 1",items:[{kind:"input",name:"Column 1 Row 1"},{kind:"input",name:"Column 1 Row 2"},{kind:"input",name:"Column 1 Row 3"},{kind:"input",name:"Column 1 Row 4"}],defaultClosed:!0},{kind:"panel",name:"Column 2",items:[{kind:"input",name:"Column 2 Row 1"},{kind:"input",name:"Column 2 Row 2"},{kind:"input",name:"Column 2 Row 3"},{kind:"input",name:"Column 2 Row 4"}],defaultClosed:!0},{kind:"panel",name:"Column 3",items:[{kind:"input",name:"Column 3 Row 1"},{kind:"input",name:"Column 3 Row 2"},{kind:"input",name:"Column 3 Row 3"},{kind:"input",name:"Column 3 Row 4"}],defaultClosed:!0},{kind:"panel",name:"Column 4",items:[{kind:"input",name:"Column 4 Row 1"},{kind:"input",name:"Column 4 Row 2"},{kind:"input",name:"Column 4 Row 3"},{kind:"input",name:"Column 4 Row 4"}],defaultClosed:!0}]},ze={customSocketOrder:!0,items:[{kind:"panel",name:"Column 1",items:[{kind:"output",name:"Column 1 Row 1"},{kind:"output",name:"Column 1 Row 2"},{kind:"output",name:"Column 1 Row 3"},{kind:"output",name:"Column 1 Row 4"}],defaultClosed:!0},{kind:"panel",name:"Column 2",items:[{kind:"output",name:"Column 2 Row 1"},{kind:"output",name:"Column 2 Row 2"},{kind:"output",name:"Column 2 Row 3"},{kind:"output",name:"Column 2 Row 4"}],defaultClosed:!0},{kind:"panel",name:"Column 3",items:[{kind:"output",name:"Column 3 Row 1"},{kind:"output",name:"Column 3 Row 2"},{kind:"output",name:"Column 3 Row 3"},{kind:"output",name:"Column 3 Row 4"}],defaultClosed:!0},{kind:"panel",name:"Column 4",items:[{kind:"output",name:"Column 4 Row 1"},{kind:"output",name:"Column 4 Row 2"},{kind:"output",name:"Column 4 Row 3"},{kind:"output",name:"Column 4 Row 4"}],defaultClosed:!0},{kind:"input",name:"Matrix"}]},Ve={customSocketOrder:!0,items:[{kind:"input",name:"String"},{kind:"output",name:"String",alignWithPrevious:!0},{kind:"input",name:"Characters"},{kind:"input",name:"Whitespace"},{kind:"panel",name:"Limit",items:[{kind:"input",name:"Start"},{kind:"input",name:"End"}],defaultClosed:!0}]},Xe={customSocketOrder:!0,items:[{kind:"output",name:"Topology"},{kind:"input",name:"Bounds Min"},{kind:"input",name:"Bounds Max"},{kind:"input",name:"Resolution X"},{kind:"input",name:"Resolution Y"},{kind:"input",name:"Resolution Z"},{kind:"panel",name:"Min",items:[{kind:"input",name:"Min X"},{kind:"input",name:"Min Y"},{kind:"input",name:"Min Z"}],defaultClosed:!0}]},Ke={customSocketOrder:!0,conditional:!0,items:[{kind:"output",name:"Geometry"},{kind:"input",name:"",identifier:"__extend__main"},{kind:"output",name:"",identifier:"__extend__main",alignWithPrevious:!0},{kind:"panel",name:"Generated",items:[{kind:"separator"},{kind:"input",name:"",identifier:"__extend__generation"},{kind:"output",name:"",identifier:"__extend__generation",alignWithPrevious:!0}]}]},Ze={customSocketOrder:!0,items:[{kind:"output",name:"Names"},{kind:"input",name:"Geometry"},{kind:"panel",name:"Filter Data Type",items:[{kind:"input",name:"Filter Data Type",panelToggle:!0},{kind:"input",name:"Data Type"}]},{kind:"panel",name:"Filter Domain",items:[{kind:"input",name:"Filter Domain",panelToggle:!0},{kind:"input",name:"Domain"}]}]},qe={customSocketOrder:!0,conditional:!0,items:[{kind:"layout"},{kind:"output",name:"Points"},{kind:"output",name:"Value"},{kind:"panel",name:"Voxel Index",items:[{kind:"output",name:"X"},{kind:"output",name:"Y"},{kind:"output",name:"Z"},{kind:"output",name:"Is Tile"},{kind:"output",name:"Extent"}],defaultClosed:!0},{kind:"input",name:"Grid"}]},Je={customSocketOrder:!0,items:[{kind:"output",name:"X"},{kind:"output",name:"Y"},{kind:"output",name:"Z"},{kind:"panel",name:"Tile",items:[{kind:"output",name:"Is Tile"},{kind:"output",name:"Extent X"},{kind:"output",name:"Extent Y"},{kind:"output",name:"Extent Z"}],defaultClosed:!0}]},Qe={customSocketOrder:!0,items:[{kind:"input",name:"Mesh"},{kind:"output",name:"Mesh",alignWithPrevious:!0},{kind:"input",name:"Selection"},{kind:"input",name:"Affect Kind"},{kind:"input",name:"Start Left Offset"},{kind:"input",name:"Start Right Offset"},{kind:"input",name:"End Left Offset"},{kind:"input",name:"End Right Offset"},{kind:"input",name:"Offset"},{kind:"input",name:"Miter"},{kind:"input",name:"Spread"},{kind:"input",name:"Segments"},{kind:"input",name:"Shape"},{kind:"input",name:"Profile"},{kind:"panel",name:"Selections",items:[{kind:"output",name:"Vertex Face"},{kind:"output",name:"Edge Face"},{kind:"output",name:"Outer Edge"},{kind:"output",name:"Mid Edge"}]}]},en={customSocketOrder:!0,items:[{kind:"output",name:"Amplitude"},{kind:"input",name:"Sound"},{kind:"input",name:"Time"},{kind:"input",name:"All Channels"},{kind:"input",name:"Channel"},{kind:"input",name:"Low"},{kind:"input",name:"High"},{kind:"panel",name:"FFT",items:[{kind:"input",name:"FFT Size"},{kind:"input",name:"Window Function"}],defaultClosed:!0}]},nn={customSocketOrder:!0,items:[{kind:"output",name:"Curve Instances"},{kind:"output",name:"Remainder"},{kind:"output",name:"Line"},{kind:"output",name:"Word"},{kind:"output",name:"Pivot Point"},{kind:"input",name:"String"},{kind:"input",name:"Size"},{kind:"input",name:"Font"},{kind:"panel",name:"Alignment",items:[{kind:"input",name:"Align X"},{kind:"input",name:"Align Y"},{kind:"input",name:"Pivot Point"}],defaultClosed:!0},{kind:"panel",name:"Spacing",items:[{kind:"input",name:"Character Spacing"},{kind:"input",name:"Word Spacing"},{kind:"input",name:"Line Spacing"}],defaultClosed:!0},{kind:"panel",name:"Text Box",items:[{kind:"input",name:"Overflow"},{kind:"input",name:"Text Box Width"},{kind:"input",name:"Text Box Height"}],defaultClosed:!0}]},tn={customSocketOrder:!0,conditional:!0,items:[{kind:"input",name:"Target"},{kind:"output",name:"Target",alignWithPrevious:!0},{kind:"output",name:"Transferred Names"},{kind:"panel",name:"Target IDs",items:[],defaultClosed:!0},{kind:"input",name:"Source"},{kind:"panel",name:"Source IDs",items:[],defaultClosed:!0},{kind:"input",name:"Pattern Mode"},{kind:"input",name:"Attribute Names"},{kind:"input",name:"Exclude Names"}]},an={customSocketOrder:!0,items:[{kind:"input",name:"World"},{kind:"output",name:"World",alignWithPrevious:!0},{kind:"input",name:"Delta Time"},{kind:"input",name:"Filter"},{kind:"input",name:"Simulation to World"},{kind:"panel",name:"Solver",items:[{kind:"input",name:"Substeps"},{kind:"input",name:"Constraint Iterations"},{kind:"input",name:"Solver Path"}],defaultClosed:!0},{kind:"panel",name:"Interpolation Range",items:[{kind:"input",name:"Begin"},{kind:"input",name:"End"}],defaultClosed:!0}]},on={customSocketOrder:!0,conditional:!0,items:[{kind:"input",name:"Closure"},{kind:"panel",name:"Interface",items:[{kind:"output",name:"",identifier:"__extend__"},{kind:"input",name:"",identifier:"__extend__"}]}]},rn={customSocketOrder:!0,items:[{kind:"output",name:"BSDF"},{kind:"layout"},{kind:"input",name:"Color"},{kind:"input",name:"Roughness"},{kind:"input",name:"IOR"},{kind:"input",name:"Normal"},{kind:"input",name:"Weight",conditional:!0},{kind:"panel",name:"Thin Film",items:[{kind:"input",name:"Thin Film Thickness"},{kind:"input",name:"Thin Film IOR"}],defaultClosed:!0}]},un={customSocketOrder:!0,items:[{kind:"output",name:"BSDF"},{kind:"layout"},{kind:"input",name:"Base Color"},{kind:"input",name:"Edge Tint"},{kind:"input",name:"IOR"},{kind:"input",name:"Extinction"},{kind:"input",name:"Roughness"},{kind:"input",name:"Anisotropy"},{kind:"input",name:"Rotation"},{kind:"input",name:"Normal"},{kind:"input",name:"Tangent"},{kind:"input",name:"Weight",conditional:!0},{kind:"panel",name:"Thin Film",items:[{kind:"input",name:"Thin Film Thickness"},{kind:"input",name:"Thin Film IOR"}],defaultClosed:!0}]},sn={customSocketOrder:!0,items:[{kind:"output",name:"BSDF"},{kind:"input",name:"Base Color"},{kind:"input",name:"Metallic"},{kind:"input",name:"Roughness"},{kind:"input",name:"IOR"},{kind:"input",name:"Alpha"},{kind:"input",name:"Thin Wall"},{kind:"input",name:"Normal"},{kind:"input",name:"Weight",conditional:!0},{kind:"panel",name:"Diffuse",items:[{kind:"input",name:"Diffuse Roughness"}],defaultClosed:!0},{kind:"panel",name:"Subsurface",items:[{kind:"layout"},{kind:"input",name:"Subsurface Weight"},{kind:"input",name:"Subsurface Radius"},{kind:"input",name:"Subsurface Scale"},{kind:"input",name:"Subsurface IOR"},{kind:"input",name:"Subsurface Anisotropy"}],defaultClosed:!0},{kind:"panel",name:"Specular",items:[{kind:"layout"},{kind:"input",name:"Specular IOR Level"},{kind:"input",name:"Specular Tint"},{kind:"input",name:"Anisotropic"},{kind:"input",name:"Anisotropic Rotation"},{kind:"input",name:"Tangent"}],defaultClosed:!0},{kind:"panel",name:"Transmission",items:[{kind:"input",name:"Transmission Weight"}],defaultClosed:!0},{kind:"panel",name:"Coat",items:[{kind:"input",name:"Coat Weight"},{kind:"input",name:"Coat Roughness"},{kind:"input",name:"Coat IOR"},{kind:"input",name:"Coat Tint"},{kind:"input",name:"Coat Normal"}],defaultClosed:!0},{kind:"panel",name:"Sheen",items:[{kind:"input",name:"Sheen Weight"},{kind:"input",name:"Sheen Roughness"},{kind:"input",name:"Sheen Tint"}],defaultClosed:!0},{kind:"panel",name:"Emission",items:[{kind:"input",name:"Emission Color"},{kind:"input",name:"Emission Strength"}],defaultClosed:!0},{kind:"panel",name:"Thin Film",items:[{kind:"input",name:"Thin Film Thickness"},{kind:"input",name:"Thin Film IOR"}],defaultClosed:!0}]},dn={customSocketOrder:!0,conditional:!0,items:[{kind:"layout"},{kind:"output",name:"Is Hit"},{kind:"output",name:"Self Hit"},{kind:"output",name:"Hit Distance"},{kind:"output",name:"Hit Position"},{kind:"output",name:"Hit Normal"},{kind:"input",name:"Position"},{kind:"input",name:"Direction"},{kind:"input",name:"Length"},{kind:"panel",name:"Attributes",items:[{kind:"input",name:"",identifier:"__extend__"},{kind:"output",name:"",identifier:"__extend__",alignWithPrevious:!0}],defaultClosed:!0}]},ln={customSocketOrder:!0,items:[{kind:"output",name:"Volume"},{kind:"input",name:"Weight",conditional:!0},{kind:"panel",name:"Absorption",items:[{kind:"input",name:"Absorption Coefficients"}]},{kind:"panel",name:"Scatter",items:[{kind:"layout"},{kind:"input",name:"Scatter Coefficients"},{kind:"input",name:"Anisotropy"},{kind:"input",name:"IOR"},{kind:"input",name:"Backscatter"},{kind:"input",name:"Alpha"},{kind:"input",name:"Diameter"}]},{kind:"panel",name:"Emission",items:[{kind:"input",name:"Emission Coefficients"}]}]},mn={CompositorNodeColorBalance:Re,CompositorNodeColorCorrection:Pe,CompositorNodeColorSpill:_e,CompositorNodeCornerPin:Me,CompositorNodeDBlur:ve,CompositorNodeDisplace:Ae,CompositorNodeGlare:be,CompositorNodeKeying:De,CompositorNodeMapUV:Be,CompositorNodeMask:Le,CompositorNodePlaneTrackDeform:je,CompositorNodeRotate:$e,CompositorNodeScale:Fe,CompositorNodeStabilize:Ge,CompositorNodeStringToImage:We,CompositorNodeTransform:He,CompositorNodeTranslate:Ue,FunctionNodeCombineMatrix:Ye,FunctionNodeSeparateMatrix:ze,FunctionNodeTrimString:Ve,GeometryNodeCubeGridTopology:Xe,GeometryNodeForeachGeometryElementOutput:Ke,GeometryNodeGetAttributeNames:Ze,GeometryNodeGridToPoints:qe,GeometryNodeInputVoxelIndex:Je,GeometryNodeMeshBevel:Qe,GeometryNodeSampleSoundFrequencies:en,GeometryNodeStringToCurves:nn,GeometryNodeTransferAttributes:tn,GeometryNodeXPBDSolver:an,NodeEvaluateClosure:on,ShaderNodeBsdfGlass:rn,ShaderNodeBsdfMetallic:un,ShaderNodeBsdfPrincipled:sn,ShaderNodeRaycast:dn,ShaderNodeVolumeCoefficients:ln},I=20,N=1,S=I,O=I/2,D=.2*I,me=.25*I,Z=1.2*I,_=.1*I,pn=.8*I,w=.5,Y=D+w,cn=D+N,ne=2.5,kn=.2,fn=S*.5,z=S*-.5,hn=me,gn=1.5*I,R=11,h={sliderFill:"#4671b2",background:"#1a1a1a",body:"#303030",outline:"#ffffff",outlineAlpha:38/255,select:"#ed5700",active:"#ffffff",wireInner:"#8d8d8d",wire:"#1a1a1a",noodleCurving:4,dashAlpha:.5,text:"#e6e6e6",frame:"#0f0f0f",frameAlpha:204/255},Sn={INPUT:"#82354c",OUTPUT:"#3e232a",CONVERTER:"#246283",COLOR:"#6e6e23",VECTOR:"#3c3c83",FILTER:"#412b51",GROUP:"#374725",INTERFACE:"#1d1d1d",MATTE:"#5a3838",DISTORT:"#3e5a5b",TEXTURE:"#79461d",SHADER:"#2b652b",SCRIPT:"#203c3c",GEOMETRY:"#1d725e",ATTRIBUTE:"#1d2546",NONE:h.body,PATTERN:h.body},xn={VALUE:"#a1a1a1",VECTOR:"#6363c7",RGBA:"#c7c729",SHADER:"#63c763",BOOLEAN:"#cca6d6",INT:"#598c5c",STRING:"#70b3ff",OBJECT:"#ed9e5c",IMAGE:"#633863",GEOMETRY:"#00d6a3",COLLECTION:"#f5f5f5",TEXTURE:"#9e4fa3",MATERIAL:"#eb7582",ROTATION:"#a663c7",MENU:"#666666",MATRIX:"#b83385",BUNDLE:"#4d8080",CLOSURE:"#7d7d3b",FONT:"#635742",SOUND:"#635742",INT_VECTOR:"#5c789c",CUSTOM:"#333333"},yn="#ff00ff",pe=h.wire,Cn="#808080",F=N;function A(e){return e.enabled&&!e.hide}function V(e){const n=e.location[0]??0,a=e.location[1]??0,r=e.width,t=e.outputs.filter(A),o=e.inputs.filter(A);if(e.collapsed){const p=fn,m=p*Math.max(o.length,t.length,2)+D*2,x=a+m/2+z,c=a-m/2+z,k=(g,C)=>{let y=a+p*(g.length-1)*.5+z;return g.map(E=>{const P=M(E,C,C?n+r:n,y,y);return y-=p,P})};return{name:e.name,x:n,yTop:x,yBottom:c,width:r,collapsed:!0,sockets:[...k(t,!0),...k(o,!1)]}}let d=a-S;const u=[],l=(p,m)=>{const x=d;u.push(M(p,m,m?n+r:n,x-O,x)),d=x-S};return(t.length>0||o.length>0)&&(d-=2*_),t.forEach((p,m)=>{m>0&&(d-=_),l(p,!0)}),t.length>0&&o.length>0&&(d-=_),o.forEach((p,m)=>{(m>0||t.length>0)&&m>0&&(d-=_),l(p,!1)}),t.length>0||o.length>0?d-=2*_:d-=O,{name:e.name,x:n,yTop:a,yBottom:Math.min(d,a-2*S),width:r,collapsed:!1,sockets:u}}function M(e,n,a,r,t,o=!1){return{identifier:e.identifier,name:e.label??e.name,type:e.type,shape:e.shape,output:n,linked:e.linked,multiInput:e.multiInput,hideValue:e.hideValue,value:e.value,...e.softMin===void 0?{}:{softMin:e.softMin},...e.softMax===void 0?{}:{softMax:e.softMax},x:a,y:r,rowTop:t,panelCollapsed:o}}function Tn(e,n,a=h.noodleCurving){if(a===0)return[[e[0]+(n[0]-e[0])/3,e[1]+(n[1]-e[1])/3],[e[0]+(n[0]-e[0])*2/3,e[1]+(n[1]-e[1])*2/3]];const r=Math.abs(n[0]-e[0]),t=Math.abs(n[1]-e[1]),o=r===0?Number.POSITIVE_INFINITY:t/r,d=Math.min(1,o*(4.5-.25*a)),u=a*.1*r*d;return[[e[0]+u,e[1]],[n[0]-u,n[1]]]}function K(e){return e.idname==="NodeFrame"?h.frame:e.colorTag==="OUTPUT"&&!e.activeOutput?h.body:Sn[e.colorTag]??h.body}function te(e){return e.useCustomColor?b(e.color):h.body}function b(e){const n=a=>Math.round(Math.min(1,Math.max(0,a))*255).toString(16).padStart(2,"0");return`#${n(e[0]??0)}${n(e[1]??0)}${n(e[2]??0)}`}function ie(e,n){const a=ae(h.background),r=ae(e);return b([r[0]*(1-n)+a[0]*n,r[1]*(1-n)+a[1]*n,r[2]*(1-n)+a[2]*n])}const En=.6,wn=.8,On=.2;function ae(e){const n=Number.parseInt(e.slice(1),16);return[(n>>16&255)/255,(n>>8&255)/255,(n&255)/255]}function G(e){return xn[e]??yn}const oe=O,X=Z/3,re=Z/4,In=I,$={cell:8,reach:4,spread:3.64648,stroke:1},Nn="#000000",Rn=31/255*1.5,j=e=>e.identifier??e.name;function Pn(e,n,a){if(!e.customSocketOrder)return{ok:!1,why:"its declaration does not set use_custom_socket_order, so Blender lays it out the legacy way"};const r=[],t=[],o=l=>{for(const p of l)p.kind==="input"?r.push(j(p)):p.kind==="output"?t.push(j(p)):p.kind==="panel"&&o(p.items)};o(e.items);const d=(l,p,m)=>{if(l.length!==p.length)return`the declaration names ${l.length} ${m}${l.length===1?"":"s"} and the engine reports ${p.length}`;for(let x=0;x<l.length;x++)if(l[x]!==p[x]?.identifier)return`${m} ${x} is "${p[x]?.identifier}" in the engine and "${l[x]}" in the declaration`;return null},u=d(t,a,"output")??d(r,n,"input");return u===null?{ok:!0}:{ok:!1,why:u}}const _n={Socket:2,Separator:.5,Layout:3,PanelHeader:4},Mn={Socket:2,Separator:1,Layout:5,PanelHeader:4,PanelContentEnd:1},vn={Socket:{Socket:1,Separator:0,Layout:2,PanelHeader:3,PanelContentEnd:2},Layout:{Socket:2,Separator:0,Layout:1,PanelHeader:3,PanelContentEnd:2},Separator:{Socket:2,Separator:1,Layout:1,PanelHeader:1,PanelContentEnd:1},PanelHeader:{Socket:4,Separator:3,Layout:3,PanelHeader:5,PanelContentBegin:3,PanelContentEnd:3},PanelContentBegin:{Socket:2,Separator:1,Layout:2,PanelHeader:3,PanelContentEnd:1},PanelContentEnd:{Socket:1,Separator:1,Layout:1,PanelHeader:3,PanelContentEnd:0}};function ce(e,n,a,r,t,o,d){let u=!1;for(const l of e){if(l.kind==="input"||l.kind==="output"){const y=n.get(`${l.kind}:${j(l)}`);if(!y||!A(y)){u=!1;continue}const E=o[o.length-1];if(l.alignWithPrevious===!0&&u&&E&&E.type==="Socket"){o[o.length-1]={type:"Socket",input:l.kind==="input"?y:E.input,output:l.kind==="output"?y:E.output},u=!0;continue}o.push({type:"Socket",input:l.kind==="input"?y:void 0,output:l.kind==="output"?y:void 0}),u=!0;continue}if(u=!1,l.kind==="separator"){o.push({type:"Separator"});continue}if(l.kind==="layout"){r&&o.push({type:"Layout"});continue}if(l.kind!=="panel")continue;const p=l.items[0],m=p&&p.kind==="input"&&p.panelToggle===!0?p:null,x=m?n.get(`input:${j(m)}`)??null:null,c=[],k=y=>{for(const E of y)if(E.kind==="input"||E.kind==="output"){const P=n.get(`${E.kind}:${j(E)}`);P&&c.push(P)}else E.kind==="panel"&&k(E.items)};if(k(l.items),!c.some(A))continue;const g=a(l.defaultClosed===!0),C={name:l.name,depth:t,collapsed:g,toggle:x,owned:c,centerY:0,contentTop:null,contentBottom:null,fillsNodeEnd:!1};d.push(C),o.push({type:"PanelHeader",panel:C}),!g&&(o.push({type:"PanelContentBegin",panel:C}),ce(l.items.filter(y=>y!==m),n,a,r,t+1,o,d),o.push({type:"PanelContentEnd",panel:C}))}}function An(e){const n=e.location[0]??0,a=e.location[1]??0,r=e.width,t=new Map;for(const c of e.inputs)t.set(`input:${c.identifier}`,c);for(const c of e.outputs)t.set(`output:${c.identifier}`,c);let o=0;const d=e.panelStates,u=[],l=[];ce(e.declaration.items,t,c=>d[o++]?.collapsed??c,e.showOptions,0,u,l);const p=[];let m=a-S;u.length===0&&(m-=O);for(let c=0;c<u.length;c++){const k=u[c];if(!k)continue;const g=u[c-1],C=c===0?_n[k.type]??0:vn[g?.type??"Socket"]?.[k.type]??0;if(m-=C*_,k.type==="Socket"){const y=m;k.output&&p.push(M(k.output,!0,n+r,y-O,y)),k.input&&p.push(M(k.input,!1,n,y-O,y)),m=y-S;continue}if(k.type==="Layout"||k.type==="Separator"){m-=S;continue}if(k.type==="PanelHeader"&&k.panel){m-=oe/2,k.panel.centerY=m,m-=oe/2,k.panel.toggle&&p.push(M(k.panel.toggle,!1,n,k.panel.centerY,k.panel.centerY));continue}k.type==="PanelContentBegin"&&k.panel&&(k.panel.contentTop=m),k.type==="PanelContentEnd"&&k.panel&&(k.panel.contentBottom=m)}const x=u[u.length-1];x&&(m-=(Mn[x.type]??0)*_);for(const c of l)if(c.collapsed)for(const k of c.owned){if(!A(k))continue;const g=e.outputs.includes(k);p.push(M(k,g,g?n+r:n,c.centerY,c.centerY,!0))}for(let c=u.length-1;c>=0;c--){const k=u[c];if(!k||k.type!=="PanelContentEnd")break;k.panel&&(k.panel.fillsNodeEnd=!0)}return{name:e.name,x:n,yTop:a,yBottom:Math.min(m,a-2*S),width:r,collapsed:!1,sockets:p,panels:l.map(c=>({name:c.name,depth:c.depth,collapsed:c.collapsed,centerY:c.centerY,contentTop:c.contentTop,contentBottom:c.contentBottom,fillsNodeEnd:c.fillsNodeEnd,toggle:c.toggle?M(c.toggle,!1,n,c.centerY,c.centerY):null}))}}function bn(e){const n=a=>a.some(r=>r.kind==="layout"?!0:r.kind==="panel"?n(r.items):!1);return n(e.items)}const dt="workspace.document",lt="Shader Editor";Ce(Ne);const Dn=320,ue=.1,se=4;function mt(){const e=T.useSyncExternalStore(Te,Q,Q),[n,a]=T.useState(null),[r,t]=T.useState(null),o=T.useRef(null),d=T.useRef(!1);T.useSyncExternalStore(Ee,ee,ee);const{transform:u,looked:l,refusal:p,size:m}=U(),x=T.useCallback(s=>{const f=U().transform;B({transform:typeof s=="function"?s(f):s})},[]),c=T.useCallback(s=>{B({looked:s,refusal:null})},[]),k=T.useCallback(s=>{const f=U().size;f.w===s.w&&f.h===s.h||B({size:s})},[]),g=T.useCallback(s=>{we(s)},[]);T.useEffect(()=>{let s=!0;return(async()=>{try{const f=await Oe();if(!s)return;a(f),t(null)}catch(f){if(!s)return;t(f instanceof Error?f.message:String(f))}})(),()=>{s=!1}},[e]),T.useEffect(()=>{const s=o.current;if(!s)return;const f=new ResizeObserver(()=>{k({w:s.clientWidth,h:s.clientHeight})});return f.observe(s),k({w:s.clientWidth,h:s.clientHeight}),()=>f.disconnect()},[]);const C=T.useMemo(()=>$n(n),[n]);T.useEffect(()=>{B({drawn:[...C.frames,...C.nodes].map(({node:s,laid:f,panels:v,fallback:ye})=>{const J=f.sockets.find(H=>!H.panelCollapsed)??f.sockets[0];return{panels:v.length,collapsedPanels:v.filter(H=>H.collapsed).length,panelFallback:ye,name:s.name,x:f.x,yTop:f.yTop,yBottom:f.yBottom,width:f.width,height:f.yTop-f.yBottom,sockets:f.sockets.length,firstSocketBelowTop:J?f.yTop-J.y:null,header:K(s)}})})},[C]);const y=T.useCallback(()=>{const s=Fn(C.nodes);if(!s)return;const f=de(Math.min(m.w/(s.w+2*S),m.h/(s.h+2*S)),ue,se);B({transform:{cx:s.x+s.w/2,cy:s.y-s.h/2,zoom:f},framedAt:Date.now()})},[C.nodes,m.h,m.w]),E=Ie(),P=T.useRef(0);T.useEffect(()=>{E!==P.current&&(P.current=E,y())},[E,y]),T.useEffect(()=>{d.current||C.nodes.length===0||m.w<=1||(d.current=!0,y())},[C.nodes.length,m.w,y]);const W=T.useRef(null),fe=s=>{s.button===1&&(s.preventDefault(),s.target.setPointerCapture?.(s.pointerId),W.current={x:s.clientX,y:s.clientY,cx:u.cx,cy:u.cy})},he=s=>{const f=W.current;f&&x(v=>({...v,cx:f.cx-(s.clientX-f.x)/v.zoom,cy:f.cy+(s.clientY-f.y)/v.zoom}))},q=()=>{W.current=null},ge=s=>{s.preventDefault(),x(f=>({...f,zoom:de(f.zoom*(s.deltaY<0?1.1:1/1.1),ue,se)}))},Se=n?.nodes.find(s=>s.name===l)??null,xe=u.zoom>kn;return i.jsxs("div",{"data-testid":"blender-node-editor",style:{display:"flex",position:"absolute",inset:0,overflow:"hidden"},children:[i.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:1,minWidth:0,minHeight:0},children:[i.jsx(Xn,{tree:n,zoom:u.zoom,onViewAll:y,onRefuse:g}),i.jsx("div",{ref:o,style:{position:"relative",flex:1,minHeight:0},children:i.jsx("svg",{role:"presentation",width:"100%",height:"100%",onPointerDown:fe,onPointerMove:he,onPointerUp:q,onPointerCancel:q,onWheel:ge,onContextMenu:s=>{s.preventDefault(),g("The node context menu adds, deletes and reconnects nodes — editing.")},style:{display:"block",background:h.background,cursor:"default"},children:i.jsxs("g",{transform:`translate(${m.w/2} ${m.h/2}) scale(${u.zoom} ${-u.zoom}) translate(${-u.cx} ${-u.cy})`,children:[C.frames.map(s=>i.jsx(Vn,{node:s.node,laid:s.laid},s.node.name)),C.links.map(s=>i.jsx(zn,{link:s},s.key)),C.nodes.map(s=>i.jsx(Gn,{node:s.node,laid:s.laid,panels:s.panels,looked:s.node.name===l,details:xe,onLook:()=>c(s.node.name),onRefuse:g},s.node.name))]})})}),i.jsx(Kn,{entries:C.nodes,error:r,refusal:p})]}),i.jsx(Zn,{node:Se,onRefuse:g})]})}const Bn=26,Ln=22,jn=mn;function $n(e){if(!e)return{nodes:[],frames:[],links:[]};const n=new Map,a=e.nodes.map(t=>{const o={name:t.name,location:t.location,width:t.width,collapsed:t.collapsed,inputs:t.inputs,outputs:t.outputs},d=t.collapsed?void 0:jn[t.idname];if(t.panelCount>0&&!d){const l=V(o);return n.set(t.name,l),{node:t,laid:l,panels:[],fallback:t.collapsed?null:"no traced declaration — the trace covers the 36 node types that declare a panel in Blender 5.2.0, and a node group’s panels are runtime data",approximate:!1}}if(d){const l=Pn(d,t.inputs,t.outputs);if(l.ok){const m=An({...o,declaration:d,panelStates:t.panels,showOptions:t.showOptions});return n.set(t.name,m),{node:t,laid:m,panels:m.panels,fallback:null,approximate:bn(d)}}const p=V(o);return n.set(t.name,p),{node:t,laid:p,panels:[],fallback:l.why,approximate:!1}}const u=V(o);return n.set(t.name,u),{node:t,laid:u,panels:[],fallback:null,approximate:!1}}),r=e.links.flatMap((t,o)=>{const d=n.get(t.fromNode),u=n.get(t.toNode);if(!d||!u)return[];const l=d.sockets.find(m=>m.output&&m.identifier===t.fromSocket),p=u.sockets.find(m=>!m.output&&m.identifier===t.toSocket);return!l||!p?[]:[{key:`${t.fromNode}.${t.fromSocket}→${t.toNode}.${t.toSocket}#${o}`,from:[l.x,l.y],to:[p.x,p.y],fromColor:G(l.type),toColor:G(p.type),muted:t.muted,valid:t.valid}]});return{nodes:a.filter(t=>t.node.idname!=="NodeFrame"),frames:a.filter(t=>t.node.idname==="NodeFrame"),links:r}}function Fn(e){if(e.length===0)return null;let n=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY,t=Number.NEGATIVE_INFINITY;for(const{laid:o}of e)n=Math.min(n,o.x),a=Math.max(a,o.x+o.width),r=Math.min(r,o.yBottom),t=Math.max(t,o.yTop);return{x:n,y:t,w:a-n,h:t-r}}const de=(e,n,a)=>Math.min(a,Math.max(n,e));function Gn({node:e,laid:n,panels:a,looked:r,details:t,onLook:o,onRefuse:d}){if(e.type==="REROUTE"){const g=n.sockets[0];return i.jsx("circle",{cx:n.x,cy:n.yTop,r:hn,fill:g?G(g.type):h.wireInner,stroke:pe,strokeWidth:F,onPointerDown:C=>{C.button===0&&o()}})}const u=e.muted?ie(K(e),En):K(e),l=e.muted?ie(te(e),wn):te(e),p=e.muted?1-On:1,m=e.selected?e.activeOutput||r?h.active:h.select:h.outline,x=e.selected?1:h.outlineAlpha,c=n.yTop-n.yBottom,k=e.label??e.typeLabel;return i.jsxs("g",{opacity:p,onPointerDown:g=>{g.button===0&&o()},onDoubleClick:()=>d(`Renaming "${e.name}" writes Node.name — editing parity is not the program.`),style:{cursor:"default"},children:[n.collapsed?i.jsx("rect",{x:n.x-w,y:-n.yTop-w,width:n.width+2*w,height:c+2*w,rx:Y,fill:u,transform:"scale(1 -1)"}):i.jsxs(i.Fragment,{children:[i.jsx("rect",{x:n.x-w,y:-(n.yTop-S)-w,width:n.width+2*w,height:c-S+2*w,rx:Y,fill:l,transform:"scale(1 -1)"}),i.jsx("rect",{x:n.x-w,y:-n.yTop-w,width:n.width+2*w,height:S+2*w,rx:Y,fill:u,transform:"scale(1 -1)"}),i.jsx("rect",{x:n.x-w,y:-(n.yTop-S)-w,width:n.width+2*w,height:D,fill:u,transform:"scale(1 -1)"}),a.map(g=>i.jsx(Wn,{panel:g,laid:n},`bg:${g.name}`))]}),i.jsx("rect",{x:n.x-N,y:-n.yTop-N,width:n.width+2*N,height:c+2*N,rx:cn,fill:"none",stroke:m,strokeOpacity:x,strokeWidth:N,transform:"scale(1 -1)"}),i.jsx("text",{x:n.x+Z,y:-(n.yTop-S/2),transform:"scale(1 -1)",fill:h.text,fontSize:R,dominantBaseline:"central",style:{pointerEvents:"none",userSelect:"none"},children:k}),t&&n.sockets.map(g=>i.jsx(Un,{socket:g,node:n,onRefuse:d},`${g.output?"o":"i"}:${g.identifier}`)),t&&a.map(g=>i.jsx(Hn,{panel:g,laid:n,onRefuse:d},`hd:${g.name}`))]})}function Wn({panel:e,laid:n}){if(e.contentTop===null||e.contentBottom===null)return null;const a=[{y:e.contentTop,height:e.contentTop-e.contentBottom,radius:0,times:1}];return e.fillsNodeEnd&&a.push({y:e.contentBottom,height:e.contentBottom-n.yBottom,radius:D,times:e.depth+1}),i.jsx("g",{style:{pointerEvents:"none"},children:a.flatMap((r,t)=>Array.from({length:r.times},(o,d)=>i.jsx("rect",{x:n.x,y:-r.y,width:n.width,height:Math.max(r.height,0),rx:r.radius,fill:Nn,fillOpacity:Rn,transform:"scale(1 -1)"},`${t}:${d}`)))})}function Hn({panel:e,laid:n,onRefuse:a}){const r=pn,t=r/$.cell,o=n.x+X+r/2,d=e.centerY,u=$.reach*t,l=$.spread*t,p=e.collapsed?`M ${o-u/2} ${-(d+l)} L ${o+u/2} ${-d} L ${o-u/2} ${-(d-l)}`:`M ${o-l} ${-(d+u/2)} L ${o} ${-(d-u/2)} L ${o+l} ${-(d+u/2)}`,m=n.x+X+r+re+(e.toggle&&!e.toggle.linked?In:0);return i.jsxs("g",{onPointerDown:x=>{x.button===0&&(x.stopPropagation(),a(`${e.collapsed?"Opening":"Collapsing"} "${e.name}" writes the panel's is_collapsed — editing parity is not the program.`))},style:{cursor:"default"},children:[i.jsx("rect",{x:n.x,y:-(d+O),width:n.width,height:2*O,fill:"transparent",transform:"scale(1 -1)"}),i.jsx("path",{d:p,fill:"none",stroke:h.text,strokeWidth:$.stroke*t,strokeLinecap:"round",strokeLinejoin:"round",transform:"scale(1 -1)",style:{pointerEvents:"none"}}),e.toggle&&!e.toggle.linked&&i.jsx("rect",{x:n.x+X+r+re,y:-(d+O/2),width:O,height:O,rx:.2*O,fill:e.toggle.value===!0?"#4772b3":"#545454",transform:"scale(1 -1)",style:{pointerEvents:"none"}}),i.jsx("text",{x:m,y:-d,transform:"scale(1 -1)",fill:h.text,fontSize:R,dominantBaseline:"central",style:{pointerEvents:"none",userSelect:"none"},children:e.name})]})}function Un({socket:e,node:n,onRefuse:a}){const r=G(e.type),t=e.type==="CUSTOM"?Cn:pe,o=me,d=e.shape.replace("_DOT",""),u=e.shape.endsWith("_DOT"),l=d==="SQUARE"?i.jsx("rect",{x:e.x-o,y:-e.y-o,width:2*o,height:2*o,fill:r,stroke:t,strokeWidth:F,transform:"scale(1 -1)"}):d==="DIAMOND"?i.jsx("polygon",{points:`${e.x},${-e.y-o} ${e.x+o},${-e.y} ${e.x},${-e.y+o} ${e.x-o},${-e.y}`,fill:r,stroke:t,strokeWidth:F,transform:"scale(1 -1)"}):i.jsx("circle",{cx:e.x,cy:-e.y,r:o,fill:r,stroke:t,strokeWidth:F,transform:"scale(1 -1)"});return i.jsxs("g",{onPointerDown:p=>{p.button===0&&(p.stopPropagation(),a(`Dragging from "${e.name}" would make a link — editing parity is not the program.`))},children:[l,u&&i.jsx("circle",{cx:e.x,cy:-e.y,r:o*.35,fill:t,transform:"scale(1 -1)"}),!n.collapsed&&!e.panelCollapsed&&i.jsx(Yn,{socket:e,node:n,onRefuse:a})]})}function Yn({socket:e,node:n,onRefuse:a}){const r=O,t=n.x+r,o=n.x+n.width-r,d=-(e.rowTop-S/2);if(!(!e.output&&!e.linked&&!e.hideValue&&e.value!==null))return i.jsx("text",{x:e.output?o:t,y:d,transform:"scale(1 -1)",textAnchor:e.output?"end":"start",fill:h.text,fontSize:R,dominantBaseline:"central",style:{pointerEvents:"none",userSelect:"none"},children:e.name});const l=Array.isArray(e.value)&&e.value.length>=3;return i.jsxs("g",{onPointerDown:p=>{p.button===0&&(p.stopPropagation(),a(`Changing "${e.name}" writes the socket's default_value — editing parity is not the program.`))},style:{cursor:"default"},children:[i.jsx("rect",{x:t,y:d-S/2+1,width:o-t,height:S-2,rx:.2*S,fill:"#545454",transform:"scale(1 -1)"}),le(e)!==null&&i.jsxs(i.Fragment,{children:[i.jsx("clipPath",{id:`sl-${e.identifier}`,children:i.jsx("rect",{x:t,y:d-S/2+1,width:o-t,height:S-2,rx:.2*S})}),i.jsx("rect",{x:t,y:d-S/2+1,width:(o-t)*(le(e)??0),height:S-2,fill:h.sliderFill,clipPath:`url(#sl-${e.identifier})`,transform:"scale(1 -1)"})]}),i.jsx("text",{x:t+6,y:d,transform:"scale(1 -1)",fill:h.text,fontSize:R,dominantBaseline:"central",style:{pointerEvents:"none",userSelect:"none"},children:e.name}),l?i.jsx("rect",{x:o-34,y:d-S/2+3,width:30,height:S-6,rx:2,fill:b(e.value),transform:"scale(1 -1)"}):i.jsx("text",{x:o-6,y:d,transform:"scale(1 -1)",textAnchor:"end",fill:h.text,fontSize:R,dominantBaseline:"central",style:{pointerEvents:"none",userSelect:"none"},children:ke(e.value)})]})}function le(e){const{softMin:n,softMax:a,value:r}=e;return n===void 0||a===void 0||typeof r!="number"||a<=n?null:Math.min(1,Math.max(0,(r-n)/(a-n)))}function ke(e){return e===null?"":typeof e=="boolean"?e?"On":"Off":typeof e=="number"?e.toFixed(3):typeof e=="string"?e:e.map(n=>n.toFixed(2)).join(", ")}function zn({link:e}){const[n,a]=Tn(e.from,e.to),r=`M ${e.from[0]} ${e.from[1]} C ${n[0]} ${n[1]}, ${a[0]} ${a[1]}, ${e.to[0]} ${e.to[1]}`,t=e.valid?h.wireInner:"#ff2020";return i.jsxs("g",{style:{pointerEvents:"none"},children:[i.jsx("path",{d:r,fill:"none",stroke:h.wire,strokeWidth:ne+2*N}),i.jsx("path",{d:r,fill:"none",stroke:t,strokeWidth:ne,strokeDasharray:e.muted?"10 10":void 0,strokeOpacity:e.muted?h.dashAlpha:1})]})}function Vn({node:e,laid:n}){const a=Math.max(n.yTop-n.yBottom,gn*2);return i.jsxs("g",{style:{pointerEvents:"none"},children:[i.jsx("rect",{x:n.x,y:-n.yTop,width:n.width,height:a,rx:D,fill:e.useCustomColor?b(e.color):h.frame,fillOpacity:h.frameAlpha,transform:"scale(1 -1)"}),e.label&&i.jsx("text",{x:n.x+n.width/2,y:-(n.yTop-25),transform:"scale(1 -1)",textAnchor:"middle",fill:h.text,fontSize:20,children:e.label})]})}function Xn({tree:e,zoom:n,onViewAll:a,onRefuse:r}){return i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--vgai-space-2)",height:Bn,padding:"0 var(--vgai-space-2)",background:h.background,color:h.text,font:`${R}px inherit`,borderBottom:"1px solid #161616"},children:[i.jsx("span",{"data-testid":"node-editor-tree-type",style:{opacity:.85},children:e?.typeLabel??"Shader Editor"}),i.jsx("span",{style:{opacity:.4},children:"·"}),i.jsx("span",{"data-testid":"node-editor-material",children:e?.material??"No material"}),i.jsx("span",{style:{flex:1}}),i.jsxs("span",{style:{opacity:.6},children:[Math.round(n*100),"%"]}),i.jsx("button",{type:"button",className:"vgai-btn","data-variant":"ghost","data-size":"sm",onClick:a,"data-testid":"node-editor-view-all",children:"View All"}),i.jsx("button",{type:"button",className:"vgai-btn","data-variant":"ghost","data-size":"sm","data-testid":"node-editor-use-nodes",onClick:()=>r("Use Nodes writes Material.use_nodes — editing parity is not the program."),children:"Use Nodes"})]})}function Kn({entries:e,error:n,refusal:a}){const r=e.filter(u=>u.fallback!==null),t=e.filter(u=>u.approximate),o=e.reduce((u,l)=>u+l.panels.length,0),d=n||a||(r.length>0?`${r.map(u=>`"${u.node.name}" draws its sockets flat: ${u.fallback}`).join("; ")}.`:t.length>0?`${t.map(u=>`"${u.node.name}"`).join(", ")} ${t.length===1?"carries a":"carry"} declaration LAYOUT row, whose drawn height RNA cannot answer; one UI unit is reserved for it.`:o>0?`${o} socket panel${o===1?"":"s"} drawn from Blender's own declarations. Read-only: this view inspects the node tree and never writes it.`:"Read-only: this view inspects the node tree and never writes it.");return i.jsx("div",{"data-testid":"node-editor-status",style:{flex:"0 0 auto",height:Ln,display:"flex",alignItems:"center",padding:"0 var(--vgai-space-2)",background:h.background,color:n||a?"#ffa028":"#888888",font:`${R}px inherit`,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:d})}function Zn({node:e,onRefuse:n}){return i.jsxs("aside",{"data-testid":"node-editor-sidebar",style:{width:Dn,flex:"0 0 auto",overflow:"auto",background:h.background,color:h.text,font:`${R}px inherit`,borderLeft:"1px solid #161616",padding:"var(--vgai-space-2)"},children:[i.jsx("div",{style:{opacity:.6,marginBottom:"var(--vgai-space-2)"},children:"Node"}),e?i.jsxs(i.Fragment,{children:[i.jsx(L,{label:"Name",value:e.name,onRefuse:n}),i.jsx(L,{label:"Label",value:e.label??"",onRefuse:n}),i.jsx(L,{label:"Color",value:e.useCustomColor?b(e.color):"Off",onRefuse:n,swatch:e.useCustomColor?b(e.color):void 0}),i.jsx(L,{label:"Mute",value:e.muted?"On":"Off",onRefuse:n}),i.jsx("div",{style:{opacity:.6,margin:"var(--vgai-space-3) 0 var(--vgai-space-1)"},children:"Properties"}),e.inputs.filter(A).map(a=>i.jsx(L,{label:a.label??a.name,value:a.linked?"Linked":ke(a.value),onRefuse:n},a.identifier))]}):i.jsx("div",{style:{opacity:.5},children:"No node looked at."})]})}function L({label:e,value:n,swatch:a,onRefuse:r}){return i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--vgai-space-2)",height:20},onPointerDown:()=>r(`"${e}" is read here and written nowhere — inspection parity.`),children:[i.jsx("span",{style:{flex:"0 0 45%",opacity:.75,textAlign:"right"},children:e}),a&&i.jsx("span",{style:{width:14,height:14,borderRadius:2,background:a,flex:"0 0 auto"}}),i.jsx("span",{style:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},title:n,children:n})]})}export{mt as default,dt as point,lt as title};
|
|
1
|
+
import{a as i}from"./jsx-runtime-DPjLkJKQ.js";import{ah as Ce}from"./index-CY4oDLhJ.js";import{r as T}from"./index-DaQZGF7d.js";import{s as Te,e as Q,f as Ee,n as ee,g as B,i as U,r as we,j as Oe,k as Ie,N as Ne}from"./blender-runtime-host-DGe1KLVZ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-D_NuPfjr.js";import"./index-D2LwEE0L.js";import"./client-DNXj_opT.js";import"./three.module-BynznMJN.js";import"./clip-planes-CnAI6DZn.js";const Re={customSocketOrder:!0,items:[{kind:"input",name:"Image"},{kind:"output",name:"Image",alignWithPrevious:!0},{kind:"input",name:"Factor",identifier:"Fac"},{kind:"input",name:"Type"},{kind:"input",name:"Lift",identifier:"Base Lift"},{kind:"input",name:"Lift",identifier:"Color Lift"},{kind:"input",name:"Gamma",identifier:"Base Gamma"},{kind:"input",name:"Gamma",identifier:"Color Gamma"},{kind:"input",name:"Gain",identifier:"Base Gain"},{kind:"input",name:"Gain",identifier:"Color Gain"},{kind:"input",name:"Offset",identifier:"Base Offset"},{kind:"input",name:"Offset",identifier:"Color Offset"},{kind:"input",name:"Power",identifier:"Base Power"},{kind:"input",name:"Power",identifier:"Color Power"},{kind:"input",name:"Slope",identifier:"Base Slope"},{kind:"input",name:"Slope",identifier:"Color Slope"},{kind:"panel",name:"Input",items:[{kind:"input",name:"Temperature",identifier:"Input Temperature"},{kind:"input",name:"Tint",identifier:"Input Tint"},{kind:"layout"}]},{kind:"panel",name:"Output",items:[{kind:"input",name:"Temperature",identifier:"Output Temperature"},{kind:"input",name:"Tint",identifier:"Output Tint"},{kind:"layout"}]}]},Pe={customSocketOrder:!0,items:[{kind:"input",name:"Image"},{kind:"output",name:"Image",alignWithPrevious:!0},{kind:"input",name:"Mask"},{kind:"panel",name:"Master",items:[{kind:"input",name:"Saturation",identifier:"Master Saturation"},{kind:"input",name:"Contrast",identifier:"Master Contrast"},{kind:"input",name:"Gamma",identifier:"Master Gamma"},{kind:"input",name:"Gain",identifier:"Master Gain"},{kind:"input",name:"Offset",identifier:"Master Offset"}],defaultClosed:!0},{kind:"panel",name:"Highlights",items:[{kind:"input",name:"Saturation",identifier:"Highlights Saturation"},{kind:"input",name:"Contrast",identifier:"Highlights Contrast"},{kind:"input",name:"Gamma",identifier:"Highlights Gamma"},{kind:"input",name:"Gain",identifier:"Highlights Gain"},{kind:"input",name:"Offset",identifier:"Highlights Offset"}],defaultClosed:!0},{kind:"panel",name:"Midtones",items:[{kind:"input",name:"Saturation",identifier:"Midtones Saturation"},{kind:"input",name:"Contrast",identifier:"Midtones Contrast"},{kind:"input",name:"Gamma",identifier:"Midtones Gamma"},{kind:"input",name:"Gain",identifier:"Midtones Gain"},{kind:"input",name:"Offset",identifier:"Midtones Offset"}],defaultClosed:!0},{kind:"panel",name:"Shadows",items:[{kind:"input",name:"Saturation",identifier:"Shadows Saturation"},{kind:"input",name:"Contrast",identifier:"Shadows Contrast"},{kind:"input",name:"Gamma",identifier:"Shadows Gamma"},{kind:"input",name:"Gain",identifier:"Shadows Gain"},{kind:"input",name:"Offset",identifier:"Shadows Offset"}],defaultClosed:!0},{kind:"panel",name:"Tonal Range",items:[{kind:"input",name:"Midtones Start"},{kind:"input",name:"Midtones End"}],defaultClosed:!0},{kind:"panel",name:"Channels",items:[{kind:"input",name:"Red",identifier:"Apply On Red"},{kind:"input",name:"Green",identifier:"Apply On Green"},{kind:"input",name:"Blue",identifier:"Apply On Blue"}],defaultClosed:!0}]},_e={customSocketOrder:!0,items:[{kind:"output",name:"Image"},{kind:"input",name:"Image"},{kind:"input",name:"Factor",identifier:"Fac"},{kind:"input",name:"Spill Channel"},{kind:"input",name:"Limit Method"},{kind:"input",name:"Limit Channel"},{kind:"input",name:"Limit Strength"},{kind:"panel",name:"Spill Strength",items:[{kind:"input",name:"Use Spill Strength",panelToggle:!0},{kind:"input",name:"Strength",identifier:"Spill Strength"}],defaultClosed:!0}]},Me={customSocketOrder:!0,items:[{kind:"input",name:"Image"},{kind:"output",name:"Image",alignWithPrevious:!0},{kind:"output",name:"Plane"},{kind:"input",name:"Upper Left"},{kind:"input",name:"Upper Right"},{kind:"input",name:"Lower Left"},{kind:"input",name:"Lower Right"},{kind:"panel",name:"Sampling",items:[{kind:"input",name:"Interpolation"},{kind:"input",name:"Extension X"},{kind:"input",name:"Extension Y"}],defaultClosed:!0}]},ve={customSocketOrder:!0,items:[{kind:"input",name:"Image"},{kind:"output",name:"Image",alignWithPrevious:!0},{kind:"input",name:"Samples"},{kind:"input",name:"Center"},{kind:"input",name:"Rotation"},{kind:"input",name:"Scale"},{kind:"panel",name:"Translation",items:[{kind:"input",name:"Amount",identifier:"Translation Amount"},{kind:"input",name:"Direction",identifier:"Translation Direction"}]}]},Ae={customSocketOrder:!0,items:[{kind:"input",name:"Image"},{kind:"output",name:"Image",alignWithPrevious:!0},{kind:"input",name:"Displacement"},{kind:"panel",name:"Sampling",items:[{kind:"input",name:"Interpolation"},{kind:"input",name:"Extension X"},{kind:"input",name:"Extension Y"}],defaultClosed:!0}]},be={customSocketOrder:!0,items:[{kind:"input",name:"Image"},{kind:"output",name:"Image",alignWithPrevious:!0},{kind:"output",name:"Glare"},{kind:"output",name:"Highlights"},{kind:"input",name:"Type"},{kind:"input",name:"Quality"},{kind:"panel",name:"Highlights",items:[{kind:"input",name:"Threshold",identifier:"Highlights Threshold"},{kind:"input",name:"Smoothness",identifier:"Highlights Smoothness"},{kind:"panel",name:"Clamp",items:[{kind:"input",name:"Clamp",identifier:"Clamp Highlights",panelToggle:!0},{kind:"input",name:"Maximum",identifier:"Maximum Highlights"}],defaultClosed:!0}],defaultClosed:!0},{kind:"panel",name:"Adjust",items:[{kind:"input",name:"Strength"},{kind:"input",name:"Saturation"},{kind:"input",name:"Tint"}]},{kind:"panel",name:"Glare",items:[{kind:"input",name:"Size"},{kind:"input",name:"Streaks"},{kind:"input",name:"Streaks Angle"},{kind:"input",name:"Iterations"},{kind:"input",name:"Fade"},{kind:"input",name:"Color Modulation"},{kind:"input",name:"Diagonal",identifier:"Diagonal Star"},{kind:"input",name:"Sun Position"},{kind:"input",name:"Jitter"},{kind:"input",name:"Kernel Data Type"},{kind:"input",name:"Kernel",identifier:"Float Kernel"},{kind:"input",name:"Kernel",identifier:"Color Kernel"}]}]},De={customSocketOrder:!0,items:[{kind:"input",name:"Image"},{kind:"output",name:"Image",alignWithPrevious:!0},{kind:"output",name:"Matte"},{kind:"output",name:"Edges"},{kind:"input",name:"Key Color"},{kind:"panel",name:"Preprocess",items:[{kind:"input",name:"Blur Size",identifier:"Preprocess Blur Size"}],defaultClosed:!0},{kind:"panel",name:"Key",items:[{kind:"input",name:"Balance",identifier:"Key Balance"}],defaultClosed:!0},{kind:"panel",name:"Tweak",items:[{kind:"input",name:"Black Level"},{kind:"input",name:"White Level"},{kind:"panel",name:"Edges",items:[{kind:"input",name:"Size",identifier:"Edge Search Size"},{kind:"input",name:"Tolerance",identifier:"Edge Tolerance"}],defaultClosed:!0}],defaultClosed:!0},{kind:"panel",name:"Mask",items:[{kind:"input",name:"Garbage Matte"},{kind:"input",name:"Core Matte"}],defaultClosed:!0},{kind:"panel",name:"Postprocess",items:[{kind:"input",name:"Blur Size",identifier:"Postprocess Blur Size"},{kind:"input",name:"Dilate Size",identifier:"Postprocess Dilate Size"},{kind:"input",name:"Feather Size",identifier:"Postprocess Feather Size"},{kind:"input",name:"Feather Falloff"}],defaultClosed:!0},{kind:"panel",name:"Despill",items:[{kind:"input",name:"Strength",identifier:"Despill Strength"},{kind:"input",name:"Balance",identifier:"Despill Balance"}],defaultClosed:!0}]},Be={customSocketOrder:!0,items:[{kind:"input",name:"Image"},{kind:"output",name:"Image",alignWithPrevious:!0},{kind:"input",name:"UV"},{kind:"panel",name:"Sampling",items:[{kind:"input",name:"Interpolation"},{kind:"input",name:"Extension X"},{kind:"input",name:"Extension Y"}],defaultClosed:!0}]},Le={customSocketOrder:!0,items:[{kind:"output",name:"Mask"},{kind:"layout"},{kind:"input",name:"Size Source"},{kind:"input",name:"Size X"},{kind:"input",name:"Size Y"},{kind:"input",name:"Feather"},{kind:"panel",name:"Motion Blur",items:[{kind:"input",name:"Motion Blur",panelToggle:!0},{kind:"input",name:"Samples",identifier:"Motion Blur Samples"},{kind:"input",name:"Shutter",identifier:"Motion Blur Shutter"}],defaultClosed:!0}]},je={customSocketOrder:!0,items:[{kind:"input",name:"Image"},{kind:"output",name:"Image",alignWithPrevious:!0},{kind:"output",name:"Plane"},{kind:"layout"},{kind:"panel",name:"Motion Blur",items:[{kind:"input",name:"Motion Blur",panelToggle:!0},{kind:"input",name:"Samples",identifier:"Motion Blur Samples"},{kind:"input",name:"Shutter",identifier:"Motion Blur Shutter"}],defaultClosed:!0}]},$e={customSocketOrder:!0,items:[{kind:"input",name:"Image"},{kind:"output",name:"Image",alignWithPrevious:!0},{kind:"input",name:"Angle"},{kind:"panel",name:"Sampling",items:[{kind:"input",name:"Interpolation"},{kind:"input",name:"Extension X"},{kind:"input",name:"Extension Y"}],defaultClosed:!0}]},Fe={customSocketOrder:!0,items:[{kind:"input",name:"Image"},{kind:"output",name:"Image",alignWithPrevious:!0},{kind:"input",name:"Type"},{kind:"input",name:"X"},{kind:"input",name:"Y"},{kind:"input",name:"Frame Type"},{kind:"panel",name:"Sampling",items:[{kind:"input",name:"Interpolation"},{kind:"input",name:"Extension X"},{kind:"input",name:"Extension Y"}],defaultClosed:!0}]},Ge={customSocketOrder:!0,items:[{kind:"input",name:"Image"},{kind:"output",name:"Image",alignWithPrevious:!0},{kind:"layout"},{kind:"input",name:"Frame"},{kind:"input",name:"Invert"},{kind:"panel",name:"Sampling",items:[{kind:"input",name:"Interpolation"},{kind:"input",name:"Extension X"},{kind:"input",name:"Extension Y"}],defaultClosed:!0}]},We={customSocketOrder:!0,items:[{kind:"output",name:"Image"},{kind:"input",name:"String"},{kind:"input",name:"Font"},{kind:"input",name:"Size"},{kind:"panel",name:"Alignment",items:[{kind:"input",name:"Horizontal Alignment"},{kind:"input",name:"Vertical Alignment"}],defaultClosed:!0},{kind:"panel",name:"Wrap",items:[{kind:"input",name:"Wrap",panelToggle:!0},{kind:"input",name:"Width",identifier:"Wrap Width"}],defaultClosed:!0}]},He={customSocketOrder:!0,items:[{kind:"input",name:"Image"},{kind:"output",name:"Image",alignWithPrevious:!0},{kind:"input",name:"X"},{kind:"input",name:"Y"},{kind:"input",name:"Angle"},{kind:"input",name:"Scale"},{kind:"panel",name:"Sampling",items:[{kind:"input",name:"Interpolation"},{kind:"input",name:"Extension X"},{kind:"input",name:"Extension Y"}],defaultClosed:!0}]},Ue={customSocketOrder:!0,items:[{kind:"input",name:"Image"},{kind:"output",name:"Image",alignWithPrevious:!0},{kind:"input",name:"X"},{kind:"input",name:"Y"},{kind:"panel",name:"Sampling",items:[{kind:"input",name:"Interpolation"},{kind:"input",name:"Extension X"},{kind:"input",name:"Extension Y"}],defaultClosed:!0}]},Ye={customSocketOrder:!0,items:[{kind:"output",name:"Matrix"},{kind:"panel",name:"Column 1",items:[{kind:"input",name:"Column 1 Row 1"},{kind:"input",name:"Column 1 Row 2"},{kind:"input",name:"Column 1 Row 3"},{kind:"input",name:"Column 1 Row 4"}],defaultClosed:!0},{kind:"panel",name:"Column 2",items:[{kind:"input",name:"Column 2 Row 1"},{kind:"input",name:"Column 2 Row 2"},{kind:"input",name:"Column 2 Row 3"},{kind:"input",name:"Column 2 Row 4"}],defaultClosed:!0},{kind:"panel",name:"Column 3",items:[{kind:"input",name:"Column 3 Row 1"},{kind:"input",name:"Column 3 Row 2"},{kind:"input",name:"Column 3 Row 3"},{kind:"input",name:"Column 3 Row 4"}],defaultClosed:!0},{kind:"panel",name:"Column 4",items:[{kind:"input",name:"Column 4 Row 1"},{kind:"input",name:"Column 4 Row 2"},{kind:"input",name:"Column 4 Row 3"},{kind:"input",name:"Column 4 Row 4"}],defaultClosed:!0}]},ze={customSocketOrder:!0,items:[{kind:"panel",name:"Column 1",items:[{kind:"output",name:"Column 1 Row 1"},{kind:"output",name:"Column 1 Row 2"},{kind:"output",name:"Column 1 Row 3"},{kind:"output",name:"Column 1 Row 4"}],defaultClosed:!0},{kind:"panel",name:"Column 2",items:[{kind:"output",name:"Column 2 Row 1"},{kind:"output",name:"Column 2 Row 2"},{kind:"output",name:"Column 2 Row 3"},{kind:"output",name:"Column 2 Row 4"}],defaultClosed:!0},{kind:"panel",name:"Column 3",items:[{kind:"output",name:"Column 3 Row 1"},{kind:"output",name:"Column 3 Row 2"},{kind:"output",name:"Column 3 Row 3"},{kind:"output",name:"Column 3 Row 4"}],defaultClosed:!0},{kind:"panel",name:"Column 4",items:[{kind:"output",name:"Column 4 Row 1"},{kind:"output",name:"Column 4 Row 2"},{kind:"output",name:"Column 4 Row 3"},{kind:"output",name:"Column 4 Row 4"}],defaultClosed:!0},{kind:"input",name:"Matrix"}]},Ve={customSocketOrder:!0,items:[{kind:"input",name:"String"},{kind:"output",name:"String",alignWithPrevious:!0},{kind:"input",name:"Characters"},{kind:"input",name:"Whitespace"},{kind:"panel",name:"Limit",items:[{kind:"input",name:"Start"},{kind:"input",name:"End"}],defaultClosed:!0}]},Xe={customSocketOrder:!0,items:[{kind:"output",name:"Topology"},{kind:"input",name:"Bounds Min"},{kind:"input",name:"Bounds Max"},{kind:"input",name:"Resolution X"},{kind:"input",name:"Resolution Y"},{kind:"input",name:"Resolution Z"},{kind:"panel",name:"Min",items:[{kind:"input",name:"Min X"},{kind:"input",name:"Min Y"},{kind:"input",name:"Min Z"}],defaultClosed:!0}]},Ke={customSocketOrder:!0,conditional:!0,items:[{kind:"output",name:"Geometry"},{kind:"input",name:"",identifier:"__extend__main"},{kind:"output",name:"",identifier:"__extend__main",alignWithPrevious:!0},{kind:"panel",name:"Generated",items:[{kind:"separator"},{kind:"input",name:"",identifier:"__extend__generation"},{kind:"output",name:"",identifier:"__extend__generation",alignWithPrevious:!0}]}]},Ze={customSocketOrder:!0,items:[{kind:"output",name:"Names"},{kind:"input",name:"Geometry"},{kind:"panel",name:"Filter Data Type",items:[{kind:"input",name:"Filter Data Type",panelToggle:!0},{kind:"input",name:"Data Type"}]},{kind:"panel",name:"Filter Domain",items:[{kind:"input",name:"Filter Domain",panelToggle:!0},{kind:"input",name:"Domain"}]}]},qe={customSocketOrder:!0,conditional:!0,items:[{kind:"layout"},{kind:"output",name:"Points"},{kind:"output",name:"Value"},{kind:"panel",name:"Voxel Index",items:[{kind:"output",name:"X"},{kind:"output",name:"Y"},{kind:"output",name:"Z"},{kind:"output",name:"Is Tile"},{kind:"output",name:"Extent"}],defaultClosed:!0},{kind:"input",name:"Grid"}]},Je={customSocketOrder:!0,items:[{kind:"output",name:"X"},{kind:"output",name:"Y"},{kind:"output",name:"Z"},{kind:"panel",name:"Tile",items:[{kind:"output",name:"Is Tile"},{kind:"output",name:"Extent X"},{kind:"output",name:"Extent Y"},{kind:"output",name:"Extent Z"}],defaultClosed:!0}]},Qe={customSocketOrder:!0,items:[{kind:"input",name:"Mesh"},{kind:"output",name:"Mesh",alignWithPrevious:!0},{kind:"input",name:"Selection"},{kind:"input",name:"Affect Kind"},{kind:"input",name:"Start Left Offset"},{kind:"input",name:"Start Right Offset"},{kind:"input",name:"End Left Offset"},{kind:"input",name:"End Right Offset"},{kind:"input",name:"Offset"},{kind:"input",name:"Miter"},{kind:"input",name:"Spread"},{kind:"input",name:"Segments"},{kind:"input",name:"Shape"},{kind:"input",name:"Profile"},{kind:"panel",name:"Selections",items:[{kind:"output",name:"Vertex Face"},{kind:"output",name:"Edge Face"},{kind:"output",name:"Outer Edge"},{kind:"output",name:"Mid Edge"}]}]},en={customSocketOrder:!0,items:[{kind:"output",name:"Amplitude"},{kind:"input",name:"Sound"},{kind:"input",name:"Time"},{kind:"input",name:"All Channels"},{kind:"input",name:"Channel"},{kind:"input",name:"Low"},{kind:"input",name:"High"},{kind:"panel",name:"FFT",items:[{kind:"input",name:"FFT Size"},{kind:"input",name:"Window Function"}],defaultClosed:!0}]},nn={customSocketOrder:!0,items:[{kind:"output",name:"Curve Instances"},{kind:"output",name:"Remainder"},{kind:"output",name:"Line"},{kind:"output",name:"Word"},{kind:"output",name:"Pivot Point"},{kind:"input",name:"String"},{kind:"input",name:"Size"},{kind:"input",name:"Font"},{kind:"panel",name:"Alignment",items:[{kind:"input",name:"Align X"},{kind:"input",name:"Align Y"},{kind:"input",name:"Pivot Point"}],defaultClosed:!0},{kind:"panel",name:"Spacing",items:[{kind:"input",name:"Character Spacing"},{kind:"input",name:"Word Spacing"},{kind:"input",name:"Line Spacing"}],defaultClosed:!0},{kind:"panel",name:"Text Box",items:[{kind:"input",name:"Overflow"},{kind:"input",name:"Text Box Width"},{kind:"input",name:"Text Box Height"}],defaultClosed:!0}]},tn={customSocketOrder:!0,conditional:!0,items:[{kind:"input",name:"Target"},{kind:"output",name:"Target",alignWithPrevious:!0},{kind:"output",name:"Transferred Names"},{kind:"panel",name:"Target IDs",items:[],defaultClosed:!0},{kind:"input",name:"Source"},{kind:"panel",name:"Source IDs",items:[],defaultClosed:!0},{kind:"input",name:"Pattern Mode"},{kind:"input",name:"Attribute Names"},{kind:"input",name:"Exclude Names"}]},an={customSocketOrder:!0,items:[{kind:"input",name:"World"},{kind:"output",name:"World",alignWithPrevious:!0},{kind:"input",name:"Delta Time"},{kind:"input",name:"Filter"},{kind:"input",name:"Simulation to World"},{kind:"panel",name:"Solver",items:[{kind:"input",name:"Substeps"},{kind:"input",name:"Constraint Iterations"},{kind:"input",name:"Solver Path"}],defaultClosed:!0},{kind:"panel",name:"Interpolation Range",items:[{kind:"input",name:"Begin"},{kind:"input",name:"End"}],defaultClosed:!0}]},on={customSocketOrder:!0,conditional:!0,items:[{kind:"input",name:"Closure"},{kind:"panel",name:"Interface",items:[{kind:"output",name:"",identifier:"__extend__"},{kind:"input",name:"",identifier:"__extend__"}]}]},rn={customSocketOrder:!0,items:[{kind:"output",name:"BSDF"},{kind:"layout"},{kind:"input",name:"Color"},{kind:"input",name:"Roughness"},{kind:"input",name:"IOR"},{kind:"input",name:"Normal"},{kind:"input",name:"Weight",conditional:!0},{kind:"panel",name:"Thin Film",items:[{kind:"input",name:"Thin Film Thickness"},{kind:"input",name:"Thin Film IOR"}],defaultClosed:!0}]},un={customSocketOrder:!0,items:[{kind:"output",name:"BSDF"},{kind:"layout"},{kind:"input",name:"Base Color"},{kind:"input",name:"Edge Tint"},{kind:"input",name:"IOR"},{kind:"input",name:"Extinction"},{kind:"input",name:"Roughness"},{kind:"input",name:"Anisotropy"},{kind:"input",name:"Rotation"},{kind:"input",name:"Normal"},{kind:"input",name:"Tangent"},{kind:"input",name:"Weight",conditional:!0},{kind:"panel",name:"Thin Film",items:[{kind:"input",name:"Thin Film Thickness"},{kind:"input",name:"Thin Film IOR"}],defaultClosed:!0}]},sn={customSocketOrder:!0,items:[{kind:"output",name:"BSDF"},{kind:"input",name:"Base Color"},{kind:"input",name:"Metallic"},{kind:"input",name:"Roughness"},{kind:"input",name:"IOR"},{kind:"input",name:"Alpha"},{kind:"input",name:"Thin Wall"},{kind:"input",name:"Normal"},{kind:"input",name:"Weight",conditional:!0},{kind:"panel",name:"Diffuse",items:[{kind:"input",name:"Diffuse Roughness"}],defaultClosed:!0},{kind:"panel",name:"Subsurface",items:[{kind:"layout"},{kind:"input",name:"Subsurface Weight"},{kind:"input",name:"Subsurface Radius"},{kind:"input",name:"Subsurface Scale"},{kind:"input",name:"Subsurface IOR"},{kind:"input",name:"Subsurface Anisotropy"}],defaultClosed:!0},{kind:"panel",name:"Specular",items:[{kind:"layout"},{kind:"input",name:"Specular IOR Level"},{kind:"input",name:"Specular Tint"},{kind:"input",name:"Anisotropic"},{kind:"input",name:"Anisotropic Rotation"},{kind:"input",name:"Tangent"}],defaultClosed:!0},{kind:"panel",name:"Transmission",items:[{kind:"input",name:"Transmission Weight"}],defaultClosed:!0},{kind:"panel",name:"Coat",items:[{kind:"input",name:"Coat Weight"},{kind:"input",name:"Coat Roughness"},{kind:"input",name:"Coat IOR"},{kind:"input",name:"Coat Tint"},{kind:"input",name:"Coat Normal"}],defaultClosed:!0},{kind:"panel",name:"Sheen",items:[{kind:"input",name:"Sheen Weight"},{kind:"input",name:"Sheen Roughness"},{kind:"input",name:"Sheen Tint"}],defaultClosed:!0},{kind:"panel",name:"Emission",items:[{kind:"input",name:"Emission Color"},{kind:"input",name:"Emission Strength"}],defaultClosed:!0},{kind:"panel",name:"Thin Film",items:[{kind:"input",name:"Thin Film Thickness"},{kind:"input",name:"Thin Film IOR"}],defaultClosed:!0}]},dn={customSocketOrder:!0,conditional:!0,items:[{kind:"layout"},{kind:"output",name:"Is Hit"},{kind:"output",name:"Self Hit"},{kind:"output",name:"Hit Distance"},{kind:"output",name:"Hit Position"},{kind:"output",name:"Hit Normal"},{kind:"input",name:"Position"},{kind:"input",name:"Direction"},{kind:"input",name:"Length"},{kind:"panel",name:"Attributes",items:[{kind:"input",name:"",identifier:"__extend__"},{kind:"output",name:"",identifier:"__extend__",alignWithPrevious:!0}],defaultClosed:!0}]},ln={customSocketOrder:!0,items:[{kind:"output",name:"Volume"},{kind:"input",name:"Weight",conditional:!0},{kind:"panel",name:"Absorption",items:[{kind:"input",name:"Absorption Coefficients"}]},{kind:"panel",name:"Scatter",items:[{kind:"layout"},{kind:"input",name:"Scatter Coefficients"},{kind:"input",name:"Anisotropy"},{kind:"input",name:"IOR"},{kind:"input",name:"Backscatter"},{kind:"input",name:"Alpha"},{kind:"input",name:"Diameter"}]},{kind:"panel",name:"Emission",items:[{kind:"input",name:"Emission Coefficients"}]}]},mn={CompositorNodeColorBalance:Re,CompositorNodeColorCorrection:Pe,CompositorNodeColorSpill:_e,CompositorNodeCornerPin:Me,CompositorNodeDBlur:ve,CompositorNodeDisplace:Ae,CompositorNodeGlare:be,CompositorNodeKeying:De,CompositorNodeMapUV:Be,CompositorNodeMask:Le,CompositorNodePlaneTrackDeform:je,CompositorNodeRotate:$e,CompositorNodeScale:Fe,CompositorNodeStabilize:Ge,CompositorNodeStringToImage:We,CompositorNodeTransform:He,CompositorNodeTranslate:Ue,FunctionNodeCombineMatrix:Ye,FunctionNodeSeparateMatrix:ze,FunctionNodeTrimString:Ve,GeometryNodeCubeGridTopology:Xe,GeometryNodeForeachGeometryElementOutput:Ke,GeometryNodeGetAttributeNames:Ze,GeometryNodeGridToPoints:qe,GeometryNodeInputVoxelIndex:Je,GeometryNodeMeshBevel:Qe,GeometryNodeSampleSoundFrequencies:en,GeometryNodeStringToCurves:nn,GeometryNodeTransferAttributes:tn,GeometryNodeXPBDSolver:an,NodeEvaluateClosure:on,ShaderNodeBsdfGlass:rn,ShaderNodeBsdfMetallic:un,ShaderNodeBsdfPrincipled:sn,ShaderNodeRaycast:dn,ShaderNodeVolumeCoefficients:ln},I=20,N=1,S=I,O=I/2,D=.2*I,me=.25*I,Z=1.2*I,_=.1*I,pn=.8*I,w=.5,Y=D+w,cn=D+N,ne=2.5,kn=.2,fn=S*.5,z=S*-.5,hn=me,gn=1.5*I,R=11,h={sliderFill:"#4671b2",background:"#1a1a1a",body:"#303030",outline:"#ffffff",outlineAlpha:38/255,select:"#ed5700",active:"#ffffff",wireInner:"#8d8d8d",wire:"#1a1a1a",noodleCurving:4,dashAlpha:.5,text:"#e6e6e6",frame:"#0f0f0f",frameAlpha:204/255},Sn={INPUT:"#82354c",OUTPUT:"#3e232a",CONVERTER:"#246283",COLOR:"#6e6e23",VECTOR:"#3c3c83",FILTER:"#412b51",GROUP:"#374725",INTERFACE:"#1d1d1d",MATTE:"#5a3838",DISTORT:"#3e5a5b",TEXTURE:"#79461d",SHADER:"#2b652b",SCRIPT:"#203c3c",GEOMETRY:"#1d725e",ATTRIBUTE:"#1d2546",NONE:h.body,PATTERN:h.body},xn={VALUE:"#a1a1a1",VECTOR:"#6363c7",RGBA:"#c7c729",SHADER:"#63c763",BOOLEAN:"#cca6d6",INT:"#598c5c",STRING:"#70b3ff",OBJECT:"#ed9e5c",IMAGE:"#633863",GEOMETRY:"#00d6a3",COLLECTION:"#f5f5f5",TEXTURE:"#9e4fa3",MATERIAL:"#eb7582",ROTATION:"#a663c7",MENU:"#666666",MATRIX:"#b83385",BUNDLE:"#4d8080",CLOSURE:"#7d7d3b",FONT:"#635742",SOUND:"#635742",INT_VECTOR:"#5c789c",CUSTOM:"#333333"},yn="#ff00ff",pe=h.wire,Cn="#808080",F=N;function A(e){return e.enabled&&!e.hide}function V(e){const n=e.location[0]??0,a=e.location[1]??0,r=e.width,t=e.outputs.filter(A),o=e.inputs.filter(A);if(e.collapsed){const p=fn,m=p*Math.max(o.length,t.length,2)+D*2,x=a+m/2+z,c=a-m/2+z,k=(g,C)=>{let y=a+p*(g.length-1)*.5+z;return g.map(E=>{const P=M(E,C,C?n+r:n,y,y);return y-=p,P})};return{name:e.name,x:n,yTop:x,yBottom:c,width:r,collapsed:!0,sockets:[...k(t,!0),...k(o,!1)]}}let d=a-S;const u=[],l=(p,m)=>{const x=d;u.push(M(p,m,m?n+r:n,x-O,x)),d=x-S};return(t.length>0||o.length>0)&&(d-=2*_),t.forEach((p,m)=>{m>0&&(d-=_),l(p,!0)}),t.length>0&&o.length>0&&(d-=_),o.forEach((p,m)=>{(m>0||t.length>0)&&m>0&&(d-=_),l(p,!1)}),t.length>0||o.length>0?d-=2*_:d-=O,{name:e.name,x:n,yTop:a,yBottom:Math.min(d,a-2*S),width:r,collapsed:!1,sockets:u}}function M(e,n,a,r,t,o=!1){return{identifier:e.identifier,name:e.label??e.name,type:e.type,shape:e.shape,output:n,linked:e.linked,multiInput:e.multiInput,hideValue:e.hideValue,value:e.value,...e.softMin===void 0?{}:{softMin:e.softMin},...e.softMax===void 0?{}:{softMax:e.softMax},x:a,y:r,rowTop:t,panelCollapsed:o}}function Tn(e,n,a=h.noodleCurving){if(a===0)return[[e[0]+(n[0]-e[0])/3,e[1]+(n[1]-e[1])/3],[e[0]+(n[0]-e[0])*2/3,e[1]+(n[1]-e[1])*2/3]];const r=Math.abs(n[0]-e[0]),t=Math.abs(n[1]-e[1]),o=r===0?Number.POSITIVE_INFINITY:t/r,d=Math.min(1,o*(4.5-.25*a)),u=a*.1*r*d;return[[e[0]+u,e[1]],[n[0]-u,n[1]]]}function K(e){return e.idname==="NodeFrame"?h.frame:e.colorTag==="OUTPUT"&&!e.activeOutput?h.body:Sn[e.colorTag]??h.body}function te(e){return e.useCustomColor?b(e.color):h.body}function b(e){const n=a=>Math.round(Math.min(1,Math.max(0,a))*255).toString(16).padStart(2,"0");return`#${n(e[0]??0)}${n(e[1]??0)}${n(e[2]??0)}`}function ie(e,n){const a=ae(h.background),r=ae(e);return b([r[0]*(1-n)+a[0]*n,r[1]*(1-n)+a[1]*n,r[2]*(1-n)+a[2]*n])}const En=.6,wn=.8,On=.2;function ae(e){const n=Number.parseInt(e.slice(1),16);return[(n>>16&255)/255,(n>>8&255)/255,(n&255)/255]}function G(e){return xn[e]??yn}const oe=O,X=Z/3,re=Z/4,In=I,$={cell:8,reach:4,spread:3.64648,stroke:1},Nn="#000000",Rn=31/255*1.5,j=e=>e.identifier??e.name;function Pn(e,n,a){if(!e.customSocketOrder)return{ok:!1,why:"its declaration does not set use_custom_socket_order, so Blender lays it out the legacy way"};const r=[],t=[],o=l=>{for(const p of l)p.kind==="input"?r.push(j(p)):p.kind==="output"?t.push(j(p)):p.kind==="panel"&&o(p.items)};o(e.items);const d=(l,p,m)=>{if(l.length!==p.length)return`the declaration names ${l.length} ${m}${l.length===1?"":"s"} and the engine reports ${p.length}`;for(let x=0;x<l.length;x++)if(l[x]!==p[x]?.identifier)return`${m} ${x} is "${p[x]?.identifier}" in the engine and "${l[x]}" in the declaration`;return null},u=d(t,a,"output")??d(r,n,"input");return u===null?{ok:!0}:{ok:!1,why:u}}const _n={Socket:2,Separator:.5,Layout:3,PanelHeader:4},Mn={Socket:2,Separator:1,Layout:5,PanelHeader:4,PanelContentEnd:1},vn={Socket:{Socket:1,Separator:0,Layout:2,PanelHeader:3,PanelContentEnd:2},Layout:{Socket:2,Separator:0,Layout:1,PanelHeader:3,PanelContentEnd:2},Separator:{Socket:2,Separator:1,Layout:1,PanelHeader:1,PanelContentEnd:1},PanelHeader:{Socket:4,Separator:3,Layout:3,PanelHeader:5,PanelContentBegin:3,PanelContentEnd:3},PanelContentBegin:{Socket:2,Separator:1,Layout:2,PanelHeader:3,PanelContentEnd:1},PanelContentEnd:{Socket:1,Separator:1,Layout:1,PanelHeader:3,PanelContentEnd:0}};function ce(e,n,a,r,t,o,d){let u=!1;for(const l of e){if(l.kind==="input"||l.kind==="output"){const y=n.get(`${l.kind}:${j(l)}`);if(!y||!A(y)){u=!1;continue}const E=o[o.length-1];if(l.alignWithPrevious===!0&&u&&E&&E.type==="Socket"){o[o.length-1]={type:"Socket",input:l.kind==="input"?y:E.input,output:l.kind==="output"?y:E.output},u=!0;continue}o.push({type:"Socket",input:l.kind==="input"?y:void 0,output:l.kind==="output"?y:void 0}),u=!0;continue}if(u=!1,l.kind==="separator"){o.push({type:"Separator"});continue}if(l.kind==="layout"){r&&o.push({type:"Layout"});continue}if(l.kind!=="panel")continue;const p=l.items[0],m=p&&p.kind==="input"&&p.panelToggle===!0?p:null,x=m?n.get(`input:${j(m)}`)??null:null,c=[],k=y=>{for(const E of y)if(E.kind==="input"||E.kind==="output"){const P=n.get(`${E.kind}:${j(E)}`);P&&c.push(P)}else E.kind==="panel"&&k(E.items)};if(k(l.items),!c.some(A))continue;const g=a(l.defaultClosed===!0),C={name:l.name,depth:t,collapsed:g,toggle:x,owned:c,centerY:0,contentTop:null,contentBottom:null,fillsNodeEnd:!1};d.push(C),o.push({type:"PanelHeader",panel:C}),!g&&(o.push({type:"PanelContentBegin",panel:C}),ce(l.items.filter(y=>y!==m),n,a,r,t+1,o,d),o.push({type:"PanelContentEnd",panel:C}))}}function An(e){const n=e.location[0]??0,a=e.location[1]??0,r=e.width,t=new Map;for(const c of e.inputs)t.set(`input:${c.identifier}`,c);for(const c of e.outputs)t.set(`output:${c.identifier}`,c);let o=0;const d=e.panelStates,u=[],l=[];ce(e.declaration.items,t,c=>d[o++]?.collapsed??c,e.showOptions,0,u,l);const p=[];let m=a-S;u.length===0&&(m-=O);for(let c=0;c<u.length;c++){const k=u[c];if(!k)continue;const g=u[c-1],C=c===0?_n[k.type]??0:vn[g?.type??"Socket"]?.[k.type]??0;if(m-=C*_,k.type==="Socket"){const y=m;k.output&&p.push(M(k.output,!0,n+r,y-O,y)),k.input&&p.push(M(k.input,!1,n,y-O,y)),m=y-S;continue}if(k.type==="Layout"||k.type==="Separator"){m-=S;continue}if(k.type==="PanelHeader"&&k.panel){m-=oe/2,k.panel.centerY=m,m-=oe/2,k.panel.toggle&&p.push(M(k.panel.toggle,!1,n,k.panel.centerY,k.panel.centerY));continue}k.type==="PanelContentBegin"&&k.panel&&(k.panel.contentTop=m),k.type==="PanelContentEnd"&&k.panel&&(k.panel.contentBottom=m)}const x=u[u.length-1];x&&(m-=(Mn[x.type]??0)*_);for(const c of l)if(c.collapsed)for(const k of c.owned){if(!A(k))continue;const g=e.outputs.includes(k);p.push(M(k,g,g?n+r:n,c.centerY,c.centerY,!0))}for(let c=u.length-1;c>=0;c--){const k=u[c];if(!k||k.type!=="PanelContentEnd")break;k.panel&&(k.panel.fillsNodeEnd=!0)}return{name:e.name,x:n,yTop:a,yBottom:Math.min(m,a-2*S),width:r,collapsed:!1,sockets:p,panels:l.map(c=>({name:c.name,depth:c.depth,collapsed:c.collapsed,centerY:c.centerY,contentTop:c.contentTop,contentBottom:c.contentBottom,fillsNodeEnd:c.fillsNodeEnd,toggle:c.toggle?M(c.toggle,!1,n,c.centerY,c.centerY):null}))}}function bn(e){const n=a=>a.some(r=>r.kind==="layout"?!0:r.kind==="panel"?n(r.items):!1);return n(e.items)}const dt="workspace.document",lt="Shader Editor";Ce(Ne);const Dn=320,ue=.1,se=4;function mt(){const e=T.useSyncExternalStore(Te,Q,Q),[n,a]=T.useState(null),[r,t]=T.useState(null),o=T.useRef(null),d=T.useRef(!1);T.useSyncExternalStore(Ee,ee,ee);const{transform:u,looked:l,refusal:p,size:m}=U(),x=T.useCallback(s=>{const f=U().transform;B({transform:typeof s=="function"?s(f):s})},[]),c=T.useCallback(s=>{B({looked:s,refusal:null})},[]),k=T.useCallback(s=>{const f=U().size;f.w===s.w&&f.h===s.h||B({size:s})},[]),g=T.useCallback(s=>{we(s)},[]);T.useEffect(()=>{let s=!0;return(async()=>{try{const f=await Oe();if(!s)return;a(f),t(null)}catch(f){if(!s)return;t(f instanceof Error?f.message:String(f))}})(),()=>{s=!1}},[e]),T.useEffect(()=>{const s=o.current;if(!s)return;const f=new ResizeObserver(()=>{k({w:s.clientWidth,h:s.clientHeight})});return f.observe(s),k({w:s.clientWidth,h:s.clientHeight}),()=>f.disconnect()},[]);const C=T.useMemo(()=>$n(n),[n]);T.useEffect(()=>{B({drawn:[...C.frames,...C.nodes].map(({node:s,laid:f,panels:v,fallback:ye})=>{const J=f.sockets.find(H=>!H.panelCollapsed)??f.sockets[0];return{panels:v.length,collapsedPanels:v.filter(H=>H.collapsed).length,panelFallback:ye,name:s.name,x:f.x,yTop:f.yTop,yBottom:f.yBottom,width:f.width,height:f.yTop-f.yBottom,sockets:f.sockets.length,firstSocketBelowTop:J?f.yTop-J.y:null,header:K(s)}})})},[C]);const y=T.useCallback(()=>{const s=Fn(C.nodes);if(!s)return;const f=de(Math.min(m.w/(s.w+2*S),m.h/(s.h+2*S)),ue,se);B({transform:{cx:s.x+s.w/2,cy:s.y-s.h/2,zoom:f},framedAt:Date.now()})},[C.nodes,m.h,m.w]),E=Ie(),P=T.useRef(0);T.useEffect(()=>{E!==P.current&&(P.current=E,y())},[E,y]),T.useEffect(()=>{d.current||C.nodes.length===0||m.w<=1||(d.current=!0,y())},[C.nodes.length,m.w,y]);const W=T.useRef(null),fe=s=>{s.button===1&&(s.preventDefault(),s.target.setPointerCapture?.(s.pointerId),W.current={x:s.clientX,y:s.clientY,cx:u.cx,cy:u.cy})},he=s=>{const f=W.current;f&&x(v=>({...v,cx:f.cx-(s.clientX-f.x)/v.zoom,cy:f.cy+(s.clientY-f.y)/v.zoom}))},q=()=>{W.current=null},ge=s=>{s.preventDefault(),x(f=>({...f,zoom:de(f.zoom*(s.deltaY<0?1.1:1/1.1),ue,se)}))},Se=n?.nodes.find(s=>s.name===l)??null,xe=u.zoom>kn;return i.jsxs("div",{"data-testid":"blender-node-editor",style:{display:"flex",position:"absolute",inset:0,overflow:"hidden"},children:[i.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:1,minWidth:0,minHeight:0},children:[i.jsx(Xn,{tree:n,zoom:u.zoom,onViewAll:y,onRefuse:g}),i.jsx("div",{ref:o,style:{position:"relative",flex:1,minHeight:0},children:i.jsx("svg",{role:"presentation",width:"100%",height:"100%",onPointerDown:fe,onPointerMove:he,onPointerUp:q,onPointerCancel:q,onWheel:ge,onContextMenu:s=>{s.preventDefault(),g("The node context menu adds, deletes and reconnects nodes — editing.")},style:{display:"block",background:h.background,cursor:"default"},children:i.jsxs("g",{transform:`translate(${m.w/2} ${m.h/2}) scale(${u.zoom} ${-u.zoom}) translate(${-u.cx} ${-u.cy})`,children:[C.frames.map(s=>i.jsx(Vn,{node:s.node,laid:s.laid},s.node.name)),C.links.map(s=>i.jsx(zn,{link:s},s.key)),C.nodes.map(s=>i.jsx(Gn,{node:s.node,laid:s.laid,panels:s.panels,looked:s.node.name===l,details:xe,onLook:()=>c(s.node.name),onRefuse:g},s.node.name))]})})}),i.jsx(Kn,{entries:C.nodes,error:r,refusal:p})]}),i.jsx(Zn,{node:Se,onRefuse:g})]})}const Bn=26,Ln=22,jn=mn;function $n(e){if(!e)return{nodes:[],frames:[],links:[]};const n=new Map,a=e.nodes.map(t=>{const o={name:t.name,location:t.location,width:t.width,collapsed:t.collapsed,inputs:t.inputs,outputs:t.outputs},d=t.collapsed?void 0:jn[t.idname];if(t.panelCount>0&&!d){const l=V(o);return n.set(t.name,l),{node:t,laid:l,panels:[],fallback:t.collapsed?null:"no traced declaration — the trace covers the 36 node types that declare a panel in Blender 5.2.0, and a node group’s panels are runtime data",approximate:!1}}if(d){const l=Pn(d,t.inputs,t.outputs);if(l.ok){const m=An({...o,declaration:d,panelStates:t.panels,showOptions:t.showOptions});return n.set(t.name,m),{node:t,laid:m,panels:m.panels,fallback:null,approximate:bn(d)}}const p=V(o);return n.set(t.name,p),{node:t,laid:p,panels:[],fallback:l.why,approximate:!1}}const u=V(o);return n.set(t.name,u),{node:t,laid:u,panels:[],fallback:null,approximate:!1}}),r=e.links.flatMap((t,o)=>{const d=n.get(t.fromNode),u=n.get(t.toNode);if(!d||!u)return[];const l=d.sockets.find(m=>m.output&&m.identifier===t.fromSocket),p=u.sockets.find(m=>!m.output&&m.identifier===t.toSocket);return!l||!p?[]:[{key:`${t.fromNode}.${t.fromSocket}→${t.toNode}.${t.toSocket}#${o}`,from:[l.x,l.y],to:[p.x,p.y],fromColor:G(l.type),toColor:G(p.type),muted:t.muted,valid:t.valid}]});return{nodes:a.filter(t=>t.node.idname!=="NodeFrame"),frames:a.filter(t=>t.node.idname==="NodeFrame"),links:r}}function Fn(e){if(e.length===0)return null;let n=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY,t=Number.NEGATIVE_INFINITY;for(const{laid:o}of e)n=Math.min(n,o.x),a=Math.max(a,o.x+o.width),r=Math.min(r,o.yBottom),t=Math.max(t,o.yTop);return{x:n,y:t,w:a-n,h:t-r}}const de=(e,n,a)=>Math.min(a,Math.max(n,e));function Gn({node:e,laid:n,panels:a,looked:r,details:t,onLook:o,onRefuse:d}){if(e.type==="REROUTE"){const g=n.sockets[0];return i.jsx("circle",{cx:n.x,cy:n.yTop,r:hn,fill:g?G(g.type):h.wireInner,stroke:pe,strokeWidth:F,onPointerDown:C=>{C.button===0&&o()}})}const u=e.muted?ie(K(e),En):K(e),l=e.muted?ie(te(e),wn):te(e),p=e.muted?1-On:1,m=e.selected?e.activeOutput||r?h.active:h.select:h.outline,x=e.selected?1:h.outlineAlpha,c=n.yTop-n.yBottom,k=e.label??e.typeLabel;return i.jsxs("g",{opacity:p,onPointerDown:g=>{g.button===0&&o()},onDoubleClick:()=>d(`Renaming "${e.name}" writes Node.name — editing parity is not the program.`),style:{cursor:"default"},children:[n.collapsed?i.jsx("rect",{x:n.x-w,y:-n.yTop-w,width:n.width+2*w,height:c+2*w,rx:Y,fill:u,transform:"scale(1 -1)"}):i.jsxs(i.Fragment,{children:[i.jsx("rect",{x:n.x-w,y:-(n.yTop-S)-w,width:n.width+2*w,height:c-S+2*w,rx:Y,fill:l,transform:"scale(1 -1)"}),i.jsx("rect",{x:n.x-w,y:-n.yTop-w,width:n.width+2*w,height:S+2*w,rx:Y,fill:u,transform:"scale(1 -1)"}),i.jsx("rect",{x:n.x-w,y:-(n.yTop-S)-w,width:n.width+2*w,height:D,fill:u,transform:"scale(1 -1)"}),a.map(g=>i.jsx(Wn,{panel:g,laid:n},`bg:${g.name}`))]}),i.jsx("rect",{x:n.x-N,y:-n.yTop-N,width:n.width+2*N,height:c+2*N,rx:cn,fill:"none",stroke:m,strokeOpacity:x,strokeWidth:N,transform:"scale(1 -1)"}),i.jsx("text",{x:n.x+Z,y:-(n.yTop-S/2),transform:"scale(1 -1)",fill:h.text,fontSize:R,dominantBaseline:"central",style:{pointerEvents:"none",userSelect:"none"},children:k}),t&&n.sockets.map(g=>i.jsx(Un,{socket:g,node:n,onRefuse:d},`${g.output?"o":"i"}:${g.identifier}`)),t&&a.map(g=>i.jsx(Hn,{panel:g,laid:n,onRefuse:d},`hd:${g.name}`))]})}function Wn({panel:e,laid:n}){if(e.contentTop===null||e.contentBottom===null)return null;const a=[{y:e.contentTop,height:e.contentTop-e.contentBottom,radius:0,times:1}];return e.fillsNodeEnd&&a.push({y:e.contentBottom,height:e.contentBottom-n.yBottom,radius:D,times:e.depth+1}),i.jsx("g",{style:{pointerEvents:"none"},children:a.flatMap((r,t)=>Array.from({length:r.times},(o,d)=>i.jsx("rect",{x:n.x,y:-r.y,width:n.width,height:Math.max(r.height,0),rx:r.radius,fill:Nn,fillOpacity:Rn,transform:"scale(1 -1)"},`${t}:${d}`)))})}function Hn({panel:e,laid:n,onRefuse:a}){const r=pn,t=r/$.cell,o=n.x+X+r/2,d=e.centerY,u=$.reach*t,l=$.spread*t,p=e.collapsed?`M ${o-u/2} ${-(d+l)} L ${o+u/2} ${-d} L ${o-u/2} ${-(d-l)}`:`M ${o-l} ${-(d+u/2)} L ${o} ${-(d-u/2)} L ${o+l} ${-(d+u/2)}`,m=n.x+X+r+re+(e.toggle&&!e.toggle.linked?In:0);return i.jsxs("g",{onPointerDown:x=>{x.button===0&&(x.stopPropagation(),a(`${e.collapsed?"Opening":"Collapsing"} "${e.name}" writes the panel's is_collapsed — editing parity is not the program.`))},style:{cursor:"default"},children:[i.jsx("rect",{x:n.x,y:-(d+O),width:n.width,height:2*O,fill:"transparent",transform:"scale(1 -1)"}),i.jsx("path",{d:p,fill:"none",stroke:h.text,strokeWidth:$.stroke*t,strokeLinecap:"round",strokeLinejoin:"round",transform:"scale(1 -1)",style:{pointerEvents:"none"}}),e.toggle&&!e.toggle.linked&&i.jsx("rect",{x:n.x+X+r+re,y:-(d+O/2),width:O,height:O,rx:.2*O,fill:e.toggle.value===!0?"#4772b3":"#545454",transform:"scale(1 -1)",style:{pointerEvents:"none"}}),i.jsx("text",{x:m,y:-d,transform:"scale(1 -1)",fill:h.text,fontSize:R,dominantBaseline:"central",style:{pointerEvents:"none",userSelect:"none"},children:e.name})]})}function Un({socket:e,node:n,onRefuse:a}){const r=G(e.type),t=e.type==="CUSTOM"?Cn:pe,o=me,d=e.shape.replace("_DOT",""),u=e.shape.endsWith("_DOT"),l=d==="SQUARE"?i.jsx("rect",{x:e.x-o,y:-e.y-o,width:2*o,height:2*o,fill:r,stroke:t,strokeWidth:F,transform:"scale(1 -1)"}):d==="DIAMOND"?i.jsx("polygon",{points:`${e.x},${-e.y-o} ${e.x+o},${-e.y} ${e.x},${-e.y+o} ${e.x-o},${-e.y}`,fill:r,stroke:t,strokeWidth:F,transform:"scale(1 -1)"}):i.jsx("circle",{cx:e.x,cy:-e.y,r:o,fill:r,stroke:t,strokeWidth:F,transform:"scale(1 -1)"});return i.jsxs("g",{onPointerDown:p=>{p.button===0&&(p.stopPropagation(),a(`Dragging from "${e.name}" would make a link — editing parity is not the program.`))},children:[l,u&&i.jsx("circle",{cx:e.x,cy:-e.y,r:o*.35,fill:t,transform:"scale(1 -1)"}),!n.collapsed&&!e.panelCollapsed&&i.jsx(Yn,{socket:e,node:n,onRefuse:a})]})}function Yn({socket:e,node:n,onRefuse:a}){const r=O,t=n.x+r,o=n.x+n.width-r,d=-(e.rowTop-S/2);if(!(!e.output&&!e.linked&&!e.hideValue&&e.value!==null))return i.jsx("text",{x:e.output?o:t,y:d,transform:"scale(1 -1)",textAnchor:e.output?"end":"start",fill:h.text,fontSize:R,dominantBaseline:"central",style:{pointerEvents:"none",userSelect:"none"},children:e.name});const l=Array.isArray(e.value)&&e.value.length>=3;return i.jsxs("g",{onPointerDown:p=>{p.button===0&&(p.stopPropagation(),a(`Changing "${e.name}" writes the socket's default_value — editing parity is not the program.`))},style:{cursor:"default"},children:[i.jsx("rect",{x:t,y:d-S/2+1,width:o-t,height:S-2,rx:.2*S,fill:"#545454",transform:"scale(1 -1)"}),le(e)!==null&&i.jsxs(i.Fragment,{children:[i.jsx("clipPath",{id:`sl-${e.identifier}`,children:i.jsx("rect",{x:t,y:d-S/2+1,width:o-t,height:S-2,rx:.2*S})}),i.jsx("rect",{x:t,y:d-S/2+1,width:(o-t)*(le(e)??0),height:S-2,fill:h.sliderFill,clipPath:`url(#sl-${e.identifier})`,transform:"scale(1 -1)"})]}),i.jsx("text",{x:t+6,y:d,transform:"scale(1 -1)",fill:h.text,fontSize:R,dominantBaseline:"central",style:{pointerEvents:"none",userSelect:"none"},children:e.name}),l?i.jsx("rect",{x:o-34,y:d-S/2+3,width:30,height:S-6,rx:2,fill:b(e.value),transform:"scale(1 -1)"}):i.jsx("text",{x:o-6,y:d,transform:"scale(1 -1)",textAnchor:"end",fill:h.text,fontSize:R,dominantBaseline:"central",style:{pointerEvents:"none",userSelect:"none"},children:ke(e.value)})]})}function le(e){const{softMin:n,softMax:a,value:r}=e;return n===void 0||a===void 0||typeof r!="number"||a<=n?null:Math.min(1,Math.max(0,(r-n)/(a-n)))}function ke(e){return e===null?"":typeof e=="boolean"?e?"On":"Off":typeof e=="number"?e.toFixed(3):typeof e=="string"?e:e.map(n=>n.toFixed(2)).join(", ")}function zn({link:e}){const[n,a]=Tn(e.from,e.to),r=`M ${e.from[0]} ${e.from[1]} C ${n[0]} ${n[1]}, ${a[0]} ${a[1]}, ${e.to[0]} ${e.to[1]}`,t=e.valid?h.wireInner:"#ff2020";return i.jsxs("g",{style:{pointerEvents:"none"},children:[i.jsx("path",{d:r,fill:"none",stroke:h.wire,strokeWidth:ne+2*N}),i.jsx("path",{d:r,fill:"none",stroke:t,strokeWidth:ne,strokeDasharray:e.muted?"10 10":void 0,strokeOpacity:e.muted?h.dashAlpha:1})]})}function Vn({node:e,laid:n}){const a=Math.max(n.yTop-n.yBottom,gn*2);return i.jsxs("g",{style:{pointerEvents:"none"},children:[i.jsx("rect",{x:n.x,y:-n.yTop,width:n.width,height:a,rx:D,fill:e.useCustomColor?b(e.color):h.frame,fillOpacity:h.frameAlpha,transform:"scale(1 -1)"}),e.label&&i.jsx("text",{x:n.x+n.width/2,y:-(n.yTop-25),transform:"scale(1 -1)",textAnchor:"middle",fill:h.text,fontSize:20,children:e.label})]})}function Xn({tree:e,zoom:n,onViewAll:a,onRefuse:r}){return i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--vgai-space-2)",height:Bn,padding:"0 var(--vgai-space-2)",background:h.background,color:h.text,font:`${R}px inherit`,borderBottom:"1px solid #161616"},children:[i.jsx("span",{"data-testid":"node-editor-tree-type",style:{opacity:.85},children:e?.typeLabel??"Shader Editor"}),i.jsx("span",{style:{opacity:.4},children:"·"}),i.jsx("span",{"data-testid":"node-editor-material",children:e?.material??"No material"}),i.jsx("span",{style:{flex:1}}),i.jsxs("span",{style:{opacity:.6},children:[Math.round(n*100),"%"]}),i.jsx("button",{type:"button",className:"vgai-btn","data-variant":"ghost","data-size":"sm",onClick:a,"data-testid":"node-editor-view-all",children:"View All"}),i.jsx("button",{type:"button",className:"vgai-btn","data-variant":"ghost","data-size":"sm","data-testid":"node-editor-use-nodes",onClick:()=>r("Use Nodes writes Material.use_nodes — editing parity is not the program."),children:"Use Nodes"})]})}function Kn({entries:e,error:n,refusal:a}){const r=e.filter(u=>u.fallback!==null),t=e.filter(u=>u.approximate),o=e.reduce((u,l)=>u+l.panels.length,0),d=n||a||(r.length>0?`${r.map(u=>`"${u.node.name}" draws its sockets flat: ${u.fallback}`).join("; ")}.`:t.length>0?`${t.map(u=>`"${u.node.name}"`).join(", ")} ${t.length===1?"carries a":"carry"} declaration LAYOUT row, whose drawn height RNA cannot answer; one UI unit is reserved for it.`:o>0?`${o} socket panel${o===1?"":"s"} drawn from Blender's own declarations. Read-only: this view inspects the node tree and never writes it.`:"Read-only: this view inspects the node tree and never writes it.");return i.jsx("div",{"data-testid":"node-editor-status",style:{flex:"0 0 auto",height:Ln,display:"flex",alignItems:"center",padding:"0 var(--vgai-space-2)",background:h.background,color:n||a?"#ffa028":"#888888",font:`${R}px inherit`,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:d})}function Zn({node:e,onRefuse:n}){return i.jsxs("aside",{"data-testid":"node-editor-sidebar",style:{width:Dn,flex:"0 0 auto",overflow:"auto",background:h.background,color:h.text,font:`${R}px inherit`,borderLeft:"1px solid #161616",padding:"var(--vgai-space-2)"},children:[i.jsx("div",{style:{opacity:.6,marginBottom:"var(--vgai-space-2)"},children:"Node"}),e?i.jsxs(i.Fragment,{children:[i.jsx(L,{label:"Name",value:e.name,onRefuse:n}),i.jsx(L,{label:"Label",value:e.label??"",onRefuse:n}),i.jsx(L,{label:"Color",value:e.useCustomColor?b(e.color):"Off",onRefuse:n,swatch:e.useCustomColor?b(e.color):void 0}),i.jsx(L,{label:"Mute",value:e.muted?"On":"Off",onRefuse:n}),i.jsx("div",{style:{opacity:.6,margin:"var(--vgai-space-3) 0 var(--vgai-space-1)"},children:"Properties"}),e.inputs.filter(A).map(a=>i.jsx(L,{label:a.label??a.name,value:a.linked?"Linked":ke(a.value),onRefuse:n},a.identifier))]}):i.jsx("div",{style:{opacity:.5},children:"No node looked at."})]})}function L({label:e,value:n,swatch:a,onRefuse:r}){return i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--vgai-space-2)",height:20},onPointerDown:()=>r(`"${e}" is read here and written nowhere — inspection parity.`),children:[i.jsx("span",{style:{flex:"0 0 45%",opacity:.75,textAlign:"right"},children:e}),a&&i.jsx("span",{style:{width:14,height:14,borderRadius:2,background:a,flex:"0 0 auto"}}),i.jsx("span",{style:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},title:n,children:n})]})}export{mt as default,dt as point,lt as title};
|
package/dist/assets/{blender-outliner-model-B8b00oxr.js → blender-outliner-model-CfXIMSXz.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as O}from"./index-
|
|
1
|
+
import{e as O}from"./index-CY4oDLhJ.js";import{b as g,a as F,c as x,d as E}from"./blender-runtime-host-DGe1KLVZ.js";const I=e=>typeof e=="object"&&e!==null&&typeof e.subscribeFrames=="function"&&typeof e.objectForBlenderName=="function"&&typeof e.blenderObjectName=="function"&&typeof e.blenderSelection=="function"&&typeof e.setStageMode=="function";function p(){const e=O().documents.context(F());return I(e)?e:null}function H(){return p()?.blenderSelection()??{selected:[],active:null}}const R={tree:null,byId:new Map,parentOf:new Map,error:null,loading:!1};let d=R,M=0;const b=new Set;let l=null,c=null,S="",i=null;function q(e){const n=new Map,r=new Map,t=(o,P)=>{n.set(o.id,o),r.set(o.id,P);for(const V of o.children)t(V,o.id)};for(const o of e?.rows??[])t(o,null);return{byId:n,parentOf:r}}function u(e){d={...d,...e},M+=1;for(const n of[...b])n()}function K(e){return b.add(e),()=>{b.delete(e)}}function L(){return M}function Y(){return d}function h(e){i!==e&&(i=e,setTimeout(()=>{i===e&&(i=null,B(e===""?[]:e.split("\0")))},0))}let a=0,m=Promise.resolve();function B(e){const n=C(e);return m=n,n}async function C(e){const n=e.join("\0"),r=++a;c=n,S=n,u({loading:!0});try{const t=await E(e);if(r!==a)return;p()?.setStageMode(t?.mode??null),u({tree:t,...q(t),loading:!1,error:null})}catch(t){if(r!==a)return;u({loading:!1,error:j(t)})}}function N(){c=null,h(S);for(const e of[...w])e()}const w=new Set;function v(e){return y(),w.add(e),()=>{w.delete(e)}}let s=!1,f=null;function y(){const e=p();if(l!==null&&f===e)return;l!==null&&(l(),l=null,f=null);const n=e;if(n!==null){l=n.subscribeFrames(N),f=n;return}s||(s=!0,O().documents.waitForContext(F()).then(()=>{s=!1,y()}).catch(()=>{s=!1}))}function z(e){if(!g())return;y();const n=[...e].sort().join("\0");c!==n&&h(n)}async function A(e){if(!g())return;i=null;let n=B([...e].sort());for(;;){if(await n,m===n)return;n=m}}async function G(e,n,r){try{return await x(e,n,r),c=null,h(S),!0}catch(t){return u({error:j(t)}),!1}}function j(e){return e instanceof Error?e.message:String(e)}export{L as a,H as b,p as c,z as d,Y as e,v as o,A as r,K as s,G as w};
|
package/dist/assets/{blender-properties-tab-0M780SHF.js → blender-properties-tab-DYiaVS6T.js}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as i}from"./jsx-runtime-DPjLkJKQ.js";import{e as V}from"./index-
|
|
2
|
-
${e.description}`:""}`,c={row:e,path:t,write:r,onOpen:n},u=e.valueOmitted??e.valueError;if(u!==void 0)return i.jsx(A,{label:l,title:o,readonly:!0,identifier:e.identifier,children:i.jsx(v,{children:u})});if(e.type==="COLLECTION")return i.jsx(
|
|
3
|
-
Not on this datablock: ${u.join(", ")}`,children:[c.map(s=>i.jsx(
|
|
1
|
+
import{a as i}from"./jsx-runtime-DPjLkJKQ.js";import{e as V}from"./index-CY4oDLhJ.js";import{a as H,b as X,x as le,y as oe,s as se,z as ce,p as ue}from"./blender-runtime-host-DGe1KLVZ.js";import{e as de}from"./blender-outliner-model-CfXIMSXz.js";import{r as g}from"./index-DaQZGF7d.js";const ae=e=>typeof e=="object"&&e!==null&&typeof e.subscribeFrames=="function"&&typeof e.blenderObjectName=="function",fe=e=>typeof e=="object"&&e!==null&&typeof e.documentId=="string"&&typeof e.hierarchy?.object3D=="function";function Y(){const e=V().documents.context(H());return ae(e)?e:null}function Z(e,t){if(e===null||!fe(t))return null;const n=Y();if(n===null)return null;if(e.id===t.documentId)return t.documentRootObject===n.root?{kind:"scene"}:null;const r=de().byId.get(e.id);if(r?.type==="TSE_LAYER_COLLECTION")return{kind:"collection",path:r.path};const l=t.hierarchy.object3D(e.id);if(l===null)return null;if(l===n.root)return{kind:"scene"};const o=n.blenderObjectName(l);return o===null?null:{kind:"object",name:o}}let N={object:null,collection:null,context:null,views:new Map,error:null,loading:!1},q=0;const F=new Set;let w=null;const I=new Set;let E=null;function b(e,t=!1){N={...N,...e},q+=1;for(const n of[...F])n();t&&V().documents.contextChanged(H())}function pe(e){return F.add(e),()=>{F.delete(e)}}function G(){return q}function M(){return N}function he(){const e=E;E=null,b({views:new Map}),e!==null&&J(e)}se(()=>{he()});let T=null;function J(e){T!==e&&(T=e,setTimeout(()=>{T===e&&(T=null,ge(e))},0))}function xe(e){return e.kind==="scene"?"":e.kind==="collection"?`collection:${e.path}`:e.name}function ye(){if(w!==null)return;const e=Y();e!==null&&(w=e.subscribeFrames(le))}async function ge(e){const t=e.startsWith("collection:")?e.slice(11):null,n=t===null&&e!==""?e:null;E=e,b({loading:!0,object:n,collection:t});try{const r=await oe(n??void 0,t??void 0);if(E!==e)return;b({context:r,loading:!1,error:null},!0)}catch(r){if(E!==e)return;b({context:null,loading:!1,error:D(r)},!0)}}function Q(e){if(!X())return;ye();const t=xe(e);E!==t&&J(t)}function R(e){const t=N.views.get(e);if(t!==void 0)return t;I.has(e)||!X()||(I.add(e),ce(e).then(n=>{if(I.delete(e),n===null)return;const r=new Map(N.views);r.set(e,n),b({views:r,error:null})}).catch(n=>{I.delete(e),b({error:D(n)})}))}async function be(e,t,n,r){try{await ue(e,t,n,r);const l=new Map(N.views);return l.delete(e),b({views:l,error:null}),!0}catch(l){return b({error:D(l)}),!1}}function D(e){return e instanceof Error?e.message:String(e)}const $=20,K=2,je="40%",me=25,U=20,m=8,ve=4,z=8,p=11,y=.5,x="#e6e6e6",Se="#3d3d3d",Ee="#ffffff11",Ae="rgba(0,0,0,0.12)",Ne="#545454",Re="#3d3d3d",$e="#4772b3",ee="#991616",Oe=8,Le=6,Ce=e=>Math.round(e*.2),te=e=>e.filter(t=>t.hidden!==!0&&t.undrawn!==!0);function C(){return g.useSyncExternalStore(pe,G,G)}function h({title:e,sub:t=!1,closed:n=!1,note:r,count:l,children:o}){const[c,u]=g.useState(!n);return i.jsxs("div",{style:{marginBottom:m,borderRadius:ve,boxShadow:t?"none":`inset 0 0 0 1px ${Ee}`,background:t?Ae:"transparent",overflow:"hidden"},children:[i.jsxs("button",{type:"button",onClick:()=>u(!c),style:{display:"flex",alignItems:"center",width:"100%",height:me,background:t?"transparent":Se,border:"none",padding:`0 ${z}px 0 ${t?U+14-20:0}px`,color:x,font:`${p}px inherit`,textAlign:"left",cursor:"pointer",gap:Le},children:[i.jsx("span",{"aria-hidden":"true",style:{width:U-8,textAlign:"center",fontSize:Oe,opacity:.85},children:c?"▼":"▶"}),i.jsx("span",{style:{fontWeight:400},title:r,children:e}),l===void 0?null:i.jsx("span",{style:{opacity:y,marginLeft:"auto"},children:l})]}),c?i.jsx("div",{style:{padding:m},children:o}):null]})}function A({label:e,title:t,readonly:n,identifier:r,children:l}){return i.jsxs("div",{"data-rna-field":r??"","data-field-label":e,"data-field-readonly":n?"true":void 0,style:{display:"flex",alignItems:"center",minHeight:$,marginBottom:K,gap:z,opacity:n?y:1},title:t,children:[i.jsx("span",{style:{flex:`0 0 ${je}`,textAlign:"right",color:x,fontSize:p,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e}),i.jsx("span",{style:{flex:"1 1 0",minWidth:0,display:"flex",gap:K},children:l})]})}const j={height:$,width:"100%",minWidth:0,boxSizing:"border-box",background:Ne,border:`1px solid ${Re}`,borderRadius:Ce($),color:x,fontSize:p,padding:`0 ${z}px`,textAlign:"center"};function v({children:e}){return i.jsx("span",{style:{...j,display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e})}const B=$-2*Math.floor(($-2)/6);function ne({value:e,readonly:t,label:n,onChange:r}){return i.jsx("input",{type:"checkbox",checked:e,readOnly:t,...n===void 0?{}:{"aria-label":n},onChange:l=>!t&&r(l.target.checked),style:{width:B,height:B,margin:`${($-B)/2}px 0`,accentColor:$e,cursor:t?"default":"pointer"}})}function ie({row:e,value:t,index:n,onWrite:r}){const[l,o]=g.useState(null),c=e.type==="FLOAT"?e.precision??3:0,u=l??(e.type==="FLOAT"?t.toFixed(c):String(t));return e.readonly?i.jsx(v,{children:u}):i.jsx("input",{type:"number","aria-label":O(e,n),value:u,...e.softMin===void 0?{}:{min:e.softMin},...e.softMax===void 0?{}:{max:e.softMax},...e.step===void 0?{}:{step:e.type==="FLOAT"?e.step/100:1},onChange:s=>o(s.target.value),onBlur:()=>{const s=Number(l);o(null),l!==null&&Number.isFinite(s)&&s!==t&&r(s,n)},onKeyDown:s=>{s.key==="Enter"&&s.target.blur(),s.key==="Escape"&&o(null)},style:j})}const k=["X","Y","Z","W"];function O(e,t){const n=e.name||e.identifier;return t===void 0?n:`${n} ${k[t]??t}`}function Ie(e){const t=n=>Math.max(0,Math.min(255,Math.round((e[n]??0)**.45454545454545453*255)));return`rgb(${t(0)}, ${t(1)}, ${t(2)})`}function Te({row:e,onOpen:t}){const n=e.value;if(n===null||n.path===null)return i.jsx(v,{children:n===null?"None":n.name??n.type});const r=n.path;return i.jsx("button",{type:"button","aria-label":O(e),onClick:()=>t(r),style:{...j,cursor:"pointer",textAlign:"left"},title:r,children:n.name??n.type})}function Pe({row:e,write:t}){const n=e.items??[];if(e.isFlag){const l=e.value??[];return i.jsx(v,{children:l.length===0?"None":l.join(", ")})}const r=String(e.value??"");return e.readonly?i.jsx(v,{children:n.find(l=>l.identifier===r)?.name??r}):i.jsx("select",{"aria-label":O(e),value:r,onChange:l=>t(l.target.value),style:{...j,textAlign:"left"},children:n.map(l=>i.jsx("option",{value:l.identifier,children:l.name},l.identifier))})}function ke({row:e,write:t}){const n=String(e.value??"");return e.readonly?i.jsx(v,{children:n}):i.jsx(De,{value:n,label:O(e),onWrite:r=>t(r)})}function Me({row:e}){const t=e.value??[];return i.jsx("span",{style:{...j,background:Ie(t),display:"block"},title:t.map(n=>n.toFixed(3)).join(", ")})}function Be({row:e,label:t,title:n,write:r}){const l=e.value??[];return i.jsx(i.Fragment,{children:l.map((o,c)=>i.jsx(A,{label:Fe(t,c,l.length),title:n,readonly:e.readonly,identifier:`${e.identifier}[${c}]`,children:e.type==="BOOLEAN"?i.jsx(ne,{value:o===!0,readonly:e.readonly,label:O(e,c),onChange:u=>r(u,c)}):i.jsx(ie,{row:e,value:Number(o),index:c,onWrite:(u,s)=>r(u,s)})},`${e.identifier}-${k[c]??c}`))})}function Fe(e,t,n){return n>k.length?t===0?e:`${e} ${t}`:`${t===0?`${e} `:""}${k[t]}`}function _e(e){const{row:t,write:n}=e;switch(t.type){case"POINTER":return i.jsx(Te,{...e});case"ENUM":return i.jsx(Pe,{...e});case"STRING":return i.jsx(ke,{...e});case"BOOLEAN":return i.jsx(ne,{value:t.value===!0,readonly:t.readonly,label:O(t),onChange:n});default:return i.jsx(ie,{row:t,value:Number(t.value??0),onWrite:r=>n(r)})}}function W({row:e,path:t,onOpen:n}){const r=(d,f)=>void be(t,e.identifier,d,f),l=e.name||e.identifier,o=`${e.identifier} — ${e.type}${e.subtype==="NONE"?"":`/${e.subtype}`}${e.readonly?" (read-only)":""}${e.description?`
|
|
2
|
+
${e.description}`:""}`,c={row:e,path:t,write:r,onOpen:n},u=e.valueOmitted??e.valueError;if(u!==void 0)return i.jsx(A,{label:l,title:o,readonly:!0,identifier:e.identifier,children:i.jsx(v,{children:u})});if(e.type==="COLLECTION")return i.jsx(ze,{label:l,title:o,value:e.value??{count:0},identifier:e.identifier,onOpen:()=>n(`${t}.${e.identifier}`)});const s=e.type==="INT"||e.type==="FLOAT";return e.arrayLength>0&&(s||e.type==="BOOLEAN")?s&&(e.subtype==="COLOR"||e.subtype==="COLOR_GAMMA")?i.jsx(A,{label:l,title:o,readonly:e.readonly,identifier:e.identifier,children:i.jsx(Me,{...c})}):i.jsx(Be,{...c,label:l,title:o}):i.jsx(A,{label:l,title:o,readonly:e.readonly,identifier:e.identifier,children:_e(c)})}function De({value:e,label:t,onWrite:n}){const[r,l]=g.useState(null);return i.jsx("input",{type:"text",...t===void 0?{}:{"aria-label":t},value:r??e,onChange:o=>l(o.target.value),onBlur:()=>{r!==null&&r!==e&&n(r),l(null)},onKeyDown:o=>{o.key==="Enter"&&o.target.blur(),o.key==="Escape"&&l(null)},style:{...j,textAlign:"left"}})}function ze({label:e,title:t,value:n,identifier:r,onOpen:l}){const[o,c]=g.useState(!1),u=n.names??[];return i.jsxs(i.Fragment,{children:[i.jsx(A,{label:e,title:t,readonly:!1,identifier:r,children:i.jsxs("button",{type:"button","aria-label":e,onClick:()=>u.length?c(!o):l(),style:{...j,cursor:"pointer",textAlign:"left"},children:[u.length?`${o?"▼":"▶"} `:"",n.count," ",n.count===1?"item":"items"]})}),o?u.map(s=>i.jsx(A,{label:"",readonly:!0,children:i.jsx(v,{children:s})},s)):null]})}const _=e=>typeof e=="string"?e:e.property;function We(e){if(e.active===void 0)return{path:null,index:null};const t=M().context?.[e.active];if(typeof t!="object"||t===null)return{path:null,index:null};const n=t;return{path:n.path??null,index:typeof n.index=="number"?n.index:null}}function we({panel:e,path:t,onOpen:n}){C();const r=R(t),l=We(e);return r===void 0?i.jsx(h,{title:e.title,closed:e.closed===!0,children:i.jsxs("div",{style:{color:x,opacity:y,fontSize:p},children:["Reading ",t,"…"]})}):r.kind!=="collection"?i.jsx(h,{title:e.title,closed:e.closed===!0,note:t,children:i.jsxs("div",{style:{color:ee,fontSize:p},children:[t," is not a collection — this panel is declared `collection: true`."]})}):i.jsxs(h,{title:e.title,closed:e.closed===!0,note:t,count:r.count,children:[r.items.length===0?i.jsx("div",{style:{color:x,opacity:y,fontSize:p},children:"None"}):null,r.items.map((o,c)=>i.jsx(h,{title:`${o.path!==null&&o.path===l.path||c===l.index?"● ":""}${o.name??o.type}`,sub:!0,children:o.path===null?i.jsxs("div",{style:{color:x,opacity:y,fontSize:p},children:[o.type," — RNA gives this member no address."]}):i.jsx(Ge,{path:o.path,properties:e.properties,andDeclared:e.andDeclared===!0,onOpen:n})},o.path??o.name??o.type))]})}function Ge({path:e,properties:t,andDeclared:n=!1,onOpen:r}){C();const l=R(e);if(l===void 0)return i.jsxs("div",{style:{color:x,opacity:y,fontSize:p},children:["Reading ",e,"…"]});const o=l.kind==="struct"?l.groups.flatMap(d=>d.rows):[],c=new Map(o.map(d=>[d.identifier,d])),u=t.map(d=>c.get(_(d))).filter(d=>d!==void 0),s=n&&l.kind==="struct"?te(o).filter(d=>d.group===l.type&&!t.some(f=>_(f)===d.identifier)):[];return i.jsx(i.Fragment,{children:[...u,...s].map(d=>i.jsx(W,{row:d,path:e,onOpen:r},d.identifier))})}function Ke(e,t){if(e.engine!==void 0){const n=M().context?.engine;if(n===void 0)return null;if(!e.engine.includes(n))return!1}for(const n of e.when??[]){const r=n.from??e.from,l=r?t.find(s=>s.label===r):t[0];if(l===void 0)return!1;const o=R(l.path);if(o===void 0)return null;if(o.kind!=="struct")return!1;const c=o.groups.flatMap(s=>s.rows).find(s=>s.identifier===n.property);if(c===void 0)return!1;const u=c.value;if(typeof u!="string"&&typeof u!="number"&&typeof u!="boolean"||n.is!==void 0&&!n.is.includes(u)||n.isNot!==void 0&&n.isNot.includes(u))return!1}return!0}function re({panel:e,paths:t,onOpen:n}){if(C(),Ke(e,t)!==!0)return null;const r=e.from?t.find(s=>s.label===e.from):t[0];if(r!==void 0&&e.collection===!0)return i.jsx(we,{panel:e,path:r.path,onOpen:n});if(r===void 0)return null;const l=R(r.path),o=e.sub??[],c=[],u=[];for(const s of e.properties){const d=_(s),f=typeof s=="string"?r:t.find(L=>L.label===s.from),a=f===void 0?void 0:R(f.path),S=a?.kind==="struct"?a.groups.flatMap(L=>L.rows).find(L=>L.identifier===d):void 0;S===void 0||f===void 0?u.push(d):c.push({identifier:d,row:S,path:f.path})}return l===void 0?i.jsx(h,{title:e.title,closed:e.closed===!0,children:i.jsxs("div",{style:{color:x,opacity:y,fontSize:p},children:["Reading ",r.path,"…"]})}):c.length===0&&o.length===0?null:i.jsxs(h,{title:e.title,closed:e.closed===!0,note:u.length===0?`${r.path}`:`${r.path}
|
|
3
|
+
Not on this datablock: ${u.join(", ")}`,children:[c.map(s=>i.jsx(W,{row:s.row,path:s.path,onOpen:n},s.identifier)),o.map((s,d)=>i.jsx(re,{panel:s,paths:t,onOpen:n},`${d}:${s.title}`))]})}function P({path:e,onOpen:t}){C();const n=R(e);return n===void 0?i.jsxs("div",{style:{color:x,opacity:y,fontSize:p,padding:m},children:["Reading ",e,"…"]}):n.kind==="collection"?i.jsxs(i.Fragment,{children:[n.items.length===0?i.jsx("div",{style:{color:x,opacity:y,fontSize:p},children:n.count===0?"None":`${n.count} items`}):null,n.items.map(r=>i.jsx(h,{title:r.name??r.type,sub:!0,children:r.path===null?i.jsxs("div",{style:{color:x,opacity:y,fontSize:p},children:[r.type," — RNA gives this member no address."]}):i.jsx(P,{path:r.path,onOpen:t})},r.path??r.name??r.type))]}):i.jsx(i.Fragment,{children:n.groups.map(r=>{const l=te(r.rows);return l.length===0?null:i.jsx(h,{title:r.label,sub:!0,children:l.map(o=>i.jsx(W,{row:o,path:n.path,onOpen:t},o.identifier))},r.id)})})}function Ue({tabId:e,subject:t,curated:n=[]}){C(),g.useEffect(()=>Q(t),[t]);const[r,l]=g.useState([]),o=M(),c=o.context?.tabs.find(a=>a.id===e)??null,u=c?.paths??[],s=u.map(a=>a.path).join("|");if(g.useEffect(()=>l([]),[s]),o.error!==null)return i.jsx("div",{style:{color:ee,fontSize:p,padding:m},children:o.error});if(c===null)return i.jsx("div",{style:{color:x,opacity:y,fontSize:p,padding:m},children:o.loading?"Reading the engine…":"Blender shows no properties here."});const d=a=>l(S=>[...S,a]),f=r[r.length-1];return i.jsxs("div",{style:{padding:`${m}px 0`},children:[r.length>0?i.jsxs("button",{type:"button",onClick:()=>l(a=>a.slice(0,-1)),style:{...j,width:"auto",marginBottom:m,cursor:"pointer",textAlign:"left"},title:f,children:["← ",c.label]}):null,f!==void 0?i.jsx(h,{title:f.slice(f.lastIndexOf(".")+1),children:i.jsx(P,{path:f,onOpen:d})}):i.jsxs(i.Fragment,{children:[n.map((a,S)=>i.jsx(re,{panel:a,paths:u,onOpen:d},`${S}:${a.title}`)),n.length>0?i.jsx(h,{title:"All properties",closed:!0,children:u.map(a=>i.jsx(h,{title:a.label,sub:!0,children:i.jsx(P,{path:a.path,onOpen:d})},a.path))}):u.map(a=>i.jsx(h,{title:a.label,children:i.jsx(P,{path:a.path,onOpen:d})},a.path))]})]})}function qe(e){return(t,n)=>{const r=Z(t,n);if(r===null)return!1;if(Q(r),e.standing==="any")return!0;if(e.standing==="object")return r.kind==="object";const l=M(),o=r.kind==="object"?r.name:null,c=r.kind==="collection"?r.path:null;return l.object!==o||l.collection!==c?!1:l.context?.tabs.some(u=>u.id===e.id)??!1}}function Je(e){return function({node:n,adapter:r}){const l=Z(n,r);return l===null?null:i.jsx(Ue,{tabId:e.id,subject:l,curated:e.curated??[]})}}export{qe as a,Je as b,M as c,Z as r};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{bS as Ve,bT as We,e as _,ac as Ge,bU as ze}from"./index-CY4oDLhJ.js";import{d as He,W as ve,H as qe,br as Xe,i as Ze,bK as le,w as Ke,x as Ye,af as xe,V as te,bl as Je,$ as Qe,k as et,bL as tt,bf as ke}from"./three.module-BynznMJN.js";import{f as nt}from"./clip-planes-CnAI6DZn.js";class rt{#r;#s;#n=new Map;#y=0;#p=null;#i=new Map;#l=null;#u=0;#f=0;#w=0;#a=null;#g=null;#d=null;constructor(t){this.#s=t,this.#r=new Worker(new URL("/assets/worker-29OHwCKe.js",import.meta.url),{type:"module",name:"blender"}),this.#r.onmessage=n=>void this.#b(n.data),this.#r.onerror=n=>{const r=n.error,o=n.filename?` at ${n.filename}:${n.lineno}:${n.colno}`:"",a=r?.stack??r?.message??n.message,l=new Error(`Blender worker failed: ${a||"the worker script did not load"}${o}`);console.error(l.message);for(const s of[...this.#n.keys()])this.#h(s);for(const s of this.#n.values())s.reject(l);this.#n.clear()}}#o=null;#c=null;get project(){return this.#o}start(t,n){return this.#o!==null&&this.#o!==t?Promise.reject(new Error(`The Blender session is bound to ${this.#o}, not ${t}`)):n!==void 0&&this.#c!==null&&this.#c!==n?Promise.reject(new Error(`Blender resource conflict: the session holds ${this.#c}; cannot open ${n}`)):(this.#o=t,this.#c??=n??"models/model.blend",this.#p??=this.#e({op:"start",project:t,...n===void 0?{}:{document:n}}),this.#p)}#t(){return this.#o===null?Promise.reject(new Error("The Blender session has not been started with a project (blender-start)")):this.start(this.#o)}async execute(t,n=!0,r="Blender Python"){return await this.#t(),await this.#e({op:"execute",code:t,history:n,label:r})}async historyGesture(t){await this.#t(),await this.#e({op:t})}async historyStep(t,n){return await this.#t(),(await this.#e({op:"history-step",token:t,direction:n})).moved}async sceneInfo(){return await this.#t(),await this.#e({op:"scene-info"})}async objectInfo(t){return await this.#t(),await this.#e({op:"object-info",name:t})}async rna(t,n){return await this.#t(),await this.#e({op:"rna",path:t,...n===void 0?{}:{names:n}})}async rnaContext(t,n){return await this.#t(),await this.#e({op:"rna-context",...t===void 0?{}:{object:t},...n===void 0?{}:{collection:n}})}async rnaSet(t,n,r,o,a=!0){return await this.#t(),await this.#e({op:"rna-set",history:a,path:t,property:n,value:r,...o===void 0?{}:{index:o}})}async outliner(t){return await this.#t(),await this.#e({op:"outliner",...t===void 0?{}:{selected:t}})}async nodeTree(t){return await this.#t(),await this.#e({op:"node-tree",...t?.path===void 0?{}:{path:t.path},...t?.material===void 0?{}:{material:t.material}})}async uvLayout(t){return await this.#t(),await this.#e({op:"uv-layout",...t?.object===void 0?{}:{object:t.object},...t?.uvLayer===void 0?{}:{uvLayer:t.uvLayer}})}async rig(t){return await this.#t(),await this.#e({op:"rig",...t?.object===void 0?{}:{object:t.object}})}async actionClip(t){return await this.#t(),await this.#e({op:"action-clip",...t?.object===void 0?{}:{object:t.object},...t?.bake===void 0?{}:{bake:t.bake}})}async outlinerSet(t,n,r){return await this.#t(),await this.#e({op:"outliner-set",path:t,column:n,value:r})}async present(){await this.#t(),await this.#e({op:"present"})}async screenshotView(t){return await this.#t(),await this.#e({op:"screenshot-view",maxSize:t})}async readFile(t){return await this.#t(),await this.#e({op:"read-file",path:t})}async writeFile(t,n){await this.#t(),await this.#e({op:"write-file",path:t,bytes:n})}async listFiles(t){return await this.#t(),await this.#e({op:"list-files",path:t})}get presented(){return this.#g}terminate(){this.#r.terminate();const t=new Error("The Blender session was terminated");for(const n of[...this.#n.keys()])this.#h(n);for(const n of this.#n.values())n.reject(t);this.#n.clear()}metrics(t=performance.now()){let n=null,r=this.#u,o=this.#f,a=this.#w;for(const l of this.#i.values()){const s=t-l;(n===null||s>n)&&(n=s),s>r&&(r=s),s>=5e3&&(o+=1),s>=3e4&&(a+=1)}return{inFlightMs:n===null?null:Math.round(n),lastCallMs:this.#l===null?null:Math.round(this.#l),maxCallMs:this.#l===null&&n===null?null:Math.round(r),callsOver5s:o,callsOver30s:a,lastCallWindow:this.#a,wasmMemoryMB:this.#d===null?null:Math.round(this.#d/1048576)}}#h(t){const n=this.#i.get(t);if(n===void 0)return;this.#i.delete(t);const r=performance.now()-n;this.#l=r,r>this.#u&&(this.#u=r),r>=5e3&&(this.#f+=1),r>=3e4&&(this.#w+=1),this.#a!==null&&this.#a.start===n&&(this.#a={start:n,end:n+r})}#e(t){const n=++this.#y;return new Promise((r,o)=>{this.#n.set(n,{resolve:r,reject:o});const a=performance.now();this.#i.set(n,a),this.#a={start:a,end:null},this.#r.postMessage({...t,id:n})})}async#b(t){if("op"in t){if(t.op==="history"){this.#s.history?.(t.entries);return}if(t.op==="log"){this.#s.log?.(t.level,t.text);return}if(t.op==="memory"){this.#d=t.bytes;return}const r=t.frame;typeof r?.session=="string"&&typeof r.revision=="number"&&(this.#g={session:r.session,revision:r.revision});try{const o=await this.#s.present(t.frame,t.description,t.capture);this.#r.postMessage({op:"present-result",id:t.id,...o?.capture===void 0?{}:{capture:o.capture},...o!=null&&"held"in o?{held:o.held}:{}})}catch(o){this.#r.postMessage({op:"present-result",id:t.id,error:o instanceof Error?o.message:String(o)})}return}const n=this.#n.get(t.id);n&&(this.#n.delete(t.id),this.#h(t.id),"error"in t?n.reject(new Error(t.error)):n.resolve(t.result))}}const ot="/assets/agx-base-srgb-BjWZJgrZ.lut",at="/assets/agx-look-medium-high-contrast-D5F_ob1L.lut",st="/assets/agx-look-punchy-dxsnycNs.lut",it="/assets/filmic-srgb-Ct35FIH6.lut",A=new Float64Array(12),Ee=[0,0,0],F=new Float64Array(3),V=new Float64Array(3),B=new Int8Array([1,0,0,1,1,0,0,1,2,1,0,0,1,0,1,0,2,1,0,0,1,1,0,1,2,0,1,0,0,1,0,1,1,2,1,0,0,1,0,0,1,1,1,2,0,0,1,0,1,1,0,1,0,2]);function lt(e,t,n){return e>t?t>n?0:e>n?1:2:n>t?3:n>e?4:5}function je(e,t,n,r,o){const a=t*t,l=Math.min(1,Math.max(0,n))*(t-1),s=Math.min(1,Math.max(0,r))*(t-1),d=Math.min(1,Math.max(0,o))*(t-1),w=Math.min(Math.floor(l),t-2),i=Math.min(Math.floor(s),t-2),h=Math.min(Math.floor(d),t-2),k=l-w,g=s-i,c=d-h,b=(u,m,$,E)=>{const R=(w+m+(i+$)*t+(h+E)*a)*3;A[u]=e[R]/65535,A[u+1]=e[R+1]/65535,A[u+2]=e[R+2]/65535};b(0,0,0,0),b(9,1,1,1),F[0]=k,F[1]=g,F[2]=c;const p=lt(k,g,c)*9;b(3,B[p],B[p+1],B[p+2]),b(6,B[p+3],B[p+4],B[p+5]);const v=F[B[p+6]],y=F[B[p+7]],f=F[B[p+8]];for(let u=0;u<3;u++){const m=A[u];Ee[u]=m+v*(A[3+u]-m)+y*(A[6+u]-A[3+u])+f*(A[9+u]-A[6+u])}return Ee}function W(e){const t=e&32768?-1:1,n=e>>10&31,r=e&1023;return n===0?t*2**-24*r:n===31?r?Number.NaN:t*Number.POSITIVE_INFINITY:t*2**(n-15)*(1+r/1024)}function fe(e,t,n,r){const o=new Uint8ClampedArray(t*4);for(let a=0;a<t;a++){const l=a*4,s=W(e[l+3]),d=s===0?n:n/s;V[0]=W(e[l])*d,V[1]=W(e[l+1])*d,V[2]=W(e[l+2])*d;const w=r(V);o[l]=Math.round(w[0]*255),o[l+1]=Math.round(w[1]*255),o[l+2]=Math.round(w[2]*255),o[l+3]=Math.round(Math.min(1,Math.max(0,s))*255)}return o}function ct(e){return new URL(Object.assign({"./agx-base-srgb.lut":ot,"./agx-look-medium-high-contrast.lut":at,"./agx-look-punchy.lut":st,"./filmic-srgb.lut":it})[`./${e.replace(/\.lut$/,"")}.lut`],import.meta.url)}const ut=57,T=-12.47393,Te=12.5260688117,dt=[[.4123908,.3575843,.1804808],[.212639,.7151687,.0721923],[.0193308,.1191948,.9505322]],ht=[[1.5250528,-.3159135,-.1226583],[-.5091526,1.3333274,.1382844],[.0957153,.0508974,.7879558]];function Se(e,t,n){const r=t[0],o=t[1],a=t[2];n[0]=e[0][0]*r+e[0][1]*o+e[0][2]*a,n[1]=e[1][0]*r+e[1][1]*o+e[1][2]*a,n[2]=e[2][0]*r+e[2][1]*o+e[2][2]*a}const G=new Float64Array(3),Ce=new Float64Array(3),z=[0,0,0];function ne(e){const t=Math.min(1,Math.max(0,e));return t<=.0031308?12.92*t:1.055*t**(1/2.4)-.055}function Le(e,t,n,r){return je(e,ut,t,n,r)}function pt(e,t){Se(dt,t,Ce),Se(ht,Ce,G);const n=Te-T,r=Le(e,(Math.log2(Math.max(G[0],1e-10))-T)/n,(Math.log2(Math.max(G[1],1e-10))-T)/n,(Math.log2(Math.max(G[2],1e-10))-T)/n);return z[0]=ne(Math.max(0,r[0])**2.4),z[1]=ne(Math.max(0,r[1])**2.4),z[2]=ne(Math.max(0,r[2])**2.4),z}const ft={"AgX - Medium High Contrast":"agx-look-medium-high-contrast.lut","AgX - Punchy":"agx-look-punchy.lut"};function wt(e,t){const n=Te-T;return Le(e,(Math.log2(Math.max(t[0],1e-10))-T)/n,(Math.log2(Math.max(t[1],1e-10))-T)/n,(Math.log2(Math.max(t[2],1e-10))-T)/n)}function gt(e,t,n,r={}){const o=r.exposure??1,a=r.composedLook===!0?wt:pt;return fe(t,n,o,l=>a(e,l))}const Ie=33,ce=Ie**3*3,ue=4096,re=-12.473931188,oe=25;function ae(e,t){const n=Math.min(1,Math.max(0,t))*(ue-1),r=Math.min(Math.floor(n),ue-2),o=n-r;return((1-o)*e[ce+r]+o*e[ce+r+1])/65535}const H=[0,0,0];function yt(e,t){const n=je(e,Ie,(Math.log2(Math.max(t[0],1e-10))-re)/oe,(Math.log2(Math.max(t[1],1e-10))-re)/oe,(Math.log2(Math.max(t[2],1e-10))-re)/oe);return H[0]=ae(e,n[0]/.66),H[1]=ae(e,n[1]/.66),H[2]=ae(e,n[2]/.66),H}function bt(e,t,n,r){if(e.length!==ce+ue)throw new Error("Invalid Blender Filmic display table");return fe(t,n,r,o=>yt(e,o))}const U=2.4,I=.055,Re=I/(U-1),mt=1/(U/(1+I)*((Re+I)/(1+I))**(U-1)),Mt=((Re+I)/(1+I))**U;function se(e){return e>0?e<Mt?e*mt:(1+I)*e**(1/U)-I:0}const q=[0,0,0];function vt(e){return q[0]=se(e[0]),q[1]=se(e[1]),q[2]=se(e[2]),q}function xt(e,t,n){return fe(e,t,n,vt)}function Fe(e,t,n,r){if(!Number.isFinite(n.width)||!Number.isFinite(n.height)||n.width<1||n.height<1)throw new Error("Scene capture requires finite positive dimensions");const o=Math.min(2048,Math.round(n.width)),a=Math.min(2048,Math.round(n.height)),l=r?1:2,s=o*l,d=a*l,w=Ve(),i=w.renderer,h={target:i.getRenderTarget(),toneMapping:i.toneMapping,exposure:i.toneMappingExposure,colorSpace:i.outputColorSpace,shadows:i.shadowMap.enabled,shadowType:i.shadowMap.type,clearColor:i.getClearColor(new He),clearAlpha:i.getClearAlpha(),background:e.background};let k,g,c=!1;try{if(k=new ve(s,d,{type:qe}),i.shadowMap.enabled=!0,i.shadowMap.type=Xe,i.outputColorSpace=Ze,i.toneMapping=n.toneMapping??le,i.toneMappingExposure=n.exposure??1,i.setClearColor(0,n.transparent?0:1),n.transparent&&(e.background=null),i.setRenderTarget(k),i.clear(),i.render(e,t),r){const E=new Uint16Array(s*d*4);return i.readRenderTargetPixels(k,0,0,s,d,E),c=!0,{pixels:E,width:o,height:a}}g=new ve(s,d),We(n.transparent===!0).render(i,g,k,0,!1);const b=new Uint8Array(s*d*4);i.readRenderTargetPixels(g,0,0,s,d,b);const p=document.createElement("canvas");p.width=s,p.height=d;const v=p.getContext("2d");if(!v)throw new Error("Scene capture could not create an image canvas");const y=v.createImageData(s,d),f=s*4;for(let E=0;E<d;E++)y.data.set(b.subarray((d-1-E)*f,(d-E)*f),E*f);v.putImageData(y,0,0);const u=document.createElement("canvas");u.width=o,u.height=a;const m=u.getContext("2d");if(!m)throw new Error("Scene capture could not create an output canvas");m.drawImage(p,0,0,o,a);const $=u.toDataURL("image/png");return c=!0,$}finally{e.background=h.background,i.setRenderTarget(h.target),i.toneMapping=h.toneMapping,i.toneMappingExposure=h.exposure,i.outputColorSpace=h.colorSpace,i.shadowMap.enabled=h.shadows,i.shadowMap.type=h.shadowType,i.setClearColor(h.clearColor,h.clearAlpha),g?.dispose(),k?.dispose(),w.release({discard:!c})}}function kt(e,t,n){return Fe(e,t,n,!0)}function Et(e,t,n){return Fe(e,t,n,!1)}const St={transform:{cx:0,cy:0,zoom:1},looked:null,refusal:null,size:{w:0,h:0},framedAt:0,drawn:[]};let de=St,we=0;const Z=new Set;let Ne=0;function ie(){return de}function Wt(){return we}function Gt(e){return Z.add(e),()=>{Z.delete(e)}}function O(e){de={...de,...e},we+=1;for(const t of[...Z])t()}function Ct(){Ne+=1,we+=1;for(const e of[...Z])e()}function zt(){return Ne}function N(e){O({refusal:e})}const Ae=new Map;function At(e){let t=Ae.get(e);return t||(t=fetch(ct(e)).then(async n=>{if(!n.ok)throw new Error(`Blender display table ${e}: ${n.status} ${n.statusText}`);return new Uint16Array(await n.arrayBuffer())}),Ae.set(e,t)),t}function Bt(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return new Uint16Array(n.buffer,n.byteOffset,n.byteLength>>1)}async function Be(e,t){const n=t.look??"None",r=t.toneMapping==="filmic",o=t.toneMapping==="none";if(!o&&t.toneMapping!=="agx"&&!r)throw new Error("Blender's Khronos PBR Neutral view transform has no scene-linear implementation in the browser, so it cannot resolve a composited or scene-referred frame (implemented: Standard, AgX, Filmic)");const a=o?null:r?"filmic-srgb.lut":n==="None"?"agx-base-srgb.lut":ft[n];if(a===void 0)throw new Error(`Blender display transform has no table for look ${n}`);const l=a?await At(a):null,s=t.linearInput,d=s?{pixels:Bt(s.base64),width:s.width,height:s.height}:e;if(!d)throw new Error("Blender display transform requires a linear capture");const{pixels:w,width:i,height:h}=d,k=o?xt(w,i*h,t.exposure):r?bt(l,w,i*h,t.exposure):gt(l,w,i*h,{exposure:t.exposure,composedLook:n!=="None"}),g=document.createElement("canvas");g.width=i,g.height=h;const c=g.getContext("2d");if(!c)throw new Error("Blender display transform could not create its image canvas");const b=c.createImageData(i,h),p=i*4;for(let f=0;f<h;f++){const u=(h-1-f)*p;b.data.set(k.subarray(u,u+p),f*p)}c.putImageData(b,0,0);const v=g.toDataURL("image/png"),y={base64:v.slice(v.indexOf(",")+1),mimeType:"image/png"};if(t.linear===!0){const f=new Uint8Array(w.buffer,w.byteOffset,w.byteLength);let u="";for(let m=0;m<f.length;m+=32768)u+=String.fromCharCode(...f.subarray(m,m+32768));y.linearBase64=btoa(u),y.linearWidth=i,y.linearHeight=h}return y}const _t="document:blender:runtime";let K=null;function jt(e){K=e}function L(){return K?.documentId??_t}function Ht(){return L()}async function qt(e,t,n){jt({documentId:e,entryId:n,blend:t});const r=_();if(!r.session.open())return;const o=r.projectLocalState.projectRootPath();o!==null&&(await M().start(o,t),await M().present())}function j(){return S?.project!=null}let $e=0;const he=new Set;function Xt(){return $e}function Zt(e){return he.add(e),()=>{he.delete(e)}}function Y(){$e+=1;for(const e of[...he])e()}async function Kt(e,t){return j()?M().rna(e,t):null}async function Yt(e,t){return j()?M().rnaContext(e,t):null}async function Tt(e,t,n,r,o=!0){if(!j())return null;const a=await M().rnaSet(e,t,n,r,o);return Y(),a}async function Lt(e,t=!0,n="Blender Python"){const r=await M().execute(e,t,n);Y();const o=/^Error executing code:/.exec(r);return{text:r,executed:o===null,result:o===null?r.replace(/^Code executed successfully: ?/,""):"",error:o===null?null:r.replace(/^Error executing code: ?/,"")}}function Jt(){M().historyGesture("history-begin").catch(e=>_().console.error(`Could not begin Blender undo gesture: ${String(e)}`,"blender-history"))}async function Qt(){await M().historyGesture("history-end")}async function en(e){return j()?M().outliner(e):null}async function tn(e){return j()?M().nodeTree(e):null}async function nn(e){return j()?M().uvLayout(e):null}async function rn(e){return j()?M().rig(e):null}async function on(e){return j()?M().actionClip(e):null}async function It(e,t,n){if(!j())return null;const r=await M().outlinerSet(e,t,n);return Y(),r}const Rt={view:"blender-node-view",title:"Node Editor",verbs:[["state",void 0],["look",void 0],["view-all","Node Editor: Frame All"],["zoom",void 0],["pan",void 0],["move",void 0],["link",void 0],["set-value",void 0],["use-nodes",void 0],["collapse-panel",void 0]].map(([e,t])=>({id:e,...t?{title:t}:{},run:n=>Oe({...n,action:e})}))};function Oe(e){const t=typeof e.action=="string"?e.action:"state";switch(t){case"state":break;case"look":O({looked:typeof e.node=="string"?e.node:null,refusal:null});break;case"view-all":Ct(),O({refusal:null});break;case"zoom":{const n=typeof e.zoom=="number"?e.zoom:1;O({transform:{...ie().transform,zoom:n},refusal:null});break}case"pan":{const n=ie().transform;O({transform:{...n,cx:typeof e.cx=="number"?e.cx:n.cx,cy:typeof e.cy=="number"?e.cy:n.cy},refusal:null});break}case"move":N(`Moving "${String(e.node??"a node")}" writes Node.location — editing parity is not the program.`);break;case"link":N("Dragging between sockets would make a link — editing parity is not the program.");break;case"set-value":N(`Changing "${String(e.socket??"a socket")}" writes the socket's default_value — editing parity is not the program.`);break;case"use-nodes":N("Use Nodes writes Material.use_nodes — editing parity is not the program.");break;case"collapse-panel":N(`Collapsing "${String(e.panel??"a panel")}" writes the panel's is_collapsed — editing parity is not the program.`);break;default:N(`blender-node-view: no action "${t}" — state, look, view-all, zoom, pan, and the refusals move, link, set-value, use-nodes, collapse-panel.`)}return ie()}let S=null;const X=new Set;function Ue(){X.size&&_().history.invalidate([...X]),X.clear()}let pe=null,_e=!1;function De(){Ue(),pe?.abort(),pe=null,S?.terminate(),S=null}function Ft(){_e||(_e=!0,_().session.onEnded(De))}const Nt=e=>typeof e=="object"&&e!==null&&typeof e.applyFrame=="function"&&typeof e.snapshot=="function"&&typeof e.captureSnapshot=="function"&&typeof e.recordPresentation=="function"&&typeof e.recordPhotograph=="function";async function $t(){const{documents:e}=_(),t=await e.waitForContext(L(),15e3);if(Nt(t))return t;throw new Error('The Blender Model document is not open, or the open one is not a Model this engine can present to (it must answer applyFrame, captureSnapshot, recordPresentation and recordPhotograph): present {kind: "document", id: "blender:runtime"} first (it ships with the editor; `vgai blender-mcp` presents it before its first call).')}function M(){if(S!==null)return S;Ft();const e=new AbortController;pe=e;let t=!1;S=new rt({history:r=>{const o=S;if(!o)throw new Error("Blender history arrived before its runtime");for(const a of r){if("reset"in a){Ue();continue}if(!a.resource)throw new Error("A Blender edit has no document resource");X.add(a.resource);const l=async s=>{if(S!==o)throw new Error("This Blender history belongs to a closed worker");const d=await o.historyStep(a.id,s);return Y(),d};_().history.record({id:a.id,label:a.label,resources:[a.resource],document:L(),undo:()=>l("undo"),redo:()=>l("redo")})}},present:async(r,o,a)=>{const l=L(),s=await $t();if(e.signal.throwIfAborted(),L()!==l)throw new Error("Blender document changed before its frame could be presented");const d=s.applyFrame(r),w=typeof d=="object"&&d!==null&&"held"in d,i=w?d.held:null,h=f=>({...f===void 0?{}:{capture:f},...w?{held:i}:{}});if(s.recordPresentation(o),!a||!a.render)return h(void 0);const k=s.snapshot(),g=()=>{if(e.signal.throwIfAborted(),L()!==l||s.snapshot()!==k)throw new Error("Blender capture document or source revision changed before completion")};if(a.render.linearInput){const f=await Be(null,a.render);return g(),h(f)}const{render:c,position:b,target:p,up:v}=a;if(!b||!p||!v)throw new Error("A Blender render capture must carry the scene camera position, target and up");if(t)throw new Error("A Blender render capture is already in progress");const y=s.captureSnapshot();t=!0,e.signal.addEventListener("abort",y.dispose,{once:!0});try{g();const f=new Ke;f.add(y.root),f.updateMatrixWorld(!0);const u=y.root.matrixWorld,m=new Ye().copy(u).invert(),$=new xe().setFromMatrix4(u),E=new xe().setFromMatrix4(m),R=new te(b[0],b[1],b[2]).applyMatrix4(u),ge=new te(p[0],p[1],p[2]).applyMatrix4(u),ye=new te(v[0],v[1],v[2]).applyMatrix3($),J=Math.min(2048,Math.round(c.width))/Math.min(2048,Math.round(c.height)),be=Ge(y.root).getBoundingSphere(new Je),D=nt(R.distanceTo(be.center),be.radius);let C;if(c.orthographic){const P=c.fov/2;C=new Qe(-P*J,P*J,P,-P,D.near,D.far)}else C=new et(c.fov,J,D.near,D.far);C.up.copy(ye),C.position.copy(R),C.lookAt(ge),C.updateMatrixWorld(!0);const Q={position:R.clone().applyMatrix4(m).toArray(),target:ge.clone().applyMatrix4(m).toArray(),up:ye.clone().applyMatrix3(E).toArray()};s.recordPhotograph({sent:{position:b,target:p,up:v},photographed:Q,render:{width:c.width,height:c.height,fov:c.fov,orthographic:c.orthographic}});const Pe={none:le,agx:ke,neutral:tt,filmic:le};await y.prepare(C),g();const me={width:c.width,height:c.height,transparent:c.transparent===!0,toneMapping:Pe[c.toneMapping]??ke,exposure:c.exposure},Me=c.toneMapping==="agx"||c.toneMapping==="filmic"||c.linear===!0?await Be(kt(f,C,me),c):null;if(g(),Me)return h({...Me,camera:Q});const ee=Et(f,C,me);if(!ee)throw new Error("Blender render could not capture its image");return h({base64:ee.slice(ee.indexOf(",")+1),mimeType:"image/png",camera:Q})}finally{t=!1,e.signal.removeEventListener("abort",y.dispose),y.dispose()}},log:(r,o)=>(r==="error"?console.error:console.log)(`[blender] ${o}`)});const n=S;return _().session.reportWorkerCallMeter(()=>n.metrics()),S}const Ot="models/model.blend",x=(e,t)=>{const n=e[t];if(typeof n!="string")throw new Error(`${String(e.type)} requires a string "${t}"`);return n};async function Ut(e){const t=_().projectLocalState.projectRootPath();if(t===null)return{};let n;try{n=await e.execute(`import bpy
|
|
2
|
+
print(bpy.data.filepath)
|
|
3
|
+
`,!1)}catch{return{}}if(/^Error executing code:/m.test(n))return{};const r=n.replace(/^Code executed successfully:/,"").split(`
|
|
4
|
+
`).map(a=>a.trim()).filter(a=>a.startsWith("/")).pop()??"";if(r==="")return{};const o=t.endsWith("/")?t:`${t}/`;return r.startsWith(o)?{document:r.slice(o.length)}:{}}async function an(e){const t=_();if(e.type==="blender-status")return{ok:!0,data:{started:S?.project!=null,document:t.documents.context(L())!==void 0}};if(!t.session.open())return{ok:!1,error:`${e.type} needs an open project session; this editor page has none.`};try{const n=e.type==="blender-start"?x(e,"project"):null;if((e.type==="blender-stop"||e.type==="blender-start"&&e.fresh===!0)&&(De(),e.type==="blender-stop"))return{ok:!0,data:{stopped:!0}};if(e.type==="blender-start"&&!t.documents.context(L())&&!await t.workspace.open({kind:"document",id:"blender:runtime"}))return{ok:!1,error:"blender-start could not open the Blender Model document: nothing in this editor opens {kind: 'document', id: 'blender:runtime'} (it ships with @volter/editor-blender)."};const r=M();switch(e.type){case"blender-start":{const o=typeof e.document=="string"?e.document:K?.blend??Ot;return{ok:!0,data:{...await r.start(n,o)}}}case"blender-execute":return{ok:!0,data:{result:(await Lt(x(e,"code"))).text}};case"blender-scene-info":return{ok:!0,data:{result:await r.sceneInfo()}};case"blender-object-info":return{ok:!0,data:{result:await r.objectInfo(x(e,"name"))}};case"blender-rna":{const o=typeof e.names=="number"?e.names:void 0;return{ok:!0,data:{result:await r.rna(x(e,"path"),o)}}}case"blender-rna-context":{const o=typeof e.object=="string"?e.object:void 0,a=typeof e.collection=="string"?e.collection:void 0;return{ok:!0,data:{result:await r.rnaContext(o,a)}}}case"blender-rna-set":{const o=typeof e.index=="number"?e.index:void 0;return{ok:!0,data:{result:await Tt(x(e,"path"),x(e,"property"),e.value,o)}}}case"blender-outliner":{const o=Array.isArray(e.selected)?e.selected.filter(a=>typeof a=="string"):void 0;return{ok:!0,data:{result:await r.outliner(o)}}}case"blender-node-tree":return{ok:!0,data:{result:await r.nodeTree({...typeof e.path=="string"?{path:e.path}:{},...typeof e.material=="string"?{material:e.material}:{}})}};case"blender-uv-layout":return{ok:!0,data:{result:await r.uvLayout({...typeof e.object=="string"?{object:e.object}:{},...typeof e.uvLayer=="string"?{uvLayer:e.uvLayer}:{}})}};case"blender-rig":return{ok:!0,data:{result:await r.rig({...typeof e.object=="string"?{object:e.object}:{}})}};case"blender-action-clip":return{ok:!0,data:{result:await r.actionClip({...typeof e.object=="string"?{object:e.object}:{},...typeof e.bake=="boolean"?{bake:e.bake}:{}})}};case"blender-node-view":{const o=typeof e.action=="string"?e.action:"state";return{ok:!0,data:{result:Rt.verbs.some(l=>l.id===o)?ze("blender-node-view",o,e):Oe(e)}}}case"blender-outliner-set":return{ok:!0,data:{result:await It(x(e,"path"),x(e,"column"),e.value!==!1)}};case"blender-screenshot-view":{const o=typeof e.maxSize=="number"?e.maxSize:1e3,a={kind:"document",id:K?.entryId??"blender:runtime"};return{ok:!0,data:{...await r.screenshotView(o),document:a}}}case"blender-read-file":{const o=await r.readFile(x(e,"path")),a=x(e,"transferId"),l=await fetch(`/__editor/blender-file?id=${encodeURIComponent(a)}`,{method:"POST",headers:{"content-type":"application/octet-stream"},body:new Blob([o])});return l.ok?{ok:!0,data:{bytes:o.length}}:{ok:!1,error:`Transfer ${a} was refused: ${l.status}`}}case"blender-write-file":{const o=atob(x(e,"base64")),a=Uint8Array.from(o,l=>l.charCodeAt(0));return await r.writeFile(x(e,"path"),a),{ok:!0,data:{written:a.length}}}case"blender-list-files":{const o=await r.listFiles(x(e,"path")),a=r.presented;return{ok:!0,data:{entries:o,...a?{session:a.session,revision:a.revision}:{},...await Ut(r)}}}}return{ok:!1,error:`Unknown Blender command ${e.type}`}}catch(n){return{ok:!1,error:n instanceof Error?n.message:String(n)}}}export{Rt as N,Ht as a,j as b,It as c,en as d,Xt as e,Gt as f,O as g,an as h,ie as i,tn as j,zt as k,on as l,rn as m,Wt as n,nn as o,Tt as p,Qt as q,N as r,Zt as s,Jt as t,Lt as u,qt as v,jt as w,Y as x,Yt as y,Kt as z};
|