(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[34611],{23600:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(79477);let s=function(e,t,n,s){let c=r.useRef(n),u=r.useRef(s);r.useEffect(()=>{c.current=n,u.current=s}),r.useEffect(()=>{let n=e&&"current"in e?e.current:e;if(!n)return;let r=0;function s(...e){r||c.current.apply(this,e)}n.addEventListener(t,s);let l=u.current;return()=>{r=1,n.removeEventListener(t,s),l&&l()}},[e,t])},c=e=>{let t=r.useRef(e);return r.useEffect(()=>{t.current=e}),t},u="undefined"!=typeof performance?performance:Date,l=()=>u.now();function o(e,t=30,n=!1){let s=c(e),u=1e3/t,o=r.useRef(0),i=r.useRef(),a=()=>i.current&&clearTimeout(i.current),f=[t,n,s];function h(){o.current=0,a()}return r.useEffect(()=>h,f),r.useCallback(function(){let e=arguments,t=l(),r=()=>{o.current=t,a(),s.current.apply(null,e)},c=o.current;if(n&&0===c)return r();if(t-c>u){if(c>0)return r();o.current=t}a(),i.current=setTimeout(()=>{r(),o.current=0},u)},f)}function i(e,t){if("undefined"==typeof window)return e;let{event:n,element:r}=t,{clientX:s,clientY:c,screenX:u,screenY:l,pageX:o=0,pageY:i=0}="touches"in n?n.touches[0]:n,a=r.getBoundingClientRect(),f=o-a.left-(window.pageXOffset||window.scrollX),h=i-a.top-(window.pageYOffset||window.scrollY);return"touches"in n&&(f<0||h<0||f>a.width||h>a.height)?{...e,context:{...e.context,hoverStatus:"leave",touchStatus:"end"}}:{context:{...e.context,hoverStatus:"enter"},mouse:{...e.mouse,x:f,y:h,pageX:o,pageY:i,clientX:s,clientY:c,screenX:u,screenY:l,elementWidth:a.width,elementHeight:a.height,isOver:!0,isTouch:"touches"in n}}}function a(e,t){let{mouse:n,context:r}=e;if("mousemove"===t.type)return"end"===r.touchStatus?e:i(e,t);if("touchmove"===t.type)return i({context:{...r,touchStatus:"start"},mouse:n},t);if("touchdown"===t.type)return i({context:{...r,touchStatus:"start"},mouse:{...n,isDown:!0}},t);if("mousedown"===t.type)return{context:r,mouse:{...n,isDown:!0}};if("mouseup"===t.type)return{context:r,mouse:{...n,isDown:!1}};if("mouseleave"===t.type)return{context:{...r,hoverStatus:"leave"},mouse:{...n,isOver:!1}};if("touchleave"===t.type)return{context:{...r,hoverStatus:"leave",touchStatus:"end"},mouse:{...n,isOver:!1,isDown:!1}};else if("activeStatus"===t.type)return{context:{...r,activeStatus:t.value},mouse:n};return e}let f={x:null,y:null,pageX:null,pageY:null,clientX:null,clientY:null,screenX:null,screenY:null,elementWidth:null,elementHeight:null,isOver:!1,isDown:!1,isTouch:!1},h={hoverStatus:"idle",touchStatus:"idle",activeStatus:"inactive"},p=function(e,t={}){let{fps:n=30,enterDelay:c=0,leaveDelay:u=0}=t,[l,i]=r.useReducer(a,{mouse:f,context:h}),p=o(t=>{let n=e&&"current"in e?e.current:e;n&&i({type:"mousemove",event:t,element:n})},n,!0),v=o(t=>{let n=e&&"current"in e?e.current:e;n&&i({type:"touchmove",event:t,element:n})},n,!0),m=o(()=>i({type:"mouseleave"}),n,!1),d=o(t=>{let n=e&&"current"in e?e.current:e;n&&i("touches"in t?{type:"touchdown",element:n,event:t}:{type:"mousedown",element:n,event:t})},n,!0),x=o(()=>i({type:"mouseup"}),n,!1),y=o(()=>i({type:"touchleave"}),n,!1);function w(){return i({type:"activeStatus",value:"active"})}function g(){return i({type:"activeStatus",value:"inactive"})}return s(e,"mouseenter",p),s(e,"mousemove",p),s(e,"mouseleave",m),s(e,"mousedown",d),s("undefined"!=typeof window?window:null,"mousedown",d),s("undefined"!=typeof window?window:null,"mouseup",x),s(e,"touchstart",d),s(e,"touchmove",v),s(e,"touchend",y),s(e,"touchcancel",y),r.useEffect(()=>{if("enter"===l.context.hoverStatus){if(c){let e=setTimeout(w,c);return()=>clearTimeout(e)}i({type:"activeStatus",value:"active"})}else{if(u){let e=setTimeout(g,u);return()=>clearTimeout(e)}i({type:"activeStatus",value:"inactive"})}},[l.context.hoverStatus,c,u]),"active"===l.context.activeStatus?l.mouse:f}},34611:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>j});var r=n(67841),s=n(64833),c=n(79477),u=n(97718),l=n(23600),o=n(74631);let i={tension:110,friction:19},a="0 0 ".concat(450," ").concat(300),f={x:150,y:150},h={x:300,y:150},p=(0,s.z)("div")({name:"Wrapper",class:"wu6yrkd",propsAsIs:!1}),v=(0,s.z)("svg")({name:"Svg",class:"sl082b",propsAsIs:!1}),m=(0,s.z)(u.q.circle)({name:"Circle",class:"cgy84vl",propsAsIs:!0}),d=(0,s.z)("div")({name:"TextLayer",class:"tw9wr8y",propsAsIs:!1}),x=(0,s.z)(u.q.div)({name:"Text",class:"t1p96bk4",propsAsIs:!0}),y=(0,s.z)("button")({name:"TextButton",class:"t17wxgi7",propsAsIs:!1}),w=(0,s.z)(x)({name:"Left",class:"l170fnn8",propsAsIs:!0}),g=(0,s.z)(x)({name:"Right",class:"rq0lnzy",propsAsIs:!0}),S=(0,s.z)(x)({name:"Center",class:"cvhf2ce",propsAsIs:!0}),b=e=>{let{left:t,right:n,center:s,...x}=e,[b,k]=c.useState({left:!1,right:!1}),j=c.useRef(),z=(0,l.Z)(j);c.useEffect(()=>{if(!z.x){k({left:!1,right:!1});return}let e=(0,o.Fv)(z.x,0,z.elementWidth,0,450),t=(0,o.Fv)(z.y,0,z.elementHeight,0,300);k({left:150>Math.sqrt(Math.abs(e-f.x)**2+Math.abs(t-f.y)**2),right:150>Math.sqrt(Math.abs(e-h.x)**2+Math.abs(t-h.y)**2)})},[z]);let T=b.left&&b.right,X=!b.left&&!b.right,A=(0,u.q_)({transform:b.left?"scale(".concat(1.1,")"):"scale(1)",fillOpacity:b.left?.5:.35,cx:T?f.x+20:b.left?f.x-20:f.x,config:i}),E=(0,u.q_)({transform:b.right?"scale(".concat(1.1,")"):"scale(1)",fillOpacity:b.right?.5:.35,cx:T?h.x-20:b.right?h.x+20:h.x,config:i}),I=.01*z.elementWidth,q={transform:b.right?"translateX(-".concat(I,"px) scale(0.8)"):b.left?"translateX(".concat(I,"px) scale(1.1)"):"translateX(0) scale(1)",opacity:X?.75:b.left&&!T?1:.25},R={transform:T?"scale(1.1)":b.left||b.right?"scale(0.8)":"scale(1)",opacity:X?.75:T?1:.25},O={transform:b.left?"translateX(".concat(I,"px) scale(0.8)"):b.right?"translateX(-".concat(I,"px) scale(1.1)"):"translateX(0) scale(1)",opacity:X?.75:b.right&&!T?1:.25};return(0,r.jsxs)(p,{children:[(0,r.jsxs)(v,{viewBox:a,ref:j,children:[(0,r.jsx)(m,{cx:h.x,cy:h.y,r:150,fill:"var(--color-venn-1)",...E}),(0,r.jsx)(m,{cx:f.x,cy:f.y,r:150,fill:"var(--color-venn-0)",...A})]}),(0,r.jsxs)(d,{children:[(0,r.jsx)(w,{style:q,children:(0,r.jsx)(y,{onFocus:()=>k({left:!0,right:!1}),onBlur:()=>k({left:!1,right:!1}),children:t})}),(0,r.jsx)(g,{style:O,children:(0,r.jsx)(y,{onFocus:()=>k({left:!1,right:!0}),onBlur:()=>k({left:!1,right:!1}),children:n})}),(0,r.jsx)(S,{style:R,children:(0,r.jsx)(y,{onFocus:()=>k({left:!0,right:!0}),onBlur:()=>k({left:!1,right:!1}),children:s})})]})]})};n(79800);let k=(0,s.z)("div")({name:"Wrapper",class:"wk0r5lw",propsAsIs:!1}),j=e=>(0,r.jsx)(k,{children:(0,r.jsx)(b,{...e})});n(65993)},79800:e=>{e.exports={wu6yrkd:"wu6yrkd",sl082b:"sl082b",cgy84vl:"cgy84vl",tw9wr8y:"tw9wr8y",t1p96bk4:"t1p96bk4",t17wxgi7:"t17wxgi7",l170fnn8:"l170fnn8",rq0lnzy:"rq0lnzy",cvhf2ce:"cvhf2ce"}},65993:e=>{e.exports={wk0r5lw:"wk0r5lw"}}}]); //# sourceMappingURL=34611.c359087e3d581db2.js.map