1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[82482],{82482:(e,t,s)=>{s.r(t),s.d(t,{Model3DViewer:()=>p,ModelLoadBoundary:()=>m});var r=s(99990),a=s(13872),l=s(53265),n=s(25047),i=s(64639),o=s(24342),d=s(96102),c=s(93039),u=s(59508);class m extends o.Component{static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e){this.props.onError(e)}componentDidUpdate(e){e.resetKey!==this.props.resetKey&&this.state.error&&this.setState({error:null})}render(){return this.state.error?null:this.props.children}constructor(...e){super(...e),this.state={error:null}}}function x(e){let{url:t}=e,{scene:s}=(0,l.p)(t);return(0,r.jsx)("primitive",{object:s})}function h(){return(0,r.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-gray-50",children:(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsx)(d.A,{className:"h-8 w-8 animate-spin text-[rgb(24,24,27)] mx-auto mb-2"}),(0,r.jsx)("p",{className:"text-sm text-gray-600",children:"Loading 3D model..."})]})})}function p(e){let{modelUrl:t,onLoadError:s}=e,[d,p]=(0,o.useState)(!0),[b,g]=(0,o.useState)(null),j="/api/proxy-3d-model?url=".concat(encodeURIComponent(t));return(0,o.useEffect)(()=>{p(!0),g(null),l.p.preload(j);let e=setTimeout(()=>{p(!1)},2e3);return()=>clearTimeout(e)},[j]),(0,r.jsxs)("div",{className:"relative w-full h-[calc(100vh-300px)] sm:h-[500px] md:h-[600px] bg-gradient-to-br from-gray-50 to-gray-100 rounded-lg overflow-hidden border border-gray-200",children:[d&&!b&&(0,r.jsx)(h,{}),b&&(0,r.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-ds-page px-6 text-center",children:(0,r.jsxs)("div",{children:[(0,r.jsx)(c.A,{className:"mx-auto mb-2 h-8 w-8 text-ds-danger-default"}),(0,r.jsx)(u.CustomText,{variant:"label-md",as:"p",children:"This 3D file is no longer available."})]})}),(0,r.jsx)(m,{resetKey:j,onError:e=>{p(!1),g(e.message||"This 3D file is no longer available"),null==s||s(e)},children:(0,r.jsx)(a.Hl,{camera:{position:[0,0,5],fov:50},shadows:!0,gl:{preserveDrawingBuffer:!0},children:(0,r.jsxs)(o.Suspense,{fallback:null,children:[(0,r.jsx)(n.B,{intensity:.5,environment:"city",shadows:{type:"contact",opacity:.4,blur:2},adjustCamera:1.5,children:(0,r.jsx)(x,{url:j})}),(0,r.jsx)(i.N,{enableDamping:!0,dampingFactor:.05,minDistance:2,maxDistance:10,minPolarAngle:0,maxPolarAngle:Math.PI})]})})}),!b&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"hidden sm:block absolute bottom-4 left-4 bg-black/70 text-white text-xs px-3 py-2 rounded-lg backdrop-blur-sm",children:(0,r.jsxs)("div",{className:"space-y-1",children:[(0,r.jsx)("div",{children:"\uD83D\uDDB1ï¸ Left Click + Drag: Rotate"}),(0,r.jsx)("div",{children:"\uD83D\uDDB1ï¸ Right Click + Drag: Pan"}),(0,r.jsx)("div",{children:"\uD83D\uDD0D Scroll: Zoom"})]})}),(0,r.jsx)("div",{className:"sm:hidden absolute bottom-2 left-2 bg-black/70 text-white text-xs px-2 py-1.5 rounded-lg backdrop-blur-sm",children:(0,r.jsx)("div",{children:"\uD83D\uDC46 Touch + Drag to rotate"})}),(0,r.jsx)("div",{className:"absolute top-2 right-2 sm:top-4 sm:right-4 bg-white/90 backdrop-blur-sm px-2 py-1.5 sm:px-3 sm:py-2 rounded-lg shadow-sm border border-gray-200",children:(0,r.jsx)("p",{className:"text-xs text-gray-600",children:"3D Model Ready"})})]})]})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.