You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@feverus/react-custom-cursor

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@feverus/react-custom-cursor - npm Package Compare versions

Comparing version

to
0.1.6

98

dist/react-custom-cursor.es.js

@@ -17,14 +17,14 @@ import Ye, { useRef as W, useState as z, useEffect as ke, createContext as dr, useContext as vr } from "react";

Le = 1;
var M = Ye, p = Symbol.for("react.element"), h = Symbol.for("react.fragment"), T = Object.prototype.hasOwnProperty, I = M.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, x = { key: !0, ref: !0, __self: !0, __source: !0 };
var M = Ye, m = Symbol.for("react.element"), p = Symbol.for("react.fragment"), T = Object.prototype.hasOwnProperty, I = M.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, x = { key: !0, ref: !0, __self: !0, __source: !0 };
function j(v, c, C) {
var g, m = {}, _ = null, N = null;
var g, h = {}, _ = null, N = null;
C !== void 0 && (_ = "" + C), c.key !== void 0 && (_ = "" + c.key), c.ref !== void 0 && (N = c.ref);
for (g in c)
T.call(c, g) && !x.hasOwnProperty(g) && (m[g] = c[g]);
T.call(c, g) && !x.hasOwnProperty(g) && (h[g] = c[g]);
if (v && v.defaultProps)
for (g in c = v.defaultProps, c)
m[g] === void 0 && (m[g] = c[g]);
return { $$typeof: p, type: v, key: _, ref: N, props: m, _owner: I.current };
h[g] === void 0 && (h[g] = c[g]);
return { $$typeof: m, type: v, key: _, ref: N, props: h, _owner: I.current };
}
return U.Fragment = h, U.jsx = j, U.jsxs = j, U;
return U.Fragment = p, U.jsx = j, U.jsxs = j, U;
}

@@ -42,5 +42,5 @@ var $ = {};

var ze;
function mr() {
function hr() {
return ze || (ze = 1, process.env.NODE_ENV !== "production" && function() {
var M = Ye, p = Symbol.for("react.element"), h = Symbol.for("react.portal"), T = Symbol.for("react.fragment"), I = Symbol.for("react.strict_mode"), x = Symbol.for("react.profiler"), j = Symbol.for("react.provider"), v = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), C = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), m = Symbol.for("react.memo"), _ = Symbol.for("react.lazy"), N = Symbol.for("react.offscreen"), S = Symbol.iterator, ee = "@@iterator";
var M = Ye, m = Symbol.for("react.element"), p = Symbol.for("react.portal"), T = Symbol.for("react.fragment"), I = Symbol.for("react.strict_mode"), x = Symbol.for("react.profiler"), j = Symbol.for("react.provider"), v = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), C = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), _ = Symbol.for("react.lazy"), N = Symbol.for("react.offscreen"), S = Symbol.iterator, ee = "@@iterator";
function re(e) {

@@ -73,3 +73,3 @@ if (e === null || typeof e != "object")

function b(e) {
return !!(typeof e == "string" || typeof e == "function" || e === T || e === x || G || e === I || e === C || e === g || J || e === N || Q || V || B || typeof e == "object" && e !== null && (e.$$typeof === _ || e.$$typeof === m || e.$$typeof === j || e.$$typeof === v || e.$$typeof === c || // This needs to include all possible module reference object
return !!(typeof e == "string" || typeof e == "function" || e === T || e === x || G || e === I || e === C || e === g || J || e === N || Q || V || B || typeof e == "object" && e !== null && (e.$$typeof === _ || e.$$typeof === h || e.$$typeof === j || e.$$typeof === v || e.$$typeof === c || // This needs to include all possible module reference object
// types supported by any Flight configuration anywhere since

@@ -100,3 +100,3 @@ // we don't know which Flight build this will end up being used

return "Fragment";
case h:
case p:
return "Portal";

@@ -122,3 +122,3 @@ case x:

return ne(e, e.render, "ForwardRef");
case m:
case h:
var a = e.displayName || null;

@@ -137,3 +137,3 @@ return a !== null ? a : R(e.type) || "Memo";

}
var P = Object.assign, F = 0, ge, me, pe, he, Ee, ye, Me;
var P = Object.assign, F = 0, ge, he, me, pe, Ee, ye, Me;
function Te() {

@@ -145,3 +145,3 @@ }

if (F === 0) {
ge = console.log, me = console.info, pe = console.warn, he = console.error, Ee = console.group, ye = console.groupCollapsed, Me = console.groupEnd;
ge = console.log, he = console.info, me = console.warn, pe = console.error, Ee = console.group, ye = console.groupCollapsed, Me = console.groupEnd;
var e = {

@@ -179,9 +179,9 @@ configurable: !0,

info: P({}, e, {
value: me
value: he
}),
warn: P({}, e, {
value: pe
value: me
}),
error: P({}, e, {
value: he
value: pe
}),

@@ -316,3 +316,3 @@ group: P({}, e, {

return Qe(e.render);
case m:
case h:
return q(e.type, r, t);

@@ -434,3 +434,3 @@ case _: {

// This tag allows us to uniquely identify this as a React Element
$$typeof: p,
$$typeof: m,
// Built-in properties that belong on the element

@@ -490,3 +490,3 @@ type: e,

function fe(e) {
return typeof e == "object" && e !== null && e.$$typeof === p;
return typeof e == "object" && e !== null && e.$$typeof === m;
}

@@ -571,3 +571,3 @@ function Re() {

// Inner props are checked in the reconciler.
r.$$typeof === m))
r.$$typeof === h))
t = r.propTypes;

@@ -608,3 +608,3 @@ else

var l;
e === null ? l = "null" : se(e) ? l = "array" : e !== void 0 && e.$$typeof === p ? (l = "<" + (R(e.type) || "Unknown") + " />", o = " Did you accidentally export a JSX literal instead of a component?") : l = typeof e, f("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", l, o);
e === null ? l = "null" : se(e) ? l = "array" : e !== void 0 && e.$$typeof === m ? (l = "<" + (R(e.type) || "Unknown") + " />", o = " Did you accidentally export a JSX literal instead of a component?") : l = typeof e, f("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", l, o);
}

@@ -640,11 +640,11 @@ var d = nr(e, r, t, s, u);

}
process.env.NODE_ENV === "production" ? de.exports = gr() : de.exports = mr();
process.env.NODE_ENV === "production" ? de.exports = gr() : de.exports = hr();
var y = de.exports;
const pr = (M, p) => {
const h = W(null), [T, I] = z(!1), [x, j] = z(!1), [v, c] = z(!1), [C, g] = z([0, 0]), [m, _] = z(0), [N, S] = z(!1), ee = W([0, 0]), re = W([0, 0]), w = W([0, 0]), f = W(void 0), te = () => {
_(m + (Math.random() - 0.5) * 6);
const mr = (M, m) => {
const p = W(null), [T, I] = z(!1), [x, j] = z(!1), [v, c] = z(!1), [C, g] = z([0, 0]), [h, _] = z(0), [N, S] = z(!1), ee = W([0, 0]), re = W([0, 0]), w = W([0, 0]), f = W(void 0), te = () => {
_(h + (Math.random() - 0.5) * 6);
}, Q = () => {
var b;
console.log("activate");
const n = (b = h.current) == null ? void 0 : b.getBoundingClientRect();
const n = (b = p.current) == null ? void 0 : b.getBoundingClientRect();
n && (ee.current = [n == null ? void 0 : n.x, n == null ? void 0 : n.y], re.current = [n == null ? void 0 : n.width, n == null ? void 0 : n.height], w.current = [(n == null ? void 0 : n.x) + (n == null ? void 0 : n.width) / 2, (n == null ? void 0 : n.y) + (n == null ? void 0 : n.height) / 2]), M && M(!0), I(!0), j(!1);

@@ -655,3 +655,3 @@ }, V = () => {

const [b, ne] = w.current;
p === !0 && _(Math.atan2(n.clientY - ne, n.clientX - b)), p === "onMove" && _(m + 0.01), g([n.clientX, n.clientY]);
m === !0 && _(Math.atan2(n.clientY - ne, n.clientX - b)), m === "onMove" && _(h + 0.01), g([n.clientX, n.clientY]);
}, J = (n) => {

@@ -669,11 +669,11 @@ if (n.target === null || v === !0)

return ke(() => {
clearTimeout(f.current), T && p === "auto" && (f.current = setTimeout(te, 1e3));
const n = h.current;
clearTimeout(f.current), T && m === "auto" && (f.current = setTimeout(te, 1e3));
const n = p.current;
return n && (n.addEventListener("mouseenter", Q), n.addEventListener("mouseleave", V), n.addEventListener("mousemove", B), n.addEventListener("mouseover", J), n.addEventListener("mouseout", G)), () => {
clearTimeout(f.current), n && (n.removeEventListener("mouseenter", Q), n.removeEventListener("mouseleave", V), n.removeEventListener("mousemove", B), n.removeEventListener("mouseover", J), n.removeEventListener("mouseout", G));
};
}, [m, T, v]), ke(() => (setTimeout(x ? () => S(!0) : () => S(!1), 200), () => {
}, [h, T, v]), ke(() => (setTimeout(x ? () => S(!0) : () => S(!1), 200), () => {
S(!1);
}), [x]), [
h,
p,
T,

@@ -683,8 +683,8 @@ x,

C,
m,
h,
N,
(n) => j(n)
];
}, hr = "_active_fg1m5_1", Er = "_cursorWrapper_fg1m5_10", yr = "_cursor_fg1m5_10", Mr = "_show_fg1m5_1", Tr = "_forCenter_fg1m5_34", _r = "_shell_fg1m5_47", xr = "_unmounting_fg1m5_51", jr = "_smooth_fg1m5_55", br = "_hover_fg1m5_61", A = {
active: hr,
}, pr = "_active_1achf_1", Er = "_cursorWrapper_1achf_10", yr = "_cursor_1achf_10", Mr = "_show_1achf_1", Tr = "_forCenter_1achf_34", _r = "_shell_1achf_46", xr = "_unmounting_1achf_50", jr = "_smooth_1achf_54", br = "_hover_1achf_60", A = {
active: pr,
cursorWrapper: Er,

@@ -698,3 +698,3 @@ cursor: yr,

hover: br
}, Dr = ({ cursor: M, x: p, y: h, angle: T, scale: I, unmounting: x, rotating: j, hoverClassName: v }) => {
}, Dr = ({ cursor: M, x: m, y: p, angle: T, scale: I, unmounting: x, rotating: j, hoverClassName: v }) => {
let c = A.cursorWrapper;

@@ -706,4 +706,4 @@ return x && (c = c + " " + A.unmounting), j === "auto" && (c = c + " " + A.smooth), /* @__PURE__ */ y.jsx(

style: {
left: p,
top: h,
left: m,
top: p,
transform: `rotate(${T}rad) scale(${I})`

@@ -717,4 +717,4 @@ },

children: M,
cursor: p = "Кастомный курсор",
rotating: h = !1,
cursor: m = "Кастомный курсор",
rotating: p = !1,
scale: T = 1,

@@ -728,7 +728,7 @@ hoverClassName: I = A.hover

C,
[g, m],
[g, h],
_,
N,
S
] = pr(x, h);
] = mr(x, p);
return /* @__PURE__ */ y.jsxs(

@@ -744,9 +744,9 @@ "div",

{
cursor: p,
cursor: m,
x: g,
y: m,
angle: h ? _ : 0,
y: h,
angle: p ? _ : 0,
scale: T,
unmounting: c,
rotating: h,
rotating: p,
hoverClassName: C ? I : ""

@@ -773,4 +773,4 @@ }

text: M = "...",
color: p = "black",
donutColor: h = "#eeeeee90"
color: m = "black",
donutColor: p = "#eeeeee90"
}) => /* @__PURE__ */ y.jsxs(

@@ -794,7 +794,7 @@ "svg",

strokeWidth: "80",
stroke: h,
stroke: p,
id: "background"
}
),
/* @__PURE__ */ y.jsx("text", { dy: "0", className: wr.text, fill: p, children: /* @__PURE__ */ y.jsx("textPath", { xlinkHref: "#textcircle", children: M }) })
/* @__PURE__ */ y.jsx("text", { dy: "0", className: wr.text, fill: m, children: /* @__PURE__ */ y.jsx("textPath", { xlinkHref: "#textcircle", children: M }) })
]

@@ -801,0 +801,0 @@ }

@@ -9,3 +9,3 @@ (function(R,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],l):(R=typeof globalThis<"u"?globalThis:R||self,l(R.ReactCustomCursors={},R.React))})(this,function(R,l){"use strict";var ee={exports:{}},W={};/**

* LICENSE file in the root directory of this source tree.
*/var ve;function Fe(){if(ve)return W;ve=1;var T=l,y=Symbol.for("react.element"),E=Symbol.for("react.fragment"),_=Object.prototype.hasOwnProperty,C=T.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,j={key:!0,ref:!0,__self:!0,__source:!0};function b(g,c,w){var m,p={},x=null,P=null;w!==void 0&&(x=""+w),c.key!==void 0&&(x=""+c.key),c.ref!==void 0&&(P=c.ref);for(m in c)_.call(c,m)&&!j.hasOwnProperty(m)&&(p[m]=c[m]);if(g&&g.defaultProps)for(m in c=g.defaultProps,c)p[m]===void 0&&(p[m]=c[m]);return{$$typeof:y,type:g,key:x,ref:P,props:p,_owner:C.current}}return W.Fragment=E,W.jsx=b,W.jsxs=b,W}var Y={};/**
*/var ve;function Fe(){if(ve)return W;ve=1;var T=l,y=Symbol.for("react.element"),E=Symbol.for("react.fragment"),_=Object.prototype.hasOwnProperty,C=T.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,j={key:!0,ref:!0,__self:!0,__source:!0};function b(g,c,w){var h,m={},x=null,P=null;w!==void 0&&(x=""+w),c.key!==void 0&&(x=""+c.key),c.ref!==void 0&&(P=c.ref);for(h in c)_.call(c,h)&&!j.hasOwnProperty(h)&&(m[h]=c[h]);if(g&&g.defaultProps)for(h in c=g.defaultProps,c)m[h]===void 0&&(m[h]=c[h]);return{$$typeof:y,type:g,key:x,ref:P,props:m,_owner:C.current}}return W.Fragment=E,W.jsx=b,W.jsxs=b,W}var Y={};/**
* @license React

@@ -18,7 +18,7 @@ * react-jsx-runtime.development.js

* LICENSE file in the root directory of this source tree.
*/var ge;function We(){return ge||(ge=1,process.env.NODE_ENV!=="production"&&function(){var T=l,y=Symbol.for("react.element"),E=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),b=Symbol.for("react.provider"),g=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),P=Symbol.for("react.offscreen"),k=Symbol.iterator,re="@@iterator";function te(e){if(e===null||typeof e!="object")return null;var r=k&&e[k]||e[re];return typeof r=="function"?r:null}var A=T.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function d(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),a=1;a<r;a++)t[a-1]=arguments[a];ne("error",e,t)}}function ne(e,r,t){{var a=A.ReactDebugCurrentFrame,s=a.getStackAddendum();s!==""&&(r+="%s",t=t.concat([s]));var u=t.map(function(i){return String(i)});u.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,u)}}var V=!1,B=!1,J=!1,G=!1,H=!1,n;n=Symbol.for("react.module.reference");function D(e){return!!(typeof e=="string"||typeof e=="function"||e===_||e===j||H||e===C||e===w||e===m||G||e===P||V||B||J||typeof e=="object"&&e!==null&&(e.$$typeof===x||e.$$typeof===p||e.$$typeof===b||e.$$typeof===g||e.$$typeof===c||e.$$typeof===n||e.getModuleId!==void 0))}function ae(e,r,t){var a=e.displayName;if(a)return a;var s=r.displayName||r.name||"";return s!==""?t+"("+s+")":t}function pe(e){return e.displayName||"Context"}function S(e){if(e==null)return null;if(typeof e.tag=="number"&&d("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case _:return"Fragment";case E:return"Portal";case j:return"Profiler";case C:return"StrictMode";case w:return"Suspense";case m:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case g:var r=e;return pe(r)+".Consumer";case b:var t=e;return pe(t._context)+".Provider";case c:return ae(e,e.render,"ForwardRef");case p:var a=e.displayName||null;return a!==null?a:S(e.type)||"Memo";case x:{var s=e,u=s._payload,i=s._init;try{return S(i(u))}catch{return null}}}return null}var L=Object.assign,U=0,he,ye,Ee,Me,Te,_e,xe;function je(){}je.__reactDisabledLog=!0;function Ze(){{if(U===0){he=console.log,ye=console.info,Ee=console.warn,Me=console.error,Te=console.group,_e=console.groupCollapsed,xe=console.groupEnd;var e={configurable:!0,enumerable:!0,value:je,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}U++}}function Xe(){{if(U--,U===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:L({},e,{value:he}),info:L({},e,{value:ye}),warn:L({},e,{value:Ee}),error:L({},e,{value:Me}),group:L({},e,{value:Te}),groupCollapsed:L({},e,{value:_e}),groupEnd:L({},e,{value:xe})})}U<0&&d("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var oe=A.ReactCurrentDispatcher,ie;function Z(e,r,t){{if(ie===void 0)try{throw Error()}catch(s){var a=s.stack.trim().match(/\n( *(at )?)/);ie=a&&a[1]||""}return`
*/var ge;function We(){return ge||(ge=1,process.env.NODE_ENV!=="production"&&function(){var T=l,y=Symbol.for("react.element"),E=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),b=Symbol.for("react.provider"),g=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),P=Symbol.for("react.offscreen"),k=Symbol.iterator,re="@@iterator";function te(e){if(e===null||typeof e!="object")return null;var r=k&&e[k]||e[re];return typeof r=="function"?r:null}var A=T.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function d(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),a=1;a<r;a++)t[a-1]=arguments[a];ne("error",e,t)}}function ne(e,r,t){{var a=A.ReactDebugCurrentFrame,s=a.getStackAddendum();s!==""&&(r+="%s",t=t.concat([s]));var u=t.map(function(i){return String(i)});u.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,u)}}var V=!1,B=!1,J=!1,G=!1,H=!1,n;n=Symbol.for("react.module.reference");function D(e){return!!(typeof e=="string"||typeof e=="function"||e===_||e===j||H||e===C||e===w||e===h||G||e===P||V||B||J||typeof e=="object"&&e!==null&&(e.$$typeof===x||e.$$typeof===m||e.$$typeof===b||e.$$typeof===g||e.$$typeof===c||e.$$typeof===n||e.getModuleId!==void 0))}function ae(e,r,t){var a=e.displayName;if(a)return a;var s=r.displayName||r.name||"";return s!==""?t+"("+s+")":t}function me(e){return e.displayName||"Context"}function S(e){if(e==null)return null;if(typeof e.tag=="number"&&d("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case _:return"Fragment";case E:return"Portal";case j:return"Profiler";case C:return"StrictMode";case w:return"Suspense";case h:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case g:var r=e;return me(r)+".Consumer";case b:var t=e;return me(t._context)+".Provider";case c:return ae(e,e.render,"ForwardRef");case m:var a=e.displayName||null;return a!==null?a:S(e.type)||"Memo";case x:{var s=e,u=s._payload,i=s._init;try{return S(i(u))}catch{return null}}}return null}var L=Object.assign,U=0,pe,ye,Ee,Me,Te,_e,xe;function je(){}je.__reactDisabledLog=!0;function Ze(){{if(U===0){pe=console.log,ye=console.info,Ee=console.warn,Me=console.error,Te=console.group,_e=console.groupCollapsed,xe=console.groupEnd;var e={configurable:!0,enumerable:!0,value:je,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}U++}}function Xe(){{if(U--,U===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:L({},e,{value:pe}),info:L({},e,{value:ye}),warn:L({},e,{value:Ee}),error:L({},e,{value:Me}),group:L({},e,{value:Te}),groupCollapsed:L({},e,{value:_e}),groupEnd:L({},e,{value:xe})})}U<0&&d("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var oe=A.ReactCurrentDispatcher,ie;function Z(e,r,t){{if(ie===void 0)try{throw Error()}catch(s){var a=s.stack.trim().match(/\n( *(at )?)/);ie=a&&a[1]||""}return`
`+ie+e}}var se=!1,X;{var Ke=typeof WeakMap=="function"?WeakMap:Map;X=new Ke}function be(e,r){if(!e||se)return"";{var t=X.get(e);if(t!==void 0)return t}var a;se=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var u;u=oe.current,oe.current=null,Ze();try{if(r){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(N){a=N}Reflect.construct(e,[],i)}else{try{i.call()}catch(N){a=N}e.call(i.prototype)}}else{try{throw Error()}catch(N){a=N}e()}}catch(N){if(N&&a&&typeof N.stack=="string"){for(var o=N.stack.split(`
`),M=a.stack.split(`
`),f=o.length-1,v=M.length-1;f>=1&&v>=0&&o[f]!==M[v];)v--;for(;f>=1&&v>=0;f--,v--)if(o[f]!==M[v]){if(f!==1||v!==1)do if(f--,v--,v<0||o[f]!==M[v]){var I=`
`+o[f].replace(" at new "," at ");return e.displayName&&I.includes("<anonymous>")&&(I=I.replace("<anonymous>",e.displayName)),typeof e=="function"&&X.set(e,I),I}while(f>=1&&v>=0);break}}}finally{se=!1,oe.current=u,Xe(),Error.prepareStackTrace=s}var F=e?e.displayName||e.name:"",ze=F?Z(F):"";return typeof e=="function"&&X.set(e,ze),ze}function $e(e,r,t){return be(e,!1)}function qe(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function K(e,r,t){if(e==null)return"";if(typeof e=="function")return be(e,qe(e));if(typeof e=="string")return Z(e);switch(e){case w:return Z("Suspense");case m:return Z("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case c:return $e(e.render);case p:return K(e.type,r,t);case x:{var a=e,s=a._payload,u=a._init;try{return K(u(s),r,t)}catch{}}}return""}var $=Object.prototype.hasOwnProperty,De={},Ie=A.ReactDebugCurrentFrame;function q(e){if(e){var r=e._owner,t=K(e.type,e._source,r?r.type:null);Ie.setExtraStackFrame(t)}else Ie.setExtraStackFrame(null)}function er(e,r,t,a,s){{var u=Function.call.bind($);for(var i in e)if(u(e,i)){var o=void 0;try{if(typeof e[i]!="function"){var M=Error((a||"React class")+": "+t+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw M.name="Invariant Violation",M}o=e[i](r,i,a,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(f){o=f}o&&!(o instanceof Error)&&(q(s),d("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",a||"React class",t,i,typeof o),q(null)),o instanceof Error&&!(o.message in De)&&(De[o.message]=!0,q(s),d("Failed %s type: %s",t,o.message),q(null))}}}var rr=Array.isArray;function ue(e){return rr(e)}function tr(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function nr(e){try{return Ce(e),!1}catch{return!0}}function Ce(e){return""+e}function Re(e){if(nr(e))return d("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",tr(e)),Ce(e)}var Q=A.ReactCurrentOwner,ar={key:!0,ref:!0,__self:!0,__source:!0},we,Oe,ce;ce={};function or(e){if($.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function ir(e){if($.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function sr(e,r){if(typeof e.ref=="string"&&Q.current&&r&&Q.current.stateNode!==r){var t=S(Q.current.type);ce[t]||(d('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',S(Q.current.type),e.ref),ce[t]=!0)}}function ur(e,r){{var t=function(){we||(we=!0,d("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function cr(e,r){{var t=function(){Oe||(Oe=!0,d("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var lr=function(e,r,t,a,s,u,i){var o={$$typeof:y,type:e,key:r,ref:t,props:i,_owner:u};return o._store={},Object.defineProperty(o._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(o,"_self",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.defineProperty(o,"_source",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o};function fr(e,r,t,a,s){{var u,i={},o=null,M=null;t!==void 0&&(Re(t),o=""+t),ir(r)&&(Re(r.key),o=""+r.key),or(r)&&(M=r.ref,sr(r,s));for(u in r)$.call(r,u)&&!ar.hasOwnProperty(u)&&(i[u]=r[u]);if(e&&e.defaultProps){var f=e.defaultProps;for(u in f)i[u]===void 0&&(i[u]=f[u])}if(o||M){var v=typeof e=="function"?e.displayName||e.name||"Unknown":e;o&&ur(i,v),M&&cr(i,v)}return lr(e,o,M,s,a,Q.current,i)}}var le=A.ReactCurrentOwner,Ae=A.ReactDebugCurrentFrame;function z(e){if(e){var r=e._owner,t=K(e.type,e._source,r?r.type:null);Ae.setExtraStackFrame(t)}else Ae.setExtraStackFrame(null)}var fe;fe=!1;function de(e){return typeof e=="object"&&e!==null&&e.$$typeof===y}function Se(){{if(le.current){var e=S(le.current.type);if(e)return`
`+o[f].replace(" at new "," at ");return e.displayName&&I.includes("<anonymous>")&&(I=I.replace("<anonymous>",e.displayName)),typeof e=="function"&&X.set(e,I),I}while(f>=1&&v>=0);break}}}finally{se=!1,oe.current=u,Xe(),Error.prepareStackTrace=s}var F=e?e.displayName||e.name:"",ze=F?Z(F):"";return typeof e=="function"&&X.set(e,ze),ze}function $e(e,r,t){return be(e,!1)}function qe(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function K(e,r,t){if(e==null)return"";if(typeof e=="function")return be(e,qe(e));if(typeof e=="string")return Z(e);switch(e){case w:return Z("Suspense");case h:return Z("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case c:return $e(e.render);case m:return K(e.type,r,t);case x:{var a=e,s=a._payload,u=a._init;try{return K(u(s),r,t)}catch{}}}return""}var $=Object.prototype.hasOwnProperty,De={},Ie=A.ReactDebugCurrentFrame;function q(e){if(e){var r=e._owner,t=K(e.type,e._source,r?r.type:null);Ie.setExtraStackFrame(t)}else Ie.setExtraStackFrame(null)}function er(e,r,t,a,s){{var u=Function.call.bind($);for(var i in e)if(u(e,i)){var o=void 0;try{if(typeof e[i]!="function"){var M=Error((a||"React class")+": "+t+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw M.name="Invariant Violation",M}o=e[i](r,i,a,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(f){o=f}o&&!(o instanceof Error)&&(q(s),d("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",a||"React class",t,i,typeof o),q(null)),o instanceof Error&&!(o.message in De)&&(De[o.message]=!0,q(s),d("Failed %s type: %s",t,o.message),q(null))}}}var rr=Array.isArray;function ue(e){return rr(e)}function tr(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function nr(e){try{return Ce(e),!1}catch{return!0}}function Ce(e){return""+e}function Re(e){if(nr(e))return d("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",tr(e)),Ce(e)}var Q=A.ReactCurrentOwner,ar={key:!0,ref:!0,__self:!0,__source:!0},we,Oe,ce;ce={};function or(e){if($.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function ir(e){if($.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function sr(e,r){if(typeof e.ref=="string"&&Q.current&&r&&Q.current.stateNode!==r){var t=S(Q.current.type);ce[t]||(d('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',S(Q.current.type),e.ref),ce[t]=!0)}}function ur(e,r){{var t=function(){we||(we=!0,d("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function cr(e,r){{var t=function(){Oe||(Oe=!0,d("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var lr=function(e,r,t,a,s,u,i){var o={$$typeof:y,type:e,key:r,ref:t,props:i,_owner:u};return o._store={},Object.defineProperty(o._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(o,"_self",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.defineProperty(o,"_source",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o};function fr(e,r,t,a,s){{var u,i={},o=null,M=null;t!==void 0&&(Re(t),o=""+t),ir(r)&&(Re(r.key),o=""+r.key),or(r)&&(M=r.ref,sr(r,s));for(u in r)$.call(r,u)&&!ar.hasOwnProperty(u)&&(i[u]=r[u]);if(e&&e.defaultProps){var f=e.defaultProps;for(u in f)i[u]===void 0&&(i[u]=f[u])}if(o||M){var v=typeof e=="function"?e.displayName||e.name||"Unknown":e;o&&ur(i,v),M&&cr(i,v)}return lr(e,o,M,s,a,Q.current,i)}}var le=A.ReactCurrentOwner,Ae=A.ReactDebugCurrentFrame;function z(e){if(e){var r=e._owner,t=K(e.type,e._source,r?r.type:null);Ae.setExtraStackFrame(t)}else Ae.setExtraStackFrame(null)}var fe;fe=!1;function de(e){return typeof e=="object"&&e!==null&&e.$$typeof===y}function Se(){{if(le.current){var e=S(le.current.type);if(e)return`

@@ -29,2 +29,2 @@ Check the render method of \``+e+"`."}return""}}function dr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),t=e.lineNumber;return`

Check the top-level render call using <`+t+">.")}return r}}function Pe(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=vr(r);if(Ne[t])return;Ne[t]=!0;var a="";e&&e._owner&&e._owner!==le.current&&(a=" It was passed a child from "+S(e._owner.type)+"."),z(e),d('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,a),z(null)}}function ke(e,r){{if(typeof e!="object")return;if(ue(e))for(var t=0;t<e.length;t++){var a=e[t];de(a)&&Pe(a,r)}else if(de(e))e._store&&(e._store.validated=!0);else if(e){var s=te(e);if(typeof s=="function"&&s!==e.entries)for(var u=s.call(e),i;!(i=u.next()).done;)de(i.value)&&Pe(i.value,r)}}}function gr(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===c||r.$$typeof===p))t=r.propTypes;else return;if(t){var a=S(r);er(t,e.props,"prop",a,e)}else if(r.PropTypes!==void 0&&!fe){fe=!0;var s=S(r);d("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",s||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&d("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function mr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var a=r[t];if(a!=="children"&&a!=="key"){z(e),d("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",a),z(null);break}}e.ref!==null&&(z(e),d("Invalid attribute `ref` supplied to `React.Fragment`."),z(null))}}function Le(e,r,t,a,s,u){{var i=D(e);if(!i){var o="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(o+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var M=dr(s);M?o+=M:o+=Se();var f;e===null?f="null":ue(e)?f="array":e!==void 0&&e.$$typeof===y?(f="<"+(S(e.type)||"Unknown")+" />",o=" Did you accidentally export a JSX literal instead of a component?"):f=typeof e,d("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",f,o)}var v=fr(e,r,t,s,u);if(v==null)return v;if(i){var I=r.children;if(I!==void 0)if(a)if(ue(I)){for(var F=0;F<I.length;F++)ke(I[F],e);Object.freeze&&Object.freeze(I)}else d("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else ke(I,e)}return e===_?mr(v):gr(v),v}}function pr(e,r,t){return Le(e,r,t,!0)}function hr(e,r,t){return Le(e,r,t,!1)}var yr=hr,Er=pr;Y.Fragment=_,Y.jsx=yr,Y.jsxs=Er}()),Y}process.env.NODE_ENV==="production"?ee.exports=Fe():ee.exports=We();var h=ee.exports;const Ye=(T,y)=>{const E=l.useRef(null),[_,C]=l.useState(!1),[j,b]=l.useState(!1),[g,c]=l.useState(!1),[w,m]=l.useState([0,0]),[p,x]=l.useState(0),[P,k]=l.useState(!1),re=l.useRef([0,0]),te=l.useRef([0,0]),A=l.useRef([0,0]),d=l.useRef(void 0),ne=()=>{x(p+(Math.random()-.5)*6)},V=()=>{var D;console.log("activate");const n=(D=E.current)==null?void 0:D.getBoundingClientRect();n&&(re.current=[n==null?void 0:n.x,n==null?void 0:n.y],te.current=[n==null?void 0:n.width,n==null?void 0:n.height],A.current=[(n==null?void 0:n.x)+(n==null?void 0:n.width)/2,(n==null?void 0:n.y)+(n==null?void 0:n.height)/2]),T&&T(!0),C(!0),b(!1)},B=()=>{clearTimeout(d.current),T&&T(!1),C(!1)},J=n=>{const[D,ae]=A.current;y===!0&&x(Math.atan2(n.clientY-ae,n.clientX-D)),y==="onMove"&&x(p+.01),m([n.clientX,n.clientY])},G=n=>{if(n.target===null||g===!0)return;const D=n.target.tagName.toLowerCase();(D==="a"||D==="button")&&(n.stopPropagation(),c(!0))},H=n=>{if(n.target===null||g===!1)return;const D=n.target.tagName.toLowerCase();(D==="a"||D==="button")&&(n.stopPropagation(),c(!1))};return l.useEffect(()=>{clearTimeout(d.current),_&&y==="auto"&&(d.current=setTimeout(ne,1e3));const n=E.current;return n&&(n.addEventListener("mouseenter",V),n.addEventListener("mouseleave",B),n.addEventListener("mousemove",J),n.addEventListener("mouseover",G),n.addEventListener("mouseout",H)),()=>{clearTimeout(d.current),n&&(n.removeEventListener("mouseenter",V),n.removeEventListener("mouseleave",B),n.removeEventListener("mousemove",J),n.removeEventListener("mouseover",G),n.removeEventListener("mouseout",H))}},[p,_,g]),l.useEffect(()=>(setTimeout(j?()=>k(!0):()=>k(!1),200),()=>{k(!1)}),[j]),[E,_,j,g,w,p,P,n=>b(n)]},O={active:"_active_fg1m5_1",cursorWrapper:"_cursorWrapper_fg1m5_10",cursor:"_cursor_fg1m5_10",show:"_show_fg1m5_1",forCenter:"_forCenter_fg1m5_34",shell:"_shell_fg1m5_47",unmounting:"_unmounting_fg1m5_51",smooth:"_smooth_fg1m5_55",hover:"_hover_fg1m5_61"},Ue=({cursor:T,x:y,y:E,angle:_,scale:C,unmounting:j,rotating:b,hoverClassName:g})=>{let c=O.cursorWrapper;return j&&(c=c+" "+O.unmounting),b==="auto"&&(c=c+" "+O.smooth),h.jsx("div",{className:c,style:{left:y,top:E,transform:`rotate(${_}rad) scale(${C})`},children:h.jsx("div",{className:O.cursor,children:h.jsx("div",{className:O.forCenter,children:h.jsx("div",{className:g,children:T})})})})},me=l.createContext(null);function Qe({children:T,cursor:y="Кастомный курсор",rotating:E=!1,scale:_=1,hoverClassName:C=O.hover}){const j=l.useContext(me),[b,g,c,w,[m,p],x,P,k]=Ye(j,E);return h.jsxs("div",{ref:b,className:g?O.shell+" "+O.active:O.shell,children:[h.jsx(me.Provider,{value:k,children:T}),g&&!P&&h.jsx(Ue,{cursor:y,x:m,y:p,angle:E?x:0,scale:_,unmounting:c,rotating:E,hoverClassName:w?C:""})]})}const Ve="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEyLjI1MTIgMTEuNDY4MUwxNC44MjI2IDkuMjExMThDMTQuOTg0MyA5LjA3NDE0IDE1LjIwMDggOC45OTgzMSAxNS40MjU1IDkuMDAwMDNDMTUuNjUwMiA5LjAwMTc0IDE1Ljg2NTIgOS4wODA4NiAxNi4wMjQyIDkuMjIwMzVDMTYuMTgzMSA5LjM1OTgzIDE2LjI3MzIgOS41NDg1MiAxNi4yNzUyIDkuNzQ1NzdDMTYuMjc3MSA5Ljk0MzAzIDE2LjE5MDcgMTAuMTMzMSAxNi4wMzQ2IDEwLjI3NDlMMTQuOTI2MyAxMS4yNDc3TDIzLjE0MjkgMTEuMjQ3N0MyMy4zNzAyIDExLjI0NzcgMjMuNTg4MiAxMS4zMjY5IDIzLjc0ODkgMTEuNDY4QzIzLjkwOTcgMTEuNjA5MSAyNCAxMS44MDA1IDI0IDEyQzI0IDEyLjE5OTUgMjMuOTA5NyAxMi4zOTA5IDIzLjc0ODkgMTIuNTMyQzIzLjU4ODIgMTIuNjczIDIzLjM3MDIgMTIuNzUyMyAyMy4xNDI5IDEyLjc1MjNMMTQuOTI2MyAxMi43NTIzTDE2LjAzNDYgMTMuNzI1QzE2LjE5MDcgMTMuODY2OSAxNi4yNzcxIDE0LjA1NyAxNi4yNzUyIDE0LjI1NDJDMTYuMjczMiAxNC40NTE1IDE2LjE4MzEgMTQuNjQwMiAxNi4wMjQyIDE0Ljc3OTdDMTUuODY1MiAxNC45MTkxIDE1LjY1MDIgMTQuOTk4MyAxNS40MjU1IDE1QzE1LjIwMDggMTUuMDAxNyAxNC45ODQzIDE0LjkyNTkgMTQuODIyNiAxNC43ODg4TDEyLjI1MTIgMTIuNTMxOUMxMi4wOTA1IDEyLjM5MDggMTIuMDAwMiAxMi4xOTk1IDEyLjAwMDIgMTJDMTIuMDAwMiAxMS44MDA1IDEyLjA5MDUgMTEuNjA5MiAxMi4yNTEyIDExLjQ2ODFaIiBmaWxsPSJibGFjayIvPgo8L3N2Zz4K",Be=h.jsx("div",{style:{width:"100px",height:"100px",backgroundImage:`url(${Ve})`,backgroundSize:"contain"}}),Je={text:"_text_1qg3d_1"},Ge=({text:T="...",color:y="black",donutColor:E="#eeeeee90"})=>h.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 500 500",width:"100",height:"100",children:[h.jsx("defs",{children:h.jsx("path",{d:"M250 440C145.114 440 60 354.886 60 250C60 145.114 145.114 60 250 60C354.886 60 440 145.114 440 250C440 354.886 345.351 440 240.465 440H250Z",id:"textcircle"})}),h.jsx("circle",{cx:"249.5",cy:"249.5",r:"200",fill:"transparent",strokeWidth:"80",stroke:E,id:"background"}),h.jsx("text",{dy:"0",className:Je.text,fill:y,children:h.jsx("textPath",{xlinkHref:"#textcircle",children:T})})]}),He=h.jsx("div",{style:{borderRadius:"50%",width:"10px",height:"10px",backgroundColor:"red",opacity:"50%"}});R.CircleWithText=Ge,R.CustomCursor=Qe,R.LaserDot=He,R.RotatingArrow=Be,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});
Check the top-level render call using <`+t+">.")}return r}}function Pe(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=vr(r);if(Ne[t])return;Ne[t]=!0;var a="";e&&e._owner&&e._owner!==le.current&&(a=" It was passed a child from "+S(e._owner.type)+"."),z(e),d('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,a),z(null)}}function ke(e,r){{if(typeof e!="object")return;if(ue(e))for(var t=0;t<e.length;t++){var a=e[t];de(a)&&Pe(a,r)}else if(de(e))e._store&&(e._store.validated=!0);else if(e){var s=te(e);if(typeof s=="function"&&s!==e.entries)for(var u=s.call(e),i;!(i=u.next()).done;)de(i.value)&&Pe(i.value,r)}}}function gr(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===c||r.$$typeof===m))t=r.propTypes;else return;if(t){var a=S(r);er(t,e.props,"prop",a,e)}else if(r.PropTypes!==void 0&&!fe){fe=!0;var s=S(r);d("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",s||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&d("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function hr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var a=r[t];if(a!=="children"&&a!=="key"){z(e),d("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",a),z(null);break}}e.ref!==null&&(z(e),d("Invalid attribute `ref` supplied to `React.Fragment`."),z(null))}}function Le(e,r,t,a,s,u){{var i=D(e);if(!i){var o="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(o+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var M=dr(s);M?o+=M:o+=Se();var f;e===null?f="null":ue(e)?f="array":e!==void 0&&e.$$typeof===y?(f="<"+(S(e.type)||"Unknown")+" />",o=" Did you accidentally export a JSX literal instead of a component?"):f=typeof e,d("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",f,o)}var v=fr(e,r,t,s,u);if(v==null)return v;if(i){var I=r.children;if(I!==void 0)if(a)if(ue(I)){for(var F=0;F<I.length;F++)ke(I[F],e);Object.freeze&&Object.freeze(I)}else d("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else ke(I,e)}return e===_?hr(v):gr(v),v}}function mr(e,r,t){return Le(e,r,t,!0)}function pr(e,r,t){return Le(e,r,t,!1)}var yr=pr,Er=mr;Y.Fragment=_,Y.jsx=yr,Y.jsxs=Er}()),Y}process.env.NODE_ENV==="production"?ee.exports=Fe():ee.exports=We();var p=ee.exports;const Ye=(T,y)=>{const E=l.useRef(null),[_,C]=l.useState(!1),[j,b]=l.useState(!1),[g,c]=l.useState(!1),[w,h]=l.useState([0,0]),[m,x]=l.useState(0),[P,k]=l.useState(!1),re=l.useRef([0,0]),te=l.useRef([0,0]),A=l.useRef([0,0]),d=l.useRef(void 0),ne=()=>{x(m+(Math.random()-.5)*6)},V=()=>{var D;console.log("activate");const n=(D=E.current)==null?void 0:D.getBoundingClientRect();n&&(re.current=[n==null?void 0:n.x,n==null?void 0:n.y],te.current=[n==null?void 0:n.width,n==null?void 0:n.height],A.current=[(n==null?void 0:n.x)+(n==null?void 0:n.width)/2,(n==null?void 0:n.y)+(n==null?void 0:n.height)/2]),T&&T(!0),C(!0),b(!1)},B=()=>{clearTimeout(d.current),T&&T(!1),C(!1)},J=n=>{const[D,ae]=A.current;y===!0&&x(Math.atan2(n.clientY-ae,n.clientX-D)),y==="onMove"&&x(m+.01),h([n.clientX,n.clientY])},G=n=>{if(n.target===null||g===!0)return;const D=n.target.tagName.toLowerCase();(D==="a"||D==="button")&&(n.stopPropagation(),c(!0))},H=n=>{if(n.target===null||g===!1)return;const D=n.target.tagName.toLowerCase();(D==="a"||D==="button")&&(n.stopPropagation(),c(!1))};return l.useEffect(()=>{clearTimeout(d.current),_&&y==="auto"&&(d.current=setTimeout(ne,1e3));const n=E.current;return n&&(n.addEventListener("mouseenter",V),n.addEventListener("mouseleave",B),n.addEventListener("mousemove",J),n.addEventListener("mouseover",G),n.addEventListener("mouseout",H)),()=>{clearTimeout(d.current),n&&(n.removeEventListener("mouseenter",V),n.removeEventListener("mouseleave",B),n.removeEventListener("mousemove",J),n.removeEventListener("mouseover",G),n.removeEventListener("mouseout",H))}},[m,_,g]),l.useEffect(()=>(setTimeout(j?()=>k(!0):()=>k(!1),200),()=>{k(!1)}),[j]),[E,_,j,g,w,m,P,n=>b(n)]},O={active:"_active_1achf_1",cursorWrapper:"_cursorWrapper_1achf_10",cursor:"_cursor_1achf_10",show:"_show_1achf_1",forCenter:"_forCenter_1achf_34",shell:"_shell_1achf_46",unmounting:"_unmounting_1achf_50",smooth:"_smooth_1achf_54",hover:"_hover_1achf_60"},Ue=({cursor:T,x:y,y:E,angle:_,scale:C,unmounting:j,rotating:b,hoverClassName:g})=>{let c=O.cursorWrapper;return j&&(c=c+" "+O.unmounting),b==="auto"&&(c=c+" "+O.smooth),p.jsx("div",{className:c,style:{left:y,top:E,transform:`rotate(${_}rad) scale(${C})`},children:p.jsx("div",{className:O.cursor,children:p.jsx("div",{className:O.forCenter,children:p.jsx("div",{className:g,children:T})})})})},he=l.createContext(null);function Qe({children:T,cursor:y="Кастомный курсор",rotating:E=!1,scale:_=1,hoverClassName:C=O.hover}){const j=l.useContext(he),[b,g,c,w,[h,m],x,P,k]=Ye(j,E);return p.jsxs("div",{ref:b,className:g?O.shell+" "+O.active:O.shell,children:[p.jsx(he.Provider,{value:k,children:T}),g&&!P&&p.jsx(Ue,{cursor:y,x:h,y:m,angle:E?x:0,scale:_,unmounting:c,rotating:E,hoverClassName:w?C:""})]})}const Ve="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEyLjI1MTIgMTEuNDY4MUwxNC44MjI2IDkuMjExMThDMTQuOTg0MyA5LjA3NDE0IDE1LjIwMDggOC45OTgzMSAxNS40MjU1IDkuMDAwMDNDMTUuNjUwMiA5LjAwMTc0IDE1Ljg2NTIgOS4wODA4NiAxNi4wMjQyIDkuMjIwMzVDMTYuMTgzMSA5LjM1OTgzIDE2LjI3MzIgOS41NDg1MiAxNi4yNzUyIDkuNzQ1NzdDMTYuMjc3MSA5Ljk0MzAzIDE2LjE5MDcgMTAuMTMzMSAxNi4wMzQ2IDEwLjI3NDlMMTQuOTI2MyAxMS4yNDc3TDIzLjE0MjkgMTEuMjQ3N0MyMy4zNzAyIDExLjI0NzcgMjMuNTg4MiAxMS4zMjY5IDIzLjc0ODkgMTEuNDY4QzIzLjkwOTcgMTEuNjA5MSAyNCAxMS44MDA1IDI0IDEyQzI0IDEyLjE5OTUgMjMuOTA5NyAxMi4zOTA5IDIzLjc0ODkgMTIuNTMyQzIzLjU4ODIgMTIuNjczIDIzLjM3MDIgMTIuNzUyMyAyMy4xNDI5IDEyLjc1MjNMMTQuOTI2MyAxMi43NTIzTDE2LjAzNDYgMTMuNzI1QzE2LjE5MDcgMTMuODY2OSAxNi4yNzcxIDE0LjA1NyAxNi4yNzUyIDE0LjI1NDJDMTYuMjczMiAxNC40NTE1IDE2LjE4MzEgMTQuNjQwMiAxNi4wMjQyIDE0Ljc3OTdDMTUuODY1MiAxNC45MTkxIDE1LjY1MDIgMTQuOTk4MyAxNS40MjU1IDE1QzE1LjIwMDggMTUuMDAxNyAxNC45ODQzIDE0LjkyNTkgMTQuODIyNiAxNC43ODg4TDEyLjI1MTIgMTIuNTMxOUMxMi4wOTA1IDEyLjM5MDggMTIuMDAwMiAxMi4xOTk1IDEyLjAwMDIgMTJDMTIuMDAwMiAxMS44MDA1IDEyLjA5MDUgMTEuNjA5MiAxMi4yNTEyIDExLjQ2ODFaIiBmaWxsPSJibGFjayIvPgo8L3N2Zz4K",Be=p.jsx("div",{style:{width:"100px",height:"100px",backgroundImage:`url(${Ve})`,backgroundSize:"contain"}}),Je={text:"_text_1qg3d_1"},Ge=({text:T="...",color:y="black",donutColor:E="#eeeeee90"})=>p.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 500 500",width:"100",height:"100",children:[p.jsx("defs",{children:p.jsx("path",{d:"M250 440C145.114 440 60 354.886 60 250C60 145.114 145.114 60 250 60C354.886 60 440 145.114 440 250C440 354.886 345.351 440 240.465 440H250Z",id:"textcircle"})}),p.jsx("circle",{cx:"249.5",cy:"249.5",r:"200",fill:"transparent",strokeWidth:"80",stroke:E,id:"background"}),p.jsx("text",{dy:"0",className:Je.text,fill:y,children:p.jsx("textPath",{xlinkHref:"#textcircle",children:T})})]}),He=p.jsx("div",{style:{borderRadius:"50%",width:"10px",height:"10px",backgroundColor:"red",opacity:"50%"}});R.CircleWithText=Ge,R.CustomCursor=Qe,R.LaserDot=He,R.RotatingArrow=Be,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});
{
"name": "@feverus/react-custom-cursor",
"private": false,
"version": "0.1.5",
"version": "0.1.6",
"license": "MIT",

@@ -6,0 +6,0 @@ "type": "module",

@@ -8,2 +8,6 @@ # Кастомные курсоры для React приложений

## Демо страница
[https://react-custom-cursor-demo.vercel.app](https://react-custom-cursor-demo.vercel.app)
## Использование:

@@ -10,0 +14,0 @@

Sorry, the diff of this file is not supported yet