{"compiledCode":"\"use strict\";Object.defineProperty(exports, \"__esModule\", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _three = require('three'); var r = _interopRequireWildcard(_three);var _react = require('react'); var _react2 = _interopRequireDefault(_react);function fn({content:pe}){const Se=_react2.default.useRef(null);return _react2.default.useEffect(()=>{const Kt=Se.current,fe=[],oe=new AbortController,Ge=(e,t,s)=>globalThis.addEventListener(e,t,{...typeof s==\"object\"?s:{},signal:oe.signal}),Ot=new Proxy(globalThis.window,{get(e,t){if(t===\"addEventListener\")return Ge;const s=Reflect.get(e,t);return typeof s==\"function\"?s.bind(e):s}}),K=new Proxy(globalThis.document,{get(e,t){if(t===\"querySelector\")return d=>Kt.querySelector(d);if(t===\"querySelectorAll\")return d=>Kt.querySelectorAll(d);if(t===\"addEventListener\")return(d,g,S)=>Kt.addEventListener(d,g,{...typeof S==\"object\"?S:{},signal:oe.signal});const s=Reflect.get(e,t);return typeof s==\"function\"?s.bind(e):s}}),Ae=e=>class extends e{constructor(...t){super(...t),fe.push(()=>this.disconnect())}},ze=Ae(globalThis.ResizeObserver),Ce=Ae(globalThis.IntersectionObserver),me=e=>{const t=globalThis.matchMedia(e),s=t.addEventListener.bind(t);return t.addEventListener=(d,g,S)=>s(d,g,{...typeof S==\"object\"?S:{},signal:oe.signal}),t},se=new Set,ge=e=>{const t=globalThis.requestAnimationFrame(s=>{se.delete(t),e(s)});return se.add(t),t},bt=e=>{se.delete(e),globalThis.cancelAnimationFrame(e)},wt=[{id:\"body\",label:\"Original body\",state:\"Preserved\",title:\"The original body.\",text:\"The glassmaker\\u2019s color, form and detail stay. We take out the old wiring and fittings so the body can be used again.\"},{id:\"hardware\",label:\"Brass fittings\",state:\"Renewed\",title:\"Solid-brass fittings.\",text:\"A new base, threaded pipe and fittings in solid brass hold the lamp together. The original glass or ceramic body stays.\"},{id:\"socket\",label:\"Socket casing\",state:\"Renewed \\xB7 Solid brass\",title:\"The solid-brass casing.\",text:\"A solid-brass shell surrounds the new electrical insert. It\\u2019s one of the new parts, separate from the original glass or ceramic body.\"},{id:\"insert\",label:\"Electrical insert\",state:\"Renewed\",title:\"The electrical insert.\",text:\"The socket insert and its contacts are replaced along with the wiring.\"},{id:\"wiring\",label:\"Cord & switch\",state:\"Renewed\",title:\"New wiring, end to end.\",text:\"The internal wiring, cord and switching are renewed. Each lamp\\u2019s listing describes the work carried out.\"},{id:\"support\",label:\"Harp & finial\",state:\"Renewed \\xB7 Solid brass\",title:\"Harp & finial.\",text:\"These brass fittings hold the shade. We choose their size for each lamp.\"},{id:\"shade\",label:\"Shade & bulb\",state:\"Illustrated\",title:\"The shade & bulb.\",text:\"Shown here so you can see how the lamp goes together. Each listing says whether a shade and bulb are included.\"}],Fe=Object.freeze({body:\"body\",base:\"hardware\",cap:\"hardware\",stem:\"hardware\",washers:\"hardware\",socket:\"socket\",insert:\"insert\",wiring:\"wiring\",harp:\"support\",finial:\"support\",shade:\"shade\",bulb:\"shade\"});function re(e,t=\"art-glass\"){const s=wt.find(g=>g.id===e);if(!s)throw new RangeError(\"Unknown lamp component.\");if(e!==\"body\")return s;const d={\"art-glass\":s.text,\"blown-glass\":\"The blown-glass form and surface stay. We take out the old wiring and fittings and rebuild the lamp around the original body.\",ceramic:\"The potter\\u2019s form and glaze stay. New brass fittings and wiring let the original body be used every day.\",\"oil-lamp\":\"The glass font, brass collar and cast foot stay. We convert the lamp for electric use, so a nineteenth-century form can light a room again.\"};if(!Object.hasOwn(d,t))throw new RangeError(\"Unknown illustrated lamp body.\");return{...s,text:d[t]}}function be(e,t){const s=wt.findIndex(d=>d.id===e);if(s<0)throw new RangeError(\"Unknown lamp component.\");if(t!==-1&&t!==1)throw new RangeError(\"Component direction must be -1 or 1.\");return _nullishCoalesce(wt[s+t], () => (null))}const we=[0,.5,1],We=2400,ye=700,Te=.78,Ft=e=>Math.min(1,Math.max(0,e)),Ue=e=>e*e*e*(e*(e*6-15)+10),X=(e,t,s)=>Ft(Ue(Ft((e-t)/(s-t)))),tt=(e,t,s)=>e+(t-e)*s;function Wt(e){if(!Number.isFinite(e))throw new TypeError(\"Restoration progress must be finite.\");const t=Ft(e);return{progress:t,lift:X(t,0,.28),separation:X(t,.2,.5),interior:X(t,.5,1),fittings:X(t,.5,.8),electrics:X(t,.68,1),framing:X(t,0,.28),step:t<.2?0:t<.65?1:2}}const $e={body:[-.72,.72,.21,2.06],base:[-.67,.67,0,.21],stem:[-.04,.04,.24,2.22],cap:[-.23,.23,2.03,2.16],washers:[-.12,.12,2.19,2.28],socket:[-.14,.2,2.24,2.56],insert:[-.11,.11,2.12,2.5],wiring:[-.03,1.08,.04,2.27],harp:[-.39,.39,2.16,3.78],finial:[-.08,.08,3.78,4.08],shade:[-1.19,1.19,2.8,4.06],bulb:[-.22,.22,2.49,3.14]},Le=[[.72,.72],[.67,.67],[.2,.2],[.39,.39],[1.19,1.19]];function Ye(e){const t=.24+.42*e;let d=-(Le.reduce((g,[S,h])=>g+S+h,0)+t*4)/2;return Le.map(([g,S])=>{const h=d+g;return d=h+S+t,h})}const Xe=1.05,_e=1.4,qe=2.4,Ve=2.1;function Qt(e,t){const[s,d,g,S,h]=Ye(t),i=X(e,0,.1),R=X(e,0,.12),x=X(e,.06,.2),W=X(e,.16,.26),_=X(e,.06,.1),D=X(e,.09,.15),M=X(e,.13,.24),z=X(e,.12,.2),N=X(e,.19,.28),Yt=X(e,.26,.36),it=X(e,.29,.42),St=X(e,.38,.5),lt=X(e,.42,.5),{fittings:H,electrics:et}=Wt(e),nt=qe*Yt;return{body:[s*St,tt(Ve*it,-.21,lt),0],base:[d*H,0,0],stem:[d*H,.3*H,0],cap:[d*H,tt(nt,.75,H),0],washers:[d*H,tt(nt,1.05,H),0],socket:[g*et,tt(nt,.9,et),0],insert:[g*et,tt(nt,0,et),0],wiring:[g*et,0,0],harp:[S*N,tt(.5*z,.55,N),0],finial:[S*x,tt(_e*i,.75,x*N),0],shade:[h*x,tt(Xe*R,.85,W),0],bulb:[h*M,.15*_+.1*M,.9*D]}}function ie(e){let t=1/0,s=-1/0,d=1/0,g=-1/0;for(const[S,[h,i,R]]of Object.entries(e)){const[x,W,_,D]=$e[S],M=Math.abs(R)*.25;t=Math.min(t,h+x-M),s=Math.max(s,h+W+M),d=Math.min(d,i+_),g=Math.max(g,i+D)}return{left:t,right:s,bottom:d,top:g}}const Re=1.1;function ke(e,t){return{centerX:(e.left+e.right)/2,centerY:(e.bottom+e.top)/2,halfHeight:Math.max(e.top-e.bottom,(e.right-e.left)/t)*.5*Re}}const Ut=400,Jt=new Map;function Ze(e){const t=e.toFixed(4);if(Jt.has(t))return Jt.get(t);const s=Ft((e-.7)/.9),d=ke(ie(Qt(0,s)),e);let g=ie(Qt(0,s));for(let R=0;R<=Ut;R++){const x=R/Ut,W=ie(Qt(x,s));g={left:Math.min(g.left,W.left),right:Math.max(g.right,W.right),bottom:Math.min(g.bottom,W.bottom),top:Math.max(g.top,W.top)}}const S=ke(g,e),h=[];let i=d.halfHeight;for(let R=0;R<=Ut;R++){const x=R/Ut,W=Wt(x).framing,_=X(x,0,.1),D=tt(d.centerX,S.centerX,_),M=tt(d.centerY,S.centerY,_),z=ie(Qt(x,s)),N=Math.max(2*Math.max(z.top-M,M-z.bottom),2*Math.max(z.right-D,D-z.left)/e)*.5*Re;i=Math.max(i,tt(d.halfHeight,S.halfHeight,W),N),h.push({centerX:D,centerY:M,halfHeight:i})}return Jt.size>32&&Jt.clear(),Jt.set(t,h),h}function je(e,t){if(!Number.isFinite(t)||t<=0)throw new RangeError(\"Lamp viewport aspect must be positive.\");if(!Number.isFinite(e))throw new TypeError(\"Restoration progress must be finite.\");const s=Ft(e),d=Ft((t-.7)/.9),g=Ze(t),S=s*Ut,h=Math.min(Ut-1,Math.floor(S)),i=S-h,R=g[h],x=g[h+1];return{positions:Qt(s,d),centerX:tt(R.centerX,x.centerX,i),centerY:tt(R.centerY,x.centerY,i),halfHeight:tt(R.halfHeight,x.halfHeight,i)}}class Ke extends _three.Scene{constructor(){super();const t=new _three.BoxGeometry;t.deleteAttribute(\"uv\");const s=new (0, _three.MeshStandardMaterial)({side:_three.BackSide}),d=new _three.MeshStandardMaterial,g=new (0, _three.PointLight)(16777215,900,28,2);g.position.set(.418,16.199,.3),this.add(g);const S=new (0, _three.Mesh)(t,s);S.position.set(-.757,13.219,.717),S.scale.set(31.713,28.305,28.591),this.add(S);const h=new (0, _three.InstancedMesh)(t,d,6),i=new _three.Object3D;i.position.set(-10.906,2.009,1.846),i.rotation.set(0,-.195,0),i.scale.set(2.328,7.905,4.651),i.updateMatrix(),h.setMatrixAt(0,i.matrix),i.position.set(-5.607,-.754,-.758),i.rotation.set(0,.994,0),i.scale.set(1.97,1.534,3.955),i.updateMatrix(),h.setMatrixAt(1,i.matrix),i.position.set(6.167,.857,7.803),i.rotation.set(0,.561,0),i.scale.set(3.927,6.285,3.687),i.updateMatrix(),h.setMatrixAt(2,i.matrix),i.position.set(-2.017,.018,6.124),i.rotation.set(0,.333,0),i.scale.set(2.002,4.566,2.064),i.updateMatrix(),h.setMatrixAt(3,i.matrix),i.position.set(2.291,-.756,-2.621),i.rotation.set(0,-.286,0),i.scale.set(1.546,1.552,1.496),i.updateMatrix(),h.setMatrixAt(4,i.matrix),i.position.set(-2.193,-.369,-5.547),i.rotation.set(0,.516,0),i.scale.set(3.875,3.487,2.986),i.updateMatrix(),h.setMatrixAt(5,i.matrix),this.add(h);const R=new (0, _three.Mesh)(t,$t(50));R.position.set(-16.116,14.37,8.208),R.scale.set(.1,2.428,2.739),this.add(R);const x=new (0, _three.Mesh)(t,$t(50));x.position.set(-16.109,18.021,-8.207),x.scale.set(.1,2.425,2.751),this.add(x);const W=new (0, _three.Mesh)(t,$t(17));W.position.set(14.904,12.198,-1.832),W.scale.set(.15,4.265,6.331),this.add(W);const _=new (0, _three.Mesh)(t,$t(43));_.position.set(-.462,8.89,14.52),_.scale.set(4.38,5.441,.088),this.add(_);const D=new (0, _three.Mesh)(t,$t(20));D.position.set(3.235,11.486,-12.541),D.scale.set(2.5,2,.1),this.add(D);const M=new (0, _three.Mesh)(t,$t(100));M.position.set(0,20,0),M.scale.set(1,.1,1),this.add(M)}dispose(){const t=new Set;this.traverse(s=>{s.isMesh&&(t.add(s.geometry),t.add(s.material))});for(const s of t)s.dispose()}}function $t(e){return new (0, _three.MeshLambertMaterial)({color:0,emissive:16777215,emissiveIntensity:e})}const Pe=15724520,Qe=272,Je=new Set([\"body\",\"base\",\"wiring\"]);function tn(e,t){const s=new r.WebGLRenderer({antialias:!0,alpha:!1,powerPreference:\"low-power\"});s.setPixelRatio(Math.min(Ot.devicePixelRatio||1,1.5)),s.setClearColor(Pe),s.toneMapping=r.ACESFilmicToneMapping,s.toneMappingExposure=1,s.outputColorSpace=r.SRGBColorSpace,s.shadowMap.enabled=!0,s.shadowMap.type=r.PCFSoftShadowMap;const d=new r.Scene;d.background=new r.Color(Pe);let g;function S(){const o=new Ke,n=new r.PMREMGenerator(s);try{const l=n.fromScene(o,.035);_optionalChain([g, 'optionalAccess', _2 => _2.dispose, 'call', _3 => _3()]),g=l,d.environment=g.texture,d.environmentIntensity=.72}finally{o.dispose(),n.dispose()}}S();const h=new r.OrthographicCamera(-3,3,3,-3,.1,40);h.position.set(0,3.6,12),h.lookAt(0,2.45,0);const i=new r.Group;i.rotation.y=-.22,d.add(i),d.add(new r.HemisphereLight(16776694,11774868,.4));const R=new r.DirectionalLight(16774888,2.2);R.position.set(-3.4,10,5.6),R.target.position.set(0,1.5,0),d.add(R,R.target);const x=new r.DirectionalLight(16777215,.15);x.position.set(-.5,14,1.4),x.target.position.set(0,0,0),x.castShadow=!0,x.shadow.mapSize.set(1024,1024),Object.assign(x.shadow.camera,{left:-7,right:7,top:7,bottom:-7,near:1,far:30}),x.shadow.bias=-4e-4,x.shadow.normalBias=.02,d.add(x,x.target);const W=new r.DirectionalLight(16777215,1.1);W.position.set(5,4,-4),d.add(W);const _=new r.Mesh(new r.PlaneGeometry(40,40),new r.ShadowMaterial({color:2305350,opacity:.2}));_.rotation.x=-Math.PI/2,_.receiveShadow=!0,d.add(_);const D=[];function M(o,n=!1){const l=n?new r.MeshPhysicalMaterial(o):new r.MeshStandardMaterial(o);return D.push(l),l}const z=M({color:13612167,metalness:1,roughness:.27}),N=M({color:13020548,metalness:1,roughness:.36}),Yt=M({color:15855592,roughness:.18,clearcoat:.6},!0),it=M({color:2368031,roughness:.62}),St=M({color:2828067,roughness:.78}),lt=M({color:11561538,metalness:1,roughness:.3}),H=M({color:11843763,metalness:1,roughness:.3});function et(){const n=K.createElement(\"canvas\");n.width=n.height=256;const l=n.getContext(\"2d\");l.fillStyle=\"#e8e1cf\",l.fillRect(0,0,256,256);let p=7;const b=()=>(p=p*16807%2147483647)/2147483647;for(let w=0;w<256;w+=2)l.fillStyle=`rgba(120, 104, 74, ${.04+b()*.07})`,l.fillRect(0,w,256,1),l.fillStyle=`rgba(255, 252, 240, ${.05+b()*.08})`,l.fillRect(w,0,1,256);const f=new r.CanvasTexture(n);return f.colorSpace=r.SRGBColorSpace,f.wrapS=f.wrapT=r.RepeatWrapping,f.repeat.set(10,4),f.anisotropy=4,f}const nt=et(),Rt=M({color:16777215,map:nt,bumpMap:nt,bumpScale:.6,roughness:.92,sheen:.5,sheenRoughness:.75,sheenColor:new r.Color(16051936),envMapIntensity:.4,side:r.DoubleSide},!0),xe=M({color:16250350,roughness:.42,clearcoat:.4},!0),U=M({color:16777215,metalness:0,roughness:.04,transmission:1,thickness:.16,ior:1.5,attenuationColor:new r.Color(10774044),attenuationDistance:.44,specularIntensity:1,clearcoat:.3,side:r.DoubleSide},!0),Xt=M({roughness:.22,metalness:0,vertexColors:!0,clearcoat:.7,clearcoatRoughness:.12},!0),_t=M({color:9071164,metalness:1,roughness:.56}),I={};function $(o){const n=new r.Group;return n.userData.component=Fe[o],i.add(n),I[o]=n,n}function Z(o,n,l,p=0,b=0,f=0){const w=new r.Mesh(o,n);return w.position.set(p,b,f),w.castShadow=!0,l.add(w),w}function Q(o,n,l,p,b=z,f=0,w=0,B=n){return Z(new r.CylinderGeometry(B,n,l,48),b,o,f,p,w)}function pt(o,n,l,p,b=z,f=0,w=0){const B=Z(new r.TorusGeometry(n,l,10,72),b,o,f,p,w);return B.rotation.x=Math.PI/2,B}function A(o,n,l,p,b=64,f=10){return Z(new r.TubeGeometry(new r.CatmullRomCurve3(n.map(w=>new r.Vector3(...w))),b,l,f,!1),p,o)}function k(o,n,l,p=0,b=!0){const f=n.map(B=>new r.Vector2(...B)),w=new r.LatheGeometry(b?new r.SplineCurve(f).getPoints(80):f,b?72:56);if(p){const B=w.attributes.position;for(let st=0;st<B.count;st++){const rt=B.getX(st),q=B.getZ(st),E=B.getY(st),T=Math.atan2(q,rt),F=1+.055*Math.cos(T*p)*Math.sin(Math.PI*Math.min(1,Math.max(0,(E-.15)/1.85)));B.setXYZ(st,rt*F,E,q*F)}w.computeVertexNormals()}return Z(w,l,o)}const G=$(\"base\");k(G,[[.04,0],[.55,0],[.64,.025],[.67,.08],[.655,.15],[.6,.2],[.04,.21]],N),pt(G,.61,.014,.19,z),pt(G,.66,.01,.06,z);const C=$(\"body\");let O;const At=$(\"cap\");k(At,[[.025,2.03],[.2,2.03],[.23,2.05],[.23,2.09],[.16,2.14],[.025,2.16]],z);const J=$(\"stem\");k(J,[[.034,.24],[.034,2.22],[.024,2.22],[.024,.24],[.034,.24]],z,0,!1);const Y=88,Dt=Y*12,te=Array.from({length:Dt+1},(o,n)=>{const l=n/Dt,p=l*Y*Math.PI*2;return[Math.sin(p)*.035,.25+l*1.96,Math.cos(p)*.035]});A(J,te,.0022,N,Dt,4);const at=$(\"washers\");Q(at,.12,.028,2.19),pt(at,.085,.012,2.217);const y=Z(new r.CylinderGeometry(.065,.065,.055,6),N,at,0,2.25);y.rotation.y=.3;const yt=$(\"socket\");k(yt,[[.112,2.24],[.128,2.24],[.136,2.28],[.136,2.48],[.124,2.56],[.112,2.56],[.112,2.24]],z);for(let o=0;o<4;o++)pt(yt,.136,.004,2.32+o*.037,N);Q(yt,.035,.04,2.4,it,.18);const le=Q(yt,.022,.08,2.4,it,.145);le.rotation.z=Math.PI/2;const j=$(\"insert\"),Ht=[[.012,2.3],[.105,2.3],[.105,2.5],[.092,2.5],[.092,2.34],[.012,2.34],[.012,2.3]],Bt=[[.084,2.34],[.091,2.34],[.091,2.49],[.084,2.49],[.084,2.34]],Ct=k(j,Ht,Yt,0,!1),ct=k(j,Bt,N,0,!1),xt=Ct.geometry,ee=ct.geometry,Nt=o=>new r.LatheGeometry(o.map(([n,l])=>new r.Vector2(n,l)),48,Math.PI/3,4*Math.PI/3),ft=Nt(Ht),qt=Nt(Bt),dt=6,kt=dt*32,ce=Array.from({length:kt+1},(o,n)=>{const l=n/kt,p=l*dt*Math.PI*2;return[Math.sin(p)*.085,2.355+l*.12,Math.cos(p)*.085]}),Me=A(j,ce,.003,N,kt),Vt=new r.Group;j.add(Vt);for(let o=0;o<dt;o++){const n=Array.from({length:49},(l,p)=>{const b=Math.PI/3+p/48*(4*Math.PI/3);return[Math.sin(b)*.085,2.355+(o+b/(2*Math.PI))/dt*.12,Math.cos(b)*.085]});A(Vt,n,.003,N,48)}Q(j,.032,.014,2.35,lt);for(const o of[-.06,.06]){Q(j,.028,.025,2.292,lt,o),Q(j,.018,.04,2.3,N,o);const n=Z(new r.BoxGeometry(.026,.004,.004),it,j,o,2.322,0);n.rotation.y=.2,A(j,[[o,2.28,0],[o*.75,2.22,0],[.018+o*.2,2.16,.005],[.018+o*.12,2.12,.008]],.011,o<0?it:Yt,24)}const ne=$(\"bulb\");k(ne,[[.01,2.49],[.07,2.49],[.07,2.6],[.09,2.65],[.19,2.78],[.22,2.91],[.19,3.04],[.09,3.12],[.005,3.14]],xe);for(let o=0;o<5;o++)pt(ne,.07,.005,2.5+o*.02,H);const Mt=$(\"harp\");A(Mt,[[-.14,2.18,0],[-.29,2.3,0],[-.37,2.7,0],[-.32,3.33,0],[-.13,3.71,0],[0,3.76,0],[.13,3.71,0],[.32,3.33,0],[.37,2.7,0],[.29,2.3,0],[.14,2.18,0]],.016,z,96),pt(Mt,.14,.012,2.18,z);const Pt=$(\"shade\");Z(new r.CylinderGeometry(.95,1.17,1.22,128,1,!0),Rt,Pt,0,3.43),pt(Pt,.95,.012,4.04,N),pt(Pt,1.17,.012,2.82,N);for(let o=0;o<3;o++){const n=o*Math.PI*2/3;A(Pt,[[0,3.76,0],[.4*Math.cos(n),3.86,.4*Math.sin(n)],[.95*Math.cos(n),4.02,.95*Math.sin(n)]],.008,N)}pt(Pt,.05,.01,3.76,N);const de=$(\"finial\");k(de,[[.01,3.78],[.06,3.78],[.08,3.83],[.05,3.9],[.055,3.97],[.03,4.03],[.005,4.08]],z);const Tt=$(\"wiring\");A(Tt,[[.018,2.12,.008],[.018,1.2,.008],[.018,.16,.008],[.06,.07,.03],[.3,.04,.14],[.6,.04,.3],[.9,.045,.46]],.017,St,160,12);const ue=Z(new r.CapsuleGeometry(.05,.12,6,16),it,Tt,.6,.05,.3);ue.rotation.set(0,-.49,Math.PI/2);const ae=Z(new r.BoxGeometry(.15,.08,.11),it,Tt,.98,.05,.5);ae.rotation.y=-.49;for(const o of[-.03,.03]){const n=Z(new r.BoxGeometry(.11,.045,.012),H,Tt,1.08+o*Math.sin(.49),.05,.55+o*Math.cos(.49));n.rotation.y=-.49}const a=new r.LineDashedMaterial({color:9343883,dashSize:.05,gapSize:.045,transparent:!0,opacity:0,depthWrite:!1});D.push(a);const c=[\"fittings\",\"electrics\",\"support\"].map(()=>{const o=new r.BufferGeometry().setFromPoints([new r.Vector3,new r.Vector3(0,1,0)]),n=new r.Line(o,a.clone());return D.push(n.material),n.renderOrder=-1,i.add(n),n});function m(o,n,l,p,b){const f=o.geometry.attributes.position;f.setXYZ(0,n,l,0),f.setXYZ(1,n,p,0),f.needsUpdate=!0,o.geometry.computeBoundingSphere(),o.computeLineDistances(),o.material.opacity=b,o.visible=b>.01&&p-l>.06}let v=[];function u(o){const n=new r.SplineCurve(o.map(q=>new r.Vector2(...q))).getPoints(120),l=q=>{for(let E=1;E<n.length;E++){const T=n[E-1],F=n[E];if((T.y-q)*(F.y-q)<=0&&T.y!==F.y)return T.x+(q-T.y)/(F.y-T.y)*(F.x-T.x)}return 0},p=Math.atan2(Math.cos(.22),Math.sin(.22)),b=12,f=.15,w=new r.Matrix4,B=[];let st=0;for(let q=.4;q<=1.62;q+=f*.87,st++){const E=l(q)-.022;if(E<.2)continue;const T=Math.round(Math.PI*2*E/f);for(let F=0;F<T;F++){const ht=(F+st%2*.5)/T*Math.PI*2;if(Math.abs(Math.atan2(Math.sin(ht-p),Math.cos(ht-p)))>1.95)continue;const ut=1+.055*Math.cos(ht*b)*Math.sin(Math.PI*Math.min(1,Math.max(0,(q-.15)/1.85)));B.push([Math.cos(ht)*E*ut,q,Math.sin(ht)*E*ut])}}const rt=new r.InstancedMesh(new r.SphereGeometry(.021,16,12),M({color:14674674,metalness:1,roughness:.18,envMapIntensity:1.2},!0),B.length);return B.forEach(([q,E,T],F)=>{w.makeScale(1,1.1,1).setPosition(q,E,T),rt.setMatrixAt(F,w)}),rt.castShadow=!1,C.add(rt),rt}function L(o){for(const l of[O,...v].filter(Boolean)){C.remove(l),l.geometry.dispose(),l.material.dispose();const p=D.indexOf(l.material);p>=0&&D.splice(p,1)}v=[];const n=o===\"art-glass\";if(o===\"oil-lamp\"){const l=k(C,[[.02,.21],[.5,.21],[.53,.25],[.47,.31],[.32,.37],[.21,.48],[.15,.66],[.14,.76],[.19,.81],[.24,.86],[.02,.87]],_t),p=[[.06,.86],[.3,.9],[.5,1.04],[.61,1.28],[.58,1.52],[.43,1.73],[.24,1.87],[.17,1.94],[.17,1.99],[.13,1.99]],b=p.slice(0,-2).reverse().map(([w,B])=>[Math.max(.012,w-.04),B+.03]);O=k(C,[...p,...b],U,0);const f=k(C,[[.16,1.95],[.205,1.96],[.215,2.01],[.19,2.06],[.15,2.06]],_t);pt(C,.23,.012,.85,_t),v=[l,f,C.children.at(-1)],U.color.set(16777215),U.thickness=.16,U.attenuationColor.set(8790062),U.attenuationDistance=.36,U.roughness=.04}else if(o===\"ceramic\"){O=k(C,[[.02,.21],[.42,.21],[.44,.28],[.44,1.9],[.4,2.03],[.19,2.05],[.16,2.08]],Xt);const l=O.geometry.attributes.position,p=[],b=new r.Color(11568007),f=new r.Color(7839143);for(let w=0;w<l.count;w++){const B=l.getY(w),st=Math.sin(w*17.2)*Math.sin(w*5.7)*.024,rt=b.clone().lerp(f,r.MathUtils.smoothstep(B,.35,1.85));rt.offsetHSL(0,0,st),p.push(rt.r,rt.g,rt.b)}O.geometry.setAttribute(\"color\",new r.Float32BufferAttribute(p,3))}else{const l=n?[[.02,.21],[.28,.21],[.45,.26],[.66,.5],[.7,.86],[.65,1.18],[.5,1.47],[.25,1.78],[.18,1.97],[.18,2.06],[.14,2.06]]:[[.02,.21],[.38,.21],[.56,.33],[.67,.63],[.7,.94],[.66,1.25],[.5,1.5],[.24,1.72],[.16,1.94],[.16,2.06],[.12,2.06]],p=l.slice(0,-2).reverse().map(([b,f])=>[Math.max(.012,b-.045),f+.035]);O=k(C,[...l,...p],U,n?12:0),n?(U.color.set(16777215),U.thickness=.16,U.attenuationColor.set(1927848),U.attenuationDistance=.46,U.roughness=.03,v=[u(l)]):(U.color.set(16777215),U.thickness=.16,U.attenuationColor.set(10774044),U.attenuationDistance=.44,U.roughness=.05)}C.userData.opacity!==void 0&&mt(C)}function mt(o){o.userData.opacity=1,o.traverse(n=>{n.isMesh&&(n.material=n.material.clone(),n.userData.originalTransparent=n.material.transparent,n.userData.originalOpacity=n.material.opacity,n.userData.originalDepthWrite=n.material.depthWrite,D.push(n.material))})}L(\"art-glass\"),Object.values(I).forEach(mt);let gt=!1,vt=1,ot=1,V=null,Et=!1,P=null,Zt=1.15;const Oe=new r.Raycaster,Lt=new r.Box3,De=new r.Box3,It=new r.Vector3,ve=new r.Vector3,jt=new r.Vector3,nn={body:[\"body\"],hardware:[\"stem\"],socket:[\"socket\"],insert:[\"insert\"],wiring:[\"wiring\"],support:[\"harp\",\"finial\"],shade:[\"shade\",\"bulb\"]};function an(o){if(o!==null&&!wt.some(n=>n.id===o))throw new RangeError(\"Unknown lamp component.\");P={opacities:Object.fromEntries(Object.entries(I).map(([n,l])=>[n,l.userData.opacity])),guides:c.map(n=>n.material.opacity),x:h.position.x,y:h.position.y-Zt,elevation:Zt,height:h.top,positions:Object.fromEntries(Object.entries(I).map(([n,l])=>[n,l.position.clone()]))},V=o}function on({progress:o=0,focus:n=1}){if(gt)return;const l=je(o,ot),p=Wt(o);V===\"insert\"?Et=!0:n>=.9&&(Et=!1),Ct.geometry=Et?ft:xt,ct.geometry=Et?qt:ee,Me.visible=!Et,Vt.visible=Et;for(const[E,T]of Object.entries(I))T.position.set(...l.positions[E]),T.visible=!0;let b=l.halfHeight,f=l.centerX,w=l.centerY;if(i.updateMatrixWorld(!0),V){Lt.makeEmpty();for(const T of Object.values(I))T.userData.component===V&&Lt.union(De.setFromObject(T));Lt.getCenter(It),Lt.getSize(ve),f=It.x,w=It.y;const E=e.clientWidth>=1104?Math.min(vt,1.1):vt;b=Math.max(ve.y*.62,ve.x/E*.62,.32)}let B=V===\"socket\"||V===\"insert\"?3.4:1.15;P&&(B=r.MathUtils.lerp(P.elevation,B,n),f=r.MathUtils.lerp(P.x,f,n),w=r.MathUtils.lerp(P.y,w,n),b=r.MathUtils.lerp(P.height,b,n));const st=V?Math.min(1,n*3):0;for(const[E,T]of Object.entries(I)){const F=!V||T.userData.component===V?1:0,ht=F===0?st:n,Gt=P?r.MathUtils.lerp(P.opacities[E],F,ht):F;T.userData.opacity=Gt,T.visible=Gt>.005,T.traverse(ut=>{if(!ut.isMesh)return;ut.material.opacity=ut.userData.originalOpacity*Gt;const Be=ut.userData.originalTransparent||Gt<.999;ut.material.transparent!==Be&&(ut.material.transparent=Be,ut.material.needsUpdate=!0),ut.material.depthWrite=Gt>.99&&ut.userData.originalDepthWrite,ut.castShadow=Je.has(E)&&Gt>.5}),P&&T.position.lerpVectors(P.positions[E],T.position,n)}const rt=r.MathUtils.clamp((o-.24)/.06,0,1),q=[p.fittings,p.electrics,rt].map((E,T)=>{const F=.9*E*(V?0:1);return P?r.MathUtils.lerp(P.guides[T],F,V?st:n):F});return m(c[0],I.stem.position.x,I.base.position.y+.21,I.washers.position.y+2.29,q[0]),m(c[1],I.socket.position.x,I.insert.position.y+2.5,I.socket.position.y+2.24,q[1]),m(c[2],I.harp.position.x,I.harp.position.y+3.77,I.finial.position.y+3.78,q[2]),i.updateMatrixWorld(!0),h.left=-b*vt,h.right=b*vt,h.top=b,h.bottom=-b,Zt=B,h.position.set(f,w+Zt,12),h.lookAt(f,w,0),h.updateProjectionMatrix(),s.render(d,h),Object.fromEntries(wt.map(({id:E})=>{const T=nn[E].map(ht=>I[ht]);if(!T.some(ht=>ht.visible))return[E,null];if(E===\"wiring\")ue.getWorldPosition(jt);else{Lt.makeEmpty();for(const ht of T)Lt.union(De.setFromObject(ht));Lt.getCenter(It),E===\"shade\"?jt.set(It.x,Lt.max.y,It.z):jt.set(Lt.max.x,It.y,It.z)}jt.project(h);const F=E===\"shade\"||E===\"wiring\"?0:18;return[E,{x:(jt.x+1)*e.clientWidth/2+F,y:(1-jt.y)*e.clientHeight/2-(E===\"shade\"?18:0)}]}))}function sn(o,n){if(gt)return null;const l=e.getBoundingClientRect();Oe.setFromCamera(new r.Vector2((o-l.left)/l.width*2-1,-(n-l.top)/l.height*2+1),h);const p=[];i.traverseVisible(w=>{w.isMesh&&p.push(w)});const b=Oe.intersectObjects(p,!1)[0];if(!b)return null;let f=b.object;for(;f&&!f.userData.component;)f=f.parent;return _nullishCoalesce(_optionalChain([f, 'optionalAccess', _4 => _4.userData, 'access', _5 => _5.component]), () => (null))}function He(){const o=e.clientWidth,n=e.clientHeight;!o||!n||(vt=o/n,ot=o>=1104?Math.max(.6,(o-2*Qe)/n):vt,s.setSize(o,n,!1))}return s.domElement.addEventListener(\"webglcontextlost\",o=>{o.preventDefault(),gt=!0,t(!1)}),s.domElement.addEventListener(\"webglcontextrestored\",()=>{try{S(),gt=!1,t(!0)}catch (e2){gt=!0,t(!1)}}),e.append(s.domElement),He(),{draw:on,resize:He,setBody:L,inspect:an,hitTest:sn,dispose(){const o=new Set([xt,ee,ft,qt,_.geometry]);i.traverse(n=>{n.geometry&&o.add(n.geometry)}),o.forEach(n=>n.dispose()),D.forEach(n=>n.dispose()),_.material.dispose(),nt.dispose(),g.dispose(),s.dispose(),s.domElement.remove()}}}const Ie=[\"The object\",\"The body\",\"The interior\"];function en(e){const t=a=>e.querySelector(a),s=t(\"[data-lamp-canvas]\"),d=t(\"[data-lamp-stage]\"),g=t(\"[data-study-disclosure]\"),S=t(\"[data-lamp-loading]\"),h=g.textContent,i=[...e.querySelectorAll(\"[data-restoration-note]\")],R=[...e.querySelectorAll(\"[data-restoration-step]\")],x=t(\"#restoration-progress\"),W=t(\"#restoration-status\"),_=t(\"[data-restoration-back]\"),D=t(\"[data-restoration-next]\"),M=t(\"[data-part-actions]\"),z=t(\"[data-part-previous]\"),N=t(\"[data-part-next]\"),Yt=t(\"[data-part-count]\"),it=t(\"[data-part-reader]\"),St=t(\"[data-part-view-note]\"),lt=t(\"[data-part-close]\"),H=t(\"[data-lamp-parts]\"),et=t(\"[data-part-title]\"),nt=t(\"[data-part-state]\"),Rt=t(\"[data-part-copy]\"),xe=t(\"[data-part-preview]\"),U={title:et.innerHTML,state:nt.textContent,text:Rt.textContent},Xt=me(\"(prefers-reduced-motion: reduce)\"),_t=me(\"(min-width: 1200px) and (min-height: 760px)\"),I=me(\"(max-width: 767px)\"),$=t(\".restoration-visual\"),Z=t(\"[data-restoration-steps]\"),Q=t(\"[data-restoration-controls]\"),pt=t(\"[data-restoration-guidance]\");let A,k=0,G=0,C=0,O=-1,At=0,J=!1,Y=!1,Dt=!1,te=!1,at=1,y=null,yt=null,le=null,j=\"art-glass\",Ht=null;const Bt=new Map,Ct=new Map;wt.forEach((a,c)=>{const m=K.createElement(\"button\");m.type=\"button\",m.dataset.component=a.id,m.setAttribute(\"aria-controls\",\"lamp-part-detail\"),m.setAttribute(\"aria-pressed\",\"false\");const v=K.createElement(\"span\");v.textContent=String(c+1).padStart(2,\"0\"),v.setAttribute(\"aria-hidden\",\"true\"),m.append(v,K.createTextNode(` ${a.label}`)),t(\"[data-part-index]\").append(m),Bt.set(a.id,m);const u=K.createElement(\"button\");u.type=\"button\",u.className=\"part-hotspot\",u.textContent=String(c+1),u.setAttribute(\"aria-label\",`Inspect ${a.label.toLowerCase()}`),u.setAttribute(\"aria-controls\",\"lamp-part-detail\"),u.setAttribute(\"aria-pressed\",\"false\"),u.tabIndex=-1,u.dataset.title=a.label,u.hidden=!0,t(\"[data-lamp-hotspots]\").append(u),Ct.set(a.id,u);for(const L of[m,u])L.addEventListener(\"click\",()=>kt(a.id)),L.addEventListener(\"pointerenter\",()=>ct(a.id)),L.addEventListener(\"pointerleave\",()=>ct(null)),L.addEventListener(\"focus\",()=>ct(a.id,!0)),L.addEventListener(\"blur\",()=>ct(null))});function ct(a,c=!1){if(a===yt&&!c)return;yt=a;for(const[v,u]of[...Bt,...Ct])u.toggleAttribute(\"data-hovered\",v===a);const m=a&&re(a,j);xe.textContent=m?`${m.label} \\xB7 ${m.state}`:I.matches?\"Select a part to look closer.\":\"Hover to identify. Select to look closer.\",s.style.cursor=a?\"pointer\":\"default\",xt()}function xt(){if(it.getAttribute(\"aria-busy\")===\"true\")return;const a=y||(O===2?yt:null),c=a&&re(a,j),m=`${a||\"overview\"}:${j}`;if(it.setAttribute(\"aria-live\",y||t(\"[data-part-index] button:focus-visible\")?\"polite\":\"off\"),m!==le&&(le=m,c?(et.textContent=c.title,nt.textContent=c.state,Rt.textContent=c.text):(et.innerHTML=U.title,nt.textContent=U.state,Rt.textContent=U.text)),M.hidden=lt.hidden=!Y||!y,St.hidden=!Y||y!==\"insert\",H.hidden=!Y||O!==2||C!==0&&k!==G&&!y||k<.995||I.matches&&!!y,y){const v=wt.findIndex(mt=>mt.id===y);t(\".part-navigation\").setAttribute(\"aria-label\",`Lamp component ${v+1} of ${wt.length}`),Yt.textContent=`${String(v+1).padStart(2,\"0\")} / ${String(wt.length).padStart(2,\"0\")}`;const u=be(y,-1),L=be(y,1);z.disabled=!u,N.disabled=!L,z.setAttribute(\"aria-label\",u?`Previous part: ${u.label}`:\"Previous part\"),N.setAttribute(\"aria-label\",L?`Next part: ${L.label}`:\"Next part\"),(K.activeElement===z&&!u||K.activeElement===N&&!L)&&lt.focus({preventScroll:!0})}W.setAttribute(\"aria-live\",y?\"off\":\"polite\"),e.toggleAttribute(\"data-inspecting\",!!y),y?e.dataset.selectedComponent=y:delete e.dataset.selectedComponent;for(const[v,u]of[...Bt,...Ct])u.setAttribute(\"aria-pressed\",String(v===y));O===2&&(W.textContent=y?`03 / ${c.label} \\xB7 ${c.state}`:\"03 / The interior \\xB7 Select a part\")}function ee(a){const c=Wt(a),m=K.activeElement,v=m===_&&c.step===0||m===D&&c.step===2||c.step!==2&&H.contains(m)||i.some((u,L)=>L!==c.step&&u.contains(m));return c.step!==O&&(O=c.step,i.forEach((u,L)=>{u.hidden=L!==O}),R.forEach((u,L)=>u.setAttribute(\"aria-pressed\",String(L===O))),_.disabled=O===0,D.hidden=O===2,D.textContent=[\"Separate the body \\u2192\",\"Expand the lamp \\u2192\"][O]||\"\",Q.dataset.chapter=String(O),W.textContent=`0${O+1} / ${Ie[O]}`,H.hidden=O!==2),x.value=String(Math.round(a*100)),x.setAttribute(\"aria-valuetext\",`${Ie[c.step]} \\xB7 ${Math.round(a*100)} percent`),v&&R[c.step].focus({preventScroll:!0}),xt(),c}function Nt(a){const c=Wt(a),m=A.draw({...c,focus:at});for(const[v,u]of Ct){const L=_optionalChain([m, 'optionalAccess', _6 => _6[v]]);if(u.hidden=!L||a<.995||C!==0||!!y,L){const mt=Math.max(24,Math.min(d.clientWidth-24,L.x)),gt=Math.max(24,Math.min(d.clientHeight-24,L.y));u.style.left=`${mt}px`,u.style.top=`${gt}px`,u.toggleAttribute(\"data-align-left\",mt>d.clientWidth-180)}}}function ft(a,c,m){if(!A||!Y)return;if(G=Math.max(0,Math.min(1,a)),Wt(G).step!==2&&y&&(y=null,A.inspect(null),at=0,ct(null)),ee(c&&!Xt.matches&&J?k:G),bt(C),C=0,!c||Xt.matches||!J||k===G&&at===1){k=G,at=1,Nt(k),xt();return}const v=k,u=at,L=performance.now(),mt=_nullishCoalesce(m, () => ((G!==v?We*Math.abs(G-v):ye)));function gt(vt){const ot=mt?Math.min(1,(vt-L)/mt):1;k=v+(G-v)*ot;const V=ot*ot*ot*(ot*(ot*6-15)+10);at=u+(1-u)*V,C=ot<1?ge(gt):0,ee(k),Nt(k),C||xt()}C=ge(gt),xt()}function qt(){if(e.hasAttribute(\"data-scroll-driven\"))return;const a=d.getBoundingClientRect(),c=Q.getBoundingClientRect(),m=Math.max(a.bottom,c.bottom);if(a.top<16||m>innerHeight-16){const v=Z.getBoundingClientRect(),u=Math.min(v.top,a.top);Ot.scrollTo({top:scrollY+u-16,behavior:\"instant\"})}}function dt(a,{animate:c=!0,reveal:m=!0,duration:v}={}){if(e.hasAttribute(\"data-scroll-driven\")){const u=e.getBoundingClientRect(),L=a*Te;Ot.scrollTo({top:scrollY+u.top+L*Math.max(0,u.height-innerHeight),behavior:\"instant\"})}ft(a,c,v),m&&qt()}function kt(a){if(!A||!Y||y===a)return;re(a,j);const c=H.contains(K.activeElement),m=[...Ct.values()].includes(K.activeElement);y=a,A.inspect(a),at=0,dt(1,{duration:ye}),(I.matches&&c||m)&&lt.focus({preventScroll:!0})}function ce(){const a=y,c=M.contains(K.activeElement);!a||!Y||(y=null,A.inspect(null),at=0,ct(null),ft(1,!0,ye),c&&Bt.get(a).focus({preventScroll:!0}),qt())}function Me(){const a=e.getBoundingClientRect();return Math.max(0,Math.min(1,-a.top/(Math.max(1,a.height-innerHeight)*Te)))}function Vt(){if(At=0,!A||!Y||!J||!e.hasAttribute(\"data-scroll-driven\"))return;const a=Me();Math.abs(a-G)<.003||ft(a,!0,320)}function ne(){!At&&J&&Y&&e.hasAttribute(\"data-scroll-driven\")&&(At=ge(Vt))}function Mt(){if(!A||!Y)return;const a=K.activeElement;I.matches?(Z.parentElement!==$&&$.prepend(Z),(H.parentElement!==$||i[2].parentElement!==$)&&d.after(H,i[2]),Q.parentElement!==$&&t(\"[data-body-choices]\").before(Q)):(H.parentElement!==$&&d.after(H),i[2].parentElement!==t(\".restoration-notes\")&&t(\".restoration-notes\").append(...i),Z.parentElement!==$&&$.prepend(Z),Q.parentElement!==t(\".restoration-layout\")&&t(\".restoration-layout\").append(Q));const c=e.hasAttribute(\"data-scroll-driven\"),m=t(\".restoration-notes\");let v=!1;if(I.matches)m.style.minHeight=\"\";else{m.style.minHeight=\"\";const u=i.map(P=>P.hidden),L=H.hidden,mt=lt.hidden,gt=M.hidden,vt=St.hidden,ot={title:et.innerHTML,state:nt.textContent,text:Rt.textContent};H.hidden=!1,lt.hidden=M.hidden=!1,St.hidden=!0,it.setAttribute(\"aria-busy\",\"true\");let V=0;i.forEach(P=>{P.hidden=!1,V=Math.max(V,P.getBoundingClientRect().height),P.hidden=!0}),i[2].hidden=!1,wt.forEach(P=>{et.textContent=P.title,Rt.textContent=re(P.id,j).text,St.hidden=P.id!==\"insert\",V=Math.max(V,i[2].getBoundingClientRect().height)}),et.innerHTML=ot.title,nt.textContent=ot.state,Rt.textContent=ot.text,i.forEach((P,Zt)=>{P.hidden=u[Zt]}),H.hidden=L,lt.hidden=mt,M.hidden=gt,St.hidden=vt,it.setAttribute(\"aria-busy\",\"false\"),m.style.minHeight=`${V}px`;const Et=P=>P.getBoundingClientRect().height;v=_t.matches&&!Xt.matches&&48+Et(t(\".restoration-heading\"))+16+Et(t(\".restoration-layout\"))+24+Et(t(\".restoration-disclosure\"))<=innerHeight}e.toggleAttribute(\"data-scroll-driven\",v),pt.textContent=v?\"Scroll to open. Select a part to look closer.\":\"Choose a view. Then explore the parts.\",ct(yt,!0),A.resize(),c!==e.hasAttribute(\"data-scroll-driven\")?v&&te&&J?dt(G,{animate:!1,reveal:!1}):(ft(G,!1),c&&te&&J&&qt()):Nt(k),te=!0,I.matches&&y&&H.contains(a)?lt.focus({preventScroll:!0}):e.contains(a)&&a.getClientRects().length&&K.activeElement!==a&&a.focus({preventScroll:!0})}function Pt(a){Y=!1,bt(C),bt(At),C=At=0,y=null,yt=null,xt(),e.removeAttribute(\"data-rendered\"),e.removeAttribute(\"data-enhanced\"),e.removeAttribute(\"data-scroll-driven\"),Z.hidden=Q.hidden=H.hidden=t(\"[data-body-choices]\").hidden=!0,t(\".restoration-notes\").append(...i),i.forEach(c=>{c.hidden=!1}),Ct.forEach(c=>{c.hidden=!0}),t(\".restoration-notes\").style.minHeight=\"\",S.hidden=!0,g.textContent=a}function de(){A.inspect(null),at=1,Y=!0,g.textContent=h,e.setAttribute(\"data-enhanced\",\"\"),e.setAttribute(\"data-rendered\",\"\"),Z.hidden=Q.hidden=t(\"[data-body-choices]\").hidden=!1,S.hidden=!0,O=-1,ft(G,!1),Mt(),Nt(k)}const Tt=new Ce(async([a])=>{if(J=a.isIntersecting,!J){bt(C),C=0;return}Tt.unobserve(e),S.hidden=!1;try{if(await Promise.resolve(),Dt)return;A=tn(s,c=>{c?de():Pt(\"The interactive lamp isn\\u2019t available right now. The photograph and our restoration method are below.\")}),de(),he.observe(e)}catch (e3){_optionalChain([A, 'optionalAccess', _7 => _7.dispose, 'call', _8 => _8()]),A=void 0,Pt(\"The interactive lamp couldn\\u2019t load. Shown instead: a blown-glass lamp from our archive, with our restoration method alongside.\")}},{rootMargin:\"480px 0px\"}),he=new Ce(([a])=>{const c=J;J=a.isIntersecting,J?A&&Y&&!c&&(ft(G,!1),Vt()):(bt(C),C=0)});Tt.observe(e),R.forEach((a,c)=>a.addEventListener(\"click\",()=>{y&&(y=null,A.inspect(null),at=0,ct(null)),dt(we[c])})),_.addEventListener(\"click\",()=>dt(we[Math.max(0,O-1)])),D.addEventListener(\"click\",()=>{O<2&&dt(we[O+1])}),x.addEventListener(\"input\",()=>{y&&(y=null,A.inspect(null)),dt(Number(x.value)/100,{animate:!1,reveal:!1})}),lt.addEventListener(\"click\",ce);for(const[a,c]of[[z,-1],[N,1]])a.addEventListener(\"click\",()=>{if(!y||!Y)return;const m=be(y,c);m&&kt(m.id)});e.addEventListener(\"keydown\",a=>{a.key===\"Escape\"&&y&&(a.preventDefault(),ce())}),s.addEventListener(\"pointermove\",a=>{Y&&k>=.995&&!C&&ct(A.hitTest(a.clientX,a.clientY))}),s.addEventListener(\"pointerleave\",()=>ct(null)),s.addEventListener(\"pointerdown\",a=>{Ht={x:a.clientX,y:a.clientY}}),s.addEventListener(\"click\",a=>{if(!Y||k<.995||C||!Ht||Math.hypot(a.clientX-Ht.x,a.clientY-Ht.y)>8)return;const c=A.hitTest(a.clientX,a.clientY);c&&kt(c)});const ue={\"art-glass\":\"The glassmaker\\u2019s work stays: the color, the shape, the detail. We keep the body exactly as it is and take out the old wiring and fittings.\",\"blown-glass\":\"The form and surface are the glassmaker\\u2019s work. We keep them as they are and rebuild the fittings and wiring around the body.\",ceramic:\"The potter\\u2019s form and glaze are the reason to keep the body. New fittings and wiring let it be used every day.\",\"oil-lamp\":\"The font, collar and cast foot carry the lamp\\u2019s history. We keep them and replace the old burner with a solid-brass electrical fitting.\"};e.querySelectorAll(\"[data-lamp-body]\").forEach(a=>a.addEventListener(\"click\",()=>{!A||!Y||(j=a.dataset.lampBody,A.setBody(j),e.querySelectorAll(\"[data-lamp-body]\").forEach(c=>c.setAttribute(\"aria-pressed\",String(c===a))),t(\"[data-preservation-copy]\").textContent=ue[j],y===\"body\"?(xt(),dt(G,{animate:!1})):y?kt(\"body\"):dt(G,{animate:!1}),Mt())}));const ae=new ze(Mt);return ae.observe(s),Xt.addEventListener(\"change\",()=>{Mt(),ft(G,!1)}),_t.addEventListener(\"change\",Mt),I.addEventListener(\"change\",Mt),Ot.addEventListener(\"scroll\",ne,{passive:!0}),K.addEventListener(\"visibilitychange\",()=>{K.hidden?(bt(C),C=0):A&&Y&&J&&ft(G,!1)}),Ot.addEventListener(\"pageshow\",a=>{a.persisted&&A&&Y&&(Mt(),ft(G,!1))}),Ot.addEventListener(\"pagehide\",a=>{bt(C),bt(At),a.persisted||(Dt=!0,Tt.disconnect(),he.disconnect(),ae.disconnect(),Ot.removeEventListener(\"scroll\",ne),_optionalChain([A, 'optionalAccess', _9 => _9.dispose, 'call', _10 => _10()]))}),()=>{Dt=!0,Tt.disconnect(),he.disconnect(),ae.disconnect(),bt(C),bt(At),_optionalChain([A, 'optionalAccess', _11 => _11.dispose, 'call', _12 => _12()])}}return fe.push(en(Kt.querySelector(\"[data-restoration]\"))),()=>{oe.abort(),fe.reverse().forEach(e=>_optionalChain([e, 'optionalCall', _13 => _13()])),se.forEach(globalThis.cancelAnimationFrame),Kt.querySelector(\"dialog[open]\")&&(globalThis.document.body.style.overflow=\"\")}},[pe.html]),_react2.default.createElement(\"div\",{ref:Se,className:\"qr-custom homepage\",...pe.main?{id:\"main\"}:{},dangerouslySetInnerHTML:{__html:pe.html}})}exports.default = fn;"}