import{f as W,a as B,s as y}from"../chunks/DktbhmWA.js";import{i as st}from"../chunks/BhDuCDh7.js";import{p as nt,t as V,a as at,c as a,r as i,s as c,n as it}from"../chunks/CPWcrcMP.js";import{i as rt}from"../chunks/0jvM7PZf.js";import{c as v,s as ot}from"../chunks/BxBMkMrU.js";import{G as lt}from"../chunks/CtdL8EMg.js";const ct=""+new URL("../assets/Function.BnrNmGRS.webp",import.meta.url).href;var $={exports:{}},dt=$.exports,U;function pt(){return U||(U=1,function(P,q){(function(u,p){P.exports=p()})(dt,function(){const u=[],p={delta:10,perspective:500,startX:0,startY:0,glareOpacity:.5,axis:"all",scale:1};class M{constructor(t,e={}){this.card3dElement=t,this.config=e,this.gyroOrigin=null,u.push({element:t,instance:this}),this.config=Object.assign({},p,this.config),this.config.stop?this.stop():this.start()}updateConfig(t={}){this.config=Object.assign({},p,t),this.config.stop?this.stop():(this.stop(),this.start())}removeEventListener(){this.focusElement.removeEventListener("mousemove",this.eventMouseMoove),this.focusElement.removeEventListener("mouseout",this.eventMouseOut),this.config.gyroscopie&&window.removeEventListener("deviceorientation",this.eventDeviceOrientation)}setupEventListener(){this.eventMouseMoove=t=>this.mousemove(t),this.eventMouseOut=()=>this.mouseout(),this.focusElement.addEventListener("mousemove",this.eventMouseMoove),this.config.noReset||this.focusElement.addEventListener("mouseout",this.eventMouseOut),this.config.gyroscopie&&(this.eventDeviceOrientation=t=>this.gyro(t),window.addEventListener("deviceorientation",this.eventDeviceOrientation))}gyro(t){const e=t.beta,n=t.gamma;typeof n=="number"&&typeof e=="number"&&this.mousemove({clientY:e/45,clientX:n/45,gyroscopie:!0})}stop(){const t=w(this.card3dElement);u.splice(t,1),this.card3dElement.setAttribute("data-card3d-stop","true"),this.reset()}reset(){this.card3dElement.style.transform="",this.card3dElement.style.transition="",this.glareElement&&this.glareElement.remove(),this.removeEventListener()}applyGlare(){this.glareElement=document.createElement("span"),this.glareElement.setAttribute("style",`
        will-change: transform;
        position: absolute;
        background-image: linear-gradient(0deg, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%);
        pointer-event: none; 
        transform-origin: 0% 0%;
        transform: translate(-50%, -50%) rotate(180deg);
        opacity: 0;
        z-index: 999;
        `),this.card3dElement.appendChild(this.glareElement)}start(){this.focusElement=this.config.fullPageListening?document.body:this.card3dElement,this.setupEventListener(),this.config.glare&&this.applyGlare(),this.card3dElement.style.overflow="hidden",this.card3dElement.style.willChange="transform",this.card3dElement.style.transform=`
        perspective(500px) 
        rotateX(${this.config.startY}deg) 
        rotateY(${this.config.startX}deg)
        `}mousemove(t){if(!this.card3dElement.isConnected||!this.focusElement.isConnected)return void this.stop();this.card3dElement.style.transition="";const e=this.config,n=e.reverse?1:-1,s=this.card3dElement.getBoundingClientRect(),l=s.width/2,d=s.height/2,r=s.left+l,E=s.top+d,S=-1*(r-t.clientX),b=E-t.clientY,_=this.focusElement!==this.card3dElement?window.innerWidth/2:s.width/2,O=this.focusElement!==this.card3dElement?window.innerHeight/2:s.height/2;let g=0,f=0;if("gyroscopie"in t?(this.gyroOrigin||(this.gyroOrigin={x:t.clientX,y:t.clientY}),g=(this.gyroOrigin.x-t.clientX)*e.delta,f=(this.gyroOrigin.y-t.clientY)*e.delta):(e.axis!=="y"&&(g=S/_*e.delta),e.axis!=="x"&&(f=b/O*e.delta)),e.glare){const C=Math.atan2(t.clientX-r,-(t.clientY-E))*(180/Math.PI),x=2*(s.width>s.height?s.width:s.height);this.glareElement.style.opacity=e.glareOpacity.toString(),this.glareElement.style.left="50%",this.glareElement.style.top="50%",this.glareElement.style.width=x+"px",this.glareElement.style.height=x+"px",this.glareElement.style.transform=`rotate(${C}deg) translate(-50%, -50%)`,this.glareElement.style.display="block"}this.card3dElement.style.transform=`
        perspective(${e.perspective}px) 
        rotateX(${f*n}deg) 
        rotateY(${g*n}deg)
        scale(${e.scale})
        `}mouseout(){this.card3dElement.style.transition="0.5s ease",this.card3dElement.style.transform="",this.glareElement&&(this.glareElement.style.opacity="0")}}function m(o){return o!=null&&(o===""||o==="true")}function h(o){const t=parseFloat(o);return isNaN(t)||typeof t!="number"?void 0:t}function w(o){return u.findIndex(t=>t.element===o)}function Y(o){var t,e,n,s,l,d;const r=o.dataset,E=m(r.card3dFullPageListening),S=m(r.card3dNoReset),b=m(r.card3dGlare),_=m(r.card3dReverse),O=m(r.card3dStop),g=m(r.card3dGyroscopie),f=(t=h(r.card3dDelta))!==null&&t!==void 0?t:p.delta,C=(e=h(r.card3dPerspective))!==null&&e!==void 0?e:p.perspective,x=(n=h(r.card3dStartX))!==null&&n!==void 0?n:p.startX,X=(s=h(r.card3dStartY))!==null&&s!==void 0?s:p.startY,G=(l=h(r.card3dGlare))!==null&&l!==void 0?l:p.glareOpacity,N=(d=h(r.card3dScale))!==null&&d!==void 0?d:p.scale;let L="all";return r.card3dAxis==="x"?L="x":r.card3dAxis==="y"&&(L="y"),{gyroscopie:g,stop:O,scale:N,delta:f,axis:L,noReset:S,reverse:_,fullPageListening:E,perspective:C,startX:x,startY:X,glare:b,glareOpacity:G}}function D(o){var t,e;for(const n of o){const s=w(n)!==-1,l=((t=n.dataset)===null||t===void 0?void 0:t.card3d)===void 0,d=m((e=n.dataset)===null||e===void 0?void 0:e.card3dStop);s||d||l||new M(n,Y(n))}}return document.addEventListener("DOMContentLoaded",function(){D(document.querySelectorAll("[data-card3d]")),new MutationObserver(function(o){var t;const e=[];for(const n of o??[]){if(n.type==="attributes"&&n.attributeName.includes("data-card3d")){const s=n.target,l=w(s),d=l!==-1;m((t=s.dataset)===null||t===void 0?void 0:t.card3d)&&l===-1?e.push(s):d&&u[l].instance.updateConfig(Y(u[l].element))}for(const s of n.addedNodes)e.push(s);for(const s of n.removedNodes){const l=w(s);l!==-1&&u.splice(l,1)}}e.length>0&&D(e)}).observe(window.document.documentElement,{childList:!0,subtree:!0,attributes:!0})}),M})}($)),$.exports}pt();var mt=W('<p class="mt-2 text-sm font-bold">Details: <span class="text-sm font-normal text-gray-400"> </span></p>'),vt=W('<section><div class="container"><div class="flex items-center gap-2 sticky bg-base-100 z-40 pb-2" style="top:4.11rem"><!></div> <div class="grid gap-4 lg:grid-cols-2"><div><h3 class="mb-4 text-2xl font-semibold">Fire Damper Central Details</h3> <p class=" text-sm font-bold">Serial Number: <span class="text-sm font-normal text-gray-400"> </span></p> <p class="mt-2 text-sm font-bold">Name: <span class="text-sm font-normal text-gray-400"> </span></p> <p class="mt-2 text-sm font-bold">Description: <span class="text-sm font-normal text-gray-400"> </span></p> <p class="mt-2 text-sm font-bold">Location:</p> <p class="text-sm font-bold"><span class="text-sm font-normal text-gray-400"> </span></p> <p class="text-sm font-bold"><span class="text-sm font-normal text-gray-400"> </span></p> <p class="text-sm font-bold"><span class="text-sm font-normal text-gray-400"> </span></p> <p class="text-sm font-bold"><span class="text-sm font-normal text-gray-400"> </span></p> <!></div> <div class="pt-4 flex flex-col items-center"><h1 class="text-4xl font-black tracking-tighter lg:text-6xl lg:leading-none">Product made by</h1> <img alt="Powered by Function" class="rounded-lg pt-1"/> <p class="text-lg">Function AS</p> <span class="text-lg">Nye Vakås vei 28, 1395 Hvalstad</span> <span class="text-lg">Norway</span> <span class="text-lg">support@function.no</span></div></div></div></section>');function Et(P,q){nt(q,!1);const u=new v("$SYS/SerialNumber");new v("$SYS/SoftwareVersion");const p=new v("Settings/Name"),M=new v("Settings/Description"),m=new v("Settings/Location/Name"),h=new v("Settings/Location/Street"),w=new v("Settings/Location/PostalCode"),Y=new v("Settings/Location/City"),D=new v("Settings/Location/Country"),o=new v("Settings/Location/MoreDetails");st();var t=vt(),e=a(t),n=a(e),s=a(n);lt(s,{}),i(n);var l=c(n,2),d=a(l),r=c(a(d),2),E=c(a(r)),S=a(E,!0);i(E),i(r);var b=c(r,2),_=c(a(b)),O=a(_,!0);i(_),i(b);var g=c(b,2),f=c(a(g)),C=a(f,!0);i(f),i(g);var x=c(g,4),X=a(x),G=a(X,!0);i(X),i(x);var N=c(x,2),L=a(N),J=a(L,!0);i(L),i(N);var R=c(N,2),H=a(R),K=a(H);i(H),i(R);var k=c(R,2),I=a(k),Q=a(I,!0);i(I),i(k);var T=c(k,2);{var Z=A=>{var F=mt(),z=c(a(F)),et=a(z,!0);i(z),i(F),V(()=>y(et,o.value)),B(A,F)};rt(T,A=>{o.value!==""&&A(Z)})}i(d);var j=c(d,2),tt=c(a(j),2);it(8),i(j),i(l),i(e),i(t),V(()=>{y(S,u.value),y(O,p.value),y(C,M.value),y(G,m.value),y(J,h.value),y(K,`${w.value??""} ${Y.value??""}`),y(Q,D.value),ot(tt,"src",ct)}),B(P,t),at()}export{Et as component};
