earthnut 0.1.7-alpha.0 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/image/index.d.ts +12 -0
- package/components/image/types.d.ts +12 -0
- package/components/image/useSrcChange.d.ts +11 -0
- package/components/ripples/LazyRippleEle.d.ts +1 -1
- package/components/ripples/RipplesEle.d.ts +1 -1
- package/components/ripples/types.d.ts +1 -1
- package/components/ripples/useOptionUpdate.d.ts +1 -1
- package/customHooks/useRipples/buildBackground/utils/create-canvas-element.d.ts +1 -1
- package/customHooks/useRipples/use-lazy-ripple.d.ts +5 -4
- package/index.cjs +1 -1
- package/index.d.ts +10 -3
- package/index.mjs +1 -1
- package/package.json +3 -53
- package/705/index.cjs +0 -7
- package/705/index.mjs +0 -7
- package/BackgroundRipple/index.cjs +0 -7
- package/BackgroundRipple/index.mjs +0 -7
- package/Layout/index.cjs +0 -7
- package/Layout/index.mjs +0 -7
- package/LazyBackgroundRipple/index.cjs +0 -7
- package/LazyBackgroundRipple/index.mjs +0 -7
- package/components/index.d.ts +0 -12
- package/customHooks/index.d.ts +0 -12
- package/dog.d.ts +0 -8
- package/useAnimationFrame/index.cjs +0 -7
- package/useAnimationFrame/index.mjs +0 -7
- package/useInputIsComposing/index.cjs +0 -7
- package/useInputIsComposing/index.mjs +0 -7
- package/useLazyRipples/index.cjs +0 -7
- package/useLazyRipples/index.mjs +0 -7
- package/useRipples/index.cjs +0 -7
- package/useRipples/index.mjs +0 -7
- package/useTimeId/index.cjs +0 -7
- package/useTimeId/index.mjs +0 -7
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license MIT
|
|
3
|
-
* earthnut@LazyBackgroundRipple/index.cjs
|
|
4
|
-
* Copyright (c) 2025 earthnut.dev
|
|
5
|
-
* 请在项目根参看详细许可证明
|
|
6
|
-
*/
|
|
7
|
-
"use client";(()=>{var e,t,r={86:e=>{"use strict";e.exports=require("a-js-tools")},98:(e,t,r)=>{"use strict";var n;r.d(t,{U:()=>o});var o=r(291).I4.div(n||(n=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n position: relative;\n top: 0px;\n left: 0px;\n z-index: 1;\n width: 100%;\n height: 100%;\n min-width: 1px;\n min-height: 1px;\n contain: layout paint style;\n will-change: transform, opacity;\n"])))},224:(e,t,r)=>{"use strict";r.d(t,{k:()=>l});var n=r(570),o=r(953);r(713);function i(e){"@babel/helpers - typeof";return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function u(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=i(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==i(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(e,t){var r=(0,o.useRef)(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach(function(t){u(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},t));(0,o.useEffect)(function(){t&&e.current&&Object.keys(e.current.defaults).forEach(function(o){var i,s,c=t[o],u=(i=c,s=r.current[o],(0,n.isArray)(i)&&(0,n.isArray)(s)&&(i.length!==s.length||!i.every(function(e){return i[e]===s[e]}))||(!(0,n.isArray)(i)||!(0,n.isArray)(s))&&i!==s);e.current&&u&&(r.current[o]=(0,n.isArray)(c)?a(c):t[o],e.current.set(o,c))})},[t])}},291:(e,t,r)=>{"use strict";r.d(t,{I4:()=>Ut});var n=function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)};Object.create;function o(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}Object.create;"function"==typeof SuppressedError&&SuppressedError;var i=r(953),a=r.n(i),s=r(945),c=r.n(s),u="-ms-",l="-moz-",f="-webkit-",p="comm",h="rule",d="decl",y="@keyframes",v=Math.abs,m=String.fromCharCode,g=Object.assign;function b(e){return e.trim()}function S(e,t){return(e=t.exec(e))?e[0]:e}function w(e,t,r){return e.replace(t,r)}function O(e,t,r){return e.indexOf(t,r)}function P(e,t){return 0|e.charCodeAt(t)}function j(e,t,r){return e.slice(t,r)}function A(e){return e.length}function C(e){return e.length}function I(e,t){return t.push(e),e}function x(e,t){return e.filter(function(e){return!S(e,t)})}var E=1,k=1,R=0,$=0,N=0,_="";function T(e,t,r,n,o,i,a,s){return{value:e,root:t,parent:r,type:n,props:o,children:i,line:E,column:k,length:a,return:"",siblings:s}}function D(e,t){return g(T("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function z(e){for(;e.root;)e=D(e.root,{children:[e]});I(e,e.siblings)}function F(){return N=$>0?P(_,--$):0,k--,10===N&&(k=1,E--),N}function M(){return N=$<R?P(_,$++):0,k++,10===N&&(k=1,E++),N}function B(){return P(_,$)}function L(){return $}function G(e,t){return j(_,e,t)}function W(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Y(e){return E=k=1,R=A(_=e),$=0,[]}function q(e){return _="",e}function U(e){return b(G($-1,Z(91===e?e+2:40===e?e+1:e)))}function H(e){for(;(N=B())&&N<33;)M();return W(e)>2||W(N)>3?"":" "}function V(e,t){for(;--t&&M()&&!(N<48||N>102||N>57&&N<65||N>70&&N<97););return G(e,L()+(t<6&&32==B()&&32==M()))}function Z(e){for(;M();)switch(N){case e:return $;case 34:case 39:34!==e&&39!==e&&Z(N);break;case 40:41===e&&Z(e);break;case 92:M()}return $}function J(e,t){for(;M()&&e+N!==57&&(e+N!==84||47!==B()););return"/*"+G(t,$-1)+"*"+m(47===e?e:M())}function K(e){for(;!W(B());)M();return G(e,$)}function Q(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function X(e,t,r,n){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case d:return e.return=e.return||e.value;case p:return"";case y:return e.return=e.value+"{"+Q(e.children,n)+"}";case h:if(!A(e.value=e.props.join(",")))return""}return A(r=Q(e.children,n))?e.return=e.value+"{"+r+"}":""}function ee(e,t,r){switch(function(e,t){return 45^P(e,0)?(((t<<2^P(e,0))<<2^P(e,1))<<2^P(e,2))<<2^P(e,3):0}(e,t)){case 5103:return f+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return f+e+e;case 4789:return l+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return f+e+l+e+u+e+e;case 5936:switch(P(e,t+11)){case 114:return f+e+u+w(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return f+e+u+w(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return f+e+u+w(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return f+e+u+e+e;case 6165:return f+e+u+"flex-"+e+e;case 5187:return f+e+w(e,/(\w+).+(:[^]+)/,f+"box-$1$2"+u+"flex-$1$2")+e;case 5443:return f+e+u+"flex-item-"+w(e,/flex-|-self/g,"")+(S(e,/flex-|baseline/)?"":u+"grid-row-"+w(e,/flex-|-self/g,""))+e;case 4675:return f+e+u+"flex-line-pack"+w(e,/align-content|flex-|-self/g,"")+e;case 5548:return f+e+u+w(e,"shrink","negative")+e;case 5292:return f+e+u+w(e,"basis","preferred-size")+e;case 6060:return f+"box-"+w(e,"-grow","")+f+e+u+w(e,"grow","positive")+e;case 4554:return f+w(e,/([^-])(transform)/g,"$1"+f+"$2")+e;case 6187:return w(w(w(e,/(zoom-|grab)/,f+"$1"),/(image-set)/,f+"$1"),e,"")+e;case 5495:case 3959:return w(e,/(image-set\([^]*)/,f+"$1$`$1");case 4968:return w(w(e,/(.+:)(flex-)?(.*)/,f+"box-pack:$3"+u+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+f+e+e;case 4200:if(!S(e,/flex-|baseline/))return u+"grid-column-align"+j(e,t)+e;break;case 2592:case 3360:return u+w(e,"template-","")+e;case 4384:case 3616:return r&&r.some(function(e,r){return t=r,S(e.props,/grid-\w+-end/)})?~O(e+(r=r[t].value),"span",0)?e:u+w(e,"-start","")+e+u+"grid-row-span:"+(~O(r,"span",0)?S(r,/\d+/):+S(r,/\d+/)-+S(e,/\d+/))+";":u+w(e,"-start","")+e;case 4896:case 4128:return r&&r.some(function(e){return S(e.props,/grid-\w+-start/)})?e:u+w(w(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return w(e,/(.+)-inline(.+)/,f+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(A(e)-1-t>6)switch(P(e,t+1)){case 109:if(45!==P(e,t+4))break;case 102:return w(e,/(.+:)(.+)-([^]+)/,"$1"+f+"$2-$3$1"+l+(108==P(e,t+3)?"$3":"$2-$3"))+e;case 115:return~O(e,"stretch",0)?ee(w(e,"stretch","fill-available"),t,r)+e:e}break;case 5152:case 5920:return w(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(t,r,n,o,i,a,s){return u+r+":"+n+s+(o?u+r+"-span:"+(i?a:+a-+n)+s:"")+e});case 4949:if(121===P(e,t+6))return w(e,":",":"+f)+e;break;case 6444:switch(P(e,45===P(e,14)?18:11)){case 120:return w(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+f+(45===P(e,14)?"inline-":"")+"box$3$1"+f+"$2$3$1"+u+"$2box$3")+e;case 100:return w(e,":",":"+u)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return w(e,"scroll-","scroll-snap-")+e}return e}function te(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case d:return void(e.return=ee(e.value,e.length,r));case y:return Q([D(e,{value:w(e.value,"@","@"+f)})],n);case h:if(e.length)return function(e,t){return e.map(t).join("")}(r=e.props,function(t){switch(S(t,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":z(D(e,{props:[w(t,/:(read-\w+)/,":-moz-$1")]})),z(D(e,{props:[t]})),g(e,{props:x(r,n)});break;case"::placeholder":z(D(e,{props:[w(t,/:(plac\w+)/,":"+f+"input-$1")]})),z(D(e,{props:[w(t,/:(plac\w+)/,":-moz-$1")]})),z(D(e,{props:[w(t,/:(plac\w+)/,u+"input-$1")]})),z(D(e,{props:[t]})),g(e,{props:x(r,n)})}return""})}}function re(e){return q(ne("",null,null,null,[""],e=Y(e),0,[0],e))}function ne(e,t,r,n,o,i,a,s,c){for(var u=0,l=0,f=a,p=0,h=0,d=0,y=1,g=1,b=1,S=0,j="",C=o,x=i,E=n,k=j;g;)switch(d=S,S=M()){case 40:if(108!=d&&58==P(k,f-1)){-1!=O(k+=w(U(S),"&","&\f"),"&\f",v(u?s[u-1]:0))&&(b=-1);break}case 34:case 39:case 91:k+=U(S);break;case 9:case 10:case 13:case 32:k+=H(d);break;case 92:k+=V(L()-1,7);continue;case 47:switch(B()){case 42:case 47:I(ie(J(M(),L()),t,r,c),c);break;default:k+="/"}break;case 123*y:s[u++]=A(k)*b;case 125*y:case 59:case 0:switch(S){case 0:case 125:g=0;case 59+l:-1==b&&(k=w(k,/\f/g,"")),h>0&&A(k)-f&&I(h>32?ae(k+";",n,r,f-1,c):ae(w(k," ","")+";",n,r,f-2,c),c);break;case 59:k+=";";default:if(I(E=oe(k,t,r,u,l,o,s,j,C=[],x=[],f,i),i),123===S)if(0===l)ne(k,t,E,E,C,i,f,s,x);else switch(99===p&&110===P(k,3)?100:p){case 100:case 108:case 109:case 115:ne(e,E,E,n&&I(oe(e,E,E,0,0,o,s,j,o,C=[],f,x),x),o,x,f,s,n?C:x);break;default:ne(k,E,E,E,[""],x,0,s,x)}}u=l=h=0,y=b=1,j=k="",f=a;break;case 58:f=1+A(k),h=d;default:if(y<1)if(123==S)--y;else if(125==S&&0==y++&&125==F())continue;switch(k+=m(S),S*y){case 38:b=l>0?1:(k+="\f",-1);break;case 44:s[u++]=(A(k)-1)*b,b=1;break;case 64:45===B()&&(k+=U(M())),p=B(),l=f=A(j=k+=K(L())),S++;break;case 45:45===d&&2==A(k)&&(y=0)}}return i}function oe(e,t,r,n,o,i,a,s,c,u,l,f){for(var p=o-1,d=0===o?i:[""],y=C(d),m=0,g=0,S=0;m<n;++m)for(var O=0,P=j(e,p+1,p=v(g=a[m])),A=e;O<y;++O)(A=b(g>0?d[O]+" "+P:w(P,/&\f/g,d[O])))&&(c[S++]=A);return T(e,t,r,0===o?h:s,c,u,l,f)}function ie(e,t,r,n){return T(e,t,r,p,m(N),j(e,2,-2),0,n)}function ae(e,t,r,n,o){return T(e,t,r,d,j(e,0,n),j(e,n+1,-1),n,o)}var se={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},ce="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",ue="active",le="data-styled-version",fe="6.1.19",pe="/*!sc*/\n",he="undefined"!=typeof window&&"undefined"!=typeof document,de=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY&&("false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY)),ye=(new Set,Object.freeze([])),ve=Object.freeze({});function me(e,t,r){return void 0===r&&(r=ve),e.theme!==r.theme&&e.theme||t||r.theme}var ge=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),be=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Se=/(^-|-$)/g;function we(e){return e.replace(be,"-").replace(Se,"")}var Oe=/(a)(d)/gi,Pe=function(e){return String.fromCharCode(e+(e>25?39:97))};function je(e){var t,r="";for(t=Math.abs(e);t>52;t=t/52|0)r=Pe(t%52)+r;return(Pe(t%52)+r).replace(Oe,"$1-$2")}var Ae,Ce=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},Ie=function(e){return Ce(5381,e)};function xe(e){return je(Ie(e)>>>0)}function Ee(e){return e.displayName||e.name||"Component"}function ke(e){return"string"==typeof e&&!0}var Re="function"==typeof Symbol&&Symbol.for,$e=Re?Symbol.for("react.memo"):60115,Ne=Re?Symbol.for("react.forward_ref"):60112,_e={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Te={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},De={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},ze=((Ae={})[Ne]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Ae[$e]=De,Ae);function Fe(e){return("type"in(t=e)&&t.type.$$typeof)===$e?De:"$$typeof"in e?ze[e.$$typeof]:_e;var t}var Me=Object.defineProperty,Be=Object.getOwnPropertyNames,Le=Object.getOwnPropertySymbols,Ge=Object.getOwnPropertyDescriptor,We=Object.getPrototypeOf,Ye=Object.prototype;function qe(e,t,r){if("string"!=typeof t){if(Ye){var n=We(t);n&&n!==Ye&&qe(e,n,r)}var o=Be(t);Le&&(o=o.concat(Le(t)));for(var i=Fe(e),a=Fe(t),s=0;s<o.length;++s){var c=o[s];if(!(c in Te||r&&r[c]||a&&c in a||i&&c in i)){var u=Ge(t,c);try{Me(e,c,u)}catch(e){}}}}return e}function Ue(e){return"function"==typeof e}function He(e){return"object"==typeof e&&"styledComponentId"in e}function Ve(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function Ze(e,t){if(0===e.length)return"";for(var r=e[0],n=1;n<e.length;n++)r+=t?t+e[n]:e[n];return r}function Je(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function Ke(e,t,r){if(void 0===r&&(r=!1),!r&&!Je(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var n=0;n<t.length;n++)e[n]=Ke(e[n],t[n]);else if(Je(t))for(var n in t)e[n]=Ke(e[n],t[n]);return e}function Qe(e,t){Object.defineProperty(e,"toString",{value:t})}function Xe(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):""))}var et=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,r=0;r<e;r++)t+=this.groupSizes[r];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var r=this.groupSizes,n=r.length,o=n;e>=o;)if((o<<=1)<0)throw Xe(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(r),this.length=o;for(var i=n;i<o;i++)this.groupSizes[i]=0}for(var a=this.indexOfGroup(e+1),s=(i=0,t.length);i<s;i++)this.tag.insertRule(a,t[i])&&(this.groupSizes[e]++,a++)},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],r=this.indexOfGroup(e),n=r+t;this.groupSizes[e]=0;for(var o=r;o<n;o++)this.tag.deleteRule(r)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var r=this.groupSizes[e],n=this.indexOfGroup(e),o=n+r,i=n;i<o;i++)t+="".concat(this.tag.getRule(i)).concat(pe);return t},e}(),tt=new Map,rt=new Map,nt=1,ot=function(e){if(tt.has(e))return tt.get(e);for(;rt.has(nt);)nt++;var t=nt++;return tt.set(e,t),rt.set(t,e),t},it=function(e,t){nt=t+1,tt.set(e,t),rt.set(t,e)},at="style[".concat(ce,"][").concat(le,'="').concat(fe,'"]'),st=new RegExp("^".concat(ce,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),ct=function(e,t,r){for(var n,o=r.split(","),i=0,a=o.length;i<a;i++)(n=o[i])&&e.registerName(t,n)},ut=function(e,t){for(var r,n=(null!==(r=t.textContent)&&void 0!==r?r:"").split(pe),o=[],i=0,a=n.length;i<a;i++){var s=n[i].trim();if(s){var c=s.match(st);if(c){var u=0|parseInt(c[1],10),l=c[2];0!==u&&(it(l,u),ct(e,l,c[3]),e.getTag().insertRules(u,o)),o.length=0}else o.push(s)}}},lt=function(e){for(var t=document.querySelectorAll(at),r=0,n=t.length;r<n;r++){var o=t[r];o&&o.getAttribute(ce)!==ue&&(ut(e,o),o.parentNode&&o.parentNode.removeChild(o))}};function ft(){return r.nc}var pt=function(e){var t=document.head,r=e||t,n=document.createElement("style"),o=function(e){var t=Array.from(e.querySelectorAll("style[".concat(ce,"]")));return t[t.length-1]}(r),i=void 0!==o?o.nextSibling:null;n.setAttribute(ce,ue),n.setAttribute(le,fe);var a=ft();return a&&n.setAttribute("nonce",a),r.insertBefore(n,i),n},ht=function(){function e(e){this.element=pt(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,r=0,n=t.length;r<n;r++){var o=t[r];if(o.ownerNode===e)return o}throw Xe(17)}(this.element),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""},e}(),dt=function(){function e(e){this.element=pt(e),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var r=document.createTextNode(t);return this.element.insertBefore(r,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),yt=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),vt=he,mt={isServer:!he,useCSSOMInjection:!de},gt=function(){function e(e,t,r){void 0===e&&(e=ve),void 0===t&&(t={});var o=this;this.options=n(n({},mt),e),this.gs=t,this.names=new Map(r),this.server=!!e.isServer,!this.server&&he&&vt&&(vt=!1,lt(this)),Qe(this,function(){return function(e){for(var t=e.getTag(),r=t.length,n="",o=function(r){var o=function(e){return rt.get(e)}(r);if(void 0===o)return"continue";var i=e.names.get(o),a=t.getGroup(r);if(void 0===i||!i.size||0===a.length)return"continue";var s="".concat(ce,".g").concat(r,'[id="').concat(o,'"]'),c="";void 0!==i&&i.forEach(function(e){e.length>0&&(c+="".concat(e,","))}),n+="".concat(a).concat(s,'{content:"').concat(c,'"}').concat(pe)},i=0;i<r;i++)o(i);return n}(o)})}return e.registerId=function(e){return ot(e)},e.prototype.rehydrate=function(){!this.server&&he&<(this)},e.prototype.reconstructWithOptions=function(t,r){return void 0===r&&(r=!0),new e(n(n({},this.options),t),this.gs,r&&this.names||void 0)},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.useCSSOMInjection,r=e.target;return e.isServer?new yt(r):t?new ht(r):new dt(r)}(this.options),new et(e)));var e},e.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},e.prototype.registerName=function(e,t){if(ot(e),this.names.has(e))this.names.get(e).add(t);else{var r=new Set;r.add(t),this.names.set(e,r)}},e.prototype.insertRules=function(e,t,r){this.registerName(e,t),this.getTag().insertRules(ot(e),r)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(ot(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e}(),bt=/&/g,St=/^\s*\/\/.*$/gm;function wt(e,t){return e.map(function(e){return"rule"===e.type&&(e.value="".concat(t," ").concat(e.value),e.value=e.value.replaceAll(",",",".concat(t," ")),e.props=e.props.map(function(e){return"".concat(t," ").concat(e)})),Array.isArray(e.children)&&"@keyframes"!==e.type&&(e.children=wt(e.children,t)),e})}function Ot(e){var t,r,n,o=void 0===e?ve:e,i=o.options,a=void 0===i?ve:i,s=o.plugins,c=void 0===s?ye:s,u=function(e,n,o){return o.startsWith(r)&&o.endsWith(r)&&o.replaceAll(r,"").length>0?".".concat(t):e},l=c.slice();l.push(function(e){e.type===h&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(bt,r).replace(n,u))}),a.prefix&&l.push(te),l.push(X);var f=function(e,o,i,s){void 0===o&&(o=""),void 0===i&&(i=""),void 0===s&&(s="&"),t=s,r=o,n=new RegExp("\\".concat(r,"\\b"),"g");var c=e.replace(St,""),u=re(i||o?"".concat(i," ").concat(o," { ").concat(c," }"):c);a.namespace&&(u=wt(u,a.namespace));var f,p,h,d=[];return Q(u,(f=l.concat((h=function(e){return d.push(e)},function(e){e.root||(e=e.return)&&h(e)})),p=C(f),function(e,t,r,n){for(var o="",i=0;i<p;i++)o+=f[i](e,t,r,n)||"";return o})),d};return f.hash=c.length?c.reduce(function(e,t){return t.name||Xe(15),Ce(e,t.name)},5381).toString():"",f}var Pt=new gt,jt=Ot(),At=a().createContext({shouldForwardProp:void 0,styleSheet:Pt,stylis:jt}),Ct=(At.Consumer,a().createContext(void 0));function It(){return(0,i.useContext)(At)}function xt(e){var t=(0,i.useState)(e.stylisPlugins),r=t[0],n=t[1],o=It().styleSheet,s=(0,i.useMemo)(function(){var t=o;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t},[e.disableCSSOMInjection,e.sheet,e.target,o]),u=(0,i.useMemo)(function(){return Ot({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:r})},[e.enableVendorPrefixes,e.namespace,r]);(0,i.useEffect)(function(){c()(r,e.stylisPlugins)||n(e.stylisPlugins)},[e.stylisPlugins]);var l=(0,i.useMemo)(function(){return{shouldForwardProp:e.shouldForwardProp,styleSheet:s,stylis:u}},[e.shouldForwardProp,s,u]);return a().createElement(At.Provider,{value:l},a().createElement(Ct.Provider,{value:u},e.children))}var Et=function(){function e(e,t){var r=this;this.inject=function(e,t){void 0===t&&(t=jt);var n=r.name+t.hash;e.hasNameForId(r.id,n)||e.insertRules(r.id,n,t(r.rules,n,"@keyframes"))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t,Qe(this,function(){throw Xe(12,String(r.name))})}return e.prototype.getName=function(e){return void 0===e&&(e=jt),this.name+e.hash},e}(),kt=function(e){return e>="A"&&e<="Z"};function Rt(e){for(var t="",r=0;r<e.length;r++){var n=e[r];if(1===r&&"-"===n&&"-"===e[0])return e;kt(n)?t+="-"+n.toLowerCase():t+=n}return t.startsWith("ms-")?"-"+t:t}var $t=function(e){return null==e||!1===e||""===e},Nt=function(e){var t,r,n=[];for(var i in e){var a=e[i];e.hasOwnProperty(i)&&!$t(a)&&(Array.isArray(a)&&a.isCss||Ue(a)?n.push("".concat(Rt(i),":"),a,";"):Je(a)?n.push.apply(n,o(o(["".concat(i," {")],Nt(a),!1),["}"],!1)):n.push("".concat(Rt(i),": ").concat((t=i,null==(r=a)||"boolean"==typeof r||""===r?"":"number"!=typeof r||0===r||t in se||t.startsWith("--")?String(r).trim():"".concat(r,"px")),";")))}return n};function _t(e,t,r,n){return $t(e)?[]:He(e)?[".".concat(e.styledComponentId)]:Ue(e)?!Ue(o=e)||o.prototype&&o.prototype.isReactComponent||!t?[e]:_t(e(t),t,r,n):e instanceof Et?r?(e.inject(r,n),[e.getName(n)]):[e]:Je(e)?Nt(e):Array.isArray(e)?Array.prototype.concat.apply(ye,e.map(function(e){return _t(e,t,r,n)})):[e.toString()];var o}function Tt(e){for(var t=0;t<e.length;t+=1){var r=e[t];if(Ue(r)&&!He(r))return!1}return!0}var Dt=Ie(fe),zt=function(){function e(e,t,r){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===r||r.isStatic)&&Tt(e),this.componentId=t,this.baseHash=Ce(Dt,t),this.baseStyle=r,gt.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,r){var n=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,r):"";if(this.isStatic&&!r.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))n=Ve(n,this.staticRulesId);else{var o=Ze(_t(this.rules,e,t,r)),i=je(Ce(this.baseHash,o)>>>0);if(!t.hasNameForId(this.componentId,i)){var a=r(o,".".concat(i),void 0,this.componentId);t.insertRules(this.componentId,i,a)}n=Ve(n,i),this.staticRulesId=i}else{for(var s=Ce(this.baseHash,r.hash),c="",u=0;u<this.rules.length;u++){var l=this.rules[u];if("string"==typeof l)c+=l;else if(l){var f=Ze(_t(l,e,t,r));s=Ce(s,f+u),c+=f}}if(c){var p=je(s>>>0);t.hasNameForId(this.componentId,p)||t.insertRules(this.componentId,p,r(c,".".concat(p),void 0,this.componentId)),n=Ve(n,p)}}return n},e}(),Ft=a().createContext(void 0);Ft.Consumer;var Mt={};new Set;function Bt(e,t,r){var o=He(e),s=e,c=!ke(e),u=t.attrs,l=void 0===u?ye:u,f=t.componentId,p=void 0===f?function(e,t){var r="string"!=typeof e?"sc":we(e);Mt[r]=(Mt[r]||0)+1;var n="".concat(r,"-").concat(xe(fe+r+Mt[r]));return t?"".concat(t,"-").concat(n):n}(t.displayName,t.parentComponentId):f,h=t.displayName,d=void 0===h?function(e){return ke(e)?"styled.".concat(e):"Styled(".concat(Ee(e),")")}(e):h,y=t.displayName&&t.componentId?"".concat(we(t.displayName),"-").concat(t.componentId):t.componentId||p,v=o&&s.attrs?s.attrs.concat(l).filter(Boolean):l,m=t.shouldForwardProp;if(o&&s.shouldForwardProp){var g=s.shouldForwardProp;if(t.shouldForwardProp){var b=t.shouldForwardProp;m=function(e,t){return g(e,t)&&b(e,t)}}else m=g}var S=new zt(r,y,o?s.componentStyle:void 0);function w(e,t){return function(e,t,r){var o=e.attrs,s=e.componentStyle,c=e.defaultProps,u=e.foldedComponentIds,l=e.styledComponentId,f=e.target,p=a().useContext(Ft),h=It(),d=e.shouldForwardProp||h.shouldForwardProp,y=me(t,p,c)||ve,v=function(e,t,r){for(var o,i=n(n({},t),{className:void 0,theme:r}),a=0;a<e.length;a+=1){var s=Ue(o=e[a])?o(i):o;for(var c in s)i[c]="className"===c?Ve(i[c],s[c]):"style"===c?n(n({},i[c]),s[c]):s[c]}return t.className&&(i.className=Ve(i.className,t.className)),i}(o,t,y),m=v.as||f,g={};for(var b in v)void 0===v[b]||"$"===b[0]||"as"===b||"theme"===b&&v.theme===y||("forwardedAs"===b?g.as=v.forwardedAs:d&&!d(b,m)||(g[b]=v[b]));var S=function(e,t){var r=It();return e.generateAndInjectStyles(t,r.styleSheet,r.stylis)}(s,v),w=Ve(u,l);return S&&(w+=" "+S),v.className&&(w+=" "+v.className),g[ke(m)&&!ge.has(m)?"class":"className"]=w,r&&(g.ref=r),(0,i.createElement)(m,g)}(O,e,t)}w.displayName=d;var O=a().forwardRef(w);return O.attrs=v,O.componentStyle=S,O.displayName=d,O.shouldForwardProp=m,O.foldedComponentIds=o?Ve(s.foldedComponentIds,s.styledComponentId):"",O.styledComponentId=y,O.target=o?s.target:e,Object.defineProperty(O,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=o?function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n=0,o=t;n<o.length;n++)Ke(e,o[n],!0);return e}({},s.defaultProps,e):e}}),Qe(O,function(){return".".concat(O.styledComponentId)}),c&&qe(O,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),O}function Lt(e,t){for(var r=[e[0]],n=0,o=t.length;n<o;n+=1)r.push(t[n],e[n+1]);return r}var Gt=function(e){return Object.assign(e,{isCss:!0})};function Wt(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(Ue(e)||Je(e))return Gt(_t(Lt(ye,o([e],t,!0))));var n=e;return 0===t.length&&1===n.length&&"string"==typeof n[0]?_t(n):Gt(_t(Lt(n,t)))}function Yt(e,t,r){if(void 0===r&&(r=ve),!t)throw Xe(1,t);var i=function(n){for(var i=[],a=1;a<arguments.length;a++)i[a-1]=arguments[a];return e(t,r,Wt.apply(void 0,o([n],i,!1)))};return i.attrs=function(o){return Yt(e,t,n(n({},r),{attrs:Array.prototype.concat(r.attrs,o).filter(Boolean)}))},i.withConfig=function(o){return Yt(e,t,n(n({},r),o))},i}var qt=function(e){return Yt(Bt,e)},Ut=qt;ge.forEach(function(e){Ut[e]=qt(e)});!function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=Tt(e),gt.registerId(this.componentId+1)}e.prototype.createStyles=function(e,t,r,n){var o=n(Ze(_t(this.rules,t,r,n)),""),i=this.componentId+e;r.insertRules(i,i,o)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,r,n){e>2&>.registerId(this.componentId+e),this.removeStyles(e,r),this.createStyles(e,t,r,n)}}();(function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return"";var r=ft(),n=Ze([r&&'nonce="'.concat(r,'"'),"".concat(ce,'="true"'),"".concat(le,'="').concat(fe,'"')].filter(Boolean)," ");return"<style ".concat(n,">").concat(t,"</style>")},this.getStyleTags=function(){if(e.sealed)throw Xe(2);return e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)throw Xe(2);var r=e.instance.toString();if(!r)return[];var o=((t={})[ce]="",t[le]=fe,t.dangerouslySetInnerHTML={__html:r},t),i=ft();return i&&(o.nonce=i),[a().createElement("style",n({},o,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new gt({isServer:!0}),this.sealed=!1}e.prototype.collectStyles=function(e){if(this.sealed)throw Xe(2);return a().createElement(xt,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw Xe(3)}})(),"__sc-".concat(ce,"__")},378:e=>{"use strict";e.exports=require("a-element-inline-style")},570:e=>{"use strict";e.exports=require("a-type-of-js")},634:(e,t,r)=>{"use strict";r.d(t,{useLazyRipples:()=>a});var n=r(953);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function a(){var e=o((0,n.useState)(),2),t=e[0],i=e[1],a=o((0,n.useState)(!1),2),s=a[0],c=a[1],u=o((0,n.useState)(null),2),l=u[0],f=u[1];return(0,n.useEffect)(function(){c(!0),r.e(705).then(r.bind(r,705)).then(function(e){i(e.useRipples)}).catch(function(e){f(e)}).finally(function(){c(!1)})},[]),{hook:t,isLoading:s,error:l}}},713:()=>{"use strict";function e(t){"@babel/helpers - typeof";return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,r(o.key),o)}}function r(t){var r=function(t,r){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,r||"default");if("object"!=e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==e(r)?r:r+""}new(function(){return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var t=function(){};return Object.setPrototypeOf(t,this),Object.defineProperties(t,{info:{value:function(){},configurable:!1,writable:!1},warn:{value:function(){},configurable:!1,writable:!1},error:{value:function(){},configurable:!1,writable:!1},type:{value:!1,configurable:!1,writable:!1}}),t},[{key:"clear",value:function(){}}])}())({name:"earthnut",type:!1})},945:e=>{e.exports=function(e,t,r,n){var o=r?r.call(n,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),c=0;c<i.length;c++){var u=i[c];if(!s(u))return!1;var l=e[u],f=t[u];if(!1===(o=r?r.call(n,l,f,u):void 0)||void 0===o&&l!==f)return!1}return!0}},953:e=>{"use strict";e.exports=require("react")}},n={};function o(e){var t=n[e];if(void 0!==t)return t.exports;var i=n[e]={exports:{}};return r[e](i,i.exports,o),i.exports}o.m=r,o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce((t,r)=>(o.f[r](e,t),t),[])),o.u=e=>e+"/index.cjs",o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="earthnut:",o.l=(r,n,i,a)=>{if(e[r])e[r].push(n);else{var s,c;if(void 0!==i)for(var u=document.getElementsByTagName("script"),l=0;l<u.length;l++){var f=u[l];if(f.getAttribute("src")==r||f.getAttribute("data-webpack")==t+i){s=f;break}}s||(c=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,o.nc&&s.setAttribute("nonce",o.nc),s.setAttribute("data-webpack",t+i),s.src=r),e[r]=[n];var p=(t,n)=>{s.onerror=s.onload=null,clearTimeout(h);var o=e[r];if(delete e[r],s.parentNode&&s.parentNode.removeChild(s),o&&o.forEach(e=>e(n)),t)return t(n)},h=setTimeout(p.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=p.bind(null,s.onerror),s.onload=p.bind(null,s.onload),c&&document.head.appendChild(s)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var t=o.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=r[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e+"../"})(),(()=>{var e={731:0,839:0};o.f.j=(t,r)=>{var n=o.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else{var i=new Promise((r,o)=>n=e[t]=[r,o]);r.push(n[2]=i);var a=o.p+o.u(t),s=new Error;o.l(a,r=>{if(o.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var i=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;s.message="Loading chunk "+t+" failed.\n("+i+": "+a+")",s.name="ChunkLoadError",s.type=i,s.request=a,n[1](s)}},"chunk-"+t,t)}};var t=(t,r)=>{var n,i,[a,s,c]=r,u=0;if(a.some(t=>0!==e[t])){for(n in s)o.o(s,n)&&(o.m[n]=s[n]);if(c)c(o)}for(t&&t(r);u<a.length;u++)i=a[u],o.o(e,i)&&e[i]&&e[i][0](),e[i]=0},r=self.webpackChunkearthnut=self.webpackChunkearthnut||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})(),o.nc=void 0;var i={};(()=>{"use strict";o.r(i),o.d(i,{LazyBackgroundRipple:()=>d});var e=o(953),t=o.n(e),r=o(224),n=o(570),a=o(98),s=o(634);function c(e){"@babel/helpers - typeof";return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}var u=["children","style","option"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},l.apply(null,arguments)}function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach(function(t){h(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function h(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=c(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==c(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var d=(0,e.forwardRef)(function(o,i){var c=o.children,f=o.style,h=o.option,d=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(o,u),y=(0,e.useRef)(null),v=(0,s.useLazyRipples)().hook,m=(0,e.useRef)(null);return(0,r.k)(m,h),(0,e.useImperativeHandle)(i,function(){return{toggleState:function(){var e;null==m||null===(e=m.current)||void 0===e||e.changePlayingState()},get state(){var e,t;return null!==(e=null==m||null===(t=m.current)||void 0===t?void 0:t.options.playingState)&&void 0!==e&&e},pause:function(){var e;null==m||null===(e=m.current)||void 0===e||e.pause()},set:function(e){if(!(0,n.isUndefined)(e))for(var t=Object.keys(e),r=0,o=t.length;r<o;r++){var i,a=t[r];null==m||null===(i=m.current)||void 0===i||i.set(a,e[a])}}}}),(0,e.useEffect)(function(){v&&(m.current=v(y,h).current)},[v]),t().createElement(a.U,l({style:p({backgroundRepeat:"round"},f)},d),t().createElement("canvas",{ref:y,"data-earthnut-ui":"canvas",width:0,height:0}),c)});d.displayName="en-lazy-background-ripple"})(),module.exports.earthnut=i})();
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license MIT
|
|
3
|
-
* earthnut@LazyBackgroundRipple/index.mjs
|
|
4
|
-
* Copyright (c) 2025 earthnut.dev
|
|
5
|
-
* 请在项目根参看详细许可证明
|
|
6
|
-
*/
|
|
7
|
-
"use client";import*as e from"a-js-tools";import*as t from"a-type-of-js";import*as r from"react";import*as n from"a-element-inline-style";var o,i,a={98:(e,t,r)=>{var n;r.d(t,{U:()=>o});var o=r(291).I4.div(n||(n=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n position: relative;\n top: 0px;\n left: 0px;\n z-index: 1;\n width: 100%;\n height: 100%;\n min-width: 1px;\n min-height: 1px;\n contain: layout paint style;\n will-change: transform, opacity;\n"])))},161:(t,r,n)=>{t.exports=(e=>{var t={};return n.d(t,e),t})({debounce:()=>e.debounce,enArr:()=>e.enArr,getRandomInt:()=>e.getRandomInt,getRandomString:()=>e.getRandomString})},224:(e,t,r)=>{r.d(t,{k:()=>l});var n=r(362),o=r(649);r(713);function i(e){"@babel/helpers - typeof";return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function u(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=i(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==i(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(e,t){var r=(0,o.useRef)(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach(function(t){u(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},t));(0,o.useEffect)(function(){t&&e.current&&Object.keys(e.current.defaults).forEach(function(o){var i,s,c=t[o],u=(i=c,s=r.current[o],(0,n.isArray)(i)&&(0,n.isArray)(s)&&(i.length!==s.length||!i.every(function(e){return i[e]===s[e]}))||(!(0,n.isArray)(i)||!(0,n.isArray)(s))&&i!==s);e.current&&u&&(r.current[o]=(0,n.isArray)(c)?a(c):t[o],e.current.set(o,c))})},[t])}},291:(e,t,r)=>{r.d(t,{I4:()=>Yt});var n=function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)};Object.create;function o(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}Object.create;"function"==typeof SuppressedError&&SuppressedError;var i=r(649),a=r(945),s=r.n(a),c="-ms-",u="-moz-",l="-webkit-",f="comm",p="rule",d="decl",h="@keyframes",y=Math.abs,m=String.fromCharCode,v=Object.assign;function g(e){return e.trim()}function b(e,t){return(e=t.exec(e))?e[0]:e}function S(e,t,r){return e.replace(t,r)}function w(e,t,r){return e.indexOf(t,r)}function O(e,t){return 0|e.charCodeAt(t)}function P(e,t,r){return e.slice(t,r)}function j(e){return e.length}function I(e){return e.length}function A(e,t){return t.push(e),e}function x(e,t){return e.filter(function(e){return!b(e,t)})}var E=1,C=1,k=0,_=0,R=0,$="";function N(e,t,r,n,o,i,a,s){return{value:e,root:t,parent:r,type:n,props:o,children:i,line:E,column:C,length:a,return:"",siblings:s}}function D(e,t){return v(N("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function T(e){for(;e.root;)e=D(e.root,{children:[e]});A(e,e.siblings)}function z(){return R=_>0?O($,--_):0,C--,10===R&&(C=1,E--),R}function F(){return R=_<k?O($,_++):0,C++,10===R&&(C=1,E++),R}function M(){return O($,_)}function B(){return _}function G(e,t){return P($,e,t)}function L(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function W(e){return E=C=1,k=j($=e),_=0,[]}function H(e){return $="",e}function Y(e){return g(G(_-1,Z(91===e?e+2:40===e?e+1:e)))}function U(e){for(;(R=M())&&R<33;)F();return L(e)>2||L(R)>3?"":" "}function q(e,t){for(;--t&&F()&&!(R<48||R>102||R>57&&R<65||R>70&&R<97););return G(e,B()+(t<6&&32==M()&&32==F()))}function Z(e){for(;F();)switch(R){case e:return _;case 34:case 39:34!==e&&39!==e&&Z(R);break;case 40:41===e&&Z(e);break;case 92:F()}return _}function V(e,t){for(;F()&&e+R!==57&&(e+R!==84||47!==M()););return"/*"+G(t,_-1)+"*"+m(47===e?e:F())}function J(e){for(;!L(M());)F();return G(e,_)}function K(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function Q(e,t,r,n){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case d:return e.return=e.return||e.value;case f:return"";case h:return e.return=e.value+"{"+K(e.children,n)+"}";case p:if(!j(e.value=e.props.join(",")))return""}return j(r=K(e.children,n))?e.return=e.value+"{"+r+"}":""}function X(e,t,r){switch(function(e,t){return 45^O(e,0)?(((t<<2^O(e,0))<<2^O(e,1))<<2^O(e,2))<<2^O(e,3):0}(e,t)){case 5103:return l+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return l+e+e;case 4789:return u+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return l+e+u+e+c+e+e;case 5936:switch(O(e,t+11)){case 114:return l+e+c+S(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return l+e+c+S(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return l+e+c+S(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return l+e+c+e+e;case 6165:return l+e+c+"flex-"+e+e;case 5187:return l+e+S(e,/(\w+).+(:[^]+)/,l+"box-$1$2"+c+"flex-$1$2")+e;case 5443:return l+e+c+"flex-item-"+S(e,/flex-|-self/g,"")+(b(e,/flex-|baseline/)?"":c+"grid-row-"+S(e,/flex-|-self/g,""))+e;case 4675:return l+e+c+"flex-line-pack"+S(e,/align-content|flex-|-self/g,"")+e;case 5548:return l+e+c+S(e,"shrink","negative")+e;case 5292:return l+e+c+S(e,"basis","preferred-size")+e;case 6060:return l+"box-"+S(e,"-grow","")+l+e+c+S(e,"grow","positive")+e;case 4554:return l+S(e,/([^-])(transform)/g,"$1"+l+"$2")+e;case 6187:return S(S(S(e,/(zoom-|grab)/,l+"$1"),/(image-set)/,l+"$1"),e,"")+e;case 5495:case 3959:return S(e,/(image-set\([^]*)/,l+"$1$`$1");case 4968:return S(S(e,/(.+:)(flex-)?(.*)/,l+"box-pack:$3"+c+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+l+e+e;case 4200:if(!b(e,/flex-|baseline/))return c+"grid-column-align"+P(e,t)+e;break;case 2592:case 3360:return c+S(e,"template-","")+e;case 4384:case 3616:return r&&r.some(function(e,r){return t=r,b(e.props,/grid-\w+-end/)})?~w(e+(r=r[t].value),"span",0)?e:c+S(e,"-start","")+e+c+"grid-row-span:"+(~w(r,"span",0)?b(r,/\d+/):+b(r,/\d+/)-+b(e,/\d+/))+";":c+S(e,"-start","")+e;case 4896:case 4128:return r&&r.some(function(e){return b(e.props,/grid-\w+-start/)})?e:c+S(S(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return S(e,/(.+)-inline(.+)/,l+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(j(e)-1-t>6)switch(O(e,t+1)){case 109:if(45!==O(e,t+4))break;case 102:return S(e,/(.+:)(.+)-([^]+)/,"$1"+l+"$2-$3$1"+u+(108==O(e,t+3)?"$3":"$2-$3"))+e;case 115:return~w(e,"stretch",0)?X(S(e,"stretch","fill-available"),t,r)+e:e}break;case 5152:case 5920:return S(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(t,r,n,o,i,a,s){return c+r+":"+n+s+(o?c+r+"-span:"+(i?a:+a-+n)+s:"")+e});case 4949:if(121===O(e,t+6))return S(e,":",":"+l)+e;break;case 6444:switch(O(e,45===O(e,14)?18:11)){case 120:return S(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+l+(45===O(e,14)?"inline-":"")+"box$3$1"+l+"$2$3$1"+c+"$2box$3")+e;case 100:return S(e,":",":"+c)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return S(e,"scroll-","scroll-snap-")+e}return e}function ee(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case d:return void(e.return=X(e.value,e.length,r));case h:return K([D(e,{value:S(e.value,"@","@"+l)})],n);case p:if(e.length)return function(e,t){return e.map(t).join("")}(r=e.props,function(t){switch(b(t,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":T(D(e,{props:[S(t,/:(read-\w+)/,":-moz-$1")]})),T(D(e,{props:[t]})),v(e,{props:x(r,n)});break;case"::placeholder":T(D(e,{props:[S(t,/:(plac\w+)/,":"+l+"input-$1")]})),T(D(e,{props:[S(t,/:(plac\w+)/,":-moz-$1")]})),T(D(e,{props:[S(t,/:(plac\w+)/,c+"input-$1")]})),T(D(e,{props:[t]})),v(e,{props:x(r,n)})}return""})}}function te(e){return H(re("",null,null,null,[""],e=W(e),0,[0],e))}function re(e,t,r,n,o,i,a,s,c){for(var u=0,l=0,f=a,p=0,d=0,h=0,v=1,g=1,b=1,P=0,I="",x=o,E=i,C=n,k=I;g;)switch(h=P,P=F()){case 40:if(108!=h&&58==O(k,f-1)){-1!=w(k+=S(Y(P),"&","&\f"),"&\f",y(u?s[u-1]:0))&&(b=-1);break}case 34:case 39:case 91:k+=Y(P);break;case 9:case 10:case 13:case 32:k+=U(h);break;case 92:k+=q(B()-1,7);continue;case 47:switch(M()){case 42:case 47:A(oe(V(F(),B()),t,r,c),c);break;default:k+="/"}break;case 123*v:s[u++]=j(k)*b;case 125*v:case 59:case 0:switch(P){case 0:case 125:g=0;case 59+l:-1==b&&(k=S(k,/\f/g,"")),d>0&&j(k)-f&&A(d>32?ie(k+";",n,r,f-1,c):ie(S(k," ","")+";",n,r,f-2,c),c);break;case 59:k+=";";default:if(A(C=ne(k,t,r,u,l,o,s,I,x=[],E=[],f,i),i),123===P)if(0===l)re(k,t,C,C,x,i,f,s,E);else switch(99===p&&110===O(k,3)?100:p){case 100:case 108:case 109:case 115:re(e,C,C,n&&A(ne(e,C,C,0,0,o,s,I,o,x=[],f,E),E),o,E,f,s,n?x:E);break;default:re(k,C,C,C,[""],E,0,s,E)}}u=l=d=0,v=b=1,I=k="",f=a;break;case 58:f=1+j(k),d=h;default:if(v<1)if(123==P)--v;else if(125==P&&0==v++&&125==z())continue;switch(k+=m(P),P*v){case 38:b=l>0?1:(k+="\f",-1);break;case 44:s[u++]=(j(k)-1)*b,b=1;break;case 64:45===M()&&(k+=Y(F())),p=M(),l=f=j(I=k+=J(B())),P++;break;case 45:45===h&&2==j(k)&&(v=0)}}return i}function ne(e,t,r,n,o,i,a,s,c,u,l,f){for(var d=o-1,h=0===o?i:[""],m=I(h),v=0,b=0,w=0;v<n;++v)for(var O=0,j=P(e,d+1,d=y(b=a[v])),A=e;O<m;++O)(A=g(b>0?h[O]+" "+j:S(j,/&\f/g,h[O])))&&(c[w++]=A);return N(e,t,r,0===o?p:s,c,u,l,f)}function oe(e,t,r,n){return N(e,t,r,f,m(R),P(e,2,-2),0,n)}function ie(e,t,r,n,o){return N(e,t,r,d,P(e,0,n),P(e,n+1,-1),n,o)}var ae={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},se="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",ce="active",ue="data-styled-version",le="6.1.19",fe="/*!sc*/\n",pe="undefined"!=typeof window&&"undefined"!=typeof document,de=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY&&("false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY)),he=(new Set,Object.freeze([])),ye=Object.freeze({});function me(e,t,r){return void 0===r&&(r=ye),e.theme!==r.theme&&e.theme||t||r.theme}var ve=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),ge=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,be=/(^-|-$)/g;function Se(e){return e.replace(ge,"-").replace(be,"")}var we=/(a)(d)/gi,Oe=function(e){return String.fromCharCode(e+(e>25?39:97))};function Pe(e){var t,r="";for(t=Math.abs(e);t>52;t=t/52|0)r=Oe(t%52)+r;return(Oe(t%52)+r).replace(we,"$1-$2")}var je,Ie=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},Ae=function(e){return Ie(5381,e)};function xe(e){return Pe(Ae(e)>>>0)}function Ee(e){return e.displayName||e.name||"Component"}function Ce(e){return"string"==typeof e&&!0}var ke="function"==typeof Symbol&&Symbol.for,_e=ke?Symbol.for("react.memo"):60115,Re=ke?Symbol.for("react.forward_ref"):60112,$e={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Ne={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},De={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Te=((je={})[Re]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},je[_e]=De,je);function ze(e){return("type"in(t=e)&&t.type.$$typeof)===_e?De:"$$typeof"in e?Te[e.$$typeof]:$e;var t}var Fe=Object.defineProperty,Me=Object.getOwnPropertyNames,Be=Object.getOwnPropertySymbols,Ge=Object.getOwnPropertyDescriptor,Le=Object.getPrototypeOf,We=Object.prototype;function He(e,t,r){if("string"!=typeof t){if(We){var n=Le(t);n&&n!==We&&He(e,n,r)}var o=Me(t);Be&&(o=o.concat(Be(t)));for(var i=ze(e),a=ze(t),s=0;s<o.length;++s){var c=o[s];if(!(c in Ne||r&&r[c]||a&&c in a||i&&c in i)){var u=Ge(t,c);try{Fe(e,c,u)}catch(e){}}}}return e}function Ye(e){return"function"==typeof e}function Ue(e){return"object"==typeof e&&"styledComponentId"in e}function qe(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function Ze(e,t){if(0===e.length)return"";for(var r=e[0],n=1;n<e.length;n++)r+=t?t+e[n]:e[n];return r}function Ve(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function Je(e,t,r){if(void 0===r&&(r=!1),!r&&!Ve(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var n=0;n<t.length;n++)e[n]=Je(e[n],t[n]);else if(Ve(t))for(var n in t)e[n]=Je(e[n],t[n]);return e}function Ke(e,t){Object.defineProperty(e,"toString",{value:t})}function Qe(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):""))}var Xe=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,r=0;r<e;r++)t+=this.groupSizes[r];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var r=this.groupSizes,n=r.length,o=n;e>=o;)if((o<<=1)<0)throw Qe(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(r),this.length=o;for(var i=n;i<o;i++)this.groupSizes[i]=0}for(var a=this.indexOfGroup(e+1),s=(i=0,t.length);i<s;i++)this.tag.insertRule(a,t[i])&&(this.groupSizes[e]++,a++)},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],r=this.indexOfGroup(e),n=r+t;this.groupSizes[e]=0;for(var o=r;o<n;o++)this.tag.deleteRule(r)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var r=this.groupSizes[e],n=this.indexOfGroup(e),o=n+r,i=n;i<o;i++)t+="".concat(this.tag.getRule(i)).concat(fe);return t},e}(),et=new Map,tt=new Map,rt=1,nt=function(e){if(et.has(e))return et.get(e);for(;tt.has(rt);)rt++;var t=rt++;return et.set(e,t),tt.set(t,e),t},ot=function(e,t){rt=t+1,et.set(e,t),tt.set(t,e)},it="style[".concat(se,"][").concat(ue,'="').concat(le,'"]'),at=new RegExp("^".concat(se,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),st=function(e,t,r){for(var n,o=r.split(","),i=0,a=o.length;i<a;i++)(n=o[i])&&e.registerName(t,n)},ct=function(e,t){for(var r,n=(null!==(r=t.textContent)&&void 0!==r?r:"").split(fe),o=[],i=0,a=n.length;i<a;i++){var s=n[i].trim();if(s){var c=s.match(at);if(c){var u=0|parseInt(c[1],10),l=c[2];0!==u&&(ot(l,u),st(e,l,c[3]),e.getTag().insertRules(u,o)),o.length=0}else o.push(s)}}},ut=function(e){for(var t=document.querySelectorAll(it),r=0,n=t.length;r<n;r++){var o=t[r];o&&o.getAttribute(se)!==ce&&(ct(e,o),o.parentNode&&o.parentNode.removeChild(o))}};function lt(){return r.nc}var ft=function(e){var t=document.head,r=e||t,n=document.createElement("style"),o=function(e){var t=Array.from(e.querySelectorAll("style[".concat(se,"]")));return t[t.length-1]}(r),i=void 0!==o?o.nextSibling:null;n.setAttribute(se,ce),n.setAttribute(ue,le);var a=lt();return a&&n.setAttribute("nonce",a),r.insertBefore(n,i),n},pt=function(){function e(e){this.element=ft(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,r=0,n=t.length;r<n;r++){var o=t[r];if(o.ownerNode===e)return o}throw Qe(17)}(this.element),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""},e}(),dt=function(){function e(e){this.element=ft(e),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var r=document.createTextNode(t);return this.element.insertBefore(r,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),ht=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),yt=pe,mt={isServer:!pe,useCSSOMInjection:!de},vt=function(){function e(e,t,r){void 0===e&&(e=ye),void 0===t&&(t={});var o=this;this.options=n(n({},mt),e),this.gs=t,this.names=new Map(r),this.server=!!e.isServer,!this.server&&pe&&yt&&(yt=!1,ut(this)),Ke(this,function(){return function(e){for(var t=e.getTag(),r=t.length,n="",o=function(r){var o=function(e){return tt.get(e)}(r);if(void 0===o)return"continue";var i=e.names.get(o),a=t.getGroup(r);if(void 0===i||!i.size||0===a.length)return"continue";var s="".concat(se,".g").concat(r,'[id="').concat(o,'"]'),c="";void 0!==i&&i.forEach(function(e){e.length>0&&(c+="".concat(e,","))}),n+="".concat(a).concat(s,'{content:"').concat(c,'"}').concat(fe)},i=0;i<r;i++)o(i);return n}(o)})}return e.registerId=function(e){return nt(e)},e.prototype.rehydrate=function(){!this.server&&pe&&ut(this)},e.prototype.reconstructWithOptions=function(t,r){return void 0===r&&(r=!0),new e(n(n({},this.options),t),this.gs,r&&this.names||void 0)},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.useCSSOMInjection,r=e.target;return e.isServer?new ht(r):t?new pt(r):new dt(r)}(this.options),new Xe(e)));var e},e.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},e.prototype.registerName=function(e,t){if(nt(e),this.names.has(e))this.names.get(e).add(t);else{var r=new Set;r.add(t),this.names.set(e,r)}},e.prototype.insertRules=function(e,t,r){this.registerName(e,t),this.getTag().insertRules(nt(e),r)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(nt(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e}(),gt=/&/g,bt=/^\s*\/\/.*$/gm;function St(e,t){return e.map(function(e){return"rule"===e.type&&(e.value="".concat(t," ").concat(e.value),e.value=e.value.replaceAll(",",",".concat(t," ")),e.props=e.props.map(function(e){return"".concat(t," ").concat(e)})),Array.isArray(e.children)&&"@keyframes"!==e.type&&(e.children=St(e.children,t)),e})}function wt(e){var t,r,n,o=void 0===e?ye:e,i=o.options,a=void 0===i?ye:i,s=o.plugins,c=void 0===s?he:s,u=function(e,n,o){return o.startsWith(r)&&o.endsWith(r)&&o.replaceAll(r,"").length>0?".".concat(t):e},l=c.slice();l.push(function(e){e.type===p&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(gt,r).replace(n,u))}),a.prefix&&l.push(ee),l.push(Q);var f=function(e,o,i,s){void 0===o&&(o=""),void 0===i&&(i=""),void 0===s&&(s="&"),t=s,r=o,n=new RegExp("\\".concat(r,"\\b"),"g");var c=e.replace(bt,""),u=te(i||o?"".concat(i," ").concat(o," { ").concat(c," }"):c);a.namespace&&(u=St(u,a.namespace));var f,p,d,h=[];return K(u,(f=l.concat((d=function(e){return h.push(e)},function(e){e.root||(e=e.return)&&d(e)})),p=I(f),function(e,t,r,n){for(var o="",i=0;i<p;i++)o+=f[i](e,t,r,n)||"";return o})),h};return f.hash=c.length?c.reduce(function(e,t){return t.name||Qe(15),Ie(e,t.name)},5381).toString():"",f}var Ot=new vt,Pt=wt(),jt=i.default.createContext({shouldForwardProp:void 0,styleSheet:Ot,stylis:Pt}),It=(jt.Consumer,i.default.createContext(void 0));function At(){return(0,i.useContext)(jt)}function xt(e){var t=(0,i.useState)(e.stylisPlugins),r=t[0],n=t[1],o=At().styleSheet,a=(0,i.useMemo)(function(){var t=o;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t},[e.disableCSSOMInjection,e.sheet,e.target,o]),c=(0,i.useMemo)(function(){return wt({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:r})},[e.enableVendorPrefixes,e.namespace,r]);(0,i.useEffect)(function(){s()(r,e.stylisPlugins)||n(e.stylisPlugins)},[e.stylisPlugins]);var u=(0,i.useMemo)(function(){return{shouldForwardProp:e.shouldForwardProp,styleSheet:a,stylis:c}},[e.shouldForwardProp,a,c]);return i.default.createElement(jt.Provider,{value:u},i.default.createElement(It.Provider,{value:c},e.children))}var Et=function(){function e(e,t){var r=this;this.inject=function(e,t){void 0===t&&(t=Pt);var n=r.name+t.hash;e.hasNameForId(r.id,n)||e.insertRules(r.id,n,t(r.rules,n,"@keyframes"))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t,Ke(this,function(){throw Qe(12,String(r.name))})}return e.prototype.getName=function(e){return void 0===e&&(e=Pt),this.name+e.hash},e}(),Ct=function(e){return e>="A"&&e<="Z"};function kt(e){for(var t="",r=0;r<e.length;r++){var n=e[r];if(1===r&&"-"===n&&"-"===e[0])return e;Ct(n)?t+="-"+n.toLowerCase():t+=n}return t.startsWith("ms-")?"-"+t:t}var _t=function(e){return null==e||!1===e||""===e},Rt=function(e){var t,r,n=[];for(var i in e){var a=e[i];e.hasOwnProperty(i)&&!_t(a)&&(Array.isArray(a)&&a.isCss||Ye(a)?n.push("".concat(kt(i),":"),a,";"):Ve(a)?n.push.apply(n,o(o(["".concat(i," {")],Rt(a),!1),["}"],!1)):n.push("".concat(kt(i),": ").concat((t=i,null==(r=a)||"boolean"==typeof r||""===r?"":"number"!=typeof r||0===r||t in ae||t.startsWith("--")?String(r).trim():"".concat(r,"px")),";")))}return n};function $t(e,t,r,n){return _t(e)?[]:Ue(e)?[".".concat(e.styledComponentId)]:Ye(e)?!Ye(o=e)||o.prototype&&o.prototype.isReactComponent||!t?[e]:$t(e(t),t,r,n):e instanceof Et?r?(e.inject(r,n),[e.getName(n)]):[e]:Ve(e)?Rt(e):Array.isArray(e)?Array.prototype.concat.apply(he,e.map(function(e){return $t(e,t,r,n)})):[e.toString()];var o}function Nt(e){for(var t=0;t<e.length;t+=1){var r=e[t];if(Ye(r)&&!Ue(r))return!1}return!0}var Dt=Ae(le),Tt=function(){function e(e,t,r){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===r||r.isStatic)&&Nt(e),this.componentId=t,this.baseHash=Ie(Dt,t),this.baseStyle=r,vt.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,r){var n=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,r):"";if(this.isStatic&&!r.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))n=qe(n,this.staticRulesId);else{var o=Ze($t(this.rules,e,t,r)),i=Pe(Ie(this.baseHash,o)>>>0);if(!t.hasNameForId(this.componentId,i)){var a=r(o,".".concat(i),void 0,this.componentId);t.insertRules(this.componentId,i,a)}n=qe(n,i),this.staticRulesId=i}else{for(var s=Ie(this.baseHash,r.hash),c="",u=0;u<this.rules.length;u++){var l=this.rules[u];if("string"==typeof l)c+=l;else if(l){var f=Ze($t(l,e,t,r));s=Ie(s,f+u),c+=f}}if(c){var p=Pe(s>>>0);t.hasNameForId(this.componentId,p)||t.insertRules(this.componentId,p,r(c,".".concat(p),void 0,this.componentId)),n=qe(n,p)}}return n},e}(),zt=i.default.createContext(void 0);zt.Consumer;var Ft={};new Set;function Mt(e,t,r){var o=Ue(e),a=e,s=!Ce(e),c=t.attrs,u=void 0===c?he:c,l=t.componentId,f=void 0===l?function(e,t){var r="string"!=typeof e?"sc":Se(e);Ft[r]=(Ft[r]||0)+1;var n="".concat(r,"-").concat(xe(le+r+Ft[r]));return t?"".concat(t,"-").concat(n):n}(t.displayName,t.parentComponentId):l,p=t.displayName,d=void 0===p?function(e){return Ce(e)?"styled.".concat(e):"Styled(".concat(Ee(e),")")}(e):p,h=t.displayName&&t.componentId?"".concat(Se(t.displayName),"-").concat(t.componentId):t.componentId||f,y=o&&a.attrs?a.attrs.concat(u).filter(Boolean):u,m=t.shouldForwardProp;if(o&&a.shouldForwardProp){var v=a.shouldForwardProp;if(t.shouldForwardProp){var g=t.shouldForwardProp;m=function(e,t){return v(e,t)&&g(e,t)}}else m=v}var b=new Tt(r,h,o?a.componentStyle:void 0);function S(e,t){return function(e,t,r){var o=e.attrs,a=e.componentStyle,s=e.defaultProps,c=e.foldedComponentIds,u=e.styledComponentId,l=e.target,f=i.default.useContext(zt),p=At(),d=e.shouldForwardProp||p.shouldForwardProp,h=me(t,f,s)||ye,y=function(e,t,r){for(var o,i=n(n({},t),{className:void 0,theme:r}),a=0;a<e.length;a+=1){var s=Ye(o=e[a])?o(i):o;for(var c in s)i[c]="className"===c?qe(i[c],s[c]):"style"===c?n(n({},i[c]),s[c]):s[c]}return t.className&&(i.className=qe(i.className,t.className)),i}(o,t,h),m=y.as||l,v={};for(var g in y)void 0===y[g]||"$"===g[0]||"as"===g||"theme"===g&&y.theme===h||("forwardedAs"===g?v.as=y.forwardedAs:d&&!d(g,m)||(v[g]=y[g]));var b=function(e,t){var r=At();return e.generateAndInjectStyles(t,r.styleSheet,r.stylis)}(a,y),S=qe(c,u);return b&&(S+=" "+b),y.className&&(S+=" "+y.className),v[Ce(m)&&!ve.has(m)?"class":"className"]=S,r&&(v.ref=r),(0,i.createElement)(m,v)}(w,e,t)}S.displayName=d;var w=i.default.forwardRef(S);return w.attrs=y,w.componentStyle=b,w.displayName=d,w.shouldForwardProp=m,w.foldedComponentIds=o?qe(a.foldedComponentIds,a.styledComponentId):"",w.styledComponentId=h,w.target=o?a.target:e,Object.defineProperty(w,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=o?function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n=0,o=t;n<o.length;n++)Je(e,o[n],!0);return e}({},a.defaultProps,e):e}}),Ke(w,function(){return".".concat(w.styledComponentId)}),s&&He(w,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),w}function Bt(e,t){for(var r=[e[0]],n=0,o=t.length;n<o;n+=1)r.push(t[n],e[n+1]);return r}var Gt=function(e){return Object.assign(e,{isCss:!0})};function Lt(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(Ye(e)||Ve(e))return Gt($t(Bt(he,o([e],t,!0))));var n=e;return 0===t.length&&1===n.length&&"string"==typeof n[0]?$t(n):Gt($t(Bt(n,t)))}function Wt(e,t,r){if(void 0===r&&(r=ye),!t)throw Qe(1,t);var i=function(n){for(var i=[],a=1;a<arguments.length;a++)i[a-1]=arguments[a];return e(t,r,Lt.apply(void 0,o([n],i,!1)))};return i.attrs=function(o){return Wt(e,t,n(n({},r),{attrs:Array.prototype.concat(r.attrs,o).filter(Boolean)}))},i.withConfig=function(o){return Wt(e,t,n(n({},r),o))},i}var Ht=function(e){return Wt(Mt,e)},Yt=Ht;ve.forEach(function(e){Yt[e]=Ht(e)});!function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=Nt(e),vt.registerId(this.componentId+1)}e.prototype.createStyles=function(e,t,r,n){var o=n(Ze($t(this.rules,t,r,n)),""),i=this.componentId+e;r.insertRules(i,i,o)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,r,n){e>2&&vt.registerId(this.componentId+e),this.removeStyles(e,r),this.createStyles(e,t,r,n)}}();(function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return"";var r=lt(),n=Ze([r&&'nonce="'.concat(r,'"'),"".concat(se,'="true"'),"".concat(ue,'="').concat(le,'"')].filter(Boolean)," ");return"<style ".concat(n,">").concat(t,"</style>")},this.getStyleTags=function(){if(e.sealed)throw Qe(2);return e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)throw Qe(2);var r=e.instance.toString();if(!r)return[];var o=((t={})[se]="",t[ue]=le,t.dangerouslySetInnerHTML={__html:r},t),a=lt();return a&&(o.nonce=a),[i.default.createElement("style",n({},o,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new vt({isServer:!0}),this.sealed=!1}e.prototype.collectStyles=function(e){if(this.sealed)throw Qe(2);return i.default.createElement(xt,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw Qe(3)}})(),"__sc-".concat(se,"__")},362:(e,r,n)=>{e.exports=(e=>{var t={};return n.d(t,e),t})({isArray:()=>t.isArray,isBoolean:()=>t.isBoolean,isBusinessEmptyString:()=>t.isBusinessEmptyString,isEmptyArray:()=>t.isEmptyArray,isFalse:()=>t.isFalse,isNull:()=>t.isNull,isString:()=>t.isString,isUndefined:()=>t.isUndefined,isZero:()=>t.isZero})},634:(e,t,r)=>{r.d(t,{D:()=>a});var n=r(649);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function a(){var e=o((0,n.useState)(),2),t=e[0],i=e[1],a=o((0,n.useState)(!1),2),s=a[0],c=a[1],u=o((0,n.useState)(null),2),l=u[0],f=u[1];return(0,n.useEffect)(function(){c(!0),r.e(705).then(r.bind(r,705)).then(function(e){i(e.useRipples)}).catch(function(e){f(e)}).finally(function(){c(!1)})},[]),{hook:t,isLoading:s,error:l}}},649:(e,t,n)=>{e.exports=(e=>{var t={};return n.d(t,e),t})({createElement:()=>r.createElement,default:()=>r.default,forwardRef:()=>r.forwardRef,useContext:()=>r.useContext,useEffect:()=>r.useEffect,useImperativeHandle:()=>r.useImperativeHandle,useMemo:()=>r.useMemo,useRef:()=>r.useRef,useState:()=>r.useState})},666:(e,t,r)=>{e.exports=(e=>{var t={};return r.d(t,e),t})({setStyle:()=>n.setStyle})},713:()=>{function e(t){"@babel/helpers - typeof";return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,r(o.key),o)}}function r(t){var r=function(t,r){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,r||"default");if("object"!=e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==e(r)?r:r+""}new(function(){return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var t=function(){};return Object.setPrototypeOf(t,this),Object.defineProperties(t,{info:{value:function(){},configurable:!1,writable:!1},warn:{value:function(){},configurable:!1,writable:!1},error:{value:function(){},configurable:!1,writable:!1},type:{value:!1,configurable:!1,writable:!1}}),t},[{key:"clear",value:function(){}}])}())({name:"earthnut",type:!1})},945:e=>{e.exports=function(e,t,r,n){var o=r?r.call(n,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),c=0;c<i.length;c++){var u=i[c];if(!s(u))return!1;var l=e[u],f=t[u];if(!1===(o=r?r.call(n,l,f,u):void 0)||void 0===o&&l!==f)return!1}return!0}}},s={};function c(e){var t=s[e];if(void 0!==t)return t.exports;var r=s[e]={exports:{}};return a[e](r,r.exports,c),r.exports}c.m=a,c.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return c.d(t,{a:t}),t},c.d=(e,t)=>{for(var r in t)c.o(t,r)&&!c.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},c.f={},c.e=e=>Promise.all(Object.keys(c.f).reduce((t,r)=>(c.f[r](e,t),t),[])),c.u=e=>e+"/index.mjs",c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o={731:0,839:0},i=e=>{var t,r,{__webpack_esm_ids__:n,__webpack_esm_modules__:i,__webpack_esm_runtime__:a}=e,s=0;for(t in i)c.o(i,t)&&(c.m[t]=i[t]);for(a&&a(c);s<n.length;s++)r=n[s],c.o(o,r)&&o[r]&&o[r][0](),o[n[s]]=0},c.f.j=(e,t)=>{var r=c.o(o,e)?o[e]:void 0;if(0!==r)if(r)t.push(r[1]);else{var n=import("../"+c.u(e)).then(i,t=>{throw 0!==o[e]&&(o[e]=void 0),t});n=Promise.race([n,new Promise(t=>r=o[e]=[t])]),t.push(r[1]=n)}},c.nc=void 0;var u={};c.d(u,{H:()=>w});var l=c(649),f=c(224),p=c(362),d=c(98),h=c(634);function y(e){"@babel/helpers - typeof";return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}var m=["children","style","option"];function v(){return v=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},v.apply(null,arguments)}function g(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?g(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function S(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=y(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=y(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==y(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var w=(0,l.forwardRef)(function(e,t){var r=e.children,n=e.style,o=e.option,i=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,m),a=(0,l.useRef)(null),s=(0,h.D)().hook,c=(0,l.useRef)(null);return(0,f.k)(c,o),(0,l.useImperativeHandle)(t,function(){return{toggleState:function(){var e;null==c||null===(e=c.current)||void 0===e||e.changePlayingState()},get state(){var e,t;return null!==(e=null==c||null===(t=c.current)||void 0===t?void 0:t.options.playingState)&&void 0!==e&&e},pause:function(){var e;null==c||null===(e=c.current)||void 0===e||e.pause()},set:function(e){if(!(0,p.isUndefined)(e))for(var t=Object.keys(e),r=0,n=t.length;r<n;r++){var o,i=t[r];null==c||null===(o=c.current)||void 0===o||o.set(i,e[i])}}}}),(0,l.useEffect)(function(){s&&(c.current=s(a,o).current)},[s]),l.default.createElement(d.U,v({style:b({backgroundRepeat:"round"},n)},i),l.default.createElement("canvas",{ref:a,"data-earthnut-ui":"canvas",width:0,height:0}),r)});w.displayName="en-lazy-background-ripple";const O=u.H;export{O as LazyBackgroundRipple};
|
package/components/index.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license MIT
|
|
3
|
-
* earthnut@components/index.d.ts
|
|
4
|
-
* Copyright (c) 2025 earthnut.dev
|
|
5
|
-
* 请在项目根参看详细许可证明
|
|
6
|
-
*/
|
|
7
|
-
import { RippleEle } from './ripples';
|
|
8
|
-
export { BackgroundRipple, LazyBackgroundRipple } from './ripples';
|
|
9
|
-
export { Layout, LayoutContent, LayoutHeader, LayoutFooter, LayoutSideBar, EnLayout, EnLayoutContent, EnLayoutFooter, EnLayoutHeader, EnLayoutSideBar, } from './layout';
|
|
10
|
-
export type { LayoutProps, LayoutSideBarProps, LayoutHeaderProps, LayoutFooterProps, } from './layout';
|
|
11
|
-
export type { Ripples, BackgroundRipplesProps, RipplesOptions, RippleImgUrl, } from '../customHooks/useRipples/index';
|
|
12
|
-
export type { RippleEle };
|
package/customHooks/index.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license MIT
|
|
3
|
-
* earthnut@customHooks/index.d.ts
|
|
4
|
-
* Copyright (c) 2025 earthnut.dev
|
|
5
|
-
* 请在项目根参看详细许可证明
|
|
6
|
-
*/
|
|
7
|
-
export { useInputIsComposing } from './useInputIsComposing';
|
|
8
|
-
export { useTimeId } from './useTimeId';
|
|
9
|
-
export { useAnimationFrameId } from './useAnimationFrame';
|
|
10
|
-
export { useRipples } from './useRipples/index';
|
|
11
|
-
export { useLazyRipples } from './useRipples/use-lazy-ripple';
|
|
12
|
-
export type { Ripples, BackgroundRipplesProps, RipplesOptions, RippleImgUrl, } from './useRipples/index';
|
package/dog.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license MIT
|
|
3
|
-
* earthnut@useAnimationFrame/index.cjs
|
|
4
|
-
* Copyright (c) 2025 earthnut.dev
|
|
5
|
-
* 请在项目根参看详细许可证明
|
|
6
|
-
*/
|
|
7
|
-
"use client";(()=>{"use strict";var e={953:e=>{e.exports=require("react")}},r={};function t(n){var o=r[n];if(void 0!==o)return o.exports;var u=r[n]={exports:{}};return e[n](u,u.exports,t),u.exports}t.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},t.d=(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};t.r(n),t.d(n,{useAnimationFrameId:()=>u});var o=t(953);function u(){var e=(0,o.useRef)(0);return(0,o.useEffect)(function(){return function(){e.current&&window.cancelAnimationFrame(e.current)}},[]),e}module.exports.earthnut=n})();
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license MIT
|
|
3
|
-
* earthnut@useAnimationFrame/index.mjs
|
|
4
|
-
* Copyright (c) 2025 earthnut.dev
|
|
5
|
-
* 请在项目根参看详细许可证明
|
|
6
|
-
*/
|
|
7
|
-
"use client";import*as e from"react";var r={649:(r,t,n)=>{r.exports=(e=>{var r={};return n.d(r,e),r})({useEffect:()=>e.useEffect,useRef:()=>e.useRef})}},t={};function n(e){var o=t[e];if(void 0!==o)return o.exports;var u=t[e]={exports:{}};return r[e](u,u.exports,n),u.exports}n.d=(e,r)=>{for(var t in r)n.o(r,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},n.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var o={};n.d(o,{M:()=>a});var u=n(649);function a(){var e=(0,u.useRef)(0);return(0,u.useEffect)(function(){return function(){e.current&&window.cancelAnimationFrame(e.current)}},[]),e}const c=o.M;export{c as useAnimationFrameId};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license MIT
|
|
3
|
-
* earthnut@useInputIsComposing/index.cjs
|
|
4
|
-
* Copyright (c) 2025 earthnut.dev
|
|
5
|
-
* 请在项目根参看详细许可证明
|
|
6
|
-
*/
|
|
7
|
-
"use client";(()=>{"use strict";var e={953:e=>{e.exports=require("react")}},r={};function t(n){var o=r[n];if(void 0!==o)return o.exports;var u=r[n]={exports:{}};return e[n](u,u.exports,t),u.exports}t.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},t.d=(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};t.r(n),t.d(n,{useInputIsComposing:()=>u});var o=t(953);function u(e){var r=(0,o.useRef)(!1);return(0,o.useEffect)(function(){var t=e.current;if(t){var n=function(){return r.current=!0},o=function(){return r.current=!1};return t.addEventListener("compositionstart",n),t.addEventListener("compositionend",o),function(){t.removeEventListener("compositionstart",n),t.removeEventListener("compositionend",o)}}},[]),r}module.exports.earthnut=n})();
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license MIT
|
|
3
|
-
* earthnut@useInputIsComposing/index.mjs
|
|
4
|
-
* Copyright (c) 2025 earthnut.dev
|
|
5
|
-
* 请在项目根参看详细许可证明
|
|
6
|
-
*/
|
|
7
|
-
"use client";import*as e from"react";var t={649:(t,r,n)=>{t.exports=(e=>{var t={};return n.d(t,e),t})({useEffect:()=>e.useEffect,useRef:()=>e.useRef})}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var s=r[e]={exports:{}};return t[e](s,s.exports,n),s.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var o={};n.d(o,{t:()=>i});var s=n(649);function i(e){var t=(0,s.useRef)(!1);return(0,s.useEffect)(function(){var r=e.current;if(r){var n=function(){return t.current=!0},o=function(){return t.current=!1};return r.addEventListener("compositionstart",n),r.addEventListener("compositionend",o),function(){r.removeEventListener("compositionstart",n),r.removeEventListener("compositionend",o)}}},[]),t}const u=o.t;export{u as useInputIsComposing};
|
package/useLazyRipples/index.cjs
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license MIT
|
|
3
|
-
* earthnut@useLazyRipples/index.cjs
|
|
4
|
-
* Copyright (c) 2025 earthnut.dev
|
|
5
|
-
* 请在项目根参看详细许可证明
|
|
6
|
-
*/
|
|
7
|
-
"use client";(()=>{"use strict";var e,r,t={86:e=>{e.exports=require("a-js-tools")},378:e=>{e.exports=require("a-element-inline-style")},570:e=>{e.exports=require("a-type-of-js")},953:e=>{e.exports=require("react")}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var a=n[e]={exports:{}};return t[e](a,a.exports,o),a.exports}o.m=t,o.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return o.d(r,{a:r}),r},o.d=(e,r)=>{for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce((r,t)=>(o.f[t](e,r),r),[])),o.u=e=>e+"/index.cjs",o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r="earthnut:",o.l=(t,n,a,i)=>{if(e[t])e[t].push(n);else{var u,l;if(void 0!==a)for(var c=document.getElementsByTagName("script"),s=0;s<c.length;s++){var f=c[s];if(f.getAttribute("src")==t||f.getAttribute("data-webpack")==r+a){u=f;break}}u||(l=!0,(u=document.createElement("script")).charset="utf-8",u.timeout=120,o.nc&&u.setAttribute("nonce",o.nc),u.setAttribute("data-webpack",r+a),u.src=t),e[t]=[n];var p=(r,n)=>{u.onerror=u.onload=null,clearTimeout(d);var o=e[t];if(delete e[t],u.parentNode&&u.parentNode.removeChild(u),o&&o.forEach(e=>e(n)),r)return r(n)},d=setTimeout(p.bind(null,void 0,{type:"timeout",target:u}),12e4);u.onerror=p.bind(null,u.onerror),u.onload=p.bind(null,u.onload),l&&document.head.appendChild(u)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var r=o.g.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var n=t.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=t[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e+"../"})(),(()=>{var e={839:0};o.f.j=(r,t)=>{var n=o.o(e,r)?e[r]:void 0;if(0!==n)if(n)t.push(n[2]);else{var a=new Promise((t,o)=>n=e[r]=[t,o]);t.push(n[2]=a);var i=o.p+o.u(r),u=new Error;o.l(i,t=>{if(o.o(e,r)&&(0!==(n=e[r])&&(e[r]=void 0),n)){var a=t&&("load"===t.type?"missing":t.type),i=t&&t.target&&t.target.src;u.message="Loading chunk "+r+" failed.\n("+a+": "+i+")",u.name="ChunkLoadError",u.type=a,u.request=i,n[1](u)}},"chunk-"+r,r)}};var r=(r,t)=>{var n,a,[i,u,l]=t,c=0;if(i.some(r=>0!==e[r])){for(n in u)o.o(u,n)&&(o.m[n]=u[n]);if(l)l(o)}for(r&&r(t);c<i.length;c++)a=i[c],o.o(e,a)&&e[a]&&e[a][0](),e[a]=0},t=self.webpackChunkearthnut=self.webpackChunkearthnut||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})();var a={};o.r(a),o.d(a,{useLazyRipples:()=>c});var i=o(953);function u(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,o,a,i,u=[],l=!0,c=!1;try{if(a=(t=t.call(e)).next,0===r){if(Object(t)!==t)return;l=!1}else for(;!(l=(n=a.call(t)).done)&&(u.push(n.value),u.length!==r);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(c)throw o}}return u}}(e,r)||function(e,r){if(e){if("string"==typeof e)return l(e,r);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?l(e,r):void 0}}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function c(){var e=u((0,i.useState)(),2),r=e[0],t=e[1],n=u((0,i.useState)(!1),2),a=n[0],l=n[1],c=u((0,i.useState)(null),2),s=c[0],f=c[1];return(0,i.useEffect)(function(){l(!0),o.e(705).then(o.bind(o,705)).then(function(e){t(e.useRipples)}).catch(function(e){f(e)}).finally(function(){l(!1)})},[]),{hook:r,isLoading:a,error:s}}module.exports.earthnut=a})();
|
package/useLazyRipples/index.mjs
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license MIT
|
|
3
|
-
* earthnut@useLazyRipples/index.mjs
|
|
4
|
-
* Copyright (c) 2025 earthnut.dev
|
|
5
|
-
* 请在项目根参看详细许可证明
|
|
6
|
-
*/
|
|
7
|
-
"use client";import*as e from"a-js-tools";import*as r from"a-type-of-js";import*as t from"react";import*as n from"a-element-inline-style";var o,i,s={161:(r,t,n)=>{r.exports=(e=>{var r={};return n.d(r,e),r})({debounce:()=>e.debounce,enArr:()=>e.enArr,getRandomInt:()=>e.getRandomInt,getRandomString:()=>e.getRandomString})},362:(e,t,n)=>{e.exports=(e=>{var r={};return n.d(r,e),r})({isArray:()=>r.isArray,isBoolean:()=>r.isBoolean,isBusinessEmptyString:()=>r.isBusinessEmptyString,isEmptyArray:()=>r.isEmptyArray,isFalse:()=>r.isFalse,isNull:()=>r.isNull,isString:()=>r.isString,isUndefined:()=>r.isUndefined,isZero:()=>r.isZero})},649:(e,r,n)=>{e.exports=(e=>{var r={};return n.d(r,e),r})({useEffect:()=>t.useEffect,useRef:()=>t.useRef,useState:()=>t.useState})},666:(e,r,t)=>{e.exports=(e=>{var r={};return t.d(r,e),r})({setStyle:()=>n.setStyle})}},a={};function u(e){var r=a[e];if(void 0!==r)return r.exports;var t=a[e]={exports:{}};return s[e](t,t.exports,u),t.exports}u.m=s,u.d=(e,r)=>{for(var t in r)u.o(r,t)&&!u.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},u.f={},u.e=e=>Promise.all(Object.keys(u.f).reduce((r,t)=>(u.f[t](e,r),r),[])),u.u=e=>e+"/index.mjs",u.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o={839:0},i=e=>{var r,t,{__webpack_esm_ids__:n,__webpack_esm_modules__:i,__webpack_esm_runtime__:s}=e,a=0;for(r in i)u.o(i,r)&&(u.m[r]=i[r]);for(s&&s(u);a<n.length;a++)t=n[a],u.o(o,t)&&o[t]&&o[t][0](),o[n[a]]=0},u.f.j=(e,r)=>{var t=u.o(o,e)?o[e]:void 0;if(0!==t)if(t)r.push(t[1]);else{var n=import("../"+u.u(e)).then(i,r=>{throw 0!==o[e]&&(o[e]=void 0),r});n=Promise.race([n,new Promise(r=>t=o[e]=[r])]),r.push(t[1]=n)}};var l={};u.d(l,{D:()=>p});var f=u(649);function c(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,o,i,s,a=[],u=!0,l=!1;try{if(i=(t=t.call(e)).next,0===r){if(Object(t)!==t)return;u=!1}else for(;!(u=(n=i.call(t)).done)&&(a.push(n.value),a.length!==r);u=!0);}catch(e){l=!0,o=e}finally{try{if(!u&&null!=t.return&&(s=t.return(),Object(s)!==s))return}finally{if(l)throw o}}return a}}(e,r)||function(e,r){if(e){if("string"==typeof e)return m(e,r);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?m(e,r):void 0}}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function p(){var e=c((0,f.useState)(),2),r=e[0],t=e[1],n=c((0,f.useState)(!1),2),o=n[0],i=n[1],s=c((0,f.useState)(null),2),a=s[0],l=s[1];return(0,f.useEffect)(function(){i(!0),u.e(705).then(u.bind(u,705)).then(function(e){t(e.useRipples)}).catch(function(e){l(e)}).finally(function(){i(!1)})},[]),{hook:r,isLoading:o,error:a}}const d=l.D;export{d as useLazyRipples};
|
package/useRipples/index.cjs
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license MIT
|
|
3
|
-
* earthnut@useRipples/index.cjs
|
|
4
|
-
* Copyright (c) 2025 earthnut.dev
|
|
5
|
-
* 请在项目根参看详细许可证明
|
|
6
|
-
*/
|
|
7
|
-
"use client";(()=>{"use strict";var t={86:t=>{t.exports=require("a-js-tools")},378:t=>{t.exports=require("a-element-inline-style")},570:t=>{t.exports=require("a-type-of-js")},713:()=>{function t(e){"@babel/helpers - typeof";return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,r(i.key),i)}}function r(e){var r=function(e,r){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,r||"default");if("object"!=t(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==t(r)?r:r+""}new(function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(){};return Object.setPrototypeOf(e,this),Object.defineProperties(e,{info:{value:function(){},configurable:!1,writable:!1},warn:{value:function(){},configurable:!1,writable:!1},error:{value:function(){},configurable:!1,writable:!1},type:{value:!1,configurable:!1,writable:!1}}),e},(r=[{key:"clear",value:function(){}}])&&e(t.prototype,r),n&&e(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,n}())({name:"earthnut",type:!1})},953:t=>{t.exports=require("react")}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};r.r(n),r.d(n,{useRipples:()=>ie});var i=r(953),o=r(378),a=r(570);function l(t,e,r,n){function i(t,e){var n=r.createShader(t);if(r.shaderSource(n,e),r.compileShader(n),!r.getShaderParameter(n,r.COMPILE_STATUS))throw new Error("compile error: "+r.getShaderInfoLog(n));return n}var o,l={id:r.createProgram(),uniforms:{},locations:{}};if(r.attachShader(l.id,i(r.VERTEX_SHADER,t)),r.attachShader(l.id,i(r.FRAGMENT_SHADER,e)),r.linkProgram(l.id),!r.getProgramParameter(l.id,r.LINK_STATUS))throw new Error("link error: "+r.getProgramInfoLog(l.id));r.useProgram(l.id),r.enableVertexAttribArray(0);for(var s=t+e,u=/uniform (\w+) (\w+)/g;!(0,a.isNull)(o=u.exec(s));){var c=o[2];l.locations[c]=r.getUniformLocation(l.id,c)}return l}function s(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=this.gl;r.activeTexture(r.TEXTURE0+(e||0)),r.bindTexture(r.TEXTURE_2D,t)}function u(t){return"rgba(0, 0, 0, 0)"===t||"#ffffffff"===t||"transport"===t}function c(t){return"none"===t||""===t}function f(){var t=this,e=function(){return t.initState=!1,null};if(!this.gl)return e();var r=this.gl,n=Object.fromEntries(["OES_texture_float","OES_texture_half_float","OES_texture_float_linear","OES_texture_half_float_linear"].reduce(function(t,e){var n=r.getExtension(e);return n&&t.push([e,n]),t},[]));if(!n.OES_texture_float)return e();var i=[];function o(t,e,r){var i="OES_texture_"+t,o=i+"_linear",a=o in n;return{type:e,linearSupport:a,arrayType:r,extensions:a?[i,o]:[i]}}i.push(o("float",r.FLOAT,Float32Array)),n.OES_texture_half_float&&i.push(o("half_float",n.OES_texture_half_float.HALF_FLOAT_OES,null));var a=r.createTexture(),l=r.createFramebuffer();r.bindFramebuffer(r.FRAMEBUFFER,l),r.bindTexture(r.TEXTURE_2D,a),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.NEAREST),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.NEAREST),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE);for(var s=null,u=0;u<i.length;u++)if(r.texImage2D(r.TEXTURE_2D,0,r.RGBA,32,32,0,r.RGBA,i[u].type,null),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,a,0),r.checkFramebufferStatus(r.FRAMEBUFFER)===r.FRAMEBUFFER_COMPLETE){s=i[u];break}return s}function h(t){"@babel/helpers - typeof";return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},h(t)}function p(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,m(n.key),n)}}function d(t,e,r){return e&&p(t.prototype,e),r&&p(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function g(t,e,r){return(e=m(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function m(t){var e=function(t,e){if("object"!=h(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=h(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==h(e)?e:e+""}var v=d(function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),g(this,"canvas",void 0),g(this,"gl",void 0),g(this,"config",void 0),g(this,"initState",!0),this.canvas=e;var r=e.getContext("webgl");if((0,a.isNull)(r))return this.initState=!1,void(this.config=null);this.gl=r,this.config=Reflect.apply(f,this,[])}),y=r(86),b={imgUrl:null,resolution:360,dropRadius:12,perturbance:.01,interactive:!0,crossOrigin:"no-cors",playingState:!0,accelerating:1,raindropsTimeInterval:3600,idleFluctuations:!0,darkMode:void 0};Object.freeze(b);var E;r(713);function w(t){"@babel/helpers - typeof";return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},w(t)}function R(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,T(n.key),n)}}function T(t){var e=function(t,e){if("object"!=w(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=w(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==w(e)?e:e+""}function S(t,e,r){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,r)}function k(t,e,r){return t.set(x(t,e),r),r}function P(t,e){return t.get(x(t,e))}function x(t,e,r){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}function D(t){return function(t){if(Array.isArray(t))return _(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return _(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var O=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r={list:[],diameter:48,radius:0,cells:0};r.diameter%2!=0&&r.diameter++;var n=r.diameter,i=r.list,o=n/2;r.radius=o,r.cells=Math.pow(n,2);for(var a=0;a<n;a++){i[a]=[];for(var l=0;l<n;l++)i[a][l]=[0,0,0,0]}for(var s=0;s<=o;s++)for(var u=function(){var t=i[s][c],r=Math.ceil(Math.sqrt(Math.pow(s,2)+Math.pow(c,2)))<=o,n=e?10:255,a=e?25:190,l=r?e?160:120:e?160:180,u=r?e?230:160:e?250:240,f=function(){return(0,y.getRandomInt)(n,a)};t[0]=f(),t[1]=f(),t[2]=f(),t[3]=(0,y.getRandomInt)(l,u)},c=s;c<=o;c++)u();for(var f=0;f<=o;f++)for(var h=0;h<=f;h++)i[f][h]=i[h][f];for(var p=o;p<n;p++)for(var d=0;d<=o;d++)i[p][d]=i[n-p][d];for(var g=0;g<o;g++)for(var m=o;m<n;m++)i[g][m]=i[g][n-m];for(var v=o;v<n;v++)for(var b=o;b<n;b++)i[v][b]=i[v][n-b];var E=t%n;return r.list=[].concat(D(i.slice(E)),D(i.slice(0,E))),r},A=new(E=new WeakMap,function(){return t=function t(){var e,r,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),S(this,E,1),e=this,r="data",n=O(),(r=T(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n},(e=[{key:"build",value:function(t){P(E,this)>100&&k(E,this,0),this.data=O(k(E,this,P(E,this)+4),t)}}])&&R(t.prototype,e),r&&R(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}());function I(t,e){var r=document.createElement("canvas"),n=document.createElement("canvas"),i=r.getContext("2d"),o=n.getContext("2d");return(0,a.isNull)(i)||(0,a.isNull)(o)?r:(r.width=n.width=t||1,r.height=n.height=e||1,i.clearRect(0,0,t,e),o.clearRect(0,0,t,e),i.globalAlpha=1,i.putImageData(function(t,e){Date.now();for(var r=new ImageData(t||1,e||1),n=r.data,i=A.data,o=i.diameter,a=i.list,l=t*o,s=0;s<n.length;s+=4){var u=s/4%l,c=u%t%o,f=Math.floor(u/t),h=a[c][f];n[s]=h[0],n[s+1]=h[1],n[s+2]=h[2],n[s+3]=h[3]}return r}(t,e),0,0),o.fillStyle="#ffffff",o.fillRect(0,0,t,e),o.drawImage(r,0,0,t||1,e||1),o.globalCompositeOperation="source-over",n)}function F(){var t,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=this.fadeData,n=this.options,i=r.backgroundInfo,o=r.toBeList,a=i.width,l=i.height,s=(0,y.getRandomString)({length:8,includeNumbers:!0,includeUppercaseLetters:!0});A.build(null!==(t=n.darkMode)&&void 0!==t?t:r.isDark),o.push({resource:I(a,l),width:a,height:l,kind:"default",tag:s}),e&&r.run()}function U(t,e){var r,n,i=t.imgUrl;return(0,a.isString)(i)&&i||(r=e.backgroundImage,n=/url\(["']?([^"']*)["']?\)/.exec(r),(0,a.isNull)(n)?null:n[1])}function j(t,e){return(0,a.isArray)(t.imgUrl)&&1===t.imgUrl.length&&t.imgUrl[0]||e.backgroundColor}function N(){var t=this.renderData,e=this.fadeData,r=this.options;if((0,a.isNull)(t))return Reflect.apply(F,this,[]);var n=t.originStyle;if(u(n.backgroundColor)&&(!(0,a.isArray)(r.imgUrl)||1!==r.imgUrl.length))return Reflect.apply(F,this,[]);var i=document.createElement("canvas"),o=i.getContext("2d");if((0,a.isNull)(o))return Reflect.apply(F,this,[]);var l=e.backgroundInfo,s=l.width,c=l.height;i.width=s,i.height=c,o.clearRect(0,0,s,c);var f=j(r,n);o.beginPath(),o.fillStyle=f,o.fillRect(0,0,s,c),o.fill(),e.isTransitioning&&!(0,a.isEmptyArray)(e.toBeList)?e.toBeList=[e.toBeList[0]]:e.toBeList=[];var h={resource:i,kind:"background-color",tag:f,width:s,height:c};e.toBeList.push(h),e.run()}function C(){var t=this.fadeData,e=this.renderData,r=this.options;if((0,a.isNull)(e))return Reflect.apply(N,this,[]);var n=e.originStyle;if(!/linear-gradient\(.*\)/.test(n.backgroundImage)&&!(0,a.isArray)(r.imgUrl))return Reflect.apply(N,this,[]);var i=(0,a.isArray)(r.imgUrl)&&r.imgUrl.length>1&&r.imgUrl||n.backgroundImage.replace(/^.*linear-gradient\((.*)\).*$/,"$1").split("),").map(function(t){return(t=t.trim()).endsWith(")")||(t+=")"),t}).filter(function(t){return t.startsWith("rgb")||t.startsWith("#")});if(i.length<2)return Reflect.apply(N,this,[]);var o=document.createElement("canvas"),l=o.getContext("2d");if((0,a.isNull)(l))return Reflect.apply(N,this,[]);var s=t.backgroundInfo,u=s.width,c=s.height;o.width=u,o.height=c,l.fillStyle="#fff",l.fillRect(0,0,u,c);var f=l.createLinearGradient(0,0,0,c);i.forEach(function(t,e){return f.addColorStop(e/(i.length-1),t)}),l.fillStyle=f,l.fillRect(0,0,u,c),t.isTransitioning&&!(0,a.isEmptyArray)(t.toBeList)?t.toBeList=[t.toBeList[0]]:t.toBeList=[],t.toBeList.push({resource:o,kind:"linear-gradient",tag:i.join("_"),width:u,height:c}),t.run()}function L(t){return function(t){if(Array.isArray(t))return B(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return B(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?B(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function B(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function M(){var t=this,e=this.renderData,r=this.options,n=this.fadeData;if((0,a.isNull)(e))Reflect.apply(C,this,[]);else{var i=e.lastUseStyle,o=n.backgroundInfo,l=o.width,s=o.height,u=U(r,i);if(e.imageSource=u,u){var c=function(t,e,r){var n=new Image(e,r);return n.width=e,n.height=r,n.src=t,n}(u,l,s);c.onload=function(){clearTimeout(n.transparentId),n.isTransitioning&&!(0,a.isEmptyArray)(n.toBeList)?n.toBeList=[n.toBeList[0]].concat(L(n.toBeList.slice(1).filter(function(t){return"image"===t.kind&&(Math.abs(t.width-l)>2||Math.abs(t.height-s)>2||t.tag!==u)}))):n.toBeList=[],n.toBeList.push({resource:c,width:l,height:s,kind:"image",tag:u}),n.run()},c.onerror=function(){Reflect.apply(C,t,[])},c.crossOrigin=r.crossOrigin}else Reflect.apply(C,this,[])}}function X(){var t=this.renderData;if(!(0,a.isNull)(t)){var e=t.parentElement;e&&[["background-image","none"],["background-color","transparent"]].forEach(function(t){return e.style.setProperty(t[0],t[1],"important")})}}function W(t){var e=window.getComputedStyle(t),r=t.style;return{inlineBackground:r.background,inlineBackgroundColor:r.backgroundColor,inlineBackgroundImage:r.backgroundImage,backgroundColor:e.backgroundColor,backgroundImage:e.backgroundImage,backgroundSize:e.backgroundSize,backgroundPosition:e.backgroundPosition,backgroundRepeat:e.backgroundRepeat,backgroundClip:e.backgroundClip,backgroundOrigin:e.backgroundOrigin,backgroundAttachment:e.backgroundAttachment,position:e.position,width:parseInt(e.width),height:parseInt(e.height)}}function z(){var t=this.renderData;if(!(0,a.isNull)(t)){var e=t.parentElement,r=t.originStyle;e.style.setProperty("background-image",r.inlineBackgroundImage),e.style.setProperty("background-color",r.inlineBackgroundColor)}}function G(t){"@babel/helpers - typeof";return G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G(t)}function H(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Y(n.key),n)}}function q(t,e,r){return(e=Y(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Y(t){var e=function(t,e){if("object"!=G(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=G(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==G(e)?e:e+""}var $=function(){return t=function t(e,r,n){var i,o=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),q(this,"quad",null),q(this,"lastRaindropsFallTime",0),q(this,"parentElement",void 0),q(this,"mutationObserver",void 0),q(this,"resizeObserver",void 0),q(this,"renderProgram",void 0),q(this,"imageSource",""),q(this,"dropProgram",void 0),q(this,"updateProgram",void 0),q(this,"textures",[]),q(this,"backgroundTexture",[]),q(this,"textureDelta",void 0),q(this,"framebuffers",[]),q(this,"bufferWriteIndex",0),q(this,"bufferReadIndex",1),q(this,"originStyle",void 0),q(this,"lastUseStyle",void 0),q(this,"events",{}),q(this,"animationFrameId",0),this.parentElement=null!==(i=e.parentElement)&&void 0!==i?i:document.body,Reflect.apply(X,n,[]),this.originStyle=this.lastUseStyle=W(this.parentElement),this.mutationObserver=new MutationObserver(function(t){t.forEach(function(t){if(t.target===o.parentElement&&"attributes"===t.type&&n.options.visible){var e=Object.values(o.lastUseStyle),i=W(o.parentElement),l=Object.values(i);if((0,a.isEmptyArray)(y.enArr.difference(e,l)))return;var s=c(i.backgroundImage),f=u(i.backgroundColor);if(s&&f)return;o.lastUseStyle=i,Reflect.apply(r,n,[]),Reflect.apply(X,n,[])}})}),this.mutationObserver.observe(this.parentElement,{subtree:!0,attributes:!0,attributeFilter:["class","style"]}),this.resizeObserver=new ResizeObserver(function(t){t.forEach(function(t){t.target===o.parentElement&&Reflect.apply(r,n,[])})}),this.resizeObserver.observe(this.parentElement)},e=[{key:"destroy",value:function(){if(this.animationFrameId&&window.cancelAnimationFrame(this.animationFrameId),Reflect.apply(z,{renderData:this},[]),this.parentElement&&this.events){var t,e,r,n=this.parentElement,i=this.events;Object.keys(i).forEach(function(t){return n.removeEventListener&&n.removeEventListener(t,i[t])}),n.removeAttribute&&n.removeAttribute("data-ripples"),null===(t=this.mutationObserver)||void 0===t||t.takeRecords(),null===(e=this.mutationObserver)||void 0===e||e.disconnect(),this.mutationObserver=null,null===(r=this.resizeObserver)||void 0===r||r.disconnect(),this.resizeObserver=null}}}],e&&H(t.prototype,e),r&&H(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}();function K(){var t=this.renderData,e=this.fadeData;if(!(0,a.isNull)(t)){var r,n,i,o=t.parentElement,l=window.getComputedStyle(o),s=l.backgroundSize,u=l.backgroundAttachment,c=l.backgroundPosition,f=/\s+/.test(r=c)?r.replace(/center/,"50%").replace(/top|left/,"0%").replace(/bottom/,"100%").replace(/\s+/," ").split(" "):V(r)?[r,"50%"]:{center:["50%","50%"],top:["50%","0%"],bottom:["50%","100%"],left:["0%","50%"],right:["100%","50%"]}[r],h={left:0,top:0,width:0,height:0};"fixed"===u?(h.height=window.innerHeight,h.left=window.screenX,h.top=window.screenY,h.width=window.innerWidth):(h.left=0,h.top=0,h.width=o.scrollWidth,h.height=o.scrollHeight);var p=e.backgroundInfo||{width:100,height:100},d=p.width,g=p.height;if("cover"===s){var m=Math.max(h.width/d,h.height/g);n=d*m,i=g*m}else if("contain"===s){var v=Math.min(h.width/d,h.height/g);n=d*v,i=g*v}else{var y=s.split(" ");n=y[0]||"",i=y[1]||n,V(n)?n=h.width*parseFloat(n)/100:"auto"!==n&&(n=parseFloat(n)),V(i)?i=h.height*parseFloat(i)/100:"auto"!==i&&(i=parseFloat(i)),"auto"===n&&"auto"===i?(n=d,i=g):("auto"===n&&(n=d*(Number(i)/g)),"auto"===i&&(i=g*(Number(n)/d)))}var b=f&&f[0]||"0%",E=f&&f[1]||"0%";b=V(b)?(h.left+(h.width-Number(n))*parseFloat(b)/100).toString():(h.left+parseFloat(b)).toString(),E=V(E)?(h.top+(h.height-Number(i))*parseFloat(E)/100).toString():(h.top+parseFloat(E)).toString(),t.renderProgram.uniforms.topLeft=new Float32Array([-Number(b)/n,-Number(E)/i]),t.renderProgram.uniforms.bottomRight=new Float32Array([t.renderProgram.uniforms.topLeft[0]+o.clientWidth/n,t.renderProgram.uniforms.topLeft[1]+o.clientHeight/i]);var w=Math.max(this.canvas.width,this.canvas.height);t.renderProgram.uniforms.containerRatio=new Float32Array([this.canvas.width/w,this.canvas.height/w])}}function V(t){return t.endsWith("%")}function Z(){var t=this.gl,e=this.renderData;(0,a.isNull)(e)||(t.bindBuffer(t.ARRAY_BUFFER,e.quad),t.vertexAttribPointer(0,2,t.FLOAT,!1,0,0),t.drawArrays(t.TRIANGLE_FAN,0,4))}function J(){var t=this.gl,e=this.renderData,r=this.options;if(!(0,a.isNull)(e)){var n=e.textures,i=e.backgroundTexture,o=r.perturbance;t.bindFramebuffer(t.FRAMEBUFFER,null),t.viewport(0,0,this.canvas.width,this.canvas.height),t.enable(t.BLEND),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),t.useProgram(e.renderProgram.id),Reflect.apply(s,this,[i,0]),Reflect.apply(s,this,[n[0],1]),t.uniform1f(e.renderProgram.locations.perturbance,o),t.uniform2fv(e.renderProgram.locations.topLeft,e.renderProgram.uniforms.topLeft),t.uniform2fv(e.renderProgram.locations.bottomRight,e.renderProgram.uniforms.bottomRight),t.uniform2fv(e.renderProgram.locations.containerRatio,e.renderProgram.uniforms.containerRatio),t.uniform1i(e.renderProgram.locations.samplerBackground,0),t.uniform1i(e.renderProgram.locations.samplerRipples,1),Reflect.apply(Z,this,[]),t.disable(t.BLEND)}}function Q(){var t=this.renderData;if(!(0,a.isNull)(t)){var e=t.bufferWriteIndex,r=t.bufferReadIndex;t.bufferWriteIndex=1-e,t.bufferReadIndex=1-r}}function tt(){var t=this.gl,e=this.renderData,r=this.options;if(!(0,a.isNull)(e)){var n=e.updateProgram,i=e.textures,o=e.framebuffers,l=e.bufferWriteIndex,u=e.bufferReadIndex,c=r.resolution;t.viewport(0,0,c,c),t.bindFramebuffer(t.FRAMEBUFFER,o[l]),Reflect.apply(s,this,[i[u]]),t.useProgram(n.id),Reflect.apply(Z,this,[]),Reflect.apply(Q,this,[])}}function et(){var t=this,e=this.renderData,r=this.options,n=this.fadeData;if(!(0,a.isNull)(e)){var i=e.parentElement,o=n.isTransitioning,l=r.running,s=r.idleFluctuations,u=r.lastRunningState,c=getComputedStyle(i);n.backgroundInfo={width:parseInt(c.width),height:parseInt(c.height)},Reflect.apply(K,this,[]),l?(u||(r.lastRunningState=!0,this.show()),s&&this.raindropsFall(),o&&this.fade(),Reflect.apply(tt,this,[]),Reflect.apply(J,this,[])):u&&(r.lastRunningState=!1,this.hide()),e.animationFrameId=requestAnimationFrame(function(){return Reflect.apply(et,t,[])})}}function rt(t,e,r){var n=this.renderData;if(!(0,a.isNull)(n)){var i=n.parentElement,o=window.getComputedStyle(i),l=parseInt(o.borderLeftWidth)||0,s=parseInt(o.borderTopWidth)||0,u=i.getBoundingClientRect(),c=t.clientX-u.left-l,f=t.clientY-u.top-s;this.drop(c,f,e,r)}}function nt(){var t=this,e=this.renderData,r=this.options;if(!(0,a.isNull)(e)){var n=e.parentElement,i=e.events,o=function(n){var i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];r.visible&&r.running&&r.interactive&&(e.lastRaindropsFallTime=Date.now(),Reflect.apply(rt,t,[n,r.dropRadius*(i?1.5:1),i?.03:.01]))};i.mousemove=function(t){for(var e=r.accelerating;e--;)o(t)},i.touchmove=i.touchstart=function(t){for(var e=t.touches,r=0;r<e.length;r++)o(e[r])},i.mousedown=function(t){return o(t,!0)},Object.keys(i).forEach(function(t){return null==n?void 0:n.addEventListener(t,i[t],{passive:!0})})}}var it="\n attribute vec2 vertex;\n varying vec2 coord;\n void main() {\n coord = vertex * 0.5 + 0.5;\n gl_Position = vec4(vertex, 0.0, 1.0);\n }";function ot(){var t=this.gl,e=this.renderData;if(!(0,a.isNull)(e)){var r=e.textureDelta;e.dropProgram=l(it,"precision highp float;\n\n const float PI = 3.141592653589793;\n uniform sampler2D texture;\n uniform vec2 center;\n uniform float radius;\n uniform float strength;\n\n varying vec2 coord;\n\n void main() {\n vec4 info = texture2D(texture, coord);\n\n float drop = max(0.0, 1.0 - length(center * 0.5 + 0.5 - coord) / radius);\n drop = 0.5 - cos(drop * PI) * 0.5;\n info.r += drop * strength;\n gl_FragColor = info;\n }",t);var n=e.updateProgram=l(it,"\n precision highp float;\n\n uniform sampler2D texture;\n uniform vec2 delta;\n\n varying vec2 coord;\n\n void main() {\n vec4 info = texture2D(texture, coord);\n \n vec2 dx = vec2(delta.x, 0.0);\n vec2 dy = vec2(0.0, delta.y);\n \n float average = (\n texture2D(texture, coord - dx).r +\n texture2D(texture, coord - dy).r +\n texture2D(texture, coord + dx).r +\n texture2D(texture, coord + dy).r\n ) * 0.25;\n \n info.g += (average - info.r) * 2.0;\n info.g *= 0.995;\n info.r += info.g;\n \n gl_FragColor = info;\n }\n ",this.gl);t.uniform2fv(n.locations.delta,r),e.renderProgram=l("\n precision highp float;\n\n attribute vec2 vertex;\n uniform vec2 topLeft;\n uniform vec2 bottomRight;\n uniform vec2 containerRatio;\n varying vec2 ripplesCoord;\n varying vec2 backgroundCoord;\n void main() {\n backgroundCoord = mix(topLeft, bottomRight, vertex * 0.5 + 0.5);\n backgroundCoord.y = 1.0 - backgroundCoord.y;\n ripplesCoord = vec2(vertex.x, -vertex.y) * containerRatio * 0.5 + 0.5;\n gl_Position = vec4(vertex.x, -vertex.y, 0.0, 1.0);\n }\n ","\n precision highp float;\n\n uniform sampler2D samplerBackground;\n uniform sampler2D samplerRipples;\n uniform vec2 delta;\n\n uniform float perturbance;\n varying vec2 ripplesCoord;\n varying vec2 backgroundCoord;\n\n void main() {\n float height = texture2D(samplerRipples, ripplesCoord).r;\n float heightX = texture2D(samplerRipples, vec2(ripplesCoord.x + delta.x, ripplesCoord.y)).r;\n float heightY = texture2D(samplerRipples, vec2(ripplesCoord.x, ripplesCoord.y + delta.y)).r;\n vec3 dx = vec3(delta.x, heightX - height, 0.0);\n vec3 dy = vec3(0.0, heightY - height, delta.y);\n vec2 offset = -normalize(cross(dy, dx)).xz;\n float specular = pow(max(0.0, dot(offset, normalize(vec2(-0.6, 1.0)))), 4.0);\n gl_FragColor = texture2D(samplerBackground, backgroundCoord + offset * perturbance) + specular;\n }",t),t.uniform2fv(e.renderProgram.locations.delta,r)}}function at(){var t=this.gl,e=this.renderData;if(!(0,a.isNull)(e)){var r=e.backgroundTexture=t.createTexture();t.bindTexture(t.TEXTURE_2D,r),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,1),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR)}}function lt(t){var e=this.gl,r=this.renderData,n=this.fadeData;if(!(0,a.isNull)(r)){var i=r.backgroundTexture,o=r.parentElement,l=n.backgroundInfo,s=l.width,u=l.height,c=function(t){return(0,a.isZero)(t&t-1)},f=c(s)&&c(u)?e.REPEAT:e.CLAMP_TO_EDGE;e.bindTexture(e.TEXTURE_2D,i),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,f),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,f),o.dataset.render_img=t.tag,o.dataset.render_width=t.width+"px",o.dataset.render_height=t.height+"px",e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t.resource)}}function st(){var t=this,e=this.renderData,r=this.options,n=this.fadeData;if(!(0,a.isNull)(e)&&this.config){var i=e.textures,o=e.framebuffers,l=r.resolution,s=this.gl,u=1/l;e.textureDelta=new Float32Array([u,u]),this.config.extensions.forEach(function(t){return s.getExtension(t)});for(var c=this.config.arrayType,f=c?new c(l*l*4):null,h=this.config,p=0;p<2;p++){var d=s.createTexture(),g=s.createFramebuffer();s.bindFramebuffer(s.FRAMEBUFFER,g),s.bindTexture(s.TEXTURE_2D,d),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MIN_FILTER,h.linearSupport?s.LINEAR:s.NEAREST),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MAG_FILTER,h.linearSupport?s.LINEAR:s.NEAREST),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_S,s.CLAMP_TO_EDGE),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_T,s.CLAMP_TO_EDGE),s.texImage2D(s.TEXTURE_2D,0,s.RGBA,l,l,0,s.RGBA,h.type,f),s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,d,0),i.push(d),o.push(g)}e.quad=s.createBuffer(),s.bindBuffer(s.ARRAY_BUFFER,e.quad),s.bufferData(s.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,1,1,-1,1]),s.STATIC_DRAW),Reflect.apply(ot,this,[]),Reflect.apply(at,this,[]),Reflect.apply(M,this,[]),s.clearColor(0,0,0,0),s.blendFunc(s.SRC_ALPHA,s.ONE_MINUS_SRC_ALPHA),r.visible=!0,r.running=!0,Reflect.apply(nt,this,[]),Reflect.apply(lt,this,[n.lastDrawImage]),e.animationFrameId=requestAnimationFrame(function(){return Reflect.apply(et,t,[])})}}function ut(){var t=this.renderData,e=this.fadeData;if(!(0,a.isNull)(t)){var r=t.parentElement,n=e.backgroundInfo,i=r.offsetWidth,o=r.offsetHeight;this.canvas.width=n.width=i,this.canvas.height=n.height=o,Reflect.apply(M,this,[])}}function ct(){var t=this.renderData,e=this.fadeData;(0,a.isNull)(t)||(t.destroy(),Object.keys(t).forEach(function(e){return t[e]=null}),this.renderData=null),e.destroy(),Object.keys(e).forEach(function(t){return e[t]=null}),this.fadeData=null,this.gl&&(this.gl=null)}function ft(t,e,r,n){var i=this.renderData,o=this.options,l=this.gl;if(!(0,a.isNull)(i)){var u=i.parentElement,c=i.dropProgram,f=i.textures,h=i.framebuffers,p=i.bufferWriteIndex,d=i.bufferReadIndex,g=o.resolution,m=u.offsetWidth,v=u.offsetHeight,y=Math.max(m,v);r/=y;var b=new Float32Array([(2*t-m)/y,(v-2*e)/y]);l.viewport(0,0,g,g),l.bindFramebuffer(l.FRAMEBUFFER,h[p]),Reflect.apply(s,this,[f[d]]),l.useProgram(c.id),l.uniform2fv(c.locations.center,b),l.uniform1f(c.locations.radius,r),l.uniform1f(c.locations.strength,n),Reflect.apply(Z,this,[]),Reflect.apply(Q,this,[])}}function ht(t){"@babel/helpers - typeof";return ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ht(t)}function pt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,gt(n.key),n)}}function dt(t,e,r){return(e=gt(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function gt(t){var e=function(t,e){if("object"!=ht(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=ht(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ht(e)?e:e+""}function mt(t,e,r){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,r)}function vt(t,e){return t.get(bt(t,e))}function yt(t,e,r){return t.set(bt(t,e),r),r}function bt(t,e,r){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}var Et=new WeakMap,wt=new WeakMap,Rt=new WeakMap,Tt=new WeakMap,St=new WeakMap,kt=new WeakMap,Pt=new WeakMap,xt=new WeakMap,Dt=function(){return t=function t(e){var r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),mt(this,Et,b.accelerating),mt(this,wt,b.interactive),mt(this,Rt,b.resolution),mt(this,Tt,b.perturbance),mt(this,St,b.dropRadius),dt(this,"imgUrl",b.imgUrl),mt(this,kt,b.idleFluctuations),mt(this,Pt,b.raindropsTimeInterval),dt(this,"crossOrigin","no-cors"),dt(this,"visible",!1),dt(this,"running",!1),mt(this,xt,void 0),dt(this,"lastRunningState",!1),this.perturbance=e.perturbance,this.resolution=e.resolution,this.raindropsTimeInterval=e.raindropsTimeInterval,this.accelerating=e.accelerating,this.interactive=e.interactive,this.dropRadius=e.dropRadius,this.imgUrl=e.imgUrl,this.idleFluctuations=e.idleFluctuations,this.running=Boolean(null===(r=e.playingState)||void 0===r||r),this.crossOrigin=e.crossOrigin,this.darkMode=e.darkMode},(e=[{key:"accelerating",get:function(){return vt(Et,this)},set:function(t){t>100||t<2||yt(Et,this,t)}},{key:"interactive",get:function(){return vt(wt,this)},set:function(t){(0,a.isBoolean)(t)&&yt(wt,this,t)}},{key:"resolution",get:function(){return vt(Rt,this)},set:function(t){t<100||t>550||yt(Rt,this,t)}},{key:"perturbance",get:function(){return vt(Tt,this)},set:function(t){t<1e-4||t>1||yt(Tt,this,t)}},{key:"dropRadius",get:function(){return vt(St,this)},set:function(t){!isFinite(t)||t<10||yt(St,this,t)}},{key:"idleFluctuations",get:function(){return vt(kt,this)},set:function(t){(0,a.isBoolean)(t)&&yt(kt,this,t)}},{key:"raindropsTimeInterval",get:function(){return vt(Pt,this)},set:function(t){t<10||t>12e3||yt(Pt,this,t)}},{key:"playingState",get:function(){return this.running},set:function(t){this.running=Boolean(null==t||t)}},{key:"darkMode",get:function(){return vt(xt,this)},set:function(t){yt(xt,this,(0,a.isUndefined)(t)?void 0:Boolean(t))}}])&&pt(t.prototype,e),r&&pt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}();function _t(){var t=this.fadeData,e=this.options,r=this.renderData;if((0,a.isNull)(r))return!0;var n=e.imgUrl,i=r.lastUseStyle,o=t.lastDrawImage,l=t.backgroundInfo,s=l.width,u=l.height,c=o.tag,f=o.kind,h=U(e,i),p=o.width===s,d=o.height===u,g=p&&d;if("image"===f&&g&&(0,a.isString)(h)&&h===c)return!0;var m=(0,a.isArray)(n)&&n.join("_")||"";if("linear-gradient"===f&&g&&m===c)return!0;var v=j(e,i);return!("background-color"!==f||!g||c!==v)}function Ot(){var t=this,e=this.options,r=this.fadeData;r.transparentId=setTimeout(function(){if(clearTimeout(r.transparentId),r.isTransitioning)return Reflect.apply(Ot,t,[]);Reflect.apply(_t,t,[])||r.run()},2*e.raindropsTimeInterval)}function At(){var t=this.renderData,e=this.fadeData,r=this.options,n=e.toBeList;if((0,a.isNull)(t))return Reflect.apply(It,this,["还没有准备好,即将退出"]);if((0,a.isEmptyArray)(n))return Reflect.apply(It,this,["由于缺少当前渲染的背景,退出"]);if(0===e.drawProgress&&n.forEach(function(t){}),e.drawProgress>1e3){if(e.lastDrawImage=n.shift(),Reflect.apply(lt,this,[e.lastDrawImage]),(0,a.isEmptyArray)(n)){var i=t.lastUseStyle;((0,a.isNull)(r.imgUrl)||(0,a.isBusinessEmptyString)(r.imgUrl)||(0,a.isZero)(r.imgUrl.length))&&u(i.backgroundColor)&&c(i.backgroundImage)&&Reflect.apply(F,this,[!1])}return Reflect.apply(It,this,["当前执行完毕,开启下次执行"])}var o=e.lastDrawImage,l=e.backgroundInfo;e.drawProgress+=18;var s=document.createElement("canvas"),f=s.getContext("2d");if((0,a.isNull)(f)||(0,a.isNull)(o.resource)||(0,a.isEmptyArray)(n))return Reflect.apply(It,this,"环境值错误");var h=l.width,p=l.height;s.width=h,s.height=p,f.clearRect(0,0,h,p),f.drawImage(o.resource,0,0,h,p),f.globalAlpha=e.drawProgress/1e3,f.drawImage(n[0].resource,0,0,h,p),f.globalAlpha=1;var d={resource:s,width:h,height:p,kind:"mix",tag:"".concat(o.tag," >> ").concat(n[0].tag)};Reflect.apply(lt,this,[d]),n.length>1&&(e.lastDrawImage=d,n.shift(),e.drawProgress=0)}function It(t){this.fadeData.isTransitioning=!1,Reflect.apply(Ot,this,[])}function Ft(t){"@babel/helpers - typeof";return Ft="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ft(t)}function Ut(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ct(n.key),n)}}function jt(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Nt(t,e,r){return(e=Ct(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ct(t){var e=function(t,e){if("object"!=Ft(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Ft(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Ft(e)?e:e+""}function Lt(t,e){return t.get(Bt(t,e))}function Bt(t,e,r){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}var Mt=new WeakMap,Xt=new WeakSet,Wt=function(){return t=function t(e){var r,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),jt(r=this,n=Xt),n.add(r),Nt(this,"backgroundInfo",{width:0,height:0}),Nt(this,"transparentId",setTimeout(Boolean)),Nt(this,"lastDrawImage",void 0),Nt(this,"toBeList",[]),Nt(this,"drawProgress",0),Nt(this,"isTransitioning",!1),function(t,e,r){jt(t,e),e.set(t,r)}(this,Mt,void 0),Nt(this,"isDark",!1);var i,o,l=e.renderData;if((0,a.isNull)(l))i=10,o=10;else{var s=getComputedStyle(l.parentElement);i=parseInt(s.width),o=parseInt(s.height)}this.backgroundInfo={width:i,height:o},this.lastDrawImage={resource:I(i,o),width:i,height:o,kind:"default",tag:""},function(t,e,r){t.set(Bt(t,e),r)}(Mt,this,window.matchMedia("(prefers-color-scheme: dark)")),this.isDark=Lt(Mt,this).matches,Lt(Mt,this).addEventListener("change",Bt(Xt,this,zt));var u=this;Object.defineProperty(Lt(Mt,this),"isDark",{get:function(){return u.isDark},set:function(t){u.isDark=t,Reflect.apply(_t,e,[])||Reflect.apply(F,e,[!0])}})},(e=[{key:"run",value:function(){this.isTransitioning||(this.drawProgress=0,this.isTransitioning=!0)}},{key:"destroy",value:function(){this.transparentId&&clearTimeout(this.transparentId),Lt(Mt,this).removeEventListener("change",Bt(Xt,this,zt))}}])&&Ut(t.prototype,e),r&&Ut(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}();function zt(t){this.isDark=t.matches}function Gt(t){"@babel/helpers - typeof";return Gt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gt(t)}function Ht(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function qt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ht(Object(r),!0).forEach(function(e){Qt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ht(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Yt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,te(n.key),n)}}function $t(t,e,r){return e=Vt(e),function(t,e){if(e&&("object"==Gt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Kt()?Reflect.construct(e,r||[],Vt(t).constructor):e.apply(t,r))}function Kt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Kt=function(){return!!t})()}function Vt(t){return Vt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Vt(t)}function Zt(t,e){return Zt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Zt(t,e)}function Jt(t,e,r){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,r)}function Qt(t,e,r){return(e=te(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function te(t){var e=function(t,e){if("object"!=Gt(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Gt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Gt(e)?e:e+""}function ee(t,e){return t.get(function(t,e,r){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}(t,e))}var re=new WeakMap,ne=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Qt(n=$t(this,e,[t]),"renderData",null),Qt(n,"options",void 0),Qt(n,"fadeData",void 0),Qt(n,"defaults",b),Qt(n,"initialized",!1),Jt(n,re,(0,y.debounce)(ut,{this:n})),Object.defineProperties(n,{defaults:{value:n.defaults,writable:!1,enumerable:!1,configurable:!1}}),n.options=new Dt(qt(qt({},n.defaults),r)),n.renderData=new $(t,n.reloadBackground,n),n.fadeData=new Wt(n),(0,a.isFalse)(n.initState)||(0,a.isNull)(t.parentElement)||(0,a.isNull)(n.config)||(0,a.isNull)(n.gl)?n.initState=!1:(!function(t){var e=t.parentElement;t.width=e.clientWidth,t.height=e.clientHeight,(0,o.setStyle)(t,{position:"absolute",left:0,top:0,right:0,bottom:0,zIndex:-1,pointerEvents:"none"})}(t),Reflect.apply(st,n,[])),window.matchMedia("(prefers-color-scheme: dark)"),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Zt(t,e)}(e,t),r=e,(n=[{key:"raindropsFall",value:function(){var t=this.renderData,e=this.options,r=this.fadeData;if(!(0,a.isNull)(t)){var n=r.backgroundInfo,i=t.lastRaindropsFallTime,o=e.raindropsTimeInterval,l=e.dropRadius,s=Date.now();if(!(s-i<o)){t.lastRaindropsFallTime=s;var u=function(t){return(0,y.getRandomInt)(t)},c=n.width,f=n.height;this.drop(u(c),u(f),l,.03)}}}},{key:"drop",value:function(t,e,r,n){Reflect.apply(ft,this,[t,e,r,n])}},{key:"fade",value:function(){Reflect.apply(At,this,[])}},{key:"reloadBackground",value:function(){ee(re,this).call(this)}},{key:"destroy",value:function(){Reflect.apply(ct,this,[])}},{key:"show",value:function(){this.options.visible=!0,this.canvas.style.visibility="visible",Reflect.apply(X,this,[])}},{key:"hide",value:function(){this.options.visible=!1,this.canvas.style.visibility="hidden",Reflect.apply(z,this,[])}},{key:"pause",value:function(){this.options.running=!1}},{key:"play",value:function(){this.options.running=!0}},{key:"changePlayingState",value:function(){var t=this.options;t.running=!t.running}},{key:"set",value:function(t,e){"imgUrl"===t?(this.options.imgUrl=e,Reflect.apply(M,this,[])):"darkMode"===t?(this.options.darkMode=e,Reflect.apply(_t,this,[])||Reflect.apply(F,this,[!0])):this.options[t]=e}}])&&Yt(r.prototype,n),i&&Yt(r,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,i}(v);function ie(t,e){var r=(0,i.useRef)(null);return(0,i.useEffect)(function(){if(!(0,a.isNull)(t.current))return r.current=new ne(t.current,e),function(){var t;return null===(t=r.current)||void 0===t?void 0:t.destroy()}},[]),r}module.exports.earthnut=n})();
|
package/useRipples/index.mjs
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license MIT
|
|
3
|
-
* earthnut@useRipples/index.mjs
|
|
4
|
-
* Copyright (c) 2025 earthnut.dev
|
|
5
|
-
* 请在项目根参看详细许可证明
|
|
6
|
-
*/
|
|
7
|
-
"use client";import*as t from"a-js-tools";import*as e from"a-type-of-js";import*as r from"react";import*as n from"a-element-inline-style";var i={161:(e,r,n)=>{e.exports=(t=>{var e={};return n.d(e,t),e})({debounce:()=>t.debounce,enArr:()=>t.enArr,getRandomInt:()=>t.getRandomInt,getRandomString:()=>t.getRandomString})},362:(t,r,n)=>{t.exports=(t=>{var e={};return n.d(e,t),e})({isArray:()=>e.isArray,isBoolean:()=>e.isBoolean,isBusinessEmptyString:()=>e.isBusinessEmptyString,isEmptyArray:()=>e.isEmptyArray,isFalse:()=>e.isFalse,isNull:()=>e.isNull,isString:()=>e.isString,isUndefined:()=>e.isUndefined,isZero:()=>e.isZero})},649:(t,e,n)=>{t.exports=(t=>{var e={};return n.d(e,t),e})({useEffect:()=>r.useEffect,useRef:()=>r.useRef})},666:(t,e,r)=>{t.exports=(t=>{var e={};return r.d(e,t),e})({setStyle:()=>n.setStyle})},713:()=>{function t(e){"@babel/helpers - typeof";return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,r(i.key),i)}}function r(e){var r=function(e,r){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,r||"default");if("object"!=t(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==t(r)?r:r+""}new(function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(){};return Object.setPrototypeOf(e,this),Object.defineProperties(e,{info:{value:function(){},configurable:!1,writable:!1},warn:{value:function(){},configurable:!1,writable:!1},error:{value:function(){},configurable:!1,writable:!1},type:{value:!1,configurable:!1,writable:!1}}),e},(r=[{key:"clear",value:function(){}}])&&e(t.prototype,r),n&&e(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,n}())({name:"earthnut",type:!1})}},o={};function a(t){var e=o[t];if(void 0!==e)return e.exports;var r=o[t]={exports:{}};return i[t](r,r.exports,a),r.exports}a.d=(t,e)=>{for(var r in e)a.o(e,r)&&!a.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var s={};a.d(s,{useRipples:()=>le});var l=a(649),u=a(666),f=a(362);function c(t,e,r,n){function i(t,e){var n=r.createShader(t);if(r.shaderSource(n,e),r.compileShader(n),!r.getShaderParameter(n,r.COMPILE_STATUS))throw new Error("compile error: "+r.getShaderInfoLog(n));return n}var o,a={id:r.createProgram(),uniforms:{},locations:{}};if(r.attachShader(a.id,i(r.VERTEX_SHADER,t)),r.attachShader(a.id,i(r.FRAGMENT_SHADER,e)),r.linkProgram(a.id),!r.getProgramParameter(a.id,r.LINK_STATUS))throw new Error("link error: "+r.getProgramInfoLog(a.id));r.useProgram(a.id),r.enableVertexAttribArray(0);for(var s=t+e,l=/uniform (\w+) (\w+)/g;!(0,f.isNull)(o=l.exec(s));){var u=o[2];a.locations[u]=r.getUniformLocation(a.id,u)}return a}function h(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=this.gl;r.activeTexture(r.TEXTURE0+(e||0)),r.bindTexture(r.TEXTURE_2D,t)}function p(t){return"rgba(0, 0, 0, 0)"===t||"#ffffffff"===t||"transport"===t}function d(t){return"none"===t||""===t}function g(){var t=this,e=function(){return t.initState=!1,null};if(!this.gl)return e();var r=this.gl,n=Object.fromEntries(["OES_texture_float","OES_texture_half_float","OES_texture_float_linear","OES_texture_half_float_linear"].reduce(function(t,e){var n=r.getExtension(e);return n&&t.push([e,n]),t},[]));if(!n.OES_texture_float)return e();var i=[];function o(t,e,r){var i="OES_texture_"+t,o=i+"_linear",a=o in n;return{type:e,linearSupport:a,arrayType:r,extensions:a?[i,o]:[i]}}i.push(o("float",r.FLOAT,Float32Array)),n.OES_texture_half_float&&i.push(o("half_float",n.OES_texture_half_float.HALF_FLOAT_OES,null));var a=r.createTexture(),s=r.createFramebuffer();r.bindFramebuffer(r.FRAMEBUFFER,s),r.bindTexture(r.TEXTURE_2D,a),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.NEAREST),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.NEAREST),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE);for(var l=null,u=0;u<i.length;u++)if(r.texImage2D(r.TEXTURE_2D,0,r.RGBA,32,32,0,r.RGBA,i[u].type,null),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,a,0),r.checkFramebufferStatus(r.FRAMEBUFFER)===r.FRAMEBUFFER_COMPLETE){l=i[u];break}return l}function m(t){"@babel/helpers - typeof";return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m(t)}function v(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,E(n.key),n)}}function y(t,e,r){return e&&v(t.prototype,e),r&&v(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function b(t,e,r){return(e=E(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function E(t){var e=function(t,e){if("object"!=m(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=m(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==m(e)?e:e+""}var w=y(function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),b(this,"canvas",void 0),b(this,"gl",void 0),b(this,"config",void 0),b(this,"initState",!0),this.canvas=e;var r=e.getContext("webgl");if((0,f.isNull)(r))return this.initState=!1,void(this.config=null);this.gl=r,this.config=Reflect.apply(g,this,[])}),R=a(161),T={imgUrl:null,resolution:360,dropRadius:12,perturbance:.01,interactive:!0,crossOrigin:"no-cors",playingState:!0,accelerating:1,raindropsTimeInterval:3600,idleFluctuations:!0,darkMode:void 0};Object.freeze(T);var S;a(713);function k(t){"@babel/helpers - typeof";return k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},k(t)}function P(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,x(n.key),n)}}function x(t){var e=function(t,e){if("object"!=k(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=k(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==k(e)?e:e+""}function D(t,e,r){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,r)}function _(t,e,r){return t.set(O(t,e),r),r}function A(t,e){return t.get(O(t,e))}function O(t,e,r){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}function I(t){return function(t){if(Array.isArray(t))return F(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return F(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?F(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function F(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var U=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r={list:[],diameter:48,radius:0,cells:0};r.diameter%2!=0&&r.diameter++;var n=r.diameter,i=r.list,o=n/2;r.radius=o,r.cells=Math.pow(n,2);for(var a=0;a<n;a++){i[a]=[];for(var s=0;s<n;s++)i[a][s]=[0,0,0,0]}for(var l=0;l<=o;l++)for(var u=function(){var t=i[l][f],r=Math.ceil(Math.sqrt(Math.pow(l,2)+Math.pow(f,2)))<=o,n=e?10:255,a=e?25:190,s=r?e?160:120:e?160:180,u=r?e?230:160:e?250:240,c=function(){return(0,R.getRandomInt)(n,a)};t[0]=c(),t[1]=c(),t[2]=c(),t[3]=(0,R.getRandomInt)(s,u)},f=l;f<=o;f++)u();for(var c=0;c<=o;c++)for(var h=0;h<=c;h++)i[c][h]=i[h][c];for(var p=o;p<n;p++)for(var d=0;d<=o;d++)i[p][d]=i[n-p][d];for(var g=0;g<o;g++)for(var m=o;m<n;m++)i[g][m]=i[g][n-m];for(var v=o;v<n;v++)for(var y=o;y<n;y++)i[v][y]=i[v][n-y];var b=t%n;return r.list=[].concat(I(i.slice(b)),I(i.slice(0,b))),r},j=new(S=new WeakMap,function(){return t=function t(){var e,r,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),D(this,S,1),e=this,r="data",n=U(),(r=x(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n},(e=[{key:"build",value:function(t){A(S,this)>100&&_(S,this,0),this.data=U(_(S,this,A(S,this)+4),t)}}])&&P(t.prototype,e),r&&P(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}());function N(t,e){var r=document.createElement("canvas"),n=document.createElement("canvas"),i=r.getContext("2d"),o=n.getContext("2d");return(0,f.isNull)(i)||(0,f.isNull)(o)?r:(r.width=n.width=t||1,r.height=n.height=e||1,i.clearRect(0,0,t,e),o.clearRect(0,0,t,e),i.globalAlpha=1,i.putImageData(function(t,e){Date.now();for(var r=new ImageData(t||1,e||1),n=r.data,i=j.data,o=i.diameter,a=i.list,s=t*o,l=0;l<n.length;l+=4){var u=l/4%s,f=u%t%o,c=Math.floor(u/t),h=a[f][c];n[l]=h[0],n[l+1]=h[1],n[l+2]=h[2],n[l+3]=h[3]}return r}(t,e),0,0),o.fillStyle="#ffffff",o.fillRect(0,0,t,e),o.drawImage(r,0,0,t||1,e||1),o.globalCompositeOperation="source-over",n)}function B(){var t,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=this.fadeData,n=this.options,i=r.backgroundInfo,o=r.toBeList,a=i.width,s=i.height,l=(0,R.getRandomString)({length:8,includeNumbers:!0,includeUppercaseLetters:!0});j.build(null!==(t=n.darkMode)&&void 0!==t?t:r.isDark),o.push({resource:N(a,s),width:a,height:s,kind:"default",tag:l}),e&&r.run()}function C(t,e){var r,n,i=t.imgUrl;return(0,f.isString)(i)&&i||(r=e.backgroundImage,n=/url\(["']?([^"']*)["']?\)/.exec(r),(0,f.isNull)(n)?null:n[1])}function L(t,e){return(0,f.isArray)(t.imgUrl)&&1===t.imgUrl.length&&t.imgUrl[0]||e.backgroundColor}function M(){var t=this.renderData,e=this.fadeData,r=this.options;if((0,f.isNull)(t))return Reflect.apply(B,this,[]);var n=t.originStyle;if(p(n.backgroundColor)&&(!(0,f.isArray)(r.imgUrl)||1!==r.imgUrl.length))return Reflect.apply(B,this,[]);var i=document.createElement("canvas"),o=i.getContext("2d");if((0,f.isNull)(o))return Reflect.apply(B,this,[]);var a=e.backgroundInfo,s=a.width,l=a.height;i.width=s,i.height=l,o.clearRect(0,0,s,l);var u=L(r,n);o.beginPath(),o.fillStyle=u,o.fillRect(0,0,s,l),o.fill(),e.isTransitioning&&!(0,f.isEmptyArray)(e.toBeList)?e.toBeList=[e.toBeList[0]]:e.toBeList=[];var c={resource:i,kind:"background-color",tag:u,width:s,height:l};e.toBeList.push(c),e.run()}function X(){var t=this.fadeData,e=this.renderData,r=this.options;if((0,f.isNull)(e))return Reflect.apply(M,this,[]);var n=e.originStyle;if(!/linear-gradient\(.*\)/.test(n.backgroundImage)&&!(0,f.isArray)(r.imgUrl))return Reflect.apply(M,this,[]);var i=(0,f.isArray)(r.imgUrl)&&r.imgUrl.length>1&&r.imgUrl||n.backgroundImage.replace(/^.*linear-gradient\((.*)\).*$/,"$1").split("),").map(function(t){return(t=t.trim()).endsWith(")")||(t+=")"),t}).filter(function(t){return t.startsWith("rgb")||t.startsWith("#")});if(i.length<2)return Reflect.apply(M,this,[]);var o=document.createElement("canvas"),a=o.getContext("2d");if((0,f.isNull)(a))return Reflect.apply(M,this,[]);var s=t.backgroundInfo,l=s.width,u=s.height;o.width=l,o.height=u,a.fillStyle="#fff",a.fillRect(0,0,l,u);var c=a.createLinearGradient(0,0,0,u);i.forEach(function(t,e){return c.addColorStop(e/(i.length-1),t)}),a.fillStyle=c,a.fillRect(0,0,l,u),t.isTransitioning&&!(0,f.isEmptyArray)(t.toBeList)?t.toBeList=[t.toBeList[0]]:t.toBeList=[],t.toBeList.push({resource:o,kind:"linear-gradient",tag:i.join("_"),width:l,height:u}),t.run()}function W(t){return function(t){if(Array.isArray(t))return z(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return z(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?z(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function z(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function G(){var t=this,e=this.renderData,r=this.options,n=this.fadeData;if((0,f.isNull)(e))Reflect.apply(X,this,[]);else{var i=e.lastUseStyle,o=n.backgroundInfo,a=o.width,s=o.height,l=C(r,i);if(e.imageSource=l,l){var u=function(t,e,r){var n=new Image(e,r);return n.width=e,n.height=r,n.src=t,n}(l,a,s);u.onload=function(){clearTimeout(n.transparentId),n.isTransitioning&&!(0,f.isEmptyArray)(n.toBeList)?n.toBeList=[n.toBeList[0]].concat(W(n.toBeList.slice(1).filter(function(t){return"image"===t.kind&&(Math.abs(t.width-a)>2||Math.abs(t.height-s)>2||t.tag!==l)}))):n.toBeList=[],n.toBeList.push({resource:u,width:a,height:s,kind:"image",tag:l}),n.run()},u.onerror=function(){Reflect.apply(X,t,[])},u.crossOrigin=r.crossOrigin}else Reflect.apply(X,this,[])}}function H(){var t=this.renderData;if(!(0,f.isNull)(t)){var e=t.parentElement;e&&[["background-image","none"],["background-color","transparent"]].forEach(function(t){return e.style.setProperty(t[0],t[1],"important")})}}function Y(t){var e=window.getComputedStyle(t),r=t.style;return{inlineBackground:r.background,inlineBackgroundColor:r.backgroundColor,inlineBackgroundImage:r.backgroundImage,backgroundColor:e.backgroundColor,backgroundImage:e.backgroundImage,backgroundSize:e.backgroundSize,backgroundPosition:e.backgroundPosition,backgroundRepeat:e.backgroundRepeat,backgroundClip:e.backgroundClip,backgroundOrigin:e.backgroundOrigin,backgroundAttachment:e.backgroundAttachment,position:e.position,width:parseInt(e.width),height:parseInt(e.height)}}function q(){var t=this.renderData;if(!(0,f.isNull)(t)){var e=t.parentElement,r=t.originStyle;e.style.setProperty("background-image",r.inlineBackgroundImage),e.style.setProperty("background-color",r.inlineBackgroundColor)}}function Z(t){"@babel/helpers - typeof";return Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Z(t)}function $(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,V(n.key),n)}}function K(t,e,r){return(e=V(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function V(t){var e=function(t,e){if("object"!=Z(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Z(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Z(e)?e:e+""}var J=function(){return t=function t(e,r,n){var i,o=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),K(this,"quad",null),K(this,"lastRaindropsFallTime",0),K(this,"parentElement",void 0),K(this,"mutationObserver",void 0),K(this,"resizeObserver",void 0),K(this,"renderProgram",void 0),K(this,"imageSource",""),K(this,"dropProgram",void 0),K(this,"updateProgram",void 0),K(this,"textures",[]),K(this,"backgroundTexture",[]),K(this,"textureDelta",void 0),K(this,"framebuffers",[]),K(this,"bufferWriteIndex",0),K(this,"bufferReadIndex",1),K(this,"originStyle",void 0),K(this,"lastUseStyle",void 0),K(this,"events",{}),K(this,"animationFrameId",0),this.parentElement=null!==(i=e.parentElement)&&void 0!==i?i:document.body,Reflect.apply(H,n,[]),this.originStyle=this.lastUseStyle=Y(this.parentElement),this.mutationObserver=new MutationObserver(function(t){t.forEach(function(t){if(t.target===o.parentElement&&"attributes"===t.type&&n.options.visible){var e=Object.values(o.lastUseStyle),i=Y(o.parentElement),a=Object.values(i);if((0,f.isEmptyArray)(R.enArr.difference(e,a)))return;var s=d(i.backgroundImage),l=p(i.backgroundColor);if(s&&l)return;o.lastUseStyle=i,Reflect.apply(r,n,[]),Reflect.apply(H,n,[])}})}),this.mutationObserver.observe(this.parentElement,{subtree:!0,attributes:!0,attributeFilter:["class","style"]}),this.resizeObserver=new ResizeObserver(function(t){t.forEach(function(t){t.target===o.parentElement&&Reflect.apply(r,n,[])})}),this.resizeObserver.observe(this.parentElement)},e=[{key:"destroy",value:function(){if(this.animationFrameId&&window.cancelAnimationFrame(this.animationFrameId),Reflect.apply(q,{renderData:this},[]),this.parentElement&&this.events){var t,e,r,n=this.parentElement,i=this.events;Object.keys(i).forEach(function(t){return n.removeEventListener&&n.removeEventListener(t,i[t])}),n.removeAttribute&&n.removeAttribute("data-ripples"),null===(t=this.mutationObserver)||void 0===t||t.takeRecords(),null===(e=this.mutationObserver)||void 0===e||e.disconnect(),this.mutationObserver=null,null===(r=this.resizeObserver)||void 0===r||r.disconnect(),this.resizeObserver=null}}}],e&&$(t.prototype,e),r&&$(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}();function Q(){var t=this.renderData,e=this.fadeData;if(!(0,f.isNull)(t)){var r,n,i,o=t.parentElement,a=window.getComputedStyle(o),s=a.backgroundSize,l=a.backgroundAttachment,u=a.backgroundPosition,c=/\s+/.test(r=u)?r.replace(/center/,"50%").replace(/top|left/,"0%").replace(/bottom/,"100%").replace(/\s+/," ").split(" "):tt(r)?[r,"50%"]:{center:["50%","50%"],top:["50%","0%"],bottom:["50%","100%"],left:["0%","50%"],right:["100%","50%"]}[r],h={left:0,top:0,width:0,height:0};"fixed"===l?(h.height=window.innerHeight,h.left=window.screenX,h.top=window.screenY,h.width=window.innerWidth):(h.left=0,h.top=0,h.width=o.scrollWidth,h.height=o.scrollHeight);var p=e.backgroundInfo||{width:100,height:100},d=p.width,g=p.height;if("cover"===s){var m=Math.max(h.width/d,h.height/g);n=d*m,i=g*m}else if("contain"===s){var v=Math.min(h.width/d,h.height/g);n=d*v,i=g*v}else{var y=s.split(" ");n=y[0]||"",i=y[1]||n,tt(n)?n=h.width*parseFloat(n)/100:"auto"!==n&&(n=parseFloat(n)),tt(i)?i=h.height*parseFloat(i)/100:"auto"!==i&&(i=parseFloat(i)),"auto"===n&&"auto"===i?(n=d,i=g):("auto"===n&&(n=d*(Number(i)/g)),"auto"===i&&(i=g*(Number(n)/d)))}var b=c&&c[0]||"0%",E=c&&c[1]||"0%";b=tt(b)?(h.left+(h.width-Number(n))*parseFloat(b)/100).toString():(h.left+parseFloat(b)).toString(),E=tt(E)?(h.top+(h.height-Number(i))*parseFloat(E)/100).toString():(h.top+parseFloat(E)).toString(),t.renderProgram.uniforms.topLeft=new Float32Array([-Number(b)/n,-Number(E)/i]),t.renderProgram.uniforms.bottomRight=new Float32Array([t.renderProgram.uniforms.topLeft[0]+o.clientWidth/n,t.renderProgram.uniforms.topLeft[1]+o.clientHeight/i]);var w=Math.max(this.canvas.width,this.canvas.height);t.renderProgram.uniforms.containerRatio=new Float32Array([this.canvas.width/w,this.canvas.height/w])}}function tt(t){return t.endsWith("%")}function et(){var t=this.gl,e=this.renderData;(0,f.isNull)(e)||(t.bindBuffer(t.ARRAY_BUFFER,e.quad),t.vertexAttribPointer(0,2,t.FLOAT,!1,0,0),t.drawArrays(t.TRIANGLE_FAN,0,4))}function rt(){var t=this.gl,e=this.renderData,r=this.options;if(!(0,f.isNull)(e)){var n=e.textures,i=e.backgroundTexture,o=r.perturbance;t.bindFramebuffer(t.FRAMEBUFFER,null),t.viewport(0,0,this.canvas.width,this.canvas.height),t.enable(t.BLEND),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),t.useProgram(e.renderProgram.id),Reflect.apply(h,this,[i,0]),Reflect.apply(h,this,[n[0],1]),t.uniform1f(e.renderProgram.locations.perturbance,o),t.uniform2fv(e.renderProgram.locations.topLeft,e.renderProgram.uniforms.topLeft),t.uniform2fv(e.renderProgram.locations.bottomRight,e.renderProgram.uniforms.bottomRight),t.uniform2fv(e.renderProgram.locations.containerRatio,e.renderProgram.uniforms.containerRatio),t.uniform1i(e.renderProgram.locations.samplerBackground,0),t.uniform1i(e.renderProgram.locations.samplerRipples,1),Reflect.apply(et,this,[]),t.disable(t.BLEND)}}function nt(){var t=this.renderData;if(!(0,f.isNull)(t)){var e=t.bufferWriteIndex,r=t.bufferReadIndex;t.bufferWriteIndex=1-e,t.bufferReadIndex=1-r}}function it(){var t=this.gl,e=this.renderData,r=this.options;if(!(0,f.isNull)(e)){var n=e.updateProgram,i=e.textures,o=e.framebuffers,a=e.bufferWriteIndex,s=e.bufferReadIndex,l=r.resolution;t.viewport(0,0,l,l),t.bindFramebuffer(t.FRAMEBUFFER,o[a]),Reflect.apply(h,this,[i[s]]),t.useProgram(n.id),Reflect.apply(et,this,[]),Reflect.apply(nt,this,[])}}function ot(){var t=this,e=this.renderData,r=this.options,n=this.fadeData;if(!(0,f.isNull)(e)){var i=e.parentElement,o=n.isTransitioning,a=r.running,s=r.idleFluctuations,l=r.lastRunningState,u=getComputedStyle(i);n.backgroundInfo={width:parseInt(u.width),height:parseInt(u.height)},Reflect.apply(Q,this,[]),a?(l||(r.lastRunningState=!0,this.show()),s&&this.raindropsFall(),o&&this.fade(),Reflect.apply(it,this,[]),Reflect.apply(rt,this,[])):l&&(r.lastRunningState=!1,this.hide()),e.animationFrameId=requestAnimationFrame(function(){return Reflect.apply(ot,t,[])})}}function at(t,e,r){var n=this.renderData;if(!(0,f.isNull)(n)){var i=n.parentElement,o=window.getComputedStyle(i),a=parseInt(o.borderLeftWidth)||0,s=parseInt(o.borderTopWidth)||0,l=i.getBoundingClientRect(),u=t.clientX-l.left-a,c=t.clientY-l.top-s;this.drop(u,c,e,r)}}function st(){var t=this,e=this.renderData,r=this.options;if(!(0,f.isNull)(e)){var n=e.parentElement,i=e.events,o=function(n){var i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];r.visible&&r.running&&r.interactive&&(e.lastRaindropsFallTime=Date.now(),Reflect.apply(at,t,[n,r.dropRadius*(i?1.5:1),i?.03:.01]))};i.mousemove=function(t){for(var e=r.accelerating;e--;)o(t)},i.touchmove=i.touchstart=function(t){for(var e=t.touches,r=0;r<e.length;r++)o(e[r])},i.mousedown=function(t){return o(t,!0)},Object.keys(i).forEach(function(t){return null==n?void 0:n.addEventListener(t,i[t],{passive:!0})})}}var lt="\n attribute vec2 vertex;\n varying vec2 coord;\n void main() {\n coord = vertex * 0.5 + 0.5;\n gl_Position = vec4(vertex, 0.0, 1.0);\n }";function ut(){var t=this.gl,e=this.renderData;if(!(0,f.isNull)(e)){var r=e.textureDelta;e.dropProgram=c(lt,"precision highp float;\n\n const float PI = 3.141592653589793;\n uniform sampler2D texture;\n uniform vec2 center;\n uniform float radius;\n uniform float strength;\n\n varying vec2 coord;\n\n void main() {\n vec4 info = texture2D(texture, coord);\n\n float drop = max(0.0, 1.0 - length(center * 0.5 + 0.5 - coord) / radius);\n drop = 0.5 - cos(drop * PI) * 0.5;\n info.r += drop * strength;\n gl_FragColor = info;\n }",t);var n=e.updateProgram=c(lt,"\n precision highp float;\n\n uniform sampler2D texture;\n uniform vec2 delta;\n\n varying vec2 coord;\n\n void main() {\n vec4 info = texture2D(texture, coord);\n \n vec2 dx = vec2(delta.x, 0.0);\n vec2 dy = vec2(0.0, delta.y);\n \n float average = (\n texture2D(texture, coord - dx).r +\n texture2D(texture, coord - dy).r +\n texture2D(texture, coord + dx).r +\n texture2D(texture, coord + dy).r\n ) * 0.25;\n \n info.g += (average - info.r) * 2.0;\n info.g *= 0.995;\n info.r += info.g;\n \n gl_FragColor = info;\n }\n ",this.gl);t.uniform2fv(n.locations.delta,r),e.renderProgram=c("\n precision highp float;\n\n attribute vec2 vertex;\n uniform vec2 topLeft;\n uniform vec2 bottomRight;\n uniform vec2 containerRatio;\n varying vec2 ripplesCoord;\n varying vec2 backgroundCoord;\n void main() {\n backgroundCoord = mix(topLeft, bottomRight, vertex * 0.5 + 0.5);\n backgroundCoord.y = 1.0 - backgroundCoord.y;\n ripplesCoord = vec2(vertex.x, -vertex.y) * containerRatio * 0.5 + 0.5;\n gl_Position = vec4(vertex.x, -vertex.y, 0.0, 1.0);\n }\n ","\n precision highp float;\n\n uniform sampler2D samplerBackground;\n uniform sampler2D samplerRipples;\n uniform vec2 delta;\n\n uniform float perturbance;\n varying vec2 ripplesCoord;\n varying vec2 backgroundCoord;\n\n void main() {\n float height = texture2D(samplerRipples, ripplesCoord).r;\n float heightX = texture2D(samplerRipples, vec2(ripplesCoord.x + delta.x, ripplesCoord.y)).r;\n float heightY = texture2D(samplerRipples, vec2(ripplesCoord.x, ripplesCoord.y + delta.y)).r;\n vec3 dx = vec3(delta.x, heightX - height, 0.0);\n vec3 dy = vec3(0.0, heightY - height, delta.y);\n vec2 offset = -normalize(cross(dy, dx)).xz;\n float specular = pow(max(0.0, dot(offset, normalize(vec2(-0.6, 1.0)))), 4.0);\n gl_FragColor = texture2D(samplerBackground, backgroundCoord + offset * perturbance) + specular;\n }",t),t.uniform2fv(e.renderProgram.locations.delta,r)}}function ft(){var t=this.gl,e=this.renderData;if(!(0,f.isNull)(e)){var r=e.backgroundTexture=t.createTexture();t.bindTexture(t.TEXTURE_2D,r),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,1),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR)}}function ct(t){var e=this.gl,r=this.renderData,n=this.fadeData;if(!(0,f.isNull)(r)){var i=r.backgroundTexture,o=r.parentElement,a=n.backgroundInfo,s=a.width,l=a.height,u=function(t){return(0,f.isZero)(t&t-1)},c=u(s)&&u(l)?e.REPEAT:e.CLAMP_TO_EDGE;e.bindTexture(e.TEXTURE_2D,i),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,c),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,c),o.dataset.render_img=t.tag,o.dataset.render_width=t.width+"px",o.dataset.render_height=t.height+"px",e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t.resource)}}function ht(){var t=this,e=this.renderData,r=this.options,n=this.fadeData;if(!(0,f.isNull)(e)&&this.config){var i=e.textures,o=e.framebuffers,a=r.resolution,s=this.gl,l=1/a;e.textureDelta=new Float32Array([l,l]),this.config.extensions.forEach(function(t){return s.getExtension(t)});for(var u=this.config.arrayType,c=u?new u(a*a*4):null,h=this.config,p=0;p<2;p++){var d=s.createTexture(),g=s.createFramebuffer();s.bindFramebuffer(s.FRAMEBUFFER,g),s.bindTexture(s.TEXTURE_2D,d),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MIN_FILTER,h.linearSupport?s.LINEAR:s.NEAREST),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MAG_FILTER,h.linearSupport?s.LINEAR:s.NEAREST),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_S,s.CLAMP_TO_EDGE),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_T,s.CLAMP_TO_EDGE),s.texImage2D(s.TEXTURE_2D,0,s.RGBA,a,a,0,s.RGBA,h.type,c),s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,d,0),i.push(d),o.push(g)}e.quad=s.createBuffer(),s.bindBuffer(s.ARRAY_BUFFER,e.quad),s.bufferData(s.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,1,1,-1,1]),s.STATIC_DRAW),Reflect.apply(ut,this,[]),Reflect.apply(ft,this,[]),Reflect.apply(G,this,[]),s.clearColor(0,0,0,0),s.blendFunc(s.SRC_ALPHA,s.ONE_MINUS_SRC_ALPHA),r.visible=!0,r.running=!0,Reflect.apply(st,this,[]),Reflect.apply(ct,this,[n.lastDrawImage]),e.animationFrameId=requestAnimationFrame(function(){return Reflect.apply(ot,t,[])})}}function pt(){var t=this.renderData,e=this.fadeData;if(!(0,f.isNull)(t)){var r=t.parentElement,n=e.backgroundInfo,i=r.offsetWidth,o=r.offsetHeight;this.canvas.width=n.width=i,this.canvas.height=n.height=o,Reflect.apply(G,this,[])}}function dt(){var t=this.renderData,e=this.fadeData;(0,f.isNull)(t)||(t.destroy(),Object.keys(t).forEach(function(e){return t[e]=null}),this.renderData=null),e.destroy(),Object.keys(e).forEach(function(t){return e[t]=null}),this.fadeData=null,this.gl&&(this.gl=null)}function gt(t,e,r,n){var i=this.renderData,o=this.options,a=this.gl;if(!(0,f.isNull)(i)){var s=i.parentElement,l=i.dropProgram,u=i.textures,c=i.framebuffers,p=i.bufferWriteIndex,d=i.bufferReadIndex,g=o.resolution,m=s.offsetWidth,v=s.offsetHeight,y=Math.max(m,v);r/=y;var b=new Float32Array([(2*t-m)/y,(v-2*e)/y]);a.viewport(0,0,g,g),a.bindFramebuffer(a.FRAMEBUFFER,c[p]),Reflect.apply(h,this,[u[d]]),a.useProgram(l.id),a.uniform2fv(l.locations.center,b),a.uniform1f(l.locations.radius,r),a.uniform1f(l.locations.strength,n),Reflect.apply(et,this,[]),Reflect.apply(nt,this,[])}}function mt(t){"@babel/helpers - typeof";return mt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mt(t)}function vt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,bt(n.key),n)}}function yt(t,e,r){return(e=bt(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function bt(t){var e=function(t,e){if("object"!=mt(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=mt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==mt(e)?e:e+""}function Et(t,e,r){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,r)}function wt(t,e){return t.get(Tt(t,e))}function Rt(t,e,r){return t.set(Tt(t,e),r),r}function Tt(t,e,r){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}var St=new WeakMap,kt=new WeakMap,Pt=new WeakMap,xt=new WeakMap,Dt=new WeakMap,_t=new WeakMap,At=new WeakMap,Ot=new WeakMap,It=function(){return t=function t(e){var r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Et(this,St,T.accelerating),Et(this,kt,T.interactive),Et(this,Pt,T.resolution),Et(this,xt,T.perturbance),Et(this,Dt,T.dropRadius),yt(this,"imgUrl",T.imgUrl),Et(this,_t,T.idleFluctuations),Et(this,At,T.raindropsTimeInterval),yt(this,"crossOrigin","no-cors"),yt(this,"visible",!1),yt(this,"running",!1),Et(this,Ot,void 0),yt(this,"lastRunningState",!1),this.perturbance=e.perturbance,this.resolution=e.resolution,this.raindropsTimeInterval=e.raindropsTimeInterval,this.accelerating=e.accelerating,this.interactive=e.interactive,this.dropRadius=e.dropRadius,this.imgUrl=e.imgUrl,this.idleFluctuations=e.idleFluctuations,this.running=Boolean(null===(r=e.playingState)||void 0===r||r),this.crossOrigin=e.crossOrigin,this.darkMode=e.darkMode},(e=[{key:"accelerating",get:function(){return wt(St,this)},set:function(t){t>100||t<2||Rt(St,this,t)}},{key:"interactive",get:function(){return wt(kt,this)},set:function(t){(0,f.isBoolean)(t)&&Rt(kt,this,t)}},{key:"resolution",get:function(){return wt(Pt,this)},set:function(t){t<100||t>550||Rt(Pt,this,t)}},{key:"perturbance",get:function(){return wt(xt,this)},set:function(t){t<1e-4||t>1||Rt(xt,this,t)}},{key:"dropRadius",get:function(){return wt(Dt,this)},set:function(t){!isFinite(t)||t<10||Rt(Dt,this,t)}},{key:"idleFluctuations",get:function(){return wt(_t,this)},set:function(t){(0,f.isBoolean)(t)&&Rt(_t,this,t)}},{key:"raindropsTimeInterval",get:function(){return wt(At,this)},set:function(t){t<10||t>12e3||Rt(At,this,t)}},{key:"playingState",get:function(){return this.running},set:function(t){this.running=Boolean(null==t||t)}},{key:"darkMode",get:function(){return wt(Ot,this)},set:function(t){Rt(Ot,this,(0,f.isUndefined)(t)?void 0:Boolean(t))}}])&&vt(t.prototype,e),r&&vt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}();function Ft(){var t=this.fadeData,e=this.options,r=this.renderData;if((0,f.isNull)(r))return!0;var n=e.imgUrl,i=r.lastUseStyle,o=t.lastDrawImage,a=t.backgroundInfo,s=a.width,l=a.height,u=o.tag,c=o.kind,h=C(e,i),p=o.width===s,d=o.height===l,g=p&&d;if("image"===c&&g&&(0,f.isString)(h)&&h===u)return!0;var m=(0,f.isArray)(n)&&n.join("_")||"";if("linear-gradient"===c&&g&&m===u)return!0;var v=L(e,i);return!("background-color"!==c||!g||u!==v)}function Ut(){var t=this,e=this.options,r=this.fadeData;r.transparentId=setTimeout(function(){if(clearTimeout(r.transparentId),r.isTransitioning)return Reflect.apply(Ut,t,[]);Reflect.apply(Ft,t,[])||r.run()},2*e.raindropsTimeInterval)}function jt(){var t=this.renderData,e=this.fadeData,r=this.options,n=e.toBeList;if((0,f.isNull)(t))return Reflect.apply(Nt,this,["还没有准备好,即将退出"]);if((0,f.isEmptyArray)(n))return Reflect.apply(Nt,this,["由于缺少当前渲染的背景,退出"]);if(0===e.drawProgress&&n.forEach(function(t){}),e.drawProgress>1e3){if(e.lastDrawImage=n.shift(),Reflect.apply(ct,this,[e.lastDrawImage]),(0,f.isEmptyArray)(n)){var i=t.lastUseStyle;((0,f.isNull)(r.imgUrl)||(0,f.isBusinessEmptyString)(r.imgUrl)||(0,f.isZero)(r.imgUrl.length))&&p(i.backgroundColor)&&d(i.backgroundImage)&&Reflect.apply(B,this,[!1])}return Reflect.apply(Nt,this,["当前执行完毕,开启下次执行"])}var o=e.lastDrawImage,a=e.backgroundInfo;e.drawProgress+=18;var s=document.createElement("canvas"),l=s.getContext("2d");if((0,f.isNull)(l)||(0,f.isNull)(o.resource)||(0,f.isEmptyArray)(n))return Reflect.apply(Nt,this,"环境值错误");var u=a.width,c=a.height;s.width=u,s.height=c,l.clearRect(0,0,u,c),l.drawImage(o.resource,0,0,u,c),l.globalAlpha=e.drawProgress/1e3,l.drawImage(n[0].resource,0,0,u,c),l.globalAlpha=1;var h={resource:s,width:u,height:c,kind:"mix",tag:"".concat(o.tag," >> ").concat(n[0].tag)};Reflect.apply(ct,this,[h]),n.length>1&&(e.lastDrawImage=h,n.shift(),e.drawProgress=0)}function Nt(t){this.fadeData.isTransitioning=!1,Reflect.apply(Ut,this,[])}function Bt(t){"@babel/helpers - typeof";return Bt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bt(t)}function Ct(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Xt(n.key),n)}}function Lt(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Mt(t,e,r){return(e=Xt(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Xt(t){var e=function(t,e){if("object"!=Bt(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Bt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Bt(e)?e:e+""}function Wt(t,e){return t.get(zt(t,e))}function zt(t,e,r){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}var Gt=new WeakMap,Ht=new WeakSet,Yt=function(){return t=function t(e){var r,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Lt(r=this,n=Ht),n.add(r),Mt(this,"backgroundInfo",{width:0,height:0}),Mt(this,"transparentId",setTimeout(Boolean)),Mt(this,"lastDrawImage",void 0),Mt(this,"toBeList",[]),Mt(this,"drawProgress",0),Mt(this,"isTransitioning",!1),function(t,e,r){Lt(t,e),e.set(t,r)}(this,Gt,void 0),Mt(this,"isDark",!1);var i,o,a=e.renderData;if((0,f.isNull)(a))i=10,o=10;else{var s=getComputedStyle(a.parentElement);i=parseInt(s.width),o=parseInt(s.height)}this.backgroundInfo={width:i,height:o},this.lastDrawImage={resource:N(i,o),width:i,height:o,kind:"default",tag:""},function(t,e,r){t.set(zt(t,e),r)}(Gt,this,window.matchMedia("(prefers-color-scheme: dark)")),this.isDark=Wt(Gt,this).matches,Wt(Gt,this).addEventListener("change",zt(Ht,this,qt));var l=this;Object.defineProperty(Wt(Gt,this),"isDark",{get:function(){return l.isDark},set:function(t){l.isDark=t,Reflect.apply(Ft,e,[])||Reflect.apply(B,e,[!0])}})},(e=[{key:"run",value:function(){this.isTransitioning||(this.drawProgress=0,this.isTransitioning=!0)}},{key:"destroy",value:function(){this.transparentId&&clearTimeout(this.transparentId),Wt(Gt,this).removeEventListener("change",zt(Ht,this,qt))}}])&&Ct(t.prototype,e),r&&Ct(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}();function qt(t){this.isDark=t.matches}function Zt(t){"@babel/helpers - typeof";return Zt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zt(t)}function $t(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function Kt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?$t(Object(r),!0).forEach(function(e){ne(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):$t(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Vt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ie(n.key),n)}}function Jt(t,e,r){return e=te(e),function(t,e){if(e&&("object"==Zt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Qt()?Reflect.construct(e,r||[],te(t).constructor):e.apply(t,r))}function Qt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Qt=function(){return!!t})()}function te(t){return te=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},te(t)}function ee(t,e){return ee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ee(t,e)}function re(t,e,r){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,r)}function ne(t,e,r){return(e=ie(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ie(t){var e=function(t,e){if("object"!=Zt(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Zt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Zt(e)?e:e+""}function oe(t,e){return t.get(function(t,e,r){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}(t,e))}var ae=new WeakMap,se=function(){function t(e,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),ne(n=Jt(this,t,[e]),"renderData",null),ne(n,"options",void 0),ne(n,"fadeData",void 0),ne(n,"defaults",T),ne(n,"initialized",!1),re(n,ae,(0,R.debounce)(pt,{this:n})),Object.defineProperties(n,{defaults:{value:n.defaults,writable:!1,enumerable:!1,configurable:!1}}),n.options=new It(Kt(Kt({},n.defaults),r)),n.renderData=new J(e,n.reloadBackground,n),n.fadeData=new Yt(n),(0,f.isFalse)(n.initState)||(0,f.isNull)(e.parentElement)||(0,f.isNull)(n.config)||(0,f.isNull)(n.gl)?n.initState=!1:(!function(t){var e=t.parentElement;t.width=e.clientWidth,t.height=e.clientHeight,(0,u.setStyle)(t,{position:"absolute",left:0,top:0,right:0,bottom:0,zIndex:-1,pointerEvents:"none"})}(e),Reflect.apply(ht,n,[])),window.matchMedia("(prefers-color-scheme: dark)"),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ee(t,e)}(t,w),e=t,(r=[{key:"raindropsFall",value:function(){var t=this.renderData,e=this.options,r=this.fadeData;if(!(0,f.isNull)(t)){var n=r.backgroundInfo,i=t.lastRaindropsFallTime,o=e.raindropsTimeInterval,a=e.dropRadius,s=Date.now();if(!(s-i<o)){t.lastRaindropsFallTime=s;var l=function(t){return(0,R.getRandomInt)(t)},u=n.width,c=n.height;this.drop(l(u),l(c),a,.03)}}}},{key:"drop",value:function(t,e,r,n){Reflect.apply(gt,this,[t,e,r,n])}},{key:"fade",value:function(){Reflect.apply(jt,this,[])}},{key:"reloadBackground",value:function(){oe(ae,this).call(this)}},{key:"destroy",value:function(){Reflect.apply(dt,this,[])}},{key:"show",value:function(){this.options.visible=!0,this.canvas.style.visibility="visible",Reflect.apply(H,this,[])}},{key:"hide",value:function(){this.options.visible=!1,this.canvas.style.visibility="hidden",Reflect.apply(q,this,[])}},{key:"pause",value:function(){this.options.running=!1}},{key:"play",value:function(){this.options.running=!0}},{key:"changePlayingState",value:function(){var t=this.options;t.running=!t.running}},{key:"set",value:function(t,e){"imgUrl"===t?(this.options.imgUrl=e,Reflect.apply(G,this,[])):"darkMode"===t?(this.options.darkMode=e,Reflect.apply(Ft,this,[])||Reflect.apply(B,this,[!0])):this.options[t]=e}}])&&Vt(e.prototype,r),n&&Vt(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r,n}();function le(t,e){var r=(0,l.useRef)(null);return(0,l.useEffect)(function(){if(!(0,f.isNull)(t.current))return r.current=new se(t.current,e),function(){var t;return null===(t=r.current)||void 0===t?void 0:t.destroy()}},[]),r}const ue=s.useRipples;export{ue as useRipples};
|
package/useTimeId/index.cjs
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license MIT
|
|
3
|
-
* earthnut@useTimeId/index.cjs
|
|
4
|
-
* Copyright (c) 2025 earthnut.dev
|
|
5
|
-
* 请在项目根参看详细许可证明
|
|
6
|
-
*/
|
|
7
|
-
"use client";(()=>{"use strict";var e={953:e=>{e.exports=require("react")}},r={};function t(o){var n=r[o];if(void 0!==n)return n.exports;var u=r[o]={exports:{}};return e[o](u,u.exports,t),u.exports}t.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},t.d=(e,r)=>{for(var o in r)t.o(r,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};t.r(o),t.d(o,{useTimeId:()=>u});var n=t(953);function u(){var e=(0,n.useRef)(void 0);return(0,n.useEffect)(function(){return function(){return e.current&&clearTimeout(e.current)}},[]),e}module.exports.earthnut=o})();
|