@liveroom-tech/react-immersive 6.2.1 → 6.2.2

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.
Files changed (66) hide show
  1. package/dist/AnimationsTab-IKAAKT3P.mjs +1 -0
  2. package/dist/AnnotationsTab-NEJIXCOM.mjs +1 -0
  3. package/dist/CinematicTab-TIQXCPFE.mjs +1 -0
  4. package/dist/ConfigureTab-NYRMOFW4.mjs +6 -0
  5. package/dist/RulesTab-2U4MFYOZ.mjs +1 -0
  6. package/dist/SequencesTab-LTMJTB76.mjs +1 -0
  7. package/dist/SequencesTab-O7USMDFP.css +1 -0
  8. package/dist/{StreamingTilesModel-6Z7SIC2J.mjs → StreamingTilesModel-IM2DDWO5.mjs} +1 -1
  9. package/dist/binding-builder.css +1 -1
  10. package/dist/binding-builder.d.mts +3 -3
  11. package/dist/binding-builder.d.ts +3 -3
  12. package/dist/binding-builder.js +45 -45
  13. package/dist/binding-builder.mjs +1 -1
  14. package/dist/{chunk-25WC5KDO.mjs → chunk-2LGQKX6Z.mjs} +1 -1
  15. package/dist/chunk-37QOMZW6.mjs +1 -0
  16. package/dist/chunk-3PLML3PO.mjs +1 -0
  17. package/dist/chunk-5C4H7SRF.mjs +1 -0
  18. package/dist/chunk-IT2PUTJS.mjs +1 -0
  19. package/dist/chunk-LEOHZ5HM.mjs +69 -0
  20. package/dist/chunk-RSUXTWM6.mjs +1 -0
  21. package/dist/{chunk-3OCHN3CA.mjs → chunk-SOAUR4DL.mjs} +1 -1
  22. package/dist/chunk-SXN3YYD3.mjs +1 -0
  23. package/dist/chunk-WU3SQZGD.mjs +3 -0
  24. package/dist/{chunk-UTVFRMYW.mjs → chunk-XKJQC3N5.mjs} +2 -2
  25. package/dist/exportSceneMesh-MSQIMBFF.mjs +1 -0
  26. package/dist/hosted.css +1 -1
  27. package/dist/hosted.d.mts +5 -3
  28. package/dist/hosted.d.ts +5 -3
  29. package/dist/hosted.js +44 -44
  30. package/dist/hosted.mjs +1 -1
  31. package/dist/index.css +1 -1
  32. package/dist/index.d.mts +4 -4
  33. package/dist/index.d.ts +4 -4
  34. package/dist/index.js +42 -42
  35. package/dist/index.mjs +1 -1
  36. package/dist/{modelFileResolver-CVmON8hg.d.mts → modelFileResolver-Bq4pW9vc.d.mts} +39 -29
  37. package/dist/{modelFileResolver-CVmON8hg.d.ts → modelFileResolver-Bq4pW9vc.d.ts} +39 -29
  38. package/dist/{modelViewerProps-CIY4nsNY.d.mts → modelViewerProps-BnrJO5DK.d.ts} +2 -1
  39. package/dist/{modelViewerProps-BBnZTFO-.d.ts → modelViewerProps-wjBT4fks.d.mts} +2 -1
  40. package/dist/{publicProps-BARVwXu7.d.ts → publicProps-BZPMIRwj.d.ts} +1 -1
  41. package/dist/{publicProps-n0Yvr_Km.d.mts → publicProps-CW5X_HFh.d.mts} +1 -1
  42. package/dist/simple-model-viewer.css +1 -1
  43. package/dist/simple-model-viewer.d.mts +2 -2
  44. package/dist/simple-model-viewer.d.ts +2 -2
  45. package/dist/simple-model-viewer.js +5 -5
  46. package/dist/simple-model-viewer.mjs +1 -1
  47. package/dist/utils.d.mts +4 -4
  48. package/dist/utils.d.ts +4 -4
  49. package/dist/utils.js +1 -1
  50. package/dist/utils.mjs +1 -1
  51. package/package.json +1 -1
  52. package/dist/AnimationsTab-NUJTEMZ5.mjs +0 -1
  53. package/dist/AnnotationsTab-OHRVWRKI.mjs +0 -1
  54. package/dist/CinematicTab-IJAY2BS6.mjs +0 -1
  55. package/dist/ConfigureTab-UQRRATCY.mjs +0 -6
  56. package/dist/RulesTab-YVBZGJZX.mjs +0 -1
  57. package/dist/SequencesTab-IC5LWQ6N.css +0 -1
  58. package/dist/SequencesTab-VZKEKAUG.mjs +0 -1
  59. package/dist/chunk-7OVEHDDE.mjs +0 -1
  60. package/dist/chunk-AL6UIGWP.mjs +0 -1
  61. package/dist/chunk-KYXJG3TX.mjs +0 -1
  62. package/dist/chunk-LD7QWHB4.mjs +0 -3
  63. package/dist/chunk-RKDATTUM.mjs +0 -1
  64. package/dist/chunk-UHRJ2RBF.mjs +0 -1
  65. package/dist/chunk-YKDDNX2D.mjs +0 -69
  66. package/dist/exportSceneMesh-YJFOLFHS.mjs +0 -1
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- "use client";import{c as ke}from"./chunk-7OVEHDDE.mjs";import"./chunk-MMO7KCYU.mjs";import{a as _e,b as Ne,c as xn}from"./chunk-F5QSXMME.mjs";import{b as yn,f as On,g as jn,q as dt,r as ut,s as He,t as pt,u as qe,v as kn}from"./chunk-YKDDNX2D.mjs";import"./chunk-KYXJG3TX.mjs";import"./chunk-FGAJ2UT7.mjs";import"./chunk-3OCHN3CA.mjs";import{v as at,w as ct}from"./chunk-UTVFRMYW.mjs";import{a as ot,b as st}from"./chunk-NMRTI3NQ.mjs";import"./chunk-37YITTIK.mjs";import"./chunk-2AJK643D.mjs";import"./chunk-RKDATTUM.mjs";import{$ as Wt,Aa as lt,D as re,Da as Ue,E as Ee,Ea as De,Fa as An,G as Dt,Ga as En,H as Ht,Ha as Tn,Ia as In,Ja as Ln,R as _t,T as Nt,V as qt,W as Ft,X as Kt,Y as Gt,Z as zt,_ as $t,aa as fn,ba as ge,ca as ye,da as Le,e as it,ia as gn,ja as mn,n as Ae,oa as bn,pa as hn,ra as Vn,va as Bn,w as Ce,wa as vn,x as Se,xa as Mn,y as kt,ya as Pn,z as Ut,za as Rn}from"./chunk-25WC5KDO.mjs";import{a as xt,b as At,e as Et,f as Tt,g as It}from"./chunk-LX3GXQNU.mjs";import{b as fe,c as Ie,d as Xt,e as Jt,f as Qt,g as Zt,h as en,i as tn,j as nn,k as rn,l as on,m as sn,n as an,o as cn,p as ln,q as dn,r as un,s as pn}from"./chunk-7JCFNZJM.mjs";import"./chunk-UHRJ2RBF.mjs";import{b as Cn,c as Sn}from"./chunk-CCBFMNAU.mjs";import{a as Z,b as ce,c as Te}from"./chunk-GV4ZRXL6.mjs";import"./chunk-7OWHW66D.mjs";import{e as wn}from"./chunk-KFLS7GI6.mjs";import{a as Lt}from"./chunk-UAZ6I25Y.mjs";import{c as Yt}from"./chunk-BNKTI3CY.mjs";import"./chunk-UCD76KQ6.mjs";import"./chunk-TUYVYSN5.mjs";import"./chunk-RXZ4Q7CY.mjs";import"./chunk-JR557W27.mjs";import{useCallback as Un,useEffect as Oe,useMemo as je,useRef as Fe,useState as me}from"react";import{jsx as ue,jsxs as ft}from"react/jsx-runtime";var Dn=Object.freeze({});function gt(e){return ue(ot,{labels:e.labels,children:ue(Hn,{...e})})}function Hn({before:e,after:t,layout:i="slider",split:s,onSplitChange:p,reveal:y="auto",semanticComparison:l=!1,showComparisonOutlines:x,onComparisonOutlinesChange:B,onComparisonChange:O,linkSections:v,...m}){let k=st(),[E,C]=me(y==="auto");Oe(()=>{y==="auto"&&C(!0)},[y]);let[h,b]=me(.5),[f,S]=me(!0),R=x??f,j=P=>{x===void 0&&S(P),B?.(P)},q=He(s??h),X=Un(P=>{let A=He(P);s===void 0&&b(A),p?.(A)},[s,p]),_=Fe([null,null]),[V,J]=me([null,null]),[N,a]=me(null),[r,c]=me(null),u=[{...m,...e},{...m,...t}];Oe(()=>a(null),[u[0].sceneConfig?.section,u[1].sceneConfig?.section]);let w=P=>{let A=u[P].objectBindings;return A&&typeof A=="object"?A:V[P]?.url===u[P].modelUrl?V[P].bindings:Dn},L=w(0),$=w(1),n=je(()=>l?Ue({objectBindings:L,sceneConfig:u[0].sceneConfig},{objectBindings:$,sceneConfig:u[1].sceneConfig},typeof l=="object"?l:{}):null,[l,L,$,u[0].sceneConfig,u[1].sceneConfig]),o=n?JSON.stringify(n):"",g=Fe(null);Oe(()=>{n&&g.current!==o&&(g.current=o,O?.(n))},[n,o,O]);let d=n?.objects.find(P=>P.id===r),M=je(()=>n?[De(n,"before",r),De(n,"after",r)]:null,[n,r]),I=je(()=>ut(),[]);Oe(()=>()=>I.detach(),[I]);let T=[e,t],D=je(()=>[0,1].map(P=>(A,W)=>{_.current[P]=A,J(G=>G[P]?.bindings===A.objectBindings&&G[P]?.url===W?G:G.map((z,we)=>we===P?{url:W,bindings:A.objectBindings}:z)),I.attach(P,A.raw.controls,A.invalidate)}),[I]),Y=T.map((P,A)=>{let{label:W,...G}=P,z={preset:"minimal",...m,...G,refitOnResize:G.refitOnResize??m.refitOnResize??!1},we=G.onViewerReady??m.onViewerReady;return{...z,...v??!!l?{sceneConfig:{...z.sceneConfig,section:N??u[1].sceneConfig?.section??Ce},onSceneConfigChange:ie=>{a(ie.section??Ce),(G.onSceneConfigChange??m.onSceneConfigChange)?.(ie)}}:{},...M?{comparisonHighlights:R?M[A]:void 0,selectedObject:A===0?d?.beforeKey?L[d.beforeKey]:null:d?.afterKey?$[d.afterKey]:null}:{},onObjectSelect:ie=>{if((G.onObjectSelect??m.onObjectSelect)?.(ie),n){let Ve=n.objects.find(Q=>(A===0?Q.beforeObjectId:Q.afterObjectId)===ie?.modelObjectId);c(Ve?.id??null)}},onViewerReady:ie=>{D[A](ie,z.modelUrl),we?.(ie)}}}),K=[e.label??k("compareBefore"),t.label??k("compareAfter")];(!Y[0].modelUrl||!Y[1].modelUrl)&&console.error("[react-immersive] CompareViewer needs a modelUrl, shared or on each side.");let ae=Fe(null),ne=n?ue(dt,{showOutlines:R,onShowOutlinesChange:j,report:n,selected:r,onSelect:P=>{c(P.id);let A=P.afterObjectId?1:0,W=_.current[A],G=A===1?P.afterObjectId:P.beforeObjectId,z=G?W?.raw.nodes[G]:null;W&&z&&(I.setLeader(A),W.raw.controls.fitToBox(z,!0),W.invalidate())},onClear:()=>c(null)}):null;if(!E)return ue(at,{className:"ri-compare",background:ct(m.backgroundColor,m.sceneConfig),poster:m.poster??t.poster??e.poster,onReveal:()=>C(!0)});let F=i==="side-by-side";return ft("div",{ref:ae,className:`ri-compare ${F?"ri-compare--sideBySide":"ri-compare--slider"}`,style:F?void 0:{"--ri-compare-split":`${q*100}%`},children:[Y.map((P,A)=>ft("div",{className:F?"ri-compare__pane":A===1?"ri-compare__layer ri-compare__layer--after":"ri-compare__layer",children:[ue(ke,{...P}),F?ue("span",{className:"ri-compare__label",children:K[A]}):null]},A)),ne,F?null:ue(pt,{split:q,onSplitChange:X,labels:[K[0],K[1]],containerRef:ae})]})}import{useCallback as Re,useRef as jt}from"react";import{useCallback as H,useMemo as mt,useState as _n}from"react";var bt={baseColor:"texture",metalness:"metalnessMap",roughness:"roughnessMap",emissive:"emissiveMap",alpha:"alphaMap",normal:"normalMap",bump:"bumpMap",ao:"aoMap",displacement:"displacementMap",clearcoat:"clearcoatMap",clearcoatRoughness:"clearcoatRoughnessMap",clearcoatNormal:"clearcoatNormalMap",anisotropy:"anisotropyMap",transmission:"transmissionMap",thickness:"thicknessMap",sheenColor:"sheenColorMap",sheenRoughness:"sheenRoughnessMap",specularIntensity:"specularIntensityMap",specularColor:"specularColorMap"};function wt(e){if(e)return Object.fromEntries(Object.entries(e).map(([t,i])=>[t,i&&typeof i=="object"?{...i}:i]))}function Nn(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t.visible===!1).map(([t])=>[t,!0]))}function Ke(e){let[t,i]=_n(e),s=H((a,r)=>{i(c=>r===void 0?fe(c,a):fe(c,a,r))},[]),p=H((a,r)=>s(a,Ie(r)),[s]),y=H((a,r)=>p(a,{baseColor:r}),[p]),l=H((a,r,c="baseColor")=>{let u=bt[c],w=typeof r=="string"?{path:r}:r;s(a,{style:{material:{[u]:w}}})},[s]),x=H((a,r="baseColor")=>{let c=bt[r];s(a,{style:{material:{[c]:void 0}}})},[s]),B=H((a,r)=>{i(c=>{let u=Z(c,a);if(!u)return c;let w=wt(c[u]?.style?.material),L=ce(c,r);if(L.length===0)return c;let $=c;for(let n of L){let o=c[n];o&&($===c&&($={...c}),$[n]={...o,style:{...o.style,material:wt(w)}})}return $})},[]),O=H(a=>s(a,{style:{material:void 0}}),[s]),v=H((a,r)=>s(a,{transform:r}),[s]),m=H(a=>s(a,{transform:void 0}),[s]),k=H((a,r)=>s(a,{metadata:r}),[s]),E=H((a,r)=>{i(c=>{let u=c;for(let w of ce(c,a)){let L=c[w],$=r(L.decals??[]);u===c&&(u={...c}),u[w]={...L,decals:$.length>0?$:void 0}}return u})},[]),C=H((a,r)=>{let c=r.id??`decal-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`;return E(a,u=>[...u.filter(w=>w.id!==c),{...r,id:c}]),c},[E]),h=H((a,r,c)=>E(a,u=>u.map(w=>w.id===r?{...w,...c}:w)),[E]),b=H((a,r)=>E(a,c=>c.filter(u=>u.id!==r)),[E]),f=H(a=>Te(t,a),[t]),S=H(a=>ce(t,a).map(r=>t[r]?.id??r),[t]),R=H(a=>{let r=Z(t,a);return r?t[r]?.style?.material??null:null},[t]),j=H(a=>s(a,{visible:!1}),[s]),q=H(a=>s(a,{visible:!0}),[s]),X=H(a=>{i(r=>{let c=ce(r,a).reduce((u,w)=>{let L=r[w];return L&&u.push({ids:w,patch:{visible:L.visible===!1}}),u},[]);return fe(r,c)})},[i]),_=H(()=>{i(a=>fe(a,Object.keys(a),{visible:!0}))},[i]),V=mt(()=>Nn(t),[t]),J=mt(()=>Object.keys(V).map(a=>t[a]?.id??a),[V,t]),N=H(a=>{let r=Z(t,a);return r?t[r]?.visible===!1:!1},[t]);return{objectBindings:t,setObjectBindings:i,updateObjectBindings:s,setMaterial:p,setBaseColor:y,setTexture:l,clearTexture:x,copyMaterial:B,resetMaterial:O,getMaterial:R,setTransform:v,resetTransform:m,updateMetadata:k,addDecal:C,updateDecal:h,removeDecal:b,selectObjectBindings:f,selectObjectBindingIds:S,hiddenObjects:V,hiddenObjectIds:J,hideObject:j,showObject:q,toggleObjectVisibility:X,isObjectHidden:N,clearHiddenObjects:_}}import{useCallback as ee,useMemo as qn,useRef as Fn,useState as Kn}from"react";function Ge(e){let t=Fn(null),[i,s]=Kn(()=>{let f=typeof e=="function"?e():e;return t.current=f,f}),p=ee(f=>{s(S=>{let R=typeof f=="function"?f(S):f;return _e(S,R)})},[]),y=ee(()=>{let f=t.current;f&&s(f)},[]),l=ee((f,S)=>{p(R=>({lighting:{lights:R.lighting.lights.map(j=>j.id===f?{...j,...S}:j)}}))},[p]),x=ee(f=>{p(S=>S.lighting.lights.some(R=>R.id===f.id)?{}:{lighting:{lights:[...S.lighting.lights,Ne(f)]}})},[p]),B=ee(f=>{p(S=>({lighting:{lights:S.lighting.lights.filter(R=>R.id!==f)}}))},[p]),O=ee((f,S)=>l(f,{intensity:S}),[l]),v=ee((f,S)=>l(f,{color:S}),[l]),m=ee(f=>l(f,{visible:!0}),[l]),k=ee(f=>l(f,{visible:!1}),[l]),E=ee(f=>{p(S=>({lighting:{lights:S.lighting.lights.map(R=>R.id===f?{...R,visible:!R.visible}:R)}}))},[p]),C=ee((f,S)=>l(f,{attachment:S,attachedToCamera:!1}),[l]),h=ee(f=>l(f,{attachment:void 0}),[l]),b=qn(()=>({items:i.lighting.lights,get:f=>i.lighting.lights.find(S=>S.id===f),add:x,update:l,remove:B,setIntensity:O,setColor:v,show:m,hide:k,toggle:E,attach:C,detach:h}),[i.lighting.lights,x,l,B,O,v,m,k,E,C,h]);return{sceneConfig:i,setSceneConfig:s,updateSceneConfig:p,resetSceneConfig:y,lights:b}}import{useCallback as ze}from"react";function $e({bindings:e,scene:t,camera:i,animations:s,isolation:p,onAction:y}){let{objectBindings:l,updateObjectBindings:x,showObject:B,hideObject:O,toggleObjectVisibility:v}=e,m=t?.updateSceneConfig,k=i?.focusObject,E=i?.fitScene,C=i?.resetView,h=i?.setCameraTarget,b=i?.setCameraState,f=s?.play,S=s?.pause,R=s?.stop,j=s?.setSpeed,q=s?.seek,X=p?.handleIsolationChange,_=ze(N=>{let a=Z(l,N);return a?l[a]?.actions??[]:[]},[l]),V=ze(async N=>{for(let a of N.action.effects??[]){if("objectBindings"in a){x(a.target,a.objectBindings);continue}if("sceneConfig"in a){m?.(a.sceneConfig);continue}if("isolation"in a){X?.(a.isolation);continue}if("visibility"in a){a.visibility==="show"?B(a.target):a.visibility==="hide"?O(a.target):v(a.target);continue}if("camera"in a){let c=a.camera;c.type==="focus-object"?await k?.(c.objectId??N.objectId):c.type==="fit-scene"?await E?.():c.type==="reset"?await C?.():c.type==="set-target"?await h?.(c.target,c.transition??!0):await b?.(c.state,c.transition??!0);continue}let r=a.animation;if(r.type==="play"){let{type:c,clip:u,...w}=r;f?.(u,w)}else r.type==="pause"?S?.(r.clip):r.type==="stop"?R?.(r.clip):r.type==="set-speed"?j?.(r.speed,r.clip):q?.(r.time,r.clip)}await y?.(N)},[E,k,O,y,S,f,C,q,j,b,h,X,B,R,v,x,m]),J=ze(async(N,a)=>{let r=Z(l,N);if(!r)return null;let c=l[r],u=c?.actions?.find(L=>L.id===a);if(!c||!u)return null;let w={objectId:r,action:u,binding:c};return await V(w),w},[V,l]);return{getActionsForObject:_,handleAction:V,runAction:J}}import{useCallback as he,useRef as yt}from"react";function Gn(e){return typeof e=="function"?e:e?.handleViewerReady??null}function We(...e){let t=yt(null),i=yt(e);i.current=e;let s=he(B=>{t.current=B;let O=new Set;for(let v of i.current){let m=Gn(v);m&&!O.has(m)&&(O.add(m),m(B))}},[]),p=he(()=>t.current,[]),y=he(B=>{let O=t.current;return O?O.captureImage(B):Promise.reject(new Error("ModelViewer is not ready yet."))},[]),l=he(()=>{let B=t.current;return B?(B.invalidate(),!0):!1},[]),x=he(B=>{let O=t.current;return O?O.captureVideo(B):Promise.reject(new Error("ModelViewer is not ready yet."))},[]);return{handleViewerReady:s,getViewer:p,captureImage:y,captureVideo:x,invalidate:l}}import{useCallback as U,useEffect as zn,useRef as oe}from"react";import{Material as $n,PointLight as Wn,Vector3 as Yn}from"three";var Je=["emissiveIntensity","opacity","metalness","roughness","transmission","clearcoat","clearcoatRoughness","ior","thickness"],Be=1;function ve(e){return typeof e=="string"?[e]:e}function Me(e,t=0,i=1){return Math.min(i,Math.max(t,e))}function Ye(e,t){return e+Math.random()*(t-e)}function ht([e,t],i){return e+(t-e)*i}function Xe([e,t],i){return[e[0]+(t[0]-e[0])*i,e[1]+(t[1]-e[1])*i,e[2]+(t[2]-e[2])*i]}function Vt(e,t){let i=Me(e);switch(t){case"ease-in":return i*i;case"ease-out":return 1-(1-i)*(1-i);case"ease-in-out":return i<.5?2*i*i:1-Math.pow(-2*i+2,2)/2;default:return i}}function Xn(e){let t=e.material;return t?(Array.isArray(t)?t:[t]).filter(i=>i instanceof $n):[]}function Jn(e){let t={opacity:e.opacity,transparent:e.transparent};e.color&&(t.baseColor=`#${e.color.getHexString()}`),e.emissive&&(t.emissive=`#${e.emissive.getHexString()}`);for(let i of Je){let s=e[i];typeof s=="number"&&(t[i]=s)}return t}function Ct(e,t){t.baseColor!==void 0&&e.color&&e.color.set(t.baseColor),t.emissive!==void 0&&e.emissive&&e.emissive.set(t.emissive);for(let i of Je){let s=t[i];s!==void 0&&typeof e[i]=="number"&&(e[i]=s)}t.transparent!==void 0&&(e.transparent=t.transparent),e.needsUpdate=!0}function Qn(e){return{position:[e.position.x,e.position.y,e.position.z],rotation:[e.rotation.x,e.rotation.y,e.rotation.z],scale:[e.scale.x,e.scale.y,e.scale.z],visible:e.visible}}function Zn(e,t){if(t.position&&e.position.set(...t.position),t.rotation&&e.rotation.set(...t.rotation),t.scale!==void 0){let i=typeof t.scale=="number"?[t.scale,t.scale,t.scale]:t.scale;e.scale.set(...i)}t.visible!==void 0&&(e.visible=t.visible),e.updateMatrix(),e.updateMatrixWorld(!0)}function Qe(e={}){let t=oe(e);t.current=e;let i=oe(null),s=oe(null),p=oe(null),y=oe(new Map),l=oe(new Map),x=oe(new Map),B=oe(new Map),O=U(n=>{let o=i.current;if(!o)return null;let g=Z(o.objectBindings,n);return o.raw.nodes[n]??(g?o.raw.nodes[g]:null)??(o.raw.scene?it(o.raw.scene,n):null)??null},[]),v=U(n=>{let o=i.current;return o?typeof n=="object"&&!Array.isArray(n)?ce(o.objectBindings,n):ve(n).map(g=>Z(o.objectBindings,g)??g):typeof n=="string"?[n]:Array.isArray(n)?n:[]},[]),m=U(()=>{i.current?.invalidate()},[]),k=U((n,o)=>{let g=!1;for(let d of v(n)){let M=O(d);if(M)for(let I of Xn(M))x.current.has(I)||x.current.set(I,Jn(I)),Ct(I,o),g=!0}return g},[O,v]),E=U((n,o)=>{let g=k(n,o);return g&&m(),g},[m,k]),C=U((n,o)=>{let g=!1;for(let d of v(n)){let M=O(d);M&&(B.current.has(M)||B.current.set(M,Qn(M)),Zn(M,o),g=!0)}return g},[O,v]),h=U((n,o)=>{let g=C(n,o);return g&&m(),g},[m,C]),b=U(n=>{let o=O(n);if(!o)return null;o.updateWorldMatrix(!0,!1);let g=o.getWorldPosition(new Yn);return[g.x,g.y,g.z]},[O]),f=U(n=>{let o=l.current.get(n);return o?(o.light.removeFromParent(),o.light.dispose(),l.current.delete(n),m(),!0):!1},[m]),S=U(n=>{let o=O(n.target);if(!o)return!1;let g=l.current.get(n.id),d=g?.light??new Wn;return g&&g.target!==n.target&&d.removeFromParent(),d.name=`react-immersive-runtime-light:${n.id}`,d.color.set(n.color??"#ffffff"),d.intensity=n.intensity??1,d.distance=n.distance??0,d.decay=n.decay??2,d.castShadow=n.castShadow??!1,d.position.set(...n.offset??[0,0,0]),d.parent!==o&&o.add(d),l.current.set(n.id,{light:d,target:n.target}),m(),!0},[m,O]),R=U((n,o)=>{let g=l.current.get(n);if(!g)return!1;if(o.target&&o.target!==g.target){let d=O(o.target);if(!d)return!1;g.light.removeFromParent(),d.add(g.light),g.target=o.target}return o.color!==void 0&&g.light.color.set(o.color),o.intensity!==void 0&&(g.light.intensity=o.intensity),o.distance!==void 0&&(g.light.distance=o.distance),o.decay!==void 0&&(g.light.decay=o.decay),o.offset!==void 0&&g.light.position.set(...o.offset),o.castShadow!==void 0&&(g.light.castShadow=o.castShadow),m(),!0},[m,O]),j=U((n,o)=>{let g=d=>o[d%o.length]??0;for(let d of n.materials??[])v(d.targets).forEach((M,I)=>{let T=g(I),D={};for(let Y of Je){let K=d.values[Y];K&&(D[Y]=ht(K,T))}k(M,D)});for(let d of n.transforms??[])v(d.targets).forEach((M,I)=>{let T=g(I),D={};d.values.position&&(D.position=Xe(d.values.position,T)),d.values.rotation&&(D.rotation=Xe(d.values.rotation,T)),d.values.scale&&(D.scale=Xe(d.values.scale,T)),C(M,D)});for(let d of n.lights??[])ve(d.lights).forEach((M,I)=>{let T=l.current.get(M);T&&(T.light.intensity=ht(d.intensity,g(I)))})},[v,k,C]),q=oe(()=>{}),X=oe(()=>{});X.current=n=>{p.current=null;let o=!1;for(let[g,d]of y.current){d.startedAt===null&&(d.startedAt=n);let M=d.lastFrameAt??n;d.lastFrameAt=n;let I=d.override&&d.override.until>n?d.override.level:null;d.override&&I===null&&(d.override=null);let T=d.update(n,n-d.startedAt,Math.min(100,n-M),I);o=!0,T||(y.current.delete(g),d.onComplete?.())}o&&m(),y.current.size>0&&q.current()},q.current=()=>{p.current!==null||typeof requestAnimationFrame>"u"||(p.current=requestAnimationFrame(n=>X.current(n)))};let _=U(n=>(y.current.set(n.id,n),q.current(),n.id),[]),V=U((n,o={})=>{let g=o.id??`transition-${Be++}`,d=Math.max(1,o.duration??400),M=o.easing??"ease-in-out";return _({id:g,startedAt:null,lastFrameAt:null,override:null,onComplete:o.onComplete,update:(I,T,D,Y)=>{let K=Y??Vt(T/d,M);return j(n,[K]),T<d}})},[j,_]),J=U((n,o={})=>{let g=o.id??`pulse-${Be++}`,d=Math.max(1,o.duration??1e3),M=o.minLevel??0,I=o.maxLevel??1,T=o.repeat??1/0,D=o.synchronized??!0,Y=Math.max(1,...[...n.materials??[],...n.transforms??[]].map(K=>v(K.targets).length),...(n.lights??[]).map(K=>ve(K.lights).length));return _({id:g,startedAt:null,lastFrameAt:null,override:null,onComplete:o.onComplete,update:(K,ae,de,ne)=>{let F=ae/d,P=Array.from({length:D?1:Y},(A,W)=>{if(ne!==null)return ne;let G=F+(D?0:W/Y),z=.5-Math.cos(G%1*Math.PI*2)/2;return M+(I-M)*z});return j(n,P),T===1/0||F<T}})},[j,_,v]),N=U((n,o={})=>{let g=o.id??`timeline-${Be++}`,d=o.repeat??1,M=n.map(T=>({...T,duration:Math.max(1,T.duration),hold:Math.max(0,T.hold??0)})),I=Math.max(1,M.reduce((T,D)=>T+D.duration+D.hold,0));return _({id:g,startedAt:null,lastFrameAt:null,override:null,onComplete:o.onComplete,update:(T,D,Y,K)=>{if(M.length===0||d<=0)return!1;let ae=D/I;if(d!==1/0&&ae>=d){for(let F of M)j(F.channels,[1]);return!1}let de=D%I,ne=0;for(let F of M){let P=ne+F.duration,A=P+F.hold;if(de>=P){j(F.channels,[K??1]),ne=A;continue}if(de>=ne){let W=K??Vt((de-ne)/F.duration,F.easing??"ease-in-out");j(F.channels,[W]);break}}return!0}})},[j,_]),a=U((n,o={})=>{let g=o.id??`flicker-${Be++}`,d=o.synchronized??!0,M=o.minLevel??.15,I=o.maxLevel??1,T=o.interval??[45,160],D=typeof T=="number"?[T,T]:T,Y=[Math.max(1,Math.min(...D)),Math.max(1,Math.max(...D))],K=Me(o.response??.7,.01,1),ae=Me(o.blackoutChance??.08),de=Me(o.flashChance??.12),ne=o.flashLevel??1.15,F=Math.max(1,...[...n.materials??[],...n.transforms??[]].map(z=>v(z.targets).length),...(n.lights??[]).map(z=>ve(z.lights).length)),P=d?1:F,A=Array.from({length:P},()=>M),W=Array.from({length:P},()=>M),G=Array.from({length:P},()=>0);return _({id:g,startedAt:null,lastFrameAt:null,override:null,onComplete:o.onComplete,update:(z,we,ie,Ve)=>{for(let Q=0;Q<P;Q+=1){if(Ve!==null)W[Q]=Ve;else if(z>=G[Q]){let rt=Math.random();W[Q]=rt<ae?Ye(0,Math.min(.04,M)):rt<ae+de?ne:Ye(M,I),G[Q]=z+Ye(...Y)}let Rt=1-Math.pow(1-K,Math.max(1,ie)/16.67);A[Q]+=(W[Q]-A[Q])*Rt}return j(n,A),o.duration===void 0||we<o.duration}})},[j,_,v]),r=U((n,o,g)=>{let d=y.current.get(n);if(!d)return!1;let M=typeof performance>"u"?Date.now():performance.now();return d.override={level:o,until:M+Math.max(0,g)},q.current(),!0},[]),c=U(n=>y.current.delete(n),[]),u=U(()=>{y.current.clear(),p.current!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(p.current),p.current=null)},[]),w=U(()=>{for(let[n,o]of x.current)Ct(n,o);x.current.clear();for(let[n,o]of B.current)n.position.set(...o.position),n.rotation.set(...o.rotation),n.scale.set(...o.scale),n.visible=o.visible,n.updateMatrix(),n.updateMatrixWorld(!0);B.current.clear();for(let n of l.current.values())n.light.removeFromParent(),n.light.dispose();l.current.clear(),m()},[m]),L=U(()=>{u(),w()},[w,u]),$=U(n=>{s.current&&s.current!==n.raw.scene&&w(),i.current=n,s.current=n.raw.scene,t.current.onViewerReady?.(n)},[w]);return zn(()=>()=>{L(),i.current=null,s.current=null},[L]),{handleViewerReady:$,setMaterial:E,setTransform:h,getWorldPosition:b,addPointLight:S,updatePointLight:R,removePointLight:f,transition:V,timeline:N,pulse:J,flicker:a,overrideEffect:r,stopEffect:c,stopAllEffects:u,resetRuntime:L}}import{useCallback as er,useState as tr}from"react";function Ze(){let[e,t]=tr(null),i=er(s=>{t(s)},[t]);return{hoveredObjectBinding:e,handleHoveredObject:i}}import{useCallback as St,useState as nr}from"react";function et(e=null){let[t,i]=nr(e),s=St((y,l)=>i({...l,target:y}),[]),p=St(()=>i(null),[]);return{isolation:t,isolate:s,clearIsolation:p,handleIsolationChange:i}}import{useCallback as Pe,useState as le}from"react";function tt(){let[e,t]=le(!0),[i,s]=le(!1),[p,y]=le(null),[l,x]=le(null),[B,O]=le(0),[v,m]=le([]),[k,E]=le([]),[C,h]=le([]),b=Pe(j=>{x(j.bounds),O(j.objectCount),m(j.materialVariants),E(j.materialVariantGroups),y(null),t(!1),s(!0)},[]),f=Pe(j=>h(j),[]),S=Pe(j=>{y(j),x(null),O(0),m([]),E([]),h([]),t(!1),s(!1)},[]),R=Pe(()=>{t(!0),s(!1),y(null),x(null),O(0),m([]),E([]),h([])},[]);return{isLoading:e,isReady:i,error:p,bounds:l,objectCount:B,materialVariants:v,materialVariantGroups:k,objects:C,handleModelLoaded:b,handleObjectCatalog:f,handleLoadError:S,resetModelState:R}}import{useCallback as Ot,useState as rr}from"react";function nt(e=null){let[t,i]=rr(e),s=Ot(y=>{i(y)},[i]),p=Ot(()=>{i(null)},[]);return{selectedObjectBinding:t,setSelectedObjectBinding:i,handleObjectSelect:s,clearSelection:p}}var ir={};function or(e={}){let t=jt(e);t.current=e;let i=jt(e.bindings===void 0||e.bindings==="auto"),s=Ke(()=>{let V=t.current.bindings;return V===void 0||V==="auto"?ir:typeof V=="function"?V():V}),p=Ge(()=>{let V=t.current.sceneConfig;return V===void 0?Se:typeof V=="function"?V():V}),y=nt(),l=Ze(),x=Ae(e.camera),B=tt(),O=qe(),v=et(),m=Qe(),k=We(x,m),E=$e({bindings:s,scene:p,camera:x,animations:O,isolation:v,onAction:e.onAction}),{setObjectBindings:C}=s,{handleObjectCatalog:h}=B,b=Re(V=>{h(V),i.current&&C(J=>{let N=lt(V.map(a=>a.name));for(let a of Object.keys(N))J[a]&&(N[a]=J[a]);return N})},[h,C]),{handleObjectSelect:f}=y,S=Re(V=>{f(V),t.current.onObjectSelect?.(V)},[f]),{handleHoveredObject:R}=l,j=Re(V=>{R(V),t.current.onObjectHover?.(V)},[R]),{handleLoadError:q}=B,X=Re(V=>{q(V),t.current.onLoadError?.(V)},[q]),_=e.sceneConfig!==void 0||p.sceneConfig!==Se;return{props:{objectBindings:s.objectBindings,onObjectBindingsChange:C,selectedObject:y.selectedObjectBinding,onObjectSelect:S,onObjectHover:j,onCameraChange:x.handleCameraChange,onViewerReady:k.handleViewerReady,onModelLoaded:B.handleModelLoaded,onLoadError:X,onObjectCatalog:b,onAnimationsReady:O.handleAnimationsReady,onAction:E.handleAction,onSceneConfigChange:p.setSceneConfig,isolation:v.isolation,onIsolationChange:v.handleIsolationChange,..._?{sceneConfig:p.sceneConfig}:{}},bindings:s,selection:y,hover:l,camera:x,model:B,animations:O,actions:E,scene:p,isolation:v,effects:m,connection:k}}import{useMemo as sr}from"react";function ar(e,t){return sr(()=>{if(!t)return null;let i=e[t];return i||(Object.values(e).find(s=>s.id===t||s.modelObjectId===t)??null)},[e,t])}import{useMemo as cr}from"react";function lr(e){return cr(()=>Object.values(e).map(t=>t.modelObjectId),[e])}import{useCallback as te,useEffect as xe,useRef as se,useState as dr}from"react";function ur(e,t){if(!e.objectBindings&&(!!e.hidden?.length||!!e.selected)&&Object.keys(t).length===0)return null;let s={};if(e.objectBindings)s.bindings=e.objectBindings;else if(e.hidden){let p=new Set(e.hidden);s.bindings=Object.fromEntries(Object.entries(t).map(([y,l])=>[y,{...l,visible:!p.has(l.id)}]))}if(e.selected!==void 0){let p=e.objectBindings??t,y=e.selected?Z(p,e.selected):null;s.selected=y?p[y]:null}return s}function Bt(e){return JSON.stringify(e&&{modelUrl:e.modelUrl,activeModelId:e.activeModelId,tilesetUrl:e.tilesetUrl,mergeModels:e.mergeModels,models:e.models?.map(({id:t,url:i,mergeModels:s})=>({id:t,url:i,mergeModels:s}))})}function pr(e){let t=se(e);t.current=e;let i=e.paramKey??"view",s=`${i}Id`,[p,y]=dr(!1),l=se(null),x=se(null),B=se(null),O=se(null),v=se(null),m=se(null),k=se(null),E=se(null),C=se(!0),h=te(r=>{let c=r instanceof Error?r:new Error(String(r));t.current.onError?t.current.onError(c):k.current!==c.message&&console.warn("[react-immersive]",c.message),k.current=c.message},[]),b=te(()=>{v.current!==null&&clearTimeout(v.current),v.current=null},[]);xe(()=>(C.current=!0,()=>{C.current=!1,b()}),[b]);let f=te(()=>{let r=t.current,c=(r.mode??(r.configuration?"configuration":"view"))==="configuration";return{version:1,camera:r.cameraState??void 0,hidden:Object.values(r.objectBindings).filter(u=>u.visible===!1).map(u=>u.id),selected:r.selectedObjectBinding?.id??null,...c?{objectBindings:r.objectBindings,configuration:r.configuration}:{}}},[]),S=te(()=>ye(f(),typeof window>"u"?void 0:window.location.href),[f]),R=te(()=>Le(f(),typeof window>"u"?void 0:window.location.href),[f]),j=te((r,c,u=window.location.href)=>{let w=new URL(u),L=new URLSearchParams(w.hash.slice(1));if(L.delete(i),L.delete(s),L.set(c?s:i,r),w.hash=L.toString(),!c&&w.href.length>(t.current.maxUrlLength??65536))throw new Error("Viewer configuration is too large for an inline link. Save JSON instead, or configure storage for createShareUrl(). Uploaded images can make links large.");return w.href},[i,s]),q=te(()=>j(ge(S()),!1),[S,j]),X=te(async()=>{let r=window.location.href,c=t.current.storage,u=await R();if(!c)return j(ge(u),!1,r);let w=await c.save(u);if(typeof w!="string"||!w.trim()||w.length>2048)throw new Error("Viewer state storage returned an invalid id.");return j(w,!0,r)},[R,j]),_=te(()=>{if(b(),l.current||m.current)return;let r=q();window.history.replaceState(null,"",r),O.current=`inline:${new URL(r).hash}`},[b,q]),V=te(async()=>{let r=l.current;if(!r||x.current||!C.current)return!1;x.current=r,b();try{let c=t.current,u=r.state;if(u.configuration&&!r.configurationApplied){if(!c.onConfigurationChange)throw new Error("Restoring a full viewer configuration requires onConfigurationChange.");return r.configurationApplied=!0,c.onConfigurationChange(u.configuration),!1}if(u.configuration&&Bt(c.configuration)!==Bt(u.configuration)||c.isReady===!1)return!1;if(u.camera&&!r.cameraApplied){if(!await c.setCameraState(u.camera,!1)||l.current!==r||!C.current)return!1;r.cameraApplied=!0}c=t.current;let w=ur(u,c.objectBindings);return!w||l.current!==r?!1:(w.bindings&&c.onObjectBindingsChange(w.bindings),w.selected!==void 0&&c.setSelectedObjectBinding(w.selected),l.current=null,B.current=r.key,y(!0),!0)}catch(c){throw l.current===r&&(l.current=null),y(!1),c}finally{x.current=null,l.current&&l.current!==r&&C.current&&V().catch(h)}},[b,h]),J=te(async r=>{let c=ye(r,window.location.href);b(),E.current=null,m.current=null;let u=new URLSearchParams(window.location.hash.slice(1));return O.current=u.has(i)?`inline:${window.location.hash}`:u.has(s)?`stored:${s}:${u.get(s)}`:null,B.current=null,l.current={key:`manual:${ge(c)}`,origin:"manual",state:c,configurationApplied:!1,cameraApplied:!1},y(!1),V()},[V,b,i,s]),N=te(async()=>{let r=new URLSearchParams(window.location.hash.slice(1)),c=r.get(i),u=r.get(s),w=c!==null?`inline:${window.location.hash}`:u!==null?`stored:${s}:${u}`:null;if(!w)return E.current=null,m.current=null,l.current?.origin==="manual"?V():(l.current=null,B.current=null,y(!0),!1);if(w===O.current||w===B.current)return l.current?.origin==="manual"?V():!1;if(l.current?.key===w)return V();b(),y(!1),E.current=w,l.current=null;let L=c;if(c===null){let n=t.current.storage;if(!n)throw new Error("This shared link requires a viewer state storage adapter.");(!m.current||m.current.key!==w)&&(m.current={key:w,promise:n.load(u)});let o=m.current;try{L=await o.promise}finally{m.current===o&&(m.current=null)}if(E.current!==w||!C.current)return!1;let g=l.current;if(g?.key===w||B.current===w)return g?V():!1}let $;try{$=ye(L,window.location.href)}catch(n){throw n}return l.current={key:w,origin:"url",state:$,configurationApplied:!1,cameraApplied:!1},V()},[V,b,s,i]);xe(()=>{l.current&&V().catch(h)}),xe(()=>{let r=()=>{N().catch(h)};return window.addEventListener("hashchange",r),()=>window.removeEventListener("hashchange",r)},[N,h]);let a=null;if(e.autoSync!==!1&&p&&!l.current&&!m.current)try{a=ge(S())}catch{}return xe(()=>{if(e.autoSync===!1||!p||l.current||m.current){b();return}if(a===null){try{S()}catch(r){h(r)}return}return v.current=setTimeout(()=>{v.current=null;try{_()}catch(r){h(r)}},Math.max(0,e.debounceMs??400)),b},[a,e.autoSync,e.debounceMs,p,b,S,_,h]),{getState:S,getStateAsync:R,restoreState:J,getShareUrl:q,createShareUrl:X,syncUrl:_,restoreFromUrl:N}}import{useCallback as pe,useState as vt}from"react";var fr={};function Mt(){return`asset-${globalThis.crypto.randomUUID()}`}function gr(e){let[t,i]=vt(e),[s,p]=vt(()=>e[0]?re(e[0]):""),y=t.find(C=>re(C)===s)??t[0],l=y?re(y):"",x=pe(C=>{i(h=>h.map(b=>re(b)===l?{...b,objectBindings:C}:b))},[l]),B=pe(C=>{i(h=>h.map(b=>re(b)===l?{...b,sceneConfig:C}:b))},[l]),O=pe(C=>p(h=>{let b=t.find(f=>f.url===C);return b?re(b):h}),[t]),v=pe(C=>{let h={...C,id:C.id??Mt()};return i(b=>{if(b.some(f=>re(f)===h.id))throw new Error("Asset instance ID already exists.");return[...b,h]}),h.id},[]),m=pe(C=>{let h=t.find(j=>re(j)===C);if(!h)return null;let b=structuredClone(h);b.id=Mt(),b.sceneConfig?.measurements&&(b.sceneConfig.measurements.items=b.sceneConfig.measurements.items.map(j=>({...j,modelId:b.id}))),b.label=`${h.label??"Asset"} copy`;let[f,S,R]=h.transform?.position??[0,0,0];return b.transform={...b.transform,position:[f+1,S,R]},i(j=>[...j,b]),b.id},[t]),k=pe(C=>{i(h=>h.filter(b=>re(b)!==C))},[]),E=pe((C,h)=>{let b=Ee(h);i(f=>f.map(S=>re(S)===C?{...S,transform:b}:S))},[]);return{modelUrl:y?.url??"",models:t,activeModelId:l,onModelChange:O,onActiveModelChange:p,objectBindings:fr,onObjectBindingsChange:x,sceneConfig:y?.sceneConfig,onSceneConfigChange:B,addModel:v,duplicateModel:m,removeModel:k,updateModelTransform:E}}import{useCallback as be,useEffect as mr,useState as br,useSyncExternalStore as wr}from"react";var yr={sequenceId:null,time:0,duration:0,status:"stopped",previewing:!1,ready:!1,issues:[]},hr=()=>()=>{},Pt=()=>yr;function Vr(){let[e,t]=br(null),i=wr(e?.subscribe??hr,e?.getState??Pt,Pt);mr(()=>()=>e?.stop(),[e]);let s=be(p=>t(p),[]);return{controls:e,playback:i,handleSequencesReady:s,play:be(p=>e?.play(p)??!1,[e]),pause:be(()=>e?.pause(),[e]),stop:be(()=>e?.stop(),[e]),seek:be(p=>e?.seek(p)??!1,[e]),select:be(p=>e?.select(p)??!1,[e])}}export{hn as ACTION_CATALOG,kn as AssetDiagnosticsPanel,gt as CompareViewer,Lt as DEFAULT_MODEL_VIEWER_LABELS,Se as DEFAULT_SCENE_CONFIG,Ce as DEFAULT_SECTION_CONFIG,En as MATERIAL_BLENDING_MODES,An as MATERIAL_SIDES,fn as MAX_VIEWER_STATE_BYTES,_t as MEASUREMENT_UNITS,yn as MODEL_VIEWER_PRESETS,ke as ModelViewer,jn as ProductOptions,At as SEQUENCE_EASINGS,xt as SEQUENCE_OBJECT_PROPERTIES,vn as applyIsolation,pn as applyProductOptions,Sn as applyStyleRules,Rn as buildBindingsFromNodes,qt as calibrateMeasurements,Yt as chooseMaterialVariant,Tn as collectObjectHierarchy,Cn as colorScaleValue,Ue as compareViewerConfigurations,In as copyBindingStyle,gn as createARHandoffUrl,Pn as createDefaultBinding,on as decodeProductSelections,Jt as defaultProductSelections,xn as defineObjectBindings,rn as encodeProductSelections,Qt as evaluateProductConfiguration,bn as exportConfiguredUSDZ,Vn as findCatalogAction,tn as formatProductPrice,sn as generateProductSkus,Ht as groundAsset,Mn as inferType,wn as inspectAsset,Bn as isolatedBindingKeys,Ie as material,Kt as measurementResult,Nt as measurementScale,Ft as measurementValue,$t as measurementsToCsv,Ee as parseAssetTransform,Gt as parseMeasurements,un as parseProductConfiguration,Xt as parseProductDefinition,ln as parseSceneProduct,kt as parseSectionConfig,Wt as parseSelectionSets,Et as parseSequences,ye as parseViewerState,Ln as pasteBindingStyle,fe as patchBindings,_e as patchSceneConfig,Le as prepareViewerState,nn as productCheckoutUrl,an as productDefinitionWarnings,cn as productOptionStates,en as productPriceFromDefinition,mn as readARHandoffUrl,Zt as resolveProductSelections,Tt as sampleSequenceTrack,Ne as sceneLight,Ut as sectionSnapshot,ce as selectBindingKeys,Te as selectBindings,zt as serializeMeasurements,dn as serializeProductConfiguration,ge as serializeViewerState,Dt as snapAssetToGrid,It as upsertSequenceKeyframe,ar as useObjectBinding,lr as useObjectBindingIds,Ke as useObjectBindings,On as useProductConfigurator,Ge as useSceneConfig,pr as useShareableViewerState,or as useViewer,$e as useViewerActions,qe as useViewerAnimations,Ae as useViewerCamera,We as useViewerConnection,Qe as useViewerEffects,Ze as useViewerHover,et as useViewerIsolation,tt as useViewerModel,gr as useViewerModels,nt as useViewerSelection,Vr as useViewerSequences};
1
+ "use client";import{c as ke}from"./chunk-IT2PUTJS.mjs";import"./chunk-MMO7KCYU.mjs";import{a as _e,b as Ne,c as xn}from"./chunk-F5QSXMME.mjs";import{b as yn,f as On,g as jn,q as dt,r as ut,s as He,t as pt,u as qe,v as kn}from"./chunk-LEOHZ5HM.mjs";import"./chunk-RSUXTWM6.mjs";import"./chunk-FGAJ2UT7.mjs";import"./chunk-SOAUR4DL.mjs";import{v as at,w as ct}from"./chunk-XKJQC3N5.mjs";import{a as ot,b as st}from"./chunk-NMRTI3NQ.mjs";import"./chunk-37YITTIK.mjs";import"./chunk-2AJK643D.mjs";import"./chunk-5C4H7SRF.mjs";import"./chunk-3PLML3PO.mjs";import{$ as Wt,Aa as lt,D as re,Da as Ue,E as Ee,Ea as De,Fa as An,G as Dt,Ga as En,H as Ht,Ha as Tn,Ia as In,Ja as Ln,R as _t,T as Nt,V as qt,W as Ft,X as Kt,Y as Gt,Z as zt,_ as $t,aa as fn,ba as ge,ca as ye,da as Le,e as it,ia as gn,ja as mn,n as Ae,oa as bn,pa as hn,ra as Vn,va as Bn,w as Ce,wa as vn,x as Se,xa as Mn,y as kt,ya as Pn,z as Ut,za as Rn}from"./chunk-2LGQKX6Z.mjs";import{a as xt,b as At,e as Et,f as Tt,g as It}from"./chunk-LX3GXQNU.mjs";import{b as fe,c as Ie,d as Xt,e as Jt,f as Qt,g as Zt,h as en,i as tn,j as nn,k as rn,l as on,m as sn,n as an,o as cn,p as ln,q as dn,r as un,s as pn}from"./chunk-7JCFNZJM.mjs";import"./chunk-37QOMZW6.mjs";import{b as Cn,c as Sn}from"./chunk-CCBFMNAU.mjs";import{a as Z,b as ce,c as Te}from"./chunk-GV4ZRXL6.mjs";import"./chunk-7OWHW66D.mjs";import{e as wn}from"./chunk-KFLS7GI6.mjs";import{a as Lt}from"./chunk-UAZ6I25Y.mjs";import{c as Yt}from"./chunk-BNKTI3CY.mjs";import"./chunk-UCD76KQ6.mjs";import"./chunk-TUYVYSN5.mjs";import"./chunk-RXZ4Q7CY.mjs";import"./chunk-JR557W27.mjs";import{useCallback as Un,useEffect as Oe,useMemo as je,useRef as Fe,useState as me}from"react";import{jsx as ue,jsxs as ft}from"react/jsx-runtime";var Dn=Object.freeze({});function gt(e){return ue(ot,{labels:e.labels,children:ue(Hn,{...e})})}function Hn({before:e,after:t,layout:i="slider",split:s,onSplitChange:p,reveal:y="auto",semanticComparison:l=!1,showComparisonOutlines:x,onComparisonOutlinesChange:B,onComparisonChange:O,linkSections:v,...m}){let k=st(),[E,C]=me(y==="auto");Oe(()=>{y==="auto"&&C(!0)},[y]);let[h,b]=me(.5),[f,S]=me(!0),R=x??f,j=P=>{x===void 0&&S(P),B?.(P)},q=He(s??h),X=Un(P=>{let A=He(P);s===void 0&&b(A),p?.(A)},[s,p]),_=Fe([null,null]),[V,J]=me([null,null]),[N,a]=me(null),[r,c]=me(null),u=[{...m,...e},{...m,...t}];Oe(()=>a(null),[u[0].sceneConfig?.section,u[1].sceneConfig?.section]);let w=P=>{let A=u[P].objectBindings;return A&&typeof A=="object"?A:V[P]?.url===u[P].modelUrl?V[P].bindings:Dn},L=w(0),$=w(1),n=je(()=>l?Ue({objectBindings:L,sceneConfig:u[0].sceneConfig},{objectBindings:$,sceneConfig:u[1].sceneConfig},typeof l=="object"?l:{}):null,[l,L,$,u[0].sceneConfig,u[1].sceneConfig]),o=n?JSON.stringify(n):"",g=Fe(null);Oe(()=>{n&&g.current!==o&&(g.current=o,O?.(n))},[n,o,O]);let d=n?.objects.find(P=>P.id===r),M=je(()=>n?[De(n,"before",r),De(n,"after",r)]:null,[n,r]),I=je(()=>ut(),[]);Oe(()=>()=>I.detach(),[I]);let T=[e,t],D=je(()=>[0,1].map(P=>(A,W)=>{_.current[P]=A,J(G=>G[P]?.bindings===A.objectBindings&&G[P]?.url===W?G:G.map((z,we)=>we===P?{url:W,bindings:A.objectBindings}:z)),I.attach(P,A.raw.controls,A.invalidate)}),[I]),Y=T.map((P,A)=>{let{label:W,...G}=P,z={preset:"minimal",...m,...G,refitOnResize:G.refitOnResize??m.refitOnResize??!1},we=G.onViewerReady??m.onViewerReady;return{...z,...v??!!l?{sceneConfig:{...z.sceneConfig,section:N??u[1].sceneConfig?.section??Ce},onSceneConfigChange:ie=>{a(ie.section??Ce),(G.onSceneConfigChange??m.onSceneConfigChange)?.(ie)}}:{},...M?{comparisonHighlights:R?M[A]:void 0,selectedObject:A===0?d?.beforeKey?L[d.beforeKey]:null:d?.afterKey?$[d.afterKey]:null}:{},onObjectSelect:ie=>{if((G.onObjectSelect??m.onObjectSelect)?.(ie),n){let Ve=n.objects.find(Q=>(A===0?Q.beforeObjectId:Q.afterObjectId)===ie?.modelObjectId);c(Ve?.id??null)}},onViewerReady:ie=>{D[A](ie,z.modelUrl),we?.(ie)}}}),K=[e.label??k("compareBefore"),t.label??k("compareAfter")];(!Y[0].modelUrl||!Y[1].modelUrl)&&console.error("[react-immersive] CompareViewer needs a modelUrl, shared or on each side.");let ae=Fe(null),ne=n?ue(dt,{showOutlines:R,onShowOutlinesChange:j,report:n,selected:r,onSelect:P=>{c(P.id);let A=P.afterObjectId?1:0,W=_.current[A],G=A===1?P.afterObjectId:P.beforeObjectId,z=G?W?.raw.nodes[G]:null;W&&z&&(I.setLeader(A),W.raw.controls.fitToBox(z,!0),W.invalidate())},onClear:()=>c(null)}):null;if(!E)return ue(at,{className:"ri-compare",background:ct(m.backgroundColor,m.sceneConfig),poster:m.poster??t.poster??e.poster,onReveal:()=>C(!0)});let F=i==="side-by-side";return ft("div",{ref:ae,className:`ri-compare ${F?"ri-compare--sideBySide":"ri-compare--slider"}`,style:F?void 0:{"--ri-compare-split":`${q*100}%`},children:[Y.map((P,A)=>ft("div",{className:F?"ri-compare__pane":A===1?"ri-compare__layer ri-compare__layer--after":"ri-compare__layer",children:[ue(ke,{...P}),F?ue("span",{className:"ri-compare__label",children:K[A]}):null]},A)),ne,F?null:ue(pt,{split:q,onSplitChange:X,labels:[K[0],K[1]],containerRef:ae})]})}import{useCallback as Re,useRef as jt}from"react";import{useCallback as H,useMemo as mt,useState as _n}from"react";var bt={baseColor:"texture",metalness:"metalnessMap",roughness:"roughnessMap",emissive:"emissiveMap",alpha:"alphaMap",normal:"normalMap",bump:"bumpMap",ao:"aoMap",displacement:"displacementMap",clearcoat:"clearcoatMap",clearcoatRoughness:"clearcoatRoughnessMap",clearcoatNormal:"clearcoatNormalMap",anisotropy:"anisotropyMap",transmission:"transmissionMap",thickness:"thicknessMap",sheenColor:"sheenColorMap",sheenRoughness:"sheenRoughnessMap",specularIntensity:"specularIntensityMap",specularColor:"specularColorMap"};function wt(e){if(e)return Object.fromEntries(Object.entries(e).map(([t,i])=>[t,i&&typeof i=="object"?{...i}:i]))}function Nn(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t.visible===!1).map(([t])=>[t,!0]))}function Ke(e){let[t,i]=_n(e),s=H((a,r)=>{i(c=>r===void 0?fe(c,a):fe(c,a,r))},[]),p=H((a,r)=>s(a,Ie(r)),[s]),y=H((a,r)=>p(a,{baseColor:r}),[p]),l=H((a,r,c="baseColor")=>{let u=bt[c],w=typeof r=="string"?{path:r}:r;s(a,{style:{material:{[u]:w}}})},[s]),x=H((a,r="baseColor")=>{let c=bt[r];s(a,{style:{material:{[c]:void 0}}})},[s]),B=H((a,r)=>{i(c=>{let u=Z(c,a);if(!u)return c;let w=wt(c[u]?.style?.material),L=ce(c,r);if(L.length===0)return c;let $=c;for(let n of L){let o=c[n];o&&($===c&&($={...c}),$[n]={...o,style:{...o.style,material:wt(w)}})}return $})},[]),O=H(a=>s(a,{style:{material:void 0}}),[s]),v=H((a,r)=>s(a,{transform:r}),[s]),m=H(a=>s(a,{transform:void 0}),[s]),k=H((a,r)=>s(a,{metadata:r}),[s]),E=H((a,r)=>{i(c=>{let u=c;for(let w of ce(c,a)){let L=c[w],$=r(L.decals??[]);u===c&&(u={...c}),u[w]={...L,decals:$.length>0?$:void 0}}return u})},[]),C=H((a,r)=>{let c=r.id??`decal-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`;return E(a,u=>[...u.filter(w=>w.id!==c),{...r,id:c}]),c},[E]),h=H((a,r,c)=>E(a,u=>u.map(w=>w.id===r?{...w,...c}:w)),[E]),b=H((a,r)=>E(a,c=>c.filter(u=>u.id!==r)),[E]),f=H(a=>Te(t,a),[t]),S=H(a=>ce(t,a).map(r=>t[r]?.id??r),[t]),R=H(a=>{let r=Z(t,a);return r?t[r]?.style?.material??null:null},[t]),j=H(a=>s(a,{visible:!1}),[s]),q=H(a=>s(a,{visible:!0}),[s]),X=H(a=>{i(r=>{let c=ce(r,a).reduce((u,w)=>{let L=r[w];return L&&u.push({ids:w,patch:{visible:L.visible===!1}}),u},[]);return fe(r,c)})},[i]),_=H(()=>{i(a=>fe(a,Object.keys(a),{visible:!0}))},[i]),V=mt(()=>Nn(t),[t]),J=mt(()=>Object.keys(V).map(a=>t[a]?.id??a),[V,t]),N=H(a=>{let r=Z(t,a);return r?t[r]?.visible===!1:!1},[t]);return{objectBindings:t,setObjectBindings:i,updateObjectBindings:s,setMaterial:p,setBaseColor:y,setTexture:l,clearTexture:x,copyMaterial:B,resetMaterial:O,getMaterial:R,setTransform:v,resetTransform:m,updateMetadata:k,addDecal:C,updateDecal:h,removeDecal:b,selectObjectBindings:f,selectObjectBindingIds:S,hiddenObjects:V,hiddenObjectIds:J,hideObject:j,showObject:q,toggleObjectVisibility:X,isObjectHidden:N,clearHiddenObjects:_}}import{useCallback as ee,useMemo as qn,useRef as Fn,useState as Kn}from"react";function Ge(e){let t=Fn(null),[i,s]=Kn(()=>{let f=typeof e=="function"?e():e;return t.current=f,f}),p=ee(f=>{s(S=>{let R=typeof f=="function"?f(S):f;return _e(S,R)})},[]),y=ee(()=>{let f=t.current;f&&s(f)},[]),l=ee((f,S)=>{p(R=>({lighting:{lights:R.lighting.lights.map(j=>j.id===f?{...j,...S}:j)}}))},[p]),x=ee(f=>{p(S=>S.lighting.lights.some(R=>R.id===f.id)?{}:{lighting:{lights:[...S.lighting.lights,Ne(f)]}})},[p]),B=ee(f=>{p(S=>({lighting:{lights:S.lighting.lights.filter(R=>R.id!==f)}}))},[p]),O=ee((f,S)=>l(f,{intensity:S}),[l]),v=ee((f,S)=>l(f,{color:S}),[l]),m=ee(f=>l(f,{visible:!0}),[l]),k=ee(f=>l(f,{visible:!1}),[l]),E=ee(f=>{p(S=>({lighting:{lights:S.lighting.lights.map(R=>R.id===f?{...R,visible:!R.visible}:R)}}))},[p]),C=ee((f,S)=>l(f,{attachment:S,attachedToCamera:!1}),[l]),h=ee(f=>l(f,{attachment:void 0}),[l]),b=qn(()=>({items:i.lighting.lights,get:f=>i.lighting.lights.find(S=>S.id===f),add:x,update:l,remove:B,setIntensity:O,setColor:v,show:m,hide:k,toggle:E,attach:C,detach:h}),[i.lighting.lights,x,l,B,O,v,m,k,E,C,h]);return{sceneConfig:i,setSceneConfig:s,updateSceneConfig:p,resetSceneConfig:y,lights:b}}import{useCallback as ze}from"react";function $e({bindings:e,scene:t,camera:i,animations:s,isolation:p,onAction:y}){let{objectBindings:l,updateObjectBindings:x,showObject:B,hideObject:O,toggleObjectVisibility:v}=e,m=t?.updateSceneConfig,k=i?.focusObject,E=i?.fitScene,C=i?.resetView,h=i?.setCameraTarget,b=i?.setCameraState,f=s?.play,S=s?.pause,R=s?.stop,j=s?.setSpeed,q=s?.seek,X=p?.handleIsolationChange,_=ze(N=>{let a=Z(l,N);return a?l[a]?.actions??[]:[]},[l]),V=ze(async N=>{for(let a of N.action.effects??[]){if("objectBindings"in a){x(a.target,a.objectBindings);continue}if("sceneConfig"in a){m?.(a.sceneConfig);continue}if("isolation"in a){X?.(a.isolation);continue}if("visibility"in a){a.visibility==="show"?B(a.target):a.visibility==="hide"?O(a.target):v(a.target);continue}if("camera"in a){let c=a.camera;c.type==="focus-object"?await k?.(c.objectId??N.objectId):c.type==="fit-scene"?await E?.():c.type==="reset"?await C?.():c.type==="set-target"?await h?.(c.target,c.transition??!0):await b?.(c.state,c.transition??!0);continue}let r=a.animation;if(r.type==="play"){let{type:c,clip:u,...w}=r;f?.(u,w)}else r.type==="pause"?S?.(r.clip):r.type==="stop"?R?.(r.clip):r.type==="set-speed"?j?.(r.speed,r.clip):q?.(r.time,r.clip)}await y?.(N)},[E,k,O,y,S,f,C,q,j,b,h,X,B,R,v,x,m]),J=ze(async(N,a)=>{let r=Z(l,N);if(!r)return null;let c=l[r],u=c?.actions?.find(L=>L.id===a);if(!c||!u)return null;let w={objectId:r,action:u,binding:c};return await V(w),w},[V,l]);return{getActionsForObject:_,handleAction:V,runAction:J}}import{useCallback as he,useRef as yt}from"react";function Gn(e){return typeof e=="function"?e:e?.handleViewerReady??null}function We(...e){let t=yt(null),i=yt(e);i.current=e;let s=he(B=>{t.current=B;let O=new Set;for(let v of i.current){let m=Gn(v);m&&!O.has(m)&&(O.add(m),m(B))}},[]),p=he(()=>t.current,[]),y=he(B=>{let O=t.current;return O?O.captureImage(B):Promise.reject(new Error("ModelViewer is not ready yet."))},[]),l=he(()=>{let B=t.current;return B?(B.invalidate(),!0):!1},[]),x=he(B=>{let O=t.current;return O?O.captureVideo(B):Promise.reject(new Error("ModelViewer is not ready yet."))},[]);return{handleViewerReady:s,getViewer:p,captureImage:y,captureVideo:x,invalidate:l}}import{useCallback as U,useEffect as zn,useRef as oe}from"react";import{Material as $n,PointLight as Wn,Vector3 as Yn}from"three";var Je=["emissiveIntensity","opacity","metalness","roughness","transmission","clearcoat","clearcoatRoughness","ior","thickness"],Be=1;function ve(e){return typeof e=="string"?[e]:e}function Me(e,t=0,i=1){return Math.min(i,Math.max(t,e))}function Ye(e,t){return e+Math.random()*(t-e)}function ht([e,t],i){return e+(t-e)*i}function Xe([e,t],i){return[e[0]+(t[0]-e[0])*i,e[1]+(t[1]-e[1])*i,e[2]+(t[2]-e[2])*i]}function Vt(e,t){let i=Me(e);switch(t){case"ease-in":return i*i;case"ease-out":return 1-(1-i)*(1-i);case"ease-in-out":return i<.5?2*i*i:1-Math.pow(-2*i+2,2)/2;default:return i}}function Xn(e){let t=e.material;return t?(Array.isArray(t)?t:[t]).filter(i=>i instanceof $n):[]}function Jn(e){let t={opacity:e.opacity,transparent:e.transparent};e.color&&(t.baseColor=`#${e.color.getHexString()}`),e.emissive&&(t.emissive=`#${e.emissive.getHexString()}`);for(let i of Je){let s=e[i];typeof s=="number"&&(t[i]=s)}return t}function Ct(e,t){t.baseColor!==void 0&&e.color&&e.color.set(t.baseColor),t.emissive!==void 0&&e.emissive&&e.emissive.set(t.emissive);for(let i of Je){let s=t[i];s!==void 0&&typeof e[i]=="number"&&(e[i]=s)}t.transparent!==void 0&&(e.transparent=t.transparent),e.needsUpdate=!0}function Qn(e){return{position:[e.position.x,e.position.y,e.position.z],rotation:[e.rotation.x,e.rotation.y,e.rotation.z],scale:[e.scale.x,e.scale.y,e.scale.z],visible:e.visible}}function Zn(e,t){if(t.position&&e.position.set(...t.position),t.rotation&&e.rotation.set(...t.rotation),t.scale!==void 0){let i=typeof t.scale=="number"?[t.scale,t.scale,t.scale]:t.scale;e.scale.set(...i)}t.visible!==void 0&&(e.visible=t.visible),e.updateMatrix(),e.updateMatrixWorld(!0)}function Qe(e={}){let t=oe(e);t.current=e;let i=oe(null),s=oe(null),p=oe(null),y=oe(new Map),l=oe(new Map),x=oe(new Map),B=oe(new Map),O=U(n=>{let o=i.current;if(!o)return null;let g=Z(o.objectBindings,n);return o.raw.nodes[n]??(g?o.raw.nodes[g]:null)??(o.raw.scene?it(o.raw.scene,n):null)??null},[]),v=U(n=>{let o=i.current;return o?typeof n=="object"&&!Array.isArray(n)?ce(o.objectBindings,n):ve(n).map(g=>Z(o.objectBindings,g)??g):typeof n=="string"?[n]:Array.isArray(n)?n:[]},[]),m=U(()=>{i.current?.invalidate()},[]),k=U((n,o)=>{let g=!1;for(let d of v(n)){let M=O(d);if(M)for(let I of Xn(M))x.current.has(I)||x.current.set(I,Jn(I)),Ct(I,o),g=!0}return g},[O,v]),E=U((n,o)=>{let g=k(n,o);return g&&m(),g},[m,k]),C=U((n,o)=>{let g=!1;for(let d of v(n)){let M=O(d);M&&(B.current.has(M)||B.current.set(M,Qn(M)),Zn(M,o),g=!0)}return g},[O,v]),h=U((n,o)=>{let g=C(n,o);return g&&m(),g},[m,C]),b=U(n=>{let o=O(n);if(!o)return null;o.updateWorldMatrix(!0,!1);let g=o.getWorldPosition(new Yn);return[g.x,g.y,g.z]},[O]),f=U(n=>{let o=l.current.get(n);return o?(o.light.removeFromParent(),o.light.dispose(),l.current.delete(n),m(),!0):!1},[m]),S=U(n=>{let o=O(n.target);if(!o)return!1;let g=l.current.get(n.id),d=g?.light??new Wn;return g&&g.target!==n.target&&d.removeFromParent(),d.name=`react-immersive-runtime-light:${n.id}`,d.color.set(n.color??"#ffffff"),d.intensity=n.intensity??1,d.distance=n.distance??0,d.decay=n.decay??2,d.castShadow=n.castShadow??!1,d.position.set(...n.offset??[0,0,0]),d.parent!==o&&o.add(d),l.current.set(n.id,{light:d,target:n.target}),m(),!0},[m,O]),R=U((n,o)=>{let g=l.current.get(n);if(!g)return!1;if(o.target&&o.target!==g.target){let d=O(o.target);if(!d)return!1;g.light.removeFromParent(),d.add(g.light),g.target=o.target}return o.color!==void 0&&g.light.color.set(o.color),o.intensity!==void 0&&(g.light.intensity=o.intensity),o.distance!==void 0&&(g.light.distance=o.distance),o.decay!==void 0&&(g.light.decay=o.decay),o.offset!==void 0&&g.light.position.set(...o.offset),o.castShadow!==void 0&&(g.light.castShadow=o.castShadow),m(),!0},[m,O]),j=U((n,o)=>{let g=d=>o[d%o.length]??0;for(let d of n.materials??[])v(d.targets).forEach((M,I)=>{let T=g(I),D={};for(let Y of Je){let K=d.values[Y];K&&(D[Y]=ht(K,T))}k(M,D)});for(let d of n.transforms??[])v(d.targets).forEach((M,I)=>{let T=g(I),D={};d.values.position&&(D.position=Xe(d.values.position,T)),d.values.rotation&&(D.rotation=Xe(d.values.rotation,T)),d.values.scale&&(D.scale=Xe(d.values.scale,T)),C(M,D)});for(let d of n.lights??[])ve(d.lights).forEach((M,I)=>{let T=l.current.get(M);T&&(T.light.intensity=ht(d.intensity,g(I)))})},[v,k,C]),q=oe(()=>{}),X=oe(()=>{});X.current=n=>{p.current=null;let o=!1;for(let[g,d]of y.current){d.startedAt===null&&(d.startedAt=n);let M=d.lastFrameAt??n;d.lastFrameAt=n;let I=d.override&&d.override.until>n?d.override.level:null;d.override&&I===null&&(d.override=null);let T=d.update(n,n-d.startedAt,Math.min(100,n-M),I);o=!0,T||(y.current.delete(g),d.onComplete?.())}o&&m(),y.current.size>0&&q.current()},q.current=()=>{p.current!==null||typeof requestAnimationFrame>"u"||(p.current=requestAnimationFrame(n=>X.current(n)))};let _=U(n=>(y.current.set(n.id,n),q.current(),n.id),[]),V=U((n,o={})=>{let g=o.id??`transition-${Be++}`,d=Math.max(1,o.duration??400),M=o.easing??"ease-in-out";return _({id:g,startedAt:null,lastFrameAt:null,override:null,onComplete:o.onComplete,update:(I,T,D,Y)=>{let K=Y??Vt(T/d,M);return j(n,[K]),T<d}})},[j,_]),J=U((n,o={})=>{let g=o.id??`pulse-${Be++}`,d=Math.max(1,o.duration??1e3),M=o.minLevel??0,I=o.maxLevel??1,T=o.repeat??1/0,D=o.synchronized??!0,Y=Math.max(1,...[...n.materials??[],...n.transforms??[]].map(K=>v(K.targets).length),...(n.lights??[]).map(K=>ve(K.lights).length));return _({id:g,startedAt:null,lastFrameAt:null,override:null,onComplete:o.onComplete,update:(K,ae,de,ne)=>{let F=ae/d,P=Array.from({length:D?1:Y},(A,W)=>{if(ne!==null)return ne;let G=F+(D?0:W/Y),z=.5-Math.cos(G%1*Math.PI*2)/2;return M+(I-M)*z});return j(n,P),T===1/0||F<T}})},[j,_,v]),N=U((n,o={})=>{let g=o.id??`timeline-${Be++}`,d=o.repeat??1,M=n.map(T=>({...T,duration:Math.max(1,T.duration),hold:Math.max(0,T.hold??0)})),I=Math.max(1,M.reduce((T,D)=>T+D.duration+D.hold,0));return _({id:g,startedAt:null,lastFrameAt:null,override:null,onComplete:o.onComplete,update:(T,D,Y,K)=>{if(M.length===0||d<=0)return!1;let ae=D/I;if(d!==1/0&&ae>=d){for(let F of M)j(F.channels,[1]);return!1}let de=D%I,ne=0;for(let F of M){let P=ne+F.duration,A=P+F.hold;if(de>=P){j(F.channels,[K??1]),ne=A;continue}if(de>=ne){let W=K??Vt((de-ne)/F.duration,F.easing??"ease-in-out");j(F.channels,[W]);break}}return!0}})},[j,_]),a=U((n,o={})=>{let g=o.id??`flicker-${Be++}`,d=o.synchronized??!0,M=o.minLevel??.15,I=o.maxLevel??1,T=o.interval??[45,160],D=typeof T=="number"?[T,T]:T,Y=[Math.max(1,Math.min(...D)),Math.max(1,Math.max(...D))],K=Me(o.response??.7,.01,1),ae=Me(o.blackoutChance??.08),de=Me(o.flashChance??.12),ne=o.flashLevel??1.15,F=Math.max(1,...[...n.materials??[],...n.transforms??[]].map(z=>v(z.targets).length),...(n.lights??[]).map(z=>ve(z.lights).length)),P=d?1:F,A=Array.from({length:P},()=>M),W=Array.from({length:P},()=>M),G=Array.from({length:P},()=>0);return _({id:g,startedAt:null,lastFrameAt:null,override:null,onComplete:o.onComplete,update:(z,we,ie,Ve)=>{for(let Q=0;Q<P;Q+=1){if(Ve!==null)W[Q]=Ve;else if(z>=G[Q]){let rt=Math.random();W[Q]=rt<ae?Ye(0,Math.min(.04,M)):rt<ae+de?ne:Ye(M,I),G[Q]=z+Ye(...Y)}let Rt=1-Math.pow(1-K,Math.max(1,ie)/16.67);A[Q]+=(W[Q]-A[Q])*Rt}return j(n,A),o.duration===void 0||we<o.duration}})},[j,_,v]),r=U((n,o,g)=>{let d=y.current.get(n);if(!d)return!1;let M=typeof performance>"u"?Date.now():performance.now();return d.override={level:o,until:M+Math.max(0,g)},q.current(),!0},[]),c=U(n=>y.current.delete(n),[]),u=U(()=>{y.current.clear(),p.current!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(p.current),p.current=null)},[]),w=U(()=>{for(let[n,o]of x.current)Ct(n,o);x.current.clear();for(let[n,o]of B.current)n.position.set(...o.position),n.rotation.set(...o.rotation),n.scale.set(...o.scale),n.visible=o.visible,n.updateMatrix(),n.updateMatrixWorld(!0);B.current.clear();for(let n of l.current.values())n.light.removeFromParent(),n.light.dispose();l.current.clear(),m()},[m]),L=U(()=>{u(),w()},[w,u]),$=U(n=>{s.current&&s.current!==n.raw.scene&&w(),i.current=n,s.current=n.raw.scene,t.current.onViewerReady?.(n)},[w]);return zn(()=>()=>{L(),i.current=null,s.current=null},[L]),{handleViewerReady:$,setMaterial:E,setTransform:h,getWorldPosition:b,addPointLight:S,updatePointLight:R,removePointLight:f,transition:V,timeline:N,pulse:J,flicker:a,overrideEffect:r,stopEffect:c,stopAllEffects:u,resetRuntime:L}}import{useCallback as er,useState as tr}from"react";function Ze(){let[e,t]=tr(null),i=er(s=>{t(s)},[t]);return{hoveredObjectBinding:e,handleHoveredObject:i}}import{useCallback as St,useState as nr}from"react";function et(e=null){let[t,i]=nr(e),s=St((y,l)=>i({...l,target:y}),[]),p=St(()=>i(null),[]);return{isolation:t,isolate:s,clearIsolation:p,handleIsolationChange:i}}import{useCallback as Pe,useState as le}from"react";function tt(){let[e,t]=le(!0),[i,s]=le(!1),[p,y]=le(null),[l,x]=le(null),[B,O]=le(0),[v,m]=le([]),[k,E]=le([]),[C,h]=le([]),b=Pe(j=>{x(j.bounds),O(j.objectCount),m(j.materialVariants),E(j.materialVariantGroups),y(null),t(!1),s(!0)},[]),f=Pe(j=>h(j),[]),S=Pe(j=>{y(j),x(null),O(0),m([]),E([]),h([]),t(!1),s(!1)},[]),R=Pe(()=>{t(!0),s(!1),y(null),x(null),O(0),m([]),E([]),h([])},[]);return{isLoading:e,isReady:i,error:p,bounds:l,objectCount:B,materialVariants:v,materialVariantGroups:k,objects:C,handleModelLoaded:b,handleObjectCatalog:f,handleLoadError:S,resetModelState:R}}import{useCallback as Ot,useState as rr}from"react";function nt(e=null){let[t,i]=rr(e),s=Ot(y=>{i(y)},[i]),p=Ot(()=>{i(null)},[]);return{selectedObjectBinding:t,setSelectedObjectBinding:i,handleObjectSelect:s,clearSelection:p}}var ir={};function or(e={}){let t=jt(e);t.current=e;let i=jt(e.bindings===void 0||e.bindings==="auto"),s=Ke(()=>{let V=t.current.bindings;return V===void 0||V==="auto"?ir:typeof V=="function"?V():V}),p=Ge(()=>{let V=t.current.sceneConfig;return V===void 0?Se:typeof V=="function"?V():V}),y=nt(),l=Ze(),x=Ae(e.camera),B=tt(),O=qe(),v=et(),m=Qe(),k=We(x,m),E=$e({bindings:s,scene:p,camera:x,animations:O,isolation:v,onAction:e.onAction}),{setObjectBindings:C}=s,{handleObjectCatalog:h}=B,b=Re(V=>{h(V),i.current&&C(J=>{let N=lt(V.map(a=>a.name));for(let a of Object.keys(N))J[a]&&(N[a]=J[a]);return N})},[h,C]),{handleObjectSelect:f}=y,S=Re(V=>{f(V),t.current.onObjectSelect?.(V)},[f]),{handleHoveredObject:R}=l,j=Re(V=>{R(V),t.current.onObjectHover?.(V)},[R]),{handleLoadError:q}=B,X=Re(V=>{q(V),t.current.onLoadError?.(V)},[q]),_=e.sceneConfig!==void 0||p.sceneConfig!==Se;return{props:{objectBindings:s.objectBindings,onObjectBindingsChange:C,selectedObject:y.selectedObjectBinding,onObjectSelect:S,onObjectHover:j,onCameraChange:x.handleCameraChange,onViewerReady:k.handleViewerReady,onModelLoaded:B.handleModelLoaded,onLoadError:X,onObjectCatalog:b,onAnimationsReady:O.handleAnimationsReady,onAction:E.handleAction,onSceneConfigChange:p.setSceneConfig,isolation:v.isolation,onIsolationChange:v.handleIsolationChange,..._?{sceneConfig:p.sceneConfig}:{}},bindings:s,selection:y,hover:l,camera:x,model:B,animations:O,actions:E,scene:p,isolation:v,effects:m,connection:k}}import{useMemo as sr}from"react";function ar(e,t){return sr(()=>{if(!t)return null;let i=e[t];return i||(Object.values(e).find(s=>s.id===t||s.modelObjectId===t)??null)},[e,t])}import{useMemo as cr}from"react";function lr(e){return cr(()=>Object.values(e).map(t=>t.modelObjectId),[e])}import{useCallback as te,useEffect as xe,useRef as se,useState as dr}from"react";function ur(e,t){if(!e.objectBindings&&(!!e.hidden?.length||!!e.selected)&&Object.keys(t).length===0)return null;let s={};if(e.objectBindings)s.bindings=e.objectBindings;else if(e.hidden){let p=new Set(e.hidden);s.bindings=Object.fromEntries(Object.entries(t).map(([y,l])=>[y,{...l,visible:!p.has(l.id)}]))}if(e.selected!==void 0){let p=e.objectBindings??t,y=e.selected?Z(p,e.selected):null;s.selected=y?p[y]:null}return s}function Bt(e){return JSON.stringify(e&&{modelUrl:e.modelUrl,activeModelId:e.activeModelId,tilesetUrl:e.tilesetUrl,mergeModels:e.mergeModels,models:e.models?.map(({id:t,url:i,mergeModels:s})=>({id:t,url:i,mergeModels:s}))})}function pr(e){let t=se(e);t.current=e;let i=e.paramKey??"view",s=`${i}Id`,[p,y]=dr(!1),l=se(null),x=se(null),B=se(null),O=se(null),v=se(null),m=se(null),k=se(null),E=se(null),C=se(!0),h=te(r=>{let c=r instanceof Error?r:new Error(String(r));t.current.onError?t.current.onError(c):k.current!==c.message&&console.warn("[react-immersive]",c.message),k.current=c.message},[]),b=te(()=>{v.current!==null&&clearTimeout(v.current),v.current=null},[]);xe(()=>(C.current=!0,()=>{C.current=!1,b()}),[b]);let f=te(()=>{let r=t.current,c=(r.mode??(r.configuration?"configuration":"view"))==="configuration";return{version:1,camera:r.cameraState??void 0,hidden:Object.values(r.objectBindings).filter(u=>u.visible===!1).map(u=>u.id),selected:r.selectedObjectBinding?.id??null,...c?{objectBindings:r.objectBindings,configuration:r.configuration}:{}}},[]),S=te(()=>ye(f(),typeof window>"u"?void 0:window.location.href),[f]),R=te(()=>Le(f(),typeof window>"u"?void 0:window.location.href),[f]),j=te((r,c,u=window.location.href)=>{let w=new URL(u),L=new URLSearchParams(w.hash.slice(1));if(L.delete(i),L.delete(s),L.set(c?s:i,r),w.hash=L.toString(),!c&&w.href.length>(t.current.maxUrlLength??65536))throw new Error("Viewer configuration is too large for an inline link. Save JSON instead, or configure storage for createShareUrl(). Uploaded images can make links large.");return w.href},[i,s]),q=te(()=>j(ge(S()),!1),[S,j]),X=te(async()=>{let r=window.location.href,c=t.current.storage,u=await R();if(!c)return j(ge(u),!1,r);let w=await c.save(u);if(typeof w!="string"||!w.trim()||w.length>2048)throw new Error("Viewer state storage returned an invalid id.");return j(w,!0,r)},[R,j]),_=te(()=>{if(b(),l.current||m.current)return;let r=q();window.history.replaceState(null,"",r),O.current=`inline:${new URL(r).hash}`},[b,q]),V=te(async()=>{let r=l.current;if(!r||x.current||!C.current)return!1;x.current=r,b();try{let c=t.current,u=r.state;if(u.configuration&&!r.configurationApplied){if(!c.onConfigurationChange)throw new Error("Restoring a full viewer configuration requires onConfigurationChange.");return r.configurationApplied=!0,c.onConfigurationChange(u.configuration),!1}if(u.configuration&&Bt(c.configuration)!==Bt(u.configuration)||c.isReady===!1)return!1;if(u.camera&&!r.cameraApplied){if(!await c.setCameraState(u.camera,!1)||l.current!==r||!C.current)return!1;r.cameraApplied=!0}c=t.current;let w=ur(u,c.objectBindings);return!w||l.current!==r?!1:(w.bindings&&c.onObjectBindingsChange(w.bindings),w.selected!==void 0&&c.setSelectedObjectBinding(w.selected),l.current=null,B.current=r.key,y(!0),!0)}catch(c){throw l.current===r&&(l.current=null),y(!1),c}finally{x.current=null,l.current&&l.current!==r&&C.current&&V().catch(h)}},[b,h]),J=te(async r=>{let c=ye(r,window.location.href);b(),E.current=null,m.current=null;let u=new URLSearchParams(window.location.hash.slice(1));return O.current=u.has(i)?`inline:${window.location.hash}`:u.has(s)?`stored:${s}:${u.get(s)}`:null,B.current=null,l.current={key:`manual:${ge(c)}`,origin:"manual",state:c,configurationApplied:!1,cameraApplied:!1},y(!1),V()},[V,b,i,s]),N=te(async()=>{let r=new URLSearchParams(window.location.hash.slice(1)),c=r.get(i),u=r.get(s),w=c!==null?`inline:${window.location.hash}`:u!==null?`stored:${s}:${u}`:null;if(!w)return E.current=null,m.current=null,l.current?.origin==="manual"?V():(l.current=null,B.current=null,y(!0),!1);if(w===O.current||w===B.current)return l.current?.origin==="manual"?V():!1;if(l.current?.key===w)return V();b(),y(!1),E.current=w,l.current=null;let L=c;if(c===null){let n=t.current.storage;if(!n)throw new Error("This shared link requires a viewer state storage adapter.");(!m.current||m.current.key!==w)&&(m.current={key:w,promise:n.load(u)});let o=m.current;try{L=await o.promise}finally{m.current===o&&(m.current=null)}if(E.current!==w||!C.current)return!1;let g=l.current;if(g?.key===w||B.current===w)return g?V():!1}let $;try{$=ye(L,window.location.href)}catch(n){throw n}return l.current={key:w,origin:"url",state:$,configurationApplied:!1,cameraApplied:!1},V()},[V,b,s,i]);xe(()=>{l.current&&V().catch(h)}),xe(()=>{let r=()=>{N().catch(h)};return window.addEventListener("hashchange",r),()=>window.removeEventListener("hashchange",r)},[N,h]);let a=null;if(e.autoSync!==!1&&p&&!l.current&&!m.current)try{a=ge(S())}catch{}return xe(()=>{if(e.autoSync===!1||!p||l.current||m.current){b();return}if(a===null){try{S()}catch(r){h(r)}return}return v.current=setTimeout(()=>{v.current=null;try{_()}catch(r){h(r)}},Math.max(0,e.debounceMs??400)),b},[a,e.autoSync,e.debounceMs,p,b,S,_,h]),{getState:S,getStateAsync:R,restoreState:J,getShareUrl:q,createShareUrl:X,syncUrl:_,restoreFromUrl:N}}import{useCallback as pe,useState as vt}from"react";var fr={};function Mt(){return`asset-${globalThis.crypto.randomUUID()}`}function gr(e){let[t,i]=vt(e),[s,p]=vt(()=>e[0]?re(e[0]):""),y=t.find(C=>re(C)===s)??t[0],l=y?re(y):"",x=pe(C=>{i(h=>h.map(b=>re(b)===l?{...b,objectBindings:C}:b))},[l]),B=pe(C=>{i(h=>h.map(b=>re(b)===l?{...b,sceneConfig:C}:b))},[l]),O=pe(C=>p(h=>{let b=t.find(f=>f.url===C);return b?re(b):h}),[t]),v=pe(C=>{let h={...C,id:C.id??Mt()};return i(b=>{if(b.some(f=>re(f)===h.id))throw new Error("Asset instance ID already exists.");return[...b,h]}),h.id},[]),m=pe(C=>{let h=t.find(j=>re(j)===C);if(!h)return null;let b=structuredClone(h);b.id=Mt(),b.sceneConfig?.measurements&&(b.sceneConfig.measurements.items=b.sceneConfig.measurements.items.map(j=>({...j,modelId:b.id}))),b.label=`${h.label??"Asset"} copy`;let[f,S,R]=h.transform?.position??[0,0,0];return b.transform={...b.transform,position:[f+1,S,R]},i(j=>[...j,b]),b.id},[t]),k=pe(C=>{i(h=>h.filter(b=>re(b)!==C))},[]),E=pe((C,h)=>{let b=Ee(h);i(f=>f.map(S=>re(S)===C?{...S,transform:b}:S))},[]);return{modelUrl:y?.url??"",models:t,activeModelId:l,onModelChange:O,onActiveModelChange:p,objectBindings:fr,onObjectBindingsChange:x,sceneConfig:y?.sceneConfig,onSceneConfigChange:B,addModel:v,duplicateModel:m,removeModel:k,updateModelTransform:E}}import{useCallback as be,useEffect as mr,useState as br,useSyncExternalStore as wr}from"react";var yr={sequenceId:null,time:0,duration:0,status:"stopped",previewing:!1,ready:!1,issues:[]},hr=()=>()=>{},Pt=()=>yr;function Vr(){let[e,t]=br(null),i=wr(e?.subscribe??hr,e?.getState??Pt,Pt);mr(()=>()=>e?.stop(),[e]);let s=be(p=>t(p),[]);return{controls:e,playback:i,handleSequencesReady:s,play:be(p=>e?.play(p)??!1,[e]),pause:be(()=>e?.pause(),[e]),stop:be(()=>e?.stop(),[e]),seek:be(p=>e?.seek(p)??!1,[e]),select:be(p=>e?.select(p)??!1,[e])}}export{hn as ACTION_CATALOG,kn as AssetDiagnosticsPanel,gt as CompareViewer,Lt as DEFAULT_MODEL_VIEWER_LABELS,Se as DEFAULT_SCENE_CONFIG,Ce as DEFAULT_SECTION_CONFIG,En as MATERIAL_BLENDING_MODES,An as MATERIAL_SIDES,fn as MAX_VIEWER_STATE_BYTES,_t as MEASUREMENT_UNITS,yn as MODEL_VIEWER_PRESETS,ke as ModelViewer,jn as ProductOptions,At as SEQUENCE_EASINGS,xt as SEQUENCE_OBJECT_PROPERTIES,vn as applyIsolation,pn as applyProductOptions,Sn as applyStyleRules,Rn as buildBindingsFromNodes,qt as calibrateMeasurements,Yt as chooseMaterialVariant,Tn as collectObjectHierarchy,Cn as colorScaleValue,Ue as compareViewerConfigurations,In as copyBindingStyle,gn as createARHandoffUrl,Pn as createDefaultBinding,on as decodeProductSelections,Jt as defaultProductSelections,xn as defineObjectBindings,rn as encodeProductSelections,Qt as evaluateProductConfiguration,bn as exportConfiguredUSDZ,Vn as findCatalogAction,tn as formatProductPrice,sn as generateProductSkus,Ht as groundAsset,Mn as inferType,wn as inspectAsset,Bn as isolatedBindingKeys,Ie as material,Kt as measurementResult,Nt as measurementScale,Ft as measurementValue,$t as measurementsToCsv,Ee as parseAssetTransform,Gt as parseMeasurements,un as parseProductConfiguration,Xt as parseProductDefinition,ln as parseSceneProduct,kt as parseSectionConfig,Wt as parseSelectionSets,Et as parseSequences,ye as parseViewerState,Ln as pasteBindingStyle,fe as patchBindings,_e as patchSceneConfig,Le as prepareViewerState,nn as productCheckoutUrl,an as productDefinitionWarnings,cn as productOptionStates,en as productPriceFromDefinition,mn as readARHandoffUrl,Zt as resolveProductSelections,Tt as sampleSequenceTrack,Ne as sceneLight,Ut as sectionSnapshot,ce as selectBindingKeys,Te as selectBindings,zt as serializeMeasurements,dn as serializeProductConfiguration,ge as serializeViewerState,Dt as snapAssetToGrid,It as upsertSequenceKeyframe,ar as useObjectBinding,lr as useObjectBindingIds,Ke as useObjectBindings,On as useProductConfigurator,Ge as useSceneConfig,pr as useShareableViewerState,or as useViewer,$e as useViewerActions,qe as useViewerAnimations,Ae as useViewerCamera,We as useViewerConnection,Qe as useViewerEffects,Ze as useViewerHover,et as useViewerIsolation,tt as useViewerModel,gr as useViewerModels,nt as useViewerSelection,Vr as useViewerSequences};
@@ -343,6 +343,42 @@ type ProductCommerceAdapter = {
343
343
  requestQuote?: (configuration: ProductConfiguration, context: ProductCheckoutContext) => ProductCommerceResult | Promise<ProductCommerceResult>;
344
344
  };
345
345
 
346
+ type CameraLimits = {
347
+ /** Closest the camera can get to its target, in scene units. Default 0. */
348
+ minDistance?: number;
349
+ /** Farthest the camera can get from its target, in scene units. Default Infinity. */
350
+ maxDistance?: number;
351
+ /**
352
+ * Lowest vertical angle, in degrees: 0 looks straight down from above, 90 is
353
+ * level with the target, 180 looks straight up from below. Default 0.
354
+ */
355
+ minPolarAngle?: number;
356
+ /** Highest vertical angle, in degrees (see minPolarAngle). Default 180. */
357
+ maxPolarAngle?: number;
358
+ /**
359
+ * Leftmost horizontal angle, in degrees around the vertical axis: 0 views
360
+ * the target from the front (+Z), 90 from its right (+X), -90 from its
361
+ * left. Default -Infinity (no limit).
362
+ */
363
+ minAzimuthAngle?: number;
364
+ /** Rightmost horizontal angle, in degrees (see minAzimuthAngle). Default Infinity. */
365
+ maxAzimuthAngle?: number;
366
+ /** An axis-aligned world-space box the camera's target can pan within. */
367
+ panBoundary?: [min: [number, number, number], max: [number, number, number]];
368
+ /** Keeps the camera itself, not just its target, inside panBoundary. Default false. */
369
+ boundaryEnclosesCamera?: boolean;
370
+ /** How strongly panning slows near panBoundary, 0–1. Default 0. */
371
+ boundaryFriction?: number;
372
+ insideModel?: boolean;
373
+ aroundModel?: boolean;
374
+ floorOutline?: FloorOutline;
375
+ };
376
+ type FloorOutline = {
377
+ points: [number, number][];
378
+ floor: number;
379
+ ceiling: number;
380
+ };
381
+
346
382
  declare const LIGHT_TYPES: readonly ["none", "directional", "point", "spot", "hemisphere"];
347
383
  type SceneLightType = (typeof LIGHT_TYPES)[number];
348
384
  type SceneLightAttachment = {
@@ -399,6 +435,8 @@ type SceneModelConfig = {
399
435
  type SceneCameraConfig = {
400
436
  fieldOfView: number;
401
437
  showAdvancedSettings: boolean;
438
+ /** Orbit limits (degrees for angles); unset fields have no limit. */
439
+ limits?: CameraLimits;
402
440
  };
403
441
  type SceneShadowConfig = {
404
442
  enabled: boolean;
@@ -1684,34 +1722,6 @@ type ViewerLoading = "lazy" | "eager";
1684
1722
  */
1685
1723
  type ViewerReveal = "auto" | "interaction";
1686
1724
 
1687
- type CameraLimits = {
1688
- /** Closest the camera can get to its target, in scene units. Default 0. */
1689
- minDistance?: number;
1690
- /** Farthest the camera can get from its target, in scene units. Default Infinity. */
1691
- maxDistance?: number;
1692
- /**
1693
- * Lowest vertical angle, in degrees: 0 looks straight down from above, 90 is
1694
- * level with the target, 180 looks straight up from below. Default 0.
1695
- */
1696
- minPolarAngle?: number;
1697
- /** Highest vertical angle, in degrees (see minPolarAngle). Default 180. */
1698
- maxPolarAngle?: number;
1699
- /**
1700
- * Leftmost horizontal angle, in degrees around the vertical axis: 0 views
1701
- * the target from the front (+Z), 90 from its right (+X), -90 from its
1702
- * left. Default -Infinity (no limit).
1703
- */
1704
- minAzimuthAngle?: number;
1705
- /** Rightmost horizontal angle, in degrees (see minAzimuthAngle). Default Infinity. */
1706
- maxAzimuthAngle?: number;
1707
- /** An axis-aligned world-space box the camera's target can pan within. */
1708
- panBoundary?: [min: [number, number, number], max: [number, number, number]];
1709
- /** Keeps the camera itself, not just its target, inside panBoundary. Default false. */
1710
- boundaryEnclosesCamera?: boolean;
1711
- /** How strongly panning slows near panBoundary, 0–1. Default 0. */
1712
- boundaryFriction?: number;
1713
- };
1714
-
1715
1725
  /**
1716
1726
  * Whether the viewer cuts motion that starts on its own: `"user"` follows the
1717
1727
  * visitor's `prefers-reduced-motion` setting, `"always"` and `"never"` override
@@ -1721,4 +1731,4 @@ type ReducedMotionSetting = "user" | "always" | "never";
1721
1731
 
1722
1732
  type ModelFormat = "glb" | "gltf" | "obj" | "fbx" | "usdz" | "stl" | "ply";
1723
1733
 
1724
- export { type ObjectBindingTextureSlot as $, type AnimationAction as A, type BindingEdit as B, type CameraAction as C, DEFAULT_MODEL_VIEWER_LABELS as D, type EnvironmentPreset as E, type ModelFormat as F, type GlitchModeName as G, type ModelViewerLabelKey as H, type IsolatedObjectBindings as I, type ModelViewerLabels as J, type KernelSizeName as K, type ObjectActionEvent as L, MATERIAL_BLENDING_MODES as M, type ObjectBinding as N, type ObjectActionEffect as O, type ObjectBindingAction as P, type ObjectBindingCameraState as Q, type ObjectBindingDecal as R, type ObjectBindingMaterial as S, type ObjectBindingMaterialBlendingMode as T, type ObjectBindingMaterialSide as U, type ObjectBindingPatch as V, type ObjectBindingSelector as W, type ObjectBindingStatus as X, type ObjectBindingStyle as Y, type ObjectBindingTarget as Z, type ObjectBindingTextureChannel as _, type AnimationActionEffect as a, type SceneStyleRule as a$, type ObjectBindingTransform as a0, type ObjectBindingType as a1, type ObjectBindingsActionEffect as a2, type ObjectPointerEvent as a3, type ObjectSurfacePoint as a4, type ProductAppearance as a5, type ProductAvailability as a6, type ProductCheckoutContext as a7, type ProductCheckoutLink as a8, type ProductCommerceAdapter as a9, type SceneCameraConfig as aA, type SceneCinematicConfig as aB, type SceneCinematicWaypoint as aC, type SceneConfig as aD, type SceneConfigActionEffect as aE, type SceneConfigPatch as aF, type SceneEnvironmentConfig as aG, type SceneGroundShadowConfig as aH, type SceneLight as aI, type SceneLightAttachment as aJ, type SceneLightType as aK, type SceneLightingConfig as aL, type SceneModelConfig as aM, type SceneModelRenderer as aN, type ScenePostProcessingConfig as aO, type SceneProductConfig as aP, type SceneSectionAxis as aQ, type SceneSectionConfig as aR, type SceneSectionPlane as aS, type SceneSectionPreset as aT, type SceneSectionSettings as aU, type SceneSelectionSet as aV, type SceneSequence as aW, type SceneShadowConfig as aX, type SceneStyleColorScale as aY, type SceneStyleCondition as aZ, type SceneStylePulse as a_, type ProductCommerceContext as aa, type ProductCommerceResult as ab, type ProductConfiguration as ac, type ProductConfigurationIssue as ad, type ProductDefinition as ae, type ProductDefinitionWarning as af, type ProductGroupDisplay as ag, type ProductOption as ah, type ProductOptionGroup as ai, type ProductOptionRef as aj, type ProductOptionRule as ak, type ProductOptionState as al, type ProductPrice as am, type ProductPricing as an, type ProductSelections as ao, type ProductSku as ap, type RampTypeName as aq, type ReducedMotionSetting as ar, type SavedMeasurement as as, type SceneAnimationClipConfig as at, type SceneAnimationConfig as au, type SceneAnnotationCameraView as av, type SceneAnnotationImage as aw, type SceneAnnotationLink as ax, type SceneAnnotationMarker as ay, type SceneBackgroundConfig as az, type AnimationClipInfo as b, type SceneWireframeConfig as b0, type SequenceCameraView as b1, type SequenceControls as b2, type SequenceEasing as b3, type SequenceKeyframe as b4, type SequenceObjectProperty as b5, type SequencePlaybackState as b6, type SequenceTarget as b7, type SequenceTrack as b8, type SequenceValue as b9, type SequenceVector3 as ba, type StyledObjectBindings as bb, type StyledObjectPulse as bc, type ViewerAnimationsProps as bd, type ViewerCameraConfig as be, type ViewerCameraState as bf, type ViewerIsolation as bg, type ViewerLoading as bh, type ViewerModelBounds as bi, type ViewerModelInfo as bj, type ViewerReveal as bk, type VisibilityActionEffect as bl, applyIsolation as bm, applyStyleRules as bn, chooseMaterialVariant as bo, colorScaleValue as bp, isolatedBindingKeys as bq, material as br, parseSelectionSets as bs, patchBindings as bt, patchSceneConfig as bu, selectBindingKeys as bv, selectBindings as bw, useViewerAnimations as bx, type AnimationClipState as c, type AnimationClipStatus as d, type AnimationControls as e, type AnimationLoopMode as f, type AnimationPlayOptions as g, type AnimationPlaybackState as h, type CameraActionEffect as i, type CameraLimits as j, DEFAULT_SCENE_CONFIG as k, DEFAULT_SECTION_CONFIG as l, type DeepPartial as m, type IsolationActionEffect as n, MATERIAL_SIDES as o, type MaterialVariantGroup as p, type MaterialVariantOption as q, type MeasurementAnchor as r, type MeasurementCollection as s, type MeasurementPoint as t, type MeasurementPosition as u, type MeasurementResult as v, type MeasurementSettings as w, type MeasurementStatus as x, type MeasurementTool as y, type MeasurementUnit as z };
1734
+ export { type ObjectBindingTextureChannel as $, type AnimationAction as A, type BindingEdit as B, type CameraAction as C, DEFAULT_MODEL_VIEWER_LABELS as D, type EnvironmentPreset as E, type FloorOutline as F, type GlitchModeName as G, type ModelFormat as H, type IsolatedObjectBindings as I, type ModelViewerLabelKey as J, type KernelSizeName as K, type ModelViewerLabels as L, MATERIAL_BLENDING_MODES as M, type ObjectActionEvent as N, type ObjectActionEffect as O, type ObjectBinding as P, type ObjectBindingAction as Q, type ObjectBindingCameraState as R, type ObjectBindingDecal as S, type ObjectBindingMaterial as T, type ObjectBindingMaterialBlendingMode as U, type ObjectBindingMaterialSide as V, type ObjectBindingPatch as W, type ObjectBindingSelector as X, type ObjectBindingStatus as Y, type ObjectBindingStyle as Z, type ObjectBindingTarget as _, type AnimationActionEffect as a, type SceneStylePulse as a$, type ObjectBindingTextureSlot as a0, type ObjectBindingTransform as a1, type ObjectBindingType as a2, type ObjectBindingsActionEffect as a3, type ObjectPointerEvent as a4, type ObjectSurfacePoint as a5, type ProductAppearance as a6, type ProductAvailability as a7, type ProductCheckoutContext as a8, type ProductCheckoutLink as a9, type SceneBackgroundConfig as aA, type SceneCameraConfig as aB, type SceneCinematicConfig as aC, type SceneCinematicWaypoint as aD, type SceneConfig as aE, type SceneConfigActionEffect as aF, type SceneConfigPatch as aG, type SceneEnvironmentConfig as aH, type SceneGroundShadowConfig as aI, type SceneLight as aJ, type SceneLightAttachment as aK, type SceneLightType as aL, type SceneLightingConfig as aM, type SceneModelConfig as aN, type SceneModelRenderer as aO, type ScenePostProcessingConfig as aP, type SceneProductConfig as aQ, type SceneSectionAxis as aR, type SceneSectionConfig as aS, type SceneSectionPlane as aT, type SceneSectionPreset as aU, type SceneSectionSettings as aV, type SceneSelectionSet as aW, type SceneSequence as aX, type SceneShadowConfig as aY, type SceneStyleColorScale as aZ, type SceneStyleCondition as a_, type ProductCommerceAdapter as aa, type ProductCommerceContext as ab, type ProductCommerceResult as ac, type ProductConfiguration as ad, type ProductConfigurationIssue as ae, type ProductDefinition as af, type ProductDefinitionWarning as ag, type ProductGroupDisplay as ah, type ProductOption as ai, type ProductOptionGroup as aj, type ProductOptionRef as ak, type ProductOptionRule as al, type ProductOptionState as am, type ProductPrice as an, type ProductPricing as ao, type ProductSelections as ap, type ProductSku as aq, type RampTypeName as ar, type ReducedMotionSetting as as, type SavedMeasurement as at, type SceneAnimationClipConfig as au, type SceneAnimationConfig as av, type SceneAnnotationCameraView as aw, type SceneAnnotationImage as ax, type SceneAnnotationLink as ay, type SceneAnnotationMarker as az, type AnimationClipInfo as b, type SceneStyleRule as b0, type SceneWireframeConfig as b1, type SequenceCameraView as b2, type SequenceControls as b3, type SequenceEasing as b4, type SequenceKeyframe as b5, type SequenceObjectProperty as b6, type SequencePlaybackState as b7, type SequenceTarget as b8, type SequenceTrack as b9, type SequenceValue as ba, type SequenceVector3 as bb, type StyledObjectBindings as bc, type StyledObjectPulse as bd, type ViewerAnimationsProps as be, type ViewerCameraConfig as bf, type ViewerCameraState as bg, type ViewerIsolation as bh, type ViewerLoading as bi, type ViewerModelBounds as bj, type ViewerModelInfo as bk, type ViewerReveal as bl, type VisibilityActionEffect as bm, applyIsolation as bn, applyStyleRules as bo, chooseMaterialVariant as bp, colorScaleValue as bq, isolatedBindingKeys as br, material as bs, parseSelectionSets as bt, patchBindings as bu, patchSceneConfig as bv, selectBindingKeys as bw, selectBindings as bx, useViewerAnimations as by, type AnimationClipState as c, type AnimationClipStatus as d, type AnimationControls as e, type AnimationLoopMode as f, type AnimationPlayOptions as g, type AnimationPlaybackState as h, type CameraActionEffect as i, type CameraLimits as j, DEFAULT_SCENE_CONFIG as k, DEFAULT_SECTION_CONFIG as l, type DeepPartial as m, type IsolationActionEffect as n, MATERIAL_SIDES as o, type MaterialVariantGroup as p, type MaterialVariantOption as q, type MeasurementAnchor as r, type MeasurementCollection as s, type MeasurementPoint as t, type MeasurementPosition as u, type MeasurementResult as v, type MeasurementSettings as w, type MeasurementStatus as x, type MeasurementTool as y, type MeasurementUnit as z };
@@ -343,6 +343,42 @@ type ProductCommerceAdapter = {
343
343
  requestQuote?: (configuration: ProductConfiguration, context: ProductCheckoutContext) => ProductCommerceResult | Promise<ProductCommerceResult>;
344
344
  };
345
345
 
346
+ type CameraLimits = {
347
+ /** Closest the camera can get to its target, in scene units. Default 0. */
348
+ minDistance?: number;
349
+ /** Farthest the camera can get from its target, in scene units. Default Infinity. */
350
+ maxDistance?: number;
351
+ /**
352
+ * Lowest vertical angle, in degrees: 0 looks straight down from above, 90 is
353
+ * level with the target, 180 looks straight up from below. Default 0.
354
+ */
355
+ minPolarAngle?: number;
356
+ /** Highest vertical angle, in degrees (see minPolarAngle). Default 180. */
357
+ maxPolarAngle?: number;
358
+ /**
359
+ * Leftmost horizontal angle, in degrees around the vertical axis: 0 views
360
+ * the target from the front (+Z), 90 from its right (+X), -90 from its
361
+ * left. Default -Infinity (no limit).
362
+ */
363
+ minAzimuthAngle?: number;
364
+ /** Rightmost horizontal angle, in degrees (see minAzimuthAngle). Default Infinity. */
365
+ maxAzimuthAngle?: number;
366
+ /** An axis-aligned world-space box the camera's target can pan within. */
367
+ panBoundary?: [min: [number, number, number], max: [number, number, number]];
368
+ /** Keeps the camera itself, not just its target, inside panBoundary. Default false. */
369
+ boundaryEnclosesCamera?: boolean;
370
+ /** How strongly panning slows near panBoundary, 0–1. Default 0. */
371
+ boundaryFriction?: number;
372
+ insideModel?: boolean;
373
+ aroundModel?: boolean;
374
+ floorOutline?: FloorOutline;
375
+ };
376
+ type FloorOutline = {
377
+ points: [number, number][];
378
+ floor: number;
379
+ ceiling: number;
380
+ };
381
+
346
382
  declare const LIGHT_TYPES: readonly ["none", "directional", "point", "spot", "hemisphere"];
347
383
  type SceneLightType = (typeof LIGHT_TYPES)[number];
348
384
  type SceneLightAttachment = {
@@ -399,6 +435,8 @@ type SceneModelConfig = {
399
435
  type SceneCameraConfig = {
400
436
  fieldOfView: number;
401
437
  showAdvancedSettings: boolean;
438
+ /** Orbit limits (degrees for angles); unset fields have no limit. */
439
+ limits?: CameraLimits;
402
440
  };
403
441
  type SceneShadowConfig = {
404
442
  enabled: boolean;
@@ -1684,34 +1722,6 @@ type ViewerLoading = "lazy" | "eager";
1684
1722
  */
1685
1723
  type ViewerReveal = "auto" | "interaction";
1686
1724
 
1687
- type CameraLimits = {
1688
- /** Closest the camera can get to its target, in scene units. Default 0. */
1689
- minDistance?: number;
1690
- /** Farthest the camera can get from its target, in scene units. Default Infinity. */
1691
- maxDistance?: number;
1692
- /**
1693
- * Lowest vertical angle, in degrees: 0 looks straight down from above, 90 is
1694
- * level with the target, 180 looks straight up from below. Default 0.
1695
- */
1696
- minPolarAngle?: number;
1697
- /** Highest vertical angle, in degrees (see minPolarAngle). Default 180. */
1698
- maxPolarAngle?: number;
1699
- /**
1700
- * Leftmost horizontal angle, in degrees around the vertical axis: 0 views
1701
- * the target from the front (+Z), 90 from its right (+X), -90 from its
1702
- * left. Default -Infinity (no limit).
1703
- */
1704
- minAzimuthAngle?: number;
1705
- /** Rightmost horizontal angle, in degrees (see minAzimuthAngle). Default Infinity. */
1706
- maxAzimuthAngle?: number;
1707
- /** An axis-aligned world-space box the camera's target can pan within. */
1708
- panBoundary?: [min: [number, number, number], max: [number, number, number]];
1709
- /** Keeps the camera itself, not just its target, inside panBoundary. Default false. */
1710
- boundaryEnclosesCamera?: boolean;
1711
- /** How strongly panning slows near panBoundary, 0–1. Default 0. */
1712
- boundaryFriction?: number;
1713
- };
1714
-
1715
1725
  /**
1716
1726
  * Whether the viewer cuts motion that starts on its own: `"user"` follows the
1717
1727
  * visitor's `prefers-reduced-motion` setting, `"always"` and `"never"` override
@@ -1721,4 +1731,4 @@ type ReducedMotionSetting = "user" | "always" | "never";
1721
1731
 
1722
1732
  type ModelFormat = "glb" | "gltf" | "obj" | "fbx" | "usdz" | "stl" | "ply";
1723
1733
 
1724
- export { type ObjectBindingTextureSlot as $, type AnimationAction as A, type BindingEdit as B, type CameraAction as C, DEFAULT_MODEL_VIEWER_LABELS as D, type EnvironmentPreset as E, type ModelFormat as F, type GlitchModeName as G, type ModelViewerLabelKey as H, type IsolatedObjectBindings as I, type ModelViewerLabels as J, type KernelSizeName as K, type ObjectActionEvent as L, MATERIAL_BLENDING_MODES as M, type ObjectBinding as N, type ObjectActionEffect as O, type ObjectBindingAction as P, type ObjectBindingCameraState as Q, type ObjectBindingDecal as R, type ObjectBindingMaterial as S, type ObjectBindingMaterialBlendingMode as T, type ObjectBindingMaterialSide as U, type ObjectBindingPatch as V, type ObjectBindingSelector as W, type ObjectBindingStatus as X, type ObjectBindingStyle as Y, type ObjectBindingTarget as Z, type ObjectBindingTextureChannel as _, type AnimationActionEffect as a, type SceneStyleRule as a$, type ObjectBindingTransform as a0, type ObjectBindingType as a1, type ObjectBindingsActionEffect as a2, type ObjectPointerEvent as a3, type ObjectSurfacePoint as a4, type ProductAppearance as a5, type ProductAvailability as a6, type ProductCheckoutContext as a7, type ProductCheckoutLink as a8, type ProductCommerceAdapter as a9, type SceneCameraConfig as aA, type SceneCinematicConfig as aB, type SceneCinematicWaypoint as aC, type SceneConfig as aD, type SceneConfigActionEffect as aE, type SceneConfigPatch as aF, type SceneEnvironmentConfig as aG, type SceneGroundShadowConfig as aH, type SceneLight as aI, type SceneLightAttachment as aJ, type SceneLightType as aK, type SceneLightingConfig as aL, type SceneModelConfig as aM, type SceneModelRenderer as aN, type ScenePostProcessingConfig as aO, type SceneProductConfig as aP, type SceneSectionAxis as aQ, type SceneSectionConfig as aR, type SceneSectionPlane as aS, type SceneSectionPreset as aT, type SceneSectionSettings as aU, type SceneSelectionSet as aV, type SceneSequence as aW, type SceneShadowConfig as aX, type SceneStyleColorScale as aY, type SceneStyleCondition as aZ, type SceneStylePulse as a_, type ProductCommerceContext as aa, type ProductCommerceResult as ab, type ProductConfiguration as ac, type ProductConfigurationIssue as ad, type ProductDefinition as ae, type ProductDefinitionWarning as af, type ProductGroupDisplay as ag, type ProductOption as ah, type ProductOptionGroup as ai, type ProductOptionRef as aj, type ProductOptionRule as ak, type ProductOptionState as al, type ProductPrice as am, type ProductPricing as an, type ProductSelections as ao, type ProductSku as ap, type RampTypeName as aq, type ReducedMotionSetting as ar, type SavedMeasurement as as, type SceneAnimationClipConfig as at, type SceneAnimationConfig as au, type SceneAnnotationCameraView as av, type SceneAnnotationImage as aw, type SceneAnnotationLink as ax, type SceneAnnotationMarker as ay, type SceneBackgroundConfig as az, type AnimationClipInfo as b, type SceneWireframeConfig as b0, type SequenceCameraView as b1, type SequenceControls as b2, type SequenceEasing as b3, type SequenceKeyframe as b4, type SequenceObjectProperty as b5, type SequencePlaybackState as b6, type SequenceTarget as b7, type SequenceTrack as b8, type SequenceValue as b9, type SequenceVector3 as ba, type StyledObjectBindings as bb, type StyledObjectPulse as bc, type ViewerAnimationsProps as bd, type ViewerCameraConfig as be, type ViewerCameraState as bf, type ViewerIsolation as bg, type ViewerLoading as bh, type ViewerModelBounds as bi, type ViewerModelInfo as bj, type ViewerReveal as bk, type VisibilityActionEffect as bl, applyIsolation as bm, applyStyleRules as bn, chooseMaterialVariant as bo, colorScaleValue as bp, isolatedBindingKeys as bq, material as br, parseSelectionSets as bs, patchBindings as bt, patchSceneConfig as bu, selectBindingKeys as bv, selectBindings as bw, useViewerAnimations as bx, type AnimationClipState as c, type AnimationClipStatus as d, type AnimationControls as e, type AnimationLoopMode as f, type AnimationPlayOptions as g, type AnimationPlaybackState as h, type CameraActionEffect as i, type CameraLimits as j, DEFAULT_SCENE_CONFIG as k, DEFAULT_SECTION_CONFIG as l, type DeepPartial as m, type IsolationActionEffect as n, MATERIAL_SIDES as o, type MaterialVariantGroup as p, type MaterialVariantOption as q, type MeasurementAnchor as r, type MeasurementCollection as s, type MeasurementPoint as t, type MeasurementPosition as u, type MeasurementResult as v, type MeasurementSettings as w, type MeasurementStatus as x, type MeasurementTool as y, type MeasurementUnit as z };
1734
+ export { type ObjectBindingTextureChannel as $, type AnimationAction as A, type BindingEdit as B, type CameraAction as C, DEFAULT_MODEL_VIEWER_LABELS as D, type EnvironmentPreset as E, type FloorOutline as F, type GlitchModeName as G, type ModelFormat as H, type IsolatedObjectBindings as I, type ModelViewerLabelKey as J, type KernelSizeName as K, type ModelViewerLabels as L, MATERIAL_BLENDING_MODES as M, type ObjectActionEvent as N, type ObjectActionEffect as O, type ObjectBinding as P, type ObjectBindingAction as Q, type ObjectBindingCameraState as R, type ObjectBindingDecal as S, type ObjectBindingMaterial as T, type ObjectBindingMaterialBlendingMode as U, type ObjectBindingMaterialSide as V, type ObjectBindingPatch as W, type ObjectBindingSelector as X, type ObjectBindingStatus as Y, type ObjectBindingStyle as Z, type ObjectBindingTarget as _, type AnimationActionEffect as a, type SceneStylePulse as a$, type ObjectBindingTextureSlot as a0, type ObjectBindingTransform as a1, type ObjectBindingType as a2, type ObjectBindingsActionEffect as a3, type ObjectPointerEvent as a4, type ObjectSurfacePoint as a5, type ProductAppearance as a6, type ProductAvailability as a7, type ProductCheckoutContext as a8, type ProductCheckoutLink as a9, type SceneBackgroundConfig as aA, type SceneCameraConfig as aB, type SceneCinematicConfig as aC, type SceneCinematicWaypoint as aD, type SceneConfig as aE, type SceneConfigActionEffect as aF, type SceneConfigPatch as aG, type SceneEnvironmentConfig as aH, type SceneGroundShadowConfig as aI, type SceneLight as aJ, type SceneLightAttachment as aK, type SceneLightType as aL, type SceneLightingConfig as aM, type SceneModelConfig as aN, type SceneModelRenderer as aO, type ScenePostProcessingConfig as aP, type SceneProductConfig as aQ, type SceneSectionAxis as aR, type SceneSectionConfig as aS, type SceneSectionPlane as aT, type SceneSectionPreset as aU, type SceneSectionSettings as aV, type SceneSelectionSet as aW, type SceneSequence as aX, type SceneShadowConfig as aY, type SceneStyleColorScale as aZ, type SceneStyleCondition as a_, type ProductCommerceAdapter as aa, type ProductCommerceContext as ab, type ProductCommerceResult as ac, type ProductConfiguration as ad, type ProductConfigurationIssue as ae, type ProductDefinition as af, type ProductDefinitionWarning as ag, type ProductGroupDisplay as ah, type ProductOption as ai, type ProductOptionGroup as aj, type ProductOptionRef as ak, type ProductOptionRule as al, type ProductOptionState as am, type ProductPrice as an, type ProductPricing as ao, type ProductSelections as ap, type ProductSku as aq, type RampTypeName as ar, type ReducedMotionSetting as as, type SavedMeasurement as at, type SceneAnimationClipConfig as au, type SceneAnimationConfig as av, type SceneAnnotationCameraView as aw, type SceneAnnotationImage as ax, type SceneAnnotationLink as ay, type SceneAnnotationMarker as az, type AnimationClipInfo as b, type SceneStyleRule as b0, type SceneWireframeConfig as b1, type SequenceCameraView as b2, type SequenceControls as b3, type SequenceEasing as b4, type SequenceKeyframe as b5, type SequenceObjectProperty as b6, type SequencePlaybackState as b7, type SequenceTarget as b8, type SequenceTrack as b9, type SequenceValue as ba, type SequenceVector3 as bb, type StyledObjectBindings as bc, type StyledObjectPulse as bd, type ViewerAnimationsProps as be, type ViewerCameraConfig as bf, type ViewerCameraState as bg, type ViewerIsolation as bh, type ViewerLoading as bi, type ViewerModelBounds as bj, type ViewerModelInfo as bk, type ViewerReveal as bl, type VisibilityActionEffect as bm, applyIsolation as bn, applyStyleRules as bo, chooseMaterialVariant as bp, colorScaleValue as bq, isolatedBindingKeys as br, material as bs, parseSelectionSets as bt, patchBindings as bu, patchSceneConfig as bv, selectBindingKeys as bw, selectBindings as bx, useViewerAnimations as by, type AnimationClipState as c, type AnimationClipStatus as d, type AnimationControls as e, type AnimationLoopMode as f, type AnimationPlayOptions as g, type AnimationPlaybackState as h, type CameraActionEffect as i, type CameraLimits as j, DEFAULT_SCENE_CONFIG as k, DEFAULT_SECTION_CONFIG as l, type DeepPartial as m, type IsolationActionEffect as n, MATERIAL_SIDES as o, type MaterialVariantGroup as p, type MaterialVariantOption as q, type MeasurementAnchor as r, type MeasurementCollection as s, type MeasurementPoint as t, type MeasurementPosition as u, type MeasurementResult as v, type MeasurementSettings as w, type MeasurementStatus as x, type MeasurementTool as y, type MeasurementUnit as z };
@@ -1,4 +1,4 @@
1
- import { a9 as ProductCommerceAdapter, ac as ProductConfiguration, N as ObjectBinding, aD as SceneConfig, bf as ViewerCameraState, bi as ViewerModelBounds, ar as ReducedMotionSetting, j as CameraLimits, R as ObjectBindingDecal, a4 as ObjectSurfacePoint, J as ModelViewerLabels, bh as ViewerLoading, bk as ViewerReveal, F as ModelFormat, a3 as ObjectPointerEvent, bj as ViewerModelInfo, L as ObjectActionEvent, e as AnimationControls, ay as SceneAnnotationMarker, be as ViewerCameraConfig, bg as ViewerIsolation, as as SavedMeasurement, w as MeasurementSettings, b2 as SequenceControls } from './modelFileResolver-CVmON8hg.mjs';
1
+ import { aa as ProductCommerceAdapter, ad as ProductConfiguration, P as ObjectBinding, aE as SceneConfig, bg as ViewerCameraState, bj as ViewerModelBounds, as as ReducedMotionSetting, j as CameraLimits, S as ObjectBindingDecal, a5 as ObjectSurfacePoint, L as ModelViewerLabels, bi as ViewerLoading, bl as ViewerReveal, H as ModelFormat, a4 as ObjectPointerEvent, bk as ViewerModelInfo, N as ObjectActionEvent, e as AnimationControls, az as SceneAnnotationMarker, bf as ViewerCameraConfig, bh as ViewerIsolation, at as SavedMeasurement, w as MeasurementSettings, b3 as SequenceControls } from './modelFileResolver-Bq4pW9vc.js';
2
2
  import { Object3D, Material } from 'three';
3
3
  import { ReactNode } from 'react';
4
4
  import { CameraControls } from '@react-three/drei';
@@ -783,6 +783,7 @@ type ModelViewerProps = GroupedModelViewerProps & {
783
783
  activeAnnotation?: AnnotationMarker | null;
784
784
  onActiveAnnotationChange?: (annotation: AnnotationMarker | null) => void;
785
785
  camera?: ViewerCameraConfig;
786
+ /** Replaces sceneConfig.camera.limits when given. One kind of limit applies at a time. */
786
787
  cameraLimits?: CameraLimits;
787
788
  backgroundColor?: string;
788
789
  shadows?: boolean;
@@ -1,4 +1,4 @@
1
- import { a9 as ProductCommerceAdapter, ac as ProductConfiguration, N as ObjectBinding, aD as SceneConfig, bf as ViewerCameraState, bi as ViewerModelBounds, ar as ReducedMotionSetting, j as CameraLimits, R as ObjectBindingDecal, a4 as ObjectSurfacePoint, J as ModelViewerLabels, bh as ViewerLoading, bk as ViewerReveal, F as ModelFormat, a3 as ObjectPointerEvent, bj as ViewerModelInfo, L as ObjectActionEvent, e as AnimationControls, ay as SceneAnnotationMarker, be as ViewerCameraConfig, bg as ViewerIsolation, as as SavedMeasurement, w as MeasurementSettings, b2 as SequenceControls } from './modelFileResolver-CVmON8hg.js';
1
+ import { aa as ProductCommerceAdapter, ad as ProductConfiguration, P as ObjectBinding, aE as SceneConfig, bg as ViewerCameraState, bj as ViewerModelBounds, as as ReducedMotionSetting, j as CameraLimits, S as ObjectBindingDecal, a5 as ObjectSurfacePoint, L as ModelViewerLabels, bi as ViewerLoading, bl as ViewerReveal, H as ModelFormat, a4 as ObjectPointerEvent, bk as ViewerModelInfo, N as ObjectActionEvent, e as AnimationControls, az as SceneAnnotationMarker, bf as ViewerCameraConfig, bh as ViewerIsolation, at as SavedMeasurement, w as MeasurementSettings, b3 as SequenceControls } from './modelFileResolver-Bq4pW9vc.mjs';
2
2
  import { Object3D, Material } from 'three';
3
3
  import { ReactNode } from 'react';
4
4
  import { CameraControls } from '@react-three/drei';
@@ -783,6 +783,7 @@ type ModelViewerProps = GroupedModelViewerProps & {
783
783
  activeAnnotation?: AnnotationMarker | null;
784
784
  onActiveAnnotationChange?: (annotation: AnnotationMarker | null) => void;
785
785
  camera?: ViewerCameraConfig;
786
+ /** Replaces sceneConfig.camera.limits when given. One kind of limit applies at a time. */
786
787
  cameraLimits?: CameraLimits;
787
788
  backgroundColor?: string;
788
789
  shadows?: boolean;
@@ -1,4 +1,4 @@
1
- import { L as LicenseResult, a as ARHandoffOptions } from './modelViewerProps-BBnZTFO-.js';
1
+ import { L as LicenseResult, a as ARHandoffOptions } from './modelViewerProps-BnrJO5DK.js';
2
2
 
3
3
  /** Props of `BindingBuilder`. */
4
4
  type BindingBuilderProps = {
@@ -1,4 +1,4 @@
1
- import { L as LicenseResult, a as ARHandoffOptions } from './modelViewerProps-CIY4nsNY.mjs';
1
+ import { L as LicenseResult, a as ARHandoffOptions } from './modelViewerProps-wjBT4fks.mjs';
2
2
 
3
3
  /** Props of `BindingBuilder`. */
4
4
  type BindingBuilderProps = {
@@ -1 +1 @@
1
- .bb-loadingOverlay{position:absolute;inset:0;z-index:var(--ri-ui-z-overlay);display:flex;align-items:center;justify-content:center;padding:16px;background:var(--ri-ui-panel)}.bb-root .bb-loadingOverlay{background:var(--ri-ui-scrim)}.ri-canvasArea .bb-loadingOverlay{z-index:12}.smv-canvasArea .bb-loadingOverlay{z-index:110}.bb-loadingCard{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;box-sizing:border-box;width:min(100%,280px);padding:12px 14px;border:1px solid var(--ri-ui-line);border-radius:var(--ri-ui-radius-m);background:var(--ri-ui-raised);box-shadow:var(--ri-ui-shadow-menu);font-size:12px;line-height:16px;text-align:left}.bb-loadingHeader{display:flex;align-items:baseline;justify-content:space-between;gap:12px}.bb-loadingTitle{min-width:0;overflow:hidden;color:var(--ri-ui-text);font-weight:500;text-overflow:ellipsis;white-space:nowrap}.bb-loadingPercent{flex-shrink:0;color:var(--ri-ui-text-2);font-variant-numeric:tabular-nums}.bb-loadingProgress{height:3px;overflow:hidden;border-radius:2px;background:var(--ri-ui-line-strong)}.bb-loadingProgress__bar{height:100%;border-radius:inherit;background:var(--ri-ui-accent)}.bb-loadingProgress--unknown .bb-loadingProgress__bar{width:35%;animation:bb-loadingSlide 1.2s ease-in-out infinite}@keyframes bb-loadingSlide{0%{transform:translate(-100%)}to{transform:translate(290%)}}@media(prefers-reduced-motion:reduce){.bb-loadingProgress--unknown .bb-loadingProgress__bar{width:100%;opacity:.4;animation:none}}.bb-loadingMessage{color:var(--ri-ui-text-3);font-size:11px;line-height:14px;overflow-wrap:anywhere}.bb-loadingOverlay--light{--ri-ui-raised: #ffffff;--ri-ui-line: #e4e5e9;--ri-ui-line-strong: #d6d8dd;--ri-ui-text: #1d1e22;--ri-ui-text-2: #5c5f67;--ri-ui-shadow-menu: 0 8px 24px rgba(15, 17, 20, .12)}.ri-viewerSlot{position:relative;width:100%;height:100%;min-width:0;min-height:0}.ri-viewerPlaceholder{position:relative;overflow:hidden}.ri-viewerPlaceholder--inset{position:absolute;inset:0}.ri-poster{position:absolute;inset:0;z-index:0;width:100%;height:100%;object-fit:var(--ri-poster-fit, contain);pointer-events:none;user-select:none;transition:opacity .3s ease}.ri-poster--hidden{opacity:0}[data-reduced-motion] .ri-poster{transition:none}@media(prefers-reduced-motion:reduce){.ri-poster{transition:none}}.ri-revealButton{position:absolute;top:50%;left:50%;z-index:2;display:inline-flex;align-items:center;gap:8px;padding:10px 18px;border:0;border-radius:var(--ri-ui-radius-m);background:var(--ri-ui-accent);color:var(--ri-ui-on-accent);font:600 14px/1.2 Inter,Segoe UI,Helvetica,Arial,sans-serif;white-space:nowrap;cursor:pointer;transform:translate(-50%,-50%);box-shadow:none}.ri-revealButton:hover{background:var(--ri-ui-accent-hover)}.ri-revealButton:focus-visible{outline:2px solid var(--ri-ui-accent);outline-offset:3px}:where(:root){--ri-ui-gap: #0e0f11;--ri-ui-panel: #17181b;--ri-ui-canvas: #1c1c1e;--ri-ui-raised: #1f2024;--ri-ui-field: #212226;--ri-ui-field-hover: #2a2c31;--ri-ui-hover: rgba(255, 255, 255, .05);--ri-ui-selected: rgba(255, 255, 255, .1);--ri-ui-fill: #3a3c42;--ri-ui-line: #26282d;--ri-ui-line-strong: #34363c;--ri-ui-scrim: rgba(8, 9, 11, .6);--ri-ui-text: #e8e9eb;--ri-ui-text-2: #a3a6ad;--ri-ui-text-3: #7b7e86;--ri-ui-accent: #35c0dc;--ri-ui-accent-hover: #4dcce5;--ri-ui-on-accent: #04222a;--ri-ui-accent-dim: rgba(53, 192, 220, .14);--ri-ui-danger: #f0696d;--ri-ui-danger-dim: rgba(240, 105, 109, .14);--ri-ui-warning: #e8b34b;--ri-ui-warning-dim: rgba(232, 179, 75, .14);--ri-ui-success: #4cc38a;--ri-ui-success-dim: rgba(76, 195, 138, .14);--ri-ui-x: #e5484d;--ri-ui-y: #46a758;--ri-ui-z: #3e8bff;--ri-ui-font: "Inter var", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;--ri-ui-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;--ri-ui-radius-s: 4px;--ri-ui-radius-m: 6px;--ri-ui-shadow-menu: 0 12px 32px rgba(0, 0, 0, .5);--ri-ui-h-control: 24px;--ri-ui-h-row: 28px;--ri-ui-z-overlay: 10;--ri-ui-z-chrome: 20;--ri-ui-z-menu: 40;--ri-ui-z-dialog: 60;--ri-ui-z-toast: 80}:root{--ri-styles-simple-model-viewer: 1}.smv-root{--smv-panel-font-family: var(--ri-ui-font);--smv-panel-bg: var(--ri-ui-panel);--smv-panel-bg-strong: var(--ri-ui-field);--smv-panel-bg-strong-hover: var(--ri-ui-field-hover);--smv-panel-border: var(--ri-ui-line);--smv-panel-border-strong: var(--ri-ui-line-strong);--smv-panel-border-active: var(--ri-ui-accent);--smv-panel-shadow-left: none;--smv-panel-shadow-right: none;--smv-panel-text: var(--ri-ui-text);--smv-panel-text-emphasis: var(--ri-ui-text);--smv-panel-text-muted: var(--ri-ui-text-2);--smv-panel-text-subtle: var(--ri-ui-text-3);--smv-panel-surface: var(--ri-ui-field);--smv-panel-surface-hover: var(--ri-ui-field-hover);--smv-panel-surface-soft: var(--ri-ui-hover);--smv-panel-accent: var(--ri-ui-accent);--smv-panel-accent-contrast: var(--ri-ui-on-accent);position:relative;width:100%;height:100%;min-height:0;overflow:hidden;display:flex;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;font-synthesis:none}.smv-canvasArea{flex:1;position:relative;min-width:0}.smv-upload-input{display:none}.smv-upload-toolbar{position:absolute;top:12px;left:50%;z-index:120;display:flex;align-items:center;gap:10px;max-width:calc(100% - 32px);padding:5px 6px;border:1px solid var(--smv-panel-border-strong);border-radius:var(--ri-ui-radius-m);background:var(--ri-ui-scrim);color:var(--smv-panel-text);box-shadow:none;transform:translate(-50%)}.smv-upload-toolbar__name{max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--smv-panel-text-muted);font-size:12px;font-weight:500}.smv-upload-toolbar__button{display:inline-flex;align-items:center;gap:7px;min-height:34px;padding:0 14px;border:1px solid var(--ri-ui-line);border-radius:var(--ri-ui-radius-m);background:var(--ri-ui-field);color:var(--smv-panel-text-emphasis);font-size:12px;font-weight:600;cursor:pointer}.smv-upload-toolbar__button--ghost{background:var(--smv-panel-surface);color:var(--smv-panel-text-muted)}.smv-upload-empty-state{display:flex;align-items:center;justify-content:center;width:100%;height:100%;padding:24px}.smv-upload-empty-state__card{width:min(440px,100%);padding:28px;border:1px dashed var(--ri-ui-line);border-radius:var(--ri-ui-radius-m);color:var(--smv-panel-text);text-align:center;box-shadow:none}.smv-upload-empty-state__icon{display:inline-flex;align-items:center;justify-content:center;width:56px;height:56px;margin-bottom:18px;border-radius:var(--ri-ui-radius-m);background:var(--ri-ui-field);color:var(--ri-ui-text-2)}.smv-upload-empty-state__body{margin:0 0 18px;color:var(--smv-panel-text-muted);font-size:12px;font-weight:600;line-height:1.6}.smv-upload-empty-state__body code{color:var(--smv-panel-text-emphasis);font-family:var(--smv-panel-font-family)}.smv-upload-empty-state__button{display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:0 18px;border:none;border-radius:var(--ri-ui-radius-m);background:var(--ri-ui-accent);color:var(--ri-ui-on-accent);font-size:12px;font-weight:600;cursor:pointer}.smv-upload-drop-overlay{position:absolute;inset:0;z-index:130;display:flex;align-items:center;justify-content:center;padding:24px;background:var(--ri-ui-scrim)}.smv-upload-drop-overlay__card{display:inline-flex;align-items:center;gap:10px;padding:16px 20px;border:1px dashed var(--ri-ui-accent);border-radius:var(--ri-ui-radius-m);background:var(--ri-ui-raised);color:var(--ri-ui-text-2);font-size:12px;font-weight:600;box-shadow:none}.ri-right-panel-wrapper{height:100%;transition:width .45s cubic-bezier(.4,0,.2,1);overflow:visible}.ri-right-panel-wrapper--open{width:300px;flex-shrink:0}.ri-right-panel-wrapper--closed{width:0;flex-shrink:0}.ri-left-panel-wrapper{height:100%;transition:width .45s cubic-bezier(.4,0,.2,1);overflow:visible;order:-1}.ri-left-panel-wrapper--open{width:280px;flex-shrink:0}.ri-left-panel-wrapper--closed{width:0;flex-shrink:0}.ri-side-panel__open-btn.ri-side-panel__open-btn--left{left:12px;right:auto}.ri-side-panel.ri-side-panel--left{left:0;right:auto;width:280px;transform:translate(-100%);border-left:none;border-right:1px solid var(--smv-panel-border);box-shadow:none}.ri-side-panel.ri-side-panel--open-left{transform:translate(0)}.ri-side-panel.ri-side-panel--closed-left{transform:translate(-100%)}.ri-env-controls{display:flex;flex-direction:column;flex:1;overflow-y:auto;font-size:12px;line-height:16px}.ri-env-section{padding-bottom:6px;border-bottom:1px solid var(--smv-panel-border)}.ri-env-section__header{display:flex;align-items:center;gap:6px;width:100%;height:32px;padding:0 12px;border:none;background:transparent;color:var(--smv-panel-text-emphasis);font:inherit;font-weight:600;cursor:pointer}.ri-env-section__header:hover{background:var(--smv-panel-surface-soft)}.ri-env-section__chevron{flex-shrink:0;color:var(--smv-panel-text-subtle);transition:transform .15s}.ri-env-section__chevron--collapsed{transform:rotate(-90deg)}.ri-env-section__body{display:flex;flex-direction:column}.ri-env-row{display:flex;align-items:center;gap:8px;min-height:28px;padding:0 12px}.ri-env-row__label{flex:0 0 52%;overflow:hidden;color:var(--smv-panel-text-muted);text-overflow:ellipsis;white-space:nowrap}.ri-env-row__value{display:flex;flex:1;align-items:center;min-width:0}.ri-env-row__value--slider{gap:8px}.ri-env-checkbox-btn{display:flex;align-items:center;padding:0;border:none;background:none;cursor:pointer}.ri-env-checkbox{display:flex;align-items:center;justify-content:center;width:14px;height:14px;border:1px solid var(--smv-panel-border-strong);border-radius:3px;background:var(--smv-panel-surface);color:var(--smv-panel-accent-contrast);transition:background .15s,border-color .15s}.ri-env-checkbox--checked{border-color:var(--smv-panel-accent);background:var(--smv-panel-accent)}.ri-env-select{box-sizing:border-box;width:100%;height:24px;padding:0 6px;border:none;border-radius:var(--ri-ui-radius-s);background:var(--smv-panel-surface);color:var(--smv-panel-text);font:inherit;text-transform:capitalize}.ri-env-select:hover{background:var(--smv-panel-surface-hover)}.ri-env-color-swatch{position:relative;display:flex;align-items:center;gap:6px;box-sizing:border-box;width:100%;height:24px;padding:0 6px;border-radius:var(--ri-ui-radius-s);background:var(--smv-panel-surface);cursor:pointer}.ri-env-color-swatch:hover{background:var(--smv-panel-surface-hover)}.ri-env-color-swatch__chip{flex-shrink:0;width:14px;height:14px;border:1px solid var(--smv-panel-border-strong);border-radius:3px}.ri-env-color-swatch__hex{color:var(--smv-panel-text);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px;pointer-events:none}.ri-env-color-swatch__input{position:absolute;inset:0;width:100%;height:100%;padding:0;border:none;opacity:0;cursor:pointer}.ri-env-slider{flex:1;min-width:0;margin:0;accent-color:var(--smv-panel-accent);cursor:pointer}.ri-env-slider__value{flex-shrink:0;min-width:28px;color:var(--smv-panel-text-muted);font-size:11px;font-variant-numeric:tabular-nums;text-align:right}.ri-env-row__info{flex:1;min-width:0;overflow:hidden;color:var(--smv-panel-text);font-variant-numeric:tabular-nums;text-overflow:ellipsis;white-space:nowrap}.ri-env-footer{padding:10px 12px 12px}.ri-env-reset{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;height:26px;border:1px solid var(--smv-panel-border-strong);border-radius:var(--ri-ui-radius-s);background:transparent;color:var(--smv-panel-text-muted);font:inherit;cursor:pointer}.ri-env-reset:hover{background:var(--smv-panel-surface-soft);color:var(--smv-panel-text)}.ri-env-reset:focus-visible,.ri-env-section__header:focus-visible,.ri-env-checkbox-btn:focus-visible,.ri-env-select:focus-visible,.ri-env-slider:focus-visible,.ri-env-color-swatch:focus-within{outline:2px solid var(--smv-panel-accent);outline-offset:1px}.ri-side-panel__open-btn{position:absolute;top:12px;right:12px;display:flex;align-items:center;gap:7px;padding:7px 13px;border-radius:var(--ri-ui-radius-m);border:1px solid var(--smv-panel-border-strong);background:var(--smv-panel-bg-strong);cursor:pointer;font-size:12px;font-weight:500;color:var(--smv-panel-text);z-index:190;transition:background .15s}.ri-side-panel__open-btn:hover{background:var(--smv-panel-bg-strong-hover)}.ri-side-panel{position:absolute;top:0;right:0;width:300px;height:100%;background:var(--smv-panel-bg);display:flex;flex-direction:column;font-family:var(--smv-panel-font-family);transform:translate(100%);transition:transform .45s cubic-bezier(.4,0,.2,1);z-index:200;border-left:1px solid var(--smv-panel-border);box-shadow:none}.ri-side-panel--open{transform:translate(0)}.ri-side-panel--closed{transform:translate(100%)}.ri-side-panel__header{flex-shrink:0;border-bottom:1px solid var(--smv-panel-border)}.ri-side-panel__header-top{display:flex;align-items:center;gap:8px;height:40px;padding:0 8px 0 12px}.ri-side-panel__eyebrow{overflow:hidden;color:var(--smv-panel-text-emphasis);font-size:12px;font-weight:600;text-overflow:ellipsis;white-space:nowrap}.ri-side-panel__title{flex-shrink:0;color:var(--smv-panel-text-subtle);font-size:11px;font-variant-numeric:tabular-nums}.ri-side-panel__close-btn{display:flex;flex-shrink:0;align-items:center;justify-content:center;width:24px;height:24px;margin-left:auto;border:none;border-radius:var(--ri-ui-radius-s);background:transparent;color:var(--smv-panel-text-muted);cursor:pointer;transition:background .15s,color .15s}.ri-side-panel__close-btn:hover{background:var(--smv-panel-surface-hover);color:var(--smv-panel-text)}.ri-side-panel__search-wrap{flex-shrink:0;padding:8px 12px;border-bottom:1px solid var(--smv-panel-border)}.ri-side-panel__search{box-sizing:border-box;width:100%;height:26px;padding:0 8px;border:1px solid transparent;border-radius:var(--ri-ui-radius-s);background:var(--smv-panel-surface);color:var(--smv-panel-text);font-size:12px;outline:none;transition:border-color .15s,background .15s}.ri-side-panel__search::placeholder{color:var(--smv-panel-text-subtle)}.ri-side-panel__search:focus{border-color:var(--smv-panel-border-active);background:var(--smv-panel-surface-hover)}.ri-side-panel__list{display:flex;flex-direction:column;overflow-y:auto;flex:1}.ri-side-panel__list::-webkit-scrollbar{width:4px}.ri-side-panel__list::-webkit-scrollbar-track{background:transparent}.ri-side-panel__list::-webkit-scrollbar-thumb{background:var(--smv-panel-surface-hover);border-radius:var(--ri-ui-radius-s)}.ri-side-panel__row{display:flex;align-items:center;justify-content:space-between;min-height:30px;padding:0 12px;cursor:pointer;transition:background .12s;border-bottom:1px solid var(--smv-panel-surface-soft)}.ri-side-panel__row:hover,.ri-side-panel__row--hovered{background:var(--smv-panel-surface)}.ri-side-panel__row.ri-side-panel__row--selected{background:var(--ri-ui-accent-dim);color:var(--smv-panel-text-emphasis)}.ri-side-panel__label{font-size:12px;color:var(--smv-panel-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1}.ri-side-panel__labelButton{min-width:0;padding:0;background:none;border:none;font-family:var(--ri-ui-font);text-align:left;cursor:pointer}.ri-side-panel__labelButton:focus-visible{outline:2px solid var(--smv-panel-text);outline-offset:2px;border-radius:var(--ri-ui-radius-s)}.ri-side-panel__label--hovered{color:var(--smv-panel-text-emphasis)}.ri-side-panel__vis-btn{display:flex;align-items:center;flex-shrink:0;cursor:pointer;background:none;border:none;padding:0;margin-left:10px}.ri-side-panel__checkbox{width:16px;height:16px;border-radius:var(--ri-ui-radius-s);border:1.5px solid var(--smv-panel-border-active);background:transparent;display:flex;align-items:center;justify-content:center;transition:background .15s,border-color .15s}.ri-side-panel__checkbox--checked{background:var(--smv-panel-accent);border-color:var(--smv-panel-accent)}@media(max-width:900px){.smv-upload-toolbar{top:56px;gap:8px;max-width:calc(100% - 24px);padding:8px 10px}.smv-upload-toolbar__name{max-width:140px}.ri-right-panel-wrapper--open,.ri-left-panel-wrapper--open{width:0}.ri-side-panel,.ri-side-panel.ri-side-panel--left{width:min(300px,85vw)}}.smv-largeModelBanner{position:absolute;bottom:12px;left:50%;transform:translate(-50%);z-index:20;display:flex;align-items:center;gap:8px;padding:7px 12px 7px 10px;border-radius:var(--ri-ui-radius-m);background:var(--ri-ui-scrim);border:1px solid var(--ri-ui-warning);color:var(--ri-ui-warning);font-size:12px;font-weight:500;line-height:1.4;pointer-events:auto;max-width:calc(100% - 32px);text-align:center}.smv-largeModelBanner__icon{flex-shrink:0}.smv-largeModelBanner__dismiss{flex-shrink:0;display:flex;align-items:center;justify-content:center;margin-left:4px;padding:2px;background:none;border:none;border-radius:var(--ri-ui-radius-s);color:var(--ri-ui-warning);cursor:pointer;transition:color .15s ease,background .15s ease}.smv-largeModelBanner__dismiss:hover{color:var(--ri-ui-warning);background:var(--ri-ui-warning-dim)}.smv-root[data-reduced-motion] *,.smv-root[data-reduced-motion] *:before,.smv-root[data-reduced-motion] *:after{transition-duration:0s;transition-delay:0s}.smv-reset-camera{position:absolute;bottom:12px;right:12px;z-index:3;border:1px solid var(--ri-ui-line);border-radius:6px;padding:8px 12px;background:var(--ri-ui-panel);color:var(--ri-ui-text);cursor:pointer}.smv-reset-camera:focus-visible{outline:2px solid currentColor;outline-offset:3px}.smv-load-error{position:absolute;inset:16px;margin:auto;width:min(440px,calc(100% - 32px));height:fit-content;z-index:5;padding:20px;border:1px solid var(--ri-ui-line);border-radius:10px;background:var(--ri-ui-panel);color:var(--ri-ui-text)}.smv-load-error p{margin:10px 0}.smv-load-error button{padding:8px 12px;cursor:pointer}.smv-load-error button:focus-visible{outline:2px solid currentColor;outline-offset:3px}
1
+ .bb-loadingOverlay{position:absolute;inset:0;z-index:var(--ri-ui-z-overlay);display:flex;align-items:center;justify-content:center;padding:16px;background:var(--ri-ui-panel)}.bb-root .bb-loadingOverlay{background:var(--ri-ui-scrim)}.ri-canvasArea .bb-loadingOverlay{z-index:12}.smv-canvasArea .bb-loadingOverlay{z-index:110}.bb-loadingCard{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;box-sizing:border-box;width:min(100%,280px);padding:12px 14px;border:1px solid var(--ri-ui-line);border-radius:var(--ri-ui-radius-m);background:var(--ri-ui-raised);box-shadow:var(--ri-ui-shadow-menu);font-size:12px;line-height:16px;text-align:left}.bb-loadingHeader{display:flex;align-items:baseline;justify-content:space-between;gap:12px}.bb-loadingTitle{min-width:0;overflow:hidden;color:var(--ri-ui-text);font-weight:500;text-overflow:ellipsis;white-space:nowrap}.bb-loadingPercent{flex-shrink:0;color:var(--ri-ui-text-2);font-variant-numeric:tabular-nums}.bb-loadingProgress{height:3px;overflow:hidden;border-radius:2px;background:var(--ri-ui-line-strong)}.bb-loadingProgress__bar{height:100%;border-radius:inherit;background:var(--ri-ui-accent)}.bb-loadingProgress--unknown .bb-loadingProgress__bar{width:35%;animation:bb-loadingSlide 1.2s ease-in-out infinite}@keyframes bb-loadingSlide{0%{transform:translate(-100%)}to{transform:translate(290%)}}@media(prefers-reduced-motion:reduce){.bb-loadingProgress--unknown .bb-loadingProgress__bar{width:100%;opacity:.4;animation:none}}.bb-loadingMessage{color:var(--ri-ui-text-3);font-size:11px;line-height:14px;overflow-wrap:anywhere}.bb-loadingOverlay--light{--ri-ui-raised: #ffffff;--ri-ui-line: #e4e5e9;--ri-ui-line-strong: #d6d8dd;--ri-ui-text: #1d1e22;--ri-ui-text-2: #5c5f67;--ri-ui-shadow-menu: 0 8px 24px rgba(15, 17, 20, .12)}.ri-viewerSlot{position:relative;width:100%;height:100%;min-width:0;min-height:0}.ri-viewerPlaceholder{position:relative;overflow:hidden}.ri-viewerPlaceholder--inset{position:absolute;inset:0}.ri-poster{position:absolute;inset:0;z-index:0;width:100%;height:100%;object-fit:var(--ri-poster-fit, contain);pointer-events:none;user-select:none;transition:opacity .3s ease}.ri-poster--hidden{opacity:0}[data-reduced-motion] .ri-poster{transition:none}@media(prefers-reduced-motion:reduce){.ri-poster{transition:none}}.ri-revealButton{position:absolute;top:50%;left:50%;z-index:2;display:inline-flex;align-items:center;gap:8px;padding:10px 18px;border:0;border-radius:var(--ri-ui-radius-m);background:var(--ri-ui-accent);color:var(--ri-ui-on-accent);font:600 14px/1.2 Inter,Segoe UI,Helvetica,Arial,sans-serif;white-space:nowrap;cursor:pointer;transform:translate(-50%,-50%);box-shadow:none}.ri-revealButton:hover{background:var(--ri-ui-accent-hover)}.ri-revealButton:focus-visible{outline:2px solid var(--ri-ui-accent);outline-offset:3px}:where(:root){--ri-ui-gap: #0e0f11;--ri-ui-panel: #17181b;--ri-ui-canvas: #1c1c1e;--ri-ui-raised: #1f2024;--ri-ui-field: #212226;--ri-ui-field-hover: #2a2c31;--ri-ui-hover: rgba(255, 255, 255, .05);--ri-ui-selected: rgba(255, 255, 255, .1);--ri-ui-fill: #3a3c42;--ri-ui-line: #26282d;--ri-ui-line-strong: #34363c;--ri-ui-scrim: rgba(8, 9, 11, .6);--ri-ui-text: #e8e9eb;--ri-ui-text-2: #a3a6ad;--ri-ui-text-3: #7b7e86;--ri-ui-accent: #35c0dc;--ri-ui-accent-hover: #4dcce5;--ri-ui-on-accent: #04222a;--ri-ui-accent-dim: rgba(53, 192, 220, .14);--ri-ui-danger: #f0696d;--ri-ui-danger-dim: rgba(240, 105, 109, .14);--ri-ui-warning: #e8b34b;--ri-ui-warning-dim: rgba(232, 179, 75, .14);--ri-ui-success: #4cc38a;--ri-ui-success-dim: rgba(76, 195, 138, .14);--ri-ui-x: #e5484d;--ri-ui-y: #46a758;--ri-ui-z: #3e8bff;--ri-ui-font: "Inter var", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;--ri-ui-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;--ri-ui-radius-s: 4px;--ri-ui-radius-m: 6px;--ri-ui-shadow-menu: 0 12px 32px rgba(0, 0, 0, .5);--ri-ui-h-control: 24px;--ri-ui-h-row: 28px;--ri-ui-z-overlay: 10;--ri-ui-z-chrome: 20;--ri-ui-z-menu: 40;--ri-ui-z-dialog: 60;--ri-ui-z-toast: 80}.ri-select{display:flex;align-items:center;text-align:left;white-space:nowrap;overflow:hidden;cursor:pointer}.ri-select:disabled{cursor:default;opacity:.5}.ri-selectValue{min-width:0;overflow:hidden;text-overflow:ellipsis}.ri-selectMenu{position:fixed;z-index:10000;box-sizing:border-box;overflow-y:auto;padding:4px;border:1px solid var(--ri-ui-line-strong);border-radius:var(--ri-ui-radius-s);background:var(--ri-ui-raised);color:var(--ri-ui-text);font:400 12px/16px var(--ri-ui-font);box-shadow:0 8px 24px #00000059}.ri-selectGroup{padding:6px 8px 2px;color:var(--ri-ui-text-3);font-size:11px;font-weight:600}.ri-selectOption{display:flex;align-items:center;gap:6px;padding:5px 8px 5px 4px;border-radius:var(--ri-ui-radius-s);white-space:nowrap;cursor:pointer}.ri-selectOption--active{background:var(--ri-ui-field-hover)}.ri-selectOption[aria-disabled=true]{opacity:.45;cursor:default}.ri-selectCheck{display:inline-flex;width:14px;flex:none;color:var(--ri-ui-accent)}:root{--ri-styles-simple-model-viewer: 1}.smv-root{--smv-panel-font-family: var(--ri-ui-font);--smv-panel-bg: var(--ri-ui-panel);--smv-panel-bg-strong: var(--ri-ui-field);--smv-panel-bg-strong-hover: var(--ri-ui-field-hover);--smv-panel-border: var(--ri-ui-line);--smv-panel-border-strong: var(--ri-ui-line-strong);--smv-panel-border-active: var(--ri-ui-accent);--smv-panel-shadow-left: none;--smv-panel-shadow-right: none;--smv-panel-text: var(--ri-ui-text);--smv-panel-text-emphasis: var(--ri-ui-text);--smv-panel-text-muted: var(--ri-ui-text-2);--smv-panel-text-subtle: var(--ri-ui-text-3);--smv-panel-surface: var(--ri-ui-field);--smv-panel-surface-hover: var(--ri-ui-field-hover);--smv-panel-surface-soft: var(--ri-ui-hover);--smv-panel-accent: var(--ri-ui-accent);--smv-panel-accent-contrast: var(--ri-ui-on-accent);position:relative;width:100%;height:100%;min-height:0;overflow:hidden;display:flex;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;font-synthesis:none}.smv-canvasArea{flex:1;position:relative;min-width:0}.smv-upload-input{display:none}.smv-upload-toolbar{position:absolute;top:12px;left:50%;z-index:120;display:flex;align-items:center;gap:10px;max-width:calc(100% - 32px);padding:5px 6px;border:1px solid var(--smv-panel-border-strong);border-radius:var(--ri-ui-radius-m);background:var(--ri-ui-scrim);color:var(--smv-panel-text);box-shadow:none;transform:translate(-50%)}.smv-upload-toolbar__name{max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--smv-panel-text-muted);font-size:12px;font-weight:500}.smv-upload-toolbar__button{display:inline-flex;align-items:center;gap:7px;min-height:34px;padding:0 14px;border:1px solid var(--ri-ui-line);border-radius:var(--ri-ui-radius-m);background:var(--ri-ui-field);color:var(--smv-panel-text-emphasis);font-size:12px;font-weight:600;cursor:pointer}.smv-upload-toolbar__button--ghost{background:var(--smv-panel-surface);color:var(--smv-panel-text-muted)}.smv-upload-empty-state{display:flex;align-items:center;justify-content:center;width:100%;height:100%;padding:24px}.smv-upload-empty-state__card{width:min(440px,100%);padding:28px;border:1px dashed var(--ri-ui-line);border-radius:var(--ri-ui-radius-m);color:var(--smv-panel-text);text-align:center;box-shadow:none}.smv-upload-empty-state__icon{display:inline-flex;align-items:center;justify-content:center;width:56px;height:56px;margin-bottom:18px;border-radius:var(--ri-ui-radius-m);background:var(--ri-ui-field);color:var(--ri-ui-text-2)}.smv-upload-empty-state__body{margin:0 0 18px;color:var(--smv-panel-text-muted);font-size:12px;font-weight:600;line-height:1.6}.smv-upload-empty-state__body code{color:var(--smv-panel-text-emphasis);font-family:var(--smv-panel-font-family)}.smv-upload-empty-state__button{display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:0 18px;border:none;border-radius:var(--ri-ui-radius-m);background:var(--ri-ui-accent);color:var(--ri-ui-on-accent);font-size:12px;font-weight:600;cursor:pointer}.smv-upload-drop-overlay{position:absolute;inset:0;z-index:130;display:flex;align-items:center;justify-content:center;padding:24px;background:var(--ri-ui-scrim)}.smv-upload-drop-overlay__card{display:inline-flex;align-items:center;gap:10px;padding:16px 20px;border:1px dashed var(--ri-ui-accent);border-radius:var(--ri-ui-radius-m);background:var(--ri-ui-raised);color:var(--ri-ui-text-2);font-size:12px;font-weight:600;box-shadow:none}.ri-right-panel-wrapper{height:100%;transition:width .45s cubic-bezier(.4,0,.2,1);overflow:visible}.ri-right-panel-wrapper--open{width:300px;flex-shrink:0}.ri-right-panel-wrapper--closed{width:0;flex-shrink:0}.ri-left-panel-wrapper{height:100%;transition:width .45s cubic-bezier(.4,0,.2,1);overflow:visible;order:-1}.ri-left-panel-wrapper--open{width:280px;flex-shrink:0}.ri-left-panel-wrapper--closed{width:0;flex-shrink:0}.ri-side-panel__open-btn.ri-side-panel__open-btn--left{left:12px;right:auto}.ri-side-panel.ri-side-panel--left{left:0;right:auto;width:280px;transform:translate(-100%);border-left:none;border-right:1px solid var(--smv-panel-border);box-shadow:none}.ri-side-panel.ri-side-panel--open-left{transform:translate(0)}.ri-side-panel.ri-side-panel--closed-left{transform:translate(-100%)}.ri-env-controls{display:flex;flex-direction:column;flex:1;overflow-y:auto;font-size:12px;line-height:16px}.ri-env-section{padding-bottom:6px;border-bottom:1px solid var(--smv-panel-border)}.ri-env-section__header{display:flex;align-items:center;gap:6px;width:100%;height:32px;padding:0 12px;border:none;background:transparent;color:var(--smv-panel-text-emphasis);font:inherit;font-weight:600;cursor:pointer}.ri-env-section__header:hover{background:var(--smv-panel-surface-soft)}.ri-env-section__chevron{flex-shrink:0;color:var(--smv-panel-text-subtle);transition:transform .15s}.ri-env-section__chevron--collapsed{transform:rotate(-90deg)}.ri-env-section__body{display:flex;flex-direction:column}.ri-env-row{display:flex;align-items:center;gap:8px;min-height:28px;padding:0 12px}.ri-env-row__label{flex:0 0 52%;overflow:hidden;color:var(--smv-panel-text-muted);text-overflow:ellipsis;white-space:nowrap}.ri-env-row__value{display:flex;flex:1;align-items:center;min-width:0}.ri-env-row__value--slider{gap:8px}.ri-env-checkbox-btn{display:flex;align-items:center;padding:0;border:none;background:none;cursor:pointer}.ri-env-checkbox{display:flex;align-items:center;justify-content:center;width:14px;height:14px;border:1px solid var(--smv-panel-border-strong);border-radius:3px;background:var(--smv-panel-surface);color:var(--smv-panel-accent-contrast);transition:background .15s,border-color .15s}.ri-env-checkbox--checked{border-color:var(--smv-panel-accent);background:var(--smv-panel-accent)}.ri-env-select{box-sizing:border-box;width:100%;height:24px;padding:0 6px;border:none;border-radius:var(--ri-ui-radius-s);background:var(--smv-panel-surface);color:var(--smv-panel-text);font:inherit;text-transform:capitalize}.ri-env-select:hover{background:var(--smv-panel-surface-hover)}.ri-env-color-swatch{position:relative;display:flex;align-items:center;gap:6px;box-sizing:border-box;width:100%;height:24px;padding:0 6px;border-radius:var(--ri-ui-radius-s);background:var(--smv-panel-surface);cursor:pointer}.ri-env-color-swatch:hover{background:var(--smv-panel-surface-hover)}.ri-env-color-swatch__chip{flex-shrink:0;width:14px;height:14px;border:1px solid var(--smv-panel-border-strong);border-radius:3px}.ri-env-color-swatch__hex{color:var(--smv-panel-text);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px;pointer-events:none}.ri-env-color-swatch__input{position:absolute;inset:0;width:100%;height:100%;padding:0;border:none;opacity:0;cursor:pointer}.ri-env-slider{flex:1;min-width:0;margin:0;accent-color:var(--smv-panel-accent);cursor:pointer}.ri-env-slider__value{flex-shrink:0;min-width:28px;color:var(--smv-panel-text-muted);font-size:11px;font-variant-numeric:tabular-nums;text-align:right}.ri-env-row__info{flex:1;min-width:0;overflow:hidden;color:var(--smv-panel-text);font-variant-numeric:tabular-nums;text-overflow:ellipsis;white-space:nowrap}.ri-env-footer{padding:10px 12px 12px}.ri-env-reset{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;height:26px;border:1px solid var(--smv-panel-border-strong);border-radius:var(--ri-ui-radius-s);background:transparent;color:var(--smv-panel-text-muted);font:inherit;cursor:pointer}.ri-env-reset:hover{background:var(--smv-panel-surface-soft);color:var(--smv-panel-text)}.ri-env-reset:focus-visible,.ri-env-section__header:focus-visible,.ri-env-checkbox-btn:focus-visible,.ri-env-select:focus-visible,.ri-env-slider:focus-visible,.ri-env-color-swatch:focus-within{outline:2px solid var(--smv-panel-accent);outline-offset:1px}.ri-side-panel__open-btn{position:absolute;top:12px;right:12px;display:flex;align-items:center;gap:7px;padding:7px 13px;border-radius:var(--ri-ui-radius-m);border:1px solid var(--smv-panel-border-strong);background:var(--smv-panel-bg-strong);cursor:pointer;font-size:12px;font-weight:500;color:var(--smv-panel-text);z-index:190;transition:background .15s}.ri-side-panel__open-btn:hover{background:var(--smv-panel-bg-strong-hover)}.ri-side-panel{position:absolute;top:0;right:0;width:300px;height:100%;background:var(--smv-panel-bg);display:flex;flex-direction:column;font-family:var(--smv-panel-font-family);transform:translate(100%);transition:transform .45s cubic-bezier(.4,0,.2,1);z-index:200;border-left:1px solid var(--smv-panel-border);box-shadow:none}.ri-side-panel--open{transform:translate(0)}.ri-side-panel--closed{transform:translate(100%)}.ri-side-panel__header{flex-shrink:0;border-bottom:1px solid var(--smv-panel-border)}.ri-side-panel__header-top{display:flex;align-items:center;gap:8px;height:40px;padding:0 8px 0 12px}.ri-side-panel__eyebrow{overflow:hidden;color:var(--smv-panel-text-emphasis);font-size:12px;font-weight:600;text-overflow:ellipsis;white-space:nowrap}.ri-side-panel__title{flex-shrink:0;color:var(--smv-panel-text-subtle);font-size:11px;font-variant-numeric:tabular-nums}.ri-side-panel__close-btn{display:flex;flex-shrink:0;align-items:center;justify-content:center;width:24px;height:24px;margin-left:auto;border:none;border-radius:var(--ri-ui-radius-s);background:transparent;color:var(--smv-panel-text-muted);cursor:pointer;transition:background .15s,color .15s}.ri-side-panel__close-btn:hover{background:var(--smv-panel-surface-hover);color:var(--smv-panel-text)}.ri-side-panel__search-wrap{flex-shrink:0;padding:8px 12px;border-bottom:1px solid var(--smv-panel-border)}.ri-side-panel__search{box-sizing:border-box;width:100%;height:26px;padding:0 8px;border:1px solid transparent;border-radius:var(--ri-ui-radius-s);background:var(--smv-panel-surface);color:var(--smv-panel-text);font-size:12px;outline:none;transition:border-color .15s,background .15s}.ri-side-panel__search::placeholder{color:var(--smv-panel-text-subtle)}.ri-side-panel__search:focus{border-color:var(--smv-panel-border-active);background:var(--smv-panel-surface-hover)}.ri-side-panel__list{display:flex;flex-direction:column;overflow-y:auto;flex:1}.ri-side-panel__list::-webkit-scrollbar{width:4px}.ri-side-panel__list::-webkit-scrollbar-track{background:transparent}.ri-side-panel__list::-webkit-scrollbar-thumb{background:var(--smv-panel-surface-hover);border-radius:var(--ri-ui-radius-s)}.ri-side-panel__row{display:flex;align-items:center;justify-content:space-between;min-height:30px;padding:0 12px;cursor:pointer;transition:background .12s;border-bottom:1px solid var(--smv-panel-surface-soft)}.ri-side-panel__row:hover,.ri-side-panel__row--hovered{background:var(--smv-panel-surface)}.ri-side-panel__row.ri-side-panel__row--selected{background:var(--ri-ui-accent-dim);color:var(--smv-panel-text-emphasis)}.ri-side-panel__label{font-size:12px;color:var(--smv-panel-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1}.ri-side-panel__labelButton{min-width:0;padding:0;background:none;border:none;font-family:var(--ri-ui-font);text-align:left;cursor:pointer}.ri-side-panel__labelButton:focus-visible{outline:2px solid var(--smv-panel-text);outline-offset:2px;border-radius:var(--ri-ui-radius-s)}.ri-side-panel__label--hovered{color:var(--smv-panel-text-emphasis)}.ri-side-panel__vis-btn{display:flex;align-items:center;flex-shrink:0;cursor:pointer;background:none;border:none;padding:0;margin-left:10px}.ri-side-panel__checkbox{width:16px;height:16px;border-radius:var(--ri-ui-radius-s);border:1.5px solid var(--smv-panel-border-active);background:transparent;display:flex;align-items:center;justify-content:center;transition:background .15s,border-color .15s}.ri-side-panel__checkbox--checked{background:var(--smv-panel-accent);border-color:var(--smv-panel-accent)}@media(max-width:900px){.smv-upload-toolbar{top:56px;gap:8px;max-width:calc(100% - 24px);padding:8px 10px}.smv-upload-toolbar__name{max-width:140px}.ri-right-panel-wrapper--open,.ri-left-panel-wrapper--open{width:0}.ri-side-panel,.ri-side-panel.ri-side-panel--left{width:min(300px,85vw)}}.smv-largeModelBanner{position:absolute;bottom:12px;left:50%;transform:translate(-50%);z-index:20;display:flex;align-items:center;gap:8px;padding:7px 12px 7px 10px;border-radius:var(--ri-ui-radius-m);background:var(--ri-ui-scrim);border:1px solid var(--ri-ui-warning);color:var(--ri-ui-warning);font-size:12px;font-weight:500;line-height:1.4;pointer-events:auto;max-width:calc(100% - 32px);text-align:center}.smv-largeModelBanner__icon{flex-shrink:0}.smv-largeModelBanner__dismiss{flex-shrink:0;display:flex;align-items:center;justify-content:center;margin-left:4px;padding:2px;background:none;border:none;border-radius:var(--ri-ui-radius-s);color:var(--ri-ui-warning);cursor:pointer;transition:color .15s ease,background .15s ease}.smv-largeModelBanner__dismiss:hover{color:var(--ri-ui-warning);background:var(--ri-ui-warning-dim)}.smv-root[data-reduced-motion] *,.smv-root[data-reduced-motion] *:before,.smv-root[data-reduced-motion] *:after{transition-duration:0s;transition-delay:0s}.smv-reset-camera{position:absolute;bottom:12px;right:12px;z-index:3;border:1px solid var(--ri-ui-line);border-radius:6px;padding:8px 12px;background:var(--ri-ui-panel);color:var(--ri-ui-text);cursor:pointer}.smv-reset-camera:focus-visible{outline:2px solid currentColor;outline-offset:3px}.smv-load-error{position:absolute;inset:16px;margin:auto;width:min(440px,calc(100% - 32px));height:fit-content;z-index:5;padding:20px;border:1px solid var(--ri-ui-line);border-radius:10px;background:var(--ri-ui-panel);color:var(--ri-ui-text)}.smv-load-error p{margin:10px 0}.smv-load-error button{padding:8px 12px;cursor:pointer}.smv-load-error button:focus-visible{outline:2px solid currentColor;outline-offset:3px}
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
- import { J as ModelViewerLabels, bh as ViewerLoading, bk as ViewerReveal, F as ModelFormat, j as CameraLimits, ar as ReducedMotionSetting, E as EnvironmentPreset, bj as ViewerModelInfo } from './modelFileResolver-CVmON8hg.mjs';
3
- export { D as DEFAULT_MODEL_VIEWER_LABELS, p as MaterialVariantGroup, q as MaterialVariantOption, H as ModelViewerLabelKey, bi as ViewerModelBounds } from './modelFileResolver-CVmON8hg.mjs';
2
+ import { L as ModelViewerLabels, bi as ViewerLoading, bl as ViewerReveal, H as ModelFormat, j as CameraLimits, as as ReducedMotionSetting, E as EnvironmentPreset, bk as ViewerModelInfo } from './modelFileResolver-Bq4pW9vc.mjs';
3
+ export { D as DEFAULT_MODEL_VIEWER_LABELS, p as MaterialVariantGroup, q as MaterialVariantOption, J as ModelViewerLabelKey, bj as ViewerModelBounds } from './modelFileResolver-Bq4pW9vc.mjs';
4
4
 
5
5
  /** How the render's colors are mapped to the screen. */
6
6
  type ViewerToneMapping = "aces" | "agx" | "neutral" | "none";
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
- import { J as ModelViewerLabels, bh as ViewerLoading, bk as ViewerReveal, F as ModelFormat, j as CameraLimits, ar as ReducedMotionSetting, E as EnvironmentPreset, bj as ViewerModelInfo } from './modelFileResolver-CVmON8hg.js';
3
- export { D as DEFAULT_MODEL_VIEWER_LABELS, p as MaterialVariantGroup, q as MaterialVariantOption, H as ModelViewerLabelKey, bi as ViewerModelBounds } from './modelFileResolver-CVmON8hg.js';
2
+ import { L as ModelViewerLabels, bi as ViewerLoading, bl as ViewerReveal, H as ModelFormat, j as CameraLimits, as as ReducedMotionSetting, E as EnvironmentPreset, bk as ViewerModelInfo } from './modelFileResolver-Bq4pW9vc.js';
3
+ export { D as DEFAULT_MODEL_VIEWER_LABELS, p as MaterialVariantGroup, q as MaterialVariantOption, J as ModelViewerLabelKey, bj as ViewerModelBounds } from './modelFileResolver-Bq4pW9vc.js';
4
4
 
5
5
  /** How the render's colors are mapped to the screen. */
6
6
  type ViewerToneMapping = "aces" | "agx" | "neutral" | "none";