Files
doormilebuild/build/.next/static/chunks/0vzdvje64yndv.js
2026-07-14 12:11:28 +05:30

1 line
3.6 KiB
JavaScript

(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,5074,e=>{"use strict";var t=e.i(43476),r=e.i(71645);let l=[[[.04,.2],[.1,.12],[.18,.1],[.24,.13],[.29,.12],[.3,.18],[.27,.22],[.26,.28],[.22,.3],[.2,.38],[.17,.44],[.15,.4],[.16,.32],[.12,.3],[.09,.26],[.06,.24]],[[.21,.5],[.27,.48],[.31,.52],[.31,.6],[.29,.66],[.27,.74],[.24,.82],[.22,.8],[.22,.7],[.205,.62],[.2,.55]],[[.45,.16],[.5,.13],[.55,.15],[.57,.19],[.55,.24],[.5,.27],[.47,.25],[.455,.2]],[[.46,.34],[.53,.32],[.58,.36],[.585,.44],[.56,.52],[.53,.6],[.5,.66],[.47,.62],[.46,.52],[.45,.44],[.45,.38]],[[.56,.14],[.64,.1],[.74,.1],[.84,.14],[.9,.2],[.92,.26],[.86,.3],[.8,.3],[.74,.34],[.7,.34],[.66,.3],[.6,.3],[.575,.24],[.565,.18]],[[.81,.66],[.87,.64],[.92,.68],[.92,.74],[.86,.77],[.81,.74],[.8,.7]]],a=[[.115,.3],[.265,.255],[.285,.66],[.475,.185],[.605,.345],[.655,.4],[.745,.5],[.815,.275],[.865,.715]],o=[[0,1],[1,3],[3,4],[4,5],[5,6],[6,7],[7,8],[1,2],[3,7],[0,7]];e.s(["default",0,function({accent:e="#ef4444"}){let i=(0,r.useRef)(null);return(0,r.useEffect)(()=>{let[t,r,n]=function(e){let t=/^#?([0-9a-f]{6})$/i.exec(e.trim());if(!t)return[239,68,68];let r=parseInt(t[1],16);return[r>>16&255,r>>8&255,255&r]}(e),h=e=>`rgba(${t},${r},${n},${e})`,s=`rgb(${t},${r},${n})`,d=i.current,f=d?.parentElement;if(!d||!f)return;let u=d.getContext("2d");if(!u)return;let c=window.matchMedia?.("(prefers-reduced-motion: reduce)").matches,x=0,y=0,m=[],g=0,b=0,p=()=>{let e=f.getBoundingClientRect();x=Math.max(1,e.width),y=Math.max(1,e.height);let t=Math.min(window.devicePixelRatio||1,2);d.width=Math.round(x*t),d.height=Math.round(y*t),d.style.width=x+"px",d.style.height=y+"px",u.setTransform(t,0,0,t,0,0),(()=>{m=[];let e=Math.max(11,Math.min(17,x/70));for(let t=e/2;t<x;t+=e)for(let r=e/2;r<y;r+=e){let e=t/x,a=r/y;for(let o of l)if(function(e,t,r){let l=!1;for(let a=0,o=r.length-1;a<r.length;o=a++){let i=r[a][0],n=r[a][1],h=r[o][0],s=r[o][1];n>t!=s>t&&e<(h-i)*(t-n)/(s-n)+i&&(l=!l)}return l}(e,a,o)){m.push({x:t,y:r});break}}})()},w=(e,t)=>({x:(e.x+t.x)/2,y:(e.y+t.y)/2-.28*Math.hypot(t.x-e.x,t.y-e.y)}),M=(e,t,r,l)=>{let a=1-l;return{x:a*a*e.x+2*a*l*t.x+l*l*r.x,y:a*a*e.y+2*a*l*t.y+l*l*r.y}},P=e=>{for(let e of(u.clearRect(0,0,x,y),u.fillStyle="rgba(120,122,130,0.55)",m))u.beginPath(),u.arc(e.x,e.y,1.15,0,2*Math.PI),u.fill();let t=a.map(([e,t])=>({x:e*x,y:t*y}));for(let[e,r]of(u.save(),u.setLineDash([4,7]),u.lineWidth=1,u.strokeStyle=h(.13),o)){let l=w(t[e],t[r]);u.beginPath(),u.moveTo(t[e].x,t[e].y),u.quadraticCurveTo(l.x,l.y,t[r].x,t[r].y),u.stroke()}u.restore(),u.save();for(let r=0;r<o.length;r++){let[l,a]=o[r],i=w(t[l],t[a]),n=((.11*e+.137*r)%1+1)%1,d=M(t[l],i,t[a],n),f=Math.max(0,n-.04),c=M(t[l],i,t[a],f),x=u.createLinearGradient(c.x,c.y,d.x,d.y);x.addColorStop(0,h(0)),x.addColorStop(1,h(.5)),u.strokeStyle=x,u.lineWidth=2,u.beginPath(),u.moveTo(c.x,c.y),u.lineTo(d.x,d.y),u.stroke(),u.shadowColor=s,u.shadowBlur=12,u.fillStyle=s,u.beginPath(),u.arc(d.x,d.y,2.6,0,2*Math.PI),u.fill(),u.shadowBlur=0}for(let r of(u.restore(),t)){for(let t=0;t<2;t++){let l=((e+2.6*t/2)%2.6+2.6)%2.6/2.6,a=3+24*l,o=(1-l)*.45;u.beginPath(),u.strokeStyle=h(o),u.lineWidth=1.5,u.arc(r.x,r.y,a,0,2*Math.PI),u.stroke()}u.fillStyle=s,u.shadowColor=s,u.shadowBlur=8,u.beginPath(),u.arc(r.x,r.y,2.6,0,2*Math.PI),u.fill(),u.shadowBlur=0}},v=e=>{b||(b=e),P((e-b)/1e3),g=requestAnimationFrame(v)};p(),c?P(0):g=requestAnimationFrame(v);let C=new ResizeObserver(()=>{p(),c&&P(0)});return C.observe(f),()=>{cancelAnimationFrame(g),C.disconnect()}},[e]),(0,t.jsx)("canvas",{ref:i,className:"ind__map","aria-hidden":"true"})}])}]);