earthnut 0.2.3-alpha.1 → 0.2.3-alpha.3
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/README.md +9 -9
- package/client.mjs +2 -2
- package/client.mjs.map +1 -0
- package/layoutUtil.mjs +2 -2
- package/layoutUtil.mjs.map +1 -0
- package/package.json +14 -14
- package/server.mjs +2 -2
- package/server.mjs.map +1 -0
- package/styles/common.css +1 -508
- package/styles/common.scss +57 -2
- package/styles/mixin-color-dark.scss +150 -0
- package/styles/mixin-color-light.scss +148 -0
- package/styles/reset.scss +2 -2
- package/styles/respond.scss +1 -1
- package/styles/root.scss +68 -76
- package/styles/vars-color.scss +289 -0
- package/styles/vars-size.scss +2 -0
- package/type/components/ThemeContext/index.d.ts +11 -0
- package/type/components/ThemeContext/types.d.ts +26 -0
- package/type/components/button/button.d.ts +10 -0
- package/{components → type/components}/button/index.d.ts +1 -1
- package/{components → type/components}/image/index.d.ts +2 -3
- package/{components → type/components}/image/types.d.ts +3 -2
- package/{components → type/components}/image/useSrcChange.d.ts +1 -1
- package/type/components/layout/content.d.ts +17 -0
- package/{components → type/components}/layout/footer.d.ts +3 -4
- package/{components → type/components}/layout/get-value.d.ts +1 -1
- package/{components → type/components}/layout/header.d.ts +3 -4
- package/{components → type/components}/layout/index.d.ts +1 -1
- package/type/components/layout/is-fragment.d.ts +9 -0
- package/{components → type/components}/layout/layout.d.ts +4 -5
- package/{components/layout/sideBar.d.ts → type/components/layout/sidebar.d.ts} +3 -4
- package/{components → type/components}/layout/types.d.ts +9 -8
- package/type/components/marquee/MarqueeEle.d.ts +15 -0
- package/{components → type/components}/marquee/index.d.ts +1 -1
- package/{components → type/components}/marquee/type.d.ts +1 -1
- package/{components → type/components}/menu/index.d.ts +1 -1
- package/{components → type/components}/menu/menu.d.ts +1 -1
- package/type/components/ripples/Content.d.ts +8 -0
- package/{components → type/components}/ripples/LazyRippleEle.d.ts +3 -4
- package/{components → type/components}/ripples/RipplesEle.d.ts +3 -4
- package/{components → type/components}/ripples/index.d.ts +1 -1
- package/{components → type/components}/ripples/types.d.ts +1 -1
- package/{components → type/components}/ripples/useOptionUpdate.d.ts +3 -2
- package/type/components/shared/EnLayoutContent/index.d.ts +19 -0
- package/{components → type/components}/shared/EnLayoutContent/types.d.ts +1 -1
- package/type/components/switch/SwitchContainer.d.ts +7 -0
- package/type/components/switch/SwitchContent.d.ts +10 -0
- package/type/components/switch/SwitchLabel.d.ts +9 -0
- package/type/components/switch/index.d.ts +14 -0
- package/type/customHooks/use-xcn/index.d.ts +14 -0
- package/{customHooks → type/customHooks}/useAnimationFrame.d.ts +1 -1
- package/{customHooks → type/customHooks}/useInputIsComposing.d.ts +6 -5
- package/{customHooks → type/customHooks}/useRipples/buildBackground/create-background-color.d.ts +1 -1
- package/{customHooks → type/customHooks}/useRipples/buildBackground/create-linear-gradient.d.ts +1 -1
- package/{customHooks → type/customHooks}/useRipples/buildBackground/default-background/_createImageData.d.ts +1 -1
- package/{customHooks → type/customHooks}/useRipples/buildBackground/default-background/circleDataList.d.ts +1 -1
- package/{customHooks → type/customHooks}/useRipples/buildBackground/default-background/createCanvasElementBySize.d.ts +1 -1
- package/{customHooks → type/customHooks}/useRipples/buildBackground/default-background/createDefault.d.ts +1 -1
- package/{customHooks → type/customHooks}/useRipples/buildBackground/default-background/index.d.ts +1 -1
- package/{customHooks → type/customHooks}/useRipples/buildBackground/load-image.d.ts +1 -1
- package/{customHooks → type/customHooks}/useRipples/buildBackground/run-side.d.ts +1 -1
- package/{customHooks → type/customHooks}/useRipples/buildBackground/type.d.ts +1 -1
- package/{customHooks → type/customHooks}/useRipples/buildBackground/utils/bind-image.d.ts +1 -1
- package/{customHooks → type/customHooks}/useRipples/buildBackground/utils/create-canvas-element.d.ts +1 -1
- package/{customHooks → type/customHooks}/useRipples/buildBackground/utils/create-image-by-src.d.ts +1 -1
- package/{customHooks → type/customHooks}/useRipples/buildBackground/utils/get-background-style.d.ts +1 -1
- package/{customHooks → type/customHooks}/useRipples/buildBackground/utils/hide-css-background.d.ts +1 -1
- package/{customHooks → type/customHooks}/useRipples/buildBackground/utils/restore-css-background.d.ts +1 -1
- package/{customHooks → type/customHooks}/useRipples/callback/can-side.d.ts +1 -1
- package/{customHooks → type/customHooks}/useRipples/callback/destroy.d.ts +1 -1
- package/{customHooks → type/customHooks}/useRipples/callback/drop.d.ts +1 -1
- package/{customHooks → type/customHooks}/useRipples/callback/extract-url.d.ts +1 -1
- package/{customHooks → type/customHooks}/useRipples/callback/fade.d.ts +1 -1
- package/{customHooks → type/customHooks}/useRipples/callback/get-new-image.d.ts +1 -1
- package/{customHooks → type/customHooks}/useRipples/callback/reload-background.d.ts +1 -1
- package/{customHooks → type/customHooks}/useRipples/callback/scale.d.ts +1 -1
- package/{customHooks → type/customHooks}/useRipples/index.d.ts +3 -2
- package/{customHooks → type/customHooks}/useRipples/init/index.d.ts +1 -1
- package/{customHooks → type/customHooks}/useRipples/init/initEvent.d.ts +1 -1
- package/{customHooks → type/customHooks}/useRipples/init/initShaders.d.ts +1 -1
- package/{customHooks → type/customHooks}/useRipples/init/initTexture.d.ts +1 -1
- package/{customHooks → type/customHooks}/useRipples/render/computeTextureBoundaries.d.ts +1 -1
- package/{customHooks → type/customHooks}/useRipples/render/draw.d.ts +1 -1
- package/{customHooks → type/customHooks}/useRipples/render/drawQuad.d.ts +1 -1
- package/{customHooks → type/customHooks}/useRipples/render/dropAtPointer.d.ts +1 -1
- package/{customHooks → type/customHooks}/useRipples/render/index.d.ts +1 -1
- package/{customHooks → type/customHooks}/useRipples/render/swapBufferIndices.d.ts +1 -1
- package/{customHooks → type/customHooks}/useRipples/render/update.d.ts +1 -1
- package/{customHooks → type/customHooks}/useRipples/rippersData/defaultData.d.ts +1 -1
- package/{customHooks → type/customHooks}/useRipples/rippersData/fadeData.d.ts +1 -1
- package/{customHooks → type/customHooks}/useRipples/rippersData/index.d.ts +1 -1
- package/{customHooks → type/customHooks}/useRipples/rippersData/loadConfig.d.ts +1 -1
- package/{customHooks → type/customHooks}/useRipples/rippersData/renderData.d.ts +1 -1
- package/{customHooks → type/customHooks}/useRipples/rippersData/useOptions.d.ts +1 -1
- package/{customHooks → type/customHooks}/useRipples/rippersData/vertexSource.d.ts +1 -1
- package/{customHooks → type/customHooks}/useRipples/ripple.html.d.ts +1 -1
- package/{customHooks → type/customHooks}/useRipples/ripplesClass.d.ts +1 -1
- package/{customHooks → type/customHooks}/useRipples/tools.d.ts +1 -1
- package/{customHooks → type/customHooks}/useRipples/types.d.ts +3 -2
- package/{customHooks → type/customHooks}/useRipples/use-lazy-ripple.d.ts +4 -3
- package/{customHooks → type/customHooks}/useTimeId.d.ts +1 -1
- package/type/dog.d.ts +8 -0
- package/{index.client.d.ts → type/index.client.d.ts} +4 -1
- package/{index.d.ts → type/index.d.ts} +1 -1
- package/{index.server.d.ts → type/index.server.d.ts} +1 -1
- package/type/storage/main-logic .d.ts +26 -0
- package/type/storage/storage-store.d.ts +14 -0
- package/type/utilities/cookie.d.ts +20 -0
- package/type/utilities/sys.d.ts +41 -0
- package/components/button/button.d.ts +0 -11
- package/components/layout/content.d.ts +0 -17
- package/components/marquee/MarqueeEle.d.ts +0 -15
- package/components/ripples/Content.d.ts +0 -8
- package/components/shared/EnLayoutContent/index.d.ts +0 -19
- package/customHooks/use-xcn/index.d.ts +0 -14
- package/styles/vars.scss +0 -248
package/README.md
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
嗯,姑且称之为 ui 吧
|
|
1
|
+
# enr
|
|
4
2
|
|
|
5
3
|
## 安装
|
|
6
4
|
|
|
7
5
|
```sh
|
|
6
|
+
npm install --save enr
|
|
7
|
+
# 或
|
|
8
8
|
npm install --save earthnut
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## 文档
|
|
12
12
|
|
|
13
|
-
参阅 [
|
|
13
|
+
参阅 [enr](https://earthnut.dev/quickUse/)
|
|
14
14
|
|
|
15
15
|
## 涟漪背景
|
|
16
16
|
|
|
@@ -36,7 +36,7 @@ npm install --save earthnut
|
|
|
36
36
|
就是 `useRef` 和 `useEffect` 的简单使用。
|
|
37
37
|
|
|
38
38
|
```ts
|
|
39
|
-
import { useTimeId } from "
|
|
39
|
+
import { useTimeId } from "enr";
|
|
40
40
|
|
|
41
41
|
export function Home() {
|
|
42
42
|
const timeId = useTimeId();
|
|
@@ -46,7 +46,7 @@ export function Home() {
|
|
|
46
46
|
<button
|
|
47
47
|
onclick={() => {
|
|
48
48
|
timeId.current = setTimeout(
|
|
49
|
-
() =>
|
|
49
|
+
() => dog("没有感情的按钮 A 打印了一条没有感情的消息"),
|
|
50
50
|
2500
|
|
51
51
|
);
|
|
52
52
|
}}
|
|
@@ -66,7 +66,7 @@ export function Home() {
|
|
|
66
66
|
使用下一帧动画。
|
|
67
67
|
|
|
68
68
|
```ts
|
|
69
|
-
import { useAnimationFrame } from '
|
|
69
|
+
import { useAnimationFrame } from 'enr';
|
|
70
70
|
```
|
|
71
71
|
|
|
72
72
|
## scss 样式
|
|
@@ -127,12 +127,12 @@ export default defineConfig({
|
|
|
127
127
|
为了防止意外覆盖别人的自定义 css 属性,该样式皆以 `en-` 为前缀。譬如:
|
|
128
128
|
|
|
129
129
|
```tsx
|
|
130
|
-
import {
|
|
130
|
+
import { _en } from 'enr';
|
|
131
131
|
|
|
132
132
|
export function Home() {
|
|
133
133
|
return (
|
|
134
134
|
<div>
|
|
135
|
-
<p className={
|
|
135
|
+
<p className={_en('en-text-in=one-line')}>无论我字数多少,仅会会在同一行就行打印。</p>
|
|
136
136
|
</div>
|
|
137
137
|
);
|
|
138
138
|
}
|
package/client.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license MIT
|
|
3
|
-
*
|
|
3
|
+
* enr@client.mjs
|
|
4
4
|
* Copyright (c) 2025 earthnut.dev
|
|
5
5
|
* 请在项目根参看详细许可证明
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
"use client";
|
|
9
|
-
import*as t from"a-type-of-js";import{setStyle as e}from"a-element-inline-style";import{debounce as r,enArr as n,getRandomInt as i,getRandomString as o}from"a-js-tools";import{createElement as a,default as u,forwardRef as l,useCallback as s,useEffect as c,useImperativeHandle as f,useRef as p,useState as d}from"react";import{default as h}from"styled-components";import{xcn as m}from"xcn";var y={209:()=>{function t(e){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){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=t(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);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),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r}())({name:"earthnut",type:!1})},362:(e,r,n)=>{var i,o;e.exports=(i={isArray:()=>t.isArray,isBoolean:()=>t.isBoolean,isBusinessEmptyString:()=>t.isBusinessEmptyString,isEmptyArray:()=>t.isEmptyArray,isFalse:()=>t.isFalse,isNull:()=>t.isNull,isPlainObject:()=>t.isPlainObject,isString:()=>t.isString,isUndefined:()=>t.isUndefined,isZero:()=>t.isZero},o={},n.d(o,i),o)},791:(t,a,u)=>{u.d(a,{Ripples:()=>Jt}),u.r(a);var l=u(362);function s(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 u=t+e,s=/uniform (\w+) (\w+)/g;!(0,l.isNull)(o=s.exec(u));){var c=o[2];a.locations[c]=r.getUniformLocation(a.id,c)}return a}function c(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 f(t){return"rgba(0, 0, 0, 0)"===t||"#ffffffff"===t||"transport"===t}function p(t){return"none"===t||""===t}function d(){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(),u=r.createFramebuffer();r.bindFramebuffer(r.FRAMEBUFFER,u),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,s=0;s<i.length;s++)if(r.texImage2D(r.TEXTURE_2D,0,r.RGBA,32,32,0,r.RGBA,i[s].type,null),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,a,0),r.checkFramebufferStatus(r.FRAMEBUFFER)===r.FRAMEBUFFER_COMPLETE){l=i[s];break}return l}function h(t){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 m(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 y(t,e,r){return e&&m(t.prototype,e),r&&m(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function g(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){if("object"!=h(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=h(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==h(e)?e:e+""}var b,w=y(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,l.isNull)(r))return this.initState=!1,void(this.config=null);this.gl=r,this.config=Reflect.apply(d,this,[])}),E={imgUrl:null,resolution:360,dropRadius:12,perturbance:.01,interactive:!0,crossOrigin:"no-cors",playingState:!0,accelerating:1,raindropsTimeInterval:3600,idleFluctuations:!0,darkMode:void 0};function R(t){return R="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},R(t)}function S(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,O(n.key),n)}}function O(t){var e=function(t){if("object"!=R(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=R(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==R(e)?e:e+""}function P(t,e,r){return t.set(A(t,e),r),r}function T(t,e){return t.get(A(t,e))}function A(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 k(t){return function(t){if(Array.isArray(t))return j(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 j(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)?j(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 j(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}Object.freeze(E),u(209);var x=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,o=r.list,a=n/2;r.radius=a,r.cells=Math.pow(n,2);for(var u=0;u<n;u++){o[u]=[];for(var l=0;l<n;l++)o[u][l]=[0,0,0,0]}for(var s=0;s<=a;s++)for(var c=function(){var t=o[s][f],r=Math.ceil(Math.sqrt(Math.pow(s,2)+Math.pow(f,2)))<=a,n=e?10:255,u=e?25:190,l=r?e?160:120:e?160:180,c=r?e?230:160:e?250:240,p=function(){return i(n,u)};t[0]=p(),t[1]=p(),t[2]=p(),t[3]=i(l,c)},f=s;f<=a;f++)c();for(var p=0;p<=a;p++)for(var d=0;d<=p;d++)o[p][d]=o[d][p];for(var h=a;h<n;h++)for(var m=0;m<=a;m++)o[h][m]=o[n-h][m];for(var y=0;y<a;y++)for(var g=a;g<n;g++)o[y][g]=o[y][n-g];for(var v=a;v<n;v++)for(var b=a;b<n;b++)o[v][b]=o[v][n-b];var w=t%n;return r.list=[].concat(k(o.slice(w)),k(o.slice(0,w))),r},D=new(b=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),function(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)}(this,b,1),e=this,r="data",n=x(),(r=O(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n},(e=[{key:"build",value:function(t){T(b,this)>100&&P(b,this,0),this.data=x(P(b,this,T(b,this)+4),t)}}])&&S(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}());function I(t,e){var r=document.createElement("canvas"),n=document.createElement("canvas"),i=r.getContext("2d"),o=n.getContext("2d");return(0,l.isNull)(i)||(0,l.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=D.data,o=i.diameter,a=i.list,u=t*o,l=0;l<n.length;l+=4){var s=l/4%u,c=s%t%o,f=Math.floor(s/t),p=a[c][f];n[l]=p[0],n[l+1]=p[1],n[l+2]=p[2],n[l+3]=p[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 _(){var t,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=this.fadeData,n=this.options,i=r.backgroundInfo,a=r.toBeList,u=i.width,l=i.height,s=o({length:8,includeNumbers:!0,includeUppercaseLetters:!0});D.build(null!==(t=n.darkMode)&&void 0!==t?t:r.isDark),a.push({resource:I(u,l),width:u,height:l,kind:"default",tag:s}),e&&r.run()}function F(t,e){var r,n,i=t.imgUrl;return(0,l.isString)(i)&&i||(r=e.backgroundImage,n=/url\(["']?([^"']*)["']?\)/.exec(r),(0,l.isNull)(n)?null:n[1])}function U(t,e){return(0,l.isArray)(t.imgUrl)&&1===t.imgUrl.length&&t.imgUrl[0]||e.backgroundColor}function C(){var t=this.renderData,e=this.fadeData,r=this.options;if((0,l.isNull)(t))return Reflect.apply(_,this,[]);var n=t.originStyle;if(f(n.backgroundColor)&&(!(0,l.isArray)(r.imgUrl)||1!==r.imgUrl.length))return Reflect.apply(_,this,[]);var i=document.createElement("canvas"),o=i.getContext("2d");if((0,l.isNull)(o))return Reflect.apply(_,this,[]);var a=e.backgroundInfo,u=a.width,s=a.height;i.width=u,i.height=s,o.clearRect(0,0,u,s);var c=U(r,n);o.beginPath(),o.fillStyle=c,o.fillRect(0,0,u,s),o.fill(),e.isTransitioning&&!(0,l.isEmptyArray)(e.toBeList)?e.toBeList=[e.toBeList[0]]:e.toBeList=[];var p={resource:i,kind:"background-color",tag:c,width:u,height:s};e.toBeList.push(p),e.run()}function N(){var t=this.fadeData,e=this.renderData,r=this.options;if((0,l.isNull)(e))return Reflect.apply(C,this,[]);var n=e.originStyle;if(!/linear-gradient\(.*\)/.test(n.backgroundImage)&&!(0,l.isArray)(r.imgUrl))return Reflect.apply(C,this,[]);var i=(0,l.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(C,this,[]);var o=document.createElement("canvas"),a=o.getContext("2d");if((0,l.isNull)(a))return Reflect.apply(C,this,[]);var u=t.backgroundInfo,s=u.width,c=u.height;o.width=s,o.height=c,a.fillStyle="#fff",a.fillRect(0,0,s,c);var f=a.createLinearGradient(0,0,0,c);i.forEach(function(t,e){return f.addColorStop(e/(i.length-1),t)}),a.fillStyle=f,a.fillRect(0,0,s,c),t.isTransitioning&&!(0,l.isEmptyArray)(t.toBeList)?t.toBeList=[t.toBeList[0]]:t.toBeList=[],t.toBeList.push({resource:o,kind:"linear-gradient",tag:i.join("_"),width:s,height:c}),t.run()}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 L(){var t=this,e=this.renderData,r=this.options,n=this.fadeData;if((0,l.isNull)(e))Reflect.apply(N,this,[]);else{var i=e.lastUseStyle,o=n.backgroundInfo,a=o.width,u=o.height,s=F(r,i);if(e.imageSource=s,s){var c=function(t,e,r){var n=new Image(e,r);return n.width=e,n.height=r,n.src=t,n}(s,a,u);c.onload=function(){var t;clearTimeout(n.transparentId),n.isTransitioning&&!(0,l.isEmptyArray)(n.toBeList)?n.toBeList=[n.toBeList[0]].concat(function(t){if(Array.isArray(t))return B(t)}(t=n.toBeList.slice(1).filter(function(t){return"image"===t.kind&&(Math.abs(t.width-a)>2||Math.abs(t.height-u)>2||t.tag!==s)}))||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.")}()):n.toBeList=[],n.toBeList.push({resource:c,width:a,height:u,kind:"image",tag:s}),n.run()},c.onerror=function(){Reflect.apply(N,t,[])},c.crossOrigin=r.crossOrigin}else Reflect.apply(N,this,[])}}function M(){var t=this.renderData;if(!(0,l.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 X(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 W(){var t=this.renderData;if(!(0,l.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){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 G(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 H(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){if("object"!=z(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=z(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==z(e)?e:e+""}var q=function(){return t=function t(e,r,i){var o,a=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),H(this,"quad",null),H(this,"lastRaindropsFallTime",0),H(this,"parentElement",void 0),H(this,"mutationObserver",void 0),H(this,"resizeObserver",void 0),H(this,"renderProgram",void 0),H(this,"imageSource",""),H(this,"dropProgram",void 0),H(this,"updateProgram",void 0),H(this,"textures",[]),H(this,"backgroundTexture",[]),H(this,"textureDelta",void 0),H(this,"framebuffers",[]),H(this,"bufferWriteIndex",0),H(this,"bufferReadIndex",1),H(this,"originStyle",void 0),H(this,"lastUseStyle",void 0),H(this,"events",{}),H(this,"animationFrameId",0),this.parentElement=null!==(o=e.parentElement)&&void 0!==o?o:document.body,Reflect.apply(M,i,[]),this.originStyle=this.lastUseStyle=X(this.parentElement),this.mutationObserver=new MutationObserver(function(t){t.forEach(function(t){if(t.target===a.parentElement&&"attributes"===t.type&&i.options.visible){var e=Object.values(a.lastUseStyle),o=X(a.parentElement),u=Object.values(o);if((0,l.isEmptyArray)(n.difference(e,u)))return;var s=p(o.backgroundImage),c=f(o.backgroundColor);if(s&&c)return;a.lastUseStyle=o,Reflect.apply(r,i,[]),Reflect.apply(M,i,[])}})}),this.mutationObserver.observe(this.parentElement,{subtree:!0,attributes:!0,attributeFilter:["class","style"]}),this.resizeObserver=new ResizeObserver(function(t){t.forEach(function(t){t.target===a.parentElement&&Reflect.apply(r,i,[])})}),this.resizeObserver.observe(this.parentElement)},e=[{key:"destroy",value:function(){if(this.animationFrameId&&window.cancelAnimationFrame(this.animationFrameId),Reflect.apply(W,{renderData:this},[]),this.parentElement&&this.events)try{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}catch(t){}}}],e&&G(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function V(){var t=this.renderData,e=this.fadeData;if(!(0,l.isNull)(t)){var r,n,i,o=t.parentElement,a=window.getComputedStyle(o),u=a.backgroundSize,s=a.backgroundAttachment,c=a.backgroundPosition,f=/\s+/.test(r=c)?r.replace(/center/,"50%").replace(/top|left/,"0%").replace(/bottom/,"100%").replace(/\s+/," ").split(" "):$(r)?[r,"50%"]:{center:["50%","50%"],top:["50%","0%"],bottom:["50%","100%"],left:["0%","50%"],right:["100%","50%"]}[r],p={left:0,top:0,width:0,height:0};"fixed"===s?(p.height=window.innerHeight,p.left=window.screenX,p.top=window.screenY,p.width=window.innerWidth):(p.left=0,p.top=0,p.width=o.scrollWidth,p.height=o.scrollHeight);var d=e.backgroundInfo||{width:100,height:100},h=d.width,m=d.height;if("cover"===u){var y=Math.max(p.width/h,p.height/m);n=h*y,i=m*y}else if("contain"===u){var g=Math.min(p.width/h,p.height/m);n=h*g,i=m*g}else{var v=u.split(" ");n=v[0]||"",i=v[1]||n,$(n)?n=p.width*parseFloat(n)/100:"auto"!==n&&(n=parseFloat(n)),$(i)?i=p.height*parseFloat(i)/100:"auto"!==i&&(i=parseFloat(i)),"auto"===n&&"auto"===i?(n=h,i=m):("auto"===n&&(n=h*(Number(i)/m)),"auto"===i&&(i=m*(Number(n)/h)))}var b=f&&f[0]||"0%",w=f&&f[1]||"0%";b=$(b)?(p.left+(p.width-Number(n))*parseFloat(b)/100).toString():(p.left+parseFloat(b)).toString(),w=$(w)?(p.top+(p.height-Number(i))*parseFloat(w)/100).toString():(p.top+parseFloat(w)).toString(),t.renderProgram.uniforms.topLeft=new Float32Array([-Number(b)/n,-Number(w)/i]),t.renderProgram.uniforms.bottomRight=new Float32Array([t.renderProgram.uniforms.topLeft[0]+o.clientWidth/n,t.renderProgram.uniforms.topLeft[1]+o.clientHeight/i]);var E=Math.max(this.canvas.width,this.canvas.height);t.renderProgram.uniforms.containerRatio=new Float32Array([this.canvas.width/E,this.canvas.height/E])}}function $(t){return t.endsWith("%")}function K(){var t=this.gl,e=this.renderData;(0,l.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 Q(){var t=this.gl,e=this.renderData,r=this.options;if(!(0,l.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(c,this,[i,0]),Reflect.apply(c,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(K,this,[]),t.disable(t.BLEND)}}function Z(){var t=this.renderData;if(!(0,l.isNull)(t)){var e=t.bufferWriteIndex,r=t.bufferReadIndex;t.bufferWriteIndex=1-e,t.bufferReadIndex=1-r}}function J(){var t=this.gl,e=this.renderData,r=this.options;if(!(0,l.isNull)(e)){var n=e.updateProgram,i=e.textures,o=e.framebuffers,a=e.bufferWriteIndex,u=e.bufferReadIndex,s=r.resolution;t.viewport(0,0,s,s),t.bindFramebuffer(t.FRAMEBUFFER,o[a]),Reflect.apply(c,this,[i[u]]),t.useProgram(n.id),Reflect.apply(K,this,[]),Reflect.apply(Z,this,[])}}function tt(){var t=this,e=this.renderData,r=this.options,n=this.fadeData;if(!(0,l.isNull)(e)){var i=e.parentElement,o=n.isTransitioning,a=r.running,u=r.idleFluctuations,s=r.lastRunningState,c=getComputedStyle(i);n.backgroundInfo={width:parseInt(c.width),height:parseInt(c.height)},Reflect.apply(V,this,[]),a?(s||(r.lastRunningState=!0,this.show()),u&&this.raindropsFall(),o&&this.fade(),Reflect.apply(J,this,[]),Reflect.apply(Q,this,[])):s&&(r.lastRunningState=!1,this.hide()),e.animationFrameId=requestAnimationFrame(function(){return Reflect.apply(tt,t,[])})}}function et(t,e,r){var n=this.renderData;if(!(0,l.isNull)(n)){var i=n.parentElement,o=window.getComputedStyle(i),a=parseInt(o.borderLeftWidth)||0,u=parseInt(o.borderTopWidth)||0,s=i.getBoundingClientRect(),c=t.clientX-s.left-a,f=t.clientY-s.top-u;this.drop(c,f,e,r)}}function rt(){var t=this,e=this.renderData,r=this.options;if(!(0,l.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(et,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 nt="\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 it(){var t=this.gl,e=this.renderData;if(!(0,l.isNull)(e)){var r=e.textureDelta;e.dropProgram=s(nt,"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=s(nt,"\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=s("\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 ot(){var t=this.gl,e=this.renderData;if(!(0,l.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 at(t){var e=this.gl,r=this.renderData,n=this.fadeData;if(!(0,l.isNull)(r)){var i=r.backgroundTexture,o=r.parentElement,a=n.backgroundInfo,u=a.width,s=a.height,c=function(t){return(0,l.isZero)(t&t-1)},f=c(u)&&c(s)?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 ut(){var t=this,e=this.renderData,r=this.options,n=this.fadeData;if(!(0,l.isNull)(e)&&this.config){var i=e.textures,o=e.framebuffers,a=r.resolution,u=this.gl,s=1/a;e.textureDelta=new Float32Array([s,s]),this.config.extensions.forEach(function(t){return u.getExtension(t)});for(var c=this.config.arrayType,f=c?new c(a*a*4):null,p=this.config,d=0;d<2;d++){var h=u.createTexture(),m=u.createFramebuffer();u.bindFramebuffer(u.FRAMEBUFFER,m),u.bindTexture(u.TEXTURE_2D,h),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MIN_FILTER,p.linearSupport?u.LINEAR:u.NEAREST),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MAG_FILTER,p.linearSupport?u.LINEAR:u.NEAREST),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_S,u.CLAMP_TO_EDGE),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_T,u.CLAMP_TO_EDGE),u.texImage2D(u.TEXTURE_2D,0,u.RGBA,a,a,0,u.RGBA,p.type,f),u.framebufferTexture2D(u.FRAMEBUFFER,u.COLOR_ATTACHMENT0,u.TEXTURE_2D,h,0),i.push(h),o.push(m)}e.quad=u.createBuffer(),u.bindBuffer(u.ARRAY_BUFFER,e.quad),u.bufferData(u.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,1,1,-1,1]),u.STATIC_DRAW),Reflect.apply(it,this,[]),Reflect.apply(ot,this,[]),Reflect.apply(L,this,[]),u.clearColor(0,0,0,0),u.blendFunc(u.SRC_ALPHA,u.ONE_MINUS_SRC_ALPHA),r.visible=!0,r.running=!0,Reflect.apply(rt,this,[]),Reflect.apply(at,this,[n.lastDrawImage]),e.animationFrameId=requestAnimationFrame(function(){return Reflect.apply(tt,t,[])})}}function lt(){var t=this.renderData,e=this.fadeData;if(!(0,l.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(L,this,[])}}function st(){var t=this.renderData,e=this.fadeData;(0,l.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 ct(t,e,r,n){var i=this.renderData,o=this.options,a=this.gl;if(!(0,l.isNull)(i)){var u=i.parentElement,s=i.dropProgram,f=i.textures,p=i.framebuffers,d=i.bufferWriteIndex,h=i.bufferReadIndex,m=o.resolution,y=u.offsetWidth,g=u.offsetHeight,v=Math.max(y,g);r/=v;var b=new Float32Array([(2*t-y)/v,(g-2*e)/v]);a.viewport(0,0,m,m),a.bindFramebuffer(a.FRAMEBUFFER,p[d]),Reflect.apply(c,this,[f[h]]),a.useProgram(s.id),a.uniform2fv(s.locations.center,b),a.uniform1f(s.locations.radius,r),a.uniform1f(s.locations.strength,n),Reflect.apply(K,this,[]),Reflect.apply(Z,this,[])}}function ft(t){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 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,ht(n.key),n)}}function dt(t,e,r){return(e=ht(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ht(t){var e=function(t){if("object"!=ft(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ft(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ft(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 yt(t,e){return t.get(vt(t,e))}function gt(t,e,r){return t.set(vt(t,e),r),r}function vt(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 bt=new WeakMap,wt=new WeakMap,Et=new WeakMap,Rt=new WeakMap,St=new WeakMap,Ot=new WeakMap,Pt=new WeakMap,Tt=new WeakMap,At=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,bt,E.accelerating),mt(this,wt,E.interactive),mt(this,Et,E.resolution),mt(this,Rt,E.perturbance),mt(this,St,E.dropRadius),dt(this,"imgUrl",E.imgUrl),mt(this,Ot,E.idleFluctuations),mt(this,Pt,E.raindropsTimeInterval),dt(this,"crossOrigin","no-cors"),dt(this,"visible",!1),dt(this,"running",!1),mt(this,Tt,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 yt(bt,this)},set:function(t){t>100||t<2||gt(bt,this,t)}},{key:"interactive",get:function(){return yt(wt,this)},set:function(t){(0,l.isBoolean)(t)&>(wt,this,t)}},{key:"resolution",get:function(){return yt(Et,this)},set:function(t){t<100||t>550||gt(Et,this,t)}},{key:"perturbance",get:function(){return yt(Rt,this)},set:function(t){t<1e-4||t>1||gt(Rt,this,t)}},{key:"dropRadius",get:function(){return yt(St,this)},set:function(t){!isFinite(t)||t<10||gt(St,this,t)}},{key:"idleFluctuations",get:function(){return yt(Ot,this)},set:function(t){(0,l.isBoolean)(t)&>(Ot,this,t)}},{key:"raindropsTimeInterval",get:function(){return yt(Pt,this)},set:function(t){t<10||t>12e3||gt(Pt,this,t)}},{key:"playingState",get:function(){return this.running},set:function(t){this.running=Boolean(null==t||t)}},{key:"darkMode",get:function(){return yt(Tt,this)},set:function(t){gt(Tt,this,(0,l.isUndefined)(t)?void 0:Boolean(t))}}])&&pt(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function kt(){var t=this.fadeData,e=this.options,r=this.renderData;if((0,l.isNull)(r))return!0;var n=e.imgUrl,i=r.lastUseStyle,o=t.lastDrawImage,a=t.backgroundInfo,u=a.width,s=a.height,c=o.tag,f=o.kind,p=F(e,i),d=o.width===u,h=o.height===s,m=d&&h;if("image"===f&&m&&(0,l.isString)(p)&&p===c)return!0;var y=(0,l.isArray)(n)&&n.join("_")||"";if("linear-gradient"===f&&m&&y===c)return!0;var g=U(e,i);return!("background-color"!==f||!m||c!==g)}function jt(){var t=this,e=this.options,r=this.fadeData;r.transparentId=setTimeout(function(){if(clearTimeout(r.transparentId),r.isTransitioning)return Reflect.apply(jt,t,[]);Reflect.apply(kt,t,[])||r.run()},2*e.raindropsTimeInterval)}function xt(){var t=this.renderData,e=this.fadeData,r=this.options,n=e.toBeList;if((0,l.isNull)(t))return Reflect.apply(Dt,this,["还没有准备好,即将退出"]);if((0,l.isEmptyArray)(n))return Reflect.apply(Dt,this,["由于缺少当前渲染的背景,退出"]);if(0===e.drawProgress&&n.forEach(function(t){}),e.drawProgress>1e3){if(e.lastDrawImage=n.shift(),Reflect.apply(at,this,[e.lastDrawImage]),(0,l.isEmptyArray)(n)){var i=t.lastUseStyle;((0,l.isNull)(r.imgUrl)||(0,l.isBusinessEmptyString)(r.imgUrl)||(0,l.isZero)(r.imgUrl.length))&&f(i.backgroundColor)&&p(i.backgroundImage)&&Reflect.apply(_,this,[!1])}return Reflect.apply(Dt,this,["当前执行完毕,开启下次执行"])}var o=e.lastDrawImage,a=e.backgroundInfo;e.drawProgress+=18;var u=document.createElement("canvas"),s=u.getContext("2d");if((0,l.isNull)(s)||(0,l.isNull)(o.resource)||(0,l.isEmptyArray)(n))return Reflect.apply(Dt,this,"环境值错误");var c=a.width,d=a.height;u.width=c,u.height=d,s.clearRect(0,0,c,d),s.drawImage(o.resource,0,0,c,d),s.globalAlpha=e.drawProgress/1e3,s.drawImage(n[0].resource,0,0,c,d),s.globalAlpha=1;var h={resource:u,width:c,height:d,kind:"mix",tag:"".concat(o.tag," >> ").concat(n[0].tag)};Reflect.apply(at,this,[h]),n.length>1&&(e.lastDrawImage=h,n.shift(),e.drawProgress=0)}function Dt(t){this.fadeData.isTransitioning=!1,Reflect.apply(jt,this,[])}function It(t){return It="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},It(t)}function _t(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 Ft(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Ut(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){if("object"!=It(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=It(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==It(e)?e:e+""}function Nt(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 Lt=new WeakMap,Mt=new WeakSet,Xt=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),Ft(this,r=Mt),r.add(this),Ut(this,"backgroundInfo",{width:0,height:0}),Ut(this,"transparentId",setTimeout(Boolean)),Ut(this,"lastDrawImage",void 0),Ut(this,"toBeList",[]),Ut(this,"drawProgress",0),Ut(this,"isTransitioning",!1),function(t,e){Ft(t,e),e.set(t,void 0)}(this,Lt),Ut(this,"isDark",!1);var n,i,o=e.renderData;if((0,l.isNull)(o))n=10,i=10;else{var a=getComputedStyle(o.parentElement);n=parseInt(a.width),i=parseInt(a.height)}this.backgroundInfo={width:n,height:i},this.lastDrawImage={resource:I(n,i),width:n,height:i,kind:"default",tag:""},function(t,e,r){t.set(Bt(t,e),r)}(Lt,this,window.matchMedia("(prefers-color-scheme: dark)")),this.isDark=Nt(Lt,this).matches,Nt(Lt,this).addEventListener("change",Bt(Mt,this,Wt));var u=this;Object.defineProperty(Nt(Lt,this),"isDark",{get:function(){return u.isDark},set:function(t){u.isDark=t,Reflect.apply(kt,e,[])||Reflect.apply(_,e,[!0])}})},(e=[{key:"run",value:function(){this.isTransitioning||(this.drawProgress=0,this.isTransitioning=!0)}},{key:"destroy",value:function(){Nt(Lt,this).removeEventListener("change",Bt(Mt,this,Wt)),this.transparentId&&clearTimeout(this.transparentId)}}])&&_t(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function Wt(t){this.isDark=t.matches}function zt(t){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 Gt(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 Ht(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Gt(Object(r),!0).forEach(function(e){Kt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Gt(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,Qt(n.key),n)}}function qt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(qt=function(){return!!t})()}function Vt(t){return Vt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Vt(t)}function $t(t,e){return $t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},$t(t,e)}function Kt(t,e,r){return(e=Qt(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Qt(t){var e=function(t){if("object"!=zt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=zt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==zt(e)?e:e+""}var Zt=new WeakMap,Jt=function(t){function n(t,i){var o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),Kt(o=function(t,e,r){return e=Vt(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||[],Vt(t).constructor):e.apply(t,r))}(this,n,[t]),"renderData",null),Kt(o,"options",void 0),Kt(o,"fadeData",void 0),Kt(o,"defaults",E),Kt(o,"initialized",!1),function(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)}(o,Zt,r(lt,{this:o})),Object.defineProperties(o,{defaults:{value:o.defaults,writable:!1,enumerable:!1,configurable:!1}}),o.options=new At(Ht(Ht({},o.defaults),i)),o.renderData=new q(t,o.reloadBackground,o),o.fadeData=new Xt(o),(0,l.isFalse)(o.initState)||(0,l.isNull)(t.parentElement)||(0,l.isNull)(o.config)||(0,l.isNull)(o.gl)?o.initState=!1:(function(t){var r=t.parentElement;t.width=r.clientWidth,t.height=r.clientHeight,e(t,{position:"absolute",left:0,top:0,right:0,bottom:0,zIndex:-1,pointerEvents:"none"})}(t),Reflect.apply(ut,o,[])),window.matchMedia("(prefers-color-scheme: dark)"),o}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&&$t(t,e)}(n,t),o=n,(a=[{key:"raindropsFall",value:function(){var t=this.renderData,e=this.options,r=this.fadeData;if(!(0,l.isNull)(t)){var n=r.backgroundInfo,o=t.lastRaindropsFallTime,a=e.raindropsTimeInterval,u=e.dropRadius,s=Date.now();if(!(s-o<a)){t.lastRaindropsFallTime=s;var c=function(t){return i(t||1)},f=n.width,p=n.height;this.drop(c(f),c(p),u,.03)}}}},{key:"drop",value:function(t,e,r,n){Reflect.apply(ct,this,[t,e,r,n])}},{key:"fade",value:function(){Reflect.apply(xt,this,[])}},{key:"reloadBackground",value:function(){var t,e;(t=Zt,e=this,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))).call(this)}},{key:"destroy",value:function(){Reflect.apply(st,this,[])}},{key:"show",value:function(){this.options.visible=!0,this.canvas.style.visibility="visible",Reflect.apply(M,this,[])}},{key:"hide",value:function(){this.options.visible=!1,this.canvas.style.visibility="hidden",Reflect.apply(W,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(L,this,[])):"darkMode"===t?(this.options.darkMode=e,Reflect.apply(kt,this,[])||Reflect.apply(_,this,[!0])):this.options[t]=e}}])&&Yt(o.prototype,a),Object.defineProperty(o,"prototype",{writable:!1}),o;var o,a}(w)}},g={};function v(t){var e=g[t];if(void 0!==e)return e.exports;var r=g[t]={exports:{}};return y[t](r,r.exports,v),r.exports}v.d=(t,e)=>{for(var r in e)v.o(e,r)&&!v.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},v.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),v.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var b=v(362);function w(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,a,u=[],l=!0,s=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(u.push(n.value),u.length!==e);l=!0);}catch(t){s=!0,i=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return E(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)?E(t,e):void 0}}(t,e)||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 E(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 R(t,e){var r=p(null),n=p(!0),i=p(!1),o=w(d(!1),2),a=o[0],u=o[1],l=w(d(null),2),s=l[0],f=l[1];function h(){n.current=!0,setTimeout(function(){var t;n.current&&(null===(t=r.current)||void 0===t||t.destroy())},0)}return c(function(){return n.current=!1,(0,b.isNull)(t.current)||i.current||(u(!0),i.current=!0,Promise.resolve().then(v.bind(v,791)).then(function(i){(0,b.isNull)(t.current)||n.current||(r.current=new i.Ripples(t.current,e))}).catch(function(t){f(t)}).finally(function(){u(!1)})),h},[]),{ripples:r,isLoading:a,error:s}}v(209);var S=v(791);function O(t,e){var r=p(null);return c(function(){if(!(0,b.isNull)(t.current))return r.current=new S.Ripples(t.current,e),function(){var t;return null===(t=r.current)||void 0===t?void 0:t.destroy()}},[]),r}function P(t){return P="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},P(t)}function T(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 A(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 k(t,e,r){return(e=function(t){var e=function(t){if("object"!=P(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=P(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==P(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function j(t,e){var r=p(function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?A(Object(r),!0).forEach(function(e){k(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):A(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}({},e));c(function(){e&&t.current&&Object.keys(t.current.defaults).forEach(function(n){var i,o,a,u=e[n],l=(i=u,o=r.current[n],(0,b.isArray)(i)&&(0,b.isArray)(o)&&(i.length!==o.length||!i.every(function(t){return i[t]===o[t]}))||(!(0,b.isArray)(i)||!(0,b.isArray)(o))&&i!==o);t.current&&l&&(r.current[n]=(0,b.isArray)(u)?function(t){if(Array.isArray(t))return T(t)}(a=u)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(a)||function(t,e){if(t){if("string"==typeof t)return T(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(t,e):void 0}}(a)||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.")}():e[n],t.current.set(n,u))})},[e])}var x=h.div.withConfig({displayName:"Content",componentId:"sc-xr2ayf-0"})(["position:relative;top:0px;left:0px;z-index:1;width:100%;height:100%;min-width:1px;min-height:1px;contain:layout paint style;will-change:transform,opacity;"]);function D(t){return D="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},D(t)}var I=["children","style","option"];function _(){return _=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},_.apply(null,arguments)}function F(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 U(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?F(Object(r),!0).forEach(function(e){C(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):F(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function C(t,e,r){return(e=function(t){var e=function(t){if("object"!=D(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=D(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==D(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var N=l(function(t,e){var r=t.children,n=t.style,i=t.option,o=function(t,e){if(null==t)return{};var r,n,i=function(t,e){if(null==t)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(-1!==e.indexOf(n))continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n<o.length;n++)r=o[n],-1===e.indexOf(r)&&{}.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}(t,I),u=p(null),l=O(u,i);return j(l,i),f(e,function(){return{toggleState:function(){var t;null===(t=l.current)||void 0===t||t.changePlayingState()},get state(){var t,e;return null!==(t=null===(e=l.current)||void 0===e?void 0:e.options.playingState)&&void 0!==t&&t},pause:function(){var t;null===(t=l.current)||void 0===t||t.pause()},set:function(t){if(!(0,b.isUndefined)(t))for(var e=Object.keys(t),r=0,n=e.length;r<n;r++){var i,o=e[r];null===(i=l.current)||void 0===i||i.set(o,t[o])}}}}),a(x,_({style:U({backgroundRepeat:"round"},n)},o),a("canvas",{ref:u,"data-earthnut-ui":"canvas",width:0,height:0}),r)});function B(t){return B="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},B(t)}N.displayName="en-background-ripple";var L=["children","style","option"];function M(){return M=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},M.apply(null,arguments)}function X(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 W(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?X(Object(r),!0).forEach(function(e){z(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):X(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function z(t,e,r){return(e=function(t){var e=function(t){if("object"!=B(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=B(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==B(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var G=l(function(t,e){var r=t.children,n=t.style,i=t.option,o=function(t,e){if(null==t)return{};var r,n,i=function(t,e){if(null==t)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(-1!==e.indexOf(n))continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n<o.length;n++)r=o[n],-1===e.indexOf(r)&&{}.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}(t,L),u=p(null),l=R(u,i).ripples;return j(l,i),f(e,function(){return{toggleState:function(){var t;null===(t=l.current)||void 0===t||t.changePlayingState()},get state(){var t,e;return null!==(t=null===(e=l.current)||void 0===e?void 0:e.options.playingState)&&void 0!==t&&t},pause:function(){var t;null===(t=l.current)||void 0===t||t.pause()},set:function(t){if(!(0,b.isUndefined)(t))for(var e=Object.keys(t),r=0,n=e.length;r<n;r++){var i,o=e[r];null===(i=l.current)||void 0===i||i.set(o,t[o])}}}}),a(x,M({style:W({backgroundRepeat:"round"},n)},o),a("canvas",{ref:u,"data-earthnut-ui":"canvas",width:0,height:0}),r)});function H(){var t=p(void 0);return c(function(){return function(){return t.current&&clearTimeout(t.current)}},[]),t}function Y(t){var e,r,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];n=(0,b.isBoolean)(n)?{immediately:n,once:!1}:(0,b.isPlainObject)(n)?{once:!!(0,b.isBoolean)(n.once)&&n.once,immediately:!!(0,b.isBoolean)(n.immediately)&&n.immediately}:{immediately:!1,once:!1};var i=p({id:0,immediately:null===(e=n.immediately)||void 0===e||e,once:null!==(r=n.once)&&void 0!==r&&r,noun:!1,time:0,cancelTime:0,firstRunEffect:!0,isUnmounted:!0,result:{cancel:function(){var t=i.current.id;t&&window.cancelAnimationFrame(t),i.current.result.canceled=!0},canceled:!1,render:function(){var t=i.current,e=t.result;t.cancelTime=performance.now(),e.cancel(),e.canceled=!1,t.id=window.requestAnimationFrame(a)}}}),o=i.current,a=s(function(e){var r=o.result,n=e-o.cancelTime;o.time+=n<0?16.7:n,t(e,o.time),o.once||r.render()},[t]);return o.immediately&&!o.noun&&o.result.canceled&&(o.noun=!0,o.result.render()),c(function(){o.once||(o.firstRunEffect?(o.result.render(),o.firstRunEffect=!1):o.firstRunEffect||o.result.canceled||o.result.render())},[t]),c(function(){return o.isUnmounted=!1,function(){o.isUnmounted=!0,setTimeout(function(){o.isUnmounted&&o.result.cancel()},0)}},[]),o.result}function q(t){var e=p(!1);return c(function(){var r=t.current;if(r){var n=function(){return e.current=!0},i=function(){return e.current=!1};return r.addEventListener("compositionstart",n),r.addEventListener("compositionend",i),function(){r.removeEventListener("compositionstart",n),r.removeEventListener("compositionend",i)}}},[]),e}G.displayName="en-lazy-background-ripple";const V="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAMAAACeL25MAAAACVBMVEUAAAD///////9zeKVjAAAAA3RSTlP//wDXyg1BAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAEElEQVQImWNkYmBgYGJAIQAAigAKNDhFkwAAAABJRU5ErkJggg==";function $(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,a,u=[],l=!0,s=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(u.push(n.value),u.length!==e);l=!0);}catch(t){s=!0,i=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return K(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)?K(t,e):void 0}}(t,e)||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 K(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 Q=["loadingSrc","className","src"];function Z(){return Z=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Z.apply(null,arguments)}var J=h.img.withConfig({displayName:"image__Content",componentId:"sc-1whh4o3-0"})(["margin:0;padding:0;user-select:none;"]),tt=u.forwardRef(function(t,e){var r=t.loadingSrc,n=void 0===r?V:r,i=t.className,o=t.src,a=function(t,e){if(null==t)return{};var r,n,i=function(t,e){if(null==t)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(-1!==e.indexOf(n))continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n<o.length;n++)r=o[n],-1===e.indexOf(r)&&{}.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}(t,Q),l=function(t,e){var r=$(d(V),2),n=r[0],i=r[1],o=$(d(0),2),a=o[0],u=o[1];return c(function(){u(1),(0,b.isString)(t)||(t=V);var e=new Image;e.onload=function(){u(2),i(t)},e.onerror=function(){i(V),u(4)},e.src=t,e.crossOrigin="anonymous"},[t,e]),{resultSrc:n,loadComplete:a}}(null!=o?o:n),s=l.resultSrc,f=l.loadComplete;return u.createElement(J,Z({},a,{ref:e,src:s||n,className:m(1===f&&"loading",i)}))});tt.displayName="en-image";export{N as BackgroundRipple,tt as EnImage,tt as Image,G as LazyBackgroundRipple,Y as useAnimationFrame,q as useInputIsComposing,R as useLazyRipples,O as useRipples,H as useTimeId};
|
|
9
|
+
import{setStyle as t}from"a-element-inline-style";import{debounce as e,enArr as r,getRandomInt as n,getRandomString as i}from"a-js-tools";import*as o from"a-type-of-js";import{createContext as a,default as l,forwardRef as u,useCallback as c,useContext as s,useEffect as f,useImperativeHandle as p,useRef as d,useState as h}from"react";import{css as m,styled as g}from"styled-components";import{xcn as y}from"xcn";var v={338:(o,a,l)=>{l.d(a,{Ripples:()=>Zt}),l.r(a);var u=l(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 l=t+e,c=/uniform (\w+) (\w+)/g;!(0,u.isNull)(o=c.exec(l));){var s=o[2];a.locations[s]=r.getUniformLocation(a.id,s)}return a}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 f(t){return"rgba(0, 0, 0, 0)"===t||"#ffffffff"===t||"transport"===t}function p(t){return"none"===t||""===t}function d(){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 u=null,c=0;c<i.length;c++)if(r.texImage2D(r.TEXTURE_2D,0,r.RGBA,32,32,0,r.RGBA,i[c].type,null),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,a,0),r.checkFramebufferStatus(r.FRAMEBUFFER)===r.FRAMEBUFFER_COMPLETE){u=i[c];break}return u}function h(t){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 m(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 g(t,e,r){return e&&m(t.prototype,e),r&&m(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function y(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){if("object"!=h(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=h(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==h(e)?e:e+""}var b,w=g(function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),y(this,"canvas",void 0),y(this,"gl",void 0),y(this,"config",void 0),y(this,"initState",!0),this.canvas=e;var r=e.getContext("webgl");if((0,u.isNull)(r))return this.initState=!1,void(this.config=null);this.gl=r,this.config=Reflect.apply(d,this,[])}),E={imgUrl:null,resolution:360,dropRadius:12,perturbance:.01,interactive:!0,crossOrigin:"no-cors",playingState:!0,accelerating:1,raindropsTimeInterval:3600,idleFluctuations:!0,darkMode:void 0};function S(t){return S="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},S(t)}function O(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,R(n.key),n)}}function R(t){var e=function(t){if("object"!=S(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=S(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==S(e)?e:e+""}function P(t,e,r){return t.set(A(t,e),r),r}function T(t,e){return t.get(A(t,e))}function A(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 k(t){return function(t){if(Array.isArray(t))return x(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 x(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)?x(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 x(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}Object.freeze(E);var j=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 i=r.diameter,o=r.list,a=i/2;r.radius=a,r.cells=Math.pow(i,2);for(var l=0;l<i;l++){o[l]=[];for(var u=0;u<i;u++)o[l][u]=[0,0,0,0]}for(var c=0;c<=a;c++)for(var s=function(){var t=o[c][f],r=Math.ceil(Math.sqrt(Math.pow(c,2)+Math.pow(f,2)))<=a,i=e?10:255,l=e?25:190,u=r?e?160:120:e?160:180,s=r?e?230:160:e?250:240,p=function(){return n(i,l)};t[0]=p(),t[1]=p(),t[2]=p(),t[3]=n(u,s)},f=c;f<=a;f++)s();for(var p=0;p<=a;p++)for(var d=0;d<=p;d++)o[p][d]=o[d][p];for(var h=a;h<i;h++)for(var m=0;m<=a;m++)o[h][m]=o[i-h][m];for(var g=0;g<a;g++)for(var y=a;y<i;y++)o[g][y]=o[g][i-y];for(var v=a;v<i;v++)for(var b=a;b<i;b++)o[v][b]=o[v][i-b];var w=t%i;return r.list=[].concat(k(o.slice(w)),k(o.slice(0,w))),r},D=new(b=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),function(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)}(this,b,1),e=this,r="data",n=j(),(r=R(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n},(e=[{key:"build",value:function(t){T(b,this)>100&&P(b,this,0),this.data=j(P(b,this,T(b,this)+4),t)}}])&&O(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}());function I(t,e){var r=document.createElement("canvas"),n=document.createElement("canvas"),i=r.getContext("2d"),o=n.getContext("2d");return(0,u.isNull)(i)||(0,u.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=D.data,o=i.diameter,a=i.list,l=t*o,u=0;u<n.length;u+=4){var c=u/4%l,s=c%t%o,f=Math.floor(c/t),p=a[s][f];n[u]=p[0],n[u+1]=p[1],n[u+2]=p[2],n[u+3]=p[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 _(){var t,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=this.fadeData,n=this.options,o=r.backgroundInfo,a=r.toBeList,l=o.width,u=o.height,c=i({length:8,includeNumbers:!0,includeUppercaseLetters:!0});D.build(null!==(t=n.darkMode)&&void 0!==t?t:r.isDark),a.push({resource:I(l,u),width:l,height:u,kind:"default",tag:c}),e&&r.run()}function F(t,e){var r,n,i=t.imgUrl;return(0,u.isString)(i)&&i||(r=e.backgroundImage,n=/url\(["']?([^"']*)["']?\)/.exec(r),(0,u.isNull)(n)?null:n[1])}function U(t,e){return(0,u.isArray)(t.imgUrl)&&1===t.imgUrl.length&&t.imgUrl[0]||e.backgroundColor}function C(){var t=this.renderData,e=this.fadeData,r=this.options;if((0,u.isNull)(t))return Reflect.apply(_,this,[]);var n=t.originStyle;if(f(n.backgroundColor)&&(!(0,u.isArray)(r.imgUrl)||1!==r.imgUrl.length))return Reflect.apply(_,this,[]);var i=document.createElement("canvas"),o=i.getContext("2d");if((0,u.isNull)(o))return Reflect.apply(_,this,[]);var a=e.backgroundInfo,l=a.width,c=a.height;i.width=l,i.height=c,o.clearRect(0,0,l,c);var s=U(r,n);o.beginPath(),o.fillStyle=s,o.fillRect(0,0,l,c),o.fill(),e.isTransitioning&&!(0,u.isEmptyArray)(e.toBeList)?e.toBeList=[e.toBeList[0]]:e.toBeList=[];var p={resource:i,kind:"background-color",tag:s,width:l,height:c};e.toBeList.push(p),e.run()}function N(){var t=this.fadeData,e=this.renderData,r=this.options;if((0,u.isNull)(e))return Reflect.apply(C,this,[]);var n=e.originStyle;if(!/linear-gradient\(.*\)/.test(n.backgroundImage)&&!(0,u.isArray)(r.imgUrl))return Reflect.apply(C,this,[]);var i=(0,u.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(C,this,[]);var o=document.createElement("canvas"),a=o.getContext("2d");if((0,u.isNull)(a))return Reflect.apply(C,this,[]);var l=t.backgroundInfo,c=l.width,s=l.height;o.width=c,o.height=s,a.fillStyle="#fff",a.fillRect(0,0,c,s);var f=a.createLinearGradient(0,0,0,s);i.forEach(function(t,e){return f.addColorStop(e/(i.length-1),t)}),a.fillStyle=f,a.fillRect(0,0,c,s),t.isTransitioning&&!(0,u.isEmptyArray)(t.toBeList)?t.toBeList=[t.toBeList[0]]:t.toBeList=[],t.toBeList.push({resource:o,kind:"linear-gradient",tag:i.join("_"),width:c,height:s}),t.run()}function M(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 B(){var t=this,e=this.renderData,r=this.options,n=this.fadeData;if((0,u.isNull)(e))Reflect.apply(N,this,[]);else{var i=e.lastUseStyle,o=n.backgroundInfo,a=o.width,l=o.height,c=F(r,i);if(e.imageSource=c,c){var s=function(t,e,r){var n=new Image(e,r);return n.width=e,n.height=r,n.src=t,n}(c,a,l);s.onload=function(){var t;clearTimeout(n.transparentId),n.isTransitioning&&!(0,u.isEmptyArray)(n.toBeList)?n.toBeList=[n.toBeList[0]].concat(function(t){if(Array.isArray(t))return M(t)}(t=n.toBeList.slice(1).filter(function(t){return"image"===t.kind&&(Math.abs(t.width-a)>2||Math.abs(t.height-l)>2||t.tag!==c)}))||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 M(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)?M(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.")}()):n.toBeList=[],n.toBeList.push({resource:s,width:a,height:l,kind:"image",tag:c}),n.run()},s.onerror=function(){Reflect.apply(N,t,[])},s.crossOrigin=r.crossOrigin}else Reflect.apply(N,this,[])}}function L(){var t=this.renderData;if(!(0,u.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 X(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 W(){var t=this.renderData;if(!(0,u.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){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 G(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,$(n.key),n)}}function H(t,e,r){return(e=$(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function $(t){var e=function(t){if("object"!=z(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=z(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==z(e)?e:e+""}var Y=function(){return t=function t(e,n,i){var o,a=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),H(this,"quad",null),H(this,"lastRaindropsFallTime",0),H(this,"parentElement",void 0),H(this,"mutationObserver",void 0),H(this,"resizeObserver",void 0),H(this,"renderProgram",void 0),H(this,"imageSource",""),H(this,"dropProgram",void 0),H(this,"updateProgram",void 0),H(this,"textures",[]),H(this,"backgroundTexture",[]),H(this,"textureDelta",void 0),H(this,"framebuffers",[]),H(this,"bufferWriteIndex",0),H(this,"bufferReadIndex",1),H(this,"originStyle",void 0),H(this,"lastUseStyle",void 0),H(this,"events",{}),H(this,"animationFrameId",0),this.parentElement=null!==(o=e.parentElement)&&void 0!==o?o:document.body,Reflect.apply(L,i,[]),this.originStyle=this.lastUseStyle=X(this.parentElement),this.mutationObserver=new MutationObserver(function(t){t.forEach(function(t){if(t.target===a.parentElement&&"attributes"===t.type&&i.options.visible){var e=Object.values(a.lastUseStyle),o=X(a.parentElement),l=Object.values(o);if((0,u.isEmptyArray)(r.difference(e,l)))return;var c=p(o.backgroundImage),s=f(o.backgroundColor);if(c&&s)return;a.lastUseStyle=o,Reflect.apply(n,i,[]),Reflect.apply(L,i,[])}})}),this.mutationObserver.observe(this.parentElement,{subtree:!0,attributes:!0,attributeFilter:["class","style"]}),this.resizeObserver=new ResizeObserver(function(t){t.forEach(function(t){t.target===a.parentElement&&Reflect.apply(n,i,[])})}),this.resizeObserver.observe(this.parentElement)},e=[{key:"destroy",value:function(){if(this.animationFrameId&&window.cancelAnimationFrame(this.animationFrameId),Reflect.apply(W,{renderData:this},[]),this.parentElement&&this.events)try{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}catch(t){}}}],e&&G(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function q(){var t=this.renderData,e=this.fadeData;if(!(0,u.isNull)(t)){var r,n,i,o=t.parentElement,a=window.getComputedStyle(o),l=a.backgroundSize,c=a.backgroundAttachment,s=a.backgroundPosition,f=/\s+/.test(r=s)?r.replace(/center/,"50%").replace(/top|left/,"0%").replace(/bottom/,"100%").replace(/\s+/," ").split(" "):J(r)?[r,"50%"]:{center:["50%","50%"],top:["50%","0%"],bottom:["50%","100%"],left:["0%","50%"],right:["100%","50%"]}[r],p={left:0,top:0,width:0,height:0};"fixed"===c?(p.height=window.innerHeight,p.left=window.screenX,p.top=window.screenY,p.width=window.innerWidth):(p.left=0,p.top=0,p.width=o.scrollWidth,p.height=o.scrollHeight);var d=e.backgroundInfo||{width:100,height:100},h=d.width,m=d.height;if("cover"===l){var g=Math.max(p.width/h,p.height/m);n=h*g,i=m*g}else if("contain"===l){var y=Math.min(p.width/h,p.height/m);n=h*y,i=m*y}else{var v=l.split(" ");n=v[0]||"",i=v[1]||n,J(n)?n=p.width*parseFloat(n)/100:"auto"!==n&&(n=parseFloat(n)),J(i)?i=p.height*parseFloat(i)/100:"auto"!==i&&(i=parseFloat(i)),"auto"===n&&"auto"===i?(n=h,i=m):("auto"===n&&(n=h*(Number(i)/m)),"auto"===i&&(i=m*(Number(n)/h)))}var b=f&&f[0]||"0%",w=f&&f[1]||"0%";b=J(b)?(p.left+(p.width-Number(n))*parseFloat(b)/100).toString():(p.left+parseFloat(b)).toString(),w=J(w)?(p.top+(p.height-Number(i))*parseFloat(w)/100).toString():(p.top+parseFloat(w)).toString(),t.renderProgram.uniforms.topLeft=new Float32Array([-Number(b)/n,-Number(w)/i]),t.renderProgram.uniforms.bottomRight=new Float32Array([t.renderProgram.uniforms.topLeft[0]+o.clientWidth/n,t.renderProgram.uniforms.topLeft[1]+o.clientHeight/i]);var E=Math.max(this.canvas.width,this.canvas.height);t.renderProgram.uniforms.containerRatio=new Float32Array([this.canvas.width/E,this.canvas.height/E])}}function J(t){return t.endsWith("%")}function V(){var t=this.gl,e=this.renderData;(0,u.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 K(){var t=this.gl,e=this.renderData,r=this.options;if(!(0,u.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(V,this,[]),t.disable(t.BLEND)}}function Q(){var t=this.renderData;if(!(0,u.isNull)(t)){var e=t.bufferWriteIndex,r=t.bufferReadIndex;t.bufferWriteIndex=1-e,t.bufferReadIndex=1-r}}function Z(){var t=this.gl,e=this.renderData,r=this.options;if(!(0,u.isNull)(e)){var n=e.updateProgram,i=e.textures,o=e.framebuffers,a=e.bufferWriteIndex,l=e.bufferReadIndex,c=r.resolution;t.viewport(0,0,c,c),t.bindFramebuffer(t.FRAMEBUFFER,o[a]),Reflect.apply(s,this,[i[l]]),t.useProgram(n.id),Reflect.apply(V,this,[]),Reflect.apply(Q,this,[])}}function tt(){var t=this,e=this.renderData,r=this.options,n=this.fadeData;if(!(0,u.isNull)(e)){var i=e.parentElement,o=n.isTransitioning,a=r.running,l=r.idleFluctuations,c=r.lastRunningState,s=getComputedStyle(i);n.backgroundInfo={width:parseInt(s.width),height:parseInt(s.height)},Reflect.apply(q,this,[]),a?(c||(r.lastRunningState=!0,this.show()),l&&this.raindropsFall(),o&&this.fade(),Reflect.apply(Z,this,[]),Reflect.apply(K,this,[])):c&&(r.lastRunningState=!1,this.hide()),e.animationFrameId=requestAnimationFrame(function(){return Reflect.apply(tt,t,[])})}}function et(t,e,r){var n=this.renderData;if(!(0,u.isNull)(n)){var i=n.parentElement,o=window.getComputedStyle(i),a=parseInt(o.borderLeftWidth)||0,l=parseInt(o.borderTopWidth)||0,c=i.getBoundingClientRect(),s=t.clientX-c.left-a,f=t.clientY-c.top-l;this.drop(s,f,e,r)}}function rt(){var t=this,e=this.renderData,r=this.options;if(!(0,u.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(et,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 nt="\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 it(){var t=this.gl,e=this.renderData;if(!(0,u.isNull)(e)){var r=e.textureDelta;e.dropProgram=c(nt,"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(nt,"\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 ot(){var t=this.gl,e=this.renderData;if(!(0,u.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 at(t){var e=this.gl,r=this.renderData,n=this.fadeData;if(!(0,u.isNull)(r)){var i=r.backgroundTexture,o=r.parentElement,a=n.backgroundInfo,l=a.width,c=a.height,s=function(t){return(0,u.isZero)(t&t-1)},f=s(l)&&s(c)?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 lt(){var t=this,e=this.renderData,r=this.options,n=this.fadeData;if(!(0,u.isNull)(e)&&this.config){var i=e.textures,o=e.framebuffers,a=r.resolution,l=this.gl,c=1/a;e.textureDelta=new Float32Array([c,c]),this.config.extensions.forEach(function(t){return l.getExtension(t)});for(var s=this.config.arrayType,f=s?new s(a*a*4):null,p=this.config,d=0;d<2;d++){var h=l.createTexture(),m=l.createFramebuffer();l.bindFramebuffer(l.FRAMEBUFFER,m),l.bindTexture(l.TEXTURE_2D,h),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MIN_FILTER,p.linearSupport?l.LINEAR:l.NEAREST),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MAG_FILTER,p.linearSupport?l.LINEAR:l.NEAREST),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_S,l.CLAMP_TO_EDGE),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_T,l.CLAMP_TO_EDGE),l.texImage2D(l.TEXTURE_2D,0,l.RGBA,a,a,0,l.RGBA,p.type,f),l.framebufferTexture2D(l.FRAMEBUFFER,l.COLOR_ATTACHMENT0,l.TEXTURE_2D,h,0),i.push(h),o.push(m)}e.quad=l.createBuffer(),l.bindBuffer(l.ARRAY_BUFFER,e.quad),l.bufferData(l.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,1,1,-1,1]),l.STATIC_DRAW),Reflect.apply(it,this,[]),Reflect.apply(ot,this,[]),Reflect.apply(B,this,[]),l.clearColor(0,0,0,0),l.blendFunc(l.SRC_ALPHA,l.ONE_MINUS_SRC_ALPHA),r.visible=!0,r.running=!0,Reflect.apply(rt,this,[]),Reflect.apply(at,this,[n.lastDrawImage]),e.animationFrameId=requestAnimationFrame(function(){return Reflect.apply(tt,t,[])})}}function ut(){var t=this.renderData,e=this.fadeData;if(!(0,u.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(B,this,[])}}function ct(){var t=this.renderData,e=this.fadeData;(0,u.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 st(t,e,r,n){var i=this.renderData,o=this.options,a=this.gl;if(!(0,u.isNull)(i)){var l=i.parentElement,c=i.dropProgram,f=i.textures,p=i.framebuffers,d=i.bufferWriteIndex,h=i.bufferReadIndex,m=o.resolution,g=l.offsetWidth,y=l.offsetHeight,v=Math.max(g,y);r/=v;var b=new Float32Array([(2*t-g)/v,(y-2*e)/v]);a.viewport(0,0,m,m),a.bindFramebuffer(a.FRAMEBUFFER,p[d]),Reflect.apply(s,this,[f[h]]),a.useProgram(c.id),a.uniform2fv(c.locations.center,b),a.uniform1f(c.locations.radius,r),a.uniform1f(c.locations.strength,n),Reflect.apply(V,this,[]),Reflect.apply(Q,this,[])}}function ft(t){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 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,ht(n.key),n)}}function dt(t,e,r){return(e=ht(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ht(t){var e=function(t){if("object"!=ft(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ft(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ft(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 gt(t,e){return t.get(vt(t,e))}function yt(t,e,r){return t.set(vt(t,e),r),r}function vt(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 bt=new WeakMap,wt=new WeakMap,Et=new WeakMap,St=new WeakMap,Ot=new WeakMap,Rt=new WeakMap,Pt=new WeakMap,Tt=new WeakMap,At=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,bt,E.accelerating),mt(this,wt,E.interactive),mt(this,Et,E.resolution),mt(this,St,E.perturbance),mt(this,Ot,E.dropRadius),dt(this,"imgUrl",E.imgUrl),mt(this,Rt,E.idleFluctuations),mt(this,Pt,E.raindropsTimeInterval),dt(this,"crossOrigin","no-cors"),dt(this,"visible",!1),dt(this,"running",!1),mt(this,Tt,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 gt(bt,this)},set:function(t){t>100||t<2||yt(bt,this,t)}},{key:"interactive",get:function(){return gt(wt,this)},set:function(t){(0,u.isBoolean)(t)&&yt(wt,this,t)}},{key:"resolution",get:function(){return gt(Et,this)},set:function(t){t<100||t>550||yt(Et,this,t)}},{key:"perturbance",get:function(){return gt(St,this)},set:function(t){t<1e-4||t>1||yt(St,this,t)}},{key:"dropRadius",get:function(){return gt(Ot,this)},set:function(t){!isFinite(t)||t<10||yt(Ot,this,t)}},{key:"idleFluctuations",get:function(){return gt(Rt,this)},set:function(t){(0,u.isBoolean)(t)&&yt(Rt,this,t)}},{key:"raindropsTimeInterval",get:function(){return gt(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 gt(Tt,this)},set:function(t){yt(Tt,this,(0,u.isUndefined)(t)?void 0:Boolean(t))}}])&&pt(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function kt(){var t=this.fadeData,e=this.options,r=this.renderData;if((0,u.isNull)(r))return!0;var n=e.imgUrl,i=r.lastUseStyle,o=t.lastDrawImage,a=t.backgroundInfo,l=a.width,c=a.height,s=o.tag,f=o.kind,p=F(e,i),d=o.width===l,h=o.height===c,m=d&&h;if("image"===f&&m&&(0,u.isString)(p)&&p===s)return!0;var g=(0,u.isArray)(n)&&n.join("_")||"";if("linear-gradient"===f&&m&&g===s)return!0;var y=U(e,i);return!("background-color"!==f||!m||s!==y)}function xt(){var t=this,e=this.options,r=this.fadeData;r.transparentId=setTimeout(function(){if(clearTimeout(r.transparentId),r.isTransitioning)return Reflect.apply(xt,t,[]);Reflect.apply(kt,t,[])||r.run()},2*e.raindropsTimeInterval)}function jt(){var t=this.renderData,e=this.fadeData,r=this.options,n=e.toBeList;if((0,u.isNull)(t))return Reflect.apply(Dt,this,["还没有准备好,即将退出"]);if((0,u.isEmptyArray)(n))return Reflect.apply(Dt,this,["由于缺少当前渲染的背景,退出"]);if(0===e.drawProgress&&n.forEach(function(t){}),e.drawProgress>1e3){if(e.lastDrawImage=n.shift(),Reflect.apply(at,this,[e.lastDrawImage]),(0,u.isEmptyArray)(n)){var i=t.lastUseStyle;((0,u.isNull)(r.imgUrl)||(0,u.isBusinessEmptyString)(r.imgUrl)||(0,u.isZero)(r.imgUrl.length))&&f(i.backgroundColor)&&p(i.backgroundImage)&&Reflect.apply(_,this,[!1])}return Reflect.apply(Dt,this,["当前执行完毕,开启下次执行"])}var o=e.lastDrawImage,a=e.backgroundInfo;e.drawProgress+=18;var l=document.createElement("canvas"),c=l.getContext("2d");if((0,u.isNull)(c)||(0,u.isNull)(o.resource)||(0,u.isEmptyArray)(n))return Reflect.apply(Dt,this,"环境值错误");var s=a.width,d=a.height;l.width=s,l.height=d,c.clearRect(0,0,s,d),c.drawImage(o.resource,0,0,s,d),c.globalAlpha=e.drawProgress/1e3,c.drawImage(n[0].resource,0,0,s,d),c.globalAlpha=1;var h={resource:l,width:s,height:d,kind:"mix",tag:"".concat(o.tag," >> ").concat(n[0].tag)};Reflect.apply(at,this,[h]),n.length>1&&(e.lastDrawImage=h,n.shift(),e.drawProgress=0)}function Dt(t){this.fadeData.isTransitioning=!1,Reflect.apply(xt,this,[])}function It(t){return It="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},It(t)}function _t(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 Ft(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Ut(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){if("object"!=It(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=It(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==It(e)?e:e+""}function Nt(t,e){return t.get(Mt(t,e))}function Mt(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 Bt=new WeakMap,Lt=new WeakSet,Xt=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),Ft(this,r=Lt),r.add(this),Ut(this,"backgroundInfo",{width:0,height:0}),Ut(this,"transparentId",setTimeout(Boolean)),Ut(this,"lastDrawImage",void 0),Ut(this,"toBeList",[]),Ut(this,"drawProgress",0),Ut(this,"isTransitioning",!1),function(t,e){Ft(t,e),e.set(t,void 0)}(this,Bt),Ut(this,"isDark",!1);var n,i,o=e.renderData;if((0,u.isNull)(o))n=10,i=10;else{var a=getComputedStyle(o.parentElement);n=parseInt(a.width),i=parseInt(a.height)}this.backgroundInfo={width:n,height:i},this.lastDrawImage={resource:I(n,i),width:n,height:i,kind:"default",tag:""},function(t,e,r){t.set(Mt(t,e),r)}(Bt,this,window.matchMedia("(prefers-color-scheme: dark)")),this.isDark=Nt(Bt,this).matches,Nt(Bt,this).addEventListener("change",Mt(Lt,this,Wt));var l=this;Object.defineProperty(Nt(Bt,this),"isDark",{get:function(){return l.isDark},set:function(t){l.isDark=t,Reflect.apply(kt,e,[])||Reflect.apply(_,e,[!0])}})},(e=[{key:"run",value:function(){this.isTransitioning||(this.drawProgress=0,this.isTransitioning=!0)}},{key:"destroy",value:function(){Nt(Bt,this).removeEventListener("change",Mt(Lt,this,Wt)),this.transparentId&&clearTimeout(this.transparentId)}}])&&_t(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function Wt(t){this.isDark=t.matches}function zt(t){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 Gt(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 Ht(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Gt(Object(r),!0).forEach(function(e){Vt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Gt(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function $t(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,Kt(n.key),n)}}function Yt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Yt=function(){return!!t})()}function qt(t){return qt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},qt(t)}function Jt(t,e){return Jt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Jt(t,e)}function Vt(t,e,r){return(e=Kt(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Kt(t){var e=function(t){if("object"!=zt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=zt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==zt(e)?e:e+""}var Qt=new WeakMap,Zt=function(r){function i(r,n){var o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),Vt(o=function(t,e,r){return e=qt(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,Yt()?Reflect.construct(e,r||[],qt(t).constructor):e.apply(t,r))}(this,i,[r]),"renderData",null),Vt(o,"options",void 0),Vt(o,"fadeData",void 0),Vt(o,"defaults",E),Vt(o,"initialized",!1),function(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)}(o,Qt,e(ut,{this:o})),Object.defineProperties(o,{defaults:{value:o.defaults,writable:!1,enumerable:!1,configurable:!1}}),o.options=new At(Ht(Ht({},o.defaults),n)),o.renderData=new Y(r,o.reloadBackground,o),o.fadeData=new Xt(o),(0,u.isFalse)(o.initState)||(0,u.isNull)(r.parentElement)||(0,u.isNull)(o.config)||(0,u.isNull)(o.gl)?o.initState=!1:(function(e){var r=e.parentElement;e.width=r.clientWidth,e.height=r.clientHeight,t(e,{position:"absolute",left:0,top:0,right:0,bottom:0,zIndex:-1,pointerEvents:"none"})}(r),Reflect.apply(lt,o,[])),window.matchMedia("(prefers-color-scheme: dark)"),o}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&&Jt(t,e)}(i,r),o=i,(a=[{key:"raindropsFall",value:function(){var t=this.renderData,e=this.options,r=this.fadeData;if(!(0,u.isNull)(t)){var i=r.backgroundInfo,o=t.lastRaindropsFallTime,a=e.raindropsTimeInterval,l=e.dropRadius,c=Date.now();if(!(c-o<a)){t.lastRaindropsFallTime=c;var s=function(t){return n(t||1)},f=i.width,p=i.height;this.drop(s(f),s(p),l,.03)}}}},{key:"drop",value:function(t,e,r,n){Reflect.apply(st,this,[t,e,r,n])}},{key:"fade",value:function(){Reflect.apply(jt,this,[])}},{key:"reloadBackground",value:function(){var t,e;(t=Qt,e=this,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))).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(L,this,[])}},{key:"hide",value:function(){this.options.visible=!1,this.canvas.style.visibility="hidden",Reflect.apply(W,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(B,this,[])):"darkMode"===t?(this.options.darkMode=e,Reflect.apply(kt,this,[])||Reflect.apply(_,this,[!0])):this.options[t]=e}}])&&$t(o.prototype,a),Object.defineProperty(o,"prototype",{writable:!1}),o;var o,a}(w)},362:(t,e,r)=>{var n,i;t.exports=(n={isArray:()=>o.isArray,isBoolean:()=>o.isBoolean,isBusinessEmptyString:()=>o.isBusinessEmptyString,isEmptyArray:()=>o.isEmptyArray,isFalse:()=>o.isFalse,isFunction:()=>o.isFunction,isNull:()=>o.isNull,isPlainObject:()=>o.isPlainObject,isString:()=>o.isString,isUndefined:()=>o.isUndefined,isZero:()=>o.isZero,typeOf:()=>o.typeOf},i={},r.d(i,n),i)}},b={};function w(t){var e=b[t];if(void 0!==e)return e.exports;var r=b[t]={exports:{}};return v[t](r,r.exports,w),r.exports}w.d=(t,e)=>{for(var r in e)w.o(e,r)&&!w.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},w.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),w.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var E=w(362);function S(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,a,l=[],u=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(l.push(n.value),l.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return O(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)?O(t,e):void 0}}(t,e)||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 O(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 R(t,e){var r=d(null),n=d(!0),i=d(!1),o=S(h(!1),2),a=o[0],l=o[1],u=S(h(null),2),c=u[0],s=u[1];function p(){n.current=!0,setTimeout(function(){var t;n.current&&(null===(t=r.current)||void 0===t||t.destroy())},0)}return f(function(){return n.current=!1,(0,E.isNull)(t.current)||i.current||(l(!0),i.current=!0,Promise.resolve().then(w.bind(w,338)).then(function(i){(0,E.isNull)(t.current)||n.current||(r.current=new i.Ripples(t.current,e))}).catch(function(t){s(t)}).finally(function(){l(!1)})),p},[]),{ripples:r,isLoading:a,error:c}}var P=w(338);function T(t,e){var r=d(null);return f(function(){if(!(0,E.isNull)(t.current))return r.current=new P.Ripples(t.current,e),function(){var t;return null===(t=r.current)||void 0===t?void 0:t.destroy()}},[]),r}function A(t){return A="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},A(t)}function k(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 x(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 j(t,e,r){return(e=function(t){var e=function(t){if("object"!=A(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=A(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==A(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function D(t,e){var r=d(function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?x(Object(r),!0).forEach(function(e){j(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}({},e));f(function(){e&&t.current&&Object.keys(t.current.defaults).forEach(function(n){var i,o,a,l=e[n],u=(i=l,o=r.current[n],(0,E.isArray)(i)&&(0,E.isArray)(o)&&(i.length!==o.length||!i.every(function(t){return i[t]===o[t]}))||(!(0,E.isArray)(i)||!(0,E.isArray)(o))&&i!==o);t.current&&u&&(r.current[n]=(0,E.isArray)(l)?function(t){if(Array.isArray(t))return k(t)}(a=l)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(a)||function(t,e){if(t){if("string"==typeof t)return k(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)?k(t,e):void 0}}(a)||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.")}():e[n],t.current.set(n,l))})},[e])}var I=g.div.withConfig({displayName:"Content",componentId:"sc-1rvy95w-0"})(["position:relative;top:0px;left:0px;z-index:1;width:100%;height:100%;min-width:1px;min-height:1px;contain:layout paint style;will-change:transform,opacity;"]);function _(t){return _="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)}var F=["children","style","option"];function U(){return U=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},U.apply(null,arguments)}function C(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 N(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?C(Object(r),!0).forEach(function(e){M(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function M(t,e,r){return(e=function(t){var e=function(t){if("object"!=_(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=_(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==_(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var B=u(function(t,e){var r=t.children,n=t.style,i=t.option,o=function(t,e){if(null==t)return{};var r,n,i=function(t,e){if(null==t)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(-1!==e.indexOf(n))continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n<o.length;n++)r=o[n],-1===e.indexOf(r)&&{}.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}(t,F),a=d(null),u=T(a,i);return D(u,i),p(e,function(){return{toggleState:function(){var t;null===(t=u.current)||void 0===t||t.changePlayingState()},get state(){var t,e;return null!==(t=null===(e=u.current)||void 0===e?void 0:e.options.playingState)&&void 0!==t&&t},pause:function(){var t;null===(t=u.current)||void 0===t||t.pause()},set:function(t){if(!(0,E.isUndefined)(t))for(var e=Object.keys(t),r=0,n=e.length;r<n;r++){var i,o=e[r];null===(i=u.current)||void 0===i||i.set(o,t[o])}}}}),l.createElement(I,U({style:N({backgroundRepeat:"round"},n)},o),l.createElement("canvas",{ref:a,"data-earthnut-ui":"canvas",width:0,height:0}),r)});function L(t){return L="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},L(t)}B.displayName="en-background-ripple";var X=["children","style","option"];function W(){return W=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},W.apply(null,arguments)}function z(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 G(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?z(Object(r),!0).forEach(function(e){H(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):z(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function H(t,e,r){return(e=function(t){var e=function(t){if("object"!=L(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=L(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==L(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var $=u(function(t,e){var r=t.children,n=t.style,i=t.option,o=function(t,e){if(null==t)return{};var r,n,i=function(t,e){if(null==t)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(-1!==e.indexOf(n))continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n<o.length;n++)r=o[n],-1===e.indexOf(r)&&{}.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}(t,X),a=d(null),u=R(a,i).ripples;return D(u,i),p(e,function(){return{toggleState:function(){var t;null===(t=u.current)||void 0===t||t.changePlayingState()},get state(){var t,e;return null!==(t=null===(e=u.current)||void 0===e?void 0:e.options.playingState)&&void 0!==t&&t},pause:function(){var t;null===(t=u.current)||void 0===t||t.pause()},set:function(t){if(!(0,E.isUndefined)(t))for(var e=Object.keys(t),r=0,n=e.length;r<n;r++){var i,o=e[r];null===(i=u.current)||void 0===i||i.set(o,t[o])}}}}),l.createElement(I,W({style:G({backgroundRepeat:"round"},n)},o),l.createElement("canvas",{ref:a,"data-earthnut-ui":"canvas",width:0,height:0}),r)});function Y(){var t=d(void 0);return f(function(){return function(){return t.current&&clearTimeout(t.current)}},[]),t}function q(t){var e,r,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];n=(0,E.isBoolean)(n)?{immediately:n,once:!1}:(0,E.isPlainObject)(n)?{once:!!(0,E.isBoolean)(n.once)&&n.once,immediately:!!(0,E.isBoolean)(n.immediately)&&n.immediately}:{immediately:!1,once:!1};var i=d({id:0,immediately:null===(e=n.immediately)||void 0===e||e,once:null!==(r=n.once)&&void 0!==r&&r,noun:!1,time:0,cancelTime:0,firstRunEffect:!0,isUnmounted:!0,result:{cancel:function(){var t=i.current.id;t&&window.cancelAnimationFrame(t),i.current.result.canceled=!0},canceled:!1,render:function(){var t=i.current,e=t.result;t.cancelTime=performance.now(),e.cancel(),e.canceled=!1,t.id=window.requestAnimationFrame(a)}}}),o=i.current,a=c(function(e){var r=o.result,n=e-o.cancelTime;o.time+=n<0?16.7:n,t(e,o.time),o.once||r.render()},[t]);return o.immediately&&!o.noun&&o.result.canceled&&(o.noun=!0,o.result.render()),f(function(){o.once||(o.firstRunEffect?(o.result.render(),o.firstRunEffect=!1):o.firstRunEffect||o.result.canceled||o.result.render())},[t]),f(function(){return o.isUnmounted=!1,function(){o.isUnmounted=!0,setTimeout(function(){o.isUnmounted&&o.result.cancel()},0)}},[]),o.result}function J(t){var e=d(!1);return f(function(){var r=t.current;if(r){var n=function(){return e.current=!0},i=function(){return e.current=!1};return r.addEventListener("compositionstart",n),r.addEventListener("compositionend",i),function(){r.removeEventListener("compositionstart",n),r.removeEventListener("compositionend",i)}}},[]),e}$.displayName="en-lazy-background-ripple";const V="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAMAAACeL25MAAAACVBMVEUAAAD///////9zeKVjAAAAA3RSTlP//wDXyg1BAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAEElEQVQImWNkYmBgYGJAIQAAigAKNDhFkwAAAABJRU5ErkJggg==";function K(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,a,l=[],u=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(l.push(n.value),l.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Q(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)?Q(t,e):void 0}}(t,e)||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 Q(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 Z=["loadingSrc","className","src"];function tt(){return tt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},tt.apply(null,arguments)}var et=g.img.withConfig({displayName:"image__Content",componentId:"sc-qt83ib-0"})(["margin:0;padding:0;user-select:none;"]),rt=u(function(t,e){var r=t.loadingSrc,n=void 0===r?V:r,i=t.className,o=t.src,a=function(t,e){if(null==t)return{};var r,n,i=function(t,e){if(null==t)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(-1!==e.indexOf(n))continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n<o.length;n++)r=o[n],-1===e.indexOf(r)&&{}.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}(t,Z),u=function(t,e){var r=K(h(V),2),n=r[0],i=r[1],o=K(h(0),2),a=o[0],l=o[1];return f(function(){l(1),(0,E.isString)(t)||(t=V);var e=new Image;e.onload=function(){l(2),i(t)},e.onerror=function(){i(V),l(4)},e.src=t,e.crossOrigin="anonymous"},[t,e]),{resultSrc:n,loadComplete:a}}(null!=o?o:n),c=u.resultSrc,s=u.loadComplete;return l.createElement(et,tt({},a,{ref:e,src:c||n,className:y(1===s&&"loading",i)}))});function nt(t){var e=localStorage.getItem(t);try{return null!=e&&JSON.parse(e)||""}catch(t){return e||""}}function it(t){return localStorage.removeItem(t)}rt.displayName="en-image";var ot={del:it,set:function(t,e){localStorage.setItem(t,JSON.stringify(e))},get:nt,getAndDel:function(t){var e=nt(t);return it(t),e},clear:function(){localStorage.clear()},setSession:function(t,e){sessionStorage.setItem(t,JSON.stringify(e))},getSession:function(t){var e=sessionStorage.getItem(t);return null!=e&&JSON.parse(e)||""},delSession:function(t){return sessionStorage.removeItem(t)}},at={get theme(){return ot.get("theme")},set theme(t){["light","dark"].includes(t)?ot.set("theme",t):(0,E.isBusinessEmptyString)(t)&&ot.del("theme")},get token(){return ot.get("token")},set token(t){(0,E.isString)(t)&&!(0,E.isBusinessEmptyString)(t)&&ot.set("token",t)}};function lt(t){return lt="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},lt(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 ct(t){var e=function(t){if("object"!=lt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=lt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==lt(e)?e:e+""}function st(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 ft=new WeakSet;function pt(t){var e,r;return null!==(e=null===(r=window)||void 0===r?void 0:r.matchMedia(/:/.test(t)&&!/\(|\)/.test(t)?"(".concat(t,")"):t).matches)&&void 0!==e&&e}var dt=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),function(t,e){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.add(t)}(this,ft)},e=[{key:"vibrate",value:function(){var t;null!==(t=window)&&void 0!==t&&null!==(t=t.navigator)&&void 0!==t&&t.vibrate&&window.navigator.vibrate(200)}},{key:"share",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"https://letmiseesee.pages.dev",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"慧土灵核";null!==(t=window)&&void 0!==t&&null!==(t=t.navigator)&&void 0!==t&&t.share&&window.navigator.share({url:e,text:r,title:n})}},{key:"isPhone",value:function(){var t;return!st(ft,this,pt).call(this,"any-hover: hover")&&!st(ft,this,pt).call(this,"any-pointer: fine")&&(null===(t=window)||void 0===t||null===(t=t.navigator)||void 0===t?void 0:t.maxTouchPoints)>0}},{key:"isSmallScreen",get:function(){return st(ft,this,pt).call(this,"max-width: 576px")?"small":st(ft,this,pt).call(this,"max-width: 996px")?"middle":"large"}},{key:"isDark",get:function(){return st(ft,this,pt).call(this,"prefers-color-scheme: dark")}},{key:"isOrientation",get:function(){var t=(screen.orientation||{}).type||screen.mozOrientation||screen.msOrientation;return"landscape-primary"!==t&&"landscape-secondary"!==t}}],e&&ut(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}());function ht(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,a,l=[],u=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(l.push(n.value),l.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return mt(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)?mt(t,e):void 0}}(t,e)||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 mt(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 gt=a({autoColorMode:!0,colorMode:"light",toggleColorMode:function(){return"light"},setColorMode:function(){return"light"},clearColorMode:function(){}});function yt(){return s(gt)}function vt(t){var e=t.children,r=t.initialTheme,n=ht(h(r),2),i=n[0],o=n[1],a=ht(h(!0),2),u=a[0],c=a[1],s=function(t){return t===i||["light","dark"].indexOf(t)<0?i:(o(t),at.theme=t,t)};return f(function(){var t=at.theme;c(!t);var e=dt.isDark;t?s(t):o(e?"dark":"light")},[]),f(function(){var t=window.matchMedia("(prefers-color-scheme: dark)"),e=function(t){return!at.theme&&o(t.matches?"dark":"light")};return t.addEventListener("change",e),function(){return t.removeEventListener("change",e)}},[]),f(function(){(function(t){var e=t.keyItem,r=t.value,n=t.end,i=t.path,o=t.domain,a=t.secure;if(!e||/^(?:expires|max-age|path|domain|secure)$/i.test(e))return!1;var l="";switch((0,E.typeOf)(n)){case"undefined":l="; expires=Fri, 31 Dec 9999 23:59:59 GMT";break;case"number":l=n===1/0?"; expires=Fri, 31 Dec 9999 23:59:59 GMT":"; max-age="+n;break;case"string":l="; expires="+n;break;case"date":l="; expires="+n.toUTCString()}document.cookie=encodeURIComponent(e).concat("=").concat(encodeURIComponent(r)).concat(l).concat(o?"; domain=".concat(o):"").concat(i?"; path=".concat(i):"").concat(a?"; secure":"")})({keyItem:"theme",value:i}),window.document.documentElement.setAttribute("data-theme",i),c(!at.theme)},[i]),l.createElement(gt.Provider,{value:{colorMode:i,toggleColorMode:function(){return s("light"===i?"dark":"light")},setColorMode:s,clearColorMode:function(){c(!0),o(dt.isDark?"dark":"light"),at.theme=""},autoColorMode:u}},e)}var bt,wt,Et=g.div.withConfig({displayName:"SwitchContent",componentId:"sc-1i8tohq-0"})(["cursor:pointer;position:relative;top:0px;left:0px;color:#000;display:inline-block;width:54px;height:27px;margin:0;padding:0;vertical-align:text-bottom;background-color:transparent;background-image:linear-gradient(to right,rgb(90,90,90),rgba(70,120,240)),radial-gradient( circle closest-corner at 100% 50%,rgb(90,90,90),rgb(90,90,90) 100%,transparent 100% ),radial-gradient( circle closest-corner at 0% 50%,rgba(70,120,240),rgba(70,120,240) 100%,transparent 100% );background-size:40% 50%,20% 50%,20% 50%;background-position:50% 50%,13.25% 50%,85% 50%;background-repeat:no-repeat;overflow:hidden;&::before{content:'';position:absolute;top:10%;width:40%;height:80%;text-align:center;line-height:1.3;font-size:40%;border-radius:50%;transition:all 1s;","}"],function(t){return"left"===t.$type&&m(["left:15%;background-color:rgb(120,120,120);"])||m(["left:45%;background-color:rgba(35,70,247,1);"])}),St=g.div.withConfig({displayName:"SwitchContainer",componentId:"sc-ixe4ua-0"})(["display:inline-block;padding:4px 12px;"]);function Ot(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}var Rt=g.div.withConfig({displayName:"SwitchLabel",componentId:"sc-yl5nc4-0"})(["display:inline-block;vertical-align:super;transition:color 1.28s;",""],function(t){return!0===t.$type&&m(bt||(bt=Ot(["\n color: rgb(55,80,210);\n font-weight: 800;\n "])))||m(wt||(wt=Ot(["\n color: #666;\n "])))}),Pt=["value","change","children"];function Tt(){return Tt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Tt.apply(null,arguments)}function At(t){var e=t.value,r=t.change,n=t.children,i=function(t,e){if(null==t)return{};var r,n,i=function(t,e){if(null==t)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(-1!==e.indexOf(n))continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n<o.length;n++)r=o[n],-1===e.indexOf(r)&&{}.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}(t,Pt);return l.createElement(St,null,n&&l.createElement(Rt,{$type:e},n),l.createElement(Et,Tt({$type:e?"right":"left",onClick:function(t){t.preventDefault(),t.stopPropagation(),(0,E.isFunction)(r)&&Reflect.apply(r,null,[t])}},i)))}export{B as BackgroundRipple,rt as EnImage,At as EnSwitch,rt as Image,$ as LazyBackgroundRipple,At as Switch,vt as ThemeColorModeProvider,q as useAnimationFrame,yt as useColorMode,J as useInputIsComposing,R as useLazyRipples,T as useRipples,Y as useTimeId};
|
|
10
10
|
//# sourceMappingURL=client.mjs.map
|